[r-base] 01/03: New upstream version 3.4.0

Ximin Luo infinity0 at debian.org
Tue May 2 11:57:14 UTC 2017


This is an automated email from the git hooks/post-receive script.

infinity0 pushed a commit to branch master
in repository r-base.

commit 06fe5bbac58c76ba71b4fca7dc893dc57d9f9e1f
Author: Ximin Luo <infinity0 at debian.org>
Date:   Tue May 2 13:54:24 2017 +0200

    New upstream version 3.4.0
---
 ChangeLog                                          |     8 +
 INSTALL                                            |     2 +-
 Makeconf.in                                        |    14 +-
 Makefile.in                                        |    15 +-
 README                                             |     2 +-
 SVN-REVISION                                       |     4 +-
 VERSION                                            |     2 +-
 VERSION-NICK                                       |     2 +-
 config.site                                        |   144 +-
 configure                                          | 22856 ++++---
 configure.ac                                       |   662 +-
 doc/AUTHORS                                        |    14 +-
 doc/BioC_mirrors.csv                               |    16 +
 doc/COPYRIGHTS                                     |   212 +-
 doc/CRAN_mirrors.csv                               |   203 +-
 doc/FAQ                                            |   486 +-
 doc/Makefile.in                                    |    16 +-
 doc/Makefile.win                                   |    14 +-
 doc/NEWS                                           |  2949 +-
 doc/NEWS.2.Rd                                      |     7 +-
 doc/NEWS.Rd                                        |  3340 +-
 doc/NEWS.pdf                                       |   Bin 320363 -> 487283 bytes
 doc/RESOURCES                                      |    10 +-
 doc/Rscript.1                                      |     2 +-
 doc/THANKS                                         |    35 +-
 doc/html/Makefile.in                               |     8 +-
 doc/html/NEWS.2.html                               |  1058 +-
 doc/html/NEWS.html                                 |  4784 +-
 doc/html/Notes                                     |    18 +
 doc/html/R-admin.html                              |  3044 +-
 doc/html/R.css                                     |   142 +-
 doc/html/Rlogo.pdf                                 |   Bin 0 -> 6755 bytes
 doc/html/Rlogo.svg                                 |    33 +
 doc/html/Search.html                               |     5 +-
 doc/html/SearchOn.html                             |   213 +-
 doc/html/about.html                                |     6 +-
 doc/html/favicon.ico                               |   Bin 1406 -> 5430 bytes
 doc/html/index-default.html                        |     8 +-
 doc/html/logo.jpg                                  |   Bin 3173 -> 15985 bytes
 doc/html/logosm.jpg                                |   Bin 3682 -> 0 bytes
 doc/html/packages-head-utf8.html                   |     7 +-
 doc/html/resources.html                            |   121 +-
 doc/manual/Makefile.in                             |    90 +-
 doc/manual/Makefile.win                            |    74 +-
 doc/manual/R-FAQ.texi                              |   468 +-
 doc/manual/R-admin.texi                            |  2815 +-
 doc/manual/R-data.texi                             |   289 +-
 doc/manual/R-defs.texi                             |     4 +-
 doc/manual/R-exts.c                                |     4 +-
 doc/manual/R-exts.texi                             |  3425 +-
 doc/manual/R-intro.R                               |     7 +-
 doc/manual/R-intro.texi                            |   114 +-
 doc/manual/R-ints.texi                             |   211 +-
 doc/manual/R-lang.texi                             |    45 +-
 doc/manual/README                                  |     2 +-
 doc/manual/Rfaq.css                                |    87 +-
 doc/manual/Rman.css                                |    47 +-
 doc/manual/quot.sed                                |     3 +
 doc/manual/refman.top                              |     2 +-
 doc/manual/resources.texi                          |    19 +-
 doc/manual/rw-FAQ.texi                             |   214 +-
 etc/Makeconf.in                                    |    48 +-
 etc/ldpaths.in                                     |     6 +-
 etc/repositories                                   |     8 +-
 m4/Makefile.in                                     |     1 +
 m4/R.m4                                            |   635 +-
 m4/cairo.m4                                        |     7 +-
 m4/cxx_11.m4                                       |  1062 +-
 m4/gettext-lib.m4                                  |   555 +-
 m4/gettext.m4                                      |     2 +-
 m4/libtool.m4                                      |  4195 +-
 m4/ltoptions.m4                                    |   154 +-
 m4/ltsugar.m4                                      |     7 +-
 m4/ltversion.m4                                    |    14 +-
 m4/lt~obsolete.m4                                  |    17 +-
 m4/openmp.m4                                       |    98 +
 po/POTFILES                                        |     4 +-
 share/Makefile.in                                  |     7 +-
 share/R/REMOVE.R                                   |     2 +-
 share/Rd/macros/system.Rd                          |    47 +
 share/dictionaries/en_stats.rds                    |   Bin 2491 -> 2614 bytes
 share/dictionaries/en_stats.txt                    |    24 +-
 share/licenses/BSD_2_clause                        |    11 +-
 share/licenses/BSD_3_clause                        |    10 +-
 share/licenses/MIT                                 |    11 +-
 share/licenses/license.db                          |   168 +-
 share/make/basepkg.mk                              |    22 +-
 share/make/check_vars_out.mk                       |     2 +-
 share/make/config.mk                               |     3 +
 share/make/lazycomp.mk                             |     3 +-
 share/make/winshlib.mk                             |     4 +-
 share/texmf/bibtex/bib/RJournal.bib                |  6515 +-
 share/texmf/bibtex/bib/Rnews.bib                   |    50 +-
 share/texmf/tex/latex/Rd.sty                       |     2 +-
 share/texmf/tex/latex/jss.cls                      |    16 +-
 src/appl/Makefile.in                               |     6 +-
 src/appl/Makefile.win                              |     6 +-
 src/appl/dqrdc2.f                                  |    13 +-
 src/appl/dqrls.f                                   |     9 +-
 src/appl/integrate.c                               |     6 +-
 src/appl/interv.c                                  |   101 +-
 src/appl/lbfgsb.c                                  |    19 +-
 src/appl/maxcol.c                                  |     8 +-
 src/appl/optim.c                                   |     8 +-
 src/appl/pretty.c                                  |    14 +-
 src/appl/uncmin.c                                  |    22 +-
 src/extra/Makefile.in                              |    25 +-
 src/extra/blas/Makefile.in                         |    10 +-
 src/extra/blas/xerbla.c                            |    14 -
 src/extra/bzip2/LICENSE                            |    42 -
 src/extra/bzip2/Makefile.in                        |    70 -
 src/extra/bzip2/Makefile.win                       |    27 -
 src/extra/bzip2/R_changes                          |   321 -
 src/extra/bzip2/blocksort.c                        |  1095 -
 src/extra/bzip2/bzcompress.c                       |   672 -
 src/extra/bzip2/bzlib.c                            |  1585 -
 src/extra/bzip2/bzlib.h                            |   282 -
 src/extra/bzip2/bzlib_private.h                    |   512 -
 src/extra/bzip2/crctable.c                         |   104 -
 src/extra/bzip2/decompress.c                       |   646 -
 src/extra/bzip2/huffman.c                          |   205 -
 src/extra/bzip2/randtable.c                        |    84 -
 src/extra/graphapp/Makefile.win                    |     2 +-
 src/extra/graphapp/clipboard.c                     |     2 +-
 src/extra/graphapp/dialogs.c                       |     1 +
 src/extra/graphapp/dllversion.rc                   |     2 +-
 src/extra/graphapp/ga.h                            |     2 +-
 src/extra/graphapp/gdraw.c                         |     2 +-
 src/extra/graphapp/gimage.c                        |     2 +-
 src/extra/graphapp/gmenus.c                        |     2 +-
 src/extra/graphapp/metafile.c                      |     2 +-
 src/extra/graphapp/printer.c                       |     2 +-
 src/extra/graphapp/rgb.c                           |     2 +-
 src/extra/graphapp/status.c                        |     2 +-
 src/extra/graphapp/tooltips.c                      |     2 +-
 src/extra/intl/Makefile.in                         |     4 +-
 src/extra/intl/R_changes                           |     2 +-
 src/extra/intl/dcigettext.c                        |     2 +
 src/extra/intl/plural.c                            |     2 +-
 src/extra/pcre/LICENCE                             |    92 -
 src/extra/pcre/Makefile.in                         |    82 -
 src/extra/pcre/Makefile.win                        |    34 -
 src/extra/pcre/R_changes                           |    31 -
 src/extra/pcre/pcre.h                              |   677 -
 src/extra/pcre/pcre_chartables.c                   |   198 -
 src/extra/pcre/pcre_compile.c                      |  9484 ---
 src/extra/pcre/pcre_config.c                       |   190 -
 src/extra/pcre/pcre_exec.c                         |  7178 ---
 src/extra/pcre/pcre_fullinfo.c                     |   245 -
 src/extra/pcre/pcre_get.c                          |   662 -
 src/extra/pcre/pcre_globals.c                      |    86 -
 src/extra/pcre/pcre_internal.h                     |  2810 -
 src/extra/pcre/pcre_jit_compile.c                  | 10701 ----
 src/extra/pcre/pcre_maketables.c                   |   156 -
 src/extra/pcre/pcre_newline.c                      |   210 -
 src/extra/pcre/pcre_ord2utf8.c                     |    94 -
 src/extra/pcre/pcre_refcount.c                     |    92 -
 src/extra/pcre/pcre_study.c                        |  1626 -
 src/extra/pcre/pcre_tables.c                       |   658 -
 src/extra/pcre/pcre_ucd.c                          |  3297 -
 src/extra/pcre/pcre_valid_utf8.c                   |   301 -
 src/extra/pcre/pcre_version.c                      |    98 -
 src/extra/pcre/pcre_xclass.c                       |   268 -
 src/extra/pcre/sljit/sljitConfig.h                 |   120 -
 src/extra/pcre/sljit/sljitConfigInternal.h         |   523 -
 src/extra/pcre/sljit/sljitExecAllocator.c          |   312 -
 src/extra/pcre/sljit/sljitLir.c                    |  1838 -
 src/extra/pcre/sljit/sljitLir.h                    |  1001 -
 src/extra/pcre/sljit/sljitNativePPC_32.c           |   269 -
 src/extra/pcre/sljit/sljitNativePPC_64.c           |   421 -
 src/extra/pcre/sljit/sljitNativePPC_common.c       |  2188 -
 src/extra/pcre/sljit/sljitNativeSPARC_32.c         |   164 -
 src/extra/pcre/sljit/sljitNativeSPARC_common.c     |  1383 -
 src/extra/pcre/sljit/sljitNativeX86_32.c           |   557 -
 src/extra/pcre/sljit/sljitNativeX86_64.c           |   810 -
 src/extra/pcre/sljit/sljitNativeX86_common.c       |  2883 -
 src/extra/pcre/sljit/sljitUtils.c                  |   332 -
 src/extra/pcre/ucp.h                               |   200 -
 src/extra/tre/Makefile.in                          |     4 +-
 src/extra/tre/Makefile.win                         |     6 +-
 src/extra/tre/R_changes                            |     8 +-
 src/extra/tre/tre-compile.c                        |     4 +-
 src/extra/tre/tre-internal.h                       |    16 +-
 src/extra/tre/tre-match-approx.c                   |     8 +-
 src/extra/trio/compat.c                            |     8 +-
 src/extra/tzone/Make.zi                            |     2 +-
 src/extra/tzone/Makefile.in                        |     2 +-
 src/extra/tzone/Notes                              |    21 +-
 src/extra/tzone/localtime.c                        |    77 +-
 src/extra/tzone/registryTZ.c                       |    42 +-
 src/extra/tzone/strftime.c                         |     2 +-
 src/extra/tzone/tzfile.h                           |     5 +-
 src/extra/tzone/zoneinfo.zip                       |   Bin 453945 -> 414936 bytes
 src/extra/win_iconv/Makefile.win                   |     8 +-
 src/extra/win_iconv/win_iconv.c                    |    16 +-
 src/extra/xdr/Makefile.in                          |     4 +-
 src/extra/xdr/Makefile.win                         |     7 +-
 src/extra/xdr/rpc/types.h                          |     2 +-
 src/extra/xz/Makefile.in                           |    87 -
 src/extra/xz/Makefile.win                          |    47 -
 src/extra/xz/R_changes                             |    20 -
 src/extra/xz/api/lzma.h                            |   313 -
 src/extra/xz/api/lzma/base.h                       |   601 -
 src/extra/xz/api/lzma/bcj.h                        |    90 -
 src/extra/xz/api/lzma/block.h                      |   530 -
 src/extra/xz/api/lzma/check.h                      |   150 -
 src/extra/xz/api/lzma/container.h                  |   424 -
 src/extra/xz/api/lzma/delta.h                      |    77 -
 src/extra/xz/api/lzma/filter.h                     |   424 -
 src/extra/xz/api/lzma/hardware.h                   |    50 -
 src/extra/xz/api/lzma/index.h                      |   682 -
 src/extra/xz/api/lzma/index_hash.h                 |   107 -
 src/extra/xz/api/lzma/lzma.h                       |   420 -
 src/extra/xz/api/lzma/stream_flags.h               |   223 -
 src/extra/xz/api/lzma/version.h                    |   121 -
 src/extra/xz/api/lzma/vli.h                        |   166 -
 src/extra/xz/check/check.c                         |   174 -
 src/extra/xz/check/check.h                         |    95 -
 src/extra/xz/check/crc32_fast.c                    |    82 -
 src/extra/xz/check/crc32_small.c                   |    61 -
 src/extra/xz/check/crc32_table.c                   |    19 -
 src/extra/xz/check/crc32_table_be.h                |   525 -
 src/extra/xz/check/crc32_table_le.h                |   525 -
 src/extra/xz/check/crc32_tablegen.c                |   117 -
 src/extra/xz/check/crc32_x86.S                     |   304 -
 src/extra/xz/check/crc64_fast.c                    |    74 -
 src/extra/xz/check/crc64_small.c                   |    53 -
 src/extra/xz/check/crc64_table.c                   |    19 -
 src/extra/xz/check/crc64_table_be.h                |   521 -
 src/extra/xz/check/crc64_table_le.h                |   521 -
 src/extra/xz/check/crc64_tablegen.c                |    88 -
 src/extra/xz/check/crc64_x86.S                     |   287 -
 src/extra/xz/check/crc_macros.h                    |    32 -
 src/extra/xz/check/sha256.c                        |   200 -
 src/extra/xz/common/alone_decoder.c                |   238 -
 src/extra/xz/common/alone_decoder.h                |    23 -
 src/extra/xz/common/alone_encoder.c                |   157 -
 src/extra/xz/common/auto_decoder.c                 |   186 -
 src/extra/xz/common/block_buffer_decoder.c         |    80 -
 src/extra/xz/common/block_buffer_encoder.c         |   305 -
 src/extra/xz/common/block_decoder.c                |   242 -
 src/extra/xz/common/block_decoder.h                |    22 -
 src/extra/xz/common/block_encoder.c                |   217 -
 src/extra/xz/common/block_encoder.h                |    47 -
 src/extra/xz/common/block_header_decoder.c         |   116 -
 src/extra/xz/common/block_header_encoder.c         |   132 -
 src/extra/xz/common/block_util.c                   |    90 -
 src/extra/xz/common/bsr.h                          |    60 -
 src/extra/xz/common/bswap.h                        |    52 -
 src/extra/xz/common/common.c                       |   388 -
 src/extra/xz/common/common.h                       |   282 -
 src/extra/xz/common/easy_buffer_encoder.c          |    27 -
 src/extra/xz/common/easy_decoder_memusage.c        |    24 -
 src/extra/xz/common/easy_encoder.c                 |    25 -
 src/extra/xz/common/easy_encoder_memusage.c        |    24 -
 src/extra/xz/common/easy_preset.c                  |    27 -
 src/extra/xz/common/easy_preset.h                  |    32 -
 src/extra/xz/common/filter_buffer_decoder.c        |    87 -
 src/extra/xz/common/filter_buffer_encoder.c        |    54 -
 src/extra/xz/common/filter_common.c                |   337 -
 src/extra/xz/common/filter_common.h                |    48 -
 src/extra/xz/common/filter_decoder.c               |   183 -
 src/extra/xz/common/filter_decoder.h               |    23 -
 src/extra/xz/common/filter_encoder.c               |   288 -
 src/extra/xz/common/filter_encoder.h               |    27 -
 src/extra/xz/common/filter_flags_decoder.c         |    46 -
 src/extra/xz/common/filter_flags_encoder.c         |    56 -
 src/extra/xz/common/index.c                        |  1244 -
 src/extra/xz/common/index.h                        |    73 -
 src/extra/xz/common/index_decoder.c                |   345 -
 src/extra/xz/common/index_encoder.c                |   254 -
 src/extra/xz/common/index_encoder.h                |    23 -
 src/extra/xz/common/index_hash.c                   |   332 -
 src/extra/xz/common/local.h                        |   123 -
 src/extra/xz/common/mythread.h                     |    42 -
 src/extra/xz/common/stream_buffer_decoder.c        |    91 -
 src/extra/xz/common/stream_buffer_encoder.c        |   140 -
 src/extra/xz/common/stream_decoder.c               |   451 -
 src/extra/xz/common/stream_decoder.h               |    21 -
 src/extra/xz/common/stream_encoder.c               |   331 -
 src/extra/xz/common/stream_encoder.h               |    23 -
 src/extra/xz/common/stream_flags_common.c          |    47 -
 src/extra/xz/common/stream_flags_common.h          |    33 -
 src/extra/xz/common/stream_flags_decoder.c         |    82 -
 src/extra/xz/common/stream_flags_encoder.c         |    86 -
 src/extra/xz/common/sysdefs.h                      |   189 -
 src/extra/xz/common/tuklib_common.h                |    71 -
 src/extra/xz/common/tuklib_config.h                |     7 -
 src/extra/xz/common/tuklib_integer.h               |   523 -
 src/extra/xz/common/vli_decoder.c                  |    86 -
 src/extra/xz/common/vli_encoder.c                  |    69 -
 src/extra/xz/common/vli_size.c                     |    30 -
 src/extra/xz/delta/delta_common.c                  |    70 -
 src/extra/xz/delta/delta_common.h                  |    20 -
 src/extra/xz/delta/delta_decoder.c                 |    76 -
 src/extra/xz/delta/delta_decoder.h                 |    25 -
 src/extra/xz/delta/delta_encoder.c                 |   121 -
 src/extra/xz/delta/delta_encoder.h                 |    23 -
 src/extra/xz/delta/delta_private.h                 |    37 -
 src/extra/xz/lz/lz_decoder.c                       |   300 -
 src/extra/xz/lz/lz_decoder.h                       |   234 -
 src/extra/xz/lz/lz_encoder.c                       |   583 -
 src/extra/xz/lz/lz_encoder.h                       |   328 -
 src/extra/xz/lz/lz_encoder_hash.h                  |   108 -
 src/extra/xz/lz/lz_encoder_hash_table.h            |    68 -
 src/extra/xz/lz/lz_encoder_mf.c                    |   753 -
 src/extra/xz/lzma/fastpos.h                        |   140 -
 src/extra/xz/lzma/fastpos_table.c                  |   519 -
 src/extra/xz/lzma/fastpos_tablegen.c               |    56 -
 src/extra/xz/lzma/lzma2_decoder.c                  |   304 -
 src/extra/xz/lzma/lzma2_decoder.h                  |    28 -
 src/extra/xz/lzma/lzma2_encoder.c                  |   393 -
 src/extra/xz/lzma/lzma2_encoder.h                  |    41 -
 src/extra/xz/lzma/lzma_common.h                    |   223 -
 src/extra/xz/lzma/lzma_decoder.c                   |  1057 -
 src/extra/xz/lzma/lzma_decoder.h                   |    52 -
 src/extra/xz/lzma/lzma_encoder.c                   |   675 -
 src/extra/xz/lzma/lzma_encoder.h                   |    54 -
 src/extra/xz/lzma/lzma_encoder_optimum_fast.c      |   179 -
 src/extra/xz/lzma/lzma_encoder_optimum_normal.c    |   868 -
 src/extra/xz/lzma/lzma_encoder_presets.c           |    61 -
 src/extra/xz/lzma/lzma_encoder_private.h           |   148 -
 src/extra/xz/rangecoder/price.h                    |    92 -
 src/extra/xz/rangecoder/price_table.c              |    22 -
 src/extra/xz/rangecoder/price_tablegen.c           |    87 -
 src/extra/xz/rangecoder/range_common.h             |    73 -
 src/extra/xz/rangecoder/range_decoder.h            |   179 -
 src/extra/xz/rangecoder/range_encoder.h            |   231 -
 src/extra/xz/simple/arm.c                          |    69 -
 src/extra/xz/simple/armthumb.c                     |    74 -
 src/extra/xz/simple/ia64.c                         |   110 -
 src/extra/xz/simple/powerpc.c                      |    73 -
 src/extra/xz/simple/simple_coder.c                 |   277 -
 src/extra/xz/simple/simple_coder.h                 |    60 -
 src/extra/xz/simple/simple_decoder.c               |    40 -
 src/extra/xz/simple/simple_decoder.h               |    22 -
 src/extra/xz/simple/simple_encoder.c               |    38 -
 src/extra/xz/simple/simple_encoder.h               |    23 -
 src/extra/xz/simple/simple_private.h               |    75 -
 src/extra/xz/simple/sparc.c                        |    81 -
 src/extra/xz/simple/x86.c                          |   154 -
 src/extra/zlib/Makefile.in                         |    73 -
 src/extra/zlib/Makefile.win                        |    45 -
 src/extra/zlib/README                              |   115 -
 src/extra/zlib/R_changes                           |    71 -
 src/extra/zlib/Rzlib.def                           |    42 -
 src/extra/zlib/adler32.c                           |   179 -
 src/extra/zlib/compress.c                          |    80 -
 src/extra/zlib/crc32.c                             |   425 -
 src/extra/zlib/crc32.h                             |   441 -
 src/extra/zlib/deflate.c                           |  1967 -
 src/extra/zlib/deflate.h                           |   346 -
 src/extra/zlib/infback.c                           |   640 -
 src/extra/zlib/inffast.c                           |   340 -
 src/extra/zlib/inffast.h                           |    11 -
 src/extra/zlib/inffixed.h                          |    94 -
 src/extra/zlib/inflate.c                           |  1512 -
 src/extra/zlib/inflate.h                           |   122 -
 src/extra/zlib/inftrees.c                          |   306 -
 src/extra/zlib/inftrees.h                          |    62 -
 src/extra/zlib/trees.c                             |  1226 -
 src/extra/zlib/trees.h                             |   128 -
 src/extra/zlib/uncompr.c                           |    59 -
 src/extra/zlib/zconf.h                             |   447 -
 src/extra/zlib/zlib.h                              |  1771 -
 src/extra/zlib/zutil.c                             |   325 -
 src/extra/zlib/zutil.h                             |   253 -
 src/gnuwin32/CHANGES.Rd                            |     4 -
 src/gnuwin32/COPYRIGHTS.win                        |    13 +-
 src/gnuwin32/Maintainers.notes                     |     2 +-
 src/gnuwin32/Makefile                              |   113 +-
 src/gnuwin32/MkRules.dist                          |   122 +-
 src/gnuwin32/MkRules.rules                         |    43 +-
 src/gnuwin32/README                                |     2 +-
 src/gnuwin32/Rdll.hide                             |   108 +-
 src/gnuwin32/bitmap/INSTALL                        |     2 -
 src/gnuwin32/bitmap/Makefile                       |    57 -
 src/gnuwin32/bitmap/Makefile.jpeg                  |    51 -
 src/gnuwin32/bitmap/Makefile.tiff                  |    65 -
 src/gnuwin32/bitmap/jconfig.h                      |    49 -
 src/gnuwin32/bitmap/rbitmap.c                      |   659 -
 src/gnuwin32/bitmap/tif_config.h                   |   359 -
 src/gnuwin32/bitmap/tiffconf.h                     |   133 -
 src/gnuwin32/console.c                             |   110 +-
 src/gnuwin32/console.h                             |     2 +-
 src/gnuwin32/consolestructs.h                      |     2 +-
 src/gnuwin32/cran/index.in                         |    10 +-
 src/gnuwin32/cran/rdevel.in                        |    19 +-
 src/gnuwin32/cran/rpatched.in                      |    10 +-
 src/gnuwin32/cran/rtest.in                         |     8 +-
 src/gnuwin32/dllversion.rc                         |     2 +-
 src/gnuwin32/dynload.c                             |     4 +-
 src/gnuwin32/editor.c                              |     7 +-
 src/gnuwin32/editor.h                              |     2 +-
 src/gnuwin32/embeddedR.c                           |     2 +-
 src/gnuwin32/extra.c                               |    53 +-
 src/gnuwin32/fixed/Makeconf                        |     2 +-
 src/gnuwin32/fixed/Makefile                        |    11 +-
 src/gnuwin32/fixed/etc/Makeconf                    |    54 +-
 src/gnuwin32/fixed/h/Rconfig.h                     |     2 +
 src/gnuwin32/fixed/h/config.h                      |    59 +-
 src/gnuwin32/fixed/h/trioremap.h                   |    36 +
 src/gnuwin32/fixed/html/rwin.html                  |     2 +-
 src/gnuwin32/front-ends/Makefile                   |   281 +-
 src/gnuwin32/front-ends/R.c                        |     2 +-
 src/gnuwin32/front-ends/R.ico                      |   Bin 2239 -> 66210 bytes
 src/gnuwin32/front-ends/RGui32.manifest            |    15 +
 src/gnuwin32/front-ends/RGui64.manifest            |    15 +
 src/gnuwin32/front-ends/RSetReg.c                  |     2 +-
 src/gnuwin32/front-ends/Rcmd64.exe.manifest        |    20 +
 src/gnuwin32/front-ends/Renviron.c                 |     2 +-
 src/gnuwin32/front-ends/Rfe.c                      |     2 +-
 src/gnuwin32/front-ends/Rscript.exe.manifest       |    47 +
 src/gnuwin32/front-ends/Rscript64.exe.manifest     |    47 +
 src/gnuwin32/front-ends/Rterm32.manifest           |    15 +
 src/gnuwin32/front-ends/Rterm64.manifest           |    15 +
 src/gnuwin32/front-ends/open.c                     |     2 +-
 src/gnuwin32/front-ends/rcico.rc                   |     4 +-
 src/gnuwin32/front-ends/rcmd.c                     |     2 +-
 src/gnuwin32/front-ends/rcmdfn.c                   |     4 +-
 src/gnuwin32/front-ends/rgico.rc                   |     2 +-
 src/gnuwin32/front-ends/rgui.c                     |     2 +-
 src/gnuwin32/front-ends/rpwd.c                     |     2 +-
 src/gnuwin32/front-ends/rsico.rc                   |    34 +
 src/gnuwin32/front-ends/rterm.c                    |     2 +-
 src/gnuwin32/front-ends/rtest.c                    |     2 +-
 src/gnuwin32/front-ends/rtico.rc                   |     2 +-
 src/gnuwin32/getline/getline.c                     |     4 +-
 src/gnuwin32/guicolors.h                           |     2 +-
 src/gnuwin32/installer/CustomMsg.iss               |    71 +-
 src/gnuwin32/installer/JRins.R                     |    44 +-
 src/gnuwin32/installer/Makefile                    |    22 +-
 src/gnuwin32/installer/R.bmp                       |   Bin 2102 -> 4854 bytes
 src/gnuwin32/installer/WiXins.R                    |     4 +-
 src/gnuwin32/installer/code.iss                    |    36 +-
 src/gnuwin32/installer/header1.iss                 |     6 +-
 src/gnuwin32/installer/reg.iss                     |     6 +-
 src/gnuwin32/installer/reg3264.iss                 |    12 +-
 src/gnuwin32/malloc.c                              |     9 +-
 src/gnuwin32/opt.c                                 |     2 +-
 src/gnuwin32/opt.h                                 |     2 +-
 src/gnuwin32/pager.c                               |    13 +-
 src/gnuwin32/preferences.c                         |     4 +-
 src/gnuwin32/preferences.h                         |     2 +-
 src/gnuwin32/rgui_UTF8.h                           |     2 +-
 src/gnuwin32/rhome.c                               |     2 +-
 src/gnuwin32/rt_complete.c                         |    21 +-
 src/gnuwin32/rui.c                                 |    27 +-
 src/gnuwin32/rui.h                                 |     2 +-
 src/gnuwin32/run.c                                 |     7 +-
 src/gnuwin32/run.h                                 |     2 +-
 src/gnuwin32/shext.c                               |     2 +-
 src/gnuwin32/sys-win32.c                           |     8 +-
 src/gnuwin32/system.c                              |    44 +-
 src/gnuwin32/win-nls.h                             |     2 +-
 src/gnuwin32/windlgs/src/ttest.c                   |     2 +-
 src/include/Defn.h                                 |   237 +-
 src/include/Errormsg.h                             |     4 +-
 src/include/Fileio.h                               |     4 +-
 src/include/Graphics.h                             |     8 +-
 src/include/GraphicsBase.h                         |    10 +-
 src/include/IOStuff.h                              |     4 +-
 src/include/Internal.h                             |    63 +-
 src/include/Makefile.in                            |     4 +-
 src/include/Makefile.win                           |    27 +-
 src/include/Parse.h                                |     6 +-
 src/include/Print.h                                |    12 +-
 src/include/R.h                                    |    61 +-
 src/include/R_ext/Applic.h                         |    15 +-
 src/include/R_ext/Arith.h                          |    24 +-
 src/include/R_ext/BLAS.h                           |   194 +-
 src/include/R_ext/Boolean.h                        |     8 +-
 src/include/R_ext/Callbacks.h                      |    14 +-
 src/include/R_ext/Complex.h                        |     8 +-
 src/include/R_ext/Connections.h                    |    10 +-
 src/include/R_ext/Constants.h                      |     8 +-
 src/include/R_ext/Error.h                          |    23 +-
 src/include/R_ext/GetX11Image.h                    |     6 +-
 src/include/R_ext/GraphicsDevice.h                 |    16 +-
 src/include/R_ext/GraphicsEngine.h                 |    20 +-
 src/include/R_ext/Itermacros.h                     |    42 +-
 src/include/R_ext/Lapack.h                         |   287 +-
 src/include/R_ext/Linpack.h                        |    12 +-
 src/include/R_ext/MathThreads.h                    |     8 +-
 src/include/R_ext/Memory.h                         |    19 +-
 src/include/R_ext/Parse.h                          |     2 +-
 src/include/R_ext/Print.h                          |    21 +-
 src/include/R_ext/PrtUtil.h                        |    17 +-
 src/include/R_ext/QuartzDevice.h                   |     8 +-
 src/include/R_ext/R-ftp-http.h                     |    26 +-
 src/include/R_ext/RS.h                             |    36 +-
 src/include/R_ext/RStartup.h                       |    22 +-
 src/include/R_ext/Rallocators.h                    |    14 +-
 src/include/R_ext/Random.h                         |    17 +-
 src/include/R_ext/Rdynload.h                       |    70 +-
 src/include/R_ext/Riconv.h                         |     8 +-
 src/include/R_ext/Utils.h                          |    28 +-
 src/include/R_ext/Visibility.h                     |     8 +-
 src/include/R_ext/eventloop.h                      |    24 +-
 src/include/R_ext/libextern.h                      |     8 +-
 src/include/R_ext/stats_package.h                  |    13 +-
 src/include/R_ext/stats_stubs.h                    |    20 +-
 src/include/Rconnections.h                         |    10 +-
 src/include/Rdefines.h                             |   120 +-
 src/include/Rdynpriv.h                             |    38 +-
 src/include/Rembedded.h                            |    17 +-
 src/include/Rgraphics.h                            |    20 +-
 src/include/Rinlinedfuns.h                         |    49 +-
 src/include/Rinterface.h                           |    50 +-
 src/include/Rinternals.h                           |   206 +-
 src/include/Rmath.h0.in                            |    42 +-
 src/include/Rmodules/RX11.h                        |    13 +-
 src/include/Rmodules/Rinternet.h                   |    28 +-
 src/include/Rmodules/Rlapack.h                     |    10 +-
 src/include/Rmodules/Rvfonts.h                     |    26 -
 src/include/S.h                                    |    27 +-
 src/include/Startup.h                              |    10 +-
 src/include/config.h.in                            |    96 +-
 src/include/memcheck.h                             |   278 -
 src/include/rlocale.h                              |    29 +-
 src/include/valgrind.h                             |   469 -
 src/include/vg/memcheck.h                          |   303 +
 src/include/vg/valgrind.h                          |  6587 ++
 src/library/Makefile.win                           |     3 +-
 src/library/Recommended/KernSmooth.tgz             |     2 +-
 src/library/Recommended/KernSmooth_2.23-13.tar.gz  |   Bin 24470 -> 0 bytes
 src/library/Recommended/KernSmooth_2.23-15.tar.gz  |   Bin 0 -> 24572 bytes
 src/library/Recommended/MASS.tgz                   |     2 +-
 src/library/Recommended/MASS_7.3-35.tar.gz         |   Bin 486699 -> 0 bytes
 src/library/Recommended/MASS_7.3-47.tar.gz         |   Bin 0 -> 487707 bytes
 src/library/Recommended/Makefile.in                |     5 +-
 src/library/Recommended/Makefile.win               |     1 +
 src/library/Recommended/Matrix.tgz                 |     2 +-
 src/library/Recommended/Matrix_1.1-4.tar.gz        |   Bin 1670504 -> 0 bytes
 src/library/Recommended/Matrix_1.2-9.tar.gz        |   Bin 0 -> 1815079 bytes
 src/library/Recommended/boot.tgz                   |     2 +-
 src/library/Recommended/boot_1.3-13.tar.gz         |   Bin 230887 -> 0 bytes
 src/library/Recommended/boot_1.3-19.tar.gz         |   Bin 0 -> 231523 bytes
 src/library/Recommended/class.tgz                  |     2 +-
 src/library/Recommended/class_7.3-11.tar.gz        |   Bin 19594 -> 0 bytes
 src/library/Recommended/class_7.3-14.tar.gz        |   Bin 0 -> 19726 bytes
 src/library/Recommended/cluster.tgz                |     2 +-
 src/library/Recommended/cluster_1.15.3.tar.gz      |   Bin 275274 -> 0 bytes
 src/library/Recommended/cluster_2.0.6.tar.gz       |   Bin 0 -> 319236 bytes
 src/library/Recommended/codetools.tgz              |     2 +-
 src/library/Recommended/codetools_0.2-15.tar.gz    |   Bin 0 -> 12930 bytes
 src/library/Recommended/codetools_0.2-9.tar.gz     |   Bin 12744 -> 0 bytes
 src/library/Recommended/foreign.tgz                |     2 +-
 src/library/Recommended/foreign_0.8-61.tar.gz      |   Bin 333303 -> 0 bytes
 src/library/Recommended/foreign_0.8-67.tar.gz      |   Bin 0 -> 334175 bytes
 src/library/Recommended/lattice.tgz                |     2 +-
 src/library/Recommended/lattice_0.20-29.tar.gz     |   Bin 347089 -> 0 bytes
 src/library/Recommended/lattice_0.20-35.tar.gz     |   Bin 0 -> 359813 bytes
 src/library/Recommended/mgcv.tgz                   |     2 +-
 src/library/Recommended/mgcv_1.8-17.tar.gz         |   Bin 0 -> 849787 bytes
 src/library/Recommended/mgcv_1.8-3.tar.gz          |   Bin 664225 -> 0 bytes
 src/library/Recommended/nlme.tgz                   |     2 +-
 src/library/Recommended/nlme_3.1-118.tar.gz        |   Bin 759488 -> 0 bytes
 src/library/Recommended/nlme_3.1-131.tar.gz        |   Bin 0 -> 780607 bytes
 src/library/Recommended/nnet.tgz                   |     2 +-
 src/library/Recommended/nnet_7.3-12.tar.gz         |   Bin 0 -> 28523 bytes
 src/library/Recommended/nnet_7.3-8.tar.gz          |   Bin 28419 -> 0 bytes
 src/library/Recommended/rpart.tgz                  |     2 +-
 src/library/Recommended/rpart_4.1-11.tar.gz        |   Bin 0 -> 819684 bytes
 src/library/Recommended/rpart_4.1-8.tar.gz         |   Bin 818732 -> 0 bytes
 src/library/Recommended/spatial.tgz                |     2 +-
 src/library/Recommended/spatial_7.3-11.tar.gz      |   Bin 0 -> 44664 bytes
 src/library/Recommended/spatial_7.3-8.tar.gz       |   Bin 43589 -> 0 bytes
 src/library/Recommended/survival.tgz               |     2 +-
 src/library/Recommended/survival_2.37-7.tar.gz     |   Bin 4132584 -> 0 bytes
 src/library/Recommended/survival_2.41-3.tar.gz     |   Bin 0 -> 4992943 bytes
 src/library/base/DESCRIPTION.in                    |     3 +-
 src/library/base/Makefile.in                       |     3 +-
 src/library/base/Makefile.win                      |     3 +-
 src/library/base/R/Bessel.R                        |     4 +-
 src/library/base/R/Defunct.R                       |     6 +-
 src/library/base/R/Deprecated.R                    |     4 +-
 src/library/base/R/LAPACK.R                        |     8 +-
 src/library/base/R/New-Internal.R                  |    32 +-
 src/library/base/R/RNG.R                           |     6 +-
 src/library/base/R/Scripts.R                       |     4 +-
 src/library/base/R/TAOCP.R                         |     4 +-
 src/library/base/R/all.equal.R                     |    95 +-
 src/library/base/R/allnames.R                      |     4 +-
 src/library/base/R/aperm.R                         |     4 +-
 src/library/base/R/append.R                        |     4 +-
 src/library/base/R/apply.R                         |    37 +-
 src/library/base/R/array.R                         |    13 +-
 src/library/base/R/as.R                            |    13 +-
 src/library/base/R/assign.R                        |     4 +-
 src/library/base/R/attach.R                        |    45 +-
 src/library/base/R/attr.R                          |     8 +-
 src/library/base/R/autoload.R                      |     6 +-
 src/library/base/R/backquote.R                     |     4 +-
 src/library/base/R/backsolve.R                     |     4 +-
 src/library/base/R/bindenv.R                       |     4 +-
 src/library/base/R/bitwise.R                       |     4 +-
 src/library/base/R/builtins.R                      |     4 +-
 src/library/base/R/by.R                            |     6 +-
 src/library/base/R/callCC.R                        |     4 +-
 src/library/base/R/cat.R                           |     4 +-
 src/library/base/R/character.R                     |    37 +-
 src/library/base/R/chol.R                          |     4 +-
 src/library/base/R/colSums.R                       |    54 +-
 src/library/base/R/conditions.R                    |    10 +-
 src/library/base/R/conflicts.R                     |     4 +-
 src/library/base/R/connections.R                   |    48 +-
 src/library/base/R/constants.R                     |     4 +-
 src/library/base/R/contributors.R                  |     4 +-
 src/library/base/R/cut.R                           |     6 +-
 src/library/base/R/data.matrix.R                   |     4 +-
 src/library/base/R/dataframe.R                     |   271 +-
 src/library/base/R/dates.R                         |    25 +-
 src/library/base/R/datetime.R                      |   159 +-
 src/library/base/R/dcf.R                           |    18 +-
 src/library/base/R/debug.R                         |    45 +-
 src/library/base/R/delay.R                         |     4 +-
 src/library/base/R/det.R                           |     4 +-
 src/library/base/R/diag.R                          |     6 +-
 src/library/base/R/diff.R                          |     4 +-
 src/library/base/R/dput.R                          |    16 +-
 src/library/base/R/dump.R                          |     8 +-
 src/library/base/R/duplicated.R                    |     6 +-
 src/library/base/R/dynload.R                       |    32 +-
 src/library/base/R/eapply.R                        |     4 +-
 src/library/base/R/eigen.R                         |    38 +-
 src/library/base/R/environment.R                   |     4 +-
 src/library/base/R/eval.R                          |    10 +-
 src/library/base/R/exists.R                        |    23 -
 src/library/base/R/expand.grid.R                   |    10 +-
 src/library/base/R/factor.R                        |    61 +-
 src/library/base/R/files.R                         |    27 +-
 src/library/base/R/findInt.R                       |    20 +-
 src/library/base/R/formals.R                       |     8 +-
 src/library/base/R/format.R                        |   208 +-
 src/library/base/R/frametools.R                    |     4 +-
 src/library/base/R/funprog.R                       |    22 +-
 src/library/base/R/get.R                           |    22 +-
 src/library/base/R/getenv.R                        |    15 +-
 src/library/base/R/gl.R                            |     4 +-
 src/library/base/R/grep.R                          |   144 +-
 src/library/base/R/identical.R                     |    10 +-
 src/library/base/R/ifelse.R                        |    24 +-
 src/library/base/R/interaction.R                   |     4 +-
 src/library/base/R/is.R                            |     4 +-
 src/library/base/R/jitter.R                        |     4 +-
 src/library/base/R/kappa.R                         |     4 +-
 src/library/base/R/kronecker.R                     |     4 +-
 src/library/base/R/labels.R                        |     4 +-
 src/library/base/R/lapply.R                        |     4 +-
 src/library/base/R/lazyload.R                      |    30 +-
 src/library/base/R/library.R                       |   302 +-
 src/library/base/R/license.R                       |     8 +-
 src/library/base/R/load.R                          |    21 +-
 src/library/base/R/locales.R                       |     4 +-
 src/library/base/R/lower.tri.R                     |     4 +-
 src/library/base/R/mapply.R                        |    14 +-
 src/library/base/R/match.R                         |    21 +-
 src/library/base/R/match.fun.R                     |     4 +-
 src/library/base/R/matrix.R                        |     4 +-
 src/library/base/R/max.col.R                       |     4 +-
 src/library/base/R/mean.R                          |     4 +-
 src/library/base/R/merge.R                         |    14 +-
 src/library/base/R/message.R                       |     4 +-
 src/library/base/R/methodsSupport.R                |    38 +-
 src/library/base/R/mode.R                          |    10 +-
 src/library/base/R/namespace.R                     |   632 +-
 src/library/base/R/notyet.R                        |     4 +-
 src/library/base/R/octhex.R                        |     6 +-
 src/library/base/R/options.R                       |    14 +-
 src/library/base/R/outer.R                         |    38 +-
 src/library/base/R/pairlist.R                      |     4 +-
 src/library/base/R/parse.R                         |    11 +-
 src/library/base/R/paste.R                         |     4 +-
 src/library/base/R/pmax.R                          |   129 +-
 src/library/base/R/pretty.R                        |     4 +-
 src/library/base/R/print.R                         |    23 +-
 src/library/base/R/qr.R                            |    17 +-
 src/library/base/R/quit.R                          |     4 +-
 src/library/base/R/range.R                         |     4 +-
 src/library/base/R/rank.R                          |    26 +-
 src/library/base/R/raw.R                           |     9 +-
 src/library/base/R/rep.R                           |     4 +-
 src/library/base/R/replace.R                       |     4 +-
 src/library/base/R/replicate.R                     |     4 +-
 src/library/base/R/rev.R                           |     4 +-
 src/library/base/R/rle.R                           |     4 +-
 src/library/base/R/rm.R                            |    10 +-
 src/library/base/R/rowsum.R                        |     6 +-
 src/library/base/R/sample.R                        |    13 +-
 src/library/base/R/sapply.R                        |    10 +-
 src/library/base/R/scale.R                         |     4 +-
 src/library/base/R/scan.R                          |     4 +-
 src/library/base/R/seq.R                           |    45 +-
 src/library/base/R/serialize.R                     |    25 +-
 src/library/base/R/sets.R                          |    11 +-
 src/library/base/R/sink.R                          |     8 +-
 src/library/base/R/solve.R                         |    13 +-
 src/library/base/R/sort.R                          |   116 +-
 src/library/base/R/source.R                        |   106 +-
 src/library/base/R/split.R                         |    11 +-
 src/library/base/R/srcfile.R                       |    27 +-
 src/library/base/R/stop.R                          |    36 +-
 src/library/base/R/structure.R                     |    13 +-
 src/library/base/R/strwrap.R                       |    72 +-
 src/library/base/R/summary.R                       |    73 +-
 src/library/base/R/svd.R                           |     4 +-
 src/library/base/R/sweep.R                         |     4 +-
 src/library/base/R/sys.R                           |     4 +-
 src/library/base/R/table.R                         |   137 +-
 src/library/base/R/tabulate.R                      |     8 +-
 src/library/base/R/tapply.R                        |    72 +-
 src/library/base/R/taskCallback.R                  |     4 +-
 src/library/base/R/temp.R                          |     4 +-
 src/library/base/R/time.R                          |    21 +-
 src/library/base/R/toString.R                      |     4 +-
 src/library/base/R/traceback.R                     |    47 +-
 src/library/base/R/unix/system.unix.R              |    23 +-
 src/library/base/R/unlist.R                        |     4 +-
 src/library/base/R/unname.R                        |     4 +-
 src/library/base/R/upper.tri.R                     |     4 +-
 src/library/base/R/userhooks.R                     |    12 +-
 src/library/base/R/utilities.R                     |     4 +-
 src/library/base/R/utils.R                         |    37 +-
 src/library/base/R/vector.R                        |     4 +-
 src/library/base/R/version.R                       |   153 +-
 src/library/base/R/warnings.R                      |    35 +-
 src/library/base/R/which.R                         |     4 +-
 src/library/base/R/windows/junctions.R             |     9 +-
 src/library/base/R/windows/system.R                |    12 +-
 src/library/base/R/withVisible.R                   |     4 +-
 src/library/base/R/write.R                         |     4 +-
 src/library/base/R/xor.R                           |     4 +-
 src/library/base/R/zapsmall.R                      |     4 +-
 src/library/base/R/zdatetime.R                     |     9 +-
 src/library/base/R/zdynvars.R                      |    13 +-
 src/library/base/R/zzz.R                           |    28 +-
 src/library/base/baseloader.R                      |    16 +-
 src/library/base/inst/CITATION                     |     4 +-
 src/library/base/makebasedb.R                      |     4 +-
 src/library/base/man/Arithmetic.Rd                 |    30 +-
 src/library/base/man/AsIs.Rd                       |     4 +-
 src/library/base/man/Bessel.Rd                     |    48 +-
 src/library/base/man/CallExternal.Rd               |     2 +-
 src/library/base/man/Colon.Rd                      |     2 +-
 src/library/base/man/Comparison.Rd                 |    22 +-
 src/library/base/man/Constants.Rd                  |     2 +-
 src/library/base/man/Control.Rd                    |    10 +-
 src/library/base/man/Cstack_info.Rd                |    15 +-
 src/library/base/man/DateTimeClasses.Rd            |    47 +-
 src/library/base/man/Dates.Rd                      |     4 +-
 src/library/base/man/Defunct.Rd                    |     2 +-
 src/library/base/man/Deprecated.Rd                 |     2 +-
 src/library/base/man/Encoding.Rd                   |     7 +-
 src/library/base/man/EnvVar.Rd                     |    11 +-
 src/library/base/man/Extract.Rd                    |    11 +-
 src/library/base/man/Extract.data.frame.Rd         |    21 +-
 src/library/base/man/Extract.factor.Rd             |     2 +-
 src/library/base/man/Extremes.Rd                   |    23 +-
 src/library/base/man/Foreign-internal.Rd           |     2 +-
 src/library/base/man/Foreign.Rd                    |    46 +-
 src/library/base/man/Hyperbolic.Rd                 |     2 +-
 src/library/base/man/ISOdatetime.Rd                |     2 +-
 src/library/base/man/Internal.Rd                   |     2 +-
 src/library/base/man/InternalMethods.Rd            |    11 +-
 src/library/base/man/La_library.Rd                 |    38 +
 src/library/base/man/La_version.Rd                 |    11 +-
 src/library/base/man/Last.value.Rd                 |     2 +-
 src/library/base/man/Log.Rd                        |     2 +-
 src/library/base/man/Logic.Rd                      |    13 +-
 src/library/base/man/LongVectors.Rd                |     6 +-
 src/library/base/man/MathFun.Rd                    |     2 +-
 src/library/base/man/Memory-limits.Rd              |    10 +-
 src/library/base/man/Memory.Rd                     |     8 +-
 src/library/base/man/NA.Rd                         |    31 +-
 src/library/base/man/NULL.Rd                       |    27 +-
 src/library/base/man/NumericConstants.Rd           |    34 +-
 src/library/base/man/Ops.Date.Rd                   |     2 +-
 src/library/base/man/Paren.Rd                      |     2 +-
 src/library/base/man/Platform.Rd                   |    40 +-
 src/library/base/man/Primitive.Rd                  |     6 +-
 src/library/base/man/Quotes.Rd                     |    79 +-
 src/library/base/man/Random-user.Rd                |     4 +-
 src/library/base/man/Random.Rd                     |    12 +-
 src/library/base/man/RdUtils.Rd                    |    11 +-
 src/library/base/man/Recall.Rd                     |     6 +-
 src/library/base/man/Reserved.Rd                   |     6 +-
 src/library/base/man/Rhome.Rd                      |    35 +-
 src/library/base/man/Round.Rd                      |     6 +-
 src/library/base/man/Special.Rd                    |     8 +-
 src/library/base/man/Startup.Rd                    |    11 +-
 src/library/base/man/Syntax.Rd                     |    22 +-
 src/library/base/man/Sys.getenv.Rd                 |     9 +-
 src/library/base/man/Sys.getpid.Rd                 |    10 +-
 src/library/base/man/Sys.glob.Rd                   |     6 +-
 src/library/base/man/Sys.info.Rd                   |    46 +-
 src/library/base/man/Sys.localeconv.Rd             |     4 +-
 src/library/base/man/Sys.readlink.Rd               |     6 +-
 src/library/base/man/Sys.setFileTime.Rd            |    14 +-
 src/library/base/man/Sys.setenv.Rd                 |     2 +-
 src/library/base/man/Sys.sleep.Rd                  |    32 +-
 src/library/base/man/Sys.time.Rd                   |     4 +-
 src/library/base/man/Sys.which.Rd                  |    12 +-
 src/library/base/man/Trig.Rd                       |    34 +-
 src/library/base/man/UseMethod.Rd                  |     6 +-
 src/library/base/man/Vectorize.Rd                  |    15 +-
 src/library/base/man/Version.Rd                    |    14 +-
 src/library/base/man/abbreviate.Rd                 |    68 +-
 src/library/base/man/agrep.Rd                      |     6 +-
 src/library/base/man/all.Rd                        |     2 +-
 src/library/base/man/all.equal.Rd                  |    49 +-
 src/library/base/man/allnames.Rd                   |     2 +-
 src/library/base/man/any.Rd                        |     2 +-
 src/library/base/man/aperm.Rd                      |     2 +-
 src/library/base/man/append.Rd                     |     2 +-
 src/library/base/man/apply.Rd                      |    27 +-
 src/library/base/man/args.Rd                       |    27 +-
 src/library/base/man/array.Rd                      |     7 +-
 src/library/base/man/as.Date.Rd                    |     8 +-
 src/library/base/man/as.POSIXlt.Rd                 |     2 +-
 src/library/base/man/as.data.frame.Rd              |    29 +-
 src/library/base/man/as.environment.Rd             |     2 +-
 src/library/base/man/as.function.Rd                |     2 +-
 src/library/base/man/assign.Rd                     |     6 +-
 src/library/base/man/assignOps.Rd                  |    15 +-
 src/library/base/man/attach.Rd                     |    10 +-
 src/library/base/man/attr.Rd                       |     7 +-
 src/library/base/man/attributes.Rd                 |    10 +-
 src/library/base/man/autoload.Rd                   |     2 +-
 src/library/base/man/backsolve.Rd                  |     4 +-
 src/library/base/man/base-defunct.Rd               |     6 +-
 src/library/base/man/base-deprecated.Rd            |     2 +-
 src/library/base/man/base-internal.Rd              |    10 +-
 src/library/base/man/base-package.Rd               |     2 +-
 src/library/base/man/basename.Rd                   |     2 +-
 src/library/base/man/bincode.Rd                    |     2 +-
 src/library/base/man/bindenv.Rd                    |     6 +-
 src/library/base/man/bitwise.Rd                    |    25 +-
 src/library/base/man/body.Rd                       |     7 +-
 src/library/base/man/bquote.Rd                     |     2 +-
 src/library/base/man/browser.Rd                    |     6 +-
 src/library/base/man/browserText.Rd                |     2 +-
 src/library/base/man/builtins.Rd                   |     2 +-
 src/library/base/man/by.Rd                         |     2 +-
 src/library/base/man/c.Rd                          |    27 +-
 src/library/base/man/call.Rd                       |     2 +-
 src/library/base/man/callCC.Rd                     |     2 +-
 src/library/base/man/capabilities.Rd               |   126 +-
 src/library/base/man/cat.Rd                        |     4 +-
 src/library/base/man/cbind.Rd                      |    57 +-
 src/library/base/man/char.expand.Rd                |     2 +-
 src/library/base/man/character.Rd                  |     7 +-
 src/library/base/man/charmatch.Rd                  |     5 +-
 src/library/base/man/chartr.Rd                     |     2 +-
 src/library/base/man/chkDots.Rd                    |    35 +
 src/library/base/man/chol.Rd                       |    18 +-
 src/library/base/man/chol2inv.Rd                   |     8 +-
 src/library/base/man/class.Rd                      |    18 +-
 src/library/base/man/col.Rd                        |     2 +-
 src/library/base/man/colSums.Rd                    |    28 +-
 src/library/base/man/colnames.Rd                   |     2 +-
 src/library/base/man/commandArgs.Rd                |     2 +-
 src/library/base/man/comment.Rd                    |     2 +-
 src/library/base/man/complex.Rd                    |    60 +-
 src/library/base/man/conditions.Rd                 |     9 +-
 src/library/base/man/conflicts.Rd                  |     2 +-
 src/library/base/man/connections.Rd                |   153 +-
 src/library/base/man/contributors.Rd               |     2 +-
 src/library/base/man/copyright.Rd                  |     2 +-
 src/library/base/man/crossprod.Rd                  |    15 +-
 src/library/base/man/cumsum.Rd                     |     2 +-
 src/library/base/man/curlGetHeaders.Rd             |    79 +
 src/library/base/man/cut.POSIXt.Rd                 |     2 +-
 src/library/base/man/cut.Rd                        |     5 +-
 src/library/base/man/data.class.Rd                 |     2 +-
 src/library/base/man/data.frame.Rd                 |    19 +-
 src/library/base/man/data.matrix.Rd                |     2 +-
 src/library/base/man/dataframeHelpers.Rd           |     2 +-
 src/library/base/man/date.Rd                       |     2 +-
 src/library/base/man/dcf.Rd                        |    10 +-
 src/library/base/man/debug.Rd                      |    78 +-
 src/library/base/man/delayedAssign.Rd              |    39 +-
 src/library/base/man/deparse.Rd                    |     6 +-
 src/library/base/man/deparseOpts.Rd                |    37 +-
 src/library/base/man/det.Rd                        |     2 +-
 src/library/base/man/detach.Rd                     |     6 +-
 src/library/base/man/dev.Rd                        |     8 +-
 src/library/base/man/diag.Rd                       |    24 +-
 src/library/base/man/diff.Rd                       |     2 +-
 src/library/base/man/difftime.Rd                   |    15 +-
 src/library/base/man/dim.Rd                        |     2 +-
 src/library/base/man/dimnames.Rd                   |    16 +-
 src/library/base/man/do.call.Rd                    |     4 +-
 src/library/base/man/dontCheck.Rd                  |     2 +-
 src/library/base/man/double.Rd                     |    10 +-
 src/library/base/man/dput.Rd                       |    22 +-
 src/library/base/man/drop.Rd                       |     2 +-
 src/library/base/man/droplevels.Rd                 |    28 +-
 src/library/base/man/dump.Rd                       |    11 +-
 src/library/base/man/duplicated.Rd                 |    16 +-
 src/library/base/man/dynload.Rd                    |    22 +-
 src/library/base/man/eapply.Rd                     |     2 +-
 src/library/base/man/eigen.Rd                      |    31 +-
 src/library/base/man/encodeString.Rd               |     9 +-
 src/library/base/man/environment.Rd                |     4 +-
 src/library/base/man/eval.Rd                       |     2 +-
 src/library/base/man/exists.Rd                     |    46 +-
 src/library/base/man/expand.grid.Rd                |    10 +-
 src/library/base/man/expression.Rd                 |     2 +-
 src/library/base/man/extSoftVersion.Rd             |    76 +
 src/library/base/man/factor.Rd                     |    45 +-
 src/library/base/man/file.access.Rd                |     4 +-
 src/library/base/man/file.choose.Rd                |     2 +-
 src/library/base/man/file.info.Rd                  |    28 +-
 src/library/base/man/file.path.Rd                  |     7 +-
 src/library/base/man/file.show.Rd                  |    20 +-
 src/library/base/man/files.Rd                      |    69 +-
 src/library/base/man/files2.Rd                     |    11 +-
 src/library/base/man/find.package.Rd               |     8 +-
 src/library/base/man/findInterval.Rd               |    27 +-
 src/library/base/man/force.Rd                      |     2 +-
 src/library/base/man/forceAndCall.Rd               |    37 +
 src/library/base/man/formals.Rd                    |    41 +-
 src/library/base/man/format.Rd                     |    39 +-
 src/library/base/man/format.info.Rd                |     2 +-
 src/library/base/man/format.pval.Rd                |     2 +-
 src/library/base/man/formatDL.Rd                   |     9 +-
 src/library/base/man/formatc.Rd                    |    95 +-
 src/library/base/man/function.Rd                   |     2 +-
 src/library/base/man/funprog.Rd                    |     8 +-
 src/library/base/man/gc.Rd                         |     2 +-
 src/library/base/man/gc.time.Rd                    |     2 +-
 src/library/base/man/gctorture.Rd                  |     2 +-
 src/library/base/man/get.Rd                        |    38 +-
 src/library/base/man/getCallingDLL.Rd              |     2 +-
 src/library/base/man/getDLLRegisteredRoutines.Rd   |     6 +-
 src/library/base/man/getLoadedDLLs.Rd              |     6 +-
 src/library/base/man/getNativeSymbolInfo.Rd        |     4 +-
 src/library/base/man/gettext.Rd                    |    10 +-
 src/library/base/man/getwd.Rd                      |     2 +-
 src/library/base/man/gl.Rd                         |     2 +-
 src/library/base/man/grep.Rd                       |    81 +-
 src/library/base/man/grepRaw.Rd                    |    10 +-
 src/library/base/man/groupGeneric.Rd               |     2 +-
 src/library/base/man/grouping.Rd                   |    57 +
 src/library/base/man/gzcon.Rd                      |     8 +-
 src/library/base/man/hexmode.Rd                    |     4 +-
 src/library/base/man/iconv.Rd                      |    31 +-
 src/library/base/man/icuSetCollate.Rd              |    29 +-
 src/library/base/man/identical.Rd                  |    31 +-
 src/library/base/man/identity.Rd                   |     7 +-
 src/library/base/man/ifelse.Rd                     |    47 +-
 src/library/base/man/integer.Rd                    |     2 +-
 src/library/base/man/interaction.Rd                |     2 +-
 src/library/base/man/interactive.Rd                |     6 +-
 src/library/base/man/invisible.Rd                  |     2 +-
 src/library/base/man/is.finite.Rd                  |     9 +-
 src/library/base/man/is.function.Rd                |     2 +-
 src/library/base/man/is.language.Rd                |     7 +-
 src/library/base/man/is.object.Rd                  |     2 +-
 src/library/base/man/is.recursive.Rd               |    17 +-
 src/library/base/man/is.single.Rd                  |     2 +-
 src/library/base/man/is.unsorted.Rd                |     6 +-
 src/library/base/man/isR.Rd                        |     2 +-
 src/library/base/man/isS4.Rd                       |     7 +-
 src/library/base/man/isSymmetric.Rd                |    28 +-
 src/library/base/man/jitter.Rd                     |     2 +-
 src/library/base/man/kappa.Rd                      |    16 +-
 src/library/base/man/kronecker.Rd                  |     2 +-
 src/library/base/man/l10n_info.Rd                  |     2 +-
 src/library/base/man/labels.Rd                     |     2 +-
 src/library/base/man/lapply.Rd                     |     4 +-
 src/library/base/man/lazyload.Rd                   |     2 +-
 src/library/base/man/length.Rd                     |    13 +-
 src/library/base/man/lengths.Rd                    |    72 +
 src/library/base/man/levels.Rd                     |    15 +-
 src/library/base/man/libPaths.Rd                   |     4 +-
 src/library/base/man/libcurlVersion.Rd             |    51 +
 src/library/base/man/library.Rd                    |    21 +-
 src/library/base/man/library.dynam.Rd              |     2 +-
 src/library/base/man/license.Rd                    |     2 +-
 src/library/base/man/list.Rd                       |    15 +-
 src/library/base/man/list.files.Rd                 |     7 +-
 src/library/base/man/list2env.Rd                   |     2 +-
 src/library/base/man/load.Rd                       |    33 +-
 src/library/base/man/locales.Rd                    |    12 +-
 src/library/base/man/logical.Rd                    |     2 +-
 src/library/base/man/lower.tri.Rd                  |     2 +-
 src/library/base/man/ls.Rd                         |    17 +-
 src/library/base/man/make.names.Rd                 |     4 +-
 src/library/base/man/make.unique.Rd                |     2 +-
 src/library/base/man/mapply.Rd                     |     2 +-
 src/library/base/man/margin.table.Rd               |     2 +-
 src/library/base/man/mat.or.vec.Rd                 |     2 +-
 src/library/base/man/match.Rd                      |    49 +-
 src/library/base/man/match.arg.Rd                  |     2 +-
 src/library/base/man/match.call.Rd                 |    12 +-
 src/library/base/man/match.fun.Rd                  |     4 +-
 src/library/base/man/matmult.Rd                    |    26 +-
 src/library/base/man/matrix.Rd                     |     4 +-
 src/library/base/man/maxCol.Rd                     |     4 +-
 src/library/base/man/mean.Rd                       |     2 +-
 src/library/base/man/memCompress.Rd                |    10 +-
 src/library/base/man/memory.profile.Rd             |     2 +-
 src/library/base/man/merge.Rd                      |    16 +-
 src/library/base/man/message.Rd                    |     2 +-
 src/library/base/man/missing.Rd                    |     2 +-
 src/library/base/man/mode.Rd                       |     2 +-
 src/library/base/man/name.Rd                       |     6 +-
 src/library/base/man/names.Rd                      |    23 +-
 src/library/base/man/nargs.Rd                      |     2 +-
 src/library/base/man/nchar.Rd                      |   104 +-
 src/library/base/man/nlevels.Rd                    |     2 +-
 src/library/base/man/noquote.Rd                    |     2 +-
 src/library/base/man/norm.Rd                       |    12 +-
 src/library/base/man/normalizePath.Rd              |    12 +-
 src/library/base/man/notyet.Rd                     |     2 +-
 src/library/base/man/nrow.Rd                       |     2 +-
 src/library/base/man/ns-dblcolon.Rd                |    21 +-
 src/library/base/man/ns-hooks.Rd                   |    15 +-
 src/library/base/man/ns-internal.Rd                |    56 +-
 src/library/base/man/ns-load.Rd                    |    48 +-
 src/library/base/man/ns-reflect.Rd                 |     9 +-
 src/library/base/man/ns-topenv.Rd                  |    33 +-
 src/library/base/man/numeric.Rd                    |    19 +-
 src/library/base/man/numeric_version.Rd            |     6 +-
 src/library/base/man/octmode.Rd                    |     2 +-
 src/library/base/man/on.exit.Rd                    |     2 +-
 src/library/base/man/options.Rd                    |   228 +-
 src/library/base/man/order.Rd                      |    97 +-
 src/library/base/man/outer.Rd                      |     2 +-
 src/library/base/man/parse.Rd                      |    12 +-
 src/library/base/man/paste.Rd                      |    44 +-
 src/library/base/man/path.expand.Rd                |     2 +-
 src/library/base/man/pcre_config.Rd                |    41 +
 src/library/base/man/pmatch.Rd                     |     5 +-
 src/library/base/man/polyroot.Rd                   |     2 +-
 src/library/base/man/pos.to.env.Rd                 |     2 +-
 src/library/base/man/pretty.Rd                     |     2 +-
 src/library/base/man/print.Rd                      |    10 +-
 src/library/base/man/print.dataframe.Rd            |     2 +-
 src/library/base/man/print.default.Rd              |     4 +-
 src/library/base/man/prmatrix.Rd                   |     2 +-
 src/library/base/man/proc.time.Rd                  |     4 +-
 src/library/base/man/prod.Rd                       |     2 +-
 src/library/base/man/prop.table.Rd                 |     2 +-
 src/library/base/man/pushBack.Rd                   |     4 +-
 src/library/base/man/qr.Rd                         |    29 +-
 src/library/base/man/qraux.Rd                      |    10 +-
 src/library/base/man/quit.Rd                       |     6 +-
 src/library/base/man/range.Rd                      |     2 +-
 src/library/base/man/rank.Rd                       |    26 +-
 src/library/base/man/rapply.Rd                     |     4 +-
 src/library/base/man/raw.Rd                        |    11 +-
 src/library/base/man/rawConnection.Rd              |     2 +-
 src/library/base/man/rawConversion.Rd              |     8 +-
 src/library/base/man/readBin.Rd                    |    15 +-
 src/library/base/man/readChar.Rd                   |     2 +-
 src/library/base/man/readLines.Rd                  |     2 +-
 src/library/base/man/readRDS.Rd                    |    16 +-
 src/library/base/man/readRenviron.Rd               |     2 +-
 src/library/base/man/readline.Rd                   |     2 +-
 src/library/base/man/reg.finalizer.Rd              |     6 +-
 src/library/base/man/regex.Rd                      |    88 +-
 src/library/base/man/regmatches.Rd                 |    17 +-
 src/library/base/man/rep.Rd                        |    28 +-
 src/library/base/man/replace.Rd                    |     2 +-
 src/library/base/man/rev.Rd                        |     4 +-
 src/library/base/man/rle.Rd                        |     2 +-
 src/library/base/man/rm.Rd                         |     2 +-
 src/library/base/man/round.POSIXt.Rd               |     2 +-
 src/library/base/man/row.Rd                        |     2 +-
 src/library/base/man/row.names.Rd                  |     2 +-
 src/library/base/man/rowsum.Rd                     |     2 +-
 src/library/base/man/sQuote.Rd                     |    10 +-
 src/library/base/man/sample.Rd                     |    23 +-
 src/library/base/man/save.Rd                       |    46 +-
 src/library/base/man/scale.Rd                      |     4 +-
 src/library/base/man/scan.Rd                       |    29 +-
 src/library/base/man/search.Rd                     |     9 +-
 src/library/base/man/seek.Rd                       |     8 +-
 src/library/base/man/seq.Date.Rd                   |     8 +-
 src/library/base/man/seq.POSIXt.Rd                 |     8 +-
 src/library/base/man/seq.Rd                        |     2 +-
 src/library/base/man/sequence.Rd                   |     2 +-
 src/library/base/man/serialize.Rd                  |    20 +-
 src/library/base/man/setTimeLimit.Rd               |     8 +-
 src/library/base/man/sets.Rd                       |     2 +-
 src/library/base/man/shQuote.Rd                    |    67 +-
 src/library/base/man/showConnections.Rd            |     2 +-
 src/library/base/man/sign.Rd                       |     2 +-
 src/library/base/man/sink.Rd                       |    17 +-
 src/library/base/man/slice.index.Rd                |     2 +-
 src/library/base/man/slotOp.Rd                     |     7 +-
 src/library/base/man/socketSelect.Rd               |     2 +-
 src/library/base/man/solve.Rd                      |    11 +-
 src/library/base/man/sort.Rd                       |    78 +-
 src/library/base/man/source.Rd                     |    82 +-
 src/library/base/man/split.Rd                      |    25 +-
 src/library/base/man/sprintf.Rd                    |    10 +-
 src/library/base/man/srcfile.Rd                    |    37 +-
 src/library/base/man/standardGeneric.Rd            |    17 +-
 src/library/base/man/startsWith.Rd                 |    57 +
 src/library/base/man/stop.Rd                       |    15 +-
 src/library/base/man/stopifnot.Rd                  |    19 +-
 src/library/base/man/strptime.Rd                   |    88 +-
 src/library/base/man/strrep.Rd                     |    39 +
 src/library/base/man/strsplit.Rd                   |    12 +-
 src/library/base/man/strtoi.Rd                     |     2 +-
 src/library/base/man/strtrim.Rd                    |     4 +-
 src/library/base/man/structure.Rd                  |     2 +-
 src/library/base/man/strwrap.Rd                    |     6 +-
 src/library/base/man/subset.Rd                     |     2 +-
 src/library/base/man/substitute.Rd                 |     2 +-
 src/library/base/man/substr.Rd                     |     2 +-
 src/library/base/man/sum.Rd                        |    19 +-
 src/library/base/man/summary.Rd                    |    24 +-
 src/library/base/man/svd.Rd                        |     9 +-
 src/library/base/man/sweep.Rd                      |     2 +-
 src/library/base/man/switch.Rd                     |    11 +-
 src/library/base/man/sys.parent.Rd                 |     2 +-
 src/library/base/man/sys.source.Rd                 |     8 +-
 src/library/base/man/system.Rd                     |     6 +-
 src/library/base/man/system.file.Rd                |     4 +-
 src/library/base/man/system.time.Rd                |    12 +-
 src/library/base/man/system2.Rd                    |    16 +-
 src/library/base/man/t.Rd                          |     2 +-
 src/library/base/man/table.Rd                      |    67 +-
 src/library/base/man/tabulate.Rd                   |    18 +-
 src/library/base/man/tapply.Rd                     |    45 +-
 src/library/base/man/taskCallback.Rd               |    50 +-
 src/library/base/man/taskCallbackManager.Rd        |     6 +-
 src/library/base/man/taskCallbackNames.Rd          |     6 +-
 src/library/base/man/tempfile.Rd                   |    41 +-
 src/library/base/man/textconnections.Rd            |     8 +-
 src/library/base/man/tilde.Rd                      |     2 +-
 src/library/base/man/timezones.Rd                  |   103 +-
 src/library/base/man/toString.Rd                   |     2 +-
 src/library/base/man/trace.Rd                      |    73 +-
 src/library/base/man/traceback.Rd                  |    14 +-
 src/library/base/man/tracemem.Rd                   |     8 +-
 src/library/base/man/transform.Rd                  |     2 +-
 src/library/base/man/trimws.Rd                     |    27 +
 src/library/base/man/try.Rd                        |    19 +-
 src/library/base/man/typeof.Rd                     |     2 +-
 src/library/base/man/unique.Rd                     |    14 +-
 src/library/base/man/unix/Signals.Rd               |     2 +-
 src/library/base/man/unlink.Rd                     |    10 +-
 src/library/base/man/unlist.Rd                     |     2 +-
 src/library/base/man/unname.Rd                     |     2 +-
 src/library/base/man/userhooks.Rd                  |    18 +-
 src/library/base/man/utf8Conversion.Rd             |    14 +-
 src/library/base/man/validUTF8.Rd                  |    66 +
 src/library/base/man/vector.Rd                     |    11 +-
 src/library/base/man/warning.Rd                    |     2 +-
 src/library/base/man/warnings.Rd                   |    10 +-
 src/library/base/man/weekday.POSIXt.Rd             |    11 +-
 src/library/base/man/which.Rd                      |     2 +-
 src/library/base/man/which.min.Rd                  |    34 +-
 src/library/base/man/windows/shell.Rd              |    21 +-
 src/library/base/man/windows/shell.exec.Rd         |     7 +-
 src/library/base/man/with.Rd                       |    45 +-
 src/library/base/man/withVisible.Rd                |    22 +-
 src/library/base/man/write.Rd                      |     2 +-
 src/library/base/man/writeLines.Rd                 |    10 +-
 src/library/base/man/xtfrm.Rd                      |     8 +-
 src/library/base/man/zMachine.Rd                   |     6 +-
 src/library/base/man/zScript.Rd                    |     2 +-
 src/library/base/man/zapsmall.Rd                   |     2 +-
 src/library/base/man/zpackages.Rd                  |     2 +-
 src/library/base/man/zutils.Rd                     |     2 +-
 src/library/base/po/R-base.pot                     |   120 +-
 src/library/base/po/R-da.po                        |   183 +-
 src/library/base/po/R-de.po                        |   197 +-
 src/library/base/po/R-fa.po                        |   133 +-
 src/library/base/po/R-fr.po                        |   204 +-
 src/library/base/po/R-it.po                        |   181 +-
 src/library/base/po/R-ja.po                        |   208 +-
 src/library/base/po/R-ko.po                        |   328 +-
 src/library/base/po/R-nn.po                        |   179 +-
 src/library/base/po/R-pl.po                        |  6567 +-
 src/library/base/po/R-pt_BR.po                     |   183 +-
 src/library/base/po/R-ru.po                        |   379 +-
 src/library/base/po/R-tr.po                        |   130 +-
 src/library/base/po/R-zh_CN.po                     |   193 +-
 src/library/base/po/R.pot                          |  3813 +-
 src/library/base/po/RGui-da.po                     |   423 +-
 src/library/base/po/RGui-de.po                     |   444 +-
 src/library/base/po/RGui-es.po                     |   423 +-
 src/library/base/po/RGui-fa.po                     |   423 +-
 src/library/base/po/RGui-fr.po                     |   423 +-
 src/library/base/po/RGui-it.po                     |   423 +-
 src/library/base/po/RGui-ja.po                     |   425 +-
 src/library/base/po/RGui-ko.po                     |   521 +-
 src/library/base/po/RGui-nn.po                     |   423 +-
 src/library/base/po/RGui-pl.po                     |   532 +-
 src/library/base/po/RGui-pt_BR.po                  |   425 +-
 src/library/base/po/RGui-ru.po                     |   495 +-
 src/library/base/po/RGui-tr.po                     |   423 +-
 src/library/base/po/RGui-zh_CN.po                  |   425 +-
 src/library/base/po/RGui-zh_TW.po                  |   423 +-
 src/library/base/po/RGui.pot                       |   418 +-
 src/library/base/po/da.po                          |  4172 +-
 src/library/base/po/de.po                          |  3976 +-
 src/library/base/po/en.po                          |  3811 +-
 src/library/base/po/en_GB.po                       |  3814 +-
 src/library/base/po/es.po                          |  4078 +-
 src/library/base/po/fa.po                          |  3809 +-
 src/library/base/po/fr.po                          |  4090 +-
 src/library/base/po/it.po                          |  4047 +-
 src/library/base/po/ja.po                          |  4102 +-
 src/library/base/po/ko.po                          |  4488 +-
 src/library/base/po/nn.po                          |  4053 +-
 src/library/base/po/pl.po                          | 10703 +---
 src/library/base/po/pt_BR.po                       |  4060 +-
 src/library/base/po/ru.po                          |  5175 +-
 src/library/base/po/tr.po                          |  4030 +-
 src/library/base/po/zh_CN.po                       |  4058 +-
 src/library/base/po/zh_TW.po                       |  4052 +-
 src/library/compiler/DESCRIPTION.in                |     2 +-
 src/library/compiler/Makefile.in                   |     5 +-
 src/library/compiler/R/cmp.R                       |   940 +-
 src/library/compiler/man/compile.Rd                |    76 +-
 src/library/compiler/noweb/compiler.nw             |  1374 +-
 src/library/compiler/po/R-compiler.pot             |    26 +-
 src/library/compiler/po/R-da.po                    |    25 +-
 src/library/compiler/po/R-de.po                    |    20 +-
 src/library/compiler/po/R-fr.po                    |    27 +-
 src/library/compiler/po/R-ja.po                    |    34 +-
 src/library/compiler/po/R-ko.po                    |    46 +-
 src/library/compiler/po/R-pl.po                    |   433 +-
 src/library/compiler/po/R-pt_BR.po                 |    26 +-
 src/library/compiler/po/R-ru.po                    |    12 +-
 src/library/compiler/po/R-zh_CN.po                 |    27 +-
 src/library/compiler/tests/assign.R                |     6 +-
 src/library/compiler/tests/basics.R                |    10 +-
 src/library/compiler/tests/curexpr.R               |    95 +
 src/library/compiler/tests/srcref.R                |    77 +
 src/library/compiler/tests/switch.R                |    12 +
 src/library/datasets/DESCRIPTION.in                |     2 +-
 src/library/datasets/NAMESPACE                     |     4 +-
 src/library/datasets/data/UScitiesD.rda            |   Bin 0 -> 401 bytes
 src/library/datasets/data/precip.R                 |    22 +-
 src/library/datasets/man/AirPassengers.Rd          |     2 +-
 src/library/datasets/man/BJsales.Rd                |     4 +-
 src/library/datasets/man/BOD.Rd                    |     6 +-
 src/library/datasets/man/ChickWeight.Rd            |     2 +-
 src/library/datasets/man/DNase.Rd                  |     6 +-
 src/library/datasets/man/EuStockMarkets.Rd         |     2 +-
 src/library/datasets/man/Formaldehyde.Rd           |     2 +-
 src/library/datasets/man/HairEyeColor.Rd           |     4 +-
 src/library/datasets/man/Harman23.cor.Rd           |     2 +-
 src/library/datasets/man/Harman74.cor.Rd           |     2 +-
 src/library/datasets/man/Indometh.Rd               |     4 +-
 src/library/datasets/man/InsectSprays.Rd           |     2 +-
 src/library/datasets/man/JohnsonJohnson.Rd         |     2 +-
 src/library/datasets/man/LakeHuron.Rd              |     2 +-
 src/library/datasets/man/LifeCycleSavings.Rd       |     2 +-
 src/library/datasets/man/Loblolly.Rd               |     2 +-
 src/library/datasets/man/Nile.Rd                   |     8 +-
 src/library/datasets/man/Orange.Rd                 |     2 +-
 src/library/datasets/man/OrchardSprays.Rd          |     2 +-
 src/library/datasets/man/PlantGrowth.Rd            |     2 +-
 src/library/datasets/man/Puromycin.Rd              |     4 +-
 src/library/datasets/man/Theoph.Rd                 |     6 +-
 src/library/datasets/man/Titanic.Rd                |     4 +-
 src/library/datasets/man/ToothGrowth.Rd            |    21 +-
 src/library/datasets/man/UCBAdmissions.Rd          |    11 +-
 src/library/datasets/man/UKDriverDeaths.Rd         |     4 +-
 src/library/datasets/man/UKLungDeaths.Rd           |     2 +-
 src/library/datasets/man/UKgas.Rd                  |     2 +-
 src/library/datasets/man/USAccDeaths.Rd            |     2 +-
 src/library/datasets/man/USArrests.Rd              |    47 +-
 src/library/datasets/man/USJudgeRatings.Rd         |     2 +-
 src/library/datasets/man/USPersonalExpenditure.Rd  |     2 +-
 src/library/datasets/man/VADeaths.Rd               |     2 +-
 src/library/datasets/man/WWWusage.Rd               |     2 +-
 src/library/datasets/man/WorldPhones.Rd            |     2 +-
 src/library/datasets/man/ability.cov.Rd            |     2 +-
 src/library/datasets/man/airmiles.Rd               |     2 +-
 src/library/datasets/man/airquality.Rd             |     2 +-
 src/library/datasets/man/anscombe.Rd               |     2 +-
 src/library/datasets/man/attenu.Rd                 |     2 +-
 src/library/datasets/man/attitude.Rd               |     2 +-
 src/library/datasets/man/austres.Rd                |     2 +-
 src/library/datasets/man/beavers.Rd                |     2 +-
 src/library/datasets/man/cars.Rd                   |     2 +-
 src/library/datasets/man/chickwts.Rd               |     2 +-
 src/library/datasets/man/co2.Rd                    |     2 +-
 src/library/datasets/man/crimtab.Rd                |     4 +-
 src/library/datasets/man/datasets-package.Rd       |     2 +-
 src/library/datasets/man/discoveries.Rd            |     2 +-
 src/library/datasets/man/esoph.Rd                  |     2 +-
 src/library/datasets/man/euro.Rd                   |     2 +-
 src/library/datasets/man/eurodist.Rd               |    24 +-
 src/library/datasets/man/faithful.Rd               |     4 +-
 src/library/datasets/man/freeny.Rd                 |     2 +-
 src/library/datasets/man/infert.Rd                 |     2 +-
 src/library/datasets/man/iris.Rd                   |     2 +-
 src/library/datasets/man/islands.Rd                |     2 +-
 src/library/datasets/man/lh.Rd                     |     2 +-
 src/library/datasets/man/longley.Rd                |     2 +-
 src/library/datasets/man/lynx.Rd                   |     2 +-
 src/library/datasets/man/morley.Rd                 |     4 +-
 src/library/datasets/man/mtcars.Rd                 |     4 +-
 src/library/datasets/man/nhtemp.Rd                 |     2 +-
 src/library/datasets/man/nottem.Rd                 |     2 +-
 src/library/datasets/man/npk.Rd                    |     2 +-
 src/library/datasets/man/occupationalStatus.Rd     |     4 +-
 src/library/datasets/man/precip.Rd                 |    15 +-
 src/library/datasets/man/presidents.Rd             |     2 +-
 src/library/datasets/man/pressure.Rd               |     2 +-
 src/library/datasets/man/quakes.Rd                 |     2 +-
 src/library/datasets/man/randu.Rd                  |     2 +-
 src/library/datasets/man/rivers.Rd                 |     2 +-
 src/library/datasets/man/rock.Rd                   |     2 +-
 src/library/datasets/man/sleep.Rd                  |     2 +-
 src/library/datasets/man/stackloss.Rd              |     4 +-
 src/library/datasets/man/state.Rd                  |     2 +-
 src/library/datasets/man/sunspot.month.Rd          |     2 +-
 src/library/datasets/man/sunspot.year.Rd           |     4 +-
 src/library/datasets/man/sunspots.Rd               |     2 +-
 src/library/datasets/man/swiss.Rd                  |     7 +-
 src/library/datasets/man/treering.Rd               |     7 +-
 src/library/datasets/man/trees.Rd                  |     2 +-
 src/library/datasets/man/uspop.Rd                  |     2 +-
 src/library/datasets/man/volcano.Rd                |     2 +-
 src/library/datasets/man/warpbreaks.Rd             |     2 +-
 src/library/datasets/man/women.Rd                  |     2 +-
 src/library/datasets/man/zCO2.Rd                   |     4 +-
 src/library/grDevices/DESCRIPTION.in               |     4 +-
 src/library/grDevices/NAMESPACE                    |    25 +-
 src/library/grDevices/R/Hershey.R                  |     4 +-
 src/library/grDevices/R/cairo.R                    |    24 +-
 src/library/grDevices/R/calc.R                     |    10 +-
 src/library/grDevices/R/cm.R                       |     4 +-
 src/library/grDevices/R/colorRamp.R                |     4 +-
 src/library/grDevices/R/colorstuff.R               |     4 +-
 src/library/grDevices/R/convertColor.R             |     6 +-
 src/library/grDevices/R/device.R                   |    51 +-
 src/library/grDevices/R/gevents.R                  |    13 +-
 src/library/grDevices/R/pictex.R                   |     4 +-
 src/library/grDevices/R/postscript.R               |    44 +-
 src/library/grDevices/R/prettyDate.R               |   207 +-
 src/library/grDevices/R/raster.R                   |    38 +-
 src/library/grDevices/R/recordplot.R               |    85 +-
 src/library/grDevices/R/smooth2d.R                 |    10 +-
 src/library/grDevices/R/unix/dev2bitmap.R          |     4 +-
 src/library/grDevices/R/unix/png.R                 |    33 +-
 src/library/grDevices/R/unix/quartz.R              |     8 +-
 src/library/grDevices/R/unix/x11.R                 |    25 +-
 src/library/grDevices/R/utils.R                    |     4 +-
 src/library/grDevices/R/windows/cairo.R            |   102 -
 src/library/grDevices/R/windows/dev2bitmap.R       |     4 +-
 src/library/grDevices/R/windows/png.R              |    30 +-
 src/library/grDevices/R/windows/windows.R          |    10 +-
 src/library/grDevices/R/xyz.coords.R               |   123 +-
 src/library/grDevices/R/zzz.R                      |    37 +-
 src/library/grDevices/man/Devices.Rd               |     6 +-
 src/library/grDevices/man/Hershey.Rd               |     4 +-
 src/library/grDevices/man/Japanese.Rd              |     4 +-
 src/library/grDevices/man/Type1Font.Rd             |    17 +-
 src/library/grDevices/man/adjustcolor.Rd           |     2 +-
 src/library/grDevices/man/as.graphicsAnnot.Rd      |     2 +-
 src/library/grDevices/man/as.raster.Rd             |    38 +-
 src/library/grDevices/man/axisTicks.Rd             |     2 +-
 src/library/grDevices/man/boxplot.stats.Rd         |     6 +-
 src/library/grDevices/man/cairo.Rd                 |    31 +-
 src/library/grDevices/man/check.options.Rd         |     2 +-
 src/library/grDevices/man/chull.Rd                 |     2 +-
 src/library/grDevices/man/cm.Rd                    |     2 +-
 src/library/grDevices/man/col2rgb.Rd               |    10 +-
 src/library/grDevices/man/colorRamp.Rd             |    10 +-
 src/library/grDevices/man/colors.Rd                |     2 +-
 src/library/grDevices/man/contourLines.Rd          |     2 +-
 src/library/grDevices/man/convertColor.Rd          |     2 +-
 src/library/grDevices/man/densCols.Rd              |     5 +-
 src/library/grDevices/man/dev.Rd                   |     4 +-
 src/library/grDevices/man/dev.capabilities.Rd      |     2 +-
 src/library/grDevices/man/dev.capture.Rd           |     2 +-
 src/library/grDevices/man/dev.flush.Rd             |     4 +-
 src/library/grDevices/man/dev.interactive.Rd       |     8 +-
 src/library/grDevices/man/dev.size.Rd              |     2 +-
 src/library/grDevices/man/dev2.Rd                  |     4 +-
 src/library/grDevices/man/dev2bitmap.Rd            |     2 +-
 src/library/grDevices/man/devAskNewPage.Rd         |     2 +-
 src/library/grDevices/man/embedFonts.Rd            |    12 +-
 src/library/grDevices/man/extendrange.Rd           |     2 +-
 src/library/grDevices/man/getGraphicsEvent.Rd      |    38 +-
 src/library/grDevices/man/grDevices-package.Rd     |     2 +-
 src/library/grDevices/man/grSoftVersion.Rd         |    50 +
 src/library/grDevices/man/gray.Rd                  |     2 +-
 src/library/grDevices/man/gray.colors.Rd           |     2 +-
 src/library/grDevices/man/hcl.Rd                   |     2 +-
 src/library/grDevices/man/hsv.Rd                   |     2 +-
 src/library/grDevices/man/make.rgb.Rd              |     2 +-
 src/library/grDevices/man/n2mfrow.Rd               |     2 +-
 src/library/grDevices/man/nclass.Rd                |     6 +-
 src/library/grDevices/man/palette.Rd               |    15 +-
 src/library/grDevices/man/palettes.Rd              |     2 +-
 src/library/grDevices/man/pdf.Rd                   |    18 +-
 src/library/grDevices/man/pdf.options.Rd           |     2 +-
 src/library/grDevices/man/pictex.Rd                |     2 +-
 src/library/grDevices/man/plotmath.Rd              |    19 +-
 src/library/grDevices/man/postscript.Rd            |    16 +-
 src/library/grDevices/man/postscriptFonts.Rd       |    15 +-
 src/library/grDevices/man/pretty.Date.Rd           |    39 +-
 src/library/grDevices/man/ps.options.Rd            |     2 +-
 src/library/grDevices/man/recordGraphics.Rd        |     2 +-
 src/library/grDevices/man/recordplot.Rd            |    44 +-
 src/library/grDevices/man/rgb.Rd                   |     6 +-
 src/library/grDevices/man/rgb2hsv.Rd               |     6 +-
 src/library/grDevices/man/trans3d.Rd               |     2 +-
 src/library/grDevices/man/unix/png.Rd              |    21 +-
 src/library/grDevices/man/unix/quartz.Rd           |    12 +-
 src/library/grDevices/man/unix/quartzFonts.Rd      |     4 +-
 src/library/grDevices/man/unix/savePlot.Rd         |     2 +-
 src/library/grDevices/man/unix/x11.Rd              |    18 +-
 src/library/grDevices/man/unix/x11Fonts.Rd         |     4 +-
 src/library/grDevices/man/windows/bringToTop.Rd    |     6 +-
 src/library/grDevices/man/windows/msgWindow.Rd     |     2 +-
 src/library/grDevices/man/windows/png.Rd           |    13 +-
 src/library/grDevices/man/windows/savePlot.Rd      |     2 +-
 src/library/grDevices/man/windows/windows.Rd       |     4 +-
 .../grDevices/man/windows/windows.options.Rd       |     2 +-
 src/library/grDevices/man/windows/windowsFonts.Rd  |     2 +-
 src/library/grDevices/man/xfig.Rd                  |     6 +-
 src/library/grDevices/man/xy.coords.Rd             |    33 +-
 src/library/grDevices/man/xyTable.Rd               |     2 +-
 src/library/grDevices/man/xyz.coords.Rd            |     9 +-
 src/library/grDevices/po/R-da.po                   |    39 +-
 src/library/grDevices/po/R-de.po                   |    76 +-
 src/library/grDevices/po/R-en_GB.po                |    28 +-
 src/library/grDevices/po/R-fr.po                   |    38 +-
 src/library/grDevices/po/R-grDevices.pot           |    27 +-
 src/library/grDevices/po/R-it.po                   |    33 +-
 src/library/grDevices/po/R-ja.po                   |    49 +-
 src/library/grDevices/po/R-ko.po                   |    68 +-
 src/library/grDevices/po/R-pl.po                   |  1245 +-
 src/library/grDevices/po/R-pt_BR.po                |    39 +-
 src/library/grDevices/po/R-ru.po                   |    59 +-
 src/library/grDevices/po/R-zh_CN.po                |    39 +-
 src/library/grDevices/po/da.po                     |   289 +-
 src/library/grDevices/po/de.po                     |   295 +-
 src/library/grDevices/po/en_GB.po                  |   288 +-
 src/library/grDevices/po/fr.po                     |   289 +-
 src/library/grDevices/po/grDevices.pot             |   290 +-
 src/library/grDevices/po/it.po                     |   291 +-
 src/library/grDevices/po/ja.po                     |   291 +-
 src/library/grDevices/po/ko.po                     |   363 +-
 src/library/grDevices/po/pl.po                     |   853 +-
 src/library/grDevices/po/pt_BR.po                  |   288 +-
 src/library/grDevices/po/ru.po                     |   466 +-
 src/library/grDevices/po/zh_CN.po                  |   291 +-
 src/library/grDevices/src/Makefile.in              |     9 +-
 src/library/grDevices/src/Makefile.win             |    14 +-
 src/library/grDevices/src/axis_scales.c            |    10 +-
 src/library/grDevices/src/cairo/Makefile.in        |     3 +-
 src/library/grDevices/src/cairo/Makefile.win       |     8 +-
 src/library/grDevices/src/cairo/cairoBM.c          |   269 +-
 src/library/grDevices/src/cairo/cairoBM.h          |     5 +-
 src/library/grDevices/src/cairo/cairoFns.c         |     6 +-
 src/library/grDevices/src/colors.c                 |     9 +-
 src/library/grDevices/src/devCairo.c               |    17 +-
 src/library/grDevices/src/devPS.c                  |    76 +-
 src/library/grDevices/src/devPicTeX.c              |     4 +-
 src/library/grDevices/src/devQuartz.c              |    23 +-
 src/library/grDevices/src/devWindows.c             |   109 +-
 src/library/grDevices/src/devWindows.h             |     2 +-
 src/library/grDevices/src/devices.c                |    15 +-
 src/library/grDevices/src/grDevices.h              |     5 +-
 src/library/grDevices/src/init.c                   |    11 +-
 src/library/grDevices/src/qdBitmap.c               |     2 +-
 src/library/grDevices/src/qdBitmap.h               |     2 +-
 src/library/grDevices/src/qdCocoa.h                |     2 +-
 src/library/grDevices/src/qdCocoa.m                |    24 +-
 src/library/grDevices/src/qdPDF.c                  |     6 +-
 src/library/grDevices/src/rbitmap.h                |    60 -
 src/library/grDevices/src/stubs.c                  |     9 +-
 src/library/grDevices/src/winbitmap.c              |   686 +
 src/library/grDevices/src/winbitmap.h              |    36 +
 src/library/grDevices/tests/ps-tests.Rout.save     |     8 +-
 src/library/grDevices/tests/xfig-tests.Rout.save   |     8 +-
 src/library/graphics/DESCRIPTION.in                |     3 +-
 src/library/graphics/NAMESPACE                     |     2 +
 src/library/graphics/R/abline.R                    |     4 +-
 src/library/graphics/R/arrows.R                    |     6 +-
 src/library/graphics/R/assocplot.R                 |     6 +-
 src/library/graphics/R/axis.R                      |     6 +-
 src/library/graphics/R/barplot.R                   |     4 +-
 src/library/graphics/R/box.R                       |     4 +-
 src/library/graphics/R/boxplot.R                   |    36 +-
 src/library/graphics/R/cdplot.R                    |     8 +-
 src/library/graphics/R/contour.R                   |     9 +-
 src/library/graphics/R/coplot.R                    |     4 +-
 src/library/graphics/R/curve.R                     |     4 +-
 src/library/graphics/R/datetime.R                  |    57 +-
 src/library/graphics/R/dotchart.R                  |    14 +-
 src/library/graphics/R/filled.contour.R            |     4 +-
 src/library/graphics/R/fourfoldplot.R              |     8 +-
 src/library/graphics/R/grid.R                      |     4 +-
 src/library/graphics/R/hist.R                      |    25 +-
 src/library/graphics/R/identify.R                  |     8 +-
 src/library/graphics/R/image.R                     |    20 +-
 src/library/graphics/R/layout.R                    |     4 +-
 src/library/graphics/R/legend.R                    |    10 +-
 src/library/graphics/R/lines.R                     |     4 +-
 src/library/graphics/R/locator.R                   |     4 +-
 src/library/graphics/R/matplot.R                   |     4 +-
 src/library/graphics/R/mosaicplot.R                |    16 +-
 src/library/graphics/R/mtext.R                     |     4 +-
 src/library/graphics/R/pairs.R                     |    21 +-
 src/library/graphics/R/par.R                       |     6 +-
 src/library/graphics/R/persp.R                     |     4 +-
 src/library/graphics/R/pie.R                       |     4 +-
 src/library/graphics/R/plot.R                      |    16 +-
 src/library/graphics/R/plot.design.R               |     6 +-
 src/library/graphics/R/points.R                    |     4 +-
 src/library/graphics/R/polygon.R                   |    12 +-
 src/library/graphics/R/raster.R                    |    20 +-
 src/library/graphics/R/rect.R                      |     4 +-
 src/library/graphics/R/rug.R                       |     4 +-
 src/library/graphics/R/screen.R                    |     9 +-
 src/library/graphics/R/segments.R                  |     4 +-
 src/library/graphics/R/smoothScatter.R             |    28 +-
 src/library/graphics/R/spineplot.R                 |    16 +-
 src/library/graphics/R/stars.R                     |     4 +-
 src/library/graphics/R/stem.R                      |     4 +-
 src/library/graphics/R/stripchart.R                |     8 +-
 src/library/graphics/R/strwidth.R                  |     4 +-
 src/library/graphics/R/sunflowerplot.R             |     8 +-
 src/library/graphics/R/symbols.R                   |     4 +-
 src/library/graphics/R/text.R                      |    11 +-
 src/library/graphics/R/title.R                     |     4 +-
 src/library/graphics/R/units.R                     |     4 +-
 src/library/graphics/R/zzz.R                       |     4 +-
 src/library/graphics/demo/plotmath.R               |    10 +-
 src/library/graphics/man/abline.Rd                 |     2 +-
 src/library/graphics/man/arrows.Rd                 |     2 +-
 src/library/graphics/man/assocplot.Rd              |     6 +-
 src/library/graphics/man/axTicks.Rd                |     2 +-
 src/library/graphics/man/axis.POSIXct.Rd           |     4 +-
 src/library/graphics/man/axis.Rd                   |     2 +-
 src/library/graphics/man/barplot.Rd                |     2 +-
 src/library/graphics/man/box.Rd                    |     2 +-
 src/library/graphics/man/boxplot.Rd                |    27 +-
 src/library/graphics/man/boxplot.matrix.Rd         |     6 +-
 src/library/graphics/man/bxp.Rd                    |     2 +-
 src/library/graphics/man/cdplot.Rd                 |     2 +-
 src/library/graphics/man/clip.Rd                   |     2 +-
 src/library/graphics/man/contour.Rd                |     7 +-
 src/library/graphics/man/convertXY.Rd              |     4 +-
 src/library/graphics/man/coplot.Rd                 |     2 +-
 src/library/graphics/man/curve.Rd                  |     2 +-
 src/library/graphics/man/dotchart.Rd               |     9 +-
 src/library/graphics/man/filled.contour.Rd         |     6 +-
 src/library/graphics/man/fourfoldplot.Rd           |     6 +-
 src/library/graphics/man/frame.Rd                  |     2 +-
 src/library/graphics/man/graphics-defunct.Rd       |     6 +-
 src/library/graphics/man/graphics-package.Rd       |     2 +-
 src/library/graphics/man/grid.Rd                   |     2 +-
 src/library/graphics/man/hist.POSIXt.Rd            |    19 +-
 src/library/graphics/man/hist.Rd                   |    20 +-
 src/library/graphics/man/identify.Rd               |     4 +-
 src/library/graphics/man/image.Rd                  |    17 +-
 src/library/graphics/man/layout.Rd                 |     2 +-
 src/library/graphics/man/legend.Rd                 |    11 +-
 src/library/graphics/man/lines.Rd                  |     2 +-
 src/library/graphics/man/locator.Rd                |     2 +-
 src/library/graphics/man/matplot.Rd                |     2 +-
 src/library/graphics/man/mosaicplot.Rd             |    11 +-
 src/library/graphics/man/mtext.Rd                  |     2 +-
 src/library/graphics/man/pairs.Rd                  |    15 +-
 src/library/graphics/man/panel.smooth.Rd           |     2 +-
 src/library/graphics/man/par.Rd                    |    27 +-
 src/library/graphics/man/persp.Rd                  |     6 +-
 src/library/graphics/man/pie.Rd                    |     9 +-
 src/library/graphics/man/plot.Rd                   |    10 +-
 src/library/graphics/man/plot.dataframe.Rd         |     4 +-
 src/library/graphics/man/plot.default.Rd           |    15 +-
 src/library/graphics/man/plot.design.Rd            |     4 +-
 src/library/graphics/man/plot.factor.Rd            |     2 +-
 src/library/graphics/man/plot.formula.Rd           |     4 +-
 src/library/graphics/man/plot.raster.Rd            |    52 +
 src/library/graphics/man/plot.table.Rd             |     2 +-
 src/library/graphics/man/plot.window.Rd            |     2 +-
 src/library/graphics/man/plot.xy.Rd                |     2 +-
 src/library/graphics/man/plothistogram.Rd          |     2 +-
 src/library/graphics/man/points.Rd                 |    14 +-
 src/library/graphics/man/polygon.Rd                |     2 +-
 src/library/graphics/man/polypath.Rd               |     2 +-
 src/library/graphics/man/rasterImage.Rd            |     4 +-
 src/library/graphics/man/rect.Rd                   |     2 +-
 src/library/graphics/man/rug.Rd                    |     2 +-
 src/library/graphics/man/screen.Rd                 |     4 +-
 src/library/graphics/man/segments.Rd               |     2 +-
 src/library/graphics/man/smoothScatter.Rd          |    39 +-
 src/library/graphics/man/spineplot.Rd              |     8 +-
 src/library/graphics/man/stars.Rd                  |     8 +-
 src/library/graphics/man/stem.Rd                   |     2 +-
 src/library/graphics/man/stripchart.Rd             |     2 +-
 src/library/graphics/man/strwidth.Rd               |     2 +-
 src/library/graphics/man/sunflowerplot.Rd          |     6 +-
 src/library/graphics/man/symbols.Rd                |     2 +-
 src/library/graphics/man/text.Rd                   |    25 +-
 src/library/graphics/man/title.Rd                  |    17 +-
 src/library/graphics/man/units.Rd                  |     2 +-
 src/library/graphics/man/xspline.Rd                |     6 +-
 src/library/graphics/man/zAxis.Rd                  |     2 +-
 src/library/graphics/po/R-da.po                    |    19 +-
 src/library/graphics/po/R-de.po                    |    65 +-
 src/library/graphics/po/R-fr.po                    |    25 +-
 src/library/graphics/po/R-graphics.pot             |    22 +-
 src/library/graphics/po/R-it.po                    |    27 +-
 src/library/graphics/po/R-ja.po                    |    27 +-
 src/library/graphics/po/R-ko.po                    |    43 +-
 src/library/graphics/po/R-pl.po                    |  1281 +-
 src/library/graphics/po/R-pt_BR.po                 |    25 +-
 src/library/graphics/po/R-ru.po                    |    65 +-
 src/library/graphics/po/R-zh_CN.po                 |    25 +-
 src/library/graphics/po/da.po                      |    28 +-
 src/library/graphics/po/de.po                      |    49 +-
 src/library/graphics/po/es.po                      |    29 +-
 src/library/graphics/po/fr.po                      |    29 +-
 src/library/graphics/po/graphics.pot               |    32 +-
 src/library/graphics/po/it.po                      |    29 +-
 src/library/graphics/po/ja.po                      |    29 +-
 src/library/graphics/po/ko.po                      |    49 +-
 src/library/graphics/po/nn.po                      |    29 +-
 src/library/graphics/po/pl.po                      |   472 +-
 src/library/graphics/po/pt_BR.po                   |    29 +-
 src/library/graphics/po/ru.po                      |   166 +-
 src/library/graphics/po/tr.po                      |    29 +-
 src/library/graphics/po/zh_CN.po                   |    31 +-
 src/library/graphics/po/zh_TW.po                   |    29 +-
 src/library/graphics/src/Makefile.win              |     2 +-
 src/library/graphics/src/base.c                    |    82 +-
 src/library/graphics/src/graphics.c                |    21 +-
 src/library/graphics/src/graphics.h                |     2 +-
 src/library/graphics/src/init.c                    |    10 +-
 src/library/graphics/src/par-common.c              |     8 +-
 src/library/graphics/src/par.c                     |     7 +-
 src/library/graphics/src/plot.c                    |    20 +-
 src/library/graphics/src/plot3d.c                  |     6 +-
 src/library/graphics/src/stem.c                    |     2 +-
 src/library/grid/DESCRIPTION.in                    |     5 +-
 src/library/grid/NAMESPACE                         |    15 +-
 src/library/grid/R/components.R                    |     4 +-
 src/library/grid/R/curve.R                         |    24 +-
 src/library/grid/R/debug.R                         |     8 +-
 src/library/grid/R/edit.R                          |     4 +-
 src/library/grid/R/frames.R                        |     4 +-
 src/library/grid/R/function.R                      |     4 +-
 src/library/grid/R/gpar.R                          |    32 +-
 src/library/grid/R/grab.R                          |    22 +-
 src/library/grid/R/grid.R                          |   124 +-
 src/library/grid/R/grob.R                          |   160 +-
 src/library/grid/R/highlevel.R                     |    14 +-
 src/library/grid/R/interactive.R                   |     6 +-
 src/library/grid/R/just.R                          |     4 +-
 src/library/grid/R/layout.R                        |     8 +-
 src/library/grid/R/ls.R                            |    33 +-
 src/library/grid/R/origin.R                        |     4 +-
 src/library/grid/R/primitives.R                    |   153 +-
 src/library/grid/R/roundRect.R                     |    14 +-
 src/library/grid/R/size.R                          |     4 +-
 src/library/grid/R/unit.R                          |   208 +-
 src/library/grid/R/util.R                          |     8 +-
 src/library/grid/R/viewport.R                      |     4 +-
 src/library/grid/R/zzz.R                           |    10 +-
 src/library/grid/inst/doc/changes.txt              |    66 +
 src/library/grid/inst/doc/displaylist.pdf          |   Bin 157558 -> 157151 bytes
 src/library/grid/inst/doc/frame.pdf                |   Bin 156154 -> 155748 bytes
 src/library/grid/inst/doc/grid.pdf                 |   Bin 251717 -> 251533 bytes
 src/library/grid/inst/doc/grobs.pdf                |   Bin 107325 -> 106932 bytes
 src/library/grid/inst/doc/interactive.pdf          |   Bin 91033 -> 90637 bytes
 src/library/grid/inst/doc/locndimn.pdf             |   Bin 89680 -> 89281 bytes
 src/library/grid/inst/doc/moveline.pdf             |   Bin 87439 -> 87028 bytes
 src/library/grid/inst/doc/nonfinite.pdf            |   Bin 79671 -> 79272 bytes
 src/library/grid/inst/doc/plotexample.pdf          |   Bin 223926 -> 223537 bytes
 src/library/grid/inst/doc/rotated.pdf              |   Bin 122017 -> 121696 bytes
 src/library/grid/inst/doc/saveload.pdf             |   Bin 134053 -> 133639 bytes
 src/library/grid/inst/doc/sharing.pdf              |   Bin 70997 -> 70593 bytes
 src/library/grid/inst/doc/viewports.pdf            |   Bin 163191 -> 162798 bytes
 src/library/grid/man/Grid.Rd                       |     2 +-
 src/library/grid/man/absolute.size.Rd              |     2 +-
 src/library/grid/man/arrow.Rd                      |     2 +-
 src/library/grid/man/calcStringMetric.Rd           |     2 +-
 src/library/grid/man/current.viewport.Rd           |     2 +-
 src/library/grid/man/dataViewport.Rd               |     2 +-
 src/library/grid/man/drawDetails.Rd                |     2 +-
 src/library/grid/man/editDetails.Rd                |     2 +-
 src/library/grid/man/gEdit.Rd                      |     2 +-
 src/library/grid/man/gPath.Rd                      |     2 +-
 src/library/grid/man/getNames.Rd                   |     2 +-
 src/library/grid/man/gpar.Rd                       |    12 +-
 src/library/grid/man/grid-defunct.Rd               |     2 +-
 src/library/grid/man/grid-internal.Rd              |     2 +-
 src/library/grid/man/grid-package.Rd               |     2 +-
 src/library/grid/man/grid.DLapply.Rd               |     2 +-
 src/library/grid/man/grid.add.Rd                   |     2 +-
 src/library/grid/man/grid.bezier.Rd                |     2 +-
 src/library/grid/man/grid.cap.Rd                   |     2 +-
 src/library/grid/man/grid.circle.Rd                |     8 +-
 src/library/grid/man/grid.clip.Rd                  |     2 +-
 src/library/grid/man/grid.convert.Rd               |     2 +-
 src/library/grid/man/grid.copy.Rd                  |     2 +-
 src/library/grid/man/grid.curve.Rd                 |     2 +-
 src/library/grid/man/grid.delay.Rd                 |     2 +-
 src/library/grid/man/grid.display.list.Rd          |     2 +-
 src/library/grid/man/grid.draw.Rd                  |     2 +-
 src/library/grid/man/grid.edit.Rd                  |     2 +-
 src/library/grid/man/grid.force.Rd                 |     2 +-
 src/library/grid/man/grid.frame.Rd                 |     2 +-
 src/library/grid/man/grid.function.Rd              |     2 +-
 src/library/grid/man/grid.get.Rd                   |     2 +-
 src/library/grid/man/grid.grab.Rd                  |     2 +-
 src/library/grid/man/grid.grill.Rd                 |     2 +-
 src/library/grid/man/grid.grob.Rd                  |     2 +-
 src/library/grid/man/grid.layout.Rd                |     2 +-
 src/library/grid/man/grid.lines.Rd                 |     2 +-
 src/library/grid/man/grid.locator.Rd               |     4 +-
 src/library/grid/man/grid.ls.Rd                    |     2 +-
 src/library/grid/man/grid.move.to.Rd               |     2 +-
 src/library/grid/man/grid.newpage.Rd               |     2 +-
 src/library/grid/man/grid.null.Rd                  |     2 +-
 src/library/grid/man/grid.pack.Rd                  |     2 +-
 src/library/grid/man/grid.path.Rd                  |     2 +-
 src/library/grid/man/grid.place.Rd                 |     2 +-
 src/library/grid/man/grid.plot.and.legend.Rd       |     2 +-
 src/library/grid/man/grid.points.Rd                |     2 +-
 src/library/grid/man/grid.polygon.Rd               |     2 +-
 src/library/grid/man/grid.pretty.Rd                |     2 +-
 src/library/grid/man/grid.raster.Rd                |     2 +-
 src/library/grid/man/grid.record.Rd                |     2 +-
 src/library/grid/man/grid.rect.Rd                  |     2 +-
 src/library/grid/man/grid.refresh.Rd               |     2 +-
 src/library/grid/man/grid.remove.Rd                |     2 +-
 src/library/grid/man/grid.reorder.Rd               |     2 +-
 src/library/grid/man/grid.roundrect.Rd             |     2 +-
 src/library/grid/man/grid.segments.Rd              |     2 +-
 src/library/grid/man/grid.set.Rd                   |     2 +-
 src/library/grid/man/grid.show.layout.Rd           |     6 +-
 src/library/grid/man/grid.show.viewport.Rd         |     2 +-
 src/library/grid/man/grid.text.Rd                  |     2 +-
 src/library/grid/man/grid.xaxis.Rd                 |     2 +-
 src/library/grid/man/grid.xspline.Rd               |     4 +-
 src/library/grid/man/grid.yaxis.Rd                 |     2 +-
 src/library/grid/man/grobName.Rd                   |     2 +-
 src/library/grid/man/grobWidth.Rd                  |     2 +-
 src/library/grid/man/grobX.Rd                      |     2 +-
 src/library/grid/man/legendGrob.Rd                 |     2 +-
 src/library/grid/man/makeContent.Rd                |     2 +-
 src/library/grid/man/plotViewport.Rd               |     2 +-
 src/library/grid/man/showGrob.Rd                   |     2 +-
 src/library/grid/man/showViewport.Rd               |     7 +-
 src/library/grid/man/stringWidth.Rd                |     2 +-
 src/library/grid/man/unit.Rd                       |    16 +-
 src/library/grid/man/unit.c.Rd                     |     2 +-
 src/library/grid/man/unit.length.Rd                |     2 +-
 src/library/grid/man/unit.pmin.Rd                  |     2 +-
 src/library/grid/man/unit.rep.Rd                   |     2 +-
 src/library/grid/man/valid.just.Rd                 |     2 +-
 src/library/grid/man/validDetails.Rd               |     2 +-
 src/library/grid/man/viewport.Rd                   |     2 +-
 src/library/grid/man/viewports.Rd                  |     2 +-
 src/library/grid/man/vpPath.Rd                     |     2 +-
 src/library/grid/man/widthDetails.Rd               |     2 +-
 src/library/grid/man/xDetails.Rd                   |     2 +-
 src/library/grid/man/xsplinePoints.Rd              |     2 +-
 src/library/grid/po/R-da.po                        |    11 +-
 src/library/grid/po/R-de.po                        |    43 +-
 src/library/grid/po/R-fr.po                        |    18 +-
 src/library/grid/po/R-grid.pot                     |    14 +-
 src/library/grid/po/R-ja.po                        |    18 +-
 src/library/grid/po/R-ko.po                        |    40 +-
 src/library/grid/po/R-pl.po                        |  1626 +-
 src/library/grid/po/R-pt_BR.po                     |    22 +-
 src/library/grid/po/R-ru.po                        |    88 +-
 src/library/grid/po/R-zh_CN.po                     |    22 +-
 src/library/grid/po/da.po                          |    34 +-
 src/library/grid/po/de.po                          |    43 +-
 src/library/grid/po/fr.po                          |    34 +-
 src/library/grid/po/grid.pot                       |    38 +-
 src/library/grid/po/it.po                          |    34 +-
 src/library/grid/po/ja.po                          |    34 +-
 src/library/grid/po/ko.po                          |    59 +-
 src/library/grid/po/pl.po                          |   114 +-
 src/library/grid/po/pt_BR.po                       |    36 +-
 src/library/grid/po/ru.po                          |    67 +-
 src/library/grid/po/zh_CN.po                       |    36 +-
 src/library/grid/src/gpar.c                        |     6 +-
 src/library/grid/src/grid.c                        |    33 +-
 src/library/grid/src/grid.h                        |    10 +-
 src/library/grid/src/just.c                        |     2 +-
 src/library/grid/src/layout.c                      |     2 +-
 src/library/grid/src/matrix.c                      |     3 +-
 src/library/grid/src/register.c                    |   127 +-
 src/library/grid/src/state.c                       |   170 +-
 src/library/grid/src/unit.c                        |     7 +-
 src/library/grid/src/util.c                        |     2 +-
 src/library/grid/src/viewport.c                    |     8 +-
 src/library/grid/tests/testls.Rout.save            |     8 +-
 src/library/grid/tests/units.R                     |    86 +-
 src/library/grid/vignettes/displaylist.Rnw         |     2 +-
 src/library/grid/vignettes/frame.Rnw               |     2 +-
 src/library/grid/vignettes/grid.Rnw                |     2 +-
 src/library/grid/vignettes/grid.Rnw-nolattice      |     2 +-
 src/library/grid/vignettes/grobs.Rnw               |     2 +-
 src/library/grid/vignettes/interactive.Rnw         |     2 +-
 src/library/grid/vignettes/locndimn.Rnw            |     2 +-
 src/library/grid/vignettes/moveline.Rnw            |     2 +-
 src/library/grid/vignettes/nonfinite.Rnw           |     2 +-
 src/library/grid/vignettes/plotexample.Rnw         |     2 +-
 src/library/grid/vignettes/rotated.Rnw             |     2 +-
 src/library/grid/vignettes/saveload.Rnw            |     2 +-
 src/library/grid/vignettes/sharing.Rnw             |     2 +-
 src/library/grid/vignettes/viewports.Rnw           |     2 +-
 src/library/methods/DESCRIPTION.in                 |     6 +-
 src/library/methods/Makefile.in                    |     3 +-
 src/library/methods/Makefile.win                   |     2 +-
 src/library/methods/NAMESPACE                      |    13 +-
 src/library/methods/R/BasicClasses.R               |   166 +-
 src/library/methods/R/BasicFunsList.R              |    74 +-
 src/library/methods/R/ClassExtensions.R            |    14 +-
 src/library/methods/R/ClassUnion.R                 |     4 +-
 src/library/methods/R/Defunct.R                    |     4 +-
 src/library/methods/R/Methods.R                    |   496 +-
 src/library/methods/R/MethodsList.R                |   184 +-
 src/library/methods/R/MethodsListClass.R           |    51 +-
 src/library/methods/R/NextMethod.R                 |    55 +-
 src/library/methods/R/RClassUtils.R                |   398 +-
 src/library/methods/R/RMethodUtils.R               |   338 +-
 src/library/methods/R/SClasses.R                   |   149 +-
 src/library/methods/R/addedFunctions.R             |    24 +-
 src/library/methods/R/as.R                         |    26 +-
 src/library/methods/R/cbind.R                      |    64 +-
 src/library/methods/R/debug.R                      |    75 +
 src/library/methods/R/fixPrevious.R                |     8 +-
 src/library/methods/R/is.R                         |    91 +-
 src/library/methods/R/languageEl.R                 |     6 +-
 src/library/methods/R/makeBasicFunsList.R          |    57 +-
 src/library/methods/R/method.skeleton.R            |     4 +-
 src/library/methods/R/methods-defunct.R            |     4 +-
 src/library/methods/R/methods-deprecated.R         |     4 +-
 src/library/methods/R/methodsTable.R               |   267 +-
 src/library/methods/R/oldClass.R                   |    29 +-
 src/library/methods/R/packageName.R                |    40 +-
 src/library/methods/R/promptClass.R                |    20 +-
 src/library/methods/R/rbind.R                      |    51 +-
 src/library/methods/R/refClass.R                   |   274 +-
 src/library/methods/R/show.R                       |     6 +-
 src/library/methods/R/substituteDirect.R           |     6 +-
 src/library/methods/R/trace.R                      |   196 +-
 src/library/methods/R/zzz.R                        |    44 +-
 src/library/methods/man/BasicClasses.Rd            |     4 +-
 src/library/methods/man/Classes.Rd                 |   345 +-
 src/library/methods/man/Classes_Details.Rd         |   324 +
 src/library/methods/man/Documentation.Rd           |     2 +-
 src/library/methods/man/EmptyMethodsList-class.Rd  |    10 +-
 src/library/methods/man/EnvironmentClass.Rd        |     2 +-
 src/library/methods/man/GenericFunctions.Rd        |    32 +-
 src/library/methods/man/Introduction.Rd            |   158 +
 src/library/methods/man/LanguageClasses.Rd         |    25 +-
 src/library/methods/man/LinearMethodsList-class.Rd |     2 +-
 src/library/methods/man/MethodDefinition-class.Rd  |     2 +-
 src/library/methods/man/MethodSupport.Rd           |     5 +-
 src/library/methods/man/MethodWithNext-class.Rd    |     2 +-
 src/library/methods/man/Methods.Rd                 |   632 +-
 src/library/methods/man/MethodsList-class.Rd       |    10 +-
 src/library/methods/man/MethodsList.Rd             |   202 +-
 src/library/methods/man/Methods_Details.Rd         |   401 +
 src/library/methods/man/Methods_for_Nongenerics.Rd |   320 +
 src/library/methods/man/Methods_for_S3.Rd          |   147 +
 src/library/methods/man/NextMethod.Rd              |   252 +-
 .../methods/man/ObjectsWithPackage-class.Rd        |     2 +-
 src/library/methods/man/RClassUtils.Rd             |    17 +-
 src/library/methods/man/RMethodUtils.Rd            |    46 +-
 src/library/methods/man/S3Part.Rd                  |   328 +-
 src/library/methods/man/S4groupGeneric.Rd          |    23 +-
 src/library/methods/man/SClassExtension-class.Rd   |     2 +-
 src/library/methods/man/StructureClasses.Rd        |     4 +-
 src/library/methods/man/TraceClasses.Rd            |     2 +-
 src/library/methods/man/as.Rd                      |   275 +-
 src/library/methods/man/callGeneric.Rd             |    14 +-
 src/library/methods/man/canCoerce.Rd               |     4 +-
 src/library/methods/man/cbind2.Rd                  |    72 +-
 src/library/methods/man/className.Rd               |     2 +-
 .../methods/man/classRepresentation-class.Rd       |     4 +-
 src/library/methods/man/dotsMethods.Rd             |    12 +-
 src/library/methods/man/evalSource.Rd              |     2 +-
 src/library/methods/man/findClass.Rd               |   122 +-
 src/library/methods/man/findMethods.Rd             |    10 +-
 src/library/methods/man/fixPrevious.Rd             |     2 +-
 src/library/methods/man/genericFunction-class.Rd   |     2 +-
 src/library/methods/man/getClass.Rd                |    35 +-
 src/library/methods/man/getMethod.Rd               |   233 +-
 src/library/methods/man/getPackageName.Rd          |     2 +-
 src/library/methods/man/hasArg.Rd                  |     2 +-
 src/library/methods/man/implicitGeneric.Rd         |   140 +-
 src/library/methods/man/inheritedSlotNames.Rd      |     7 +-
 src/library/methods/man/initialize-methods.Rd      |     4 +-
 src/library/methods/man/is.Rd                      |   438 +-
 src/library/methods/man/isSealedMethod.Rd          |     7 +-
 src/library/methods/man/languageEl.Rd              |     3 +-
 src/library/methods/man/localRefClass.Rd           |     2 +-
 src/library/methods/man/method.skeleton.Rd         |     6 +-
 src/library/methods/man/methodUtilities.Rd         |    20 +-
 src/library/methods/man/methods-defunct.Rd         |     2 +-
 src/library/methods/man/methods-deprecated.Rd      |     2 +-
 src/library/methods/man/methods-package.Rd         |    47 +-
 src/library/methods/man/new.Rd                     |   164 +-
 src/library/methods/man/nonStructure-class.Rd      |     2 +-
 src/library/methods/man/promptClass.Rd             |    12 +-
 src/library/methods/man/promptMethods.Rd           |     2 +-
 src/library/methods/man/refClass.Rd                |   470 +-
 src/library/methods/man/removeMethod.Rd            |    37 +
 src/library/methods/man/representation.Rd          |     9 +-
 src/library/methods/man/selectSuperClasses.Rd      |    10 +-
 src/library/methods/man/setAs.Rd                   |   262 +
 src/library/methods/man/setClass.Rd                |   274 +-
 src/library/methods/man/setClassUnion.Rd           |    66 +-
 src/library/methods/man/setGeneric.Rd              |   496 +-
 src/library/methods/man/setGroupGeneric.Rd         |    69 +
 src/library/methods/man/setIs.Rd                   |   332 +
 src/library/methods/man/setLoadActions.Rd          |     2 +-
 src/library/methods/man/setMethod.Rd               |   460 +-
 src/library/methods/man/setOldClass.Rd             |   329 +-
 src/library/methods/man/setSClass.Rd               |     6 +-
 src/library/methods/man/show.Rd                    |    10 +-
 src/library/methods/man/showMethods.Rd             |    30 +-
 src/library/methods/man/signature-class.Rd         |     2 +-
 src/library/methods/man/slot.Rd                    |    15 +-
 src/library/methods/man/stdRefClass.Rd             |     2 +-
 src/library/methods/man/substituteDirect.Rd        |     2 +-
 src/library/methods/man/testInheritedMethods.Rd    |     7 +-
 src/library/methods/man/validObject.Rd             |   120 +-
 src/library/methods/man/zBasicFunsList.Rd          |     2 +-
 src/library/methods/po/R-da.po                     |    97 +-
 src/library/methods/po/R-de.po                     |   306 +-
 src/library/methods/po/R-fr.po                     |   170 +-
 src/library/methods/po/R-ja.po                     |   167 +-
 src/library/methods/po/R-ko.po                     |   198 +-
 src/library/methods/po/R-methods.pot               |    79 +-
 src/library/methods/po/R-pl.po                     |  4894 +-
 src/library/methods/po/R-pt_BR.po                  |   128 +-
 src/library/methods/po/R-ru.po                     |  1450 +-
 src/library/methods/po/R-zh_CN.po                  |   154 +-
 src/library/methods/po/da.po                       |    65 +-
 src/library/methods/po/de.po                       |    78 +-
 src/library/methods/po/fr.po                       |    65 +-
 src/library/methods/po/ja.po                       |    67 +-
 src/library/methods/po/ko.po                       |    86 +-
 src/library/methods/po/methods.pot                 |    60 +-
 src/library/methods/po/pl.po                       |   155 +-
 src/library/methods/po/pt_BR.po                    |    65 +-
 src/library/methods/po/ru.po                       |   182 +-
 src/library/methods/po/zh_CN.po                    |    66 +-
 src/library/methods/src/RSMethods.h                |     2 +-
 src/library/methods/src/class_support.c            |    12 +-
 src/library/methods/src/do_substitute_direct.c     |    14 +-
 src/library/methods/src/init.c                     |    12 +-
 src/library/methods/src/methods.h                  |     4 +-
 src/library/methods/src/methods_list_dispatch.c    |   163 +-
 src/library/methods/src/slot.c                     |     2 +-
 src/library/methods/src/tests.c                    |    22 +-
 src/library/methods/src/utils.c                    |     2 +-
 src/library/methods/tests/basicRefClass.R          |     3 +-
 src/library/methods/tests/duplicateClass.R         |     2 +-
 src/library/methods/tests/envRefClass.R            |    18 +
 src/library/methods/tests/testGroupGeneric.R       |    14 +-
 src/library/methods/tests/testIs.R                 |    30 +
 src/library/parallel/DESCRIPTION.in                |     4 +-
 src/library/parallel/R/RngStream.R                 |    14 +-
 src/library/parallel/R/clusterApply.R              |    12 +-
 src/library/parallel/R/detectCores.R               |    25 +-
 src/library/parallel/R/snow.R                      |    19 +-
 src/library/parallel/R/snowSOCK.R                  |    10 +-
 src/library/parallel/R/unix/forkCluster.R          |     4 +-
 src/library/parallel/R/unix/mcfork.R               |    13 +-
 src/library/parallel/R/unix/mclapply.R             |     6 +-
 src/library/parallel/R/unix/mcmapply.R             |     4 +-
 src/library/parallel/R/unix/mcparallel.R           |    32 +-
 src/library/parallel/R/unix/pvec.R                 |     5 +-
 src/library/parallel/R/windows/forkCluster.R       |     4 +-
 src/library/parallel/R/windows/mcdummies.R         |     4 +-
 src/library/parallel/R/worker.R                    |     6 +-
 src/library/parallel/R/zzz.R                       |     6 +-
 src/library/parallel/inst/doc/parallel.pdf         |   Bin 291614 -> 290710 bytes
 src/library/parallel/man/RngStream.Rd              |     6 +-
 src/library/parallel/man/clusterApply.Rd           |     6 +-
 src/library/parallel/man/detectCores.Rd            |    58 +-
 src/library/parallel/man/makeCluster.Rd            |     8 +-
 src/library/parallel/man/parallel-package.Rd       |    22 +-
 src/library/parallel/man/splitIndices.Rd           |     4 +-
 src/library/parallel/man/unix/children.Rd          |    18 +-
 src/library/parallel/man/unix/mcaffinity.Rd        |     6 +-
 src/library/parallel/man/unix/mcfork.Rd            |     9 +-
 src/library/parallel/man/unix/mclapply.Rd          |    24 +-
 src/library/parallel/man/unix/mcparallel.Rd        |    19 +-
 src/library/parallel/man/unix/pvec.Rd              |     7 +-
 src/library/parallel/man/windows/mcdummies.Rd      |     6 +-
 src/library/parallel/po/R-da.po                    |     6 +-
 src/library/parallel/po/R-de.po                    |    17 +-
 src/library/parallel/po/R-fr.po                    |     6 +-
 src/library/parallel/po/R-ko.po                    |    40 +-
 src/library/parallel/po/R-parallel.pot             |     8 +-
 src/library/parallel/po/R-pl.po                    |   277 +-
 src/library/parallel/po/R-ru.po                    |     7 +-
 src/library/parallel/po/R-zh_CN.po                 |     8 +-
 src/library/parallel/po/da.po                      |    38 +-
 src/library/parallel/po/de.po                      |    40 +-
 src/library/parallel/po/fr.po                      |    38 +-
 src/library/parallel/po/ko.po                      |    76 +-
 src/library/parallel/po/parallel.pot               |    42 +-
 src/library/parallel/po/pl.po                      |    90 +-
 src/library/parallel/po/ru.po                      |    47 +-
 src/library/parallel/po/zh_CN.po                   |    40 +-
 src/library/parallel/src/fork.c                    |    62 +-
 src/library/parallel/src/init.c                    |    55 +-
 src/library/parallel/src/ncpus.c                   |     2 +-
 src/library/parallel/src/parallel.h                |     2 +-
 src/library/parallel/src/rngstream.c               |     2 +-
 src/library/parallel/tests/RSeed.R                 |    25 +
 src/library/parallel/tests/multicore2.RR           |    25 +-
 src/library/parallel/tests/multicore2.Rout.save    |    34 +-
 src/library/parallel/tests/multicore3.RR           |     4 +-
 src/library/parallel/tests/snow1.RR                |    31 +-
 src/library/parallel/tests/snow2.RR                |    27 +-
 src/library/parallel/tests/snow2.Rout.save         |    36 +-
 src/library/parallel/vignettes/parallel.Rnw        |    22 +-
 src/library/parallel/vignettes/parallel.bib        |     8 +-
 src/library/profile/Common.R                       |    28 +-
 src/library/profile/Rprofile.unix                  |     4 +-
 src/library/profile/Rprofile.windows               |     4 +
 src/library/splines/DESCRIPTION.in                 |     4 +-
 src/library/splines/NAMESPACE                      |     2 +-
 src/library/splines/R/splineClasses.R              |   132 +-
 src/library/splines/R/splines.R                    |    38 +-
 src/library/splines/R/zzz.R                        |     4 +-
 src/library/splines/man/asVector.Rd                |     2 +-
 src/library/splines/man/backSpline.Rd              |     2 +-
 src/library/splines/man/bs.Rd                      |    21 +-
 src/library/splines/man/interpSpline.Rd            |    24 +-
 src/library/splines/man/ns.Rd                      |     2 +-
 src/library/splines/man/periodicSpline.Rd          |     2 +-
 src/library/splines/man/polySpline.Rd              |     2 +-
 src/library/splines/man/predict.bSpline.Rd         |     2 +-
 src/library/splines/man/predict.bs.Rd              |     2 +-
 src/library/splines/man/splineDesign.Rd            |    31 +-
 src/library/splines/man/splineKnots.Rd             |     2 +-
 src/library/splines/man/splineOrder.Rd             |     2 +-
 src/library/splines/man/splines-package.Rd         |     2 +-
 src/library/splines/man/xyVector.Rd                |     2 +-
 src/library/splines/po/R-da.po                     |     8 +-
 src/library/splines/po/R-de.po                     |    15 +-
 src/library/splines/po/R-fr.po                     |     8 +-
 src/library/splines/po/R-ja.po                     |     8 +-
 src/library/splines/po/R-ko.po                     |    35 +-
 src/library/splines/po/R-pl.po                     |   196 +-
 src/library/splines/po/R-pt_BR.po                  |    10 +-
 src/library/splines/po/R-ru.po                     |     4 +-
 src/library/splines/po/R-splines.pot               |    10 +-
 src/library/splines/po/R-zh_CN.po                  |    10 +-
 src/library/splines/po/da.po                       |     6 +-
 src/library/splines/po/de.po                       |     8 +-
 src/library/splines/po/fr.po                       |     6 +-
 src/library/splines/po/ja.po                       |     6 +-
 src/library/splines/po/ko.po                       |    29 +-
 src/library/splines/po/pl.po                       |    14 +-
 src/library/splines/po/pt_BR.po                    |     8 +-
 src/library/splines/po/ru.po                       |    12 +-
 src/library/splines/po/splines.pot                 |    10 +-
 src/library/splines/po/zh_CN.po                    |     8 +-
 src/library/splines/src/Makefile.in                |     2 +
 src/library/splines/src/splines.c                  |   127 +-
 src/library/splines/tests/sparse-tst.R             |    35 +
 src/library/splines/tests/spline-tst.R             |   224 +
 src/library/stats/COPYRIGHTS.modreg                |     2 +-
 src/library/stats/DESCRIPTION.in                   |     5 +-
 src/library/stats/NAMESPACE                        |    13 +-
 src/library/stats/R/AIC.R                          |    21 +-
 src/library/stats/R/ARMAtheory.R                   |    19 +-
 src/library/stats/R/C.R                            |     4 +-
 src/library/stats/R/HoltWinters.R                  |    19 +-
 src/library/stats/R/Kalman.R                       |     4 +-
 src/library/stats/R/StructTS.R                     |     4 +-
 src/library/stats/R/TukeyHSD.R                     |    11 +-
 src/library/stats/R/acf.R                          |    11 +-
 src/library/stats/R/add.R                          |    20 +-
 src/library/stats/R/addmargins.R                   |    61 +-
 src/library/stats/R/aggregate.R                    |    58 +-
 src/library/stats/R/anova.R                        |    11 +-
 src/library/stats/R/ansari.test.R                  |     7 +-
 src/library/stats/R/aov.R                          |    75 +-
 src/library/stats/R/approx.R                       |     8 +-
 src/library/stats/R/ar.R                           |     4 +-
 src/library/stats/R/arima.R                        |    27 +-
 src/library/stats/R/arma0.R                        |     4 +-
 src/library/stats/R/ave.R                          |     4 +-
 src/library/stats/R/bandwidths.R                   |    39 +-
 src/library/stats/R/bartlett.test.R                |     9 +-
 src/library/stats/R/binom.test.R                   |     4 +-
 src/library/stats/R/biplot.R                       |     4 +-
 src/library/stats/R/birthday.R                     |     4 +-
 src/library/stats/R/cancor.R                       |     4 +-
 src/library/stats/R/chisq.test.R                   |     6 +-
 src/library/stats/R/cmdscale.R                     |    20 +-
 src/library/stats/R/complete.cases.R               |     4 +-
 src/library/stats/R/confint.R                      |    21 +-
 src/library/stats/R/constrOptim.R                  |     4 +-
 src/library/stats/R/contr.poly.R                   |   159 +-
 src/library/stats/R/contrast.R                     |     8 +-
 src/library/stats/R/cor.R                          |     4 +-
 src/library/stats/R/cor.test.R                     |    32 +-
 src/library/stats/R/cov.wt.R                       |     4 +-
 src/library/stats/R/cpgram.R                       |     4 +-
 src/library/stats/R/cutree.R                       |     4 +-
 src/library/stats/R/dendrogram.R                   |   461 +-
 src/library/stats/R/density.R                      |    10 +-
 src/library/stats/R/deriv.R                        |     4 +-
 src/library/stats/R/diffinv.R                      |    20 +-
 src/library/stats/R/dist.R                         |     4 +-
 src/library/stats/R/distn.R                        |   203 +-
 src/library/stats/R/dummy.coef.R                   |   304 +-
 src/library/stats/R/ecdf.R                         |     8 +-
 src/library/stats/R/embed.R                        |     4 +-
 src/library/stats/R/expand.model.frame.R           |     4 +-
 src/library/stats/R/factanal.R                     |     9 +-
 src/library/stats/R/family.R                       |     9 +-
 src/library/stats/R/fft.R                          |     4 +-
 src/library/stats/R/filter.R                       |    20 +-
 src/library/stats/R/fisher.test.R                  |     4 +-
 src/library/stats/R/fivenum.R                      |     4 +-
 src/library/stats/R/fligner.test.R                 |     6 +-
 src/library/stats/R/friedman.test.R                |    13 +-
 src/library/stats/R/ftable.R                       |    26 +-
 src/library/stats/R/glm.R                          |    12 +-
 src/library/stats/R/hclust.R                       |    45 +-
 src/library/stats/R/htest.R                        |    20 +-
 src/library/stats/R/identify.hclust.R              |    12 +-
 src/library/stats/R/integrate.R                    |    16 +-
 src/library/stats/R/interaction.plot.R             |     4 +-
 src/library/stats/R/isoreg.R                       |     4 +-
 src/library/stats/R/kernel.R                       |     4 +-
 src/library/stats/R/kmeans.R                       |    60 +-
 src/library/stats/R/kruskal.test.R                 |    22 +-
 src/library/stats/R/ks.test.R                      |     4 +-
 src/library/stats/R/ksmooth.R                      |     4 +-
 src/library/stats/R/lag.R                          |     4 +-
 src/library/stats/R/lag.plot.R                     |     6 +-
 src/library/stats/R/lm.R                           |    63 +-
 src/library/stats/R/lm.influence.R                 |    22 +-
 src/library/stats/R/loess.R                        |   303 +-
 src/library/stats/R/logLik.R                       |    10 +-
 src/library/stats/R/loglin.R                       |     4 +-
 src/library/stats/R/lowess.R                       |     8 +-
 src/library/stats/R/lsfit.R                        |    26 +-
 src/library/stats/R/mad.R                          |     4 +-
 src/library/stats/R/mahalanobis.R                  |    15 +-
 src/library/stats/R/manova.R                       |    43 +-
 src/library/stats/R/mantelhaen.test.R              |     4 +-
 src/library/stats/R/mcnemar.test.R                 |     4 +-
 src/library/stats/R/median.R                       |    10 +-
 src/library/stats/R/medpolish.R                    |     4 +-
 src/library/stats/R/mlm.R                          |    42 +-
 src/library/stats/R/model.tables.R                 |    18 +-
 src/library/stats/R/models.R                       |    95 +-
 src/library/stats/R/monthplot.R                    |     4 +-
 src/library/stats/R/mood.test.R                    |     7 +-
 src/library/stats/R/na.ts.R                        |     4 +-
 src/library/stats/R/nafns.R                        |     4 +-
 src/library/stats/R/nlm.R                          |     4 +-
 src/library/stats/R/nlminb.R                       |     4 +-
 src/library/stats/R/nls-profile.R                  |     4 +-
 src/library/stats/R/nls.R                          |    28 +-
 src/library/stats/R/nlsFunc.R                      |     4 +-
 src/library/stats/R/oneway.test.R                  |     7 +-
 src/library/stats/R/optim.R                        |     4 +-
 src/library/stats/R/p.adjust.R                     |     4 +-
 src/library/stats/R/pairwise.R                     |    10 +-
 src/library/stats/R/plot.lm.R                      |    39 +-
 src/library/stats/R/poisson.test.R                 |     4 +-
 src/library/stats/R/power.R                        |    97 +-
 src/library/stats/R/power.anova.test.R             |     4 +-
 src/library/stats/R/ppoints.R                      |     8 +-
 src/library/stats/R/ppr.R                          |    36 +-
 src/library/stats/R/prcomp.R                       |    54 +-
 src/library/stats/R/predict.R                      |     4 +-
 src/library/stats/R/predict.glm.R                  |     4 +-
 src/library/stats/R/princomp-add.R                 |     8 +-
 src/library/stats/R/princomp.R                     |     8 +-
 src/library/stats/R/profile.R                      |     4 +-
 src/library/stats/R/proj.R                         |     8 +-
 src/library/stats/R/prop.test.R                    |     4 +-
 src/library/stats/R/prop.trend.test.R              |    30 +-
 src/library/stats/R/qqnorm.R                       |     4 +-
 src/library/stats/R/qqplot.R                       |     4 +-
 src/library/stats/R/quade.test.R                   |    10 +-
 src/library/stats/R/quantile.R                     |    35 +-
 src/library/stats/R/r2dtable.R                     |     4 +-
 src/library/stats/R/relevel.R                      |     4 +-
 src/library/stats/R/reorder.factor.R               |     4 +-
 src/library/stats/R/reshape.R                      |    69 +-
 src/library/stats/R/runmed.R                       |    15 +-
 src/library/stats/R/sd.R                           |     8 +-
 src/library/stats/R/selfStart.R                    |     4 +-
 src/library/stats/R/shapiro.test.R                 |     4 +-
 src/library/stats/R/smooth.R                       |    13 +-
 src/library/stats/R/smspline.R                     |   201 +-
 src/library/stats/R/spectrum.R                     |     8 +-
 src/library/stats/R/spline.R                       |     9 +-
 src/library/stats/R/splinefun.R                    |     9 +-
 src/library/stats/R/stats-defunct.R                |     4 +-
 src/library/stats/R/stats-deprecated.R             |     4 +-
 src/library/stats/R/stepfun.R                      |     6 +-
 src/library/stats/R/stl.R                          |     8 +-
 src/library/stats/R/symnum.R                       |     4 +-
 src/library/stats/R/t.test.R                       |     7 +-
 src/library/stats/R/termplot.R                     |    10 +-
 src/library/stats/R/ts-tests.R                     |    14 +-
 src/library/stats/R/ts.R                           |    65 +-
 src/library/stats/R/tukeyline.R                    |     8 +-
 src/library/stats/R/update.R                       |     4 +-
 src/library/stats/R/var.test.R                     |     7 +-
 src/library/stats/R/vcov.R                         |    17 +-
 src/library/stats/R/weighted.mean.R                |     4 +-
 src/library/stats/R/wilcox.test.R                  |   225 +-
 src/library/stats/R/xtabs.R                        |    60 +-
 src/library/stats/R/zzModels.R                     |     4 +-
 src/library/stats/R/zzz.R                          |     4 +-
 src/library/stats/demo/lm.glm.R                    |     5 +-
 src/library/stats/loess-README                     |     2 +-
 src/library/stats/man/AIC.Rd                       |     2 +-
 src/library/stats/man/ARMAacf.Rd                   |    12 +-
 src/library/stats/man/ARMAtoMA.Rd                  |     2 +-
 src/library/stats/man/Beta.Rd                      |    27 +-
 src/library/stats/man/Binomial.Rd                  |     2 +-
 src/library/stats/man/Cauchy.Rd                    |     4 +-
 src/library/stats/man/Chisquare.Rd                 |    13 +-
 src/library/stats/man/Distributions.Rd             |     4 +-
 src/library/stats/man/Exponential.Rd               |     4 +-
 src/library/stats/man/Fdist.Rd                     |     4 +-
 src/library/stats/man/GammaDist.Rd                 |    13 +-
 src/library/stats/man/Geometric.Rd                 |     4 +-
 src/library/stats/man/HoltWinters.Rd               |    12 +-
 src/library/stats/man/Hypergeometric.Rd            |    25 +-
 src/library/stats/man/IQR.Rd                       |     2 +-
 src/library/stats/man/KalmanLike.Rd                |     2 +-
 src/library/stats/man/Logistic.Rd                  |     4 +-
 src/library/stats/man/Lognormal.Rd                 |     2 +-
 src/library/stats/man/Multinom.Rd                  |     2 +-
 src/library/stats/man/NLSstAsymptotic.Rd           |     2 +-
 src/library/stats/man/NLSstClosestX.Rd             |     2 +-
 src/library/stats/man/NLSstLfAsymptote.Rd          |     2 +-
 src/library/stats/man/NLSstRtAsymptote.Rd          |     2 +-
 src/library/stats/man/NegBinomial.Rd               |     8 +-
 src/library/stats/man/Normal.Rd                    |     2 +-
 src/library/stats/man/Poisson.Rd                   |    16 +-
 src/library/stats/man/SSD.Rd                       |     2 +-
 src/library/stats/man/SSasymp.Rd                   |     4 +-
 src/library/stats/man/SSasympOff.Rd                |     2 +-
 src/library/stats/man/SSasympOrig.Rd               |     2 +-
 src/library/stats/man/SSbiexp.Rd                   |     2 +-
 src/library/stats/man/SSfol.Rd                     |     2 +-
 src/library/stats/man/SSfpl.Rd                     |     2 +-
 src/library/stats/man/SSgompertz.Rd                |     2 +-
 src/library/stats/man/SSlogis.Rd                   |     2 +-
 src/library/stats/man/SSmicmen.Rd                  |     2 +-
 src/library/stats/man/SSweibull.Rd                 |     2 +-
 src/library/stats/man/SignRank.Rd                  |     4 +-
 src/library/stats/man/StructTS.Rd                  |     4 +-
 src/library/stats/man/TDist.Rd                     |     4 +-
 src/library/stats/man/Tukey.Rd                     |     4 +-
 src/library/stats/man/TukeyHSD.Rd                  |    14 +-
 src/library/stats/man/Uniform.Rd                   |     4 +-
 src/library/stats/man/Weibull.Rd                   |     2 +-
 src/library/stats/man/Wilcoxon.Rd                  |     4 +-
 src/library/stats/man/acf.Rd                       |     4 +-
 src/library/stats/man/acf2AR.Rd                    |     2 +-
 src/library/stats/man/add1.Rd                      |     7 +-
 src/library/stats/man/addmargins.Rd                |     2 +-
 src/library/stats/man/aggregate.Rd                 |     6 +-
 src/library/stats/man/alias.Rd                     |     4 +-
 src/library/stats/man/anova.Rd                     |     2 +-
 src/library/stats/man/anova.glm.Rd                 |     2 +-
 src/library/stats/man/anova.lm.Rd                  |     2 +-
 src/library/stats/man/anova.mlm.Rd                 |     8 +-
 src/library/stats/man/ansari.test.Rd               |     6 +-
 src/library/stats/man/aov.Rd                       |     4 +-
 src/library/stats/man/approxfun.Rd                 |     4 +-
 src/library/stats/man/ar.Rd                        |     2 +-
 src/library/stats/man/ar.ols.Rd                    |     6 +-
 src/library/stats/man/arima.Rd                     |    20 +-
 src/library/stats/man/arima.sim.Rd                 |     2 +-
 src/library/stats/man/arima0.Rd                    |     6 +-
 src/library/stats/man/as.hclust.Rd                 |     6 +-
 src/library/stats/man/asOneSidedFormula.Rd         |     2 +-
 src/library/stats/man/ave.Rd                       |     2 +-
 src/library/stats/man/bandwidth.Rd                 |    21 +-
 src/library/stats/man/bartlett.test.Rd             |     2 +-
 src/library/stats/man/binom.test.Rd                |     2 +-
 src/library/stats/man/biplot.Rd                    |     2 +-
 src/library/stats/man/biplot.princomp.Rd           |     2 +-
 src/library/stats/man/birthday.Rd                  |     4 +-
 src/library/stats/man/box.test.Rd                  |     6 +-
 src/library/stats/man/cancor.Rd                    |     6 +-
 src/library/stats/man/case.names.Rd                |     2 +-
 src/library/stats/man/checkMFClasses.Rd            |     2 +-
 src/library/stats/man/chisq.test.Rd                |     6 +-
 src/library/stats/man/cmdscale.Rd                  |    24 +-
 src/library/stats/man/coef.Rd                      |     3 +-
 src/library/stats/man/complete.cases.Rd            |    12 +-
 src/library/stats/man/confint.Rd                   |    16 +-
 src/library/stats/man/constrOptim.Rd               |     2 +-
 src/library/stats/man/contrast.Rd                  |     7 +-
 src/library/stats/man/contrasts.Rd                 |     7 +-
 src/library/stats/man/convolve.Rd                  |     8 +-
 src/library/stats/man/cophenetic.Rd                |     7 +-
 src/library/stats/man/cor.Rd                       |    19 +-
 src/library/stats/man/cor.test.Rd                  |     6 +-
 src/library/stats/man/cov.wt.Rd                    |     4 +-
 src/library/stats/man/cpgram.Rd                    |     4 +-
 src/library/stats/man/cutree.Rd                    |     2 +-
 src/library/stats/man/decompose.Rd                 |     8 +-
 src/library/stats/man/delete.response.Rd           |     4 +-
 src/library/stats/man/dendrapply.Rd                |    13 +-
 src/library/stats/man/dendrogram.Rd                |    22 +-
 src/library/stats/man/density.Rd                   |     9 +-
 src/library/stats/man/deriv.Rd                     |    45 +-
 src/library/stats/man/deviance.Rd                  |     2 +-
 src/library/stats/man/df.residual.Rd               |     2 +-
 src/library/stats/man/diffinv.Rd                   |     2 +-
 src/library/stats/man/dist.Rd                      |     6 +-
 src/library/stats/man/dummy.coef.Rd                |     2 +-
 src/library/stats/man/ecdf.Rd                      |     8 +-
 src/library/stats/man/eff.aovlist.Rd               |     4 +-
 src/library/stats/man/effects.Rd                   |     2 +-
 src/library/stats/man/embed.Rd                     |     2 +-
 src/library/stats/man/expand.model.frame.Rd        |     2 +-
 src/library/stats/man/extractAIC.Rd                |     6 +-
 src/library/stats/man/factanal.Rd                  |    15 +-
 src/library/stats/man/factor.scope.Rd              |     2 +-
 src/library/stats/man/family.Rd                    |    10 +-
 src/library/stats/man/fft.Rd                       |    46 +-
 src/library/stats/man/filter.Rd                    |     2 +-
 src/library/stats/man/fisher.test.Rd               |     6 +-
 src/library/stats/man/fitted.values.Rd             |     2 +-
 src/library/stats/man/fivenum.Rd                   |     2 +-
 src/library/stats/man/fligner.test.Rd              |     2 +-
 src/library/stats/man/formula.Rd                   |     2 +-
 src/library/stats/man/formula.nls.Rd               |     2 +-
 src/library/stats/man/friedman.test.Rd             |     2 +-
 src/library/stats/man/ftable.Rd                    |     2 +-
 src/library/stats/man/ftable.formula.Rd            |     2 +-
 src/library/stats/man/getInitial.Rd                |     2 +-
 src/library/stats/man/glm.Rd                       |    22 +-
 src/library/stats/man/glm.control.Rd               |     2 +-
 src/library/stats/man/glm.summaries.Rd             |     5 +-
 src/library/stats/man/hclust.Rd                    |    20 +-
 src/library/stats/man/heatmap.Rd                   |     8 +-
 src/library/stats/man/identify.hclust.Rd           |     2 +-
 src/library/stats/man/influence.measures.Rd        |    62 +-
 src/library/stats/man/integrate.Rd                 |    12 +-
 src/library/stats/man/interaction.plot.Rd          |     2 +-
 src/library/stats/man/is.empty.Rd                  |     2 +-
 src/library/stats/man/isoreg.Rd                    |     4 +-
 src/library/stats/man/kernapply.Rd                 |     2 +-
 src/library/stats/man/kernel.Rd                    |     6 +-
 src/library/stats/man/kmeans.Rd                    |     4 +-
 src/library/stats/man/kruskal.test.Rd              |    13 +-
 src/library/stats/man/ks.test.Rd                   |     2 +-
 src/library/stats/man/ksmooth.Rd                   |     8 +-
 src/library/stats/man/lag.Rd                       |     2 +-
 src/library/stats/man/lag.plot.Rd                  |     4 +-
 src/library/stats/man/line.Rd                      |     2 +-
 src/library/stats/man/listof.Rd                    |     2 +-
 src/library/stats/man/lm.Rd                        |     6 +-
 src/library/stats/man/lm.influence.Rd              |     4 +-
 src/library/stats/man/lm.summaries.Rd              |     4 +-
 src/library/stats/man/lmfit.Rd                     |     2 +-
 src/library/stats/man/loadings.Rd                  |     2 +-
 src/library/stats/man/loess.Rd                     |    15 +-
 src/library/stats/man/loess.control.Rd             |    33 +-
 src/library/stats/man/logLik.Rd                    |     7 +-
 src/library/stats/man/loglin.Rd                    |     6 +-
 src/library/stats/man/lowess.Rd                    |     2 +-
 src/library/stats/man/ls.diag.Rd                   |     2 +-
 src/library/stats/man/ls.print.Rd                  |     2 +-
 src/library/stats/man/lsfit.Rd                     |     2 +-
 src/library/stats/man/mad.Rd                       |     2 +-
 src/library/stats/man/mahalanobis.Rd               |     7 +-
 src/library/stats/man/make.link.Rd                 |     2 +-
 src/library/stats/man/makepredictcall.Rd           |     2 +-
 src/library/stats/man/manova.Rd                    |    14 +-
 src/library/stats/man/mantelhaen.test.Rd           |     2 +-
 src/library/stats/man/mauchly.test.Rd              |     2 +-
 src/library/stats/man/mcnemar.test.Rd              |     2 +-
 src/library/stats/man/median.Rd                    |    12 +-
 src/library/stats/man/medpolish.Rd                 |    10 +-
 src/library/stats/man/model.extract.Rd             |     6 +-
 src/library/stats/man/model.frame.Rd               |    28 +-
 src/library/stats/man/model.matrix.Rd              |    12 +-
 src/library/stats/man/model.tables.Rd              |     6 +-
 src/library/stats/man/monthplot.Rd                 |     2 +-
 src/library/stats/man/mood.test.Rd                 |     4 +-
 src/library/stats/man/na.action.Rd                 |     2 +-
 src/library/stats/man/na.contiguous.Rd             |     2 +-
 src/library/stats/man/na.fail.Rd                   |     2 +-
 src/library/stats/man/nafns.Rd                     |     6 +-
 src/library/stats/man/naprint.Rd                   |     2 +-
 src/library/stats/man/nextn.Rd                     |     2 +-
 src/library/stats/man/nlm.Rd                       |     7 +-
 src/library/stats/man/nlminb.Rd                    |    29 +-
 src/library/stats/man/nls.Rd                       |    11 +-
 src/library/stats/man/nls.control.Rd               |     2 +-
 src/library/stats/man/nobs.Rd                      |     2 +-
 src/library/stats/man/numericDeriv.Rd              |     6 +-
 src/library/stats/man/offset.Rd                    |     6 +-
 src/library/stats/man/oneway.test.Rd               |     2 +-
 src/library/stats/man/optim.Rd                     |     8 +-
 src/library/stats/man/optimize.Rd                  |    12 +-
 src/library/stats/man/order.dendrogram.Rd          |     2 +-
 src/library/stats/man/p.adjust.Rd                  |     4 +-
 src/library/stats/man/pairwise.prop.test.Rd        |     4 +-
 src/library/stats/man/pairwise.t.test.Rd           |     4 +-
 src/library/stats/man/pairwise.table.Rd            |     6 +-
 src/library/stats/man/pairwise.wilcox.test.Rd      |     4 +-
 src/library/stats/man/plot.HoltWinters.Rd          |     2 +-
 src/library/stats/man/plot.acf.Rd                  |     4 +-
 src/library/stats/man/plot.density.Rd              |     2 +-
 src/library/stats/man/plot.isoreg.Rd               |     4 +-
 src/library/stats/man/plot.lm.Rd                   |    28 +-
 src/library/stats/man/plot.ppr.Rd                  |    44 +-
 src/library/stats/man/plot.profile.nls.Rd          |     2 +-
 src/library/stats/man/plot.spec.Rd                 |     2 +-
 src/library/stats/man/plot.stepfun.Rd              |     2 +-
 src/library/stats/man/plot.ts.Rd                   |     5 +-
 src/library/stats/man/poisson.test.Rd              |     2 +-
 src/library/stats/man/poly.Rd                      |    41 +-
 src/library/stats/man/power.Rd                     |     2 +-
 src/library/stats/man/power.anova.test.Rd          |     2 +-
 src/library/stats/man/power.prop.test.Rd           |    34 +-
 src/library/stats/man/power.t.test.Rd              |    37 +-
 src/library/stats/man/pp.test.Rd                   |     4 +-
 src/library/stats/man/ppoints.Rd                   |    31 +-
 src/library/stats/man/ppr.Rd                       |    29 +-
 src/library/stats/man/prcomp.Rd                    |    50 +-
 src/library/stats/man/predict.HoltWinters.Rd       |     2 +-
 src/library/stats/man/predict.Rd                   |    11 +-
 src/library/stats/man/predict.arima.Rd             |     6 +-
 src/library/stats/man/predict.glm.Rd               |     2 +-
 src/library/stats/man/predict.lm.Rd                |    27 +-
 src/library/stats/man/predict.loess.Rd             |     4 +-
 src/library/stats/man/predict.nls.Rd               |     6 +-
 src/library/stats/man/predict.smooth.spline.Rd     |     2 +-
 src/library/stats/man/preplot.Rd                   |     2 +-
 src/library/stats/man/princomp.Rd                  |     6 +-
 src/library/stats/man/print.power.htest.Rd         |    33 +-
 src/library/stats/man/print.ts.Rd                  |     4 +-
 src/library/stats/man/printCoefmat.Rd              |     6 +-
 src/library/stats/man/profile.Rd                   |     4 +-
 src/library/stats/man/profile.nls.Rd               |     6 +-
 src/library/stats/man/proj.Rd                      |     4 +-
 src/library/stats/man/prop.test.Rd                 |     2 +-
 src/library/stats/man/prop.trend.test.Rd           |     2 +-
 src/library/stats/man/qqnorm.Rd                    |     2 +-
 src/library/stats/man/quade.test.Rd                |     2 +-
 src/library/stats/man/quantile.Rd                  |    16 +-
 src/library/stats/man/r2dtable.Rd                  |     2 +-
 src/library/stats/man/rWishart.Rd                  |     2 +-
 src/library/stats/man/read.ftable.Rd               |     4 +-
 src/library/stats/man/rect.hclust.Rd               |     2 +-
 src/library/stats/man/relevel.Rd                   |    15 +-
 src/library/stats/man/reorder.dendrogram.Rd        |     2 +-
 src/library/stats/man/reorder.factor.Rd            |    25 +-
 src/library/stats/man/replications.Rd              |     4 +-
 src/library/stats/man/reshape.Rd                   |     7 +-
 src/library/stats/man/residuals.Rd                 |     2 +-
 src/library/stats/man/runmed.Rd                    |     3 +-
 src/library/stats/man/scatter.smooth.Rd            |     5 +-
 src/library/stats/man/screeplot.Rd                 |     4 +-
 src/library/stats/man/sd.Rd                        |     6 +-
 src/library/stats/man/se.contrast.Rd               |     4 +-
 src/library/stats/man/selfStart.Rd                 |     2 +-
 src/library/stats/man/setNames.Rd                  |     2 +-
 src/library/stats/man/shapiro.test.Rd              |     6 +-
 src/library/stats/man/sigma.Rd                     |   103 +
 src/library/stats/man/simulate.Rd                  |     8 +-
 src/library/stats/man/smooth.Rd                    |     6 +-
 src/library/stats/man/smooth.spline.Rd             |   124 +-
 src/library/stats/man/smoothEnds.Rd                |     2 +-
 src/library/stats/man/sortedXyData.Rd              |     2 +-
 src/library/stats/man/spec.ar.Rd                   |     2 +-
 src/library/stats/man/spec.pgram.Rd                |     6 +-
 src/library/stats/man/spec.taper.Rd                |     2 +-
 src/library/stats/man/spectrum.Rd                  |     4 +-
 src/library/stats/man/splinefun.Rd                 |     8 +-
 src/library/stats/man/start.Rd                     |     2 +-
 src/library/stats/man/stat.anova.Rd                |     6 +-
 src/library/stats/man/stats-defunct.Rd             |     2 +-
 src/library/stats/man/stats-deprecated.Rd          |     4 +-
 src/library/stats/man/stats-package.Rd             |     2 +-
 src/library/stats/man/step.Rd                      |     8 +-
 src/library/stats/man/stepfun.Rd                   |    14 +-
 src/library/stats/man/stl.Rd                       |     8 +-
 src/library/stats/man/stlmethods.Rd                |     2 +-
 src/library/stats/man/summary.aov.Rd               |     2 +-
 src/library/stats/man/summary.glm.Rd               |     2 +-
 src/library/stats/man/summary.lm.Rd                |     2 +-
 src/library/stats/man/summary.manova.Rd            |     6 +-
 src/library/stats/man/summary.nls.Rd               |     2 +-
 src/library/stats/man/summary.princomp.Rd          |     4 +-
 src/library/stats/man/supsmu.Rd                    |    14 +-
 src/library/stats/man/symnum.Rd                    |     2 +-
 src/library/stats/man/t.test.Rd                    |     2 +-
 src/library/stats/man/termplot.Rd                  |    25 +-
 src/library/stats/man/terms.Rd                     |     2 +-
 src/library/stats/man/terms.formula.Rd             |     2 +-
 src/library/stats/man/terms.object.Rd              |    15 +-
 src/library/stats/man/time.Rd                      |     2 +-
 src/library/stats/man/toeplitz.Rd                  |     7 +-
 src/library/stats/man/ts-methods.Rd                |     2 +-
 src/library/stats/man/ts.Rd                        |     6 +-
 src/library/stats/man/ts.plot.Rd                   |     2 +-
 src/library/stats/man/ts.union.Rd                  |     2 +-
 src/library/stats/man/tsSmooth.Rd                  |     2 +-
 src/library/stats/man/tsdiag.Rd                    |     2 +-
 src/library/stats/man/tsp.Rd                       |     4 +-
 src/library/stats/man/uniroot.Rd                   |     6 +-
 src/library/stats/man/update.Rd                    |     2 +-
 src/library/stats/man/update.formula.Rd            |     5 +-
 src/library/stats/man/var.test.Rd                  |     2 +-
 src/library/stats/man/varimax.Rd                   |     2 +-
 src/library/stats/man/vcov.Rd                      |     6 +-
 src/library/stats/man/weighted.mean.Rd             |     2 +-
 src/library/stats/man/weighted.residuals.Rd        |     2 +-
 src/library/stats/man/weights.Rd                   |     2 +-
 src/library/stats/man/wilcox.test.Rd               |    14 +-
 src/library/stats/man/window.Rd                    |     2 +-
 src/library/stats/man/xtabs.Rd                     |    47 +-
 src/library/stats/man/zC.Rd                        |     2 +-
 src/library/stats/po/R-da.po                       |    90 +-
 src/library/stats/po/R-de.po                       |   263 +-
 src/library/stats/po/R-fr.po                       |   127 +-
 src/library/stats/po/R-it.po                       |   129 +-
 src/library/stats/po/R-ja.po                       |   135 +-
 src/library/stats/po/R-ko.po                       |   272 +-
 src/library/stats/po/R-pl.po                       |  7900 ++-
 src/library/stats/po/R-pt_BR.po                    |   129 +-
 src/library/stats/po/R-ru.po                       |   451 +-
 src/library/stats/po/R-stats.pot                   |    78 +-
 src/library/stats/po/R-tr.po                       |   121 +-
 src/library/stats/po/R-zh_CN.po                    |   122 +-
 src/library/stats/po/da.po                         |   324 +-
 src/library/stats/po/de.po                         |   223 +-
 src/library/stats/po/fr.po                         |   326 +-
 src/library/stats/po/it.po                         |   326 +-
 src/library/stats/po/ja.po                         |   331 +-
 src/library/stats/po/ko.po                         |   423 +-
 src/library/stats/po/pl.po                         |   878 +-
 src/library/stats/po/pt_BR.po                      |   328 +-
 src/library/stats/po/ru.po                         |   342 +-
 src/library/stats/po/stats.pot                     |   326 +-
 src/library/stats/po/zh_CN.po                      |   328 +-
 src/library/stats/splines-README                   |    34 +-
 src/library/stats/src/HoltWinters.c                |     6 +-
 src/library/stats/src/Makefile.in                  |     1 +
 src/library/stats/src/Makefile.win                 |     2 +-
 src/library/stats/src/PPsum.c                      |     3 +-
 src/library/stats/src/Srunmed.c                    |     5 +-
 src/library/stats/src/Trunmed.c                    |     4 +-
 src/library/stats/src/ansari.c                     |     6 +-
 src/library/stats/src/approx.c                     |    23 +-
 src/library/stats/src/arima.c                      |    17 +-
 src/library/stats/src/bandwidths.c                 |    89 +-
 src/library/stats/src/bsplvd.f                     |    39 +-
 src/library/stats/src/burg.c                       |     4 +-
 src/library/stats/src/bvalue.f                     |     2 +-
 src/library/stats/src/chisqsim.c                   |     5 +-
 src/library/stats/src/complete_cases.c             |     2 +-
 src/library/stats/src/cov.c                        |    46 +-
 src/library/stats/src/d2x2xk.c                     |     4 +-
 src/library/stats/src/dblcen.c                     |     2 +-
 src/library/stats/src/deriv.c                      |   188 +-
 src/library/stats/src/distance.c                   |    15 +-
 src/library/stats/src/distn.c                      |   281 +-
 src/library/stats/src/eureka.f                     |    11 +-
 src/library/stats/src/family.c                     |    15 +-
 src/library/stats/src/fexact.c                     |    10 +-
 src/library/stats/src/fft.c                        |     2 +-
 src/library/stats/src/filter.c                     |    25 +-
 src/library/stats/src/fourier.c                    |     2 +-
 src/library/stats/src/hclust-utils.c               |    27 +-
 src/library/stats/src/influence.c                  |     2 +-
 src/library/stats/src/init.c                       |   281 +-
 src/library/stats/src/integrate.c                  |    17 +-
 src/library/stats/src/isoreg.c                     |     4 +-
 src/library/stats/src/kendall.c                    |     7 +-
 src/library/stats/src/kmeans.c                     |     3 +-
 src/library/stats/src/kmns.f                       |     6 +-
 src/library/stats/src/ks.c                         |     5 +-
 src/library/stats/src/ksmooth.c                    |    25 +-
 src/library/stats/src/line.c                       |     4 +-
 src/library/stats/src/lm.c                         |     8 +-
 src/library/stats/src/lminfl.f                     |     2 +-
 src/library/stats/src/loessc.c                     |    15 +-
 src/library/stats/src/loessf.f                     |    27 +-
 src/library/stats/src/lowess.c                     |     4 +-
 src/library/stats/src/mAR.c                        |     5 +-
 src/library/stats/src/massdist.c                   |     5 +-
 src/library/stats/src/model.c                      |    88 +-
 src/library/stats/src/modreg.h                     |    58 +-
 src/library/stats/src/monoSpl.c                    |     4 +-
 src/library/stats/src/nls.c                        |    15 +-
 src/library/stats/src/nls.h                        |     2 +-
 src/library/stats/src/nscor.c                      |     2 +-
 src/library/stats/src/optim.c                      |     2 +-
 src/library/stats/src/optimize.c                   |    23 +-
 src/library/stats/src/pacf.c                       |    16 +-
 src/library/stats/src/port.c                       |    30 +-
 src/library/stats/src/port.h                       |     6 +-
 src/library/stats/src/ppr.f                        |   543 +-
 src/library/stats/src/prho.c                       |     5 +-
 src/library/stats/src/qsbart.f                     |    43 +-
 src/library/stats/src/rWishart.c                   |     6 +-
 src/library/stats/src/random.c                     |   314 +-
 src/library/stats/src/sbart.c                      |   113 +-
 src/library/stats/src/sgram.f                      |    77 +-
 src/library/stats/src/smooth.c                     |    82 +-
 src/library/stats/src/splines.c                    |     4 +-
 src/library/stats/src/sslvrg.f                     |    86 +-
 src/library/stats/src/starma.c                     |     6 +-
 src/library/stats/src/stats.h                      |    25 +-
 src/library/stats/src/statsR.h                     |   113 +-
 src/library/stats/src/stxwx.f                      |    11 +-
 src/library/stats/src/swilk.c                      |     6 +-
 src/library/stats/src/ts.h                         |    18 +-
 src/library/stats/src/zeroin.c                     |     4 +-
 src/library/stats/tests/anorexia.rda               |   Bin 0 -> 583 bytes
 src/library/stats/tests/arimaML.R                  |    46 +-
 src/library/stats/tests/bandwidth.R                |    19 +
 src/library/stats/tests/bandwidth.Rout.save        |    49 +
 src/library/stats/tests/birthwt.rda                |   Bin 0 -> 1916 bytes
 src/library/stats/tests/drop1-polr.R               |    12 +-
 src/library/stats/tests/glm.Rout.save              |     8 +-
 src/library/stats/tests/hills.rda                  |   Bin 0 -> 828 bytes
 src/library/stats/tests/ig_glm.R                   |    23 +-
 src/library/stats/tests/ks-test.R                  |    96 +-
 src/library/stats/tests/ks-test.Rout.save          |   270 +-
 src/library/stats/tests/nafns.R                    |     5 +-
 src/library/stats/tests/nls.R                      |    38 +-
 src/library/stats/tests/nls.Rout.save              |    46 +-
 src/library/stats/tests/offsets.R                  |     2 +-
 src/library/stats/tests/simulate.R                 |    12 +-
 src/library/stats/tests/simulate.Rout.save         |    22 +-
 src/library/stats/tests/smooth.spline.R            |   160 +-
 src/library/stats/tests/ts-tests.R                 |    18 +-
 src/library/stats4/DESCRIPTION.in                  |     2 +-
 src/library/stats4/NAMESPACE                       |    12 +-
 src/library/stats4/R/BIC.R                         |     4 +-
 src/library/stats4/R/mle.R                         |     4 +-
 src/library/stats4/man/coef-methods.Rd             |     2 +-
 src/library/stats4/man/confint-methods.Rd          |     2 +-
 src/library/stats4/man/logLik-methods.Rd           |     2 +-
 src/library/stats4/man/mle-class.Rd                |     2 +-
 src/library/stats4/man/mle.Rd                      |     6 +-
 src/library/stats4/man/plot-methods.Rd             |     2 +-
 src/library/stats4/man/profile-methods.Rd          |     2 +-
 src/library/stats4/man/profile.mle-class.Rd        |     2 +-
 src/library/stats4/man/show-methods.Rd             |     2 +-
 src/library/stats4/man/stats4-package.Rd           |     2 +-
 src/library/stats4/man/summary-methods.Rd          |     2 +-
 src/library/stats4/man/summary.mle-class.Rd        |     2 +-
 src/library/stats4/man/update-methods.Rd           |     2 +-
 src/library/stats4/man/vcov-methods.Rd             |     2 +-
 src/library/stats4/po/R-de.po                      |     6 +-
 src/library/stats4/po/R-ja.po                      |     2 +-
 src/library/stats4/po/R-ko.po                      |    35 +-
 src/library/stats4/po/R-pl.po                      |    65 +-
 src/library/stats4/po/R-ru.po                      |     4 +-
 src/library/stats4/po/R-stats4.pot                 |     5 +-
 src/library/stats4/po/R-zh_CN.po                   |     2 +-
 src/library/tcltk/DESCRIPTION.in                   |     4 +-
 src/library/tcltk/R/Tk.R                           |    38 +-
 src/library/tcltk/R/tclarray.R                     |     4 +-
 src/library/tcltk/R/tclsearch.R                    |     4 +-
 src/library/tcltk/R/tcltk-defunct.R                |     4 +-
 src/library/tcltk/R/tkGUI.R                        |    14 +-
 src/library/tcltk/R/unix/zzz.R                     |    45 +-
 src/library/tcltk/R/unix/zzzstub.R                 |     4 +-
 src/library/tcltk/R/utils.R                        |     8 +-
 src/library/tcltk/R/windows/zzz.R                  |     4 +-
 src/library/tcltk/exec/Tk-frontend.R               |     4 +-
 src/library/tcltk/man/TclInterface.Rd              |    11 +-
 src/library/tcltk/man/TkCommands.Rd                |    18 +-
 src/library/tcltk/man/TkWidgetcmds.Rd              |     2 +-
 src/library/tcltk/man/TkWidgets.Rd                 |    10 +-
 src/library/tcltk/man/tclServiceMode.Rd            |     4 +-
 src/library/tcltk/man/tcltk-defunct.Rd             |     2 +-
 src/library/tcltk/man/tcltk-package.Rd             |     4 +-
 src/library/tcltk/man/tkProgressBar.Rd             |     2 +-
 src/library/tcltk/man/tkStartGUI.Rd                |     2 +-
 src/library/tcltk/man/tk_choose.dir.Rd             |     2 +-
 src/library/tcltk/man/tk_choose.files.Rd           |     2 +-
 src/library/tcltk/man/tk_messageBox.Rd             |     4 +-
 src/library/tcltk/man/tk_select.list.Rd            |     4 +-
 src/library/tcltk/man/tkpager.Rd                   |     2 +-
 src/library/tcltk/po/R-da.po                       |     2 +-
 src/library/tcltk/po/R-de.po                       |     8 +-
 src/library/tcltk/po/R-fr.po                       |     2 +-
 src/library/tcltk/po/R-it.po                       |     2 +-
 src/library/tcltk/po/R-ja.po                       |     2 +-
 src/library/tcltk/po/R-ko.po                       |    51 +-
 src/library/tcltk/po/R-pl.po                       |   235 +-
 src/library/tcltk/po/R-pt_BR.po                    |     2 +-
 src/library/tcltk/po/R-ru.po                       |     6 +-
 src/library/tcltk/po/R-tcltk.pot                   |     5 +-
 src/library/tcltk/po/R-zh_CN.po                    |     4 +-
 src/library/tcltk/po/da.po                         |    18 +-
 src/library/tcltk/po/de.po                         |    24 +-
 src/library/tcltk/po/fr.po                         |    18 +-
 src/library/tcltk/po/ja.po                         |    18 +-
 src/library/tcltk/po/ko.po                         |    49 +-
 src/library/tcltk/po/pl.po                         |    50 +-
 src/library/tcltk/po/pt_BR.po                      |    20 +-
 src/library/tcltk/po/ru.po                         |    34 +-
 src/library/tcltk/po/tcltk.pot                     |    22 +-
 src/library/tcltk/po/zh_CN.po                      |    20 +-
 src/library/tcltk/src/Makefile.in                  |     8 +-
 src/library/tcltk/src/Makefile.win                 |     2 +-
 src/library/tcltk/src/init.c                       |    56 +-
 src/library/tcltk/src/tcltk.c                      |    34 +-
 src/library/tcltk/src/tcltk.h                      |    10 +-
 src/library/tcltk/src/tcltk_unix.c                 |    14 +-
 src/library/tcltk/src/tcltk_win.c                  |     2 +-
 src/library/tools/DESCRIPTION.in                   |     4 +-
 src/library/tools/Makefile.in                      |     6 +-
 src/library/tools/Makefile.win                     |     4 +-
 src/library/tools/NAMESPACE                        |    68 +-
 src/library/tools/R/CRANtools.R                    |   720 +
 src/library/tools/R/QC.R                           |  1933 +-
 src/library/tools/R/Rd.R                           |   159 +-
 src/library/tools/R/Rd2HTML.R                      |   181 +-
 src/library/tools/R/Rd2ex.R                        |    82 +-
 src/library/tools/R/Rd2latex.R                     |    99 +-
 src/library/tools/R/Rd2pdf.R                       |   109 +-
 src/library/tools/R/Rd2txt.R                       |    62 +-
 src/library/tools/R/RdConv2.R                      |    51 +-
 src/library/tools/R/RdHelpers.R                    |   119 +
 src/library/tools/R/Rdtools.R                      |    17 +-
 src/library/tools/R/Rprof.R                        |    10 +-
 src/library/tools/R/Sweavetools.R                  |    30 +-
 src/library/tools/R/Vignettes.R                    |   257 +-
 src/library/tools/R/admin.R                        |   109 +-
 src/library/tools/R/assertCondition.R              |    17 +-
 src/library/tools/R/bibstyle.R                     |   600 +-
 src/library/tools/R/build.R                        |   443 +-
 src/library/tools/R/check.R                        |  1627 +-
 src/library/tools/R/checktools.R                   |   643 +-
 src/library/tools/R/citation.R                     |    21 +-
 src/library/tools/R/doitools.R                     |   256 +
 src/library/tools/R/dynamicHelp.R                  |   290 +-
 src/library/tools/R/encodings.R                    |     4 +-
 src/library/tools/R/index.R                        |    58 +-
 src/library/tools/R/install.R                      |   455 +-
 src/library/tools/R/license.R                      |    88 +-
 src/library/tools/R/logging.R                      |    42 +-
 src/library/tools/R/makeLazyLoad.R                 |    50 +-
 src/library/tools/R/md5.R                          |     8 +-
 src/library/tools/R/news.R                         |   145 +-
 src/library/tools/R/package.dependencies.R         |    91 -
 src/library/tools/R/packages.R                     |   124 +-
 src/library/tools/R/parseLatex.R                   |    17 +-
 src/library/tools/R/parseRd.R                      |    95 +-
 src/library/tools/R/pdftools.R                     |    12 +-
 src/library/tools/R/pkgDepends.R                   |   325 -
 src/library/tools/R/read.00Index.R                 |     4 +-
 src/library/tools/R/recode.R                       |     4 +-
 src/library/tools/R/sotools.R                      |   400 +-
 src/library/tools/R/sysdata.R                      |    17 +
 src/library/tools/R/sysdata.rda                    |   Bin 0 -> 5670 bytes
 src/library/tools/R/testing.R                      |   227 +-
 src/library/tools/R/toHTML.R                       |    84 +-
 src/library/tools/R/tools-defunct.R                |     4 +-
 src/library/tools/R/tools-deprecated.R             |   384 +-
 src/library/tools/R/translations.R                 |    16 +-
 src/library/tools/R/urltools.R                     |   564 +
 src/library/tools/R/utils.R                        |   590 +-
 src/library/tools/R/xgettext.R                     |    30 +-
 src/library/tools/R/zzz.R                          |     4 +-
 src/library/tools/man/CRANtools.Rd                 |   131 +
 src/library/tools/man/HTMLheader.Rd                |     4 +-
 src/library/tools/man/HTMLlinks.Rd                 |     2 +-
 src/library/tools/man/QC.Rd                        |    26 +-
 src/library/tools/man/Rcmd.Rd                      |    27 +
 src/library/tools/man/Rd2HTML.Rd                   |    13 +-
 src/library/tools/man/Rd2txt_options.Rd            |     2 +-
 src/library/tools/man/RdTextFilter.Rd              |    12 +-
 src/library/tools/man/Rdiff.Rd                     |     4 +-
 src/library/tools/man/Rdindex.Rd                   |     2 +-
 src/library/tools/man/Rdutils.Rd                   |     2 +-
 src/library/tools/man/SweaveTeXFilter.Rd           |     2 +-
 src/library/tools/man/add_datalist.Rd              |     2 +-
 src/library/tools/man/bibstyle.Rd                  |     6 +-
 src/library/tools/man/buildVignette.Rd             |    11 +-
 src/library/tools/man/buildVignettes.Rd            |     2 +-
 src/library/tools/man/charsets.Rd                  |     6 +-
 src/library/tools/man/checkFF.Rd                   |     2 +-
 src/library/tools/man/checkMD5sums.Rd              |     6 +-
 src/library/tools/man/checkPoFiles.Rd              |     6 +-
 src/library/tools/man/checkRd.Rd                   |     4 +-
 src/library/tools/man/checkRdaFiles.Rd             |     4 +-
 src/library/tools/man/checkTnF.Rd                  |     2 +-
 src/library/tools/man/checkVignettes.Rd            |     4 +-
 src/library/tools/man/check_packages_in_dir.Rd     |    76 +-
 src/library/tools/man/codoc.Rd                     |     2 +-
 src/library/tools/man/compactPDF.Rd                |     6 +-
 src/library/tools/man/delimMatch.Rd                |     2 +-
 src/library/tools/man/dependsOnPkgs.Rd             |    13 +-
 src/library/tools/man/encoded.Rd                   |     2 +-
 src/library/tools/man/fileutils.Rd                 |     2 +-
 src/library/tools/man/find_gs_cmd.Rd               |     2 +-
 src/library/tools/man/getDepList.Rd                |    84 -
 src/library/tools/man/getVignetteInfo.Rd           |     5 +
 src/library/tools/man/installFoundDepends.Rd       |    38 -
 src/library/tools/man/loadRdMacros.Rd              |    81 +
 src/library/tools/man/makeLazyLoading.Rd           |     2 +-
 src/library/tools/man/make_translations_pkg.Rd     |     6 +-
 src/library/tools/man/makevars.Rd                  |    49 +
 src/library/tools/man/md5sum.Rd                    |     2 +-
 src/library/tools/man/package.dependencies.Rd      |    34 -
 src/library/tools/man/package_dependencies.Rd      |    57 +-
 ...package_native_routine_registration_skeleton.Rd |   164 +
 src/library/tools/man/parseLatex.Rd                |     2 +-
 src/library/tools/man/parse_Rd.Rd                  |    45 +-
 src/library/tools/man/pskill.Rd                    |     2 +-
 src/library/tools/man/psnice.Rd                    |     2 +-
 src/library/tools/man/read.00Index.Rd              |     2 +-
 src/library/tools/man/showNonASCII.Rd              |     2 +-
 src/library/tools/man/startDynamicHelp.Rd          |    11 +-
 src/library/tools/man/testInstalledPackage.Rd      |    15 +-
 src/library/tools/man/texi2dvi.Rd                  |    84 +-
 src/library/tools/man/toHTML.Rd                    |     2 +-
 src/library/tools/man/toRd.Rd                      |     2 +-
 src/library/tools/man/toTitleCase.Rd               |    35 +
 src/library/tools/man/tools-defunct.Rd             |     2 +-
 src/library/tools/man/tools-deprecated.Rd          |    53 +-
 src/library/tools/man/tools-package.Rd             |     2 +-
 src/library/tools/man/undoc.Rd                     |     2 +-
 src/library/tools/man/update_pkg_po.Rd             |     6 +-
 src/library/tools/man/vignetteDepends.Rd           |    10 +-
 src/library/tools/man/vignetteEngine.Rd            |     9 +-
 src/library/tools/man/writePACKAGES.Rd             |    45 +-
 src/library/tools/man/xgettext.Rd                  |     4 +-
 src/library/tools/po/R-da.po                       |   124 +-
 src/library/tools/po/R-de.po                       |   320 +-
 src/library/tools/po/R-fr.po                       |   185 +-
 src/library/tools/po/R-it.po                       |   140 +-
 src/library/tools/po/R-ja.po                       |   203 +-
 src/library/tools/po/R-ko.po                       |   247 +-
 src/library/tools/po/R-pl.po                       |  4506 +-
 src/library/tools/po/R-pt_BR.po                    |   124 +-
 src/library/tools/po/R-ru.po                       |   678 +-
 src/library/tools/po/R-tools.pot                   |   115 +-
 src/library/tools/po/R-tr.po                       |   124 +-
 src/library/tools/po/R-zh_CN.po                    |   182 +-
 src/library/tools/po/da.po                         |    54 +-
 src/library/tools/po/de.po                         |    56 +-
 src/library/tools/po/fr.po                         |    54 +-
 src/library/tools/po/it.po                         |    54 +-
 src/library/tools/po/ja.po                         |    54 +-
 src/library/tools/po/ko.po                         |    75 +-
 src/library/tools/po/pl.po                         |   196 +-
 src/library/tools/po/pt_BR.po                      |    56 +-
 src/library/tools/po/ru.po                         |    60 +-
 src/library/tools/po/tools.pot                     |    58 +-
 src/library/tools/po/zh_CN.po                      |    56 +-
 src/library/tools/src/Makefile.in                  |     3 +-
 src/library/tools/src/Rmd5.c                       |     3 +-
 src/library/tools/src/getfmts.c                    |     2 +-
 src/library/tools/src/gramLatex.c                  |   853 +-
 src/library/tools/src/gramLatex.y                  |    35 +-
 src/library/tools/src/gramRd.c                     |  1773 +-
 src/library/tools/src/gramRd.y                     |    88 +-
 src/library/tools/src/http.c                       |     2 +-
 src/library/tools/src/init.c                       |    21 +-
 src/library/tools/src/install.c                    |    11 +-
 src/library/tools/src/signals.c                    |     5 +-
 src/library/tools/src/text.c                       |    52 +-
 src/library/tools/src/tools.h                      |    12 +-
 src/library/translations/DESCRIPTION.in            |     2 +-
 .../translations/inst/da/LC_MESSAGES/R-base.mo     |   Bin 53247 -> 53685 bytes
 .../translations/inst/da/LC_MESSAGES/R-compiler.mo |   Bin 3227 -> 3227 bytes
 .../inst/da/LC_MESSAGES/R-grDevices.mo             |   Bin 10315 -> 10085 bytes
 .../translations/inst/da/LC_MESSAGES/R-graphics.mo |   Bin 1247 -> 1247 bytes
 .../translations/inst/da/LC_MESSAGES/R-methods.mo  |   Bin 1371 -> 1335 bytes
 .../translations/inst/da/LC_MESSAGES/R-parallel.mo |   Bin 2626 -> 2626 bytes
 .../translations/inst/da/LC_MESSAGES/R-stats.mo    |   Bin 4480 -> 4480 bytes
 .../translations/inst/da/LC_MESSAGES/R-tcltk.mo    |   Bin 2168 -> 2168 bytes
 .../translations/inst/da/LC_MESSAGES/R-tools.mo    |   Bin 5905 -> 5905 bytes
 .../translations/inst/da/LC_MESSAGES/R-utils.mo    |   Bin 4964 -> 4964 bytes
 src/library/translations/inst/da/LC_MESSAGES/R.mo  |   Bin 34916 -> 48915 bytes
 .../translations/inst/da/LC_MESSAGES/RGui.mo       |   Bin 20145 -> 20034 bytes
 .../translations/inst/da/LC_MESSAGES/grDevices.mo  |   Bin 9265 -> 9186 bytes
 .../translations/inst/da/LC_MESSAGES/graphics.mo   |   Bin 583 -> 583 bytes
 .../translations/inst/da/LC_MESSAGES/grid.mo       |   Bin 843 -> 843 bytes
 .../translations/inst/da/LC_MESSAGES/methods.mo    |   Bin 4535 -> 4281 bytes
 .../translations/inst/da/LC_MESSAGES/parallel.mo   |   Bin 1484 -> 1484 bytes
 .../translations/inst/da/LC_MESSAGES/splines.mo    |   Bin 552 -> 552 bytes
 .../translations/inst/da/LC_MESSAGES/stats.mo      |   Bin 6180 -> 6180 bytes
 .../translations/inst/da/LC_MESSAGES/tcltk.mo      |   Bin 1272 -> 1272 bytes
 .../translations/inst/da/LC_MESSAGES/tools.mo      |   Bin 969 -> 969 bytes
 .../translations/inst/de/LC_MESSAGES/R-base.mo     |   Bin 54750 -> 53834 bytes
 .../translations/inst/de/LC_MESSAGES/R-compiler.mo |   Bin 3468 -> 3573 bytes
 .../inst/de/LC_MESSAGES/R-grDevices.mo             |   Bin 13346 -> 13424 bytes
 .../translations/inst/de/LC_MESSAGES/R-graphics.mo |   Bin 15378 -> 15442 bytes
 .../translations/inst/de/LC_MESSAGES/R-grid.mo     |   Bin 17069 -> 17066 bytes
 .../translations/inst/de/LC_MESSAGES/R-methods.mo  |   Bin 68708 -> 68155 bytes
 .../translations/inst/de/LC_MESSAGES/R-parallel.mo |   Bin 3729 -> 3811 bytes
 .../translations/inst/de/LC_MESSAGES/R-splines.mo  |   Bin 2610 -> 2612 bytes
 .../translations/inst/de/LC_MESSAGES/R-stats.mo    |   Bin 85926 -> 86428 bytes
 .../translations/inst/de/LC_MESSAGES/R-stats4.mo   |   Bin 1293 -> 1294 bytes
 .../translations/inst/de/LC_MESSAGES/R-tcltk.mo    |   Bin 2236 -> 2238 bytes
 .../translations/inst/de/LC_MESSAGES/R-tools.mo    |   Bin 43168 -> 44798 bytes
 .../translations/inst/de/LC_MESSAGES/R-utils.mo    |   Bin 40388 -> 40881 bytes
 src/library/translations/inst/de/LC_MESSAGES/R.mo  |   Bin 162174 -> 163281 bytes
 .../translations/inst/de/LC_MESSAGES/RGui.mo       |   Bin 20610 -> 20406 bytes
 .../translations/inst/de/LC_MESSAGES/grDevices.mo  |   Bin 16480 -> 16772 bytes
 .../translations/inst/de/LC_MESSAGES/graphics.mo   |   Bin 12011 -> 12038 bytes
 .../translations/inst/de/LC_MESSAGES/grid.mo       |   Bin 2669 -> 2751 bytes
 .../translations/inst/de/LC_MESSAGES/methods.mo    |   Bin 5481 -> 5251 bytes
 .../translations/inst/de/LC_MESSAGES/parallel.mo   |   Bin 2081 -> 2083 bytes
 .../translations/inst/de/LC_MESSAGES/splines.mo    |   Bin 558 -> 560 bytes
 .../translations/inst/de/LC_MESSAGES/stats.mo      |   Bin 18423 -> 18919 bytes
 .../translations/inst/de/LC_MESSAGES/tcltk.mo      |   Bin 1309 -> 1310 bytes
 .../translations/inst/de/LC_MESSAGES/tools.mo      |   Bin 3612 -> 3614 bytes
 .../translations/inst/de/LC_MESSAGES/utils.mo      |   Bin 5246 -> 5352 bytes
 src/library/translations/inst/en/LC_MESSAGES/R.mo  |   Bin 829 -> 831 bytes
 .../inst/en at quot/LC_MESSAGES/R-base.mo             |   Bin 52921 -> 53797 bytes
 .../inst/en at quot/LC_MESSAGES/R-compiler.mo         |   Bin 3289 -> 3475 bytes
 .../inst/en at quot/LC_MESSAGES/R-grDevices.mo        |   Bin 12709 -> 12779 bytes
 .../inst/en at quot/LC_MESSAGES/R-graphics.mo         |   Bin 14819 -> 14883 bytes
 .../inst/en at quot/LC_MESSAGES/R-grid.mo             |   Bin 16431 -> 16431 bytes
 .../inst/en at quot/LC_MESSAGES/R-methods.mo          |   Bin 64871 -> 65181 bytes
 .../inst/en at quot/LC_MESSAGES/R-parallel.mo         |   Bin 3533 -> 3611 bytes
 .../inst/en at quot/LC_MESSAGES/R-splines.mo          |   Bin 2491 -> 2491 bytes
 .../inst/en at quot/LC_MESSAGES/R-stats.mo            |   Bin 83521 -> 83649 bytes
 .../inst/en at quot/LC_MESSAGES/R-stats4.mo           |   Bin 1207 -> 1207 bytes
 .../inst/en at quot/LC_MESSAGES/R-tcltk.mo            |   Bin 2149 -> 2149 bytes
 .../inst/en at quot/LC_MESSAGES/R-tools.mo            |   Bin 41511 -> 42929 bytes
 .../inst/en at quot/LC_MESSAGES/R-utils.mo            |   Bin 39003 -> 39471 bytes
 .../translations/inst/en at quot/LC_MESSAGES/R.mo     |   Bin 154409 -> 155793 bytes
 .../inst/en at quot/LC_MESSAGES/grDevices.mo          |   Bin 15429 -> 15711 bytes
 .../inst/en at quot/LC_MESSAGES/graphics.mo           |   Bin 11573 -> 11573 bytes
 .../translations/inst/en at quot/LC_MESSAGES/grid.mo  |   Bin 2563 -> 2563 bytes
 .../inst/en at quot/LC_MESSAGES/methods.mo            |   Bin 5177 -> 4943 bytes
 .../inst/en at quot/LC_MESSAGES/parallel.mo           |   Bin 1959 -> 1959 bytes
 .../inst/en at quot/LC_MESSAGES/splines.mo            |   Bin 509 -> 509 bytes
 .../translations/inst/en at quot/LC_MESSAGES/stats.mo |   Bin 17563 -> 18097 bytes
 .../translations/inst/en at quot/LC_MESSAGES/tcltk.mo |   Bin 1217 -> 1217 bytes
 .../translations/inst/en at quot/LC_MESSAGES/tools.mo |   Bin 3427 -> 3427 bytes
 .../translations/inst/en at quot/LC_MESSAGES/utils.mo |   Bin 5035 -> 5127 bytes
 .../inst/en_GB/LC_MESSAGES/R-grDevices.mo          |   Bin 391 -> 396 bytes
 .../translations/inst/en_GB/LC_MESSAGES/R.mo       |   Bin 951 -> 956 bytes
 .../inst/en_GB/LC_MESSAGES/grDevices.mo            |   Bin 1161 -> 1166 bytes
 src/library/translations/inst/es/LC_MESSAGES/R.mo  |   Bin 118950 -> 115265 bytes
 .../translations/inst/es/LC_MESSAGES/RGui.mo       |   Bin 21018 -> 20799 bytes
 .../translations/inst/es/LC_MESSAGES/graphics.mo   |   Bin 9207 -> 9207 bytes
 .../translations/inst/fa/LC_MESSAGES/R-base.mo     |   Bin 553 -> 553 bytes
 .../translations/inst/fa/LC_MESSAGES/R-utils.mo    |   Bin 1656 -> 1656 bytes
 src/library/translations/inst/fa/LC_MESSAGES/R.mo  |   Bin 2208 -> 2208 bytes
 .../translations/inst/fa/LC_MESSAGES/RGui.mo       |   Bin 27136 -> 26917 bytes
 .../translations/inst/fr/LC_MESSAGES/R-base.mo     |   Bin 57539 -> 56369 bytes
 .../translations/inst/fr/LC_MESSAGES/R-compiler.mo |   Bin 3787 -> 3787 bytes
 .../inst/fr/LC_MESSAGES/R-grDevices.mo             |   Bin 13925 -> 13692 bytes
 .../translations/inst/fr/LC_MESSAGES/R-graphics.mo |   Bin 15756 -> 15574 bytes
 .../translations/inst/fr/LC_MESSAGES/R-methods.mo  |   Bin 71783 -> 70340 bytes
 .../translations/inst/fr/LC_MESSAGES/R-parallel.mo |   Bin 3951 -> 3951 bytes
 .../translations/inst/fr/LC_MESSAGES/R-stats.mo    |   Bin 88466 -> 87517 bytes
 .../translations/inst/fr/LC_MESSAGES/R-tcltk.mo    |   Bin 2390 -> 2390 bytes
 .../translations/inst/fr/LC_MESSAGES/R-tools.mo    |   Bin 44900 -> 43361 bytes
 .../translations/inst/fr/LC_MESSAGES/R-utils.mo    |   Bin 41984 -> 40140 bytes
 src/library/translations/inst/fr/LC_MESSAGES/R.mo  |   Bin 169092 -> 164302 bytes
 .../translations/inst/fr/LC_MESSAGES/RGui.mo       |   Bin 21500 -> 21274 bytes
 .../translations/inst/fr/LC_MESSAGES/grDevices.mo  |   Bin 17173 -> 17092 bytes
 .../translations/inst/fr/LC_MESSAGES/graphics.mo   |   Bin 12487 -> 12487 bytes
 .../translations/inst/fr/LC_MESSAGES/grid.mo       |   Bin 2844 -> 2844 bytes
 .../translations/inst/fr/LC_MESSAGES/methods.mo    |   Bin 5864 -> 5603 bytes
 .../translations/inst/fr/LC_MESSAGES/parallel.mo   |   Bin 2208 -> 2208 bytes
 .../translations/inst/fr/LC_MESSAGES/splines.mo    |   Bin 582 -> 582 bytes
 .../translations/inst/fr/LC_MESSAGES/stats.mo      |   Bin 18825 -> 18825 bytes
 .../translations/inst/fr/LC_MESSAGES/tcltk.mo      |   Bin 1407 -> 1407 bytes
 .../translations/inst/fr/LC_MESSAGES/tools.mo      |   Bin 3818 -> 3818 bytes
 .../translations/inst/it/LC_MESSAGES/R-base.mo     |   Bin 20139 -> 19901 bytes
 .../inst/it/LC_MESSAGES/R-grDevices.mo             |   Bin 5945 -> 5783 bytes
 .../translations/inst/it/LC_MESSAGES/R-graphics.mo |   Bin 8964 -> 8966 bytes
 .../translations/inst/it/LC_MESSAGES/R-stats.mo    |   Bin 54258 -> 53920 bytes
 .../translations/inst/it/LC_MESSAGES/R-tcltk.mo    |   Bin 916 -> 916 bytes
 .../translations/inst/it/LC_MESSAGES/R-tools.mo    |   Bin 5273 -> 5128 bytes
 src/library/translations/inst/it/LC_MESSAGES/R.mo  |   Bin 87426 -> 85043 bytes
 .../translations/inst/it/LC_MESSAGES/RGui.mo       |   Bin 18839 -> 18580 bytes
 .../translations/inst/it/LC_MESSAGES/grDevices.mo  |   Bin 4702 -> 4616 bytes
 .../translations/inst/it/LC_MESSAGES/graphics.mo   |   Bin 8747 -> 8747 bytes
 .../translations/inst/it/LC_MESSAGES/grid.mo       |   Bin 566 -> 566 bytes
 .../translations/inst/it/LC_MESSAGES/stats.mo      |   Bin 11776 -> 11776 bytes
 .../translations/inst/it/LC_MESSAGES/tools.mo      |   Bin 661 -> 661 bytes
 .../translations/inst/ja/LC_MESSAGES/R-base.mo     |   Bin 63840 -> 64468 bytes
 .../translations/inst/ja/LC_MESSAGES/R-compiler.mo |   Bin 4108 -> 4364 bytes
 .../inst/ja/LC_MESSAGES/R-grDevices.mo             |   Bin 15430 -> 15549 bytes
 .../translations/inst/ja/LC_MESSAGES/R-graphics.mo |   Bin 17718 -> 17888 bytes
 .../translations/inst/ja/LC_MESSAGES/R-grid.mo     |   Bin 19961 -> 19961 bytes
 .../translations/inst/ja/LC_MESSAGES/R-methods.mo  |   Bin 77805 -> 77674 bytes
 .../translations/inst/ja/LC_MESSAGES/R-splines.mo  |   Bin 3174 -> 3174 bytes
 .../translations/inst/ja/LC_MESSAGES/R-stats.mo    |   Bin 98475 -> 99101 bytes
 .../translations/inst/ja/LC_MESSAGES/R-stats4.mo   |   Bin 1492 -> 1492 bytes
 .../translations/inst/ja/LC_MESSAGES/R-tcltk.mo    |   Bin 2733 -> 2733 bytes
 .../translations/inst/ja/LC_MESSAGES/R-tools.mo    |   Bin 50923 -> 52810 bytes
 .../translations/inst/ja/LC_MESSAGES/R-utils.mo    |   Bin 46777 -> 47232 bytes
 src/library/translations/inst/ja/LC_MESSAGES/R.mo  |   Bin 190242 -> 190790 bytes
 .../translations/inst/ja/LC_MESSAGES/RGui.mo       |   Bin 24207 -> 23920 bytes
 .../translations/inst/ja/LC_MESSAGES/grDevices.mo  |   Bin 19498 -> 19889 bytes
 .../translations/inst/ja/LC_MESSAGES/graphics.mo   |   Bin 13936 -> 13936 bytes
 .../translations/inst/ja/LC_MESSAGES/grid.mo       |   Bin 3230 -> 3230 bytes
 .../translations/inst/ja/LC_MESSAGES/methods.mo    |   Bin 6278 -> 6020 bytes
 .../translations/inst/ja/LC_MESSAGES/splines.mo    |   Bin 527 -> 527 bytes
 .../translations/inst/ja/LC_MESSAGES/stats.mo      |   Bin 20978 -> 21515 bytes
 .../translations/inst/ja/LC_MESSAGES/tcltk.mo      |   Bin 1435 -> 1435 bytes
 .../translations/inst/ja/LC_MESSAGES/tools.mo      |   Bin 4153 -> 4153 bytes
 .../translations/inst/ko/LC_MESSAGES/R-base.mo     |   Bin 43917 -> 43665 bytes
 .../translations/inst/ko/LC_MESSAGES/R-compiler.mo |   Bin 2343 -> 2408 bytes
 .../inst/ko/LC_MESSAGES/R-grDevices.mo             |   Bin 14069 -> 13770 bytes
 .../translations/inst/ko/LC_MESSAGES/R-graphics.mo |   Bin 16169 -> 16151 bytes
 .../translations/inst/ko/LC_MESSAGES/R-grid.mo     |   Bin 16880 -> 16837 bytes
 .../translations/inst/ko/LC_MESSAGES/R-methods.mo  |   Bin 59037 -> 58582 bytes
 .../translations/inst/ko/LC_MESSAGES/R-parallel.mo |   Bin 4198 -> 4261 bytes
 .../translations/inst/ko/LC_MESSAGES/R-splines.mo  |   Bin 3082 -> 3039 bytes
 .../translations/inst/ko/LC_MESSAGES/R-stats.mo    |   Bin 79821 -> 81831 bytes
 .../translations/inst/ko/LC_MESSAGES/R-stats4.mo   |   Bin 1428 -> 1407 bytes
 .../translations/inst/ko/LC_MESSAGES/R-tcltk.mo    |   Bin 2574 -> 2530 bytes
 .../translations/inst/ko/LC_MESSAGES/R-tools.mo    |   Bin 40536 -> 41387 bytes
 .../translations/inst/ko/LC_MESSAGES/R-utils.mo    |   Bin 42497 -> 42915 bytes
 src/library/translations/inst/ko/LC_MESSAGES/R.mo  |   Bin 159731 -> 160357 bytes
 .../translations/inst/ko/LC_MESSAGES/RGui.mo       |   Bin 21845 -> 22901 bytes
 .../translations/inst/ko/LC_MESSAGES/grDevices.mo  |   Bin 17636 -> 18059 bytes
 .../translations/inst/ko/LC_MESSAGES/graphics.mo   |   Bin 12757 -> 12714 bytes
 .../translations/inst/ko/LC_MESSAGES/grid.mo       |   Bin 3098 -> 3055 bytes
 .../translations/inst/ko/LC_MESSAGES/methods.mo    |   Bin 6063 -> 5773 bytes
 .../translations/inst/ko/LC_MESSAGES/parallel.mo   |   Bin 2406 -> 2363 bytes
 .../translations/inst/ko/LC_MESSAGES/splines.mo    |   Bin 604 -> 561 bytes
 .../translations/inst/ko/LC_MESSAGES/stats.mo      |   Bin 19576 -> 19503 bytes
 .../translations/inst/ko/LC_MESSAGES/tcltk.mo      |   Bin 1499 -> 1489 bytes
 .../translations/inst/ko/LC_MESSAGES/tools.mo      |   Bin 3765 -> 3722 bytes
 .../translations/inst/ko/LC_MESSAGES/utils.mo      |   Bin 5486 -> 5663 bytes
 .../translations/inst/nn/LC_MESSAGES/R-base.mo     |   Bin 40537 -> 39889 bytes
 src/library/translations/inst/nn/LC_MESSAGES/R.mo  |   Bin 129027 -> 125529 bytes
 .../translations/inst/nn/LC_MESSAGES/RGui.mo       |   Bin 20416 -> 20215 bytes
 .../translations/inst/nn/LC_MESSAGES/graphics.mo   |   Bin 9530 -> 9530 bytes
 .../translations/inst/pl/LC_MESSAGES/R-base.mo     |   Bin 59860 -> 60387 bytes
 .../translations/inst/pl/LC_MESSAGES/R-compiler.mo |   Bin 3807 -> 4009 bytes
 .../inst/pl/LC_MESSAGES/R-grDevices.mo             |   Bin 14297 -> 14367 bytes
 .../translations/inst/pl/LC_MESSAGES/R-graphics.mo |   Bin 16168 -> 16206 bytes
 .../translations/inst/pl/LC_MESSAGES/R-grid.mo     |   Bin 18066 -> 18066 bytes
 .../translations/inst/pl/LC_MESSAGES/R-methods.mo  |   Bin 68996 -> 68446 bytes
 .../translations/inst/pl/LC_MESSAGES/R-parallel.mo |   Bin 4174 -> 4251 bytes
 .../translations/inst/pl/LC_MESSAGES/R-splines.mo  |   Bin 2789 -> 2789 bytes
 .../translations/inst/pl/LC_MESSAGES/R-stats.mo    |   Bin 92531 -> 92991 bytes
 .../translations/inst/pl/LC_MESSAGES/R-stats4.mo   |   Bin 1517 -> 1517 bytes
 .../translations/inst/pl/LC_MESSAGES/R-tcltk.mo    |   Bin 2476 -> 2476 bytes
 .../translations/inst/pl/LC_MESSAGES/R-tools.mo    |   Bin 46437 -> 48061 bytes
 .../translations/inst/pl/LC_MESSAGES/R-utils.mo    |   Bin 43118 -> 43535 bytes
 src/library/translations/inst/pl/LC_MESSAGES/R.mo  |   Bin 167299 -> 168695 bytes
 .../translations/inst/pl/LC_MESSAGES/RGui.mo       |   Bin 21047 -> 20885 bytes
 .../translations/inst/pl/LC_MESSAGES/grDevices.mo  |   Bin 16981 -> 17327 bytes
 .../translations/inst/pl/LC_MESSAGES/graphics.mo   |   Bin 12703 -> 12703 bytes
 .../translations/inst/pl/LC_MESSAGES/grid.mo       |   Bin 2975 -> 2975 bytes
 .../translations/inst/pl/LC_MESSAGES/methods.mo    |   Bin 5515 -> 5275 bytes
 .../translations/inst/pl/LC_MESSAGES/parallel.mo   |   Bin 2301 -> 2301 bytes
 .../translations/inst/pl/LC_MESSAGES/splines.mo    |   Bin 721 -> 721 bytes
 .../translations/inst/pl/LC_MESSAGES/stats.mo      |   Bin 19273 -> 19747 bytes
 .../translations/inst/pl/LC_MESSAGES/tcltk.mo      |   Bin 1480 -> 1480 bytes
 .../translations/inst/pl/LC_MESSAGES/tools.mo      |   Bin 3886 -> 3886 bytes
 .../translations/inst/pl/LC_MESSAGES/utils.mo      |   Bin 5604 -> 5708 bytes
 .../translations/inst/pt_BR/LC_MESSAGES/R-base.mo  |   Bin 32737 -> 32403 bytes
 .../inst/pt_BR/LC_MESSAGES/R-compiler.mo           |   Bin 3553 -> 3553 bytes
 .../inst/pt_BR/LC_MESSAGES/R-grDevices.mo          |   Bin 9893 -> 9668 bytes
 .../inst/pt_BR/LC_MESSAGES/R-graphics.mo           |   Bin 12405 -> 12405 bytes
 .../inst/pt_BR/LC_MESSAGES/R-methods.mo            |   Bin 5500 -> 5106 bytes
 .../inst/pt_BR/LC_MESSAGES/R-splines.mo            |   Bin 2239 -> 2244 bytes
 .../translations/inst/pt_BR/LC_MESSAGES/R-stats.mo |   Bin 49579 -> 49188 bytes
 .../translations/inst/pt_BR/LC_MESSAGES/R-tcltk.mo |   Bin 2325 -> 2325 bytes
 .../translations/inst/pt_BR/LC_MESSAGES/R-tools.mo |   Bin 2111 -> 2111 bytes
 .../translations/inst/pt_BR/LC_MESSAGES/R-utils.mo |   Bin 1218 -> 1218 bytes
 .../translations/inst/pt_BR/LC_MESSAGES/R.mo       |   Bin 135607 -> 131859 bytes
 .../translations/inst/pt_BR/LC_MESSAGES/RGui.mo    |   Bin 20940 -> 20729 bytes
 .../inst/pt_BR/LC_MESSAGES/grDevices.mo            |   Bin 2524 -> 2529 bytes
 .../inst/pt_BR/LC_MESSAGES/graphics.mo             |   Bin 10057 -> 10057 bytes
 .../translations/inst/pt_BR/LC_MESSAGES/grid.mo    |   Bin 952 -> 957 bytes
 .../translations/inst/pt_BR/LC_MESSAGES/methods.mo |   Bin 4949 -> 4679 bytes
 .../translations/inst/pt_BR/LC_MESSAGES/splines.mo |   Bin 629 -> 634 bytes
 .../translations/inst/pt_BR/LC_MESSAGES/stats.mo   |   Bin 16930 -> 16935 bytes
 .../translations/inst/pt_BR/LC_MESSAGES/tcltk.mo   |   Bin 1365 -> 1370 bytes
 .../translations/inst/pt_BR/LC_MESSAGES/tools.mo   |   Bin 809 -> 814 bytes
 .../translations/inst/ru/LC_MESSAGES/R-base.mo     |   Bin 53327 -> 54805 bytes
 .../translations/inst/ru/LC_MESSAGES/R-compiler.mo |   Bin 4802 -> 4936 bytes
 .../inst/ru/LC_MESSAGES/R-grDevices.mo             |   Bin 13266 -> 13627 bytes
 .../translations/inst/ru/LC_MESSAGES/R-graphics.mo |   Bin 15425 -> 15532 bytes
 .../translations/inst/ru/LC_MESSAGES/R-grid.mo     |   Bin 15860 -> 16692 bytes
 .../translations/inst/ru/LC_MESSAGES/R-methods.mo  |   Bin 65501 -> 65961 bytes
 .../translations/inst/ru/LC_MESSAGES/R-parallel.mo |   Bin 3829 -> 3908 bytes
 .../translations/inst/ru/LC_MESSAGES/R-splines.mo  |   Bin 2660 -> 2662 bytes
 .../translations/inst/ru/LC_MESSAGES/R-stats.mo    |   Bin 85050 -> 86604 bytes
 .../translations/inst/ru/LC_MESSAGES/R-stats4.mo   |   Bin 1447 -> 1449 bytes
 .../translations/inst/ru/LC_MESSAGES/R-tcltk.mo    |   Bin 2332 -> 2334 bytes
 .../translations/inst/ru/LC_MESSAGES/R-tools.mo    |   Bin 35399 -> 44414 bytes
 .../translations/inst/ru/LC_MESSAGES/R-utils.mo    |   Bin 39126 -> 40653 bytes
 src/library/translations/inst/ru/LC_MESSAGES/R.mo  |   Bin 204819 -> 209653 bytes
 .../translations/inst/ru/LC_MESSAGES/RGui.mo       |   Bin 20443 -> 20225 bytes
 .../translations/inst/ru/LC_MESSAGES/grDevices.mo  |   Bin 15949 -> 16327 bytes
 .../translations/inst/ru/LC_MESSAGES/graphics.mo   |   Bin 15508 -> 15753 bytes
 .../translations/inst/ru/LC_MESSAGES/grid.mo       |   Bin 2547 -> 2788 bytes
 .../translations/inst/ru/LC_MESSAGES/methods.mo    |   Bin 5294 -> 5072 bytes
 .../translations/inst/ru/LC_MESSAGES/parallel.mo   |   Bin 2134 -> 2134 bytes
 .../translations/inst/ru/LC_MESSAGES/splines.mo    |   Bin 603 -> 605 bytes
 .../translations/inst/ru/LC_MESSAGES/stats.mo      |   Bin 17829 -> 18617 bytes
 .../translations/inst/ru/LC_MESSAGES/tcltk.mo      |   Bin 1374 -> 1376 bytes
 .../translations/inst/ru/LC_MESSAGES/tools.mo      |   Bin 3673 -> 3675 bytes
 .../translations/inst/tr/LC_MESSAGES/R-base.mo     |   Bin 790 -> 790 bytes
 .../translations/inst/tr/LC_MESSAGES/R-stats.mo    |   Bin 34238 -> 34017 bytes
 .../translations/inst/tr/LC_MESSAGES/R-tools.mo    |   Bin 522 -> 522 bytes
 .../translations/inst/tr/LC_MESSAGES/R-utils.mo    |   Bin 941 -> 941 bytes
 src/library/translations/inst/tr/LC_MESSAGES/R.mo  |   Bin 127652 -> 124265 bytes
 .../translations/inst/tr/LC_MESSAGES/RGui.mo       |   Bin 20883 -> 20684 bytes
 .../translations/inst/tr/LC_MESSAGES/graphics.mo   |   Bin 9716 -> 9716 bytes
 .../translations/inst/zh_CN/LC_MESSAGES/R-base.mo  |   Bin 48485 -> 47656 bytes
 .../inst/zh_CN/LC_MESSAGES/R-compiler.mo           |   Bin 3204 -> 3209 bytes
 .../inst/zh_CN/LC_MESSAGES/R-grDevices.mo          |   Bin 11638 -> 11427 bytes
 .../inst/zh_CN/LC_MESSAGES/R-graphics.mo           |   Bin 13708 -> 13590 bytes
 .../translations/inst/zh_CN/LC_MESSAGES/R-grid.mo  |   Bin 14650 -> 14655 bytes
 .../inst/zh_CN/LC_MESSAGES/R-methods.mo            |   Bin 60094 -> 58897 bytes
 .../inst/zh_CN/LC_MESSAGES/R-parallel.mo           |   Bin 3320 -> 3325 bytes
 .../inst/zh_CN/LC_MESSAGES/R-splines.mo            |   Bin 2385 -> 2390 bytes
 .../translations/inst/zh_CN/LC_MESSAGES/R-stats.mo |   Bin 75788 -> 74985 bytes
 .../inst/zh_CN/LC_MESSAGES/R-stats4.mo             |   Bin 1199 -> 1204 bytes
 .../translations/inst/zh_CN/LC_MESSAGES/R-tcltk.mo |   Bin 2107 -> 2112 bytes
 .../translations/inst/zh_CN/LC_MESSAGES/R-tools.mo |   Bin 31886 -> 30817 bytes
 .../translations/inst/zh_CN/LC_MESSAGES/R-utils.mo |   Bin 35463 -> 34114 bytes
 .../translations/inst/zh_CN/LC_MESSAGES/R.mo       |   Bin 144023 -> 139868 bytes
 .../translations/inst/zh_CN/LC_MESSAGES/RGui.mo    |   Bin 17586 -> 17418 bytes
 .../inst/zh_CN/LC_MESSAGES/grDevices.mo            |   Bin 14564 -> 14498 bytes
 .../inst/zh_CN/LC_MESSAGES/graphics.mo             |   Bin 10696 -> 10701 bytes
 .../translations/inst/zh_CN/LC_MESSAGES/grid.mo    |   Bin 2357 -> 2362 bytes
 .../translations/inst/zh_CN/LC_MESSAGES/methods.mo |   Bin 4942 -> 4726 bytes
 .../inst/zh_CN/LC_MESSAGES/parallel.mo             |   Bin 1904 -> 1909 bytes
 .../translations/inst/zh_CN/LC_MESSAGES/splines.mo |   Bin 496 -> 501 bytes
 .../translations/inst/zh_CN/LC_MESSAGES/stats.mo   |   Bin 16189 -> 16194 bytes
 .../translations/inst/zh_CN/LC_MESSAGES/tcltk.mo   |   Bin 1215 -> 1220 bytes
 .../translations/inst/zh_CN/LC_MESSAGES/tools.mo   |   Bin 3222 -> 3227 bytes
 .../translations/inst/zh_TW/LC_MESSAGES/R.mo       |   Bin 128878 -> 125530 bytes
 .../translations/inst/zh_TW/LC_MESSAGES/RGui.mo    |   Bin 17904 -> 17721 bytes
 .../inst/zh_TW/LC_MESSAGES/graphics.mo             |   Bin 9112 -> 9112 bytes
 src/library/utils/DESCRIPTION.in                   |     4 +-
 src/library/utils/Makefile.in                      |     1 +
 src/library/utils/Makefile.win                     |     1 +
 src/library/utils/NAMESPACE                        |    81 +-
 src/library/utils/R/MARC.R                         |   244 -
 src/library/utils/R/RShowDoc.R                     |    10 +-
 src/library/utils/R/RSiteSearch.R                  |    12 +-
 src/library/utils/R/Rprof.R                        |     4 +-
 src/library/utils/R/Sweave.R                       |    37 +-
 src/library/utils/R/SweaveDrivers.R                |   140 +-
 src/library/utils/R/URLencode.R                    |    16 +-
 src/library/utils/R/adist.R                        |     4 +-
 src/library/utils/R/alarm.R                        |     4 +-
 src/library/utils/R/apropos.R                      |    30 +-
 src/library/utils/R/aspell.R                       |   193 +-
 src/library/utils/R/browseVignettes.R              |    21 +-
 src/library/utils/R/bug.report.R                   |    79 +-
 src/library/utils/R/capture.output.R               |    17 +-
 src/library/utils/R/changedFiles.R                 |     4 +-
 src/library/utils/R/citation.R                     |   365 +-
 src/library/utils/R/combn.R                        |     4 +-
 src/library/utils/R/completion.R                   |    77 +-
 src/library/utils/R/data.R                         |    10 +-
 src/library/utils/R/databrowser.R                  |     4 +-
 src/library/utils/R/de.R                           |     4 +-
 src/library/utils/R/debugcall.R                    |    93 +
 src/library/utils/R/debugger.R                     |    18 +-
 src/library/utils/R/demo.R                         |     8 +-
 src/library/utils/R/edit.R                         |    38 +-
 src/library/utils/R/example.R                      |    11 +-
 src/library/utils/R/filetest.R                     |     4 +-
 src/library/utils/R/findLineNum.R                  |     4 +-
 src/library/utils/R/fix.R                          |     4 +-
 src/library/utils/R/format.R                       |    16 +-
 src/library/utils/R/frametools.R                   |    27 +-
 src/library/utils/R/glob2rx.R                      |     9 +-
 src/library/utils/R/hasName.R                      |    21 +
 src/library/utils/R/head.R                         |    13 +-
 src/library/utils/R/help.R                         |    83 +-
 src/library/utils/R/help.request.R                 |    16 +-
 src/library/utils/R/help.search.R                  |   812 +-
 src/library/utils/R/help.start.R                   |    14 +-
 src/library/utils/R/history.R                      |     4 +-
 src/library/utils/R/iconv.R                        |     8 +-
 src/library/utils/R/indices.R                      |    22 +-
 src/library/utils/R/linkhtml.R                     |    10 +-
 src/library/utils/R/menu.R                         |     8 +-
 src/library/utils/R/mirrorAdmin.R                  |     6 +-
 src/library/utils/R/modifyList.R                   |     8 +-
 src/library/utils/R/news.R                         |    58 +-
 src/library/utils/R/object.size.R                  |    64 +-
 src/library/utils/R/objects.R                      |   268 +-
 src/library/utils/R/package.skeleton.R             |    21 +-
 src/library/utils/R/packageStatus.R                |     7 +-
 src/library/utils/R/packages.R                     |   308 +-
 src/library/utils/R/packages2.R                    |   204 +-
 src/library/utils/R/page.R                         |     4 +-
 src/library/utils/R/progressBar.R                  |    18 +-
 src/library/utils/R/prompt.R                       |   108 +-
 src/library/utils/R/question.R                     |    43 +-
 src/library/utils/R/read.DIF.R                     |    14 +-
 src/library/utils/R/read.fortran.R                 |     4 +-
 src/library/utils/R/read.fwf.R                     |    32 +-
 src/library/utils/R/readhttp.R                     |     4 +-
 src/library/utils/R/readtable.R                    |    27 +-
 src/library/utils/R/relist.R                       |     4 +-
 src/library/utils/R/roman.R                        |   110 +-
 src/library/utils/R/rtags.R                        |    12 +-
 src/library/utils/R/sessionInfo.R                  |   115 +-
 src/library/utils/R/sock.R                         |     4 +-
 src/library/utils/R/sourceutils.R                  |    13 +-
 src/library/utils/R/str.R                          |   221 +-
 src/library/utils/R/strcapture.R                   |    53 +
 src/library/utils/R/summRprof.R                    |    43 +-
 src/library/utils/R/sysdata.R                      |    63 +
 src/library/utils/R/sysdata.rda                    |   Bin 0 -> 14324 bytes
 src/library/utils/R/tar.R                          |    29 +-
 src/library/utils/R/toLatex.R                      |     4 +-
 src/library/utils/R/unix/create.post.R             |     4 +-
 src/library/utils/R/unix/download.file.R           |    89 +-
 src/library/utils/R/unix/mac.install.R             |    13 +-
 src/library/utils/R/unix/sysutils.R                |     4 +-
 src/library/utils/R/utils-defunct.R                |     4 +-
 src/library/utils/R/utils-deprecated.R             |     4 +-
 src/library/utils/R/vignette.R                     |    71 +-
 src/library/utils/R/widgets.R                      |     8 +-
 src/library/utils/R/windows/Rconsole.R             |     4 +-
 src/library/utils/R/windows/choose.files.R         |    13 +-
 src/library/utils/R/windows/create.post.R          |     4 +-
 src/library/utils/R/windows/download.file.R        |    92 +-
 src/library/utils/R/windows/install.packages.R     |    21 +-
 src/library/utils/R/windows/sysutils.R             |     8 +-
 src/library/utils/R/windows/winDialog.R            |     4 +-
 src/library/utils/R/write.table.R                  |     4 +-
 src/library/utils/R/zip.R                          |     4 +-
 src/library/utils/R/zzz.R                          |    22 +-
 src/library/utils/inst/Sweave/example-1.Rnw        |    12 +-
 src/library/utils/inst/doc/Sweave.pdf              |   Bin 319824 -> 321949 bytes
 src/library/utils/man/BATCH.Rd                     |     2 +-
 src/library/utils/man/INSTALL.Rd                   |     4 +-
 src/library/utils/man/PkgUtils.Rd                  |     2 +-
 src/library/utils/man/Question.Rd                  |     2 +-
 src/library/utils/man/REMOVE.Rd                    |     6 +-
 src/library/utils/man/RHOME.Rd                     |     2 +-
 src/library/utils/man/RShowDoc.Rd                  |    14 +-
 src/library/utils/man/RSiteSearch.Rd               |     3 +-
 src/library/utils/man/Rprof.Rd                     |     2 +-
 src/library/utils/man/Rprofmem.Rd                  |     2 +-
 src/library/utils/man/Rscript.Rd                   |     7 +-
 src/library/utils/man/Rtangle.Rd                   |    75 +-
 src/library/utils/man/RweaveLatex.Rd               |    27 +-
 src/library/utils/man/SHLIB.Rd                     |     4 +-
 src/library/utils/man/Sweave.Rd                    |    19 +-
 src/library/utils/man/SweaveSyntConv.Rd            |     2 +-
 src/library/utils/man/SweaveUtils.Rd               |     9 +-
 src/library/utils/man/URLencode.Rd                 |    30 +-
 src/library/utils/man/View.Rd                      |    13 +-
 src/library/utils/man/adist.Rd                     |    12 +-
 src/library/utils/man/alarm.Rd                     |     2 +-
 src/library/utils/man/apropos.Rd                   |    49 +-
 src/library/utils/man/aregexec.Rd                  |     2 +-
 src/library/utils/man/aspell-utils.Rd              |     4 +-
 src/library/utils/man/aspell.Rd                    |    18 +-
 src/library/utils/man/available.packages.Rd        |    35 +-
 src/library/utils/man/bibentry.Rd                  |    68 +-
 src/library/utils/man/browseEnv.Rd                 |    12 +-
 src/library/utils/man/browseURL.Rd                 |    49 +-
 src/library/utils/man/browseVignettes.Rd           |     4 +-
 src/library/utils/man/bug.report.Rd                |    22 +-
 src/library/utils/man/capture.output.Rd            |    29 +-
 src/library/utils/man/changedFiles.Rd              |     2 +-
 src/library/utils/man/chooseBioCmirror.Rd          |    38 +-
 src/library/utils/man/chooseCRANmirror.Rd          |    42 +-
 src/library/utils/man/citEntry.Rd                  |     2 +-
 src/library/utils/man/citation.Rd                  |    27 +-
 src/library/utils/man/cite.Rd                      |    10 +-
 src/library/utils/man/close.socket.Rd              |     9 +-
 src/library/utils/man/combn.Rd                     |    11 +-
 src/library/utils/man/compareVersion.Rd            |     2 +-
 src/library/utils/man/contrib.url.Rd               |     5 +-
 src/library/utils/man/count.fields.Rd              |     2 +-
 src/library/utils/man/create.post.Rd               |     6 +-
 src/library/utils/man/data.Rd                      |     9 +-
 src/library/utils/man/dataentry.Rd                 |     2 +-
 src/library/utils/man/debugcall.Rd                 |    56 +
 src/library/utils/man/debugger.Rd                  |    19 +-
 src/library/utils/man/demo.Rd                      |     2 +-
 src/library/utils/man/download.file.Rd             |   247 +-
 src/library/utils/man/download.packages.Rd         |     8 +-
 src/library/utils/man/edit.Rd                      |     6 +-
 src/library/utils/man/edit.data.frame.Rd           |     6 +-
 src/library/utils/man/example.Rd                   |    18 +-
 src/library/utils/man/file.edit.Rd                 |     6 +-
 src/library/utils/man/filetest.Rd                  |     2 +-
 src/library/utils/man/findLineNum.Rd               |    17 +-
 src/library/utils/man/fix.Rd                       |     2 +-
 src/library/utils/man/flush.console.Rd             |     4 +-
 src/library/utils/man/format.Rd                    |     2 +-
 src/library/utils/man/getAnywhere.Rd               |     2 +-
 src/library/utils/man/getFromNamespace.Rd          |     2 +-
 src/library/utils/man/getParseData.Rd              |    14 +-
 src/library/utils/man/getS3method.Rd               |    12 +-
 src/library/utils/man/glob2rx.Rd                   |     2 +-
 src/library/utils/man/globalVariables.Rd           |     8 +-
 src/library/utils/man/hasName.Rd                   |    42 +
 src/library/utils/man/head.Rd                      |     2 +-
 src/library/utils/man/help.Rd                      |     6 +-
 src/library/utils/man/help.request.Rd              |     8 +-
 src/library/utils/man/help.search.Rd               |    29 +-
 src/library/utils/man/help.start.Rd                |     2 +-
 src/library/utils/man/hsearch-utils.Rd             |    78 +
 src/library/utils/man/install.packages.Rd          |   198 +-
 src/library/utils/man/installed.packages.Rd        |     2 +-
 src/library/utils/man/isS3method.Rd                |    58 +
 src/library/utils/man/isS3stdGen.Rd                |    30 +
 src/library/utils/man/localeToCharset.Rd           |     2 +-
 src/library/utils/man/ls_str.Rd                    |     4 +-
 src/library/utils/man/maintainer.Rd                |     2 +-
 src/library/utils/man/make.packages.html.Rd        |     2 +-
 src/library/utils/man/make.socket.Rd               |     9 +-
 src/library/utils/man/menu.Rd                      |     4 +-
 src/library/utils/man/methods.Rd                   |   133 +-
 src/library/utils/man/mirrorAdmin.Rd               |     2 +-
 src/library/utils/man/modifyList.Rd                |     2 +-
 src/library/utils/man/news.Rd                      |    46 +-
 src/library/utils/man/object.size.Rd               |   110 +-
 src/library/utils/man/package.skeleton.Rd          |     7 +-
 src/library/utils/man/packageDescription.Rd        |     4 +-
 src/library/utils/man/packageStatus.Rd             |     9 +-
 src/library/utils/man/page.Rd                      |     4 +-
 src/library/utils/man/person.Rd                    |    44 +-
 src/library/utils/man/process.events.Rd            |     2 +-
 src/library/utils/man/prompt.Rd                    |     4 +-
 src/library/utils/man/promptData.Rd                |     2 +-
 src/library/utils/man/promptPackage.Rd             |     2 +-
 src/library/utils/man/rcompgen.Rd                  |    36 +-
 src/library/utils/man/read.DIF.Rd                  |    15 +-
 src/library/utils/man/read.fortran.Rd              |     2 +-
 src/library/utils/man/read.fwf.Rd                  |    14 +-
 src/library/utils/man/read.socket.Rd               |     2 +-
 src/library/utils/man/read.table.Rd                |    25 +-
 src/library/utils/man/recover.Rd                   |     2 +-
 src/library/utils/man/relist.Rd                    |     2 +-
 src/library/utils/man/remove.packages.Rd           |     2 +-
 src/library/utils/man/removeSource.Rd              |     7 +-
 src/library/utils/man/roman.Rd                     |    38 +-
 src/library/utils/man/rtags.Rd                     |     8 +-
 src/library/utils/man/savehistory.Rd               |     4 +-
 src/library/utils/man/select.list.Rd               |     4 +-
 src/library/utils/man/sessionInfo.Rd               |    30 +-
 src/library/utils/man/setRepositories.Rd           |    19 +-
 src/library/utils/man/sourceutils.Rd               |     4 +-
 src/library/utils/man/stack.Rd                     |    18 +-
 src/library/utils/man/str.Rd                       |    37 +-
 src/library/utils/man/strcapture.Rd                |    54 +
 src/library/utils/man/summaryRprof.Rd              |    13 +-
 src/library/utils/man/tar.Rd                       |    59 +-
 src/library/utils/man/toLatex.Rd                   |     2 +-
 src/library/utils/man/txtProgressBar.Rd            |     2 +-
 src/library/utils/man/type.convert.Rd              |    11 +-
 src/library/utils/man/unix/COMPILE.Rd              |     8 +-
 src/library/utils/man/unix/LINK.Rd                 |     6 +-
 src/library/utils/man/unix/memory.size.Rd          |     6 +-
 src/library/utils/man/unix/nsl.Rd                  |     2 +-
 src/library/utils/man/untar.Rd                     |    43 +-
 src/library/utils/man/unzip.Rd                     |    21 +-
 src/library/utils/man/update.packages.Rd           |    36 +-
 src/library/utils/man/url.show.Rd                  |     4 +-
 src/library/utils/man/utils-defunct.Rd             |     7 +-
 src/library/utils/man/utils-deprecated.Rd          |     2 +-
 src/library/utils/man/utils-package.Rd             |     2 +-
 src/library/utils/man/vignette.Rd                  |    67 +-
 src/library/utils/man/windows/DLL.version.Rd       |     2 +-
 src/library/utils/man/windows/Rconsole.Rd          |     8 +-
 src/library/utils/man/windows/arrangeWindows.Rd    |   180 +-
 src/library/utils/man/windows/choose.dir.Rd        |     2 +-
 src/library/utils/man/windows/choose.files.Rd      |     2 +-
 src/library/utils/man/windows/clipboard.Rd         |     8 +-
 src/library/utils/man/windows/getWindowsHandle.Rd  |     2 +-
 src/library/utils/man/windows/getWindowsHandles.Rd |   142 +-
 src/library/utils/man/windows/memory.size.Rd       |     2 +-
 src/library/utils/man/windows/readRegistry.Rd      |     6 +-
 src/library/utils/man/windows/setInternet2.Rd      |    55 -
 src/library/utils/man/windows/setWindowTitle.Rd    |     2 +-
 src/library/utils/man/windows/shortPathName.Rd     |     2 +-
 src/library/utils/man/windows/winDialog.Rd         |     2 +-
 src/library/utils/man/windows/winMenus.Rd          |     2 +-
 src/library/utils/man/windows/winProgressBar.Rd    |     2 +-
 src/library/utils/man/windows/winextras.Rd         |    22 +-
 src/library/utils/man/write.table.Rd               |     7 +-
 src/library/utils/man/zip.Rd                       |     7 +-
 src/library/utils/po/R-da.po                       |   127 +-
 src/library/utils/po/R-de.po                       |   354 +-
 src/library/utils/po/R-fa.po                       |   110 +-
 src/library/utils/po/R-fr.po                       |   185 +-
 src/library/utils/po/R-ja.po                       |   199 +-
 src/library/utils/po/R-ko.po                       |   327 +-
 src/library/utils/po/R-pl.po                       |  3770 +-
 src/library/utils/po/R-pt_BR.po                    |   111 +-
 src/library/utils/po/R-ru.po                       |   438 +-
 src/library/utils/po/R-tr.po                       |   109 +-
 src/library/utils/po/R-utils.pot                   |   102 +-
 src/library/utils/po/R-zh_CN.po                    |   169 +-
 src/library/utils/po/de.po                         |   124 +-
 src/library/utils/po/ko.po                         |   175 +-
 src/library/utils/po/pl.po                         |   331 +-
 src/library/utils/po/utils.pot                     |   117 +-
 src/library/utils/src/Makefile.in                  |     3 +-
 src/library/utils/src/Makefile.win                 |     7 +-
 src/library/utils/src/init.c                       |    14 +-
 src/library/utils/src/io.c                         |    37 +-
 src/library/utils/src/size.c                       |    12 +-
 src/library/utils/src/sock.c                       |     2 +-
 src/library/utils/src/stubs.c                      |    11 +-
 src/library/utils/src/utils.c                      |     8 +-
 src/library/utils/src/utils.h                      |     2 +-
 src/library/utils/src/windows/dataentry.c          |     5 +-
 src/library/utils/src/windows/dialogs.c            |     3 +-
 src/library/utils/src/windows/registry.c           |     2 +-
 src/library/utils/src/windows/util.c               |    25 +-
 src/library/utils/src/windows/widgets.c            |     9 +-
 src/library/utils/tests/Sweave-tst.R               |     4 +-
 src/library/utils/tests/swv-keepSrc-1.Rnw          |     3 +-
 src/library/utils/vignettes/Sweave.Rnw             |     4 +-
 src/main/CommandLineArgs.c                         |     4 +-
 src/main/Makefile.in                               |    49 +-
 src/main/Makefile.win                              |    60 +-
 src/main/RBufferUtils.h                            |     2 +-
 src/main/RNG.c                                     |    63 +-
 src/main/Rcomplex.h                                |    61 +
 src/main/Rdynload.c                                |   138 +-
 src/main/Renviron.c                                |    10 +-
 src/main/Rmain.c                                   |     5 +-
 src/main/Rstrptime.h                               |   102 +-
 src/main/agrep.c                                   |   142 +-
 src/main/alloca.c                                  |     2 +-
 src/main/apply.c                                   |   196 +-
 src/main/arithmetic.c                              |   633 +-
 src/main/arithmetic.h                              |    39 +-
 src/main/array.c                                   |  1093 +-
 src/main/attrib.c                                  |   511 +-
 src/main/basedecl.h                                |    10 +-
 src/main/bind.c                                    |   298 +-
 src/main/builtin.c                                 |   109 +-
 src/main/character.c                               |   852 +-
 src/main/coerce.c                                  |   329 +-
 src/main/colors.c                                  |     6 +-
 src/main/complex.c                                 |   162 +-
 src/main/connections.c                             |   432 +-
 src/main/context.c                                 |   282 +-
 src/main/contour-common.h                          |     6 +-
 src/main/cum.c                                     |    56 +-
 src/main/datetime.c                                |   246 +-
 src/main/datetime.h                                |     4 +-
 src/main/dcf.c                                     |    52 +-
 src/main/debug.c                                   |   103 +-
 src/main/deparse.c                                 |   279 +-
 src/main/devices.c                                 |    33 +-
 src/main/dotcode.c                                 |   606 +-
 src/main/dounzip.c                                 |  1197 +-
 src/main/dstruct.c                                 |     4 +-
 src/main/duplicate.c                               |   240 +-
 src/main/duplicate.h                               |    70 +
 src/main/edit.c                                    |    11 +-
 src/main/engine.c                                  |   220 +-
 src/main/envir.c                                   |   657 +-
 src/main/errors.c                                  |   575 +-
 src/main/eval.c                                    |  3733 +-
 src/main/format.c                                  |    67 +-
 src/main/g_alab_her.c                              |   980 +
 src/main/g_cntrlify.c                              |   714 +
 src/{modules/vfonts => main}/g_cntrlify.h          |     0
 src/{modules/vfonts => main}/g_control.h           |     0
 src/{modules/vfonts => main}/g_extern.h            |     0
 src/{modules/vfonts => main}/g_fontdb.c            |     0
 src/{modules/vfonts => main}/g_her_glyph.c         |     0
 src/{modules/vfonts => main}/g_her_metr.h          |     0
 src/{modules/vfonts => main}/g_jis.h               |     0
 src/main/gevents.c                                 |   184 +-
 src/main/gram-ex.c                                 |     4 +-
 src/main/gram.c                                    |    81 +-
 src/main/gram.y                                    |    81 +-
 src/main/graphics.c                                |     2 +-
 src/main/grep.c                                    |   675 +-
 src/main/gzio.h                                    |    18 +-
 src/main/identical.c                               |   129 +-
 src/main/inlined.c                                 |     2 +-
 src/main/inspect.c                                 |    35 +-
 src/main/internet.c                                |    98 +-
 src/main/iosupport.c                               |     4 +-
 src/main/lapack.c                                  |     2 +-
 src/main/list.c                                    |     2 +-
 src/main/localecharset.c                           |    21 +-
 src/main/logic.c                                   |   214 +-
 src/main/main.c                                    |   217 +-
 src/main/mapply.c                                  |     8 +-
 src/main/match.c                                   |   223 +-
 src/main/memory.c                                  |   533 +-
 src/main/mkdtemp.c                                 |     8 +-
 src/main/names.c                                   |   375 +-
 src/main/objects.c                                 |   811 +-
 src/main/options.c                                 |   129 +-
 src/main/paste.c                                   |    66 +-
 src/main/platform.c                                |   778 +-
 src/main/plot.c                                    |    17 +-
 src/main/plot3d.c                                  |     4 +-
 src/main/plotmath.c                                |    28 +-
 src/main/print.c                                   |   111 +-
 src/main/printarray.c                              |    21 +-
 src/main/printutils.c                              |   224 +-
 src/main/printvector.c                             |    19 +-
 src/main/qsort-body.c                              |     2 +-
 src/main/qsort.c                                   |     2 +-
 src/main/radixsort.c                               |  1915 +
 src/main/random.c                                  |    83 +-
 src/main/raw.c                                     |    22 +-
 src/main/registration.c                            |    13 +-
 src/main/relop.c                                   |   493 +-
 src/main/rlocale.c                                 |   112 +-
 src/main/rlocale_data.h                            |  1023 +-
 src/main/saveload.c                                |    56 +-
 src/main/scan.c                                    |    41 +-
 src/main/seq.c                                     |   729 +-
 src/main/serialize.c                               |   195 +-
 src/main/sort.c                                    |   153 +-
 src/main/source.c                                  |    65 +-
 src/main/split-incl.c                              |    67 +
 src/main/split.c                                   |    85 +-
 src/main/sprintf.c                                 |    22 +-
 src/main/startup.c                                 |    47 +-
 src/main/strncasecmp.c                             |     2 +-
 src/main/subassign.c                               |   474 +-
 src/main/subscript.c                               |   241 +-
 src/main/subset.c                                  |   244 +-
 src/main/summary.c                                 |   217 +-
 src/main/sysutils.c                                |   261 +-
 src/main/times.c                                   |    35 +-
 src/main/unique.c                                  |   334 +-
 src/main/util.c                                    |   381 +-
 src/main/version.c                                 |     7 +-
 src/main/vfonts.c                                  |    99 -
 src/main/xxxpr.f                                   |     2 +-
 src/modules/Makefile.in                            |     9 +-
 src/modules/Makefile.win                           |     4 +-
 src/modules/X11/Makefile.in                        |     8 +-
 src/modules/X11/bitmap.h                           |     2 +-
 src/modules/X11/dataentry.c                        |    12 +-
 src/modules/X11/devX11.c                           |    64 +-
 src/modules/X11/devX11.h                           |     2 +-
 src/modules/X11/rbitmap.c                          |    38 +-
 src/modules/X11/rlogo_icon.h                       |  7691 ++-
 src/modules/X11/rotated.c                          |   323 +-
 src/modules/internet/Makefile.in                   |     7 +-
 src/modules/internet/Makefile.win                  |    38 +-
 src/modules/internet/Rhttpd.c                      |    31 +-
 src/modules/internet/Rsock.c                       |    33 +-
 src/modules/internet/dllversion.rc                 |     2 +-
 src/modules/internet/internet.c                    |   751 +-
 src/modules/internet/libcurl.c                     |   907 +
 src/modules/internet/nanoftp.c                     |    49 +-
 src/modules/internet/nanohttp.c                    |    70 +-
 src/modules/internet/sock.c                        |    43 +-
 src/modules/internet/sock.h                        |     2 +-
 src/modules/internet/sockconn.c                    |    23 +-
 src/modules/lapack/LICENSE                         |     6 +-
 src/modules/lapack/Lapack.c                        |    82 +-
 src/modules/lapack/Lapack.h                        |     2 +-
 src/modules/lapack/Makefile.in                     |     4 +-
 src/modules/lapack/Makefile.win                    |    10 +-
 src/modules/lapack/R.patch                         |   166 +-
 src/modules/lapack/README                          |   192 +-
 src/modules/lapack/Rlapackrc.rc                    |     2 +-
 src/modules/lapack/cmplx.f                         | 63362 ++++++++++++-------
 src/modules/lapack/dlamch.f                        |    24 +-
 src/modules/lapack/dlapack.f                       | 21232 ++++---
 src/modules/lapack/dllversion.rc                   |     2 +-
 src/modules/lapack/init_win.c                      |     2 +-
 src/modules/lapack/vecLibg95c.c                    |     2 +-
 src/modules/vfonts/Makefile.in                     |    81 -
 src/modules/vfonts/Makefile.win                    |    30 -
 src/modules/vfonts/dllversion.rc                   |    26 -
 src/modules/vfonts/g_alab_her.c                    |   980 -
 src/modules/vfonts/g_cntrlify.c                    |   714 -
 src/nmath/Makefile.in                              |     6 +-
 src/nmath/Makefile.win                             |     8 +-
 src/nmath/bd0.c                                    |     4 +-
 src/nmath/bessel.h                                 |     2 +-
 src/nmath/bessel_i.c                               |     6 +-
 src/nmath/bessel_j.c                               |    37 +-
 src/nmath/bessel_k.c                               |     6 +-
 src/nmath/bessel_y.c                               |    33 +-
 src/nmath/beta.c                                   |    11 +-
 src/nmath/chebyshev.c                              |     2 +-
 src/nmath/choose.c                                 |     2 +-
 src/nmath/cospi.c                                  |    30 +-
 src/nmath/d1mach.c                                 |     4 +-
 src/nmath/dbeta.c                                  |    12 +-
 src/nmath/dbinom.c                                 |     7 +-
 src/nmath/dcauchy.c                                |     2 +-
 src/nmath/dchisq.c                                 |     2 +-
 src/nmath/dexp.c                                   |     2 +-
 src/nmath/df.c                                     |     5 +-
 src/nmath/dgamma.c                                 |     2 +-
 src/nmath/dgeom.c                                  |     2 +-
 src/nmath/dhyper.c                                 |     2 +-
 src/nmath/dlnorm.c                                 |     2 +-
 src/nmath/dlogis.c                                 |     2 +-
 src/nmath/dnbeta.c                                 |     6 +-
 src/nmath/dnbinom.c                                |    26 +-
 src/nmath/dnchisq.c                                |    15 +-
 src/nmath/dnf.c                                    |     5 +-
 src/nmath/dnorm.c                                  |     4 +-
 src/nmath/dnt.c                                    |    19 +-
 src/nmath/dpois.c                                  |    18 +-
 src/nmath/dpq.h                                    |    10 +-
 src/nmath/dt.c                                     |     7 +-
 src/nmath/dunif.c                                  |     2 +-
 src/nmath/dweibull.c                               |     2 +-
 src/nmath/expm1.c                                  |     7 +-
 src/nmath/fmax2.c                                  |     2 +-
 src/nmath/fmin2.c                                  |     2 +-
 src/nmath/fprec.c                                  |     4 +-
 src/nmath/fround.c                                 |     6 +-
 src/nmath/fsign.c                                  |     2 +-
 src/nmath/ftrunc.c                                 |     2 +-
 src/nmath/gamma.c                                  |     2 +-
 src/nmath/gammalims.c                              |     2 +-
 src/nmath/i1mach.c                                 |     2 +-
 src/nmath/imax2.c                                  |     2 +-
 src/nmath/imin2.c                                  |     2 +-
 src/nmath/lbeta.c                                  |     7 +-
 src/nmath/lgamma.c                                 |     2 +-
 src/nmath/lgammacor.c                              |     2 +-
 src/nmath/log1p.c                                  |     2 +-
 src/nmath/mlutils.c                                |     2 +-
 src/nmath/nmath.h                                  |    28 +-
 src/nmath/nmath2.h                                 |    30 +
 src/nmath/pbeta.c                                  |    11 +-
 src/nmath/pbinom.c                                 |     8 +-
 src/nmath/pcauchy.c                                |     2 +-
 src/nmath/pchisq.c                                 |     2 +-
 src/nmath/pexp.c                                   |    14 +-
 src/nmath/pf.c                                     |     2 +-
 src/nmath/pgamma.c                                 |    49 +-
 src/nmath/pgeom.c                                  |     2 +-
 src/nmath/phyper.c                                 |     2 +-
 src/nmath/plnorm.c                                 |     2 +-
 src/nmath/plogis.c                                 |     6 +-
 src/nmath/pnbinom.c                                |    17 +-
 src/nmath/pnchisq.c                                |    30 +-
 src/nmath/pnf.c                                    |     2 +-
 src/nmath/pnorm.c                                  |     2 +-
 src/nmath/pnt.c                                    |    25 +-
 src/nmath/polygamma.c                              |    12 +-
 src/nmath/ppois.c                                  |     2 +-
 src/nmath/pt.c                                     |     4 +-
 src/nmath/ptukey.c                                 |     2 +-
 src/nmath/punif.c                                  |     2 +-
 src/nmath/pweibull.c                               |    13 +-
 src/nmath/qbeta.c                                  |   629 +-
 src/nmath/qbinom.c                                 |     2 +-
 src/nmath/qcauchy.c                                |     3 +-
 src/nmath/qchisq.c                                 |     2 +-
 src/nmath/qexp.c                                   |     2 +-
 src/nmath/qf.c                                     |     7 +-
 src/nmath/qgamma.c                                 |    11 +-
 src/nmath/qgeom.c                                  |    14 +-
 src/nmath/qhyper.c                                 |     2 +-
 src/nmath/qlnorm.c                                 |     2 +-
 src/nmath/qlogis.c                                 |     2 +-
 src/nmath/qnbeta.c                                 |     2 +-
 src/nmath/qnbinom.c                                |    14 +-
 src/nmath/qnchisq.c                                |    19 +-
 src/nmath/qnf.c                                    |     2 +-
 src/nmath/qnorm.c                                  |     2 +-
 src/nmath/qnt.c                                    |     9 +-
 src/nmath/qpois.c                                  |     9 +-
 src/nmath/qt.c                                     |     2 +-
 src/nmath/qtukey.c                                 |     2 +-
 src/nmath/qunif.c                                  |     2 +-
 src/nmath/qweibull.c                               |     2 +-
 src/nmath/rbeta.c                                  |     8 +-
 src/nmath/rbinom.c                                 |     2 +-
 src/nmath/rcauchy.c                                |     2 +-
 src/nmath/rchisq.c                                 |     2 +-
 src/nmath/rexp.c                                   |     2 +-
 src/nmath/rf.c                                     |     2 +-
 src/nmath/rgamma.c                                 |    18 +-
 src/nmath/rgeom.c                                  |     5 +-
 src/nmath/rhyper.c                                 |   190 +-
 src/nmath/rlnorm.c                                 |     2 +-
 src/nmath/rlogis.c                                 |     2 +-
 src/nmath/rmultinom.c                              |     4 +-
 src/nmath/rnbinom.c                                |    12 +-
 src/nmath/rnchisq.c                                |     7 +-
 src/nmath/rnorm.c                                  |     2 +-
 src/nmath/rpois.c                                  |     2 +-
 src/nmath/rt.c                                     |     2 +-
 src/nmath/runif.c                                  |     2 +-
 src/nmath/rweibull.c                               |     2 +-
 src/nmath/sexp.c                                   |     2 +-
 src/nmath/sign.c                                   |     2 +-
 src/nmath/signrank.c                               |     2 +-
 src/nmath/snorm.c                                  |     2 +-
 src/nmath/standalone/Makefile.in                   |     5 +-
 src/nmath/standalone/Makefile.win                  |    10 +-
 src/nmath/standalone/sunif.c                       |     2 +-
 src/nmath/standalone/test.c                        |     2 +-
 src/nmath/stirlerr.c                               |     2 +-
 src/nmath/toms708.c                                |   710 +-
 src/nmath/wilcox.c                                 |     2 +-
 src/scripts/BATCH                                  |     4 +-
 src/scripts/COMPILE                                |     4 +-
 src/scripts/LINK                                   |     4 +-
 src/scripts/R.sh.in                                |    22 +-
 src/scripts/Rcmd.in                                |     2 +-
 src/scripts/Rd2pdf                                 |     2 +-
 src/scripts/config                                 |   106 +-
 src/scripts/f77_f2c.in                             |     6 +-
 src/scripts/javareconf.in                          |    15 +-
 src/unix/Makefile.in                               |     9 +-
 src/unix/Rembedded.c                               |     2 +-
 src/unix/Rscript.c                                 |    12 +-
 src/unix/Runix.h                                   |     2 +-
 src/unix/X11.c                                     |    32 +-
 src/unix/dynload.c                                 |    17 +-
 src/unix/hpdlfcn.c                                 |     2 +-
 src/unix/sys-std.c                                 |   207 +-
 src/unix/sys-unix.c                                |    56 +-
 src/unix/system.c                                  |   154 +-
 tests/CRANtools.R                                  |    21 +
 tests/Embedding/index.html                         |    24 +-
 tests/Examples/Makefile.in                         |     8 +-
 tests/Examples/Makefile.win                        |    12 +-
 tests/Examples/datasets-Ex.Rout.save               |    51 +-
 tests/Examples/grDevices-Ex.Rout.save              |   147 +-
 tests/Examples/graphics-Ex.Rout.save               |    88 +-
 tests/Examples/grid-Ex.Rout.save                   |    19 +-
 tests/Examples/splines-Ex.Rout.save                |    18 +-
 tests/Examples/stats-Ex.Rout.save                  |  1011 +-
 tests/Examples/stats4-Ex.Rout.save                 |     8 +-
 tests/Examples/tools-Ex.Rout.save                  |   258 +-
 tests/Makefile.common                              |    57 +-
 tests/Makefile.in                                  |    18 +-
 tests/Makefile.install                             |    13 +-
 tests/Makefile.win                                 |    25 +-
 tests/PCRE.R                                       |    82 +
 tests/Pkgs/exNSS4/DESCRIPTION                      |     8 +-
 tests/Pkgs/exNSS4/NAMESPACE                        |     4 +
 tests/Pkgs/exNSS4/R/nss4.R                         |    13 +
 tests/Pkgs/pkgA                                    |     1 +
 tests/Pkgs/pkgA/DESCRIPTION                        |    13 -
 tests/Pkgs/pkgA/NAMESPACE                          |    12 -
 tests/Pkgs/pkgA/R/pkgA.R                           |     5 -
 tests/Pkgs/pkgB/DESCRIPTION                        |     1 -
 tests/Pkgs/xDir/pkg/DESCRIPTION                    |    14 +
 tests/Pkgs/xDir/pkg/NAMESPACE                      |    16 +
 tests/Pkgs/xDir/pkg/R/pkgA.R                       |    10 +
 tests/Pkgs/xDir/pkg/data/nil.R                     |     1 +
 tests/Pkgs/xDir/pkg/man/f.Rd                       |    25 +
 tests/R-intro.Rout.save                            |    25 +-
 tests/README                                       |    23 +-
 tests/any-all.Rout.save                            |     6 +-
 tests/arith-true.Rout.save                         |     8 +-
 tests/arith.Rout.save                              |     6 +-
 tests/array-subset.Rout.save                       |   104 -
 tests/complex.R                                    |    34 +-
 tests/complex.Rout.save                            |    44 +-
 tests/d-p-q-r-tests.R                              |   434 +-
 tests/d-p-q-r-tests.Rout.save                      |   612 +-
 tests/datasets.Rout.save                           |    44 +-
 tests/datetime.R                                   |     2 +-
 tests/datetime.Rout.save                           |     8 +-
 tests/datetime2.Rout.save                          |     6 +-
 tests/demos.Rout.save                              |    14 +-
 tests/eval-etc.R                                   |    32 +
 tests/eval-etc.Rout.save                           |    46 +-
 tests/iec60559.Rout.save                           |     6 +-
 tests/internet.R                                   |    80 +-
 tests/internet.Rout.save                           |   129 +-
 tests/internet2.R                                  |    55 +
 tests/isas-tests.Rout.save                         |    23 +-
 tests/lapack.Rout.save                             |     7 +-
 tests/libcurl.R                                    |   109 +
 tests/lm-tests.Rout.save                           |     6 +-
 tests/method-dispatch.Rout.save                    |     6 +-
 tests/no-segfault.Rin                              |    26 +-
 tests/ok-errors.R                                  |     6 +-
 tests/ok-errors.Rout.save                          |    14 +-
 tests/p-qbeta-strict-tst.R                         |   411 +
 tests/p-r-random-tests.Rout.save                   |     8 +-
 tests/primitives.R                                 |    34 +-
 tests/print-tests.Rout.save                        |     8 +-
 tests/r-strict-tst.R                               |    57 +
 tests/reg-BLAS.R                                   |   121 +
 tests/reg-IO.Rout.save                             |     6 +-
 tests/reg-IO2.Rout.save                            |     8 +-
 tests/reg-S4-examples.R                            |   357 +
 tests/reg-S4.R                                     |   267 +-
 tests/reg-S4.Rout.save                             |   351 +-
 tests/reg-examples1.R                              |    69 +-
 tests/reg-examples2.R                              |    43 +-
 tests/reg-examples3.R                              |    35 +-
 tests/reg-examples3.Rout.save                      |   371 +-
 tests/reg-packages.R                               |   150 +-
 tests/reg-plot.R                                   |    11 +-
 tests/reg-plot.Rout.save                           |   182 -
 tests/reg-plot.pdf.save                            |   116 +-
 tests/reg-tests-1a.R                               |    56 +-
 tests/reg-tests-1b.R                               |    31 +-
 tests/reg-tests-1c.R                               |  1188 +-
 tests/reg-tests-1d.R                               |   730 +
 tests/reg-tests-2.R                                |   165 +-
 tests/reg-tests-2.Rout.save                        |   514 +-
 tests/reg-tests-3.R                                |    70 +-
 tests/reg-tests-3.Rout.save                        |   137 +-
 tests/simple-true.R                                |    22 +
 tests/simple-true.Rout.save                        |    44 +-
 tests/test-system.Rout.save                        |    11 +-
 tools/GETCONFIG                                    |     9 +-
 tools/README                                       |     6 +-
 tools/config.guess                                 |   180 +-
 tools/config.sub                                   |    86 +-
 tools/ltmain.sh                                    |  8139 ++-
 3845 files changed, 263843 insertions(+), 267810 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index e69de29..f82f7f8 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -0,0 +1,8 @@
+	* News are in
+	  - the source    doc/NEWS.Rd
+	  - installed R's doc/NEWS and doc/NEWS.pdf
+
+	* Details about single subversion (svn) commits are available, e.g., by
+
+	svn log https://svn.r-project.org/R/trunk
+
diff --git a/INSTALL b/INSTALL
index cfdca30..08fbc30 100644
--- a/INSTALL
+++ b/INSTALL
@@ -12,7 +12,7 @@ and Administration Manual', an HTML copy of which is available as file
 if you are impatient, read on but please refer to the manual to
 resolve any problems.  (If you obtained R using Subversion, the manual
 is at doc/manual/R-admin.texi and can be read online at
-http://cran.r-project.org/manuals.html.)
+https://CRAN.R-project.org/manuals.html.)
 
 
 SIMPLE COMPILATION
diff --git a/Makeconf.in b/Makeconf.in
index 882a6d5..0e1b824 100644
--- a/Makeconf.in
+++ b/Makeconf.in
@@ -17,6 +17,10 @@ CC = @CC@
 CFLAGS = @CFLAGS@ @LTO@
 CPICFLAGS = @CPICFLAGS@
 CPPFLAGS = @CPPFLAGS@
+CURL_CPPFLAGS = @CURL_CPPFLAGS@
+CURL_LIBS = @CURL_LIBS@
+## in case we want to link with this for UBSAN checks
+CXX = @CXX@
 DEFS = @DEFS@ @R_DEFS@
 DISTDIR_TAR_EXCLUDE = --exclude=.svn --exclude=Makefile --exclude="*.o" --exclude="*$(SHLIB_EXT)" --exclude="*~"
 DYLIB_EXT = @DYLIB_EXT@
@@ -30,6 +34,7 @@ ECHO_N = @ECHO_N@
 ECHO_T = @ECHO_T@
 FFLAGS = @FFLAGS@ @LTO@
 FLIBS = @FLIBS@
+## needed for some earlier Solaris compilers
 FLIBS_IN_SO = @FLIBS_IN_SO@
 FPICFLAGS = @FPICFLAGS@
 F77 = @F77@
@@ -46,6 +51,10 @@ LIBM = @LIBM@
 LIBR0 = @LIBR0@
 LIBR1 = @LIBR1@
 LIBR = @LIBR0@ @LIBR1@
+## These are the libs which the final R.bin/libR is linked against.
+## Many of these used to be optional: ICU libs still are.
+## There may be platform-specific ones, e.g.
+## -lrt -ldl on Linux, -lnsl -lsocket -lrt -lsunmath -ldl -liconv on Solaris.
 LIBS = @LIBS@
 LIBnn = @LIBnn@
 LIBTOOL = @LIBTOOL@
@@ -60,11 +69,13 @@ MAIN_LINK = $(MAIN_LD) $(MAIN_LDFLAGS) $(LIBR0) $(LDFLAGS)
 MKINSTALLDIRS = @R_SHELL@ $(top_srcdir)/src/scripts/mkinstalldirs.in
 NOTANGLE = @NOTANGLE@
 R_ARCH = @R_ARCH@
+R_DYLIB_EXT = @R_DYLIB_EXT@
 R_FRAMEWORK_DIR = $(prefix)/R.framework
 R_GZIPCMD = @R_GZIPCMD@
 ## needed for AIX only
 @USE_EXPORTFILES_TRUE@ R_HOME = $(top_builddir)
 R_OPENMP_CFLAGS = @R_OPENMP_CFLAGS@
+## if ever used, need to check that this is compatible with C OpenMP
 R_OPENMP_FFLAGS = @R_OPENMP_FFLAGS@
 R_OSTYPE = @R_OSTYPE@
 R_PKGS = $(R_PKGS_BASE) @USE_RECOMMENDED_PACKAGES_TRUE@ $(R_PKGS_RECOMMENDED)
@@ -96,6 +107,7 @@ YACC = @YACC@
 
 ALL_CFLAGS = $(R_XTRA_CFLAGS) $(R_OPENMP_CFLAGS) $(MAIN_CFLAGS) $(CFLAGS)
 ALL_CPPFLAGS = $(R_XTRA_CPPFLAGS) $(CPPFLAGS) $(DEFS)
+## R_OPENMP_FFLAGS should not really be here: see above
 ALL_FFLAGS = $(R_XTRA_FFLAGS) $(R_OPENMP_FFLAGS) $(MAIN_FFLAGS) $(FFLAGS)
 ALL_CFLAGS_LO = $(R_XTRA_CFLAGS) $(R_OPENMP_CFLAGS) $(CPICFLAGS) $(SHLIB_CFLAGS) $(CFLAGS)
 ALL_FFLAGS_LO = $(R_XTRA_FFLAGS) $(R_OPENMP_FFLAGS) $(FPICFLAGS) $(SHLIB_FFLAGS) $(FFLAGS)
@@ -126,7 +138,7 @@ rsharedir = @rsharedir@
 rincludedir = @rincludedir@
 rdocdir = @rdocdir@
 
-## Overrides for installing R as a framework (MacOS X).
+## Overrides for installing R as a framework (macOS).
 @WANT_R_FRAMEWORK_TRUE at FW_VERSION = @FW_VERSION@
 @WANT_R_FRAMEWORK_TRUE at rhome = $(R_FRAMEWORK_DIR)/Versions/$(FW_VERSION)/Resources
 @WANT_R_FRAMEWORK_TRUE at bindir = $(rhome)
diff --git a/Makefile.in b/Makefile.in
index 44b0a3b..505effd 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -9,6 +9,8 @@ top_builddir = .
 
 include $(top_builddir)/Makeconf
 
+GIT = `if [ -d "$(top_builddir)/.git" ]; then echo "git"; fi`
+
 distdir = $(PACKAGE)-$(VERSION)
 INSTFILES = COPYING
 NON_SVN_INSTFILES = SVN-REVISION
@@ -38,6 +40,7 @@ ACINCLUDE_DEPENDENCIES = \
 	m4/cxx_11.m4 \
 	m4/gettext.m4 m4/gettext-lib.m4 \
 	m4/libtool.m4 m4/ltoptions.m4 m4/ltversion.m4 m4/ltsugar.m4 m4/lt~obsolete.m4 \
+	m4/openmp.m4 \
 	m4/stat-time.m4
 CONFIGURE_DEPENDENCIES = $(srcdir)/VERSION
 config.status: $(srcdir)/configure
@@ -80,8 +83,8 @@ vignettes: stamp-recommended
 ## This needs packages built, hence 'R' dependence on 'javaconf'
 ## javareconf gets remade often.
 stamp-java : etc/javaconf $(srcdir)/src/scripts/javareconf.in
-	@$(ECHO) "configuring Java ..."
-	@-bin/R CMD javareconf
+ at WANT_JAVA_TRUE@	@$(ECHO) "configuring Java ..."
+ at WANT_JAVA_TRUE@	@-bin/R CMD javareconf
 	@touch stamp-java
 
 javaconf: R
@@ -104,7 +107,7 @@ svnonly:
 	@if test ! -f "$(srcdir)/doc/FAQ" || test -f non-tarball ; then \
 	  (cd doc/manual && $(MAKE) front-matter html-non-svn) ; \
 	  touch non-tarball ; \
-	  (cd $(srcdir); LC_ALL=C TZ=GMT svn info || $(ECHO) "Revision: -99") 2> /dev/null \
+	  (cd $(srcdir); LC_ALL=C TZ=GMT $(GIT) svn info || $(ECHO) "Revision: -99") 2> /dev/null \
 	    | sed -n -e '/^Revision/p' -e '/^Last Changed Date/'p \
 	    | cut -d' ' -f1,2,3,4 > SVN-REVISION-tmp ; \
 	  if test "`cat SVN-REVISION-tmp`" = "Revision: -99"; then \
@@ -121,14 +124,14 @@ svnonly:
 	  fi \
 	fi
 
- at WANT_R_STATIC_FALSE@libR_la = libR$(DYLIB_EXT)
+ at WANT_R_STATIC_FALSE@libR_la = libR$(R_DYLIB_EXT)
 @WANT_R_STATIC_TRUE at libR_la = libR.a
 install-libR:
 	@if test -f lib$(R_ARCH)/$(libR_la); then $(MAKE) install-libR-exists; fi
 install-libR-exists:
 	@$(MKINSTALLDIRS) "$(DESTDIR)${libdir}"
 	@$(INSTALL_DATA) -m755 lib$(R_ARCH)/$(libR_la) "$(DESTDIR)${libdir}"
-uninstall-libR: 
+uninstall-libR:
 	@rm -f "$(DESTDIR)${libdir}/$(libR_la)"
 
 installdirs:
@@ -142,7 +145,7 @@ uninstall:
 	@rm -rf "$(DESTDIR)$(Rexecbindir)" "$(DESTDIR)$(rhome)/lib"
 	@rmdir "$(DESTDIR)$(rhome)" 2>/dev/null \
           || $(ECHO) "  dir $(DESTDIR)$(rhome) not removed"
-	@rm -f "$(DESTDIR)${libdir}/libR$(DYLIB_EXT)"
+	@rm -f "$(DESTDIR)${libdir}/libR$(R_DYLIB_EXT)"
 
 mostlyclean: clean
 clean:
diff --git a/README b/README
index 06d72a7..04cf630 100644
--- a/README
+++ b/README
@@ -36,7 +36,7 @@ presentations.
 A package specification allows the production of loadable modules for
 specific purposes, and several thousand contributed packages are made
 available through the CRAN sites (see
-http://CRAN.R-project.org/mirrors.html for the current members).
+https://CRAN.R-project.org/mirrors.html for the current members).
 
 
 2. HISTORY
diff --git a/SVN-REVISION b/SVN-REVISION
index 5ce084d..4d42370 100644
--- a/SVN-REVISION
+++ b/SVN-REVISION
@@ -1,2 +1,2 @@
-Revision: 66913
-Last Changed Date: 2014-10-31
+Revision: 72570
+Last Changed Date: 2017-04-21
diff --git a/VERSION b/VERSION
index ef538c2..1809198 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-3.1.2
+3.4.0
diff --git a/VERSION-NICK b/VERSION-NICK
index 1de7bfb..8ee68df 100644
--- a/VERSION-NICK
+++ b/VERSION-NICK
@@ -1 +1 @@
-Pumpkin Helmet
+You Stupid Darkness
diff --git a/config.site b/config.site
index 6506126..a26dd8e 100644
--- a/config.site
+++ b/config.site
@@ -40,9 +40,9 @@
 
 ## The command which runs the C compiler.
 ## If unspecified, a search is made for gcc and cc (in that order).
-## To override this choice, specify the name of the command which runs
-## the compiler here, for example 'c99'.
-## It is also convenient to set the architecture here, e.g. 'gcc -m32'.
+## To override this choice, specify the name or path of the command
+## which runs the compiler, for example 'c99'.
+## It is also necessary to set the architecture here, e.g. 'gcc -m32'.
 ## CC=
 
 ## Debugging and optimization options for the C compiler.
@@ -76,8 +76,6 @@
 ## g77 f77 xlf frt pgf77 cf77 fort77 fl32 af77
 ## On HPUX fort77 is the POSIX compliant FORTRAN compiler, and replaces
 ## f77 in the search list.
-## If CC is gcc, first preference is given to the matching FORTRAN
-## compiler (g77 or gfortran).
 ## If none of these is found, R cannot be compiled.
 ## F77=
 
@@ -102,12 +100,12 @@
 
 ## The command to be used to load the main R binary.
 ## This is usually the FORTRAN 77 or C compiler, but the automatic
-## choice can be overriden by means of this variable.
+## choice can be overridden by means of this variable.
 ## MAIN_LD=
 
 ## The flags which are necessary for loading main program which will
 ## load DLLs at runtime.  HP-UX and Linux-elf are examples of platforms
-## which use this.  These platforms are already taken care of by
+## which use this.  Those platforms are already taken care of by
 ## configure, and anything set here will be in addition unless MAIN_LD
 ## is given.
 ## For example, one can set flags for profiling here.
@@ -155,10 +153,12 @@
 ## LDFLAGS=
 
 
-## The command which runs the C++ compiler.  It not specified, configure
+## The command which runs the C++ compiler.
+## This is optional, for use in packages.
+## If not specified, configure
 ## uses the values of the environment variables 'CXX' or 'CCC' if set,
-## and then looks under the names 'c++', 'g++', 'gcc', 'CC', 'cxx', and
-## 'cc++' (in that order).
+## and then looks under the names 'c++', 'g++', 'CC' and more OS-specific
+## names (from autoconf).
 ## CXX=
 
 ## Options for the C++ compiler.
@@ -169,10 +169,14 @@
 ## an attempt is made to automatically detect the correct value.
 ## CXXPICFLAGS=
 
+## Option to specify the default C++ standard, 
+## e.g. -std=c++98 or -std=gnu++98
+## CXXSTD=
+
 ## The command to be used to load shared objects which contain object
 ## files from the C++ compiler.  This is usually the C++ compiler/linker,
 ## but the automatic choice can be overridden by means of this
-## variable.
+## variable.  (Include $(CXXSTD) if set.)
 ## SHLIB_CXXLD=
 
 ## Any special flags which are required when creating shared objects
@@ -205,7 +209,7 @@
 ## Default setting for the R_BROWSER env variable
 ## If unset configure searches in turn for (currently)
 ## firefox mozilla galeon opera xdg-open kfmclient gnome-moz-remote open
-## and uses the full path.
+## and uses the full path of the first it finds.
 ## R_BROWSER=
 
 ## BLAS and LAPACK settings
@@ -219,12 +223,12 @@
 ## it is not used if the BLAS already contains LAPACK.
 ## LAPACK_LIBS=
 
-## Make name.
+## Make name or path
 ## Set this if you want to use a make by another name.
 ## For example, if your GNU make is called 'gmake', use 'MAKE=gmake'.
 ## MAKE=
 
-## Tar name
+## Tar name or path
 ## Set this to prefer a tar which has the capability to automagically
 ## read compressed archives.  The default is to choose 'gtar' or
 ## 'gnutar'(normally GNU tar) then 'tar'.
@@ -235,29 +239,117 @@
 
 ## Dynamic library path
 ## This is be default created from libraries added to LIBS.
-## Used for DYLD_FALLBACK_LIBRARY_PATH on OS X and LD_LIBRARY_PATH elsewhere.
+## Used for DYLD_FALLBACK_LIBRARY_PATH on macOS and LD_LIBRARY_PATH elsewhere.
 ## Allow user to override.
 ## R_LD_LIBRARY_PATH=
 
+## C++98 compiler, optional for use in packages.
+## Introduced in R 3.4.0
+## The command which runs the C++98 compiler: defaults to $(CXX), but
+## empty if that (plus standard) cannot compile the tested C++98 code.
+## CXX98=
+
+## The 'standard' for the C++98 compiler, which is invoked as
+## $(CXX98) $(CXX98STD) for both compiling and linking DSOs/DLLs.  
+## '-std=gnu++98' and '-std=gnu++03' are tried in turn by configure.
+## followed by '-std=c++98' and '-std=c++03'
+## CXX98STD=
+
+## Analogues for the C++98 compiler: default to the settings for C++
+## CXX98FLAGS=
+## CXX98PICFLAGS=
+## SHLIB_CXX98LD=
+## SHLIB_CXX98LDFLAGS=
+
 ## C++11 compiler, optional for use in packages.
 ## Introduced in R 3.1.0
 ## The command which runs the C++11 compiler: defaults to $(CXX), but
 ## empty if that (plus standard) cannot compile the tested C++11 code.
-## CXX1X=
+## CXX11=
 
-## The 'standard' for the C++11 compilier, which is invoked as
-## $(CXX1X) $(CXX1XSTD) for both compiling and linking DSOs/DLLs.  
-## '-std=c++11' and '-std=c++0x' are tried in turn by configure.
-## '-std=gnu++11' is another possibility.
-## Experimental support such as '-std=c++1y' could be used.
-## CXX1XSTD=
+## The 'standard' for the C++11 compiler, which is invoked as
+## $(CXX11) $(CXX11STD) for both compiling and linking DSOs/DLLs.  
+## '-std=gnu++11' and '-std=gnu++0x' are tried in turn by configure.
+## followed by '-std=c++11' and '-std=c++0x'
+## CXX11STD=
 
 ## Analogues for the C++11 compiler: default to the settings for C++
-## CXX1XFLAGS=
-## CXX1XPICFLAGS=
-## SHLIB_CXXIXLD=
-## SHLIB_CXXiXLDFLAGS=
+## CXX11FLAGS=
+## CXX11PICFLAGS=
+## SHLIB_CXX11LD=
+## SHLIB_CXX11LDFLAGS=
+
+## C++14 compiler, optional for use in packages.
+## Introduced in R 3.4.0
+## The command which runs the C++14 compiler: defaults to $(CXX11), but
+## empty if that (plus standard) cannot compile the tested C++14 code.
+## CXX14=
+
+## The 'standard' for the C++14 compiler, which is invoked as
+## $(CXX14) $(CXX14STD) for both compiling and linking DSOs/DLLs.  
+## '-std=gnu++14' and '-std=gnu++1y" are tried by configure, also
+## '-std=c++14' and '-std=c++1y"
+## CXX14STD=
+
+## Analogues for the C++14 compiler: default to the settings for C++11
+## CXX14FLAGS=
+## CXX14PICFLAGS=
+## SHLIB_CXX14LD=
+## SHLIB_CXX14LDFLAGS=
+
+## C++17 compiler, optional for use in packages.
+## Introduced in R 3.4.0
+## The command which runs the C++17 compiler: defaults to $(CXX14), but
+## empty if that (plus standard) cannot compile the tested C++17 code.
+## CXX17=
+
+## The 'standard' for the C++17 compiler, which is invoked as
+## $(CXX17) $(CXX17STD) for both compiling and linking DSOs/DLLs.  
+## '-std=gnu++17' and '-std=gnu++1z" are tried by configure, also
+## '-std=c++17' and '-std=c++1z"
+## CXX17STD=
+
+## Analogues for the C++17 compiler: default to the settings for C++14
+## CXX17FLAGS=
+## CXX17PICFLAGS=
+## SHLIB_CXX17LD=
+## SHLIB_CXX17LDFLAGS=
 
 ## Additional libraries to link the internet module against.
 ## Some claim Solaris needs -lsocket -lnsl
 ## INTERNET_LIBS=
+
+## Script from texinfo 5.1 or later.
+## Usually the full path to texi2any.
+## (The name is historical: this was 'makeinfo' in texinfo 4.x)
+## MAKEINFO=
+
+## Full path to version of curl-config to be used
+## CURL_CONFIG=
+## Use these to override curl-config if needed.
+## Used as from R 3.2.0.
+## CURL_CPPFLAGS=
+## CURL_LIBS=
+## To force a static link use the line below: this is only needed
+## if both shared and static libcurl libraries were built.
+## CURL_LIBS=`curl-config --static-libs`
+
+## Path to the version of pkg-config to be used for locating cairographics,
+## and possibly jpeg, libpng and libtiff.
+## PKGCONF=
+## search path for pkg-config
+## PKG_CONFIG_PATH=
+## path overriding pkg-config's default search path
+## PKG_CONFIG_LIBDIR=
+
+## OpenMP settings.
+## The configure code is conservative about enabling OpenMP 
+## so use can be forced here (or non-use if set but empty).
+## For packages (note that SHLIB_OPENMP_CXXFLAGS is for CXX, not
+## necessarily for CXX11/14/17).
+## SHLIB_OPENMP_CFLAGS=
+## SHLIB_OPENMP_CXXFLAGS=
+## SHLIB_OPENMP_FCFLAGS=
+## SHLIB_OPENMP_FFLAGS=
+## For R itself (src/main/array.c and src/library/stats/src/distance.c)
+## R_OPENMP_CFLAGS=
diff --git a/configure b/configure
index 365b72b..1337780 100755
--- a/configure
+++ b/configure
@@ -1,8 +1,8 @@
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.69 for R 3.1.2.
+# Generated by GNU Autoconf 2.69 for R 3.4.0.
 #
-# Report bugs to <http://bugs.r-project.org>.
+# Report bugs to <https://bugs.r-project.org>.
 #
 #
 # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
@@ -198,7 +198,15 @@ test -x / || exit 1"
   as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
   eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
   test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
-test \$(( 1 + 1 )) = 2 || exit 1"
+test \$(( 1 + 1 )) = 2 || exit 1
+
+  test -n \"\${ZSH_VERSION+set}\${BASH_VERSION+set}\" || (
+    ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
+    ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO
+    ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO
+    PATH=/empty FPATH=/empty; export PATH FPATH
+    test \"X\`printf %s \$ECHO\`\" = \"X\$ECHO\" \\
+      || test \"X\`print -r -- \$ECHO\`\" = \"X\$ECHO\" ) || exit 1"
   if (eval "$as_required") 2>/dev/null; then :
   as_have_required=yes
 else
@@ -267,7 +275,7 @@ fi
     $as_echo "$0: be upgraded to zsh 4.3.4 or later."
   else
     $as_echo "$0: Please tell bug-autoconf at gnu.org and
-$0: http://bugs.r-project.org about your system, including
+$0: https://bugs.r-project.org about your system, including
 $0: any error possibly output before this message. Then
 $0: install a modern shell, or manually run the script
 $0: under such a shell if you do have one."
@@ -556,155 +564,8 @@ as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
 # Sed expression to map a string onto a valid variable name.
 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
 
-
-
-# Check that we are running under the correct shell.
 SHELL=${CONFIG_SHELL-/bin/sh}
 
-case X$lt_ECHO in
-X*--fallback-echo)
-  # Remove one level of quotation (which was required for Make).
-  ECHO=`echo "$lt_ECHO" | sed 's,\\\\\$\\$0,'$0','`
-  ;;
-esac
-
-ECHO=${lt_ECHO-echo}
-if test "X$1" = X--no-reexec; then
-  # Discard the --no-reexec flag, and continue.
-  shift
-elif test "X$1" = X--fallback-echo; then
-  # Avoid inline document here, it may be left over
-  :
-elif test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' ; then
-  # Yippee, $ECHO works!
-  :
-else
-  # Restart under the correct shell.
-  exec $SHELL "$0" --no-reexec ${1+"$@"}
-fi
-
-if test "X$1" = X--fallback-echo; then
-  # used as fallback echo
-  shift
-  cat <<_LT_EOF
-$*
-_LT_EOF
-  exit 0
-fi
-
-# The HP-UX ksh and POSIX shell print the target directory to stdout
-# if CDPATH is set.
-(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
-
-if test -z "$lt_ECHO"; then
-  if test "X${echo_test_string+set}" != Xset; then
-    # find a string as large as possible, as long as the shell can cope with it
-    for cmd in 'sed 50q "$0"' 'sed 20q "$0"' 'sed 10q "$0"' 'sed 2q "$0"' 'echo test'; do
-      # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
-      if { echo_test_string=`eval $cmd`; } 2>/dev/null &&
-	 { test "X$echo_test_string" = "X$echo_test_string"; } 2>/dev/null
-      then
-        break
-      fi
-    done
-  fi
-
-  if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' &&
-     echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` &&
-     test "X$echo_testing_string" = "X$echo_test_string"; then
-    :
-  else
-    # The Solaris, AIX, and Digital Unix default echo programs unquote
-    # backslashes.  This makes it impossible to quote backslashes using
-    #   echo "$something" | sed 's/\\/\\\\/g'
-    #
-    # So, first we look for a working echo in the user's PATH.
-
-    lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
-    for dir in $PATH /usr/ucb; do
-      IFS="$lt_save_ifs"
-      if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
-         test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
-         echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
-         test "X$echo_testing_string" = "X$echo_test_string"; then
-        ECHO="$dir/echo"
-        break
-      fi
-    done
-    IFS="$lt_save_ifs"
-
-    if test "X$ECHO" = Xecho; then
-      # We didn't find a better echo, so look for alternatives.
-      if test "X`{ print -r '\t'; } 2>/dev/null`" = 'X\t' &&
-         echo_testing_string=`{ print -r "$echo_test_string"; } 2>/dev/null` &&
-         test "X$echo_testing_string" = "X$echo_test_string"; then
-        # This shell has a builtin print -r that does the trick.
-        ECHO='print -r'
-      elif { test -f /bin/ksh || test -f /bin/ksh$ac_exeext; } &&
-	   test "X$CONFIG_SHELL" != X/bin/ksh; then
-        # If we have ksh, try running configure again with it.
-        ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
-        export ORIGINAL_CONFIG_SHELL
-        CONFIG_SHELL=/bin/ksh
-        export CONFIG_SHELL
-        exec $CONFIG_SHELL "$0" --no-reexec ${1+"$@"}
-      else
-        # Try using printf.
-        ECHO='printf %s\n'
-        if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' &&
-	   echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` &&
-	   test "X$echo_testing_string" = "X$echo_test_string"; then
-	  # Cool, printf works
-	  :
-        elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` &&
-	     test "X$echo_testing_string" = 'X\t' &&
-	     echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
-	     test "X$echo_testing_string" = "X$echo_test_string"; then
-	  CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
-	  export CONFIG_SHELL
-	  SHELL="$CONFIG_SHELL"
-	  export SHELL
-	  ECHO="$CONFIG_SHELL $0 --fallback-echo"
-        elif echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` &&
-	     test "X$echo_testing_string" = 'X\t' &&
-	     echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
-	     test "X$echo_testing_string" = "X$echo_test_string"; then
-	  ECHO="$CONFIG_SHELL $0 --fallback-echo"
-        else
-	  # maybe with a smaller string...
-	  prev=:
-
-	  for cmd in 'echo test' 'sed 2q "$0"' 'sed 10q "$0"' 'sed 20q "$0"' 'sed 50q "$0"'; do
-	    if { test "X$echo_test_string" = "X`eval $cmd`"; } 2>/dev/null
-	    then
-	      break
-	    fi
-	    prev="$cmd"
-	  done
-
-	  if test "$prev" != 'sed 50q "$0"'; then
-	    echo_test_string=`eval $prev`
-	    export echo_test_string
-	    exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "$0" ${1+"$@"}
-	  else
-	    # Oops.  We lost completely, so just stick with echo.
-	    ECHO=echo
-	  fi
-        fi
-      fi
-    fi
-  fi
-fi
-
-# Copy echo and quote the copy suitably for passing to libtool from
-# the Makefile, instead of quoting the original, which is used later.
-lt_ECHO=$ECHO
-if test "X$lt_ECHO" = "X$CONFIG_SHELL $0 --fallback-echo"; then
-   lt_ECHO="$CONFIG_SHELL \\\$\$0 --fallback-echo"
-fi
-
-
-
 
 test -n "$DJDIR" || exec 7<&0 </dev/null
 exec 6>&1
@@ -729,10 +590,10 @@ MAKEFLAGS=
 # Identity of this package.
 PACKAGE_NAME='R'
 PACKAGE_TARNAME='R'
-PACKAGE_VERSION='3.1.2'
-PACKAGE_STRING='R 3.1.2'
-PACKAGE_BUGREPORT='http://bugs.r-project.org'
-PACKAGE_URL='http://www.r-project.org'
+PACKAGE_VERSION='3.4.0'
+PACKAGE_STRING='R 3.4.0'
+PACKAGE_BUGREPORT='https://bugs.r-project.org'
+PACKAGE_URL='https://www.r-project.org'
 
 ac_unique_file="src/include/Defn.h"
 # Factoring default headers for most tests.
@@ -774,7 +635,6 @@ ac_includes_default="\
 ac_header_list=
 gt_needs=
 ac_subst_vars='LTLIBOBJS
-OSF_SH_BUG
 BUILD_LIBINTL_FALSE
 BUILD_LIBINTL_TRUE
 USE_NLS_FALSE
@@ -804,6 +664,7 @@ LTLIBMULTITHREAD
 LIBMULTITHREAD
 LTLIBTHREAD
 LIBTHREAD
+LIBPTH_PREFIX
 LTLIBPTH
 LIBPTH
 PRI_MACROS_BROKEN
@@ -843,22 +704,18 @@ PAPERCONF
 BUILD_TZONE_FALSE
 BUILD_TZONE_TRUE
 R_PROFILING
+BITMAP_LIBS
+BITMAP_CPPFLAGS
+CURL_LIBS
+CURL_CPPFLAGS
+CURL_CONFIG
 BUILD_TRE_FALSE
 BUILD_TRE_TRUE
-BUILD_PCRE_FALSE
-BUILD_PCRE_TRUE
-BUILD_XZ_FALSE
-BUILD_XZ_TRUE
-BUILD_BZLIB_FALSE
-BUILD_BZLIB_TRUE
 USE_MMAP_ZLIB_FALSE
 USE_MMAP_ZLIB_TRUE
-BUILD_ZLIB_FALSE
-BUILD_ZLIB_TRUE
 TIRPC_CPPFLAGS
 BUILD_XDR_FALSE
 BUILD_XDR_TRUE
-BITMAP_LIBS
 use_tcltk
 TK_CONFIG
 TCL_CONFIG
@@ -899,13 +756,35 @@ RMATH_HAVE_EXPM1
 ALLOCA
 R_OPENMP_FFLAGS
 R_OPENMP_CFLAGS
-SHLIB_CXX1XLDFLAGS
-SHLIB_CXX1XLD
-CXX1XPICFLAGS
-CXX1XFLAGS
-CXX1XSTD
-CXX1X
+SHLIB_CXX17LDFLAGS
+SHLIB_CXX17LD
+CXX17PICFLAGS
+CXX17FLAGS
+CXX17STD
+CXX17
+HAVE_CXX17
+SHLIB_CXX14LDFLAGS
+SHLIB_CXX14LD
+CXX14PICFLAGS
+CXX14FLAGS
+CXX14STD
+CXX14
+HAVE_CXX14
+SHLIB_CXX11LDFLAGS
+SHLIB_CXX11LD
+CXX11PICFLAGS
+CXX11FLAGS
+CXX11STD
+CXX11
 HAVE_CXX11
+SHLIB_CXX98LDFLAGS
+SHLIB_CXX98LD
+CXX98PICFLAGS
+CXX98FLAGS
+CXX98STD
+CXX98
+HAVE_CXX98
+R_DYLIB_EXT
 STATICR2
 STATICR1
 FW_VERSION
@@ -918,8 +797,6 @@ USE_EXPORTFILES_FALSE
 USE_EXPORTFILES_TRUE
 SHLIB_EXT
 SHLIB_LIBADD
-BUILD_CYGWIN_FALSE
-BUILD_CYGWIN_TRUE
 DYLIB_UNDEFINED_ALLOWED_FALSE
 DYLIB_UNDEFINED_ALLOWED_TRUE
 INTERNET_LIBS
@@ -933,6 +810,7 @@ R_XTRA_CXXFLAGS
 R_XTRA_CPPFLAGS
 R_XTRA_CFLAGS
 SHLIB_CXXFLAGS
+CXXSTD
 FOUNDATION_LIBS
 FOUNDATION_CPPFLAGS
 OPENMP_CXXFLAGS
@@ -954,14 +832,18 @@ CROSS_COMPILING_TRUE
 BUILD_R
 BUILD_CC
 LIBTOOL_DEPS
+LT_SYS_LIBRARY_PATH
 OTOOL64
 OTOOL
 LIPO
 NMEDIT
 DSYMUTIL
-lt_ECHO
+MANIFEST_TOOL
+AWK
 RANLIB
 STRIP
+ac_ct_AR
+DLLTOOL
 OBJDUMP
 NM
 ac_ct_DUMPBIN
@@ -994,6 +876,8 @@ CPPFLAGS
 LDFLAGS
 CFLAGS
 CC
+PKG_CONFIG_LIBDIR
+PKG_CONFIG_PATH
 PKGCONF
 REALPATH
 NOTANGLE
@@ -1022,7 +906,6 @@ AR
 YFLAGS
 YACC
 LN_S
-AWK
 AUTOHEADER
 AUTOMAKE
 AUTOCONF
@@ -1066,6 +949,8 @@ R_PAPERSIZE
 R_PRINTCMD
 BYTE_COMPILE_PACKAGES_FALSE
 BYTE_COMPILE_PACKAGES_TRUE
+WANT_JAVA_FALSE
+WANT_JAVA_TRUE
 BUILD_LTO_FALSE
 BUILD_LTO_TRUE
 LTOALL
@@ -1154,6 +1039,7 @@ enable_maintainer_mode
 enable_strict_barrier
 enable_prebuilt_html
 enable_lto
+enable_java
 with_blas
 with_lapack
 with_readline
@@ -1165,12 +1051,9 @@ with_cairo
 with_libpng
 with_jpeglib
 with_libtiff
-with_system_zlib
-with_system_bzlib
-with_system_pcre
 with_system_tre
-with_system_xz
 with_valgrind_instrumentation
+with_system_valgrind_headers
 with_internal_tzcode
 with_recommended_packages
 with_ICU
@@ -1179,12 +1062,17 @@ enable_static
 enable_shared
 with_pic
 enable_fast_install
+with_aix_soname
+with_gnu_ld
+with_sysroot
+enable_libtool_lock
 enable_long_double
 enable_openmp
 with_x
 enable_largefile
 enable_nls
 enable_threads
+enable_rpath
 with_libpth_prefix
 with_included_gettext
 with_libintl_prefix
@@ -1229,6 +1117,9 @@ JAVA_HOME
 R_SHELL
 YACC
 YFLAGS
+PKGCONF
+PKG_CONFIG_PATH
+PKG_CONFIG_LIBDIR
 CC
 CFLAGS
 LDFLAGS
@@ -1243,12 +1134,31 @@ CCC
 CXXCPP
 OBJC
 OBJCFLAGS
-CXX1X
-CXX1XSTD
-CXX1XFLAGS
-CXX1XPICFLAGS
-SHLIB_CXX1XLD
-SHLIB_CXX1XLDFLAGS
+LT_SYS_LIBRARY_PATH
+CXX98
+CXX98STD
+CXX98FLAGS
+CXX98PICFLAGS
+SHLIB_CXX98LD
+SHLIB_CXX98LDFLAGS
+CXX11
+CXX11STD
+CXX11FLAGS
+CXX11PICFLAGS
+SHLIB_CXX11LD
+SHLIB_CXX11LDFLAGS
+CXX14
+CXX14STD
+CXX14FLAGS
+CXX14PICFLAGS
+SHLIB_CXX14LD
+SHLIB_CXX14LDFLAGS
+CXX17
+CXX17STD
+CXX17FLAGS
+CXX17PICFLAGS
+SHLIB_CXX17LD
+SHLIB_CXX17LDFLAGS
 XMKMF
 FC
 FCFLAGS'
@@ -1792,7 +1702,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.1.2 to adapt to many kinds of systems.
+\`configure' configures R 3.4.0 to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -1867,7 +1777,7 @@ fi
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of R 3.1.2:";;
+     short | recursive ) echo "Configuration of R 3.4.0:";;
    esac
   cat <<\_ACEOF
 
@@ -1880,8 +1790,8 @@ Optional Features:
                           attempt to compile support for Rprofmem(),
                           tracemem() [no]
   --enable-R-framework[=DIR]
-                          OS X only: build R framework (if possible), and
-                          specify its installation prefix [yes,
+                          macOS only: build R framework (if possible), and
+                          specify its installation prefix [no,
                           /Library/Frameworks]
   --enable-R-shlib        build the shared/dynamic library 'libR' [no]
   --enable-R-static-lib   build the static library 'libR.a' [no]
@@ -1893,16 +1803,22 @@ Optional Features:
                           [no]
   --enable-prebuilt-html  build static HTML help pages [no]
   --enable-lto            enable link-time optimization [no]
+  --enable-java           enable Java [yes]
   --enable-byte-compiled-packages
                           byte-compile base and recommended packages [yes]
   --enable-static[=PKGS]  (libtool) build static libraries [default=no]
   --enable-shared[=PKGS]  (libtool) build shared libraries [default=yes]
-
+  --enable-fast-install[=PKGS]
+                          (libtool) optimize for fast installation
+                          [default=yes]
+  --disable-libtool-lock  avoid locking (might break parallel builds)
   --enable-long-double    use long double type [yes]
   --disable-openmp        do not use OpenMP
   --disable-largefile     omit support for large files
   --disable-nls           do not use Native Language Support
 
+  --disable-rpath         do not hardcode runtime library paths
+
 Optional Packages:
   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
@@ -1911,7 +1827,7 @@ Optional Packages:
   --with-lapack           use system LAPACK library (if available), or specify
                           it [no]
   --with-readline         use readline library [yes]
-  --with-aqua             OS X only: use Aqua (if available) [yes]
+  --with-aqua             macOS only: use Aqua (if available) [yes]
   --with-tcltk            use Tcl/Tk (if available), or specify its library
                           dir [yes]
   --with-tcl-config=TCL_CONFIG
@@ -1922,24 +1838,29 @@ Optional Packages:
   --with-libpng           use libpng library (if available) [yes]
   --with-jpeglib          use jpeglib library (if available) [yes]
   --with-libtiff          use libtiff library (if available) [yes]
-  --with-system-zlib      use system zlib library (if available) [no]
-  --with-system-bzlib     use system bzlib library (if available) [no]
-  --with-system-pcre      use system PCRE library (if available) [no]
   --with-system-tre       use system tre library (if available) [no]
-  --with-system-xz        use system xz (lzma) library (if available) [yes]
   --with-valgrind-instrumentation
                           Level of additional instrumentation for Valgrind
                           (0/1/2) [0]
+  --with-system-valgrind-headers
+                          use system valgrind headers (if available) [no]
   --with-internal-tzcode  use internal time-zone code [no]
   --with-recommended-packages
                           use/install recommended R packages [yes]
   --with-ICU              use ICU library (if available) [yes]
-  --with-pic              try to use only PIC/non-PIC objects [default=use
-                          both]
+  --with-pic[=PKGS]       (libtool) try to use only PIC/non-PIC objects
+                          [default=use both]
+  --with-aix-soname=aix|svr4|both
+                          (libtool) shared library versioning (aka "SONAME")
+                          variant to provide on AIX, [default=aix].
+  --with-gnu-ld           assume the C compiler uses GNU ld [default=no]
+  --with-sysroot[=DIR]    Search for dependent libraries within DIR (or the
+                          compiler's sysroot if not specified).
   --with-x                use the X Window System
+  --with-gnu-ld           assume the C compiler uses GNU ld [default=no]
   --with-libpth-prefix[=DIR]  search for libpth in DIR/include and DIR/lib
   --without-libpth-prefix     don't search for libpth in includedir and libdir
-  --with-included-gettext use the GNU gettext library included here
+  --with-included-gettext use the GNU gettext library included here [no]
   --with-libintl-prefix[=DIR]  search for libintl in DIR/include and DIR/lib
   --without-libintl-prefix     don't search for libintl in includedir and libdir
 
@@ -2002,6 +1923,11 @@ Some influential environment variables:
   YFLAGS      The list of arguments that will be passed by default to $YACC.
               This script will default YFLAGS to the empty string to avoid a
               default value of `-d' given by some make applications.
+  PKGCONF     path to pkg-config utility
+  PKG_CONFIG_PATH
+              directories to add to pkg-config's search path
+  PKG_CONFIG_LIBDIR
+              path overriding pkg-config's default search path
   CC          C compiler command
   CFLAGS      C compiler flags
   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
@@ -2017,18 +1943,56 @@ Some influential environment variables:
   CXXCPP      C++ preprocessor
   OBJC        Objective C compiler command
   OBJCFLAGS   Objective C compiler flags
-  CXX1X       C++11 compiler command
-  CXX1XSTD    special flag for compiling and for linking C++11 code, e.g.
+  LT_SYS_LIBRARY_PATH
+              User-defined run-time library search path.
+  CXX98       C++98 compiler command
+  CXX98STD    special flag for compiling and for linking C++98 code, e.g.
+              -std=c++98
+  CXX98FLAGS  C++98 compiler flags
+  CXX98PICFLAGS
+              special flags for compiling C++98 code to be turned into a
+              shared object
+  SHLIB_CXX98LD
+              command for linking shared objects which contain object files
+              from the C++98 compiler
+  SHLIB_CXX98LDFLAGS
+              special flags used by SHLIB_CXX98LD
+  CXX11       C++11 compiler command
+  CXX11STD    special flag for compiling and for linking C++11 code, e.g.
               -std=c++11
-  CXX1XFLAGS  C++11 compiler flags
-  CXX1XPICFLAGS
+  CXX11FLAGS  C++11 compiler flags
+  CXX11PICFLAGS
               special flags for compiling C++11 code to be turned into a
               shared object
-  SHLIB_CXX1XLD
+  SHLIB_CXX11LD
               command for linking shared objects which contain object files
               from the C++11 compiler
-  SHLIB_CXX1XLDFLAGS
-              special flags used by SHLIB_CXX1XLD
+  SHLIB_CXX11LDFLAGS
+              special flags used by SHLIB_CXX11LD
+  CXX14       C++14 compiler command
+  CXX14STD    special flag for compiling and for linking C++14 code, e.g.
+              -std=c++14
+  CXX14FLAGS  C++14 compiler flags
+  CXX14PICFLAGS
+              special flags for compiling C++14 code to be turned into a
+              shared object
+  SHLIB_CXX14LD
+              command for linking shared objects which contain object files
+              from the C++14 compiler
+  SHLIB_CXX14LDFLAGS
+              special flags used by SHLIB_CXX14LD
+  CXX17       C++17 compiler command
+  CXX17STD    special flag for compiling and for linking C++17 code, e.g.
+              -std=c++17
+  CXX17FLAGS  C++17 compiler flags
+  CXX17PICFLAGS
+              special flags for compiling C++17 code to be turned into a
+              shared object
+  SHLIB_CXX17LD
+              command for linking shared objects which contain object files
+              from the C++17 compiler
+  SHLIB_CXX17LDFLAGS
+              special flags used by SHLIB_CXX17LD
   XMKMF       Path to xmkmf, Makefile generator for X Window System
   FC          Fortran compiler command
   FCFLAGS     Fortran compiler flags
@@ -2036,8 +2000,8 @@ Some influential environment variables:
 Use these variables to override the choices made by `configure' or to help
 it to find libraries and programs with nonstandard names/locations.
 
-Report bugs to <http://bugs.r-project.org>.
-R home page: <http://www.r-project.org>.
+Report bugs to <https://bugs.r-project.org>.
+R home page: <https://www.r-project.org>.
 _ACEOF
 ac_status=$?
 fi
@@ -2100,7 +2064,7 @@ fi
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
-R configure 3.1.2
+R configure 3.4.0
 generated by GNU Autoconf 2.69
 
 Copyright (C) 2012 Free Software Foundation, Inc.
@@ -2189,119 +2153,6 @@ fi
 
 } # ac_fn_c_try_cpp
 
-# ac_fn_f77_try_compile LINENO
-# ----------------------------
-# Try to compile conftest.$ac_ext, and return whether this succeeded.
-ac_fn_f77_try_compile ()
-{
-  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
-  rm -f conftest.$ac_objext
-  if { { ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
-  (eval "$ac_compile") 2>conftest.err
-  ac_status=$?
-  if test -s conftest.err; then
-    grep -v '^ *+' conftest.err >conftest.er1
-    cat conftest.er1 >&5
-    mv -f conftest.er1 conftest.err
-  fi
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; } && {
-	 test -z "$ac_f77_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then :
-  ac_retval=0
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_retval=1
-fi
-  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
-  as_fn_set_status $ac_retval
-
-} # ac_fn_f77_try_compile
-
-# ac_fn_cxx_try_compile LINENO
-# ----------------------------
-# Try to compile conftest.$ac_ext, and return whether this succeeded.
-ac_fn_cxx_try_compile ()
-{
-  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
-  rm -f conftest.$ac_objext
-  if { { ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
-  (eval "$ac_compile") 2>conftest.err
-  ac_status=$?
-  if test -s conftest.err; then
-    grep -v '^ *+' conftest.err >conftest.er1
-    cat conftest.er1 >&5
-    mv -f conftest.er1 conftest.err
-  fi
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; } && {
-	 test -z "$ac_cxx_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then :
-  ac_retval=0
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_retval=1
-fi
-  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
-  as_fn_set_status $ac_retval
-
-} # ac_fn_cxx_try_compile
-
-# ac_fn_cxx_try_cpp LINENO
-# ------------------------
-# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
-ac_fn_cxx_try_cpp ()
-{
-  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
-  if { { ac_try="$ac_cpp conftest.$ac_ext"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
-  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
-  ac_status=$?
-  if test -s conftest.err; then
-    grep -v '^ *+' conftest.err >conftest.er1
-    cat conftest.er1 >&5
-    mv -f conftest.er1 conftest.err
-  fi
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; } > conftest.i && {
-	 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
-	 test ! -s conftest.err
-       }; then :
-  ac_retval=0
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-    ac_retval=1
-fi
-  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
-  as_fn_set_status $ac_retval
-
-} # ac_fn_cxx_try_cpp
-
 # ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
 # -------------------------------------------------------
 # Tests whether HEADER exists, giving a warning if it cannot be compiled using
@@ -2372,9 +2223,9 @@ $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
 $as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
-( $as_echo "## ---------------------------------------- ##
-## Report this to http://bugs.r-project.org ##
-## ---------------------------------------- ##"
+( $as_echo "## ----------------------------------------- ##
+## Report this to https://bugs.r-project.org ##
+## ----------------------------------------- ##"
      ) | sed "s/^/$as_me: WARNING:     /" >&2
     ;;
 esac
@@ -2466,6 +2317,119 @@ $as_echo "$ac_res" >&6; }
 
 } # ac_fn_c_check_header_compile
 
+# ac_fn_f77_try_compile LINENO
+# ----------------------------
+# Try to compile conftest.$ac_ext, and return whether this succeeded.
+ac_fn_f77_try_compile ()
+{
+  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+  rm -f conftest.$ac_objext
+  if { { ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_compile") 2>conftest.err
+  ac_status=$?
+  if test -s conftest.err; then
+    grep -v '^ *+' conftest.err >conftest.er1
+    cat conftest.er1 >&5
+    mv -f conftest.er1 conftest.err
+  fi
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; } && {
+	 test -z "$ac_f77_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then :
+  ac_retval=0
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	ac_retval=1
+fi
+  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+  as_fn_set_status $ac_retval
+
+} # ac_fn_f77_try_compile
+
+# ac_fn_cxx_try_compile LINENO
+# ----------------------------
+# Try to compile conftest.$ac_ext, and return whether this succeeded.
+ac_fn_cxx_try_compile ()
+{
+  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+  rm -f conftest.$ac_objext
+  if { { ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_compile") 2>conftest.err
+  ac_status=$?
+  if test -s conftest.err; then
+    grep -v '^ *+' conftest.err >conftest.er1
+    cat conftest.er1 >&5
+    mv -f conftest.er1 conftest.err
+  fi
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; } && {
+	 test -z "$ac_cxx_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then :
+  ac_retval=0
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	ac_retval=1
+fi
+  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+  as_fn_set_status $ac_retval
+
+} # ac_fn_cxx_try_compile
+
+# ac_fn_cxx_try_cpp LINENO
+# ------------------------
+# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
+ac_fn_cxx_try_cpp ()
+{
+  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+  if { { ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
+  ac_status=$?
+  if test -s conftest.err; then
+    grep -v '^ *+' conftest.err >conftest.er1
+    cat conftest.er1 >&5
+    mv -f conftest.er1 conftest.err
+  fi
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; } > conftest.i && {
+	 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
+	 test ! -s conftest.err
+       }; then :
+  ac_retval=0
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+    ac_retval=1
+fi
+  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+  as_fn_set_status $ac_retval
+
+} # ac_fn_cxx_try_cpp
+
 # ac_fn_objc_try_compile LINENO
 # -----------------------------
 # Try to compile conftest.$ac_ext, and return whether this succeeded.
@@ -3252,7 +3216,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.1.2, which was
+It was created by R $as_me 3.4.0, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   $ $0 $@
@@ -3659,10 +3623,13 @@ MAJ_MIN_VERSION=`echo ${VERSION} | sed 's/\.[0-9]$//'`
 
 
 
-## The gettext macros call AC_GNU_SOURCE early, so all the
-## C compiling makes use of that.  If it is ever removed, we
-## would need it or something similar here.
-
+## We call AC_GNU_SOURCE early (it is a prerequisite for the gettext
+## macros), so all the C compiling makes use of that.  Nowadays it calls
+## AC_USE_SYSTEM_EXTENSIONS ....
+## This sets _GNU_SOURCE, so glibc defines all its extensions
+## (_POSIX_C_SOURCE, _XOPEN_SOURCE, _BSD_SOURCE, __USE_MISC) and these
+## unlock declarations of non-C99 functions and constants.
+## Ditto for __EXTENSIONS__ on Solaris and _ALL_SOURCE on AIX.
 
 ### ** Platform.
 
@@ -3760,14 +3727,14 @@ _ACEOF
 
 ## exclude some unsupported OSes
 case "${host_os}" in
-   ## Darwin 1.3.1 was OS X 10.0, 1.4.1 was 10.1, 5 is 10.2 etc
-   ## with 13 being 10.9.  We no longer support < 10.4 (Tiger)
-   ## http://en.wikipedia.org/wiki/Darwin_OS
+   ## Darwin 1.3.1 was macOS 10.0, 1.4.1 was 10.1, 5 is 10.2 etc
+   ## with 13 being 10.9.  We no longer support < 10.6 (Snow Leopard)
+   ## https://en.wikipedia.org/wiki/Darwin_OS
    darwin1.*)
-     as_fn_error $? "The earliest supported OS X is 10.4.
+     as_fn_error $? "The earliest supported macOS is 10.6.
      ;;
-  darwin567*" "$LINENO" 5
-     as_fn_error $? "The earliest supported OS X is 10.4.
+  darwin56789*" "$LINENO" 5
+     as_fn_error $? "The earliest supported macOS is 10.6.
      ;;
   aix123*|aix4.01*" "$LINENO" 5
     ## These need a form of linking we no longer support
@@ -3823,8 +3790,9 @@ libnn=lib
 case "${host_os}" in
   linux*)
     ## Not all distros use this: some choose to march out of step
+    ## Allow for ppc64le (Debian calls ppc64el), powerpc64le ...
     case "${host_cpu}" in
-      x86_64|mips64|ppc64|powerpc64|sparc64|s390x)
+      x86_64|mips64|ppc64*|powerpc64*|sparc64|s390x)
         if test -d /usr/lib64; then
           libnn=lib64
 	fi
@@ -3910,7 +3878,7 @@ fi
 if test "${enable_R_framework+set}" = set; then :
   enableval=$enable_R_framework; want_R_framework="${enableval}"
 else
-  want_R_framework=yes
+  want_R_framework=no
 fi
 
 ## Can only build frameworks on Darwin.
@@ -3949,7 +3917,7 @@ fi
 
 
 ## Allow the user to specify building R as a shared library.
-## (but a 'dynamic library' in the terminology of OS X).
+## (but a 'dynamic library' in the terminology of macOS).
 ## <NOTE>
 ## Building a framework implies building R shared libraries, hence the
 ## strange default.
@@ -4060,7 +4028,6 @@ else
 fi
 
 
-
 # Check whether --enable-lto was given.
 if test "${enable_lto+set}" = set; then :
   enableval=$enable_lto; want_lto="${enableval}"
@@ -4072,7 +4039,7 @@ fi
 if test "x${want_lto}" != xno; then
   LTO=-flto
 fi
-if test "x${want_lto}" == xyes; then
+if test "x${want_lto}" = xyes; then
   LTOALL=-flto
 fi
 
@@ -4086,6 +4053,21 @@ else
 fi
 
 
+# Check whether --enable-java was given.
+if test "${enable_java+set}" = set; then :
+  enableval=$enable_java; want_java="${enableval}"
+else
+  want_java=yes
+fi
+
+ if test "x${want_java}" = xyes; then
+  WANT_JAVA_TRUE=
+  WANT_JAVA_FALSE='#'
+else
+  WANT_JAVA_TRUE='#'
+  WANT_JAVA_FALSE=
+fi
+
 
 ### ** Optional packages.
 
@@ -4103,7 +4085,7 @@ else
   use_blas=unset
 fi
 
-# default is "no" except on OS X
+# default is "no" except on macOS
 
 ## LAPACK.
 
@@ -4119,7 +4101,7 @@ else
   use_lapack=unset
 fi
 
-# default is "no" except on OS X
+# default is "no" except on macOS
 
 ## Readline.
 
@@ -4239,45 +4221,6 @@ else
 fi
 
 
-# Check whether --with-system-zlib was given.
-if test "${with_system_zlib+set}" = set; then :
-  withval=$with_system_zlib; if test "${withval}" = no; then
-  use_system_zlib=no
-else
-  use_system_zlib=yes
-fi
-
-else
-  use_system_zlib=no
-fi
-
-
-# Check whether --with-system-bzlib was given.
-if test "${with_system_bzlib+set}" = set; then :
-  withval=$with_system_bzlib; if test "${withval}" = no; then
-  use_system_bzlib=no
-else
-  use_system_bzlib=yes
-fi
-
-else
-  use_system_bzlib=no
-fi
-
-
-# Check whether --with-system-pcre was given.
-if test "${with_system_pcre+set}" = set; then :
-  withval=$with_system_pcre; if test "${withval}" = no; then
-  use_system_pcre=no
-else
-  use_system_pcre=yes
-fi
-
-else
-  use_system_pcre=no
-fi
-
-
 # Check whether --with-system-tre was given.
 if test "${with_system_tre+set}" = set; then :
   withval=$with_system_tre; if test "${withval}" = no; then
@@ -4291,19 +4234,6 @@ else
 fi
 
 
-# Check whether --with-system-xz was given.
-if test "${with_system_xz+set}" = set; then :
-  withval=$with_system_xz; if test "${withval}" = no; then
-  use_system_xz=no
-else
-  use_system_xz=yes
-fi
-
-else
-  use_system_xz=yes
-fi
-
-
 ## Valgrind instrumentation
 
 # Check whether --with-valgrind-instrumentation was given.
@@ -4315,6 +4245,20 @@ fi
 
 
 
+# Check whether --with-system-valgrind-headers was given.
+if test "${with_system_valgrind_headers+set}" = set; then :
+  withval=$with_system_valgrind_headers; if test "${withval}" = no; then
+  use_system_valgrind=no
+else
+  use_system_valgrind=yes
+fi
+
+else
+  use_system_valgrind=no
+fi
+
+
+
 # Check whether --with-internal-tzcode was given.
 if test "${with_internal_tzcode+set}" = set; then :
   withval=$with_internal_tzcode; use_internal_tzcode=${withval}
@@ -4542,48 +4486,6 @@ $as_echo "missing" >&6; }
 fi
 
 
-for ac_prog in gawk mawk nawk awk
-do
-  # Extract the first word of "$ac_prog", so it can be a program name with args.
-set dummy $ac_prog; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_AWK+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  if test -n "$AWK"; then
-  ac_cv_prog_AWK="$AWK" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_exec_ext in '' $ac_executable_extensions; do
-  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-    ac_cv_prog_AWK="$ac_prog"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-  done
-IFS=$as_save_IFS
-
-fi
-fi
-AWK=$ac_cv_prog_AWK
-if test -n "$AWK"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
-$as_echo "$AWK" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-  test -n "$AWK" && break
-done
-
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
 $as_echo_n "checking whether ln -s works... " >&6; }
 LN_S=$as_ln_s
@@ -5190,7 +5092,7 @@ fi
   test -n "$MAKEINDEX" && break
 done
 
-for ac_prog in ${MAKEINFO} makeinfo
+for ac_prog in ${MAKEINFO} texi2any
 do
   # Extract the first word of "$ac_prog", so it can be a program name with args.
 set dummy $ac_prog; ac_word=$2
@@ -5236,30 +5138,30 @@ fi
 done
 
 if test -n "${MAKEINFO}"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether makeinfo version is at least 4.7" >&5
-$as_echo_n "checking whether makeinfo version is at least 4.7... " >&6; }
-if ${r_cv_prog_makeinfo_v4+:} false; then :
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether texi2any version is at least 5.1" >&5
+$as_echo_n "checking whether texi2any version is at least 5.1... " >&6; }
+if ${r_cv_prog_texi2any_v5+:} false; then :
   $as_echo_n "(cached) " >&6
 else
-  makeinfo_version=`${MAKEINFO} --version | \
-  grep "^makeinfo" | sed 's/[^)]*) \(.*\)/\1/'`
-makeinfo_version_maj=`echo ${makeinfo_version} | cut -f1 -d.`
-makeinfo_version_min=`echo ${makeinfo_version} | \
+  texi2any_version=`${MAKEINFO} --version | \
+  grep -E '^(makeinfo|texi2any)' | sed 's/[^)]*) \(.*\)/\1/'`
+texi2any_version_maj=`echo ${texi2any_version} | cut -f1 -d.`
+texi2any_version_min=`echo ${texi2any_version} | \
   cut -f2 -d. | tr -dc '0123456789.' `
-if test -z "${makeinfo_version_maj}" \
-     || test -z "${makeinfo_version_min}"; then
-  r_cv_prog_makeinfo_v4=no
-elif test ${makeinfo_version_maj} -ge 5; then
-  r_cv_prog_makeinfo_v4=yes
-elif test ${makeinfo_version_maj} -lt 4 \
-     || test ${makeinfo_version_min} -lt 7; then
-  r_cv_prog_makeinfo_v4=no
+if test -z "${texi2any_version_maj}" \
+     || test -z "${texi2any_version_min}"; then
+  r_cv_prog_texi2any_v5=no
+elif test ${texi2any_version_maj} -gt 5; then
+  r_cv_prog_texi2any_v5=yes
+elif test ${texi2any_version_maj} -lt 5 \
+     || test ${texi2any_version_min} -lt 1; then
+  r_cv_prog_texi2any_v5=no
 else
-  r_cv_prog_makeinfo_v4=yes
+  r_cv_prog_texi2any_v5=yes
 fi
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $r_cv_prog_makeinfo_v4" >&5
-$as_echo "$r_cv_prog_makeinfo_v4" >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $r_cv_prog_texi2any_v5" >&5
+$as_echo "$r_cv_prog_texi2any_v5" >&6; }
 
   for ac_prog in ${INSTALL_INFO} ginstall-info install-info
 do
@@ -5314,7 +5216,7 @@ test -n "$INSTALL_INFO" || INSTALL_INFO="false"
   fi
 
 fi
-if test "${r_cv_prog_makeinfo_v4}" != yes; then
+if test "${r_cv_prog_texi2any_v5}" != yes; then
   warn_info="you cannot build info or HTML versions of the R manuals"
   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ${warn_info}" >&5
 $as_echo "$as_me: WARNING: ${warn_info}" >&2;}
@@ -5447,7 +5349,7 @@ fi
 : ${R_RD4PDF=${r_rd4pdf}}
 
 
-## Unzip && zip && gzip && bip2
+## Unzip & zip & gzip & bip2
 for ac_prog in ${UNZIP} unzip
 do
   # Extract the first word of "$ac_prog", so it can be a program name with args.
@@ -5743,7 +5645,7 @@ $as_echo "$as_me: WARNING: ${warn_pdfviewer}" >&2;}
 fi
 
 
-## Noweb
+## Noweb - used for maintainer mode only
 # Extract the first word of "notangle", so it can be a program name with args.
 set dummy notangle; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
@@ -5785,6 +5687,11 @@ $as_echo "no" >&6; }
 fi
 
 
+if test "x${use_maintainer_mode}" = xyes; then
+  if test "${NOTANGLE}" = false ; then
+    as_fn_error $? "Building R in maintainer mode requires notangle." "$LINENO" 5
+  fi
+fi
 ## javareconf needs this
 # Extract the first word of "realpath", so it can be a program name with args.
 set dummy realpath; ac_word=$2
@@ -5829,7 +5736,8 @@ fi
 
 
 
-## cairographics needs pkg-config
+## Search for cairographics needs pkg-config,
+## helps find jpeg, libpng and libtiff.
 # Extract the first word of "pkg-config ", so it can be a program name with args.
 set dummy pkg-config ; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
@@ -5872,6 +5780,9 @@ fi
 
 
 
+
+
+
 ac_ext=c
 ac_cpp='$CPP $CPPFLAGS'
 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
@@ -6662,7 +6573,6 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $
 ac_compiler_gnu=$ac_cv_c_compiler_gnu
 
 
-
 ac_ext=c
 ac_cpp='$CPP $CPPFLAGS'
 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
@@ -6973,6 +6883,198 @@ $as_echo "$ac_cv_prog_gcc_traditional" >&6; }
   fi
 fi
 
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
+$as_echo_n "checking for ANSI C header files... " >&6; }
+if ${ac_cv_header_stdc+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <stdlib.h>
+#include <stdarg.h>
+#include <string.h>
+#include <float.h>
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  ac_cv_header_stdc=yes
+else
+  ac_cv_header_stdc=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+if test $ac_cv_header_stdc = yes; then
+  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <string.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "memchr" >/dev/null 2>&1; then :
+
+else
+  ac_cv_header_stdc=no
+fi
+rm -f conftest*
+
+fi
+
+if test $ac_cv_header_stdc = yes; then
+  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <stdlib.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "free" >/dev/null 2>&1; then :
+
+else
+  ac_cv_header_stdc=no
+fi
+rm -f conftest*
+
+fi
+
+if test $ac_cv_header_stdc = yes; then
+  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
+  if test "$cross_compiling" = yes; then :
+  :
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <ctype.h>
+#include <stdlib.h>
+#if ((' ' & 0x0FF) == 0x020)
+# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
+# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
+#else
+# define ISLOWER(c) \
+		   (('a' <= (c) && (c) <= 'i') \
+		     || ('j' <= (c) && (c) <= 'r') \
+		     || ('s' <= (c) && (c) <= 'z'))
+# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
+#endif
+
+#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
+int
+main ()
+{
+  int i;
+  for (i = 0; i < 256; i++)
+    if (XOR (islower (i), ISLOWER (i))
+	|| toupper (i) != TOUPPER (i))
+      return 2;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+
+else
+  ac_cv_header_stdc=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
+$as_echo "$ac_cv_header_stdc" >&6; }
+if test $ac_cv_header_stdc = yes; then
+
+$as_echo "#define STDC_HEADERS 1" >>confdefs.h
+
+fi
+
+# On IRIX 5.3, sys/types and inttypes.h are conflicting.
+for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
+		  inttypes.h stdint.h unistd.h
+do :
+  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
+ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
+"
+if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
+  cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+
+
+  ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
+if test "x$ac_cv_header_minix_config_h" = xyes; then :
+  MINIX=yes
+else
+  MINIX=
+fi
+
+
+  if test "$MINIX" = yes; then
+
+$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
+
+
+$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
+
+
+$as_echo "#define _MINIX 1" >>confdefs.h
+
+  fi
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
+$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
+if ${ac_cv_safe_to_define___extensions__+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#         define __EXTENSIONS__ 1
+          $ac_includes_default
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  ac_cv_safe_to_define___extensions__=yes
+else
+  ac_cv_safe_to_define___extensions__=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
+$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
+  test $ac_cv_safe_to_define___extensions__ = yes &&
+    $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
+
+  $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
+
+  $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
+
+  $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
+
+  $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
+
+
+ ## see note above
+
 ac_ext=c
 ac_cpp='$CPP $CPPFLAGS'
 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
@@ -7143,7 +7245,8 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $
 ac_compiler_gnu=$ac_cv_c_compiler_gnu
 
 fi
-## see if the user set FFLAGS: used for Intel compilers
+
+## see if the user set FFLAGS: used for Intel compilers below
 userFFLAGS=${FFLAGS}
 
 CC_VERSION=
@@ -7435,6 +7538,7 @@ else
   as_fn_error $? "No F77 compiler found" "$LINENO" 5
 fi
 
+
 ac_ext=cpp
 ac_cpp='$CXXCPP $CPPFLAGS'
 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
@@ -7692,6 +7796,53 @@ ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
 ac_compiler_gnu=$ac_cv_c_compiler_gnu
 
+## check this actually compiles
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} ${CXXFLAGS} can compile C++ code" >&5
+$as_echo_n "checking whether ${CXX} ${CXXFLAGS} can compile C++ code... " >&6; }
+if ${r_cv_prog_cxx+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_ext=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+r_save_CXX="${CXX}"
+CXX="${CXX} ${CXXSTD}"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#ifndef __cplusplus
+# error "not a C++ compiler"
+#endif
+#include <cmath>
+
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"; then :
+  r_cv_prog_cxx=yes
+else
+  r_cv_prog_cxx=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+CXX="${r_save_CXX}"
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $r_cv_prog_cxx" >&5
+$as_echo "$r_cv_prog_cxx" >&6; }
+if test "${r_cv_prog_cxx}" = no; then
+  CXX=
+  CXXFLAGS=
+  CXXSTD=
+fi
+
+
+### R_PROG_CXX98FLAG
+
 ac_ext=cpp
 ac_cpp='$CXXCPP $CPPFLAGS'
 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
@@ -7831,6 +7982,7 @@ else
   CXXCPP0=${CXXCPP}
 fi
 
+
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether __attribute__((visibility())) is supported" >&5
 $as_echo_n "checking whether __attribute__((visibility())) is supported... " >&6; }
 if ${r_cv_visibility_attribute+:} false; then :
@@ -7839,6 +7991,9 @@ else
   cat > conftest.c <<EOF
 int foo __attribute__ ((visibility ("hidden"))) = 1;
 int bar __attribute__ ((visibility ("default"))) = 1;
+#ifndef __GNUC__
+# error unsupported compiler
+#endif
 EOF
 r_cv_visibility_attribute=no
 if { ac_try='${CC-cc} -Werror -S conftest.c -o conftest.s 1>&5'
@@ -7896,8 +8051,8 @@ if test "${r_cv_prog_cc_vis}" = yes; then
     C_VISIBILITY="-fvisibility=hidden"
   fi
 fi
-## Need to exclude Intel compilers, where this does not work.
-## The flag is documented, and is effective but also hides
+## Need to exclude Intel compilers, where this does not work correctly.
+## The flag is documented and is effective, but also hides
 ## unsatisfied references. We cannot test for GCC, as icc passes that test.
 case  "${CC}" in
   ## Intel compiler: note that -c99 may have been appended
@@ -7953,197 +8108,6 @@ case  "${F77}" in
 esac
 
 
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
-$as_echo_n "checking for ANSI C header files... " >&6; }
-if ${ac_cv_header_stdc+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <stdlib.h>
-#include <stdarg.h>
-#include <string.h>
-#include <float.h>
-
-int
-main ()
-{
-
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  ac_cv_header_stdc=yes
-else
-  ac_cv_header_stdc=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-
-if test $ac_cv_header_stdc = yes; then
-  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <string.h>
-
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  $EGREP "memchr" >/dev/null 2>&1; then :
-
-else
-  ac_cv_header_stdc=no
-fi
-rm -f conftest*
-
-fi
-
-if test $ac_cv_header_stdc = yes; then
-  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <stdlib.h>
-
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  $EGREP "free" >/dev/null 2>&1; then :
-
-else
-  ac_cv_header_stdc=no
-fi
-rm -f conftest*
-
-fi
-
-if test $ac_cv_header_stdc = yes; then
-  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
-  if test "$cross_compiling" = yes; then :
-  :
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <ctype.h>
-#include <stdlib.h>
-#if ((' ' & 0x0FF) == 0x020)
-# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
-# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
-#else
-# define ISLOWER(c) \
-		   (('a' <= (c) && (c) <= 'i') \
-		     || ('j' <= (c) && (c) <= 'r') \
-		     || ('s' <= (c) && (c) <= 'z'))
-# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
-#endif
-
-#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
-int
-main ()
-{
-  int i;
-  for (i = 0; i < 256; i++)
-    if (XOR (islower (i), ISLOWER (i))
-	|| toupper (i) != TOUPPER (i))
-      return 2;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
-
-else
-  ac_cv_header_stdc=no
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
-  conftest.$ac_objext conftest.beam conftest.$ac_ext
-fi
-
-fi
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
-$as_echo "$ac_cv_header_stdc" >&6; }
-if test $ac_cv_header_stdc = yes; then
-
-$as_echo "#define STDC_HEADERS 1" >>confdefs.h
-
-fi
-
-# On IRIX 5.3, sys/types and inttypes.h are conflicting.
-for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
-		  inttypes.h stdint.h unistd.h
-do :
-  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
-"
-if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
-  cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
-
-fi
-
-done
-
-
-
-  ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
-if test "x$ac_cv_header_minix_config_h" = xyes; then :
-  MINIX=yes
-else
-  MINIX=
-fi
-
-
-  if test "$MINIX" = yes; then
-
-$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
-
-
-$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
-
-
-$as_echo "#define _MINIX 1" >>confdefs.h
-
-  fi
-
-
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
-$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
-if ${ac_cv_safe_to_define___extensions__+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-#         define __EXTENSIONS__ 1
-          $ac_includes_default
-int
-main ()
-{
-
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  ac_cv_safe_to_define___extensions__=yes
-else
-  ac_cv_safe_to_define___extensions__=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
-$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
-  test $ac_cv_safe_to_define___extensions__ = yes &&
-    $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
-
-  $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
-
-  $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
-
-  $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
-
-  $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
-
-
- ## needed for libintl
 
 ac_ext=m
 ac_cpp='$OBJCPP $CPPFLAGS'
@@ -8595,14 +8559,14 @@ if test "${enable_static+set}" = set; then :
     *)
      enable_static=no
       # Look at the argument we got.  We use all the common list separators.
-      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
+      lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
       for pkg in $enableval; do
-	IFS="$lt_save_ifs"
+	IFS=$lt_save_ifs
 	if test "X$pkg" = "X$p"; then
 	  enable_static=yes
 	fi
       done
-      IFS="$lt_save_ifs"
+      IFS=$lt_save_ifs
       ;;
     esac
 else
@@ -8625,8 +8589,78 @@ esac
 
 
 
-macro_version='2.2.6'
-macro_revision='1.3012'
+macro_version='2.4.6'
+macro_revision='2.4.6'
+
+
+
+
+
+
+
+
+
+
+
+
+
+ltmain=$ac_aux_dir/ltmain.sh
+
+# Backslashify metacharacters that are still active within
+# double-quoted strings.
+sed_quote_subst='s/\(["`$\\]\)/\\\1/g'
+
+# Same as above, but do not quote variable references.
+double_quote_subst='s/\(["`\\]\)/\\\1/g'
+
+# Sed substitution to delay expansion of an escaped shell variable in a
+# double_quote_subst'ed string.
+delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
+
+# Sed substitution to delay expansion of an escaped single quote.
+delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
+
+# Sed substitution to avoid accidental globbing in evaled expressions
+no_glob_subst='s/\*/\\\*/g'
+
+ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
+ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
+ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to print strings" >&5
+$as_echo_n "checking how to print strings... " >&6; }
+# Test print first, because it will be a builtin if present.
+if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \
+   test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then
+  ECHO='print -r --'
+elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then
+  ECHO='printf %s\n'
+else
+  # Use this function as a fallback that always works.
+  func_fallback_echo ()
+  {
+    eval 'cat <<_LTECHO_EOF
+$1
+_LTECHO_EOF'
+  }
+  ECHO='func_fallback_echo'
+fi
+
+# func_echo_all arg...
+# Invoke $ECHO with all args, space-separated.
+func_echo_all ()
+{
+    $ECHO ""
+}
+
+case $ECHO in
+  printf*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: printf" >&5
+$as_echo "printf" >&6; } ;;
+  print*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: print -r" >&5
+$as_echo "print -r" >&6; } ;;
+  *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: cat" >&5
+$as_echo "cat" >&6; } ;;
+esac
 
 
 
@@ -8640,7 +8674,6 @@ macro_revision='1.3012'
 
 
 
-ltmain="$ac_aux_dir/ltmain.sh"
 
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
 $as_echo_n "checking for a sed that does not truncate output... " >&6; }
@@ -8811,14 +8844,21 @@ test -z "$GREP" && GREP=grep
 
 
 
+# Check whether --with-gnu-ld was given.
+if test "${with_gnu_ld+set}" = set; then :
+  withval=$with_gnu_ld; test no = "$withval" || with_gnu_ld=yes
+else
+  with_gnu_ld=no
+fi
+
 ac_prog=ld
-if test "$GCC" = yes; then
+if test yes = "$GCC"; then
   # Check if gcc -print-prog-name=ld gives a path.
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5
 $as_echo_n "checking for ld used by $CC... " >&6; }
   case $host in
   *-*-mingw*)
-    # gcc leaves a trailing carriage return which upsets mingw
+    # gcc leaves a trailing carriage return, which upsets mingw
     ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
   *)
     ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
@@ -8832,7 +8872,7 @@ $as_echo_n "checking for ld used by $CC... " >&6; }
       while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
 	ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
       done
-      test -z "$LD" && LD="$ac_prog"
+      test -z "$LD" && LD=$ac_prog
       ;;
   "")
     # If it fails, then pretend we aren't using GCC.
@@ -8843,7 +8883,7 @@ $as_echo_n "checking for ld used by $CC... " >&6; }
     with_gnu_ld=unknown
     ;;
   esac
-elif test "$with_gnu_ld" = yes; then
+elif test yes = "$with_gnu_ld"; then
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
 $as_echo_n "checking for GNU ld... " >&6; }
 else
@@ -8854,32 +8894,32 @@ if ${lt_cv_path_LD+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -z "$LD"; then
-  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+  lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
   for ac_dir in $PATH; do
-    IFS="$lt_save_ifs"
+    IFS=$lt_save_ifs
     test -z "$ac_dir" && ac_dir=.
     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
-      lt_cv_path_LD="$ac_dir/$ac_prog"
+      lt_cv_path_LD=$ac_dir/$ac_prog
       # Check to see if the program is GNU ld.  I'd rather use --version,
       # but apparently some variants of GNU ld only accept -v.
       # Break only if it was the GNU/non-GNU ld that we prefer.
       case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
       *GNU* | *'with BFD'*)
-	test "$with_gnu_ld" != no && break
+	test no != "$with_gnu_ld" && break
 	;;
       *)
-	test "$with_gnu_ld" != yes && break
+	test yes != "$with_gnu_ld" && break
 	;;
       esac
     fi
   done
-  IFS="$lt_save_ifs"
+  IFS=$lt_save_ifs
 else
-  lt_cv_path_LD="$LD" # Let the user override the test with a path.
+  lt_cv_path_LD=$LD # Let the user override the test with a path.
 fi
 fi
 
-LD="$lt_cv_path_LD"
+LD=$lt_cv_path_LD
 if test -n "$LD"; then
   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
 $as_echo "$LD" >&6; }
@@ -8922,33 +8962,38 @@ if ${lt_cv_path_NM+:} false; then :
 else
   if test -n "$NM"; then
   # Let the user override the test.
-  lt_cv_path_NM="$NM"
+  lt_cv_path_NM=$NM
 else
-  lt_nm_to_check="${ac_tool_prefix}nm"
+  lt_nm_to_check=${ac_tool_prefix}nm
   if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
     lt_nm_to_check="$lt_nm_to_check nm"
   fi
   for lt_tmp_nm in $lt_nm_to_check; do
-    lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+    lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
     for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
-      IFS="$lt_save_ifs"
+      IFS=$lt_save_ifs
       test -z "$ac_dir" && ac_dir=.
-      tmp_nm="$ac_dir/$lt_tmp_nm"
-      if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
+      tmp_nm=$ac_dir/$lt_tmp_nm
+      if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext"; then
 	# Check to see if the nm accepts a BSD-compat flag.
-	# Adding the `sed 1q' prevents false positives on HP-UX, which says:
+	# Adding the 'sed 1q' prevents false positives on HP-UX, which says:
 	#   nm: unknown option "B" ignored
 	# Tru64's nm complains that /dev/null is an invalid object file
-	case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
-	*/dev/null* | *'Invalid file or object type'*)
+	# MSYS converts /dev/null to NUL, MinGW nm treats NUL as empty
+	case $build_os in
+	mingw*) lt_bad_file=conftest.nm/nofile ;;
+	*) lt_bad_file=/dev/null ;;
+	esac
+	case `"$tmp_nm" -B $lt_bad_file 2>&1 | sed '1q'` in
+	*$lt_bad_file* | *'Invalid file or object type'*)
 	  lt_cv_path_NM="$tmp_nm -B"
-	  break
+	  break 2
 	  ;;
 	*)
 	  case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
 	  */dev/null*)
 	    lt_cv_path_NM="$tmp_nm -p"
-	    break
+	    break 2
 	    ;;
 	  *)
 	    lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
@@ -8959,19 +9004,22 @@ else
 	esac
       fi
     done
-    IFS="$lt_save_ifs"
+    IFS=$lt_save_ifs
   done
   : ${lt_cv_path_NM=no}
 fi
 fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_NM" >&5
 $as_echo "$lt_cv_path_NM" >&6; }
-if test "$lt_cv_path_NM" != "no"; then
-  NM="$lt_cv_path_NM"
+if test no != "$lt_cv_path_NM"; then
+  NM=$lt_cv_path_NM
 else
   # Didn't find any BSD compatible name lister, look for dumpbin.
-  if test -n "$ac_tool_prefix"; then
-  for ac_prog in "dumpbin -symbols" "link -dump -symbols"
+  if test -n "$DUMPBIN"; then :
+    # Let the user override the test.
+  else
+    if test -n "$ac_tool_prefix"; then
+  for ac_prog in dumpbin "link -dump"
   do
     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
@@ -9015,7 +9063,7 @@ fi
 fi
 if test -z "$DUMPBIN"; then
   ac_ct_DUMPBIN=$DUMPBIN
-  for ac_prog in "dumpbin -symbols" "link -dump -symbols"
+  for ac_prog in dumpbin "link -dump"
 do
   # Extract the first word of "$ac_prog", so it can be a program name with args.
 set dummy $ac_prog; ac_word=$2
@@ -9070,9 +9118,18 @@ esac
   fi
 fi
 
+    case `$DUMPBIN -symbols -headers /dev/null 2>&1 | sed '1q'` in
+    *COFF*)
+      DUMPBIN="$DUMPBIN -symbols -headers"
+      ;;
+    *)
+      DUMPBIN=:
+      ;;
+    esac
+  fi
 
-  if test "$DUMPBIN" != ":"; then
-    NM="$DUMPBIN"
+  if test : != "$DUMPBIN"; then
+    NM=$DUMPBIN
   fi
 fi
 test -z "$NM" && NM=nm
@@ -9089,13 +9146,13 @@ if ${lt_cv_nm_interface+:} false; then :
 else
   lt_cv_nm_interface="BSD nm"
   echo "int some_variable = 0;" > conftest.$ac_ext
-  (eval echo "\"\$as_me:9092: $ac_compile\"" >&5)
+  (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&5)
   (eval "$ac_compile" 2>conftest.err)
   cat conftest.err >&5
-  (eval echo "\"\$as_me:9095: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
+  (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
   (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
   cat conftest.err >&5
-  (eval echo "\"\$as_me:9098: output\"" >&5)
+  (eval echo "\"\$as_me:$LINENO: output\"" >&5)
   cat conftest.out >&5
   if $GREP 'External.*some_variable' conftest.out > /dev/null; then
     lt_cv_nm_interface="MS dumpbin"
@@ -9112,7 +9169,7 @@ if ${lt_cv_sys_max_cmd_len+:} false; then :
   $as_echo_n "(cached) " >&6
 else
     i=0
-  teststring="ABCD"
+  teststring=ABCD
 
   case $build_os in
   msdosdjgpp*)
@@ -9141,13 +9198,18 @@ else
     lt_cv_sys_max_cmd_len=8192;
     ;;
 
+  mint*)
+    # On MiNT this can take a long time and run out of memory.
+    lt_cv_sys_max_cmd_len=8192;
+    ;;
+
   amigaos*)
     # On AmigaOS with pdksh, this test takes hours, literally.
     # So we just punt and use a minimum line length of 8192.
     lt_cv_sys_max_cmd_len=8192;
     ;;
 
-  netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
+  bitrig* | darwin* | dragonfly* | freebsd* | netbsd* | openbsd*)
     # This has been around since 386BSD, at least.  Likely further.
     if test -x /sbin/sysctl; then
       lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
@@ -9166,6 +9228,11 @@ else
     lt_cv_sys_max_cmd_len=196608
     ;;
 
+  os2*)
+    # The test takes a long time on OS/2.
+    lt_cv_sys_max_cmd_len=8192
+    ;;
+
   osf*)
     # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
     # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
@@ -9192,22 +9259,23 @@ else
     ;;
   *)
     lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
-    if test -n "$lt_cv_sys_max_cmd_len"; then
+    if test -n "$lt_cv_sys_max_cmd_len" && \
+       test undefined != "$lt_cv_sys_max_cmd_len"; then
       lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
       lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
     else
       # Make teststring a little bigger before we do anything with it.
       # a 1K string should be a reasonable start.
-      for i in 1 2 3 4 5 6 7 8 ; do
+      for i in 1 2 3 4 5 6 7 8; do
         teststring=$teststring$teststring
       done
       SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
       # If test is not a shell built-in, we'll probably end up computing a
       # maximum length that is only half of the actual maximum length, but
       # we can't tell.
-      while { test "X"`$SHELL $0 --fallback-echo "X$teststring$teststring" 2>/dev/null` \
-	         = "XX$teststring$teststring"; } >/dev/null 2>&1 &&
-	      test $i != 17 # 1/2 MB should be enough
+      while { test X`env echo "$teststring$teststring" 2>/dev/null` \
+	         = "X$teststring$teststring"; } >/dev/null 2>&1 &&
+	      test 17 != "$i" # 1/2 MB should be enough
       do
         i=`expr $i + 1`
         teststring=$teststring$teststring
@@ -9225,7 +9293,7 @@ else
 
 fi
 
-if test -n $lt_cv_sys_max_cmd_len ; then
+if test -n "$lt_cv_sys_max_cmd_len"; then
   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sys_max_cmd_len" >&5
 $as_echo "$lt_cv_sys_max_cmd_len" >&6; }
 else
@@ -9243,30 +9311,6 @@ max_cmd_len=$lt_cv_sys_max_cmd_len
 : ${MV="mv -f"}
 : ${RM="rm -f"}
 
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the shell understands some XSI constructs" >&5
-$as_echo_n "checking whether the shell understands some XSI constructs... " >&6; }
-# Try some XSI features
-xsi_shell=no
-( _lt_dummy="a/b/c"
-  test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \
-      = c,a/b,, \
-    && eval 'test $(( 1 + 1 )) -eq 2 \
-    && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \
-  && xsi_shell=yes
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xsi_shell" >&5
-$as_echo "$xsi_shell" >&6; }
-
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the shell understands \"+=\"" >&5
-$as_echo_n "checking whether the shell understands \"+=\"... " >&6; }
-lt_shell_append=no
-( foo=bar; set foo baz; eval "$1+=\$2" && test "$foo" = barbaz ) \
-    >/dev/null 2>&1 \
-  && lt_shell_append=yes
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_shell_append" >&5
-$as_echo "$lt_shell_append" >&6; }
-
-
 if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
   lt_unset=unset
 else
@@ -9298,6 +9342,80 @@ esac
 
 
 
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to $host format" >&5
+$as_echo_n "checking how to convert $build file names to $host format... " >&6; }
+if ${lt_cv_to_host_file_cmd+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  case $host in
+  *-*-mingw* )
+    case $build in
+      *-*-mingw* ) # actually msys
+        lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32
+        ;;
+      *-*-cygwin* )
+        lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32
+        ;;
+      * ) # otherwise, assume *nix
+        lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32
+        ;;
+    esac
+    ;;
+  *-*-cygwin* )
+    case $build in
+      *-*-mingw* ) # actually msys
+        lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin
+        ;;
+      *-*-cygwin* )
+        lt_cv_to_host_file_cmd=func_convert_file_noop
+        ;;
+      * ) # otherwise, assume *nix
+        lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin
+        ;;
+    esac
+    ;;
+  * ) # unhandled hosts (and "normal" native builds)
+    lt_cv_to_host_file_cmd=func_convert_file_noop
+    ;;
+esac
+
+fi
+
+to_host_file_cmd=$lt_cv_to_host_file_cmd
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_host_file_cmd" >&5
+$as_echo "$lt_cv_to_host_file_cmd" >&6; }
+
+
+
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to toolchain format" >&5
+$as_echo_n "checking how to convert $build file names to toolchain format... " >&6; }
+if ${lt_cv_to_tool_file_cmd+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  #assume ordinary cross tools, or native build.
+lt_cv_to_tool_file_cmd=func_convert_file_noop
+case $host in
+  *-*-mingw* )
+    case $build in
+      *-*-mingw* ) # actually msys
+        lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32
+        ;;
+    esac
+    ;;
+esac
+
+fi
+
+to_tool_file_cmd=$lt_cv_to_tool_file_cmd
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_tool_file_cmd" >&5
+$as_echo "$lt_cv_to_tool_file_cmd" >&6; }
+
+
+
+
+
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5
 $as_echo_n "checking for $LD option to reload object files... " >&6; }
 if ${lt_cv_ld_reload_flag+:} false; then :
@@ -9314,9 +9432,14 @@ case $reload_flag in
 esac
 reload_cmds='$LD$reload_flag -o $output$reload_objs'
 case $host_os in
+  cygwin* | mingw* | pw32* | cegcc*)
+    if test yes != "$GCC"; then
+      reload_cmds=false
+    fi
+    ;;
   darwin*)
-    if test "$GCC" = yes; then
-      reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
+    if test yes = "$GCC"; then
+      reload_cmds='$LTCC $LTCFLAGS -nostdlib $wl-r -o $output$reload_objs'
     else
       reload_cmds='$LD$reload_flag -o $output$reload_objs'
     fi
@@ -9444,13 +9567,13 @@ lt_cv_deplibs_check_method='unknown'
 # Need to set the preceding variable on all platforms that support
 # interlibrary dependencies.
 # 'none' -- dependencies not supported.
-# `unknown' -- same as none, but documents that we really don't know.
+# 'unknown' -- same as none, but documents that we really don't know.
 # 'pass_all' -- all dependencies passed with no checks.
 # 'test_compile' -- check by making test program.
 # 'file_magic [[regex]]' -- check by looking for files in library path
-# which responds to the $file_magic_cmd with a given extended regex.
-# If you have `file' or equivalent on your system and you're not sure
-# whether `pass_all' will *always* work, you probably want this one.
+# that responds to the $file_magic_cmd with a given extended regex.
+# If you have 'file' or equivalent on your system and you're not sure
+# whether 'pass_all' will *always* work, you probably want this one.
 
 case $host_os in
 aix[4-9]*)
@@ -9481,12 +9604,13 @@ mingw* | pw32*)
     lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
     lt_cv_file_magic_cmd='func_win32_libid'
   else
-    lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
+    # Keep this pattern in sync with the one in func_win32_libid.
+    lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)'
     lt_cv_file_magic_cmd='$OBJDUMP -f'
   fi
   ;;
 
-cegcc)
+cegcc*)
   # use the weaker test based on 'objdump'. See mingw*.
   lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'
   lt_cv_file_magic_cmd='$OBJDUMP -f'
@@ -9512,7 +9636,7 @@ freebsd* | dragonfly*)
   fi
   ;;
 
-gnu*)
+haiku*)
   lt_cv_deplibs_check_method=pass_all
   ;;
 
@@ -9524,11 +9648,11 @@ hpux10.20* | hpux11*)
     lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
     ;;
   hppa*64*)
-    lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]'
+    lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF[ -][0-9][0-9])(-bit)?( [LM]SB)? shared object( file)?[, -]* PA-RISC [0-9]\.[0-9]'
     lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
     ;;
   *)
-    lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library'
+    lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9]\.[0-9]) shared library'
     lt_cv_file_magic_test_file=/usr/lib/libc.sl
     ;;
   esac
@@ -9549,8 +9673,8 @@ irix5* | irix6* | nonstopux*)
   lt_cv_deplibs_check_method=pass_all
   ;;
 
-# This must be Linux ELF.
-linux* | k*bsd*-gnu)
+# This must be glibc/ELF.
+linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
   lt_cv_deplibs_check_method=pass_all
   ;;
 
@@ -9572,8 +9696,8 @@ newos6*)
   lt_cv_deplibs_check_method=pass_all
   ;;
 
-openbsd*)
-  if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+openbsd* | bitrig*)
+  if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
     lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$'
   else
     lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
@@ -9626,11 +9750,29 @@ sysv4 | sysv4.3*)
 tpf*)
   lt_cv_deplibs_check_method=pass_all
   ;;
+os2*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
 esac
 
 fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5
 $as_echo "$lt_cv_deplibs_check_method" >&6; }
+
+file_magic_glob=
+want_nocaseglob=no
+if test "$build" = "$host"; then
+  case $host_os in
+  mingw* | pw32*)
+    if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then
+      want_nocaseglob=yes
+    else
+      file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[\1]\/[\1]\/g;/g"`
+    fi
+    ;;
+  esac
+fi
+
 file_magic_cmd=$lt_cv_file_magic_cmd
 deplibs_check_method=$lt_cv_deplibs_check_method
 test -z "$deplibs_check_method" && deplibs_check_method=unknown
@@ -9646,9 +9788,162 @@ test -z "$deplibs_check_method" && deplibs_check_method=unknown
 
 
 
+
+
+
+
+
+
+
+
+
+
 if test -n "$ac_tool_prefix"; then
-  # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
-set dummy ${ac_tool_prefix}ar; ac_word=$2
+  # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
+set dummy ${ac_tool_prefix}dlltool; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_DLLTOOL+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$DLLTOOL"; then
+  ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+DLLTOOL=$ac_cv_prog_DLLTOOL
+if test -n "$DLLTOOL"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5
+$as_echo "$DLLTOOL" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_DLLTOOL"; then
+  ac_ct_DLLTOOL=$DLLTOOL
+  # Extract the first word of "dlltool", so it can be a program name with args.
+set dummy dlltool; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_DLLTOOL+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$ac_ct_DLLTOOL"; then
+  ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_ac_ct_DLLTOOL="dlltool"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL
+if test -n "$ac_ct_DLLTOOL"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5
+$as_echo "$ac_ct_DLLTOOL" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+  if test "x$ac_ct_DLLTOOL" = x; then
+    DLLTOOL="false"
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+    DLLTOOL=$ac_ct_DLLTOOL
+  fi
+else
+  DLLTOOL="$ac_cv_prog_DLLTOOL"
+fi
+
+test -z "$DLLTOOL" && DLLTOOL=dlltool
+
+
+
+
+
+
+
+
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to associate runtime and link libraries" >&5
+$as_echo_n "checking how to associate runtime and link libraries... " >&6; }
+if ${lt_cv_sharedlib_from_linklib_cmd+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  lt_cv_sharedlib_from_linklib_cmd='unknown'
+
+case $host_os in
+cygwin* | mingw* | pw32* | cegcc*)
+  # two different shell functions defined in ltmain.sh;
+  # decide which one to use based on capabilities of $DLLTOOL
+  case `$DLLTOOL --help 2>&1` in
+  *--identify-strict*)
+    lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib
+    ;;
+  *)
+    lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback
+    ;;
+  esac
+  ;;
+*)
+  # fallback: assume linklib IS sharedlib
+  lt_cv_sharedlib_from_linklib_cmd=$ECHO
+  ;;
+esac
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sharedlib_from_linklib_cmd" >&5
+$as_echo "$lt_cv_sharedlib_from_linklib_cmd" >&6; }
+sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd
+test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO
+
+
+
+
+
+
+
+if test -n "$ac_tool_prefix"; then
+  for ac_prog in ar
+  do
+    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
+set dummy $ac_tool_prefix$ac_prog; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
 if ${ac_cv_prog_AR+:} false; then :
@@ -9664,7 +9959,7 @@ do
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-    ac_cv_prog_AR="${ac_tool_prefix}ar"
+    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
   fi
@@ -9684,11 +9979,15 @@ $as_echo "no" >&6; }
 fi
 
 
+    test -n "$AR" && break
+  done
 fi
-if test -z "$ac_cv_prog_AR"; then
+if test -z "$AR"; then
   ac_ct_AR=$AR
-  # Extract the first word of "ar", so it can be a program name with args.
-set dummy ar; ac_word=$2
+  for ac_prog in ar
+do
+  # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
 if ${ac_cv_prog_ac_ct_AR+:} false; then :
@@ -9704,7 +10003,7 @@ do
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-    ac_cv_prog_ac_ct_AR="ar"
+    ac_cv_prog_ac_ct_AR="$ac_prog"
     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
   fi
@@ -9723,6 +10022,10 @@ else
 $as_echo "no" >&6; }
 fi
 
+
+  test -n "$ac_ct_AR" && break
+done
+
   if test "x$ac_ct_AR" = x; then
     AR="false"
   else
@@ -9734,16 +10037,72 @@ ac_tool_warned=yes ;;
 esac
     AR=$ac_ct_AR
   fi
-else
-  AR="$ac_cv_prog_AR"
 fi
 
-test -z "$AR" && AR=ar
-test -z "$AR_FLAGS" && AR_FLAGS=cru
+: ${AR=ar}
+: ${AR_FLAGS=cru}
+
+
+
+
+
+
+
+
+
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for archiver @FILE support" >&5
+$as_echo_n "checking for archiver @FILE support... " >&6; }
+if ${lt_cv_ar_at_file+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  lt_cv_ar_at_file=no
+   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
 
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  echo conftest.$ac_objext > conftest.lst
+      lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&5'
+      { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5
+  (eval $lt_ar_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }
+      if test 0 -eq "$ac_status"; then
+	# Ensure the archiver fails upon bogus file names.
+	rm -f conftest.$ac_objext libconftest.a
+	{ { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5
+  (eval $lt_ar_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }
+	if test 0 -ne "$ac_status"; then
+          lt_cv_ar_at_file=@
+        fi
+      fi
+      rm -f conftest.* libconftest.a
 
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ar_at_file" >&5
+$as_echo "$lt_cv_ar_at_file" >&6; }
 
+if test no = "$lt_cv_ar_at_file"; then
+  archiver_list_spec=
+else
+  archiver_list_spec=$lt_cv_ar_at_file
+fi
 
 
 
@@ -9956,16 +10315,26 @@ old_postuninstall_cmds=
 
 if test -n "$RANLIB"; then
   case $host_os in
-  openbsd*)
-    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib"
+  bitrig* | openbsd*)
+    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib"
     ;;
   *)
-    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib"
+    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib"
     ;;
   esac
-  old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
+  old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib"
 fi
 
+case $host_os in
+  darwin*)
+    lock_old_archive_extraction=yes ;;
+  *)
+    lock_old_archive_extraction=no ;;
+esac
+
+
+
+
 
 
 
@@ -9983,6 +10352,50 @@ fi
 
 
 
+for ac_prog in gawk mawk nawk awk
+do
+  # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_AWK+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$AWK"; then
+  ac_cv_prog_AWK="$AWK" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_AWK="$ac_prog"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+AWK=$ac_cv_prog_AWK
+if test -n "$AWK"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
+$as_echo "$AWK" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+  test -n "$AWK" && break
+done
+
+
+
 
 
 
@@ -10034,7 +10447,7 @@ cygwin* | mingw* | pw32* | cegcc*)
   symcode='[ABCDGISTW]'
   ;;
 hpux*)
-  if test "$host_cpu" = ia64; then
+  if test ia64 = "$host_cpu"; then
     symcode='[ABCDEGRST]'
   fi
   ;;
@@ -10067,14 +10480,44 @@ case `$NM -V 2>&1` in
   symcode='[ABCDGIRSTW]' ;;
 esac
 
+if test "$lt_cv_nm_interface" = "MS dumpbin"; then
+  # Gets list of data symbols to import.
+  lt_cv_sys_global_symbol_to_import="sed -n -e 's/^I .* \(.*\)$/\1/p'"
+  # Adjust the below global symbol transforms to fixup imported variables.
+  lt_cdecl_hook=" -e 's/^I .* \(.*\)$/extern __declspec(dllimport) char \1;/p'"
+  lt_c_name_hook=" -e 's/^I .* \(.*\)$/  {\"\1\", (void *) 0},/p'"
+  lt_c_name_lib_hook="\
+  -e 's/^I .* \(lib.*\)$/  {\"\1\", (void *) 0},/p'\
+  -e 's/^I .* \(.*\)$/  {\"lib\1\", (void *) 0},/p'"
+else
+  # Disable hooks by default.
+  lt_cv_sys_global_symbol_to_import=
+  lt_cdecl_hook=
+  lt_c_name_hook=
+  lt_c_name_lib_hook=
+fi
+
 # Transform an extracted symbol line into a proper C declaration.
 # Some systems (esp. on ia64) link data and code symbols differently,
 # so use this general approach.
-lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
+lt_cv_sys_global_symbol_to_cdecl="sed -n"\
+$lt_cdecl_hook\
+" -e 's/^T .* \(.*\)$/extern int \1();/p'"\
+" -e 's/^$symcode$symcode* .* \(.*\)$/extern char \1;/p'"
 
 # Transform an extracted symbol line into symbol name and symbol address
-lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/  {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/  {\"\2\", (void *) \&\2},/p'"
-lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([^ ]*\) $/  {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \(lib[^ ]*\)$/  {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/  {\"lib\2\", (void *) \&\2},/p'"
+lt_cv_sys_global_symbol_to_c_name_address="sed -n"\
+$lt_c_name_hook\
+" -e 's/^: \(.*\) .*$/  {\"\1\", (void *) 0},/p'"\
+" -e 's/^$symcode$symcode* .* \(.*\)$/  {\"\1\", (void *) \&\1},/p'"
+
+# Transform an extracted symbol line into symbol name with lib prefix and
+# symbol address.
+lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n"\
+$lt_c_name_lib_hook\
+" -e 's/^: \(.*\) .*$/  {\"\1\", (void *) 0},/p'"\
+" -e 's/^$symcode$symcode* .* \(lib.*\)$/  {\"\1\", (void *) \&\1},/p'"\
+" -e 's/^$symcode$symcode* .* \(.*\)$/  {\"lib\1\", (void *) \&\1},/p'"
 
 # Handle CRLF in mingw tool chain
 opt_cr=
@@ -10092,24 +10535,29 @@ for ac_symprfx in "" "_"; do
 
   # Write the raw and C identifiers.
   if test "$lt_cv_nm_interface" = "MS dumpbin"; then
-    # Fake it for dumpbin and say T for any non-static function
-    # and D for any global variable.
+    # Fake it for dumpbin and say T for any non-static function,
+    # D for any global variable and I for any imported variable.
     # Also find C++ and __fastcall symbols from MSVC++,
     # which start with @ or ?.
     lt_cv_sys_global_symbol_pipe="$AWK '"\
 "     {last_section=section; section=\$ 3};"\
+"     /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\
 "     /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
+"     /^ *Symbol name *: /{split(\$ 0,sn,\":\"); si=substr(sn[2],2)};"\
+"     /^ *Type *: code/{print \"T\",si,substr(si,length(prfx))};"\
+"     /^ *Type *: data/{print \"I\",si,substr(si,length(prfx))};"\
 "     \$ 0!~/External *\|/{next};"\
 "     / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
 "     {if(hide[section]) next};"\
-"     {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\
-"     {split(\$ 0, a, /\||\r/); split(a[2], s)};"\
-"     s[1]~/^[@?]/{print s[1], s[1]; next};"\
-"     s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\
+"     {f=\"D\"}; \$ 0~/\(\).*\|/{f=\"T\"};"\
+"     {split(\$ 0,a,/\||\r/); split(a[2],s)};"\
+"     s[1]~/^[@?]/{print f,s[1],s[1]; next};"\
+"     s[1]~prfx {split(s[1],t,\"@\"); print f,t[1],substr(t[1],length(prfx))}"\
 "     ' prfx=^$ac_symprfx"
   else
     lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[	 ]\($symcode$symcode*\)[	 ][	 ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
   fi
+  lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'"
 
   # Check to see that the pipe works correctly.
   pipe_works=no
@@ -10135,8 +10583,8 @@ _LT_EOF
   test $ac_status = 0; }; then
     # Now try to grab the symbols.
     nlist=conftest.nm
-    if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist\""; } >&5
-  (eval $NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) 2>&5
+    if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist\""; } >&5
+  (eval $NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) 2>&5
   ac_status=$?
   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   test $ac_status = 0; } && test -s "$nlist"; then
@@ -10151,6 +10599,18 @@ _LT_EOF
       if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
 	if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
 	  cat <<_LT_EOF > conftest.$ac_ext
+/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests.  */
+#if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE
+/* DATA imports from DLLs on WIN32 can't be const, because runtime
+   relocations are performed -- see ld's documentation on pseudo-relocs.  */
+# define LT_DLSYM_CONST
+#elif defined __osf__
+/* This system does not cope well with relocations in const data.  */
+# define LT_DLSYM_CONST
+#else
+# define LT_DLSYM_CONST const
+#endif
+
 #ifdef __cplusplus
 extern "C" {
 #endif
@@ -10162,7 +10622,7 @@ _LT_EOF
 	  cat <<_LT_EOF >> conftest.$ac_ext
 
 /* The mapping between symbol names and symbols.  */
-const struct {
+LT_DLSYM_CONST struct {
   const char *name;
   void       *address;
 }
@@ -10170,7 +10630,7 @@ lt__PROGRAM__LTX_preloaded_symbols[] =
 {
   { "@PROGRAM@", (void *) 0 },
 _LT_EOF
-	  $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
+	  $SED "s/^$symcode$symcode* .* \(.*\)$/  {\"\1\", (void *) \&\1},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
 	  cat <<\_LT_EOF >> conftest.$ac_ext
   {0, (void *) 0}
 };
@@ -10188,19 +10648,19 @@ static const void *lt_preloaded_setup() {
 _LT_EOF
 	  # Now try linking the two files.
 	  mv conftest.$ac_objext conftstm.$ac_objext
-	  lt_save_LIBS="$LIBS"
-	  lt_save_CFLAGS="$CFLAGS"
-	  LIBS="conftstm.$ac_objext"
+	  lt_globsym_save_LIBS=$LIBS
+	  lt_globsym_save_CFLAGS=$CFLAGS
+	  LIBS=conftstm.$ac_objext
 	  CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag"
 	  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
   (eval $ac_link) 2>&5
   ac_status=$?
   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; } && test -s conftest${ac_exeext}; then
+  test $ac_status = 0; } && test -s conftest$ac_exeext; then
 	    pipe_works=yes
 	  fi
-	  LIBS="$lt_save_LIBS"
-	  CFLAGS="$lt_save_CFLAGS"
+	  LIBS=$lt_globsym_save_LIBS
+	  CFLAGS=$lt_globsym_save_CFLAGS
 	else
 	  echo "cannot find nm_test_func in $nlist" >&5
 	fi
@@ -10217,7 +10677,7 @@ _LT_EOF
   rm -rf conftest* conftst*
 
   # Do not use the global_symbol_pipe unless it works.
-  if test "$pipe_works" = yes; then
+  if test yes = "$pipe_works"; then
     break
   else
     lt_cv_sys_global_symbol_pipe=
@@ -10237,6 +10697,24 @@ else
 $as_echo "ok" >&6; }
 fi
 
+# Response file support.
+if test "$lt_cv_nm_interface" = "MS dumpbin"; then
+  nm_file_list_spec='@'
+elif $NM --help 2>/dev/null | grep '[@]FILE' >/dev/null; then
+  nm_file_list_spec='@'
+fi
+
+
+
+
+
+
+
+
+
+
+
+
 
 
 
@@ -10259,6 +10737,507 @@ fi
 
 
 
+
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5
+$as_echo_n "checking for sysroot... " >&6; }
+
+# Check whether --with-sysroot was given.
+if test "${with_sysroot+set}" = set; then :
+  withval=$with_sysroot;
+else
+  with_sysroot=no
+fi
+
+
+lt_sysroot=
+case $with_sysroot in #(
+ yes)
+   if test yes = "$GCC"; then
+     lt_sysroot=`$CC --print-sysroot 2>/dev/null`
+   fi
+   ;; #(
+ /*)
+   lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"`
+   ;; #(
+ no|'')
+   ;; #(
+ *)
+   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_sysroot" >&5
+$as_echo "$with_sysroot" >&6; }
+   as_fn_error $? "The sysroot must be an absolute path." "$LINENO" 5
+   ;;
+esac
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${lt_sysroot:-no}" >&5
+$as_echo "${lt_sysroot:-no}" >&6; }
+
+
+
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a working dd" >&5
+$as_echo_n "checking for a working dd... " >&6; }
+if ${ac_cv_path_lt_DD+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  printf 0123456789abcdef0123456789abcdef >conftest.i
+cat conftest.i conftest.i >conftest2.i
+: ${lt_DD:=$DD}
+if test -z "$lt_DD"; then
+  ac_path_lt_DD_found=false
+  # Loop through the user's path and test for each of PROGNAME-LIST
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_prog in dd; do
+    for ac_exec_ext in '' $ac_executable_extensions; do
+      ac_path_lt_DD="$as_dir/$ac_prog$ac_exec_ext"
+      as_fn_executable_p "$ac_path_lt_DD" || continue
+if "$ac_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then
+  cmp -s conftest.i conftest.out \
+  && ac_cv_path_lt_DD="$ac_path_lt_DD" ac_path_lt_DD_found=:
+fi
+      $ac_path_lt_DD_found && break 3
+    done
+  done
+  done
+IFS=$as_save_IFS
+  if test -z "$ac_cv_path_lt_DD"; then
+    :
+  fi
+else
+  ac_cv_path_lt_DD=$lt_DD
+fi
+
+rm -f conftest.i conftest2.i conftest.out
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_lt_DD" >&5
+$as_echo "$ac_cv_path_lt_DD" >&6; }
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to truncate binary pipes" >&5
+$as_echo_n "checking how to truncate binary pipes... " >&6; }
+if ${lt_cv_truncate_bin+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  printf 0123456789abcdef0123456789abcdef >conftest.i
+cat conftest.i conftest.i >conftest2.i
+lt_cv_truncate_bin=
+if "$ac_cv_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then
+  cmp -s conftest.i conftest.out \
+  && lt_cv_truncate_bin="$ac_cv_path_lt_DD bs=4096 count=1"
+fi
+rm -f conftest.i conftest2.i conftest.out
+test -z "$lt_cv_truncate_bin" && lt_cv_truncate_bin="$SED -e 4q"
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_truncate_bin" >&5
+$as_echo "$lt_cv_truncate_bin" >&6; }
+
+
+
+
+
+
+
+# Calculate cc_basename.  Skip known compiler wrappers and cross-prefix.
+func_cc_basename ()
+{
+    for cc_temp in $*""; do
+      case $cc_temp in
+        compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
+        distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
+        \-*) ;;
+        *) break;;
+      esac
+    done
+    func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
+}
+
+# Check whether --enable-libtool-lock was given.
+if test "${enable_libtool_lock+set}" = set; then :
+  enableval=$enable_libtool_lock;
+fi
+
+test no = "$enable_libtool_lock" || enable_libtool_lock=yes
+
+# Some flags need to be propagated to the compiler or linker for good
+# libtool support.
+case $host in
+ia64-*-hpux*)
+  # Find out what ABI is being produced by ac_compile, and set mode
+  # options accordingly.
+  echo 'int i;' > conftest.$ac_ext
+  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then
+    case `/usr/bin/file conftest.$ac_objext` in
+      *ELF-32*)
+	HPUX_IA64_MODE=32
+	;;
+      *ELF-64*)
+	HPUX_IA64_MODE=64
+	;;
+    esac
+  fi
+  rm -rf conftest*
+  ;;
+*-*-irix6*)
+  # Find out what ABI is being produced by ac_compile, and set linker
+  # options accordingly.
+  echo '#line '$LINENO' "configure"' > conftest.$ac_ext
+  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then
+    if test yes = "$lt_cv_prog_gnu_ld"; then
+      case `/usr/bin/file conftest.$ac_objext` in
+	*32-bit*)
+	  LD="${LD-ld} -melf32bsmip"
+	  ;;
+	*N32*)
+	  LD="${LD-ld} -melf32bmipn32"
+	  ;;
+	*64-bit*)
+	  LD="${LD-ld} -melf64bmip"
+	;;
+      esac
+    else
+      case `/usr/bin/file conftest.$ac_objext` in
+	*32-bit*)
+	  LD="${LD-ld} -32"
+	  ;;
+	*N32*)
+	  LD="${LD-ld} -n32"
+	  ;;
+	*64-bit*)
+	  LD="${LD-ld} -64"
+	  ;;
+      esac
+    fi
+  fi
+  rm -rf conftest*
+  ;;
+
+mips64*-*linux*)
+  # Find out what ABI is being produced by ac_compile, and set linker
+  # options accordingly.
+  echo '#line '$LINENO' "configure"' > conftest.$ac_ext
+  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then
+    emul=elf
+    case `/usr/bin/file conftest.$ac_objext` in
+      *32-bit*)
+	emul="${emul}32"
+	;;
+      *64-bit*)
+	emul="${emul}64"
+	;;
+    esac
+    case `/usr/bin/file conftest.$ac_objext` in
+      *MSB*)
+	emul="${emul}btsmip"
+	;;
+      *LSB*)
+	emul="${emul}ltsmip"
+	;;
+    esac
+    case `/usr/bin/file conftest.$ac_objext` in
+      *N32*)
+	emul="${emul}n32"
+	;;
+    esac
+    LD="${LD-ld} -m $emul"
+  fi
+  rm -rf conftest*
+  ;;
+
+x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \
+s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
+  # Find out what ABI is being produced by ac_compile, and set linker
+  # options accordingly.  Note that the listed cases only cover the
+  # situations where additional linker options are needed (such as when
+  # doing 32-bit compilation for a host where ld defaults to 64-bit, or
+  # vice versa); the common cases where no linker options are needed do
+  # not appear in the list.
+  echo 'int i;' > conftest.$ac_ext
+  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then
+    case `/usr/bin/file conftest.o` in
+      *32-bit*)
+	case $host in
+	  x86_64-*kfreebsd*-gnu)
+	    LD="${LD-ld} -m elf_i386_fbsd"
+	    ;;
+	  x86_64-*linux*)
+	    case `/usr/bin/file conftest.o` in
+	      *x86-64*)
+		LD="${LD-ld} -m elf32_x86_64"
+		;;
+	      *)
+		LD="${LD-ld} -m elf_i386"
+		;;
+	    esac
+	    ;;
+	  powerpc64le-*linux*)
+	    LD="${LD-ld} -m elf32lppclinux"
+	    ;;
+	  powerpc64-*linux*)
+	    LD="${LD-ld} -m elf32ppclinux"
+	    ;;
+	  s390x-*linux*)
+	    LD="${LD-ld} -m elf_s390"
+	    ;;
+	  sparc64-*linux*)
+	    LD="${LD-ld} -m elf32_sparc"
+	    ;;
+	esac
+	;;
+      *64-bit*)
+	case $host in
+	  x86_64-*kfreebsd*-gnu)
+	    LD="${LD-ld} -m elf_x86_64_fbsd"
+	    ;;
+	  x86_64-*linux*)
+	    LD="${LD-ld} -m elf_x86_64"
+	    ;;
+	  powerpcle-*linux*)
+	    LD="${LD-ld} -m elf64lppc"
+	    ;;
+	  powerpc-*linux*)
+	    LD="${LD-ld} -m elf64ppc"
+	    ;;
+	  s390*-*linux*|s390*-*tpf*)
+	    LD="${LD-ld} -m elf64_s390"
+	    ;;
+	  sparc*-*linux*)
+	    LD="${LD-ld} -m elf64_sparc"
+	    ;;
+	esac
+	;;
+    esac
+  fi
+  rm -rf conftest*
+  ;;
+
+*-*-sco3.2v5*)
+  # On SCO OpenServer 5, we need -belf to get full-featured binaries.
+  SAVE_CFLAGS=$CFLAGS
+  CFLAGS="$CFLAGS -belf"
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler needs -belf" >&5
+$as_echo_n "checking whether the C compiler needs -belf... " >&6; }
+if ${lt_cv_cc_needs_belf+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  lt_cv_cc_needs_belf=yes
+else
+  lt_cv_cc_needs_belf=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+     ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_cc_needs_belf" >&5
+$as_echo "$lt_cv_cc_needs_belf" >&6; }
+  if test yes != "$lt_cv_cc_needs_belf"; then
+    # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
+    CFLAGS=$SAVE_CFLAGS
+  fi
+  ;;
+*-*solaris*)
+  # Find out what ABI is being produced by ac_compile, and set linker
+  # options accordingly.
+  echo 'int i;' > conftest.$ac_ext
+  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then
+    case `/usr/bin/file conftest.o` in
+    *64-bit*)
+      case $lt_cv_prog_gnu_ld in
+      yes*)
+        case $host in
+        i?86-*-solaris*|x86_64-*-solaris*)
+          LD="${LD-ld} -m elf_x86_64"
+          ;;
+        sparc*-*-solaris*)
+          LD="${LD-ld} -m elf64_sparc"
+          ;;
+        esac
+        # GNU ld 2.21 introduced _sol2 emulations.  Use them if available.
+        if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then
+          LD=${LD-ld}_sol2
+        fi
+        ;;
+      *)
+	if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
+	  LD="${LD-ld} -64"
+	fi
+	;;
+      esac
+      ;;
+    esac
+  fi
+  rm -rf conftest*
+  ;;
+esac
+
+need_locks=$enable_libtool_lock
+
+if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}mt", so it can be a program name with args.
+set dummy ${ac_tool_prefix}mt; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_MANIFEST_TOOL+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$MANIFEST_TOOL"; then
+  ac_cv_prog_MANIFEST_TOOL="$MANIFEST_TOOL" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_MANIFEST_TOOL="${ac_tool_prefix}mt"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+MANIFEST_TOOL=$ac_cv_prog_MANIFEST_TOOL
+if test -n "$MANIFEST_TOOL"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MANIFEST_TOOL" >&5
+$as_echo "$MANIFEST_TOOL" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_MANIFEST_TOOL"; then
+  ac_ct_MANIFEST_TOOL=$MANIFEST_TOOL
+  # Extract the first word of "mt", so it can be a program name with args.
+set dummy mt; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_MANIFEST_TOOL+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$ac_ct_MANIFEST_TOOL"; then
+  ac_cv_prog_ac_ct_MANIFEST_TOOL="$ac_ct_MANIFEST_TOOL" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_ac_ct_MANIFEST_TOOL="mt"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_MANIFEST_TOOL=$ac_cv_prog_ac_ct_MANIFEST_TOOL
+if test -n "$ac_ct_MANIFEST_TOOL"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MANIFEST_TOOL" >&5
+$as_echo "$ac_ct_MANIFEST_TOOL" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+  if test "x$ac_ct_MANIFEST_TOOL" = x; then
+    MANIFEST_TOOL=":"
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+    MANIFEST_TOOL=$ac_ct_MANIFEST_TOOL
+  fi
+else
+  MANIFEST_TOOL="$ac_cv_prog_MANIFEST_TOOL"
+fi
+
+test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $MANIFEST_TOOL is a manifest tool" >&5
+$as_echo_n "checking if $MANIFEST_TOOL is a manifest tool... " >&6; }
+if ${lt_cv_path_mainfest_tool+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  lt_cv_path_mainfest_tool=no
+  echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&5
+  $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out
+  cat conftest.err >&5
+  if $GREP 'Manifest Tool' conftest.out > /dev/null; then
+    lt_cv_path_mainfest_tool=yes
+  fi
+  rm -f conftest*
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_mainfest_tool" >&5
+$as_echo "$lt_cv_path_mainfest_tool" >&6; }
+if test yes != "$lt_cv_path_mainfest_tool"; then
+  MANIFEST_TOOL=:
+fi
+
+
+
+
+
+
   case $host_os in
     rhapsody* | darwin*)
     if test -n "$ac_tool_prefix"; then
@@ -10753,7 +11732,7 @@ if ${lt_cv_apple_cc_single_mod+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   lt_cv_apple_cc_single_mod=no
-      if test -z "${LT_MULTI_MODULE}"; then
+      if test -z "$LT_MULTI_MODULE"; then
 	# By default we will add the -single_module flag. You can override
 	# by either setting the environment variable LT_MULTI_MODULE
 	# non-empty at configure time, or by adding -multi_module to the
@@ -10765,7 +11744,13 @@ else
 	$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
 	  -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
         _lt_result=$?
-	if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then
+	# If there is a non-empty error log, and "single_module"
+	# appears in it, assume the flag caused a linker warning
+        if test -s conftest.err && $GREP single_module conftest.err; then
+	  cat conftest.err >&5
+	# Otherwise, if the output was created with a 0 exit code from
+	# the compiler, it worked.
+	elif test -f libconftest.dylib && test 0 = "$_lt_result"; then
 	  lt_cv_apple_cc_single_mod=yes
 	else
 	  cat conftest.err >&5
@@ -10776,6 +11761,7 @@ else
 fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_apple_cc_single_mod" >&5
 $as_echo "$lt_cv_apple_cc_single_mod" >&6; }
+
     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -exported_symbols_list linker flag" >&5
 $as_echo_n "checking for -exported_symbols_list linker flag... " >&6; }
 if ${lt_cv_ld_exported_symbols_list+:} false; then :
@@ -10803,39 +11789,74 @@ else
 fi
 rm -f core conftest.err conftest.$ac_objext \
     conftest$ac_exeext conftest.$ac_ext
-	LDFLAGS="$save_LDFLAGS"
+	LDFLAGS=$save_LDFLAGS
 
 fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_exported_symbols_list" >&5
 $as_echo "$lt_cv_ld_exported_symbols_list" >&6; }
+
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -force_load linker flag" >&5
+$as_echo_n "checking for -force_load linker flag... " >&6; }
+if ${lt_cv_ld_force_load+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  lt_cv_ld_force_load=no
+      cat > conftest.c << _LT_EOF
+int forced_loaded() { return 2;}
+_LT_EOF
+      echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&5
+      $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&5
+      echo "$AR cru libconftest.a conftest.o" >&5
+      $AR cru libconftest.a conftest.o 2>&5
+      echo "$RANLIB libconftest.a" >&5
+      $RANLIB libconftest.a 2>&5
+      cat > conftest.c << _LT_EOF
+int main() { return 0;}
+_LT_EOF
+      echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&5
+      $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err
+      _lt_result=$?
+      if test -s conftest.err && $GREP force_load conftest.err; then
+	cat conftest.err >&5
+      elif test -f conftest && test 0 = "$_lt_result" && $GREP forced_load conftest >/dev/null 2>&1; then
+	lt_cv_ld_force_load=yes
+      else
+	cat conftest.err >&5
+      fi
+        rm -f conftest.err libconftest.a conftest conftest.c
+        rm -rf conftest.dSYM
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_force_load" >&5
+$as_echo "$lt_cv_ld_force_load" >&6; }
     case $host_os in
     rhapsody* | darwin1.[012])
-      _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;;
+      _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;;
     darwin1.*)
-      _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
+      _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
     darwin*) # darwin 5.x on
       # if running on 10.5 or later, the deployment target defaults
       # to the OS version, if on x86, and 10.4, the deployment
       # target defaults to 10.4. Don't you love it?
       case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
 	10.0,*86*-darwin8*|10.0,*-darwin[91]*)
-	  _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
-	10.[012]*)
-	  _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
+	  _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;;
+	10.[012][,.]*)
+	  _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
 	10.*)
-	  _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
+	  _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;;
       esac
     ;;
   esac
-    if test "$lt_cv_apple_cc_single_mod" = "yes"; then
+    if test yes = "$lt_cv_apple_cc_single_mod"; then
       _lt_dar_single_mod='$single_module'
     fi
-    if test "$lt_cv_ld_exported_symbols_list" = "yes"; then
-      _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym'
+    if test yes = "$lt_cv_ld_exported_symbols_list"; then
+      _lt_dar_export_syms=' $wl-exported_symbols_list,$output_objdir/$libname-symbols.expsym'
     else
-      _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}'
+      _lt_dar_export_syms='~$NMEDIT -s $output_objdir/$libname-symbols.expsym $lib'
     fi
-    if test "$DSYMUTIL" != ":"; then
+    if test : != "$DSYMUTIL" && test no = "$lt_cv_ld_force_load"; then
       _lt_dsymutil='~$DSYMUTIL $lib || :'
     else
       _lt_dsymutil=
@@ -10843,6 +11864,41 @@ $as_echo "$lt_cv_ld_exported_symbols_list" >&6; }
     ;;
   esac
 
+# func_munge_path_list VARIABLE PATH
+# -----------------------------------
+# VARIABLE is name of variable containing _space_ separated list of
+# directories to be munged by the contents of PATH, which is string
+# having a format:
+# "DIR[:DIR]:"
+#       string "DIR[ DIR]" will be prepended to VARIABLE
+# ":DIR[:DIR]"
+#       string "DIR[ DIR]" will be appended to VARIABLE
+# "DIRP[:DIRP]::[DIRA:]DIRA"
+#       string "DIRP[ DIRP]" will be prepended to VARIABLE and string
+#       "DIRA[ DIRA]" will be appended to VARIABLE
+# "DIR[:DIR]"
+#       VARIABLE will be replaced by "DIR[ DIR]"
+func_munge_path_list ()
+{
+    case x$2 in
+    x)
+        ;;
+    *:)
+        eval $1=\"`$ECHO $2 | $SED 's/:/ /g'` \$$1\"
+        ;;
+    x:*)
+        eval $1=\"\$$1 `$ECHO $2 | $SED 's/:/ /g'`\"
+        ;;
+    *::*)
+        eval $1=\"\$$1\ `$ECHO $2 | $SED -e 's/.*:://' -e 's/:/ /g'`\"
+        eval $1=\"`$ECHO $2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \$$1\"
+        ;;
+    *)
+        eval $1=\"`$ECHO $2 | $SED 's/:/ /g'`\"
+        ;;
+    esac
+}
+
 for ac_header in dlfcn.h
 do :
   ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default
@@ -10858,677 +11914,166 @@ done
 
 
 
-ac_ext=cpp
-ac_cpp='$CXXCPP $CPPFLAGS'
-ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
-if test -z "$CXX"; then
-  if test -n "$CCC"; then
-    CXX=$CCC
-  else
-    if test -n "$ac_tool_prefix"; then
-  for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
-  do
-    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
-set dummy $ac_tool_prefix$ac_prog; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_CXX+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  if test -n "$CXX"; then
-  ac_cv_prog_CXX="$CXX" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_exec_ext in '' $ac_executable_extensions; do
-  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-    ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-  done
-IFS=$as_save_IFS
+func_stripname_cnf ()
+{
+  case $2 in
+  .*) func_stripname_result=`$ECHO "$3" | $SED "s%^$1%%; s%\\\\$2\$%%"`;;
+  *)  func_stripname_result=`$ECHO "$3" | $SED "s%^$1%%; s%$2\$%%"`;;
+  esac
+} # func_stripname_cnf
 
-fi
-fi
-CXX=$ac_cv_prog_CXX
-if test -n "$CXX"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
-$as_echo "$CXX" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
 
 
-    test -n "$CXX" && break
-  done
-fi
-if test -z "$CXX"; then
-  ac_ct_CXX=$CXX
-  for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
-do
-  # Extract the first word of "$ac_prog", so it can be a program name with args.
-set dummy $ac_prog; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_ac_ct_CXX+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  if test -n "$ac_ct_CXX"; then
-  ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_exec_ext in '' $ac_executable_extensions; do
-  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-    ac_cv_prog_ac_ct_CXX="$ac_prog"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-  done
-IFS=$as_save_IFS
 
-fi
-fi
-ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
-if test -n "$ac_ct_CXX"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
-$as_echo "$ac_ct_CXX" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
 
 
-  test -n "$ac_ct_CXX" && break
-done
+# Set options
 
-  if test "x$ac_ct_CXX" = x; then
-    CXX="g++"
-  else
-    case $cross_compiling:$ac_tool_warned in
-yes:)
-{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
-ac_tool_warned=yes ;;
-esac
-    CXX=$ac_ct_CXX
-  fi
-fi
 
-  fi
-fi
-# Provide some information about the compiler.
-$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
-set X $ac_compile
-ac_compiler=$2
-for ac_option in --version -v -V -qversion; do
-  { { ac_try="$ac_compiler $ac_option >&5"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
-  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
-  ac_status=$?
-  if test -s conftest.err; then
-    sed '10a\
-... rest of stderr output deleted ...
-         10q' conftest.err >conftest.er1
-    cat conftest.er1 >&5
-  fi
-  rm -f conftest.er1 conftest.err
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; }
-done
 
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
-$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
-if ${ac_cv_cxx_compiler_gnu+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
+        enable_dlopen=no
 
-int
-main ()
-{
-#ifndef __GNUC__
-       choke me
-#endif
 
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_cxx_try_compile "$LINENO"; then :
-  ac_compiler_gnu=yes
-else
-  ac_compiler_gnu=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
+  enable_win32_dll=no
 
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
-$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
-if test $ac_compiler_gnu = yes; then
-  GXX=yes
+
+            # Check whether --enable-shared was given.
+if test "${enable_shared+set}" = set; then :
+  enableval=$enable_shared; p=${PACKAGE-default}
+    case $enableval in
+    yes) enable_shared=yes ;;
+    no) enable_shared=no ;;
+    *)
+      enable_shared=no
+      # Look at the argument we got.  We use all the common list separators.
+      lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
+      for pkg in $enableval; do
+	IFS=$lt_save_ifs
+	if test "X$pkg" = "X$p"; then
+	  enable_shared=yes
+	fi
+      done
+      IFS=$lt_save_ifs
+      ;;
+    esac
 else
-  GXX=
+  enable_shared=yes
 fi
-ac_test_CXXFLAGS=${CXXFLAGS+set}
-ac_save_CXXFLAGS=$CXXFLAGS
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
-$as_echo_n "checking whether $CXX accepts -g... " >&6; }
-if ${ac_cv_prog_cxx_g+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  ac_save_cxx_werror_flag=$ac_cxx_werror_flag
-   ac_cxx_werror_flag=yes
-   ac_cv_prog_cxx_g=no
-   CXXFLAGS="-g"
-   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
 
-int
-main ()
-{
 
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_cxx_try_compile "$LINENO"; then :
-  ac_cv_prog_cxx_g=yes
-else
-  CXXFLAGS=""
-      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
 
-int
-main ()
-{
 
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_cxx_try_compile "$LINENO"; then :
 
-else
-  ac_cxx_werror_flag=$ac_save_cxx_werror_flag
-	 CXXFLAGS="-g"
-	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
 
-int
-main ()
-{
 
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_cxx_try_compile "$LINENO"; then :
-  ac_cv_prog_cxx_g=yes
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
-$as_echo "$ac_cv_prog_cxx_g" >&6; }
-if test "$ac_test_CXXFLAGS" = set; then
-  CXXFLAGS=$ac_save_CXXFLAGS
-elif test $ac_cv_prog_cxx_g = yes; then
-  if test "$GXX" = yes; then
-    CXXFLAGS="-g -O2"
-  else
-    CXXFLAGS="-g"
-  fi
-else
-  if test "$GXX" = yes; then
-    CXXFLAGS="-O2"
-  else
-    CXXFLAGS=
-  fi
-fi
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
 
-if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
-    ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
-    (test "X$CXX" != "Xg++"))) ; then
-  ac_ext=cpp
-ac_cpp='$CXXCPP $CPPFLAGS'
-ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
-$as_echo_n "checking how to run the C++ preprocessor... " >&6; }
-if test -z "$CXXCPP"; then
-  if ${ac_cv_prog_CXXCPP+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-      # Double quotes because CXXCPP needs to be expanded
-    for CXXCPP in "$CXX -E" "/lib/cpp"
-    do
-      ac_preproc_ok=false
-for ac_cxx_preproc_warn_flag in '' yes
-do
-  # Use a header file that comes with gcc, so configuring glibc
-  # with a fresh cross-compiler works.
-  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
-  # <limits.h> exists even on freestanding compilers.
-  # On the NeXT, cc -E runs the code through the compiler's parser,
-  # not just through cpp. "Syntax error" is here to catch this case.
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-		     Syntax error
-_ACEOF
-if ac_fn_cxx_try_cpp "$LINENO"; then :
 
-else
-  # Broken: fails on valid input.
-continue
-fi
-rm -f conftest.err conftest.i conftest.$ac_ext
 
-  # OK, works on sane cases.  Now check whether nonexistent headers
-  # can be detected and how.
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <ac_nonexistent.h>
-_ACEOF
-if ac_fn_cxx_try_cpp "$LINENO"; then :
-  # Broken: success on invalid input.
-continue
-else
-  # Passes both tests.
-ac_preproc_ok=:
-break
-fi
-rm -f conftest.err conftest.i conftest.$ac_ext
 
-done
-# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
-rm -f conftest.i conftest.err conftest.$ac_ext
-if $ac_preproc_ok; then :
-  break
+# Check whether --with-pic was given.
+if test "${with_pic+set}" = set; then :
+  withval=$with_pic; lt_p=${PACKAGE-default}
+    case $withval in
+    yes|no) pic_mode=$withval ;;
+    *)
+      pic_mode=default
+      # Look at the argument we got.  We use all the common list separators.
+      lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
+      for lt_pkg in $withval; do
+	IFS=$lt_save_ifs
+	if test "X$lt_pkg" = "X$lt_p"; then
+	  pic_mode=yes
+	fi
+      done
+      IFS=$lt_save_ifs
+      ;;
+    esac
+else
+  pic_mode=default
 fi
 
-    done
-    ac_cv_prog_CXXCPP=$CXXCPP
 
-fi
-  CXXCPP=$ac_cv_prog_CXXCPP
-else
-  ac_cv_prog_CXXCPP=$CXXCPP
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
-$as_echo "$CXXCPP" >&6; }
-ac_preproc_ok=false
-for ac_cxx_preproc_warn_flag in '' yes
-do
-  # Use a header file that comes with gcc, so configuring glibc
-  # with a fresh cross-compiler works.
-  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
-  # <limits.h> exists even on freestanding compilers.
-  # On the NeXT, cc -E runs the code through the compiler's parser,
-  # not just through cpp. "Syntax error" is here to catch this case.
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-		     Syntax error
-_ACEOF
-if ac_fn_cxx_try_cpp "$LINENO"; then :
 
-else
-  # Broken: fails on valid input.
-continue
-fi
-rm -f conftest.err conftest.i conftest.$ac_ext
 
-  # OK, works on sane cases.  Now check whether nonexistent headers
-  # can be detected and how.
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <ac_nonexistent.h>
-_ACEOF
-if ac_fn_cxx_try_cpp "$LINENO"; then :
-  # Broken: success on invalid input.
-continue
-else
-  # Passes both tests.
-ac_preproc_ok=:
-break
-fi
-rm -f conftest.err conftest.i conftest.$ac_ext
 
-done
-# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
-rm -f conftest.i conftest.err conftest.$ac_ext
-if $ac_preproc_ok; then :
 
-else
-  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-_lt_caught_CXX_error=yes; }
-fi
 
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
 
+  # Check whether --enable-fast-install was given.
+if test "${enable_fast_install+set}" = set; then :
+  enableval=$enable_fast_install; p=${PACKAGE-default}
+    case $enableval in
+    yes) enable_fast_install=yes ;;
+    no) enable_fast_install=no ;;
+    *)
+      enable_fast_install=no
+      # Look at the argument we got.  We use all the common list separators.
+      lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
+      for pkg in $enableval; do
+	IFS=$lt_save_ifs
+	if test "X$pkg" = "X$p"; then
+	  enable_fast_install=yes
+	fi
+      done
+      IFS=$lt_save_ifs
+      ;;
+    esac
 else
-  _lt_caught_CXX_error=yes
+  enable_fast_install=yes
 fi
 
 
 
 
 
-ac_ext=f
-ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5'
-ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_f77_compiler_gnu
-if test -n "$ac_tool_prefix"; then
-  for ac_prog in g77 xlf f77 frt pgf77 cf77 fort77 fl32 af77 xlf90 f90 pgf90 pghpf epcf90 gfortran g95 xlf95 f95 fort ifort ifc efc pgfortran pgf95 lf95 ftn nagfor
-  do
-    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
-set dummy $ac_tool_prefix$ac_prog; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_F77+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  if test -n "$F77"; then
-  ac_cv_prog_F77="$F77" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_exec_ext in '' $ac_executable_extensions; do
-  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-    ac_cv_prog_F77="$ac_tool_prefix$ac_prog"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-  done
-IFS=$as_save_IFS
 
-fi
-fi
-F77=$ac_cv_prog_F77
-if test -n "$F77"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $F77" >&5
-$as_echo "$F77" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
 
 
-    test -n "$F77" && break
-  done
-fi
-if test -z "$F77"; then
-  ac_ct_F77=$F77
-  for ac_prog in g77 xlf f77 frt pgf77 cf77 fort77 fl32 af77 xlf90 f90 pgf90 pghpf epcf90 gfortran g95 xlf95 f95 fort ifort ifc efc pgfortran pgf95 lf95 ftn nagfor
-do
-  # Extract the first word of "$ac_prog", so it can be a program name with args.
-set dummy $ac_prog; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_ac_ct_F77+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  if test -n "$ac_ct_F77"; then
-  ac_cv_prog_ac_ct_F77="$ac_ct_F77" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_exec_ext in '' $ac_executable_extensions; do
-  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-    ac_cv_prog_ac_ct_F77="$ac_prog"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-  done
-IFS=$as_save_IFS
+  shared_archive_member_spec=
+case $host,$enable_shared in
+power*-*-aix[5-9]*,yes)
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of shared library versioning to provide" >&5
+$as_echo_n "checking which variant of shared library versioning to provide... " >&6; }
 
-fi
-fi
-ac_ct_F77=$ac_cv_prog_ac_ct_F77
-if test -n "$ac_ct_F77"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_F77" >&5
-$as_echo "$ac_ct_F77" >&6; }
+# Check whether --with-aix-soname was given.
+if test "${with_aix_soname+set}" = set; then :
+  withval=$with_aix_soname; case $withval in
+    aix|svr4|both)
+      ;;
+    *)
+      as_fn_error $? "Unknown argument to --with-aix-soname" "$LINENO" 5
+      ;;
+    esac
+    lt_cv_with_aix_soname=$with_aix_soname
 else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+  if ${lt_cv_with_aix_soname+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  lt_cv_with_aix_soname=aix
 fi
 
+    with_aix_soname=$lt_cv_with_aix_soname
+fi
 
-  test -n "$ac_ct_F77" && break
-done
-
-  if test "x$ac_ct_F77" = x; then
-    F77=""
-  else
-    case $cross_compiling:$ac_tool_warned in
-yes:)
-{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
-ac_tool_warned=yes ;;
-esac
-    F77=$ac_ct_F77
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_aix_soname" >&5
+$as_echo "$with_aix_soname" >&6; }
+  if test aix != "$with_aix_soname"; then
+    # For the AIX way of multilib, we name the shared archive member
+    # based on the bitwidth used, traditionally 'shr.o' or 'shr_64.o',
+    # and 'shr.imp' or 'shr_64.imp', respectively, for the Import File.
+    # Even when GNU compilers ignore OBJECT_MODE but need '-maix64' flag,
+    # the AIX toolchain works better with OBJECT_MODE set (default 32).
+    if test 64 = "${OBJECT_MODE-32}"; then
+      shared_archive_member_spec=shr_64
+    else
+      shared_archive_member_spec=shr
+    fi
   fi
-fi
-
-
-# Provide some information about the compiler.
-$as_echo "$as_me:${as_lineno-$LINENO}: checking for Fortran 77 compiler version" >&5
-set X $ac_compile
-ac_compiler=$2
-for ac_option in --version -v -V -qversion; do
-  { { ac_try="$ac_compiler $ac_option >&5"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
+  ;;
+*)
+  with_aix_soname=aix
+  ;;
 esac
-eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
-  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
-  ac_status=$?
-  if test -s conftest.err; then
-    sed '10a\
-... rest of stderr output deleted ...
-         10q' conftest.err >conftest.er1
-    cat conftest.er1 >&5
-  fi
-  rm -f conftest.er1 conftest.err
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; }
-done
-rm -f a.out
-
-# If we don't use `.F' as extension, the preprocessor is not run on the
-# input file.  (Note that this only needs to work for GNU compilers.)
-ac_save_ext=$ac_ext
-ac_ext=F
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU Fortran 77 compiler" >&5
-$as_echo_n "checking whether we are using the GNU Fortran 77 compiler... " >&6; }
-if ${ac_cv_f77_compiler_gnu+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  cat > conftest.$ac_ext <<_ACEOF
-      program main
-#ifndef __GNUC__
-       choke me
-#endif
-
-      end
-_ACEOF
-if ac_fn_f77_try_compile "$LINENO"; then :
-  ac_compiler_gnu=yes
-else
-  ac_compiler_gnu=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-ac_cv_f77_compiler_gnu=$ac_compiler_gnu
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_f77_compiler_gnu" >&5
-$as_echo "$ac_cv_f77_compiler_gnu" >&6; }
-ac_ext=$ac_save_ext
-ac_test_FFLAGS=${FFLAGS+set}
-ac_save_FFLAGS=$FFLAGS
-FFLAGS=
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $F77 accepts -g" >&5
-$as_echo_n "checking whether $F77 accepts -g... " >&6; }
-if ${ac_cv_prog_f77_g+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  FFLAGS=-g
-cat > conftest.$ac_ext <<_ACEOF
-      program main
-
-      end
-_ACEOF
-if ac_fn_f77_try_compile "$LINENO"; then :
-  ac_cv_prog_f77_g=yes
-else
-  ac_cv_prog_f77_g=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_f77_g" >&5
-$as_echo "$ac_cv_prog_f77_g" >&6; }
-if test "$ac_test_FFLAGS" = set; then
-  FFLAGS=$ac_save_FFLAGS
-elif test $ac_cv_prog_f77_g = yes; then
-  if test "x$ac_cv_f77_compiler_gnu" = xyes; then
-    FFLAGS="-g -O2"
-  else
-    FFLAGS="-g"
-  fi
-else
-  if test "x$ac_cv_f77_compiler_gnu" = xyes; then
-    FFLAGS="-O2"
-  else
-    FFLAGS=
-  fi
-fi
-
-if test $ac_compiler_gnu = yes; then
-  G77=yes
-else
-  G77=
-fi
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
-if test -z "$F77" || test "X$F77" = "Xno"; then
-  _lt_disable_F77=yes
-fi
-
-
-
-
-
-# Set options
-
-
-
-        enable_dlopen=no
-
-
-  enable_win32_dll=no
-
-
-            # Check whether --enable-shared was given.
-if test "${enable_shared+set}" = set; then :
-  enableval=$enable_shared; p=${PACKAGE-default}
-    case $enableval in
-    yes) enable_shared=yes ;;
-    no) enable_shared=no ;;
-    *)
-      enable_shared=no
-      # Look at the argument we got.  We use all the common list separators.
-      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
-      for pkg in $enableval; do
-	IFS="$lt_save_ifs"
-	if test "X$pkg" = "X$p"; then
-	  enable_shared=yes
-	fi
-      done
-      IFS="$lt_save_ifs"
-      ;;
-    esac
-else
-  enable_shared=yes
-fi
-
-
-
-
-
-
-
-
-
-
-
-# Check whether --with-pic was given.
-if test "${with_pic+set}" = set; then :
-  withval=$with_pic; pic_mode="$withval"
-else
-  pic_mode=default
-fi
-
-
-test -z "$pic_mode" && pic_mode=default
 
 
 
@@ -11536,44 +12081,19 @@ test -z "$pic_mode" && pic_mode=default
 
 
 
-  # Check whether --enable-fast-install was given.
-if test "${enable_fast_install+set}" = set; then :
-  enableval=$enable_fast_install; p=${PACKAGE-default}
-    case $enableval in
-    yes) enable_fast_install=yes ;;
-    no) enable_fast_install=no ;;
-    *)
-      enable_fast_install=no
-      # Look at the argument we got.  We use all the common list separators.
-      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
-      for pkg in $enableval; do
-	IFS="$lt_save_ifs"
-	if test "X$pkg" = "X$p"; then
-	  enable_fast_install=yes
-	fi
-      done
-      IFS="$lt_save_ifs"
-      ;;
-    esac
-else
-  enable_fast_install=yes
-fi
-
-
-
 
 
 
+# This can be used to rebuild libtool when needed
+LIBTOOL_DEPS=$ltmain
 
+# Always use our own libtool.
+LIBTOOL='$(SHELL) $(top_builddir)/libtool'
 
 
 
 
-# This can be used to rebuild libtool when needed
-LIBTOOL_DEPS="$ltmain"
 
-# Always use our own libtool.
-LIBTOOL='$(SHELL) $(top_builddir)/libtool'
 
 
 
@@ -11614,7 +12134,7 @@ test -z "$LN_S" && LN_S="ln -s"
 
 
 
-if test -n "${ZSH_VERSION+set}" ; then
+if test -n "${ZSH_VERSION+set}"; then
    setopt NO_GLOB_SUBST
 fi
 
@@ -11648,60 +12168,30 @@ _ACEOF
 
 
 
-
-
-
-
-
-
-
-
-
-
-
-
-
 case $host_os in
 aix3*)
   # AIX sometimes has problems with the GCC collect2 program.  For some
   # reason, if we set the COLLECT_NAMES environment variable, the problems
   # vanish in a puff of smoke.
-  if test "X${COLLECT_NAMES+set}" != Xset; then
+  if test set != "${COLLECT_NAMES+set}"; then
     COLLECT_NAMES=
     export COLLECT_NAMES
   fi
   ;;
 esac
 
-# Sed substitution that helps us do robust quoting.  It backslashifies
-# metacharacters that are still active within double-quoted strings.
-sed_quote_subst='s/\(["`$\\]\)/\\\1/g'
-
-# Same as above, but do not quote variable references.
-double_quote_subst='s/\(["`\\]\)/\\\1/g'
-
-# Sed substitution to delay expansion of an escaped shell variable in a
-# double_quote_subst'ed string.
-delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
-
-# Sed substitution to delay expansion of an escaped single quote.
-delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
-
-# Sed substitution to avoid accidental globbing in evaled expressions
-no_glob_subst='s/\*/\\\*/g'
-
 # Global variables:
 ofile=libtool
 can_build_shared=yes
 
-# All known linkers require a `.a' archive for static linking (except MSVC,
+# All known linkers require a '.a' archive for static linking (except MSVC,
 # which needs '.lib').
 libext=a
 
-with_gnu_ld="$lt_cv_prog_gnu_ld"
+with_gnu_ld=$lt_cv_prog_gnu_ld
 
-old_CC="$CC"
-old_CFLAGS="$CFLAGS"
+old_CC=$CC
+old_CFLAGS=$CFLAGS
 
 # Set sane defaults for various variables
 test -z "$CC" && CC=cc
@@ -11710,15 +12200,8 @@ test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
 test -z "$LD" && LD=ld
 test -z "$ac_objext" && ac_objext=o
 
-for cc_temp in $compiler""; do
-  case $cc_temp in
-    compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
-    distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
-    \-*) ;;
-    *) break;;
-  esac
-done
-cc_basename=`$ECHO "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
+func_cc_basename $compiler
+cc_basename=$func_cc_basename_result
 
 
 # Only perform the check for file, if the check method requires it
@@ -11733,22 +12216,22 @@ if ${lt_cv_path_MAGIC_CMD+:} false; then :
 else
   case $MAGIC_CMD in
 [\\/*] |  ?:[\\/]*)
-  lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
+  lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path.
   ;;
 *)
-  lt_save_MAGIC_CMD="$MAGIC_CMD"
-  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+  lt_save_MAGIC_CMD=$MAGIC_CMD
+  lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
   ac_dummy="/usr/bin$PATH_SEPARATOR$PATH"
   for ac_dir in $ac_dummy; do
-    IFS="$lt_save_ifs"
+    IFS=$lt_save_ifs
     test -z "$ac_dir" && ac_dir=.
-    if test -f $ac_dir/${ac_tool_prefix}file; then
-      lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file"
+    if test -f "$ac_dir/${ac_tool_prefix}file"; then
+      lt_cv_path_MAGIC_CMD=$ac_dir/"${ac_tool_prefix}file"
       if test -n "$file_magic_test_file"; then
 	case $deplibs_check_method in
 	"file_magic "*)
 	  file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
-	  MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
+	  MAGIC_CMD=$lt_cv_path_MAGIC_CMD
 	  if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
 	    $EGREP "$file_magic_regex" > /dev/null; then
 	    :
@@ -11771,13 +12254,13 @@ _LT_EOF
       break
     fi
   done
-  IFS="$lt_save_ifs"
-  MAGIC_CMD="$lt_save_MAGIC_CMD"
+  IFS=$lt_save_ifs
+  MAGIC_CMD=$lt_save_MAGIC_CMD
   ;;
 esac
 fi
 
-MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
+MAGIC_CMD=$lt_cv_path_MAGIC_CMD
 if test -n "$MAGIC_CMD"; then
   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5
 $as_echo "$MAGIC_CMD" >&6; }
@@ -11799,22 +12282,22 @@ if ${lt_cv_path_MAGIC_CMD+:} false; then :
 else
   case $MAGIC_CMD in
 [\\/*] |  ?:[\\/]*)
-  lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
+  lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path.
   ;;
 *)
-  lt_save_MAGIC_CMD="$MAGIC_CMD"
-  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+  lt_save_MAGIC_CMD=$MAGIC_CMD
+  lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
   ac_dummy="/usr/bin$PATH_SEPARATOR$PATH"
   for ac_dir in $ac_dummy; do
-    IFS="$lt_save_ifs"
+    IFS=$lt_save_ifs
     test -z "$ac_dir" && ac_dir=.
-    if test -f $ac_dir/file; then
-      lt_cv_path_MAGIC_CMD="$ac_dir/file"
+    if test -f "$ac_dir/file"; then
+      lt_cv_path_MAGIC_CMD=$ac_dir/"file"
       if test -n "$file_magic_test_file"; then
 	case $deplibs_check_method in
 	"file_magic "*)
 	  file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
-	  MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
+	  MAGIC_CMD=$lt_cv_path_MAGIC_CMD
 	  if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
 	    $EGREP "$file_magic_regex" > /dev/null; then
 	    :
@@ -11837,13 +12320,13 @@ _LT_EOF
       break
     fi
   done
-  IFS="$lt_save_ifs"
-  MAGIC_CMD="$lt_save_MAGIC_CMD"
+  IFS=$lt_save_ifs
+  MAGIC_CMD=$lt_save_MAGIC_CMD
   ;;
 esac
 fi
 
-MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
+MAGIC_CMD=$lt_cv_path_MAGIC_CMD
 if test -n "$MAGIC_CMD"; then
   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5
 $as_echo "$MAGIC_CMD" >&6; }
@@ -11864,7 +12347,7 @@ esac
 
 # Use C for the default configuration in the libtool script
 
-lt_save_CC="$CC"
+lt_save_CC=$CC
 ac_ext=c
 ac_cpp='$CPP $CPPFLAGS'
 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
@@ -11926,8 +12409,13 @@ if test -n "$compiler"; then
 
 lt_prog_compiler_no_builtin_flag=
 
-if test "$GCC" = yes; then
-  lt_prog_compiler_no_builtin_flag=' -fno-builtin'
+if test yes = "$GCC"; then
+  case $cc_basename in
+  nvcc*)
+    lt_prog_compiler_no_builtin_flag=' -Xcompiler -fno-builtin' ;;
+  *)
+    lt_prog_compiler_no_builtin_flag=' -fno-builtin' ;;
+  esac
 
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
 $as_echo_n "checking if $compiler supports -fno-rtti -fno-exceptions... " >&6; }
@@ -11937,7 +12425,7 @@ else
   lt_cv_prog_compiler_rtti_exceptions=no
    ac_outfile=conftest.$ac_objext
    echo "$lt_simple_compile_test_code" > conftest.$ac_ext
-   lt_compiler_flag="-fno-rtti -fno-exceptions"
+   lt_compiler_flag="-fno-rtti -fno-exceptions"  ## exclude from sc_useless_quotes_in_assignment
    # Insert the option either (1) after the last *FLAGS variable, or
    # (2) before a word containing "conftest.", or (3) at the end.
    # Note that $ac_compile itself does not contain backslashes and begins
@@ -11947,15 +12435,15 @@ else
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:11950: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>conftest.err)
    ac_status=$?
    cat conftest.err >&5
-   echo "$as_me:11954: \$? = $ac_status" >&5
+   echo "$as_me:$LINENO: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s "$ac_outfile"; then
      # The compiler can only warn and ignore the option if not recognized
      # So say no if there are warnings other than the usual output.
-     $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
+     $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
      $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
      if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
        lt_cv_prog_compiler_rtti_exceptions=yes
@@ -11967,7 +12455,7 @@ fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_rtti_exceptions" >&5
 $as_echo "$lt_cv_prog_compiler_rtti_exceptions" >&6; }
 
-if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then
+if test yes = "$lt_cv_prog_compiler_rtti_exceptions"; then
     lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions"
 else
     :
@@ -11984,20 +12472,19 @@ fi
 lt_prog_compiler_pic=
 lt_prog_compiler_static=
 
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5
-$as_echo_n "checking for $compiler option to produce PIC... " >&6; }
 
-  if test "$GCC" = yes; then
+  if test yes = "$GCC"; then
     lt_prog_compiler_wl='-Wl,'
     lt_prog_compiler_static='-static'
 
     case $host_os in
       aix*)
       # All AIX code is PIC.
-      if test "$host_cpu" = ia64; then
+      if test ia64 = "$host_cpu"; then
 	# AIX 5 now supports IA64 processor
 	lt_prog_compiler_static='-Bstatic'
       fi
+      lt_prog_compiler_pic='-fPIC'
       ;;
 
     amigaos*)
@@ -12008,8 +12495,8 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; }
         ;;
       m68k)
             # FIXME: we need at least 68020 code to build shared libraries, but
-            # adding the `-m68020' flag to GCC prevents building anything better,
-            # like `-m68040'.
+            # adding the '-m68020' flag to GCC prevents building anything better,
+            # like '-m68040'.
             lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4'
         ;;
       esac
@@ -12025,6 +12512,11 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; }
       # Although the cygwin gcc ignores -fPIC, still need this for old-style
       # (--disable-auto-import) libraries
       lt_prog_compiler_pic='-DDLL_EXPORT'
+      case $host_os in
+      os2*)
+	lt_prog_compiler_static='$wl-static'
+	;;
+      esac
       ;;
 
     darwin* | rhapsody*)
@@ -12033,6 +12525,12 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; }
       lt_prog_compiler_pic='-fno-common'
       ;;
 
+    haiku*)
+      # PIC is the default for Haiku.
+      # The "-static" flag exists, but is broken.
+      lt_prog_compiler_static=
+      ;;
+
     hpux*)
       # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
       # PA HP-UX.  On IA64 HP-UX, PIC is the default but the pic flag
@@ -12075,12 +12573,21 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; }
       lt_prog_compiler_pic='-fPIC'
       ;;
     esac
+
+    case $cc_basename in
+    nvcc*) # Cuda Compiler Driver 2.2
+      lt_prog_compiler_wl='-Xlinker '
+      if test -n "$lt_prog_compiler_pic"; then
+        lt_prog_compiler_pic="-Xcompiler $lt_prog_compiler_pic"
+      fi
+      ;;
+    esac
   else
     # PORTME Check for flag to pass linker flags through the system compiler.
     case $host_os in
     aix*)
       lt_prog_compiler_wl='-Wl,'
-      if test "$host_cpu" = ia64; then
+      if test ia64 = "$host_cpu"; then
 	# AIX 5 now supports IA64 processor
 	lt_prog_compiler_static='-Bstatic'
       else
@@ -12088,10 +12595,29 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; }
       fi
       ;;
 
+    darwin* | rhapsody*)
+      # PIC is the default on this platform
+      # Common symbols not allowed in MH_DYLIB files
+      lt_prog_compiler_pic='-fno-common'
+      case $cc_basename in
+      nagfor*)
+        # NAG Fortran compiler
+        lt_prog_compiler_wl='-Wl,-Wl,,'
+        lt_prog_compiler_pic='-PIC'
+        lt_prog_compiler_static='-Bstatic'
+        ;;
+      esac
+      ;;
+
     mingw* | cygwin* | pw32* | os2* | cegcc*)
       # This hack is so that the source file can tell whether it is being
       # built for inclusion in a dll (and should export symbols for example).
       lt_prog_compiler_pic='-DDLL_EXPORT'
+      case $host_os in
+      os2*)
+	lt_prog_compiler_static='$wl-static'
+	;;
+      esac
       ;;
 
     hpux9* | hpux10* | hpux11*)
@@ -12107,7 +12633,7 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; }
 	;;
       esac
       # Is there a better lt_prog_compiler_static that works with the bundled CC?
-      lt_prog_compiler_static='${wl}-a ${wl}archive'
+      lt_prog_compiler_static='$wl-a ${wl}archive'
       ;;
 
     irix5* | irix6* | nonstopux*)
@@ -12116,9 +12642,9 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; }
       lt_prog_compiler_static='-non_shared'
       ;;
 
-    linux* | k*bsd*-gnu)
+    linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
       case $cc_basename in
-      # old Intel for x86_64 which still supported -KPIC.
+      # old Intel for x86_64, which still supported -KPIC.
       ecc*)
 	lt_prog_compiler_wl='-Wl,'
 	lt_prog_compiler_pic='-KPIC'
@@ -12137,7 +12663,19 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; }
 	lt_prog_compiler_pic='--shared'
 	lt_prog_compiler_static='--static'
 	;;
-      pgcc* | pgf77* | pgf90* | pgf95*)
+      nagfor*)
+	# NAG Fortran compiler
+	lt_prog_compiler_wl='-Wl,-Wl,,'
+	lt_prog_compiler_pic='-PIC'
+	lt_prog_compiler_static='-Bstatic'
+	;;
+      tcc*)
+	# Fabrice Bellard et al's Tiny C Compiler
+	lt_prog_compiler_wl='-Wl,'
+	lt_prog_compiler_pic='-fPIC'
+	lt_prog_compiler_static='-static'
+	;;
+      pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
         # Portland Group compilers (*not* the Pentium gcc compiler,
 	# which looks to be a dead project)
 	lt_prog_compiler_wl='-Wl,'
@@ -12149,25 +12687,40 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; }
         # All Alpha code is PIC.
         lt_prog_compiler_static='-non_shared'
         ;;
-      xl*)
-	# IBM XL C 8.0/Fortran 10.1 on PPC
+      xl* | bgxl* | bgf* | mpixl*)
+	# IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene
 	lt_prog_compiler_wl='-Wl,'
 	lt_prog_compiler_pic='-qpic'
 	lt_prog_compiler_static='-qstaticlink'
 	;;
       *)
 	case `$CC -V 2>&1 | sed 5q` in
+	*Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [1-7].* | *Sun*Fortran*\ 8.[0-3]*)
+	  # Sun Fortran 8.3 passes all unrecognized flags to the linker
+	  lt_prog_compiler_pic='-KPIC'
+	  lt_prog_compiler_static='-Bstatic'
+	  lt_prog_compiler_wl=''
+	  ;;
+	*Sun\ F* | *Sun*Fortran*)
+	  lt_prog_compiler_pic='-KPIC'
+	  lt_prog_compiler_static='-Bstatic'
+	  lt_prog_compiler_wl='-Qoption ld '
+	  ;;
 	*Sun\ C*)
 	  # Sun C 5.9
 	  lt_prog_compiler_pic='-KPIC'
 	  lt_prog_compiler_static='-Bstatic'
 	  lt_prog_compiler_wl='-Wl,'
 	  ;;
-	*Sun\ F*)
-	  # Sun Fortran 8.3 passes all unrecognized flags to the linker
-	  lt_prog_compiler_pic='-KPIC'
+        *Intel*\ [CF]*Compiler*)
+	  lt_prog_compiler_wl='-Wl,'
+	  lt_prog_compiler_pic='-fPIC'
+	  lt_prog_compiler_static='-static'
+	  ;;
+	*Portland\ Group*)
+	  lt_prog_compiler_wl='-Wl,'
+	  lt_prog_compiler_pic='-fpic'
 	  lt_prog_compiler_static='-Bstatic'
-	  lt_prog_compiler_wl=''
 	  ;;
 	esac
 	;;
@@ -12199,7 +12752,7 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; }
       lt_prog_compiler_pic='-KPIC'
       lt_prog_compiler_static='-Bstatic'
       case $cc_basename in
-      f77* | f90* | f95*)
+      f77* | f90* | f95* | sunf77* | sunf90* | sunf95*)
 	lt_prog_compiler_wl='-Qoption ld ';;
       *)
 	lt_prog_compiler_wl='-Wl,';;
@@ -12219,7 +12772,7 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; }
       ;;
 
     sysv4*MP*)
-      if test -d /usr/nec ;then
+      if test -d /usr/nec; then
 	lt_prog_compiler_pic='-Kconform_pic'
 	lt_prog_compiler_static='-Bstatic'
       fi
@@ -12248,7 +12801,7 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; }
   fi
 
 case $host_os in
-  # For platforms which do not support PIC, -DPIC is meaningless:
+  # For platforms that do not support PIC, -DPIC is meaningless:
   *djgpp*)
     lt_prog_compiler_pic=
     ;;
@@ -12256,13 +12809,17 @@ case $host_os in
     lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC"
     ;;
 esac
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_prog_compiler_pic" >&5
-$as_echo "$lt_prog_compiler_pic" >&6; }
-
-
-
-
 
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5
+$as_echo_n "checking for $compiler option to produce PIC... " >&6; }
+if ${lt_cv_prog_compiler_pic+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  lt_cv_prog_compiler_pic=$lt_prog_compiler_pic
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic" >&5
+$as_echo "$lt_cv_prog_compiler_pic" >&6; }
+lt_prog_compiler_pic=$lt_cv_prog_compiler_pic
 
 #
 # Check to make sure the PIC flag actually works.
@@ -12276,7 +12833,7 @@ else
   lt_cv_prog_compiler_pic_works=no
    ac_outfile=conftest.$ac_objext
    echo "$lt_simple_compile_test_code" > conftest.$ac_ext
-   lt_compiler_flag="$lt_prog_compiler_pic -DPIC"
+   lt_compiler_flag="$lt_prog_compiler_pic -DPIC"  ## exclude from sc_useless_quotes_in_assignment
    # Insert the option either (1) after the last *FLAGS variable, or
    # (2) before a word containing "conftest.", or (3) at the end.
    # Note that $ac_compile itself does not contain backslashes and begins
@@ -12286,15 +12843,15 @@ else
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:12289: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>conftest.err)
    ac_status=$?
    cat conftest.err >&5
-   echo "$as_me:12293: \$? = $ac_status" >&5
+   echo "$as_me:$LINENO: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s "$ac_outfile"; then
      # The compiler can only warn and ignore the option if not recognized
      # So say no if there are warnings other than the usual output.
-     $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
+     $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
      $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
      if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
        lt_cv_prog_compiler_pic_works=yes
@@ -12306,7 +12863,7 @@ fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works" >&5
 $as_echo "$lt_cv_prog_compiler_pic_works" >&6; }
 
-if test x"$lt_cv_prog_compiler_pic_works" = xyes; then
+if test yes = "$lt_cv_prog_compiler_pic_works"; then
     case $lt_prog_compiler_pic in
      "" | " "*) ;;
      *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;;
@@ -12323,6 +12880,11 @@ fi
 
 
 
+
+
+
+
+
 #
 # Check to make sure the static flag actually works.
 #
@@ -12333,7 +12895,7 @@ if ${lt_cv_prog_compiler_static_works+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   lt_cv_prog_compiler_static_works=no
-   save_LDFLAGS="$LDFLAGS"
+   save_LDFLAGS=$LDFLAGS
    LDFLAGS="$LDFLAGS $lt_tmp_static_flag"
    echo "$lt_simple_link_test_code" > conftest.$ac_ext
    if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
@@ -12342,7 +12904,7 @@ else
      if test -s conftest.err; then
        # Append any errors to the config.log.
        cat conftest.err 1>&5
-       $ECHO "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp
+       $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
        $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
        if diff conftest.exp conftest.er2 >/dev/null; then
          lt_cv_prog_compiler_static_works=yes
@@ -12352,13 +12914,13 @@ else
      fi
    fi
    $RM -r conftest*
-   LDFLAGS="$save_LDFLAGS"
+   LDFLAGS=$save_LDFLAGS
 
 fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works" >&5
 $as_echo "$lt_cv_prog_compiler_static_works" >&6; }
 
-if test x"$lt_cv_prog_compiler_static_works" = xyes; then
+if test yes = "$lt_cv_prog_compiler_static_works"; then
     :
 else
     lt_prog_compiler_static=
@@ -12391,16 +12953,16 @@ else
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:12394: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>out/conftest.err)
    ac_status=$?
    cat out/conftest.err >&5
-   echo "$as_me:12398: \$? = $ac_status" >&5
+   echo "$as_me:$LINENO: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s out/conftest2.$ac_objext
    then
      # The compiler can only warn and ignore the option if not recognized
      # So say no if there are warnings
-     $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
+     $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
      $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
      if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
        lt_cv_prog_compiler_c_o=yes
@@ -12446,16 +13008,16 @@ else
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:12449: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>out/conftest.err)
    ac_status=$?
    cat out/conftest.err >&5
-   echo "$as_me:12453: \$? = $ac_status" >&5
+   echo "$as_me:$LINENO: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s out/conftest2.$ac_objext
    then
      # The compiler can only warn and ignore the option if not recognized
      # So say no if there are warnings
-     $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
+     $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
      $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
      if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
        lt_cv_prog_compiler_c_o=yes
@@ -12478,8 +13040,8 @@ $as_echo "$lt_cv_prog_compiler_c_o" >&6; }
 
 
 
-hard_links="nottested"
-if test "$lt_cv_prog_compiler_c_o" = no && test "$need_locks" != no; then
+hard_links=nottested
+if test no = "$lt_cv_prog_compiler_c_o" && test no != "$need_locks"; then
   # do not overwrite the value of need_locks provided by the user
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5
 $as_echo_n "checking if we can lock with hard links... " >&6; }
@@ -12491,9 +13053,9 @@ $as_echo_n "checking if we can lock with hard links... " >&6; }
   ln conftest.a conftest.b 2>/dev/null && hard_links=no
   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5
 $as_echo "$hard_links" >&6; }
-  if test "$hard_links" = no; then
-    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5
-$as_echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;}
+  if test no = "$hard_links"; then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&5
+$as_echo "$as_me: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&2;}
     need_locks=warn
   fi
 else
@@ -12521,7 +13083,6 @@ $as_echo_n "checking whether the $compiler linker ($LD) supports shared librarie
   hardcode_direct=no
   hardcode_direct_absolute=no
   hardcode_libdir_flag_spec=
-  hardcode_libdir_flag_spec_ld=
   hardcode_libdir_separator=
   hardcode_minus_L=no
   hardcode_shlibpath_var=unsupported
@@ -12537,9 +13098,9 @@ $as_echo_n "checking whether the $compiler linker ($LD) supports shared librarie
   # included in the symbol list
   include_expsyms=
   # exclude_expsyms can be an extended regexp of symbols to exclude
-  # it will be wrapped by ` (' and `)$', so one must not match beginning or
-  # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
-  # as well as any symbol that contains `d'.
+  # it will be wrapped by ' (' and ')$', so one must not match beginning or
+  # end of line.  Example: 'a|bc|.*d.*' will exclude the symbols 'a' and 'bc',
+  # as well as any symbol that contains 'd'.
   exclude_expsyms='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'
   # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
   # platforms (ab)use it in PIC code, but their linkers get confused if
@@ -12554,7 +13115,7 @@ $as_echo_n "checking whether the $compiler linker ($LD) supports shared librarie
     # FIXME: the MSVC++ port hasn't been tested in a loooong time
     # When not using gcc, we currently assume that we are using
     # Microsoft Visual C++.
-    if test "$GCC" != yes; then
+    if test yes != "$GCC"; then
       with_gnu_ld=no
     fi
     ;;
@@ -12562,30 +13123,57 @@ $as_echo_n "checking whether the $compiler linker ($LD) supports shared librarie
     # we just hope/assume this is gcc and not c89 (= MSVC++)
     with_gnu_ld=yes
     ;;
-  openbsd*)
+  openbsd* | bitrig*)
     with_gnu_ld=no
     ;;
   esac
 
   ld_shlibs=yes
-  if test "$with_gnu_ld" = yes; then
+
+  # On some targets, GNU ld is compatible enough with the native linker
+  # that we're better off using the native interface for both.
+  lt_use_gnu_ld_interface=no
+  if test yes = "$with_gnu_ld"; then
+    case $host_os in
+      aix*)
+	# The AIX port of GNU ld has always aspired to compatibility
+	# with the native linker.  However, as the warning in the GNU ld
+	# block says, versions before 2.19.5* couldn't really create working
+	# shared libraries, regardless of the interface used.
+	case `$LD -v 2>&1` in
+	  *\ \(GNU\ Binutils\)\ 2.19.5*) ;;
+	  *\ \(GNU\ Binutils\)\ 2.[2-9]*) ;;
+	  *\ \(GNU\ Binutils\)\ [3-9]*) ;;
+	  *)
+	    lt_use_gnu_ld_interface=yes
+	    ;;
+	esac
+	;;
+      *)
+	lt_use_gnu_ld_interface=yes
+	;;
+    esac
+  fi
+
+  if test yes = "$lt_use_gnu_ld_interface"; then
     # If archive_cmds runs LD, not CC, wlarc should be empty
-    wlarc='${wl}'
+    wlarc='$wl'
 
     # Set some defaults for GNU ld with shared library support. These
     # are reset later if shared libraries are not supported. Putting them
     # here allows them to be overridden if necessary.
     runpath_var=LD_RUN_PATH
-    hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
-    export_dynamic_flag_spec='${wl}--export-dynamic'
+    hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
+    export_dynamic_flag_spec='$wl--export-dynamic'
     # ancient GNU ld didn't support --whole-archive et. al.
     if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
-      whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
+      whole_archive_flag_spec=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive'
     else
       whole_archive_flag_spec=
     fi
     supports_anon_versioning=no
-    case `$LD -v 2>&1` in
+    case `$LD -v | $SED -e 's/(^)\+)\s\+//' 2>&1` in
+      *GNU\ gold*) supports_anon_versioning=yes ;;
       *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11
       *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
       *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
@@ -12597,15 +13185,16 @@ $as_echo_n "checking whether the $compiler linker ($LD) supports shared librarie
     case $host_os in
     aix[3-9]*)
       # On AIX/PPC, the GNU linker is very broken
-      if test "$host_cpu" != ia64; then
+      if test ia64 != "$host_cpu"; then
 	ld_shlibs=no
 	cat <<_LT_EOF 1>&2
 
-*** Warning: the GNU linker, at least up to release 2.9.1, is reported
+*** Warning: the GNU linker, at least up to release 2.19, is reported
 *** to be unable to reliably create shared libraries on AIX.
 *** Therefore, libtool is disabling shared libraries support.  If you
-*** really care for shared libraries, you may want to modify your PATH
-*** so that a non-GNU linker is found, and then restart.
+*** really care for shared libraries, you may want to install binutils
+*** 2.20 or above, or modify your PATH so that a non-GNU linker is found.
+*** You will then need to restart the configuration process.
 
 _LT_EOF
       fi
@@ -12615,7 +13204,7 @@ _LT_EOF
       case $host_cpu in
       powerpc)
             # see comment about AmigaOS4 .so support
-            archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+            archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
             archive_expsym_cmds=''
         ;;
       m68k)
@@ -12631,7 +13220,7 @@ _LT_EOF
 	allow_undefined_flag=unsupported
 	# Joseph Beckenbach <jrb3 at best.com> says some releases of gcc
 	# support --undefined.  This deserves some investigation.  FIXME
-	archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+	archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
       else
 	ld_shlibs=no
       fi
@@ -12641,61 +13230,97 @@ _LT_EOF
       # _LT_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless,
       # as there is no search path for DLLs.
       hardcode_libdir_flag_spec='-L$libdir'
+      export_dynamic_flag_spec='$wl--export-all-symbols'
       allow_undefined_flag=unsupported
       always_export_symbols=no
       enable_shared_with_static_runtimes=yes
-      export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols'
+      export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.* //'\'' | sort | uniq > $export_symbols'
+      exclude_expsyms='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'
 
       if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
-        archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
-	# If the export-symbols file already is a .def file (1st line
-	# is EXPORTS), use it as is; otherwise, prepend...
-	archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
-	  cp $export_symbols $output_objdir/$soname.def;
-	else
-	  echo EXPORTS > $output_objdir/$soname.def;
-	  cat $export_symbols >> $output_objdir/$soname.def;
-	fi~
-	$CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
+        archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
+	# If the export-symbols file already is a .def file, use it as
+	# is; otherwise, prepend EXPORTS...
+	archive_expsym_cmds='if   test DEF = "`$SED -n     -e '\''s/^[	 ]*//'\''     -e '\''/^\(;.*\)*$/d'\''     -e '\''s/^\(EXPORTS\|LIBRARY\)\([	 ].*\)*$/DEF/p'\''     -e q     $export_symbols`" ; then
+          cp $export_symbols $output_objdir/$soname.def;
+        else
+          echo EXPORTS > $output_objdir/$soname.def;
+          cat $export_symbols >> $output_objdir/$soname.def;
+        fi~
+        $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
       else
 	ld_shlibs=no
       fi
       ;;
 
+    haiku*)
+      archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
+      link_all_deplibs=yes
+      ;;
+
+    os2*)
+      hardcode_libdir_flag_spec='-L$libdir'
+      hardcode_minus_L=yes
+      allow_undefined_flag=unsupported
+      shrext_cmds=.dll
+      archive_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
+	$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
+	$ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
+	$ECHO EXPORTS >> $output_objdir/$libname.def~
+	emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
+	$CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
+	emximp -o $lib $output_objdir/$libname.def'
+      archive_expsym_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
+	$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
+	$ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
+	$ECHO EXPORTS >> $output_objdir/$libname.def~
+	prefix_cmds="$SED"~
+	if test EXPORTS = "`$SED 1q $export_symbols`"; then
+	  prefix_cmds="$prefix_cmds -e 1d";
+	fi~
+	prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
+	cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
+	$CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
+	emximp -o $lib $output_objdir/$libname.def'
+      old_archive_From_new_cmds='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
+      enable_shared_with_static_runtimes=yes
+      ;;
+
     interix[3-9]*)
       hardcode_direct=no
       hardcode_shlibpath_var=no
-      hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
-      export_dynamic_flag_spec='${wl}-E'
+      hardcode_libdir_flag_spec='$wl-rpath,$libdir'
+      export_dynamic_flag_spec='$wl-E'
       # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
       # Instead, shared libraries are loaded at an image base (0x10000000 by
       # default) and relocated if they conflict, which is a slow very memory
       # consuming and fragmenting process.  To avoid this, we pick a random,
       # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
       # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
-      archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
-      archive_expsym_cmds='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+      archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+      archive_expsym_cmds='sed "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
       ;;
 
-    gnu* | linux* | tpf* | k*bsd*-gnu)
+    gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
       tmp_diet=no
-      if test "$host_os" = linux-dietlibc; then
+      if test linux-dietlibc = "$host_os"; then
 	case $cc_basename in
 	  diet\ *) tmp_diet=yes;;	# linux-dietlibc with static linking (!diet-dyn)
 	esac
       fi
       if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
-	 && test "$tmp_diet" = no
+	 && test no = "$tmp_diet"
       then
-	tmp_addflag=
+	tmp_addflag=' $pic_flag'
 	tmp_sharedflag='-shared'
 	case $cc_basename,$host_cpu in
         pgcc*)				# Portland Group C compiler
-	  whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
+	  whole_archive_flag_spec='$wl--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
 	  tmp_addflag=' $pic_flag'
 	  ;;
-	pgf77* | pgf90* | pgf95*)	# Portland Group f77 and f90 compilers
-	  whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
+	pgf77* | pgf90* | pgf95* | pgfortran*)
+					# Portland Group f77 and f90 compilers
+	  whole_archive_flag_spec='$wl--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
 	  tmp_addflag=' $pic_flag -Mnomain' ;;
 	ecc*,ia64* | icc*,ia64*)	# Intel C compiler on ia64
 	  tmp_addflag=' -i_dynamic' ;;
@@ -12706,39 +13331,47 @@ _LT_EOF
 	lf95*)				# Lahey Fortran 8.1
 	  whole_archive_flag_spec=
 	  tmp_sharedflag='--shared' ;;
-	xl[cC]*)			# IBM XL C 8.0 on PPC (deal with xlf below)
+        nagfor*)                        # NAGFOR 5.3
+          tmp_sharedflag='-Wl,-shared' ;;
+	xl[cC]* | bgxl[cC]* | mpixl[cC]*) # IBM XL C 8.0 on PPC (deal with xlf below)
 	  tmp_sharedflag='-qmkshrobj'
 	  tmp_addflag= ;;
+	nvcc*)	# Cuda Compiler Driver 2.2
+	  whole_archive_flag_spec='$wl--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
+	  compiler_needs_object=yes
+	  ;;
 	esac
 	case `$CC -V 2>&1 | sed 5q` in
 	*Sun\ C*)			# Sun C 5.9
-	  whole_archive_flag_spec='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
+	  whole_archive_flag_spec='$wl--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
 	  compiler_needs_object=yes
 	  tmp_sharedflag='-G' ;;
 	*Sun\ F*)			# Sun Fortran 8.3
 	  tmp_sharedflag='-G' ;;
 	esac
-	archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+	archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
 
-        if test "x$supports_anon_versioning" = xyes; then
+        if test yes = "$supports_anon_versioning"; then
           archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~
-	    cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
-	    echo "local: *; };" >> $output_objdir/$libname.ver~
-	    $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
+            cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
+            echo "local: *; };" >> $output_objdir/$libname.ver~
+            $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib'
         fi
 
 	case $cc_basename in
-	xlf*)
+	tcc*)
+	  export_dynamic_flag_spec='-rdynamic'
+	  ;;
+	xlf* | bgf* | bgxlf* | mpixlf*)
 	  # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
 	  whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive'
-	  hardcode_libdir_flag_spec=
-	  hardcode_libdir_flag_spec_ld='-rpath $libdir'
-	  archive_cmds='$LD -shared $libobjs $deplibs $compiler_flags -soname $soname -o $lib'
-	  if test "x$supports_anon_versioning" = xyes; then
+	  hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
+	  archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib'
+	  if test yes = "$supports_anon_versioning"; then
 	    archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~
-	      cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
-	      echo "local: *; };" >> $output_objdir/$libname.ver~
-	      $LD -shared $libobjs $deplibs $compiler_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
+              cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
+              echo "local: *; };" >> $output_objdir/$libname.ver~
+              $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
 	  fi
 	  ;;
 	esac
@@ -12752,8 +13385,8 @@ _LT_EOF
 	archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
 	wlarc=
       else
-	archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
-	archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+	archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
+	archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
       fi
       ;;
 
@@ -12771,8 +13404,8 @@ _LT_EOF
 
 _LT_EOF
       elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
-	archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
-	archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+	archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
+	archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
       else
 	ld_shlibs=no
       fi
@@ -12784,7 +13417,7 @@ _LT_EOF
 	ld_shlibs=no
 	cat <<_LT_EOF 1>&2
 
-*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
+*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 cannot
 *** reliably create shared libraries on SCO systems.  Therefore, libtool
 *** is disabling shared libraries support.  We urge you to upgrade GNU
 *** binutils to release 2.16.91.0.3 or newer.  Another option is to modify
@@ -12799,9 +13432,9 @@ _LT_EOF
 	  # DT_RUNPATH tag from executables and libraries.  But doing so
 	  # requires that you compile everything twice, which is a pain.
 	  if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
-	    hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
-	    archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
-	    archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+	    hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
+	    archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
+	    archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
 	  else
 	    ld_shlibs=no
 	  fi
@@ -12818,15 +13451,15 @@ _LT_EOF
 
     *)
       if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
-	archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
-	archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+	archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
+	archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
       else
 	ld_shlibs=no
       fi
       ;;
     esac
 
-    if test "$ld_shlibs" = no; then
+    if test no = "$ld_shlibs"; then
       runpath_var=
       hardcode_libdir_flag_spec=
       export_dynamic_flag_spec=
@@ -12842,7 +13475,7 @@ _LT_EOF
       # Note: this linker hardcodes the directories in LIBPATH if there
       # are no directories specified by -L.
       hardcode_minus_L=yes
-      if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
+      if test yes = "$GCC" && test -z "$lt_prog_compiler_static"; then
 	# Neither direct hardcoding nor static linking is supported with a
 	# broken collect2.
 	hardcode_direct=unsupported
@@ -12850,32 +13483,57 @@ _LT_EOF
       ;;
 
     aix[4-9]*)
-      if test "$host_cpu" = ia64; then
+      if test ia64 = "$host_cpu"; then
 	# On IA64, the linker does run time linking by default, so we don't
 	# have to do anything special.
 	aix_use_runtimelinking=no
 	exp_sym_flag='-Bexport'
-	no_entry_flag=""
+	no_entry_flag=
       else
 	# If we're using GNU nm, then we don't want the "-C" option.
-	# -C means demangle to AIX nm, but means don't demangle with GNU nm
+	# -C means demangle to GNU nm, but means don't demangle to AIX nm.
+	# Without the "-l" option, or with the "-B" option, AIX nm treats
+	# weak defined symbols like other global defined symbols, whereas
+	# GNU nm marks them as "W".
+	# While the 'weak' keyword is ignored in the Export File, we need
+	# it in the Import File for the 'aix-soname' feature, so we have
+	# to replace the "-B" option with "-P" for AIX nm.
 	if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
-	  export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
+	  export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols'
 	else
-	  export_symbols_cmds='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
+	  export_symbols_cmds='`func_echo_all $NM | $SED -e '\''s/B\([^B]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && (substr(\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols'
 	fi
 	aix_use_runtimelinking=no
 
 	# Test if we are trying to use run time linking or normal
 	# AIX style linking. If -brtl is somewhere in LDFLAGS, we
-	# need to do runtime linking.
+	# have runtime linking enabled, and use it for executables.
+	# For shared libraries, we enable/disable runtime linking
+	# depending on the kind of the shared library created -
+	# when "with_aix_soname,aix_use_runtimelinking" is:
+	# "aix,no"   lib.a(lib.so.V) shared, rtl:no,  for executables
+	# "aix,yes"  lib.so          shared, rtl:yes, for executables
+	#            lib.a           static archive
+	# "both,no"  lib.so.V(shr.o) shared, rtl:yes
+	#            lib.a(lib.so.V) shared, rtl:no,  for executables
+	# "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables
+	#            lib.a(lib.so.V) shared, rtl:no
+	# "svr4,*"   lib.so.V(shr.o) shared, rtl:yes, for executables
+	#            lib.a           static archive
 	case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*)
 	  for ld_flag in $LDFLAGS; do
-	  if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
+	  if (test x-brtl = "x$ld_flag" || test x-Wl,-brtl = "x$ld_flag"); then
 	    aix_use_runtimelinking=yes
 	    break
 	  fi
 	  done
+	  if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then
+	    # With aix-soname=svr4, we create the lib.so.V shared archives only,
+	    # so we don't have lib.a shared libs to link our executables.
+	    # We have to force runtime linking in this case.
+	    aix_use_runtimelinking=yes
+	    LDFLAGS="$LDFLAGS -Wl,-brtl"
+	  fi
 	  ;;
 	esac
 
@@ -12894,13 +13552,21 @@ _LT_EOF
       hardcode_direct_absolute=yes
       hardcode_libdir_separator=':'
       link_all_deplibs=yes
-      file_list_spec='${wl}-f,'
+      file_list_spec='$wl-f,'
+      case $with_aix_soname,$aix_use_runtimelinking in
+      aix,*) ;; # traditional, no import file
+      svr4,* | *,yes) # use import file
+	# The Import File defines what to hardcode.
+	hardcode_direct=no
+	hardcode_direct_absolute=no
+	;;
+      esac
 
-      if test "$GCC" = yes; then
+      if test yes = "$GCC"; then
 	case $host_os in aix4.[012]|aix4.[012].*)
 	# We only want to do this on AIX 4.2 and lower, the check
 	# below for broken collect2 doesn't work under 4.3+
-	  collect2name=`${CC} -print-prog-name=collect2`
+	  collect2name=`$CC -print-prog-name=collect2`
 	  if test -f "$collect2name" &&
 	   strings "$collect2name" | $GREP resolve_lib_name >/dev/null
 	  then
@@ -12919,35 +13585,48 @@ _LT_EOF
 	  ;;
 	esac
 	shared_flag='-shared'
-	if test "$aix_use_runtimelinking" = yes; then
-	  shared_flag="$shared_flag "'${wl}-G'
+	if test yes = "$aix_use_runtimelinking"; then
+	  shared_flag="$shared_flag "'$wl-G'
 	fi
+	# Need to ensure runtime linking is disabled for the traditional
+	# shared library, or the linker may eventually find shared libraries
+	# /with/ Import File - we do not want to mix them.
+	shared_flag_aix='-shared'
+	shared_flag_svr4='-shared $wl-G'
       else
 	# not using gcc
-	if test "$host_cpu" = ia64; then
+	if test ia64 = "$host_cpu"; then
 	# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
 	# chokes on -Wl,-G. The following line is correct:
 	  shared_flag='-G'
 	else
-	  if test "$aix_use_runtimelinking" = yes; then
-	    shared_flag='${wl}-G'
+	  if test yes = "$aix_use_runtimelinking"; then
+	    shared_flag='$wl-G'
 	  else
-	    shared_flag='${wl}-bM:SRE'
+	    shared_flag='$wl-bM:SRE'
 	  fi
+	  shared_flag_aix='$wl-bM:SRE'
+	  shared_flag_svr4='$wl-G'
 	fi
       fi
 
-      export_dynamic_flag_spec='${wl}-bexpall'
+      export_dynamic_flag_spec='$wl-bexpall'
       # It seems that -bexpall does not export symbols beginning with
       # underscore (_), so it is better to generate a list of symbols to export.
       always_export_symbols=yes
-      if test "$aix_use_runtimelinking" = yes; then
+      if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then
 	# Warning - without using the other runtime loading flags (-brtl),
 	# -berok will link without error, but may produce a broken library.
 	allow_undefined_flag='-berok'
         # Determine the default libpath from the value encoded in an
         # empty executable.
-        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+        if test set = "${lt_cv_aix_libpath+set}"; then
+  aix_libpath=$lt_cv_aix_libpath
+else
+  if ${lt_cv_aix_libpath_+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
 int
@@ -12960,34 +13639,47 @@ main ()
 _ACEOF
 if ac_fn_c_try_link "$LINENO"; then :
 
-lt_aix_libpath_sed='
-    /Import File Strings/,/^$/ {
-	/^0/ {
-	    s/^0  *\(.*\)$/\1/
-	    p
-	}
-    }'
-aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
-# Check for a 64-bit object if we didn't find anything.
-if test -z "$aix_libpath"; then
-  aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
-fi
+  lt_aix_libpath_sed='
+      /Import File Strings/,/^$/ {
+	  /^0/ {
+	      s/^0  *\([^ ]*\) *$/\1/
+	      p
+	  }
+      }'
+  lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+  # Check for a 64-bit object if we didn't find anything.
+  if test -z "$lt_cv_aix_libpath_"; then
+    lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+  fi
 fi
 rm -f core conftest.err conftest.$ac_objext \
     conftest$ac_exeext conftest.$ac_ext
-if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+  if test -z "$lt_cv_aix_libpath_"; then
+    lt_cv_aix_libpath_=/usr/lib:/lib
+  fi
+
+fi
 
-        hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
-        archive_expsym_cmds='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
+  aix_libpath=$lt_cv_aix_libpath_
+fi
+
+        hardcode_libdir_flag_spec='$wl-blibpath:$libdir:'"$aix_libpath"
+        archive_expsym_cmds='$CC -o $output_objdir/$soname $libobjs $deplibs $wl'$no_entry_flag' $compiler_flags `if test -n "$allow_undefined_flag"; then func_echo_all "$wl$allow_undefined_flag"; else :; fi` $wl'$exp_sym_flag:\$export_symbols' '$shared_flag
       else
-	if test "$host_cpu" = ia64; then
-	  hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
+	if test ia64 = "$host_cpu"; then
+	  hardcode_libdir_flag_spec='$wl-R $libdir:/usr/lib:/lib'
 	  allow_undefined_flag="-z nodefs"
-	  archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
+	  archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\$wl$no_entry_flag"' $compiler_flags $wl$allow_undefined_flag '"\$wl$exp_sym_flag:\$export_symbols"
 	else
 	 # Determine the default libpath from the value encoded in an
 	 # empty executable.
-	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+	 if test set = "${lt_cv_aix_libpath+set}"; then
+  aix_libpath=$lt_cv_aix_libpath
+else
+  if ${lt_cv_aix_libpath_+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
 int
@@ -13000,33 +13692,57 @@ main ()
 _ACEOF
 if ac_fn_c_try_link "$LINENO"; then :
 
-lt_aix_libpath_sed='
-    /Import File Strings/,/^$/ {
-	/^0/ {
-	    s/^0  *\(.*\)$/\1/
-	    p
-	}
-    }'
-aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
-# Check for a 64-bit object if we didn't find anything.
-if test -z "$aix_libpath"; then
-  aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
-fi
+  lt_aix_libpath_sed='
+      /Import File Strings/,/^$/ {
+	  /^0/ {
+	      s/^0  *\([^ ]*\) *$/\1/
+	      p
+	  }
+      }'
+  lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+  # Check for a 64-bit object if we didn't find anything.
+  if test -z "$lt_cv_aix_libpath_"; then
+    lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+  fi
 fi
 rm -f core conftest.err conftest.$ac_objext \
     conftest$ac_exeext conftest.$ac_ext
-if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+  if test -z "$lt_cv_aix_libpath_"; then
+    lt_cv_aix_libpath_=/usr/lib:/lib
+  fi
 
-	 hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
+fi
+
+  aix_libpath=$lt_cv_aix_libpath_
+fi
+
+	 hardcode_libdir_flag_spec='$wl-blibpath:$libdir:'"$aix_libpath"
 	  # Warning - without using the other run time loading flags,
 	  # -berok will link without error, but may produce a broken library.
-	  no_undefined_flag=' ${wl}-bernotok'
-	  allow_undefined_flag=' ${wl}-berok'
-	  # Exported symbols can be pulled into shared objects from archives
-	  whole_archive_flag_spec='$convenience'
+	  no_undefined_flag=' $wl-bernotok'
+	  allow_undefined_flag=' $wl-berok'
+	  if test yes = "$with_gnu_ld"; then
+	    # We only use this code for GNU lds that support --whole-archive.
+	    whole_archive_flag_spec='$wl--whole-archive$convenience $wl--no-whole-archive'
+	  else
+	    # Exported symbols can be pulled into shared objects from archives
+	    whole_archive_flag_spec='$convenience'
+	  fi
 	  archive_cmds_need_lc=yes
-	  # This is similar to how AIX traditionally builds its shared libraries.
-	  archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
+	  archive_expsym_cmds='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d'
+	  # -brtl affects multiple linker settings, -berok does not and is overridden later
+	  compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([, ]\\)%-berok\\1%g"`'
+	  if test svr4 != "$with_aix_soname"; then
+	    # This is similar to how AIX traditionally builds its shared libraries.
+	    archive_expsym_cmds="$archive_expsym_cmds"'~$CC '$shared_flag_aix' -o $output_objdir/$realname.d/$soname $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$realname.d/$soname'
+	  fi
+	  if test aix != "$with_aix_soname"; then
+	    archive_expsym_cmds="$archive_expsym_cmds"'~$CC '$shared_flag_svr4' -o $output_objdir/$realname.d/$shared_archive_member_spec.o $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$STRIP -e $output_objdir/$realname.d/$shared_archive_member_spec.o~( func_echo_all "#! $soname($shared_archive_member_spec.o)"; if test shr_64 = "$shared_archive_member_spec"; then func_echo_all "# 64"; else func_echo_all "# 32"; fi; cat $export_symbols ) >  [...]
+	  else
+	    # used by -dlpreopen to get the symbols
+	    archive_expsym_cmds="$archive_expsym_cmds"'~$MV  $output_objdir/$realname.d/$soname $output_objdir'
+	  fi
+	  archive_expsym_cmds="$archive_expsym_cmds"'~$RM -r $output_objdir/$realname.d'
 	fi
       fi
       ;;
@@ -13035,7 +13751,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
       case $host_cpu in
       powerpc)
             # see comment about AmigaOS4 .so support
-            archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+            archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
             archive_expsym_cmds=''
         ;;
       m68k)
@@ -13055,20 +13771,65 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
       # Microsoft Visual C++.
       # hardcode_libdir_flag_spec is actually meaningless, as there is
       # no search path for DLLs.
-      hardcode_libdir_flag_spec=' '
-      allow_undefined_flag=unsupported
-      # Tell ltmain to make .lib files, not .a files.
-      libext=lib
-      # Tell ltmain to make .dll files, not .so files.
-      shrext_cmds=".dll"
-      # FIXME: Setting linknames here is a bad hack.
-      archive_cmds='$CC -o $lib $libobjs $compiler_flags `$ECHO "X$deplibs" | $Xsed -e '\''s/ -lc$//'\''` -link -dll~linknames='
-      # The linker will automatically build a .lib file if we build a DLL.
-      old_archive_from_new_cmds='true'
-      # FIXME: Should let the user specify the lib program.
-      old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs'
-      fix_srcfile_path='`cygpath -w "$srcfile"`'
-      enable_shared_with_static_runtimes=yes
+      case $cc_basename in
+      cl*)
+	# Native MSVC
+	hardcode_libdir_flag_spec=' '
+	allow_undefined_flag=unsupported
+	always_export_symbols=yes
+	file_list_spec='@'
+	# Tell ltmain to make .lib files, not .a files.
+	libext=lib
+	# Tell ltmain to make .dll files, not .so files.
+	shrext_cmds=.dll
+	# FIXME: Setting linknames here is a bad hack.
+	archive_cmds='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames='
+	archive_expsym_cmds='if   test DEF = "`$SED -n     -e '\''s/^[	 ]*//'\''     -e '\''/^\(;.*\)*$/d'\''     -e '\''s/^\(EXPORTS\|LIBRARY\)\([	 ].*\)*$/DEF/p'\''     -e q     $export_symbols`" ; then
+            cp "$export_symbols" "$output_objdir/$soname.def";
+            echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp";
+          else
+            $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp;
+          fi~
+          $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
+          linknames='
+	# The linker will not automatically build a static lib if we build a DLL.
+	# _LT_TAGVAR(old_archive_from_new_cmds, )='true'
+	enable_shared_with_static_runtimes=yes
+	exclude_expsyms='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
+	export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1,DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols'
+	# Don't use ranlib
+	old_postinstall_cmds='chmod 644 $oldlib'
+	postlink_cmds='lt_outputfile="@OUTPUT@"~
+          lt_tool_outputfile="@TOOL_OUTPUT@"~
+          case $lt_outputfile in
+            *.exe|*.EXE) ;;
+            *)
+              lt_outputfile=$lt_outputfile.exe
+              lt_tool_outputfile=$lt_tool_outputfile.exe
+              ;;
+          esac~
+          if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then
+            $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
+            $RM "$lt_outputfile.manifest";
+          fi'
+	;;
+      *)
+	# Assume MSVC wrapper
+	hardcode_libdir_flag_spec=' '
+	allow_undefined_flag=unsupported
+	# Tell ltmain to make .lib files, not .a files.
+	libext=lib
+	# Tell ltmain to make .dll files, not .so files.
+	shrext_cmds=.dll
+	# FIXME: Setting linknames here is a bad hack.
+	archive_cmds='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames='
+	# The linker will automatically build a .lib file if we build a DLL.
+	old_archive_from_new_cmds='true'
+	# FIXME: Should let the user specify the lib program.
+	old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs'
+	enable_shared_with_static_runtimes=yes
+	;;
+      esac
       ;;
 
     darwin* | rhapsody*)
@@ -13078,19 +13839,24 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
   hardcode_direct=no
   hardcode_automatic=yes
   hardcode_shlibpath_var=unsupported
-  whole_archive_flag_spec=''
+  if test yes = "$lt_cv_ld_force_load"; then
+    whole_archive_flag_spec='`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience $wl-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`'
+
+  else
+    whole_archive_flag_spec=''
+  fi
   link_all_deplibs=yes
-  allow_undefined_flag="$_lt_dar_allow_undefined"
+  allow_undefined_flag=$_lt_dar_allow_undefined
   case $cc_basename in
-     ifort*) _lt_dar_can_shared=yes ;;
+     ifort*|nagfor*) _lt_dar_can_shared=yes ;;
      *) _lt_dar_can_shared=$GCC ;;
   esac
-  if test "$_lt_dar_can_shared" = "yes"; then
-    output_verbose_link_cmd=echo
-    archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}"
-    module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
-    archive_expsym_cmds="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}"
-    module_expsym_cmds="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}"
+  if test yes = "$_lt_dar_can_shared"; then
+    output_verbose_link_cmd=func_echo_all
+    archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dsymutil"
+    module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil"
+    archive_expsym_cmds="sed 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dar_export_syms$_lt_dsymutil"
+    module_expsym_cmds="sed -e 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dar_export_syms$_lt_dsymutil"
 
   else
   ld_shlibs=no
@@ -13104,10 +13870,6 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
       hardcode_shlibpath_var=no
       ;;
 
-    freebsd1*)
-      ld_shlibs=no
-      ;;
-
     # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
     # support.  Future versions do this automatically, but an explicit c++rt0.o
     # does not break anything, and helps significantly (at the cost of a little
@@ -13120,7 +13882,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
       ;;
 
     # Unfortunately, older versions of FreeBSD 2 do not have this feature.
-    freebsd2*)
+    freebsd2.*)
       archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
       hardcode_direct=yes
       hardcode_minus_L=yes
@@ -13129,41 +13891,40 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
 
     # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
     freebsd* | dragonfly*)
-      archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
+      archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
       hardcode_libdir_flag_spec='-R$libdir'
       hardcode_direct=yes
       hardcode_shlibpath_var=no
       ;;
 
     hpux9*)
-      if test "$GCC" = yes; then
-	archive_cmds='$RM $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+      if test yes = "$GCC"; then
+	archive_cmds='$RM $output_objdir/$soname~$CC -shared $pic_flag $wl+b $wl$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib'
       else
-	archive_cmds='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+	archive_cmds='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib'
       fi
-      hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
+      hardcode_libdir_flag_spec='$wl+b $wl$libdir'
       hardcode_libdir_separator=:
       hardcode_direct=yes
 
       # hardcode_minus_L: Not really in the search PATH,
       # but as the default location of the library.
       hardcode_minus_L=yes
-      export_dynamic_flag_spec='${wl}-E'
+      export_dynamic_flag_spec='$wl-E'
       ;;
 
     hpux10*)
-      if test "$GCC" = yes -a "$with_gnu_ld" = no; then
-	archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+      if test yes,no = "$GCC,$with_gnu_ld"; then
+	archive_cmds='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
       else
 	archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
       fi
-      if test "$with_gnu_ld" = no; then
-	hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
-	hardcode_libdir_flag_spec_ld='+b $libdir'
+      if test no = "$with_gnu_ld"; then
+	hardcode_libdir_flag_spec='$wl+b $wl$libdir'
 	hardcode_libdir_separator=:
 	hardcode_direct=yes
 	hardcode_direct_absolute=yes
-	export_dynamic_flag_spec='${wl}-E'
+	export_dynamic_flag_spec='$wl-E'
 	# hardcode_minus_L: Not really in the search PATH,
 	# but as the default location of the library.
 	hardcode_minus_L=yes
@@ -13171,33 +13932,72 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
       ;;
 
     hpux11*)
-      if test "$GCC" = yes -a "$with_gnu_ld" = no; then
+      if test yes,no = "$GCC,$with_gnu_ld"; then
 	case $host_cpu in
 	hppa*64*)
-	  archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+	  archive_cmds='$CC -shared $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
 	  ;;
 	ia64*)
-	  archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
+	  archive_cmds='$CC -shared $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
 	  ;;
 	*)
-	  archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+	  archive_cmds='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
 	  ;;
 	esac
       else
 	case $host_cpu in
 	hppa*64*)
-	  archive_cmds='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+	  archive_cmds='$CC -b $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
 	  ;;
 	ia64*)
-	  archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
+	  archive_cmds='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
 	  ;;
 	*)
-	  archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+
+	  # Older versions of the 11.00 compiler do not understand -b yet
+	  # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does)
+	  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC understands -b" >&5
+$as_echo_n "checking if $CC understands -b... " >&6; }
+if ${lt_cv_prog_compiler__b+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  lt_cv_prog_compiler__b=no
+   save_LDFLAGS=$LDFLAGS
+   LDFLAGS="$LDFLAGS -b"
+   echo "$lt_simple_link_test_code" > conftest.$ac_ext
+   if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
+     # The linker can only warn and ignore the option if not recognized
+     # So say no if there are warnings
+     if test -s conftest.err; then
+       # Append any errors to the config.log.
+       cat conftest.err 1>&5
+       $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
+       $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
+       if diff conftest.exp conftest.er2 >/dev/null; then
+         lt_cv_prog_compiler__b=yes
+       fi
+     else
+       lt_cv_prog_compiler__b=yes
+     fi
+   fi
+   $RM -r conftest*
+   LDFLAGS=$save_LDFLAGS
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler__b" >&5
+$as_echo "$lt_cv_prog_compiler__b" >&6; }
+
+if test yes = "$lt_cv_prog_compiler__b"; then
+    archive_cmds='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+else
+    archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
+fi
+
 	  ;;
 	esac
       fi
-      if test "$with_gnu_ld" = no; then
-	hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
+      if test no = "$with_gnu_ld"; then
+	hardcode_libdir_flag_spec='$wl+b $wl$libdir'
 	hardcode_libdir_separator=:
 
 	case $host_cpu in
@@ -13208,7 +14008,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
 	*)
 	  hardcode_direct=yes
 	  hardcode_direct_absolute=yes
-	  export_dynamic_flag_spec='${wl}-E'
+	  export_dynamic_flag_spec='$wl-E'
 
 	  # hardcode_minus_L: Not really in the search PATH,
 	  # but as the default location of the library.
@@ -13219,35 +14019,58 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
       ;;
 
     irix5* | irix6* | nonstopux*)
-      if test "$GCC" = yes; then
-	archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+      if test yes = "$GCC"; then
+	archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib'
 	# Try to use the -exported_symbol ld option, if it does not
 	# work, assume that -exports_file does not work either and
 	# implicitly export all symbols.
-        save_LDFLAGS="$LDFLAGS"
-        LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null"
-        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+	# This should be the same for all languages, so no per-tag cache variable.
+	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $host_os linker accepts -exported_symbol" >&5
+$as_echo_n "checking whether the $host_os linker accepts -exported_symbol... " >&6; }
+if ${lt_cv_irix_exported_symbol+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  save_LDFLAGS=$LDFLAGS
+	   LDFLAGS="$LDFLAGS -shared $wl-exported_symbol ${wl}foo $wl-update_registry $wl/dev/null"
+	   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-int foo(void) {}
+int foo (void) { return 0; }
 _ACEOF
 if ac_fn_c_try_link "$LINENO"; then :
-  archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib'
-
+  lt_cv_irix_exported_symbol=yes
+else
+  lt_cv_irix_exported_symbol=no
 fi
 rm -f core conftest.err conftest.$ac_objext \
     conftest$ac_exeext conftest.$ac_ext
-        LDFLAGS="$save_LDFLAGS"
+           LDFLAGS=$save_LDFLAGS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_irix_exported_symbol" >&5
+$as_echo "$lt_cv_irix_exported_symbol" >&6; }
+	if test yes = "$lt_cv_irix_exported_symbol"; then
+          archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations $wl-exports_file $wl$export_symbols -o $lib'
+	fi
       else
-	archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
-	archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib'
+	archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib'
+	archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -exports_file $export_symbols -o $lib'
       fi
       archive_cmds_need_lc='no'
-      hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+      hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
       hardcode_libdir_separator=:
       inherit_rpath=yes
       link_all_deplibs=yes
       ;;
 
+    linux*)
+      case $cc_basename in
+      tcc*)
+	# Fabrice Bellard et al's Tiny C Compiler
+	ld_shlibs=yes
+	archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
+	;;
+      esac
+      ;;
+
     netbsd*)
       if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
 	archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
@@ -13262,7 +14085,7 @@ rm -f core conftest.err conftest.$ac_objext \
     newsos6)
       archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
       hardcode_direct=yes
-      hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+      hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
       hardcode_libdir_separator=:
       hardcode_shlibpath_var=no
       ;;
@@ -13270,27 +14093,19 @@ rm -f core conftest.err conftest.$ac_objext \
     *nto* | *qnx*)
       ;;
 
-    openbsd*)
+    openbsd* | bitrig*)
       if test -f /usr/libexec/ld.so; then
 	hardcode_direct=yes
 	hardcode_shlibpath_var=no
 	hardcode_direct_absolute=yes
-	if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+	if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
 	  archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
-	  archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
-	  hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
-	  export_dynamic_flag_spec='${wl}-E'
+	  archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags $wl-retain-symbols-file,$export_symbols'
+	  hardcode_libdir_flag_spec='$wl-rpath,$libdir'
+	  export_dynamic_flag_spec='$wl-E'
 	else
-	  case $host_os in
-	   openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
-	     archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
-	     hardcode_libdir_flag_spec='-R$libdir'
-	     ;;
-	   *)
-	     archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
-	     hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
-	     ;;
-	  esac
+	  archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
+	  hardcode_libdir_flag_spec='$wl-rpath,$libdir'
 	fi
       else
 	ld_shlibs=no
@@ -13301,33 +14116,53 @@ rm -f core conftest.err conftest.$ac_objext \
       hardcode_libdir_flag_spec='-L$libdir'
       hardcode_minus_L=yes
       allow_undefined_flag=unsupported
-      archive_cmds='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$ECHO DATA >> $output_objdir/$libname.def~$ECHO " SINGLE NONSHARED" >> $output_objdir/$libname.def~$ECHO EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def'
-      old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
+      shrext_cmds=.dll
+      archive_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
+	$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
+	$ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
+	$ECHO EXPORTS >> $output_objdir/$libname.def~
+	emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
+	$CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
+	emximp -o $lib $output_objdir/$libname.def'
+      archive_expsym_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
+	$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
+	$ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
+	$ECHO EXPORTS >> $output_objdir/$libname.def~
+	prefix_cmds="$SED"~
+	if test EXPORTS = "`$SED 1q $export_symbols`"; then
+	  prefix_cmds="$prefix_cmds -e 1d";
+	fi~
+	prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
+	cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
+	$CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
+	emximp -o $lib $output_objdir/$libname.def'
+      old_archive_From_new_cmds='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
+      enable_shared_with_static_runtimes=yes
       ;;
 
     osf3*)
-      if test "$GCC" = yes; then
-	allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
-	archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+      if test yes = "$GCC"; then
+	allow_undefined_flag=' $wl-expect_unresolved $wl\*'
+	archive_cmds='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib'
       else
 	allow_undefined_flag=' -expect_unresolved \*'
-	archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
+	archive_cmds='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib'
       fi
       archive_cmds_need_lc='no'
-      hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+      hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
       hardcode_libdir_separator=:
       ;;
 
     osf4* | osf5*)	# as osf3* with the addition of -msym flag
-      if test "$GCC" = yes; then
-	allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
-	archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
-	hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+      if test yes = "$GCC"; then
+	allow_undefined_flag=' $wl-expect_unresolved $wl\*'
+	archive_cmds='$CC -shared$allow_undefined_flag $pic_flag $libobjs $deplibs $compiler_flags $wl-msym $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib'
+	hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
       else
 	allow_undefined_flag=' -expect_unresolved \*'
-	archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
+	archive_cmds='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib'
 	archive_expsym_cmds='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~
-	$CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp'
+          $CC -shared$allow_undefined_flag $wl-input $wl$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib~$RM $lib.exp'
 
 	# Both c and cxx compiler support -rpath directly
 	hardcode_libdir_flag_spec='-rpath $libdir'
@@ -13338,24 +14173,24 @@ rm -f core conftest.err conftest.$ac_objext \
 
     solaris*)
       no_undefined_flag=' -z defs'
-      if test "$GCC" = yes; then
-	wlarc='${wl}'
-	archive_cmds='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+      if test yes = "$GCC"; then
+	wlarc='$wl'
+	archive_cmds='$CC -shared $pic_flag $wl-z ${wl}text $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
 	archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
-	  $CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
+          $CC -shared $pic_flag $wl-z ${wl}text $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
       else
 	case `$CC -V 2>&1` in
 	*"Compilers 5.0"*)
 	  wlarc=''
-	  archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
+	  archive_cmds='$LD -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $linker_flags'
 	  archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
-	  $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
+            $LD -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
 	  ;;
 	*)
-	  wlarc='${wl}'
-	  archive_cmds='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags'
+	  wlarc='$wl'
+	  archive_cmds='$CC -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $compiler_flags'
 	  archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
-	  $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
+            $CC -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
 	  ;;
 	esac
       fi
@@ -13365,11 +14200,11 @@ rm -f core conftest.err conftest.$ac_objext \
       solaris2.[0-5] | solaris2.[0-5].*) ;;
       *)
 	# The compiler driver will combine and reorder linker options,
-	# but understands `-z linker_flag'.  GCC discards it without `$wl',
+	# but understands '-z linker_flag'.  GCC discards it without '$wl',
 	# but is careful enough not to reorder.
 	# Supported since Solaris 2.6 (maybe 2.5.1?)
-	if test "$GCC" = yes; then
-	  whole_archive_flag_spec='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
+	if test yes = "$GCC"; then
+	  whole_archive_flag_spec='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract'
 	else
 	  whole_archive_flag_spec='-z allextract$convenience -z defaultextract'
 	fi
@@ -13379,10 +14214,10 @@ rm -f core conftest.err conftest.$ac_objext \
       ;;
 
     sunos4*)
-      if test "x$host_vendor" = xsequent; then
+      if test sequent = "$host_vendor"; then
 	# Use $CC to link under sequent, because it throws in some extra .o
 	# files that make .init and .fini sections work.
-	archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
+	archive_cmds='$CC -G $wl-h $soname -o $lib $libobjs $deplibs $compiler_flags'
       else
 	archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
       fi
@@ -13431,43 +14266,43 @@ rm -f core conftest.err conftest.$ac_objext \
       ;;
 
     sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*)
-      no_undefined_flag='${wl}-z,text'
+      no_undefined_flag='$wl-z,text'
       archive_cmds_need_lc=no
       hardcode_shlibpath_var=no
       runpath_var='LD_RUN_PATH'
 
-      if test "$GCC" = yes; then
-	archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
-	archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+      if test yes = "$GCC"; then
+	archive_cmds='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	archive_expsym_cmds='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
       else
-	archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
-	archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	archive_cmds='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	archive_expsym_cmds='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
       fi
       ;;
 
     sysv5* | sco3.2v5* | sco5v6*)
-      # Note: We can NOT use -z defs as we might desire, because we do not
+      # Note: We CANNOT use -z defs as we might desire, because we do not
       # link with -lc, and that would cause any symbols used from libc to
       # always be unresolved, which means just about no library would
       # ever link correctly.  If we're not using GNU ld we use -z text
       # though, which does catch some bad symbols but isn't as heavy-handed
       # as -z defs.
-      no_undefined_flag='${wl}-z,text'
-      allow_undefined_flag='${wl}-z,nodefs'
+      no_undefined_flag='$wl-z,text'
+      allow_undefined_flag='$wl-z,nodefs'
       archive_cmds_need_lc=no
       hardcode_shlibpath_var=no
-      hardcode_libdir_flag_spec='${wl}-R,$libdir'
+      hardcode_libdir_flag_spec='$wl-R,$libdir'
       hardcode_libdir_separator=':'
       link_all_deplibs=yes
-      export_dynamic_flag_spec='${wl}-Bexport'
+      export_dynamic_flag_spec='$wl-Bexport'
       runpath_var='LD_RUN_PATH'
 
-      if test "$GCC" = yes; then
-	archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
-	archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+      if test yes = "$GCC"; then
+	archive_cmds='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	archive_expsym_cmds='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
       else
-	archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
-	archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	archive_cmds='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	archive_expsym_cmds='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
       fi
       ;;
 
@@ -13482,10 +14317,10 @@ rm -f core conftest.err conftest.$ac_objext \
       ;;
     esac
 
-    if test x$host_vendor = xsni; then
+    if test sni = "$host_vendor"; then
       case $host in
       sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
-	export_dynamic_flag_spec='${wl}-Blargedynsym'
+	export_dynamic_flag_spec='$wl-Blargedynsym'
 	;;
       esac
     fi
@@ -13493,7 +14328,7 @@ rm -f core conftest.err conftest.$ac_objext \
 
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs" >&5
 $as_echo "$ld_shlibs" >&6; }
-test "$ld_shlibs" = no && can_build_shared=no
+test no = "$ld_shlibs" && can_build_shared=no
 
 with_gnu_ld=$with_gnu_ld
 
@@ -13519,7 +14354,7 @@ x|xyes)
   # Assume -lc should be added
   archive_cmds_need_lc=yes
 
-  if test "$enable_shared" = yes && test "$GCC" = yes; then
+  if test yes,yes = "$GCC,$enable_shared"; then
     case $archive_cmds in
     *'~'*)
       # FIXME: we may have to deal with multi-command sequences.
@@ -13530,44 +14365,50 @@ x|xyes)
       # to ld, don't add -lc before -lgcc.
       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5
 $as_echo_n "checking whether -lc should be explicitly linked in... " >&6; }
-      $RM conftest*
-      echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+if ${lt_cv_archive_cmds_need_lc+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  $RM conftest*
+	echo "$lt_simple_compile_test_code" > conftest.$ac_ext
 
-      if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
+	if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   test $ac_status = 0; } 2>conftest.err; then
-        soname=conftest
-        lib=conftest
-        libobjs=conftest.$ac_objext
-        deplibs=
-        wl=$lt_prog_compiler_wl
-	pic_flag=$lt_prog_compiler_pic
-        compiler_flags=-v
-        linker_flags=-v
-        verstring=
-        output_objdir=.
-        libname=conftest
-        lt_save_allow_undefined_flag=$allow_undefined_flag
-        allow_undefined_flag=
-        if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5
+	  soname=conftest
+	  lib=conftest
+	  libobjs=conftest.$ac_objext
+	  deplibs=
+	  wl=$lt_prog_compiler_wl
+	  pic_flag=$lt_prog_compiler_pic
+	  compiler_flags=-v
+	  linker_flags=-v
+	  verstring=
+	  output_objdir=.
+	  libname=conftest
+	  lt_save_allow_undefined_flag=$allow_undefined_flag
+	  allow_undefined_flag=
+	  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5
   (eval $archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5
   ac_status=$?
   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   test $ac_status = 0; }
-        then
-	  archive_cmds_need_lc=no
-        else
-	  archive_cmds_need_lc=yes
-        fi
-        allow_undefined_flag=$lt_save_allow_undefined_flag
-      else
-        cat conftest.err 1>&5
-      fi
-      $RM conftest*
-      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $archive_cmds_need_lc" >&5
-$as_echo "$archive_cmds_need_lc" >&6; }
+	  then
+	    lt_cv_archive_cmds_need_lc=no
+	  else
+	    lt_cv_archive_cmds_need_lc=yes
+	  fi
+	  allow_undefined_flag=$lt_save_allow_undefined_flag
+	else
+	  cat conftest.err 1>&5
+	fi
+	$RM conftest*
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc" >&5
+$as_echo "$lt_cv_archive_cmds_need_lc" >&6; }
+      archive_cmds_need_lc=$lt_cv_archive_cmds_need_lc
       ;;
     esac
   fi
@@ -13725,52 +14566,61 @@ esac
 
 
 
-
-
-
-
-
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5
 $as_echo_n "checking dynamic linker characteristics... " >&6; }
 
-if test "$GCC" = yes; then
+if test yes = "$GCC"; then
+  case $host_os in
+    darwin*) lt_awk_arg='/^libraries:/,/LR/' ;;
+    *) lt_awk_arg='/^libraries:/' ;;
+  esac
   case $host_os in
-    darwin*) lt_awk_arg="/^libraries:/,/LR/" ;;
-    *) lt_awk_arg="/^libraries:/" ;;
+    mingw* | cegcc*) lt_sed_strip_eq='s|=\([A-Za-z]:\)|\1|g' ;;
+    *) lt_sed_strip_eq='s|=/|/|g' ;;
   esac
-  lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"`
-  if $ECHO "$lt_search_path_spec" | $GREP ';' >/dev/null ; then
+  lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq`
+  case $lt_search_path_spec in
+  *\;*)
     # if the path contains ";" then we assume it to be the separator
     # otherwise default to the standard path separator (i.e. ":") - it is
     # assumed that no part of a normal pathname contains ";" but that should
     # okay in the real world where ";" in dirpaths is itself problematic.
-    lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e 's/;/ /g'`
-  else
-    lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
-  fi
+    lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'`
+    ;;
+  *)
+    lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"`
+    ;;
+  esac
   # Ok, now we have the path, separated by spaces, we can step through it
-  # and add multilib dir if necessary.
+  # and add multilib dir if necessary...
   lt_tmp_lt_search_path_spec=
-  lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
+  lt_multi_os_dir=/`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
+  # ...but if some path component already ends with the multilib dir we assume
+  # that all is fine and trust -print-search-dirs as is (GCC 4.2? or newer).
+  case "$lt_multi_os_dir; $lt_search_path_spec " in
+  "/; "* | "/.; "* | "/./; "* | *"$lt_multi_os_dir "* | *"$lt_multi_os_dir/ "*)
+    lt_multi_os_dir=
+    ;;
+  esac
   for lt_sys_path in $lt_search_path_spec; do
-    if test -d "$lt_sys_path/$lt_multi_os_dir"; then
-      lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir"
-    else
+    if test -d "$lt_sys_path$lt_multi_os_dir"; then
+      lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path$lt_multi_os_dir"
+    elif test -n "$lt_multi_os_dir"; then
       test -d "$lt_sys_path" && \
 	lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
     fi
   done
-  lt_search_path_spec=`$ECHO $lt_tmp_lt_search_path_spec | awk '
-BEGIN {RS=" "; FS="/|\n";} {
-  lt_foo="";
-  lt_count=0;
+  lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk '
+BEGIN {RS = " "; FS = "/|\n";} {
+  lt_foo = "";
+  lt_count = 0;
   for (lt_i = NF; lt_i > 0; lt_i--) {
     if ($lt_i != "" && $lt_i != ".") {
       if ($lt_i == "..") {
         lt_count++;
       } else {
         if (lt_count == 0) {
-          lt_foo="/" $lt_i lt_foo;
+          lt_foo = "/" $lt_i lt_foo;
         } else {
           lt_count--;
         }
@@ -13780,14 +14630,20 @@ BEGIN {RS=" "; FS="/|\n";} {
   if (lt_foo != "") { lt_freq[lt_foo]++; }
   if (lt_freq[lt_foo] == 1) { print lt_foo; }
 }'`
-  sys_lib_search_path_spec=`$ECHO $lt_search_path_spec`
+  # AWK program above erroneously prepends '/' to C:/dos/paths
+  # for these hosts.
+  case $host_os in
+    mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\
+      $SED 's|/\([A-Za-z]:\)|\1|g'` ;;
+  esac
+  sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP`
 else
   sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
 fi
 library_names_spec=
 libname_spec='lib$name'
 soname_spec=
-shrext_cmds=".so"
+shrext_cmds=.so
 postinstall_cmds=
 postuninstall_cmds=
 finish_cmds=
@@ -13804,56 +14660,108 @@ hardcode_into_libs=no
 # flags to be left without arguments
 need_version=unknown
 
+
+
 case $host_os in
 aix3*)
-  version_type=linux
-  library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
+  version_type=linux # correct to gnu/linux during the next big refactor
+  library_names_spec='$libname$release$shared_ext$versuffix $libname.a'
   shlibpath_var=LIBPATH
 
   # AIX 3 has no versioning support, so we append a major version to the name.
-  soname_spec='${libname}${release}${shared_ext}$major'
+  soname_spec='$libname$release$shared_ext$major'
   ;;
 
 aix[4-9]*)
-  version_type=linux
+  version_type=linux # correct to gnu/linux during the next big refactor
   need_lib_prefix=no
   need_version=no
   hardcode_into_libs=yes
-  if test "$host_cpu" = ia64; then
+  if test ia64 = "$host_cpu"; then
     # AIX 5 supports IA64
-    library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
+    library_names_spec='$libname$release$shared_ext$major $libname$release$shared_ext$versuffix $libname$shared_ext'
     shlibpath_var=LD_LIBRARY_PATH
   else
     # With GCC up to 2.95.x, collect2 would create an import file
     # for dependence libraries.  The import file would start with
-    # the line `#! .'.  This would cause the generated library to
-    # depend on `.', always an invalid library.  This was fixed in
+    # the line '#! .'.  This would cause the generated library to
+    # depend on '.', always an invalid library.  This was fixed in
     # development snapshots of GCC prior to 3.0.
     case $host_os in
       aix4 | aix4.[01] | aix4.[01].*)
       if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
 	   echo ' yes '
-	   echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then
+	   echo '#endif'; } | $CC -E - | $GREP yes > /dev/null; then
 	:
       else
 	can_build_shared=no
       fi
       ;;
     esac
-    # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
+    # Using Import Files as archive members, it is possible to support
+    # filename-based versioning of shared library archives on AIX. While
+    # this would work for both with and without runtime linking, it will
+    # prevent static linking of such archives. So we do filename-based
+    # shared library versioning with .so extension only, which is used
+    # when both runtime linking and shared linking is enabled.
+    # Unfortunately, runtime linking may impact performance, so we do
+    # not want this to be the default eventually. Also, we use the
+    # versioned .so libs for executables only if there is the -brtl
+    # linker flag in LDFLAGS as well, or --with-aix-soname=svr4 only.
+    # To allow for filename-based versioning support, we need to create
+    # libNAME.so.V as an archive file, containing:
+    # *) an Import File, referring to the versioned filename of the
+    #    archive as well as the shared archive member, telling the
+    #    bitwidth (32 or 64) of that shared object, and providing the
+    #    list of exported symbols of that shared object, eventually
+    #    decorated with the 'weak' keyword
+    # *) the shared object with the F_LOADONLY flag set, to really avoid
+    #    it being seen by the linker.
+    # At run time we better use the real file rather than another symlink,
+    # but for link time we create the symlink libNAME.so -> libNAME.so.V
+
+    case $with_aix_soname,$aix_use_runtimelinking in
+    # AIX (on Power*) has no versioning support, so currently we cannot hardcode correct
     # soname into executable. Probably we can add versioning support to
     # collect2, so additional links can be useful in future.
-    if test "$aix_use_runtimelinking" = yes; then
+    aix,yes) # traditional libtool
+      dynamic_linker='AIX unversionable lib.so'
       # If using run time linking (on AIX 4.2 or later) use lib<name>.so
       # instead of lib<name>.a to let people know that these are not
       # typical AIX shared libraries.
-      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-    else
+      library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+      ;;
+    aix,no) # traditional AIX only
+      dynamic_linker='AIX lib.a(lib.so.V)'
       # We preserve .a as extension for shared libraries through AIX4.2
       # and later when we are not doing run time linking.
-      library_names_spec='${libname}${release}.a $libname.a'
-      soname_spec='${libname}${release}${shared_ext}$major'
-    fi
+      library_names_spec='$libname$release.a $libname.a'
+      soname_spec='$libname$release$shared_ext$major'
+      ;;
+    svr4,*) # full svr4 only
+      dynamic_linker="AIX lib.so.V($shared_archive_member_spec.o)"
+      library_names_spec='$libname$release$shared_ext$major $libname$shared_ext'
+      # We do not specify a path in Import Files, so LIBPATH fires.
+      shlibpath_overrides_runpath=yes
+      ;;
+    *,yes) # both, prefer svr4
+      dynamic_linker="AIX lib.so.V($shared_archive_member_spec.o), lib.a(lib.so.V)"
+      library_names_spec='$libname$release$shared_ext$major $libname$shared_ext'
+      # unpreferred sharedlib libNAME.a needs extra handling
+      postinstall_cmds='test -n "$linkname" || linkname="$realname"~func_stripname "" ".so" "$linkname"~$install_shared_prog "$dir/$func_stripname_result.$libext" "$destdir/$func_stripname_result.$libext"~test -z "$tstripme" || test -z "$striplib" || $striplib "$destdir/$func_stripname_result.$libext"'
+      postuninstall_cmds='for n in $library_names $old_library; do :; done~func_stripname "" ".so" "$n"~test "$func_stripname_result" = "$n" || func_append rmfiles " $odir/$func_stripname_result.$libext"'
+      # We do not specify a path in Import Files, so LIBPATH fires.
+      shlibpath_overrides_runpath=yes
+      ;;
+    *,no) # both, prefer aix
+      dynamic_linker="AIX lib.a(lib.so.V), lib.so.V($shared_archive_member_spec.o)"
+      library_names_spec='$libname$release.a $libname.a'
+      soname_spec='$libname$release$shared_ext$major'
+      # unpreferred sharedlib libNAME.so.V and symlink libNAME.so need extra handling
+      postinstall_cmds='test -z "$dlname" || $install_shared_prog $dir/$dlname $destdir/$dlname~test -z "$tstripme" || test -z "$striplib" || $striplib $destdir/$dlname~test -n "$linkname" || linkname=$realname~func_stripname "" ".a" "$linkname"~(cd "$destdir" && $LN_S -f $dlname $func_stripname_result.so)'
+      postuninstall_cmds='test -z "$dlname" || func_append rmfiles " $odir/$dlname"~for n in $old_library $library_names; do :; done~func_stripname "" ".a" "$n"~func_append rmfiles " $odir/$func_stripname_result.so"'
+      ;;
+    esac
     shlibpath_var=LIBPATH
   fi
   ;;
@@ -13863,27 +14771,27 @@ amigaos*)
   powerpc)
     # Since July 2007 AmigaOS4 officially supports .so libraries.
     # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
-    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
     ;;
   m68k)
     library_names_spec='$libname.ixlibrary $libname.a'
     # Create ${libname}_ixlibrary.a entries in /sys/libs.
-    finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$ECHO "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
+    finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
     ;;
   esac
   ;;
 
 beos*)
-  library_names_spec='${libname}${shared_ext}'
+  library_names_spec='$libname$shared_ext'
   dynamic_linker="$host_os ld.so"
   shlibpath_var=LIBRARY_PATH
   ;;
 
 bsdi[45]*)
-  version_type=linux
+  version_type=linux # correct to gnu/linux during the next big refactor
   need_version=no
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
+  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+  soname_spec='$libname$release$shared_ext$major'
   finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
   shlibpath_var=LD_LIBRARY_PATH
   sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
@@ -13895,16 +14803,17 @@ bsdi[45]*)
 
 cygwin* | mingw* | pw32* | cegcc*)
   version_type=windows
-  shrext_cmds=".dll"
+  shrext_cmds=.dll
   need_version=no
   need_lib_prefix=no
 
-  case $GCC,$host_os in
-  yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*)
+  case $GCC,$cc_basename in
+  yes,*)
+    # gcc
     library_names_spec='$libname.dll.a'
     # DLL is installed to $(libdir)/../bin by postinstall_cmds
-    postinstall_cmds='base_file=`basename \${file}`~
-      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
+    postinstall_cmds='base_file=`basename \$file`~
+      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~
       dldir=$destdir/`dirname \$dlpath`~
       test -d \$dldir || mkdir -p \$dldir~
       $install_prog $dir/$dlname \$dldir/$dlname~
@@ -13920,37 +14829,84 @@ cygwin* | mingw* | pw32* | cegcc*)
     case $host_os in
     cygwin*)
       # Cygwin DLLs use 'cyg' prefix rather than 'lib'
-      soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
-      sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
+      soname_spec='`echo $libname | sed -e 's/^lib/cyg/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
+
+      sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"
       ;;
     mingw* | cegcc*)
       # MinGW DLLs use traditional 'lib' prefix
-      soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
-      sys_lib_search_path_spec=`$CC -print-search-dirs | $GREP "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
+      soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
+      ;;
+    pw32*)
+      # pw32 DLLs use 'pw' prefix rather than 'lib'
+      library_names_spec='`echo $libname | sed -e 's/^lib/pw/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
+      ;;
+    esac
+    dynamic_linker='Win32 ld.exe'
+    ;;
+
+  *,cl*)
+    # Native MSVC
+    libname_spec='$name'
+    soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
+    library_names_spec='$libname.dll.lib'
+
+    case $build_os in
+    mingw*)
+      sys_lib_search_path_spec=
+      lt_save_ifs=$IFS
+      IFS=';'
+      for lt_path in $LIB
+      do
+        IFS=$lt_save_ifs
+        # Let DOS variable expansion print the short 8.3 style file name.
+        lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"`
+        sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path"
+      done
+      IFS=$lt_save_ifs
+      # Convert to MSYS style.
+      sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'`
+      ;;
+    cygwin*)
+      # Convert to unix form, then to dos form, then back to unix form
+      # but this time dos style (no spaces!) so that the unix form looks
+      # like /cygdrive/c/PROGRA~1:/cygdr...
+      sys_lib_search_path_spec=`cygpath --path --unix "$LIB"`
+      sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null`
+      sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
+      ;;
+    *)
+      sys_lib_search_path_spec=$LIB
       if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then
-        # It is most probably a Windows format PATH printed by
-        # mingw gcc, but we are running on Cygwin. Gcc prints its search
-        # path with ; separators, and with drive letters. We can handle the
-        # drive letters (cygwin fileutils understands them), so leave them,
-        # especially as we might pass files found there to a mingw objdump,
-        # which wouldn't understand a cygwinified path. Ahh.
+        # It is most probably a Windows format PATH.
         sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
       else
-        sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
+        sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
       fi
-      ;;
-    pw32*)
-      # pw32 DLLs use 'pw' prefix rather than 'lib'
-      library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
+      # FIXME: find the short name or the path components, as spaces are
+      # common. (e.g. "Program Files" -> "PROGRA~1")
       ;;
     esac
+
+    # DLL is installed to $(libdir)/../bin by postinstall_cmds
+    postinstall_cmds='base_file=`basename \$file`~
+      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~
+      dldir=$destdir/`dirname \$dlpath`~
+      test -d \$dldir || mkdir -p \$dldir~
+      $install_prog $dir/$dlname \$dldir/$dlname'
+    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
+      dlpath=$dir/\$dldll~
+       $RM \$dlpath'
+    shlibpath_overrides_runpath=yes
+    dynamic_linker='Win32 link.exe'
     ;;
 
   *)
-    library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib'
+    # Assume MSVC wrapper
+    library_names_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext $libname.lib'
+    dynamic_linker='Win32 ld.exe'
     ;;
   esac
-  dynamic_linker='Win32 ld.exe'
   # FIXME: first we should search . and the directory the executable is in
   shlibpath_var=PATH
   ;;
@@ -13960,8 +14916,8 @@ darwin* | rhapsody*)
   version_type=darwin
   need_lib_prefix=no
   need_version=no
-  library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext'
-  soname_spec='${libname}${release}${major}$shared_ext'
+  library_names_spec='$libname$release$major$shared_ext $libname$shared_ext'
+  soname_spec='$libname$release$major$shared_ext'
   shlibpath_overrides_runpath=yes
   shlibpath_var=DYLD_LIBRARY_PATH
   shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
@@ -13971,18 +14927,14 @@ darwin* | rhapsody*)
   ;;
 
 dgux*)
-  version_type=linux
+  version_type=linux # correct to gnu/linux during the next big refactor
   need_lib_prefix=no
   need_version=no
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
-  soname_spec='${libname}${release}${shared_ext}$major'
+  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+  soname_spec='$libname$release$shared_ext$major'
   shlibpath_var=LD_LIBRARY_PATH
   ;;
 
-freebsd1*)
-  dynamic_linker=no
-  ;;
-
 freebsd* | dragonfly*)
   # DragonFly does not have aout.  When/if they implement a new
   # versioning mechanism, adjust this.
@@ -13990,25 +14942,26 @@ freebsd* | dragonfly*)
     objformat=`/usr/bin/objformat`
   else
     case $host_os in
-    freebsd[123]*) objformat=aout ;;
+    freebsd[23].*) objformat=aout ;;
     *) objformat=elf ;;
     esac
   fi
   version_type=freebsd-$objformat
   case $version_type in
     freebsd-elf*)
-      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
+      library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+      soname_spec='$libname$release$shared_ext$major'
       need_version=no
       need_lib_prefix=no
       ;;
     freebsd-*)
-      library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
+      library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
       need_version=yes
       ;;
   esac
   shlibpath_var=LD_LIBRARY_PATH
   case $host_os in
-  freebsd2*)
+  freebsd2.*)
     shlibpath_overrides_runpath=yes
     ;;
   freebsd3.[01]* | freebsdelf3.[01]*)
@@ -14027,13 +14980,16 @@ freebsd* | dragonfly*)
   esac
   ;;
 
-gnu*)
-  version_type=linux
+haiku*)
+  version_type=linux # correct to gnu/linux during the next big refactor
   need_lib_prefix=no
   need_version=no
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
-  shlibpath_var=LD_LIBRARY_PATH
+  dynamic_linker="$host_os runtime_loader"
+  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+  soname_spec='$libname$release$shared_ext$major'
+  shlibpath_var=LIBRARY_PATH
+  shlibpath_overrides_runpath=no
+  sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib'
   hardcode_into_libs=yes
   ;;
 
@@ -14050,14 +15006,15 @@ hpux9* | hpux10* | hpux11*)
     dynamic_linker="$host_os dld.so"
     shlibpath_var=LD_LIBRARY_PATH
     shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
-    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-    soname_spec='${libname}${release}${shared_ext}$major'
-    if test "X$HPUX_IA64_MODE" = X32; then
+    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+    soname_spec='$libname$release$shared_ext$major'
+    if test 32 = "$HPUX_IA64_MODE"; then
       sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
+      sys_lib_dlsearch_path_spec=/usr/lib/hpux32
     else
       sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
+      sys_lib_dlsearch_path_spec=/usr/lib/hpux64
     fi
-    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
     ;;
   hppa*64*)
     shrext_cmds='.sl'
@@ -14065,8 +15022,8 @@ hpux9* | hpux10* | hpux11*)
     dynamic_linker="$host_os dld.sl"
     shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
     shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
-    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-    soname_spec='${libname}${release}${shared_ext}$major'
+    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+    soname_spec='$libname$release$shared_ext$major'
     sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
     sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
     ;;
@@ -14075,20 +15032,22 @@ hpux9* | hpux10* | hpux11*)
     dynamic_linker="$host_os dld.sl"
     shlibpath_var=SHLIB_PATH
     shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
-    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-    soname_spec='${libname}${release}${shared_ext}$major'
+    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+    soname_spec='$libname$release$shared_ext$major'
     ;;
   esac
-  # HP-UX runs *really* slowly unless shared libraries are mode 555.
+  # HP-UX runs *really* slowly unless shared libraries are mode 555, ...
   postinstall_cmds='chmod 555 $lib'
+  # or fails outright, so override atomically:
+  install_override_mode=555
   ;;
 
 interix[3-9]*)
-  version_type=linux
+  version_type=linux # correct to gnu/linux during the next big refactor
   need_lib_prefix=no
   need_version=no
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
+  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+  soname_spec='$libname$release$shared_ext$major'
   dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
   shlibpath_var=LD_LIBRARY_PATH
   shlibpath_overrides_runpath=no
@@ -14099,16 +15058,16 @@ irix5* | irix6* | nonstopux*)
   case $host_os in
     nonstopux*) version_type=nonstopux ;;
     *)
-	if test "$lt_cv_prog_gnu_ld" = yes; then
-		version_type=linux
+	if test yes = "$lt_cv_prog_gnu_ld"; then
+		version_type=linux # correct to gnu/linux during the next big refactor
 	else
 		version_type=irix
 	fi ;;
   esac
   need_lib_prefix=no
   need_version=no
-  soname_spec='${libname}${release}${shared_ext}$major'
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
+  soname_spec='$libname$release$shared_ext$major'
+  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$release$shared_ext $libname$shared_ext'
   case $host_os in
   irix5* | nonstopux*)
     libsuff= shlibsuff=
@@ -14127,8 +15086,8 @@ irix5* | irix6* | nonstopux*)
   esac
   shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
   shlibpath_overrides_runpath=no
-  sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
-  sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
+  sys_lib_search_path_spec="/usr/lib$libsuff /lib$libsuff /usr/local/lib$libsuff"
+  sys_lib_dlsearch_path_spec="/usr/lib$libsuff /lib$libsuff"
   hardcode_into_libs=yes
   ;;
 
@@ -14137,22 +15096,47 @@ linux*oldld* | linux*aout* | linux*coff*)
   dynamic_linker=no
   ;;
 
-# This must be Linux ELF.
-linux* | k*bsd*-gnu)
-  version_type=linux
+linux*android*)
+  version_type=none # Android doesn't support versioned libraries.
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='$libname$release$shared_ext'
+  soname_spec='$libname$release$shared_ext'
+  finish_cmds=
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=yes
+
+  # This implies no fast_install, which is unacceptable.
+  # Some rework will be needed to allow for fast_install
+  # before this can be enabled.
+  hardcode_into_libs=yes
+
+  dynamic_linker='Android linker'
+  # Don't embed -rpath directories since the linker doesn't support them.
+  hardcode_libdir_flag_spec='-L$libdir'
+  ;;
+
+# This must be glibc/ELF.
+linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
+  version_type=linux # correct to gnu/linux during the next big refactor
   need_lib_prefix=no
   need_version=no
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
+  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+  soname_spec='$libname$release$shared_ext$major'
   finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
   shlibpath_var=LD_LIBRARY_PATH
   shlibpath_overrides_runpath=no
+
   # Some binutils ld are patched to set DT_RUNPATH
-  save_LDFLAGS=$LDFLAGS
-  save_libdir=$libdir
-  eval "libdir=/foo; wl=\"$lt_prog_compiler_wl\"; \
-       LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec\""
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+  if ${lt_cv_shlibpath_overrides_runpath+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  lt_cv_shlibpath_overrides_runpath=no
+    save_LDFLAGS=$LDFLAGS
+    save_libdir=$libdir
+    eval "libdir=/foo; wl=\"$lt_prog_compiler_wl\"; \
+	 LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec\""
+    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
 int
@@ -14165,22 +15149,31 @@ main ()
 _ACEOF
 if ac_fn_c_try_link "$LINENO"; then :
   if  ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then :
-  shlibpath_overrides_runpath=yes
+  lt_cv_shlibpath_overrides_runpath=yes
 fi
 fi
 rm -f core conftest.err conftest.$ac_objext \
     conftest$ac_exeext conftest.$ac_ext
-  LDFLAGS=$save_LDFLAGS
-  libdir=$save_libdir
+    LDFLAGS=$save_LDFLAGS
+    libdir=$save_libdir
+
+fi
+
+  shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath
 
   # This implies no fast_install, which is unacceptable.
   # Some rework will be needed to allow for fast_install
   # before this can be enabled.
   hardcode_into_libs=yes
 
-  # Append ld.so.conf contents to the search path
+  # Ideally, we could use ldconfig to report *all* directores which are
+  # searched for libraries, however this is still not possible.  Aside from not
+  # being certain /sbin/ldconfig is available, command
+  # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64,
+  # even though it is searched at run-time.  Try to do the best guess by
+  # appending ld.so.conf contents (and includes) to the search path.
   if test -f /etc/ld.so.conf; then
-    lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[	 ]*hwcap[	 ]/d;s/[:,	]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
+    lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[	 ]*hwcap[	 ]/d;s/[:,	]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '`
     sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
   fi
 
@@ -14198,12 +15191,12 @@ netbsd*)
   need_lib_prefix=no
   need_version=no
   if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
-    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
+    library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
     finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
     dynamic_linker='NetBSD (a.out) ld.so'
   else
-    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
-    soname_spec='${libname}${release}${shared_ext}$major'
+    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+    soname_spec='$libname$release$shared_ext$major'
     dynamic_linker='NetBSD ld.elf_so'
   fi
   shlibpath_var=LD_LIBRARY_PATH
@@ -14212,8 +15205,8 @@ netbsd*)
   ;;
 
 newsos6)
-  version_type=linux
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  version_type=linux # correct to gnu/linux during the next big refactor
+  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
   shlibpath_var=LD_LIBRARY_PATH
   shlibpath_overrides_runpath=yes
   ;;
@@ -14222,58 +15215,68 @@ newsos6)
   version_type=qnx
   need_lib_prefix=no
   need_version=no
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
+  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+  soname_spec='$libname$release$shared_ext$major'
   shlibpath_var=LD_LIBRARY_PATH
   shlibpath_overrides_runpath=no
   hardcode_into_libs=yes
   dynamic_linker='ldqnx.so'
   ;;
 
-openbsd*)
+openbsd* | bitrig*)
   version_type=sunos
-  sys_lib_dlsearch_path_spec="/usr/lib"
+  sys_lib_dlsearch_path_spec=/usr/lib
   need_lib_prefix=no
-  # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
-  case $host_os in
-    openbsd3.3 | openbsd3.3.*)	need_version=yes ;;
-    *)				need_version=no  ;;
-  esac
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
-  finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
-  shlibpath_var=LD_LIBRARY_PATH
-  if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
-    case $host_os in
-      openbsd2.[89] | openbsd2.[89].*)
-	shlibpath_overrides_runpath=no
-	;;
-      *)
-	shlibpath_overrides_runpath=yes
-	;;
-      esac
+  if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
+    need_version=no
   else
-    shlibpath_overrides_runpath=yes
+    need_version=yes
   fi
+  library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
+  finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=yes
   ;;
 
 os2*)
   libname_spec='$name'
-  shrext_cmds=".dll"
+  version_type=windows
+  shrext_cmds=.dll
+  need_version=no
   need_lib_prefix=no
-  library_names_spec='$libname${shared_ext} $libname.a'
+  # OS/2 can only load a DLL with a base name of 8 characters or less.
+  soname_spec='`test -n "$os2dllname" && libname="$os2dllname";
+    v=$($ECHO $release$versuffix | tr -d .-);
+    n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _);
+    $ECHO $n$v`$shared_ext'
+  library_names_spec='${libname}_dll.$libext'
   dynamic_linker='OS/2 ld.exe'
-  shlibpath_var=LIBPATH
+  shlibpath_var=BEGINLIBPATH
+  sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
+  sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
+  postinstall_cmds='base_file=`basename \$file`~
+    dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; $ECHO \$dlname'\''`~
+    dldir=$destdir/`dirname \$dlpath`~
+    test -d \$dldir || mkdir -p \$dldir~
+    $install_prog $dir/$dlname \$dldir/$dlname~
+    chmod a+x \$dldir/$dlname~
+    if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
+      eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
+    fi'
+  postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; $ECHO \$dlname'\''`~
+    dlpath=$dir/\$dldll~
+    $RM \$dlpath'
   ;;
 
 osf3* | osf4* | osf5*)
   version_type=osf
   need_lib_prefix=no
   need_version=no
-  soname_spec='${libname}${release}${shared_ext}$major'
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='$libname$release$shared_ext$major'
+  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
   shlibpath_var=LD_LIBRARY_PATH
   sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
-  sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
+  sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
   ;;
 
 rdos*)
@@ -14281,11 +15284,11 @@ rdos*)
   ;;
 
 solaris*)
-  version_type=linux
+  version_type=linux # correct to gnu/linux during the next big refactor
   need_lib_prefix=no
   need_version=no
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
+  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+  soname_spec='$libname$release$shared_ext$major'
   shlibpath_var=LD_LIBRARY_PATH
   shlibpath_overrides_runpath=yes
   hardcode_into_libs=yes
@@ -14295,20 +15298,20 @@ solaris*)
 
 sunos4*)
   version_type=sunos
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
+  library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
   finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
   shlibpath_var=LD_LIBRARY_PATH
   shlibpath_overrides_runpath=yes
-  if test "$with_gnu_ld" = yes; then
+  if test yes = "$with_gnu_ld"; then
     need_lib_prefix=no
   fi
   need_version=yes
   ;;
 
 sysv4 | sysv4.3*)
-  version_type=linux
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
+  version_type=linux # correct to gnu/linux during the next big refactor
+  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+  soname_spec='$libname$release$shared_ext$major'
   shlibpath_var=LD_LIBRARY_PATH
   case $host_vendor in
     sni)
@@ -14329,24 +15332,24 @@ sysv4 | sysv4.3*)
   ;;
 
 sysv4*MP*)
-  if test -d /usr/nec ;then
-    version_type=linux
-    library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
-    soname_spec='$libname${shared_ext}.$major'
+  if test -d /usr/nec; then
+    version_type=linux # correct to gnu/linux during the next big refactor
+    library_names_spec='$libname$shared_ext.$versuffix $libname$shared_ext.$major $libname$shared_ext'
+    soname_spec='$libname$shared_ext.$major'
     shlibpath_var=LD_LIBRARY_PATH
   fi
   ;;
 
 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
-  version_type=freebsd-elf
+  version_type=sco
   need_lib_prefix=no
   need_version=no
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
+  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext $libname$shared_ext'
+  soname_spec='$libname$release$shared_ext$major'
   shlibpath_var=LD_LIBRARY_PATH
   shlibpath_overrides_runpath=yes
   hardcode_into_libs=yes
-  if test "$with_gnu_ld" = yes; then
+  if test yes = "$with_gnu_ld"; then
     sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
   else
     sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
@@ -14361,19 +15364,19 @@ sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
 
 tpf*)
   # TPF is a cross-target only.  Preferred cross-host = GNU/Linux.
-  version_type=linux
+  version_type=linux # correct to gnu/linux during the next big refactor
   need_lib_prefix=no
   need_version=no
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
   shlibpath_var=LD_LIBRARY_PATH
   shlibpath_overrides_runpath=no
   hardcode_into_libs=yes
   ;;
 
 uts4*)
-  version_type=linux
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
+  version_type=linux # correct to gnu/linux during the next big refactor
+  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+  soname_spec='$libname$release$shared_ext$major'
   shlibpath_var=LD_LIBRARY_PATH
   ;;
 
@@ -14383,20 +15386,40 @@ uts4*)
 esac
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5
 $as_echo "$dynamic_linker" >&6; }
-test "$dynamic_linker" = no && can_build_shared=no
+test no = "$dynamic_linker" && can_build_shared=no
 
 variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
-if test "$GCC" = yes; then
+if test yes = "$GCC"; then
   variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
 fi
 
-if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then
-  sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
+if test set = "${lt_cv_sys_lib_search_path_spec+set}"; then
+  sys_lib_search_path_spec=$lt_cv_sys_lib_search_path_spec
 fi
-if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then
-  sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec"
+
+if test set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then
+  sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec
 fi
 
+# remember unaugmented sys_lib_dlsearch_path content for libtool script decls...
+configure_time_dlsearch_path=$sys_lib_dlsearch_path_spec
+
+# ... but it needs LT_SYS_LIBRARY_PATH munging for other configure-time code
+func_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH"
+
+# to be used as default LT_SYS_LIBRARY_PATH value in generated libtool
+configure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH
+
+
+
+
+
+
+
+
+
+
+
 
 
 
@@ -14488,15 +15511,15 @@ $as_echo_n "checking how to hardcode library paths into programs... " >&6; }
 hardcode_action=
 if test -n "$hardcode_libdir_flag_spec" ||
    test -n "$runpath_var" ||
-   test "X$hardcode_automatic" = "Xyes" ; then
+   test yes = "$hardcode_automatic"; then
 
   # We can hardcode non-existent directories.
-  if test "$hardcode_direct" != no &&
+  if test no != "$hardcode_direct" &&
      # If the only mechanism to avoid hardcoding is shlibpath_var, we
      # have to relink, otherwise we might link with an installed library
      # when we should be linking with a yet-to-be-installed one
-     ## test "$_LT_TAGVAR(hardcode_shlibpath_var, )" != no &&
-     test "$hardcode_minus_L" != no; then
+     ## test no != "$_LT_TAGVAR(hardcode_shlibpath_var, )" &&
+     test no != "$hardcode_minus_L"; then
     # Linking always hardcodes the temporary library directory.
     hardcode_action=relink
   else
@@ -14511,12 +15534,12 @@ fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action" >&5
 $as_echo "$hardcode_action" >&6; }
 
-if test "$hardcode_action" = relink ||
-   test "$inherit_rpath" = yes; then
+if test relink = "$hardcode_action" ||
+   test yes = "$inherit_rpath"; then
   # Fast installation is not supported
   enable_fast_install=no
-elif test "$shlibpath_overrides_runpath" = yes ||
-     test "$enable_shared" = no; then
+elif test yes = "$shlibpath_overrides_runpath" ||
+     test no = "$enable_shared"; then
   # Fast installation is not necessary
   enable_fast_install=needless
 fi
@@ -14526,7 +15549,7 @@ fi
 
 
 
-  if test "x$enable_dlopen" != xyes; then
+  if test yes != "$enable_dlopen"; then
   enable_dlopen=unknown
   enable_dlopen_self=unknown
   enable_dlopen_self_static=unknown
@@ -14536,23 +15559,23 @@ else
 
   case $host_os in
   beos*)
-    lt_cv_dlopen="load_add_on"
+    lt_cv_dlopen=load_add_on
     lt_cv_dlopen_libs=
     lt_cv_dlopen_self=yes
     ;;
 
   mingw* | pw32* | cegcc*)
-    lt_cv_dlopen="LoadLibrary"
+    lt_cv_dlopen=LoadLibrary
     lt_cv_dlopen_libs=
     ;;
 
   cygwin*)
-    lt_cv_dlopen="dlopen"
+    lt_cv_dlopen=dlopen
     lt_cv_dlopen_libs=
     ;;
 
   darwin*)
-  # if libdl is installed we need to link against it
+    # if libdl is installed we need to link against it
     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
 $as_echo_n "checking for dlopen in -ldl... " >&6; }
 if ${ac_cv_lib_dl_dlopen+:} false; then :
@@ -14590,10 +15613,10 @@ fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
 $as_echo "$ac_cv_lib_dl_dlopen" >&6; }
 if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
-  lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
+  lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl
 else
 
-    lt_cv_dlopen="dyld"
+    lt_cv_dlopen=dyld
     lt_cv_dlopen_libs=
     lt_cv_dlopen_self=yes
 
@@ -14601,10 +15624,18 @@ fi
 
     ;;
 
+  tpf*)
+    # Don't try to run any link tests for TPF.  We know it's impossible
+    # because TPF is a cross-compiler, and we know how we open DSOs.
+    lt_cv_dlopen=dlopen
+    lt_cv_dlopen_libs=
+    lt_cv_dlopen_self=no
+    ;;
+
   *)
     ac_fn_c_check_func "$LINENO" "shl_load" "ac_cv_func_shl_load"
 if test "x$ac_cv_func_shl_load" = xyes; then :
-  lt_cv_dlopen="shl_load"
+  lt_cv_dlopen=shl_load
 else
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
 $as_echo_n "checking for shl_load in -ldld... " >&6; }
@@ -14643,11 +15674,11 @@ fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
 $as_echo "$ac_cv_lib_dld_shl_load" >&6; }
 if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
-  lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"
+  lt_cv_dlopen=shl_load lt_cv_dlopen_libs=-ldld
 else
   ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
 if test "x$ac_cv_func_dlopen" = xyes; then :
-  lt_cv_dlopen="dlopen"
+  lt_cv_dlopen=dlopen
 else
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
 $as_echo_n "checking for dlopen in -ldl... " >&6; }
@@ -14686,7 +15717,7 @@ fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
 $as_echo "$ac_cv_lib_dl_dlopen" >&6; }
 if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
-  lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
+  lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl
 else
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -lsvld" >&5
 $as_echo_n "checking for dlopen in -lsvld... " >&6; }
@@ -14725,7 +15756,7 @@ fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_svld_dlopen" >&5
 $as_echo "$ac_cv_lib_svld_dlopen" >&6; }
 if test "x$ac_cv_lib_svld_dlopen" = xyes; then :
-  lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"
+  lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-lsvld
 else
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dld_link in -ldld" >&5
 $as_echo_n "checking for dld_link in -ldld... " >&6; }
@@ -14764,7 +15795,7 @@ fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_dld_link" >&5
 $as_echo "$ac_cv_lib_dld_dld_link" >&6; }
 if test "x$ac_cv_lib_dld_dld_link" = xyes; then :
-  lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"
+  lt_cv_dlopen=dld_link lt_cv_dlopen_libs=-ldld
 fi
 
 
@@ -14785,21 +15816,21 @@ fi
     ;;
   esac
 
-  if test "x$lt_cv_dlopen" != xno; then
-    enable_dlopen=yes
-  else
+  if test no = "$lt_cv_dlopen"; then
     enable_dlopen=no
+  else
+    enable_dlopen=yes
   fi
 
   case $lt_cv_dlopen in
   dlopen)
-    save_CPPFLAGS="$CPPFLAGS"
-    test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
+    save_CPPFLAGS=$CPPFLAGS
+    test yes = "$ac_cv_header_dlfcn_h" && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
 
-    save_LDFLAGS="$LDFLAGS"
+    save_LDFLAGS=$LDFLAGS
     wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
 
-    save_LIBS="$LIBS"
+    save_LIBS=$LIBS
     LIBS="$lt_cv_dlopen_libs $LIBS"
 
     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a program can dlopen itself" >&5
@@ -14807,13 +15838,13 @@ $as_echo_n "checking whether a program can dlopen itself... " >&6; }
 if ${lt_cv_dlopen_self+:} false; then :
   $as_echo_n "(cached) " >&6
 else
-  	  if test "$cross_compiling" = yes; then :
+  	  if test yes = "$cross_compiling"; then :
   lt_cv_dlopen_self=cross
 else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 14816 "configure"
+#line $LINENO "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -14854,7 +15885,13 @@ else
 #  endif
 #endif
 
-void fnord() { int i=42;}
+/* When -fvisibility=hidden is used, assume the code has been annotated
+   correspondingly for the symbols needed.  */
+#if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
+int fnord () __attribute__((visibility("default")));
+#endif
+
+int fnord () { return 42; }
 int main ()
 {
   void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
@@ -14863,7 +15900,11 @@ int main ()
   if (self)
     {
       if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
-      else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
+      else
+        {
+	  if (dlsym( self,"_fnord"))  status = $lt_dlneed_uscore;
+          else puts (dlerror ());
+	}
       /* dlclose (self); */
     }
   else
@@ -14876,7 +15917,7 @@ _LT_EOF
   (eval $ac_link) 2>&5
   ac_status=$?
   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; } && test -s conftest${ac_exeext} 2>/dev/null; then
+  test $ac_status = 0; } && test -s "conftest$ac_exeext" 2>/dev/null; then
     (./conftest; exit; ) >&5 2>/dev/null
     lt_status=$?
     case x$lt_status in
@@ -14896,20 +15937,20 @@ fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self" >&5
 $as_echo "$lt_cv_dlopen_self" >&6; }
 
-    if test "x$lt_cv_dlopen_self" = xyes; then
+    if test yes = "$lt_cv_dlopen_self"; then
       wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a statically linked program can dlopen itself" >&5
 $as_echo_n "checking whether a statically linked program can dlopen itself... " >&6; }
 if ${lt_cv_dlopen_self_static+:} false; then :
   $as_echo_n "(cached) " >&6
 else
-  	  if test "$cross_compiling" = yes; then :
+  	  if test yes = "$cross_compiling"; then :
   lt_cv_dlopen_self_static=cross
 else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 14912 "configure"
+#line $LINENO "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -14950,7 +15991,13 @@ else
 #  endif
 #endif
 
-void fnord() { int i=42;}
+/* When -fvisibility=hidden is used, assume the code has been annotated
+   correspondingly for the symbols needed.  */
+#if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
+int fnord () __attribute__((visibility("default")));
+#endif
+
+int fnord () { return 42; }
 int main ()
 {
   void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
@@ -14959,7 +16006,11 @@ int main ()
   if (self)
     {
       if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
-      else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
+      else
+        {
+	  if (dlsym( self,"_fnord"))  status = $lt_dlneed_uscore;
+          else puts (dlerror ());
+	}
       /* dlclose (self); */
     }
   else
@@ -14972,7 +16023,7 @@ _LT_EOF
   (eval $ac_link) 2>&5
   ac_status=$?
   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; } && test -s conftest${ac_exeext} 2>/dev/null; then
+  test $ac_status = 0; } && test -s "conftest$ac_exeext" 2>/dev/null; then
     (./conftest; exit; ) >&5 2>/dev/null
     lt_status=$?
     case x$lt_status in
@@ -14993,9 +16044,9 @@ fi
 $as_echo "$lt_cv_dlopen_self_static" >&6; }
     fi
 
-    CPPFLAGS="$save_CPPFLAGS"
-    LDFLAGS="$save_LDFLAGS"
-    LIBS="$save_LIBS"
+    CPPFLAGS=$save_CPPFLAGS
+    LDFLAGS=$save_LDFLAGS
+    LIBS=$save_LIBS
     ;;
   esac
 
@@ -15039,7 +16090,7 @@ else
 # FIXME - insert some real tests, host_os isn't really good enough
   case $host_os in
   darwin*)
-    if test -n "$STRIP" ; then
+    if test -n "$STRIP"; then
       striplib="$STRIP -x"
       old_striplib="$STRIP -S"
       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
@@ -15067,7 +16118,7 @@ fi
 
 
 
-  # Report which library types will actually be built
+  # Report what library types will actually be built
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libtool supports shared libraries" >&5
 $as_echo_n "checking if libtool supports shared libraries... " >&6; }
   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $can_build_shared" >&5
@@ -15075,13 +16126,13 @@ $as_echo "$can_build_shared" >&6; }
 
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build shared libraries" >&5
 $as_echo_n "checking whether to build shared libraries... " >&6; }
-  test "$can_build_shared" = "no" && enable_shared=no
+  test no = "$can_build_shared" && enable_shared=no
 
   # On AIX, shared libraries and static libraries use the same namespace, and
   # are all built from PIC.
   case $host_os in
   aix3*)
-    test "$enable_shared" = yes && enable_static=no
+    test yes = "$enable_shared" && enable_static=no
     if test -n "$RANLIB"; then
       archive_cmds="$archive_cmds~\$RANLIB \$lib"
       postinstall_cmds='$RANLIB $lib'
@@ -15089,8 +16140,12 @@ $as_echo_n "checking whether to build shared libraries... " >&6; }
     ;;
 
   aix[4-9]*)
-    if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
-      test "$enable_shared" = yes && enable_static=no
+    if test ia64 != "$host_cpu"; then
+      case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in
+      yes,aix,yes) ;;			# shared object as lib.so file only
+      yes,svr4,*) ;;			# shared object as lib.so archive member only
+      yes,*) enable_static=no ;;	# shared object in lib.a archive as well
+      esac
     fi
     ;;
   esac
@@ -15100,7 +16155,7 @@ $as_echo "$enable_shared" >&6; }
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build static libraries" >&5
 $as_echo_n "checking whether to build static libraries... " >&6; }
   # Make sure either enable_shared or enable_static is yes.
-  test "$enable_shared" = yes || enable_static=yes
+  test yes = "$enable_shared" || enable_static=yes
   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_static" >&5
 $as_echo "$enable_static" >&6; }
 
@@ -15114,8 +16169,147 @@ ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
 ac_compiler_gnu=$ac_cv_c_compiler_gnu
 
-CC="$lt_save_CC"
+CC=$lt_save_CC
 
+      if test -n "$CXX" && ( test no != "$CXX" &&
+    ( (test g++ = "$CXX" && `g++ -v >/dev/null 2>&1` ) ||
+    (test g++ != "$CXX"))); then
+  ac_ext=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
+$as_echo_n "checking how to run the C++ preprocessor... " >&6; }
+if test -z "$CXXCPP"; then
+  if ${ac_cv_prog_CXXCPP+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+      # Double quotes because CXXCPP needs to be expanded
+    for CXXCPP in "$CXX -E" "/lib/cpp"
+    do
+      ac_preproc_ok=false
+for ac_cxx_preproc_warn_flag in '' yes
+do
+  # Use a header file that comes with gcc, so configuring glibc
+  # with a fresh cross-compiler works.
+  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+  # <limits.h> exists even on freestanding compilers.
+  # On the NeXT, cc -E runs the code through the compiler's parser,
+  # not just through cpp. "Syntax error" is here to catch this case.
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+		     Syntax error
+_ACEOF
+if ac_fn_cxx_try_cpp "$LINENO"; then :
+
+else
+  # Broken: fails on valid input.
+continue
+fi
+rm -f conftest.err conftest.i conftest.$ac_ext
+
+  # OK, works on sane cases.  Now check whether nonexistent headers
+  # can be detected and how.
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <ac_nonexistent.h>
+_ACEOF
+if ac_fn_cxx_try_cpp "$LINENO"; then :
+  # Broken: success on invalid input.
+continue
+else
+  # Passes both tests.
+ac_preproc_ok=:
+break
+fi
+rm -f conftest.err conftest.i conftest.$ac_ext
+
+done
+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+rm -f conftest.i conftest.err conftest.$ac_ext
+if $ac_preproc_ok; then :
+  break
+fi
+
+    done
+    ac_cv_prog_CXXCPP=$CXXCPP
+
+fi
+  CXXCPP=$ac_cv_prog_CXXCPP
+else
+  ac_cv_prog_CXXCPP=$CXXCPP
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
+$as_echo "$CXXCPP" >&6; }
+ac_preproc_ok=false
+for ac_cxx_preproc_warn_flag in '' yes
+do
+  # Use a header file that comes with gcc, so configuring glibc
+  # with a fresh cross-compiler works.
+  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+  # <limits.h> exists even on freestanding compilers.
+  # On the NeXT, cc -E runs the code through the compiler's parser,
+  # not just through cpp. "Syntax error" is here to catch this case.
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+		     Syntax error
+_ACEOF
+if ac_fn_cxx_try_cpp "$LINENO"; then :
+
+else
+  # Broken: fails on valid input.
+continue
+fi
+rm -f conftest.err conftest.i conftest.$ac_ext
+
+  # OK, works on sane cases.  Now check whether nonexistent headers
+  # can be detected and how.
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <ac_nonexistent.h>
+_ACEOF
+if ac_fn_cxx_try_cpp "$LINENO"; then :
+  # Broken: success on invalid input.
+continue
+else
+  # Passes both tests.
+ac_preproc_ok=:
+break
+fi
+rm -f conftest.err conftest.i conftest.$ac_ext
+
+done
+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+rm -f conftest.i conftest.err conftest.$ac_ext
+if $ac_preproc_ok; then :
+
+else
+  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
+See \`config.log' for more details" "$LINENO" 5; }
+fi
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+else
+  _lt_caught_CXX_error=yes
+fi
 
 ac_ext=cpp
 ac_cpp='$CXXCPP $CPPFLAGS'
@@ -15132,7 +16326,6 @@ export_dynamic_flag_spec_CXX=
 hardcode_direct_CXX=no
 hardcode_direct_absolute_CXX=no
 hardcode_libdir_flag_spec_CXX=
-hardcode_libdir_flag_spec_ld_CXX=
 hardcode_libdir_separator_CXX=
 hardcode_minus_L_CXX=no
 hardcode_shlibpath_var_CXX=unsupported
@@ -15142,6 +16335,8 @@ module_cmds_CXX=
 module_expsym_cmds_CXX=
 link_all_deplibs_CXX=unknown
 old_archive_cmds_CXX=$old_archive_cmds
+reload_flag_CXX=$reload_flag
+reload_cmds_CXX=$reload_cmds
 no_undefined_flag_CXX=
 whole_archive_flag_spec_CXX=
 enable_shared_with_static_runtimes_CXX=no
@@ -15157,7 +16352,7 @@ objext_CXX=$objext
 # the CXX compiler isn't working.  Some variables (like enable_shared)
 # are currently assumed to apply to all compilers on this platform,
 # and will be corrupted by setting them based on a non-working compiler.
-if test "$_lt_caught_CXX_error" != yes; then
+if test yes != "$_lt_caught_CXX_error"; then
   # Code to be used in simple compile tests
   lt_simple_compile_test_code="int some_variable = 0;"
 
@@ -15197,6 +16392,7 @@ $RM -r conftest*
 
   # Allow CC to be a program name with arguments.
   lt_save_CC=$CC
+  lt_save_CFLAGS=$CFLAGS
   lt_save_LD=$LD
   lt_save_GCC=$GCC
   GCC=$GXX
@@ -15214,41 +16410,42 @@ $RM -r conftest*
   fi
   test -z "${LDCXX+set}" || LD=$LDCXX
   CC=${CXX-"c++"}
+  CFLAGS=$CXXFLAGS
   compiler=$CC
   compiler_CXX=$CC
-  for cc_temp in $compiler""; do
-  case $cc_temp in
-    compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
-    distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
-    \-*) ;;
-    *) break;;
-  esac
-done
-cc_basename=`$ECHO "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
+  func_cc_basename $compiler
+cc_basename=$func_cc_basename_result
 
 
   if test -n "$compiler"; then
     # We don't want -fno-exception when compiling C++ code, so set the
     # no_builtin_flag separately
-    if test "$GXX" = yes; then
+    if test yes = "$GXX"; then
       lt_prog_compiler_no_builtin_flag_CXX=' -fno-builtin'
     else
       lt_prog_compiler_no_builtin_flag_CXX=
     fi
 
-    if test "$GXX" = yes; then
+    if test yes = "$GXX"; then
       # Set up default GNU C++ configuration
 
 
 
+# Check whether --with-gnu-ld was given.
+if test "${with_gnu_ld+set}" = set; then :
+  withval=$with_gnu_ld; test no = "$withval" || with_gnu_ld=yes
+else
+  with_gnu_ld=no
+fi
+
 ac_prog=ld
-if test "$GCC" = yes; then
+if test yes = "$GCC"; then
   # Check if gcc -print-prog-name=ld gives a path.
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5
 $as_echo_n "checking for ld used by $CC... " >&6; }
   case $host in
   *-*-mingw*)
-    # gcc leaves a trailing carriage return which upsets mingw
+    # gcc leaves a trailing carriage return, which upsets mingw
     ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
   *)
     ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
@@ -15262,7 +16459,7 @@ $as_echo_n "checking for ld used by $CC... " >&6; }
       while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
 	ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
       done
-      test -z "$LD" && LD="$ac_prog"
+      test -z "$LD" && LD=$ac_prog
       ;;
   "")
     # If it fails, then pretend we aren't using GCC.
@@ -15273,7 +16470,7 @@ $as_echo_n "checking for ld used by $CC... " >&6; }
     with_gnu_ld=unknown
     ;;
   esac
-elif test "$with_gnu_ld" = yes; then
+elif test yes = "$with_gnu_ld"; then
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
 $as_echo_n "checking for GNU ld... " >&6; }
 else
@@ -15284,32 +16481,32 @@ if ${lt_cv_path_LD+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test -z "$LD"; then
-  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+  lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
   for ac_dir in $PATH; do
-    IFS="$lt_save_ifs"
+    IFS=$lt_save_ifs
     test -z "$ac_dir" && ac_dir=.
     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
-      lt_cv_path_LD="$ac_dir/$ac_prog"
+      lt_cv_path_LD=$ac_dir/$ac_prog
       # Check to see if the program is GNU ld.  I'd rather use --version,
       # but apparently some variants of GNU ld only accept -v.
       # Break only if it was the GNU/non-GNU ld that we prefer.
       case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
       *GNU* | *'with BFD'*)
-	test "$with_gnu_ld" != no && break
+	test no != "$with_gnu_ld" && break
 	;;
       *)
-	test "$with_gnu_ld" != yes && break
+	test yes != "$with_gnu_ld" && break
 	;;
       esac
     fi
   done
-  IFS="$lt_save_ifs"
+  IFS=$lt_save_ifs
 else
-  lt_cv_path_LD="$LD" # Let the user override the test with a path.
+  lt_cv_path_LD=$LD # Let the user override the test with a path.
 fi
 fi
 
-LD="$lt_cv_path_LD"
+LD=$lt_cv_path_LD
 if test -n "$LD"; then
   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
 $as_echo "$LD" >&6; }
@@ -15345,22 +16542,22 @@ with_gnu_ld=$lt_cv_prog_gnu_ld
 
       # Check if GNU C++ uses GNU ld as the underlying linker, since the
       # archiving commands below assume that GNU ld is being used.
-      if test "$with_gnu_ld" = yes; then
-        archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
-        archive_expsym_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+      if test yes = "$with_gnu_ld"; then
+        archive_cmds_CXX='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
+        archive_expsym_cmds_CXX='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
 
-        hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir'
-        export_dynamic_flag_spec_CXX='${wl}--export-dynamic'
+        hardcode_libdir_flag_spec_CXX='$wl-rpath $wl$libdir'
+        export_dynamic_flag_spec_CXX='$wl--export-dynamic'
 
         # If archive_cmds runs LD, not CC, wlarc should be empty
         # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
         #     investigate it a little bit more. (MM)
-        wlarc='${wl}'
+        wlarc='$wl'
 
         # ancient GNU ld didn't support --whole-archive et. al.
         if eval "`$CC -print-prog-name=ld` --help 2>&1" |
 	  $GREP 'no-whole-archive' > /dev/null; then
-          whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
+          whole_archive_flag_spec_CXX=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive'
         else
           whole_archive_flag_spec_CXX=
         fi
@@ -15379,7 +16576,7 @@ with_gnu_ld=$lt_cv_prog_gnu_ld
       # Commands to make compiler produce verbose output that lists
       # what "hidden" libraries, object files and flags are used when
       # linking a shared library.
-      output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
+      output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
 
     else
       GXX=no
@@ -15397,18 +16594,30 @@ $as_echo_n "checking whether the $compiler linker ($LD) supports shared librarie
         ld_shlibs_CXX=no
         ;;
       aix[4-9]*)
-        if test "$host_cpu" = ia64; then
+        if test ia64 = "$host_cpu"; then
           # On IA64, the linker does run time linking by default, so we don't
           # have to do anything special.
           aix_use_runtimelinking=no
           exp_sym_flag='-Bexport'
-          no_entry_flag=""
+          no_entry_flag=
         else
           aix_use_runtimelinking=no
 
           # Test if we are trying to use run time linking or normal
           # AIX style linking. If -brtl is somewhere in LDFLAGS, we
-          # need to do runtime linking.
+          # have runtime linking enabled, and use it for executables.
+          # For shared libraries, we enable/disable runtime linking
+          # depending on the kind of the shared library created -
+          # when "with_aix_soname,aix_use_runtimelinking" is:
+          # "aix,no"   lib.a(lib.so.V) shared, rtl:no,  for executables
+          # "aix,yes"  lib.so          shared, rtl:yes, for executables
+          #            lib.a           static archive
+          # "both,no"  lib.so.V(shr.o) shared, rtl:yes
+          #            lib.a(lib.so.V) shared, rtl:no,  for executables
+          # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables
+          #            lib.a(lib.so.V) shared, rtl:no
+          # "svr4,*"   lib.so.V(shr.o) shared, rtl:yes, for executables
+          #            lib.a           static archive
           case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*)
 	    for ld_flag in $LDFLAGS; do
 	      case $ld_flag in
@@ -15418,6 +16627,13 @@ $as_echo_n "checking whether the $compiler linker ($LD) supports shared librarie
 	        ;;
 	      esac
 	    done
+	    if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then
+	      # With aix-soname=svr4, we create the lib.so.V shared archives only,
+	      # so we don't have lib.a shared libs to link our executables.
+	      # We have to force runtime linking in this case.
+	      aix_use_runtimelinking=yes
+	      LDFLAGS="$LDFLAGS -Wl,-brtl"
+	    fi
 	    ;;
           esac
 
@@ -15436,13 +16652,21 @@ $as_echo_n "checking whether the $compiler linker ($LD) supports shared librarie
         hardcode_direct_absolute_CXX=yes
         hardcode_libdir_separator_CXX=':'
         link_all_deplibs_CXX=yes
-        file_list_spec_CXX='${wl}-f,'
+        file_list_spec_CXX='$wl-f,'
+        case $with_aix_soname,$aix_use_runtimelinking in
+        aix,*) ;;	# no import file
+        svr4,* | *,yes) # use import file
+          # The Import File defines what to hardcode.
+          hardcode_direct_CXX=no
+          hardcode_direct_absolute_CXX=no
+          ;;
+        esac
 
-        if test "$GXX" = yes; then
+        if test yes = "$GXX"; then
           case $host_os in aix4.[012]|aix4.[012].*)
           # We only want to do this on AIX 4.2 and lower, the check
           # below for broken collect2 doesn't work under 4.3+
-	  collect2name=`${CC} -print-prog-name=collect2`
+	  collect2name=`$CC -print-prog-name=collect2`
 	  if test -f "$collect2name" &&
 	     strings "$collect2name" | $GREP resolve_lib_name >/dev/null
 	  then
@@ -15460,36 +16684,50 @@ $as_echo_n "checking whether the $compiler linker ($LD) supports shared librarie
 	  fi
           esac
           shared_flag='-shared'
-	  if test "$aix_use_runtimelinking" = yes; then
-	    shared_flag="$shared_flag "'${wl}-G'
+	  if test yes = "$aix_use_runtimelinking"; then
+	    shared_flag=$shared_flag' $wl-G'
 	  fi
+	  # Need to ensure runtime linking is disabled for the traditional
+	  # shared library, or the linker may eventually find shared libraries
+	  # /with/ Import File - we do not want to mix them.
+	  shared_flag_aix='-shared'
+	  shared_flag_svr4='-shared $wl-G'
         else
           # not using gcc
-          if test "$host_cpu" = ia64; then
+          if test ia64 = "$host_cpu"; then
 	  # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
 	  # chokes on -Wl,-G. The following line is correct:
 	  shared_flag='-G'
           else
-	    if test "$aix_use_runtimelinking" = yes; then
-	      shared_flag='${wl}-G'
+	    if test yes = "$aix_use_runtimelinking"; then
+	      shared_flag='$wl-G'
 	    else
-	      shared_flag='${wl}-bM:SRE'
+	      shared_flag='$wl-bM:SRE'
 	    fi
+	    shared_flag_aix='$wl-bM:SRE'
+	    shared_flag_svr4='$wl-G'
           fi
         fi
 
-        export_dynamic_flag_spec_CXX='${wl}-bexpall'
+        export_dynamic_flag_spec_CXX='$wl-bexpall'
         # It seems that -bexpall does not export symbols beginning with
         # underscore (_), so it is better to generate a list of symbols to
 	# export.
         always_export_symbols_CXX=yes
-        if test "$aix_use_runtimelinking" = yes; then
+	if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then
           # Warning - without using the other runtime loading flags (-brtl),
           # -berok will link without error, but may produce a broken library.
-          allow_undefined_flag_CXX='-berok'
+          # The "-G" linker flag allows undefined symbols.
+          no_undefined_flag_CXX='-bernotok'
           # Determine the default libpath from the value encoded in an empty
           # executable.
-          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+          if test set = "${lt_cv_aix_libpath+set}"; then
+  aix_libpath=$lt_cv_aix_libpath
+else
+  if ${lt_cv_aix_libpath__CXX+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
 int
@@ -15502,35 +16740,48 @@ main ()
 _ACEOF
 if ac_fn_cxx_try_link "$LINENO"; then :
 
-lt_aix_libpath_sed='
-    /Import File Strings/,/^$/ {
-	/^0/ {
-	    s/^0  *\(.*\)$/\1/
-	    p
-	}
-    }'
-aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
-# Check for a 64-bit object if we didn't find anything.
-if test -z "$aix_libpath"; then
-  aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
-fi
+  lt_aix_libpath_sed='
+      /Import File Strings/,/^$/ {
+	  /^0/ {
+	      s/^0  *\([^ ]*\) *$/\1/
+	      p
+	  }
+      }'
+  lt_cv_aix_libpath__CXX=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+  # Check for a 64-bit object if we didn't find anything.
+  if test -z "$lt_cv_aix_libpath__CXX"; then
+    lt_cv_aix_libpath__CXX=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+  fi
 fi
 rm -f core conftest.err conftest.$ac_objext \
     conftest$ac_exeext conftest.$ac_ext
-if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+  if test -z "$lt_cv_aix_libpath__CXX"; then
+    lt_cv_aix_libpath__CXX=/usr/lib:/lib
+  fi
+
+fi
 
-          hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath"
+  aix_libpath=$lt_cv_aix_libpath__CXX
+fi
+
+          hardcode_libdir_flag_spec_CXX='$wl-blibpath:$libdir:'"$aix_libpath"
 
-          archive_expsym_cmds_CXX='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
+          archive_expsym_cmds_CXX='$CC -o $output_objdir/$soname $libobjs $deplibs $wl'$no_entry_flag' $compiler_flags `if test -n "$allow_undefined_flag"; then func_echo_all "$wl$allow_undefined_flag"; else :; fi` $wl'$exp_sym_flag:\$export_symbols' '$shared_flag
         else
-          if test "$host_cpu" = ia64; then
-	    hardcode_libdir_flag_spec_CXX='${wl}-R $libdir:/usr/lib:/lib'
+          if test ia64 = "$host_cpu"; then
+	    hardcode_libdir_flag_spec_CXX='$wl-R $libdir:/usr/lib:/lib'
 	    allow_undefined_flag_CXX="-z nodefs"
-	    archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
+	    archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\$wl$no_entry_flag"' $compiler_flags $wl$allow_undefined_flag '"\$wl$exp_sym_flag:\$export_symbols"
           else
 	    # Determine the default libpath from the value encoded in an
 	    # empty executable.
-	    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+	    if test set = "${lt_cv_aix_libpath+set}"; then
+  aix_libpath=$lt_cv_aix_libpath
+else
+  if ${lt_cv_aix_libpath__CXX+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
 int
@@ -15543,34 +16794,58 @@ main ()
 _ACEOF
 if ac_fn_cxx_try_link "$LINENO"; then :
 
-lt_aix_libpath_sed='
-    /Import File Strings/,/^$/ {
-	/^0/ {
-	    s/^0  *\(.*\)$/\1/
-	    p
-	}
-    }'
-aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
-# Check for a 64-bit object if we didn't find anything.
-if test -z "$aix_libpath"; then
-  aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
-fi
+  lt_aix_libpath_sed='
+      /Import File Strings/,/^$/ {
+	  /^0/ {
+	      s/^0  *\([^ ]*\) *$/\1/
+	      p
+	  }
+      }'
+  lt_cv_aix_libpath__CXX=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+  # Check for a 64-bit object if we didn't find anything.
+  if test -z "$lt_cv_aix_libpath__CXX"; then
+    lt_cv_aix_libpath__CXX=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+  fi
 fi
 rm -f core conftest.err conftest.$ac_objext \
     conftest$ac_exeext conftest.$ac_ext
-if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+  if test -z "$lt_cv_aix_libpath__CXX"; then
+    lt_cv_aix_libpath__CXX=/usr/lib:/lib
+  fi
 
-	    hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath"
+fi
+
+  aix_libpath=$lt_cv_aix_libpath__CXX
+fi
+
+	    hardcode_libdir_flag_spec_CXX='$wl-blibpath:$libdir:'"$aix_libpath"
 	    # Warning - without using the other run time loading flags,
 	    # -berok will link without error, but may produce a broken library.
-	    no_undefined_flag_CXX=' ${wl}-bernotok'
-	    allow_undefined_flag_CXX=' ${wl}-berok'
-	    # Exported symbols can be pulled into shared objects from archives
-	    whole_archive_flag_spec_CXX='$convenience'
+	    no_undefined_flag_CXX=' $wl-bernotok'
+	    allow_undefined_flag_CXX=' $wl-berok'
+	    if test yes = "$with_gnu_ld"; then
+	      # We only use this code for GNU lds that support --whole-archive.
+	      whole_archive_flag_spec_CXX='$wl--whole-archive$convenience $wl--no-whole-archive'
+	    else
+	      # Exported symbols can be pulled into shared objects from archives
+	      whole_archive_flag_spec_CXX='$convenience'
+	    fi
 	    archive_cmds_need_lc_CXX=yes
-	    # This is similar to how AIX traditionally builds its shared
-	    # libraries.
-	    archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
+	    archive_expsym_cmds_CXX='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d'
+	    # -brtl affects multiple linker settings, -berok does not and is overridden later
+	    compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([, ]\\)%-berok\\1%g"`'
+	    if test svr4 != "$with_aix_soname"; then
+	      # This is similar to how AIX traditionally builds its shared
+	      # libraries. Need -bnortl late, we may have -brtl in LDFLAGS.
+	      archive_expsym_cmds_CXX="$archive_expsym_cmds_CXX"'~$CC '$shared_flag_aix' -o $output_objdir/$realname.d/$soname $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$realname.d/$soname'
+	    fi
+	    if test aix != "$with_aix_soname"; then
+	      archive_expsym_cmds_CXX="$archive_expsym_cmds_CXX"'~$CC '$shared_flag_svr4' -o $output_objdir/$realname.d/$shared_archive_member_spec.o $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$STRIP -e $output_objdir/$realname.d/$shared_archive_member_spec.o~( func_echo_all "#! $soname($shared_archive_member_spec.o)"; if test shr_64 = "$shared_archive_member_spec"; then func_echo_all "# 64"; else func_echo_all "# 32"; fi; cat $export_sy [...]
+	    else
+	      # used by -dlpreopen to get the symbols
+	      archive_expsym_cmds_CXX="$archive_expsym_cmds_CXX"'~$MV  $output_objdir/$realname.d/$soname $output_objdir'
+	    fi
+	    archive_expsym_cmds_CXX="$archive_expsym_cmds_CXX"'~$RM -r $output_objdir/$realname.d'
           fi
         fi
         ;;
@@ -15580,7 +16855,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
 	  allow_undefined_flag_CXX=unsupported
 	  # Joseph Beckenbach <jrb3 at best.com> says some releases of gcc
 	  # support --undefined.  This deserves some investigation.  FIXME
-	  archive_cmds_CXX='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+	  archive_cmds_CXX='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
 	else
 	  ld_shlibs_CXX=no
 	fi
@@ -15596,28 +16871,76 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
         ;;
 
       cygwin* | mingw* | pw32* | cegcc*)
-        # _LT_TAGVAR(hardcode_libdir_flag_spec, CXX) is actually meaningless,
-        # as there is no search path for DLLs.
-        hardcode_libdir_flag_spec_CXX='-L$libdir'
-        allow_undefined_flag_CXX=unsupported
-        always_export_symbols_CXX=no
-        enable_shared_with_static_runtimes_CXX=yes
-
-        if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
-          archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
-          # If the export-symbols file already is a .def file (1st line
-          # is EXPORTS), use it as is; otherwise, prepend...
-          archive_expsym_cmds_CXX='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
-	    cp $export_symbols $output_objdir/$soname.def;
-          else
-	    echo EXPORTS > $output_objdir/$soname.def;
-	    cat $export_symbols >> $output_objdir/$soname.def;
-          fi~
-          $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
-        else
-          ld_shlibs_CXX=no
-        fi
-        ;;
+	case $GXX,$cc_basename in
+	,cl* | no,cl*)
+	  # Native MSVC
+	  # hardcode_libdir_flag_spec is actually meaningless, as there is
+	  # no search path for DLLs.
+	  hardcode_libdir_flag_spec_CXX=' '
+	  allow_undefined_flag_CXX=unsupported
+	  always_export_symbols_CXX=yes
+	  file_list_spec_CXX='@'
+	  # Tell ltmain to make .lib files, not .a files.
+	  libext=lib
+	  # Tell ltmain to make .dll files, not .so files.
+	  shrext_cmds=.dll
+	  # FIXME: Setting linknames here is a bad hack.
+	  archive_cmds_CXX='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames='
+	  archive_expsym_cmds_CXX='if   test DEF = "`$SED -n     -e '\''s/^[	 ]*//'\''     -e '\''/^\(;.*\)*$/d'\''     -e '\''s/^\(EXPORTS\|LIBRARY\)\([	 ].*\)*$/DEF/p'\''     -e q     $export_symbols`" ; then
+              cp "$export_symbols" "$output_objdir/$soname.def";
+              echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp";
+            else
+              $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp;
+            fi~
+            $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
+            linknames='
+	  # The linker will not automatically build a static lib if we build a DLL.
+	  # _LT_TAGVAR(old_archive_from_new_cmds, CXX)='true'
+	  enable_shared_with_static_runtimes_CXX=yes
+	  # Don't use ranlib
+	  old_postinstall_cmds_CXX='chmod 644 $oldlib'
+	  postlink_cmds_CXX='lt_outputfile="@OUTPUT@"~
+            lt_tool_outputfile="@TOOL_OUTPUT@"~
+            case $lt_outputfile in
+              *.exe|*.EXE) ;;
+              *)
+                lt_outputfile=$lt_outputfile.exe
+                lt_tool_outputfile=$lt_tool_outputfile.exe
+                ;;
+            esac~
+            func_to_tool_file "$lt_outputfile"~
+            if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then
+              $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
+              $RM "$lt_outputfile.manifest";
+            fi'
+	  ;;
+	*)
+	  # g++
+	  # _LT_TAGVAR(hardcode_libdir_flag_spec, CXX) is actually meaningless,
+	  # as there is no search path for DLLs.
+	  hardcode_libdir_flag_spec_CXX='-L$libdir'
+	  export_dynamic_flag_spec_CXX='$wl--export-all-symbols'
+	  allow_undefined_flag_CXX=unsupported
+	  always_export_symbols_CXX=no
+	  enable_shared_with_static_runtimes_CXX=yes
+
+	  if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
+	    archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
+	    # If the export-symbols file already is a .def file, use it as
+	    # is; otherwise, prepend EXPORTS...
+	    archive_expsym_cmds_CXX='if   test DEF = "`$SED -n     -e '\''s/^[	 ]*//'\''     -e '\''/^\(;.*\)*$/d'\''     -e '\''s/^\(EXPORTS\|LIBRARY\)\([	 ].*\)*$/DEF/p'\''     -e q     $export_symbols`" ; then
+              cp $export_symbols $output_objdir/$soname.def;
+            else
+              echo EXPORTS > $output_objdir/$soname.def;
+              cat $export_symbols >> $output_objdir/$soname.def;
+            fi~
+            $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
+	  else
+	    ld_shlibs_CXX=no
+	  fi
+	  ;;
+	esac
+	;;
       darwin* | rhapsody*)
 
 
@@ -15625,22 +16948,27 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
   hardcode_direct_CXX=no
   hardcode_automatic_CXX=yes
   hardcode_shlibpath_var_CXX=unsupported
-  whole_archive_flag_spec_CXX=''
+  if test yes = "$lt_cv_ld_force_load"; then
+    whole_archive_flag_spec_CXX='`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience $wl-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`'
+
+  else
+    whole_archive_flag_spec_CXX=''
+  fi
   link_all_deplibs_CXX=yes
-  allow_undefined_flag_CXX="$_lt_dar_allow_undefined"
+  allow_undefined_flag_CXX=$_lt_dar_allow_undefined
   case $cc_basename in
-     ifort*) _lt_dar_can_shared=yes ;;
+     ifort*|nagfor*) _lt_dar_can_shared=yes ;;
      *) _lt_dar_can_shared=$GCC ;;
   esac
-  if test "$_lt_dar_can_shared" = "yes"; then
-    output_verbose_link_cmd=echo
-    archive_cmds_CXX="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}"
-    module_cmds_CXX="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
-    archive_expsym_cmds_CXX="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}"
-    module_expsym_cmds_CXX="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}"
-       if test "$lt_cv_apple_cc_single_mod" != "yes"; then
-      archive_cmds_CXX="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}"
-      archive_expsym_cmds_CXX="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}"
+  if test yes = "$_lt_dar_can_shared"; then
+    output_verbose_link_cmd=func_echo_all
+    archive_cmds_CXX="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dsymutil"
+    module_cmds_CXX="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil"
+    archive_expsym_cmds_CXX="sed 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dar_export_syms$_lt_dsymutil"
+    module_expsym_cmds_CXX="sed -e 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dar_export_syms$_lt_dsymutil"
+       if test yes != "$lt_cv_apple_cc_single_mod"; then
+      archive_cmds_CXX="\$CC -r -keep_private_externs -nostdlib -o \$lib-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$lib-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring$_lt_dsymutil"
+      archive_expsym_cmds_CXX="sed 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \$lib-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$lib-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring$_lt_dar_export_syms$_lt_dsymutil"
     fi
 
   else
@@ -15649,6 +16977,34 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
 
 	;;
 
+      os2*)
+	hardcode_libdir_flag_spec_CXX='-L$libdir'
+	hardcode_minus_L_CXX=yes
+	allow_undefined_flag_CXX=unsupported
+	shrext_cmds=.dll
+	archive_cmds_CXX='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
+	  $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
+	  $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
+	  $ECHO EXPORTS >> $output_objdir/$libname.def~
+	  emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
+	  $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
+	  emximp -o $lib $output_objdir/$libname.def'
+	archive_expsym_cmds_CXX='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
+	  $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
+	  $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
+	  $ECHO EXPORTS >> $output_objdir/$libname.def~
+	  prefix_cmds="$SED"~
+	  if test EXPORTS = "`$SED 1q $export_symbols`"; then
+	    prefix_cmds="$prefix_cmds -e 1d";
+	  fi~
+	  prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
+	  cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
+	  $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
+	  emximp -o $lib $output_objdir/$libname.def'
+	old_archive_From_new_cmds_CXX='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
+	enable_shared_with_static_runtimes_CXX=yes
+	;;
+
       dgux*)
         case $cc_basename in
           ec++*)
@@ -15667,7 +17023,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
         esac
         ;;
 
-      freebsd[12]*)
+      freebsd2.*)
         # C++ shared libraries reported to be fairly broken before
 	# switch to ELF
         ld_shlibs_CXX=no
@@ -15683,13 +17039,15 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
         ld_shlibs_CXX=yes
         ;;
 
-      gnu*)
+      haiku*)
+        archive_cmds_CXX='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
+        link_all_deplibs_CXX=yes
         ;;
 
       hpux9*)
-        hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir'
+        hardcode_libdir_flag_spec_CXX='$wl+b $wl$libdir'
         hardcode_libdir_separator_CXX=:
-        export_dynamic_flag_spec_CXX='${wl}-E'
+        export_dynamic_flag_spec_CXX='$wl-E'
         hardcode_direct_CXX=yes
         hardcode_minus_L_CXX=yes # Not in the search PATH,
 				             # but as the default
@@ -15701,7 +17059,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
             ld_shlibs_CXX=no
             ;;
           aCC*)
-            archive_cmds_CXX='$RM $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+            archive_cmds_CXX='$RM $output_objdir/$soname~$CC -b $wl+b $wl$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib'
             # Commands to make compiler produce verbose output that lists
             # what "hidden" libraries, object files and flags are used when
             # linking a shared library.
@@ -15710,11 +17068,11 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
             # explicitly linking system object files so we need to strip them
             # from the output so that they don't get included in the library
             # dependencies.
-            output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed'
+            output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
             ;;
           *)
-            if test "$GXX" = yes; then
-              archive_cmds_CXX='$RM $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+            if test yes = "$GXX"; then
+              archive_cmds_CXX='$RM $output_objdir/$soname~$CC -shared -nostdlib $pic_flag $wl+b $wl$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib'
             else
               # FIXME: insert proper C++ library support
               ld_shlibs_CXX=no
@@ -15724,15 +17082,15 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
         ;;
 
       hpux10*|hpux11*)
-        if test $with_gnu_ld = no; then
-	  hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir'
+        if test no = "$with_gnu_ld"; then
+	  hardcode_libdir_flag_spec_CXX='$wl+b $wl$libdir'
 	  hardcode_libdir_separator_CXX=:
 
           case $host_cpu in
             hppa*64*|ia64*)
               ;;
             *)
-	      export_dynamic_flag_spec_CXX='${wl}-E'
+	      export_dynamic_flag_spec_CXX='$wl-E'
               ;;
           esac
         fi
@@ -15758,13 +17116,13 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
           aCC*)
 	    case $host_cpu in
 	      hppa*64*)
-	        archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+	        archive_cmds_CXX='$CC -b $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
 	        ;;
 	      ia64*)
-	        archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+	        archive_cmds_CXX='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
 	        ;;
 	      *)
-	        archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+	        archive_cmds_CXX='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
 	        ;;
 	    esac
 	    # Commands to make compiler produce verbose output that lists
@@ -15775,20 +17133,20 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
 	    # explicitly linking system object files so we need to strip them
 	    # from the output so that they don't get included in the library
 	    # dependencies.
-	    output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed'
+	    output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
 	    ;;
           *)
-	    if test "$GXX" = yes; then
-	      if test $with_gnu_ld = no; then
+	    if test yes = "$GXX"; then
+	      if test no = "$with_gnu_ld"; then
 	        case $host_cpu in
 	          hppa*64*)
-	            archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+	            archive_cmds_CXX='$CC -shared -nostdlib -fPIC $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
 	            ;;
 	          ia64*)
-	            archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+	            archive_cmds_CXX='$CC -shared -nostdlib $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
 	            ;;
 	          *)
-	            archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+	            archive_cmds_CXX='$CC -shared -nostdlib $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
 	            ;;
 	        esac
 	      fi
@@ -15803,22 +17161,22 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
       interix[3-9]*)
 	hardcode_direct_CXX=no
 	hardcode_shlibpath_var_CXX=no
-	hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir'
-	export_dynamic_flag_spec_CXX='${wl}-E'
+	hardcode_libdir_flag_spec_CXX='$wl-rpath,$libdir'
+	export_dynamic_flag_spec_CXX='$wl-E'
 	# Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
 	# Instead, shared libraries are loaded at an image base (0x10000000 by
 	# default) and relocated if they conflict, which is a slow very memory
 	# consuming and fragmenting process.  To avoid this, we pick a random,
 	# 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
 	# time.  Moving up from 0x10000000 also allows more sbrk(2) space.
-	archive_cmds_CXX='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
-	archive_expsym_cmds_CXX='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+	archive_cmds_CXX='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+	archive_expsym_cmds_CXX='sed "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
 	;;
       irix5* | irix6*)
         case $cc_basename in
           CC*)
 	    # SGI C++
-	    archive_cmds_CXX='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
+	    archive_cmds_CXX='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib'
 
 	    # Archives containing C++ object files must be created using
 	    # "CC -ar", where "CC" is the IRIX C++ compiler.  This is
@@ -15827,22 +17185,22 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
 	    old_archive_cmds_CXX='$CC -ar -WR,-u -o $oldlib $oldobjs'
 	    ;;
           *)
-	    if test "$GXX" = yes; then
-	      if test "$with_gnu_ld" = no; then
-	        archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+	    if test yes = "$GXX"; then
+	      if test no = "$with_gnu_ld"; then
+	        archive_cmds_CXX='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib'
 	      else
-	        archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` -o $lib'
+	        archive_cmds_CXX='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` -o $lib'
 	      fi
 	    fi
 	    link_all_deplibs_CXX=yes
 	    ;;
         esac
-        hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir'
+        hardcode_libdir_flag_spec_CXX='$wl-rpath $wl$libdir'
         hardcode_libdir_separator_CXX=:
         inherit_rpath_CXX=yes
         ;;
 
-      linux* | k*bsd*-gnu)
+      linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
         case $cc_basename in
           KCC*)
 	    # Kuck and Associates, Inc. (KAI) C++ Compiler
@@ -15850,8 +17208,8 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
 	    # KCC will only create a shared library if the output file
 	    # ends with ".so" (or ".sl" for HP-UX), so rename the library
 	    # to its proper name (with version) after linking.
-	    archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
-	    archive_expsym_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib'
+	    archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\$tempext\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
+	    archive_expsym_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\$tempext\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib $wl-retain-symbols-file,$export_symbols; mv \$templib $lib'
 	    # Commands to make compiler produce verbose output that lists
 	    # what "hidden" libraries, object files and flags are used when
 	    # linking a shared library.
@@ -15860,10 +17218,10 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
 	    # explicitly linking system object files so we need to strip them
 	    # from the output so that they don't get included in the library
 	    # dependencies.
-	    output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed'
+	    output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
 
-	    hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir'
-	    export_dynamic_flag_spec_CXX='${wl}--export-dynamic'
+	    hardcode_libdir_flag_spec_CXX='$wl-rpath,$libdir'
+	    export_dynamic_flag_spec_CXX='$wl--export-dynamic'
 
 	    # Archives containing C++ object files must be created using
 	    # "CC -Bstatic", where "CC" is the KAI C++ compiler.
@@ -15877,59 +17235,59 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
 	    # earlier do not add the objects themselves.
 	    case `$CC -V 2>&1` in
 	      *"Version 7."*)
-	        archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
-		archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+	        archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
+		archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
 		;;
 	      *)  # Version 8.0 or newer
 	        tmp_idyn=
 	        case $host_cpu in
 		  ia64*) tmp_idyn=' -i_dynamic';;
 		esac
-	        archive_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
-		archive_expsym_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+	        archive_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
+		archive_expsym_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
 		;;
 	    esac
 	    archive_cmds_need_lc_CXX=no
-	    hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir'
-	    export_dynamic_flag_spec_CXX='${wl}--export-dynamic'
-	    whole_archive_flag_spec_CXX='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
+	    hardcode_libdir_flag_spec_CXX='$wl-rpath,$libdir'
+	    export_dynamic_flag_spec_CXX='$wl--export-dynamic'
+	    whole_archive_flag_spec_CXX='$wl--whole-archive$convenience $wl--no-whole-archive'
 	    ;;
           pgCC* | pgcpp*)
             # Portland Group C++ compiler
 	    case `$CC -V` in
-	    *pgCC\ [1-5]* | *pgcpp\ [1-5]*)
+	    *pgCC\ [1-5].* | *pgcpp\ [1-5].*)
 	      prelink_cmds_CXX='tpldir=Template.dir~
-		rm -rf $tpldir~
-		$CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~
-		compile_command="$compile_command `find $tpldir -name \*.o | $NL2SP`"'
+               rm -rf $tpldir~
+               $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~
+               compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"'
 	      old_archive_cmds_CXX='tpldir=Template.dir~
-		rm -rf $tpldir~
-		$CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~
-		$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | $NL2SP`~
-		$RANLIB $oldlib'
+                rm -rf $tpldir~
+                $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~
+                $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~
+                $RANLIB $oldlib'
 	      archive_cmds_CXX='tpldir=Template.dir~
-		rm -rf $tpldir~
-		$CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
-		$CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
+                rm -rf $tpldir~
+                $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
+                $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
 	      archive_expsym_cmds_CXX='tpldir=Template.dir~
-		rm -rf $tpldir~
-		$CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
-		$CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
+                rm -rf $tpldir~
+                $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
+                $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
 	      ;;
-	    *) # Version 6 will use weak symbols
-	      archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
-	      archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
+	    *) # Version 6 and above use weak symbols
+	      archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
+	      archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
 	      ;;
 	    esac
 
-	    hardcode_libdir_flag_spec_CXX='${wl}--rpath ${wl}$libdir'
-	    export_dynamic_flag_spec_CXX='${wl}--export-dynamic'
-	    whole_archive_flag_spec_CXX='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
+	    hardcode_libdir_flag_spec_CXX='$wl--rpath $wl$libdir'
+	    export_dynamic_flag_spec_CXX='$wl--export-dynamic'
+	    whole_archive_flag_spec_CXX='$wl--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
             ;;
 	  cxx*)
 	    # Compaq C++
-	    archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
-	    archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname  -o $lib ${wl}-retain-symbols-file $wl$export_symbols'
+	    archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
+	    archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname  -o $lib $wl-retain-symbols-file $wl$export_symbols'
 
 	    runpath_var=LD_RUN_PATH
 	    hardcode_libdir_flag_spec_CXX='-rpath $libdir'
@@ -15943,18 +17301,18 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
 	    # explicitly linking system object files so we need to strip them
 	    # from the output so that they don't get included in the library
 	    # dependencies.
-	    output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`$ECHO "X$templist" | $Xsed -e "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed'
+	    output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "X$list" | $Xsed'
 	    ;;
-	  xl*)
+	  xl* | mpixl* | bgxl*)
 	    # IBM XL 8.0 on PPC, with GNU ld
-	    hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir'
-	    export_dynamic_flag_spec_CXX='${wl}--export-dynamic'
-	    archive_cmds_CXX='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
-	    if test "x$supports_anon_versioning" = xyes; then
+	    hardcode_libdir_flag_spec_CXX='$wl-rpath $wl$libdir'
+	    export_dynamic_flag_spec_CXX='$wl--export-dynamic'
+	    archive_cmds_CXX='$CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
+	    if test yes = "$supports_anon_versioning"; then
 	      archive_expsym_cmds_CXX='echo "{ global:" > $output_objdir/$libname.ver~
-		cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
-		echo "local: *; };" >> $output_objdir/$libname.ver~
-		$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
+                cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
+                echo "local: *; };" >> $output_objdir/$libname.ver~
+                $CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib'
 	    fi
 	    ;;
 	  *)
@@ -15962,16 +17320,16 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
 	    *Sun\ C*)
 	      # Sun C++ 5.9
 	      no_undefined_flag_CXX=' -zdefs'
-	      archive_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
-	      archive_expsym_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols'
+	      archive_cmds_CXX='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+	      archive_expsym_cmds_CXX='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-retain-symbols-file $wl$export_symbols'
 	      hardcode_libdir_flag_spec_CXX='-R$libdir'
-	      whole_archive_flag_spec_CXX='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
+	      whole_archive_flag_spec_CXX='$wl--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
 	      compiler_needs_object_CXX=yes
 
 	      # Not sure whether something based on
 	      # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1
 	      # would be better.
-	      output_verbose_link_cmd='echo'
+	      output_verbose_link_cmd='func_echo_all'
 
 	      # Archives containing C++ object files must be created using
 	      # "CC -xar", where "CC" is the Sun C++ compiler.  This is
@@ -16023,24 +17381,19 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
         ld_shlibs_CXX=yes
 	;;
 
-      openbsd2*)
-        # C++ shared libraries are fairly broken
-	ld_shlibs_CXX=no
-	;;
-
-      openbsd*)
+      openbsd* | bitrig*)
 	if test -f /usr/libexec/ld.so; then
 	  hardcode_direct_CXX=yes
 	  hardcode_shlibpath_var_CXX=no
 	  hardcode_direct_absolute_CXX=yes
 	  archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
-	  hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir'
-	  if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
-	    archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib'
-	    export_dynamic_flag_spec_CXX='${wl}-E'
-	    whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
+	  hardcode_libdir_flag_spec_CXX='$wl-rpath,$libdir'
+	  if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`"; then
+	    archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-retain-symbols-file,$export_symbols -o $lib'
+	    export_dynamic_flag_spec_CXX='$wl-E'
+	    whole_archive_flag_spec_CXX=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive'
 	  fi
-	  output_verbose_link_cmd=echo
+	  output_verbose_link_cmd=func_echo_all
 	else
 	  ld_shlibs_CXX=no
 	fi
@@ -16054,9 +17407,9 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
 	    # KCC will only create a shared library if the output file
 	    # ends with ".so" (or ".sl" for HP-UX), so rename the library
 	    # to its proper name (with version) after linking.
-	    archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
+	    archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\$tempext\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
 
-	    hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir'
+	    hardcode_libdir_flag_spec_CXX='$wl-rpath,$libdir'
 	    hardcode_libdir_separator_CXX=:
 
 	    # Archives containing C++ object files must be created using
@@ -16074,17 +17427,17 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
           cxx*)
 	    case $host in
 	      osf3*)
-	        allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*'
-	        archive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && $ECHO "X${wl}-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
-	        hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir'
+	        allow_undefined_flag_CXX=' $wl-expect_unresolved $wl\*'
+	        archive_cmds_CXX='$CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $soname `test -n "$verstring" && func_echo_all "$wl-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib'
+	        hardcode_libdir_flag_spec_CXX='$wl-rpath $wl$libdir'
 		;;
 	      *)
 	        allow_undefined_flag_CXX=' -expect_unresolved \*'
-	        archive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
+	        archive_cmds_CXX='$CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib'
 	        archive_expsym_cmds_CXX='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
-	          echo "-hidden">> $lib.exp~
-	          $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname ${wl}-input ${wl}$lib.exp  `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~
-	          $RM $lib.exp'
+                  echo "-hidden">> $lib.exp~
+                  $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname $wl-input $wl$lib.exp  `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib~
+                  $RM $lib.exp'
 	        hardcode_libdir_flag_spec_CXX='-rpath $libdir'
 		;;
 	    esac
@@ -16099,27 +17452,27 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
 	    # explicitly linking system object files so we need to strip them
 	    # from the output so that they don't get included in the library
 	    # dependencies.
-	    output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`$ECHO "X$templist" | $Xsed -e "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed'
+	    output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
 	    ;;
 	  *)
-	    if test "$GXX" = yes && test "$with_gnu_ld" = no; then
-	      allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*'
+	    if test yes,no = "$GXX,$with_gnu_ld"; then
+	      allow_undefined_flag_CXX=' $wl-expect_unresolved $wl\*'
 	      case $host in
 	        osf3*)
-	          archive_cmds_CXX='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+	          archive_cmds_CXX='$CC -shared -nostdlib $allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib'
 		  ;;
 	        *)
-	          archive_cmds_CXX='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+	          archive_cmds_CXX='$CC -shared $pic_flag -nostdlib $allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-msym $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib'
 		  ;;
 	      esac
 
-	      hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir'
+	      hardcode_libdir_flag_spec_CXX='$wl-rpath $wl$libdir'
 	      hardcode_libdir_separator_CXX=:
 
 	      # Commands to make compiler produce verbose output that lists
 	      # what "hidden" libraries, object files and flags are used when
 	      # linking a shared library.
-	      output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
+	      output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
 
 	    else
 	      # FIXME: insert proper C++ library support
@@ -16155,13 +17508,13 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
 
       solaris*)
         case $cc_basename in
-          CC*)
+          CC* | sunCC*)
 	    # Sun C++ 4.2, 5.x and Centerline C++
             archive_cmds_need_lc_CXX=yes
 	    no_undefined_flag_CXX=' -zdefs'
-	    archive_cmds_CXX='$CC -G${allow_undefined_flag}  -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+	    archive_cmds_CXX='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
 	    archive_expsym_cmds_CXX='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
-	      $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
+              $CC -G$allow_undefined_flag $wl-M $wl$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
 
 	    hardcode_libdir_flag_spec_CXX='-R$libdir'
 	    hardcode_shlibpath_var_CXX=no
@@ -16169,14 +17522,14 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
 	      solaris2.[0-5] | solaris2.[0-5].*) ;;
 	      *)
 		# The compiler driver will combine and reorder linker options,
-		# but understands `-z linker_flag'.
+		# but understands '-z linker_flag'.
 	        # Supported since Solaris 2.6 (maybe 2.5.1?)
 		whole_archive_flag_spec_CXX='-z allextract$convenience -z defaultextract'
 	        ;;
 	    esac
 	    link_all_deplibs_CXX=yes
 
-	    output_verbose_link_cmd='echo'
+	    output_verbose_link_cmd='func_echo_all'
 
 	    # Archives containing C++ object files must be created using
 	    # "CC -xar", where "CC" is the Sun C++ compiler.  This is
@@ -16186,42 +17539,42 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
 	    ;;
           gcx*)
 	    # Green Hills C++ Compiler
-	    archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
+	    archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib'
 
 	    # The C++ compiler must be used to create the archive.
 	    old_archive_cmds_CXX='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
 	    ;;
           *)
 	    # GNU C++ compiler with Solaris linker
-	    if test "$GXX" = yes && test "$with_gnu_ld" = no; then
-	      no_undefined_flag_CXX=' ${wl}-z ${wl}defs'
+	    if test yes,no = "$GXX,$with_gnu_ld"; then
+	      no_undefined_flag_CXX=' $wl-z ${wl}defs'
 	      if $CC --version | $GREP -v '^2\.7' > /dev/null; then
-	        archive_cmds_CXX='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
+	        archive_cmds_CXX='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib'
 	        archive_expsym_cmds_CXX='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
-		  $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
+                  $CC -shared $pic_flag -nostdlib $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
 
 	        # Commands to make compiler produce verbose output that lists
 	        # what "hidden" libraries, object files and flags are used when
 	        # linking a shared library.
-	        output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
+	        output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
 	      else
-	        # g++ 2.7 appears to require `-G' NOT `-shared' on this
+	        # g++ 2.7 appears to require '-G' NOT '-shared' on this
 	        # platform.
-	        archive_cmds_CXX='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
+	        archive_cmds_CXX='$CC -G -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib'
 	        archive_expsym_cmds_CXX='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
-		  $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
+                  $CC -G -nostdlib $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
 
 	        # Commands to make compiler produce verbose output that lists
 	        # what "hidden" libraries, object files and flags are used when
 	        # linking a shared library.
-	        output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
+	        output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
 	      fi
 
-	      hardcode_libdir_flag_spec_CXX='${wl}-R $wl$libdir'
+	      hardcode_libdir_flag_spec_CXX='$wl-R $wl$libdir'
 	      case $host_os in
 		solaris2.[0-5] | solaris2.[0-5].*) ;;
 		*)
-		  whole_archive_flag_spec_CXX='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
+		  whole_archive_flag_spec_CXX='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract'
 		  ;;
 	      esac
 	    fi
@@ -16230,48 +17583,52 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
         ;;
 
     sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*)
-      no_undefined_flag_CXX='${wl}-z,text'
+      no_undefined_flag_CXX='$wl-z,text'
       archive_cmds_need_lc_CXX=no
       hardcode_shlibpath_var_CXX=no
       runpath_var='LD_RUN_PATH'
 
       case $cc_basename in
         CC*)
-	  archive_cmds_CXX='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
-	  archive_expsym_cmds_CXX='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	  archive_cmds_CXX='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	  archive_expsym_cmds_CXX='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
 	  ;;
 	*)
-	  archive_cmds_CXX='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
-	  archive_expsym_cmds_CXX='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	  archive_cmds_CXX='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	  archive_expsym_cmds_CXX='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
 	  ;;
       esac
       ;;
 
       sysv5* | sco3.2v5* | sco5v6*)
-	# Note: We can NOT use -z defs as we might desire, because we do not
+	# Note: We CANNOT use -z defs as we might desire, because we do not
 	# link with -lc, and that would cause any symbols used from libc to
 	# always be unresolved, which means just about no library would
 	# ever link correctly.  If we're not using GNU ld we use -z text
 	# though, which does catch some bad symbols but isn't as heavy-handed
 	# as -z defs.
-	no_undefined_flag_CXX='${wl}-z,text'
-	allow_undefined_flag_CXX='${wl}-z,nodefs'
+	no_undefined_flag_CXX='$wl-z,text'
+	allow_undefined_flag_CXX='$wl-z,nodefs'
 	archive_cmds_need_lc_CXX=no
 	hardcode_shlibpath_var_CXX=no
-	hardcode_libdir_flag_spec_CXX='${wl}-R,$libdir'
+	hardcode_libdir_flag_spec_CXX='$wl-R,$libdir'
 	hardcode_libdir_separator_CXX=':'
 	link_all_deplibs_CXX=yes
-	export_dynamic_flag_spec_CXX='${wl}-Bexport'
+	export_dynamic_flag_spec_CXX='$wl-Bexport'
 	runpath_var='LD_RUN_PATH'
 
 	case $cc_basename in
           CC*)
-	    archive_cmds_CXX='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
-	    archive_expsym_cmds_CXX='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	    archive_cmds_CXX='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	    archive_expsym_cmds_CXX='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	    old_archive_cmds_CXX='$CC -Tprelink_objects $oldobjs~
+              '"$old_archive_cmds_CXX"
+	    reload_cmds_CXX='$CC -Tprelink_objects $reload_objs~
+              '"$reload_cmds_CXX"
 	    ;;
 	  *)
-	    archive_cmds_CXX='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
-	    archive_expsym_cmds_CXX='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	    archive_cmds_CXX='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	    archive_expsym_cmds_CXX='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
 	    ;;
 	esac
       ;;
@@ -16303,10 +17660,10 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
 
     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs_CXX" >&5
 $as_echo "$ld_shlibs_CXX" >&6; }
-    test "$ld_shlibs_CXX" = no && can_build_shared=no
+    test no = "$ld_shlibs_CXX" && can_build_shared=no
 
-    GCC_CXX="$GXX"
-    LD_CXX="$LD"
+    GCC_CXX=$GXX
+    LD_CXX=$LD
 
     ## CAVEAT EMPTOR:
     ## There is no encapsulation within the following macros, do not change
@@ -16329,6 +17686,14 @@ private:
 };
 _LT_EOF
 
+
+_lt_libdeps_save_CFLAGS=$CFLAGS
+case "$CC $CFLAGS " in #(
+*\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;;
+*\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;;
+*\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;;
+esac
+
 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
@@ -16342,29 +17707,38 @@ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
   pre_test_object_deps_done=no
 
   for p in `eval "$output_verbose_link_cmd"`; do
-    case $p in
+    case $prev$p in
 
     -L* | -R* | -l*)
        # Some compilers place space between "-{L,R}" and the path.
        # Remove the space.
-       if test $p = "-L" ||
-          test $p = "-R"; then
+       if test x-L = "$p" ||
+          test x-R = "$p"; then
 	 prev=$p
 	 continue
-       else
-	 prev=
        fi
 
-       if test "$pre_test_object_deps_done" = no; then
-	 case $p in
-	 -L* | -R*)
+       # Expand the sysroot to ease extracting the directories later.
+       if test -z "$prev"; then
+         case $p in
+         -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;;
+         -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;;
+         -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;;
+         esac
+       fi
+       case $p in
+       =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;;
+       esac
+       if test no = "$pre_test_object_deps_done"; then
+	 case $prev in
+	 -L | -R)
 	   # Internal compiler library paths should come after those
 	   # provided the user.  The postdeps already come after the
 	   # user supplied libs so there is no need to process them.
 	   if test -z "$compiler_lib_search_path_CXX"; then
-	     compiler_lib_search_path_CXX="${prev}${p}"
+	     compiler_lib_search_path_CXX=$prev$p
 	   else
-	     compiler_lib_search_path_CXX="${compiler_lib_search_path_CXX} ${prev}${p}"
+	     compiler_lib_search_path_CXX="${compiler_lib_search_path_CXX} $prev$p"
 	   fi
 	   ;;
 	 # The "-l" case would never come before the object being
@@ -16372,13 +17746,15 @@ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
 	 esac
        else
 	 if test -z "$postdeps_CXX"; then
-	   postdeps_CXX="${prev}${p}"
+	   postdeps_CXX=$prev$p
 	 else
-	   postdeps_CXX="${postdeps_CXX} ${prev}${p}"
+	   postdeps_CXX="${postdeps_CXX} $prev$p"
 	 fi
        fi
+       prev=
        ;;
 
+    *.lto.$objext) ;; # Ignore GCC LTO objects
     *.$objext)
        # This assumes that the test object file only shows up
        # once in the compiler output.
@@ -16387,15 +17763,15 @@ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
 	 continue
        fi
 
-       if test "$pre_test_object_deps_done" = no; then
+       if test no = "$pre_test_object_deps_done"; then
 	 if test -z "$predep_objects_CXX"; then
-	   predep_objects_CXX="$p"
+	   predep_objects_CXX=$p
 	 else
 	   predep_objects_CXX="$predep_objects_CXX $p"
 	 fi
        else
 	 if test -z "$postdep_objects_CXX"; then
-	   postdep_objects_CXX="$p"
+	   postdep_objects_CXX=$p
 	 else
 	   postdep_objects_CXX="$postdep_objects_CXX $p"
 	 fi
@@ -16414,6 +17790,7 @@ else
 fi
 
 $RM -f confest.$objext
+CFLAGS=$_lt_libdeps_save_CFLAGS
 
 # PORTME: override above test on systems where it is broken
 case $host_os in
@@ -16424,51 +17801,6 @@ interix[3-9]*)
   postdep_objects_CXX=
   postdeps_CXX=
   ;;
-
-linux*)
-  case `$CC -V 2>&1 | sed 5q` in
-  *Sun\ C*)
-    # Sun C++ 5.9
-
-    # The more standards-conforming stlport4 library is
-    # incompatible with the Cstd library. Avoid specifying
-    # it if it's in CXXFLAGS. Ignore libCrun as
-    # -library=stlport4 depends on it.
-    case " $CXX $CXXFLAGS " in
-    *" -library=stlport4 "*)
-      solaris_use_stlport4=yes
-      ;;
-    esac
-
-    if test "$solaris_use_stlport4" != yes; then
-      postdeps_CXX='-library=Cstd -library=Crun'
-    fi
-    ;;
-  esac
-  ;;
-
-solaris*)
-  case $cc_basename in
-  CC*)
-    # The more standards-conforming stlport4 library is
-    # incompatible with the Cstd library. Avoid specifying
-    # it if it's in CXXFLAGS. Ignore libCrun as
-    # -library=stlport4 depends on it.
-    case " $CXX $CXXFLAGS " in
-    *" -library=stlport4 "*)
-      solaris_use_stlport4=yes
-      ;;
-    esac
-
-    # Adding this requires a known-good setup of shared libraries for
-    # Sun compiler versions before 5.6, else PIC objects from an old
-    # archive will be linked into the output, leading to subtle bugs.
-    if test "$solaris_use_stlport4" != yes; then
-      postdeps_CXX='-library=Cstd -library=Crun'
-    fi
-    ;;
-  esac
-  ;;
 esac
 
 
@@ -16477,7 +17809,7 @@ case " $postdeps_CXX " in
 esac
  compiler_lib_search_dirs_CXX=
 if test -n "${compiler_lib_search_path_CXX}"; then
- compiler_lib_search_dirs_CXX=`echo " ${compiler_lib_search_path_CXX}" | ${SED} -e 's! -L! !g' -e 's!^ !!'`
+ compiler_lib_search_dirs_CXX=`echo " ${compiler_lib_search_path_CXX}" | $SED -e 's! -L! !g' -e 's!^ !!'`
 fi
 
 
@@ -16514,21 +17846,20 @@ fi
 lt_prog_compiler_pic_CXX=
 lt_prog_compiler_static_CXX=
 
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5
-$as_echo_n "checking for $compiler option to produce PIC... " >&6; }
 
   # C++ specific cases for pic, static, wl, etc.
-  if test "$GXX" = yes; then
+  if test yes = "$GXX"; then
     lt_prog_compiler_wl_CXX='-Wl,'
     lt_prog_compiler_static_CXX='-static'
 
     case $host_os in
     aix*)
       # All AIX code is PIC.
-      if test "$host_cpu" = ia64; then
+      if test ia64 = "$host_cpu"; then
 	# AIX 5 now supports IA64 processor
 	lt_prog_compiler_static_CXX='-Bstatic'
       fi
+      lt_prog_compiler_pic_CXX='-fPIC'
       ;;
 
     amigaos*)
@@ -16539,8 +17870,8 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; }
         ;;
       m68k)
             # FIXME: we need at least 68020 code to build shared libraries, but
-            # adding the `-m68020' flag to GCC prevents building anything better,
-            # like `-m68040'.
+            # adding the '-m68020' flag to GCC prevents building anything better,
+            # like '-m68040'.
             lt_prog_compiler_pic_CXX='-m68020 -resident32 -malways-restore-a4'
         ;;
       esac
@@ -16555,6 +17886,11 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; }
       # Although the cygwin gcc ignores -fPIC, still need this for old-style
       # (--disable-auto-import) libraries
       lt_prog_compiler_pic_CXX='-DDLL_EXPORT'
+      case $host_os in
+      os2*)
+	lt_prog_compiler_static_CXX='$wl-static'
+	;;
+      esac
       ;;
     darwin* | rhapsody*)
       # PIC is the default on this platform
@@ -16565,6 +17901,11 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; }
       # DJGPP does not support shared libraries at all
       lt_prog_compiler_pic_CXX=
       ;;
+    haiku*)
+      # PIC is the default for Haiku.
+      # The "-static" flag exists, but is broken.
+      lt_prog_compiler_static_CXX=
+      ;;
     interix[3-9]*)
       # Interix 3.x gcc -fpic/-fPIC options generate broken code.
       # Instead, we relocate shared libraries at runtime.
@@ -16599,7 +17940,7 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; }
     case $host_os in
       aix[4-9]*)
 	# All AIX code is PIC.
-	if test "$host_cpu" = ia64; then
+	if test ia64 = "$host_cpu"; then
 	  # AIX 5 now supports IA64 processor
 	  lt_prog_compiler_static_CXX='-Bstatic'
 	else
@@ -16614,6 +17955,11 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; }
 	  ;;
 	esac
 	;;
+      mingw* | cygwin* | os2* | pw32* | cegcc*)
+	# This hack is so that the source file can tell whether it is being
+	# built for inclusion in a dll (and should export symbols for example).
+	lt_prog_compiler_pic_CXX='-DDLL_EXPORT'
+	;;
       dgux*)
 	case $cc_basename in
 	  ec++*)
@@ -16634,14 +17980,14 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; }
 	case $cc_basename in
 	  CC*)
 	    lt_prog_compiler_wl_CXX='-Wl,'
-	    lt_prog_compiler_static_CXX='${wl}-a ${wl}archive'
-	    if test "$host_cpu" != ia64; then
+	    lt_prog_compiler_static_CXX='$wl-a ${wl}archive'
+	    if test ia64 != "$host_cpu"; then
 	      lt_prog_compiler_pic_CXX='+Z'
 	    fi
 	    ;;
 	  aCC*)
 	    lt_prog_compiler_wl_CXX='-Wl,'
-	    lt_prog_compiler_static_CXX='${wl}-a ${wl}archive'
+	    lt_prog_compiler_static_CXX='$wl-a ${wl}archive'
 	    case $host_cpu in
 	    hppa*64*|ia64*)
 	      # +Z the default
@@ -16670,7 +18016,7 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; }
 	    ;;
 	esac
 	;;
-      linux* | k*bsd*-gnu)
+      linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
 	case $cc_basename in
 	  KCC*)
 	    # KAI C++ Compiler
@@ -16678,7 +18024,7 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; }
 	    lt_prog_compiler_pic_CXX='-fPIC'
 	    ;;
 	  ecpc* )
-	    # old Intel C++ for x86_64 which still supported -KPIC.
+	    # old Intel C++ for x86_64, which still supported -KPIC.
 	    lt_prog_compiler_wl_CXX='-Wl,'
 	    lt_prog_compiler_pic_CXX='-KPIC'
 	    lt_prog_compiler_static_CXX='-static'
@@ -16703,8 +18049,8 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; }
 	    lt_prog_compiler_pic_CXX=
 	    lt_prog_compiler_static_CXX='-non_shared'
 	    ;;
-	  xlc* | xlC*)
-	    # IBM XL 8.0 on PPC
+	  xlc* | xlC* | bgxl[cC]* | mpixl[cC]*)
+	    # IBM XL 8.0, 9.0 on PPC and BlueGene
 	    lt_prog_compiler_wl_CXX='-Wl,'
 	    lt_prog_compiler_pic_CXX='-qpic'
 	    lt_prog_compiler_static_CXX='-qstaticlink'
@@ -16766,7 +18112,7 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; }
 	;;
       solaris*)
 	case $cc_basename in
-	  CC*)
+	  CC* | sunCC*)
 	    # Sun C++ 4.2, 5.x and Centerline C++
 	    lt_prog_compiler_pic_CXX='-KPIC'
 	    lt_prog_compiler_static_CXX='-Bstatic'
@@ -16823,7 +18169,7 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; }
   fi
 
 case $host_os in
-  # For platforms which do not support PIC, -DPIC is meaningless:
+  # For platforms that do not support PIC, -DPIC is meaningless:
   *djgpp*)
     lt_prog_compiler_pic_CXX=
     ;;
@@ -16831,10 +18177,17 @@ case $host_os in
     lt_prog_compiler_pic_CXX="$lt_prog_compiler_pic_CXX -DPIC"
     ;;
 esac
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_prog_compiler_pic_CXX" >&5
-$as_echo "$lt_prog_compiler_pic_CXX" >&6; }
-
 
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5
+$as_echo_n "checking for $compiler option to produce PIC... " >&6; }
+if ${lt_cv_prog_compiler_pic_CXX+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  lt_cv_prog_compiler_pic_CXX=$lt_prog_compiler_pic_CXX
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_CXX" >&5
+$as_echo "$lt_cv_prog_compiler_pic_CXX" >&6; }
+lt_prog_compiler_pic_CXX=$lt_cv_prog_compiler_pic_CXX
 
 #
 # Check to make sure the PIC flag actually works.
@@ -16848,7 +18201,7 @@ else
   lt_cv_prog_compiler_pic_works_CXX=no
    ac_outfile=conftest.$ac_objext
    echo "$lt_simple_compile_test_code" > conftest.$ac_ext
-   lt_compiler_flag="$lt_prog_compiler_pic_CXX -DPIC"
+   lt_compiler_flag="$lt_prog_compiler_pic_CXX -DPIC"  ## exclude from sc_useless_quotes_in_assignment
    # Insert the option either (1) after the last *FLAGS variable, or
    # (2) before a word containing "conftest.", or (3) at the end.
    # Note that $ac_compile itself does not contain backslashes and begins
@@ -16858,15 +18211,15 @@ else
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:16861: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>conftest.err)
    ac_status=$?
    cat conftest.err >&5
-   echo "$as_me:16865: \$? = $ac_status" >&5
+   echo "$as_me:$LINENO: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s "$ac_outfile"; then
      # The compiler can only warn and ignore the option if not recognized
      # So say no if there are warnings other than the usual output.
-     $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
+     $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
      $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
      if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
        lt_cv_prog_compiler_pic_works_CXX=yes
@@ -16878,7 +18231,7 @@ fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works_CXX" >&5
 $as_echo "$lt_cv_prog_compiler_pic_works_CXX" >&6; }
 
-if test x"$lt_cv_prog_compiler_pic_works_CXX" = xyes; then
+if test yes = "$lt_cv_prog_compiler_pic_works_CXX"; then
     case $lt_prog_compiler_pic_CXX in
      "" | " "*) ;;
      *) lt_prog_compiler_pic_CXX=" $lt_prog_compiler_pic_CXX" ;;
@@ -16892,6 +18245,8 @@ fi
 
 
 
+
+
 #
 # Check to make sure the static flag actually works.
 #
@@ -16902,7 +18257,7 @@ if ${lt_cv_prog_compiler_static_works_CXX+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   lt_cv_prog_compiler_static_works_CXX=no
-   save_LDFLAGS="$LDFLAGS"
+   save_LDFLAGS=$LDFLAGS
    LDFLAGS="$LDFLAGS $lt_tmp_static_flag"
    echo "$lt_simple_link_test_code" > conftest.$ac_ext
    if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
@@ -16911,7 +18266,7 @@ else
      if test -s conftest.err; then
        # Append any errors to the config.log.
        cat conftest.err 1>&5
-       $ECHO "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp
+       $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
        $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
        if diff conftest.exp conftest.er2 >/dev/null; then
          lt_cv_prog_compiler_static_works_CXX=yes
@@ -16921,13 +18276,13 @@ else
      fi
    fi
    $RM -r conftest*
-   LDFLAGS="$save_LDFLAGS"
+   LDFLAGS=$save_LDFLAGS
 
 fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works_CXX" >&5
 $as_echo "$lt_cv_prog_compiler_static_works_CXX" >&6; }
 
-if test x"$lt_cv_prog_compiler_static_works_CXX" = xyes; then
+if test yes = "$lt_cv_prog_compiler_static_works_CXX"; then
     :
 else
     lt_prog_compiler_static_CXX=
@@ -16957,16 +18312,16 @@ else
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:16960: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>out/conftest.err)
    ac_status=$?
    cat out/conftest.err >&5
-   echo "$as_me:16964: \$? = $ac_status" >&5
+   echo "$as_me:$LINENO: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s out/conftest2.$ac_objext
    then
      # The compiler can only warn and ignore the option if not recognized
      # So say no if there are warnings
-     $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
+     $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
      $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
      if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
        lt_cv_prog_compiler_c_o_CXX=yes
@@ -17009,16 +18364,16 @@ else
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:17012: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>out/conftest.err)
    ac_status=$?
    cat out/conftest.err >&5
-   echo "$as_me:17016: \$? = $ac_status" >&5
+   echo "$as_me:$LINENO: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s out/conftest2.$ac_objext
    then
      # The compiler can only warn and ignore the option if not recognized
      # So say no if there are warnings
-     $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
+     $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
      $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
      if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
        lt_cv_prog_compiler_c_o_CXX=yes
@@ -17041,8 +18396,8 @@ $as_echo "$lt_cv_prog_compiler_c_o_CXX" >&6; }
 
 
 
-hard_links="nottested"
-if test "$lt_cv_prog_compiler_c_o_CXX" = no && test "$need_locks" != no; then
+hard_links=nottested
+if test no = "$lt_cv_prog_compiler_c_o_CXX" && test no != "$need_locks"; then
   # do not overwrite the value of need_locks provided by the user
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5
 $as_echo_n "checking if we can lock with hard links... " >&6; }
@@ -17054,9 +18409,9 @@ $as_echo_n "checking if we can lock with hard links... " >&6; }
   ln conftest.a conftest.b 2>/dev/null && hard_links=no
   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5
 $as_echo "$hard_links" >&6; }
-  if test "$hard_links" = no; then
-    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5
-$as_echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;}
+  if test no = "$hard_links"; then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&5
+$as_echo "$as_me: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&2;}
     need_locks=warn
   fi
 else
@@ -17069,31 +18424,45 @@ fi
 $as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; }
 
   export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
+  exclude_expsyms_CXX='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'
   case $host_os in
   aix[4-9]*)
     # If we're using GNU nm, then we don't want the "-C" option.
-    # -C means demangle to AIX nm, but means don't demangle with GNU nm
+    # -C means demangle to GNU nm, but means don't demangle to AIX nm.
+    # Without the "-l" option, or with the "-B" option, AIX nm treats
+    # weak defined symbols like other global defined symbols, whereas
+    # GNU nm marks them as "W".
+    # While the 'weak' keyword is ignored in the Export File, we need
+    # it in the Import File for the 'aix-soname' feature, so we have
+    # to replace the "-B" option with "-P" for AIX nm.
     if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
-      export_symbols_cmds_CXX='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
+      export_symbols_cmds_CXX='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols'
     else
-      export_symbols_cmds_CXX='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
+      export_symbols_cmds_CXX='`func_echo_all $NM | $SED -e '\''s/B\([^B]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && (substr(\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols'
     fi
     ;;
   pw32*)
-    export_symbols_cmds_CXX="$ltdll_cmds"
-  ;;
+    export_symbols_cmds_CXX=$ltdll_cmds
+    ;;
   cygwin* | mingw* | cegcc*)
-    export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;/^.*[ ]__nm__/s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.* //'\'' | sort | uniq > $export_symbols'
-  ;;
+    case $cc_basename in
+    cl*)
+      exclude_expsyms_CXX='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
+      ;;
+    *)
+      export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.* //'\'' | sort | uniq > $export_symbols'
+      exclude_expsyms_CXX='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'
+      ;;
+    esac
+    ;;
   *)
     export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
-  ;;
+    ;;
   esac
-  exclude_expsyms_CXX='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'
 
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs_CXX" >&5
 $as_echo "$ld_shlibs_CXX" >&6; }
-test "$ld_shlibs_CXX" = no && can_build_shared=no
+test no = "$ld_shlibs_CXX" && can_build_shared=no
 
 with_gnu_ld_CXX=$with_gnu_ld
 
@@ -17110,7 +18479,7 @@ x|xyes)
   # Assume -lc should be added
   archive_cmds_need_lc_CXX=yes
 
-  if test "$enable_shared" = yes && test "$GCC" = yes; then
+  if test yes,yes = "$GCC,$enable_shared"; then
     case $archive_cmds_CXX in
     *'~'*)
       # FIXME: we may have to deal with multi-command sequences.
@@ -17121,44 +18490,50 @@ x|xyes)
       # to ld, don't add -lc before -lgcc.
       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5
 $as_echo_n "checking whether -lc should be explicitly linked in... " >&6; }
-      $RM conftest*
-      echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+if ${lt_cv_archive_cmds_need_lc_CXX+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  $RM conftest*
+	echo "$lt_simple_compile_test_code" > conftest.$ac_ext
 
-      if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
+	if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   test $ac_status = 0; } 2>conftest.err; then
-        soname=conftest
-        lib=conftest
-        libobjs=conftest.$ac_objext
-        deplibs=
-        wl=$lt_prog_compiler_wl_CXX
-	pic_flag=$lt_prog_compiler_pic_CXX
-        compiler_flags=-v
-        linker_flags=-v
-        verstring=
-        output_objdir=.
-        libname=conftest
-        lt_save_allow_undefined_flag=$allow_undefined_flag_CXX
-        allow_undefined_flag_CXX=
-        if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds_CXX 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5
+	  soname=conftest
+	  lib=conftest
+	  libobjs=conftest.$ac_objext
+	  deplibs=
+	  wl=$lt_prog_compiler_wl_CXX
+	  pic_flag=$lt_prog_compiler_pic_CXX
+	  compiler_flags=-v
+	  linker_flags=-v
+	  verstring=
+	  output_objdir=.
+	  libname=conftest
+	  lt_save_allow_undefined_flag=$allow_undefined_flag_CXX
+	  allow_undefined_flag_CXX=
+	  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds_CXX 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5
   (eval $archive_cmds_CXX 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5
   ac_status=$?
   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   test $ac_status = 0; }
-        then
-	  archive_cmds_need_lc_CXX=no
-        else
-	  archive_cmds_need_lc_CXX=yes
-        fi
-        allow_undefined_flag_CXX=$lt_save_allow_undefined_flag
-      else
-        cat conftest.err 1>&5
-      fi
-      $RM conftest*
-      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $archive_cmds_need_lc_CXX" >&5
-$as_echo "$archive_cmds_need_lc_CXX" >&6; }
+	  then
+	    lt_cv_archive_cmds_need_lc_CXX=no
+	  else
+	    lt_cv_archive_cmds_need_lc_CXX=yes
+	  fi
+	  allow_undefined_flag_CXX=$lt_save_allow_undefined_flag
+	else
+	  cat conftest.err 1>&5
+	fi
+	$RM conftest*
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc_CXX" >&5
+$as_echo "$lt_cv_archive_cmds_need_lc_CXX" >&6; }
+      archive_cmds_need_lc_CXX=$lt_cv_archive_cmds_need_lc_CXX
       ;;
     esac
   fi
@@ -17226,15 +18601,13 @@ esac
 
 
 
-
-
     { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5
 $as_echo_n "checking dynamic linker characteristics... " >&6; }
 
 library_names_spec=
 libname_spec='lib$name'
 soname_spec=
-shrext_cmds=".so"
+shrext_cmds=.so
 postinstall_cmds=
 postuninstall_cmds=
 finish_cmds=
@@ -17251,56 +18624,108 @@ hardcode_into_libs=no
 # flags to be left without arguments
 need_version=unknown
 
+
+
 case $host_os in
 aix3*)
-  version_type=linux
-  library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
+  version_type=linux # correct to gnu/linux during the next big refactor
+  library_names_spec='$libname$release$shared_ext$versuffix $libname.a'
   shlibpath_var=LIBPATH
 
   # AIX 3 has no versioning support, so we append a major version to the name.
-  soname_spec='${libname}${release}${shared_ext}$major'
+  soname_spec='$libname$release$shared_ext$major'
   ;;
 
 aix[4-9]*)
-  version_type=linux
+  version_type=linux # correct to gnu/linux during the next big refactor
   need_lib_prefix=no
   need_version=no
   hardcode_into_libs=yes
-  if test "$host_cpu" = ia64; then
+  if test ia64 = "$host_cpu"; then
     # AIX 5 supports IA64
-    library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
+    library_names_spec='$libname$release$shared_ext$major $libname$release$shared_ext$versuffix $libname$shared_ext'
     shlibpath_var=LD_LIBRARY_PATH
   else
     # With GCC up to 2.95.x, collect2 would create an import file
     # for dependence libraries.  The import file would start with
-    # the line `#! .'.  This would cause the generated library to
-    # depend on `.', always an invalid library.  This was fixed in
+    # the line '#! .'.  This would cause the generated library to
+    # depend on '.', always an invalid library.  This was fixed in
     # development snapshots of GCC prior to 3.0.
     case $host_os in
       aix4 | aix4.[01] | aix4.[01].*)
       if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
 	   echo ' yes '
-	   echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then
+	   echo '#endif'; } | $CC -E - | $GREP yes > /dev/null; then
 	:
       else
 	can_build_shared=no
       fi
       ;;
     esac
-    # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
+    # Using Import Files as archive members, it is possible to support
+    # filename-based versioning of shared library archives on AIX. While
+    # this would work for both with and without runtime linking, it will
+    # prevent static linking of such archives. So we do filename-based
+    # shared library versioning with .so extension only, which is used
+    # when both runtime linking and shared linking is enabled.
+    # Unfortunately, runtime linking may impact performance, so we do
+    # not want this to be the default eventually. Also, we use the
+    # versioned .so libs for executables only if there is the -brtl
+    # linker flag in LDFLAGS as well, or --with-aix-soname=svr4 only.
+    # To allow for filename-based versioning support, we need to create
+    # libNAME.so.V as an archive file, containing:
+    # *) an Import File, referring to the versioned filename of the
+    #    archive as well as the shared archive member, telling the
+    #    bitwidth (32 or 64) of that shared object, and providing the
+    #    list of exported symbols of that shared object, eventually
+    #    decorated with the 'weak' keyword
+    # *) the shared object with the F_LOADONLY flag set, to really avoid
+    #    it being seen by the linker.
+    # At run time we better use the real file rather than another symlink,
+    # but for link time we create the symlink libNAME.so -> libNAME.so.V
+
+    case $with_aix_soname,$aix_use_runtimelinking in
+    # AIX (on Power*) has no versioning support, so currently we cannot hardcode correct
     # soname into executable. Probably we can add versioning support to
     # collect2, so additional links can be useful in future.
-    if test "$aix_use_runtimelinking" = yes; then
+    aix,yes) # traditional libtool
+      dynamic_linker='AIX unversionable lib.so'
       # If using run time linking (on AIX 4.2 or later) use lib<name>.so
       # instead of lib<name>.a to let people know that these are not
       # typical AIX shared libraries.
-      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-    else
+      library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+      ;;
+    aix,no) # traditional AIX only
+      dynamic_linker='AIX lib.a(lib.so.V)'
       # We preserve .a as extension for shared libraries through AIX4.2
       # and later when we are not doing run time linking.
-      library_names_spec='${libname}${release}.a $libname.a'
-      soname_spec='${libname}${release}${shared_ext}$major'
-    fi
+      library_names_spec='$libname$release.a $libname.a'
+      soname_spec='$libname$release$shared_ext$major'
+      ;;
+    svr4,*) # full svr4 only
+      dynamic_linker="AIX lib.so.V($shared_archive_member_spec.o)"
+      library_names_spec='$libname$release$shared_ext$major $libname$shared_ext'
+      # We do not specify a path in Import Files, so LIBPATH fires.
+      shlibpath_overrides_runpath=yes
+      ;;
+    *,yes) # both, prefer svr4
+      dynamic_linker="AIX lib.so.V($shared_archive_member_spec.o), lib.a(lib.so.V)"
+      library_names_spec='$libname$release$shared_ext$major $libname$shared_ext'
+      # unpreferred sharedlib libNAME.a needs extra handling
+      postinstall_cmds='test -n "$linkname" || linkname="$realname"~func_stripname "" ".so" "$linkname"~$install_shared_prog "$dir/$func_stripname_result.$libext" "$destdir/$func_stripname_result.$libext"~test -z "$tstripme" || test -z "$striplib" || $striplib "$destdir/$func_stripname_result.$libext"'
+      postuninstall_cmds='for n in $library_names $old_library; do :; done~func_stripname "" ".so" "$n"~test "$func_stripname_result" = "$n" || func_append rmfiles " $odir/$func_stripname_result.$libext"'
+      # We do not specify a path in Import Files, so LIBPATH fires.
+      shlibpath_overrides_runpath=yes
+      ;;
+    *,no) # both, prefer aix
+      dynamic_linker="AIX lib.a(lib.so.V), lib.so.V($shared_archive_member_spec.o)"
+      library_names_spec='$libname$release.a $libname.a'
+      soname_spec='$libname$release$shared_ext$major'
+      # unpreferred sharedlib libNAME.so.V and symlink libNAME.so need extra handling
+      postinstall_cmds='test -z "$dlname" || $install_shared_prog $dir/$dlname $destdir/$dlname~test -z "$tstripme" || test -z "$striplib" || $striplib $destdir/$dlname~test -n "$linkname" || linkname=$realname~func_stripname "" ".a" "$linkname"~(cd "$destdir" && $LN_S -f $dlname $func_stripname_result.so)'
+      postuninstall_cmds='test -z "$dlname" || func_append rmfiles " $odir/$dlname"~for n in $old_library $library_names; do :; done~func_stripname "" ".a" "$n"~func_append rmfiles " $odir/$func_stripname_result.so"'
+      ;;
+    esac
     shlibpath_var=LIBPATH
   fi
   ;;
@@ -17310,27 +18735,27 @@ amigaos*)
   powerpc)
     # Since July 2007 AmigaOS4 officially supports .so libraries.
     # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
-    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
     ;;
   m68k)
     library_names_spec='$libname.ixlibrary $libname.a'
     # Create ${libname}_ixlibrary.a entries in /sys/libs.
-    finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$ECHO "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
+    finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
     ;;
   esac
   ;;
 
 beos*)
-  library_names_spec='${libname}${shared_ext}'
+  library_names_spec='$libname$shared_ext'
   dynamic_linker="$host_os ld.so"
   shlibpath_var=LIBRARY_PATH
   ;;
 
 bsdi[45]*)
-  version_type=linux
+  version_type=linux # correct to gnu/linux during the next big refactor
   need_version=no
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
+  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+  soname_spec='$libname$release$shared_ext$major'
   finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
   shlibpath_var=LD_LIBRARY_PATH
   sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
@@ -17342,16 +18767,17 @@ bsdi[45]*)
 
 cygwin* | mingw* | pw32* | cegcc*)
   version_type=windows
-  shrext_cmds=".dll"
+  shrext_cmds=.dll
   need_version=no
   need_lib_prefix=no
 
-  case $GCC,$host_os in
-  yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*)
+  case $GCC,$cc_basename in
+  yes,*)
+    # gcc
     library_names_spec='$libname.dll.a'
     # DLL is installed to $(libdir)/../bin by postinstall_cmds
-    postinstall_cmds='base_file=`basename \${file}`~
-      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
+    postinstall_cmds='base_file=`basename \$file`~
+      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~
       dldir=$destdir/`dirname \$dlpath`~
       test -d \$dldir || mkdir -p \$dldir~
       $install_prog $dir/$dlname \$dldir/$dlname~
@@ -17367,37 +18793,83 @@ cygwin* | mingw* | pw32* | cegcc*)
     case $host_os in
     cygwin*)
       # Cygwin DLLs use 'cyg' prefix rather than 'lib'
-      soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
-      sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
+      soname_spec='`echo $libname | sed -e 's/^lib/cyg/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
+
       ;;
     mingw* | cegcc*)
       # MinGW DLLs use traditional 'lib' prefix
-      soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
-      sys_lib_search_path_spec=`$CC -print-search-dirs | $GREP "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
+      soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
+      ;;
+    pw32*)
+      # pw32 DLLs use 'pw' prefix rather than 'lib'
+      library_names_spec='`echo $libname | sed -e 's/^lib/pw/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
+      ;;
+    esac
+    dynamic_linker='Win32 ld.exe'
+    ;;
+
+  *,cl*)
+    # Native MSVC
+    libname_spec='$name'
+    soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
+    library_names_spec='$libname.dll.lib'
+
+    case $build_os in
+    mingw*)
+      sys_lib_search_path_spec=
+      lt_save_ifs=$IFS
+      IFS=';'
+      for lt_path in $LIB
+      do
+        IFS=$lt_save_ifs
+        # Let DOS variable expansion print the short 8.3 style file name.
+        lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"`
+        sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path"
+      done
+      IFS=$lt_save_ifs
+      # Convert to MSYS style.
+      sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'`
+      ;;
+    cygwin*)
+      # Convert to unix form, then to dos form, then back to unix form
+      # but this time dos style (no spaces!) so that the unix form looks
+      # like /cygdrive/c/PROGRA~1:/cygdr...
+      sys_lib_search_path_spec=`cygpath --path --unix "$LIB"`
+      sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null`
+      sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
+      ;;
+    *)
+      sys_lib_search_path_spec=$LIB
       if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then
-        # It is most probably a Windows format PATH printed by
-        # mingw gcc, but we are running on Cygwin. Gcc prints its search
-        # path with ; separators, and with drive letters. We can handle the
-        # drive letters (cygwin fileutils understands them), so leave them,
-        # especially as we might pass files found there to a mingw objdump,
-        # which wouldn't understand a cygwinified path. Ahh.
+        # It is most probably a Windows format PATH.
         sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
       else
-        sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
+        sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
       fi
-      ;;
-    pw32*)
-      # pw32 DLLs use 'pw' prefix rather than 'lib'
-      library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
+      # FIXME: find the short name or the path components, as spaces are
+      # common. (e.g. "Program Files" -> "PROGRA~1")
       ;;
     esac
+
+    # DLL is installed to $(libdir)/../bin by postinstall_cmds
+    postinstall_cmds='base_file=`basename \$file`~
+      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~
+      dldir=$destdir/`dirname \$dlpath`~
+      test -d \$dldir || mkdir -p \$dldir~
+      $install_prog $dir/$dlname \$dldir/$dlname'
+    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
+      dlpath=$dir/\$dldll~
+       $RM \$dlpath'
+    shlibpath_overrides_runpath=yes
+    dynamic_linker='Win32 link.exe'
     ;;
 
   *)
-    library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib'
+    # Assume MSVC wrapper
+    library_names_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext $libname.lib'
+    dynamic_linker='Win32 ld.exe'
     ;;
   esac
-  dynamic_linker='Win32 ld.exe'
   # FIXME: first we should search . and the directory the executable is in
   shlibpath_var=PATH
   ;;
@@ -17407,8 +18879,8 @@ darwin* | rhapsody*)
   version_type=darwin
   need_lib_prefix=no
   need_version=no
-  library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext'
-  soname_spec='${libname}${release}${major}$shared_ext'
+  library_names_spec='$libname$release$major$shared_ext $libname$shared_ext'
+  soname_spec='$libname$release$major$shared_ext'
   shlibpath_overrides_runpath=yes
   shlibpath_var=DYLD_LIBRARY_PATH
   shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
@@ -17417,18 +18889,14 @@ darwin* | rhapsody*)
   ;;
 
 dgux*)
-  version_type=linux
+  version_type=linux # correct to gnu/linux during the next big refactor
   need_lib_prefix=no
   need_version=no
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
-  soname_spec='${libname}${release}${shared_ext}$major'
+  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+  soname_spec='$libname$release$shared_ext$major'
   shlibpath_var=LD_LIBRARY_PATH
   ;;
 
-freebsd1*)
-  dynamic_linker=no
-  ;;
-
 freebsd* | dragonfly*)
   # DragonFly does not have aout.  When/if they implement a new
   # versioning mechanism, adjust this.
@@ -17436,25 +18904,26 @@ freebsd* | dragonfly*)
     objformat=`/usr/bin/objformat`
   else
     case $host_os in
-    freebsd[123]*) objformat=aout ;;
+    freebsd[23].*) objformat=aout ;;
     *) objformat=elf ;;
     esac
   fi
   version_type=freebsd-$objformat
   case $version_type in
     freebsd-elf*)
-      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
+      library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+      soname_spec='$libname$release$shared_ext$major'
       need_version=no
       need_lib_prefix=no
       ;;
     freebsd-*)
-      library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
+      library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
       need_version=yes
       ;;
   esac
   shlibpath_var=LD_LIBRARY_PATH
   case $host_os in
-  freebsd2*)
+  freebsd2.*)
     shlibpath_overrides_runpath=yes
     ;;
   freebsd3.[01]* | freebsdelf3.[01]*)
@@ -17473,13 +18942,16 @@ freebsd* | dragonfly*)
   esac
   ;;
 
-gnu*)
-  version_type=linux
+haiku*)
+  version_type=linux # correct to gnu/linux during the next big refactor
   need_lib_prefix=no
   need_version=no
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
-  shlibpath_var=LD_LIBRARY_PATH
+  dynamic_linker="$host_os runtime_loader"
+  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+  soname_spec='$libname$release$shared_ext$major'
+  shlibpath_var=LIBRARY_PATH
+  shlibpath_overrides_runpath=no
+  sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib'
   hardcode_into_libs=yes
   ;;
 
@@ -17496,14 +18968,15 @@ hpux9* | hpux10* | hpux11*)
     dynamic_linker="$host_os dld.so"
     shlibpath_var=LD_LIBRARY_PATH
     shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
-    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-    soname_spec='${libname}${release}${shared_ext}$major'
-    if test "X$HPUX_IA64_MODE" = X32; then
+    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+    soname_spec='$libname$release$shared_ext$major'
+    if test 32 = "$HPUX_IA64_MODE"; then
       sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
+      sys_lib_dlsearch_path_spec=/usr/lib/hpux32
     else
       sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
+      sys_lib_dlsearch_path_spec=/usr/lib/hpux64
     fi
-    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
     ;;
   hppa*64*)
     shrext_cmds='.sl'
@@ -17511,8 +18984,8 @@ hpux9* | hpux10* | hpux11*)
     dynamic_linker="$host_os dld.sl"
     shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
     shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
-    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-    soname_spec='${libname}${release}${shared_ext}$major'
+    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+    soname_spec='$libname$release$shared_ext$major'
     sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
     sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
     ;;
@@ -17521,20 +18994,22 @@ hpux9* | hpux10* | hpux11*)
     dynamic_linker="$host_os dld.sl"
     shlibpath_var=SHLIB_PATH
     shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
-    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-    soname_spec='${libname}${release}${shared_ext}$major'
+    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+    soname_spec='$libname$release$shared_ext$major'
     ;;
   esac
-  # HP-UX runs *really* slowly unless shared libraries are mode 555.
+  # HP-UX runs *really* slowly unless shared libraries are mode 555, ...
   postinstall_cmds='chmod 555 $lib'
+  # or fails outright, so override atomically:
+  install_override_mode=555
   ;;
 
 interix[3-9]*)
-  version_type=linux
+  version_type=linux # correct to gnu/linux during the next big refactor
   need_lib_prefix=no
   need_version=no
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
+  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+  soname_spec='$libname$release$shared_ext$major'
   dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
   shlibpath_var=LD_LIBRARY_PATH
   shlibpath_overrides_runpath=no
@@ -17545,16 +19020,16 @@ irix5* | irix6* | nonstopux*)
   case $host_os in
     nonstopux*) version_type=nonstopux ;;
     *)
-	if test "$lt_cv_prog_gnu_ld" = yes; then
-		version_type=linux
+	if test yes = "$lt_cv_prog_gnu_ld"; then
+		version_type=linux # correct to gnu/linux during the next big refactor
 	else
 		version_type=irix
 	fi ;;
   esac
   need_lib_prefix=no
   need_version=no
-  soname_spec='${libname}${release}${shared_ext}$major'
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
+  soname_spec='$libname$release$shared_ext$major'
+  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$release$shared_ext $libname$shared_ext'
   case $host_os in
   irix5* | nonstopux*)
     libsuff= shlibsuff=
@@ -17573,8 +19048,8 @@ irix5* | irix6* | nonstopux*)
   esac
   shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
   shlibpath_overrides_runpath=no
-  sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
-  sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
+  sys_lib_search_path_spec="/usr/lib$libsuff /lib$libsuff /usr/local/lib$libsuff"
+  sys_lib_dlsearch_path_spec="/usr/lib$libsuff /lib$libsuff"
   hardcode_into_libs=yes
   ;;
 
@@ -17583,22 +19058,47 @@ linux*oldld* | linux*aout* | linux*coff*)
   dynamic_linker=no
   ;;
 
-# This must be Linux ELF.
-linux* | k*bsd*-gnu)
-  version_type=linux
+linux*android*)
+  version_type=none # Android doesn't support versioned libraries.
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='$libname$release$shared_ext'
+  soname_spec='$libname$release$shared_ext'
+  finish_cmds=
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=yes
+
+  # This implies no fast_install, which is unacceptable.
+  # Some rework will be needed to allow for fast_install
+  # before this can be enabled.
+  hardcode_into_libs=yes
+
+  dynamic_linker='Android linker'
+  # Don't embed -rpath directories since the linker doesn't support them.
+  hardcode_libdir_flag_spec_CXX='-L$libdir'
+  ;;
+
+# This must be glibc/ELF.
+linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
+  version_type=linux # correct to gnu/linux during the next big refactor
   need_lib_prefix=no
   need_version=no
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
+  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+  soname_spec='$libname$release$shared_ext$major'
   finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
   shlibpath_var=LD_LIBRARY_PATH
   shlibpath_overrides_runpath=no
+
   # Some binutils ld are patched to set DT_RUNPATH
-  save_LDFLAGS=$LDFLAGS
-  save_libdir=$libdir
-  eval "libdir=/foo; wl=\"$lt_prog_compiler_wl_CXX\"; \
-       LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec_CXX\""
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+  if ${lt_cv_shlibpath_overrides_runpath+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  lt_cv_shlibpath_overrides_runpath=no
+    save_LDFLAGS=$LDFLAGS
+    save_libdir=$libdir
+    eval "libdir=/foo; wl=\"$lt_prog_compiler_wl_CXX\"; \
+	 LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec_CXX\""
+    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
 int
@@ -17611,22 +19111,31 @@ main ()
 _ACEOF
 if ac_fn_cxx_try_link "$LINENO"; then :
   if  ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then :
-  shlibpath_overrides_runpath=yes
+  lt_cv_shlibpath_overrides_runpath=yes
 fi
 fi
 rm -f core conftest.err conftest.$ac_objext \
     conftest$ac_exeext conftest.$ac_ext
-  LDFLAGS=$save_LDFLAGS
-  libdir=$save_libdir
+    LDFLAGS=$save_LDFLAGS
+    libdir=$save_libdir
+
+fi
+
+  shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath
 
   # This implies no fast_install, which is unacceptable.
   # Some rework will be needed to allow for fast_install
   # before this can be enabled.
   hardcode_into_libs=yes
 
-  # Append ld.so.conf contents to the search path
+  # Ideally, we could use ldconfig to report *all* directores which are
+  # searched for libraries, however this is still not possible.  Aside from not
+  # being certain /sbin/ldconfig is available, command
+  # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64,
+  # even though it is searched at run-time.  Try to do the best guess by
+  # appending ld.so.conf contents (and includes) to the search path.
   if test -f /etc/ld.so.conf; then
-    lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[	 ]*hwcap[	 ]/d;s/[:,	]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
+    lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[	 ]*hwcap[	 ]/d;s/[:,	]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '`
     sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
   fi
 
@@ -17644,12 +19153,12 @@ netbsd*)
   need_lib_prefix=no
   need_version=no
   if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
-    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
+    library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
     finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
     dynamic_linker='NetBSD (a.out) ld.so'
   else
-    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
-    soname_spec='${libname}${release}${shared_ext}$major'
+    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+    soname_spec='$libname$release$shared_ext$major'
     dynamic_linker='NetBSD ld.elf_so'
   fi
   shlibpath_var=LD_LIBRARY_PATH
@@ -17658,8 +19167,8 @@ netbsd*)
   ;;
 
 newsos6)
-  version_type=linux
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  version_type=linux # correct to gnu/linux during the next big refactor
+  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
   shlibpath_var=LD_LIBRARY_PATH
   shlibpath_overrides_runpath=yes
   ;;
@@ -17668,58 +19177,68 @@ newsos6)
   version_type=qnx
   need_lib_prefix=no
   need_version=no
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
+  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+  soname_spec='$libname$release$shared_ext$major'
   shlibpath_var=LD_LIBRARY_PATH
   shlibpath_overrides_runpath=no
   hardcode_into_libs=yes
   dynamic_linker='ldqnx.so'
   ;;
 
-openbsd*)
+openbsd* | bitrig*)
   version_type=sunos
-  sys_lib_dlsearch_path_spec="/usr/lib"
+  sys_lib_dlsearch_path_spec=/usr/lib
   need_lib_prefix=no
-  # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
-  case $host_os in
-    openbsd3.3 | openbsd3.3.*)	need_version=yes ;;
-    *)				need_version=no  ;;
-  esac
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
-  finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
-  shlibpath_var=LD_LIBRARY_PATH
-  if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
-    case $host_os in
-      openbsd2.[89] | openbsd2.[89].*)
-	shlibpath_overrides_runpath=no
-	;;
-      *)
-	shlibpath_overrides_runpath=yes
-	;;
-      esac
+  if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
+    need_version=no
   else
-    shlibpath_overrides_runpath=yes
+    need_version=yes
   fi
+  library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
+  finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=yes
   ;;
 
 os2*)
   libname_spec='$name'
-  shrext_cmds=".dll"
+  version_type=windows
+  shrext_cmds=.dll
+  need_version=no
   need_lib_prefix=no
-  library_names_spec='$libname${shared_ext} $libname.a'
+  # OS/2 can only load a DLL with a base name of 8 characters or less.
+  soname_spec='`test -n "$os2dllname" && libname="$os2dllname";
+    v=$($ECHO $release$versuffix | tr -d .-);
+    n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _);
+    $ECHO $n$v`$shared_ext'
+  library_names_spec='${libname}_dll.$libext'
   dynamic_linker='OS/2 ld.exe'
-  shlibpath_var=LIBPATH
+  shlibpath_var=BEGINLIBPATH
+  sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
+  sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
+  postinstall_cmds='base_file=`basename \$file`~
+    dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; $ECHO \$dlname'\''`~
+    dldir=$destdir/`dirname \$dlpath`~
+    test -d \$dldir || mkdir -p \$dldir~
+    $install_prog $dir/$dlname \$dldir/$dlname~
+    chmod a+x \$dldir/$dlname~
+    if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
+      eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
+    fi'
+  postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; $ECHO \$dlname'\''`~
+    dlpath=$dir/\$dldll~
+    $RM \$dlpath'
   ;;
 
 osf3* | osf4* | osf5*)
   version_type=osf
   need_lib_prefix=no
   need_version=no
-  soname_spec='${libname}${release}${shared_ext}$major'
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='$libname$release$shared_ext$major'
+  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
   shlibpath_var=LD_LIBRARY_PATH
   sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
-  sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
+  sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
   ;;
 
 rdos*)
@@ -17727,11 +19246,11 @@ rdos*)
   ;;
 
 solaris*)
-  version_type=linux
+  version_type=linux # correct to gnu/linux during the next big refactor
   need_lib_prefix=no
   need_version=no
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
+  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+  soname_spec='$libname$release$shared_ext$major'
   shlibpath_var=LD_LIBRARY_PATH
   shlibpath_overrides_runpath=yes
   hardcode_into_libs=yes
@@ -17741,20 +19260,20 @@ solaris*)
 
 sunos4*)
   version_type=sunos
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
+  library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
   finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
   shlibpath_var=LD_LIBRARY_PATH
   shlibpath_overrides_runpath=yes
-  if test "$with_gnu_ld" = yes; then
+  if test yes = "$with_gnu_ld"; then
     need_lib_prefix=no
   fi
   need_version=yes
   ;;
 
 sysv4 | sysv4.3*)
-  version_type=linux
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
+  version_type=linux # correct to gnu/linux during the next big refactor
+  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+  soname_spec='$libname$release$shared_ext$major'
   shlibpath_var=LD_LIBRARY_PATH
   case $host_vendor in
     sni)
@@ -17775,24 +19294,24 @@ sysv4 | sysv4.3*)
   ;;
 
 sysv4*MP*)
-  if test -d /usr/nec ;then
-    version_type=linux
-    library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
-    soname_spec='$libname${shared_ext}.$major'
+  if test -d /usr/nec; then
+    version_type=linux # correct to gnu/linux during the next big refactor
+    library_names_spec='$libname$shared_ext.$versuffix $libname$shared_ext.$major $libname$shared_ext'
+    soname_spec='$libname$shared_ext.$major'
     shlibpath_var=LD_LIBRARY_PATH
   fi
   ;;
 
 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
-  version_type=freebsd-elf
+  version_type=sco
   need_lib_prefix=no
   need_version=no
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
+  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext $libname$shared_ext'
+  soname_spec='$libname$release$shared_ext$major'
   shlibpath_var=LD_LIBRARY_PATH
   shlibpath_overrides_runpath=yes
   hardcode_into_libs=yes
-  if test "$with_gnu_ld" = yes; then
+  if test yes = "$with_gnu_ld"; then
     sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
   else
     sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
@@ -17807,19 +19326,19 @@ sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
 
 tpf*)
   # TPF is a cross-target only.  Preferred cross-host = GNU/Linux.
-  version_type=linux
+  version_type=linux # correct to gnu/linux during the next big refactor
   need_lib_prefix=no
   need_version=no
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
   shlibpath_var=LD_LIBRARY_PATH
   shlibpath_overrides_runpath=no
   hardcode_into_libs=yes
   ;;
 
 uts4*)
-  version_type=linux
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
+  version_type=linux # correct to gnu/linux during the next big refactor
+  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+  soname_spec='$libname$release$shared_ext$major'
   shlibpath_var=LD_LIBRARY_PATH
   ;;
 
@@ -17829,20 +19348,34 @@ uts4*)
 esac
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5
 $as_echo "$dynamic_linker" >&6; }
-test "$dynamic_linker" = no && can_build_shared=no
+test no = "$dynamic_linker" && can_build_shared=no
 
 variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
-if test "$GCC" = yes; then
+if test yes = "$GCC"; then
   variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
 fi
 
-if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then
-  sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
+if test set = "${lt_cv_sys_lib_search_path_spec+set}"; then
+  sys_lib_search_path_spec=$lt_cv_sys_lib_search_path_spec
 fi
-if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then
-  sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec"
+
+if test set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then
+  sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec
 fi
 
+# remember unaugmented sys_lib_dlsearch_path content for libtool script decls...
+configure_time_dlsearch_path=$sys_lib_dlsearch_path_spec
+
+# ... but it needs LT_SYS_LIBRARY_PATH munging for other configure-time code
+func_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH"
+
+# to be used as default LT_SYS_LIBRARY_PATH value in generated libtool
+configure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH
+
+
+
+
+
 
 
 
@@ -17883,15 +19416,15 @@ $as_echo_n "checking how to hardcode library paths into programs... " >&6; }
 hardcode_action_CXX=
 if test -n "$hardcode_libdir_flag_spec_CXX" ||
    test -n "$runpath_var_CXX" ||
-   test "X$hardcode_automatic_CXX" = "Xyes" ; then
+   test yes = "$hardcode_automatic_CXX"; then
 
   # We can hardcode non-existent directories.
-  if test "$hardcode_direct_CXX" != no &&
+  if test no != "$hardcode_direct_CXX" &&
      # If the only mechanism to avoid hardcoding is shlibpath_var, we
      # have to relink, otherwise we might link with an installed library
      # when we should be linking with a yet-to-be-installed one
-     ## test "$_LT_TAGVAR(hardcode_shlibpath_var, CXX)" != no &&
-     test "$hardcode_minus_L_CXX" != no; then
+     ## test no != "$_LT_TAGVAR(hardcode_shlibpath_var, CXX)" &&
+     test no != "$hardcode_minus_L_CXX"; then
     # Linking always hardcodes the temporary library directory.
     hardcode_action_CXX=relink
   else
@@ -17906,12 +19439,12 @@ fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action_CXX" >&5
 $as_echo "$hardcode_action_CXX" >&6; }
 
-if test "$hardcode_action_CXX" = relink ||
-   test "$inherit_rpath_CXX" = yes; then
+if test relink = "$hardcode_action_CXX" ||
+   test yes = "$inherit_rpath_CXX"; then
   # Fast installation is not supported
   enable_fast_install=no
-elif test "$shlibpath_overrides_runpath" = yes ||
-     test "$enable_shared" = no; then
+elif test yes = "$shlibpath_overrides_runpath" ||
+     test no = "$enable_shared"; then
   # Fast installation is not necessary
   enable_fast_install=needless
 fi
@@ -17925,6 +19458,7 @@ fi
   fi # test -n "$compiler"
 
   CC=$lt_save_CC
+  CFLAGS=$lt_save_CFLAGS
   LDCXX=$LD
   LD=$lt_save_LD
   GCC=$lt_save_GCC
@@ -17933,7 +19467,7 @@ fi
   lt_cv_path_LD=$lt_save_path_LD
   lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
   lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
-fi # test "$_lt_caught_CXX_error" != yes
+fi # test yes != "$_lt_caught_CXX_error"
 
 ac_ext=c
 ac_cpp='$CPP $CPPFLAGS'
@@ -17948,6 +19482,9 @@ ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5'
 ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
 ac_compiler_gnu=$ac_cv_f77_compiler_gnu
 
+if test -z "$F77" || test no = "$F77"; then
+  _lt_disable_F77=yes
+fi
 
 archive_cmds_need_lc_F77=no
 allow_undefined_flag_F77=
@@ -17957,7 +19494,6 @@ export_dynamic_flag_spec_F77=
 hardcode_direct_F77=no
 hardcode_direct_absolute_F77=no
 hardcode_libdir_flag_spec_F77=
-hardcode_libdir_flag_spec_ld_F77=
 hardcode_libdir_separator_F77=
 hardcode_minus_L_F77=no
 hardcode_automatic_F77=no
@@ -17966,6 +19502,8 @@ module_cmds_F77=
 module_expsym_cmds_F77=
 link_all_deplibs_F77=unknown
 old_archive_cmds_F77=$old_archive_cmds
+reload_flag_F77=$reload_flag
+reload_cmds_F77=$reload_cmds
 no_undefined_flag_F77=
 whole_archive_flag_spec_F77=
 enable_shared_with_static_runtimes_F77=no
@@ -17981,7 +19519,7 @@ objext_F77=$objext
 # the F77 compiler isn't working.  Some variables (like enable_shared)
 # are currently assumed to apply to all compilers on this platform,
 # and will be corrupted by setting them based on a non-working compiler.
-if test "$_lt_disable_F77" != yes; then
+if test yes != "$_lt_disable_F77"; then
   # Code to be used in simple compile tests
   lt_simple_compile_test_code="\
       subroutine t
@@ -18027,20 +19565,15 @@ $RM -r conftest*
 
 
   # Allow CC to be a program name with arguments.
-  lt_save_CC="$CC"
+  lt_save_CC=$CC
   lt_save_GCC=$GCC
+  lt_save_CFLAGS=$CFLAGS
   CC=${F77-"f77"}
+  CFLAGS=$FFLAGS
   compiler=$CC
   compiler_F77=$CC
-  for cc_temp in $compiler""; do
-  case $cc_temp in
-    compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
-    distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
-    \-*) ;;
-    *) break;;
-  esac
-done
-cc_basename=`$ECHO "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
+  func_cc_basename $compiler
+cc_basename=$func_cc_basename_result
 
   GCC=$G77
   if test -n "$compiler"; then
@@ -18051,21 +19584,25 @@ $as_echo "$can_build_shared" >&6; }
 
     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build shared libraries" >&5
 $as_echo_n "checking whether to build shared libraries... " >&6; }
-    test "$can_build_shared" = "no" && enable_shared=no
+    test no = "$can_build_shared" && enable_shared=no
 
     # On AIX, shared libraries and static libraries use the same namespace, and
     # are all built from PIC.
     case $host_os in
       aix3*)
-        test "$enable_shared" = yes && enable_static=no
+        test yes = "$enable_shared" && enable_static=no
         if test -n "$RANLIB"; then
           archive_cmds="$archive_cmds~\$RANLIB \$lib"
           postinstall_cmds='$RANLIB $lib'
         fi
         ;;
       aix[4-9]*)
-	if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
-	  test "$enable_shared" = yes && enable_static=no
+	if test ia64 != "$host_cpu"; then
+	  case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in
+	  yes,aix,yes) ;;		# shared object as lib.so file only
+	  yes,svr4,*) ;;		# shared object as lib.so archive member only
+	  yes,*) enable_static=no ;;	# shared object in lib.a archive as well
+	  esac
 	fi
         ;;
     esac
@@ -18075,12 +19612,12 @@ $as_echo "$enable_shared" >&6; }
     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build static libraries" >&5
 $as_echo_n "checking whether to build static libraries... " >&6; }
     # Make sure either enable_shared or enable_static is yes.
-    test "$enable_shared" = yes || enable_static=yes
+    test yes = "$enable_shared" || enable_static=yes
     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_static" >&5
 $as_echo "$enable_static" >&6; }
 
-    GCC_F77="$G77"
-    LD_F77="$LD"
+    GCC_F77=$G77
+    LD_F77=$LD
 
     ## CAVEAT EMPTOR:
     ## There is no encapsulation within the following macros, do not change
@@ -18090,20 +19627,19 @@ $as_echo "$enable_static" >&6; }
 lt_prog_compiler_pic_F77=
 lt_prog_compiler_static_F77=
 
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5
-$as_echo_n "checking for $compiler option to produce PIC... " >&6; }
 
-  if test "$GCC" = yes; then
+  if test yes = "$GCC"; then
     lt_prog_compiler_wl_F77='-Wl,'
     lt_prog_compiler_static_F77='-static'
 
     case $host_os in
       aix*)
       # All AIX code is PIC.
-      if test "$host_cpu" = ia64; then
+      if test ia64 = "$host_cpu"; then
 	# AIX 5 now supports IA64 processor
 	lt_prog_compiler_static_F77='-Bstatic'
       fi
+      lt_prog_compiler_pic_F77='-fPIC'
       ;;
 
     amigaos*)
@@ -18114,8 +19650,8 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; }
         ;;
       m68k)
             # FIXME: we need at least 68020 code to build shared libraries, but
-            # adding the `-m68020' flag to GCC prevents building anything better,
-            # like `-m68040'.
+            # adding the '-m68020' flag to GCC prevents building anything better,
+            # like '-m68040'.
             lt_prog_compiler_pic_F77='-m68020 -resident32 -malways-restore-a4'
         ;;
       esac
@@ -18131,6 +19667,11 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; }
       # Although the cygwin gcc ignores -fPIC, still need this for old-style
       # (--disable-auto-import) libraries
       lt_prog_compiler_pic_F77='-DDLL_EXPORT'
+      case $host_os in
+      os2*)
+	lt_prog_compiler_static_F77='$wl-static'
+	;;
+      esac
       ;;
 
     darwin* | rhapsody*)
@@ -18139,6 +19680,12 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; }
       lt_prog_compiler_pic_F77='-fno-common'
       ;;
 
+    haiku*)
+      # PIC is the default for Haiku.
+      # The "-static" flag exists, but is broken.
+      lt_prog_compiler_static_F77=
+      ;;
+
     hpux*)
       # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
       # PA HP-UX.  On IA64 HP-UX, PIC is the default but the pic flag
@@ -18181,12 +19728,21 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; }
       lt_prog_compiler_pic_F77='-fPIC'
       ;;
     esac
+
+    case $cc_basename in
+    nvcc*) # Cuda Compiler Driver 2.2
+      lt_prog_compiler_wl_F77='-Xlinker '
+      if test -n "$lt_prog_compiler_pic_F77"; then
+        lt_prog_compiler_pic_F77="-Xcompiler $lt_prog_compiler_pic_F77"
+      fi
+      ;;
+    esac
   else
     # PORTME Check for flag to pass linker flags through the system compiler.
     case $host_os in
     aix*)
       lt_prog_compiler_wl_F77='-Wl,'
-      if test "$host_cpu" = ia64; then
+      if test ia64 = "$host_cpu"; then
 	# AIX 5 now supports IA64 processor
 	lt_prog_compiler_static_F77='-Bstatic'
       else
@@ -18194,10 +19750,29 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; }
       fi
       ;;
 
+    darwin* | rhapsody*)
+      # PIC is the default on this platform
+      # Common symbols not allowed in MH_DYLIB files
+      lt_prog_compiler_pic_F77='-fno-common'
+      case $cc_basename in
+      nagfor*)
+        # NAG Fortran compiler
+        lt_prog_compiler_wl_F77='-Wl,-Wl,,'
+        lt_prog_compiler_pic_F77='-PIC'
+        lt_prog_compiler_static_F77='-Bstatic'
+        ;;
+      esac
+      ;;
+
     mingw* | cygwin* | pw32* | os2* | cegcc*)
       # This hack is so that the source file can tell whether it is being
       # built for inclusion in a dll (and should export symbols for example).
       lt_prog_compiler_pic_F77='-DDLL_EXPORT'
+      case $host_os in
+      os2*)
+	lt_prog_compiler_static_F77='$wl-static'
+	;;
+      esac
       ;;
 
     hpux9* | hpux10* | hpux11*)
@@ -18213,7 +19788,7 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; }
 	;;
       esac
       # Is there a better lt_prog_compiler_static that works with the bundled CC?
-      lt_prog_compiler_static_F77='${wl}-a ${wl}archive'
+      lt_prog_compiler_static_F77='$wl-a ${wl}archive'
       ;;
 
     irix5* | irix6* | nonstopux*)
@@ -18222,9 +19797,9 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; }
       lt_prog_compiler_static_F77='-non_shared'
       ;;
 
-    linux* | k*bsd*-gnu)
+    linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
       case $cc_basename in
-      # old Intel for x86_64 which still supported -KPIC.
+      # old Intel for x86_64, which still supported -KPIC.
       ecc*)
 	lt_prog_compiler_wl_F77='-Wl,'
 	lt_prog_compiler_pic_F77='-KPIC'
@@ -18243,7 +19818,19 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; }
 	lt_prog_compiler_pic_F77='--shared'
 	lt_prog_compiler_static_F77='--static'
 	;;
-      pgcc* | pgf77* | pgf90* | pgf95*)
+      nagfor*)
+	# NAG Fortran compiler
+	lt_prog_compiler_wl_F77='-Wl,-Wl,,'
+	lt_prog_compiler_pic_F77='-PIC'
+	lt_prog_compiler_static_F77='-Bstatic'
+	;;
+      tcc*)
+	# Fabrice Bellard et al's Tiny C Compiler
+	lt_prog_compiler_wl_F77='-Wl,'
+	lt_prog_compiler_pic_F77='-fPIC'
+	lt_prog_compiler_static_F77='-static'
+	;;
+      pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
         # Portland Group compilers (*not* the Pentium gcc compiler,
 	# which looks to be a dead project)
 	lt_prog_compiler_wl_F77='-Wl,'
@@ -18255,25 +19842,40 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; }
         # All Alpha code is PIC.
         lt_prog_compiler_static_F77='-non_shared'
         ;;
-      xl*)
-	# IBM XL C 8.0/Fortran 10.1 on PPC
+      xl* | bgxl* | bgf* | mpixl*)
+	# IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene
 	lt_prog_compiler_wl_F77='-Wl,'
 	lt_prog_compiler_pic_F77='-qpic'
 	lt_prog_compiler_static_F77='-qstaticlink'
 	;;
       *)
 	case `$CC -V 2>&1 | sed 5q` in
+	*Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [1-7].* | *Sun*Fortran*\ 8.[0-3]*)
+	  # Sun Fortran 8.3 passes all unrecognized flags to the linker
+	  lt_prog_compiler_pic_F77='-KPIC'
+	  lt_prog_compiler_static_F77='-Bstatic'
+	  lt_prog_compiler_wl_F77=''
+	  ;;
+	*Sun\ F* | *Sun*Fortran*)
+	  lt_prog_compiler_pic_F77='-KPIC'
+	  lt_prog_compiler_static_F77='-Bstatic'
+	  lt_prog_compiler_wl_F77='-Qoption ld '
+	  ;;
 	*Sun\ C*)
 	  # Sun C 5.9
 	  lt_prog_compiler_pic_F77='-KPIC'
 	  lt_prog_compiler_static_F77='-Bstatic'
 	  lt_prog_compiler_wl_F77='-Wl,'
 	  ;;
-	*Sun\ F*)
-	  # Sun Fortran 8.3 passes all unrecognized flags to the linker
-	  lt_prog_compiler_pic_F77='-KPIC'
+        *Intel*\ [CF]*Compiler*)
+	  lt_prog_compiler_wl_F77='-Wl,'
+	  lt_prog_compiler_pic_F77='-fPIC'
+	  lt_prog_compiler_static_F77='-static'
+	  ;;
+	*Portland\ Group*)
+	  lt_prog_compiler_wl_F77='-Wl,'
+	  lt_prog_compiler_pic_F77='-fpic'
 	  lt_prog_compiler_static_F77='-Bstatic'
-	  lt_prog_compiler_wl_F77=''
 	  ;;
 	esac
 	;;
@@ -18305,7 +19907,7 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; }
       lt_prog_compiler_pic_F77='-KPIC'
       lt_prog_compiler_static_F77='-Bstatic'
       case $cc_basename in
-      f77* | f90* | f95*)
+      f77* | f90* | f95* | sunf77* | sunf90* | sunf95*)
 	lt_prog_compiler_wl_F77='-Qoption ld ';;
       *)
 	lt_prog_compiler_wl_F77='-Wl,';;
@@ -18325,7 +19927,7 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; }
       ;;
 
     sysv4*MP*)
-      if test -d /usr/nec ;then
+      if test -d /usr/nec; then
 	lt_prog_compiler_pic_F77='-Kconform_pic'
 	lt_prog_compiler_static_F77='-Bstatic'
       fi
@@ -18354,7 +19956,7 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; }
   fi
 
 case $host_os in
-  # For platforms which do not support PIC, -DPIC is meaningless:
+  # For platforms that do not support PIC, -DPIC is meaningless:
   *djgpp*)
     lt_prog_compiler_pic_F77=
     ;;
@@ -18362,10 +19964,17 @@ case $host_os in
     lt_prog_compiler_pic_F77="$lt_prog_compiler_pic_F77"
     ;;
 esac
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_prog_compiler_pic_F77" >&5
-$as_echo "$lt_prog_compiler_pic_F77" >&6; }
-
 
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5
+$as_echo_n "checking for $compiler option to produce PIC... " >&6; }
+if ${lt_cv_prog_compiler_pic_F77+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  lt_cv_prog_compiler_pic_F77=$lt_prog_compiler_pic_F77
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_F77" >&5
+$as_echo "$lt_cv_prog_compiler_pic_F77" >&6; }
+lt_prog_compiler_pic_F77=$lt_cv_prog_compiler_pic_F77
 
 #
 # Check to make sure the PIC flag actually works.
@@ -18379,7 +19988,7 @@ else
   lt_cv_prog_compiler_pic_works_F77=no
    ac_outfile=conftest.$ac_objext
    echo "$lt_simple_compile_test_code" > conftest.$ac_ext
-   lt_compiler_flag="$lt_prog_compiler_pic_F77"
+   lt_compiler_flag="$lt_prog_compiler_pic_F77"  ## exclude from sc_useless_quotes_in_assignment
    # Insert the option either (1) after the last *FLAGS variable, or
    # (2) before a word containing "conftest.", or (3) at the end.
    # Note that $ac_compile itself does not contain backslashes and begins
@@ -18389,15 +19998,15 @@ else
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:18392: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>conftest.err)
    ac_status=$?
    cat conftest.err >&5
-   echo "$as_me:18396: \$? = $ac_status" >&5
+   echo "$as_me:$LINENO: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s "$ac_outfile"; then
      # The compiler can only warn and ignore the option if not recognized
      # So say no if there are warnings other than the usual output.
-     $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
+     $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
      $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
      if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
        lt_cv_prog_compiler_pic_works_F77=yes
@@ -18409,7 +20018,7 @@ fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works_F77" >&5
 $as_echo "$lt_cv_prog_compiler_pic_works_F77" >&6; }
 
-if test x"$lt_cv_prog_compiler_pic_works_F77" = xyes; then
+if test yes = "$lt_cv_prog_compiler_pic_works_F77"; then
     case $lt_prog_compiler_pic_F77 in
      "" | " "*) ;;
      *) lt_prog_compiler_pic_F77=" $lt_prog_compiler_pic_F77" ;;
@@ -18423,6 +20032,8 @@ fi
 
 
 
+
+
 #
 # Check to make sure the static flag actually works.
 #
@@ -18433,7 +20044,7 @@ if ${lt_cv_prog_compiler_static_works_F77+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   lt_cv_prog_compiler_static_works_F77=no
-   save_LDFLAGS="$LDFLAGS"
+   save_LDFLAGS=$LDFLAGS
    LDFLAGS="$LDFLAGS $lt_tmp_static_flag"
    echo "$lt_simple_link_test_code" > conftest.$ac_ext
    if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
@@ -18442,7 +20053,7 @@ else
      if test -s conftest.err; then
        # Append any errors to the config.log.
        cat conftest.err 1>&5
-       $ECHO "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp
+       $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
        $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
        if diff conftest.exp conftest.er2 >/dev/null; then
          lt_cv_prog_compiler_static_works_F77=yes
@@ -18452,13 +20063,13 @@ else
      fi
    fi
    $RM -r conftest*
-   LDFLAGS="$save_LDFLAGS"
+   LDFLAGS=$save_LDFLAGS
 
 fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works_F77" >&5
 $as_echo "$lt_cv_prog_compiler_static_works_F77" >&6; }
 
-if test x"$lt_cv_prog_compiler_static_works_F77" = xyes; then
+if test yes = "$lt_cv_prog_compiler_static_works_F77"; then
     :
 else
     lt_prog_compiler_static_F77=
@@ -18488,16 +20099,16 @@ else
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:18491: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>out/conftest.err)
    ac_status=$?
    cat out/conftest.err >&5
-   echo "$as_me:18495: \$? = $ac_status" >&5
+   echo "$as_me:$LINENO: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s out/conftest2.$ac_objext
    then
      # The compiler can only warn and ignore the option if not recognized
      # So say no if there are warnings
-     $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
+     $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
      $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
      if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
        lt_cv_prog_compiler_c_o_F77=yes
@@ -18540,16 +20151,16 @@ else
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:18543: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>out/conftest.err)
    ac_status=$?
    cat out/conftest.err >&5
-   echo "$as_me:18547: \$? = $ac_status" >&5
+   echo "$as_me:$LINENO: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s out/conftest2.$ac_objext
    then
      # The compiler can only warn and ignore the option if not recognized
      # So say no if there are warnings
-     $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
+     $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
      $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
      if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
        lt_cv_prog_compiler_c_o_F77=yes
@@ -18572,8 +20183,8 @@ $as_echo "$lt_cv_prog_compiler_c_o_F77" >&6; }
 
 
 
-hard_links="nottested"
-if test "$lt_cv_prog_compiler_c_o_F77" = no && test "$need_locks" != no; then
+hard_links=nottested
+if test no = "$lt_cv_prog_compiler_c_o_F77" && test no != "$need_locks"; then
   # do not overwrite the value of need_locks provided by the user
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5
 $as_echo_n "checking if we can lock with hard links... " >&6; }
@@ -18585,9 +20196,9 @@ $as_echo_n "checking if we can lock with hard links... " >&6; }
   ln conftest.a conftest.b 2>/dev/null && hard_links=no
   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5
 $as_echo "$hard_links" >&6; }
-  if test "$hard_links" = no; then
-    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5
-$as_echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;}
+  if test no = "$hard_links"; then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&5
+$as_echo "$as_me: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&2;}
     need_locks=warn
   fi
 else
@@ -18612,7 +20223,6 @@ $as_echo_n "checking whether the $compiler linker ($LD) supports shared librarie
   hardcode_direct_F77=no
   hardcode_direct_absolute_F77=no
   hardcode_libdir_flag_spec_F77=
-  hardcode_libdir_flag_spec_ld_F77=
   hardcode_libdir_separator_F77=
   hardcode_minus_L_F77=no
   hardcode_shlibpath_var_F77=unsupported
@@ -18628,9 +20238,9 @@ $as_echo_n "checking whether the $compiler linker ($LD) supports shared librarie
   # included in the symbol list
   include_expsyms_F77=
   # exclude_expsyms can be an extended regexp of symbols to exclude
-  # it will be wrapped by ` (' and `)$', so one must not match beginning or
-  # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
-  # as well as any symbol that contains `d'.
+  # it will be wrapped by ' (' and ')$', so one must not match beginning or
+  # end of line.  Example: 'a|bc|.*d.*' will exclude the symbols 'a' and 'bc',
+  # as well as any symbol that contains 'd'.
   exclude_expsyms_F77='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'
   # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
   # platforms (ab)use it in PIC code, but their linkers get confused if
@@ -18645,7 +20255,7 @@ $as_echo_n "checking whether the $compiler linker ($LD) supports shared librarie
     # FIXME: the MSVC++ port hasn't been tested in a loooong time
     # When not using gcc, we currently assume that we are using
     # Microsoft Visual C++.
-    if test "$GCC" != yes; then
+    if test yes != "$GCC"; then
       with_gnu_ld=no
     fi
     ;;
@@ -18653,30 +20263,57 @@ $as_echo_n "checking whether the $compiler linker ($LD) supports shared librarie
     # we just hope/assume this is gcc and not c89 (= MSVC++)
     with_gnu_ld=yes
     ;;
-  openbsd*)
+  openbsd* | bitrig*)
     with_gnu_ld=no
     ;;
   esac
 
   ld_shlibs_F77=yes
-  if test "$with_gnu_ld" = yes; then
+
+  # On some targets, GNU ld is compatible enough with the native linker
+  # that we're better off using the native interface for both.
+  lt_use_gnu_ld_interface=no
+  if test yes = "$with_gnu_ld"; then
+    case $host_os in
+      aix*)
+	# The AIX port of GNU ld has always aspired to compatibility
+	# with the native linker.  However, as the warning in the GNU ld
+	# block says, versions before 2.19.5* couldn't really create working
+	# shared libraries, regardless of the interface used.
+	case `$LD -v 2>&1` in
+	  *\ \(GNU\ Binutils\)\ 2.19.5*) ;;
+	  *\ \(GNU\ Binutils\)\ 2.[2-9]*) ;;
+	  *\ \(GNU\ Binutils\)\ [3-9]*) ;;
+	  *)
+	    lt_use_gnu_ld_interface=yes
+	    ;;
+	esac
+	;;
+      *)
+	lt_use_gnu_ld_interface=yes
+	;;
+    esac
+  fi
+
+  if test yes = "$lt_use_gnu_ld_interface"; then
     # If archive_cmds runs LD, not CC, wlarc should be empty
-    wlarc='${wl}'
+    wlarc='$wl'
 
     # Set some defaults for GNU ld with shared library support. These
     # are reset later if shared libraries are not supported. Putting them
     # here allows them to be overridden if necessary.
     runpath_var=LD_RUN_PATH
-    hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir'
-    export_dynamic_flag_spec_F77='${wl}--export-dynamic'
+    hardcode_libdir_flag_spec_F77='$wl-rpath $wl$libdir'
+    export_dynamic_flag_spec_F77='$wl--export-dynamic'
     # ancient GNU ld didn't support --whole-archive et. al.
     if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
-      whole_archive_flag_spec_F77="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
+      whole_archive_flag_spec_F77=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive'
     else
       whole_archive_flag_spec_F77=
     fi
     supports_anon_versioning=no
-    case `$LD -v 2>&1` in
+    case `$LD -v | $SED -e 's/(^)\+)\s\+//' 2>&1` in
+      *GNU\ gold*) supports_anon_versioning=yes ;;
       *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11
       *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
       *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
@@ -18688,15 +20325,16 @@ $as_echo_n "checking whether the $compiler linker ($LD) supports shared librarie
     case $host_os in
     aix[3-9]*)
       # On AIX/PPC, the GNU linker is very broken
-      if test "$host_cpu" != ia64; then
+      if test ia64 != "$host_cpu"; then
 	ld_shlibs_F77=no
 	cat <<_LT_EOF 1>&2
 
-*** Warning: the GNU linker, at least up to release 2.9.1, is reported
+*** Warning: the GNU linker, at least up to release 2.19, is reported
 *** to be unable to reliably create shared libraries on AIX.
 *** Therefore, libtool is disabling shared libraries support.  If you
-*** really care for shared libraries, you may want to modify your PATH
-*** so that a non-GNU linker is found, and then restart.
+*** really care for shared libraries, you may want to install binutils
+*** 2.20 or above, or modify your PATH so that a non-GNU linker is found.
+*** You will then need to restart the configuration process.
 
 _LT_EOF
       fi
@@ -18706,7 +20344,7 @@ _LT_EOF
       case $host_cpu in
       powerpc)
             # see comment about AmigaOS4 .so support
-            archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+            archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
             archive_expsym_cmds_F77=''
         ;;
       m68k)
@@ -18722,7 +20360,7 @@ _LT_EOF
 	allow_undefined_flag_F77=unsupported
 	# Joseph Beckenbach <jrb3 at best.com> says some releases of gcc
 	# support --undefined.  This deserves some investigation.  FIXME
-	archive_cmds_F77='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+	archive_cmds_F77='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
       else
 	ld_shlibs_F77=no
       fi
@@ -18732,61 +20370,97 @@ _LT_EOF
       # _LT_TAGVAR(hardcode_libdir_flag_spec, F77) is actually meaningless,
       # as there is no search path for DLLs.
       hardcode_libdir_flag_spec_F77='-L$libdir'
+      export_dynamic_flag_spec_F77='$wl--export-all-symbols'
       allow_undefined_flag_F77=unsupported
       always_export_symbols_F77=no
       enable_shared_with_static_runtimes_F77=yes
-      export_symbols_cmds_F77='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols'
+      export_symbols_cmds_F77='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.* //'\'' | sort | uniq > $export_symbols'
+      exclude_expsyms_F77='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'
 
       if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
-        archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
-	# If the export-symbols file already is a .def file (1st line
-	# is EXPORTS), use it as is; otherwise, prepend...
-	archive_expsym_cmds_F77='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
-	  cp $export_symbols $output_objdir/$soname.def;
-	else
-	  echo EXPORTS > $output_objdir/$soname.def;
-	  cat $export_symbols >> $output_objdir/$soname.def;
-	fi~
-	$CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
+        archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
+	# If the export-symbols file already is a .def file, use it as
+	# is; otherwise, prepend EXPORTS...
+	archive_expsym_cmds_F77='if   test DEF = "`$SED -n     -e '\''s/^[	 ]*//'\''     -e '\''/^\(;.*\)*$/d'\''     -e '\''s/^\(EXPORTS\|LIBRARY\)\([	 ].*\)*$/DEF/p'\''     -e q     $export_symbols`" ; then
+          cp $export_symbols $output_objdir/$soname.def;
+        else
+          echo EXPORTS > $output_objdir/$soname.def;
+          cat $export_symbols >> $output_objdir/$soname.def;
+        fi~
+        $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
       else
 	ld_shlibs_F77=no
       fi
       ;;
 
+    haiku*)
+      archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
+      link_all_deplibs_F77=yes
+      ;;
+
+    os2*)
+      hardcode_libdir_flag_spec_F77='-L$libdir'
+      hardcode_minus_L_F77=yes
+      allow_undefined_flag_F77=unsupported
+      shrext_cmds=.dll
+      archive_cmds_F77='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
+	$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
+	$ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
+	$ECHO EXPORTS >> $output_objdir/$libname.def~
+	emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
+	$CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
+	emximp -o $lib $output_objdir/$libname.def'
+      archive_expsym_cmds_F77='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
+	$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
+	$ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
+	$ECHO EXPORTS >> $output_objdir/$libname.def~
+	prefix_cmds="$SED"~
+	if test EXPORTS = "`$SED 1q $export_symbols`"; then
+	  prefix_cmds="$prefix_cmds -e 1d";
+	fi~
+	prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
+	cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
+	$CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
+	emximp -o $lib $output_objdir/$libname.def'
+      old_archive_From_new_cmds_F77='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
+      enable_shared_with_static_runtimes_F77=yes
+      ;;
+
     interix[3-9]*)
       hardcode_direct_F77=no
       hardcode_shlibpath_var_F77=no
-      hardcode_libdir_flag_spec_F77='${wl}-rpath,$libdir'
-      export_dynamic_flag_spec_F77='${wl}-E'
+      hardcode_libdir_flag_spec_F77='$wl-rpath,$libdir'
+      export_dynamic_flag_spec_F77='$wl-E'
       # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
       # Instead, shared libraries are loaded at an image base (0x10000000 by
       # default) and relocated if they conflict, which is a slow very memory
       # consuming and fragmenting process.  To avoid this, we pick a random,
       # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
       # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
-      archive_cmds_F77='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
-      archive_expsym_cmds_F77='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+      archive_cmds_F77='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+      archive_expsym_cmds_F77='sed "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
       ;;
 
-    gnu* | linux* | tpf* | k*bsd*-gnu)
+    gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
       tmp_diet=no
-      if test "$host_os" = linux-dietlibc; then
+      if test linux-dietlibc = "$host_os"; then
 	case $cc_basename in
 	  diet\ *) tmp_diet=yes;;	# linux-dietlibc with static linking (!diet-dyn)
 	esac
       fi
       if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
-	 && test "$tmp_diet" = no
+	 && test no = "$tmp_diet"
       then
-	tmp_addflag=
+	tmp_addflag=' $pic_flag'
 	tmp_sharedflag='-shared'
 	case $cc_basename,$host_cpu in
         pgcc*)				# Portland Group C compiler
-	  whole_archive_flag_spec_F77='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
+	  whole_archive_flag_spec_F77='$wl--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
 	  tmp_addflag=' $pic_flag'
 	  ;;
-	pgf77* | pgf90* | pgf95*)	# Portland Group f77 and f90 compilers
-	  whole_archive_flag_spec_F77='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
+	pgf77* | pgf90* | pgf95* | pgfortran*)
+					# Portland Group f77 and f90 compilers
+	  whole_archive_flag_spec_F77='$wl--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
 	  tmp_addflag=' $pic_flag -Mnomain' ;;
 	ecc*,ia64* | icc*,ia64*)	# Intel C compiler on ia64
 	  tmp_addflag=' -i_dynamic' ;;
@@ -18797,39 +20471,47 @@ _LT_EOF
 	lf95*)				# Lahey Fortran 8.1
 	  whole_archive_flag_spec_F77=
 	  tmp_sharedflag='--shared' ;;
-	xl[cC]*)			# IBM XL C 8.0 on PPC (deal with xlf below)
+        nagfor*)                        # NAGFOR 5.3
+          tmp_sharedflag='-Wl,-shared' ;;
+	xl[cC]* | bgxl[cC]* | mpixl[cC]*) # IBM XL C 8.0 on PPC (deal with xlf below)
 	  tmp_sharedflag='-qmkshrobj'
 	  tmp_addflag= ;;
+	nvcc*)	# Cuda Compiler Driver 2.2
+	  whole_archive_flag_spec_F77='$wl--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
+	  compiler_needs_object_F77=yes
+	  ;;
 	esac
 	case `$CC -V 2>&1 | sed 5q` in
 	*Sun\ C*)			# Sun C 5.9
-	  whole_archive_flag_spec_F77='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
+	  whole_archive_flag_spec_F77='$wl--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
 	  compiler_needs_object_F77=yes
 	  tmp_sharedflag='-G' ;;
 	*Sun\ F*)			# Sun Fortran 8.3
 	  tmp_sharedflag='-G' ;;
 	esac
-	archive_cmds_F77='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+	archive_cmds_F77='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
 
-        if test "x$supports_anon_versioning" = xyes; then
+        if test yes = "$supports_anon_versioning"; then
           archive_expsym_cmds_F77='echo "{ global:" > $output_objdir/$libname.ver~
-	    cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
-	    echo "local: *; };" >> $output_objdir/$libname.ver~
-	    $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
+            cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
+            echo "local: *; };" >> $output_objdir/$libname.ver~
+            $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib'
         fi
 
 	case $cc_basename in
-	xlf*)
+	tcc*)
+	  export_dynamic_flag_spec_F77='-rdynamic'
+	  ;;
+	xlf* | bgf* | bgxlf* | mpixlf*)
 	  # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
 	  whole_archive_flag_spec_F77='--whole-archive$convenience --no-whole-archive'
-	  hardcode_libdir_flag_spec_F77=
-	  hardcode_libdir_flag_spec_ld_F77='-rpath $libdir'
-	  archive_cmds_F77='$LD -shared $libobjs $deplibs $compiler_flags -soname $soname -o $lib'
-	  if test "x$supports_anon_versioning" = xyes; then
+	  hardcode_libdir_flag_spec_F77='$wl-rpath $wl$libdir'
+	  archive_cmds_F77='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib'
+	  if test yes = "$supports_anon_versioning"; then
 	    archive_expsym_cmds_F77='echo "{ global:" > $output_objdir/$libname.ver~
-	      cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
-	      echo "local: *; };" >> $output_objdir/$libname.ver~
-	      $LD -shared $libobjs $deplibs $compiler_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
+              cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
+              echo "local: *; };" >> $output_objdir/$libname.ver~
+              $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
 	  fi
 	  ;;
 	esac
@@ -18843,8 +20525,8 @@ _LT_EOF
 	archive_cmds_F77='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
 	wlarc=
       else
-	archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
-	archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+	archive_cmds_F77='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
+	archive_expsym_cmds_F77='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
       fi
       ;;
 
@@ -18862,8 +20544,8 @@ _LT_EOF
 
 _LT_EOF
       elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
-	archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
-	archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+	archive_cmds_F77='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
+	archive_expsym_cmds_F77='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
       else
 	ld_shlibs_F77=no
       fi
@@ -18875,7 +20557,7 @@ _LT_EOF
 	ld_shlibs_F77=no
 	cat <<_LT_EOF 1>&2
 
-*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
+*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 cannot
 *** reliably create shared libraries on SCO systems.  Therefore, libtool
 *** is disabling shared libraries support.  We urge you to upgrade GNU
 *** binutils to release 2.16.91.0.3 or newer.  Another option is to modify
@@ -18890,9 +20572,9 @@ _LT_EOF
 	  # DT_RUNPATH tag from executables and libraries.  But doing so
 	  # requires that you compile everything twice, which is a pain.
 	  if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
-	    hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir'
-	    archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
-	    archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+	    hardcode_libdir_flag_spec_F77='$wl-rpath $wl$libdir'
+	    archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
+	    archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
 	  else
 	    ld_shlibs_F77=no
 	  fi
@@ -18909,15 +20591,15 @@ _LT_EOF
 
     *)
       if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
-	archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
-	archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+	archive_cmds_F77='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
+	archive_expsym_cmds_F77='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
       else
 	ld_shlibs_F77=no
       fi
       ;;
     esac
 
-    if test "$ld_shlibs_F77" = no; then
+    if test no = "$ld_shlibs_F77"; then
       runpath_var=
       hardcode_libdir_flag_spec_F77=
       export_dynamic_flag_spec_F77=
@@ -18933,7 +20615,7 @@ _LT_EOF
       # Note: this linker hardcodes the directories in LIBPATH if there
       # are no directories specified by -L.
       hardcode_minus_L_F77=yes
-      if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
+      if test yes = "$GCC" && test -z "$lt_prog_compiler_static"; then
 	# Neither direct hardcoding nor static linking is supported with a
 	# broken collect2.
 	hardcode_direct_F77=unsupported
@@ -18941,32 +20623,57 @@ _LT_EOF
       ;;
 
     aix[4-9]*)
-      if test "$host_cpu" = ia64; then
+      if test ia64 = "$host_cpu"; then
 	# On IA64, the linker does run time linking by default, so we don't
 	# have to do anything special.
 	aix_use_runtimelinking=no
 	exp_sym_flag='-Bexport'
-	no_entry_flag=""
+	no_entry_flag=
       else
 	# If we're using GNU nm, then we don't want the "-C" option.
-	# -C means demangle to AIX nm, but means don't demangle with GNU nm
+	# -C means demangle to GNU nm, but means don't demangle to AIX nm.
+	# Without the "-l" option, or with the "-B" option, AIX nm treats
+	# weak defined symbols like other global defined symbols, whereas
+	# GNU nm marks them as "W".
+	# While the 'weak' keyword is ignored in the Export File, we need
+	# it in the Import File for the 'aix-soname' feature, so we have
+	# to replace the "-B" option with "-P" for AIX nm.
 	if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
-	  export_symbols_cmds_F77='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
+	  export_symbols_cmds_F77='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols'
 	else
-	  export_symbols_cmds_F77='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
+	  export_symbols_cmds_F77='`func_echo_all $NM | $SED -e '\''s/B\([^B]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && (substr(\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols'
 	fi
 	aix_use_runtimelinking=no
 
 	# Test if we are trying to use run time linking or normal
 	# AIX style linking. If -brtl is somewhere in LDFLAGS, we
-	# need to do runtime linking.
+	# have runtime linking enabled, and use it for executables.
+	# For shared libraries, we enable/disable runtime linking
+	# depending on the kind of the shared library created -
+	# when "with_aix_soname,aix_use_runtimelinking" is:
+	# "aix,no"   lib.a(lib.so.V) shared, rtl:no,  for executables
+	# "aix,yes"  lib.so          shared, rtl:yes, for executables
+	#            lib.a           static archive
+	# "both,no"  lib.so.V(shr.o) shared, rtl:yes
+	#            lib.a(lib.so.V) shared, rtl:no,  for executables
+	# "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables
+	#            lib.a(lib.so.V) shared, rtl:no
+	# "svr4,*"   lib.so.V(shr.o) shared, rtl:yes, for executables
+	#            lib.a           static archive
 	case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*)
 	  for ld_flag in $LDFLAGS; do
-	  if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
+	  if (test x-brtl = "x$ld_flag" || test x-Wl,-brtl = "x$ld_flag"); then
 	    aix_use_runtimelinking=yes
 	    break
 	  fi
 	  done
+	  if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then
+	    # With aix-soname=svr4, we create the lib.so.V shared archives only,
+	    # so we don't have lib.a shared libs to link our executables.
+	    # We have to force runtime linking in this case.
+	    aix_use_runtimelinking=yes
+	    LDFLAGS="$LDFLAGS -Wl,-brtl"
+	  fi
 	  ;;
 	esac
 
@@ -18985,13 +20692,21 @@ _LT_EOF
       hardcode_direct_absolute_F77=yes
       hardcode_libdir_separator_F77=':'
       link_all_deplibs_F77=yes
-      file_list_spec_F77='${wl}-f,'
+      file_list_spec_F77='$wl-f,'
+      case $with_aix_soname,$aix_use_runtimelinking in
+      aix,*) ;; # traditional, no import file
+      svr4,* | *,yes) # use import file
+	# The Import File defines what to hardcode.
+	hardcode_direct_F77=no
+	hardcode_direct_absolute_F77=no
+	;;
+      esac
 
-      if test "$GCC" = yes; then
+      if test yes = "$GCC"; then
 	case $host_os in aix4.[012]|aix4.[012].*)
 	# We only want to do this on AIX 4.2 and lower, the check
 	# below for broken collect2 doesn't work under 4.3+
-	  collect2name=`${CC} -print-prog-name=collect2`
+	  collect2name=`$CC -print-prog-name=collect2`
 	  if test -f "$collect2name" &&
 	   strings "$collect2name" | $GREP resolve_lib_name >/dev/null
 	  then
@@ -19010,102 +20725,152 @@ _LT_EOF
 	  ;;
 	esac
 	shared_flag='-shared'
-	if test "$aix_use_runtimelinking" = yes; then
-	  shared_flag="$shared_flag "'${wl}-G'
+	if test yes = "$aix_use_runtimelinking"; then
+	  shared_flag="$shared_flag "'$wl-G'
 	fi
+	# Need to ensure runtime linking is disabled for the traditional
+	# shared library, or the linker may eventually find shared libraries
+	# /with/ Import File - we do not want to mix them.
+	shared_flag_aix='-shared'
+	shared_flag_svr4='-shared $wl-G'
       else
 	# not using gcc
-	if test "$host_cpu" = ia64; then
+	if test ia64 = "$host_cpu"; then
 	# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
 	# chokes on -Wl,-G. The following line is correct:
 	  shared_flag='-G'
 	else
-	  if test "$aix_use_runtimelinking" = yes; then
-	    shared_flag='${wl}-G'
+	  if test yes = "$aix_use_runtimelinking"; then
+	    shared_flag='$wl-G'
 	  else
-	    shared_flag='${wl}-bM:SRE'
+	    shared_flag='$wl-bM:SRE'
 	  fi
+	  shared_flag_aix='$wl-bM:SRE'
+	  shared_flag_svr4='$wl-G'
 	fi
       fi
 
-      export_dynamic_flag_spec_F77='${wl}-bexpall'
+      export_dynamic_flag_spec_F77='$wl-bexpall'
       # It seems that -bexpall does not export symbols beginning with
       # underscore (_), so it is better to generate a list of symbols to export.
       always_export_symbols_F77=yes
-      if test "$aix_use_runtimelinking" = yes; then
+      if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then
 	# Warning - without using the other runtime loading flags (-brtl),
 	# -berok will link without error, but may produce a broken library.
 	allow_undefined_flag_F77='-berok'
         # Determine the default libpath from the value encoded in an
         # empty executable.
-        cat > conftest.$ac_ext <<_ACEOF
+        if test set = "${lt_cv_aix_libpath+set}"; then
+  aix_libpath=$lt_cv_aix_libpath
+else
+  if ${lt_cv_aix_libpath__F77+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat > conftest.$ac_ext <<_ACEOF
       program main
 
       end
 _ACEOF
 if ac_fn_f77_try_link "$LINENO"; then :
 
-lt_aix_libpath_sed='
-    /Import File Strings/,/^$/ {
-	/^0/ {
-	    s/^0  *\(.*\)$/\1/
-	    p
-	}
-    }'
-aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
-# Check for a 64-bit object if we didn't find anything.
-if test -z "$aix_libpath"; then
-  aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
-fi
+  lt_aix_libpath_sed='
+      /Import File Strings/,/^$/ {
+	  /^0/ {
+	      s/^0  *\([^ ]*\) *$/\1/
+	      p
+	  }
+      }'
+  lt_cv_aix_libpath__F77=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+  # Check for a 64-bit object if we didn't find anything.
+  if test -z "$lt_cv_aix_libpath__F77"; then
+    lt_cv_aix_libpath__F77=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+  fi
 fi
 rm -f core conftest.err conftest.$ac_objext \
     conftest$ac_exeext conftest.$ac_ext
-if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+  if test -z "$lt_cv_aix_libpath__F77"; then
+    lt_cv_aix_libpath__F77=/usr/lib:/lib
+  fi
+
+fi
+
+  aix_libpath=$lt_cv_aix_libpath__F77
+fi
 
-        hardcode_libdir_flag_spec_F77='${wl}-blibpath:$libdir:'"$aix_libpath"
-        archive_expsym_cmds_F77='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
+        hardcode_libdir_flag_spec_F77='$wl-blibpath:$libdir:'"$aix_libpath"
+        archive_expsym_cmds_F77='$CC -o $output_objdir/$soname $libobjs $deplibs $wl'$no_entry_flag' $compiler_flags `if test -n "$allow_undefined_flag"; then func_echo_all "$wl$allow_undefined_flag"; else :; fi` $wl'$exp_sym_flag:\$export_symbols' '$shared_flag
       else
-	if test "$host_cpu" = ia64; then
-	  hardcode_libdir_flag_spec_F77='${wl}-R $libdir:/usr/lib:/lib'
+	if test ia64 = "$host_cpu"; then
+	  hardcode_libdir_flag_spec_F77='$wl-R $libdir:/usr/lib:/lib'
 	  allow_undefined_flag_F77="-z nodefs"
-	  archive_expsym_cmds_F77="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
+	  archive_expsym_cmds_F77="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\$wl$no_entry_flag"' $compiler_flags $wl$allow_undefined_flag '"\$wl$exp_sym_flag:\$export_symbols"
 	else
 	 # Determine the default libpath from the value encoded in an
 	 # empty executable.
-	 cat > conftest.$ac_ext <<_ACEOF
+	 if test set = "${lt_cv_aix_libpath+set}"; then
+  aix_libpath=$lt_cv_aix_libpath
+else
+  if ${lt_cv_aix_libpath__F77+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat > conftest.$ac_ext <<_ACEOF
       program main
 
       end
 _ACEOF
 if ac_fn_f77_try_link "$LINENO"; then :
 
-lt_aix_libpath_sed='
-    /Import File Strings/,/^$/ {
-	/^0/ {
-	    s/^0  *\(.*\)$/\1/
-	    p
-	}
-    }'
-aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
-# Check for a 64-bit object if we didn't find anything.
-if test -z "$aix_libpath"; then
-  aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
-fi
+  lt_aix_libpath_sed='
+      /Import File Strings/,/^$/ {
+	  /^0/ {
+	      s/^0  *\([^ ]*\) *$/\1/
+	      p
+	  }
+      }'
+  lt_cv_aix_libpath__F77=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+  # Check for a 64-bit object if we didn't find anything.
+  if test -z "$lt_cv_aix_libpath__F77"; then
+    lt_cv_aix_libpath__F77=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+  fi
 fi
 rm -f core conftest.err conftest.$ac_objext \
     conftest$ac_exeext conftest.$ac_ext
-if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+  if test -z "$lt_cv_aix_libpath__F77"; then
+    lt_cv_aix_libpath__F77=/usr/lib:/lib
+  fi
+
+fi
 
-	 hardcode_libdir_flag_spec_F77='${wl}-blibpath:$libdir:'"$aix_libpath"
+  aix_libpath=$lt_cv_aix_libpath__F77
+fi
+
+	 hardcode_libdir_flag_spec_F77='$wl-blibpath:$libdir:'"$aix_libpath"
 	  # Warning - without using the other run time loading flags,
 	  # -berok will link without error, but may produce a broken library.
-	  no_undefined_flag_F77=' ${wl}-bernotok'
-	  allow_undefined_flag_F77=' ${wl}-berok'
-	  # Exported symbols can be pulled into shared objects from archives
-	  whole_archive_flag_spec_F77='$convenience'
+	  no_undefined_flag_F77=' $wl-bernotok'
+	  allow_undefined_flag_F77=' $wl-berok'
+	  if test yes = "$with_gnu_ld"; then
+	    # We only use this code for GNU lds that support --whole-archive.
+	    whole_archive_flag_spec_F77='$wl--whole-archive$convenience $wl--no-whole-archive'
+	  else
+	    # Exported symbols can be pulled into shared objects from archives
+	    whole_archive_flag_spec_F77='$convenience'
+	  fi
 	  archive_cmds_need_lc_F77=yes
-	  # This is similar to how AIX traditionally builds its shared libraries.
-	  archive_expsym_cmds_F77="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
+	  archive_expsym_cmds_F77='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d'
+	  # -brtl affects multiple linker settings, -berok does not and is overridden later
+	  compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([, ]\\)%-berok\\1%g"`'
+	  if test svr4 != "$with_aix_soname"; then
+	    # This is similar to how AIX traditionally builds its shared libraries.
+	    archive_expsym_cmds_F77="$archive_expsym_cmds_F77"'~$CC '$shared_flag_aix' -o $output_objdir/$realname.d/$soname $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$realname.d/$soname'
+	  fi
+	  if test aix != "$with_aix_soname"; then
+	    archive_expsym_cmds_F77="$archive_expsym_cmds_F77"'~$CC '$shared_flag_svr4' -o $output_objdir/$realname.d/$shared_archive_member_spec.o $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$STRIP -e $output_objdir/$realname.d/$shared_archive_member_spec.o~( func_echo_all "#! $soname($shared_archive_member_spec.o)"; if test shr_64 = "$shared_archive_member_spec"; then func_echo_all "# 64"; else func_echo_all "# 32"; fi; cat $export_symb [...]
+	  else
+	    # used by -dlpreopen to get the symbols
+	    archive_expsym_cmds_F77="$archive_expsym_cmds_F77"'~$MV  $output_objdir/$realname.d/$soname $output_objdir'
+	  fi
+	  archive_expsym_cmds_F77="$archive_expsym_cmds_F77"'~$RM -r $output_objdir/$realname.d'
 	fi
       fi
       ;;
@@ -19114,7 +20879,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
       case $host_cpu in
       powerpc)
             # see comment about AmigaOS4 .so support
-            archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+            archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
             archive_expsym_cmds_F77=''
         ;;
       m68k)
@@ -19134,20 +20899,65 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
       # Microsoft Visual C++.
       # hardcode_libdir_flag_spec is actually meaningless, as there is
       # no search path for DLLs.
-      hardcode_libdir_flag_spec_F77=' '
-      allow_undefined_flag_F77=unsupported
-      # Tell ltmain to make .lib files, not .a files.
-      libext=lib
-      # Tell ltmain to make .dll files, not .so files.
-      shrext_cmds=".dll"
-      # FIXME: Setting linknames here is a bad hack.
-      archive_cmds_F77='$CC -o $lib $libobjs $compiler_flags `$ECHO "X$deplibs" | $Xsed -e '\''s/ -lc$//'\''` -link -dll~linknames='
-      # The linker will automatically build a .lib file if we build a DLL.
-      old_archive_from_new_cmds_F77='true'
-      # FIXME: Should let the user specify the lib program.
-      old_archive_cmds_F77='lib -OUT:$oldlib$oldobjs$old_deplibs'
-      fix_srcfile_path_F77='`cygpath -w "$srcfile"`'
-      enable_shared_with_static_runtimes_F77=yes
+      case $cc_basename in
+      cl*)
+	# Native MSVC
+	hardcode_libdir_flag_spec_F77=' '
+	allow_undefined_flag_F77=unsupported
+	always_export_symbols_F77=yes
+	file_list_spec_F77='@'
+	# Tell ltmain to make .lib files, not .a files.
+	libext=lib
+	# Tell ltmain to make .dll files, not .so files.
+	shrext_cmds=.dll
+	# FIXME: Setting linknames here is a bad hack.
+	archive_cmds_F77='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames='
+	archive_expsym_cmds_F77='if   test DEF = "`$SED -n     -e '\''s/^[	 ]*//'\''     -e '\''/^\(;.*\)*$/d'\''     -e '\''s/^\(EXPORTS\|LIBRARY\)\([	 ].*\)*$/DEF/p'\''     -e q     $export_symbols`" ; then
+            cp "$export_symbols" "$output_objdir/$soname.def";
+            echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp";
+          else
+            $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp;
+          fi~
+          $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
+          linknames='
+	# The linker will not automatically build a static lib if we build a DLL.
+	# _LT_TAGVAR(old_archive_from_new_cmds, F77)='true'
+	enable_shared_with_static_runtimes_F77=yes
+	exclude_expsyms_F77='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
+	export_symbols_cmds_F77='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1,DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols'
+	# Don't use ranlib
+	old_postinstall_cmds_F77='chmod 644 $oldlib'
+	postlink_cmds_F77='lt_outputfile="@OUTPUT@"~
+          lt_tool_outputfile="@TOOL_OUTPUT@"~
+          case $lt_outputfile in
+            *.exe|*.EXE) ;;
+            *)
+              lt_outputfile=$lt_outputfile.exe
+              lt_tool_outputfile=$lt_tool_outputfile.exe
+              ;;
+          esac~
+          if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then
+            $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
+            $RM "$lt_outputfile.manifest";
+          fi'
+	;;
+      *)
+	# Assume MSVC wrapper
+	hardcode_libdir_flag_spec_F77=' '
+	allow_undefined_flag_F77=unsupported
+	# Tell ltmain to make .lib files, not .a files.
+	libext=lib
+	# Tell ltmain to make .dll files, not .so files.
+	shrext_cmds=.dll
+	# FIXME: Setting linknames here is a bad hack.
+	archive_cmds_F77='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames='
+	# The linker will automatically build a .lib file if we build a DLL.
+	old_archive_from_new_cmds_F77='true'
+	# FIXME: Should let the user specify the lib program.
+	old_archive_cmds_F77='lib -OUT:$oldlib$oldobjs$old_deplibs'
+	enable_shared_with_static_runtimes_F77=yes
+	;;
+      esac
       ;;
 
     darwin* | rhapsody*)
@@ -19157,19 +20967,24 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
   hardcode_direct_F77=no
   hardcode_automatic_F77=yes
   hardcode_shlibpath_var_F77=unsupported
-  whole_archive_flag_spec_F77=''
+  if test yes = "$lt_cv_ld_force_load"; then
+    whole_archive_flag_spec_F77='`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience $wl-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`'
+    compiler_needs_object_F77=yes
+  else
+    whole_archive_flag_spec_F77=''
+  fi
   link_all_deplibs_F77=yes
-  allow_undefined_flag_F77="$_lt_dar_allow_undefined"
+  allow_undefined_flag_F77=$_lt_dar_allow_undefined
   case $cc_basename in
-     ifort*) _lt_dar_can_shared=yes ;;
+     ifort*|nagfor*) _lt_dar_can_shared=yes ;;
      *) _lt_dar_can_shared=$GCC ;;
   esac
-  if test "$_lt_dar_can_shared" = "yes"; then
-    output_verbose_link_cmd=echo
-    archive_cmds_F77="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}"
-    module_cmds_F77="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
-    archive_expsym_cmds_F77="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}"
-    module_expsym_cmds_F77="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}"
+  if test yes = "$_lt_dar_can_shared"; then
+    output_verbose_link_cmd=func_echo_all
+    archive_cmds_F77="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dsymutil"
+    module_cmds_F77="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil"
+    archive_expsym_cmds_F77="sed 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dar_export_syms$_lt_dsymutil"
+    module_expsym_cmds_F77="sed -e 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dar_export_syms$_lt_dsymutil"
 
   else
   ld_shlibs_F77=no
@@ -19183,10 +20998,6 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
       hardcode_shlibpath_var_F77=no
       ;;
 
-    freebsd1*)
-      ld_shlibs_F77=no
-      ;;
-
     # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
     # support.  Future versions do this automatically, but an explicit c++rt0.o
     # does not break anything, and helps significantly (at the cost of a little
@@ -19199,7 +21010,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
       ;;
 
     # Unfortunately, older versions of FreeBSD 2 do not have this feature.
-    freebsd2*)
+    freebsd2.*)
       archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
       hardcode_direct_F77=yes
       hardcode_minus_L_F77=yes
@@ -19208,41 +21019,40 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
 
     # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
     freebsd* | dragonfly*)
-      archive_cmds_F77='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
+      archive_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
       hardcode_libdir_flag_spec_F77='-R$libdir'
       hardcode_direct_F77=yes
       hardcode_shlibpath_var_F77=no
       ;;
 
     hpux9*)
-      if test "$GCC" = yes; then
-	archive_cmds_F77='$RM $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+      if test yes = "$GCC"; then
+	archive_cmds_F77='$RM $output_objdir/$soname~$CC -shared $pic_flag $wl+b $wl$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib'
       else
-	archive_cmds_F77='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+	archive_cmds_F77='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib'
       fi
-      hardcode_libdir_flag_spec_F77='${wl}+b ${wl}$libdir'
+      hardcode_libdir_flag_spec_F77='$wl+b $wl$libdir'
       hardcode_libdir_separator_F77=:
       hardcode_direct_F77=yes
 
       # hardcode_minus_L: Not really in the search PATH,
       # but as the default location of the library.
       hardcode_minus_L_F77=yes
-      export_dynamic_flag_spec_F77='${wl}-E'
+      export_dynamic_flag_spec_F77='$wl-E'
       ;;
 
     hpux10*)
-      if test "$GCC" = yes -a "$with_gnu_ld" = no; then
-	archive_cmds_F77='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+      if test yes,no = "$GCC,$with_gnu_ld"; then
+	archive_cmds_F77='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
       else
 	archive_cmds_F77='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
       fi
-      if test "$with_gnu_ld" = no; then
-	hardcode_libdir_flag_spec_F77='${wl}+b ${wl}$libdir'
-	hardcode_libdir_flag_spec_ld_F77='+b $libdir'
+      if test no = "$with_gnu_ld"; then
+	hardcode_libdir_flag_spec_F77='$wl+b $wl$libdir'
 	hardcode_libdir_separator_F77=:
 	hardcode_direct_F77=yes
 	hardcode_direct_absolute_F77=yes
-	export_dynamic_flag_spec_F77='${wl}-E'
+	export_dynamic_flag_spec_F77='$wl-E'
 	# hardcode_minus_L: Not really in the search PATH,
 	# but as the default location of the library.
 	hardcode_minus_L_F77=yes
@@ -19250,33 +21060,33 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
       ;;
 
     hpux11*)
-      if test "$GCC" = yes -a "$with_gnu_ld" = no; then
+      if test yes,no = "$GCC,$with_gnu_ld"; then
 	case $host_cpu in
 	hppa*64*)
-	  archive_cmds_F77='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+	  archive_cmds_F77='$CC -shared $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
 	  ;;
 	ia64*)
-	  archive_cmds_F77='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
+	  archive_cmds_F77='$CC -shared $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
 	  ;;
 	*)
-	  archive_cmds_F77='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+	  archive_cmds_F77='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
 	  ;;
 	esac
       else
 	case $host_cpu in
 	hppa*64*)
-	  archive_cmds_F77='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+	  archive_cmds_F77='$CC -b $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
 	  ;;
 	ia64*)
-	  archive_cmds_F77='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
+	  archive_cmds_F77='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
 	  ;;
 	*)
-	  archive_cmds_F77='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+	archive_cmds_F77='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
 	  ;;
 	esac
       fi
-      if test "$with_gnu_ld" = no; then
-	hardcode_libdir_flag_spec_F77='${wl}+b ${wl}$libdir'
+      if test no = "$with_gnu_ld"; then
+	hardcode_libdir_flag_spec_F77='$wl+b $wl$libdir'
 	hardcode_libdir_separator_F77=:
 
 	case $host_cpu in
@@ -19287,7 +21097,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
 	*)
 	  hardcode_direct_F77=yes
 	  hardcode_direct_absolute_F77=yes
-	  export_dynamic_flag_spec_F77='${wl}-E'
+	  export_dynamic_flag_spec_F77='$wl-E'
 
 	  # hardcode_minus_L: Not really in the search PATH,
 	  # but as the default location of the library.
@@ -19298,34 +21108,59 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
       ;;
 
     irix5* | irix6* | nonstopux*)
-      if test "$GCC" = yes; then
-	archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+      if test yes = "$GCC"; then
+	archive_cmds_F77='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib'
 	# Try to use the -exported_symbol ld option, if it does not
 	# work, assume that -exports_file does not work either and
 	# implicitly export all symbols.
-        save_LDFLAGS="$LDFLAGS"
-        LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null"
-        cat > conftest.$ac_ext <<_ACEOF
-int foo(void) {}
+	# This should be the same for all languages, so no per-tag cache variable.
+	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $host_os linker accepts -exported_symbol" >&5
+$as_echo_n "checking whether the $host_os linker accepts -exported_symbol... " >&6; }
+if ${lt_cv_irix_exported_symbol+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  save_LDFLAGS=$LDFLAGS
+	   LDFLAGS="$LDFLAGS -shared $wl-exported_symbol ${wl}foo $wl-update_registry $wl/dev/null"
+	   cat > conftest.$ac_ext <<_ACEOF
+
+      subroutine foo
+      end
 _ACEOF
 if ac_fn_f77_try_link "$LINENO"; then :
-  archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib'
-
+  lt_cv_irix_exported_symbol=yes
+else
+  lt_cv_irix_exported_symbol=no
 fi
 rm -f core conftest.err conftest.$ac_objext \
     conftest$ac_exeext conftest.$ac_ext
-        LDFLAGS="$save_LDFLAGS"
+           LDFLAGS=$save_LDFLAGS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_irix_exported_symbol" >&5
+$as_echo "$lt_cv_irix_exported_symbol" >&6; }
+	if test yes = "$lt_cv_irix_exported_symbol"; then
+          archive_expsym_cmds_F77='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations $wl-exports_file $wl$export_symbols -o $lib'
+	fi
       else
-	archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
-	archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib'
+	archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib'
+	archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -exports_file $export_symbols -o $lib'
       fi
       archive_cmds_need_lc_F77='no'
-      hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir'
+      hardcode_libdir_flag_spec_F77='$wl-rpath $wl$libdir'
       hardcode_libdir_separator_F77=:
       inherit_rpath_F77=yes
       link_all_deplibs_F77=yes
       ;;
 
+    linux*)
+      case $cc_basename in
+      tcc*)
+	# Fabrice Bellard et al's Tiny C Compiler
+	ld_shlibs_F77=yes
+	archive_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
+	;;
+      esac
+      ;;
+
     netbsd*)
       if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
 	archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
@@ -19340,7 +21175,7 @@ rm -f core conftest.err conftest.$ac_objext \
     newsos6)
       archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
       hardcode_direct_F77=yes
-      hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir'
+      hardcode_libdir_flag_spec_F77='$wl-rpath $wl$libdir'
       hardcode_libdir_separator_F77=:
       hardcode_shlibpath_var_F77=no
       ;;
@@ -19348,27 +21183,19 @@ rm -f core conftest.err conftest.$ac_objext \
     *nto* | *qnx*)
       ;;
 
-    openbsd*)
+    openbsd* | bitrig*)
       if test -f /usr/libexec/ld.so; then
 	hardcode_direct_F77=yes
 	hardcode_shlibpath_var_F77=no
 	hardcode_direct_absolute_F77=yes
-	if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+	if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
 	  archive_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
-	  archive_expsym_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
-	  hardcode_libdir_flag_spec_F77='${wl}-rpath,$libdir'
-	  export_dynamic_flag_spec_F77='${wl}-E'
+	  archive_expsym_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags $wl-retain-symbols-file,$export_symbols'
+	  hardcode_libdir_flag_spec_F77='$wl-rpath,$libdir'
+	  export_dynamic_flag_spec_F77='$wl-E'
 	else
-	  case $host_os in
-	   openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
-	     archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
-	     hardcode_libdir_flag_spec_F77='-R$libdir'
-	     ;;
-	   *)
-	     archive_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
-	     hardcode_libdir_flag_spec_F77='${wl}-rpath,$libdir'
-	     ;;
-	  esac
+	  archive_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
+	  hardcode_libdir_flag_spec_F77='$wl-rpath,$libdir'
 	fi
       else
 	ld_shlibs_F77=no
@@ -19379,33 +21206,53 @@ rm -f core conftest.err conftest.$ac_objext \
       hardcode_libdir_flag_spec_F77='-L$libdir'
       hardcode_minus_L_F77=yes
       allow_undefined_flag_F77=unsupported
-      archive_cmds_F77='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$ECHO DATA >> $output_objdir/$libname.def~$ECHO " SINGLE NONSHARED" >> $output_objdir/$libname.def~$ECHO EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def'
-      old_archive_from_new_cmds_F77='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
+      shrext_cmds=.dll
+      archive_cmds_F77='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
+	$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
+	$ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
+	$ECHO EXPORTS >> $output_objdir/$libname.def~
+	emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
+	$CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
+	emximp -o $lib $output_objdir/$libname.def'
+      archive_expsym_cmds_F77='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
+	$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
+	$ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
+	$ECHO EXPORTS >> $output_objdir/$libname.def~
+	prefix_cmds="$SED"~
+	if test EXPORTS = "`$SED 1q $export_symbols`"; then
+	  prefix_cmds="$prefix_cmds -e 1d";
+	fi~
+	prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
+	cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
+	$CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
+	emximp -o $lib $output_objdir/$libname.def'
+      old_archive_From_new_cmds_F77='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
+      enable_shared_with_static_runtimes_F77=yes
       ;;
 
     osf3*)
-      if test "$GCC" = yes; then
-	allow_undefined_flag_F77=' ${wl}-expect_unresolved ${wl}\*'
-	archive_cmds_F77='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+      if test yes = "$GCC"; then
+	allow_undefined_flag_F77=' $wl-expect_unresolved $wl\*'
+	archive_cmds_F77='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib'
       else
 	allow_undefined_flag_F77=' -expect_unresolved \*'
-	archive_cmds_F77='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
+	archive_cmds_F77='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib'
       fi
       archive_cmds_need_lc_F77='no'
-      hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir'
+      hardcode_libdir_flag_spec_F77='$wl-rpath $wl$libdir'
       hardcode_libdir_separator_F77=:
       ;;
 
     osf4* | osf5*)	# as osf3* with the addition of -msym flag
-      if test "$GCC" = yes; then
-	allow_undefined_flag_F77=' ${wl}-expect_unresolved ${wl}\*'
-	archive_cmds_F77='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
-	hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir'
+      if test yes = "$GCC"; then
+	allow_undefined_flag_F77=' $wl-expect_unresolved $wl\*'
+	archive_cmds_F77='$CC -shared$allow_undefined_flag $pic_flag $libobjs $deplibs $compiler_flags $wl-msym $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib'
+	hardcode_libdir_flag_spec_F77='$wl-rpath $wl$libdir'
       else
 	allow_undefined_flag_F77=' -expect_unresolved \*'
-	archive_cmds_F77='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
+	archive_cmds_F77='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib'
 	archive_expsym_cmds_F77='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~
-	$CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp'
+          $CC -shared$allow_undefined_flag $wl-input $wl$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib~$RM $lib.exp'
 
 	# Both c and cxx compiler support -rpath directly
 	hardcode_libdir_flag_spec_F77='-rpath $libdir'
@@ -19416,24 +21263,24 @@ rm -f core conftest.err conftest.$ac_objext \
 
     solaris*)
       no_undefined_flag_F77=' -z defs'
-      if test "$GCC" = yes; then
-	wlarc='${wl}'
-	archive_cmds_F77='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+      if test yes = "$GCC"; then
+	wlarc='$wl'
+	archive_cmds_F77='$CC -shared $pic_flag $wl-z ${wl}text $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
 	archive_expsym_cmds_F77='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
-	  $CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
+          $CC -shared $pic_flag $wl-z ${wl}text $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
       else
 	case `$CC -V 2>&1` in
 	*"Compilers 5.0"*)
 	  wlarc=''
-	  archive_cmds_F77='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
+	  archive_cmds_F77='$LD -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $linker_flags'
 	  archive_expsym_cmds_F77='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
-	  $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
+            $LD -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
 	  ;;
 	*)
-	  wlarc='${wl}'
-	  archive_cmds_F77='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags'
+	  wlarc='$wl'
+	  archive_cmds_F77='$CC -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $compiler_flags'
 	  archive_expsym_cmds_F77='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
-	  $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
+            $CC -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
 	  ;;
 	esac
       fi
@@ -19443,11 +21290,11 @@ rm -f core conftest.err conftest.$ac_objext \
       solaris2.[0-5] | solaris2.[0-5].*) ;;
       *)
 	# The compiler driver will combine and reorder linker options,
-	# but understands `-z linker_flag'.  GCC discards it without `$wl',
+	# but understands '-z linker_flag'.  GCC discards it without '$wl',
 	# but is careful enough not to reorder.
 	# Supported since Solaris 2.6 (maybe 2.5.1?)
-	if test "$GCC" = yes; then
-	  whole_archive_flag_spec_F77='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
+	if test yes = "$GCC"; then
+	  whole_archive_flag_spec_F77='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract'
 	else
 	  whole_archive_flag_spec_F77='-z allextract$convenience -z defaultextract'
 	fi
@@ -19457,10 +21304,10 @@ rm -f core conftest.err conftest.$ac_objext \
       ;;
 
     sunos4*)
-      if test "x$host_vendor" = xsequent; then
+      if test sequent = "$host_vendor"; then
 	# Use $CC to link under sequent, because it throws in some extra .o
 	# files that make .init and .fini sections work.
-	archive_cmds_F77='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
+	archive_cmds_F77='$CC -G $wl-h $soname -o $lib $libobjs $deplibs $compiler_flags'
       else
 	archive_cmds_F77='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
       fi
@@ -19509,43 +21356,43 @@ rm -f core conftest.err conftest.$ac_objext \
       ;;
 
     sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*)
-      no_undefined_flag_F77='${wl}-z,text'
+      no_undefined_flag_F77='$wl-z,text'
       archive_cmds_need_lc_F77=no
       hardcode_shlibpath_var_F77=no
       runpath_var='LD_RUN_PATH'
 
-      if test "$GCC" = yes; then
-	archive_cmds_F77='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
-	archive_expsym_cmds_F77='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+      if test yes = "$GCC"; then
+	archive_cmds_F77='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	archive_expsym_cmds_F77='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
       else
-	archive_cmds_F77='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
-	archive_expsym_cmds_F77='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	archive_cmds_F77='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	archive_expsym_cmds_F77='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
       fi
       ;;
 
     sysv5* | sco3.2v5* | sco5v6*)
-      # Note: We can NOT use -z defs as we might desire, because we do not
+      # Note: We CANNOT use -z defs as we might desire, because we do not
       # link with -lc, and that would cause any symbols used from libc to
       # always be unresolved, which means just about no library would
       # ever link correctly.  If we're not using GNU ld we use -z text
       # though, which does catch some bad symbols but isn't as heavy-handed
       # as -z defs.
-      no_undefined_flag_F77='${wl}-z,text'
-      allow_undefined_flag_F77='${wl}-z,nodefs'
+      no_undefined_flag_F77='$wl-z,text'
+      allow_undefined_flag_F77='$wl-z,nodefs'
       archive_cmds_need_lc_F77=no
       hardcode_shlibpath_var_F77=no
-      hardcode_libdir_flag_spec_F77='${wl}-R,$libdir'
+      hardcode_libdir_flag_spec_F77='$wl-R,$libdir'
       hardcode_libdir_separator_F77=':'
       link_all_deplibs_F77=yes
-      export_dynamic_flag_spec_F77='${wl}-Bexport'
+      export_dynamic_flag_spec_F77='$wl-Bexport'
       runpath_var='LD_RUN_PATH'
 
-      if test "$GCC" = yes; then
-	archive_cmds_F77='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
-	archive_expsym_cmds_F77='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+      if test yes = "$GCC"; then
+	archive_cmds_F77='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	archive_expsym_cmds_F77='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
       else
-	archive_cmds_F77='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
-	archive_expsym_cmds_F77='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	archive_cmds_F77='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	archive_expsym_cmds_F77='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
       fi
       ;;
 
@@ -19560,10 +21407,10 @@ rm -f core conftest.err conftest.$ac_objext \
       ;;
     esac
 
-    if test x$host_vendor = xsni; then
+    if test sni = "$host_vendor"; then
       case $host in
       sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
-	export_dynamic_flag_spec_F77='${wl}-Blargedynsym'
+	export_dynamic_flag_spec_F77='$wl-Blargedynsym'
 	;;
       esac
     fi
@@ -19571,7 +21418,7 @@ rm -f core conftest.err conftest.$ac_objext \
 
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs_F77" >&5
 $as_echo "$ld_shlibs_F77" >&6; }
-test "$ld_shlibs_F77" = no && can_build_shared=no
+test no = "$ld_shlibs_F77" && can_build_shared=no
 
 with_gnu_ld_F77=$with_gnu_ld
 
@@ -19588,7 +21435,7 @@ x|xyes)
   # Assume -lc should be added
   archive_cmds_need_lc_F77=yes
 
-  if test "$enable_shared" = yes && test "$GCC" = yes; then
+  if test yes,yes = "$GCC,$enable_shared"; then
     case $archive_cmds_F77 in
     *'~'*)
       # FIXME: we may have to deal with multi-command sequences.
@@ -19599,44 +21446,50 @@ x|xyes)
       # to ld, don't add -lc before -lgcc.
       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5
 $as_echo_n "checking whether -lc should be explicitly linked in... " >&6; }
-      $RM conftest*
-      echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+if ${lt_cv_archive_cmds_need_lc_F77+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  $RM conftest*
+	echo "$lt_simple_compile_test_code" > conftest.$ac_ext
 
-      if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
+	if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   test $ac_status = 0; } 2>conftest.err; then
-        soname=conftest
-        lib=conftest
-        libobjs=conftest.$ac_objext
-        deplibs=
-        wl=$lt_prog_compiler_wl_F77
-	pic_flag=$lt_prog_compiler_pic_F77
-        compiler_flags=-v
-        linker_flags=-v
-        verstring=
-        output_objdir=.
-        libname=conftest
-        lt_save_allow_undefined_flag=$allow_undefined_flag_F77
-        allow_undefined_flag_F77=
-        if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds_F77 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5
+	  soname=conftest
+	  lib=conftest
+	  libobjs=conftest.$ac_objext
+	  deplibs=
+	  wl=$lt_prog_compiler_wl_F77
+	  pic_flag=$lt_prog_compiler_pic_F77
+	  compiler_flags=-v
+	  linker_flags=-v
+	  verstring=
+	  output_objdir=.
+	  libname=conftest
+	  lt_save_allow_undefined_flag=$allow_undefined_flag_F77
+	  allow_undefined_flag_F77=
+	  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds_F77 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5
   (eval $archive_cmds_F77 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5
   ac_status=$?
   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   test $ac_status = 0; }
-        then
-	  archive_cmds_need_lc_F77=no
-        else
-	  archive_cmds_need_lc_F77=yes
-        fi
-        allow_undefined_flag_F77=$lt_save_allow_undefined_flag
-      else
-        cat conftest.err 1>&5
-      fi
-      $RM conftest*
-      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $archive_cmds_need_lc_F77" >&5
-$as_echo "$archive_cmds_need_lc_F77" >&6; }
+	  then
+	    lt_cv_archive_cmds_need_lc_F77=no
+	  else
+	    lt_cv_archive_cmds_need_lc_F77=yes
+	  fi
+	  allow_undefined_flag_F77=$lt_save_allow_undefined_flag
+	else
+	  cat conftest.err 1>&5
+	fi
+	$RM conftest*
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc_F77" >&5
+$as_echo "$lt_cv_archive_cmds_need_lc_F77" >&6; }
+      archive_cmds_need_lc_F77=$lt_cv_archive_cmds_need_lc_F77
       ;;
     esac
   fi
@@ -19704,15 +21557,13 @@ esac
 
 
 
-
-
     { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5
 $as_echo_n "checking dynamic linker characteristics... " >&6; }
 
 library_names_spec=
 libname_spec='lib$name'
 soname_spec=
-shrext_cmds=".so"
+shrext_cmds=.so
 postinstall_cmds=
 postuninstall_cmds=
 finish_cmds=
@@ -19729,56 +21580,108 @@ hardcode_into_libs=no
 # flags to be left without arguments
 need_version=unknown
 
+
+
 case $host_os in
 aix3*)
-  version_type=linux
-  library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
+  version_type=linux # correct to gnu/linux during the next big refactor
+  library_names_spec='$libname$release$shared_ext$versuffix $libname.a'
   shlibpath_var=LIBPATH
 
   # AIX 3 has no versioning support, so we append a major version to the name.
-  soname_spec='${libname}${release}${shared_ext}$major'
+  soname_spec='$libname$release$shared_ext$major'
   ;;
 
 aix[4-9]*)
-  version_type=linux
+  version_type=linux # correct to gnu/linux during the next big refactor
   need_lib_prefix=no
   need_version=no
   hardcode_into_libs=yes
-  if test "$host_cpu" = ia64; then
+  if test ia64 = "$host_cpu"; then
     # AIX 5 supports IA64
-    library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
+    library_names_spec='$libname$release$shared_ext$major $libname$release$shared_ext$versuffix $libname$shared_ext'
     shlibpath_var=LD_LIBRARY_PATH
   else
     # With GCC up to 2.95.x, collect2 would create an import file
     # for dependence libraries.  The import file would start with
-    # the line `#! .'.  This would cause the generated library to
-    # depend on `.', always an invalid library.  This was fixed in
+    # the line '#! .'.  This would cause the generated library to
+    # depend on '.', always an invalid library.  This was fixed in
     # development snapshots of GCC prior to 3.0.
     case $host_os in
       aix4 | aix4.[01] | aix4.[01].*)
       if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
 	   echo ' yes '
-	   echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then
+	   echo '#endif'; } | $CC -E - | $GREP yes > /dev/null; then
 	:
       else
 	can_build_shared=no
       fi
       ;;
     esac
-    # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
+    # Using Import Files as archive members, it is possible to support
+    # filename-based versioning of shared library archives on AIX. While
+    # this would work for both with and without runtime linking, it will
+    # prevent static linking of such archives. So we do filename-based
+    # shared library versioning with .so extension only, which is used
+    # when both runtime linking and shared linking is enabled.
+    # Unfortunately, runtime linking may impact performance, so we do
+    # not want this to be the default eventually. Also, we use the
+    # versioned .so libs for executables only if there is the -brtl
+    # linker flag in LDFLAGS as well, or --with-aix-soname=svr4 only.
+    # To allow for filename-based versioning support, we need to create
+    # libNAME.so.V as an archive file, containing:
+    # *) an Import File, referring to the versioned filename of the
+    #    archive as well as the shared archive member, telling the
+    #    bitwidth (32 or 64) of that shared object, and providing the
+    #    list of exported symbols of that shared object, eventually
+    #    decorated with the 'weak' keyword
+    # *) the shared object with the F_LOADONLY flag set, to really avoid
+    #    it being seen by the linker.
+    # At run time we better use the real file rather than another symlink,
+    # but for link time we create the symlink libNAME.so -> libNAME.so.V
+
+    case $with_aix_soname,$aix_use_runtimelinking in
+    # AIX (on Power*) has no versioning support, so currently we cannot hardcode correct
     # soname into executable. Probably we can add versioning support to
     # collect2, so additional links can be useful in future.
-    if test "$aix_use_runtimelinking" = yes; then
+    aix,yes) # traditional libtool
+      dynamic_linker='AIX unversionable lib.so'
       # If using run time linking (on AIX 4.2 or later) use lib<name>.so
       # instead of lib<name>.a to let people know that these are not
       # typical AIX shared libraries.
-      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-    else
+      library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+      ;;
+    aix,no) # traditional AIX only
+      dynamic_linker='AIX lib.a(lib.so.V)'
       # We preserve .a as extension for shared libraries through AIX4.2
       # and later when we are not doing run time linking.
-      library_names_spec='${libname}${release}.a $libname.a'
-      soname_spec='${libname}${release}${shared_ext}$major'
-    fi
+      library_names_spec='$libname$release.a $libname.a'
+      soname_spec='$libname$release$shared_ext$major'
+      ;;
+    svr4,*) # full svr4 only
+      dynamic_linker="AIX lib.so.V($shared_archive_member_spec.o)"
+      library_names_spec='$libname$release$shared_ext$major $libname$shared_ext'
+      # We do not specify a path in Import Files, so LIBPATH fires.
+      shlibpath_overrides_runpath=yes
+      ;;
+    *,yes) # both, prefer svr4
+      dynamic_linker="AIX lib.so.V($shared_archive_member_spec.o), lib.a(lib.so.V)"
+      library_names_spec='$libname$release$shared_ext$major $libname$shared_ext'
+      # unpreferred sharedlib libNAME.a needs extra handling
+      postinstall_cmds='test -n "$linkname" || linkname="$realname"~func_stripname "" ".so" "$linkname"~$install_shared_prog "$dir/$func_stripname_result.$libext" "$destdir/$func_stripname_result.$libext"~test -z "$tstripme" || test -z "$striplib" || $striplib "$destdir/$func_stripname_result.$libext"'
+      postuninstall_cmds='for n in $library_names $old_library; do :; done~func_stripname "" ".so" "$n"~test "$func_stripname_result" = "$n" || func_append rmfiles " $odir/$func_stripname_result.$libext"'
+      # We do not specify a path in Import Files, so LIBPATH fires.
+      shlibpath_overrides_runpath=yes
+      ;;
+    *,no) # both, prefer aix
+      dynamic_linker="AIX lib.a(lib.so.V), lib.so.V($shared_archive_member_spec.o)"
+      library_names_spec='$libname$release.a $libname.a'
+      soname_spec='$libname$release$shared_ext$major'
+      # unpreferred sharedlib libNAME.so.V and symlink libNAME.so need extra handling
+      postinstall_cmds='test -z "$dlname" || $install_shared_prog $dir/$dlname $destdir/$dlname~test -z "$tstripme" || test -z "$striplib" || $striplib $destdir/$dlname~test -n "$linkname" || linkname=$realname~func_stripname "" ".a" "$linkname"~(cd "$destdir" && $LN_S -f $dlname $func_stripname_result.so)'
+      postuninstall_cmds='test -z "$dlname" || func_append rmfiles " $odir/$dlname"~for n in $old_library $library_names; do :; done~func_stripname "" ".a" "$n"~func_append rmfiles " $odir/$func_stripname_result.so"'
+      ;;
+    esac
     shlibpath_var=LIBPATH
   fi
   ;;
@@ -19788,27 +21691,27 @@ amigaos*)
   powerpc)
     # Since July 2007 AmigaOS4 officially supports .so libraries.
     # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
-    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
     ;;
   m68k)
     library_names_spec='$libname.ixlibrary $libname.a'
     # Create ${libname}_ixlibrary.a entries in /sys/libs.
-    finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$ECHO "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
+    finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
     ;;
   esac
   ;;
 
 beos*)
-  library_names_spec='${libname}${shared_ext}'
+  library_names_spec='$libname$shared_ext'
   dynamic_linker="$host_os ld.so"
   shlibpath_var=LIBRARY_PATH
   ;;
 
 bsdi[45]*)
-  version_type=linux
+  version_type=linux # correct to gnu/linux during the next big refactor
   need_version=no
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
+  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+  soname_spec='$libname$release$shared_ext$major'
   finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
   shlibpath_var=LD_LIBRARY_PATH
   sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
@@ -19820,16 +21723,17 @@ bsdi[45]*)
 
 cygwin* | mingw* | pw32* | cegcc*)
   version_type=windows
-  shrext_cmds=".dll"
+  shrext_cmds=.dll
   need_version=no
   need_lib_prefix=no
 
-  case $GCC,$host_os in
-  yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*)
+  case $GCC,$cc_basename in
+  yes,*)
+    # gcc
     library_names_spec='$libname.dll.a'
     # DLL is installed to $(libdir)/../bin by postinstall_cmds
-    postinstall_cmds='base_file=`basename \${file}`~
-      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
+    postinstall_cmds='base_file=`basename \$file`~
+      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~
       dldir=$destdir/`dirname \$dlpath`~
       test -d \$dldir || mkdir -p \$dldir~
       $install_prog $dir/$dlname \$dldir/$dlname~
@@ -19845,37 +21749,83 @@ cygwin* | mingw* | pw32* | cegcc*)
     case $host_os in
     cygwin*)
       # Cygwin DLLs use 'cyg' prefix rather than 'lib'
-      soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
-      sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
+      soname_spec='`echo $libname | sed -e 's/^lib/cyg/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
+
       ;;
     mingw* | cegcc*)
       # MinGW DLLs use traditional 'lib' prefix
-      soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
-      sys_lib_search_path_spec=`$CC -print-search-dirs | $GREP "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
+      soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
+      ;;
+    pw32*)
+      # pw32 DLLs use 'pw' prefix rather than 'lib'
+      library_names_spec='`echo $libname | sed -e 's/^lib/pw/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
+      ;;
+    esac
+    dynamic_linker='Win32 ld.exe'
+    ;;
+
+  *,cl*)
+    # Native MSVC
+    libname_spec='$name'
+    soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
+    library_names_spec='$libname.dll.lib'
+
+    case $build_os in
+    mingw*)
+      sys_lib_search_path_spec=
+      lt_save_ifs=$IFS
+      IFS=';'
+      for lt_path in $LIB
+      do
+        IFS=$lt_save_ifs
+        # Let DOS variable expansion print the short 8.3 style file name.
+        lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"`
+        sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path"
+      done
+      IFS=$lt_save_ifs
+      # Convert to MSYS style.
+      sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'`
+      ;;
+    cygwin*)
+      # Convert to unix form, then to dos form, then back to unix form
+      # but this time dos style (no spaces!) so that the unix form looks
+      # like /cygdrive/c/PROGRA~1:/cygdr...
+      sys_lib_search_path_spec=`cygpath --path --unix "$LIB"`
+      sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null`
+      sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
+      ;;
+    *)
+      sys_lib_search_path_spec=$LIB
       if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then
-        # It is most probably a Windows format PATH printed by
-        # mingw gcc, but we are running on Cygwin. Gcc prints its search
-        # path with ; separators, and with drive letters. We can handle the
-        # drive letters (cygwin fileutils understands them), so leave them,
-        # especially as we might pass files found there to a mingw objdump,
-        # which wouldn't understand a cygwinified path. Ahh.
+        # It is most probably a Windows format PATH.
         sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
       else
-        sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
+        sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
       fi
-      ;;
-    pw32*)
-      # pw32 DLLs use 'pw' prefix rather than 'lib'
-      library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
+      # FIXME: find the short name or the path components, as spaces are
+      # common. (e.g. "Program Files" -> "PROGRA~1")
       ;;
     esac
+
+    # DLL is installed to $(libdir)/../bin by postinstall_cmds
+    postinstall_cmds='base_file=`basename \$file`~
+      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~
+      dldir=$destdir/`dirname \$dlpath`~
+      test -d \$dldir || mkdir -p \$dldir~
+      $install_prog $dir/$dlname \$dldir/$dlname'
+    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
+      dlpath=$dir/\$dldll~
+       $RM \$dlpath'
+    shlibpath_overrides_runpath=yes
+    dynamic_linker='Win32 link.exe'
     ;;
 
   *)
-    library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib'
+    # Assume MSVC wrapper
+    library_names_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext $libname.lib'
+    dynamic_linker='Win32 ld.exe'
     ;;
   esac
-  dynamic_linker='Win32 ld.exe'
   # FIXME: first we should search . and the directory the executable is in
   shlibpath_var=PATH
   ;;
@@ -19885,8 +21835,8 @@ darwin* | rhapsody*)
   version_type=darwin
   need_lib_prefix=no
   need_version=no
-  library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext'
-  soname_spec='${libname}${release}${major}$shared_ext'
+  library_names_spec='$libname$release$major$shared_ext $libname$shared_ext'
+  soname_spec='$libname$release$major$shared_ext'
   shlibpath_overrides_runpath=yes
   shlibpath_var=DYLD_LIBRARY_PATH
   shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
@@ -19895,18 +21845,14 @@ darwin* | rhapsody*)
   ;;
 
 dgux*)
-  version_type=linux
+  version_type=linux # correct to gnu/linux during the next big refactor
   need_lib_prefix=no
   need_version=no
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
-  soname_spec='${libname}${release}${shared_ext}$major'
+  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+  soname_spec='$libname$release$shared_ext$major'
   shlibpath_var=LD_LIBRARY_PATH
   ;;
 
-freebsd1*)
-  dynamic_linker=no
-  ;;
-
 freebsd* | dragonfly*)
   # DragonFly does not have aout.  When/if they implement a new
   # versioning mechanism, adjust this.
@@ -19914,25 +21860,26 @@ freebsd* | dragonfly*)
     objformat=`/usr/bin/objformat`
   else
     case $host_os in
-    freebsd[123]*) objformat=aout ;;
+    freebsd[23].*) objformat=aout ;;
     *) objformat=elf ;;
     esac
   fi
   version_type=freebsd-$objformat
   case $version_type in
     freebsd-elf*)
-      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
+      library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+      soname_spec='$libname$release$shared_ext$major'
       need_version=no
       need_lib_prefix=no
       ;;
     freebsd-*)
-      library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
+      library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
       need_version=yes
       ;;
   esac
   shlibpath_var=LD_LIBRARY_PATH
   case $host_os in
-  freebsd2*)
+  freebsd2.*)
     shlibpath_overrides_runpath=yes
     ;;
   freebsd3.[01]* | freebsdelf3.[01]*)
@@ -19951,13 +21898,16 @@ freebsd* | dragonfly*)
   esac
   ;;
 
-gnu*)
-  version_type=linux
+haiku*)
+  version_type=linux # correct to gnu/linux during the next big refactor
   need_lib_prefix=no
   need_version=no
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
-  shlibpath_var=LD_LIBRARY_PATH
+  dynamic_linker="$host_os runtime_loader"
+  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+  soname_spec='$libname$release$shared_ext$major'
+  shlibpath_var=LIBRARY_PATH
+  shlibpath_overrides_runpath=no
+  sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib'
   hardcode_into_libs=yes
   ;;
 
@@ -19974,14 +21924,15 @@ hpux9* | hpux10* | hpux11*)
     dynamic_linker="$host_os dld.so"
     shlibpath_var=LD_LIBRARY_PATH
     shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
-    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-    soname_spec='${libname}${release}${shared_ext}$major'
-    if test "X$HPUX_IA64_MODE" = X32; then
+    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+    soname_spec='$libname$release$shared_ext$major'
+    if test 32 = "$HPUX_IA64_MODE"; then
       sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
+      sys_lib_dlsearch_path_spec=/usr/lib/hpux32
     else
       sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
+      sys_lib_dlsearch_path_spec=/usr/lib/hpux64
     fi
-    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
     ;;
   hppa*64*)
     shrext_cmds='.sl'
@@ -19989,8 +21940,8 @@ hpux9* | hpux10* | hpux11*)
     dynamic_linker="$host_os dld.sl"
     shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
     shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
-    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-    soname_spec='${libname}${release}${shared_ext}$major'
+    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+    soname_spec='$libname$release$shared_ext$major'
     sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
     sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
     ;;
@@ -19999,20 +21950,22 @@ hpux9* | hpux10* | hpux11*)
     dynamic_linker="$host_os dld.sl"
     shlibpath_var=SHLIB_PATH
     shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
-    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-    soname_spec='${libname}${release}${shared_ext}$major'
+    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+    soname_spec='$libname$release$shared_ext$major'
     ;;
   esac
-  # HP-UX runs *really* slowly unless shared libraries are mode 555.
+  # HP-UX runs *really* slowly unless shared libraries are mode 555, ...
   postinstall_cmds='chmod 555 $lib'
+  # or fails outright, so override atomically:
+  install_override_mode=555
   ;;
 
 interix[3-9]*)
-  version_type=linux
+  version_type=linux # correct to gnu/linux during the next big refactor
   need_lib_prefix=no
   need_version=no
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
+  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+  soname_spec='$libname$release$shared_ext$major'
   dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
   shlibpath_var=LD_LIBRARY_PATH
   shlibpath_overrides_runpath=no
@@ -20023,16 +21976,16 @@ irix5* | irix6* | nonstopux*)
   case $host_os in
     nonstopux*) version_type=nonstopux ;;
     *)
-	if test "$lt_cv_prog_gnu_ld" = yes; then
-		version_type=linux
+	if test yes = "$lt_cv_prog_gnu_ld"; then
+		version_type=linux # correct to gnu/linux during the next big refactor
 	else
 		version_type=irix
 	fi ;;
   esac
   need_lib_prefix=no
   need_version=no
-  soname_spec='${libname}${release}${shared_ext}$major'
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
+  soname_spec='$libname$release$shared_ext$major'
+  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$release$shared_ext $libname$shared_ext'
   case $host_os in
   irix5* | nonstopux*)
     libsuff= shlibsuff=
@@ -20051,8 +22004,8 @@ irix5* | irix6* | nonstopux*)
   esac
   shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
   shlibpath_overrides_runpath=no
-  sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
-  sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
+  sys_lib_search_path_spec="/usr/lib$libsuff /lib$libsuff /usr/local/lib$libsuff"
+  sys_lib_dlsearch_path_spec="/usr/lib$libsuff /lib$libsuff"
   hardcode_into_libs=yes
   ;;
 
@@ -20061,44 +22014,78 @@ linux*oldld* | linux*aout* | linux*coff*)
   dynamic_linker=no
   ;;
 
-# This must be Linux ELF.
-linux* | k*bsd*-gnu)
-  version_type=linux
+linux*android*)
+  version_type=none # Android doesn't support versioned libraries.
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='$libname$release$shared_ext'
+  soname_spec='$libname$release$shared_ext'
+  finish_cmds=
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=yes
+
+  # This implies no fast_install, which is unacceptable.
+  # Some rework will be needed to allow for fast_install
+  # before this can be enabled.
+  hardcode_into_libs=yes
+
+  dynamic_linker='Android linker'
+  # Don't embed -rpath directories since the linker doesn't support them.
+  hardcode_libdir_flag_spec_F77='-L$libdir'
+  ;;
+
+# This must be glibc/ELF.
+linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
+  version_type=linux # correct to gnu/linux during the next big refactor
   need_lib_prefix=no
   need_version=no
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
+  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+  soname_spec='$libname$release$shared_ext$major'
   finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
   shlibpath_var=LD_LIBRARY_PATH
   shlibpath_overrides_runpath=no
+
   # Some binutils ld are patched to set DT_RUNPATH
-  save_LDFLAGS=$LDFLAGS
-  save_libdir=$libdir
-  eval "libdir=/foo; wl=\"$lt_prog_compiler_wl_F77\"; \
-       LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec_F77\""
-  cat > conftest.$ac_ext <<_ACEOF
+  if ${lt_cv_shlibpath_overrides_runpath+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  lt_cv_shlibpath_overrides_runpath=no
+    save_LDFLAGS=$LDFLAGS
+    save_libdir=$libdir
+    eval "libdir=/foo; wl=\"$lt_prog_compiler_wl_F77\"; \
+	 LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec_F77\""
+    cat > conftest.$ac_ext <<_ACEOF
       program main
 
       end
 _ACEOF
 if ac_fn_f77_try_link "$LINENO"; then :
   if  ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then :
-  shlibpath_overrides_runpath=yes
+  lt_cv_shlibpath_overrides_runpath=yes
 fi
 fi
 rm -f core conftest.err conftest.$ac_objext \
     conftest$ac_exeext conftest.$ac_ext
-  LDFLAGS=$save_LDFLAGS
-  libdir=$save_libdir
+    LDFLAGS=$save_LDFLAGS
+    libdir=$save_libdir
+
+fi
+
+  shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath
 
   # This implies no fast_install, which is unacceptable.
   # Some rework will be needed to allow for fast_install
   # before this can be enabled.
   hardcode_into_libs=yes
 
-  # Append ld.so.conf contents to the search path
+  # Ideally, we could use ldconfig to report *all* directores which are
+  # searched for libraries, however this is still not possible.  Aside from not
+  # being certain /sbin/ldconfig is available, command
+  # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64,
+  # even though it is searched at run-time.  Try to do the best guess by
+  # appending ld.so.conf contents (and includes) to the search path.
   if test -f /etc/ld.so.conf; then
-    lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[	 ]*hwcap[	 ]/d;s/[:,	]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
+    lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[	 ]*hwcap[	 ]/d;s/[:,	]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '`
     sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
   fi
 
@@ -20116,12 +22103,12 @@ netbsd*)
   need_lib_prefix=no
   need_version=no
   if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
-    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
+    library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
     finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
     dynamic_linker='NetBSD (a.out) ld.so'
   else
-    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
-    soname_spec='${libname}${release}${shared_ext}$major'
+    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+    soname_spec='$libname$release$shared_ext$major'
     dynamic_linker='NetBSD ld.elf_so'
   fi
   shlibpath_var=LD_LIBRARY_PATH
@@ -20130,8 +22117,8 @@ netbsd*)
   ;;
 
 newsos6)
-  version_type=linux
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  version_type=linux # correct to gnu/linux during the next big refactor
+  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
   shlibpath_var=LD_LIBRARY_PATH
   shlibpath_overrides_runpath=yes
   ;;
@@ -20140,58 +22127,68 @@ newsos6)
   version_type=qnx
   need_lib_prefix=no
   need_version=no
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
+  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+  soname_spec='$libname$release$shared_ext$major'
   shlibpath_var=LD_LIBRARY_PATH
   shlibpath_overrides_runpath=no
   hardcode_into_libs=yes
   dynamic_linker='ldqnx.so'
   ;;
 
-openbsd*)
+openbsd* | bitrig*)
   version_type=sunos
-  sys_lib_dlsearch_path_spec="/usr/lib"
+  sys_lib_dlsearch_path_spec=/usr/lib
   need_lib_prefix=no
-  # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
-  case $host_os in
-    openbsd3.3 | openbsd3.3.*)	need_version=yes ;;
-    *)				need_version=no  ;;
-  esac
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
-  finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
-  shlibpath_var=LD_LIBRARY_PATH
-  if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
-    case $host_os in
-      openbsd2.[89] | openbsd2.[89].*)
-	shlibpath_overrides_runpath=no
-	;;
-      *)
-	shlibpath_overrides_runpath=yes
-	;;
-      esac
+  if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
+    need_version=no
   else
-    shlibpath_overrides_runpath=yes
+    need_version=yes
   fi
+  library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
+  finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=yes
   ;;
 
 os2*)
   libname_spec='$name'
-  shrext_cmds=".dll"
+  version_type=windows
+  shrext_cmds=.dll
+  need_version=no
   need_lib_prefix=no
-  library_names_spec='$libname${shared_ext} $libname.a'
+  # OS/2 can only load a DLL with a base name of 8 characters or less.
+  soname_spec='`test -n "$os2dllname" && libname="$os2dllname";
+    v=$($ECHO $release$versuffix | tr -d .-);
+    n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _);
+    $ECHO $n$v`$shared_ext'
+  library_names_spec='${libname}_dll.$libext'
   dynamic_linker='OS/2 ld.exe'
-  shlibpath_var=LIBPATH
+  shlibpath_var=BEGINLIBPATH
+  sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
+  sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
+  postinstall_cmds='base_file=`basename \$file`~
+    dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; $ECHO \$dlname'\''`~
+    dldir=$destdir/`dirname \$dlpath`~
+    test -d \$dldir || mkdir -p \$dldir~
+    $install_prog $dir/$dlname \$dldir/$dlname~
+    chmod a+x \$dldir/$dlname~
+    if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
+      eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
+    fi'
+  postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; $ECHO \$dlname'\''`~
+    dlpath=$dir/\$dldll~
+    $RM \$dlpath'
   ;;
 
 osf3* | osf4* | osf5*)
   version_type=osf
   need_lib_prefix=no
   need_version=no
-  soname_spec='${libname}${release}${shared_ext}$major'
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='$libname$release$shared_ext$major'
+  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
   shlibpath_var=LD_LIBRARY_PATH
   sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
-  sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
+  sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
   ;;
 
 rdos*)
@@ -20199,11 +22196,11 @@ rdos*)
   ;;
 
 solaris*)
-  version_type=linux
+  version_type=linux # correct to gnu/linux during the next big refactor
   need_lib_prefix=no
   need_version=no
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
+  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+  soname_spec='$libname$release$shared_ext$major'
   shlibpath_var=LD_LIBRARY_PATH
   shlibpath_overrides_runpath=yes
   hardcode_into_libs=yes
@@ -20213,20 +22210,20 @@ solaris*)
 
 sunos4*)
   version_type=sunos
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
+  library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
   finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
   shlibpath_var=LD_LIBRARY_PATH
   shlibpath_overrides_runpath=yes
-  if test "$with_gnu_ld" = yes; then
+  if test yes = "$with_gnu_ld"; then
     need_lib_prefix=no
   fi
   need_version=yes
   ;;
 
 sysv4 | sysv4.3*)
-  version_type=linux
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
+  version_type=linux # correct to gnu/linux during the next big refactor
+  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+  soname_spec='$libname$release$shared_ext$major'
   shlibpath_var=LD_LIBRARY_PATH
   case $host_vendor in
     sni)
@@ -20247,24 +22244,24 @@ sysv4 | sysv4.3*)
   ;;
 
 sysv4*MP*)
-  if test -d /usr/nec ;then
-    version_type=linux
-    library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
-    soname_spec='$libname${shared_ext}.$major'
+  if test -d /usr/nec; then
+    version_type=linux # correct to gnu/linux during the next big refactor
+    library_names_spec='$libname$shared_ext.$versuffix $libname$shared_ext.$major $libname$shared_ext'
+    soname_spec='$libname$shared_ext.$major'
     shlibpath_var=LD_LIBRARY_PATH
   fi
   ;;
 
 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
-  version_type=freebsd-elf
+  version_type=sco
   need_lib_prefix=no
   need_version=no
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
+  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext $libname$shared_ext'
+  soname_spec='$libname$release$shared_ext$major'
   shlibpath_var=LD_LIBRARY_PATH
   shlibpath_overrides_runpath=yes
   hardcode_into_libs=yes
-  if test "$with_gnu_ld" = yes; then
+  if test yes = "$with_gnu_ld"; then
     sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
   else
     sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
@@ -20279,19 +22276,19 @@ sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
 
 tpf*)
   # TPF is a cross-target only.  Preferred cross-host = GNU/Linux.
-  version_type=linux
+  version_type=linux # correct to gnu/linux during the next big refactor
   need_lib_prefix=no
   need_version=no
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
   shlibpath_var=LD_LIBRARY_PATH
   shlibpath_overrides_runpath=no
   hardcode_into_libs=yes
   ;;
 
 uts4*)
-  version_type=linux
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
+  version_type=linux # correct to gnu/linux during the next big refactor
+  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+  soname_spec='$libname$release$shared_ext$major'
   shlibpath_var=LD_LIBRARY_PATH
   ;;
 
@@ -20301,20 +22298,34 @@ uts4*)
 esac
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5
 $as_echo "$dynamic_linker" >&6; }
-test "$dynamic_linker" = no && can_build_shared=no
+test no = "$dynamic_linker" && can_build_shared=no
 
 variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
-if test "$GCC" = yes; then
+if test yes = "$GCC"; then
   variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
 fi
 
-if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then
-  sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
+if test set = "${lt_cv_sys_lib_search_path_spec+set}"; then
+  sys_lib_search_path_spec=$lt_cv_sys_lib_search_path_spec
 fi
-if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then
-  sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec"
+
+if test set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then
+  sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec
 fi
 
+# remember unaugmented sys_lib_dlsearch_path content for libtool script decls...
+configure_time_dlsearch_path=$sys_lib_dlsearch_path_spec
+
+# ... but it needs LT_SYS_LIBRARY_PATH munging for other configure-time code
+func_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH"
+
+# to be used as default LT_SYS_LIBRARY_PATH value in generated libtool
+configure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH
+
+
+
+
+
 
 
 
@@ -20355,15 +22366,15 @@ $as_echo_n "checking how to hardcode library paths into programs... " >&6; }
 hardcode_action_F77=
 if test -n "$hardcode_libdir_flag_spec_F77" ||
    test -n "$runpath_var_F77" ||
-   test "X$hardcode_automatic_F77" = "Xyes" ; then
+   test yes = "$hardcode_automatic_F77"; then
 
   # We can hardcode non-existent directories.
-  if test "$hardcode_direct_F77" != no &&
+  if test no != "$hardcode_direct_F77" &&
      # If the only mechanism to avoid hardcoding is shlibpath_var, we
      # have to relink, otherwise we might link with an installed library
      # when we should be linking with a yet-to-be-installed one
-     ## test "$_LT_TAGVAR(hardcode_shlibpath_var, F77)" != no &&
-     test "$hardcode_minus_L_F77" != no; then
+     ## test no != "$_LT_TAGVAR(hardcode_shlibpath_var, F77)" &&
+     test no != "$hardcode_minus_L_F77"; then
     # Linking always hardcodes the temporary library directory.
     hardcode_action_F77=relink
   else
@@ -20378,12 +22389,12 @@ fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action_F77" >&5
 $as_echo "$hardcode_action_F77" >&6; }
 
-if test "$hardcode_action_F77" = relink ||
-   test "$inherit_rpath_F77" = yes; then
+if test relink = "$hardcode_action_F77" ||
+   test yes = "$inherit_rpath_F77"; then
   # Fast installation is not supported
   enable_fast_install=no
-elif test "$shlibpath_overrides_runpath" = yes ||
-     test "$enable_shared" = no; then
+elif test yes = "$shlibpath_overrides_runpath" ||
+     test no = "$enable_shared"; then
   # Fast installation is not necessary
   enable_fast_install=needless
 fi
@@ -20397,8 +22408,9 @@ fi
   fi # test -n "$compiler"
 
   GCC=$lt_save_GCC
-  CC="$lt_save_CC"
-fi # test "$_lt_disable_F77" != yes
+  CC=$lt_save_CC
+  CFLAGS=$lt_save_CFLAGS
+fi # test yes != "$_lt_disable_F77"
 
 ac_ext=c
 ac_cpp='$CPP $CPPFLAGS'
@@ -20416,6 +22428,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
 
 
 
+
+
         ac_config_commands="$ac_config_commands libtool"
 
 
@@ -20495,6 +22509,8 @@ case "${host_os}" in
     ## changes DYLD_LIBRARY_PATH), because they override the system
     ## look-up sequence. Such automatic override has proven to break things
     ## like system frameworks (e.g. ImageIO or OpenGL framework).
+    ## Not so bad in later versions of Darwin,
+    ## where DYLD_FALLBACK_LIBRARY_PATH is used (see below).
     ;;
   *)
     for arg in ${LDFLAGS}; do
@@ -20516,8 +22532,9 @@ esac
 
 ## Record name of environment variable which tells the dynamic linker
 ## where to find shlibs (typically, 'LD_LIBRARY_PATH').
-## Used in etc/ldpaths: override what libtool thinks on OS X
+## Used in etc/ldpaths: As from R 3.0.0 override what libtool thinks on macOS
 ## http://hublog.hubmed.org/archives/001192.html suggests this was in 10.4
+## However, as from 10.11 this variable is not passed down to shells.
 case "${host_os}" in
   darwin*)
     Rshlibpath_var=DYLD_FALLBACK_LIBRARY_PATH
@@ -20545,7 +22562,7 @@ stripstaticlib=${old_striplib}
 ## This actually comes from libtool.m4.
 LIBM=
 case $host in
-*-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*)
+*-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*)
   # These system don't have libm, or don't need it
   ;;
 *-ncr-sysv4.3*)
@@ -20586,7 +22603,7 @@ fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mw__mwvalidcheckl" >&5
 $as_echo "$ac_cv_lib_mw__mwvalidcheckl" >&6; }
 if test "x$ac_cv_lib_mw__mwvalidcheckl" = xyes; then :
-  LIBM="-lmw"
+  LIBM=-lmw
 fi
 
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5
@@ -20668,7 +22685,7 @@ fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5
 $as_echo "$ac_cv_lib_m_cos" >&6; }
 if test "x$ac_cv_lib_m_cos" = xyes; then :
-  LIBM="-lm"
+  LIBM=-lm
 fi
 
   ;;
@@ -20726,111 +22743,16 @@ fi
 
 case "${host_os}" in
   darwin*)
-    ## OS X <= 10.2 dlcompat, >= 10.3 included dlcompat in libSystem
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
-$as_echo_n "checking for library containing dlopen... " >&6; }
-if ${ac_cv_search_dlopen+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  ac_func_search_save_LIBS=$LIBS
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char dlopen ();
-int
-main ()
-{
-return dlopen ();
-  ;
-  return 0;
-}
-_ACEOF
-for ac_lib in '' dl; do
-  if test -z "$ac_lib"; then
-    ac_res="none required"
-  else
-    ac_res=-l$ac_lib
-    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
-  fi
-  if ac_fn_c_try_link "$LINENO"; then :
-  ac_cv_search_dlopen=$ac_res
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext
-  if ${ac_cv_search_dlopen+:} false; then :
-  break
-fi
-done
-if ${ac_cv_search_dlopen+:} false; then :
-
-else
-  ac_cv_search_dlopen=no
-fi
-rm conftest.$ac_ext
-LIBS=$ac_func_search_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
-$as_echo "$ac_cv_search_dlopen" >&6; }
-ac_res=$ac_cv_search_dlopen
-if test "$ac_res" != no; then :
-  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
-
-else
-  as_fn_error $? "Your OS X is too old." "$LINENO" 5
-fi
-
+    ## macOS >= 10.3 include dlcompat in libSystem
+    ## This is ancient history
     ## SI says we want '-lcc_dynamic' on Darwin, although currently
-    ## http://developer.apple.com/documentation/MacOSX/ has nothing
+    ## https://developer.apple.com/documentation/MacOSX/ has nothing
     ## official.  Bill Northcott <w.northcott at unsw.edu.au> points out
     ## that it is only needed for GCC 3.x (and earlier) ...
     if test "${GCC}" = yes; then
       case "${CC_VERSION}" in
         2.*|3.*)
-          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lcc_dynamic" >&5
-$as_echo_n "checking for main in -lcc_dynamic... " >&6; }
-if ${ac_cv_lib_cc_dynamic_main+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lcc_dynamic  $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-
-int
-main ()
-{
-return main ();
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  ac_cv_lib_cc_dynamic_main=yes
-else
-  ac_cv_lib_cc_dynamic_main=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cc_dynamic_main" >&5
-$as_echo "$ac_cv_lib_cc_dynamic_main" >&6; }
-if test "x$ac_cv_lib_cc_dynamic_main" = xyes; then :
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_LIBCC_DYNAMIC 1
-_ACEOF
-
-  LIBS="-lcc_dynamic $LIBS"
-
-fi
- ;;
+	  as_fn_error $? "Your gcc is too old." "$LINENO" 5
       esac
     fi
     ;;
@@ -21116,9 +23038,15 @@ _ACEOF
 fi
 
     use_readline="${ac_cv_lib_readline_rl_callback_read_char}"
+    if test "${use_readline}" = yes; then
+      use_readline="${ac_cv_header_readline_readline_h}"
+    fi
   fi
-  ## the NetBSD version as used in OS X does not have this
-  for ac_func in history_truncate_file
+  if test "${use_readline}" = no; then
+    as_fn_error $? "--with-readline=yes (default) and headers/libs are not available" "$LINENO" 5
+  else
+    ## the NetBSD emulation supplied by macOS does not have this
+    for ac_func in history_truncate_file
 do :
   ac_fn_c_check_func "$LINENO" "history_truncate_file" "ac_cv_func_history_truncate_file"
 if test "x$ac_cv_func_history_truncate_file" = xyes; then :
@@ -21129,10 +23057,10 @@ _ACEOF
 fi
 done
 
-  if test "${use_readline}" = no; then
-    as_fn_error $? "--with-readline=yes (default) and headers/libs are not available" "$LINENO" 5
-  else
-    for ac_func in rl_completion_matches
+    ## rl_completion_matches is >= 4.2.
+    ## rl_resize_terminal is >= 4.0 ane we use it only for >= 6.3.
+    ## rl_callback_sigcleanup is in pre-releases for 7.0, not yet used.
+    for ac_func in rl_callback_sigcleanup rl_completion_matches rl_resize_terminal rl_sort_completion_matches
 do
 as_ac_Symbol=`$as_echo "ac_cv_have_decl_$ac_func" | $as_tr_sh`
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $ac_func exists and is declared" >&5
@@ -21503,20 +23431,29 @@ fi
 ## Some of these are also checked for when Autoconf computes the default
 ## includes.
 ##
-## The following headers are POSIX: dlfcn.h fcntl.h glob.h grp.h
-## pwd.h strings.h sys/resource.h sys/select.h sys/socket.h
-## sys/stat.h sys/time.h sys/times.h sys/utsname.h unistd.h utime.h
-## dl.h seems to be for HP-UX
-## floatingpoint.h is on FreeBSD and Solaris, originating in SysV.
-## (It is probably only used for fpsetmask on FreeBSD).
-## fpu_control.h is only used on Linux, for the obsolete __setfpucw.
+## The following headers are POSIX,
+## We use sched.h for Linux-specific features (affinity)
+for ac_header in dlfcn.h fcntl.h glob.h grp.h pwd.h sched.h strings.h \
+  sys/resource.h sys/select.h sys/socket.h sys/stat.h sys/time.h \
+  sys/times.h sys/utsname.h unistd.h utime.h
+do :
+  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
+ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
+if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
+  cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+## dl.h is used in src/unix/hpdlfcn.c included from src/unix/dynload.c on HP-UX
+## features.h is used by date-time code on Linux.
+## floatingpoint.h is used for fpsetmask on FreeBSD.
 ## sys/param.h is one way to get PATH_MAX.
-## sched.h is POSIX, but we use it for Linux-specific features (affinity)
-for ac_header in arpa/inet.h dl.h dlfcn.h elf.h fcntl.h floatingpoint.h \
-  fpu_control.h glob.h grp.h langinfo.h \
-  netdb.h netinet/in.h pwd.h sched.h strings.h \
-  sys/param.h sys/resource.h sys/select.h sys/socket.h \
-  sys/stat.h sys/time.h sys/times.h sys/utsname.h unistd.h utime.h
+for ac_header in arpa/inet.h dl.h elf.h features.h floatingpoint.h \
+  langinfo.h netdb.h netinet/in.h sys/param.h
 do :
   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
@@ -21529,8 +23466,19 @@ fi
 
 done
 
-## </NOTE>
-## <NOTE>
+## stdalign.h is C11.
+for ac_header in stdalign.h
+do :
+  ac_fn_c_check_header_mongrel "$LINENO" "stdalign.h" "ac_cv_header_stdalign_h" "$ac_includes_default"
+if test "x$ac_cv_header_stdalign_h" = xyes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_STDALIGN_H 1
+_ACEOF
+
+fi
+
+done
+
 ## These are C99 headers but some C code (written to work also
 ## without assuming C99) may need the corresponding conditionals.
 for ac_header in errno.h inttypes.h limits.h locale.h stdarg.h stdbool.h \
@@ -21548,6 +23496,9 @@ fi
 done
 
 ## only vsnprintf.c requires stdarg.h
+
+## We also use without checking sys/sysctl.h, but only on *BSD and macOS
+## The default includes check for sys/types.h (POSIX), which we use unconditionally
 ## </NOTE>
 
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setjmp.h is POSIX.1 compatible" >&5
@@ -21679,7 +23630,7 @@ cat >>confdefs.h <<_ACEOF
 _ACEOF
 
 
-## xz needs uint64_t
+## liblzma uses uint64_t: used unconditionally in src/main/util.c
 ac_fn_c_find_uintX_t "$LINENO" "64" "ac_cv_c_uint64_t"
 case $ac_cv_c_uint64_t in #(
   no|yes) ;; #(
@@ -21864,7 +23815,7 @@ _ACEOF
 
 fi
 
-## These are optional C99 types, which we typedef in Defn.h if absent.
+## These are optional C99 types, which we used to typedef in Defn.h if absent.
 ## There seems some confusion as to where they should be defined:
 ## the standard says stdint.h but drafts and Solaris 8 have inttypes.h.
 ## It seems all systems having stdint.h include it in inttypes.h, and
@@ -22808,7 +24759,9 @@ if ac_fn_c_try_link "$LINENO"; then :
   ac_cv_prog_c_openmp='none needed'
 else
   ac_cv_prog_c_openmp='unsupported'
-	  	  	  	  	  	  	                                	  	  	  	  	  	  for ac_option in -fopenmp -xopenmp -openmp -mp -omp -qsmp=omp -homp \
+	  	  	  	  	            	  	            	  	  	  	                                	  	  	  	  	  	  for ac_option in -fopenmp -xopenmp -qopenmp \
+                           -openmp -mp -omp -qsmp=omp -homp \
+			   -fopenmp=libomp \
                            -Popenmp --openmp; do
 	    ac_save_CFLAGS=$CFLAGS
 	    CFLAGS="$CFLAGS $ac_option"
@@ -23255,7 +25208,7 @@ _ACEOF
 # flags.
 r_save_CFLAGS=$CFLAGS
 CFLAGS="$CFLAGS $r_verb"
-(eval echo $as_me:23258: \"$ac_link\") >&5
+(eval echo $as_me:25211: \"$ac_link\") >&5
 r_c_v_output=`eval $ac_link 5>&1 2>&1 | grep -v 'Driving:'`
 echo "$r_c_v_output" >&5
 CFLAGS=$r_save_CFLAGS
@@ -23330,7 +25283,7 @@ _ACEOF
 # flags.
 r_save_CFLAGS=$CFLAGS
 CFLAGS="$CFLAGS $r_cv_prog_c_v"
-(eval echo $as_me:23333: \"$ac_link\") >&5
+(eval echo $as_me:25286: \"$ac_link\") >&5
 r_c_v_output=`eval $ac_link 5>&1 2>&1 | grep -v 'Driving:'`
 echo "$r_c_v_output" >&5
 CFLAGS=$r_save_CFLAGS
@@ -24311,7 +26264,9 @@ if ac_fn_f77_try_link "$LINENO"; then :
   ac_cv_prog_f77_openmp='none needed'
 else
   ac_cv_prog_f77_openmp='unsupported'
-	  	  	  	  	  	  	                                	  	  	  	  	  	  for ac_option in -fopenmp -xopenmp -openmp -mp -omp -qsmp=omp -homp \
+	  	  	  	  	            	  	            	  	  	  	                                	  	  	  	  	  	  for ac_option in -fopenmp -xopenmp -qopenmp \
+                           -openmp -mp -omp -qsmp=omp -homp \
+			   -fopenmp=libomp \
                            -Popenmp --openmp; do
 	    ac_save_FFLAGS=$FFLAGS
 	    FFLAGS="$FFLAGS $ac_option"
@@ -24440,7 +26395,9 @@ if ac_fn_cxx_try_link "$LINENO"; then :
   ac_cv_prog_cxx_openmp='none needed'
 else
   ac_cv_prog_cxx_openmp='unsupported'
-	  	  	  	  	  	  	                                	  	  	  	  	  	  for ac_option in -fopenmp -xopenmp -openmp -mp -omp -qsmp=omp -homp \
+	  	  	  	  	            	  	            	  	  	  	                                	  	  	  	  	  	  for ac_option in -fopenmp -xopenmp -qopenmp \
+                           -openmp -mp -omp -qsmp=omp -homp \
+			   -fopenmp=libomp \
                            -Popenmp --openmp; do
 	    ac_save_CXXFLAGS=$CXXFLAGS
 	    CXXFLAGS="$CXXFLAGS $ac_option"
@@ -25140,21 +27097,19 @@ fi
     ## We used to add -mieee-fp here, but it seems it is really a
     ## linker flag for old Linuxen adding -lieee to a non-shared link.
     ;;
-  alpha*)
-    ## <NOTE>
-    ## * IEEE math
-    ## We really need to use @option{-ieee_with_inexact} (called
-    ## @option{-mieee-with-inexact} for GCC) for the C compiler:
-    ## @option{-ieee} (or @option{-mieee}) are not enough.
-    ## According to <Albrecht.Gebhardt at uni-klu.ac.at> and Luke Tierney
-    ## <luke at stat.uiowa.edu>, @option{-fpe3} is what we want for the
-    ## native Fortran 77 compiler: seems that not all versions map
-    ## @option{-ieee} to @option{-fpe3}.
-    ## What about the C++ compilers?
+esac
+
+
+
+case "${host_os}" in
+  aix*)
+    $as_echo "#define HAVE_NO_SYMBOL_UNDERSCORE 1" >>confdefs.h
+
     if test "${GCC}" = yes; then
-      ac_safe=_mieee_with_inexact
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} accepts -mieee-with-inexact" >&5
-$as_echo_n "checking whether ${CC} accepts -mieee-with-inexact... " >&6; }
+      if test "x${OBJECT_MODE}" = "x64"; then
+        ac_safe=_mminimal_toc
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} accepts -mminimal-toc" >&5
+$as_echo_n "checking whether ${CC} accepts -mminimal-toc... " >&6; }
 if eval \${r_cv_prog_cc_flag_${ac_safe}+:} false; then :
   $as_echo_n "(cached) " >&6
 else
@@ -25165,387 +27120,7 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $
 ac_compiler_gnu=$ac_cv_c_compiler_gnu
 
 r_save_CFLAGS="${CFLAGS}"
-CFLAGS="${CFLAGS} -mieee-with-inexact"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-#ifdef F77_DUMMY_MAIN
-
-#  ifdef __cplusplus
-     extern "C"
-#  endif
-   int F77_DUMMY_MAIN() { return 1; }
-
-#endif
-int
-main ()
-{
-
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  eval "r_cv_prog_cc_flag_${ac_safe}=yes"
-else
-  eval "r_cv_prog_cc_flag_${ac_safe}=no"
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-CFLAGS="${r_save_CFLAGS}"
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
-
-fi
-
-if eval "test \"`echo '$r_cv_prog_cc_flag_'$ac_safe`\" = yes"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-  separator=""
-test -z "${separator}" && separator=" "
-if test -z "${R_XTRA_CFLAGS}"; then
-  R_XTRA_CFLAGS="-mieee-with-inexact"
-else
-  R_XTRA_CFLAGS="${R_XTRA_CFLAGS}${separator}-mieee-with-inexact"
-fi
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-    else
-      ac_safe=_ieee_with_inexact
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} accepts -ieee_with_inexact" >&5
-$as_echo_n "checking whether ${CC} accepts -ieee_with_inexact... " >&6; }
-if eval \${r_cv_prog_cc_flag_${ac_safe}+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
-r_save_CFLAGS="${CFLAGS}"
-CFLAGS="${CFLAGS} -ieee_with_inexact"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-#ifdef F77_DUMMY_MAIN
-
-#  ifdef __cplusplus
-     extern "C"
-#  endif
-   int F77_DUMMY_MAIN() { return 1; }
-
-#endif
-int
-main ()
-{
-
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  eval "r_cv_prog_cc_flag_${ac_safe}=yes"
-else
-  eval "r_cv_prog_cc_flag_${ac_safe}=no"
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-CFLAGS="${r_save_CFLAGS}"
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
-
-fi
-
-if eval "test \"`echo '$r_cv_prog_cc_flag_'$ac_safe`\" = yes"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-  separator=""
-test -z "${separator}" && separator=" "
-if test -z "${R_XTRA_CFLAGS}"; then
-  R_XTRA_CFLAGS="-ieee_with_inexact"
-else
-  R_XTRA_CFLAGS="${R_XTRA_CFLAGS}${separator}-ieee_with_inexact"
-fi
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-    fi
-    if test "${G77}" = yes; then
-      ac_safe=_mieee
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${F77} accepts -mieee" >&5
-$as_echo_n "checking whether ${F77} accepts -mieee... " >&6; }
-if eval \${r_cv_prog_f77_flag_${ac_safe}+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  ac_ext=f
-ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5'
-ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_f77_compiler_gnu
-
-r_save_FFLAGS="${FFLAGS}"
-FFLAGS="${FFLAGS} -mieee"
-cat > conftest.$ac_ext <<_ACEOF
-      program main
-
-      end
-_ACEOF
-if ac_fn_f77_try_link "$LINENO"; then :
-  eval "r_cv_prog_f77_flag_${ac_safe}=yes"
-else
-  eval "r_cv_prog_f77_flag_${ac_safe}=no"
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-FFLAGS="${r_save_FFLAGS}"
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
-
-fi
-
-if eval "test \"`echo '$r_cv_prog_f77_flag_'$ac_safe`\" = yes"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-  separator=""
-test -z "${separator}" && separator=" "
-if test -z "${R_XTRA_FFLAGS}"; then
-  R_XTRA_FFLAGS="-mieee"
-else
-  R_XTRA_FFLAGS="${R_XTRA_FFLAGS}${separator}-mieee"
-fi
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-    else
-      ac_safe=_fpe3
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${F77} accepts -fpe3" >&5
-$as_echo_n "checking whether ${F77} accepts -fpe3... " >&6; }
-if eval \${r_cv_prog_f77_flag_${ac_safe}+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  ac_ext=f
-ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5'
-ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_f77_compiler_gnu
-
-r_save_FFLAGS="${FFLAGS}"
-FFLAGS="${FFLAGS} -fpe3"
-cat > conftest.$ac_ext <<_ACEOF
-      program main
-
-      end
-_ACEOF
-if ac_fn_f77_try_link "$LINENO"; then :
-  eval "r_cv_prog_f77_flag_${ac_safe}=yes"
-else
-  eval "r_cv_prog_f77_flag_${ac_safe}=no"
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-FFLAGS="${r_save_FFLAGS}"
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
-
-fi
-
-if eval "test \"`echo '$r_cv_prog_f77_flag_'$ac_safe`\" = yes"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-  separator=""
-test -z "${separator}" && separator=" "
-if test -z "${R_XTRA_FFLAGS}"; then
-  R_XTRA_FFLAGS="-fpe3"
-else
-  R_XTRA_FFLAGS="${R_XTRA_FFLAGS}${separator}-fpe3"
-fi
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-    fi
-    if test "${GXX}" = yes; then
-      ac_safe=_mieee
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX-c++} accepts -mieee" >&5
-$as_echo_n "checking whether ${CXX-c++} accepts -mieee... " >&6; }
-if eval \${r_cv_prog_cxx_flag_${ac_safe}+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  ac_ext=cpp
-ac_cpp='$CXXCPP $CPPFLAGS'
-ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
-
-r_save_CXXFLAGS="${CXXFLAGS}"
-CXXFLAGS="${CXXFLAGS} -mieee"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-#ifdef F77_DUMMY_MAIN
-
-#  ifdef __cplusplus
-     extern "C"
-#  endif
-   int F77_DUMMY_MAIN() { return 1; }
-
-#endif
-int
-main ()
-{
-
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_cxx_try_link "$LINENO"; then :
-  eval "r_cv_prog_cxx_flag_${ac_safe}=yes"
-else
-  eval "r_cv_prog_cxx_flag_${ac_safe}=no"
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-CXXFLAGS="${r_save_CXXFLAGS}"
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
-
-fi
-
-if eval "test \"`echo '$r_cv_prog_cxx_flag_'$ac_safe`\" = yes"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-  separator=""
-test -z "${separator}" && separator=" "
-if test -z "${R_XTRA_CXXFLAGS}"; then
-  R_XTRA_CXXFLAGS="-mieee"
-else
-  R_XTRA_CXXFLAGS="${R_XTRA_CXXFLAGS}${separator}-mieee"
-fi
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-    else
-      ac_safe=_ieee
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX-c++} accepts -ieee" >&5
-$as_echo_n "checking whether ${CXX-c++} accepts -ieee... " >&6; }
-if eval \${r_cv_prog_cxx_flag_${ac_safe}+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  ac_ext=cpp
-ac_cpp='$CXXCPP $CPPFLAGS'
-ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
-
-r_save_CXXFLAGS="${CXXFLAGS}"
-CXXFLAGS="${CXXFLAGS} -ieee"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-#ifdef F77_DUMMY_MAIN
-
-#  ifdef __cplusplus
-     extern "C"
-#  endif
-   int F77_DUMMY_MAIN() { return 1; }
-
-#endif
-int
-main ()
-{
-
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_cxx_try_link "$LINENO"; then :
-  eval "r_cv_prog_cxx_flag_${ac_safe}=yes"
-else
-  eval "r_cv_prog_cxx_flag_${ac_safe}=no"
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-CXXFLAGS="${r_save_CXXFLAGS}"
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
-
-fi
-
-if eval "test \"`echo '$r_cv_prog_cxx_flag_'$ac_safe`\" = yes"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-  separator=""
-test -z "${separator}" && separator=" "
-if test -z "${R_XTRA_CXXFLAGS}"; then
-  R_XTRA_CXXFLAGS="-ieee"
-else
-  R_XTRA_CXXFLAGS="${R_XTRA_CXXFLAGS}${separator}-ieee"
-fi
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-    fi
-    ## </NOTE>
-    ;;
-esac
-
-
-
-case "${host_os}" in
-  aix*)
-    $as_echo "#define HAVE_NO_SYMBOL_UNDERSCORE 1" >>confdefs.h
-
-    if test "${GCC}" = yes; then
-      if test "x${OBJECT_MODE}" = "x64"; then
-        ac_safe=_mminimal_toc
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} accepts -mminimal-toc" >&5
-$as_echo_n "checking whether ${CC} accepts -mminimal-toc... " >&6; }
-if eval \${r_cv_prog_cc_flag_${ac_safe}+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
-r_save_CFLAGS="${CFLAGS}"
-CFLAGS="${CFLAGS} -mminimal-toc"
+CFLAGS="${CFLAGS} -mminimal-toc"
 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
@@ -25666,11 +27241,8 @@ fi
       fi
     fi
     ;;
-  cygwin*|mingw*|windows*|winnt)
-    $as_echo "#define HAVE_NO_SYMBOL_UNDERSCORE 1" >>confdefs.h
-
-    ;;
   darwin*)
+    ## which these days mean macOS
     $as_echo "#define HAVE_NO_SYMBOL_UNDERSCORE 1" >>confdefs.h
 
     ;;
@@ -25681,7 +27253,7 @@ fi
       cc|c89)
 	## Luke Tierney says we also need '-Wp,-H16000' which tells the
 	## pre-processor to increase the size of an internal table.  It
-	## seems that src/modules/vfonts/g_her_glyph.c contains a line
+	## seems that src/main/vfonts/g_her_glyph.c contains a line
 	## that is too long for the pre-processor without this flag.
 	separator=""
 test -z "${separator}" && separator=" "
@@ -25741,174 +27313,6 @@ if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
 fi
 
     ;;
-  irix*)
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler needs -OPT:IEEE_NaN_inf=ON" >&5
-$as_echo_n "checking whether C compiler needs -OPT:IEEE_NaN_inf=ON... " >&6; }
-if ${r_cv_c_optieee+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  if test "$cross_compiling" = yes; then :
-  r_cv_c_optieee=no
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-#include <math.h>
-#include <stdlib.h>
-#include <ieeefp.h>
-int main () {
-  double x = 0;
-  fpsetmask(0); x = x / x; exit (x != x);
-}
-
-_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
-  r_cv_c_optieee=yes
-else
-  r_cv_c_optieee=no
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
-  conftest.$ac_objext conftest.beam conftest.$ac_ext
-fi
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $r_cv_c_optieee" >&5
-$as_echo "$r_cv_c_optieee" >&6; }
-if test "${r_cv_c_optieee}" = yes; then
-  separator=""
-test -z "${separator}" && separator=" "
-if test -z "${R_XTRA_CFLAGS}"; then
-  R_XTRA_CFLAGS="-OPT:IEEE_NaN_inf=ON"
-else
-  R_XTRA_CFLAGS="${R_XTRA_CFLAGS}${separator}-OPT:IEEE_NaN_inf=ON"
-fi
-fi
-
-    ## <NOTE>
-    ## We really should test explictly whether the Fortran and C++
-    ## compilers *need* '-OPT:IEEE_NaN_inf=ON'.  Currently, all we do is
-    ## check whether the non-GNU tools *accept* the flag.
-    if test "${G77}" != yes; then
-      ac_safe=_OPT_IEEE_NaN_inf_ON
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${F77} accepts -OPT:IEEE_NaN_inf=ON" >&5
-$as_echo_n "checking whether ${F77} accepts -OPT:IEEE_NaN_inf=ON... " >&6; }
-if eval \${r_cv_prog_f77_flag_${ac_safe}+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  ac_ext=f
-ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5'
-ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_f77_compiler_gnu
-
-r_save_FFLAGS="${FFLAGS}"
-FFLAGS="${FFLAGS} -OPT:IEEE_NaN_inf=ON"
-cat > conftest.$ac_ext <<_ACEOF
-      program main
-
-      end
-_ACEOF
-if ac_fn_f77_try_link "$LINENO"; then :
-  eval "r_cv_prog_f77_flag_${ac_safe}=yes"
-else
-  eval "r_cv_prog_f77_flag_${ac_safe}=no"
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-FFLAGS="${r_save_FFLAGS}"
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
-
-fi
-
-if eval "test \"`echo '$r_cv_prog_f77_flag_'$ac_safe`\" = yes"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-  separator=""
-test -z "${separator}" && separator=" "
-if test -z "${R_XTRA_FFLAGS}"; then
-  R_XTRA_FFLAGS="-OPT:IEEE_NaN_inf=ON"
-else
-  R_XTRA_FFLAGS="${R_XTRA_FFLAGS}${separator}-OPT:IEEE_NaN_inf=ON"
-fi
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-    fi
-    if test "${GXX}" != yes; then
-      ac_safe=_OPT_IEEE_NaN_inf_ON
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX-c++} accepts -OPT:IEEE_NaN_inf=ON" >&5
-$as_echo_n "checking whether ${CXX-c++} accepts -OPT:IEEE_NaN_inf=ON... " >&6; }
-if eval \${r_cv_prog_cxx_flag_${ac_safe}+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  ac_ext=cpp
-ac_cpp='$CXXCPP $CPPFLAGS'
-ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
-
-r_save_CXXFLAGS="${CXXFLAGS}"
-CXXFLAGS="${CXXFLAGS} -OPT:IEEE_NaN_inf=ON"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-#ifdef F77_DUMMY_MAIN
-
-#  ifdef __cplusplus
-     extern "C"
-#  endif
-   int F77_DUMMY_MAIN() { return 1; }
-
-#endif
-int
-main ()
-{
-
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_cxx_try_link "$LINENO"; then :
-  eval "r_cv_prog_cxx_flag_${ac_safe}=yes"
-else
-  eval "r_cv_prog_cxx_flag_${ac_safe}=no"
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-CXXFLAGS="${r_save_CXXFLAGS}"
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
-
-fi
-
-if eval "test \"`echo '$r_cv_prog_cxx_flag_'$ac_safe`\" = yes"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-  separator=""
-test -z "${separator}" && separator=" "
-if test -z "${R_XTRA_CXXFLAGS}"; then
-  R_XTRA_CXXFLAGS="-OPT:IEEE_NaN_inf=ON"
-else
-  R_XTRA_CXXFLAGS="${R_XTRA_CXXFLAGS}${separator}-OPT:IEEE_NaN_inf=ON"
-fi
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-    fi
-    ## </NOTE>
-    ;;
   linux*)
     case  "${CC}" in
       ## Intel compiler
@@ -25993,16 +27397,16 @@ fi
         ;;
     esac
     ;;
+  mingw*|windows*|winnt)
+    $as_echo "#define HAVE_NO_SYMBOL_UNDERSCORE 1" >>confdefs.h
+
+    ;;
   openbsd*)
     if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`"; then
       $as_echo "#define HAVE_NO_SYMBOL_UNDERSCORE 1" >>confdefs.h
 
     fi
     ;;
-  osf*)
-    $as_echo "#define HAVE_NO_SYMBOL_UNDERSCORE 1" >>confdefs.h
-
-    ;;
 esac
 
 if test "${SAFE_FFLAGS+set}" != set; then
@@ -26032,6 +27436,7 @@ fi
 
 
 
+
 ## System type.
 case "${host_os}" in
   linux*)
@@ -26226,7 +27631,7 @@ if test -n "${XMKMF}"; then
   fi
   cxx=`"${srcdir}/tools/GETMAKEVAL" CXX`
   cxx=`echo ${cxx} | sed "s/ .*//"`
-  if test -n "${cxx}" ; then
+  if test -n "${cxx}" -a  -n "${CXX}"; then
     r_cxx_cmd=`echo ${CXX} | sed "s/ .*//"`
     if test "`which ${cxx}`" = "`which ${r_cxx_cmd}`"; then
       cxxpicflags=`"${srcdir}/tools/GETMAKEVAL" CXXPICFLAGS`
@@ -26244,7 +27649,7 @@ if test "${GCC}" = yes; then
 ## has 32k and so can use -fpic.
 ## However, although the gcc docs do not mention it, it seems s390/s390x
 ## also supports and needs -fPIC
-    sparc*|ppc64|powerpc64|s390*)
+    sparc*|ppc64*|powerpc64*|s390*)
       cpicflags="-fPIC"
       ;;
     *)
@@ -26255,7 +27660,7 @@ if test "${GCC}" = yes; then
 fi
 if test "${G77}" = yes; then
   case "${host_cpu}" in
-    sparc*|ppc64|powerpc64|s390*)
+    sparc*|ppc64*|powerpc64*|s390*)
       fpicflags="-fPIC"
       ;;
     *)
@@ -26265,7 +27670,7 @@ if test "${G77}" = yes; then
 fi
 if test "${GXX}" = yes; then
   case "${host_cpu}" in
-    sparc*|ppc64|powerpc64|s390*)
+    sparc*|ppc64*|powerpc64*|s390*)
       cxxpicflags="-fPIC"
       ;;
     *)
@@ -26277,7 +27682,6 @@ fi
 
 ## Step 3.  Individual platform overrides.
 dylib_undefined_allowed=yes
-is_cygwin=no
 case "${host_os}" in
   aix*)
     use_exportfiles=yes
@@ -26308,71 +27712,26 @@ case "${host_os}" in
       shlib_cxxldflags="-shared ${shlib_cxxldflags}"
     fi
     ;;
-  cygwin*)
-    ## All Windows code is PIC
-    cpicflags=
-    cxxpicflags=
-    fpicflags=
-    fcpicflags=
-    SHLIB_EXT=".dll"
-    dylib_undefined_allowed=no
-    is_cygwin=yes
-    main_ldflags="${wl}--large-address-aware ${wl}--stack=0xA00000"
-    ;;
   darwin*)
     darwin_pic="-fPIC"
     dylib_undefined_allowed=no
     darwin_dylib_ldflags="-dynamiclib"
-    ## Want '-mdynamic-no-pic' for GCC 3, says Jan de Leeuw.
-    if test "${GCC}" = yes; then
-      case "${CC_VERSION}" in
-        3.*)
-          separator=""
-test -z "${separator}" && separator=" "
-if test -z "${main_ldflags}"; then
-  main_ldflags="-mdynamic-no-pic"
-else
-  main_ldflags="${main_ldflags}${separator}-mdynamic-no-pic"
-fi ;;
-      esac
-    fi
-    ## some linkers are broken and need to be set to a specific
-    ## OS X version to work better
-    case "${host_os}" in
-       darwin8*)
-          # this is the 'old' way and it doesn't work with recent gcc as the driver
-	  # prepends its own version
-	  ### darwin_min_flag='Wl,-macosx_version_min -Wl,10.4'
-	  # this is the 'new' way, but it's not clear which driver version
-	  # started to support it (Xcode 2.5 is known to work and 2.4 should)
-	  # A work-around for older Xcode is to set MACOSX_DEPLOYMENT_TARGET
-	  # environment variable. It has its own problems, but we may as well
-	  # honor it, assuming that it fixes things.
-	  if test -z "${MACOSX_DEPLOYMENT_TARGET}"; then
-	      darwin_min_flag='-mmacosx-version-min=10.4'
-	  fi
-	  ;;
-       *)
-	  darwin_min_flag=''
-	  ;;
-    esac
-    case "${host_os}" in
-      ## * recent ld has -single_module so it doesn't need -fno-common
-      ##   we have to use dylib instead of a bundle
-      ## * dylib+single_module+flat_namespace=pretty much what other platforms call .so
-      ##   but there can be no multiple symbols (due to flat namespace)
-      ## * since 10.3 we can also use -undefined dynamic_lookup which allows us to
-      ##   use two-level namespace and still have undefined symbols
-      *)
-        ## FIXME: strictly speaking it should be "yes" but libRblas still
-	## needs -lgfortran because the sharing is a one-way street
-        ## dylib_undefined_allowed=yes
-
-	## we have to test this in case an outdated linker or non-Apple compiler is used
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether linker supports dynamic lookup" >&5
+    shlib_ldflags="-dynamiclib -Wl,-headerpad_max_install_names -undefined dynamic_lookup -single_module -multiply_defined suppress"
+    ## * recent ld has -single_module so it doesn't need -fno-common
+    ##   we have to use dylib instead of a bundle
+    ## * dylib+single_module+flat_namespace=pretty much what other platforms call .so
+    ##   but there can be no multiple symbols (due to flat namespace)
+    ## * since 10.3 we can also use -undefined dynamic_lookup which allows us to
+    ##   use two-level namespace and still have undefined symbols
+
+    ## FIXME: strictly speaking it should be "yes" but libRblas still
+    ## needs -lgfortran because the sharing is a one-way street
+    ## dylib_undefined_allowed=yes
+
+    ## we have to test this in case an outdated linker or non-Apple compiler is used
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether linker supports dynamic lookup" >&5
 $as_echo_n "checking whether linker supports dynamic lookup... " >&6; }
-	shlib_ldflags="-dynamiclib -Wl,-headerpad_max_install_names ${darwin_min_flag} -undefined dynamic_lookup -single_module -multiply_defined suppress"
-	if ${r_cv_has_dynlookup+:} false; then :
+    if ${r_cv_has_dynlookup+:} false; then :
   $as_echo_n "(cached) " >&6
 else
 
@@ -26395,37 +27754,36 @@ rm -f libconftest${DYLIB_EXT} conftest.c
 
 fi
 
-	if test -n "${FORCE_FLAT_NAMESPACE}"; then
-	   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Use of flat namespace is requested by user." >&5
+    if test -n "${FORCE_FLAT_NAMESPACE}"; then
+       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Use of flat namespace is requested by user." >&5
 $as_echo "$as_me: WARNING: Use of flat namespace is requested by user." >&2;}
-	   r_cv_has_dynlookup=forced-no
-	fi
-	if test "${r_cv_has_dynlookup}" != "yes"; then
-	   shlib_ldflags="-dynamiclib -flat_namespace -undefined suppress -single_module -multiply_defined suppress"
-	   dylib_undefined_allowed=yes
-	fi
+       r_cv_has_dynlookup=forced-no
+    fi
+    if test "${r_cv_has_dynlookup}" != "yes"; then
+       shlib_ldflags="-dynamiclib -flat_namespace -undefined suppress -single_module -multiply_defined suppress"
+       dylib_undefined_allowed=yes
+    fi
 
-	## we use the same method for shlib and dylib now
-	darwin_dylib_ldflags="${shlib_ldflags}"
-	## side note: we could use flat namespace instead, but there is an exception:
-	## * libRblas must be 2-level, dyn lookup because of xerbla which is undefined
-        ;;
-    esac
+    ## we use the same method for shlib and dylib now
+    darwin_dylib_ldflags="${shlib_ldflags}"
+    ## side note: we could use flat namespace instead, but there is an exception:
+    ## * libRblas must be 2-level, dyn lookup because of xerbla which is undefined
     cpicflags="${darwin_pic}"
     cxxpicflags="${darwin_pic}"
+    ## macOS does not have a Fortran compiler, so this is speculative
     fpicflags="${darwin_pic}"
     shlib_cxxldflags="${shlib_ldflags}"
-    if test "${ac_cv_lib_cc_dynamic_main}" = yes; then
-      ## Could also try grepping LIBS for '-lcc_dynamic' ...
-      SHLIB_LIBADD="-lcc_dynamic"
-    fi
     ;;
   freebsd*)
-    main_ldflags="-export-dynamic"
+    ## maybe this needs to depend on the compiler:
+    ## -export-dynamic used to work, but does not with clang.
+    ## Seems FreeBSD has used the GNU linker since at least 3.0 (Oct 1998)
+    ## We could also use -rdynamic, which seems to work with clang and gcc.
+    main_ldflags="-Wl,--export-dynamic"
     shlib_ldflags="-shared"
     ;;
-  gnu*)				# GNU Hurd
-    main_ldflags="-export-dynamic"
+  gnu*)				# GNU Hurd, see FreeBSD comment
+    main_ldflags="-Wl,--export-dynamic"
     ;;
   hpux*)
     SHLIB_EXT=".sl"
@@ -26455,13 +27813,6 @@ $as_echo "$as_me: WARNING: Use of flat namespace is requested by user." >&2;}
       shlib_cxxldflags="-shared -fPIC"
     fi
     ;;
-  irix*)
-    cpicflags=
-    cxxpicflags=
-    fpicflags=
-    shlib_ldflags="-shared"
-    shlib_cxxldflags="-shared"
-    ;;
   linux*aout)			# GNU Linux/aout
     sed '/HAVE_ELF_H/d' confdefs.h > tmp.h ; mv tmp.h confdefs.h
     ;;
@@ -26497,8 +27848,8 @@ $as_echo "$as_me: WARNING: Use of flat namespace is requested by user." >&2;}
         ;;
     esac
     ## Luke Tierney says that just '-export-dynamic' does not work for
-    ## Intel compilers (icc).
-    ## Could also use -rdynamic
+    ## Intel compilers (icc).  It is accepted by clang but ignored.
+    ## Could also use -rdynamic, at least for gcc and clang.
     main_ldflags="-Wl,--export-dynamic"
     STATICR1="-Wl,--whole-archive"
     STATICR2="-Wl,--no-whole-archive"
@@ -26511,25 +27862,39 @@ $as_echo "$as_me: WARNING: Use of flat namespace is requested by user." >&2;}
     fcpicflags=
     ;;
   netbsd*)
+    ## See the comments about FreeBSD
     if ${CPP} - -dM < /dev/null | grep __ELF__ >/dev/null ; then
-      main_ldflags="-export-dynamic"
+      main_ldflags="-Wl,--export-dynamic"
       shlib_ldflags="-shared"
     else
       shlib_ldflags="-Bshareable"
     fi
     ;;
   openbsd*)
-    ## looks like ${wl} is not defined here.  Perhaps in libtool code?
+    ## ${wl} is defined by libtool configuration code.
+    ## Both -Wl,-export-dynamic and -Wl,--export-dynamic seem to
+    ## work with the GNU linker, but the second is what is documented.
+    ## libtool seems to use -Wl-E , a GNU ld alias of -Wl,--export-dynamic
     if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`"; then
       main_ldflags="${wl}-export-dynamic"
       shlib_ldflags="-shared -fPIC"
     fi
-    ;;
-  osf*)
-    cpicflags=
-    cxxpicflags=
-    fpicflags=
-    shlib_ldflags="-shared"
+    case "${host_cpu}" in
+      powerpc*)
+	## GCC -fpic limits to 2**16 on OpenBSD powerpc.
+	## Error message without -fPIC:
+	##   relocation truncated to fit: R_PPC_GOT16...
+        if test "${GCC}" = yes; then
+          cpicflags="-fPIC"
+        fi
+        if test "${G77}" = yes; then
+          fpicflags="-fPIC"
+        fi
+        if test "${GXX}" = yes; then
+          cxxpicflags="-fPIC"
+        fi
+        ;;
+    esac
     ;;
   solaris*)
 ## SPARC has only an 8k global object table, 1024 entries on 64-bit,
@@ -26598,19 +27963,19 @@ if test -z "${MAIN_LD}"; then
   else
      MAIN_LD="${main_ld}"
   fi
-  separator=""
+fi
+separator=""
 test -z "${separator}" && separator=" "
 if test -z "${MAIN_LDFLAGS}"; then
   MAIN_LDFLAGS="${main_ldflags}"
 else
   MAIN_LDFLAGS="${MAIN_LDFLAGS}${separator}${main_ldflags}"
 fi
-fi
 
 : ${CPICFLAGS="${cpicflags}"}
 if test -z "${CPICFLAGS}"; then
   case "${host_os}" in
-    aix*|cygwin*|irix*|mingw*|osf*)
+    aix*|mingw*)
       ;;
     *)
       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: I could not determine CPICFLAGS." >&5
@@ -26623,7 +27988,7 @@ fi
 : ${FPICFLAGS="${fpicflags}"}
 if test -z "${FPICFLAGS}"; then
   case "${host_os}" in
-    aix*|cygwin*|irix*|mingw*|osf*)
+    aix*|mingw*)
       ;;
     *)
       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: I could not determine FPICFLAGS." >&5
@@ -26634,14 +27999,12 @@ $as_echo "$as_me: WARNING: I could not determine FPICFLAGS." >&2;}
 fi
 
 : ${CXXPICFLAGS="${cxxpicflags}"}
-if test -z "${CXXPICFLAGS}"; then
+if test -n "${CXX}" -a -z "${CXXPICFLAGS}"; then
   case "${host_os}" in
-    aix*|cygwin*|irix*|mingw*|osf*)
+    aix*|mingw*)
       ;;
     *)
       warn_cxxpicflags="I could not determine CXXPICFLAGS."
-      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ${warn_cxxpicflags}" >&5
-$as_echo "$as_me: WARNING: ${warn_cxxpicflags}" >&2;}
       ;;
   esac
 fi
@@ -26682,7 +28045,7 @@ else
   SHLIB_CXXLDFLAGS="${SHLIB_CXXLDFLAGS}${separator}${shlib_cxxldflags}"
 fi
 fi
-if test -z "${SHLIB_CXXLDFLAGS}"; then
+if test  -n "${CXX}" -a -z "${SHLIB_CXXLDFLAGS}"; then
   warn_shlib_cxxldflags="I could not determine SHLIB_CXXLDFLAGS"
   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ${warn_shlib_cxxldflags}" >&5
 $as_echo "$as_me: WARNING: ${warn_shlib_cxxldflags}" >&2;}
@@ -26699,6 +28062,7 @@ dylib_ldflags="${SHLIB_LDFLAGS}"
 LIBR_LDFLAGS=""
 RLAPACK_LDFLAGS=""
 RBLAS_LDFLAGS=""
+R_DYLIB_VERSION_SUFFIX=""
 case "${host_os}" in
   aix*)
     ## Not needed for -brtl linking
@@ -26725,14 +28089,19 @@ case "${host_os}" in
     fi
     ;;
   openbsd*)
-    PACKAGE_VERSION_MAJOR=`echo "${PACKAGE_VERSION}" | \
-      sed -e "s/\.//" -e "s/\..*$//"`
-    PACKAGE_VERSION_MINOR=`echo "${PACKAGE_VERSION}" | \
-      sed -e "s/.*\.\([^.][^.]*$\)/\1/"`
-    DYLIB_EXT=".so.${PACKAGE_VERSION_MAJOR}.${PACKAGE_VERSION_MINOR}"
+    if test -z "${R_DYLIB_VERSION}"; then
+      PACKAGE_VERSION_MAJOR=`echo "${PACKAGE_VERSION}" | \
+        sed -e "s/\.//" -e "s/\..*$//"`
+      PACKAGE_VERSION_MINOR=`echo "${PACKAGE_VERSION}" | \
+        sed -e "s/.*\.\([^.][^.]*$\)/\1/"`
+      R_DYLIB_VERSION="${PACKAGE_VERSION_MAJOR}.${PACKAGE_VERSION_MINOR}"
+    fi
+    R_DYLIB_VERSION_SUFFIX=".${R_DYLIB_VERSION}"
     ;;
 esac
 
+R_DYLIB_EXT="${DYLIB_EXT}${R_DYLIB_VERSION_SUFFIX}"
+
 if test -z "${DYLIB_LD}"; then
   dylib_ld_was_given=no
   DYLIB_LD="${SHLIB_LD}"
@@ -26761,14 +28130,6 @@ else
   DYLIB_UNDEFINED_ALLOWED_FALSE=
 fi
 
- if test "x${is_cygwin}" = xyes; then
-  BUILD_CYGWIN_TRUE=
-  BUILD_CYGWIN_FALSE='#'
-else
-  BUILD_CYGWIN_TRUE='#'
-  BUILD_CYGWIN_FALSE=
-fi
-
 
 
 
@@ -26806,98 +28167,126 @@ fi
 
 
 
-## C++11 and later
+
+## Test support for C++ standards
 r_save_CXX="${CXX}"
 r_save_CXXFLAGS="${CXXFLAGS}"
 
-: ${CXX1X=${CXX}}
-: ${CXX1XFLAGS=${CXXFLAGS}}
-: ${CXX1XPICFLAGS=${CXXPICFLAGS}}
+: ${CXX98=${CXX}}
+: ${CXX98FLAGS=${CXXFLAGS}}
+: ${CXX98PICFLAGS=${CXXPICFLAGS}}
 
-CXX="${CXX1X} ${CXX1XSTD}"
-CXXFLAGS="${CXX1XFLAGS} ${CXX1XPICFLAGS}"
+CXX="${CXX98} ${CXX98STD}"
+CXXFLAGS="${CXX98FLAGS} ${CXX98PICFLAGS}"
 ac_ext=cpp
 ac_cpp='$CXXCPP $CPPFLAGS'
 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
-    ax_cxx_compile_cxx11_required=falsednl
+  ax_cxx_compile_alternatives="98 03"    ax_cxx_compile_cxx98_required=false
   ac_ext=cpp
 ac_cpp='$CXXCPP $CPPFLAGS'
 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
   ac_success=no
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++11 features by default" >&5
-$as_echo_n "checking whether $CXX supports C++11 features by default... " >&6; }
-if ${ax_cv_cxx_compile_cxx11+:} false; then :
+  switch=""
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++98 features by default" >&5
+$as_echo_n "checking whether $CXX supports C++98 features by default... " >&6; }
+if ${ax_cv_cxx_compile_cxx98+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
-  template <typename T>
-    struct check
-    {
-      static_assert(sizeof(int) <= sizeof(T), "not big enough");
-    };
-
-    typedef check<check<bool>> right_angle_brackets;
-
-    int a;
-    decltype(a) b;
-
-    typedef check<int> check_type;
-    check_type c;
-    check_type&& cr = static_cast<check_type&&>(c);
-
-    auto d = a;
+#ifndef __cplusplus
+# error "This is not a C++ compiler"
+#endif
+// or we could test for later than C++03
+#if __cplusplus >= 201103L
+# error "This is a compiler for C++11 or later"
+#endif
 
 _ACEOF
 if ac_fn_cxx_try_compile "$LINENO"; then :
-  ax_cv_cxx_compile_cxx11=yes
+  ax_cv_cxx_compile_cxx98=yes
 else
-  ax_cv_cxx_compile_cxx11=no
+  ax_cv_cxx_compile_cxx98=no
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_cxx_compile_cxx11" >&5
-$as_echo "$ax_cv_cxx_compile_cxx11" >&6; }
-  if test x$ax_cv_cxx_compile_cxx11 = xyes; then
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_cxx_compile_cxx98" >&5
+$as_echo "$ax_cv_cxx_compile_cxx98" >&6; }
+  if test x$ax_cv_cxx_compile_cxx98 = xyes; then
     ac_success=yes
   fi
 
-
-
     if test x$ac_success = xno; then
-    for switch in -std=c++11 -std=c++0x; do
-      cachevar=`$as_echo "ax_cv_cxx_compile_cxx11_$switch" | $as_tr_sh`
-      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++11 features with $switch" >&5
-$as_echo_n "checking whether $CXX supports C++11 features with $switch... " >&6; }
+    for alternative in ${ax_cxx_compile_alternatives}; do
+      switch="-std=gnu++${alternative}"
+      cachevar=`$as_echo "ax_cv_cxx_compile_cxx98_$switch" | $as_tr_sh`
+      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++98 features with $switch" >&5
+$as_echo_n "checking whether $CXX supports C++98 features with $switch... " >&6; }
 if eval \${$cachevar+:} false; then :
   $as_echo_n "(cached) " >&6
 else
-  ac_save_CXXFLAGS="$CXXFLAGS"
-         CXXFLAGS="$CXXFLAGS $switch"
+  ac_save_CXX="$CXX"
+         CXX="$CXX $switch"
          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
-  template <typename T>
-    struct check
-    {
-      static_assert(sizeof(int) <= sizeof(T), "not big enough");
-    };
-
-    typedef check<check<bool>> right_angle_brackets;
+#ifndef __cplusplus
+# error "This is not a C++ compiler"
+#endif
+// or we could test for later than C++03
+#if __cplusplus >= 201103L
+# error "This is a compiler for C++11 or later"
+#endif
 
-    int a;
-    decltype(a) b;
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"; then :
+  eval $cachevar=yes
+else
+  eval $cachevar=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+         CXX="$ac_save_CXX"
+fi
+eval ac_res=\$$cachevar
+	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+      if eval test x\$$cachevar = xyes; then
+        CXX="$CXX $switch"
+        if test -n "$CXXCPP" ; then
+          CXXCPP="$CXXCPP $switch"
+        fi
+        ac_success=yes
+        break
+      fi
+    done
+  fi
 
-    typedef check<int> check_type;
-    check_type c;
-    check_type&& cr = static_cast<check_type&&>(c);
+    if test x$ac_success = xno; then
+                for alternative in ${ax_cxx_compile_alternatives}; do
+      for switch in -std=c++${alternative}; do
+        cachevar=`$as_echo "ax_cv_cxx_compile_cxx98_$switch" | $as_tr_sh`
+        { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++98 features with $switch" >&5
+$as_echo_n "checking whether $CXX supports C++98 features with $switch... " >&6; }
+if eval \${$cachevar+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_save_CXX="$CXX"
+           CXX="$CXX $switch"
+           cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
 
-    auto d = a;
+#ifndef __cplusplus
+# error "This is not a C++ compiler"
+#endif
+// or we could test for later than C++03
+#if __cplusplus >= 201103L
+# error "This is a compiler for C++11 or later"
+#endif
 
 _ACEOF
 if ac_fn_cxx_try_compile "$LINENO"; then :
@@ -26906,14 +28295,21 @@ else
   eval $cachevar=no
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-         CXXFLAGS="$ac_save_CXXFLAGS"
+           CXX="$ac_save_CXX"
 fi
 eval ac_res=\$$cachevar
 	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
 $as_echo "$ac_res" >&6; }
-      if eval test x\$$cachevar = xyes; then
-        CXXFLAGS="$CXXFLAGS $switch"
-        ac_success=yes
+        if eval test x\$$cachevar = xyes; then
+          CXX="$CXX $switch"
+          if test -n "$CXXCPP" ; then
+            CXXCPP="$CXXCPP $switch"
+          fi
+          ac_success=yes
+          break
+        fi
+      done
+      if test x$ac_success = xyes; then
         break
       fi
     done
@@ -26924,25 +28320,20 @@ ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
 
-  if test x$ax_cxx_compile_cxx11_required = xtrue; then
+  if test x$ax_cxx_compile_cxx98_required = xtrue; then
     if test x$ac_success = xno; then
-      as_fn_error $? "*** A compiler with support for C++11 language features is required." "$LINENO" 5
+      as_fn_error $? "*** A compiler with support for C++98 language features is required." "$LINENO" 5
     fi
+  fi
+  if test x$ac_success = xno; then
+    HAVE_CXX98=0
+    { $as_echo "$as_me:${as_lineno-$LINENO}: No compiler with C++98 support was found" >&5
+$as_echo "$as_me: No compiler with C++98 support was found" >&6;}
   else
-    if test x$ac_success = xno; then
-      HAVE_CXX11=0
-      { $as_echo "$as_me:${as_lineno-$LINENO}: No compiler with C++11 support was found" >&5
-$as_echo "$as_me: No compiler with C++11 support was found" >&6;}
-    else
-      HAVE_CXX11=1
-
-$as_echo "#define HAVE_CXX11 1" >>confdefs.h
-
-    fi
-
-
+    HAVE_CXX98=1
   fi
 
+
 ac_ext=c
 ac_cpp='$CPP $CPPFLAGS'
 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
@@ -26950,24 +28341,28 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $
 ac_compiler_gnu=$ac_cv_c_compiler_gnu
 CXX="${r_save_CXX}"
 CXXFLAGS="${r_save_CXXFLAGS}"
-if test "${HAVE_CXX11}" = "1"; then
-  CXX1XSTD="${CXX1XSTD} ${switch}"
+if test "${HAVE_CXX98}" = "1"; then
+  if test "${CXX98STD}"x = "x";  then
+    CXX98STD="${switch}"
+  else
+    CXX98STD="${CXX98STD} ${switch}"
+  fi
 else
-  CXX1X=""
-  CXX1XSTD=""
-  CXX1XFLAGS=""
-  CXX1XPICFLAGS=""
+  CXX98=""
+  CXX98STD=""
+  CXX98FLAGS=""
+  CXX98PICFLAGS=""
 fi
 
 
 
 
 
-if test -z "${SHLIB_CXX1XLD}"; then
-  SHLIB_CXX1XLD="\$(CXX1X) \$(CXX1XSTD)"
+if test -z "${SHLIB_CXX98LD}"; then
+  SHLIB_CXX98LD="\$(CXX98) \$(CXX98STD)"
 fi
 
-: ${SHLIB_CXX1XLDFLAGS=${SHLIB_CXXLDFLAGS}}
+: ${SHLIB_CXX98LDFLAGS=${SHLIB_CXXLDFLAGS}}
 
 
 
@@ -26977,416 +28372,5445 @@ fi
 
 
 
+r_save_CXX="${CXX}"
+r_save_CXXFLAGS="${CXXFLAGS}"
 
-### OpenMP.
-
-## The basic checking is performed via AC_OPENMP added in Autoconf 2.62,
-## which we already called for determining the appropriate flags for the
-## C, C++, Fortran 77, Fortran compiler/linker.  Note that this gives
-## variables OPENMP_CFLAGS etc., which are meant to be used for *both*
-## compiling and linking.  So we can really only used them provided that
-## we use the respective compilers for linking as well (or we need a
-## different mechanism for determining what is needed).
-##
-## For compiling R itself, we use MAIN_LD and DYLIB_LD for linking, both
-## defaulting to CC.  Hence:
-##
-##    If both MAIN_LD and DYLIB_LD were not specified by the user and
-##    equal CC and this was determined to support OpenMP, then we (try
-##    to) provide OpenMP support by adding OPENMP_CFLAGS to the linker
-##    flags and OPENMP_CFLAGS and OPENMP_FFLAGS to the C and Fortran 77
-##    compiler flags, and defining HAVE_OPENMP.
-##
-## (The Fortran 77 compiler is never used for linking by default.)
+: ${CXX11=${CXX}}
+: ${CXX11FLAGS=${CXXFLAGS}}
+: ${CXX11PICFLAGS=${CXXPICFLAGS}}
 
-if test "x${main_ld_was_given}" = xno -a "${MAIN_LD}" = "\$(CC)" -a \
-        "x${dylib_ld_was_given}" = xno -a "${DYLIB_LD}" = "\$(CC)" -a \
-        "x${ac_cv_prog_c_openmp}" != "xunsupported" -a \
-        "x${ac_cv_prog_c_openmp}" != "x"; then
-  R_OPENMP_CFLAGS="${OPENMP_CFLAGS}"
-  R_OPENMP_FFLAGS="${OPENMP_FFLAGS}"
-  separator=""
-test -z "${separator}" && separator=" "
-if test -z "${MAIN_LDFLAGS}"; then
-  MAIN_LDFLAGS="${OPENMP_CFLAGS}"
-else
-  MAIN_LDFLAGS="${MAIN_LDFLAGS}${separator}${OPENMP_CFLAGS}"
-fi
-  separator=""
-test -z "${separator}" && separator=" "
-if test -z "${DYLIB_LDFLAGS}"; then
-  DYLIB_LDFLAGS="${OPENMP_CFLAGS}"
+CXX="${CXX11} ${CXX11STD}"
+CXXFLAGS="${CXX11FLAGS} ${CXX11PICFLAGS}"
+ac_ext=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+  ax_cxx_compile_alternatives="11 0x"    ax_cxx_compile_cxx11_required=false
+  ac_ext=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+  ac_success=no
+  switch=""
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++11 features by default" >&5
+$as_echo_n "checking whether $CXX supports C++11 features by default... " >&6; }
+if ${ax_cv_cxx_compile_cxx11+:} false; then :
+  $as_echo_n "(cached) " >&6
 else
-  DYLIB_LDFLAGS="${DYLIB_LDFLAGS}${separator}${OPENMP_CFLAGS}"
-fi
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#ifndef __cplusplus
+# error "This is not a C++ compiler"
+#elif defined(__GNUC__)  && __GNUC__ == 4 && __GNUC_MINOR__ < 8
 
-$as_echo "#define HAVE_OPENMP 1" >>confdefs.h
 
-else
-  R_OPENMP_CFLAGS=
-  R_OPENMP_FFLAGS=
-fi
+  //This is the earlier, less stringent test used in R 3.3.0
+  //Keep this for long-term support platforms with older gcc compilers
 
+  template <typename T>
+  struct check
+  {
+    static_assert(sizeof(int) <= sizeof(T), "not big enough");
+  };
 
+  typedef check<check<bool>> right_angle_brackets;
 
-## For compiling package code, we use SHLIB_FCLD, SHLIB_CXXLD or
-## SHLIB_LD for linking, depending on whether the package contains
-## Fortran (90/95) code, C++ (or ObjC) code, or "just" C and Fortran 77.
-## However, we (currently) do not conditionalize compilation flags.  So
-## the only "safe" thing we can do for now is:
-##
-##    If none of SHLIB_LD, SHLIB_CXXLD and SHLIB_FCLD were specified by
-##    the user and equal CC, CXX and FC, respectively, and these were
-##    determined to support OpenMP, the we try to provide OpenMP support
-##    for packages by adding OPENMP_FCFLAGS, OPENMP_CXXFLAGS and
-##    OPENMP_CFLAGS to the respective linker flags, and add the OPENMP
-##    flags to all (C, C++, Fortran and Fortran 77) compiler flags.
+  int a;
+  decltype(a) b;
 
-## <FIXME>
-## Need to do this after configuring Fortran 90/95 support, which comes
-## way below: should this be moved up to the compiler section?
-## </FIXME>
+  typedef check<int> check_type;
+  check_type c;
+  check_type&& cr = static_cast<check_type&&>(c);
 
-### Now we have found all the flags, we need to use them to test appropriately.
-### We don't currently have any C++ tests, but future-proof.
-### In principle we should do this before testing for C-Fortran compatibility.
+  auto d = a;
 
-CPPFLAGS_KEEP=${CPPFLAGS}
-CFLAGS_KEEP=${CFLAGS}
-FFLAGS_KEEP=${FFLAGS}
-CXXFLAGS_KEEP=${CXXFLAGS}
-CPPFLAGS="${CPPFLAGS} ${R_XTRA_CPPFLAGS}"
-if test "${want_R_shlib}" = yes; then
-  CFLAGS="${CFLAGS} ${CPICFLAGS} ${R_XTRA_CFLAGS}"
-  FFLAGS="${FFLAGS} ${FPICFLAGS} ${R_XTRA_FFLAGS}"
-  CXXFLAGS="${CXXFLAGS} ${CXXPICFLAGS} ${R_XTRA_CXXFLAGS}"
-else
-  CFLAGS="${CFLAGS} ${R_XTRA_CFLAGS}"
-  FFLAGS="${FFLAGS} ${R_XTRA_FFLAGS}"
-  CXXFLAGS="${CXXFLAGS} ${R_XTRA_CXXFLAGS}"
-fi
 
-### * Checks for library functions.
+#elif __cplusplus < 201103L
+# error "This is not a C++11 compiler"
+#elif __cplusplus >= 201402L
+# error "This is a C++14 compiler"
+#else
 
-ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
-if test "x$ac_cv_type_off_t" = xyes; then :
 
-cat >>confdefs.h <<_ACEOF
-#define HAVE_OFF_T 1
-_ACEOF
+namespace cxx11
+{
 
+  namespace test_static_assert
+  {
 
-fi
+    template <typename T>
+    struct check
+    {
+      static_assert(sizeof(int) <= sizeof(T), "not big enough");
+    };
 
-# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
-# for constant arguments.  Useless!
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5
-$as_echo_n "checking for working alloca.h... " >&6; }
-if ${ac_cv_working_alloca_h+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <alloca.h>
-#ifdef F77_DUMMY_MAIN
+  }
 
-#  ifdef __cplusplus
-     extern "C"
-#  endif
-   int F77_DUMMY_MAIN() { return 1; }
+  namespace test_final_override
+  {
 
-#endif
-int
-main ()
-{
-char *p = (char *) alloca (2 * sizeof (int));
-			  if (p) return 0;
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  ac_cv_working_alloca_h=yes
-else
-  ac_cv_working_alloca_h=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5
-$as_echo "$ac_cv_working_alloca_h" >&6; }
-if test $ac_cv_working_alloca_h = yes; then
+    struct Base
+    {
+      virtual void f() {}
+    };
 
-$as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h
+    struct Derived : public Base
+    {
+      virtual void f() override {}
+    };
 
-fi
+  }
 
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5
-$as_echo_n "checking for alloca... " >&6; }
-if ${ac_cv_func_alloca_works+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#ifdef __GNUC__
-# define alloca __builtin_alloca
-#else
-# ifdef _MSC_VER
-#  include <malloc.h>
-#  define alloca _alloca
-# else
-#  ifdef HAVE_ALLOCA_H
-#   include <alloca.h>
-#  else
-#   ifdef _AIX
- #pragma alloca
-#   else
-#    ifndef alloca /* predefined by HP cc +Olibcalls */
-void *alloca (size_t);
-#    endif
-#   endif
-#  endif
-# endif
-#endif
+  namespace test_double_right_angle_brackets
+  {
 
-#ifdef F77_DUMMY_MAIN
+    template < typename T >
+    struct check {};
 
-#  ifdef __cplusplus
-     extern "C"
-#  endif
-   int F77_DUMMY_MAIN() { return 1; }
+    typedef check<void> single_type;
+    typedef check<check<void>> double_type;
+    typedef check<check<check<void>>> triple_type;
+    typedef check<check<check<check<void>>>> quadruple_type;
 
-#endif
-int
-main ()
-{
-char *p = (char *) alloca (1);
-				    if (p) return 0;
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  ac_cv_func_alloca_works=yes
-else
-  ac_cv_func_alloca_works=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5
-$as_echo "$ac_cv_func_alloca_works" >&6; }
+  }
 
-if test $ac_cv_func_alloca_works = yes; then
+  namespace test_decltype
+  {
 
-$as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
+    int
+    f()
+    {
+      int a = 1;
+      decltype(a) b = 2;
+      return a + b;
+    }
 
-else
-  # The SVR3 libPW and SVR4 libucb both contain incompatible functions
-# that cause trouble.  Some versions do not even contain alloca or
-# contain a buggy version.  If you still want to use their alloca,
-# use ar to extract alloca.o from them instead of compiling alloca.c.
+  }
 
-ALLOCA=\${LIBOBJDIR}alloca.$ac_objext
+  namespace test_type_deduction
+  {
 
-$as_echo "#define C_ALLOCA 1" >>confdefs.h
+    template < typename T1, typename T2 >
+    struct is_same
+    {
+      static const bool value = false;
+    };
 
+    template < typename T >
+    struct is_same<T, T>
+    {
+      static const bool value = true;
+    };
 
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5
-$as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; }
-if ${ac_cv_os_cray+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#if defined CRAY && ! defined CRAY2
-webecray
-#else
-wenotbecray
-#endif
+    template < typename T1, typename T2 >
+    auto
+    add(T1 a1, T2 a2) -> decltype(a1 + a2)
+    {
+      return a1 + a2;
+    }
 
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  $EGREP "webecray" >/dev/null 2>&1; then :
-  ac_cv_os_cray=yes
-else
-  ac_cv_os_cray=no
-fi
-rm -f conftest*
+    int
+    test(const int c, volatile int v)
+    {
+      static_assert(is_same<int, decltype(0)>::value == true, "");
+      static_assert(is_same<int, decltype(c)>::value == false, "");
+      static_assert(is_same<int, decltype(v)>::value == false, "");
+      auto ac = c;
+      auto av = v;
+      auto sumi = ac + av + 'x';
+      auto sumf = ac + av + 1.0;
+      static_assert(is_same<int, decltype(ac)>::value == true, "");
+      static_assert(is_same<int, decltype(av)>::value == true, "");
+      static_assert(is_same<int, decltype(sumi)>::value == true, "");
+      static_assert(is_same<int, decltype(sumf)>::value == false, "");
+      static_assert(is_same<int, decltype(add(c, v))>::value == true, "");
+      return (sumf > 0.0) ? sumi : add(c, v);
+    }
 
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5
-$as_echo "$ac_cv_os_cray" >&6; }
-if test $ac_cv_os_cray = yes; then
-  for ac_func in _getb67 GETB67 getb67; do
-    as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
-ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
-if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
+  }
 
-cat >>confdefs.h <<_ACEOF
-#define CRAY_STACKSEG_END $ac_func
-_ACEOF
+  namespace test_noexcept
+  {
 
-    break
-fi
+    int f() { return 0; }
+    int g() noexcept { return 0; }
 
-  done
-fi
+    static_assert(noexcept(f()) == false, "");
+    static_assert(noexcept(g()) == true, "");
 
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5
-$as_echo_n "checking stack direction for C alloca... " >&6; }
-if ${ac_cv_c_stack_direction+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  if test "$cross_compiling" = yes; then :
-  ac_cv_c_stack_direction=0
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-$ac_includes_default
-int
-find_stack_direction (int *addr, int depth)
-{
-  int dir, dummy = 0;
-  if (! addr)
-    addr = &dummy;
-  *addr = addr < &dummy ? 1 : addr == &dummy ? 0 : -1;
-  dir = depth ? find_stack_direction (addr, depth - 1) : 0;
-  return dir + dummy;
-}
+  }
 
-int
-main (int argc, char **argv)
-{
-  return find_stack_direction (0, argc + !argv + 20) < 0;
-}
-_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
-  ac_cv_c_stack_direction=1
-else
-  ac_cv_c_stack_direction=-1
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
-  conftest.$ac_objext conftest.beam conftest.$ac_ext
-fi
+  namespace test_constexpr
+  {
 
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5
-$as_echo "$ac_cv_c_stack_direction" >&6; }
-cat >>confdefs.h <<_ACEOF
-#define STACK_DIRECTION $ac_cv_c_stack_direction
-_ACEOF
+    template < typename CharT >
+    unsigned long constexpr
+    strlen_c_r(const CharT *const s, const unsigned long acc) noexcept
+    {
+      return *s ? strlen_c_r(s + 1, acc + 1) : acc;
+    }
 
+    template < typename CharT >
+    unsigned long constexpr
+    strlen_c(const CharT *const s) noexcept
+    {
+      return strlen_c_r(s, 0UL);
+    }
 
-fi
+    static_assert(strlen_c("") == 0UL, "");
+    static_assert(strlen_c("1") == 1UL, "");
+    static_assert(strlen_c("example") == 7UL, "");
+    static_assert(strlen_c("another\0example") == 7UL, "");
 
-ac_fn_c_check_decl "$LINENO" "alloca" "ac_cv_have_decl_alloca" "#ifdef HAVE_ALLOCA_H
-# include <alloca.h>
-#endif
-"
-if test "x$ac_cv_have_decl_alloca" = xyes; then :
-  ac_have_decl=1
-else
-  ac_have_decl=0
-fi
+  }
 
-cat >>confdefs.h <<_ACEOF
-#define HAVE_DECL_ALLOCA $ac_have_decl
-_ACEOF
+  namespace test_rvalue_references
+  {
 
+    template < int N >
+    struct answer
+    {
+      static constexpr int value = N;
+    };
 
-## C99 functions:
-## not all C99 runtimes are complete,
-## but we have substitutes for expm1 hypot log1p and (internally) nearbyint[l]
-## FreeBSD 10 still lacks log1pl
-## FreeBSD 8.2 lacks log2
-## FreeBSD 7.3 lacks nearbyintl/rintl (nearbyint appeared in 5.2)
-## Apparently rint was once broken on HP-UX: undefine HAVE_RINT for such platforms
-## Cygwin and FreeBSD lack powl
-## Cygwin has rintl but not nearbyintl
-for ac_func in expm1 hypot log1p log1pl log2 log10 nearbyint nearbyintl powl rint rintl
-do
-as_ac_Symbol=`$as_echo "ac_cv_have_decl_$ac_func" | $as_tr_sh`
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $ac_func exists and is declared" >&5
-$as_echo_n "checking whether $ac_func exists and is declared... " >&6; }
-if eval \${$as_ac_Symbol+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <math.h>
+    answer<1> f(int&)       { return answer<1>(); }
+    answer<2> f(const int&) { return answer<2>(); }
+    answer<3> f(int&&)      { return answer<3>(); }
 
-#ifdef F77_DUMMY_MAIN
+    void
+    test()
+    {
+      int i = 0;
+      const int c = 0;
+      static_assert(decltype(f(i))::value == 1, "");
+      static_assert(decltype(f(c))::value == 2, "");
+      static_assert(decltype(f(0))::value == 3, "");
+    }
 
-#  ifdef __cplusplus
-     extern "C"
-#  endif
-   int F77_DUMMY_MAIN() { return 1; }
+  }
 
-#endif
-int
-main ()
-{
-#ifndef $ac_func
-  char *p = (char *) $ac_func;
-#endif
+  namespace test_uniform_initialization
+  {
 
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  eval "$as_ac_Symbol=yes"
-else
-  eval "$as_ac_Symbol=no"
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-fi
-eval ac_res=\$$as_ac_Symbol
-	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
-if test `eval 'as_val=${'$as_ac_Symbol'};$as_echo "$as_val"'` = yes; then :
-  cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
-_ACEOF
+    struct test
+    {
+      static const int zero {};
+      static const int one {1};
+    };
 
-fi
-done
+    static_assert(test::zero == 0, "");
+    static_assert(test::one == 1, "");
 
-## va_copy is C99: required as from R 2.13.0
-for ac_func in va_copy
-do
-as_ac_Symbol=`$as_echo "ac_cv_have_decl_$ac_func" | $as_tr_sh`
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $ac_func exists and is declared" >&5
-$as_echo_n "checking whether $ac_func exists and is declared... " >&6; }
-if eval \${$as_ac_Symbol+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <stdarg.h>
+  }
 
-#ifdef F77_DUMMY_MAIN
+  namespace test_lambdas
+  {
 
-#  ifdef __cplusplus
-     extern "C"
-#  endif
-   int F77_DUMMY_MAIN() { return 1; }
+    void
+    test1()
+    {
+      auto lambda1 = [](){};
+      auto lambda2 = lambda1;
+      lambda1();
+      lambda2();
+    }
 
-#endif
-int
-main ()
-{
-#ifndef $ac_func
-  char *p = (char *) $ac_func;
-#endif
+    int
+    test2()
+    {
+      auto a = [](int i, int j){ return i + j; }(1, 2);
+      auto b = []() -> int { return '0'; }();
+      auto c = [=](){ return a + b; }();
+      auto d = [&](){ return c; }();
+      auto e = [a, &b](int x) mutable {
+        const auto identity = [](int y){ return y; };
+        for (auto i = 0; i < a; ++i)
+          a += b--;
+        return x + identity(a + b);
+      }(0);
+      return a + b + c + d + e;
+    }
 
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
+    int
+    test3()
+    {
+      const auto nullary = [](){ return 0; };
+      const auto unary = [](int x){ return x; };
+      using nullary_t = decltype(nullary);
+      using unary_t = decltype(unary);
+      const auto higher1st = [](nullary_t f){ return f(); };
+      const auto higher2nd = [unary](nullary_t f1){
+        return [unary, f1](unary_t f2){ return f2(unary(f1())); };
+      };
+      return higher1st(nullary) + higher2nd(nullary)(unary);
+    }
+
+  }
+
+  namespace test_variadic_templates
+  {
+
+    template <int...>
+    struct sum;
+
+    template <int N0, int... N1toN>
+    struct sum<N0, N1toN...>
+    {
+      /*
+        Original test code used the auto keyword instead of declaring
+        the type of "value" to be int. This causes Oracle Solaris Studio
+        12.4 to fail. This is possibly a compiler bug but in any case
+        current test code works around it by an explicit declaration.
+      */
+      static constexpr int value = N0 + sum<N1toN...>::value;
+    };
+
+    template <>
+    struct sum<>
+    {
+      static constexpr auto value = 0;
+    };
+
+    static_assert(sum<>::value == 0, "");
+    static_assert(sum<1>::value == 1, "");
+    static_assert(sum<23>::value == 23, "");
+    static_assert(sum<1, 2>::value == 3, "");
+    static_assert(sum<5, 5, 11>::value == 21, "");
+    static_assert(sum<2, 3, 5, 7, 11, 13>::value == 41, "");
+
+  }
+
+  // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae
+  // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function
+  // because of this.
+  namespace test_template_alias_sfinae
+  {
+
+    struct foo {};
+
+    template<typename T>
+    using member = typename T::member_type;
+
+    template<typename T>
+    void func(...) {}
+
+    template<typename T>
+    void func(member<T>*) {}
+
+    void test();
+
+    void test() { func<foo>(0); }
+
+  }
+
+}  // namespace cxx11
+
+
+#endif
+
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"; then :
+  ax_cv_cxx_compile_cxx11=yes
+else
+  ax_cv_cxx_compile_cxx11=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_cxx_compile_cxx11" >&5
+$as_echo "$ax_cv_cxx_compile_cxx11" >&6; }
+  if test x$ax_cv_cxx_compile_cxx11 = xyes; then
+    ac_success=yes
+  fi
+
+    if test x$ac_success = xno; then
+    for alternative in ${ax_cxx_compile_alternatives}; do
+      switch="-std=gnu++${alternative}"
+      cachevar=`$as_echo "ax_cv_cxx_compile_cxx11_$switch" | $as_tr_sh`
+      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++11 features with $switch" >&5
+$as_echo_n "checking whether $CXX supports C++11 features with $switch... " >&6; }
+if eval \${$cachevar+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_save_CXX="$CXX"
+         CXX="$CXX $switch"
+         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#ifndef __cplusplus
+# error "This is not a C++ compiler"
+#elif defined(__GNUC__)  && __GNUC__ == 4 && __GNUC_MINOR__ < 8
+
+
+  //This is the earlier, less stringent test used in R 3.3.0
+  //Keep this for long-term support platforms with older gcc compilers
+
+  template <typename T>
+  struct check
+  {
+    static_assert(sizeof(int) <= sizeof(T), "not big enough");
+  };
+
+  typedef check<check<bool>> right_angle_brackets;
+
+  int a;
+  decltype(a) b;
+
+  typedef check<int> check_type;
+  check_type c;
+  check_type&& cr = static_cast<check_type&&>(c);
+
+  auto d = a;
+
+
+#elif __cplusplus < 201103L
+# error "This is not a C++11 compiler"
+#elif __cplusplus >= 201402L
+# error "This is a C++14 compiler"
+#else
+
+
+namespace cxx11
+{
+
+  namespace test_static_assert
+  {
+
+    template <typename T>
+    struct check
+    {
+      static_assert(sizeof(int) <= sizeof(T), "not big enough");
+    };
+
+  }
+
+  namespace test_final_override
+  {
+
+    struct Base
+    {
+      virtual void f() {}
+    };
+
+    struct Derived : public Base
+    {
+      virtual void f() override {}
+    };
+
+  }
+
+  namespace test_double_right_angle_brackets
+  {
+
+    template < typename T >
+    struct check {};
+
+    typedef check<void> single_type;
+    typedef check<check<void>> double_type;
+    typedef check<check<check<void>>> triple_type;
+    typedef check<check<check<check<void>>>> quadruple_type;
+
+  }
+
+  namespace test_decltype
+  {
+
+    int
+    f()
+    {
+      int a = 1;
+      decltype(a) b = 2;
+      return a + b;
+    }
+
+  }
+
+  namespace test_type_deduction
+  {
+
+    template < typename T1, typename T2 >
+    struct is_same
+    {
+      static const bool value = false;
+    };
+
+    template < typename T >
+    struct is_same<T, T>
+    {
+      static const bool value = true;
+    };
+
+    template < typename T1, typename T2 >
+    auto
+    add(T1 a1, T2 a2) -> decltype(a1 + a2)
+    {
+      return a1 + a2;
+    }
+
+    int
+    test(const int c, volatile int v)
+    {
+      static_assert(is_same<int, decltype(0)>::value == true, "");
+      static_assert(is_same<int, decltype(c)>::value == false, "");
+      static_assert(is_same<int, decltype(v)>::value == false, "");
+      auto ac = c;
+      auto av = v;
+      auto sumi = ac + av + 'x';
+      auto sumf = ac + av + 1.0;
+      static_assert(is_same<int, decltype(ac)>::value == true, "");
+      static_assert(is_same<int, decltype(av)>::value == true, "");
+      static_assert(is_same<int, decltype(sumi)>::value == true, "");
+      static_assert(is_same<int, decltype(sumf)>::value == false, "");
+      static_assert(is_same<int, decltype(add(c, v))>::value == true, "");
+      return (sumf > 0.0) ? sumi : add(c, v);
+    }
+
+  }
+
+  namespace test_noexcept
+  {
+
+    int f() { return 0; }
+    int g() noexcept { return 0; }
+
+    static_assert(noexcept(f()) == false, "");
+    static_assert(noexcept(g()) == true, "");
+
+  }
+
+  namespace test_constexpr
+  {
+
+    template < typename CharT >
+    unsigned long constexpr
+    strlen_c_r(const CharT *const s, const unsigned long acc) noexcept
+    {
+      return *s ? strlen_c_r(s + 1, acc + 1) : acc;
+    }
+
+    template < typename CharT >
+    unsigned long constexpr
+    strlen_c(const CharT *const s) noexcept
+    {
+      return strlen_c_r(s, 0UL);
+    }
+
+    static_assert(strlen_c("") == 0UL, "");
+    static_assert(strlen_c("1") == 1UL, "");
+    static_assert(strlen_c("example") == 7UL, "");
+    static_assert(strlen_c("another\0example") == 7UL, "");
+
+  }
+
+  namespace test_rvalue_references
+  {
+
+    template < int N >
+    struct answer
+    {
+      static constexpr int value = N;
+    };
+
+    answer<1> f(int&)       { return answer<1>(); }
+    answer<2> f(const int&) { return answer<2>(); }
+    answer<3> f(int&&)      { return answer<3>(); }
+
+    void
+    test()
+    {
+      int i = 0;
+      const int c = 0;
+      static_assert(decltype(f(i))::value == 1, "");
+      static_assert(decltype(f(c))::value == 2, "");
+      static_assert(decltype(f(0))::value == 3, "");
+    }
+
+  }
+
+  namespace test_uniform_initialization
+  {
+
+    struct test
+    {
+      static const int zero {};
+      static const int one {1};
+    };
+
+    static_assert(test::zero == 0, "");
+    static_assert(test::one == 1, "");
+
+  }
+
+  namespace test_lambdas
+  {
+
+    void
+    test1()
+    {
+      auto lambda1 = [](){};
+      auto lambda2 = lambda1;
+      lambda1();
+      lambda2();
+    }
+
+    int
+    test2()
+    {
+      auto a = [](int i, int j){ return i + j; }(1, 2);
+      auto b = []() -> int { return '0'; }();
+      auto c = [=](){ return a + b; }();
+      auto d = [&](){ return c; }();
+      auto e = [a, &b](int x) mutable {
+        const auto identity = [](int y){ return y; };
+        for (auto i = 0; i < a; ++i)
+          a += b--;
+        return x + identity(a + b);
+      }(0);
+      return a + b + c + d + e;
+    }
+
+    int
+    test3()
+    {
+      const auto nullary = [](){ return 0; };
+      const auto unary = [](int x){ return x; };
+      using nullary_t = decltype(nullary);
+      using unary_t = decltype(unary);
+      const auto higher1st = [](nullary_t f){ return f(); };
+      const auto higher2nd = [unary](nullary_t f1){
+        return [unary, f1](unary_t f2){ return f2(unary(f1())); };
+      };
+      return higher1st(nullary) + higher2nd(nullary)(unary);
+    }
+
+  }
+
+  namespace test_variadic_templates
+  {
+
+    template <int...>
+    struct sum;
+
+    template <int N0, int... N1toN>
+    struct sum<N0, N1toN...>
+    {
+      /*
+        Original test code used the auto keyword instead of declaring
+        the type of "value" to be int. This causes Oracle Solaris Studio
+        12.4 to fail. This is possibly a compiler bug but in any case
+        current test code works around it by an explicit declaration.
+      */
+      static constexpr int value = N0 + sum<N1toN...>::value;
+    };
+
+    template <>
+    struct sum<>
+    {
+      static constexpr auto value = 0;
+    };
+
+    static_assert(sum<>::value == 0, "");
+    static_assert(sum<1>::value == 1, "");
+    static_assert(sum<23>::value == 23, "");
+    static_assert(sum<1, 2>::value == 3, "");
+    static_assert(sum<5, 5, 11>::value == 21, "");
+    static_assert(sum<2, 3, 5, 7, 11, 13>::value == 41, "");
+
+  }
+
+  // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae
+  // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function
+  // because of this.
+  namespace test_template_alias_sfinae
+  {
+
+    struct foo {};
+
+    template<typename T>
+    using member = typename T::member_type;
+
+    template<typename T>
+    void func(...) {}
+
+    template<typename T>
+    void func(member<T>*) {}
+
+    void test();
+
+    void test() { func<foo>(0); }
+
+  }
+
+}  // namespace cxx11
+
+
+#endif
+
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"; then :
+  eval $cachevar=yes
+else
+  eval $cachevar=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+         CXX="$ac_save_CXX"
+fi
+eval ac_res=\$$cachevar
+	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+      if eval test x\$$cachevar = xyes; then
+        CXX="$CXX $switch"
+        if test -n "$CXXCPP" ; then
+          CXXCPP="$CXXCPP $switch"
+        fi
+        ac_success=yes
+        break
+      fi
+    done
+  fi
+
+    if test x$ac_success = xno; then
+                for alternative in ${ax_cxx_compile_alternatives}; do
+      for switch in -std=c++${alternative}; do
+        cachevar=`$as_echo "ax_cv_cxx_compile_cxx11_$switch" | $as_tr_sh`
+        { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++11 features with $switch" >&5
+$as_echo_n "checking whether $CXX supports C++11 features with $switch... " >&6; }
+if eval \${$cachevar+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_save_CXX="$CXX"
+           CXX="$CXX $switch"
+           cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#ifndef __cplusplus
+# error "This is not a C++ compiler"
+#elif defined(__GNUC__)  && __GNUC__ == 4 && __GNUC_MINOR__ < 8
+
+
+  //This is the earlier, less stringent test used in R 3.3.0
+  //Keep this for long-term support platforms with older gcc compilers
+
+  template <typename T>
+  struct check
+  {
+    static_assert(sizeof(int) <= sizeof(T), "not big enough");
+  };
+
+  typedef check<check<bool>> right_angle_brackets;
+
+  int a;
+  decltype(a) b;
+
+  typedef check<int> check_type;
+  check_type c;
+  check_type&& cr = static_cast<check_type&&>(c);
+
+  auto d = a;
+
+
+#elif __cplusplus < 201103L
+# error "This is not a C++11 compiler"
+#elif __cplusplus >= 201402L
+# error "This is a C++14 compiler"
+#else
+
+
+namespace cxx11
+{
+
+  namespace test_static_assert
+  {
+
+    template <typename T>
+    struct check
+    {
+      static_assert(sizeof(int) <= sizeof(T), "not big enough");
+    };
+
+  }
+
+  namespace test_final_override
+  {
+
+    struct Base
+    {
+      virtual void f() {}
+    };
+
+    struct Derived : public Base
+    {
+      virtual void f() override {}
+    };
+
+  }
+
+  namespace test_double_right_angle_brackets
+  {
+
+    template < typename T >
+    struct check {};
+
+    typedef check<void> single_type;
+    typedef check<check<void>> double_type;
+    typedef check<check<check<void>>> triple_type;
+    typedef check<check<check<check<void>>>> quadruple_type;
+
+  }
+
+  namespace test_decltype
+  {
+
+    int
+    f()
+    {
+      int a = 1;
+      decltype(a) b = 2;
+      return a + b;
+    }
+
+  }
+
+  namespace test_type_deduction
+  {
+
+    template < typename T1, typename T2 >
+    struct is_same
+    {
+      static const bool value = false;
+    };
+
+    template < typename T >
+    struct is_same<T, T>
+    {
+      static const bool value = true;
+    };
+
+    template < typename T1, typename T2 >
+    auto
+    add(T1 a1, T2 a2) -> decltype(a1 + a2)
+    {
+      return a1 + a2;
+    }
+
+    int
+    test(const int c, volatile int v)
+    {
+      static_assert(is_same<int, decltype(0)>::value == true, "");
+      static_assert(is_same<int, decltype(c)>::value == false, "");
+      static_assert(is_same<int, decltype(v)>::value == false, "");
+      auto ac = c;
+      auto av = v;
+      auto sumi = ac + av + 'x';
+      auto sumf = ac + av + 1.0;
+      static_assert(is_same<int, decltype(ac)>::value == true, "");
+      static_assert(is_same<int, decltype(av)>::value == true, "");
+      static_assert(is_same<int, decltype(sumi)>::value == true, "");
+      static_assert(is_same<int, decltype(sumf)>::value == false, "");
+      static_assert(is_same<int, decltype(add(c, v))>::value == true, "");
+      return (sumf > 0.0) ? sumi : add(c, v);
+    }
+
+  }
+
+  namespace test_noexcept
+  {
+
+    int f() { return 0; }
+    int g() noexcept { return 0; }
+
+    static_assert(noexcept(f()) == false, "");
+    static_assert(noexcept(g()) == true, "");
+
+  }
+
+  namespace test_constexpr
+  {
+
+    template < typename CharT >
+    unsigned long constexpr
+    strlen_c_r(const CharT *const s, const unsigned long acc) noexcept
+    {
+      return *s ? strlen_c_r(s + 1, acc + 1) : acc;
+    }
+
+    template < typename CharT >
+    unsigned long constexpr
+    strlen_c(const CharT *const s) noexcept
+    {
+      return strlen_c_r(s, 0UL);
+    }
+
+    static_assert(strlen_c("") == 0UL, "");
+    static_assert(strlen_c("1") == 1UL, "");
+    static_assert(strlen_c("example") == 7UL, "");
+    static_assert(strlen_c("another\0example") == 7UL, "");
+
+  }
+
+  namespace test_rvalue_references
+  {
+
+    template < int N >
+    struct answer
+    {
+      static constexpr int value = N;
+    };
+
+    answer<1> f(int&)       { return answer<1>(); }
+    answer<2> f(const int&) { return answer<2>(); }
+    answer<3> f(int&&)      { return answer<3>(); }
+
+    void
+    test()
+    {
+      int i = 0;
+      const int c = 0;
+      static_assert(decltype(f(i))::value == 1, "");
+      static_assert(decltype(f(c))::value == 2, "");
+      static_assert(decltype(f(0))::value == 3, "");
+    }
+
+  }
+
+  namespace test_uniform_initialization
+  {
+
+    struct test
+    {
+      static const int zero {};
+      static const int one {1};
+    };
+
+    static_assert(test::zero == 0, "");
+    static_assert(test::one == 1, "");
+
+  }
+
+  namespace test_lambdas
+  {
+
+    void
+    test1()
+    {
+      auto lambda1 = [](){};
+      auto lambda2 = lambda1;
+      lambda1();
+      lambda2();
+    }
+
+    int
+    test2()
+    {
+      auto a = [](int i, int j){ return i + j; }(1, 2);
+      auto b = []() -> int { return '0'; }();
+      auto c = [=](){ return a + b; }();
+      auto d = [&](){ return c; }();
+      auto e = [a, &b](int x) mutable {
+        const auto identity = [](int y){ return y; };
+        for (auto i = 0; i < a; ++i)
+          a += b--;
+        return x + identity(a + b);
+      }(0);
+      return a + b + c + d + e;
+    }
+
+    int
+    test3()
+    {
+      const auto nullary = [](){ return 0; };
+      const auto unary = [](int x){ return x; };
+      using nullary_t = decltype(nullary);
+      using unary_t = decltype(unary);
+      const auto higher1st = [](nullary_t f){ return f(); };
+      const auto higher2nd = [unary](nullary_t f1){
+        return [unary, f1](unary_t f2){ return f2(unary(f1())); };
+      };
+      return higher1st(nullary) + higher2nd(nullary)(unary);
+    }
+
+  }
+
+  namespace test_variadic_templates
+  {
+
+    template <int...>
+    struct sum;
+
+    template <int N0, int... N1toN>
+    struct sum<N0, N1toN...>
+    {
+      /*
+        Original test code used the auto keyword instead of declaring
+        the type of "value" to be int. This causes Oracle Solaris Studio
+        12.4 to fail. This is possibly a compiler bug but in any case
+        current test code works around it by an explicit declaration.
+      */
+      static constexpr int value = N0 + sum<N1toN...>::value;
+    };
+
+    template <>
+    struct sum<>
+    {
+      static constexpr auto value = 0;
+    };
+
+    static_assert(sum<>::value == 0, "");
+    static_assert(sum<1>::value == 1, "");
+    static_assert(sum<23>::value == 23, "");
+    static_assert(sum<1, 2>::value == 3, "");
+    static_assert(sum<5, 5, 11>::value == 21, "");
+    static_assert(sum<2, 3, 5, 7, 11, 13>::value == 41, "");
+
+  }
+
+  // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae
+  // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function
+  // because of this.
+  namespace test_template_alias_sfinae
+  {
+
+    struct foo {};
+
+    template<typename T>
+    using member = typename T::member_type;
+
+    template<typename T>
+    void func(...) {}
+
+    template<typename T>
+    void func(member<T>*) {}
+
+    void test();
+
+    void test() { func<foo>(0); }
+
+  }
+
+}  // namespace cxx11
+
+
+#endif
+
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"; then :
+  eval $cachevar=yes
+else
+  eval $cachevar=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+           CXX="$ac_save_CXX"
+fi
+eval ac_res=\$$cachevar
+	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+        if eval test x\$$cachevar = xyes; then
+          CXX="$CXX $switch"
+          if test -n "$CXXCPP" ; then
+            CXXCPP="$CXXCPP $switch"
+          fi
+          ac_success=yes
+          break
+        fi
+      done
+      if test x$ac_success = xyes; then
+        break
+      fi
+    done
+  fi
+  ac_ext=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+  if test x$ax_cxx_compile_cxx11_required = xtrue; then
+    if test x$ac_success = xno; then
+      as_fn_error $? "*** A compiler with support for C++11 language features is required." "$LINENO" 5
+    fi
+  fi
+  if test x$ac_success = xno; then
+    HAVE_CXX11=0
+    { $as_echo "$as_me:${as_lineno-$LINENO}: No compiler with C++11 support was found" >&5
+$as_echo "$as_me: No compiler with C++11 support was found" >&6;}
+  else
+    HAVE_CXX11=1
+  fi
+
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+CXX="${r_save_CXX}"
+CXXFLAGS="${r_save_CXXFLAGS}"
+if test "${HAVE_CXX11}" = "1"; then
+  if test "${CXX11STD}"x = "x";  then
+    CXX11STD="${switch}"
+  else
+    CXX11STD="${CXX11STD} ${switch}"
+  fi
+else
+  CXX11=""
+  CXX11STD=""
+  CXX11FLAGS=""
+  CXX11PICFLAGS=""
+fi
+
+
+
+
+
+if test -z "${SHLIB_CXX11LD}"; then
+  SHLIB_CXX11LD="\$(CXX11) \$(CXX11STD)"
+fi
+
+: ${SHLIB_CXX11LDFLAGS=${SHLIB_CXXLDFLAGS}}
+
+
+
+
+
+
+
+
+
+r_save_CXX="${CXX}"
+r_save_CXXFLAGS="${CXXFLAGS}"
+
+: ${CXX14=${CXX11}}
+: ${CXX14FLAGS=${CXX11FLAGS}}
+: ${CXX14PICFLAGS=${CXX11PICFLAGS}}
+
+CXX="${CXX14} ${CXX14STD}"
+CXXFLAGS="${CXX14FLAGS} ${CXX14PICFLAGS}"
+ac_ext=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+  ax_cxx_compile_alternatives="14 1y"    ax_cxx_compile_cxx14_required=false
+  ac_ext=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+  ac_success=no
+  switch=""
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++14 features by default" >&5
+$as_echo_n "checking whether $CXX supports C++14 features by default... " >&6; }
+if ${ax_cv_cxx_compile_cxx14+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#ifndef __cplusplus
+# error "This is not a C++ compiler"
+#elif __cplusplus < 201402L
+# error "This is not a C++14 compiler"
+#else
+
+
+namespace cxx11
+{
+
+  namespace test_static_assert
+  {
+
+    template <typename T>
+    struct check
+    {
+      static_assert(sizeof(int) <= sizeof(T), "not big enough");
+    };
+
+  }
+
+  namespace test_final_override
+  {
+
+    struct Base
+    {
+      virtual void f() {}
+    };
+
+    struct Derived : public Base
+    {
+      virtual void f() override {}
+    };
+
+  }
+
+  namespace test_double_right_angle_brackets
+  {
+
+    template < typename T >
+    struct check {};
+
+    typedef check<void> single_type;
+    typedef check<check<void>> double_type;
+    typedef check<check<check<void>>> triple_type;
+    typedef check<check<check<check<void>>>> quadruple_type;
+
+  }
+
+  namespace test_decltype
+  {
+
+    int
+    f()
+    {
+      int a = 1;
+      decltype(a) b = 2;
+      return a + b;
+    }
+
+  }
+
+  namespace test_type_deduction
+  {
+
+    template < typename T1, typename T2 >
+    struct is_same
+    {
+      static const bool value = false;
+    };
+
+    template < typename T >
+    struct is_same<T, T>
+    {
+      static const bool value = true;
+    };
+
+    template < typename T1, typename T2 >
+    auto
+    add(T1 a1, T2 a2) -> decltype(a1 + a2)
+    {
+      return a1 + a2;
+    }
+
+    int
+    test(const int c, volatile int v)
+    {
+      static_assert(is_same<int, decltype(0)>::value == true, "");
+      static_assert(is_same<int, decltype(c)>::value == false, "");
+      static_assert(is_same<int, decltype(v)>::value == false, "");
+      auto ac = c;
+      auto av = v;
+      auto sumi = ac + av + 'x';
+      auto sumf = ac + av + 1.0;
+      static_assert(is_same<int, decltype(ac)>::value == true, "");
+      static_assert(is_same<int, decltype(av)>::value == true, "");
+      static_assert(is_same<int, decltype(sumi)>::value == true, "");
+      static_assert(is_same<int, decltype(sumf)>::value == false, "");
+      static_assert(is_same<int, decltype(add(c, v))>::value == true, "");
+      return (sumf > 0.0) ? sumi : add(c, v);
+    }
+
+  }
+
+  namespace test_noexcept
+  {
+
+    int f() { return 0; }
+    int g() noexcept { return 0; }
+
+    static_assert(noexcept(f()) == false, "");
+    static_assert(noexcept(g()) == true, "");
+
+  }
+
+  namespace test_constexpr
+  {
+
+    template < typename CharT >
+    unsigned long constexpr
+    strlen_c_r(const CharT *const s, const unsigned long acc) noexcept
+    {
+      return *s ? strlen_c_r(s + 1, acc + 1) : acc;
+    }
+
+    template < typename CharT >
+    unsigned long constexpr
+    strlen_c(const CharT *const s) noexcept
+    {
+      return strlen_c_r(s, 0UL);
+    }
+
+    static_assert(strlen_c("") == 0UL, "");
+    static_assert(strlen_c("1") == 1UL, "");
+    static_assert(strlen_c("example") == 7UL, "");
+    static_assert(strlen_c("another\0example") == 7UL, "");
+
+  }
+
+  namespace test_rvalue_references
+  {
+
+    template < int N >
+    struct answer
+    {
+      static constexpr int value = N;
+    };
+
+    answer<1> f(int&)       { return answer<1>(); }
+    answer<2> f(const int&) { return answer<2>(); }
+    answer<3> f(int&&)      { return answer<3>(); }
+
+    void
+    test()
+    {
+      int i = 0;
+      const int c = 0;
+      static_assert(decltype(f(i))::value == 1, "");
+      static_assert(decltype(f(c))::value == 2, "");
+      static_assert(decltype(f(0))::value == 3, "");
+    }
+
+  }
+
+  namespace test_uniform_initialization
+  {
+
+    struct test
+    {
+      static const int zero {};
+      static const int one {1};
+    };
+
+    static_assert(test::zero == 0, "");
+    static_assert(test::one == 1, "");
+
+  }
+
+  namespace test_lambdas
+  {
+
+    void
+    test1()
+    {
+      auto lambda1 = [](){};
+      auto lambda2 = lambda1;
+      lambda1();
+      lambda2();
+    }
+
+    int
+    test2()
+    {
+      auto a = [](int i, int j){ return i + j; }(1, 2);
+      auto b = []() -> int { return '0'; }();
+      auto c = [=](){ return a + b; }();
+      auto d = [&](){ return c; }();
+      auto e = [a, &b](int x) mutable {
+        const auto identity = [](int y){ return y; };
+        for (auto i = 0; i < a; ++i)
+          a += b--;
+        return x + identity(a + b);
+      }(0);
+      return a + b + c + d + e;
+    }
+
+    int
+    test3()
+    {
+      const auto nullary = [](){ return 0; };
+      const auto unary = [](int x){ return x; };
+      using nullary_t = decltype(nullary);
+      using unary_t = decltype(unary);
+      const auto higher1st = [](nullary_t f){ return f(); };
+      const auto higher2nd = [unary](nullary_t f1){
+        return [unary, f1](unary_t f2){ return f2(unary(f1())); };
+      };
+      return higher1st(nullary) + higher2nd(nullary)(unary);
+    }
+
+  }
+
+  namespace test_variadic_templates
+  {
+
+    template <int...>
+    struct sum;
+
+    template <int N0, int... N1toN>
+    struct sum<N0, N1toN...>
+    {
+      /*
+        Original test code used the auto keyword instead of declaring
+        the type of "value" to be int. This causes Oracle Solaris Studio
+        12.4 to fail. This is possibly a compiler bug but in any case
+        current test code works around it by an explicit declaration.
+      */
+      static constexpr int value = N0 + sum<N1toN...>::value;
+    };
+
+    template <>
+    struct sum<>
+    {
+      static constexpr auto value = 0;
+    };
+
+    static_assert(sum<>::value == 0, "");
+    static_assert(sum<1>::value == 1, "");
+    static_assert(sum<23>::value == 23, "");
+    static_assert(sum<1, 2>::value == 3, "");
+    static_assert(sum<5, 5, 11>::value == 21, "");
+    static_assert(sum<2, 3, 5, 7, 11, 13>::value == 41, "");
+
+  }
+
+  // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae
+  // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function
+  // because of this.
+  namespace test_template_alias_sfinae
+  {
+
+    struct foo {};
+
+    template<typename T>
+    using member = typename T::member_type;
+
+    template<typename T>
+    void func(...) {}
+
+    template<typename T>
+    void func(member<T>*) {}
+
+    void test();
+
+    void test() { func<foo>(0); }
+
+  }
+
+}  // namespace cxx11
+
+
+
+
+namespace cxx14
+{
+
+  namespace test_polymorphic_lambdas
+  {
+
+    int
+    test()
+    {
+      const auto lambda = [](auto&&... args){
+        const auto istiny = [](auto x){
+          return (sizeof(x) == 1UL) ? 1 : 0;
+        };
+        const int aretiny[] = { istiny(args)... };
+        return aretiny[0];
+      };
+      return lambda(1, 1L, 1.0f, '1');
+    }
+
+  }
+
+  namespace test_binary_literals
+  {
+
+    constexpr auto ivii = 0b0000000000101010;
+    static_assert(ivii == 42, "wrong value");
+
+  }
+
+  namespace test_generalized_constexpr
+  {
+
+    template < typename CharT >
+    constexpr unsigned long
+    strlen_c(const CharT *const s) noexcept
+    {
+      auto length = 0UL;
+      for (auto p = s; *p; ++p)
+        ++length;
+      return length;
+    }
+
+    static_assert(strlen_c("") == 0UL, "");
+    static_assert(strlen_c("x") == 1UL, "");
+    static_assert(strlen_c("test") == 4UL, "");
+    static_assert(strlen_c("another\0test") == 7UL, "");
+
+  }
+
+  namespace test_lambda_init_capture
+  {
+
+    int
+    test()
+    {
+      auto x = 0;
+      const auto lambda1 = [a = x](int b){ return a + b; };
+      const auto lambda2 = [a = lambda1(x)](){ return a; };
+      return lambda2();
+    }
+
+  }
+
+  namespace test_digit_separators
+  {
+
+    constexpr auto ten_million = 100'000'000;
+    static_assert(ten_million == 100000000, "");
+
+  }
+
+  namespace test_return_type_deduction
+  {
+
+    auto f(int& x) { return x; }
+    decltype(auto) g(int& x) { return x; }
+
+    template < typename T1, typename T2 >
+    struct is_same
+    {
+      static constexpr auto value = false;
+    };
+
+    template < typename T >
+    struct is_same<T, T>
+    {
+      static constexpr auto value = true;
+    };
+
+    int
+    test()
+    {
+      auto x = 0;
+      static_assert(is_same<int, decltype(f(x))>::value, "");
+      static_assert(is_same<int&, decltype(g(x))>::value, "");
+      return x;
+    }
+
+  }
+
+}  // namespace cxx14
+
+
+#endif
+
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"; then :
+  ax_cv_cxx_compile_cxx14=yes
+else
+  ax_cv_cxx_compile_cxx14=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_cxx_compile_cxx14" >&5
+$as_echo "$ax_cv_cxx_compile_cxx14" >&6; }
+  if test x$ax_cv_cxx_compile_cxx14 = xyes; then
+    ac_success=yes
+  fi
+
+    if test x$ac_success = xno; then
+    for alternative in ${ax_cxx_compile_alternatives}; do
+      switch="-std=gnu++${alternative}"
+      cachevar=`$as_echo "ax_cv_cxx_compile_cxx14_$switch" | $as_tr_sh`
+      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++14 features with $switch" >&5
+$as_echo_n "checking whether $CXX supports C++14 features with $switch... " >&6; }
+if eval \${$cachevar+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_save_CXX="$CXX"
+         CXX="$CXX $switch"
+         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#ifndef __cplusplus
+# error "This is not a C++ compiler"
+#elif __cplusplus < 201402L
+# error "This is not a C++14 compiler"
+#else
+
+
+namespace cxx11
+{
+
+  namespace test_static_assert
+  {
+
+    template <typename T>
+    struct check
+    {
+      static_assert(sizeof(int) <= sizeof(T), "not big enough");
+    };
+
+  }
+
+  namespace test_final_override
+  {
+
+    struct Base
+    {
+      virtual void f() {}
+    };
+
+    struct Derived : public Base
+    {
+      virtual void f() override {}
+    };
+
+  }
+
+  namespace test_double_right_angle_brackets
+  {
+
+    template < typename T >
+    struct check {};
+
+    typedef check<void> single_type;
+    typedef check<check<void>> double_type;
+    typedef check<check<check<void>>> triple_type;
+    typedef check<check<check<check<void>>>> quadruple_type;
+
+  }
+
+  namespace test_decltype
+  {
+
+    int
+    f()
+    {
+      int a = 1;
+      decltype(a) b = 2;
+      return a + b;
+    }
+
+  }
+
+  namespace test_type_deduction
+  {
+
+    template < typename T1, typename T2 >
+    struct is_same
+    {
+      static const bool value = false;
+    };
+
+    template < typename T >
+    struct is_same<T, T>
+    {
+      static const bool value = true;
+    };
+
+    template < typename T1, typename T2 >
+    auto
+    add(T1 a1, T2 a2) -> decltype(a1 + a2)
+    {
+      return a1 + a2;
+    }
+
+    int
+    test(const int c, volatile int v)
+    {
+      static_assert(is_same<int, decltype(0)>::value == true, "");
+      static_assert(is_same<int, decltype(c)>::value == false, "");
+      static_assert(is_same<int, decltype(v)>::value == false, "");
+      auto ac = c;
+      auto av = v;
+      auto sumi = ac + av + 'x';
+      auto sumf = ac + av + 1.0;
+      static_assert(is_same<int, decltype(ac)>::value == true, "");
+      static_assert(is_same<int, decltype(av)>::value == true, "");
+      static_assert(is_same<int, decltype(sumi)>::value == true, "");
+      static_assert(is_same<int, decltype(sumf)>::value == false, "");
+      static_assert(is_same<int, decltype(add(c, v))>::value == true, "");
+      return (sumf > 0.0) ? sumi : add(c, v);
+    }
+
+  }
+
+  namespace test_noexcept
+  {
+
+    int f() { return 0; }
+    int g() noexcept { return 0; }
+
+    static_assert(noexcept(f()) == false, "");
+    static_assert(noexcept(g()) == true, "");
+
+  }
+
+  namespace test_constexpr
+  {
+
+    template < typename CharT >
+    unsigned long constexpr
+    strlen_c_r(const CharT *const s, const unsigned long acc) noexcept
+    {
+      return *s ? strlen_c_r(s + 1, acc + 1) : acc;
+    }
+
+    template < typename CharT >
+    unsigned long constexpr
+    strlen_c(const CharT *const s) noexcept
+    {
+      return strlen_c_r(s, 0UL);
+    }
+
+    static_assert(strlen_c("") == 0UL, "");
+    static_assert(strlen_c("1") == 1UL, "");
+    static_assert(strlen_c("example") == 7UL, "");
+    static_assert(strlen_c("another\0example") == 7UL, "");
+
+  }
+
+  namespace test_rvalue_references
+  {
+
+    template < int N >
+    struct answer
+    {
+      static constexpr int value = N;
+    };
+
+    answer<1> f(int&)       { return answer<1>(); }
+    answer<2> f(const int&) { return answer<2>(); }
+    answer<3> f(int&&)      { return answer<3>(); }
+
+    void
+    test()
+    {
+      int i = 0;
+      const int c = 0;
+      static_assert(decltype(f(i))::value == 1, "");
+      static_assert(decltype(f(c))::value == 2, "");
+      static_assert(decltype(f(0))::value == 3, "");
+    }
+
+  }
+
+  namespace test_uniform_initialization
+  {
+
+    struct test
+    {
+      static const int zero {};
+      static const int one {1};
+    };
+
+    static_assert(test::zero == 0, "");
+    static_assert(test::one == 1, "");
+
+  }
+
+  namespace test_lambdas
+  {
+
+    void
+    test1()
+    {
+      auto lambda1 = [](){};
+      auto lambda2 = lambda1;
+      lambda1();
+      lambda2();
+    }
+
+    int
+    test2()
+    {
+      auto a = [](int i, int j){ return i + j; }(1, 2);
+      auto b = []() -> int { return '0'; }();
+      auto c = [=](){ return a + b; }();
+      auto d = [&](){ return c; }();
+      auto e = [a, &b](int x) mutable {
+        const auto identity = [](int y){ return y; };
+        for (auto i = 0; i < a; ++i)
+          a += b--;
+        return x + identity(a + b);
+      }(0);
+      return a + b + c + d + e;
+    }
+
+    int
+    test3()
+    {
+      const auto nullary = [](){ return 0; };
+      const auto unary = [](int x){ return x; };
+      using nullary_t = decltype(nullary);
+      using unary_t = decltype(unary);
+      const auto higher1st = [](nullary_t f){ return f(); };
+      const auto higher2nd = [unary](nullary_t f1){
+        return [unary, f1](unary_t f2){ return f2(unary(f1())); };
+      };
+      return higher1st(nullary) + higher2nd(nullary)(unary);
+    }
+
+  }
+
+  namespace test_variadic_templates
+  {
+
+    template <int...>
+    struct sum;
+
+    template <int N0, int... N1toN>
+    struct sum<N0, N1toN...>
+    {
+      /*
+        Original test code used the auto keyword instead of declaring
+        the type of "value" to be int. This causes Oracle Solaris Studio
+        12.4 to fail. This is possibly a compiler bug but in any case
+        current test code works around it by an explicit declaration.
+      */
+      static constexpr int value = N0 + sum<N1toN...>::value;
+    };
+
+    template <>
+    struct sum<>
+    {
+      static constexpr auto value = 0;
+    };
+
+    static_assert(sum<>::value == 0, "");
+    static_assert(sum<1>::value == 1, "");
+    static_assert(sum<23>::value == 23, "");
+    static_assert(sum<1, 2>::value == 3, "");
+    static_assert(sum<5, 5, 11>::value == 21, "");
+    static_assert(sum<2, 3, 5, 7, 11, 13>::value == 41, "");
+
+  }
+
+  // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae
+  // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function
+  // because of this.
+  namespace test_template_alias_sfinae
+  {
+
+    struct foo {};
+
+    template<typename T>
+    using member = typename T::member_type;
+
+    template<typename T>
+    void func(...) {}
+
+    template<typename T>
+    void func(member<T>*) {}
+
+    void test();
+
+    void test() { func<foo>(0); }
+
+  }
+
+}  // namespace cxx11
+
+
+
+
+namespace cxx14
+{
+
+  namespace test_polymorphic_lambdas
+  {
+
+    int
+    test()
+    {
+      const auto lambda = [](auto&&... args){
+        const auto istiny = [](auto x){
+          return (sizeof(x) == 1UL) ? 1 : 0;
+        };
+        const int aretiny[] = { istiny(args)... };
+        return aretiny[0];
+      };
+      return lambda(1, 1L, 1.0f, '1');
+    }
+
+  }
+
+  namespace test_binary_literals
+  {
+
+    constexpr auto ivii = 0b0000000000101010;
+    static_assert(ivii == 42, "wrong value");
+
+  }
+
+  namespace test_generalized_constexpr
+  {
+
+    template < typename CharT >
+    constexpr unsigned long
+    strlen_c(const CharT *const s) noexcept
+    {
+      auto length = 0UL;
+      for (auto p = s; *p; ++p)
+        ++length;
+      return length;
+    }
+
+    static_assert(strlen_c("") == 0UL, "");
+    static_assert(strlen_c("x") == 1UL, "");
+    static_assert(strlen_c("test") == 4UL, "");
+    static_assert(strlen_c("another\0test") == 7UL, "");
+
+  }
+
+  namespace test_lambda_init_capture
+  {
+
+    int
+    test()
+    {
+      auto x = 0;
+      const auto lambda1 = [a = x](int b){ return a + b; };
+      const auto lambda2 = [a = lambda1(x)](){ return a; };
+      return lambda2();
+    }
+
+  }
+
+  namespace test_digit_separators
+  {
+
+    constexpr auto ten_million = 100'000'000;
+    static_assert(ten_million == 100000000, "");
+
+  }
+
+  namespace test_return_type_deduction
+  {
+
+    auto f(int& x) { return x; }
+    decltype(auto) g(int& x) { return x; }
+
+    template < typename T1, typename T2 >
+    struct is_same
+    {
+      static constexpr auto value = false;
+    };
+
+    template < typename T >
+    struct is_same<T, T>
+    {
+      static constexpr auto value = true;
+    };
+
+    int
+    test()
+    {
+      auto x = 0;
+      static_assert(is_same<int, decltype(f(x))>::value, "");
+      static_assert(is_same<int&, decltype(g(x))>::value, "");
+      return x;
+    }
+
+  }
+
+}  // namespace cxx14
+
+
+#endif
+
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"; then :
+  eval $cachevar=yes
+else
+  eval $cachevar=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+         CXX="$ac_save_CXX"
+fi
+eval ac_res=\$$cachevar
+	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+      if eval test x\$$cachevar = xyes; then
+        CXX="$CXX $switch"
+        if test -n "$CXXCPP" ; then
+          CXXCPP="$CXXCPP $switch"
+        fi
+        ac_success=yes
+        break
+      fi
+    done
+  fi
+
+    if test x$ac_success = xno; then
+                for alternative in ${ax_cxx_compile_alternatives}; do
+      for switch in -std=c++${alternative}; do
+        cachevar=`$as_echo "ax_cv_cxx_compile_cxx14_$switch" | $as_tr_sh`
+        { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++14 features with $switch" >&5
+$as_echo_n "checking whether $CXX supports C++14 features with $switch... " >&6; }
+if eval \${$cachevar+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_save_CXX="$CXX"
+           CXX="$CXX $switch"
+           cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#ifndef __cplusplus
+# error "This is not a C++ compiler"
+#elif __cplusplus < 201402L
+# error "This is not a C++14 compiler"
+#else
+
+
+namespace cxx11
+{
+
+  namespace test_static_assert
+  {
+
+    template <typename T>
+    struct check
+    {
+      static_assert(sizeof(int) <= sizeof(T), "not big enough");
+    };
+
+  }
+
+  namespace test_final_override
+  {
+
+    struct Base
+    {
+      virtual void f() {}
+    };
+
+    struct Derived : public Base
+    {
+      virtual void f() override {}
+    };
+
+  }
+
+  namespace test_double_right_angle_brackets
+  {
+
+    template < typename T >
+    struct check {};
+
+    typedef check<void> single_type;
+    typedef check<check<void>> double_type;
+    typedef check<check<check<void>>> triple_type;
+    typedef check<check<check<check<void>>>> quadruple_type;
+
+  }
+
+  namespace test_decltype
+  {
+
+    int
+    f()
+    {
+      int a = 1;
+      decltype(a) b = 2;
+      return a + b;
+    }
+
+  }
+
+  namespace test_type_deduction
+  {
+
+    template < typename T1, typename T2 >
+    struct is_same
+    {
+      static const bool value = false;
+    };
+
+    template < typename T >
+    struct is_same<T, T>
+    {
+      static const bool value = true;
+    };
+
+    template < typename T1, typename T2 >
+    auto
+    add(T1 a1, T2 a2) -> decltype(a1 + a2)
+    {
+      return a1 + a2;
+    }
+
+    int
+    test(const int c, volatile int v)
+    {
+      static_assert(is_same<int, decltype(0)>::value == true, "");
+      static_assert(is_same<int, decltype(c)>::value == false, "");
+      static_assert(is_same<int, decltype(v)>::value == false, "");
+      auto ac = c;
+      auto av = v;
+      auto sumi = ac + av + 'x';
+      auto sumf = ac + av + 1.0;
+      static_assert(is_same<int, decltype(ac)>::value == true, "");
+      static_assert(is_same<int, decltype(av)>::value == true, "");
+      static_assert(is_same<int, decltype(sumi)>::value == true, "");
+      static_assert(is_same<int, decltype(sumf)>::value == false, "");
+      static_assert(is_same<int, decltype(add(c, v))>::value == true, "");
+      return (sumf > 0.0) ? sumi : add(c, v);
+    }
+
+  }
+
+  namespace test_noexcept
+  {
+
+    int f() { return 0; }
+    int g() noexcept { return 0; }
+
+    static_assert(noexcept(f()) == false, "");
+    static_assert(noexcept(g()) == true, "");
+
+  }
+
+  namespace test_constexpr
+  {
+
+    template < typename CharT >
+    unsigned long constexpr
+    strlen_c_r(const CharT *const s, const unsigned long acc) noexcept
+    {
+      return *s ? strlen_c_r(s + 1, acc + 1) : acc;
+    }
+
+    template < typename CharT >
+    unsigned long constexpr
+    strlen_c(const CharT *const s) noexcept
+    {
+      return strlen_c_r(s, 0UL);
+    }
+
+    static_assert(strlen_c("") == 0UL, "");
+    static_assert(strlen_c("1") == 1UL, "");
+    static_assert(strlen_c("example") == 7UL, "");
+    static_assert(strlen_c("another\0example") == 7UL, "");
+
+  }
+
+  namespace test_rvalue_references
+  {
+
+    template < int N >
+    struct answer
+    {
+      static constexpr int value = N;
+    };
+
+    answer<1> f(int&)       { return answer<1>(); }
+    answer<2> f(const int&) { return answer<2>(); }
+    answer<3> f(int&&)      { return answer<3>(); }
+
+    void
+    test()
+    {
+      int i = 0;
+      const int c = 0;
+      static_assert(decltype(f(i))::value == 1, "");
+      static_assert(decltype(f(c))::value == 2, "");
+      static_assert(decltype(f(0))::value == 3, "");
+    }
+
+  }
+
+  namespace test_uniform_initialization
+  {
+
+    struct test
+    {
+      static const int zero {};
+      static const int one {1};
+    };
+
+    static_assert(test::zero == 0, "");
+    static_assert(test::one == 1, "");
+
+  }
+
+  namespace test_lambdas
+  {
+
+    void
+    test1()
+    {
+      auto lambda1 = [](){};
+      auto lambda2 = lambda1;
+      lambda1();
+      lambda2();
+    }
+
+    int
+    test2()
+    {
+      auto a = [](int i, int j){ return i + j; }(1, 2);
+      auto b = []() -> int { return '0'; }();
+      auto c = [=](){ return a + b; }();
+      auto d = [&](){ return c; }();
+      auto e = [a, &b](int x) mutable {
+        const auto identity = [](int y){ return y; };
+        for (auto i = 0; i < a; ++i)
+          a += b--;
+        return x + identity(a + b);
+      }(0);
+      return a + b + c + d + e;
+    }
+
+    int
+    test3()
+    {
+      const auto nullary = [](){ return 0; };
+      const auto unary = [](int x){ return x; };
+      using nullary_t = decltype(nullary);
+      using unary_t = decltype(unary);
+      const auto higher1st = [](nullary_t f){ return f(); };
+      const auto higher2nd = [unary](nullary_t f1){
+        return [unary, f1](unary_t f2){ return f2(unary(f1())); };
+      };
+      return higher1st(nullary) + higher2nd(nullary)(unary);
+    }
+
+  }
+
+  namespace test_variadic_templates
+  {
+
+    template <int...>
+    struct sum;
+
+    template <int N0, int... N1toN>
+    struct sum<N0, N1toN...>
+    {
+      /*
+        Original test code used the auto keyword instead of declaring
+        the type of "value" to be int. This causes Oracle Solaris Studio
+        12.4 to fail. This is possibly a compiler bug but in any case
+        current test code works around it by an explicit declaration.
+      */
+      static constexpr int value = N0 + sum<N1toN...>::value;
+    };
+
+    template <>
+    struct sum<>
+    {
+      static constexpr auto value = 0;
+    };
+
+    static_assert(sum<>::value == 0, "");
+    static_assert(sum<1>::value == 1, "");
+    static_assert(sum<23>::value == 23, "");
+    static_assert(sum<1, 2>::value == 3, "");
+    static_assert(sum<5, 5, 11>::value == 21, "");
+    static_assert(sum<2, 3, 5, 7, 11, 13>::value == 41, "");
+
+  }
+
+  // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae
+  // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function
+  // because of this.
+  namespace test_template_alias_sfinae
+  {
+
+    struct foo {};
+
+    template<typename T>
+    using member = typename T::member_type;
+
+    template<typename T>
+    void func(...) {}
+
+    template<typename T>
+    void func(member<T>*) {}
+
+    void test();
+
+    void test() { func<foo>(0); }
+
+  }
+
+}  // namespace cxx11
+
+
+
+
+namespace cxx14
+{
+
+  namespace test_polymorphic_lambdas
+  {
+
+    int
+    test()
+    {
+      const auto lambda = [](auto&&... args){
+        const auto istiny = [](auto x){
+          return (sizeof(x) == 1UL) ? 1 : 0;
+        };
+        const int aretiny[] = { istiny(args)... };
+        return aretiny[0];
+      };
+      return lambda(1, 1L, 1.0f, '1');
+    }
+
+  }
+
+  namespace test_binary_literals
+  {
+
+    constexpr auto ivii = 0b0000000000101010;
+    static_assert(ivii == 42, "wrong value");
+
+  }
+
+  namespace test_generalized_constexpr
+  {
+
+    template < typename CharT >
+    constexpr unsigned long
+    strlen_c(const CharT *const s) noexcept
+    {
+      auto length = 0UL;
+      for (auto p = s; *p; ++p)
+        ++length;
+      return length;
+    }
+
+    static_assert(strlen_c("") == 0UL, "");
+    static_assert(strlen_c("x") == 1UL, "");
+    static_assert(strlen_c("test") == 4UL, "");
+    static_assert(strlen_c("another\0test") == 7UL, "");
+
+  }
+
+  namespace test_lambda_init_capture
+  {
+
+    int
+    test()
+    {
+      auto x = 0;
+      const auto lambda1 = [a = x](int b){ return a + b; };
+      const auto lambda2 = [a = lambda1(x)](){ return a; };
+      return lambda2();
+    }
+
+  }
+
+  namespace test_digit_separators
+  {
+
+    constexpr auto ten_million = 100'000'000;
+    static_assert(ten_million == 100000000, "");
+
+  }
+
+  namespace test_return_type_deduction
+  {
+
+    auto f(int& x) { return x; }
+    decltype(auto) g(int& x) { return x; }
+
+    template < typename T1, typename T2 >
+    struct is_same
+    {
+      static constexpr auto value = false;
+    };
+
+    template < typename T >
+    struct is_same<T, T>
+    {
+      static constexpr auto value = true;
+    };
+
+    int
+    test()
+    {
+      auto x = 0;
+      static_assert(is_same<int, decltype(f(x))>::value, "");
+      static_assert(is_same<int&, decltype(g(x))>::value, "");
+      return x;
+    }
+
+  }
+
+}  // namespace cxx14
+
+
+#endif
+
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"; then :
+  eval $cachevar=yes
+else
+  eval $cachevar=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+           CXX="$ac_save_CXX"
+fi
+eval ac_res=\$$cachevar
+	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+        if eval test x\$$cachevar = xyes; then
+          CXX="$CXX $switch"
+          if test -n "$CXXCPP" ; then
+            CXXCPP="$CXXCPP $switch"
+          fi
+          ac_success=yes
+          break
+        fi
+      done
+      if test x$ac_success = xyes; then
+        break
+      fi
+    done
+  fi
+  ac_ext=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+  if test x$ax_cxx_compile_cxx14_required = xtrue; then
+    if test x$ac_success = xno; then
+      as_fn_error $? "*** A compiler with support for C++14 language features is required." "$LINENO" 5
+    fi
+  fi
+  if test x$ac_success = xno; then
+    HAVE_CXX14=0
+    { $as_echo "$as_me:${as_lineno-$LINENO}: No compiler with C++14 support was found" >&5
+$as_echo "$as_me: No compiler with C++14 support was found" >&6;}
+  else
+    HAVE_CXX14=1
+  fi
+
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+CXX="${r_save_CXX}"
+CXXFLAGS="${r_save_CXXFLAGS}"
+if test "${HAVE_CXX14}" = "1"; then
+  if test "${CXX14STD}"x = "x";  then
+    CXX14STD="${switch}"
+  else
+    CXX14STD="${CXX14STD} ${switch}"
+  fi
+else
+  CXX14=""
+  CXX14STD=""
+  CXX14FLAGS=""
+  CXX14PICFLAGS=""
+fi
+
+
+
+
+
+if test -z "${SHLIB_CXX14LD}"; then
+  SHLIB_CXX14LD="\$(CXX14) \$(CXX14STD)"
+fi
+
+: ${SHLIB_CXX14LDFLAGS=${SHLIB_CXX11LDFLAGS}}
+
+
+
+
+
+
+
+
+
+r_save_CXX="${CXX}"
+r_save_CXXFLAGS="${CXXFLAGS}"
+
+: ${CXX17=${CXX14}}
+: ${CXX17FLAGS=${CXX14FLAGS}}
+: ${CXX17PICFLAGS=${CXX14PICFLAGS}}
+
+CXX="${CXX17} ${CXX17STD}"
+CXXFLAGS="${CXX17FLAGS} ${CXX17PICFLAGS}"
+ac_ext=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+  ax_cxx_compile_alternatives="17 1z"    ax_cxx_compile_cxx17_required=false
+  ac_ext=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+  ac_success=no
+  switch=""
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++17 features by default" >&5
+$as_echo_n "checking whether $CXX supports C++17 features by default... " >&6; }
+if ${ax_cv_cxx_compile_cxx17+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#ifndef __cplusplus
+#error "This is not a C++ compiler"
+#elif __cplusplus <= 201402L
+#error "This is not a C++17 compiler"
+#else
+
+
+namespace cxx11
+{
+
+  namespace test_static_assert
+  {
+
+    template <typename T>
+    struct check
+    {
+      static_assert(sizeof(int) <= sizeof(T), "not big enough");
+    };
+
+  }
+
+  namespace test_final_override
+  {
+
+    struct Base
+    {
+      virtual void f() {}
+    };
+
+    struct Derived : public Base
+    {
+      virtual void f() override {}
+    };
+
+  }
+
+  namespace test_double_right_angle_brackets
+  {
+
+    template < typename T >
+    struct check {};
+
+    typedef check<void> single_type;
+    typedef check<check<void>> double_type;
+    typedef check<check<check<void>>> triple_type;
+    typedef check<check<check<check<void>>>> quadruple_type;
+
+  }
+
+  namespace test_decltype
+  {
+
+    int
+    f()
+    {
+      int a = 1;
+      decltype(a) b = 2;
+      return a + b;
+    }
+
+  }
+
+  namespace test_type_deduction
+  {
+
+    template < typename T1, typename T2 >
+    struct is_same
+    {
+      static const bool value = false;
+    };
+
+    template < typename T >
+    struct is_same<T, T>
+    {
+      static const bool value = true;
+    };
+
+    template < typename T1, typename T2 >
+    auto
+    add(T1 a1, T2 a2) -> decltype(a1 + a2)
+    {
+      return a1 + a2;
+    }
+
+    int
+    test(const int c, volatile int v)
+    {
+      static_assert(is_same<int, decltype(0)>::value == true, "");
+      static_assert(is_same<int, decltype(c)>::value == false, "");
+      static_assert(is_same<int, decltype(v)>::value == false, "");
+      auto ac = c;
+      auto av = v;
+      auto sumi = ac + av + 'x';
+      auto sumf = ac + av + 1.0;
+      static_assert(is_same<int, decltype(ac)>::value == true, "");
+      static_assert(is_same<int, decltype(av)>::value == true, "");
+      static_assert(is_same<int, decltype(sumi)>::value == true, "");
+      static_assert(is_same<int, decltype(sumf)>::value == false, "");
+      static_assert(is_same<int, decltype(add(c, v))>::value == true, "");
+      return (sumf > 0.0) ? sumi : add(c, v);
+    }
+
+  }
+
+  namespace test_noexcept
+  {
+
+    int f() { return 0; }
+    int g() noexcept { return 0; }
+
+    static_assert(noexcept(f()) == false, "");
+    static_assert(noexcept(g()) == true, "");
+
+  }
+
+  namespace test_constexpr
+  {
+
+    template < typename CharT >
+    unsigned long constexpr
+    strlen_c_r(const CharT *const s, const unsigned long acc) noexcept
+    {
+      return *s ? strlen_c_r(s + 1, acc + 1) : acc;
+    }
+
+    template < typename CharT >
+    unsigned long constexpr
+    strlen_c(const CharT *const s) noexcept
+    {
+      return strlen_c_r(s, 0UL);
+    }
+
+    static_assert(strlen_c("") == 0UL, "");
+    static_assert(strlen_c("1") == 1UL, "");
+    static_assert(strlen_c("example") == 7UL, "");
+    static_assert(strlen_c("another\0example") == 7UL, "");
+
+  }
+
+  namespace test_rvalue_references
+  {
+
+    template < int N >
+    struct answer
+    {
+      static constexpr int value = N;
+    };
+
+    answer<1> f(int&)       { return answer<1>(); }
+    answer<2> f(const int&) { return answer<2>(); }
+    answer<3> f(int&&)      { return answer<3>(); }
+
+    void
+    test()
+    {
+      int i = 0;
+      const int c = 0;
+      static_assert(decltype(f(i))::value == 1, "");
+      static_assert(decltype(f(c))::value == 2, "");
+      static_assert(decltype(f(0))::value == 3, "");
+    }
+
+  }
+
+  namespace test_uniform_initialization
+  {
+
+    struct test
+    {
+      static const int zero {};
+      static const int one {1};
+    };
+
+    static_assert(test::zero == 0, "");
+    static_assert(test::one == 1, "");
+
+  }
+
+  namespace test_lambdas
+  {
+
+    void
+    test1()
+    {
+      auto lambda1 = [](){};
+      auto lambda2 = lambda1;
+      lambda1();
+      lambda2();
+    }
+
+    int
+    test2()
+    {
+      auto a = [](int i, int j){ return i + j; }(1, 2);
+      auto b = []() -> int { return '0'; }();
+      auto c = [=](){ return a + b; }();
+      auto d = [&](){ return c; }();
+      auto e = [a, &b](int x) mutable {
+        const auto identity = [](int y){ return y; };
+        for (auto i = 0; i < a; ++i)
+          a += b--;
+        return x + identity(a + b);
+      }(0);
+      return a + b + c + d + e;
+    }
+
+    int
+    test3()
+    {
+      const auto nullary = [](){ return 0; };
+      const auto unary = [](int x){ return x; };
+      using nullary_t = decltype(nullary);
+      using unary_t = decltype(unary);
+      const auto higher1st = [](nullary_t f){ return f(); };
+      const auto higher2nd = [unary](nullary_t f1){
+        return [unary, f1](unary_t f2){ return f2(unary(f1())); };
+      };
+      return higher1st(nullary) + higher2nd(nullary)(unary);
+    }
+
+  }
+
+  namespace test_variadic_templates
+  {
+
+    template <int...>
+    struct sum;
+
+    template <int N0, int... N1toN>
+    struct sum<N0, N1toN...>
+    {
+      /*
+        Original test code used the auto keyword instead of declaring
+        the type of "value" to be int. This causes Oracle Solaris Studio
+        12.4 to fail. This is possibly a compiler bug but in any case
+        current test code works around it by an explicit declaration.
+      */
+      static constexpr int value = N0 + sum<N1toN...>::value;
+    };
+
+    template <>
+    struct sum<>
+    {
+      static constexpr auto value = 0;
+    };
+
+    static_assert(sum<>::value == 0, "");
+    static_assert(sum<1>::value == 1, "");
+    static_assert(sum<23>::value == 23, "");
+    static_assert(sum<1, 2>::value == 3, "");
+    static_assert(sum<5, 5, 11>::value == 21, "");
+    static_assert(sum<2, 3, 5, 7, 11, 13>::value == 41, "");
+
+  }
+
+  // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae
+  // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function
+  // because of this.
+  namespace test_template_alias_sfinae
+  {
+
+    struct foo {};
+
+    template<typename T>
+    using member = typename T::member_type;
+
+    template<typename T>
+    void func(...) {}
+
+    template<typename T>
+    void func(member<T>*) {}
+
+    void test();
+
+    void test() { func<foo>(0); }
+
+  }
+
+}  // namespace cxx11
+
+
+
+
+namespace cxx14
+{
+
+  namespace test_polymorphic_lambdas
+  {
+
+    int
+    test()
+    {
+      const auto lambda = [](auto&&... args){
+        const auto istiny = [](auto x){
+          return (sizeof(x) == 1UL) ? 1 : 0;
+        };
+        const int aretiny[] = { istiny(args)... };
+        return aretiny[0];
+      };
+      return lambda(1, 1L, 1.0f, '1');
+    }
+
+  }
+
+  namespace test_binary_literals
+  {
+
+    constexpr auto ivii = 0b0000000000101010;
+    static_assert(ivii == 42, "wrong value");
+
+  }
+
+  namespace test_generalized_constexpr
+  {
+
+    template < typename CharT >
+    constexpr unsigned long
+    strlen_c(const CharT *const s) noexcept
+    {
+      auto length = 0UL;
+      for (auto p = s; *p; ++p)
+        ++length;
+      return length;
+    }
+
+    static_assert(strlen_c("") == 0UL, "");
+    static_assert(strlen_c("x") == 1UL, "");
+    static_assert(strlen_c("test") == 4UL, "");
+    static_assert(strlen_c("another\0test") == 7UL, "");
+
+  }
+
+  namespace test_lambda_init_capture
+  {
+
+    int
+    test()
+    {
+      auto x = 0;
+      const auto lambda1 = [a = x](int b){ return a + b; };
+      const auto lambda2 = [a = lambda1(x)](){ return a; };
+      return lambda2();
+    }
+
+  }
+
+  namespace test_digit_separators
+  {
+
+    constexpr auto ten_million = 100'000'000;
+    static_assert(ten_million == 100000000, "");
+
+  }
+
+  namespace test_return_type_deduction
+  {
+
+    auto f(int& x) { return x; }
+    decltype(auto) g(int& x) { return x; }
+
+    template < typename T1, typename T2 >
+    struct is_same
+    {
+      static constexpr auto value = false;
+    };
+
+    template < typename T >
+    struct is_same<T, T>
+    {
+      static constexpr auto value = true;
+    };
+
+    int
+    test()
+    {
+      auto x = 0;
+      static_assert(is_same<int, decltype(f(x))>::value, "");
+      static_assert(is_same<int&, decltype(g(x))>::value, "");
+      return x;
+    }
+
+  }
+
+}  // namespace cxx14
+
+
+
+
+/* We don't want compiler-specific tests for R so these conditional
+   tests are commented out.
+
+   For C++17 features supported by compiler see
+   https://gcc.gnu.org/projects/cxx-status.html#cxx1z  for gcc
+   http://clang.llvm.org/cxx_status.html               for clang
+   http://en.cppreference.com/w/cpp/compiler_support   for an overview
+
+#if defined(__clang__)
+  #define REALLY_CLANG
+#else
+  #if defined(__GNUC__)
+    #define REALLY_GCC
+  #endif
+#endif
+*/
+
+#include <initializer_list>
+#include <utility>
+#include <type_traits>
+
+namespace cxx17
+{
+
+/* Not listed as supported by clang 4 - MTP
+#if !defined(REALLY_CLANG)
+  namespace test_constexpr_lambdas
+  {
+
+    // TODO: test it with clang++ from git
+
+    constexpr int foo = [](){return 42;}();
+
+  }
+#endif // !defined(REALLY_CLANG)
+*/
+
+  namespace test::nested_namespace::definitions
+  {
+
+  }
+
+  namespace test_fold_expression
+  {
+
+    template<typename... Args>
+    int multiply(Args... args)
+    {
+      return (args * ... * 1);
+    }
+
+    template<typename... Args>
+    bool all(Args... args)
+    {
+      return (args && ...);
+    }
+
+  }
+
+  namespace test_extended_static_assert
+  {
+
+    static_assert (true);
+
+  }
+
+  namespace test_auto_brace_init_list
+  {
+
+    auto foo = {5};
+    auto bar {5};
+
+    static_assert(std::is_same<std::initializer_list<int>, decltype(foo)>::value);
+    static_assert(std::is_same<int, decltype(bar)>::value);
+  }
+
+  namespace test_typename_in_template_template_parameter
+  {
+
+    template<template<typename> typename X> struct D;
+
+  }
+
+  namespace test_fallthrough_nodiscard_maybe_unused_attributes
+  {
+
+    int f1()
+    {
+      return 42;
+    }
+
+    [[nodiscard]] int f2()
+    {
+      [[maybe_unused]] auto unused = f1();
+
+      switch (f1())
+      {
+      case 17:
+        f1();
+        [[fallthrough]];
+      case 42:
+        f1();
+      }
+      return f1();
+    }
+
+  }
+
+  namespace test_extended_aggregate_initialization
+  {
+
+    struct base1
+    {
+      int b1, b2 = 42;
+    };
+
+    struct base2
+    {
+      base2() {
+        b3 = 42;
+      }
+      int b3;
+    };
+
+    struct derived : base1, base2
+    {
+        int d;
+    };
+
+    derived d1 {{1, 2}, {}, 4};  // full initialization
+    derived d2 {{}, {}, 4};      // value-initialized bases
+
+  }
+
+  namespace test_general_range_based_for_loop
+  {
+
+    struct iter
+    {
+      int i;
+
+      int& operator* ()
+      {
+        return i;
+      }
+
+      const int& operator* () const
+      {
+        return i;
+      }
+
+      iter& operator++()
+      {
+        ++i;
+        return *this;
+      }
+    };
+
+    struct sentinel
+    {
+      int i;
+    };
+
+    bool operator== (const iter& i, const sentinel& s)
+    {
+      return i.i == s.i;
+    }
+
+    bool operator!= (const iter& i, const sentinel& s)
+    {
+      return !(i == s);
+    }
+
+    struct range
+    {
+      iter begin() const
+      {
+        return {0};
+      }
+
+      sentinel end() const
+      {
+        return {5};
+      }
+    };
+
+    void f()
+    {
+      range r {};
+
+      for (auto i : r)
+      {
+        [[maybe_unused]] auto v = i;
+      }
+    }
+
+  }
+
+  namespace test_lambda_capture_asterisk_this_by_value
+  {
+
+    struct t
+    {
+      int i;
+      int foo()
+      {
+        return [*this]()
+        {
+          return i;
+        }();
+      }
+    };
+
+  }
+
+  namespace test_enum_class_construction
+  {
+
+    enum class byte : unsigned char
+    {};
+
+    byte foo {42};
+
+  }
+
+  namespace test_constexpr_if
+  {
+
+    template <bool cond>
+    int f ()
+    {
+      if constexpr(cond)
+      {
+        return 13;
+      }
+      else
+      {
+        return 42;
+      }
+    }
+
+  }
+
+  namespace test_selection_statement_with_initializer
+  {
+
+    int f()
+    {
+      return 13;
+    }
+
+    int f2()
+    {
+      if (auto i = f(); i > 0)
+      {
+        return 3;
+      }
+
+      switch (auto i = f(); i + 4)
+      {
+      case 17:
+        return 2;
+
+      default:
+        return 1;
+      }
+    }
+
+  }
+
+/* P0091R3 not supported by clang 4.0.0 - MTP
+#if !defined(REALLY_CLANG)
+  namespace test_template_argument_deduction_for_class_templates
+  {
+
+    // TODO: test it with clang++ from git
+
+    template <typename T1, typename T2>
+    struct pair
+    {
+      pair (T1 p1, T2 p2)
+        : m1 {p1},
+          m2 {p2}
+      {}
+
+      T1 m1;
+      T2 m2;
+    };
+
+    void f()
+    {
+      [[maybe_unused]] auto p = pair{13, 42u};
+    }
+
+  }
+#endif // !defined(REALLY_CLANG)
+*/
+
+  namespace test_non_type_auto_template_parameters
+  {
+
+    template <auto n>
+    struct B
+    {};
+
+    B<5> b1;
+    B<'a'> b2;
+
+  }
+
+/* P0217R3 should be supported in clang 4.0.0, but test code dumps core
+   In addition, gcc 7.0.1 fails on the last test - MTP
+#if !defined(REALLY_CLANG)
+  namespace test_structured_bindings
+  {
+
+    // TODO: test it with clang++ from git
+
+    int arr[2] = { 1, 2 };
+    std::pair<int, int> pr = { 1, 2 };
+
+    auto f1() -> int(&)[2]
+    {
+      return arr;
+    }
+
+    auto f2() -> std::pair<int, int>&
+    {
+      return pr;
+    }
+
+    struct S
+    {
+      int x1 : 2;
+      volatile double y1;
+    };
+
+    S f3()
+    {
+      return {};
+    }
+
+    auto [ x1, y1 ] = f1();
+    auto& [ xr1, yr1 ] = f1();
+    auto [ x2, y2 ] = f2();
+    auto& [ xr2, yr2 ] = f2();
+    const auto [ x3, y3 ] = f3();
+
+  }
+#endif // !defined(REALLY_CLANG)
+*/
+
+/*
+  P0012R1 is supported by clang 4.0.0 - MTP
+  #if !defined(REALLY_CLANG)
+*/
+  namespace test_exception_spec_type_system
+  {
+
+    // TODO: test it with clang++ from git
+
+    struct Good {};
+    struct Bad {};
+
+    void g1() noexcept;
+    void g2();
+
+    template<typename T>
+    Bad
+    f(T*, T*);
+
+    template<typename T1, typename T2>
+    Good
+    f(T1*, T2*);
+
+    static_assert (std::is_same_v<Good, decltype(f(g1, g2))>);
+
+  }
+/*
+  #endif // !defined(REALLY_CLANG)
+*/
+
+  namespace test_inline_variables
+  {
+
+    template<class T> void f(T)
+    {}
+
+    template<class T> inline T g(T)
+    {
+      return T{};
+    }
+
+    template<> inline void f<>(int)
+    {}
+
+    template<> int g<>(int)
+    {
+      return 5;
+    }
+
+  }
+
+}  // namespace cxx17
+
+
+#endif
+
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"; then :
+  ax_cv_cxx_compile_cxx17=yes
+else
+  ax_cv_cxx_compile_cxx17=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_cxx_compile_cxx17" >&5
+$as_echo "$ax_cv_cxx_compile_cxx17" >&6; }
+  if test x$ax_cv_cxx_compile_cxx17 = xyes; then
+    ac_success=yes
+  fi
+
+    if test x$ac_success = xno; then
+    for alternative in ${ax_cxx_compile_alternatives}; do
+      switch="-std=gnu++${alternative}"
+      cachevar=`$as_echo "ax_cv_cxx_compile_cxx17_$switch" | $as_tr_sh`
+      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++17 features with $switch" >&5
+$as_echo_n "checking whether $CXX supports C++17 features with $switch... " >&6; }
+if eval \${$cachevar+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_save_CXX="$CXX"
+         CXX="$CXX $switch"
+         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#ifndef __cplusplus
+#error "This is not a C++ compiler"
+#elif __cplusplus <= 201402L
+#error "This is not a C++17 compiler"
+#else
+
+
+namespace cxx11
+{
+
+  namespace test_static_assert
+  {
+
+    template <typename T>
+    struct check
+    {
+      static_assert(sizeof(int) <= sizeof(T), "not big enough");
+    };
+
+  }
+
+  namespace test_final_override
+  {
+
+    struct Base
+    {
+      virtual void f() {}
+    };
+
+    struct Derived : public Base
+    {
+      virtual void f() override {}
+    };
+
+  }
+
+  namespace test_double_right_angle_brackets
+  {
+
+    template < typename T >
+    struct check {};
+
+    typedef check<void> single_type;
+    typedef check<check<void>> double_type;
+    typedef check<check<check<void>>> triple_type;
+    typedef check<check<check<check<void>>>> quadruple_type;
+
+  }
+
+  namespace test_decltype
+  {
+
+    int
+    f()
+    {
+      int a = 1;
+      decltype(a) b = 2;
+      return a + b;
+    }
+
+  }
+
+  namespace test_type_deduction
+  {
+
+    template < typename T1, typename T2 >
+    struct is_same
+    {
+      static const bool value = false;
+    };
+
+    template < typename T >
+    struct is_same<T, T>
+    {
+      static const bool value = true;
+    };
+
+    template < typename T1, typename T2 >
+    auto
+    add(T1 a1, T2 a2) -> decltype(a1 + a2)
+    {
+      return a1 + a2;
+    }
+
+    int
+    test(const int c, volatile int v)
+    {
+      static_assert(is_same<int, decltype(0)>::value == true, "");
+      static_assert(is_same<int, decltype(c)>::value == false, "");
+      static_assert(is_same<int, decltype(v)>::value == false, "");
+      auto ac = c;
+      auto av = v;
+      auto sumi = ac + av + 'x';
+      auto sumf = ac + av + 1.0;
+      static_assert(is_same<int, decltype(ac)>::value == true, "");
+      static_assert(is_same<int, decltype(av)>::value == true, "");
+      static_assert(is_same<int, decltype(sumi)>::value == true, "");
+      static_assert(is_same<int, decltype(sumf)>::value == false, "");
+      static_assert(is_same<int, decltype(add(c, v))>::value == true, "");
+      return (sumf > 0.0) ? sumi : add(c, v);
+    }
+
+  }
+
+  namespace test_noexcept
+  {
+
+    int f() { return 0; }
+    int g() noexcept { return 0; }
+
+    static_assert(noexcept(f()) == false, "");
+    static_assert(noexcept(g()) == true, "");
+
+  }
+
+  namespace test_constexpr
+  {
+
+    template < typename CharT >
+    unsigned long constexpr
+    strlen_c_r(const CharT *const s, const unsigned long acc) noexcept
+    {
+      return *s ? strlen_c_r(s + 1, acc + 1) : acc;
+    }
+
+    template < typename CharT >
+    unsigned long constexpr
+    strlen_c(const CharT *const s) noexcept
+    {
+      return strlen_c_r(s, 0UL);
+    }
+
+    static_assert(strlen_c("") == 0UL, "");
+    static_assert(strlen_c("1") == 1UL, "");
+    static_assert(strlen_c("example") == 7UL, "");
+    static_assert(strlen_c("another\0example") == 7UL, "");
+
+  }
+
+  namespace test_rvalue_references
+  {
+
+    template < int N >
+    struct answer
+    {
+      static constexpr int value = N;
+    };
+
+    answer<1> f(int&)       { return answer<1>(); }
+    answer<2> f(const int&) { return answer<2>(); }
+    answer<3> f(int&&)      { return answer<3>(); }
+
+    void
+    test()
+    {
+      int i = 0;
+      const int c = 0;
+      static_assert(decltype(f(i))::value == 1, "");
+      static_assert(decltype(f(c))::value == 2, "");
+      static_assert(decltype(f(0))::value == 3, "");
+    }
+
+  }
+
+  namespace test_uniform_initialization
+  {
+
+    struct test
+    {
+      static const int zero {};
+      static const int one {1};
+    };
+
+    static_assert(test::zero == 0, "");
+    static_assert(test::one == 1, "");
+
+  }
+
+  namespace test_lambdas
+  {
+
+    void
+    test1()
+    {
+      auto lambda1 = [](){};
+      auto lambda2 = lambda1;
+      lambda1();
+      lambda2();
+    }
+
+    int
+    test2()
+    {
+      auto a = [](int i, int j){ return i + j; }(1, 2);
+      auto b = []() -> int { return '0'; }();
+      auto c = [=](){ return a + b; }();
+      auto d = [&](){ return c; }();
+      auto e = [a, &b](int x) mutable {
+        const auto identity = [](int y){ return y; };
+        for (auto i = 0; i < a; ++i)
+          a += b--;
+        return x + identity(a + b);
+      }(0);
+      return a + b + c + d + e;
+    }
+
+    int
+    test3()
+    {
+      const auto nullary = [](){ return 0; };
+      const auto unary = [](int x){ return x; };
+      using nullary_t = decltype(nullary);
+      using unary_t = decltype(unary);
+      const auto higher1st = [](nullary_t f){ return f(); };
+      const auto higher2nd = [unary](nullary_t f1){
+        return [unary, f1](unary_t f2){ return f2(unary(f1())); };
+      };
+      return higher1st(nullary) + higher2nd(nullary)(unary);
+    }
+
+  }
+
+  namespace test_variadic_templates
+  {
+
+    template <int...>
+    struct sum;
+
+    template <int N0, int... N1toN>
+    struct sum<N0, N1toN...>
+    {
+      /*
+        Original test code used the auto keyword instead of declaring
+        the type of "value" to be int. This causes Oracle Solaris Studio
+        12.4 to fail. This is possibly a compiler bug but in any case
+        current test code works around it by an explicit declaration.
+      */
+      static constexpr int value = N0 + sum<N1toN...>::value;
+    };
+
+    template <>
+    struct sum<>
+    {
+      static constexpr auto value = 0;
+    };
+
+    static_assert(sum<>::value == 0, "");
+    static_assert(sum<1>::value == 1, "");
+    static_assert(sum<23>::value == 23, "");
+    static_assert(sum<1, 2>::value == 3, "");
+    static_assert(sum<5, 5, 11>::value == 21, "");
+    static_assert(sum<2, 3, 5, 7, 11, 13>::value == 41, "");
+
+  }
+
+  // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae
+  // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function
+  // because of this.
+  namespace test_template_alias_sfinae
+  {
+
+    struct foo {};
+
+    template<typename T>
+    using member = typename T::member_type;
+
+    template<typename T>
+    void func(...) {}
+
+    template<typename T>
+    void func(member<T>*) {}
+
+    void test();
+
+    void test() { func<foo>(0); }
+
+  }
+
+}  // namespace cxx11
+
+
+
+
+namespace cxx14
+{
+
+  namespace test_polymorphic_lambdas
+  {
+
+    int
+    test()
+    {
+      const auto lambda = [](auto&&... args){
+        const auto istiny = [](auto x){
+          return (sizeof(x) == 1UL) ? 1 : 0;
+        };
+        const int aretiny[] = { istiny(args)... };
+        return aretiny[0];
+      };
+      return lambda(1, 1L, 1.0f, '1');
+    }
+
+  }
+
+  namespace test_binary_literals
+  {
+
+    constexpr auto ivii = 0b0000000000101010;
+    static_assert(ivii == 42, "wrong value");
+
+  }
+
+  namespace test_generalized_constexpr
+  {
+
+    template < typename CharT >
+    constexpr unsigned long
+    strlen_c(const CharT *const s) noexcept
+    {
+      auto length = 0UL;
+      for (auto p = s; *p; ++p)
+        ++length;
+      return length;
+    }
+
+    static_assert(strlen_c("") == 0UL, "");
+    static_assert(strlen_c("x") == 1UL, "");
+    static_assert(strlen_c("test") == 4UL, "");
+    static_assert(strlen_c("another\0test") == 7UL, "");
+
+  }
+
+  namespace test_lambda_init_capture
+  {
+
+    int
+    test()
+    {
+      auto x = 0;
+      const auto lambda1 = [a = x](int b){ return a + b; };
+      const auto lambda2 = [a = lambda1(x)](){ return a; };
+      return lambda2();
+    }
+
+  }
+
+  namespace test_digit_separators
+  {
+
+    constexpr auto ten_million = 100'000'000;
+    static_assert(ten_million == 100000000, "");
+
+  }
+
+  namespace test_return_type_deduction
+  {
+
+    auto f(int& x) { return x; }
+    decltype(auto) g(int& x) { return x; }
+
+    template < typename T1, typename T2 >
+    struct is_same
+    {
+      static constexpr auto value = false;
+    };
+
+    template < typename T >
+    struct is_same<T, T>
+    {
+      static constexpr auto value = true;
+    };
+
+    int
+    test()
+    {
+      auto x = 0;
+      static_assert(is_same<int, decltype(f(x))>::value, "");
+      static_assert(is_same<int&, decltype(g(x))>::value, "");
+      return x;
+    }
+
+  }
+
+}  // namespace cxx14
+
+
+
+
+/* We don't want compiler-specific tests for R so these conditional
+   tests are commented out.
+
+   For C++17 features supported by compiler see
+   https://gcc.gnu.org/projects/cxx-status.html#cxx1z  for gcc
+   http://clang.llvm.org/cxx_status.html               for clang
+   http://en.cppreference.com/w/cpp/compiler_support   for an overview
+
+#if defined(__clang__)
+  #define REALLY_CLANG
+#else
+  #if defined(__GNUC__)
+    #define REALLY_GCC
+  #endif
+#endif
+*/
+
+#include <initializer_list>
+#include <utility>
+#include <type_traits>
+
+namespace cxx17
+{
+
+/* Not listed as supported by clang 4 - MTP
+#if !defined(REALLY_CLANG)
+  namespace test_constexpr_lambdas
+  {
+
+    // TODO: test it with clang++ from git
+
+    constexpr int foo = [](){return 42;}();
+
+  }
+#endif // !defined(REALLY_CLANG)
+*/
+
+  namespace test::nested_namespace::definitions
+  {
+
+  }
+
+  namespace test_fold_expression
+  {
+
+    template<typename... Args>
+    int multiply(Args... args)
+    {
+      return (args * ... * 1);
+    }
+
+    template<typename... Args>
+    bool all(Args... args)
+    {
+      return (args && ...);
+    }
+
+  }
+
+  namespace test_extended_static_assert
+  {
+
+    static_assert (true);
+
+  }
+
+  namespace test_auto_brace_init_list
+  {
+
+    auto foo = {5};
+    auto bar {5};
+
+    static_assert(std::is_same<std::initializer_list<int>, decltype(foo)>::value);
+    static_assert(std::is_same<int, decltype(bar)>::value);
+  }
+
+  namespace test_typename_in_template_template_parameter
+  {
+
+    template<template<typename> typename X> struct D;
+
+  }
+
+  namespace test_fallthrough_nodiscard_maybe_unused_attributes
+  {
+
+    int f1()
+    {
+      return 42;
+    }
+
+    [[nodiscard]] int f2()
+    {
+      [[maybe_unused]] auto unused = f1();
+
+      switch (f1())
+      {
+      case 17:
+        f1();
+        [[fallthrough]];
+      case 42:
+        f1();
+      }
+      return f1();
+    }
+
+  }
+
+  namespace test_extended_aggregate_initialization
+  {
+
+    struct base1
+    {
+      int b1, b2 = 42;
+    };
+
+    struct base2
+    {
+      base2() {
+        b3 = 42;
+      }
+      int b3;
+    };
+
+    struct derived : base1, base2
+    {
+        int d;
+    };
+
+    derived d1 {{1, 2}, {}, 4};  // full initialization
+    derived d2 {{}, {}, 4};      // value-initialized bases
+
+  }
+
+  namespace test_general_range_based_for_loop
+  {
+
+    struct iter
+    {
+      int i;
+
+      int& operator* ()
+      {
+        return i;
+      }
+
+      const int& operator* () const
+      {
+        return i;
+      }
+
+      iter& operator++()
+      {
+        ++i;
+        return *this;
+      }
+    };
+
+    struct sentinel
+    {
+      int i;
+    };
+
+    bool operator== (const iter& i, const sentinel& s)
+    {
+      return i.i == s.i;
+    }
+
+    bool operator!= (const iter& i, const sentinel& s)
+    {
+      return !(i == s);
+    }
+
+    struct range
+    {
+      iter begin() const
+      {
+        return {0};
+      }
+
+      sentinel end() const
+      {
+        return {5};
+      }
+    };
+
+    void f()
+    {
+      range r {};
+
+      for (auto i : r)
+      {
+        [[maybe_unused]] auto v = i;
+      }
+    }
+
+  }
+
+  namespace test_lambda_capture_asterisk_this_by_value
+  {
+
+    struct t
+    {
+      int i;
+      int foo()
+      {
+        return [*this]()
+        {
+          return i;
+        }();
+      }
+    };
+
+  }
+
+  namespace test_enum_class_construction
+  {
+
+    enum class byte : unsigned char
+    {};
+
+    byte foo {42};
+
+  }
+
+  namespace test_constexpr_if
+  {
+
+    template <bool cond>
+    int f ()
+    {
+      if constexpr(cond)
+      {
+        return 13;
+      }
+      else
+      {
+        return 42;
+      }
+    }
+
+  }
+
+  namespace test_selection_statement_with_initializer
+  {
+
+    int f()
+    {
+      return 13;
+    }
+
+    int f2()
+    {
+      if (auto i = f(); i > 0)
+      {
+        return 3;
+      }
+
+      switch (auto i = f(); i + 4)
+      {
+      case 17:
+        return 2;
+
+      default:
+        return 1;
+      }
+    }
+
+  }
+
+/* P0091R3 not supported by clang 4.0.0 - MTP
+#if !defined(REALLY_CLANG)
+  namespace test_template_argument_deduction_for_class_templates
+  {
+
+    // TODO: test it with clang++ from git
+
+    template <typename T1, typename T2>
+    struct pair
+    {
+      pair (T1 p1, T2 p2)
+        : m1 {p1},
+          m2 {p2}
+      {}
+
+      T1 m1;
+      T2 m2;
+    };
+
+    void f()
+    {
+      [[maybe_unused]] auto p = pair{13, 42u};
+    }
+
+  }
+#endif // !defined(REALLY_CLANG)
+*/
+
+  namespace test_non_type_auto_template_parameters
+  {
+
+    template <auto n>
+    struct B
+    {};
+
+    B<5> b1;
+    B<'a'> b2;
+
+  }
+
+/* P0217R3 should be supported in clang 4.0.0, but test code dumps core
+   In addition, gcc 7.0.1 fails on the last test - MTP
+#if !defined(REALLY_CLANG)
+  namespace test_structured_bindings
+  {
+
+    // TODO: test it with clang++ from git
+
+    int arr[2] = { 1, 2 };
+    std::pair<int, int> pr = { 1, 2 };
+
+    auto f1() -> int(&)[2]
+    {
+      return arr;
+    }
+
+    auto f2() -> std::pair<int, int>&
+    {
+      return pr;
+    }
+
+    struct S
+    {
+      int x1 : 2;
+      volatile double y1;
+    };
+
+    S f3()
+    {
+      return {};
+    }
+
+    auto [ x1, y1 ] = f1();
+    auto& [ xr1, yr1 ] = f1();
+    auto [ x2, y2 ] = f2();
+    auto& [ xr2, yr2 ] = f2();
+    const auto [ x3, y3 ] = f3();
+
+  }
+#endif // !defined(REALLY_CLANG)
+*/
+
+/*
+  P0012R1 is supported by clang 4.0.0 - MTP
+  #if !defined(REALLY_CLANG)
+*/
+  namespace test_exception_spec_type_system
+  {
+
+    // TODO: test it with clang++ from git
+
+    struct Good {};
+    struct Bad {};
+
+    void g1() noexcept;
+    void g2();
+
+    template<typename T>
+    Bad
+    f(T*, T*);
+
+    template<typename T1, typename T2>
+    Good
+    f(T1*, T2*);
+
+    static_assert (std::is_same_v<Good, decltype(f(g1, g2))>);
+
+  }
+/*
+  #endif // !defined(REALLY_CLANG)
+*/
+
+  namespace test_inline_variables
+  {
+
+    template<class T> void f(T)
+    {}
+
+    template<class T> inline T g(T)
+    {
+      return T{};
+    }
+
+    template<> inline void f<>(int)
+    {}
+
+    template<> int g<>(int)
+    {
+      return 5;
+    }
+
+  }
+
+}  // namespace cxx17
+
+
+#endif
+
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"; then :
+  eval $cachevar=yes
+else
+  eval $cachevar=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+         CXX="$ac_save_CXX"
+fi
+eval ac_res=\$$cachevar
+	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+      if eval test x\$$cachevar = xyes; then
+        CXX="$CXX $switch"
+        if test -n "$CXXCPP" ; then
+          CXXCPP="$CXXCPP $switch"
+        fi
+        ac_success=yes
+        break
+      fi
+    done
+  fi
+
+    if test x$ac_success = xno; then
+                for alternative in ${ax_cxx_compile_alternatives}; do
+      for switch in -std=c++${alternative}; do
+        cachevar=`$as_echo "ax_cv_cxx_compile_cxx17_$switch" | $as_tr_sh`
+        { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++17 features with $switch" >&5
+$as_echo_n "checking whether $CXX supports C++17 features with $switch... " >&6; }
+if eval \${$cachevar+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_save_CXX="$CXX"
+           CXX="$CXX $switch"
+           cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#ifndef __cplusplus
+#error "This is not a C++ compiler"
+#elif __cplusplus <= 201402L
+#error "This is not a C++17 compiler"
+#else
+
+
+namespace cxx11
+{
+
+  namespace test_static_assert
+  {
+
+    template <typename T>
+    struct check
+    {
+      static_assert(sizeof(int) <= sizeof(T), "not big enough");
+    };
+
+  }
+
+  namespace test_final_override
+  {
+
+    struct Base
+    {
+      virtual void f() {}
+    };
+
+    struct Derived : public Base
+    {
+      virtual void f() override {}
+    };
+
+  }
+
+  namespace test_double_right_angle_brackets
+  {
+
+    template < typename T >
+    struct check {};
+
+    typedef check<void> single_type;
+    typedef check<check<void>> double_type;
+    typedef check<check<check<void>>> triple_type;
+    typedef check<check<check<check<void>>>> quadruple_type;
+
+  }
+
+  namespace test_decltype
+  {
+
+    int
+    f()
+    {
+      int a = 1;
+      decltype(a) b = 2;
+      return a + b;
+    }
+
+  }
+
+  namespace test_type_deduction
+  {
+
+    template < typename T1, typename T2 >
+    struct is_same
+    {
+      static const bool value = false;
+    };
+
+    template < typename T >
+    struct is_same<T, T>
+    {
+      static const bool value = true;
+    };
+
+    template < typename T1, typename T2 >
+    auto
+    add(T1 a1, T2 a2) -> decltype(a1 + a2)
+    {
+      return a1 + a2;
+    }
+
+    int
+    test(const int c, volatile int v)
+    {
+      static_assert(is_same<int, decltype(0)>::value == true, "");
+      static_assert(is_same<int, decltype(c)>::value == false, "");
+      static_assert(is_same<int, decltype(v)>::value == false, "");
+      auto ac = c;
+      auto av = v;
+      auto sumi = ac + av + 'x';
+      auto sumf = ac + av + 1.0;
+      static_assert(is_same<int, decltype(ac)>::value == true, "");
+      static_assert(is_same<int, decltype(av)>::value == true, "");
+      static_assert(is_same<int, decltype(sumi)>::value == true, "");
+      static_assert(is_same<int, decltype(sumf)>::value == false, "");
+      static_assert(is_same<int, decltype(add(c, v))>::value == true, "");
+      return (sumf > 0.0) ? sumi : add(c, v);
+    }
+
+  }
+
+  namespace test_noexcept
+  {
+
+    int f() { return 0; }
+    int g() noexcept { return 0; }
+
+    static_assert(noexcept(f()) == false, "");
+    static_assert(noexcept(g()) == true, "");
+
+  }
+
+  namespace test_constexpr
+  {
+
+    template < typename CharT >
+    unsigned long constexpr
+    strlen_c_r(const CharT *const s, const unsigned long acc) noexcept
+    {
+      return *s ? strlen_c_r(s + 1, acc + 1) : acc;
+    }
+
+    template < typename CharT >
+    unsigned long constexpr
+    strlen_c(const CharT *const s) noexcept
+    {
+      return strlen_c_r(s, 0UL);
+    }
+
+    static_assert(strlen_c("") == 0UL, "");
+    static_assert(strlen_c("1") == 1UL, "");
+    static_assert(strlen_c("example") == 7UL, "");
+    static_assert(strlen_c("another\0example") == 7UL, "");
+
+  }
+
+  namespace test_rvalue_references
+  {
+
+    template < int N >
+    struct answer
+    {
+      static constexpr int value = N;
+    };
+
+    answer<1> f(int&)       { return answer<1>(); }
+    answer<2> f(const int&) { return answer<2>(); }
+    answer<3> f(int&&)      { return answer<3>(); }
+
+    void
+    test()
+    {
+      int i = 0;
+      const int c = 0;
+      static_assert(decltype(f(i))::value == 1, "");
+      static_assert(decltype(f(c))::value == 2, "");
+      static_assert(decltype(f(0))::value == 3, "");
+    }
+
+  }
+
+  namespace test_uniform_initialization
+  {
+
+    struct test
+    {
+      static const int zero {};
+      static const int one {1};
+    };
+
+    static_assert(test::zero == 0, "");
+    static_assert(test::one == 1, "");
+
+  }
+
+  namespace test_lambdas
+  {
+
+    void
+    test1()
+    {
+      auto lambda1 = [](){};
+      auto lambda2 = lambda1;
+      lambda1();
+      lambda2();
+    }
+
+    int
+    test2()
+    {
+      auto a = [](int i, int j){ return i + j; }(1, 2);
+      auto b = []() -> int { return '0'; }();
+      auto c = [=](){ return a + b; }();
+      auto d = [&](){ return c; }();
+      auto e = [a, &b](int x) mutable {
+        const auto identity = [](int y){ return y; };
+        for (auto i = 0; i < a; ++i)
+          a += b--;
+        return x + identity(a + b);
+      }(0);
+      return a + b + c + d + e;
+    }
+
+    int
+    test3()
+    {
+      const auto nullary = [](){ return 0; };
+      const auto unary = [](int x){ return x; };
+      using nullary_t = decltype(nullary);
+      using unary_t = decltype(unary);
+      const auto higher1st = [](nullary_t f){ return f(); };
+      const auto higher2nd = [unary](nullary_t f1){
+        return [unary, f1](unary_t f2){ return f2(unary(f1())); };
+      };
+      return higher1st(nullary) + higher2nd(nullary)(unary);
+    }
+
+  }
+
+  namespace test_variadic_templates
+  {
+
+    template <int...>
+    struct sum;
+
+    template <int N0, int... N1toN>
+    struct sum<N0, N1toN...>
+    {
+      /*
+        Original test code used the auto keyword instead of declaring
+        the type of "value" to be int. This causes Oracle Solaris Studio
+        12.4 to fail. This is possibly a compiler bug but in any case
+        current test code works around it by an explicit declaration.
+      */
+      static constexpr int value = N0 + sum<N1toN...>::value;
+    };
+
+    template <>
+    struct sum<>
+    {
+      static constexpr auto value = 0;
+    };
+
+    static_assert(sum<>::value == 0, "");
+    static_assert(sum<1>::value == 1, "");
+    static_assert(sum<23>::value == 23, "");
+    static_assert(sum<1, 2>::value == 3, "");
+    static_assert(sum<5, 5, 11>::value == 21, "");
+    static_assert(sum<2, 3, 5, 7, 11, 13>::value == 41, "");
+
+  }
+
+  // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae
+  // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function
+  // because of this.
+  namespace test_template_alias_sfinae
+  {
+
+    struct foo {};
+
+    template<typename T>
+    using member = typename T::member_type;
+
+    template<typename T>
+    void func(...) {}
+
+    template<typename T>
+    void func(member<T>*) {}
+
+    void test();
+
+    void test() { func<foo>(0); }
+
+  }
+
+}  // namespace cxx11
+
+
+
+
+namespace cxx14
+{
+
+  namespace test_polymorphic_lambdas
+  {
+
+    int
+    test()
+    {
+      const auto lambda = [](auto&&... args){
+        const auto istiny = [](auto x){
+          return (sizeof(x) == 1UL) ? 1 : 0;
+        };
+        const int aretiny[] = { istiny(args)... };
+        return aretiny[0];
+      };
+      return lambda(1, 1L, 1.0f, '1');
+    }
+
+  }
+
+  namespace test_binary_literals
+  {
+
+    constexpr auto ivii = 0b0000000000101010;
+    static_assert(ivii == 42, "wrong value");
+
+  }
+
+  namespace test_generalized_constexpr
+  {
+
+    template < typename CharT >
+    constexpr unsigned long
+    strlen_c(const CharT *const s) noexcept
+    {
+      auto length = 0UL;
+      for (auto p = s; *p; ++p)
+        ++length;
+      return length;
+    }
+
+    static_assert(strlen_c("") == 0UL, "");
+    static_assert(strlen_c("x") == 1UL, "");
+    static_assert(strlen_c("test") == 4UL, "");
+    static_assert(strlen_c("another\0test") == 7UL, "");
+
+  }
+
+  namespace test_lambda_init_capture
+  {
+
+    int
+    test()
+    {
+      auto x = 0;
+      const auto lambda1 = [a = x](int b){ return a + b; };
+      const auto lambda2 = [a = lambda1(x)](){ return a; };
+      return lambda2();
+    }
+
+  }
+
+  namespace test_digit_separators
+  {
+
+    constexpr auto ten_million = 100'000'000;
+    static_assert(ten_million == 100000000, "");
+
+  }
+
+  namespace test_return_type_deduction
+  {
+
+    auto f(int& x) { return x; }
+    decltype(auto) g(int& x) { return x; }
+
+    template < typename T1, typename T2 >
+    struct is_same
+    {
+      static constexpr auto value = false;
+    };
+
+    template < typename T >
+    struct is_same<T, T>
+    {
+      static constexpr auto value = true;
+    };
+
+    int
+    test()
+    {
+      auto x = 0;
+      static_assert(is_same<int, decltype(f(x))>::value, "");
+      static_assert(is_same<int&, decltype(g(x))>::value, "");
+      return x;
+    }
+
+  }
+
+}  // namespace cxx14
+
+
+
+
+/* We don't want compiler-specific tests for R so these conditional
+   tests are commented out.
+
+   For C++17 features supported by compiler see
+   https://gcc.gnu.org/projects/cxx-status.html#cxx1z  for gcc
+   http://clang.llvm.org/cxx_status.html               for clang
+   http://en.cppreference.com/w/cpp/compiler_support   for an overview
+
+#if defined(__clang__)
+  #define REALLY_CLANG
+#else
+  #if defined(__GNUC__)
+    #define REALLY_GCC
+  #endif
+#endif
+*/
+
+#include <initializer_list>
+#include <utility>
+#include <type_traits>
+
+namespace cxx17
+{
+
+/* Not listed as supported by clang 4 - MTP
+#if !defined(REALLY_CLANG)
+  namespace test_constexpr_lambdas
+  {
+
+    // TODO: test it with clang++ from git
+
+    constexpr int foo = [](){return 42;}();
+
+  }
+#endif // !defined(REALLY_CLANG)
+*/
+
+  namespace test::nested_namespace::definitions
+  {
+
+  }
+
+  namespace test_fold_expression
+  {
+
+    template<typename... Args>
+    int multiply(Args... args)
+    {
+      return (args * ... * 1);
+    }
+
+    template<typename... Args>
+    bool all(Args... args)
+    {
+      return (args && ...);
+    }
+
+  }
+
+  namespace test_extended_static_assert
+  {
+
+    static_assert (true);
+
+  }
+
+  namespace test_auto_brace_init_list
+  {
+
+    auto foo = {5};
+    auto bar {5};
+
+    static_assert(std::is_same<std::initializer_list<int>, decltype(foo)>::value);
+    static_assert(std::is_same<int, decltype(bar)>::value);
+  }
+
+  namespace test_typename_in_template_template_parameter
+  {
+
+    template<template<typename> typename X> struct D;
+
+  }
+
+  namespace test_fallthrough_nodiscard_maybe_unused_attributes
+  {
+
+    int f1()
+    {
+      return 42;
+    }
+
+    [[nodiscard]] int f2()
+    {
+      [[maybe_unused]] auto unused = f1();
+
+      switch (f1())
+      {
+      case 17:
+        f1();
+        [[fallthrough]];
+      case 42:
+        f1();
+      }
+      return f1();
+    }
+
+  }
+
+  namespace test_extended_aggregate_initialization
+  {
+
+    struct base1
+    {
+      int b1, b2 = 42;
+    };
+
+    struct base2
+    {
+      base2() {
+        b3 = 42;
+      }
+      int b3;
+    };
+
+    struct derived : base1, base2
+    {
+        int d;
+    };
+
+    derived d1 {{1, 2}, {}, 4};  // full initialization
+    derived d2 {{}, {}, 4};      // value-initialized bases
+
+  }
+
+  namespace test_general_range_based_for_loop
+  {
+
+    struct iter
+    {
+      int i;
+
+      int& operator* ()
+      {
+        return i;
+      }
+
+      const int& operator* () const
+      {
+        return i;
+      }
+
+      iter& operator++()
+      {
+        ++i;
+        return *this;
+      }
+    };
+
+    struct sentinel
+    {
+      int i;
+    };
+
+    bool operator== (const iter& i, const sentinel& s)
+    {
+      return i.i == s.i;
+    }
+
+    bool operator!= (const iter& i, const sentinel& s)
+    {
+      return !(i == s);
+    }
+
+    struct range
+    {
+      iter begin() const
+      {
+        return {0};
+      }
+
+      sentinel end() const
+      {
+        return {5};
+      }
+    };
+
+    void f()
+    {
+      range r {};
+
+      for (auto i : r)
+      {
+        [[maybe_unused]] auto v = i;
+      }
+    }
+
+  }
+
+  namespace test_lambda_capture_asterisk_this_by_value
+  {
+
+    struct t
+    {
+      int i;
+      int foo()
+      {
+        return [*this]()
+        {
+          return i;
+        }();
+      }
+    };
+
+  }
+
+  namespace test_enum_class_construction
+  {
+
+    enum class byte : unsigned char
+    {};
+
+    byte foo {42};
+
+  }
+
+  namespace test_constexpr_if
+  {
+
+    template <bool cond>
+    int f ()
+    {
+      if constexpr(cond)
+      {
+        return 13;
+      }
+      else
+      {
+        return 42;
+      }
+    }
+
+  }
+
+  namespace test_selection_statement_with_initializer
+  {
+
+    int f()
+    {
+      return 13;
+    }
+
+    int f2()
+    {
+      if (auto i = f(); i > 0)
+      {
+        return 3;
+      }
+
+      switch (auto i = f(); i + 4)
+      {
+      case 17:
+        return 2;
+
+      default:
+        return 1;
+      }
+    }
+
+  }
+
+/* P0091R3 not supported by clang 4.0.0 - MTP
+#if !defined(REALLY_CLANG)
+  namespace test_template_argument_deduction_for_class_templates
+  {
+
+    // TODO: test it with clang++ from git
+
+    template <typename T1, typename T2>
+    struct pair
+    {
+      pair (T1 p1, T2 p2)
+        : m1 {p1},
+          m2 {p2}
+      {}
+
+      T1 m1;
+      T2 m2;
+    };
+
+    void f()
+    {
+      [[maybe_unused]] auto p = pair{13, 42u};
+    }
+
+  }
+#endif // !defined(REALLY_CLANG)
+*/
+
+  namespace test_non_type_auto_template_parameters
+  {
+
+    template <auto n>
+    struct B
+    {};
+
+    B<5> b1;
+    B<'a'> b2;
+
+  }
+
+/* P0217R3 should be supported in clang 4.0.0, but test code dumps core
+   In addition, gcc 7.0.1 fails on the last test - MTP
+#if !defined(REALLY_CLANG)
+  namespace test_structured_bindings
+  {
+
+    // TODO: test it with clang++ from git
+
+    int arr[2] = { 1, 2 };
+    std::pair<int, int> pr = { 1, 2 };
+
+    auto f1() -> int(&)[2]
+    {
+      return arr;
+    }
+
+    auto f2() -> std::pair<int, int>&
+    {
+      return pr;
+    }
+
+    struct S
+    {
+      int x1 : 2;
+      volatile double y1;
+    };
+
+    S f3()
+    {
+      return {};
+    }
+
+    auto [ x1, y1 ] = f1();
+    auto& [ xr1, yr1 ] = f1();
+    auto [ x2, y2 ] = f2();
+    auto& [ xr2, yr2 ] = f2();
+    const auto [ x3, y3 ] = f3();
+
+  }
+#endif // !defined(REALLY_CLANG)
+*/
+
+/*
+  P0012R1 is supported by clang 4.0.0 - MTP
+  #if !defined(REALLY_CLANG)
+*/
+  namespace test_exception_spec_type_system
+  {
+
+    // TODO: test it with clang++ from git
+
+    struct Good {};
+    struct Bad {};
+
+    void g1() noexcept;
+    void g2();
+
+    template<typename T>
+    Bad
+    f(T*, T*);
+
+    template<typename T1, typename T2>
+    Good
+    f(T1*, T2*);
+
+    static_assert (std::is_same_v<Good, decltype(f(g1, g2))>);
+
+  }
+/*
+  #endif // !defined(REALLY_CLANG)
+*/
+
+  namespace test_inline_variables
+  {
+
+    template<class T> void f(T)
+    {}
+
+    template<class T> inline T g(T)
+    {
+      return T{};
+    }
+
+    template<> inline void f<>(int)
+    {}
+
+    template<> int g<>(int)
+    {
+      return 5;
+    }
+
+  }
+
+}  // namespace cxx17
+
+
+#endif
+
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"; then :
+  eval $cachevar=yes
+else
+  eval $cachevar=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+           CXX="$ac_save_CXX"
+fi
+eval ac_res=\$$cachevar
+	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+        if eval test x\$$cachevar = xyes; then
+          CXX="$CXX $switch"
+          if test -n "$CXXCPP" ; then
+            CXXCPP="$CXXCPP $switch"
+          fi
+          ac_success=yes
+          break
+        fi
+      done
+      if test x$ac_success = xyes; then
+        break
+      fi
+    done
+  fi
+  ac_ext=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+  if test x$ax_cxx_compile_cxx17_required = xtrue; then
+    if test x$ac_success = xno; then
+      as_fn_error $? "*** A compiler with support for C++17 language features is required." "$LINENO" 5
+    fi
+  fi
+  if test x$ac_success = xno; then
+    HAVE_CXX17=0
+    { $as_echo "$as_me:${as_lineno-$LINENO}: No compiler with C++17 support was found" >&5
+$as_echo "$as_me: No compiler with C++17 support was found" >&6;}
+  else
+    HAVE_CXX17=1
+  fi
+
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+CXX="${r_save_CXX}"
+CXXFLAGS="${r_save_CXXFLAGS}"
+if test "${HAVE_CXX17}" = "1"; then
+  if test "${CXX17STD}"x = "x";  then
+    CXX17STD="${switch}"
+  else
+    CXX17STD="${CXX17STD} ${switch}"
+  fi
+else
+  CXX17=""
+  CXX17STD=""
+  CXX17FLAGS=""
+  CXX17PICFLAGS=""
+fi
+
+
+
+
+
+if test -z "${SHLIB_CXX17LD}"; then
+  SHLIB_CXX17LD="\$(CXX17) \$(CXX17STD)"
+fi
+
+: ${SHLIB_CXX17LDFLAGS=${SHLIB_CXX14LDFLAGS}}
+
+
+
+
+
+
+
+
+
+
+### OpenMP.
+
+## The basic checking is performed via AC_OPENMP added in Autoconf 2.62,
+## which we already called for determining the appropriate flags for the
+## C, C++, Fortran 77, Fortran compiler/linker.  Note that this gives
+## variables OPENMP_CFLAGS etc., which are meant to be used for *both*
+## compiling and linking.  So we can really only used them provided that
+## we use the respective compilers for linking as well (or we need a
+## different mechanism for determining what is needed).
+##
+## For compiling R itself, we use MAIN_LD and DYLIB_LD for linking, both
+## defaulting to CC.  Hence:
+##
+##    If both MAIN_LD and DYLIB_LD were not specified by the user and
+##    equal CC and this was determined to support OpenMP, then we (try
+##    to) provide OpenMP support by adding OPENMP_CFLAGS to the linker
+##    flags and OPENMP_CFLAGS and OPENMP_FFLAGS to the C and Fortran 77
+##    compiler flags, and defining HAVE_OPENMP.
+##
+## (The Fortran 77 compiler is never used for linking by default.)
+
+if test -n "${R_OPENMP_CFLAGS+set}"; then
+  if test -n "${R_OPENMP_CFLAGS}"; then
+    separator=""
+test -z "${separator}" && separator=" "
+if test -z "${MAIN_LDFLAGS}"; then
+  MAIN_LDFLAGS="${R_OPENMP_CFLAGS}"
+else
+  MAIN_LDFLAGS="${MAIN_LDFLAGS}${separator}${R_OPENMP_CFLAGS}"
+fi
+    separator=""
+test -z "${separator}" && separator=" "
+if test -z "${DYLIB_LDFLAGS}"; then
+  DYLIB_LDFLAGS="${R_OPENMP_CFLAGS}"
+else
+  DYLIB_LDFLAGS="${DYLIB_LDFLAGS}${separator}${R_OPENMP_CFLAGS}"
+fi
+
+$as_echo "#define HAVE_OPENMP 1" >>confdefs.h
+
+  fi
+elif test "x${main_ld_was_given}" = xno -a "${MAIN_LD}" = "\$(CC)" -a \
+        "x${dylib_ld_was_given}" = xno -a "${DYLIB_LD}" = "\$(CC)" -a \
+        "x${ac_cv_prog_c_openmp}" != "xunsupported"; then
+  R_OPENMP_CFLAGS="${OPENMP_CFLAGS}"
+  separator=""
+test -z "${separator}" && separator=" "
+if test -z "${MAIN_LDFLAGS}"; then
+  MAIN_LDFLAGS="${OPENMP_CFLAGS}"
+else
+  MAIN_LDFLAGS="${MAIN_LDFLAGS}${separator}${OPENMP_CFLAGS}"
+fi
+  separator=""
+test -z "${separator}" && separator=" "
+if test -z "${DYLIB_LDFLAGS}"; then
+  DYLIB_LDFLAGS="${OPENMP_CFLAGS}"
+else
+  DYLIB_LDFLAGS="${DYLIB_LDFLAGS}${separator}${OPENMP_CFLAGS}"
+fi
+
+$as_echo "#define HAVE_OPENMP 1" >>confdefs.h
+
+else
+  R_OPENMP_CFLAGS=
+fi
+## Currently unused: see comment in Makeconf.in
+if test -z "${R_OPENMP_FFLAGS+set}" -a \
+        "x${ac_cv_prog_f77_openmp}" != "xunsupported"; then
+  R_OPENMP_FFLAGS="${OPENMP_FFLAGS}"
+fi
+
+
+
+## For compiling package code, we use SHLIB_FCLD, SHLIB_CXXLD or
+## SHLIB_LD for linking, depending on whether the package contains
+## Fortran (90/95) code, C++ (or ObjC) code, or "just" C and Fortran 77.
+## However, we (currently) do not conditionalize compilation flags.  So
+## the only "safe" thing we can do for now is:
+##
+##    If none of SHLIB_LD, SHLIB_CXXLD and SHLIB_FCLD were specified by
+##    the user and equal CC, CXX and FC, respectively, and these were
+##    determined to support OpenMP, the we try to provide OpenMP support
+##    for packages by adding OPENMP_FCFLAGS, OPENMP_CXXFLAGS and
+##    OPENMP_CFLAGS to the respective linker flags, and add the OPENMP
+##    flags to all (C, C++, Fortran and Fortran 77) compiler flags.
+
+## <FIXME>
+## Need to do this after configuring Fortran 90/95 support, which comes
+## way below: should this be moved up to the compiler section?
+## </FIXME>
+
+### Now we have found all the flags, we need to use them to test appropriately.
+### We don't currently have any C++ tests, but future-proof.
+### In principle we should do this before testing for C-Fortran compatibility.
+
+CPPFLAGS_KEEP=${CPPFLAGS}
+CFLAGS_KEEP=${CFLAGS}
+FFLAGS_KEEP=${FFLAGS}
+CXXFLAGS_KEEP=${CXXFLAGS}
+CPPFLAGS="${CPPFLAGS} ${R_XTRA_CPPFLAGS}"
+if test "${want_R_shlib}" = yes; then
+  CFLAGS="${CFLAGS} ${CPICFLAGS} ${R_XTRA_CFLAGS}"
+  FFLAGS="${FFLAGS} ${FPICFLAGS} ${R_XTRA_FFLAGS}"
+  CXXFLAGS="${CXXFLAGS} ${CXXPICFLAGS} ${R_XTRA_CXXFLAGS}"
+else
+  CFLAGS="${CFLAGS} ${R_XTRA_CFLAGS}"
+  FFLAGS="${FFLAGS} ${R_XTRA_FFLAGS}"
+  CXXFLAGS="${CXXFLAGS} ${R_XTRA_CXXFLAGS}"
+fi
+
+### * Checks for library functions.
+
+ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
+if test "x$ac_cv_type_off_t" = xyes; then :
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_OFF_T 1
+_ACEOF
+
+
+fi
+
+# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
+# for constant arguments.  Useless!
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5
+$as_echo_n "checking for working alloca.h... " >&6; }
+if ${ac_cv_working_alloca_h+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <alloca.h>
+#ifdef F77_DUMMY_MAIN
+
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int F77_DUMMY_MAIN() { return 1; }
+
+#endif
+int
+main ()
+{
+char *p = (char *) alloca (2 * sizeof (int));
+			  if (p) return 0;
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_working_alloca_h=yes
+else
+  ac_cv_working_alloca_h=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5
+$as_echo "$ac_cv_working_alloca_h" >&6; }
+if test $ac_cv_working_alloca_h = yes; then
+
+$as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h
+
+fi
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5
+$as_echo_n "checking for alloca... " >&6; }
+if ${ac_cv_func_alloca_works+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#ifdef __GNUC__
+# define alloca __builtin_alloca
+#else
+# ifdef _MSC_VER
+#  include <malloc.h>
+#  define alloca _alloca
+# else
+#  ifdef HAVE_ALLOCA_H
+#   include <alloca.h>
+#  else
+#   ifdef _AIX
+ #pragma alloca
+#   else
+#    ifndef alloca /* predefined by HP cc +Olibcalls */
+void *alloca (size_t);
+#    endif
+#   endif
+#  endif
+# endif
+#endif
+
+#ifdef F77_DUMMY_MAIN
+
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int F77_DUMMY_MAIN() { return 1; }
+
+#endif
+int
+main ()
+{
+char *p = (char *) alloca (1);
+				    if (p) return 0;
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_func_alloca_works=yes
+else
+  ac_cv_func_alloca_works=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5
+$as_echo "$ac_cv_func_alloca_works" >&6; }
+
+if test $ac_cv_func_alloca_works = yes; then
+
+$as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
+
+else
+  # The SVR3 libPW and SVR4 libucb both contain incompatible functions
+# that cause trouble.  Some versions do not even contain alloca or
+# contain a buggy version.  If you still want to use their alloca,
+# use ar to extract alloca.o from them instead of compiling alloca.c.
+
+ALLOCA=\${LIBOBJDIR}alloca.$ac_objext
+
+$as_echo "#define C_ALLOCA 1" >>confdefs.h
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5
+$as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; }
+if ${ac_cv_os_cray+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#if defined CRAY && ! defined CRAY2
+webecray
+#else
+wenotbecray
+#endif
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "webecray" >/dev/null 2>&1; then :
+  ac_cv_os_cray=yes
+else
+  ac_cv_os_cray=no
+fi
+rm -f conftest*
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5
+$as_echo "$ac_cv_os_cray" >&6; }
+if test $ac_cv_os_cray = yes; then
+  for ac_func in _getb67 GETB67 getb67; do
+    as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
+ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
+if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
+
+cat >>confdefs.h <<_ACEOF
+#define CRAY_STACKSEG_END $ac_func
+_ACEOF
+
+    break
+fi
+
+  done
+fi
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5
+$as_echo_n "checking stack direction for C alloca... " >&6; }
+if ${ac_cv_c_stack_direction+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test "$cross_compiling" = yes; then :
+  ac_cv_c_stack_direction=0
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+$ac_includes_default
+int
+find_stack_direction (int *addr, int depth)
+{
+  int dir, dummy = 0;
+  if (! addr)
+    addr = &dummy;
+  *addr = addr < &dummy ? 1 : addr == &dummy ? 0 : -1;
+  dir = depth ? find_stack_direction (addr, depth - 1) : 0;
+  return dir + dummy;
+}
+
+int
+main (int argc, char **argv)
+{
+  return find_stack_direction (0, argc + !argv + 20) < 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+  ac_cv_c_stack_direction=1
+else
+  ac_cv_c_stack_direction=-1
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5
+$as_echo "$ac_cv_c_stack_direction" >&6; }
+cat >>confdefs.h <<_ACEOF
+#define STACK_DIRECTION $ac_cv_c_stack_direction
+_ACEOF
+
+
+fi
+
+ac_fn_c_check_decl "$LINENO" "alloca" "ac_cv_have_decl_alloca" "#ifdef HAVE_ALLOCA_H
+# include <alloca.h>
+#endif
+"
+if test "x$ac_cv_have_decl_alloca" = xyes; then :
+  ac_have_decl=1
+else
+  ac_have_decl=0
+fi
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_ALLOCA $ac_have_decl
+_ACEOF
+
+
+## C99 functions:
+## not all C99 runtimes are complete,
+## but we have substitutes for expm1 hypot log1p and (internally) nearbyint[l]
+## FreeBSD used to lack log1pl, but 10 seems to have it.
+## FreeBSD 8.2 lacks log2
+## FreeBSD 7.3 lacks nearbyintl/rintl (nearbyint appeared in 5.2)
+## Apparently rint was once broken on HP-UX: undefine HAVE_RINT for such platforms
+## Cygwin and FreeBSD lacked powl (FreeBSD 10 seems to have it).
+## Cygwin had rintl but not nearbyintl
+for ac_func in expm1 hypot log1p log1pl log2 log10 nearbyint nearbyintl powl rint rintl
+do
+as_ac_Symbol=`$as_echo "ac_cv_have_decl_$ac_func" | $as_tr_sh`
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $ac_func exists and is declared" >&5
+$as_echo_n "checking whether $ac_func exists and is declared... " >&6; }
+if eval \${$as_ac_Symbol+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <math.h>
+
+#ifdef F77_DUMMY_MAIN
+
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int F77_DUMMY_MAIN() { return 1; }
+
+#endif
+int
+main ()
+{
+#ifndef $ac_func
+  char *p = (char *) $ac_func;
+#endif
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  eval "$as_ac_Symbol=yes"
+else
+  eval "$as_ac_Symbol=no"
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+fi
+eval ac_res=\$$as_ac_Symbol
+	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+if test `eval 'as_val=${'$as_ac_Symbol'};$as_echo "$as_val"'` = yes; then :
+  cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+## va_copy is C99: required as from R 2.13.0
+for ac_func in va_copy
+do
+as_ac_Symbol=`$as_echo "ac_cv_have_decl_$ac_func" | $as_tr_sh`
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $ac_func exists and is declared" >&5
+$as_echo_n "checking whether $ac_func exists and is declared... " >&6; }
+if eval \${$as_ac_Symbol+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <stdarg.h>
+
+#ifdef F77_DUMMY_MAIN
+
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int F77_DUMMY_MAIN() { return 1; }
+
+#endif
+int
+main ()
+{
+#ifndef $ac_func
+  char *p = (char *) $ac_func;
+#endif
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
   eval "$as_ac_Symbol=yes"
 else
   eval "$as_ac_Symbol=no"
@@ -27488,10 +33912,11 @@ _ACEOF
 fi
 
 
-## Functions from draft C11 extensions, some of which are already in glibc
+## Functions from ISO/IEC TS 18661-4:2015 C11 extensions.
 ## For now, do not define _GNU_SOURCE here.
-## All but pown have long been in libsunmath
-for ac_func in atanpi atan2pi cospi exp10 pown sinpi tanpi
+## All but pown have long been in Solaris' libsunmath
+## macOS has __cospi __sinpi __tanpi
+for ac_func in atanpi atan2pi cospi exp10 pown sinpi tanpi __cospi __sinpi __tanpi
 do :
   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
@@ -27499,7 +33924,7 @@ if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
   cat >>confdefs.h <<_ACEOF
 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
 _ACEOF
- #define __STDC_WANT_IEC_60559_TYPES_EXT__ 1
+ #define __STDC_WANT_IEC_60559_FUNCS_EXT__ 1
 #include <math.h>
 #ifdef HAVE_SUNMATH_H
 #include <sunmath.h>
@@ -27574,7 +33999,57 @@ _ACEOF
 fi
 done
 
-for ac_func in getgrgid
+for ac_func in getgrgid
+do
+as_ac_Symbol=`$as_echo "ac_cv_have_decl_$ac_func" | $as_tr_sh`
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $ac_func exists and is declared" >&5
+$as_echo_n "checking whether $ac_func exists and is declared... " >&6; }
+if eval \${$as_ac_Symbol+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <grp.h>
+
+#ifdef F77_DUMMY_MAIN
+
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int F77_DUMMY_MAIN() { return 1; }
+
+#endif
+int
+main ()
+{
+#ifndef $ac_func
+  char *p = (char *) $ac_func;
+#endif
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  eval "$as_ac_Symbol=yes"
+else
+  eval "$as_ac_Symbol=no"
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+fi
+eval ac_res=\$$as_ac_Symbol
+	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+if test `eval 'as_val=${'$as_ac_Symbol'};$as_echo "$as_val"'` = yes; then :
+  cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+for ac_func in getpwuid
 do
 as_ac_Symbol=`$as_echo "ac_cv_have_decl_$ac_func" | $as_tr_sh`
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $ac_func exists and is declared" >&5
@@ -27584,7 +34059,7 @@ if eval \${$as_ac_Symbol+:} false; then :
 else
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-#include <grp.h>
+#include <pwd.h>
 
 #ifdef F77_DUMMY_MAIN
 
@@ -27624,7 +34099,7 @@ _ACEOF
 fi
 done
 
-for ac_func in getpwuid
+for ac_func in kill sigaction sigaltstack sigemptyset
 do
 as_ac_Symbol=`$as_echo "ac_cv_have_decl_$ac_func" | $as_tr_sh`
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $ac_func exists and is declared" >&5
@@ -27634,7 +34109,7 @@ if eval \${$as_ac_Symbol+:} false; then :
 else
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-#include <pwd.h>
+#include <signal.h>
 
 #ifdef F77_DUMMY_MAIN
 
@@ -27674,7 +34149,7 @@ _ACEOF
 fi
 done
 
-for ac_func in kill sigaction sigaltstack sigemptyset
+for ac_func in fdopen popen
 do
 as_ac_Symbol=`$as_echo "ac_cv_have_decl_$ac_func" | $as_tr_sh`
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $ac_func exists and is declared" >&5
@@ -27684,7 +34159,7 @@ if eval \${$as_ac_Symbol+:} false; then :
 else
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-#include <signal.h>
+#include <stdio.h>
 
 #ifdef F77_DUMMY_MAIN
 
@@ -27724,7 +34199,10 @@ _ACEOF
 fi
 done
 
-for ac_func in fdopen popen
+if test "${ac_cv_have_decl_popen}" = "no"; then
+   as_fn_error $? "Building R requires the 'popen' system call" "$LINENO" 5
+fi
+for ac_func in getline
 do
 as_ac_Symbol=`$as_echo "ac_cv_have_decl_$ac_func" | $as_tr_sh`
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $ac_func exists and is declared" >&5
@@ -27774,9 +34252,73 @@ _ACEOF
 fi
 done
 
-if test "${ac_cv_have_decl_popen}" = "no"; then
-   as_fn_error $? "Building R requires the 'popen' system call" "$LINENO" 5
+for ac_func in select
+do
+as_ac_Symbol=`$as_echo "ac_cv_have_decl_$ac_func" | $as_tr_sh`
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $ac_func exists and is declared" >&5
+$as_echo_n "checking whether $ac_func exists and is declared... " >&6; }
+if eval \${$as_ac_Symbol+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#ifdef HAVE_SYS_SELECT_H
+#include <sys/select.h>  /* POSIX >= 2001 */
+#endif
+#ifdef HAVE_SYS_TIME_H
+#include <sys/time.h>  /* Earlier POSIX, HP-UX? */
+#endif
+
+#ifdef F77_DUMMY_MAIN
+
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int F77_DUMMY_MAIN() { return 1; }
+
+#endif
+int
+main ()
+{
+#ifndef $ac_func
+  char *p = (char *) $ac_func;
+#endif
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  eval "$as_ac_Symbol=yes"
+else
+  eval "$as_ac_Symbol=no"
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+fi
+eval ac_res=\$$as_ac_Symbol
+	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+if test `eval 'as_val=${'$as_ac_Symbol'};$as_echo "$as_val"'` = yes; then :
+  cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
 fi
+done
+
+case "${host_os}" in
+  mingw*|windows*|winnt)
+  ;;
+  *)
+  if test "${ac_cv_have_decl_select}" = "no"; then
+     as_fn_error $? "Building R on Unix requires the 'select' system call" "$LINENO" 5
+  fi
+  if test "${ac_cv_header_sys_select_h}" = "no" -a "${ac_cv_header_sys_times_h} = "no""; then
+     as_fn_error $? "Building R on Unix requires either <sys/select.h> or <sys/time.h>" "$LINENO" 5
+  fi
+  ;;
+esac
 ## Windows has neither setenv nor unsetenv
 for ac_func in setenv unsetenv
 do
@@ -28285,7 +34827,58 @@ _ACEOF
 fi
 done
 
-## clock_gettime is POSIX 1993, but not on OS X
+## POSIX.1-2008 preferred form
+for ac_func in utimensat
+do
+as_ac_Symbol=`$as_echo "ac_cv_have_decl_$ac_func" | $as_tr_sh`
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $ac_func exists and is declared" >&5
+$as_echo_n "checking whether $ac_func exists and is declared... " >&6; }
+if eval \${$as_ac_Symbol+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <sys/stat.h>
+
+#ifdef F77_DUMMY_MAIN
+
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int F77_DUMMY_MAIN() { return 1; }
+
+#endif
+int
+main ()
+{
+#ifndef $ac_func
+  char *p = (char *) $ac_func;
+#endif
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  eval "$as_ac_Symbol=yes"
+else
+  eval "$as_ac_Symbol=no"
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+fi
+eval ac_res=\$$as_ac_Symbol
+	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+if test `eval 'as_val=${'$as_ac_Symbol'};$as_echo "$as_val"'` = yes; then :
+  cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+## clock_gettime is POSIX 1993, but not on macOS prior to 10.12 (Sierra)
 ## Some OSes need -lrt: Linux (for glibc versions before 2.17), Solaris,
 ## not FreeBSD.
 ## Unsurprising, as POSIX 2008 moved it from its timers section to base.
@@ -28419,7 +35012,7 @@ cat >>confdefs.h <<_ACEOF
 #define HAVE_DECL_PUTENV $ac_have_decl
 _ACEOF
 
-## this is a GNU extension so usually hidden.  Not on Solaris
+## this is a GNU extension so usually hidden.  Not in Solaris 10
 for ac_func in vasprintf
 do :
   ac_fn_c_check_func "$LINENO" "vasprintf" "ac_cv_func_vasprintf"
@@ -28443,7 +35036,7 @@ cat >>confdefs.h <<_ACEOF
 #define HAVE_DECL_VASPRINTF $ac_have_decl
 _ACEOF
 
-## mempcpy is a GNU extension used by the included gettext.  Not on Solaris
+## mempcpy is a GNU extension used by the included gettext.  Not in Solaris 10
 for ac_func in mempcpy
 do :
   ac_fn_c_check_func "$LINENO" "mempcpy" "ac_cv_func_mempcpy"
@@ -28537,6 +35130,64 @@ _ACEOF
 fi
 done
 
+for ac_func in dladdr dlsym
+do :
+  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
+ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
+if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
+  cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+ac_fn_c_check_decl "$LINENO" "dladdr" "ac_cv_have_decl_dladdr" "#include<dlfcn.h>
+"
+if test "x$ac_cv_have_decl_dladdr" = xyes; then :
+  ac_have_decl=1
+else
+  ac_have_decl=0
+fi
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_DLADDR $ac_have_decl
+_ACEOF
+ac_fn_c_check_decl "$LINENO" "dlsym" "ac_cv_have_decl_dlsym" "#include<dlfcn.h>
+"
+if test "x$ac_cv_have_decl_dlsym" = xyes; then :
+  ac_have_decl=1
+else
+  ac_have_decl=0
+fi
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_DLSYM $ac_have_decl
+_ACEOF
+
+ac_fn_c_check_decl "$LINENO" "RTLD_DEFAULT" "ac_cv_have_decl_RTLD_DEFAULT" "#include<dlfcn.h>
+"
+if test "x$ac_cv_have_decl_RTLD_DEFAULT" = xyes; then :
+  ac_have_decl=1
+else
+  ac_have_decl=0
+fi
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_RTLD_DEFAULT $ac_have_decl
+_ACEOF
+ac_fn_c_check_decl "$LINENO" "RTLD_NEXT" "ac_cv_have_decl_RTLD_NEXT" "#include<dlfcn.h>
+"
+if test "x$ac_cv_have_decl_RTLD_NEXT" = xyes; then :
+  ac_have_decl=1
+else
+  ac_have_decl=0
+fi
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_RTLD_NEXT $ac_have_decl
+_ACEOF
+
 
 ## Lots of uses of getwd(), file.access(), Sys.glob().
 ## We don't need times() except as a fallback for getrusage and
@@ -28809,8 +35460,8 @@ fi
 
 
 ## Do we need substitutes?
-## mkdtemp is not on Solaris, added in POSIX 2008
-## strdup strncasecmp were first required in POSIX 2008.
+## mkdtemp is not on Solaris 10, added in POSIX 2008
+## strdup strncasecmp were first required in POSIX 2001.
 ac_fn_c_check_func "$LINENO" "mkdtemp" "ac_cv_func_mkdtemp"
 if test "x$ac_cv_func_mkdtemp" = xyes; then :
   $as_echo "#define HAVE_MKDTEMP 1" >>confdefs.h
@@ -28948,7 +35599,7 @@ if test "$ac_res" != no; then :
 
 fi
 
-# gethostbyname was removed in POSIX 2008 (in favour of getaddrinfo, POSIX 2004)
+# gethostbyname was removed in POSIX 2008 (in favour of getaddrinfo, POSIX 2001)
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gethostbyname" >&5
 $as_echo_n "checking for library containing gethostbyname... " >&6; }
 if ${ac_cv_search_gethostbyname+:} false; then :
@@ -29077,49 +35728,6 @@ if test "$ac_res" != no; then :
 
 fi
 
-ac_fn_c_check_func "$LINENO" "__setfpucw" "ac_cv_func___setfpucw"
-if test "x$ac_cv_func___setfpucw" = xyes; then :
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether __setfpucw is needed" >&5
-$as_echo_n "checking whether __setfpucw is needed... " >&6; }
-if ${r_cv_func___setfpucw_needed+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  if test "$cross_compiling" = yes; then :
-  r_cv_func___setfpucw_needed=no
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-int main () {
-#include <fpu_control.h>
-#include <stdlib.h>
-#if defined(_FPU_DEFAULT) && defined(_FPU_IEEE)
-  exit(_FPU_DEFAULT != _FPU_IEEE);
-#endif
-  exit(0);
-}
-
-_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
-  r_cv_func___setfpucw_needed=no
-else
-  r_cv_func___setfpucw_needed=yes
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
-  conftest.$ac_objext conftest.beam conftest.$ac_ext
-fi
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $r_cv_func___setfpucw_needed" >&5
-$as_echo "$r_cv_func___setfpucw_needed" >&6; }
-if test "x${r_cv_func___setfpucw_needed}" = xyes; then
-
-$as_echo "#define NEED___SETFPUCW 1" >>confdefs.h
-
-fi
-fi
-
-
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working calloc" >&5
 $as_echo_n "checking for working calloc... " >&6; }
 if ${r_cv_func_calloc_works+:} false; then :
@@ -29358,7 +35966,16 @@ $as_echo "#define HAVE_WORKING_SIGACTION 1" >>confdefs.h
 
   fi
 
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mktime sets errno" >&5
+
+if test x${use_internal_tzcode} = xdefault; then
+case "${host_os}" in
+   darwin*)
+     use_internal_tzcode=yes;
+     ;;
+esac
+fi
+if test "${use_internal_tzcode}" != yes; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mktime sets errno" >&5
 $as_echo_n "checking whether mktime sets errno... " >&6; }
 if ${r_cv_mktime_errno+:} false; then :
   $as_echo_n "(cached) " >&6
@@ -29405,7 +36022,7 @@ $as_echo "#define MKTIME_SETS_ERRNO /**/" >>confdefs.h
 
 fi
 
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mktime works correctly outside 1902-2037" >&5
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mktime works correctly outside 1902-2037" >&5
 $as_echo_n "checking whether mktime works correctly outside 1902-2037... " >&6; }
 if ${r_cv_working_mktime+:} false; then :
   $as_echo_n "(cached) " >&6
@@ -29461,6 +36078,7 @@ $as_echo "#define HAVE_WORKING_64BIT_MKTIME 1" >>confdefs.h
 
 fi
 
+fi
 
 ac_fn_c_check_header_mongrel "$LINENO" "complex.h" "ac_cv_header_complex_h" "$ac_includes_default"
 if test "x$ac_cv_header_complex_h" = xyes; then :
@@ -29582,8 +36200,9 @@ else
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
-// glibc needs this defined.
+// glibc needs this defined, second for >= 2.20
 #define _BSD_SOURCE
+#define _DEFAULT_SOURCE
 #include <time.h>
 
 int main() {
@@ -29607,67 +36226,6 @@ $as_echo "#define HAVE_TM_GMTOFF 1" >>confdefs.h
 
 fi
 
-
-## check for vecLib framework (potentially to be used for BLAS)
-## in theory vecLib is platform-independent, in practice only
-## Apple's OS X is known to provide it
-## However, as from 10.10 it only provides Accelerate.
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cblas_cdotu_sub in Accelerate framework" >&5
-$as_echo_n "checking for cblas_cdotu_sub in Accelerate framework... " >&6; }
-if ${r_cv_check_fw_Accelerate+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  r_cv_check_fw_save_LIBS=$LIBS
-  r_cv_check_fw_Accelerate=no
-  LIBS="-framework Accelerate  $LIBS"
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char cblas_cdotu_sub ();
-#ifdef F77_DUMMY_MAIN
-
-#  ifdef __cplusplus
-     extern "C"
-#  endif
-   int F77_DUMMY_MAIN() { return 1; }
-
-#endif
-int
-main ()
-{
-return cblas_cdotu_sub ();
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  r_cv_check_fw_Accelerate="-framework Accelerate"
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-  LIBS=$r_cv_check_fw_save_LIBS
-  if test "$r_cv_check_fw_Accelerate" != no; then :
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE_ACCELERATE_FW 1
-_ACEOF
-
-	have_Accelerate_fw=yes
-else
-  have_Accelerate_fw=no
-fi
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $r_cv_check_fw_Accelerate" >&5
-$as_echo "$r_cv_check_fw_Accelerate" >&6; }
-
-
 ## BLAS.
 ## <NOTE>
 ## This has to come *after* checking for Fortran 77 compiler/converter
@@ -30248,7 +36806,7 @@ fi
 fi
 
 ## Now check if zdotu works (fails on AMD64 with the wrong compiler;
-## also fails on OS X with Accelerate/vecLib and gfortran;
+## also fails on macOS with Accelerate/vecLib and gfortran;
 ## but in that case we have a work-around using USE_VECLIB_G95FIX)
 
 if test "${acx_blas_ok}" = yes; then
@@ -30326,20 +36884,20 @@ fi
     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
   else
-    ## NB: this lot is not cached
-    if test "${r_cv_check_fw_accelerate}" != "no"; then
-      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+    case "${BLAS_LIBS}" in
+      *Accelerate* | *vecLib*)
+        ## for vecLib we have a work-around by using cblas_..._sub
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
-      ## for vecLib we have a work-around by using cblas_..._sub
-      use_veclib_g95fix=yes
-      ## The fix may not work with internal lapack, but
-      ## is more likely to in R >= 2.15.2.
-    else
-      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+        use_veclib_g95fix=yes
+        ;;
+      *)
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
-      BLAS_LIBS=
-      acx_blas_ok="no"
-    fi
+        BLAS_LIBS=
+        acx_blas_ok="no"
+        ;;
+    esac
   fi
 fi
 if test "${acx_blas_ok}" = yes; then
@@ -30631,7 +37189,7 @@ fi
 
 
 ## LAPACK.
-## The default has already been set on OS X: otherwise it is "no"
+## The default has already been set on macOS: otherwise it is "no"
 ## and so this test fails.
 if test "${use_lapack}" = "yes"; then
 
@@ -31495,7 +38053,6 @@ fi
 
   if test "$use_ICU" = no ; then
     case "${host_os}" in
-      ## darwin has ICU 3.2 in 10.4, 3.6 in 10.5
       darwin*)
         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ucol_open in -licucore" >&5
 $as_echo_n "checking for ucol_open in -licucore... " >&6; }
@@ -32349,15 +38906,15 @@ fi
 use_X11="no"
 if test -z "${no_x}"; then
   ## now we look for Xt and its header: it seems Intrinsic.h is key.
-  r_save_CFLAGS="${CFLAGS}"
-  CFLAGS="${CFLAGS} ${X_CFLAGS}"
+  r_save_CPPFLAGS="${CPPFLAGS}"
+  CPPFLAGS="${CPPFLAGS} ${X_CFLAGS}"
   ac_fn_c_check_header_mongrel "$LINENO" "X11/Intrinsic.h" "ac_cv_header_X11_Intrinsic_h" "$ac_includes_default"
 if test "x$ac_cv_header_X11_Intrinsic_h" = xyes; then :
 
 fi
 
 
-  CFLAGS="${r_save_CFLAGS}"
+  CPPFLAGS="${r_save_CPPFLAGS}"
   if test "${ac_cv_header_X11_Intrinsic_h}" = yes ; then
     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XtToolkitInitialize in -lXt" >&5
 $as_echo_n "checking for XtToolkitInitialize in -lXt... " >&6; }
@@ -32375,7 +38932,413 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 #ifdef __cplusplus
 extern "C"
 #endif
-char XtToolkitInitialize ();
+char XtToolkitInitialize ();
+#ifdef F77_DUMMY_MAIN
+
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int F77_DUMMY_MAIN() { return 1; }
+
+#endif
+int
+main ()
+{
+return XtToolkitInitialize ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_Xt_XtToolkitInitialize=yes
+else
+  ac_cv_lib_Xt_XtToolkitInitialize=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xt_XtToolkitInitialize" >&5
+$as_echo "$ac_cv_lib_Xt_XtToolkitInitialize" >&6; }
+if test "x$ac_cv_lib_Xt_XtToolkitInitialize" = xyes; then :
+  have_Xt=yes
+else
+  have_Xt=no
+fi
+
+    if test "${have_Xt}" = yes; then
+      use_X11="yes"
+    fi
+  fi
+fi
+if test "x${use_X11}" = "xyes"; then
+
+$as_echo "#define HAVE_X11 1" >>confdefs.h
+
+  X_LIBS="${X_LIBS} -lX11 -lXt"
+else
+  if test "x${with_x}" != "xno"; then
+    as_fn_error $? "--with-x=yes (default) and X11 headers/libs are not available" "$LINENO" 5
+  fi
+fi
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: using X11 ... ${use_X11}" >&5
+$as_echo "using X11 ... ${use_X11}" >&6; }
+
+ if test "x${use_X11}" = "xyes"; then
+  BUILD_X11_TRUE=
+  BUILD_X11_FALSE='#'
+else
+  BUILD_X11_TRUE='#'
+  BUILD_X11_FALSE=
+fi
+
+## check if X11 typedefs KeySym
+
+if test "${use_X11}" = yes; then
+  r_save_CPPFLAGS="${CPPFLAGS}"
+  CPPFLAGS="${CPPFLAGS} ${X_CFLAGS}"
+  ac_fn_c_check_type "$LINENO" "KeySym" "ac_cv_type_KeySym" "#include <X11/X.h>
+"
+if test "x$ac_cv_type_KeySym" = xyes; then :
+  r_cv_type_keysym=yes
+else
+  r_cv_type_keysym=no
+fi
+
+  CPPFLAGS="${r_save_CPPFLAGS}"
+  if test "${r_cv_type_keysym}" = yes; then
+
+$as_echo "#define HAVE_KEYSYM 1" >>confdefs.h
+
+  fi
+fi
+## check if Xmu is supported
+if test "${use_X11}" = yes; then
+  r_save_CPPFLAGS="${CPPFLAGS}"
+  CPPFLAGS="${CPPFLAGS} ${X_CFLAGS}"
+  ac_fn_c_check_header_mongrel "$LINENO" "X11/Xmu/Atoms.h" "ac_cv_header_X11_Xmu_Atoms_h" "$ac_includes_default"
+if test "x$ac_cv_header_X11_Xmu_Atoms_h" = xyes; then :
+
+fi
+
+
+  CPPFLAGS="${r_save_CPPFLAGS}"
+  if test "${ac_cv_header_X11_Xmu_Atoms_h}" = yes ; then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XmuInternAtom in -lXmu" >&5
+$as_echo_n "checking for XmuInternAtom in -lXmu... " >&6; }
+if ${ac_cv_lib_Xmu_XmuInternAtom+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lXmu ${X_LIBS} $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char XmuInternAtom ();
+#ifdef F77_DUMMY_MAIN
+
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int F77_DUMMY_MAIN() { return 1; }
+
+#endif
+int
+main ()
+{
+return XmuInternAtom ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_Xmu_XmuInternAtom=yes
+else
+  ac_cv_lib_Xmu_XmuInternAtom=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xmu_XmuInternAtom" >&5
+$as_echo "$ac_cv_lib_Xmu_XmuInternAtom" >&6; }
+if test "x$ac_cv_lib_Xmu_XmuInternAtom" = xyes; then :
+  use_Xmu=yes
+else
+  use_Xmu=no
+fi
+
+    if test "${use_Xmu}" = yes; then
+
+$as_echo "#define HAVE_X11_Xmu 1" >>confdefs.h
+
+      X_LIBS="${X_LIBS} -lXmu"
+    fi
+  fi
+fi
+
+if test "x${want_cairo}" = "xyes"; then
+
+if test "x${PKGCONF}" = "x"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: not checking for cairo as pkg-config is not present" >&5
+$as_echo "$as_me: not checking for cairo as pkg-config is not present" >&6;}
+else
+  save_CPPFLAGS=${CPPFLAGS}
+  save_LIBS=${LIBS}
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pkg-config knows about cairo and pango" >&5
+$as_echo_n "checking whether pkg-config knows about cairo and pango... " >&6; }
+if ${r_cv_has_pangocairo+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if "${PKGCONF}" --exists pangocairo; then
+         r_cv_has_pangocairo="yes"
+       else
+         r_cv_has_pangocairo="no"
+       fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $r_cv_has_pangocairo" >&5
+$as_echo "$r_cv_has_pangocairo" >&6; }
+  if test "x${r_cv_has_pangocairo}" = "xyes"; then
+    modlist="pangocairo"
+    for module in cairo-png; do
+      if "${PKGCONF}" --exists ${module}; then
+	modlist="${modlist} ${module}"
+      fi
+    done
+    if "${PKGCONF}" --exists cairo-pdf; then
+       modlist="${modlist} cairo-pdf"
+       r_cairo_pdf=yes
+    fi
+    if "${PKGCONF}" --exists cairo-ps; then
+       modlist="${modlist} cairo-ps"
+       r_cairo_ps=yes
+    fi
+    if "${PKGCONF}" --exists cairo-svg; then
+       modlist="${modlist} cairo-svg"
+       r_cairo_svg=yes
+    fi
+      if "${PKGCONF}" --exists cairo-xlib; then
+         xmodlist="${modlist} cairo-xlib"
+      else
+         xmodlist="${modlist}"
+      fi
+    CAIRO_CPPFLAGS=`"${PKGCONF}" --cflags ${modlist}`
+    CAIROX11_CPPFLAGS=`"${PKGCONF}" --cflags ${xmodlist}`
+    CAIRO_LIBS=`"${PKGCONF}" --libs ${modlist}`
+    CAIROX11_LIBS=`"${PKGCONF}" --libs ${xmodlist}`
+
+    CPPFLAGS="${CPPFLAGS} ${CAIRO_CPPFLAGS}"
+    LIBS="${LIBS} ${CAIRO_LIBS}"
+
+     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether cairo including pango is >= 1.2 and works" >&5
+$as_echo_n "checking whether cairo including pango is >= 1.2 and works... " >&6; }
+if ${r_cv_cairo_works+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <pango/pango.h>
+#include <pango/pangocairo.h>
+#include <cairo-xlib.h>
+#if CAIRO_VERSION  < 10200
+#error cairo version >= 1.2 required
+#endif
+int main(void) {
+    cairo_t  *CC = NULL; // silence picky compilers
+    cairo_arc(CC, 0.0, 0.0, 1.0, 0.0, 6.28);
+    pango_cairo_create_layout(CC);
+    pango_font_description_new();
+    return 0;
+ }
+
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  r_cv_cairo_works=yes
+else
+  r_cv_cairo_works=no
+          CAIRO_LIBS=
+          CAIRO_CFLAGS=
+
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $r_cv_cairo_works" >&5
+$as_echo "$r_cv_cairo_works" >&6; }
+    CPPFLAGS=${save_CPPFLAGS}
+    LIBS=${save_LIBS}
+  else  ## no pangocairo, check for just cairo
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pkg-config knows about cairo" >&5
+$as_echo_n "checking whether pkg-config knows about cairo... " >&6; }
+if ${r_cv_has_cairo+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if "${PKGCONF}" --exists cairo; then
+	   r_cv_has_cairo="yes"
+	 else
+	   r_cv_has_cairo="no"
+	 fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $r_cv_has_cairo" >&5
+$as_echo "$r_cv_has_cairo" >&6; }
+    if test "x${r_cv_has_cairo}" = "xyes"; then
+      modlist="cairo"
+      ## on Linux, cairo-ft brings in header paths <cairo-ft.h>:
+      ## the code which needs this is currently conditionalized
+      for module in cairo-png cairo-ft; do
+	if "${PKGCONF}" --exists ${module}; then
+	  modlist="${modlist} ${module}"
+	fi
+      done
+      if "${PKGCONF}" --exists cairo-pdf; then
+         modlist="${modlist} cairo-pdf"
+         r_cairo_pdf=yes
+      fi
+      if "${PKGCONF}" --exists cairo-ps; then
+         modlist="${modlist} cairo-ps"
+         r_cairo_ps=yes
+      fi
+      if "${PKGCONF}" --exists cairo-svg; then
+         modlist="${modlist} cairo-svg"
+         r_cairo_svg=yes
+      fi
+      if "${PKGCONF}" --exists cairo-xlib; then
+         xmodlist="${modlist} cairo-xlib"
+      else
+         xmodlist="${modlist}"
+      fi
+      CAIRO_CPPFLAGS=`"${PKGCONF}" --cflags ${modlist}`
+      CAIROX11_CPPFLAGS=`"${PKGCONF}" --cflags ${xmodlist}`
+      case "${host_os}" in
+        darwin*)
+          ## This is for static macOS build
+	  ## FIXME: doing that unconditionally is really not a good idea
+          CAIRO_LIBS=`"${PKGCONF}" --static --libs ${modlist}`
+          CAIROX11_LIBS=`"${PKGCONF}" --static --libs ${xmodlist}`
+          ;;
+        *)
+          CAIRO_LIBS=`"${PKGCONF}" --libs ${modlist}`
+          CAIROX11_LIBS=`"${PKGCONF}" --libs ${xmodlist}`
+          ;;
+      esac
+
+      CPPFLAGS="${CPPFLAGS} ${CAIRO_CPPFLAGS}"
+      LIBS="${LIBS} ${CAIRO_LIBS}"
+
+      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether cairo is >= 1.2 and works" >&5
+$as_echo_n "checking whether cairo is >= 1.2 and works... " >&6; }
+if ${r_cv_cairo_works+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <cairo.h>
+#include <cairo-xlib.h>
+#if CAIRO_VERSION  < 10200
+#error cairo version >= 1.2 required
+#endif
+int main(void) {
+    cairo_t  *CC;
+    cairo_arc(CC, 0.0, 0.0, 1.0, 0.0, 6.28);
+    cairo_select_font_face (CC, "Helvetica", CAIRO_FONT_SLANT_NORMAL,
+                            CAIRO_FONT_WEIGHT_BOLD);
+    return 0;
+ }
+
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  r_cv_cairo_works=yes
+else
+  r_cv_cairo_works=no
+          CAIRO_LIBS=
+          CAIRO_CFLAGS=
+
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $r_cv_cairo_works" >&5
+$as_echo "$r_cv_cairo_works" >&6; }
+      CPPFLAGS=${save_CPPFLAGS}
+      LIBS=${save_LIBS}
+    fi
+  fi
+fi
+
+if test "x${r_cv_has_pangocairo}" = xyes; then
+
+$as_echo "#define HAVE_PANGOCAIRO 1" >>confdefs.h
+
+fi
+if test "x${r_cv_cairo_works}" = xyes; then
+
+$as_echo "#define HAVE_WORKING_CAIRO 1" >>confdefs.h
+
+fi
+if test "x${r_cairo_pdf}" = xyes; then
+
+$as_echo "#define HAVE_CAIRO_PDF 1" >>confdefs.h
+
+fi
+if test "x${r_cairo_ps}" = xyes; then
+
+$as_echo "#define HAVE_CAIRO_PS 1" >>confdefs.h
+
+fi
+if test "x${r_cairo_svg}" = xyes; then
+
+$as_echo "#define HAVE_CAIRO_SVG 1" >>confdefs.h
+
+fi
+
+
+
+
+
+fi
+ if test "x${r_cv_cairo_works}" = xyes; then
+  BUILD_DEVCAIRO_TRUE=
+  BUILD_DEVCAIRO_FALSE='#'
+else
+  BUILD_DEVCAIRO_TRUE='#'
+  BUILD_DEVCAIRO_FALSE=
+fi
+
+
+
+## Aqua
+case "${host_os}" in
+  darwin*)
+    ## check for CoreFoundation framework (chances are much higher
+    ## that we can build AQUA if this one is present)
+     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CFStringGetSystemEncoding in CoreFoundation framework" >&5
+$as_echo_n "checking for CFStringGetSystemEncoding in CoreFoundation framework... " >&6; }
+if ${r_cv_check_fw_CoreFoundation+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  r_cv_check_fw_save_LIBS=$LIBS
+  r_cv_check_fw_CoreFoundation=no
+  LIBS="-framework CoreFoundation  $LIBS"
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char CFStringGetSystemEncoding ();
 #ifdef F77_DUMMY_MAIN
 
 #  ifdef __cplusplus
@@ -32387,391 +39350,593 @@ char XtToolkitInitialize ();
 int
 main ()
 {
-return XtToolkitInitialize ();
+return CFStringGetSystemEncoding ();
   ;
   return 0;
 }
 _ACEOF
 if ac_fn_c_try_link "$LINENO"; then :
-  ac_cv_lib_Xt_XtToolkitInitialize=yes
-else
-  ac_cv_lib_Xt_XtToolkitInitialize=no
+  r_cv_check_fw_CoreFoundation="-framework CoreFoundation"
 fi
 rm -f core conftest.err conftest.$ac_objext \
     conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
+  LIBS=$r_cv_check_fw_save_LIBS
+  if test "$r_cv_check_fw_CoreFoundation" != no; then :
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_COREFOUNDATION_FW 1
+_ACEOF
+
+	have_CoreFoundation_fw=yes
+else
+  have_CoreFoundation_fw=no
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xt_XtToolkitInitialize" >&5
-$as_echo "$ac_cv_lib_Xt_XtToolkitInitialize" >&6; }
-if test "x$ac_cv_lib_Xt_XtToolkitInitialize" = xyes; then :
-  have_Xt=yes
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $r_cv_check_fw_CoreFoundation" >&5
+$as_echo "$r_cv_check_fw_CoreFoundation" >&6; }
+
+    ## FIXME: we should verify that we can use Obj-C exceptions
+    ##        such as @try and friends. The OBJC compiler tests
+    ##	      above add -fobjc-exceptions where possible, but
+    ##	      they don't check that the exceptions are available.
+    use_aqua=no
+if test "${want_aqua}" = yes; then
+  case "${host_os}" in
+    darwin*)
+      ## we can build AQUA only with CoreFoundation, otherwise
+      ## Quartz device won't build
+      if test -n "${r_cv_check_fw_CoreFoundation}" ; then
+        use_aqua=yes
+      else
+        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: requested 'aqua' but CoreFoundation was not found" >&5
+$as_echo "$as_me: WARNING: requested 'aqua' but CoreFoundation was not found" >&2;}
+      fi
+      ;;
+  esac
+fi
+if test "${use_aqua}" = yes; then
+
+$as_echo "#define HAVE_AQUA 1" >>confdefs.h
+
+fi
+
+    ## That sets HAVE_AQUA, which is used to enable support of R.app
+    ## and also in C headers and files related to quartz()
+  ;;
+  *)
+    use_aqua=no
+  ;;
+esac
+## Now used:
+## - to compile src/unix/aqua.c
+## - in etc/Renviron to set the personal library,
+## - in grDevices to select building quartz()
+ if test "x${use_aqua}" = xyes; then
+  BUILD_AQUA_TRUE=
+  BUILD_AQUA_FALSE='#'
 else
-  have_Xt=no
+  BUILD_AQUA_TRUE='#'
+  BUILD_AQUA_FALSE=
 fi
 
-    if test "${have_Xt}" = yes; then
-      use_X11="yes"
-    fi
+
+## Tcl/Tk.
+if test "${want_tcltk}" = yes; then
+  have_tcltk=yes
+  ## (Note that the subsequent 3 macros assume that have_tcltk has been
+  ## set appropriately.)
+  for ac_prog in ${TCL_CONFIG} tclConfig.sh
+do
+  # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_path_TCL_CONFIG+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  case $TCL_CONFIG in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_TCL_CONFIG="$TCL_CONFIG" # Let the user override the test with a path.
+  ;;
+  *)
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_path_TCL_CONFIG="$as_dir/$ac_word$ac_exec_ext"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
   fi
+done
+  done
+IFS=$as_save_IFS
+
+  ;;
+esac
+fi
+TCL_CONFIG=$ac_cv_path_TCL_CONFIG
+if test -n "$TCL_CONFIG"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TCL_CONFIG" >&5
+$as_echo "$TCL_CONFIG" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
 fi
-if test "x${use_X11}" = "xyes"; then
 
-$as_echo "#define HAVE_X11 1" >>confdefs.h
 
-  X_LIBS="${X_LIBS} -lX11 -lXt"
+  test -n "$TCL_CONFIG" && break
+done
+
+if test -z "${TCL_CONFIG}"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tclConfig.sh in library (sub)directories" >&5
+$as_echo_n "checking for tclConfig.sh in library (sub)directories... " >&6; }
+if ${r_cv_path_TCL_CONFIG+:} false; then :
+  $as_echo_n "(cached) " >&6
 else
-  if test "x${with_x}" != "xno"; then
-    as_fn_error $? "--with-x=yes (default) and X11 headers/libs are not available" "$LINENO" 5
-  fi
+  for ldir in /usr/local/${LIBnn} /usr/${LIBnn} /${LIBnn} /opt/lib /sw/lib /opt/csw/lib /usr/sfw/lib /opt/freeware/lib; do
+  for dir in \
+      ${ldir} \
+      `ls -d ${ldir}/tcl[8-9].[0-9]* 2>/dev/null | sort -r`; do
+    if test -f ${dir}/tclConfig.sh; then
+      r_cv_path_TCL_CONFIG="${dir}/tclConfig.sh"
+      break 2
+    fi
+  done
+done
 fi
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: using X11 ... ${use_X11}" >&5
-$as_echo "using X11 ... ${use_X11}" >&6; }
 
- if test "x${use_X11}" = "xyes"; then
-  BUILD_X11_TRUE=
-  BUILD_X11_FALSE='#'
+if test -n "${r_cv_path_TCL_CONFIG}"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${r_cv_path_TCL_CONFIG}" >&5
+$as_echo "${r_cv_path_TCL_CONFIG}" >&6; }
 else
-  BUILD_X11_TRUE='#'
-  BUILD_X11_FALSE=
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
 fi
 
-## check if X11 typedefs KeySym
+  if test -n "${r_cv_path_TCL_CONFIG}"; then
+    TCL_CONFIG="${r_cv_path_TCL_CONFIG}"
+  fi
+fi
+for ac_prog in ${TK_CONFIG} tkConfig.sh
+do
+  # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_path_TK_CONFIG+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  case $TK_CONFIG in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_TK_CONFIG="$TK_CONFIG" # Let the user override the test with a path.
+  ;;
+  *)
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_path_TK_CONFIG="$as_dir/$ac_word$ac_exec_ext"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
 
-if test "${use_X11}" = yes; then
-  r_save_CFLAGS="${CFLAGS}"
-  CFLAGS="${CFLAGS} ${X_CFLAGS}"
-  ac_fn_c_check_type "$LINENO" "KeySym" "ac_cv_type_KeySym" "#include <X11/X.h>
-"
-if test "x$ac_cv_type_KeySym" = xyes; then :
-  r_cv_type_keysym=yes
+  ;;
+esac
+fi
+TK_CONFIG=$ac_cv_path_TK_CONFIG
+if test -n "$TK_CONFIG"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TK_CONFIG" >&5
+$as_echo "$TK_CONFIG" >&6; }
 else
-  r_cv_type_keysym=no
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
 fi
 
-  CFLAGS="${r_save_CFLAGS}"
-  if test "${r_cv_type_keysym}" = yes; then
 
-$as_echo "#define HAVE_KEYSYM 1" >>confdefs.h
+  test -n "$TK_CONFIG" && break
+done
+
+if test -z "${TK_CONFIG}"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tkConfig.sh in library (sub)directories" >&5
+$as_echo_n "checking for tkConfig.sh in library (sub)directories... " >&6; }
+if ${r_cv_path_TK_CONFIG+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  for ldir in /usr/local/${LIBnn} /usr/${LIBnn} /${LIBnn} /opt/lib /sw/lib /opt/csw/lib /usr/sfw/lib /opt/freeware/lib; do
+  for dir in \
+      ${ldir} \
+      `ls -d ${ldir}/tk[8-9].[0-9]* 2>/dev/null | sort -r`; do
+    if test -f ${dir}/tkConfig.sh; then
+      r_cv_path_TK_CONFIG="${dir}/tkConfig.sh"
+      break 2
+    fi
+  done
+done
+fi
 
+if test -n "${r_cv_path_TK_CONFIG}"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${r_cv_path_TK_CONFIG}" >&5
+$as_echo "${r_cv_path_TK_CONFIG}" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+  if test -n "${r_cv_path_TK_CONFIG}"; then
+    TK_CONFIG="${r_cv_path_TK_CONFIG}"
+  fi
+fi
+if test -z "${TCLTK_CPPFLAGS}" \
+    || test -z "${TCLTK_LIBS}"; then
+  ## Check whether the versions found via the *Config.sh files are at
+  ## least 8; otherwise, issue a warning and turn off Tcl/Tk support.
+  ## Note that in theory a system could have outdated versions of the
+  ## *Config.sh scripts and yet up-to-date installations of Tcl/Tk in
+  ## standard places ...
+  ## This doesn't make a great deal of sense: on past form
+  ## we don't even expect future versions of 8.x to work, let alone 9.0
+  if test -n "${TCL_CONFIG}"; then
+    . ${TCL_CONFIG}
+    if test ${TCL_MAJOR_VERSION} -lt 8; then
+      warn_tcltk_version="Tcl/Tk support requires Tcl version >= 8"
+      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ${warn_tcltk_version}" >&5
+$as_echo "$as_me: WARNING: ${warn_tcltk_version}" >&2;}
+      have_tcltk=no
+    fi
+  fi
+  if test -n "${TK_CONFIG}" \
+      && test -z "${warn_tcltk_version}"; then
+    . ${TK_CONFIG}
+    if test ${TK_MAJOR_VERSION} -lt 8; then
+      warn_tcltk_version="Tcl/Tk support requires Tk version >= 8"
+      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ${warn_tcltk_version}" >&5
+$as_echo "$as_me: WARNING: ${warn_tcltk_version}" >&2;}
+      have_tcltk=no
+    fi
+  fi
+  if test -n "${TCL_CONFIG}" \
+      && test -n "${TK_CONFIG}" \
+      && test -z "${warn_tcltk_version}"; then
+    if test ${TCL_MAJOR_VERSION} -ne ${TK_MAJOR_VERSION} \
+      || test ${TCL_MINOR_VERSION} -ne ${TK_MINOR_VERSION}; then
+     warn_tcltk_version="Tcl and Tk major or minor versions disagree"
+      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ${warn_tcltk_version}" >&5
+$as_echo "$as_me: WARNING: ${warn_tcltk_version}" >&2;}
+      have_tcltk=no
+    fi
   fi
 fi
-## check if Xmu is supported
-if test "${use_X11}" = yes; then
-  r_save_CFLAGS="${CFLAGS}"
-  CFLAGS="${CFLAGS} ${X_CFLAGS}"
-  ac_fn_c_check_header_mongrel "$LINENO" "X11/Xmu/Atoms.h" "ac_cv_header_X11_Xmu_Atoms_h" "$ac_includes_default"
-if test "x$ac_cv_header_X11_Xmu_Atoms_h" = xyes; then :
 
+
+if test -z "${TCLTK_CPPFLAGS}"; then
+  ## We have to do the work.
+  if test "${have_tcltk}" = yes; then
+    ## Part 1.  Check for tcl.h.
+    found_tcl_h=no
+    if test -n "${TCL_CONFIG}"; then
+      . ${TCL_CONFIG}
+      ## TCL_INCLUDE_SPEC (if set) is what we want.
+      if test -n ${TCL_INCLUDE_SPEC} ; then
+        r_save_CPPFLAGS="${CPPFLAGS}"
+	CPPFLAGS="${CPPFLAGS} ${TCL_INCLUDE_SPEC}"
+	ac_fn_c_check_header_mongrel "$LINENO" "tcl.h" "ac_cv_header_tcl_h" "$ac_includes_default"
+if test "x$ac_cv_header_tcl_h" = xyes; then :
+  TCLTK_CPPFLAGS="${TCL_INCLUDE_SPEC}"
+			 found_tcl_h=yes
 fi
 
 
-  CFLAGS="${r_save_CFLAGS}"
-  if test "${ac_cv_header_X11_Xmu_Atoms_h}" = yes ; then
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XmuInternAtom in -lXmu" >&5
-$as_echo_n "checking for XmuInternAtom in -lXmu... " >&6; }
-if ${ac_cv_lib_Xmu_XmuInternAtom+:} false; then :
+	CPPFLAGS="${r_save_CPPFLAGS}"
+      fi
+      if test "${found_tcl_h}" = no; then
+	## Look for tcl.h in
+	##   ${TCL_PREFIX}/include/tcl${TCL_VERSION}
+	##   ${TCL_PREFIX}/include
+	## Also look in
+	##   ${TCL_PREFIX}/include/tcl${TCL_VERSION}/generic
+	## to deal with current FreeBSD layouts.  These also link the real
+	## thing to the version subdir, but the link cannot be used as it
+	## fails to include 'tclDecls.h' which is not linked.  Hence we
+	## must look for the real thing first.  Argh ...
+	for dir in \
+	    ${TCL_PREFIX}/include/tcl${TCL_VERSION}/generic \
+	    ${TCL_PREFIX}/include/tcl${TCL_VERSION} \
+	    ${TCL_PREFIX}/include; do
+	  as_ac_Header=`$as_echo "ac_cv_header_${dir}/tcl.h" | $as_tr_sh`
+ac_fn_c_check_header_mongrel "$LINENO" "${dir}/tcl.h" "$as_ac_Header" "$ac_includes_default"
+if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
+  TCLTK_CPPFLAGS="-I${dir}"
+			   found_tcl_h=yes
+			   break
+fi
+
+
+	done
+      fi
+    fi
+    if test "${found_tcl_h}" = no; then
+      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tcl.h" >&5
+$as_echo_n "checking for tcl.h... " >&6; }
+if ${r_cv_header_tcl_h+:} false; then :
   $as_echo_n "(cached) " >&6
 else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lXmu ${X_LIBS} $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
+#include <tcl.h>
+/* Revise if 9.x ever appears (and 8.x seems to increment only
+   every few years). */
+#if (TCL_MAJOR_VERSION >= 8) && (TCL_MINOR_VERSION >= 4)
+  yes
 #endif
-char XmuInternAtom ();
-#ifdef F77_DUMMY_MAIN
-
-#  ifdef __cplusplus
-     extern "C"
-#  endif
-   int F77_DUMMY_MAIN() { return 1; }
 
-#endif
-int
-main ()
-{
-return XmuInternAtom ();
-  ;
-  return 0;
-}
 _ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  ac_cv_lib_Xmu_XmuInternAtom=yes
-else
-  ac_cv_lib_Xmu_XmuInternAtom=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xmu_XmuInternAtom" >&5
-$as_echo "$ac_cv_lib_Xmu_XmuInternAtom" >&6; }
-if test "x$ac_cv_lib_Xmu_XmuInternAtom" = xyes; then :
-  use_Xmu=yes
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "yes" >/dev/null 2>&1; then :
+  r_cv_header_tcl_h=yes
 else
-  use_Xmu=no
+  r_cv_header_tcl_h=no
 fi
+rm -f conftest*
 
-    if test "${use_Xmu}" = yes; then
-
-$as_echo "#define HAVE_X11_Xmu 1" >>confdefs.h
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $r_cv_header_tcl_h" >&5
+$as_echo "$r_cv_header_tcl_h" >&6; }
 
-      X_LIBS="${X_LIBS} -lXmu"
+      if test "${r_cv_header_tcl_h}" = yes; then
+        found_tcl_h=yes
+      else
+        have_tcltk=no
+      fi
     fi
   fi
+  if test "${have_tcltk}" = yes; then
+    ## Part 2.  Check for tk.h.
+    found_tk_h=no
+    found_tk_by_config=no
+    if test -n "${TK_CONFIG}"; then
+      . ${TK_CONFIG}
+      ## TK_INCLUDE_SPEC (if set) is what we want.
+      if test -n ${TK_INCLUDE_SPEC} ; then
+        r_save_CPPFLAGS="${CPPFLAGS}"
+	CPPFLAGS="${CPPFLAGS} ${TCLTK_CPPFLAGS} ${TK_XINCLUDES} ${TK_INCLUDE_SPEC}"
+	ac_fn_c_check_header_mongrel "$LINENO" "tk.h" "ac_cv_header_tk_h" "$ac_includes_default"
+if test "x$ac_cv_header_tk_h" = xyes; then :
+  TCLTK_CPPFLAGS="${TCLTK_CPPFLAGS} ${TK_INCLUDE_SPEC}"
+			 found_tk_h=yes
 fi
 
-if test "x${want_cairo}" = "xyes"; then
 
-if test "x${PKGCONF}" = "x"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: not checking for cairo as pkg-config is not present" >&5
-$as_echo "$as_me: not checking for cairo as pkg-config is not present" >&6;}
-else
-  save_CPPFLAGS=${CPPFLAGS}
-  save_LIBS=${LIBS}
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pkg-config knows about cairo and pango" >&5
-$as_echo_n "checking whether pkg-config knows about cairo and pango... " >&6; }
-if ${r_cv_has_pangocairo+:} false; then :
+	found_tk_by_config=yes
+	CPPFLAGS="${r_save_CPPFLAGS}"
+      fi
+      if test "${found_tk_h}" = no; then
+	## Look for tk.h in
+	##   ${TK_PREFIX}/include/tk${TK_VERSION}
+	##   ${TK_PREFIX}/include
+	## Also look in
+	##   ${TK_PREFIX}/include/tcl${TK_VERSION}
+	## to compensate for Debian madness ...
+	## Also look in
+	##   ${TK_PREFIX}/include/tk${TK_VERSION}/generic
+	## to deal with current FreeBSD layouts.  See above for details.
+	##
+	## As the AC_CHECK_HEADER test tries including the header file and
+	## tk.h includes tcl.h and X11/Xlib.h, we need to change CPPFLAGS
+	## for the check.
+	r_save_CPPFLAGS="${CPPFLAGS}"
+	CPPFLAGS="${CPPFLAGS} ${TK_XINCLUDES} ${TCLTK_CPPFLAGS}"
+	for dir in \
+	    ${TK_PREFIX}/include/tk${TK_VERSION}/generic \
+	    ${TK_PREFIX}/include/tk${TK_VERSION} \
+	    ${TK_PREFIX}/include/tcl${TK_VERSION} \
+	    ${TK_PREFIX}/include; do
+	  as_ac_Header=`$as_echo "ac_cv_header_${dir}/tk.h" | $as_tr_sh`
+ac_fn_c_check_header_mongrel "$LINENO" "${dir}/tk.h" "$as_ac_Header" "$ac_includes_default"
+if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
+  TCLTK_CPPFLAGS="${TCLTK_CPPFLAGS} -I${dir}"
+			   found_tk_h=yes
+			   break
+fi
+
+
+	done
+	CPPFLAGS="${r_save_CPPFLAGS}"
+      fi
+    fi
+    if test "${found_tk_h}" = no; then
+      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tk.h" >&5
+$as_echo_n "checking for tk.h... " >&6; }
+if ${r_cv_header_tk_h+:} false; then :
   $as_echo_n "(cached) " >&6
 else
-  if "${PKGCONF}" --exists pangocairo; then
-         r_cv_has_pangocairo="yes"
-       else
-         r_cv_has_pangocairo="no"
-       fi
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <tk.h>
+/* Revise if 9.x ever appears (and 8.x seems to increment only
+   every few years). */
+#if (TK_MAJOR_VERSION >= 8) && (TK_MINOR_VERSION >= 4)
+  yes
+#endif
 
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "yes" >/dev/null 2>&1; then :
+  r_cv_header_tk_h=yes
+else
+  r_cv_header_tk_h=no
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $r_cv_has_pangocairo" >&5
-$as_echo "$r_cv_has_pangocairo" >&6; }
-  if test "x${r_cv_has_pangocairo}" = "xyes"; then
-    modlist="pangocairo"
-    for module in cairo-png; do
-      if "${PKGCONF}" --exists ${module}; then
-	modlist="${modlist} ${module}"
-      fi
-    done
-    if "${PKGCONF}" --exists cairo-pdf; then
-       modlist="${modlist} cairo-pdf"
-       r_cairo_pdf=yes
-    fi
-    if "${PKGCONF}" --exists cairo-ps; then
-       modlist="${modlist} cairo-ps"
-       r_cairo_ps=yes
-    fi
-    if "${PKGCONF}" --exists cairo-svg; then
-       modlist="${modlist} cairo-svg"
-       r_cairo_svg=yes
-    fi
-      if "${PKGCONF}" --exists cairo-xlib; then
-         xmodlist="${modlist} cairo-xlib"
+rm -f conftest*
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $r_cv_header_tk_h" >&5
+$as_echo "$r_cv_header_tk_h" >&6; }
+
+      if test "{r_cv_header_tk_h}" = yes; then
+        found_tk_h=yes
       else
-         xmodlist="${modlist}"
+        have_tcltk=no
       fi
-    CAIRO_CPPFLAGS=`"${PKGCONF}" --cflags ${modlist}`
-    CAIROX11_CPPFLAGS=`"${PKGCONF}" --cflags ${xmodlist}`
-    CAIRO_LIBS=`"${PKGCONF}" --libs ${modlist}`
-    CAIROX11_LIBS=`"${PKGCONF}" --libs ${xmodlist}`
+    fi
+  fi
+fi
+## TK_XINCLUDES should be empty for Aqua Tk, so earlier test was wrong
+## Our code does not include any X headers, but tk.h may ....
+## That is true even on macOS, but Aqua Tk has a private version of
+## X11 headers, and we want that one and not the XQuartz one.
+if test "${have_tcltk}" = yes; then
+  if test "${found_tk_by_config}" = yes; then
+    TCLTK_CPPFLAGS="${TCLTK_CPPFLAGS} ${TK_XINCLUDES}"
+  else
+    TCLTK_CPPFLAGS="${TCLTK_CPPFLAGS} ${X_CFLAGS}"
+  fi
+fi
 
-    CPPFLAGS="${CPPFLAGS} ${CAIRO_CPPFLAGS}"
-    LIBS="${LIBS} ${CAIRO_LIBS}"
 
-     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether cairo including pango is >= 1.2 and works" >&5
-$as_echo_n "checking whether cairo including pango is >= 1.2 and works... " >&6; }
-if ${r_cv_cairo_works+:} false; then :
+if test -z "${TCLTK_LIBS}"; then
+  ## We have to do the work.
+  if test "${have_tcltk}" = yes; then
+    ## Part 1.  Try finding the tcl library.
+    if test -n "${TCL_CONFIG}"; then
+      . ${TCL_CONFIG}
+      TCLTK_LIBS="${TCL_LIB_SPEC}"
+    else
+      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tcl_CreateInterp in -ltcl" >&5
+$as_echo_n "checking for Tcl_CreateInterp in -ltcl... " >&6; }
+if ${ac_cv_lib_tcl_Tcl_CreateInterp+:} false; then :
   $as_echo_n "(cached) " >&6
 else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-ltcl  $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
-#include <pango/pango.h>
-#include <pango/pangocairo.h>
-#include <cairo-xlib.h>
-#if CAIRO_VERSION  < 10200
-#error cairo version >= 1.2 required
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
 #endif
-int main(void) {
-    cairo_t  *CC;
-    cairo_arc(CC, 0.0, 0.0, 1.0, 0.0, 6.28);
-    pango_cairo_create_layout(CC);
-    pango_font_description_new();
-    return 0;
- }
+char Tcl_CreateInterp ();
+#ifdef F77_DUMMY_MAIN
+
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int F77_DUMMY_MAIN() { return 1; }
 
+#endif
+int
+main ()
+{
+return Tcl_CreateInterp ();
+  ;
+  return 0;
+}
 _ACEOF
 if ac_fn_c_try_link "$LINENO"; then :
-  r_cv_cairo_works=yes
+  ac_cv_lib_tcl_Tcl_CreateInterp=yes
 else
-  r_cv_cairo_works=no
-          CAIRO_LIBS=
-          CAIRO_CFLAGS=
-
+  ac_cv_lib_tcl_Tcl_CreateInterp=no
 fi
 rm -f core conftest.err conftest.$ac_objext \
     conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $r_cv_cairo_works" >&5
-$as_echo "$r_cv_cairo_works" >&6; }
-    CPPFLAGS=${save_CPPFLAGS}
-    LIBS=${save_LIBS}
-  else  ## no pangocairo, check for just cairo
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pkg-config knows about cairo" >&5
-$as_echo_n "checking whether pkg-config knows about cairo... " >&6; }
-if ${r_cv_has_cairo+:} false; then :
-  $as_echo_n "(cached) " >&6
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_tcl_Tcl_CreateInterp" >&5
+$as_echo "$ac_cv_lib_tcl_Tcl_CreateInterp" >&6; }
+if test "x$ac_cv_lib_tcl_Tcl_CreateInterp" = xyes; then :
+  TCLTK_LIBS=-ltcl
 else
-  if "${PKGCONF}" --exists cairo; then
-	   r_cv_has_cairo="yes"
-	 else
-	   r_cv_has_cairo="no"
-	 fi
-
+  have_tcltk=no
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $r_cv_has_cairo" >&5
-$as_echo "$r_cv_has_cairo" >&6; }
-    if test "x${r_cv_has_cairo}" = "xyes"; then
-      modlist="cairo"
-      ## on Linux, cairo-ft brings in header paths <cairo-ft.h>:
-      ## the code which needs this is currently conditionalized
-      for module in cairo-png cairo-ft; do
-	if "${PKGCONF}" --exists ${module}; then
-	  modlist="${modlist} ${module}"
-	fi
-      done
-      if "${PKGCONF}" --exists cairo-pdf; then
-         modlist="${modlist} cairo-pdf"
-         r_cairo_pdf=yes
-      fi
-      if "${PKGCONF}" --exists cairo-ps; then
-         modlist="${modlist} cairo-ps"
-         r_cairo_ps=yes
-      fi
-      if "${PKGCONF}" --exists cairo-svg; then
-         modlist="${modlist} cairo-svg"
-         r_cairo_svg=yes
-      fi
-      if "${PKGCONF}" --exists cairo-xlib; then
-         xmodlist="${modlist} cairo-xlib"
-      else
-         xmodlist="${modlist}"
-      fi
-      CAIRO_CPPFLAGS=`"${PKGCONF}" --cflags ${modlist}`
-      CAIROX11_CPPFLAGS=`"${PKGCONF}" --cflags ${xmodlist}`
-      case "${host_os}" in
-        darwin*)
-          ## This is for static OS X build
-          CAIRO_LIBS=`"${PKGCONF}" --static --libs ${modlist}`
-          CAIROX11_LIBS=`"${PKGCONF}" --static --libs ${xmodlist}`
-          ;;
-        *)
-          CAIRO_LIBS=`"${PKGCONF}" --libs ${modlist}`
-          CAIROX11_LIBS=`"${PKGCONF}" --libs ${xmodlist}`
-          ;;
-      esac
-
-      CPPFLAGS="${CPPFLAGS} ${CAIRO_CPPFLAGS}"
-      LIBS="${LIBS} ${CAIRO_LIBS}"
 
-      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether cairo is >= 1.2 and works" >&5
-$as_echo_n "checking whether cairo is >= 1.2 and works... " >&6; }
-if ${r_cv_cairo_works+:} false; then :
+    fi
+  fi
+  if test "${have_tcltk}" = yes; then
+    ## Part 2.  Try finding the tk library.
+    if test -n "${TK_CONFIG}"; then
+      . ${TK_CONFIG}
+      TCLTK_LIBS="${TCLTK_LIBS} ${TK_LIB_SPEC} ${TK_XLIBSW}"
+    else
+      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tk_Init in -ltk" >&5
+$as_echo_n "checking for Tk_Init in -ltk... " >&6; }
+if ${ac_cv_lib_tk_Tk_Init+:} false; then :
   $as_echo_n "(cached) " >&6
 else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-ltk ${TCLTK_LIBS} $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
-#include <cairo.h>
-#include <cairo-xlib.h>
-#if CAIRO_VERSION  < 10200
-#error cairo version >= 1.2 required
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
 #endif
-int main(void) {
-    cairo_t  *CC;
-    cairo_arc(CC, 0.0, 0.0, 1.0, 0.0, 6.28);
-    cairo_select_font_face (CC, "Helvetica", CAIRO_FONT_SLANT_NORMAL,
-                            CAIRO_FONT_WEIGHT_BOLD);
-    return 0;
- }
+char Tk_Init ();
+#ifdef F77_DUMMY_MAIN
+
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int F77_DUMMY_MAIN() { return 1; }
 
+#endif
+int
+main ()
+{
+return Tk_Init ();
+  ;
+  return 0;
+}
 _ACEOF
 if ac_fn_c_try_link "$LINENO"; then :
-  r_cv_cairo_works=yes
+  ac_cv_lib_tk_Tk_Init=yes
 else
-  r_cv_cairo_works=no
-          CAIRO_LIBS=
-          CAIRO_CFLAGS=
-
+  ac_cv_lib_tk_Tk_Init=no
 fi
 rm -f core conftest.err conftest.$ac_objext \
     conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $r_cv_cairo_works" >&5
-$as_echo "$r_cv_cairo_works" >&6; }
-      CPPFLAGS=${save_CPPFLAGS}
-      LIBS=${save_LIBS}
-    fi
-  fi
-fi
-
-if test "x${r_cv_has_pangocairo}" = xyes; then
-
-$as_echo "#define HAVE_PANGOCAIRO 1" >>confdefs.h
-
-fi
-if test "x${r_cv_cairo_works}" = xyes; then
-
-$as_echo "#define HAVE_WORKING_CAIRO 1" >>confdefs.h
-
-fi
-if test "x${r_cairo_pdf}" = xyes; then
-
-$as_echo "#define HAVE_CAIRO_PDF 1" >>confdefs.h
-
-fi
-if test "x${r_cairo_ps}" = xyes; then
-
-$as_echo "#define HAVE_CAIRO_PS 1" >>confdefs.h
-
-fi
-if test "x${r_cairo_svg}" = xyes; then
-
-$as_echo "#define HAVE_CAIRO_SVG 1" >>confdefs.h
-
-fi
-
-
-
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_tk_Tk_Init" >&5
+$as_echo "$ac_cv_lib_tk_Tk_Init" >&6; }
+if test "x$ac_cv_lib_tk_Tk_Init" = xyes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_LIBTK 1
+_ACEOF
 
+  LIBS="-ltk $LIBS"
 
 fi
- if test "x${r_cv_cairo_works}" = xyes; then
-  BUILD_DEVCAIRO_TRUE=
-  BUILD_DEVCAIRO_FALSE='#'
-else
-  BUILD_DEVCAIRO_TRUE='#'
-  BUILD_DEVCAIRO_FALSE=
-fi
-
 
-
-## Aqua
-case "${host_os}" in
-  darwin*)
-    ## check for CoreFoundation framework (chances are much higher
-    ## that we can build AQUA if this one is present)
-     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CFStringGetSystemEncoding in CoreFoundation framework" >&5
-$as_echo_n "checking for CFStringGetSystemEncoding in CoreFoundation framework... " >&6; }
-if ${r_cv_check_fw_CoreFoundation+:} false; then :
+      if test "${ac_cv_lib_tk_Tk_Init}" = no; then
+	## Grr, simple -ltk does not work.
+	## But maybe we simply need to add X11 libs.
+        ## Note that we cannot simply repeat the above test with extra
+        ## libs, because AC_CHECK_LIB uses the corresponding cache var
+        ## (ac_cv_lib_tk_Tk_Init in our case) if set.  As using unset
+        ## is not portable shell programming according to the Autoconf
+        ## docs, we use Tk_SafeInit in the test with X11 libs added.
+	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tk_SafeInit in -ltk" >&5
+$as_echo_n "checking for Tk_SafeInit in -ltk... " >&6; }
+if ${ac_cv_lib_tk_Tk_SafeInit+:} false; then :
   $as_echo_n "(cached) " >&6
 else
-  r_cv_check_fw_save_LIBS=$LIBS
-  r_cv_check_fw_CoreFoundation=no
-  LIBS="-framework CoreFoundation  $LIBS"
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-ltk ${TCLTK_LIBS} ${X_LIBS} $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
 /* Override any GCC internal prototype to avoid an error.
@@ -32780,7 +39945,7 @@ else
 #ifdef __cplusplus
 extern "C"
 #endif
-char CFStringGetSystemEncoding ();
+char Tk_SafeInit ();
 #ifdef F77_DUMMY_MAIN
 
 #  ifdef __cplusplus
@@ -32792,468 +39957,388 @@ char CFStringGetSystemEncoding ();
 int
 main ()
 {
-return CFStringGetSystemEncoding ();
+return Tk_SafeInit ();
   ;
   return 0;
 }
 _ACEOF
 if ac_fn_c_try_link "$LINENO"; then :
-  r_cv_check_fw_CoreFoundation="-framework CoreFoundation"
+  ac_cv_lib_tk_Tk_SafeInit=yes
+else
+  ac_cv_lib_tk_Tk_SafeInit=no
 fi
 rm -f core conftest.err conftest.$ac_objext \
     conftest$ac_exeext conftest.$ac_ext
-  LIBS=$r_cv_check_fw_save_LIBS
-  if test "$r_cv_check_fw_CoreFoundation" != no; then :
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE_COREFOUNDATION_FW 1
-_ACEOF
-
-	have_CoreFoundation_fw=yes
-else
-  have_CoreFoundation_fw=no
+LIBS=$ac_check_lib_save_LIBS
 fi
-
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_tk_Tk_SafeInit" >&5
+$as_echo "$ac_cv_lib_tk_Tk_SafeInit" >&6; }
+if test "x$ac_cv_lib_tk_Tk_SafeInit" = xyes; then :
+  TCLTK_LIBS="${TCLTK_LIBS} -ltk ${X_LIBS}"
+else
+  have_tcltk=no
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $r_cv_check_fw_CoreFoundation" >&5
-$as_echo "$r_cv_check_fw_CoreFoundation" >&6; }
 
-    ## FIXME: we should verify that we can use Obj-C exceptions
-    ##        such as @try and friends. The OBJC compiler tests
-    ##	      above add -fobjc-exceptions where possible, but
-    ##	      they don't check that the exceptions are available.
-    use_aqua=no
-if test "${want_aqua}" = yes; then
-  case "${host_os}" in
-    darwin*)
-      ## we can build AQUA only with CoreFoundation, otherwise
-      ## Quartz device won't build
-      if test -n "${r_cv_check_fw_CoreFoundation}" ; then
-        use_aqua=yes
-      else
-        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: requested 'aqua' but CoreFoundation was not found" >&5
-$as_echo "$as_me: WARNING: requested 'aqua' but CoreFoundation was not found" >&2;}
       fi
+    fi
+  fi
+  ## Postprocessing for AIX.
+  ## On AIX, the *_LIB_SPEC variables need to contain '-bI:' flags for
+  ## the Tcl export file.  These are really flags for ld rather than the
+  ## C/C++ compilers, and hence may need protection via '-Wl,'.
+  ## We have two ways of doing that:
+  ## * Recording whether '-Wl,' is needed for the C or C++ compilers,
+  ##   and getting this info into the TCLTK_LIBS make variable ... mess!
+  ## * Protecting all entries in TCLTK_LIBS that do not start with '-l'
+  ##   or '-L' with '-Wl,' (hoping that all compilers understand this).
+  ##   Easy, hence ...
+  case "${host_os}" in
+    aix*)
+      orig_TCLTK_LIBS="${TCLTK_LIBS}"
+      TCLTK_LIBS=
+      for flag in ${orig_TCLTK_LIBS}; do
+        case "${flag}" in
+	  -l*|-L*|-Wl,*) ;;
+	  *) flag="-Wl,${flag}" ;;
+	esac
+	TCLTK_LIBS="${TCLTK_LIBS} ${flag}"
+      done
       ;;
   esac
+  ## Force evaluation ('-ltcl8.3${TCL_DBGX}' and friends ...).
+  eval "TCLTK_LIBS=\"${TCLTK_LIBS}\""
 fi
-if test "${use_aqua}" = yes; then
-
-$as_echo "#define HAVE_AQUA 1" >>confdefs.h
-
-fi
-
-    ## That sets HAVE_AQUA, which is used to enable support of R.app
-    ## and also in C headers and files related to quartz()
-  ;;
-  *)
-    use_aqua=no
-  ;;
-esac
-## Now used:
-## - to compile src/unix/aqua.c
-## - in etc/Renviron to set the personal library,
-## - in grDevices to select building quartz()
- if test "x${use_aqua}" = xyes; then
-  BUILD_AQUA_TRUE=
-  BUILD_AQUA_FALSE='#'
-else
-  BUILD_AQUA_TRUE='#'
-  BUILD_AQUA_FALSE=
-fi
-
 
-## Tcl/Tk.
-if test "${want_tcltk}" = yes; then
-  have_tcltk=yes
-  ## (Note that the subsequent 3 macros assume that have_tcltk has been
-  ## set appropriately.)
-  for ac_prog in ${TCL_CONFIG} tclConfig.sh
-do
-  # Extract the first word of "$ac_prog", so it can be a program name with args.
-set dummy $ac_prog; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_path_TCL_CONFIG+:} false; then :
+  if test "${have_tcltk}" = yes; then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether compiling/linking Tcl/Tk code works" >&5
+$as_echo_n "checking whether compiling/linking Tcl/Tk code works... " >&6; }
+if ${r_cv_tcltk_works+:} false; then :
   $as_echo_n "(cached) " >&6
 else
-  case $TCL_CONFIG in
-  [\\/]* | ?:[\\/]*)
-  ac_cv_path_TCL_CONFIG="$TCL_CONFIG" # Let the user override the test with a path.
-  ;;
-  *)
-  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_exec_ext in '' $ac_executable_extensions; do
-  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-    ac_cv_path_TCL_CONFIG="$as_dir/$ac_word$ac_exec_ext"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-  done
-IFS=$as_save_IFS
+  ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
 
-  ;;
-esac
-fi
-TCL_CONFIG=$ac_cv_path_TCL_CONFIG
-if test -n "$TCL_CONFIG"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TCL_CONFIG" >&5
-$as_echo "$TCL_CONFIG" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
+r_save_CPPFLAGS="${CPPFLAGS}"
+r_save_LIBS="${LIBS}"
+CPPFLAGS="${CPPFLAGS} ${TCLTK_CPPFLAGS}"
+LIBS="${LIBS} ${TCLTK_LIBS}"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <tcl.h>
+#include <tk.h>
 
+#ifdef F77_DUMMY_MAIN
 
-  test -n "$TCL_CONFIG" && break
-done
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int F77_DUMMY_MAIN() { return 1; }
 
-if test -z "${TCL_CONFIG}"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tclConfig.sh in library (sub)directories" >&5
-$as_echo_n "checking for tclConfig.sh in library (sub)directories... " >&6; }
-if ${r_cv_path_TCL_CONFIG+:} false; then :
-  $as_echo_n "(cached) " >&6
+#endif
+int
+main ()
+{
+static char * p1 = (char *) Tcl_Init;
+static char * p2 = (char *) Tk_Init;
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  r_cv_tcltk_works=yes
 else
-  for ldir in /usr/local/${LIBnn} /usr/${LIBnn} /${LIBnn} /opt/lib /sw/lib /opt/csw/lib /usr/sfw/lib /opt/freeware/lib; do
-  for dir in \
-      ${ldir} \
-      `ls -d ${ldir}/tcl[8-9].[0-9]* 2>/dev/null | sort -r`; do
-    if test -f ${dir}/tclConfig.sh; then
-      r_cv_path_TCL_CONFIG="${dir}/tclConfig.sh"
-      break 2
-    fi
-  done
-done
+  r_cv_tcltk_works=no
 fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+CPPFLAGS="${r_save_CPPFLAGS}"
+LIBS="${r_save_LIBS}"
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
 
-if test -n "${r_cv_path_TCL_CONFIG}"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${r_cv_path_TCL_CONFIG}" >&5
-$as_echo "${r_cv_path_TCL_CONFIG}" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
 fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $r_cv_tcltk_works" >&5
+$as_echo "$r_cv_tcltk_works" >&6; }
 
-  if test -n "${r_cv_path_TCL_CONFIG}"; then
-    TCL_CONFIG="${r_cv_path_TCL_CONFIG}"
+    have_tcltk=${r_cv_tcltk_works}
   fi
-fi
-for ac_prog in ${TK_CONFIG} tkConfig.sh
-do
-  # Extract the first word of "$ac_prog", so it can be a program name with args.
-set dummy $ac_prog; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_path_TK_CONFIG+:} false; then :
-  $as_echo_n "(cached) " >&6
 else
-  case $TK_CONFIG in
-  [\\/]* | ?:[\\/]*)
-  ac_cv_path_TK_CONFIG="$TK_CONFIG" # Let the user override the test with a path.
-  ;;
-  *)
-  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_exec_ext in '' $ac_executable_extensions; do
-  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-    ac_cv_path_TK_CONFIG="$as_dir/$ac_word$ac_exec_ext"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-  done
-IFS=$as_save_IFS
-
-  ;;
-esac
+  have_tcltk=no
+  ## Just making sure.
+  TCLTK_CPPFLAGS=
+  TCLTK_LIBS=
 fi
-TK_CONFIG=$ac_cv_path_TK_CONFIG
-if test -n "$TK_CONFIG"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TK_CONFIG" >&5
-$as_echo "$TK_CONFIG" >&6; }
+if test "${have_tcltk}" = yes; then
+
+$as_echo "#define HAVE_TCLTK 1" >>confdefs.h
+
+  use_tcltk=yes
 else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+  use_tcltk=no
 fi
 
 
-  test -n "$TK_CONFIG" && break
-done
 
-if test -z "${TK_CONFIG}"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tkConfig.sh in library (sub)directories" >&5
-$as_echo_n "checking for tkConfig.sh in library (sub)directories... " >&6; }
-if ${r_cv_path_TK_CONFIG+:} false; then :
+
+
+## BSD networking.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for BSD networking" >&5
+$as_echo_n "checking for BSD networking... " >&6; }
+if ${r_cv_bsd_networking+:} false; then :
   $as_echo_n "(cached) " >&6
 else
-  for ldir in /usr/local/${LIBnn} /usr/${LIBnn} /${LIBnn} /opt/lib /sw/lib /opt/csw/lib /usr/sfw/lib /opt/freeware/lib; do
-  for dir in \
-      ${ldir} \
-      `ls -d ${ldir}/tk[8-9].[0-9]* 2>/dev/null | sort -r`; do
-    if test -f ${dir}/tkConfig.sh; then
-      r_cv_path_TK_CONFIG="${dir}/tkConfig.sh"
-      break 2
-    fi
-  done
-done
+  if test "${ac_cv_header_netdb_h}" = yes \
+     && test "${ac_cv_header_arpa_inet_h}" = yes \
+     && test "${ac_cv_header_netinet_in_h}" = yes \
+     && test "${ac_cv_header_sys_socket_h}" = yes \
+     && test "${ac_cv_search_connect}" != no \
+     && test "${ac_cv_search_gethostbyname}" !=  no; then
+  r_cv_bsd_networking=yes
+else
+  as_fn_error $? "BSD networking functions are required" "$LINENO" 5
+fi
 fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $r_cv_bsd_networking" >&5
+$as_echo "$r_cv_bsd_networking" >&6; }
+
+
+## XDR headers and library routines.
+ac_fn_c_check_header_mongrel "$LINENO" "rpc/types.h" "ac_cv_header_rpc_types_h" "$ac_includes_default"
+if test "x$ac_cv_header_rpc_types_h" = xyes; then :
 
-if test -n "${r_cv_path_TK_CONFIG}"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${r_cv_path_TK_CONFIG}" >&5
-$as_echo "${r_cv_path_TK_CONFIG}" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
 fi
 
-  if test -n "${r_cv_path_TK_CONFIG}"; then
-    TK_CONFIG="${r_cv_path_TK_CONFIG}"
-  fi
+
+if test "${ac_cv_header_rpc_types_h}" = yes ; then
+  ac_fn_c_check_header_compile "$LINENO" "rpc/xdr.h" "ac_cv_header_rpc_xdr_h" "#include <rpc/types.h>
+"
+if test "x$ac_cv_header_rpc_xdr_h" = xyes; then :
+
 fi
-if test -z "${TCLTK_CPPFLAGS}" \
-    || test -z "${TCLTK_LIBS}"; then
-  ## Check whether the versions found via the *Config.sh files are at
-  ## least 8; otherwise, issue a warning and turn off Tcl/Tk support.
-  ## Note that in theory a system could have outdated versions of the
-  ## *Config.sh scripts and yet up-to-date installations of Tcl/Tk in
-  ## standard places ...
-  ## This doesn't make a great deal of sense: on past form
-  ## we don't even expect future versions of 8.x to work, let alone 9.0
-  if test -n "${TCL_CONFIG}"; then
-    . ${TCL_CONFIG}
-    if test ${TCL_MAJOR_VERSION} -lt 8; then
-      warn_tcltk_version="Tcl/Tk support requires Tcl version >= 8"
-      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ${warn_tcltk_version}" >&5
-$as_echo "$as_me: WARNING: ${warn_tcltk_version}" >&2;}
-      have_tcltk=no
-    fi
-  fi
-  if test -n "${TK_CONFIG}" \
-      && test -z "${warn_tcltk_version}"; then
-    . ${TK_CONFIG}
-    if test ${TK_MAJOR_VERSION} -lt 8; then
-      warn_tcltk_version="Tcl/Tk support requires Tk version >= 8"
-      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ${warn_tcltk_version}" >&5
-$as_echo "$as_me: WARNING: ${warn_tcltk_version}" >&2;}
-      have_tcltk=no
-    fi
-  fi
-  if test -n "${TCL_CONFIG}" \
-      && test -n "${TK_CONFIG}" \
-      && test -z "${warn_tcltk_version}"; then
-    if test ${TCL_MAJOR_VERSION} -ne ${TK_MAJOR_VERSION} \
-      || test ${TCL_MINOR_VERSION} -ne ${TK_MINOR_VERSION}; then
-     warn_tcltk_version="Tcl and Tk major or minor versions disagree"
-      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ${warn_tcltk_version}" >&5
-$as_echo "$as_me: WARNING: ${warn_tcltk_version}" >&2;}
-      have_tcltk=no
-    fi
-  fi
+
+
+fi
+if test "${ac_cv_header_rpc_types_h}" = yes && \
+   test "${ac_cv_header_rpc_xdr_h}" = yes && \
+   test "${ac_cv_search_xdr_string}" != no ; then
+  r_xdr=yes
+else
+  r_xdr=no
 fi
+TIRPC_CPPFLAGS=
+if test "${r_xdr}" = no ; then
+  ## No RPC headers, so try for TI-RPC headers: need /usr/include/tirpc
+  ## on include path to find /usr/include/tirpc/netconfig.h
+  save_CPPFLAGS=${CPPFLAGS}
+  CPPFLAGS="${CPPFLAGS} -I/usr/include/tirpc"
+  ac_fn_c_check_header_mongrel "$LINENO" "tirpc/rpc/types.h" "ac_cv_header_tirpc_rpc_types_h" "$ac_includes_default"
+if test "x$ac_cv_header_tirpc_rpc_types_h" = xyes; then :
 
+fi
+
+
+  if test "${ac_cv_header_tirpc_rpc_types_h}" = yes ; then
+    ac_fn_c_check_header_compile "$LINENO" "tirpc/rpc/xdr.h" "ac_cv_header_tirpc_rpc_xdr_h" "#include <tirpc/rpc/types.h>
+"
+if test "x$ac_cv_header_tirpc_rpc_xdr_h" = xyes; then :
 
-if test -z "${TCLTK_CPPFLAGS}"; then
-  ## We have to do the work.
-  if test "${have_tcltk}" = yes; then
-    ## Part 1.  Check for tcl.h.
-    found_tcl_h=no
-    if test -n "${TCL_CONFIG}"; then
-      . ${TCL_CONFIG}
-      ## TCL_INCLUDE_SPEC (if set) is what we want.
-      if test -n ${TCL_INCLUDE_SPEC} ; then
-        r_save_CPPFLAGS="${CPPFLAGS}"
-	CPPFLAGS="${CPPFLAGS} ${TCL_INCLUDE_SPEC}"
-	ac_fn_c_check_header_mongrel "$LINENO" "tcl.h" "ac_cv_header_tcl_h" "$ac_includes_default"
-if test "x$ac_cv_header_tcl_h" = xyes; then :
-  TCLTK_CPPFLAGS="${TCL_INCLUDE_SPEC}"
-			 found_tcl_h=yes
 fi
 
 
-	CPPFLAGS="${r_save_CPPFLAGS}"
-      fi
-      if test "${found_tcl_h}" = no; then
-	## Look for tcl.h in
-	##   ${TCL_PREFIX}/include/tcl${TCL_VERSION}
-	##   ${TCL_PREFIX}/include
-	## Also look in
-	##   ${TCL_PREFIX}/include/tcl${TCL_VERSION}/generic
-	## to deal with current FreeBSD layouts.  These also link the real
-	## thing to the version subdir, but the link cannot be used as it
-	## fails to include 'tclDecls.h' which is not linked.  Hence we
-	## must look for the real thing first.  Argh ...
-	for dir in \
-	    ${TCL_PREFIX}/include/tcl${TCL_VERSION}/generic \
-	    ${TCL_PREFIX}/include/tcl${TCL_VERSION} \
-	    ${TCL_PREFIX}/include; do
-	  as_ac_Header=`$as_echo "ac_cv_header_${dir}/tcl.h" | $as_tr_sh`
-ac_fn_c_check_header_mongrel "$LINENO" "${dir}/tcl.h" "$as_ac_Header" "$ac_includes_default"
-if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
-  TCLTK_CPPFLAGS="-I${dir}"
-			   found_tcl_h=yes
-			   break
+  fi
+  if test "${ac_cv_header_tirpc_rpc_types_h}" = yes && \
+       test "${ac_cv_header_tirpc_rpc_xdr_h}" = yes &&
+       test "${ac_cv_search_xdr_string}" != no ; then
+    TIRPC_CPPFLAGS=-I/usr/include/tirpc
+    r_xdr=yes
+  fi
+  CPPFLAGS="${save_CPPFLAGS}"
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for XDR support" >&5
+$as_echo_n "checking for XDR support... " >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${r_xdr}" >&5
+$as_echo "${r_xdr}" >&6; }
+ if test "x${r_xdr}" = xno; then
+  BUILD_XDR_TRUE=
+  BUILD_XDR_FALSE='#'
+else
+  BUILD_XDR_TRUE='#'
+  BUILD_XDR_FALSE=
 fi
 
 
-	done
-      fi
-    fi
-    if test "${found_tcl_h}" = no; then
-      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tcl.h" >&5
-$as_echo_n "checking for tcl.h... " >&6; }
-if ${r_cv_header_tcl_h+:} false; then :
+
+
+## zlib headers and libraries.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateInit2_ in -lz" >&5
+$as_echo_n "checking for inflateInit2_ in -lz... " >&6; }
+if ${ac_cv_lib_z_inflateInit2_+:} false; then :
   $as_echo_n "(cached) " >&6
 else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lz  $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-#include <tcl.h>
-/* Revise if 9.x ever appears (and 8.x seems to increment only
-   every few years). */
-#if (TCL_MAJOR_VERSION >= 8) && (TCL_MINOR_VERSION >= 4)
-  yes
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
 #endif
+char inflateInit2_ ();
+#ifdef F77_DUMMY_MAIN
 
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int F77_DUMMY_MAIN() { return 1; }
+
+#endif
+int
+main ()
+{
+return inflateInit2_ ();
+  ;
+  return 0;
+}
 _ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  $EGREP "yes" >/dev/null 2>&1; then :
-  r_cv_header_tcl_h=yes
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_z_inflateInit2_=yes
 else
-  r_cv_header_tcl_h=no
+  ac_cv_lib_z_inflateInit2_=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateInit2_" >&5
+$as_echo "$ac_cv_lib_z_inflateInit2_" >&6; }
+if test "x$ac_cv_lib_z_inflateInit2_" = xyes; then :
+  have_zlib=yes
+else
+  have_zlib=no
 fi
-rm -f conftest*
 
+if test "${have_zlib}" = yes; then
+  ac_fn_c_check_header_mongrel "$LINENO" "zlib.h" "ac_cv_header_zlib_h" "$ac_includes_default"
+if test "x$ac_cv_header_zlib_h" = xyes; then :
+  have_zlib=yes
+else
+  have_zlib=no
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $r_cv_header_tcl_h" >&5
-$as_echo "$r_cv_header_tcl_h" >&6; }
 
-      if test "${r_cv_header_tcl_h}" = yes; then
-        found_tcl_h=yes
-      else
-        have_tcltk=no
-      fi
-    fi
-  fi
-  if test "${have_tcltk}" = yes; then
-    ## Part 2.  Check for tk.h.
-    found_tk_h=no
-    if test -n "${TK_CONFIG}"; then
-      . ${TK_CONFIG}
-      ## TK_INCLUDE_SPEC (if set) is what we want.
-      if test -n ${TK_INCLUDE_SPEC} ; then
-        r_save_CPPFLAGS="${CPPFLAGS}"
-	CPPFLAGS="${CPPFLAGS} ${TCLTK_CPPFLAGS} ${TK_XINCLUDES} ${TK_INCLUDE_SPEC}"
-	ac_fn_c_check_header_mongrel "$LINENO" "tk.h" "ac_cv_header_tk_h" "$ac_includes_default"
-if test "x$ac_cv_header_tk_h" = xyes; then :
-  TCLTK_CPPFLAGS="${TCLTK_CPPFLAGS} ${TK_INCLUDE_SPEC}"
-			 found_tk_h=yes
+
 fi
+if test "${have_zlib}" = yes; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if zlib version >= 1.2.5" >&5
+$as_echo_n "checking if zlib version >= 1.2.5... " >&6; }
+if ${r_cv_header_zlib_h+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test "$cross_compiling" = yes; then :
+  r_cv_header_zlib_h=no
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
 
+#include <stdlib.h>
+#include <string.h>
+#include <zlib.h>
+int main() {
+#ifdef ZLIB_VERNUM
+  if (ZLIB_VERNUM < 0x1250) {
+    exit(1);
+  }
+  exit(0);
+#else
+  exit(1);
+#endif
+}
 
-	CPPFLAGS="${r_save_CPPFLAGS}"
-      fi
-      if test "${found_tk_h}" = no; then
-	## Look for tk.h in
-	##   ${TK_PREFIX}/include/tk${TK_VERSION}
-	##   ${TK_PREFIX}/include
-	## Also look in
-	##   ${TK_PREFIX}/include/tcl${TK_VERSION}
-	## to compensate for Debian madness ...
-	## Also look in
-	##   ${TK_PREFIX}/include/tk${TK_VERSION}/generic
-	## to deal with current FreeBSD layouts.  See above for details.
-	##
-	## As the AC_CHECK_HEADER test tries including the header file and
-	## tk.h includes tcl.h and X11/Xlib.h, we need to change CPPFLAGS
-	## for the check.
-	r_save_CPPFLAGS="${CPPFLAGS}"
-	CPPFLAGS="${CPPFLAGS} ${TK_XINCLUDES} ${TCLTK_CPPFLAGS}"
-	for dir in \
-	    ${TK_PREFIX}/include/tk${TK_VERSION}/generic \
-	    ${TK_PREFIX}/include/tk${TK_VERSION} \
-	    ${TK_PREFIX}/include/tcl${TK_VERSION} \
-	    ${TK_PREFIX}/include; do
-	  as_ac_Header=`$as_echo "ac_cv_header_${dir}/tk.h" | $as_tr_sh`
-ac_fn_c_check_header_mongrel "$LINENO" "${dir}/tk.h" "$as_ac_Header" "$ac_includes_default"
-if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
-  TCLTK_CPPFLAGS="${TCLTK_CPPFLAGS} -I${dir}"
-			   found_tk_h=yes
-			   break
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+  r_cv_header_zlib_h=yes
+else
+  r_cv_header_zlib_h=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
 fi
 
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $r_cv_header_zlib_h" >&5
+$as_echo "$r_cv_header_zlib_h" >&6; }
 
-	done
-	CPPFLAGS="${r_save_CPPFLAGS}"
-      fi
-    fi
-    if test "${found_tk_h}" = no; then
-      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tk.h" >&5
-$as_echo_n "checking for tk.h... " >&6; }
-if ${r_cv_header_tk_h+:} false; then :
+  have_zlib=${r_cv_header_zlib_h}
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether zlib support suffices" >&5
+$as_echo_n "checking whether zlib support suffices... " >&6; }
+if test "${have_zlib}" != yes; then
+  as_fn_error $? "zlib library and headers are required" "$LINENO" 5
+else
+  LIBS="-lz ${LIBS}"
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking mmap support for zlib" >&5
+$as_echo_n "checking mmap support for zlib... " >&6; }
+if ${r_cv_zlib_mmap+:} false; then :
   $as_echo_n "(cached) " >&6
 else
+  if test "$cross_compiling" = yes; then :
+  r_cv_zlib_mmap=yes
+else
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-#include <tk.h>
-/* Revise if 9.x ever appears (and 8.x seems to increment only
-   every few years). */
-#if (TK_MAJOR_VERSION >= 8) && (TK_MINOR_VERSION >= 4)
-  yes
-#endif
+
+#include <stdlib.h>
+#include <sys/types.h>
+#include <sys/mman.h>
+#include <sys/stat.h>
+caddr_t hello() {
+  exit(mmap((caddr_t)0, (off_t)0, PROT_READ, MAP_SHARED, 0, (off_t)0));
+}
 
 _ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  $EGREP "yes" >/dev/null 2>&1; then :
-  r_cv_header_tk_h=yes
+if ac_fn_c_try_run "$LINENO"; then :
+  r_cv_zlib_mmap=no
 else
-  r_cv_header_tk_h=no
+  r_cv_zlib_mmap=yes
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
 fi
-rm -f conftest*
 
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $r_cv_header_tk_h" >&5
-$as_echo "$r_cv_header_tk_h" >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $r_cv_zlib_mmap" >&5
+$as_echo "$r_cv_zlib_mmap" >&6; }
 
-      if test "{r_cv_header_tk_h}" = yes; then
-        found_tk_h=yes
-      else
-        have_tcltk=no
-      fi
-    fi
-  fi
 fi
-if test "${have_tcltk}" = yes; then
-  if test -n "${TK_XINCLUDES}"; then
-    TCLTK_CPPFLAGS="${TCLTK_CPPFLAGS} ${TK_XINCLUDES}"
-  else
-    TCLTK_CPPFLAGS="${TCLTK_CPPFLAGS} ${X_CFLAGS}"
-  fi
+ if test "x${have_zlib}" = xno && test "x${r_cv_zlib_mmap}" = xyes; then
+  USE_MMAP_ZLIB_TRUE=
+  USE_MMAP_ZLIB_FALSE='#'
+else
+  USE_MMAP_ZLIB_TRUE='#'
+  USE_MMAP_ZLIB_FALSE=
 fi
 
 
 
-if test -z "${TCLTK_LIBS}"; then
-  ## We have to do the work.
-  if test "${have_tcltk}" = yes; then
-    ## Part 1.  Try finding the tcl library.
-    if test -n "${TCL_CONFIG}"; then
-      . ${TCL_CONFIG}
-      TCLTK_LIBS="${TCL_LIB_SPEC}"
-    else
-      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tcl_CreateInterp in -ltcl" >&5
-$as_echo_n "checking for Tcl_CreateInterp in -ltcl... " >&6; }
-if ${ac_cv_lib_tcl_Tcl_CreateInterp+:} false; then :
+## bzlib headers and libraries.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for BZ2_bzlibVersion in -lbz2" >&5
+$as_echo_n "checking for BZ2_bzlibVersion in -lbz2... " >&6; }
+if ${ac_cv_lib_bz2_BZ2_bzlibVersion+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_check_lib_save_LIBS=$LIBS
-LIBS="-ltcl  $LIBS"
+LIBS="-lbz2  $LIBS"
 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
@@ -33263,7 +40348,7 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 #ifdef __cplusplus
 extern "C"
 #endif
-char Tcl_CreateInterp ();
+char BZ2_bzlibVersion ();
 #ifdef F77_DUMMY_MAIN
 
 #  ifdef __cplusplus
@@ -33275,43 +40360,115 @@ char Tcl_CreateInterp ();
 int
 main ()
 {
-return Tcl_CreateInterp ();
+return BZ2_bzlibVersion ();
   ;
   return 0;
 }
 _ACEOF
 if ac_fn_c_try_link "$LINENO"; then :
-  ac_cv_lib_tcl_Tcl_CreateInterp=yes
+  ac_cv_lib_bz2_BZ2_bzlibVersion=yes
 else
-  ac_cv_lib_tcl_Tcl_CreateInterp=no
+  ac_cv_lib_bz2_BZ2_bzlibVersion=no
 fi
 rm -f core conftest.err conftest.$ac_objext \
     conftest$ac_exeext conftest.$ac_ext
 LIBS=$ac_check_lib_save_LIBS
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_tcl_Tcl_CreateInterp" >&5
-$as_echo "$ac_cv_lib_tcl_Tcl_CreateInterp" >&6; }
-if test "x$ac_cv_lib_tcl_Tcl_CreateInterp" = xyes; then :
-  TCLTK_LIBS=-ltcl
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bz2_BZ2_bzlibVersion" >&5
+$as_echo "$ac_cv_lib_bz2_BZ2_bzlibVersion" >&6; }
+if test "x$ac_cv_lib_bz2_BZ2_bzlibVersion" = xyes; then :
+  have_bzlib=yes
 else
-  have_tcltk=no
+  have_bzlib=no
 fi
 
-    fi
-  fi
-  if test "${have_tcltk}" = yes; then
-    ## Part 2.  Try finding the tk library.
-    if test -n "${TK_CONFIG}"; then
-      . ${TK_CONFIG}
-      TCLTK_LIBS="${TCLTK_LIBS} ${TK_LIB_SPEC} ${TK_XLIBSW}"
-    else
-      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tk_Init in -ltk" >&5
-$as_echo_n "checking for Tk_Init in -ltk... " >&6; }
-if ${ac_cv_lib_tk_Tk_Init+:} false; then :
+if test "${have_bzlib}" = yes; then
+  for ac_header in bzlib.h
+do :
+  ac_fn_c_check_header_mongrel "$LINENO" "bzlib.h" "ac_cv_header_bzlib_h" "$ac_includes_default"
+if test "x$ac_cv_header_bzlib_h" = xyes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_BZLIB_H 1
+_ACEOF
+ have_bzlib=yes
+else
+  have_bzlib=no
+fi
+
+done
+
+fi
+if test "x${have_bzlib}" = xyes; then
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if bzip2 version >= 1.0.6" >&5
+$as_echo_n "checking if bzip2 version >= 1.0.6... " >&6; }
+if ${r_cv_have_bzlib+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+r_save_LIBS="${LIBS}"
+LIBS="-lbz2 ${LIBS}"
+if test "$cross_compiling" = yes; then :
+  r_cv_have_bzlib=no
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#ifdef HAVE_BZLIB_H
+#include <bzlib.h>
+#endif
+int main() {
+    char *ver = BZ2_bzlibVersion();
+    exit(strcmp(ver, "1.0.6") < 0);
+}
+
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+  r_cv_have_bzlib=yes
+else
+  r_cv_have_bzlib=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+LIBS="${r_save_LIBS}"
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $r_cv_have_bzlib" >&5
+$as_echo "$r_cv_have_bzlib" >&6; }
+fi
+if test "x${r_cv_have_bzlib}" = xno; then
+  have_bzlib=no
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether bzip2 support suffices" >&5
+$as_echo_n "checking whether bzip2 support suffices... " >&6; }
+if test "x${have_bzlib}" = xyes; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+  LIBS="-lbz2 ${LIBS}"
+else
+  as_fn_error $? "bzip2 library and headers are required" "$LINENO" 5
+fi
+
+
+## LZMA headers and libraries from xz-utils
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lzma_version_number in -llzma" >&5
+$as_echo_n "checking for lzma_version_number in -llzma... " >&6; }
+if ${ac_cv_lib_lzma_lzma_version_number+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_check_lib_save_LIBS=$LIBS
-LIBS="-ltk ${TCLTK_LIBS} $LIBS"
+LIBS="-llzma  $LIBS"
 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
@@ -33321,7 +40478,7 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 #ifdef __cplusplus
 extern "C"
 #endif
-char Tk_Init ();
+char lzma_version_number ();
 #ifdef F77_DUMMY_MAIN
 
 #  ifdef __cplusplus
@@ -33333,46 +40490,117 @@ char Tk_Init ();
 int
 main ()
 {
-return Tk_Init ();
+return lzma_version_number ();
   ;
   return 0;
 }
 _ACEOF
 if ac_fn_c_try_link "$LINENO"; then :
-  ac_cv_lib_tk_Tk_Init=yes
+  ac_cv_lib_lzma_lzma_version_number=yes
 else
-  ac_cv_lib_tk_Tk_Init=no
+  ac_cv_lib_lzma_lzma_version_number=no
 fi
 rm -f core conftest.err conftest.$ac_objext \
     conftest$ac_exeext conftest.$ac_ext
 LIBS=$ac_check_lib_save_LIBS
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_tk_Tk_Init" >&5
-$as_echo "$ac_cv_lib_tk_Tk_Init" >&6; }
-if test "x$ac_cv_lib_tk_Tk_Init" = xyes; then :
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_lzma_lzma_version_number" >&5
+$as_echo "$ac_cv_lib_lzma_lzma_version_number" >&6; }
+if test "x$ac_cv_lib_lzma_lzma_version_number" = xyes; then :
+  have_lzma=yes
+else
+  have_lzma=no
+fi
+
+if test "${have_lzma}" = yes; then
+  for ac_header in lzma.h
+do :
+  ac_fn_c_check_header_mongrel "$LINENO" "lzma.h" "ac_cv_header_lzma_h" "$ac_includes_default"
+if test "x$ac_cv_header_lzma_h" = xyes; then :
   cat >>confdefs.h <<_ACEOF
-#define HAVE_LIBTK 1
+#define HAVE_LZMA_H 1
 _ACEOF
+ have_lzma=yes
+else
+  have_lzma=no
+fi
 
-  LIBS="-ltk $LIBS"
+done
 
 fi
+if test "x${have_lzma}" = xyes; then
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if lzma version >= 5.0.3" >&5
+$as_echo_n "checking if lzma version >= 5.0.3... " >&6; }
+if ${r_cv_have_lzma+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
 
-      if test "${ac_cv_lib_tk_Tk_Init}" = no; then
-	## Grr, simple -ltk does not work.
-	## But maybe we simply need to add X11 libs.
-        ## Note that we cannot simply repeat the above test with extra
-        ## libs, because AC_CHECK_LIB uses the corresponding cache var
-        ## (ac_cv_lib_tk_Tk_Init in our case) if set.  As using unset
-        ## is not portable shell programming according to the Autoconf
-        ## docs, we use Tk_SafeInit in the test with X11 libs added.
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tk_SafeInit in -ltk" >&5
-$as_echo_n "checking for Tk_SafeInit in -ltk... " >&6; }
-if ${ac_cv_lib_tk_Tk_SafeInit+:} false; then :
+r_save_LIBS="${LIBS}"
+LIBS="-llzma ${LIBS}"
+if test "$cross_compiling" = yes; then :
+  r_cv_have_lzma=no
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#ifdef HAVE_LZMA_H
+#include <lzma.h>
+#endif
+#include <stdlib.h>
+int main() {
+    unsigned int ver = lzma_version_number();
+    // This is 10000000*major + 10000*minor + 10*revision + [012]
+    // I.e. xyyyzzzs and 5.1.2 would be 50010020
+    exit(ver < 50000030);
+}
+
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+  r_cv_have_lzma=yes
+else
+  r_cv_have_lzma=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+LIBS="${r_save_LIBS}"
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $r_cv_have_lzma" >&5
+$as_echo "$r_cv_have_lzma" >&6; }
+fi
+if test "x${r_cv_have_lzma}" = xno; then
+  have_lzma=no
+fi
+if test "x${have_lzma}" = xyes; then
+
+$as_echo "#define HAVE_LZMA 1" >>confdefs.h
+
+  LIBS="-llzma ${LIBS}"
+else
+  as_fn_error $? "\"liblzma library and headers are required\"" "$LINENO" 5
+fi
+
+
+## PCRE headers and libraries.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pcre_fullinfo in -lpcre" >&5
+$as_echo_n "checking for pcre_fullinfo in -lpcre... " >&6; }
+if ${ac_cv_lib_pcre_pcre_fullinfo+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_check_lib_save_LIBS=$LIBS
-LIBS="-ltk ${TCLTK_LIBS} ${X_LIBS} $LIBS"
+LIBS="-lpcre  $LIBS"
 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
@@ -33382,7 +40610,7 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 #ifdef __cplusplus
 extern "C"
 #endif
-char Tk_SafeInit ();
+char pcre_fullinfo ();
 #ifdef F77_DUMMY_MAIN
 
 #  ifdef __cplusplus
@@ -33394,79 +40622,179 @@ char Tk_SafeInit ();
 int
 main ()
 {
-return Tk_SafeInit ();
+return pcre_fullinfo ();
   ;
   return 0;
 }
 _ACEOF
 if ac_fn_c_try_link "$LINENO"; then :
-  ac_cv_lib_tk_Tk_SafeInit=yes
+  ac_cv_lib_pcre_pcre_fullinfo=yes
 else
-  ac_cv_lib_tk_Tk_SafeInit=no
+  ac_cv_lib_pcre_pcre_fullinfo=no
 fi
 rm -f core conftest.err conftest.$ac_objext \
     conftest$ac_exeext conftest.$ac_ext
 LIBS=$ac_check_lib_save_LIBS
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_tk_Tk_SafeInit" >&5
-$as_echo "$ac_cv_lib_tk_Tk_SafeInit" >&6; }
-if test "x$ac_cv_lib_tk_Tk_SafeInit" = xyes; then :
-  TCLTK_LIBS="${TCLTK_LIBS} -ltk ${X_LIBS}"
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pcre_pcre_fullinfo" >&5
+$as_echo "$ac_cv_lib_pcre_pcre_fullinfo" >&6; }
+if test "x$ac_cv_lib_pcre_pcre_fullinfo" = xyes; then :
+  have_pcre=yes
 else
-  have_tcltk=no
+  have_pcre=no
 fi
 
-      fi
-    fi
+if test "${have_pcre}" = yes; then
+  for ac_header in pcre.h pcre/pcre.h
+do :
+  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
+ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
+if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
+  cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+  if test "${ac_cv_header_pcre_h}" = no \
+    && test "${ac_cv_header_pcre_pcre_h}" = no; then
+    have_pcre=no
   fi
-  ## Postprocessing for AIX.
-  ## On AIX, the *_LIB_SPEC variables need to contain '-bI:' flags for
-  ## the Tcl export file.  These are really flags for ld rather than the
-  ## C/C++ compilers, and hence may need protection via '-Wl,'.
-  ## We have two ways of doing that:
-  ## * Recording whether '-Wl,' is needed for the C or C++ compilers,
-  ##   and getting this info into the TCLTK_LIBS make variable ... mess!
-  ## * Protecting all entries in TCLTK_LIBS that do not start with '-l'
-  ##   or '-L' with '-Wl,' (hoping that all compilers understand this).
-  ##   Easy, hence ...
-  case "${host_os}" in
-    aix*)
-      orig_TCLTK_LIBS="${TCLTK_LIBS}"
-      TCLTK_LIBS=
-      for flag in ${orig_TCLTK_LIBS}; do
-        case "${flag}" in
-	  -l*|-L*|-Wl,*) ;;
-	  *) flag="-Wl,${flag}" ;;
-	esac
-	TCLTK_LIBS="${TCLTK_LIBS} ${flag}"
-      done
-      ;;
-  esac
-  ## Force evaluation ('-ltcl8.3${TCL_DBGX}' and friends ...).
-  eval "TCLTK_LIBS=\"${TCLTK_LIBS}\""
 fi
+if test "x${have_pcre}" = xyes; then
+r_save_LIBS="${LIBS}"
+LIBS="-lpcre ${LIBS}"
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if PCRE version >= 8.10, < 10.0 and has UTF-8 support" >&5
+$as_echo_n "checking if PCRE version >= 8.10, < 10.0 and has UTF-8 support... " >&6; }
+if ${r_cv_have_pcre810+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test "$cross_compiling" = yes; then :
+  r_cv_have_pcre810=no
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
 
-  if test "${have_tcltk}" = yes; then
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether compiling/linking Tcl/Tk code works" >&5
-$as_echo_n "checking whether compiling/linking Tcl/Tk code works... " >&6; }
-if ${r_cv_tcltk_works+:} false; then :
+#ifdef HAVE_PCRE_PCRE_H
+#include <pcre/pcre.h>
+#else
+#ifdef HAVE_PCRE_H
+#include <pcre.h>
+#endif
+#endif
+int main() {
+#ifdef PCRE_MAJOR
+#if PCRE_MAJOR > 8
+  exit(1);
+#elif PCRE_MAJOR == 8 && PCRE_MINOR >= 10
+{
+    int ans;
+    int res = pcre_config(PCRE_CONFIG_UTF8, &ans);
+    if (res || ans != 1) exit(1); else exit(0);
+}
+#else
+  exit(1);
+#endif
+#else
+  exit(1);
+#endif
+}
+
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+  r_cv_have_pcre810=yes
+else
+  r_cv_have_pcre810=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $r_cv_have_pcre810" >&5
+$as_echo "$r_cv_have_pcre810" >&6; }
+fi
+if test "x${r_cv_have_pcre810}" != xyes; then
+  have_pcre=no
+  LIBS="${r_save_LIBS}"
+else
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if PCRE version >= 8.32" >&5
+$as_echo_n "checking if PCRE version >= 8.32... " >&6; }
+if ${r_cv_have_pcre832+:} false; then :
   $as_echo_n "(cached) " >&6
 else
-  ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
+  if test "$cross_compiling" = yes; then :
+  r_cv_have_pcre832=no
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
 
-r_save_CPPFLAGS="${CPPFLAGS}"
-r_save_LIBS="${LIBS}"
-CPPFLAGS="${CPPFLAGS} ${TCLTK_CPPFLAGS}"
-LIBS="${LIBS} ${TCLTK_LIBS}"
+#ifdef HAVE_PCRE_PCRE_H
+#include <pcre/pcre.h>
+#else
+#ifdef HAVE_PCRE_H
+#include <pcre.h>
+#endif
+#endif
+int main() {
+#if PCRE_MAJOR == 8 && PCRE_MINOR >= 32
+  exit(0);
+#else
+  exit(1);
+#endif
+}
+
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+  r_cv_have_pcre832=yes
+else
+  r_cv_have_pcre832=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $r_cv_have_pcre832" >&5
+$as_echo "$r_cv_have_pcre832" >&6; }
+fi
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether PCRE support suffices" >&5
+$as_echo_n "checking whether PCRE support suffices... " >&6; }
+if test "x${r_cv_have_pcre810}" != xyes; then
+  as_fn_error $? "pcre >= 8.10 library and headers are required" "$LINENO" 5
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+fi
+if test "x${r_cv_have_pcre832}" != xyes; then
+  warn_pcre_version="pcre < 8.32 is deprecated"
+  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ${warn_pcre_version}" >&5
+$as_echo "$as_me: WARNING: ${warn_pcre_version}" >&2;}
+fi
+
+
+## tre headers and libraries.
+if test "x${use_system_tre}" = xyes; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tre_regncompb in -ltre" >&5
+$as_echo_n "checking for tre_regncompb in -ltre... " >&6; }
+if ${ac_cv_lib_tre_tre_regncompb+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-ltre  $LIBS"
 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-#include <tcl.h>
-#include <tk.h>
 
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char tre_regncompb ();
 #ifdef F77_DUMMY_MAIN
 
 #  ifdef __cplusplus
@@ -33478,90 +40806,253 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 int
 main ()
 {
-static char * p1 = (char *) Tcl_Init;
-static char * p2 = (char *) Tk_Init;
-
+return tre_regncompb ();
   ;
   return 0;
 }
 _ACEOF
 if ac_fn_c_try_link "$LINENO"; then :
-  r_cv_tcltk_works=yes
+  ac_cv_lib_tre_tre_regncompb=yes
 else
-  r_cv_tcltk_works=no
+  ac_cv_lib_tre_tre_regncompb=no
 fi
 rm -f core conftest.err conftest.$ac_objext \
     conftest$ac_exeext conftest.$ac_ext
-CPPFLAGS="${r_save_CPPFLAGS}"
-LIBS="${r_save_LIBS}"
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_tre_tre_regncompb" >&5
+$as_echo "$ac_cv_lib_tre_tre_regncompb" >&6; }
+if test "x$ac_cv_lib_tre_tre_regncompb" = xyes; then :
+  have_tre=yes
+else
+  have_tre=no
+fi
 
+  if test "${have_tre}" = yes; then
+    for ac_header in tre/tre.h
+do :
+  ac_fn_c_check_header_mongrel "$LINENO" "tre/tre.h" "ac_cv_header_tre_tre_h" "$ac_includes_default"
+if test "x$ac_cv_header_tre_tre_h" = xyes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_TRE_TRE_H 1
+_ACEOF
+ have_tre=yes
+else
+  have_tre=no
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $r_cv_tcltk_works" >&5
-$as_echo "$r_cv_tcltk_works" >&6; }
 
-    have_tcltk=${r_cv_tcltk_works}
+done
+
   fi
+if test "x${have_tre}" = xyes; then
+
+$as_echo "#define HAVE_TRE 1" >>confdefs.h
+
+  LIBS="-ltre ${LIBS}"
+fi
 else
-  have_tcltk=no
-  ## Just making sure.
-  TCLTK_CPPFLAGS=
-  TCLTK_LIBS=
+  have_tre="no"
+fi
+ if test x${have_tre} != xyes; then
+  BUILD_TRE_TRUE=
+  BUILD_TRE_FALSE='#'
+else
+  BUILD_TRE_TRUE='#'
+  BUILD_TRE_FALSE=
 fi
-if test "${have_tcltk}" = yes; then
 
-$as_echo "#define HAVE_TCLTK 1" >>confdefs.h
 
-  use_tcltk=yes
+
+## libcurl
+## curl-config might not match the installed libcurl,
+## so we allow the user to set CURL_CPPFLAGS, CURL_LIBS
+## and check the version directly rather than by curl-config --checkfor
+# Extract the first word of "curl-config", so it can be a program name with args.
+set dummy curl-config; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_path_CURL_CONFIG+:} false; then :
+  $as_echo_n "(cached) " >&6
 else
-  use_tcltk=no
+  case $CURL_CONFIG in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_CURL_CONFIG="$CURL_CONFIG" # Let the user override the test with a path.
+  ;;
+  *)
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_path_CURL_CONFIG="$as_dir/$ac_word$ac_exec_ext"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+  ;;
+esac
+fi
+CURL_CONFIG=$ac_cv_path_CURL_CONFIG
+if test -n "$CURL_CONFIG"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CURL_CONFIG" >&5
+$as_echo "$CURL_CONFIG" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
 fi
 
 
+if test -n "${CURL_CONFIG}"; then
+  echo "checking libcurl version ..." \
+    `${CURL_CONFIG} --version | sed -e 's,^[^0-9]*,,'`
+  if test -z "${CURL_CPPFLAGS}"; then
+    CURL_CPPFLAGS=`${CURL_CONFIG} --cflags`
+  fi
+  ## This should be correct for a static-only build, user will
+  ## need to override to specify static linking (see config.site)
+  if test -z "${CURL_LIBS}"; then
+    CURL_LIBS=`${CURL_CONFIG} --libs`
+  fi
+fi
+r_save_CPPFLAGS="${CPPFLAGS}"
+CPPFLAGS="${CURL_CPPFLAGS} ${CPPFLAGS}"
+r_save_LIBS="${LIBS}"
+LIBS="${CURL_LIBS} ${LIBS}"
+for ac_header in curl/curl.h
+do :
+  ac_fn_c_check_header_mongrel "$LINENO" "curl/curl.h" "ac_cv_header_curl_curl_h" "$ac_includes_default"
+if test "x$ac_cv_header_curl_curl_h" = xyes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_CURL_CURL_H 1
+_ACEOF
+ have_libcurl=yes
+else
+  have_libcurl=no
+fi
 
+done
 
 
-## BSD networking.
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for BSD networking" >&5
-$as_echo_n "checking for BSD networking... " >&6; }
-if ${r_cv_bsd_networking+:} false; then :
+if test "x${have_libcurl}" = "xyes"; then
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if libcurl is version 7 and >= 7.22.0" >&5
+$as_echo_n "checking if libcurl is version 7 and >= 7.22.0... " >&6; }
+if ${r_cv_have_curl722+:} false; then :
   $as_echo_n "(cached) " >&6
 else
-  if test "${ac_cv_header_netdb_h}" = yes \
-     && test "${ac_cv_header_netinet_in_h}" = yes \
-     && test "${ac_cv_header_sys_socket_h}" = yes \
-     && test "${ac_cv_search_connect}" != no \
-     && test "${ac_cv_search_gethostbyname}" !=  no; then
-  r_cv_bsd_networking=yes
+  if test "$cross_compiling" = yes; then :
+  r_cv_have_curl722=no
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <stdlib.h>
+#include <curl/curl.h>
+int main()
+{
+#ifdef LIBCURL_VERSION_MAJOR
+#if LIBCURL_VERSION_MAJOR > 7
+  exit(1);
+#elif LIBCURL_VERSION_MAJOR == 7 && LIBCURL_VERSION_MINOR >= 22
+  exit(0);
+#else
+  exit(1);
+#endif
+#else
+  exit(1);
+#endif
+}
+
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+  r_cv_have_curl722=yes
 else
-  r_cv_bsd_networking=no
+  r_cv_have_curl722=no
 fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $r_cv_bsd_networking" >&5
-$as_echo "$r_cv_bsd_networking" >&6; }
-if test "${r_cv_bsd_networking}" = yes; then
 
-$as_echo "#define HAVE_BSD_NETWORKING 1" >>confdefs.h
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $r_cv_have_curl722" >&5
+$as_echo "$r_cv_have_curl722" >&6; }
+fi
+if test "x${r_cv_have_curl722}" = xno; then
+  have_libcurl=no
+fi
+
+if test "x${have_libcurl}" = "xyes"; then
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if libcurl supports https" >&5
+$as_echo_n "checking if libcurl supports https... " >&6; }
+if ${r_cv_have_curl_https+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test "$cross_compiling" = yes; then :
+  r_cv_have_curl_https=no
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
 
+#include <string.h>
+#include <curl/curl.h>
+int main()
+{
+    curl_version_info_data *data = curl_version_info(CURLVERSION_NOW);
+    const char * const *p  = data->protocols;
+    int found = 0;
+    for (; *p; p++)
+	if(strcmp(*p, "https") == 0) {found = 1; break;}
+    exit(found ? 0 : 1);
+}
 
-$as_echo "#define HAVE_SOCKETS 1" >>confdefs.h
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+  r_cv_have_curl_https=yes
+else
+  r_cv_have_curl_https=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
 
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $r_cv_have_curl_https" >&5
+$as_echo "$r_cv_have_curl_https" >&6; }
+fi
+if test "x${r_cv_have_curl_https}" = xno; then
+  have_libcurl=no
+fi
+if test "x${have_libcurl}" = xyes; then
 
-$as_echo "#define HAVE_INTERNET 1" >>confdefs.h
+$as_echo "#define HAVE_LIBCURL 1" >>confdefs.h
 
+  CPPFLAGS="${r_save_CPPFLAGS}"
+  LIBS="${r_save_LIBS}"
 
-$as_echo "#define SUPPORT_LIBXML 1" >>confdefs.h
 
+else
+  as_fn_error $? "libcurl >= 7.22.0 library and headers are required with support for https" "$LINENO" 5
 fi
 
 
+
 ## Bitmap headers and libraries.
+if test -n "${PKGCONF}"; then
+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`
+    CPPFLAGS="${CPPFLAGS} ${JPG_CPPFLAGS}"
+  fi
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jpeglib version >= 6b" >&5
 $as_echo_n "checking if jpeglib version >= 6b... " >&6; }
 if ${r_cv_header_jpeglib_h+:} false; then :
@@ -33587,6 +41078,7 @@ fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $r_cv_header_jpeglib_h" >&5
 $as_echo "$r_cv_header_jpeglib_h" >&6; }
 
+  CPPFLAGS=${save_CPPFLAGS}
   have_jpeg=${r_cv_header_jpeglib_h}
   if test "${have_jpeg}" = yes; then
     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jpeg_destroy_compress in -ljpeg" >&5
@@ -33595,70 +41087,17 @@ if ${ac_cv_lib_jpeg_jpeg_destroy_compress+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_check_lib_save_LIBS=$LIBS
-LIBS="-ljpeg ${LIBS} $LIBS"
+LIBS="-ljpeg ${JPG_LIBS} ${LIBS} $LIBS"
 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
 /* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char jpeg_destroy_compress ();
-#ifdef F77_DUMMY_MAIN
-
-#  ifdef __cplusplus
-     extern "C"
-#  endif
-   int F77_DUMMY_MAIN() { return 1; }
-
-#endif
-int
-main ()
-{
-return jpeg_destroy_compress ();
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  ac_cv_lib_jpeg_jpeg_destroy_compress=yes
-else
-  ac_cv_lib_jpeg_jpeg_destroy_compress=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_jpeg_destroy_compress" >&5
-$as_echo "$ac_cv_lib_jpeg_jpeg_destroy_compress" >&6; }
-if test "x$ac_cv_lib_jpeg_jpeg_destroy_compress" = xyes; then :
-  have_jpeg=yes
-else
-  have_jpeg=no
-fi
-
-  fi
-  if test "${have_jpeg}" = yes; then
-    BITMAP_LIBS="-ljpeg"
-
-$as_echo "#define HAVE_JPEG 1" >>confdefs.h
-
-  fi
-fi
-if test "${use_libpng}" = yes; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lz" >&5
-$as_echo_n "checking for main in -lz... " >&6; }
-if ${ac_cv_lib_z_main+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lz  $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char jpeg_destroy_compress ();
 #ifdef F77_DUMMY_MAIN
 
 #  ifdef __cplusplus
@@ -33670,29 +41109,45 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 int
 main ()
 {
-return main ();
+return jpeg_destroy_compress ();
   ;
   return 0;
 }
 _ACEOF
 if ac_fn_c_try_link "$LINENO"; then :
-  ac_cv_lib_z_main=yes
+  ac_cv_lib_jpeg_jpeg_destroy_compress=yes
 else
-  ac_cv_lib_z_main=no
+  ac_cv_lib_jpeg_jpeg_destroy_compress=no
 fi
 rm -f core conftest.err conftest.$ac_objext \
     conftest$ac_exeext conftest.$ac_ext
 LIBS=$ac_check_lib_save_LIBS
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_main" >&5
-$as_echo "$ac_cv_lib_z_main" >&6; }
-if test "x$ac_cv_lib_z_main" = xyes; then :
-  have_png=yes
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_jpeg_destroy_compress" >&5
+$as_echo "$ac_cv_lib_jpeg_jpeg_destroy_compress" >&6; }
+if test "x$ac_cv_lib_jpeg_jpeg_destroy_compress" = xyes; then :
+  have_jpeg=yes
 else
-  have_png=no
+  have_jpeg=no
 fi
 
-  if test "${have_png}" = yes; then
+  fi
+  if test "${have_jpeg}" = yes; then
+    if test -n "${JPG_LIBS}"; then
+      BITMAP_LIBS="${JPG_LIBS}"
+    else
+      BITMAP_LIBS=-ljpeg
+    fi
+
+$as_echo "#define HAVE_JPEG 1" >>confdefs.h
+
+  fi
+fi
+if test "${use_libpng}" = yes; then
+  if "${PKGCONF}" --exists libpng; then
+    save_CPPFLAGS=${CPPFLAGS}
+    PNG_CPPFLAGS=`"${PKGCONF}" --cflags libpng`
+    CPPFLAGS="${CPPFLAGS} ${PNG_CPPFLAGS}"
     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libpng version >= 1.2.7" >&5
 $as_echo_n "checking if libpng version >= 1.2.7... " >&6; }
 if ${r_cv_header_png_h+:} false; then :
@@ -33719,15 +41174,16 @@ fi
 $as_echo "$r_cv_header_png_h" >&6; }
 
     have_png=${r_cv_header_png_h}
-  fi
-  if test "${have_png}" = yes; then
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for png_create_write_struct in -lpng" >&5
+    CPPFLAGS=${save_CPPFLAGS}
+    if test "${have_png}" = yes; then
+      PNG_LIBS=`"${PKGCONF}" --libs libpng`
+      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for png_create_write_struct in -lpng" >&5
 $as_echo_n "checking for png_create_write_struct in -lpng... " >&6; }
 if ${ac_cv_lib_png_png_create_write_struct+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_check_lib_save_LIBS=$LIBS
-LIBS="-lpng -lz ${LIBS} $LIBS"
+LIBS="-lpng ${PNG_LIBS} ${LIBS} $LIBS"
 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
@@ -33771,36 +41227,15 @@ else
   have_png=no
 fi
 
-  fi
-  if test "${have_png}" = yes; then
-    BITMAP_LIBS="${BITMAP_LIBS} -lpng -lz"
-
-$as_echo "#define HAVE_PNG 1" >>confdefs.h
-
-  fi
-fi
-if test "${use_libtiff}" = yes; then
-  for ac_header in tiffio.h
-do :
-  ac_fn_c_check_header_mongrel "$LINENO" "tiffio.h" "ac_cv_header_tiffio_h" "$ac_includes_default"
-if test "x$ac_cv_header_tiffio_h" = xyes; then :
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_TIFFIO_H 1
-_ACEOF
-
-fi
-
-done
-
-  if test "x${ac_cv_header_tiffio_h}" = xyes ; then
-    # may need to resolve jpeg routines
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIFFOpen in -ltiff" >&5
-$as_echo_n "checking for TIFFOpen in -ltiff... " >&6; }
-if ${ac_cv_lib_tiff_TIFFOpen+:} false; then :
+      if test "${have_png}" = no; then
+        PNG_LIBS=`"${PKGCONF}" --static --libs libpng`
+        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for png_create_write_struct in -lpng" >&5
+$as_echo_n "checking for png_create_write_struct in -lpng... " >&6; }
+if ${ac_cv_lib_png_png_create_write_struct+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_check_lib_save_LIBS=$LIBS
-LIBS="-ltiff ${BITMAP_LIBS} $LIBS"
+LIBS="-lpng ${PNG_LIBS} ${LIBS} $LIBS"
 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
@@ -33810,7 +41245,7 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 #ifdef __cplusplus
 extern "C"
 #endif
-char TIFFOpen ();
+char png_create_write_struct ();
 #ifdef F77_DUMMY_MAIN
 
 #  ifdef __cplusplus
@@ -33822,43 +41257,73 @@ char TIFFOpen ();
 int
 main ()
 {
-return TIFFOpen ();
+return png_create_write_struct ();
   ;
   return 0;
 }
 _ACEOF
 if ac_fn_c_try_link "$LINENO"; then :
-  ac_cv_lib_tiff_TIFFOpen=yes
+  ac_cv_lib_png_png_create_write_struct=yes
 else
-  ac_cv_lib_tiff_TIFFOpen=no
+  ac_cv_lib_png_png_create_write_struct=no
 fi
 rm -f core conftest.err conftest.$ac_objext \
     conftest$ac_exeext conftest.$ac_ext
 LIBS=$ac_check_lib_save_LIBS
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_tiff_TIFFOpen" >&5
-$as_echo "$ac_cv_lib_tiff_TIFFOpen" >&6; }
-if test "x$ac_cv_lib_tiff_TIFFOpen" = xyes; then :
-  have_tiff=yes
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_png_png_create_write_struct" >&5
+$as_echo "$ac_cv_lib_png_png_create_write_struct" >&6; }
+if test "x$ac_cv_lib_png_png_create_write_struct" = xyes; then :
+  have_png=yes
 else
-  have_tiff=no
+  have_png=no
 fi
 
-    if test "x${have_tiff}" = xyes; then
+      fi
+    fi
+    if test "${have_png}" = yes; then
+      BITMAP_CPPFLAGS="${BITMAP_CPPFLAGS} ${PNG_CPPFLAGS}"
+      BITMAP_LIBS="${BITMAP_LIBS} ${PNG_LIBS}"
 
-$as_echo "#define HAVE_TIFF 1" >>confdefs.h
+$as_echo "#define HAVE_PNG 1" >>confdefs.h
 
-      BITMAP_LIBS="-ltiff ${BITMAP_LIBS}"
-    else
-      # tiff 4.0.x may need lzma too: SU's static build does
-      unset ac_cv_lib_tiff_TIFFOpen
+    fi
+  fi
+fi
+if test "${use_libtiff}" = yes; then
+  mod=
+  ## pkg-config support was introduced in libtiff 4.0.0
+  ## I guess the module name might change in future, so
+  ## program defensively here.
+  if "${PKGCONF}" --exists libtiff-4; then
+    mod=libtiff-4
+  fi
+  if test -n "${mod}"; then
+    save_CPPFLAGS=${CPPFLAGS}
+    TIF_CPPFLAGS=`"${PKGCONF}" --cflags ${mod}`
+    CPPFLAGS="${CPPFLAGS} ${TIF_CPPFLAGS}"
+    for ac_header in tiffio.h
+do :
+  ac_fn_c_check_header_mongrel "$LINENO" "tiffio.h" "ac_cv_header_tiffio_h" "$ac_includes_default"
+if test "x$ac_cv_header_tiffio_h" = xyes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_TIFFIO_H 1
+_ACEOF
+
+fi
+
+done
+
+    CPPFLAGS=${save_CPPFLAGS}
+    if test "x${ac_cv_header_tiffio_h}" = xyes ; then
+      TIF_LIBS=`"${PKGCONF}" --libs ${mod}`
       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIFFOpen in -ltiff" >&5
 $as_echo_n "checking for TIFFOpen in -ltiff... " >&6; }
 if ${ac_cv_lib_tiff_TIFFOpen+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_check_lib_save_LIBS=$LIBS
-LIBS="-ltiff -llzma ${BITMAP_LIBS} -llzma $LIBS"
+LIBS="-ltiff ${TIF_LIBS} ${BITMAP_LIBS} $LIBS"
 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
@@ -33902,96 +41367,15 @@ else
   have_tiff=no
 fi
 
-      if test "x${have_tiff}" = xyes; then
-
-$as_echo "#define HAVE_TIFF 1" >>confdefs.h
-
-        BITMAP_LIBS="-ltiff -llzma ${BITMAP_LIBS}"
-      else
-        have_tiff=no
-      fi
-    fi
-  fi
-fi
-
-
-
-## XDR headers and library routines.
-ac_fn_c_check_header_mongrel "$LINENO" "rpc/types.h" "ac_cv_header_rpc_types_h" "$ac_includes_default"
-if test "x$ac_cv_header_rpc_types_h" = xyes; then :
-
-fi
-
-
-if test "${ac_cv_header_rpc_types_h}" = yes ; then
-  ac_fn_c_check_header_compile "$LINENO" "rpc/xdr.h" "ac_cv_header_rpc_xdr_h" "#include <rpc/types.h>
-"
-if test "x$ac_cv_header_rpc_xdr_h" = xyes; then :
-
-fi
-
-
-fi
-if test "${ac_cv_header_rpc_types_h}" = yes && \
-   test "${ac_cv_header_rpc_xdr_h}" = yes && \
-   test "${ac_cv_search_xdr_string}" != no ; then
-  r_xdr=yes
-else
-  r_xdr=no
-fi
-TIRPC_CPPFLAGS=
-if test "${r_xdr}" = no ; then
-  ## No RPC headers, so try for TI-RPC headers: need /usr/include/tirpc
-  ## on include path to find /usr/include/tirpc/netconfig.h
-  save_CPPFLAGS=${CPPFLAGS}
-  CPPFLAGS="${CPPFLAGS} -I/usr/include/tirpc"
-  ac_fn_c_check_header_mongrel "$LINENO" "tirpc/rpc/types.h" "ac_cv_header_tirpc_rpc_types_h" "$ac_includes_default"
-if test "x$ac_cv_header_tirpc_rpc_types_h" = xyes; then :
-
-fi
-
-
-  if test "${ac_cv_header_tirpc_rpc_types_h}" = yes ; then
-    ac_fn_c_check_header_compile "$LINENO" "tirpc/rpc/xdr.h" "ac_cv_header_tirpc_rpc_xdr_h" "#include <tirpc/rpc/types.h>
-"
-if test "x$ac_cv_header_tirpc_rpc_xdr_h" = xyes; then :
-
-fi
-
-
-  fi
-  if test "${ac_cv_header_tirpc_rpc_types_h}" = yes && \
-       test "${ac_cv_header_tirpc_rpc_xdr_h}" = yes &&
-       test "${ac_cv_search_xdr_string}" != no ; then
-    TIRPC_CPPFLAGS=-I/usr/include/tirpc
-    r_xdr=yes
-  fi
-  CPPFLAGS="${save_CPPFLAGS}"
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for XDR support" >&5
-$as_echo_n "checking for XDR support... " >&6; }
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${r_xdr}" >&5
-$as_echo "${r_xdr}" >&6; }
- if test "x${r_xdr}" = xno; then
-  BUILD_XDR_TRUE=
-  BUILD_XDR_FALSE='#'
-else
-  BUILD_XDR_TRUE='#'
-  BUILD_XDR_FALSE=
-fi
-
-
-
-
-## zlib headers and libraries.
-if test "x${use_system_zlib}" = xyes; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateInit2_ in -lz" >&5
-$as_echo_n "checking for inflateInit2_ in -lz... " >&6; }
-if ${ac_cv_lib_z_inflateInit2_+:} false; then :
+      if test "x${have_tiff}" = xno; then
+        TIF_LIBS=`"${PKGCONF}" --static --libs ${mod}`
+        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIFFOpen in -ltiff" >&5
+$as_echo_n "checking for TIFFOpen in -ltiff... " >&6; }
+if ${ac_cv_lib_tiff_TIFFOpen+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_check_lib_save_LIBS=$LIBS
-LIBS="-lz  $LIBS"
+LIBS="-ltiff ${TIF_LIBS} ${BITMAP_LIBS} $LIBS"
 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
@@ -34001,7 +41385,7 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 #ifdef __cplusplus
 extern "C"
 #endif
-char inflateInit2_ ();
+char TIFFOpen ();
 #ifdef F77_DUMMY_MAIN
 
 #  ifdef __cplusplus
@@ -34013,152 +41397,80 @@ char inflateInit2_ ();
 int
 main ()
 {
-return inflateInit2_ ();
+return TIFFOpen ();
   ;
   return 0;
 }
 _ACEOF
 if ac_fn_c_try_link "$LINENO"; then :
-  ac_cv_lib_z_inflateInit2_=yes
+  ac_cv_lib_tiff_TIFFOpen=yes
 else
-  ac_cv_lib_z_inflateInit2_=no
+  ac_cv_lib_tiff_TIFFOpen=no
 fi
 rm -f core conftest.err conftest.$ac_objext \
     conftest$ac_exeext conftest.$ac_ext
 LIBS=$ac_check_lib_save_LIBS
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateInit2_" >&5
-$as_echo "$ac_cv_lib_z_inflateInit2_" >&6; }
-if test "x$ac_cv_lib_z_inflateInit2_" = xyes; then :
-  have_zlib=yes
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_tiff_TIFFOpen" >&5
+$as_echo "$ac_cv_lib_tiff_TIFFOpen" >&6; }
+if test "x$ac_cv_lib_tiff_TIFFOpen" = xyes; then :
+  have_tiff=yes
 else
-  have_zlib=no
+  have_tiff=no
 fi
 
-  if test "${have_zlib}" = yes; then
-    ac_fn_c_check_header_mongrel "$LINENO" "zlib.h" "ac_cv_header_zlib_h" "$ac_includes_default"
-if test "x$ac_cv_header_zlib_h" = xyes; then :
-  have_zlib=yes
-else
-  have_zlib=no
-fi
+      fi
+      if test "x${have_tiff}" = xyes; then
 
+$as_echo "#define HAVE_TIFF 1" >>confdefs.h
 
+        BITMAP_LIBS="${TIF_LIBS} ${BITMAP_LIBS}"
+        BITMAP_CPPFLAGS="${BITMAP_CPPFLAGS} ${TIF_CPPFLAGS}"
+      fi
+    fi
   fi
-  if test "${have_zlib}" = yes; then
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if zlib version >= 1.2.5" >&5
-$as_echo_n "checking if zlib version >= 1.2.5... " >&6; }
-if ${r_cv_header_zlib_h+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  if test "$cross_compiling" = yes; then :
-  r_cv_header_zlib_h=no
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-#include <stdlib.h>
-#include <string.h>
-#include <zlib.h>
-int main() {
-#ifdef ZLIB_VERSION
-/* Work around Debian bug: it uses 1.2.3.4 even though there was no such
-   version on the master site zlib.net */
-  exit(strncmp(ZLIB_VERSION, "1.2.5", 5) < 0);
-#else
-  exit(1);
-#endif
-}
-
-_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
-  r_cv_header_zlib_h=yes
-else
-  r_cv_header_zlib_h=no
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
-  conftest.$ac_objext conftest.beam conftest.$ac_ext
 fi
 
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $r_cv_header_zlib_h" >&5
-$as_echo "$r_cv_header_zlib_h" >&6; }
 
-    have_zlib=${r_cv_header_zlib_h}
-  fi
-else
-  have_zlib="no"
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether zlib support needs to be compiled" >&5
-$as_echo_n "checking whether zlib support needs to be compiled... " >&6; }
-if test "${have_zlib}" = yes; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-  LIBS="-lz ${LIBS}"
+
 else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking mmap support for zlib" >&5
-$as_echo_n "checking mmap support for zlib... " >&6; }
-if ${r_cv_zlib_mmap+:} false; then :
+BITMAP_CPPFLAGS=
+BITMAP_LIBS=
+if test "${use_jpeglib}" = yes; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jpeglib version >= 6b" >&5
+$as_echo_n "checking if jpeglib version >= 6b... " >&6; }
+if ${r_cv_header_jpeglib_h+:} false; then :
   $as_echo_n "(cached) " >&6
 else
-  if test "$cross_compiling" = yes; then :
-  r_cv_zlib_mmap=yes
-else
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-
-#include <stdlib.h>
-#include <sys/types.h>
-#include <sys/mman.h>
-#include <sys/stat.h>
-caddr_t hello() {
-  exit(mmap((caddr_t)0, (off_t)0, PROT_READ, MAP_SHARED, 0, (off_t)0));
-}
+#include <jpeglib.h>
+#if (JPEG_LIB_VERSION >= 62)
+  yes
+#endif
 
 _ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
-  r_cv_zlib_mmap=no
-else
-  r_cv_zlib_mmap=yes
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
-  conftest.$ac_objext conftest.beam conftest.$ac_ext
-fi
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $r_cv_zlib_mmap" >&5
-$as_echo "$r_cv_zlib_mmap" >&6; }
-
-fi
- if test "x${have_zlib}" = xno; then
-  BUILD_ZLIB_TRUE=
-  BUILD_ZLIB_FALSE='#'
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "yes" >/dev/null 2>&1; then :
+  r_cv_header_jpeglib_h=yes
 else
-  BUILD_ZLIB_TRUE='#'
-  BUILD_ZLIB_FALSE=
+  r_cv_header_jpeglib_h=no
 fi
+rm -f conftest*
 
- if test "x${have_zlib}" = xno && test "x${r_cv_zlib_mmap}" = xyes; then
-  USE_MMAP_ZLIB_TRUE=
-  USE_MMAP_ZLIB_FALSE='#'
-else
-  USE_MMAP_ZLIB_TRUE='#'
-  USE_MMAP_ZLIB_FALSE=
 fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $r_cv_header_jpeglib_h" >&5
+$as_echo "$r_cv_header_jpeglib_h" >&6; }
 
-
-
-## bzlib headers and libraries.
-if test "x${use_system_bzlib}" = xyes; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BZ2_bzlibVersion in -lbz2" >&5
-$as_echo_n "checking for BZ2_bzlibVersion in -lbz2... " >&6; }
-if ${ac_cv_lib_bz2_BZ2_bzlibVersion+:} false; then :
+  have_jpeg=${r_cv_header_jpeglib_h}
+  if test "${have_jpeg}" = yes; then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jpeg_destroy_compress in -ljpeg" >&5
+$as_echo_n "checking for jpeg_destroy_compress in -ljpeg... " >&6; }
+if ${ac_cv_lib_jpeg_jpeg_destroy_compress+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_check_lib_save_LIBS=$LIBS
-LIBS="-lbz2  $LIBS"
+LIBS="-ljpeg ${LIBS} $LIBS"
 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
@@ -34168,7 +41480,7 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 #ifdef __cplusplus
 extern "C"
 #endif
-char BZ2_bzlibVersion ();
+char jpeg_destroy_compress ();
 #ifdef F77_DUMMY_MAIN
 
 #  ifdef __cplusplus
@@ -34180,138 +41492,48 @@ char BZ2_bzlibVersion ();
 int
 main ()
 {
-return BZ2_bzlibVersion ();
+return jpeg_destroy_compress ();
   ;
   return 0;
 }
 _ACEOF
 if ac_fn_c_try_link "$LINENO"; then :
-  ac_cv_lib_bz2_BZ2_bzlibVersion=yes
+  ac_cv_lib_jpeg_jpeg_destroy_compress=yes
 else
-  ac_cv_lib_bz2_BZ2_bzlibVersion=no
+  ac_cv_lib_jpeg_jpeg_destroy_compress=no
 fi
 rm -f core conftest.err conftest.$ac_objext \
     conftest$ac_exeext conftest.$ac_ext
 LIBS=$ac_check_lib_save_LIBS
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bz2_BZ2_bzlibVersion" >&5
-$as_echo "$ac_cv_lib_bz2_BZ2_bzlibVersion" >&6; }
-if test "x$ac_cv_lib_bz2_BZ2_bzlibVersion" = xyes; then :
-  have_bzlib=yes
-else
-  have_bzlib=no
-fi
-
-  if test "${have_bzlib}" = yes; then
-    for ac_header in bzlib.h
-do :
-  ac_fn_c_check_header_mongrel "$LINENO" "bzlib.h" "ac_cv_header_bzlib_h" "$ac_includes_default"
-if test "x$ac_cv_header_bzlib_h" = xyes; then :
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_BZLIB_H 1
-_ACEOF
- have_bzlib=yes
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_jpeg_destroy_compress" >&5
+$as_echo "$ac_cv_lib_jpeg_jpeg_destroy_compress" >&6; }
+if test "x$ac_cv_lib_jpeg_jpeg_destroy_compress" = xyes; then :
+  have_jpeg=yes
 else
-  have_bzlib=no
+  have_jpeg=no
 fi
 
-done
-
   fi
-else
-  have_bzlib=no
-fi
-if test "x${have_bzlib}" = xyes; then
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if bzip2 version >= 1.0.6" >&5
-$as_echo_n "checking if bzip2 version >= 1.0.6... " >&6; }
-if ${r_cv_have_bzlib+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
-r_save_LIBS="${LIBS}"
-LIBS="-lbz2 ${LIBS}"
-if test "$cross_compiling" = yes; then :
-  r_cv_have_bzlib=no
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-#ifdef HAVE_BZLIB_H
-#include <bzlib.h>
-#endif
-int main() {
-    char *ver = BZ2_bzlibVersion();
-    exit(strcmp(ver, "1.0.6") < 0);
-}
-
-_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
-  r_cv_have_bzlib=yes
-else
-  r_cv_have_bzlib=no
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
-  conftest.$ac_objext conftest.beam conftest.$ac_ext
-fi
+  if test "${have_jpeg}" = yes; then
+    BITMAP_LIBS="-ljpeg"
 
-LIBS="${r_save_LIBS}"
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
+$as_echo "#define HAVE_JPEG 1" >>confdefs.h
 
+  fi
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $r_cv_have_bzlib" >&5
-$as_echo "$r_cv_have_bzlib" >&6; }
-fi
-if test "x${r_cv_have_bzlib}" = xno; then
-  have_bzlib=no
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether bzip2 support needs to be compiled" >&5
-$as_echo_n "checking whether bzip2 support needs to be compiled... " >&6; }
-if test "x${have_bzlib}" = xyes; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-  LIBS="-lbz2 ${LIBS}"
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-fi
- if test "x${have_bzlib}" = xno; then
-  BUILD_BZLIB_TRUE=
-  BUILD_BZLIB_FALSE='#'
-else
-  BUILD_BZLIB_TRUE='#'
-  BUILD_BZLIB_FALSE=
-fi
-
-
-
-## LZMA headers and libraries from xz-utils
-if test "x${use_system_xz}" = xyes; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lzma_version_number in -llzma" >&5
-$as_echo_n "checking for lzma_version_number in -llzma... " >&6; }
-if ${ac_cv_lib_lzma_lzma_version_number+:} false; then :
+if test "${use_libpng}" = yes; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lz" >&5
+$as_echo_n "checking for main in -lz... " >&6; }
+if ${ac_cv_lib_z_main+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_check_lib_save_LIBS=$LIBS
-LIBS="-llzma  $LIBS"
+LIBS="-lz  $LIBS"
 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char lzma_version_number ();
+
 #ifdef F77_DUMMY_MAIN
 
 #  ifdef __cplusplus
@@ -34321,129 +41543,66 @@ char lzma_version_number ();
 
 #endif
 int
-main ()
-{
-return lzma_version_number ();
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  ac_cv_lib_lzma_lzma_version_number=yes
-else
-  ac_cv_lib_lzma_lzma_version_number=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_lzma_lzma_version_number" >&5
-$as_echo "$ac_cv_lib_lzma_lzma_version_number" >&6; }
-if test "x$ac_cv_lib_lzma_lzma_version_number" = xyes; then :
-  have_lzma=yes
-else
-  have_lzma=no
-fi
-
-  if test "${have_lzma}" = yes; then
-    for ac_header in lzma.h
-do :
-  ac_fn_c_check_header_mongrel "$LINENO" "lzma.h" "ac_cv_header_lzma_h" "$ac_includes_default"
-if test "x$ac_cv_header_lzma_h" = xyes; then :
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_LZMA_H 1
-_ACEOF
- have_lzma=yes
-else
-  have_lzma=no
-fi
-
-done
-
-  fi
-if test "x${have_lzma}" = xyes; then
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if lzma version >= 5.0.3" >&5
-$as_echo_n "checking if lzma version >= 5.0.3... " >&6; }
-if ${r_cv_have_lzma+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
-r_save_LIBS="${LIBS}"
-LIBS="-llzma ${LIBS}"
-if test "$cross_compiling" = yes; then :
-  r_cv_have_lzma=no
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-#ifdef HAVE_LZMA_H
-#include <lzma.h>
-#endif
-#include <stdlib.h>
-int main() {
-    unsigned int ver = lzma_version_number();
-    // This is 10000000*major + 10000*minor + 10*revision + [012]
-    // I.e. xyyyzzzs and 5.1.2 would be 50010020
-    exit(ver < 50000030);
+main ()
+{
+return main ();
+  ;
+  return 0;
 }
-
 _ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
-  r_cv_have_lzma=yes
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_z_main=yes
 else
-  r_cv_have_lzma=no
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
-  conftest.$ac_objext conftest.beam conftest.$ac_ext
-fi
-
-LIBS="${r_save_LIBS}"
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
+  ac_cv_lib_z_main=no
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $r_cv_have_lzma" >&5
-$as_echo "$r_cv_have_lzma" >&6; }
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
 fi
-if test "x${r_cv_have_lzma}" = xno; then
-  have_lzma=no
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_main" >&5
+$as_echo "$ac_cv_lib_z_main" >&6; }
+if test "x$ac_cv_lib_z_main" = xyes; then :
+  have_png=yes
+else
+  have_png=no
 fi
-if test "x${have_lzma}" = xyes; then
-
-$as_echo "#define HAVE_LZMA 1" >>confdefs.h
 
-  LIBS="-llzma ${LIBS}"
-fi
+  if test "${have_png}" = yes; then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libpng version >= 1.2.7" >&5
+$as_echo_n "checking if libpng version >= 1.2.7... " >&6; }
+if ${r_cv_header_png_h+:} false; then :
+  $as_echo_n "(cached) " >&6
 else
-  have_lzma="no"
-fi
- if test x${have_lzma} != xyes; then
-  BUILD_XZ_TRUE=
-  BUILD_XZ_FALSE='#'
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <png.h>
+#if (PNG_LIBPNG_VER >= 10207)
+  yes
+#endif
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "yes" >/dev/null 2>&1; then :
+  r_cv_header_png_h=yes
 else
-  BUILD_XZ_TRUE='#'
-  BUILD_XZ_FALSE=
+  r_cv_header_png_h=no
 fi
+rm -f conftest*
 
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $r_cv_header_png_h" >&5
+$as_echo "$r_cv_header_png_h" >&6; }
 
-
-## PCRE headers and libraries.
-if test "x${use_system_pcre}" = xyes; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pcre_fullinfo in -lpcre" >&5
-$as_echo_n "checking for pcre_fullinfo in -lpcre... " >&6; }
-if ${ac_cv_lib_pcre_pcre_fullinfo+:} false; then :
+    have_png=${r_cv_header_png_h}
+  fi
+  if test "${have_png}" = yes; then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for png_create_write_struct in -lpng" >&5
+$as_echo_n "checking for png_create_write_struct in -lpng... " >&6; }
+if ${ac_cv_lib_png_png_create_write_struct+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_check_lib_save_LIBS=$LIBS
-LIBS="-lpcre  $LIBS"
+LIBS="-lpng -lz ${LIBS} $LIBS"
 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
@@ -34453,7 +41612,7 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 #ifdef __cplusplus
 extern "C"
 #endif
-char pcre_fullinfo ();
+char png_create_write_struct ();
 #ifdef F77_DUMMY_MAIN
 
 #  ifdef __cplusplus
@@ -34465,128 +41624,116 @@ char pcre_fullinfo ();
 int
 main ()
 {
-return pcre_fullinfo ();
+return png_create_write_struct ();
   ;
   return 0;
 }
 _ACEOF
 if ac_fn_c_try_link "$LINENO"; then :
-  ac_cv_lib_pcre_pcre_fullinfo=yes
+  ac_cv_lib_png_png_create_write_struct=yes
 else
-  ac_cv_lib_pcre_pcre_fullinfo=no
+  ac_cv_lib_png_png_create_write_struct=no
 fi
 rm -f core conftest.err conftest.$ac_objext \
     conftest$ac_exeext conftest.$ac_ext
 LIBS=$ac_check_lib_save_LIBS
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pcre_pcre_fullinfo" >&5
-$as_echo "$ac_cv_lib_pcre_pcre_fullinfo" >&6; }
-if test "x$ac_cv_lib_pcre_pcre_fullinfo" = xyes; then :
-  have_pcre=yes
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_png_png_create_write_struct" >&5
+$as_echo "$ac_cv_lib_png_png_create_write_struct" >&6; }
+if test "x$ac_cv_lib_png_png_create_write_struct" = xyes; then :
+  have_png=yes
 else
-  have_pcre=no
+  have_png=no
 fi
 
-  if test "${have_pcre}" = yes; then
-    for ac_header in pcre.h pcre/pcre.h
+  fi
+  if test "${have_png}" = yes; then
+    BITMAP_LIBS="${BITMAP_LIBS} -lpng -lz"
+
+$as_echo "#define HAVE_PNG 1" >>confdefs.h
+
+  fi
+fi
+if test "${use_libtiff}" = yes; then
+  for ac_header in tiffio.h
 do :
-  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
-if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
+  ac_fn_c_check_header_mongrel "$LINENO" "tiffio.h" "ac_cv_header_tiffio_h" "$ac_includes_default"
+if test "x$ac_cv_header_tiffio_h" = xyes; then :
   cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+#define HAVE_TIFFIO_H 1
 _ACEOF
 
 fi
 
 done
 
-    if test "${ac_cv_header_pcre_h}" = no \
-	&& test "${ac_cv_header_pcre_pcre_h}" = no; then
-      have_pcre=no
-    fi
-  fi
-else
-  have_pcre=no
-fi
-if test "x${have_pcre}" = xyes; then
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if PCRE version >= 8.10" >&5
-$as_echo_n "checking if PCRE version >= 8.10... " >&6; }
-if ${r_cv_have_pcre810+:} false; then :
+  if test "x${ac_cv_header_tiffio_h}" = xyes ; then
+    # may need to resolve jpeg routines
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIFFOpen in -ltiff" >&5
+$as_echo_n "checking for TIFFOpen in -ltiff... " >&6; }
+if ${ac_cv_lib_tiff_TIFFOpen+:} false; then :
   $as_echo_n "(cached) " >&6
 else
-  if test "$cross_compiling" = yes; then :
-  r_cv_have_pcre810=no
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-ltiff ${BITMAP_LIBS} $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
-#ifdef HAVE_PCRE_PCRE_H
-#include <pcre/pcre.h>
-#else
-#ifdef HAVE_PCRE_H
-#include <pcre.h>
-#endif
-#endif
-int main() {
-#ifdef PCRE_MAJOR
-#if PCRE_MAJOR > 8
-  exit(0);
-#elif PCRE_MAJOR == 8 && PCRE_MINOR >= 10
-  exit(0);
-#else
-  exit(1);
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
 #endif
-#else
-  exit(1);
+char TIFFOpen ();
+#ifdef F77_DUMMY_MAIN
+
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int F77_DUMMY_MAIN() { return 1; }
+
 #endif
+int
+main ()
+{
+return TIFFOpen ();
+  ;
+  return 0;
 }
-
 _ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
-  r_cv_have_pcre810=yes
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_tiff_TIFFOpen=yes
 else
-  r_cv_have_pcre810=no
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
-  conftest.$ac_objext conftest.beam conftest.$ac_ext
-fi
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $r_cv_have_pcre810" >&5
-$as_echo "$r_cv_have_pcre810" >&6; }
-fi
-if test "x${r_cv_have_pcre810}" = xyes; then
-  LIBS="-lpcre ${LIBS}"
+  ac_cv_lib_tiff_TIFFOpen=no
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether PCRE support needs to be compiled" >&5
-$as_echo_n "checking whether PCRE support needs to be compiled... " >&6; }
-if test "x${r_cv_have_pcre810}" = xyes; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
 fi
- if test "x${r_cv_have_pcre810}" != xyes; then
-  BUILD_PCRE_TRUE=
-  BUILD_PCRE_FALSE='#'
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_tiff_TIFFOpen" >&5
+$as_echo "$ac_cv_lib_tiff_TIFFOpen" >&6; }
+if test "x$ac_cv_lib_tiff_TIFFOpen" = xyes; then :
+  have_tiff=yes
 else
-  BUILD_PCRE_TRUE='#'
-  BUILD_PCRE_FALSE=
+  have_tiff=no
 fi
 
+    if test "x${have_tiff}" = xyes; then
 
+$as_echo "#define HAVE_TIFF 1" >>confdefs.h
 
-## tre headers and libraries.
-if test "x${use_system_tre}" = xyes; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tre_regncompb in -ltre" >&5
-$as_echo_n "checking for tre_regncompb in -ltre... " >&6; }
-if ${ac_cv_lib_tre_tre_regncompb+:} false; then :
+      BITMAP_LIBS="-ltiff ${BITMAP_LIBS}"
+    else
+      # tiff 4.0.x may need lzma too: SU's static build does
+      unset ac_cv_lib_tiff_TIFFOpen
+      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIFFOpen in -ltiff" >&5
+$as_echo_n "checking for TIFFOpen in -ltiff... " >&6; }
+if ${ac_cv_lib_tiff_TIFFOpen+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_check_lib_save_LIBS=$LIBS
-LIBS="-ltre  $LIBS"
+LIBS="-ltiff -llzma ${BITMAP_LIBS} -llzma $LIBS"
 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
@@ -34596,7 +41743,7 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 #ifdef __cplusplus
 extern "C"
 #endif
-char tre_regncompb ();
+char TIFFOpen ();
 #ifdef F77_DUMMY_MAIN
 
 #  ifdef __cplusplus
@@ -34608,63 +41755,44 @@ char tre_regncompb ();
 int
 main ()
 {
-return tre_regncompb ();
+return TIFFOpen ();
   ;
   return 0;
 }
 _ACEOF
 if ac_fn_c_try_link "$LINENO"; then :
-  ac_cv_lib_tre_tre_regncompb=yes
+  ac_cv_lib_tiff_TIFFOpen=yes
 else
-  ac_cv_lib_tre_tre_regncompb=no
+  ac_cv_lib_tiff_TIFFOpen=no
 fi
 rm -f core conftest.err conftest.$ac_objext \
     conftest$ac_exeext conftest.$ac_ext
 LIBS=$ac_check_lib_save_LIBS
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_tre_tre_regncompb" >&5
-$as_echo "$ac_cv_lib_tre_tre_regncompb" >&6; }
-if test "x$ac_cv_lib_tre_tre_regncompb" = xyes; then :
-  have_tre=yes
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_tiff_TIFFOpen" >&5
+$as_echo "$ac_cv_lib_tiff_TIFFOpen" >&6; }
+if test "x$ac_cv_lib_tiff_TIFFOpen" = xyes; then :
+  have_tiff=yes
 else
-  have_tre=no
+  have_tiff=no
 fi
 
-  if test "${have_tre}" = yes; then
-    for ac_header in tre/tre.h
-do :
-  ac_fn_c_check_header_mongrel "$LINENO" "tre/tre.h" "ac_cv_header_tre_tre_h" "$ac_includes_default"
-if test "x$ac_cv_header_tre_tre_h" = xyes; then :
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_TRE_TRE_H 1
-_ACEOF
- have_tre=yes
-else
-  have_tre=no
-fi
+      if test "x${have_tiff}" = xyes; then
 
-done
+$as_echo "#define HAVE_TIFF 1" >>confdefs.h
 
+        BITMAP_LIBS="-ltiff -llzma ${BITMAP_LIBS}"
+      else
+        have_tiff=no
+      fi
+    fi
   fi
-if test "x${have_tre}" = xyes; then
-
-$as_echo "#define HAVE_TRE 1" >>confdefs.h
-
-  LIBS="-ltre ${LIBS}"
-fi
-else
-  have_tre="no"
-fi
- if test x${have_tre} != xyes; then
-  BUILD_TRE_TRUE=
-  BUILD_TRE_FALSE='#'
-else
-  BUILD_TRE_TRUE='#'
-  BUILD_TRE_FALSE=
 fi
 
 
 
+fi
+
 ## POSIX times.
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether leap seconds are treated according to POSIX" >&5
 $as_echo_n "checking whether leap seconds are treated according to POSIX... " >&6; }
@@ -35237,20 +42365,27 @@ if test ${valgrind_level} -eq 0; then
 
 $as_echo "#define NVALGRIND 1" >>confdefs.h
 
+elif test "${use_system_valgrind}" = yes; then
+  for ac_header in valgrind/memcheck.h
+do :
+  ac_fn_c_check_header_mongrel "$LINENO" "valgrind/memcheck.h" "ac_cv_header_valgrind_memcheck_h" "$ac_includes_default"
+if test "x$ac_cv_header_valgrind_memcheck_h" = xyes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_VALGRIND_MEMCHECK_H 1
+_ACEOF
+
+fi
+
+done
+
 fi
 
+
 cat >>confdefs.h <<_ACEOF
 #define VALGRIND_LEVEL ${valgrind_level}
 _ACEOF
 
 
-if test x${use_internal_tzcode} = xdefault; then
-case "${host_os}" in
-   darwin*)
-     use_internal_tzcode=yes;
-     ;;
-esac
-fi
 
 if test "x${use_internal_tzcode}" = xyes; then
 
@@ -35332,9 +42467,11 @@ else
 
 #include "confdefs.h"
 #include <stdlib.h>
+/* This might get optimized out if not used */
 extern void * __libc_stack_end;
 
 int main () {
+    if(!__libc_stack_end) exit(1);
     exit(0);
 }
 
@@ -35701,230 +42838,16 @@ ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
 ac_compiler_gnu=$ac_cv_c_compiler_gnu
 
-
-ac_ext=${ac_fc_srcext-f}
+      ac_ext=${ac_fc_srcext-f}
 ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5'
 ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5'
 ac_compiler_gnu=$ac_cv_fc_compiler_gnu
-if test -n "$ac_tool_prefix"; then
-  for ac_prog in gfortran g95 xlf95 f95 fort ifort ifc efc pgfortran pgf95 lf95 ftn nagfor xlf90 f90 pgf90 pghpf epcf90 g77 xlf f77 frt pgf77 cf77 fort77 fl32 af77
-  do
-    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
-set dummy $ac_tool_prefix$ac_prog; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_FC+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  if test -n "$FC"; then
-  ac_cv_prog_FC="$FC" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_exec_ext in '' $ac_executable_extensions; do
-  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-    ac_cv_prog_FC="$ac_tool_prefix$ac_prog"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-  done
-IFS=$as_save_IFS
-
-fi
-fi
-FC=$ac_cv_prog_FC
-if test -n "$FC"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FC" >&5
-$as_echo "$FC" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-    test -n "$FC" && break
-  done
-fi
-if test -z "$FC"; then
-  ac_ct_FC=$FC
-  for ac_prog in gfortran g95 xlf95 f95 fort ifort ifc efc pgfortran pgf95 lf95 ftn nagfor xlf90 f90 pgf90 pghpf epcf90 g77 xlf f77 frt pgf77 cf77 fort77 fl32 af77
-do
-  # Extract the first word of "$ac_prog", so it can be a program name with args.
-set dummy $ac_prog; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_ac_ct_FC+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  if test -n "$ac_ct_FC"; then
-  ac_cv_prog_ac_ct_FC="$ac_ct_FC" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_exec_ext in '' $ac_executable_extensions; do
-  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-    ac_cv_prog_ac_ct_FC="$ac_prog"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-  done
-IFS=$as_save_IFS
-
-fi
-fi
-ac_ct_FC=$ac_cv_prog_ac_ct_FC
-if test -n "$ac_ct_FC"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_FC" >&5
-$as_echo "$ac_ct_FC" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-  test -n "$ac_ct_FC" && break
-done
-
-  if test "x$ac_ct_FC" = x; then
-    FC=""
-  else
-    case $cross_compiling:$ac_tool_warned in
-yes:)
-{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
-ac_tool_warned=yes ;;
-esac
-    FC=$ac_ct_FC
-  fi
-fi
 
 
-# Provide some information about the compiler.
-$as_echo "$as_me:${as_lineno-$LINENO}: checking for Fortran compiler version" >&5
-set X $ac_compile
-ac_compiler=$2
-for ac_option in --version -v -V -qversion; do
-  { { ac_try="$ac_compiler $ac_option >&5"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
-  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
-  ac_status=$?
-  if test -s conftest.err; then
-    sed '10a\
-... rest of stderr output deleted ...
-         10q' conftest.err >conftest.er1
-    cat conftest.er1 >&5
-  fi
-  rm -f conftest.er1 conftest.err
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; }
-done
-rm -f a.out
-
-# If we don't use `.F' as extension, the preprocessor is not run on the
-# input file.  (Note that this only needs to work for GNU compilers.)
-ac_save_ext=$ac_ext
-ac_ext=F
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU Fortran compiler" >&5
-$as_echo_n "checking whether we are using the GNU Fortran compiler... " >&6; }
-if ${ac_cv_fc_compiler_gnu+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  cat > conftest.$ac_ext <<_ACEOF
-      program main
-#ifndef __GNUC__
-       choke me
-#endif
-
-      end
-_ACEOF
-if ac_fn_fc_try_compile "$LINENO"; then :
-  ac_compiler_gnu=yes
-else
-  ac_compiler_gnu=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-ac_cv_fc_compiler_gnu=$ac_compiler_gnu
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_fc_compiler_gnu" >&5
-$as_echo "$ac_cv_fc_compiler_gnu" >&6; }
-ac_ext=$ac_save_ext
-ac_test_FCFLAGS=${FCFLAGS+set}
-ac_save_FCFLAGS=$FCFLAGS
-FCFLAGS=
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $FC accepts -g" >&5
-$as_echo_n "checking whether $FC accepts -g... " >&6; }
-if ${ac_cv_prog_fc_g+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  FCFLAGS=-g
-cat > conftest.$ac_ext <<_ACEOF
-      program main
-
-      end
-_ACEOF
-if ac_fn_fc_try_compile "$LINENO"; then :
-  ac_cv_prog_fc_g=yes
-else
-  ac_cv_prog_fc_g=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_fc_g" >&5
-$as_echo "$ac_cv_prog_fc_g" >&6; }
-if test "$ac_test_FCFLAGS" = set; then
-  FCFLAGS=$ac_save_FCFLAGS
-elif test $ac_cv_prog_fc_g = yes; then
-  if test "x$ac_cv_fc_compiler_gnu" = xyes; then
-    FCFLAGS="-g -O2"
-  else
-    FCFLAGS="-g"
-  fi
-else
-  if test "x$ac_cv_fc_compiler_gnu" = xyes; then
-    FCFLAGS="-O2"
-  else
-    FCFLAGS=
-  fi
-fi
-
-if test $ac_compiler_gnu = yes; then
-  GFC=yes
-else
-  GFC=
-fi
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
-if test -z "$FC" || test "X$FC" = "Xno"; then
+if test -z "$FC" || test no = "$FC"; then
   _lt_disable_FC=yes
 fi
 
-
-
-      ac_ext=${ac_fc_srcext-f}
-ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5'
-ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_fc_compiler_gnu
-
-
 archive_cmds_need_lc_FC=no
 allow_undefined_flag_FC=
 always_export_symbols_FC=no
@@ -35933,7 +42856,6 @@ export_dynamic_flag_spec_FC=
 hardcode_direct_FC=no
 hardcode_direct_absolute_FC=no
 hardcode_libdir_flag_spec_FC=
-hardcode_libdir_flag_spec_ld_FC=
 hardcode_libdir_separator_FC=
 hardcode_minus_L_FC=no
 hardcode_automatic_FC=no
@@ -35942,6 +42864,8 @@ module_cmds_FC=
 module_expsym_cmds_FC=
 link_all_deplibs_FC=unknown
 old_archive_cmds_FC=$old_archive_cmds
+reload_flag_FC=$reload_flag
+reload_cmds_FC=$reload_cmds
 no_undefined_flag_FC=
 whole_archive_flag_spec_FC=
 enable_shared_with_static_runtimes_FC=no
@@ -35957,7 +42881,7 @@ objext_FC=$objext
 # the FC compiler isn't working.  Some variables (like enable_shared)
 # are currently assumed to apply to all compilers on this platform,
 # and will be corrupted by setting them based on a non-working compiler.
-if test "$_lt_disable_FC" != yes; then
+if test yes != "$_lt_disable_FC"; then
   # Code to be used in simple compile tests
   lt_simple_compile_test_code="\
       subroutine t
@@ -36003,22 +42927,17 @@ $RM -r conftest*
 
 
   # Allow CC to be a program name with arguments.
-  lt_save_CC="$CC"
+  lt_save_CC=$CC
   lt_save_GCC=$GCC
+  lt_save_CFLAGS=$CFLAGS
   CC=${FC-"f95"}
+  CFLAGS=$FCFLAGS
   compiler=$CC
   GCC=$ac_cv_fc_compiler_gnu
 
   compiler_FC=$CC
-  for cc_temp in $compiler""; do
-  case $cc_temp in
-    compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
-    distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
-    \-*) ;;
-    *) break;;
-  esac
-done
-cc_basename=`$ECHO "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
+  func_cc_basename $compiler
+cc_basename=$func_cc_basename_result
 
 
   if test -n "$compiler"; then
@@ -36029,21 +42948,25 @@ $as_echo "$can_build_shared" >&6; }
 
     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build shared libraries" >&5
 $as_echo_n "checking whether to build shared libraries... " >&6; }
-    test "$can_build_shared" = "no" && enable_shared=no
+    test no = "$can_build_shared" && enable_shared=no
 
     # On AIX, shared libraries and static libraries use the same namespace, and
     # are all built from PIC.
     case $host_os in
       aix3*)
-        test "$enable_shared" = yes && enable_static=no
+        test yes = "$enable_shared" && enable_static=no
         if test -n "$RANLIB"; then
           archive_cmds="$archive_cmds~\$RANLIB \$lib"
           postinstall_cmds='$RANLIB $lib'
         fi
         ;;
       aix[4-9]*)
-	if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
-	  test "$enable_shared" = yes && enable_static=no
+	if test ia64 != "$host_cpu"; then
+	  case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in
+	  yes,aix,yes) ;;		# shared object as lib.so file only
+	  yes,svr4,*) ;;		# shared object as lib.so archive member only
+	  yes,*) enable_static=no ;;	# shared object in lib.a archive as well
+	  esac
 	fi
         ;;
     esac
@@ -36053,12 +42976,12 @@ $as_echo "$enable_shared" >&6; }
     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build static libraries" >&5
 $as_echo_n "checking whether to build static libraries... " >&6; }
     # Make sure either enable_shared or enable_static is yes.
-    test "$enable_shared" = yes || enable_static=yes
+    test yes = "$enable_shared" || enable_static=yes
     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_static" >&5
 $as_echo "$enable_static" >&6; }
 
-    GCC_FC="$ac_cv_fc_compiler_gnu"
-    LD_FC="$LD"
+    GCC_FC=$ac_cv_fc_compiler_gnu
+    LD_FC=$LD
 
     ## CAVEAT EMPTOR:
     ## There is no encapsulation within the following macros, do not change
@@ -36080,6 +43003,14 @@ cat > conftest.$ac_ext <<_LT_EOF
       end
 _LT_EOF
 
+
+_lt_libdeps_save_CFLAGS=$CFLAGS
+case "$CC $CFLAGS " in #(
+*\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;;
+*\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;;
+*\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;;
+esac
+
 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
@@ -36093,29 +43024,38 @@ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
   pre_test_object_deps_done=no
 
   for p in `eval "$output_verbose_link_cmd"`; do
-    case $p in
+    case $prev$p in
 
     -L* | -R* | -l*)
        # Some compilers place space between "-{L,R}" and the path.
        # Remove the space.
-       if test $p = "-L" ||
-          test $p = "-R"; then
+       if test x-L = "$p" ||
+          test x-R = "$p"; then
 	 prev=$p
 	 continue
-       else
-	 prev=
        fi
 
-       if test "$pre_test_object_deps_done" = no; then
-	 case $p in
-	 -L* | -R*)
+       # Expand the sysroot to ease extracting the directories later.
+       if test -z "$prev"; then
+         case $p in
+         -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;;
+         -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;;
+         -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;;
+         esac
+       fi
+       case $p in
+       =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;;
+       esac
+       if test no = "$pre_test_object_deps_done"; then
+	 case $prev in
+	 -L | -R)
 	   # Internal compiler library paths should come after those
 	   # provided the user.  The postdeps already come after the
 	   # user supplied libs so there is no need to process them.
 	   if test -z "$compiler_lib_search_path_FC"; then
-	     compiler_lib_search_path_FC="${prev}${p}"
+	     compiler_lib_search_path_FC=$prev$p
 	   else
-	     compiler_lib_search_path_FC="${compiler_lib_search_path_FC} ${prev}${p}"
+	     compiler_lib_search_path_FC="${compiler_lib_search_path_FC} $prev$p"
 	   fi
 	   ;;
 	 # The "-l" case would never come before the object being
@@ -36123,13 +43063,15 @@ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
 	 esac
        else
 	 if test -z "$postdeps_FC"; then
-	   postdeps_FC="${prev}${p}"
+	   postdeps_FC=$prev$p
 	 else
-	   postdeps_FC="${postdeps_FC} ${prev}${p}"
+	   postdeps_FC="${postdeps_FC} $prev$p"
 	 fi
        fi
+       prev=
        ;;
 
+    *.lto.$objext) ;; # Ignore GCC LTO objects
     *.$objext)
        # This assumes that the test object file only shows up
        # once in the compiler output.
@@ -36138,15 +43080,15 @@ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
 	 continue
        fi
 
-       if test "$pre_test_object_deps_done" = no; then
+       if test no = "$pre_test_object_deps_done"; then
 	 if test -z "$predep_objects_FC"; then
-	   predep_objects_FC="$p"
+	   predep_objects_FC=$p
 	 else
 	   predep_objects_FC="$predep_objects_FC $p"
 	 fi
        else
 	 if test -z "$postdep_objects_FC"; then
-	   postdep_objects_FC="$p"
+	   postdep_objects_FC=$p
 	 else
 	   postdep_objects_FC="$postdep_objects_FC $p"
 	 fi
@@ -36165,6 +43107,7 @@ else
 fi
 
 $RM -f confest.$objext
+CFLAGS=$_lt_libdeps_save_CFLAGS
 
 # PORTME: override above test on systems where it is broken
 
@@ -36174,7 +43117,7 @@ case " $postdeps_FC " in
 esac
  compiler_lib_search_dirs_FC=
 if test -n "${compiler_lib_search_path_FC}"; then
- compiler_lib_search_dirs_FC=`echo " ${compiler_lib_search_path_FC}" | ${SED} -e 's! -L! !g' -e 's!^ !!'`
+ compiler_lib_search_dirs_FC=`echo " ${compiler_lib_search_path_FC}" | $SED -e 's! -L! !g' -e 's!^ !!'`
 fi
 
 
@@ -36193,20 +43136,19 @@ fi
 lt_prog_compiler_pic_FC=
 lt_prog_compiler_static_FC=
 
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5
-$as_echo_n "checking for $compiler option to produce PIC... " >&6; }
 
-  if test "$GCC" = yes; then
+  if test yes = "$GCC"; then
     lt_prog_compiler_wl_FC='-Wl,'
     lt_prog_compiler_static_FC='-static'
 
     case $host_os in
       aix*)
       # All AIX code is PIC.
-      if test "$host_cpu" = ia64; then
+      if test ia64 = "$host_cpu"; then
 	# AIX 5 now supports IA64 processor
 	lt_prog_compiler_static_FC='-Bstatic'
       fi
+      lt_prog_compiler_pic_FC='-fPIC'
       ;;
 
     amigaos*)
@@ -36217,8 +43159,8 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; }
         ;;
       m68k)
             # FIXME: we need at least 68020 code to build shared libraries, but
-            # adding the `-m68020' flag to GCC prevents building anything better,
-            # like `-m68040'.
+            # adding the '-m68020' flag to GCC prevents building anything better,
+            # like '-m68040'.
             lt_prog_compiler_pic_FC='-m68020 -resident32 -malways-restore-a4'
         ;;
       esac
@@ -36234,6 +43176,11 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; }
       # Although the cygwin gcc ignores -fPIC, still need this for old-style
       # (--disable-auto-import) libraries
       lt_prog_compiler_pic_FC='-DDLL_EXPORT'
+      case $host_os in
+      os2*)
+	lt_prog_compiler_static_FC='$wl-static'
+	;;
+      esac
       ;;
 
     darwin* | rhapsody*)
@@ -36242,6 +43189,12 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; }
       lt_prog_compiler_pic_FC='-fno-common'
       ;;
 
+    haiku*)
+      # PIC is the default for Haiku.
+      # The "-static" flag exists, but is broken.
+      lt_prog_compiler_static_FC=
+      ;;
+
     hpux*)
       # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
       # PA HP-UX.  On IA64 HP-UX, PIC is the default but the pic flag
@@ -36284,12 +43237,21 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; }
       lt_prog_compiler_pic_FC='-fPIC'
       ;;
     esac
+
+    case $cc_basename in
+    nvcc*) # Cuda Compiler Driver 2.2
+      lt_prog_compiler_wl_FC='-Xlinker '
+      if test -n "$lt_prog_compiler_pic_FC"; then
+        lt_prog_compiler_pic_FC="-Xcompiler $lt_prog_compiler_pic_FC"
+      fi
+      ;;
+    esac
   else
     # PORTME Check for flag to pass linker flags through the system compiler.
     case $host_os in
     aix*)
       lt_prog_compiler_wl_FC='-Wl,'
-      if test "$host_cpu" = ia64; then
+      if test ia64 = "$host_cpu"; then
 	# AIX 5 now supports IA64 processor
 	lt_prog_compiler_static_FC='-Bstatic'
       else
@@ -36297,10 +43259,29 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; }
       fi
       ;;
 
+    darwin* | rhapsody*)
+      # PIC is the default on this platform
+      # Common symbols not allowed in MH_DYLIB files
+      lt_prog_compiler_pic_FC='-fno-common'
+      case $cc_basename in
+      nagfor*)
+        # NAG Fortran compiler
+        lt_prog_compiler_wl_FC='-Wl,-Wl,,'
+        lt_prog_compiler_pic_FC='-PIC'
+        lt_prog_compiler_static_FC='-Bstatic'
+        ;;
+      esac
+      ;;
+
     mingw* | cygwin* | pw32* | os2* | cegcc*)
       # This hack is so that the source file can tell whether it is being
       # built for inclusion in a dll (and should export symbols for example).
       lt_prog_compiler_pic_FC='-DDLL_EXPORT'
+      case $host_os in
+      os2*)
+	lt_prog_compiler_static_FC='$wl-static'
+	;;
+      esac
       ;;
 
     hpux9* | hpux10* | hpux11*)
@@ -36316,7 +43297,7 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; }
 	;;
       esac
       # Is there a better lt_prog_compiler_static that works with the bundled CC?
-      lt_prog_compiler_static_FC='${wl}-a ${wl}archive'
+      lt_prog_compiler_static_FC='$wl-a ${wl}archive'
       ;;
 
     irix5* | irix6* | nonstopux*)
@@ -36325,9 +43306,9 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; }
       lt_prog_compiler_static_FC='-non_shared'
       ;;
 
-    linux* | k*bsd*-gnu)
+    linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
       case $cc_basename in
-      # old Intel for x86_64 which still supported -KPIC.
+      # old Intel for x86_64, which still supported -KPIC.
       ecc*)
 	lt_prog_compiler_wl_FC='-Wl,'
 	lt_prog_compiler_pic_FC='-KPIC'
@@ -36346,7 +43327,19 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; }
 	lt_prog_compiler_pic_FC='--shared'
 	lt_prog_compiler_static_FC='--static'
 	;;
-      pgcc* | pgf77* | pgf90* | pgf95*)
+      nagfor*)
+	# NAG Fortran compiler
+	lt_prog_compiler_wl_FC='-Wl,-Wl,,'
+	lt_prog_compiler_pic_FC='-PIC'
+	lt_prog_compiler_static_FC='-Bstatic'
+	;;
+      tcc*)
+	# Fabrice Bellard et al's Tiny C Compiler
+	lt_prog_compiler_wl_FC='-Wl,'
+	lt_prog_compiler_pic_FC='-fPIC'
+	lt_prog_compiler_static_FC='-static'
+	;;
+      pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
         # Portland Group compilers (*not* the Pentium gcc compiler,
 	# which looks to be a dead project)
 	lt_prog_compiler_wl_FC='-Wl,'
@@ -36358,25 +43351,40 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; }
         # All Alpha code is PIC.
         lt_prog_compiler_static_FC='-non_shared'
         ;;
-      xl*)
-	# IBM XL C 8.0/Fortran 10.1 on PPC
+      xl* | bgxl* | bgf* | mpixl*)
+	# IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene
 	lt_prog_compiler_wl_FC='-Wl,'
 	lt_prog_compiler_pic_FC='-qpic'
 	lt_prog_compiler_static_FC='-qstaticlink'
 	;;
       *)
 	case `$CC -V 2>&1 | sed 5q` in
+	*Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [1-7].* | *Sun*Fortran*\ 8.[0-3]*)
+	  # Sun Fortran 8.3 passes all unrecognized flags to the linker
+	  lt_prog_compiler_pic_FC='-KPIC'
+	  lt_prog_compiler_static_FC='-Bstatic'
+	  lt_prog_compiler_wl_FC=''
+	  ;;
+	*Sun\ F* | *Sun*Fortran*)
+	  lt_prog_compiler_pic_FC='-KPIC'
+	  lt_prog_compiler_static_FC='-Bstatic'
+	  lt_prog_compiler_wl_FC='-Qoption ld '
+	  ;;
 	*Sun\ C*)
 	  # Sun C 5.9
 	  lt_prog_compiler_pic_FC='-KPIC'
 	  lt_prog_compiler_static_FC='-Bstatic'
 	  lt_prog_compiler_wl_FC='-Wl,'
 	  ;;
-	*Sun\ F*)
-	  # Sun Fortran 8.3 passes all unrecognized flags to the linker
-	  lt_prog_compiler_pic_FC='-KPIC'
+        *Intel*\ [CF]*Compiler*)
+	  lt_prog_compiler_wl_FC='-Wl,'
+	  lt_prog_compiler_pic_FC='-fPIC'
+	  lt_prog_compiler_static_FC='-static'
+	  ;;
+	*Portland\ Group*)
+	  lt_prog_compiler_wl_FC='-Wl,'
+	  lt_prog_compiler_pic_FC='-fpic'
 	  lt_prog_compiler_static_FC='-Bstatic'
-	  lt_prog_compiler_wl_FC=''
 	  ;;
 	esac
 	;;
@@ -36408,7 +43416,7 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; }
       lt_prog_compiler_pic_FC='-KPIC'
       lt_prog_compiler_static_FC='-Bstatic'
       case $cc_basename in
-      f77* | f90* | f95*)
+      f77* | f90* | f95* | sunf77* | sunf90* | sunf95*)
 	lt_prog_compiler_wl_FC='-Qoption ld ';;
       *)
 	lt_prog_compiler_wl_FC='-Wl,';;
@@ -36428,7 +43436,7 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; }
       ;;
 
     sysv4*MP*)
-      if test -d /usr/nec ;then
+      if test -d /usr/nec; then
 	lt_prog_compiler_pic_FC='-Kconform_pic'
 	lt_prog_compiler_static_FC='-Bstatic'
       fi
@@ -36457,7 +43465,7 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; }
   fi
 
 case $host_os in
-  # For platforms which do not support PIC, -DPIC is meaningless:
+  # For platforms that do not support PIC, -DPIC is meaningless:
   *djgpp*)
     lt_prog_compiler_pic_FC=
     ;;
@@ -36465,10 +43473,17 @@ case $host_os in
     lt_prog_compiler_pic_FC="$lt_prog_compiler_pic_FC"
     ;;
 esac
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_prog_compiler_pic_FC" >&5
-$as_echo "$lt_prog_compiler_pic_FC" >&6; }
-
 
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5
+$as_echo_n "checking for $compiler option to produce PIC... " >&6; }
+if ${lt_cv_prog_compiler_pic_FC+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  lt_cv_prog_compiler_pic_FC=$lt_prog_compiler_pic_FC
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_FC" >&5
+$as_echo "$lt_cv_prog_compiler_pic_FC" >&6; }
+lt_prog_compiler_pic_FC=$lt_cv_prog_compiler_pic_FC
 
 #
 # Check to make sure the PIC flag actually works.
@@ -36482,7 +43497,7 @@ else
   lt_cv_prog_compiler_pic_works_FC=no
    ac_outfile=conftest.$ac_objext
    echo "$lt_simple_compile_test_code" > conftest.$ac_ext
-   lt_compiler_flag="$lt_prog_compiler_pic_FC"
+   lt_compiler_flag="$lt_prog_compiler_pic_FC"  ## exclude from sc_useless_quotes_in_assignment
    # Insert the option either (1) after the last *FLAGS variable, or
    # (2) before a word containing "conftest.", or (3) at the end.
    # Note that $ac_compile itself does not contain backslashes and begins
@@ -36492,15 +43507,15 @@ else
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:36495: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>conftest.err)
    ac_status=$?
    cat conftest.err >&5
-   echo "$as_me:36499: \$? = $ac_status" >&5
+   echo "$as_me:$LINENO: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s "$ac_outfile"; then
      # The compiler can only warn and ignore the option if not recognized
      # So say no if there are warnings other than the usual output.
-     $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
+     $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
      $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
      if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
        lt_cv_prog_compiler_pic_works_FC=yes
@@ -36512,7 +43527,7 @@ fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works_FC" >&5
 $as_echo "$lt_cv_prog_compiler_pic_works_FC" >&6; }
 
-if test x"$lt_cv_prog_compiler_pic_works_FC" = xyes; then
+if test yes = "$lt_cv_prog_compiler_pic_works_FC"; then
     case $lt_prog_compiler_pic_FC in
      "" | " "*) ;;
      *) lt_prog_compiler_pic_FC=" $lt_prog_compiler_pic_FC" ;;
@@ -36526,6 +43541,8 @@ fi
 
 
 
+
+
 #
 # Check to make sure the static flag actually works.
 #
@@ -36536,7 +43553,7 @@ if ${lt_cv_prog_compiler_static_works_FC+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   lt_cv_prog_compiler_static_works_FC=no
-   save_LDFLAGS="$LDFLAGS"
+   save_LDFLAGS=$LDFLAGS
    LDFLAGS="$LDFLAGS $lt_tmp_static_flag"
    echo "$lt_simple_link_test_code" > conftest.$ac_ext
    if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
@@ -36545,7 +43562,7 @@ else
      if test -s conftest.err; then
        # Append any errors to the config.log.
        cat conftest.err 1>&5
-       $ECHO "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp
+       $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
        $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
        if diff conftest.exp conftest.er2 >/dev/null; then
          lt_cv_prog_compiler_static_works_FC=yes
@@ -36555,13 +43572,13 @@ else
      fi
    fi
    $RM -r conftest*
-   LDFLAGS="$save_LDFLAGS"
+   LDFLAGS=$save_LDFLAGS
 
 fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works_FC" >&5
 $as_echo "$lt_cv_prog_compiler_static_works_FC" >&6; }
 
-if test x"$lt_cv_prog_compiler_static_works_FC" = xyes; then
+if test yes = "$lt_cv_prog_compiler_static_works_FC"; then
     :
 else
     lt_prog_compiler_static_FC=
@@ -36591,16 +43608,16 @@ else
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:36594: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>out/conftest.err)
    ac_status=$?
    cat out/conftest.err >&5
-   echo "$as_me:36598: \$? = $ac_status" >&5
+   echo "$as_me:$LINENO: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s out/conftest2.$ac_objext
    then
      # The compiler can only warn and ignore the option if not recognized
      # So say no if there are warnings
-     $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
+     $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
      $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
      if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
        lt_cv_prog_compiler_c_o_FC=yes
@@ -36643,16 +43660,16 @@ else
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:36646: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>out/conftest.err)
    ac_status=$?
    cat out/conftest.err >&5
-   echo "$as_me:36650: \$? = $ac_status" >&5
+   echo "$as_me:$LINENO: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s out/conftest2.$ac_objext
    then
      # The compiler can only warn and ignore the option if not recognized
      # So say no if there are warnings
-     $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
+     $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
      $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
      if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
        lt_cv_prog_compiler_c_o_FC=yes
@@ -36675,8 +43692,8 @@ $as_echo "$lt_cv_prog_compiler_c_o_FC" >&6; }
 
 
 
-hard_links="nottested"
-if test "$lt_cv_prog_compiler_c_o_FC" = no && test "$need_locks" != no; then
+hard_links=nottested
+if test no = "$lt_cv_prog_compiler_c_o_FC" && test no != "$need_locks"; then
   # do not overwrite the value of need_locks provided by the user
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5
 $as_echo_n "checking if we can lock with hard links... " >&6; }
@@ -36688,9 +43705,9 @@ $as_echo_n "checking if we can lock with hard links... " >&6; }
   ln conftest.a conftest.b 2>/dev/null && hard_links=no
   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5
 $as_echo "$hard_links" >&6; }
-  if test "$hard_links" = no; then
-    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5
-$as_echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;}
+  if test no = "$hard_links"; then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&5
+$as_echo "$as_me: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&2;}
     need_locks=warn
   fi
 else
@@ -36715,7 +43732,6 @@ $as_echo_n "checking whether the $compiler linker ($LD) supports shared librarie
   hardcode_direct_FC=no
   hardcode_direct_absolute_FC=no
   hardcode_libdir_flag_spec_FC=
-  hardcode_libdir_flag_spec_ld_FC=
   hardcode_libdir_separator_FC=
   hardcode_minus_L_FC=no
   hardcode_shlibpath_var_FC=unsupported
@@ -36731,9 +43747,9 @@ $as_echo_n "checking whether the $compiler linker ($LD) supports shared librarie
   # included in the symbol list
   include_expsyms_FC=
   # exclude_expsyms can be an extended regexp of symbols to exclude
-  # it will be wrapped by ` (' and `)$', so one must not match beginning or
-  # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
-  # as well as any symbol that contains `d'.
+  # it will be wrapped by ' (' and ')$', so one must not match beginning or
+  # end of line.  Example: 'a|bc|.*d.*' will exclude the symbols 'a' and 'bc',
+  # as well as any symbol that contains 'd'.
   exclude_expsyms_FC='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'
   # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
   # platforms (ab)use it in PIC code, but their linkers get confused if
@@ -36748,7 +43764,7 @@ $as_echo_n "checking whether the $compiler linker ($LD) supports shared librarie
     # FIXME: the MSVC++ port hasn't been tested in a loooong time
     # When not using gcc, we currently assume that we are using
     # Microsoft Visual C++.
-    if test "$GCC" != yes; then
+    if test yes != "$GCC"; then
       with_gnu_ld=no
     fi
     ;;
@@ -36756,30 +43772,57 @@ $as_echo_n "checking whether the $compiler linker ($LD) supports shared librarie
     # we just hope/assume this is gcc and not c89 (= MSVC++)
     with_gnu_ld=yes
     ;;
-  openbsd*)
+  openbsd* | bitrig*)
     with_gnu_ld=no
     ;;
   esac
 
   ld_shlibs_FC=yes
-  if test "$with_gnu_ld" = yes; then
+
+  # On some targets, GNU ld is compatible enough with the native linker
+  # that we're better off using the native interface for both.
+  lt_use_gnu_ld_interface=no
+  if test yes = "$with_gnu_ld"; then
+    case $host_os in
+      aix*)
+	# The AIX port of GNU ld has always aspired to compatibility
+	# with the native linker.  However, as the warning in the GNU ld
+	# block says, versions before 2.19.5* couldn't really create working
+	# shared libraries, regardless of the interface used.
+	case `$LD -v 2>&1` in
+	  *\ \(GNU\ Binutils\)\ 2.19.5*) ;;
+	  *\ \(GNU\ Binutils\)\ 2.[2-9]*) ;;
+	  *\ \(GNU\ Binutils\)\ [3-9]*) ;;
+	  *)
+	    lt_use_gnu_ld_interface=yes
+	    ;;
+	esac
+	;;
+      *)
+	lt_use_gnu_ld_interface=yes
+	;;
+    esac
+  fi
+
+  if test yes = "$lt_use_gnu_ld_interface"; then
     # If archive_cmds runs LD, not CC, wlarc should be empty
-    wlarc='${wl}'
+    wlarc='$wl'
 
     # Set some defaults for GNU ld with shared library support. These
     # are reset later if shared libraries are not supported. Putting them
     # here allows them to be overridden if necessary.
     runpath_var=LD_RUN_PATH
-    hardcode_libdir_flag_spec_FC='${wl}-rpath ${wl}$libdir'
-    export_dynamic_flag_spec_FC='${wl}--export-dynamic'
+    hardcode_libdir_flag_spec_FC='$wl-rpath $wl$libdir'
+    export_dynamic_flag_spec_FC='$wl--export-dynamic'
     # ancient GNU ld didn't support --whole-archive et. al.
     if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
-      whole_archive_flag_spec_FC="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
+      whole_archive_flag_spec_FC=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive'
     else
       whole_archive_flag_spec_FC=
     fi
     supports_anon_versioning=no
-    case `$LD -v 2>&1` in
+    case `$LD -v | $SED -e 's/(^)\+)\s\+//' 2>&1` in
+      *GNU\ gold*) supports_anon_versioning=yes ;;
       *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11
       *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
       *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
@@ -36791,15 +43834,16 @@ $as_echo_n "checking whether the $compiler linker ($LD) supports shared librarie
     case $host_os in
     aix[3-9]*)
       # On AIX/PPC, the GNU linker is very broken
-      if test "$host_cpu" != ia64; then
+      if test ia64 != "$host_cpu"; then
 	ld_shlibs_FC=no
 	cat <<_LT_EOF 1>&2
 
-*** Warning: the GNU linker, at least up to release 2.9.1, is reported
+*** Warning: the GNU linker, at least up to release 2.19, is reported
 *** to be unable to reliably create shared libraries on AIX.
 *** Therefore, libtool is disabling shared libraries support.  If you
-*** really care for shared libraries, you may want to modify your PATH
-*** so that a non-GNU linker is found, and then restart.
+*** really care for shared libraries, you may want to install binutils
+*** 2.20 or above, or modify your PATH so that a non-GNU linker is found.
+*** You will then need to restart the configuration process.
 
 _LT_EOF
       fi
@@ -36809,7 +43853,7 @@ _LT_EOF
       case $host_cpu in
       powerpc)
             # see comment about AmigaOS4 .so support
-            archive_cmds_FC='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+            archive_cmds_FC='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
             archive_expsym_cmds_FC=''
         ;;
       m68k)
@@ -36825,7 +43869,7 @@ _LT_EOF
 	allow_undefined_flag_FC=unsupported
 	# Joseph Beckenbach <jrb3 at best.com> says some releases of gcc
 	# support --undefined.  This deserves some investigation.  FIXME
-	archive_cmds_FC='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+	archive_cmds_FC='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
       else
 	ld_shlibs_FC=no
       fi
@@ -36835,61 +43879,97 @@ _LT_EOF
       # _LT_TAGVAR(hardcode_libdir_flag_spec, FC) is actually meaningless,
       # as there is no search path for DLLs.
       hardcode_libdir_flag_spec_FC='-L$libdir'
+      export_dynamic_flag_spec_FC='$wl--export-all-symbols'
       allow_undefined_flag_FC=unsupported
       always_export_symbols_FC=no
       enable_shared_with_static_runtimes_FC=yes
-      export_symbols_cmds_FC='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols'
+      export_symbols_cmds_FC='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.* //'\'' | sort | uniq > $export_symbols'
+      exclude_expsyms_FC='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'
 
       if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
-        archive_cmds_FC='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
-	# If the export-symbols file already is a .def file (1st line
-	# is EXPORTS), use it as is; otherwise, prepend...
-	archive_expsym_cmds_FC='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
-	  cp $export_symbols $output_objdir/$soname.def;
-	else
-	  echo EXPORTS > $output_objdir/$soname.def;
-	  cat $export_symbols >> $output_objdir/$soname.def;
-	fi~
-	$CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
+        archive_cmds_FC='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
+	# If the export-symbols file already is a .def file, use it as
+	# is; otherwise, prepend EXPORTS...
+	archive_expsym_cmds_FC='if   test DEF = "`$SED -n     -e '\''s/^[	 ]*//'\''     -e '\''/^\(;.*\)*$/d'\''     -e '\''s/^\(EXPORTS\|LIBRARY\)\([	 ].*\)*$/DEF/p'\''     -e q     $export_symbols`" ; then
+          cp $export_symbols $output_objdir/$soname.def;
+        else
+          echo EXPORTS > $output_objdir/$soname.def;
+          cat $export_symbols >> $output_objdir/$soname.def;
+        fi~
+        $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
       else
 	ld_shlibs_FC=no
       fi
       ;;
 
+    haiku*)
+      archive_cmds_FC='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
+      link_all_deplibs_FC=yes
+      ;;
+
+    os2*)
+      hardcode_libdir_flag_spec_FC='-L$libdir'
+      hardcode_minus_L_FC=yes
+      allow_undefined_flag_FC=unsupported
+      shrext_cmds=.dll
+      archive_cmds_FC='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
+	$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
+	$ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
+	$ECHO EXPORTS >> $output_objdir/$libname.def~
+	emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
+	$CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
+	emximp -o $lib $output_objdir/$libname.def'
+      archive_expsym_cmds_FC='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
+	$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
+	$ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
+	$ECHO EXPORTS >> $output_objdir/$libname.def~
+	prefix_cmds="$SED"~
+	if test EXPORTS = "`$SED 1q $export_symbols`"; then
+	  prefix_cmds="$prefix_cmds -e 1d";
+	fi~
+	prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
+	cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
+	$CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
+	emximp -o $lib $output_objdir/$libname.def'
+      old_archive_From_new_cmds_FC='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
+      enable_shared_with_static_runtimes_FC=yes
+      ;;
+
     interix[3-9]*)
       hardcode_direct_FC=no
       hardcode_shlibpath_var_FC=no
-      hardcode_libdir_flag_spec_FC='${wl}-rpath,$libdir'
-      export_dynamic_flag_spec_FC='${wl}-E'
+      hardcode_libdir_flag_spec_FC='$wl-rpath,$libdir'
+      export_dynamic_flag_spec_FC='$wl-E'
       # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
       # Instead, shared libraries are loaded at an image base (0x10000000 by
       # default) and relocated if they conflict, which is a slow very memory
       # consuming and fragmenting process.  To avoid this, we pick a random,
       # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
       # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
-      archive_cmds_FC='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
-      archive_expsym_cmds_FC='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+      archive_cmds_FC='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+      archive_expsym_cmds_FC='sed "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
       ;;
 
-    gnu* | linux* | tpf* | k*bsd*-gnu)
+    gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
       tmp_diet=no
-      if test "$host_os" = linux-dietlibc; then
+      if test linux-dietlibc = "$host_os"; then
 	case $cc_basename in
 	  diet\ *) tmp_diet=yes;;	# linux-dietlibc with static linking (!diet-dyn)
 	esac
       fi
       if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
-	 && test "$tmp_diet" = no
+	 && test no = "$tmp_diet"
       then
-	tmp_addflag=
+	tmp_addflag=' $pic_flag'
 	tmp_sharedflag='-shared'
 	case $cc_basename,$host_cpu in
         pgcc*)				# Portland Group C compiler
-	  whole_archive_flag_spec_FC='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
+	  whole_archive_flag_spec_FC='$wl--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
 	  tmp_addflag=' $pic_flag'
 	  ;;
-	pgf77* | pgf90* | pgf95*)	# Portland Group f77 and f90 compilers
-	  whole_archive_flag_spec_FC='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
+	pgf77* | pgf90* | pgf95* | pgfortran*)
+					# Portland Group f77 and f90 compilers
+	  whole_archive_flag_spec_FC='$wl--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
 	  tmp_addflag=' $pic_flag -Mnomain' ;;
 	ecc*,ia64* | icc*,ia64*)	# Intel C compiler on ia64
 	  tmp_addflag=' -i_dynamic' ;;
@@ -36900,39 +43980,47 @@ _LT_EOF
 	lf95*)				# Lahey Fortran 8.1
 	  whole_archive_flag_spec_FC=
 	  tmp_sharedflag='--shared' ;;
-	xl[cC]*)			# IBM XL C 8.0 on PPC (deal with xlf below)
+        nagfor*)                        # NAGFOR 5.3
+          tmp_sharedflag='-Wl,-shared' ;;
+	xl[cC]* | bgxl[cC]* | mpixl[cC]*) # IBM XL C 8.0 on PPC (deal with xlf below)
 	  tmp_sharedflag='-qmkshrobj'
 	  tmp_addflag= ;;
+	nvcc*)	# Cuda Compiler Driver 2.2
+	  whole_archive_flag_spec_FC='$wl--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
+	  compiler_needs_object_FC=yes
+	  ;;
 	esac
 	case `$CC -V 2>&1 | sed 5q` in
 	*Sun\ C*)			# Sun C 5.9
-	  whole_archive_flag_spec_FC='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
+	  whole_archive_flag_spec_FC='$wl--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
 	  compiler_needs_object_FC=yes
 	  tmp_sharedflag='-G' ;;
 	*Sun\ F*)			# Sun Fortran 8.3
 	  tmp_sharedflag='-G' ;;
 	esac
-	archive_cmds_FC='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+	archive_cmds_FC='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
 
-        if test "x$supports_anon_versioning" = xyes; then
+        if test yes = "$supports_anon_versioning"; then
           archive_expsym_cmds_FC='echo "{ global:" > $output_objdir/$libname.ver~
-	    cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
-	    echo "local: *; };" >> $output_objdir/$libname.ver~
-	    $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
+            cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
+            echo "local: *; };" >> $output_objdir/$libname.ver~
+            $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib'
         fi
 
 	case $cc_basename in
-	xlf*)
+	tcc*)
+	  export_dynamic_flag_spec_FC='-rdynamic'
+	  ;;
+	xlf* | bgf* | bgxlf* | mpixlf*)
 	  # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
 	  whole_archive_flag_spec_FC='--whole-archive$convenience --no-whole-archive'
-	  hardcode_libdir_flag_spec_FC=
-	  hardcode_libdir_flag_spec_ld_FC='-rpath $libdir'
-	  archive_cmds_FC='$LD -shared $libobjs $deplibs $compiler_flags -soname $soname -o $lib'
-	  if test "x$supports_anon_versioning" = xyes; then
+	  hardcode_libdir_flag_spec_FC='$wl-rpath $wl$libdir'
+	  archive_cmds_FC='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib'
+	  if test yes = "$supports_anon_versioning"; then
 	    archive_expsym_cmds_FC='echo "{ global:" > $output_objdir/$libname.ver~
-	      cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
-	      echo "local: *; };" >> $output_objdir/$libname.ver~
-	      $LD -shared $libobjs $deplibs $compiler_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
+              cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
+              echo "local: *; };" >> $output_objdir/$libname.ver~
+              $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
 	  fi
 	  ;;
 	esac
@@ -36946,8 +44034,8 @@ _LT_EOF
 	archive_cmds_FC='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
 	wlarc=
       else
-	archive_cmds_FC='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
-	archive_expsym_cmds_FC='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+	archive_cmds_FC='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
+	archive_expsym_cmds_FC='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
       fi
       ;;
 
@@ -36965,8 +44053,8 @@ _LT_EOF
 
 _LT_EOF
       elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
-	archive_cmds_FC='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
-	archive_expsym_cmds_FC='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+	archive_cmds_FC='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
+	archive_expsym_cmds_FC='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
       else
 	ld_shlibs_FC=no
       fi
@@ -36978,7 +44066,7 @@ _LT_EOF
 	ld_shlibs_FC=no
 	cat <<_LT_EOF 1>&2
 
-*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
+*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 cannot
 *** reliably create shared libraries on SCO systems.  Therefore, libtool
 *** is disabling shared libraries support.  We urge you to upgrade GNU
 *** binutils to release 2.16.91.0.3 or newer.  Another option is to modify
@@ -36993,9 +44081,9 @@ _LT_EOF
 	  # DT_RUNPATH tag from executables and libraries.  But doing so
 	  # requires that you compile everything twice, which is a pain.
 	  if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
-	    hardcode_libdir_flag_spec_FC='${wl}-rpath ${wl}$libdir'
-	    archive_cmds_FC='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
-	    archive_expsym_cmds_FC='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+	    hardcode_libdir_flag_spec_FC='$wl-rpath $wl$libdir'
+	    archive_cmds_FC='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
+	    archive_expsym_cmds_FC='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
 	  else
 	    ld_shlibs_FC=no
 	  fi
@@ -37012,15 +44100,15 @@ _LT_EOF
 
     *)
       if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
-	archive_cmds_FC='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
-	archive_expsym_cmds_FC='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+	archive_cmds_FC='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
+	archive_expsym_cmds_FC='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
       else
 	ld_shlibs_FC=no
       fi
       ;;
     esac
 
-    if test "$ld_shlibs_FC" = no; then
+    if test no = "$ld_shlibs_FC"; then
       runpath_var=
       hardcode_libdir_flag_spec_FC=
       export_dynamic_flag_spec_FC=
@@ -37036,7 +44124,7 @@ _LT_EOF
       # Note: this linker hardcodes the directories in LIBPATH if there
       # are no directories specified by -L.
       hardcode_minus_L_FC=yes
-      if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
+      if test yes = "$GCC" && test -z "$lt_prog_compiler_static"; then
 	# Neither direct hardcoding nor static linking is supported with a
 	# broken collect2.
 	hardcode_direct_FC=unsupported
@@ -37044,32 +44132,57 @@ _LT_EOF
       ;;
 
     aix[4-9]*)
-      if test "$host_cpu" = ia64; then
+      if test ia64 = "$host_cpu"; then
 	# On IA64, the linker does run time linking by default, so we don't
 	# have to do anything special.
 	aix_use_runtimelinking=no
 	exp_sym_flag='-Bexport'
-	no_entry_flag=""
+	no_entry_flag=
       else
 	# If we're using GNU nm, then we don't want the "-C" option.
-	# -C means demangle to AIX nm, but means don't demangle with GNU nm
+	# -C means demangle to GNU nm, but means don't demangle to AIX nm.
+	# Without the "-l" option, or with the "-B" option, AIX nm treats
+	# weak defined symbols like other global defined symbols, whereas
+	# GNU nm marks them as "W".
+	# While the 'weak' keyword is ignored in the Export File, we need
+	# it in the Import File for the 'aix-soname' feature, so we have
+	# to replace the "-B" option with "-P" for AIX nm.
 	if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
-	  export_symbols_cmds_FC='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
+	  export_symbols_cmds_FC='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols'
 	else
-	  export_symbols_cmds_FC='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
+	  export_symbols_cmds_FC='`func_echo_all $NM | $SED -e '\''s/B\([^B]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && (substr(\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols'
 	fi
 	aix_use_runtimelinking=no
 
 	# Test if we are trying to use run time linking or normal
 	# AIX style linking. If -brtl is somewhere in LDFLAGS, we
-	# need to do runtime linking.
+	# have runtime linking enabled, and use it for executables.
+	# For shared libraries, we enable/disable runtime linking
+	# depending on the kind of the shared library created -
+	# when "with_aix_soname,aix_use_runtimelinking" is:
+	# "aix,no"   lib.a(lib.so.V) shared, rtl:no,  for executables
+	# "aix,yes"  lib.so          shared, rtl:yes, for executables
+	#            lib.a           static archive
+	# "both,no"  lib.so.V(shr.o) shared, rtl:yes
+	#            lib.a(lib.so.V) shared, rtl:no,  for executables
+	# "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables
+	#            lib.a(lib.so.V) shared, rtl:no
+	# "svr4,*"   lib.so.V(shr.o) shared, rtl:yes, for executables
+	#            lib.a           static archive
 	case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*)
 	  for ld_flag in $LDFLAGS; do
-	  if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
+	  if (test x-brtl = "x$ld_flag" || test x-Wl,-brtl = "x$ld_flag"); then
 	    aix_use_runtimelinking=yes
 	    break
 	  fi
 	  done
+	  if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then
+	    # With aix-soname=svr4, we create the lib.so.V shared archives only,
+	    # so we don't have lib.a shared libs to link our executables.
+	    # We have to force runtime linking in this case.
+	    aix_use_runtimelinking=yes
+	    LDFLAGS="$LDFLAGS -Wl,-brtl"
+	  fi
 	  ;;
 	esac
 
@@ -37088,13 +44201,21 @@ _LT_EOF
       hardcode_direct_absolute_FC=yes
       hardcode_libdir_separator_FC=':'
       link_all_deplibs_FC=yes
-      file_list_spec_FC='${wl}-f,'
+      file_list_spec_FC='$wl-f,'
+      case $with_aix_soname,$aix_use_runtimelinking in
+      aix,*) ;; # traditional, no import file
+      svr4,* | *,yes) # use import file
+	# The Import File defines what to hardcode.
+	hardcode_direct_FC=no
+	hardcode_direct_absolute_FC=no
+	;;
+      esac
 
-      if test "$GCC" = yes; then
+      if test yes = "$GCC"; then
 	case $host_os in aix4.[012]|aix4.[012].*)
 	# We only want to do this on AIX 4.2 and lower, the check
 	# below for broken collect2 doesn't work under 4.3+
-	  collect2name=`${CC} -print-prog-name=collect2`
+	  collect2name=`$CC -print-prog-name=collect2`
 	  if test -f "$collect2name" &&
 	   strings "$collect2name" | $GREP resolve_lib_name >/dev/null
 	  then
@@ -37113,102 +44234,152 @@ _LT_EOF
 	  ;;
 	esac
 	shared_flag='-shared'
-	if test "$aix_use_runtimelinking" = yes; then
-	  shared_flag="$shared_flag "'${wl}-G'
+	if test yes = "$aix_use_runtimelinking"; then
+	  shared_flag="$shared_flag "'$wl-G'
 	fi
+	# Need to ensure runtime linking is disabled for the traditional
+	# shared library, or the linker may eventually find shared libraries
+	# /with/ Import File - we do not want to mix them.
+	shared_flag_aix='-shared'
+	shared_flag_svr4='-shared $wl-G'
       else
 	# not using gcc
-	if test "$host_cpu" = ia64; then
+	if test ia64 = "$host_cpu"; then
 	# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
 	# chokes on -Wl,-G. The following line is correct:
 	  shared_flag='-G'
 	else
-	  if test "$aix_use_runtimelinking" = yes; then
-	    shared_flag='${wl}-G'
+	  if test yes = "$aix_use_runtimelinking"; then
+	    shared_flag='$wl-G'
 	  else
-	    shared_flag='${wl}-bM:SRE'
+	    shared_flag='$wl-bM:SRE'
 	  fi
+	  shared_flag_aix='$wl-bM:SRE'
+	  shared_flag_svr4='$wl-G'
 	fi
       fi
 
-      export_dynamic_flag_spec_FC='${wl}-bexpall'
+      export_dynamic_flag_spec_FC='$wl-bexpall'
       # It seems that -bexpall does not export symbols beginning with
       # underscore (_), so it is better to generate a list of symbols to export.
       always_export_symbols_FC=yes
-      if test "$aix_use_runtimelinking" = yes; then
+      if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then
 	# Warning - without using the other runtime loading flags (-brtl),
 	# -berok will link without error, but may produce a broken library.
 	allow_undefined_flag_FC='-berok'
         # Determine the default libpath from the value encoded in an
         # empty executable.
-        cat > conftest.$ac_ext <<_ACEOF
+        if test set = "${lt_cv_aix_libpath+set}"; then
+  aix_libpath=$lt_cv_aix_libpath
+else
+  if ${lt_cv_aix_libpath__FC+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat > conftest.$ac_ext <<_ACEOF
       program main
 
       end
 _ACEOF
 if ac_fn_fc_try_link "$LINENO"; then :
 
-lt_aix_libpath_sed='
-    /Import File Strings/,/^$/ {
-	/^0/ {
-	    s/^0  *\(.*\)$/\1/
-	    p
-	}
-    }'
-aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
-# Check for a 64-bit object if we didn't find anything.
-if test -z "$aix_libpath"; then
-  aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
-fi
+  lt_aix_libpath_sed='
+      /Import File Strings/,/^$/ {
+	  /^0/ {
+	      s/^0  *\([^ ]*\) *$/\1/
+	      p
+	  }
+      }'
+  lt_cv_aix_libpath__FC=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+  # Check for a 64-bit object if we didn't find anything.
+  if test -z "$lt_cv_aix_libpath__FC"; then
+    lt_cv_aix_libpath__FC=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+  fi
 fi
 rm -f core conftest.err conftest.$ac_objext \
     conftest$ac_exeext conftest.$ac_ext
-if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+  if test -z "$lt_cv_aix_libpath__FC"; then
+    lt_cv_aix_libpath__FC=/usr/lib:/lib
+  fi
+
+fi
 
-        hardcode_libdir_flag_spec_FC='${wl}-blibpath:$libdir:'"$aix_libpath"
-        archive_expsym_cmds_FC='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
+  aix_libpath=$lt_cv_aix_libpath__FC
+fi
+
+        hardcode_libdir_flag_spec_FC='$wl-blibpath:$libdir:'"$aix_libpath"
+        archive_expsym_cmds_FC='$CC -o $output_objdir/$soname $libobjs $deplibs $wl'$no_entry_flag' $compiler_flags `if test -n "$allow_undefined_flag"; then func_echo_all "$wl$allow_undefined_flag"; else :; fi` $wl'$exp_sym_flag:\$export_symbols' '$shared_flag
       else
-	if test "$host_cpu" = ia64; then
-	  hardcode_libdir_flag_spec_FC='${wl}-R $libdir:/usr/lib:/lib'
+	if test ia64 = "$host_cpu"; then
+	  hardcode_libdir_flag_spec_FC='$wl-R $libdir:/usr/lib:/lib'
 	  allow_undefined_flag_FC="-z nodefs"
-	  archive_expsym_cmds_FC="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
+	  archive_expsym_cmds_FC="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\$wl$no_entry_flag"' $compiler_flags $wl$allow_undefined_flag '"\$wl$exp_sym_flag:\$export_symbols"
 	else
 	 # Determine the default libpath from the value encoded in an
 	 # empty executable.
-	 cat > conftest.$ac_ext <<_ACEOF
+	 if test set = "${lt_cv_aix_libpath+set}"; then
+  aix_libpath=$lt_cv_aix_libpath
+else
+  if ${lt_cv_aix_libpath__FC+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat > conftest.$ac_ext <<_ACEOF
       program main
 
       end
 _ACEOF
 if ac_fn_fc_try_link "$LINENO"; then :
 
-lt_aix_libpath_sed='
-    /Import File Strings/,/^$/ {
-	/^0/ {
-	    s/^0  *\(.*\)$/\1/
-	    p
-	}
-    }'
-aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
-# Check for a 64-bit object if we didn't find anything.
-if test -z "$aix_libpath"; then
-  aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
-fi
+  lt_aix_libpath_sed='
+      /Import File Strings/,/^$/ {
+	  /^0/ {
+	      s/^0  *\([^ ]*\) *$/\1/
+	      p
+	  }
+      }'
+  lt_cv_aix_libpath__FC=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+  # Check for a 64-bit object if we didn't find anything.
+  if test -z "$lt_cv_aix_libpath__FC"; then
+    lt_cv_aix_libpath__FC=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+  fi
 fi
 rm -f core conftest.err conftest.$ac_objext \
     conftest$ac_exeext conftest.$ac_ext
-if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+  if test -z "$lt_cv_aix_libpath__FC"; then
+    lt_cv_aix_libpath__FC=/usr/lib:/lib
+  fi
+
+fi
+
+  aix_libpath=$lt_cv_aix_libpath__FC
+fi
 
-	 hardcode_libdir_flag_spec_FC='${wl}-blibpath:$libdir:'"$aix_libpath"
+	 hardcode_libdir_flag_spec_FC='$wl-blibpath:$libdir:'"$aix_libpath"
 	  # Warning - without using the other run time loading flags,
 	  # -berok will link without error, but may produce a broken library.
-	  no_undefined_flag_FC=' ${wl}-bernotok'
-	  allow_undefined_flag_FC=' ${wl}-berok'
-	  # Exported symbols can be pulled into shared objects from archives
-	  whole_archive_flag_spec_FC='$convenience'
+	  no_undefined_flag_FC=' $wl-bernotok'
+	  allow_undefined_flag_FC=' $wl-berok'
+	  if test yes = "$with_gnu_ld"; then
+	    # We only use this code for GNU lds that support --whole-archive.
+	    whole_archive_flag_spec_FC='$wl--whole-archive$convenience $wl--no-whole-archive'
+	  else
+	    # Exported symbols can be pulled into shared objects from archives
+	    whole_archive_flag_spec_FC='$convenience'
+	  fi
 	  archive_cmds_need_lc_FC=yes
-	  # This is similar to how AIX traditionally builds its shared libraries.
-	  archive_expsym_cmds_FC="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
+	  archive_expsym_cmds_FC='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d'
+	  # -brtl affects multiple linker settings, -berok does not and is overridden later
+	  compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([, ]\\)%-berok\\1%g"`'
+	  if test svr4 != "$with_aix_soname"; then
+	    # This is similar to how AIX traditionally builds its shared libraries.
+	    archive_expsym_cmds_FC="$archive_expsym_cmds_FC"'~$CC '$shared_flag_aix' -o $output_objdir/$realname.d/$soname $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$realname.d/$soname'
+	  fi
+	  if test aix != "$with_aix_soname"; then
+	    archive_expsym_cmds_FC="$archive_expsym_cmds_FC"'~$CC '$shared_flag_svr4' -o $output_objdir/$realname.d/$shared_archive_member_spec.o $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$STRIP -e $output_objdir/$realname.d/$shared_archive_member_spec.o~( func_echo_all "#! $soname($shared_archive_member_spec.o)"; if test shr_64 = "$shared_archive_member_spec"; then func_echo_all "# 64"; else func_echo_all "# 32"; fi; cat $export_symbol [...]
+	  else
+	    # used by -dlpreopen to get the symbols
+	    archive_expsym_cmds_FC="$archive_expsym_cmds_FC"'~$MV  $output_objdir/$realname.d/$soname $output_objdir'
+	  fi
+	  archive_expsym_cmds_FC="$archive_expsym_cmds_FC"'~$RM -r $output_objdir/$realname.d'
 	fi
       fi
       ;;
@@ -37217,7 +44388,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
       case $host_cpu in
       powerpc)
             # see comment about AmigaOS4 .so support
-            archive_cmds_FC='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+            archive_cmds_FC='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
             archive_expsym_cmds_FC=''
         ;;
       m68k)
@@ -37237,20 +44408,65 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
       # Microsoft Visual C++.
       # hardcode_libdir_flag_spec is actually meaningless, as there is
       # no search path for DLLs.
-      hardcode_libdir_flag_spec_FC=' '
-      allow_undefined_flag_FC=unsupported
-      # Tell ltmain to make .lib files, not .a files.
-      libext=lib
-      # Tell ltmain to make .dll files, not .so files.
-      shrext_cmds=".dll"
-      # FIXME: Setting linknames here is a bad hack.
-      archive_cmds_FC='$CC -o $lib $libobjs $compiler_flags `$ECHO "X$deplibs" | $Xsed -e '\''s/ -lc$//'\''` -link -dll~linknames='
-      # The linker will automatically build a .lib file if we build a DLL.
-      old_archive_from_new_cmds_FC='true'
-      # FIXME: Should let the user specify the lib program.
-      old_archive_cmds_FC='lib -OUT:$oldlib$oldobjs$old_deplibs'
-      fix_srcfile_path_FC='`cygpath -w "$srcfile"`'
-      enable_shared_with_static_runtimes_FC=yes
+      case $cc_basename in
+      cl*)
+	# Native MSVC
+	hardcode_libdir_flag_spec_FC=' '
+	allow_undefined_flag_FC=unsupported
+	always_export_symbols_FC=yes
+	file_list_spec_FC='@'
+	# Tell ltmain to make .lib files, not .a files.
+	libext=lib
+	# Tell ltmain to make .dll files, not .so files.
+	shrext_cmds=.dll
+	# FIXME: Setting linknames here is a bad hack.
+	archive_cmds_FC='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames='
+	archive_expsym_cmds_FC='if   test DEF = "`$SED -n     -e '\''s/^[	 ]*//'\''     -e '\''/^\(;.*\)*$/d'\''     -e '\''s/^\(EXPORTS\|LIBRARY\)\([	 ].*\)*$/DEF/p'\''     -e q     $export_symbols`" ; then
+            cp "$export_symbols" "$output_objdir/$soname.def";
+            echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp";
+          else
+            $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp;
+          fi~
+          $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
+          linknames='
+	# The linker will not automatically build a static lib if we build a DLL.
+	# _LT_TAGVAR(old_archive_from_new_cmds, FC)='true'
+	enable_shared_with_static_runtimes_FC=yes
+	exclude_expsyms_FC='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
+	export_symbols_cmds_FC='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1,DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols'
+	# Don't use ranlib
+	old_postinstall_cmds_FC='chmod 644 $oldlib'
+	postlink_cmds_FC='lt_outputfile="@OUTPUT@"~
+          lt_tool_outputfile="@TOOL_OUTPUT@"~
+          case $lt_outputfile in
+            *.exe|*.EXE) ;;
+            *)
+              lt_outputfile=$lt_outputfile.exe
+              lt_tool_outputfile=$lt_tool_outputfile.exe
+              ;;
+          esac~
+          if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then
+            $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
+            $RM "$lt_outputfile.manifest";
+          fi'
+	;;
+      *)
+	# Assume MSVC wrapper
+	hardcode_libdir_flag_spec_FC=' '
+	allow_undefined_flag_FC=unsupported
+	# Tell ltmain to make .lib files, not .a files.
+	libext=lib
+	# Tell ltmain to make .dll files, not .so files.
+	shrext_cmds=.dll
+	# FIXME: Setting linknames here is a bad hack.
+	archive_cmds_FC='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames='
+	# The linker will automatically build a .lib file if we build a DLL.
+	old_archive_from_new_cmds_FC='true'
+	# FIXME: Should let the user specify the lib program.
+	old_archive_cmds_FC='lib -OUT:$oldlib$oldobjs$old_deplibs'
+	enable_shared_with_static_runtimes_FC=yes
+	;;
+      esac
       ;;
 
     darwin* | rhapsody*)
@@ -37260,19 +44476,24 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
   hardcode_direct_FC=no
   hardcode_automatic_FC=yes
   hardcode_shlibpath_var_FC=unsupported
-  whole_archive_flag_spec_FC=''
+  if test yes = "$lt_cv_ld_force_load"; then
+    whole_archive_flag_spec_FC='`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience $wl-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`'
+    compiler_needs_object_FC=yes
+  else
+    whole_archive_flag_spec_FC=''
+  fi
   link_all_deplibs_FC=yes
-  allow_undefined_flag_FC="$_lt_dar_allow_undefined"
+  allow_undefined_flag_FC=$_lt_dar_allow_undefined
   case $cc_basename in
-     ifort*) _lt_dar_can_shared=yes ;;
+     ifort*|nagfor*) _lt_dar_can_shared=yes ;;
      *) _lt_dar_can_shared=$GCC ;;
   esac
-  if test "$_lt_dar_can_shared" = "yes"; then
-    output_verbose_link_cmd=echo
-    archive_cmds_FC="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}"
-    module_cmds_FC="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
-    archive_expsym_cmds_FC="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}"
-    module_expsym_cmds_FC="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}"
+  if test yes = "$_lt_dar_can_shared"; then
+    output_verbose_link_cmd=func_echo_all
+    archive_cmds_FC="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dsymutil"
+    module_cmds_FC="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil"
+    archive_expsym_cmds_FC="sed 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dar_export_syms$_lt_dsymutil"
+    module_expsym_cmds_FC="sed -e 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dar_export_syms$_lt_dsymutil"
 
   else
   ld_shlibs_FC=no
@@ -37286,10 +44507,6 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
       hardcode_shlibpath_var_FC=no
       ;;
 
-    freebsd1*)
-      ld_shlibs_FC=no
-      ;;
-
     # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
     # support.  Future versions do this automatically, but an explicit c++rt0.o
     # does not break anything, and helps significantly (at the cost of a little
@@ -37302,7 +44519,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
       ;;
 
     # Unfortunately, older versions of FreeBSD 2 do not have this feature.
-    freebsd2*)
+    freebsd2.*)
       archive_cmds_FC='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
       hardcode_direct_FC=yes
       hardcode_minus_L_FC=yes
@@ -37311,41 +44528,40 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
 
     # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
     freebsd* | dragonfly*)
-      archive_cmds_FC='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
+      archive_cmds_FC='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
       hardcode_libdir_flag_spec_FC='-R$libdir'
       hardcode_direct_FC=yes
       hardcode_shlibpath_var_FC=no
       ;;
 
     hpux9*)
-      if test "$GCC" = yes; then
-	archive_cmds_FC='$RM $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+      if test yes = "$GCC"; then
+	archive_cmds_FC='$RM $output_objdir/$soname~$CC -shared $pic_flag $wl+b $wl$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib'
       else
-	archive_cmds_FC='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+	archive_cmds_FC='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib'
       fi
-      hardcode_libdir_flag_spec_FC='${wl}+b ${wl}$libdir'
+      hardcode_libdir_flag_spec_FC='$wl+b $wl$libdir'
       hardcode_libdir_separator_FC=:
       hardcode_direct_FC=yes
 
       # hardcode_minus_L: Not really in the search PATH,
       # but as the default location of the library.
       hardcode_minus_L_FC=yes
-      export_dynamic_flag_spec_FC='${wl}-E'
+      export_dynamic_flag_spec_FC='$wl-E'
       ;;
 
     hpux10*)
-      if test "$GCC" = yes -a "$with_gnu_ld" = no; then
-	archive_cmds_FC='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+      if test yes,no = "$GCC,$with_gnu_ld"; then
+	archive_cmds_FC='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
       else
 	archive_cmds_FC='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
       fi
-      if test "$with_gnu_ld" = no; then
-	hardcode_libdir_flag_spec_FC='${wl}+b ${wl}$libdir'
-	hardcode_libdir_flag_spec_ld_FC='+b $libdir'
+      if test no = "$with_gnu_ld"; then
+	hardcode_libdir_flag_spec_FC='$wl+b $wl$libdir'
 	hardcode_libdir_separator_FC=:
 	hardcode_direct_FC=yes
 	hardcode_direct_absolute_FC=yes
-	export_dynamic_flag_spec_FC='${wl}-E'
+	export_dynamic_flag_spec_FC='$wl-E'
 	# hardcode_minus_L: Not really in the search PATH,
 	# but as the default location of the library.
 	hardcode_minus_L_FC=yes
@@ -37353,33 +44569,33 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
       ;;
 
     hpux11*)
-      if test "$GCC" = yes -a "$with_gnu_ld" = no; then
+      if test yes,no = "$GCC,$with_gnu_ld"; then
 	case $host_cpu in
 	hppa*64*)
-	  archive_cmds_FC='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+	  archive_cmds_FC='$CC -shared $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
 	  ;;
 	ia64*)
-	  archive_cmds_FC='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
+	  archive_cmds_FC='$CC -shared $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
 	  ;;
 	*)
-	  archive_cmds_FC='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+	  archive_cmds_FC='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
 	  ;;
 	esac
       else
 	case $host_cpu in
 	hppa*64*)
-	  archive_cmds_FC='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+	  archive_cmds_FC='$CC -b $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
 	  ;;
 	ia64*)
-	  archive_cmds_FC='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
+	  archive_cmds_FC='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
 	  ;;
 	*)
-	  archive_cmds_FC='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+	archive_cmds_FC='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
 	  ;;
 	esac
       fi
-      if test "$with_gnu_ld" = no; then
-	hardcode_libdir_flag_spec_FC='${wl}+b ${wl}$libdir'
+      if test no = "$with_gnu_ld"; then
+	hardcode_libdir_flag_spec_FC='$wl+b $wl$libdir'
 	hardcode_libdir_separator_FC=:
 
 	case $host_cpu in
@@ -37390,7 +44606,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
 	*)
 	  hardcode_direct_FC=yes
 	  hardcode_direct_absolute_FC=yes
-	  export_dynamic_flag_spec_FC='${wl}-E'
+	  export_dynamic_flag_spec_FC='$wl-E'
 
 	  # hardcode_minus_L: Not really in the search PATH,
 	  # but as the default location of the library.
@@ -37401,34 +44617,59 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
       ;;
 
     irix5* | irix6* | nonstopux*)
-      if test "$GCC" = yes; then
-	archive_cmds_FC='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+      if test yes = "$GCC"; then
+	archive_cmds_FC='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib'
 	# Try to use the -exported_symbol ld option, if it does not
 	# work, assume that -exports_file does not work either and
 	# implicitly export all symbols.
-        save_LDFLAGS="$LDFLAGS"
-        LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null"
-        cat > conftest.$ac_ext <<_ACEOF
-int foo(void) {}
+	# This should be the same for all languages, so no per-tag cache variable.
+	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $host_os linker accepts -exported_symbol" >&5
+$as_echo_n "checking whether the $host_os linker accepts -exported_symbol... " >&6; }
+if ${lt_cv_irix_exported_symbol+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  save_LDFLAGS=$LDFLAGS
+	   LDFLAGS="$LDFLAGS -shared $wl-exported_symbol ${wl}foo $wl-update_registry $wl/dev/null"
+	   cat > conftest.$ac_ext <<_ACEOF
+
+      subroutine foo
+      end
 _ACEOF
 if ac_fn_fc_try_link "$LINENO"; then :
-  archive_expsym_cmds_FC='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib'
-
+  lt_cv_irix_exported_symbol=yes
+else
+  lt_cv_irix_exported_symbol=no
 fi
 rm -f core conftest.err conftest.$ac_objext \
     conftest$ac_exeext conftest.$ac_ext
-        LDFLAGS="$save_LDFLAGS"
+           LDFLAGS=$save_LDFLAGS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_irix_exported_symbol" >&5
+$as_echo "$lt_cv_irix_exported_symbol" >&6; }
+	if test yes = "$lt_cv_irix_exported_symbol"; then
+          archive_expsym_cmds_FC='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations $wl-exports_file $wl$export_symbols -o $lib'
+	fi
       else
-	archive_cmds_FC='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
-	archive_expsym_cmds_FC='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib'
+	archive_cmds_FC='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib'
+	archive_expsym_cmds_FC='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -exports_file $export_symbols -o $lib'
       fi
       archive_cmds_need_lc_FC='no'
-      hardcode_libdir_flag_spec_FC='${wl}-rpath ${wl}$libdir'
+      hardcode_libdir_flag_spec_FC='$wl-rpath $wl$libdir'
       hardcode_libdir_separator_FC=:
       inherit_rpath_FC=yes
       link_all_deplibs_FC=yes
       ;;
 
+    linux*)
+      case $cc_basename in
+      tcc*)
+	# Fabrice Bellard et al's Tiny C Compiler
+	ld_shlibs_FC=yes
+	archive_cmds_FC='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
+	;;
+      esac
+      ;;
+
     netbsd*)
       if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
 	archive_cmds_FC='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
@@ -37443,7 +44684,7 @@ rm -f core conftest.err conftest.$ac_objext \
     newsos6)
       archive_cmds_FC='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
       hardcode_direct_FC=yes
-      hardcode_libdir_flag_spec_FC='${wl}-rpath ${wl}$libdir'
+      hardcode_libdir_flag_spec_FC='$wl-rpath $wl$libdir'
       hardcode_libdir_separator_FC=:
       hardcode_shlibpath_var_FC=no
       ;;
@@ -37451,27 +44692,19 @@ rm -f core conftest.err conftest.$ac_objext \
     *nto* | *qnx*)
       ;;
 
-    openbsd*)
+    openbsd* | bitrig*)
       if test -f /usr/libexec/ld.so; then
 	hardcode_direct_FC=yes
 	hardcode_shlibpath_var_FC=no
 	hardcode_direct_absolute_FC=yes
-	if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+	if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
 	  archive_cmds_FC='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
-	  archive_expsym_cmds_FC='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
-	  hardcode_libdir_flag_spec_FC='${wl}-rpath,$libdir'
-	  export_dynamic_flag_spec_FC='${wl}-E'
+	  archive_expsym_cmds_FC='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags $wl-retain-symbols-file,$export_symbols'
+	  hardcode_libdir_flag_spec_FC='$wl-rpath,$libdir'
+	  export_dynamic_flag_spec_FC='$wl-E'
 	else
-	  case $host_os in
-	   openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
-	     archive_cmds_FC='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
-	     hardcode_libdir_flag_spec_FC='-R$libdir'
-	     ;;
-	   *)
-	     archive_cmds_FC='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
-	     hardcode_libdir_flag_spec_FC='${wl}-rpath,$libdir'
-	     ;;
-	  esac
+	  archive_cmds_FC='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
+	  hardcode_libdir_flag_spec_FC='$wl-rpath,$libdir'
 	fi
       else
 	ld_shlibs_FC=no
@@ -37482,33 +44715,53 @@ rm -f core conftest.err conftest.$ac_objext \
       hardcode_libdir_flag_spec_FC='-L$libdir'
       hardcode_minus_L_FC=yes
       allow_undefined_flag_FC=unsupported
-      archive_cmds_FC='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$ECHO DATA >> $output_objdir/$libname.def~$ECHO " SINGLE NONSHARED" >> $output_objdir/$libname.def~$ECHO EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def'
-      old_archive_from_new_cmds_FC='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
+      shrext_cmds=.dll
+      archive_cmds_FC='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
+	$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
+	$ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
+	$ECHO EXPORTS >> $output_objdir/$libname.def~
+	emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
+	$CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
+	emximp -o $lib $output_objdir/$libname.def'
+      archive_expsym_cmds_FC='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
+	$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
+	$ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
+	$ECHO EXPORTS >> $output_objdir/$libname.def~
+	prefix_cmds="$SED"~
+	if test EXPORTS = "`$SED 1q $export_symbols`"; then
+	  prefix_cmds="$prefix_cmds -e 1d";
+	fi~
+	prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
+	cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
+	$CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
+	emximp -o $lib $output_objdir/$libname.def'
+      old_archive_From_new_cmds_FC='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
+      enable_shared_with_static_runtimes_FC=yes
       ;;
 
     osf3*)
-      if test "$GCC" = yes; then
-	allow_undefined_flag_FC=' ${wl}-expect_unresolved ${wl}\*'
-	archive_cmds_FC='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+      if test yes = "$GCC"; then
+	allow_undefined_flag_FC=' $wl-expect_unresolved $wl\*'
+	archive_cmds_FC='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib'
       else
 	allow_undefined_flag_FC=' -expect_unresolved \*'
-	archive_cmds_FC='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
+	archive_cmds_FC='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib'
       fi
       archive_cmds_need_lc_FC='no'
-      hardcode_libdir_flag_spec_FC='${wl}-rpath ${wl}$libdir'
+      hardcode_libdir_flag_spec_FC='$wl-rpath $wl$libdir'
       hardcode_libdir_separator_FC=:
       ;;
 
     osf4* | osf5*)	# as osf3* with the addition of -msym flag
-      if test "$GCC" = yes; then
-	allow_undefined_flag_FC=' ${wl}-expect_unresolved ${wl}\*'
-	archive_cmds_FC='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
-	hardcode_libdir_flag_spec_FC='${wl}-rpath ${wl}$libdir'
+      if test yes = "$GCC"; then
+	allow_undefined_flag_FC=' $wl-expect_unresolved $wl\*'
+	archive_cmds_FC='$CC -shared$allow_undefined_flag $pic_flag $libobjs $deplibs $compiler_flags $wl-msym $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib'
+	hardcode_libdir_flag_spec_FC='$wl-rpath $wl$libdir'
       else
 	allow_undefined_flag_FC=' -expect_unresolved \*'
-	archive_cmds_FC='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
+	archive_cmds_FC='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib'
 	archive_expsym_cmds_FC='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~
-	$CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp'
+          $CC -shared$allow_undefined_flag $wl-input $wl$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib~$RM $lib.exp'
 
 	# Both c and cxx compiler support -rpath directly
 	hardcode_libdir_flag_spec_FC='-rpath $libdir'
@@ -37519,24 +44772,24 @@ rm -f core conftest.err conftest.$ac_objext \
 
     solaris*)
       no_undefined_flag_FC=' -z defs'
-      if test "$GCC" = yes; then
-	wlarc='${wl}'
-	archive_cmds_FC='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+      if test yes = "$GCC"; then
+	wlarc='$wl'
+	archive_cmds_FC='$CC -shared $pic_flag $wl-z ${wl}text $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
 	archive_expsym_cmds_FC='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
-	  $CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
+          $CC -shared $pic_flag $wl-z ${wl}text $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
       else
 	case `$CC -V 2>&1` in
 	*"Compilers 5.0"*)
 	  wlarc=''
-	  archive_cmds_FC='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
+	  archive_cmds_FC='$LD -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $linker_flags'
 	  archive_expsym_cmds_FC='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
-	  $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
+            $LD -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
 	  ;;
 	*)
-	  wlarc='${wl}'
-	  archive_cmds_FC='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags'
+	  wlarc='$wl'
+	  archive_cmds_FC='$CC -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $compiler_flags'
 	  archive_expsym_cmds_FC='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
-	  $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
+            $CC -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
 	  ;;
 	esac
       fi
@@ -37546,11 +44799,11 @@ rm -f core conftest.err conftest.$ac_objext \
       solaris2.[0-5] | solaris2.[0-5].*) ;;
       *)
 	# The compiler driver will combine and reorder linker options,
-	# but understands `-z linker_flag'.  GCC discards it without `$wl',
+	# but understands '-z linker_flag'.  GCC discards it without '$wl',
 	# but is careful enough not to reorder.
 	# Supported since Solaris 2.6 (maybe 2.5.1?)
-	if test "$GCC" = yes; then
-	  whole_archive_flag_spec_FC='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
+	if test yes = "$GCC"; then
+	  whole_archive_flag_spec_FC='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract'
 	else
 	  whole_archive_flag_spec_FC='-z allextract$convenience -z defaultextract'
 	fi
@@ -37560,10 +44813,10 @@ rm -f core conftest.err conftest.$ac_objext \
       ;;
 
     sunos4*)
-      if test "x$host_vendor" = xsequent; then
+      if test sequent = "$host_vendor"; then
 	# Use $CC to link under sequent, because it throws in some extra .o
 	# files that make .init and .fini sections work.
-	archive_cmds_FC='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
+	archive_cmds_FC='$CC -G $wl-h $soname -o $lib $libobjs $deplibs $compiler_flags'
       else
 	archive_cmds_FC='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
       fi
@@ -37612,43 +44865,43 @@ rm -f core conftest.err conftest.$ac_objext \
       ;;
 
     sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*)
-      no_undefined_flag_FC='${wl}-z,text'
+      no_undefined_flag_FC='$wl-z,text'
       archive_cmds_need_lc_FC=no
       hardcode_shlibpath_var_FC=no
       runpath_var='LD_RUN_PATH'
 
-      if test "$GCC" = yes; then
-	archive_cmds_FC='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
-	archive_expsym_cmds_FC='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+      if test yes = "$GCC"; then
+	archive_cmds_FC='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	archive_expsym_cmds_FC='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
       else
-	archive_cmds_FC='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
-	archive_expsym_cmds_FC='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	archive_cmds_FC='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	archive_expsym_cmds_FC='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
       fi
       ;;
 
     sysv5* | sco3.2v5* | sco5v6*)
-      # Note: We can NOT use -z defs as we might desire, because we do not
+      # Note: We CANNOT use -z defs as we might desire, because we do not
       # link with -lc, and that would cause any symbols used from libc to
       # always be unresolved, which means just about no library would
       # ever link correctly.  If we're not using GNU ld we use -z text
       # though, which does catch some bad symbols but isn't as heavy-handed
       # as -z defs.
-      no_undefined_flag_FC='${wl}-z,text'
-      allow_undefined_flag_FC='${wl}-z,nodefs'
+      no_undefined_flag_FC='$wl-z,text'
+      allow_undefined_flag_FC='$wl-z,nodefs'
       archive_cmds_need_lc_FC=no
       hardcode_shlibpath_var_FC=no
-      hardcode_libdir_flag_spec_FC='${wl}-R,$libdir'
+      hardcode_libdir_flag_spec_FC='$wl-R,$libdir'
       hardcode_libdir_separator_FC=':'
       link_all_deplibs_FC=yes
-      export_dynamic_flag_spec_FC='${wl}-Bexport'
+      export_dynamic_flag_spec_FC='$wl-Bexport'
       runpath_var='LD_RUN_PATH'
 
-      if test "$GCC" = yes; then
-	archive_cmds_FC='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
-	archive_expsym_cmds_FC='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+      if test yes = "$GCC"; then
+	archive_cmds_FC='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	archive_expsym_cmds_FC='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
       else
-	archive_cmds_FC='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
-	archive_expsym_cmds_FC='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	archive_cmds_FC='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	archive_expsym_cmds_FC='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
       fi
       ;;
 
@@ -37663,10 +44916,10 @@ rm -f core conftest.err conftest.$ac_objext \
       ;;
     esac
 
-    if test x$host_vendor = xsni; then
+    if test sni = "$host_vendor"; then
       case $host in
       sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
-	export_dynamic_flag_spec_FC='${wl}-Blargedynsym'
+	export_dynamic_flag_spec_FC='$wl-Blargedynsym'
 	;;
       esac
     fi
@@ -37674,7 +44927,7 @@ rm -f core conftest.err conftest.$ac_objext \
 
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs_FC" >&5
 $as_echo "$ld_shlibs_FC" >&6; }
-test "$ld_shlibs_FC" = no && can_build_shared=no
+test no = "$ld_shlibs_FC" && can_build_shared=no
 
 with_gnu_ld_FC=$with_gnu_ld
 
@@ -37691,7 +44944,7 @@ x|xyes)
   # Assume -lc should be added
   archive_cmds_need_lc_FC=yes
 
-  if test "$enable_shared" = yes && test "$GCC" = yes; then
+  if test yes,yes = "$GCC,$enable_shared"; then
     case $archive_cmds_FC in
     *'~'*)
       # FIXME: we may have to deal with multi-command sequences.
@@ -37702,44 +44955,50 @@ x|xyes)
       # to ld, don't add -lc before -lgcc.
       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5
 $as_echo_n "checking whether -lc should be explicitly linked in... " >&6; }
-      $RM conftest*
-      echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+if ${lt_cv_archive_cmds_need_lc_FC+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  $RM conftest*
+	echo "$lt_simple_compile_test_code" > conftest.$ac_ext
 
-      if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
+	if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   test $ac_status = 0; } 2>conftest.err; then
-        soname=conftest
-        lib=conftest
-        libobjs=conftest.$ac_objext
-        deplibs=
-        wl=$lt_prog_compiler_wl_FC
-	pic_flag=$lt_prog_compiler_pic_FC
-        compiler_flags=-v
-        linker_flags=-v
-        verstring=
-        output_objdir=.
-        libname=conftest
-        lt_save_allow_undefined_flag=$allow_undefined_flag_FC
-        allow_undefined_flag_FC=
-        if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds_FC 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5
+	  soname=conftest
+	  lib=conftest
+	  libobjs=conftest.$ac_objext
+	  deplibs=
+	  wl=$lt_prog_compiler_wl_FC
+	  pic_flag=$lt_prog_compiler_pic_FC
+	  compiler_flags=-v
+	  linker_flags=-v
+	  verstring=
+	  output_objdir=.
+	  libname=conftest
+	  lt_save_allow_undefined_flag=$allow_undefined_flag_FC
+	  allow_undefined_flag_FC=
+	  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds_FC 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5
   (eval $archive_cmds_FC 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5
   ac_status=$?
   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   test $ac_status = 0; }
-        then
-	  archive_cmds_need_lc_FC=no
-        else
-	  archive_cmds_need_lc_FC=yes
-        fi
-        allow_undefined_flag_FC=$lt_save_allow_undefined_flag
-      else
-        cat conftest.err 1>&5
-      fi
-      $RM conftest*
-      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $archive_cmds_need_lc_FC" >&5
-$as_echo "$archive_cmds_need_lc_FC" >&6; }
+	  then
+	    lt_cv_archive_cmds_need_lc_FC=no
+	  else
+	    lt_cv_archive_cmds_need_lc_FC=yes
+	  fi
+	  allow_undefined_flag_FC=$lt_save_allow_undefined_flag
+	else
+	  cat conftest.err 1>&5
+	fi
+	$RM conftest*
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc_FC" >&5
+$as_echo "$lt_cv_archive_cmds_need_lc_FC" >&6; }
+      archive_cmds_need_lc_FC=$lt_cv_archive_cmds_need_lc_FC
       ;;
     esac
   fi
@@ -37807,15 +45066,13 @@ esac
 
 
 
-
-
     { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5
 $as_echo_n "checking dynamic linker characteristics... " >&6; }
 
 library_names_spec=
 libname_spec='lib$name'
 soname_spec=
-shrext_cmds=".so"
+shrext_cmds=.so
 postinstall_cmds=
 postuninstall_cmds=
 finish_cmds=
@@ -37832,56 +45089,108 @@ hardcode_into_libs=no
 # flags to be left without arguments
 need_version=unknown
 
+
+
 case $host_os in
 aix3*)
-  version_type=linux
-  library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
+  version_type=linux # correct to gnu/linux during the next big refactor
+  library_names_spec='$libname$release$shared_ext$versuffix $libname.a'
   shlibpath_var=LIBPATH
 
   # AIX 3 has no versioning support, so we append a major version to the name.
-  soname_spec='${libname}${release}${shared_ext}$major'
+  soname_spec='$libname$release$shared_ext$major'
   ;;
 
 aix[4-9]*)
-  version_type=linux
+  version_type=linux # correct to gnu/linux during the next big refactor
   need_lib_prefix=no
   need_version=no
   hardcode_into_libs=yes
-  if test "$host_cpu" = ia64; then
+  if test ia64 = "$host_cpu"; then
     # AIX 5 supports IA64
-    library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
+    library_names_spec='$libname$release$shared_ext$major $libname$release$shared_ext$versuffix $libname$shared_ext'
     shlibpath_var=LD_LIBRARY_PATH
   else
     # With GCC up to 2.95.x, collect2 would create an import file
     # for dependence libraries.  The import file would start with
-    # the line `#! .'.  This would cause the generated library to
-    # depend on `.', always an invalid library.  This was fixed in
+    # the line '#! .'.  This would cause the generated library to
+    # depend on '.', always an invalid library.  This was fixed in
     # development snapshots of GCC prior to 3.0.
     case $host_os in
       aix4 | aix4.[01] | aix4.[01].*)
       if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
 	   echo ' yes '
-	   echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then
+	   echo '#endif'; } | $CC -E - | $GREP yes > /dev/null; then
 	:
       else
 	can_build_shared=no
       fi
       ;;
     esac
-    # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
+    # Using Import Files as archive members, it is possible to support
+    # filename-based versioning of shared library archives on AIX. While
+    # this would work for both with and without runtime linking, it will
+    # prevent static linking of such archives. So we do filename-based
+    # shared library versioning with .so extension only, which is used
+    # when both runtime linking and shared linking is enabled.
+    # Unfortunately, runtime linking may impact performance, so we do
+    # not want this to be the default eventually. Also, we use the
+    # versioned .so libs for executables only if there is the -brtl
+    # linker flag in LDFLAGS as well, or --with-aix-soname=svr4 only.
+    # To allow for filename-based versioning support, we need to create
+    # libNAME.so.V as an archive file, containing:
+    # *) an Import File, referring to the versioned filename of the
+    #    archive as well as the shared archive member, telling the
+    #    bitwidth (32 or 64) of that shared object, and providing the
+    #    list of exported symbols of that shared object, eventually
+    #    decorated with the 'weak' keyword
+    # *) the shared object with the F_LOADONLY flag set, to really avoid
+    #    it being seen by the linker.
+    # At run time we better use the real file rather than another symlink,
+    # but for link time we create the symlink libNAME.so -> libNAME.so.V
+
+    case $with_aix_soname,$aix_use_runtimelinking in
+    # AIX (on Power*) has no versioning support, so currently we cannot hardcode correct
     # soname into executable. Probably we can add versioning support to
     # collect2, so additional links can be useful in future.
-    if test "$aix_use_runtimelinking" = yes; then
+    aix,yes) # traditional libtool
+      dynamic_linker='AIX unversionable lib.so'
       # If using run time linking (on AIX 4.2 or later) use lib<name>.so
       # instead of lib<name>.a to let people know that these are not
       # typical AIX shared libraries.
-      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-    else
+      library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+      ;;
+    aix,no) # traditional AIX only
+      dynamic_linker='AIX lib.a(lib.so.V)'
       # We preserve .a as extension for shared libraries through AIX4.2
       # and later when we are not doing run time linking.
-      library_names_spec='${libname}${release}.a $libname.a'
-      soname_spec='${libname}${release}${shared_ext}$major'
-    fi
+      library_names_spec='$libname$release.a $libname.a'
+      soname_spec='$libname$release$shared_ext$major'
+      ;;
+    svr4,*) # full svr4 only
+      dynamic_linker="AIX lib.so.V($shared_archive_member_spec.o)"
+      library_names_spec='$libname$release$shared_ext$major $libname$shared_ext'
+      # We do not specify a path in Import Files, so LIBPATH fires.
+      shlibpath_overrides_runpath=yes
+      ;;
+    *,yes) # both, prefer svr4
+      dynamic_linker="AIX lib.so.V($shared_archive_member_spec.o), lib.a(lib.so.V)"
+      library_names_spec='$libname$release$shared_ext$major $libname$shared_ext'
+      # unpreferred sharedlib libNAME.a needs extra handling
+      postinstall_cmds='test -n "$linkname" || linkname="$realname"~func_stripname "" ".so" "$linkname"~$install_shared_prog "$dir/$func_stripname_result.$libext" "$destdir/$func_stripname_result.$libext"~test -z "$tstripme" || test -z "$striplib" || $striplib "$destdir/$func_stripname_result.$libext"'
+      postuninstall_cmds='for n in $library_names $old_library; do :; done~func_stripname "" ".so" "$n"~test "$func_stripname_result" = "$n" || func_append rmfiles " $odir/$func_stripname_result.$libext"'
+      # We do not specify a path in Import Files, so LIBPATH fires.
+      shlibpath_overrides_runpath=yes
+      ;;
+    *,no) # both, prefer aix
+      dynamic_linker="AIX lib.a(lib.so.V), lib.so.V($shared_archive_member_spec.o)"
+      library_names_spec='$libname$release.a $libname.a'
+      soname_spec='$libname$release$shared_ext$major'
+      # unpreferred sharedlib libNAME.so.V and symlink libNAME.so need extra handling
+      postinstall_cmds='test -z "$dlname" || $install_shared_prog $dir/$dlname $destdir/$dlname~test -z "$tstripme" || test -z "$striplib" || $striplib $destdir/$dlname~test -n "$linkname" || linkname=$realname~func_stripname "" ".a" "$linkname"~(cd "$destdir" && $LN_S -f $dlname $func_stripname_result.so)'
+      postuninstall_cmds='test -z "$dlname" || func_append rmfiles " $odir/$dlname"~for n in $old_library $library_names; do :; done~func_stripname "" ".a" "$n"~func_append rmfiles " $odir/$func_stripname_result.so"'
+      ;;
+    esac
     shlibpath_var=LIBPATH
   fi
   ;;
@@ -37891,27 +45200,27 @@ amigaos*)
   powerpc)
     # Since July 2007 AmigaOS4 officially supports .so libraries.
     # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
-    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
     ;;
   m68k)
     library_names_spec='$libname.ixlibrary $libname.a'
     # Create ${libname}_ixlibrary.a entries in /sys/libs.
-    finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$ECHO "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
+    finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
     ;;
   esac
   ;;
 
 beos*)
-  library_names_spec='${libname}${shared_ext}'
+  library_names_spec='$libname$shared_ext'
   dynamic_linker="$host_os ld.so"
   shlibpath_var=LIBRARY_PATH
   ;;
 
 bsdi[45]*)
-  version_type=linux
+  version_type=linux # correct to gnu/linux during the next big refactor
   need_version=no
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
+  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+  soname_spec='$libname$release$shared_ext$major'
   finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
   shlibpath_var=LD_LIBRARY_PATH
   sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
@@ -37923,16 +45232,17 @@ bsdi[45]*)
 
 cygwin* | mingw* | pw32* | cegcc*)
   version_type=windows
-  shrext_cmds=".dll"
+  shrext_cmds=.dll
   need_version=no
   need_lib_prefix=no
 
-  case $GCC,$host_os in
-  yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*)
+  case $GCC,$cc_basename in
+  yes,*)
+    # gcc
     library_names_spec='$libname.dll.a'
     # DLL is installed to $(libdir)/../bin by postinstall_cmds
-    postinstall_cmds='base_file=`basename \${file}`~
-      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
+    postinstall_cmds='base_file=`basename \$file`~
+      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~
       dldir=$destdir/`dirname \$dlpath`~
       test -d \$dldir || mkdir -p \$dldir~
       $install_prog $dir/$dlname \$dldir/$dlname~
@@ -37948,37 +45258,83 @@ cygwin* | mingw* | pw32* | cegcc*)
     case $host_os in
     cygwin*)
       # Cygwin DLLs use 'cyg' prefix rather than 'lib'
-      soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
-      sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
+      soname_spec='`echo $libname | sed -e 's/^lib/cyg/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
+
       ;;
     mingw* | cegcc*)
       # MinGW DLLs use traditional 'lib' prefix
-      soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
-      sys_lib_search_path_spec=`$CC -print-search-dirs | $GREP "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
+      soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
+      ;;
+    pw32*)
+      # pw32 DLLs use 'pw' prefix rather than 'lib'
+      library_names_spec='`echo $libname | sed -e 's/^lib/pw/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
+      ;;
+    esac
+    dynamic_linker='Win32 ld.exe'
+    ;;
+
+  *,cl*)
+    # Native MSVC
+    libname_spec='$name'
+    soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
+    library_names_spec='$libname.dll.lib'
+
+    case $build_os in
+    mingw*)
+      sys_lib_search_path_spec=
+      lt_save_ifs=$IFS
+      IFS=';'
+      for lt_path in $LIB
+      do
+        IFS=$lt_save_ifs
+        # Let DOS variable expansion print the short 8.3 style file name.
+        lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"`
+        sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path"
+      done
+      IFS=$lt_save_ifs
+      # Convert to MSYS style.
+      sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'`
+      ;;
+    cygwin*)
+      # Convert to unix form, then to dos form, then back to unix form
+      # but this time dos style (no spaces!) so that the unix form looks
+      # like /cygdrive/c/PROGRA~1:/cygdr...
+      sys_lib_search_path_spec=`cygpath --path --unix "$LIB"`
+      sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null`
+      sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
+      ;;
+    *)
+      sys_lib_search_path_spec=$LIB
       if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then
-        # It is most probably a Windows format PATH printed by
-        # mingw gcc, but we are running on Cygwin. Gcc prints its search
-        # path with ; separators, and with drive letters. We can handle the
-        # drive letters (cygwin fileutils understands them), so leave them,
-        # especially as we might pass files found there to a mingw objdump,
-        # which wouldn't understand a cygwinified path. Ahh.
+        # It is most probably a Windows format PATH.
         sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
       else
-        sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
+        sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
       fi
-      ;;
-    pw32*)
-      # pw32 DLLs use 'pw' prefix rather than 'lib'
-      library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
+      # FIXME: find the short name or the path components, as spaces are
+      # common. (e.g. "Program Files" -> "PROGRA~1")
       ;;
     esac
+
+    # DLL is installed to $(libdir)/../bin by postinstall_cmds
+    postinstall_cmds='base_file=`basename \$file`~
+      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~
+      dldir=$destdir/`dirname \$dlpath`~
+      test -d \$dldir || mkdir -p \$dldir~
+      $install_prog $dir/$dlname \$dldir/$dlname'
+    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
+      dlpath=$dir/\$dldll~
+       $RM \$dlpath'
+    shlibpath_overrides_runpath=yes
+    dynamic_linker='Win32 link.exe'
     ;;
 
   *)
-    library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib'
+    # Assume MSVC wrapper
+    library_names_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext $libname.lib'
+    dynamic_linker='Win32 ld.exe'
     ;;
   esac
-  dynamic_linker='Win32 ld.exe'
   # FIXME: first we should search . and the directory the executable is in
   shlibpath_var=PATH
   ;;
@@ -37988,8 +45344,8 @@ darwin* | rhapsody*)
   version_type=darwin
   need_lib_prefix=no
   need_version=no
-  library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext'
-  soname_spec='${libname}${release}${major}$shared_ext'
+  library_names_spec='$libname$release$major$shared_ext $libname$shared_ext'
+  soname_spec='$libname$release$major$shared_ext'
   shlibpath_overrides_runpath=yes
   shlibpath_var=DYLD_LIBRARY_PATH
   shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
@@ -37998,18 +45354,14 @@ darwin* | rhapsody*)
   ;;
 
 dgux*)
-  version_type=linux
+  version_type=linux # correct to gnu/linux during the next big refactor
   need_lib_prefix=no
   need_version=no
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
-  soname_spec='${libname}${release}${shared_ext}$major'
+  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+  soname_spec='$libname$release$shared_ext$major'
   shlibpath_var=LD_LIBRARY_PATH
   ;;
 
-freebsd1*)
-  dynamic_linker=no
-  ;;
-
 freebsd* | dragonfly*)
   # DragonFly does not have aout.  When/if they implement a new
   # versioning mechanism, adjust this.
@@ -38017,25 +45369,26 @@ freebsd* | dragonfly*)
     objformat=`/usr/bin/objformat`
   else
     case $host_os in
-    freebsd[123]*) objformat=aout ;;
+    freebsd[23].*) objformat=aout ;;
     *) objformat=elf ;;
     esac
   fi
   version_type=freebsd-$objformat
   case $version_type in
     freebsd-elf*)
-      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
+      library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+      soname_spec='$libname$release$shared_ext$major'
       need_version=no
       need_lib_prefix=no
       ;;
     freebsd-*)
-      library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
+      library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
       need_version=yes
       ;;
   esac
   shlibpath_var=LD_LIBRARY_PATH
   case $host_os in
-  freebsd2*)
+  freebsd2.*)
     shlibpath_overrides_runpath=yes
     ;;
   freebsd3.[01]* | freebsdelf3.[01]*)
@@ -38054,13 +45407,16 @@ freebsd* | dragonfly*)
   esac
   ;;
 
-gnu*)
-  version_type=linux
+haiku*)
+  version_type=linux # correct to gnu/linux during the next big refactor
   need_lib_prefix=no
   need_version=no
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
-  shlibpath_var=LD_LIBRARY_PATH
+  dynamic_linker="$host_os runtime_loader"
+  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+  soname_spec='$libname$release$shared_ext$major'
+  shlibpath_var=LIBRARY_PATH
+  shlibpath_overrides_runpath=no
+  sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib'
   hardcode_into_libs=yes
   ;;
 
@@ -38077,14 +45433,15 @@ hpux9* | hpux10* | hpux11*)
     dynamic_linker="$host_os dld.so"
     shlibpath_var=LD_LIBRARY_PATH
     shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
-    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-    soname_spec='${libname}${release}${shared_ext}$major'
-    if test "X$HPUX_IA64_MODE" = X32; then
+    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+    soname_spec='$libname$release$shared_ext$major'
+    if test 32 = "$HPUX_IA64_MODE"; then
       sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
+      sys_lib_dlsearch_path_spec=/usr/lib/hpux32
     else
       sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
+      sys_lib_dlsearch_path_spec=/usr/lib/hpux64
     fi
-    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
     ;;
   hppa*64*)
     shrext_cmds='.sl'
@@ -38092,8 +45449,8 @@ hpux9* | hpux10* | hpux11*)
     dynamic_linker="$host_os dld.sl"
     shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
     shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
-    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-    soname_spec='${libname}${release}${shared_ext}$major'
+    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+    soname_spec='$libname$release$shared_ext$major'
     sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
     sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
     ;;
@@ -38102,20 +45459,22 @@ hpux9* | hpux10* | hpux11*)
     dynamic_linker="$host_os dld.sl"
     shlibpath_var=SHLIB_PATH
     shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
-    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-    soname_spec='${libname}${release}${shared_ext}$major'
+    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+    soname_spec='$libname$release$shared_ext$major'
     ;;
   esac
-  # HP-UX runs *really* slowly unless shared libraries are mode 555.
+  # HP-UX runs *really* slowly unless shared libraries are mode 555, ...
   postinstall_cmds='chmod 555 $lib'
+  # or fails outright, so override atomically:
+  install_override_mode=555
   ;;
 
 interix[3-9]*)
-  version_type=linux
+  version_type=linux # correct to gnu/linux during the next big refactor
   need_lib_prefix=no
   need_version=no
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
+  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+  soname_spec='$libname$release$shared_ext$major'
   dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
   shlibpath_var=LD_LIBRARY_PATH
   shlibpath_overrides_runpath=no
@@ -38126,16 +45485,16 @@ irix5* | irix6* | nonstopux*)
   case $host_os in
     nonstopux*) version_type=nonstopux ;;
     *)
-	if test "$lt_cv_prog_gnu_ld" = yes; then
-		version_type=linux
+	if test yes = "$lt_cv_prog_gnu_ld"; then
+		version_type=linux # correct to gnu/linux during the next big refactor
 	else
 		version_type=irix
 	fi ;;
   esac
   need_lib_prefix=no
   need_version=no
-  soname_spec='${libname}${release}${shared_ext}$major'
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
+  soname_spec='$libname$release$shared_ext$major'
+  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$release$shared_ext $libname$shared_ext'
   case $host_os in
   irix5* | nonstopux*)
     libsuff= shlibsuff=
@@ -38154,8 +45513,8 @@ irix5* | irix6* | nonstopux*)
   esac
   shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
   shlibpath_overrides_runpath=no
-  sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
-  sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
+  sys_lib_search_path_spec="/usr/lib$libsuff /lib$libsuff /usr/local/lib$libsuff"
+  sys_lib_dlsearch_path_spec="/usr/lib$libsuff /lib$libsuff"
   hardcode_into_libs=yes
   ;;
 
@@ -38164,44 +45523,78 @@ linux*oldld* | linux*aout* | linux*coff*)
   dynamic_linker=no
   ;;
 
-# This must be Linux ELF.
-linux* | k*bsd*-gnu)
-  version_type=linux
+linux*android*)
+  version_type=none # Android doesn't support versioned libraries.
   need_lib_prefix=no
   need_version=no
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
+  library_names_spec='$libname$release$shared_ext'
+  soname_spec='$libname$release$shared_ext'
+  finish_cmds=
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=yes
+
+  # This implies no fast_install, which is unacceptable.
+  # Some rework will be needed to allow for fast_install
+  # before this can be enabled.
+  hardcode_into_libs=yes
+
+  dynamic_linker='Android linker'
+  # Don't embed -rpath directories since the linker doesn't support them.
+  hardcode_libdir_flag_spec_FC='-L$libdir'
+  ;;
+
+# This must be glibc/ELF.
+linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
+  version_type=linux # correct to gnu/linux during the next big refactor
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+  soname_spec='$libname$release$shared_ext$major'
   finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
   shlibpath_var=LD_LIBRARY_PATH
   shlibpath_overrides_runpath=no
+
   # Some binutils ld are patched to set DT_RUNPATH
-  save_LDFLAGS=$LDFLAGS
-  save_libdir=$libdir
-  eval "libdir=/foo; wl=\"$lt_prog_compiler_wl_FC\"; \
-       LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec_FC\""
-  cat > conftest.$ac_ext <<_ACEOF
+  if ${lt_cv_shlibpath_overrides_runpath+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  lt_cv_shlibpath_overrides_runpath=no
+    save_LDFLAGS=$LDFLAGS
+    save_libdir=$libdir
+    eval "libdir=/foo; wl=\"$lt_prog_compiler_wl_FC\"; \
+	 LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec_FC\""
+    cat > conftest.$ac_ext <<_ACEOF
       program main
 
       end
 _ACEOF
 if ac_fn_fc_try_link "$LINENO"; then :
   if  ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then :
-  shlibpath_overrides_runpath=yes
+  lt_cv_shlibpath_overrides_runpath=yes
 fi
 fi
 rm -f core conftest.err conftest.$ac_objext \
     conftest$ac_exeext conftest.$ac_ext
-  LDFLAGS=$save_LDFLAGS
-  libdir=$save_libdir
+    LDFLAGS=$save_LDFLAGS
+    libdir=$save_libdir
+
+fi
+
+  shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath
 
   # This implies no fast_install, which is unacceptable.
   # Some rework will be needed to allow for fast_install
   # before this can be enabled.
   hardcode_into_libs=yes
 
-  # Append ld.so.conf contents to the search path
+  # Ideally, we could use ldconfig to report *all* directores which are
+  # searched for libraries, however this is still not possible.  Aside from not
+  # being certain /sbin/ldconfig is available, command
+  # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64,
+  # even though it is searched at run-time.  Try to do the best guess by
+  # appending ld.so.conf contents (and includes) to the search path.
   if test -f /etc/ld.so.conf; then
-    lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[	 ]*hwcap[	 ]/d;s/[:,	]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
+    lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[	 ]*hwcap[	 ]/d;s/[:,	]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '`
     sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
   fi
 
@@ -38219,12 +45612,12 @@ netbsd*)
   need_lib_prefix=no
   need_version=no
   if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
-    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
+    library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
     finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
     dynamic_linker='NetBSD (a.out) ld.so'
   else
-    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
-    soname_spec='${libname}${release}${shared_ext}$major'
+    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+    soname_spec='$libname$release$shared_ext$major'
     dynamic_linker='NetBSD ld.elf_so'
   fi
   shlibpath_var=LD_LIBRARY_PATH
@@ -38233,8 +45626,8 @@ netbsd*)
   ;;
 
 newsos6)
-  version_type=linux
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  version_type=linux # correct to gnu/linux during the next big refactor
+  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
   shlibpath_var=LD_LIBRARY_PATH
   shlibpath_overrides_runpath=yes
   ;;
@@ -38243,58 +45636,68 @@ newsos6)
   version_type=qnx
   need_lib_prefix=no
   need_version=no
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
+  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+  soname_spec='$libname$release$shared_ext$major'
   shlibpath_var=LD_LIBRARY_PATH
   shlibpath_overrides_runpath=no
   hardcode_into_libs=yes
   dynamic_linker='ldqnx.so'
   ;;
 
-openbsd*)
+openbsd* | bitrig*)
   version_type=sunos
-  sys_lib_dlsearch_path_spec="/usr/lib"
+  sys_lib_dlsearch_path_spec=/usr/lib
   need_lib_prefix=no
-  # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
-  case $host_os in
-    openbsd3.3 | openbsd3.3.*)	need_version=yes ;;
-    *)				need_version=no  ;;
-  esac
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
-  finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
-  shlibpath_var=LD_LIBRARY_PATH
-  if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
-    case $host_os in
-      openbsd2.[89] | openbsd2.[89].*)
-	shlibpath_overrides_runpath=no
-	;;
-      *)
-	shlibpath_overrides_runpath=yes
-	;;
-      esac
+  if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
+    need_version=no
   else
-    shlibpath_overrides_runpath=yes
+    need_version=yes
   fi
+  library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
+  finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=yes
   ;;
 
 os2*)
   libname_spec='$name'
-  shrext_cmds=".dll"
+  version_type=windows
+  shrext_cmds=.dll
+  need_version=no
   need_lib_prefix=no
-  library_names_spec='$libname${shared_ext} $libname.a'
+  # OS/2 can only load a DLL with a base name of 8 characters or less.
+  soname_spec='`test -n "$os2dllname" && libname="$os2dllname";
+    v=$($ECHO $release$versuffix | tr -d .-);
+    n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _);
+    $ECHO $n$v`$shared_ext'
+  library_names_spec='${libname}_dll.$libext'
   dynamic_linker='OS/2 ld.exe'
-  shlibpath_var=LIBPATH
+  shlibpath_var=BEGINLIBPATH
+  sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
+  sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
+  postinstall_cmds='base_file=`basename \$file`~
+    dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; $ECHO \$dlname'\''`~
+    dldir=$destdir/`dirname \$dlpath`~
+    test -d \$dldir || mkdir -p \$dldir~
+    $install_prog $dir/$dlname \$dldir/$dlname~
+    chmod a+x \$dldir/$dlname~
+    if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
+      eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
+    fi'
+  postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; $ECHO \$dlname'\''`~
+    dlpath=$dir/\$dldll~
+    $RM \$dlpath'
   ;;
 
 osf3* | osf4* | osf5*)
   version_type=osf
   need_lib_prefix=no
   need_version=no
-  soname_spec='${libname}${release}${shared_ext}$major'
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='$libname$release$shared_ext$major'
+  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
   shlibpath_var=LD_LIBRARY_PATH
   sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
-  sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
+  sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
   ;;
 
 rdos*)
@@ -38302,11 +45705,11 @@ rdos*)
   ;;
 
 solaris*)
-  version_type=linux
+  version_type=linux # correct to gnu/linux during the next big refactor
   need_lib_prefix=no
   need_version=no
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
+  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+  soname_spec='$libname$release$shared_ext$major'
   shlibpath_var=LD_LIBRARY_PATH
   shlibpath_overrides_runpath=yes
   hardcode_into_libs=yes
@@ -38316,20 +45719,20 @@ solaris*)
 
 sunos4*)
   version_type=sunos
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
+  library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
   finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
   shlibpath_var=LD_LIBRARY_PATH
   shlibpath_overrides_runpath=yes
-  if test "$with_gnu_ld" = yes; then
+  if test yes = "$with_gnu_ld"; then
     need_lib_prefix=no
   fi
   need_version=yes
   ;;
 
 sysv4 | sysv4.3*)
-  version_type=linux
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
+  version_type=linux # correct to gnu/linux during the next big refactor
+  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+  soname_spec='$libname$release$shared_ext$major'
   shlibpath_var=LD_LIBRARY_PATH
   case $host_vendor in
     sni)
@@ -38350,24 +45753,24 @@ sysv4 | sysv4.3*)
   ;;
 
 sysv4*MP*)
-  if test -d /usr/nec ;then
-    version_type=linux
-    library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
-    soname_spec='$libname${shared_ext}.$major'
+  if test -d /usr/nec; then
+    version_type=linux # correct to gnu/linux during the next big refactor
+    library_names_spec='$libname$shared_ext.$versuffix $libname$shared_ext.$major $libname$shared_ext'
+    soname_spec='$libname$shared_ext.$major'
     shlibpath_var=LD_LIBRARY_PATH
   fi
   ;;
 
 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
-  version_type=freebsd-elf
+  version_type=sco
   need_lib_prefix=no
   need_version=no
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
+  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext $libname$shared_ext'
+  soname_spec='$libname$release$shared_ext$major'
   shlibpath_var=LD_LIBRARY_PATH
   shlibpath_overrides_runpath=yes
   hardcode_into_libs=yes
-  if test "$with_gnu_ld" = yes; then
+  if test yes = "$with_gnu_ld"; then
     sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
   else
     sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
@@ -38382,19 +45785,19 @@ sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
 
 tpf*)
   # TPF is a cross-target only.  Preferred cross-host = GNU/Linux.
-  version_type=linux
+  version_type=linux # correct to gnu/linux during the next big refactor
   need_lib_prefix=no
   need_version=no
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
   shlibpath_var=LD_LIBRARY_PATH
   shlibpath_overrides_runpath=no
   hardcode_into_libs=yes
   ;;
 
 uts4*)
-  version_type=linux
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
+  version_type=linux # correct to gnu/linux during the next big refactor
+  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+  soname_spec='$libname$release$shared_ext$major'
   shlibpath_var=LD_LIBRARY_PATH
   ;;
 
@@ -38404,20 +45807,34 @@ uts4*)
 esac
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5
 $as_echo "$dynamic_linker" >&6; }
-test "$dynamic_linker" = no && can_build_shared=no
+test no = "$dynamic_linker" && can_build_shared=no
 
 variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
-if test "$GCC" = yes; then
+if test yes = "$GCC"; then
   variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
 fi
 
-if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then
-  sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
+if test set = "${lt_cv_sys_lib_search_path_spec+set}"; then
+  sys_lib_search_path_spec=$lt_cv_sys_lib_search_path_spec
 fi
-if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then
-  sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec"
+
+if test set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then
+  sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec
 fi
 
+# remember unaugmented sys_lib_dlsearch_path content for libtool script decls...
+configure_time_dlsearch_path=$sys_lib_dlsearch_path_spec
+
+# ... but it needs LT_SYS_LIBRARY_PATH munging for other configure-time code
+func_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH"
+
+# to be used as default LT_SYS_LIBRARY_PATH value in generated libtool
+configure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH
+
+
+
+
+
 
 
 
@@ -38458,15 +45875,15 @@ $as_echo_n "checking how to hardcode library paths into programs... " >&6; }
 hardcode_action_FC=
 if test -n "$hardcode_libdir_flag_spec_FC" ||
    test -n "$runpath_var_FC" ||
-   test "X$hardcode_automatic_FC" = "Xyes" ; then
+   test yes = "$hardcode_automatic_FC"; then
 
   # We can hardcode non-existent directories.
-  if test "$hardcode_direct_FC" != no &&
+  if test no != "$hardcode_direct_FC" &&
      # If the only mechanism to avoid hardcoding is shlibpath_var, we
      # have to relink, otherwise we might link with an installed library
      # when we should be linking with a yet-to-be-installed one
-     ## test "$_LT_TAGVAR(hardcode_shlibpath_var, FC)" != no &&
-     test "$hardcode_minus_L_FC" != no; then
+     ## test no != "$_LT_TAGVAR(hardcode_shlibpath_var, FC)" &&
+     test no != "$hardcode_minus_L_FC"; then
     # Linking always hardcodes the temporary library directory.
     hardcode_action_FC=relink
   else
@@ -38481,12 +45898,12 @@ fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action_FC" >&5
 $as_echo "$hardcode_action_FC" >&6; }
 
-if test "$hardcode_action_FC" = relink ||
-   test "$inherit_rpath_FC" = yes; then
+if test relink = "$hardcode_action_FC" ||
+   test yes = "$inherit_rpath_FC"; then
   # Fast installation is not supported
   enable_fast_install=no
-elif test "$shlibpath_overrides_runpath" = yes ||
-     test "$enable_shared" = no; then
+elif test yes = "$shlibpath_overrides_runpath" ||
+     test no = "$enable_shared"; then
   # Fast installation is not necessary
   enable_fast_install=needless
 fi
@@ -38500,8 +45917,9 @@ fi
   fi # test -n "$compiler"
 
   GCC=$lt_save_GCC
-  CC="$lt_save_CC"
-fi # test "$_lt_disable_FC" != yes
+  CC=$lt_save_CC
+  CFLAGS=$lt_save_CFLAGS
+fi # test yes != "$_lt_disable_FC"
 
 ac_ext=c
 ac_cpp='$CPP $CPPFLAGS'
@@ -38650,7 +46068,9 @@ if ac_fn_fc_try_link "$LINENO"; then :
   ac_cv_prog_fc_openmp='none needed'
 else
   ac_cv_prog_fc_openmp='unsupported'
-	  	  	  	  	  	  	                                	  	  	  	  	  	  for ac_option in -fopenmp -xopenmp -openmp -mp -omp -qsmp=omp -homp \
+	  	  	  	  	            	  	            	  	  	  	                                	  	  	  	  	  	  for ac_option in -fopenmp -xopenmp -qopenmp \
+                           -openmp -mp -omp -qsmp=omp -homp \
+			   -fopenmp=libomp \
                            -Popenmp --openmp; do
 	    ac_save_FCFLAGS=$FCFLAGS
 	    FCFLAGS="$FCFLAGS $ac_option"
@@ -38708,6 +46128,8 @@ FCLIBS=${FCLIBS}
 
 ## OpenMP package stuff (needs to come *after* configuration of all
 ## compilers).
+## We allow the users to override this for packages only (for now)
+## FIXME: what if SHLIB_OPENMP_?FLAGS is set but empty? (could use -n "${VAR+set}")
 if test "x${shlib_ld_was_given}" = xno -a \
         "${SHLIB_LD}" = "\$(CC)" -a \
         "x${ac_cv_prog_c_openmp}" != "xunsupported" -a \
@@ -38718,20 +46140,36 @@ if test "x${shlib_ld_was_given}" = xno -a \
         "x${shlib_fcld_was_given}" = xno -a \
         "${SHLIB_FCLD}" = "\$(FC)" -a \
         "x${ac_cv_prog_fc_openmp}" != "xunsupported"; then
-  SHLIB_OPENMP_CFLAGS="${OPENMP_CFLAGS}"
-  SHLIB_OPENMP_CXXFLAGS="${OPENMP_CXXFLAGS}"
-  SHLIB_OPENMP_FCFLAGS="${OPENMP_FCFLAGS}"
-  SHLIB_OPENMP_FFLAGS="${OPENMP_FFLAGS}"
   ## next macro is copied into Rconfig.h
 
 $as_echo "#define SUPPORT_OPENMP 1" >>confdefs.h
 
-else
-  SHLIB_OPENMP_CFLAGS=
-  SHLIB_OPENMP_CXXFLAGS=
-  SHLIB_OPENMP_FCFLAGS=
-  SHLIB_OPENMP_FFLAGS=
 fi
+## This assumes that OpenMP support in the C compiler includes compilation by F77
+if test -z "${SHLIB_OPENMP_CFLAGS+set}" -a \
+        "x${shlib_ld_was_given}" = xno -a \
+        "${SHLIB_LD}" = "\$(CC)" -a \
+        "x${ac_cv_prog_c_openmp}" != "xunsupported" -a \
+        "x${ac_cv_prog_c_openmp}" != "x"; then
+  SHLIB_OPENMP_CFLAGS="${OPENMP_CFLAGS}"
+  if test -z "${SHLIB_OPENMP_FFLAGS+set}" -a \
+          "x${ac_cv_prog_f77_openmp}" != "xunsupported"; then
+    SHLIB_OPENMP_FFLAGS="${OPENMP_FFLAGS}"
+  fi
+fi
+if test -z "${SHLIB_OPENMP_CXXFLAGS+set}" -a \
+        "x${shlib_cxxld_was_given}" = xno -a \
+        "${SHLIB_CXXLD}" = "\$(CXX)" -a \
+        "x${ac_cv_prog_cxx_openmp}" != "xunsupported"; then
+  SHLIB_OPENMP_CXXFLAGS="${OPENMP_CXXFLAGS}"
+fi
+if test -z "${SHLIB_OPENMP_FCFLAGS+set}" -a \
+        "x${shlib_fcld_was_given}" = xno -a \
+        "${SHLIB_FCLD}" = "\$(FC)" -a \
+        "x${ac_cv_prog_fc_openmp}" != "xunsupported"; then
+  SHLIB_OPENMP_FCFLAGS="${OPENMP_FCFLAGS}"
+fi
+
 
 
 
@@ -38743,7 +46181,7 @@ fi
 ## use this to pick out gfortran (even though it is unreliable).
 if test "${ac_cv_fc_compiler_gnu}" = yes; then
   case "${host_cpu}" in
-    sparc*|ppc64|powerpc64|s390*)
+    sparc*|ppc64*|powerpc64*|s390*)
       fcpicflags="-fPIC"
       ;;
     *)
@@ -38753,7 +46191,8 @@ if test "${ac_cv_fc_compiler_gnu}" = yes; then
 fi
 case "${host_os}" in
   darwin*)
-    fcpicflags="-fno-common"
+     ## macOS does not have a Fortran compiler, so this is speculative
+    fcpicflags="${darwin_pic}"
     ;;
   hpux*)
     case "${FC}" in
@@ -38785,7 +46224,7 @@ esac
 : ${FCPICFLAGS="${fcpicflags}"}
 if test -z "${FCPICFLAGS}"; then
   case "${host_os}" in
-    aix*|cygwin*|irix*|mingw*|osf*)
+    aix*|mingw*)
       ;;
     *)
       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: I could not determine FCPICFLAGS." >&5
@@ -38827,8 +46266,9 @@ LIBS="${LIBS1} ${LIBS2}"
 ## On Linux, do not add the ld.so system directories such as '/lib' and
 ## '/usr/lib', so that the entries from '/etc/ld.so.conf' are not
 ## shadowed (otherwise, e.g. optimized ATLAS libs would not be used).
-## On OS X (Darwin) /usr/X11R6/lib shadows the OpenGL framework and is not
-## needed in DYLD_LIBRARY_PATH.
+
+## On macOS (Darwin) this used to have /usr/X11R6/lib
+## which shadows the OpenGL framework but we add nothing on macOS ....
 case "${host_os}" in
   linux*)
     r_ld_library_defaults="/usr/lib64:/lib64:/usr/lib:/lib"
@@ -38836,9 +46276,6 @@ case "${host_os}" in
   solaris*)
     r_ld_library_defaults="/usr/lib:/lib"
     ;;
-  darwin*)
-    r_ld_library_defaults="/usr/X11R6/lib"
-    ;;
   *)
     r_ld_library_defaults=
     ;;
@@ -39723,6 +47160,222 @@ fi
 
 
 
+# Check whether --with-gnu-ld was given.
+if test "${with_gnu_ld+set}" = set; then :
+  withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
+else
+  with_gnu_ld=no
+fi
+
+# Prepare PATH_SEPARATOR.
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+  # Determine PATH_SEPARATOR by trying to find /bin/sh in a PATH which
+  # contains only /bin. Note that ksh looks also at the FPATH variable,
+  # so we have to set that as well for the test.
+  PATH_SEPARATOR=:
+  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
+    && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
+           || PATH_SEPARATOR=';'
+       }
+fi
+
+ac_prog=ld
+if test "$GCC" = yes; then
+  # Check if gcc -print-prog-name=ld gives a path.
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5
+$as_echo_n "checking for ld used by $CC... " >&6; }
+  case $host in
+  *-*-mingw*)
+    # gcc leaves a trailing carriage return which upsets mingw
+    ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
+  *)
+    ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
+  esac
+  case $ac_prog in
+    # Accept absolute paths.
+    [\\/]* | ?:[\\/]*)
+      re_direlt='/[^/][^/]*/\.\./'
+      # Canonicalize the pathname of ld
+      ac_prog=`echo "$ac_prog"| sed 's%\\\\%/%g'`
+      while echo "$ac_prog" | grep "$re_direlt" > /dev/null 2>&1; do
+        ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
+      done
+      test -z "$LD" && LD="$ac_prog"
+      ;;
+  "")
+    # If it fails, then pretend we aren't using GCC.
+    ac_prog=ld
+    ;;
+  *)
+    # If it is relative, then search for the first ld in PATH.
+    with_gnu_ld=unknown
+    ;;
+  esac
+elif test "$with_gnu_ld" = yes; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
+$as_echo_n "checking for GNU ld... " >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
+$as_echo_n "checking for non-GNU ld... " >&6; }
+fi
+if ${acl_cv_path_LD+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -z "$LD"; then
+  acl_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+  for ac_dir in $PATH; do
+    IFS="$acl_save_ifs"
+    test -z "$ac_dir" && ac_dir=.
+    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
+      acl_cv_path_LD="$ac_dir/$ac_prog"
+      # Check to see if the program is GNU ld.  I'd rather use --version,
+      # but apparently some variants of GNU ld only accept -v.
+      # Break only if it was the GNU/non-GNU ld that we prefer.
+      case `"$acl_cv_path_LD" -v 2>&1 </dev/null` in
+      *GNU* | *'with BFD'*)
+        test "$with_gnu_ld" != no && break
+        ;;
+      *)
+        test "$with_gnu_ld" != yes && break
+        ;;
+      esac
+    fi
+  done
+  IFS="$acl_save_ifs"
+else
+  acl_cv_path_LD="$LD" # Let the user override the test with a path.
+fi
+fi
+
+LD="$acl_cv_path_LD"
+if test -n "$LD"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
+$as_echo "$LD" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
+$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
+if ${acl_cv_prog_gnu_ld+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  # I'd rather use --version here, but apparently some GNU lds only accept -v.
+case `$LD -v 2>&1 </dev/null` in
+*GNU* | *'with BFD'*)
+  acl_cv_prog_gnu_ld=yes
+  ;;
+*)
+  acl_cv_prog_gnu_ld=no
+  ;;
+esac
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_prog_gnu_ld" >&5
+$as_echo "$acl_cv_prog_gnu_ld" >&6; }
+with_gnu_ld=$acl_cv_prog_gnu_ld
+
+
+
+
+                                                { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shared library run path origin" >&5
+$as_echo_n "checking for shared library run path origin... " >&6; }
+if ${acl_cv_rpath+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+
+    CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
+    ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
+    . ./conftest.sh
+    rm -f ./conftest.sh
+    acl_cv_rpath=done
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_rpath" >&5
+$as_echo "$acl_cv_rpath" >&6; }
+  wl="$acl_cv_wl"
+  acl_libext="$acl_cv_libext"
+  acl_shlibext="$acl_cv_shlibext"
+  acl_libname_spec="$acl_cv_libname_spec"
+  acl_library_names_spec="$acl_cv_library_names_spec"
+  acl_hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
+  acl_hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
+  acl_hardcode_direct="$acl_cv_hardcode_direct"
+  acl_hardcode_minus_L="$acl_cv_hardcode_minus_L"
+    # Check whether --enable-rpath was given.
+if test "${enable_rpath+set}" = set; then :
+  enableval=$enable_rpath; :
+else
+  enable_rpath=yes
+fi
+
+
+
+
+  acl_libdirstem=lib
+  acl_libdirstem2=
+  case "$host_os" in
+    solaris*)
+                                    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for 64-bit host" >&5
+$as_echo_n "checking for 64-bit host... " >&6; }
+if ${gl_cv_solaris_64bit+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#ifdef _LP64
+sixtyfour bits
+#endif
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "sixtyfour bits" >/dev/null 2>&1; then :
+  gl_cv_solaris_64bit=yes
+else
+  gl_cv_solaris_64bit=no
+fi
+rm -f conftest*
+
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_solaris_64bit" >&5
+$as_echo "$gl_cv_solaris_64bit" >&6; }
+      if test $gl_cv_solaris_64bit = yes; then
+        acl_libdirstem=lib/64
+        case "$host_cpu" in
+          sparc*)        acl_libdirstem2=lib/sparcv9 ;;
+          i*86 | x86_64) acl_libdirstem2=lib/amd64 ;;
+        esac
+      fi
+      ;;
+    *)
+      searchpath=`(LC_ALL=C $CC -print-search-dirs) 2>/dev/null | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'`
+      if test -n "$searchpath"; then
+        acl_save_IFS="${IFS= 	}"; IFS=":"
+        for searchdir in $searchpath; do
+          if test -d "$searchdir"; then
+            case "$searchdir" in
+              */lib64/ | */lib64 ) acl_libdirstem=lib64 ;;
+              */../ | */.. )
+                # Better ignore directories of this form. They are misleading.
+                ;;
+              *) searchdir=`cd "$searchdir" && pwd`
+                 case "$searchdir" in
+                   */lib64 ) acl_libdirstem=lib64 ;;
+                 esac ;;
+            esac
+          fi
+        done
+        IFS="$acl_save_IFS"
+      fi
+      ;;
+  esac
+  test -n "$acl_libdirstem2" || acl_libdirstem2="$acl_libdirstem"
+
+
+
   gl_threads_api=none
   LIBTHREAD=
   LTLIBTHREAD=
@@ -40087,6 +47740,7 @@ $as_echo "#define USE_SOLARIS_THREADS_WEAK 1" >>confdefs.h
 
 
 
+
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libpth" >&5
 $as_echo_n "checking how to link with libpth... " >&6; }
 if ${ac_cv_libpth_libs+:} false; then :
@@ -40095,6 +47749,11 @@ else
 
 
 
+
+
+
+
+
     use_additional=yes
 
   acl_save_prefix="$prefix"
@@ -40130,7 +47789,11 @@ if test "${with_libpth_prefix+set}" = set; then :
 
       else
         additional_includedir="$withval/include"
-        additional_libdir="$withval/lib"
+        additional_libdir="$withval/$acl_libdirstem"
+        if test "$acl_libdirstem2" != "$acl_libdirstem" \
+           && ! test -d "$withval/$acl_libdirstem"; then
+          additional_libdir="$withval/$acl_libdirstem2"
+        fi
       fi
     fi
 
@@ -40139,6 +47802,8 @@ fi
       LIBPTH=
   LTLIBPTH=
   INCPTH=
+  LIBPTH_PREFIX=
+      HAVE_LIBPTH=
   rpathdirs=
   ltrpathdirs=
   names_already_handled=
@@ -40156,7 +47821,7 @@ fi
       done
       if test -z "$already_handled"; then
         names_already_handled="$names_already_handled $name"
-                        uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
+                        uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./+-|ABCDEFGHIJKLMNOPQRSTUVWXYZ____|'`
         eval value=\"\$HAVE_LIB$uppername\"
         if test -n "$value"; then
           if test "$value" = yes; then
@@ -40172,22 +47837,52 @@ fi
           found_la=
           found_so=
           found_a=
+          eval libname=\"$acl_libname_spec\"    # typically: libname=lib$name
+          if test -n "$acl_shlibext"; then
+            shrext=".$acl_shlibext"             # typically: shrext=.so
+          else
+            shrext=
+          fi
           if test $use_additional = yes; then
-            if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
-              found_dir="$additional_libdir"
-              found_so="$additional_libdir/lib$name.$shlibext"
-              if test -f "$additional_libdir/lib$name.la"; then
-                found_la="$additional_libdir/lib$name.la"
-              fi
-            else
-              if test -f "$additional_libdir/lib$name.$libext"; then
-                found_dir="$additional_libdir"
-                found_a="$additional_libdir/lib$name.$libext"
-                if test -f "$additional_libdir/lib$name.la"; then
-                  found_la="$additional_libdir/lib$name.la"
+            dir="$additional_libdir"
+                                    if test -n "$acl_shlibext"; then
+              if test -f "$dir/$libname$shrext"; then
+                found_dir="$dir"
+                found_so="$dir/$libname$shrext"
+              else
+                if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
+                  ver=`(cd "$dir" && \
+                        for f in "$libname$shrext".*; do echo "$f"; done \
+                        | sed -e "s,^$libname$shrext\\\\.,," \
+                        | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
+                        | sed 1q ) 2>/dev/null`
+                  if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
+                    found_dir="$dir"
+                    found_so="$dir/$libname$shrext.$ver"
+                  fi
+                else
+                  eval library_names=\"$acl_library_names_spec\"
+                  for f in $library_names; do
+                    if test -f "$dir/$f"; then
+                      found_dir="$dir"
+                      found_so="$dir/$f"
+                      break
+                    fi
+                  done
                 fi
               fi
             fi
+                        if test "X$found_dir" = "X"; then
+              if test -f "$dir/$libname.$acl_libext"; then
+                found_dir="$dir"
+                found_a="$dir/$libname.$acl_libext"
+              fi
+            fi
+            if test "X$found_dir" != "X"; then
+              if test -f "$dir/$libname.la"; then
+                found_la="$dir/$libname.la"
+              fi
+            fi
           fi
           if test "X$found_dir" = "X"; then
             for x in $LDFLAGS $LTLIBPTH; do
@@ -40203,21 +47898,44 @@ fi
               case "$x" in
                 -L*)
                   dir=`echo "X$x" | sed -e 's/^X-L//'`
-                  if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
-                    found_dir="$dir"
-                    found_so="$dir/lib$name.$shlibext"
-                    if test -f "$dir/lib$name.la"; then
-                      found_la="$dir/lib$name.la"
-                    fi
-                  else
-                    if test -f "$dir/lib$name.$libext"; then
+                                    if test -n "$acl_shlibext"; then
+                    if test -f "$dir/$libname$shrext"; then
                       found_dir="$dir"
-                      found_a="$dir/lib$name.$libext"
-                      if test -f "$dir/lib$name.la"; then
-                        found_la="$dir/lib$name.la"
+                      found_so="$dir/$libname$shrext"
+                    else
+                      if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
+                        ver=`(cd "$dir" && \
+                              for f in "$libname$shrext".*; do echo "$f"; done \
+                              | sed -e "s,^$libname$shrext\\\\.,," \
+                              | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
+                              | sed 1q ) 2>/dev/null`
+                        if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
+                          found_dir="$dir"
+                          found_so="$dir/$libname$shrext.$ver"
+                        fi
+                      else
+                        eval library_names=\"$acl_library_names_spec\"
+                        for f in $library_names; do
+                          if test -f "$dir/$f"; then
+                            found_dir="$dir"
+                            found_so="$dir/$f"
+                            break
+                          fi
+                        done
                       fi
                     fi
                   fi
+                                    if test "X$found_dir" = "X"; then
+                    if test -f "$dir/$libname.$acl_libext"; then
+                      found_dir="$dir"
+                      found_a="$dir/$libname.$acl_libext"
+                    fi
+                  fi
+                  if test "X$found_dir" != "X"; then
+                    if test -f "$dir/$libname.la"; then
+                      found_la="$dir/$libname.la"
+                    fi
+                  fi
                   ;;
               esac
               if test "X$found_dir" != "X"; then
@@ -40228,7 +47946,9 @@ fi
           if test "X$found_dir" != "X"; then
                         LTLIBPTH="${LTLIBPTH}${LTLIBPTH:+ }-L$found_dir -l$name"
             if test "X$found_so" != "X"; then
-                                                        if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
+                                                        if test "$enable_rpath" = no \
+                 || test "X$found_dir" = "X/usr/$acl_libdirstem" \
+                 || test "X$found_dir" = "X/usr/$acl_libdirstem2"; then
                                 LIBPTH="${LIBPTH}${LIBPTH:+ }$found_so"
               else
                                                                                 haveit=
@@ -40241,10 +47961,10 @@ fi
                 if test -z "$haveit"; then
                   ltrpathdirs="$ltrpathdirs $found_dir"
                 fi
-                                if test "$hardcode_direct" = yes; then
+                                if test "$acl_hardcode_direct" = yes; then
                                                       LIBPTH="${LIBPTH}${LIBPTH:+ }$found_so"
                 else
-                  if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
+                  if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then
                                                             LIBPTH="${LIBPTH}${LIBPTH:+ }$found_so"
                                                             haveit=
                     for x in $rpathdirs; do
@@ -40276,7 +47996,7 @@ fi
                     if test -z "$haveit"; then
                       LIBPTH="${LIBPTH}${LIBPTH:+ }-L$found_dir"
                     fi
-                    if test "$hardcode_minus_L" != no; then
+                    if test "$acl_hardcode_minus_L" != no; then
                                                                                         LIBPTH="${LIBPTH}${LIBPTH:+ }$found_so"
                     else
                                                                                                                                                                                 LIBPTH="${LIBPTH}${LIBPTH:+ }-l$name"
@@ -40293,8 +48013,18 @@ fi
             fi
                         additional_includedir=
             case "$found_dir" in
-              */lib | */lib/)
-                basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
+              */$acl_libdirstem | */$acl_libdirstem/)
+                basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'`
+                if test "$name" = 'pth'; then
+                  LIBPTH_PREFIX="$basedir"
+                fi
+                additional_includedir="$basedir/include"
+                ;;
+              */$acl_libdirstem2 | */$acl_libdirstem2/)
+                basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem2/"'*$,,'`
+                if test "$name" = 'pth'; then
+                  LIBPTH_PREFIX="$basedir"
+                fi
                 additional_includedir="$basedir/include"
                 ;;
             esac
@@ -40343,9 +48073,11 @@ fi
                 case "$dep" in
                   -L*)
                     additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
-                                                                                                                                                                if test "X$additional_libdir" != "X/usr/lib"; then
+                                                                                                                                                                if test "X$additional_libdir" != "X/usr/$acl_libdirstem" \
+                       && test "X$additional_libdir" != "X/usr/$acl_libdirstem2"; then
                       haveit=
-                      if test "X$additional_libdir" = "X/usr/local/lib"; then
+                      if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem" \
+                         || test "X$additional_libdir" = "X/usr/local/$acl_libdirstem2"; then
                         if test -n "$GCC"; then
                           case $host_os in
                             linux* | gnu* | k*bsd*-gnu) haveit=yes;;
@@ -40445,21 +48177,21 @@ fi
     done
   done
   if test "X$rpathdirs" != "X"; then
-    if test -n "$hardcode_libdir_separator"; then
+    if test -n "$acl_hardcode_libdir_separator"; then
                         alldirs=
       for found_dir in $rpathdirs; do
-        alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
+        alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir"
       done
             acl_save_libdir="$libdir"
       libdir="$alldirs"
-      eval flag=\"$hardcode_libdir_flag_spec\"
+      eval flag=\"$acl_hardcode_libdir_flag_spec\"
       libdir="$acl_save_libdir"
       LIBPTH="${LIBPTH}${LIBPTH:+ }$flag"
     else
             for found_dir in $rpathdirs; do
         acl_save_libdir="$libdir"
         libdir="$found_dir"
-        eval flag=\"$hardcode_libdir_flag_spec\"
+        eval flag=\"$acl_hardcode_libdir_flag_spec\"
         libdir="$acl_save_libdir"
         LIBPTH="${LIBPTH}${LIBPTH:+ }$flag"
       done
@@ -40471,9 +48203,15 @@ fi
     done
   fi
 
+
+
+
+
+
     ac_cv_libpth_libs="$LIBPTH"
     ac_cv_libpth_ltlibs="$LTLIBPTH"
     ac_cv_libpth_cppflags="$INCPTH"
+    ac_cv_libpth_prefix="$LIBPTH_PREFIX"
 
 fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libpth_libs" >&5
@@ -40481,6 +48219,7 @@ $as_echo "$ac_cv_libpth_libs" >&6; }
   LIBPTH="$ac_cv_libpth_libs"
   LTLIBPTH="$ac_cv_libpth_ltlibs"
   INCPTH="$ac_cv_libpth_cppflags"
+  LIBPTH_PREFIX="$ac_cv_libpth_prefix"
 
   for element in $INCPTH; do
     haveit=
@@ -40506,6 +48245,7 @@ $as_echo "$ac_cv_libpth_libs" >&6; }
 
 
 
+
       HAVE_LIBPTH=yes
 
 
@@ -41879,31 +49619,6 @@ $as_echo "#define HAVE_LC_MESSAGES 1" >>confdefs.h
 
 
 
-                                  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shared library run path origin" >&5
-$as_echo_n "checking for shared library run path origin... " >&6; }
-if ${acl_cv_rpath+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-
-    CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
-    ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
-    . ./conftest.sh
-    rm -f ./conftest.sh
-    acl_cv_rpath=done
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_rpath" >&5
-$as_echo "$acl_cv_rpath" >&6; }
-  wl="$acl_cv_wl"
-  libext="$acl_cv_libext"
-  shlibext="$acl_cv_shlibext"
-  hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
-  hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
-  hardcode_direct="$acl_cv_hardcode_direct"
-  hardcode_minus_L="$acl_cv_hardcode_minus_L"
-
-
-
 
 
 
@@ -42113,6 +49828,11 @@ $as_echo "$ac_res" >&6; }
 
 
 
+
+
+
+
+
     use_additional=yes
 
   acl_save_prefix="$prefix"
@@ -42148,7 +49868,11 @@ if test "${with_libintl_prefix+set}" = set; then :
 
       else
         additional_includedir="$withval/include"
-        additional_libdir="$withval/lib"
+        additional_libdir="$withval/$acl_libdirstem"
+        if test "$acl_libdirstem2" != "$acl_libdirstem" \
+           && ! test -d "$withval/$acl_libdirstem"; then
+          additional_libdir="$withval/$acl_libdirstem2"
+        fi
       fi
     fi
 
@@ -42157,6 +49881,8 @@ fi
       LIBINTL=
   LTLIBINTL=
   INCINTL=
+  LIBINTL_PREFIX=
+      HAVE_LIBINTL=
   rpathdirs=
   ltrpathdirs=
   names_already_handled=
@@ -42174,7 +49900,7 @@ fi
       done
       if test -z "$already_handled"; then
         names_already_handled="$names_already_handled $name"
-                        uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
+                        uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./+-|ABCDEFGHIJKLMNOPQRSTUVWXYZ____|'`
         eval value=\"\$HAVE_LIB$uppername\"
         if test -n "$value"; then
           if test "$value" = yes; then
@@ -42190,22 +49916,52 @@ fi
           found_la=
           found_so=
           found_a=
+          eval libname=\"$acl_libname_spec\"    # typically: libname=lib$name
+          if test -n "$acl_shlibext"; then
+            shrext=".$acl_shlibext"             # typically: shrext=.so
+          else
+            shrext=
+          fi
           if test $use_additional = yes; then
-            if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
-              found_dir="$additional_libdir"
-              found_so="$additional_libdir/lib$name.$shlibext"
-              if test -f "$additional_libdir/lib$name.la"; then
-                found_la="$additional_libdir/lib$name.la"
-              fi
-            else
-              if test -f "$additional_libdir/lib$name.$libext"; then
-                found_dir="$additional_libdir"
-                found_a="$additional_libdir/lib$name.$libext"
-                if test -f "$additional_libdir/lib$name.la"; then
-                  found_la="$additional_libdir/lib$name.la"
+            dir="$additional_libdir"
+                                    if test -n "$acl_shlibext"; then
+              if test -f "$dir/$libname$shrext"; then
+                found_dir="$dir"
+                found_so="$dir/$libname$shrext"
+              else
+                if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
+                  ver=`(cd "$dir" && \
+                        for f in "$libname$shrext".*; do echo "$f"; done \
+                        | sed -e "s,^$libname$shrext\\\\.,," \
+                        | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
+                        | sed 1q ) 2>/dev/null`
+                  if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
+                    found_dir="$dir"
+                    found_so="$dir/$libname$shrext.$ver"
+                  fi
+                else
+                  eval library_names=\"$acl_library_names_spec\"
+                  for f in $library_names; do
+                    if test -f "$dir/$f"; then
+                      found_dir="$dir"
+                      found_so="$dir/$f"
+                      break
+                    fi
+                  done
                 fi
               fi
             fi
+                        if test "X$found_dir" = "X"; then
+              if test -f "$dir/$libname.$acl_libext"; then
+                found_dir="$dir"
+                found_a="$dir/$libname.$acl_libext"
+              fi
+            fi
+            if test "X$found_dir" != "X"; then
+              if test -f "$dir/$libname.la"; then
+                found_la="$dir/$libname.la"
+              fi
+            fi
           fi
           if test "X$found_dir" = "X"; then
             for x in $LDFLAGS $LTLIBINTL; do
@@ -42221,21 +49977,44 @@ fi
               case "$x" in
                 -L*)
                   dir=`echo "X$x" | sed -e 's/^X-L//'`
-                  if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
-                    found_dir="$dir"
-                    found_so="$dir/lib$name.$shlibext"
-                    if test -f "$dir/lib$name.la"; then
-                      found_la="$dir/lib$name.la"
-                    fi
-                  else
-                    if test -f "$dir/lib$name.$libext"; then
+                                    if test -n "$acl_shlibext"; then
+                    if test -f "$dir/$libname$shrext"; then
                       found_dir="$dir"
-                      found_a="$dir/lib$name.$libext"
-                      if test -f "$dir/lib$name.la"; then
-                        found_la="$dir/lib$name.la"
+                      found_so="$dir/$libname$shrext"
+                    else
+                      if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
+                        ver=`(cd "$dir" && \
+                              for f in "$libname$shrext".*; do echo "$f"; done \
+                              | sed -e "s,^$libname$shrext\\\\.,," \
+                              | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
+                              | sed 1q ) 2>/dev/null`
+                        if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
+                          found_dir="$dir"
+                          found_so="$dir/$libname$shrext.$ver"
+                        fi
+                      else
+                        eval library_names=\"$acl_library_names_spec\"
+                        for f in $library_names; do
+                          if test -f "$dir/$f"; then
+                            found_dir="$dir"
+                            found_so="$dir/$f"
+                            break
+                          fi
+                        done
                       fi
                     fi
                   fi
+                                    if test "X$found_dir" = "X"; then
+                    if test -f "$dir/$libname.$acl_libext"; then
+                      found_dir="$dir"
+                      found_a="$dir/$libname.$acl_libext"
+                    fi
+                  fi
+                  if test "X$found_dir" != "X"; then
+                    if test -f "$dir/$libname.la"; then
+                      found_la="$dir/$libname.la"
+                    fi
+                  fi
                   ;;
               esac
               if test "X$found_dir" != "X"; then
@@ -42246,7 +50025,9 @@ fi
           if test "X$found_dir" != "X"; then
                         LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-L$found_dir -l$name"
             if test "X$found_so" != "X"; then
-                                                        if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
+                                                        if test "$enable_rpath" = no \
+                 || test "X$found_dir" = "X/usr/$acl_libdirstem" \
+                 || test "X$found_dir" = "X/usr/$acl_libdirstem2"; then
                                 LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so"
               else
                                                                                 haveit=
@@ -42259,10 +50040,10 @@ fi
                 if test -z "$haveit"; then
                   ltrpathdirs="$ltrpathdirs $found_dir"
                 fi
-                                if test "$hardcode_direct" = yes; then
+                                if test "$acl_hardcode_direct" = yes; then
                                                       LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so"
                 else
-                  if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
+                  if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then
                                                             LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so"
                                                             haveit=
                     for x in $rpathdirs; do
@@ -42294,7 +50075,7 @@ fi
                     if test -z "$haveit"; then
                       LIBINTL="${LIBINTL}${LIBINTL:+ }-L$found_dir"
                     fi
-                    if test "$hardcode_minus_L" != no; then
+                    if test "$acl_hardcode_minus_L" != no; then
                                                                                         LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so"
                     else
                                                                                                                                                                                 LIBINTL="${LIBINTL}${LIBINTL:+ }-l$name"
@@ -42311,8 +50092,18 @@ fi
             fi
                         additional_includedir=
             case "$found_dir" in
-              */lib | */lib/)
-                basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
+              */$acl_libdirstem | */$acl_libdirstem/)
+                basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'`
+                if test "$name" = 'intl'; then
+                  LIBINTL_PREFIX="$basedir"
+                fi
+                additional_includedir="$basedir/include"
+                ;;
+              */$acl_libdirstem2 | */$acl_libdirstem2/)
+                basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem2/"'*$,,'`
+                if test "$name" = 'intl'; then
+                  LIBINTL_PREFIX="$basedir"
+                fi
                 additional_includedir="$basedir/include"
                 ;;
             esac
@@ -42361,9 +50152,11 @@ fi
                 case "$dep" in
                   -L*)
                     additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
-                                                                                                                                                                if test "X$additional_libdir" != "X/usr/lib"; then
+                                                                                                                                                                if test "X$additional_libdir" != "X/usr/$acl_libdirstem" \
+                       && test "X$additional_libdir" != "X/usr/$acl_libdirstem2"; then
                       haveit=
-                      if test "X$additional_libdir" = "X/usr/local/lib"; then
+                      if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem" \
+                         || test "X$additional_libdir" = "X/usr/local/$acl_libdirstem2"; then
                         if test -n "$GCC"; then
                           case $host_os in
                             linux* | gnu* | k*bsd*-gnu) haveit=yes;;
@@ -42463,21 +50256,21 @@ fi
     done
   done
   if test "X$rpathdirs" != "X"; then
-    if test -n "$hardcode_libdir_separator"; then
+    if test -n "$acl_hardcode_libdir_separator"; then
                         alldirs=
       for found_dir in $rpathdirs; do
-        alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
+        alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir"
       done
             acl_save_libdir="$libdir"
       libdir="$alldirs"
-      eval flag=\"$hardcode_libdir_flag_spec\"
+      eval flag=\"$acl_hardcode_libdir_flag_spec\"
       libdir="$acl_save_libdir"
       LIBINTL="${LIBINTL}${LIBINTL:+ }$flag"
     else
             for found_dir in $rpathdirs; do
         acl_save_libdir="$libdir"
         libdir="$found_dir"
-        eval flag=\"$hardcode_libdir_flag_spec\"
+        eval flag=\"$acl_hardcode_libdir_flag_spec\"
         libdir="$acl_save_libdir"
         LIBINTL="${LIBINTL}${LIBINTL:+ }$flag"
       done
@@ -42489,6 +50282,11 @@ fi
     done
   fi
 
+
+
+
+
+
           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU gettext in libintl" >&5
 $as_echo_n "checking for GNU gettext in libintl... " >&6; }
 if eval \${$gt_func_gnugettext_libintl+:} false; then :
@@ -42757,17 +50555,77 @@ else
 fi
 
 
-### * bug fixes
-# PR#9375 claims that sh on OSF1 is not POSIX-compliant and that is
-# not a bug in the OS: we add a workaround for such benighted OSes
-case "${host_os}" in
-  osf*)
-    OSF_SH_BUG='"${1+@}"'
-  ;;
-  *)
-    OSF_SH_BUG='"${@}"'
-  ;;
-esac
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether OpenMP SIMD reduction is supported" >&5
+$as_echo_n "checking whether OpenMP SIMD reduction is supported... " >&6; }
+if ${r_cv_openmp_simdred+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+r_save_CFLAGS="${CFLAGS}"
+CFLAGS="${CFLAGS} ${R_OPENMP_CFLAGS}"
+if test "$cross_compiling" = yes; then :
+  r_cv_openmp_simdred=no
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <stdlib.h>
+
+double ssum(double *x, int n) {
+/* SIMD reduction is supported since OpenMP 4.0. The value of _OPENMP is
+   unreliable in some compilers, so we do not test its value. */
+#if defined(_OPENMP)
+    double s = 0;
+    #pragma omp simd reduction(+:s)
+    for(int i = 0; i < n; i++)
+        s += x[i];
+    return s;
+#else
+    exit(1);
+    return 0; /* not reachable */
+#endif
+}
+
+int main() {
+    /* use volatiles to reduce the risk of the
+       computation being inlined and constant-folded */
+    volatile double xv[8] = {1, 2, 3, 4, 5, 6, 7, 8};
+    volatile int n = 8;
+    double x[8], s;
+    int i;
+
+    for(i = 0; i < 8; i++) x[i] = xv[i];
+    s = ssum(x, n);
+    if (s == 36) exit(0);
+    exit(2);
+}
+
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+  r_cv_openmp_simdred=yes
+else
+  r_cv_openmp_simdred=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+CFLAGS="${r_save_CFLAGS}"
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $r_cv_openmp_simdred" >&5
+$as_echo "$r_cv_openmp_simdred" >&6; }
+if test "x${r_cv_openmp_simdred}" = xyes; then
+
+$as_echo "#define HAVE_OPENMP_SIMDRED 1" >>confdefs.h
+
+fi
 
 
 ### shell for use in scripts: we allow R_SHELL to set the script,
@@ -42791,9 +50649,6 @@ $as_echo "#define HAVE_ICONVLIST 1" >>confdefs.h
 $as_echo "#define HAVE_ICONV_H 1" >>confdefs.h
 
 
-$as_echo "#define HAVE_INTERNET 1" >>confdefs.h
-
-
 $as_echo "#define HAVE_JPEG 1" >>confdefs.h
 
 
@@ -42803,9 +50658,6 @@ $as_echo "#define HAVE_PNG 1" >>confdefs.h
 $as_echo "#define HAVE_POSIX_SETJMP 1" >>confdefs.h
 
 
-$as_echo "#define HAVE_SOCKETS 1" >>confdefs.h
-
-
 $as_echo "#define HAVE_TCLTK 1" >>confdefs.h
 
 
@@ -42818,9 +50670,6 @@ $as_echo "#define HAVE_TIMES 1" >>confdefs.h
 
 $as_echo "#define R_PROFILING 1" >>confdefs.h
 
-
-$as_echo "#define SUPPORT_LIBXML 1" >>confdefs.h
-
     ;;
 esac
 
@@ -42828,7 +50677,7 @@ esac
 
 ac_config_headers="$ac_config_headers src/include/config.h"
 
-ac_config_files="$ac_config_files Makeconf Makefile doc/Makefile doc/html/Makefile doc/manual/Makefile etc/Makefile etc/Makeconf etc/Renviron etc/javaconf etc/ldpaths m4/Makefile po/Makefile share/Makefile src/Makefile src/appl/Makefile src/extra/Makefile src/extra/blas/Makefile src/extra/bzip2/Makefile src/extra/intl/Makefile src/extra/pcre/Makefile src/extra/tre/Makefile src/extra/tzone/Makefile src/extra/xdr/Makefile src/extra/xz/Makefile src/extra/zlib/Makefile src/include/Makefile s [...]
+ac_config_files="$ac_config_files Makeconf Makefile doc/Makefile doc/html/Makefile doc/manual/Makefile etc/Makefile etc/Makeconf etc/Renviron etc/javaconf etc/ldpaths m4/Makefile po/Makefile share/Makefile src/Makefile src/appl/Makefile src/extra/Makefile src/extra/blas/Makefile src/extra/intl/Makefile src/extra/tre/Makefile src/extra/tzone/Makefile src/extra/xdr/Makefile src/include/Makefile src/include/Rmath.h0 src/include/R_ext/Makefile src/library/Recommended/Makefile src/library/Mak [...]
 
 
 ac_config_commands="$ac_config_commands stamp-h"
@@ -42973,6 +50822,10 @@ if test -z "${BUILD_LTO_TRUE}" && test -z "${BUILD_LTO_FALSE}"; then
   as_fn_error $? "conditional \"BUILD_LTO\" was never defined.
 Usually this means the macro was only invoked conditionally." "$LINENO" 5
 fi
+if test -z "${WANT_JAVA_TRUE}" && test -z "${WANT_JAVA_FALSE}"; then
+  as_fn_error $? "conditional \"WANT_JAVA\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
 if test -z "${BYTE_COMPILE_PACKAGES_TRUE}" && test -z "${BYTE_COMPILE_PACKAGES_FALSE}"; then
   as_fn_error $? "conditional \"BYTE_COMPILE_PACKAGES\" was never defined.
 Usually this means the macro was only invoked conditionally." "$LINENO" 5
@@ -42989,10 +50842,6 @@ if test -z "${DYLIB_UNDEFINED_ALLOWED_TRUE}" && test -z "${DYLIB_UNDEFINED_ALLOW
   as_fn_error $? "conditional \"DYLIB_UNDEFINED_ALLOWED\" was never defined.
 Usually this means the macro was only invoked conditionally." "$LINENO" 5
 fi
-if test -z "${BUILD_CYGWIN_TRUE}" && test -z "${BUILD_CYGWIN_FALSE}"; then
-  as_fn_error $? "conditional \"BUILD_CYGWIN\" was never defined.
-Usually this means the macro was only invoked conditionally." "$LINENO" 5
-fi
 if test -z "${USE_EXPORTFILES_TRUE}" && test -z "${USE_EXPORTFILES_FALSE}"; then
   as_fn_error $? "conditional \"USE_EXPORTFILES\" was never defined.
 Usually this means the macro was only invoked conditionally." "$LINENO" 5
@@ -43029,26 +50878,10 @@ if test -z "${BUILD_XDR_TRUE}" && test -z "${BUILD_XDR_FALSE}"; then
   as_fn_error $? "conditional \"BUILD_XDR\" was never defined.
 Usually this means the macro was only invoked conditionally." "$LINENO" 5
 fi
-if test -z "${BUILD_ZLIB_TRUE}" && test -z "${BUILD_ZLIB_FALSE}"; then
-  as_fn_error $? "conditional \"BUILD_ZLIB\" was never defined.
-Usually this means the macro was only invoked conditionally." "$LINENO" 5
-fi
 if test -z "${USE_MMAP_ZLIB_TRUE}" && test -z "${USE_MMAP_ZLIB_FALSE}"; then
   as_fn_error $? "conditional \"USE_MMAP_ZLIB\" was never defined.
 Usually this means the macro was only invoked conditionally." "$LINENO" 5
 fi
-if test -z "${BUILD_BZLIB_TRUE}" && test -z "${BUILD_BZLIB_FALSE}"; then
-  as_fn_error $? "conditional \"BUILD_BZLIB\" was never defined.
-Usually this means the macro was only invoked conditionally." "$LINENO" 5
-fi
-if test -z "${BUILD_XZ_TRUE}" && test -z "${BUILD_XZ_FALSE}"; then
-  as_fn_error $? "conditional \"BUILD_XZ\" was never defined.
-Usually this means the macro was only invoked conditionally." "$LINENO" 5
-fi
-if test -z "${BUILD_PCRE_TRUE}" && test -z "${BUILD_PCRE_FALSE}"; then
-  as_fn_error $? "conditional \"BUILD_PCRE\" was never defined.
-Usually this means the macro was only invoked conditionally." "$LINENO" 5
-fi
 if test -z "${BUILD_TRE_TRUE}" && test -z "${BUILD_TRE_FALSE}"; then
   as_fn_error $? "conditional \"BUILD_TRE\" was never defined.
 Usually this means the macro was only invoked conditionally." "$LINENO" 5
@@ -43466,7 +51299,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.1.2, which was
+This file was extended by R $as_me 3.4.0, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
@@ -43526,14 +51359,14 @@ $config_headers
 Configuration commands:
 $config_commands
 
-Report bugs to <http://bugs.r-project.org>.
-R home page: <http://www.r-project.org>."
+Report bugs to <https://bugs.r-project.org>.
+R home page: <https://www.r-project.org>."
 
 _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.1.2
+R config.status 3.4.0
 configured by $0, generated by GNU Autoconf 2.69,
   with options \\"\$ac_cs_config\\"
 
@@ -43661,278 +51494,309 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 sed_quote_subst='$sed_quote_subst'
 double_quote_subst='$double_quote_subst'
 delay_variable_subst='$delay_variable_subst'
-enable_static='`$ECHO "X$enable_static" | $Xsed -e "$delay_single_quote_subst"`'
-macro_version='`$ECHO "X$macro_version" | $Xsed -e "$delay_single_quote_subst"`'
-macro_revision='`$ECHO "X$macro_revision" | $Xsed -e "$delay_single_quote_subst"`'
-enable_shared='`$ECHO "X$enable_shared" | $Xsed -e "$delay_single_quote_subst"`'
-pic_mode='`$ECHO "X$pic_mode" | $Xsed -e "$delay_single_quote_subst"`'
-enable_fast_install='`$ECHO "X$enable_fast_install" | $Xsed -e "$delay_single_quote_subst"`'
-host_alias='`$ECHO "X$host_alias" | $Xsed -e "$delay_single_quote_subst"`'
-host='`$ECHO "X$host" | $Xsed -e "$delay_single_quote_subst"`'
-host_os='`$ECHO "X$host_os" | $Xsed -e "$delay_single_quote_subst"`'
-build_alias='`$ECHO "X$build_alias" | $Xsed -e "$delay_single_quote_subst"`'
-build='`$ECHO "X$build" | $Xsed -e "$delay_single_quote_subst"`'
-build_os='`$ECHO "X$build_os" | $Xsed -e "$delay_single_quote_subst"`'
-SED='`$ECHO "X$SED" | $Xsed -e "$delay_single_quote_subst"`'
-Xsed='`$ECHO "X$Xsed" | $Xsed -e "$delay_single_quote_subst"`'
-GREP='`$ECHO "X$GREP" | $Xsed -e "$delay_single_quote_subst"`'
-EGREP='`$ECHO "X$EGREP" | $Xsed -e "$delay_single_quote_subst"`'
-FGREP='`$ECHO "X$FGREP" | $Xsed -e "$delay_single_quote_subst"`'
-LD='`$ECHO "X$LD" | $Xsed -e "$delay_single_quote_subst"`'
-NM='`$ECHO "X$NM" | $Xsed -e "$delay_single_quote_subst"`'
-LN_S='`$ECHO "X$LN_S" | $Xsed -e "$delay_single_quote_subst"`'
-max_cmd_len='`$ECHO "X$max_cmd_len" | $Xsed -e "$delay_single_quote_subst"`'
-ac_objext='`$ECHO "X$ac_objext" | $Xsed -e "$delay_single_quote_subst"`'
-exeext='`$ECHO "X$exeext" | $Xsed -e "$delay_single_quote_subst"`'
-lt_unset='`$ECHO "X$lt_unset" | $Xsed -e "$delay_single_quote_subst"`'
-lt_SP2NL='`$ECHO "X$lt_SP2NL" | $Xsed -e "$delay_single_quote_subst"`'
-lt_NL2SP='`$ECHO "X$lt_NL2SP" | $Xsed -e "$delay_single_quote_subst"`'
-reload_flag='`$ECHO "X$reload_flag" | $Xsed -e "$delay_single_quote_subst"`'
-reload_cmds='`$ECHO "X$reload_cmds" | $Xsed -e "$delay_single_quote_subst"`'
-OBJDUMP='`$ECHO "X$OBJDUMP" | $Xsed -e "$delay_single_quote_subst"`'
-deplibs_check_method='`$ECHO "X$deplibs_check_method" | $Xsed -e "$delay_single_quote_subst"`'
-file_magic_cmd='`$ECHO "X$file_magic_cmd" | $Xsed -e "$delay_single_quote_subst"`'
-AR='`$ECHO "X$AR" | $Xsed -e "$delay_single_quote_subst"`'
-AR_FLAGS='`$ECHO "X$AR_FLAGS" | $Xsed -e "$delay_single_quote_subst"`'
-STRIP='`$ECHO "X$STRIP" | $Xsed -e "$delay_single_quote_subst"`'
-RANLIB='`$ECHO "X$RANLIB" | $Xsed -e "$delay_single_quote_subst"`'
-old_postinstall_cmds='`$ECHO "X$old_postinstall_cmds" | $Xsed -e "$delay_single_quote_subst"`'
-old_postuninstall_cmds='`$ECHO "X$old_postuninstall_cmds" | $Xsed -e "$delay_single_quote_subst"`'
-old_archive_cmds='`$ECHO "X$old_archive_cmds" | $Xsed -e "$delay_single_quote_subst"`'
-CC='`$ECHO "X$CC" | $Xsed -e "$delay_single_quote_subst"`'
-CFLAGS='`$ECHO "X$CFLAGS" | $Xsed -e "$delay_single_quote_subst"`'
-compiler='`$ECHO "X$compiler" | $Xsed -e "$delay_single_quote_subst"`'
-GCC='`$ECHO "X$GCC" | $Xsed -e "$delay_single_quote_subst"`'
-lt_cv_sys_global_symbol_pipe='`$ECHO "X$lt_cv_sys_global_symbol_pipe" | $Xsed -e "$delay_single_quote_subst"`'
-lt_cv_sys_global_symbol_to_cdecl='`$ECHO "X$lt_cv_sys_global_symbol_to_cdecl" | $Xsed -e "$delay_single_quote_subst"`'
-lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "X$lt_cv_sys_global_symbol_to_c_name_address" | $Xsed -e "$delay_single_quote_subst"`'
-lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='`$ECHO "X$lt_cv_sys_global_symbol_to_c_name_address_lib_prefix" | $Xsed -e "$delay_single_quote_subst"`'
-objdir='`$ECHO "X$objdir" | $Xsed -e "$delay_single_quote_subst"`'
-SHELL='`$ECHO "X$SHELL" | $Xsed -e "$delay_single_quote_subst"`'
-ECHO='`$ECHO "X$ECHO" | $Xsed -e "$delay_single_quote_subst"`'
-MAGIC_CMD='`$ECHO "X$MAGIC_CMD" | $Xsed -e "$delay_single_quote_subst"`'
-lt_prog_compiler_no_builtin_flag='`$ECHO "X$lt_prog_compiler_no_builtin_flag" | $Xsed -e "$delay_single_quote_subst"`'
-lt_prog_compiler_wl='`$ECHO "X$lt_prog_compiler_wl" | $Xsed -e "$delay_single_quote_subst"`'
-lt_prog_compiler_pic='`$ECHO "X$lt_prog_compiler_pic" | $Xsed -e "$delay_single_quote_subst"`'
-lt_prog_compiler_static='`$ECHO "X$lt_prog_compiler_static" | $Xsed -e "$delay_single_quote_subst"`'
-lt_cv_prog_compiler_c_o='`$ECHO "X$lt_cv_prog_compiler_c_o" | $Xsed -e "$delay_single_quote_subst"`'
-need_locks='`$ECHO "X$need_locks" | $Xsed -e "$delay_single_quote_subst"`'
-DSYMUTIL='`$ECHO "X$DSYMUTIL" | $Xsed -e "$delay_single_quote_subst"`'
-NMEDIT='`$ECHO "X$NMEDIT" | $Xsed -e "$delay_single_quote_subst"`'
-LIPO='`$ECHO "X$LIPO" | $Xsed -e "$delay_single_quote_subst"`'
-OTOOL='`$ECHO "X$OTOOL" | $Xsed -e "$delay_single_quote_subst"`'
-OTOOL64='`$ECHO "X$OTOOL64" | $Xsed -e "$delay_single_quote_subst"`'
-libext='`$ECHO "X$libext" | $Xsed -e "$delay_single_quote_subst"`'
-shrext_cmds='`$ECHO "X$shrext_cmds" | $Xsed -e "$delay_single_quote_subst"`'
-extract_expsyms_cmds='`$ECHO "X$extract_expsyms_cmds" | $Xsed -e "$delay_single_quote_subst"`'
-archive_cmds_need_lc='`$ECHO "X$archive_cmds_need_lc" | $Xsed -e "$delay_single_quote_subst"`'
-enable_shared_with_static_runtimes='`$ECHO "X$enable_shared_with_static_runtimes" | $Xsed -e "$delay_single_quote_subst"`'
-export_dynamic_flag_spec='`$ECHO "X$export_dynamic_flag_spec" | $Xsed -e "$delay_single_quote_subst"`'
-whole_archive_flag_spec='`$ECHO "X$whole_archive_flag_spec" | $Xsed -e "$delay_single_quote_subst"`'
-compiler_needs_object='`$ECHO "X$compiler_needs_object" | $Xsed -e "$delay_single_quote_subst"`'
-old_archive_from_new_cmds='`$ECHO "X$old_archive_from_new_cmds" | $Xsed -e "$delay_single_quote_subst"`'
-old_archive_from_expsyms_cmds='`$ECHO "X$old_archive_from_expsyms_cmds" | $Xsed -e "$delay_single_quote_subst"`'
-archive_cmds='`$ECHO "X$archive_cmds" | $Xsed -e "$delay_single_quote_subst"`'
-archive_expsym_cmds='`$ECHO "X$archive_expsym_cmds" | $Xsed -e "$delay_single_quote_subst"`'
-module_cmds='`$ECHO "X$module_cmds" | $Xsed -e "$delay_single_quote_subst"`'
-module_expsym_cmds='`$ECHO "X$module_expsym_cmds" | $Xsed -e "$delay_single_quote_subst"`'
-with_gnu_ld='`$ECHO "X$with_gnu_ld" | $Xsed -e "$delay_single_quote_subst"`'
-allow_undefined_flag='`$ECHO "X$allow_undefined_flag" | $Xsed -e "$delay_single_quote_subst"`'
-no_undefined_flag='`$ECHO "X$no_undefined_flag" | $Xsed -e "$delay_single_quote_subst"`'
-hardcode_libdir_flag_spec='`$ECHO "X$hardcode_libdir_flag_spec" | $Xsed -e "$delay_single_quote_subst"`'
-hardcode_libdir_flag_spec_ld='`$ECHO "X$hardcode_libdir_flag_spec_ld" | $Xsed -e "$delay_single_quote_subst"`'
-hardcode_libdir_separator='`$ECHO "X$hardcode_libdir_separator" | $Xsed -e "$delay_single_quote_subst"`'
-hardcode_direct='`$ECHO "X$hardcode_direct" | $Xsed -e "$delay_single_quote_subst"`'
-hardcode_direct_absolute='`$ECHO "X$hardcode_direct_absolute" | $Xsed -e "$delay_single_quote_subst"`'
-hardcode_minus_L='`$ECHO "X$hardcode_minus_L" | $Xsed -e "$delay_single_quote_subst"`'
-hardcode_shlibpath_var='`$ECHO "X$hardcode_shlibpath_var" | $Xsed -e "$delay_single_quote_subst"`'
-hardcode_automatic='`$ECHO "X$hardcode_automatic" | $Xsed -e "$delay_single_quote_subst"`'
-inherit_rpath='`$ECHO "X$inherit_rpath" | $Xsed -e "$delay_single_quote_subst"`'
-link_all_deplibs='`$ECHO "X$link_all_deplibs" | $Xsed -e "$delay_single_quote_subst"`'
-fix_srcfile_path='`$ECHO "X$fix_srcfile_path" | $Xsed -e "$delay_single_quote_subst"`'
-always_export_symbols='`$ECHO "X$always_export_symbols" | $Xsed -e "$delay_single_quote_subst"`'
-export_symbols_cmds='`$ECHO "X$export_symbols_cmds" | $Xsed -e "$delay_single_quote_subst"`'
-exclude_expsyms='`$ECHO "X$exclude_expsyms" | $Xsed -e "$delay_single_quote_subst"`'
-include_expsyms='`$ECHO "X$include_expsyms" | $Xsed -e "$delay_single_quote_subst"`'
-prelink_cmds='`$ECHO "X$prelink_cmds" | $Xsed -e "$delay_single_quote_subst"`'
-file_list_spec='`$ECHO "X$file_list_spec" | $Xsed -e "$delay_single_quote_subst"`'
-variables_saved_for_relink='`$ECHO "X$variables_saved_for_relink" | $Xsed -e "$delay_single_quote_subst"`'
-need_lib_prefix='`$ECHO "X$need_lib_prefix" | $Xsed -e "$delay_single_quote_subst"`'
-need_version='`$ECHO "X$need_version" | $Xsed -e "$delay_single_quote_subst"`'
-version_type='`$ECHO "X$version_type" | $Xsed -e "$delay_single_quote_subst"`'
-runpath_var='`$ECHO "X$runpath_var" | $Xsed -e "$delay_single_quote_subst"`'
-shlibpath_var='`$ECHO "X$shlibpath_var" | $Xsed -e "$delay_single_quote_subst"`'
-shlibpath_overrides_runpath='`$ECHO "X$shlibpath_overrides_runpath" | $Xsed -e "$delay_single_quote_subst"`'
-libname_spec='`$ECHO "X$libname_spec" | $Xsed -e "$delay_single_quote_subst"`'
-library_names_spec='`$ECHO "X$library_names_spec" | $Xsed -e "$delay_single_quote_subst"`'
-soname_spec='`$ECHO "X$soname_spec" | $Xsed -e "$delay_single_quote_subst"`'
-postinstall_cmds='`$ECHO "X$postinstall_cmds" | $Xsed -e "$delay_single_quote_subst"`'
-postuninstall_cmds='`$ECHO "X$postuninstall_cmds" | $Xsed -e "$delay_single_quote_subst"`'
-finish_cmds='`$ECHO "X$finish_cmds" | $Xsed -e "$delay_single_quote_subst"`'
-finish_eval='`$ECHO "X$finish_eval" | $Xsed -e "$delay_single_quote_subst"`'
-hardcode_into_libs='`$ECHO "X$hardcode_into_libs" | $Xsed -e "$delay_single_quote_subst"`'
-sys_lib_search_path_spec='`$ECHO "X$sys_lib_search_path_spec" | $Xsed -e "$delay_single_quote_subst"`'
-sys_lib_dlsearch_path_spec='`$ECHO "X$sys_lib_dlsearch_path_spec" | $Xsed -e "$delay_single_quote_subst"`'
-hardcode_action='`$ECHO "X$hardcode_action" | $Xsed -e "$delay_single_quote_subst"`'
-enable_dlopen='`$ECHO "X$enable_dlopen" | $Xsed -e "$delay_single_quote_subst"`'
-enable_dlopen_self='`$ECHO "X$enable_dlopen_self" | $Xsed -e "$delay_single_quote_subst"`'
-enable_dlopen_self_static='`$ECHO "X$enable_dlopen_self_static" | $Xsed -e "$delay_single_quote_subst"`'
-old_striplib='`$ECHO "X$old_striplib" | $Xsed -e "$delay_single_quote_subst"`'
-striplib='`$ECHO "X$striplib" | $Xsed -e "$delay_single_quote_subst"`'
-compiler_lib_search_dirs='`$ECHO "X$compiler_lib_search_dirs" | $Xsed -e "$delay_single_quote_subst"`'
-predep_objects='`$ECHO "X$predep_objects" | $Xsed -e "$delay_single_quote_subst"`'
-postdep_objects='`$ECHO "X$postdep_objects" | $Xsed -e "$delay_single_quote_subst"`'
-predeps='`$ECHO "X$predeps" | $Xsed -e "$delay_single_quote_subst"`'
-postdeps='`$ECHO "X$postdeps" | $Xsed -e "$delay_single_quote_subst"`'
-compiler_lib_search_path='`$ECHO "X$compiler_lib_search_path" | $Xsed -e "$delay_single_quote_subst"`'
-LD_CXX='`$ECHO "X$LD_CXX" | $Xsed -e "$delay_single_quote_subst"`'
-LD_F77='`$ECHO "X$LD_F77" | $Xsed -e "$delay_single_quote_subst"`'
-LD_FC='`$ECHO "X$LD_FC" | $Xsed -e "$delay_single_quote_subst"`'
-old_archive_cmds_CXX='`$ECHO "X$old_archive_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`'
-old_archive_cmds_F77='`$ECHO "X$old_archive_cmds_F77" | $Xsed -e "$delay_single_quote_subst"`'
-old_archive_cmds_FC='`$ECHO "X$old_archive_cmds_FC" | $Xsed -e "$delay_single_quote_subst"`'
-compiler_CXX='`$ECHO "X$compiler_CXX" | $Xsed -e "$delay_single_quote_subst"`'
-compiler_F77='`$ECHO "X$compiler_F77" | $Xsed -e "$delay_single_quote_subst"`'
-compiler_FC='`$ECHO "X$compiler_FC" | $Xsed -e "$delay_single_quote_subst"`'
-GCC_CXX='`$ECHO "X$GCC_CXX" | $Xsed -e "$delay_single_quote_subst"`'
-GCC_F77='`$ECHO "X$GCC_F77" | $Xsed -e "$delay_single_quote_subst"`'
-GCC_FC='`$ECHO "X$GCC_FC" | $Xsed -e "$delay_single_quote_subst"`'
-lt_prog_compiler_no_builtin_flag_CXX='`$ECHO "X$lt_prog_compiler_no_builtin_flag_CXX" | $Xsed -e "$delay_single_quote_subst"`'
-lt_prog_compiler_no_builtin_flag_F77='`$ECHO "X$lt_prog_compiler_no_builtin_flag_F77" | $Xsed -e "$delay_single_quote_subst"`'
-lt_prog_compiler_no_builtin_flag_FC='`$ECHO "X$lt_prog_compiler_no_builtin_flag_FC" | $Xsed -e "$delay_single_quote_subst"`'
-lt_prog_compiler_wl_CXX='`$ECHO "X$lt_prog_compiler_wl_CXX" | $Xsed -e "$delay_single_quote_subst"`'
-lt_prog_compiler_wl_F77='`$ECHO "X$lt_prog_compiler_wl_F77" | $Xsed -e "$delay_single_quote_subst"`'
-lt_prog_compiler_wl_FC='`$ECHO "X$lt_prog_compiler_wl_FC" | $Xsed -e "$delay_single_quote_subst"`'
-lt_prog_compiler_pic_CXX='`$ECHO "X$lt_prog_compiler_pic_CXX" | $Xsed -e "$delay_single_quote_subst"`'
-lt_prog_compiler_pic_F77='`$ECHO "X$lt_prog_compiler_pic_F77" | $Xsed -e "$delay_single_quote_subst"`'
-lt_prog_compiler_pic_FC='`$ECHO "X$lt_prog_compiler_pic_FC" | $Xsed -e "$delay_single_quote_subst"`'
-lt_prog_compiler_static_CXX='`$ECHO "X$lt_prog_compiler_static_CXX" | $Xsed -e "$delay_single_quote_subst"`'
-lt_prog_compiler_static_F77='`$ECHO "X$lt_prog_compiler_static_F77" | $Xsed -e "$delay_single_quote_subst"`'
-lt_prog_compiler_static_FC='`$ECHO "X$lt_prog_compiler_static_FC" | $Xsed -e "$delay_single_quote_subst"`'
-lt_cv_prog_compiler_c_o_CXX='`$ECHO "X$lt_cv_prog_compiler_c_o_CXX" | $Xsed -e "$delay_single_quote_subst"`'
-lt_cv_prog_compiler_c_o_F77='`$ECHO "X$lt_cv_prog_compiler_c_o_F77" | $Xsed -e "$delay_single_quote_subst"`'
-lt_cv_prog_compiler_c_o_FC='`$ECHO "X$lt_cv_prog_compiler_c_o_FC" | $Xsed -e "$delay_single_quote_subst"`'
-archive_cmds_need_lc_CXX='`$ECHO "X$archive_cmds_need_lc_CXX" | $Xsed -e "$delay_single_quote_subst"`'
-archive_cmds_need_lc_F77='`$ECHO "X$archive_cmds_need_lc_F77" | $Xsed -e "$delay_single_quote_subst"`'
-archive_cmds_need_lc_FC='`$ECHO "X$archive_cmds_need_lc_FC" | $Xsed -e "$delay_single_quote_subst"`'
-enable_shared_with_static_runtimes_CXX='`$ECHO "X$enable_shared_with_static_runtimes_CXX" | $Xsed -e "$delay_single_quote_subst"`'
-enable_shared_with_static_runtimes_F77='`$ECHO "X$enable_shared_with_static_runtimes_F77" | $Xsed -e "$delay_single_quote_subst"`'
-enable_shared_with_static_runtimes_FC='`$ECHO "X$enable_shared_with_static_runtimes_FC" | $Xsed -e "$delay_single_quote_subst"`'
-export_dynamic_flag_spec_CXX='`$ECHO "X$export_dynamic_flag_spec_CXX" | $Xsed -e "$delay_single_quote_subst"`'
-export_dynamic_flag_spec_F77='`$ECHO "X$export_dynamic_flag_spec_F77" | $Xsed -e "$delay_single_quote_subst"`'
-export_dynamic_flag_spec_FC='`$ECHO "X$export_dynamic_flag_spec_FC" | $Xsed -e "$delay_single_quote_subst"`'
-whole_archive_flag_spec_CXX='`$ECHO "X$whole_archive_flag_spec_CXX" | $Xsed -e "$delay_single_quote_subst"`'
-whole_archive_flag_spec_F77='`$ECHO "X$whole_archive_flag_spec_F77" | $Xsed -e "$delay_single_quote_subst"`'
-whole_archive_flag_spec_FC='`$ECHO "X$whole_archive_flag_spec_FC" | $Xsed -e "$delay_single_quote_subst"`'
-compiler_needs_object_CXX='`$ECHO "X$compiler_needs_object_CXX" | $Xsed -e "$delay_single_quote_subst"`'
-compiler_needs_object_F77='`$ECHO "X$compiler_needs_object_F77" | $Xsed -e "$delay_single_quote_subst"`'
-compiler_needs_object_FC='`$ECHO "X$compiler_needs_object_FC" | $Xsed -e "$delay_single_quote_subst"`'
-old_archive_from_new_cmds_CXX='`$ECHO "X$old_archive_from_new_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`'
-old_archive_from_new_cmds_F77='`$ECHO "X$old_archive_from_new_cmds_F77" | $Xsed -e "$delay_single_quote_subst"`'
-old_archive_from_new_cmds_FC='`$ECHO "X$old_archive_from_new_cmds_FC" | $Xsed -e "$delay_single_quote_subst"`'
-old_archive_from_expsyms_cmds_CXX='`$ECHO "X$old_archive_from_expsyms_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`'
-old_archive_from_expsyms_cmds_F77='`$ECHO "X$old_archive_from_expsyms_cmds_F77" | $Xsed -e "$delay_single_quote_subst"`'
-old_archive_from_expsyms_cmds_FC='`$ECHO "X$old_archive_from_expsyms_cmds_FC" | $Xsed -e "$delay_single_quote_subst"`'
-archive_cmds_CXX='`$ECHO "X$archive_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`'
-archive_cmds_F77='`$ECHO "X$archive_cmds_F77" | $Xsed -e "$delay_single_quote_subst"`'
-archive_cmds_FC='`$ECHO "X$archive_cmds_FC" | $Xsed -e "$delay_single_quote_subst"`'
-archive_expsym_cmds_CXX='`$ECHO "X$archive_expsym_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`'
-archive_expsym_cmds_F77='`$ECHO "X$archive_expsym_cmds_F77" | $Xsed -e "$delay_single_quote_subst"`'
-archive_expsym_cmds_FC='`$ECHO "X$archive_expsym_cmds_FC" | $Xsed -e "$delay_single_quote_subst"`'
-module_cmds_CXX='`$ECHO "X$module_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`'
-module_cmds_F77='`$ECHO "X$module_cmds_F77" | $Xsed -e "$delay_single_quote_subst"`'
-module_cmds_FC='`$ECHO "X$module_cmds_FC" | $Xsed -e "$delay_single_quote_subst"`'
-module_expsym_cmds_CXX='`$ECHO "X$module_expsym_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`'
-module_expsym_cmds_F77='`$ECHO "X$module_expsym_cmds_F77" | $Xsed -e "$delay_single_quote_subst"`'
-module_expsym_cmds_FC='`$ECHO "X$module_expsym_cmds_FC" | $Xsed -e "$delay_single_quote_subst"`'
-with_gnu_ld_CXX='`$ECHO "X$with_gnu_ld_CXX" | $Xsed -e "$delay_single_quote_subst"`'
-with_gnu_ld_F77='`$ECHO "X$with_gnu_ld_F77" | $Xsed -e "$delay_single_quote_subst"`'
-with_gnu_ld_FC='`$ECHO "X$with_gnu_ld_FC" | $Xsed -e "$delay_single_quote_subst"`'
-allow_undefined_flag_CXX='`$ECHO "X$allow_undefined_flag_CXX" | $Xsed -e "$delay_single_quote_subst"`'
-allow_undefined_flag_F77='`$ECHO "X$allow_undefined_flag_F77" | $Xsed -e "$delay_single_quote_subst"`'
-allow_undefined_flag_FC='`$ECHO "X$allow_undefined_flag_FC" | $Xsed -e "$delay_single_quote_subst"`'
-no_undefined_flag_CXX='`$ECHO "X$no_undefined_flag_CXX" | $Xsed -e "$delay_single_quote_subst"`'
-no_undefined_flag_F77='`$ECHO "X$no_undefined_flag_F77" | $Xsed -e "$delay_single_quote_subst"`'
-no_undefined_flag_FC='`$ECHO "X$no_undefined_flag_FC" | $Xsed -e "$delay_single_quote_subst"`'
-hardcode_libdir_flag_spec_CXX='`$ECHO "X$hardcode_libdir_flag_spec_CXX" | $Xsed -e "$delay_single_quote_subst"`'
-hardcode_libdir_flag_spec_F77='`$ECHO "X$hardcode_libdir_flag_spec_F77" | $Xsed -e "$delay_single_quote_subst"`'
-hardcode_libdir_flag_spec_FC='`$ECHO "X$hardcode_libdir_flag_spec_FC" | $Xsed -e "$delay_single_quote_subst"`'
-hardcode_libdir_flag_spec_ld_CXX='`$ECHO "X$hardcode_libdir_flag_spec_ld_CXX" | $Xsed -e "$delay_single_quote_subst"`'
-hardcode_libdir_flag_spec_ld_F77='`$ECHO "X$hardcode_libdir_flag_spec_ld_F77" | $Xsed -e "$delay_single_quote_subst"`'
-hardcode_libdir_flag_spec_ld_FC='`$ECHO "X$hardcode_libdir_flag_spec_ld_FC" | $Xsed -e "$delay_single_quote_subst"`'
-hardcode_libdir_separator_CXX='`$ECHO "X$hardcode_libdir_separator_CXX" | $Xsed -e "$delay_single_quote_subst"`'
-hardcode_libdir_separator_F77='`$ECHO "X$hardcode_libdir_separator_F77" | $Xsed -e "$delay_single_quote_subst"`'
-hardcode_libdir_separator_FC='`$ECHO "X$hardcode_libdir_separator_FC" | $Xsed -e "$delay_single_quote_subst"`'
-hardcode_direct_CXX='`$ECHO "X$hardcode_direct_CXX" | $Xsed -e "$delay_single_quote_subst"`'
-hardcode_direct_F77='`$ECHO "X$hardcode_direct_F77" | $Xsed -e "$delay_single_quote_subst"`'
-hardcode_direct_FC='`$ECHO "X$hardcode_direct_FC" | $Xsed -e "$delay_single_quote_subst"`'
-hardcode_direct_absolute_CXX='`$ECHO "X$hardcode_direct_absolute_CXX" | $Xsed -e "$delay_single_quote_subst"`'
-hardcode_direct_absolute_F77='`$ECHO "X$hardcode_direct_absolute_F77" | $Xsed -e "$delay_single_quote_subst"`'
-hardcode_direct_absolute_FC='`$ECHO "X$hardcode_direct_absolute_FC" | $Xsed -e "$delay_single_quote_subst"`'
-hardcode_minus_L_CXX='`$ECHO "X$hardcode_minus_L_CXX" | $Xsed -e "$delay_single_quote_subst"`'
-hardcode_minus_L_F77='`$ECHO "X$hardcode_minus_L_F77" | $Xsed -e "$delay_single_quote_subst"`'
-hardcode_minus_L_FC='`$ECHO "X$hardcode_minus_L_FC" | $Xsed -e "$delay_single_quote_subst"`'
-hardcode_shlibpath_var_CXX='`$ECHO "X$hardcode_shlibpath_var_CXX" | $Xsed -e "$delay_single_quote_subst"`'
-hardcode_shlibpath_var_F77='`$ECHO "X$hardcode_shlibpath_var_F77" | $Xsed -e "$delay_single_quote_subst"`'
-hardcode_shlibpath_var_FC='`$ECHO "X$hardcode_shlibpath_var_FC" | $Xsed -e "$delay_single_quote_subst"`'
-hardcode_automatic_CXX='`$ECHO "X$hardcode_automatic_CXX" | $Xsed -e "$delay_single_quote_subst"`'
-hardcode_automatic_F77='`$ECHO "X$hardcode_automatic_F77" | $Xsed -e "$delay_single_quote_subst"`'
-hardcode_automatic_FC='`$ECHO "X$hardcode_automatic_FC" | $Xsed -e "$delay_single_quote_subst"`'
-inherit_rpath_CXX='`$ECHO "X$inherit_rpath_CXX" | $Xsed -e "$delay_single_quote_subst"`'
-inherit_rpath_F77='`$ECHO "X$inherit_rpath_F77" | $Xsed -e "$delay_single_quote_subst"`'
-inherit_rpath_FC='`$ECHO "X$inherit_rpath_FC" | $Xsed -e "$delay_single_quote_subst"`'
-link_all_deplibs_CXX='`$ECHO "X$link_all_deplibs_CXX" | $Xsed -e "$delay_single_quote_subst"`'
-link_all_deplibs_F77='`$ECHO "X$link_all_deplibs_F77" | $Xsed -e "$delay_single_quote_subst"`'
-link_all_deplibs_FC='`$ECHO "X$link_all_deplibs_FC" | $Xsed -e "$delay_single_quote_subst"`'
-fix_srcfile_path_CXX='`$ECHO "X$fix_srcfile_path_CXX" | $Xsed -e "$delay_single_quote_subst"`'
-fix_srcfile_path_F77='`$ECHO "X$fix_srcfile_path_F77" | $Xsed -e "$delay_single_quote_subst"`'
-fix_srcfile_path_FC='`$ECHO "X$fix_srcfile_path_FC" | $Xsed -e "$delay_single_quote_subst"`'
-always_export_symbols_CXX='`$ECHO "X$always_export_symbols_CXX" | $Xsed -e "$delay_single_quote_subst"`'
-always_export_symbols_F77='`$ECHO "X$always_export_symbols_F77" | $Xsed -e "$delay_single_quote_subst"`'
-always_export_symbols_FC='`$ECHO "X$always_export_symbols_FC" | $Xsed -e "$delay_single_quote_subst"`'
-export_symbols_cmds_CXX='`$ECHO "X$export_symbols_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`'
-export_symbols_cmds_F77='`$ECHO "X$export_symbols_cmds_F77" | $Xsed -e "$delay_single_quote_subst"`'
-export_symbols_cmds_FC='`$ECHO "X$export_symbols_cmds_FC" | $Xsed -e "$delay_single_quote_subst"`'
-exclude_expsyms_CXX='`$ECHO "X$exclude_expsyms_CXX" | $Xsed -e "$delay_single_quote_subst"`'
-exclude_expsyms_F77='`$ECHO "X$exclude_expsyms_F77" | $Xsed -e "$delay_single_quote_subst"`'
-exclude_expsyms_FC='`$ECHO "X$exclude_expsyms_FC" | $Xsed -e "$delay_single_quote_subst"`'
-include_expsyms_CXX='`$ECHO "X$include_expsyms_CXX" | $Xsed -e "$delay_single_quote_subst"`'
-include_expsyms_F77='`$ECHO "X$include_expsyms_F77" | $Xsed -e "$delay_single_quote_subst"`'
-include_expsyms_FC='`$ECHO "X$include_expsyms_FC" | $Xsed -e "$delay_single_quote_subst"`'
-prelink_cmds_CXX='`$ECHO "X$prelink_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`'
-prelink_cmds_F77='`$ECHO "X$prelink_cmds_F77" | $Xsed -e "$delay_single_quote_subst"`'
-prelink_cmds_FC='`$ECHO "X$prelink_cmds_FC" | $Xsed -e "$delay_single_quote_subst"`'
-file_list_spec_CXX='`$ECHO "X$file_list_spec_CXX" | $Xsed -e "$delay_single_quote_subst"`'
-file_list_spec_F77='`$ECHO "X$file_list_spec_F77" | $Xsed -e "$delay_single_quote_subst"`'
-file_list_spec_FC='`$ECHO "X$file_list_spec_FC" | $Xsed -e "$delay_single_quote_subst"`'
-hardcode_action_CXX='`$ECHO "X$hardcode_action_CXX" | $Xsed -e "$delay_single_quote_subst"`'
-hardcode_action_F77='`$ECHO "X$hardcode_action_F77" | $Xsed -e "$delay_single_quote_subst"`'
-hardcode_action_FC='`$ECHO "X$hardcode_action_FC" | $Xsed -e "$delay_single_quote_subst"`'
-compiler_lib_search_dirs_CXX='`$ECHO "X$compiler_lib_search_dirs_CXX" | $Xsed -e "$delay_single_quote_subst"`'
-compiler_lib_search_dirs_F77='`$ECHO "X$compiler_lib_search_dirs_F77" | $Xsed -e "$delay_single_quote_subst"`'
-compiler_lib_search_dirs_FC='`$ECHO "X$compiler_lib_search_dirs_FC" | $Xsed -e "$delay_single_quote_subst"`'
-predep_objects_CXX='`$ECHO "X$predep_objects_CXX" | $Xsed -e "$delay_single_quote_subst"`'
-predep_objects_F77='`$ECHO "X$predep_objects_F77" | $Xsed -e "$delay_single_quote_subst"`'
-predep_objects_FC='`$ECHO "X$predep_objects_FC" | $Xsed -e "$delay_single_quote_subst"`'
-postdep_objects_CXX='`$ECHO "X$postdep_objects_CXX" | $Xsed -e "$delay_single_quote_subst"`'
-postdep_objects_F77='`$ECHO "X$postdep_objects_F77" | $Xsed -e "$delay_single_quote_subst"`'
-postdep_objects_FC='`$ECHO "X$postdep_objects_FC" | $Xsed -e "$delay_single_quote_subst"`'
-predeps_CXX='`$ECHO "X$predeps_CXX" | $Xsed -e "$delay_single_quote_subst"`'
-predeps_F77='`$ECHO "X$predeps_F77" | $Xsed -e "$delay_single_quote_subst"`'
-predeps_FC='`$ECHO "X$predeps_FC" | $Xsed -e "$delay_single_quote_subst"`'
-postdeps_CXX='`$ECHO "X$postdeps_CXX" | $Xsed -e "$delay_single_quote_subst"`'
-postdeps_F77='`$ECHO "X$postdeps_F77" | $Xsed -e "$delay_single_quote_subst"`'
-postdeps_FC='`$ECHO "X$postdeps_FC" | $Xsed -e "$delay_single_quote_subst"`'
-compiler_lib_search_path_CXX='`$ECHO "X$compiler_lib_search_path_CXX" | $Xsed -e "$delay_single_quote_subst"`'
-compiler_lib_search_path_F77='`$ECHO "X$compiler_lib_search_path_F77" | $Xsed -e "$delay_single_quote_subst"`'
-compiler_lib_search_path_FC='`$ECHO "X$compiler_lib_search_path_FC" | $Xsed -e "$delay_single_quote_subst"`'
+enable_static='`$ECHO "$enable_static" | $SED "$delay_single_quote_subst"`'
+macro_version='`$ECHO "$macro_version" | $SED "$delay_single_quote_subst"`'
+macro_revision='`$ECHO "$macro_revision" | $SED "$delay_single_quote_subst"`'
+enable_shared='`$ECHO "$enable_shared" | $SED "$delay_single_quote_subst"`'
+pic_mode='`$ECHO "$pic_mode" | $SED "$delay_single_quote_subst"`'
+enable_fast_install='`$ECHO "$enable_fast_install" | $SED "$delay_single_quote_subst"`'
+shared_archive_member_spec='`$ECHO "$shared_archive_member_spec" | $SED "$delay_single_quote_subst"`'
+SHELL='`$ECHO "$SHELL" | $SED "$delay_single_quote_subst"`'
+ECHO='`$ECHO "$ECHO" | $SED "$delay_single_quote_subst"`'
+PATH_SEPARATOR='`$ECHO "$PATH_SEPARATOR" | $SED "$delay_single_quote_subst"`'
+host_alias='`$ECHO "$host_alias" | $SED "$delay_single_quote_subst"`'
+host='`$ECHO "$host" | $SED "$delay_single_quote_subst"`'
+host_os='`$ECHO "$host_os" | $SED "$delay_single_quote_subst"`'
+build_alias='`$ECHO "$build_alias" | $SED "$delay_single_quote_subst"`'
+build='`$ECHO "$build" | $SED "$delay_single_quote_subst"`'
+build_os='`$ECHO "$build_os" | $SED "$delay_single_quote_subst"`'
+SED='`$ECHO "$SED" | $SED "$delay_single_quote_subst"`'
+Xsed='`$ECHO "$Xsed" | $SED "$delay_single_quote_subst"`'
+GREP='`$ECHO "$GREP" | $SED "$delay_single_quote_subst"`'
+EGREP='`$ECHO "$EGREP" | $SED "$delay_single_quote_subst"`'
+FGREP='`$ECHO "$FGREP" | $SED "$delay_single_quote_subst"`'
+LD='`$ECHO "$LD" | $SED "$delay_single_quote_subst"`'
+NM='`$ECHO "$NM" | $SED "$delay_single_quote_subst"`'
+LN_S='`$ECHO "$LN_S" | $SED "$delay_single_quote_subst"`'
+max_cmd_len='`$ECHO "$max_cmd_len" | $SED "$delay_single_quote_subst"`'
+ac_objext='`$ECHO "$ac_objext" | $SED "$delay_single_quote_subst"`'
+exeext='`$ECHO "$exeext" | $SED "$delay_single_quote_subst"`'
+lt_unset='`$ECHO "$lt_unset" | $SED "$delay_single_quote_subst"`'
+lt_SP2NL='`$ECHO "$lt_SP2NL" | $SED "$delay_single_quote_subst"`'
+lt_NL2SP='`$ECHO "$lt_NL2SP" | $SED "$delay_single_quote_subst"`'
+lt_cv_to_host_file_cmd='`$ECHO "$lt_cv_to_host_file_cmd" | $SED "$delay_single_quote_subst"`'
+lt_cv_to_tool_file_cmd='`$ECHO "$lt_cv_to_tool_file_cmd" | $SED "$delay_single_quote_subst"`'
+reload_flag='`$ECHO "$reload_flag" | $SED "$delay_single_quote_subst"`'
+reload_cmds='`$ECHO "$reload_cmds" | $SED "$delay_single_quote_subst"`'
+OBJDUMP='`$ECHO "$OBJDUMP" | $SED "$delay_single_quote_subst"`'
+deplibs_check_method='`$ECHO "$deplibs_check_method" | $SED "$delay_single_quote_subst"`'
+file_magic_cmd='`$ECHO "$file_magic_cmd" | $SED "$delay_single_quote_subst"`'
+file_magic_glob='`$ECHO "$file_magic_glob" | $SED "$delay_single_quote_subst"`'
+want_nocaseglob='`$ECHO "$want_nocaseglob" | $SED "$delay_single_quote_subst"`'
+DLLTOOL='`$ECHO "$DLLTOOL" | $SED "$delay_single_quote_subst"`'
+sharedlib_from_linklib_cmd='`$ECHO "$sharedlib_from_linklib_cmd" | $SED "$delay_single_quote_subst"`'
+AR='`$ECHO "$AR" | $SED "$delay_single_quote_subst"`'
+AR_FLAGS='`$ECHO "$AR_FLAGS" | $SED "$delay_single_quote_subst"`'
+archiver_list_spec='`$ECHO "$archiver_list_spec" | $SED "$delay_single_quote_subst"`'
+STRIP='`$ECHO "$STRIP" | $SED "$delay_single_quote_subst"`'
+RANLIB='`$ECHO "$RANLIB" | $SED "$delay_single_quote_subst"`'
+old_postinstall_cmds='`$ECHO "$old_postinstall_cmds" | $SED "$delay_single_quote_subst"`'
+old_postuninstall_cmds='`$ECHO "$old_postuninstall_cmds" | $SED "$delay_single_quote_subst"`'
+old_archive_cmds='`$ECHO "$old_archive_cmds" | $SED "$delay_single_quote_subst"`'
+lock_old_archive_extraction='`$ECHO "$lock_old_archive_extraction" | $SED "$delay_single_quote_subst"`'
+CC='`$ECHO "$CC" | $SED "$delay_single_quote_subst"`'
+CFLAGS='`$ECHO "$CFLAGS" | $SED "$delay_single_quote_subst"`'
+compiler='`$ECHO "$compiler" | $SED "$delay_single_quote_subst"`'
+GCC='`$ECHO "$GCC" | $SED "$delay_single_quote_subst"`'
+lt_cv_sys_global_symbol_pipe='`$ECHO "$lt_cv_sys_global_symbol_pipe" | $SED "$delay_single_quote_subst"`'
+lt_cv_sys_global_symbol_to_cdecl='`$ECHO "$lt_cv_sys_global_symbol_to_cdecl" | $SED "$delay_single_quote_subst"`'
+lt_cv_sys_global_symbol_to_import='`$ECHO "$lt_cv_sys_global_symbol_to_import" | $SED "$delay_single_quote_subst"`'
+lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address" | $SED "$delay_single_quote_subst"`'
+lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address_lib_prefix" | $SED "$delay_single_quote_subst"`'
+lt_cv_nm_interface='`$ECHO "$lt_cv_nm_interface" | $SED "$delay_single_quote_subst"`'
+nm_file_list_spec='`$ECHO "$nm_file_list_spec" | $SED "$delay_single_quote_subst"`'
+lt_sysroot='`$ECHO "$lt_sysroot" | $SED "$delay_single_quote_subst"`'
+lt_cv_truncate_bin='`$ECHO "$lt_cv_truncate_bin" | $SED "$delay_single_quote_subst"`'
+objdir='`$ECHO "$objdir" | $SED "$delay_single_quote_subst"`'
+MAGIC_CMD='`$ECHO "$MAGIC_CMD" | $SED "$delay_single_quote_subst"`'
+lt_prog_compiler_no_builtin_flag='`$ECHO "$lt_prog_compiler_no_builtin_flag" | $SED "$delay_single_quote_subst"`'
+lt_prog_compiler_pic='`$ECHO "$lt_prog_compiler_pic" | $SED "$delay_single_quote_subst"`'
+lt_prog_compiler_wl='`$ECHO "$lt_prog_compiler_wl" | $SED "$delay_single_quote_subst"`'
+lt_prog_compiler_static='`$ECHO "$lt_prog_compiler_static" | $SED "$delay_single_quote_subst"`'
+lt_cv_prog_compiler_c_o='`$ECHO "$lt_cv_prog_compiler_c_o" | $SED "$delay_single_quote_subst"`'
+need_locks='`$ECHO "$need_locks" | $SED "$delay_single_quote_subst"`'
+MANIFEST_TOOL='`$ECHO "$MANIFEST_TOOL" | $SED "$delay_single_quote_subst"`'
+DSYMUTIL='`$ECHO "$DSYMUTIL" | $SED "$delay_single_quote_subst"`'
+NMEDIT='`$ECHO "$NMEDIT" | $SED "$delay_single_quote_subst"`'
+LIPO='`$ECHO "$LIPO" | $SED "$delay_single_quote_subst"`'
+OTOOL='`$ECHO "$OTOOL" | $SED "$delay_single_quote_subst"`'
+OTOOL64='`$ECHO "$OTOOL64" | $SED "$delay_single_quote_subst"`'
+libext='`$ECHO "$libext" | $SED "$delay_single_quote_subst"`'
+shrext_cmds='`$ECHO "$shrext_cmds" | $SED "$delay_single_quote_subst"`'
+extract_expsyms_cmds='`$ECHO "$extract_expsyms_cmds" | $SED "$delay_single_quote_subst"`'
+archive_cmds_need_lc='`$ECHO "$archive_cmds_need_lc" | $SED "$delay_single_quote_subst"`'
+enable_shared_with_static_runtimes='`$ECHO "$enable_shared_with_static_runtimes" | $SED "$delay_single_quote_subst"`'
+export_dynamic_flag_spec='`$ECHO "$export_dynamic_flag_spec" | $SED "$delay_single_quote_subst"`'
+whole_archive_flag_spec='`$ECHO "$whole_archive_flag_spec" | $SED "$delay_single_quote_subst"`'
+compiler_needs_object='`$ECHO "$compiler_needs_object" | $SED "$delay_single_quote_subst"`'
+old_archive_from_new_cmds='`$ECHO "$old_archive_from_new_cmds" | $SED "$delay_single_quote_subst"`'
+old_archive_from_expsyms_cmds='`$ECHO "$old_archive_from_expsyms_cmds" | $SED "$delay_single_quote_subst"`'
+archive_cmds='`$ECHO "$archive_cmds" | $SED "$delay_single_quote_subst"`'
+archive_expsym_cmds='`$ECHO "$archive_expsym_cmds" | $SED "$delay_single_quote_subst"`'
+module_cmds='`$ECHO "$module_cmds" | $SED "$delay_single_quote_subst"`'
+module_expsym_cmds='`$ECHO "$module_expsym_cmds" | $SED "$delay_single_quote_subst"`'
+with_gnu_ld='`$ECHO "$with_gnu_ld" | $SED "$delay_single_quote_subst"`'
+allow_undefined_flag='`$ECHO "$allow_undefined_flag" | $SED "$delay_single_quote_subst"`'
+no_undefined_flag='`$ECHO "$no_undefined_flag" | $SED "$delay_single_quote_subst"`'
+hardcode_libdir_flag_spec='`$ECHO "$hardcode_libdir_flag_spec" | $SED "$delay_single_quote_subst"`'
+hardcode_libdir_separator='`$ECHO "$hardcode_libdir_separator" | $SED "$delay_single_quote_subst"`'
+hardcode_direct='`$ECHO "$hardcode_direct" | $SED "$delay_single_quote_subst"`'
+hardcode_direct_absolute='`$ECHO "$hardcode_direct_absolute" | $SED "$delay_single_quote_subst"`'
+hardcode_minus_L='`$ECHO "$hardcode_minus_L" | $SED "$delay_single_quote_subst"`'
+hardcode_shlibpath_var='`$ECHO "$hardcode_shlibpath_var" | $SED "$delay_single_quote_subst"`'
+hardcode_automatic='`$ECHO "$hardcode_automatic" | $SED "$delay_single_quote_subst"`'
+inherit_rpath='`$ECHO "$inherit_rpath" | $SED "$delay_single_quote_subst"`'
+link_all_deplibs='`$ECHO "$link_all_deplibs" | $SED "$delay_single_quote_subst"`'
+always_export_symbols='`$ECHO "$always_export_symbols" | $SED "$delay_single_quote_subst"`'
+export_symbols_cmds='`$ECHO "$export_symbols_cmds" | $SED "$delay_single_quote_subst"`'
+exclude_expsyms='`$ECHO "$exclude_expsyms" | $SED "$delay_single_quote_subst"`'
+include_expsyms='`$ECHO "$include_expsyms" | $SED "$delay_single_quote_subst"`'
+prelink_cmds='`$ECHO "$prelink_cmds" | $SED "$delay_single_quote_subst"`'
+postlink_cmds='`$ECHO "$postlink_cmds" | $SED "$delay_single_quote_subst"`'
+file_list_spec='`$ECHO "$file_list_spec" | $SED "$delay_single_quote_subst"`'
+variables_saved_for_relink='`$ECHO "$variables_saved_for_relink" | $SED "$delay_single_quote_subst"`'
+need_lib_prefix='`$ECHO "$need_lib_prefix" | $SED "$delay_single_quote_subst"`'
+need_version='`$ECHO "$need_version" | $SED "$delay_single_quote_subst"`'
+version_type='`$ECHO "$version_type" | $SED "$delay_single_quote_subst"`'
+runpath_var='`$ECHO "$runpath_var" | $SED "$delay_single_quote_subst"`'
+shlibpath_var='`$ECHO "$shlibpath_var" | $SED "$delay_single_quote_subst"`'
+shlibpath_overrides_runpath='`$ECHO "$shlibpath_overrides_runpath" | $SED "$delay_single_quote_subst"`'
+libname_spec='`$ECHO "$libname_spec" | $SED "$delay_single_quote_subst"`'
+library_names_spec='`$ECHO "$library_names_spec" | $SED "$delay_single_quote_subst"`'
+soname_spec='`$ECHO "$soname_spec" | $SED "$delay_single_quote_subst"`'
+install_override_mode='`$ECHO "$install_override_mode" | $SED "$delay_single_quote_subst"`'
+postinstall_cmds='`$ECHO "$postinstall_cmds" | $SED "$delay_single_quote_subst"`'
+postuninstall_cmds='`$ECHO "$postuninstall_cmds" | $SED "$delay_single_quote_subst"`'
+finish_cmds='`$ECHO "$finish_cmds" | $SED "$delay_single_quote_subst"`'
+finish_eval='`$ECHO "$finish_eval" | $SED "$delay_single_quote_subst"`'
+hardcode_into_libs='`$ECHO "$hardcode_into_libs" | $SED "$delay_single_quote_subst"`'
+sys_lib_search_path_spec='`$ECHO "$sys_lib_search_path_spec" | $SED "$delay_single_quote_subst"`'
+configure_time_dlsearch_path='`$ECHO "$configure_time_dlsearch_path" | $SED "$delay_single_quote_subst"`'
+configure_time_lt_sys_library_path='`$ECHO "$configure_time_lt_sys_library_path" | $SED "$delay_single_quote_subst"`'
+hardcode_action='`$ECHO "$hardcode_action" | $SED "$delay_single_quote_subst"`'
+enable_dlopen='`$ECHO "$enable_dlopen" | $SED "$delay_single_quote_subst"`'
+enable_dlopen_self='`$ECHO "$enable_dlopen_self" | $SED "$delay_single_quote_subst"`'
+enable_dlopen_self_static='`$ECHO "$enable_dlopen_self_static" | $SED "$delay_single_quote_subst"`'
+old_striplib='`$ECHO "$old_striplib" | $SED "$delay_single_quote_subst"`'
+striplib='`$ECHO "$striplib" | $SED "$delay_single_quote_subst"`'
+compiler_lib_search_dirs='`$ECHO "$compiler_lib_search_dirs" | $SED "$delay_single_quote_subst"`'
+predep_objects='`$ECHO "$predep_objects" | $SED "$delay_single_quote_subst"`'
+postdep_objects='`$ECHO "$postdep_objects" | $SED "$delay_single_quote_subst"`'
+predeps='`$ECHO "$predeps" | $SED "$delay_single_quote_subst"`'
+postdeps='`$ECHO "$postdeps" | $SED "$delay_single_quote_subst"`'
+compiler_lib_search_path='`$ECHO "$compiler_lib_search_path" | $SED "$delay_single_quote_subst"`'
+LD_CXX='`$ECHO "$LD_CXX" | $SED "$delay_single_quote_subst"`'
+LD_F77='`$ECHO "$LD_F77" | $SED "$delay_single_quote_subst"`'
+LD_FC='`$ECHO "$LD_FC" | $SED "$delay_single_quote_subst"`'
+reload_flag_CXX='`$ECHO "$reload_flag_CXX" | $SED "$delay_single_quote_subst"`'
+reload_flag_F77='`$ECHO "$reload_flag_F77" | $SED "$delay_single_quote_subst"`'
+reload_flag_FC='`$ECHO "$reload_flag_FC" | $SED "$delay_single_quote_subst"`'
+reload_cmds_CXX='`$ECHO "$reload_cmds_CXX" | $SED "$delay_single_quote_subst"`'
+reload_cmds_F77='`$ECHO "$reload_cmds_F77" | $SED "$delay_single_quote_subst"`'
+reload_cmds_FC='`$ECHO "$reload_cmds_FC" | $SED "$delay_single_quote_subst"`'
+old_archive_cmds_CXX='`$ECHO "$old_archive_cmds_CXX" | $SED "$delay_single_quote_subst"`'
+old_archive_cmds_F77='`$ECHO "$old_archive_cmds_F77" | $SED "$delay_single_quote_subst"`'
+old_archive_cmds_FC='`$ECHO "$old_archive_cmds_FC" | $SED "$delay_single_quote_subst"`'
+compiler_CXX='`$ECHO "$compiler_CXX" | $SED "$delay_single_quote_subst"`'
+compiler_F77='`$ECHO "$compiler_F77" | $SED "$delay_single_quote_subst"`'
+compiler_FC='`$ECHO "$compiler_FC" | $SED "$delay_single_quote_subst"`'
+GCC_CXX='`$ECHO "$GCC_CXX" | $SED "$delay_single_quote_subst"`'
+GCC_F77='`$ECHO "$GCC_F77" | $SED "$delay_single_quote_subst"`'
+GCC_FC='`$ECHO "$GCC_FC" | $SED "$delay_single_quote_subst"`'
+lt_prog_compiler_no_builtin_flag_CXX='`$ECHO "$lt_prog_compiler_no_builtin_flag_CXX" | $SED "$delay_single_quote_subst"`'
+lt_prog_compiler_no_builtin_flag_F77='`$ECHO "$lt_prog_compiler_no_builtin_flag_F77" | $SED "$delay_single_quote_subst"`'
+lt_prog_compiler_no_builtin_flag_FC='`$ECHO "$lt_prog_compiler_no_builtin_flag_FC" | $SED "$delay_single_quote_subst"`'
+lt_prog_compiler_pic_CXX='`$ECHO "$lt_prog_compiler_pic_CXX" | $SED "$delay_single_quote_subst"`'
+lt_prog_compiler_pic_F77='`$ECHO "$lt_prog_compiler_pic_F77" | $SED "$delay_single_quote_subst"`'
+lt_prog_compiler_pic_FC='`$ECHO "$lt_prog_compiler_pic_FC" | $SED "$delay_single_quote_subst"`'
+lt_prog_compiler_wl_CXX='`$ECHO "$lt_prog_compiler_wl_CXX" | $SED "$delay_single_quote_subst"`'
+lt_prog_compiler_wl_F77='`$ECHO "$lt_prog_compiler_wl_F77" | $SED "$delay_single_quote_subst"`'
+lt_prog_compiler_wl_FC='`$ECHO "$lt_prog_compiler_wl_FC" | $SED "$delay_single_quote_subst"`'
+lt_prog_compiler_static_CXX='`$ECHO "$lt_prog_compiler_static_CXX" | $SED "$delay_single_quote_subst"`'
+lt_prog_compiler_static_F77='`$ECHO "$lt_prog_compiler_static_F77" | $SED "$delay_single_quote_subst"`'
+lt_prog_compiler_static_FC='`$ECHO "$lt_prog_compiler_static_FC" | $SED "$delay_single_quote_subst"`'
+lt_cv_prog_compiler_c_o_CXX='`$ECHO "$lt_cv_prog_compiler_c_o_CXX" | $SED "$delay_single_quote_subst"`'
+lt_cv_prog_compiler_c_o_F77='`$ECHO "$lt_cv_prog_compiler_c_o_F77" | $SED "$delay_single_quote_subst"`'
+lt_cv_prog_compiler_c_o_FC='`$ECHO "$lt_cv_prog_compiler_c_o_FC" | $SED "$delay_single_quote_subst"`'
+archive_cmds_need_lc_CXX='`$ECHO "$archive_cmds_need_lc_CXX" | $SED "$delay_single_quote_subst"`'
+archive_cmds_need_lc_F77='`$ECHO "$archive_cmds_need_lc_F77" | $SED "$delay_single_quote_subst"`'
+archive_cmds_need_lc_FC='`$ECHO "$archive_cmds_need_lc_FC" | $SED "$delay_single_quote_subst"`'
+enable_shared_with_static_runtimes_CXX='`$ECHO "$enable_shared_with_static_runtimes_CXX" | $SED "$delay_single_quote_subst"`'
+enable_shared_with_static_runtimes_F77='`$ECHO "$enable_shared_with_static_runtimes_F77" | $SED "$delay_single_quote_subst"`'
+enable_shared_with_static_runtimes_FC='`$ECHO "$enable_shared_with_static_runtimes_FC" | $SED "$delay_single_quote_subst"`'
+export_dynamic_flag_spec_CXX='`$ECHO "$export_dynamic_flag_spec_CXX" | $SED "$delay_single_quote_subst"`'
+export_dynamic_flag_spec_F77='`$ECHO "$export_dynamic_flag_spec_F77" | $SED "$delay_single_quote_subst"`'
+export_dynamic_flag_spec_FC='`$ECHO "$export_dynamic_flag_spec_FC" | $SED "$delay_single_quote_subst"`'
+whole_archive_flag_spec_CXX='`$ECHO "$whole_archive_flag_spec_CXX" | $SED "$delay_single_quote_subst"`'
+whole_archive_flag_spec_F77='`$ECHO "$whole_archive_flag_spec_F77" | $SED "$delay_single_quote_subst"`'
+whole_archive_flag_spec_FC='`$ECHO "$whole_archive_flag_spec_FC" | $SED "$delay_single_quote_subst"`'
+compiler_needs_object_CXX='`$ECHO "$compiler_needs_object_CXX" | $SED "$delay_single_quote_subst"`'
+compiler_needs_object_F77='`$ECHO "$compiler_needs_object_F77" | $SED "$delay_single_quote_subst"`'
+compiler_needs_object_FC='`$ECHO "$compiler_needs_object_FC" | $SED "$delay_single_quote_subst"`'
+old_archive_from_new_cmds_CXX='`$ECHO "$old_archive_from_new_cmds_CXX" | $SED "$delay_single_quote_subst"`'
+old_archive_from_new_cmds_F77='`$ECHO "$old_archive_from_new_cmds_F77" | $SED "$delay_single_quote_subst"`'
+old_archive_from_new_cmds_FC='`$ECHO "$old_archive_from_new_cmds_FC" | $SED "$delay_single_quote_subst"`'
+old_archive_from_expsyms_cmds_CXX='`$ECHO "$old_archive_from_expsyms_cmds_CXX" | $SED "$delay_single_quote_subst"`'
+old_archive_from_expsyms_cmds_F77='`$ECHO "$old_archive_from_expsyms_cmds_F77" | $SED "$delay_single_quote_subst"`'
+old_archive_from_expsyms_cmds_FC='`$ECHO "$old_archive_from_expsyms_cmds_FC" | $SED "$delay_single_quote_subst"`'
+archive_cmds_CXX='`$ECHO "$archive_cmds_CXX" | $SED "$delay_single_quote_subst"`'
+archive_cmds_F77='`$ECHO "$archive_cmds_F77" | $SED "$delay_single_quote_subst"`'
+archive_cmds_FC='`$ECHO "$archive_cmds_FC" | $SED "$delay_single_quote_subst"`'
+archive_expsym_cmds_CXX='`$ECHO "$archive_expsym_cmds_CXX" | $SED "$delay_single_quote_subst"`'
+archive_expsym_cmds_F77='`$ECHO "$archive_expsym_cmds_F77" | $SED "$delay_single_quote_subst"`'
+archive_expsym_cmds_FC='`$ECHO "$archive_expsym_cmds_FC" | $SED "$delay_single_quote_subst"`'
+module_cmds_CXX='`$ECHO "$module_cmds_CXX" | $SED "$delay_single_quote_subst"`'
+module_cmds_F77='`$ECHO "$module_cmds_F77" | $SED "$delay_single_quote_subst"`'
+module_cmds_FC='`$ECHO "$module_cmds_FC" | $SED "$delay_single_quote_subst"`'
+module_expsym_cmds_CXX='`$ECHO "$module_expsym_cmds_CXX" | $SED "$delay_single_quote_subst"`'
+module_expsym_cmds_F77='`$ECHO "$module_expsym_cmds_F77" | $SED "$delay_single_quote_subst"`'
+module_expsym_cmds_FC='`$ECHO "$module_expsym_cmds_FC" | $SED "$delay_single_quote_subst"`'
+with_gnu_ld_CXX='`$ECHO "$with_gnu_ld_CXX" | $SED "$delay_single_quote_subst"`'
+with_gnu_ld_F77='`$ECHO "$with_gnu_ld_F77" | $SED "$delay_single_quote_subst"`'
+with_gnu_ld_FC='`$ECHO "$with_gnu_ld_FC" | $SED "$delay_single_quote_subst"`'
+allow_undefined_flag_CXX='`$ECHO "$allow_undefined_flag_CXX" | $SED "$delay_single_quote_subst"`'
+allow_undefined_flag_F77='`$ECHO "$allow_undefined_flag_F77" | $SED "$delay_single_quote_subst"`'
+allow_undefined_flag_FC='`$ECHO "$allow_undefined_flag_FC" | $SED "$delay_single_quote_subst"`'
+no_undefined_flag_CXX='`$ECHO "$no_undefined_flag_CXX" | $SED "$delay_single_quote_subst"`'
+no_undefined_flag_F77='`$ECHO "$no_undefined_flag_F77" | $SED "$delay_single_quote_subst"`'
+no_undefined_flag_FC='`$ECHO "$no_undefined_flag_FC" | $SED "$delay_single_quote_subst"`'
+hardcode_libdir_flag_spec_CXX='`$ECHO "$hardcode_libdir_flag_spec_CXX" | $SED "$delay_single_quote_subst"`'
+hardcode_libdir_flag_spec_F77='`$ECHO "$hardcode_libdir_flag_spec_F77" | $SED "$delay_single_quote_subst"`'
+hardcode_libdir_flag_spec_FC='`$ECHO "$hardcode_libdir_flag_spec_FC" | $SED "$delay_single_quote_subst"`'
+hardcode_libdir_separator_CXX='`$ECHO "$hardcode_libdir_separator_CXX" | $SED "$delay_single_quote_subst"`'
+hardcode_libdir_separator_F77='`$ECHO "$hardcode_libdir_separator_F77" | $SED "$delay_single_quote_subst"`'
+hardcode_libdir_separator_FC='`$ECHO "$hardcode_libdir_separator_FC" | $SED "$delay_single_quote_subst"`'
+hardcode_direct_CXX='`$ECHO "$hardcode_direct_CXX" | $SED "$delay_single_quote_subst"`'
+hardcode_direct_F77='`$ECHO "$hardcode_direct_F77" | $SED "$delay_single_quote_subst"`'
+hardcode_direct_FC='`$ECHO "$hardcode_direct_FC" | $SED "$delay_single_quote_subst"`'
+hardcode_direct_absolute_CXX='`$ECHO "$hardcode_direct_absolute_CXX" | $SED "$delay_single_quote_subst"`'
+hardcode_direct_absolute_F77='`$ECHO "$hardcode_direct_absolute_F77" | $SED "$delay_single_quote_subst"`'
+hardcode_direct_absolute_FC='`$ECHO "$hardcode_direct_absolute_FC" | $SED "$delay_single_quote_subst"`'
+hardcode_minus_L_CXX='`$ECHO "$hardcode_minus_L_CXX" | $SED "$delay_single_quote_subst"`'
+hardcode_minus_L_F77='`$ECHO "$hardcode_minus_L_F77" | $SED "$delay_single_quote_subst"`'
+hardcode_minus_L_FC='`$ECHO "$hardcode_minus_L_FC" | $SED "$delay_single_quote_subst"`'
+hardcode_shlibpath_var_CXX='`$ECHO "$hardcode_shlibpath_var_CXX" | $SED "$delay_single_quote_subst"`'
+hardcode_shlibpath_var_F77='`$ECHO "$hardcode_shlibpath_var_F77" | $SED "$delay_single_quote_subst"`'
+hardcode_shlibpath_var_FC='`$ECHO "$hardcode_shlibpath_var_FC" | $SED "$delay_single_quote_subst"`'
+hardcode_automatic_CXX='`$ECHO "$hardcode_automatic_CXX" | $SED "$delay_single_quote_subst"`'
+hardcode_automatic_F77='`$ECHO "$hardcode_automatic_F77" | $SED "$delay_single_quote_subst"`'
+hardcode_automatic_FC='`$ECHO "$hardcode_automatic_FC" | $SED "$delay_single_quote_subst"`'
+inherit_rpath_CXX='`$ECHO "$inherit_rpath_CXX" | $SED "$delay_single_quote_subst"`'
+inherit_rpath_F77='`$ECHO "$inherit_rpath_F77" | $SED "$delay_single_quote_subst"`'
+inherit_rpath_FC='`$ECHO "$inherit_rpath_FC" | $SED "$delay_single_quote_subst"`'
+link_all_deplibs_CXX='`$ECHO "$link_all_deplibs_CXX" | $SED "$delay_single_quote_subst"`'
+link_all_deplibs_F77='`$ECHO "$link_all_deplibs_F77" | $SED "$delay_single_quote_subst"`'
+link_all_deplibs_FC='`$ECHO "$link_all_deplibs_FC" | $SED "$delay_single_quote_subst"`'
+always_export_symbols_CXX='`$ECHO "$always_export_symbols_CXX" | $SED "$delay_single_quote_subst"`'
+always_export_symbols_F77='`$ECHO "$always_export_symbols_F77" | $SED "$delay_single_quote_subst"`'
+always_export_symbols_FC='`$ECHO "$always_export_symbols_FC" | $SED "$delay_single_quote_subst"`'
+export_symbols_cmds_CXX='`$ECHO "$export_symbols_cmds_CXX" | $SED "$delay_single_quote_subst"`'
+export_symbols_cmds_F77='`$ECHO "$export_symbols_cmds_F77" | $SED "$delay_single_quote_subst"`'
+export_symbols_cmds_FC='`$ECHO "$export_symbols_cmds_FC" | $SED "$delay_single_quote_subst"`'
+exclude_expsyms_CXX='`$ECHO "$exclude_expsyms_CXX" | $SED "$delay_single_quote_subst"`'
+exclude_expsyms_F77='`$ECHO "$exclude_expsyms_F77" | $SED "$delay_single_quote_subst"`'
+exclude_expsyms_FC='`$ECHO "$exclude_expsyms_FC" | $SED "$delay_single_quote_subst"`'
+include_expsyms_CXX='`$ECHO "$include_expsyms_CXX" | $SED "$delay_single_quote_subst"`'
+include_expsyms_F77='`$ECHO "$include_expsyms_F77" | $SED "$delay_single_quote_subst"`'
+include_expsyms_FC='`$ECHO "$include_expsyms_FC" | $SED "$delay_single_quote_subst"`'
+prelink_cmds_CXX='`$ECHO "$prelink_cmds_CXX" | $SED "$delay_single_quote_subst"`'
+prelink_cmds_F77='`$ECHO "$prelink_cmds_F77" | $SED "$delay_single_quote_subst"`'
+prelink_cmds_FC='`$ECHO "$prelink_cmds_FC" | $SED "$delay_single_quote_subst"`'
+postlink_cmds_CXX='`$ECHO "$postlink_cmds_CXX" | $SED "$delay_single_quote_subst"`'
+postlink_cmds_F77='`$ECHO "$postlink_cmds_F77" | $SED "$delay_single_quote_subst"`'
+postlink_cmds_FC='`$ECHO "$postlink_cmds_FC" | $SED "$delay_single_quote_subst"`'
+file_list_spec_CXX='`$ECHO "$file_list_spec_CXX" | $SED "$delay_single_quote_subst"`'
+file_list_spec_F77='`$ECHO "$file_list_spec_F77" | $SED "$delay_single_quote_subst"`'
+file_list_spec_FC='`$ECHO "$file_list_spec_FC" | $SED "$delay_single_quote_subst"`'
+hardcode_action_CXX='`$ECHO "$hardcode_action_CXX" | $SED "$delay_single_quote_subst"`'
+hardcode_action_F77='`$ECHO "$hardcode_action_F77" | $SED "$delay_single_quote_subst"`'
+hardcode_action_FC='`$ECHO "$hardcode_action_FC" | $SED "$delay_single_quote_subst"`'
+compiler_lib_search_dirs_CXX='`$ECHO "$compiler_lib_search_dirs_CXX" | $SED "$delay_single_quote_subst"`'
+compiler_lib_search_dirs_F77='`$ECHO "$compiler_lib_search_dirs_F77" | $SED "$delay_single_quote_subst"`'
+compiler_lib_search_dirs_FC='`$ECHO "$compiler_lib_search_dirs_FC" | $SED "$delay_single_quote_subst"`'
+predep_objects_CXX='`$ECHO "$predep_objects_CXX" | $SED "$delay_single_quote_subst"`'
+predep_objects_F77='`$ECHO "$predep_objects_F77" | $SED "$delay_single_quote_subst"`'
+predep_objects_FC='`$ECHO "$predep_objects_FC" | $SED "$delay_single_quote_subst"`'
+postdep_objects_CXX='`$ECHO "$postdep_objects_CXX" | $SED "$delay_single_quote_subst"`'
+postdep_objects_F77='`$ECHO "$postdep_objects_F77" | $SED "$delay_single_quote_subst"`'
+postdep_objects_FC='`$ECHO "$postdep_objects_FC" | $SED "$delay_single_quote_subst"`'
+predeps_CXX='`$ECHO "$predeps_CXX" | $SED "$delay_single_quote_subst"`'
+predeps_F77='`$ECHO "$predeps_F77" | $SED "$delay_single_quote_subst"`'
+predeps_FC='`$ECHO "$predeps_FC" | $SED "$delay_single_quote_subst"`'
+postdeps_CXX='`$ECHO "$postdeps_CXX" | $SED "$delay_single_quote_subst"`'
+postdeps_F77='`$ECHO "$postdeps_F77" | $SED "$delay_single_quote_subst"`'
+postdeps_FC='`$ECHO "$postdeps_FC" | $SED "$delay_single_quote_subst"`'
+compiler_lib_search_path_CXX='`$ECHO "$compiler_lib_search_path_CXX" | $SED "$delay_single_quote_subst"`'
+compiler_lib_search_path_F77='`$ECHO "$compiler_lib_search_path_F77" | $SED "$delay_single_quote_subst"`'
+compiler_lib_search_path_FC='`$ECHO "$compiler_lib_search_path_FC" | $SED "$delay_single_quote_subst"`'
 
 LTCC='$LTCC'
 LTCFLAGS='$LTCFLAGS'
 compiler='$compiler_DEFAULT'
 
+# A function that is used when there is no print builtin or printf.
+func_fallback_echo ()
+{
+  eval 'cat <<_LTECHO_EOF
+\$1
+_LTECHO_EOF'
+}
+
 # Quote evaled strings.
-for var in SED \
+for var in SHELL \
+ECHO \
+PATH_SEPARATOR \
+SED \
 GREP \
 EGREP \
 FGREP \
@@ -43945,8 +51809,13 @@ reload_flag \
 OBJDUMP \
 deplibs_check_method \
 file_magic_cmd \
+file_magic_glob \
+want_nocaseglob \
+DLLTOOL \
+sharedlib_from_linklib_cmd \
 AR \
 AR_FLAGS \
+archiver_list_spec \
 STRIP \
 RANLIB \
 CC \
@@ -43954,16 +51823,19 @@ CFLAGS \
 compiler \
 lt_cv_sys_global_symbol_pipe \
 lt_cv_sys_global_symbol_to_cdecl \
+lt_cv_sys_global_symbol_to_import \
 lt_cv_sys_global_symbol_to_c_name_address \
 lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \
-SHELL \
-ECHO \
+lt_cv_nm_interface \
+nm_file_list_spec \
+lt_cv_truncate_bin \
 lt_prog_compiler_no_builtin_flag \
-lt_prog_compiler_wl \
 lt_prog_compiler_pic \
+lt_prog_compiler_wl \
 lt_prog_compiler_static \
 lt_cv_prog_compiler_c_o \
 need_locks \
+MANIFEST_TOOL \
 DSYMUTIL \
 NMEDIT \
 LIPO \
@@ -43977,9 +51849,7 @@ with_gnu_ld \
 allow_undefined_flag \
 no_undefined_flag \
 hardcode_libdir_flag_spec \
-hardcode_libdir_flag_spec_ld \
 hardcode_libdir_separator \
-fix_srcfile_path \
 exclude_expsyms \
 include_expsyms \
 file_list_spec \
@@ -43987,6 +51857,7 @@ variables_saved_for_relink \
 libname_spec \
 library_names_spec \
 soname_spec \
+install_override_mode \
 finish_eval \
 old_striplib \
 striplib \
@@ -43999,18 +51870,21 @@ compiler_lib_search_path \
 LD_CXX \
 LD_F77 \
 LD_FC \
+reload_flag_CXX \
+reload_flag_F77 \
+reload_flag_FC \
 compiler_CXX \
 compiler_F77 \
 compiler_FC \
 lt_prog_compiler_no_builtin_flag_CXX \
 lt_prog_compiler_no_builtin_flag_F77 \
 lt_prog_compiler_no_builtin_flag_FC \
-lt_prog_compiler_wl_CXX \
-lt_prog_compiler_wl_F77 \
-lt_prog_compiler_wl_FC \
 lt_prog_compiler_pic_CXX \
 lt_prog_compiler_pic_F77 \
 lt_prog_compiler_pic_FC \
+lt_prog_compiler_wl_CXX \
+lt_prog_compiler_wl_F77 \
+lt_prog_compiler_wl_FC \
 lt_prog_compiler_static_CXX \
 lt_prog_compiler_static_F77 \
 lt_prog_compiler_static_FC \
@@ -44038,15 +51912,9 @@ no_undefined_flag_FC \
 hardcode_libdir_flag_spec_CXX \
 hardcode_libdir_flag_spec_F77 \
 hardcode_libdir_flag_spec_FC \
-hardcode_libdir_flag_spec_ld_CXX \
-hardcode_libdir_flag_spec_ld_F77 \
-hardcode_libdir_flag_spec_ld_FC \
 hardcode_libdir_separator_CXX \
 hardcode_libdir_separator_F77 \
 hardcode_libdir_separator_FC \
-fix_srcfile_path_CXX \
-fix_srcfile_path_F77 \
-fix_srcfile_path_FC \
 exclude_expsyms_CXX \
 exclude_expsyms_F77 \
 exclude_expsyms_FC \
@@ -44074,9 +51942,9 @@ postdeps_FC \
 compiler_lib_search_path_CXX \
 compiler_lib_search_path_F77 \
 compiler_lib_search_path_FC; do
-    case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in
+    case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
     *[\\\\\\\`\\"\\\$]*)
-      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$sed_quote_subst\\"\\\`\\\\\\""
+      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes
       ;;
     *)
       eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
@@ -44098,11 +51966,16 @@ module_cmds \
 module_expsym_cmds \
 export_symbols_cmds \
 prelink_cmds \
+postlink_cmds \
 postinstall_cmds \
 postuninstall_cmds \
 finish_cmds \
 sys_lib_search_path_spec \
-sys_lib_dlsearch_path_spec \
+configure_time_dlsearch_path \
+configure_time_lt_sys_library_path \
+reload_cmds_CXX \
+reload_cmds_F77 \
+reload_cmds_FC \
 old_archive_cmds_CXX \
 old_archive_cmds_F77 \
 old_archive_cmds_FC \
@@ -44129,10 +52002,13 @@ export_symbols_cmds_F77 \
 export_symbols_cmds_FC \
 prelink_cmds_CXX \
 prelink_cmds_F77 \
-prelink_cmds_FC; do
-    case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in
+prelink_cmds_FC \
+postlink_cmds_CXX \
+postlink_cmds_F77 \
+postlink_cmds_FC; do
+    case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
     *[\\\\\\\`\\"\\\$]*)
-      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\""
+      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes
       ;;
     *)
       eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
@@ -44140,26 +52016,17 @@ prelink_cmds_FC; do
     esac
 done
 
-# Fix-up fallback echo if it was mangled by the above quoting rules.
-case \$lt_ECHO in
-*'\\\$0 --fallback-echo"')  lt_ECHO=\`\$ECHO "X\$lt_ECHO" | \$Xsed -e 's/\\\\\\\\\\\\\\\$0 --fallback-echo"\$/\$0 --fallback-echo"/'\`
-  ;;
-esac
-
 ac_aux_dir='$ac_aux_dir'
-xsi_shell='$xsi_shell'
-lt_shell_append='$lt_shell_append'
 
-# See if we are running on zsh, and set the options which allow our
+# See if we are running on zsh, and set the options that allow our
 # commands through without removal of \ escapes INIT.
-if test -n "\${ZSH_VERSION+set}" ; then
+if test -n "\${ZSH_VERSION+set}"; then
    setopt NO_GLOB_SUBST
 fi
 
 
     PACKAGE='$PACKAGE'
     VERSION='$VERSION'
-    TIMESTAMP='$TIMESTAMP'
     RM='$RM'
     ofile='$ofile'
 
@@ -44199,14 +52066,10 @@ do
     "src/appl/Makefile") CONFIG_FILES="$CONFIG_FILES src/appl/Makefile" ;;
     "src/extra/Makefile") CONFIG_FILES="$CONFIG_FILES src/extra/Makefile" ;;
     "src/extra/blas/Makefile") CONFIG_FILES="$CONFIG_FILES src/extra/blas/Makefile" ;;
-    "src/extra/bzip2/Makefile") CONFIG_FILES="$CONFIG_FILES src/extra/bzip2/Makefile" ;;
     "src/extra/intl/Makefile") CONFIG_FILES="$CONFIG_FILES src/extra/intl/Makefile" ;;
-    "src/extra/pcre/Makefile") CONFIG_FILES="$CONFIG_FILES src/extra/pcre/Makefile" ;;
     "src/extra/tre/Makefile") CONFIG_FILES="$CONFIG_FILES src/extra/tre/Makefile" ;;
     "src/extra/tzone/Makefile") CONFIG_FILES="$CONFIG_FILES src/extra/tzone/Makefile" ;;
     "src/extra/xdr/Makefile") CONFIG_FILES="$CONFIG_FILES src/extra/xdr/Makefile" ;;
-    "src/extra/xz/Makefile") CONFIG_FILES="$CONFIG_FILES src/extra/xz/Makefile" ;;
-    "src/extra/zlib/Makefile") CONFIG_FILES="$CONFIG_FILES src/extra/zlib/Makefile" ;;
     "src/include/Makefile") CONFIG_FILES="$CONFIG_FILES src/include/Makefile" ;;
     "src/include/Rmath.h0") CONFIG_FILES="$CONFIG_FILES src/include/Rmath.h0" ;;
     "src/include/R_ext/Makefile") CONFIG_FILES="$CONFIG_FILES src/include/R_ext/Makefile" ;;
@@ -44259,7 +52122,6 @@ do
     "src/modules/X11/Makefile") CONFIG_FILES="$CONFIG_FILES src/modules/X11/Makefile" ;;
     "src/modules/internet/Makefile") CONFIG_FILES="$CONFIG_FILES src/modules/internet/Makefile" ;;
     "src/modules/lapack/Makefile") CONFIG_FILES="$CONFIG_FILES src/modules/lapack/Makefile" ;;
-    "src/modules/vfonts/Makefile") CONFIG_FILES="$CONFIG_FILES src/modules/vfonts/Makefile" ;;
     "src/nmath/Makefile") CONFIG_FILES="$CONFIG_FILES src/nmath/Makefile" ;;
     "src/nmath/standalone/Makefile") CONFIG_FILES="$CONFIG_FILES src/nmath/standalone/Makefile" ;;
     "src/scripts/Makefile") CONFIG_FILES="$CONFIG_FILES src/scripts/Makefile" ;;
@@ -44878,54 +52740,53 @@ $as_echo "$as_me: executing $ac_file commands" >&6;}
   case $ac_file$ac_mode in
     "libtool":C)
 
-    # See if we are running on zsh, and set the options which allow our
+    # See if we are running on zsh, and set the options that allow our
     # commands through without removal of \ escapes.
-    if test -n "${ZSH_VERSION+set}" ; then
+    if test -n "${ZSH_VERSION+set}"; then
       setopt NO_GLOB_SUBST
     fi
 
-    cfgfile="${ofile}T"
+    cfgfile=${ofile}T
     trap "$RM \"$cfgfile\"; exit 1" 1 2 15
     $RM "$cfgfile"
 
     cat <<_LT_EOF >> "$cfgfile"
 #! $SHELL
-
-# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
-# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION
+# Generated automatically by $as_me ($PACKAGE) $VERSION
 # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
 # NOTE: Changes made to this file will be lost: look at ltmain.sh.
+
+# Provide generalized library-building support services.
+# Written by Gordon Matzigkeit, 1996
+
+# Copyright (C) 2014 Free Software Foundation, Inc.
+# This is free software; see the source for copying conditions.  There is NO
+# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+# GNU Libtool is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of of the License, or
+# (at your option) any later version.
 #
-#   Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
-#                 2006, 2007, 2008 Free Software Foundation, Inc.
-#   Written by Gordon Matzigkeit, 1996
-#
-#   This file is part of GNU Libtool.
-#
-# GNU Libtool is free software; you can redistribute it and/or
-# modify it under the terms of the GNU General Public License as
-# published by the Free Software Foundation; either version 2 of
-# the License, or (at your option) any later version.
-#
-# As a special exception to the GNU General Public License,
-# if you distribute this file as part of a program or library that
-# is built using GNU Libtool, you may include this file under the
-# same distribution terms that you use for the rest of that program.
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program or library that is built
+# using GNU Libtool, you may include this file under the  same
+# distribution terms that you use for the rest of that program.
 #
-# GNU Libtool is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# GNU Libtool 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 GNU Libtool; see the file COPYING.  If not, a copy
-# can be downloaded from http://www.gnu.org/licenses/gpl.html, or
-# obtained by writing to the Free Software Foundation, Inc.,
-# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 
 # The names of the tagged configurations supported by this script.
-available_tags="CXX F77 FC "
+available_tags='CXX F77 FC '
+
+# Configured defaults for sys_lib_dlsearch_path munging.
+: \${LT_SYS_LIBRARY_PATH="$configure_time_lt_sys_library_path"}
 
 # ### BEGIN LIBTOOL CONFIG
 
@@ -44945,6 +52806,18 @@ pic_mode=$pic_mode
 # Whether or not to optimize for fast installation.
 fast_install=$enable_fast_install
 
+# Shared archive member basename,for filename based shared library versioning on AIX.
+shared_archive_member_spec=$shared_archive_member_spec
+
+# Shell to use when invoking shell scripts.
+SHELL=$lt_SHELL
+
+# An echo program that protects backslashes.
+ECHO=$lt_ECHO
+
+# The PATH separator for the build system.
+PATH_SEPARATOR=$lt_PATH_SEPARATOR
+
 # The host system.
 host_alias=$host_alias
 host=$host
@@ -44994,9 +52867,11 @@ SP2NL=$lt_lt_SP2NL
 # turn newlines into spaces.
 NL2SP=$lt_lt_NL2SP
 
-# How to create reloadable object files.
-reload_flag=$lt_reload_flag
-reload_cmds=$lt_reload_cmds
+# convert \$build file names to \$host format.
+to_host_file_cmd=$lt_cv_to_host_file_cmd
+
+# convert \$build files to toolchain format.
+to_tool_file_cmd=$lt_cv_to_tool_file_cmd
 
 # An object symbol dumper.
 OBJDUMP=$lt_OBJDUMP
@@ -45004,13 +52879,30 @@ OBJDUMP=$lt_OBJDUMP
 # Method to check whether dependent libraries are shared objects.
 deplibs_check_method=$lt_deplibs_check_method
 
-# Command to use when deplibs_check_method == "file_magic".
+# Command to use when deplibs_check_method = "file_magic".
 file_magic_cmd=$lt_file_magic_cmd
 
+# How to find potential files when deplibs_check_method = "file_magic".
+file_magic_glob=$lt_file_magic_glob
+
+# Find potential files using nocaseglob when deplibs_check_method = "file_magic".
+want_nocaseglob=$lt_want_nocaseglob
+
+# DLL creation program.
+DLLTOOL=$lt_DLLTOOL
+
+# Command to associate shared and link libraries.
+sharedlib_from_linklib_cmd=$lt_sharedlib_from_linklib_cmd
+
 # The archiver.
 AR=$lt_AR
+
+# Flags to create an archive.
 AR_FLAGS=$lt_AR_FLAGS
 
+# How to feed a file listing to the archiver.
+archiver_list_spec=$lt_archiver_list_spec
+
 # A symbol stripping program.
 STRIP=$lt_STRIP
 
@@ -45019,6 +52911,9 @@ RANLIB=$lt_RANLIB
 old_postinstall_cmds=$lt_old_postinstall_cmds
 old_postuninstall_cmds=$lt_old_postuninstall_cmds
 
+# Whether to use a lock for old archive extraction.
+lock_old_archive_extraction=$lock_old_archive_extraction
+
 # A C compiler.
 LTCC=$lt_CC
 
@@ -45031,20 +52926,29 @@ global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
 # Transform the output of nm in a proper C declaration.
 global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
 
+# Transform the output of nm into a list of symbols to manually relocate.
+global_symbol_to_import=$lt_lt_cv_sys_global_symbol_to_import
+
 # Transform the output of nm in a C name address pair.
 global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
 
 # Transform the output of nm in a C name address pair when lib prefix is needed.
 global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix
 
-# The name of the directory that contains temporary libtool files.
-objdir=$objdir
+# The name lister interface.
+nm_interface=$lt_lt_cv_nm_interface
 
-# Shell to use when invoking shell scripts.
-SHELL=$lt_SHELL
+# Specify filename containing input files for \$NM.
+nm_file_list_spec=$lt_nm_file_list_spec
 
-# An echo program that does not interpret backslashes.
-ECHO=$lt_ECHO
+# The root where to search for dependent libraries,and where our libraries should be installed.
+lt_sysroot=$lt_sysroot
+
+# Command to truncate a binary pipe.
+lt_truncate_bin=$lt_lt_cv_truncate_bin
+
+# The name of the directory that contains temporary libtool files.
+objdir=$objdir
 
 # Used to examine libraries when file_magic_cmd begins with "file".
 MAGIC_CMD=$MAGIC_CMD
@@ -45052,6 +52956,9 @@ MAGIC_CMD=$MAGIC_CMD
 # Must we lock files when doing compilation?
 need_locks=$lt_need_locks
 
+# Manifest tool.
+MANIFEST_TOOL=$lt_MANIFEST_TOOL
+
 # Tool to manipulate archived DWARF debug symbol files on Mac OS X.
 DSYMUTIL=$lt_DSYMUTIL
 
@@ -45108,6 +53015,9 @@ library_names_spec=$lt_library_names_spec
 # The coded name of the library, if different from the real name.
 soname_spec=$lt_soname_spec
 
+# Permission mode override for installation of shared libraries.
+install_override_mode=$lt_install_override_mode
+
 # Command to use after installation of a shared archive.
 postinstall_cmds=$lt_postinstall_cmds
 
@@ -45127,8 +53037,11 @@ hardcode_into_libs=$hardcode_into_libs
 # Compile-time system search path for libraries.
 sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
 
-# Run-time system search path for libraries.
-sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
+# Detected run-time system search path for libraries.
+sys_lib_dlsearch_path_spec=$lt_configure_time_dlsearch_path
+
+# Explicit LT_SYS_LIBRARY_PATH set during ./configure time.
+configure_time_lt_sys_library_path=$lt_configure_time_lt_sys_library_path
 
 # Whether dlopen is supported.
 dlopen_support=$enable_dlopen
@@ -45147,6 +53060,10 @@ striplib=$lt_striplib
 # The linker used to build libraries.
 LD=$lt_LD
 
+# How to create reloadable object files.
+reload_flag=$lt_reload_flag
+reload_cmds=$lt_reload_cmds
+
 # Commands used to build an old-style archive.
 old_archive_cmds=$lt_old_archive_cmds
 
@@ -45159,12 +53076,12 @@ with_gcc=$GCC
 # Compiler flag to turn off builtin functions.
 no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag
 
-# How to pass a linker flag through the compiler.
-wl=$lt_lt_prog_compiler_wl
-
 # Additional compiler flags for building library objects.
 pic_flag=$lt_lt_prog_compiler_pic
 
+# How to pass a linker flag through the compiler.
+wl=$lt_lt_prog_compiler_wl
+
 # Compiler flag to prevent dynamic linking.
 link_static_flag=$lt_lt_prog_compiler_static
 
@@ -45214,20 +53131,16 @@ no_undefined_flag=$lt_no_undefined_flag
 # This must work even if \$libdir does not exist
 hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec
 
-# If ld is used when linking, flag to hardcode \$libdir into a binary
-# during linking.  This must work even if \$libdir does not exist.
-hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld
-
 # Whether we need a single "-rpath" flag with a separated argument.
 hardcode_libdir_separator=$lt_hardcode_libdir_separator
 
-# Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes
+# Set to "yes" if using DIR/libNAME\$shared_ext during linking hardcodes
 # DIR into the resulting binary.
 hardcode_direct=$hardcode_direct
 
-# Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes
+# Set to "yes" if using DIR/libNAME\$shared_ext during linking hardcodes
 # DIR into the resulting binary and the resulting library dependency is
-# "absolute",i.e impossible to change by setting \${shlibpath_var} if the
+# "absolute",i.e impossible to change by setting \$shlibpath_var if the
 # library is relocated.
 hardcode_direct_absolute=$hardcode_direct_absolute
 
@@ -45251,9 +53164,6 @@ inherit_rpath=$inherit_rpath
 # Whether libtool must link a program against all its dependency libraries.
 link_all_deplibs=$link_all_deplibs
 
-# Fix the shell variable \$srcfile for the compiler.
-fix_srcfile_path=$lt_fix_srcfile_path
-
 # Set to "yes" if exported symbols are required.
 always_export_symbols=$always_export_symbols
 
@@ -45269,6 +53179,9 @@ include_expsyms=$lt_include_expsyms
 # Commands necessary for linking programs (against libraries) with templates.
 prelink_cmds=$lt_prelink_cmds
 
+# Commands necessary for finishing linking programs.
+postlink_cmds=$lt_postlink_cmds
+
 # Specify filename containing input files.
 file_list_spec=$lt_file_list_spec
 
@@ -45293,13 +53206,72 @@ compiler_lib_search_path=$lt_compiler_lib_search_path
 
 _LT_EOF
 
+    cat <<'_LT_EOF' >> "$cfgfile"
+
+# ### BEGIN FUNCTIONS SHARED WITH CONFIGURE
+
+# func_munge_path_list VARIABLE PATH
+# -----------------------------------
+# VARIABLE is name of variable containing _space_ separated list of
+# directories to be munged by the contents of PATH, which is string
+# having a format:
+# "DIR[:DIR]:"
+#       string "DIR[ DIR]" will be prepended to VARIABLE
+# ":DIR[:DIR]"
+#       string "DIR[ DIR]" will be appended to VARIABLE
+# "DIRP[:DIRP]::[DIRA:]DIRA"
+#       string "DIRP[ DIRP]" will be prepended to VARIABLE and string
+#       "DIRA[ DIRA]" will be appended to VARIABLE
+# "DIR[:DIR]"
+#       VARIABLE will be replaced by "DIR[ DIR]"
+func_munge_path_list ()
+{
+    case x$2 in
+    x)
+        ;;
+    *:)
+        eval $1=\"`$ECHO $2 | $SED 's/:/ /g'` \$$1\"
+        ;;
+    x:*)
+        eval $1=\"\$$1 `$ECHO $2 | $SED 's/:/ /g'`\"
+        ;;
+    *::*)
+        eval $1=\"\$$1\ `$ECHO $2 | $SED -e 's/.*:://' -e 's/:/ /g'`\"
+        eval $1=\"`$ECHO $2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \$$1\"
+        ;;
+    *)
+        eval $1=\"`$ECHO $2 | $SED 's/:/ /g'`\"
+        ;;
+    esac
+}
+
+
+# Calculate cc_basename.  Skip known compiler wrappers and cross-prefix.
+func_cc_basename ()
+{
+    for cc_temp in $*""; do
+      case $cc_temp in
+        compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
+        distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
+        \-*) ;;
+        *) break;;
+      esac
+    done
+    func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
+}
+
+
+# ### END FUNCTIONS SHARED WITH CONFIGURE
+
+_LT_EOF
+
   case $host_os in
   aix3*)
     cat <<\_LT_EOF >> "$cfgfile"
 # AIX sometimes has problems with the GCC collect2 program.  For some
 # reason, if we set the COLLECT_NAMES environment variable, the problems
 # vanish in a puff of smoke.
-if test "X${COLLECT_NAMES+set}" != Xset; then
+if test set != "${COLLECT_NAMES+set}"; then
   COLLECT_NAMES=
   export COLLECT_NAMES
 fi
@@ -45308,219 +53280,17 @@ _LT_EOF
   esac
 
 
-ltmain="$ac_aux_dir/ltmain.sh"
+ltmain=$ac_aux_dir/ltmain.sh
 
 
   # We use sed instead of cat because bash on DJGPP gets confused if
   # if finds mixed CR/LF and LF-only lines.  Since sed operates in
   # text mode, it properly converts lines to CR/LF.  This bash problem
   # is reportedly fixed, but why not run on old versions too?
-  sed '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \
-    || (rm -f "$cfgfile"; exit 1)
+  sed '$q' "$ltmain" >> "$cfgfile" \
+     || (rm -f "$cfgfile"; exit 1)
 
-  case $xsi_shell in
-  yes)
-    cat << \_LT_EOF >> "$cfgfile"
-
-# func_dirname file append nondir_replacement
-# Compute the dirname of FILE.  If nonempty, add APPEND to the result,
-# otherwise set result to NONDIR_REPLACEMENT.
-func_dirname ()
-{
-  case ${1} in
-    */*) func_dirname_result="${1%/*}${2}" ;;
-    *  ) func_dirname_result="${3}" ;;
-  esac
-}
-
-# func_basename file
-func_basename ()
-{
-  func_basename_result="${1##*/}"
-}
-
-# func_dirname_and_basename file append nondir_replacement
-# perform func_basename and func_dirname in a single function
-# call:
-#   dirname:  Compute the dirname of FILE.  If nonempty,
-#             add APPEND to the result, otherwise set result
-#             to NONDIR_REPLACEMENT.
-#             value returned in "$func_dirname_result"
-#   basename: Compute filename of FILE.
-#             value retuned in "$func_basename_result"
-# Implementation must be kept synchronized with func_dirname
-# and func_basename. For efficiency, we do not delegate to
-# those functions but instead duplicate the functionality here.
-func_dirname_and_basename ()
-{
-  case ${1} in
-    */*) func_dirname_result="${1%/*}${2}" ;;
-    *  ) func_dirname_result="${3}" ;;
-  esac
-  func_basename_result="${1##*/}"
-}
-
-# func_stripname prefix suffix name
-# strip PREFIX and SUFFIX off of NAME.
-# PREFIX and SUFFIX must not contain globbing or regex special
-# characters, hashes, percent signs, but SUFFIX may contain a leading
-# dot (in which case that matches only a dot).
-func_stripname ()
-{
-  # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are
-  # positional parameters, so assign one to ordinary parameter first.
-  func_stripname_result=${3}
-  func_stripname_result=${func_stripname_result#"${1}"}
-  func_stripname_result=${func_stripname_result%"${2}"}
-}
-
-# func_opt_split
-func_opt_split ()
-{
-  func_opt_split_opt=${1%%=*}
-  func_opt_split_arg=${1#*=}
-}
-
-# func_lo2o object
-func_lo2o ()
-{
-  case ${1} in
-    *.lo) func_lo2o_result=${1%.lo}.${objext} ;;
-    *)    func_lo2o_result=${1} ;;
-  esac
-}
-
-# func_xform libobj-or-source
-func_xform ()
-{
-  func_xform_result=${1%.*}.lo
-}
-
-# func_arith arithmetic-term...
-func_arith ()
-{
-  func_arith_result=$(( $* ))
-}
-
-# func_len string
-# STRING may not start with a hyphen.
-func_len ()
-{
-  func_len_result=${#1}
-}
-
-_LT_EOF
-    ;;
-  *) # Bourne compatible functions.
-    cat << \_LT_EOF >> "$cfgfile"
-
-# func_dirname file append nondir_replacement
-# Compute the dirname of FILE.  If nonempty, add APPEND to the result,
-# otherwise set result to NONDIR_REPLACEMENT.
-func_dirname ()
-{
-  # Extract subdirectory from the argument.
-  func_dirname_result=`$ECHO "X${1}" | $Xsed -e "$dirname"`
-  if test "X$func_dirname_result" = "X${1}"; then
-    func_dirname_result="${3}"
-  else
-    func_dirname_result="$func_dirname_result${2}"
-  fi
-}
-
-# func_basename file
-func_basename ()
-{
-  func_basename_result=`$ECHO "X${1}" | $Xsed -e "$basename"`
-}
-
-
-# func_stripname prefix suffix name
-# strip PREFIX and SUFFIX off of NAME.
-# PREFIX and SUFFIX must not contain globbing or regex special
-# characters, hashes, percent signs, but SUFFIX may contain a leading
-# dot (in which case that matches only a dot).
-# func_strip_suffix prefix name
-func_stripname ()
-{
-  case ${2} in
-    .*) func_stripname_result=`$ECHO "X${3}" \
-           | $Xsed -e "s%^${1}%%" -e "s%\\\\${2}\$%%"`;;
-    *)  func_stripname_result=`$ECHO "X${3}" \
-           | $Xsed -e "s%^${1}%%" -e "s%${2}\$%%"`;;
-  esac
-}
-
-# sed scripts:
-my_sed_long_opt='1s/^\(-[^=]*\)=.*/\1/;q'
-my_sed_long_arg='1s/^-[^=]*=//'
-
-# func_opt_split
-func_opt_split ()
-{
-  func_opt_split_opt=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_opt"`
-  func_opt_split_arg=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_arg"`
-}
-
-# func_lo2o object
-func_lo2o ()
-{
-  func_lo2o_result=`$ECHO "X${1}" | $Xsed -e "$lo2o"`
-}
-
-# func_xform libobj-or-source
-func_xform ()
-{
-  func_xform_result=`$ECHO "X${1}" | $Xsed -e 's/\.[^.]*$/.lo/'`
-}
-
-# func_arith arithmetic-term...
-func_arith ()
-{
-  func_arith_result=`expr "$@"`
-}
-
-# func_len string
-# STRING may not start with a hyphen.
-func_len ()
-{
-  func_len_result=`expr "$1" : ".*" 2>/dev/null || echo $max_cmd_len`
-}
-
-_LT_EOF
-esac
-
-case $lt_shell_append in
-  yes)
-    cat << \_LT_EOF >> "$cfgfile"
-
-# func_append var value
-# Append VALUE to the end of shell variable VAR.
-func_append ()
-{
-  eval "$1+=\$2"
-}
-_LT_EOF
-    ;;
-  *)
-    cat << \_LT_EOF >> "$cfgfile"
-
-# func_append var value
-# Append VALUE to the end of shell variable VAR.
-func_append ()
-{
-  eval "$1=\$$1\$2"
-}
-
-_LT_EOF
-    ;;
-  esac
-
-
-  sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \
-    || (rm -f "$cfgfile"; exit 1)
-
-  mv -f "$cfgfile" "$ofile" ||
+   mv -f "$cfgfile" "$ofile" ||
     (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
   chmod +x "$ofile"
 
@@ -45532,6 +53302,10 @@ _LT_EOF
 # The linker used to build libraries.
 LD=$lt_LD_CXX
 
+# How to create reloadable object files.
+reload_flag=$lt_reload_flag_CXX
+reload_cmds=$lt_reload_cmds_CXX
+
 # Commands used to build an old-style archive.
 old_archive_cmds=$lt_old_archive_cmds_CXX
 
@@ -45544,12 +53318,12 @@ with_gcc=$GCC_CXX
 # Compiler flag to turn off builtin functions.
 no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_CXX
 
-# How to pass a linker flag through the compiler.
-wl=$lt_lt_prog_compiler_wl_CXX
-
 # Additional compiler flags for building library objects.
 pic_flag=$lt_lt_prog_compiler_pic_CXX
 
+# How to pass a linker flag through the compiler.
+wl=$lt_lt_prog_compiler_wl_CXX
+
 # Compiler flag to prevent dynamic linking.
 link_static_flag=$lt_lt_prog_compiler_static_CXX
 
@@ -45599,20 +53373,16 @@ no_undefined_flag=$lt_no_undefined_flag_CXX
 # This must work even if \$libdir does not exist
 hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_CXX
 
-# If ld is used when linking, flag to hardcode \$libdir into a binary
-# during linking.  This must work even if \$libdir does not exist.
-hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_CXX
-
 # Whether we need a single "-rpath" flag with a separated argument.
 hardcode_libdir_separator=$lt_hardcode_libdir_separator_CXX
 
-# Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes
+# Set to "yes" if using DIR/libNAME\$shared_ext during linking hardcodes
 # DIR into the resulting binary.
 hardcode_direct=$hardcode_direct_CXX
 
-# Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes
+# Set to "yes" if using DIR/libNAME\$shared_ext during linking hardcodes
 # DIR into the resulting binary and the resulting library dependency is
-# "absolute",i.e impossible to change by setting \${shlibpath_var} if the
+# "absolute",i.e impossible to change by setting \$shlibpath_var if the
 # library is relocated.
 hardcode_direct_absolute=$hardcode_direct_absolute_CXX
 
@@ -45636,9 +53406,6 @@ inherit_rpath=$inherit_rpath_CXX
 # Whether libtool must link a program against all its dependency libraries.
 link_all_deplibs=$link_all_deplibs_CXX
 
-# Fix the shell variable \$srcfile for the compiler.
-fix_srcfile_path=$lt_fix_srcfile_path_CXX
-
 # Set to "yes" if exported symbols are required.
 always_export_symbols=$always_export_symbols_CXX
 
@@ -45654,6 +53421,9 @@ include_expsyms=$lt_include_expsyms_CXX
 # Commands necessary for linking programs (against libraries) with templates.
 prelink_cmds=$lt_prelink_cmds_CXX
 
+# Commands necessary for finishing linking programs.
+postlink_cmds=$lt_postlink_cmds_CXX
+
 # Specify filename containing input files.
 file_list_spec=$lt_file_list_spec_CXX
 
@@ -45685,6 +53455,10 @@ _LT_EOF
 # The linker used to build libraries.
 LD=$lt_LD_F77
 
+# How to create reloadable object files.
+reload_flag=$lt_reload_flag_F77
+reload_cmds=$lt_reload_cmds_F77
+
 # Commands used to build an old-style archive.
 old_archive_cmds=$lt_old_archive_cmds_F77
 
@@ -45697,12 +53471,12 @@ with_gcc=$GCC_F77
 # Compiler flag to turn off builtin functions.
 no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_F77
 
-# How to pass a linker flag through the compiler.
-wl=$lt_lt_prog_compiler_wl_F77
-
 # Additional compiler flags for building library objects.
 pic_flag=$lt_lt_prog_compiler_pic_F77
 
+# How to pass a linker flag through the compiler.
+wl=$lt_lt_prog_compiler_wl_F77
+
 # Compiler flag to prevent dynamic linking.
 link_static_flag=$lt_lt_prog_compiler_static_F77
 
@@ -45752,20 +53526,16 @@ no_undefined_flag=$lt_no_undefined_flag_F77
 # This must work even if \$libdir does not exist
 hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_F77
 
-# If ld is used when linking, flag to hardcode \$libdir into a binary
-# during linking.  This must work even if \$libdir does not exist.
-hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_F77
-
 # Whether we need a single "-rpath" flag with a separated argument.
 hardcode_libdir_separator=$lt_hardcode_libdir_separator_F77
 
-# Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes
+# Set to "yes" if using DIR/libNAME\$shared_ext during linking hardcodes
 # DIR into the resulting binary.
 hardcode_direct=$hardcode_direct_F77
 
-# Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes
+# Set to "yes" if using DIR/libNAME\$shared_ext during linking hardcodes
 # DIR into the resulting binary and the resulting library dependency is
-# "absolute",i.e impossible to change by setting \${shlibpath_var} if the
+# "absolute",i.e impossible to change by setting \$shlibpath_var if the
 # library is relocated.
 hardcode_direct_absolute=$hardcode_direct_absolute_F77
 
@@ -45789,9 +53559,6 @@ inherit_rpath=$inherit_rpath_F77
 # Whether libtool must link a program against all its dependency libraries.
 link_all_deplibs=$link_all_deplibs_F77
 
-# Fix the shell variable \$srcfile for the compiler.
-fix_srcfile_path=$lt_fix_srcfile_path_F77
-
 # Set to "yes" if exported symbols are required.
 always_export_symbols=$always_export_symbols_F77
 
@@ -45807,6 +53574,9 @@ include_expsyms=$lt_include_expsyms_F77
 # Commands necessary for linking programs (against libraries) with templates.
 prelink_cmds=$lt_prelink_cmds_F77
 
+# Commands necessary for finishing linking programs.
+postlink_cmds=$lt_postlink_cmds_F77
+
 # Specify filename containing input files.
 file_list_spec=$lt_file_list_spec_F77
 
@@ -45838,6 +53608,10 @@ _LT_EOF
 # The linker used to build libraries.
 LD=$lt_LD_FC
 
+# How to create reloadable object files.
+reload_flag=$lt_reload_flag_FC
+reload_cmds=$lt_reload_cmds_FC
+
 # Commands used to build an old-style archive.
 old_archive_cmds=$lt_old_archive_cmds_FC
 
@@ -45850,12 +53624,12 @@ with_gcc=$GCC_FC
 # Compiler flag to turn off builtin functions.
 no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_FC
 
-# How to pass a linker flag through the compiler.
-wl=$lt_lt_prog_compiler_wl_FC
-
 # Additional compiler flags for building library objects.
 pic_flag=$lt_lt_prog_compiler_pic_FC
 
+# How to pass a linker flag through the compiler.
+wl=$lt_lt_prog_compiler_wl_FC
+
 # Compiler flag to prevent dynamic linking.
 link_static_flag=$lt_lt_prog_compiler_static_FC
 
@@ -45905,20 +53679,16 @@ no_undefined_flag=$lt_no_undefined_flag_FC
 # This must work even if \$libdir does not exist
 hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_FC
 
-# If ld is used when linking, flag to hardcode \$libdir into a binary
-# during linking.  This must work even if \$libdir does not exist.
-hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_FC
-
 # Whether we need a single "-rpath" flag with a separated argument.
 hardcode_libdir_separator=$lt_hardcode_libdir_separator_FC
 
-# Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes
+# Set to "yes" if using DIR/libNAME\$shared_ext during linking hardcodes
 # DIR into the resulting binary.
 hardcode_direct=$hardcode_direct_FC
 
-# Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes
+# Set to "yes" if using DIR/libNAME\$shared_ext during linking hardcodes
 # DIR into the resulting binary and the resulting library dependency is
-# "absolute",i.e impossible to change by setting \${shlibpath_var} if the
+# "absolute",i.e impossible to change by setting \$shlibpath_var if the
 # library is relocated.
 hardcode_direct_absolute=$hardcode_direct_absolute_FC
 
@@ -45942,9 +53712,6 @@ inherit_rpath=$inherit_rpath_FC
 # Whether libtool must link a program against all its dependency libraries.
 link_all_deplibs=$link_all_deplibs_FC
 
-# Fix the shell variable \$srcfile for the compiler.
-fix_srcfile_path=$lt_fix_srcfile_path_FC
-
 # Set to "yes" if exported symbols are required.
 always_export_symbols=$always_export_symbols_FC
 
@@ -45960,6 +53727,9 @@ include_expsyms=$lt_include_expsyms_FC
 # Commands necessary for linking programs (against libraries) with templates.
 prelink_cmds=$lt_prelink_cmds_FC
 
+# Commands necessary for finishing linking programs.
+postlink_cmds=$lt_postlink_cmds_FC
+
 # Specify filename containing input files.
 file_list_spec=$lt_file_list_spec_FC
 
@@ -46030,8 +53800,11 @@ fi
 ## configure variables to config.status.
 ## </NOTE>
 r_c_compiler="${CC} ${R_XTRA_CFLAGS} ${CFLAGS}"
-r_cxx_compiler="${CXX} ${R_XTRA_CXXFLAGS} ${CXXFLAGS}"
-r_cxx1x_compiler="${CXX1X} ${CXX1XSTD} ${CXX1XFLAGS}"
+r_cxx_compiler="${CXX} ${CXXSTD} ${R_XTRA_CXXFLAGS} ${CXXFLAGS}"
+r_cxx98_compiler="${CXX98} ${CXX98STD} ${CXX98FLAGS}"
+r_cxx11_compiler="${CXX11} ${CXX11STD} ${CXX11FLAGS}"
+r_cxx14_compiler="${CXX14} ${CXX14STD} ${CXX14FLAGS}"
+r_cxx17_compiler="${CXX17} ${CXX17STD} ${CXX17FLAGS}"
 r_f77_compiler="${F77} ${R_XTRA_FFLAGS} ${FFLAGS}"
 r_f95_compiler="${FC} ${FCFLAGS}"
 r_objc_compiler="${OBJC} ${OBJCFLAGS}"
@@ -46091,13 +53864,22 @@ else
   r_external_libs="${r_external_libs}${separator}LAPACK(${r_lapack})"
 fi
 fi
-if test "${have_lzma}" = yes; then
+if test "${have_tre}" = yes; then
+  separator=", "
+test -z "${separator}" && separator=" "
+if test -z "${r_external_libs}"; then
+  r_external_libs="tre"
+else
+  r_external_libs="${r_external_libs}${separator}tre"
+fi
+fi
+if test "x$ac_cv_header_curl_curl_h" = xyes; then
   separator=", "
 test -z "${separator}" && separator=" "
 if test -z "${r_external_libs}"; then
-  r_external_libs="lzma"
+  r_external_libs="curl"
 else
-  r_external_libs="${r_external_libs}${separator}lzma"
+  r_external_libs="${r_external_libs}${separator}curl"
 fi
 fi
 
@@ -46321,8 +54103,11 @@ R is now configured for ${host}
   C compiler:                ${r_c_compiler}
   Fortran 77 compiler:       ${r_f77_compiler}
 
-  C++ compiler:              ${r_cxx_compiler}
-  C++ 11 compiler:           ${r_cxx1x_compiler}
+  Default C++ compiler:      ${r_cxx_compiler}
+  C++98 compiler:            ${r_cxx98_compiler}
+  C++11 compiler:            ${r_cxx11_compiler}
+  C++14 compiler:            ${r_cxx14_compiler}
+  C++17 compiler:            ${r_cxx17_compiler}
   Fortran 90/95 compiler:    ${r_f95_compiler}
   Obj-C compiler:	     ${r_objc_compiler}
 
@@ -46345,8 +54130,11 @@ R is now configured for ${host}
   C compiler:                ${r_c_compiler}
   Fortran 77 compiler:       ${r_f77_compiler}
 
-  C++ compiler:              ${r_cxx_compiler}
-  C++ 11 compiler:           ${r_cxx1x_compiler}
+  Default C++ compiler:      ${r_cxx_compiler}
+  C++98 compiler:            ${r_cxx98_compiler}
+  C++11 compiler:            ${r_cxx11_compiler}
+  C++14 compiler:            ${r_cxx14_compiler}
+  C++17 compiler:            ${r_cxx17_compiler}
   Fortran 90/95 compiler:    ${r_f95_compiler}
   Obj-C compiler:	     ${r_objc_compiler}
 
@@ -46392,6 +54180,10 @@ if test -n "${warn_tcltk_version}"; then
   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ${warn_tcltk_version}" >&5
 $as_echo "$as_me: WARNING: ${warn_tcltk_version}" >&2;}
 fi
+if test -n "${warn_pcre_version}"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ${warn_pcre_version}" >&5
+$as_echo "$as_me: WARNING: ${warn_pcre_version}" >&2;}
+fi
 if test -n "${warn_info}"; then
   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ${warn_info}" >&5
 $as_echo "$as_me: WARNING: ${warn_info}" >&2;}
diff --git a/configure.ac b/configure.ac
index cac8d16..3f84e0e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2,7 +2,7 @@
 ###
 ### Process this file with autoconf to produce a configure script.
 ###
-### Copyright (C) 1998-2014 R Core Team
+### Copyright (C) 1998-2017 R Core Team
 ###
 ### This file is part of R.
 ###
@@ -18,7 +18,7 @@
 ###
 ### You should have received a copy of the GNU General Public License
 ### along with R; if not, a copy is available at
-### http://www.r-project.org/Licenses/
+### https://www.r-project.org/Licenses/
 
 AC_PREREQ(2.62)
 
@@ -30,7 +30,7 @@ m4_define([R_VERSION],
           m4_bpatsubst(m4_esyscmd([cat VERSION]),
                        [\([0-9.]*\)\(\w\|\W\)*],
                        [\1]))
-AC_INIT([R],[R_VERSION],[http://bugs.r-project.org],[R],[http://www.r-project.org])
+AC_INIT([R],[R_VERSION],[https://bugs.r-project.org],[R],[https://www.r-project.org])
 AC_CONFIG_SRCDIR([src/include/Defn.h])
 AC_CONFIG_AUX_DIR([tools])
 
@@ -56,10 +56,13 @@ AH_TOP([#ifndef R_CONFIG_H
 AH_BOTTOM([
 #endif /* not R_CONFIG_H */])
 
-## The gettext macros call AC_GNU_SOURCE early, so all the
-## C compiling makes use of that.  If it is ever removed, we
-## would need it or something similar here.
-
+## We call AC_GNU_SOURCE early (it is a prerequisite for the gettext
+## macros), so all the C compiling makes use of that.  Nowadays it calls
+## AC_USE_SYSTEM_EXTENSIONS ....
+## This sets _GNU_SOURCE, so glibc defines all its extensions
+## (_POSIX_C_SOURCE, _XOPEN_SOURCE, _BSD_SOURCE, __USE_MISC) and these
+## unlock declarations of non-C99 functions and constants.  
+## Ditto for __EXTENSIONS__ on Solaris and _ALL_SOURCE on AIX.
 
 ### ** Platform.
 
@@ -75,14 +78,14 @@ AC_DEFINE_UNQUOTED(R_OS, "${host_os}",
 
 ## exclude some unsupported OSes
 case "${host_os}" in
-   ## Darwin 1.3.1 was OS X 10.0, 1.4.1 was 10.1, 5 is 10.2 etc
-   ## with 13 being 10.9.  We no longer support < 10.4 (Tiger)
-   ## http://en.wikipedia.org/wiki/Darwin_OS
+   ## Darwin 1.3.1 was macOS 10.0, 1.4.1 was 10.1, 5 is 10.2 etc
+   ## with 13 being 10.9.  We no longer support < 10.6 (Snow Leopard)
+   ## https://en.wikipedia.org/wiki/Darwin_OS
    darwin1.*)
-     AC_MSG_ERROR([The earliest supported OS X is 10.4.]
+     AC_MSG_ERROR([The earliest supported macOS is 10.6.]
      ;; 
-  darwin[[567]]*)
-     AC_MSG_ERROR([The earliest supported OS X is 10.4.]
+  darwin[[56789]]*)
+     AC_MSG_ERROR([The earliest supported macOS is 10.6.]
      ;; 
   aix[123]*|aix4.[01]*)
     ## These need a form of linking we no longer support
@@ -135,9 +138,10 @@ fi
 libnn=lib
 case "${host_os}" in
   linux*)
-    ## Not all distros use this: some choose to march out of step  
+    ## Not all distros use this: some choose to march out of step
+    ## Allow for ppc64le (Debian calls ppc64el), powerpc64le ...
     case "${host_cpu}" in
-      x86_64|mips64|ppc64|powerpc64|sparc64|s390x)
+      x86_64|mips64|ppc64*|powerpc64*|sparc64|s390x)
         if test -d /usr/lib64; then
           libnn=lib64
 	fi
@@ -220,10 +224,10 @@ fi],
 
 ## Allow the user to specify building an R framework (Darwin).
 AC_ARG_ENABLE([R-framework],
-[AS_HELP_STRING([--enable-R-framework@<:@=DIR@:>@],[OS X only: build R framework (if possible), and specify
-                 its installation prefix @<:@yes, /Library/Frameworks@:>@])],
+[AS_HELP_STRING([--enable-R-framework@<:@=DIR@:>@],[macOS only: build R framework (if possible), and specify
+                 its installation prefix @<:@no, /Library/Frameworks@:>@])],
 [want_R_framework="${enableval}"],
-[want_R_framework=yes])
+[want_R_framework=no])
 ## Can only build frameworks on Darwin.
 if test "${want_R_framework}" != no; then
   case "${host_os}" in
@@ -253,7 +257,7 @@ fi
 AM_CONDITIONAL(WANT_R_FRAMEWORK, [test "x${want_R_framework}" = xyes])
 
 ## Allow the user to specify building R as a shared library.
-## (but a 'dynamic library' in the terminology of OS X).
+## (but a 'dynamic library' in the terminology of macOS).
 ## <NOTE>
 ## Building a framework implies building R shared libraries, hence the
 ## strange default.
@@ -319,7 +323,6 @@ AC_ARG_ENABLE([prebuilt-html],
 [want_prebuilt_html=no])
 AM_CONDITIONAL(BUILD_HTML, [test "x${want_prebuilt_html}" = xyes])
 
-
 AC_ARG_ENABLE([lto],
 [AS_HELP_STRING([--enable-lto],[enable link-time optimization @<:@no@:>@])],
 [want_lto="${enableval}"], [want_lto=no])
@@ -327,13 +330,18 @@ AC_ARG_ENABLE([lto],
 if test "x${want_lto}" != xno; then
   LTO=-flto
 fi
-if test "x${want_lto}" == xyes; then
+if test "x${want_lto}" = xyes; then
   LTOALL=-flto
 fi
 AC_SUBST(LTO)
 AC_SUBST(LTOALL)
 AM_CONDITIONAL(BUILD_LTO, [test "x${want_lto}" != xno])
 
+AC_ARG_ENABLE([java],
+[AS_HELP_STRING([--enable-java],[enable Java @<:@yes@:>@])],
+[want_java="${enableval}"],
+[want_java=yes])
+AM_CONDITIONAL(WANT_JAVA, [test "x${want_java}" = xyes])
 
 ### ** Optional packages.
 
@@ -342,14 +350,14 @@ AC_ARG_WITH([blas],
 [AS_HELP_STRING([--with-blas],[use system BLAS library (if available), or specify it @<:@no@:>@])],
 [R_ARG_USE(blas)],
 [use_blas=unset])
-# default is "no" except on OS X
+# default is "no" except on macOS
 
 ## LAPACK.
 AC_ARG_WITH([lapack],
 [AS_HELP_STRING([--with-lapack],[use system LAPACK library (if available), or specify it @<:@no@:>@])],
 [R_ARG_USE(lapack)],
 [use_lapack=unset])
-# default is "no" except on OS X
+# default is "no" except on macOS
 
 ## Readline.
 AC_ARG_WITH([readline],
@@ -359,7 +367,7 @@ AC_ARG_WITH([readline],
 
 ## Aqua.
 AC_ARG_WITH([aqua],
-[AS_HELP_STRING([--with-aqua],[OS X only: use Aqua (if available) @<:@yes@:>@])],
+[AS_HELP_STRING([--with-aqua],[macOS only: use Aqua (if available) @<:@yes@:>@])],
 [if test "${withval}" = no; then
   want_aqua=no
 else
@@ -411,26 +419,10 @@ AC_ARG_WITH([libtiff],
 [AS_HELP_STRING([--with-libtiff],[use libtiff library (if available) @<:@yes@:>@])],
 [R_ARG_USE(libtiff)],
 [use_libtiff=yes])
-AC_ARG_WITH([system-zlib],
-[AS_HELP_STRING([--with-system-zlib],[use system zlib library (if available) @<:@no@:>@])],
-[R_ARG_USE_SYSTEM(zlib)],
-[use_system_zlib=no])
-AC_ARG_WITH([system-bzlib],
-[AS_HELP_STRING([--with-system-bzlib],[use system bzlib library (if available) @<:@no@:>@])],
-[R_ARG_USE_SYSTEM(bzlib)],
-[use_system_bzlib=no])
-AC_ARG_WITH([system-pcre],
-[AS_HELP_STRING([--with-system-pcre],[use system PCRE library (if available) @<:@no@:>@])],
-[R_ARG_USE_SYSTEM(pcre)],
-[use_system_pcre=no])
 AC_ARG_WITH([system-tre],
 [AS_HELP_STRING([--with-system-tre],[use system tre library (if available) @<:@no@:>@])],
 [R_ARG_USE_SYSTEM(tre)],
 [use_system_tre=no])
-AC_ARG_WITH([system-xz],
-[AS_HELP_STRING([--with-system-xz],[use system xz (lzma) library (if available) @<:@yes@:>@])],
-[R_ARG_USE_SYSTEM(xz)],
-[use_system_xz=yes])
 
 ## Valgrind instrumentation
 AC_ARG_WITH([valgrind-instrumentation],
@@ -438,6 +430,11 @@ AC_ARG_WITH([valgrind-instrumentation],
 [valgrind_level=${withval}],
 [valgrind_level=0])
 
+AC_ARG_WITH([system-valgrind-headers],
+[AS_HELP_STRING([--with-system-valgrind-headers],[use system valgrind headers (if available) @<:@no@:>@])],
+[R_ARG_USE_SYSTEM(valgrind)],
+[use_system_valgrind=no])
+
 AC_ARG_WITH([internal-tzcode],
 [AS_HELP_STRING([--with-internal-tzcode],[use internal time-zone code @<:@no@:>@])],
 [use_internal_tzcode=${withval}],
@@ -581,7 +578,6 @@ R_MISSING_PROG(ACLOCAL, aclocal)
 R_MISSING_PROG(AUTOCONF, autoconf)
 R_MISSING_PROG(AUTOMAKE, automake)
 R_MISSING_PROG(AUTOHEADER, autoheader)
-AC_PROG_AWK
 AC_PROG_LN_S
 AC_PROG_YACC
 R_PROG_AR
@@ -601,7 +597,7 @@ R_PROG_PAGER
 AC_PATH_PROGS(TAR, [${TAR} gtar gnutar tar], "")
 ## TeXMF stuff
 R_PROG_TEXMF
-## Unzip && zip && gzip && bip2
+## Unzip & zip & gzip & bip2
 AC_PATH_PROGS(R_UNZIPCMD, [${UNZIP} unzip], "")
 AC_PATH_PROGS(R_ZIPCMD, [${ZIP} zip], "")
 AC_PATH_PROGS(R_GZIPCMD, [${GZIP} gzip], true)
@@ -610,25 +606,42 @@ AC_PATH_PROGS(R_BZIPCMD, [${BZIP} bzip2], "")
 R_PROG_BROWSER
 ## PDF viewer
 R_PROG_PDFVIEWER
-## Noweb
+## Noweb - used for maintainer mode only
 AC_PATH_PROG(NOTANGLE, notangle, false)
+if test "x${use_maintainer_mode}" = xyes; then
+  if test "${NOTANGLE}" = false ; then
+    AC_MSG_ERROR([Building R in maintainer mode requires notangle.])
+  fi
+fi
 ## javareconf needs this
 AC_PATH_PROG(REALPATH, realpath, false)
 
 
-## cairographics needs pkg-config
+## Search for cairographics needs pkg-config, 
+## helps find jpeg, libpng and libtiff.
 AC_PATH_PROG(PKGCONF, pkg-config , [], 
 	     [$PATH:/usr/local/bin:/ext/bin:/ext:/sw/bin:/opt/bin])
+AC_ARG_VAR([PKGCONF], [path to pkg-config utility])
+AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path])
+AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's default search path])
 
 AC_PROG_CC
-
 AC_PROG_GCC_TRADITIONAL
+AC_GNU_SOURCE ## see note above
+
 AC_PROG_CPP
 R_PROG_CPP_CPPFLAGS
-## see if the user set FFLAGS: used for Intel compilers
+
+## see if the user set FFLAGS: used for Intel compilers below
 userFFLAGS=${FFLAGS}
 R_PROG_F77
+
 AC_PROG_CXX
+## check this actually compiles
+R_PROG_CXX
+
+### R_PROG_CXX98FLAG
+
 AC_PROG_CXXCPP
 if test "${CXXCPP}" = "${CXX} -E"; then
   CXXCPP0="\$(CXX) -E"
@@ -636,8 +649,8 @@ else
   CXXCPP0=${CXXCPP}
 fi
 AC_SUBST(CXXCPP0)
+
 R_GCC4_VISIBILITY
-AC_GNU_SOURCE ## needed for libintl
 
 AC_PROG_OBJC
 ## unfortunately autoconf sets OBJC to gcc even if there is no working compiler
@@ -685,6 +698,8 @@ case "${host_os}" in
     ## changes DYLD_LIBRARY_PATH), because they override the system
     ## look-up sequence. Such automatic override has proven to break things
     ## like system frameworks (e.g. ImageIO or OpenGL framework).
+    ## Not so bad in later versions of Darwin, 
+    ## where DYLD_FALLBACK_LIBRARY_PATH is used (see below).
     ;;
   *)
     for arg in ${LDFLAGS}; do
@@ -700,8 +715,9 @@ esac
 
 ## Record name of environment variable which tells the dynamic linker
 ## where to find shlibs (typically, 'LD_LIBRARY_PATH').
-## Used in etc/ldpaths: override what libtool thinks on OS X
+## Used in etc/ldpaths: As from R 3.0.0 override what libtool thinks on macOS
 ## http://hublog.hubmed.org/archives/001192.html suggests this was in 10.4
+## However, as from 10.11 this variable is not passed down to shells.
 case "${host_os}" in
   darwin*)
     Rshlibpath_var=DYLD_FALLBACK_LIBRARY_PATH
@@ -735,16 +751,16 @@ AC_SUBST(LIBM)
 AC_CHECK_LIB(m, sin)
 case "${host_os}" in
   darwin*)
-    ## OS X <= 10.2 dlcompat, >= 10.3 included dlcompat in libSystem
-    AC_SEARCH_LIBS(dlopen, dl,,[AC_MSG_ERROR([Your OS X is too old.])])
+    ## macOS >= 10.3 include dlcompat in libSystem
+    ## This is ancient history
     ## SI says we want '-lcc_dynamic' on Darwin, although currently
-    ## http://developer.apple.com/documentation/MacOSX/ has nothing
+    ## https://developer.apple.com/documentation/MacOSX/ has nothing
     ## official.  Bill Northcott <w.northcott at unsw.edu.au> points out
     ## that it is only needed for GCC 3.x (and earlier) ...
     if test "${GCC}" = yes; then
       case "${CC_VERSION}" in
         2.*|3.*)
-          AC_CHECK_LIB(cc_dynamic, main) ;;
+	  AC_MSG_ERROR([Your gcc is too old.])
       esac
     fi
     ;;
@@ -770,13 +786,19 @@ if test "${use_readline}" = yes; then
                               AC_CHECK_LIB(termlib, main)))
     AC_CHECK_LIB(readline, rl_callback_read_char)
     use_readline="${ac_cv_lib_readline_rl_callback_read_char}"
+    if test "${use_readline}" = yes; then
+      use_readline="${ac_cv_header_readline_readline_h}"
+    fi
   fi
-  ## the NetBSD version as used in OS X does not have this
-  AC_CHECK_FUNCS(history_truncate_file)
   if test "${use_readline}" = no; then
     AC_MSG_ERROR([--with-readline=yes (default) and headers/libs are not available])
   else
-    R_CHECK_FUNCS([rl_completion_matches], 
+    ## the NetBSD emulation supplied by macOS does not have this
+    AC_CHECK_FUNCS(history_truncate_file)
+    ## rl_completion_matches is >= 4.2.
+    ## rl_resize_terminal is >= 4.0 ane we use it only for >= 6.3.
+    ## rl_callback_sigcleanup is in pre-releases for 7.0, not yet used.
+    R_CHECK_FUNCS([rl_callback_sigcleanup rl_completion_matches rl_resize_terminal rl_sort_completion_matches], 
 [#include <stdio.h>
 #include <readline/readline.h>]
                  )
@@ -799,27 +821,27 @@ AC_HEADER_SYS_WAIT
 ## Some of these are also checked for when Autoconf computes the default
 ## includes.
 ##
-## The following headers are POSIX: dlfcn.h fcntl.h glob.h grp.h
-## pwd.h strings.h sys/resource.h sys/select.h sys/socket.h 
-## sys/stat.h sys/time.h sys/times.h sys/utsname.h unistd.h utime.h
-## dl.h seems to be for HP-UX
-## floatingpoint.h is on FreeBSD and Solaris, originating in SysV.  
-## (It is probably only used for fpsetmask on FreeBSD).
-## fpu_control.h is only used on Linux, for the obsolete __setfpucw.
+## The following headers are POSIX,
+## We use sched.h for Linux-specific features (affinity)
+AC_CHECK_HEADERS(dlfcn.h fcntl.h glob.h grp.h pwd.h sched.h strings.h \
+  sys/resource.h sys/select.h sys/socket.h sys/stat.h sys/time.h \
+  sys/times.h sys/utsname.h unistd.h utime.h)
+## dl.h is used in src/unix/hpdlfcn.c included from src/unix/dynload.c on HP-UX
+## features.h is used by date-time code on Linux.
+## floatingpoint.h is used for fpsetmask on FreeBSD.
 ## sys/param.h is one way to get PATH_MAX.
-## sched.h is POSIX, but we use it for Linux-specific features (affinity)
-AC_CHECK_HEADERS(arpa/inet.h dl.h dlfcn.h elf.h fcntl.h floatingpoint.h \
-  fpu_control.h glob.h grp.h langinfo.h \
-  netdb.h netinet/in.h pwd.h sched.h strings.h \
-  sys/param.h sys/resource.h sys/select.h sys/socket.h \
-  sys/stat.h sys/time.h sys/times.h sys/utsname.h unistd.h utime.h)
-## </NOTE>
-## <NOTE>
+AC_CHECK_HEADERS(arpa/inet.h dl.h elf.h features.h floatingpoint.h \
+  langinfo.h netdb.h netinet/in.h sys/param.h)
+## stdalign.h is C11.
+AC_CHECK_HEADERS(stdalign.h)
 ## These are C99 headers but some C code (written to work also
 ## without assuming C99) may need the corresponding conditionals.
 AC_CHECK_HEADERS(errno.h inttypes.h limits.h locale.h stdarg.h stdbool.h \
                  stdint.h string.h)
 ## only vsnprintf.c requires stdarg.h
+
+## We also use without checking sys/sysctl.h, but only on *BSD and macOS
+## The default includes check for sys/types.h (POSIX), which we use unconditionally
 ## </NOTE>
 
 R_HEADER_SETJMP
@@ -828,7 +850,7 @@ R_HEADER_GLIBC2
 ### * Checks for types.
 
 AC_TYPE_SIGNAL
-## xz needs uint64_t
+## liblzma uses uint64_t: used unconditionally in src/main/util.c
 AC_TYPE_UINT64_T
 AC_CHECK_TYPES([int64_t, int_fast64_t])
 AC_TYPE_PID_T
@@ -840,7 +862,7 @@ AH_TEMPLATE([blkcnt_t],
              Apparently necessary to fix a GCC bug on AIX?])
 R_TYPE_SOCKLEN
 AC_CHECK_TYPES([stack_t], , , [#include <signal.h>])
-## These are optional C99 types, which we typedef in Defn.h if absent.
+## These are optional C99 types, which we used to typedef in Defn.h if absent.
 ## There seems some confusion as to where they should be defined:
 ## the standard says stdint.h but drafts and Solaris 8 have inttypes.h.
 ## It seems all systems having stdint.h include it in inttypes.h, and
@@ -892,7 +914,7 @@ fi
 R_PROG_CC_MAKEFRAG
 R_PROG_CC_LO_MAKEFRAG
 
-AC_OPENMP
+R_OPENMP
 
 ### *** Fortran 77 compiler.
 
@@ -910,7 +932,7 @@ AM_CONDITIONAL(COMPILE_FORTRAN_DOUBLE_COMPLEX,
                [test "x${HAVE_FORTRAN_DOUBLE_COMPLEX}" != x])
 
 AC_LANG_PUSH(Fortran 77)
-AC_OPENMP
+R_OPENMP
 AC_LANG_POP(Fortran 77)
 
 
@@ -919,7 +941,7 @@ AC_LANG_POP(Fortran 77)
 R_PROG_CXX_MAKEFRAG
 
 AC_LANG_PUSH(C++)
-AC_OPENMP
+R_OPENMP
 AC_LANG_POP(C++)
 
 ### *** ObjC compiler
@@ -948,40 +970,6 @@ case "${host_cpu}" in
     ## We used to add -mieee-fp here, but it seems it is really a
     ## linker flag for old Linuxen adding -lieee to a non-shared link.
     ;;
-  alpha*)
-    ## <NOTE>
-    ## * IEEE math
-    ## We really need to use @option{-ieee_with_inexact} (called
-    ## @option{-mieee-with-inexact} for GCC) for the C compiler:
-    ## @option{-ieee} (or @option{-mieee}) are not enough.
-    ## According to <Albrecht.Gebhardt at uni-klu.ac.at> and Luke Tierney
-    ## <luke at stat.uiowa.edu>, @option{-fpe3} is what we want for the
-    ## native Fortran 77 compiler: seems that not all versions map
-    ## @option{-ieee} to @option{-fpe3}.
-    ## What about the C++ compilers?
-    if test "${GCC}" = yes; then
-      R_PROG_CC_FLAG([-mieee-with-inexact],
-                     R_SH_VAR_ADD(R_XTRA_CFLAGS, [-mieee-with-inexact]))
-    else
-      R_PROG_CC_FLAG([-ieee_with_inexact],
-                     R_SH_VAR_ADD(R_XTRA_CFLAGS, [-ieee_with_inexact]))
-    fi
-    if test "${G77}" = yes; then
-      R_PROG_F77_FLAG([-mieee],
-                      R_SH_VAR_ADD(R_XTRA_FFLAGS, [-mieee]))
-    else
-      R_PROG_F77_FLAG([-fpe3],
-                      R_SH_VAR_ADD(R_XTRA_FFLAGS, [-fpe3]))
-    fi
-    if test "${GXX}" = yes; then
-      R_PROG_CXX_FLAG([-mieee],
-                      R_SH_VAR_ADD(R_XTRA_CXXFLAGS, [-mieee]))
-    else
-      R_PROG_CXX_FLAG([-ieee],
-                      R_SH_VAR_ADD(R_XTRA_CXXFLAGS, [-ieee]))
-    fi
-    ## </NOTE>
-    ;;
 esac
 
 AH_TEMPLATE([HAVE_NO_SYMBOL_UNDERSCORE],
@@ -1001,10 +989,8 @@ case "${host_os}" in
       fi
     fi
     ;;
-  cygwin*|mingw*|windows*|winnt)
-    AC_DEFINE(HAVE_NO_SYMBOL_UNDERSCORE)
-    ;;
   darwin*)
+    ## which these days mean macOS
     AC_DEFINE(HAVE_NO_SYMBOL_UNDERSCORE)
     ;;
   hpux*)
@@ -1013,29 +999,13 @@ case "${host_os}" in
       cc|c89)
 	## Luke Tierney says we also need '-Wp,-H16000' which tells the
 	## pre-processor to increase the size of an internal table.  It
-	## seems that src/modules/vfonts/g_her_glyph.c contains a line
+	## seems that src/main/vfonts/g_her_glyph.c contains a line
 	## that is too long for the pre-processor without this flag.
 	R_SH_VAR_ADD(R_XTRA_CPPFLAGS, [-Wp,-H16000])
 	;;
     esac
     AC_CHECK_LIB(dld, shl_load, [R_XTRA_LIBS="-ldld ${R_XTRA_LIBS}"])
     ;;
-  irix*)
-    R_C_OPTIEEE
-    ## <NOTE>
-    ## We really should test explictly whether the Fortran and C++
-    ## compilers *need* '-OPT:IEEE_NaN_inf=ON'.  Currently, all we do is
-    ## check whether the non-GNU tools *accept* the flag.
-    if test "${G77}" != yes; then
-      R_PROG_F77_FLAG([-OPT:IEEE_NaN_inf=ON],
-                      R_SH_VAR_ADD(R_XTRA_FFLAGS, [-OPT:IEEE_NaN_inf=ON]))
-    fi
-    if test "${GXX}" != yes; then
-      R_PROG_CXX_FLAG([-OPT:IEEE_NaN_inf=ON],
-                      R_SH_VAR_ADD(R_XTRA_CXXFLAGS, [-OPT:IEEE_NaN_inf=ON]))
-    fi
-    ## </NOTE>
-    ;;
   linux*)
     case  "${CC}" in
       ## Intel compiler
@@ -1120,14 +1090,14 @@ case "${host_os}" in
         ;;
     esac
     ;;
+  mingw*|windows*|winnt)
+    AC_DEFINE(HAVE_NO_SYMBOL_UNDERSCORE)
+    ;;
   openbsd*)
     if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`"; then
       AC_DEFINE(HAVE_NO_SYMBOL_UNDERSCORE)
     fi
     ;;
-  osf*)
-    AC_DEFINE(HAVE_NO_SYMBOL_UNDERSCORE)
-    ;;  
 esac
 
 if test "${SAFE_FFLAGS+set}" != set; then
@@ -1143,6 +1113,7 @@ AC_SUBST(CFLAGS)
 AC_SUBST(MAIN_CFLAGS)
 AC_SUBST(SHLIB_CFLAGS)
 AC_SUBST(CXXFLAGS)
+AC_SUBST(CXXSTD)
 AC_SUBST(SHLIB_CXXFLAGS)
 AC_SUBST(FFLAGS)
 AC_SUBST(SAFE_FFLAGS)
@@ -1233,7 +1204,7 @@ if test -n "${XMKMF}"; then
   fi
   cxx=`"${srcdir}/tools/GETMAKEVAL" CXX`
   cxx=`echo ${cxx} | sed "s/ .*//"`
-  if test -n "${cxx}" ; then
+  if test -n "${cxx}" -a  -n "${CXX}"; then
     r_cxx_cmd=`echo ${CXX} | sed "s/ .*//"`
     if test "`which ${cxx}`" = "`which ${r_cxx_cmd}`"; then
       cxxpicflags=`"${srcdir}/tools/GETMAKEVAL" CXXPICFLAGS`
@@ -1251,7 +1222,7 @@ if test "${GCC}" = yes; then
 ## has 32k and so can use -fpic.
 ## However, although the gcc docs do not mention it, it seems s390/s390x
 ## also supports and needs -fPIC
-    sparc*|ppc64|powerpc64|s390*)
+    sparc*|ppc64*|powerpc64*|s390*)
       cpicflags="-fPIC"
       ;;
     *)
@@ -1262,7 +1233,7 @@ if test "${GCC}" = yes; then
 fi
 if test "${G77}" = yes; then
   case "${host_cpu}" in
-    sparc*|ppc64|powerpc64|s390*)
+    sparc*|ppc64*|powerpc64*|s390*)
       fpicflags="-fPIC"
       ;;
     *)
@@ -1272,7 +1243,7 @@ if test "${G77}" = yes; then
 fi
 if test "${GXX}" = yes; then
   case "${host_cpu}" in
-    sparc*|ppc64|powerpc64|s390*)
+    sparc*|ppc64*|powerpc64*|s390*)
       cxxpicflags="-fPIC"
       ;;
     *)
@@ -1284,7 +1255,6 @@ fi
 
 ## Step 3.  Individual platform overrides.
 dylib_undefined_allowed=yes
-is_cygwin=no
 case "${host_os}" in
   aix*)
     use_exportfiles=yes
@@ -1315,64 +1285,25 @@ case "${host_os}" in
       shlib_cxxldflags="-shared ${shlib_cxxldflags}"
     fi 
     ;;
-  cygwin*)
-    ## All Windows code is PIC
-    cpicflags=
-    cxxpicflags=
-    fpicflags=
-    fcpicflags=
-    SHLIB_EXT=".dll"
-    dylib_undefined_allowed=no
-    is_cygwin=yes
-    main_ldflags="${wl}--large-address-aware ${wl}--stack=0xA00000"
-    ;;
   darwin*)
     darwin_pic="-fPIC"
     dylib_undefined_allowed=no
     darwin_dylib_ldflags="-dynamiclib"
-    ## Want '-mdynamic-no-pic' for GCC 3, says Jan de Leeuw.
-    if test "${GCC}" = yes; then
-      case "${CC_VERSION}" in
-        3.*)
-          R_SH_VAR_ADD(main_ldflags, [-mdynamic-no-pic]) ;;
-      esac
-    fi
-    ## some linkers are broken and need to be set to a specific
-    ## OS X version to work better
-    case "${host_os}" in
-       darwin8*)
-          # this is the 'old' way and it doesn't work with recent gcc as the driver
-	  # prepends its own version
-	  ### darwin_min_flag='Wl,-macosx_version_min -Wl,10.4'
-	  # this is the 'new' way, but it's not clear which driver version
-	  # started to support it (Xcode 2.5 is known to work and 2.4 should)
-	  # A work-around for older Xcode is to set MACOSX_DEPLOYMENT_TARGET
-	  # environment variable. It has its own problems, but we may as well
-	  # honor it, assuming that it fixes things.
-	  if test -z "${MACOSX_DEPLOYMENT_TARGET}"; then
-	      darwin_min_flag='-mmacosx-version-min=10.4'
-	  fi
-	  ;;
-       *)
-	  darwin_min_flag=''
-	  ;;
-    esac
-    case "${host_os}" in
-      ## * recent ld has -single_module so it doesn't need -fno-common
-      ##   we have to use dylib instead of a bundle
-      ## * dylib+single_module+flat_namespace=pretty much what other platforms call .so
-      ##   but there can be no multiple symbols (due to flat namespace)
-      ## * since 10.3 we can also use -undefined dynamic_lookup which allows us to
-      ##   use two-level namespace and still have undefined symbols
-      *)
-        ## FIXME: strictly speaking it should be "yes" but libRblas still
-	## needs -lgfortran because the sharing is a one-way street
-        ## dylib_undefined_allowed=yes
-
-	## we have to test this in case an outdated linker or non-Apple compiler is used
-	AC_MSG_CHECKING([whether linker supports dynamic lookup])
-	shlib_ldflags="-dynamiclib -Wl,-headerpad_max_install_names ${darwin_min_flag} -undefined dynamic_lookup -single_module -multiply_defined suppress"
-	AC_CACHE_VAL([r_cv_has_dynlookup],[
+    shlib_ldflags="-dynamiclib -Wl,-headerpad_max_install_names -undefined dynamic_lookup -single_module -multiply_defined suppress"
+    ## * recent ld has -single_module so it doesn't need -fno-common
+    ##   we have to use dylib instead of a bundle
+    ## * dylib+single_module+flat_namespace=pretty much what other platforms call .so
+    ##   but there can be no multiple symbols (due to flat namespace)
+    ## * since 10.3 we can also use -undefined dynamic_lookup which allows us to
+    ##   use two-level namespace and still have undefined symbols
+
+    ## FIXME: strictly speaking it should be "yes" but libRblas still
+    ## needs -lgfortran because the sharing is a one-way street
+    ## dylib_undefined_allowed=yes
+
+    ## we have to test this in case an outdated linker or non-Apple compiler is used
+    AC_MSG_CHECKING([whether linker supports dynamic lookup])
+    AC_CACHE_VAL([r_cv_has_dynlookup],[
 [cat > conftest.c <<EOF
   void dummy() { }
 EOF]
@@ -1387,36 +1318,35 @@ else
 fi
 rm -f libconftest${DYLIB_EXT} conftest.c
 ])
-	if test -n "${FORCE_FLAT_NAMESPACE}"; then
-	   AC_MSG_WARN([Use of flat namespace is requested by user.])
-	   r_cv_has_dynlookup=forced-no
-	fi
-	if test "${r_cv_has_dynlookup}" != "yes"; then
-	   shlib_ldflags="-dynamiclib -flat_namespace -undefined suppress -single_module -multiply_defined suppress"
-	   dylib_undefined_allowed=yes
-	fi
+    if test -n "${FORCE_FLAT_NAMESPACE}"; then
+       AC_MSG_WARN([Use of flat namespace is requested by user.])
+       r_cv_has_dynlookup=forced-no
+    fi
+    if test "${r_cv_has_dynlookup}" != "yes"; then
+       shlib_ldflags="-dynamiclib -flat_namespace -undefined suppress -single_module -multiply_defined suppress"
+       dylib_undefined_allowed=yes
+    fi
 	
-	## we use the same method for shlib and dylib now
-	darwin_dylib_ldflags="${shlib_ldflags}"
-	## side note: we could use flat namespace instead, but there is an exception:
-	## * libRblas must be 2-level, dyn lookup because of xerbla which is undefined
-        ;;
-    esac
+    ## we use the same method for shlib and dylib now
+    darwin_dylib_ldflags="${shlib_ldflags}"
+    ## side note: we could use flat namespace instead, but there is an exception:
+    ## * libRblas must be 2-level, dyn lookup because of xerbla which is undefined
     cpicflags="${darwin_pic}"
     cxxpicflags="${darwin_pic}"
+    ## macOS does not have a Fortran compiler, so this is speculative
     fpicflags="${darwin_pic}"
     shlib_cxxldflags="${shlib_ldflags}"
-    if test "${ac_cv_lib_cc_dynamic_main}" = yes; then
-      ## Could also try grepping LIBS for '-lcc_dynamic' ...
-      SHLIB_LIBADD="-lcc_dynamic"
-    fi
     ;;
   freebsd*)
-    main_ldflags="-export-dynamic"
+    ## maybe this needs to depend on the compiler:
+    ## -export-dynamic used to work, but does not with clang.
+    ## Seems FreeBSD has used the GNU linker since at least 3.0 (Oct 1998)
+    ## We could also use -rdynamic, which seems to work with clang and gcc.
+    main_ldflags="-Wl,--export-dynamic"
     shlib_ldflags="-shared"
     ;;
-  gnu*)				# GNU Hurd
-    main_ldflags="-export-dynamic"
+  gnu*)				# GNU Hurd, see FreeBSD comment
+    main_ldflags="-Wl,--export-dynamic"
     ;;
   hpux*)
     SHLIB_EXT=".sl"
@@ -1446,13 +1376,6 @@ rm -f libconftest${DYLIB_EXT} conftest.c
       shlib_cxxldflags="-shared -fPIC"
     fi
     ;;
-  irix*)
-    cpicflags=
-    cxxpicflags=
-    fpicflags=
-    shlib_ldflags="-shared"
-    shlib_cxxldflags="-shared"
-    ;;
   linux*aout)			# GNU Linux/aout
     sed '/HAVE_ELF_H/d' confdefs.h > tmp.h ; mv tmp.h confdefs.h
     ;;
@@ -1488,8 +1411,8 @@ rm -f libconftest${DYLIB_EXT} conftest.c
         ;;
     esac
     ## Luke Tierney says that just '-export-dynamic' does not work for
-    ## Intel compilers (icc).
-    ## Could also use -rdynamic
+    ## Intel compilers (icc).  It is accepted by clang but ignored.
+    ## Could also use -rdynamic, at least for gcc and clang.
     main_ldflags="-Wl,--export-dynamic"
     STATICR1="-Wl,--whole-archive"
     STATICR2="-Wl,--no-whole-archive"
@@ -1502,25 +1425,39 @@ rm -f libconftest${DYLIB_EXT} conftest.c
     fcpicflags=
     ;;
   netbsd*)
+    ## See the comments about FreeBSD
     if ${CPP} - -dM < /dev/null | grep __ELF__ >/dev/null ; then
-      main_ldflags="-export-dynamic"
+      main_ldflags="-Wl,--export-dynamic"
       shlib_ldflags="-shared"
     else
       shlib_ldflags="-Bshareable"
     fi
     ;;
   openbsd*)
-    ## looks like ${wl} is not defined here.  Perhaps in libtool code?
+    ## ${wl} is defined by libtool configuration code.
+    ## Both -Wl,-export-dynamic and -Wl,--export-dynamic seem to
+    ## work with the GNU linker, but the second is what is documented.
+    ## libtool seems to use -Wl-E , a GNU ld alias of -Wl,--export-dynamic
     if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`"; then
       main_ldflags="${wl}-export-dynamic"
       shlib_ldflags="-shared -fPIC"
     fi
-    ;;
-  osf*)
-    cpicflags=
-    cxxpicflags=
-    fpicflags=
-    shlib_ldflags="-shared"
+    case "${host_cpu}" in 
+      powerpc*)
+	## GCC -fpic limits to 2**16 on OpenBSD powerpc.
+	## Error message without -fPIC:
+	##   relocation truncated to fit: R_PPC_GOT16...
+        if test "${GCC}" = yes; then
+          cpicflags="-fPIC"
+        fi  
+        if test "${G77}" = yes; then
+          fpicflags="-fPIC"
+        fi
+        if test "${GXX}" = yes; then
+          cxxpicflags="-fPIC"
+        fi
+        ;;
+    esac
     ;;
   solaris*)
 ## SPARC has only an 8k global object table, 1024 entries on 64-bit,
@@ -1589,13 +1526,13 @@ if test -z "${MAIN_LD}"; then
   else
      MAIN_LD="${main_ld}"
   fi
-  R_SH_VAR_ADD(MAIN_LDFLAGS, [${main_ldflags}])
 fi
+R_SH_VAR_ADD(MAIN_LDFLAGS, [${main_ldflags}])
 
 : ${CPICFLAGS="${cpicflags}"}
 if test -z "${CPICFLAGS}"; then
   case "${host_os}" in
-    aix*|cygwin*|irix*|mingw*|osf*)
+    aix*|mingw*)
       ;;
     *)
       AC_MSG_WARN([I could not determine CPICFLAGS.])
@@ -1607,7 +1544,7 @@ fi
 : ${FPICFLAGS="${fpicflags}"}
 if test -z "${FPICFLAGS}"; then
   case "${host_os}" in
-    aix*|cygwin*|irix*|mingw*|osf*)
+    aix*|mingw*)
       ;;
     *)
       AC_MSG_WARN([I could not determine FPICFLAGS.])
@@ -1617,13 +1554,12 @@ if test -z "${FPICFLAGS}"; then
 fi
 
 : ${CXXPICFLAGS="${cxxpicflags}"}
-if test -z "${CXXPICFLAGS}"; then
+if test -n "${CXX}" -a -z "${CXXPICFLAGS}"; then
   case "${host_os}" in
-    aix*|cygwin*|irix*|mingw*|osf*)
+    aix*|mingw*)
       ;;
     *)
       warn_cxxpicflags="I could not determine CXXPICFLAGS."
-      AC_MSG_WARN([${warn_cxxpicflags}])
       ;;
   esac
 fi
@@ -1651,7 +1587,7 @@ if test -z "${SHLIB_CXXLD}"; then
   fi
   R_SH_VAR_ADD(SHLIB_CXXLDFLAGS, [${shlib_cxxldflags}])
 fi
-if test -z "${SHLIB_CXXLDFLAGS}"; then
+if test  -n "${CXX}" -a -z "${SHLIB_CXXLDFLAGS}"; then
   warn_shlib_cxxldflags="I could not determine SHLIB_CXXLDFLAGS"
   AC_MSG_WARN([${warn_shlib_cxxldflags}])
 fi
@@ -1667,6 +1603,7 @@ dylib_ldflags="${SHLIB_LDFLAGS}"
 LIBR_LDFLAGS=""
 RLAPACK_LDFLAGS=""
 RBLAS_LDFLAGS=""
+R_DYLIB_VERSION_SUFFIX=""
 case "${host_os}" in
   aix*)
     ## Not needed for -brtl linking
@@ -1693,14 +1630,19 @@ case "${host_os}" in
     fi
     ;;
   openbsd*)
-    PACKAGE_VERSION_MAJOR=`echo "${PACKAGE_VERSION}" | \
-      sed -e "s/\.//" -e "s/\..*$//"`
-    PACKAGE_VERSION_MINOR=`echo "${PACKAGE_VERSION}" | \
-      sed -e "s/.*\.\([[^.]][[^.]]*$\)/\1/"`
-    DYLIB_EXT=".so.${PACKAGE_VERSION_MAJOR}.${PACKAGE_VERSION_MINOR}"
+    if test -z "${R_DYLIB_VERSION}"; then
+      PACKAGE_VERSION_MAJOR=`echo "${PACKAGE_VERSION}" | \
+        sed -e "s/\.//" -e "s/\..*$//"`
+      PACKAGE_VERSION_MINOR=`echo "${PACKAGE_VERSION}" | \
+        sed -e "s/.*\.\([[^.]][[^.]]*$\)/\1/"`
+      R_DYLIB_VERSION="${PACKAGE_VERSION_MAJOR}.${PACKAGE_VERSION_MINOR}"
+    fi
+    R_DYLIB_VERSION_SUFFIX=".${R_DYLIB_VERSION}"
     ;;
 esac
 
+R_DYLIB_EXT="${DYLIB_EXT}${R_DYLIB_VERSION_SUFFIX}"
+
 if test -z "${DYLIB_LD}"; then
   dylib_ld_was_given=no
   DYLIB_LD="${SHLIB_LD}"
@@ -1716,7 +1658,6 @@ fi
 AC_SUBST(INTERNET_LIBS)
 
 AM_CONDITIONAL(DYLIB_UNDEFINED_ALLOWED, [test "x${dylib_undefined_allowed}" = xyes])
-AM_CONDITIONAL(BUILD_CYGWIN, [test "x${is_cygwin}" = xyes])
 
 AC_SUBST(MAIN_LD)
 AC_SUBST(MAIN_LDFLAGS)
@@ -1743,9 +1684,13 @@ AC_SUBST(LAPACK_LDFLAGS)
 AC_SUBST(FW_VERSION)
 AC_SUBST(STATICR1)
 AC_SUBST(STATICR2)
+AC_SUBST(R_DYLIB_EXT)
 
-## C++11 and later
-R_CXX1X
+## Test support for C++ standards
+R_STDCXX([98], [CXX98], [CXX])
+R_STDCXX([11], [CXX11], [CXX])
+R_STDCXX([14], [CXX14], [CXX11])
+R_STDCXX([17], [CXX17], [CXX14])
 
 ### OpenMP.
 
@@ -1768,19 +1713,26 @@ R_CXX1X
 ##
 ## (The Fortran 77 compiler is never used for linking by default.)
 
-if test "x${main_ld_was_given}" = xno -a "${MAIN_LD}" = "\$(CC)" -a \
+if test -n "${R_OPENMP_CFLAGS+set}"; then
+  if test -n "${R_OPENMP_CFLAGS}"; then
+    R_SH_VAR_ADD(MAIN_LDFLAGS, [${R_OPENMP_CFLAGS}])
+    R_SH_VAR_ADD(DYLIB_LDFLAGS, [${R_OPENMP_CFLAGS}])
+    AC_DEFINE(HAVE_OPENMP, 1, [Define if you have C OpenMP support.])
+  fi
+elif test "x${main_ld_was_given}" = xno -a "${MAIN_LD}" = "\$(CC)" -a \
         "x${dylib_ld_was_given}" = xno -a "${DYLIB_LD}" = "\$(CC)" -a \
-        "x${ac_cv_prog_c_openmp}" != "xunsupported" -a \
-        "x${ac_cv_prog_c_openmp}" != "x"; then
+        "x${ac_cv_prog_c_openmp}" != "xunsupported"; then
   R_OPENMP_CFLAGS="${OPENMP_CFLAGS}"
-  R_OPENMP_FFLAGS="${OPENMP_FFLAGS}"
   R_SH_VAR_ADD(MAIN_LDFLAGS, [${OPENMP_CFLAGS}])
   R_SH_VAR_ADD(DYLIB_LDFLAGS, [${OPENMP_CFLAGS}])
-  AC_DEFINE(HAVE_OPENMP, 1, 
-            [Define if you have C OpenMP support.])
+  AC_DEFINE(HAVE_OPENMP, 1, [Define if you have C OpenMP support.])
 else
-  R_OPENMP_CFLAGS=
-  R_OPENMP_FFLAGS=
+  R_OPENMP_CFLAGS= 
+fi
+## Currently unused: see comment in Makeconf.in
+if test -z "${R_OPENMP_FFLAGS+set}" -a \
+        "x${ac_cv_prog_f77_openmp}" != "xunsupported"; then
+  R_OPENMP_FFLAGS="${OPENMP_FFLAGS}"
 fi
 AC_SUBST(R_OPENMP_CFLAGS)
 AC_SUBST(R_OPENMP_FFLAGS)
@@ -1834,12 +1786,12 @@ AC_CHECK_DECLS([alloca], , ,
 ## C99 functions: 
 ## not all C99 runtimes are complete,
 ## but we have substitutes for expm1 hypot log1p and (internally) nearbyint[l]
-## FreeBSD 10 still lacks log1pl
+## FreeBSD used to lack log1pl, but 10 seems to have it.
 ## FreeBSD 8.2 lacks log2
 ## FreeBSD 7.3 lacks nearbyintl/rintl (nearbyint appeared in 5.2)
 ## Apparently rint was once broken on HP-UX: undefine HAVE_RINT for such platforms
-## Cygwin and FreeBSD lack powl
-## Cygwin has rintl but not nearbyintl
+## Cygwin and FreeBSD lacked powl (FreeBSD 10 seems to have it).
+## Cygwin had rintl but not nearbyintl
 R_CHECK_FUNCS([expm1 hypot log1p log1pl log2 log10 nearbyint nearbyintl powl rint rintl], [#include <math.h>])
 ## va_copy is C99: required as from R 2.13.0
 R_CHECK_FUNCS([va_copy], [#include <stdarg.h>])
@@ -1853,11 +1805,12 @@ AC_CHECK_FUNCS(isblank)
 AC_CHECK_HEADERS(sunmath.h)
 AC_CHECK_LIB(sunmath, cospi)
 
-## Functions from draft C11 extensions, some of which are already in glibc
+## Functions from ISO/IEC TS 18661-4:2015 C11 extensions.
 ## For now, do not define _GNU_SOURCE here.
-## All but pown have long been in libsunmath
-AC_CHECK_FUNCS([atanpi atan2pi cospi exp10 pown sinpi tanpi], 
-[#define __STDC_WANT_IEC_60559_TYPES_EXT__ 1
+## All but pown have long been in Solaris' libsunmath
+## macOS has __cospi __sinpi __tanpi
+AC_CHECK_FUNCS([atanpi atan2pi cospi exp10 pown sinpi tanpi __cospi __sinpi __tanpi], 
+[#define __STDC_WANT_IEC_60559_FUNCS_EXT__ 1
 #include <math.h>
 #ifdef HAVE_SUNMATH_H
 #include <sunmath.h>
@@ -1876,6 +1829,26 @@ R_CHECK_FUNCS([fdopen popen], [#include <stdio.h>])
 if test "${ac_cv_have_decl_popen}" = "no"; then
    AC_MSG_ERROR([Building R requires the 'popen' system call])
 fi
+R_CHECK_FUNCS([getline], [#include <stdio.h>])
+R_CHECK_FUNCS([select], 
+[#ifdef HAVE_SYS_SELECT_H
+#include <sys/select.h>  /* POSIX >= 2001 */
+#endif
+#ifdef HAVE_SYS_TIME_H
+#include <sys/time.h>  /* Earlier POSIX, HP-UX? */
+#endif])
+case "${host_os}" in
+  mingw*|windows*|winnt)
+  ;;
+  *)
+  if test "${ac_cv_have_decl_select}" = "no"; then
+     AC_MSG_ERROR([Building R on Unix requires the 'select' system call])
+  fi
+  if test "${ac_cv_header_sys_select_h}" = "no" -a "${ac_cv_header_sys_times_h} = "no""; then
+     AC_MSG_ERROR([Building R on Unix requires either <sys/select.h> or <sys/time.h>])
+  fi
+  ;;
+esac
 ## Windows has neither setenv nor unsetenv
 R_CHECK_FUNCS([setenv unsetenv], [#include <stdlib.h>])
 R_CHECK_FUNCS([getrlimit getrusage getpriority], [#include <sys/resource.h>])
@@ -1895,7 +1868,9 @@ R_CHECK_FUNCS([access chdir execv ftruncate getcwd geteuid getuid link readlink
 R_CHECK_FUNCS([sched_setaffinity sched_getaffinity], [#include <sched.h>])
 ## utime was declared obsolescent in POSIX 2008 (use utimes instead)
 R_CHECK_FUNCS([utime], [#include <utime.h>])
-## clock_gettime is POSIX 1993, but not on OS X
+## POSIX.1-2008 preferred form
+R_CHECK_FUNCS([utimensat], [#include <sys/stat.h>])
+## clock_gettime is POSIX 1993, but not on macOS prior to 10.12 (Sierra)
 ## Some OSes need -lrt: Linux (for glibc versions before 2.17), Solaris,
 ## not FreeBSD. 
 ## Unsurprising, as POSIX 2008 moved it from its timers section to base.
@@ -1907,10 +1882,10 @@ R_CHECK_FUNCS([clock_gettime timespec_get], [#include <time.h>])
 ## It is not always declared, so we do not require a declaration.
 AC_CHECK_FUNCS(putenv)
 AC_CHECK_DECLS([putenv], , , [#include <stdlib.h>])
-## this is a GNU extension so usually hidden.  Not on Solaris
+## this is a GNU extension so usually hidden.  Not in Solaris 10
 AC_CHECK_FUNCS(vasprintf)
 AC_CHECK_DECLS([vasprintf], , , [#include <stdio.h>])
-## mempcpy is a GNU extension used by the included gettext.  Not on Solaris
+## mempcpy is a GNU extension used by the included gettext.  Not in Solaris 10
 AC_CHECK_FUNCS(mempcpy)
 ## realpath is POSIX 2001 (and BSD)
 ## Some early GNU libc systems had it in unistd.h.
@@ -1924,6 +1899,9 @@ AC_CHECK_DECLS([realpath], , , [#include <stdlib.h>
 R_CHECK_FUNCS([glob], [#ifdef HAVE_GLOB_H
 # include <glob.h>
 #endif])
+AC_CHECK_FUNCS([dladdr dlsym])
+AC_CHECK_DECLS([dladdr,dlsym], , , [#include<dlfcn.h>])
+AC_CHECK_DECLS([RTLD_DEFAULT,RTLD_NEXT], , , [#include<dlfcn.h>])
 
 ## Lots of uses of getwd(), file.access(), Sys.glob().
 ## We don't need times() except as a fallback for getrusage and
@@ -1999,17 +1977,16 @@ fi
 AC_SUBST(RMATH_HAVE_LOG1P)
 
 ## Do we need substitutes?
-## mkdtemp is not on Solaris, added in POSIX 2008
-## strdup strncasecmp were first required in POSIX 2008.
+## mkdtemp is not on Solaris 10, added in POSIX 2008
+## strdup strncasecmp were first required in POSIX 2001.
 AC_REPLACE_FUNCS([mkdtemp strdup strncasecmp])
 ## Enable declarations in Defn.h?
 AC_CHECK_DECLS([mkdtemp, strdup, strncasecmp])
 
 AC_SEARCH_LIBS(connect, [socket])
-# gethostbyname was removed in POSIX 2008 (in favour of getaddrinfo, POSIX 2004)
+# gethostbyname was removed in POSIX 2008 (in favour of getaddrinfo, POSIX 2001)
 AC_SEARCH_LIBS(gethostbyname, [nsl socket])
 AC_SEARCH_LIBS(xdr_string, [nsl tirpc])
-R_FUNC___SETFPUCW
 R_FUNC_CALLOC
 if test "${ac_cv_have_decl_isfinite}" = "yes"; then
 R_FUNC_ISFINITE
@@ -2018,8 +1995,18 @@ fi
 R_FUNC_LOG1P
 R_FUNC_FTELL
 R_FUNC_SIGACTION
-R_MKTIME_ERRNO
-R_FUNC_MKTIME
+
+if test x${use_internal_tzcode} = xdefault; then
+case "${host_os}" in
+   darwin*)
+     use_internal_tzcode=yes;
+     ;; 
+esac
+fi
+if test "${use_internal_tzcode}" != yes; then
+  R_MKTIME_ERRNO
+  R_FUNC_MKTIME
+fi
 
 R_C99_COMPLEX
 
@@ -2045,8 +2032,9 @@ fi
 AC_CACHE_CHECK([whether 'struct tm' includes tm_gmtoff],
                 [r_cv_have_tm_gmtoff],
 [AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
-// glibc needs this defined.
+// glibc needs this defined, second for >= 2.20
 #define _BSD_SOURCE
+#define _DEFAULT_SOURCE
 #include <time.h>
 
 int main() {
@@ -2060,13 +2048,6 @@ if test "x${r_cv_have_tm_gmtoff}" = xyes; then
   AC_DEFINE(HAVE_TM_GMTOFF, 1, [Define to 1 if your 'struct tm' has tm_gmtoff.])
 fi
 
-
-## check for vecLib framework (potentially to be used for BLAS)
-## in theory vecLib is platform-independent, in practice only
-## Apple's OS X is known to provide it
-## However, as from 10.10 it only provides Accelerate.
-R_CHECK_FRAMEWORK(cblas_cdotu_sub, Accelerate)
-
 ## BLAS.
 ## <NOTE>
 ## This has to come *after* checking for Fortran 77 compiler/converter
@@ -2200,7 +2181,7 @@ AM_CONDITIONAL(USE_VECLIB_G95FIX, [test "x${use_veclib_g95fix}" = xyes])
 AM_CONDITIONAL(USE_EXTERNAL_BLAS, [test "${acx_blas_ok}" = "yes"])
 
 ## LAPACK.
-## The default has already been set on OS X: otherwise it is "no"
+## The default has already been set on macOS: otherwise it is "no"
 ## and so this test fails.
 if test "${use_lapack}" = "yes"; then
   R_LAPACK_LIBS
@@ -2224,7 +2205,6 @@ if test "$use_ICU" = yes ; then
   R_ICU
   if test "$use_ICU" = no ; then
     case "${host_os}" in
-      ## darwin has ICU 3.2 in 10.4, 3.6 in 10.5
       darwin*)
         AC_CHECK_LIB(icucore, ucol_open, [],
             [AC_MSG_ERROR([library 'icucore' is required for ICU])])
@@ -2282,9 +2262,6 @@ R_TCLTK
 ## BSD networking.
 R_BSD_NETWORKING
 
-## Bitmap headers and libraries.
-R_BITMAPS
-
 ## XDR headers and library routines.
 R_XDR
 
@@ -2303,6 +2280,17 @@ R_PCRE
 ## tre headers and libraries.
 R_TRE
 
+## libcurl
+R_LIBCURL
+
+
+## Bitmap headers and libraries.
+if test -n "${PKGCONF}"; then
+R_BITMAPS2
+else
+R_BITMAPS
+fi
+
 ## POSIX times.
 R_SYS_POSIX_LEAPSECONDS
 
@@ -2330,16 +2318,12 @@ AC_FUNC_FSEEKO
 ## Valgrind instrumentation
 if test ${valgrind_level} -eq 0; then
   AC_DEFINE(NVALGRIND, 1, [Define to disable Valgrind instrumentation])
+elif test "${use_system_valgrind}" = yes; then
+  AC_CHECK_HEADERS([valgrind/memcheck.h])
 fi
+
 AC_DEFINE_UNQUOTED(VALGRIND_LEVEL, ${valgrind_level}, [Define as 1 or 2 to specify levels of Valgrind instrumentation])
 
-if test x${use_internal_tzcode} = xdefault; then
-case "${host_os}" in
-   darwin*)
-     use_internal_tzcode=yes;
-     ;; 
-esac
-fi
 
 if test "x${use_internal_tzcode}" = xyes; then
   AC_DEFINE(USE_INTERNAL_MKTIME, 1, [Define to use internal time-zone code])
@@ -2358,9 +2342,11 @@ case "${host_os}" in
     [AC_RUN_IFELSE([AC_LANG_SOURCE([[
 #include "confdefs.h"
 #include <stdlib.h>
+/* This might get optimized out if not used */
 extern void * __libc_stack_end;
 
 int main () {
+    if(!__libc_stack_end) exit(1);
     exit(0);
 }
   ]])], [r_cv_libc_stack_end=yes], [r_cv_libc_stack_end=no], 
@@ -2422,7 +2408,7 @@ AC_PROG_FC()
 AC_LANG_PUSH(Fortran)
 AC_FC_SRCEXT(f90, [dummy=1], [dummy=0])
 AC_FC_SRCEXT(f95, [dummy=1], [dummy=0])
-AC_OPENMP
+R_OPENMP
 AC_LANG_POP()
 if test -z "${SHLIB_FCLD}"; then
   shlib_fcld_was_given=no
@@ -2437,6 +2423,8 @@ AC_SUBST(FCLIBS)
 
 ## OpenMP package stuff (needs to come *after* configuration of all
 ## compilers).
+## We allow the users to override this for packages only (for now)
+## FIXME: what if SHLIB_OPENMP_?FLAGS is set but empty? (could use -n "${VAR+set}")
 if test "x${shlib_ld_was_given}" = xno -a \
         "${SHLIB_LD}" = "\$(CC)" -a \
         "x${ac_cv_prog_c_openmp}" != "xunsupported" -a \
@@ -2447,19 +2435,35 @@ if test "x${shlib_ld_was_given}" = xno -a \
         "x${shlib_fcld_was_given}" = xno -a \
         "${SHLIB_FCLD}" = "\$(FC)" -a \
         "x${ac_cv_prog_fc_openmp}" != "xunsupported"; then
-  SHLIB_OPENMP_CFLAGS="${OPENMP_CFLAGS}"
-  SHLIB_OPENMP_CXXFLAGS="${OPENMP_CXXFLAGS}"
-  SHLIB_OPENMP_FCFLAGS="${OPENMP_FCFLAGS}"
-  SHLIB_OPENMP_FFLAGS="${OPENMP_FFLAGS}"
   ## next macro is copied into Rconfig.h
   AC_DEFINE(SUPPORT_OPENMP, 1,
             [Define if you have C/C++/Fortran OpenMP support for package code.])
-else
-  SHLIB_OPENMP_CFLAGS=
-  SHLIB_OPENMP_CXXFLAGS=
-  SHLIB_OPENMP_FCFLAGS=
-  SHLIB_OPENMP_FFLAGS=
 fi
+## This assumes that OpenMP support in the C compiler includes compilation by F77
+if test -z "${SHLIB_OPENMP_CFLAGS+set}" -a \
+        "x${shlib_ld_was_given}" = xno -a \
+        "${SHLIB_LD}" = "\$(CC)" -a \
+        "x${ac_cv_prog_c_openmp}" != "xunsupported" -a \
+        "x${ac_cv_prog_c_openmp}" != "x"; then
+  SHLIB_OPENMP_CFLAGS="${OPENMP_CFLAGS}"
+  if test -z "${SHLIB_OPENMP_FFLAGS+set}" -a \
+          "x${ac_cv_prog_f77_openmp}" != "xunsupported"; then
+    SHLIB_OPENMP_FFLAGS="${OPENMP_FFLAGS}"
+  fi
+fi
+if test -z "${SHLIB_OPENMP_CXXFLAGS+set}" -a \
+        "x${shlib_cxxld_was_given}" = xno -a \
+        "${SHLIB_CXXLD}" = "\$(CXX)" -a \
+        "x${ac_cv_prog_cxx_openmp}" != "xunsupported"; then
+  SHLIB_OPENMP_CXXFLAGS="${OPENMP_CXXFLAGS}"
+fi
+if test -z "${SHLIB_OPENMP_FCFLAGS+set}" -a \
+        "x${shlib_fcld_was_given}" = xno -a \
+        "${SHLIB_FCLD}" = "\$(FC)" -a \
+        "x${ac_cv_prog_fc_openmp}" != "xunsupported"; then
+  SHLIB_OPENMP_FCFLAGS="${OPENMP_FCFLAGS}"
+fi
+
 AC_SUBST(SHLIB_OPENMP_CFLAGS)
 AC_SUBST(SHLIB_OPENMP_CXXFLAGS)
 AC_SUBST(SHLIB_OPENMP_FCFLAGS)
@@ -2471,7 +2475,7 @@ AC_SUBST(SHLIB_OPENMP_FFLAGS)
 ## use this to pick out gfortran (even though it is unreliable).
 if test "${ac_cv_fc_compiler_gnu}" = yes; then
   case "${host_cpu}" in
-    sparc*|ppc64|powerpc64|s390*)
+    sparc*|ppc64*|powerpc64*|s390*)
       fcpicflags="-fPIC"
       ;;
     *)
@@ -2481,7 +2485,8 @@ if test "${ac_cv_fc_compiler_gnu}" = yes; then
 fi
 case "${host_os}" in
   darwin*)
-    fcpicflags="-fno-common"
+     ## macOS does not have a Fortran compiler, so this is speculative
+    fcpicflags="${darwin_pic}"
     ;;
   hpux*)
     case "${FC}" in
@@ -2513,7 +2518,7 @@ esac
 : ${FCPICFLAGS="${fcpicflags}"}
 if test -z "${FCPICFLAGS}"; then
   case "${host_os}" in
-    aix*|cygwin*|irix*|mingw*|osf*)
+    aix*|mingw*)
       ;;
     *)
       AC_MSG_WARN([I could not determine FCPICFLAGS.])
@@ -2542,8 +2547,9 @@ LIBS="${LIBS1} ${LIBS2}"
 ## On Linux, do not add the ld.so system directories such as '/lib' and
 ## '/usr/lib', so that the entries from '/etc/ld.so.conf' are not
 ## shadowed (otherwise, e.g. optimized ATLAS libs would not be used).
-## On OS X (Darwin) /usr/X11R6/lib shadows the OpenGL framework and is not
-## needed in DYLD_LIBRARY_PATH.
+
+## On macOS (Darwin) this used to have /usr/X11R6/lib
+## which shadows the OpenGL framework but we add nothing on macOS ....
 case "${host_os}" in
   linux*)
     r_ld_library_defaults="/usr/lib64:/lib64:/usr/lib:/lib"
@@ -2551,9 +2557,6 @@ case "${host_os}" in
   solaris*)
     r_ld_library_defaults="/usr/lib:/lib"
     ;;
-  darwin*)
-    r_ld_library_defaults="/usr/X11R6/lib"
-    ;;
   *)
     r_ld_library_defaults=
     ;;
@@ -2623,18 +2626,7 @@ AC_SUBST(XTRA_INTL_CPPFLAGS)
 AM_CONDITIONAL(USE_NLS, [test "x${USE_NLS}" = xyes])
 AM_CONDITIONAL(BUILD_LIBINTL, [test "x${USE_INCLUDED_LIBINTL}" = xyes])
 
-### * bug fixes
-# PR#9375 claims that sh on OSF1 is not POSIX-compliant and that is 
-# not a bug in the OS: we add a workaround for such benighted OSes
-case "${host_os}" in
-  osf*)
-    OSF_SH_BUG='"${1+@}"'
-  ;;
-  *)
-    OSF_SH_BUG='"${@}"'
-  ;;
-esac
-AC_SUBST(OSF_SH_BUG)
+R_OPENMP_SIMDRED
 
 ### shell for use in scripts: we allow R_SHELL to set the script,
 ### since some AIX systems have zsh as sh.
@@ -2649,21 +2641,16 @@ case "${host_os}" in
     AC_DEFINE(HAVE_ICONV, 1, [Define if you have the iconv() function.])
     AC_DEFINE(HAVE_ICONVLIST, 1, [Define if you have the `iconvlist' function.])
     AC_DEFINE(HAVE_ICONV_H, 1, [Define to 1 if you have the <iconv.h> header file.])
-    AC_DEFINE(HAVE_INTERNET, 1, [Define if you have support for ftp/http
-                                 access.])
     AC_DEFINE(HAVE_JPEG, 1,[Define if you have the JPEG headers and libraries.])
     AC_DEFINE(HAVE_PNG, 1, [Define if you have the PNG headers and libraries.])
     AC_DEFINE(HAVE_POSIX_SETJMP, 1, [Define if you have POSIX.1 compatible
                                      sigsetjmp/siglongjmp.])
-    AC_DEFINE(HAVE_SOCKETS, 1, [Define if you have support for sockets.])
     AC_DEFINE(HAVE_TCLTK, 1, [Define if you have the Tcl/Tk headers and 
                               libraries and want Tcl/Tk support to be built.] )
     AC_DEFINE(HAVE_TIFF, 1, [Define this if libtiff is available.])
     AC_DEFINE(HAVE_TIMES, 1, [Define to 1 if you have the `times' function.])
     want_R_profiling=yes
     AC_DEFINE(R_PROFILING, 1, [Define this to enable R-level profiling.])
-    AC_DEFINE(SUPPORT_LIBXML, 1, [Define if you provide support for the libxml
-                                  ftp/http functions.])
     ;;
 esac
 
@@ -2688,14 +2675,10 @@ AC_CONFIG_FILES(
   src/appl/Makefile
   src/extra/Makefile
   src/extra/blas/Makefile
-  src/extra/bzip2/Makefile
   src/extra/intl/Makefile
-  src/extra/pcre/Makefile
   src/extra/tre/Makefile
   src/extra/tzone/Makefile
   src/extra/xdr/Makefile
-  src/extra/xz/Makefile
-  src/extra/zlib/Makefile
   src/include/Makefile
   src/include/Rmath.h0
   src/include/R_ext/Makefile
@@ -2748,7 +2731,6 @@ AC_CONFIG_FILES(
   src/modules/X11/Makefile
   src/modules/internet/Makefile
   src/modules/lapack/Makefile
-  src/modules/vfonts/Makefile
   src/nmath/Makefile
   src/nmath/standalone/Makefile
   src/scripts/Makefile
@@ -2783,8 +2765,11 @@ AC_OUTPUT
 ## configure variables to config.status.
 ## </NOTE>
 r_c_compiler="${CC} ${R_XTRA_CFLAGS} ${CFLAGS}"
-r_cxx_compiler="${CXX} ${R_XTRA_CXXFLAGS} ${CXXFLAGS}"
-r_cxx1x_compiler="${CXX1X} ${CXX1XSTD} ${CXX1XFLAGS}"
+r_cxx_compiler="${CXX} ${CXXSTD} ${R_XTRA_CXXFLAGS} ${CXXFLAGS}"
+r_cxx98_compiler="${CXX98} ${CXX98STD} ${CXX98FLAGS}"
+r_cxx11_compiler="${CXX11} ${CXX11STD} ${CXX11FLAGS}"
+r_cxx14_compiler="${CXX14} ${CXX14STD} ${CXX14FLAGS}"
+r_cxx17_compiler="${CXX17} ${CXX17STD} ${CXX17FLAGS}"
 r_f77_compiler="${F77} ${R_XTRA_FFLAGS} ${FFLAGS}"
 r_f95_compiler="${FC} ${FCFLAGS}"
 r_objc_compiler="${OBJC} ${OBJCFLAGS}"
@@ -2826,8 +2811,11 @@ if test "${acx_lapack_ok}" = "yes"; then
   esac
   R_SH_VAR_ADD(r_external_libs, [LAPACK(${r_lapack})], [, ])
 fi
-if test "${have_lzma}" = yes; then
-  R_SH_VAR_ADD(r_external_libs, [lzma], [, ])
+if test "${have_tre}" = yes; then
+  R_SH_VAR_ADD(r_external_libs, [tre], [, ])
+fi
+if test "x$ac_cv_header_curl_curl_h" = xyes; then
+  R_SH_VAR_ADD(r_external_libs, [curl], [, ])
 fi
 
 r_capabilities=
@@ -2907,8 +2895,11 @@ R is now configured for ${host}
   C compiler:                ${r_c_compiler}
   Fortran 77 compiler:       ${r_f77_compiler}
 
-  C++ compiler:              ${r_cxx_compiler}
-  C++ 11 compiler:           ${r_cxx1x_compiler}
+  Default C++ compiler:      ${r_cxx_compiler}
+  C++98 compiler:            ${r_cxx98_compiler}
+  C++11 compiler:            ${r_cxx11_compiler}
+  C++14 compiler:            ${r_cxx14_compiler}
+  C++17 compiler:            ${r_cxx17_compiler}
   Fortran 90/95 compiler:    ${r_f95_compiler}
   Obj-C compiler:	     ${r_objc_compiler}
 
@@ -2946,6 +2937,9 @@ fi
 if test -n "${warn_tcltk_version}"; then
   AC_MSG_WARN([${warn_tcltk_version}])
 fi
+if test -n "${warn_pcre_version}"; then
+  AC_MSG_WARN([${warn_pcre_version}])
+fi
 if test -n "${warn_info}"; then
   AC_MSG_WARN([${warn_info}])
 fi
diff --git a/doc/AUTHORS b/doc/AUTHORS
index a9f51eb..3b8e116 100644
--- a/doc/AUTHORS
+++ b/doc/AUTHORS
@@ -1,7 +1,7 @@
 Authors of R.
 
-R was initially written by Robert Gentleman and Ross Ihaka of the
-Statistics Department of the University of Auckland.
+R was initially written by Robert Gentleman and Ross Ihaka—also known as "R & R"
+of the Statistics Department of the University of Auckland.
 
 Since mid-1997 there has been a core group with write access to the R
 source, currently consisting of
@@ -9,10 +9,10 @@ source, currently consisting of
 Douglas Bates
 John Chambers
 Peter Dalgaard
-Seth Falcon
 Robert Gentleman
 Kurt Hornik
 Ross Ihaka
+Tomas Kalibera
 Michael Lawrence
 Friedrich Leisch
 Uwe Ligges
@@ -28,8 +28,12 @@ Duncan Temple Lang
 Luke Tierney
 Simon Urbanek
 
-plus Heiner Schwarte up to October 1999, Guido Masarotto up to June 2003 and
-Stefano Iacus up to July 2014.
+plus Heiner Schwarte up to October 1999, Guido Masarotto up to June 2003,
+Stefano Iacus up to July 2014 and Seth Falcon up to August 2015.
+
 
 Current R-core members can be contacted via email to R-project.org
 with name made up by replacing spaces by dots in the name listed above.
+
+(The authors of code from other projects included in the R distribution
+are listed in the COPYRIGHTS file.)
diff --git a/doc/BioC_mirrors.csv b/doc/BioC_mirrors.csv
new file mode 100644
index 0000000..c236077
--- /dev/null
+++ b/doc/BioC_mirrors.csv
@@ -0,0 +1,16 @@
+Name,Country,City,URL,Host,Maintainer,OK,CountryCode,Comment
+0-Bioconductor (World-wide),0-Bioconductor,World-wide,http://bioconductor.org/,"Bioconductor, automatic redirection to servers worldwide",Bioconductor Maintainer <maintainer # bioconductor.org>,1,us,secure_mirror_from_master
+0-Bioconductor (World-wide) [https],0-Bioconductor,World-wide,https://bioconductor.org/,"Bioconductor, automatic redirection to servers worldwide",Bioconductor Maintainer <maintainer # bioconductor.org>,1,us,secure_mirror_from_master
+Brazil/Latin America (Ribeirão Preto),Brazil/Latin America,Ribeirão Preto,http://bioconductor.fmrp.usp.br/,"Department of Genetics, Medical School of Ribeirão Preto, University of São Paulo",Houtan Noushmehr <houtan # usp.br>,0,br,
+Germany (Dortmund),Germany,Dortmund,http://bioconductor.statistik.tu-dortmund.de/,"Department of Statistics, TU Dortmund",Uwe Ligges <ligges # statistik.tu-dortmund.de>,1,de,
+Germany (Dortmund) [https],Germany,Dortmund,https://bioconductor.statistik.tu-dortmund.de/,"Department of Statistics, TU Dortmund",Uwe Ligges <ligges # statistik.tu-dortmund.de>,1,de,
+United Kingdom (Hinxton),United Kingdom,Hinxton,http://mirrors.ebi.ac.uk/bioconductor/,European Bioinformatics Institute,Andrew Tikhonov <andrew # ebi.ac.uk>,1,uk,secure_mirror_from_master
+United Kingdom (Hinxton) [https],United Kingdom,Hinxton,https://mirrors.ebi.ac.uk/bioconductor/,European Bioinformatics Institute,Andrew Tikhonov <andrew # ebi.ac.uk>,1,uk,secure_mirror_from_master
+Japan (Tachikawa),Japan,Tachikawa,http://bioc.ism.ac.jp/,The Institute of Statistical Mathematics,Keisuke Honda <khonda # ism.ac.jp>,1,jp,
+Japan (Tachikawa) [https],Japan,Tachikawa,https://bioc.ism.ac.jp/,The Institute of Statistical Mathematics,Keisuke Honda <khonda # ism.ac.jp>,1,jp,
+Japan (Wako),Japan,Wako,http://bioconductor.riken.jp/,RIKEN Advanced Center for Computing and Communication,"Itoshi NIKAIDO, Ph.D. <dritoshi # gmail.com>",1,jp,
+Japan (Wako) [https],Japan,Wako,https://bioconductor.riken.jp/,RIKEN Advanced Center for Computing and Communication,"Itoshi NIKAIDO, Ph.D. <dritoshi # gmail.com>",1,jp,
+China (Anhui),China,Anhui,http://mirrors.ustc.edu.cn/bioc/,University of Science and Technology of China,Mirror Maintainer <mirrors # ustc.edu.cn>,1,cn,
+China (Anhui) [https],China,Anhui,https://mirrors.ustc.edu.cn/bioc/,University of Science and Technology of China,Mirror Maintainer <mirrors # ustc.edu.cn>,1,cn,
+Australia (Sydney),Australia,Sydney,http://mirror.aarnet.edu.au/pub/bioconductor/,Australia's Academic and Research Network,Alex Dodson <alex.dodson # aarnet.edu.au>,1,au,secure_mirror_from_master
+Australia (Sydney) [https],Australia,Sydney,https://mirror.aarnet.edu.au/pub/bioconductor/,Australia's Academic and Research Network,Alex Dodson <alex.dodson # aarnet.edu.au>,1,au,secure_mirror_from_master
diff --git a/doc/COPYRIGHTS b/doc/COPYRIGHTS
index 0c95aa9..81a5a40 100644
--- a/doc/COPYRIGHTS
+++ b/doc/COPYRIGHTS
@@ -10,7 +10,8 @@ redistribute it.  R as a whole is distributed under GPL version 2 or
 3: most source files contain a copyright statement allowing use of
 that file under GPL version 2 or later: the main exceptions are the
 included versions of packages 'MASS', 'class', 'nnet', 'rpart' and
-'spatial' (GPL-2 or GPL-3).
+'spatial' (GPL-2 or GPL-3).  (The auxiliary file m4/openmp.m4 is under
+GPL-3, but its incorporation into 'configure' is not.)
 
 The status of files used only in the Windows port is in file
 src/gnuwin32/COPYRIGHTS.win, which is appended to this file in binary
@@ -285,23 +286,26 @@ THE SOFTWARE.
 src/modules/lapack/dlapack.f, cmplx.f, dlamc.f
 
   Extracted from
-  *  -- LAPACK computational routine (version 3.5.0) --
+  *  -- LAPACK computational routine (version 3.7.0) --
   *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
   *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-  *     September 2012
+  *     June 2016
 
   where the version number, providers and date vary by subroutine.
+  For version 3.7.0, many of the copyright dates have been updated
+  even for routines which have not been changed for years.
 
-  LAPACK 3.5.0 contains a LICENSE file, copied to src/modules/lapack
+  LAPACK 3.7.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:
 
-  Copyright (c) 1992-2011 The University of Tennessee and The University
+  --- src/modules/lapack/LICENSE ---
+  Copyright (c) 1992-2016 The University of Tennessee and The University
                           of Tennessee Research Foundation.  All rights
                           reserved.
-  Copyright (c) 2000-2011 The University of California Berkeley. All
+  Copyright (c) 2000-2016 The University of California Berkeley. All
                           rights reserved.
-  Copyright (c) 2006-2012 The University of Colorado Denver.  All rights
+  Copyright (c) 2006-2016 The University of Colorado Denver.  All rights
                           reserved.
 
   $COPYRIGHT$
@@ -326,8 +330,8 @@ src/modules/lapack/dlapack.f, cmplx.f, dlamc.f
     contributors may be used to endorse or promote products derived from
     this software without specific prior written permission.
 
-   The copyright holders provide no reassurances that the source code
-   provided does not infringe any patent, copyright, or any other
+  The copyright holders provide no reassurances that the source code
+  provided does not infringe any patent, copyright, or any other
   intellectual property rights of third parties.  The copyright holders
   disclaim any liability to any recipient for claims brought against
   recipient by any third party for infringement of that parties
@@ -344,6 +348,7 @@ src/modules/lapack/dlapack.f, cmplx.f, dlamc.f
   THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
   (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
   OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+  --- end of src/modules/lapack/LICENSE ---
 
 src/extra/xdr/*
 
@@ -351,12 +356,6 @@ src/extra/xdr/*
 
 	See the file src/extra/xdr/copyrght.txt
 
-
-src/extra/zlib/README, *.c, *.h
-
-  Taken from zlib-1.2.8 (C) 1995-2013 Jean-loup Gailly and Mark Adler
-  See src/extra/zlib/README for the licence.
-
 src/main/connections.c, src/main/gzio.h
 
   Contain code derived from the zlib 1.2.3 distribution
@@ -368,57 +367,41 @@ src/main/dounzip.c, unzip.h
   in the zlib 1.2.3 distribution with updates taken from 1.2.5.
 
 
-src/extra/pcre/LICENCE
-src/extra/pcre/*.[ch]
 src/main/valid_utf8.h
 
-   Copyright (c) 1997-2013 University of Cambridge
-   All rights reserved.
-   Copyright(c) 2009-2013 Zoltan Herczeg
+   Copyright (c) 1997-2012 University of Cambridge
 
-See file src/extra/pcre/LICENCE.  For binary builds of R that requires
-us to include
+For binary builds of R that requires us to include
 
   Redistribution and use in source and binary forms, with or without
-  modification, are permitted provided that the following conditions are met:
-
-      * Redistributions of source code must retain the above copyright notice,
-	this list of conditions and the following disclaimer.
-
-      * Redistributions in binary form must reproduce the above copyright
-	notice, this list of conditions and the following disclaimer in the
-	documentation and/or other materials provided with the distribution.
-
-      * Neither the name of the University of Cambridge nor the name of Google
-	Inc. nor the names of their contributors may be used to endorse or
-	promote products derived from this software without specific prior
-	written permission.
-
-  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-  AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-  IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-  ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
-  LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-  CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-  SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-  INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-  CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-  POSSIBILITY OF SUCH DAMAGE.
+  modification, are permitted provided that the following conditions
+  are met:
 
+      * Redistributions of source code must retain the above copyright
+	notice, this list of conditions and the following disclaimer.
 
-src/extra/bzip2/LICENSE
-src/extra/bzip2/blocksort.c
-src/extra/bzip2/bzlib.c
-src/extra/bzip2/bzlib.h
-src/extra/bzip2/bzlib_private.h
-src/extra/bzip2/compress.c
-src/extra/bzip2/crctable.c
-src/extra/bzip2/decompress.c
-src/extra/bzip2/huffman.c
-src/extra/bzip2/randtable.c
+      * Redistributions in binary form must reproduce the above
+	copyright notice, this list of conditions and the following
+	disclaimer in the documentation and/or other materials
+	provided with the distribution.
 
-   copyright (C) 1996-2010 Julian R Seward.
+      * Neither the name of the University of Cambridge nor the name
+	of Google Inc. nor the names of their contributors may be used
+	to endorse or promote products derived from this software
+	without specific prior written permission.
+
+  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+  "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+  LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+  FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+  COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+  BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+  LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+  CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+  LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+  ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+  POSSIBILITY OF SUCH DAMAGE.
 
 
 src/extra/tre/LICENSE
@@ -492,12 +475,12 @@ Based on gettextize from gettext 0.17
    Distributed under the GNU Library General Public License
    version 2 or later.
 
-src/include/memcheck.h
-src/include/valgrind.h
+src/include/vg/memcheck.h
+src/include/vg/valgrind.h
 
-From valgrind,
+From valgrind 3.10.1,
 
-   Copyright (C) 2000-2005 Julian Seward.  All rights reserved.
+   Copyright (C) 2000-2013 Julian Seward.  All rights reserved.
 
 
 src/main/mkdtemp.c
@@ -539,6 +522,12 @@ tools/missing
 
    Copyright various dates Free Software Foundation
 
+m4/openmp.m4
+  Copyright (C) 2001-2012 Free Software Foundation, Inc.
+  Copyright (C) 2015-2016 R Core Team
+
+  Under GPL-3 with the Autoconf Configure Script Exception, version 3.0.
+
 tools/config.quess
 tools/config.sub
 
@@ -586,3 +575,102 @@ src/appl/dqrdc2.f is based on dqrdc.f by G.W. Stewart.
 
 src/appl/lbfgsb.c is based on the work of Zhu, Byrd, Lu-Chen and
 Nocedal, which does not state any copyright.
+
+src/main/radixsort.c is largely based on code from the data.table package,
+
+   Copyright (C) 2006--2015  Matt Dowle and Arun Srinivasan
+
+doc/html/Rlogo.svg
+doc/html/Rlogo.pdf
+doc/html/logo.jpg
+doc/html/favicon.ico
+src/modules/X11/rlogo_icon.h
+src/gnuwin32/front-ends/R.ico
+src/gnuwin32/installer/R.bmp
+
+   Copyright (C) 2015-2016 The R Foundation
+   
+   You can distribute the logo under the terms of the Creative
+   Commons Attribution-ShareAlike 4.0 International license (CC-BY-SA
+   4.0) or (at your option) the GNU General Public License version 2
+   (GPL-2).
+
+   The design of the current logo is based on the previous logo that
+   was included in the R source from 1998 to 2016.
+
+	---------------------------------------------------
+
+Binary distributions of R may include compiled code from the PCRE
+library whose licence is:
+
+  THE BASIC LIBRARY FUNCTIONS
+  ---------------------------
+  Written by:       Philip Hazel
+  Email local part: ph10
+  Email domain:     cam.ac.uk
+
+  University of Cambridge Computing Service, Cambridge, England.
+
+  Copyright (c) 1997-2015 University of Cambridge
+  All rights reserved.
+
+  PCRE JUST-IN-TIME COMPILATION SUPPORT
+  -------------------------------------
+  Written by:       Zoltan Herczeg
+  Email local part: hzmester
+  Emain domain:     freemail.hu
+
+  Copyright(c) 2010-2015 Zoltan Herczeg
+  All rights reserved.
+
+  STACK-LESS JUST-IN-TIME COMPILER
+  --------------------------------
+  Written by:       Zoltan Herczeg
+  Email local part: hzmester
+  Emain domain:     freemail.hu
+
+  Copyright(c) 2009-2015 Zoltan Herczeg
+  All rights reserved.
+
+  THE C++ WRAPPER FUNCTIONS
+  -------------------------
+  Contributed by:   Google Inc.
+
+  Copyright (c) 2007-2012, Google Inc.
+  All rights reserved.
+
+
+  THE "BSD" LICENCE
+  -----------------
+
+  Redistribution and use in source and binary forms, with or without
+  modification, are permitted provided that the following conditions
+  are met:
+
+      * Redistributions of source code must retain the above copyright
+        notice, this list of conditions and the following disclaimer.
+
+      * Redistributions in binary form must reproduce the above
+        copyright notice, this list of conditions and the following
+        disclaimer in the documentation and/or other materials
+        provided with the distribution.
+
+      * Neither the name of the University of Cambridge nor the name
+        of Google Inc. nor the names of their contributors may be used
+        to endorse or promote products derived from this software
+        without specific prior written permission.
+
+  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+  "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+  LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+  FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+  COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+  BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+  LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+  CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+  LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+  ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+  POSSIBILITY OF SUCH DAMAGE.
+
+	---------------------------------------------------
diff --git a/doc/CRAN_mirrors.csv b/doc/CRAN_mirrors.csv
index b828d40..a7f4f24 100644
--- a/doc/CRAN_mirrors.csv
+++ b/doc/CRAN_mirrors.csv
@@ -1,96 +1,151 @@
-Name,Country,City,URL,Host,Maintainer,OK,CountryCode
-0-Cloud,0-Cloud,0-Cloud,http://cran.rstudio.com/,"Rstudio, automatic redirection to servers worldwide","winston # stdout.org",1,us
+Name,Country,City,URL,Host,Maintainer,OK,CountryCode,Comment
+"0-Cloud [https]",0-Cloud,0-Cloud,https://cloud.r-project.org/,"Automatic redirection to servers worldwide, currently sponsored by Rstudio","winston # stdout.org",1,us,"secure_mirror_from_master"
+0-Cloud,0-Cloud,0-Cloud,http://cloud.r-project.org/,"Automatic redirection to servers worldwide, currently sponsored by Rstudio","winston # stdout.org",1,us,"secure_mirror_from_master"
+"Algeria [https]",Algeria,Algiers,https://cran.usthb.dz/,"University of Science and Technology Houari Boumediene","Boukala m c <mboukala # usthb.dz>",1,dz
+Algeria,Algeria,Algiers,http://cran.usthb.dz/,"University of Science and Technology Houari Boumediene","Boukala m c <mboukala # usthb.dz>",1,dz
 "Argentina (La Plata)",Argentina,"La Plata",http://mirror.fcaglp.unlp.edu.ar/CRAN/,"Universidad Nacional de La Plata","esuarez # Fcaglp.unlp.edu.ar",1,ar
-"Argentina (Mendoza)",Argentina,Mendoza,http://r.mirror.mendoza-conicet.gob.ar/,"CONICET Mendoza","pcastorino # Mendoza-conicet.gob.ar",1,ar
-"Australia (Canberra)",Australia,Canberra,http://cran.csiro.au/,CSIRO,"Bill.Venables # CSIRO.au, ServiceDesk2 # CSIRO.au",1,au
-"Australia (Melbourne)",Australia,Melbourne,http://cran.ms.unimelb.edu.au/,"University of Melbourne","cran # ms.unimelb.edu.au",1,au
-Austria,Austria,Wien,http://cran.at.r-project.org/,"Wirtschaftsuniversitaet Wien","CRAN # R-project.org",1,at
-Belgium,Belgium,Antwerp,http://www.freestatistics.org/cran/,"K.U.Leuven Association","patrick # wessa.net",1,be
+"Australia (Canberra) [https]",Australia,Canberra,https://cran.csiro.au/,CSIRO,"Bill.Venables # CSIRO.au, ServiceDesk2 # CSIRO.au",1,au,"secure_mirror_from_master"
+"Australia (Canberra)",Australia,Canberra,http://cran.csiro.au/,CSIRO,"Bill.Venables # CSIRO.au, ServiceDesk2 # CSIRO.au",1,au,"secure_mirror_from_master"
+"Australia (Melbourne) [https]",Australia,Melbourne,https://mirror.aarnet.edu.au/pub/CRAN/,AARNET,"Michael DSilva <Michael.DSilva # aarnet.edu.au>",1,au,"secure_mirror_from_master"
+"Australia (Perth) [https]",Australia,Perth,https://cran.curtin.edu.au/,"Curtin University of Technology","unix # curtin.edu.au",1,au,"secure_mirror_from_master"
+"Austria [https]",Austria,Wien,https://cran.wu.ac.at/,"Wirtschaftsuniversität Wien","CRAN # R-project.org",1,at,"secure_mirror_from_master"
+Austria,Austria,Wien,http://cran.wu.ac.at/,"Wirtschaftsuniversität Wien","CRAN # R-project.org",1,at,"secure_mirror_from_master"
+"Belgium (Antwerp)",Belgium,Antwerp,http://www.freestatistics.org/cran/,"K.U.Leuven Association","patrick # wessa.net",1,be
+"Belgium (Ghent) [https]",Belgium,Ghent,https://lib.ugent.be/CRAN/,"Ghent University Library","Patrick Hochstenbach <Patrick.Hochstenbach # UGent.be>",1,be,"secure_mirror_from_master"
+"Belgium (Ghent)",Belgium,Ghent,http://lib.ugent.be/CRAN/,"Ghent University Library","Patrick Hochstenbach <Patrick.Hochstenbach # UGent.be>",1,be,"secure_mirror_from_master"
 "Brazil (BA)",Brazil,Ilheus,http://nbcgib.uesc.br/mirrors/cran/,"Center for Comp. Biol. at Universidade Estadual de Santa Cruz","eduardo # nbcgib.uesc.br",1,br
-"Brazil (PR)",Brazil,Curitiba,http://cran-r.c3sl.ufpr.br/,"Universidade Federal do Parana","Paulo J. Ribeiro Jr <paulojus # est.ufpr.br>",1,br
-"Brazil (RJ)",Brazil,"Rio de Janeiro",http://cran.fiocruz.br/,"Oswaldo Cruz Foundation, Rio de Janeiro","oswaldo # fiocruz.br",1,br
-"Brazil (SP 1)",Brazil,"Sao Paulo",http://www.vps.fmvz.usp.br/CRAN/,"University of Sao Paulo, Sao Paulo","Fernando Ferreira <fernando # vps.fmvz.usp.br>",1,br
-"Brazil (SP 2)",Brazil,Piracicaba,http://brieger.esalq.usp.br/CRAN/,"University of Sao Paulo, Piracicaba","aafgarci # esalq.usp.br",1,br
-"Canada (BC)",Canada,Burnaby,http://cran.stat.sfu.ca/,"Simon Fraser University, Burnaby","gripe # sfu.ca",1,ca
+"Brazil (PR)",Brazil,Curitiba,http://cran-r.c3sl.ufpr.br/,"Universidade Federal do Parana","Paulo Justiniano Ribeiro Junior <paulojus # ufpr.br>",1,br
+"Brazil (RJ) [https]",Brazil,"Rio de Janeiro",https://cran.fiocruz.br/,"Oswaldo Cruz Foundation, Rio de Janeiro","oswaldo.cruz # fiocruz.br",1,br,"secure_mirror_from_master"
+"Brazil (RJ)",Brazil,"Rio de Janeiro",http://cran.fiocruz.br/,"Oswaldo Cruz Foundation, Rio de Janeiro","oswaldo.cruz # fiocruz.br",1,br,"secure_mirror_from_master"
+"Brazil (SP 1) [https]",Brazil,"Sao Paulo",https://vps.fmvz.usp.br/CRAN/,"University of Sao Paulo, Sao Paulo","Fernando Ferreira <fernando # vps.fmvz.usp.br>",1,br,"secure_mirror_from_master"
+"Brazil (SP 1)",Brazil,"Sao Paulo",http://vps.fmvz.usp.br/CRAN/,"University of Sao Paulo, Sao Paulo","Fernando Ferreira <fernando # vps.fmvz.usp.br>",1,br,"secure_mirror_from_master"
+"Brazil (SP 2)",Brazil,Piracicaba,http://brieger.esalq.usp.br/CRAN/,"University of Sao Paulo, Piracicaba","A Augusto F Garcia <aafgarci # gmail.com>, augusto.garcia # usp.br",1,br,
+"Bulgaria [https]",Bulgaria,Sofia,https://ftp.uni-sofia.bg/CRAN/,"Sofia University","Alexander Velin <velin # fccf.net>",1,bg,"secure_mirror_from_master"
+Bulgaria,Bulgaria,Sofia,http://ftp.uni-sofia.bg/CRAN/,"Sofia University","Alexander Velin <velin # fccf.net>",1,bg,"secure_mirror_from_master"
+"Canada (BC)",Canada,Burnaby,http://cran.stat.sfu.ca/,"Simon Fraser University, Burnaby","gripe # sfu.ca",1,ca,"maintainer_address_bounces"
+"Canada (MB) [https]",Canada,Winnipeg,https://muug.ca/mirror/cran/,"Manitoba Unix User Group","mirror # muug.ca",1,ca
+"Canada (MB)",Canada,Winnipeg,http://muug.ca/mirror/cran/,"Manitoba Unix User Group","mirror # muug.ca",1,ca
 "Canada (NS)",Canada,Halifax,http://mirror.its.dal.ca/cran/,"Dalhousie University, Halifax","mirror # lists.dal.ca",1,ca
 "Canada (ON)",Canada,Toronto,http://cran.utstat.utoronto.ca/,"University of Toronto","Dermot Whelan <wheland # utstat.utoronto.ca>",1,ca
-"Canada (QC 1)",Canada,Montreal,http://cran.skazkaforyou.com/,"iWeb, Montreal","mirrors # skazkaforyou.com",1,ca
-"Canada (QC 2)",Canada,Montreal,http://cran.parentingamerica.com/,"iWeb, Montreal","jmiller # Parentingamerica.com",1,ca
-Chile,Chile,Santiago,http://dirichlet.mat.puc.cl/,"Pontificia Universidad Catolica de Chile, Santiago","Fernando Quintana <quintana # mat.puc.cl>",1,cl
-"China (Beijing 1)",China,Bejing,http://ftp.ctex.org/mirrors/CRAN/,CTEX.ORG,"Aloft Wu <aloft # ctex.org>",1,cn
-"China (Beijing 2)",China,Bejing,http://mirror.bjtu.edu.cn/cran,"Beijing Jiaotong University, Beijing","idealities # gmail.com",1,cn
+"Chile 1 [https]",Chile,Santiago,https://dirichlet.mat.puc.cl/,"Pontificia Universidad Catolica de Chile, Santiago","Fernando Quintana <quintana # mat.puc.cl>",1,cl,"secure_mirror_from_master"
+"Chile 1",Chile,Santiago,http://dirichlet.mat.puc.cl/,"Pontificia Universidad Catolica de Chile, Santiago","Fernando Quintana <quintana # mat.puc.cl>",1,cl,"secure_mirror_from_master"
+"Chile 2 [https]",Chile,Santiago,https://cran.dcc.uchile.cl/,"Departamento de Ciencias de la Computación, Universidad de Chile","Mauricio Vargas <mvargas # dcc.uchile.cl>",1,cl
+"China (Beijing) [https]",China,Beijing,https://mirrors.tuna.tsinghua.edu.cn/CRAN/,"TUNA Team, Tsinghua University","Justin Wong <justin.w.xd # gmail.com>",1,cn
+"China (Beijing)",China,Beijing,http://mirrors.tuna.tsinghua.edu.cn/CRAN/,"TUNA Team, Tsinghua University","Justin Wong <justin.w.xd # gmail.com>",1,cn
+"China (Hefei) [https]",China,Hefei,https://mirrors.ustc.edu.cn/CRAN/,"University of Science and Technology of China","mirrors # Ustc.edu.cn",1,cn
 "China (Hefei)",China,Hefei,http://mirrors.ustc.edu.cn/CRAN/,"University of Science and Technology of China","mirrors # Ustc.edu.cn",1,cn
-"China (Xiamen)",China,Xiamen,http://mirrors.xmu.edu.cn/CRAN/,"Xiamen University","admin # Xdmc.org",1,cn
-"Colombia (Bogota)",Colombia,Bogota,http://www.laqee.unal.edu.co/CRAN/,"National University of Colombia","Ernesto Parra Rincon <eparrar # unal.edu.co>",1,co
-"Colombia (Cali)",Colombia,Cali,http://www.icesi.edu.co/CRAN/,"Icesi University","adminred # Icesi.edu.co",1,co
-"Czech Republic","Czech Republic","Prague",http://mirrors.nic.cz/R/,"CZ.NIC, Prague","mirrors # nic.cz",1,cz
-Denmark,Denmark,Aalborg,http://mirrors.dotsrc.org/cran/,"dotsrc.org, Aalborg","mirror # dotsrc.org",1,dk
-Ecuador,Ecuador,Guayaquil,http://cran.espol.edu.ec/,"Escuela Superior Politecnica del Litoral","jrodrig # espol.edu.ec",1,ec
-"France (Lyon 1)",France,Lyon,http://cran.univ-lyon1.fr/,"Dept. of Biometry & Evol. Biology, University of Lyon","Jean Thioulouse <Jean.Thioulouse # univ-lyon1.fr>",1,fr
-"France (Lyon 2)",France,Lyon,http://mirror.ibcp.fr/pub/CRAN/,"CNRS IBCP, Lyon","alexis.michon # ibcp.fr",1,fr
-"France (Montpellier)",France,Montpellier,http://ftp.igh.cnrs.fr/pub/CRAN/,"Institut de Genetique Humaine, Montpellier","guillaume.gielly # igh.cnrs.fr",1,fr
+"China (Lanzhou) [https]",China,Lanzhou,https://mirror.lzu.edu.cn/CRAN/,"Lanzhou University Open Source Society","oss.lzu.edu.cn # gmail.com",1,cn,"secure_mirror_from_master"
+"China (Lanzhou)",China,Lanzhou,http://mirror.lzu.edu.cn/CRAN/,"Lanzhou University Open Source Society","oss.lzu.edu.cn # gmail.com",1,cn,"secure_mirror_from_master"
+"China (Xiamen)",China,Xiamen,http://mirrors.xmu.edu.cn/CRAN/,"Xiamen University","admin # Xdmc.org",1,cn,"maintainer_address_bounces"
+"Colombia (Cali) [https]",Colombia,Cali,https://www.icesi.edu.co/CRAN/,"Icesi University","adminred # Icesi.edu.co",1,co,"secure_mirror_from_master"
+"Colombia (Cali)",Colombia,Cali,http://www.icesi.edu.co/CRAN/,"Icesi University","adminred # Icesi.edu.co",1,co,"secure_mirror_from_master"
+"Czech Republic [https]","Czech Republic","Prague",https://mirrors.nic.cz/R/,"CZ.NIC, Prague","mirrors # nic.cz",1,cz,"secure_mirror_from_master"
+"Czech Republic","Czech Republic","Prague",http://mirrors.nic.cz/R/,"CZ.NIC, Prague","mirrors # nic.cz",1,cz,"secure_mirror_from_master"
+"Denmark [https]",Denmark,Aalborg,https://mirrors.dotsrc.org/cran/,"Aalborg University","staff # dotsrc.org",1,dk,"secure_mirror_from_master"
+Denmark,Denmark,Aalborg,http://mirrors.dotsrc.org/cran/,"Aalborg University","staff # dotsrc.org",1,dk,"secure_mirror_from_master"
+Ecuador,Ecuador,Guayaquil,http://cran.espol.edu.ec/,"Escuela Superior Politecnica del Litoral","jrodrig # espol.edu.ec",1,ec,"secure_mirror_from_master"
+"El Salvador","El Salvador","San Salvador",http://cran.salud.gob.sv/,"Ministry of Health (Ministerio de Salud)","mirror # salud.gob.sv",1,sv
+"Estonia",Estonia,Tartu,http://ftp.eenet.ee/pub/cran/,"EENet","eenet # eenet.ee",1,ee,"secure_mirror_from_master"
+"France (Lyon 1) [https]",France,Lyon,https://pbil.univ-lyon1.fr/CRAN/,"Dept. of Biometry & Evol. Biology, University of Lyon","Jean Thioulouse <Jean.Thioulouse # univ-lyon1.fr>",1,fr,"secure_mirror_from_master"
+"France (Lyon 2) [https]",France,Lyon,https://mirror.ibcp.fr/pub/CRAN/,"CNRS IBCP, Lyon","alexis.michon # ibcp.fr",1,fr,"secure_mirror_from_master"
+"France (Lyon 2)",France,Lyon,http://mirror.ibcp.fr/pub/CRAN/,"CNRS IBCP, Lyon","alexis.michon # ibcp.fr",1,fr,"secure_mirror_from_master"
+"France (Marseille) [https]",France,Marseille,"https://cran.biotools.fr/","IBDM, Marseille","andrew.saurin # univ-amu.fr",1,fr,"secure_mirror_from_master"
+"France (Marseille)",France,Marseille,"http://cran.biotools.fr/","IBDM, Marseille","andrew.saurin # univ-amu.fr",1,fr,"secure_mirror_from_master"
+"France (Montpellier) [https]",France,Montpellier,https://ftp.igh.cnrs.fr/pub/CRAN/,"Institut de Genetique Humaine, Montpellier","guillaume.gielly # igh.cnrs.fr",1,fr,"secure_mirror_from_master"
+"France (Montpellier)",France,Montpellier,http://ftp.igh.cnrs.fr/pub/CRAN/,"Institut de Genetique Humaine, Montpellier","guillaume.gielly # igh.cnrs.fr",1,fr,"secure_mirror_from_master"
 "France (Paris 1)",France,Paris,http://cran.irsn.fr/,"French Nuclear Safety Institute, Paris","yann.richet # irsn.fr",1,fr
-"France (Paris 2)",France,Paris,http://cran.univ-paris1.fr/,"Universite Paris 1 Pantheon-Sorbonne","pierre.latouche # univ-paris1.fr",1,fr
-"Germany (Berlin)",Germany,Berlin,http://mirrors.softliste.de/cran/,"Softliste.de, Berlin","docko # docko.sk",1,de
-"Germany (Bonn)",Germany,Bonn,http://cran.r-mirror.de/,"Stefan Drees, Bonn","stefan # drees.name",1,de
-"Germany (Goettingen)",Germany,Goettingen,http://ftp5.gwdg.de/pub/misc/cran/,"GWDG Goettingen","Eberhard Moenkeberg <emoenke # gwdg.de>",1,de
-Greece,Greece,Crete,http://cran.cc.uoc.gr/,"University of Crete","mirrors # Cc.uoc.gr",1,gr
+"France (Paris 2) [https]",France,Paris,https://cran.univ-paris1.fr/,"SAMM, Université Paris 1 Panthéon-Sorbonne","pierre.latouche # univ-paris1.fr",1,fr,"secure_mirror_from_master"
+"France (Paris 2)",France,Paris,http://cran.univ-paris1.fr/,"SAMM, Université Paris 1 Panthéon-Sorbonne","pierre.latouche # univ-paris1.fr",1,fr,"secure_mirror_from_master"
+"Germany (Göttingen)",Germany,Göttingen,http://ftp5.gwdg.de/pub/misc/cran/,"GWDG Göttingen","Eberhard Moenkeberg <emoenke # gwdg.de>",1,de
+"Germany (Münster) [https]",Germany,Münster,https://cran.uni-muenster.de/,"University of Münster, Germany","Edzer Pebesma <edzer.pebesma # uni-muenster.de>",1,de,"secure_mirror_from_master"
+"Germany (Münster)",Germany,Münster,http://cran.uni-muenster.de/,"University of Münster, Germany","Edzer Pebesma <edzer.pebesma # uni-muenster.de>",1,de,"secure_mirror_from_master"
+Greece,Greece,Crete,http://cran.cc.uoc.gr/mirrors/CRAN/,"University of Crete","mirrors # Cc.uoc.gr",1,gr,"secure_mirror_from_master"
 Hungary,Hungary,Budapest,http://cran.rapporter.net/,"Rapporter.net, Budapest","Daróczi Gergely <gergely # snowl.net>",1,hu
+"Iceland [https]",Iceland,Reykjavik,https://cran.hafro.is/,"Marine Research Institute","cran # hafro.is",1,is,"secure_mirror_from_master"
+Iceland,Iceland,Reykjavik,http://cran.hafro.is/,"Marine Research Institute","cran # hafro.is",1,is,"secure_mirror_from_master"
+"India [https]",India,Chennai,https://ftp.iitm.ac.in/cran/,"Indian Institute of Technology Madras","sriram # iitm.ac.in",1,in
 India,India,Chennai,http://ftp.iitm.ac.in/cran/,"Indian Institute of Technology Madras","sriram # iitm.ac.in",1,in
-"Indonesia (Jakarta)",Indonesia,Jakarta,http://cran.repo.bppt.go.id/,"Agency for The Application and Assessment of Technology","Imam Cartealy <icx # biotek.bppt.go.id>",1,id
-"Indonesia (Jember)",Indonesia,Jember,http://cran.unej.ac.id,"The University of Jember","itirta.fmipa # unej.ac.id, tirtaimade # gmail.com",1,id
+"Indonesia (Jakarta) [https]",Indonesia,Jakarta,https://repo.bppt.go.id/cran/,"Agency for The Application and Assessment of Technology","Imam Cartealy <imam.cartealy # bppt.go.id>",1,id,"secure_mirror_from_master"
 Iran,Iran,Mashhad,http://cran.um.ac.ir/,"Ferdowsi University of Mashhad","Majid Sarmad <sarmad # um.ac.ir>",1,ir
-Ireland,Ireland,Dublin,http://ftp.heanet.ie/mirrors/cran.r-project.org/,"HEAnet, Dublin","Brian McArdle <brian.mcardle # heanet.ie>",1,ie
+"Ireland [https]",Ireland,Dublin,https://ftp.heanet.ie/mirrors/cran.r-project.org/,"HEAnet,Dublin","mirrors # heanet.ie",1,ie,"secure_mirror_from_master"
+Ireland,Ireland,Dublin,http://ftp.heanet.ie/mirrors/cran.r-project.org/,"HEAnet,Dublin","mirrors # heanet.ie",1,ie,"secure_mirror_from_master"
 "Italy (Milano)",Italy,Milano,http://cran.mirror.garr.it/mirrors/CRAN/,"Garr Mirror, Milano","mirror-service # garr.it",1,it
-"Italy (Padua)",Italy,Padua,http://cran.stat.unipd.it/,"University of Padua","cran # stat.unipd.it",1,it
-"Italy (Palermo)",Italy,Palermo,http://dssm.unipa.it/CRAN/,"Universita degli Studi di Palermo","elio.mineo # dssm.unipa.it, alf # dssm.unipa.it",1,it
-"Japan (Hyogo)",Japan,Hyogo,http://essrc.hyogo-u.ac.jp/cran/,"Hyogo University of Teacher Education","essrc-cran # hyogo-u.ac.jp",1,jp
-"Japan (Tokyo)",Japan,Tokyo,http://cran.ism.ac.jp/,"Institute of Statistical Mathematics, Tokyo","Junji Nakano <nakanoj # ism.ac.jp>",1,jp
-"Japan (Tsukuba)",Japan,Tsukuba,http://cran.md.tsukuba.ac.jp/,"University of Tsukuba","mokada # md.tsukuba.ac.jp",1,jp
+"Italy (Padua) [https]",Italy,Padua,https://cran.stat.unipd.it/,"University of Padua","cran # stat.unipd.it",1,it,"secure_mirror_from_master"
+"Italy (Padua)",Italy,Padua,http://cran.stat.unipd.it/,"University of Padua","cran # stat.unipd.it",1,it,"secure_mirror_from_master"
+"Italy (Palermo)",Italy,Palermo,http://dssm.unipa.it/CRAN/,"Universita degli Studi di Palermo","angelo.mineo # unipa.it, apontillo # gmail.com",1,it
+"Japan (Tokyo) [https]",Japan,Tokyo,https://cran.ism.ac.jp/,"The Institute of Statistical Mathematics, Tokyo","Junji Nakano <nakanoj # ism.ac.jp>",1,jp,"secure_mirror_from_master"
+"Japan (Tokyo)",Japan,Tokyo,http://cran.ism.ac.jp/,"The Institute of Statistical Mathematics, Tokyo","Junji Nakano <nakanoj # ism.ac.jp>",1,jp,"secure_mirror_from_master"
 "Korea (Seoul 1)",Korea,Seoul,http://cran.nexr.com/,"NexR Corporation, Seoul","mining # nexr.com",1,kr
-"Korea (Seoul 2)",Korea,Seoul,http://biostat.cau.ac.kr/CRAN/,"Chung-Ang University, Seoul","Sunghow # gmail.com",1,kr
-Lebanon,Lebanon,Byblos,http://rmirror.lau.edu.lb/,"Lebanese American University, Byblos","gGeorges Khazen <khazen # lau.edu.lb>",1,lb
-"Mexico (Mexico City)",Mexico,"Mexico City",http://cran.itam.mx/,"Instituto Tecnologico Autonomo de Mexico","Ernesto Barrios <ebarrios # Itam.mx>",1,mx
+"Korea (Seoul 2)",Korea,Seoul,http://healthstat.snu.ac.kr/CRAN/,"Graduate School of Public Health, Seoul National University, Seoul","Sunghow # gmail.com",1,kr,"secure_mirror_from_master"
+"Korea (Ulsan)",Korea,Ulsan,http://cran.biodisk.org/,"The Genome Institute of UNIST (Ulsan National Institute of Science and Technology)","dr.kyusang.lee # gmail.com",1,kr,"secure_mirror_from_master"
+Lebanon,Lebanon,Byblos,http://rmirror.lau.edu.lb/,"Lebanese American University, Byblos","gGeorges Khazen <khazen # lau.edu.lb>",1,lb,"maintainer_address_bounces"
+"Malaysia [https]",Malaysia,Serdang,https://wbc.upm.edu.my/cran/,"Univerisiti Putra Malaysia","Ng Keng Yap <kengyap # upm.edu.my>",1,my,"secure_mirror_from_master"
+Malaysia,Malaysia,Serdang,http://wbc.upm.edu.my/cran/,"Univerisiti Putra Malaysia","Ng Keng Yap <kengyap # upm.edu.my>",1,my,"secure_mirror_from_master"
+"Mexico (Mexico City) [https]",Mexico,"Mexico City",https://cran.itam.mx/,"Instituto Tecnologico Autonomo de Mexico","Ernesto Barrios <ebarrios # Itam.mx>",1,mx,"secure_mirror_from_master"
+"Mexico (Mexico City)",Mexico,"Mexico City",http://cran.itam.mx/,"Instituto Tecnologico Autonomo de Mexico","Ernesto Barrios <ebarrios # Itam.mx>",1,mx,"secure_mirror_from_master"
 "Mexico (Texcoco)",Mexico,Texcoco,http://www.est.colpos.mx/R-mirror/,"Colegio de Postgraduados, Texcoco","perpdgo # gmail.com",1,mx
 "Netherlands (Amsterdam)",Netherlands,Amsterdam,http://cran.xl-mirror.nl/,"XL-Data, Amsterdam","werner # xl-mirror.nl",1,nl
 "Netherlands (Utrecht)",Netherlands,Utrecht,http://cran-mirror.cs.uu.nl/,"Utrecht University","webmaster # cs.uu.nl",1,nl
+"New Zealand [https]","New Zealand",Auckland,https://cran.stat.auckland.ac.nz/,"University of Auckland","w.schmidt # auckland.ac.nz",1,nz
 "New Zealand","New Zealand",Auckland,http://cran.stat.auckland.ac.nz/,"University of Auckland","w.schmidt # auckland.ac.nz",1,nz
-Norway,Norway,Bergen,http://cran.uib.no/,"University of Bergen","sundrift # It.uib.no",1,no
-Poland,Poland,Wroclaw,http://r.meteo.uni.wroc.pl/,"University of Wroclaw","Paweł Netzel <netzel # meteo.uni.wroc.pl>",1,pl
-Portugal,Portugal,Porto,http://cran.dcc.fc.up.pt/,"University of Porto","labcc # labcc.dcc.fc.up.pt",1,pt
-Russia,Russia,Moscow,http://cran.gis-lab.info/,GIS-Lab.info,"sim # gis-lab.info",1,ru
-Singapore,Singapore,Singapore,http://cran.stat.nus.edu.sg/,"National University of Singapore","Zhang Rong <ccezr # nus.edu.sg>",1,sg
-Slovakia,Slovakia,Bratislava,http://cran.fyxm.net/,"FYXM.net, Bratislava","docko # docko.sk",1,sk
+"Norway [https]",Norway,Bergen,https://cran.uib.no/,"University of Bergen","sundrift # It.uib.no",1,no,"secure_mirror_from_master"
+Norway,Norway,Bergen,http://cran.uib.no/,"University of Bergen","sundrift # It.uib.no",1,no,"secure_mirror_from_master"
+"Philippines [https]",Philippines,"Quezon City",https://cran.stat.upd.edu.ph/,"University of the Philippines and PREGINET","Bert Mendoza <bert # asti.dost.gov.ph>, ops # pregi.net",1,ph,"secure_mirror_from_master"
+Philippines,Philippines,"Quezon City",http://cran.stat.upd.edu.ph/,"University of the Philippines and PREGINET","Bert Mendoza <bert # asti.dost.gov.ph>, ops # pregi.net",1,ph,"secure_mirror_from_master"
+"Portugal (Lisbon)",Portugal,Lisbon,http://cran.radicaldevelop.com/,"RadicalDevelop, Lda","geral # radicaldevelop.com",1,pt
+"Portugal (Porto)",Portugal,Porto,http://cran.dcc.fc.up.pt/,"University of Porto","labcc # labcc.dcc.fc.up.pt",1,pt
+"Russia (Moscow) [https]",Russia,Moscow,https://cran.gis-lab.info/,GIS-Lab.info,"sim # gis-lab.info",1,ru,"secure_mirror_from_master"
+"Russia (Moscow)",Russia,Moscow,http://cran.gis-lab.info/,GIS-Lab.info,"sim # gis-lab.info",1,ru,"secure_mirror_from_master"
+"Serbia [https]",Serbia,Belgrade,https://fourdots.com/mirror/CRAN/,"Four Dots","Goran Tepsic <goran.tepsic # fourdots.com>",1,rs
+Singapore,Singapore,Singapore,http://cran.stat.nus.edu.sg/,"National University of Singapore, Singapore","ccezr # nus.edu.sg",1,sg
 "South Africa (Cape Town)","South Africa","Cape Town",http://r.adu.org.za/,"University of Cape Town","michael.brooks # uct.ac.za",1,za
 "South Africa (Johannesburg)","South Africa",Johannesburg,http://cran.mirror.ac.za/,"TENET, Johannesburg","Patrick Holahan <patrickh # tenet.ac.za>",1,za
-"Spain (A Coruña)","Spain","A Coruña",http://ftp.cixug.es/CRAN,"Oficina de software libre (CIXUG)","<osl # cixug.es>",1,es
-"Spain (Madrid)",Spain,Madrid,http://cran.es.r-project.org/,"Spanish National Research Network, Madrid","Jose Manuel Macias <jmanuel.macias # rediris.es>",1,es
-Sweden,Sweden,Uppsala,http://ftp.sunet.se/pub/lang/CRAN/,"Swedish University Computer Network, Uppsala","Goran Brostrom <gb # stat.umu.se>",1,se
-Switzerland,Switzerland,Zuerich,http://stat.ethz.ch/CRAN/,"ETH Zuerich","Martin.Maechler # R-project.org",1,ch
-"Taiwan (Taichung)",Taiwan,Taichung,http://cran.cs.pu.edu.tw/,"Providence University, Taichung","hcchang # cs.pu.edu.tw",1,tw
-"Taiwan (Taipei)",Taiwan,Taipei,http://cran.csie.ntu.edu.tw/,"National Taiwan University, Taipei","Rong-En Fan  <rafan # infor.org>",1,tw
+"Spain (A Coruña) [https]","Spain","A Coruña",https://ftp.cixug.es/CRAN/,"Oficina de software libre (CIXUG)","<osl # cixug.es>",1,es,"secure_mirror_from_master"
+"Spain (A Coruña)","Spain","A Coruña",http://ftp.cixug.es/CRAN/,"Oficina de software libre (CIXUG)","<osl # cixug.es>",1,es,"secure_mirror_from_master"
+"Spain (Madrid) [https]",Spain,Madrid,https://cran.rediris.es/,"Spanish National Research Network, Madrid","Jose Manuel Macias <jmanuel.macias # rediris.es>",1,es,"secure_mirror_from_master"
+"Spain (Madrid)",Spain,Madrid,http://cran.rediris.es/,"Spanish National Research Network, Madrid","Jose Manuel Macias <jmanuel.macias # rediris.es>",1,es,"secure_mirror_from_master"
+"Sweden [https]",Sweden,Umeå,https://ftp.acc.umu.se/mirror/CRAN/,"Academic Computer Club, Umeå University","<ftp-adm # acc.umu.se>",1,se,"secure_mirror_from_master"
+Sweden,Sweden,Umeå,http://ftp.acc.umu.se/mirror/CRAN/,"Academic Computer Club, Umeå University","<ftp-adm # acc.umu.se>",1,se,"secure_mirror_from_master"
+"Switzerland [https]",Switzerland,Zürich,https://stat.ethz.ch/CRAN/,"ETH Zürich","Martin.Maechler # R-project.org",1,ch,"secure_mirror_from_master"
+Switzerland,Switzerland,Zürich,http://stat.ethz.ch/CRAN/,"ETH Zürich","Martin.Maechler # R-project.org",1,ch,"secure_mirror_from_master"
+"Taiwan (Chungli) [https]",Taiwan,Chungli,https://ftp.yzu.edu.tw/CRAN/,"Department of Computer Science and Engineering, Yuan Ze University","Peter Dave Hello <hsu # peterdavehello.org>",1,tw
+"Taiwan (Chungli)",Taiwan,Chungli,http://ftp.yzu.edu.tw/CRAN/,"Department of Computer Science and Engineering, Yuan Ze University","Peter Dave Hello <hsu # peterdavehello.org>",1,tw
+"Taiwan (Taipei)",Taiwan,Taipei,http://cran.csie.ntu.edu.tw/,"National Taiwan University, Taipei","Rong-En Fan  <rafan # infor.org>",1,tw,"maintainer_address_bounces"
 Thailand,Thailand,Hatyai,http://mirrors.psu.ac.th/pub/cran/,"Prince of Songkla University, Hatyai","wipat.s # psu.ac.th",1,th
-Turkey,Turkey,Denizli,http://cran.pau.edu.tr,"Pamukkale University, Denizli","Ugur Zeybek <uzeybek # pau.edu.tr>",1,tr
-"UK (Bristol)",UK,Bristol,http://www.stats.bris.ac.uk/R/,"University of Bristol","Guy Nason <G.P.Nason # bristol.ac.uk>",1,uk
-"UK (Cambridge)",UK,"Cambridge",http://mirrors.ebi.ac.uk/CRAN/,"EMBL-EBI (European Bioinformatics Institute)","Andrew Tikhonov <andrew # ebi.ac.uk>",1,uk
-"UK (London)",UK,London,http://cran.ma.imperial.ac.uk/,"Imperial College London","s.rochford # imperial.ac.uk",1,uk
-"UK (London)",UK,"London",http://mirror.mdx.ac.uk/R/,"Middlesex University London","Louis Slabbert <l.slabbert # mdx.ac.uk>",1,uk
-"UK (St Andrews)",UK,"St Andrews",http://star-www.st-andrews.ac.uk/cran/,"St Andrews University","Lee Kelvin <lsk9 # St-andrews.ac.uk>",1,uk
-"USA (CA 1)",USA,Berkeley,http://cran.cnr.Berkeley.edu,"University of California, Berkeley, CA","casterln # nature.berkeley.edu",1,us
+"Turkey (Denizli) [https]",Turkey,Denizli,https://cran.pau.edu.tr/,"Pamukkale University, Denizli","Ugur Zeybek <uzeybek # pau.edu.tr>",1,tr
+"Turkey (Denizli)",Turkey,Denizli,http://cran.pau.edu.tr/,"Pamukkale University, Denizli","Ugur Zeybek <uzeybek # pau.edu.tr>",1,tr
+"Turkey (Mersin) [https]",Turkey,Mersin,https://cran.ncc.metu.edu.tr/,"Middle East Technical University Northern Cyprus Campus, Mersin","atasiran # metu.edu.tr, ncc-cc # metu.edu.tr",1,tr
+"Turkey (Mersin)",Turkey,Mersin,http://cran.ncc.metu.edu.tr/,"Middle East Technical University Northern Cyprus Campus, Mersin","atasiran # metu.edu.tr, ncc-cc # metu.edu.tr",1,tr
+"UK (Bristol) [https]",UK,Bristol,https://www.stats.bris.ac.uk/R/,"University of Bristol","Guy Nason <G.P.Nason # bristol.ac.uk>, it-zone-d # bristol.ac.uk",1,uk,"secure_mirror_from_master"
+"UK (Bristol)",UK,Bristol,http://www.stats.bris.ac.uk/R/,"University of Bristol","Guy Nason <G.P.Nason # bristol.ac.uk>, it-zone-d # bristol.ac.uk",1,uk,"secure_mirror_from_master"
+"UK (Cambridge) [https]",UK,"Cambridge",https://mirrors.ebi.ac.uk/CRAN/,"EMBL-EBI (European Bioinformatics Institute)","Andrew Tikhonov <andrew # ebi.ac.uk>",1,uk,"secure_mirror_from_master"
+"UK (Cambridge)",UK,"Cambridge",http://mirrors.ebi.ac.uk/CRAN/,"EMBL-EBI (European Bioinformatics Institute)","Andrew Tikhonov <andrew # ebi.ac.uk>",1,uk,"secure_mirror_from_master"
+"UK (London 1) [https]",UK,London,https://cran.ma.imperial.ac.uk/,"Imperial College London","andy.thomas # imperial.ac.uk",1,uk,"secure_mirror_from_master"
+"UK (London 1)",UK,London,http://cran.ma.imperial.ac.uk/,"Imperial College London","andy.thomas # imperial.ac.uk",1,uk,"secure_mirror_from_master"
+"UK (London 2)",UK,"London",http://mirror.mdx.ac.uk/R/,"Middlesex University London","Louis Slabbert <l.slabbert # mdx.ac.uk>",1,uk
+"UK (St Andrews)",UK,"St Andrews",http://star-www.st-andrews.ac.uk/cran/,"St Andrews University","Lee Kelvin <lsk9 # St-andrews.ac.uk>",1,uk,"maintainer_address_bounces"
+"USA (CA 1) [https]",USA,Berkeley,https://cran.cnr.berkeley.edu/,"University of California, Berkeley, CA","casterln # nature.berkeley.edu",1,us,"secure_mirror_from_master"
+"USA (CA 1)",USA,Berkeley,http://cran.cnr.berkeley.edu/,"University of California, Berkeley, CA","casterln # nature.berkeley.edu",1,us,"secure_mirror_from_master"
 "USA (CA 2)",USA,"Los Angeles",http://cran.stat.ucla.edu/,"University of California, Los Angeles, CA","Jose Hales-Garcia <jose # stat.ucla.edu>",1,us
-"USA (IA)",USA,Ames,http://streaming.stat.iastate.edu/CRAN/,"Iowa State University, Ames, IA","statit # iastate.edu",1,us
+"USA (IA) [https]",USA,Ames,https://mirror.las.iastate.edu/CRAN/,"Iowa State University, Ames, IA","statit # iastate.edu",1,us
+"USA (IA)",USA,Ames,http://mirror.las.iastate.edu/CRAN/,"Iowa State University, Ames, IA","statit # iastate.edu",1,us
+"USA (IN) [https]",USA,Bloomington,https://ftp.ussg.iu.edu/CRAN/,"Indiana University","rtadmin # indiana.edu",1,us
 "USA (IN)",USA,Bloomington,http://ftp.ussg.iu.edu/CRAN/,"Indiana University","rtadmin # indiana.edu",1,us
-"USA (KS)",USA,Lawrence,http://rweb.quant.ku.edu/cran/,"University of Kansas, Lawrence, KS","Paul Johnson <pauljohn # ku.edu>",1,us
-"USA (MD)",USA,Bethesda,http://watson.nci.nih.gov/cran_mirror/,"National Cancer Institute, Bethesda, MD","Sean Davis <sdavis2 # mail.nih.gov>",1,us
-"USA (MI)",USA,Houghton,http://cran.mtu.edu/,"Michigan Technological University, Houghton, MI","Robert Froese <froese # mtu.edu>",1,us
-"USA (MO)",USA,"St. Louis",http://cran.wustl.edu/,"Washington University, St. Louis, MO","admartin # wustl.edu",1,us
-"USA (OH)",USA,Cleveland,http://cran.case.edu/,"Case Western Reserve University, Cleveland, OH","""Alberto H. Santana"" <ahs4 # case.edu>",1,us
+"USA (KS) [https]",USA,Lawrence,https://rweb.crmda.ku.edu/cran/,"University of Kansas, Lawrence, KS","Paul Johnson <pauljohn # ku.edu>",1,us,"secure_mirror_from_master"
+"USA (KS)",USA,Lawrence,http://rweb.crmda.ku.edu/cran/,"University of Kansas, Lawrence, KS","Paul Johnson <pauljohn # ku.edu>",1,us,"secure_mirror_from_master"
+"USA (MI 1) [https]",USA,Houghton,https://cran.mtu.edu/,"Michigan Technological University, Houghton, MI","Robert Froese <froese # mtu.edu>",1,us,"secure_mirror_from_master"
+"USA (MI 1)",USA,Houghton,http://cran.mtu.edu/,"Michigan Technological University, Houghton, MI","Robert Froese <froese # mtu.edu>",1,us,"secure_mirror_from_master"
+"USA (MO)",USA,"St. Louis",http://cran.wustl.edu/,"Washington University, St. Louis, MO","admartin # wustl.edu",1,us,"maintainer_address_bounces"
+"USA (NC)",USA,Durham,http://archive.linux.duke.edu/cran/,"Duke University, Durham, NC","csi-linux-admins # duke.edu",1,us
+"USA (OH 1)",USA,Cleveland,http://cran.case.edu/,"Case Western Reserve University, Cleveland, OH","""Alberto H. Santana"" <ahs4 # case.edu>",1,us
+"USA (OH 2)",USA,Dayton,http://iis.stat.wright.edu/CRAN/,"Wright State University, Dayton, OH","Long Qu <long.qu # wright.edu>",1,us
+"USA (OR) [https]",USA,Corvallis,https://ftp.osuosl.org/pub/cran/,"Oregon State University","support # Osuosl.org",1,us
 "USA (OR)",USA,Corvallis,http://ftp.osuosl.org/pub/cran/,"Oregon State University","support # Osuosl.org",1,us
-"USA (PA 1)",USA,Pittsburgh,http://lib.stat.cmu.edu/R/CRAN/,"Statlib, Carnegie Mellon University, Pittsburgh, PA",,1,us
-"USA (PA 2)",USA,Pittsburgh,http://cran.mirrors.hoobly.com,"Hoobly Classifieds, Pittsburgh, PA","Peter Grigor <pgrigor # hoobly.com>",1,us
-"USA (TN)",USA,"Oak Ridge",http://mirrors.nics.utk.edu/cran/,"National Institute for Computational Sciences, Oak Ridge, TN","help # nics.utk.edu",1,us
-"USA (TX 1)",USA,Dallas,http://cran.revolutionanalytics.com,"Revolution Analytics, Dallas, TX","David Smith <david # revolutionanalytics.com>",1,us
-"USA (WA 1)",USA,Seattle,http://cran.fhcrc.org/,"Fred Hutchinson Cancer Research Center, Seattle, WA","sfalcon # fhcrc.org",1,us
-"USA (WA 2)",USA,Bellingham,http://cran.cs.wwu.edu/,"Western Washington University, Bellingham, WA","CS.Support # Wwu.edu",1,us
+"USA (PA 1)",USA,Pittsburgh,http://lib.stat.cmu.edu/R/CRAN/,"Statlib, Carnegie Mellon University, Pittsburgh, PA","Carl Skipper <remarks # stat.cmu.edu>",1,us
+"USA (PA 2)",USA,Pittsburgh,http://cran.mirrors.hoobly.com/,"Hoobly Classifieds, Pittsburgh, PA","Peter Grigor <pgrigor # hoobly.com>",1,us
+"USA (TN) [https]",USA,"Oak Ridge",https://mirrors.nics.utk.edu/cran/,"National Institute for Computational Sciences, Oak Ridge, TN","help # nics.utk.edu",1,us,"secure_mirror_from_master"
+"USA (TN)",USA,"Oak Ridge",http://mirrors.nics.utk.edu/cran/,"National Institute for Computational Sciences, Oak Ridge, TN","help # nics.utk.edu",1,us,"secure_mirror_from_master"
+"USA (TX 1) [https]",USA,Dallas,https://cran.revolutionanalytics.com/,"Revolution Analytics, Dallas, TX","David Smith <david # revolutionanalytics.com>",1,us,"secure_mirror_from_master"
+"USA (TX 1)",USA,Dallas,http://cran.revolutionanalytics.com/,"Revolution Analytics, Dallas, TX","David Smith <david # revolutionanalytics.com>",1,us,"secure_mirror_from_master"
+"USA (TX 2) [https]",USA,"San Antonio",https://mirror.usertrust.info/cranmirror/,"Dark Particle Labs, San Antonio","Matt Weeks <scriptjunkie # scriptjunkie.us>",1,us,"secure_mirror_from_master"
 Venezuela,Venezuela,Valencia,http://camoruco.ing.uc.edu.ve/cran/,"Universidad de Carabobo Venezuela","dir-imyca # uc.edu.ve",1,ve
-Vietnam,Vietnam,"Can Tho City",http://cran.vinastat.com/,VinaStat.com,"contact# vinastat.com, lchanh # ctump.edu.vn",1,vn
diff --git a/doc/FAQ b/doc/FAQ
index 518f0fb..88f6b19 100644
--- a/doc/FAQ
+++ b/doc/FAQ
@@ -1,6 +1,6 @@
 R FAQ
 Frequently Asked Questions on R
-Version 3.1.2014-10-26
+Version 2016-06-06
 Kurt Hornik
 
 
@@ -99,6 +99,8 @@ R FAQ
   7.40 How do I access the source code for a function?
   7.41 Why does summary() report strange results for the R^2 estimate when I fit a linear model with no intercept?
   7.42 Why is R apparently not releasing memory?
+  7.43 How can I enable secure https downloads in R?
+  7.44 How can I get CRAN package binaries for outdated versions of R?
 8 R Programming
   8.1 How should I write summary methods?
   8.2 How can I debug dynamically loaded code?
@@ -121,7 +123,7 @@ questions about R.
 1.1 Legalese
 ============
 
-This document is copyright � 1998-2014 by Kurt Hornik.
+This document is copyright � 1998-2016 by Kurt Hornik.
 
    This document is free software; you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by the
@@ -135,18 +137,18 @@ Public License for more details.
 
    Copies of the GNU General Public License versions are available at
 
-     <http://www.R-project.org/Licenses/>
+     <https://www.R-project.org/Licenses/>
 
 1.2 Obtaining this document
 ===========================
 
 The latest version of this document is always available from
 
-     <http://CRAN.R-project.org/doc/FAQ/>
+     <https://CRAN.R-project.org/doc/FAQ/>
 
    From there, you can obtain versions converted to plain ASCII text,
 GNU info, HTML, PDF, as well as the Texinfo source used for creating all
-these formats using the GNU Texinfo system (http://texinfo.org/).
+these formats using the GNU Texinfo system.
 
    You can also obtain the R FAQ from the 'doc/FAQ' subdirectory of a
 CRAN site (*note What is CRAN?::).
@@ -154,14 +156,14 @@ CRAN site (*note What is CRAN?::).
 1.3 Citing this document
 ========================
 
-In publications, please refer to this FAQ as Hornik (2014), "The R FAQ",
+In publications, please refer to this FAQ as Hornik (2016), "The R FAQ",
 and give the above, _official_ URL:
 
      @Misc{,
        author        = {Kurt Hornik},
        title         = {{R} {FAQ}},
-       year          = {2014},
-       url           = {http://CRAN.R-project.org/doc/FAQ/R-FAQ.html}
+       year          = {2016},
+       url           = {https://CRAN.R-project.org/doc/FAQ/R-FAQ.html}
      }
 
 1.4 Notation
@@ -177,10 +179,10 @@ Feedback via email to <Kurt.Hornik at R-project.org> is of course most
 welcome.
 
    In particular, note that I do not have access to Windows or Mac
-systems.  Features specific to the Windows and OS X ports of R are
+systems.  Features specific to the Windows and macOS ports of R are
 described in the "R for Windows FAQ"
-(http://CRAN.R-project.org/bin/windows/base/rw-FAQ.html) and the "R for
-Mac OS X FAQ" (http://CRAN.R-project.org/bin/macosx/RMacOSX-FAQ.html).
+(https://CRAN.R-project.org/bin/windows/base/rw-FAQ.html) and the "R for
+Mac OS X FAQ" (https://CRAN.R-project.org/bin/macosx/RMacOSX-FAQ.html).
 If you have information on Mac or Windows systems that you think should
 be added to this document, please let me know.
 
@@ -198,7 +200,7 @@ script files.
    The design of R has been heavily influenced by two existing
 languages: Becker, Chambers & Wilks' S (*note What is S?::) and
 Sussman's Scheme
-(http://www.cs.indiana.edu/scheme-repository/home.html).  Whereas the
+(https://www.cs.indiana.edu/scheme-repository/home.html).  Whereas the
 resulting language is very similar in appearance to S, the underlying
 implementation and semantics are derived from Scheme.  *Note What are
 the differences between R and S?::, for further details.
@@ -231,10 +233,10 @@ Ligges, Thomas Lumley, Martin Maechler, Duncan Murdoch, Paul Murrell,
 Martyn Plummer, Brian Ripley, Deepayan Sarkar, Duncan Temple Lang, Luke
 Tierney, and Simon Urbanek.
 
-   R has a home page at <http://www.R-project.org/>.  It is free
-software (http://www.gnu.org/philosophy/free-sw.html) distributed under
-a GNU-style copyleft (http://www.gnu.org/copyleft/copyleft.html), and an
-official part of the GNU (http://www.gnu.org/) project ("GNU S").
+   R has a home page at <https://www.R-project.org/>.  It is free
+software (https://www.gnu.org/philosophy/free-sw.html) distributed under
+a GNU-style copyleft (https://www.gnu.org/copyleft/copyleft.html), and
+an official part of the GNU (https://www.gnu.org/) project ("GNU S").
 
 2.2 What machines does R run on?
 ================================
@@ -243,24 +245,28 @@ R is being developed for the Unix-like, Windows and Mac families of
 operating systems.  Support for Mac OS Classic ended with R 1.7.1.
 
    The current version of R will configure and build under a number of
-common Unix-like (e.g., <http://en.wikipedia.org/wiki/Unix-like>)
-platforms including CPU-linux-gnu for the i386, amd64, alpha, arm/armel,
-hppa, ia64, m68k, mips/mipsel, powerpc, s390 and sparc CPUs (e.g.,
-<http://buildd.debian.org/build.php?&pkg=r-base>), i386-hurd-gnu,
-CPU-kfreebsd-gnu for i386 and amd64, powerpc-apple-darwin,
-mips-sgi-irix, i386-freebsd, rs6000-ibm-aix, and sparc-sun-solaris.
+common Unix-like (e.g., <https://en.wikipedia.org/wiki/Unix-like>)
+platforms including CPU-linux-gnu for the i386, amd64/x86_64, alpha,
+arm, arm64, hppa, mips/mipsel, powerpc, s390x and sparc CPUs (e.g.,
+<https://buildd.debian.org/build.php?&pkg=r-base>), i386-hurd-gnu,
+CPU-kfreebsd-gnu for i386 and amd64, i386-pc-solaris, rs6000-ibm-aix,
+sparc-sun-solaris, x86_64-apple-darwin, x86_64-unknown-freebsd and
+x86_64-unknown-openbsd.
 
    If you know about other platforms, please drop us a note.
 
 2.3 What is the current version of R?
 =====================================
 
-The current released version is 3.1.2.  Based on this
-'major.minor.patchlevel' numbering scheme, there are two development
-versions of R, a patched version of the current release ('r-patched')
-and one working towards the next minor or eventually major ('r-devel')
-releases of R, respectively.  Version r-patched is for bug fixes mostly.
-New features are typically introduced in r-devel.
+R uses a 'major.minor.patchlevel' numbering scheme.  Based on this,
+there are the current release version of R ('r-release') as well as two
+development versions of R, a patched version of the current release
+('r-patched') and one working towards the next minor or eventually major
+('r-devel') releases of R, respectively.  New features are typically
+introduced in r-devel, while r-patched is for bug fixes mostly.
+
+   See <https://CRAN.R-project.org/sources.html> for the current
+versions of r-release, r-patched and r-devel.
 
 2.4 How can R be obtained?
 ==========================
@@ -273,7 +279,7 @@ Subversion repository, but currently not via anonymous rsync (nor CVS).
 
    Tarballs with daily snapshots of the r-devel and r-patched
 development versions of R can be found at
-<ftp://ftp.stat.math.ethz.ch/Software/R>.
+<https://stat.ethz.ch/R/daily>.
 
 2.5 How can R be installed?
 ===========================
@@ -361,23 +367,23 @@ Masarotto, and is now being developed and maintained by Duncan Murdoch
 r-devel versions of R.
 
    See the "R for Windows FAQ"
-(http://CRAN.R-project.org/bin/windows/base/rw-FAQ.html) for more
+(https://CRAN.R-project.org/bin/windows/base/rw-FAQ.html) for more
 details.
 
 2.5.3 How can R be installed (Mac)
 ----------------------------------
 
 The 'bin/macosx' directory of a CRAN site contains a standard Apple
-installer package to run on OS X 10.6 ('Snow Leopard') and later.  Once
+installer package to run on macOS 10.9 ('Mavericks') and later.  Once
 downloaded and executed, the installer will install the current release
-of R and an R.app OS X GUI.  This port of R for OS X is maintained by
-Simon Urbanek <Simon.Urbanek at R-project.org> (and previously by Stefano
-Iacus).  The "R for Mac OS X FAQ
-(http://CRAN.R-project.org/bin/macosx/RMacOSX-FAQ.html) has more
+of R and R.app, the macOS GUI.  This port of R for macOS is maintained
+by Simon Urbanek <Simon.Urbanek at R-project.org> (and previously by
+Stefano Iacus).  The "R for Mac macOS FAQ
+(https://CRAN.R-project.org/bin/macosx/RMacOSX-FAQ.html) has more
 details.
 
    Snapshots of the r-patched and r-devel versions of R are available as
-Apple installer packages at <http://r.research.att.com>.
+Apple installer packages at <https://r.research.att.com>.
 
 2.6 Are there Unix-like binaries for R?
 =======================================
@@ -400,8 +406,8 @@ install r-base-dev' to obtain the additional tools required for this.
 So-called "backports" of the current R packages for at least the
 "stable" distribution of Debian are provided by Johannes Ranke, and
 available from CRAN.  See
-<http://CRAN.R-project.org/bin/linux/debian/README> for details on R
-Debian packages and installing the backports, which should also be
+<https://CRAN.R-project.org/bin/linux/debian/index.html> for details on
+R Debian packages and installing the backports, which should also be
 suitable for other Debian derivatives.  Native backports for Ubuntu are
 provided by Michael Rutter.
 
@@ -420,11 +426,11 @@ released, there may be a delay of up to 2 weeks until the Fedora RPM
 becomes publicly available, as it must pass through the statutory Fedora
 review process.  RPMs for a selection of R packages are also provided by
 Fedora.  The Extra Packages for Enterprise Linux (EPEL) project
-(<http://fedoraproject.org/wiki/EPEL>) provides ports of the Fedora RPMs
-for RedHat Enterprise Linux and compatible distributions (e.g., Centos,
-Scientific Linux, Oracle Linux).
+(<https://fedoraproject.org/wiki/EPEL>) provides ports of the Fedora
+RPMs for RedHat Enterprise Linux and compatible distributions (e.g.,
+Centos, Scientific Linux, Oracle Linux).
 
-   See <http://CRAN.R-project.org/bin/linux/suse/README.html> for
+   See <https://CRAN.R-project.org/bin/linux/suse/README.html> for
 information about RPMs for openSUSE.
 
    No other binary distributions are currently publically available via
@@ -442,7 +448,7 @@ forms, the name may need to be be quoted.)
    This documentation can also be made available as one reference manual
 for on-line reading in HTML and PDF formats, and as hardcopy via LaTeX,
 see *note How can R be installed?::.  An up-to-date HTML version is
-always available for web browsing at <http://stat.ethz.ch/R-manual/>.
+always available for web browsing at <https://stat.ethz.ch/R-manual/>.
 
    Printed copies of the R reference manual for some version(s) are
 available from Network Theory Ltd, at
@@ -471,21 +477,21 @@ the R Foundation?::).
    An annotated bibliography (BibTeX format) of R-related publications
 can be found at
 
-     <http://www.R-project.org/doc/bib/R.bib>
+     <https://www.R-project.org/doc/bib/R.bib>
 
    Books on R by R Core Team members include
 
      John M. Chambers (2008), "Software for Data Analysis: Programming
      with R". Springer, New York, ISBN 978-0-387-75935-7,
-     <http://stat.stanford.edu/~jmc4/Rbook/>.
+     <http://statweb.stanford.edu/~jmc4/Rbook/>.
 
      Peter Dalgaard (2008), "Introductory Statistics with R", 2nd
      edition.  Springer, ISBN 978-0-387-79053-4,
-     <http://www.biostat.ku.dk/~pd/ISwR.html>.
+     <http://publicifsv.sund.ku.dk/~pd/ISwR.html>.
 
      Robert Gentleman (2008), "R Programming for Bioinformatics".
      Chapman & Hall/CRC, Boca Raton, FL, ISBN 978-1-420-06367-7,
-     <http://www.bioconductor.org/pub/RBioinf/>.
+     <https://www.bioconductor.org/pub/RBioinf/>.
 
      Stefano M. Iacus (2008), "Simulation and Inference for Stochastic
      Differential Equations: With R Examples".  Springer, New York, ISBN
@@ -500,11 +506,11 @@ can be found at
 
      P. Murrell (2005), "R Graphics", Chapman & Hall/CRC, ISBN:
      1-584-88486-X,
-     <http://www.stat.auckland.ac.nz/~paul/RGraphics/rgraphics.html>.
+     <https://www.stat.auckland.ac.nz/~paul/RGraphics/rgraphics.html>.
 
      William N. Venables and Brian D. Ripley (2002), "Modern Applied
      Statistics with S" (4th edition).  Springer, ISBN 0-387-95457-0,
-     <http://www.stats.ox.ac.uk/pub/MASS4/>.
+     <https://www.stats.ox.ac.uk/pub/MASS4/>.
 
      Jose C. Pinheiro and Douglas M. Bates (2000), "Mixed-Effects Models
      in S and S-Plus".  Springer, ISBN 0-387-98957-0.
@@ -525,9 +531,11 @@ To cite R in publications, use
        author       = {{R Core Team}},
        organization = {R Foundation for Statistical Computing},
        address      = {Vienna, Austria},
-       year         = 2014,
-       url          = {http://www.R-project.org}
+       year         = YEAR,
+       url          = {https://www.R-project.org}
      }
+where YEAR is the release year of the version of R used and can
+determined as 'R.version$year'.
 
    Citation strings (or BibTeX entries) for R and R packages can also be
 obtained by 'citation()'.
@@ -536,7 +544,7 @@ obtained by 'citation()'.
 ===================================
 
 Thanks to Martin Maechler <Martin.Maechler at R-project.org>, there are
-four mailing lists devoted to R.
+several mailing lists devoted to R, including the following:
 
 'R-announce'
      A moderated list for major announcements about the development of R
@@ -552,9 +560,12 @@ four mailing lists devoted to R.
 'R-devel'
      This list is for questions and discussion about code development in
      R.
+'R-package-devel'
+     A list which which provides a forum for learning about the R
+     package development process.
 
 Please read the posting guide
-(http://www.R-project.org/posting-guide.html) _before_ sending anything
+(https://www.R-project.org/posting-guide.html) _before_ sending anything
 to any mailing list.
 
    Note in particular that R-help is intended to be comprehensible to
@@ -565,7 +576,7 @@ involving C or C++) should go to R-devel.
 
    Convenient access to information on these lists, subscription, and
 archives is provided by the web interface at
-<http://stat.ethz.ch/mailman/listinfo/>.  One can also subscribe (or
+<https://stat.ethz.ch/mailman/listinfo/>.  One can also subscribe (or
 unsubscribe) via email, e.g. to R-help by sending 'subscribe' (or
 'unsubscribe') in the _body_ of the message (not in the subject!)  to
 <R-help-request at lists.R-project.org>.
@@ -587,7 +598,7 @@ have code which reliably reproduces the problem.  Also, make sure that
 you include information on the system and version of R being used.  See
 *note R Bugs:: for more details.
 
-   See <http://www.R-project.org/mail.html> for more information on the
+   See <https://www.R-project.org/mail.html> for more information on the
 R mailing lists.
 
    The R Core Team can be reached at <R-core at lists.R-project.org> for
@@ -610,26 +621,10 @@ contributed extensions, documentation for R, and binaries.
    The CRAN master site at WU (Wirtschaftsuniversit�t Wien) in Austria
 can be found at the URL
 
-     <http://CRAN.R-project.org/>
-
-Daily mirrors are available at URLs including
-
-     <http://cran.at.R-project.org/>  (WU Wien, Austria)
-     <http://cran.au.R-project.org/>  (PlanetMirror, Australia)
-     <http://cran.br.R-project.org/>  (Universidade Federal do
-                                      Paran�, Brazil)
-     <http://cran.ch.R-project.org/>  (ETH Z�rich, Switzerland)
-     <http://cran.dk.R-project.org/>  (SunSITE, Denmark)
-     <http://cran.es.R-project.org/>  (Spanish National Research
-                                      Network, Madrid, Spain)
-     <http://cran.fr.R-project.org/>  (INRA, Toulouse, France)
-     <http://cran.pt.R-project.org/>  (Universidade do Porto,
-                                      Portugal)
-     <http://cran.uk.R-project.org/>  (U of Bristol, United
-                                      Kingdom)
-     <http://cran.za.R-project.org/>  (Rhodes U, South Africa)
-
-See <http://CRAN.R-project.org/mirrors.html> for a complete list of
+     <https://CRAN.R-project.org/>
+
+and is mirrored daily to many sites around the world.  See
+<https://CRAN.R-project.org/mirrors.html> for a complete list of
 mirrors.  Please use the CRAN site closest to you to reduce network
 load.
 
@@ -637,8 +632,11 @@ load.
 snapshots of R (copies of the current source trees), as gzipped and
 bzipped tar files, a wealth of additional contributed code, as well as
 prebuilt binaries for various operating systems (Linux, Mac OS Classic,
-OS X, and MS Windows).  CRAN also provides access to documentation on R,
-existing mailing lists and the R Bug Tracking system.
+macOS, and MS Windows).  CRAN also provides access to documentation on
+R, existing mailing lists and the R Bug Tracking system.
+
+   Since March 2016, "old" material is made available from a central
+CRAN archive server (<https://CRAN-archive.R-project.org/>).
 
    Please always use the URL of the master site when referring to CRAN.
 
@@ -656,7 +654,7 @@ all Open Source licenses, permits all and any use of the package.  It
 only restricts distribution of R or of other programs containing code
 from R. This is made clear in clause 6 ("No Discrimination Against
 Fields of Endeavor") of the Open Source Definition
-(http://www.opensource.org/docs/definition.html):
+(https://opensource.org/docs/definition.html):
 
      The license must not restrict anyone from making use of the program
      in a specific field of endeavor.  For example, it may not restrict
@@ -695,21 +693,21 @@ provide support for the R project and other innovations in statistical
 computing, provide a reference point for individuals, institutions or
 commercial enterprises that want to support or interact with the R
 development community, and to hold and administer the copyright of R
-software and documentation.  See <http://www.R-project.org/foundation/>
+software and documentation.  See <https://www.R-project.org/foundation/>
 for more information.
 
 2.14 What is R-Forge?
 =====================
 
-R-Forge (<http://R-Forge.R-project.org/>) offers a central platform for
+R-Forge (<https://R-Forge.R-project.org/>) offers a central platform for
 the development of R packages, R-related software and further projects.
-It is based on GForge (http://www.gforge.org/) offering easy access to
-the best in SVN, daily built and checked packages, mailing lists, bug
-tracking, message boards/forums, site hosting, permanent file archival,
-full backups, and total web-based administration.  For more information,
-see the R-Forge web page and Stefan Theu�l and Achim Zeileis (2009),
-"Collaborative software development using R-Forge", _The R Journal_,
-*1*(1):9-14.
+It is based on GForge (https://en.wikipedia.org/wiki/GForge) offering
+easy access to the best in SVN, daily built and checked packages,
+mailing lists, bug tracking, message boards/forums, site hosting,
+permanent file archival, full backups, and total web-based
+administration.  For more information, see the R-Forge web page and
+Stefan Theu�l and Achim Zeileis (2009), "Collaborative software
+development using R-Forge", _The R Journal_, *1*(1):9-14.
 
 3 R and S
 *********
@@ -754,26 +752,21 @@ S.
 
    * John M. Chambers (1998), "Programming with Data," New York:
      Springer, ISBN 0-387-98503-4
-     (<http://cm.bell-labs.com/cm/ms/departments/sia/Sbook/>).
+     (<http://statweb.stanford.edu/~jmc4/Sbook/>).
 
      This "_Green Book_" describes version 4 of S, a major revision of S
      designed by John Chambers to improve its usefulness at every stage
      of the programming process.
 
-   See <http://cm.bell-labs.com/cm/ms/departments/sia/S/history.html>
-for further information on "Stages in the Evolution of S".
-
-   There is a huge amount of user-contributed code for S, available at
-the S Repository (http://lib.stat.cmu.edu/S/) at CMU.
+   See <http://statweb.stanford.edu/~jmc4/papers/96.7.ps> for further
+information on the "Evolution of the S Language".
 
 3.2 What is S-PLUS?
 ===================
 
-S-PLUS is a value-added version of S sold by Insightful Corporation
-(http://www.insightful.com), which in 2008 was acquired by TIBCO
-Software Inc (http://www.tibco.com/).  See the Insightful S-PLUS page
-(http://www.insightful.com/products/splus/) and the TIBCO Spotfire S+
-Products page for further information.
+S-PLUS is a value-added version of S currently sold by TIBCO Software
+Inc (http://www.tibco.com/) as 'TIBCO Spotfire S+'.  See
+<https://en.wikipedia.org/wiki/S-PLUS> for more information.
 
 3.3 What are the differences between R and S?
 =============================================
@@ -1185,20 +1178,14 @@ For a very long time, there was no such thing.
 currently beta testing a commercially supported version of R named R+
 (read R plus).
 
-   REvolution Computing (http://www.revolution-computing.com/) has
+   Revolution Analytics (http://www.revolution-computing.com/) has
 released REvolution R
 (http://www.revolution-computing.com/products/revolution-r.php), an
 enterprise-class statistical analysis system based on R, suitable for
 deployment in professional, commercial and regulated environments.
 
-   Random Technologies (http://www.random-technologies-llc.com/) offers
-RStat (http://random-technologies-llc.com/products/RStat/rstat), an
-enterprise-strength statistical computing environment which combines R
-with enterprise-level validation, documentation, software support, and
-consulting services, as well as related R-based products.
-
    See also
-<http://en.wikipedia.org/wiki/R_programming_language#Commercialized_versions_of_R>
+<https://en.wikipedia.org/wiki/R_programming_language#Commercialized_versions_of_R>
 for pointers to commercialized versions of R.
 
 4 R Web Interfaces
@@ -1206,11 +1193,11 @@ for pointers to commercialized versions of R.
 
 *Rweb* is developed and maintained by Jeff Banfield
 <jeff at math.montana.edu>.  The Rweb Home Page
-(http://www.math.montana.edu/Rweb/) provides access to all three
-versions of Rweb--a simple text entry form that returns output and
-graphs, a more sophisticated JavaScript version that provides a multiple
-window environment, and a set of point and click modules that are useful
-for introductory statistics courses and require no knowledge of the R
+(https://rweb.stat.umn.edu/Rweb/) provides access to all three versions
+of Rweb--a simple text entry form that returns output and graphs, a more
+sophisticated JavaScript version that provides a multiple window
+environment, and a set of point and click modules that are useful for
+introductory statistics courses and require no knowledge of the R
 language.  All of the Rweb versions can analyze Web accessible datasets
 if a URL is provided.
 
@@ -1224,7 +1211,7 @@ on-line programming environment for R which intends to make the first
 steps in statistical programming with R (especially with time series) as
 easy as possible.  There is no need for a local installation since the
 only requirement for the user is a JavaScript capable browser.  See
-<http://osvisions.com/r-online/> for more information.
+<http://www.osvisions.com/r_online/> for more information.
 
    *Rcgi* is a CGI WWW interface to R by MJ Ray <mjr at dsl.pipex.com>.  It
 had the ability to use "embedded code": you could mix user input and
@@ -1232,19 +1219,15 @@ code, allowing the HTML author to do anything from load in data sets to
 enter most of the commands for users without writing CGI scripts.
 Graphical output was possible in PostScript or GIF formats and the
 executed code was presented to the user for revision.  However, it is
-not clear if the project is still active.  Currently, a modified version
-of *Rcgi* by Mai Zhou <mai at ms.uky.edu> (actually, two versions: one with
-(bitmap) graphics and one without) as well as the original code are
-available from <http://www.ms.uky.edu/~statweb/>.
-
-   CGI-based web access to R is also provided at
-<http://hermes.sdu.dk/cgi-bin/go/>.  There are many additional examples
-of web interfaces to R which basically allow to submit R code to a
-remote server, see for example the collection of links available from
+not clear if the project is still active.
+
+   There are many additional examples of web interfaces to R which
+basically allow to submit R code to a remote server, see for example the
+collection of links available from
 <http://biostat.mc.vanderbilt.edu/twiki/bin/view/Main/StatCompCourse>.
 
    David Firth (http://www.warwick.ac.uk/go/dfirth) has written
-*CGIwithR* (http://CRAN.R-project.org/package=CGIwithR), an R add-on
+*CGIwithR* (https://CRAN.R-project.org/package=CGIwithR), an R add-on
 package available from CRAN.  It provides some simple extensions to R to
 facilitate running R scripts through the CGI interface to a web server,
 and allows submission of data using both GET and POST methods.  It is
@@ -1254,31 +1237,19 @@ installer has the necessary security permissions.  David's paper
 "CGIwithR: Facilities for Processing Web Forms Using R" was published in
 the Journal of Statistical Software
 (<http://www.jstatsoft.org/v08/i10/>).  The package is now maintained by
-Duncan Temple Lang <duncan at wald.ucdavis.edu> and has a web page at
-<http://www.omegahat.org/CGIwithR/>.
-
-   Rpad (http://www.rpad.org/Rpad), developed and actively maintained by
-Tom Short, provides a sophisticated environment which combines some of
-the features of the previous approaches with quite a bit of JavaScript,
-allowing for a GUI-like behavior (with sortable tables, clickable
-graphics, editable output), etc.
+Duncan Temple Lang <duncan at wald.ucdavis.edu>.  and has a web page at
+<http://www.omegahat.net/CGIwithR/>.
 
    Jeff Horner is working on the R/Apache Integration Project which
 embeds the R interpreter inside Apache 2 (and beyond).  A tutorial and
 presentation are available from the project web page at
 <http://biostat.mc.vanderbilt.edu/twiki/bin/view/Main/RApacheProject>.
 
-   Rserve (http://stats.math.uni-augsburg.de/Rserve/) is a project
-actively developed by Simon Urbanek.  It implements a TCP/IP server
-which allows other programs to use facilities of R. Clients are
-available from the web site for Java and C++ (and could be written for
-other languages that support TCP/IP sockets).
-
-   OpenStatServer (http://openstatserver.org/index.html) is being
-developed by a team lead by Greg Warnes; it aims "to provide clean
-access to computational modules defined in a variety of computational
-environments (R, SAS, Matlab, etc) via a single well-defined client
-interface" and to turn computational services into web services.
+   Rserve (https://www.rforge.net/Rserve/) is a project actively
+developed by Simon Urbanek.  It implements a TCP/IP server which allows
+other programs to use facilities of R. Clients are available from the
+web site for Java and C++ (and could be written for other languages that
+support TCP/IP sockets).
 
    Two projects use PHP to provide a web interface to R. R_PHP_Online
 (http://steve-chen.net/R_PHP/) by Steve Chen (though it is unclear if
@@ -1288,7 +1259,7 @@ developed by Alfredo Pontillo and Angelo Mineo and provides both a web
 interface to R and a set of pre-specified analyses that need no R code
 input.
 
-   webbioc (http://www.bioconductor.org/) is "an integrated web
+   webbioc (https://www.bioconductor.org/) is "an integrated web
 interface for doing microarray analysis using several of the
 Bioconductor packages" and is designed to be installed at local sites as
 a shared computing resource.
@@ -1298,18 +1269,18 @@ create user-friendly web interfaces for R scripts.  All code for the web
 interface is created automatically.  There is no need for the user to do
 any extra scripting or learn any new scripting techniques.
 
-   The *R.rsp* (http://CRAN.R-project.org/package=R.rsp) package by
+   The *R.rsp* (https://CRAN.R-project.org/package=R.rsp) package by
 Henrik Bengtsson introduces "R Server Pages".  Analogous to Java Server
 Pages, an R server page is typically HTML with embedded R code that gets
 evaluated when the page is requested.  The package includes an internal
 cross-platform HTTP server implemented in Tcl, so provides a good
 framework for including web-based user interfaces in packages.  The
 approach is similar to the use of the *brew*
-(http://CRAN.R-project.org/package=brew) package with Rapache
+(https://CRAN.R-project.org/package=brew) package with Rapache
 (http://rapache.net/) with the advantage of cross-platform support and
 easy installation.
 
-   The *Rook* (http://CRAN.R-project.org/package=Rook) package by
+   The *Rook* (https://CRAN.R-project.org/package=Rook) package by
 Jeffrey Horner provides a web server interface borrowing heavily from
 Ruby's Rack project.
 
@@ -1322,12 +1293,9 @@ with no programming or web designing background to quickly develop
 flexible and powerful online applications, websites, and psychometrics
 tests.  To maximize its reliability, security, and performance, Concerto
 relies on the popular and reliable open-source elements such as MySQL
-server (exchange and storage of the data), Rstudio (http://rstudio.org/)
-(R code designing and testing, file management), CKEditor (HTML Layer
-design), and PHP.
-
-   See <http://rwiki.sciviews.org/doku.php?id=faq-r#web_interfaces> for
-additional information.
+server (exchange and storage of the data), Rstudio
+(https://rstudio.org/) (R code designing and testing, file management),
+CKEditor (HTML Layer design), and PHP.
 
 5 R Add-On Packages
 *******************
@@ -1375,8 +1343,9 @@ The R distribution comes with the following packages:
 former *base* was split into the four packages *base*, *graphics*,
 *stats*, and *utils*.  Packages *ctest*, *eda*, *modreg*, *mva*, *nls*,
 *stepfun* and *ts* were merged into *stats*, package *lqs* returned to
-the recommended package *MASS* (http://CRAN.R-project.org/package=MASS),
-and package *mle* moved to *stats4*.
+the recommended package *MASS*
+(https://CRAN.R-project.org/package=MASS), and package *mle* moved to
+*stats4*.
 
 5.1.2 Add-on packages from CRAN
 -------------------------------
@@ -1431,7 +1400,7 @@ in all binary distributions of R.
    See the CRAN contributed packages page for more information.
 
    Many of these packages are categorized into CRAN Task Views
-(http://CRAN.R-project.org/web/views/), allowing to browse packages by
+(https://CRAN.R-project.org/web/views/), allowing to browse packages by
 topic and providing tools to automatically install all packages for
 special areas of interest.
 
@@ -1439,35 +1408,36 @@ special areas of interest.
 require additional software, or are shipping third party libraries for
 Windows cannot be made available on CRAN in form of a Windows binary
 packages.  Nevertheless, some of these packages are available at the
-"CRAN extras" repository at <http://www.stats.ox.ac.uk/pub/RWin/> kindly
-provided by Brian D. Ripley.  Note that this repository is a default
-repository for recent versions of R for Windows.
+"CRAN extras" repository at <https://www.stats.ox.ac.uk/pub/RWin/>
+kindly provided by Brian D. Ripley.  Note that this repository is a
+default repository for recent versions of R for Windows.
 
 5.1.3 Add-on packages from Omegahat
 -----------------------------------
 
-The Omega Project for Statistical Computing (http://www.omegahat.org/)
+The Omega Project for Statistical Computing (http://www.omegahat.net/)
 provides a variety of open-source software for statistical applications,
 with special emphasis on web-based software, Java, the Java virtual
 machine, and distributed computing.  A CRAN style R package repository
-is available via <http://www.omegahat.org/R/>.  See
-<http://www.omegahat.org/> for information on most R packages available
+is available via <http://www.omegahat.net/R/>.  See
+<http://www.omegahat.net/> for information on most R packages available
 from the Omega project.
 
 5.1.4 Add-on packages from Bioconductor
 ---------------------------------------
 
-Bioconductor (http://www.bioconductor.org/) is an open source and open
+Bioconductor (https://www.bioconductor.org/) is an open source and open
 development software project for the analysis and comprehension of
 genomic data.  Most Bioconductor components are distributed as R add-on
 packages.  Initially most of the Bioconductor software packages
-(http://www.bioconductor.org/packages/bioc/) focused primarily on DNA
-microarray data analysis.  As the project has matured, the functional
-scope of the software packages broadened to include the analysis of all
-types of genomic data, such as SAGE, sequence, or SNP data.  In
-addition, there are metadata (annotation, CDF and probe) and experiment
-data packages.  See <http://www.bioconductor.org/download/> for
-available packages and a complete taxonomy via BioC Views.
+(https://bioconductor.org/packages/release/BiocViews.html#___Software)
+focused primarily on DNA microarray data analysis.  As the project has
+matured, the functional scope of the software packages broadened to
+include the analysis of all types of genomic data, such as SAGE,
+sequence, or SNP data.  In addition, there are metadata (annotation, CDF
+and probe) and experiment data packages.  See
+<https://www.bioconductor.org/download/> for available packages and a
+complete taxonomy via BioC Views.
 
 5.1.5 Other add-on packages
 ---------------------------
@@ -1475,7 +1445,7 @@ available packages and a complete taxonomy via BioC Views.
 Many more packages are available from places other than the three
 default repositories discussed above (CRAN, Bioconductor and Omegahat).
 In particular, R-Forge provides a CRAN style repository at
-<http://R-Forge.R-project.org/>.
+<https://R-Forge.R-project.org/>.
 
    More code has been posted to the R-help mailing list, and can be
 obtained from the mailing list archive.
@@ -1614,7 +1584,7 @@ in.  Also, the developers do not have access to all possible machines
 capable of running R. So, simply using it and communicating problems is
 certainly of great value.
 
-   The R Developer Page (http://developer.R-project.org/) acts as an
+   The R Developer Page (https://developer.R-project.org/) acts as an
 intermediate repository for more or less finalized ideas and plans for
 the R statistical system.  It contains (pointers to) TODO lists, RFCs,
 various other writeups, ideas lists, and SVN miscellanea.
@@ -1657,15 +1627,14 @@ manipulating and editing saved transcripts, and re-evaluating commands
 from transcript files).
 
    The latest stable version of ESS is available via CRAN or the ESS web
-page (http://ESS.R-project.org/).  The HTML version of the documentation
-can be found at <http://stat.ethz.ch/ESS/>.
+page (https://ESS.R-project.org/).
 
    ESS comes with detailed installation instructions.
 
-   For help with ESS, send email to <ESS-help at stat.math.ethz.ch>.
+   For help with ESS, send email to <ESS-help at r-project.org>.
 
    Please send bug reports and suggestions on ESS to
-<ESS-bugs at stat.math.ethz.ch>.  The easiest way to do this from is within
+<ESS-bugs at r-project.org>.  The easiest way to do this from is within
 Emacs by typing 'M-x ess-submit-bug-report' or using the [ESS] or [iESS]
 pulldown menus.
 
@@ -1923,7 +1892,7 @@ codes).
 ===========================================
 
 The recommended package *lattice*
-(http://CRAN.R-project.org/package=lattice) (which is based on base
+(https://CRAN.R-project.org/package=lattice) (which is based on base
 package *grid*) provides graphical functionality that is compatible with
 most Trellis commands.
 
@@ -2049,17 +2018,17 @@ the language:
 7.15 Are GAMs implemented in R?
 ===============================
 
-Package *gam* (http://CRAN.R-project.org/package=gam) from CRAN
+Package *gam* (https://CRAN.R-project.org/package=gam) from CRAN
 implements all the Generalized Additive Models (GAM) functionality as
 described in the GAM chapter of the White Book.  In particular, it
 implements backfitting with both local regression and smoothing splines,
 and is extendable.  There is a 'gam()' function for GAMs in package
-*mgcv* (http://CRAN.R-project.org/package=mgcv), but it is not an exact
+*mgcv* (https://CRAN.R-project.org/package=mgcv), but it is not an exact
 clone of what is described in the White Book (no 'lo()' for example).
-Package *gss* (http://CRAN.R-project.org/package=gss) can fit
+Package *gss* (https://CRAN.R-project.org/package=gss) can fit
 spline-based GAMs too.  And if you can accept regression splines you can
 use 'glm()'.  For Gaussian GAMs you can use 'bruto()' from package *mda*
-(http://CRAN.R-project.org/package=mda).
+(https://CRAN.R-project.org/package=mda).
 
 7.16 Why is the output not printed when I source() a file?
 ==========================================================
@@ -2156,7 +2125,7 @@ Under a Unix-like, if your installation supports the 'type="cairo"'
 option to the 'png()' device there should be no problems, and the
 default settings should just work.  This option is not available for
 versions of R prior to 2.7.0, or without support for cairo.  From R
-2.7.0 'png()' by default uses the Quartz device on OS X, and that too
+2.7.0 'png()' by default uses the Quartz device on macOS, and that too
 works in batch mode.
 
    Earlier versions of the 'png()' device used the X11 driver, which is
@@ -2165,9 +2134,9 @@ Ghostscript you can use 'bitmap()', which produces a PostScript or PDF
 file then converts it to any bitmap format supported by Ghostscript.  On
 some installations this produces ugly output, on others it is perfectly
 satisfactory.  Many systems now come with Xvfb from X.Org
-(http://www.x.org/Downloads.html) (possibly as an optional install),
-which is an X11 server that does not require a screen; and there is the
-*GDD* (http://CRAN.R-project.org/package=GDD) package from CRAN, which
+(http://www.x.org/) (possibly as an optional install), which is an X11
+server that does not require a screen; and there is the *GDD*
+(https://CRAN.R-project.org/package=GDD) package from CRAN, which
 produces PNG, JPEG and GIF bitmaps without X11.
 
 7.20 How can I get command line editing to work?
@@ -2227,7 +2196,7 @@ without any of this messing about.
 The most likely reason is that you forgot to tell R to display the
 graph.  Lattice functions such as 'xyplot()' create a graph object, but
 do not display it (the same is true of *ggplot2*
-(http://CRAN.R-project.org/package=ggplot2) graphics, and Trellis
+(https://CRAN.R-project.org/package=ggplot2) graphics, and Trellis
 graphics in S-PLUS).  The 'print()' method for the graph object produces
 the actual display.  When you use these functions interactively at the
 command line, the result is automatically printed, but in 'source()' or
@@ -2355,32 +2324,49 @@ between package and library?:: for more information.
 =================================================
 
 The only numbers that can be represented exactly in R's numeric type are
-integers and fractions whose denominator is a power of 2.  Other numbers
-have to be rounded to (typically) 53 binary digits accuracy.  As a
-result, two floating point numbers will not reliably be equal unless
-they have been computed by the same algorithm, and not always even then.
-For example
+integers and fractions whose denominator is a power of 2.  All other
+numbers are internally rounded to (typically) 53 binary digits accuracy.
+As a result, two floating point numbers will not reliably be equal
+unless they have been computed by the same algorithm, and not always
+even then.  For example
 
      R> a <- sqrt(2)
      R> a * a == 2
      [1] FALSE
      R> a * a - 2
      [1] 4.440892e-16
+     R> print(a * a, digits = 18)
+     [1] 2.00000000000000044
 
    The function 'all.equal()' compares two objects using a numeric
 tolerance of '.Machine$double.eps ^ 0.5'.  If you want much greater
 accuracy than this you will need to consider error propagation
 carefully.
 
+   A discussion with many easily followed examples is in Appendix G
+"Computational Precision and Floating Point Arithmetic", pages 753-771
+of _Statistical Analysis and Data Display: An Intermediate Course with
+Examples in R_, Richard M. Heiberger and Burt Holland (Springer 2015,
+second edition).  This appendix is a free download from
+<http://link.springer.com/content/pdf/bbm%3A978-1-4939-2122-5%2F1.pdf>.
+
    For more information, see e.g. David Goldberg (1991), "What Every
 Computer Scientist Should Know About Floating-Point Arithmetic", _ACM
 Computing Surveys_, *23/1*, 5-48, also available via
 <http://www.validlab.com/goldberg/paper.pdf>.
 
-   To quote from "The Elements of Programming Style" by Kernighan and
-Plauger:
+   Here is another example, this time using addition:
 
-     _10.0 times 0.1 is hardly ever 1.0_.
+     R> .3 + .6 == .9
+     [1] FALSE
+     R> .3 + .6 - .9
+     [1] -1.110223e-16
+     R> print(matrix(c(.3,  .6,  .9, .3 + .6)), digits = 18)
+                          [,1]
+     [1,] 0.299999999999999989
+     [2,] 0.599999999999999978
+     [3,] 0.900000000000000022
+     [4,] 0.899999999999999911
 
 7.32 How can I capture or ignore errors in a long simulation?
 =============================================================
@@ -2461,7 +2447,7 @@ Acrobat Reader (cross platform)
      There are options in Preferences to enable/disable text smoothing,
      image smoothing and line art smoothing.  Disable line art
      smoothing.
-Preview (OS X)
+Preview (macOS)
      There is an option in Preferences to enable/disable anti-aliasing
      of text and line art.  Disable this option.
 GSview (cross platform)
@@ -2533,30 +2519,31 @@ quietly interpreted as just 'p'.  Current versions of R emit a warning.
 
 Some functions will display a particular kind of plot with error bars,
 such as the 'bar.err()' function in the *agricolae*
-(http://CRAN.R-project.org/package=agricolae) package, the 'plotCI()'
-function in the *gplots* (http://CRAN.R-project.org/package=gplots)
+(https://CRAN.R-project.org/package=agricolae) package, the 'plotCI()'
+function in the *gplots* (https://CRAN.R-project.org/package=gplots)
 package, the 'plotCI()' and 'brkdn.plot()' functions in the *plotrix*
-(http://CRAN.R-project.org/package=plotrix) package and the
+(https://CRAN.R-project.org/package=plotrix) package and the
 'error.bars()', 'error.crosses()' and 'error.bars.by()' functions in the
-*psych* (http://CRAN.R-project.org/package=psych) package.  Within these
-types of functions, some will accept the measures of dispersion (e.g.,
-'plotCI'), some will calculate the dispersion measures from the raw
-values ('bar.err', 'brkdn.plot'), and some will do both ('error.bars').
-Still other functions will just display error bars, like the dispersion
-function in the *plotrix* (http://CRAN.R-project.org/package=plotrix)
-package.  Most of the above functions use the 'arrows()' function in the
-base *graphics* package to draw the error bars.
+*psych* (https://CRAN.R-project.org/package=psych) package.  Within
+these types of functions, some will accept the measures of dispersion
+(e.g., 'plotCI'), some will calculate the dispersion measures from the
+raw values ('bar.err', 'brkdn.plot'), and some will do both
+('error.bars').  Still other functions will just display error bars,
+like the dispersion function in the *plotrix*
+(https://CRAN.R-project.org/package=plotrix) package.  Most of the above
+functions use the 'arrows()' function in the base *graphics* package to
+draw the error bars.
 
    The above functions all use the base graphics system.  The grid and
 lattice graphics systems also have specific functions for displaying
 error bars, e.g., the 'grid.arrow()' function in the *grid* package, and
 the 'geom_errorbar()', 'geom_errorbarh()', 'geom_pointrange()',
 'geom_linerange()', 'geom_crossbar()' and 'geom_ribbon()' functions in
-the *ggplot2* (http://CRAN.R-project.org/package=ggplot2) package.  In
+the *ggplot2* (https://CRAN.R-project.org/package=ggplot2) package.  In
 the lattice system, error bars can be displayed with 'Dotplot()' or
-'xYplot()' in the *Hmisc* (http://CRAN.R-project.org/package=Hmisc)
+'xYplot()' in the *Hmisc* (https://CRAN.R-project.org/package=Hmisc)
 package and 'segplot()' in the *latticeExtra*
-(http://CRAN.R-project.org/package=latticeExtra) package.
+(https://CRAN.R-project.org/package=latticeExtra) package.
 
 7.39 How do I create a plot with two y-axes?
 ============================================
@@ -2567,12 +2554,10 @@ the left and right sides of the plot that reflect the original scales of
 the data, is possible in R but is not recommended.  The basic approach
 for constructing such graphs is to use 'par(new=TRUE)' (see '?par');
 functions 'twoord.plot()' (in the *plotrix*
-(http://CRAN.R-project.org/package=plotrix) package) and
+(https://CRAN.R-project.org/package=plotrix) package) and
 'doubleYScale()' (in the *latticeExtra*
-(http://CRAN.R-project.org/package=latticeExtra) package) automate the
-process somewhat.  See
-<http://rwiki.sciviews.org/doku.php?id=tips:graphics-base:2yaxes> for
-more information, including strong arguments against this sort of graph.
+(https://CRAN.R-project.org/package=latticeExtra) package) automate the
+process somewhat.
 
 7.40 How do I access the source code for a function?
 ====================================================
@@ -2581,7 +2566,7 @@ In most cases, typing the name of the function will print its source
 code.  However, code is sometimes hidden in a namespace, or compiled.
 For a complete overview on how to access source code, see Uwe Ligges
 (2006), "Help Desk: Accessing the sources", _R News_, *6/4*, 43-45
-(<http://CRAN.R-project.org/doc/Rnews/Rnews_2006-4.pdf>).
+(<https://CRAN.R-project.org/doc/Rnews/Rnews_2006-4.pdf>).
 
 7.41 Why does summary() report strange results for the R^2 estimate when I fit a linear model with no intercept?
 ================================================================================================================
@@ -2656,10 +2641,54 @@ as strings or pairlists will be affected by this behavior, whereas large
 objects such as long vectors will be allocated using 'mmap' and thus not
 affected.  On Linux (and possibly other Unix-like systems) it is
 possible to use the 'mallinfo' system call (also see the mallinfo
-(http://rforge.net/mallinfo) package) to query the allocator about the
+(https://rforge.net/mallinfo) package) to query the allocator about the
 layout of the allocations, including the actually used memory as well as
 unused memory that cannot be released.
 
+7.43 How can I enable secure https downloads in R?
+==================================================
+
+When R transfers files over HTTP (e.g., using the 'install.packages()'
+or 'download.file()' function), a download method is chosen based on the
+'download.file.method' option.  There are several methods available and
+the default behavior if no option is explicitly specified is to use R's
+internal HTTP implementation.  In most circumstances this internal
+method will not support HTTPS URLs so you will need to override the
+default: this is done automatically for such URLs as from R 3.2.2.
+
+   R versions 3.2.0 and greater include two download methods
+('"libcurl"' and '"wininet"') that both support HTTPS connections: we
+recommend that you use these methods.  The requisite code to add to
+'.Rprofile' or 'Rprofile.site' is:
+
+     options(download.file.method = "wininet", url.method = "wininet")
+     (Windows)
+     options(download.file.method = "libcurl", url.method = "libcurl")
+     (Linux and macOS)
+
+(Method '"wininet"' is the default on Windows as from R 3.2.2.)
+
+   Note that the '"libcurl"' method may or may not have been compiled
+in.  In the case that it was not, i.e..  'capabilities("libcurl") ==
+FALSE', we recommend method '"wget"' on Linux and '"curl"' on macOS. It
+is possible that system versions of '"libcurl"', 'wget' or 'curl' may
+have been compiled without HTTPS support, but this is unlikely.  As from
+R 3.3.0 '"libcurl"' with HTTPS support is required except on Windows.
+
+7.44 How can I get CRAN package binaries for outdated versions of R?
+====================================================================
+
+Since March 2016, Windows and macOS binaries of CRAN packages for old
+versions of R (released more than 5 years ago) are made available from a
+central CRAN archive server instead of the CRAN mirrors.  To get these,
+one should set the CRAN "mirror" element of the 'repos' option
+accordingly, by something like
+     local({r <- getOption("repos")
+            r["CRAN"] <- "http://CRAN-archive.R-project.org"
+            options(repos = r)
+           })
+(see '?options' for more information).
+
 8 R Programming
 ***************
 
@@ -2811,7 +2840,7 @@ that might be expected to produce the bug but actually do not.  If you
 want to debug the problem and find exactly what caused it, that is
 wonderful.  You should still report the facts as well as any
 explanations or solutions.  Please include an example that reproduces
-(e.g., <http://en.wikipedia.org/wiki/Reproducibility>) the problem,
+(e.g., <https://en.wikipedia.org/wiki/Reproducibility>) the problem,
 preferably the simplest one you have found.
 
    Invoking R with the '--vanilla' option may help in isolating a bug.
@@ -2819,21 +2848,22 @@ This ensures that the site profile and saved data files are not read.
 
    Before you actually submit a bug report, you should check whether the
 bug has already been reported and/or fixed.  First, try the "Show open
-bugs new-to-old" or the search facility on <http://bugs.R-project.org/>.
-Second, consult <https://svn.R-project.org/R/trunk/doc/NEWS.Rd>, which
-records changes that will appear in the _next_ release of R, including
-bug fixes that do not appear on the Bug Tracker.  Third, if possible try
-the current r-patched or r-devel version of R. If a bug has already been
-reported or fixed, please do not submit further bug reports on it.
-Finally, check carefully whether the bug is with R, or a contributed
-package.  Bug reports on contributed packages should be sent first to
-the package maintainer, and only submitted to the R-bugs repository by
-package maintainers, mentioning the package in the subject line.
+bugs new-to-old" or the search facility on
+<https://bugs.R-project.org/>.  Second, consult
+<https://svn.R-project.org/R/trunk/doc/NEWS.Rd>, which records changes
+that will appear in the _next_ release of R, including bug fixes that do
+not appear on the Bug Tracker.  Third, if possible try the current
+r-patched or r-devel version of R. If a bug has already been reported or
+fixed, please do not submit further bug reports on it.  Finally, check
+carefully whether the bug is with R, or a contributed package.  Bug
+reports on contributed packages should be sent first to the package
+maintainer, and only submitted to the R-bugs repository by package
+maintainers, mentioning the package in the subject line.
 
    A bug report can be generated using the function 'bug.report()'.  For
 reports on R this will open the Web page at
-<http://bugs.R-project.org/>: for a contributed package it will open the
-package's bug tracker Web page or help you compose an email to the
+<https://bugs.R-project.org/>: for a contributed package it will open
+the package's bug tracker Web page or help you compose an email to the
 maintainer.
 
    There is a section of the bug repository for suggestions for
@@ -2848,7 +2878,7 @@ to <R-windows at R-project.org>.
    Corrections to and comments on message translations should be sent to
 the last translator (listed at the top of the appropriate '.po' file) or
 to the translation team as listed at
-<http://developer.R-project.org/TranslationTeams.html>.
+<https://developer.R-project.org/TranslationTeams.html>.
 
 10 Acknowledgments
 ******************
diff --git a/doc/Makefile.in b/doc/Makefile.in
index 1086eae..2abd921 100644
--- a/doc/Makefile.in
+++ b/doc/Makefile.in
@@ -11,7 +11,7 @@ subdir = doc
 include $(top_builddir)/Makeconf
 
 distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
-INSTFILES = AUTHORS COPYING COPYRIGHTS CRAN_mirrors.csv \
+INSTFILES = AUTHORS COPYING COPYRIGHTS CRAN_mirrors.csv BioC_mirrors.csv \
 	KEYWORDS KEYWORDS.db THANKS NEWS.0 NEWS.1 NEWS.2
 DISTFILES = Makefile.in Makefile.win $(INSTFILES) R.aux Rscript.1 \
   NEWS.Rd NEWS.2.Rd
@@ -28,6 +28,8 @@ all: Makefile R docs
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	@cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
 
+## FIXME:  NEWS.rds is needed by news() and hence in principle part of 'R', but
+##  it can only be built by R_EXE which at this point does not exist (if built from scratch)
 R: Makefile svnonly
 	@for d in $(SUBDIRS); do \
 	  (cd $${d} && $(MAKE) $@) || exit 1; \
@@ -45,10 +47,12 @@ R.1:
 	  $(top_builddir)/bin/R
 
 NEWS.rds: $(srcdir)/NEWS.Rd
-	@$(ECHO) "options(warn=1);saveRDS(tools:::prepare_Rd(tools::parse_Rd(\"$(srcdir)/NEWS.Rd\"), stages = 'install'), 'NEWS.rds')" | $(R_EXE)
+	@$(ECHO) "options(warn=1);saveRDS(tools:::prepare_Rd(tools::parse_Rd(\"$(srcdir)/NEWS.Rd\", \
+	  macros = \"../share/Rd/macros/system.Rd\"), stages = 'install', warningCalls = FALSE), \
+	  'NEWS.rds')" | $(R_EXE)
 
 NEWS: NEWS.rds
-	@$(ECHO) "creating NEWS"
+	@$(ECHO) "creating doc/NEWS"
 	@$(ECHO) 'options(warn=1);tools:::Rd2txt_NEWS_in_Rd("NEWS.rds", "NEWS")' |  $(R_EXE)
 
 html/NEWS.html: NEWS.rds
@@ -62,7 +66,7 @@ NEWS.pdf: NEWS.rds
 	@if test -z "$(PDFLATEX)"; then \
 	  $(ECHO) "'pdflatex' is needed to make NEWS.pdf but is missing on your system."; \
 	else \
-	 $(ECHO) "creating NEWS.pdf"; \
+	 $(ECHO) "creating doc/NEWS.pdf"; \
 	 $(ECHO) 'options(warn=1);tools:::Rd2pdf_NEWS_in_Rd("NEWS.rds", "NEWS.pdf")' |  LC_COLLATE=C $(R_EXE); \
 	fi
 
@@ -70,7 +74,9 @@ NEWS.pdf: NEWS.rds
 docs2: NEWS.2.rds NEWS.2.html NEWS.2.pdf
 
 NEWS.2.rds: $(srcdir)/NEWS.2.Rd
-	@$(ECHO) "options(warn=1);saveRDS(tools:::prepare_Rd(tools::parse_Rd(\"$(srcdir)/NEWS.2.Rd\"), stages = 'install'), 'NEWS.2.rds')" | $(R_EXE)
+	@$(ECHO) "options(warn=1);saveRDS(tools:::prepare_Rd(tools::parse_Rd(\"$(srcdir)/NEWS.2.Rd\", \
+	  macros = \"../share/Rd/macros/system.Rd\"), stages = 'install', warningCalls = FALSE), \
+	  'NEWS.2.rds')" | $(R_EXE)
 
 ## NB: this is only the top part of NEWS.2 in the sources.
 NEWS.2: NEWS.2.rds
diff --git a/doc/Makefile.win b/doc/Makefile.win
index 04a23f3..f1ba758 100644
--- a/doc/Makefile.win
+++ b/doc/Makefile.win
@@ -6,26 +6,30 @@ ECHO = echo
 
 include ../src/gnuwin32/MkRules
 
-R_EXE=../$(BINDIR)/Rterm --vanilla --slave
+R_EXE = ../$(BINDIR)/Rterm --vanilla --slave
 
 all: NEWS.rds html/NEWS.html NEWS NEWS.pdf \
   CHANGES.rds CHANGES html/CHANGES.html
 
 NEWS.rds: NEWS.Rd
-	@$(ECHO) "options(warn=1);saveRDS(tools:::prepare_Rd(tools::parse_Rd(\"$<\"), stages = \"install\"), \"$@\")" | $(R_EXE)
+	@$(ECHO) "options(warn=1);saveRDS(tools:::prepare_Rd(tools::parse_Rd(\"$<\", \
+	  macros = \"../share/Rd/macros/system.Rd\"), stages = \"install\", \
+	  warningCalls = FALSE), \"$@\")" | $(R_EXE)
 
 CHANGES.rds: ../src/gnuwin32/CHANGES.Rd
-	@$(ECHO) "options(warn=1);saveRDS(tools:::prepare_Rd(tools::parse_Rd(\"$<\"), stages = \"install\"), \"$@\")" | $(R_EXE)
+	@$(ECHO) "options(warn=1);saveRDS(tools:::prepare_Rd(tools::parse_Rd(\"$<\", \
+	  macros = \"../share/Rd/macros/system.Rd\"), stages = \"install\", \
+	  warningCalls = FALSE), \"$@\")" | $(R_EXE)
 
 ## Force ASCII output, for portability on Windows
 NEWS: NEWS.rds
-	@$(ECHO) "creating NEWS"
+	@$(ECHO) "creating doc/NEWS"
 	@$(ECHO) "options(warn=1);tools:::Rd2txt_NEWS_in_Rd(\"$<\", \"$@\")" | \
 	  $(R_EXE) LC_ALL=C
 
 ## Should be allowed to fail if pdflatex is not available
 NEWS.pdf: NEWS.rds
-	@$(ECHO) "creating NEWS.pdf"
+	@$(ECHO) "creating doc/NEWS.pdf"
 	-@$(ECHO) "options(warn=1);tools:::Rd2pdf_NEWS_in_Rd(\"$<\", \"$@\")" | \
 	  $(R_EXE)
 
diff --git a/doc/NEWS b/doc/NEWS
index 9589bff..314970e 100644
--- a/doc/NEWS
+++ b/doc/NEWS
@@ -1,5 +1,2907 @@
 R News
 
+CHANGES IN R 3.4.0:
+
+  SIGNIFICANT USER-VISIBLE CHANGES:
+
+    * (Unix-alike) The default methods for download.file() and url()
+      now choose "libcurl" except for file:// URLs.  There will be
+      small changes in the format and wording of messages, including in
+      rare cases if an issue is a warning or an error.  For example,
+      when HTTP re-direction occurs, some messages refer to the final
+      URL rather than the specified one.
+
+      Those who use proxies should check that their settings are
+      compatible (see ?download.file: the most commonly used forms work
+      for both "internal" and "libcurl").
+
+    * table() has been amended to be more internally consistent and
+      become back compatible to R <= 2.7.2 again.  Consequently,
+      table(1:2, exclude = NULL) no longer contains a zero count for
+      <NA>, but useNA = "always" continues to do so.
+
+    * summary.default() no longer rounds, but its print method does
+      resulting in less extraneous rounding, notably of numbers in the
+      ten thousands.
+
+    * factor(x, exclude = L) behaves more rationally when x or L are
+      character vectors.  Further, exclude = <factor> now behaves as
+      documented for long.
+
+    * Arithmetic, logic (&, |) and comparison (aka 'relational', e.g.,
+      <, ==) operations with arrays now behave consistently, notably
+      for arrays of length zero.
+
+      Arithmetic between length-1 arrays and longer non-arrays had
+      silently dropped the array attributes and recycled.  This now
+      gives a warning and will signal an error in the future, as it has
+      always for logic and comparison operations in these cases (e.g.,
+      compare matrix(1,1) + 2:3 and matrix(1,1) < 2:3).
+
+    * The JIT ('Just In Time') byte-code compiler is now enabled by
+      default at its level 3. This means functions will be compiled on
+      first or second use and top-level loops will be compiled and then
+      run.  (Thanks to Tomas Kalibera for extensive work to make this
+      possible.)
+
+      For now, the compiler will not compile code containing explicit
+      calls to browser(): this is to support single stepping from the
+      browser() call.
+
+      JIT compilation can be disabled for the rest of the session using
+      compiler::enableJIT(0) or by setting environment variable
+      R_ENABLE_JIT to 0.
+
+    * xtabs() works more consistently with NAs, also in its result no
+      longer setting them to 0.  Further, a new logical option addNA
+      allows to count NAs where appropriate.  Additionally, for the
+      case sparse = TRUE, the result's dimnames are identical to the
+      default case's.
+
+    * Matrix products now consistently bypass BLAS when the inputs have
+      NaN/Inf values. Performance of the check of inputs has been
+      improved. Performance when BLAS is used is improved for
+      matrix/vector and vector/matrix multiplication (DGEMV is now used
+      instead of DGEMM).
+
+      One can now choose from alternative matrix product
+      implementations _via_ options(matprod = ).  The "internal"
+      implementation is not optimized for speed but consistent in
+      precision with other summations in R (using long double
+      accumulators where available).  "blas" calls BLAS directly for
+      best speed, but usually with undefined behavior for inputs with
+      NaN/Inf.
+
+    * factor() now uses order() to sort its levels, not sort.list().
+      This makes factor() support custom vector-like objects if methods
+      for the appropriate generics are defined. This change has the
+      side effect of making factor() succeed on empty or length-one
+      non-atomic vector(-like) types (e.g., list), where it failed
+      before.
+
+  NEW FEATURES:
+
+    * User errors such as integrate(f, 0:1, 2) are now caught.
+
+    * Add signature argument to debug(), debugonce(), undebug() and
+      isdebugged() for more conveniently debugging S3 and S4 methods.
+      (Based on a patch by Gabe Becker.)
+
+    * Add utils::debugcall() and utils::undebugcall() for debugging the
+      function that would be called by evaluating the given expression.
+      When the call is to an S4 generic or standard S3 generic,
+      debugcall() debugs the method that would be dispatched. A number
+      of internal utilities were added to support this, most notably
+      utils::isS3stdGeneric().  (Based on a patch by Gabe Becker.)
+
+    * Add utils::strcapture(). Given a character vector and a regular
+      expression containing capture expressions, strcapture() will
+      extract the captured tokens into a tabular data structure,
+      typically a data.frame.
+
+    * str() and strOptions() get a new option drop.deparse.attr with
+      improved but _changed_ default behaviour for expressions.  For
+      expression objects x, str(x) now may remove extraneous white
+      space and truncate long lines.
+
+    * str(<looooooooong_string>) is no longer very slow; inspired by
+      Mikko Korpela's proposal in PR#16527.
+
+    * str(x)'s default method is more "accurate" and hence somewhat
+      more generous in displaying character vectors; this will
+      occasionally change R outputs (and need changes to some
+      *.Rout(.save) files).
+
+      For a classed integer vector such as x <- xtabs(~ c(1,9,9,9)),
+      str(x) now shows both the class and "int", instead of only the
+      latter.
+
+    * isSymmetric(m) is much faster for large asymmetric matrices m
+      _via_ pre-tests and a new option tol1 (with which strict back
+      compatibility is possible but not the default).
+
+    * The result of eigen() now is of class "eigen" in the default case
+      when eigenvectors are computed.
+
+    * Zero-length date and date-time objects (of classes "POSIX[cl]?t")
+      now print() "recognizably".
+
+    * xy.coords() and xyz.coords() get a new setLab option.
+
+    * The method argument of sort.list(), order() and sort.int() gains
+      an "auto" option (the default) which should behave the same as
+      before when method was not supplied.
+
+    * stopifnot(E, ..) now reports differences when E is a call to
+      all.equal() and that is not true.
+
+    * boxplot(<formula>, *) gain optional arguments drop, sep, and
+      lex.order to pass to split.default() which itself gains an
+      argument lex.order to pass to interaction() for more flexibility.
+
+    * The plot() method for ppr() has enhanced default labels (xmin and
+      main).
+
+    * sample.int() gains an explicit useHash option (with a back
+      compatible default).
+
+    * identical() gains an ignore.srcref option which drops "srcref"
+      and similar attributes when true (as by default).
+
+    * diag(x, nrow = n) now preserves typeof(x), also for logical,
+      integer and raw x (and as previously for complex and numeric).
+
+    * smooth.spline() now allows direct specification of lambda, gets a
+      hatvalues() method and keeps tol in the result, and optionally
+      parts of the internal matrix computations.
+
+    * addNA() is faster now, e.g. when applied twice.  (Part of
+      PR#16895.)
+
+    * New option rstandard(<lm>, type = "predicted") provides the
+      "PRESS"-related leave-one-out cross-validation errors for linear
+      models.
+
+    * After seven years of deprecation, duplicated factor levels now
+      produce a warning when printed and an error in levels<- instead
+      of a warning.
+
+    * Invalid factors, e.g., with duplicated levels (invalid but
+      constructable) now give a warning when printed, _via_ new
+      function .valid.factor().
+
+    * sessionInfo() has been updated for Apple's change in OS naming as
+      from '10.12' ('macOS Sierra' _vs_ 'OS X El Capitan').
+
+      Its toLatex() method now includes the running component.
+
+    * options(interrupt=) can be used to specify a default action for
+      user interrupts.  For now, if this option is not set and the
+      error option is set, then an unhandled user interrupt invokes the
+      error option.  (This may be dropped in the future as interrupt
+      conditions are not error conditions.)
+
+    * In most cases user interrupt handlers will be called with a
+      "resume" restart available.  Handlers can invoke this restart to
+      resume computation. At the browser prompt the r command will
+      invoke a "resume" restart if one is available. Some read
+      operations cannot be resumed properly when interrupted and do not
+      provide a "resume" restart.
+
+    * Radix sort is now chosen by method = "auto" for sort.int() for
+      double vectors (and hence used for sort() for unclassed double
+      vectors), excluding 'long' vectors.
+
+      sort.int(method = "radix") no longer rounds double vectors.
+
+    * The default and data.frame methods for stack() preserve the names
+      of empty elements in the levels of the ind column of the return
+      value.  Set the new drop argument to TRUE for the previous
+      behavior.
+
+    * Speedup in simplify2array() and hence sapply() and mapply() (for
+      the case of names and common length > 1), thanks to Suharto
+      Anggono's PR#17118.
+
+    * table(x, exclude = NULL) now sets useNA = "ifany" (instead of
+      "always").  Together with the bug fixes for this case, this
+      recovers more consistent behaviour compatible to older versions
+      of R.  As a consequence, summary() for a logical vector no longer
+      reports (zero) counts for NA when there are no NAs.
+
+    * dump.frames() gets a new option include.GlobalEnv which allows to
+      also dump the global environment, thanks to Andreas Kersting's
+      proposal in PR#17116.
+
+    * system.time() now uses message() instead of cat() when terminated
+      early, such that suppressMessages() has an effect; suggested by
+      Ben Bolker.
+
+    * citation() supports inst/CITATION files from package source
+      trees, with lib.loc pointing to the directory containing the
+      package.
+
+    * try() gains a new argument outFile with a default that can be
+      modified _via_ options(try.outFile = .), useful notably for
+      Sweave.
+
+    * The unexported low-level functions in package parallel for
+      passing serialized R objects to and from forked children now
+      support long vectors on 64-bit platforms.  This removes some
+      limits on higher-level functions such as mclapply() (but
+      returning gigabyte results from forked processes _via_
+      serialization should be avoided if at all possible).
+
+    * Connections now print() without error even if invalid, e.g. after
+      having been destroyed.
+
+    * apropos() and find(simple.words = FALSE) no longer match object
+      names starting with . which are known to be internal objects
+      (such as .__S3MethodsTable__.).
+
+    * Convenience function hasName() has been added; it is intended to
+      replace the common idiom !is.null(x$name) without the usually
+      unintended partial name matching.
+
+    * strcapture() no longer fixes column names nor coerces strings to
+      factors (suggested by Bill Dunlap).
+
+    * strcapture() returns NA for non-matching values in x (suggested
+      by Bill Dunlap).
+
+    * source() gets new optional arguments, notably exprs; this is made
+      use of in the new utility function withAutoprint().
+
+    * sys.source() gets a new toplevel.env argument.  This argument is
+      useful for frameworks running package tests; contributed by Tomas
+      Kalibera.
+
+    * Sys.setFileTime() and file.copy(copy.date = TRUE) will set
+      timestamps with fractions of seconds on platforms/filesystems
+      which support this.
+
+    * (Windows only.) file.info() now returns file timestamps including
+      fractions of seconds; it has done so on other platforms since R
+      2.14.0.  (NB: some filesystems do not record modification and
+      access timestamps to sub-second resolution.)
+
+    * The license check enabled by options(checkPackageLicense = TRUE)
+      is now done when the package's namespace is first loaded.
+
+    * ppr() and supsmu() get an optional trace argument, and ppr(..,
+      sm.method = ..spline) is no longer limited to sample size n <=
+      2500.
+
+    * The POSIXct method for print() gets optional tz and usetz
+      arguments, thanks to a report from Jennifer S. Lyon.
+
+    * New function check_packages_in_dir_details() in package tools for
+      analyzing package-check log files to obtain check details.
+
+    * Package tools now exports function CRAN_package_db() for
+      obtaining information about current packages in the CRAN package
+      repository, and several functions for obtaining the check status
+      of these packages.
+
+    * The (default) Stangle driver Rtangle allows annotate to be a
+      function and gets a new drop.evalFALSE option.
+
+    * The default method for quantile(x, prob) should now be monotone
+      in prob, even in border cases, see PR#16672.
+
+    * bug.report() now tries to extract an email address from a
+      BugReports field, and if there is none, from a Contacts field.
+
+    * The format() and print() methods for object.size() results get
+      new options standard and digits; notably, standard = "IEC" and
+      standard = "SI" allow more standard (but less common)
+      abbreviations than the default ones, e.g. for kilobytes.  (From
+      contributions by Henrik Bengtsson.)
+
+    * If a reference class has a validity method, validObject will be
+      called automatically from the default initialization method for
+      reference classes.
+
+    * tapply() gets new option default = NA allowing to change the
+      previously hardcoded value.
+
+    * read.dcf() now consistently interprets any 'whitespace' to be
+      stripped to include newlines.
+
+    * The maximum number of DLLs that can be loaded into R e.g. _via_
+      dyn.load() can now be increased by setting the environment
+      variable R_MAX_NUM_DLLS before starting R.
+
+    * Assigning to an element of a vector beyond the current length now
+      over-allocates by a small fraction. The new vector is marked
+      internally as growable, and the true length of the new vector is
+      stored in the truelength field. This makes building up a vector
+      result by assigning to the next element beyond the current length
+      more efficient, though pre-allocating is still preferred.  The
+      implementation is subject to change and not intended to be used
+      in packages at this time.
+
+    * Loading the parallel package namespace no longer sets or changes
+      the .Random.seed, even if R_PARALLEL_PORT is unset.
+
+      NB: This can break reproducibility of output, and did for a CRAN
+      package.
+
+    * Methods "wget" and "curl" for download.file() now give an R error
+      rather than a non-zero return value when the external command has
+      a non-zero status.
+
+    * Encoding name "utf8" is mapped to "UTF-8".  Many implementations
+      of iconv accept "utf8", but not GNU libiconv (including the late
+      2016 version 1.15).
+
+    * sessionInfo() shows the full paths to the library or executable
+      files providing the BLAS/LAPACK implementations currently in use
+      (not available on Windows).
+
+    * The binning algorithm used by bandwidth selectors bw.ucv(),
+      bw.bcv() and bw.SJ() switches to a version linear in the input
+      size n for n > nb/2.  (The calculations are the same, but for
+      larger n/nb it is worth doing the binning in advance.)
+
+    * There is a new option PCRE_study which controls when grep(perl =
+      TRUE) and friends 'study' the compiled pattern.  Previously this
+      was done for 11 or more input strings: it now defaults to 10 or
+      more (but most examples need many more for the difference from
+      studying to be noticeable).
+
+    * grep(perl = TRUE) and friends can now make use of PCRE's
+      Just-In-Time mechanism, for PCRE >= 8.20 on platforms where JIT
+      is supported.  It is used by default whenever the pattern is
+      studied (see the previous item).  (Based on a patch from Mikko
+      Korpela.)
+
+      This is controlled by a new option PCRE_use_JIT.
+
+      Note that in general this makes little difference to the speed,
+      and may take a little longer: its benefits are most evident on
+      strings of thousands of characters.  As a side effect it reduces
+      the chances of C stack overflow in the PCRE library on very long
+      strings (millions of characters, but see next item).
+
+      Warning: segfaults were seen using PCRE with JIT enabled on
+      64-bit Sparc builds.
+
+    * There is a new option PCRE_limit_recursion for grep(perl = TRUE)
+      and friends to set a recursion limit taking into account R's
+      estimate of the remaining C stack space (or 10000 if that is not
+      available).  This reduces the chance of C stack overflow, but
+      because it is conservative may report a non-match (with a
+      warning) in examples that matched before.  By default it is
+      enabled if any input string has 1000 or more bytes.  (PR#16757)
+
+    * getGraphicsEvent() now works on X11(type = "cairo") devices.
+      Thanks to Frederick Eaton (for reviving an earlier patch).
+
+    * There is a new argument onIdle for getGraphicsEvent(), which
+      allows an R function to be run whenever there are no pending
+      graphics events.  This is currently only supported on X11
+      devices.  Thanks to Frederick Eaton.
+
+    * The deriv() and similar functions now can compute derivatives of
+      log1p(), sinpi() and similar one-argument functions, thanks to a
+      contribution by Jerry Lewis.
+
+    * median() gains a formal ... argument, so methods with extra
+      arguments can be provided.
+
+    * strwrap() reduces indent if it is more than half width rather
+      than giving an error.  (Suggested by Bill Dunlap.)
+
+    * When the condition code in if(.) or while(.) is not of length
+      one, an error instead of a warning may be triggered by setting an
+      environment variable, see the help page.
+
+    * Formatting and printing of bibliography entries (bibentry) is
+      more flexible and better documented.  Apart from setting
+      options(citation.bibtex.max = 99) you can also use
+      print(<citation>, bibtex=TRUE) (or format(..)) to get the BibTeX
+      entries in the case of more than one entry.  This also affects
+      citation().  Contributions to enable style = "html+bibtex" are
+      welcome.
+
+  C-LEVEL FACILITIES:
+
+    * Entry points R_MakeExternalPtrFn and R_ExternalPtrFn are now
+      declared in header Rinternals.h to facilitate creating and
+      retrieving an R external pointer from a C function pointer
+      without ISO C warnings about the conversion of function pointers.
+
+    * There was an exception for the native Solaris C++ compiler to the
+      dropping (in R 3.3.0) of legacy C++ headers from headers such as
+      R.h and Rmath.h - this has now been removed.  That compiler has
+      strict C++98 compliance hence does not include extensions in its
+      (non-legacy) C++ headers: some packages will need to request
+      C++11 or replace non-C++98 calls such as lgamma: see SS1.6.4 of
+      'Writing R Extensions'.
+
+      Because it is needed by about 70 CRAN packages, headers R.h and
+      Rmath.h still declare
+      
+      use namespace std;
+
+      when included on Solaris.
+
+    * When included from C++, the R headers now use forms such as
+      std::FILE directly rather than including the line
+      
+      using std::FILE;
+
+      C++ code including these headers might be relying on the latter.
+
+    * Headers R_ext/BLAS.h and R_ext/Lapack.h have many improved
+      declarations including const for double-precision complex
+      routines. _Inter alia_ this avoids warnings when passing 'string
+      literal' arguments from C++11 code.
+
+    * Headers for Unix-only facilities R_ext/GetX11Image.h,
+      R_ext/QuartzDevice.h and R_ext/eventloop.h are no longer
+      installed on Windows.
+
+    * No-longer-installed headers GraphicsBase.h, RGraphics.h,
+      Rmodules/RX11.h and Rmodules/Rlapack.h which had a LGPL license
+      no longer do so.
+
+    * HAVE_UINTPTR_T is now defined where appropriate by Rconfig.h so
+      that it can be included before Rinterface.h when CSTACK_DEFNS is
+      defined and a C compiler (not C++) is in use.  Rinterface.h now
+      includes C header stdint.h or C++11 header cstdint where needed.
+
+    * Package tools has a new function
+      package_native_routine_registration_skeleton() to assist adding
+      native-symbol registration to a package.  See its help and SS5.4.1
+      of 'Writing R Extensions' for how to use it.  (At the time it was
+      added it successfully automated adding registration to over 90%
+      of CRAN packages which lacked it.  Many of the failures were
+      newly-detected bugs in the packages, e.g. 50 packages called
+      entry points with varying numbers of arguments and 65 packages
+      called entry points not in the package.)
+
+  INSTALLATION on a UNIX-ALIKE:
+
+    * readline headers (and not just the library) are required unless
+      configuring with --with-readline=no.
+
+    * configure now adds a compiler switch for C++11 code, even if the
+      compiler supports C++11 by default.  (This ensures that g++ 6.x
+      uses C++11 mode and not its default mode of C++14 with 'GNU
+      extensions'.)
+
+      The tests for C++11 compliance are now much more comprehensive.
+      For gcc < 4.8, the tests from R 3.3.0 are used in order to
+      maintain the same behaviour on Linux distributions with long-term
+      support.
+
+    * 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.
+
+    * configure now tests for a C++14-compliant compiler by testing
+      some basic features.  This by default tries flags for the
+      compiler specified by CXX11, but an alternative compiler, options
+      and standard can be specified by variables CXX14, CXX14FLAGS and
+      CXX14STD (e.g., -std=gnu++14).
+
+    * There is a new macro CXXSTD to help specify the standard for C++
+      code, e.g. -std=c++98.  This makes it easier to work with
+      compilers which default to a later standard: for example, with
+      CXX=g++6 CXXSTD=-std=c++98 configure will select commands for g++
+      6.x which conform to C++11 and C++14 where specified but
+      otherwise use C++98.
+
+    * Support for the defunct IRIX and OSF/1 OSes and Alpha CPU has
+      been removed.
+
+    * configure checks that the compiler specified by $CXX $CXXFLAGS is
+      able to compile C++ code.
+
+    * configure checks for the required header sys/select.h (or
+      sys/time.h on legacy systems) and system call select and aborts
+      if they are not found.
+
+    * If available, the POSIX 2008 system call utimensat will be used
+      by Sys.setFileTime() and file.copy(copy.date = TRUE).  This may
+      result in slightly more accurate file times.  (It is available on
+      Linux and FreeBSD but not macOS.)
+
+    * The minimum version requirement for libcurl has been reduced to
+      7.22.0, although at least 7.28.0 is preferred and earlier
+      versions are little tested.  (This is to support Debian 7
+      'Wheezy' LTS and Ubuntu 'Precise' 12.04 LTS, although the latter
+      is close to end-of-life.)
+
+    * configure tests for a C++17-compliant compiler.  The tests are
+      experimental and subject to change in the future.
+
+  INCLUDED SOFTWARE:
+
+    * (Windows only) Tcl/Tk version 8.6.4 is now included in the binary
+      builds.  The tcltk*.chm help file is no longer included; please
+      consult the online help at <URL: http://www.tcl.tk/man/> instead.
+
+    * The version of LAPACK included in the sources has been updated to
+      3.7.0: no new routines have been added to R.
+
+  PACKAGE INSTALLATION:
+
+    * There is support for compiling C++14 or C++17 code in packages on
+      suitable platforms: see 'Writing R Extensions' for how to request
+      this.
+
+    * The order of flags when LinkingTo other packages has been changed
+      so their include directories come earlier, before those specified
+      in CPPFLAGS.  This will only have an effect if non-system include
+      directories are included with -I flags in CPPFLAGS (and so not
+      the default -I/usr/local/include which is treated as a system
+      include directory on most platforms).
+
+    * Packages which register native routines for .C or .Fortran need
+      to be re-installed for this version (unless installed with
+      R-devel SVN revision r72375 or later).
+
+    * Make variables with names containing CXX1X are deprecated in
+      favour of those using CXX11, but for the time being are still
+      made available _via_ file etc/Makeconf.  Packages using them
+      should be converted to the new forms and made dependent on R (>=
+      3.4.0).
+
+  UTILITIES:
+
+    * Running R CMD check --as-cran with _R_CHECK_CRAN_INCOMING_REMOTE_
+      false now skips tests that require remote access.  The remaining
+      (local) tests typically run quickly compared to the remote tests.
+
+    * R CMD build will now give priority to vignettes produced from
+      files in the vignettes directory over those in the inst/doc
+      directory, with a warning that the latter are being ignored.
+
+    * R CMD config gains a --all option for printing names and values
+      of all basic configure variables.
+
+      It now knows about all the variables used for the C++98, C++11
+      and C++14 standards.
+
+    * R CMD check now checks that output files in inst/doc are newer
+      than the source files in vignettes.
+
+    * For consistency with other package subdirectories, files named
+      *.r in the tests directory are now recognized as tests by R CMD
+      check. (Wish of PR#17143.)
+
+    * R CMD build and R CMD check now use the _union_ of R_LIBS and
+      .libPaths().  They may not be equivalent, e.g., when the latter
+      is determined by R_PROFILE.
+
+    * R CMD build now preserves dates when it copies files in preparing
+      the tarball.  (Previously on Windows it changed the dates on all
+      files; on Unix, it changed some dates when installing vignettes.)
+
+    * The new option R CMD check --no-stop-on-test-error allows running
+      the remaining tests (under tests/) even if one gave an error.
+
+    * Check customization _via_ environment variables to detect side
+      effects of .Call() and .External() calls which alter their
+      arguments is described in SS8 of the 'R Internals' manual.
+
+    * R CMD check now checks any BugReports field to be non-empty and a
+      suitable single URL.
+
+    * R CMD check --as-cran now NOTEs if the package does not register
+      its native routines or does not declare its intentions on
+      (native) symbol search.  (This will become a WARNING in due
+      course.)
+
+  DEPRECATED AND DEFUNCT:
+
+    * (Windows only) Function setInternet2() is defunct.
+
+    * Installation support for readline emulations based on editline
+      (aka libedit) is deprecated.
+
+    * Use of the C/C++ macro NO_C_HEADERS is defunct and silently
+      ignored.
+
+    * unix.time(), a traditional synonym for system.time(), has been
+      deprecated.
+
+    * structure(NULL, ..) is now deprecated as you cannot set
+      attributes on NULL.
+
+    * Header Rconfig.h no longer defines SUPPORT_OPENMP; instead use
+      _OPENMP (as documented for a long time).
+
+    * (C-level Native routine registration.)  The deprecated styles
+      member of the R_CMethodDef and R_FortranMethodDef structures has
+      been removed.  Packages using these will need to be re-installed
+      for R 3.4.0.
+
+    * The deprecated support for PCRE versions older than 8.20 will be
+      removed in R 3.4.1. (Versions 8.20-8.31 will still be accepted
+      but remain deprecated.)
+
+  BUG FIXES:
+
+    * Getting or setting body() or formals() on non-functions for now
+      signals a warning and may become an error for setting.
+
+    * match(x, t), duplicated(x) and unique(x) work as documented for
+      complex numbers with NAs or NaNs, where all those containing NA
+      do match, whereas in the case of NaN's both real and imaginary
+      parts must match, compatibly with how print() and format() work
+      for complex numbers.
+
+    * deparse(<complex>, options = "digits17") prints more nicely now,
+      mostly thanks to a suggestion by Richie Cotton.
+
+    * Rotated symbols in plotmath expressions are now positioned
+      correctly on x11(type = "Xlib"). (PR#16948)
+
+    * as<-() avoids an infinite loop when a virtual class is interposed
+      between a subclass and an actual superclass.
+
+    * Fix level propagation in unlist() when the list contains
+      zero-length lists or factors.
+
+    * Fix S3 dispatch on S4 objects when the methods package is not
+      attached.
+
+    * Internal S4 dispatch sets .Generic in the method frame for
+      consistency with standardGeneric().  (PR#16929)
+
+    * Fix order(x, decreasing = TRUE) when x is an integer vector
+      containing MAX_INT.  Ported from a fix Matt Dowle made to
+      data.table.
+
+    * Fix caching by callNextMethod(), resolves PR#16973 and PR#16974.
+
+    * grouping() puts NAs last, to be consistent with the default
+      behavior of order().
+
+    * Point mass limit cases: qpois(-2, 0) now gives NaN with a warning
+      and qgeom(1, 1) is 0.  (PR#16972)
+
+    * table() no longer drops an "NaN" factor level, and better obeys
+      exclude = <chr>, thanks to Suharto Anggono's patch for PR#16936.
+      Also, in the case of exclude = NULL and NAs, these are tabulated
+      correctly (again).
+
+      Further, table(1:2, exclude = 1, useNA = "ifany") no longer
+      erroneously reports <NA> counts.
+
+      Additionally, all cases of empty exclude are equivalent, and
+      useNA is not overwritten when specified (as it was by exclude =
+      NULL).
+
+    * wilcox.test(x, conf.int=TRUE) no longer errors out in cases where
+      the confidence interval is not available, such as for x = 0:2.
+
+    * droplevels(f) now keeps <NA> levels when present.
+
+    * In integer arithmetic, NULL is now treated as integer(0) whereas
+      it was previously treated as double(0).
+
+    * The radix sort considers NA_real_ and NaN to be equivalent in
+      rank (like the other sort algorithms).
+
+    * When index.return=TRUE is passed to sort.int(), the radix sort
+      treats NAs like sort.list() does (like the other sort
+      algorithms).
+
+    * When in tabulate(bin, nbin) length(bin) is larger than the
+      maximal integer, the result is now of type double and hence no
+      longer silently overflows to wrong values.  (PR#17140)
+
+    * as.character.factor() respects S4 inheritance when checking the
+      type of its argument. (PR#17141)
+
+    * The factor method for print() no longer sets the class of the
+      factor to NULL, which would violate a basic constraint of an S4
+      object.
+
+    * formatC(x, flag = f) allows two new flags, and signals an error
+      for invalid flags also in the case of character formatting.
+
+    * Reading from file("stdin") now also closes the connection and
+      hence no longer leaks memory when reading from a full pipe,
+      thanks to G'abor Cs'ardi, see thread starting at <URL:
+      https://stat.ethz.ch/pipermail/r-devel/2016-November/073360.html>.
+
+    * Failure to create file in tempdir() for compressed pdf() graphics
+      device no longer errors (then later segfaults).  There is now a
+      warning instead of error and compression is turned off for the
+      device.  Thanks to Alec Wysoker (PR#17191).
+
+    * Asking for methods() on "|" returns only S3 methods. See <URL:
+      https://stat.ethz.ch/pipermail/r-devel/2016-December/073476.html>.
+
+    * dev.capture() using Quartz Cocoa device (macOS) returned invalid
+      components if the back-end chose to use ARGB instead of RGBA
+      image format. (Reported by Noam Ross.)
+
+    * seq("2", "5") now works too, equivalently to "2":"5" and
+      seq.int().
+
+    * seq.int(to = 1, by = 1) is now correct, other cases are integer
+      (instead of double) when seq() is integer too, and the
+      "non-finite" error messages are consistent between seq.default()
+      and seq.int(), no longer mentioning NaN etc.
+
+    * rep(x, times) and rep.int(x, times) now work when times is larger
+      than the largest value representable in an integer vector.
+      (PR#16932)
+
+    * download.file(method = "libcurl") does not check for URL
+      existence before attempting downloads; this is more robust to
+      servers that do not support HEAD or range-based retrieval, but
+      may create empty or incomplete files for aborted download
+      requests.
+
+    * Bandwidth selectors bw.ucv(), bw.bcv() and bw.SJ() now avoid
+      integer overflow for large sample sizes.
+
+    * str() no longer shows "list output truncated", in cases that list
+      was not shown at all.  Thanks to Neal Fultz (PR#17219)
+
+    * Fix for cairo_pdf() (and svg() and cairo_ps()) when replaying a
+      saved display list that contains a mix of grid and graphics
+      output.  (Report by Yihui Xie.)
+
+    * The str() and as.hclust() methods for "dendrogram" now also work
+      for deeply nested dendrograms thanks to non-recursive
+      implementations by Bradley Broom.
+
+    * sample() now uses two uniforms for added precision when the
+      uniform generator is Knuth-TAOCP, Knuth-TAOCP-2002, or a
+      user-defined generator and the population size is 2^25 or
+      greater.
+
+    * If a vignette in the vignettes directory is listed in
+      .Rbuildignore, R CMD build would not include it in the tarball,
+      but would include it in the vignette database, leading to a check
+      warning.  (PR#17246)
+
+    * tools::latexToUtf8() infinite looped on certain inputs.
+      (PR#17138)
+
+    * terms.formula() ignored argument names when determining whether
+      two terms were identical.  (PR#17235)
+
+    * callNextMethod() was broken when called from a method that
+      augments the formal arguments of a primitive generic.
+
+    * Coercion of an S4 object to a vector during sub-assignment into a
+      vector failed to dispatch through the as.vector() generic (often
+      leading to a segfault).
+
+    * Fix problems in command completion: Crash (PR#17222) and junk
+      display in Windows, handling special characters in filenames on
+      all systems.
+
+CHANGES IN R 3.3.3:
+
+  NEW FEATURES:
+
+    * Changes when redirection of a http:// URL to a https:// URL is
+      encountered:
+
+        * The internal methods of download.file() and url() now report
+          that they cannot follow this (rather than failing silently).
+
+        * (Unix-alike) download.file(method = "auto") (the default)
+          re-tries with method = "libcurl".
+
+        * (Unix-alike) url(method = "default") with an explicit open
+          argument re-tries with method = "libcurl".  This covers many
+          of the usages, e.g. readLines() with a URL argument.
+
+  INSTALLATION on a UNIX-ALIKE:
+
+    * The configure check for the zlib version is now robust to
+      versions longer than 5 characters, including 1.2.11.
+
+  UTILITIES:
+
+    * Environmental variable _R_CHECK_TESTS_NLINES_ controls how R CMD
+      check reports failing tests (see SS8 of the 'R Internals' manual).
+
+  DEPRECATED AND DEFUNCT:
+
+    * (C-level Native routine registration.)  The undocumented styles
+      field of the components of R_CMethodDef and R_FortranMethodDef is
+      deprecated.
+
+  BUG FIXES:
+
+    * vapply(x, *) now works with long vectors x.  (PR#17174)
+
+    * isS3method("is.na.data.frame") and similar are correct now.
+      (PR#17171)
+
+    * grepRaw(<long>, <short>, fixed = TRUE) now works, thanks to a
+      patch by Mikko Korpela.  (PR#17132)
+
+    * Package installation into a library where the package exists
+      _via_ symbolic link now should work wherever Sys.readlink()
+      works, resolving PR#16725.
+
+    * "Cincinnati" was missing an "n" in the precip dataset.
+
+    * Fix buffer overflow vulnerability in pdf() when loading an
+      encoding file.  Reported by Talos (TALOS-2016-0227).
+
+    * getDLLRegisteredRoutines() now produces its warning correctly
+      when multiple DLLs match, thanks to Matt Dowle's PR#17184.
+
+    * Sys.timezone() now returns non-NA also on platforms such as
+      Ubuntu 14.04.5 LTS, thanks to Mikko Korpela's PR#17186.
+
+    * format(x) for an illegal "POSIXlt" object x no longer segfaults.
+
+    * methods(f) now also works for f "(" or "{".
+
+    * (Windows only) dir.create() did not check the length of the path
+      to create, and so could overflow a buffer and crash R.
+      (PR#17206)
+
+    * On some systems, very small hexadecimal numbers in hex notation
+      would underflow to zero.  (PR#17199)
+
+    * pmin() and pmax() now work again for ordered factors and 0-length
+      S3 classed objects, thanks to Suharto Anggono's PR#17195 and
+      PR#17200.
+
+    * bug.report() did not do any validity checking on a package's
+      BugReports field.  It now ignores an empty field, removes leading
+      whitespace and only attempts to open http:// and https:// URLs,
+      falling back to emailing the maintainer.
+
+    * Bandwidth selectors bw.ucv() and bw.SJ() gave incorrect answers
+      or incorrectly reported an error (because of integer overflow)
+      for inputs longer than 46341.  Similarly for bw.bcv() at length
+      5793.
+
+      Another possible integer overflow is checked and may result in an
+      error report (rather than an incorrect result) for much longer
+      inputs (millions for a smooth distribution).
+
+    * findMethod() failed if the active signature had expanded beyond
+      what a particular package used. (Example with packages XR and
+      XRJulia on CRAN.)
+
+    * qbeta() underflowed too early in some very asymmetric cases.
+      (PR#17178)
+
+    * R CMD Rd2pdf had problems with packages with non-ASCII titles in
+      .Rd files (usually the titles were omitted).
+
+CHANGES IN R 3.3.2:
+
+  NEW FEATURES:
+
+    * extSoftVersion() now reports the version (if any) of the readline
+      library in use.
+
+    * The version of LAPACK included in the sources has been updated to
+      3.6.1, a bug-fix release including a speedup for the
+      non-symmetric case of eigen().
+
+    * Use options(deparse.max.lines=) to limit the number of lines
+      recorded in .Traceback and other deparsing activities.
+
+    * format(<AsIs>) looks more regular, also for non-character atomic
+      matrices.
+
+    * abbreviate() gains an option named = TRUE.
+
+    * The online documentation for package methods is extensively
+      rewritten.  The goals are to simplify documentation for basic
+      use, to note old features not recommended and to correct
+      out-of-date information.
+
+    * Calls to setMethod() no longer print a message when creating a
+      generic function in those cases where that is natural: S3
+      generics and primitives.
+
+  INSTALLATION and INCLUDED SOFTWARE:
+
+    * Versions of the readline library >= 6.3 had been changed so that
+      terminal window resizes were not signalled to readline: code has
+      been added using a explicit signal handler to work around that
+      (when R is compiled against readline >= 6.3).  (PR#16604)
+
+    * configure works better with Oracle Developer Studio 12.5.
+
+  UTILITIES:
+
+    * R CMD check reports more dubious flags in files
+      src/Makevars[.in], including -w and -g.
+
+    * R CMD check has been set up to filter important warnings from
+      recent versions of gfortran with -Wall -pedantic: this now
+      reports non-portable GNU extensions such as out-of-order
+      declarations.
+
+    * R CMD config works better with paths containing spaces, even
+      those of home directories (as reported by Ken Beath).
+
+  DEPRECATED AND DEFUNCT:
+
+    * Use of the C/C++ macro NO_C_HEADERS is deprecated (no C headers
+      are included by R headers from C++ as from R 3.3.0, so it should
+      no longer be needed).
+
+  BUG FIXES:
+
+    * The check for non-portable flags in R CMD check could be stymied
+      by src/Makevars files which contained targets.
+
+    * (Windows only) When using certain desktop themes in Windows 7 or
+      higher, Alt-Tab could cause Rterm to stop accepting input.
+      (PR#14406; patch submitted by Jan Gleixner.)
+
+    * pretty(d, ..) behaves better for date-time d (PR#16923).
+
+    * When an S4 class name matches multiple classes in the S4 cache,
+      perform a dynamic search in order to obey namespace imports.
+      This should eliminate annoying messages about multiple hits in
+      the class cache.  Also, pass along the package from the
+      ClassExtends object when looking up superclasses in the cache.
+
+    * sample(NA_real_) now works.
+
+    * Packages using non-ASCII encodings in their code did not install
+      data properly on systems using different encodings.
+
+    * merge(df1, df2) now also works for data frames with column names
+      "na.last", "decreasing", or "method".  (PR#17119)
+
+    * contour() caused a segfault if the labels argument had length
+      zero.  (Reported by Bill Dunlap.)
+
+    * unique(warnings()) works more correctly, thanks to a new
+      duplicated.warnings() method.
+
+    * findInterval(x, vec = numeric(), all.inside = TRUE) now returns
+      0s as documented.  (Reported by Bill Dunlap.)
+
+    * (Windows only) R CMD SHLIB failed when a symbol in the resulting
+      library had the same name as a keyword in the .def file.
+      (PR#17130)
+
+    * pmax() and pmin() now work with (more ?)  classed objects, such
+      as "Matrix" from the Matrix package, as documented for a long
+      time.
+
+    * axis(side, x = D) and hence Axis() and plot() now work correctly
+      for "Date" and time objects D, even when "time goes backward",
+      e.g., with decreasing xlim.  (Reported by William May.)
+
+    * str(I(matrix(..))) now looks as always intended.
+
+    * plot.ts(), the plot() method for time series, now respects cex,
+      lwd and lty.  (Reported by Greg Werbin.)
+
+    * parallel::mccollect() now returns a named list (as documented)
+      when called with wait = FALSE.  (Reported by Michel Lang.)
+
+    * If a package added a class to a class union in another package,
+      loading the first package gave erroneous warnings about
+      "undefined subclass".
+
+    * c()'s argument use.names is documented now, as belonging to the
+      (C internal) default method.  In "parallel", argument recursive
+      is also moved from the generic to the default method, such that
+      the formal argument list of base generic c() is just (...).
+
+    * rbeta(4, NA) and similarly rgamma() and rnbinom() now return
+      NaN's with a warning, as other r<dist>(), and as documented.
+      (PR#17155)
+
+    * Using options(checkPackageLicense = TRUE) no longer requires
+      acceptance of the licence for non-default standard packages such
+      as compiler.  (Reported by Mikko Korpela.)
+
+    * split(<very_long>, *) now works even when the split off parts are
+      long. (PR#17139)
+
+    * min() and max() now also work correctly when the argument list
+      starts with character(0).  (PR#17160)
+
+    * Subsetting very large matrices (prod(dim(.)) >= 2^31) now works
+      thanks to Michael Schubmehl's PR#17158.
+
+    * bartlett.test() used residual sums of squares instead of
+      variances, when the argument was a list of lm objects.  (Reported
+      by Jens Ledet Jensen).
+
+    * plot(<lm>, which = *) now correctly labels the contour lines for
+      the standardized residuals for which = 6.  It also takes the
+      correct p in case of singularities (also for which = 5).
+      (PR#17161)
+
+    * xtabs(~ exclude) no longer fails from wrong scope, thanks to
+      Suharto Anggono's PR#17147.
+
+    * Reference class calls to methods() did not re-analyse previously
+      defined methods, meaning that calls to methods defined later
+      would fail. (Reported by Charles Tilford).
+
+    * findInterval(x, vec, left.open = TRUE) misbehaved in some cases.
+      (Reported by Dmitriy Chernykh.)
+
+CHANGES IN R 3.3.1:
+
+  BUG FIXES:
+
+    * R CMD INSTALL and hence install.packages() gave an internal error
+      installing a package called description from a tarball on a
+      case-insensitive file system.
+
+    * match(x, t) (and hence x %in% t) failed when x was of length one,
+      and either character and x and t only differed in their Encoding
+      or when x and t where complex with NAs or NaNs.  (PR#16885.)
+
+    * unloadNamespace(ns) also works again when ns is a 'namespace', as
+      from getNamespace().
+
+    * rgamma(1, Inf) or rgamma(1, 0, 0) no longer give NaN but the
+      correct limit.
+
+    * length(baseenv()) is correct now.
+
+    * pretty(d, ..) for date-time d rarely failed when "halfmonth" time
+      steps were tried (PR#16923) and on 'inaccurate' platforms such as
+      32-bit Windows or a configuration with --disable-long-double; see
+      comment #15 of PR#16761.
+
+    * In text.default(x, y, labels), the rarely(?) used default for
+      labels is now correct also for the case of a 2-column matrix x
+      and missing y.
+
+    * as.factor(c(a = 1L)) preserves names() again as in R < 3.1.0.
+
+    * strtrim(""[0], 0[0]) now works.
+
+    * Use of Ctrl-C to terminate a reverse incremental search started
+      by Ctrl-R in the readline-based Unix terminal interface is now
+      supported when R was compiled against readline >= 6.0 (Ctrl-G
+      always worked).  (PR#16603)
+
+    * diff(<difftime>) now keeps the "units" attribute, as subtraction
+      already did, PR#16940.
+
+CHANGES IN R 3.3.0:
+
+  SIGNIFICANT USER-VISIBLE CHANGES:
+
+    * nchar(x, *)'s argument keepNA governing how the result for NAs in
+      x is determined, gets a new default keepNA = NA which returns NA
+      where x is NA, except for type = "width" which still returns 2,
+      the formatting / printing width of NA.
+
+    * All builds have support for https: URLs in the default methods
+      for download.file(), url() and code making use of them.
+
+      Unfortunately that cannot guarantee that any particular https:
+      URL can be accessed.  For example, server and client have to
+      successfully negotiate a cryptographic protocol (TLS/SSL, ...)
+      and the server's identity has to be verifiable _via_ the
+      available certificates.  Different access methods may allow
+      different protocols or use private certificate bundles: we
+      encountered a https: CRAN mirror which could be accessed by one
+      browser but not by another nor by download.file() on the same
+      Linux machine.
+
+  NEW FEATURES:
+
+    * The print method for methods() gains a byclass argument.
+
+    * New functions validEnc() and validUTF8() to give access to the
+      validity checks for inputs used by grep() and friends.
+
+    * Experimental new functionality for S3 method checking, notably
+      isS3method().
+
+      Also, the names of the R 'language elements' are exported as
+      character vector tools::langElts.
+
+    * str(x) now displays "Time-Series" also for matrix (multivariate)
+      time-series, i.e. when is.ts(x) is true.
+
+    * (Windows only) The GUI menu item to install local packages now
+      accepts *.tar.gz files as well as *.zip files (but defaults to
+      the latter).
+
+    * New programmeR's utility function chkDots().
+
+    * D() now signals an error when given invalid input, rather than
+      silently returning NA.  (Request of John Nash.)
+
+    * formula objects are slightly more "first class": e.g., formula()
+      or new("formula", y ~ x) are now valid.  Similarly, for "table",
+      "ordered" and "summary.table".  Packages defining S4 classes with
+      the above S3/S4 classes as slots should be reinstalled.
+
+    * New function strrep() for repeating the elements of a character
+      vector.
+
+    * rapply() preserves attributes on the list when how = "replace".
+
+    * New S3 generic function sigma() with methods for extracting the
+      estimated standard deviation aka "residual standard deviation"
+      from a fitted model.
+
+    * news() now displays R and package news files within the HTML help
+      system if it is available.  If no news file is found, a visible
+      NULL is returned to the console.
+
+    * as.raster(x) now also accepts raw arrays x assuming values in
+      0:255.
+
+    * Subscripting of matrix/array objects of type "expression" is now
+      supported.
+
+    * type.convert("i") now returns a factor instead of a complex value
+      with zero real part and missing imaginary part.
+
+    * Graphics devices cairo_pdf() and cairo_ps() now allow non-default
+      values of the cairographics 'fallback resolution' to be set.
+
+      This now defaults to 300 on all platforms: that is the default
+      documented by cairographics, but apparently was not used by all
+      system installations.
+
+    * file() gains an explicit method argument rather than implicitly
+      using getOption("url.method", "default").
+
+    * Thanks to a patch from Tomas Kalibera, x[x != 0] is now typically
+      faster than x[which(x != 0)] (in the case where x has no NAs, the
+      two are equivalent).
+
+    * read.table() now always uses the names for a named colClasses
+      argument (previously names were only used when colClasses was too
+      short). (In part, wish of PR#16478.)
+
+    * (Windows only) download.file() with default method = "auto" and a
+      ftps:// URL chooses "libcurl" if that is available.
+
+    * The out-of-the box Bioconductor mirror has been changed to one
+      using https://: use chooseBioCmirror() to choose a http:// mirror
+      if required.
+
+    * The data frame and formula methods for aggregate() gain a drop
+      argument.
+
+    * available.packages() gains a repos argument.
+
+    * The undocumented switching of methods for url() on https: and
+      ftps: URLs is confined to method = "default" (and documented).
+
+    * smoothScatter() gains a ret.selection argument.
+
+    * qr() no longer has a ... argument to pass additional arguments to
+      methods.
+
+    * [ has a method for class "table".
+
+    * It is now possible (again) to replayPlot() a display list
+      snapshot that was created by recordPlot() in a different R
+      session.
+
+      It is still not a good idea to use snapshots as a persistent
+      storage format for R plots, but it is now not completely silly to
+      use a snapshot as a format for transferring an R plot between two
+      R sessions.
+
+      The underlying changes mean that packages providing graphics
+      devices (e.g., Cairo, RSvgDevice, cairoDevice, tikzDevice) will
+      need to be reinstalled.
+
+      Code for restoring snapshots was contributed by Jeroen Ooms and
+      JJ Allaire.
+
+      Some testing code is available at <URL:
+      https://github.com/pmur002/R-display-list>.
+
+    * tools::undoc(dir = D) and codoc(dir = D) now also work when D is
+      a directory whose normalizePath()ed version does not end in the
+      package name, e.g. from a symlink.
+
+    * abbreviate() has more support for multi-byte character sets - it
+      no longer removes bytes within characters and knows about Latin
+      vowels with accents.  It is still only really suitable for (most)
+      European languages, and still warns on non-ASCII input.
+
+      abbreviate(use.classes = FALSE) is now implemented, and that is
+      more suitable for non-European languages.
+
+    * match(x, table) is faster (sometimes by an order of magnitude)
+      when x is of length one and incomparables is unchanged, thanks to
+      Peter Haverty (PR#16491).
+
+    * More consistent, partly not back-compatible behavior of NA and
+      NaN coercion to complex numbers, operations less often resulting
+      in complex NA (NA_complex_).
+
+    * lengths() considers methods for length and [[ on x, so it should
+      work automatically on any objects for which appropriate methods
+      on those generics are defined.
+
+    * The logic for selecting the default screen device on OS X has
+      been simplified: it is now quartz() if that is available even if
+      environment variable DISPLAY has been set by the user.
+
+      The choice can easily be overridden _via_ environment variable
+      R_INTERACTIVE_DEVICE.
+
+    * On Unix-like platforms which support the getline C library
+      function, system(*,intern = TRUE) no longer truncates (output)
+      lines longer than 8192 characters, thanks to Karl Millar.
+      (PR#16544)
+
+    * rank() gains a ties.method = "last" option, for convenience (and
+      symmetry).
+
+    * regmatches(invert = NA) can now be used to extract both
+      non-matched and matched substrings.
+
+    * data.frame() gains argument fix.empty.names; as.data.frame.list()
+      gets new cut.names, col.names and fix.empty.names.
+
+    * plot(x ~ x, *) now warns that it is the same as plot(x ~ 1, *).
+
+    * recordPlot() has new arguments load and attach to allow package
+      names to be stored as part of a recorded plot.  replayPlot() has
+      new argument reloadPkgs to load/attach any package names that
+      were stored as part of a recorded plot.
+
+    * S4 dispatch works within calls to .Internal(). This means
+      explicit S4 generics are no longer needed for unlist() and
+      as.vector().
+
+    * Only font family names starting with "Hershey" (and not "Her" as
+      before) are given special treatment by the graphics engine.
+
+    * S4 values are automatically coerced to vector (_via_ as.vector)
+      when subassigned into atomic vectors.
+
+    * findInterval() gets a left.open option.
+
+    * The version of LAPACK included in the sources has been updated to
+      3.6.0, including those 'deprecated' routines which were
+      previously included.  _Ca_ 40 double-complex routines have been
+      added at the request of a package maintainer.
+
+      As before, the details of what is included are in
+      src/modules/lapack/README and this now gives information on
+      earlier additions.
+
+    * tapply() has been made considerably more efficient without
+      changing functionality, thanks to proposals from Peter Haverty
+      and Suharto Anggono.  (PR#16640)
+
+    * match.arg(arg) (the one-argument case) is faster; so is
+      sort.int().  (PR#16640)
+
+    * The format method for object_size objects now also accepts
+      "binary" units such as "KiB" and e.g., "Tb".  (Partly from
+      PR#16649.)
+
+    * Profiling now records calls of the form foo::bar and some similar
+      cases directly rather than as calls to <Anonymous>.  Contributed
+      by Winston Chang.
+
+    * New string utilities startsWith(x, prefix) and endsWith(x,
+      suffix).  Also provide speedups for some grepl("^...",*) uses
+      (related to proposals in PR#16490).
+
+    * Reference class finalizers run at exit, as well as on garbage
+      collection.
+
+    * Avoid parallel dependency on stats for port choice and random
+      number seeds.  (PR#16668)
+
+    * The radix sort algorithm and implementation from data.table
+      (forder) replaces the previous radix (counting) sort and adds a
+      new method for order().  Contributed by Matt Dowle and Arun
+      Srinivasan, the new algorithm supports logical, integer (even
+      with large values), real, and character vectors.  It outperforms
+      all other methods, but there are some caveats (see ?sort).
+
+    * The order() function gains a method argument for choosing between
+      "shell" and "radix".
+
+    * New function grouping() returns a permutation that stably
+      rearranges data so that identical values are adjacent.  The
+      return value includes extra partitioning information on the
+      groups.  The implementation came included with the new radix
+      sort.
+
+    * rhyper(nn, m, n, k) no longer returns NA when one of the three
+      parameters exceeds the maximal integer.
+
+    * switch() now warns when no alternatives are provided.
+
+    * parallel::detectCores() now has default logical = TRUE on all
+      platforms - as this was the default on Windows, this change only
+      affects Sparc Solaris.
+
+      Option logical = FALSE is now supported on Linux and recent
+      versions of OS X (for the latter, thanks to a suggestion of Kyaw
+      Sint).
+
+    * hist() for "Date" or "POSIXt" objects would sometimes give
+      misleading labels on the breaks, as they were set to the day
+      before the start of the period being displayed.  The display
+      format has been changed, and the shift of the start day has been
+      made conditional on right = TRUE (the default).  (PR#16679)
+
+    * R now uses a new version of the logo (donated to the R Foundation
+      by RStudio).  It is defined in .svg format, so will resize
+      without unnecessary degradation when displayed on HTML
+      pages-there is also a vector PDF version.  Thanks to Dirk
+      Eddelbuettel for producing the corresponding X11 icon.
+
+    * New function .traceback() returns the stack trace which
+      traceback() prints.
+
+    * lengths() dispatches internally.
+
+    * dotchart() gains a pt.cex argument to control the size of points
+      separately from the size of plot labels.  Thanks to Michael
+      Friendly and Milan Bouchet-Valat for ideas and patches.
+
+    * as.roman(ch) now correctly deals with more diverse character
+      vectors ch; also arithmetic with the resulting roman numbers
+      works in more cases.  (PR#16779)
+
+    * prcomp() gains a new option rank. allowing to directly aim for
+      less than min(n,p) PC's.  The summary() and its print() method
+      have been amended, notably for this case.
+
+    * gzcon() gains a new option text, which marks the connection as
+      text-oriented (so e.g. pushBack() works).  It is still always
+      opened in binary mode.
+
+    * The import() namespace directive now accepts an argument except
+      which names symbols to exclude from the imports. The except
+      expression should evaluate to a character vector (after
+      substituting symbols for strings). See Writing R Extensions.
+
+    * New convenience function Rcmd() in package tools for invoking R
+      CMD tools from within R.
+
+    * New functions makevars_user() and makevars_site() in package
+      tools to determine the location of the user and site specific
+      Makevars files for customizing package compilation.
+
+  UTILITIES:
+
+    * R CMD check has a new option --ignore-vignettes for use with
+      non-Sweave vignettes whose VignetteBuilder package is not
+      available.
+
+    * R CMD check now by default checks code usage (_via_ codetools)
+      with only the base package attached.  Functions from default
+      packages other than base which are used in the package code but
+      not imported are reported as undefined globals, with a suggested
+      addition to the NAMESPACE file.
+
+    * R CMD check --as-cran now also checks DOIs in package CITATION
+      and Rd files.
+
+    * R CMD Rdconv and R CMD Rd2pdf each have a new option
+      --RdMacros=pkglist which allows Rd macros to be specified before
+      processing.
+
+  DEPRECATED AND DEFUNCT:
+
+    * The previously included versions of zlib, bzip2, xz and PCRE have
+      been removed, so suitable external (usually system) versions are
+      required (see the 'R Installation and Administration' manual).
+
+    * The unexported and undocumented Windows-only devices cairo_bmp(),
+      cairo_png() and cairo_tiff() have been removed.  (These devices
+      should be used as e.g. bmp(type = "cairo").)
+
+    * (Windows only) Function setInternet2() has no effect and will be
+      removed in due course.  The choice between methods "internal" and
+      "wininet" is now made by the method arguments of url() and
+      download.file() and their defaults can be set _via_ options.  The
+      out-of-the-box default remains "wininet" (as it has been since R
+      3.2.2).
+
+    * [<- with an S4 value into a list currently embeds the S4 object
+      into its own list such that the end result is roughly equivalent
+      to using [[<-.  That behavior is deprecated.  In the future, the
+      S4 value will be coerced to a list with as.list().
+
+    * Package tools' functions package.dependencies(), pkgDepends(),
+      etc are deprecated now, mostly in favor of package_dependencies()
+      which is both more flexible and efficient.
+
+  INSTALLATION and INCLUDED SOFTWARE:
+
+    * Support for very old versions of valgrind (e.g., 3.3.0) has been
+      removed.
+
+    * The included libtool script (generated by configure) has been
+      updated to version 2.4.6 (from 2.2.6a).
+
+    * libcurl version 7.28.0 or later with support for the https
+      protocol is required for installation (except on Windows).
+
+    * BSD networking is now required (except on Windows) and so
+      capabilities("http/ftp") is always true.
+
+    * configure uses pkg-config for PNG, TIFF and JPEG where this is
+      available.  This should work better with multiple installs and
+      with those using static libraries.
+
+    * The minimum supported version of OS X is 10.6 ('Snow Leopard'):
+      even that has been unsupported by Apple since 2012.
+
+    * The configure default on OS X is --disable-R-framework: enable
+      this if you intend to install under /Library/Frameworks and use
+      with R.app.
+
+    * The minimum preferred version of PCRE has since R 3.0.0 been 8.32
+      (released in Nov 2012).  Versions 8.10 to 8.31 are now deprecated
+      (with warnings from configure), but will still be accepted until
+      R 3.4.0.
+
+    * configure looks for C functions __cospi, __sinpi and __tanpi and
+      uses these if cospi _etc_ are not found.  (OS X is the main
+      instance.)
+
+    * (Windows) R is now built using gcc 4.9.3.  This build will
+      require recompilation of at least those packages that include C++
+      code, and possibly others.  A build of R-devel using the older
+      toolchain will be temporarily available for comparison purposes.
+
+      During the transition, the environment variable R_COMPILED_BY has
+      been defined to indicate which toolchain was used to compile R
+      (and hence, which should be used to compile code in packages).
+      The COMPILED_BY variable described below will be a permanent
+      replacement for this.
+
+    * (Windows) A make and R CMD config variable named COMPILED_BY has
+      been added.  This indicates which toolchain was used to compile R
+      (and hence, which should be used to compile code in packages).
+
+  PACKAGE INSTALLATION:
+
+    * The make macro AWK which used to be made available to files such
+      as src/Makefile is no longer set.
+
+  C-LEVEL FACILITIES:
+
+    * The API call logspace_sum introduced in R 3.2.0 is now remapped
+      as an entry point to Rf_logspace_sum, and its first argument has
+      gained a const qualifier.  (PR#16470)
+
+      Code using it will need to be reinstalled.
+
+      Similarly, entry point log1pexp also defined in Rmath.h is
+      remapped there to Rf_log1pexp
+
+    * R_GE_version has been increased to 11.
+
+    * New API call R_orderVector1, a faster one-argument version of
+      R_orderVector.
+
+    * When R headers such as R.h and Rmath.h are called from C++ code
+      in packages they include the C++ versions of system headers such
+      as <cmath> rather than the legacy headers such as <math.h>.
+      (Headers Rinternals.h and Rinterface.h already did, and inclusion
+      of system headers can still be circumvented by defining
+      NO_C_HEADERS, including as from this version for those two
+      headers.)
+
+      The manual has long said that R headers should *not* be included
+      within an extern "C" block, and almost all the packages affected
+      by this change were doing so.
+
+    * Including header S.h from C++ code would fail on some platforms,
+      and so gives a compilation error on all.
+
+    * The deprecated header Rdefines.h is now compatible with defining
+      R_NO_REMAP.
+
+    * The connections API now includes a function R_GetConnection()
+      which allows packages implementing connections to convert R
+      connection objects to Rconnection handles used in the API. Code
+      which previously used the low-level R-internal getConnection()
+      entry point should switch to the official API.
+
+  BUG FIXES:
+
+    * C-level asChar(x) is fixed for when x is not a vector, and it
+      returns "TRUE"/"FALSE" instead of "T"/"F" for logical vectors.
+
+    * The first arguments of .colSums() etc (with an initial dot) are
+      now named x rather than X (matching colSums()): thus error
+      messages are corrected.
+
+    * A coef() method for class "maov" has been added to allow vcov()
+      to work with multivariate results. (PR#16380)
+
+    * method = "libcurl" connections signal errors rather than
+      retrieving HTTP error pages (where the ISP reports the error).
+
+    * xpdrows.data.frame() was not checking for unique row names; in
+      particular, this affected assignment to non-existing rows _via_
+      numerical indexing. (PR#16570)
+
+    * tail.matrix() did not work for zero rows matrices, and could
+      produce row "labels" such as "[1e+05,]".
+
+    * Data frames with a column named "stringsAsFactors" now format and
+      print correctly.  (PR#16580)
+
+    * cor() is now guaranteed to return a value with absolute value
+      less than or equal to 1. (PR#16638)
+
+    * Array subsetting now keeps names(dim(.)).
+
+    * Blocking socket connection selection recovers more gracefully on
+      signal interrupts.
+
+    * The data.frame method of rbind() construction row.names works
+      better in borderline integer cases, but may change the names
+      assigned.  (PR#16666)
+
+    * (X11 only) getGraphicsEvent() miscoded buttons and missed mouse
+      motion events.  (PR#16700)
+
+    * methods(round) now also lists round.POSIXt.
+
+    * tar() now works with the default files = NULL.  (PR#16716)
+
+    * Jumps to outer contexts, for example in error recovery, now make
+      intermediate jumps to contexts where on.exit() actions are
+      established instead of trying to run all on.exit() actions before
+      jumping to the final target. This unwinds the stack gradually,
+      releases resources held on the stack, and significantly reduces
+      the chance of a segfault when running out of C stack space. Error
+      handlers established using withCallingHandlers() and
+      options("error") specifications are ignored when handling a C
+      stack overflow error as attempting one of these would trigger a
+      cascade of C stack overflow errors.  (These changes resolve
+      PR#16753.)
+
+    * The spacing could be wrong when printing a complex array.
+      (Report and patch by Lukas Stadler.)
+
+    * pretty(d, n, min.n, *) for date-time objects d works again in
+      border cases with large min.n, returns a labels attribute also
+      for small-range dates and in such cases its returned length is
+      closer to the desired n.  (PR#16761) Additionally, it finally
+      does cover the range of d, as it always claimed.
+
+    * tsp(x) <- NULL did not handle correctly objects inheriting from
+      both "ts" and "mts".  (PR#16769)
+
+    * install.packages() could give false errors when
+      options("pkgType") was "binary".  (Reported by Jose Claudio
+      Faria.)
+
+    * A bug fix in R 3.0.2 fixed problems with locator() in X11, but
+      introduced problems in Windows.  Now both should be fixed.
+      (PR#15700)
+
+    * download.file() with method = "wininet" incorrectly warned of
+      download file length difference when reported length was unknown.
+      (PR#16805)
+
+    * diag(NULL, 1) crashed because of missed type checking.
+      (PR#16853)
+
+CHANGES IN R 3.2.5:
+
+  BUG FIXES:
+
+    * format.POSIXlt() behaved incorrectly in R 3.2.4.  E.g. the output
+      of format(as.POSIXlt(paste0(1940:2000,"-01-01"), tz = "CET"),
+      usetz = TRUE) ended in two "CEST" time formats.
+
+CHANGES IN R 3.2.4:
+
+  NEW FEATURES:
+
+    * install.packages() and related functions now give a more
+      informative warning when an attempt is made to install a base
+      package.
+
+    * summary(x) now prints with less rounding when x contains infinite
+      values. (Request of PR#16620.)
+
+    * provideDimnames() gets an optional unique argument.
+
+    * shQuote() gains type = "cmd2" for quoting in cmd.exe in Windows.
+      (Response to PR#16636.)
+
+    * The data.frame method of rbind() gains an optional argument
+      stringsAsFactors (instead of only depending on
+      getOption("stringsAsFactors")).
+
+    * smooth(x, *) now also works for long vectors.
+
+    * tools::texi2dvi() has a workaround for problems with the texi2dvi
+      script supplied by texinfo 6.1.
+
+      It extracts more error messages from the LaTeX logs when in
+      emulation mode.
+
+  UTILITIES:
+
+    * R CMD check will leave a log file build_vignettes.log from the
+      re-building of vignettes in the .Rcheck directory if there is a
+      problem, and always if environment variable
+      _R_CHECK_ALWAYS_LOG_VIGNETTE_OUTPUT_ is set to a true value.
+
+  DEPRECATED AND DEFUNCT:
+
+    * Use of SUPPORT_OPENMP from header Rconfig.h is deprecated in
+      favour of the standard OpenMP define _OPENMP.
+
+      (This has been the recommendation in the manual for a while now.)
+
+    * The make macro AWK which is long unused by R itself but recorded
+      in file etc/Makeconf is deprecated and will be removed in R
+      3.3.0.
+
+    * The C header file S.h is no longer documented: its use should be
+      replaced by R.h.
+
+  BUG FIXES:
+
+    * kmeans(x, centers = <1-row>) now works. (PR#16623)
+
+    * Vectorize() now checks for clashes in argument names.  (PR#16577)
+
+    * file.copy(overwrite = FALSE) would signal a successful copy when
+      none had taken place.  (PR#16576)
+
+    * ngettext() now uses the same default domain as gettext().
+      (PR#14605)
+
+    * array(.., dimnames = *) now warns about non-list dimnames and,
+      from R 3.3.0, will signal the same error for invalid dimnames as
+      matrix() has always done.
+
+    * addmargins() now adds dimnames for the extended margins in all
+      cases, as always documented.
+
+    * heatmap() evaluated its add.expr argument in the wrong
+      environment.  (PR#16583)
+
+    * require() etc now give the correct entry of lib.loc in the
+      warning about an old version of a package masking a newer
+      required one.
+
+    * The internal deparser did not add parentheses when necessary,
+      e.g. before [] or [[]].  (Reported by Lukas Stadler; additional
+      fixes included as well).
+
+    * as.data.frame.vector(*, row.names=*) no longer produces
+      'corrupted' data frames from row names of incorrect length, but
+      rather warns about them.  This will become an error.
+
+    * url connections with method = "libcurl" are destroyed properly.
+      (PR#16681)
+
+    * withCallingHandler() now (again) handles warnings even during S4
+      generic's argument evaluation.  (PR#16111)
+
+    * deparse(..., control = "quoteExpressions") incorrectly quoted
+      empty expressions.  (PR#16686)
+
+    * format()ting datetime objects ("POSIX[cl]?t") could segfault or
+      recycle wrongly.  (PR#16685)
+
+    * plot.ts(<matrix>, las = 1) now does use las.
+
+    * saveRDS(*, compress = "gzip") now works as documented.
+      (PR#16653)
+
+    * (Windows only) The Rgui front end did not always initialize the
+      console properly, and could cause R to crash.  (PR#16698)
+
+    * dummy.coef.lm() now works in more cases, thanks to a proposal by
+      Werner Stahel (PR#16665).  In addition, it now works for
+      multivariate linear models ("mlm", manova) thanks to a proposal
+      by Daniel Wollschlaeger.
+
+    * The as.hclust() method for "dendrogram"s failed often when there
+      were ties in the heights.
+
+    * reorder() and midcache.dendrogram() now are non-recursive and
+      hence applicable to somewhat deeply nested dendrograms, thanks to
+      a proposal by Suharto Anggono in PR#16424.
+
+    * cor.test() now calculates very small p values more accurately
+      (affecting the result only in extreme not statistically relevant
+      cases).  (PR#16704)
+
+    * smooth(*, do.ends=TRUE) did not always work correctly in R
+      versions between 3.0.0 and 3.2.3.
+
+    * pretty(D) for date-time objects D now also works well if range(D)
+      is (much) smaller than a second.  In the case of only one unique
+      value in D, the pretty range now is more symmetric around that
+      value than previously.
+
+      Similarly, pretty(dt) no longer returns a length 5 vector with
+      duplicated entries for Date objects dt which span only a few
+      days.
+
+    * The figures in help pages such as ?points were accidentally
+      damaged, and did not appear in R 3.2.3.  (PR#16708)
+
+    * available.packages() sometimes deleted the wrong file when
+      cleaning up temporary files.  (PR#16712)
+
+    * The X11() device sometimes froze on Red Hat Enterprise Linux 6.
+      It now waits for MapNotify events instead of Expose events,
+      thanks to Siteshwar Vashisht. (PR#16497)
+
+    * [dpqr]nbinom(*, size=Inf, mu=.) now works as limit case, for
+      'dpq' as the Poisson.  (PR#16727)
+      pnbinom() no longer loops infinitely in border cases.
+
+    * approxfun(*, method="constant") and hence ecdf() which calls the
+      former now correctly "predict" NaN values as NaN.
+
+    * summary.data.frame() now displays NAs in Date columns in all
+      cases.  (PR#16709)
+
+CHANGES IN R 3.2.3:
+
+  NEW FEATURES:
+
+    * Some recently-added Windows time zone names have been added to
+      the conversion table used to convert these to Olson names.
+      (Including those relating to changes for Russia in Oct 2014, as
+      in PR#16503.)
+
+    * (Windows) Compatibility information has been added to the
+      manifests for Rgui.exe, Rterm.exe and Rscript.exe.  This should
+      allow win.version() and Sys.info() to report the actual Windows
+      version up to Windows 10.
+
+    * Windows "wininet" FTP first tries EPSV / PASV mode rather than
+      only using active mode (reported by Dan Tenenbaum).
+
+    * which.min(x) and which.max(x) may be much faster for logical and
+      integer x and now also work for long vectors.
+
+    * The 'emulation' part of tools::texi2dvi() has been somewhat
+      enhanced, including supporting quiet = TRUE.  It can be selected
+      by texi2dvi = "emulation".
+
+      (Windows) MiKTeX removed its texi2dvi.exe command in Sept 2015:
+      tools::texi2dvi() tries texify.exe if it is not found.
+
+    * (Windows only) Shortcuts for printing and saving have been added
+      to menus in Rgui.exe.  (Request of PR#16572.)
+
+    * loess(..., iterTrace=TRUE) now provides diagnostics for
+      robustness iterations, and the print() method for
+      summary(<loess>) shows slightly more.
+
+    * The included version of PCRE has been updated to 8.38, a bug-fix
+      release.
+
+    * View() now displays nested data frames in a more friendly way.
+      (Request with patch in PR#15915.)
+
+  INSTALLATION and INCLUDED SOFTWARE:
+
+    * The included configuration code for libintl has been updated to
+      that from gettext version 0.19.5.1 - this should only affect how
+      an external library is detected (and the only known instance is
+      under OpenBSD).  (Wish of PR#16464.)
+
+    * configure has a new argument --disable-java to disable the checks
+      for Java.
+
+    * The configure default for MAIN_LDFLAGS has been changed for the
+      FreeBSD, NetBSD and Hurd OSes to one more likely to work with
+      compilers other than gcc (FreeBSD 10 defaults to clang).
+
+    * configure now supports the OpenMP flags -fopenmp=libomp (clang)
+      and -qopenmp (Intel C).
+
+    * Various macros can be set to override the default behaviour of
+      configure when detecting OpenMP: see file config.site.
+
+    * Source installation on Windows has been modified to allow for
+      MiKTeX installations without texi2dvi.exe.  See file
+      MkRules.dist.
+
+  BUG FIXES:
+
+    * regexpr(pat, x, perl = TRUE) with Python-style named capture did
+      not work correctly when x contained NA strings.  (PR#16484)
+
+    * The description of dataset ToothGrowth has been
+      improved/corrected.  (PR#15953)
+
+    * model.tables(type = "means") and hence TukeyHSD() now support
+      "aov" fits without an intercept term.  (PR#16437)
+
+    * close() now reports the status of a pipe() connection opened with
+      an explicit open argument.  (PR#16481)
+
+    * Coercing a list without names to a data frame is faster if the
+      elements are very long. (PR#16467)
+
+    * (Unix-only) Under some rare circumstances piping the output from
+      Rscript or R -f could result in attempting to close the input
+      file twice, possibly crashing the process.  (PR#16500)
+
+    * (Windows) Sys.info() was out of step with win.version() and did
+      not report Windows 8.
+
+    * topenv(baseenv()) returns baseenv() again as in R 3.1.0 and
+      earlier.  This also fixes compilerJIT(3) when used in .Rprofile.
+
+    * detach()ing the methods package keeps .isMethodsDispatchOn()
+      true, as long as the methods namespace is not unloaded.
+
+    * Removed some spurious warnings from configure about the
+      preprocessor not finding header files.  (PR#15989)
+
+    * rchisq(*, df=0, ncp=0) now returns 0 instead of NaN, and
+      dchisq(*, df=0, ncp=*) also no longer returns NaN in limit cases
+      (where the limit is unique).  (PR#16521)
+
+    * pchisq(*, df=0, ncp > 0, log.p=TRUE) no longer underflows (for
+      ncp > ~60).
+
+    * nchar(x, "w") returned -1 for characters it did not know about
+      (e.g. zero-width spaces): it now assumes 1.  It now knows about
+      most zero-width characters and a few more double-width
+      characters.
+
+    * Help for which.min() is now more precise about behavior with
+      logical arguments.  (PR#16532)
+
+    * The print width of character strings marked as "latin1" or
+      "bytes" was in some cases computed incorrectly.
+
+    * abbreviate() did not give names to the return value if minlength
+      was zero, unlike when it was positive.
+
+    * (Windows only) dir.create() did not always warn when it failed to
+      create a directory.  (PR#16537)
+
+    * When operating in a non-UTF-8 multibyte locale (e.g. an East
+      Asian locale on Windows), grep() and related functions did not
+      handle UTF-8 strings properly.  (PR#16264)
+
+    * read.dcf() sometimes misread lines longer than 8191 characters.
+      (Reported by Herv'e Pag`es with a patch.)
+
+    * within(df, ..) no longer drops columns whose name start with a
+      ".".
+
+    * The built-in HTTP server converted entire Content-Type to
+      lowercase including parameters which can cause issues for
+      multi-part form boundaries (PR#16541).
+
+    * Modifying slots of S4 objects could fail when the methods package
+      was not attached. (PR#16545)
+
+    * splineDesign(*, outer.ok=TRUE) (splines) is better now
+      (PR#16549), and interpSpline() now allows sparse=TRUE for speedup
+      with non-small sizes.
+
+    * If the expression in the traceback was too long, traceback() did
+      not report the source line number.  (Patch by Kirill M"uller.)
+
+    * The browser did not truncate the display of the function when
+      exiting with options("deparse.max.lines") set.  (PR#16581)
+
+    * When bs(*, Boundary.knots=) had boundary knots inside the data
+      range, extrapolation was somewhat off.  (Patch by Trevor Hastie.)
+
+    * var() and hence sd() warn about factor arguments which are
+      deprecated now. (PR#16564)
+
+    * loess(*, weights = *) stored wrong weights and hence gave
+      slightly wrong predictions for newdata.  (PR#16587)
+
+    * aperm(a, *) now preserves names(dim(a)).
+
+    * poly(x, ..) now works when either raw=TRUE or coef is specified.
+      (PR#16597)
+
+    * data(package=*) is more careful in determining the path.
+
+    * prettyNum(*, decimal.mark, big.mark): fixed bug introduced when
+      fixing PR#16411.
+
+CHANGES IN R 3.2.2:
+
+  SIGNIFICANT USER-VISIBLE CHANGES:
+
+    * It is now easier to use secure downloads from https:// URLs on
+      builds which support them: no longer do non-default options need
+      to be selected to do so.  In particular, packages can be
+      installed from repositories which offer https:// URLs, and those
+      listed by setRepositories() now do so (for some of their
+      mirrors).
+
+      Support for https:// URLs is available on Windows, and on other
+      platforms if support for libcurl was compiled in and if that
+      supports the https protocol (system installations can be expected
+      to do).  So https:// support can be expected except on rather old
+      OSes (an example being OS X 'Snow Leopard', where a non-system
+      version of libcurl can be used).
+
+      (Windows only) The default method for accessing URLs _via_
+      download.file() and url() has been changed to be "wininet" using
+      Windows API calls.  This changes the way proxies need to be set
+      and security settings made: there have been some reports of ftp:
+      sites being inaccessible under the new default method (but the
+      previous methods remain available).
+
+  NEW FEATURES:
+
+    * cmdscale() gets new option list. for increased flexibility when a
+      list should be returned.
+
+    * configure now supports texinfo version 6.0, which (unlike the
+      change from 4.x to 5.0) is a minor update.  (Wish of PR#16456.)
+
+    * (Non-Windows only) download.file() with default method = "auto"
+      now chooses "libcurl" if that is available and a https:// or
+      ftps:// URL is used.
+
+    * (Windows only) setInternet2(TRUE) is now the default.  The
+      command-line option --internet2 and environment variable
+      R_WIN_INTERNET2 are now ignored.
+
+      Thus by default the "internal" method for download.file() and
+      url() uses the "wininet" method: to revert to the previous
+      default use setInternet2(FALSE).
+
+      This means that https:// URLs can be read by default by
+      download.file() (they have been readable by file() and url()
+      since R 3.2.0).
+
+      There are implications for how proxies need to be set (see
+      ?download.file).
+
+    * chooseCRANmirror() and chooseBioCmirror() now offer HTTPS mirrors
+      in preference to HTTP mirrors.  This changes the interpretation
+      of their ind arguments: see their help pages.
+
+    * capture.output() gets optional arguments type and split to pass
+      to sink(), and hence can be used to capture messages.
+
+  C-LEVEL FACILITIES:
+
+    * Header Rconfig.h now defines HAVE_ALLOCA_H if the platform has
+      the alloca.h header (it is needed to define alloca on Solaris and
+      AIX, at least: see 'Writing R Extensions' for how to use it).
+
+  INSTALLATION and INCLUDED SOFTWARE:
+
+    * The libtool script generated by configure has been modified to
+      support FreeBSD >= 10 (PR#16410).
+
+  BUG FIXES:
+
+    * The HTML help page links to demo code failed due to a change in R
+      3.2.0.  (PR#16432)
+
+    * If the na.action argument was used in model.frame(), the original
+      data could be modified. (PR#16436)
+
+    * getGraphicsEvent() could cause a crash if a graphics window was
+      closed while it was in use. (PR#16438)
+
+    * matrix(x, nr, nc, byrow = TRUE) failed if x was an object of type
+      "expression".
+
+    * strptime() could overflow the allocated storage on the C stack
+      when the timezone had a non-standard format much longer than the
+      standard formats. (Part of PR#16328.)
+
+    * options(OutDec = s) now signals a warning (which will become an
+      error in the future) when s is not a string with exactly one
+      character, as that has been a documented requirement.
+
+    * prettyNum() gains a new option input.d.mark which together with
+      other changes, e.g., the default for decimal.mark, fixes some
+      format()ting variants with non-default getOption("OutDec") such
+      as in PR#16411.
+
+    * download.packages() failed for type equal to either "both" or
+      "binary".  (Reported by Dan Tenenbaum.)
+
+    * The dendrogram method of labels() is much more efficient for
+      large dendrograms, now using rapply().  (Comment #15 of PR#15215)
+
+    * The "port" algorithm of nls() could give spurious errors.
+      (Reported by Radford Neal.)
+
+    * Reference classes that inherited from reference classes in
+      another package could invalidate methods of the inherited class.
+      Fixing this requires adding the ability for methods to be
+      "external", with the object supplied explicitly as the first
+      argument, named .self. See "Inter-Package Superclasses" in the
+      documentation.
+
+    * readBin() could fail on the SPARC architecture due to alignment
+      issues.  (Reported by Radford Neal.)
+
+    * qt(*, df=Inf, ncp=.) now uses the natural qnorm() limit instead
+      of returning NaN. (PR#16475)
+
+    * Auto-printing of S3 and S4 values now searches for print() in the
+      base namespace and show() in the methods namespace instead of
+      searching the global environment.
+
+    * 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.
+
+    * rhyper(nn, <large>) now works correctly. (PR#16489)
+
+    * ttkimage() did not (and could not) work so was removed. Ditto for
+      tkimage.cget() and tkimage.configure(). Added two Ttk widgets and
+      missing subcommands for Tk's image command: ttkscale(),
+      ttkspinbox(), tkimage.delete(), tkimage.height(),
+      tkimage.inuse(), tkimage.type(), tkimage.types(),
+      tkimage.width(). (PR#15372, PR#16450)
+
+    * getClass("foo") now also returns a class definition when it is
+      found in the cache more than once.
+
+CHANGES IN R 3.2.1:
+
+  NEW FEATURES:
+
+    * utf8ToInt() now checks that its input is valid UTF-8 and returns
+      NA if it is not.
+
+    * install.packages() now allows type = "both" with repos = NULL if
+      it can infer the type of file.
+
+    * nchar(x, *) and nzchar(x) gain a new argument keepNA which
+      governs how the result for NAs in x is determined.  For nzchar()
+      in general and nchar() in the R 3.2.x series, the default remains
+      FALSE which is fully back compatible.  From R 3.3.0, nchar()'s
+      default will change to keepNA = NA and you are advised to
+      consider this for code portability.
+
+    * news() more flexibly extracts dates from package NEWS.Rd files.
+
+    * lengths(x) now also works (trivially) for atomic x and hence can
+      be used more generally as an efficient replacement of sapply(x,
+      length) and similar.
+
+    * The included version of PCRE has been updated to 8.37, a bug-fix
+      release.
+
+    * diag() no longer duplicates a matrix when extracting its
+      diagonal.
+
+    * as.character.srcref() gains an argument to allow characters
+      corresponding to a range of source references to be extracted.
+
+  BUG FIXES:
+
+    * acf() and ccf() now guarantee values strictly in [-1,1] (instead
+      of sometimes very slightly outside). PR#15832.
+
+    * as.integer("111111111111") now gives NA (with a warning) as it
+      does for the corresponding numeric or negative number coercions.
+      Further, as.integer(M + 0.1) now gives M (instead of NA) when M
+      is the maximal representable integer.
+
+    * On some platforms nchar(x, "c") and nchar(x, "w") would return
+      values (possibly NA) for inputs which were declared to be UTF-8
+      but were not, or for invalid strings without a marked encoding in
+      a multi-byte locale, rather than give an error.  Additional
+      checks have been added to mitigate this.
+
+    * apply(a, M, function(u) c(X = ., Y = .)) again has dimnames
+      containing "X" and "Y" (as in R < 3.2.0).
+
+    * (Windows only) In some cases, the --clean option to R CMD INSTALL
+      could fail.  (PR#16178)
+
+    * (Windows only) choose.files() would occasionally include
+      characters from the result of an earlier call in the result of a
+      later one.  (PR#16270)
+
+    * A change in RSiteSearch() in R 3.2.0 caused it to submit invalid
+      URLs.  (PR#16329)
+
+    * Rscript and command line R silently ignored incomplete statements
+      at the end of a script; now they are reported as parse errors.
+      (PR#16350)
+
+    * Parse data for very long strings was not stored.  (PR#16354)
+
+    * plotNode(), the workhorse of the plot method for "dendrogram"s is
+      no longer recursive, thanks to Suharto Anggono, and hence also
+      works for deeply nested dendrograms.  (PR#15215)
+
+    * The parser could overflow internally when given numbers in
+      scientific format with extremely large exponents.  (PR#16358)
+
+    * If the CRAN mirror was not set, install.packages(type = "both")
+      and related functions could repeatedly query the user for it.
+      (Part of PR#16362)
+
+    * The low-level functions .rowSums() etc. did not check the length
+      of their argument, so could segfault. (PR#16367)
+
+    * The quietly argument of library() is now correctly propagated
+      from .getRequiredPackages2().
+
+    * Under some circumstances using the internal PCRE when building R
+      from source would cause external libs such as -llzma to be
+      omitted from the main link.
+
+    * The .Primitive default methods of the logic operators, i.e., !, &
+      and |, now give correct error messages when appropriate, e.g.,
+      for `&`(TRUE) or `!`().  (PR#16385)
+
+    * cummax(x) now correctly propagates NAs also when x is of type
+      integer and begins with an NA.
+
+    * summaryRprof() could fail when the profile contained only two
+      records.  (PR#16395)
+
+    * HTML vignettes opened using vignette() did not support links into
+      the rest of the HTML help system.  (Links worked properly when
+      the vignette was opened using browseVignettes() or from within
+      the help system.)
+
+    * arima(*, xreg = .) (for d >= 1) computes estimated variances
+      based on a the number of effective observations as in R version
+      3.0.1 and earlier.  (PR#16278)
+
+    * slotNames(.) is now correct for "signature" objects (mostly used
+      internally in methods).
+
+    * On some systems, the first string comparison after a locale
+      change would result in NA.
+
+CHANGES IN R 3.2.0:
+
+  NEW FEATURES:
+
+    * anyNA() gains a recursive argument.
+
+    * When x is missing and names is not false (including the default
+      value), Sys.getenv(x, names) returns an object of class "Dlist"
+      and hence prints tidily.
+
+    * (Windows.)  shell() no longer consults the environment variable
+      SHELL: too many systems have been encountered where it was set
+      incorrectly (usually to a path where software was compiled, not
+      where it was installed).  R_SHELL, the preferred way to select a
+      non-default shell, can be used instead.
+
+    * Some unusual arguments to embedFonts() can now be specified as
+      character vectors, and the defaults have been changed
+      accordingly.
+
+    * Functions in the Summary group duplicate less.  (PR#15798)
+
+    * (Unix-alikes.) system(cmd, input = ) now uses
+      'shell-execution-environment' redirection, which will be more
+      natural if cmd is not a single command (but requires a
+      POSIX-compliant shell). (Wish of PR#15508)
+
+    * read.fwf() and read.DIF() gain a fileEncoding argument, for
+      convenience.
+
+    * Graphics devices can add attributes to their description in
+      .Device and .Devices.  Several of those included with R use a
+      "filepath" attribute.
+
+    * pmatch() uses hashing in more cases and so is faster at the
+      expense of using more memory. (PR#15697)
+
+    * pairs() gains new arguments to select sets of variables to be
+      plotted against each other.
+
+    * file.info(, extra_cols = FALSE) allows a minimal set of columns
+      to be computed on Unix-alikes: on some systems without
+      properly-configured caching this can be significantly faster with
+      large file lists.
+
+    * New function dir.exists() in package base to test efficiently
+      whether one or more paths exist and are directories.
+
+    * dput() and friends gain new controls hexNumeric and digits17
+      which output double and complex quantities as, respectively,
+      binary fractions (exactly, see sprintf("%a")) and as decimals
+      with up to 17 significant digits.
+
+    * save(), saveRDS() and serialize() now support ascii = NA which
+      writes ASCII files using sprintf("%a") for double/complex
+      quantities.  This is read-compatible with ascii = TRUE but avoids
+      binary->decimal->binary conversions with potential loss of
+      precision.  Unfortunately the Windows C runtime's lack of C99
+      compliance means that the format cannot be read correctly there
+      in R before 3.1.2.
+
+    * The default for formatC(decimal.mark =) has been changed to be
+      getOption("OutDec"); this makes it more consistent with format()
+      and suitable for use in print methods, e.g. those for classes
+      "density", "ecdf", "stepfun" and "summary.lm".
+
+      getOption("OutDec") is now consulted by the print method for
+      class "kmeans", by cut(), dendrogram(), plot.ts() and quantile()
+      when constructing labels and for the report from legend(trace =
+      TRUE).
+
+      (In part, wish of PR#15819.)
+
+    * printNum() and hence format() and formatC() give a warning if
+      big.mark and decimal.mark are set to the same value (period and
+      comma are not uncommonly used for each, and this is a check that
+      conventions have not got mixed).
+
+    * merge() can create a result which uses long vectors on 64-bit
+      platforms.
+
+    * dget() gains a new argument keep.source which defaults to FALSE
+      for speed (dput() and dget() are most often used for data objects
+      where this can make dget() many times faster).
+
+    * Packages may now use a file of common macro definitions in their
+      help files, and may import definitions from other packages.
+
+    * A number of macros have been added in the new share/Rd directory
+      for use in package overview help pages, and promptPackage() now
+      makes use of them.
+
+    * tools::parse_Rd() gains a new permissive argument which converts
+      unrecognized macros into text.  This is used by
+      utils:::format.bibentry to allow LaTeX markup to be ignored.
+
+    * options(OutDec =) can now specify a multi-byte character, e.g.,
+      options(OutDec = "\u00b7") in a UTF-8 locale.
+
+    * is.recursive(x) is no longer true when x is an external pointer,
+      a weak reference or byte code; the first enables all.equal(x, x)
+      when x <- getClass(.).
+
+    * ls() (aka objects()) and as.list.environment() gain a new
+      argument sorted.
+
+    * The "source" attribute (which has not been added to functions by
+      R since before R version 2.14.0) is no longer treated as special.
+
+    * Function returnValue() has been added to give on.exit() code
+      access to a function's return value for debugging purposes.
+
+    * crossprod(x, y) allows more matrix coercions when x or y are
+      vectors, now equalling t(x) %*% y in these cases (also reported
+      by Radford Neal).  Similarly, tcrossprod(x,y) and %*% work in
+      more cases with vector arguments.
+
+    * Utility function dynGet() useful for detecting cycles, aka
+      infinite recursions.
+
+    * The byte-code compiler and interpreter include new instructions
+      that allow many scalar subsetting and assignment and scalar
+      arithmetic operations to be handled more efficiently. This can
+      result in significant performance improvements in scalar
+      numerical code.
+
+    * apply(m, 2, identity) is now the same as the matrix m when it has
+      _named_ row names.
+
+    * A new function debuggingState() has been added, allowing to
+      temporarily turn off debugging.
+
+    * example() gets a new optional argument run.donttest and
+      tools::Rd2ex() a corresponding commentDonttest, with a default
+      such that example(..) in help examples will run \donttest code
+      only if used interactively (a change in behaviour).
+
+    * rbind.data.frame() gains an optional argument make.row.names, for
+      potential speedup.
+
+    * New function extSoftVersion() to report on the versions of
+      third-party software in use in this session.  Currently reports
+      versions of zlib, bzlib, the liblzma from xz, PCRE, ICU, TRE and
+      the iconv implementation.
+
+      A similar function grSoftVersion() in package grDevices reports
+      on third-party graphics software.
+
+      Function tcltk::tclVersion() reports the Tcl/Tk version.
+
+    * Calling callGeneric() without arguments now works with primitive
+      generics to some extent.
+
+    * vapply(x, FUN, FUN.VALUE) is more efficient notably for large
+      length(FUN.VALUE); as extension of PR#16061.
+
+    * as.table() now allows tables with one or more dimensions of
+      length 0 (such as as.table(integer())).
+
+    * names(x) <- NULL now clears the names of call and ... objects.
+
+    * library() will report a warning when an insufficient dependency
+      version is masking a sufficient one later on the library search
+      path.
+
+    * A new plot() method for class "raster" has been added.
+
+    * New check_packages_in_dir_changes() function in package tools for
+      conveniently analyzing how changing sources impacts the check
+      results of their reverse dependencies.
+
+    * Speed-up from Peter Haverty for ls() and
+      methods:::.requirePackage() speeding up package loading.
+      (PR#16133)
+
+    * New get0() function, combining exists() and get() in one call,
+      for efficiency.
+
+    * match.call() gains an envir argument for specifying the
+      environment from which to retrieve the ... in the call, if any;
+      this environment was wrong (or at least undesirable) when the
+      definition argument was a function.
+
+    * topenv() has been made .Internal() for speedup, based on Peter
+      Haverty's proposal in PR#16140.
+
+    * getOption() no longer calls options() in the main case.
+
+    * Optional use of libcurl (version 7.28.0 from Oct 2012 or later)
+      for Internet access:
+
+        * capabilities("libcurl") reports if this is available.
+
+        * libcurlVersion() reports the version in use, and other
+          details of the "libcurl" build including which URL schemes it
+          supports.
+
+        * curlGetHeaders() retrieves the headers for http://, https://,
+          ftp:// and ftps:// URLs: analysis of these headers can
+          provide insights into the `existence' of a URL (it might for
+          example be permanently redirected) and is so used in R CMD
+          check --as-cran.
+
+        * download.file() has a new optional method "libcurl" which
+          will handle more URL schemes, follow redirections, and allows
+          simultaneous downloads of multiple URLs.
+
+        * url() has a new method "libcurl" which handles more URL
+          schemes and follows redirections.  The default method is
+          controlled by a new option url.method, which applies also to
+          the opening of URLs _via_ file() (which happens implicitly in
+          functions such as read.table.)
+
+        * When file() or url() is invoked with a https:// or ftps://
+          URL which the current method cannot handle, it switches to a
+          suitable method if one is available.
+
+    * (Windows.) The DLLs internet.dll and internet2.dll have been
+      merged.  In this version it is safe to switch (repeatedly)
+      between the internal and Windows internet functions within an R
+      session.
+
+      The Windows internet functions are still selected by flag
+      --internet2 or setInternet2().  This can be overridden for an
+      url() connection _via_ its new method argument.
+
+      download.file() has new method "wininet", selected as the default
+      by --internet2 or setInternet2().
+
+    * parent.env<- can no longer modify the parent of a locked
+      namespace or namespace imports environment.  Contributed by Karl
+      Millar.
+
+    * New function isNamespaceLoaded() for readability and speed.
+
+    * names(env) now returns all the object names of an environment
+      env, equivalently to ls(env, all.names = TRUE, sorted = FALSE)
+      and also to the names of the corresponding list,
+      names(as.list(env, all.names = TRUE)).  Note that although
+      names() returns a character vector, the names have no particular
+      ordering.
+
+    * The memory manager now grows the heap more aggressively. This
+      reduces the number of garbage collections, in particular while
+      data or code are loaded, at the expense of slightly increasing
+      the memory footprint.
+
+    * New function trimws() for removing leading/trailing whitespace.
+
+    * cbind() and rbind() now consider S4 inheritance during S3
+      dispatch and also obey deparse.level.
+
+    * cbind() and rbind() will delegate recursively to methods::cbind2
+      (methods::rbind2) when at least one argument is an S4 object and
+      S3 dispatch fails (due to ambiguity).
+
+    * (Windows.)  download.file(quiet = FALSE) now uses text rather
+      than Windows progress bars in non-interactive use.
+
+    * New function hsearch_db() in package utils for building and
+      retrieving the help search database used by help.search(), along
+      with functions for inspecting the concepts and keywords in the
+      help search database.
+
+    * New function .getNamespaceInfo(), a no-check version of
+      getNamespaceInfo() mostly for internal speedups.
+
+    * The help search system now takes \keyword entries in Rd files
+      which are not standard keywords (as given in KEYWORDS in the R
+      documentation directory) as concepts.  For standard keyword
+      entries the corresponding descriptions are additionally taken as
+      concepts.
+
+    * New lengths() function for getting the lengths of all elements in
+      a list.
+
+    * New function toTitleCase() in package tools, tailored to package
+      titles.
+
+    * The matrix methods of cbind() and rbind() allow matrices as
+      inputs which have 2^31 or more elements.  (For cbind(), wish of
+      PR#16198.)
+
+    * The default method of image() has an explicit check for a numeric
+      or logical matrix (which was always required).
+
+    * URLencode() will not by default encode further URLs which appear
+      to be already encoded.
+
+    * BIC(mod) and BIC(mod, mod2) now give non-NA numbers for arima()
+      fitted models, as nobs(mod) now gives the number of "used"
+      observations for such models.  This fixes PR#16198, quite
+      differently than proposed there.
+
+    * The print() methods for "htest", "pairwise.htest" and
+      "power.htest" objects now have a digits argument defaulting to (a
+      function of) getOption("digits"), and influencing all printed
+      numbers coherently.  Unavoidably, this changes the display of
+      such test results in some cases.
+
+    * Code completion for namespaces now recognizes all loaded
+      namespaces, rather than only the ones that are also attached.
+
+    * The code completion mechanism can now be replaced by a
+      user-specified completer function, for (temporary) situations
+      where the usual code completion is inappropriate.
+
+    * unzip() will now warn if it is able to detect truncation when
+      unpacking a file of 4GB or more (related to PR#16243).
+
+    * methods() reports S4 in addition to S3 methods; output is
+      simplified when the class argument is used.  .S3methods() and
+      methods::.S4methods() report S3 and S4 methods separately.
+
+    * Higher order functions such as the apply functions and Reduce()
+      now force arguments to the functions they apply in order to
+      eliminate undesirable interactions between lazy evaluation and
+      variable capture in closures.  This resolves PR#16093.
+
+  INSTALLATION and INCLUDED SOFTWARE:
+
+    * The \donttest sections of R's help files can be tested by
+      make check TEST_DONTTEST=TRUE .
+
+    * It is possible to request the use of system valgrind headers
+      _via_ configure option --with-system-valgrind-headers: note the
+      possible future incompatibility of such headers discussed in the
+      'R Installation and Administration' manual. (Wish of PR#16068.)
+
+    * The included version of liblzma has been updated to xz-utils
+      5.0.7 (minor bug fixes from 5.0.5).
+
+    * configure options --with-system-zlib, --with-system-bzlib and
+      --with-system-pcre are now the default.  For the time being there
+      is fallback to the versions included in the R sources if no
+      system versions are found or (unlikely) if they are too old.
+
+      Linux users should check that the -devel or -dev versions of
+      packages zlib, bzip2/libbz2 and pcre as well as
+      xz-devel/liblzma-dev (or similar names) are installed.
+
+    * configure by default looks for the texi2any script from texinfo
+      5.1 or later, rather than the makeinfo program.  (makeinfo is a
+      link to the Perl script texi2any in texinfo 5.x.)
+
+    * R CMD INSTALL gains an option --built-timestamp=STAMP allowing
+      100% reproducible package building, thanks to Dirk Eddelbuettel.
+
+  UTILITIES:
+
+    * There is support for testing the \dontrun and \donttest parts of
+      examples in packages.
+
+      tools::testInstalledPackage() accepts new arguments
+      commentDontrun = FALSE and commentDonttest = FALSE.
+
+      R CMD check gains options --run-dontrun and --run-donttest.
+
+    * The HTML generated by tools::Rd2HTML() and tools::toHTML()
+      methods is now 'XHTML 1.0 Strict'.
+
+    * The compiler package's utility function setCompilerOptions() now
+      returns the old values invisibly. The initial optimization level
+      can also be set with the environment variable
+      R_COMPILER_OPTIMIZE.
+
+    * R CMD build adds a NeedsCompilation field if one is not already
+      present in the DESCRIPTION file.
+
+    * R CMD check gains option --test-dir to specify an alternative set
+      of tests to run.
+
+    * R CMD check will now by default continue with testing after many
+      types of errors, and will output a summary count of errors at the
+      end if any have occurred.
+
+    * R CMD check now checks that the Title and Description fields are
+      correctly terminated.
+
+    * R CMD check --as-cran now:
+
+        * checks a README.md file can be processed: this needs pandoc
+          installed.
+
+        * checks the existence and accessibility of URLs in the
+          DESCRIPTION, CITATION, NEWS.Rd and README.md files and in the
+          help files (provided the build has libcurl support).
+
+        * reports non-ASCII characters in R source files when there is
+          no package encoding declared in the DESCRIPTION file.
+
+        * reports (apparent) S3 methods exported but not registered.
+
+        * reports overwriting registered S3 methods from
+          base/recommended packages.  (Such methods are replaced in the
+          affected package for the rest of the session, even if the
+          replacing namespace is unloaded.)
+
+        * reports if the Title field does not appear to be in title
+          case (see 'Writing R Extensions': there may be false
+          positives, but note that technical words should be
+          single-quoted and will then be accepted).
+
+      Most of these checks can also be selected by environment
+      variables: see the 'R Internals' manual.
+
+  C-LEVEL FACILITIES:
+
+    * New C API utility logspace_sum(logx[], n).
+
+    * Entry points rbinom_mu, rnbinom_mu and rmultinom are remapped (by
+      default) to Rf_rbinom_mu etc.  This requires packages using them
+      to be re-installed.
+
+    * .C(DUP = FALSE) and .Fortran(DUP = FALSE) are now ignored, so
+      arguments are duplicated if DUP = TRUE would do so.  As their
+      help has long said, .Call() is much preferred.
+
+    * New entry point R_allocLD, like R_alloc but guaranteed to have
+      sufficient alignment for long double pointers.
+
+    * isPairList() now returns TRUE for DOTSXP.
+
+  WINDOWS BUILD CHANGES:
+
+  A number of changes to the Windows build system are in development.
+  The following are currently in place.
+
+    * Installation using external binary distributions of zlib, bzip2,
+      liblzma, pcre, libpng, jpeglib and libtiff is now required, and
+      the build instructions have been revised.
+
+    * A new make target rsync-extsoft has been added to obtain copies
+      of the external libraries from CRAN.
+
+    * Building the manuals now requires texi2any from texinfo 5.1 or
+      later.  CRAN binary builds include the manuals, but by default
+      builds from source will not, and they will be accessed from CRAN.
+      See the comments in src/gnuwin32/MkRules.dist for how to specify
+      the location of texi2any.
+
+    * (Windows) Changes have been made to support an experimental
+      Windows toolchain based on GCC 4.9.2.  The default toolchain
+      continues to be based on GCC 4.6.3, as the new toolchain is not
+      yet stable enough.  A change to a new toolchain is expected
+      during the R 3.2.x lifetime.
+
+  PACKAGE INSTALLATION:
+
+    * (Windows) The use of macro ZLIB_LIBS in file src/Makevars.win
+      (which has not been documented for a long time) now requires an
+      external libz.a to be available (it is part of the 'goodies' used
+      to compile Windows binary packages).  It would be simpler to use
+      -lz instead.
+
+    * The default for option pkgType on platforms using binary packages
+      is now "both", so source packages will be tried if binary
+      versions are not available or not up to date.
+
+      There are options for what install.packages(type = "both")
+      (possibly called _via_ update.packages()) will do if compilation
+      of a source package is desirable: see ?options (under utils).
+
+      If you intend not to accept updates as source packages, you
+      should use update.packages(type = "binary").
+
+  DEPRECATED AND DEFUNCT:
+
+    * download.file(method = "lynx") is defunct.
+
+    * Building R using the included versions of zlib, bzip2, xz and
+      PCRE is deprecated: these are frozen (bar essential bug-fixes)
+      and will be removed for R 3.3.0.
+
+    * The configure option --with-valgrind-instrumentation=3 has been
+      withdrawn, as it did not work with recent valgrind headers: it is
+      now treated as level 2.
+
+    * The MethodsList class in package methods had been deprecated in R
+      2.11.0 and is defunct now.  Functions using it are defunct if
+      they had been deprecated in R 2.11.0, and are deprecated now,
+      otherwise.
+
+  BUG FIXES:
+
+    * Fixed two obscure bugs in pairlist subassignment, reported by
+      Radford Neal as part of pqR issue 16.
+
+    * Fixes for bugs in handling empty arguments and argument matching
+      by name in log().
+
+    * all.equal() gains methods for environments and refClasses.
+
+    * [<- and [[<- gain S4 data.frame methods to avoid corruption of S4
+      class information by the S3 methods.
+
+    * callNextMethod() should now work within a .local call when ... is
+      absent from formals(.local).
+
+    * dput(pairlist(x)) generates a call to the pairlist constructor
+      instead of the list constructor.
+
+    * Fix missing() when arguments are propagated through ... .
+      (PR#15707)
+
+    * eigen(m) now defaults to symmetric = TRUE even when the dimnames
+      are asymmetric if the matrix is otherwise symmetric.  (PR#16151)
+
+    * Fix issues with forwarding ... through callGeneric() and
+      callNextMethod().  (PR#16141)
+
+    * callGeneric() now works after a callNextMethod().
+
+    * Subclass information is kept consistent when replacing an
+      ordinary S4 class with an "old class" _via_ the S4Class argument
+      to setOldClass(). Thus, for example, a data.frame is valid for a
+      list argument in the signature, and a factor is valid for vector
+      arguments.
+
+    * In qbeta() the inversion of pbeta() is much more sophisticated.
+      This works better in corner cases some of which failed completely
+      previously (PR#15755), or were using too many iterations.
+
+    * Auto-printing no longer duplicates objects when printing is
+      dispatched to a method.
+
+    * kmeans(x, k) would fail when nrow(x) >= 42949673.  (Comment 6 of
+      PR#15364)
+
+    * 'Abbreviated' locale-specific day and month names could have been
+      truncated in those rare locales where there are the same as the
+      full names.
+
+    * An irrelevant warning message from updating subclass information
+      was silenced (the namespace would not be writable in this case).
+
+CHANGES IN R 3.1.3:
+
+  NEW FEATURES:
+
+    * The internal method of download.file() can now handle files
+      larger than 2GB on 32-bit builds which support such files (tested
+      on 32-bit R running on 64-bit Windows).
+
+    * kruskal.test() warns on more types of suspicious input.
+
+    * The as.dendrogram() method for "hclust" objects gains a check
+      argument protecting against memory explosion for invalid inputs.
+
+    * capabilities() has a new item long.double which indicates if the
+      build uses a long double type which is longer than double.
+
+    * nlm() no longer modifies the callback argument in place (a new
+      vector is allocated for each invocation, which mimics the
+      implicit duplication that occurred in R < 3.1.0); note that this
+      is a change from the previously documented behavior. (PR#15958)
+
+    * icuSetCollate() now accepts locale = "ASCII" which uses the basic
+      C function strcmp and so collates strings byte-by-byte in
+      numerical order.
+
+    * sessionInfo() tries to report the OS version in use (not just
+      that compiled under, and including details of Linux
+      distributions).
+
+    * model.frame() (used by lm() and many other modelling functions)
+      now warns when it drops contrasts from factors.  (Wish of
+      PR#16119)
+
+    * install.packages() and friends now accept the value type =
+      "binary" as a synonym for the native binary type on the platform
+      (if it has one).
+
+    * Single source or binary files can be supplied for
+      install.packages(type = "both") and the appropriate type and
+      repos = NULL will be inferred.
+
+    * New function pcre_config() to report on some of the configuration
+      options of the version of PCRE in use.  In particular, this
+      reports if regular expressions using \p{xx} are supported.
+
+    * (Windows.) download.file(cacheOK = FALSE) is now supported when
+      internet2.dll is used.
+
+    * browseURL() has been updated to work with Firefox 36.0 which has
+      dropped support for the -remote interface.
+
+  INSTALLATION and INCLUDED SOFTWARE:
+
+    * The included version of PCRE has been updated to 8.36.
+
+    * configure accepts MAKEINFO=texi2any as another way to ensure
+      texinfo 5.x is used when both 5.x and 4.x are installed.
+
+  UTILITIES:
+
+    * R CMD check now checks the packages used in \donttest sections of
+      the examples are specified in the DESCRIPTION file.  (These are
+      needed to run the examples interactively.)
+
+    * R CMD check checks for the undeclared use of GNU extensions in
+      Makefiles, and for Makefiles with a missing final linefeed.
+
+      R CMD build will correct line endings in all Makefiles, not just
+      those in the src directory.
+
+    * R CMD check notes uses of library() and require() in package
+      code: see the section 'Suggested packages' of 'Writing R
+      Extensions' for good practice.
+
+  DEPRECATED AND DEFUNCT:
+
+    * The configure option --with-valgrind-instrumentation=3 is
+      deprecated and will be removed in R 3.2.0.
+
+  BUG FIXES:
+
+    * (Windows.) Rscript.exe was missing a manifest specifying the
+      modern style for common controls (e.g., the download progress
+      bar).
+
+    * If a package had extra documentation files but no vignette, the
+      HTML help system produced an empty index page.
+
+    * The parser now gives an error if a null character is included in
+      a string using Unicode escapes. (PR#16046)
+
+    * qr.Q() failed on complex arguments due to pre-3.0(!) typo.
+      (PR#16054)
+
+    * abs() failed with named arguments when the argument was complex.
+      (PR#16047)
+
+    * "noquote" objects may now be used as columns in data frames.
+      (PR#15997)
+
+    * Some values with extremely long names were printed incorrectly.
+      (PR#15999)
+
+    * Extremely large exponents on zero expressed in scientific
+      notation (e.g. 0.0e50000) could give NaN.  (PR#15976)
+
+    * download.file() reported downloaded sizes as 0KB if less than
+      1MB, only for R 3.1.2 and only on big-endian platforms.
+
+    * prompt() did not escape percent signs in the automatically
+      generated usage section of help files.
+
+    * drop.terms() dropped some of the attributes of the object it was
+      working with.  (PR#16029)
+
+    * (Windows.) The command completion in Rgui.exe messed up the
+      console.  (PR#15791)
+
+    * (Windows.) The choose.files() command returned a blank string
+      when the user asked for a single file but cancelled the request.
+      (PR#16074)
+
+    * Math2 S4 group generics failed to correctly dispatch "structure"-
+      and "nonStructure"-derived classes.
+
+    * loadNamespace() imposed undocumented restrictions on the
+      versionCheck parameter.  (Reported by Geoff Lee.)
+
+    * Rare over-runs detected by AddressSanitizer in substr() and its
+      replacement version have been avoided.
+
+      _Inter alia_ that fix gives the documented behaviour for
+      substr(x, 1, 2) <- "" (subsequently reported as PR#16214).
+
+    * Loading packages incorrectly defining an S4 generic followed by a
+      function of the same name caused an erroneous cyclic namespace
+      dependency error.
+
+    * Declared vignette encodings are now always passed to the vignette
+      engine.
+
+    * Port Tomas Kalibera's fix from R-devel that restores the
+      loadMethod() fast path, effectively doubling the speed of S4
+      dispatch.
+
+    * power.t.test() and power.prop.test() now make use of the
+      extendInt option of uniroot() and hence work in more extreme
+      cases.  (PR#15792)
+
+    * If a package was updated and attached when its namespace was
+      already loaded, it could end up with parts from one version and
+      parts from the other.  (PR#16120)
+
+    * tools:::.Rdconv() didn't accept --encoding= due to a typo.
+      (PR#16121)
+
+    * Unix-alike builds without a suitable makeinfo were documented to
+      link the missing HTML manuals to CRAN, but did not.
+
+    * save(*, ascii=TRUE) and load() now correctly deal with NaN's.
+      (PR#16137)
+
+    * split.Date() retains fractional representations while avoiding
+      incomplete class propagation.
+
+    * R_ext/Lapack.h had not been updated for changes made by LAPACK to
+      the argument lists of its (largely internal) functions dlaed2 and
+      dlaed3.  (PR#16157)
+
+    * RShowDoc("NEWS", "txt") had not been updated for the layout
+      changes of R 3.1.0.
+
+    * The xtfrm() method for class "Surv" has been corrected and its
+      description expanded.
+
+    * mode(x) <- y would incorrectly evaluate x before changing its
+      mode. (PR#16215)
+
+    * besselJ(1, 2^64) and besselY(..) now signal a warning, returning
+      NaN instead of typically segfaulting. (Issue 3 of PR#15554)
+
+    * HTML conversion of \href markup in .Rd files did not remove the
+      backslash from \% and so gave an invalid URL.  In a related
+      change, the \ escape is now required in such URLs.
+
 CHANGES IN R 3.1.2:
 
   NEW FEATURES:
@@ -38,8 +2940,8 @@ CHANGES IN R 3.1.2:
       locale in use (if any).
 
     * utils::URLencode() was updated to use unreserved and reserved
-      characters from RFC 3986, <URL:
-      http://tools.ietf.org/html/rfc3986>, instead of RFC 1738.
+      characters from RFC 3986 (<URL:
+      http://tools.ietf.org/html/rfc3986>) instead of RFC 1738.
 
     * unique(warnings()) and c(warnings()) are now supported.
 
@@ -47,6 +2949,11 @@ CHANGES IN R 3.1.2:
       to 3.0. (It can be set at runtime _via_ environment variable
       R_BIOC_VERSION.)
 
+    * Omegahat is no longer listed as providing Windows binary
+      packages, e.g. by setRepositories().  It has no binary packages
+      available for R 3.1.x and those for earlier versions were 32-bit
+      only.
+
   INSTALLATION and INCLUDED SOFTWARE:
 
     * The configure script reports on the more important
@@ -66,9 +2973,9 @@ CHANGES IN R 3.1.2:
     * LaTeX package upquote is no longer required for R's use of
       inconsolata.
 
-    * (Windows only) If both 32 and 64 bit versions of R are installed,
-      the bin/R.exe and bin/Rscript.exe executables now run 64 bit R.
-      (To run 32 bit R, overwrite these files with copies of
+    * (Windows only) If both 32- and 64-bit versions of R are
+      installed, the bin/R.exe and bin/Rscript.exe executables now run
+      64-bit R.  (To run 32-bit R, overwrite these files with copies of
       bin/i386/Rfe.exe.)
 
   UTILITIES:
@@ -146,11 +3053,11 @@ CHANGES IN R 3.1.2:
     * options(list()) now works (trivially). (PR#15979)
 
     * merge(<dendrogram>, ..) now works correctly for two `independent'
-      dendrograms (PR#15648), and still compatibly via adjust = "auto"
-      e.g. for two branches of an existing dendrogram.
+      dendrograms (PR#15648), and still compatibly _via_ adjust =
+      "auto" e.g. for two branches of an existing dendrogram.
 
     * The plot method for "hclust" objects gets an optional argument
-      check; When that is true (the default) it checks more carefully
+      check; when that is true (the default) it checks more carefully
       for valid input.
 
     * (Windows only) If a user chose to install 64 bit R but not 32 bit
@@ -172,7 +3079,7 @@ CHANGES IN R 3.1.2:
       breaks when some are very large. (PR#15988)
 
     * sub() and gsub() did not handle regular expressions like "\s{2,}"
-      properly if the text contained NA or non-ascii elements in a
+      properly if the text contained NA or non-ASCII elements in a
       UTF-8 locale.  Part of this was due to a bug in the TRE library.
       (PR#16009)
 
@@ -197,7 +3104,7 @@ CHANGES IN R 3.1.2:
 
     * Work around a bug in OS X Yosemite where key environment
       variables may be duplicated causing issues in subprocesses. The
-      duplicates are now removed on R startup (via Rprofile).
+      duplicates are now removed on R startup (_via_ Rprofile).
       (PR#16042)
 
     * Adjust X11 auto-launch detection in DISPLAY on OS X to recognize
@@ -486,7 +3393,7 @@ CHANGES IN R 3.1.0:
       names, dims and dimnames are.
 
     * colorRamp() and colorRampPalette() now allow non-opaque colours
-      and a ramp in opacity via the new argument alpha = TRUE.
+      and a ramp in opacity _via_ the new argument alpha = TRUE.
       (Suggested by Alberto Krone-Martins, but optionally as there are
       existing uses which expect only RGB values.)
 
@@ -1222,7 +4129,7 @@ CHANGES IN R 3.0.3:
       time.  (The platforms affected include Linux and OS X, but not
       Windows nor Solaris.)
 
-    * rowsum() has more support for matrices and dataframes with 2^31
+    * rowsum() has more support for matrices and data frames with 2^31
       or more elements. (PR#15587)
 
     * predict(<lm object>, interval = "confidence", scale =
@@ -1305,7 +4212,7 @@ CHANGES IN R 3.0.2:
     * col2rgb() now converts factors to character strings not integer
       codes (suggested by Bryan Hanson).
 
-    * tail(warnings()) now works, via the new `[` method.
+    * tail(warnings()) now works, _via_ the new `[` method.
 
     * There is now support for the LaTeX style file zi4.sty which has
       in some distributions replaced inconsolata.sty.
@@ -1343,7 +4250,7 @@ CHANGES IN R 3.0.2:
 
     * Methods invoked by NextMethod() had a different dynamic parent to
       the generic. This was causing trouble where S3 methods invoked
-      via lazy evaluation could lose track of their generic.
+      _via_ lazy evaluation could lose track of their generic.
       (PR#15267)
 
     * Code for the negative binomial distribution now treats the case
@@ -1686,7 +4593,7 @@ CHANGES IN R 3.0.2:
       lose any zero-length strings from the command line arguments.
       (PR#15406)
 
-    * Errors in the encoding specified on the command line via
+    * Errors in the encoding specified on the command line _via_
       --encoding=foo were not handled properly.  (PR#15405)
 
     * If x is a symbol, is.vector(x, "name") now returns TRUE, since
@@ -1951,7 +4858,7 @@ CHANGES IN R 3.0.0:
       representable as an integer (as often happens for package
       Matrix), this is converted to an integer.
 
-    * Matrix indexing of dataframes by two-column numeric indices is
+    * Matrix indexing of data frames by two-column numeric indices is
       now supported for replacement as well as extraction.
 
     * setNames() now has a default for its object argument, useful for
@@ -2236,13 +5143,13 @@ CHANGES IN R 3.0.0:
     * The parse() function has a new parameter keep.source, which
       defaults to options("keep.source").
 
-    * Profiling via Rprof() now optionally records information at the
+    * Profiling _via_ Rprof() now optionally records information at the
       statement level, not just the function level.
 
     * The Rprof() function now quotes function names in in its output
       file on Windows, to be consistent with the quoting in Unix.
 
-    * Profiling via Rprof() now optionally records information about
+    * Profiling _via_ Rprof() now optionally records information about
       time spent in GC.
 
     * The HTML help page for a package now displays non-vignette
@@ -2622,8 +5529,8 @@ CHANGES IN R 3.0.0:
       affinity settings like OpenBLAS) - the function is rather
       intended to support affinity control in high-level parallel
       functions.  In the future, R may supplement lack of affinity
-      control in the OS by its own bookkeeping via mcaffinity() related
-      to processes and threads it spawns.
+      control in the OS by its own bookkeeping _via_ mcaffinity()
+      related to processes and threads it spawns.
 
     * mcparallel() has a new argument mc.affinity which attempts to set
       the affinity of the child process according to the specification
@@ -2790,7 +5697,7 @@ CHANGES IN R 3.0.0:
       rare circumstances such as a garbage collection triggering a
       recursive call.
 
-    * Field assignments in reference class objects via $<- were not
+    * Field assignments in reference class objects _via_ $<- were not
       being checked because the magic incantation to turn methods on
       for that primitive operator had been inadvertently omitted.
 
diff --git a/doc/NEWS.2.Rd b/doc/NEWS.2.Rd
index b1327cb..93dfcc3 100644
--- a/doc/NEWS.2.Rd
+++ b/doc/NEWS.2.Rd
@@ -1,8 +1,5 @@
 % -*- coding: utf-8 -*-
-\newcommand{\PR}{\Sexpr[results=rd]{tools:::Rd_expr_PR(#1)}}
-\newcommand{\Rlogo}{\if{html}{\figure{../../html/logo.jpg}}\if{latex}{\figure{logo.jpg}{options: width=0.5in}}}
-\newcommand{\CRANpkg}{\href{http://CRAN.R-project.org/package=#1}{\pkg{#1}}}
-\newcommand{\sspace}{\ifelse{latex}{\out{~}}{ }}
+\newcommand{\Rlogo}{\if{html}{\figure{../../html/Rlogo.svg}{options: class="toplogo" alt="[R logo]"}}\if{latex}{\figure{Rlogo.pdf}{options: width=0.5in}}}
 
 \name{NEWS}
 \title{ R News}
@@ -2039,7 +2036,7 @@
       \code{readRDS()}) in earlier versions of \R will no longer show
       the original sources (including comments).
 
-      \item New items \href{UserManuals.html}{User Manuals} and
+      \item New items \samp{User Manuals} and
       \href{http://developer.r-project.org/TechDocs}{Technical Papers}
       have been added to the HTML help main page.  These link to
       vignettes in the base and recommended packages and to a
diff --git a/doc/NEWS.Rd b/doc/NEWS.Rd
index 29f1575..f2b3dfb 100644
--- a/doc/NEWS.Rd
+++ b/doc/NEWS.Rd
@@ -1,13 +1,3278 @@
 % -*- coding: utf-8 -*-
-\newcommand{\PR}{\Sexpr[results=rd]{tools:::Rd_expr_PR(#1)}}
-\newcommand{\Rlogo}{\if{html}{\figure{../../html/logo.jpg}}\if{latex}{\figure{logo.jpg}{options: width=0.5in}}}
-\newcommand{\CRANpkg}{\href{http://CRAN.R-project.org/package=#1}{\pkg{#1}}}
-\newcommand{\sspace}{\ifelse{latex}{\out{~}}{ }}
+\newcommand{\Rlogo}{\if{html}{\figure{../../html/Rlogo.svg}{options: class="toplogo" alt="[R logo]"}}\if{latex}{\figure{Rlogo.pdf}{options: width=0.5in}}}
 
 \name{NEWS}
 \title{R News}
 \encoding{UTF-8}
 
+\section{\Rlogo CHANGES IN R 3.4.0}{
+
+  \subsection{SIGNIFICANT USER-VISIBLE CHANGES}{
+    \itemize{
+      \item (Unix-alike)
+      The default methods for \code{download.file()} and \code{url()}
+      now choose \code{"libcurl"} except for \samp{file://}
+      URLs.  There will be small changes in the format and wording of
+      messages, including in rare cases if an issue is a warning or an
+      error.  For example, when HTTP re-direction occurs, some messages
+      refer to the final URL rather than the specified one.
+
+      Those who use proxies should check that their settings are
+      compatible (see \code{?download.file}: the most commonly used
+      forms work for both \code{"internal"} and \code{"libcurl"}).
+
+      \item \code{table()} has been amended to be more internally
+      consistent and become back compatible to \R \eqn{\le}{<=} 2.7.2
+      again.  Consequently, \code{table(1:2, exclude = NULL)} no longer
+      contains a zero count for \code{<NA>}, but \code{useNA = "always"}
+      continues to do so.
+
+      \item \code{summary.default()} no longer rounds, but its print
+      method does resulting in less extraneous rounding, notably of
+      numbers in the ten thousands.
+
+      \item \code{factor(x, exclude = L)} behaves more rationally when
+      \code{x} or \code{L} are character vectors.  Further,
+      \code{exclude = <factor>} now behaves as documented for long.
+
+      \item Arithmetic, logic (\code{&}, \code{|}) and comparison (aka
+      \sQuote{relational}, e.g., \code{<}, \code{==}) operations with
+      arrays now behave consistently, notably for arrays of length zero.
+
+      Arithmetic between length-1 arrays and longer non-arrays had
+      silently dropped the array attributes and recycled.  This now
+      gives a warning and will signal an error in the future, as it has
+      always for logic and comparison operations in these cases (e.g.,
+      compare \code{matrix(1,1) + 2:3} and \code{matrix(1,1) < 2:3}).
+
+      \item The JIT (\sQuote{Just In Time}) byte-code compiler is now
+      enabled by default at its level 3. This means functions will be
+      compiled on first or second use and top-level loops will be
+      compiled and then run.  (Thanks to Tomas Kalibera for extensive
+      work to make this possible.)
+
+      For now, the compiler will not compile code containing explicit
+      calls to \code{browser()}: this is to support single stepping from
+      the \code{browser()} call.
+
+      JIT compilation can be disabled for the rest of the session using
+      \code{compiler::enableJIT(0)} or by setting environment variable
+      \env{R_ENABLE_JIT} to \code{0}.
+
+      \item \code{xtabs()} works more consistently with \code{NA}s, also
+      in its result no longer setting them to \code{0}.  Further, a new
+      logical option \code{addNA} allows to count \code{NA}s where
+      appropriate.  Additionally, for the case \code{sparse = TRUE}, the
+      result's \code{dimnames} are identical to the default case's.
+
+      \item Matrix products now consistently bypass BLAS when the inputs
+      have \code{NaN}/\code{Inf} values. Performance of the check of
+      inputs has been improved. Performance when BLAS is used is
+      improved for matrix/vector and vector/matrix multiplication (DGEMV
+      is now used instead of DGEMM).
+
+      One can now choose from alternative matrix product implementations
+      \emph{via} \code{options(matprod = )}.  The \code{"internal"}
+      implementation is not optimized for speed but consistent in
+      precision with other summations in R (using \code{long double}
+      accumulators where available).  \code{"blas"} calls BLAS directly
+      for best speed, but usually with undefined behavior for inputs
+      with \code{NaN}/\code{Inf}.
+
+      \item \code{factor()} now uses \code{order()} to sort its levels,
+      not \code{sort.list()}. This makes \code{factor()} support custom
+      vector-like objects if methods for the appropriate generics are
+      defined. This change has the side effect of making \code{factor()}
+      succeed on empty or length-one non-atomic vector(-like) types (e.g.,
+      list), where it failed before.
+    }
+  }
+
+  \subsection{NEW FEATURES}{
+    \itemize{
+      \item User errors such as \code{integrate(f, 0:1, 2)} are now caught.
+
+      \item Add \code{signature} argument to \code{debug()},
+      \code{debugonce()}, \code{undebug()} and \code{isdebugged()} for
+      more conveniently debugging S3 and S4 methods.  (Based on a patch by
+      Gabe Becker.)
+
+      \item Add \code{utils::debugcall()} and
+      \code{utils::undebugcall()} for debugging the function that would
+      be called by evaluating the given expression. When the call is to
+      an S4 generic or standard S3 generic, \code{debugcall()} debugs the
+      method that would be dispatched. A number of internal utilities
+      were added to support this, most notably
+      \code{utils::isS3stdGeneric()}.  (Based on a patch by Gabe Becker.)
+
+      \item Add \code{utils::strcapture()}. Given a character vector and
+      a regular expression containing capture expressions,
+      \code{strcapture()} will extract the captured tokens into a
+      tabular data structure, typically a \code{data.frame}.
+
+      \item \code{str()} and \code{strOptions()} get a new option
+      \code{drop.deparse.attr} with improved but \emph{changed} default
+      behaviour for expressions.  For \code{expression} objects
+      \code{x}, \code{str(x)} now may remove extraneous white space and
+      truncate long lines.
+
+      \item \code{str(<looooooooong_string>)} is no longer very slow;
+      inspired by Mikko Korpela's proposal in \PR{16527}.
+
+      \item \code{str(x)}'s default method is more \dQuote{accurate} and
+      hence somewhat more generous in displaying character vectors; this
+      will occasionally change \R outputs (and need changes to some
+      \file{*.Rout(.save)} files).
+      \cr %% same \item
+      For a classed integer vector such as \code{x <- xtabs(~ c(1,9,9,9))},
+      \code{str(x)} now shows both the class and \code{"int"}, instead
+      of only the latter.
+
+      \item \code{isSymmetric(m)} is much faster for large asymmetric
+      matrices \code{m} \emph{via} pre-tests and a new option \code{tol1}
+      (with which strict back compatibility is possible but not the
+      default).
+
+      \item The result of \code{eigen()} now is of class \code{"eigen"}
+      in the default case when eigenvectors are computed.
+
+      \item Zero-length date and date-time objects (of classes
+      \code{"POSIX[cl]?t"}) now \code{print()} \dQuote{recognizably}.
+
+      \item \code{xy.coords()} and \code{xyz.coords()} get a new
+      \code{setLab} option.
+
+      \item The \code{method} argument of \code{sort.list()},
+      \code{order()} and \code{sort.int()} gains an \code{"auto"} option
+      (the default) which should behave the same as before when
+      \code{method} was not supplied.
+
+      \item \code{stopifnot(E, ..)} now reports differences when
+      \code{E} is a call to \code{all.equal()} and that is not true.
+
+      \item \code{boxplot(<formula>, *)} gain optional arguments
+      \code{drop}, \code{sep}, and \code{lex.order} to pass to
+      \code{split.default()} which itself gains an argument
+      \code{lex.order} to pass to \code{interaction()} for more
+      flexibility.
+
+      \item The \code{plot()} method for \code{ppr()} has enhanced
+      default labels (\code{xmin} and \code{main}).
+
+      \item \code{sample.int()} gains an explicit \code{useHash} option
+      (with a back compatible default).
+
+      \item \code{identical()} gains an \code{ignore.srcref} option
+      which drops \code{"srcref"} and similar attributes when true (as
+      by default).
+
+      \item \code{diag(x, nrow = n)} now preserves \code{typeof(x)}, also
+      for logical, integer and raw \code{x} (and as previously for
+      complex and numeric).
+
+      \item \code{smooth.spline()} now allows direct specification of
+      \code{lambda}, gets a \code{hatvalues()} method and keeps
+      \code{tol} in the result, and optionally parts of the internal
+      matrix computations.
+
+      \item \code{addNA()} is faster now, e.g.{} when applied twice.
+      (Part of \PR{16895}.)
+
+      \item New option \code{rstandard(<lm>, type = "predicted")}
+      provides the \dQuote{PRESS}--related leave-one-out
+      cross-validation errors for linear models.
+
+      \item After seven years of deprecation, duplicated factor levels
+      now produce a warning when printed and an error in \code{levels<-}
+      instead of a warning.
+
+      \item Invalid factors, e.g., with duplicated levels (invalid but
+      constructable) now give a warning when printed, \emph{via} new
+      function \code{.valid.factor()}.
+
+      \item \code{sessionInfo()} has been updated for Apple's change in
+      OS naming as from \sQuote{10.12} (\sQuote{macOS Sierra} \emph{vs}
+      \sQuote{OS X El Capitan}).
+
+      Its \code{toLatex()} method now includes the \code{running}
+      component.
+
+      \item \code{options(interrupt=)} can be used to specify a default
+      action for user interrupts.  For now, if this option is not set
+      and the \code{error} option is set, then an unhandled user
+      interrupt invokes the \code{error} option.  (This may be dropped in
+      the future as \code{interrupt} conditions are not \code{error}
+      conditions.)
+
+      \item In most cases user interrupt handlers will be called with a
+      \code{"resume"} restart available.  Handlers can invoke this
+      restart to resume computation. At the browser prompt the \code{r}
+      command will invoke a \code{"resume"} restart if one is
+      available. Some read operations cannot be resumed properly when
+      interrupted and do not provide a \code{"resume"} restart.
+
+      \item Radix sort is now chosen by \code{method = "auto"} for
+      \code{sort.int()} for double vectors (and hence used for
+      \code{sort()} for unclassed double vectors), excluding
+      \sQuote{long} vectors.
+
+      \code{sort.int(method = "radix")} no longer rounds double vectors.
+
+      \item The \code{default} and \code{data.frame} methods for
+      \code{stack()} preserve the names of empty elements in the levels
+      of the \code{ind} column of the return value.  Set the new
+      \code{drop} argument to \code{TRUE} for the previous behavior.
+
+      \item Speedup in \code{simplify2array()} and hence \code{sapply()} and
+      \code{mapply()} (for the case of names and common length > 1),
+      thanks to Suharto Anggono's \PR{17118}.
+
+      \item \code{table(x, exclude = NULL)} now sets
+      \code{useNA = "ifany"} (instead of \code{"always"}).
+      Together with the bug fixes for this case, this recovers more
+      consistent behaviour  compatible to older versions of \R.  As
+      a consequence, \code{summary()} for a logical vector no longer
+      reports (zero) counts for \code{NA} when there are no \code{NA}s.
+
+      \item \code{dump.frames()} gets a new option
+      \code{include.GlobalEnv} which allows to also dump the global
+      environment, thanks to Andreas Kersting's proposal in \PR{17116}.
+
+      \item \code{system.time()} now uses \code{message()} instead of
+      \code{cat()} when terminated early, such that
+      \code{suppressMessages()} has an effect; suggested by Ben Bolker.
+
+      \item \code{citation()} supports \file{inst/CITATION} files from
+      package source trees, with \code{lib.loc} pointing to the
+      directory containing the package.
+
+      %% Would need more work (notably in  ../src/main/sort.c )
+      %% \item New \code{orderL(lst, ....)} for use in \code{do.call()} to
+      %% avoid the name problem seen in \PR{17119}.
+
+      \item \code{try()} gains a new argument \code{outFile} with a
+      default that can be modified \emph{via}
+      \code{options(try.outFile = .)}, useful notably for \code{Sweave}.
+
+      \item The unexported low-level functions in package \pkg{parallel}
+      for passing serialized \R objects to and from forked children now
+      support long vectors on 64-bit platforms.  This removes some
+      limits on higher-level functions such as \code{mclapply()} (but
+      returning gigabyte results from forked processes \emph{via}
+      serialization should be avoided if at all possible).
+
+      \item Connections now \code{print()} without error even if
+      invalid, e.g.\sspace{}after having been destroyed.
+
+      \item \code{apropos()} and \code{find(simple.words = FALSE)} no
+      longer match object names starting with \samp{.} which are known
+      to be internal objects (such as \code{.__S3MethodsTable__.}).
+
+      \item Convenience function \code{hasName()} has been added; it
+      is intended to replace the common idiom \code{!is.null(x$name)}
+      without the usually unintended partial name matching.
+
+      \item \code{strcapture()} no longer fixes column names nor coerces
+      strings to factors (suggested by Bill Dunlap).
+
+      \item \code{strcapture()} returns \code{NA} for non-matching
+      values in \code{x} (suggested by Bill Dunlap).
+
+      \item \code{source()} gets new optional arguments, notably
+      \code{exprs}; this is made use of in the new utility function
+      \code{withAutoprint()}.
+
+      \item \code{sys.source()} gets a new \code{toplevel.env} argument.
+      This argument is useful for frameworks running package tests;
+      contributed by Tomas Kalibera.
+
+      \item \code{Sys.setFileTime()} and
+      \code{file.copy(copy.date = TRUE)} will set timestamps with
+      fractions of seconds on platforms/filesystems which support this.
+
+      \item (Windows only.) \code{file.info()} now returns file
+      timestamps including fractions of seconds; it has done so on other
+      platforms since \R 2.14.0.  (NB: some filesystems do not
+      record modification and access timestamps to sub-second
+      resolution.)
+
+      \item The license check enabled by
+      \code{options(checkPackageLicense = TRUE)} is now done when the
+      package's namespace is first loaded.
+
+      \item \code{ppr()} and \code{supsmu()} get an optional
+      \code{trace} argument, and \code{ppr(.., sm.method = ..spline)} is
+      no longer limited to sample size \eqn{n \le 2500}{n <= 2500}.
+
+      \item The \code{POSIXct} method for \code{print()} gets optional
+      \code{tz} and \code{usetz} arguments, thanks to a report from
+      Jennifer S. Lyon.
+
+      \item New function \code{check_packages_in_dir_details()} in
+      package \pkg{tools} for analyzing package-check log files to
+      obtain check details.
+
+      \item Package \pkg{tools} now exports function
+      \code{CRAN_package_db()} for obtaining information about current
+      packages in the \acronym{CRAN} package repository, and several
+      functions for obtaining the check status of these packages.
+
+      \item The (default) Stangle driver \code{Rtangle} allows
+      \code{annotate} to be a function and gets a new
+      \code{drop.evalFALSE} option.
+
+      \item The default method for \code{quantile(x, prob)} should now
+      be monotone in \code{prob}, even in border cases, see \PR{16672}.
+
+      \item \code{bug.report()} now tries to extract an email address
+      from a \samp{BugReports} field, and if there is none, from a
+      \samp{Contacts} field.
+
+      \item The \code{format()} and \code{print()} methods for
+      \code{object.size()} results get new options \code{standard} and
+      \code{digits}; notably, \code{standard = "IEC"} and
+      \code{standard = "SI"} allow more standard (but less common)
+      abbreviations than the default ones, e.g.\sspace{}for kilobytes.
+      (From contributions by Henrik Bengtsson.)
+
+      \item If a reference class has a validity method,
+      \code{validObject} will be called automatically from the
+      default initialization method for reference classes.
+
+      \item \code{tapply()} gets new option \code{default = NA}
+      allowing to change the previously hardcoded value.
+
+      \item \code{read.dcf()} now consistently interprets any
+      \sQuote{whitespace} to be stripped to include newlines.
+
+      \item The maximum number of DLLs that can be loaded into R
+      e.g.\sspace{}\emph{via} \code{dyn.load()} can now be increased by
+      setting the environment variable \code{R_MAX_NUM_DLLS} before
+      starting R.
+
+      \item Assigning to an element of a vector beyond the current
+      length now over-allocates by a small fraction. The new vector is
+      marked internally as growable, and the true length of the new
+      vector is stored in the \code{truelength} field. This makes
+      building up a vector result by assigning to the next element
+      beyond the current length more efficient, though pre-allocating is
+      still preferred.  The implementation is subject to change and not
+      intended to be used in packages at this time.
+
+      \item Loading the \pkg{parallel} package namespace no longer sets
+      or changes the \code{.Random.seed}, even if \env{R_PARALLEL_PORT}
+      is unset.
+
+      NB: This can break reproducibility of output, and did for a
+      \acronym{CRAN} package.
+
+      \item Methods \code{"wget"} and \code{"curl"} for
+      \code{download.file()} now give an \R error rather than a non-zero
+      return value when the external command has a non-zero status.
+
+      \item Encoding name \code{"utf8"} is mapped to \code{"UTF-8"}.
+      Many implementations of \code{iconv} accept \code{"utf8"}, but not
+      GNU \pkg{libiconv} (including the late 2016 version 1.15).
+
+      \item \code{sessionInfo()} shows the full paths to the library or
+      executable files providing the BLAS/LAPACK implementations
+      currently in use (not available on Windows).
+
+      \item The binning algorithm used by bandwidth selectors
+      \code{bw.ucv()}, \code{bw.bcv()} and \code{bw.SJ()} switches to a
+      version linear in the input size \code{n} for \code{n > nb/2}.
+      (The calculations are the same, but for larger \code{n/nb} it is
+      worth doing the binning in advance.)
+
+      \item There is a new option \code{PCRE_study} which controls when
+      \code{grep(perl = TRUE)} and friends \sQuote{study} the compiled
+      pattern.  Previously this was done for 11 or more input strings:
+      it now defaults to 10 or more (but most examples need many more
+      for the difference from studying to be noticeable).
+
+      \item \code{grep(perl = TRUE)} and friends can now make use of
+      PCRE's Just-In-Time mechanism, for PCRE \eqn{\ge}{>=} 8.20 on
+      platforms where JIT is supported.  It is used by default whenever
+      the \code{pattern} is studied (see the previous item).  (Based on
+      a patch from Mikko Korpela.)
+
+      This is controlled by a new option \code{PCRE_use_JIT}.
+
+      Note that in general this makes little difference to the speed,
+      and may take a little longer: its benefits are most evident on
+      strings of thousands of characters.  As a side effect it reduces
+      the chances of C stack overflow in the PCRE library on very long
+      strings (millions of characters, but see next item).
+
+      Warning: segfaults were seen using PCRE with JIT enabled on 64-bit
+      Sparc builds.
+
+      \item There is a new option \code{PCRE_limit_recursion} for
+      \code{grep(perl = TRUE)} and friends to set a recursion limit
+      taking into account \R's estimate of the remaining C stack space
+      (or 10000 if that is not available).  This reduces the chance of C
+      stack overflow, but because it is conservative may report a
+      non-match (with a warning) in examples that matched before.  By
+      default it is enabled if any input string has 1000 or more bytes.
+      (\PR{16757})
+
+      \item \code{getGraphicsEvent()} now works on
+      \code{X11(type = "cairo")} devices.  Thanks to Frederick Eaton (for
+      reviving an earlier patch).
+
+      \item There is a new argument \code{onIdle} for
+      \code{getGraphicsEvent()}, which allows an R function to be run
+      whenever there are no pending graphics events.  This is currently
+      only supported on X11 devices.  Thanks to Frederick Eaton.
+
+      \item The \code{deriv()} and similar functions now can compute
+      derivatives of \code{log1p()}, \code{sinpi()} and similar
+      one-argument functions, thanks to a contribution by Jerry Lewis.
+
+      \item \code{median()} gains a formal \code{\dots} argument, so
+      methods with extra arguments can be provided.
+
+      \item \code{strwrap()} reduces \code{indent} if it is more than
+      half \code{width} rather than giving an error.  (Suggested by Bill
+      Dunlap.)
+
+      \item When the condition \code{code} in \code{if(.)} or
+      \code{while(.)} is not of length one, an error instead of a
+      warning may be triggered by setting an environment variable, see
+      the help page.
+
+      \item Formatting and printing of bibliography entries
+      (\code{bibentry}) is more flexible and better documented.  Apart
+      from setting \code{options(citation.bibtex.max = 99)} you can also
+      use \code{print(<citation>, bibtex=TRUE)} (or \code{format(..)})
+      to get the BibTeX entries in the case of more than one entry.
+      This also affects \code{citation()}.
+      Contributions to enable \code{style = "html+bibtex"} are welcome.
+    }
+  }
+
+  \subsection{C-LEVEL FACILITIES}{
+    \itemize{
+      \item Entry points \code{R_MakeExternalPtrFn} and
+      \code{R_ExternalPtrFn} are now declared in header
+      \file{Rinternals.h} to facilitate creating and retrieving an \R{}
+      external pointer from a C function pointer without ISO C warnings
+      about the conversion of function pointers.
+
+      \item There was an exception for the native Solaris C++ compiler
+      to the dropping (in \R 3.3.0) of legacy C++ headers from headers
+      such as \file{R.h} and \file{Rmath.h} --- this has now been
+      removed.  That compiler has strict C++98 compliance hence does not
+      include extensions in its (non-legacy) C++ headers: some
+      packages will need to request C++11 or replace non-C++98 calls
+      such as \code{lgamma}: see §1.6.4 of \sQuote{Writing R Extensions}.
+
+      Because it is needed by about 70 CRAN packages, headers \file{R.h}
+      and \file{Rmath.h} still declare \preformatted{use namespace std;}
+      when included on Solaris.
+
+      \item When included from C++, the \R headers now use forms such as
+      \code{std::FILE} directly rather than including the line \preformatted{using std::FILE;}
+      C++ code including these headers might be relying on the latter.
+
+      \item Headers \file{R_ext/BLAS.h} and \file{R_ext/Lapack.h} have
+      many improved declarations including \code{const} for
+      double-precision complex routines. \emph{Inter alia} this avoids
+      warnings when passing \sQuote{string literal} arguments from C++11
+      code.
+
+      \item Headers for Unix-only facilities \file{R_ext/GetX11Image.h},
+      \file{R_ext/QuartzDevice.h} and \file{R_ext/eventloop.h} are no
+      longer installed on Windows.
+
+      \item No-longer-installed headers \file{GraphicsBase.h},
+      \file{RGraphics.h}, \file{Rmodules/RX11.h} and
+      \file{Rmodules/Rlapack.h} which had a LGPL license no longer do so.
+
+      \item \code{HAVE_UINTPTR_T} is now defined where appropriate by
+      \code{Rconfig.h} so that it can be included before
+      \code{Rinterface.h} when \code{CSTACK_DEFNS} is defined and a C
+      compiler (not C++) is in use.  \code{Rinterface.h} now includes C
+      header \file{stdint.h} or C++11 header \file{cstdint} where
+      needed.
+
+      \item Package \pkg{tools} has a new function
+      \code{package_native_routine_registration_skeleton()} to assist
+      adding native-symbol registration to a package.  See its help and
+      §5.4.1 of \sQuote{Writing R Extensions} for how to use it.  (At
+      the time it was added it successfully automated adding
+      registration to over 90\% of \acronym{CRAN} packages which lacked
+      it.  Many of the failures were newly-detected bugs in the
+      packages, e.g.\sspace50 packages called entry points with varying
+      numbers of arguments and 65 packages called entry points not in
+      the package.)
+      %% 235 fail out of 2460, with 15 others working with
+      %% character_only = FALSE.
+    }
+  }
+
+  \subsection{INSTALLATION on a UNIX-ALIKE}{
+    \itemize{
+      \item \code{readline} headers (and not just the library) are
+      required unless configuring with \option{--with-readline=no}.
+
+      \item \command{configure} now adds a compiler switch for C++11
+      code, even if the compiler supports C++11 by default.  (This
+      ensures that \command{g++} 6.x uses C++11 mode and not its default
+      mode of C++14 with \sQuote{GNU extensions}.)
+
+      The tests for C++11 compliance are now much more comprehensive.
+      For gcc < 4.8, the tests from R 3.3.0 are used in order to maintain
+      the same behaviour on Linux distributions with long-term support.
+
+      \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}
+      is specified with \samp{CXX11STD}.
+
+      \item \command{configure} now tests for a C++14-compliant compiler
+      by testing some basic features.  This by default tries flags for
+      the compiler specified by \samp{CXX11}, but an alternative compiler,
+      options and standard can be specified by variables \samp{CXX14},
+      \samp{CXX14FLAGS} and \samp{CXX14STD} (e.g., \option{-std=gnu++14}).
+
+      \item There is a new macro \code{CXXSTD} to help specify the
+      standard for C++ code, e.g.\sspace{}\option{-std=c++98}.  This
+      makes it easier to work with compilers which default to a later
+      standard: for example, with \code{CXX=g++6 CXXSTD=-std=c++98}
+      \command{configure} will select commands for \command{g++} 6.x
+      which conform to C++11 and C++14 where specified but otherwise use
+      C++98.
+
+      \item Support for the defunct IRIX and OSF/1 OSes and Alpha CPU
+      has been removed.
+
+      \item \command{configure} checks that the compiler specified by
+      \samp{$CXX $CXXFLAGS} is able to compile C++ code.
+
+      \item \command{configure} checks for the required header
+      \file{sys/select.h} (or \file{sys/time.h} on legacy systems) and
+      system call \code{select} and aborts if they are not found.
+
+      \item If available, the POSIX 2008 system call \code{utimensat}
+      will be used by \code{Sys.setFileTime()} and
+      \code{file.copy(copy.date = TRUE)}.  This may result in slightly
+      more accurate file times.  (It is available on Linux and FreeBSD
+      but not macOS.)
+      %% My Solaris 10 system does not have it, but Oracle's online help does
+
+      \item The minimum version requirement for \code{libcurl} has been
+      reduced to 7.22.0, although at least 7.28.0 is preferred and
+      earlier versions are little tested.  (This is to support Debian 7
+      \sQuote{Wheezy} LTS and Ubuntu \sQuote{Precise} 12.04 LTS,
+      although the latter is close to end-of-life.)
+      %% Debian Wheezy LTS is supported until 2018-05-31
+
+      \item \command{configure} tests for a C++17-compliant compiler.
+      The tests are experimental and subject to change in the future.
+    }
+  }
+
+  \subsection{INCLUDED SOFTWARE}{
+    \itemize{
+      \item (Windows only) Tcl/Tk version 8.6.4 is now included in the
+      binary builds.  The \file{tcltk*.chm} help file is no longer
+      included; please consult the online help at
+      \url{http://www.tcl.tk/man/} instead.
+
+      \item The version of LAPACK included in the sources has been
+      updated to 3.7.0: no new routines have been added to \R{}.
+    }
+  }
+
+  \subsection{PACKAGE INSTALLATION}{
+    \itemize{
+      \item There is support for compiling C++14 or C++17 code in
+      packages on suitable platforms: see \sQuote{Writing R Extensions}
+      for how to request this.
+
+      \item The order of flags when \samp{LinkingTo} other packages has
+      been changed so their include directories come earlier, before
+      those specified in \code{CPPFLAGS}.  This will only have an effect
+      if non-system include directories are included with \option{-I}
+      flags in \code{CPPFLAGS} (and so not the default
+      \code{-I/usr/local/include} which is treated as a system include
+      directory on most platforms).
+      %% This ensures that BH's 'boost' directory gets precedent over
+      %% any Boost headers in, say, /opt/csw/include .
+
+      \item Packages which register native routines for \code{.C} or
+      \code{.Fortran} need to be re-installed for this version (unless
+      installed with R-devel SVN revision r72375 or later).
+
+      \item Make variables with names containing \code{CXX1X} are
+      deprecated in favour of those using \code{CXX11}, but for the time
+      being are still made available \emph{via} file
+      \file{etc/Makeconf}.  Packages using them should be converted to
+      the new forms and made dependent on \samp{R (>= 3.4.0)}.
+    }
+  }
+
+  \subsection{UTILITIES}{
+    \itemize{
+      \item Running \command{R CMD check --as-cran} with
+      \env{_R_CHECK_CRAN_INCOMING_REMOTE_} false now skips tests that
+      require remote access.  The remaining (local) tests typically
+      run quickly compared to the remote tests.
+
+      \item \command{R CMD build} will now give priority to vignettes
+      produced from files in the \file{vignettes} directory over those
+      in the \file{inst/doc} directory, with a warning that the latter
+      are being ignored.
+
+      \item \command{R CMD config} gains a \option{--all} option for
+      printing names and values of all basic configure variables.
+
+      It now knows about all the variables used for the C++98, C++11 and
+      C++14 standards.
+
+      \item \command{R CMD check} now checks that output files in
+      \file{inst/doc} are newer than the source files in \file{vignettes}.
+
+      \item For consistency with other package subdirectories, files
+      named \file{*.r} in the \file{tests} directory are now recognized
+      as tests by \command{R CMD check}. (Wish of \PR{17143}.)
+
+      \item \command{R CMD build} and \command{R CMD check} now use the
+      \emph{union} of \env{R_LIBS} and \code{.libPaths()}.  They may not
+      be equivalent, e.g., when the latter is determined by
+      \env{R_PROFILE}.
+
+      \item \command{R CMD build} now preserves dates when it copies files
+      in preparing the tarball.  (Previously on Windows it changed the
+      dates on all files; on Unix, it changed some dates when installing
+      vignettes.)
+
+      \item The new option \command{R CMD check --no-stop-on-test-error}
+      allows running the remaining tests (under \file{tests/}) even if
+      one gave an error.
+
+      \item Check customization \emph{via} environment variables to
+      detect side effects of \code{.Call()} and \code{.External()} calls
+      which alter their arguments is described in §8 of the \sQuote{R
+      Internals} manual.
+
+      \item \command{R CMD check} now checks any \samp{BugReports} field
+      to be non-empty and a suitable single URL.
+
+      \item \command{R CMD check --as-cran} now NOTEs if the package
+      does not register its native routines or does not declare its
+      intentions on (native) symbol search.  (This will become a WARNING
+      in due course.)
+    }
+  }
+
+  \subsection{DEPRECATED AND DEFUNCT}{
+    \itemize{
+      \item (Windows only) Function \code{setInternet2()} is defunct.
+
+      \item Installation support for \code{readline} emulations based on
+      \code{editline} (aka \code{libedit}) is deprecated.
+
+      \item Use of the C/C++ macro \samp{NO_C_HEADERS} is defunct and
+      silently ignored.
+
+      \item \code{unix.time()}, a traditional synonym for
+      \code{system.time()}, has been deprecated.
+
+      \item \code{structure(NULL, ..)} is now deprecated as you cannot
+      set attributes on \code{\link{NULL}}.
+
+      \item Header \file{Rconfig.h} no longer defines
+      \samp{SUPPORT_OPENMP}; instead use \samp{_OPENMP} (as documented
+      for a long time).
+
+      \item (C-level Native routine registration.)  The deprecated
+      \code{styles} member of the \code{R_CMethodDef} and
+      \code{R_FortranMethodDef} structures has been removed.
+      Packages using these will need to be re-installed for \R 3.4.0.
+
+      \item The deprecated support for PCRE versions older than 8.20
+      will be removed in \R 3.4.1. (Versions 8.20--8.31 will still be
+      accepted but remain deprecated.)
+    }
+  }
+
+  \subsection{BUG FIXES}{
+    \itemize{
+      \item Getting or setting \code{body()} or \code{formals()} on
+      non-functions for now signals a warning and may become an error
+      for setting.
+
+      \item \code{match(x, t)}, \code{duplicated(x)} and
+      \code{unique(x)} work as documented for complex numbers with \code{NA}s
+      or \code{NaN}s, where all those containing \code{NA} do match,
+      whereas in the case of \code{NaN}'s both real and imaginary parts
+      must match, compatibly with how \code{print()} and \code{format()}
+      work for complex numbers.
+
+      \item \code{deparse(<complex>, options = "digits17")} prints more
+      nicely now, mostly thanks to a suggestion by Richie Cotton.
+
+      \item Rotated symbols in plotmath expressions are now positioned
+      correctly on \code{x11(type = "Xlib")}. (\PR{16948})
+
+      \item \code{as<-()} avoids an infinite loop when a virtual class
+      is interposed between a subclass and an actual superclass.
+
+      \item Fix level propagation in \code{unlist()} when the list
+      contains zero-length lists or factors.
+
+      \item Fix S3 dispatch on S4 objects when the \pkg{methods} package is
+      not attached.
+
+      \item Internal S4 dispatch sets \code{.Generic} in the method
+      frame for consistency with \code{standardGeneric()}.  (\PR{16929})
+
+      \item Fix \code{order(x, decreasing = TRUE)} when \code{x} is an
+      integer vector containing \code{MAX_INT}.  Ported from a fix Matt
+      Dowle made to \CRANpkg{data.table}.
+
+      \item Fix caching by \code{callNextMethod()}, resolves \PR{16973}
+      and \PR{16974}.
+
+      \item \code{grouping()} puts NAs last, to be consistent with the
+      default behavior of \code{order()}.
+
+      \item Point mass limit cases: \code{qpois(-2, 0)} now gives
+      \code{NaN} with a warning and \code{qgeom(1, 1)} is \code{0}.
+      (\PR{16972})
+
+      \item \code{table()} no longer drops an \code{"NaN"} factor level,
+      and better obeys \code{exclude = <chr>}, thanks to Suharto Anggono's
+      patch for \PR{16936}.  Also, in the case of \code{exclude = NULL}
+      and \code{NA}s, these are tabulated correctly (again).
+
+      Further, \code{table(1:2, exclude = 1, useNA = "ifany")} no longer
+      erroneously reports \code{<NA>} counts.
+
+      Additionally, all cases of empty \code{exclude} are equivalent,
+      and \code{useNA} is not overwritten when specified (as it was by
+      \code{exclude = NULL}).
+
+      \item \code{wilcox.test(x, conf.int=TRUE)} no longer errors out in
+      cases where the confidence interval is not available, such as for
+      \code{x = 0:2}.
+
+      \item \code{droplevels(f)} now keeps <NA> levels when present.
+
+      \item In integer arithmetic, \code{NULL} is now treated as
+      \code{integer(0)} whereas it was previously treated as \code{double(0)}.
+
+      \item The radix sort considers \code{NA_real_} and \code{NaN} to
+      be equivalent in rank (like the other sort algorithms).
+
+      \item When \code{index.return=TRUE} is passed to \code{sort.int()},
+      the radix sort treats \code{NA}s like \code{sort.list()} does
+      (like the other sort algorithms).
+
+      \item When in \code{tabulate(bin, nbin)} \code{length(bin)} is
+      larger than the maximal integer, the result is now of type
+      \code{double} and hence no longer silently overflows to wrong
+      values.  (\PR{17140})
+
+      \item \code{as.character.factor()} respects S4 inheritance when
+      checking the type of its argument. (\PR{17141})
+
+      \item The \code{factor} method for \code{print()} no longer sets
+      the class of the factor to \code{NULL}, which would violate a
+      basic constraint of an S4 object.
+
+      \item \code{formatC(x, flag = f)} allows two new flags, and
+      signals an error for invalid flags also in the case of character
+      formatting.
+
+      \item Reading from \code{file("stdin")} now also closes the
+      connection and hence no longer leaks memory when reading from a
+      full pipe, thanks to Gábor Csárdi, see thread starting at
+      \url{https://stat.ethz.ch/pipermail/r-devel/2016-November/073360.html}.
+
+      \item Failure to create file in \code{tempdir()} for compressed
+      \code{pdf()} graphics device no longer errors (then later
+      segfaults).  There is now a warning instead of error and
+      compression is turned off for the device.  Thanks to Alec
+      Wysoker (\PR{17191}).
+
+      \item Asking for \code{methods()} on \code{"|"} returns only S3
+      methods. See
+      \url{https://stat.ethz.ch/pipermail/r-devel/2016-December/073476.html}.
+
+      \item \code{dev.capture()} using Quartz Cocoa device (macOS) returned
+      invalid components if the back-end chose to use ARGB instead of RGBA
+      image format. (Reported by Noam Ross.)
+
+      \item \code{seq("2", "5")} now works too, equivalently to
+      \code{"2":"5"} and \code{seq.int()}.
+
+      \item \code{seq.int(to = 1, by = 1)} is now correct, other cases are
+      integer (instead of \code{double}) when \code{seq()} is integer
+      too, and the "non-finite" error messages are consistent between
+      \code{seq.default()} and \code{seq.int()}, no longer mentioning
+      \code{NaN} etc.
+
+      \item \code{rep(x, times)} and \code{rep.int(x, times)} now work
+      when \code{times} is larger than the largest value representable
+      in an integer vector.  (\PR{16932})
+
+      \item \code{download.file(method = "libcurl")} does not check for
+      URL existence before attempting downloads; this is more robust to
+      servers that do not support HEAD or range-based retrieval, but may
+      create empty or incomplete files for aborted download requests.
+
+      \item Bandwidth selectors \code{bw.ucv()}, \code{bw.bcv()} and
+      \code{bw.SJ()} now avoid integer overflow for large sample sizes.
+
+      \item \code{str()} no longer shows \code{"list output truncated"},
+      in cases that list was not shown at all.  Thanks to Neal Fultz
+      (\PR{17219})
+
+      \item Fix for \code{cairo_pdf()} (and \code{svg()} and
+      \code{cairo_ps()}) when replaying a saved display list that contains
+      a mix of \pkg{grid} and \pkg{graphics} output.
+      (Report by Yihui Xie.)
+
+      %% It never failed in a released version of R: pre-3.3.3 did
+      %% \item \code{rep(3, list(4))} works again, as \code{\link{list}}s
+      %% \emph{are} vectors.
+
+      \item The \code{str()} and \code{as.hclust()} methods for
+      \code{"dendrogram"} now also work for deeply nested dendrograms
+      thanks to non-recursive implementations by Bradley Broom.
+
+      \item \code{sample()} now uses two uniforms for added precision
+      when the uniform generator is \code{Knuth-TAOCP},
+      \code{Knuth-TAOCP-2002}, or a user-defined generator and the
+      population size is \eqn{2^{25}}{2^25} or greater.
+
+      \item If a vignette in the \file{vignettes} directory is listed in
+      \file{.Rbuildignore}, \command{R CMD build} would not include it
+      in the tarball, but would include it in the vignette database,
+      leading to a check warning.  (\PR{17246})
+
+      \item \code{tools::latexToUtf8()} infinite looped on certain
+      inputs.  (\PR{17138})
+
+      \item \code{terms.formula()} ignored argument names when determining
+      whether two terms were identical.  (\PR{17235})
+
+      \item \code{callNextMethod()} was broken when called from a method
+      that augments the formal arguments of a primitive generic.
+
+      \item Coercion of an S4 object to a vector during sub-assignment
+      into a vector failed to dispatch through the \code{as.vector()}
+      generic (often leading to a segfault).
+
+      \item Fix problems in command completion:  Crash (\PR{17222})
+      and junk display in Windows, handling special characters in
+      filenames on all systems.
+    }
+  }
+}
+
+\section{\Rlogo CHANGES IN R 3.3.3}{
+  \subsection{NEW FEATURES}{
+    \itemize{
+      \item Changes when redirection of a \samp{http://} URL to a
+      \samp{https://} URL is encountered:
+
+      \itemize{
+	\item The internal methods of \code{download.file()} and
+	\code{url()} now report that they cannot follow this (rather
+	than failing silently).
+
+	\item (Unix-alike) \code{download.file(method = "auto")} (the
+	default) re-tries with \code{method = "libcurl"}.
+
+	\item (Unix-alike) \code{url(method = "default")} with an
+	explicit \code{open} argument re-tries with
+	\code{method = "libcurl"}.  This covers many of the usages,
+	e.g.\sspace{}\code{readLines()} with a URL argument.
+      }
+    }
+  }
+
+  \subsection{INSTALLATION on a UNIX-ALIKE}{
+    \itemize{
+      \item The \command{configure} check for the \code{zlib} version is
+      now robust to versions longer than 5 characters, including
+      \code{1.2.11}.
+    }
+  }
+
+  \subsection{UTILITIES}{
+    \itemize{
+      \item Environmental variable \env{_R_CHECK_TESTS_NLINES_} controls
+      how \command{R CMD check} reports failing tests (see §8 of the
+      \sQuote{R Internals} manual).
+    }
+  }
+
+  \subsection{DEPRECATED AND DEFUNCT}{
+    \itemize{
+      \item (C-level Native routine registration.)  The undocumented
+      \code{styles} field of the components of \code{R_CMethodDef} and
+      \code{R_FortranMethodDef} is deprecated.
+    }
+  }
+
+  \subsection{BUG FIXES}{
+    \itemize{
+      \item \code{vapply(x, *)} now works with long vectors \code{x}.
+      (\PR{17174})
+
+      \item \code{isS3method("is.na.data.frame")} and similar are
+      correct now.  (\PR{17171})
+
+      \item \code{grepRaw(<long>, <short>, fixed = TRUE)} now works,
+      thanks to a patch by Mikko Korpela.  (\PR{17132})
+
+      \item Package installation into a library where the package exists
+      \emph{via} symbolic link now should work wherever
+      \code{Sys.readlink()} works, resolving \PR{16725}.
+
+      \item \code{"Cincinnati"} was missing an \code{"n"} in the
+      \code{precip} dataset.
+
+      \item Fix buffer overflow vulnerability in \code{pdf()} when
+      loading an encoding file.  Reported by Talos (TALOS-2016-0227).
+
+      \item \code{getDLLRegisteredRoutines()} now produces its warning
+      correctly when multiple DLLs match, thanks to Matt Dowle's \PR{17184}.
+
+      \item \code{Sys.timezone()} now returns non-NA also on platforms
+      such as \samp{Ubuntu 14.04.5 LTS}, thanks to Mikko Korpela's
+      \PR{17186}.
+
+      \item \code{format(x)} for an illegal \code{"POSIXlt"} object
+      \code{x} no longer segfaults.
+
+      \item \code{methods(f)} now also works for \code{f} \code{"("}
+      or \code{"{"}.
+
+      \item (Windows only)  \code{dir.create()} did not check the length
+      of the path to create, and so could overflow a buffer and crash
+      \R.  (\PR{17206})
+
+      \item On some systems, very small hexadecimal numbers in hex notation
+      would underflow to zero.  (\PR{17199})
+
+      \item \code{pmin()} and \code{pmax()} now work again for
+      \code{ordered} factors and 0-length S3 classed objects, thanks to
+      Suharto Anggono's \PR{17195} and \PR{17200}.
+
+      \item \code{bug.report()} did not do any validity checking on a
+      package's \samp{BugReports} field.  It now ignores an empty field,
+      removes leading whitespace and only attempts to open
+      \samp{http://} and \samp{https://} URLs, falling back to emailing
+      the maintainer.
+
+      \item Bandwidth selectors \code{bw.ucv()} and
+      \code{bw.SJ()} gave incorrect answers or incorrectly reported an
+      error (because of integer overflow) for inputs longer than
+      46341.  Similarly for \code{bw.bcv()} at length 5793.
+
+      Another possible integer overflow is checked and may result in an
+      error report (rather than an incorrect result) for much longer
+      inputs (millions for a smooth distribution).
+
+      \item \code{findMethod()} failed if the active signature had
+      expanded beyond what a particular package used. (Example with
+      packages \CRANpkg{XR} and \CRANpkg{XRJulia} on \acronym{CRAN}.)
+
+      \item \code{qbeta()} underflowed too early in some very asymmetric
+      cases.  (\PR{17178})
+
+      \item \command{R CMD Rd2pdf} had problems with packages with
+      non-ASCII titles in \file{.Rd} files (usually the titles were
+      omitted).
+    }
+  }
+}
+
+\section{\Rlogo CHANGES IN R 3.3.2}{
+  \subsection{NEW FEATURES}{
+    \itemize{
+      \item \code{extSoftVersion()} now reports the version (if any) of
+      the \code{readline} library in use.
+
+      \item The version of LAPACK included in the sources has been
+      updated to 3.6.1, a bug-fix release including a speedup for the
+      non-symmetric case of \code{eigen()}.
+
+      \item Use \code{options(deparse.max.lines=)} to limit the number
+      of lines recorded in \code{.Traceback} and other deparsing
+      activities.
+
+      \item \code{format(<AsIs>)} looks more regular, also for
+      non-character atomic matrices.
+
+      \item \code{abbreviate()} gains an option \code{named = TRUE}.
+
+      \item The online documentation for package \pkg{methods} is
+      extensively rewritten.  The goals are to simplify
+      documentation for basic use, to note old features not
+      recommended and to correct out-of-date information.
+
+      \item Calls to \code{setMethod()} no longer print a message when
+      creating a generic function in those cases where that is
+      natural: S3 generics and primitives.
+    }
+  }
+
+  \subsection{INSTALLATION and INCLUDED SOFTWARE}{
+    \itemize{
+      \item Versions of the \code{readline} library >= 6.3 had been
+      changed so that terminal window resizes were not signalled to
+      \code{readline}: code has been added using a explicit signal
+      handler to work around that (when \R is compiled against readline
+      >= 6.3).  (\PR{16604})
+
+      \item \command{configure} works better with Oracle Developer
+      Studio 12.5.
+    }
+  }
+
+  \subsection{UTILITIES}{
+    \itemize{
+      \item \command{R CMD check} reports more dubious flags in files
+      \file{src/Makevars[.in]}, including \option{-w} and \option{-g}.
+
+      \item \command{R CMD check} has been set up to filter important
+      warnings from recent versions of \command{gfortran} with
+      \option{-Wall -pedantic}: this now reports non-portable GNU
+      extensions such as out-of-order declarations.
+
+      \item \command{R CMD config} works better with paths containing
+      spaces, even those of home directories (as reported by Ken Beath).
+    }
+  }
+
+  \subsection{DEPRECATED AND DEFUNCT}{
+    \itemize{
+      \item Use of the C/C++ macro \samp{NO_C_HEADERS} is deprecated
+      (no C headers are included by \R headers from C++ as from \R
+      3.3.0, so it should no longer be needed).
+    }
+  }
+
+  \subsection{BUG FIXES}{
+    \itemize{
+      \item The check for non-portable flags in \command{R CMD check}
+      could be stymied by \file{src/Makevars} files which contained
+      targets.
+
+      \item (Windows only) When using certain desktop themes in Windows
+      7 or higher, \kbd{Alt-Tab} could cause \command{Rterm} to stop
+      accepting input.  (\PR{14406}; patch submitted by Jan Gleixner.)
+
+      \item \code{pretty(d, ..)} behaves better for date-time \code{d}
+      (\PR{16923}).
+
+      \item When an S4 class name matches multiple classes in the S4
+      cache, perform a dynamic search in order to obey namespace
+      imports.  This should eliminate annoying messages about multiple
+      hits in the class cache.  Also, pass along the package from the
+      \code{ClassExtends} object when looking up superclasses in the
+      cache.
+
+      \item \code{sample(NA_real_)} now works.
+
+      \item Packages using non-ASCII encodings in their code did not
+      install data properly on systems using different encodings.
+
+      \item \code{merge(df1, df2)} now also works for data frames with
+      column names \code{"na.last"}, \code{"decreasing"}, or
+      \code{"method"}.  (\PR{17119})
+
+      \item \code{contour()} caused a segfault if the \code{labels}
+      argument had length zero.  (Reported by Bill Dunlap.)
+
+      \item \code{unique(warnings())} works more correctly, thanks to a
+      new \code{duplicated.warnings()} method.
+
+      \item \code{findInterval(x, vec = numeric(), all.inside = TRUE)}
+      now returns \code{0}s as documented.  (Reported by Bill Dunlap.)
+
+      \item (Windows only) \command{R CMD SHLIB} failed when a symbol
+      in the resulting library had the same name as a keyword in
+      the \file{.def} file.  (\PR{17130})
+
+      \item \code{pmax()} and \code{pmin()} now work with (more ?)
+      classed objects, such as \code{"Matrix"} from the \CRANpkg{Matrix}
+      package, as documented for a long time.
+
+      \item \code{axis(side, x = D)} and hence \code{Axis()} and
+      \code{plot()} now work correctly for \code{"Date"} and time
+      objects \code{D}, even when \dQuote{time goes backward}, e.g.,
+      with decreasing \code{xlim}.  (Reported by William May.)
+
+      \item \code{str(I(matrix(..)))} now looks as always intended.
+
+      \item \code{plot.ts()}, the \code{plot()} method for time series,
+      now respects \code{cex}, \code{lwd} and \code{lty}.  (Reported by
+      Greg Werbin.)
+
+      \item \code{parallel::mccollect()} now returns a named list (as
+      documented) when called with \code{wait = FALSE}.  (Reported by
+      Michel Lang.)
+
+      \item If a package added a class to a class union in another
+      package, loading the first package gave erroneous warnings
+      about \dQuote{undefined subclass}.
+
+      \item \code{c()}'s argument \code{use.names} is documented now, as
+      belonging to the (C internal) default method.   In
+      \dQuote{parallel}, argument \code{recursive} is also moved from
+      the generic to the default method, such that the formal argument list
+      of \pkg{base} generic \code{c()} is just \code{(...)}.
+
+      \item \code{rbeta(4, NA)} and similarly \code{rgamma()} and
+      \code{rnbinom()} now return \code{NaN}'s with a warning, as other
+      r<dist>(), and as documented.  (\PR{17155})
+
+      \item Using \code{options(checkPackageLicense = TRUE)} no longer
+      requires acceptance of the licence for non-default standard
+      packages such as \pkg{compiler}.  (Reported by Mikko Korpela.)
+
+      \item \code{split(<very_long>, *)} now works even when the split
+      off parts are long. (\PR{17139})
+
+      \item \code{min()} and \code{max()} now also work correctly when
+      the argument list starts with \code{character(0)}.  (\PR{17160})
+
+      \item Subsetting very large matrices (\code{prod(dim(.)) >= 2^31})
+      now works thanks to Michael Schubmehl's \PR{17158}.
+
+      \item \code{bartlett.test()} used residual sums of squares
+      instead of variances, when the argument was a list of \code{lm} objects.
+      (Reported by Jens Ledet Jensen).
+
+      \item \code{plot(<lm>, which = *)} now correctly labels the
+      contour lines for the standardized residuals for \code{which = 6}.
+      It also takes the correct \eqn{p} in case of singularities (also
+      for \code{which = 5}).  (\PR{17161})
+
+      \item \code{xtabs(~ exclude)} no longer fails from wrong scope,
+      thanks to Suharto Anggono's \PR{17147}.
+
+      \item Reference class calls to \code{methods()} did not
+      re-analyse previously defined methods, meaning that calls to
+      methods defined later would fail. (Reported by Charles Tilford).
+
+      \item \code{findInterval(x, vec, left.open = TRUE)} misbehaved in some
+      cases. (Reported by Dmitriy Chernykh.)
+    }
+  }
+}
+
+\section{\Rlogo CHANGES IN R 3.3.1}{
+  \subsection{BUG FIXES}{
+    \itemize{
+      \item \command{R CMD INSTALL} and hence \code{install.packages()}
+      gave an internal error installing a package called
+      \pkg{description} from a tarball on a case-insensitive file system.
+
+      \item \code{match(x, t)} (and hence \code{x \%in\% t}) failed
+      when \code{x} was of length one, and either \code{character} and \code{x}
+      and \code{t} only differed in their \code{Encoding} or when
+      \code{x} and \code{t} where \code{complex} with \code{NA}s or \code{NaN}s.
+      (\PR{16885}.)
+
+      \item \code{unloadNamespace(ns)} also works again when \code{ns} is a
+      \sQuote{namespace}, as from \code{getNamespace()}.
+
+      \item \code{rgamma(1, Inf)} or \code{rgamma(1, 0, 0)} no longer give
+      \code{NaN} but the correct limit.
+
+      \item \code{length(baseenv())} is correct now.
+
+      \item \code{pretty(d, ..)} for date-time \code{d} rarely failed
+      when \code{"halfmonth"} time steps were tried (\PR{16923}) and
+      on \sQuote{inaccurate} platforms such as 32-bit Windows or
+      a configuration with \command{--disable-long-double}; see comment
+      #15 of \PR{16761}.
+
+      \item In \code{text.default(x, y, labels)}, the rarely(?) used
+      default for \code{labels} is now correct also for the case of a
+      2-column matrix \code{x} and missing \code{y}.
+
+      \item \code{as.factor(c(a = 1L))} preserves \code{names()} again
+      as in \R < 3.1.0.
+
+      \item \code{strtrim(""[0], 0[0])} now works.
+
+      \item Use of \code{Ctrl-C} to terminate a reverse incremental
+      search started by \code{Ctrl-R} in the \code{readline}-based Unix
+      terminal interface is now supported when \R{} was compiled against
+      \code{readline} >= 6.0 (\code{Ctrl-G} always worked).
+      (\PR{16603})
+
+      \item \code{diff(<difftime>)} now keeps the \code{"units"}
+      attribute, as subtraction already did, \PR{16940}.
+    }
+  }
+}
+
+\section{\Rlogo CHANGES IN R 3.3.0}{
+  \subsection{SIGNIFICANT USER-VISIBLE CHANGES}{
+    \itemize{
+      \item \code{nchar(x, *)}'s argument \code{keepNA} governing how
+      the result for \code{NA}s in \code{x} is determined, gets a new
+      default \code{keepNA = NA} which returns \code{NA} where
+      \code{x} is \code{NA}, except for \code{type = "width"} which still
+      returns \code{2}, the formatting / printing width of \code{NA}.
+
+      \item All builds have support for \samp{https:} URLs in the
+      default methods for \code{download.file()}, \code{url()} and code
+      making use of them.
+
+      Unfortunately that cannot guarantee that any particular
+      \samp{https:} URL can be accessed.  For example, server and client
+      have to successfully negotiate a cryptographic protocol (TLS/SSL,
+      \dots) and the server's identity has to be verifiable \emph{via}
+      the available certificates.  Different access methods may allow
+      different protocols or use private certificate bundles: we
+      encountered a \samp{https:} CRAN mirror which could be accessed by
+      one browser but not by another nor by \code{download.file()} on
+      the same Linux machine.
+    }
+  }
+
+  \subsection{NEW FEATURES}{
+    \itemize{
+      \item The \code{print} method for \code{methods()} gains a
+      \code{byclass} argument.
+
+      \item New functions \code{validEnc()} and \code{validUTF8()} to
+      give access to the validity checks for inputs used by
+      \code{grep()} and friends.
+
+      \item Experimental new functionality for S3 method checking, notably
+      \code{isS3method()}.
+
+      Also, the names of the \R \sQuote{language elements} are exported
+      as character vector \code{tools::langElts}.
+
+      \item \code{str(x)} now displays \code{"Time-Series"} also for
+      matrix (multivariate) time-series, i.e. when \code{is.ts(x)} is true.
+
+      \item (Windows only)  The GUI menu item to install local packages
+      now accepts \file{*.tar.gz} files as well as \file{*.zip} files
+      (but defaults to the latter).
+
+      \item New programmeR's utility function \code{chkDots()}.
+
+      \item \code{D()} now signals an error when given invalid input,
+      rather than silently returning \code{NA}.  (Request of John Nash.)
+
+      \item \code{formula} objects are slightly more \dQuote{first class}:
+      e.g., \code{formula()} or \code{new("formula", y ~ x)} are now
+      valid.  Similarly, for \code{"table"}, \code{"ordered"} and
+      \code{"summary.table"}.  Packages defining S4 classes with the above
+      S3/S4 classes as slots should be reinstalled.
+      % notably if their classes are reused in other
+      % packages. e.g. re-install arules for arulesSequence, flexmix for betareg
+
+      \item New function \code{strrep()} for repeating the elements of a
+      character vector.
+
+      \item \code{rapply()} preserves attributes on the list when
+      \code{how = "replace"}.
+
+      \item New S3 generic function \code{sigma()} with methods for
+      extracting the estimated standard deviation aka \dQuote{residual
+	standard deviation} from a fitted model.
+
+      \item \code{news()} now displays \R and package news files within
+      the HTML help system if it is available.  If no news file is found,
+      a visible \code{NULL} is returned to the console.
+
+      \item \code{as.raster(x)} now also accepts \code{raw} arrays
+      \code{x} assuming values in \code{0:255}.
+
+      \item Subscripting of matrix/array objects of type
+      \code{"expression"} is now supported.
+
+      \item \code{type.convert("i")} now returns a factor instead of a
+      complex value with zero real part and missing imaginary part.
+
+      \item Graphics devices \code{cairo_pdf()} and \code{cairo_ps()}
+      now allow non-default values of the cairographics \sQuote{fallback
+	resolution} to be set.
+
+      This now defaults to 300 on all platforms: that is the default
+      documented by cairographics, but apparently was not used by all
+      system installations.
+
+      \item \code{file()} gains an explicit \code{method} argument
+      rather than implicitly using
+      \code{getOption("url.method", "default")}.
+
+      \item Thanks to a patch from Tomas Kalibera, \code{x[x != 0]} is
+      now typically faster than \code{x[which(x != 0)]} (in the case
+      where \code{x} has no NAs, the two are equivalent).
+
+      \item \code{read.table()} now always uses the names for a named
+      \code{colClasses} argument (previously names were only used when
+      \code{colClasses} was too short). (In part, wish of \PR{16478}.)
+
+      \item (Windows only) \code{download.file()} with default
+      \code{method = "auto"} and a \samp{ftps://} URL chooses
+      \code{"libcurl"} if that is available.
+
+      \item The out-of-the box Bioconductor mirror has been changed to
+      one using \samp{https://}: use \code{chooseBioCmirror()} to choose
+      a \samp{http://} mirror if required.
+
+      \item The data frame and formula methods for \code{aggregate()}
+      gain a \code{drop} argument.
+
+      \item \code{available.packages()} gains a \code{repos} argument.
+
+      \item The undocumented switching of methods for \code{url()} on
+      \samp{https:} and \samp{ftps:} URLs is confined to
+      \code{method = "default"} (and documented).
+
+      \item \code{smoothScatter()} gains a \code{ret.selection} argument.
+
+      \item \code{qr()} no longer has a \code{\dots} argument to pass
+      additional arguments to methods.
+
+      \item \code{[} has a method for class \code{"table"}.
+
+      \item It is now possible (again) to \code{replayPlot()} a
+      display list snapshot that was created by \code{recordPlot()}
+      in a different \R session.
+
+      It is still not a good idea to use snapshots as a persistent
+      storage format for \R plots, but it is now not completely silly to
+      use a snapshot as a format for transferring an R plot between two
+      R sessions.
+
+      The underlying changes mean that packages providing graphics
+      devices (e.g., \CRANpkg{Cairo}, \CRANpkg{RSvgDevice},
+      \CRANpkg{cairoDevice}, \CRANpkg{tikzDevice}) will need to be
+      reinstalled.
+
+      Code for restoring snapshots was contributed by Jeroen Ooms
+      and JJ Allaire.
+
+      Some testing code is available at
+      \url{https://github.com/pmur002/R-display-list}.
+
+      \item \code{tools::undoc(dir = D)} and \code{codoc(dir = D)} now
+      also work when \code{D} is a directory whose \code{normalizePath()}ed
+      version does not end in the package name, e.g.\sspace{}from a symlink.
+
+      \item \code{abbreviate()} has more support for multi-byte
+      character sets -- it no longer removes bytes within characters and
+      knows about Latin vowels with accents.  It is still only
+      really suitable for (most) European languages, and still warns on
+      non-ASCII input.
+
+      \code{abbreviate(use.classes = FALSE)} is now implemented, and
+      that is more suitable for non-European languages.
+
+      \item \code{match(x, table)} is faster (sometimes by an order of
+      magnitude) when \code{x} is of length one and \code{incomparables}
+      is unchanged, thanks to Peter Haverty (\PR{16491}).
+
+      \item More consistent, partly not back-compatible behavior of
+      \code{NA} and \code{NaN} coercion to complex numbers, operations
+      less often resulting in complex \code{NA} (\code{NA_complex_}).
+
+      \item \code{lengths()} considers methods for \code{length} and
+      \code{[[} on \code{x}, so it should work automatically on any
+      objects for which appropriate methods on those generics are
+      defined.
+
+      \item The logic for selecting the default screen device on OS X
+      has been simplified: it is now \code{quartz()} if that is
+      available even if environment variable \env{DISPLAY} has been set
+      by the user.
+
+      The choice can easily be overridden \emph{via} environment
+      variable \env{R_INTERACTIVE_DEVICE}.
+
+      \item On Unix-like platforms which support the \command{getline} C
+      library function, \code{system(*,intern = TRUE)} no longer
+      truncates (output) lines longer than 8192 characters, thanks to
+      Karl Millar. (\PR{16544})
+
+      \item \code{rank()} gains a \code{ties.method = "last"} option,
+      for convenience (and symmetry).
+
+      %% \item \code{getRcode(vignette(..))} is the \R source file name of
+      %% a vignette.
+
+      \item \code{regmatches(invert = NA)} can now be used to extract
+      both non-matched and matched substrings.
+
+      \item \code{data.frame()} gains argument \code{fix.empty.names};
+      \code{as.data.frame.list()} gets new \code{cut.names},
+      \code{col.names} and \code{fix.empty.names}.
+
+      \item \code{plot(x ~ x, *)} now warns that it is the same as
+      \code{plot(x ~ 1, *)}.
+
+      \item \code{recordPlot()} has new arguments \code{load} and
+      \code{attach} to allow package names to be stored as part of a
+      recorded plot.  \code{replayPlot()} has new argument
+      \code{reloadPkgs} to load/attach any package names that were
+      stored as part of a recorded plot.
+
+      \item S4 dispatch works within calls to \code{.Internal()}. This
+      means explicit S4 generics are no longer needed for
+      \code{unlist()} and \code{as.vector()}.
+
+      \item Only font family names starting with \samp{"Hershey"} (and
+      not \samp{"Her"} as before) are given special treatment by the
+      graphics engine.
+
+      \item S4 values are automatically coerced to vector (\emph{via}
+      \code{as.vector}) when subassigned into atomic vectors.
+
+      \item \code{findInterval()} gets a \code{left.open} option.
+
+      \item The version of LAPACK included in the sources has been
+      updated to 3.6.0, including those \sQuote{deprecated} routines
+      which were previously included.  \emph{Ca} 40 double-complex
+      routines have been added at the request of a package maintainer.
+
+      As before, the details of what is included are in
+      \file{src/modules/lapack/README} and this now gives information on
+      earlier additions.
+
+      \item \code{tapply()} has been made considerably more efficient
+      without changing functionality, thanks to proposals from Peter
+      Haverty and Suharto Anggono.  (\PR{16640})
+
+      \item \code{match.arg(arg)} (the one-argument case) is faster; so
+      is \code{sort.int()}.  (\PR{16640})
+
+      \item The \code{format} method for \code{object_size} objects now
+      also accepts \dQuote{binary} units such as \code{"KiB"} and e.g.,
+      \code{"Tb"}.  (Partly from \PR{16649}.)
+
+      \item Profiling now records calls of the form \code{foo::bar} and
+      some similar cases directly rather than as calls to
+      \code{<Anonymous>}.  Contributed by Winston Chang.
+
+      \item New string utilities \code{startsWith(x, prefix)} and
+      \code{endsWith(x, suffix)}.  Also provide speedups for some
+      \code{grepl("^...",*)} uses (related to proposals in \PR{16490}).
+
+      \item Reference class finalizers run at exit, as well as on
+      garbage collection.
+
+      \item Avoid \pkg{parallel} dependency on \pkg{stats} for port
+      choice and random number seeds.  (\PR{16668})
+
+      \item The radix sort algorithm and implementation from
+      \CRANpkg{data.table} (\code{forder}) replaces the previous radix
+      (counting) sort and adds a new method for \code{order()}.
+      Contributed by Matt Dowle and Arun Srinivasan, the new algorithm
+      supports logical, integer (even with large values), real, and
+      character vectors.  It outperforms all other methods, but there
+      are some caveats (see \code{?sort}).
+
+      \item The \code{order()} function gains a \code{method} argument
+      for choosing between \code{"shell"} and \code{"radix"}.
+
+      \item New function \code{grouping()} returns a permutation that
+      stably rearranges data so that identical values are adjacent.  The
+      return value includes extra partitioning information on the
+      groups.  The implementation came included with the new radix sort.
+
+      \item \code{rhyper(nn, m, n, k)} no longer returns \code{NA} when
+      one of the three parameters exceeds the maximal integer.
+
+      \item \code{switch()} now warns when no alternatives are provided.
+
+      \item \code{parallel::detectCores()} now has default \code{logical
+	= TRUE} on all platforms -- as this was the default on Windows,
+      this change only affects Sparc Solaris.
+
+      Option \code{logical = FALSE} is now supported on Linux and recent
+      versions of OS X (for the latter, thanks to a suggestion of Kyaw
+      Sint).
+
+      \item \code{hist()} for \code{"Date"} or \code{"POSIXt"} objects
+      would sometimes give misleading labels on the breaks, as they
+      were set to the day before the start of the period being
+      displayed.  The display format has been changed, and the shift of the
+      start day has been made conditional on \code{right = TRUE} (the
+      default).  (\PR{16679})
+
+      \item \R now uses a new version of the logo (donated to the R
+      Foundation by RStudio).  It is defined in \file{.svg} format, so
+      will resize without unnecessary degradation when displayed on
+      HTML pages---there is also a vector PDF version.  Thanks to
+      Dirk Eddelbuettel for producing the corresponding X11 icon.
+
+      \item New function \code{.traceback()} returns the stack trace
+      which \code{traceback()} prints.
+
+      \item \code{lengths()} dispatches internally.
+
+      \item \code{dotchart()} gains a \code{pt.cex} argument to control
+      the size of points separately from the size of plot labels.
+      Thanks to Michael Friendly and Milan Bouchet-Valat for ideas
+      and patches.
+
+      \item \code{as.roman(ch)} now correctly deals with more diverse
+      character vectors \code{ch}; also arithmetic with the resulting
+      roman numbers works in more cases.  (\PR{16779})
+
+      \item \code{prcomp()} gains a new option \code{rank.} allowing to
+      directly aim for less than \code{min(n,p)} PC's.  The
+      \code{summary()} and its \code{print()} method have been amended,
+      notably for this case.
+
+      \item \code{gzcon()} gains a new option \code{text}, which marks
+      the connection as text-oriented (so e.g.\sspace{}\code{pushBack()}
+      works).  It is still always opened in binary mode.
+
+      \item The \code{import()} namespace directive now accepts an
+      argument \code{except} which names symbols to exclude from the
+      imports. The \code{except} expression should evaluate to a
+      character vector (after substituting symbols for strings). See
+      Writing R Extensions.
+
+      \item New convenience function \code{Rcmd()} in package
+      \pkg{tools} for invoking \command{R CMD} tools from within \R.
+
+      \item New functions \code{makevars_user()} and
+      \code{makevars_site()} in package \pkg{tools} to determine the
+      location of the user and site specific \file{Makevars} files for
+      customizing package compilation.
+    }
+  }
+
+  \subsection{UTILITIES}{
+    \itemize{
+      \item \command{R CMD check} has a new option
+      \option{--ignore-vignettes} for use with non-Sweave vignettes
+      whose \samp{VignetteBuilder} package is not available.
+
+      \item \command{R CMD check} now by default checks code usage
+      (\emph{via} \CRANpkg{codetools}) with only the base package
+      attached.  Functions from default packages other than \pkg{base}
+      which are used in the package code but not imported are reported
+      as undefined globals, with a suggested addition to the
+      \code{NAMESPACE} file.
+
+      \item \command{R CMD check --as-cran} now also checks DOIs in
+      package \file{CITATION} and Rd files.
+
+      \item \command{R CMD Rdconv} and \command{R CMD Rd2pdf} each have
+      a new option \option{--RdMacros=pkglist} which allows Rd macros
+      to be specified before processing.
+    }
+  }
+
+  \subsection{DEPRECATED AND DEFUNCT}{
+    \itemize{
+      \item The previously included versions of \code{zlib},
+      \code{bzip2}, \code{xz} and PCRE have been removed, so suitable
+      external (usually system) versions are required (see the
+      \sQuote{R Installation and Administration} manual).
+
+      \item The unexported and undocumented Windows-only devices
+      \code{cairo_bmp()}, \code{cairo_png()} and \code{cairo_tiff()}
+      have been removed.  (These devices should be used as
+      e.g.\sspace{}\code{bmp(type = "cairo")}.)
+
+      \item (Windows only)  Function \code{setInternet2()} has no effect
+      and will be removed in due course.  The choice between methods
+      \code{"internal"} and \code{"wininet"} is now made by the
+      \code{method} arguments of \code{url()} and \code{download.file()}
+      and their defaults can be set \emph{via} options.  The
+      out-of-the-box default remains \code{"wininet"} (as it has been
+      since \R 3.2.2).
+
+      \item \code{[<-} with an S4 value into a list currently embeds the
+      S4 object into its own list such that the end result is roughly
+      equivalent to using \code{[[<-}.  That behavior is deprecated.  In
+      the future, the S4 value will be coerced to a list with
+      \code{as.list()}.
+
+      \item Package \pkg{tools}' functions
+      \code{package.dependencies()}, \code{pkgDepends()}, etc are
+      deprecated now, mostly in favor of \code{package_dependencies()}
+      which is both more flexible and efficient.
+    }
+  }
+
+  \subsection{INSTALLATION and INCLUDED SOFTWARE}{
+    \itemize{
+      \item Support for very old versions of \command{valgrind}
+      (e.g., 3.3.0) has been removed.
+
+      \item The included \command{libtool} script (generated by
+      \command{configure}) has been updated to version 2.4.6 (from 2.2.6a).
+
+      \item \code{libcurl} version 7.28.0 or later with support for the
+      \code{https} protocol is required for installation (except on
+      Windows).
+
+      \item BSD networking is now required (except on Windows) and so
+      \code{capabilities("http/ftp")} is always true.
+
+      \item \command{configure} uses \command{pkg-config} for PNG, TIFF
+      and JPEG where this is available.  This should work better with
+      multiple installs and with those using static libraries.
+
+      \item The minimum supported version of OS X is 10.6 (\sQuote{Snow
+	Leopard}): even that has been unsupported by Apple since 2012.
+
+      \item The \command{configure} default on OS X is
+      \option{--disable-R-framework}: enable this if you intend to
+      install under \file{/Library/Frameworks} and use with \code{R.app}.
+
+      \item The minimum preferred version of PCRE has since \R 3.0.0
+      been 8.32 (released in Nov 2012).  Versions 8.10 to 8.31 are now
+      deprecated (with warnings from \command{configure}), but will
+      still be accepted until \R 3.4.0.
+
+      \item \command{configure} looks for C functions \code{__cospi},
+      \code{__sinpi} and \code{__tanpi} and uses these if \code{cospi}
+      \emph{etc} are not found.  (OS X is the main instance.)
+
+      \item (Windows) R is now built using \command{gcc}
+      4.9.3.  This build will require recompilation of at least those packages
+      that include C++ code, and possibly others.  A build of R-devel using
+      the older toolchain will be temporarily available for comparison
+      purposes.
+
+      During the transition, the environment variable
+      \env{R_COMPILED_BY} has been defined to indicate which toolchain
+      was used to compile R (and hence, which should be used to compile
+      code in packages).  The \code{COMPILED_BY} variable described below
+      will be a permanent replacement for this.
+
+      \item (Windows) A \command{make} and \command{R CMD config} variable
+      named \code{COMPILED_BY} has been added.  This indicates
+      which toolchain was used to compile R (and hence, which should be
+      used to compile code in packages).
+    }
+  }
+
+  \subsection{PACKAGE INSTALLATION}{
+    \itemize{
+      \item The \command{make} macro \code{AWK} which used to be made
+      available to files such as \file{src/Makefile} is no longer set.
+    }
+  }
+
+  \subsection{C-LEVEL FACILITIES}{
+    \itemize{
+      \item The API call \code{logspace_sum} introduced in \R 3.2.0 is
+      now remapped as an entry point to \code{Rf_logspace_sum}, and its
+      first argument has gained a \code{const} qualifier.  (\PR{16470})
+
+      Code using it will need to be reinstalled.
+
+      Similarly, entry point \code{log1pexp} also defined in
+      \file{Rmath.h} is remapped there to \code{Rf_log1pexp}
+
+      \item \code{R_GE_version} has been increased to \code{11}.
+
+      \item New API call \code{R_orderVector1}, a faster
+      one-argument version of \code{R_orderVector}.
+
+      \item When \R{} headers such as \file{R.h} and \file{Rmath.h} are
+      called from C++ code in packages they include the C++ versions of
+      system headers such as \file{<cmath>} rather than the legacy
+      headers such as \file{<math.h>}.  (Headers \file{Rinternals.h} and
+      \file{Rinterface.h} already did, and inclusion of system headers
+      can still be circumvented by defining \code{NO_C_HEADERS},
+      including as from this version for those two headers.)
+
+      The manual has long said that \R{} headers should \bold{not} be
+      included within an \code{extern "C"} block, and almost all the
+      packages affected by this change were doing so.
+
+      \item Including header \file{S.h} from C++ code would fail on some
+      platforms, and so gives a compilation error on all.
+
+      \item The deprecated header \file{Rdefines.h} is now compatible
+      with defining \code{R_NO_REMAP}.
+
+      \item The connections API now includes a function
+      \code{R_GetConnection()} which allows packages implementing
+      connections to convert R \code{connection} objects to
+      \code{Rconnection} handles used in the API. Code which previously
+      used the low-level R-internal \code{getConnection()} entry point
+      should switch to the official API.
+    }
+  }
+
+  \subsection{BUG FIXES}{
+    \itemize{
+      \item C-level \code{asChar(x)} is fixed for when \code{x} is not a
+      vector, and it returns \code{"TRUE"}/\code{"FALSE"} instead of
+      \code{"T"}/\code{"F"} for logical vectors.
+
+      \item The first arguments of \code{.colSums()} etc (with an
+      initial dot) are now named \code{x} rather than \code{X} (matching
+      \code{colSums()}): thus error messages are corrected.
+
+      \item A \code{coef()} method for class \code{"maov"} has been
+      added to allow \code{vcov()} to work with multivariate
+      results. (\PR{16380})
+
+      \item \code{method = "libcurl"} connections signal errors rather
+      than retrieving HTTP error pages (where the ISP reports the
+      error).
+
+      \item \code{xpdrows.data.frame()} was not checking for unique
+      row names; in particular, this affected assignment to non-existing
+      rows \emph{via} numerical indexing. (\PR{16570})
+
+      \item \code{tail.matrix()} did not work for zero rows matrices,
+      and could produce row \dQuote{labels} such as \code{"[1e+05,]"}.
+
+      \item Data frames with a column named \code{"stringsAsFactors"}
+      now format and print correctly.  (\PR{16580})
+
+      \item \code{cor()} is now guaranteed to return a value with
+      absolute value less than or equal to 1. (\PR{16638})
+
+      \item Array subsetting now keeps \code{names(dim(.))}.
+
+      \item Blocking socket connection selection recovers more
+      gracefully on signal interrupts.
+
+      \item The \code{data.frame} method of \code{rbind()} construction
+      \code{row.names} works better in borderline integer cases, but
+      may change the names assigned.  (\PR{16666})
+
+      \item (X11 only)  \code{getGraphicsEvent()} miscoded buttons and
+      missed mouse motion events.  (\PR{16700})
+
+      \item \code{methods(round)} now also lists \code{round.POSIXt}.
+
+      \item \code{tar()} now works with the default \code{files = NULL}.
+      (\PR{16716})
+
+      \item Jumps to outer contexts, for example in error recovery, now
+      make intermediate jumps to contexts where \code{on.exit()} actions
+      are established instead of trying to run all \code{on.exit()}
+      actions before jumping to the final target. This unwinds the stack
+      gradually, releases resources held on the stack, and significantly
+      reduces the chance of a segfault when running out of C stack
+      space. Error handlers established using
+      \code{withCallingHandlers()} and \code{options("error")}
+      specifications are ignored when handling a C stack overflow error
+      as attempting one of these would trigger a cascade of C stack
+      overflow errors.  (These changes resolve \PR{16753}.)
+
+      \item The spacing could be wrong when printing a complex array.
+      (Report and patch by Lukas Stadler.)
+
+      \item \code{pretty(d, n, min.n, *)} for date-time objects \code{d}
+      works again in border cases with large \code{min.n}, returns a
+      \code{labels} attribute also for small-range dates and in such cases
+      its returned length is closer to the desired \code{n}.  (\PR{16761})
+      Additionally, it finally does cover the range of \code{d}, as it
+      always claimed.
+
+      \item \code{tsp(x) <- NULL} did not handle correctly objects
+      inheriting from both \code{"ts"} and \code{"mts"}.  (\PR{16769})
+
+      \item \code{install.packages()} could give false errors when
+      \code{options("pkgType")} was \code{"binary"}.  (Reported by
+      Jose Claudio Faria.)
+
+      \item A bug fix in \R 3.0.2 fixed problems with \code{locator()}
+      in X11, but introduced problems in Windows.  Now both should be
+      fixed.  (\PR{15700})
+
+      \item \code{download.file()} with \code{method = "wininet"}
+      incorrectly warned of download file length difference when
+      reported length was unknown. (\PR{16805})
+
+      \item \code{diag(NULL, 1)} crashed because of missed type
+      checking.  (\PR{16853})
+    }
+  }
+}
+
+\section{\Rlogo CHANGES IN R 3.2.5}{
+  \subsection{BUG FIXES}{
+    \itemize{
+      \item \code{format.POSIXlt()} behaved incorrectly in \R 3.2.4.
+      E.g.\sspace{}the output of
+      \code{format(as.POSIXlt(paste0(1940:2000,"-01-01"), tz = "CET"),
+	usetz = TRUE)} ended in two \code{"CEST"} time formats.
+    }
+  }
+}
+
+\section{\Rlogo CHANGES IN R 3.2.4}{
+  \subsection{NEW FEATURES}{
+    \itemize{
+      \item \code{install.packages()} and related functions now give a
+      more informative warning when an attempt is made to install a base
+      package.
+
+      \item \code{summary(x)} now prints with less rounding when
+      \code{x} contains infinite values. (Request of \PR{16620}.)
+
+      \item \code{provideDimnames()} gets an optional \code{unique} argument.
+
+      \item \code{shQuote()} gains \code{type = "cmd2"} for quoting
+      in \command{cmd.exe} in Windows.  (Response to \PR{16636}.)
+
+      \item The \code{data.frame} method of \code{rbind()} gains an
+      optional argument \code{stringsAsFactors} (instead of only
+      depending on \code{getOption("stringsAsFactors")}).
+
+      \item \code{smooth(x, *)} now also works for long vectors.
+
+      \item \code{tools::texi2dvi()} has a workaround for problems with
+      the \command{texi2dvi} script supplied by \pkg{texinfo 6.1}.
+
+      It extracts more error messages from the LaTeX logs when in
+      emulation mode.
+    }
+  }
+
+  \subsection{UTILITIES}{
+    \itemize{
+      \item \command{R CMD check} will leave a log file
+      \file{build_vignettes.log} from the re-building of vignettes in
+      the \file{.Rcheck} directory if there is a problem, and always if
+      environment variable \env{_R_CHECK_ALWAYS_LOG_VIGNETTE_OUTPUT_} is
+      set to a true value.
+    }
+  }
+
+  \subsection{DEPRECATED AND DEFUNCT}{
+    \itemize{
+      \item Use of \samp{SUPPORT_OPENMP} from header \file{Rconfig.h} is
+      deprecated in favour of the standard OpenMP define \samp{_OPENMP}.
+
+      (This has been the recommendation in the manual for a while now.)
+
+      \item The \command{make} macro \code{AWK} which is long unused by
+      \R itself but recorded in file \file{etc/Makeconf} is deprecated
+      and will be removed in \R 3.3.0.
+
+      \item The C header file \file{S.h} is no longer documented: its
+      use should be replaced by \file{R.h}.
+    }
+  }
+
+  \subsection{BUG FIXES}{
+    \itemize{
+      \item \code{kmeans(x, centers = <1-row>)} now works. (\PR{16623})
+
+      \item \code{Vectorize()} now checks for clashes in argument names.
+      (\PR{16577})
+
+      \item \code{file.copy(overwrite = FALSE)} would signal a successful
+      copy when none had taken place.  (\PR{16576})
+
+      \item \code{ngettext()} now uses the same default domain as
+      \code{gettext()}.  (\PR{14605})
+
+      \item \code{array(.., dimnames = *)} now warns about
+      non-\code{list} dimnames and, from \R 3.3.0, will signal the same
+      error for invalid dimnames as \code{matrix()} has always done.
+
+      \item \code{addmargins()} now adds dimnames for the extended
+      margins in all cases, as always documented.
+
+      \item \code{heatmap()} evaluated its \code{add.expr} argument
+      in the wrong environment.  (\PR{16583})
+
+      \item \code{require()} etc now give the correct entry of
+      \code{lib.loc} in the warning about an old version of a package
+      masking a newer required one.
+
+      \item The internal deparser did not add parentheses when
+      necessary,  e.g. before \code{[]} or \code{[[]]}.  (Reported by
+      Lukas Stadler; additional fixes included as well).
+
+      \item \code{as.data.frame.vector(*, row.names=*)} no longer
+      produces \sQuote{corrupted} data frames from row names of incorrect
+      length, but rather warns about them.  This will become an error.
+
+      \item \code{url} connections with \code{method = "libcurl"} are
+      destroyed properly. (\PR{16681})
+
+      \item \code{withCallingHandler()} now (again) handles warnings
+      even during S4 generic's argument evaluation.  (\PR{16111})
+
+      \item \code{deparse(..., control = "quoteExpressions")}
+      incorrectly quoted empty expressions.  (\PR{16686})
+
+      \item \code{format()}ting datetime objects (\code{"POSIX[cl]?t"})
+      could segfault or recycle wrongly.  (\PR{16685})
+
+      \item \code{plot.ts(<matrix>, las = 1)} now does use \code{las}.
+
+      \item \code{saveRDS(*, compress = "gzip")} now works as
+      documented.  (\PR{16653})
+
+      \item (Windows only) The \command{Rgui} front end did not
+      always initialize the console properly, and could cause
+      \R to crash.  (\PR{16698})
+
+      \item \code{dummy.coef.lm()} now works in more cases, thanks to a
+      proposal by Werner Stahel (\PR{16665}).  In addition, it now works
+      for multivariate linear models (\code{"mlm"}, \code{\link{manova}})
+      thanks to a proposal by Daniel Wollschlaeger.
+
+      \item The \code{as.hclust()} method for \code{"dendrogram"}s
+      failed often when there were ties in the heights.
+
+      \item \code{reorder()} and \code{midcache.dendrogram()} now are
+      non-recursive and hence applicable to somewhat deeply nested
+      dendrograms, thanks to a proposal by Suharto Anggono in \PR{16424}.
+
+      \item \code{cor.test()} now calculates very small p values
+      more accurately (affecting the result only in extreme not
+      statistically relevant cases).  (\PR{16704})
+
+      \item \code{smooth(*, do.ends=TRUE)} did not always work correctly
+      in \R versions between 3.0.0 and 3.2.3.
+
+      \item \code{pretty(D)} for date-time objects \code{D} now also
+      works well if \code{range(D)} is (much) smaller than a second.  In
+      the case of only one unique value in \code{D}, the pretty range
+      now is more symmetric around that value than previously.
+      \cr
+      Similarly, \code{pretty(dt)} no longer returns a length 5 vector
+      with duplicated entries for \code{Date} objects \code{dt} which
+      span only a few days.
+
+      \item The figures in help pages such as \code{?points} were
+      accidentally damaged, and did not appear in \R 3.2.3.
+      (\PR{16708})
+
+      \item \code{available.packages()} sometimes deleted the wrong
+      file when cleaning up temporary files.  (\PR{16712})
+
+      \item The \code{X11()} device sometimes froze on Red Hat
+      Enterprise Linux 6. It now waits for \code{MapNotify} events
+      instead of \code{Expose} events, thanks to Siteshwar
+      Vashisht. (\PR{16497})
+
+      \item \code{[dpqr]nbinom(*, size=Inf, mu=.)} now works as limit
+      case, for \sQuote{dpq} as the Poisson.  (\PR{16727})\cr
+      \code{pnbinom()} no longer loops infinitely in border cases.
+
+      \item \code{approxfun(*, method="constant")} and hence \code{ecdf()}
+      which calls the former now correctly \dQuote{predict} \code{NaN}
+      values as \code{NaN}.
+
+      \item \code{summary.data.frame()} now displays \code{NA}s in
+      \code{Date} columns in all cases.  (\PR{16709})
+    }
+  }
+}
+
+\section{\Rlogo CHANGES IN R 3.2.3}{
+  \subsection{NEW FEATURES}{
+    \itemize{
+      \item Some recently-added Windows time zone names have been added
+      to the conversion table used to convert these to Olson names.
+      (Including those relating to changes for Russia in Oct 2014, as in
+      \PR{16503}.)
+
+      \item (Windows) Compatibility information has been added to the
+      manifests for \file{Rgui.exe}, \file{Rterm.exe} and
+      \file{Rscript.exe}.  This should allow \code{win.version()} and
+      \code{Sys.info()} to report the actual Windows version up to
+      Windows 10.
+
+      \item Windows \code{"wininet"} FTP first tries EPSV / PASV mode
+      rather than only using active mode (reported by Dan Tenenbaum).
+      %% https://stat.ethz.ch/pipermail/r-devel/2015-August/071595.html
+
+      \item \code{which.min(x)} and \code{which.max(x)} may be much
+      faster for logical and integer \code{x} and now also work for long
+      vectors.
+
+      \item The \sQuote{emulation} part of \code{tools::texi2dvi()} has
+      been somewhat enhanced, including supporting \code{quiet = TRUE}.
+      It can be selected by \code{texi2dvi = "emulation"}.
+
+      (Windows) MiKTeX removed its \code{texi2dvi.exe} command in Sept
+      2015: \code{tools::texi2dvi()} tries \code{texify.exe} if it is
+      not found.
+
+      \item (Windows only) Shortcuts for printing and saving have
+      been added to menus in \command{Rgui.exe}.  (Request of \PR{16572}.)
+
+      \item \code{loess(..., iterTrace=TRUE)} now provides diagnostics
+      for robustness iterations, and the \code{print()} method for
+      \code{summary(<loess>)} shows slightly more.
+
+      \item The included version of PCRE has been updated to 8.38, a
+      bug-fix release.
+
+      \item \code{View()} now displays nested data frames in a more
+      friendly way.  (Request with patch in \PR{15915}.)
+    }
+  }
+
+  \subsection{INSTALLATION and INCLUDED SOFTWARE}{
+    \itemize{
+      \item The included configuration code for \code{libintl} has been
+      updated to that from \code{gettext} version 0.19.5.1 --- this
+      should only affect how an external library is detected (and the
+      only known instance is under OpenBSD).  (Wish of \PR{16464}.)
+
+      \item \command{configure} has a new argument
+      \option{--disable-java} to disable the checks for Java.
+
+      \item The \command{configure} default for \code{MAIN_LDFLAGS} has
+      been changed for the FreeBSD, NetBSD and Hurd OSes to one more
+      likely to work with compilers other than \command{gcc} (FreeBSD 10
+      defaults to \command{clang}).
+
+      \item \command{configure} now supports the OpenMP flags
+      \option{-fopenmp=libomp} (clang) and \option{-qopenmp} (Intel C).
+
+      \item Various macros can be set to override the default
+      behaviour of \command{configure} when detecting OpenMP: see file
+      \file{config.site}.
+
+      \item Source installation on Windows has been modified to allow
+      for MiKTeX installations without \command{texi2dvi.exe}.  See file
+      \file{MkRules.dist}.
+    }
+  }
+
+  \subsection{BUG FIXES}{
+    \itemize{
+      \item \code{regexpr(pat, x, perl = TRUE)} with Python-style named
+      capture did not work correctly when \code{x} contained \code{NA}
+      strings.  (\PR{16484})
+
+      \item The description of dataset \code{ToothGrowth} has been
+      improved/corrected.  (\PR{15953})
+
+      \item \code{model.tables(type = "means")} and hence
+      \code{TukeyHSD()} now support \code{"aov"} fits without an
+      intercept term.  (\PR{16437})
+
+      \item \code{close()} now reports the status of a \code{pipe()}
+      connection opened with an explicit \code{open} argument.
+      (\PR{16481})
+
+      \item Coercing a list without names to a data frame is faster if
+      the elements are very long. (\PR{16467})
+
+      \item (Unix-only) Under some rare circumstances piping the output
+      from \command{Rscript} or \command{R -f} could result in
+      attempting to close the input file twice, possibly crashing the
+      process.  (\PR{16500})
+
+      \item (Windows) \code{Sys.info()} was out of step with
+      \code{win.version()} and did not report Windows 8.
+
+      \item \code{topenv(baseenv())} returns \code{baseenv()} again as
+      in \R 3.1.0 and earlier.  This also fixes \code{compilerJIT(3)}
+      when used in \file{.Rprofile}.
+
+      \item \code{detach()}ing the \pkg{methods} package keeps
+      \code{.isMethodsDispatchOn()} true, as long as the methods
+      namespace is not unloaded.% This keeps a sane state, see the reg-S4 test
+
+      \item Removed some spurious warnings from \command{configure} about the
+      preprocessor not finding header files.  (\PR{15989})
+
+      \item \code{rchisq(*, df=0, ncp=0)} now returns \code{0} instead
+      of \code{NaN}, and \code{dchisq(*, df=0, ncp=*)} also no longer
+      returns \code{NaN} in limit cases (where the limit is unique).
+      (\PR{16521})
+
+      \item \code{pchisq(*, df=0, ncp > 0, log.p=TRUE)} no longer
+      underflows (for ncp > ~60).
+
+      \item \code{nchar(x, "w")} returned -1 for characters it did not
+      know about (e.g.\sspace{}zero-width spaces): it now assumes 1.
+      It now knows about most zero-width characters and a few more
+      double-width characters.
+
+      \item Help for \code{which.min()} is now more precise about
+      behavior with logical arguments.  (\PR{16532})
+
+      \item The print width of character strings marked as
+      \code{"latin1"} or \code{"bytes"} was in some cases computed
+      incorrectly.
+
+      \item \code{abbreviate()} did not give names to the return value
+      if \code{minlength} was zero, unlike when it was positive.
+
+      \item (Windows only) \code{dir.create()} did not always warn
+      when it failed to create a directory.  (\PR{16537})
+
+      \item When operating in a non-UTF-8 multibyte locale
+      (e.g.\sspace{}an East Asian locale on Windows), \code{grep()} and
+      related functions did not handle UTF-8 strings properly.
+      (\PR{16264})
+
+      \item \code{read.dcf()} sometimes misread lines longer than 8191
+      characters.  (Reported by Hervé Pagès with a patch.)
+
+      \item \code{within(df, ..)} no longer drops columns whose name
+      start with a \code{"."}.
+
+      \item The built-in \code{HTTP} server converted entire
+      \code{Content-Type} to lowercase including parameters which
+      can cause issues for multi-part form boundaries (\PR{16541}).
+
+      \item Modifying slots of S4 objects could fail when the
+      \pkg{methods} package was not attached. (\PR{16545})
+
+      \item \code{splineDesign(*, outer.ok=TRUE)} (\pkg{splines}) is better now
+      (\PR{16549}), and \code{interpSpline()} now allows \code{sparse=TRUE}
+      for speedup with non-small sizes.
+
+      \item If the expression in the traceback was too long,
+      \code{traceback()} did not report the source line number.  (Patch
+      by Kirill Müller.)
+
+      \item The browser did not truncate the display of the function when
+      exiting with \code{options("deparse.max.lines")} set.
+      (\PR{16581})
+
+      \item When \code{bs(*, Boundary.knots=)} had boundary knots inside
+      the data range, extrapolation was somewhat off.  (Patch by Trevor
+      Hastie.)
+
+      \item \code{var()} and hence \code{sd()} warn about
+      \code{factor} arguments which are deprecated now. (\PR{16564})
+
+      \item \code{loess(*, weights = *)} stored wrong weights and hence
+      gave slightly wrong predictions for \code{newdata}.  (\PR{16587})
+
+      \item \code{aperm(a, *)} now preserves \code{names(dim(a))}.
+
+      \item \code{poly(x, ..)} now works when either \code{raw=TRUE} or
+      \code{coef} is specified.  (\PR{16597})
+
+      \item \code{data(package=*)} is more careful in determining the path.
+
+      \item \code{prettyNum(*, decimal.mark, big.mark)}: fixed bug
+      introduced when fixing \PR{16411}.
+    }
+  }
+}
+
+\section{\Rlogo CHANGES IN R 3.2.2}{
+  \subsection{SIGNIFICANT USER-VISIBLE CHANGES}{
+    \itemize{
+      \item It is now easier to use secure downloads from
+      \samp{https://} URLs on builds which support them: no longer do
+      non-default options need to be selected to do so.  In particular,
+      packages can be installed from repositories which offer
+      \samp{https://} URLs, and those listed by \code{setRepositories()}
+      now do so (for some of their mirrors).
+
+      Support for \samp{https://} URLs is available on Windows, and on
+      other platforms if support for \code{libcurl} was compiled in and
+      if that supports the \code{https} protocol (system installations
+      can be expected to do).  So \samp{https://} support can be
+      expected except on rather old OSes (an example being OS X
+      \sQuote{Snow Leopard}, where a non-system version of
+      \code{libcurl} can be used).
+
+      (Windows only) The default method for accessing URLs \emph{via}
+      \code{download.file()} and \code{url()} has been changed to be
+      \code{"wininet"} using Windows API calls.  This changes the way
+      proxies need to be set and security settings made: there have been
+      some reports of \samp{ftp:} sites being inaccessible under the new default
+      method (but the previous methods remain available).
+    }
+  }
+
+  \subsection{NEW FEATURES}{
+    \itemize{
+      \item \code{cmdscale()} gets new option \code{list.} for increased
+      flexibility when a list should be returned.
+
+      \item \command{configure} now supports \code{texinfo} version 6.0,
+      which (unlike the change from 4.x to 5.0) is a minor update.
+      (Wish of \PR{16456}.)
+
+      \item (Non-Windows only) \code{download.file()} with default
+      \code{method = "auto"} now chooses \code{"libcurl"} if that is
+      available and a \samp{https://} or \samp{ftps://} URL is used.
+
+      \item (Windows only) \code{setInternet2(TRUE)} is now the default.
+      The command-line option \command{--internet2} and environment
+      variable \env{R_WIN_INTERNET2} are now ignored.
+
+      Thus by default the \code{"internal"} method for
+      \code{download.file()} and \code{url()} uses the \code{"wininet"}
+      method: to revert to the previous default use
+      \code{setInternet2(FALSE)}.
+
+      This means that \samp{https://} URLs can be read by default by
+      \code{download.file()} (they have been readable by \code{file()}
+      and \code{url()} since \R 3.2.0).
+
+      There are implications for how proxies need to be set (see
+      \code{?download.file}).
+
+      \item \code{chooseCRANmirror()} and \code{chooseBioCmirror()} now
+      offer HTTPS mirrors in preference to HTTP mirrors.  This changes
+      the interpretation of their \code{ind} arguments: see their help
+      pages.
+
+      \item \code{capture.output()} gets optional arguments \code{type}
+      and \code{split} to pass to \code{sink()}, and hence can be used to
+      capture messages.
+    }
+  }
+
+  \subsection{C-LEVEL FACILITIES}{
+    \itemize{
+      \item Header \file{Rconfig.h} now defines \code{HAVE_ALLOCA_H} if
+      the platform has the \file{alloca.h} header (it is needed to
+      define \code{alloca} on Solaris and AIX, at least: see
+      \sQuote{Writing R Extensions} for how to use it).
+    }
+  }
+
+  \subsection{INSTALLATION and INCLUDED SOFTWARE}{
+    \itemize{
+      \item The \command{libtool} script generated by
+      \command{configure} has been modified to support FreeBSD >= 10
+      (\PR{16410}).
+    }
+  }
+
+  \subsection{BUG FIXES}{
+    \itemize{
+      \item The HTML help page links to demo code failed due to a change
+      in \R 3.2.0.  (\PR{16432})
+
+      \item If the \code{na.action} argument was used in
+      \code{model.frame()}, the original data could be
+      modified. (\PR{16436})
+
+      \item \code{getGraphicsEvent()} could cause a crash if a graphics
+      window was closed while it was in use. (\PR{16438})
+
+      \item \code{matrix(x, nr, nc, byrow = TRUE)} failed if \code{x}
+      was an object of type \code{"expression"}.
+
+      \item \code{strptime()} could overflow the allocated storage on
+      the C stack when the timezone had a non-standard format much
+      longer than the standard formats. (Part of \PR{16328}.)
+
+      \item \code{options(OutDec = s)} now signals a warning (which will
+      become an error in the future) when \code{s} is not a string with
+      exactly one character, as that has been a documented requirement.
+
+      \item \code{prettyNum()} gains a new option \code{input.d.mark}
+      which together with other changes, e.g., the default for
+      \code{decimal.mark}, fixes some \code{format()}ting variants with
+      non-default \code{getOption("OutDec")} such as in \PR{16411}.
+
+      \item \code{download.packages()} failed for \code{type} equal to
+      either \code{"both"} or \code{"binary"}.  (Reported by Dan
+      Tenenbaum.)
+
+      \item The \code{dendrogram} method of \code{labels()} is much more
+      efficient for large dendrograms, now using \code{rapply()}.
+      (Comment #15 of \PR{15215})
+
+      \item The \code{"port"} algorithm of \code{nls()} could give
+      spurious errors.  (Reported by Radford Neal.)
+
+      \item Reference classes that inherited from reference classes in
+      another package could invalidate methods of the inherited
+      class. Fixing this requires adding the ability for methods to be
+      \dQuote{external}, with the object supplied explicitly as the first
+      argument, named \code{.self}. See "Inter-Package Superclasses"
+      in the documentation.
+
+      \item \code{readBin()} could fail on the SPARC architecture
+      due to alignment issues.  (Reported by Radford Neal.)
+
+      \item \code{qt(*, df=Inf, ncp=.)} now uses the natural
+      \code{qnorm()} limit instead of returning \code{NaN}. (\PR{16475})
+
+      \item Auto-printing of S3 and S4 values now searches for
+      \code{print()} in the base namespace and \code{show()} in the
+      \pkg{methods} namespace instead of searching the global
+      environment.
+
+      \item \code{polym()} gains a \code{coefs = NULL} argument and
+      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
+
+      \item \code{rhyper(nn, <large>)} now works correctly. (\PR{16489})
+
+      \item \code{ttkimage()} did not (and could not) work so was
+      removed. Ditto for \code{tkimage.cget()} and
+      \code{tkimage.configure()}. Added two Ttk widgets and missing
+      subcommands for Tk's \code{image} command:
+      \code{ttkscale()},
+      \code{ttkspinbox()},
+      \code{tkimage.delete()},
+      \code{tkimage.height()},
+      \code{tkimage.inuse()},
+      \code{tkimage.type()},
+      \code{tkimage.types()},
+      \code{tkimage.width()}. (\PR{15372}, \PR{16450})
+
+      \item \code{getClass("foo")} now also returns a class definition when it is
+      found in the cache more than once.
+    }
+  }
+}
+
+\section{\Rlogo CHANGES IN R 3.2.1}{
+  \subsection{NEW FEATURES}{
+    \itemize{
+      \item \code{utf8ToInt()} now checks that its input is valid UTF-8
+      and returns \code{NA} if it is not.
+
+      \item \code{install.packages()} now allows \code{type = "both"}
+      with \code{repos = NULL} if it can infer the type of file.
+
+      \item \code{nchar(x, *)} and \code{nzchar(x)} gain a new argument
+      \code{keepNA} which governs how the result for \code{NA}s in
+      \code{x} is determined.  For \code{nzchar()} in general and
+      \code{nchar()} in the \R 3.2.x series, the default
+      remains \code{FALSE} which is fully back compatible.
+      From \R 3.3.0, \code{nchar()}'s default will change to
+      \code{keepNA = NA} and you are advised to consider this for code
+      portability.
+
+      \item \code{news()} more flexibly extracts dates from package
+      \file{NEWS.Rd} files.
+
+      \item \code{lengths(x)} now also works (trivially) for atomic
+      \code{x} and hence can be used more generally as an efficient
+      replacement of \code{sapply(x, length)} and similar.
+
+      \item The included version of PCRE has been updated to 8.37, a
+      bug-fix release.
+
+      \item \code{diag()} no longer duplicates a matrix when extracting
+      its diagonal.
+
+      \item \code{as.character.srcref()} gains an argument to allow
+      characters corresponding to a range of source references to be
+      extracted.
+    }
+  }
+
+  \subsection{BUG FIXES}{
+    \itemize{
+      \item \code{acf()} and \code{ccf()} now guarantee values strictly
+      in \eqn{[-1,1]} (instead of sometimes very slightly outside). \PR{15832}.
+
+      \item \code{as.integer("111111111111")} now gives NA (with a warning) as
+      it does for the corresponding numeric or negative number
+      coercions.  Further, \code{as.integer(M + 0.1)} now gives \code{M}
+      (instead of NA) when M is the maximal representable integer.
+
+      \item On some platforms \code{nchar(x, "c")} and \code{nchar(x, "w")}
+      would return values (possibly \code{NA}) for inputs which were
+      declared to be UTF-8 but were not, or for invalid strings without a
+      marked encoding in a multi-byte locale, rather than give an
+      error.  Additional checks have been added to mitigate this.
+
+      \item \code{apply(a, M, function(u) c(X = ., Y = .))} again
+      has dimnames containing "X" and "Y" (as in R < 3.2.0).
+
+      \item (Windows only) In some cases, the \command{--clean} option
+      to \command{R CMD INSTALL} could fail.  (\PR{16178})
+
+      \item (Windows only) \code{choose.files()} would occasionally
+      include characters from the result of an earlier call in
+      the result of a later one.  (\PR{16270})
+
+      \item A change in \code{RSiteSearch()} in \R 3.2.0 caused it to
+      submit invalid URLs.  (\PR{16329})
+
+      \item \command{Rscript} and command line \command{R} silently
+      ignored incomplete statements at the end of a script; now they
+      are reported as parse errors.  (\PR{16350})
+
+      \item Parse data for very long strings was not stored.  (\PR{16354})
+
+      \item \code{plotNode()}, the workhorse of the \code{plot} method
+      for \code{"dendrogram"}s is no longer recursive, thanks to Suharto
+      Anggono, and hence also works for deeply nested dendrograms.  (\PR{15215})
+
+      \item The parser could overflow internally when given numbers
+      in scientific format with extremely large exponents.  (\PR{16358})
+
+      \item If the CRAN mirror was not set, \code{install.packages(type = "both")}
+      and related functions could repeatedly query the user for it.
+      (Part of \PR{16362})
+
+      \item The low-level functions \code{.rowSums()} etc. did not
+      check the length of their argument, so could segfault. (\PR{16367})
+
+      \item The \code{quietly} argument of \code{library()} is now
+      correctly propagated from \code{.getRequiredPackages2()}.
+
+      \item Under some circumstances using the internal PCRE when
+      building \R from source would cause external libs such as
+      \code{-llzma} to be omitted from the main link.
+
+      \item The .Primitive default methods of the logic operators, i.e.,
+      \code{!}, \code{&} and \code{|}, now give correct error messages
+      when appropriate, e.g., for \code{`&`(TRUE)} or \code{`!`()}.
+      (\PR{16385})
+
+      \item \code{cummax(x)} now correctly propagates \code{NA}s also
+      when \code{x} is of type \code{integer} and begins with an \code{NA}.
+
+      \item \code{summaryRprof()} could fail when the profile contained
+      only two records.  (\PR{16395})
+
+      \item HTML vignettes opened using \code{vignette()} did not support
+      links into the rest of the HTML help system.  (Links worked properly
+      when the vignette was opened using \code{browseVignettes()} or from
+      within the help system.)
+
+      \item \code{arima(*, xreg = .)} (for \eqn{d \ge 1}{d >= 1})
+      computes estimated variances based on a the number of effective
+      observations as in \R version 3.0.1 and earlier.  (\PR{16278})
+
+      \item \code{slotNames(.)} is now correct for \code{"signature"}
+      objects (mostly used internally in \pkg{methods}).
+
+      \item On some systems, the first string comparison after
+      a locale change would result in \code{NA}.
+    }
+  }
+}
+
+\section{\Rlogo CHANGES IN R 3.2.0}{
+  \subsection{NEW FEATURES}{
+    \itemize{
+      \item \code{anyNA()} gains a \code{recursive} argument.
+
+      \item When \code{x} is missing and \code{names} is not false
+      (including the default value), \code{Sys.getenv(x, names)} returns
+      an object of class \code{"Dlist"} and hence prints tidily.
+
+      \item (Windows.)  \code{shell()} no longer consults the
+      environment variable \env{SHELL}: too many systems have been
+      encountered where it was set incorrectly (usually to a path where
+      software was compiled, not where it was installed).
+      \env{R_SHELL}, the preferred way to select a non-default shell,
+      can be used instead.
+
+      \item Some unusual arguments to \code{embedFonts()} can now be
+      specified as character vectors, and the defaults have been changed
+      accordingly.
+
+      \item Functions in the \code{Summary} group duplicate less.
+      (\PR{15798})
+
+      \item (Unix-alikes.) \code{system(cmd, input = )} now uses
+      \sQuote{shell-execution-environment} redirection, which will be
+      more natural if \code{cmd} is not a single command (but requires a
+      POSIX-compliant shell). (Wish of \PR{15508})
+
+      \item \code{read.fwf()} and \code{read.DIF()} gain a
+      \code{fileEncoding} argument, for convenience.
+
+      \item Graphics devices can add attributes to their description in
+      \code{.Device} and \code{.Devices}.  Several of those included with
+      \R use a \code{"filepath"} attribute.
+
+      \item \code{pmatch()} uses hashing in more cases and so is faster
+      at the expense of using more memory. (\PR{15697})
+
+      \item \code{pairs()} gains new arguments to select sets of
+      variables to be plotted against each other.
+
+      \item \code{file.info(, extra_cols = FALSE)} allows a minimal set
+      of columns to be computed on Unix-alikes: on some systems without
+      properly-configured caching this can be significantly faster with
+      large file lists.
+
+      \item New function \code{dir.exists()} in package \pkg{base} to
+      test efficiently whether one or more paths exist and are
+      directories.
+
+      \item \code{dput()} and friends gain new controls
+      \samp{hexNumeric} and \samp{digits17} which output double and
+      complex quantities as, respectively, binary fractions (exactly,
+      see \code{sprintf("\%a")}) and as decimals with up to 17
+      significant digits.
+
+      \item \code{save()}, \code{saveRDS()} and \code{serialize()} now
+      support \code{ascii = NA} which writes ASCII files using
+      \code{sprintf("\%a")} for double/complex quantities.  This is
+      read-compatible with \code{ascii = TRUE} but avoids
+      binary->decimal->binary conversions with potential loss of
+      precision.  Unfortunately the Windows C runtime's lack of C99
+      compliance means that the format cannot be read correctly there in
+      \R before 3.1.2.
+
+      \item The default for \code{formatC(decimal.mark =)} has been
+      changed to be \code{getOption("OutDec")}; this makes it more
+      consistent with \code{format()} and suitable for use in print
+      methods, e.g.\sspace{}those for classes \code{"density"}, \code{"ecdf"},
+      \code{"stepfun"} and \code{"summary.lm"}.
+
+      \code{getOption("OutDec")} is now consulted by the print method
+      for class \code{"kmeans"}, by \code{cut()}, \code{dendrogram()},
+      \code{plot.ts()} and \code{quantile()} when constructing labels
+      and for the report from \code{legend(trace = TRUE)}.
+
+      (In part, wish of \PR{15819}.)
+
+      \item \code{printNum()} and hence \code{format()} and
+      \code{formatC()} give a warning if \code{big.mark} and
+      \code{decimal.mark} are set to the same value (period and comma
+      are not uncommonly used for each, and this is a check that
+      conventions have not got mixed).
+
+      \item \code{merge()} can create a result which uses long vectors
+      on 64-bit platforms.
+
+      \item \code{dget()} gains a new argument \code{keep.source} which
+      defaults to \code{FALSE} for speed (\code{dput()} and
+      \code{dget()} are most often used for data objects where this can
+      make \code{dget()} many times faster).
+
+      \item Packages may now use a file of common macro definitions in
+      their help files, and may import definitions from other packages.
+
+      \item A number of macros have been added in the new
+      \file{share/Rd} directory for use in package overview help pages,
+      and \code{promptPackage()} now makes use of them.
+
+      \item \code{tools::parse_Rd()} gains a new \code{permissive}
+      argument which converts unrecognized macros into text.  This is
+      used by \code{utils:::format.bibentry} to allow LaTeX markup to be
+      ignored.
+
+      \item \code{options(OutDec =)} can now specify a multi-byte
+      character, e.g., \code{options(OutDec = "\u00b7")} in a UTF-8
+      locale.
+
+      \item \code{is.recursive(x)} is no longer true when \code{x} is an
+      external pointer, a weak reference or byte code; the first enables
+      \code{all.equal(x, x)} when \code{x <- getClass(.)}.
+
+      \item \code{ls()} (aka \code{objects()}) and
+      \code{as.list.environment()} gain a new argument \code{sorted}.
+
+      \item The \code{"source"} attribute (which has not been added to
+      functions by \R since before \R version 2.14.0) is no longer
+      treated as special.
+
+      \item Function \code{returnValue()} has been added to give
+      \code{on.exit()} code access to a function's return value for
+      debugging purposes.
+
+      \item \code{crossprod(x, y)} allows more matrix coercions when
+      \code{x} or \code{y} are vectors, now equalling
+      \code{t(x) \%*\% y} in these cases (also reported by Radford Neal).
+      Similarly, \code{tcrossprod(x,y)} and \code{\%*\%} work in more
+      cases with vector arguments.
+
+      \item Utility function \code{dynGet()} useful for detecting
+      cycles, aka infinite recursions.
+
+      \item The byte-code compiler and interpreter include new
+      instructions that allow many scalar subsetting and assignment and
+      scalar arithmetic operations to be handled more efficiently. This
+      can result in significant performance improvements in scalar
+      numerical code.
+
+      \item \code{apply(m, 2, identity)} is now the same as the matrix
+      \code{m} when it has \emph{named} row names.
+
+      \item A new function \code{debuggingState()} has been added,
+      allowing to temporarily turn off debugging.
+
+      \item \code{example()} gets a new optional argument
+      \code{run.donttest} and \code{tools::Rd2ex()} a corresponding
+      \code{commentDonttest}, with a default such that
+      \code{example(..)} in help examples will run \code{\\donttest}
+      code only if used interactively (a change in behaviour).
+
+      \item \code{rbind.data.frame()} gains an optional argument
+      \code{make.row.names}, for potential speedup.
+
+      \item New function \code{extSoftVersion()} to report on the
+      versions of third-party software in use in this session.
+      Currently reports versions of \code{zlib}, \code{bzlib}, the
+      \code{liblzma} from \code{xz}, PCRE, ICU, TRE and the \code{iconv}
+      implementation.
+
+      A similar function \code{grSoftVersion()} in package \pkg{grDevices}
+      reports on third-party graphics software.
+
+      Function \code{tcltk::tclVersion()} reports the Tcl/Tk version.
+
+      \item Calling \code{callGeneric()} without arguments now works
+      with primitive generics to some extent.
+
+      \item \code{vapply(x, FUN, FUN.VALUE)} is more efficient notably
+      for large \code{length(FUN.VALUE)}; as extension of \PR{16061}.
+
+      \item \code{as.table()} now allows tables with one or more
+      dimensions of length 0 (such as \code{as.table(integer())}).
+
+      \item \code{names(x) <- NULL} now clears the names of call
+      and \code{\dots} objects.
+
+      \item \code{library()} will report a warning when an insufficient
+      dependency version is masking a sufficient one later on the
+      library search path.
+
+      \item A new \code{plot()} method for class \code{"raster"} has
+      been added.
+
+      \item New \code{check_packages_in_dir_changes()} function in
+      package \pkg{tools} for conveniently analyzing how changing
+      sources impacts the check results of their reverse dependencies.
+
+      \item Speed-up from Peter Haverty for \code{ls()} and
+      \code{methods:::.requirePackage()} speeding up package loading.
+      (\PR{16133})
+
+      \item New \code{get0()} function, combining \code{exists()} and
+      \code{get()} in one call, for efficiency.
+
+      \item \code{match.call()} gains an \code{envir} argument for
+      specifying the environment from which to retrieve
+      the \code{\dots} in the call, if any; this environment was wrong
+      (or at least undesirable) when the \code{definition} argument was
+      a function.
+
+      \item \code{topenv()} has been made \code{.Internal()} for
+      speedup, based on Peter Haverty's proposal in \PR{16140}.
+
+      \item \code{getOption()} no longer calls \code{options()} in the main
+      case.
+
+      \item Optional use of \code{libcurl} (version 7.28.0 from Oct 2012
+      or later) for Internet access:
+      \itemize{
+	\item \code{capabilities("libcurl")} reports if this is
+	available.
+
+	\item \code{libcurlVersion()} reports the version in use, and
+	other details of the \code{"libcurl"} build including which URL
+	schemes it supports.
+
+	\item \code{curlGetHeaders()} retrieves the headers for
+	\samp{http://}, \samp{https://}, \samp{ftp://} and
+	\samp{ftps://} URLs: analysis of these headers can provide
+	insights into the `existence' of a URL (it might for example be
+	permanently redirected) and is so used in \command{R CMD
+	  check --as-cran}.
+
+	\item \code{download.file()} has a new optional method
+	\code{"libcurl"} which will handle more URL schemes, follow
+	redirections, and allows simultaneous downloads of multiple
+	URLs.
+
+	\item \code{url()} has a new method \code{"libcurl"} which
+	handles more URL schemes and follows redirections.  The default
+	method is controlled by a new option \code{url.method}, which
+	applies also to the opening of URLs \emph{via} \code{file()}
+	(which happens implicitly in functions such as
+	\code{read.table}.)
+
+	\item When \code{file()} or \code{url()} is invoked with a
+	\code{https://} or \code{ftps://} URL which the current method
+	cannot handle, it switches to a suitable method if one is
+	available.
+      }
+
+      \item (Windows.) The DLLs \file{internet.dll} and
+      \file{internet2.dll} have been merged.  In this version it is safe
+      to switch (repeatedly) between the internal and Windows internet
+      functions within an \R session.
+
+      The Windows internet functions are still selected by flag
+      \option{--internet2} or \code{setInternet2()}.  This can be
+      overridden for an \code{url()} connection \emph{via} its new
+      \code{method} argument.
+
+      \code{download.file()} has new method \code{"wininet"}, selected
+      as the default by \option{--internet2} or \code{setInternet2()}.
+
+      \item \code{parent.env<-} can no longer modify the parent of a
+      locked namespace or namespace imports environment.  Contributed by
+      Karl Millar.
+
+      \item New function \code{isNamespaceLoaded()} for readability and speed.
+
+      \item \code{names(env)} now returns all the object names of an
+      \code{environment} \code{env}, equivalently to
+      \code{ls(env, all.names = TRUE, sorted = FALSE)} and also to
+      the names of the corresponding list,
+      \code{names(as.list(env, all.names = TRUE))}.
+      Note that although \code{names()} returns a character vector, the
+      names have no particular ordering.
+
+      \item The memory manager now grows the heap more aggressively. This
+      reduces the number of garbage collections, in particular while
+      data or code are loaded, at the expense of slightly increasing the
+      memory footprint.
+
+      \item New function \code{trimws()} for removing leading/trailing
+      whitespace.
+
+      \item \code{cbind()} and \code{rbind()} now consider S4 inheritance
+      during S3 dispatch and also obey \code{deparse.level}.
+
+      \item \code{cbind()} and \code{rbind()} will delegate recursively
+      to \code{methods::cbind2} (\code{methods::rbind2}) when at least
+      one argument is an S4 object and S3 dispatch fails (due to
+      ambiguity).
+
+      \item (Windows.)  \code{download.file(quiet = FALSE)} now uses
+      text rather than Windows progress bars in non-interactive use.
+
+      \item New function \code{hsearch_db()} in package \pkg{utils} for
+      building and retrieving the help search database used by
+      \code{help.search()}, along with functions for inspecting the
+      concepts and keywords in the help search database.
+
+      \item New function \code{.getNamespaceInfo()}, a no-check version
+      of \code{getNamespaceInfo()} mostly for internal speedups.
+
+      \item The help search system now takes \samp{\keyword} entries in
+      Rd files which are not standard keywords (as given in
+      \file{KEYWORDS} in the \R documentation directory) as concepts.
+      For standard keyword entries the corresponding descriptions are
+      additionally taken as concepts.
+
+      \item New \code{lengths()} function for getting the lengths of all
+      elements in a list.
+
+      \item New function \code{toTitleCase()} in package \pkg{tools},
+      tailored to package titles.
+
+      \item The matrix methods of \code{cbind()} and \code{rbind()}
+      allow matrices as inputs which have \eqn{2^{31}}{2^31} or more
+      elements.  (For \code{cbind()}, wish of \PR{16198}.)
+
+      \item The default method of \code{image()} has an explicit check
+      for a numeric or logical matrix (which was always required).
+
+      \item \code{URLencode()} will not by default encode further URLs
+      which appear to be already encoded.
+
+      \item \code{BIC(mod)} and \code{BIC(mod, mod2)} now give non-NA
+      numbers for \code{arima()} fitted models, as \code{nobs(mod)} now
+      gives the number of \dQuote{used} observations for such models.
+      This fixes \PR{16198}, quite differently than proposed there.
+
+      \item The \code{print()} methods for \code{"htest"},
+      \code{"pairwise.htest"} and \code{"power.htest"} objects now have
+      a \code{digits} argument defaulting to (a function of)
+      \code{getOption("digits")}, and influencing all printed numbers
+      coherently.  Unavoidably, this changes the display of such test
+      results in some cases.
+
+      \item Code completion for namespaces now recognizes all loaded
+      namespaces, rather than only the ones that are also attached.
+
+      \item The code completion mechanism can now be replaced by a
+      user-specified completer function, for (temporary) situations
+      where the usual code completion is inappropriate.
+
+      \item \code{unzip()} will now warn if it is able to detect truncation
+      when unpacking a file of 4GB or more (related to \PR{16243}).
+
+      \item \code{methods()} reports S4 in addition to S3 methods;
+      output is simplified when the \code{class} argument is
+      used.  \code{.S3methods()} and \code{methods::.S4methods()} report
+      S3 and S4 methods separately.
+
+      \item Higher order functions such as the \code{apply} functions
+      and \code{Reduce()} now force arguments to the functions they apply
+      in order to eliminate undesirable interactions between lazy
+      evaluation and variable capture in closures.  This resolves
+      \PR{16093}.
+    }
+  }
+
+  \subsection{INSTALLATION and INCLUDED SOFTWARE}{
+    \itemize{
+      \item The \code{\\donttest} sections of \R's help files can be
+      tested by\cr
+      \command{make check TEST_DONTTEST=TRUE} .
+
+      \item It is possible to request the use of system
+      \command{valgrind} headers \emph{via} \command{configure} option
+      \option{--with-system-valgrind-headers}: note the possible future
+      incompatibility of such headers discussed in the 'R Installation
+      and Administration' manual. (Wish of \PR{16068}.)
+
+      \item The included version of \code{liblzma} has been updated to
+      \code{xz-utils} 5.0.7 (minor bug fixes from 5.0.5).
+
+      \item \command{configure} options \option{--with-system-zlib},
+       \option{--with-system-bzlib} and \option{--with-system-pcre} are
+       now the default.  For the time being there is fallback to the
+       versions included in the \R sources if no system versions are
+       found or (unlikely) if they are too old.
+
+       Linux users should check that the \code{-devel} or \code{-dev}
+       versions of packages \pkg{zlib}, \pkg{bzip2}/\pkg{libbz2} and
+       \pkg{pcre} as well as \pkg{xz-devel}/\pkg{liblzma-dev} (or
+       similar names) are installed.
+
+       \item \command{configure} by default looks for the
+       \command{texi2any} script from \pkg{texinfo} 5.1 or later, rather
+       than the \command{makeinfo} program.  (\command{makeinfo} is a
+       link to the Perl script \command{texi2any} in \pkg{texinfo} 5.x.)
+
+       \item \command{R CMD INSTALL} gains an  option
+       \option{--built-timestamp=STAMP} allowing 100\% reproducible
+       package building, thanks to Dirk Eddelbuettel.
+     }
+  }
+
+  \subsection{UTILITIES}{
+    \itemize{
+      \item There is support for testing the \code{\\dontrun} and
+      \code{\\donttest} parts of examples in packages.
+
+      \code{tools::testInstalledPackage()} accepts new arguments
+      \code{commentDontrun = FALSE} and \code{commentDonttest = FALSE}.
+
+      \command{R CMD check} gains options \option{--run-dontrun} and
+      \option{--run-donttest}.
+
+      \item The \acronym{HTML} generated by \code{tools::Rd2HTML()} and
+      \code{tools::toHTML()} methods is now
+      \sQuote{\acronym{XHTML} 1.0 Strict}.
+
+      \item The \pkg{compiler} package's utility function
+      \code{setCompilerOptions()} now returns the old values
+      invisibly. The initial optimization level can also be set with the
+      environment variable \env{R_COMPILER_OPTIMIZE}.
+
+      \item \command{R CMD build} adds a \samp{NeedsCompilation} field
+      if one is not already present in the \file{DESCRIPTION} file.
+
+      \item \command{R CMD check} gains option \option{--test-dir} to
+      specify an alternative set of tests to run.
+
+      \item \command{R CMD check} will now by default continue with
+      testing after many types of errors, and will output a summary
+      count of errors at the end if any have occurred.
+
+      \item \command{R CMD check} now checks that the \samp{Title} and
+      \samp{Description} fields are correctly terminated.
+
+      \item \command{R CMD check --as-cran} now:
+      \itemize{
+	\item checks a \file{README.md} file can be processed: this
+	needs \command{pandoc} installed.
+
+	\item checks the existence and accessibility of URLs in the
+	\file{DESCRIPTION}, \file{CITATION}, \file{NEWS.Rd} and
+	\file{README.md} files and in the help files (provided the build
+	has \code{libcurl} support).
+
+	\item reports non-ASCII characters in R source files when there
+	is no package encoding declared in the \file{DESCRIPTION} file.
+
+	\item reports (apparent) S3 methods exported but not registered.
+
+	\item reports overwriting registered S3 methods from
+	base/recommended packages.  (Such methods are replaced in the
+	affected package for the rest of the session, even if the
+	replacing namespace is unloaded.)
+
+	\item reports if the \code{Title} field does not appear to be in
+	title case (see \sQuote{Writing R Extensions}: there may be
+	false positives, but note that technical words should be
+	single-quoted and will then be accepted).
+      }
+
+      Most of these checks can also be selected by environment
+      variables: see the \sQuote{R Internals} manual.
+    }
+  }
+
+  \subsection{C-LEVEL FACILITIES}{
+    \itemize{
+      \item New C API utility \code{logspace_sum(logx[], n)}.
+
+      \item Entry points \code{rbinom_mu}, \code{rnbinom_mu} and
+      \code{rmultinom} are remapped (by default) to \code{Rf_rbinom_mu}
+      etc.  This requires packages using them to be re-installed.
+
+      \item \code{.C(DUP = FALSE)} and \code{.Fortran(DUP = FALSE)} are
+      now ignored, so arguments are duplicated if \code{DUP = TRUE}
+      would do so.  As their help has long said, \code{.Call()} is much
+      preferred.
+
+      \item New entry point \code{R_allocLD}, like \code{R_alloc} but
+      guaranteed to have sufficient alignment for \code{long double}
+      pointers.
+
+      \item \code{isPairList()} now returns \code{TRUE} for DOTSXP.
+    }
+  }
+
+  \subsection{WINDOWS BUILD CHANGES}{
+    A number of changes to the Windows build system are in development.
+    The following are currently in place.
+    \itemize{
+      \item Installation using external binary distributions
+      of \pkg{zlib}, \pkg{bzip2}, \pkg{liblzma}, \pkg{pcre},
+      \pkg{libpng}, \pkg{jpeglib} and \pkg{libtiff} is now required,
+      and the build instructions have been revised.
+
+      \item A new \command{make} target \code{rsync-extsoft} has been
+      added to obtain copies of the external libraries from
+      \acronym{CRAN}.
+
+      \item Building the manuals now requires \command{texi2any} from
+      \pkg{texinfo} 5.1 or later.  \acronym{CRAN} binary builds include
+      the manuals, but by default builds from source will not, and they
+      will be accessed from \acronym{CRAN}.  See the comments in
+      \file{src/gnuwin32/MkRules.dist} for how to specify the location
+      of \command{texi2any}.
+
+      \item (Windows) Changes have been made to support an experimental
+      Windows toolchain based on GCC 4.9.2.  The default toolchain
+      continues to be based on GCC 4.6.3, as the new toolchain is not
+      yet stable enough.  A change to a new toolchain is expected during
+      the R 3.2.x lifetime.
+    }
+  }
+
+  \subsection{PACKAGE INSTALLATION}{
+    \itemize{
+      \item  (Windows) The use of macro \code{ZLIB_LIBS} in file
+      \file{src/Makevars.win} (which has not been documented for a long
+      time) now requires an external \file{libz.a} to be available (it is
+      part of the \sQuote{goodies} used to compile Windows binary
+      packages).  It would be simpler to use \code{-lz} instead.
+
+      \item The default for option \code{pkgType} on platforms using
+      binary packages is now \code{"both"}, so source packages will be
+      tried if binary versions are not available or not up to date.
+
+      There are options for what \code{install.packages(type = "both")}
+      (possibly called \emph{via} \code{update.packages()}) will do if
+      compilation of a source package is desirable: see \code{?options}
+      (under \pkg{utils}).
+
+      If you intend not to accept updates as source packages, you should
+      use \code{update.packages(type = "binary")}.
+    }
+  }
+
+  \subsection{DEPRECATED AND DEFUNCT}{
+    \itemize{
+      \item \code{download.file(method = "lynx")} is defunct.
+
+      \item Building \R using the included versions of \code{zlib},
+      \code{bzip2}, \code{xz} and PCRE is deprecated: these are frozen
+      (bar essential bug-fixes) and will be removed for \R 3.3.0.
+
+      \item The \command{configure} option
+      \option{--with-valgrind-instrumentation=3} has been withdrawn, as
+      it did not work with recent \command{valgrind} headers: it is now
+      treated as level \code{2}.
+
+      \item The \code{MethodsList} class in package \pkg{methods} had
+      been deprecated in \R 2.11.0 and is defunct now.  Functions using
+      it are defunct if they had been deprecated in \R 2.11.0, and are
+      deprecated now, otherwise.
+    }
+  }
+
+  \subsection{BUG FIXES}{
+    \itemize{
+      \item Fixed two obscure bugs in pairlist subassignment, reported by
+      Radford Neal as part of pqR issue 16.
+
+      \item Fixes for bugs in handling empty arguments and argument
+      matching by name in \code{log()}.
+
+      \item \code{all.equal()} gains methods for \code{environment}s and
+      \code{refClass}es.
+
+      \item \code{[<-} and \code{[[<-} gain S4 \code{data.frame} methods
+      to avoid corruption of S4 class information by the S3 methods.
+
+      \item \code{callNextMethod()} should now work within a \code{.local}
+      call when \code{\dots} is absent from \code{formals(.local)}.
+
+      \item \code{dput(pairlist(x))} generates a call to the
+      \code{pairlist} constructor instead of the \code{list}
+      constructor.
+
+      \item Fix \code{missing()} when arguments are propagated through
+      \code{\dots} . (\PR{15707})
+
+      \item \code{eigen(m)} now defaults to \code{symmetric = TRUE} even
+      when the dimnames are asymmetric if the matrix is otherwise
+      symmetric.  (\PR{16151})
+
+      \item Fix issues with forwarding \code{\dots} through
+      \code{callGeneric()} and \code{callNextMethod()}.  (\PR{16141})
+
+      \item \code{callGeneric()} now works after a \code{callNextMethod()}.
+
+      \item Subclass information is kept consistent when replacing an
+      ordinary S4 class with an \dQuote{old class} \emph{via} the
+      \code{S4Class} argument to \code{setOldClass()}. Thus, for
+      example, a \code{data.frame} is valid for a \code{list} argument
+      in the signature, and a \code{factor} is valid for \code{vector}
+      arguments.
+
+      \item In \code{qbeta()} the inversion of \code{pbeta()} is much
+      more sophisticated.  This works better in corner cases some of
+      which failed completely previously (\PR{15755}), or were using
+      too many iterations.
+
+      \item Auto-printing no longer duplicates objects when printing is
+      dispatched to a method.
+
+      \item \code{kmeans(x, k)} would fail when \code{nrow(x) >= 42949673}.
+      (Comment 6 of \PR{15364})
+
+      \item \sQuote{Abbreviated} locale-specific day and month names
+      could have been truncated in those rare locales where there are
+      the same as the full names.
+
+      \item An irrelevant warning message from updating subclass
+      information was silenced (the namespace would not be writable
+      in this case).
+    }
+  }
+}
+
+\section{\Rlogo CHANGES IN R 3.1.3}{
+  \subsection{NEW FEATURES}{
+    \itemize{
+      \item The internal method of \code{download.file()} can now handle
+      files larger than 2GB on 32-bit builds which support such files
+      (tested on 32-bit \R running on 64-bit Windows).
+
+      \item \code{kruskal.test()} warns on more types of suspicious input.
+
+      \item The \code{as.dendrogram()} method for \code{"hclust"}
+      objects gains a \code{check} argument protecting against memory
+      explosion for invalid inputs.
+
+      \item \code{capabilities()} has a new item \code{long.double}
+      which indicates if the build uses a \code{long double} type which
+      is longer than \code{double}.
+
+      \item \code{nlm()} no longer modifies the callback argument in
+      place (a new vector is allocated for each invocation, which mimics
+      the implicit duplication that occurred in R < 3.1.0); note that
+      this is a change from the previously documented
+      behavior. (\PR{15958})
+
+      \item \code{icuSetCollate()} now accepts \code{locale = "ASCII"}
+      which uses the basic C function \code{strcmp} and so collates
+      strings byte-by-byte in numerical order.
+
+      \item \code{sessionInfo()} tries to report the OS version in use
+      (not just that compiled under, and including details of Linux
+      distributions).
+
+      \item \code{model.frame()} (used by \code{lm()} and many other
+      modelling functions) now warns when it drops contrasts
+      from factors.  (Wish of \PR{16119})
+
+      \item \code{install.packages()} and friends now accept the value
+      \code{type = "binary"} as a synonym for the native binary type on
+      the platform (if it has one).
+
+      \item Single source or binary files can be supplied for
+      \code{install.packages(type = "both")} and the appropriate type
+      and \code{repos = NULL} will be inferred.
+
+      \item New function \code{pcre_config()} to report on some of the
+      configuration options of the version of PCRE in use.  In
+      particular, this reports if regular expressions using
+      \samp{\p{xx}} are supported.
+
+      \item (Windows.) \code{download.file(cacheOK = FALSE)} is now
+      supported when \file{internet2.dll} is used.
+
+      \item \code{browseURL()} has been updated to work with Firefox
+      36.0 which has dropped support for the \option{-remote} interface.
+    }
+  }
+
+  \subsection{INSTALLATION and INCLUDED SOFTWARE}{
+    \itemize{
+      \item The included version of PCRE has been updated to 8.36.
+
+      \item \command{configure} accepts \samp{MAKEINFO=texi2any} as
+      another way to ensure \pkg{texinfo} 5.x is used when both 5.x and
+      4.x are installed.
+    }
+  }
+
+  \subsection{UTILITIES}{
+    \itemize{
+      \item \command{R CMD check} now checks the packages used in
+      \code{\\donttest} sections of the examples are specified in the
+      \file{DESCRIPTION} file.
+      (These are needed to run the examples interactively.)
+
+      \item \command{R CMD check} checks for the undeclared use of GNU
+      extensions in Makefiles, and for Makefiles with a missing final
+      linefeed.
+
+      \command{R CMD build} will correct line endings in all Makefiles,
+      not just those in the \file{src} directory.
+
+      \item \command{R CMD check} notes uses of \code{library()} and
+      \code{require()} in package code: see the section
+      \sQuote{Suggested packages} of \sQuote{Writing R Extensions} for
+      good practice.
+    }
+  }
+  \subsection{DEPRECATED AND DEFUNCT}{
+    \itemize{
+      \item The \command{configure} option
+      \option{--with-valgrind-instrumentation=3} is deprecated and will
+      be removed in \R 3.2.0.
+    }
+  }
+
+  \subsection{BUG FIXES}{
+    \itemize{
+      \item (Windows.) \command{Rscript.exe} was missing a
+      manifest specifying the modern style for common controls (e.g.,
+      the download progress bar).
+
+      \item If a package had extra documentation files but no vignette,
+      the HTML help system produced an empty index page.
+
+      \item The parser now gives an error if a null character is included
+      in a string using Unicode escapes. (\PR{16046})
+
+      \item \code{qr.Q()} failed on complex arguments due to
+      pre-3.0(!) typo. (\PR{16054})
+
+      \item \code{abs()} failed with named arguments when the argument
+      was complex.  (\PR{16047})
+
+      \item \code{"noquote"} objects may now be used as columns in
+      data frames.  (\PR{15997})
+
+      \item Some values with extremely long names were printed
+      incorrectly.  (\PR{15999})
+
+      \item Extremely large exponents on zero expressed in scientific
+      notation (e.g. \code{0.0e50000}) could give \code{NaN}.  (\PR{15976})
+
+      \item \code{download.file()} reported downloaded sizes as 0KB if
+      less than 1MB, only for \R 3.1.2 and only on big-endian platforms.
+
+      \item \code{prompt()} did not escape percent signs in the
+      automatically generated usage section of help files.
+
+      \item \code{drop.terms()} dropped some of the attributes of the
+      object it was working with.  (\PR{16029})
+
+      \item (Windows.) The command completion in \command{Rgui.exe}
+      messed up the console.  (\PR{15791})
+
+      \item (Windows.) The \code{choose.files()} command returned a
+      blank string when the user asked for a single file but cancelled
+      the request.  (\PR{16074})
+
+      \item \code{Math2} S4 group generics failed to correctly dispatch
+      \code{"structure"}- and \code{"nonStructure"}-derived classes.
+
+      \item \code{loadNamespace()} imposed undocumented restrictions
+      on the \code{versionCheck} parameter.  (Reported by Geoff Lee.)
+
+      \item Rare over-runs detected by AddressSanitizer in
+      \code{substr()} and its replacement version have been avoided.
+
+      \emph{Inter alia} that fix gives the documented behaviour for
+      \code{substr(x, 1, 2) <- ""} (subsequently reported as
+      \PR{16214}).
+
+      \item Loading packages incorrectly defining an S4 generic followed
+      by a function of the same name caused an erroneous cyclic
+      namespace dependency error.
+
+      \item Declared vignette encodings are now always passed to the
+      vignette engine.
+
+      \item Port Tomas Kalibera's fix from R-devel that restores the
+      \code{loadMethod()} fast path, effectively doubling the speed of
+      S4 dispatch.
+
+      \item \code{power.t.test()} and \code{power.prop.test()} now make
+      use of the \code{extendInt} option of \code{uniroot()} and hence
+      work in more extreme cases.  (\PR{15792})
+
+      \item If a package was updated and attached when its namespace was
+      already loaded, it could end up with parts from one version and
+      parts from the other.  (\PR{16120})
+
+      \item \code{tools:::.Rdconv()} didn't accept \code{--encoding=} due
+      to a typo.  (\PR{16121})
+
+      \item Unix-alike builds without a suitable \command{makeinfo} were
+      documented to link the missing HTML manuals to CRAN, but did not.
+
+      \item \code{save(*, ascii=TRUE)} and \code{load()} now correctly
+      deal with \code{NaN}'s.  (\PR{16137})
+
+      \item \code{split.Date()} retains fractional representations while
+      avoiding incomplete class propagation.
+
+      \item \file{R_ext/Lapack.h} had not been updated for changes made
+      by LAPACK to the argument lists of its (largely internal)
+      functions \code{dlaed2} and \code{dlaed3}.  (\PR{16157})
+
+      \item \code{RShowDoc("NEWS", "txt")} had not been updated for the
+      layout changes of \R 3.1.0.
+
+      \item The \code{xtfrm()} method for class \code{"Surv"} has been
+      corrected and its description expanded.
+
+      \item \code{mode(x) <- y} would incorrectly evaluate \code{x} before
+      changing its mode. (\PR{16215})
+
+      \item \code{besselJ(1, 2^64)} and \code{besselY(..)} now signal a
+      warning, returning \code{NaN} instead of typically
+      segfaulting. (Issue 3 of \PR{15554})
+
+      \item HTML conversion of \samp{\href} markup in \file{.Rd} files
+      did not remove the backslash from \samp{\\\%} and so gave an
+      invalid URL.  In a related change, the \samp{\\} escape is now
+      required in such URLs.
+    }
+  }
+}
+
 \section{\Rlogo CHANGES IN R 3.1.2}{
   \subsection{NEW FEATURES}{
     \itemize{
@@ -48,16 +3313,21 @@
       collation locale in use (if any).
 
       \item \code{utils::URLencode()} was updated to use unreserved and
-      reserved characters from RFC 3986,
-      \url{http://tools.ietf.org/html/rfc3986}, instead of RFC 1738.
+      reserved characters from RFC 3986
+      (\url{http://tools.ietf.org/html/rfc3986}) instead of RFC 1738.
 
       \item \code{unique(warnings())} and \code{c(warnings())} are now
       supported.
-      
+
       \item The Bioconductor \sQuote{version} used by
       \code{setRepositories()} now defaults to \code{3.0}. (It can be
       set at runtime \emph{via} environment variable
       \env{R_BIOC_VERSION}.)
+
+      \item Omegahat is no longer listed as providing Windows binary
+      packages, e.g. by \code{setRepositories()}.  It has no binary
+      packages available for \R 3.1.x and those for earlier versions
+      were 32-bit only.
     }
   }
 
@@ -67,7 +3337,7 @@
       capabilities/options which will not be compiled in.
 
       More types of external BLAS are recognized by name in that report.
-      
+
       \item When building \R as a shared library, the
       \option{-L${R_HOME}/lib${R_ARCH}} flag is placed earlier in the
       link commands used during installation and when packages are
@@ -80,9 +3350,9 @@
       \item LaTeX package \pkg{upquote} is no longer required for \R's
       use of \pkg{inconsolata}.
 
-      \item (Windows only) If both 32 and 64 bit versions of \R are
+      \item (Windows only) If both 32- and 64-bit versions of \R are
       installed, the \file{bin/R.exe} and \file{bin/Rscript.exe} executables
-      now run 64 bit \R.  (To run 32 bit \R, overwrite these files
+      now run 64-bit \R.  (To run 32-bit \R, overwrite these files
       with copies of \file{bin/i386/Rfe.exe}.)
      }
   }
@@ -172,12 +3442,12 @@
       \item \code{options(list())} now works (trivially). (\PR{15979})
 
       \item \code{merge(<dendrogram>, ..)} now works correctly for two
-      `independent' dendrograms (\PR{15648}), and still compatibly via
-      \code{adjust = "auto"} e.g. for two branches of an existing
-      dendrogram.
+      `independent' dendrograms (\PR{15648}), and still compatibly
+      \emph{via} \code{adjust = "auto"} e.g. for two branches of an
+      existing dendrogram.
 
       \item The \code{plot} method for \code{"hclust"} objects gets an
-      optional argument \code{check}; When that is true (the default) it
+      optional argument \code{check}; when that is true (the default) it
       checks more carefully for valid input.
 
       \item (Windows only) If a user chose to install 64 bit \R but not
@@ -200,7 +3470,7 @@
 
       \item \code{sub()} and \code{gsub()} did not handle regular
       expressions like \code{"\\s{2,}"} properly if the text
-      contained \code{NA} or non-ascii elements in a UTF-8
+      contained \code{NA} or non-ASCII elements in a UTF-8
       locale.  Part of this was due to a bug in the TRE library.
       (\PR{16009})
 
@@ -215,10 +3485,10 @@
 
       \item \code{bw.SJ(x)} and other bw.*() no longer segfault when
       \code{x} contains non-finite values. (\PR{16024})
-      
+
       \item \command{R CMD Rd2pdf} unintentionally ignored its
       \option{--os} option.
-      
+
       \item The internal method of \code{download.file()} was not
       reporting file sizes and progress correctly on files larger than
       2GB (inherited from \code{libxml2}).  This is corrected for 64-bit
@@ -227,7 +3497,8 @@
 
       \item Work around a bug in OS X Yosemite where key environment
       variables may be duplicated causing issues in subprocesses. The
-      duplicates are now removed on R startup (via Rprofile). (\PR{16042})
+      duplicates are now removed on \R startup (\emph{via}
+      Rprofile). (\PR{16042})
 
       \item Adjust X11 auto-launch detection in DISPLAY on OS X to
       recognize latest XQuartz.
@@ -293,7 +3564,7 @@
       an error instead of a warning.
 
       \item \code{install.packages(repos = NULL)} now accepts
-      \code{http://} or \code{ftp://} URLs of package archives as well
+      \samp{http://} or \samp{ftp://} URLs of package archives as well
       as file paths, and will download as required.  In most cases
       \code{repos = NULL} can be deduced from the extension of the URL.
 
@@ -541,7 +3812,7 @@
       otherwise only names, dims and dimnames are.
 
       \item \code{colorRamp()} and \code{colorRampPalette()} now allow
-      non-opaque colours and a ramp in opacity via the new argument
+      non-opaque colours and a ramp in opacity \emph{via} the new argument
       \code{alpha = TRUE}.  (Suggested by Alberto Krone-Martins, but
       optionally as there are existing uses which expect only RGB values.)
       % https://stat.ethz.ch/pipermail/r-devel/2013-July/067046.html
@@ -1039,7 +4310,7 @@
       the control characters.  (Reported by Hadley Wickham.)
 
       \item \code{getGraphicsEvent()} caused 100\% usage of one CPU in
-      Windows. (PR#15500)
+      Windows. (\PR{15500})
 
       \item \code{nls()} with no \code{start} argument may now work
       inside another function (scoping issue).
@@ -1336,7 +4607,7 @@
       \code{NA} returned that time.  (The platforms affected include
       Linux and OS X, but not Windows nor Solaris.)
 
-      \item \code{rowsum()} has more support for matrices and dataframes
+      \item \code{rowsum()} has more support for matrices and data frames
       with \eqn{2^{31}}{2^31} or more elements. (\PR{15587})
 
       \item \code{predict(<lm object>, interval = "confidence", scale =
@@ -1425,8 +4696,8 @@
       \item \code{col2rgb()} now converts factors to character strings
       not integer codes (suggested by Bryan Hanson).
 
-      \item \code{tail(warnings())} now works, via the new \code{`[`}
-      method.
+      \item \code{tail(warnings())} now works, \emph{via} the new
+      \code{`[`} method.
 
       \item There is now support for the LaTeX style file \file{zi4.sty}
       which has in some distributions replaced \file{inconsolata.sty}.
@@ -1465,8 +4736,8 @@
 
       \item Methods invoked by \code{NextMethod()} had a different
       dynamic parent to the generic. This was causing trouble where S3
-      methods invoked via lazy evaluation could lose track of their
-      generic.  (\PR{15267})
+      methods invoked \emph{via} lazy evaluation could lose track of
+      their generic.  (\PR{15267})
 
       \item Code for the negative binomial distribution now treats the case
       \code{size == 0} as a one-point distribution at zero.
@@ -1847,8 +5118,9 @@
       \command{Rterm} or \command{Rgui}) would lose any
       zero-length strings from the command line arguments. (\PR{15406})
 
-      \item Errors in the encoding specified on the command line via
-      \command{--encoding=foo} were not handled properly.  (\PR{15405})
+      \item Errors in the encoding specified on the command line
+      \emph{via} \command{--encoding=foo} were not handled properly.
+      (\PR{15405})
 
       \item If \code{x} is a symbol, \code{is.vector(x, "name")} now
       returns \code{TRUE}, since \code{"name"} and \code{"symbol"}
@@ -2143,7 +5415,7 @@
       which is representable as an integer (as often happens for package
       \CRANpkg{Matrix}), this is converted to an integer.
 
-      \item Matrix indexing of dataframes by two-column numeric indices
+      \item Matrix indexing of data frames by two-column numeric indices
       is now supported for replacement as well as extraction.
 
       \item \code{setNames()} now has a default for its \code{object}
@@ -2446,14 +5718,14 @@
       \item The \code{parse()} function has a new parameter
       \code{keep.source}, which defaults to \code{options("keep.source")}.
 
-      \item Profiling via \code{Rprof()} now optionally records information
-      at the statement level, not just the function level.
+      \item Profiling \emph{via} \code{Rprof()} now optionally records
+      information at the statement level, not just the function level.
 
       \item The \code{Rprof()} function now quotes function names in
       in its output file on Windows, to be consistent with the quoting
       in Unix.
 
-      \item Profiling via \code{Rprof()} now optionally records
+      \item Profiling \emph{via} \code{Rprof()} now optionally records
       information about time spent in GC.
 
       \item The HTML help page for a package now displays non-vignette
@@ -2878,7 +6150,7 @@
       affinity settings like OpenBLAS) -- the function is rather
       intended to support affinity control in high-level parallel
       functions.  In the future, \R may supplement lack of affinity
-      control in the OS by its own bookkeeping via \code{mcaffinity()}
+      control in the OS by its own bookkeeping \emph{via} \code{mcaffinity()}
       related to processes and threads it spawns.
 
       \item \code{mcparallel()} has a new argument \code{mc.affinity}
@@ -3069,7 +6341,7 @@
       reentrant, leading to errors in rare circumstances such as a
       garbage collection triggering a recursive call.
 
-      \item Field assignments in reference class objects via
+      \item Field assignments in reference class objects \emph{via}
       \code{$<-} were not being checked
       because the magic incantation to turn methods on for that
       primitive operator had been inadvertently omitted. %$
diff --git a/doc/NEWS.pdf b/doc/NEWS.pdf
index e8e339a..54ad7da 100644
Binary files a/doc/NEWS.pdf and b/doc/NEWS.pdf differ
diff --git a/doc/RESOURCES b/doc/RESOURCES
index 6203949..7d2cbee 100644
--- a/doc/RESOURCES
+++ b/doc/RESOURCES
@@ -8,7 +8,7 @@ A collection of Frequently Asked Questions and their answers is
 maintained by Kurt Hornik <Kurt.Hornik at R-project.org> and can be found
 at the URL
 
-     <http://CRAN.R-project.org/doc/FAQ/R-FAQ.html>
+     <https://CRAN.R-project.org/doc/FAQ/R-FAQ.html>
 
 A text version is in file 'FAQ' in this directory, and an HTML version
 is available as file 'doc/html/faq.html' and via the on-line help (on
@@ -20,7 +20,7 @@ the index page given by 'help.start()').
 Thanks to Martin Maechler <Martin.Maechler at R-project.org> there are a
 number of mailing lists which are used by R users and developers.  See
 
-     <http://www.R-project.org/mail.html>
+     <https://www.R-project.org/mail.html>
 
 for details.
 
@@ -30,10 +30,10 @@ for details.
 The Comprehensive R Archive Network (CRAN) is a collection of sites
 which carry identical material, consisting of the R distribution(s), the
 contributed extensions, documentation for R, and binaries, with the
-master site at <http://CRAN.R-project.org/> and information on daily
+master site at <https://CRAN.R-project.org/> and information on daily
 mirrors available from
 
-     <http://CRAN.R-project.org/mirrors.html>
+     <https://CRAN.R-project.org/mirrors.html>
 
 4 Bug-tracking system
 *********************
@@ -41,5 +41,5 @@ mirrors available from
 R has a bug-tracking system (or perhaps a bug-filing system is a more
 precise description) available on the net at
 
-     <http://bugs.R-project.org/>
+     <https://bugs.R-project.org/>
 
diff --git a/doc/Rscript.1 b/doc/Rscript.1
index 6fc73c6..83a18e7 100644
--- a/doc/Rscript.1
+++ b/doc/Rscript.1
@@ -8,7 +8,7 @@ Rscript \- front end for scripting with R
 A binary front-end to R, for use in scripting applications.
 .TP
 \fBexpr\fR
-An optional expression to be evaluated, used in place of \fBexpr\fR.
+An optional expression to be evaluated, used in place of \fBfile\fR.
 .TP
 \fBfile\fR
 Input file of R expressions
diff --git a/doc/THANKS b/doc/THANKS
index a82425d..e68c8eb 100644
--- a/doc/THANKS
+++ b/doc/THANKS
@@ -1,20 +1,21 @@
 R would not be what it is today without the invaluable help of these
-people, who contributed by donating code, bug fixes and documentation:
+people outside of the R core team, who contributed by donating code, bug
+fixes and documentation:
 
-Valerio Aimale, Thomas Baier, Henrik Bengtsson, Roger Bivand, 
-Ben Bolker, David Brahm, Goran Brostrom, Patrick Burns, Vince Carey,
-Saikat DebRoy, Brian D'Urso, Lyndon Drake, Dirk Eddelbuettel, 
-Claus Ekstrom, Sebastian Fischmeister, John Fox, Paul Gilbert, 
+Valerio Aimale, Thomas Baier, Henrik Bengtsson, Roger Bivand,
+Ben Bolker, David Brahm, G"oran Brostr"om, Patrick Burns, Vince Carey,
+Saikat DebRoy, Matt Dowle, Brian D'Urso, Lyndon Drake, Dirk Eddelbuettel,
+Claus Ekstrom, Sebastian Fischmeister, John Fox, Paul Gilbert,
 Yu Gong, Gabor Grothendieck, Frank E Harrell Jr, Torsten Hothorn,
-Robert King, Kjetil Kjernsmo, Roger Koenker, Philippe Lambert, 
-Jan de Leeuw, Jim Lindsey, Patrick Lindsey, Catherine Loader, 
-Gordon Maclean, John Maindonald, David Meyer, Ei-ji Nakama, 
-Jens Oehlschaegel, Steve Oncley, Richard O'Keefe, Hubert Palme, 
+Robert King, Kjetil Kjernsmo, Roger Koenker, Philippe Lambert,
+Jan de Leeuw, Jim Lindsey, Patrick Lindsey, Catherine Loader,
+Gordon Maclean, John Maindonald, David Meyer, Ei-ji Nakama,
+Jens Oehlschaegel, Steve Oncley, Richard O'Keefe, Hubert Palme,
 Roger D. Peng, Jose' C. Pinheiro, Tony Plate, Anthony Rossini,
 Jonathan Rougier, Petr Savicky, Guenther Sawitzki, Marc Schwartz,
-Detlef Steuer, Bill Simpson, Gordon Smyth, Adrian Trapletti, 
-Terry Therneau, Rolf Turner, Bill Venables, Gregory R. Warnes, 
-Andreas Weingessel, Morten Welinder, James Wettenhall, Simon Wood and
+Arun Srinivasan, Detlef Steuer, Bill Simpson, Gordon Smyth, Adrian Trapletti,
+Terry Therneau, Rolf Turner, Bill Venables, Gregory R. Warnes,
+Andreas Weingessel, Morten Welinder, James Wettenhall, Simon Wood, and
 Achim Zeileis.
 
 Others have written code that has been adopted by R and is
@@ -60,8 +61,10 @@ email addresses to contributors to the R Project (even without making them
 members of the R Foundation) when in the view of the R Foundation this
 would help advance the R project.
 
-The R Core Group, Roger Bivand, Dirk Eddelbuettel, John Fox, Torsten
-Hothorn, Stefano Iacus, Marc Schwartz, Bill Venables, Hadley Wickham
-and Achim Zeileis are the ordinary members of the R Foundation.  In
-addition, David Meyer and Simon Wood are also e-addressable by
+The R Core Group, Roger Bivand, Jennifer Bryan, Di Cook, Dirk Eddelbuettel,
+John Fox, Bettina Grün, Frank Harrell, Torsten Hothorn, Stefano Iacus,
+Julie Josse,  Balasubramanian Narasimhan, Marc Schwartz, Heather Turner,
+Bill Venables, Hadley Wickham and Achim Zeileis are the ordinary members of
+the R Foundation.
+In addition, David Meyer and Simon Wood are also e-addressable by
 <Firstname>.<Lastname>@R-project.org.
diff --git a/doc/html/Makefile.in b/doc/html/Makefile.in
index 0a17803..db1bfaf 100644
--- a/doc/html/Makefile.in
+++ b/doc/html/Makefile.in
@@ -11,12 +11,14 @@ subdir = doc/html
 include $(top_builddir)/Makeconf
 
 distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
+## logo.jpg is not used in R >= 3.3.0.
+## Rlogo.pdf is only used to make NEWS.pdf
 INSTFILES = \
-	NEWS.2.html R.css Search.html SearchOn.html \
-	favicon.ico left.jpg logo.jpg logosm.jpg right.jpg up.jpg \
+	NEWS.2.html R.css Rlogo.svg Rlogo.pdf Search.html SearchOn.html \
+	favicon.ico left.jpg logo.jpg right.jpg up.jpg \
 	about.html packages-head-utf8.html
 NON_SVN_INSTFILES = resources.html NEWS.html
-DISTFILES = Makefile.in $(INSTFILES) index-default.html
+DISTFILES = Makefile.in $(INSTFILES) index-default.html Notes
 OBJECTS = index.html
 ## <FIXME>
 ## We really should not create packages.html in *this* directory.
diff --git a/doc/html/NEWS.2.html b/doc/html/NEWS.2.html
index 0271ccc..eecf21e 100644
--- a/doc/html/NEWS.2.html
+++ b/doc/html/NEWS.2.html
@@ -1,22 +1,21 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-<html><head><title>R: R News</title>
-<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
-<link rel="stylesheet" type="text/css" href="R.css">
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><title>R: R News</title>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+<link rel="stylesheet" type="text/css" href="R.css" />
 </head><body>
 
-<table width="100%" summary="page for NEWS"><tr><td>NEWS</td><td align="right">R Documentation</td></tr></table>
+<table width="100%" summary="page for NEWS"><tr><td>NEWS</td><td style="text-align: right;">R Documentation</td></tr></table>
 
 <h2> R News</h2>
 
 <h3>LATER NEWS</h3>
 
-<p>News for <font face="Courier New,Courier" color="#666666"><b>R</b></font> 3.0.0 and later can be found in file ‘<span class="file">NEWS.Rd</span>’ in the
-<font face="Courier New,Courier" color="#666666"><b>R</b></font> sources and files ‘<span class="file">NEWS</span>’ and ‘<span class="file">doc/html/NEWS.html</span>’
-in an <font face="Courier New,Courier" color="#666666"><b>R</b></font> build.
+<p>News for <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> 3.0.0 and later can be found in file ‘<span class="file">NEWS.Rd</span>’ in the
+<span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> sources and files ‘<span class="file">NEWS</span>’ and ‘<span class="file">doc/html/NEWS.html</span>’
+in an <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> build.
 </p>
 
 
-<h3><img src="../help/figures/../../html/logo.jpg" alt="../../html/logo.jpg" /> CHANGES IN R VERSION 2.15.3</h3>
+<h3><img class="toplogo" src="../help/figures/../../html/Rlogo.svg" alt="[R logo]" /> CHANGES IN R VERSION 2.15.3</h3>
 
 
 
@@ -42,9 +41,9 @@ to the reference index (‘<span class="file">refman.pdf</span>’).
 </p>
 </li>
 <li> <p><code>untar(tar = "internal")</code> has some support for
-<code>pax</code> headers as produced by e.g. <CODE>gnutar --posix</CODE>
+<code>pax</code> headers as produced by e.g. <code>gnutar --posix</code>
 (which seems prevalent on OpenSUSE 12.2) or
-<CODE>bsdtar --format pax</CODE>, including long path and link names.
+<code>bsdtar --format pax</code>, including long path and link names.
 </p>
 </li>
 <li> <p><code>sQuote()</code> and <code>dQuote()</code> now handle 0-length
@@ -79,13 +78,13 @@ conflicts when multiple users start a cluster at the same time.
 
 
 <ul>
-<li><p> The default for <span class="env">TAR</span> on Windows for <CODE>R CMD
-	build</CODE> has been changed to be <span class="samp">internal</span> if no
-<CODE>tar</CODE> command is on the path.
+<li><p> The default for <span class="env">TAR</span> on Windows for <code>R CMD
+	build</code> has been changed to be <span class="samp">internal</span> if no
+<code>tar</code> command is on the path.
 </p>
 <p>This enables most packages to be built ‘out of the box’
-without <CODE>Rtools</CODE>: the main exceptions are those which need
-to be installed to re-build vignettes and need <CODE>Rtools</CODE>
+without <code>Rtools</code>: the main exceptions are those which need
+to be installed to re-build vignettes and need <code>Rtools</code>
 for installation (usually because they contain compiled code).
 </p>
 </li></ul>
@@ -116,7 +115,7 @@ for its limitations).
 </li>
 <li><p> The deprecated <code>intensities</code> component returned by
 <code>hist()</code> is no longer recognized by the <code>plot()</code> method
-and will be removed in <font face="Courier New,Courier" color="#666666"><b>R</b></font> 3.0.0.
+and will be removed in <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> 3.0.0.
 </p>
 </li>
 <li> <p><code>real()</code>, <code>as.real()</code> and <code>is.real()</code> are now
@@ -124,7 +123,7 @@ formally deprecated and give a warning.
 </p>
 </li>
 <li><p> This is formal notice that the non-API EISPACK entry points
-in <font face="Courier New,Courier" color="#666666"><b>R</b></font> will be removed shortly.
+in <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> will be removed shortly.
 </p>
 </li></ul>
 
@@ -135,18 +134,18 @@ in <font face="Courier New,Courier" color="#666666"><b>R</b></font> will be remo
 
 
 <ul>
-<li><p> The <CODE>configure</CODE> tests for Objective C and Objective
+<li><p> The <code>configure</code> tests for Objective C and Objective
 C++ now work on Mac OS 10.8 with Xcode 4.5.2 (<a href="https://bugs.R-project.org/bugzilla3/show_bug.cgi?id=15107">PR#15107</a>).
 </p>
 </li>
 <li><p> The cairo-based versions of <code>X11()</code> now work with
-current versions of cairographics (e.g. 1.12.10).  (<a href="https://bugs.R-project.org/bugzilla3/show_bug.cgi?id=15168">PR#15168</a>)
+current versions of cairographics (e.g., 1.12.10).  (<a href="https://bugs.R-project.org/bugzilla3/show_bug.cgi?id=15168">PR#15168</a>)
 </p>
-<p>A workaround for earlier versions of <font face="Courier New,Courier" color="#666666"><b>R</b></font> is to use
+<p>A workaround for earlier versions of <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> is to use
 <code>X11.options(type = "nbcairo")</code>.
 </p>
 </li>
-<li><p> Configuration and <CODE>R CMD javareconf</CODE> now come up
+<li><p> Configuration and <code>R CMD javareconf</code> now come up
 with a smaller set of library paths for Java on Oracle-format JDK
 (including OpenJDK).  This helps avoid conflicts between libraries
 (such as <code>libjpeg</code>) supplied in the JDK and system
@@ -176,7 +175,7 @@ single-argument functions.  (<a href="https://bugs.R-project.org/bugzilla3/show_
 </p>
 </li>
 <li> <p><code>browseEnv(html = FALSE)</code> would segfault if called from
-<font face="Courier New,Courier" color="#666666"><b>R</b></font> (not <CODE>R.app</CODE>) on a CRAN-style Mac OS X build of <font face="Courier New,Courier" color="#666666"><b>R</b></font>.
+<span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> (not <code>R.app</code>) on a CRAN-style Mac OS X build of <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span>.
 </p>
 </li>
 <li> <p><span class="samp">[[<-</span> for lists (generic vectors) needed to increment
@@ -198,7 +197,7 @@ in the current locale's character set.
 </p>
 </li>
 <li><p> The deprecated <code>svd(X, LINPACK = TRUE)</code> could alter
-<code>X</code> in <font face="Courier New,Courier" color="#666666"><b>R</b></font> 2.15.[12].  (Reported by Bill Dunlap.)
+<code>X</code> in <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> 2.15.[12].  (Reported by Bill Dunlap.)
 </p>
 </li>
 <li><p> Under Windows, <code>file.link()</code> and <code>file.symlink()</code>
@@ -243,7 +242,7 @@ other methods and trace levels.  (<a href="https://bugs.R-project.org/bugzilla3/
 </p>
 </li>
 <li><p> On Windows the <code>untar()</code> function now quotes the
-directory name when using an external <CODE>tar</CODE> utility, so
+directory name when using an external <code>tar</code> utility, so
 <code>R CMD check</code> will handle pathnames containing spaces.
 </p>
 </li>
@@ -275,13 +274,13 @@ for <code>"factor"</code> arguments.
 </li>
 <li><p> On Windows, work around an event-timing problem when
 the RGui console was closed from the ‘X’ control and the closure
-cancelled. (This would on some 64-bit systems crash <font face="Courier New,Courier" color="#666666"><b>R</b></font>, typically
+cancelled. (This would on some 64-bit systems crash <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span>, typically
 those with a slow GPU relative to the CPU.)
 </p>
 </li>
 <li><p> On unix <code>Rscript</code> will pass the <code>r_arch</code> setting
 it was compiled with on to the R process so that the architecture
-of <code>Rscript</code> and that of <font face="Courier New,Courier" color="#666666"><b>R</b></font> will match unless overridden.
+of <code>Rscript</code> and that of <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> will match unless overridden.
 </p>
 </li>
 <li><p> On Windows, <code>basename()</code>, <code>dirname()</code> and
@@ -293,7 +292,7 @@ names with 260 or more bytes when expressed in UTF-8.
 
 
 
-<h3><img src="../help/figures/../../html/logo.jpg" alt="../../html/logo.jpg" /> CHANGES IN R VERSION 2.15.2</h3>
+<h3><img class="toplogo" src="../help/figures/../../html/Rlogo.svg" alt="[R logo]" /> CHANGES IN R VERSION 2.15.2</h3>
 
 
 
@@ -324,7 +323,7 @@ do so by invoking <code>$usingMethods()</code>.
 </p>
 </li>
 <li><p> More Polish translations are available: for the
-<CODE>RGui</CODE> menus and for several recommended packages.
+<code>RGui</code> menus and for several recommended packages.
 </p>
 </li>
 <li><p> Multistratum MANOVA works. In fact, it seems to have done so
@@ -333,7 +332,7 @@ for years in spite of the help page claiming it did not.
 </li>
 <li> <p><code>qqline()</code> has new optional arguments
 <code>distribution</code>, <code>probs</code> and <code>qtype</code>, following the
-example of <a href="http://CRAN.R-project.org/package=lattice"><span class="pkg">lattice</span></a>'s <code>panel.qqmathline()</code>.
+example of <a href="https://CRAN.R-project.org/package=lattice"><span class="pkg">lattice</span></a>'s <code>panel.qqmathline()</code>.
 </p>
 </li>
 <li><p> The handling of single quotes in the <code>en at quot</code>
@@ -352,17 +351,17 @@ changes the output of several packages.)
 </p>
 </li>
 <li><p> Misuse of <code>rep()</code> on undocumented types of objects
-(e.g. calls) is now reported as an error.
+(e.g., calls) is now reported as an error.
 </p>
 </li>
 <li><p> The included LAPACK has been updated to 3.4.1, with some
-patches from the current SVN sources.  (<EM>Inter alia</EM>, this
+patches from the current SVN sources.  (<em>Inter alia</em>, this
 resolves <a href="https://bugs.R-project.org/bugzilla3/show_bug.cgi?id=14692">PR#14692</a>.)
 </p>
 </li>
 <li> <p><code>file.copy(recursive = TRUE)</code> has some additional
 checks on user error leading to attempted infinite recursion (and on
-some platforms to crashing <font face="Courier New,Courier" color="#666666"><b>R</b></font>).
+some platforms to crashing <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span>).
 </p>
 </li>
 <li><p> PCRE has been updated to version 8.31, a bug-fix release.
@@ -386,14 +385,14 @@ packages.
 </p>
 </li>
 <li><p> The <code>X11()</code> device has some protection against
-being used with forked processes <EM>via</EM> package <span class="pkg">parallel</span>.
+being used with forked processes <em>via</em> package <span class="pkg">parallel</span>.
 </p>
 </li>
 <li><p> Setting the environment variable <span class="env">R_OSX_VALGRIND</span> (to
-any value) allows <font face="Courier New,Courier" color="#666666"><b>R</b></font> to be run under <CODE>valgrind</CODE> on Mac OS
-10.6 and 10.7 (<CODE>valgrind</CODE> currently has very limited
+any value) allows <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> to be run under <code>valgrind</code> on Mac OS
+10.6 and 10.7 (<code>valgrind</code> currently has very limited
 support for 10.8), provided <code>system()</code> is not used (directly
-or indirectly).  This should not be needed for <CODE>valgrind</CODE>
+or indirectly).  This should not be needed for <code>valgrind</code>
 >= 3.8.1.
 </p>
 </li>
@@ -418,7 +417,7 @@ using LAPACK 3.2 subroutine <code>DPSTRF</code>.
 <li><p> The functions <code>.C()</code>, <code>.Call()</code>,
 <code>.External()</code> and <code>.Fortran()</code> now check that they are
 called with an unnamed first argument: the formal arguments were
-changed from <code>name=</code> to <code>.NAME=</code> in <font face="Courier New,Courier" color="#666666"><b>R</b></font> 2.13.0, but some
+changed from <code>name=</code> to <code>.NAME=</code> in <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> 2.13.0, but some
 packages were still using the old name.  This is currently a
 warning, but will be an error in future.
 </p>
@@ -451,7 +450,7 @@ has been 10MB since the days of 32MB RAM systems).
 </p>
 </li>
 <li> <p><code>rep()</code> is faster and uses less memory,
-substantially so in some common cases (e.g. if <code>times</code> is of
+substantially so in some common cases (e.g., if <code>times</code> is of
 length one or <code>length.out</code> is given, and <code>each = 1</code>).
 </p>
 </li>
@@ -486,20 +485,20 @@ the namespace does not have a DLL specified by a
 
 
 <ul>
-<li> <p><CODE>R CMD check</CODE> now checks if a package can be loaded
+<li> <p><code>R CMD check</code> now checks if a package can be loaded
 by <code>library(pkgname, lib.loc = "somewhere")</code> without being on
 the library search path (unless it is already installed in
 <code>.Library</code>, when it always will be).
 </p>
 </li>
-<li> <p><CODE>R CMD check --as-cran</CODE> notes ‘hidden’ files
+<li> <p><code>R CMD check --as-cran</code> notes ‘hidden’ files
 and directories (with names starting with a dot) that are not
-needed for the operation of <CODE>R CMD INSTALL</CODE> or <code>R CMD
+needed for the operation of <code>R CMD INSTALL</code> or <code>R CMD
 	build</code>: such files should be excluded from the published tarball.
 </p>
 </li>
-<li> <p><CODE>R CMD check</CODE> (if checking subdirectories) checks
-that the <font face="Courier New,Courier" color="#666666"><b>R</b></font> code in any demos is ASCII and can be parsed, and
+<li> <p><code>R CMD check</code> (if checking subdirectories) checks
+that the <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> code in any demos is ASCII and can be parsed, and
 warns if not.
 </p>
 </li>
@@ -509,7 +508,7 @@ languages) by including ‘<span class="file">ix-utf8enc.dfu</span>’ (
 (Wish of <a href="https://bugs.R-project.org/bugzilla3/show_bug.cgi?id=14989">PR#14989</a>.)
 </p>
 </li>
-<li> <p><CODE>R CMD build</CODE> now omits several types of hidden
+<li> <p><code>R CMD build</code> now omits several types of hidden
 files/directories, including ‘<span class="file">inst/doc/.Rinstignore</span>’,
 ‘<span class="file">vignettes/.Rinstignore</span>’, (‘<span class="file">.Rinstignore</span>’ should be at
 top level), ‘<span class="file">.deps</span>’ under ‘<span class="file">src</span>’, ‘<span class="file">.Renviron</span>’,
@@ -522,11 +521,11 @@ top level), ‘<span class="file">.deps</span>’ under ‘<span cla
 ‘<span class="file">.settings</span>’, ‘<span class="file">.tm_properties</span>’ and various leftovers.
 </p>
 </li>
-<li> <p><CODE>R CMD check</CODE> now checks for <code>.C()</code>,
+<li> <p><code>R CMD check</code> now checks for <code>.C()</code>,
 <code>.Call()</code>, <code>.External()</code> and <code>.Fortran()</code> calls in
-other packages, and gives a warning on those found from <font face="Courier New,Courier" color="#666666"><b>R</b></font> itself
+other packages, and gives a warning on those found from <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> itself
 (which are not part of the API and change without notice: many
-will be changed for <font face="Courier New,Courier" color="#666666"><b>R</b></font> 3.0.0).
+will be changed for <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> 3.0.0).
 </p>
 </li></ul>
 
@@ -542,10 +541,10 @@ raised to just under 32GB (from just under 16GB).
 </p>
 </li>
 <li><p> The misuse of <code>.C("name", ..., PACKAGE = foo)</code> where
-<code>foo</code> is an arbitrary <font face="Courier New,Courier" color="#666666"><b>R</b></font> object is now an error.
+<code>foo</code> is an arbitrary <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> object is now an error.
 </p>
 <p>The misuse <code>.C("name",..., PACKAGE = "")</code> is now warned about
-in <CODE>R CMD check</CODE>, and will be an error in future.
+in <code>R CMD check</code>, and will be an error in future.
 </p>
 </li></ul>
 
@@ -574,7 +573,7 @@ explicitly.
 </p>
 </li>
 <li><p> Entry point <code>rcont2</code> is no longer part of the API, and
-will move to package <span class="pkg">stats</span> in <font face="Courier New,Courier" color="#666666"><b>R</b></font> 3.0.0.
+will move to package <span class="pkg">stats</span> in <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> 3.0.0.
 </p>
 </li>
 <li><p> The ‘internal’ graphics device invoked by
@@ -587,7 +586,7 @@ be removed: use <code>pdf(file = NULL)</code> instead.
 <code>chol2inv(LINPACK = TRUE)</code>, <code>solve(LINPACK = TRUE)</code> and
 <code>svd(LINPACK = TRUE)</code> are deprecated and give a warning.
 </p>
-<p>They were provided for compatibility with <font face="Courier New,Courier" color="#666666"><b>R</b></font> 1.7.0 (Mar 2003)!
+<p>They were provided for compatibility with <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> 1.7.0 (Mar 2003)!
 </p>
 </li>
 <li><p> The ‘internal function’ <code>kappa.tri()</code> has been
@@ -632,13 +631,13 @@ version should be installed).
 
 
 <ul>
-<li><p> There is a new <CODE>configure</CODE> option
+<li><p> There is a new <code>configure</code> option
 <span class="option">--with-libtiff</span> (mainly in case the system installation
 needs to be avoided).
 </p>
 </li>
 <li><p> LAPACK 3.4.1 does use some Fortran 90 features, so
-<CODE>g77</CODE> no longer suffices.
+<code>g77</code> no longer suffices.
 </p>
 </li>
 <li><p> If an external LAPACK is used, it must be version 3.2 or later.
@@ -652,7 +651,7 @@ needs to be avoided).
 
 
 <ul>
-<li><p> On Windows, starting <CODE>Rterm</CODE> via <CODE>R.exe</CODE>
+<li><p> On Windows, starting <code>Rterm</code> via <code>R.exe</code>
 caused Ctrl-C to misbehave.  (<a href="https://bugs.R-project.org/bugzilla3/show_bug.cgi?id=14948">PR#14948</a>)
 </p>
 </li>
@@ -709,16 +708,16 @@ in zero.  (<a href="https://bugs.R-project.org/bugzilla3/show_bug.cgi?id=14975">
 </p>
 </li>
 <li> <p><code>rWishart()</code> could overflow the C stack and maybe crash
-the <font face="Courier New,Courier" color="#666666"><b>R</b></font> process for dimensions of several hundreds or more.
+the <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> process for dimensions of several hundreds or more.
 (Reported by Michael Braun on R-sig-mac.)
 </p>
 </li>
-<li><p> Base package vignettes (e.g. <code>vignette("Sweave")</code>) were
-not fully installed in builds of <font face="Courier New,Courier" color="#666666"><b>R</b></font> from the tarball.
+<li><p> Base package vignettes (e.g., <code>vignette("Sweave")</code>) were
+not fully installed in builds of <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> from the tarball.
 </p>
 </li>
 <li> <p><code>lchoose()</code> and <code>choose()</code> could overflow the C
-stack and crash <font face="Courier New,Courier" color="#666666"><b>R</b></font>.
+stack and crash <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span>.
 </p>
 </li>
 <li><p> When given a 0-byte file and asked to keep source
@@ -727,7 +726,7 @@ instead.
 </p>
 </li>
 <li> <p><code>pdf(compress = TRUE)</code> did not delete temporary files
-it created until the end of the <font face="Courier New,Courier" color="#666666"><b>R</b></font> session.  (<a href="https://bugs.R-project.org/bugzilla3/show_bug.cgi?id=14991">PR#14991</a>)
+it created until the end of the <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> session.  (<a href="https://bugs.R-project.org/bugzilla3/show_bug.cgi?id=14991">PR#14991</a>)
 </p>
 </li>
 <li> <p><code>logLik()</code> did not detect the error of applying it
@@ -761,7 +760,7 @@ vector was too long for <i>2^30</i> or more).
 </p>
 </li>
 <li> <p><code>parallel::stopCluster()</code> now works with MPI
-clusters without <a href="http://CRAN.R-project.org/package=snow"><span class="pkg">snow</span></a> being on the search path.
+clusters without <a href="https://CRAN.R-project.org/package=snow"><span class="pkg">snow</span></a> being on the search path.
 </p>
 </li>
 <li> <p><code>terms.formula()</code> could exhaust the stack, and the
@@ -770,8 +769,8 @@ stack check did not always catch this before the segfault.
 </p>
 </li>
 <li> <p><code>sort.list(method = "radix")</code> could give incorrect
-results on certain compilers (seen with <CODE>clang</CODE> on Mac OS
-10.7 and <CODE>Xcode 4.4.1</CODE>).
+results on certain compilers (seen with <code>clang</code> on Mac OS
+10.7 and <code>Xcode 4.4.1</code>).
 </p>
 </li>
 <li> <p><code>backsolve(T, b)</code> gave incorrect results when
@@ -799,7 +798,7 @@ correctly rather than truncating. (<a href="https://bugs.R-project.org/bugzilla3
 <li> <p><code>--with-blas='-framework vecLib'</code> now also works on OS X 10.8.
 </p>
 </li>
-<li> <p><CODE>R CMD check</CODE> no longer fails with an error if
+<li> <p><code>R CMD check</code> no longer fails with an error if
 a ‘<span class="file">DESCRIPTION</span>’ file incorrectly contains a blank line.
 (Reported by Bill Dunlap.)
 </p>
@@ -808,21 +807,21 @@ a ‘<span class="file">DESCRIPTION</span>’ file incorrectly contains
 <code>chooseCRANmirror()</code> twice.
 </p>
 </li>
-<li> <p><code>lm.wfit()</code> could segfault in <font face="Courier New,Courier" color="#666666"><b>R</b></font> 2.15.1 if all the
+<li> <p><code>lm.wfit()</code> could segfault in <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> 2.15.1 if all the
 weights were zero. (<a href="https://bugs.R-project.org/bugzilla3/show_bug.cgi?id=15044">PR#15044</a>)
 </p>
 </li>
-<li><p> A malformed package name could cause <CODE>R CMD INSTALL</CODE>
+<li><p> A malformed package name could cause <code>R CMD INSTALL</code>
 to write outside the target library.
 </p>
 </li>
 <li><p> Some of the quality control functions
-(e.g. <code>tools::checkFF()</code>) were wrongly identifying the source
+(e.g., <code>tools::checkFF()</code>) were wrongly identifying the source
 of S4 methods in a package and so not checking them.
 </p>
 </li>
 <li><p> The default type of display by <code>browseEnv()</code> when using
-<CODE>R.app</CODE> on Mac OS X has been incorrect for a long time.
+<code>R.app</code> on Mac OS X has been incorrect for a long time.
 </p>
 </li>
 <li><p> The implementation of <code>importMethodsFrom</code> in a
@@ -877,7 +876,7 @@ likely to be successful.
 
 
 
-<h3><img src="../help/figures/../../html/logo.jpg" alt="../../html/logo.jpg" /> CHANGES IN R VERSION 2.15.1</h3>
+<h3><img class="toplogo" src="../help/figures/../../html/Rlogo.svg" alt="[R logo]" /> CHANGES IN R VERSION 2.15.1</h3>
 
 
 
@@ -898,7 +897,7 @@ people have tried it with incorrectly named source packages).
 <li> <p><code>splineDesign()</code> and <code>spline.des()</code> in package
 <span class="pkg">splines</span> have a new option <code>sparse</code> which can be used
 for efficient construction of a sparse B-spline design matrix
-(<EM>via</EM> <a href="http://CRAN.R-project.org/package=Matrix"><span class="pkg">Matrix</span></a>).
+(<em>via</em> <a href="https://CRAN.R-project.org/package=Matrix"><span class="pkg">Matrix</span></a>).
 </p>
 </li>
 <li> <p><code>norm()</code> now allows <code>type = "2"</code> (the
@@ -1014,11 +1013,11 @@ functions such as <code>names()</code>, <code>attr()</code> and
 
 
 <ul>
-<li><p> For <CODE>R CMD check</CODE>, a few people have reported
+<li><p> For <code>R CMD check</code>, a few people have reported
 problems with junctions on Windows (although they were tested on
 Windows 7, XP and Server 2008 machines and it is unknown under
 what circumstances the problems occur).  Setting the environment
-variable <span class="env">R_WIN_NO_JUNCTIONS</span> to a non-empty value (e.g. in
+variable <span class="env">R_WIN_NO_JUNCTIONS</span> to a non-empty value (e.g., in
 ‘<span class="file">~/.R/check.Renviron</span>’) will force copies to be used instead.
 </p>
 </li></ul>
@@ -1030,11 +1029,11 @@ variable <span class="env">R_WIN_NO_JUNCTIONS</span> to a non-empty value (e.g.
 
 
 <ul>
-<li> <p><CODE>R CMD INSTALL</CODE> with <span class="env">_R_CHECK_INSTALL_DEPENDS_</span>
-set to a true value (as done by <CODE>R CMD check --as-cran</CODE>)
+<li> <p><code>R CMD INSTALL</code> with <span class="env">_R_CHECK_INSTALL_DEPENDS_</span>
+set to a true value (as done by <code>R CMD check --as-cran</code>)
 now restricts the packages available when lazy-loading as well
-as when test-loading (since packages such as <a href="http://CRAN.R-project.org/package=ETLUtils"><span class="pkg">ETLUtils</span></a>
-and <a href="http://CRAN.R-project.org/package=agsemisc"><span class="pkg">agsemisc</span></a> had top-level calls to <code>library()</code>
+as when test-loading (since packages such as <a href="https://CRAN.R-project.org/package=ETLUtils"><span class="pkg">ETLUtils</span></a>
+and <a href="https://CRAN.R-project.org/package=agsemisc"><span class="pkg">agsemisc</span></a> had top-level calls to <code>library()</code>
 for undeclared packages).
 </p>
 <p>This check is now also available on Windows.
@@ -1068,7 +1067,7 @@ debuggers access to the source references on the stack.
 
 <ul>
 <li><p> Windows-specific changes will now be announced in this file
-(‘<span class="file">NEWS</span>’).  Changes up and including <font face="Courier New,Courier" color="#666666"><b>R</b></font> 2.15.0 remain in the
+(‘<span class="file">NEWS</span>’).  Changes up and including <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> 2.15.0 remain in the
 ‘<span class="file">CHANGES</span>’ file.
 </p>
 </li>
@@ -1100,7 +1099,7 @@ names specified in <code>by</code> match multiple columns are errors.
 </p>
 </li>
 <li><p> Nonsense uses such as <code>seq(1:50, by = 5)</code> (from package
-<a href="http://CRAN.R-project.org/package=plotrix"><span class="pkg">plotrix</span></a>) and <code>seq.int(1:50, by = 5)</code> are now errors.
+<a href="https://CRAN.R-project.org/package=plotrix"><span class="pkg">plotrix</span></a>) and <code>seq.int(1:50, by = 5)</code> are now errors.
 </p>
 </li>
 <li><p> The residuals in the 5-number summary printed by
@@ -1113,7 +1112,7 @@ present.  (Wish of <a href="https://bugs.R-project.org/bugzilla3/show_bug.cgi?id
 by <code>.C()</code> or <code>.Fortran()</code> whereas only some object types
 were ever copied.
 </p>
-<p>It also reported and marked as copies <EM>some</EM> transformations
+<p>It also reported and marked as copies <em>some</em> transformations
 such as <code>rexp(n, x)</code>: it no longer does so.
 </p>
 </li>
@@ -1141,8 +1140,8 @@ with a different fix for the "median"/"centroid" problem.  (
 from vectors in the global environment. (<a href="https://bugs.R-project.org/bugzilla3/show_bug.cgi?id=14847">PR#14847</a>)
 </p>
 </li>
-<li> <p><CODE>R CMD check</CODE> with <span class="env">_R_CHECK_NO_RECOMMENDED_</span>
-set to a true value (as done by the <CODE>--as-cran</CODE> option)
+<li> <p><code>R CMD check</code> with <span class="env">_R_CHECK_NO_RECOMMENDED_</span>
+set to a true value (as done by the <code>--as-cran</code> option)
 could issue false errors if there was an indirect dependency
 on a recommended package.
 </p>
@@ -1167,7 +1166,7 @@ files except the last was off by one.
 <li><p> On Windows, loading package <span class="pkg">stats</span> (which is done for
 a default session) would switch line endings on ‘<span class="file">stdout</span>’
 and ‘<span class="file">stderr</span>’ from CRLF to LF.  This affected
-<CODE>Rterm</CODE> and <CODE>R CMD BATCH</CODE>.
+<code>Rterm</code> and <code>R CMD BATCH</code>.
 </p>
 </li>
 <li><p> On Windows, the compatibility function <code>x11()</code> had
@@ -1195,11 +1194,11 @@ incorrect when byte-compiled code was on the stack.
 </p>
 </li>
 <li> <p><code>plogis(x, lower = FALSE, log.p = TRUE)</code> no longer
-underflows early for large x (e.g. 800).
+underflows early for large x (e.g., 800).
 </p>
 </li>
 <li> <p><code>?Arithmetic</code>'s “<code>1 ^ y</code> and <code>y ^ 0</code>
-are <code>1</code>, <EM>always</EM>” now also applies for <code>integer</code>
+are <code>1</code>, <em>always</em>” now also applies for <code>integer</code>
 vectors <code>y</code>.
 </p>
 </li>
@@ -1209,7 +1208,7 @@ hangs.
 </p>
 </li>
 <li><p> Code executed by the built-in HTTP server no longer allows
-other HTTP clients to re-enter <font face="Courier New,Courier" color="#666666"><b>R</b></font> until the current worker
+other HTTP clients to re-enter <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> until the current worker
 evaluation finishes, to prevent cascades.
 </p>
 </li>
@@ -1243,7 +1242,7 @@ objects such as data frames.  (Reported by Matthew Dowle.)
 </p>
 </li>
 <li><p> Closing an <code>X11()</code> window while <code>locator()</code> was
-active could abort the <font face="Courier New,Courier" color="#666666"><b>R</b></font> process.
+active could abort the <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> process.
 </p>
 </li>
 <li> <p><code>getMethod(f, sig)</code> produced an incorrect error message
@@ -1293,7 +1292,7 @@ level combinations for the special case where all
 
 
 
-<h3><img src="../help/figures/../../html/logo.jpg" alt="../../html/logo.jpg" /> CHANGES IN R VERSION 2.15.0</h3>
+<h3><img class="toplogo" src="../help/figures/../../html/Rlogo.svg" alt="[R logo]" /> CHANGES IN R VERSION 2.15.0</h3>
 
 
 
@@ -1303,7 +1302,7 @@ level combinations for the special case where all
 <ul>
 <li><p> The behaviour of <code>unlink(recursive = TRUE)</code> for a
 symbolic link to a directory has changed: it now removes the link
-rather than the directory contents (just as <CODE>rm -r</CODE> does).
+rather than the directory contents (just as <code>rm -r</code> does).
 </p>
 <p>On Windows it no longer follows reparse points (including
 junctions and symbolic links).
@@ -1325,8 +1324,8 @@ to <span class="env">RD2PDF_INPUTENC</span>.
 <code>old</code> argument.
 </p>
 </li>
-<li><p> Even data-only packages without <font face="Courier New,Courier" color="#666666"><b>R</b></font> code need a namespace and
-so may need to be installed under <font face="Courier New,Courier" color="#666666"><b>R</b></font> 2.14.0 or later.
+<li><p> Even data-only packages without <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> code need a namespace and
+so may need to be installed under <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> 2.14.0 or later.
 </p>
 </li>
 <li> <p><code>assignInNamespace()</code> has further restrictions on use
@@ -1566,20 +1565,20 @@ in production use.  Developers can turn this off during package
 development with <code>PKG_CPPFLAGS = -UNDEBUG</code>.
 </p>
 </li>
-<li> <p><CODE>R CMD INSTALL</CODE> has a new option <span class="option">--dsym</span>
+<li> <p><code>R CMD INSTALL</code> has a new option <span class="option">--dsym</span>
 which on Mac OS X (Darwin) dumps the symbols alongside the
 ‘<span class="file">.so</span>’ file: this is helpful when debugging with
-<CODE>valgrind</CODE> (and especially when installing packages into
+<code>valgrind</code> (and especially when installing packages into
 ‘<span class="file">R.framework</span>’).  [This can also be enabled by setting the
-undocumented environment variable <span class="env">PKG_MAKE_DSYM</span>, since <font face="Courier New,Courier" color="#666666"><b>R</b></font>
+undocumented environment variable <span class="env">PKG_MAKE_DSYM</span>, since <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span>
 2.12.0.]
 </p>
 </li>
-<li> <p><CODE>R CMD INSTALL</CODE> will test loading under all installed
+<li> <p><code>R CMD INSTALL</code> will test loading under all installed
 sub-architectures even for packages without compiled code, unless
-the flag <span class="option">--no-multiarch</span> is used.  (Pure <font face="Courier New,Courier" color="#666666"><b>R</b></font> packages can
+the flag <span class="option">--no-multiarch</span> is used.  (Pure <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> packages can
 do things which are architecture-dependent: in the case which
-prompted this, looking for an icon in a Windows <font face="Courier New,Courier" color="#666666"><b>R</b></font> executable.)
+prompted this, looking for an icon in a Windows <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> executable.)
 </p>
 </li>
 <li><p> There is a new option <code>install.packages(type = "both")</code>
@@ -1594,11 +1593,11 @@ essential dependencies of dependencies.  To get the previous
 behaviour, specify <code>dependencies</code> as a character vector.
 </p>
 </li>
-<li> <p><CODE>R CMD INSTALL --merge-multiarch</CODE> is now supported
+<li> <p><code>R CMD INSTALL --merge-multiarch</code> is now supported
 on OS X and other Unix-alikes using multiple sub-architectures.
 </p>
 </li>
-<li> <p><CODE>R CMD INSTALL --libs-only</CODE> now by default does a
+<li> <p><code>R CMD INSTALL --libs-only</code> now by default does a
 test load on Unix-alikes as well as on Windows: suppress with
 <span class="option">--no-test-load</span>.
 </p>
@@ -1611,10 +1610,10 @@ test load on Unix-alikes as well as on Windows: suppress with
 
 
 <ul>
-<li> <p><CODE>R CMD check</CODE> now gives a warning rather than a
+<li> <p><code>R CMD check</code> now gives a warning rather than a
 note if it finds inefficiently compressed datasets.  With
-<CODE>bzip2</CODE> and <CODE>xz</CODE> compression having been
-available since <font face="Courier New,Courier" color="#666666"><b>R</b></font> 2.10.0, it only exceptionally makes sense to
+<code>bzip2</code> and <code>xz</code> compression having been
+available since <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> 2.10.0, it only exceptionally makes sense to
 not use them.
 </p>
 <p>The environment variable <span class="env">_R_CHECK_COMPACT_DATA2_</span> is
@@ -1623,38 +1622,38 @@ no longer consulted: the check is always done if
 </p>
 </li>
 <li><p> Where multiple sub-architectures are to be tested,
-<CODE>R CMD check</CODE> now runs the examples and tests for all the
+<code>R CMD check</code> now runs the examples and tests for all the
 sub-architectures even if one fails.
 </p>
 </li>
-<li> <p><CODE>R CMD check</CODE> can optionally report timings on
+<li> <p><code>R CMD check</code> can optionally report timings on
 various parts of the check: this is controlled by environment
 variable <span class="env">_R_CHECK_TIMINGS_</span> documented in ‘Writing R
-Extensions’.  Timings (in the style of <CODE>R CMD BATCH</CODE>) are
+Extensions’.  Timings (in the style of <code>R CMD BATCH</code>) are
 given at the foot of the output files from running each test and
-the <font face="Courier New,Courier" color="#666666"><b>R</b></font> code in each vignette.
+the <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> code in each vignette.
 </p>
 </li>
 <li><p> There are new options for more rigorous testing by
-<CODE>R CMD check</CODE> selected by environment variables – see
+<code>R CMD check</code> selected by environment variables – see
 the ‘Writing R Extensions’ manual.
 </p>
 </li>
-<li> <p><CODE>R CMD check</CODE> now warns (rather than notes) on
+<li> <p><code>R CMD check</code> now warns (rather than notes) on
 undeclared use of other packages in examples and tests:
 increasingly people are using the metadata in the
 ‘<span class="file">DESCRIPTION</span>’ file to compute information about packages,
 for example reverse dependencies.
 </p>
 </li>
-<li><p> The defaults for some of the options in <CODE>R CMD
-	 check</CODE> (described in the ‘R Internals’ manual) have
+<li><p> The defaults for some of the options in <code>R CMD
+	 check</code> (described in the ‘R Internals’ manual) have
 changed: checks for unsafe and <code>.Internal()</code> calls and
-for partial matching of arguments in <font face="Courier New,Courier" color="#666666"><b>R</b></font> function calls are now
+for partial matching of arguments in <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> function calls are now
 done by default.
 </p>
 </li>
-<li> <p><CODE>R CMD check</CODE> has more comprehensive facilities for
+<li> <p><code>R CMD check</code> has more comprehensive facilities for
 checking compiled code and so gives fewer reports on entry points
 linked into ‘<span class="file">.so</span>’/‘<span class="file">.dll</span>’ files from libraries
 (including C++ and Fortran runtimes).
@@ -1664,11 +1663,11 @@ existing supported platforms of Linux, Mac OS X, Solaris and
 Windows).
 </p>
 </li>
-<li> <p><CODE>R CMD build</CODE> has more options for
-<span class="option">--compact-vignettes</span>: see <CODE>R CMD build --help</CODE>.
+<li> <p><code>R CMD build</code> has more options for
+<span class="option">--compact-vignettes</span>: see <code>R CMD build --help</code>.
 </p>
 </li>
-<li> <p><CODE>R CMD build</CODE> has a new option <span class="option">--md5</span> to
+<li> <p><code>R CMD build</code> has a new option <span class="option">--md5</span> to
 add an ‘<span class="file">MD5</span>’ file (as done by CRAN): this is used by <code>R
 	 CMD INSTALL</code> to check the integrity of the distribution.
 </p>
@@ -1684,7 +1683,7 @@ stale) ‘<span class="file">MD5</span>’ file is removed.
 
 
 <ul>
-<li> <p><CODE>R CMD Rd2dvi</CODE> is now defunct: use <CODE>R CMD Rd2pdf</CODE>.
+<li> <p><code>R CMD Rd2dvi</code> is now defunct: use <code>R CMD Rd2pdf</code>.
 </p>
 </li>
 <li><p> Options such <span class="option">--max-nsize</span>, <span class="option">--max-vsize</span> and
@@ -1710,7 +1709,7 @@ directives in ‘<span class="file">NAMESPACE</span>’ files.
 <span class="samp">"ps"</span> are defunct.
 </p>
 </li>
-<li> <p><code>Sys.putenv()</code>, replaced and deprecated in <font face="Courier New,Courier" color="#666666"><b>R</b></font> 2.5.0, is
+<li> <p><code>Sys.putenv()</code>, replaced and deprecated in <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> 2.5.0, is
 finally removed.
 </p>
 </li>
@@ -1753,14 +1752,14 @@ complex and raw vectors.
 
 
 <ul>
-<li><p> Passing <font face="Courier New,Courier" color="#666666"><b>R</b></font> objects other than atomic vectors, functions,
+<li><p> Passing <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> objects other than atomic vectors, functions,
 lists and environments to <code>.C()</code> is now deprecated and will
 give a warning.  Most cases (especially <code>NULL</code>) are actually
 coding errors.  <code>NULL</code> will be disallowed in future.
 </p>
 <p><code>.C()</code> now passes a pairlist as a <code>SEXP</code> to the compiled
 code.  This is as was documented, but pairlists were in reality
-handled differently as a legacy from the early days of <font face="Courier New,Courier" color="#666666"><b>R</b></font>.
+handled differently as a legacy from the early days of <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span>.
 </p>
 </li>
 <li> <p><code>call_R</code> and <code>call_S</code> are deprecated.  They still
@@ -1833,7 +1832,7 @@ prototype even if that was not a legal subclass.  See
 </li>
 <li><p> The C prototypes for <code>zdotc</code> and <code>zdotu</code> in
 ‘<span class="file">R_ext/BLAS.h</span>’ have been changed to the more modern style
-rather than that used by <CODE>f2c</CODE>.  (Patch by Berwin Turlach.)
+rather than that used by <code>f2c</code>.  (Patch by Berwin Turlach.)
 </p>
 </li>
 <li> <p><code>isGeneric()</code> produced an error for primitives that
@@ -1878,7 +1877,7 @@ objects (caused a problem with <code>trace()</code> reported by Martin Morgan).
 
 
 
-<h3><img src="../help/figures/../../html/logo.jpg" alt="../../html/logo.jpg" /> CHANGES IN R VERSION 2.14.2</h3>
+<h3><img class="toplogo" src="../help/figures/../../html/Rlogo.svg" alt="[R logo]" /> CHANGES IN R VERSION 2.14.2</h3>
 
 
 
@@ -1887,9 +1886,9 @@ objects (caused a problem with <code>trace()</code> reported by Martin Morgan).
 
 <ul>
 <li><p> The internal <code>untar()</code> (as used by default by
-<CODE>R CMD INSTALL</CODE>) now knows about some <CODE>pax</CODE>
-headers which <CODE>bsdtar</CODE> (e.g., the default <CODE>tar</CODE> for
-Mac OS >= 10.6) can incorrectly include in <CODE>tar</CODE> files,
+<code>R CMD INSTALL</code>) now knows about some <code>pax</code>
+headers which <code>bsdtar</code> (e.g., the default <code>tar</code> for
+Mac OS >= 10.6) can incorrectly include in <code>tar</code> files,
 and will skip them with a warning.
 </p>
 </li>
@@ -1897,14 +1896,14 @@ and will skip them with a warning.
 and greater Perl compatibility, this adds a JIT pattern compiler,
 about which PCRE's news says
 ‘large performance benefits can be had in many situations’.
-This is supported on most but not all <font face="Courier New,Courier" color="#666666"><b>R</b></font> platforms.
+This is supported on most but not all <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> platforms.
 </p>
 </li>
 <li><p> Function <code>compactPDF()</code> in package <span class="pkg">tools</span> now
 takes the default for argument <code>gs_quality</code> from environment
 variable <span class="env">GS_QUALITY</span>: there is a new value <code>"none"</code>, the
 ultimate default, which prevents GhostScript being used in
-preference to <CODE>qpdf</CODE> just because environment variable
+preference to <code>qpdf</code> just because environment variable
 <span class="env">R_GSCMD</span> is set.  If <span class="env">R_GSCMD</span> is unset or set to
 <code>""</code>, the function will try to find a suitable GhostScript
 executable.
@@ -1926,11 +1925,11 @@ with zero weight.  (Reported by Berwin Turlach.)
 
 
 <ul>
-<li> <p><CODE>R CMD check</CODE> now reports by default on licenses not
+<li> <p><code>R CMD check</code> now reports by default on licenses not
 according to the description in ‘Writing R Extensions’.
 </p>
 </li>
-<li> <p><CODE>R CMD check</CODE> has a new option <span class="option">--as-cran</span> to
+<li> <p><code>R CMD check</code> has a new option <span class="option">--as-cran</span> to
 turn on most of the customizations that CRAN uses for its incoming
 checks.
 </p>
@@ -1943,7 +1942,7 @@ checks.
 
 
 <ul>
-<li> <p><CODE>R CMD INSTALL</CODE> will now no longer install certain
+<li> <p><code>R CMD INSTALL</code> will now no longer install certain
 file types from ‘<span class="file">inst/doc</span>’: these are almost certainly
 mistakes and for some packages are wasting a lot of space.  These
 are ‘<span class="file">Makefile</span>’, files generated by running LaTeX, and unless
@@ -1952,7 +1951,7 @@ image bitmap files.
 </p>
 <p>Note that only PDF vignettes have ever been supported: some of
 these files come from DVI/PS output from the Sweave defaults prior
-to <font face="Courier New,Courier" color="#666666"><b>R</b></font> 2.13.0.
+to <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> 2.13.0.
 </p>
 </li></ul>
 
@@ -1976,7 +1975,7 @@ computation to find an S4 default method.
 of the file was not terminated.  (<a href="https://bugs.R-project.org/bugzilla3/show_bug.cgi?id=14766">PR#14766</a>)
 </p>
 </li>
-<li> <p><CODE>R CMD check</CODE> could miss undocumented S4 objects in
+<li> <p><code>R CMD check</code> could miss undocumented S4 objects in
 packages which used S4 classes but did not <span class="samp">Depends: methods</span>
 in their ‘<span class="file">DESCRIPTION</span>’ file.
 </p>
@@ -2028,7 +2027,7 @@ argument. (<a href="https://bugs.R-project.org/bugzilla3/show_bug.cgi?id=14807">
 file path.  (<a href="https://bugs.R-project.org/bugzilla3/show_bug.cgi?id=14790">PR#14790</a>)
 </p>
 </li>
-<li> <p><CODE>make install</CODE> can install to a path containing
+<li> <p><code>make install</code> can install to a path containing
 <span class="samp">+</span> characters. (<a href="https://bugs.R-project.org/bugzilla3/show_bug.cgi?id=14798">PR#14798</a>)
 </p>
 </li>
@@ -2044,7 +2043,7 @@ not work.  (<a href="https://bugs.R-project.org/bugzilla3/show_bug.cgi?id=14817"
 <li><p> There is a partial workaround for errors in the TRE
 regular-expressions engine with named classes and repeat counts of
 at least 2 in a MBCS locale (<a href="https://bugs.R-project.org/bugzilla3/show_bug.cgi?id=14408">PR#14408</a>): these are avoided when
-TRE is in 8-bit mode (e.g. for <code>useBytes = TRUE</code> and when all
+TRE is in 8-bit mode (e.g., for <code>useBytes = TRUE</code> and when all
 the data are ASCII).
 </p>
 </li>
@@ -2056,8 +2055,8 @@ handlers.
 Mac OS X 10.7 (Lion) and higher and thus it was not used as the
 default device on the console.  Since Lion any application can use
 window sessions, so Quartz will now be the default device if the
-user's window session is active and <font face="Courier New,Courier" color="#666666"><b>R</b></font> is not run via
-<CODE>ssh</CODE> which is at least close to the behavior in prior OS
+user's window session is active and <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> is not run via
+<code>ssh</code> which is at least close to the behavior in prior OS
 X versions.
 </p>
 </li>
@@ -2082,7 +2081,7 @@ package installs going on in parallel.
 
 
 
-<h3><img src="../help/figures/../../html/logo.jpg" alt="../../html/logo.jpg" /> CHANGES IN R VERSION 2.14.1</h3>
+<h3><img class="toplogo" src="../help/figures/../../html/Rlogo.svg" alt="[R logo]" /> CHANGES IN R VERSION 2.14.1</h3>
 
 
 
@@ -2120,7 +2119,7 @@ an environment from which to export.
 </p>
 </li>
 <li> <p><code>tempfile()</code> on a Unix-alike now takes the process ID
-into account.  This is needed with <a href="http://CRAN.R-project.org/package=multicore"><span class="pkg">multicore</span></a> (and as part of
+into account.  This is needed with <a href="https://CRAN.R-project.org/package=multicore"><span class="pkg">multicore</span></a> (and as part of
 <span class="pkg">parallel</span>) because the parent and all the children share a
 session temporary directory, and they can share the C random
 number stream used to produce the unique part.  Further, two
@@ -2135,7 +2134,7 @@ for an S4 object by calling <code>show()</code> rather than
 </li>
 <li> <p><code>filled.contour()</code> now accepts infinite values:
 previously it might have generated invalid graphics files
-(e.g. containing NaN values).
+(e.g., containing NaN values).
 </p>
 </li></ul>
 
@@ -2146,17 +2145,17 @@ previously it might have generated invalid graphics files
 
 
 <ul>
-<li><p> On 64-bit Linux systems, <CODE>configure</CODE> now only sets
+<li><p> On 64-bit Linux systems, <code>configure</code> now only sets
 <span class="samp">LIBnn</span> to <code>lib64</code> if ‘<span class="file">/usr/lib64</span>’ exists.  This
 may obviate setting <span class="samp">LIBnn</span> explicitly on Debian-derived
 systems.
 </p>
 <p>It is still necessary to set <span class="samp">LIBnn = lib</span> (or
-<span class="samp">lib32</span>) for 32-bit builds of <font face="Courier New,Courier" color="#666666"><b>R</b></font> on a 64-bit OS on those Linux
+<span class="samp">lib32</span>) for 32-bit builds of <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> on a 64-bit OS on those Linux
 distributions capable for supporting that concept.
 </p>
 </li>
-<li> <p><CODE>configure</CODE> looks for ‘<span class="file">inconsolata.sty</span>’, and if
+<li> <p><code>configure</code> looks for ‘<span class="file">inconsolata.sty</span>’, and if
 not found adjusts the default <span class="env">R_RD4PDF</span> to not use it (with a
 warning, since it is needed for high-quality rendering of manuals).
 </p>
@@ -2169,7 +2168,7 @@ warning, since it is needed for high-quality rendering of manuals).
 
 
 <ul>
-<li> <p><CODE>R CMD INSTALL</CODE> will now do a test load for all
+<li> <p><code>R CMD INSTALL</code> will now do a test load for all
 sub-architectures for which code was compiled (rather than just
 the primary sub-architecture).
 </p>
@@ -2183,7 +2182,7 @@ the primary sub-architecture).
 
 <ul>
 <li><p> When checking examples under more than one sub-architecture,
-<CODE>R CMD check</CODE> now uses a separate directory
+<code>R CMD check</code> now uses a separate directory
 ‘<span class="file">examples_arch</span>’ for each sub-architecture, and leaves the
 output in file ‘<span class="file">pkgname-Ex_arch.Rout</span>’.  Some packages
 expect their examples to be run in a clean directory ....
@@ -2211,7 +2210,7 @@ Helios de Rosario Martinez).
 text as well as braces.
 </p>
 </li>
-<li> <p><code>colormodel = "grey"</code> (new in <font face="Courier New,Courier" color="#666666"><b>R</b></font> 2.14.0))
+<li> <p><code>colormodel = "grey"</code> (new in <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> 2.14.0))
 did not always work in <code>postscript()</code> and <code>pdf()</code>.
 </p>
 </li>
@@ -2221,7 +2220,7 @@ did not always work in <code>postscript()</code> and <code>pdf()</code>.
 </li>
 <li> <p><code>gzcon()</code> connections are no longer subject to garbage
 collection: it was possible for this to happen when unintended
-(e.g. when calling <code>load()</code>).
+(e.g., when calling <code>load()</code>).
 </p>
 </li>
 <li> <p><code>nobs()</code> does not count zero-weight observations for
@@ -2255,7 +2254,7 @@ variance returned by <code>KalmanSmooth()</code>.  (<a href="https://bugs.R-proj
 </p>
 </li>
 <li> <p><code>pbinom(10, 1e6, 0.01, log.p = TRUE)</code> was <code>NaN</code>
-thanks to the buggy fix to <a href="https://bugs.R-project.org/bugzilla3/show_bug.cgi?id=14320">PR#14320</a> in <font face="Courier New,Courier" color="#666666"><b>R</b></font> 2.11.0.  (<a href="https://bugs.R-project.org/bugzilla3/show_bug.cgi?id=14739">PR#14739</a>)
+thanks to the buggy fix to <a href="https://bugs.R-project.org/bugzilla3/show_bug.cgi?id=14320">PR#14320</a> in <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> 2.11.0.  (<a href="https://bugs.R-project.org/bugzilla3/show_bug.cgi?id=14739">PR#14739</a>)
 </p>
 </li>
 <li> <p><code>RweaveLatex()</code> now emulates auto-printing rather than
@@ -2286,7 +2285,7 @@ tabular cells properly.  (<a href="https://bugs.R-project.org/bugzilla3/show_bug
 </p>
 </li>
 <li> <p><code>source()</code> on an empty file with <code>keep.source =
-	TRUE</code> tried to read from <code>stdin()</code>, in <font face="Courier New,Courier" color="#666666"><b>R</b></font> 2.14.0 only.
+	TRUE</code> tried to read from <code>stdin()</code>, in <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> 2.14.0 only.
 (<a href="https://bugs.R-project.org/bugzilla3/show_bug.cgi?id=14753">PR#14753</a>)
 </p>
 </li>
@@ -2298,7 +2297,7 @@ duplicate description sections were present.
 
 
 
-<h3><img src="../help/figures/../../html/logo.jpg" alt="../../html/logo.jpg" /> CHANGES IN R VERSION 2.14.0</h3>
+<h3><img class="toplogo" src="../help/figures/../../html/Rlogo.svg" alt="[R logo]" /> CHANGES IN R VERSION 2.14.0</h3>
 
 
 
@@ -2309,8 +2308,8 @@ duplicate description sections were present.
 <li><p> All packages must have a namespace, and one is created on
 installation if not supplied in the sources.  This means that any
 package without a namespace must be re-installed under this
-version of <font face="Courier New,Courier" color="#666666"><b>R</b></font> (but previously-installed data-only packages without
-<font face="Courier New,Courier" color="#666666"><b>R</b></font> code can still be used).
+version of <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> (but previously-installed data-only packages without
+<span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> code can still be used).
 </p>
 </li>
 <li><p> The <code>yLineBias</code> of the <code>X11()</code> and
@@ -2322,45 +2321,45 @@ consistency with other devices such as <code>quartz()</code> and
 </p>
 <p>There is a new graphics parameter <code>"ylbias"</code> which
 allows the y-line bias of the graphics device to be tweaked,
-including to reproduce output from earlier versions of <font face="Courier New,Courier" color="#666666"><b>R</b></font>.
+including to reproduce output from earlier versions of <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span>.
 </p>
 </li>
 <li><p> Labeling of the p-values in various anova tables has been
 rationalized to be either <code>"Pr(>F)"</code> or <code>"Pr(>Chi)"</code>
-(i.e. the <code>"Pr(F)"</code>, <code>"Pr(Chi)"</code> and <code>"P(>|Chi|)"</code>
+(i.e., the <code>"Pr(F)"</code>, <code>"Pr(Chi)"</code> and <code>"P(>|Chi|)"</code>
 variants have been eliminated).  Code which extracts the p value
-<EM>via</EM> indexing by name may need adjustment.
+<em>via</em> indexing by name may need adjustment.
 </p>
 </li>
 <li> <p><code>::</code> can now be used for datasets made available for
 lazy-loading in packages with namespaces (which makes it consistent
 with its use for data-only packages without namespaces in earlier
-versions of <font face="Courier New,Courier" color="#666666"><b>R</b></font>).
+versions of <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span>).
 </p>
 </li>
 <li><p> There is a new package <span class="pkg">parallel</span>.
 </p>
 <p>It incorporates (slightly revised) copies of packages
-<a href="http://CRAN.R-project.org/package=multicore"><span class="pkg">multicore</span></a> and <a href="http://CRAN.R-project.org/package=snow"><span class="pkg">snow</span></a> (excluding MPI, PVM and NWS
+<a href="https://CRAN.R-project.org/package=multicore"><span class="pkg">multicore</span></a> and <a href="https://CRAN.R-project.org/package=snow"><span class="pkg">snow</span></a> (excluding MPI, PVM and NWS
 clusters).  Code written to use the higher-level API functions in
 those packages should work unchanged (apart from changing any
 references to their namespaces to a reference to <span class="pkg">parallel</span>,
-and links explicitly to <a href="http://CRAN.R-project.org/package=multicore"><span class="pkg">multicore</span></a> or <a href="http://CRAN.R-project.org/package=snow"><span class="pkg">snow</span></a> on help
+and links explicitly to <a href="https://CRAN.R-project.org/package=multicore"><span class="pkg">multicore</span></a> or <a href="https://CRAN.R-project.org/package=snow"><span class="pkg">snow</span></a> on help
 pages).
 </p>
 <p>It also contains support for multiple RNG streams following
-L'Ecuyer <EM>et al</EM> (2002), with support for both
-<code>mclapply</code> and <a href="http://CRAN.R-project.org/package=snow"><span class="pkg">snow</span></a> clusters.  This replaces functions
-like <code>clusterSetupRNG()</code> from <a href="http://CRAN.R-project.org/package=snow"><span class="pkg">snow</span></a> (which are not in
+L'Ecuyer <em>et al</em> (2002), with support for both
+<code>mclapply</code> and <a href="https://CRAN.R-project.org/package=snow"><span class="pkg">snow</span></a> clusters.  This replaces functions
+like <code>clusterSetupRNG()</code> from <a href="https://CRAN.R-project.org/package=snow"><span class="pkg">snow</span></a> (which are not in
 <span class="pkg">parallel</span>).
 </p>
-<p>The version released for <font face="Courier New,Courier" color="#666666"><b>R</b></font> 2.14.0 contains base functionality:
+<p>The version released for <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> 2.14.0 contains base functionality:
 higher-level convenience functions are planned (and some are
-already available in the ‘R-devel’ version of <font face="Courier New,Courier" color="#666666"><b>R</b></font>).
+already available in the ‘R-devel’ version of <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span>).
 </p>
 </li>
-<li><p> Building PDF manuals (for <font face="Courier New,Courier" color="#666666"><b>R</b></font> itself or packages,
-e.g. <EM>via</EM> <CODE>R CMD check</CODE>) by default requires the
+<li><p> Building PDF manuals (for <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> itself or packages,
+e.g. <em>via</em> <code>R CMD check</code>) by default requires the
 LaTeX package <span class="samp">inconsolata</span>: see the section on
 ‘Making the manuals’ in the ‘R Installation and
 Administration Manual’.
@@ -2414,7 +2413,7 @@ possible before the <code>CHARSXP</code> cache was introduced).
 </li>
 <li><p> Garbage-collecting an unused input text connection no longer
 gives a warning (since it ‘connects’ to nothing outside
-<font face="Courier New,Courier" color="#666666"><b>R</b></font>).
+<span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span>).
 </p>
 </li>
 <li> <p><code>read.table()</code> and <code>scan()</code> have gained a
@@ -2446,7 +2445,7 @@ value.  (Wish of <a href="https://bugs.R-project.org/bugzilla3/show_bug.cgi?id=1
 </p>
 </li>
 <li> <p><code>unlink()</code> gains a <code>force</code> argument to work like
-<CODE>rm -f</CODE> and if possible override restrictive permissions.
+<code>rm -f</code> and if possible override restrictive permissions.
 </p>
 </li>
 <li> <p><code>pbirthday()</code> and <code>qbirthday()</code> now use exact
@@ -2455,7 +2454,7 @@ calculations for <code>coincident = 2</code>.
 </li>
 <li> <p><code>unzip()</code> and <code>unz()</code> connections have been
 updated with support for more recent Zip64 features (including
-large file sizes and <CODE>bzip2</CODE> compression, but not UTF-8
+large file sizes and <code>bzip2</code> compression, but not UTF-8
 file names).
 </p>
 <p><code>unzip()</code> has a new option to restore file times from those
@@ -2482,8 +2481,8 @@ plotting.  (Suggestion of Rob Hyndman.)
 and <code>anova</code> methods now allow <code>test = "Rao"</code>.
 </p>
 </li>
-<li><p> If a saved workspace (e.g. ‘<span class="file">.RData</span>’) contains objects
-that cannot be loaded, <font face="Courier New,Courier" color="#666666"><b>R</b></font> will now start with an warning message
+<li><p> If a saved workspace (e.g., ‘<span class="file">.RData</span>’) contains objects
+that cannot be loaded, <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> will now start with an warning message
 and an empty workspace, rather than failing to start.
 </p>
 </li>
@@ -2530,7 +2529,7 @@ log-scaling of the x-axis from the previous plot.
 </li>
 <li><p> Both <code>curve()</code> and the <code>plot()</code> method for
 functions have a new argument <code>xname</code> to facilitate plots
-such as <code>sin(t)</code> <EM>vs</EM> <code>t</code>.
+such as <code>sin(t)</code> <em>vs</em> <code>t</code>.
 </p>
 </li>
 <li><p> The <code>local</code> argument to <code>source()</code> can specify an
@@ -2593,7 +2592,7 @@ original error condition object as the <code>"condition"</code>
 attribute.
 </p>
 </li>
-<li><p> All packages with <font face="Courier New,Courier" color="#666666"><b>R</b></font> code are lazy-loaded irrespective of
+<li><p> All packages with <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> code are lazy-loaded irrespective of
 the <span class="samp">LazyLoad</span> field in the ‘<span class="file">DESCRIPTION</span>’ file.  A
 warning is given if the <span class="samp">LazyLoad</span> field is overridden.
 </p>
@@ -2610,12 +2609,12 @@ addressed as the ‘<span class="file">/session</span>’ directory on t
 server.
 </p>
 </li>
-<li><p> Development versions of <font face="Courier New,Courier" color="#666666"><b>R</b></font> are no longer referred to by the
-number under which they might be released, e.g. in the startup
-banner, <CODE>R --version</CODE> and <code>sessionUtils()</code>.  The
+<li><p> Development versions of <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> are no longer referred to by the
+number under which they might be released, e.g., in the startup
+banner, <code>R --version</code> and <code>sessionUtils()</code>.  The
 correct way to refer to a development version of R is
-‘R-devel’, preferably with the date and SVN version number.<br>
-E.g. <span class="samp">R-devel (2011-07-04 r56266)</span>
+‘R-devel’, preferably with the date and SVN version number.<br />
+E.g., <span class="samp">R-devel (2011-07-04 r56266)</span>
 </p>
 </li>
 <li><p> There is a new function <code>texi2pdf()</code> in package
@@ -2651,13 +2650,13 @@ attribute.  The <code>"srcref"</code> attribute references an in-memory
 copy of the source file using the <code>"srcfilecopy"</code> class or
 the new <code>"srcfilealias"</code> class.
 </p>
-<p><STRONG>NB:</STRONG> This means that functions sourced with
+<p><strong>NB:</strong> This means that functions sourced with
 <code>keep.source = TRUE</code> and saved (e.g., by <code>save()</code> or
-<code>readRDS()</code>) in earlier versions of <font face="Courier New,Courier" color="#666666"><b>R</b></font> will no longer show
+<code>readRDS()</code>) in earlier versions of <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> will no longer show
 the original sources (including comments).
 </p>
 </li>
-<li><p> New items <a href="UserManuals.html">User Manuals</a> and
+<li><p> New items <span class="samp">User Manuals</span> and
 <a href="http://developer.r-project.org/TechDocs">Technical Papers</a>
 have been added to the HTML help main page.  These link to
 vignettes in the base and recommended packages and to a
@@ -2687,7 +2686,7 @@ the environment to be specified indirectly; the latter gains
 a <code>clear</code> argument to allow it to call <code>untrace()</code>.
 </p>
 </li>
-<li><p> The body of a closure can be one of further types of <font face="Courier New,Courier" color="#666666"><b>R</b></font>
+<li><p> The body of a closure can be one of further types of <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span>
 objects, including environments and external pointers.
 </p>
 </li>
@@ -2716,12 +2715,12 @@ of help pages, vignettes and demos.
 </p>
 </li>
 <li> <p><code>socketConnection()</code> now has a <code>timeout</code> argument.
-It is now documented that large values (package <a href="http://CRAN.R-project.org/package=snow"><span class="pkg">snow</span></a> used a
+It is now documented that large values (package <a href="https://CRAN.R-project.org/package=snow"><span class="pkg">snow</span></a> used a
 year) do not work on some OSes.
 </p>
 </li>
 <li><p> The initialization of the random-number generator now uses
-the process ID as well as the current time, just in case two <font face="Courier New,Courier" color="#666666"><b>R</b></font>
+the process ID as well as the current time, just in case two <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span>
 processes are launched very rapidly on a machine with
 low-resolution wall clock (some have a resolution of a second;
 modern systems have microsecond-level resolution).
@@ -2763,7 +2762,7 @@ matched or non-matched substrings from match data obtained by
 <li> <p><code>help(package = "pkg_name", help_type = "HTML")</code> now
 gives HTML help on the package rather than text help.  (This gives
 direct access to the HTML version of the package manual shown
-<EM>via</EM> <code>help.start()</code>'s ‘Packages’ menu.)
+<em>via</em> <code>help.start()</code>'s ‘Packages’ menu.)
 </p>
 </li>
 <li> <p><code>agrep()</code> gains a <code>fixed</code> argument to optionally
@@ -2843,7 +2842,7 @@ utility <code>.axisPars()</code>.  Further, it now returns a decreasing
 sequence (as for <code>log=FALSE</code>) when <code>usr</code> is decreasing.
 </p>
 </li>
-<li><p> Using <code>fix()</code> or <code>edit()</code> on a <font face="Courier New,Courier" color="#666666"><b>R</b></font> object (except
+<li><p> Using <code>fix()</code> or <code>edit()</code> on a <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> object (except
 perhaps a matrix or data frame) writes its temporary file with
 extension ‘<span class="file">.R</span>’ so editors which select their mode based on
 the extension will select a suitable mode.
@@ -2870,7 +2869,7 @@ is one of the <code>x11.options()</code> and so can be passed as an
 argument to the <code>bmp()</code>, <code>jpeg()</code>, <code>png()</code> and
 <code>tiff()</code> devices.
 </p>
-<p>Analogous changes have been made on Windows, so all built-in <font face="Courier New,Courier" color="#666666"><b>R</b></font>
+<p>Analogous changes have been made on Windows, so all built-in <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span>
 graphics devices now have a <code>family</code> argument except
 <code>pictex()</code> (which has no means to change fonts).
 </p>
@@ -2926,11 +2925,11 @@ there is now slightly more advantage in doing so).
 </p>
 </li>
 <li> <p><code>postscript()</code> with values <code>colormodel = "rgb"</code> and
-<code>colormodel = "rgb-nogray"</code> give the behaviour prior to <font face="Courier New,Courier" color="#666666"><b>R</b></font>
+<code>colormodel = "rgb-nogray"</code> give the behaviour prior to <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span>
 2.13.0 of uncalibrated RGB, which under some circumstances can be
 rendered much faster by a viewer.
 </p>
-<p><code>pdf(colormodel = "rgb")</code> gives the behaviour prior to <font face="Courier New,Courier" color="#666666"><b>R</b></font>
+<p><code>pdf(colormodel = "rgb")</code> gives the behaviour prior to <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span>
 2.13.0 of uncalibrated RGB, which under some circumstances can be
 rendered faster by a viewer, and the files will be smaller (by
 about 9KB if compression is not used).
@@ -2993,20 +2992,20 @@ means that <span class="samp">t</span> and <span class="samp">f</span> are no lo
 </p>
 </li>
 <li><p> The preferred location for vignette sources is now the
-directory ‘<span class="file">vignettes</span>’ and not ‘<span class="file">inst/doc</span>’: <CODE>R CMD
-      build</CODE> will now re-build vignettes in directory ‘<span class="file">vignettes</span>’
+directory ‘<span class="file">vignettes</span>’ and not ‘<span class="file">inst/doc</span>’: <code>R CMD
+      build</code> will now re-build vignettes in directory ‘<span class="file">vignettes</span>’
 and copy the ‘<span class="file">.Rnw</span>’ (etc) files and the corresponding PDFs to
 ‘<span class="file">inst/doc</span>’.  Further files to be copied to ‘<span class="file">inst/doc</span>’
-can be specified <EM>via</EM> the file
+can be specified <em>via</em> the file
 ‘<span class="file">vignettes/.install_extras</span>’.
 </p>
 </li>
-<li> <p><CODE>R CMD Sweave</CODE> now supports a <span class="option">--driver</span>
+<li> <p><code>R CMD Sweave</code> now supports a <span class="option">--driver</span>
 option to select the Sweave driver: the default is equivalent to
 <span class="option">--driver=RweaveLatex</span>.
 </p>
 </li>
-<li> <p><CODE>R CMD Sweave</CODE> and <CODE>R CMD Stangle</CODE> support
+<li> <p><code>R CMD Sweave</code> and <code>R CMD Stangle</code> support
 options <span class="option">--encoding</span> and <span class="option">--options</span>.
 </p>
 </li>
@@ -3014,19 +3013,19 @@ options <span class="option">--encoding</span> and <span class="option">--option
 or <code>output = "stderr"</code> to select the output or message
 connection.  This is convenient for scripting using something like
 </p>
-<PRE>    R CMD Stangle --options='output="stdout"' foo.Rnw > foo2.R</PRE>
+<pre>    R CMD Stangle --options='output="stdout"' foo.Rnw > foo2.R</pre>
 </li>
 <li><p> There is a new option <code>pdf.compress</code> controlling
 whether PDF figures are generated using Flate compression (they
 are by default).
 </p>
 </li>
-<li> <p><CODE>R CMD Sweave</CODE> now has a <span class="option">--pdf</span> option to
+<li> <p><code>R CMD Sweave</code> now has a <span class="option">--pdf</span> option to
 produce a PDF version of the processed Sweave document.
 </p>
 </li>
 <li><p> It is no longer allowed to have two vignettes with the
-same vignette basename (e.g. ‘<span class="file">vig.Rnw</span>’ and ‘<span class="file">vig.Snw</span>’).
+same vignette basename (e.g., ‘<span class="file">vig.Rnw</span>’ and ‘<span class="file">vig.Snw</span>’).
 (Previously one vignette hid the other in the <code>vignette()</code>
 function.)
 </p>
@@ -3058,19 +3057,19 @@ as all packages are lazy-loaded, this is now only relevant at
 installation.)
 </p>
 <p>There are corresponding options <span class="option">--with-keep.source</span> and
-<span class="option">--without-keep.source</span> for <CODE>R CMD INSTALL</CODE>.
+<span class="option">--without-keep.source</span> for <code>R CMD INSTALL</code>.
 </p>
 </li>
-<li> <p><CODE>R CMD INSTALL</CODE> has a new option
+<li> <p><code>R CMD INSTALL</code> has a new option
 <span class="option">--byte-compile</span> to byte-compile the packages during
 installation (since all packages are now lazy-loaded).  This can
 be controlled on a per-package basis by the optional field
 <span class="samp">ByteCompile</span> in the ‘<span class="file">DESCRIPTION</span>’ file.
 </p>
 </li>
-<li><p> A package <font face="Courier New,Courier" color="#666666"><b>R</b></font> code but without a ‘<span class="file">NAMESPACE</span>’ file will
-have a default one created at <CODE>R CMD build</CODE> or <CODE>R
-      CMD INSTALL</CODE> time, so all packages will be installed with
+<li><p> A package <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> code but without a ‘<span class="file">NAMESPACE</span>’ file will
+have a default one created at <code>R CMD build</code> or <code>R
+      CMD INSTALL</code> time, so all packages will be installed with
 namespaces.  A consequence of this is that <code>.First.lib()</code>
 functions need to be copied to <code>.onLoad()</code> (usually) or
 <code>.onAttach()</code>.  For the time being, if there is an
@@ -3082,8 +3081,8 @@ list of known exceptions, when it will be run as the load hook).
 </li>
 <li><p> A warning is given if test-loading a package changes a
 locked binding in a package other than itself.  It is likely that
-this will be disallowed in future releases.  (There are <EM>pro
-tem</EM> some exceptions to the warning.)
+this will be disallowed in future releases.  (There are <em>pro
+tem</em> some exceptions to the warning.)
 </p>
 </li>
 <li><p> A dependency on SVN revision is allowed for <code>R</code>,
@@ -3111,37 +3110,37 @@ been preferred).
 
 
 <ul>
-<li> <p><CODE>R CMD check</CODE> now gives an error if the <font face="Courier New,Courier" color="#666666"><b>R</b></font> code in a
+<li> <p><code>R CMD check</code> now gives an error if the <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> code in a
 vignette fails to run, unless this is caused by a missing package.
 </p>
 </li>
-<li> <p><CODE>R CMD check</CODE> now unpacks tarballs in the same way
-as <CODE>R CMD INSTALL</CODE>, including making use of the
+<li> <p><code>R CMD check</code> now unpacks tarballs in the same way
+as <code>R CMD INSTALL</code>, including making use of the
 environment variable <span class="env">R_INSTALL_TAR</span> to override the default
 behaviour.
 </p>
 </li>
-<li> <p><CODE>R CMD check</CODE> performs additional code analysis of
+<li> <p><code>R CMD check</code> performs additional code analysis of
 package startup functions, and notifies about incorrect argument
 lists and (incorrect) calls to functions which modify the search
 path or inappropriately generate messages.
 </p>
 </li>
-<li> <p><CODE>R CMD check</CODE> now also checks compiled code for
-symbols corresponding to functions which might terminate <font face="Courier New,Courier" color="#666666"><b>R</b></font> or
+<li> <p><code>R CMD check</code> now also checks compiled code for
+symbols corresponding to functions which might terminate <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> or
 write to ‘<span class="file">stdout</span>’/‘<span class="file">stderr</span>’ instead of the console.
 </p>
 </li>
-<li> <p><CODE>R CMD check</CODE> now uses a <code>pdf()</code> device when
+<li> <p><code>R CMD check</code> now uses a <code>pdf()</code> device when
 checking examples (rather than <code>postscript()</code>).
 </p>
 </li>
-<li> <p><CODE>R CMD check</CODE> now checks line-endings of makefiles
+<li> <p><code>R CMD check</code> now checks line-endings of makefiles
 and C/C++/Fortran sources in subdirectories of ‘<span class="file">src</span>’ as well
 as in ‘<span class="file">src</span>’ itself.
 </p>
 </li>
-<li> <p><CODE>R CMD check</CODE> now reports as a NOTE what look like
+<li> <p><code>R CMD check</code> now reports as a NOTE what look like
 methods documented with their full names even if there is a
 namespace and they are exported.  In almost all cases they are
 intended to be used only as methods and should use the
@@ -3154,30 +3153,30 @@ the ‘<span class="file">NAMESPACE</span>’ file by <code>s3method(coe
 </li>
 <li><p> The default for the environment variable
 <span class="env">_R_CHECK_COMPACT_DATA2_</span> is now true: thus if using the newer
-forms of compression introduced in <font face="Courier New,Courier" color="#666666"><b>R</b></font> 2.10.0 would be beneficial
+forms of compression introduced in <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> 2.10.0 would be beneficial
 is now checked (by default).
 </p>
 </li>
 <li><p> Reference output for a vignette can be supplied when
-checking a package by <CODE>R CMD check</CODE>: see ‘Writing R
+checking a package by <code>R CMD check</code>: see ‘Writing R
 Extensions’.
 </p>
 </li>
-<li> <p><CODE>R CMD Rd2dvi</CODE> allows the use of LaTeX package
+<li> <p><code>R CMD Rd2dvi</code> allows the use of LaTeX package
 <span class="samp">inputenx</span> rather than <span class="samp">inputenc</span>: the value of the
 environment variable <span class="env">RD2DVI_INPUTENC</span> is used.  (LaTeX package
 <span class="samp">inputenx</span> is an optional install which provides greater
 coverage of the UTF-8 encoding.)
 </p>
 </li>
-<li> <p><CODE>Rscript</CODE> on a Unix-alike now accepts file names
+<li> <p><code>Rscript</code> on a Unix-alike now accepts file names
 containing spaces (provided these are escaped or quoted in the
 shell).
 </p>
 </li>
-<li> <p><CODE>R CMD build</CODE> on a Unix-alike (only) now tries to
+<li> <p><code>R CMD build</code> on a Unix-alike (only) now tries to
 preserve dates on files it copies from its input directory.  (This
-was the undocumented behaviour prior to <font face="Courier New,Courier" color="#666666"><b>R</b></font> 2.13.0.)
+was the undocumented behaviour prior to <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> 2.13.0.)
 </p>
 </li></ul>
 
@@ -3196,11 +3195,11 @@ was the undocumented behaviour prior to <font face="Courier New,Courier" color="
 </p>
 </li>
 <li><p> The <span class="option">--no-docs</span> option for
-<CODE>R CMD build --binary</CODE> is defunct: use
+<code>R CMD build --binary</code> is defunct: use
 <span class="option">--install-args</span> instead.
 </p>
 </li>
-<li><p> The option <span class="option">--unsafe</span> to <CODE>R CMD INSTALL</CODE> is
+<li><p> The option <span class="option">--unsafe</span> to <code>R CMD INSTALL</code> is
 defunct: use the identical option <span class="option">--no-lock</span> instead.
 </p>
 </li>
@@ -3208,19 +3207,19 @@ defunct: use the identical option <span class="option">--no-lock</span> instead.
 defunct: use instead the C99 function <code>hypot</code>.
 </p>
 </li>
-<li> <p><CODE>R CMD build --binary</CODE> is formally defunct:
-<CODE>R CMD INSTALL --build</CODE> has long been the preferred
+<li> <p><code>R CMD build --binary</code> is formally defunct:
+<code>R CMD INSTALL --build</code> has long been the preferred
 alternative.
 </p>
 </li>
-<li> <p><CODE>zip.file.extract()</CODE> is now defunct: use
+<li> <p><code>zip.file.extract()</code> is now defunct: use
 <code>unzip()</code> or <code>unz()</code> instead.
 </p>
 </li>
-<li> <p><CODE>R CMD Rd2dvi</CODE> without the <span class="option">--pdf</span> option is
+<li> <p><code>R CMD Rd2dvi</code> without the <span class="option">--pdf</span> option is
 now deprecated: only PDF output will be supported in future
 releases (since this allows the use of fonts only supported for
-PDF), and only <CODE>R CMD Rd2pdf</CODE> will be available.
+PDF), and only <code>R CMD Rd2pdf</code> will be available.
 </p>
 </li>
 <li><p> Options such as <span class="option">--max-nsize</span> and the function
@@ -3230,11 +3229,11 @@ in use.
 </p>
 </li>
 <li><p> Forms like <code>binomial(link = "link")</code> for GLM families
-deprecated since <font face="Courier New,Courier" color="#666666"><b>R</b></font> 2.4.0 are now defunct.
+deprecated since <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> 2.4.0 are now defunct.
 </p>
 </li>
 <li><p> The <code>declarativeOnly</code> argument to
-<code>loadNamespace()</code> (not relevant since <font face="Courier New,Courier" color="#666666"><b>R</b></font> 2.13.0) has been
+<code>loadNamespace()</code> (not relevant since <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> 2.13.0) has been
 removed.
 </p>
 </li>
@@ -3276,7 +3275,7 @@ lazy-loaded.
 
 <ul>
 <li><p> The base and recommended packages are now byte-compiled
-(equivalent to <CODE>make bytecode</CODE> in <font face="Courier New,Courier" color="#666666"><b>R</b></font> 2.13.x).
+(equivalent to <code>make bytecode</code> in <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> 2.13.x).
 </p>
 </li>
 <li><p> Configure option <span class="option">--with-system-zlib</span> now only makes
@@ -3314,14 +3313,14 @@ be used.  (Objective-C is currently only used on Mac OS X.)
 <code>snprintf</code> and <code>vsnprintf</code> are now required.
 </p>
 </li>
-<li><p> There is no longer support for making DVI manuals <EM>via</EM>
-<CODE>make dvi</CODE>, <CODE>make install-dvi</CODE> and similar.  Only
+<li><p> There is no longer support for making DVI manuals <em>via</em>
+<code>make dvi</code>, <code>make install-dvi</code> and similar.  Only
 PDF manuals are supported (to allow the use of fonts which are
 only available for PDF.)
 </p>
 </li>
 <li><p> The ‘<span class="file">configure</span>’ arguments used during configuration of
-<font face="Courier New,Courier" color="#666666"><b>R</b></font> are included as a comment in ‘<span class="file">Makeconf</span>’ for informative
+<span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> are included as a comment in ‘<span class="file">Makeconf</span>’ for informative
 purposes on Unix-alikes in a form suitable for shell execution.
 Note that those are merely command-line arguments, they do not
 include environment variables (one more reason to use configure
@@ -3459,7 +3458,7 @@ hyperlinks to help topics found: previously it gave problems with
 help pages with names containing e.g. spaces and slashes.
 </p>
 </li>
-<li><p> A late change in <font face="Courier New,Courier" color="#666666"><b>R</b></font> 2.13.2 broke <span class="samp">\Sexpr</span> expressions
+<li><p> A late change in <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> 2.13.2 broke <span class="samp">\Sexpr</span> expressions
 in Rd files.
 </p>
 </li>
@@ -3496,7 +3495,7 @@ setting.
 
 
 
-<h3><img src="../help/figures/../../html/logo.jpg" alt="../../html/logo.jpg" /> CHANGES IN R VERSION 2.13.2</h3>
+<h3><img class="toplogo" src="../help/figures/../../html/Rlogo.svg" alt="[R logo]" /> CHANGES IN R VERSION 2.13.2</h3>
 
 
 
@@ -3565,7 +3564,7 @@ symbol recognition issue.
 platforms.  (Needed since glibc 2.14 hides its RPC implementation.)
 </p>
 </li>
-<li> <p><CODE>configure</CODE> will find the Sun TI-RPC implementation
+<li> <p><code>configure</code> will find the Sun TI-RPC implementation
 of xdr (in ‘<span class="file">libtirpc</span>’) provided its header files are in the
 search path: see the ‘R Installation and Administration
 Manual’.
@@ -3606,7 +3605,7 @@ restored correctly from the dumped version.
 </p>
 </li>
 <li><p> Build-time expressions in help files did not have access
-to functions in the package being built (with <CODE>R CMD build</CODE>).
+to functions in the package being built (with <code>R CMD build</code>).
 </p>
 </li>
 <li><p> Because <code>quote()</code> did not mark its result as being in
@@ -3694,7 +3693,7 @@ vectors.
 
 
 
-<h3><img src="../help/figures/../../html/logo.jpg" alt="../../html/logo.jpg" /> CHANGES IN R VERSION 2.13.1</h3>
+<h3><img class="toplogo" src="../help/figures/../../html/Rlogo.svg" alt="[R logo]" /> CHANGES IN R VERSION 2.13.1</h3>
 
 
 
@@ -3712,7 +3711,7 @@ assuming the box is a bounding box). (<a href="https://bugs.R-project.org/bugzil
 </p>
 </li>
 <li> <p><code>RShowDoc()</code> can now display the licences shipped with
-<font face="Courier New,Courier" color="#666666"><b>R</b></font>, e.g. <code>RShowDoc("GPL-3")</code>.
+<span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span>, e.g. <code>RShowDoc("GPL-3")</code>.
 </p>
 </li>
 <li><p> New wrapper function <code>showNonASCIIfile()</code> in package
@@ -3728,7 +3727,7 @@ and corresponding reference methods (e.g., <code>$trace()</code>)
 have been added.
 </p>
 </li>
-<li> <p><CODE>xz</CODE> has been updated to 5.0.3 (very minor bugfix
+<li> <p><code>xz</code> has been updated to 5.0.3 (very minor bugfix
 release).
 </p>
 </li>
@@ -3741,12 +3740,12 @@ PDF 1.5.
 on platforms with cairo >= 1.6.
 </p>
 </li>
-<li><p> Binary reads (e.g. by <code>readChar()</code> and <code>readBin()</code>)
+<li><p> Binary reads (e.g., by <code>readChar()</code> and <code>readBin()</code>)
 are now supported on clipboard connections.  (Wish of <a href="https://bugs.R-project.org/bugzilla3/show_bug.cgi?id=14593">PR#14593</a>.)
 </p>
 </li>
 <li> <p><code>as.POSIXlt.factor()</code> now passes <code>...</code> to the
-character method (suggestion of Joshua Ulrich).  [Intended for <font face="Courier New,Courier" color="#666666"><b>R</b></font>
+character method (suggestion of Joshua Ulrich).  [Intended for <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span>
 2.13.0 but accidentally removed before release.]
 </p>
 </li>
@@ -3766,15 +3765,15 @@ errors such as calling <code>double(x)</code> instead of
 
 <ul>
 <li><p> Building the vignette PDFs in packages <span class="pkg">grid</span> and
-<span class="pkg">utils</span> is now part of running <CODE>make</CODE> from an SVN
-checkout on a Unix-alike: a separate <CODE>make vignettes</CODE> step
+<span class="pkg">utils</span> is now part of running <code>make</code> from an SVN
+checkout on a Unix-alike: a separate <code>make vignettes</code> step
 is no longer required.
 </p>
 <p>These vignettes are now made with <code>keep.source = TRUE</code> and
 hence will be laid out differently.
 </p>
 </li>
-<li> <p><CODE>make install-strip</CODE> failed under some configuration
+<li> <p><code>make install-strip</code> failed under some configuration
 options.
 </p>
 </li>
@@ -3801,7 +3800,7 @@ specifying a single input encoding.
 <li><p> There is a new Sweave option <code>figs.only = TRUE</code> to run
 each figure chunk only for each selected graphics device, and not
 first using the default graphics device.   This will become the
-default in <font face="Courier New,Courier" color="#666666"><b>R</b></font> 2.14.0.
+default in <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> 2.14.0.
 </p>
 </li>
 <li><p> Sweave custom graphics devices can have a custom function
@@ -3818,7 +3817,7 @@ extensions).
 <li><p> The <code>Rtangle()</code> driver has a new option
 <code>show.line.nos</code> which is by default false; if true it
 annotates code chunks with a comment giving the line number of the
-first line in the sources (the behaviour of <font face="Courier New,Courier" color="#666666"><b>R</b></font> >= 2.12.0).
+first line in the sources (the behaviour of <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> >= 2.12.0).
 </p>
 </li>
 <li><p> Package installation tangles the vignette sources: this step
@@ -3836,9 +3835,9 @@ file.
 
 
 <ul>
-<li><p> No parts of <font face="Courier New,Courier" color="#666666"><b>R</b></font> are now licensed solely under GPL-2.  The
-licences for packages <a href="http://CRAN.R-project.org/package=rpart"><span class="pkg">rpart</span></a> and <a href="http://CRAN.R-project.org/package=survival"><span class="pkg">survival</span></a> have been
-changed, which means that the licence terms for <font face="Courier New,Courier" color="#666666"><b>R</b></font> as distributed
+<li><p> No parts of <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> are now licensed solely under GPL-2.  The
+licences for packages <a href="https://CRAN.R-project.org/package=rpart"><span class="pkg">rpart</span></a> and <a href="https://CRAN.R-project.org/package=survival"><span class="pkg">survival</span></a> have been
+changed, which means that the licence terms for <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> as distributed
 are GPL-2 | GPL-3.
 </p>
 </li></ul>
@@ -3852,11 +3851,11 @@ are GPL-2 | GPL-3.
 <ul>
 <li><p> The internal functions <code>.readRDS()</code> and
 <code>.saveRDS()</code> are now deprecated in favour of the public
-functions <code>readRDS()</code> and <code>saveRDS()</code> introduced in <font face="Courier New,Courier" color="#666666"><b>R</b></font>
+functions <code>readRDS()</code> and <code>saveRDS()</code> introduced in <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span>
 2.13.0.
 </p>
 </li>
-<li><p> Switching off lazy-loading of code <EM>via</EM> the
+<li><p> Switching off lazy-loading of code <em>via</em> the
 <span class="samp">LazyLoad</span> field of the ‘<span class="file">DESCRIPTION</span>’ file is now
 deprecated.  In future all packages will be lazy-loaded.
 </p>
@@ -3873,7 +3872,7 @@ deprecated.  In future all packages will be lazy-loaded.
 
 
 <ul>
-<li> <p><CODE>R CMD check</CODE> on a multi-architecture installation now
+<li> <p><code>R CMD check</code> on a multi-architecture installation now
 skips the user's ‘<span class="file">.Renviron</span>’ file for the
 architecture-specific tests (which do read the
 architecture-specific ‘<span class="file">Renviron.site</span>’ files).  This is
@@ -3881,7 +3880,7 @@ consistent with single-architecture checks, which use
 <span class="option">--no-environ</span>.
 </p>
 </li>
-<li> <p><CODE>R CMD build</CODE> now looks for ‘<span class="file">DESCRIPTION</span>’
+<li> <p><code>R CMD build</code> now looks for ‘<span class="file">DESCRIPTION</span>’
 fields <span class="samp">BuildResaveData</span> and <span class="samp">BuildKeepEmpty</span> for
 per-package overrides.  See ‘Writing R Extensions’.
 </p>
@@ -3921,7 +3920,7 @@ unnecessarily inaccurate.
 rather than using <code>uniroot()</code> on a discontinuous function.
 </p>
 <p>The description of the problem was inaccurate: the probability is
-a tail probability (‘2 <EM>or more</EM> people share a birthday’)
+a tail probability (‘2 <em>or more</em> people share a birthday’)
 </p>
 </li>
 <li><p> Complex arithmetic sometimes warned incorrectly about
@@ -3941,7 +3940,7 @@ and cause a segfault.  (<a href="https://bugs.R-project.org/bugzilla3/show_bug.c
 being ignored.
 </p>
 </li>
-<li><p> Reading (e.g. with <code>readBin()</code>) from a raw connection
+<li><p> Reading (e.g., with <code>readBin()</code>) from a raw connection
 was not advancing the pointer, so successive reads would read the
 same value.  (Spotted by Bill Dunlap.)
 </p>
@@ -3995,7 +3994,7 @@ section).  (It seems this happened only in 2.13.0 patched.)
 </p>
 </li>
 <li> <p><code>postscript()</code> with an sRGB colormodel now uses sRGB
-for raster images (in <font face="Courier New,Courier" color="#666666"><b>R</b></font> 2.13.[01] it used uncalibrated RGB).
+for raster images (in <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> 2.13.[01] it used uncalibrated RGB).
 </p>
 <p>There is no longer an undocumented 21845-pixel limit on raster images.
 </p>
@@ -4004,7 +4003,7 @@ for raster images (in <font face="Courier New,Courier" color="#666666"><b>R</b><
 
 
 
-<h3><img src="../help/figures/../../html/logo.jpg" alt="../../html/logo.jpg" /> CHANGES IN R VERSION 2.13.0</h3>
+<h3><img class="toplogo" src="../help/figures/../../html/Rlogo.svg" alt="[R logo]" /> CHANGES IN R VERSION 2.13.0</h3>
 
 
 
@@ -4020,7 +4019,7 @@ where the inner function value is an array of dimension >= 2.
 <li><p> Printing and formatting of floating point numbers is now
 using the correct number of digits, where it previously rarely
 differed by a few digits. (See “scientific” entry below.)
-This affects <EM>many</EM> ‘<span class="file">*.Rout.save</span>’ checks in packages.
+This affects <em>many</em> ‘<span class="file">*.Rout.save</span>’ checks in packages.
 </p>
 </li></ul>
 
@@ -4110,7 +4109,7 @@ unlike the Pearson residuals).
 </p>
 </li>
 <li> <p><code>write.table()</code> and friends gain a <code>fileEncoding</code>
-argument, to simplify writing files for use on other OSes (e.g. a
+argument, to simplify writing files for use on other OSes (e.g., a
 spreadsheet intended for Windows or Mac OS X Excel).
 </p>
 </li>
@@ -4184,7 +4183,7 @@ generics <code>name<-()</code>, <code>dim<-()</code> and <code>dimnames&lt
 </p>
 </li>
 <li><p> There is a new option <code>"browserNLdisabled"</code> to disable
-the use of an empty (e.g. via the ‘Return’ key) as a synonym
+the use of an empty (e.g., via the ‘Return’ key) as a synonym
 for <code>c</code> in <code>browser()</code> or <code>n</code> under <code>debug()</code>.
 (Wish of <a href="https://bugs.R-project.org/bugzilla3/show_bug.cgi?id=14472">PR#14472</a>.)
 </p>
@@ -4257,7 +4256,7 @@ record if ‘in principle’ the connection supports seeking,
 it seems safer to report <code>FALSE</code> when it may not work.
 </p>
 </li>
-<li> <p><CODE>R CMD REMOVE</CODE> and <code>remove.packages()</code> now
+<li> <p><code>R CMD REMOVE</code> and <code>remove.packages()</code> now
 remove file <code>R.css</code> when removing all remaining packages in a
 library tree.  (Related to the wish of <a href="https://bugs.R-project.org/bugzilla3/show_bug.cgi?id=14475">PR#14475</a>: note that this
 file is no longer installed.)
@@ -4265,17 +4264,17 @@ file is no longer installed.)
 </li>
 <li> <p><code>unzip()</code> now has a <code>unzip</code> argument like
 <code>zip.file.extract()</code>.  This allows an external
-<CODE>unzip</CODE> program to be used, which can be useful to access
-features supported by Info-ZIP's <CODE>unzip</CODE> version 6 which
+<code>unzip</code> program to be used, which can be useful to access
+features supported by Info-ZIP's <code>unzip</code> version 6 which
 is now becoming more widely available.
 </p>
 </li>
 <li><p> There is a simple <code>zip()</code> function, as wrapper for an
-external <CODE>zip</CODE> command.
+external <code>zip</code> command.
 </p>
 </li>
 <li> <p><code>bzfile()</code> connections can now read from concatenated
-<CODE>bzip2</CODE> files (including files written with
+<code>bzip2</code> files (including files written with
 <code>bzfile(open = "a")</code>) and files created by some other
 compressors (such as the example of <a href="https://bugs.R-project.org/bugzilla3/show_bug.cgi?id=14479">PR#14479</a>).
 </p>
@@ -4293,7 +4292,7 @@ completely).
 <code>nls()</code> algorithms in its return value.
 </p>
 </li>
-<li> <p><CODE>xz</CODE> has been updated to 5.0.1 (very minor bugfix
+<li> <p><code>xz</code> has been updated to 5.0.1 (very minor bugfix
 release).
 </p>
 </li>
@@ -4336,8 +4335,8 @@ potentially useful for custom figure layout implementations.
 </p>
 </li>
 <li><p> Package <span class="pkg">tools</span> has a new function <code>compactPDF()</code>
-to try to reduce the size of PDF files <EM>via</EM> <CODE>qpdf</CODE>
-or <CODE>gs</CODE>.
+to try to reduce the size of PDF files <em>via</em> <code>qpdf</code>
+or <code>gs</code>.
 </p>
 </li>
 <li> <p><code>tar()</code> has a new argument <code>extra_flags</code>.
@@ -4355,7 +4354,7 @@ exported from <span class="pkg">utils</span>, and the documentation for
 for <code>create.post()</code>.
 </p>
 <p>It has a new <code>method = "mailto"</code> on Unix-alikes similar to
-that on Windows: it invokes a default mailer via <CODE>open</CODE>
+that on Windows: it invokes a default mailer via <code>open</code>
 (Mac OS X) or <code>xdg-open</code> or the default browser (elsewhere).
 </p>
 <p>The default for <code>ccaddress</code> is now
@@ -4412,11 +4411,11 @@ the last two tilde expansion is performed on the file name.  (Note
 that setting an empty value is probably impossible on Windows.)
 </p>
 </li>
-<li><p> Using <CODE>R --no-environ CMD</CODE>, <CODE>R
-	--no-site-file CMD</CODE> or <CODE>R --no-init-file CMD</CODE> sets
-environment variables so these settings are passed on to child <font face="Courier New,Courier" color="#666666"><b>R</b></font>
+<li><p> Using <code>R --no-environ CMD</code>, <code>R
+	--no-site-file CMD</code> or <code>R --no-init-file CMD</code> sets
+environment variables so these settings are passed on to child <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span>
 processes, notably those run by <code>INSTALL</code>, <code>check</code> and
-<code>build</code>. <CODE>R --vanilla CMD</CODE> sets these three options
+<code>build</code>. <code>R --vanilla CMD</code> sets these three options
 (but not <span class="option">--no-restore</span>).
 </p>
 </li>
@@ -4425,13 +4424,13 @@ processes, notably those run by <code>INSTALL</code>, <code>check</code> and
 </p>
 </li>
 <li><p> The internal (C) function <span class="samp">scientific()</span>, at the heart
-of <font face="Courier New,Courier" color="#666666"><b>R</b></font>'s <code>format.info(x)</code>, <code>format(x)</code>, <code>print(x)</code>,
+of <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span>'s <code>format.info(x)</code>, <code>format(x)</code>, <code>print(x)</code>,
 etc, for numeric <code>x</code>, has been re-written in order to provide
 slightly more correct results, fixing <a href="https://bugs.R-project.org/bugzilla3/show_bug.cgi?id=14491">PR#14491</a>, notably in
 border cases including when <code>digits >= 16</code>, thanks to
 substantial contributions (code and experiments) from Petr
 Savicky.  This affects a noticeable amount of numeric output from
-<font face="Courier New,Courier" color="#666666"><b>R</b></font>.
+<span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span>.
 </p>
 </li>
 <li><p> A new function <code>grepRaw()</code> has been introduced for
@@ -4442,7 +4441,7 @@ and regular expressions.
 <li><p> Package <span class="pkg">compiler</span> is now provided as a standard
 package.  See <code>?compiler::compile</code> for information on how to
 use the compiler.  This package implements a byte code compiler
-for <font face="Courier New,Courier" color="#666666"><b>R</b></font>: by default the compiler is not used in this release.  See
+for <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span>: by default the compiler is not used in this release.  See
 the ‘R Installation and Administration Manual’ for how to
 compile the base and recommended packages.
 </p>
@@ -4484,9 +4483,9 @@ were parsed.
 </li>
 <li> <p><code>Sys.chmod()</code> has an extra argument <code>use_umask</code>
 which defaults to true and restricts the file mode by the current
-setting of <code>umask</code>.  This means that all the <font face="Courier New,Courier" color="#666666"><b>R</b></font> functions
+setting of <code>umask</code>.  This means that all the <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> functions
 which manipulate file/directory permissions by default respect
-<code>umask</code>, notably <CODE>R CMD INSTALL</CODE>.
+<code>umask</code>, notably <code>R CMD INSTALL</code>.
 </p>
 </li>
 <li> <p><code>tempfile()</code> has an extra argument <code>fileext</code> to
@@ -4548,7 +4547,7 @@ have an unnamed first argument.
 <ul>
 <li> <p><code>Sweave()</code> has options to produce PNG and JPEG figures,
 and to use a custom function to open a graphics device (see
-<code>?RweaveLatex</code>).<br>
+<code>?RweaveLatex</code>).<br />
 (Based in part on the contribution of <a href="https://bugs.R-project.org/bugzilla3/show_bug.cgi?id=14418">PR#14418</a>.)
 </p>
 </li>
@@ -4610,15 +4609,15 @@ protection issues.
 
 
 <ul>
-<li> <p><CODE>R CMD Rdiff</CODE> is now implemented in <font face="Courier New,Courier" color="#666666"><b>R</b></font> on
-Unix-alikes (as it has been on Windows since <font face="Courier New,Courier" color="#666666"><b>R</b></font> 2.12.0).
+<li> <p><code>R CMD Rdiff</code> is now implemented in <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> on
+Unix-alikes (as it has been on Windows since <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> 2.12.0).
 </p>
 </li>
-<li> <p><CODE>R CMD build</CODE> no longer does any cleaning in the
+<li> <p><code>R CMD build</code> no longer does any cleaning in the
 supplied package directory: all the cleaning is done in the copy.
 </p>
 <p>It has a new option <span class="option">--install-args</span> to pass arguments to
-<CODE>R CMD INSTALL</CODE> for <span class="option">--build</span> (but not when
+<code>R CMD INSTALL</code> for <span class="option">--build</span> (but not when
 installing to rebuild vignettes).
 </p>
 <p>There is new option, <span class="option">--resave-data</span>, to call
@@ -4626,8 +4625,8 @@ installing to rebuild vignettes).
 compress tabular files (‘<span class="file">.tab</span>’, ‘<span class="file">.csv</span>’ etc) and to
 convert ‘<span class="file">.R</span>’ files to ‘<span class="file">.rda</span>’ files.  The default,
 <span class="option">--resave-data=gzip</span>, is to do so in a way compatible even
-with years-old versions of <font face="Courier New,Courier" color="#666666"><b>R</b></font>, but better compression is given by
-<span class="option">--resave-data=best</span>, requiring <font face="Courier New,Courier" color="#666666"><b>R</b></font> >= 2.10.0.
+with years-old versions of <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span>, but better compression is given by
+<span class="option">--resave-data=best</span>, requiring <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> >= 2.10.0.
 </p>
 <p>It now adds a ‘<span class="file">datalist</span>’ file for ‘<span class="file">data</span>’ directories of
 more than 1Mb.
@@ -4637,7 +4636,7 @@ directory names (including those of empty directories).
 </p>
 <p>There is a new option, <span class="option">--compact-vignettes</span>, to try
 reducing the size of PDF files in the ‘<span class="file">inst/doc</span>’ directory.
-Currently this tries <CODE>qpdf</CODE>: other options may be used in
+Currently this tries <code>qpdf</code>: other options may be used in
 future.
 </p>
 <p>When re-building vignettes and a ‘<span class="file">inst/doc/Makefile</span>’ file is
@@ -4646,7 +4645,7 @@ found, <code>make clean</code> is run if the makefile has a
 </p>
 <p>After re-building vignettes the default clean-up operation will
 remove any directories (and not just files) created during the
-process: e.g. one package created a ‘<span class="file">.R_cache</span>’ directory.
+process: e.g., one package created a ‘<span class="file">.R_cache</span>’ directory.
 </p>
 <p>Empty directories are now removed unless the option
 <span class="option">--keep-empty-dirs</span> is given (and a few packages do
@@ -4657,7 +4656,7 @@ deliberately include empty directories).
 vignettes is skipped.
 </p>
 </li>
-<li> <p><CODE>R CMD check</CODE> now also checks for filenames that are
+<li> <p><code>R CMD check</code> now also checks for filenames that are
 case-insensitive matches to Windows' reserved file names with
 extensions, such as ‘<span class="file">nul.Rd</span>’, as these have caused problems
 on some Windows systems.
@@ -4669,14 +4668,14 @@ potentially much slower) can be switched on by setting environment
 variable <span class="env">_R_CHECK_COMPACT_DATA2_</span> to <span class="samp">TRUE</span>.
 </p>
 <p>The types of files in the ‘<span class="file">data</span>’ directory are now checked,
-as packages are <EM>still</EM> misusing it for non-<font face="Courier New,Courier" color="#666666"><b>R</b></font> data files.
+as packages are <em>still</em> misusing it for non-<span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> data files.
 </p>
-<p>It now extracts and runs the <font face="Courier New,Courier" color="#666666"><b>R</b></font> code for each vignette in a
-separate directory and <font face="Courier New,Courier" color="#666666"><b>R</b></font> process: this is done in the package's
+<p>It now extracts and runs the <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> code for each vignette in a
+separate directory and <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> process: this is done in the package's
 declared encoding.  Rather than call
 <code>tools::checkVignettes()</code>, it calls
 <code>tools::buildVignettes()</code> to see if the vignettes can be
-re-built as they would be by <CODE>R CMD build</CODE>.  Option
+re-built as they would be by <code>R CMD build</code>.  Option
 <span class="option">--use-valgrind</span> now applies only to these runs, and not
 when running code to rebuild the vignettes.  This version does a
 much better job of suppressing output from successful vignette
@@ -4691,12 +4690,12 @@ about assignments (unless these give the usage of replacement
 functions).
 </p>
 <p>‘<span class="file">.tar.xz</span>’ compressed tarballs are now allowed, if
-<CODE>tar</CODE> supports them (and setting environment variable
+<code>tar</code> supports them (and setting environment variable
 <span class="env">TAR</span> to <span class="samp">internal</span> ensures so on all platforms).
 </p>
 </li>
-<li> <p><CODE>R CMD check</CODE> now warns if it finds
-‘<span class="file">inst/doc/makefile</span>’, and <CODE>R CMD build</CODE> renames such a
+<li> <p><code>R CMD check</code> now warns if it finds
+‘<span class="file">inst/doc/makefile</span>’, and <code>R CMD build</code> renames such a
 file to ‘<span class="file">inst/doc/Makefile</span>’.
 </p>
 </li></ul>
@@ -4708,15 +4707,15 @@ file to ‘<span class="file">inst/doc/Makefile</span>’.
 
 
 <ul>
-<li><p> Installing <font face="Courier New,Courier" color="#666666"><b>R</b></font> no longer tries to find <CODE>perl</CODE>, and
-<CODE>R CMD</CODE> no longer tries to substitute a full path for
-<CODE>awk</CODE> nor <CODE>perl</CODE> – this was a legacy from the
-days when they were used by <font face="Courier New,Courier" color="#666666"><b>R</b></font> itself.  Because a couple of
-packages do use <CODE>awk</CODE>, it is set as the <CODE>make</CODE>
+<li><p> Installing <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> no longer tries to find <code>perl</code>, and
+<code>R CMD</code> no longer tries to substitute a full path for
+<code>awk</code> nor <code>perl</code> – this was a legacy from the
+days when they were used by <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> itself.  Because a couple of
+packages do use <code>awk</code>, it is set as the <code>make</code>
 (rather than environment) variable <span class="env">AWK</span>.
 </p>
 </li>
-<li> <p><CODE>make check</CODE> will now fail if there are differences
+<li> <p><code>make check</code> will now fail if there are differences
 from the reference output when testing package examples and if
 environment variable <span class="env">R_STRICT_PACKAGE_CHECK</span> is set to a true
 value.
@@ -4738,13 +4737,13 @@ used unchanged in file ‘<span class="file">etc/ldpaths</span>’ rathe
 appended to.
 </p>
 </li>
-<li> <p><CODE>configure</CODE> looks for support for OpenMP and if
-found compiles <font face="Courier New,Courier" color="#666666"><b>R</b></font> with appropriate flags and also makes them
+<li> <p><code>configure</code> looks for support for OpenMP and if
+found compiles <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> with appropriate flags and also makes them
 available for use in packages: see ‘Writing R Extensions’.
 </p>
-<p>This is currently experimental, and is only used in <font face="Courier New,Courier" color="#666666"><b>R</b></font> with a
+<p>This is currently experimental, and is only used in <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> with a
 single thread for <code>colSums()</code> and <code>colMeans()</code>.  Expect
-it to be more widely used in later versions of <font face="Courier New,Courier" color="#666666"><b>R</b></font>.
+it to be more widely used in later versions of <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span>.
 </p>
 <p>This can be disabled by the <span class="option">--disable-openmp</span> flag.
 </p>
@@ -4757,7 +4756,7 @@ it to be more widely used in later versions of <font face="Courier New,Courier"
 
 
 <ul>
-<li> <p><CODE>R CMD INSTALL --clean</CODE> now removes copies of a
+<li> <p><code>R CMD INSTALL --clean</code> now removes copies of a
 ‘<span class="file">src</span>’ directory which are created when multiple
 sub-architectures are in use.  (Following a comment from
 Berwin Turlach.)
@@ -4768,7 +4767,7 @@ Berwin Turlach.)
 library tree, and this is used for all the HTML pages in the
 package.  This helps when installing packages with static HTML
 pages for use on a webserver.  It will also allow future versions
-of <font face="Courier New,Courier" color="#666666"><b>R</b></font> to use different stylesheets for the packages they install.
+of <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> to use different stylesheets for the packages they install.
 </p>
 </li>
 <li><p> A top-level file ‘<span class="file">.Rinstignore</span>’ in the package sources
@@ -4779,9 +4778,9 @@ need to be under <code>inst/doc</code>, but they may not need to be
 installed.)
 </p>
 </li>
-<li> <p><CODE>R CMD INSTALL</CODE> has a new option
+<li> <p><code>R CMD INSTALL</code> has a new option
 <span class="option">--compact-docs</span> to compact any PDFs under the
-‘<span class="file">inst/doc</span>’ directory.  Currently this uses <CODE>qpdf</CODE>,
+‘<span class="file">inst/doc</span>’ directory.  Currently this uses <code>qpdf</code>,
 which must be installed (see ‘Writing R Extensions’).
 </p>
 </li>
@@ -4801,14 +4800,14 @@ value <code>"pkglock"</code> is now accepted, as well as <code>TRUE</code> and
 </p>
 </li>
 <li><p> There is a new option <span class="option">--no-clean-on-error</span> for
-<CODE>R CMD INSTALL</CODE> to retain a partially installed package for
+<code>R CMD INSTALL</code> to retain a partially installed package for
 forensic analysis.
 </p>
 </li>
 <li><p> Packages with names ending in ‘<span class="file">.</span>’ are not portable
 since Windows does not work correctly with such directory names.
-This is now warned about in <CODE>R CMD check</CODE>, and will not be
-allowed in <font face="Courier New,Courier" color="#666666"><b>R</b></font> 2.14.x.
+This is now warned about in <code>R CMD check</code>, and will not be
+allowed in <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> 2.14.x.
 </p>
 </li>
 <li><p> The vignette indices are more comprehensive (in the style of
@@ -4827,11 +4826,11 @@ allowed in <font face="Courier New,Courier" color="#666666"><b>R</b></font> 2.14
 <code>save</code> argument is deprecated.
 </p>
 </li>
-<li> <p><CODE>R CMD check --no-latex</CODE> is defunct: use
+<li> <p><code>R CMD check --no-latex</code> is defunct: use
 <span class="option">--no-manual</span> instead.
 </p>
 </li>
-<li> <p><CODE>R CMD Sd2Rd</CODE> is defunct.
+<li> <p><code>R CMD Sd2Rd</code> is defunct.
 </p>
 </li>
 <li><p> The <code>gamma</code> argument to <code>hsv()</code>,
@@ -4839,7 +4838,7 @@ allowed in <font face="Courier New,Courier" color="#666666"><b>R</b></font> 2.14
 and no longer has any effect.
 </p>
 </li>
-<li><p> The previous options for <CODE>R CMD build --binary</CODE>
+<li><p> The previous options for <code>R CMD build --binary</code>
 (<span class="option">--auto-zip</span>, <span class="option">--use-zip-data</span> and
 <span class="option">--no-docs</span>) are deprecated (or defunct):
 use the new option <span class="option">--install-args</span> instead.
@@ -4854,8 +4853,8 @@ value is now allowed.
 available.
 </p>
 </li>
-<li><p> Zip-ing data sets in packages (and hence <CODE>R CMD
-	INSTALL</CODE> options <span class="option">--use-zip-data</span> and <span class="option">--auto-zip</span>, as
+<li><p> Zip-ing data sets in packages (and hence <code>R CMD
+	INSTALL</code> options <span class="option">--use-zip-data</span> and <span class="option">--auto-zip</span>, as
 well as the <span class="samp">ZipData: yes</span> field in a <code>DESCRIPTION</code> file)
 is defunct.
 </p>
@@ -4867,13 +4866,13 @@ warning that they should be re-installed will be given.
 namespace via <code>.Export()</code> etc is now defunct.
 </p>
 </li>
-<li><p> The option <span class="option">--unsafe</span> to <CODE>R CMD INSTALL</CODE> is
+<li><p> The option <span class="option">--unsafe</span> to <code>R CMD INSTALL</code> is
 deprecated: use the identical option <span class="option">--no-lock</span> instead.
 </p>
 </li>
 <li><p> The entry point <code>pythag</code> in ‘<span class="file">Rmath.h</span>’ is deprecated
 in favour of the C99 function <code>hypot</code>.  A wrapper for
-<code>hypot</code> is provided for <font face="Courier New,Courier" color="#666666"><b>R</b></font> 2.13.x only.
+<code>hypot</code> is provided for <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> 2.13.x only.
 </p>
 </li>
 <li><p> Direct access to the <code>"source"</code> attribute of functions
@@ -4881,8 +4880,8 @@ is deprecated; use <code>deparse(fn, control="useSource")</code> to access
 it, and <code>removeSource(fn)</code> to remove it.
 </p>
 </li>
-<li> <p><CODE>R CMD build --binary</CODE> is now formally deprecated:
-<CODE>R CMD INSTALL --build</CODE> has long been the preferred
+<li> <p><code>R CMD build --binary</code> is now formally deprecated:
+<code>R CMD INSTALL --build</code> has long been the preferred
 alternative.
 </p>
 </li>
@@ -4904,7 +4903,7 @@ fields).
 Niels Hansen.)
 </p>
 </li>
-<li> <p><code>aggregate</code> preserves the class of a column (e.g. a
+<li> <p><code>aggregate</code> preserves the class of a column (e.g., a
 date) under some circumstances where it discarded the class
 previously.
 </p>
@@ -4949,7 +4948,7 @@ when <code>to</code> was a directory.  (<a href="https://bugs.R-project.org/bugz
 </p>
 </li>
 <li><p> It was possible (but very rare) for the loading test in
-<CODE>R CMD INSTALL</CODE> to crash a child <font face="Courier New,Courier" color="#666666"><b>R</b></font> process and so leave
+<code>R CMD INSTALL</code> to crash a child <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> process and so leave
 around a lock directory and a partially installed package.  That
 test is now done in a separate process.
 </p>
@@ -5006,7 +5005,7 @@ completion is used (e.g., by setting <code>rc.settings(files =
 </p>
 </li>
 <li><p> Inside <code>uniroot(f, ...)</code>, <code>-Inf</code> function values
-are now replaced by a maximally <B>negative</B> value.
+are now replaced by a maximally <b>negative</b> value.
 </p>
 </li>
 <li> <p><code>rowsum()</code> could silently over/underflow on integer
@@ -5021,7 +5020,7 @@ zero rows.
 
 
 
-<h3><img src="../help/figures/../../html/logo.jpg" alt="../../html/logo.jpg" /> CHANGES IN R VERSION 2.12.2 patched</h3>
+<h3><img class="toplogo" src="../help/figures/../../html/Rlogo.svg" alt="[R logo]" /> CHANGES IN R VERSION 2.12.2 patched</h3>
 
 
 
@@ -5030,8 +5029,9 @@ zero rows.
 
 <ul>
 <li> <p><code>max()</code> and <code>min()</code> work harder to ensure that
-<code>NA</code> has precedence over <code>NaN</code>, so e.g. <code>min(NaN,
-	NA)</code> is <code>NA</code>.  (This was not previously documented except
+<code>NA</code> has precedence over <code>NaN</code>,
+so e.g. <code>min(NaN, NA)</code> is <code>NA</code>.
+(This was not previously documented except
 for within a single numeric vector, where compiler optimizations
 often defeated the code.)
 </p>
@@ -5084,7 +5084,7 @@ macro was used.
 
 
 
-<h3><img src="../help/figures/../../html/logo.jpg" alt="../../html/logo.jpg" /> CHANGES IN R VERSION 2.12.2</h3>
+<h3><img class="toplogo" src="../help/figures/../../html/Rlogo.svg" alt="[R logo]" /> CHANGES IN R VERSION 2.12.2</h3>
 
 
 
@@ -5093,14 +5093,14 @@ macro was used.
 
 <ul>
 <li><p> Complex arithmetic (notably <code>z^n</code> for complex <code>z</code>
-and integer <code>n</code>) gave incorrect results since <font face="Courier New,Courier" color="#666666"><b>R</b></font> 2.10.0 on
+and integer <code>n</code>) gave incorrect results since <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> 2.10.0 on
 platforms without C99 complex support.  This and some
 lesser issues in trigonometric functions have been corrected.
 </p>
 <p>Such platforms were rare (we know of Cygwin and FreeBSD).
 However, because of new compiler optimizations in the way complex
 arguments are handled, the same code was selected on x86_64 Linux
-with <CODE>gcc 4.5.x</CODE> at the default <code>-O2</code> optimization
+with <code>gcc 4.5.x</code> at the default <code>-O2</code> optimization
 (but not at <code>-O</code>).
 </p>
 </li>
@@ -5126,7 +5126,7 @@ of an argument of incorrect length.
 </li>
 <li><p> The Cocoa back-end for the <code>quartz()</code> graphics device
 on Mac OS X provides a way to disable event loop processing
-temporarily (useful, e.g., for forked instances of <font face="Courier New,Courier" color="#666666"><b>R</b></font>).
+temporarily (useful, e.g., for forked instances of <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span>).
 </p>
 </li>
 <li> <p><code>kernel()</code>'s default for <code>m</code> was not appropriate
@@ -5134,11 +5134,11 @@ if <code>coef</code> was a set of coefficients.  (Reported by Pierre
 Chausse.)
 </p>
 </li>
-<li> <p><code>bug.report()</code> has been updated for the current <font face="Courier New,Courier" color="#666666"><b>R</b></font> bug
+<li> <p><code>bug.report()</code> has been updated for the current <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> bug
 tracker, which does not accept emailed submissions.
 </p>
 </li>
-<li> <p><CODE>R CMD check</CODE> now checks for the correct use of
+<li> <p><code>R CMD check</code> now checks for the correct use of
 <span class="samp">$(LAPACK_LIBS)</span> (as well as <span class="samp">$(BLAS_LIBS)</span>), since
 several CRAN recent submissions have ignored ‘Writing R
 Extensions’.
@@ -5154,14 +5154,14 @@ Extensions’.
 <ul>
 <li><p> The <span class="samp">zlib</span> sources in the distribution are now built
 with all symbols remapped: this is intended to avoid problems seen
-with packages such as <a href="http://CRAN.R-project.org/package=XML"><span class="pkg">XML</span></a> and <a href="http://CRAN.R-project.org/package=rggobi"><span class="pkg">rggobi</span></a> which link to
+with packages such as <a href="https://CRAN.R-project.org/package=XML"><span class="pkg">XML</span></a> and <a href="https://CRAN.R-project.org/package=rggobi"><span class="pkg">rggobi</span></a> which link to
 ‘<span class="file">zlib.so.1</span>’ on systems using <span class="samp">zlib 1.2.5</span>.
 </p>
 </li>
 <li><p> The default for <span class="env">FFLAGS</span> and <span class="env">FCFLAGS</span> with
-<CODE>gfortran</CODE> on x86_64 Linux has been changed back to <span class="samp">-g
+<code>gfortran</code> on x86_64 Linux has been changed back to <span class="samp">-g
 	-O2</span>:  however, setting <span class="samp">-g -O</span> may still be needed for
-<CODE>gfortran 4.3.x</CODE>.
+<code>gfortran 4.3.x</code>.
 </p>
 </li></ul>
 
@@ -5174,15 +5174,15 @@ with packages such as <a href="http://CRAN.R-project.org/package=XML"><span clas
 <ul>
 <li><p> A <span class="samp">LazyDataCompression</span> field in the ‘<span class="file">DESCRIPTION</span>’
 file will be used to set the value for the
-<span class="option">--data-compress</span> option of <CODE>R CMD INSTALL</CODE>.
+<span class="option">--data-compress</span> option of <code>R CMD INSTALL</code>.
 </p>
 </li>
 <li><p> Files ‘<span class="file">R/sysdata.rda</span>’ of more than 1Mb are now stored
-in the lazyload database using <CODE>xz</CODE> compression: this for
-example halves the installed size of package <a href="http://CRAN.R-project.org/package=Imap"><span class="pkg">Imap</span></a>.
+in the lazyload database using <code>xz</code> compression: this for
+example halves the installed size of package <a href="https://CRAN.R-project.org/package=Imap"><span class="pkg">Imap</span></a>.
 </p>
 </li>
-<li> <p><CODE>R CMD INSTALL</CODE> now ensures that directories
+<li> <p><code>R CMD INSTALL</code> now ensures that directories
 installed from ‘<span class="file">inst</span>’ have search permission for everyone.
 </p>
 <p>It no longer installs files ‘<span class="file">inst/doc/Rplots.ps</span>’ and
@@ -5205,8 +5205,8 @@ namespace via <code>.Export()</code> etc is now deprecated.
 <li> <p><code>zip.file.extract()</code> is now deprecated.
 </p>
 </li>
-<li><p> Zip-ing data sets in packages (and hence <CODE>R CMD
-	INSTALL --use-zip-data</CODE> and the <span class="samp">ZipData: yes</span> field in a
+<li><p> Zip-ing data sets in packages (and hence <code>R CMD
+	INSTALL --use-zip-data</code> and the <span class="samp">ZipData: yes</span> field in a
 <code>DESCRIPTION</code> file) is deprecated: using efficiently
 compressed ‘<span class="file">.rda</span>’ images and lazy-loading of data has
 superseded it.
@@ -5248,7 +5248,7 @@ caused problems for some PDF and PostScript viewers).
 one character long.
 </p>
 </li>
-<li> <p><CODE>R CMD check</CODE> failed to check the filenames under
+<li> <p><code>R CMD check</code> failed to check the filenames under
 ‘<span class="file">man</span>’ for Windows' reserved names.
 </p>
 </li>
@@ -5273,7 +5273,7 @@ them, but <a href="https://bugs.R-project.org/bugzilla3/show_bug.cgi?id=14462">P
 case <i>m = 0</i>. (<a href="https://bugs.R-project.org/bugzilla3/show_bug.cgi?id=14473">PR#14473</a>)
 </p>
 </li>
-<li><p> The rendering of numbers in plotmath expressions (e.g.
+<li><p> The rendering of numbers in plotmath expressions (e.g.,
 <code>expression(10^2)</code>) used the current settings for conversion
 to strings rather than setting the defaults, and so could be
 affected by what has been done before.  (<a href="https://bugs.R-project.org/bugzilla3/show_bug.cgi?id=14477">PR#14477</a>)
@@ -5286,7 +5286,7 @@ very rare event that every case had been omitted in the fit.
 </p>
 </li>
 <li> <p><code>weighted.residuals(drop0=TRUE)</code> returned a vector when
-the residuals were a matrix (e.g. those of class <code>"mlm"</code>).
+the residuals were a matrix (e.g., those of class <code>"mlm"</code>).
 (Reported by Bill Dunlap.)
 </p>
 </li>
@@ -5310,16 +5310,16 @@ zero parts.
 objects when not both <code>i</code> and <code>j</code> are specified.
 </p>
 </li>
-<li> <p><CODE>R CMD INSTALL</CODE> was not always respecting the
+<li> <p><code>R CMD INSTALL</code> was not always respecting the
 <span class="samp">ZipData: yes</span> field of a ‘<span class="file">DESCRIPTION</span>’ file (although
 this is frequently incorrectly specified for packages with no data
 or which specify lazy-loading of data).
 </p>
-<p><CODE>R CMD INSTALL --use-zip-data</CODE> was incorrectly implemented
-as <span class="option">--use-zipdata</span> since <font face="Courier New,Courier" color="#666666"><b>R</b></font> 2.9.0.
+<p><code>R CMD INSTALL --use-zip-data</code> was incorrectly implemented
+as <span class="option">--use-zipdata</span> since <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> 2.9.0.
 </p>
 </li>
-<li> <p><CODE>source(file, echo=TRUE)</CODE> could fail if the file
+<li> <p><code>source(file, echo=TRUE)</code> could fail if the file
 contained <span class="samp">#line</span> directives.  It now recovers more gracefully, but
 may still display the wrong line if the directive gives incorrect
 information.
@@ -5331,7 +5331,7 @@ information.
 </li>
 <li> <p><code>library()</code> failed to cache S4 metadata (unlike
 <code>loadNamespace()</code>) causing failures in S4-using packages
-without a namespace (e.g. those using reference classes).
+without a namespace (e.g., those using reference classes).
 </p>
 </li>
 <li><p> The function <code>qlogis(lp, log.p=TRUE)</code> no longer
@@ -5343,8 +5343,8 @@ resetting the methods tables for the members of the group (patch
 contributed by Martin Morgan).
 </p>
 </li>
-<li><p> In some circumstances (including for package <a href="http://CRAN.R-project.org/package=XML"><span class="pkg">XML</span></a>),
-<CODE>R CMD INSTALL</CODE> installed version-control directories from
+<li><p> In some circumstances (including for package <a href="https://CRAN.R-project.org/package=XML"><span class="pkg">XML</span></a>),
+<code>R CMD INSTALL</code> installed version-control directories from
 source packages.
 </p>
 </li>
@@ -5375,7 +5375,7 @@ Charlie Roosen.)
 
 
 
-<h3><img src="../help/figures/../../html/logo.jpg" alt="../../html/logo.jpg" /> CHANGES IN R VERSION 2.12.1</h3>
+<h3><img class="toplogo" src="../help/figures/../../html/Rlogo.svg" alt="[R logo]" /> CHANGES IN R VERSION 2.12.1</h3>
 
 
 
@@ -5400,7 +5400,7 @@ names during reshaping to wide format.  (<a href="https://bugs.R-project.org/bug
 </p>
 </li>
 <li> <p><code>legend()</code> allows the length of lines to be set by the
-end user <EM>via</EM> the new argument <code>seg.len</code>.
+end user <em>via</em> the new argument <code>seg.len</code>.
 </p>
 </li>
 <li><p> New S4 reference class utility methods <code>copy()</code>,
@@ -5411,7 +5411,7 @@ been added to package <span class="pkg">methods</span>.
 <li><p> When a character value is used for the <code>EXPR</code>
 argument in <code>switch()</code>, a warning is given if more than
 one unnamed alternative value is given.  This will become an
-error in <font face="Courier New,Courier" color="#666666"><b>R</b></font> 2.13.0.
+error in <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> 2.13.0.
 </p>
 </li>
 <li> <p><code>StructTS(type = "BSM")</code> now allows series with just
@@ -5450,7 +5450,7 @@ twice.  (<a href="https://bugs.R-project.org/bugzilla3/show_bug.cgi?id=14388">PR
 </li>
 <li><p> The <code>data.frame</code> method of <code>format()</code> failed if a
 column name was longer than 256 bytes (the maximum length allowed
-for an <font face="Courier New,Courier" color="#666666"><b>R</b></font> name).
+for an <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> name).
 </p>
 </li>
 <li> <p><code>predict(<lm object>, type ="terms", ...)</code> failed if
@@ -5461,7 +5461,7 @@ by Bill Dunlap.)
 for all terms, not just those selected by a non-null <code>terms</code>.
 </p>
 </li>
-<li><p> The TRE regular expressions engine could terminate <font face="Courier New,Courier" color="#666666"><b>R</b></font> rather
+<li><p> The TRE regular expressions engine could terminate <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> rather
 than give an error when given certain invalid regular expressions.
 (<a href="https://bugs.R-project.org/bugzilla3/show_bug.cgi?id=14398">PR#14398</a>)
 </p>
@@ -5519,7 +5519,7 @@ fail when <span class="samp">\SweaveInput</span> was combined with named chunks.
 could infinite-loop when compiled with high optimization on a
 modern version of <code>gcc</code>, and <code>SAFE_FFLAGS</code> is now used
 to make this less likely.  (<a href="https://bugs.R-project.org/bugzilla3/show_bug.cgi?id=14427">PR#14427</a>, seen with 32-bit Windows
-using <code>gcc 4.5.0</code> used from <font face="Courier New,Courier" color="#666666"><b>R</b></font> 2.12.0.)
+using <code>gcc 4.5.0</code> used from <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> 2.12.0.)
 </p>
 </li>
 <li> <p><code>sapply()</code> with default <code>simplify = TRUE</code> and
@@ -5562,7 +5562,7 @@ bindings).
 <code>"environment"</code> now allocates a new environment object.
 </p>
 </li>
-<li> <p><CODE>R CMD check</CODE> has more protection against (probably
+<li> <p><code>R CMD check</code> has more protection against (probably
 erroneous) example or test output which is invalid in the current
 locale.
 </p>
@@ -5612,7 +5612,7 @@ clipboard failed.
 
 
 
-<h3><img src="../help/figures/../../html/logo.jpg" alt="../../html/logo.jpg" /> CHANGES IN R VERSION 2.12.0</h3>
+<h3><img class="toplogo" src="../help/figures/../../html/Rlogo.svg" alt="[R logo]" /> CHANGES IN R VERSION 2.12.0</h3>
 
 
 
@@ -5658,7 +5658,7 @@ treated as true.
 objects now insert linebreaks in long calls in the same way that
 the <code>print()</code> methods for <code>"summary.[g]lm"</code> objects
 have long done.  This does change the layout of the examples for
-a number of packages, e.g. <a href="http://CRAN.R-project.org/package=MASS"><span class="pkg">MASS</span></a>.  (<a href="https://bugs.R-project.org/bugzilla3/show_bug.cgi?id=14250">PR#14250</a>)
+a number of packages, e.g. <a href="https://CRAN.R-project.org/package=MASS"><span class="pkg">MASS</span></a>.  (<a href="https://bugs.R-project.org/bugzilla3/show_bug.cgi?id=14250">PR#14250</a>)
 </p>
 </li>
 <li> <p><code>constrOptim()</code> can now be used with method
@@ -5680,7 +5680,7 @@ replaced by a single method for <code>"POSIXt"</code>.
 <p>There are no longer separate <code>plot()</code> methods for
 <code>"POSIX[cl]t"</code> and <code>"Date"</code>: the default method has
 been able to handle those classes for a long time.  This
-<EM>inter alia</EM> allows a single date-time object to be
+<em>inter alia</em> allows a single date-time object to be
 supplied, the wish of <a href="https://bugs.R-project.org/bugzilla3/show_bug.cgi?id=14016">PR#14016</a>.
 </p>
 <p>The methods had a different default (<code>""</code>) for <code>xlab</code>.
@@ -5689,7 +5689,7 @@ supplied, the wish of <a href="https://bugs.R-project.org/bugzilla3/show_bug.cgi
 <li><p> Classes <code>"POSIXct"</code>, <code>"POSIXlt"</code> and
 <code>"difftime"</code> have generators <code>.POSIXct()</code>,
 <code>.POSIXlt()</code> and <code>.difftime()</code>.  Package authors are
-advised to make use of them (they are available from <font face="Courier New,Courier" color="#666666"><b>R</b></font> 2.11.0) to
+advised to make use of them (they are available from <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> 2.11.0) to
 proof against planned future changes to the classes.
 </p>
 <p>The ordering of the classes has been changed, so <code>"POSIXt"</code>
@@ -5751,16 +5751,16 @@ to return graphics events, through the new functions
 </p>
 </li>
 <li> <p><code>tools::texi2dvi()</code> gains an <code>index</code> argument,
-mainly for use by <CODE>R CMD Rd2pdf</CODE>.
+mainly for use by <code>R CMD Rd2pdf</code>.
 </p>
-<p>It avoids the use of <CODE>texindy</CODE> by <CODE>texinfo</CODE>'s
-<CODE>texi2dvi >= 1.157</CODE>, since that does not emulate
+<p>It avoids the use of <code>texindy</code> by <code>texinfo</code>'s
+<code>texi2dvi >= 1.157</code>, since that does not emulate
 'makeindex' well enough to avoid problems with special characters
 (such as <span class="samp">(</span>, <span class="samp">{</span>, <span class="samp">!</span>) in indices.
 </p>
 </li>
 <li><p> The ability of <code>readLines()</code> and <code>scan()</code> to
-re-encode inputs to marked UTF-8 strings on Windows since <font face="Courier New,Courier" color="#666666"><b>R</b></font> 2.7.0
+re-encode inputs to marked UTF-8 strings on Windows since <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> 2.7.0
 is extended to non-UTF-8 locales on other OSes.
 </p>
 </li>
@@ -5783,7 +5783,7 @@ bitwise.
 </li>
 <li><p> Environment variables <span class="env">R_DVIPSCMD</span>, <span class="env">R_LATEXCMD</span>,
 <span class="env">R_MAKEINDEXCMD</span>, <span class="env">R_PDFLATEXCMD</span> are no longer used
-nor set in an <font face="Courier New,Courier" color="#666666"><b>R</b></font> session.  (With the move to
+nor set in an <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> session.  (With the move to
 <code>tools::texi2dvi()</code>, the conventional environment variables
 <span class="env">LATEX</span>, <span class="env">MAKEINDEX</span> and <span class="env">PDFLATEX</span> will be used.
 <code>options("dvipscmd")</code> defaults to the value of <span class="env">DVIPS</span>,
@@ -5978,7 +5978,7 @@ use of a <code>"tzone"</code> attribute with <code>"%Z"</code> and
 </p>
 </li>
 <li> <p><code>tools::texi2dvi(file, clean = TRUE)</code> now works in more
-cases (e.g. where emulation is used and when ‘<span class="file">file</span>’ is not in
+cases (e.g., where emulation is used and when ‘<span class="file">file</span>’ is not in
 the current directory).
 </p>
 </li>
@@ -6001,7 +6001,7 @@ which can be used to (portably) ignore standard output.
 </p>
 </li>
 <li> <p><code>system(intern = TRUE)</code> and <code>pipe()</code> connections
-are guaranteed to be available on all builds of <font face="Courier New,Courier" color="#666666"><b>R</b></font>.
+are guaranteed to be available on all builds of <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span>.
 </p>
 </li>
 <li> <p><code>Sys.which()</code> has been altered to return <code>""</code> if
@@ -6046,7 +6046,7 @@ methods.  See <code>?ReferenceClasses</code>.
 <li><p> R now provides ‘<span class="file">jss.cls</span>’ and ‘<span class="file">jss.bst</span>’ (the class
 and bib style file for the Journal of Statistical Software) as
 well as ‘<span class="file">RJournal.bib</span>’ and ‘<span class="file">Rnews.bib</span>’, and
-<CODE>R CMD</CODE> ensures that the ‘<span class="file">.bst</span>’ and ‘<span class="file">.bib</span>’ files
+<code>R CMD</code> ensures that the ‘<span class="file">.bst</span>’ and ‘<span class="file">.bib</span>’ files
 are found by BibTeX.
 </p>
 </li>
@@ -6072,7 +6072,7 @@ octal/hex and Unicode escapes is now an error.
 now defunct.
 </p>
 </li>
-<li> <p><CODE>R CMD check</CODE> no longer supports configuration
+<li> <p><code>R CMD check</code> no longer supports configuration
 files containing Perl configuration variables: use the environment
 variables documented in ‘R Internals’ instead.
 </p>
@@ -6083,12 +6083,12 @@ facility is very rarely actually used, and was superseded by the
 <span class="samp">Depends</span> field of the ‘<span class="file">DESCRIPTION</span>’ file long ago.)
 </p>
 </li>
-<li> <p><CODE>R CMD check --no-latex</CODE> is deprecated in favour of
+<li> <p><code>R CMD check --no-latex</code> is deprecated in favour of
 <span class="option">--no-manual</span>.
 </p>
 </li>
-<li> <p><CODE>R CMD Sd2Rd</CODE> is formally deprecated and will be
-removed in <font face="Courier New,Courier" color="#666666"><b>R</b></font> 2.13.0.
+<li> <p><code>R CMD Sd2Rd</code> is formally deprecated and will be
+removed in <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> 2.13.0.
 </p>
 </li></ul>
 
@@ -6101,7 +6101,7 @@ removed in <font face="Courier New,Courier" color="#666666"><b>R</b></font> 2.13
 <ul>
 <li> <p><code>install.packages()</code> has a new argument
 <code>libs_only</code> to optionally pass <span class="option">--libs-only</span> to
-<CODE>R CMD INSTALL</CODE> and works analogously for Windows binary
+<code>R CMD INSTALL</code> and works analogously for Windows binary
 installs (to add support for 64- or 32-bit Windows).
 </p>
 </li>
@@ -6117,7 +6117,7 @@ avoid problems with cleaning the sources between building
 sub-architectures.
 </p>
 </li>
-<li> <p><CODE>R CMD INSTALL --libs-only</CODE> no longer overrides the
+<li> <p><code>R CMD INSTALL --libs-only</code> no longer overrides the
 setting of locking, so a previous version of the package will be
 restored unless <span class="option">--no-lock</span> is specified.
 </p>
@@ -6130,21 +6130,21 @@ restored unless <span class="option">--no-lock</span> is specified.
 
 
 <ul>
-<li> <p><CODE>R CMD Rprof|build|check</CODE> are now based on <font face="Courier New,Courier" color="#666666"><b>R</b></font> rather
+<li> <p><code>R CMD Rprof|build|check</code> are now based on <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> rather
 than Perl scripts.  The only remaining Perl scripts are the
-deprecated <CODE>R CMD Sd2Rd</CODE> and <code>install-info.pl</code> (used
+deprecated <code>R CMD Sd2Rd</code> and <code>install-info.pl</code> (used
 only if <code>install-info</code> is not found) as well as some
 maintainer-mode-only scripts.
 </p>
-<p><STRONG>NB:</STRONG> because these have been completely rewritten, users
+<p><strong>NB:</strong> because these have been completely rewritten, users
 should not expect undocumented details of previous
 implementations to have been duplicated.
 </p>
-<p><CODE>R CMD</CODE> no longer manipulates the environment variables
+<p><code>R CMD</code> no longer manipulates the environment variables
 <span class="env">PERL5LIB</span> and <span class="env">PERLLIB</span>.
 </p>
 </li>
-<li> <p><CODE>R CMD check</CODE> has a new argument <span class="option">--extra-arch</span>
+<li> <p><code>R CMD check</code> has a new argument <span class="option">--extra-arch</span>
 to confine tests to those needed to check an additional
 sub-architecture.
 </p>
@@ -6153,7 +6153,7 @@ more thorough: it looks for files, and warns if there are only
 empty directories.
 </p>
 <p>Environment variables such as <span class="env">R_LIBS</span> and those used for
-customization can be set for the duration of checking <EM>via</EM> a file
+customization can be set for the duration of checking <em>via</em> a file
 ‘<span class="file">~/.R/check.Renviron</span>’ (in the format used by
 ‘<span class="file">.Renviron</span>’, and with sub-architecture specific versions
 such as ‘<span class="file">~/.R/check.Renviron.i386</span>’ taking precedence).
@@ -6161,14 +6161,14 @@ such as ‘<span class="file">~/.R/check.Renviron.i386</span>’ taking
 <p>There are new options <span class="option">--multiarch</span> to check the package
 under all of the installed sub-architectures and
 <span class="option">--no-multiarch</span> to confine checking to the
-sub-architecture under which <CODE>check</CODE> is invoked.  If
+sub-architecture under which <code>check</code> is invoked.  If
 neither option is supplied, a test is done of installed
 sub-architectures and all those which can be run on the current
 OS are used.
 </p>
 <p>Unless multiple sub-architectures are selected, the install done
 by <code>check</code> for testing purposes is only of the current
-sub-architecture (<EM>via</EM> <CODE>R CMD INSTALL --no-multiarch</CODE>).
+sub-architecture (<em>via</em> <code>R CMD INSTALL --no-multiarch</code>).
 </p>
 <p>It will skip the check for non-ascii characters in code or data
 if the environment variables <span class="env">_R_CHECK_ASCII_CODE_</span> or
@@ -6176,27 +6176,27 @@ if the environment variables <span class="env">_R_CHECK_ASCII_CODE_</span> or
 (Suggestion of Vince Carey.)
 </p>
 </li>
-<li> <p><CODE>R CMD build</CODE> no longer creates an ‘<span class="file">INDEX</span>’ file
-(<CODE>R CMD INSTALL</CODE> does so), and <span class="option">--force</span> removes
+<li> <p><code>R CMD build</code> no longer creates an ‘<span class="file">INDEX</span>’ file
+(<code>R CMD INSTALL</code> does so), and <span class="option">--force</span> removes
 (rather than overwrites) an existing ‘<span class="file">INDEX</span>’ file.
 </p>
 <p>It supports a file ‘<span class="file">~/.R/build.Renviron</span>’ analogously to
-<CODE>check</CODE>.
+<code>check</code>.
 </p>
 <p>It now runs build-time <span class="samp">\Sexpr</span> expressions in help files.
 </p>
 </li>
-<li> <p><CODE>R CMD Rd2dvi</CODE> makes use of <code>tools::texi2dvi()</code>
+<li> <p><code>R CMD Rd2dvi</code> makes use of <code>tools::texi2dvi()</code>
 to process the package manual.  It is now implemented entirely in
-<font face="Courier New,Courier" color="#666666"><b>R</b></font> (rather than partially as a shell script).
+<span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> (rather than partially as a shell script).
 </p>
 </li>
-<li> <p><CODE>R CMD Rprof</CODE> now uses <code>utils::summaryRprof()</code>
+<li> <p><code>R CMD Rprof</code> now uses <code>utils::summaryRprof()</code>
 rather than Perl.  It has new arguments to select one of the
 tables and to limit the number of entries printed.
 </p>
 </li>
-<li> <p><CODE>R CMD Sweave</CODE> now runs <font face="Courier New,Courier" color="#666666"><b>R</b></font> with <span class="option">--vanilla</span> so
+<li> <p><code>R CMD Sweave</code> now runs <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> with <span class="option">--vanilla</span> so
 the environment setting of <span class="env">R_LIBS</span> will always be used.
 </p>
 </li></ul>
@@ -6212,7 +6212,7 @@ the environment setting of <span class="env">R_LIBS</span> will always be used.
 pre-existing <code>lang[1-4]()</code>) convenience functions for easier
 construction of <code>eval()</code> calls.  If you have your own
 definition, do wrap it inside <code>#ifndef lang5 .... #endif</code>
-to keep it working with old and new <font face="Courier New,Courier" color="#666666"><b>R</b></font>.
+to keep it working with old and new <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span>.
 </p>
 </li>
 <li><p> Header ‘<span class="file">R.h</span>’ now includes only the C headers it itself needs,
@@ -6234,18 +6234,18 @@ respectively if included from a C++ source file.
 
 <ul>
 <li><p> A C99 compiler is now required, and more C99 language features
-will be used in the <font face="Courier New,Courier" color="#666666"><b>R</b></font> sources.
+will be used in the <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> sources.
 </p>
 </li>
 <li><p> Tcl/Tk >= 8.4 is now required (increased from 8.3).
 </p>
 </li>
 <li><p> System functions <code>access</code>, <code>chdir</code> and
-<code>getcwd</code> are now essential to configure <font face="Courier New,Courier" color="#666666"><b>R</b></font>.  (In practice
+<code>getcwd</code> are now essential to configure <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span>.  (In practice
 they have been required for some time.)
 </p>
 </li>
-<li> <p><CODE>make check</CODE> compares the output of the examples
+<li> <p><code>make check</code> compares the output of the examples
 from several of the base packages to reference output rather than
 the previous output (if any).  Expect some differences due to
 differences in floating-point computations between platforms.
@@ -6256,16 +6256,16 @@ part of the installation.  The primary source for changes is now
 ‘<span class="file">doc/NEWS.Rd</span>’.
 </p>
 </li>
-<li><p> The <code>popen</code> system call is now required to build <font face="Courier New,Courier" color="#666666"><b>R</b></font>.
+<li><p> The <code>popen</code> system call is now required to build <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span>.
 This ensures the availability of <code>system(intern = TRUE)</code>,
 <code>pipe()</code> connections and printing from <code>postscript()</code>.
 </p>
 </li>
-<li><p> The <CODE>pkg-config</CODE> file ‘<span class="file">libR.pc</span>’ now also works
-when <font face="Courier New,Courier" color="#666666"><b>R</b></font> is installed using a sub-architecture.
+<li><p> The <code>pkg-config</code> file ‘<span class="file">libR.pc</span>’ now also works
+when <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> is installed using a sub-architecture.
 </p>
 </li>
-<li> <p><font face="Courier New,Courier" color="#666666"><b>R</b></font> has always required a BLAS that conforms to IE60559
+<li> <p><span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> has always required a BLAS that conforms to IE60559
 arithmetic, but after discovery of more real-world problems caused
 by a BLAS that did not, this is tested more thoroughly in this
 version.
@@ -6285,8 +6285,9 @@ inherited methods.  This could previously corrupt methods used by
 </p>
 </li>
 <li><p> The densities of non-central chi-squared are now more accurate
-in some cases in the extreme tails, e.g. <code>dchisq(2000, 2,
-       1000)</code>, as a series expansion was truncated too early.
+in some cases in the extreme tails,
+e.g. <code>dchisq(2000, 2, 1000)</code>,
+as a series expansion was truncated too early.
 (<a href="https://bugs.R-project.org/bugzilla3/show_bug.cgi?id=14105">PR#14105</a>)
 </p>
 </li>
@@ -6376,7 +6377,7 @@ in ‘<span class="file">.Rd</span>’ files.
 </p>
 </li>
 <li><p> The behaviour of <code>as.logical()</code> on factors (to use the
-levels) was lost in <font face="Courier New,Courier" color="#666666"><b>R</b></font> 2.6.0 and has been restored.
+levels) was lost in <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> 2.6.0 and has been restored.
 </p>
 </li>
 <li> <p><code>prompt()</code> did not backquote some default arguments in
@@ -6432,7 +6433,7 @@ pointer objects even when the pointer addresses were the same.
 </li>
 <li> <p><code>tempfile()</code> now always gives a random file name (even
 if the directory is specified) when called directly after
-startup and before the <font face="Courier New,Courier" color="#666666"><b>R</b></font> RNG had been used.  (<a href="https://bugs.R-project.org/bugzilla3/show_bug.cgi?id=14381">PR#14381</a>)
+startup and before the <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> RNG had been used.  (<a href="https://bugs.R-project.org/bugzilla3/show_bug.cgi?id=14381">PR#14381</a>)
 </p>
 </li>
 <li> <p><code>quantile(type=6)</code> behaved inconsistently.  (<a href="https://bugs.R-project.org/bugzilla3/show_bug.cgi?id=14383">PR#14383</a>)
@@ -6442,7 +6443,7 @@ startup and before the <font face="Courier New,Courier" color="#666666"><b>R</b>
 sequence was decreasing.  (<a href="https://bugs.R-project.org/bugzilla3/show_bug.cgi?id=14386">PR#14386</a>)
 </p>
 </li>
-<li><p> The reference BLAS included in <font face="Courier New,Courier" color="#666666"><b>R</b></font> was assuming that
+<li><p> The reference BLAS included in <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> was assuming that
 <code>0*x</code> and <code>x*0</code> were always zero (whereas they could be
 <code>NA</code> or <code>NaN</code> in IEC 60559 arithmetic).  This was seen
 in results from <code>tcrossprod</code>, and for example that
@@ -6514,7 +6515,7 @@ list.
 
 
 
-<h3><img src="../help/figures/../../html/logo.jpg" alt="../../html/logo.jpg" /> CHANGES IN R VERSION 2.11.1 patched</h3>
+<h3><img class="toplogo" src="../help/figures/../../html/Rlogo.svg" alt="[R logo]" /> CHANGES IN R VERSION 2.11.1 patched</h3>
 
 
 
@@ -6524,10 +6525,10 @@ list.
 <ul>
 <li> <p><code>install.packages()</code> has a new optional argument
 <code>INSTALL_opts</code> which can be used to pass options to
-<CODE>R CMD INSTALL</CODE> for source-package installs.
+<code>R CMD INSTALL</code> for source-package installs.
 </p>
 </li>
-<li> <p><CODE>R CMD check</CODE> now runs the package-specific tests
+<li> <p><code>R CMD check</code> now runs the package-specific tests
 with <span class="env">LANGUAGE=en</span> to facilitate comparison to
 ‘<span class="file">.Rout.save</span>’ files.
 </p>
@@ -6545,9 +6546,9 @@ is used.
 
 
 <ul>
-<li><p> The use of Perl configuration variables for <CODE>R CMD
-	check</CODE> (as previously documented in ‘Writing R
-Extensions’) is deprecated and will be removed in <font face="Courier New,Courier" color="#666666"><b>R</b></font> 2.12.0.  Use
+<li><p> The use of Perl configuration variables for <code>R CMD
+	check</code> (as previously documented in ‘Writing R
+Extensions’) is deprecated and will be removed in <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> 2.12.0.  Use
 the environment variables documented in ‘R Internals’
 instead.
 </p>
@@ -6560,9 +6561,9 @@ instead.
 
 
 <ul>
-<li> <p><CODE>R CMD Rd2dvi</CODE> failed if run from a path containing
-space(s).  This also affected <CODE>R CMD check</CODE>, which calls
-<CODE>Rd2dvi</CODE>.
+<li> <p><code>R CMD Rd2dvi</code> failed if run from a path containing
+space(s).  This also affected <code>R CMD check</code>, which calls
+<code>Rd2dvi</code>.
 </p>
 </li>
 <li> <p><code>stripchart()</code> could fail with an empty factor
@@ -6579,10 +6580,10 @@ local encoding when no splits were found.
 </p>
 </li>
 <li> <p><code>weighted.mean(NA, na.rm=TRUE)</code> and similar now returns
-<code>NaN</code> again, as it did prior to <font face="Courier New,Courier" color="#666666"><b>R</b></font> 2.10.0.
+<code>NaN</code> again, as it did prior to <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> 2.10.0.
 </p>
 </li>
-<li> <p><CODE>R CMD</CODE> had a typo in its detection of whether the
+<li> <p><code>R CMD</code> had a typo in its detection of whether the
 environment variable <span class="env">TEXINPUTS</span> was set (reported by Martin
 Morgan).
 </p>
@@ -6650,7 +6651,7 @@ David B. Thompson.)
 </p>
 </li>
 <li> <p><code>tools::undoc()</code> again detects undocumented data
-objects.  Of course, this also affects <CODE>R CMD check</CODE>.
+objects.  Of course, this also affects <code>R CMD check</code>.
 </p>
 </li>
 <li> <p><code>ksmooth(x,NULL)</code> no longer segfaults.
@@ -6666,7 +6667,7 @@ were different but so close as to print identically.
 
 
 
-<h3><img src="../help/figures/../../html/logo.jpg" alt="../../html/logo.jpg" /> CHANGES IN R VERSION 2.11.1</h3>
+<h3><img class="toplogo" src="../help/figures/../../html/Rlogo.svg" alt="[R logo]" /> CHANGES IN R VERSION 2.11.1</h3>
 
 
 
@@ -6674,12 +6675,12 @@ were different but so close as to print identically.
 
 
 <ul>
-<li> <p><CODE>R CMD INSTALL</CODE> checks if dependent packages are
+<li> <p><code>R CMD INSTALL</code> checks if dependent packages are
 available early on in the installation of source packages,
 thereby giving clearer error messages.
 </p>
 </li>
-<li> <p><CODE>R CMD INSTALL --build</CODE> now names the file in the
+<li> <p><code>R CMD INSTALL --build</code> now names the file in the
 format used for Mac OS X binary files on that platform.
 </p>
 </li>
@@ -6696,7 +6697,7 @@ multiple fitted models, analogously to <code>AIC()</code>.
 
 <ul>
 <li><p> Use of file extension ‘<span class="file">.C</span>’ for C++ code in packages is now
-deprecated: it has caused problems for some <CODE>make</CODE>s on
+deprecated: it has caused problems for some <code>make</code>s on
 case-insensitive file systems (although it currently works
 with the recommended toolkits).
 </p>
@@ -6709,7 +6710,7 @@ with the recommended toolkits).
 
 
 <ul>
-<li><p> Command <CODE>gnutar</CODE> is preferred to <CODE>tar</CODE>
+<li><p> Command <code>gnutar</code> is preferred to <code>tar</code>
 when configure sets <span class="env">TAR</span>.  This is needed on Mac OS 10.6,
 where the default <code>tar</code>, <code>bsdtar 2.6.2</code>, has been
 reported to produce archives with illegal extensions to tar
@@ -6771,8 +6772,8 @@ unused levels) if passed <code>x</code> and <code>y</code> as factors
 (reported by Greg Snow).
 </p>
 </li>
-<li> <p><CODE>Rd2pdf</CODE> sometimes needed a further
-<CODE>pdflatex</CODE> pass to get hyperlinked pages correct.
+<li> <p><code>Rd2pdf</code> sometimes needed a further
+<code>pdflatex</code> pass to get hyperlinked pages correct.
 </p>
 </li>
 <li> <p><code>interaction()</code> produced malformed results when levels were
@@ -6786,7 +6787,7 @@ or <code>"POSIXt"</code> argument <code>d</code>.
 </li>
 <li> <p><code>memDecompress()</code> could decompress incompletely rare
 <code>xz</code>-compressed input due to incorrect documentation of
-<CODE>xz utils</CODE>.  (Report and patch from Olaf Mersmann.)
+<code>xz utils</code>.  (Report and patch from Olaf Mersmann.)
 </p>
 </li>
 <li><p> The S4 <code>initialize()</code> methods for <code>"matrix"</code>,
@@ -6794,7 +6795,7 @@ or <code>"POSIXt"</code> argument <code>d</code>.
 <code>validObject()</code>.  (<a href="https://bugs.R-project.org/bugzilla3/show_bug.cgi?id=14284">PR#14284</a>)
 </p>
 </li>
-<li> <p><CODE>R CMD INSTALL</CODE> now behaves the same way with or
+<li> <p><code>R CMD INSTALL</code> now behaves the same way with or
 without <span class="option">--no-multiarch</span> on platforms with only one
 installed architecture.  (It used to clean the ‘<span class="file">src</span>’
 directory without <span class="option">--no-multiarch</span>.)
@@ -6820,7 +6821,7 @@ packages using <code>LazyData</code>.  (<a href="https://bugs.R-project.org/bugz
 </p>
 </li>
 <li> <p><code>textConnection()</code> did an unnecessary translation on
-strings in a foreign encoding (e.g. UTF-8 strings on Windows) and
+strings in a foreign encoding (e.g., UTF-8 strings on Windows) and
 so was slower than it could have been on very long input strings.
 (<a href="https://bugs.R-project.org/bugzilla3/show_bug.cgi?id=14286">PR#14286</a>)
 </p>
@@ -6845,7 +6846,7 @@ longer segfaults. (<a href="https://bugs.R-project.org/bugzilla3/show_bug.cgi?id
 
 
 
-<h3><img src="../help/figures/../../html/logo.jpg" alt="../../html/logo.jpg" /> CHANGES IN R VERSION 2.11.0</h3>
+<h3><img class="toplogo" src="../help/figures/../../html/Rlogo.svg" alt="[R logo]" /> CHANGES IN R VERSION 2.11.0</h3>
 
 
 
@@ -6853,7 +6854,7 @@ longer segfaults. (<a href="https://bugs.R-project.org/bugzilla3/show_bug.cgi?id
 
 
 <ul>
-<li><p> Packages must have been installed under <font face="Courier New,Courier" color="#666666"><b>R</b></font> >= 2.10.0, as the
+<li><p> Packages must have been installed under <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> >= 2.10.0, as the
 current help system is the only one now supported.
 </p>
 </li>
@@ -6866,13 +6867,14 @@ Installation Manual’.
 same way as for interpreted functions except for the deliberate
 exceptions
 </p>
-<PRE>
+<pre>
 	 call switch .C .Fortran .Call .External
-       </PRE>
-all of which use positional matching for their first argument,
+       </pre>
+<p>all of which use positional matching for their first argument,
 and also some internal-use-only primitives.
+</p>
 </li>
-<li><p> The default device for command-line <font face="Courier New,Courier" color="#666666"><b>R</b></font> at the console on Mac OS X
+<li><p> The default device for command-line <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> at the console on Mac OS X
 is now <code>quartz()</code> and not <code>X11()</code>.
 </p>
 </li></ul>
@@ -6892,9 +6894,9 @@ compressed-file connections <code>gzfile()</code>, <code>bzfile()</code> and
 <code>xzfile()</code> for which it means <code>"rb"</code>.
 </p>
 </li>
-<li> <p><CODE>R CMD INSTALL</CODE> now uses the internal <code>untar()</code>
+<li> <p><code>R CMD INSTALL</code> now uses the internal <code>untar()</code>
 function in package <span class="pkg">utils</span>: this ensures that all platforms
-can install <CODE>bzip2</CODE>- and <CODE>xz</CODE>-compressed
+can install <code>bzip2</code>- and <code>xz</code>-compressed
 tarballs.  In case this causes problems (as it has on some
 Windows file systems when run from Cygwin tools) it can be
 overridden by the environment variable <span class="env">R_INSTALL_TAR</span>:
@@ -6907,7 +6909,7 @@ unpacking of large (tens of Mb or more) tarballs.
 first time it is used can dominate the time).
 </p>
 </li>
-<li> <p><CODE>R CMD check</CODE> has a new option <span class="option">--timings</span>
+<li> <p><code>R CMD check</code> has a new option <span class="option">--timings</span>
 to record per-example timings in file
 ‘<span class="file"><pkg>.Rcheck/<pkg>-Ex.timings</span>’.
 </p>
@@ -6919,7 +6921,7 @@ to record per-example timings in file
 in bytes in an 8-bit locales if there is no marked UTF-8 input
 string: this will be somewhat faster, and for <code>[g]sub()</code>
 give the result in the native encoding rather than in UTF-8
-(which returns to the behaviour prior to <font face="Courier New,Courier" color="#666666"><b>R</b></font> 2.10.0).
+(which returns to the behaviour prior to <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> 2.10.0).
 </p>
 </li>
 <li><p> A new argument <code>skipCalls</code> has been added to
@@ -6950,7 +6952,7 @@ raster images from graphics devices (again not supported
 on all graphics devices).
 </p>
 </li>
-<li> <p><CODE>R CMD check</CODE> now also checks if the package and
+<li> <p><code>R CMD check</code> now also checks if the package and
 namespace can be unloaded: this provides a check of the
 <code>.Last.lib()</code> and <code>.onUnload()</code> hook functions (unless
 <span class="option">--install=fake</span>).
@@ -7057,7 +7059,7 @@ and <a href="https://bugs.R-project.org/bugzilla3/show_bug.cgi?id=10507">PR#1050
 </li>
 <li><p> The <code>readline</code> completion backend no longer sorts
 possible completions alphabetically (e.g., function argument
-names) if <font face="Courier New,Courier" color="#666666"><b>R</b></font> was built with <code>readline >= 6</code>.
+names) if <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> was built with <code>readline >= 6</code>.
 </p>
 </li>
 <li> <p><code>select.list()</code> gains a <code>graphics</code> argument to
@@ -7071,7 +7073,7 @@ text menu: use ask=<code>"graphics"</code> for a graphical menu.
 <code>"BioC_mirror"</code> option.
 </p>
 </li>
-<li><p> The <font face="Courier New,Courier" color="#666666"><b>R</b></font> grammar now prevents using the argument <code>name</code>
+<li><p> The <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> grammar now prevents using the argument <code>name</code>
 in signatures of S4 methods for <code>$</code> and <code>$<-</code>, since
 they will always be called with a character string value for
 <code>name</code>.  The implicit S4 generic functions have been
@@ -7115,8 +7117,8 @@ instead of one object per line.
 </p>
 </li>
 <li> <p><code>download.file()</code> gains a <code>"curl"</code> method, mainly
-for use on platforms which have <CODE>curl</CODE> but not
-<CODE>wget</CODE>, but also for some hard-to-access URLs.
+for use on platforms which have <code>curl</code> but not
+<code>wget</code>, but also for some hard-to-access URLs.
 </p>
 </li>
 <li><p> In <code>Rd</code>, <span class="samp">\eqn</span> and <span class="samp">\deqn</span> will render in
@@ -7192,7 +7194,7 @@ have implicit S4 generics.
 architecture-specific versions on systems with sub-architectures.
 </p>
 </li>
-<li> <p><CODE>R CMD check</CODE> now (by default) also checks Rd files
+<li> <p><code>R CMD check</code> now (by default) also checks Rd files
 for auto-generated content in need of editing, and missing
 argument descriptions.
 </p>
@@ -7212,7 +7214,7 @@ headers, and pager.
 </li>
 <li><p> The ‘fuzz’ used by <code>seq()</code> and <code>seq.int()</code> has
 been reduced from <code>1e-7</code> to <code>1e-10</code>, which should be
-ample for the double-precision calculations used in <font face="Courier New,Courier" color="#666666"><b>R</b></font>.  It
+ample for the double-precision calculations used in <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span>.  It
 ensures that the fuzz never comes into play with sequences of
 integers (wish of <a href="https://bugs.R-project.org/bugzilla3/show_bug.cgi?id=14169">PR#14169</a>).
 </p>
@@ -7237,7 +7239,7 @@ non-numeric arguments, such as the non-bug report <a href="https://bugs.R-projec
 </p>
 </li>
 <li> <p><code>pchisq(ncp =, log.p = TRUE)</code> is more accurate for
-probabilities near one.  E.g. <code>pchisq(80, 4, ncp=1,
+probabilities near one.  E.g., <code>pchisq(80, 4, ncp=1,
        log.p=TRUE)</code>.  (Maybe what was meant in <a href="https://bugs.R-project.org/bugzilla3/show_bug.cgi?id=14216">PR#14216</a>.)
 </p>
 </li>
@@ -7361,7 +7363,7 @@ is now defunct.
 </li>
 <li><p> In the <span class="pkg">methods</span> package, the <code>"MethodsList"</code>
 metadata objects which had been superseded by hash tables
-(environments) since <font face="Courier New,Courier" color="#666666"><b>R</b></font> 2.8.0 are being phased out.  Objects of
+(environments) since <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> 2.8.0 are being phased out.  Objects of
 this class are no longer assigned or used as metadata by the
 package.
 </p>
@@ -7371,7 +7373,7 @@ by <code>findMethods()</code> and other changes.  Creating objects from the
 </p>
 </li>
 <li><p> Parsing strings containing both octal/hex and Unicode escapes
-now gives a warning and will become an error in <font face="Courier New,Courier" color="#666666"><b>R</b></font> 2.12.0.
+now gives a warning and will become an error in <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> 2.12.0.
 </p>
 </li></ul>
 
@@ -7386,13 +7388,13 @@ now gives a warning and will become an error in <font face="Courier New,Courier"
 manuals.  This requires LaTeX ‘2005/12/01’ or later.
 </p>
 </li>
-<li> <p><CODE>configure</CODE> looks for a POSIX compliant
-<CODE>tr</CODE>, Solaris's <CODE>/usr/ucb/tr</CODE> having been found
-to cause <CODE>Rdiff</CODE> to malfunction.
+<li> <p><code>configure</code> looks for a POSIX compliant
+<code>tr</code>, Solaris's <code>/usr/ucb/tr</code> having been found
+to cause <code>Rdiff</code> to malfunction.
 </p>
 </li>
-<li> <p><CODE>configure</CODE> is now generated with <CODE>autoconf
-       2.65</CODE>, which works better on recent systems and on Mac OS X.
+<li> <p><code>configure</code> is now generated with <code>autoconf
+       2.65</code>, which works better on recent systems and on Mac OS X.
 </p>
 </li></ul>
 
@@ -7403,13 +7405,13 @@ to cause <CODE>Rdiff</CODE> to malfunction.
 
 
 <ul>
-<li><p> Characters in <font face="Courier New,Courier" color="#666666"><b>R</b></font> source which are not translatable to the
+<li><p> Characters in <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> source which are not translatable to the
 current locale are now handled more tolerantly:  these will be
 converted to hex codes with a warning.  Such characters are
 only really portable if they appear in comments.
 </p>
 </li>
-<li> <p><CODE>R CMD INSTALL</CODE> now tests that the installed package
+<li> <p><code>R CMD INSTALL</code> now tests that the installed package
 can be loaded (and backs out the installation if it cannot): this
 can be suppressed by <span class="option">--no-test-load</span>.  This avoids
 installing/updating a package that cannot be used: common causes
@@ -7452,7 +7454,7 @@ added to turn off all such methods from
 <code>findInheritedMethods()</code>.
 </p>
 </li>
-<li> <p><font face="Courier New,Courier" color="#666666"><b>R</b></font> framework installation (on Mac OS X) would not work
+<li> <p><span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> framework installation (on Mac OS X) would not work
 properly if a rogue <code>Resources</code> directory was present at the
 top level.  Such a non-symlink will now be renamed to
 <code>Resources.old</code> (and anything previously named
@@ -7508,15 +7510,15 @@ zero-length right hand side, and inserted a rubbish
 value.  (<a href="https://bugs.R-project.org/bugzilla3/show_bug.cgi?id=14217">PR#14217</a>)
 </p>
 </li>
-<li> <p><code>fisher.test()</code> no longer gives a P-value <STRONG>very</STRONG>
+<li> <p><code>fisher.test()</code> no longer gives a P-value <strong>very</strong>
 slightly > 1, in some borderline cases.
 </p>
 </li>
 <li><p> Internal function <code>matchArgs()</code> no longer modifies the
 general purpose bits of the <code>SEXP</code>s that make up the formals
-list of <font face="Courier New,Courier" color="#666666"><b>R</b></font> functions.  This fixes an invalid error message that
+list of <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> functions.  This fixes an invalid error message that
 would occur when a garbage collection triggered a second call to
-<code>matchArgs</code> for the same function <EM>via</EM> a finalizer.
+<code>matchArgs</code> for the same function <em>via</em> a finalizer.
 </p>
 </li>
 <li> <p><code>gsub()</code> in 2.10.x could fail from stack overflow for
@@ -7613,7 +7615,7 @@ message.  (<a href="https://bugs.R-project.org/bugzilla3/show_bug.cgi?id=13936">
 
 
 
-<h3><img src="../help/figures/../../html/logo.jpg" alt="../../html/logo.jpg" /> CHANGES IN R VERSION 2.10.1 patched</h3>
+<h3><img class="toplogo" src="../help/figures/../../html/Rlogo.svg" alt="[R logo]" /> CHANGES IN R VERSION 2.10.1 patched</h3>
 
 
 
@@ -7633,14 +7635,14 @@ endcaps.
 </li>
 <li><p> Although <code>\eqn{}</code> in Rd files is defined as a
 ‘verbatim’ macro, many packages expected <code>\dots</code> and
-<code>\ldots</code> to be interpreted there (as was the case in <font face="Courier New,Courier" color="#666666"><b>R</b></font> <
+<code>\ldots</code> to be interpreted there (as was the case in <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> <
 2.10.0), so this is now done (using an ellipsis in HTML
 rendering).
 </p>
 </li>
-<li><p> Escaping of braces in quoted strings in <font face="Courier New,Courier" color="#666666"><b>R</b></font>-code sections of
+<li><p> Escaping of braces in quoted strings in <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span>-code sections of
 Rd files is allowed again.  This had been changed for the new Rd
-format in <font face="Courier New,Courier" color="#666666"><b>R</b></font> 2.10.0 but was only documented on the developer site
+format in <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> 2.10.0 but was only documented on the developer site
 and was handled inconsistently by the converters: text and
 example conversion removed the escapes but HTML conversion did
 not.
@@ -7672,8 +7674,8 @@ embedded new line would copy part of the header into the data.
 </p>
 </li>
 <li><p> Functions related to string comparison
-(e.g. <code>unique()</code>, <code>match()</code>) could cause crashes when
-used with strings not in the native encoding, e.g. UTF-8 strings
+(e.g., <code>unique()</code>, <code>match()</code>) could cause crashes when
+used with strings not in the native encoding, e.g., UTF-8 strings
 on Windows.  (<a href="https://bugs.R-project.org/bugzilla3/show_bug.cgi?id=14114">PR#14114</a> and <a href="https://bugs.R-project.org/bugzilla3/show_bug.cgi?id=14125">PR#14125</a>)
 </p>
 </li>
@@ -7685,12 +7687,12 @@ was in use.
 for the style sheet.
 </p>
 </li>
-<li> <p><code>tools::codoc()</code> (used by <CODE>R CMD check</CODE>) was
+<li> <p><code>tools::codoc()</code> (used by <code>R CMD check</code>) was
 missing cases where the function had no arguments but was
 documented to have some.
 </p>
 </li>
-<li><p> Help links containing special characters (e.g. <code>"?"</code>)
+<li><p> Help links containing special characters (e.g., <code>"?"</code>)
 were not generated correctly when rendered in
 HTML.  (<a href="https://bugs.R-project.org/bugzilla3/show_bug.cgi?id=14155">PR#14155</a>)
 </p>
@@ -7708,7 +7710,7 @@ character strings in a single call used excessive amounts of
 memory (which also slowed them down).
 </p>
 </li>
-<li> <p><CODE>R CMD SHLIB</CODE> could fail if used with paths that
+<li> <p><code>R CMD SHLIB</code> could fail if used with paths that
 were not alphanumeric, e.g. contained <code>+</code>.  (<a href="https://bugs.R-project.org/bugzilla3/show_bug.cgi?id=14168">PR#14168</a>)
 </p>
 </li>
@@ -7803,7 +7805,7 @@ undeclared dependence on <span class="pkg">methods</span> (introduced in 2.10.0)
 
 
 
-<h3><img src="../help/figures/../../html/logo.jpg" alt="../../html/logo.jpg" /> CHANGES IN R VERSION 2.10.1</h3>
+<h3><img class="toplogo" src="../help/figures/../../html/Rlogo.svg" alt="[R logo]" /> CHANGES IN R VERSION 2.10.1</h3>
 
 
 
@@ -7814,11 +7816,11 @@ undeclared dependence on <span class="pkg">methods</span> (introduced in 2.10.0)
 <li><p> The PCRE library has been updated to version 8.00.
 </p>
 </li>
-<li> <p><CODE>R CMD INSTALL</CODE> has new options <span class="option">--no-R</span>,
+<li> <p><code>R CMD INSTALL</code> has new options <span class="option">--no-R</span>,
 <span class="option">--no-libs</span>, <span class="option">--no-data</span>, <span class="option">--no-help</span>,
 <span class="option">--no-demo</span>, <span class="option">--no-exec</span>, and <span class="option">--no-inst</span> to
 suppress installation of the specified part of the package.
-These are intended for special purposes (e.g. building a database
+These are intended for special purposes (e.g., building a database
 of help pages without fully installing all packages).
 </p>
 </li>
@@ -7828,7 +7830,7 @@ from the console now also applies also to <code>parse(file="")</code>
 </p>
 </li>
 <li><p> A Bioconductor mirror can be set for use by
-<code>setRepositories()</code> <EM>via</EM> the option <code>"BioC_mirror"</code>,
+<code>setRepositories()</code> <em>via</em> the option <code>"BioC_mirror"</code>,
 e.g. the European mirror can be selected by
 <code>options(BioC_mirror="http://bioconductor.statistik.tu-dortmund.de")</code>.
 </p>
@@ -7846,7 +7848,7 @@ Windows <code>select.list()</code> widget).
 
 
 <ul>
-<li> <p><CODE>configure</CODE> will be able to find a usable
+<li> <p><code>configure</code> will be able to find a usable
 <code>libtiff</code> in some rare circumstances where it did not
 previously (where <code>libtiff</code> needed to be linked explicitly against
 <code>-ljpeg</code>).
@@ -7867,7 +7869,7 @@ with <code>hyperref 6.79d</code> and later.
 <li><p> The <code>extended</code> argument is deprecated in
 <code>strsplit()</code>, <code>grep()</code>, <code>grepl()</code>, <code>sub()</code>,
 <code>gsub()</code>, <code>regexpr()</code> and <code>gregexpr()</code> (not just
-the value <code>extended = FALSE</code>) and will be removed in <font face="Courier New,Courier" color="#666666"><b>R</b></font>
+the value <code>extended = FALSE</code>) and will be removed in <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span>
 2.11.0.
 </p>
 </li></ul>
@@ -7922,13 +7924,13 @@ log-scale, e.g., for <code>plot(c(1,300), c(1,300), log="xy");
 </p>
 </li>
 <li> <p><code>detach()</code>/<code>unloadNamespace()</code> arrange to flush
-the package's lazyload cache of <font face="Courier New,Courier" color="#666666"><b>R</b></font> objects once the
+the package's lazyload cache of <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> objects once the
 package/namespace is no longer needed.
 </p>
 </li>
 <li><p> There have been small fixes to the rendering of help,
-e.g. <code>\command</code> is now rendered verbatim (so e.g. <code>--</code>
-is not interpreted, <a href="https://bugs.R-project.org/bugzilla3/show_bug.cgi?id=14045">PR#14045</a>).
+e.g. <code>\command</code> is now rendered verbatim
+(so e.g. <code>--</code> is not interpreted, <a href="https://bugs.R-project.org/bugzilla3/show_bug.cgi?id=14045">PR#14045</a>).
 </p>
 <p>Also, there are many small changes to help files where the new
 converters were not rendering them in the same way as before.
@@ -7998,7 +8000,7 @@ than one for large values of <code>ncp</code>.
 </li>
 <li> <p><code>intToUtf8()</code> could fail when asked to produce 10Mb or more
 strings, something it was never intended to do: unfortunately
-Windows crashed <font face="Courier New,Courier" color="#666666"><b>R</b></font> (other OSes reported a lack of resources).
+Windows crashed <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> (other OSes reported a lack of resources).
 (<a href="https://bugs.R-project.org/bugzilla3/show_bug.cgi?id=14068">PR#14068</a>)
 </p>
 </li>
@@ -8014,7 +8016,7 @@ them is unloaded (by <code>unloadNamespace()</code> as well as by
 </li>
 <li><p> The internal record-keeping by
 <code>dyn.load</code>/<code>dyn.unload</code> was incomplete, which could
-crash <font face="Courier New,Courier" color="#666666"><b>R</b></font> if a DLL that registered <code>.External</code> routines had
+crash <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> if a DLL that registered <code>.External</code> routines had
 earlier been unloaded.
 </p>
 </li>
@@ -8069,7 +8071,7 @@ specified.  (<a href="https://bugs.R-project.org/bugzilla3/show_bug.cgi?id=14113
 
 
 
-<h3><img src="../help/figures/../../html/logo.jpg" alt="../../html/logo.jpg" /> CHANGES IN R VERSION 2.10.0</h3>
+<h3><img class="toplogo" src="../help/figures/../../html/Rlogo.svg" alt="[R logo]" /> CHANGES IN R VERSION 2.10.0</h3>
 
 
 
@@ -8077,13 +8079,13 @@ specified.  (<a href="https://bugs.R-project.org/bugzilla3/show_bug.cgi?id=14113
 
 
 <ul>
-<li><p> Package help is now converted from <code>Rd</code> by the <font face="Courier New,Courier" color="#666666"><b>R</b></font>-based
+<li><p> Package help is now converted from <code>Rd</code> by the <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span>-based
 converters that were first introduced in 2.9.0.  This means
 </p>
 
 <ul>
 <li><p> Packages that were installed by R-devel after 2009-08-09
-should not be used with earlier versions of <font face="Courier New,Courier" color="#666666"><b>R</b></font>, and most
+should not be used with earlier versions of <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span>, and most
 aspects of package help (including the runnable examples)
 will be missing if they are so used.
 </p>
@@ -8091,7 +8093,7 @@ will be missing if they are so used.
 <li><p> Text, HTML and latex help and examples for packages
 installed under the new system are converted on-demand from
 stored parsed Rd files.  (Conversions stored in packages
-installed under <font face="Courier New,Courier" color="#666666"><b>R</b></font> < 2.10.0 are used if no parsed Rd files
+installed under <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> < 2.10.0 are used if no parsed Rd files
 are found.  It is recommended that such packages be
 re-installed.)
 </p>
@@ -8099,7 +8101,7 @@ re-installed.)
 
 </li>
 <li><p> HTML help is now generated dynamically using an HTTP server
-running in the <font face="Courier New,Courier" color="#666666"><b>R</b></font> process and listening on the loopback
+running in the <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> process and listening on the loopback
 interface.
 </p>
 
@@ -8151,7 +8153,7 @@ debugging, from a code suggestion by John Brzustowski.
 </p>
 </li>
 <li> <p><code>[g]sub(perl=TRUE)</code> now also supports <code>"\E"</code>
-in order to <STRONG>end</STRONG> <code>"\U"</code> and <code>"\L"</code> case changes,
+in order to <strong>end</strong> <code>"\U"</code> and <code>"\L"</code> case changes,
 thanks to a patch from Bill Dunlap.
 </p>
 </li>
@@ -8185,7 +8187,7 @@ or <code>contriburl</code>).
 </li>
 <li> <p><code>available.packages()</code> by default only returns
 information on the latest versions of packages whose version
-requirements are satisfied by the currently running <font face="Courier New,Courier" color="#666666"><b>R</b></font>.
+requirements are satisfied by the currently running <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span>.
 </p>
 </li>
 <li> <p><code>tools::write_PACKAGES()</code> has a new argument
@@ -8225,7 +8227,7 @@ optionally use continuity correction when not computing exact
 p-values.  (The Kendall case is the wish of <a href="https://bugs.R-project.org/bugzilla3/show_bug.cgi?id=13691">PR#13691</a>.)
 </p>
 </li>
-<li> <p><font face="Courier New,Courier" color="#666666"><b>R</b></font> now keeps track of line numbers during execution for code
+<li> <p><span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> now keeps track of line numbers during execution for code
 sourced with <code>options(keep.source = TRUE)</code>.  The source
 reference is displayed by debugging functions such as
 <code>traceback()</code>, <code>browser()</code>, <code>recover()</code>, and
@@ -8246,7 +8248,7 @@ work correctly.
 <code>"POSIXct"</code> and <code>"POSIXlt"</code> methods.
 </p>
 </li>
-<li><p> Naming subscripts (e.g. <code>x[i=1, j=2]</code>) in
+<li><p> Naming subscripts (e.g., <code>x[i=1, j=2]</code>) in
 <code>data.frame</code> methods for <code>[</code> and <code>[[</code> now gives a
 warning.  (Names are ignored in the default method, but could
 have odd semantics for other methods, and do for the data.frame
@@ -8266,7 +8268,7 @@ zeros.  This change also renders levels construction in
 <li> <p><code>codocClasses()</code>, which checks consistency of the
 documentation of S4 class slots, now does so in considerably more
 cases.  The documentation of inherited slots (from superclasses)
-is now optional.  This affects <CODE>R CMD check <pkg></CODE> when
+is now optional.  This affects <code>R CMD check <pkg></code> when
 the package defines S4 classes.
 </p>
 </li>
@@ -8293,7 +8295,7 @@ user-contributed methods.
 </p>
 </li>
 <li><p> The function <code>aspell()</code> has been added to provide an
-interface to the <CODE>Aspell</CODE> spell-checker.
+interface to the <code>Aspell</code> spell-checker.
 </p>
 </li>
 <li><p> Filters <code>RdTextFilter()</code> and <code>SweaveTeXFilter()</code>
@@ -8302,7 +8304,7 @@ have been added to the tools package to provide support for
 </p>
 </li>
 <li> <p><code>xtabs()</code> with the new argument <code>sparse = TRUE</code>
-now returns a sparse Matrix, using package <a href="http://CRAN.R-project.org/package=Matrix"><span class="pkg">Matrix</span></a>.
+now returns a sparse Matrix, using package <a href="https://CRAN.R-project.org/package=Matrix"><span class="pkg">Matrix</span></a>.
 </p>
 </li>
 <li> <p><code>contr.sum()</code> etc gain an argument <code>sparse</code>
@@ -8342,7 +8344,7 @@ all methods are debugged as well.
 </p>
 </li>
 <li><p> File ‘<span class="file">NEWS</span>’ is now in UTF-8, and has a BOM (often
-invisible) on the first line, and <CODE>Emacs</CODE> local variables
+invisible) on the first line, and <code>Emacs</code> local variables
 set for UTF-8 at the end.  <code>RShowDoc("NEWS")</code> should display
 this correctly, given suitable fonts.
 </p>
@@ -8352,7 +8354,7 @@ the LHS and so preserves non-standard responses such as <code>`a:
        b`</code> (requested by Sundar Dorai-Raj).
 </p>
 </li>
-<li><p> New function <code>news()</code> for building and querying <font face="Courier New,Courier" color="#666666"><b>R</b></font> or
+<li><p> New function <code>news()</code> for building and querying <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> or
 package news information.
 </p>
 </li>
@@ -8392,7 +8394,7 @@ are now available for package management computations.
 </li>
 <li> <p><code>"\uxxxx"</code> and <code>"\Uxxxxxxxx"</code> escapes can now be
 parsed to a UTF-8 encoded string even in non-UTF-8 locales (this
-has been implemented on Windows since <font face="Courier New,Courier" color="#666666"><b>R</b></font> 2.7.0).  The semantics
+has been implemented on Windows since <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> 2.7.0).  The semantics
 have been changed slightly: a string containing such escapes is
 always stored in UTF-8 (and hence is suitable for portably
 including Unicode text in packages).
@@ -8411,11 +8413,11 @@ to determine how input strings with marked encodings will be
 handled.
 </p>
 </li>
-<li> <p><CODE>R CMD Rd2pdf</CODE> is available as a shortcut for
-<CODE>R CMD Rd2dvi --pdf</CODE>.
+<li> <p><code>R CMD Rd2pdf</code> is available as a shortcut for
+<code>R CMD Rd2dvi --pdf</code>.
 </p>
 </li>
-<li> <p><CODE>R CMD check</CODE> now checks links where a package is
+<li> <p><code>R CMD check</code> now checks links where a package is
 specified (<code>\link[pkg]{file}</code> or
 <code>\link[pkg:file]{topic}</code>), if the package is available.
 It notes if the package is not available, as in many cases this
@@ -8494,7 +8496,7 @@ the format of ‘<span class="file">.rda</span>’/‘<span class="f
 re-save them in a different compressed format, including choosing
 the most compact format available.
 </p>
-<p>A new <CODE>INSTALL</CODE> option, <span class="option">--resave-data</span>, makes use
+<p>A new <code>INSTALL</code> option, <span class="option">--resave-data</span>, makes use
 of this.
 </p>
 </li>
@@ -8547,7 +8549,7 @@ already did).
 <li><p> A different regular expression engine is used for basic and
 extended regexps and is also for approximate matching.  This is
 based on the TRE library of Ville Laurikari, a modified copy of
-which is included in the <font face="Courier New,Courier" color="#666666"><b>R</b></font> sources.
+which is included in the <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> sources.
 </p>
 <p>This is often faster, especially in a MBCS locale.
 </p>
@@ -8645,7 +8647,7 @@ it always was for Compiled HTML help on Windows).
 </p>
 </li>
 <li><p> It is possible to ask for static HTML pages to be prebuilt
-<EM>via</EM> the configure option <span class="option">--enable-prebuilt-html</span>.  This
+<em>via</em> the configure option <span class="option">--enable-prebuilt-html</span>.  This
 may be useful for those who wish to make HTML help available
 outside R, e.g. on a local web site.
 </p>
@@ -8696,12 +8698,12 @@ equivalent object.
 </p>
 </li>
 <li> <p><code>parse_Rd()</code> was incorrectly handling multiple backslashes in
-<font face="Courier New,Courier" color="#666666"><b>R</b></font> code strings, converting 4n+3 backslashes to 2n+1 instead
+<span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> code strings, converting 4n+3 backslashes to 2n+1 instead
 of 2n+2.
 </p>
 </li>
 <li> <p><code>parse_Rd()</code> now recognizes the <code>\var</code> tag within
-a quoted string in <font face="Courier New,Courier" color="#666666"><b>R</b></font>-like text.
+a quoted string in <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span>-like text.
 </p>
 </li>
 <li> <p><code>parse_Rd()</code> now treats the argument of
@@ -8717,7 +8719,7 @@ a quoted string in <font face="Courier New,Courier" color="#666666"><b>R</b></fo
 
 <ul>
 <li><p> New function <code>untar()</code> to list or unpack tar archives,
-possibly compressed.  This uses either an external <CODE>tar</CODE>
+possibly compressed.  This uses either an external <code>tar</code>
 command or an internal implementation.
 </p>
 </li>
@@ -8735,33 +8737,33 @@ the amount of effort put into compression when writing.
 </p>
 </li>
 <li><p> New function <code>xzfile()</code> for use with
-<CODE>xz</CODE>-compressed files.  (This can also read files
-compressed by some versions of <CODE>lzma</CODE>.)
+<code>xz</code>-compressed files.  (This can also read files
+compressed by some versions of <code>lzma</code>.)
 </p>
 </li>
 <li> <p><code>gzfile()</code> looks at the file header and so can now also
-read <CODE>bzip2</CODE>-ed files and <CODE>xz</CODE>-compressed files.
+read <code>bzip2</code>-ed files and <code>xz</code>-compressed files.
 </p>
 </li>
 <li><p> There are the new options of <code>save(compress = "bzip2")</code>
-and <code>"xz"</code> to use <CODE>bzip2</CODE> or <CODE>xz</CODE>
+and <code>"xz"</code> to use <code>bzip2</code> or <code>xz</code>
 compression (which will be slower, but can give substantially
 smaller files).  Argument <code>compression_level</code> gives finer
 control over the space/time tradeoffs.
 </p>
-<p><code>load()</code> can read such saves (but only as from this version of <font face="Courier New,Courier" color="#666666"><b>R</b></font>).
+<p><code>load()</code> can read such saves (but only as from this version of <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span>).
 </p>
 </li>
-<li> <p><CODE>R CMD INSTALL</CODE>/<CODE>check</CODE> and
+<li> <p><code>R CMD INSTALL</code>/<code>check</code> and
 <code>tools::writePACKAGES</code> accept a wider range of compressed
 tar archives.  Precisely how wide depends on the capabilities of
-the host system's <CODE>tar</CODE> command: they almost always
-include <CODE>.tar.bz2</CODE> archives, and with modern versions of
-<CODE>tar</CODE> other forms of compression such as <CODE>lzma</CODE>
-and <CODE>xz</CODE>, and arbitrary extensions.
+the host system's <code>tar</code> command: they almost always
+include <code>.tar.bz2</code> archives, and with modern versions of
+<code>tar</code> other forms of compression such as <code>lzma</code>
+and <code>xz</code>, and arbitrary extensions.
 </p>
 </li>
-<li> <p><CODE>R CMD INSTALL</CODE> has a new option
+<li> <p><code>R CMD INSTALL</code> has a new option
 <span class="option">--data-compress</span> to control the compression used when
 lazy-loading data.  New possibilities are
 <span class="option">--data-compress=bzip2</span> which will give ca 15% better
@@ -8769,14 +8771,14 @@ compression at the expense of slower installation times, and
 <span class="option">--data-compress=xz</span>, often giving even better compression
 on large datasets at the expense of much longer installation
 times.  (The latter is used for the recommended packages: it is
-particularly effective for <a href="http://CRAN.R-project.org/package=survival"><span class="pkg">survival</span></a>.)
+particularly effective for <a href="https://CRAN.R-project.org/package=survival"><span class="pkg">survival</span></a>.)
 </p>
 </li>
 <li> <p><code>file()</code> for open = <code>""</code>, <code>"r"</code> or
 <code>"rt"</code> will automagically detect compressed files (from
-<CODE>gzip</CODE>, <CODE>bzip2</CODE> or <CODE>xz</CODE>).  This means
+<code>gzip</code>, <code>bzip2</code> or <code>xz</code>).  This means
 that compressed files can be specified by file name (rather than
-<EM>via</EM> a <code>gzfile()</code> connection) to <code>read.table()</code>,
+<em>via</em> a <code>gzfile()</code> connection) to <code>read.table()</code>,
 <code>readlines()</code>, <code>scan()</code> and so on.
 </p>
 </li>
@@ -8796,7 +8798,7 @@ that compressed files can be specified by file name (rather than
 recognized.
 </p>
 </li>
-<li> <p><code>tools::Rd_parse()</code> is defunct (as this version of <font face="Courier New,Courier" color="#666666"><b>R</b></font>
+<li> <p><code>tools::Rd_parse()</code> is defunct (as this version of <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span>
 uses only Rd version 2).
 </p>
 </li>
@@ -8847,27 +8849,27 @@ for cairo-based graphics devices (which remain optional).
 </li>
 <li><p> A suitable <code>iconv()</code> is now required: support for
 configure option <span class="option">--without-iconv</span> has been withdrawn (it
-was deprecated in <font face="Courier New,Courier" color="#666666"><b>R</b></font> 2.5.0).
+was deprecated in <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> 2.5.0).
 </p>
 </li>
-<li><p> Perl is no longer ‘essential’.  <font face="Courier New,Courier" color="#666666"><b>R</b></font> can be built
-without it, but scripts <CODE>R CMD build</CODE>, <CODE>check</CODE>,
-<CODE>Rprof</CODE> and <CODE>Sd2d</CODE> currently require it.
+<li><p> Perl is no longer ‘essential’.  <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> can be built
+without it, but scripts <code>R CMD build</code>, <code>check</code>,
+<code>Rprof</code> and <code>Sd2d</code> currently require it.
 </p>
 </li>
-<li><p> A system <CODE>glob</CODE> function is now essential (a working
-<code>Sys.glob()</code> has been assumed since <font face="Courier New,Courier" color="#666666"><b>R</b></font> 2.9.0 at least).
+<li><p> A system <code>glob</code> function is now essential (a working
+<code>Sys.glob()</code> has been assumed since <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> 2.9.0 at least).
 </p>
 </li>
 <li><p> C99 support for MBCS is now required, and configure option
 <span class="option">--disable-mbcs</span> has been withdrawn.
 </p>
 </li>
-<li><p> Having a version of <CODE>tar</CODE> capable of automagically
+<li><p> Having a version of <code>tar</code> capable of automagically
 detecting compressed archives is useful for
-<code>utils::untar()</code>, and so <CODE>gtar</CODE> (a common name for
-GNU <CODE>tar</CODE>) is preferred to <CODE>tar</CODE>: set environment
-variable <span class="env">TAR</span> to specify a particular <CODE>tar</CODE> command.
+<code>utils::untar()</code>, and so <code>gtar</code> (a common name for
+GNU <code>tar</code>) is preferred to <code>tar</code>: set environment
+variable <span class="env">TAR</span> to specify a particular <code>tar</code> command.
 </p>
 </li></ul>
 
@@ -8947,7 +8949,7 @@ containing <code>NA</code>s could cause a segfault.  Reported by Hervé
 Pagès.
 </p>
 </li>
-<li> <p><CODE>Rscript</CODE> could segfault if (by user error) its
+<li> <p><code>Rscript</code> could segfault if (by user error) its
 filename argument was missing.  Reported by Martin Morgan.
 </p>
 </li>
@@ -8966,11 +8968,11 @@ correctly when <code>z</code> was a complex vector.  Consequently,
 <code>str(z, ...)</code> also did not.  (<a href="https://bugs.R-project.org/bugzilla3/show_bug.cgi?id=13985">PR#13985</a>)
 </p>
 </li>
-<li> <p><CODE>make distclean</CODE> removed too many files in
+<li> <p><code>make distclean</code> removed too many files in
 <code>etc/</code> if builddir = srcdir.
 </p>
 </li>
-<li> <p><CODE>R CMD</CODE> replaced <code>TEXINPUTS</code> rather than
+<li> <p><code>R CMD</code> replaced <code>TEXINPUTS</code> rather than
 appending to it (as documented and intended).
 </p>
 </li>
@@ -8993,8 +8995,8 @@ the <code>CHARSXP</code> cache.
 
 <h3>OLDER NEWS</h3>
 
-<p>News for <font face="Courier New,Courier" color="#666666"><b>R</b></font> 2.9.2 patched and earlier can be found in top-level files
-such as ‘<span class="file">NEWS.2</span>’.
+<p>News for <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> 2.9.2 patched and earlier can be found in files
+such as ‘<span class="file">NEWS.2</span>’ in the ‘<span class="file">doc</span>’ directory.
 </p>
 
 
diff --git a/doc/html/NEWS.html b/doc/html/NEWS.html
index 24442c9..0de1b3c 100644
--- a/doc/html/NEWS.html
+++ b/doc/html/NEWS.html
@@ -1,14 +1,4222 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-<html><head><title>R: R News</title>
-<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
-<link rel="stylesheet" type="text/css" href="R.css">
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><title>R: R News</title>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+<link rel="stylesheet" type="text/css" href="R.css" />
 </head><body>
 
-<table width="100%" summary="page for NEWS"><tr><td>NEWS</td><td align="right">R Documentation</td></tr></table>
+<table width="100%" summary="page for NEWS"><tr><td>NEWS</td><td style="text-align: right;">R Documentation</td></tr></table>
 
 <h2>R News</h2>
 
-<h3><img src="../help/figures/../../html/logo.jpg" alt="../../html/logo.jpg" /> CHANGES IN R 3.1.2</h3>
+<h3><img src="../help/figures/../../html/Rlogo.svg" class="toplogo" alt="[R logo]" /> CHANGES IN R 3.4.0</h3>
+
+
+
+<h4>SIGNIFICANT USER-VISIBLE CHANGES</h4>
+
+
+<ul>
+<li><p> (Unix-alike)
+The default methods for <code>download.file()</code> and <code>url()</code>
+now choose <code>"libcurl"</code> except for <span class="samp">file://</span>
+URLs.  There will be small changes in the format and wording of
+messages, including in rare cases if an issue is a warning or an
+error.  For example, when HTTP re-direction occurs, some messages
+refer to the final URL rather than the specified one.
+</p>
+<p>Those who use proxies should check that their settings are
+compatible (see <code>?download.file</code>: the most commonly used
+forms work for both <code>"internal"</code> and <code>"libcurl"</code>).
+</p>
+</li>
+<li> <p><code>table()</code> has been amended to be more internally
+consistent and become back compatible to <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> <i><=</i> 2.7.2
+again.  Consequently, <code>table(1:2, exclude = NULL)</code> no longer
+contains a zero count for <code><NA></code>, but <code>useNA = "always"</code>
+continues to do so.
+</p>
+</li>
+<li> <p><code>summary.default()</code> no longer rounds, but its print
+method does resulting in less extraneous rounding, notably of
+numbers in the ten thousands.
+</p>
+</li>
+<li> <p><code>factor(x, exclude = L)</code> behaves more rationally when
+<code>x</code> or <code>L</code> are character vectors.  Further,
+<code>exclude = <factor></code> now behaves as documented for long.
+</p>
+</li>
+<li><p> Arithmetic, logic (<code>&</code>, <code>|</code>) and comparison (aka
+‘relational’, e.g., <code><</code>, <code>==</code>) operations with
+arrays now behave consistently, notably for arrays of length zero.
+</p>
+<p>Arithmetic between length-1 arrays and longer non-arrays had
+silently dropped the array attributes and recycled.  This now
+gives a warning and will signal an error in the future, as it has
+always for logic and comparison operations in these cases (e.g.,
+compare <code>matrix(1,1) + 2:3</code> and <code>matrix(1,1) < 2:3</code>).
+</p>
+</li>
+<li><p> The JIT (‘Just In Time’) byte-code compiler is now
+enabled by default at its level 3. This means functions will be
+compiled on first or second use and top-level loops will be
+compiled and then run.  (Thanks to Tomas Kalibera for extensive
+work to make this possible.)
+</p>
+<p>For now, the compiler will not compile code containing explicit
+calls to <code>browser()</code>: this is to support single stepping from
+the <code>browser()</code> call.
+</p>
+<p>JIT compilation can be disabled for the rest of the session using
+<code>compiler::enableJIT(0)</code> or by setting environment variable
+<span class="env">R_ENABLE_JIT</span> to <code>0</code>.
+</p>
+</li>
+<li> <p><code>xtabs()</code> works more consistently with <code>NA</code>s, also
+in its result no longer setting them to <code>0</code>.  Further, a new
+logical option <code>addNA</code> allows to count <code>NA</code>s where
+appropriate.  Additionally, for the case <code>sparse = TRUE</code>, the
+result's <code>dimnames</code> are identical to the default case's.
+</p>
+</li>
+<li><p> Matrix products now consistently bypass BLAS when the inputs
+have <code>NaN</code>/<code>Inf</code> values. Performance of the check of
+inputs has been improved. Performance when BLAS is used is
+improved for matrix/vector and vector/matrix multiplication (DGEMV
+is now used instead of DGEMM).
+</p>
+<p>One can now choose from alternative matrix product implementations
+<em>via</em> <code>options(matprod = )</code>.  The <code>"internal"</code>
+implementation is not optimized for speed but consistent in
+precision with other summations in R (using <code>long double</code>
+accumulators where available).  <code>"blas"</code> calls BLAS directly
+for best speed, but usually with undefined behavior for inputs
+with <code>NaN</code>/<code>Inf</code>.
+</p>
+</li>
+<li> <p><code>factor()</code> now uses <code>order()</code> to sort its levels,
+not <code>sort.list()</code>. This makes <code>factor()</code> support custom
+vector-like objects if methods for the appropriate generics are
+defined. This change has the side effect of making <code>factor()</code>
+succeed on empty or length-one non-atomic vector(-like) types (e.g.,
+list), where it failed before.
+</p>
+</li></ul>
+
+
+
+
+<h4>NEW FEATURES</h4>
+
+
+<ul>
+<li><p> User errors such as <code>integrate(f, 0:1, 2)</code> are now caught.
+</p>
+</li>
+<li><p> Add <code>signature</code> argument to <code>debug()</code>,
+<code>debugonce()</code>, <code>undebug()</code> and <code>isdebugged()</code> for
+more conveniently debugging S3 and S4 methods.  (Based on a patch by
+Gabe Becker.)
+</p>
+</li>
+<li><p> Add <code>utils::debugcall()</code> and
+<code>utils::undebugcall()</code> for debugging the function that would
+be called by evaluating the given expression. When the call is to
+an S4 generic or standard S3 generic, <code>debugcall()</code> debugs the
+method that would be dispatched. A number of internal utilities
+were added to support this, most notably
+<code>utils::isS3stdGeneric()</code>.  (Based on a patch by Gabe Becker.)
+</p>
+</li>
+<li><p> Add <code>utils::strcapture()</code>. Given a character vector and
+a regular expression containing capture expressions,
+<code>strcapture()</code> will extract the captured tokens into a
+tabular data structure, typically a <code>data.frame</code>.
+</p>
+</li>
+<li> <p><code>str()</code> and <code>strOptions()</code> get a new option
+<code>drop.deparse.attr</code> with improved but <em>changed</em> default
+behaviour for expressions.  For <code>expression</code> objects
+<code>x</code>, <code>str(x)</code> now may remove extraneous white space and
+truncate long lines.
+</p>
+</li>
+<li> <p><code>str(<looooooooong_string>)</code> is no longer very slow;
+inspired by Mikko Korpela's proposal in <a href="https://bugs.R-project.org/bugzilla3/show_bug.cgi?id=16527">PR#16527</a>.
+</p>
+</li>
+<li> <p><code>str(x)</code>'s default method is more “accurate” and
+hence somewhat more generous in displaying character vectors; this
+will occasionally change <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> outputs (and need changes to some
+‘<span class="file">*.Rout(.save)</span>’ files).
+<br /> 
+For a classed integer vector such as <code>x <- xtabs(~ c(1,9,9,9))</code>,
+<code>str(x)</code> now shows both the class and <code>"int"</code>, instead
+of only the latter.
+</p>
+</li>
+<li> <p><code>isSymmetric(m)</code> is much faster for large asymmetric
+matrices <code>m</code> <em>via</em> pre-tests and a new option <code>tol1</code>
+(with which strict back compatibility is possible but not the
+default).
+</p>
+</li>
+<li><p> The result of <code>eigen()</code> now is of class <code>"eigen"</code>
+in the default case when eigenvectors are computed.
+</p>
+</li>
+<li><p> Zero-length date and date-time objects (of classes
+<code>"POSIX[cl]?t"</code>) now <code>print()</code> “recognizably”.
+</p>
+</li>
+<li> <p><code>xy.coords()</code> and <code>xyz.coords()</code> get a new
+<code>setLab</code> option.
+</p>
+</li>
+<li><p> The <code>method</code> argument of <code>sort.list()</code>,
+<code>order()</code> and <code>sort.int()</code> gains an <code>"auto"</code> option
+(the default) which should behave the same as before when
+<code>method</code> was not supplied.
+</p>
+</li>
+<li> <p><code>stopifnot(E, ..)</code> now reports differences when
+<code>E</code> is a call to <code>all.equal()</code> and that is not true.
+</p>
+</li>
+<li> <p><code>boxplot(<formula>, *)</code> gain optional arguments
+<code>drop</code>, <code>sep</code>, and <code>lex.order</code> to pass to
+<code>split.default()</code> which itself gains an argument
+<code>lex.order</code> to pass to <code>interaction()</code> for more
+flexibility.
+</p>
+</li>
+<li><p> The <code>plot()</code> method for <code>ppr()</code> has enhanced
+default labels (<code>xmin</code> and <code>main</code>).
+</p>
+</li>
+<li> <p><code>sample.int()</code> gains an explicit <code>useHash</code> option
+(with a back compatible default).
+</p>
+</li>
+<li> <p><code>identical()</code> gains an <code>ignore.srcref</code> option
+which drops <code>"srcref"</code> and similar attributes when true (as
+by default).
+</p>
+</li>
+<li> <p><code>diag(x, nrow = n)</code> now preserves <code>typeof(x)</code>, also
+for logical, integer and raw <code>x</code> (and as previously for
+complex and numeric).
+</p>
+</li>
+<li> <p><code>smooth.spline()</code> now allows direct specification of
+<code>lambda</code>, gets a <code>hatvalues()</code> method and keeps
+<code>tol</code> in the result, and optionally parts of the internal
+matrix computations.
+</p>
+</li>
+<li> <p><code>addNA()</code> is faster now, e.g. when applied twice.
+(Part of <a href="https://bugs.R-project.org/bugzilla3/show_bug.cgi?id=16895">PR#16895</a>.)
+</p>
+</li>
+<li><p> New option <code>rstandard(<lm>, type = "predicted")</code>
+provides the “PRESS”–related leave-one-out
+cross-validation errors for linear models.
+</p>
+</li>
+<li><p> After seven years of deprecation, duplicated factor levels
+now produce a warning when printed and an error in <code>levels<-</code>
+instead of a warning.
+</p>
+</li>
+<li><p> Invalid factors, e.g., with duplicated levels (invalid but
+constructable) now give a warning when printed, <em>via</em> new
+function <code>.valid.factor()</code>.
+</p>
+</li>
+<li> <p><code>sessionInfo()</code> has been updated for Apple's change in
+OS naming as from ‘10.12’ (‘macOS Sierra’ <em>vs</em>
+‘OS X El Capitan’).
+</p>
+<p>Its <code>toLatex()</code> method now includes the <code>running</code>
+component.
+</p>
+</li>
+<li> <p><code>options(interrupt=)</code> can be used to specify a default
+action for user interrupts.  For now, if this option is not set
+and the <code>error</code> option is set, then an unhandled user
+interrupt invokes the <code>error</code> option.  (This may be dropped in
+the future as <code>interrupt</code> conditions are not <code>error</code>
+conditions.)
+</p>
+</li>
+<li><p> In most cases user interrupt handlers will be called with a
+<code>"resume"</code> restart available.  Handlers can invoke this
+restart to resume computation. At the browser prompt the <code>r</code>
+command will invoke a <code>"resume"</code> restart if one is
+available. Some read operations cannot be resumed properly when
+interrupted and do not provide a <code>"resume"</code> restart.
+</p>
+</li>
+<li><p> Radix sort is now chosen by <code>method = "auto"</code> for
+<code>sort.int()</code> for double vectors (and hence used for
+<code>sort()</code> for unclassed double vectors), excluding
+‘long’ vectors.
+</p>
+<p><code>sort.int(method = "radix")</code> no longer rounds double vectors.
+</p>
+</li>
+<li><p> The <code>default</code> and <code>data.frame</code> methods for
+<code>stack()</code> preserve the names of empty elements in the levels
+of the <code>ind</code> column of the return value.  Set the new
+<code>drop</code> argument to <code>TRUE</code> for the previous behavior.
+</p>
+</li>
+<li><p> Speedup in <code>simplify2array()</code> and hence <code>sapply()</code> and
+<code>mapply()</code> (for the case of names and common length > 1),
+thanks to Suharto Anggono's <a href="https://bugs.R-project.org/bugzilla3/show_bug.cgi?id=17118">PR#17118</a>.
+</p>
+</li>
+<li> <p><code>table(x, exclude = NULL)</code> now sets
+<code>useNA = "ifany"</code> (instead of <code>"always"</code>).
+Together with the bug fixes for this case, this recovers more
+consistent behaviour  compatible to older versions of <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span>.  As
+a consequence, <code>summary()</code> for a logical vector no longer
+reports (zero) counts for <code>NA</code> when there are no <code>NA</code>s.
+</p>
+</li>
+<li> <p><code>dump.frames()</code> gets a new option
+<code>include.GlobalEnv</code> which allows to also dump the global
+environment, thanks to Andreas Kersting's proposal in <a href="https://bugs.R-project.org/bugzilla3/show_bug.cgi?id=17116">PR#17116</a>.
+</p>
+</li>
+<li> <p><code>system.time()</code> now uses <code>message()</code> instead of
+<code>cat()</code> when terminated early, such that
+<code>suppressMessages()</code> has an effect; suggested by Ben Bolker.
+</p>
+</li>
+<li> <p><code>citation()</code> supports ‘<span class="file">inst/CITATION</span>’ files from
+package source trees, with <code>lib.loc</code> pointing to the
+directory containing the package.
+</p>
+
+
+
+</li>
+<li> <p><code>try()</code> gains a new argument <code>outFile</code> with a
+default that can be modified <em>via</em>
+<code>options(try.outFile = .)</code>, useful notably for <code>Sweave</code>.
+</p>
+</li>
+<li><p> The unexported low-level functions in package <span class="pkg">parallel</span>
+for passing serialized <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> objects to and from forked children now
+support long vectors on 64-bit platforms.  This removes some
+limits on higher-level functions such as <code>mclapply()</code> (but
+returning gigabyte results from forked processes <em>via</em>
+serialization should be avoided if at all possible).
+</p>
+</li>
+<li><p> Connections now <code>print()</code> without error even if
+invalid, e.g. after having been destroyed.
+</p>
+</li>
+<li> <p><code>apropos()</code> and <code>find(simple.words = FALSE)</code> no
+longer match object names starting with <span class="samp">.</span> which are known
+to be internal objects (such as <code>.__S3MethodsTable__.</code>).
+</p>
+</li>
+<li><p> Convenience function <code>hasName()</code> has been added; it
+is intended to replace the common idiom <code>!is.null(x$name)</code>
+without the usually unintended partial name matching.
+</p>
+</li>
+<li> <p><code>strcapture()</code> no longer fixes column names nor coerces
+strings to factors (suggested by Bill Dunlap).
+</p>
+</li>
+<li> <p><code>strcapture()</code> returns <code>NA</code> for non-matching
+values in <code>x</code> (suggested by Bill Dunlap).
+</p>
+</li>
+<li> <p><code>source()</code> gets new optional arguments, notably
+<code>exprs</code>; this is made use of in the new utility function
+<code>withAutoprint()</code>.
+</p>
+</li>
+<li> <p><code>sys.source()</code> gets a new <code>toplevel.env</code> argument.
+This argument is useful for frameworks running package tests;
+contributed by Tomas Kalibera.
+</p>
+</li>
+<li> <p><code>Sys.setFileTime()</code> and
+<code>file.copy(copy.date = TRUE)</code> will set timestamps with
+fractions of seconds on platforms/filesystems which support this.
+</p>
+</li>
+<li><p> (Windows only.) <code>file.info()</code> now returns file
+timestamps including fractions of seconds; it has done so on other
+platforms since <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> 2.14.0.  (NB: some filesystems do not
+record modification and access timestamps to sub-second
+resolution.)
+</p>
+</li>
+<li><p> The license check enabled by
+<code>options(checkPackageLicense = TRUE)</code> is now done when the
+package's namespace is first loaded.
+</p>
+</li>
+<li> <p><code>ppr()</code> and <code>supsmu()</code> get an optional
+<code>trace</code> argument, and <code>ppr(.., sm.method = ..spline)</code> is
+no longer limited to sample size <i>n <= 2500</i>.
+</p>
+</li>
+<li><p> The <code>POSIXct</code> method for <code>print()</code> gets optional
+<code>tz</code> and <code>usetz</code> arguments, thanks to a report from
+Jennifer S. Lyon.
+</p>
+</li>
+<li><p> New function <code>check_packages_in_dir_details()</code> in
+package <span class="pkg">tools</span> for analyzing package-check log files to
+obtain check details.
+</p>
+</li>
+<li><p> Package <span class="pkg">tools</span> now exports function
+<code>CRAN_package_db()</code> for obtaining information about current
+packages in the <acronym><span class="acronym">CRAN</span></acronym> package repository, and several
+functions for obtaining the check status of these packages.
+</p>
+</li>
+<li><p> The (default) Stangle driver <code>Rtangle</code> allows
+<code>annotate</code> to be a function and gets a new
+<code>drop.evalFALSE</code> option.
+</p>
+</li>
+<li><p> The default method for <code>quantile(x, prob)</code> should now
+be monotone in <code>prob</code>, even in border cases, see <a href="https://bugs.R-project.org/bugzilla3/show_bug.cgi?id=16672">PR#16672</a>.
+</p>
+</li>
+<li> <p><code>bug.report()</code> now tries to extract an email address
+from a <span class="samp">BugReports</span> field, and if there is none, from a
+<span class="samp">Contacts</span> field.
+</p>
+</li>
+<li><p> The <code>format()</code> and <code>print()</code> methods for
+<code>object.size()</code> results get new options <code>standard</code> and
+<code>digits</code>; notably, <code>standard = "IEC"</code> and
+<code>standard = "SI"</code> allow more standard (but less common)
+abbreviations than the default ones, e.g. for kilobytes.
+(From contributions by Henrik Bengtsson.)
+</p>
+</li>
+<li><p> If a reference class has a validity method,
+<code>validObject</code> will be called automatically from the
+default initialization method for reference classes.
+</p>
+</li>
+<li> <p><code>tapply()</code> gets new option <code>default = NA</code>
+allowing to change the previously hardcoded value.
+</p>
+</li>
+<li> <p><code>read.dcf()</code> now consistently interprets any
+‘whitespace’ to be stripped to include newlines.
+</p>
+</li>
+<li><p> The maximum number of DLLs that can be loaded into R
+e.g. <em>via</em> <code>dyn.load()</code> can now be increased by
+setting the environment variable <code>R_MAX_NUM_DLLS</code> before
+starting R.
+</p>
+</li>
+<li><p> Assigning to an element of a vector beyond the current
+length now over-allocates by a small fraction. The new vector is
+marked internally as growable, and the true length of the new
+vector is stored in the <code>truelength</code> field. This makes
+building up a vector result by assigning to the next element
+beyond the current length more efficient, though pre-allocating is
+still preferred.  The implementation is subject to change and not
+intended to be used in packages at this time.
+</p>
+</li>
+<li><p> Loading the <span class="pkg">parallel</span> package namespace no longer sets
+or changes the <code>.Random.seed</code>, even if <span class="env">R_PARALLEL_PORT</span>
+is unset.
+</p>
+<p>NB: This can break reproducibility of output, and did for a
+<acronym><span class="acronym">CRAN</span></acronym> package.
+</p>
+</li>
+<li><p> Methods <code>"wget"</code> and <code>"curl"</code> for
+<code>download.file()</code> now give an <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> error rather than a non-zero
+return value when the external command has a non-zero status.
+</p>
+</li>
+<li><p> Encoding name <code>"utf8"</code> is mapped to <code>"UTF-8"</code>.
+Many implementations of <code>iconv</code> accept <code>"utf8"</code>, but not
+GNU <span class="pkg">libiconv</span> (including the late 2016 version 1.15).
+</p>
+</li>
+<li> <p><code>sessionInfo()</code> shows the full paths to the library or
+executable files providing the BLAS/LAPACK implementations
+currently in use (not available on Windows).
+</p>
+</li>
+<li><p> The binning algorithm used by bandwidth selectors
+<code>bw.ucv()</code>, <code>bw.bcv()</code> and <code>bw.SJ()</code> switches to a
+version linear in the input size <code>n</code> for <code>n > nb/2</code>.
+(The calculations are the same, but for larger <code>n/nb</code> it is
+worth doing the binning in advance.)
+</p>
+</li>
+<li><p> There is a new option <code>PCRE_study</code> which controls when
+<code>grep(perl = TRUE)</code> and friends ‘study’ the compiled
+pattern.  Previously this was done for 11 or more input strings:
+it now defaults to 10 or more (but most examples need many more
+for the difference from studying to be noticeable).
+</p>
+</li>
+<li> <p><code>grep(perl = TRUE)</code> and friends can now make use of
+PCRE's Just-In-Time mechanism, for PCRE <i>>=</i> 8.20 on
+platforms where JIT is supported.  It is used by default whenever
+the <code>pattern</code> is studied (see the previous item).  (Based on
+a patch from Mikko Korpela.)
+</p>
+<p>This is controlled by a new option <code>PCRE_use_JIT</code>.
+</p>
+<p>Note that in general this makes little difference to the speed,
+and may take a little longer: its benefits are most evident on
+strings of thousands of characters.  As a side effect it reduces
+the chances of C stack overflow in the PCRE library on very long
+strings (millions of characters, but see next item).
+</p>
+<p>Warning: segfaults were seen using PCRE with JIT enabled on 64-bit
+Sparc builds.
+</p>
+</li>
+<li><p> There is a new option <code>PCRE_limit_recursion</code> for
+<code>grep(perl = TRUE)</code> and friends to set a recursion limit
+taking into account <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span>'s estimate of the remaining C stack space
+(or 10000 if that is not available).  This reduces the chance of C
+stack overflow, but because it is conservative may report a
+non-match (with a warning) in examples that matched before.  By
+default it is enabled if any input string has 1000 or more bytes.
+(<a href="https://bugs.R-project.org/bugzilla3/show_bug.cgi?id=16757">PR#16757</a>)
+</p>
+</li>
+<li> <p><code>getGraphicsEvent()</code> now works on
+<code>X11(type = "cairo")</code> devices.  Thanks to Frederick Eaton (for
+reviving an earlier patch).
+</p>
+</li>
+<li><p> There is a new argument <code>onIdle</code> for
+<code>getGraphicsEvent()</code>, which allows an R function to be run
+whenever there are no pending graphics events.  This is currently
+only supported on X11 devices.  Thanks to Frederick Eaton.
+</p>
+</li>
+<li><p> The <code>deriv()</code> and similar functions now can compute
+derivatives of <code>log1p()</code>, <code>sinpi()</code> and similar
+one-argument functions, thanks to a contribution by Jerry Lewis.
+</p>
+</li>
+<li> <p><code>median()</code> gains a formal <code>...</code> argument, so
+methods with extra arguments can be provided.
+</p>
+</li>
+<li> <p><code>strwrap()</code> reduces <code>indent</code> if it is more than
+half <code>width</code> rather than giving an error.  (Suggested by Bill
+Dunlap.)
+</p>
+</li>
+<li><p> When the condition <code>code</code> in <code>if(.)</code> or
+<code>while(.)</code> is not of length one, an error instead of a
+warning may be triggered by setting an environment variable, see
+the help page.
+</p>
+</li>
+<li><p> Formatting and printing of bibliography entries
+(<code>bibentry</code>) is more flexible and better documented.  Apart
+from setting <code>options(citation.bibtex.max = 99)</code> you can also
+use <code>print(<citation>, bibtex=TRUE)</code> (or <code>format(..)</code>)
+to get the BibTeX entries in the case of more than one entry.
+This also affects <code>citation()</code>.
+Contributions to enable <code>style = "html+bibtex"</code> are welcome.
+</p>
+</li></ul>
+
+
+
+
+<h4>C-LEVEL FACILITIES</h4>
+
+
+<ul>
+<li><p> Entry points <code>R_MakeExternalPtrFn</code> and
+<code>R_ExternalPtrFn</code> are now declared in header
+‘<span class="file">Rinternals.h</span>’ to facilitate creating and retrieving an <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span>
+external pointer from a C function pointer without ISO C warnings
+about the conversion of function pointers.
+</p>
+</li>
+<li><p> There was an exception for the native Solaris C++ compiler
+to the dropping (in <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> 3.3.0) of legacy C++ headers from headers
+such as ‘<span class="file">R.h</span>’ and ‘<span class="file">Rmath.h</span>’ — this has now been
+removed.  That compiler has strict C++98 compliance hence does not
+include extensions in its (non-legacy) C++ headers: some
+packages will need to request C++11 or replace non-C++98 calls
+such as <code>lgamma</code>: see §1.6.4 of ‘Writing R Extensions’.
+</p>
+<p>Because it is needed by about 70 CRAN packages, headers ‘<span class="file">R.h</span>’
+and ‘<span class="file">Rmath.h</span>’ still declare </p>
+<pre>use namespace std;</pre>
+<p>when included on Solaris.
+</p>
+</li>
+<li><p> When included from C++, the <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> headers now use forms such as
+<code>std::FILE</code> directly rather than including the line </p>
+<pre>using std::FILE;</pre>
+<p>C++ code including these headers might be relying on the latter.
+</p>
+</li>
+<li><p> Headers ‘<span class="file">R_ext/BLAS.h</span>’ and ‘<span class="file">R_ext/Lapack.h</span>’ have
+many improved declarations including <code>const</code> for
+double-precision complex routines. <em>Inter alia</em> this avoids
+warnings when passing ‘string literal’ arguments from C++11
+code.
+</p>
+</li>
+<li><p> Headers for Unix-only facilities ‘<span class="file">R_ext/GetX11Image.h</span>’,
+‘<span class="file">R_ext/QuartzDevice.h</span>’ and ‘<span class="file">R_ext/eventloop.h</span>’ are no
+longer installed on Windows.
+</p>
+</li>
+<li><p> No-longer-installed headers ‘<span class="file">GraphicsBase.h</span>’,
+‘<span class="file">RGraphics.h</span>’, ‘<span class="file">Rmodules/RX11.h</span>’ and
+‘<span class="file">Rmodules/Rlapack.h</span>’ which had a LGPL license no longer do so.
+</p>
+</li>
+<li> <p><code>HAVE_UINTPTR_T</code> is now defined where appropriate by
+<code>Rconfig.h</code> so that it can be included before
+<code>Rinterface.h</code> when <code>CSTACK_DEFNS</code> is defined and a C
+compiler (not C++) is in use.  <code>Rinterface.h</code> now includes C
+header ‘<span class="file">stdint.h</span>’ or C++11 header ‘<span class="file">cstdint</span>’ where
+needed.
+</p>
+</li>
+<li><p> Package <span class="pkg">tools</span> has a new function
+<code>package_native_routine_registration_skeleton()</code> to assist
+adding native-symbol registration to a package.  See its help and
+§5.4.1 of ‘Writing R Extensions’ for how to use it.  (At
+the time it was added it successfully automated adding
+registration to over 90% of <acronym><span class="acronym">CRAN</span></acronym> packages which lacked
+it.  Many of the failures were newly-detected bugs in the
+packages, e.g. 50 packages called entry points with varying
+numbers of arguments and 65 packages called entry points not in
+the package.)
+
+
+</p>
+</li></ul>
+
+
+
+
+<h4>INSTALLATION on a UNIX-ALIKE</h4>
+
+
+<ul>
+<li> <p><code>readline</code> headers (and not just the library) are
+required unless configuring with <span class="option">--with-readline=no</span>.
+</p>
+</li>
+<li> <p><code>configure</code> now adds a compiler switch for C++11
+code, even if the compiler supports C++11 by default.  (This
+ensures that <code>g++</code> 6.x uses C++11 mode and not its default
+mode of C++14 with ‘GNU extensions’.)
+</p>
+<p>The tests for C++11 compliance are now much more comprehensive.
+For gcc < 4.8, the tests from R 3.3.0 are used in order to maintain
+the same behaviour on Linux distributions with long-term support.
+</p>
+</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>
+is specified with <span class="samp">CXX11STD</span>.
+</p>
+</li>
+<li> <p><code>configure</code> now tests for a C++14-compliant compiler
+by testing some basic features.  This by default tries flags for
+the compiler specified by <span class="samp">CXX11</span>, but an alternative compiler,
+options and standard can be specified by variables <span class="samp">CXX14</span>,
+<span class="samp">CXX14FLAGS</span> and <span class="samp">CXX14STD</span> (e.g., <span class="option">-std=gnu++14</span>).
+</p>
+</li>
+<li><p> There is a new macro <code>CXXSTD</code> to help specify the
+standard for C++ code, e.g. <span class="option">-std=c++98</span>.  This
+makes it easier to work with compilers which default to a later
+standard: for example, with <code>CXX=g++6 CXXSTD=-std=c++98</code>
+<code>configure</code> will select commands for <code>g++</code> 6.x
+which conform to C++11 and C++14 where specified but otherwise use
+C++98.
+</p>
+</li>
+<li><p> Support for the defunct IRIX and OSF/1 OSes and Alpha CPU
+has been removed.
+</p>
+</li>
+<li> <p><code>configure</code> checks that the compiler specified by
+<span class="samp">$CXX $CXXFLAGS</span> is able to compile C++ code.
+</p>
+</li>
+<li> <p><code>configure</code> checks for the required header
+‘<span class="file">sys/select.h</span>’ (or ‘<span class="file">sys/time.h</span>’ on legacy systems) and
+system call <code>select</code> and aborts if they are not found.
+</p>
+</li>
+<li><p> If available, the POSIX 2008 system call <code>utimensat</code>
+will be used by <code>Sys.setFileTime()</code> and
+<code>file.copy(copy.date = TRUE)</code>.  This may result in slightly
+more accurate file times.  (It is available on Linux and FreeBSD
+but not macOS.)
+
+</p>
+</li>
+<li><p> The minimum version requirement for <code>libcurl</code> has been
+reduced to 7.22.0, although at least 7.28.0 is preferred and
+earlier versions are little tested.  (This is to support Debian 7
+‘Wheezy’ LTS and Ubuntu ‘Precise’ 12.04 LTS,
+although the latter is close to end-of-life.)
+
+</p>
+</li>
+<li> <p><code>configure</code> tests for a C++17-compliant compiler.
+The tests are experimental and subject to change in the future.
+</p>
+</li></ul>
+
+
+
+
+<h4>INCLUDED SOFTWARE</h4>
+
+
+<ul>
+<li><p> (Windows only) Tcl/Tk version 8.6.4 is now included in the
+binary builds.  The ‘<span class="file">tcltk*.chm</span>’ help file is no longer
+included; please consult the online help at
+<a href="http://www.tcl.tk/man/">http://www.tcl.tk/man/</a> instead.
+</p>
+</li>
+<li><p> The version of LAPACK included in the sources has been
+updated to 3.7.0: no new routines have been added to <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span>.
+</p>
+</li></ul>
+
+
+
+
+<h4>PACKAGE INSTALLATION</h4>
+
+
+<ul>
+<li><p> There is support for compiling C++14 or C++17 code in
+packages on suitable platforms: see ‘Writing R Extensions’
+for how to request this.
+</p>
+</li>
+<li><p> The order of flags when <span class="samp">LinkingTo</span> other packages has
+been changed so their include directories come earlier, before
+those specified in <code>CPPFLAGS</code>.  This will only have an effect
+if non-system include directories are included with <span class="option">-I</span>
+flags in <code>CPPFLAGS</code> (and so not the default
+<code>-I/usr/local/include</code> which is treated as a system include
+directory on most platforms).
+
+
+</p>
+</li>
+<li><p> Packages which register native routines for <code>.C</code> or
+<code>.Fortran</code> need to be re-installed for this version (unless
+installed with R-devel SVN revision r72375 or later).
+</p>
+</li>
+<li><p> Make variables with names containing <code>CXX1X</code> are
+deprecated in favour of those using <code>CXX11</code>, but for the time
+being are still made available <em>via</em> file
+‘<span class="file">etc/Makeconf</span>’.  Packages using them should be converted to
+the new forms and made dependent on <span class="samp">R (>= 3.4.0)</span>.
+</p>
+</li></ul>
+
+
+
+
+<h4>UTILITIES</h4>
+
+
+<ul>
+<li><p> Running <code>R CMD check --as-cran</code> with
+<span class="env">_R_CHECK_CRAN_INCOMING_REMOTE_</span> false now skips tests that
+require remote access.  The remaining (local) tests typically
+run quickly compared to the remote tests.
+</p>
+</li>
+<li> <p><code>R CMD build</code> will now give priority to vignettes
+produced from files in the ‘<span class="file">vignettes</span>’ directory over those
+in the ‘<span class="file">inst/doc</span>’ directory, with a warning that the latter
+are being ignored.
+</p>
+</li>
+<li> <p><code>R CMD config</code> gains a <span class="option">--all</span> option for
+printing names and values of all basic configure variables.
+</p>
+<p>It now knows about all the variables used for the C++98, C++11 and
+C++14 standards.
+</p>
+</li>
+<li> <p><code>R CMD check</code> now checks that output files in
+‘<span class="file">inst/doc</span>’ are newer than the source files in ‘<span class="file">vignettes</span>’.
+</p>
+</li>
+<li><p> For consistency with other package subdirectories, files
+named ‘<span class="file">*.r</span>’ in the ‘<span class="file">tests</span>’ directory are now recognized
+as tests by <code>R CMD check</code>. (Wish of <a href="https://bugs.R-project.org/bugzilla3/show_bug.cgi?id=17143">PR#17143</a>.)
+</p>
+</li>
+<li> <p><code>R CMD build</code> and <code>R CMD check</code> now use the
+<em>union</em> of <span class="env">R_LIBS</span> and <code>.libPaths()</code>.  They may not
+be equivalent, e.g., when the latter is determined by
+<span class="env">R_PROFILE</span>.
+</p>
+</li>
+<li> <p><code>R CMD build</code> now preserves dates when it copies files
+in preparing the tarball.  (Previously on Windows it changed the
+dates on all files; on Unix, it changed some dates when installing
+vignettes.)
+</p>
+</li>
+<li><p> The new option <code>R CMD check --no-stop-on-test-error</code>
+allows running the remaining tests (under ‘<span class="file">tests/</span>’) even if
+one gave an error.
+</p>
+</li>
+<li><p> Check customization <em>via</em> environment variables to
+detect side effects of <code>.Call()</code> and <code>.External()</code> calls
+which alter their arguments is described in §8 of the ‘R
+Internals’ manual.
+</p>
+</li>
+<li> <p><code>R CMD check</code> now checks any <span class="samp">BugReports</span> field
+to be non-empty and a suitable single URL.
+</p>
+</li>
+<li> <p><code>R CMD check --as-cran</code> now NOTEs if the package
+does not register its native routines or does not declare its
+intentions on (native) symbol search.  (This will become a WARNING
+in due course.)
+</p>
+</li></ul>
+
+
+
+
+<h4>DEPRECATED AND DEFUNCT</h4>
+
+
+<ul>
+<li><p> (Windows only) Function <code>setInternet2()</code> is defunct.
+</p>
+</li>
+<li><p> Installation support for <code>readline</code> emulations based on
+<code>editline</code> (aka <code>libedit</code>) is deprecated.
+</p>
+</li>
+<li><p> Use of the C/C++ macro <span class="samp">NO_C_HEADERS</span> is defunct and
+silently ignored.
+</p>
+</li>
+<li> <p><code>unix.time()</code>, a traditional synonym for
+<code>system.time()</code>, has been deprecated.
+</p>
+</li>
+<li> <p><code>structure(NULL, ..)</code> is now deprecated as you cannot
+set attributes on <code>NULL</code>.
+</p>
+</li>
+<li><p> Header ‘<span class="file">Rconfig.h</span>’ no longer defines
+<span class="samp">SUPPORT_OPENMP</span>; instead use <span class="samp">_OPENMP</span> (as documented
+for a long time).
+</p>
+</li>
+<li><p> (C-level Native routine registration.)  The deprecated
+<code>styles</code> member of the <code>R_CMethodDef</code> and
+<code>R_FortranMethodDef</code> structures has been removed.
+Packages using these will need to be re-installed for <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> 3.4.0.
+</p>
+</li>
+<li><p> The deprecated support for PCRE versions older than 8.20
+will be removed in <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> 3.4.1. (Versions 8.20–8.31 will still be
+accepted but remain deprecated.)
+</p>
+</li></ul>
+
+
+
+
+<h4>BUG FIXES</h4>
+
+
+<ul>
+<li><p> Getting or setting <code>body()</code> or <code>formals()</code> on
+non-functions for now signals a warning and may become an error
+for setting.
+</p>
+</li>
+<li> <p><code>match(x, t)</code>, <code>duplicated(x)</code> and
+<code>unique(x)</code> work as documented for complex numbers with <code>NA</code>s
+or <code>NaN</code>s, where all those containing <code>NA</code> do match,
+whereas in the case of <code>NaN</code>'s both real and imaginary parts
+must match, compatibly with how <code>print()</code> and <code>format()</code>
+work for complex numbers.
+</p>
+</li>
+<li> <p><code>deparse(<complex>, options = "digits17")</code> prints more
+nicely now, mostly thanks to a suggestion by Richie Cotton.
+</p>
+</li>
+<li><p> Rotated symbols in plotmath expressions are now positioned
+correctly on <code>x11(type = "Xlib")</code>. (<a href="https://bugs.R-project.org/bugzilla3/show_bug.cgi?id=16948">PR#16948</a>)
+</p>
+</li>
+<li> <p><code>as<-()</code> avoids an infinite loop when a virtual class
+is interposed between a subclass and an actual superclass.
+</p>
+</li>
+<li><p> Fix level propagation in <code>unlist()</code> when the list
+contains zero-length lists or factors.
+</p>
+</li>
+<li><p> Fix S3 dispatch on S4 objects when the <span class="pkg">methods</span> package is
+not attached.
+</p>
+</li>
+<li><p> Internal S4 dispatch sets <code>.Generic</code> in the method
+frame for consistency with <code>standardGeneric()</code>.  (<a href="https://bugs.R-project.org/bugzilla3/show_bug.cgi?id=16929">PR#16929</a>)
+</p>
+</li>
+<li><p> Fix <code>order(x, decreasing = TRUE)</code> when <code>x</code> is an
+integer vector containing <code>MAX_INT</code>.  Ported from a fix Matt
+Dowle made to <a href="https://CRAN.R-project.org/package=data.table"><span class="pkg">data.table</span></a>.
+</p>
+</li>
+<li><p> Fix caching by <code>callNextMethod()</code>, resolves <a href="https://bugs.R-project.org/bugzilla3/show_bug.cgi?id=16973">PR#16973</a>
+and <a href="https://bugs.R-project.org/bugzilla3/show_bug.cgi?id=16974">PR#16974</a>.
+</p>
+</li>
+<li> <p><code>grouping()</code> puts NAs last, to be consistent with the
+default behavior of <code>order()</code>.
+</p>
+</li>
+<li><p> Point mass limit cases: <code>qpois(-2, 0)</code> now gives
+<code>NaN</code> with a warning and <code>qgeom(1, 1)</code> is <code>0</code>.
+(<a href="https://bugs.R-project.org/bugzilla3/show_bug.cgi?id=16972">PR#16972</a>)
+</p>
+</li>
+<li> <p><code>table()</code> no longer drops an <code>"NaN"</code> factor level,
+and better obeys <code>exclude = <chr></code>, thanks to Suharto Anggono's
+patch for <a href="https://bugs.R-project.org/bugzilla3/show_bug.cgi?id=16936">PR#16936</a>.  Also, in the case of <code>exclude = NULL</code>
+and <code>NA</code>s, these are tabulated correctly (again).
+</p>
+<p>Further, <code>table(1:2, exclude = 1, useNA = "ifany")</code> no longer
+erroneously reports <code><NA></code> counts.
+</p>
+<p>Additionally, all cases of empty <code>exclude</code> are equivalent,
+and <code>useNA</code> is not overwritten when specified (as it was by
+<code>exclude = NULL</code>).
+</p>
+</li>
+<li> <p><code>wilcox.test(x, conf.int=TRUE)</code> no longer errors out in
+cases where the confidence interval is not available, such as for
+<code>x = 0:2</code>.
+</p>
+</li>
+<li> <p><code>droplevels(f)</code> now keeps <NA> levels when present.
+</p>
+</li>
+<li><p> In integer arithmetic, <code>NULL</code> is now treated as
+<code>integer(0)</code> whereas it was previously treated as <code>double(0)</code>.
+</p>
+</li>
+<li><p> The radix sort considers <code>NA_real_</code> and <code>NaN</code> to
+be equivalent in rank (like the other sort algorithms).
+</p>
+</li>
+<li><p> When <code>index.return=TRUE</code> is passed to <code>sort.int()</code>,
+the radix sort treats <code>NA</code>s like <code>sort.list()</code> does
+(like the other sort algorithms).
+</p>
+</li>
+<li><p> When in <code>tabulate(bin, nbin)</code> <code>length(bin)</code> is
+larger than the maximal integer, the result is now of type
+<code>double</code> and hence no longer silently overflows to wrong
+values.  (<a href="https://bugs.R-project.org/bugzilla3/show_bug.cgi?id=17140">PR#17140</a>)
+</p>
+</li>
+<li> <p><code>as.character.factor()</code> respects S4 inheritance when
+checking the type of its argument. (<a href="https://bugs.R-project.org/bugzilla3/show_bug.cgi?id=17141">PR#17141</a>)
+</p>
+</li>
+<li><p> The <code>factor</code> method for <code>print()</code> no longer sets
+the class of the factor to <code>NULL</code>, which would violate a
+basic constraint of an S4 object.
+</p>
+</li>
+<li> <p><code>formatC(x, flag = f)</code> allows two new flags, and
+signals an error for invalid flags also in the case of character
+formatting.
+</p>
+</li>
+<li><p> Reading from <code>file("stdin")</code> now also closes the
+connection and hence no longer leaks memory when reading from a
+full pipe, thanks to Gábor Csárdi, see thread starting at
+<a href="https://stat.ethz.ch/pipermail/r-devel/2016-November/073360.html">https://stat.ethz.ch/pipermail/r-devel/2016-November/073360.html</a>.
+</p>
+</li>
+<li><p> Failure to create file in <code>tempdir()</code> for compressed
+<code>pdf()</code> graphics device no longer errors (then later
+segfaults).  There is now a warning instead of error and
+compression is turned off for the device.  Thanks to Alec
+Wysoker (<a href="https://bugs.R-project.org/bugzilla3/show_bug.cgi?id=17191">PR#17191</a>).
+</p>
+</li>
+<li><p> Asking for <code>methods()</code> on <code>"|"</code> returns only S3
+methods. See
+<a href="https://stat.ethz.ch/pipermail/r-devel/2016-December/073476.html">https://stat.ethz.ch/pipermail/r-devel/2016-December/073476.html</a>.
+</p>
+</li>
+<li> <p><code>dev.capture()</code> using Quartz Cocoa device (macOS) returned
+invalid components if the back-end chose to use ARGB instead of RGBA
+image format. (Reported by Noam Ross.)
+</p>
+</li>
+<li> <p><code>seq("2", "5")</code> now works too, equivalently to
+<code>"2":"5"</code> and <code>seq.int()</code>.
+</p>
+</li>
+<li> <p><code>seq.int(to = 1, by = 1)</code> is now correct, other cases are
+integer (instead of <code>double</code>) when <code>seq()</code> is integer
+too, and the "non-finite" error messages are consistent between
+<code>seq.default()</code> and <code>seq.int()</code>, no longer mentioning
+<code>NaN</code> etc.
+</p>
+</li>
+<li> <p><code>rep(x, times)</code> and <code>rep.int(x, times)</code> now work
+when <code>times</code> is larger than the largest value representable
+in an integer vector.  (<a href="https://bugs.R-project.org/bugzilla3/show_bug.cgi?id=16932">PR#16932</a>)
+</p>
+</li>
+<li> <p><code>download.file(method = "libcurl")</code> does not check for
+URL existence before attempting downloads; this is more robust to
+servers that do not support HEAD or range-based retrieval, but may
+create empty or incomplete files for aborted download requests.
+</p>
+</li>
+<li><p> Bandwidth selectors <code>bw.ucv()</code>, <code>bw.bcv()</code> and
+<code>bw.SJ()</code> now avoid integer overflow for large sample sizes.
+</p>
+</li>
+<li> <p><code>str()</code> no longer shows <code>"list output truncated"</code>,
+in cases that list was not shown at all.  Thanks to Neal Fultz
+(<a href="https://bugs.R-project.org/bugzilla3/show_bug.cgi?id=17219">PR#17219</a>)
+</p>
+</li>
+<li><p> Fix for <code>cairo_pdf()</code> (and <code>svg()</code> and
+<code>cairo_ps()</code>) when replaying a saved display list that contains
+a mix of <span class="pkg">grid</span> and <span class="pkg">graphics</span> output.
+(Report by Yihui Xie.)
+</p>
+
+
+
+</li>
+<li><p> The <code>str()</code> and <code>as.hclust()</code> methods for
+<code>"dendrogram"</code> now also work for deeply nested dendrograms
+thanks to non-recursive implementations by Bradley Broom.
+</p>
+</li>
+<li> <p><code>sample()</code> now uses two uniforms for added precision
+when the uniform generator is <code>Knuth-TAOCP</code>,
+<code>Knuth-TAOCP-2002</code>, or a user-defined generator and the
+population size is <i>2^25</i> or greater.
+</p>
+</li>
+<li><p> If a vignette in the ‘<span class="file">vignettes</span>’ directory is listed in
+‘<span class="file">.Rbuildignore</span>’, <code>R CMD build</code> would not include it
+in the tarball, but would include it in the vignette database,
+leading to a check warning.  (<a href="https://bugs.R-project.org/bugzilla3/show_bug.cgi?id=17246">PR#17246</a>)
+</p>
+</li>
+<li> <p><code>tools::latexToUtf8()</code> infinite looped on certain
+inputs.  (<a href="https://bugs.R-project.org/bugzilla3/show_bug.cgi?id=17138">PR#17138</a>)
+</p>
+</li>
+<li> <p><code>terms.formula()</code> ignored argument names when determining
+whether two terms were identical.  (<a href="https://bugs.R-project.org/bugzilla3/show_bug.cgi?id=17235">PR#17235</a>)
+</p>
+</li>
+<li> <p><code>callNextMethod()</code> was broken when called from a method
+that augments the formal arguments of a primitive generic.
+</p>
+</li>
+<li><p> Coercion of an S4 object to a vector during sub-assignment
+into a vector failed to dispatch through the <code>as.vector()</code>
+generic (often leading to a segfault).
+</p>
+</li>
+<li><p> Fix problems in command completion:  Crash (<a href="https://bugs.R-project.org/bugzilla3/show_bug.cgi?id=17222">PR#17222</a>)
+and junk display in Windows, handling special characters in
+filenames on all systems.
+</p>
+</li></ul>
+
+
+
+
+<h3><img src="../help/figures/../../html/Rlogo.svg" class="toplogo" alt="[R logo]" /> CHANGES IN R 3.3.3</h3>
+
+
+
+<h4>NEW FEATURES</h4>
+
+
+<ul>
+<li><p> Changes when redirection of a <span class="samp">http://</span> URL to a
+<span class="samp">https://</span> URL is encountered:
+</p>
+
+<ul>
+<li><p> The internal methods of <code>download.file()</code> and
+<code>url()</code> now report that they cannot follow this (rather
+than failing silently).
+</p>
+</li>
+<li><p> (Unix-alike) <code>download.file(method = "auto")</code> (the
+default) re-tries with <code>method = "libcurl"</code>.
+</p>
+</li>
+<li><p> (Unix-alike) <code>url(method = "default")</code> with an
+explicit <code>open</code> argument re-tries with
+<code>method = "libcurl"</code>.  This covers many of the usages,
+e.g. <code>readLines()</code> with a URL argument.
+</p>
+</li></ul>
+
+</li></ul>
+
+
+
+
+<h4>INSTALLATION on a UNIX-ALIKE</h4>
+
+
+<ul>
+<li><p> The <code>configure</code> check for the <code>zlib</code> version is
+now robust to versions longer than 5 characters, including
+<code>1.2.11</code>.
+</p>
+</li></ul>
+
+
+
+
+<h4>UTILITIES</h4>
+
+
+<ul>
+<li><p> Environmental variable <span class="env">_R_CHECK_TESTS_NLINES_</span> controls
+how <code>R CMD check</code> reports failing tests (see §8 of the
+‘R Internals’ manual).
+</p>
+</li></ul>
+
+
+
+
+<h4>DEPRECATED AND DEFUNCT</h4>
+
+
+<ul>
+<li><p> (C-level Native routine registration.)  The undocumented
+<code>styles</code> field of the components of <code>R_CMethodDef</code> and
+<code>R_FortranMethodDef</code> is deprecated.
+</p>
+</li></ul>
+
+
+
+
+<h4>BUG FIXES</h4>
+
+
+<ul>
+<li> <p><code>vapply(x, *)</code> now works with long vectors <code>x</code>.
+(<a href="https://bugs.R-project.org/bugzilla3/show_bug.cgi?id=17174">PR#17174</a>)
+</p>
+</li>
+<li> <p><code>isS3method("is.na.data.frame")</code> and similar are
+correct now.  (<a href="https://bugs.R-project.org/bugzilla3/show_bug.cgi?id=17171">PR#17171</a>)
+</p>
+</li>
+<li> <p><code>grepRaw(<long>, <short>, fixed = TRUE)</code> now works,
+thanks to a patch by Mikko Korpela.  (<a href="https://bugs.R-project.org/bugzilla3/show_bug.cgi?id=17132">PR#17132</a>)
+</p>
+</li>
+<li><p> Package installation into a library where the package exists
+<em>via</em> symbolic link now should work wherever
+<code>Sys.readlink()</code> works, resolving <a href="https://bugs.R-project.org/bugzilla3/show_bug.cgi?id=16725">PR#16725</a>.
+</p>
+</li>
+<li> <p><code>"Cincinnati"</code> was missing an <code>"n"</code> in the
+<code>precip</code> dataset.
+</p>
+</li>
+<li><p> Fix buffer overflow vulnerability in <code>pdf()</code> when
+loading an encoding file.  Reported by Talos (TALOS-2016-0227).
+</p>
+</li>
+<li> <p><code>getDLLRegisteredRoutines()</code> now produces its warning
+correctly when multiple DLLs match, thanks to Matt Dowle's <a href="https://bugs.R-project.org/bugzilla3/show_bug.cgi?id=17184">PR#17184</a>.
+</p>
+</li>
+<li> <p><code>Sys.timezone()</code> now returns non-NA also on platforms
+such as <span class="samp">Ubuntu 14.04.5 LTS</span>, thanks to Mikko Korpela's
+<a href="https://bugs.R-project.org/bugzilla3/show_bug.cgi?id=17186">PR#17186</a>.
+</p>
+</li>
+<li> <p><code>format(x)</code> for an illegal <code>"POSIXlt"</code> object
+<code>x</code> no longer segfaults.
+</p>
+</li>
+<li> <p><code>methods(f)</code> now also works for <code>f</code> <code>"("</code>
+or <code>"{"</code>.
+</p>
+</li>
+<li><p> (Windows only)  <code>dir.create()</code> did not check the length
+of the path to create, and so could overflow a buffer and crash
+<span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span>.  (<a href="https://bugs.R-project.org/bugzilla3/show_bug.cgi?id=17206">PR#17206</a>)
+</p>
+</li>
+<li><p> On some systems, very small hexadecimal numbers in hex notation
+would underflow to zero.  (<a href="https://bugs.R-project.org/bugzilla3/show_bug.cgi?id=17199">PR#17199</a>)
+</p>
+</li>
+<li> <p><code>pmin()</code> and <code>pmax()</code> now work again for
+<code>ordered</code> factors and 0-length S3 classed objects, thanks to
+Suharto Anggono's <a href="https://bugs.R-project.org/bugzilla3/show_bug.cgi?id=17195">PR#17195</a> and <a href="https://bugs.R-project.org/bugzilla3/show_bug.cgi?id=17200">PR#17200</a>.
+</p>
+</li>
+<li> <p><code>bug.report()</code> did not do any validity checking on a
+package's <span class="samp">BugReports</span> field.  It now ignores an empty field,
+removes leading whitespace and only attempts to open
+<span class="samp">http://</span> and <span class="samp">https://</span> URLs, falling back to emailing
+the maintainer.
+</p>
+</li>
+<li><p> Bandwidth selectors <code>bw.ucv()</code> and
+<code>bw.SJ()</code> gave incorrect answers or incorrectly reported an
+error (because of integer overflow) for inputs longer than
+46341.  Similarly for <code>bw.bcv()</code> at length 5793.
+</p>
+<p>Another possible integer overflow is checked and may result in an
+error report (rather than an incorrect result) for much longer
+inputs (millions for a smooth distribution).
+</p>
+</li>
+<li> <p><code>findMethod()</code> failed if the active signature had
+expanded beyond what a particular package used. (Example with
+packages <a href="https://CRAN.R-project.org/package=XR"><span class="pkg">XR</span></a> and <a href="https://CRAN.R-project.org/package=XRJulia"><span class="pkg">XRJulia</span></a> on <acronym><span class="acronym">CRAN</span></acronym>.)
+</p>
+</li>
+<li> <p><code>qbeta()</code> underflowed too early in some very asymmetric
+cases.  (<a href="https://bugs.R-project.org/bugzilla3/show_bug.cgi?id=17178">PR#17178</a>)
+</p>
+</li>
+<li> <p><code>R CMD Rd2pdf</code> had problems with packages with
+non-ASCII titles in ‘<span class="file">.Rd</span>’ files (usually the titles were
+omitted).
+</p>
+</li></ul>
+
+
+
+
+<h3><img src="../help/figures/../../html/Rlogo.svg" class="toplogo" alt="[R logo]" /> CHANGES IN R 3.3.2</h3>
+
+
+
+<h4>NEW FEATURES</h4>
+
+
+<ul>
+<li> <p><code>extSoftVersion()</code> now reports the version (if any) of
+the <code>readline</code> library in use.
+</p>
+</li>
+<li><p> The version of LAPACK included in the sources has been
+updated to 3.6.1, a bug-fix release including a speedup for the
+non-symmetric case of <code>eigen()</code>.
+</p>
+</li>
+<li><p> Use <code>options(deparse.max.lines=)</code> to limit the number
+of lines recorded in <code>.Traceback</code> and other deparsing
+activities.
+</p>
+</li>
+<li> <p><code>format(<AsIs>)</code> looks more regular, also for
+non-character atomic matrices.
+</p>
+</li>
+<li> <p><code>abbreviate()</code> gains an option <code>named = TRUE</code>.
+</p>
+</li>
+<li><p> The online documentation for package <span class="pkg">methods</span> is
+extensively rewritten.  The goals are to simplify
+documentation for basic use, to note old features not
+recommended and to correct out-of-date information.
+</p>
+</li>
+<li><p> Calls to <code>setMethod()</code> no longer print a message when
+creating a generic function in those cases where that is
+natural: S3 generics and primitives.
+</p>
+</li></ul>
+
+
+
+
+<h4>INSTALLATION and INCLUDED SOFTWARE</h4>
+
+
+<ul>
+<li><p> Versions of the <code>readline</code> library >= 6.3 had been
+changed so that terminal window resizes were not signalled to
+<code>readline</code>: code has been added using a explicit signal
+handler to work around that (when <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> is compiled against readline
+>= 6.3).  (<a href="https://bugs.R-project.org/bugzilla3/show_bug.cgi?id=16604">PR#16604</a>)
+</p>
+</li>
+<li> <p><code>configure</code> works better with Oracle Developer
+Studio 12.5.
+</p>
+</li></ul>
+
+
+
+
+<h4>UTILITIES</h4>
+
+
+<ul>
+<li> <p><code>R CMD check</code> reports more dubious flags in files
+‘<span class="file">src/Makevars[.in]</span>’, including <span class="option">-w</span> and <span class="option">-g</span>.
+</p>
+</li>
+<li> <p><code>R CMD check</code> has been set up to filter important
+warnings from recent versions of <code>gfortran</code> with
+<span class="option">-Wall -pedantic</span>: this now reports non-portable GNU
+extensions such as out-of-order declarations.
+</p>
+</li>
+<li> <p><code>R CMD config</code> works better with paths containing
+spaces, even those of home directories (as reported by Ken Beath).
+</p>
+</li></ul>
+
+
+
+
+<h4>DEPRECATED AND DEFUNCT</h4>
+
+
+<ul>
+<li><p> Use of the C/C++ macro <span class="samp">NO_C_HEADERS</span> is deprecated
+(no C headers are included by <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> headers from C++ as from <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span>
+3.3.0, so it should no longer be needed).
+</p>
+</li></ul>
+
+
+
+
+<h4>BUG FIXES</h4>
+
+
+<ul>
+<li><p> The check for non-portable flags in <code>R CMD check</code>
+could be stymied by ‘<span class="file">src/Makevars</span>’ files which contained
+targets.
+</p>
+</li>
+<li><p> (Windows only) When using certain desktop themes in Windows
+7 or higher, <kbd>Alt-Tab</kbd> could cause <code>Rterm</code> to stop
+accepting input.  (<a href="https://bugs.R-project.org/bugzilla3/show_bug.cgi?id=14406">PR#14406</a>; patch submitted by Jan Gleixner.)
+</p>
+</li>
+<li> <p><code>pretty(d, ..)</code> behaves better for date-time <code>d</code>
+(<a href="https://bugs.R-project.org/bugzilla3/show_bug.cgi?id=16923">PR#16923</a>).
+</p>
+</li>
+<li><p> When an S4 class name matches multiple classes in the S4
+cache, perform a dynamic search in order to obey namespace
+imports.  This should eliminate annoying messages about multiple
+hits in the class cache.  Also, pass along the package from the
+<code>ClassExtends</code> object when looking up superclasses in the
+cache.
+</p>
+</li>
+<li> <p><code>sample(NA_real_)</code> now works.
+</p>
+</li>
+<li><p> Packages using non-ASCII encodings in their code did not
+install data properly on systems using different encodings.
+</p>
+</li>
+<li> <p><code>merge(df1, df2)</code> now also works for data frames with
+column names <code>"na.last"</code>, <code>"decreasing"</code>, or
+<code>"method"</code>.  (<a href="https://bugs.R-project.org/bugzilla3/show_bug.cgi?id=17119">PR#17119</a>)
+</p>
+</li>
+<li> <p><code>contour()</code> caused a segfault if the <code>labels</code>
+argument had length zero.  (Reported by Bill Dunlap.)
+</p>
+</li>
+<li> <p><code>unique(warnings())</code> works more correctly, thanks to a
+new <code>duplicated.warnings()</code> method.
+</p>
+</li>
+<li> <p><code>findInterval(x, vec = numeric(), all.inside = TRUE)</code>
+now returns <code>0</code>s as documented.  (Reported by Bill Dunlap.)
+</p>
+</li>
+<li><p> (Windows only) <code>R CMD SHLIB</code> failed when a symbol
+in the resulting library had the same name as a keyword in
+the ‘<span class="file">.def</span>’ file.  (<a href="https://bugs.R-project.org/bugzilla3/show_bug.cgi?id=17130">PR#17130</a>)
+</p>
+</li>
+<li> <p><code>pmax()</code> and <code>pmin()</code> now work with (more ?)
+classed objects, such as <code>"Matrix"</code> from the <a href="https://CRAN.R-project.org/package=Matrix"><span class="pkg">Matrix</span></a>
+package, as documented for a long time.
+</p>
+</li>
+<li> <p><code>axis(side, x = D)</code> and hence <code>Axis()</code> and
+<code>plot()</code> now work correctly for <code>"Date"</code> and time
+objects <code>D</code>, even when “time goes backward”, e.g.,
+with decreasing <code>xlim</code>.  (Reported by William May.)
+</p>
+</li>
+<li> <p><code>str(I(matrix(..)))</code> now looks as always intended.
+</p>
+</li>
+<li> <p><code>plot.ts()</code>, the <code>plot()</code> method for time series,
+now respects <code>cex</code>, <code>lwd</code> and <code>lty</code>.  (Reported by
+Greg Werbin.)
+</p>
+</li>
+<li> <p><code>parallel::mccollect()</code> now returns a named list (as
+documented) when called with <code>wait = FALSE</code>.  (Reported by
+Michel Lang.)
+</p>
+</li>
+<li><p> If a package added a class to a class union in another
+package, loading the first package gave erroneous warnings
+about “undefined subclass”.
+</p>
+</li>
+<li> <p><code>c()</code>'s argument <code>use.names</code> is documented now, as
+belonging to the (C internal) default method.   In
+“parallel”, argument <code>recursive</code> is also moved from
+the generic to the default method, such that the formal argument list
+of <span class="pkg">base</span> generic <code>c()</code> is just <code>(...)</code>.
+</p>
+</li>
+<li> <p><code>rbeta(4, NA)</code> and similarly <code>rgamma()</code> and
+<code>rnbinom()</code> now return <code>NaN</code>'s with a warning, as other
+r<dist>(), and as documented.  (<a href="https://bugs.R-project.org/bugzilla3/show_bug.cgi?id=17155">PR#17155</a>)
+</p>
+</li>
+<li><p> Using <code>options(checkPackageLicense = TRUE)</code> no longer
+requires acceptance of the licence for non-default standard
+packages such as <span class="pkg">compiler</span>.  (Reported by Mikko Korpela.)
+</p>
+</li>
+<li> <p><code>split(<very_long>, *)</code> now works even when the split
+off parts are long. (<a href="https://bugs.R-project.org/bugzilla3/show_bug.cgi?id=17139">PR#17139</a>)
+</p>
+</li>
+<li> <p><code>min()</code> and <code>max()</code> now also work correctly when
+the argument list starts with <code>character(0)</code>.  (<a href="https://bugs.R-project.org/bugzilla3/show_bug.cgi?id=17160">PR#17160</a>)
+</p>
+</li>
+<li><p> Subsetting very large matrices (<code>prod(dim(.)) >= 2^31</code>)
+now works thanks to Michael Schubmehl's <a href="https://bugs.R-project.org/bugzilla3/show_bug.cgi?id=17158">PR#17158</a>.
+</p>
+</li>
+<li> <p><code>bartlett.test()</code> used residual sums of squares
+instead of variances, when the argument was a list of <code>lm</code> objects.
+(Reported by Jens Ledet Jensen).
+</p>
+</li>
+<li> <p><code>plot(<lm>, which = *)</code> now correctly labels the
+contour lines for the standardized residuals for <code>which = 6</code>.
+It also takes the correct <i>p</i> in case of singularities (also
+for <code>which = 5</code>).  (<a href="https://bugs.R-project.org/bugzilla3/show_bug.cgi?id=17161">PR#17161</a>)
+</p>
+</li>
+<li> <p><code>xtabs(~ exclude)</code> no longer fails from wrong scope,
+thanks to Suharto Anggono's <a href="https://bugs.R-project.org/bugzilla3/show_bug.cgi?id=17147">PR#17147</a>.
+</p>
+</li>
+<li><p> Reference class calls to <code>methods()</code> did not
+re-analyse previously defined methods, meaning that calls to
+methods defined later would fail. (Reported by Charles Tilford).
+</p>
+</li>
+<li> <p><code>findInterval(x, vec, left.open = TRUE)</code> misbehaved in some
+cases. (Reported by Dmitriy Chernykh.)
+</p>
+</li></ul>
+
+
+
+
+<h3><img src="../help/figures/../../html/Rlogo.svg" class="toplogo" alt="[R logo]" /> CHANGES IN R 3.3.1</h3>
+
+
+
+<h4>BUG FIXES</h4>
+
+
+<ul>
+<li> <p><code>R CMD INSTALL</code> and hence <code>install.packages()</code>
+gave an internal error installing a package called
+<span class="pkg">description</span> from a tarball on a case-insensitive file system.
+</p>
+</li>
+<li> <p><code>match(x, t)</code> (and hence <code>x %in% t</code>) failed
+when <code>x</code> was of length one, and either <code>character</code> and <code>x</code>
+and <code>t</code> only differed in their <code>Encoding</code> or when
+<code>x</code> and <code>t</code> where <code>complex</code> with <code>NA</code>s or <code>NaN</code>s.
+(<a href="https://bugs.R-project.org/bugzilla3/show_bug.cgi?id=16885">PR#16885</a>.)
+</p>
+</li>
+<li> <p><code>unloadNamespace(ns)</code> also works again when <code>ns</code> is a
+‘namespace’, as from <code>getNamespace()</code>.
+</p>
+</li>
+<li> <p><code>rgamma(1, Inf)</code> or <code>rgamma(1, 0, 0)</code> no longer give
+<code>NaN</code> but the correct limit.
+</p>
+</li>
+<li> <p><code>length(baseenv())</code> is correct now.
+</p>
+</li>
+<li> <p><code>pretty(d, ..)</code> for date-time <code>d</code> rarely failed
+when <code>"halfmonth"</code> time steps were tried (<a href="https://bugs.R-project.org/bugzilla3/show_bug.cgi?id=16923">PR#16923</a>) and
+on ‘inaccurate’ platforms such as 32-bit Windows or
+a configuration with <code>--disable-long-double</code>; see comment
+#15 of <a href="https://bugs.R-project.org/bugzilla3/show_bug.cgi?id=16761">PR#16761</a>.
+</p>
+</li>
+<li><p> In <code>text.default(x, y, labels)</code>, the rarely(?) used
+default for <code>labels</code> is now correct also for the case of a
+2-column matrix <code>x</code> and missing <code>y</code>.
+</p>
+</li>
+<li> <p><code>as.factor(c(a = 1L))</code> preserves <code>names()</code> again
+as in <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> < 3.1.0.
+</p>
+</li>
+<li> <p><code>strtrim(""[0], 0[0])</code> now works.
+</p>
+</li>
+<li><p> Use of <code>Ctrl-C</code> to terminate a reverse incremental
+search started by <code>Ctrl-R</code> in the <code>readline</code>-based Unix
+terminal interface is now supported when <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> was compiled against
+<code>readline</code> >= 6.0 (<code>Ctrl-G</code> always worked).
+(<a href="https://bugs.R-project.org/bugzilla3/show_bug.cgi?id=16603">PR#16603</a>)
+</p>
+</li>
+<li> <p><code>diff(<difftime>)</code> now keeps the <code>"units"</code>
+attribute, as subtraction already did, <a href="https://bugs.R-project.org/bugzilla3/show_bug.cgi?id=16940">PR#16940</a>.
+</p>
+</li></ul>
+
+
+
+
+<h3><img src="../help/figures/../../html/Rlogo.svg" class="toplogo" alt="[R logo]" /> CHANGES IN R 3.3.0</h3>
+
+
+
+<h4>SIGNIFICANT USER-VISIBLE CHANGES</h4>
+
+
+<ul>
+<li> <p><code>nchar(x, *)</code>'s argument <code>keepNA</code> governing how
+the result for <code>NA</code>s in <code>x</code> is determined, gets a new
+default <code>keepNA = NA</code> which returns <code>NA</code> where
+<code>x</code> is <code>NA</code>, except for <code>type = "width"</code> which still
+returns <code>2</code>, the formatting / printing width of <code>NA</code>.
+</p>
+</li>
+<li><p> All builds have support for <span class="samp">https:</span> URLs in the
+default methods for <code>download.file()</code>, <code>url()</code> and code
+making use of them.
+</p>
+<p>Unfortunately that cannot guarantee that any particular
+<span class="samp">https:</span> URL can be accessed.  For example, server and client
+have to successfully negotiate a cryptographic protocol (TLS/SSL,
+...) and the server's identity has to be verifiable <em>via</em>
+the available certificates.  Different access methods may allow
+different protocols or use private certificate bundles: we
+encountered a <span class="samp">https:</span> CRAN mirror which could be accessed by
+one browser but not by another nor by <code>download.file()</code> on
+the same Linux machine.
+</p>
+</li></ul>
+
+
+
+
+<h4>NEW FEATURES</h4>
+
+
+<ul>
+<li><p> The <code>print</code> method for <code>methods()</code> gains a
+<code>byclass</code> argument.
+</p>
+</li>
+<li><p> New functions <code>validEnc()</code> and <code>validUTF8()</code> to
+give access to the validity checks for inputs used by
+<code>grep()</code> and friends.
+</p>
+</li>
+<li><p> Experimental new functionality for S3 method checking, notably
+<code>isS3method()</code>.
+</p>
+<p>Also, the names of the <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> ‘language elements’ are exported
+as character vector <code>tools::langElts</code>.
+</p>
+</li>
+<li> <p><code>str(x)</code> now displays <code>"Time-Series"</code> also for
+matrix (multivariate) time-series, i.e. when <code>is.ts(x)</code> is true.
+</p>
+</li>
+<li><p> (Windows only)  The GUI menu item to install local packages
+now accepts ‘<span class="file">*.tar.gz</span>’ files as well as ‘<span class="file">*.zip</span>’ files
+(but defaults to the latter).
+</p>
+</li>
+<li><p> New programmeR's utility function <code>chkDots()</code>.
+</p>
+</li>
+<li> <p><code>D()</code> now signals an error when given invalid input,
+rather than silently returning <code>NA</code>.  (Request of John Nash.)
+</p>
+</li>
+<li> <p><code>formula</code> objects are slightly more “first class”:
+e.g., <code>formula()</code> or <code>new("formula", y ~ x)</code> are now
+valid.  Similarly, for <code>"table"</code>, <code>"ordered"</code> and
+<code>"summary.table"</code>.  Packages defining S4 classes with the above
+S3/S4 classes as slots should be reinstalled.
+
+
+</p>
+</li>
+<li><p> New function <code>strrep()</code> for repeating the elements of a
+character vector.
+</p>
+</li>
+<li> <p><code>rapply()</code> preserves attributes on the list when
+<code>how = "replace"</code>.
+</p>
+</li>
+<li><p> New S3 generic function <code>sigma()</code> with methods for
+extracting the estimated standard deviation aka “residual
+standard deviation” from a fitted model.
+</p>
+</li>
+<li> <p><code>news()</code> now displays <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> and package news files within
+the HTML help system if it is available.  If no news file is found,
+a visible <code>NULL</code> is returned to the console.
+</p>
+</li>
+<li> <p><code>as.raster(x)</code> now also accepts <code>raw</code> arrays
+<code>x</code> assuming values in <code>0:255</code>.
+</p>
+</li>
+<li><p> Subscripting of matrix/array objects of type
+<code>"expression"</code> is now supported.
+</p>
+</li>
+<li> <p><code>type.convert("i")</code> now returns a factor instead of a
+complex value with zero real part and missing imaginary part.
+</p>
+</li>
+<li><p> Graphics devices <code>cairo_pdf()</code> and <code>cairo_ps()</code>
+now allow non-default values of the cairographics ‘fallback
+resolution’ to be set.
+</p>
+<p>This now defaults to 300 on all platforms: that is the default
+documented by cairographics, but apparently was not used by all
+system installations.
+</p>
+</li>
+<li> <p><code>file()</code> gains an explicit <code>method</code> argument
+rather than implicitly using
+<code>getOption("url.method", "default")</code>.
+</p>
+</li>
+<li><p> Thanks to a patch from Tomas Kalibera, <code>x[x != 0]</code> is
+now typically faster than <code>x[which(x != 0)]</code> (in the case
+where <code>x</code> has no NAs, the two are equivalent).
+</p>
+</li>
+<li> <p><code>read.table()</code> now always uses the names for a named
+<code>colClasses</code> argument (previously names were only used when
+<code>colClasses</code> was too short). (In part, wish of <a href="https://bugs.R-project.org/bugzilla3/show_bug.cgi?id=16478">PR#16478</a>.)
+</p>
+</li>
+<li><p> (Windows only) <code>download.file()</code> with default
+<code>method = "auto"</code> and a <span class="samp">ftps://</span> URL chooses
+<code>"libcurl"</code> if that is available.
+</p>
+</li>
+<li><p> The out-of-the box Bioconductor mirror has been changed to
+one using <span class="samp">https://</span>: use <code>chooseBioCmirror()</code> to choose
+a <span class="samp">http://</span> mirror if required.
+</p>
+</li>
+<li><p> The data frame and formula methods for <code>aggregate()</code>
+gain a <code>drop</code> argument.
+</p>
+</li>
+<li> <p><code>available.packages()</code> gains a <code>repos</code> argument.
+</p>
+</li>
+<li><p> The undocumented switching of methods for <code>url()</code> on
+<span class="samp">https:</span> and <span class="samp">ftps:</span> URLs is confined to
+<code>method = "default"</code> (and documented).
+</p>
+</li>
+<li> <p><code>smoothScatter()</code> gains a <code>ret.selection</code> argument.
+</p>
+</li>
+<li> <p><code>qr()</code> no longer has a <code>...</code> argument to pass
+additional arguments to methods.
+</p>
+</li>
+<li> <p><code>[</code> has a method for class <code>"table"</code>.
+</p>
+</li>
+<li><p> It is now possible (again) to <code>replayPlot()</code> a
+display list snapshot that was created by <code>recordPlot()</code>
+in a different <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> session.
+</p>
+<p>It is still not a good idea to use snapshots as a persistent
+storage format for <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> plots, but it is now not completely silly to
+use a snapshot as a format for transferring an R plot between two
+R sessions.
+</p>
+<p>The underlying changes mean that packages providing graphics
+devices (e.g., <a href="https://CRAN.R-project.org/package=Cairo"><span class="pkg">Cairo</span></a>, <a href="https://CRAN.R-project.org/package=RSvgDevice"><span class="pkg">RSvgDevice</span></a>,
+<a href="https://CRAN.R-project.org/package=cairoDevice"><span class="pkg">cairoDevice</span></a>, <a href="https://CRAN.R-project.org/package=tikzDevice"><span class="pkg">tikzDevice</span></a>) will need to be
+reinstalled.
+</p>
+<p>Code for restoring snapshots was contributed by Jeroen Ooms
+and JJ Allaire.
+</p>
+<p>Some testing code is available at
+<a href="https://github.com/pmur002/R-display-list">https://github.com/pmur002/R-display-list</a>.
+</p>
+</li>
+<li> <p><code>tools::undoc(dir = D)</code> and <code>codoc(dir = D)</code> now
+also work when <code>D</code> is a directory whose <code>normalizePath()</code>ed
+version does not end in the package name, e.g. from a symlink.
+</p>
+</li>
+<li> <p><code>abbreviate()</code> has more support for multi-byte
+character sets – it no longer removes bytes within characters and
+knows about Latin vowels with accents.  It is still only
+really suitable for (most) European languages, and still warns on
+non-ASCII input.
+</p>
+<p><code>abbreviate(use.classes = FALSE)</code> is now implemented, and
+that is more suitable for non-European languages.
+</p>
+</li>
+<li> <p><code>match(x, table)</code> is faster (sometimes by an order of
+magnitude) when <code>x</code> is of length one and <code>incomparables</code>
+is unchanged, thanks to Peter Haverty (<a href="https://bugs.R-project.org/bugzilla3/show_bug.cgi?id=16491">PR#16491</a>).
+</p>
+</li>
+<li><p> More consistent, partly not back-compatible behavior of
+<code>NA</code> and <code>NaN</code> coercion to complex numbers, operations
+less often resulting in complex <code>NA</code> (<code>NA_complex_</code>).
+</p>
+</li>
+<li> <p><code>lengths()</code> considers methods for <code>length</code> and
+<code>[[</code> on <code>x</code>, so it should work automatically on any
+objects for which appropriate methods on those generics are
+defined.
+</p>
+</li>
+<li><p> The logic for selecting the default screen device on OS X
+has been simplified: it is now <code>quartz()</code> if that is
+available even if environment variable <span class="env">DISPLAY</span> has been set
+by the user.
+</p>
+<p>The choice can easily be overridden <em>via</em> environment
+variable <span class="env">R_INTERACTIVE_DEVICE</span>.
+</p>
+</li>
+<li><p> On Unix-like platforms which support the <code>getline</code> C
+library function, <code>system(*,intern = TRUE)</code> no longer
+truncates (output) lines longer than 8192 characters, thanks to
+Karl Millar. (<a href="https://bugs.R-project.org/bugzilla3/show_bug.cgi?id=16544">PR#16544</a>)
+</p>
+</li>
+<li> <p><code>rank()</code> gains a <code>ties.method = "last"</code> option,
+for convenience (and symmetry).
+</p>
+
+
+</li>
+<li> <p><code>regmatches(invert = NA)</code> can now be used to extract
+both non-matched and matched substrings.
+</p>
+</li>
+<li> <p><code>data.frame()</code> gains argument <code>fix.empty.names</code>;
+<code>as.data.frame.list()</code> gets new <code>cut.names</code>,
+<code>col.names</code> and <code>fix.empty.names</code>.
+</p>
+</li>
+<li> <p><code>plot(x ~ x, *)</code> now warns that it is the same as
+<code>plot(x ~ 1, *)</code>.
+</p>
+</li>
+<li> <p><code>recordPlot()</code> has new arguments <code>load</code> and
+<code>attach</code> to allow package names to be stored as part of a
+recorded plot.  <code>replayPlot()</code> has new argument
+<code>reloadPkgs</code> to load/attach any package names that were
+stored as part of a recorded plot.
+</p>
+</li>
+<li><p> S4 dispatch works within calls to <code>.Internal()</code>. This
+means explicit S4 generics are no longer needed for
+<code>unlist()</code> and <code>as.vector()</code>.
+</p>
+</li>
+<li><p> Only font family names starting with <span class="samp">"Hershey"</span> (and
+not <span class="samp">"Her"</span> as before) are given special treatment by the
+graphics engine.
+</p>
+</li>
+<li><p> S4 values are automatically coerced to vector (<em>via</em>
+<code>as.vector</code>) when subassigned into atomic vectors.
+</p>
+</li>
+<li> <p><code>findInterval()</code> gets a <code>left.open</code> option.
+</p>
+</li>
+<li><p> The version of LAPACK included in the sources has been
+updated to 3.6.0, including those ‘deprecated’ routines
+which were previously included.  <em>Ca</em> 40 double-complex
+routines have been added at the request of a package maintainer.
+</p>
+<p>As before, the details of what is included are in
+‘<span class="file">src/modules/lapack/README</span>’ and this now gives information on
+earlier additions.
+</p>
+</li>
+<li> <p><code>tapply()</code> has been made considerably more efficient
+without changing functionality, thanks to proposals from Peter
+Haverty and Suharto Anggono.  (<a href="https://bugs.R-project.org/bugzilla3/show_bug.cgi?id=16640">PR#16640</a>)
+</p>
+</li>
+<li> <p><code>match.arg(arg)</code> (the one-argument case) is faster; so
+is <code>sort.int()</code>.  (<a href="https://bugs.R-project.org/bugzilla3/show_bug.cgi?id=16640">PR#16640</a>)
+</p>
+</li>
+<li><p> The <code>format</code> method for <code>object_size</code> objects now
+also accepts “binary” units such as <code>"KiB"</code> and e.g.,
+<code>"Tb"</code>.  (Partly from <a href="https://bugs.R-project.org/bugzilla3/show_bug.cgi?id=16649">PR#16649</a>.)
+</p>
+</li>
+<li><p> Profiling now records calls of the form <code>foo::bar</code> and
+some similar cases directly rather than as calls to
+<code><Anonymous></code>.  Contributed by Winston Chang.
+</p>
+</li>
+<li><p> New string utilities <code>startsWith(x, prefix)</code> and
+<code>endsWith(x, suffix)</code>.  Also provide speedups for some
+<code>grepl("^...",*)</code> uses (related to proposals in <a href="https://bugs.R-project.org/bugzilla3/show_bug.cgi?id=16490">PR#16490</a>).
+</p>
+</li>
+<li><p> Reference class finalizers run at exit, as well as on
+garbage collection.
+</p>
+</li>
+<li><p> Avoid <span class="pkg">parallel</span> dependency on <span class="pkg">stats</span> for port
+choice and random number seeds.  (<a href="https://bugs.R-project.org/bugzilla3/show_bug.cgi?id=16668">PR#16668</a>)
+</p>
+</li>
+<li><p> The radix sort algorithm and implementation from
+<a href="https://CRAN.R-project.org/package=data.table"><span class="pkg">data.table</span></a> (<code>forder</code>) replaces the previous radix
+(counting) sort and adds a new method for <code>order()</code>.
+Contributed by Matt Dowle and Arun Srinivasan, the new algorithm
+supports logical, integer (even with large values), real, and
+character vectors.  It outperforms all other methods, but there
+are some caveats (see <code>?sort</code>).
+</p>
+</li>
+<li><p> The <code>order()</code> function gains a <code>method</code> argument
+for choosing between <code>"shell"</code> and <code>"radix"</code>.
+</p>
+</li>
+<li><p> New function <code>grouping()</code> returns a permutation that
+stably rearranges data so that identical values are adjacent.  The
+return value includes extra partitioning information on the
+groups.  The implementation came included with the new radix sort.
+</p>
+</li>
+<li> <p><code>rhyper(nn, m, n, k)</code> no longer returns <code>NA</code> when
+one of the three parameters exceeds the maximal integer.
+</p>
+</li>
+<li> <p><code>switch()</code> now warns when no alternatives are provided.
+</p>
+</li>
+<li> <p><code>parallel::detectCores()</code> now has default <code>logical
+	= TRUE</code> on all platforms – as this was the default on Windows,
+this change only affects Sparc Solaris.
+</p>
+<p>Option <code>logical = FALSE</code> is now supported on Linux and recent
+versions of OS X (for the latter, thanks to a suggestion of Kyaw
+Sint).
+</p>
+</li>
+<li> <p><code>hist()</code> for <code>"Date"</code> or <code>"POSIXt"</code> objects
+would sometimes give misleading labels on the breaks, as they
+were set to the day before the start of the period being
+displayed.  The display format has been changed, and the shift of the
+start day has been made conditional on <code>right = TRUE</code> (the
+default).  (<a href="https://bugs.R-project.org/bugzilla3/show_bug.cgi?id=16679">PR#16679</a>)
+</p>
+</li>
+<li> <p><span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> now uses a new version of the logo (donated to the R
+Foundation by RStudio).  It is defined in ‘<span class="file">.svg</span>’ format, so
+will resize without unnecessary degradation when displayed on
+HTML pages—there is also a vector PDF version.  Thanks to
+Dirk Eddelbuettel for producing the corresponding X11 icon.
+</p>
+</li>
+<li><p> New function <code>.traceback()</code> returns the stack trace
+which <code>traceback()</code> prints.
+</p>
+</li>
+<li> <p><code>lengths()</code> dispatches internally.
+</p>
+</li>
+<li> <p><code>dotchart()</code> gains a <code>pt.cex</code> argument to control
+the size of points separately from the size of plot labels.
+Thanks to Michael Friendly and Milan Bouchet-Valat for ideas
+and patches.
+</p>
+</li>
+<li> <p><code>as.roman(ch)</code> now correctly deals with more diverse
+character vectors <code>ch</code>; also arithmetic with the resulting
+roman numbers works in more cases.  (<a href="https://bugs.R-project.org/bugzilla3/show_bug.cgi?id=16779">PR#16779</a>)
+</p>
+</li>
+<li> <p><code>prcomp()</code> gains a new option <code>rank.</code> allowing to
+directly aim for less than <code>min(n,p)</code> PC's.  The
+<code>summary()</code> and its <code>print()</code> method have been amended,
+notably for this case.
+</p>
+</li>
+<li> <p><code>gzcon()</code> gains a new option <code>text</code>, which marks
+the connection as text-oriented (so e.g. <code>pushBack()</code>
+works).  It is still always opened in binary mode.
+</p>
+</li>
+<li><p> The <code>import()</code> namespace directive now accepts an
+argument <code>except</code> which names symbols to exclude from the
+imports. The <code>except</code> expression should evaluate to a
+character vector (after substituting symbols for strings). See
+Writing R Extensions.
+</p>
+</li>
+<li><p> New convenience function <code>Rcmd()</code> in package
+<span class="pkg">tools</span> for invoking <code>R CMD</code> tools from within <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span>.
+</p>
+</li>
+<li><p> New functions <code>makevars_user()</code> and
+<code>makevars_site()</code> in package <span class="pkg">tools</span> to determine the
+location of the user and site specific ‘<span class="file">Makevars</span>’ files for
+customizing package compilation.
+</p>
+</li></ul>
+
+
+
+
+<h4>UTILITIES</h4>
+
+
+<ul>
+<li> <p><code>R CMD check</code> has a new option
+<span class="option">--ignore-vignettes</span> for use with non-Sweave vignettes
+whose <span class="samp">VignetteBuilder</span> package is not available.
+</p>
+</li>
+<li> <p><code>R CMD check</code> now by default checks code usage
+(<em>via</em> <a href="https://CRAN.R-project.org/package=codetools"><span class="pkg">codetools</span></a>) with only the base package
+attached.  Functions from default packages other than <span class="pkg">base</span>
+which are used in the package code but not imported are reported
+as undefined globals, with a suggested addition to the
+<code>NAMESPACE</code> file.
+</p>
+</li>
+<li> <p><code>R CMD check --as-cran</code> now also checks DOIs in
+package ‘<span class="file">CITATION</span>’ and Rd files.
+</p>
+</li>
+<li> <p><code>R CMD Rdconv</code> and <code>R CMD Rd2pdf</code> each have
+a new option <span class="option">--RdMacros=pkglist</span> which allows Rd macros
+to be specified before processing.
+</p>
+</li></ul>
+
+
+
+
+<h4>DEPRECATED AND DEFUNCT</h4>
+
+
+<ul>
+<li><p> The previously included versions of <code>zlib</code>,
+<code>bzip2</code>, <code>xz</code> and PCRE have been removed, so suitable
+external (usually system) versions are required (see the
+‘R Installation and Administration’ manual).
+</p>
+</li>
+<li><p> The unexported and undocumented Windows-only devices
+<code>cairo_bmp()</code>, <code>cairo_png()</code> and <code>cairo_tiff()</code>
+have been removed.  (These devices should be used as
+e.g. <code>bmp(type = "cairo")</code>.)
+</p>
+</li>
+<li><p> (Windows only)  Function <code>setInternet2()</code> has no effect
+and will be removed in due course.  The choice between methods
+<code>"internal"</code> and <code>"wininet"</code> is now made by the
+<code>method</code> arguments of <code>url()</code> and <code>download.file()</code>
+and their defaults can be set <em>via</em> options.  The
+out-of-the-box default remains <code>"wininet"</code> (as it has been
+since <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> 3.2.2).
+</p>
+</li>
+<li> <p><code>[<-</code> with an S4 value into a list currently embeds the
+S4 object into its own list such that the end result is roughly
+equivalent to using <code>[[<-</code>.  That behavior is deprecated.  In
+the future, the S4 value will be coerced to a list with
+<code>as.list()</code>.
+</p>
+</li>
+<li><p> Package <span class="pkg">tools</span>' functions
+<code>package.dependencies()</code>, <code>pkgDepends()</code>, etc are
+deprecated now, mostly in favor of <code>package_dependencies()</code>
+which is both more flexible and efficient.
+</p>
+</li></ul>
+
+
+
+
+<h4>INSTALLATION and INCLUDED SOFTWARE</h4>
+
+
+<ul>
+<li><p> Support for very old versions of <code>valgrind</code>
+(e.g., 3.3.0) has been removed.
+</p>
+</li>
+<li><p> The included <code>libtool</code> script (generated by
+<code>configure</code>) has been updated to version 2.4.6 (from 2.2.6a).
+</p>
+</li>
+<li> <p><code>libcurl</code> version 7.28.0 or later with support for the
+<code>https</code> protocol is required for installation (except on
+Windows).
+</p>
+</li>
+<li><p> BSD networking is now required (except on Windows) and so
+<code>capabilities("http/ftp")</code> is always true.
+</p>
+</li>
+<li> <p><code>configure</code> uses <code>pkg-config</code> for PNG, TIFF
+and JPEG where this is available.  This should work better with
+multiple installs and with those using static libraries.
+</p>
+</li>
+<li><p> The minimum supported version of OS X is 10.6 (‘Snow
+Leopard’): even that has been unsupported by Apple since 2012.
+</p>
+</li>
+<li><p> The <code>configure</code> default on OS X is
+<span class="option">--disable-R-framework</span>: enable this if you intend to
+install under ‘<span class="file">/Library/Frameworks</span>’ and use with <code>R.app</code>.
+</p>
+</li>
+<li><p> The minimum preferred version of PCRE has since <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> 3.0.0
+been 8.32 (released in Nov 2012).  Versions 8.10 to 8.31 are now
+deprecated (with warnings from <code>configure</code>), but will
+still be accepted until <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> 3.4.0.
+</p>
+</li>
+<li> <p><code>configure</code> looks for C functions <code>__cospi</code>,
+<code>__sinpi</code> and <code>__tanpi</code> and uses these if <code>cospi</code>
+<em>etc</em> are not found.  (OS X is the main instance.)
+</p>
+</li>
+<li><p> (Windows) R is now built using <code>gcc</code>
+4.9.3.  This build will require recompilation of at least those packages
+that include C++ code, and possibly others.  A build of R-devel using
+the older toolchain will be temporarily available for comparison
+purposes.
+</p>
+<p>During the transition, the environment variable
+<span class="env">R_COMPILED_BY</span> has been defined to indicate which toolchain
+was used to compile R (and hence, which should be used to compile
+code in packages).  The <code>COMPILED_BY</code> variable described below
+will be a permanent replacement for this.
+</p>
+</li>
+<li><p> (Windows) A <code>make</code> and <code>R CMD config</code> variable
+named <code>COMPILED_BY</code> has been added.  This indicates
+which toolchain was used to compile R (and hence, which should be
+used to compile code in packages).
+</p>
+</li></ul>
+
+
+
+
+<h4>PACKAGE INSTALLATION</h4>
+
+
+<ul>
+<li><p> The <code>make</code> macro <code>AWK</code> which used to be made
+available to files such as ‘<span class="file">src/Makefile</span>’ is no longer set.
+</p>
+</li></ul>
+
+
+
+
+<h4>C-LEVEL FACILITIES</h4>
+
+
+<ul>
+<li><p> The API call <code>logspace_sum</code> introduced in <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> 3.2.0 is
+now remapped as an entry point to <code>Rf_logspace_sum</code>, and its
+first argument has gained a <code>const</code> qualifier.  (<a href="https://bugs.R-project.org/bugzilla3/show_bug.cgi?id=16470">PR#16470</a>)
+</p>
+<p>Code using it will need to be reinstalled.
+</p>
+<p>Similarly, entry point <code>log1pexp</code> also defined in
+‘<span class="file">Rmath.h</span>’ is remapped there to <code>Rf_log1pexp</code>
+</p>
+</li>
+<li> <p><code>R_GE_version</code> has been increased to <code>11</code>.
+</p>
+</li>
+<li><p> New API call <code>R_orderVector1</code>, a faster
+one-argument version of <code>R_orderVector</code>.
+</p>
+</li>
+<li><p> When <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> headers such as ‘<span class="file">R.h</span>’ and ‘<span class="file">Rmath.h</span>’ are
+called from C++ code in packages they include the C++ versions of
+system headers such as ‘<span class="file"><cmath></span>’ rather than the legacy
+headers such as ‘<span class="file"><math.h></span>’.  (Headers ‘<span class="file">Rinternals.h</span>’ and
+‘<span class="file">Rinterface.h</span>’ already did, and inclusion of system headers
+can still be circumvented by defining <code>NO_C_HEADERS</code>,
+including as from this version for those two headers.)
+</p>
+<p>The manual has long said that <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> headers should <b>not</b> be
+included within an <code>extern "C"</code> block, and almost all the
+packages affected by this change were doing so.
+</p>
+</li>
+<li><p> Including header ‘<span class="file">S.h</span>’ from C++ code would fail on some
+platforms, and so gives a compilation error on all.
+</p>
+</li>
+<li><p> The deprecated header ‘<span class="file">Rdefines.h</span>’ is now compatible
+with defining <code>R_NO_REMAP</code>.
+</p>
+</li>
+<li><p> The connections API now includes a function
+<code>R_GetConnection()</code> which allows packages implementing
+connections to convert R <code>connection</code> objects to
+<code>Rconnection</code> handles used in the API. Code which previously
+used the low-level R-internal <code>getConnection()</code> entry point
+should switch to the official API.
+</p>
+</li></ul>
+
+
+
+
+<h4>BUG FIXES</h4>
+
+
+<ul>
+<li><p> C-level <code>asChar(x)</code> is fixed for when <code>x</code> is not a
+vector, and it returns <code>"TRUE"</code>/<code>"FALSE"</code> instead of
+<code>"T"</code>/<code>"F"</code> for logical vectors.
+</p>
+</li>
+<li><p> The first arguments of <code>.colSums()</code> etc (with an
+initial dot) are now named <code>x</code> rather than <code>X</code> (matching
+<code>colSums()</code>): thus error messages are corrected.
+</p>
+</li>
+<li><p> A <code>coef()</code> method for class <code>"maov"</code> has been
+added to allow <code>vcov()</code> to work with multivariate
+results. (<a href="https://bugs.R-project.org/bugzilla3/show_bug.cgi?id=16380">PR#16380</a>)
+</p>
+</li>
+<li> <p><code>method = "libcurl"</code> connections signal errors rather
+than retrieving HTTP error pages (where the ISP reports the
+error).
+</p>
+</li>
+<li> <p><code>xpdrows.data.frame()</code> was not checking for unique
+row names; in particular, this affected assignment to non-existing
+rows <em>via</em> numerical indexing. (<a href="https://bugs.R-project.org/bugzilla3/show_bug.cgi?id=16570">PR#16570</a>)
+</p>
+</li>
+<li> <p><code>tail.matrix()</code> did not work for zero rows matrices,
+and could produce row “labels” such as <code>"[1e+05,]"</code>.
+</p>
+</li>
+<li><p> Data frames with a column named <code>"stringsAsFactors"</code>
+now format and print correctly.  (<a href="https://bugs.R-project.org/bugzilla3/show_bug.cgi?id=16580">PR#16580</a>)
+</p>
+</li>
+<li> <p><code>cor()</code> is now guaranteed to return a value with
+absolute value less than or equal to 1. (<a href="https://bugs.R-project.org/bugzilla3/show_bug.cgi?id=16638">PR#16638</a>)
+</p>
+</li>
+<li><p> Array subsetting now keeps <code>names(dim(.))</code>.
+</p>
+</li>
+<li><p> Blocking socket connection selection recovers more
+gracefully on signal interrupts.
+</p>
+</li>
+<li><p> The <code>data.frame</code> method of <code>rbind()</code> construction
+<code>row.names</code> works better in borderline integer cases, but
+may change the names assigned.  (<a href="https://bugs.R-project.org/bugzilla3/show_bug.cgi?id=16666">PR#16666</a>)
+</p>
+</li>
+<li><p> (X11 only)  <code>getGraphicsEvent()</code> miscoded buttons and
+missed mouse motion events.  (<a href="https://bugs.R-project.org/bugzilla3/show_bug.cgi?id=16700">PR#16700</a>)
+</p>
+</li>
+<li> <p><code>methods(round)</code> now also lists <code>round.POSIXt</code>.
+</p>
+</li>
+<li> <p><code>tar()</code> now works with the default <code>files = NULL</code>.
+(<a href="https://bugs.R-project.org/bugzilla3/show_bug.cgi?id=16716">PR#16716</a>)
+</p>
+</li>
+<li><p> Jumps to outer contexts, for example in error recovery, now
+make intermediate jumps to contexts where <code>on.exit()</code> actions
+are established instead of trying to run all <code>on.exit()</code>
+actions before jumping to the final target. This unwinds the stack
+gradually, releases resources held on the stack, and significantly
+reduces the chance of a segfault when running out of C stack
+space. Error handlers established using
+<code>withCallingHandlers()</code> and <code>options("error")</code>
+specifications are ignored when handling a C stack overflow error
+as attempting one of these would trigger a cascade of C stack
+overflow errors.  (These changes resolve <a href="https://bugs.R-project.org/bugzilla3/show_bug.cgi?id=16753">PR#16753</a>.)
+</p>
+</li>
+<li><p> The spacing could be wrong when printing a complex array.
+(Report and patch by Lukas Stadler.)
+</p>
+</li>
+<li> <p><code>pretty(d, n, min.n, *)</code> for date-time objects <code>d</code>
+works again in border cases with large <code>min.n</code>, returns a
+<code>labels</code> attribute also for small-range dates and in such cases
+its returned length is closer to the desired <code>n</code>.  (<a href="https://bugs.R-project.org/bugzilla3/show_bug.cgi?id=16761">PR#16761</a>)
+Additionally, it finally does cover the range of <code>d</code>, as it
+always claimed.
+</p>
+</li>
+<li> <p><code>tsp(x) <- NULL</code> did not handle correctly objects
+inheriting from both <code>"ts"</code> and <code>"mts"</code>.  (<a href="https://bugs.R-project.org/bugzilla3/show_bug.cgi?id=16769">PR#16769</a>)
+</p>
+</li>
+<li> <p><code>install.packages()</code> could give false errors when
+<code>options("pkgType")</code> was <code>"binary"</code>.  (Reported by
+Jose Claudio Faria.)
+</p>
+</li>
+<li><p> A bug fix in <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> 3.0.2 fixed problems with <code>locator()</code>
+in X11, but introduced problems in Windows.  Now both should be
+fixed.  (<a href="https://bugs.R-project.org/bugzilla3/show_bug.cgi?id=15700">PR#15700</a>)
+</p>
+</li>
+<li> <p><code>download.file()</code> with <code>method = "wininet"</code>
+incorrectly warned of download file length difference when
+reported length was unknown. (<a href="https://bugs.R-project.org/bugzilla3/show_bug.cgi?id=16805">PR#16805</a>)
+</p>
+</li>
+<li> <p><code>diag(NULL, 1)</code> crashed because of missed type
+checking.  (<a href="https://bugs.R-project.org/bugzilla3/show_bug.cgi?id=16853">PR#16853</a>)
+</p>
+</li></ul>
+
+
+
+
+<h3><img src="../help/figures/../../html/Rlogo.svg" class="toplogo" alt="[R logo]" /> CHANGES IN R 3.2.5</h3>
+
+
+
+<h4>BUG FIXES</h4>
+
+
+<ul>
+<li> <p><code>format.POSIXlt()</code> behaved incorrectly in <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> 3.2.4.
+E.g. the output of
+<code>format(as.POSIXlt(paste0(1940:2000,"-01-01"), tz = "CET"),
+	usetz = TRUE)</code> ended in two <code>"CEST"</code> time formats.
+</p>
+</li></ul>
+
+
+
+
+<h3><img src="../help/figures/../../html/Rlogo.svg" class="toplogo" alt="[R logo]" /> CHANGES IN R 3.2.4</h3>
+
+
+
+<h4>NEW FEATURES</h4>
+
+
+<ul>
+<li> <p><code>install.packages()</code> and related functions now give a
+more informative warning when an attempt is made to install a base
+package.
+</p>
+</li>
+<li> <p><code>summary(x)</code> now prints with less rounding when
+<code>x</code> contains infinite values. (Request of <a href="https://bugs.R-project.org/bugzilla3/show_bug.cgi?id=16620">PR#16620</a>.)
+</p>
+</li>
+<li> <p><code>provideDimnames()</code> gets an optional <code>unique</code> argument.
+</p>
+</li>
+<li> <p><code>shQuote()</code> gains <code>type = "cmd2"</code> for quoting
+in <code>cmd.exe</code> in Windows.  (Response to <a href="https://bugs.R-project.org/bugzilla3/show_bug.cgi?id=16636">PR#16636</a>.)
+</p>
+</li>
+<li><p> The <code>data.frame</code> method of <code>rbind()</code> gains an
+optional argument <code>stringsAsFactors</code> (instead of only
+depending on <code>getOption("stringsAsFactors")</code>).
+</p>
+</li>
+<li> <p><code>smooth(x, *)</code> now also works for long vectors.
+</p>
+</li>
+<li> <p><code>tools::texi2dvi()</code> has a workaround for problems with
+the <code>texi2dvi</code> script supplied by <span class="pkg">texinfo 6.1</span>.
+</p>
+<p>It extracts more error messages from the LaTeX logs when in
+emulation mode.
+</p>
+</li></ul>
+
+
+
+
+<h4>UTILITIES</h4>
+
+
+<ul>
+<li> <p><code>R CMD check</code> will leave a log file
+‘<span class="file">build_vignettes.log</span>’ from the re-building of vignettes in
+the ‘<span class="file">.Rcheck</span>’ directory if there is a problem, and always if
+environment variable <span class="env">_R_CHECK_ALWAYS_LOG_VIGNETTE_OUTPUT_</span> is
+set to a true value.
+</p>
+</li></ul>
+
+
+
+
+<h4>DEPRECATED AND DEFUNCT</h4>
+
+
+<ul>
+<li><p> Use of <span class="samp">SUPPORT_OPENMP</span> from header ‘<span class="file">Rconfig.h</span>’ is
+deprecated in favour of the standard OpenMP define <span class="samp">_OPENMP</span>.
+</p>
+<p>(This has been the recommendation in the manual for a while now.)
+</p>
+</li>
+<li><p> The <code>make</code> macro <code>AWK</code> which is long unused by
+<span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> itself but recorded in file ‘<span class="file">etc/Makeconf</span>’ is deprecated
+and will be removed in <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> 3.3.0.
+</p>
+</li>
+<li><p> The C header file ‘<span class="file">S.h</span>’ is no longer documented: its
+use should be replaced by ‘<span class="file">R.h</span>’.
+</p>
+</li></ul>
+
+
+
+
+<h4>BUG FIXES</h4>
+
+
+<ul>
+<li> <p><code>kmeans(x, centers = <1-row>)</code> now works. (<a href="https://bugs.R-project.org/bugzilla3/show_bug.cgi?id=16623">PR#16623</a>)
+</p>
+</li>
+<li> <p><code>Vectorize()</code> now checks for clashes in argument names.
+(<a href="https://bugs.R-project.org/bugzilla3/show_bug.cgi?id=16577">PR#16577</a>)
+</p>
+</li>
+<li> <p><code>file.copy(overwrite = FALSE)</code> would signal a successful
+copy when none had taken place.  (<a href="https://bugs.R-project.org/bugzilla3/show_bug.cgi?id=16576">PR#16576</a>)
+</p>
+</li>
+<li> <p><code>ngettext()</code> now uses the same default domain as
+<code>gettext()</code>.  (<a href="https://bugs.R-project.org/bugzilla3/show_bug.cgi?id=14605">PR#14605</a>)
+</p>
+</li>
+<li> <p><code>array(.., dimnames = *)</code> now warns about
+non-<code>list</code> dimnames and, from <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> 3.3.0, will signal the same
+error for invalid dimnames as <code>matrix()</code> has always done.
+</p>
+</li>
+<li> <p><code>addmargins()</code> now adds dimnames for the extended
+margins in all cases, as always documented.
+</p>
+</li>
+<li> <p><code>heatmap()</code> evaluated its <code>add.expr</code> argument
+in the wrong environment.  (<a href="https://bugs.R-project.org/bugzilla3/show_bug.cgi?id=16583">PR#16583</a>)
+</p>
+</li>
+<li> <p><code>require()</code> etc now give the correct entry of
+<code>lib.loc</code> in the warning about an old version of a package
+masking a newer required one.
+</p>
+</li>
+<li><p> The internal deparser did not add parentheses when
+necessary,  e.g. before <code>[]</code> or <code>[[]]</code>.  (Reported by
+Lukas Stadler; additional fixes included as well).
+</p>
+</li>
+<li> <p><code>as.data.frame.vector(*, row.names=*)</code> no longer
+produces ‘corrupted’ data frames from row names of incorrect
+length, but rather warns about them.  This will become an error.
+</p>
+</li>
+<li> <p><code>url</code> connections with <code>method = "libcurl"</code> are
+destroyed properly. (<a href="https://bugs.R-project.org/bugzilla3/show_bug.cgi?id=16681">PR#16681</a>)
+</p>
+</li>
+<li> <p><code>withCallingHandler()</code> now (again) handles warnings
+even during S4 generic's argument evaluation.  (<a href="https://bugs.R-project.org/bugzilla3/show_bug.cgi?id=16111">PR#16111</a>)
+</p>
+</li>
+<li> <p><code>deparse(..., control = "quoteExpressions")</code>
+incorrectly quoted empty expressions.  (<a href="https://bugs.R-project.org/bugzilla3/show_bug.cgi?id=16686">PR#16686</a>)
+</p>
+</li>
+<li> <p><code>format()</code>ting datetime objects (<code>"POSIX[cl]?t"</code>)
+could segfault or recycle wrongly.  (<a href="https://bugs.R-project.org/bugzilla3/show_bug.cgi?id=16685">PR#16685</a>)
+</p>
+</li>
+<li> <p><code>plot.ts(<matrix>, las = 1)</code> now does use <code>las</code>.
+</p>
+</li>
+<li> <p><code>saveRDS(*, compress = "gzip")</code> now works as
+documented.  (<a href="https://bugs.R-project.org/bugzilla3/show_bug.cgi?id=16653">PR#16653</a>)
+</p>
+</li>
+<li><p> (Windows only) The <code>Rgui</code> front end did not
+always initialize the console properly, and could cause
+<span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> to crash.  (<a href="https://bugs.R-project.org/bugzilla3/show_bug.cgi?id=16698">PR#16698</a>)
+</p>
+</li>
+<li> <p><code>dummy.coef.lm()</code> now works in more cases, thanks to a
+proposal by Werner Stahel (<a href="https://bugs.R-project.org/bugzilla3/show_bug.cgi?id=16665">PR#16665</a>).  In addition, it now works
+for multivariate linear models (<code>"mlm"</code>, <code>manova</code>)
+thanks to a proposal by Daniel Wollschlaeger.
+</p>
+</li>
+<li><p> The <code>as.hclust()</code> method for <code>"dendrogram"</code>s
+failed often when there were ties in the heights.
+</p>
+</li>
+<li> <p><code>reorder()</code> and <code>midcache.dendrogram()</code> now are
+non-recursive and hence applicable to somewhat deeply nested
+dendrograms, thanks to a proposal by Suharto Anggono in <a href="https://bugs.R-project.org/bugzilla3/show_bug.cgi?id=16424">PR#16424</a>.
+</p>
+</li>
+<li> <p><code>cor.test()</code> now calculates very small p values
+more accurately (affecting the result only in extreme not
+statistically relevant cases).  (<a href="https://bugs.R-project.org/bugzilla3/show_bug.cgi?id=16704">PR#16704</a>)
+</p>
+</li>
+<li> <p><code>smooth(*, do.ends=TRUE)</code> did not always work correctly
+in <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> versions between 3.0.0 and 3.2.3.
+</p>
+</li>
+<li> <p><code>pretty(D)</code> for date-time objects <code>D</code> now also
+works well if <code>range(D)</code> is (much) smaller than a second.  In
+the case of only one unique value in <code>D</code>, the pretty range
+now is more symmetric around that value than previously.
+<br />
+Similarly, <code>pretty(dt)</code> no longer returns a length 5 vector
+with duplicated entries for <code>Date</code> objects <code>dt</code> which
+span only a few days.
+</p>
+</li>
+<li><p> The figures in help pages such as <code>?points</code> were
+accidentally damaged, and did not appear in <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> 3.2.3.
+(<a href="https://bugs.R-project.org/bugzilla3/show_bug.cgi?id=16708">PR#16708</a>)
+</p>
+</li>
+<li> <p><code>available.packages()</code> sometimes deleted the wrong
+file when cleaning up temporary files.  (<a href="https://bugs.R-project.org/bugzilla3/show_bug.cgi?id=16712">PR#16712</a>)
+</p>
+</li>
+<li><p> The <code>X11()</code> device sometimes froze on Red Hat
+Enterprise Linux 6. It now waits for <code>MapNotify</code> events
+instead of <code>Expose</code> events, thanks to Siteshwar
+Vashisht. (<a href="https://bugs.R-project.org/bugzilla3/show_bug.cgi?id=16497">PR#16497</a>)
+</p>
+</li>
+<li> <p><code>[dpqr]nbinom(*, size=Inf, mu=.)</code> now works as limit
+case, for ‘dpq’ as the Poisson.  (<a href="https://bugs.R-project.org/bugzilla3/show_bug.cgi?id=16727">PR#16727</a>)<br />
+<code>pnbinom()</code> no longer loops infinitely in border cases.
+</p>
+</li>
+<li> <p><code>approxfun(*, method="constant")</code> and hence <code>ecdf()</code>
+which calls the former now correctly “predict” <code>NaN</code>
+values as <code>NaN</code>.
+</p>
+</li>
+<li> <p><code>summary.data.frame()</code> now displays <code>NA</code>s in
+<code>Date</code> columns in all cases.  (<a href="https://bugs.R-project.org/bugzilla3/show_bug.cgi?id=16709">PR#16709</a>)
+</p>
+</li></ul>
+
+
+
+
+<h3><img src="../help/figures/../../html/Rlogo.svg" class="toplogo" alt="[R logo]" /> CHANGES IN R 3.2.3</h3>
+
+
+
+<h4>NEW FEATURES</h4>
+
+
+<ul>
+<li><p> Some recently-added Windows time zone names have been added
+to the conversion table used to convert these to Olson names.
+(Including those relating to changes for Russia in Oct 2014, as in
+<a href="https://bugs.R-project.org/bugzilla3/show_bug.cgi?id=16503">PR#16503</a>.)
+</p>
+</li>
+<li><p> (Windows) Compatibility information has been added to the
+manifests for ‘<span class="file">Rgui.exe</span>’, ‘<span class="file">Rterm.exe</span>’ and
+‘<span class="file">Rscript.exe</span>’.  This should allow <code>win.version()</code> and
+<code>Sys.info()</code> to report the actual Windows version up to
+Windows 10.
+</p>
+</li>
+<li><p> Windows <code>"wininet"</code> FTP first tries EPSV / PASV mode
+rather than only using active mode (reported by Dan Tenenbaum).
+
+</p>
+</li>
+<li> <p><code>which.min(x)</code> and <code>which.max(x)</code> may be much
+faster for logical and integer <code>x</code> and now also work for long
+vectors.
+</p>
+</li>
+<li><p> The ‘emulation’ part of <code>tools::texi2dvi()</code> has
+been somewhat enhanced, including supporting <code>quiet = TRUE</code>.
+It can be selected by <code>texi2dvi = "emulation"</code>.
+</p>
+<p>(Windows) MiKTeX removed its <code>texi2dvi.exe</code> command in Sept
+2015: <code>tools::texi2dvi()</code> tries <code>texify.exe</code> if it is
+not found.
+</p>
+</li>
+<li><p> (Windows only) Shortcuts for printing and saving have
+been added to menus in <code>Rgui.exe</code>.  (Request of <a href="https://bugs.R-project.org/bugzilla3/show_bug.cgi?id=16572">PR#16572</a>.)
+</p>
+</li>
+<li> <p><code>loess(..., iterTrace=TRUE)</code> now provides diagnostics
+for robustness iterations, and the <code>print()</code> method for
+<code>summary(<loess>)</code> shows slightly more.
+</p>
+</li>
+<li><p> The included version of PCRE has been updated to 8.38, a
+bug-fix release.
+</p>
+</li>
+<li> <p><code>View()</code> now displays nested data frames in a more
+friendly way.  (Request with patch in <a href="https://bugs.R-project.org/bugzilla3/show_bug.cgi?id=15915">PR#15915</a>.)
+</p>
+</li></ul>
+
+
+
+
+<h4>INSTALLATION and INCLUDED SOFTWARE</h4>
+
+
+<ul>
+<li><p> The included configuration code for <code>libintl</code> has been
+updated to that from <code>gettext</code> version 0.19.5.1 — this
+should only affect how an external library is detected (and the
+only known instance is under OpenBSD).  (Wish of <a href="https://bugs.R-project.org/bugzilla3/show_bug.cgi?id=16464">PR#16464</a>.)
+</p>
+</li>
+<li> <p><code>configure</code> has a new argument
+<span class="option">--disable-java</span> to disable the checks for Java.
+</p>
+</li>
+<li><p> The <code>configure</code> default for <code>MAIN_LDFLAGS</code> has
+been changed for the FreeBSD, NetBSD and Hurd OSes to one more
+likely to work with compilers other than <code>gcc</code> (FreeBSD 10
+defaults to <code>clang</code>).
+</p>
+</li>
+<li> <p><code>configure</code> now supports the OpenMP flags
+<span class="option">-fopenmp=libomp</span> (clang) and <span class="option">-qopenmp</span> (Intel C).
+</p>
+</li>
+<li><p> Various macros can be set to override the default
+behaviour of <code>configure</code> when detecting OpenMP: see file
+‘<span class="file">config.site</span>’.
+</p>
+</li>
+<li><p> Source installation on Windows has been modified to allow
+for MiKTeX installations without <code>texi2dvi.exe</code>.  See file
+‘<span class="file">MkRules.dist</span>’.
+</p>
+</li></ul>
+
+
+
+
+<h4>BUG FIXES</h4>
+
+
+<ul>
+<li> <p><code>regexpr(pat, x, perl = TRUE)</code> with Python-style named
+capture did not work correctly when <code>x</code> contained <code>NA</code>
+strings.  (<a href="https://bugs.R-project.org/bugzilla3/show_bug.cgi?id=16484">PR#16484</a>)
+</p>
+</li>
+<li><p> The description of dataset <code>ToothGrowth</code> has been
+improved/corrected.  (<a href="https://bugs.R-project.org/bugzilla3/show_bug.cgi?id=15953">PR#15953</a>)
+</p>
+</li>
+<li> <p><code>model.tables(type = "means")</code> and hence
+<code>TukeyHSD()</code> now support <code>"aov"</code> fits without an
+intercept term.  (<a href="https://bugs.R-project.org/bugzilla3/show_bug.cgi?id=16437">PR#16437</a>)
+</p>
+</li>
+<li> <p><code>close()</code> now reports the status of a <code>pipe()</code>
+connection opened with an explicit <code>open</code> argument.
+(<a href="https://bugs.R-project.org/bugzilla3/show_bug.cgi?id=16481">PR#16481</a>)
+</p>
+</li>
+<li><p> Coercing a list without names to a data frame is faster if
+the elements are very long. (<a href="https://bugs.R-project.org/bugzilla3/show_bug.cgi?id=16467">PR#16467</a>)
+</p>
+</li>
+<li><p> (Unix-only) Under some rare circumstances piping the output
+from <code>Rscript</code> or <code>R -f</code> could result in
+attempting to close the input file twice, possibly crashing the
+process.  (<a href="https://bugs.R-project.org/bugzilla3/show_bug.cgi?id=16500">PR#16500</a>)
+</p>
+</li>
+<li><p> (Windows) <code>Sys.info()</code> was out of step with
+<code>win.version()</code> and did not report Windows 8.
+</p>
+</li>
+<li> <p><code>topenv(baseenv())</code> returns <code>baseenv()</code> again as
+in <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> 3.1.0 and earlier.  This also fixes <code>compilerJIT(3)</code>
+when used in ‘<span class="file">.Rprofile</span>’.
+</p>
+</li>
+<li> <p><code>detach()</code>ing the <span class="pkg">methods</span> package keeps
+<code>.isMethodsDispatchOn()</code> true, as long as the methods
+namespace is not unloaded.
+</p>
+</li>
+<li><p> Removed some spurious warnings from <code>configure</code> about the
+preprocessor not finding header files.  (<a href="https://bugs.R-project.org/bugzilla3/show_bug.cgi?id=15989">PR#15989</a>)
+</p>
+</li>
+<li> <p><code>rchisq(*, df=0, ncp=0)</code> now returns <code>0</code> instead
+of <code>NaN</code>, and <code>dchisq(*, df=0, ncp=*)</code> also no longer
+returns <code>NaN</code> in limit cases (where the limit is unique).
+(<a href="https://bugs.R-project.org/bugzilla3/show_bug.cgi?id=16521">PR#16521</a>)
+</p>
+</li>
+<li> <p><code>pchisq(*, df=0, ncp > 0, log.p=TRUE)</code> no longer
+underflows (for ncp > ~60).
+</p>
+</li>
+<li> <p><code>nchar(x, "w")</code> returned -1 for characters it did not
+know about (e.g. zero-width spaces): it now assumes 1.
+It now knows about most zero-width characters and a few more
+double-width characters.
+</p>
+</li>
+<li><p> Help for <code>which.min()</code> is now more precise about
+behavior with logical arguments.  (<a href="https://bugs.R-project.org/bugzilla3/show_bug.cgi?id=16532">PR#16532</a>)
+</p>
+</li>
+<li><p> The print width of character strings marked as
+<code>"latin1"</code> or <code>"bytes"</code> was in some cases computed
+incorrectly.
+</p>
+</li>
+<li> <p><code>abbreviate()</code> did not give names to the return value
+if <code>minlength</code> was zero, unlike when it was positive.
+</p>
+</li>
+<li><p> (Windows only) <code>dir.create()</code> did not always warn
+when it failed to create a directory.  (<a href="https://bugs.R-project.org/bugzilla3/show_bug.cgi?id=16537">PR#16537</a>)
+</p>
+</li>
+<li><p> When operating in a non-UTF-8 multibyte locale
+(e.g. an East Asian locale on Windows), <code>grep()</code> and
+related functions did not handle UTF-8 strings properly.
+(<a href="https://bugs.R-project.org/bugzilla3/show_bug.cgi?id=16264">PR#16264</a>)
+</p>
+</li>
+<li> <p><code>read.dcf()</code> sometimes misread lines longer than 8191
+characters.  (Reported by Hervé Pagès with a patch.)
+</p>
+</li>
+<li> <p><code>within(df, ..)</code> no longer drops columns whose name
+start with a <code>"."</code>.
+</p>
+</li>
+<li><p> The built-in <code>HTTP</code> server converted entire
+<code>Content-Type</code> to lowercase including parameters which
+can cause issues for multi-part form boundaries (<a href="https://bugs.R-project.org/bugzilla3/show_bug.cgi?id=16541">PR#16541</a>).
+</p>
+</li>
+<li><p> Modifying slots of S4 objects could fail when the
+<span class="pkg">methods</span> package was not attached. (<a href="https://bugs.R-project.org/bugzilla3/show_bug.cgi?id=16545">PR#16545</a>)
+</p>
+</li>
+<li> <p><code>splineDesign(*, outer.ok=TRUE)</code> (<span class="pkg">splines</span>) is better now
+(<a href="https://bugs.R-project.org/bugzilla3/show_bug.cgi?id=16549">PR#16549</a>), and <code>interpSpline()</code> now allows <code>sparse=TRUE</code>
+for speedup with non-small sizes.
+</p>
+</li>
+<li><p> If the expression in the traceback was too long,
+<code>traceback()</code> did not report the source line number.  (Patch
+by Kirill Müller.)
+</p>
+</li>
+<li><p> The browser did not truncate the display of the function when
+exiting with <code>options("deparse.max.lines")</code> set.
+(<a href="https://bugs.R-project.org/bugzilla3/show_bug.cgi?id=16581">PR#16581</a>)
+</p>
+</li>
+<li><p> When <code>bs(*, Boundary.knots=)</code> had boundary knots inside
+the data range, extrapolation was somewhat off.  (Patch by Trevor
+Hastie.)
+</p>
+</li>
+<li> <p><code>var()</code> and hence <code>sd()</code> warn about
+<code>factor</code> arguments which are deprecated now. (<a href="https://bugs.R-project.org/bugzilla3/show_bug.cgi?id=16564">PR#16564</a>)
+</p>
+</li>
+<li> <p><code>loess(*, weights = *)</code> stored wrong weights and hence
+gave slightly wrong predictions for <code>newdata</code>.  (<a href="https://bugs.R-project.org/bugzilla3/show_bug.cgi?id=16587">PR#16587</a>)
+</p>
+</li>
+<li> <p><code>aperm(a, *)</code> now preserves <code>names(dim(a))</code>.
+</p>
+</li>
+<li> <p><code>poly(x, ..)</code> now works when either <code>raw=TRUE</code> or
+<code>coef</code> is specified.  (<a href="https://bugs.R-project.org/bugzilla3/show_bug.cgi?id=16597">PR#16597</a>)
+</p>
+</li>
+<li> <p><code>data(package=*)</code> is more careful in determining the path.
+</p>
+</li>
+<li> <p><code>prettyNum(*, decimal.mark, big.mark)</code>: fixed bug
+introduced when fixing <a href="https://bugs.R-project.org/bugzilla3/show_bug.cgi?id=16411">PR#16411</a>.
+</p>
+</li></ul>
+
+
+
+
+<h3><img src="../help/figures/../../html/Rlogo.svg" class="toplogo" alt="[R logo]" /> CHANGES IN R 3.2.2</h3>
+
+
+
+<h4>SIGNIFICANT USER-VISIBLE CHANGES</h4>
+
+
+<ul>
+<li><p> It is now easier to use secure downloads from
+<span class="samp">https://</span> URLs on builds which support them: no longer do
+non-default options need to be selected to do so.  In particular,
+packages can be installed from repositories which offer
+<span class="samp">https://</span> URLs, and those listed by <code>setRepositories()</code>
+now do so (for some of their mirrors).
+</p>
+<p>Support for <span class="samp">https://</span> URLs is available on Windows, and on
+other platforms if support for <code>libcurl</code> was compiled in and
+if that supports the <code>https</code> protocol (system installations
+can be expected to do).  So <span class="samp">https://</span> support can be
+expected except on rather old OSes (an example being OS X
+‘Snow Leopard’, where a non-system version of
+<code>libcurl</code> can be used).
+</p>
+<p>(Windows only) The default method for accessing URLs <em>via</em>
+<code>download.file()</code> and <code>url()</code> has been changed to be
+<code>"wininet"</code> using Windows API calls.  This changes the way
+proxies need to be set and security settings made: there have been
+some reports of <span class="samp">ftp:</span> sites being inaccessible under the new default
+method (but the previous methods remain available).
+</p>
+</li></ul>
+
+
+
+
+<h4>NEW FEATURES</h4>
+
+
+<ul>
+<li> <p><code>cmdscale()</code> gets new option <code>list.</code> for increased
+flexibility when a list should be returned.
+</p>
+</li>
+<li> <p><code>configure</code> now supports <code>texinfo</code> version 6.0,
+which (unlike the change from 4.x to 5.0) is a minor update.
+(Wish of <a href="https://bugs.R-project.org/bugzilla3/show_bug.cgi?id=16456">PR#16456</a>.)
+</p>
+</li>
+<li><p> (Non-Windows only) <code>download.file()</code> with default
+<code>method = "auto"</code> now chooses <code>"libcurl"</code> if that is
+available and a <span class="samp">https://</span> or <span class="samp">ftps://</span> URL is used.
+</p>
+</li>
+<li><p> (Windows only) <code>setInternet2(TRUE)</code> is now the default.
+The command-line option <code>--internet2</code> and environment
+variable <span class="env">R_WIN_INTERNET2</span> are now ignored.
+</p>
+<p>Thus by default the <code>"internal"</code> method for
+<code>download.file()</code> and <code>url()</code> uses the <code>"wininet"</code>
+method: to revert to the previous default use
+<code>setInternet2(FALSE)</code>.
+</p>
+<p>This means that <span class="samp">https://</span> URLs can be read by default by
+<code>download.file()</code> (they have been readable by <code>file()</code>
+and <code>url()</code> since <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> 3.2.0).
+</p>
+<p>There are implications for how proxies need to be set (see
+<code>?download.file</code>).
+</p>
+</li>
+<li> <p><code>chooseCRANmirror()</code> and <code>chooseBioCmirror()</code> now
+offer HTTPS mirrors in preference to HTTP mirrors.  This changes
+the interpretation of their <code>ind</code> arguments: see their help
+pages.
+</p>
+</li>
+<li> <p><code>capture.output()</code> gets optional arguments <code>type</code>
+and <code>split</code> to pass to <code>sink()</code>, and hence can be used to
+capture messages.
+</p>
+</li></ul>
+
+
+
+
+<h4>C-LEVEL FACILITIES</h4>
+
+
+<ul>
+<li><p> Header ‘<span class="file">Rconfig.h</span>’ now defines <code>HAVE_ALLOCA_H</code> if
+the platform has the ‘<span class="file">alloca.h</span>’ header (it is needed to
+define <code>alloca</code> on Solaris and AIX, at least: see
+‘Writing R Extensions’ for how to use it).
+</p>
+</li></ul>
+
+
+
+
+<h4>INSTALLATION and INCLUDED SOFTWARE</h4>
+
+
+<ul>
+<li><p> The <code>libtool</code> script generated by
+<code>configure</code> has been modified to support FreeBSD >= 10
+(<a href="https://bugs.R-project.org/bugzilla3/show_bug.cgi?id=16410">PR#16410</a>).
+</p>
+</li></ul>
+
+
+
+
+<h4>BUG FIXES</h4>
+
+
+<ul>
+<li><p> The HTML help page links to demo code failed due to a change
+in <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> 3.2.0.  (<a href="https://bugs.R-project.org/bugzilla3/show_bug.cgi?id=16432">PR#16432</a>)
+</p>
+</li>
+<li><p> If the <code>na.action</code> argument was used in
+<code>model.frame()</code>, the original data could be
+modified. (<a href="https://bugs.R-project.org/bugzilla3/show_bug.cgi?id=16436">PR#16436</a>)
+</p>
+</li>
+<li> <p><code>getGraphicsEvent()</code> could cause a crash if a graphics
+window was closed while it was in use. (<a href="https://bugs.R-project.org/bugzilla3/show_bug.cgi?id=16438">PR#16438</a>)
+</p>
+</li>
+<li> <p><code>matrix(x, nr, nc, byrow = TRUE)</code> failed if <code>x</code>
+was an object of type <code>"expression"</code>.
+</p>
+</li>
+<li> <p><code>strptime()</code> could overflow the allocated storage on
+the C stack when the timezone had a non-standard format much
+longer than the standard formats. (Part of <a href="https://bugs.R-project.org/bugzilla3/show_bug.cgi?id=16328">PR#16328</a>.)
+</p>
+</li>
+<li> <p><code>options(OutDec = s)</code> now signals a warning (which will
+become an error in the future) when <code>s</code> is not a string with
+exactly one character, as that has been a documented requirement.
+</p>
+</li>
+<li> <p><code>prettyNum()</code> gains a new option <code>input.d.mark</code>
+which together with other changes, e.g., the default for
+<code>decimal.mark</code>, fixes some <code>format()</code>ting variants with
+non-default <code>getOption("OutDec")</code> such as in <a href="https://bugs.R-project.org/bugzilla3/show_bug.cgi?id=16411">PR#16411</a>.
+</p>
+</li>
+<li> <p><code>download.packages()</code> failed for <code>type</code> equal to
+either <code>"both"</code> or <code>"binary"</code>.  (Reported by Dan
+Tenenbaum.)
+</p>
+</li>
+<li><p> The <code>dendrogram</code> method of <code>labels()</code> is much more
+efficient for large dendrograms, now using <code>rapply()</code>.
+(Comment #15 of <a href="https://bugs.R-project.org/bugzilla3/show_bug.cgi?id=15215">PR#15215</a>)
+</p>
+</li>
+<li><p> The <code>"port"</code> algorithm of <code>nls()</code> could give
+spurious errors.  (Reported by Radford Neal.)
+</p>
+</li>
+<li><p> Reference classes that inherited from reference classes in
+another package could invalidate methods of the inherited
+class. Fixing this requires adding the ability for methods to be
+“external”, with the object supplied explicitly as the first
+argument, named <code>.self</code>. See "Inter-Package Superclasses"
+in the documentation.
+</p>
+</li>
+<li> <p><code>readBin()</code> could fail on the SPARC architecture
+due to alignment issues.  (Reported by Radford Neal.)
+</p>
+</li>
+<li> <p><code>qt(*, df=Inf, ncp=.)</code> now uses the natural
+<code>qnorm()</code> limit instead of returning <code>NaN</code>. (<a href="https://bugs.R-project.org/bugzilla3/show_bug.cgi?id=16475">PR#16475</a>)
+</p>
+</li>
+<li><p> Auto-printing of S3 and S4 values now searches for
+<code>print()</code> in the base namespace and <code>show()</code> in the
+<span class="pkg">methods</span> namespace instead of searching the global
+environment.
+</p>
+</li>
+<li> <p><code>polym()</code> gains a <code>coefs = NULL</code> argument and
+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.
+
+</p>
+</li>
+<li> <p><code>rhyper(nn, <large>)</code> now works correctly. (<a href="https://bugs.R-project.org/bugzilla3/show_bug.cgi?id=16489">PR#16489</a>)
+</p>
+</li>
+<li> <p><code>ttkimage()</code> did not (and could not) work so was
+removed. Ditto for <code>tkimage.cget()</code> and
+<code>tkimage.configure()</code>. Added two Ttk widgets and missing
+subcommands for Tk's <code>image</code> command:
+<code>ttkscale()</code>,
+<code>ttkspinbox()</code>,
+<code>tkimage.delete()</code>,
+<code>tkimage.height()</code>,
+<code>tkimage.inuse()</code>,
+<code>tkimage.type()</code>,
+<code>tkimage.types()</code>,
+<code>tkimage.width()</code>. (<a href="https://bugs.R-project.org/bugzilla3/show_bug.cgi?id=15372">PR#15372</a>, <a href="https://bugs.R-project.org/bugzilla3/show_bug.cgi?id=16450">PR#16450</a>)
+</p>
+</li>
+<li> <p><code>getClass("foo")</code> now also returns a class definition when it is
+found in the cache more than once.
+</p>
+</li></ul>
+
+
+
+
+<h3><img src="../help/figures/../../html/Rlogo.svg" class="toplogo" alt="[R logo]" /> CHANGES IN R 3.2.1</h3>
+
+
+
+<h4>NEW FEATURES</h4>
+
+
+<ul>
+<li> <p><code>utf8ToInt()</code> now checks that its input is valid UTF-8
+and returns <code>NA</code> if it is not.
+</p>
+</li>
+<li> <p><code>install.packages()</code> now allows <code>type = "both"</code>
+with <code>repos = NULL</code> if it can infer the type of file.
+</p>
+</li>
+<li> <p><code>nchar(x, *)</code> and <code>nzchar(x)</code> gain a new argument
+<code>keepNA</code> which governs how the result for <code>NA</code>s in
+<code>x</code> is determined.  For <code>nzchar()</code> in general and
+<code>nchar()</code> in the <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> 3.2.x series, the default
+remains <code>FALSE</code> which is fully back compatible.
+From <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> 3.3.0, <code>nchar()</code>'s default will change to
+<code>keepNA = NA</code> and you are advised to consider this for code
+portability.
+</p>
+</li>
+<li> <p><code>news()</code> more flexibly extracts dates from package
+‘<span class="file">NEWS.Rd</span>’ files.
+</p>
+</li>
+<li> <p><code>lengths(x)</code> now also works (trivially) for atomic
+<code>x</code> and hence can be used more generally as an efficient
+replacement of <code>sapply(x, length)</code> and similar.
+</p>
+</li>
+<li><p> The included version of PCRE has been updated to 8.37, a
+bug-fix release.
+</p>
+</li>
+<li> <p><code>diag()</code> no longer duplicates a matrix when extracting
+its diagonal.
+</p>
+</li>
+<li> <p><code>as.character.srcref()</code> gains an argument to allow
+characters corresponding to a range of source references to be
+extracted.
+</p>
+</li></ul>
+
+
+
+
+<h4>BUG FIXES</h4>
+
+
+<ul>
+<li> <p><code>acf()</code> and <code>ccf()</code> now guarantee values strictly
+in <i>[-1,1]</i> (instead of sometimes very slightly outside). <a href="https://bugs.R-project.org/bugzilla3/show_bug.cgi?id=15832">PR#15832</a>.
+</p>
+</li>
+<li> <p><code>as.integer("111111111111")</code> now gives NA (with a warning) as
+it does for the corresponding numeric or negative number
+coercions.  Further, <code>as.integer(M + 0.1)</code> now gives <code>M</code>
+(instead of NA) when M is the maximal representable integer.
+</p>
+</li>
+<li><p> On some platforms <code>nchar(x, "c")</code> and <code>nchar(x, "w")</code>
+would return values (possibly <code>NA</code>) for inputs which were
+declared to be UTF-8 but were not, or for invalid strings without a
+marked encoding in a multi-byte locale, rather than give an
+error.  Additional checks have been added to mitigate this.
+</p>
+</li>
+<li> <p><code>apply(a, M, function(u) c(X = ., Y = .))</code> again
+has dimnames containing "X" and "Y" (as in R < 3.2.0).
+</p>
+</li>
+<li><p> (Windows only) In some cases, the <code>--clean</code> option
+to <code>R CMD INSTALL</code> could fail.  (<a href="https://bugs.R-project.org/bugzilla3/show_bug.cgi?id=16178">PR#16178</a>)
+</p>
+</li>
+<li><p> (Windows only) <code>choose.files()</code> would occasionally
+include characters from the result of an earlier call in
+the result of a later one.  (<a href="https://bugs.R-project.org/bugzilla3/show_bug.cgi?id=16270">PR#16270</a>)
+</p>
+</li>
+<li><p> A change in <code>RSiteSearch()</code> in <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> 3.2.0 caused it to
+submit invalid URLs.  (<a href="https://bugs.R-project.org/bugzilla3/show_bug.cgi?id=16329">PR#16329</a>)
+</p>
+</li>
+<li> <p><code>Rscript</code> and command line <code>R</code> silently
+ignored incomplete statements at the end of a script; now they
+are reported as parse errors.  (<a href="https://bugs.R-project.org/bugzilla3/show_bug.cgi?id=16350">PR#16350</a>)
+</p>
+</li>
+<li><p> Parse data for very long strings was not stored.  (<a href="https://bugs.R-project.org/bugzilla3/show_bug.cgi?id=16354">PR#16354</a>)
+</p>
+</li>
+<li> <p><code>plotNode()</code>, the workhorse of the <code>plot</code> method
+for <code>"dendrogram"</code>s is no longer recursive, thanks to Suharto
+Anggono, and hence also works for deeply nested dendrograms.  (<a href="https://bugs.R-project.org/bugzilla3/show_bug.cgi?id=15215">PR#15215</a>)
+</p>
+</li>
+<li><p> The parser could overflow internally when given numbers
+in scientific format with extremely large exponents.  (<a href="https://bugs.R-project.org/bugzilla3/show_bug.cgi?id=16358">PR#16358</a>)
+</p>
+</li>
+<li><p> If the CRAN mirror was not set, <code>install.packages(type = "both")</code>
+and related functions could repeatedly query the user for it.
+(Part of <a href="https://bugs.R-project.org/bugzilla3/show_bug.cgi?id=16362">PR#16362</a>)
+</p>
+</li>
+<li><p> The low-level functions <code>.rowSums()</code> etc. did not
+check the length of their argument, so could segfault. (<a href="https://bugs.R-project.org/bugzilla3/show_bug.cgi?id=16367">PR#16367</a>)
+</p>
+</li>
+<li><p> The <code>quietly</code> argument of <code>library()</code> is now
+correctly propagated from <code>.getRequiredPackages2()</code>.
+</p>
+</li>
+<li><p> Under some circumstances using the internal PCRE when
+building <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> from source would cause external libs such as
+<code>-llzma</code> to be omitted from the main link.
+</p>
+</li>
+<li><p> The .Primitive default methods of the logic operators, i.e.,
+<code>!</code>, <code>&</code> and <code>|</code>, now give correct error messages
+when appropriate, e.g., for <code>`&`(TRUE)</code> or <code>`!`()</code>.
+(<a href="https://bugs.R-project.org/bugzilla3/show_bug.cgi?id=16385">PR#16385</a>)
+</p>
+</li>
+<li> <p><code>cummax(x)</code> now correctly propagates <code>NA</code>s also
+when <code>x</code> is of type <code>integer</code> and begins with an <code>NA</code>.
+</p>
+</li>
+<li> <p><code>summaryRprof()</code> could fail when the profile contained
+only two records.  (<a href="https://bugs.R-project.org/bugzilla3/show_bug.cgi?id=16395">PR#16395</a>)
+</p>
+</li>
+<li><p> HTML vignettes opened using <code>vignette()</code> did not support
+links into the rest of the HTML help system.  (Links worked properly
+when the vignette was opened using <code>browseVignettes()</code> or from
+within the help system.)
+</p>
+</li>
+<li> <p><code>arima(*, xreg = .)</code> (for <i>d >= 1</i>)
+computes estimated variances based on a the number of effective
+observations as in <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> version 3.0.1 and earlier.  (<a href="https://bugs.R-project.org/bugzilla3/show_bug.cgi?id=16278">PR#16278</a>)
+</p>
+</li>
+<li> <p><code>slotNames(.)</code> is now correct for <code>"signature"</code>
+objects (mostly used internally in <span class="pkg">methods</span>).
+</p>
+</li>
+<li><p> On some systems, the first string comparison after
+a locale change would result in <code>NA</code>.
+</p>
+</li></ul>
+
+
+
+
+<h3><img src="../help/figures/../../html/Rlogo.svg" class="toplogo" alt="[R logo]" /> CHANGES IN R 3.2.0</h3>
+
+
+
+<h4>NEW FEATURES</h4>
+
+
+<ul>
+<li> <p><code>anyNA()</code> gains a <code>recursive</code> argument.
+</p>
+</li>
+<li><p> When <code>x</code> is missing and <code>names</code> is not false
+(including the default value), <code>Sys.getenv(x, names)</code> returns
+an object of class <code>"Dlist"</code> and hence prints tidily.
+</p>
+</li>
+<li><p> (Windows.)  <code>shell()</code> no longer consults the
+environment variable <span class="env">SHELL</span>: too many systems have been
+encountered where it was set incorrectly (usually to a path where
+software was compiled, not where it was installed).
+<span class="env">R_SHELL</span>, the preferred way to select a non-default shell,
+can be used instead.
+</p>
+</li>
+<li><p> Some unusual arguments to <code>embedFonts()</code> can now be
+specified as character vectors, and the defaults have been changed
+accordingly.
+</p>
+</li>
+<li><p> Functions in the <code>Summary</code> group duplicate less.
+(<a href="https://bugs.R-project.org/bugzilla3/show_bug.cgi?id=15798">PR#15798</a>)
+</p>
+</li>
+<li><p> (Unix-alikes.) <code>system(cmd, input = )</code> now uses
+‘shell-execution-environment’ redirection, which will be
+more natural if <code>cmd</code> is not a single command (but requires a
+POSIX-compliant shell). (Wish of <a href="https://bugs.R-project.org/bugzilla3/show_bug.cgi?id=15508">PR#15508</a>)
+</p>
+</li>
+<li> <p><code>read.fwf()</code> and <code>read.DIF()</code> gain a
+<code>fileEncoding</code> argument, for convenience.
+</p>
+</li>
+<li><p> Graphics devices can add attributes to their description in
+<code>.Device</code> and <code>.Devices</code>.  Several of those included with
+<span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> use a <code>"filepath"</code> attribute.
+</p>
+</li>
+<li> <p><code>pmatch()</code> uses hashing in more cases and so is faster
+at the expense of using more memory. (<a href="https://bugs.R-project.org/bugzilla3/show_bug.cgi?id=15697">PR#15697</a>)
+</p>
+</li>
+<li> <p><code>pairs()</code> gains new arguments to select sets of
+variables to be plotted against each other.
+</p>
+</li>
+<li> <p><code>file.info(, extra_cols = FALSE)</code> allows a minimal set
+of columns to be computed on Unix-alikes: on some systems without
+properly-configured caching this can be significantly faster with
+large file lists.
+</p>
+</li>
+<li><p> New function <code>dir.exists()</code> in package <span class="pkg">base</span> to
+test efficiently whether one or more paths exist and are
+directories.
+</p>
+</li>
+<li> <p><code>dput()</code> and friends gain new controls
+<span class="samp">hexNumeric</span> and <span class="samp">digits17</span> which output double and
+complex quantities as, respectively, binary fractions (exactly,
+see <code>sprintf("%a")</code>) and as decimals with up to 17
+significant digits.
+</p>
+</li>
+<li> <p><code>save()</code>, <code>saveRDS()</code> and <code>serialize()</code> now
+support <code>ascii = NA</code> which writes ASCII files using
+<code>sprintf("%a")</code> for double/complex quantities.  This is
+read-compatible with <code>ascii = TRUE</code> but avoids
+binary->decimal->binary conversions with potential loss of
+precision.  Unfortunately the Windows C runtime's lack of C99
+compliance means that the format cannot be read correctly there in
+<span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> before 3.1.2.
+</p>
+</li>
+<li><p> The default for <code>formatC(decimal.mark =)</code> has been
+changed to be <code>getOption("OutDec")</code>; this makes it more
+consistent with <code>format()</code> and suitable for use in print
+methods, e.g. those for classes <code>"density"</code>, <code>"ecdf"</code>,
+<code>"stepfun"</code> and <code>"summary.lm"</code>.
+</p>
+<p><code>getOption("OutDec")</code> is now consulted by the print method
+for class <code>"kmeans"</code>, by <code>cut()</code>, <code>dendrogram()</code>,
+<code>plot.ts()</code> and <code>quantile()</code> when constructing labels
+and for the report from <code>legend(trace = TRUE)</code>.
+</p>
+<p>(In part, wish of <a href="https://bugs.R-project.org/bugzilla3/show_bug.cgi?id=15819">PR#15819</a>.)
+</p>
+</li>
+<li> <p><code>printNum()</code> and hence <code>format()</code> and
+<code>formatC()</code> give a warning if <code>big.mark</code> and
+<code>decimal.mark</code> are set to the same value (period and comma
+are not uncommonly used for each, and this is a check that
+conventions have not got mixed).
+</p>
+</li>
+<li> <p><code>merge()</code> can create a result which uses long vectors
+on 64-bit platforms.
+</p>
+</li>
+<li> <p><code>dget()</code> gains a new argument <code>keep.source</code> which
+defaults to <code>FALSE</code> for speed (<code>dput()</code> and
+<code>dget()</code> are most often used for data objects where this can
+make <code>dget()</code> many times faster).
+</p>
+</li>
+<li><p> Packages may now use a file of common macro definitions in
+their help files, and may import definitions from other packages.
+</p>
+</li>
+<li><p> A number of macros have been added in the new
+‘<span class="file">share/Rd</span>’ directory for use in package overview help pages,
+and <code>promptPackage()</code> now makes use of them.
+</p>
+</li>
+<li> <p><code>tools::parse_Rd()</code> gains a new <code>permissive</code>
+argument which converts unrecognized macros into text.  This is
+used by <code>utils:::format.bibentry</code> to allow LaTeX markup to be
+ignored.
+</p>
+</li>
+<li> <p><code>options(OutDec =)</code> can now specify a multi-byte
+character, e.g., <code>options(OutDec = "\u00b7")</code> in a UTF-8
+locale.
+</p>
+</li>
+<li> <p><code>is.recursive(x)</code> is no longer true when <code>x</code> is an
+external pointer, a weak reference or byte code; the first enables
+<code>all.equal(x, x)</code> when <code>x <- getClass(.)</code>.
+</p>
+</li>
+<li> <p><code>ls()</code> (aka <code>objects()</code>) and
+<code>as.list.environment()</code> gain a new argument <code>sorted</code>.
+</p>
+</li>
+<li><p> The <code>"source"</code> attribute (which has not been added to
+functions by <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> since before <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> version 2.14.0) is no longer
+treated as special.
+</p>
+</li>
+<li><p> Function <code>returnValue()</code> has been added to give
+<code>on.exit()</code> code access to a function's return value for
+debugging purposes.
+</p>
+</li>
+<li> <p><code>crossprod(x, y)</code> allows more matrix coercions when
+<code>x</code> or <code>y</code> are vectors, now equalling
+<code>t(x) %*% y</code> in these cases (also reported by Radford Neal).
+Similarly, <code>tcrossprod(x,y)</code> and <code>%*%</code> work in more
+cases with vector arguments.
+</p>
+</li>
+<li><p> Utility function <code>dynGet()</code> useful for detecting
+cycles, aka infinite recursions.
+</p>
+</li>
+<li><p> The byte-code compiler and interpreter include new
+instructions that allow many scalar subsetting and assignment and
+scalar arithmetic operations to be handled more efficiently. This
+can result in significant performance improvements in scalar
+numerical code.
+</p>
+</li>
+<li> <p><code>apply(m, 2, identity)</code> is now the same as the matrix
+<code>m</code> when it has <em>named</em> row names.
+</p>
+</li>
+<li><p> A new function <code>debuggingState()</code> has been added,
+allowing to temporarily turn off debugging.
+</p>
+</li>
+<li> <p><code>example()</code> gets a new optional argument
+<code>run.donttest</code> and <code>tools::Rd2ex()</code> a corresponding
+<code>commentDonttest</code>, with a default such that
+<code>example(..)</code> in help examples will run <code>\donttest</code>
+code only if used interactively (a change in behaviour).
+</p>
+</li>
+<li> <p><code>rbind.data.frame()</code> gains an optional argument
+<code>make.row.names</code>, for potential speedup.
+</p>
+</li>
+<li><p> New function <code>extSoftVersion()</code> to report on the
+versions of third-party software in use in this session.
+Currently reports versions of <code>zlib</code>, <code>bzlib</code>, the
+<code>liblzma</code> from <code>xz</code>, PCRE, ICU, TRE and the <code>iconv</code>
+implementation.
+</p>
+<p>A similar function <code>grSoftVersion()</code> in package <span class="pkg">grDevices</span>
+reports on third-party graphics software.
+</p>
+<p>Function <code>tcltk::tclVersion()</code> reports the Tcl/Tk version.
+</p>
+</li>
+<li><p> Calling <code>callGeneric()</code> without arguments now works
+with primitive generics to some extent.
+</p>
+</li>
+<li> <p><code>vapply(x, FUN, FUN.VALUE)</code> is more efficient notably
+for large <code>length(FUN.VALUE)</code>; as extension of <a href="https://bugs.R-project.org/bugzilla3/show_bug.cgi?id=16061">PR#16061</a>.
+</p>
+</li>
+<li> <p><code>as.table()</code> now allows tables with one or more
+dimensions of length 0 (such as <code>as.table(integer())</code>).
+</p>
+</li>
+<li> <p><code>names(x) <- NULL</code> now clears the names of call
+and <code>...</code> objects.
+</p>
+</li>
+<li> <p><code>library()</code> will report a warning when an insufficient
+dependency version is masking a sufficient one later on the
+library search path.
+</p>
+</li>
+<li><p> A new <code>plot()</code> method for class <code>"raster"</code> has
+been added.
+</p>
+</li>
+<li><p> New <code>check_packages_in_dir_changes()</code> function in
+package <span class="pkg">tools</span> for conveniently analyzing how changing
+sources impacts the check results of their reverse dependencies.
+</p>
+</li>
+<li><p> Speed-up from Peter Haverty for <code>ls()</code> and
+<code>methods:::.requirePackage()</code> speeding up package loading.
+(<a href="https://bugs.R-project.org/bugzilla3/show_bug.cgi?id=16133">PR#16133</a>)
+</p>
+</li>
+<li><p> New <code>get0()</code> function, combining <code>exists()</code> and
+<code>get()</code> in one call, for efficiency.
+</p>
+</li>
+<li> <p><code>match.call()</code> gains an <code>envir</code> argument for
+specifying the environment from which to retrieve
+the <code>...</code> in the call, if any; this environment was wrong
+(or at least undesirable) when the <code>definition</code> argument was
+a function.
+</p>
+</li>
+<li> <p><code>topenv()</code> has been made <code>.Internal()</code> for
+speedup, based on Peter Haverty's proposal in <a href="https://bugs.R-project.org/bugzilla3/show_bug.cgi?id=16140">PR#16140</a>.
+</p>
+</li>
+<li> <p><code>getOption()</code> no longer calls <code>options()</code> in the main
+case.
+</p>
+</li>
+<li><p> Optional use of <code>libcurl</code> (version 7.28.0 from Oct 2012
+or later) for Internet access:
+</p>
+
+<ul>
+<li> <p><code>capabilities("libcurl")</code> reports if this is
+available.
+</p>
+</li>
+<li> <p><code>libcurlVersion()</code> reports the version in use, and
+other details of the <code>"libcurl"</code> build including which URL
+schemes it supports.
+</p>
+</li>
+<li> <p><code>curlGetHeaders()</code> retrieves the headers for
+<span class="samp">http://</span>, <span class="samp">https://</span>, <span class="samp">ftp://</span> and
+<span class="samp">ftps://</span> URLs: analysis of these headers can provide
+insights into the ‘existence’ of a URL (it might for example be
+permanently redirected) and is so used in <code>R CMD
+	  check --as-cran</code>.
+</p>
+</li>
+<li> <p><code>download.file()</code> has a new optional method
+<code>"libcurl"</code> which will handle more URL schemes, follow
+redirections, and allows simultaneous downloads of multiple
+URLs.
+</p>
+</li>
+<li> <p><code>url()</code> has a new method <code>"libcurl"</code> which
+handles more URL schemes and follows redirections.  The default
+method is controlled by a new option <code>url.method</code>, which
+applies also to the opening of URLs <em>via</em> <code>file()</code>
+(which happens implicitly in functions such as
+<code>read.table</code>.)
+</p>
+</li>
+<li><p> When <code>file()</code> or <code>url()</code> is invoked with a
+<code>https://</code> or <code>ftps://</code> URL which the current method
+cannot handle, it switches to a suitable method if one is
+available.
+</p>
+</li></ul>
+
+</li>
+<li><p> (Windows.) The DLLs ‘<span class="file">internet.dll</span>’ and
+‘<span class="file">internet2.dll</span>’ have been merged.  In this version it is safe
+to switch (repeatedly) between the internal and Windows internet
+functions within an <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> session.
+</p>
+<p>The Windows internet functions are still selected by flag
+<span class="option">--internet2</span> or <code>setInternet2()</code>.  This can be
+overridden for an <code>url()</code> connection <em>via</em> its new
+<code>method</code> argument.
+</p>
+<p><code>download.file()</code> has new method <code>"wininet"</code>, selected
+as the default by <span class="option">--internet2</span> or <code>setInternet2()</code>.
+</p>
+</li>
+<li> <p><code>parent.env<-</code> can no longer modify the parent of a
+locked namespace or namespace imports environment.  Contributed by
+Karl Millar.
+</p>
+</li>
+<li><p> New function <code>isNamespaceLoaded()</code> for readability and speed.
+</p>
+</li>
+<li> <p><code>names(env)</code> now returns all the object names of an
+<code>environment</code> <code>env</code>, equivalently to
+<code>ls(env, all.names = TRUE, sorted = FALSE)</code> and also to
+the names of the corresponding list,
+<code>names(as.list(env, all.names = TRUE))</code>.
+Note that although <code>names()</code> returns a character vector, the
+names have no particular ordering.
+</p>
+</li>
+<li><p> The memory manager now grows the heap more aggressively. This
+reduces the number of garbage collections, in particular while
+data or code are loaded, at the expense of slightly increasing the
+memory footprint.
+</p>
+</li>
+<li><p> New function <code>trimws()</code> for removing leading/trailing
+whitespace.
+</p>
+</li>
+<li> <p><code>cbind()</code> and <code>rbind()</code> now consider S4 inheritance
+during S3 dispatch and also obey <code>deparse.level</code>.
+</p>
+</li>
+<li> <p><code>cbind()</code> and <code>rbind()</code> will delegate recursively
+to <code>methods::cbind2</code> (<code>methods::rbind2</code>) when at least
+one argument is an S4 object and S3 dispatch fails (due to
+ambiguity).
+</p>
+</li>
+<li><p> (Windows.)  <code>download.file(quiet = FALSE)</code> now uses
+text rather than Windows progress bars in non-interactive use.
+</p>
+</li>
+<li><p> New function <code>hsearch_db()</code> in package <span class="pkg">utils</span> for
+building and retrieving the help search database used by
+<code>help.search()</code>, along with functions for inspecting the
+concepts and keywords in the help search database.
+</p>
+</li>
+<li><p> New function <code>.getNamespaceInfo()</code>, a no-check version
+of <code>getNamespaceInfo()</code> mostly for internal speedups.
+</p>
+</li>
+<li><p> The help search system now takes <span class="samp">\keyword</span> entries in
+Rd files which are not standard keywords (as given in
+‘<span class="file">KEYWORDS</span>’ in the <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> documentation directory) as concepts.
+For standard keyword entries the corresponding descriptions are
+additionally taken as concepts.
+</p>
+</li>
+<li><p> New <code>lengths()</code> function for getting the lengths of all
+elements in a list.
+</p>
+</li>
+<li><p> New function <code>toTitleCase()</code> in package <span class="pkg">tools</span>,
+tailored to package titles.
+</p>
+</li>
+<li><p> The matrix methods of <code>cbind()</code> and <code>rbind()</code>
+allow matrices as inputs which have <i>2^31</i> or more
+elements.  (For <code>cbind()</code>, wish of <a href="https://bugs.R-project.org/bugzilla3/show_bug.cgi?id=16198">PR#16198</a>.)
+</p>
+</li>
+<li><p> The default method of <code>image()</code> has an explicit check
+for a numeric or logical matrix (which was always required).
+</p>
+</li>
+<li> <p><code>URLencode()</code> will not by default encode further URLs
+which appear to be already encoded.
+</p>
+</li>
+<li> <p><code>BIC(mod)</code> and <code>BIC(mod, mod2)</code> now give non-NA
+numbers for <code>arima()</code> fitted models, as <code>nobs(mod)</code> now
+gives the number of “used” observations for such models.
+This fixes <a href="https://bugs.R-project.org/bugzilla3/show_bug.cgi?id=16198">PR#16198</a>, quite differently than proposed there.
+</p>
+</li>
+<li><p> The <code>print()</code> methods for <code>"htest"</code>,
+<code>"pairwise.htest"</code> and <code>"power.htest"</code> objects now have
+a <code>digits</code> argument defaulting to (a function of)
+<code>getOption("digits")</code>, and influencing all printed numbers
+coherently.  Unavoidably, this changes the display of such test
+results in some cases.
+</p>
+</li>
+<li><p> Code completion for namespaces now recognizes all loaded
+namespaces, rather than only the ones that are also attached.
+</p>
+</li>
+<li><p> The code completion mechanism can now be replaced by a
+user-specified completer function, for (temporary) situations
+where the usual code completion is inappropriate.
+</p>
+</li>
+<li> <p><code>unzip()</code> will now warn if it is able to detect truncation
+when unpacking a file of 4GB or more (related to <a href="https://bugs.R-project.org/bugzilla3/show_bug.cgi?id=16243">PR#16243</a>).
+</p>
+</li>
+<li> <p><code>methods()</code> reports S4 in addition to S3 methods;
+output is simplified when the <code>class</code> argument is
+used.  <code>.S3methods()</code> and <code>methods::.S4methods()</code> report
+S3 and S4 methods separately.
+</p>
+</li>
+<li><p> Higher order functions such as the <code>apply</code> functions
+and <code>Reduce()</code> now force arguments to the functions they apply
+in order to eliminate undesirable interactions between lazy
+evaluation and variable capture in closures.  This resolves
+<a href="https://bugs.R-project.org/bugzilla3/show_bug.cgi?id=16093">PR#16093</a>.
+</p>
+</li></ul>
+
+
+
+
+<h4>INSTALLATION and INCLUDED SOFTWARE</h4>
+
+
+<ul>
+<li><p> The <code>\donttest</code> sections of <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span>'s help files can be
+tested by<br />
+<code>make check TEST_DONTTEST=TRUE</code> .
+</p>
+</li>
+<li><p> It is possible to request the use of system
+<code>valgrind</code> headers <em>via</em> <code>configure</code> option
+<span class="option">--with-system-valgrind-headers</span>: note the possible future
+incompatibility of such headers discussed in the 'R Installation
+and Administration' manual. (Wish of <a href="https://bugs.R-project.org/bugzilla3/show_bug.cgi?id=16068">PR#16068</a>.)
+</p>
+</li>
+<li><p> The included version of <code>liblzma</code> has been updated to
+<code>xz-utils</code> 5.0.7 (minor bug fixes from 5.0.5).
+</p>
+</li>
+<li> <p><code>configure</code> options <span class="option">--with-system-zlib</span>,
+<span class="option">--with-system-bzlib</span> and <span class="option">--with-system-pcre</span> are
+now the default.  For the time being there is fallback to the
+versions included in the <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> sources if no system versions are
+found or (unlikely) if they are too old.
+</p>
+<p>Linux users should check that the <code>-devel</code> or <code>-dev</code>
+versions of packages <span class="pkg">zlib</span>, <span class="pkg">bzip2</span>/<span class="pkg">libbz2</span> and
+<span class="pkg">pcre</span> as well as <span class="pkg">xz-devel</span>/<span class="pkg">liblzma-dev</span> (or
+similar names) are installed.
+</p>
+</li>
+<li> <p><code>configure</code> by default looks for the
+<code>texi2any</code> script from <span class="pkg">texinfo</span> 5.1 or later, rather
+than the <code>makeinfo</code> program.  (<code>makeinfo</code> is a
+link to the Perl script <code>texi2any</code> in <span class="pkg">texinfo</span> 5.x.)
+</p>
+</li>
+<li> <p><code>R CMD INSTALL</code> gains an  option
+<span class="option">--built-timestamp=STAMP</span> allowing 100% reproducible
+package building, thanks to Dirk Eddelbuettel.
+</p>
+</li></ul>
+
+
+
+
+<h4>UTILITIES</h4>
+
+
+<ul>
+<li><p> There is support for testing the <code>\dontrun</code> and
+<code>\donttest</code> parts of examples in packages.
+</p>
+<p><code>tools::testInstalledPackage()</code> accepts new arguments
+<code>commentDontrun = FALSE</code> and <code>commentDonttest = FALSE</code>.
+</p>
+<p><code>R CMD check</code> gains options <span class="option">--run-dontrun</span> and
+<span class="option">--run-donttest</span>.
+</p>
+</li>
+<li><p> The <acronym><span class="acronym">HTML</span></acronym> generated by <code>tools::Rd2HTML()</code> and
+<code>tools::toHTML()</code> methods is now
+‘<acronym><span class="acronym">XHTML</span></acronym> 1.0 Strict’.
+</p>
+</li>
+<li><p> The <span class="pkg">compiler</span> package's utility function
+<code>setCompilerOptions()</code> now returns the old values
+invisibly. The initial optimization level can also be set with the
+environment variable <span class="env">R_COMPILER_OPTIMIZE</span>.
+</p>
+</li>
+<li> <p><code>R CMD build</code> adds a <span class="samp">NeedsCompilation</span> field
+if one is not already present in the ‘<span class="file">DESCRIPTION</span>’ file.
+</p>
+</li>
+<li> <p><code>R CMD check</code> gains option <span class="option">--test-dir</span> to
+specify an alternative set of tests to run.
+</p>
+</li>
+<li> <p><code>R CMD check</code> will now by default continue with
+testing after many types of errors, and will output a summary
+count of errors at the end if any have occurred.
+</p>
+</li>
+<li> <p><code>R CMD check</code> now checks that the <span class="samp">Title</span> and
+<span class="samp">Description</span> fields are correctly terminated.
+</p>
+</li>
+<li> <p><code>R CMD check --as-cran</code> now:
+</p>
+
+<ul>
+<li><p> checks a ‘<span class="file">README.md</span>’ file can be processed: this
+needs <code>pandoc</code> installed.
+</p>
+</li>
+<li><p> checks the existence and accessibility of URLs in the
+‘<span class="file">DESCRIPTION</span>’, ‘<span class="file">CITATION</span>’, ‘<span class="file">NEWS.Rd</span>’ and
+‘<span class="file">README.md</span>’ files and in the help files (provided the build
+has <code>libcurl</code> support).
+</p>
+</li>
+<li><p> reports non-ASCII characters in R source files when there
+is no package encoding declared in the ‘<span class="file">DESCRIPTION</span>’ file.
+</p>
+</li>
+<li><p> reports (apparent) S3 methods exported but not registered.
+</p>
+</li>
+<li><p> reports overwriting registered S3 methods from
+base/recommended packages.  (Such methods are replaced in the
+affected package for the rest of the session, even if the
+replacing namespace is unloaded.)
+</p>
+</li>
+<li><p> reports if the <code>Title</code> field does not appear to be in
+title case (see ‘Writing R Extensions’: there may be
+false positives, but note that technical words should be
+single-quoted and will then be accepted).
+</p>
+</li></ul>
+
+<p>Most of these checks can also be selected by environment
+variables: see the ‘R Internals’ manual.
+</p>
+</li></ul>
+
+
+
+
+<h4>C-LEVEL FACILITIES</h4>
+
+
+<ul>
+<li><p> New C API utility <code>logspace_sum(logx[], n)</code>.
+</p>
+</li>
+<li><p> Entry points <code>rbinom_mu</code>, <code>rnbinom_mu</code> and
+<code>rmultinom</code> are remapped (by default) to <code>Rf_rbinom_mu</code>
+etc.  This requires packages using them to be re-installed.
+</p>
+</li>
+<li> <p><code>.C(DUP = FALSE)</code> and <code>.Fortran(DUP = FALSE)</code> are
+now ignored, so arguments are duplicated if <code>DUP = TRUE</code>
+would do so.  As their help has long said, <code>.Call()</code> is much
+preferred.
+</p>
+</li>
+<li><p> New entry point <code>R_allocLD</code>, like <code>R_alloc</code> but
+guaranteed to have sufficient alignment for <code>long double</code>
+pointers.
+</p>
+</li>
+<li> <p><code>isPairList()</code> now returns <code>TRUE</code> for DOTSXP.
+</p>
+</li></ul>
+
+
+
+
+<h4>WINDOWS BUILD CHANGES</h4>
+
+<p>A number of changes to the Windows build system are in development.
+The following are currently in place.
+</p>
+
+<ul>
+<li><p> Installation using external binary distributions
+of <span class="pkg">zlib</span>, <span class="pkg">bzip2</span>, <span class="pkg">liblzma</span>, <span class="pkg">pcre</span>,
+<span class="pkg">libpng</span>, <span class="pkg">jpeglib</span> and <span class="pkg">libtiff</span> is now required,
+and the build instructions have been revised.
+</p>
+</li>
+<li><p> A new <code>make</code> target <code>rsync-extsoft</code> has been
+added to obtain copies of the external libraries from
+<acronym><span class="acronym">CRAN</span></acronym>.
+</p>
+</li>
+<li><p> Building the manuals now requires <code>texi2any</code> from
+<span class="pkg">texinfo</span> 5.1 or later.  <acronym><span class="acronym">CRAN</span></acronym> binary builds include
+the manuals, but by default builds from source will not, and they
+will be accessed from <acronym><span class="acronym">CRAN</span></acronym>.  See the comments in
+‘<span class="file">src/gnuwin32/MkRules.dist</span>’ for how to specify the location
+of <code>texi2any</code>.
+</p>
+</li>
+<li><p> (Windows) Changes have been made to support an experimental
+Windows toolchain based on GCC 4.9.2.  The default toolchain
+continues to be based on GCC 4.6.3, as the new toolchain is not
+yet stable enough.  A change to a new toolchain is expected during
+the R 3.2.x lifetime.
+</p>
+</li></ul>
+
+
+
+
+<h4>PACKAGE INSTALLATION</h4>
+
+
+<ul>
+<li><p>  (Windows) The use of macro <code>ZLIB_LIBS</code> in file
+‘<span class="file">src/Makevars.win</span>’ (which has not been documented for a long
+time) now requires an external ‘<span class="file">libz.a</span>’ to be available (it is
+part of the ‘goodies’ used to compile Windows binary
+packages).  It would be simpler to use <code>-lz</code> instead.
+</p>
+</li>
+<li><p> The default for option <code>pkgType</code> on platforms using
+binary packages is now <code>"both"</code>, so source packages will be
+tried if binary versions are not available or not up to date.
+</p>
+<p>There are options for what <code>install.packages(type = "both")</code>
+(possibly called <em>via</em> <code>update.packages()</code>) will do if
+compilation of a source package is desirable: see <code>?options</code>
+(under <span class="pkg">utils</span>).
+</p>
+<p>If you intend not to accept updates as source packages, you should
+use <code>update.packages(type = "binary")</code>.
+</p>
+</li></ul>
+
+
+
+
+<h4>DEPRECATED AND DEFUNCT</h4>
+
+
+<ul>
+<li> <p><code>download.file(method = "lynx")</code> is defunct.
+</p>
+</li>
+<li><p> Building <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> using the included versions of <code>zlib</code>,
+<code>bzip2</code>, <code>xz</code> and PCRE is deprecated: these are frozen
+(bar essential bug-fixes) and will be removed for <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> 3.3.0.
+</p>
+</li>
+<li><p> The <code>configure</code> option
+<span class="option">--with-valgrind-instrumentation=3</span> has been withdrawn, as
+it did not work with recent <code>valgrind</code> headers: it is now
+treated as level <code>2</code>.
+</p>
+</li>
+<li><p> The <code>MethodsList</code> class in package <span class="pkg">methods</span> had
+been deprecated in <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> 2.11.0 and is defunct now.  Functions using
+it are defunct if they had been deprecated in <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> 2.11.0, and are
+deprecated now, otherwise.
+</p>
+</li></ul>
+
+
+
+
+<h4>BUG FIXES</h4>
+
+
+<ul>
+<li><p> Fixed two obscure bugs in pairlist subassignment, reported by
+Radford Neal as part of pqR issue 16.
+</p>
+</li>
+<li><p> Fixes for bugs in handling empty arguments and argument
+matching by name in <code>log()</code>.
+</p>
+</li>
+<li> <p><code>all.equal()</code> gains methods for <code>environment</code>s and
+<code>refClass</code>es.
+</p>
+</li>
+<li> <p><code>[<-</code> and <code>[[<-</code> gain S4 <code>data.frame</code> methods
+to avoid corruption of S4 class information by the S3 methods.
+</p>
+</li>
+<li> <p><code>callNextMethod()</code> should now work within a <code>.local</code>
+call when <code>...</code> is absent from <code>formals(.local)</code>.
+</p>
+</li>
+<li> <p><code>dput(pairlist(x))</code> generates a call to the
+<code>pairlist</code> constructor instead of the <code>list</code>
+constructor.
+</p>
+</li>
+<li><p> Fix <code>missing()</code> when arguments are propagated through
+<code>...</code> . (<a href="https://bugs.R-project.org/bugzilla3/show_bug.cgi?id=15707">PR#15707</a>)
+</p>
+</li>
+<li> <p><code>eigen(m)</code> now defaults to <code>symmetric = TRUE</code> even
+when the dimnames are asymmetric if the matrix is otherwise
+symmetric.  (<a href="https://bugs.R-project.org/bugzilla3/show_bug.cgi?id=16151">PR#16151</a>)
+</p>
+</li>
+<li><p> Fix issues with forwarding <code>...</code> through
+<code>callGeneric()</code> and <code>callNextMethod()</code>.  (<a href="https://bugs.R-project.org/bugzilla3/show_bug.cgi?id=16141">PR#16141</a>)
+</p>
+</li>
+<li> <p><code>callGeneric()</code> now works after a <code>callNextMethod()</code>.
+</p>
+</li>
+<li><p> Subclass information is kept consistent when replacing an
+ordinary S4 class with an “old class” <em>via</em> the
+<code>S4Class</code> argument to <code>setOldClass()</code>. Thus, for
+example, a <code>data.frame</code> is valid for a <code>list</code> argument
+in the signature, and a <code>factor</code> is valid for <code>vector</code>
+arguments.
+</p>
+</li>
+<li><p> In <code>qbeta()</code> the inversion of <code>pbeta()</code> is much
+more sophisticated.  This works better in corner cases some of
+which failed completely previously (<a href="https://bugs.R-project.org/bugzilla3/show_bug.cgi?id=15755">PR#15755</a>), or were using
+too many iterations.
+</p>
+</li>
+<li><p> Auto-printing no longer duplicates objects when printing is
+dispatched to a method.
+</p>
+</li>
+<li> <p><code>kmeans(x, k)</code> would fail when <code>nrow(x) >= 42949673</code>.
+(Comment 6 of <a href="https://bugs.R-project.org/bugzilla3/show_bug.cgi?id=15364">PR#15364</a>)
+</p>
+</li>
+<li> <p>‘Abbreviated’ locale-specific day and month names
+could have been truncated in those rare locales where there are
+the same as the full names.
+</p>
+</li>
+<li><p> An irrelevant warning message from updating subclass
+information was silenced (the namespace would not be writable
+in this case).
+</p>
+</li></ul>
+
+
+
+
+<h3><img src="../help/figures/../../html/Rlogo.svg" class="toplogo" alt="[R logo]" /> CHANGES IN R 3.1.3</h3>
+
+
+
+<h4>NEW FEATURES</h4>
+
+
+<ul>
+<li><p> The internal method of <code>download.file()</code> can now handle
+files larger than 2GB on 32-bit builds which support such files
+(tested on 32-bit <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> running on 64-bit Windows).
+</p>
+</li>
+<li> <p><code>kruskal.test()</code> warns on more types of suspicious input.
+</p>
+</li>
+<li><p> The <code>as.dendrogram()</code> method for <code>"hclust"</code>
+objects gains a <code>check</code> argument protecting against memory
+explosion for invalid inputs.
+</p>
+</li>
+<li> <p><code>capabilities()</code> has a new item <code>long.double</code>
+which indicates if the build uses a <code>long double</code> type which
+is longer than <code>double</code>.
+</p>
+</li>
+<li> <p><code>nlm()</code> no longer modifies the callback argument in
+place (a new vector is allocated for each invocation, which mimics
+the implicit duplication that occurred in R < 3.1.0); note that
+this is a change from the previously documented
+behavior. (<a href="https://bugs.R-project.org/bugzilla3/show_bug.cgi?id=15958">PR#15958</a>)
+</p>
+</li>
+<li> <p><code>icuSetCollate()</code> now accepts <code>locale = "ASCII"</code>
+which uses the basic C function <code>strcmp</code> and so collates
+strings byte-by-byte in numerical order.
+</p>
+</li>
+<li> <p><code>sessionInfo()</code> tries to report the OS version in use
+(not just that compiled under, and including details of Linux
+distributions).
+</p>
+</li>
+<li> <p><code>model.frame()</code> (used by <code>lm()</code> and many other
+modelling functions) now warns when it drops contrasts
+from factors.  (Wish of <a href="https://bugs.R-project.org/bugzilla3/show_bug.cgi?id=16119">PR#16119</a>)
+</p>
+</li>
+<li> <p><code>install.packages()</code> and friends now accept the value
+<code>type = "binary"</code> as a synonym for the native binary type on
+the platform (if it has one).
+</p>
+</li>
+<li><p> Single source or binary files can be supplied for
+<code>install.packages(type = "both")</code> and the appropriate type
+and <code>repos = NULL</code> will be inferred.
+</p>
+</li>
+<li><p> New function <code>pcre_config()</code> to report on some of the
+configuration options of the version of PCRE in use.  In
+particular, this reports if regular expressions using
+<span class="samp">\p{xx}</span> are supported.
+</p>
+</li>
+<li><p> (Windows.) <code>download.file(cacheOK = FALSE)</code> is now
+supported when ‘<span class="file">internet2.dll</span>’ is used.
+</p>
+</li>
+<li> <p><code>browseURL()</code> has been updated to work with Firefox
+36.0 which has dropped support for the <span class="option">-remote</span> interface.
+</p>
+</li></ul>
+
+
+
+
+<h4>INSTALLATION and INCLUDED SOFTWARE</h4>
+
+
+<ul>
+<li><p> The included version of PCRE has been updated to 8.36.
+</p>
+</li>
+<li> <p><code>configure</code> accepts <span class="samp">MAKEINFO=texi2any</span> as
+another way to ensure <span class="pkg">texinfo</span> 5.x is used when both 5.x and
+4.x are installed.
+</p>
+</li></ul>
+
+
+
+
+<h4>UTILITIES</h4>
+
+
+<ul>
+<li> <p><code>R CMD check</code> now checks the packages used in
+<code>\donttest</code> sections of the examples are specified in the
+‘<span class="file">DESCRIPTION</span>’ file.
+(These are needed to run the examples interactively.)
+</p>
+</li>
+<li> <p><code>R CMD check</code> checks for the undeclared use of GNU
+extensions in Makefiles, and for Makefiles with a missing final
+linefeed.
+</p>
+<p><code>R CMD build</code> will correct line endings in all Makefiles,
+not just those in the ‘<span class="file">src</span>’ directory.
+</p>
+</li>
+<li> <p><code>R CMD check</code> notes uses of <code>library()</code> and
+<code>require()</code> in package code: see the section
+‘Suggested packages’ of ‘Writing R Extensions’ for
+good practice.
+</p>
+</li></ul>
+
+
+
+
+<h4>DEPRECATED AND DEFUNCT</h4>
+
+
+<ul>
+<li><p> The <code>configure</code> option
+<span class="option">--with-valgrind-instrumentation=3</span> is deprecated and will
+be removed in <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> 3.2.0.
+</p>
+</li></ul>
+
+
+
+
+<h4>BUG FIXES</h4>
+
+
+<ul>
+<li><p> (Windows.) <code>Rscript.exe</code> was missing a
+manifest specifying the modern style for common controls (e.g.,
+the download progress bar).
+</p>
+</li>
+<li><p> If a package had extra documentation files but no vignette,
+the HTML help system produced an empty index page.
+</p>
+</li>
+<li><p> The parser now gives an error if a null character is included
+in a string using Unicode escapes. (<a href="https://bugs.R-project.org/bugzilla3/show_bug.cgi?id=16046">PR#16046</a>)
+</p>
+</li>
+<li> <p><code>qr.Q()</code> failed on complex arguments due to
+pre-3.0(!) typo. (<a href="https://bugs.R-project.org/bugzilla3/show_bug.cgi?id=16054">PR#16054</a>)
+</p>
+</li>
+<li> <p><code>abs()</code> failed with named arguments when the argument
+was complex.  (<a href="https://bugs.R-project.org/bugzilla3/show_bug.cgi?id=16047">PR#16047</a>)
+</p>
+</li>
+<li> <p><code>"noquote"</code> objects may now be used as columns in
+data frames.  (<a href="https://bugs.R-project.org/bugzilla3/show_bug.cgi?id=15997">PR#15997</a>)
+</p>
+</li>
+<li><p> Some values with extremely long names were printed
+incorrectly.  (<a href="https://bugs.R-project.org/bugzilla3/show_bug.cgi?id=15999">PR#15999</a>)
+</p>
+</li>
+<li><p> Extremely large exponents on zero expressed in scientific
+notation (e.g. <code>0.0e50000</code>) could give <code>NaN</code>.  (<a href="https://bugs.R-project.org/bugzilla3/show_bug.cgi?id=15976">PR#15976</a>)
+</p>
+</li>
+<li> <p><code>download.file()</code> reported downloaded sizes as 0KB if
+less than 1MB, only for <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> 3.1.2 and only on big-endian platforms.
+</p>
+</li>
+<li> <p><code>prompt()</code> did not escape percent signs in the
+automatically generated usage section of help files.
+</p>
+</li>
+<li> <p><code>drop.terms()</code> dropped some of the attributes of the
+object it was working with.  (<a href="https://bugs.R-project.org/bugzilla3/show_bug.cgi?id=16029">PR#16029</a>)
+</p>
+</li>
+<li><p> (Windows.) The command completion in <code>Rgui.exe</code>
+messed up the console.  (<a href="https://bugs.R-project.org/bugzilla3/show_bug.cgi?id=15791">PR#15791</a>)
+</p>
+</li>
+<li><p> (Windows.) The <code>choose.files()</code> command returned a
+blank string when the user asked for a single file but cancelled
+the request.  (<a href="https://bugs.R-project.org/bugzilla3/show_bug.cgi?id=16074">PR#16074</a>)
+</p>
+</li>
+<li> <p><code>Math2</code> S4 group generics failed to correctly dispatch
+<code>"structure"</code>- and <code>"nonStructure"</code>-derived classes.
+</p>
+</li>
+<li> <p><code>loadNamespace()</code> imposed undocumented restrictions
+on the <code>versionCheck</code> parameter.  (Reported by Geoff Lee.)
+</p>
+</li>
+<li><p> Rare over-runs detected by AddressSanitizer in
+<code>substr()</code> and its replacement version have been avoided.
+</p>
+<p><em>Inter alia</em> that fix gives the documented behaviour for
+<code>substr(x, 1, 2) <- ""</code> (subsequently reported as
+<a href="https://bugs.R-project.org/bugzilla3/show_bug.cgi?id=16214">PR#16214</a>).
+</p>
+</li>
+<li><p> Loading packages incorrectly defining an S4 generic followed
+by a function of the same name caused an erroneous cyclic
+namespace dependency error.
+</p>
+</li>
+<li><p> Declared vignette encodings are now always passed to the
+vignette engine.
+</p>
+</li>
+<li><p> Port Tomas Kalibera's fix from R-devel that restores the
+<code>loadMethod()</code> fast path, effectively doubling the speed of
+S4 dispatch.
+</p>
+</li>
+<li> <p><code>power.t.test()</code> and <code>power.prop.test()</code> now make
+use of the <code>extendInt</code> option of <code>uniroot()</code> and hence
+work in more extreme cases.  (<a href="https://bugs.R-project.org/bugzilla3/show_bug.cgi?id=15792">PR#15792</a>)
+</p>
+</li>
+<li><p> If a package was updated and attached when its namespace was
+already loaded, it could end up with parts from one version and
+parts from the other.  (<a href="https://bugs.R-project.org/bugzilla3/show_bug.cgi?id=16120">PR#16120</a>)
+</p>
+</li>
+<li> <p><code>tools:::.Rdconv()</code> didn't accept <code>--encoding=</code> due
+to a typo.  (<a href="https://bugs.R-project.org/bugzilla3/show_bug.cgi?id=16121">PR#16121</a>)
+</p>
+</li>
+<li><p> Unix-alike builds without a suitable <code>makeinfo</code> were
+documented to link the missing HTML manuals to CRAN, but did not.
+</p>
+</li>
+<li> <p><code>save(*, ascii=TRUE)</code> and <code>load()</code> now correctly
+deal with <code>NaN</code>'s.  (<a href="https://bugs.R-project.org/bugzilla3/show_bug.cgi?id=16137">PR#16137</a>)
+</p>
+</li>
+<li> <p><code>split.Date()</code> retains fractional representations while
+avoiding incomplete class propagation.
+</p>
+</li>
+<li> <p>‘<span class="file">R_ext/Lapack.h</span>’ had not been updated for changes made
+by LAPACK to the argument lists of its (largely internal)
+functions <code>dlaed2</code> and <code>dlaed3</code>.  (<a href="https://bugs.R-project.org/bugzilla3/show_bug.cgi?id=16157">PR#16157</a>)
+</p>
+</li>
+<li> <p><code>RShowDoc("NEWS", "txt")</code> had not been updated for the
+layout changes of <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> 3.1.0.
+</p>
+</li>
+<li><p> The <code>xtfrm()</code> method for class <code>"Surv"</code> has been
+corrected and its description expanded.
+</p>
+</li>
+<li> <p><code>mode(x) <- y</code> would incorrectly evaluate <code>x</code> before
+changing its mode. (<a href="https://bugs.R-project.org/bugzilla3/show_bug.cgi?id=16215">PR#16215</a>)
+</p>
+</li>
+<li> <p><code>besselJ(1, 2^64)</code> and <code>besselY(..)</code> now signal a
+warning, returning <code>NaN</code> instead of typically
+segfaulting. (Issue 3 of <a href="https://bugs.R-project.org/bugzilla3/show_bug.cgi?id=15554">PR#15554</a>)
+</p>
+</li>
+<li><p> HTML conversion of <span class="samp">\href</span> markup in ‘<span class="file">.Rd</span>’ files
+did not remove the backslash from <span class="samp">\%</span> and so gave an
+invalid URL.  In a related change, the <span class="samp">\</span> escape is now
+required in such URLs.
+</p>
+</li></ul>
+
+
+
+
+<h3><img src="../help/figures/../../html/Rlogo.svg" class="toplogo" alt="[R logo]" /> CHANGES IN R 3.1.2</h3>
 
 
 
@@ -41,7 +4249,7 @@ of the missing component or of XQuartz.
 </p>
 <p>The <code>X11()</code> device and X11-based versions of the data editor
 and viewer (invoked by <code>edit()</code> and <code>View()</code> for data
-frames and matrices from command-line <font face="Courier New,Courier" color="#666666"><b>R</b></font>) check that the X11
+frames and matrices from command-line <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span>) check that the X11
 libraries are installed and if not advises installing XQuartz.
 </p>
 </li>
@@ -59,8 +4267,8 @@ collation locale in use (if any).
 </p>
 </li>
 <li> <p><code>utils::URLencode()</code> was updated to use unreserved and
-reserved characters from RFC 3986,
-<a href="http://tools.ietf.org/html/rfc3986">http://tools.ietf.org/html/rfc3986</a>, instead of RFC 1738.
+reserved characters from RFC 3986
+(<a href="http://tools.ietf.org/html/rfc3986">http://tools.ietf.org/html/rfc3986</a>) instead of RFC 1738.
 </p>
 </li>
 <li> <p><code>unique(warnings())</code> and <code>c(warnings())</code> are now
@@ -69,9 +4277,15 @@ supported.
 </li>
 <li><p> The Bioconductor ‘version’ used by
 <code>setRepositories()</code> now defaults to <code>3.0</code>. (It can be
-set at runtime <EM>via</EM> environment variable
+set at runtime <em>via</em> environment variable
 <span class="env">R_BIOC_VERSION</span>.)
 </p>
+</li>
+<li><p> Omegahat is no longer listed as providing Windows binary
+packages, e.g. by <code>setRepositories()</code>.  It has no binary
+packages available for <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> 3.1.x and those for earlier versions
+were 32-bit only.
+</p>
 </li></ul>
 
 
@@ -81,29 +4295,29 @@ set at runtime <EM>via</EM> environment variable
 
 
 <ul>
-<li><p> The <CODE>configure</CODE> script reports on the more important
+<li><p> The <code>configure</code> script reports on the more important
 capabilities/options which will not be compiled in.
 </p>
 <p>More types of external BLAS are recognized by name in that report.
 </p>
 </li>
-<li><p> When building <font face="Courier New,Courier" color="#666666"><b>R</b></font> as a shared library, the
+<li><p> When building <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> as a shared library, the
 <span class="option">-L${R_HOME}/lib${R_ARCH}</span> flag is placed earlier in the
 link commands used during installation and when packages are
 installed: this helps ensure that the current build has priority
-if an <font face="Courier New,Courier" color="#666666"><b>R</b></font> shared library has already been installed by
-e.g. <CODE>install-libR</CODE> in a library mentioned in
+if an <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> shared library has already been installed by
+e.g. <code>install-libR</code> in a library mentioned in
 <span class="env">LDFLAGS</span> (and not in ‘your system's library directory’
 as documented). (Wish of <a href="https://bugs.R-project.org/bugzilla3/show_bug.cgi?id=15790">PR#15790</a>.)
 </p>
 </li>
-<li><p> LaTeX package <span class="pkg">upquote</span> is no longer required for <font face="Courier New,Courier" color="#666666"><b>R</b></font>'s
+<li><p> LaTeX package <span class="pkg">upquote</span> is no longer required for <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span>'s
 use of <span class="pkg">inconsolata</span>.
 </p>
 </li>
-<li><p> (Windows only) If both 32 and 64 bit versions of <font face="Courier New,Courier" color="#666666"><b>R</b></font> are
+<li><p> (Windows only) If both 32- and 64-bit versions of <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> are
 installed, the ‘<span class="file">bin/R.exe</span>’ and ‘<span class="file">bin/Rscript.exe</span>’ executables
-now run 64 bit <font face="Courier New,Courier" color="#666666"><b>R</b></font>.  (To run 32 bit <font face="Courier New,Courier" color="#666666"><b>R</b></font>, overwrite these files
+now run 64-bit <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span>.  (To run 32-bit <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span>, overwrite these files
 with copies of ‘<span class="file">bin/i386/Rfe.exe</span>’.)
 </p>
 </li></ul>
@@ -115,20 +4329,20 @@ with copies of ‘<span class="file">bin/i386/Rfe.exe</span>’.)
 
 
 <ul>
-<li><p> Running <CODE>R CMD check</CODE> with
+<li><p> Running <code>R CMD check</code> with
 <span class="env">_R_CHECK_DEPENDS_ONLY_</span> true now makes the
 <span class="samp">VignetteBuilder</span> packages available even if they are
 listed in <span class="samp">Suggests</span>, since they are needed to recognise and
 process non-Sweave vignettes.
 </p>
 </li>
-<li> <p><CODE>R CMD check</CODE> now reports empty <code>importFrom</code>
+<li> <p><code>R CMD check</code> now reports empty <code>importFrom</code>
 declarations in a ‘<span class="file">NAMESPACE</span>’ file, as these are common
-errors (writing <code>importFrom(<VAR>Pkg</VAR>)</code> where
-<code>import(<VAR>Pkg</VAR>)</code> was intended).
+errors (writing <code>importFrom(<var>Pkg</var>)</code> where
+<code>import(<var>Pkg</var>)</code> was intended).
 </p>
 </li>
-<li> <p><CODE>R CMD check</CODE> now by default checks code usage
+<li> <p><code>R CMD check</code> now by default checks code usage
 directly on the package namespace without loading and attaching
 the package and its suggests and enhances.  For good practice with
 packages in the <span class="samp">Suggests</span> field, see §1.1.3.1 of
@@ -173,7 +4387,7 @@ no variables to drop.  (<a href="https://bugs.R-project.org/bugzilla3/show_bug.c
 </li>
 <li> <p><code>edit()</code> (and hence <code>fix()</code>) failed if
 an object had a non-character attribute named <code>"source"</code>
-(an attribute that had been used in <font face="Courier New,Courier" color="#666666"><b>R</b></font> prior to version 2.14.0).
+(an attribute that had been used in <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> prior to version 2.14.0).
 </p>
 </li>
 <li> <p><code>callGeneric()</code> could fail if the generic had
@@ -182,13 +4396,13 @@ an object had a non-character attribute named <code>"source"</code>
 </li>
 <li><p> Forking in package <span class="pkg">parallel</span> called C entry point
 <code>exit</code> in the child.  This was unsafe (<code>_exit</code> should
-have been called), and could flush <code>stdin</code> of the main <font face="Courier New,Courier" color="#666666"><b>R</b></font>
+have been called), and could flush <code>stdin</code> of the main <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span>
 process (seen most often on Solaris).
 </p>
 <p>As good practice, <code>stdout</code> is now flushed before forking a child.
 </p>
 </li>
-<li> <p><font face="Courier New,Courier" color="#666666"><b>R</b></font> objects such as <code>list(`a\b` = 1)</code> now print correctly.
+<li> <p><span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> objects such as <code>list(`a\b` = 1)</code> now print correctly.
 </p>
 </li>
 <li> <p><code>getAnywhere("C_pbinom")</code> now returns correctly a
@@ -222,18 +4436,18 @@ environments. (<a href="https://bugs.R-project.org/bugzilla3/show_bug.cgi?id=159
 </p>
 </li>
 <li> <p><code>merge(<dendrogram>, ..)</code> now works correctly for two
-‘independent’ dendrograms (<a href="https://bugs.R-project.org/bugzilla3/show_bug.cgi?id=15648">PR#15648</a>), and still compatibly via
-<code>adjust = "auto"</code> e.g. for two branches of an existing
-dendrogram.
+‘independent’ dendrograms (<a href="https://bugs.R-project.org/bugzilla3/show_bug.cgi?id=15648">PR#15648</a>), and still compatibly
+<em>via</em> <code>adjust = "auto"</code> e.g. for two branches of an
+existing dendrogram.
 </p>
 </li>
 <li><p> The <code>plot</code> method for <code>"hclust"</code> objects gets an
-optional argument <code>check</code>; When that is true (the default) it
+optional argument <code>check</code>; when that is true (the default) it
 checks more carefully for valid input.
 </p>
 </li>
-<li><p> (Windows only) If a user chose to install 64 bit <font face="Courier New,Courier" color="#666666"><b>R</b></font> but not
-32 bit <font face="Courier New,Courier" color="#666666"><b>R</b></font>, the ‘<span class="file">bin/R</span>’ and ‘<span class="file">bin/Rscript</span>’ executables
+<li><p> (Windows only) If a user chose to install 64 bit <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> but not
+32 bit <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span>, the ‘<span class="file">bin/R</span>’ and ‘<span class="file">bin/Rscript</span>’ executables
 failed to run.  (<a href="https://bugs.R-project.org/bugzilla3/show_bug.cgi?id=15981">PR#15981</a>)
 </p>
 </li>
@@ -241,8 +4455,8 @@ failed to run.  (<a href="https://bugs.R-project.org/bugzilla3/show_bug.cgi?id=1
 and missed memory protection added. (<a href="https://bugs.R-project.org/bugzilla3/show_bug.cgi?id=15990">PR#15990</a>)
 </p>
 </li>
-<li> <p><CODE>Rscript</CODE> no longer passes <code>--args</code> to
-<CODE>R</CODE> when there are no extra (“user”) arguments.
+<li> <p><code>Rscript</code> no longer passes <code>--args</code> to
+<code>R</code> when there are no extra (“user”) arguments.
 </p>
 </li>
 <li><p> objects like <code>getClass("refClass")@prototype</code> now
@@ -258,7 +4472,7 @@ to few breaks when some are very large. (<a href="https://bugs.R-project.org/bug
 </li>
 <li> <p><code>sub()</code> and <code>gsub()</code> did not handle regular
 expressions like <code>"\s{2,}"</code> properly if the text
-contained <code>NA</code> or non-ascii elements in a UTF-8
+contained <code>NA</code> or non-ASCII elements in a UTF-8
 locale.  Part of this was due to a bug in the TRE library.
 (<a href="https://bugs.R-project.org/bugzilla3/show_bug.cgi?id=16009">PR#16009</a>)
 </p>
@@ -279,7 +4493,7 @@ the <code>xaxs</code>, <code>yaxs</code> and <code>lab</code> graphics parameter
 <code>x</code> contains non-finite values. (<a href="https://bugs.R-project.org/bugzilla3/show_bug.cgi?id=16024">PR#16024</a>)
 </p>
 </li>
-<li> <p><CODE>R CMD Rd2pdf</CODE> unintentionally ignored its
+<li> <p><code>R CMD Rd2pdf</code> unintentionally ignored its
 <span class="option">--os</span> option.
 </p>
 </li>
@@ -287,12 +4501,13 @@ the <code>xaxs</code>, <code>yaxs</code> and <code>lab</code> graphics parameter
 reporting file sizes and progress correctly on files larger than
 2GB (inherited from <code>libxml2</code>).  This is corrected for 64-bit
 builds (32-bit platforms may not support such files, but where
-possible will be supported in future versions of <font face="Courier New,Courier" color="#666666"><b>R</b></font>).
+possible will be supported in future versions of <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span>).
 </p>
 </li>
 <li><p> Work around a bug in OS X Yosemite where key environment
 variables may be duplicated causing issues in subprocesses. The
-duplicates are now removed on R startup (via Rprofile). (<a href="https://bugs.R-project.org/bugzilla3/show_bug.cgi?id=16042">PR#16042</a>)
+duplicates are now removed on <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> startup (<em>via</em>
+Rprofile). (<a href="https://bugs.R-project.org/bugzilla3/show_bug.cgi?id=16042">PR#16042</a>)
 </p>
 </li>
 <li><p> Adjust X11 auto-launch detection in DISPLAY on OS X to
@@ -303,7 +4518,7 @@ recognize latest XQuartz.
 
 
 
-<h3><img src="../help/figures/../../html/logo.jpg" alt="../../html/logo.jpg" /> CHANGES IN R 3.1.1</h3>
+<h3><img src="../help/figures/../../html/Rlogo.svg" class="toplogo" alt="[R logo]" /> CHANGES IN R 3.1.1</h3>
 
 
 
@@ -315,8 +4530,8 @@ recognize latest XQuartz.
 compatibly with <code>library()</code> by using <code>message()</code>.
 </p>
 </li>
-<li> <p><CODE>R CMD Sweave</CODE> no longer cleans any files by
-default, compatibly with versions of <font face="Courier New,Courier" color="#666666"><b>R</b></font> prior to 3.1.0.  There are
+<li> <p><code>R CMD Sweave</code> no longer cleans any files by
+default, compatibly with versions of <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> prior to 3.1.0.  There are
 new options <span class="option">--clean</span>, <span class="option">--clean=default</span> and
 <span class="option">--clean=keepOuts</span>.
 </p>
@@ -329,10 +4544,10 @@ cleaning customization.
 </li>
 <li><p> The Bioconductor ‘version’ used by
 <code>setRepositories()</code> can now be set by environment variable
-<span class="env">R_BIOC_VERSION</span> at runtime, not just when <font face="Courier New,Courier" color="#666666"><b>R</b></font> is installed.
+<span class="env">R_BIOC_VERSION</span> at runtime, not just when <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> is installed.
 (It has been stated that Bioconductor will switch from
 ‘version’ 2.14 to ‘version’ 3.0 during the lifetime
-of the <font face="Courier New,Courier" color="#666666"><b>R</b></font> 3.1 series.)
+of the <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> 3.1 series.)
 </p>
 </li>
 <li><p> Error messages from bugs in embedded <span class="samp">Sexpr</span> code
@@ -343,12 +4558,12 @@ in Sweave documents now report the source location.
 <code>read.*()</code> functions get a new <code>numerals</code> argument,
 specifying how numeric input is converted when its conversion to
 double precision loses accuracy.  The default value,
-<code>"allow.loss"</code> allows accuracy loss, as in <font face="Courier New,Courier" color="#666666"><b>R</b></font> versions before
+<code>"allow.loss"</code> allows accuracy loss, as in <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> versions before
 3.1.0.
 </p>
 </li>
 <li><p> For some compilers, integer addition could overflow without
-a warning.  <font face="Courier New,Courier" color="#666666"><b>R</b></font>'s internal code for both integer addition and
+a warning.  <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span>'s internal code for both integer addition and
 subtraction is more robust now.  (<a href="https://bugs.R-project.org/bugzilla3/show_bug.cgi?id=15774">PR#15774</a>)
 </p>
 </li>
@@ -366,7 +4581,7 @@ or infinite <i>a</i> and <i>b</i> (where they typically returned
 does not work correctly with their package's use of
 <code>dev.new()</code>.  The new option <code>dev.new(noRStudioGD =
       TRUE)</code> replaces the RStudio override by the default device as
-selected by <font face="Courier New,Courier" color="#666666"><b>R</b></font> itself, still respecting environment variables
+selected by <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> itself, still respecting environment variables
 <span class="env">R_INTERACTIVE_DEVICE</span> and <span class="env">R_DEFAULT_DEVICE</span>.
 </p>
 </li>
@@ -378,7 +4593,7 @@ an error instead of a warning.
 </p>
 </li>
 <li> <p><code>install.packages(repos = NULL)</code> now accepts
-<code>http://</code> or <code>ftp://</code> URLs of package archives as well
+<span class="samp">http://</span> or <span class="samp">ftp://</span> URLs of package archives as well
 as file paths, and will download as required.  In most cases
 <code>repos = NULL</code> can be deduced from the extension of the URL.
 </p>
@@ -409,24 +4624,24 @@ help page for a function that was imported from another package
 
 
 <ul>
-<li> <p><CODE>configure</CODE> option <span class="option">--with-internal-tzcode</span>
+<li> <p><code>configure</code> option <span class="option">--with-internal-tzcode</span>
 can now be used with variable <code>rsharedir</code>.
 </p>
 </li>
 <li><p> The included version of PCRE has been updated to 8.35.
 </p>
 </li>
-<li><p> There is a new target <CODE>make uninstall-libR</CODE> to
+<li><p> There is a new target <code>make uninstall-libR</code> to
 remove an installed shared/static ‘<span class="file">libR</span>’.
 </p>
-<p><CODE>make install-libR</CODE> now works if a sub-architecture is
+<p><code>make install-libR</code> now works if a sub-architecture is
 used, although the user will need to specify <code>libdir</code>
 differently for different sub-architectures.
 </p>
 </li>
 <li><p> There is more extensive advice on which LaTeX packages are
-required to install <font face="Courier New,Courier" color="#666666"><b>R</b></font> or to make package manuals (as done by
-<CODE>R CMD check</CODE>) in the ‘Writing R Extensions’
+required to install <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> or to make package manuals (as done by
+<code>R CMD check</code>) in the ‘Writing R Extensions’
 manual.
 </p>
 </li>
@@ -459,7 +4674,7 @@ for <code>pchisq(1e-5, df = 100, ncp = 1, log = TRUE)</code>.
 </p>
 </li>
 <li><p> The <code>s</code> (“step into”) command in the debugger
-would cause <font face="Courier New,Courier" color="#666666"><b>R</b></font> to step into expressions evaluated there,
+would cause <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> to step into expressions evaluated there,
 not just into functions being debugged.  (<a href="https://bugs.R-project.org/bugzilla3/show_bug.cgi?id=15770">PR#15770</a>)
 </p>
 </li>
@@ -518,7 +4733,7 @@ the ‘short’ path name (which <code>Sys.which()</code> returns),
 as the behaviour of the Windows API call had changed.
 </p>
 </li>
-<li> <p><CODE>R CMD build</CODE> will fail with an error if one of the
+<li> <p><code>R CMD build</code> will fail with an error if one of the
 packages specified in the <span class="samp">VignetteBuilder</span> field is not
 installed.  (Without loading those packages it cannot be
 ascertained which files are intended to be vignettes. This means
@@ -549,7 +4764,7 @@ block had only one line.
 </p>
 </li>
 <li><p> Hexadecimal constants such as <code>0x110p-5L</code> which were
-incorrectly qualified by <code>L</code> were parsed incorrectly since <font face="Courier New,Courier" color="#666666"><b>R</b></font>
+incorrectly qualified by <code>L</code> were parsed incorrectly since <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span>
 3.0.0, with a slightly garbled warning. (<a href="https://bugs.R-project.org/bugzilla3/show_bug.cgi?id=15753">PR#15753</a>)
 </p>
 </li>
@@ -557,7 +4772,7 @@ incorrectly qualified by <code>L</code> were parsed incorrectly since <font face
 the system was unable to launch a process. (<a href="https://bugs.R-project.org/bugzilla3/show_bug.cgi?id=15796">PR#15796</a>)
 </p>
 </li>
-<li><p> (Windows <CODE>Rgui</CODE> console.)  Unbuffered output was
+<li><p> (Windows <code>Rgui</code> console.)  Unbuffered output was
 sometimes not output immediately if the prompt was not on the last
 line of the console.
 </p>
@@ -567,11 +4782,11 @@ the ‘<span class="file">DESCRIPTION</span>’ or other text files to b
 encoding, so non-ASCII characters could be displayed incorrectly.
 </p>
 </li>
-<li> <p><font face="Courier New,Courier" color="#666666"><b>R</b></font> is now trying harder to not cleanup child processes
+<li> <p><span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> is now trying harder to not cleanup child processes
 that were not spawned by <code>mcparallel()</code> on platforms that
 provide information about the source process of the <code>SIGCHLD</code>
 signal. This allows 3rd party libraries to manage the exit status
-of children that they spawn without <font face="Courier New,Courier" color="#666666"><b>R</b></font> interfering.
+of children that they spawn without <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> interfering.
 </p>
 </li>
 <li> <p><code>mcmapply()</code> was only parallelizing if the number of
@@ -629,7 +4844,7 @@ one in pqR.)
 
 
 
-<h3><img src="../help/figures/../../html/logo.jpg" alt="../../html/logo.jpg" /> CHANGES IN R 3.1.0</h3>
+<h3><img src="../help/figures/../../html/Rlogo.svg" class="toplogo" alt="[R logo]" /> CHANGES IN R 3.1.0</h3>
 
 
 
@@ -648,8 +4863,8 @@ decimal places that are intended to be read as numeric, specify
 </p>
 </li>
 <li> <p><code>tools::Rdiff(useDiff = FALSE)</code> is closer to the POSIX
-definition of <CODE>diff -b</CODE> (as distinct from the description
-in the <CODE>man</CODE> pages of most systems).
+definition of <code>diff -b</code> (as distinct from the description
+in the <code>man</code> pages of most systems).
 </p>
 </li>
 <li><p> New function <code>anyNA()</code>, a version of
@@ -695,7 +4910,7 @@ otherwise only names, dims and dimnames are.
 </p>
 </li>
 <li> <p><code>colorRamp()</code> and <code>colorRampPalette()</code> now allow
-non-opaque colours and a ramp in opacity via the new argument
+non-opaque colours and a ramp in opacity <em>via</em> the new argument
 <code>alpha = TRUE</code>.  (Suggested by Alberto Krone-Martins, but
 optionally as there are existing uses which expect only RGB values.)
 
@@ -739,7 +4954,7 @@ existing names. (Suggestion of <a href="https://bugs.R-project.org/bugzilla3/sho
 </li>
 <li><p> New functions <code>cospi(x)</code>, <code>sinpi(x)</code>, and
 <code>tanpi(x)</code>, for more accurate computation of
-<code>cos(pi*x)</code>, etc, both in <font face="Courier New,Courier" color="#666666"><b>R</b></font> and the C API.  Using these
+<code>cos(pi*x)</code>, etc, both in <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> and the C API.  Using these
 gains accuracy in some cases, e.g., inside <code>lgamma()</code> or
 <code>besselI()</code>.  (Suggested by Morten Welinder in <a href="https://bugs.R-project.org/bugzilla3/show_bug.cgi?id=15529">PR#15529</a>.)
 </p>
@@ -766,7 +4981,7 @@ errors and so not used on OS X.)
 </p>
 <p>Currently <code>time_t</code> is usually <code>long</code> and hence 64-bit on
 Unix-alike 64-bit platforms: however in several cases the
-time-zone database is 32-bit.  For <font face="Courier New,Courier" color="#666666"><b>R</b></font> for Windows it is 64-bit
+time-zone database is 32-bit.  For <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> for Windows it is 64-bit
 (for both architectures as from this version).
 </p>
 </li>
@@ -849,7 +5064,7 @@ of the return value.
 </li>
 <li> <p><code>arima()</code> and <code>makeARIMA()</code> get a new optional
 argument <code>SSinit</code>, allowing the choice of a different
-<B>s</B>tate <B>s</B>pace initialization which has been observed
+<b>s</b>tate <b>s</b>pace initialization which has been observed
 to be more reliable close to non-stationarity: see <a href="https://bugs.R-project.org/bugzilla3/show_bug.cgi?id=14682">PR#14682</a>.
 </p>
 </li>
@@ -864,7 +5079,7 @@ support reading of UTF-8 characters using <code>scan()</code>,
 </li>
 <li> <p><code>all.equal.list()</code> gets a new argument <code>use.names</code>
 which by default labels differing components by names (if they
-match) rather than by integer index.  Saved <font face="Courier New,Courier" color="#666666"><b>R</b></font> output in packages may
+match) rather than by integer index.  Saved <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> output in packages may
 need to be updated.
 </p>
 </li>
@@ -973,23 +5188,23 @@ should wrap their calls in <code>suppressWarnings()</code>.
 installation, by setting <span class="env">TEST_MC_CORES</span> to an integer
 greater than one to indicate the maximum number of cores to be
 used in parallel. (It is worth specifying at least 8 cores if
-available.)  Most of these require a <CODE>make</CODE> program (such
-as GNU <CODE>make</CODE> and <CODE>dmake</CODE>) which supports the
-<CODE>$MAKE -j nproc</CODE> syntax.
+available.)  Most of these require a <code>make</code> program (such
+as GNU <code>make</code> and <code>dmake</code>) which supports the
+<code>$MAKE -j nproc</code> syntax.
 </p>
 <p>Except on Windows: the tests of standard package examples in
-<CODE>make check</CODE> are done in parallel.  This also applies to
+<code>make check</code> are done in parallel.  This also applies to
 running <code>tools::testInstalledPackages()</code>.
 </p>
 <p>The more time-consuming regression tests are done in parallel.
 </p>
-<p>The package checks in <CODE>make check-devel</CODE> and <CODE>make
-check-recommended</CODE> are done in parallel.
+<p>The package checks in <code>make check-devel</code> and <code>make
+	check-recommended</code> are done in parallel.
 </p>
 </li>
-<li><p> More of <CODE>make check</CODE> will work if recommended packages
+<li><p> More of <code>make check</code> will work if recommended packages
 are not installed: but recommended packages remain needed for
-thorough checking of an <font face="Courier New,Courier" color="#666666"><b>R</b></font> build.
+thorough checking of an <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> build.
 </p>
 </li>
 <li><p> The version of <span class="samp">tzcode</span> included in
@@ -999,10 +5214,10 @@ Windows.)
 </li>
 <li><p> The included (64-bit) time-zone conversion code and Olson
 time-zone database can be used instead of the system version: use
-<CODE>configure</CODE> option <span class="option">--with-internal-tzcode</span>.  This
+<code>configure</code> option <span class="option">--with-internal-tzcode</span>.  This
 is the default on Windows and OS X.  (Note that this does not
 currently work if a non-default <code>rsharedir</code>
-<CODE>configure</CODE> variable is used.)
+<code>configure</code> variable is used.)
 </p>
 <p>(It might be necessary to set environment variable <span class="env">TZ</span> on
 OSes where this is not already set, although the system timezone is
@@ -1012,14 +5227,14 @@ deduced correctly on at least Linux, OS X and Windows.)
 included in directory ‘<span class="file">src/extra/tzone</span>’.
 </p>
 </li>
-<li> <p><CODE>configure</CODE> now tests for a C++11-compliant compiler
+<li> <p><code>configure</code> now tests for a C++11-compliant compiler
 by testing some basic features.  This by default tries flags for
 the compiler specified by <span class="samp">CXX</span>, but an alternative compiler,
 options and standard can be specified by variables <span class="samp">CXX1X</span>,
 <span class="samp">CXX1XFLAGS</span> and <span class="samp">CXX1XSTD</span> (e.g., <span class="samp">-std=gnu++11</span>).
 </p>
 </li>
-<li> <p><font face="Courier New,Courier" color="#666666"><b>R</b></font> can now optionally be compiled to use reference
+<li> <p><span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> can now optionally be compiled to use reference
 counting instead of the <code>NAMED</code> mechanism by defining
 <code>SWITCH_TO_REFCNT</code> in ‘<span class="file">Rinternals.h</span>’. This may become
 the default in the future.
@@ -1027,7 +5242,7 @@ the default in the future.
 </li>
 <li><p> There is a new option <span class="option">--use-system-tre</span> to use a
 suitable system <span class="pkg">tre</span> library: at present this means a version
-from their <CODE>git</CODE> repository, after corrections.
+from their <code>git</code> repository, after corrections.
 (Wish of <a href="https://bugs.R-project.org/bugzilla3/show_bug.cgi?id=15660">PR#15660</a>.)
 </p>
 </li></ul>
@@ -1050,9 +5265,10 @@ considered to be vignettes and hence indexed as such.
 </p>
 </li>
 <li><p> In the ‘<span class="file">DESCRIPTION</span>’ file, </p>
-<PRE>    License: X11</PRE>
-is no longer recognized as valid.  Use <span class="samp">MIT</span> or
+<pre>    License: X11</pre>
+<p>is no longer recognized as valid.  Use <span class="samp">MIT</span> or
 <span class="samp">BSD_2_clause</span> instead, both of which need <span class="samp">+ file LICENSE</span>.
+</p>
 </li>
 <li><p> For consistency, entries in ‘<span class="file">.Rinstignore</span>’ are now matched
 case-insensitively on all platforms.
@@ -1064,7 +5280,7 @@ more than 80 characters per line (some packages had over 120
 characters).
 </p>
 </li>
-<li> <p><CODE>R CMD INSTALL –build</CODE> (not Windows) now defaults to
+<li> <p><code>R CMD INSTALL --build</code> (not Windows) now defaults to
 the internal <code>tar()</code> unless <span class="env">R_INSTALL_TAR</span> is set.
 </p>
 </li>
@@ -1092,7 +5308,7 @@ consistent, in part following the suggestions in <a href="https://bugs.R-project
 </p>
 </li>
 <li><p> Calls to <code>browser()</code> are now consistent with calls
-to the browser triggered by <code>debug()</code>, in that <KBD>Enter</KBD>
+to the browser triggered by <code>debug()</code>, in that <kbd>Enter</kbd>
 will default to <code>n</code> rather than <code>c</code>.
 </p>
 </li>
@@ -1117,23 +5333,23 @@ display a short list of available commands.
 
 <ul>
 <li><p> Only vignettes sources in directory ‘<span class="file">vignettes</span>’ are
-considered to be vignettes by <CODE>R CMD check</CODE>.  That has
-been the preferred location since <font face="Courier New,Courier" color="#666666"><b>R</b></font> 2.14.0 and is now obligatory.
+considered to be vignettes by <code>R CMD check</code>.  That has
+been the preferred location since <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> 2.14.0 and is now obligatory.
 </p>
 </li>
-<li><p> For consistency, <CODE>R CMD build</CODE> now matches entries
+<li><p> For consistency, <code>R CMD build</code> now matches entries
 in ‘<span class="file">.Rbuildignore</span>’  and ‘<span class="file">vignettes/.install_extras</span>’
 case-insensitively on all platforms (not just on Windows).
 </p>
 </li>
-<li> <p><code>checkFF()</code> (called by <CODE>R CMD check</CODE> by
+<li> <p><code>checkFF()</code> (called by <code>R CMD check</code> by
 default) can optionally check foreign function calls for
 consistency with the registered type and argument count.  This is
-the default for <CODE>R CMD check –as-cran</CODE> or can be enabled
+the default for <code>R CMD check --as-cran</code> or can be enabled
 by setting environment variable <span class="env">_R_CHECK_FF_CALLS_</span> to
 <span class="samp">registration</span> (but is in any case suppressed by
 <span class="option">--install=no</span>).   Because this checks calls in which
-<code>.NAME</code> is an <font face="Courier New,Courier" color="#666666"><b>R</b></font> object and not just a literal character
+<code>.NAME</code> is an <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> object and not just a literal character
 string, some other problems are detected for such calls.
 </p>
 <p>Functions <code>suppressForeignCheck()</code> and <code>dontCheck()</code>
@@ -1141,53 +5357,53 @@ have been added to allow package authors to suppress false
 positive reports.
 </p>
 </li>
-<li> <p><CODE>R CMD check –as-cran</CODE> warns about a false value of
+<li> <p><code>R CMD check --as-cran</code> warns about a false value of
 the ‘<span class="file">DESCRIPTION</span>’ field <span class="samp">BuildVignettes</span> for Open Source
 packages, and ignores it.  (An Open Source package needs to have
 complete sources for its vignettes which should be usable on a
 suitably well-equipped system).
 </p>
 </li>
-<li> <p><CODE>R CMD check –no-rebuild-vignettes</CODE> is defunct:<br>
-<CODE>R CMD check –no-build-vignettes</CODE> has been preferred since
-<font face="Courier New,Courier" color="#666666"><b>R</b></font> 3.0.0.
+<li> <p><code>R CMD check --no-rebuild-vignettes</code> is defunct:<br />
+<code>R CMD check --no-build-vignettes</code> has been preferred since
+<span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> 3.0.0.
 </p>
 </li>
-<li> <p><CODE>R CMD build –no-vignettes</CODE> is defunct:<br>
-<CODE>R CMD build –no-build-vignettes</CODE> has been preferred since
-<font face="Courier New,Courier" color="#666666"><b>R</b></font> 3.0.0.
+<li> <p><code>R CMD build --no-vignettes</code> is defunct:<br />
+<code>R CMD build --no-build-vignettes</code> has been preferred since
+<span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> 3.0.0.
 </p>
 </li>
-<li> <p><CODE>R CMD Sweave</CODE> and <CODE>R CMD Stangle</CODE> now
+<li> <p><code>R CMD Sweave</code> and <code>R CMD Stangle</code> now
 process both Sweave and non-Sweave vignettes.  The
 <code>tools::buildVignette()</code> function has been added to do the
-same tasks from within <font face="Courier New,Courier" color="#666666"><b>R</b></font>.
+same tasks from within <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span>.
 </p>
 </li>
-<li><p> The flags returned by <CODE>R CMD config –ldflags</CODE> and
-(where installed) <CODE>pkg-config –libs libR</CODE> are now those
-needed to link a front-end against the (shared or static) <font face="Courier New,Courier" color="#666666"><b>R</b></font>
+<li><p> The flags returned by <code>R CMD config --ldflags</code> and
+(where installed) <code>pkg-config --libs libR</code> are now those
+needed to link a front-end against the (shared or static) <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span>
 library.
 </p>
 </li>
 <li> <p>‘<span class="file">Sweave.sty</span>’ has a new option <span class="samp">[inconsolata]</span>.
 </p>
 </li>
-<li> <p><CODE>R CMD check</CODE> customizations such as
+<li> <p><code>R CMD check</code> customizations such as
 <span class="env">_R_CHECK_DEPENDS_ONLY_</span> make available packages only in
 <span class="samp">LinkingTo</span> only for installation, and not for
 loading/runtime tests.
 </p>
 </li>
-<li> <p><CODE>tools::checkFF()</CODE> reports on <code>.C</code> and
+<li> <p><code>tools::checkFF()</code> reports on <code>.C</code> and
 <code>.Fortran</code> calls with <code>DUP = FALSE</code> if argument
 <code>check_DUP</code> is true.  This is selected by
-<CODE>R CMD check</CODE> by default.
+<code>R CMD check</code> by default.
 </p>
 </li>
-<li> <p><CODE>R CMD check –use-gct</CODE> can be tuned to
+<li> <p><code>R CMD check --use-gct</code> can be tuned to
 garbage-collect less frequently using <code>gctorture2()</code>
-<EM>via</EM> the setting of environment variable
+<em>via</em> the setting of environment variable
 <span class="env">_R_CHECK_GCT_N_</span>.
 </p>
 </li>
@@ -1205,7 +5421,7 @@ of passes tried to 20.
 <ul>
 <li><p> (Windows only) A function <code>R_WaitEvent()</code> has been
 added (with declaration in header‘<span class="file">R.h</span>’) to block execution
-until the next event is received by <font face="Courier New,Courier" color="#666666"><b>R</b></font>.
+until the next event is received by <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span>.
 </p>
 </li>
 <li><p> Remapping in the ‘<span class="file">Rmath.h</span>’ header can be suppressed by
@@ -1231,7 +5447,7 @@ in C code: <code>ftrunc()</code> is still needed for portable C++ code.
 </li>
 <li><p> The function <code>LENGTH()</code> now checks that it is only
 applied to vector arguments.  However, in packages <code>length()</code>
-should be used. (In <font face="Courier New,Courier" color="#666666"><b>R</b></font> itself <code>LENGTH()</code> is a macro without
+should be used. (In <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> itself <code>LENGTH()</code> is a macro without
 the function overhead of <code>length()</code>.)
 </p>
 </li>
@@ -1261,11 +5477,11 @@ are ignored: LAPACK is always used.
 </li>
 <li> <p><code>.find.package()</code> and <code>.path.package()</code> are
 defunct: only the versions without the initial dot introduced in
-<font face="Courier New,Courier" color="#666666"><b>R</b></font> 2.13.0 have ever been in the API.
+<span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> 2.13.0 have ever been in the API.
 </p>
 </li>
-<li><p> Partial matching when using the <code>$</code> operator <EM>on
-data frames</EM> now throws a warning and may become defunct in the
+<li><p> Partial matching when using the <code>$</code> operator <em>on
+data frames</em> now throws a warning and may become defunct in the
 future. If partial matching is intended, replace <code>foo$bar</code>
 by <code>foo[["bar", exact = FALSE]]</code>.
 </p>
@@ -1292,10 +5508,10 @@ package <span class="pkg">tools</span> are defunct.
 </p>
 </li>
 <li> <p><code>.C(DUP = FALSE)</code> and <code>.Fortran(DUP = FALSE)</code> are
-now deprecated, and may be disabled in future versions of <font face="Courier New,Courier" color="#666666"><b>R</b></font>.  As
+now deprecated, and may be disabled in future versions of <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span>.  As
 their help has long said, <code>.Call()</code> is much preferred.
 </p>
-<p><CODE>R CMD check</CODE> notes such usages (by default).
+<p><code>R CMD check</code> notes such usages (by default).
 </p>
 </li>
 <li><p> The workaround of setting <span class="env">R_OSX_VALGRIND</span> has been
@@ -1322,7 +5538,7 @@ the control characters.  (Reported by Hadley Wickham.)
 </p>
 </li>
 <li> <p><code>getGraphicsEvent()</code> caused 100% usage of one CPU in
-Windows. (PR#15500)
+Windows. (<a href="https://bugs.R-project.org/bugzilla3/show_bug.cgi?id=15500">PR#15500</a>)
 </p>
 </li>
 <li> <p><code>nls()</code> with no <code>start</code> argument may now work
@@ -1360,7 +5576,7 @@ location or dimension may now become zero).
 </p>
 </li>
 <li><p> Some bugs in TRE have been corrected by updating from the
-<CODE>git</CODE> repository.  This allows <font face="Courier New,Courier" color="#666666"><b>R</b></font> to be installed on some
+<code>git</code> repository.  This allows <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> to be installed on some
 platforms for which this was a blocker (<a href="https://bugs.R-project.org/bugzilla3/show_bug.cgi?id=15087">PR#15087</a> suggests Linux
 on ARM and HP-UX).
 </p>
@@ -1389,7 +5605,7 @@ accidentally, (<a href="https://bugs.R-project.org/bugzilla3/show_bug.cgi?id=157
 too much for a leaf <code>d</code>. (<a href="https://bugs.R-project.org/bugzilla3/show_bug.cgi?id=15702">PR#15702</a>)
 </p>
 </li>
-<li> <p><font face="Courier New,Courier" color="#666666"><b>R</b></font> would try to kill processes on exit that have pids ever
+<li> <p><span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> would try to kill processes on exit that have pids ever
 used by a child process spawned by <code>mcparallel</code> even though
 the current process with that pid was not actually its child.
 </p>
@@ -1417,7 +5633,7 @@ graphics before it was set.
 
 
 
-<h3><img src="../help/figures/../../html/logo.jpg" alt="../../html/logo.jpg" /> CHANGES IN R 3.0.3</h3>
+<h3><img src="../help/figures/../../html/Rlogo.svg" class="toplogo" alt="[R logo]" /> CHANGES IN R 3.0.3</h3>
 
 
 
@@ -1426,10 +5642,10 @@ graphics before it was set.
 
 <ul>
 <li><p> On Windows there is support for making ‘<span class="file">.texi</span>’ manuals
-using <CODE>texinfo</CODE> 5.0 or later: the setting is in file
+using <code>texinfo</code> 5.0 or later: the setting is in file
 ‘<span class="file">src/gnuwin32/MkRules.dist</span>’.
 </p>
-<p>A packaging of the Perl script and modules for <CODE>texinfo</CODE>
+<p>A packaging of the Perl script and modules for <code>texinfo</code>
 5.2 has been made available at
 <a href="http://www.stats.ox.ac.uk/pub/Rtools/">http://www.stats.ox.ac.uk/pub/Rtools/</a>.
 </p>
@@ -1638,7 +5854,7 @@ including <code>browseEnv()</code>, <code>format()</code>, <code>gl()</code>,
 <code>relist()</code> and <code>summary.data.frame()</code>.  (E.g., <a href="https://bugs.R-project.org/bugzilla3/show_bug.cgi?id=15499">PR#15499</a>)
 </p>
 </li>
-<li> <p><code>Sweave()</code> did not restore the <font face="Courier New,Courier" color="#666666"><b>R</b></font> output to the
+<li> <p><code>Sweave()</code> did not restore the <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> output to the
 console if it was interrupted by a user in the middle of evaluating
 a code chunk.  (Reported by Michael Sumner.)
 </p>
@@ -1664,7 +5880,7 @@ rather than failing.
 </p>
 </li>
 <li><p> Saved vignette results (in a ‘<span class="file">.Rout.save</span>’ file) were
-not being compared to the new ones during <CODE>R CMD check</CODE>.
+not being compared to the new ones during <code>R CMD check</code>.
 </p>
 </li>
 <li><p> Double-clicking outside of the list box (e.g., on the scrollbar)
@@ -1688,7 +5904,7 @@ converted raw vectors to invalid logical vectors. (<a href="https://bugs.R-proje
 one of <code>stdin</code>, <code>stdout</code> or <code>stderr</code> to be a file,
 but the command was not found (e.g., it contained its arguments,
 or the program was not on the <span class="env">PATH</span>), it left the file open
-and unusable until <font face="Courier New,Courier" color="#666666"><b>R</b></font> terminated.  (Reported by Mathew McLean.)
+and unusable until <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> terminated.  (Reported by Mathew McLean.)
 </p>
 </li>
 <li><p> The <code>bmp()</code> device was not recording <code>res = NA</code>
@@ -1697,7 +5913,7 @@ correctly: it is now recorded as 72 ppi.
 </li>
 <li><p> Several potential problems with compiler-specific behaviour
 have been identified using the ‘Undefined Behaviour
-Sanitizer’ in conjunction with the <CODE>clang</CODE> compiler.
+Sanitizer’ in conjunction with the <code>clang</code> compiler.
 </p>
 </li>
 <li> <p><code>hcl()</code> now honours <code>NA</code> inputs (previously they
@@ -1714,7 +5930,7 @@ second before the epoch’, most conversions which should have given
 Linux and OS X, but not Windows nor Solaris.)
 </p>
 </li>
-<li> <p><code>rowsum()</code> has more support for matrices and dataframes
+<li> <p><code>rowsum()</code> has more support for matrices and data frames
 with <i>2^31</i> or more elements. (<a href="https://bugs.R-project.org/bugzilla3/show_bug.cgi?id=15587">PR#15587</a>)
 </p>
 </li>
@@ -1727,7 +5943,7 @@ and sometimes removed spaces that should not have been removed.
 (<a href="https://bugs.R-project.org/bugzilla3/show_bug.cgi?id=15583">PR#15583</a>)
 </p>
 </li>
-<li><p> Running <font face="Courier New,Courier" color="#666666"><b>R</b></font> code in a <span class="pkg">tcltk</span> callback failed to set the
+<li><p> Running <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> code in a <span class="pkg">tcltk</span> callback failed to set the
 busy flag, which will be needed to tell OS X not to ‘App Nap’.
 </p>
 </li>
@@ -1793,7 +6009,7 @@ values with the <code>"constant"</code> method. (<a href="https://bugs.R-project
 
 
 
-<h3><img src="../help/figures/../../html/logo.jpg" alt="../../html/logo.jpg" /> CHANGES IN R 3.0.2</h3>
+<h3><img src="../help/figures/../../html/Rlogo.svg" class="toplogo" alt="[R logo]" /> CHANGES IN R 3.0.2</h3>
 
 
 
@@ -1803,9 +6019,9 @@ values with the <code>"constant"</code> method. (<a href="https://bugs.R-project
 <ul>
 <li><p> The ‘<span class="file">NEWS</span>’ files have been re-organized.
 </p>
-<p>This file contains news for <font face="Courier New,Courier" color="#666666"><b>R</b></font> >= 3.0.0: news for the 0.x.y, 1.x.y
+<p>This file contains news for <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> >= 3.0.0: news for the 0.x.y, 1.x.y
 and 2.x.y releases is in files ‘<span class="file">NEWS.0</span>’, ‘<span class="file">NEWS.1</span>’ and
-‘<span class="file">NEWS.2</span>’.  The latter files are now installed when <font face="Courier New,Courier" color="#666666"><b>R</b></font> is
+‘<span class="file">NEWS.2</span>’.  The latter files are now installed when <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> is
 installed.  An HTML version of news from 2.10.0 to 2.15.3 is
 available as ‘<span class="file">doc/html/NEWS.2.html</span>’.
 </p>
@@ -1830,8 +6046,8 @@ or factors with 100,000 levels, the latter as in <a href="https://bugs.R-project
 not integer codes (suggested by Bryan Hanson).
 </p>
 </li>
-<li> <p><code>tail(warnings())</code> now works, via the new <code>`[`</code>
-method.
+<li> <p><code>tail(warnings())</code> now works, <em>via</em> the new
+<code>`[`</code> method.
 </p>
 </li>
 <li><p> There is now support for the LaTeX style file ‘<span class="file">zi4.sty</span>’
@@ -1865,7 +6081,7 @@ search path or if some package defines a function of that name.
 </li>
 <li><p> If an invalid/corrupt <code>.Random.seed</code> object is
 encountered in the workspace it is ignored with a warning rather
-than giving an error.  (This allows <font face="Courier New,Courier" color="#666666"><b>R</b></font> itself to rely on a working
+than giving an error.  (This allows <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> itself to rely on a working
 RNG, e.g. to choose a random port.)
 </p>
 </li>
@@ -1880,8 +6096,8 @@ error.  (Request of Reijo Sund.)
 </li>
 <li><p> Methods invoked by <code>NextMethod()</code> had a different
 dynamic parent to the generic. This was causing trouble where S3
-methods invoked via lazy evaluation could lose track of their
-generic.  (<a href="https://bugs.R-project.org/bugzilla3/show_bug.cgi?id=15267">PR#15267</a>)
+methods invoked <em>via</em> lazy evaluation could lose track of
+their generic.  (<a href="https://bugs.R-project.org/bugzilla3/show_bug.cgi?id=15267">PR#15267</a>)
 </p>
 </li>
 <li><p> Code for the negative binomial distribution now treats the case
@@ -1901,7 +6117,7 @@ the result, to avoid misuse creating invalid objects as in
 <a href="https://bugs.R-project.org/bugzilla3/show_bug.cgi?id=15303">PR#15303</a>.  A warning is given if a class is discarded.
 </p>
 </li>
-<li><p> Dataset <code>npk</code> has been copied from <a href="http://CRAN.R-project.org/package=MASS"><span class="pkg">MASS</span></a> to
+<li><p> Dataset <code>npk</code> has been copied from <a href="https://CRAN.R-project.org/package=MASS"><span class="pkg">MASS</span></a> to
 allow more tests to be run without recommended packages being
 installed.
 </p>
@@ -1948,19 +6164,19 @@ a non-existent vignette engine.
 
 
 <ul>
-<li> <p><CODE>R CMD check –as-cran</CODE> checks the line widths in
+<li> <p><code>R CMD check --as-cran</code> checks the line widths in
 usage and examples sections of the package Rd files.
 </p>
 </li>
-<li> <p><CODE>R CMD check –as-cran</CODE> now implies <span class="option">--timings</span>.
+<li> <p><code>R CMD check --as-cran</code> now implies <span class="option">--timings</span>.
 </p>
 </li>
-<li> <p><CODE>R CMD check</CODE> looks for command <CODE>gfile</CODE> if a
-suitable <CODE>file</CODE> is not found.  (Although <CODE>file</CODE> is
-not from GNU, OpenCSW on Solaris installs it as <CODE>gfile</CODE>.)
+<li> <p><code>R CMD check</code> looks for command <code>gfile</code> if a
+suitable <code>file</code> is not found.  (Although <code>file</code> is
+not from GNU, OpenCSW on Solaris installs it as <code>gfile</code>.)
 </p>
 </li>
-<li> <p><CODE>R CMD build</CODE> (with the internal <code>tar</code>) checks
+<li> <p><code>R CMD build</code> (with the internal <code>tar</code>) checks
 the permissions of ‘<span class="file">configure</span>’ and ‘<span class="file">cleanup</span>’ files and
 adds execute permission to the recorded permissions for these
 files if needed, with a warning.  This is useful on OSes and file
@@ -1968,40 +6184,41 @@ systems which do not support execute permissions (notably, on
 Windows).
 </p>
 </li>
-<li> <p><CODE>R CMD build</CODE> now weaves and tangles all vignettes,
+<li> <p><code>R CMD build</code> now weaves and tangles all vignettes,
 so suggested packages are not required during package installation
 if the source tarball was prepared with current
-<CODE>R CMD build</CODE>.
+<code>R CMD build</code>.
 </p>
 </li>
-<li> <p><code>checkFF()</code> (used by <CODE>R CMD check</CODE>) does a
+<li> <p><code>checkFF()</code> (used by <code>R CMD check</code>) does a
 better job of detecting calls from other packages, including not
 reporting those where a function has been copied from another
 namespace (e.g., as a default method).  It now reports calls where
 <code>.NAME</code> is a symbol registered in another package.
 </p>
 </li>
-<li><p> On Unix-alike systems, <CODE>R CMD INSTALL</CODE> now installs packages
+<li><p> On Unix-alike systems, <code>R CMD INSTALL</code> now installs packages
 group writably whenever the library (<code>lib.loc</code>) is group
 writable.  Hence, <code>update.packages()</code> works for other group
 members (suggested originally and from a patch by Dirk Eddelbuettel).
 </p>
 </li>
-<li> <p><CODE>R CMD javareconf</CODE> now supports the use of symbolic
+<li> <p><code>R CMD javareconf</code> now supports the use of symbolic
 links for <span class="env">JAVA_HOME</span> on platforms which have
-<CODE>realpath</CODE>.  So it is now possible to
+<code>realpath</code>.  So it is now possible to
 use </p>
-<PRE>R CMD javareconf JAVA_HOME=/usr/lib/jvm/java-1.7.0</PRE>
-on a Linux system and record that value rather than the
+<pre>R CMD javareconf JAVA_HOME=/usr/lib/jvm/java-1.7.0</pre>
+<p>on a Linux system and record that value rather than the
 frequently-changing full path such as
 ‘<span class="file">/usr/lib/jvm/java-1.7.0-openjdk-1.7.0.25.x86_64</span>’.
+</p>
 </li>
-<li><p> (Windows only.) <CODE>Rscript -e</CODE> requires a non-empty
-argument for consistency with Unix versions of <font face="Courier New,Courier" color="#666666"><b>R</b></font>.  (Also
-<CODE>Rterm -e</CODE> and <CODE>R -e</CODE>.)
+<li><p> (Windows only.) <code>Rscript -e</code> requires a non-empty
+argument for consistency with Unix versions of <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span>.  (Also
+<code>Rterm -e</code> and <code>R -e</code>.)
 </p>
 </li>
-<li> <p><CODE>R CMD check</CODE> does more thorough checking of
+<li> <p><code>R CMD check</code> does more thorough checking of
 declared packages and namespaces.  It reports
 </p>
 
@@ -2017,18 +6234,18 @@ the <code>::</code> nor <code>:::</code> operators.
 </p>
 </li>
 <li><p> packages which are used in <code>library()</code> or
-<code>requires()</code> calls in the <font face="Courier New,Courier" color="#666666"><b>R</b></font> code but were already put on
-the search path <EM>via</EM> <span class="samp">Depends</span>.
+<code>requires()</code> calls in the <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> code but were already put on
+the search path <em>via</em> <span class="samp">Depends</span>.
 </p>
 </li>
 <li><p> packages declared in <span class="samp">Depends</span> not imported
-<EM>via</EM> the ‘<span class="file">NAMESPACE</span>’ file (except the standard
+<em>via</em> the ‘<span class="file">NAMESPACE</span>’ file (except the standard
 packages).  Objects used from <span class="samp">Depends</span> packages should be
 imported to avoid conflicts and to allow correct operation when
 the namespace is loaded but not attached.
 </p>
 </li>
-<li><p> objects imported <EM>via</EM> <code>:::</code> calls where
+<li><p> objects imported <em>via</em> <code>:::</code> calls where
 <code>::</code> would do.
 </p>
 </li>
@@ -2042,24 +6259,24 @@ the namespace is loaded but not attached.
 <p>See ‘Writing R Extensions’ for good practice.
 </p>
 </li>
-<li> <p><CODE>R CMD check</CODE> optionally checks for non-standard
+<li> <p><code>R CMD check</code> optionally checks for non-standard
 top-level files and directories (which are often mistakes): this
 is enabled for <span class="option">--as-cran</span>.
 </p>
 </li>
 <li><p> LaTeX style file <code>upquote.sty</code> is no longer included
-(the version was several years old): it is no longer used in <font face="Courier New,Courier" color="#666666"><b>R</b></font>.
+(the version was several years old): it is no longer used in <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span>.
 A much later version is commonly included in LaTeX distributions
 but does not play well with the <code>ae</code> fonts which are the
 default for Sweave vignettes.
 </p>
 </li>
-<li> <p><CODE>R CMD build</CODE> makes more use of the ‘<span class="file">build</span>’
+<li> <p><code>R CMD build</code> makes more use of the ‘<span class="file">build</span>’
 sub-directory of package sources, for example to record
 information about the vignettes.
 </p>
 </li>
-<li> <p><CODE>R CMD check</CODE> analyses <code>:::</code> calls.
+<li> <p><code>R CMD check</code> analyses <code>:::</code> calls.
 </p>
 </li></ul>
 
@@ -2071,8 +6288,8 @@ information about the vignettes.
 
 <ul>
 <li><p> The macros used for the texinfo manuals have been changed to
-work better with the incompatible changes made in <CODE>texinfo
-5.x</CODE>.
+work better with the incompatible changes made in <code>texinfo
+      5.x</code>.
 </p>
 </li>
 <li><p> The minimum version for a system <code>xz</code> library is now
@@ -2091,7 +6308,7 @@ compress in ways other versions cannot decompress.
 updated to 5.0.5.
 </p>
 </li>
-<li><p> Since <CODE>javareconf</CODE> (see above) is used when <font face="Courier New,Courier" color="#666666"><b>R</b></font> is
+<li><p> Since <code>javareconf</code> (see above) is used when <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> is
 installed, a stable link for <span class="env">JAVA_HOME</span> can be supplied then.
 </p>
 </li>
@@ -2103,7 +6320,7 @@ which typically require byte-compilation.
 <li><p> More of the installation and checking process will work even
 when <span class="env">TMPDIR</span> is set to a path containing spaces, but this is
 not recommended and external software (such as
-<CODE>texi2dvi</CODE>) may fail.
+<code>texi2dvi</code>) may fail.
 </p>
 </li></ul>
 
@@ -2118,7 +6335,7 @@ not recommended and external software (such as
 package is not installed.
 </p>
 </li>
-<li> <p><CODE>R CMD INSTALL</CODE> has a new option
+<li> <p><code>R CMD INSTALL</code> has a new option
 <code>--no-byte-compile</code> which will override a <span class="samp">ByteCompile</span>
 field in the package's ‘<span class="file">DESCRIPTION</span>’ file.
 </p>
@@ -2142,7 +6359,7 @@ version requirements were previously silently ignored.)
 <li><p> The default ‘version’ of Bioconductor for its
 packages has been changed to the upcoming <span class="samp">2.13</span>, but this
 can be set by the environment variable <span class="env">R_BIOC_VERSION</span> when
-<font face="Courier New,Courier" color="#666666"><b>R</b></font> is installed.
+<span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> is installed.
 </p>
 </li></ul>
 
@@ -2175,7 +6392,7 @@ against package code supplying an invalid <code>rho</code>.
 <ul>
 <li><p> The unused <code>namespace</code> argument to
 <code>package.skeleton()</code> is now formally deprecated and will be
-removed in <font face="Courier New,Courier" color="#666666"><b>R</b></font> 3.1.0.
+removed in <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> 3.1.0.
 </p>
 </li>
 <li> <p><code>plclust()</code> is deprecated: use the <code>plot()</code> method
@@ -2195,7 +6412,7 @@ current ‘<span class="file">NEWS</span>’ files for a long time).
 
 
 <ul>
-<li> <p>‘An Introduction to R’ has a new chapter on using <font face="Courier New,Courier" color="#666666"><b>R</b></font>
+<li> <p>‘An Introduction to R’ has a new chapter on using <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span>
 as a scripting language including interacting with the OS.
 </p>
 </li></ul>
@@ -2208,7 +6425,7 @@ as a scripting language including interacting with the OS.
 
 <ul>
 <li> <p><code>help.request()</code> could not determine the current version
-of <font face="Courier New,Courier" color="#666666"><b>R</b></font> on CRAN.  (<a href="https://bugs.R-project.org/bugzilla3/show_bug.cgi?id=15241">PR#15241</a>)
+of <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> on CRAN.  (<a href="https://bugs.R-project.org/bugzilla3/show_bug.cgi?id=15241">PR#15241</a>)
 </p>
 </li>
 <li><p> On Windows, <code>file.info()</code> failed on root directories unless
@@ -2224,7 +6441,7 @@ results coming from <code>regexpr()</code>.  (<a href="https://bugs.R-project.or
 <code>representation=</code>. (<a href="https://bugs.R-project.org/bugzilla3/show_bug.cgi?id=15312">PR#15312</a>)
 </p>
 </li>
-<li> <p><CODE>R CMD config</CODE> failed in an installed build of <font face="Courier New,Courier" color="#666666"><b>R</b></font>
+<li> <p><code>R CMD config</code> failed in an installed build of <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span>
 3.0.1 (only) when a sub-architecture was used.  (Reported by
 Berwin Turlach.)
 </p>
@@ -2239,9 +6456,9 @@ chosen, so the MD5 sums did not refer to the installed versions.
 (and possibly others similarly).  (Reported by Peter Langfelder.)
 </p>
 </li>
-<li><p> If multiple packages were checked by <CODE>R CMD check</CODE>,
+<li><p> If multiple packages were checked by <code>R CMD check</code>,
 and one was written for a different OS, it would set
-<CODE>–no-install</CODE> for all following packages as well as
+<code>--no-install</code> for all following packages as well as
 itself.
 </p>
 </li>
@@ -2354,7 +6571,7 @@ tolerance and reported error estimates that were exceeded.
 0. (<a href="https://bugs.R-project.org/bugzilla3/show_bug.cgi?id=15915">PR#15915</a>)
 </p>
 </li>
-<li> <p><font face="Courier New,Courier" color="#666666"><b>R</b></font> is now better protected against people trying to interact
+<li> <p><span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> is now better protected against people trying to interact
 with the console in startup code.  (<a href="https://bugs.R-project.org/bugzilla3/show_bug.cgi?id=15325">PR#15325</a>)
 </p>
 </li>
@@ -2370,7 +6587,7 @@ to a zero-row data frame.  (<a href="https://bugs.R-project.org/bugzilla3/show_b
 </p>
 </li>
 <li><p> All the (where necessary cut-down) vignettes are installed
-if <font face="Courier New,Courier" color="#666666"><b>R</b></font> was configured with <span class="option">--without-recommended-packages</span>.
+if <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> was configured with <span class="option">--without-recommended-packages</span>.
 </p>
 </li>
 <li> <p><code>source()</code> did not display filenames when reporting
@@ -2381,13 +6598,14 @@ syntax errors.
 token.
 </p>
 </li>
-<li><p> (Windows only) Starting <font face="Courier New,Courier" color="#666666"><b>R</b></font> with <CODE>R</CODE> (instead of
-<CODE>Rterm</CODE> or <CODE>Rgui</CODE>) would lose any
+<li><p> (Windows only) Starting <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> with <code>R</code> (instead of
+<code>Rterm</code> or <code>Rgui</code>) would lose any
 zero-length strings from the command line arguments. (<a href="https://bugs.R-project.org/bugzilla3/show_bug.cgi?id=15406">PR#15406</a>)
 </p>
 </li>
-<li><p> Errors in the encoding specified on the command line via
-<CODE>–encoding=foo</CODE> were not handled properly.  (<a href="https://bugs.R-project.org/bugzilla3/show_bug.cgi?id=15405">PR#15405</a>)
+<li><p> Errors in the encoding specified on the command line
+<em>via</em> <code>--encoding=foo</code> were not handled properly.
+(<a href="https://bugs.R-project.org/bugzilla3/show_bug.cgi?id=15405">PR#15405</a>)
 </p>
 </li>
 <li><p> If <code>x</code> is a symbol, <code>is.vector(x, "name")</code> now
@@ -2395,15 +6613,15 @@ returns <code>TRUE</code>, since <code>"name"</code> and <code>"symbol"</code>
 should be synonyms.  (Reported by Hervé Pagès.)
 </p>
 </li>
-<li> <p><CODE>R CMD rtags</CODE> works on platforms (such as OS X)
-with a XSI-conformant shell command <CODE>echo</CODE>. (<a href="https://bugs.R-project.org/bugzilla3/show_bug.cgi?id=15231">PR#15231</a>)
+<li> <p><code>R CMD rtags</code> works on platforms (such as OS X)
+with a XSI-conformant shell command <code>echo</code>. (<a href="https://bugs.R-project.org/bugzilla3/show_bug.cgi?id=15231">PR#15231</a>)
 </p>
 </li>
 <li> <p><code>is.unsorted(NA)</code> returns false as documented (rather than
 <code>NA</code>).
 </p>
 </li>
-<li> <p><CODE>R CMD LINK</CODE> did not know about sub-architectures.
+<li> <p><code>R CMD LINK</code> did not know about sub-architectures.
 </p>
 </li>
 <li> <p><code>system()</code> and <code>system2()</code> are better protected
@@ -2413,13 +6631,13 @@ directory path.
 </li>
 <li> <p><code>file.show()</code> and <code>edit()</code> are now more likely to
 work on file paths containing spaces.  (Where external utilities
-are used, not the norm on Windows nor in <CODE>R.app</CODE> which
+are used, not the norm on Windows nor in <code>R.app</code> which
 should previously have worked.)
 </p>
 </li>
 <li><p> Packages using the <span class="pkg">methods</span> package are more likely to
 work when they import it but it is not attached.  (Several parts
-of its C code were looking for its <font face="Courier New,Courier" color="#666666"><b>R</b></font> functions on the search path
+of its C code were looking for its <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> functions on the search path
 rather than in its namespace.)
 </p>
 </li>
@@ -2428,11 +6646,11 @@ rather than in its namespace.)
 </li>
 <li><p> (Windows) <code>system2()</code> now respects specifying
 <code>stdout</code> and <code>stderr</code> as files if called from
-<CODE>Rgui</CODE>. (<a href="https://bugs.R-project.org/bugzilla3/show_bug.cgi?id=15393">PR#15393</a>)
+<code>Rgui</code>. (<a href="https://bugs.R-project.org/bugzilla3/show_bug.cgi?id=15393">PR#15393</a>)
 </p>
 </li>
 <li><p> Closing an <code>x11()</code> device whilst <code>locator()</code> or
-<code>identify()</code> is in progress no longer hangs <font face="Courier New,Courier" color="#666666"><b>R</b></font>.  (<a href="https://bugs.R-project.org/bugzilla3/show_bug.cgi?id=15253">PR#15253</a>)
+<code>identify()</code> is in progress no longer hangs <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span>.  (<a href="https://bugs.R-project.org/bugzilla3/show_bug.cgi?id=15253">PR#15253</a>)
 </p>
 </li>
 <li> <p><code>list.dirs(full.names = FALSE)</code> was not implemented.
@@ -2464,7 +6682,7 @@ was not respected in some locales. (<a href="https://bugs.R-project.org/bugzilla
 
 
 
-<h3><img src="../help/figures/../../html/logo.jpg" alt="../../html/logo.jpg" /> CHANGES IN R 3.0.1</h3>
+<h3><img src="../help/figures/../../html/Rlogo.svg" class="toplogo" alt="[R logo]" /> CHANGES IN R 3.0.1</h3>
 
 
 
@@ -2527,11 +6745,11 @@ platform, and in most cases serialization to a vector of more than
 
 
 <ul>
-<li> <p><CODE>R CMD config</CODE> now make use of personal
+<li> <p><code>R CMD config</code> now make use of personal
 ‘<span class="file">Makevars</span>’ files under ‘<span class="file">~/.R</span>’ and a site file
-‘<span class="file">Makevars.site</span>’, in the same way as <CODE>R CMD SHLIB</CODE> and
-<CODE>R CMD INSTALL</CODE>.  This makes the utility more useful in
-package <CODE>configure</CODE> scripts.
+‘<span class="file">Makevars.site</span>’, in the same way as <code>R CMD SHLIB</code> and
+<code>R CMD INSTALL</code>.  This makes the utility more useful in
+package <code>configure</code> scripts.
 </p>
 <p>On Windows finding the personal files may require the environment
 variable <span class="env">HOME</span> set.
@@ -2550,7 +6768,7 @@ variable <span class="env">HOME</span> set.
 <ul>
 <li><p> Alternatives to the site and user customization files
 ‘<span class="file">Makevars.site</span>’ and ‘<span class="file">~/.R/Makevars</span>’ can be specified
-<EM>via</EM> the environment variables <span class="env">R_MAKEVARS_SITE</span> and
+<em>via</em> the environment variables <span class="env">R_MAKEVARS_SITE</span> and
 <span class="env">R_MAKEVARS_USER</span> respectively.  These can be used to suppress
 the use of the default files by setting an empty value (where
 possible) or a non-existent path.
@@ -2601,7 +6819,7 @@ greater than one and more than one argument was using separators
 inconsistently (<a href="https://bugs.R-project.org/bugzilla3/show_bug.cgi?id=15261">PR#15261</a>).
 </p>
 </li>
-<li><p> On Windows in <font face="Courier New,Courier" color="#666666"><b>R</b></font> 3.0.0, <code>savePlot()</code> failed because of
+<li><p> On Windows in <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> 3.0.0, <code>savePlot()</code> failed because of
 an incorrect check on the argument count.
 </p>
 </li>
@@ -2612,17 +6830,17 @@ and not a character vector (as documented) for the internal method.
 </li>
 <li> <p><code>contourLines()</code> now checks more comprehensively for
 conformance of its <code>x</code>, <code>y</code> and <code>z</code> arguments (it
-was used incorrectly in package <a href="http://CRAN.R-project.org/package=R2G2"><span class="pkg">R2G2</span></a>).
+was used incorrectly in package <a href="https://CRAN.R-project.org/package=R2G2"><span class="pkg">R2G2</span></a>).
 </p>
 </li>
-<li><p> Saved graphics display lists are <font face="Courier New,Courier" color="#666666"><b>R</b></font> version-specific.
+<li><p> Saved graphics display lists are <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> version-specific.
 Attempting to load workspaces containing them (or some other
-version-specific objects) aborted the load in <font face="Courier New,Courier" color="#666666"><b>R</b></font> 3.0.0 and
+version-specific objects) aborted the load in <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> 3.0.0 and
 earlier; now it does a partial load and generates a warning
 instead.
 </p>
 </li>
-<li><p> In <font face="Courier New,Courier" color="#666666"><b>R</b></font> 3.0.0, <code>identify()</code> and <code>locator()</code> did
+<li><p> In <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> 3.0.0, <code>identify()</code> and <code>locator()</code> did
 not record information correctly, so replaying a graph (e.g., by
 copying it to another device) would fail. (<a href="https://bugs.R-project.org/bugzilla3/show_bug.cgi?id=15271">PR#15271</a>)
 </p>
@@ -2636,7 +6854,7 @@ it segfaulted).
 </p>
 </li>
 <li> <p><code>supsmu()</code> could read/write outside its input vectors
-for very short inputs (seen in package <a href="http://CRAN.R-project.org/package=rms"><span class="pkg">rms</span></a> for <code>n = 4</code>).
+for very short inputs (seen in package <a href="https://CRAN.R-project.org/package=rms"><span class="pkg">rms</span></a> for <code>n = 4</code>).
 </p>
 </li>
 <li> <p><code>as.dendrogram()</code>'s <code>hclust</code> method uses less
@@ -2650,7 +6868,7 @@ strings and not of error objects.  (Spotted by Karl Forner and
 Bernd Bischl.)
 </p>
 </li>
-<li><p> In <font face="Courier New,Courier" color="#666666"><b>R</b></font> 3.0.0, when <code>help()</code> found multiple pages with
+<li><p> In <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> 3.0.0, when <code>help()</code> found multiple pages with
 the same alias, the HTML display of all the selections was not
 produced.  (<a href="https://bugs.R-project.org/bugzilla3/show_bug.cgi?id=15282">PR#15282</a>)
 </p>
@@ -2695,7 +6913,7 @@ instead of failing.
 
 
 
-<h3><img src="../help/figures/../../html/logo.jpg" alt="../../html/logo.jpg" /> CHANGES IN R 3.0.0</h3>
+<h3><img src="../help/figures/../../html/Rlogo.svg" class="toplogo" alt="[R logo]" /> CHANGES IN R 3.0.0</h3>
 
 
 
@@ -2704,7 +6922,7 @@ instead of failing.
 
 <ul>
 <li><p> Packages need to be (re-)installed under this version
-(3.0.0) of <font face="Courier New,Courier" color="#666666"><b>R</b></font>.
+(3.0.0) of <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span>.
 </p>
 </li>
 <li><p> There is a subtle change in behaviour for numeric index
@@ -2717,13 +6935,13 @@ vector on a 64-bit platform and give an error on a 32-bit one.
 </li>
 <li><p> It is now possible for 64-bit builds to allocate amounts of
 memory limited only by the OS.  It may be wise to use OS
-facilities (e.g., <CODE>ulimit</CODE> in a <CODE>bash</CODE> shell,
-<CODE>limit</CODE> in <CODE>csh</CODE>), to set limits on overall memory
-consumption of an <font face="Courier New,Courier" color="#666666"><b>R</b></font> process, particularly in a multi-user
+facilities (e.g., <code>ulimit</code> in a <code>bash</code> shell,
+<code>limit</code> in <code>csh</code>), to set limits on overall memory
+consumption of an <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> process, particularly in a multi-user
 environment.  A number of packages need a limit of at least 4GB of
 virtual memory to load.
 </p>
-<p>64-bit Windows builds of <font face="Courier New,Courier" color="#666666"><b>R</b></font> are by default limited in memory usage
+<p>64-bit Windows builds of <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> are by default limited in memory usage
 to the amount of RAM installed: this limit can be changed by
 command-line option <span class="option">--max-mem-size</span> or setting environment
 variable <span class="env">R_MAX_MEM_SIZE</span>.
@@ -2769,10 +6987,10 @@ raised (again).
 </li>
 <li><p> Where methods for <code>length()</code> return a double value
 which is representable as an integer (as often happens for package
-<a href="http://CRAN.R-project.org/package=Matrix"><span class="pkg">Matrix</span></a>), this is converted to an integer.
+<a href="https://CRAN.R-project.org/package=Matrix"><span class="pkg">Matrix</span></a>), this is converted to an integer.
 </p>
 </li>
-<li><p> Matrix indexing of dataframes by two-column numeric indices
+<li><p> Matrix indexing of data frames by two-column numeric indices
 is now supported for replacement as well as extraction.
 </p>
 </li>
@@ -2852,7 +7070,7 @@ interactions (and no longer attempts to plot interaction terms).
 </p>
 </li>
 <li><p> The parser now incorporates code from Romain Francois'
-<a href="http://CRAN.R-project.org/package=parser"><span class="pkg">parser</span></a> package, to support more detailed computation on
+<a href="https://CRAN.R-project.org/package=parser"><span class="pkg">parser</span></a> package, to support more detailed computation on
 the code, such as syntax highlighting, comment-based
 documentation, etc.  Functions <code>getParseData()</code> and
 <code>getParseText()</code> access the data.
@@ -2955,11 +7173,11 @@ the source file(s) of each chunk.
 long-existing internal call.
 </p>
 </li>
-<li> <p><code>aspell()</code> gains filters for <font face="Courier New,Courier" color="#666666"><b>R</b></font> code, Debian Control
-Format and message catalog files, and support for <font face="Courier New,Courier" color="#666666"><b>R</b></font> level
+<li> <p><code>aspell()</code> gains filters for <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> code, Debian Control
+Format and message catalog files, and support for <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> level
 dictionaries.  In addition, package <span class="pkg">utils</span> now provides
 functions <code>aspell_package_R_files()</code> and
-<code>aspell_package_C_files()</code> for spell checking <font face="Courier New,Courier" color="#666666"><b>R</b></font> and C level
+<code>aspell_package_C_files()</code> for spell checking <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> and C level
 message strings in packages.
 </p>
 </li>
@@ -2990,7 +7208,7 @@ use as part of other plots, but does not plot them.
 </p>
 </li>
 <li> <p><code>quartz.save()</code>, formerly an undocumented part of
-<CODE>R.app</CODE>, is now available to copy a device to a
+<code>R.app</code>, is now available to copy a device to a
 <code>quartz()</code> device.  <code>dev.copy2pdf()</code> optionally does
 this for PDF output: <code>quartz.save()</code> defaults to PNG.
 </p>
@@ -3038,7 +7256,7 @@ consequently, <code>head()</code>, e.g., is more useful.
 </li>
 <li> <p><code>encodeString()</code> preserves UTF-8 marked encodings.
 Thus if factor levels are marked as UTF-8 an attempt is made to
-print them in UTF-8 in <CODE>RGui</CODE> on Windows.
+print them in UTF-8 in <code>RGui</code> on Windows.
 </p>
 </li>
 <li> <p><code>readLines()</code> and <code>scan()</code> (and hence
@@ -3116,7 +7334,7 @@ the <span class="samp">ustar</span> limit of 8GB.
 </li>
 <li><p> Local reference classes have been added to package
 <span class="pkg">methods</span>.  These are a technique for avoiding unneeded
-copying of large components of objects while retaining standard <font face="Courier New,Courier" color="#666666"><b>R</b></font>
+copying of large components of objects while retaining standard <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span>
 functional behavior.  See <code>?LocalReferenceClasses</code>.
 </p>
 </li>
@@ -3128,9 +7346,9 @@ past even though the standard required them to be in UTC).
 </p>
 </li>
 <li> <p><code>replayplot()</code> cannot (and will not attempt to) replay
-plots recorded under <font face="Courier New,Courier" color="#666666"><b>R</b></font> < 3.0.0.  It may crash the <font face="Courier New,Courier" color="#666666"><b>R</b></font> session if
+plots recorded under <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> < 3.0.0.  It may crash the <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> session if
 an attempt is made to replay plots created in a different build of
-<font face="Courier New,Courier" color="#666666"><b>R</b></font> >= 3.0.0.
+<span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> >= 3.0.0.
 </p>
 </li>
 <li><p> Palette changes get recorded on the display list, so
@@ -3146,8 +7364,8 @@ during a plot.
 <code>keep.source</code>, which defaults to <code>options("keep.source")</code>.
 </p>
 </li>
-<li><p> Profiling via <code>Rprof()</code> now optionally records information
-at the statement level, not just the function level.
+<li><p> Profiling <em>via</em> <code>Rprof()</code> now optionally records
+information at the statement level, not just the function level.
 </p>
 </li>
 <li><p> The <code>Rprof()</code> function now quotes function names in
@@ -3155,7 +7373,7 @@ in its output file on Windows, to be consistent with the quoting
 in Unix.
 </p>
 </li>
-<li><p> Profiling via <code>Rprof()</code> now optionally records
+<li><p> Profiling <em>via</em> <code>Rprof()</code> now optionally records
 information about time spent in GC.
 </p>
 </li>
@@ -3227,10 +7445,10 @@ been restored: they can be overridden by the command-line options
 <li><p> On Windows, the device name for bitmap devices as reported
 by <code>.Device</code> and <code>.Devices</code> no longer includes the file
 name.   This is for consistency with other platforms and was
-requested by the <a href="http://CRAN.R-project.org/package=lattice"><span class="pkg">lattice</span></a> maintainer.
+requested by the <a href="https://CRAN.R-project.org/package=lattice"><span class="pkg">lattice</span></a> maintainer.
 </p>
 <p><code>win.metafile()</code> still uses the file name: the exact form is
-used by package <a href="http://CRAN.R-project.org/package=tkrplot"><span class="pkg">tkrplot</span></a>.
+used by package <a href="https://CRAN.R-project.org/package=tkrplot"><span class="pkg">tkrplot</span></a>.
 </p>
 </li>
 <li> <p><code>set.seed(NULL)</code> re-initializes <code>.Random.seed</code> as
@@ -3318,7 +7536,7 @@ the future).  Regrettably several packages had copied the non-API
 </li>
 <li> <p><code>.C()</code> and <code>.Fortran()</code> do not accept long vector
 inputs.  This is a precaution as it is very unlikely that existing
-code will have been written to handle long vectors (and the <font face="Courier New,Courier" color="#666666"><b>R</b></font>
+code will have been written to handle long vectors (and the <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span>
 wrappers often assume that <code>length(x)</code> is an integer).
 </p>
 </li>
@@ -3339,7 +7557,7 @@ long vectors (slowly except for radix sorting).
 
 
 <ul>
-<li><p> More use has been made of <font face="Courier New,Courier" color="#666666"><b>R</b></font> objects representing registered
+<li><p> More use has been made of <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> objects representing registered
 entry points, which is more efficient as the address is provided
 by the loader once only when the package is loaded.
 </p>
@@ -3347,11 +7565,11 @@ by the loader once only when the package is loaded.
 <code>splines</code> and <code>tcltk</code>: it was already in place for the
 other standard packages.
 </p>
-<p>Since these entry points are always accessed by the <font face="Courier New,Courier" color="#666666"><b>R</b></font> entry
+<p>Since these entry points are always accessed by the <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> entry
 points they do not need to be in the load table which can be
 substantially smaller and hence searched faster.  This does mean
 that <code>.C</code> / <code>.Fortran</code> / <code>.Call</code> calls copied from
-earlier versions of <font face="Courier New,Courier" color="#666666"><b>R</b></font> may no longer work – but they were never
+earlier versions of <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> may no longer work – but they were never
 part of the API.
 </p>
 </li>
@@ -3392,11 +7610,11 @@ to import it explicitly from package <span class="pkg">methods</span>.
 
 <ul>
 <li><p> The transitional support for installing packages without
-namespaces (required since <font face="Courier New,Courier" color="#666666"><b>R</b></font> 2.14.0) has been removed.
-<CODE>R CMD build</CODE> will still add a namespace, but a
+namespaces (required since <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> 2.14.0) has been removed.
+<code>R CMD build</code> will still add a namespace, but a
 <code>.First.lib()</code> function will need to be converted.
 </p>
-<p><CODE>R CMD INSTALL</CODE> no longer adds a namespace (so
+<p><code>R CMD INSTALL</code> no longer adds a namespace (so
 installation will fail), and a <code>.First.lib()</code> function in a
 package will be ignored (with an installation warning for now).
 </p>
@@ -3406,9 +7624,10 @@ package will be ignored (with an installation warning for now).
 </li>
 <li><p> Packages can specify in their ‘<span class="file">DESCRIPTION file</span>’ a line
 like </p>
-<PRE>     Biarch: yes
-</PRE>
-to be installed on Windows with <span class="option">--force-biarch</span>.
+<pre>     Biarch: yes
+</pre>
+<p>to be installed on Windows with <span class="option">--force-biarch</span>.
+</p>
 </li>
 <li><p> Package vignettes can now be processed by other engines
 besides <code>Sweave</code>; see ‘Writing R Extensions’ and the
@@ -3416,8 +7635,8 @@ besides <code>Sweave</code>; see ‘Writing R Extensions’ and the
 </p>
 </li>
 <li><p> The ‘<span class="file">*.R</span>’ tangled source code for vignettes is now
-included in tarballs when <CODE>R CMD build</CODE> is used to produce
-them.  In <font face="Courier New,Courier" color="#666666"><b>R</b></font> 3.0.0, ‘<span class="file">*.R</span>’ files not in the sources will be
+included in tarballs when <code>R CMD build</code> is used to produce
+them.  In <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> 3.0.0, ‘<span class="file">*.R</span>’ files not in the sources will be
 produced at install time, but eventually this will be dropped.
 </p>
 </li>
@@ -3426,7 +7645,7 @@ the repository without any Mac subtype (which used to be
 <span class="samp">universal</span> or <span class="samp">leopard</span>): it looks in
 ‘<span class="file">bin/macosx/contrib/3.0</span>’ rather than
 ‘<span class="file">bin/macosx/leopard/contrib/2.15</span>’).  This is the type used
-for the <acronym><span class="acronym">CRAN</span></acronym> binary distribution for OS X as from <font face="Courier New,Courier" color="#666666"><b>R</b></font>
+for the <acronym><span class="acronym">CRAN</span></acronym> binary distribution for OS X as from <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span>
 3.0.0.
 </p>
 </li>
@@ -3437,7 +7656,7 @@ necessary the corresponding flags and <code>FLIBS</code>) in file
 ‘<span class="file">~/.R/Makevars</span>’.
 </p>
 <p>This is convenient for those working with binary distributions of
-<font face="Courier New,Courier" color="#666666"><b>R</b></font>, e.g. on OS X.
+<span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span>, e.g. on OS X.
 </p>
 </li></ul>
 
@@ -3448,12 +7667,12 @@ necessary the corresponding flags and <code>FLIBS</code>) in file
 
 
 <ul>
-<li> <p><CODE>R CMD check</CODE> now gives a warning rather than a
+<li> <p><code>R CMD check</code> now gives a warning rather than a
 note if it finds calls to <code>abort</code>, <code>assert</code> or
 <code>exit</code> in compiled code, and has been able to find the
 ‘<span class="file">.o</span>’ file in which the calls occur.
 </p>
-<p>Such calls can terminate the <font face="Courier New,Courier" color="#666666"><b>R</b></font> process which loads the package.
+<p>Such calls can terminate the <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> process which loads the package.
 </p>
 </li>
 <li><p> The location of the build and check environment files can
@@ -3461,55 +7680,55 @@ now be specified by the environment variables
 <span class="env">R_BUILD_ENVIRON</span> and <span class="env">R_CHECK_ENVIRON</span>, respectively.
 </p>
 </li>
-<li> <p><CODE>R CMD Sweave</CODE> gains a <span class="option">--compact</span> option
+<li> <p><code>R CMD Sweave</code> gains a <span class="option">--compact</span> option
 to control possibly reducing the size of the PDF file it creates
 when <span class="option">--pdf</span> is given.
 </p>
 </li>
-<li> <p><CODE>R CMD build</CODE> now omits Eclipse's ‘<span class="file">.metadata</span>’
-directories, and <CODE>R CMD check</CODE> warns if it finds them.
+<li> <p><code>R CMD build</code> now omits Eclipse's ‘<span class="file">.metadata</span>’
+directories, and <code>R CMD check</code> warns if it finds them.
 </p>
 </li>
-<li> <p><CODE>R CMD check</CODE> now does some checks on functions
+<li> <p><code>R CMD check</code> now does some checks on functions
 defined within reference classes, including of <code>.Call()</code> etc
 calls.
 </p>
 </li>
-<li> <p><CODE>R CMD check –as-cran</CODE> notes assignments to the
+<li> <p><code>R CMD check --as-cran</code> notes assignments to the
 global environment, calls to <code>data()</code> which load into the
 global environment, and calls to <code>attach()</code>.
 </p>
 </li>
-<li> <p><CODE>R CMD build</CODE> by default uses the internal method of
+<li> <p><code>R CMD build</code> by default uses the internal method of
 <code>tar()</code> to prepare the tarball.  This is more likely to
-produce a tarball compatible with <CODE>R CMD INSTALL</CODE> and
-<CODE>R CMD check</CODE>: an external <CODE>tar</CODE> program,
-including options, can be specified <EM>via</EM> the environment
+produce a tarball compatible with <code>R CMD INSTALL</code> and
+<code>R CMD check</code>: an external <code>tar</code> program,
+including options, can be specified <em>via</em> the environment
 variable <span class="env">R_BUILD_TAR</span>.
 </p>
 </li>
 <li> <p><code>tools::massageExamples()</code> is better protected against
 packages which re-define base functions such as <code>cat()</code> and
-<code>get()</code> and so can cause <CODE>R CMD check</CODE> to fail when
+<code>get()</code> and so can cause <code>R CMD check</code> to fail when
 checking examples.
 </p>
 </li>
-<li> <p><CODE>R CMD javareconf</CODE> has been enhanced to be more
-similar to the code used by <CODE>configure</CODE>.
+<li> <p><code>R CMD javareconf</code> has been enhanced to be more
+similar to the code used by <code>configure</code>.
 </p>
 <p>There is now a test that a JNI program can be compiled (like
-<CODE>configure</CODE> did) and only working settings are used.
+<code>configure</code> did) and only working settings are used.
 </p>
 <p>It makes use of custom settings from configuration recorded in
 ‘<span class="file">etc/javaconf</span>’.
 </p>
 </li>
-<li><p> The <span class="option">--no-vignettes</span> argument of <CODE>R CMD
-build</CODE> has been renamed to the more accurate
+<li><p> The <span class="option">--no-vignettes</span> argument of <code>R CMD
+	build</code> has been renamed to the more accurate
 <span class="option">--no-build-vignettes</span>: its action has always been to
 (re)build vignettes and never omitted them.
 </p>
-<p><CODE>R CMD check</CODE> accepts <span class="option">--no-build-vignettes</span> as a
+<p><code>R CMD check</code> accepts <span class="option">--no-build-vignettes</span> as a
 preferred synonym for <span class="option">--no-rebuild-vignettes</span>.
 </p>
 </li></ul>
@@ -3557,7 +7776,7 @@ been removed: use <code>pdf(file = NULL)</code> instead.
 </p>
 </li>
 <li><p> The <code>.Fortran()</code> entry point <code>"dqrls"</code> which has
-not been used by <font face="Courier New,Courier" color="#666666"><b>R</b></font> since version 2.15.1 is no longer available.
+not been used by <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> since version 2.15.1 is no longer available.
 </p>
 </li>
 <li><p> Functions <code>traceOn()</code> and <code>traceOff()</code> in package
@@ -3617,21 +7836,21 @@ functions removed.
 </p>
 </li>
 <li><p> The <code>maxRasters</code> argument of <code>pdf()</code> (unused since
-<font face="Courier New,Courier" color="#666666"><b>R</b></font> 2.14.0) has been removed.
+<span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> 2.14.0) has been removed.
 </p>
 </li>
 <li><p> The unused <code>fontsmooth</code> argument has been removed from
 the <code>quartz()</code> device.
 </p>
 </li>
-<li><p> All the (non-API) EISPACK entry points in <font face="Courier New,Courier" color="#666666"><b>R</b></font> have been removed.
+<li><p> All the (non-API) EISPACK entry points in <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> have been removed.
 </p>
 </li>
 <li> <p><code>chol(pivot = TRUE, LINPACK = TRUE)</code> is deprecated.
 </p>
 </li>
 <li><p> The long-deprecated use of <code>\synopsis</code> in the
-<span class="samp">Usage</span> section of ‘<span class="file">.Rd</span>’ files will be removed in <font face="Courier New,Courier" color="#666666"><b>R</b></font>
+<span class="samp">Usage</span> section of ‘<span class="file">.Rd</span>’ files will be removed in <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span>
 3.1.0.
 </p>
 </li>
@@ -3641,11 +7860,12 @@ been in the API.
 </p>
 </li>
 <li><p> In a package's ‘<span class="file">DESCRIPTION</span>’ file, </p>
-<PRE>    License: X11</PRE>
-is deprecated, since it includes
+<pre>    License: X11</pre>
+<p>is deprecated, since it includes
 ‘Copyright (C) 1996 X Consortium’ which cannot be
-appropriate for a current <font face="Courier New,Courier" color="#666666"><b>R</b></font> package.  Use ‘MIT’ or
+appropriate for a current <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> package.  Use ‘MIT’ or
 ‘BSD_2_clause’ instead.
+</p>
 </li></ul>
 
 
@@ -3670,7 +7890,7 @@ been used by packages no longer exist, including
 </p>
 </li>
 <li><p> Some <code>.External()</code> calls to the <code>base</code> package
-(really to the <font face="Courier New,Courier" color="#666666"><b>R</b></font> executable or shared library) have been moved to
+(really to the <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> executable or shared library) have been moved to
 more appropriate packages.  Packages should not have been using
 such calls, but some did (mainly those used by <code>integrate()</code>).
 </p>
@@ -3684,15 +7904,15 @@ such calls, but some did (mainly those used by <code>integrate()</code>).
 
 <ul>
 <li><p> There is a new function <code>mcaffinity()</code> which allows
-getting or setting the CPU affinity mask for the current <font face="Courier New,Courier" color="#666666"><b>R</b></font> process on
+getting or setting the CPU affinity mask for the current <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> process on
 systems that supports this (currently only Linux has been tested
 successfully).  It has no effect on systems which do not support
 process affinity.  Users are not expected to use this function
 directly (with the exception of fixing libraries that break
 affinity settings like OpenBLAS) – the function is rather
 intended to support affinity control in high-level parallel
-functions.  In the future, <font face="Courier New,Courier" color="#666666"><b>R</b></font> may supplement lack of affinity
-control in the OS by its own bookkeeping via <code>mcaffinity()</code>
+functions.  In the future, <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> may supplement lack of affinity
+control in the OS by its own bookkeeping <em>via</em> <code>mcaffinity()</code>
 related to processes and threads it spawns.
 </p>
 </li>
@@ -3741,7 +7961,7 @@ remapping to <code>Rf_</code>, notably <code>[dpq]nbinom_mu</code>.
 </p>
 </li>
 <li><p> Some of the interface pointers formerly available only to
-<CODE>R.app</CODE> are now available to front-ends on all
+<code>R.app</code> are now available to front-ends on all
 Unix-alikes: one has been added for the interface to
 <code>View()</code>.
 </p>
@@ -3764,7 +7984,7 @@ migrated to package <span class="pkg">grDevices</span> and so are no longer avai
 </p>
 </li>
 <li> <p><code>R_GE_version</code> has been increased to <code>10</code> and
-<code>name2col</code> removed (use <code>R_GE_str2col</code> instead).  <font face="Courier New,Courier" color="#666666"><b>R</b></font>
+<code>name2col</code> removed (use <code>R_GE_str2col</code> instead).  <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span>
 internal colour codes are now defined using the typedef
 <code>rcolor</code>.
 </p>
@@ -3773,7 +7993,7 @@ internal colour codes are now defined using the typedef
 is valid.
 </p>
 </li>
-<li><p> Several non-API entry points no longer used by <font face="Courier New,Courier" color="#666666"><b>R</b></font> have been
+<li><p> Several non-API entry points no longer used by <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> have been
 removed, including the Fortran entry points <code>chol</code>,
 <code>chol2inv</code>, <code>cg</code>, <code>ch</code> and <code>rg</code>, and the C
 entry points <code>Brent_fmin</code>, <code>fft_factor</code> and <code>fft_work</code>.
@@ -3799,21 +8019,21 @@ file for details).
 
 
 <ul>
-<li><p> The management of translations has been converted to <font face="Courier New,Courier" color="#666666"><b>R</b></font>
+<li><p> The management of translations has been converted to <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span>
 code: see <code>?tools::update_pkg_po</code>.
 </p>
 </li>
-<li><p> The translations for the <font face="Courier New,Courier" color="#666666"><b>R</b></font> interpreter and
-<CODE>RGui.exe</CODE> are now part of the <span class="pkg">base</span> package (rather than
+<li><p> The translations for the <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> interpreter and
+<code>RGui.exe</code> are now part of the <span class="pkg">base</span> package (rather than
 having sources in directory ‘<span class="file">po</span>’ and being installed to
 ‘<span class="file">share/locale</span>’).  Thus the <span class="pkg">base</span> package supports three
 translation domains, <code>R-base</code>, <code>R</code> and <code>RGui</code>.
 </p>
 </li>
-<li><p> The compiled translations which ship with <font face="Courier New,Courier" color="#666666"><b>R</b></font> are all
+<li><p> The compiled translations which ship with <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> are all
 installed to the new package <span class="pkg">translations</span> for easier
 updating.  The first package of that name found on
-<code>.libPaths()</code> at the start of the <font face="Courier New,Courier" color="#666666"><b>R</b></font> session will be used.
+<code>.libPaths()</code> at the start of the <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> session will be used.
 (It is possible messages will be used before <code>.libPaths()</code> is
 set up in which case the default translations will be used: set
 environment variable <span class="env">R_TRANSLATIONS</span> to point to the location
@@ -3839,11 +8059,11 @@ easier to translate, incorporating suggestions from Łukasz Daniel.
 <ul>
 <li><p> There is again support for building without using the C
 ‘long double’ type.  This is required by C99, but system
-implementations can be slow or flawed.  Use <CODE>configure</CODE>
+implementations can be slow or flawed.  Use <code>configure</code>
 option <span class="option">--disable-long-double</span>.
 </p>
 </li>
-<li> <p><CODE>make pdf</CODE> and <CODE>make install-pdf</CODE> now make
+<li> <p><code>make pdf</code> and <code>make install-pdf</code> now make
 and install the full reference index (including all base and
 recommended packages).
 </p>
@@ -3853,7 +8073,7 @@ in the installer is now the full reference index, including all
 base and recommended packages.
 </p>
 </li>
-<li> <p><font face="Courier New,Courier" color="#666666"><b>R</b></font> help pages and manuals have no ISBNs because ISBN
+<li> <p><span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> help pages and manuals have no ISBNs because ISBN
 rules no longer allow constantly changing content to be assigned
 an ISBN.
 </p>
@@ -3864,11 +8084,11 @@ dynamically, this led to a lot of broken links.
 </p>
 </li>
 <li><p> Any custom settings for Java configuration are recorded in
-file ‘<span class="file">etc/javaconf</span>’ for subsequent use by <CODE>R CMD
-javareconf</CODE>.
+file ‘<span class="file">etc/javaconf</span>’ for subsequent use by <code>R CMD
+	javareconf</code>.
 </p>
 </li>
-<li><p> There is now support for <CODE>makeinfo</CODE> version 5.0
+<li><p> There is now support for <code>makeinfo</code> version 5.0
 (which requires a slightly different ‘<span class="file">.texi</span>’ syntax).
 </p>
 </li>
@@ -3882,7 +8102,7 @@ systems: misguided users were launching many threads without
 controlling the stack size.
 </p>
 </li>
-<li> <p><CODE>configure</CODE> no longer looks for file
+<li> <p><code>configure</code> no longer looks for file
 ‘<span class="file">~/.Rconfig</span>’: ‘<span class="file">~/.R/config</span>’ has long been preferred.
 </p>
 </li></ul>
@@ -3894,13 +8114,13 @@ controlling the stack size.
 
 
 <ul>
-<li><p> When <CODE>R CMD build</CODE> is run in an encoding other than
+<li><p> When <code>R CMD build</code> is run in an encoding other than
 the one specified in the package's ‘<span class="file">DESCRIPTION</span>’ file it
 tries harder to expand the <code>authors at R</code> field in the specified
 encoding.  (<a href="https://bugs.R-project.org/bugzilla3/show_bug.cgi?id=14958">PR#14958</a>)
 </p>
 </li>
-<li><p> If <CODE>R CMD INSTALL</CODE> is required to expand the
+<li><p> If <code>R CMD INSTALL</code> is required to expand the
 <code>authors at R</code> field of the ‘<span class="file">DESCRIPTION</span>’ file, it tries
 harder to do so in the encoding specified for the package (rather
 than using ASCII escapes).
@@ -3941,7 +8161,7 @@ reentrant, leading to errors in rare circumstances such as a
 garbage collection triggering a recursive call.
 </p>
 </li>
-<li><p> Field assignments in reference class objects via
+<li><p> Field assignments in reference class objects <em>via</em>
 <code>$<-</code> were not being checked
 because the magic incantation to turn methods on for that
 primitive operator had been inadvertently omitted. 
@@ -3972,7 +8192,7 @@ is no longer <code>-Inf</code>; ditto for corresponding <code>pt()</code> and
 	log.p=TRUE)</code>. (<a href="https://bugs.R-project.org/bugzilla3/show_bug.cgi?id=15162">PR#15162</a>)
 </p>
 </li>
-<li><p> The Windows graphics device would crash <font face="Courier New,Courier" color="#666666"><b>R</b></font> if a user
+<li><p> The Windows graphics device would crash <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> if a user
 attempted to load the graphics history from a variable that was
 not a saved history. (<a href="https://bugs.R-project.org/bugzilla3/show_bug.cgi?id=15230">PR#15230</a>)
 </p>
@@ -4007,7 +8227,7 @@ class definitions containing <code>"array"</code> or <code>"matrix"</code>.
 <a href="../NEWS.0">NEWS.0</a>, <a href="../NEWS.1">NEWS.1</a>
 and <a href="../NEWS.2">NEWS.2</a>
 in the ‘<span class="file">doc</span>’ directory.  News in HTML format for
-<font face="Courier New,Courier" color="#666666"><b>R</b></font> versions from 2.10.0 to 2.15.3 is in
+<span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> versions from 2.10.0 to 2.15.3 is in
 <a href="NEWS.2.html">NEWS.2.html</a>.
 </p>
 </li></ul>
diff --git a/doc/html/Notes b/doc/html/Notes
new file mode 100644
index 0000000..576bfcf
--- /dev/null
+++ b/doc/html/Notes
@@ -0,0 +1,18 @@
+The 'new' R logo was added in early 2016.
+
+Rlogo.svg is the master copy, and is copyighted.  See its text comment
+and doc/COPYRIGHTS for its licence.
+
+Rlogo.pdf is a conversion to scalable PDF, done by rsvg-convert.
+
+logo.jpg is an update to the new logo of a 100x76 file: it is no
+longer used within R (but is used by some packages).
+
+favicon.ico contains 16x16 and 32x32 PNG files (with transparent
+backgrounds and anti-aliasing) converted from Rlogo.svg in Photoshop,
+and bundled by 
+
+icotool -c -o favicon.ico icon_16x16.png icon_32x32.png
+
+on Linux. These are 32-bit full-colour PNGs (and smaller than the
+previous version with a palette).
diff --git a/doc/html/R-admin.html b/doc/html/R-admin.html
index cc9c964..86aa424 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.1.2 (2014-10-31).
+<!-- This manual is for R, version 3.4.0 (2017-04-21).
 
-Copyright (C) 2001-2014 R Core Team
+Copyright (C) 2001-2016 R Core Team
 
 Permission is granted to make and distribute verbatim copies of this
 manual provided the copyright notice and this permission notice are
@@ -25,7 +25,7 @@ approved by the R Core Team. -->
 <meta name="keywords" content="R Installation and Administration">
 <meta name="resource-type" content="document">
 <meta name="distribution" content="global">
-<meta name="Generator" content="makeinfo">
+<meta name="Generator" content="texi2any">
 <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
 <link href="#Top" rel="start" title="Top">
 <link href="#Function-and-variable-index" rel="index" title="Function and variable index">
@@ -57,51 +57,70 @@ span.nolinebreak {white-space:nowrap}
 span.roman {font-family:serif; font-weight:normal}
 span.sansserif {font-family:sans-serif; font-weight:normal}
 ul.no-bullet {list-style: none}
-body {margin-left: 5%; margin-right: 5%;}
+body {
+    margin-left: 5%;
+    margin-right: 5%;
+}
 
-H1 {             
+h1 {             
     background: white;
     color: rgb(25%, 25%, 25%);
     font-family: monospace;
     font-size: xx-large;
-    text-align: center
+    text-align: center;
 }
 
-H2 {
+h2 {
     background: white;
     color: rgb(40%, 40%, 40%);
     font-family: monospace;
     font-size: x-large;
-    text-align: center
+    text-align: center;
 }
 
-H3 {
+h3 {
     background: white;
     color: rgb(40%, 40%, 40%);
     font-family: monospace;
-    font-size: large
+    font-size: large;
 }
 
-H4 {
+h4 {
     background: white;
     color: rgb(40%, 40%, 40%);
-    font-family: monospace
+    font-family: monospace;
+}
+
+span.samp {
+    font-family: monospace;
+}
+
+span.command {
+    font-family: monospace;
 }
 
-span.samp{font-family: monospace}
-span.command{font-family: monospace}
-span.option{font-family: monospace}
-span.file{font-family: monospace}
-span.env{font-family: monospace}
+span.option {
+    font-family: monospace;
+}
+
+span.file {
+    font-family: monospace;
+}
+
+span.env {
+    font-family: monospace;
+}
 
 ul {
     margin-top: 0.25ex;
     margin-bottom: 0.25ex;
 }
+
 li {
     margin-top: 0.25ex;
     margin-bottom: 0.25ex;
 }
+
 p {
     margin-top: 0.6ex;
     margin-bottom: 1.2ex;
@@ -161,7 +180,11 @@ p {
     <ul class="no-bullet">
       <li><a name="toc-Multilib-1" href="#Multilib">2.6.1 Multilib</a></li>
     </ul></li>
-    <li><a name="toc-Other-Options-1" href="#Other-Options">2.7 Other Options</a></li>
+    <li><a name="toc-Other-Options-1" href="#Other-Options">2.7 Other Options</a>
+    <ul class="no-bullet">
+      <li><a name="toc-OpenMP-Support-1" href="#OpenMP-Support">2.7.1 OpenMP Support</a></li>
+      <li><a name="toc-C_002b_002b-Support-1" href="#C_002b_002b-Support">2.7.2 C++ Support</a></li>
+    </ul></li>
     <li><a name="toc-Testing-an-Installation" href="#Testing-a-Unix_002dalike-Installation">2.8 Testing an Installation</a></li>
   </ul></li>
   <li><a name="toc-Installing-R-under-Windows-1" href="#Installing-R-under-Windows">3 Installing R under Windows</a>
@@ -171,9 +194,9 @@ p {
       <li><a name="toc-Getting-the-tools-1" href="#Getting-the-tools">3.1.1 Getting the tools</a></li>
       <li><a name="toc-Getting-the-source-files-1" href="#Getting-the-source-files">3.1.2 Getting the source files</a></li>
       <li><a name="toc-Building-the-core-files-1" href="#Building-the-core-files">3.1.3 Building the core files</a></li>
-      <li><a name="toc-Building-the-bitmap-files-1" href="#Building-the-bitmap-files">3.1.4 Building the bitmap files</a></li>
-      <li><a name="toc-Building-the-cairo-devices" href="#Building-the-cairo-devices-files">3.1.5 Building the cairo devices</a></li>
-      <li><a name="toc-Using-ICU-for-collation-1" href="#Using-ICU-for-collation">3.1.6 Using ICU for collation</a></li>
+      <li><a name="toc-Building-the-cairo-devices" href="#Building-the-cairo-devices-files">3.1.4 Building the cairo devices</a></li>
+      <li><a name="toc-Using-ICU-for-collation-1" href="#Using-ICU-for-collation">3.1.5 Using ICU for collation</a></li>
+      <li><a name="toc-Support-for-libcurl-1" href="#Support-for-libcurl">3.1.6 Support for libcurl</a></li>
       <li><a name="toc-Checking-the-build-1" href="#Checking-the-build">3.1.7 Checking the build</a></li>
       <li><a name="toc-Building-the-manuals-1" href="#Building-the-manuals">3.1.8 Building the manuals</a></li>
       <li><a name="toc-Building-the-Inno-Setup-installer-1" href="#Building-the-Inno-Setup-installer">3.1.9 Building the Inno Setup installer</a></li>
@@ -182,10 +205,10 @@ p {
     </ul></li>
     <li><a name="toc-Testing-an-Installation-1" href="#Testing-a-Windows-Installation">3.2 Testing an Installation</a></li>
   </ul></li>
-  <li><a name="toc-Installing-R-under-OS-X-1" href="#Installing-R-under-OS-X">4 Installing R under OS X</a>
+  <li><a name="toc-Installing-R-under-macOS-1" href="#Installing-R-under-macOS">4 Installing R under macOS</a>
   <ul class="no-bullet">
-    <li><a name="toc-Running-R-under-OS-X-1" href="#Running-R-under-OS-X">4.1 Running R under OS X</a></li>
-    <li><a name="toc-Uninstalling-under-OS-X-1" href="#Uninstalling-under-OS-X">4.2 Uninstalling under OS X</a></li>
+    <li><a name="toc-Running-R-under-macOS-1" href="#Running-R-under-macOS">4.1 Running R under macOS</a></li>
+    <li><a name="toc-Uninstalling-under-macOS-1" href="#Uninstalling-under-macOS">4.2 Uninstalling under macOS</a></li>
     <li><a name="toc-Multiple-versions-1" href="#Multiple-versions">4.3 Multiple versions</a></li>
   </ul></li>
   <li><a name="toc-Running-R-1" href="#Running-R">5 Running R</a></li>
@@ -196,10 +219,11 @@ p {
     <li><a name="toc-Installing-packages-1" href="#Installing-packages">6.3 Installing packages</a>
     <ul class="no-bullet">
       <li><a name="toc-Windows" href="#Windows-packages">6.3.1 Windows</a></li>
-      <li><a name="toc-OS-X-1" href="#OS-X-packages">6.3.2 OS X</a></li>
+      <li><a name="toc-macOS-1" href="#macOS-packages">6.3.2 macOS</a></li>
       <li><a name="toc-Customizing-package-compilation-1" href="#Customizing-package-compilation">6.3.3 Customizing package compilation</a></li>
       <li><a name="toc-Multiple-sub_002darchitectures-1" href="#Multiple-sub_002darchitectures">6.3.4 Multiple sub-architectures</a></li>
       <li><a name="toc-Byte_002dcompilation-1" href="#Byte_002dcompilation">6.3.5 Byte-compilation</a></li>
+      <li><a name="toc-External-software-1" href="#External-software">6.3.6 External software</a></li>
     </ul></li>
     <li><a name="toc-Updating-packages-1" href="#Updating-packages">6.4 Updating packages</a></li>
     <li><a name="toc-Removing-packages-1" href="#Removing-packages">6.5 Removing packages</a></li>
@@ -212,7 +236,7 @@ p {
     <ul class="no-bullet">
       <li><a name="toc-Locales-under-Unix_002dalikes-1" href="#Locales-under-Unix_002dalikes">7.1.1 Locales under Unix-alikes</a></li>
       <li><a name="toc-Locales-under-Windows-1" href="#Locales-under-Windows">7.1.2 Locales under Windows</a></li>
-      <li><a name="toc-Locales-under-OS-X-1" href="#Locales-under-OS-X">7.1.3 Locales under OS X</a></li>
+      <li><a name="toc-Locales-under-macOS-1" href="#Locales-under-macOS">7.1.3 Locales under macOS</a></li>
     </ul></li>
     <li><a name="toc-Localization-of-messages-1" href="#Localization-of-messages">7.2 Localization of messages</a></li>
   </ul></li>
@@ -258,10 +282,7 @@ p {
     </ul></li>
     <li><a name="toc-Setting-the-shell-1" href="#Setting-the-shell">B.4 Setting the shell</a></li>
     <li><a name="toc-Using-make-1" href="#Using-make">B.5 Using make</a></li>
-    <li><a name="toc-Using-FORTRAN-1" href="#Using-FORTRAN">B.6 Using FORTRAN</a>
-    <ul class="no-bullet">
-      <li><a name="toc-Using-gfortran-1" href="#Using-gfortran">B.6.1 Using gfortran</a></li>
-    </ul></li>
+    <li><a name="toc-Using-FORTRAN-1" href="#Using-FORTRAN">B.6 Using FORTRAN</a></li>
     <li><a name="toc-Compile-and-load-flags-1" href="#Compile-and-load-flags">B.7 Compile and load flags</a></li>
     <li><a name="toc-Maintainer-mode-1" href="#Maintainer-mode">B.8 Maintainer mode</a></li>
   </ul></li>
@@ -272,28 +293,24 @@ p {
     <ul class="no-bullet">
       <li><a name="toc-Clang-1" href="#Clang">C.2.1 Clang</a></li>
       <li><a name="toc-Intel-compilers-1" href="#Intel-compilers">C.2.2 Intel compilers</a></li>
-      <li><a name="toc-Oracle-Solaris-Studio-compilers-1" href="#Oracle-Solaris-Studio-compilers">C.2.3 Oracle Solaris Studio compilers</a></li>
     </ul></li>
-    <li><a name="toc-OS-X-2" href="#OS-X">C.3 OS X</a>
+    <li><a name="toc-macOS-2" href="#macOS">C.3 macOS</a>
     <ul class="no-bullet">
-      <li><a name="toc-Snow-Leopard-1" href="#Snow-Leopard">C.3.1 Snow Leopard</a></li>
-      <li><a name="toc-Lion-1" href="#Lion">C.3.2 Lion</a></li>
-      <li><a name="toc-Mountain-Lion-1" href="#Mountain-Lion">C.3.3 Mountain Lion</a></li>
-      <li><a name="toc-Mavericks-1" href="#Mavericks">C.3.4 Mavericks</a></li>
-      <li><a name="toc-Yosemite-1" href="#Yosemite">C.3.5 Yosemite</a></li>
-      <li><a name="toc-Tcl_002fTk-headers-and-libraries-1" href="#Tcl_002fTk-headers-and-libraries">C.3.6 Tcl/Tk headers and libraries</a></li>
-      <li><a name="toc-Java" href="#Java-_0028OS-X_0029">C.3.7 Java</a></li>
-      <li><a name="toc-Frameworks-1" href="#Frameworks">C.3.8 Frameworks</a></li>
-      <li><a name="toc-Building-R_002eapp-1" href="#Building-R_002eapp">C.3.9 Building R.app</a></li>
+      <li><a name="toc-Tcl_002fTk-headers-and-libraries-1" href="#Tcl_002fTk-headers-and-libraries">C.3.1 Tcl/Tk headers and libraries</a></li>
+      <li><a name="toc-Java" href="#Java-_0028macOS_0029">C.3.2 Java</a></li>
+      <li><a name="toc-Frameworks-1" href="#Frameworks">C.3.3 Frameworks</a></li>
+      <li><a name="toc-Building-R_002eapp-1" href="#Building-R_002eapp">C.3.4 Building R.app</a></li>
     </ul></li>
     <li><a name="toc-Solaris-1" href="#Solaris">C.4 Solaris</a>
     <ul class="no-bullet">
-      <li><a name="toc-Using-gcc-1" href="#Using-gcc">C.4.1 Using gcc</a></li>
+      <li><a name="toc-64_002dbit-builds-1" href="#g_t64_002dbit-builds">C.4.1 64-bit builds</a></li>
+      <li><a name="toc-Using-gcc-1" href="#Using-gcc">C.4.2 Using gcc</a></li>
     </ul></li>
     <li><a name="toc-AIX-1" href="#AIX">C.5 AIX</a></li>
     <li><a name="toc-FreeBSD-1" href="#FreeBSD">C.6 FreeBSD</a></li>
-    <li><a name="toc-Cygwin-1" href="#Cygwin">C.7 Cygwin</a></li>
-    <li><a name="toc-New-platforms-1" href="#New-platforms">C.8 New platforms</a></li>
+    <li><a name="toc-OpenBSD-1" href="#OpenBSD">C.7 OpenBSD</a></li>
+    <li><a name="toc-Cygwin-1" href="#Cygwin">C.8 Cygwin</a></li>
+    <li><a name="toc-New-platforms-1" href="#New-platforms">C.9 New platforms</a></li>
   </ul></li>
   <li><a name="toc-The-Windows-toolset-1" href="#The-Windows-toolset">Appendix D The Windows toolset</a>
   <ul class="no-bullet">
@@ -316,9 +333,9 @@ p {
 
 <p>This is a guide to installation and administration for R.
 </p>
-<p>This manual is for R, version 3.1.2 (2014-10-31).
+<p>This manual is for R, version 3.4.0 (2017-04-21).
 </p>
-<p>Copyright © 2001–2014 R Core Team
+<p>Copyright © 2001–2016 R Core Team
 </p>
 <blockquote>
 <p>Permission is granted to make and distribute verbatim copies of this
@@ -347,7 +364,7 @@ approved by the R Core Team.
 
 <p>Sources, binaries and documentation for R can be obtained via
 <acronym>CRAN</acronym>, the “Comprehensive R Archive Network” whose current
-members are listed at <a href="http://CRAN.R-project.org/mirrors.html">http://CRAN.R-project.org/mirrors.html</a>.
+members are listed at <a href="https://CRAN.R-project.org/mirrors.html">https://CRAN.R-project.org/mirrors.html</a>.
 </p>
 
 <hr>
@@ -379,8 +396,8 @@ before unpacking so that the files will be readable by the target group
 (e.g., <code>umask 022</code> to be usable by all users).  Keep this
 setting of <code>umask</code> whilst building and installing.
 </p>
-<p>If you use a recent GNU version of <code>tar</code> and do this as a root
-account (which on Windows includes accounts with administrator
+<p>If you use a recent <acronym>GNU</acronym> version of <code>tar</code> and do this
+as a root account (which on Windows includes accounts with administrator
 privileges) you may see many warnings about changing ownership.  In
 which case you can use
 </p>
@@ -410,7 +427,7 @@ the patched version of the current release being available via
 Subversion.)
 </p>
 <p>The tarballs are available from
-<a href="ftp://ftp.stat.math.ethz.ch/pub/Software/R/">ftp://ftp.stat.math.ethz.ch/pub/Software/R/</a>.  Download
+<a href="https://stat.ethz.ch/R/daily">https://stat.ethz.ch/R/daily</a>.  Download
 <samp>R-patched.tar.gz</samp> or <samp>R-devel.tar.gz</samp> (or the <samp>.tar.bz2</samp>
 versions) and unpack as described in the previous section.  They are
 built in exactly the same way as distributions of R releases.
@@ -424,7 +441,7 @@ built in exactly the same way as distributions of R releases.
 
 <p>Sources are also available via <a href="https://svn.R-project.org/R/">https://svn.R-project.org/R/</a>, the
 R Subversion repository.  If you have a Subversion client (see
-<a href="http://subversion.apache.org/">http://subversion.apache.org/</a>), you can check out and update the
+<a href="https://subversion.apache.org/">https://subversion.apache.org/</a>), you can check out and update the
 current ‘<samp>r-devel</samp>’ from
 <a href="https://svn.r-project.org/R/trunk/">https://svn.r-project.org/R/trunk/</a> and the current
 ‘<samp>r-patched</samp>’ from
@@ -443,8 +460,8 @@ created if necessary).  The alpha, beta and RC versions of an upcoming
 the four-week period prior to the release.
 </p>
 <p>Note that ‘<samp>https:</samp>’ is required<a name="DOCF2" href="#FOOT2"><sup>2</sup></a>,
-and that the SSL certificate for the Subversion server of the R project
-should be recognized as from a trusted source.
+and that the SSL certificate for the Subversion server of the R
+project should be recognized as from a trusted source.
 </p>
 <p>Note that retrieving the sources by e.g. <code>wget -r</code> or
 <code>svn export</code> from that URL will not work (and will give a error
@@ -461,7 +478,7 @@ R sources.
 <p>If downloading manually from <acronym>CRAN</acronym>, do ensure that you have the
 correct versions of the recommended packages: if the number in the file
 <samp>VERSION</samp> is ‘<samp><var>x</var>.<var>y</var>.<var>z</var></samp>’ you need to download
-the contents of ‘<samp>http://CRAN.R-project.org/src/contrib/<var>dir</var></samp>’,
+the contents of ‘<samp>https://CRAN.R-project.org/src/contrib/<var>dir</var></samp>’,
 where <var>dir</var> is ‘<samp><var>x</var>.<var>y</var>.<var>z</var>/Recommended</samp>’ for
 r-devel or <samp><var>x</var>.<var>y</var>-patched/Recommended</samp> for r-patched,
 respectively, to directory <samp>src/library/Recommended</samp> in the sources
@@ -473,7 +490,7 @@ might be (for the correct value of <samp><var>dir</var></samp>)
 </p>
 <div class="example">
 <pre class="example">wget -r -l1 --no-parent -A\*.gz -nd -P src/library/Recommended \
-  http://CRAN.R-project.org/src/contrib/<var>dir</var>
+  https://CRAN.R-project.org/src/contrib/<var>dir</var>
 ./tools/link-recommended
 </pre></div>
 
@@ -488,22 +505,25 @@ might be (for the correct value of <samp><var>dir</var></samp>)
 <p>R will configure and build under most common Unix and Unix-alike
 platforms including ‘<samp><var>cpu</var>-*-linux-gnu</samp>’ for the
 ‘<samp>alpha</samp>’, ‘<samp>arm</samp>’, ‘<samp>hppa</samp>’, ‘<samp>ix86</samp>’,
-‘<samp>ia64</samp>’, ‘<samp>m68k</samp>’, ‘<samp>mips</samp>’, ‘<samp>mipsel</samp>’,
-‘<samp>powerpc</samp>’, ‘<samp>s390</samp>’, ‘<samp>sparc</samp>’, and ‘<samp>x86_64</samp>’
-<acronym>CPU</acronym>s,
+‘<samp>m68k</samp>’, ‘<samp>mips</samp>’, ‘<samp>mipsel</samp>’, ‘<samp>powerpc</samp>’,
+‘<samp>s390</samp>’, ‘<samp>sparc</samp>’, and ‘<samp>x86_64</samp>’ <acronym>CPU</acronym>s,
 ‘<samp>x86_64-apple-darwin</samp>’, ‘<samp>i386-sun-solaris</samp>’ and
 ‘<samp>sparc-sun-solaris</samp>’ as well as
 perhaps (it is tested less frequently on these platforms)
 ‘<samp>i386-apple-darwin</samp>’, ‘<samp>i386-*-freebsd</samp>’, ‘<samp>x86_64-*-freebsd</samp>’,
-‘<samp>i386-*-netbsd</samp>’, ‘<samp>i386-*-openbsd</samp>’ and
+‘<samp>i386-*-netbsd</samp>’, ‘<samp>x86_64/*-openbsd</samp>’ and
 ‘<samp>powerpc-ibm-aix6*</samp>’
 </p>
 <a name="index-Linux"></a>
-<a name="index-OS-X"></a>
+<a name="index-macOS"></a>
 <p>In addition, binary distributions are available for some common Linux
-distributions and for OS X (formerly Mac OS).  See the <acronym>FAQ</acronym> for
-current details.  These are installed in platform-specific ways, so for
-the rest of this chapter we consider only building from the sources.
+distributions and for macOS (formerly OS X and Mac OS).  See the
+<acronym>FAQ</acronym> for current details.  These are installed in
+platform-specific ways, so for the rest of this chapter we consider only
+building from the sources.
+</p>
+<p>Cross-building is not possible: installing R builds a minimal version
+of R and then runs many R scripts to complete the build.
 </p>
 
 <hr>
@@ -553,9 +573,9 @@ make
 </pre></div>
 
 <p>Failures are not necessarily problems as they might be caused by missing
-functionality,<a name="DOCF5" href="#FOOT5"><sup>5</sup></a> but you should look carefully at any
-reported discrepancies.  (Some non-fatal errors are expected in locales
-that do not support Latin-1, in particular in true <code>C</code> locales and
+functionality, but you should look carefully at any reported
+discrepancies.  (Some non-fatal errors are expected in locales that do
+not support Latin-1, in particular in true <code>C</code> locales and
 non-UTF-8 non-Western-European locales.)  A failure in
 <samp>tests/ok-errors.R</samp> may indicate inadequate resource limits
 (see <a href="#Running-R">Running R</a>).
@@ -574,7 +594,7 @@ non-UTF-8 non-Western-European locales.)  A failure in
 
 <p>see file <samp>tests/README</samp> and <a href="#Testing-a-Unix_002dalike-Installation">Testing a Unix-alike Installation</a>
 for the possibilities of doing this in parallel.  Note that these checks
-need the recommended packages to be installed.
+are only run completely if the recommended packages are installed.
 </p>
 <p>If the command <code>configure</code> and <code>make</code> commands execute
 successfully, a shell-script front-end called <samp>R</samp> will be created
@@ -603,7 +623,8 @@ make
 keeping your source tree clean and is particularly recommended when you
 work with a version of R from Subversion.  (You may need
 <acronym>GNU</acronym> <code>make</code> to allow this, and you will need no spaces
-in the path to the build directory.)
+in the path to the build directory.  It is unlikely to work if the
+source directory has previously been used for a build.)
 </p>
 
 
@@ -611,7 +632,7 @@ in the path to the build directory.)
 <p>Now <code>rehash</code> if necessary, type <kbd>R</kbd>, and read the R manuals
 and the R <acronym>FAQ</acronym> (files <samp>FAQ</samp> or
 <samp>doc/manual/R-FAQ.html</samp>, or
-<a href="http://CRAN.R-project.org/doc/FAQ/R-FAQ.html">http://CRAN.R-project.org/doc/FAQ/R-FAQ.html</a> which always
+<a href="https://CRAN.R-project.org/doc/FAQ/R-FAQ.html">https://CRAN.R-project.org/doc/FAQ/R-FAQ.html</a> which always
 has the version for the latest release of R).
 </p>
 <p>Note: if you already have R installed, check that where you installed
@@ -659,10 +680,11 @@ loopback interface has been disabled.  See
 <dl compact="compact">
 <dt>‘<samp>fullrefman</samp>’</dt>
 <dd><p>Printed versions of all the help pages for base and recommended packages
-(over 3300 pages).
+(around 3500 pages).
 </p></dd>
 <dt>‘<samp>refman</samp>’</dt>
-<dd><p>Printed versions of the help pages for selected base packages (over 1900 pages)
+<dd><p>Printed versions of the help pages for selected base packages (around
+2000 pages)
 </p></dd>
 <dt>‘<samp>R-FAQ</samp>’</dt>
 <dd><p>R <acronym>FAQ</acronym>
@@ -692,11 +714,14 @@ make info     <span class="roman">to create info files (not ‘<samp>refman<
 </pre></div>
 
 <p>You will not be able to build any of these unless you have
-<code>makeinfo</code> version 4.7 or later installed, and for PDF you must
+<code>texi2any</code> version 5.1 or later installed, and for PDF you must
 have <code>texi2dvi</code> and <samp>texinfo.tex</samp> installed (which are part
 of the <acronym>GNU</acronym> <strong>texinfo</strong> distribution but are, especially
 <samp>texinfo.tex</samp>, often made part of the TeX package in
-re-distributions).
+re-distributions).  For historical reasons, the path to
+<code>texi2any</code> can be set by macro ‘<samp>MAKEINFO</samp>’ in
+<samp>config.site</samp> (<code>makeinfo</code> is nowadays a link to
+<code>texi2any</code>).
 </p>
 <p>The PDF versions can be viewed using any recent PDF viewer: they have
 hyperlinks that can be followed.  The info files are suitable for
@@ -723,11 +748,11 @@ fonts.  We have provided four alternatives:
 and Courier.  This works well both for on-screen viewing and for
 printing.  One disadvantage is that the Usage and Examples sections may
 come out rather wide: this can be overcome by using <em>in addition</em>
-either of the options <code>inconsolata</code>, on a Unix-alike only if found
+either of the options <code>inconsolata</code> (on a Unix-alike only if found
 by <code>configure</code>) or <code>beramono</code>, which replace the Courier
 monospaced font by Inconsolata or Bera Sans mono respectively.  (You
 will need a recent version of the appropriate LaTeX package
-<strong>inconsolata</strong><a name="DOCF6" href="#FOOT6"><sup>6</sup></a> or
+<strong>inconsolata</strong><a name="DOCF5" href="#FOOT5"><sup>5</sup></a> or
 <strong>bera</strong> installed.)
 </p>
 <p>Note that in most LaTeX installations this will not actually use the
@@ -741,7 +766,7 @@ NimbusSans and (for Courier, if used) NimbusMon.
 <dt><code>lm</code></dt>
 <dd><p>Using the <em>Latin Modern</em> fonts.  These are not often installed as
 part of a TeX distribution, but can obtained from
-<a href="http://www.ctan.org/tex-archive/fonts/ps-type1/lm/">http://www.ctan.org/tex-archive/fonts/ps-type1/lm/</a> and
+<a href="https://www.ctan.org/tex-archive/fonts/ps-type1/lm/">https://www.ctan.org/tex-archive/fonts/ps-type1/lm/</a> and
 mirrors.  This uses fonts rather similar to Computer Modern, but is not
 so good on-screen as <code>times</code>.
 </p>
@@ -749,7 +774,7 @@ so good on-screen as <code>times</code>.
 <dt><code>cm-super</code></dt>
 <dd><p>Using type-1 versions of the Computer Modern fonts by Vladimir Volovich.
 This is a large installation, obtainable from
-<a href="http://www.ctan.org/tex-archive/fonts/ps-type1/cm-super/">http://www.ctan.org/tex-archive/fonts/ps-type1/cm-super/</a>
+<a href="https://www.ctan.org/tex-archive/fonts/ps-type1/cm-super/">https://www.ctan.org/tex-archive/fonts/ps-type1/cm-super/</a>
 and its mirrors.  These type-1 fonts have poor hinting and so are
 nowhere near as readable on-screen as the other three options.
 </p>
@@ -769,16 +794,16 @@ to examine the logs carefully.
 <a name="index-R_005fRD4PDF"></a>
 <code>R_RD4PDF</code>.  (On Unix-alikes, this will be picked up at install time
 and stored in <samp>etc/Renviron</samp>, but can still be overridden when the
-manuals are built, using <code>make -e</code>.)  The usual <a name="DOCF7" href="#FOOT7"><sup>7</sup></a>  default value for <code>R_RD4PDF</code> is
+manuals are built, using <code>make -e</code>.)  The usual<a name="DOCF6" href="#FOOT6"><sup>6</sup></a>  default value for <code>R_RD4PDF</code> is
 ‘<samp>times,inconsolata,hyper</samp>’: omit ‘<samp>hyper</samp>’ if you do not want
 hyperlinks (e.g. for printing the manual) or do not have LaTeX
 package <strong>hyperref</strong>, and omit ‘<samp>inconsolata</samp>’ if you do not have
 LaTeX package <strong>inconsolata</strong> installed.
 </p>
 <p>Further options, e.g for <strong>hyperref</strong>, can be included in a file
-<samp>Rd.cfg</samp> somewhere on your LaTeX search path.  For example if
+<samp>Rd.cfg</samp> somewhere on your LaTeX search path.  For example, if
 you prefer the text and not the page number in the table of contents to
-be hyperlinked, use
+be hyperlinked use
 </p><div class="example">
 <pre class="example">\ifthenelse{\boolean{Rd at use@hyper}}{\hypersetup{linktoc=section}}{}
 </pre></div>
@@ -788,10 +813,10 @@ be hyperlinked, use
 <pre class="example">\ifthenelse{\boolean{Rd at use@hyper}}{\hypersetup{linktoc=all}}{}
 </pre></div>
 
-<p>to hyperlink both text and page number<a name="DOCF8" href="#FOOT8"><sup>8</sup></a>.
+<p>to hyperlink both text and page number.
 </p>
-<p>Ebook versions in one or both of <samp>.epub</samp> and <samp>.mobi</samp> formats
-can be made by running in <samp>doc/manual</samp> one of
+<p>Ebook versions of most of the manuals in one or both of <samp>.epub</samp> and
+<samp>.mobi</samp> formats can be made by running in <samp>doc/manual</samp> one of
 </p><div class="example">
 <pre class="example">make ebooks
 make epub
@@ -800,9 +825,9 @@ make mobi
 
 <p>This requires <code>ebook-convert</code> from <code>Calibre</code>
 (<a href="http://calibre-ebook.com/download">http://calibre-ebook.com/download</a>), or from most Linux
-distributions).  If necessary the path to <code>ebook-convert</code> can be
+distributions.  If necessary the path to <code>ebook-convert</code> can be
 set as make macro <code>EBOOK</code> to by editing <samp>doc/manual/Makefile</samp>
-(which contains a commented value suitable for OS X).
+(which contains a commented value suitable for macOS).
 </p>
 
 <hr>
@@ -862,7 +887,8 @@ the option <samp>--prefix</samp>, as in
 <pre class="example">./configure --prefix=/where/you/want/R/to/go
 </pre></div>
 
-<p>This causes <code>make install</code> to install the R script to
+<p>where the value should be an absolute path.  This causes <code>make
+install</code> to install the R script to
 <samp>/where/you/want/R/to/go/bin</samp>, and so on.  The prefix of the
 installation directories can be seen in the status message that is
 displayed at the end of <code>configure</code>.  The installation may need
@@ -874,8 +900,8 @@ to be done by the owner of <samp><var>prefix</var></samp>, often a root account.
 <pre class="example">make prefix=/path/to/here install
 </pre></div>
 
-<p>at least with <acronym>GNU</acronym> <code>make</code> (and current Solaris
-<code>make</code>, but not some older Unix makes).
+<p>at least with <acronym>GNU</acronym> or Solaris <code>make</code> (but not some
+older Unix makes).
 </p>
 <p>More precise control is available at configure time via options: see
 <code>configure --help</code> for details.  (However, most of the ‘Fine
@@ -901,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.1.2</code>.
+<code>rincludedir=/usr/local/include/R-3.4.0</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.1.2
+<pre class="example">make install rhome=/usr/local/lib64/R-3.4.0
 </pre></div>
 
 <p>will use a version-specific R home on a non-Debian Linux 64-bit
@@ -921,7 +947,7 @@ your system’s library directory by
 </pre></div>
 
 <p>where <code>prefix</code> is optional, and <code>libdir</code> will give more
-precise control.<a name="DOCF9" href="#FOOT9"><sup>9</sup></a>  However, you should not install
+precise control.<a name="DOCF7" href="#FOOT7"><sup>7</sup></a>  However, you should not install
 to a directory mentioned in <code>LDPATHS</code> (e.g.
 <samp>/usr/local/lib64</samp>) if you intend to work with multiple versions of
 R, since that directory may be given precedence over the <samp>lib</samp>
@@ -950,8 +976,8 @@ make install-pdf
 
 <p>Once again, it is optional to specify <code>prefix</code>, <code>libdir</code> or
 <code>rhome</code> (the PDF manuals are installed under the R home
-directory).  (<code>make install-info</code> needs Perl installed if there
-is no command <code>install-info</code> on the system.)
+directory).  (<code>make install-info</code> needs <code>Perl</code> installed
+if there is no command <code>install-info</code> on the system.)
 </p>
 <p>More precise control is possible.  For info, the setting used is that of
 <code>infodir</code> (default <samp><var>prefix</var>/info</samp>, set by configure
@@ -963,7 +989,7 @@ temporary directory in order to move the installed tree to its final
 destination.  In this case <code>prefix</code> (and so on) should reflect the
 <a name="index-DESTDIR"></a>
 final destination, and <code>DESTDIR</code> should be used: see
-<a href="http://www.gnu.org/prep/standards/html_node/DESTDIR.html">http://www.gnu.org/prep/standards/html_node/DESTDIR.html</a>.
+<a href="https://www.gnu.org/prep/standards/html_node/DESTDIR.html">https://www.gnu.org/prep/standards/html_node/DESTDIR.html</a>.
 </p>
 <p>You can optionally install the run-time tests that are part of
 <code>make check-all</code> by
@@ -1025,7 +1051,7 @@ subdirectories.  Example names from other software are the use of
 (and for 32/64-bit builds on one architecture, one build can be done
 without ‘<samp>r_arch</samp>’).  The space savings can be considerable: on
 ‘<samp>x86_64</samp>’ Linux a basic install (without debugging symbols) took
-63Mb, and adding a 32-bit build added 6Mb.  If you have installed
+74Mb, and adding a 32-bit build added 6Mb.  If you have installed
 multiple builds you can select which build to run by
 </p>
 <div class="example">
@@ -1071,13 +1097,13 @@ architecture which is run.
 <p>Sub-architectures are also used on Windows, but by selecting executables
 within the appropriate <samp>bin</samp> directory,
 <samp><var>R_HOME</var>/bin/i386</samp> or <samp><var>R_HOME</var>/bin/x64</samp>.  For
-backwards compatibility with R < 2.12.0, there are executables
-<samp><var>R_HOME</var>/bin/R.exe</samp> or <samp><var>R_HOME</var>/bin/Rscript.exe</samp>:
+backwards compatibility there are executables
+<samp><var>R_HOME</var>/bin/R.exe</samp> and <samp><var>R_HOME</var>/bin/Rscript.exe</samp>:
 these will run an executable from one of the subdirectories, which one
 being taken first from the
 <a name="index-R_005fARCH-1"></a>
 <code>R_ARCH</code> environment variable, then from the
-<samp>--arch</samp> command-line option<a name="DOCF10" href="#FOOT10"><sup>10</sup></a> and finally from the
+<samp>--arch</samp> command-line option<a name="DOCF8" href="#FOOT8"><sup>8</sup></a> and finally from the
 installation default (which is 32-bit for a combined 32/64 bit R
 installation).
 </p>
@@ -1087,12 +1113,12 @@ installation).
 <a name="Multilib-1"></a>
 <h4 class="subsection">2.6.1 Multilib</h4>
 
-<p>On Linux<a name="DOCF11" href="#FOOT11"><sup>11</sup></a>, there is an alternative mechanism for mixing 32-bit and 64-bit
-libraries known as <em>multilib</em>. If a Linux distribution supports
-multilib, then parallel builds of R may be installed in the
-sub-directories <samp>lib</samp> (32-bit) and <samp>lib64</samp> (64-bit).  The
-build to be run may then be selected using the <code>setarch</code>
-command. For example, a 32-bit build may be run by
+<p>For some Linux distributions<a name="DOCF9" href="#FOOT9"><sup>9</sup></a>, there is an alternative mechanism for mixing
+32-bit and 64-bit libraries known as <em>multilib</em>. If the Linux
+distribution supports multilib, then parallel builds of R may be
+installed in the sub-directories <samp>lib</samp> (32-bit) and <samp>lib64</samp>
+(64-bit).  The build to be run may then be selected using the
+<code>setarch</code> command. For example, a 32-bit build may be run by
 </p>
 <div class="example">
 <pre class="example">setarch i686 R
@@ -1109,8 +1135,8 @@ sessions in which packages are to be installed, even if that is the only
 version of R installed (since this tells the package installation
 code the architecture needed).
 </p>
-<p>At present there is a potential problem with packages using Java, as
-the post-install for a ‘<samp>i686</samp>’ RPM on ‘<samp>x86_64</samp>’ Linux
+<p>There is a potential problem with packages using Java, as the
+post-install for a ‘<samp>i686</samp>’ RPM on ‘<samp>x86_64</samp>’ Linux
 reconfigures Java and will find the ‘<samp>x86_64</samp>’ Java.  If you know
 where a 32-bit Java is installed you may be able to run (as root)
 </p>
@@ -1140,28 +1166,148 @@ to R or intended for specialist uses by the R developers.
 </p>
 <p>One that may be useful when working on R itself is the option
 <samp>--disable-byte-compiled-packages</samp>, which ensures that the base
-and recommended packages are lazyloaded but not byte-compiled.
-(Alternatively the (make or environment) variable
-<code>R_NO_BASE_COMPILE</code> can be set to a non-empty value for the duration
-of the build.)
+and recommended packages are not byte-compiled.  (Alternatively the
+(make or environment) variable <code>R_NO_BASE_COMPILE</code> can be set to a
+non-empty value for the duration of the build.)
 </p>
 <p>Option <samp>--with-internal-tzcode</samp> makes use of R’s own code and
 copy of the Olson database for managing timezones.  This will be
 preferred where there are issues with the system implementation, usually
 involving times after 2037 or before 1916.  An alternative time-zone
-directory<a name="DOCF12" href="#FOOT12"><sup>12</sup></a> can be used, pointed
+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
 deduced correctly, but if necessary it can be set as the value of
 environment variable <code>TZ</code>.
 </p>
 
+
+<hr>
+<a name="OpenMP-Support"></a>
+<a name="OpenMP-Support-1"></a>
+<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.
+</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
+overridden by specifying
+</p><div class="example">
+<pre class="example">R_OPENMP_CFLAGS
+</pre></div>
+
+<p>Use for packages has similar restrictions (involving <code>SHLIB_LD</code> and
+similar: note that as FORTRAN 77 code is normally linked by the C
+compiler, both need to support OpenMP) and can be overridden by
+specifying some of
+</p><div class="example">
+<pre class="example">SHLIB_OPENMP_CFLAGS
+SHLIB_OPENMP_CXXFLAGS
+SHLIB_OPENMP_FCFLAGS
+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’s executable.  Note
+that overridden values are not tested.
+</p>
+<hr>
+<a name="C_002b_002b-Support"></a>
+<a name="C_002b_002b-Support-1"></a>
+<h4 class="subsection">2.7.2 C++ Support</h4>
+
+<p>C++ is not used by R itself, but support is provided for installing
+packages with C++ code via <code>make</code> macros defined in file
+<samp>etc/Makeconf</samp> (and with explanations in file <samp>config.site</samp>):
+</p><div class="example">
+<pre class="example">CXX
+CXXFLAGS
+CXXPICFLAGS
+CXXSTD
+
+CXX98
+CXX98STD
+CXX98FLAGS
+CXX98PICFLAGS
+
+CXX11
+CXX11STD
+CXX11FLAGS
+CXX11PICFLAGS
+
+CXX14
+CXX14STD
+CXX14FLAGS
+CXX14PICFLAGS
+
+CXX17
+CXX17STD
+CXX17FLAGS
+CXX17PICFLAGS
+</pre></div>
+<p>The macros <code>CXX</code> etc are those used by default for C++ code.
+<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
+<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
+compiling some C++11/14/17 code.
+</p>
+<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
+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
+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">
+<pre class="example">CXX='g++ -std=gnu++98'
+CXX11=g++
+CXX11STD='-std=c++11'
+CXX14=g++
+CXX14STD='-std=c++14'
+</pre></div>
+
+<p>The <samp>-std</samp> flag is supported by the GCC, <code>clang</code>, Intel
+and Solaris compilers (the latter from version 12.4).  Currently
+accepted values are (plus some synonyms)
+</p><div class="example">
+<pre class="example">g++:     c++98 gnu++98 c++11 gnu+11 c++14 gnu++14 c++1z gnu++1z
+Intel:   gnu+98 c++11 c++14 (from 16.0) c++17 (from 17.0)
+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
+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
+<samp>-std=c++14</samp> was introduced in version 5.x.
+</p>
+
+<p>‘Standards’ for <code>g++</code> starting with ‘<samp>gnu</samp>’ enable ‘GNU
+extensions’: what those are is hard to track down.
+</p>
+<p>For the use of C++11 and later in R packages see the ‘Writing R
+Extensions’ manual.
+</p>
 <hr>
 <a name="Testing-a-Unix_002dalike-Installation"></a>
 <a name="Testing-an-Installation"></a>
 <h3 class="section">2.8 Testing an Installation</h3>
 
-<p>Full testing is possible only if the test files have been installed with
+<p>Full post-installation testing is possible only if the test files have
+been installed with
 </p>
 <div class="example">
 <pre class="example">make install-tests
@@ -1182,8 +1328,8 @@ The first is to move to the home directory of the R installation
 </pre></div>
 
 <p>and other useful targets are <code>test-BasePackages</code> and
-<code>test-Recommended</code> to the run tests of the standard and
-recommended packages (if installed) respectively.
+<code>test-Recommended</code> to run tests of the standard and recommended
+packages (if installed) respectively.
 </p>
 <p>This re-runs all the tests relevant to the installed R (including for
 example code in the package vignettes), but not for example the ones
@@ -1210,22 +1356,25 @@ inspection.
 </p>
 <div class="example">
 <pre class="example">Sys.setenv(LC_COLLATE = "C", LC_TIME = "C", LANGUAGE = "en")
-library("tools")
-testInstalledBasic("both")
-testInstalledPackages(scope = "base")
-testInstalledPackages(scope = "recommended")
+tools::testInstalledBasic("both")
+tools::testInstalledPackages(scope = "base")
+tools::testInstalledPackages(scope = "recommended")
 </pre></div>
 
 <p>runs the basic tests and then all the tests on the standard and
 recommended packages.  These tests can be run from anywhere: the basic
 tests write their results in the <samp>tests</samp> folder of the R home
-directory and run slightly fewer tests than the first approach: in
-particular they do not test Internet access.
-</p>
+directory and run fewer tests than the first approach: in particular
+they do not test things which need Internet access—that can be tested
+by
+</p><div class="example">
+<pre class="example">tools::testInstalledBasic("internet")
+</pre></div>
+
 <p>These tests work best if <code>diff</code> (in <samp>Rtools*.exe</samp> for
 Windows users) is in the path.
 </p>
-<p>It is possible to test the installed packages (but not the
+<p>It is possible to test the installed packages (but not their
 package-specific tests) by <code>testInstalledPackages</code> even if
 <code>make install-tests</code> was not run.
 </p>
@@ -1237,7 +1386,7 @@ try setting (before starting the R session)
 <pre class="example">LANGUAGE=en
 </pre></div>
 
-<p>but use a UTF-8 or Latin-1 locale.
+<p>and use a UTF-8 or Latin-1 locale.
 </p>
 
 <hr>
@@ -1248,14 +1397,16 @@ try setting (before starting the R session)
 
 <p>The <samp>bin/windows</samp> directory of a <acronym>CRAN</acronym> site contains
 binaries for a base distribution and a large number of add-on packages
-from <acronym>CRAN</acronym> to run on Windows XP or later on ix86 <acronym>CPU</acronym>s
-(including AMD64/Intel64 cpus and Windows x64).
+from <acronym>CRAN</acronym> to run on 32- or 64-bit Windows (XP or later) on
+‘<samp>ix86</samp>’ and ‘<samp>x86_64</samp>’ <acronym>CPU</acronym>s.
 </p>
 <p>Your file system must allow long file names (as is likely except
-perhaps for some network-mounted systems).
+perhaps for some network-mounted systems).  If it doesn’t also support
+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.1.2-win.exe</samp>.  Just double-click on the icon and
+<samp>R-3.4.0-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.
@@ -1264,7 +1415,7 @@ to install both).  You can uninstall R from the Control Panel.
 that choice applies to both installation and un-installation but not to
 running R itself.
 </p>
-<p>See the <a href="http://CRAN.R-project.org/bin/windows/base/rw-FAQ.html">R
+<p>See the <a href="https://CRAN.R-project.org/bin/windows/base/rw-FAQ.html">R
 Windows <acronym>FAQ</acronym></a> for more details on the binary installer.
 </p>
 
@@ -1286,6 +1437,18 @@ configuration files in the <samp>etc</samp> directory.
 used for CJK languages) is unsupported and may not work (the scripts do
 try to select a ‘<samp>C</samp>’ locale; Windows may not honour this).
 </p>
+<p><strong>NB:</strong> The build process is currently being changed to require
+external binary distributions of third-party software.  Their location
+is set using macro <code>EXT_LIBS</code> with default setting
+<samp>$(LOCAL_SOFT)</samp>; the $(LOCAL_SOFT) macro defaults to
+<samp>$(R_HOME)/extsoft</samp>.  This directory can be populated using
+<code>make rsync-extsoft</code>. The location can be overridden by
+setting <code>EXT_LIBS</code> to a different path in
+<samp>src/gnuwin32/MkRules.local</samp>. A suitable collection of files can
+also be obtained from 
+<a href="https://CRAN.R-project.org/bin/windows/extsoft">https://CRAN.R-project.org/bin/windows/extsoft</a> or
+<a href="https://www.stats.ox.ac.uk/pub/Rtools/libs.html">https://www.stats.ox.ac.uk/pub/Rtools/libs.html</a>.
+</p>
 
 <hr>
 <a name="Getting-the-tools"></a>
@@ -1294,7 +1457,7 @@ try to select a ‘<samp>C</samp>’ locale; Windows may not honour this
 
 <p>If you want to build R from the sources, you will first need to
 collect, install and test an extensive set of tools.  See <a href="#The-Windows-toolset">The Windows toolset</a> (and perhaps updates in
-<a href="http://CRAN.R-project.org/bin/windows/Rtools/">http://CRAN.R-project.org/bin/windows/Rtools/</a>) for details.
+<a href="https://CRAN.R-project.org/bin/windows/Rtools/">https://CRAN.R-project.org/bin/windows/Rtools/</a>) for details.
 </p>
 <p>The <samp>Rtools*.exe</samp> executable installer described in <a href="#The-Windows-toolset">The Windows toolset</a> also includes some source files in addition to the R
 source as noted below.  You should run it first, to obtain a working
@@ -1310,12 +1473,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.1.2.tar.gz</samp> from
+<li> Get the R source code tarball <samp>R-3.4.0.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.1.2.tar.gz
+<pre class="example">tar -xf R-3.4.0.tar.gz
 </pre></div>
 
 <p>to create the source tree in <var>R_HOME</var>.  <strong>Beware</strong>: do use
@@ -1324,7 +1487,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.1.2.tar.gz
+<pre class="example">tar --no-same-owner -xf R-3.4.0.tar.gz
 </pre></div>
 
 <a name="index-TAR_005fOPTIONS-1"></a>
@@ -1345,50 +1508,47 @@ automatically by running in <samp><var>R_HOME</var>/src/gnuwin32</samp>
 <pre class="example">make rsync-recommended
 </pre></div>
 
+</li><li> The binary distributions of external software.  Download
+
+<div class="example">
+<pre class="example">https://www.stats.ox.ac.uk/pub/Rtools/goodies/multilib/local323.zip
+</pre></div>
+
+<p>(or a more recent version if appropriate), create an empty directory, 
+say <samp>c:/R/extsoft</samp>, and unpack it in
+that directory by e.g.
+</p>
+<div class="example">
+<pre class="example">unzip local323.zip -d c:/R/extsoft
+</pre></div>
+
+</li><li> Make a local copy of the configuration rules by
+
+<div class="example">
+<pre class="example">cd <var>R_HOME</var>/src/gnuwin32
+cp MkRules.dist MkRules.local
+</pre></div>
+
+<p>and edit <samp>MkRules.local</samp>, uncommenting <code>EXT_LIBS</code> and setting
+it to the appropriate path (in our example <samp>c:/R/extsoft</samp>).
+</p>
+<p>Look through the file <samp>MkRules.local</samp> and make any other changes
+needed: in particular, this is where a 64-bit build is selected and the
+locations are set of external software for ICU collation and the
+cairo-based devices.
+</p>
 </li></ul>
 
-<p>The following additional items are normally installed by
-<samp>Rtools31.exe</samp>.  If instead you choose to do a completely manual
+<p>The following additional item is normally installed by
+<samp>Rtools*.exe</samp>.  If instead you choose to do a completely manual
 build you will also need
 </p>
 <ul>
-<li> The Tcl/Tk support files are contained in <samp>Rtools31.exe</samp> and
-available as <samp>.zip</samp> files from
-<a href="http://www.stats.ox.ac.uk/pub/Rtools">http://www.stats.ox.ac.uk/pub/Rtools</a>.  Please make sure you
-install the right version: there is a 32-bit version and a 64-bit
-version.  They should be installed to <samp><var>R_HOME</var></samp>, creating
-directory <samp>Tcl</samp> there.
-
-</li><li> You need <code>libpng</code>, <code>jpeg</code> and <code>libtiff</code> sources
-(available, e.g., from <a href="http://www.libpng.org/">http://www.libpng.org/</a>,
-<a href="http://www.ijg.org">http://www.ijg.org</a> and
-<a href="http://download.osgeo.org/libtiff/">http://download.osgeo.org/libtiff/</a>); current versions are
-recommended and <code>jpeg</code> 7 or later is required.  It is also possible
-to use ‘<samp>libjpeg-turbo</samp>’ from
-<a href="http://sourceforge.net/projects/libjpeg-turbo/files/">http://sourceforge.net/projects/libjpeg-turbo/files/</a>.
-
-<p>Working in the directory <samp><var>R_HOME</var>/src/gnuwin32/bitmap</samp>,
-install the <code>libpng</code> and <code>jpeg</code> sources in sub-directories.
-The <code>jpeg</code> sub-directory for version 9 is named <samp>jpeg-9</samp>; if
-you use a different version (e.g. <samp>jpeg-9a</samp> or
-<samp>libjpeg-turbo</samp>), copy file <samp>src/gnuwin32/MkRules.dist</samp> to
-<samp>src/gnuwin32/MkRules.local</samp> and edit the definition of
-<code>JPEGDIR</code>: the names of the <samp>libpng</samp> and <samp>libtiff</samp>
-directories can also be set there.
-</p>
-<p>Example:
-</p>
-<div class="example">
-<pre class="example">> tar -zxf libpng-1.6.10.tar.gz
-> mv libpng-1.6.10 libpng
-> tar -zxf jpegsrc.v9a.tar.gz
-> tar -zxf tiff-4.0.3.tar.gz
-> mv tiff-4.0.3/libtiff .
-> rm -rf tiff-4.0.3
-</pre></div>
-
-<p>(and see the comment above about <samp>--no-same-owner</samp>).
-</p>
+<li> The Tcl/Tk support files are contained in <samp>Rtools*.exe</samp>.  Please
+make sure you install the right version: there is a 32-bit version and a
+64-bit version.  They should be installed to <samp><var>R_HOME</var></samp>,
+creating directory <samp>Tcl</samp> there.
+
 </li></ul>
 
 <hr>
@@ -1406,13 +1566,10 @@ Windows.)
 that a <code>samba</code>-mounted file system (which maps all file names to
 lower case) did not work.
 </p>
-<p>Open a command window at <samp><var>R_HOME</var>/src/gnuwin32</samp>.  Look at
-<samp>MkRules.dist</samp> and if settings need to be altered, copy it to
-<samp>MkRules.local</samp> and edit the settings there.  In particular, this
-is where a 64-bit build is selected.  Then run
+<p>Open a command window at <samp><var>R_HOME</var>/src/gnuwin32</samp>, then run
 </p>
 <div class="example">
-<pre class="example">make all recommended
+<pre class="example">make all recommended vignettes
 </pre></div>
 
 <p>and sit back and wait while the basic compile takes place.
@@ -1424,18 +1581,12 @@ up the machine, but not for several years.  However, aggressive
 anti-virus checking such as the on-access scanning of Sophos can slow
 the build down several-fold.
 
-</li><li> By default Doug Lea’s <code>malloc</code> in the file
-<samp><var>R_HOME</var>/src/gnuwin32/malloc.c</samp> is used for R’s internal
-memory allocations.  You can opt out of this by setting
-<code>LEA_MALLOC=NO</code> in <samp>MkRules.dist</samp>, in which case the <code>malloc</code>
-in <samp>msvcrt.dll</samp> is used.  This does impose a considerable
-performance penalty and has not been tested recently.
-
 </li><li> You can run a parallel make by e.g.
 
 <div class="example">
 <pre class="example">make -j4 all
 make -j4 recommended
+make vignettes
 </pre></div>
 
 <p>but this is only likely to be worthwhile on a multi-core machine with
@@ -1449,36 +1600,21 @@ packages.
 </li></ul>
 
 <hr>
-<a name="Building-the-bitmap-files"></a>
-<a name="Building-the-bitmap-files-1"></a>
-<h4 class="subsection">3.1.4 Building the bitmap files</h4>
-<a name="index-Rbitmap_002edll"></a>
-
-<p>The file
-<samp><var>R_HOME</var>/library/grDevices/libs/{i386,x64}Rbitmap.dll</samp> is
-not built automatically.
-</p>
-<p>Running <code>make</code> in <samp><var>R_HOME</var>/src/gnuwin32/bitmap</samp> or
-<code>make bitmapdll</code> in <samp><var>R_HOME</var>/src/gnuwin32</samp> should build
-<samp>Rbitmap.dll</samp> and install it under
-<samp><var>R_HOME</var>/library/grDevices/libs</samp>.
-</p>
-<hr>
 <a name="Building-the-cairo-devices-files"></a>
 <a name="Building-the-cairo-devices"></a>
-<h4 class="subsection">3.1.5 Building the cairo devices</h4>
+<h4 class="subsection">3.1.4 Building the cairo devices</h4>
 <a name="index-winCairo_002edll"></a>
 
 <p>The devices based on cairographics (<code>svg</code>, <code>cairo_pdf</code>,
 <code>cairo_ps</code> and the <code>type = "cairo"</code> versions of <code>png</code>,
 <code>jpeg</code>, <code>tiff</code> and <code>bmp</code>) are implemented in a separate
 DLL <samp>winCairo.dll</samp> which is loaded when one of these devices is
-first used.  It is not built by default, and needs to be built after
-<samp>Rbitmap.dll</samp>, by <code>make cairodevices</code>.
+first used.  It is not built by default, and needs to be built (after
+<code>make all</code>) by <code>make cairodevices</code>.
 </p>
 <p>To enable the building of these devices you need to install the static
 cairographics libraries built by Simon Urbanek at
-<a href="http://www.rforge.net/Cairo/files/cairo-current-win.tar.gz">http://www.rforge.net/Cairo/files/cairo-current-win.tar.gz</a>.  Set
+<a href="https://www.rforge.net/Cairo/files/cairo-current-win.tar.gz">https://www.rforge.net/Cairo/files/cairo-current-win.tar.gz</a>.  Set
 the macro ‘<samp>CAIRO_HOME</samp>’ in <samp>MkRules.local</samp>.  (Note that this
 tarball unpacks with a top-level directory <samp>src/</samp>:
 ‘<samp>CAIRO_HOME</samp>’ needs to include that directory in its path.)
@@ -1486,12 +1622,11 @@ tarball unpacks with a top-level directory <samp>src/</samp>:
 <hr>
 <a name="Using-ICU-for-collation"></a>
 <a name="Using-ICU-for-collation-1"></a>
-<h4 class="subsection">3.1.6 Using ICU for collation</h4>
+<h4 class="subsection">3.1.5 Using ICU for collation</h4>
 
-<p>It is possible (and even recommended) to build R to use ICU
-(International Components for Unicode,
-<a href="http://site.icu-project.org/">http://site.icu-project.org/</a>) for collation, as is commonly done
-on Unix-alikes.
+<p>It is recommended to build R to support ICU (International Components
+for Unicode, <a href="http://site.icu-project.org/">http://site.icu-project.org/</a>) for collation, as is
+commonly done on Unix-alikes.
 </p>
 <p>Two settings are needed in <samp>MkRules.local</samp>, 
 </p><div class="example">
@@ -1503,13 +1638,30 @@ ICU_PATH = /path/to/ICU
 
 <p>The first should be uncommented and the second set to the top-level
 directory of a suitably packaged binary build of ICU, for example that
-at <a href="http://www.stats.ox.ac.uk/pub/Rtools/goodies/ICU_531.zip">http://www.stats.ox.ac.uk/pub/Rtools/goodies/ICU_531.zip</a>.
+at <a href="https://www.stats.ox.ac.uk/pub/Rtools/goodies/ICU_531.zip">https://www.stats.ox.ac.uk/pub/Rtools/goodies/ICU_531.zip</a>.
 Depending on the build, it may be necessary to edit the macro
 <code>ICU_LIBS</code>.
 </p>
-<p>Unlike on a Unix-alike, it is currently necessary to call
+<p>Unlike on a Unix-alike, it is normally necessary to call
 <code>icuSetCollate</code> to set a locale before ICU is actually used for
-collation.
+collation, or set the environment variable <code>R_ICU_LOCALE</code>.
+</p>
+<hr>
+<a name="Support-for-libcurl"></a>
+<a name="Support-for-libcurl-1"></a>
+<h4 class="subsection">3.1.6 Support for libcurl</h4>
+
+<p><code>libcurl</code> version 7.28.0 or later is used to support
+<code>curlGetHeaders</code> and the <code>"libcurl"</code> methods of
+<code>download.file</code> and <code>url</code>.
+</p>
+<p>A suitable distribution can be found <em>via</em>
+<a href="https://www.stats.ox.ac.uk/pub/Rtools/libs.html">https://www.stats.ox.ac.uk/pub/Rtools/libs.html</a> and its unpacked
+location should be specified in file <samp>MkRules.local</samp>.
+</p>
+<p>For secure use of e.g. ‘<samp>https://</samp>’ URLs Windows users may need to
+specify the path to up-to-date <em>CA root certificates</em>: see
+<code>?download.file</code>.
 </p>
 <hr>
 <a name="Checking-the-build"></a>
@@ -1540,7 +1692,7 @@ collation.
 <pre class="example">make check-all
 </pre></div>
 
-<p>for <code>check-devel</code> and <code>check-recommended</code>.
+<p>for both <code>check-devel</code> and <code>check-recommended</code>.
 </p>
 <p>If a test fails, there will almost always be a <samp>.Rout.fail</samp> file in
 the directory being checked (often <samp>tests/Examples</samp> or
@@ -1557,7 +1709,7 @@ run in parallel.
 <a name="Building-the-manuals-1"></a>
 <h4 class="subsection">3.1.8 Building the manuals</h4>
 
-<p>The PDF manuals can be made by
+<p>The PDF manuals require <strong>texinfo</strong> 5.1 or later, and can be made by
 </p>
 <div class="example">
 <pre class="example">make manuals
@@ -1577,14 +1729,13 @@ in your path).
 <p>See the <a href="#Making-the-manuals">Making the manuals</a> section in the Unix-alike section for setting
 options such as the paper size and the fonts used.
 </p>
-<p>Version 4.x of <code>makeinfo</code> from Rtools is assumed by default.  If
-you have version 5.x of <strong>texinfo</strong>, <code>makeinfo</code> has been
-replaced by a <code>Perl</code> script <code>texi2any</code>: file
-<samp>MkRules.dist</samp> contains alternative macros to allow that to be used
-(copy it to <samp>MkRules.local</samp> before editing).  (A package of
-<strong>texinfo</strong> 5.x for use on Windows is available at
-<a href="http://www.stats.ox.ac.uk/pub/Rtools/">http://www.stats.ox.ac.uk/pub/Rtools/</a>: you will also need to
-install <code>Perl</code>.)
+<p>By default it is assumed that <strong>texinfo</strong> is not installed, and the
+manuals will not be built.  The comments in file <samp>MkRules.dist</samp>
+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>
 </p>
 <hr>
 <a name="Building-the-Inno-Setup-installer"></a>
@@ -1592,8 +1743,8 @@ install <code>Perl</code>.)
 <h4 class="subsection">3.1.9 Building the Inno Setup installer</h4>
 
 <p>You need to have the files for a complete R build, including bitmap and
-Tcl/Tk support and the manuals, as well as the recommended packages and
-Inno Setup (see <a href="#The-Inno-Setup-installer">The Inno Setup installer</a>).
+Tcl/Tk support and the manuals (which requires <strong>texinfo</strong> installed),
+as well as the recommended packages and Inno Setup (see <a href="#The-Inno-Setup-installer">The Inno Setup installer</a>).
 </p>
 <p>Once everything is set up
 </p>
@@ -1610,11 +1761,10 @@ building all the parts in the sequence:
 <pre class="example">rbuild <span class="roman">(the executables, the <acronym>FAQ</acronym> docs etc.)</span>
 rpackages <span class="roman">(the base packages)</span>
 htmldocs <span class="roman">(the HTML documentation)</span>
-bitmapdll <span class="roman">(the bitmap support files)</span>
 cairodevices <span class="roman">(the cairo-based graphics devices)</span>
 recommended <span class="roman">(the recommended packages)</span>
 vignettes <span class="roman">(the vignettes in base packages:</span>
-	  <span class="roman"> only needed if building from an svn checkout)</span>
+	  <span class="roman"> only needed if building from an <code>svn</code> checkout)</span>
 manuals <span class="roman">(the PDF manuals)</span>
 rinstaller <span class="roman">(the install program)</span>
 crandir <span class="roman">(the <acronym>CRAN</acronym> distribution directory, only for 64-bit builds)</span>
@@ -1652,10 +1802,10 @@ 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.1.2-win.exe</samp>, so please rename it to indicate that
+<samp>R-3.4.0-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 – note that
-the installer will state that the contents are distributed under GPL-2
+the installer will state that the contents are distributed under GPL
 and this has a requirement for <em>you</em> to supply the complete sources
 (including the R sources even if you started with a binary distribution
 of R, and also the sources of any extra packages (including their
@@ -1679,11 +1829,11 @@ made by first building 32-bit R (just
 <pre class="example">make 32-bit
 </pre></div>
 
-<p>is needed), and then building 64-bit R with the macro <code>HOME32</code> set
-in file <samp>MkRules.local</samp> to the top-level directory of the 32-bit
-build.  Then the <code>make rinstaller</code> step copies the files that
-differ between architectures from the 32-bit build as it builds the
-installer image.
+<p>is needed), and then (in a separate directory) building 64-bit R with
+the macro <code>HOME32</code> set in file <samp>MkRules.local</samp> to the
+top-level directory of the 32-bit build.  Then the <code>make
+rinstaller</code> step copies the files that differ between architectures from
+the 32-bit build as it builds the installer image.
 </p>
 <hr>
 <a name="Building-the-MSI-installer"></a>
@@ -1696,9 +1846,8 @@ installs, and is not recommended for casual use.
 </p>
 <p>It makes use of the Windows Installer XML (WiX) toolkit <em>version
 3.5</em> (or perhaps later, untested) available from
-<a href="http://wix.sourceforge.net/">http://wix.sourceforge.net/</a> or <a href="http://wixtoolset.org/">http://wixtoolset.org/</a>.
-Once WiX is installed, set the path to its home directory in
-<samp>MkRules.local</samp>.
+<a href="http://wixtoolset.org/">http://wixtoolset.org/</a>.  Once WiX is installed, set the path to
+its home directory in <samp>MkRules.local</samp>.
 </p>
 <p>You need to have the files for a complete R build, including bitmap and
 Tcl/Tk support and the manuals, as well as the recommended packages.
@@ -1712,21 +1861,21 @@ make msi
 </pre></div>
 
 <p>which will result in a file with a name like
-<samp>R-3.1.2-win32.msi</samp>.  This can be double-clicked to be
+<samp>R-3.4.0-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 ‘<samp>ALLUSERS</samp>’, ‘<samp>INSTALLDIR</samp>’ (something like
-<samp>c:\Program Files\R\R-3.1.2</samp>) and ‘<samp>RMENU</samp>’ (the path
+<samp>c:\Program Files\R\R-3.4.0</samp>) and ‘<samp>RMENU</samp>’ (the path
 to the ‘<samp>R</samp>’ folder on the start menu) and ‘<samp>STARTDIR</samp>’ (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.1.2-win32.msi</samp>) and from a 64-bit build of R
-(<samp>R-3.1.2-win64.msi</samp>, optionally including 32-bit files
+(<samp>R-3.4.0-win32.msi</samp>) and from a 64-bit build of R
+(<samp>R-3.4.0-win64.msi</samp>, optionally including 32-bit files
 by setting the macro <code>HOME32</code>, when the name is
-<samp>R-3.1.2-win.msi</samp>).  Unlike the main installer, a 64-bit
+<samp>R-3.4.0-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)
@@ -1750,7 +1899,7 @@ acknowledged, as well as help from Kai Tietz, the lead developer of the
 MinGW-w64 project.
 </p>
 <p>Windows 64-bit is now completely integrated into the R and package
-build systems.
+build systems: a 64-bit build is selected in file <samp>MkRules.local</samp>.
 </p>
 <hr>
 <a name="Testing-a-Windows-Installation"></a>
@@ -1787,93 +1936,101 @@ Windows’ CRLF line endings.
 </p>
 
 <hr>
-<a name="Installing-R-under-OS-X"></a>
-<a name="Installing-R-under-OS-X-1"></a>
-<h2 class="chapter">4 Installing R under OS X</h2>
-<a name="index-OS-X-1"></a>
+<a name="Installing-R-under-macOS"></a>
+<a name="Installing-R-under-macOS-1"></a>
+<h2 class="chapter">4 Installing R under macOS</h2>
+<a name="index-macOS-1"></a>
 
 
+<p>(‘macOS’ was known as ‘OS X’ from 2012–2016 and as ‘Mac OS X’ before that.)
+</p>
 <p>The front page of a <acronym>CRAN</acronym> site has a link ‘Download R for OS
-X’. Click on that, then download the file
-<samp>R-3.1.2-snowleopard.pkg</samp> and install it.  This runs on
-OS X 10.6 and later (Snow Leopard, Lion, Mountain Lion, Mavericks,
-Yosemite, …); it is a 64-bit (‘<samp>x86_64</samp>’) build which should
-run on all Macs from mid-2008 on.  For older Intel Macs and some older
-versions of the OS you can install R from the sources.
-</p>
-<p>There is a separate installer package,
-<samp>R-3.1.2-mavericks.pkg</samp>, for use on Mavericks and
-Yosemite: the ‘Snow Leopard’ installer package also works there and may
-have more binary packages available (but there are a few packages using
-C++11 and only available for the Mavericks build).
+X’. Click on that, then download the file <samp>R-3.4.0.pkg</samp>
+and install it. This runs on macOS 10.11 and later (El Capitan, Sierra,
+…).
+</p>
+<p>Installers for R-patched and R-devel are usually available from
+<a href="https://r.research.att.com">https://r.research.att.com</a>.  (Some of these packages are
+unsigned: to install those Control/right/two-finger click, select
+‘<samp>Open with</samp>’ and ‘<samp>Installer</samp>’.)
+</p>
+<p>For some older versions of the OS you can in principle (it is little
+tested) install R from the sources (see <a href="#macOS">macOS</a>).
 </p>
 <p>It is important that if you use a binary installer package that your OS
-is fully updated: run ‘Software Update’ from the Apple menu to be sure.
+is fully updated: look at ‘Updates’ from the ‘App Store’ to be sure.
 (If using XQuartz, check that is current.)
 </p>
 <p>To install, just double-click on the icon of the file you downloaded.
 At the ‘Installation Type’ stage, note the option to ‘Customize’.  This
-currently shows three components.  Everyone will need the ‘R Framework’
-component: the ‘R GUI’ and ‘Tcl/Tk’ components are optional (the latter
-being needed to use package <strong>tcltk</strong>, and requires an X sub-system to
-be installed: see <a href="#OS-X">OS X</a>).
+currently shows four components: everyone will need the ‘R Framework’
+component: the remaining components are optional. (The ‘Tcl/Tk’
+component is needed to use package <strong>tcltk</strong>. The ‘Texinfo’ component
+is only needed by those installing source packages or R from its
+sources.)
 </p>
 <p>This is an Apple Installer package. If you encounter any problem during
 the installation, please check the Installer log by clicking on the
 “Window” menu and item “Installer Log”. The full output (select
-“Show All Log”) is useful for tracking down problems.
+“Show All Log”) is useful for tracking down problems.  Note the the
+installer is clever enough to try to upgrade the last-installed version
+of the application where you installed it (which may not be where you
+want this time …).
+</p>
+<p>Various parts of the build require XQuartz to be installed: : see
+<a href="https://xquartz.macosforge.org/">https://xquartz.macosforge.org/</a>.  These include the <strong>tcltk</strong>
+package and the <code>X11</code> device: attempting to use these without
+XQuartz will remind you.  Also the cairographics-based devices (which
+are not often used on macOS) such as <code>png(type = "cairo")</code>.
 </p>
-<p>If you update your OS X version, you should re-install R: the
-installer tailors the installation to the current version of the OS.
+<p>If you update your macOS version, you should re-install R (and
+perhaps XQuartz): the installer may tailor the installation to the
+current version of the OS.
 </p>
-<p>For building R from source, see <a href="#OS-X">OS X</a>.
+<p>For building R from source, see <a href="#macOS">macOS</a>.
 </p>
 
 
 <hr>
-<a name="Running-R-under-OS-X"></a>
-<a name="Running-R-under-OS-X-1"></a>
-<h3 class="section">4.1 Running R under OS X</h3>
+<a name="Running-R-under-macOS"></a>
+<a name="Running-R-under-macOS-1"></a>
+<h3 class="section">4.1 Running R under macOS</h3>
 
-<p>There are two ways to run R on OS X from a <acronym>CRAN</acronym> binary
+<p>There are two ways to run R on macOS from a <acronym>CRAN</acronym> binary
 distribution.
 </p>
 <p>There is a GUI console normally installed with the R icon in
 <samp>/Applications</samp> which you can run by double-clicking (e.g. from
-Launchpad or Finder).  This is usually referred to as <small>R.APP</small> to
-distinguish it from command-line R: its user manual is currently part
-of the OS X FAQ at
-<a href="http://cran.r-project.org/bin/macosx/RMacOSX-FAQ.html">http://cran.r-project.org/bin/macosx/RMacOSX-FAQ.html</a> and
-can be viewed from  <small>R.APP</small>’s ‘Help’ menu.
-</p>
-
-<p>You can run command-line R from a Terminal 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 library directory (under <samp>~/Library/R</samp>,
-e.g. <samp>~/Library/R/3.1/library</samp>), and that warnings, messages and
+Launchpad or Finder).  (If you cannot find it there it was possibly
+installed elsewhere so try searching for it in Spotlight.) This is
+usually referred to as <small>R.APP</small> to distinguish it from command-line R:
+its user manual is currently part of the macOS FAQ at
+<a href="https://cran.r-project.org/bin/macosx/RMacOSX-FAQ.html">https://cran.r-project.org/bin/macosx/RMacOSX-FAQ.html</a> and
+can be viewed from <small>R.APP</small>’s ‘Help’ 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
+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
+library directory (under <samp>~/Library/R</samp>,
+e.g. <samp>~/Library/R/3.4/library</samp>), and that warnings, messages and
 other output to <samp>stderr</samp> are highlighted in bold.
 </p>
-<p>%% https://stat.ethz.ch/pipermail/r-sig-mac/2014-October/011131.html
-It has been reported that running <small>R.APP</small> under Yosemite may fail if no
-preferences are stored, so if it fails when launched for the very first
-time, try it again (the first attempt will store some preferences).
+<p>It has been reported that running <small>R.APP</small> may fail if no preferences are
+stored, so if it fails when launched for the very first time, try it
+again (the first attempt will store some preferences).
 </p>
-<p>Users of <small>R.APP</small> under Mavericks and later need to be aware of the ‘App
-Nap’ feature
+<p>Users of <small>R.APP</small> need to be aware of the ‘App Nap’ feature
 (<a href="https://developer.apple.com/library/mac/releasenotes/MacOSX/WhatsNewInOSX/Articles/MacOSX10_9.html">https://developer.apple.com/library/mac/releasenotes/MacOSX/WhatsNewInOSX/Articles/MacOSX10_9.html</a>)
 which can cause R tasks to appear to run very slowly when not
-producing output in the console.  Here are three ways to avoid it:
+producing output in the console.  Here are ways to avoid it:
 </p>
 <ul>
 <li> Ensure that the console is completely visible (or at least the activity
 indicator at the top right corner is visible).
 
-</li><li> Call ‘<samp>Get Info</samp>’ on the application (e.g. from Finder). This may
-have two tick boxes in the ‘General’ panel: click the one named ‘Prevent
-App Nap’ if it is not already ticked.  (This only available for builds
-made prior to Mavericks.)
-
 </li><li> In a Terminal, run
 <div class="example">
 <pre class="example">defaults write org.R-project.R NSAppSleepDisabled -bool YES
@@ -1883,76 +2040,81 @@ made prior to Mavericks.)
 </p></li></ul>
 
 <p>Using the <code>X11</code> device or the X11-based versions of <code>View()</code>
-and <code>edit</code> for data frames and matrices (the latter are the default
-for command-line R but not <small>R.APP</small>) requires an X sub-system to be
-installed: see <a href="#OS-X">OS X</a>.  (So do some third-party packages.)
+and <code>edit()</code> for data frames and matrices (the latter are the
+default for command-line R but not <small>R.APP</small>) requires an X sub-system
+to be installed: see <a href="#macOS">macOS</a>.  So do the <strong>tcltk</strong> package and
+some third-party packages.
 </p>
 <hr>
-<a name="Uninstalling-under-OS-X"></a>
-<a name="Uninstalling-under-OS-X-1"></a>
-<h3 class="section">4.2 Uninstalling under OS X</h3>
+<a name="Uninstalling-under-macOS"></a>
+<a name="Uninstalling-under-macOS-1"></a>
+<h3 class="section">4.2 Uninstalling under macOS</h3>
 
-<p>R for OS X consists of two parts: the GUI (<small>R.APP</small>) and the R
+<p>R for macOS consists of two parts: the GUI (<small>R.APP</small>) and the R
 framework. The un-installation is as simple as removing those folders
-(e.g. by dragging them into the Trash). The typical installation will
+(e.g. by dragging them onto the Trash). The typical installation will
 install the GUI into the <samp>/Applications/R.app</samp> folder and the R
-framework into the <samp>/Library/Frameworks/R.framework</samp> folder.  This
-does leave some links in <samp>/usr/bin</samp>.
+framework into the <samp>/Library/Frameworks/R.framework</samp> folder.  The
+links to <samp>R</samp> and <samp>Rscript</samp> in <samp>/usr/local/bin</samp> should
+also be removed.
 </p>
 <p>If you want to get rid of R more completely using a Terminal, simply
-run (prepend <code>sudo</code> if needed):
+run:
 </p>
 <div class="example">
-<pre class="example">rm -rf /Library/Frameworks/R.framework /Applications/R.app \
-   /usr/bin/R /usr/bin/Rscript
+<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 consisted of three Apple packages:
-<code>org.r-project.R.x86_64.fw.pkg</code>,
-<code>org.r-project.R.x86_64.GUI.pkg</code> and
-<code>org.r-project.x86_64.tcltk.x11</code> (not all of which need be
-installed). You can use <code>pkgutil --unlink</code> (not supported by Lion
-or later) to remove their files or <code>pkgutil --forget</code> if you want
-the Apple Installer to forget about the package without deleting its
-files (useful for the R framework when installing multiple R versions
-in parallel), or after you have deleted the files.
+<p>The installation consists of up to four Apple packages:<a name="DOCF18" href="#FOOT18"><sup>18</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
+<code>org.r-project.x86_64.texinfo</code>. You can use <code>pkgutil --forget</code>
+if you want the Apple Installer to forget about the package without
+deleting its files (useful for the R framework when installing
+multiple R versions in parallel), or after you have deleted the
+files.
 </p>
-<p>Uninstalling the Tcl/Tk component (which is installed under
-<samp>/usr/local</samp>) is not simple.  You can list the files it installed
+<p>Uninstalling the Tcl/Tk or Texinfo components (which are installed under
+<samp>/usr/local</samp>) is not as simple.  You can list the files they installed
 in a Terminal by
 </p>
 <div class="example">
 <pre class="example">pkgutil --files org.r-project.x86_64.tcltk.x11
+pkgutil --files org.r-project.x86_64.texinfo
 </pre></div>
 
 <p>These are paths relative to <samp>/</samp>, the root of the file system.
 </p>
+
+
 <hr>
 <a name="Multiple-versions"></a>
 <a name="Multiple-versions-1"></a>
 <h3 class="section">4.3 Multiple versions</h3>
 
-<p>The installer will remove any previous version 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
-<samp>/Library/Frameworks/R.framework/Versions</samp> as <samp>3.0</samp>,
-<samp>3.1</samp> and so on, so it is not possible to have different
+<p>The installer will remove any previous version<a name="DOCF19" href="#FOOT19"><sup>19</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
+<samp>/Library/Frameworks/R.framework/Versions</samp> as <samp>3.3</samp>,
+<samp>3.4</samp> and so on, so it is not possible to have different
 ‘<samp>3.x.y</samp>’ versions installed for the same ‘<samp>x</samp>’.
 </p>
 <p>A version of R can be run directly from the command-line as e.g.
 </p><div class="example">
-<pre class="example">/Library/Frameworks/R.framework/Versions/3.1/Resources/bin/R
+<pre class="example">/Library/Frameworks/R.framework/Versions/3.4/Resources/bin/R
 </pre></div>
 
 <p>However, <small>R.APP</small> will always run the ‘current’ version, that is the last
 installed version.  A small utility, <code>Rswitch.app</code> (available at
-<a href="http://r.research.att.com/#other">http://r.research.att.com/#other</a>), can be used to change the
-‘current’ version.  However, this is of limited use as <small>R.APP</small> is
-compiled against a particular version of R and will likely crash if
-switched to an earlier version.  This may allow you to install a
-development version of R (de-selecting <small>R.APP</small>) and then switch back
-to the release version.
+<a href="https://r.research.att.com/#other">https://r.research.att.com/#other</a>), can be used to change the
+‘current’ version.  This is of limited use as <small>R.APP</small> is compiled
+against a particular version of R and will likely crash if switched
+to an earlier version.  This may allow you to install a development
+version of R (de-selecting <small>R.APP</small>) and then switch back to the
+release version.
 </p>
 
 <hr>
@@ -1965,8 +2127,8 @@ in <a href="http://cran.r-project.org/doc/manuals/R-intro.html#Invoking-R">Invok
 </p>
 <p>You should ensure that the shell has set adequate resource limits: R
 expects a stack size of at least 8MB and to be able to open at least 256
-file descriptors.  (Any modern OS will have default limits at least as
-large as these, but apparently NetBSD does not.  Use the shell command
+file descriptors.  (Any modern OS should have default limits at least as
+large as these, but apparently NetBSD may not.  Use the shell command
 <code>ulimit</code> (<code>sh</code>/<code>bash</code>) or <code>limit</code>
 (<code>csh</code>/<code>tcsh</code>) to check.)
 </p>
@@ -2060,7 +2222,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 ‘<samp>.Library</samp>’ containing the standard and
-recommended<a name="DOCF13" href="#FOOT13"><sup>13</sup></a>  packages.
+recommended<a name="DOCF20" href="#FOOT20"><sup>20</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 ‘<samp>.libPaths()</samp>’ can be used to
 add paths to the collection of libraries or to report the current
@@ -2071,7 +2233,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="DOCF14" href="#FOOT14"><sup>14</sup></a> ‘<samp>.Library.site</samp>’ in
+setting<a name="DOCF21" href="#FOOT21"><sup>21</sup></a> ‘<samp>.Library.site</samp>’ in
 <samp><var>R_HOME</var>/etc/Rprofile.site</samp>, or (not recommended) by setting
 the
 <a name="index-R_005fLIBS_005fSITE"></a>
@@ -2118,7 +2280,7 @@ absolute path to a valid temporary directory, not containing spaces.
 <p>For most users it suffices to call
 ‘<samp>install.packages(<var>pkgname</var>)</samp>’ or its GUI equivalent if the
 intention is to install a <acronym>CRAN</acronym> package and internet access is
-available.<a name="DOCF15" href="#FOOT15"><sup>15</sup></a>  On most systems ‘<samp>install.packages()</samp>’
+available.<a name="DOCF22" href="#FOOT22"><sup>22</sup></a>  On most systems ‘<samp>install.packages()</samp>’
 will allow packages to be selected from a list box (typically with
 several thousand items).
 </p>
@@ -2166,7 +2328,7 @@ name given is a single <samp>.tar.gz</samp> file.
 </p>
 <p><code>install.packages</code> can look in several repositories, specified as a
 character vector by the argument <code>repos</code>: these can include a
-<acronym>CRAN</acronym> mirror, Bioconductor, Omegahat, R-forge, rforge.net,
+<acronym>CRAN</acronym> mirror, Bioconductor, R-forge, rforge.net,
 local archives, local files, …).  Function
 <code>setRepositories()</code> can select amongst those repositories that the
 R installation is aware of.
@@ -2180,14 +2342,17 @@ have to use <code>library</code> to make its functionality available.
 <h4 class="subsection">6.3.1 Windows</h4>
 
 <p>What <code>install.packages</code> does by default is different on Unix-alikes
-(except OS X) and Windows.  On Unix-alikes it consults the list of
+(except macOS) and Windows.  On Unix-alikes it consults the list of
 available <em>source</em> packages on <acronym>CRAN</acronym> (or other
 repository/ies), downloads the latest version of the package sources,
 and installs them (via <code>R CMD INSTALL</code>).  On Windows it looks (by
-default) at the list of <em>binary</em> versions of packages available for
-your version of R and downloads the latest versions (if any),
-although optionally it will also download and install a source package
-by setting the <code>type</code> argument.
+default) first at the list of <em>binary</em> versions of packages
+available for your version of R and downloads the latest versions (if
+any).  If no binary version is available or the source version is newer,
+it will install the source versions of packages without compiled
+C/C++/Fortran code, and offer to do so for those with, if <code>make</code>
+is available (and this can be tuned by option
+<code>"install.packages.compile.from.source"</code>).
 </p>
 <p>On Windows <code>install.packages</code> can also install a binary package
 from a local <samp>zip</samp> file (or the URL of such a file) by setting
@@ -2200,28 +2365,31 @@ containing either or both architectures (32- and 64-bit).
 </p>
 <p>A few of the binary packages need other software to be installed on your
 system: see for example
-<a href="http://CRAN.R-project.org/bin/windows/contrib/3.1/@ReadMe">http://CRAN.R-project.org/bin/windows/contrib/3.1/@ReadMe</a>.
-For 64-bit builds, packages using Gtk+ (<a href="http://CRAN.R-project.org/package=Cairo"><strong>Cairo</strong></a>,
-<a href="http://CRAN.R-project.org/package=RGtk2"><strong>RGtk2</strong></a>, <a href="http://CRAN.R-project.org/package=cairoDevice"><strong>cairoDevice</strong></a> and those that depend on them)
-need the <samp>bin</samp> directory of a bundled distribution from
-<a href="http://www.gtk.org/download/win32.php">http://www.gtk.org/download/win32.php</a> or
-<a href="http://www.gtk.org/download/win64.php">http://www.gtk.org/download/win64.php</a> in the path: it should
-work to have both 32- and 64-bit Gtk+ <samp>bin</samp> directories in the path
-on a 64-bit version of R.
-</p>
-<p><code>R CMD INSTALL</code> works in Windows to install source packages.  No
-additional tools are needed if the package does not contain compiled
-code, and <code>install.packages(type="source")</code> will work for such
-packages (and for those with compiled code if the tools (see <a href="#The-Windows-toolset">The Windows toolset</a>) are in the path).  We have seen occasional permission
-problems after unpacking source packages on some Windows 7 and Server
-2008 systems: these have been circumvented by setting the environment
-variable <code>R_INSTALL_TAR</code> to ‘<samp>tar.exe</samp>’.
+<a href="https://CRAN.R-project.org/bin/windows/contrib/3.2/@ReadMe">https://CRAN.R-project.org/bin/windows/contrib/3.2/@ReadMe</a>.
+Packages using Gtk+ (<a href="https://CRAN.R-project.org/package=Cairo"><strong>Cairo</strong></a>, <a href="https://CRAN.R-project.org/package=RGtk2"><strong>RGtk2</strong></a>,
+<a href="https://CRAN.R-project.org/package=cairoDevice"><strong>cairoDevice</strong></a> and those that depend on them) need the <samp>bin</samp>
+directory of a bundled distribution of Gtk2 from
+<a href="http://ftp.gnome.org/pub/gnome/binaries/win32/gtk+">http://ftp.gnome.org/pub/gnome/binaries/win32/gtk+</a> or
+<a href="http://ftp.gnome.org/pub/gnome/binaries/win64/gtk+">http://ftp.gnome.org/pub/gnome/binaries/win64/gtk+</a> in
+the path: it should work to have both 32- and 64-bit Gtk+ <samp>bin</samp>
+directories in the path on a 64-bit version of R.
+</p>
+<p><code>R CMD INSTALL</code> works in Windows to install source packages.
+No additional tools are needed if the package does not contain
+compiled code, and <code>install.packages(type="source")</code> will work
+for such packages (and for those with compiled code if the tools (see
+<a href="#The-Windows-toolset">The Windows toolset</a>) are on the path, and the variables
+<code>BINPREF</code> and <code>BINPREF64</code> are set properly; see the
+discussion below).  We have seen occasional permission problems after
+unpacking source packages on some systems: these have been
+circumvented by setting the environment variable <code>R_INSTALL_TAR</code>
+to ‘<samp>tar.exe</samp>’.
 <a name="index-R_005fINSTALL_005fTAR"></a>
 </p>
 <p>If you have only a source package that is known to work with current
 R and just want a binary Windows build of it, you could make use of
 the building service offered at
-<a href="http://win-builder.r-project.org/">http://win-builder.r-project.org/</a>.
+<a href="https://win-builder.r-project.org/">https://win-builder.r-project.org/</a>.
 </p>
 <p>For almost all packages <code>R CMD INSTALL</code> will attempt to install
 both 32- and 64-bit builds of a package if run from a 32/64-bit install
@@ -2230,7 +2398,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="DOCF16" href="#FOOT16"><sup>16</sup></a> option
+appropriate to both architectures use<a name="DOCF23" href="#FOOT23"><sup>23</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
@@ -2243,99 +2411,137 @@ sources on Windows without any additional tools.
 </p>
 
 <a name="index-LOCAL_005fSOFT"></a>
-<p>There is provision to make use of a system-wide library of installed
-external software by setting the <code>make</code> variable
-<code>LOCAL_SOFT</code>, to give an equivalent of <samp>/usr/local</samp> on a
-Unix-alike.  This can be set in <samp>src/gnuwin/MkRules.local</samp> when
-R is built from sources (see the comments in
-<samp>src/gnuwin/MkRules.dist</samp>), or in file<a name="DOCF17" href="#FOOT17"><sup>17</sup></a>  <samp>etc/i386/Makeconf</samp> or <samp>etc/x64/Makeconf</samp> for an
-installed version of R.  The version used by <acronym>CRAN</acronym> can be
-downloaded from <a href="http://www.stats.ox.ac.uk/pub/Rtools/libs.html">http://www.stats.ox.ac.uk/pub/Rtools/libs.html</a>.
+<a name="index-BINPREF"></a>
+<a name="index-BINPREF64"></a>
+<p>Packages with compiled code may need to have paths to the compilers
+set explicitly, and there is provision to make use of a system-wide
+library of installed external software. The compiler paths are set
+using the <code>make</code> variables <code>BINPREF</code> and (usually)
+<code>BINPREF64</code>.  The library location is set using <code>make</code>
+variable <code>LOCAL_SOFT</code>, to give an equivalent of <samp>/usr/local</samp>
+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>
+<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
+<acronym>CRAN</acronym> can be installed as described in <a href="#Building-from-source">Building from source</a>.
 </p>
+
 <hr>
-<a name="OS-X-packages"></a>
-<a name="OS-X-1"></a>
-<h4 class="subsection">6.3.2 OS X</h4>
-
-<p>On OS X <code>install.packages</code> works as it does on other Unix-alike
-systems, but there is an additional type <code>mac.binary</code> (the default
-in the <acronym>CRAN</acronym> distribution but not when compiling from source:
-<code>mac.binary.mavericks</code> for a Mavericks build) which can be
-passed to <code>install.packages</code> in order to download and install
-binary packages from a suitable repository.  These OS X binary package
-files have the extension ‘<samp>.tgz</samp>’.  The <small>R.APP</small> GUI provides menus
-for installation of either binary or source packages, from
-<acronym>CRAN</acronym> or local files.
+<a name="macOS-packages"></a>
+<a name="macOS-1"></a>
+<h4 class="subsection">6.3.2 macOS</h4>
+
+<p>On macOS (formerly OS X) <code>install.packages</code> works as it does on
+other Unix-alike systems, but there are additional types starting with
+<code>mac.binary</code> (available for the <acronym>CRAN</acronym> distribution but not
+when compiling from source: <code>mac.binary.el-capitan</code> for a ‘El
+Capitan and later build with <code>"default"</code> a synonym for the
+appropriate variant) which can be passed to <code>install.packages</code> in
+order to download and install binary packages from a suitable
+repository.  These binary package files for macOS have the extension
+‘<samp>.tgz</samp>’.  The <small>R.APP</small> GUI provides menus for installation of either
+binary or source packages, from <acronym>CRAN</acronym> or local files.
+</p>
+<p>On R builds using binary packages, the default is type <code>both</code>:
+this looks first at the list of binary packages available for your
+version of R and installs the latest versions (if any).  If no binary
+version is available or the source version is newer, it will install the
+source versions of packages without compiled C/C++/Fortran code and offer
+to do so for those with, if <code>make</code> is available.
 </p>
 <p>Note that most binary packages including compiled code are tied to a
-particular series (e.g. R 3.0.x or 3.1.x) of R.
-</p>
-<p>You should not attempt to mix-and-match binary packages built for the
-‘Snow Leopard’ and ‘Mavericks’ <acronym>CRAN</acronym> distributions: doing so is
-likely to lead to crashes or failures to load.
+particular series (e.g. R 3.4.x or 3.3.x) of R.
 </p>
 <p>Installing source packages which do not contain compiled code should
 work with no additional tools. For others you will need the
-‘Command-line Tools’ for <code>Xcode</code> and compilers which match those
-used to build R: see <a href="#OS-X">OS X</a>.  (Note that the Fortran compilers
-differ for the ‘Snow Leopard’ and ‘Mavericks’ binary installations of
-R.)
+‘Command Line Tools’ for <code>Xcode</code> and compilers which match those
+used to build R: see <a href="#macOS">macOS</a>.
 </p>
-<p>Package <a href="http://CRAN.R-project.org/package=rJava"><strong>rJava</strong></a> and those which depend on it need a Java runtime
+<p>Package <a href="https://CRAN.R-project.org/package=rJava"><strong>rJava</strong></a> and those which depend on it need a Java runtime
 installed and several packages need X11 installed, including those using
-Tk.  For Mountain Lion and later see <a href="#OS-X">OS X</a> and <a href="#Java-_0028OS-X_0029">Java (OS X)</a>.
+Tk.  See <a href="#macOS">macOS</a> and <a href="#Java-_0028macOS_0029">Java (macOS)</a>.
 </p>
 <p>Tcl/Tk extensions <code>BWidget</code> and <code>Tktable</code> are part of the
 Tcl/Tk contained in the R installer.  These are required by a number
 of <acronym>CRAN</acronym> and Bioconductor packages.
 </p>
 <p>A few of the binary packages need other software to be installed on your
-system.  In particular packages using Gtk+ (<a href="http://CRAN.R-project.org/package=RGtk2"><strong>RGtk2</strong></a>,
-<a href="http://CRAN.R-project.org/package=cairoDevice"><strong>cairoDevice</strong></a> and those that depend on them) need the GTK
-framework installed from <a href="http://r.research.att.com/libs/">http://r.research.att.com/libs/</a>: the
+system.  In particular packages using Gtk+ (<a href="https://CRAN.R-project.org/package=RGtk2"><strong>RGtk2</strong></a>,
+<a href="https://CRAN.R-project.org/package=cairoDevice"><strong>cairoDevice</strong></a> and those that depend on them) need the GTK
+framework installed from <a href="https://r.research.att.com/libs/">https://r.research.att.com/libs/</a>: the
 appropriate version at the time of writing was
-<a href="http://r.research.att.com/libs/GTK_2.24.17-X11.pkg">http://r.research.att.com/libs/GTK_2.24.17-X11.pkg</a>
-</p>
-<p>The default compilers specified in
-<samp>/Library/Frameworks/R.framework/Resources/etc/Makeconf</samp> depend on
-the version of OS X under which R was installed, and are appropriate
-to the latest version of the Xcode command-line tools for that version
-of OS X.  The settings can be changed, either by editing that file or in
-a file such as <samp>~/.R/Makevars</samp> (see the next section).  Entries
-which may need to be changed include ‘<samp>CC</samp>’, ‘<samp>CXX</samp>’, ‘<samp>FC</samp>’,
-‘<samp>F77</samp>’, ‘<samp>FLIBS</samp>’ and the corresponding flags, and perhaps
-‘<samp>CXXCPP</samp>’, ‘<samp>DYLIB_LD</samp>’, ‘<samp>MAIN_LD</samp>’, ‘<samp>SHLIB_CXXLD</samp>’,
-‘<samp>SHLIB_FCLD</samp>’ and ‘<samp>SHLIB_LD</samp>’.
-</p>
-<p>So for example you could select <code>clang</code> for both C and C++ with
-extensive checking by having in <samp>~/.R/Makevars</samp>
+<a href="https://r.research.att.com/libs/GTK_2.24.17-X11.pkg">https://r.research.att.com/libs/GTK_2.24.17-X11.pkg</a>
+</p>
+<p>The default compilers specified are shown in file
+<samp>/Library/Frameworks/R.framework/Resources/etc/Makeconf</samp>.  At the
+time of writing these setting assumed that the C, Fortran and C++
+compilers were on the path, and <code>gfortan</code> 6.1.0 (see
+<a href="#macOS">macOS</a>).  The settings can be changed, either by editing that file
+or in a file such as <samp>~/.R/Makevars</samp> (see the next section).
+Entries which may need to be changed include ‘<samp>CC</samp>’, ‘<samp>CXX</samp>’,
+‘<samp>FC</samp>’, ‘<samp>F77</samp>’, ‘<samp>FLIBS</samp>’ and the corresponding flags, and
+perhaps ‘<samp>CXXCPP</samp>’, ‘<samp>DYLIB_LD</samp>’, ‘<samp>MAIN_LD</samp>’,
+‘<samp>SHLIB_CXXLD</samp>’, ‘<samp>SHLIB_FCLD</samp>’ and ‘<samp>SHLIB_LD</samp>’, as well as
+the ‘<samp>CXX11</samp>’, ‘<samp>CXX14</samp>’ and ‘<samp>CXX17</samp>’ variants
+</p>
+<p>So for example you could select a specific build of <code>clang</code> for
+both C and C++ with extensive checking by having in <samp>~/.R/Makevars</samp>
 </p><div class="example">
-<pre class="example">CC=clang
-CXX=clang++
-CFLAGS=-mtune=native -g -O2 -Wall -pedantic -Wconversion
-CXXFLAGS=-mtune=native -g -O2 -Wall -pedantic -Wconversion
-</pre></div>
-
-<p>and for a version of <code>gfortran-4.2</code> we needed
+<pre class="example">CC = /usr/local/clang4/bin/clang
+CXX = /usr/local/clang4/bin/clang++
+CFLAGS = -g -O2 -Wall -pedantic -Wconversion -Wno-sign-conversion
+CXXFLAGS = -g -O2 -Wall -pedantic -Wconversion -Wno-sign-conversion
+CXX11 = $CXX
+CXX14 = $CXX
+CXX17 = $CXX
+CXX1X = $CXX
+</pre></div>
+<p>and the Sierra build of <code>gfortran</code> by
 </p><div class="example">
-<pre class="example">FLIBS=-lgfortran
+<pre class="example">F77 = /usr/local/gfortran/bin/gfortran
+FC = $F77
+FLIBS = -L/usr/local/gfortran/lib/gcc/x86_64-apple-darwin16/6.3.0 
+  -L/usr/local/gfortran/lib -lgfortran -lquadmath -lm
 </pre></div>
-
-
+<p>(line split for legibility here).
+</p>
+<p>If using the C/C++ compilers from the Command Line Tools (which does not
+have OpenMP support) one will need to include
+</p><div class="example">
+<pre class="example">SHLIB_OPENMP_CFLAGS =
+SHLIB_OPENMP_CXXFLAGS =
+</pre></div>
+<p>to compile OpenMP-using packages.
+</p>
+<p>Apple includes many Open Source libraries in macOS but increasingly
+without the corresponding headers (not even in Xcode nor the Command
+Line Tools): they are often rather old versions.  If installing packages
+from source using them it is usually easiest to install a
+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’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>
+<a href="https://opensource.apple.com">https://opensource.apple.com</a>.
+</p>
 <hr>
 <a name="Customizing-package-compilation"></a>
 <a name="Customizing-package-compilation-1"></a>
 <h4 class="subsection">6.3.3 Customizing package compilation</h4>
 
-<p>The R system and package-specific compilation flags can be overridden or
-added to by setting the appropriate Make variables in the personal file
-<samp><var>HOME</var>/.R/Makevars-<var>R_PLATFORM</var></samp> (but
+<p>The R system and package-specific compilation flags can be overridden
+or added to by setting the appropriate Make variables in the personal
+file <samp><var>HOME</var>/.R/Makevars-<var>R_PLATFORM</var></samp> (but
 <samp><var>HOME</var>/.R/Makevars.win</samp> or <samp><var>HOME</var>/.R/Makevars.win64</samp>
 on Windows), or if that does not exist, <samp><var>HOME</var>/.R/Makevars</samp>,
 where ‘<samp>R_PLATFORM</samp>’ is the platform for which R was built, as
 available in the <code>platform</code> component of the R variable
-<code>R.version</code>.  An alternative personal file can be specified
-<em>via</em> the environment variable <code>R_MAKEVARS_USER</code>.
+<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
+<code>R_MAKEVARS_USER</code>.
 </p>
 <p>Package developers are encouraged to use this mechanism to enable a
 reasonable amount of diagnostic messaging (“warnings”) when compiling,
@@ -2356,12 +2562,28 @@ FFLAGS=-g -O -mtune=native
 FCFLAGS=-g -O -mtune=native
 </pre></div>
 
+<p>Another use is to override the settings in a binary installation of R.
+For example, to use a different Fortran compiler on macOS
+</p>
+<div class="example">
+<pre class="example">F77 = /usr/local/gfortran/bin/gfortran
+FC = $F77
+FLIBS = -L/usr/local/gfortran/lib/gcc/x86_64-apple-darwin16/6.3.0 
+  -L/usr/local/gfortran/lib -lgfortran -lquadmath -lm
+</pre></div>
+
+<p>(line split for legibility here).
+</p>
 <p>There is also provision for a site-wide <samp>Makevars.site</samp> file under
 <samp><var>R_HOME</var>/etc</samp> (in a sub-architecture-specific directory if
-appropriate).  This is read immediately after <samp>Makeconf</samp>, and an
-alternative file can be specified by environment variable
+appropriate).  This is read immediately after <samp>Makeconf</samp>, and the
+path to an alternative file can be specified by environment variable
 <code>R_MAKEVARS_SITE</code>.
 </p>
+<p>Note that these mechanisms do not work with packages which fail to pass
+settings down to sub-makes, perhaps reading <samp>etc/Makeconf</samp> in
+makefiles in subdirectories.  Fortunately such packages are unusual.
+</p>
 <hr>
 <a name="Multiple-sub_002darchitectures"></a>
 <a name="Multiple-sub_002darchitectures-1"></a>
@@ -2412,12 +2634,11 @@ with a source tarball.
 
 <p>The base and recommended packages are byte-compiled by default.  Other
 packages can be byte-compiled on installation by using <code>R CMD
-INSTALL</code>with option <samp>--byte-compile</samp> or by
+INSTALL</code> with option <samp>--byte-compile</samp> or by
 <code>install.packages(type = "source", INSTALL_opts =
 "--byte-compile")</code>.
 </p>
-<p>Not all contributed packages work correctly when byte-compiled (for
-example because they interfere with the sealing of namespaces).  For
+<p>Not all contributed packages work correctly when byte-compiled.  For
 most packages (especially those which make extensive use of compiled
 code) the speed-up is small.  Unless a package is used frequently the
 time spent in byte-compilation can outweigh the time saved in execution:
@@ -2428,6 +2649,65 @@ package.
 ‘<samp>ByteCompile</samp>’ field in the <samp>DESCRIPTION</samp> file.
 </p>
 <hr>
+<a name="External-software"></a>
+<a name="External-software-1"></a>
+<h4 class="subsection">6.3.6 External software</h4>
+
+<p>Some R packages contain compiled code which links to external
+software libraries.  Unless the external library is statically linked
+(which is done as much as possible for binary packages on Windows and OS
+X), the libraries have to be found when the package is loaded and not
+just when it is installed.  How this should be done depends on the OS
+(and in some cases the version).
+</p>
+<p>For Unix-alikes except macOS the primary mechanism is the <code>ld.so</code>
+cache controlled by <code>ldconfig</code>: external dynamic libraries
+recorded in that cache will be found.  Standard library locations will
+be covered by the cache, and well-designed software will add its
+locations (as for example <strong>openmpi</strong> does on Fedora).  The secondary
+mechanism is to consult the environment variable <code>LD_LIBRARY_PATH</code>.
+Now the R script controls that variable, and sets it to the
+concatenation of <code>R_LD_LIBRARY_PATH</code>, <code>R_JAVA_LD_LIBRARY_PATH</code>
+and the environment value of <code>LD_LIBRARY_PATH</code>.  The first two have
+defaults which are normally set when R is installed (but can be
+overridden in the environment) so <code>LD_LIBRARY_PATH</code> is the best
+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> —
+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
+resolved is described in <code>man dyld</code>: the role of
+<code>LD_LIBRARY_PATH</code> is replaced on macOS by <code>DYLD_LIBRARY_PATH</code> and
+latterly <code>DYLD_FALLBACK_LIBRARY_PATH</code>.  Running <code>R CMD otool
+-L</code> on the package shared object will show where (if anywhere) its
+dependencies are resolved. <code>DYLD_FALLBACK_LIBRARY_PATH</code> is preferred
+(and it is that which is manipulated by the R script), but as from
+10.11 (‘El Capitan’) the default behaviour had been changed for security
+reasons to discard these environment variables when invoking a shell
+script (and <samp>R</samp> is a shell script).  That makes the only portable
+option to set <code>R_LD_LIBRARY_PATH</code> in the environment, something like
+</p>
+<div class="example">
+<pre class="example">export R_LD_LIBRARY_PATH="`R RHOME`/lib:/opt/local/lib"
+</pre></div>
+
+<p>The precise rules for where Windows looks for DLLs are complex and
+depend on the version of Windows.  But for present purposes the main
+solution is to put the directories containing the DLLs the package
+links to (and any those DLLs link to) on the <code>PATH</code>.  64-bit
+versions of Windows will ignore 32-bit DLLs from 64-bit R and
+<em>vice versa</em>.
+</p>
+<p>The danger with any of the methods which involve setting environment
+variables is of inadvertently masking a system library.  This is less
+for <code>DYLD_FALLBACK_LIBRARY_PATH</code> and for <em>appending</em> to
+<code>PATH</code> on Windows (as it should already contain the system library
+paths).
+</p>
+<hr>
 <a name="Updating-packages"></a>
 <a name="Updating-packages-1"></a>
 <h3 class="section">6.4 Updating packages</h3>
@@ -2484,8 +2764,7 @@ can be removed by
                   lib = file.path("path", "to", "library"))
 </pre></div>
 
-<p>Finally, in most installations one can just remove the package directory
-from the library.
+<p>Finally, one can just remove the package directory from the library.
 </p>
 
 <hr>
@@ -2497,11 +2776,11 @@ from the library.
 <p>Utilities such as <code>install.packages</code> can be pointed at any
 <acronym>CRAN</acronym>-style repository, and R users may want to set up their
 own.  The ‘base’ of a repository is a URL such as
-<a href="http://www.omegahat.org/R/">http://www.omegahat.org/R/</a>: this must be an URL scheme that
-<code>download.packages</code> supports (which also includes ‘<samp>ftp://</samp>’ and
-‘<samp>file://</samp>’, but not on most systems ‘<samp>https://</samp>’).  Under that
-base URL there should be directory trees for one or more of the
-following types of package distributions:
+<a href="http://www.stats.ox.ac.uk/pub/RWin">http://www.stats.ox.ac.uk/pub/RWin</a>: this must be an URL scheme
+that <code>download.packages</code> supports (which also includes
+‘<samp>https://</samp>’, ‘<samp>ftp://</samp>’ and ‘<samp>file://</samp>’).  Under that base URL
+there should be directory trees for one or more of the following types
+of package distributions:
 </p>
 <ul>
 <li> <code>"source"</code>: located at <samp>src/contrib</samp> and containing
@@ -2514,18 +2793,10 @@ wise to have a <samp>src/contrib</samp> area with a possibly empty
 </li><li> <code>"win.binary"</code>: located at <samp>bin/windows/contrib/<var>x.y</var></samp> for
 R versions <var>x.y.z</var> and containing <samp>.zip</samp> files for Windows.
 
-</li><li> <code>"mac.binary"</code>: located at
-<samp>bin/macosx/contrib/<var>3.y</var></samp> for R versions
-<var>3.y.z</var> and containing <samp>.tgz</samp> files.
-
-</li><li> <code>"mac.binary.mavericks"</code>: located at
-<samp>bin/macosx/mavericks/contrib/<var>3.y</var></samp> for R versions
-<var>3.1.z</var> to be run under OS X 10.9 (Mavericks) and later, containing
+</li><li> <code>"mac.binary.el-capitan"</code>: located at
+<samp>bin/macosx/el-capitan/contrib/<var>3.y</var></samp> for the CRAN builds for
+‘El Capitan (and later) for R versions <var>3.y.z</var>, containing
 <samp>.tgz</samp> files.
-
-</li><li> <code>"mac.binary.leopard"</code>: located at
-<samp>bin/macosx/leopard/contrib/<var>2.y</var></samp> for R versions
-<var>2.y.z</var> and containing <samp>.tgz</samp> files.
 </li></ul>
 
 <p>Each terminal directory must also contain a <samp>PACKAGES</samp> file.  This
@@ -2533,12 +2804,12 @@ can be a concatenation of the <samp>DESCRIPTION</samp> files of the packages
 separated by blank lines, but only a few of the fields are needed.  The
 simplest way to set up such a file is to use function
 <code>write_PACKAGES</code> in the <strong>tools</strong> package, and its help explains
-which fields are needed.  Optionally there can also be a
-<samp>PACKAGES.gz</samp> file, a <code>gzip</code>-compressed version of
-<samp>PACKAGES</samp>—as this will be downloaded in preference to
-<samp>PACKAGES</samp> it should be included for large repositories.  (If you
-have a mis-configured server that does not report correctly non-existent
-files you may need <samp>PACKAGES.gz</samp>.)
+which fields are needed.  Optionally there can also be
+<samp>PACKAGES.rds</samp> and <samp>PACKAGES.gz</samp> files, downloaded in
+preference to <samp>PACKAGES</samp>.  (These files will be smaller:
+<samp>PACKAGES.rds</samp> is used only from R 3.4.0.  If you have a
+mis-configured server that does not report correctly non-existent files
+you may need these files.)
 </p>
 <p>To add your repository to the list offered by <code>setRepositories()</code>,
 see the help file for that function.
@@ -2622,7 +2893,6 @@ find external software, notably for Gtk+).
 for many human languages, and <em>localization</em> to adapting to a
 specific country and language.
 </p>
-
 <p>Current builds of R support all the character sets that the
 underlying OS can handle.  These are interpreted according to the
 <a name="index-Locale"></a>
@@ -2655,11 +2925,11 @@ locale needs to specify
 </p><ul>
 <li> A human language.  These are generally specified by a lower-case
 two-character abbreviation following ISO 639 (see e.g.
-<a href="http://en.wikipedia.org/wiki/ISO_639-1">http://en.wikipedia.org/wiki/ISO_639-1</a>).
+<a href="https://en.wikipedia.org/wiki/ISO_639-1">https://en.wikipedia.org/wiki/ISO_639-1</a>).
 
 </li><li> A ‘territory’, used mainly to specify the currency. These are generally
 specified by an upper-case two-character abbreviation following ISO 3166
-(see e.g. <a href="http://en.wikipedia.org/wiki/ISO_3166">http://en.wikipedia.org/wiki/ISO_3166</a>).
+(see e.g. <a href="https://en.wikipedia.org/wiki/ISO_3166">https://en.wikipedia.org/wiki/ISO_3166</a>).
 
 </li><li> A charset encoding, which determines both how a byte stream should be
 divided into characters, and which characters the subsequences of bytes
@@ -2685,7 +2955,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="DOCF18" href="#FOOT18"><sup>18</sup></a> locale specifications which have the form
+<p>Modern Linux uses the XPG<a name="DOCF28" href="#FOOT28"><sup>28</sup></a> locale specifications which have the form
 ‘<samp>en_GB</samp>’, ‘<samp>en_GB.UTF-8</samp>’, ‘<samp>aa_ER.UTF-8 at saaho</samp>’,
 ‘<samp>de_AT.iso885915 at euro</samp>’, the components being in the order listed
 above.  (See <code>man locale</code> and <code>locale -a</code> for more
@@ -2704,7 +2974,7 @@ compatibility.
 <p>Windows also uses locales, but specified in a rather less concise way.
 Most users will encounter locales only via drop-down menus, but more
 information and lists can be found at
-<a href="http://msdn.microsoft.com/en-us/library/hzz3tw78(v=vs.80)">http://msdn.microsoft.com/en-us/library/hzz3tw78(v=vs.80)</a>
+<a href="https://msdn.microsoft.com/en-us/library/hzz3tw78(v=vs.80)">https://msdn.microsoft.com/en-us/library/hzz3tw78(v=vs.80)</a>
 (or if Microsoft moves it yet again, search for ‘<samp>Windows language
 country strings</samp>’).
 </p>
@@ -2715,13 +2985,13 @@ country strings</samp>’).
 in most of the Chinese-speaking world.
 </p>
 <hr>
-<a name="Locales-under-OS-X"></a>
-<a name="Locales-under-OS-X-1"></a>
-<h4 class="subsection">7.1.3 Locales under OS X</h4>
+<a name="Locales-under-macOS"></a>
+<a name="Locales-under-macOS-1"></a>
+<h4 class="subsection">7.1.3 Locales under macOS</h4>
 
-<p>OS X supports locales in its own particular way, but the R GUI tries to
+<p>macOS supports locales in its own particular way, but the R GUI tries to
 make this easier for users. See
-<a href="http://developer.apple.com/documentation/MacOSX/Conceptual/BPInternational/">http://developer.apple.com/documentation/MacOSX/Conceptual/BPInternational/</a>
+<a href="https://developer.apple.com/documentation/MacOSX/Conceptual/BPInternational/">https://developer.apple.com/documentation/MacOSX/Conceptual/BPInternational/</a>
 for how users can set their locales.  As with Windows, end users will
 generally only see lists of languages/territories.  Users of R in a
 terminal may need to set the locale to something like ‘<samp>en_GB.UTF-8</samp>’
@@ -2730,7 +3000,7 @@ remotely and for batch jobs: note whether <code>Terminal</code> sets the
 <code>LANG</code> environment variable is an (advanced) preference, but does so
 by default).
 </p>
-<p>Internally OS X uses a form similar to Linux: the main difference from
+<p>Internally macOS uses a form similar to Linux: the main difference from
 other Unix-alikes is that where a character set is not specified it is
 assumed to be <code>UTF-8</code>.
 </p>
@@ -2746,7 +3016,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="DOCF19" href="#FOOT19"><sup>19</sup></a>
+<code>LANGUAGE</code> and then<a name="DOCF29" href="#FOOT29"><sup>29</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
@@ -2760,7 +3030,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("LC_MESSAGES",
 "new_locale")</code>, or by setting an environment variable such as
-<code>LANGUAGE</code>, <em>provided</em><a name="DOCF20" href="#FOOT20"><sup>20</sup></a> the language you are changing to can be output in
+<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
 the current character set.  But this is OS-specific, and has been known
 to stop working on an OS upgrade.
 </p>
@@ -2799,7 +3069,7 @@ to a generic German one (‘<samp>de</samp>’) 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 ‘<samp>en_GB</samp>’ that translate the Americanisms
-(e.g., ‘<samp>gray</samp>’) in the standard messages into English.<a name="DOCF21" href="#FOOT21"><sup>21</sup></a>  Two other examples: there are catalogues
+(e.g., ‘<samp>gray</samp>’) in the standard messages into English.<a name="DOCF31" href="#FOOT31"><sup>31</sup></a>  Two other examples: there are catalogues
 for ‘<samp>es</samp>’, which is Spanish as written in Spain and these will by
 default also be used in Spanish-speaking Latin American countries, and
 also for ‘<samp>pt_BR</samp>’, which are used for Brazilian locales but not for
@@ -2815,9 +3085,9 @@ 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, ‘English’<a name="DOCF22" href="#FOOT22"><sup>22</sup></a> is used.
+not translated in any suitable catalogue, ‘English’<a name="DOCF32" href="#FOOT32"><sup>32</sup></a> is used.
 </p>
-<p>See <a href="http://developer.r-project.org/Translations.html">http://developer.r-project.org/Translations.html</a> for how to
+<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.
 </p>
 <hr>
@@ -2829,12 +3099,12 @@ prepare and install translation catalogues.
 instructions.  Most OSes running on such <acronym>CPU</acronym>s offer the choice
 of building a 32-bit or a 64-bit version of R (and details are given
 below under specific OSes).  For most a 32-bit version is the default,
-but for some (e.g., ‘<samp>x86_64</samp>’ Linux and OS X >= 10.6)
+but for some (e.g., ‘<samp>x86_64</samp>’ Linux and macOS >= 10.6)
 64-bit is.
 </p>
 <p>All current versions of R use 32-bit integers and
-<acronym>ISO</acronym>/<acronym>IEC</acronym> 60559<a name="DOCF23" href="#FOOT23"><sup>23</sup></a> double-precision reals, and so compute to
-the same precision<a name="DOCF24" href="#FOOT24"><sup>24</sup></a> and with the same limits on the sizes of
+<acronym>ISO</acronym>/<acronym>IEC</acronym> 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 sizes of
 numerical quantities.  The principal difference is in the size of the
 pointers.
 </p>
@@ -2851,13 +3121,13 @@ appreciable fraction of the address limit, fragmentation of the address
 space becomes an issue and there may be no hole available that is the
 size requested.  This can cause more frequent garbage collection or the
 inability to allocate large objects.  As a guide, this will become an
-issue with objects more than 10% of the size of the address space
-(around 300Mb) or when the total size of objects in use is around one
-third (around 1Gb).
+issue for 32-bit builds with objects more than 10% of the size of the
+address space (around 300Mb) or when the total size of objects in use is
+around one third (around 1Gb).
 </p>
 </li><li> Only 64-bit builds support ‘long vectors’, those with <em>2^{31}</em> or
-more elements (each of which needs at least 8GB of storage, 16GB for a
-numeric vector).
+more elements (which needs at least 16GB of storage for each numeric
+vector).
 
 </li><li> Most 32-bit OSes by default limit file sizes to 2GB (and this may also
 apply to 32-bit builds on 64-bit OSes).  This can often be worked
@@ -2875,9 +3145,9 @@ was 15-20%.)
 ‘<samp>x86_64</samp>’ <em>vs</em> ‘<samp>ix86</samp>’, the 64-bit CPU has features
 (such as SSE2 instructions) which are guaranteed to be present but are
 optional on the 32-bit CPU, and also has more general-purpose registers.
-This means that on chips like a desktop Intel Core 2 Duo the vanilla
-64-bit version of R has been around 10% faster on both Linux and OS
-X.  (Laptop CPUs are usually relatively slower in 64-bit mode.)
+This means that on chips like a desktop Intel i7 the vanilla 64-bit
+version of R has been around 10% faster on both Linux and macOS.
+(Laptop CPUs are usually relatively slower in 64-bit mode.)
 </li></ul>
 
 <p>So, for speed you may want to use a 32-bit build (especially on a
@@ -2887,7 +3157,7 @@ See <a href="#Sub_002darchitectures">Sub-architectures</a>.  (This is done for t
 distributions.)
 </p>
 <p>Even on 64-bit builds of R there are limits on the size of R
-objects (see <code>help("Memory-limits")</code>, some of which stem from the
+objects (see <code>help("Memory-limits")</code>), some of which stem from the
 use of 32-bit integers (especially in FORTRAN code).  For example, the
 dimensions of an array are limited to <em>2^{31} - 1</em>.
 </p>
@@ -2897,7 +3167,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="DOCF25" href="#FOOT25"><sup>25</sup></a> functions in R
+special<a name="DOCF35" href="#FOOT35"><sup>35</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
@@ -2909,7 +3179,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 ‘<samp>R_VERSION_STRING</samp>’, which is a character
-string containing the current R version, for example <code>"3.1.0"</code>.
+string containing the current R version, for example <code>"3.4.0"</code>.
 </p>
 <p>There is full access to R’s handling of <code>NaN</code>, <code>Inf</code> and
 <code>-Inf</code> via special versions of the macros and functions
@@ -2976,7 +3246,7 @@ instructions.
 </pre></div>
 
 <p>will make standalone libraries <samp>libRmath.a</samp> and <samp>libRmath.so</samp>
-(<samp>libRmath.dylib</samp> on OS X): ‘<samp>make static</samp>’ and ‘<samp>make
+(<samp>libRmath.dylib</samp> on macOS): ‘<samp>make static</samp>’ and ‘<samp>make
 shared</samp>’ will create just one of them.
 </p>
 <p>To use the routines in your own C or C++ programs, include
@@ -2992,7 +3262,7 @@ test the process (via <code>make test</code>).  Note that you will probably
 not be able to run it unless you add the directory containing
 <a name="index-LD_005fLIBRARY_005fPATH"></a>
 <samp>libRmath.so</samp> to the <code>LD_LIBRARY_PATH</code> environment variable
-(<samp>libRmath.dylib</samp>, <code>DYLD_LIBRARY_PATH</code> on OS X).
+(<samp>libRmath.dylib</samp>, <code>DYLD_FALLBACK_LIBRARY_PATH</code> on macOS).
 </p>
 <p>The targets
 </p>
@@ -3025,7 +3295,7 @@ library.
 <a name="Windows-1"></a>
 <h3 class="section">9.2 Windows</h3>
 
-<p>You need to set up<a name="DOCF26" href="#FOOT26"><sup>26</sup></a> almost all the
+<p>You need to set up<a name="DOCF36" href="#FOOT36"><sup>36</sup></a> almost all the
 tools to make R and then run (in a Unix-like shell)
 </p>
 <div class="example">
@@ -3052,7 +3322,7 @@ make -f Makefile.win
 <pre class="example">make -f Makefile.win shared implib
 </pre></div>
 
-<p>To use the routines in your own C or C++ programs using MinGW, include
+<p>To use the routines in your own C or C++ programs using MinGW-w64, include
 </p>
 <div class="example">
 <pre class="example">#define MATHLIB_STANDALONE
@@ -3065,7 +3335,7 @@ order, so the result depends on which files are present.  You should be
 able to force static or dynamic linking  <em>via</em>
 </p>
 <div class="example">
-<pre class="example">-Wl,-Bstatic -lRmath -Wl,dynamic
+<pre class="example">-Wl,-Bstatic -lRmath -Wl,Bdynamic
 -Wl,-Bdynamic -lRmath
 </pre></div>
 
@@ -3075,7 +3345,7 @@ is dynamically linked, and <samp>test-static.exe</samp>, which is statically
 linked).
 </p>
 <p>It is possible to link to <samp>Rmath.dll</samp> using other compilers, either
-directly or via an import library: if you make a MinGW import library as
+directly or via an import library: if you make a MinGW-w64 import library as
 above, you will create a file <samp>Rmath.def</samp> which can be used
 (possibly after editing) to create an import library for other systems
 such as Visual C++.
@@ -3089,7 +3359,7 @@ such as Visual C++.
 </pre></div>
 
 <p>to ensure that the constants like <code>NA_REAL</code> are linked correctly.
-(Auto-import will probably work with MinGW, but it is better to be
+(Auto-import will probably work with MinGW-w64, but it is better to be
 sure. This is likely to also work with VC++, Borland and similar
 compilers.)
 </p>
@@ -3104,10 +3374,10 @@ Unix-like platforms, or which will be used by R if found by
 <code>configure</code>.
 </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
-development version.  The latter usually has the same name but with the
-extension ‘<samp>-devel</samp>’ or ‘<samp>-dev</samp>’: you need both versions
-installed.
+Debian/Ubuntu’s) make a distinction between the user version of a
+package and the development version.  The latter usually has the same
+name but with the extension ‘<samp>-devel</samp>’ or ‘<samp>-dev</samp>’: you need both
+versions installed.
 </p>
 
 <hr>
@@ -3116,50 +3386,78 @@ 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> 60059<a name="DOCF27" href="#FOOT27"><sup>27</sup></a>, POSIX 1003.1 and C99-compliant.<a name="DOCF28" href="#FOOT28"><sup>28</sup></a>  R tries to choose suitable flags for
-the C compilers it knows about, but you may have to set <code>CC</code> or
-<code>CFLAGS</code> suitably.  For recent versions of <code>gcc</code> with
-<code>glibc</code> this means including
-<samp>-std=gnu99</samp><a name="DOCF29" href="#FOOT29"><sup>29</sup></a>.  If the compiler is
-detected as <code>gcc</code>, <samp>-std=gnu99</samp> will be appended to
-<code>CC</code> unless it conflicts with a setting of <code>CFLAGS</code>.  (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>
-<p>Unless you do not want to view graphs on-screen (or use a Mac) you need
+<acronym>ISO</acronym>/<acronym>IEC</acronym> 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
+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
+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>
+<p>Unless you do not want to view graphs on-screen (or use macOS) you need
 ‘<samp>X11</samp>’ installed, including its headers and client libraries. For
-recent Fedora distributions it means (at least) RPMs ‘<samp>libX11</samp>’,
-‘<samp>libX11-devel</samp>’, ‘<samp>libXt</samp>’ and ‘<samp>libXt-devel</samp>’.  On Debian we
-recommend the meta-package ‘<samp>xorg-dev</samp>’.  If you really do not want
-these you will need to explicitly configure R without X11, using
-<samp>--with-x=no</samp>.
+recent Fedora/RedHat distributions it means (at least) RPMs
+‘<samp>libX11</samp>’, ‘<samp>libX11-devel</samp>’, ‘<samp>libXt</samp>’ and ‘<samp>libXt-devel</samp>’.
+On Debian/Ubuntu we recommend the meta-package ‘<samp>xorg-dev</samp>’.  If you
+really do not want these you will need to explicitly configure R
+without X11, using <samp>--with-x=no</samp>.
 </p>
 <p>The command-line editing (and command completion) depends on the
-<acronym>GNU</acronym> <code>readline</code> library: version 4.2 or later is needed
-for all the features to be enabled.  Otherwise you will need to
-configure with <samp>--with-readline=no</samp> (or equivalent).
+<acronym>GNU</acronym> <code>readline</code> library (including its headers): version
+4.2 or later is needed for all the features to be enabled.  Otherwise
+you will need to configure with <samp>--with-readline=no</samp> (or
+equivalent).
 </p>
 <p>A suitably comprehensive <code>iconv</code> function is essential.  The R
 usage requires <code>iconv</code> to be able to translate between
 <code>"latin1"</code> and <code>"UTF-8"</code>, to recognize <code>""</code> (as the
 current encoding) and <code>"ASCII"</code>, and to translate to and from the
 Unicode wide-character formats <code>"UCS-[24][BL]E"</code> — this is true
-for <code>glibc</code> but not of most commercial Unixes.  However, you can
-make use of <acronym>GNU</acronym> <code>libiconv</code> (possibly as a plug-in
-replacement: see <a href="http://www.gnu.org/software/libiconv/">http://www.gnu.org/software/libiconv/</a>).
+by default for <code>glibc</code><a name="DOCF41" href="#FOOT41"><sup>41</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="DOCF30" href="#FOOT30"><sup>30</sup></a> for wide-character
+<p>The OS needs to have enough support<a name="DOCF42" href="#FOOT42"><sup>42</sup></a> for wide-character
 types: this is checked at configuration.  A small number of POSIX
-functions<a name="DOCF31" href="#FOOT31"><sup>31</sup></a> are essential, and others<a name="DOCF32" href="#FOOT32"><sup>32</sup></a> will be used if available.
+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
+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
+later are required.
+</p>
+<p>PCRE<a name="DOCF46" href="#FOOT46"><sup>46</sup></a> (version 8.32 or later, although versions 8.10–8.31 will
+be accepted with a deprecation warning) is required (or just its library
+and headers if packaged separately).  Only the ‘8-bit’ interface is used
+(and only that is built by default when installing from sources).  PCRE
+must be built with UTF-8 support (not the default, and checked by
+<code>configure</code>) and support for Unicode properties is assumed by
+some R packages.  JIT support (optionally available from 8.20) is
+desirable for the best performance: support for this and Unicode
+properties can be checked at run-time by calling <code>pcre_config()</code>.
+If building PCRE for use with R a suitable <code>configure</code>
+command might be
+</p><div class="example">
+<pre class="example">./configure --enable-utf --enable-unicode-properties --enable-jit --disable-cpp
+</pre></div>
+<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.
+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
+<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="DOCF33" href="#FOOT33"><sup>33</sup></a> that can
+(including the recommended packages).  A version<a name="DOCF49" href="#FOOT49"><sup>49</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
 <a name="index-TAR"></a>
-<code>tar</code>: use environment variable <code>TAR</code> to override this.
+<code>tar</code> – use environment variable <code>TAR</code> to override this.
 </p>
 <p>There need to be suitable versions of the tools <code>grep</code> and
 <code>sed</code>: the problems are usually with old AT&T and BSD variants.
@@ -3168,16 +3466,20 @@ looking in <samp>/usr/xpg4/bin</samp> which is used on some commercial
 Unixes).
 </p>
 <p>You will not be able to build most of the manuals unless you have
-<code>makeinfo</code> version 4.7 or later installed, and if not some of
-the <acronym>HTML</acronym> manuals will be linked to <acronym>CRAN</acronym>. To 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="DOCF34" href="#FOOT34"><sup>34</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 (TeXLive 2007 and MiKTeX 2.8) used with
-<strong>texinfo</strong> 4.13.  It is possible to use <strong>texinfo</strong> version 5.x,
-preferably 5.2 or later.
+<code>texi2any</code> version 5.1 or later installed, and if not most of
+the <acronym>HTML</acronym> manuals will be linked to a version on <acronym>CRAN</acronym>. To
+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>
+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>
+<a name="index-Subversion-1"></a>
+<p>If you want to build from the R Subversion repository then
+<code>texi2any</code> is highly recommended as it is used to create files
+which are in the tarball but not stored in the Subversion repository.
 </p>
 <a name="index-Vignettes"></a>
 <p>The PDF documentation (including <samp>doc/NEWS.pdf</samp>) and building
@@ -3187,27 +3489,32 @@ Building PDF package manuals (including the R reference manual) and
 vignettes is sensitive to the version of the LaTeX package
 <strong>hyperref</strong> and we recommend that the TeX distribution used is
 kept up-to-date.  A number of standard LaTeX packages are required
-(including <strong>fancyvrb</strong>, <strong>url</strong> and some of the font packages such
-as <strong>times</strong>, <strong>helvetic</strong>, <strong>ec</strong> and <strong>cm-super</strong>) and others
-such as <strong>hyperref</strong> and <strong>inconsolata</strong> are desirable (and without
-them you may need to change R’s defaults: see <a href="#Making-the-manuals">Making the manuals</a>).  Note that package <strong>hyperref</strong> (currently) requires
-packages <strong>kvoptions</strong>, <strong>ltxcmds</strong> and <strong>refcount</strong>.  For
-distributions based on TeXLive the simplest approach may be to install
-collections <strong>collection-latex</strong>, <strong>collection-fontsrecommended</strong>,
+(including <strong>url</strong> and some of the font packages such as <strong>times</strong>,
+<strong>helvetic</strong>, <strong>ec</strong> and <strong>cm-super</strong>) and others such as
+<strong>hyperref</strong> and <strong>inconsolata</strong> are desirable (and without them you
+may need to change R’s defaults: see <a href="#Making-the-manuals">Making the manuals</a>).  Note
+that package <strong>hyperref</strong> (currently) requires packages
+<strong>kvoptions</strong>, <strong>ltxcmds</strong> and <strong>refcount</strong>.  For distributions
+based on TeX Live the simplest approach may be to install collections
+<strong>collection-latex</strong>, <strong>collection-fontsrecommended</strong>,
 <strong>collection-latexrecommended</strong>, <strong>collection-fontsextra</strong> and
 <strong>collection-latexextra</strong> (assuming they are not installed by
 default): Fedora uses names like <strong>texlive-collection-fontsextra</strong> and
 Debian/Ubuntu like <strong>texlive-fonts-extra</strong>.
 </p>
-
-<a name="index-Subversion-1"></a>
-<p>If you want to build from the R Subversion repository you need both
-<code>makeinfo</code> and <code>pdflatex</code>.
-</p>
 <a name="index-PATH"></a>
 <p>The essential programs should be in your <code>PATH</code> at the time
 <code>configure</code> is run: this will capture the full paths.
 </p>
+<p>Those distributing binary versions of R may need to be aware of the
+licences of the external libraries it is linked to (including ‘useful’
+libraries from the next section).  The <code>liblzma</code> library is in the
+public domain and X11, <code>libbzip2</code>, <code>libcurl</code> and <code>zlib</code>
+have MIT-style licences. PCRE has a BSD-style licence which requires
+distribution of the licence (included in R’s <samp>COPYRIGHTS</samp> file)
+in binary distributions.  GNU <code>readline</code> is licensed under GPL
+(which version(s) depending on the <code>readline</code> version).
+</p>
 <hr>
 <a name="Useful-libraries-and-programs"></a>
 <a name="Useful-libraries-and-programs-1"></a>
@@ -3228,30 +3535,23 @@ earliest version we have tested.  (For Fedora users we believe the
 ‘<samp>pangocairo</samp>’ package is installed (and if not, ‘<samp>cairo</samp>’) and if
 additional flags are needed for the ‘<samp>cairo-xlib</samp>’ package, then if
 suitable code can be compiled.  These tests will fail if
-<code>pkg-config</code> is not installed, 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.  OS X
-comes with none of these libraries (but XQuartz, as used for 10.8 and
-later, ships <code>cairo</code>), but <code>cairo</code> support (without
-<code>Pango</code>) has been added to the binary distribution (see
-<a href="http://r.research.att.com/libs/">http://r.research.att.com/libs/</a> you need <code>fontconfig</code>,
-<code>freetype</code> and <code>pixman</code> too): <code>pkg-config</code> is still
-needed when building R from source and can be installed from its
-sources.
+<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
+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="DOCF35" href="#FOOT35"><sup>35</sup></a> provides
+package<a name="DOCF52" href="#FOOT52"><sup>52</sup></a> provides
 TrueType versions of Monotype fonts such as Arial and Times New Roman.
 Another useful set of fonts is the ‘liberation’ TrueType fonts available
 at
-<a href="https://fedorahosted.org/liberation-fonts/">https://fedorahosted.org/liberation-fonts/</a>,<a name="DOCF36" href="#FOOT36"><sup>36</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="DOCF53" href="#FOOT53"><sup>53</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="http://en.wikipedia.org/wiki/Liberation_fonts">http://en.wikipedia.org/wiki/Liberation_fonts</a>).  Then there
+(<a href="https://en.wikipedia.org/wiki/Liberation_fonts">https://en.wikipedia.org/wiki/Liberation_fonts</a>).  Then there
 is the ‘Free UCS Outline Fonts’ project
-(<a href="http://www.gnu.org/software/freefont/">http://www.gnu.org/software/freefont/</a>) which are
+(<a href="https://www.gnu.org/software/freefont/">https://www.gnu.org/software/freefont/</a>) which are
 OpenType/TrueType fonts based on the URW fonts but with extended Unicode
 coverage.  See the R help on <code>X11</code> on selecting such fonts.
 </p>
@@ -3273,26 +3573,11 @@ needed).  Recent versions allow several other libraries to be linked
 into <code>libtiff</code> such as <code>lzma</code>, <code>jbig</code> and <code>jpeg12</code>,
 and these may need also to be present.
 </p>
-<p>If you have them installed (including the appropriate headers and of
-suitable versions), system versions of <code>zlib</code>, <code>libbz2</code> and
-PCRE will be used if specified by <samp>--with-system-zlib</samp> (version
-1.2.5 or later), <samp>--with-system-bzlib</samp> or
-<samp>--with-system-pcre</samp> (version 8.10 or later, preferably
-8.34<a name="DOCF37" href="#FOOT37"><sup>37</sup></a>): otherwise versions in the R sources will be
-compiled in.  As the latter suffice and are tested with R you should
-not need to change this.
-</p>
 <p>Option <samp>--with-system-tre</samp> is also available: it needs a recent
 version of TRE. (The current sources are in the <code>git</code> repository
 at <a href="https://github.com/laurikari/tre/">https://github.com/laurikari/tre/</a>, but at the time of writing
 the resulting build will not pass its checks.).
 </p>
-<p><code>liblzma</code> from <code>xz-utils</code> version 5.0.3 or later will be used
-if installed: the version in the R sources can be selected instead by
-configuring with <samp>--with-system-xz=no</samp>.  Systems differ in what
-they call the package including this: e.g. on Fedora the library is in
-‘<samp>xz-libs</samp>’ and the headers in ‘<samp>xz-devel</samp>’.
-</p>
 <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
@@ -3308,16 +3593,16 @@ Debian meta-package ‘<samp>xorg-dev</samp>’), but some distributions
 this into smaller parts, so for example recent versions of Fedora
 require the ‘<samp>libXmu</samp>’ and ‘<samp>libXmu-devel</samp>’ RPMs.
 </p>
-<p>Some systems (notably OS X and at least some FreeBSD systems) have
+<p>Some systems (notably macOS and at least some FreeBSD systems) have
 inadequate support for collation in multibyte locales.  It is possible
 to replace the OS’s collation support by that from ICU (International
 Components for Unicode, <a href="http://site.icu-project.org/">http://site.icu-project.org/</a>), and this
 provides much more precise control over collation on all systems.  ICU
 is available as sources and as binary distributions for (at least) most
 Linux distributions, Solaris, FreeBSD and AIX, usually as <code>libicu</code>
-or <code>icu4c</code>.  It will be used by default where available (including
-on OS X >= 10.4): should a very old or broken version of ICU be found
-this can be suppressed by <samp>--without-ICU</samp>.
+or <code>icu4c</code>.  It will be used by default where available: should a
+very old or broken version of ICU be found this can be suppressed by
+<samp>--without-ICU</samp>.
 </p>
 <p>The <code>bitmap</code> and <code>dev2bitmap</code> devices and function
 <code>embedFonts()</code> use ghostscript
@@ -3334,7 +3619,7 @@ environment variable <code>R_GSCMD</code> at that time.
 <h4 class="subsection">A.2.1 Tcl/Tk</h4>
 
 <p>The <strong>tcltk</strong> package needs Tcl/Tk >= 8.4 installed: the sources are
-available at <a href="http://www.tcl.tk/">http://www.tcl.tk/</a>.  To specify the locations of the
+available at <a href="https://www.tcl.tk/">https://www.tcl.tk/</a>.  To specify the locations of the
 Tcl/Tk files you may need the configuration options
 </p>
 <dl compact="compact">
@@ -3356,20 +3641,26 @@ the Tcl and Tk libraries and for finding the <samp>tcl.h</samp> and
 versions of Tcl/Tk installed, specifying the paths to the correct config
 files may be necessary to avoid confusion between them.
 </p>
-<p>Versions of Tcl/Tk up to 8.5.12 and 8.6.0 have been tested (including
+<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
+development files installed.
+</p>
 <hr>
 <a name="Java-support"></a>
 <a name="Java-support-1"></a>
 <h4 class="subsection">A.2.2 Java support</h4>
 
 <p>The build process looks for Java support on the host system, and if it
-finds it sets some settings which are useful for Java-using packages.
+finds it sets some settings which are useful for Java-using packages
+(such as <a href="https://CRAN.R-project.org/package=rJava"><strong>rJava</strong></a> and <a href="https://CRAN.R-project.org/package=JavaGD"><strong>JavaGD</strong></a>).  This check can be
+suppressed by configure option <samp>--disable-java</samp>.
 <a name="index-JAVA_005fHOME"></a>
-<code>JAVA_HOME</code> can be set to point to a specific JRE/JDK.
+Configure variable <code>JAVA_HOME</code> can be set to point to a specific
+JRE/JDK, on the <code>configure</code> command line or in the environment.
 </p>
-<p>Principal amongst these are setting some library paths to the Java
+<p>Principal amongst these settings are some library paths to the Java
 libraries and JVM, which are stored in environment variable
 <a name="index-R_005fJAVA_005fLD_005fLIBRARY_005fPATH"></a>
 <code>R_JAVA_LD_LIBRARY_PATH</code> in file <samp><var>R_HOME</var>/etc/ldpaths</samp> (or
@@ -3377,16 +3668,17 @@ a sub-architecture-specific version).  A typical setting for
 ‘<samp>x86_64</samp>’ Linux is
 </p>
 <div class="example">
-<pre class="example">JAVA_HOME=/usr/lib/jvm/java-1.7.0-openjdk-1.7.0.25.x86_64/jre
-R_JAVA_LD_LIBRARY_PATH=${JAVA_HOME}/lib/amd64/server
+<pre class="example">JAVA_HOME=/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.71-1.b15.fc22.x86_64/jre
+R_JAVA_LD_LIBRARY_PATH=${JAVA_HOME}/lib/that/server
 </pre></div>
 
-<p>Note that this unfortunately depends on the exact version of the JRE/JDK
+<p>Unfortunately this depends on the exact version of the JRE/JDK
 installed, and so may need updating if the Java installation is updated.
 This can be done by running <code>R CMD javareconf</code> which updates
-settings in both <samp>etc/Makeconf</samp> and
+settings in both <samp><var>R_HOME</var>/etc/Makeconf</samp> and
 <samp><var>R_HOME</var>/etc/ldpaths</samp>. See <code>R CMD javareconf --help</code> for
-details.
+details: note that this needs to be done by the account owning the R
+installation.
 </p>
 <p>Another way of overriding those settings is to set the environment variable
 <a name="index-R_005fJAVA_005fLD_005fLIBRARY_005fPATH-1"></a>
@@ -3395,15 +3687,16 @@ details.
 Java-using packages.  For example
 </p>
 <div class="example">
-<pre class="example">R_JAVA_LD_LIBRARY_PATH=/usr/lib/jvm/java-1.7.0/jre/lib/amd64/server
+<pre class="example">R_JAVA_LD_LIBRARY_PATH=/usr/lib/jvm/java-1.8.0/jre/lib/amd64/server
 </pre></div>
 
 <p>It may be possible to avoid this by specifying an invariant link as the
-path. For example, on that system either of
+path when configuring. For example, on that system any of
 </p>
 <div class="example">
-<pre class="example">JAVA_HOME=/usr/lib/jvm/java-1.7.0
-JAVA_HOME=/usr/lib/jvm/java-1.7.0/jre
+<pre class="example">JAVA_HOME=/usr/lib/jvm/java
+JAVA_HOME=/usr/lib/jvm/java-1.8.0
+JAVA_HOME=/usr/lib/jvm/java-1.8.0/jre
 </pre></div>
 
 <p>worked.
@@ -3416,14 +3709,13 @@ JAVA_HOME=/usr/lib/jvm/java-1.7.0/jre
 <p>Some add-on packages need a C++ compiler.  This is specified by the
 configure variables <code>CXX</code>, <code>CXXFLAGS</code> and similar.
 <code>configure</code> will normally find a suitable compiler.  However, in
-most cases this will be a C++98 compiler, and as from R 3.1.0 it is
+many cases this will be a C++98 compiler, and it is
 possible to specify an alternative compiler for use with C++11 by the
-configure variables <code>CXX1X</code>, <code>CXX1XSTD</code>, <code>CXX1XFLAGS</code> and
-similar.  Again, <code>configure</code> will normally find a suitable value
-for <code>CXX1XSTD</code> if the compiler given by <code>CXX</code> is capable of
-compiling C++11 code, but it is possible that a completely different
-compiler will be needed (it is for OS X < 10.9 and Solaris, for
-example).
+configure variables <code>CXX11</code>, <code>CXX11STD</code>, <code>CXX11FLAGS</code> and
+similar (see <a href="#C_002b_002b-Support">C++ Support</a>).  Again, <code>configure</code> will normally
+find a suitable value for <code>CXX11STD</code> if the compiler given by
+<code>CXX</code> is capable of compiling C++11 code, but it is possible that a
+completely different compiler will be needed.
 </p>
 <p>Other packages need full Fortran 90 (or later) support.  For source
 files with extension <samp>.f90</samp> or <samp>.f95</samp>, the compiler defined by
@@ -3483,10 +3775,10 @@ 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="DOCF38" href="#FOOT38"><sup>38</sup></a>, <code>libessl</code> on IBM,
-<code>Accelerate</code> on OS X).  The correct incantation for
-these is usually found <em>via</em> <samp>--with-blas</samp> with no value on
-the appropriate platforms.
+(<code>sunperf</code> on Solaris<a name="DOCF55" href="#FOOT55"><sup>55</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.
 </p>
 <p>Some of the external <acronym>BLAS</acronym>es are multi-threaded.  One issue is
 that R profiling (which uses the <code>SIGPROF</code> signal) may cause
@@ -3494,21 +3786,31 @@ problems, and you may want to disable profiling if you use a
 multi-threaded <acronym>BLAS</acronym>.  Note that using a multi-threaded
 <acronym>BLAS</acronym> can result in taking more <acronym>CPU</acronym> time and even
 more elapsed time (occasionally dramatically so) than using a similar
-single-threaded <acronym>BLAS</acronym>.
+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.
 </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="http://CRAN.R-project.org/package=quantreg"><strong>quantreg</strong></a> will need to be re-installed.
+such as <a href="https://CRAN.R-project.org/package=quantreg"><strong>quantreg</strong></a> will need to be re-installed.
 </p>
 <p>R relies on <acronym>ISO</acronym>/<acronym>IEC</acronym> 60559 compliance of an
 external <acronym>BLAS</acronym>.  This can be broken if for example the code
 assumes that terms with a zero factor are always zero and do not need to
-be computed—whereas <code>x*0</code> can be <code>NaN</code>. This is checked in
+be computed—whereas <code>x*0</code> can be <code>NaN</code>.  This is checked in
 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.
+</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>
 
 <hr>
 <a name="ATLAS"></a>
@@ -3517,7 +3819,7 @@ the test suite.
 
 <p>ATLAS (<a href="http://math-atlas.sourceforge.net/">http://math-atlas.sourceforge.net/</a>) is a “tuned”
 <acronym>BLAS</acronym> that runs on a wide range of Unix-alike platforms.
-Unfortunately it is usually built as a static library that on some
+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 ‘<samp>ix86</samp>’ platforms, but not always on ‘<samp>x86_64</samp>’
@@ -3547,18 +3849,16 @@ multi-threaded version of ATLAS, by specifying
 <pre class="example">--with-blas="-lptf77blas -lpthread -latlas"
 </pre></div>
 
-<p>Consult its file <samp>INSTALL.txt</samp> for how to build ATLAS with
-position-independent code: that file also describes how to build ATLAS
-as a shared library.
+<p>Consult its installation guide for how to build ATLAS with
+position-independent code, and as a shared library.
 </p>
 <hr>
 <a name="ACML"></a>
 <a name="ACML-1"></a>
 <h4 class="subsubsection">A.3.1.2 ACML</h4>
 
-<p>For ‘<samp>x86_64</samp>’ and ‘<samp>i686</samp>’ processors under Linux there is
-the AMD Core Math Library (ACML) <a href="http://www.amd.com/acml">http://www.amd.com/acml</a>.  For
-the <code>gcc</code> version we could use
+<p>For ‘<samp>x86_64</samp>’ 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="-lacml"
@@ -3589,13 +3889,10 @@ handling of <code>NA</code>s.
 <a name="Goto-and-OpenBLAS-1"></a>
 <h4 class="subsubsection">A.3.1.3 Goto and OpenBLAS</h4>
 
-<p>Dr Kazushige Goto wrote another tuned <acronym>BLAS</acronym> which is available
-for several processors and OSes.  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.
-Source code can be obtained from
-<a href="http://www.tacc.utexas.edu/tacc-projects/gotoblas2/">http://www.tacc.utexas.edu/tacc-projects/gotoblas2/</a>
-</p>
-<p>Once it is built and installed, it can be used by configuring R with
+Once it is built and installed, it can be used by configuring R with
 </p>
 <div class="example">
 <pre class="example">--with-blas="-lgoto2"
@@ -3604,11 +3901,9 @@ Source code can be obtained from
 <p>See see <a href="#Shared-BLAS">Shared BLAS</a> for an alternative (and in many ways preferable)
 way to use it.
 </p>
-<p>Our understanding is that this project is now frozen and so will not be
-updated for CPUs released since mid-2010.  However, OpenBLAS
-(<a href="http://xianyi.github.com/OpenBLAS/">http://xianyi.github.com/OpenBLAS/</a>) is a descendant project with
-support for some current CPUs (e.g. Intel Sandy Bridge).  Once
-installed it can be used by something like
+<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="-lopenblas"
@@ -3620,58 +3915,41 @@ installed it can be used by something like
 <a name="MKL"></a>
 <a name="Intel-MKL"></a>
 <h4 class="subsubsection">A.3.1.4 Intel MKL</h4>
-<p>For Intel processors, and perhaps others, and some distributions of
-Linux, there is Intel’s Math Kernel Library
-(<a href="http://www.intel.com/software/products/mkl/">http://www.intel.com/software/products/mkl/</a>).  You are
-strongly encouraged to read the MKL User’s Guide, which is installed
-with the library, before attempting to link to MKL.  There are also
-versions of MKL for OS X and Windows, but they did not work with the
-standard compilers used for R on those platforms.
-</p>
-<p>The MKL interface has changed several times, and may change again: the
-following notes apply exactly only to version 10.3 but have been used
-with version 11.1.
-</p>
-<p>Versions 10 and later of MKL support two linking models: the default
-model (which is backward compatible with version 9 see below) and the
-layered model.  The layered model gives the user fine-grained control
-over four different library layers: interface, threading, computation,
-and run-time library support. Some examples of linking to MKL using this
-layered model are given below. (These examples are for GCC compilers on
-‘<samp>x86_64</samp>’.)  The choice of interface layer is important on
-‘<samp>x86_64</samp>’ since the Intel Fortran compiler returns complex values
-in different registers from the <acronym>GNU</acronym> Fortran compiler. You must
-therefore use the interface layer that matches your compiler
-(<code>mkl_intel*</code> or <code>mkl_gf*</code>).
-</p>
-<p>R can be linked to a sequential version of MKL by something like
-</p>
-<div class="example">
-<pre class="example">MKL_LIB_PATH=/opt/intel/mkl/10.311.339/lib/intel64/
-export LD_LIBRARY_PATH=$MKL_LIB_PATH
-MKL="-L${MKL_LIB_PATH} -lmkl_gf_lp64 -lmkl_sequential -lmkl_core"
-./configure --with-blas="$MKL" --with-lapack
-</pre></div>
-
-<p>where some versions may need <code>-lmkl_lapack</code> before
-<code>-lmkl_core</code>.  The order of the libraries is important.  The option
-<samp>--with-lapack</samp> is used since MKL contains a tuned copy of LAPACK
-as well as <acronym>BLAS</acronym> (see <a href="#LAPACK">LAPACK</a>), although this can be
-omitted.
+<p>For Intel processors (and perhaps others) and some distributions of
+Linux, there is Intel’s Math Kernel Library.  You are strongly
+encouraged to read the MKL User’s Guide, which is installed with the
+library, before attempting to link to MKL.  This includes a ‘link line
+advisor’ which will suggest appropriate incantations: its use is
+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>Threaded MKL may be used (according to Zhang Zhang of Intel) by
-replacing the line defining the variable <code>MKL</code> with (Intel OMP)
+<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
+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
+compilers on ‘<samp>x86_64</samp>’.
+</p>
+<p>To a sequential version of MKL we used
 </p>
 <div class="example">
-<pre class="example">MKL="-L${MKL_LIB_PATH} -lmkl_gf_lp64 -lmkl_intel_thread \
-     -lmkl_core -liomp5 -lpthread"
+<pre class="example">MKL_LIB_PATH=/path/to/intel_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
 </pre></div>
 
-<p>or (GNU OMP)
+<p>The option <samp>--with-lapack</samp> is used since MKL contains a tuned
+copy of LAPACK as well as <acronym>BLAS</acronym> (see <a href="#LAPACK">LAPACK</a>), although this
+can be omitted.
+</p>
+<p>Threaded MKL may be used by replacing the line defining the variable
+<code>MKL</code> by
 </p>
 <div class="example">
-<pre class="example">MKL="-L${MKL_LIB_PATH} -lmkl_gf_lp64 -lmkl_gnu_thread \
-     -lmkl_core -fopenmp -lpthread"
+<pre class="example">MKL="-L${MKL_LIB_PATH} -lmkl_gf_lp64 -lmkl_core \
+     -lmkl_gnu_thread -dl -lpthread"
 </pre></div>
 
 <p>The default number of threads will be chosen by the OpenMP software, but
@@ -3679,36 +3957,13 @@ 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.
 </p>
-<p>Static threaded MKL may be used (GNU OpenMP) with something like
+<p>It has been reported that
 </p>
 <div class="example">
-<pre class="example">MKL="   -L${MKL_LIB_PATH}                               \
-        -Wl,--start-group                               \
-                ${MKL_LIB_PATH}/libmkl_gf_lp64.a        \
-                ${MKL_LIB_PATH}/libmkl_gnu_thread.a     \
-                ${MKL_LIB_PATH}/libmkl_core.a           \
-        -Wl,--end-group                                 \
-        -lgomp -ldl -lpthread"
+<pre class="example">--with-blas='-mkl=parallel' --with-lapack
 </pre></div>
 
-<p>(Thanks to Ei-ji Nakama.  The <code>-ldl</code> was needed on a Centos 5
-systems and may not be needed everywhere.)
-</p>
-<p>The MKL documentation includes a ‘link line advisor’ which will suggest
-appropriate incantations: an on-line version was available at
-<a href="http://software.intel.com/en-us/articles/intel-mkl-link-line-advisor/">http://software.intel.com/en-us/articles/intel-mkl-link-line-advisor/</a>
-</p>
-<p>The default linking model, which was also used by version 9 of MKL, can
-be used by
-</p>
-<div class="example">
-<pre class="example">--with-blas="-lmkl -lguide -lpthread"
-</pre></div>
-
-<p>but this may not match your compiler on a 64-bit platform.  This is
-multi-threaded, but in version 9 the number of threads defaults to 1.
-It can be increased by setting <code>OMP_NUM_THREADS</code>.  (Thanks to Andy
-Liaw for the information.)
+<p>worked with the Intel 2015.3 compilers on Centos 6.
 </p>
 <hr>
 <a name="Shared-BLAS"></a>
@@ -3762,9 +4017,9 @@ dynamic <acronym>BLAS</acronym> library (such as ACML or Goto’s) to
 ln -s /opt/acml5.1.0/gfortran64_mp/lib/libacml_mp.so <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 the Goto <acronym>BLAS</acronym> and perhaps
-for MKL (provided the appropriate <samp>lib</samp> directory is in the
-run-time library path or <code>ld.so</code> cache).
+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>
 
 <hr>
@@ -3775,7 +4030,7 @@ run-time 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 OS X and ACML and MKL
+as <code>sunperf</code> on Solaris, <code>Accelerate</code> on macOS and ACML and MKL
 on ‘<samp>ix86</samp>’/‘<samp>x86_64</samp>’ Linux).  At least LAPACK version 3.2
 is required.  This can only be done if <samp>--with-blas</samp> has been used.
 </p>
@@ -3859,11 +4114,11 @@ BLAS used, so it may be simpler to use CLAPACK built to use CBLAS and
 <p>As with all libraries, you need to ensure that they and R were
 compiled with compatible compilers and flags.  For example, this has
 meant that on Sun Sparc using the native compilers the flag
-<samp>-dalign</samp> is needed so <code>sunperf</code> can be used.
+<samp>-dalign</samp> is needed if <code>sunperf</code> is to be used.
 </p>
-<p>On some systems it is necessary that an external <acronym>BLAS</acronym>/LAPACK
-was built with the same FORTRAN compiler used to build R: known
-problems are with R built with <code>gfortran</code>, see <a href="#Using-gfortran">Using gfortran</a>.
+<p>On some systems it has been necessary that an external
+<acronym>BLAS</acronym>/LAPACK was built with the same FORTRAN compiler used to
+build R.
 </p>
 
 
@@ -3925,7 +4180,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="DOCF39" href="#FOOT39"><sup>39</sup></a> penalty.  So you probably
+performance<a name="DOCF57" href="#FOOT57"><sup>57</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
@@ -3934,10 +4189,24 @@ way.  Also, because packages are linked against R they are on some
 OSes also linked against the dynamic libraries R itself is linked
 against, and this can lead to symbol conflicts.
 </p>
+<p>For maximally effective use of <code>valgrind</code>, R should be
+compiled with valgrind instrumentation. The <code>configure</code> option
+is <samp>--with-valgrind-instrumentation=<var>level</var></samp>, where
+<var>level</var> is 0, 1 or 2.  (Level 0 is the default and does not add
+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>
+headers.
+</p>
 <p>If you need to re-configure R with different options you may need to run
 <code>make clean</code> or even <code>make distclean</code> before doing so.
 </p>
-
+<p>The <samp>configure</samp> script has other generic options added by
+<code>autoconf</code> and which are not supported for R: in particular
+building for one architecture on a different host is not possible.
+</p>
 <hr>
 <a name="Internationalization-support"></a>
 <a name="Internationalization-support-1"></a>
@@ -4048,12 +4317,14 @@ readline, in non-system directories, use the variables <code>LDFLAGS</code>
 the C/C++ preprocessors), respectively, to specify these locations.
 These default to ‘<samp>-L/usr/local/lib</samp>’ (<code>LDFLAGS</code>,
 ‘<samp>-L/usr/local/lib64</samp>’ on most 64-bit Linux OSes) and
-‘<samp>-I/usr/local/include</samp>’ (<code>CPPFLAGS</code>) to catch the most common
-cases.  If libraries are still not found, then maybe your
+‘<samp>-I/usr/local/include</samp>’ (<code>CPPFLAGS</code>, but note that on most
+systems <samp>/usr/local/include</samp> is regarded as a system include
+directory and so instances in that macro will be skipped) to catch the
+most common cases.  If libraries are still not found, then maybe your
 compiler/linker does not support re-ordering of <samp>-L</samp> and
-<samp>-l</samp> flags (this has been reported to be a problem on HP-UX with
-the native <code>cc</code>).  In this case, use a different compiler (or a
-front end shell script which does the re-ordering).
+<samp>-l</samp> flags (years ago this was reported to be a problem on HP-UX
+with the native <code>cc</code>).  In this case, use a different compiler
+(or a front-end shell script which does the re-ordering).
 </p>
 <p>These flags can also be used to build a faster-running version of R.
 On most platforms using <code>gcc</code>, having ‘<samp>-O3</samp>’ in
@@ -4064,7 +4335,7 @@ been seen).  On systems using the <acronym>GNU</acronym> linker (especially thos
 using R as a shared library), it is likely that including
 ‘<samp>-Wl,-O1</samp>’ in <code>LDFLAGS</code> is worthwhile, and
 ‘<samp>'-Bdirect,--hash-style=both,-Wl,-O1'</samp>’ is recommended at
-<a href="http://lwn.net/Articles/192624/">http://lwn.net/Articles/192624/</a>.  Tuning compilation to a
+<a href="https://lwn.net/Articles/192624/">https://lwn.net/Articles/192624/</a>.  Tuning compilation to a
 specific <acronym>CPU</acronym> family (e.g. ‘<samp>-mtune=native</samp>’ for
 <code>gcc</code>) can give worthwhile performance gains, especially on
 older architectures such as ‘<samp>ix86</samp>’.
@@ -4099,13 +4370,12 @@ path to a shell, e.g. <samp>/usr/local/bin/bash</samp>).
 
 <p>To compile R, you will most likely find it easiest to use
 <acronym>GNU</acronym> <code>make</code>, although the Sun <code>make</code> works on
-Solaris, as does the native FreeBSD <code>make</code>.  The native
-<code>make</code> has been reported to fail on SGI Irix 6.5 and Alpha/OSF1
-(aka Tru64).
+Solaris.  The native <code>make</code> has been reported to fail on SGI
+Irix 6.5 and Alpha/OSF1 (aka Tru64).
 </p>
-<p>To build in a separate directory you need a <code>make</code> that uses the
-<code>VPATH</code> variable, for example <acronym>GNU</acronym> <code>make</code>, or Sun
-<code>make</code> on Solaris 7 or later.
+<p>To build in a separate directory you need a <code>make</code> that supports
+the <code>VPATH</code> variable, for example <acronym>GNU</acronym> <code>make</code> and
+Sun <code>make</code>.
 </p>
 <p><code>dmake</code> has also been used. e.g, on Solaris 10.
 </p>
@@ -4124,7 +4394,6 @@ variable <code>MAKE</code> at configure time, for example
 <h3 class="section">B.6 Using FORTRAN</h3>
 <a name="index-FORTRAN"></a>
 
-
 <p>To compile R, you need a FORTRAN compiler.  The default
 is to search for
 <code>f95</code>, <code>fort</code>, <code>xlf95</code>,
@@ -4134,7 +4403,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="DOCF40" href="#FOOT40"><sup>40</sup></a>, and use whichever is found first; if none is found,
+<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,
 R cannot be compiled.
 However, if <code>CC</code> is <code>gcc</code>, the matching FORTRAN compiler
 (<code>g77</code> for <code>gcc</code> 3 and <code>gfortran</code> for
@@ -4163,7 +4432,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="DOCF41" href="#FOOT41"><sup>41</sup></a>, but you may need to avoid
+time<a name="DOCF60" href="#FOOT60"><sup>60</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
@@ -4190,32 +4459,6 @@ contain constructs that <code>f2c</code> is unlikely to be able to process,
 so you would need to use an external LAPACK library (such as CLAPACK
 from <a href="http://www.netlib.org/clapack/">http://www.netlib.org/clapack/</a>).
 </p>
-
-<hr>
-<a name="Using-gfortran"></a>
-<a name="Using-gfortran-1"></a>
-<h4 class="subsection">B.6.1 Using gfortran</h4>
-
-<p><code>gfortran</code> is the F95 compiler that is part of
-<code>gcc</code> 4.<var>x</var>.<var>y</var>.
-</p>
-<p>On Linux ‘<samp>x86_64</samp>’ systems there is an incompatibility in the
-return conventions for double-complex functions between
-<code>gfortran</code> and <code>g77</code> which results in the final example
-in <code>example(eigen)</code> hanging or segfaulting under external
-<acronym>BLAS</acronym>s built under <code>g77</code> (and also some external
-LAPACKs).  The commonest cases will be detected by a <code>configure</code>
-test.  Although <code>g77</code> is long obsolete this is still sometimes
-seen with C versions of external software using <code>g77</code>
-conventions.
-</p>
-<p>The default <code>FFLAGS</code> and <code>FCFLAGS</code> chosen (by
-<code>autoconf</code>) for a <acronym>GNU</acronym> FORTRAN compiler is ‘<samp>-g
--O2</samp>’.  This has caused problems (segfaults and infinite loops) on
-‘<samp>x86_64</samp>’ Linux in the past, but seems fine with
-<code>gfortran 4.4.4</code> and later: for <code>gfortran 4.3.x</code> set
-<code>FFLAGS</code> and <code>FCFLAGS</code> to use at most ‘<samp>-O</samp>’.
-</p>
 <hr>
 <a name="Compile-and-load-flags"></a>
 <a name="Compile-and-load-flags-1"></a>
@@ -4343,15 +4586,15 @@ to be satisfactory.
 <p>The ultimate sources for package <strong>compiler</strong> are in its <samp>noweb</samp>
 directory.  To re-create the sources from
 <samp>src/library/compiler/noweb/compiler.nw</samp>, the command
-<code>notangle</code> is required.  This is likely to need to be installed
-from the sources at <a href="http://www.cs.tufts.edu/~nr/noweb/">http://www.cs.tufts.edu/~nr/noweb/</a> (and can
-also be found on CTAN).  The package sources are only re-created even in
-maintainer mode if <samp>src/library/compiler/noweb/compiler.nw</samp> has
-been updated.
+<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> (and can also be found on
+CTAN).  The package sources are only re-created even in maintainer mode if
+<samp>src/library/compiler/noweb/compiler.nw</samp> has been updated.
 </p>
 <p>It is likely that in future creating <code>configure</code> will need the GNU
 ‘autoconf archive’ installed.  This can be found at
-<a href="http://www.gnu.org/software/autoconf-archive/">http://www.gnu.org/software/autoconf-archive/</a> and as a package
+<a href="https://www.gnu.org/software/autoconf-archive/">https://www.gnu.org/software/autoconf-archive/</a> and as a package
 (usually called <strong>autoconf-archive</strong>) in most packaged distributions,
 for example Debian, Fedora, OpenCSW, Homebrew and MacPorts.
 </p>
@@ -4382,7 +4625,7 @@ FreeBSD: __FreeBSD__
 HP-UX: __hpux__, __hpux
 IRIX: sgi, __sgi
 Linux: __linux__
-OS X: __APPLE__
+macOS: __APPLE__
 NetBSD: __NetBSD__
 OpenBSD: __OpenBSD__
 Solaris: __sun, sun
@@ -4408,7 +4651,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="DOCF42" href="#FOOT42"><sup>42</sup></a> missing font sizes, especially larger ones, it is likely
+is reporting<a name="DOCF61" href="#FOOT61"><sup>61</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’s
@@ -4453,7 +4696,7 @@ only contain a subset of the available glyphs (and are often fixed-width
 designed for use in terminals).  In such locales <em>fontsets</em> are
 used, made up of fonts encoded in other encodings.  If the locale you
 are using has an entry in the ‘<samp>XLC_LOCALE</samp>’ directory (typically
-<samp>/usr/share/X11/locale</samp>, it is likely that all you need to do is to
+<samp>/usr/share/X11/locale</samp>), it is likely that all you need to do is to
 pick a suitable font specification that has fonts in the encodings
 specified there.  If not, you may have to get hold of a suitable locale
 entry for X11.  This may mean that, for example, Japanese text can be
@@ -4485,7 +4728,8 @@ directory or elsewhere, for example,
 <a name="index-Linux-1"></a>
 
 <p>Linux is the main development platform for R, so compilation from the
-sources is normally straightforward with the standard compilers.
+sources is normally straightforward with the standard compilers and
+libraries.<a name="DOCF62" href="#FOOT62"><sup>62</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
@@ -4495,8 +4739,15 @@ installed.  So please check the <code>configure</code> output to see if the
 expected features are detected: if for example ‘<samp>readline</samp>’ is
 missing add the developer package.  (On most systems you will also need
 ‘<samp>ncurses</samp>’ and its developer package, although these should be
-dependencies of the ‘<samp>readline</samp>’ package(s).)
+dependencies of the ‘<samp>readline</samp>’ package(s).)  You should expect to
+see in the <code>configure</code> summary
 </p>
+<div class="example">
+<pre class="example">  Interfaces supported:      X11, tcltk
+  External libraries:        readline, zlib, bzlib, lzma, PCRE, curl
+  Additional capabilities:   PNG, JPEG, TIFF, NLS, cairo, ICU
+</pre></div>
+
 <p>When R has been installed from a binary distribution there are
 sometimes problems with missing components such as the FORTRAN
 compiler.  Searching the ‘<samp>R-help</samp>’ archives will normally reveal
@@ -4519,7 +4770,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="DOCF43" href="#FOOT43"><sup>43</sup></a> It is also possible to increase the
+<samp>-mtume=core2</samp>.<a name="DOCF63" href="#FOOT63"><sup>63</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.
@@ -4532,7 +4783,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 ‘<samp>x86_64</samp>’ with Fedora 18 we used
+on ‘<samp>x86_64</samp>’ with Fedora 24 we used
 </p>
 <div class="example">
 <pre class="example">CC="gcc -m32"
@@ -4591,8 +4842,12 @@ which is needed for some versions of <code>gfortran</code>.
 </p>
 <p>The current default for <code>clang++</code> is to use the C++ runtime from
 the installed <code>g++</code>.  Using the runtime from the <code>libc++</code>
-project (<a href="http://libcxx.llvm.org/">http://libcxx.llvm.org/</a>) has also been tested: for some
-R packages only the variant using <code>libcxxabi</code> was successful.
+project (<a href="http://libcxx.llvm.org/">http://libcxx.llvm.org/</a>, Fedora RPM <code>libcxx-devel</code>)
+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="DOCF64" href="#FOOT64"><sup>64</sup></a>
 </p>
 <hr>
 <a name="Intel-compilers"></a>
@@ -4630,157 +4885,159 @@ need add flags to <code>CFLAGS</code>, <code>FFLAGS</code> and <code>CXXFLAGS</c
 as <samp>-mp</samp> (shown above) or <samp>-fp-model precise -fp-model
 source</samp>, depending on the compiler version.
 </p>
-<p>Others have reported success with versions 10.x and 11.x.
+<p>Others have reported success with versions 10.x and 11.x.  
+Bjørn-Helge Mevik reported success with version 2015.3 of the compilers,
+using (for a SandyBridge CPU on Centos 6.x)
 </p>
-
-<hr>
-<a name="Oracle-Solaris-Studio-compilers"></a>
-<a name="Oracle-Solaris-Studio-compilers-1"></a>
-<h4 class="subsection">C.2.3 Oracle Solaris Studio compilers</h4>
-
-<p>Brian Ripley tested the Sun Studio 12 compilers, since renamed to Oracle
-Solaris Studio,
-(<a href="http://developers.sun.com/sunstudio/index.jsp">http://developers.sun.com/sunstudio/index.jsp</a>) 
-On
-‘<samp>x86_64</samp>’ Linux with
-</p>
-<div class="example">
-<pre class="example">CC=suncc
-CFLAGS="-xO5 -xc99 -xlibmil -nofstore"
-CPICFLAGS=-Kpic
-F77=sunf95
-FFLAGS="-O5 -libmil -nofstore"
-FPICFLAGS=-Kpic
-CXX="sunCC -library=stlport4"
-CXXFLAGS="-xO5 -xlibmil -nofstore -features=tmplrefstatic"
-CXXPICFLAGS=-Kpic
-FC=sunf95
-FCFLAGS=$FFLAGS
-FCPICFLAGS=-Kpic
-LDFLAGS=-L/opt/sunstudio12.1/rtlibs/amd64
-SHLIB_LDFLAGS=-shared
-SHLIB_CXXLDFLAGS=-G
-SHLIB_FCLDFLAGS=-G
-SAFE_FFLAGS="-O5 -libmil"
+<div class="example">
+<pre class="example">fast="-fp-model precise -ip -O3 -opt-mem-layout-trans=3 -xHost -mavx"
+CC=icc
+CFLAGS="$fast -wd188"
+F77=ifort
+FFLAGS="$fast"
+CXX=icpc
+CXXFLAGS="$fast"
+FC=$F77
+FCFLAGS=$F77FLAGS
 </pre></div>
 
-<p><samp>-m64</samp> could be added, but was the default.  Do not use
-<samp>-fast</samp>: see the warnings under Solaris. (The C++ options are
-also explained under Solaris.)
-</p>
-<p>Others have found on at least some versions of ‘<samp>ix86</samp>’ Linux that
-the configure flag <samp>--disable-largefile</samp> was needed (since
-<samp>glob.h</samp> on that platform presumed <code>gcc</code> was being used).
-</p>
-
 <hr>
-<a name="OS-X"></a>
-<a name="OS-X-2"></a>
-<h3 class="section">C.3 OS X</h3>
-<a name="index-OS-X-2"></a>
-
-<p>You can build R using Apple’s ‘Command-line Tools for Xcode’ and and
-suitable compilers.  You will also need <code>readline</code> (or to configure
-with <samp>--without-readline</samp>).  That and other binary components are
-available from <a href="http://r.research.att.com/libs">http://r.research.att.com/libs</a>.
-</p>
-<p>You may also need to install an X sub-system (or you will need to
-configure using option <samp>--without-x</samp>): X is part of the standard
-OS X distribution in versions prior to Mountain Lion, but not always
-installed.  For Mountain Lion and later, see
-<a href="http://xquartz.macosforge.org/">http://xquartz.macosforge.org/</a>.  (Note that XQuartz will likely
-need to be re-installed after an OS upgrade.)
-</p>
-<p>In principle R can be built for 10.4.x, 10.5.x and for PowerPC Macs
-but this has not been tested recently: 10.6 (Snow Leopard) is the
-earliest version currently tested.  32-bit Intel builds of R 3.0.0
-were tested: they would be needed for Snow Leopard running on very old
-machines with Core Solo or Core Duo CPUs.  The instructions here are for
-‘<samp>x86_64</samp>’ builds.
+<a name="macOS"></a>
+<a name="macOS-2"></a>
+<h3 class="section">C.3 macOS</h3>
+<a name="index-macOS-2"></a>
+
+<p>(‘macOS’ was known as ‘OS X’ from 2012–2016.)
+</p>
+<p>The instructions here are for ‘<samp>x86_64</samp>’ builds on 10.11 (El
+Capitan) or later.  R can be built for 10.9 and 10.10 and in
+principle<a name="DOCF65" href="#FOOT65"><sup>65</sup></a> for 10.6 to 10.8.
+</p>
+<p>To build R you need Apple’s ‘Command Line Tools’: these can be
+(re-)installed by <code>xcode-select --install</code>.  (If you have a
+fresh OS installation, running e.g. <code>make</code> in a terminal will
+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="DOCF66" href="#FOOT66"><sup>66</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
+but not headers for these (and the system <code>pcre</code> is too old at
+version 8.02).
+</p>
+<p>An X sub-system is required unless configuring using
+<samp>--without-x</samp>: see <a href="https://xquartz.macosforge.org/">https://xquartz.macosforge.org/</a>. R’s
+<code>configure</code> script can be told to look for <code>X11</code> in
+<code>XQuartz</code>’s main location of <samp>/opt/X11</samp>, e.g. by
+</p><div class="example">
+<pre class="example">--x-includes=/opt/X11/include --x-libraries=/opt/X11/lib
+</pre></div>
+<p>although linked versions under <samp>/usr/X11</samp> will be found.
 </p>
 <p>To use the <code>quartz()</code> graphics device you need to configure with
 <samp>--with-aqua</samp> (which is the default): <code>quartz()</code> then
 becomes the default device when running R at the console and X11
-would only be used for the data editor/viewer.  (This needs an
-Objective-C compiler<a name="DOCF44" href="#FOOT44"><sup>44</sup></a> which can compile the code for <code>quartz()</code>.)
+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="DOCF67" href="#FOOT67"><sup>67</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:
 apart from disabling <code>quartz()</code> and the ability to use the build
 with <small>R.APP</small>, it also changes the default location of the personal
-library (see <code>?.libPaths()</code>).  Also use
-<samp>--disable-R-framework</samp> to install in the standard layout.
-</p>
-<p>‘Command-line Tools for Xcode’ used to be part of the Apple Developer
-Tools (‘Xcode’) but nowadays need to be installed separately.  They can
-be downloaded from <a href="http://developer.apple.com/devcenter/mac/">http://developer.apple.com/devcenter/mac/</a> (you
-will need to register there: that allows you to download older versions
-available for your OS) or some versions of Xcode (from the App Store or
-from <a href="http://developer.apple.com/devcenter/mac/">http://developer.apple.com/devcenter/mac/</a>) you can install
-the command-line tools from within Xcode, from the ‘<samp>Downloads</samp>’ pane
-in the ‘<samp>Preferences</samp>’.  For Mavericks and later, see the specific
-sub-section below.
-</p>
-<p>Various compilers can be used.  The current <acronym>CRAN</acronym> ‘Snow
-Leopard’ distribution of R is built using
-</p>
-<ul>
-<li> <code>gcc</code>
-from an Xcode distribution prior to version 5.  This is a version of gcc
-4.2.1 with an LLVM backend.
-
-</li><li> <code>gfortran</code>
-from
-<a href="http://cran.r-project.org/bin/macosx/tools/gfortran-4.2.3.pkg">http://cran.r-project.org/bin/macosx/tools/gfortran-4.2.3.pkg</a>.
-Note that this installs into <samp>/usr/local/bin</samp>, so make sure that is
-on your path.  Other compilers from
-<a href="http://r.research.att.com/tools/">http://r.research.att.com/tools/</a> can also be used.
-
-</li><li> <code>clang</code>
-from the Xcode distribution, to compile the Objective-C parts of the
-<code>quartz()</code> device. 
-</li></ul>
-
-<p>To use these, have in <samp>config.site</samp> something like
-</p>
-<div class="example">
-<pre class="example">CC="llvm-gcc-4.2"
-CXX="llvm-g++-4.2"
-F77="gfortran-4.2 -arch x86_64"
-FC=$F77
-OBJC="clang"
-</pre></div>
-
-<p>Full names help to ensure that the intended compilers are used.  In
-particular <code>gcc</code> is a copy of <code>llvm-gcc-4.2</code> for Xcode <
-5 but of <code>clang</code> in Xcode 5.  The recommended Fortran compiler
-defaults to 32-bit, so <code>-arch x86_64</code> is needed.  (For a 32-bit
-build, use <code>-arch i386</code> for all compiler commands.)
-</p>
-<p>The OpenMP support in this version of <code>gcc</code> is problematic, so
-the <acronym>CRAN</acronym> build is configured with <samp>--disable-openmp</samp>.
+library (see <code>?.libPaths</code>).
 </p>
-<p>The current <acronym>CRAN</acronym> ‘Mavericks’ distribution of R is built
-using
+<p>Various compilers can be used.  One could use
 </p>
 <div class="example">
 <pre class="example">CC=clang
 CXX=clang++
-F77=gfortran-4.8
+F77=/usr/local/gfortran/bin/gfortran
 FC=$F77
 OBJC=clang
+CFLAGS='-Wal -g -O2'
+CXXFLAGS='-Wall -g -O2'
+OBJCFLAGS='-Wall -g -O2'
+F77FLAGS='-Wall -g -O2 -mtune=generic'
+FCFLAGS=$F77FLAGS
+</pre></div>
+
+<p>with <code>clang</code> and <code>clang++</code> from the ‘Command Line Tools’
+and the Fortran compiler from one of the packages described in the next
+paragraph.
+</p>
+<p>There are installers<a name="DOCF68" href="#FOOT68"><sup>68</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 ‘Other’
+under ‘Software’ from the left-hand menu.)  One way to use these builds
+with a binary distribution of R is to have a <samp>~/.R/Makevars</samp>
+file similar to (El Capitan)
+</p><div class="example">
+<pre class="example">F77 = /usr/local/gfortran/bin/gfortran
+FC = $F77
+FLIBS = -L/usr/local/gfortran/lib/gcc/x86_64-apple-darwin15/6.1.0
+  -L/usr/local/gfortran/lib -lgfortran -lquadmath -lm
 </pre></div>
-
-<p>with <code>clang</code> and <code>clang++</code> from Xcode 5, and the Fortran
-compiler from
-<a href="http://r.research.att.com/libs/gfortran-4.8.2-darwin13.tar.bz2">http://r.research.att.com/libs/gfortran-4.8.2-darwin13.tar.bz2</a>.<a name="DOCF45" href="#FOOT45"><sup>45</sup></a>  Apple’s
-builds of <code>clang</code> currently have little or no OpenMP support.
+<p>or (Sierra)
+</p><div class="example">
+<pre class="example">F77 = /usr/local/gfortran/bin/gfortran
+FC = $F77
+FLIBS = -L/usr/local/gfortran/lib/gcc/x86_64-apple-darwin16/6.3.0
+  -L/usr/local/gfortran/lib -lgfortran -lquadmath -lm
+</pre></div>
+<p>(with lines broken here for legibility).
+</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 for 4.0.0, built for Sierra.  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
+</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 \
+DYLD_FALLBACK_LIBRARY_PATH=/usr/local/clang4/lib:/usr/local/lib
+</pre></div>
+<p>with <samp>config.site</samp> containing
+</p><div class="example">
+<pre class="example">CC=/usr/local/clang4/bin/clang
+OBJC=$CC
+F77=/usr/local/gfortran/bin/gfortran
+FC=$F77
+CXX=/usr/local/clang4/bin/clang++
+LDFLAGS="-L/usr/local/clang4/lib -L/usr/local/lib"
+R_LD_LIBRARY_PATH=/usr/local/clang4/lib:/usr/local/lib
+</pre></div>
+<p>The care to specify library paths is to ensure that the OpenMP runtime
+library, here <samp>/usr/local/clang4/lib/libomp.dylib</samp>, is found when
+needed. If this works, you should see the line
+</p><div class="example">
+<pre class="example">checking whether OpenMP SIMD reduction is supported... yes
+</pre></div>
+<p>in the <code>configure</code> output.  Also, ‘<samp>R_LD_LIBRARY_PATH</samp>’ needs
+to be set to find the latest version of the C++ run-time libraries
+rather than the system ones.
 </p>
 <p>Pre-compiled versions of many of the <a href="#Useful-libraries-and-programs">Useful libraries and programs</a>
-are available from <a href="http://r.research.att.com/libs/">http://r.research.att.com/libs/</a>.  You will
-most likely want at least <code>jpeg</code>, <code>libpng</code> and <code>readline</code>
-(and perhaps <code>tiff</code>).  <code>pkg-config</code> is not provided by Apple
-and useful for many packages: it will also be used if present when
-configuring the <code>X11()</code> device.
+are available from <a href="https://r.research.att.com/libs/">https://r.research.att.com/libs/</a>.  You will
+most likely want at least <code>jpeg</code> and <code>tiff</code>.  The
+<code>pkg-config</code> utility is not provided by Apple and used for the
+installation from source of many packages: it will also be used if
+present when configuring the <code>X11()</code> and bitmap devices.
+</p>
+<p>Support for <code>cairo</code> (without <code>Pango</code>) can be enabled if
+<code>pkg-config</code> and XQuartz are available, Make sure the XQuartz’s
+<code>pkg-config</code> files are found first on the configuration path: for
+example by setting
+</p><div class="example">
+<pre class="example">export PKG_CONFIG_PATH=/opt/X11/lib/pkgconfig:/usr/local/lib/pkgconfig:/usr/lib/pkgconfig
+</pre></div>
+<p>or appending that variable to the <code>configure</code> command.
 </p>
 <a name="index-BLAS-library-1"></a>
 <a name="index-LAPACK-library-1"></a>
@@ -4791,156 +5048,56 @@ configuring the <code>X11()</code> device.
 </pre></div>
 
 <p>to provide potentially higher-performance versions of the <acronym>BLAS</acronym>
-and LAPACK routines.  (Use of <code>Accelerate</code> with
-<samp>--with-lapack</samp> does not work on Snow Leopard: it may work there
-without.)<a name="DOCF46" href="#FOOT46"><sup>46</sup></a>
+and LAPACK routines.<a name="DOCF69" href="#FOOT69"><sup>69</sup></a>
 </p>
 <p>Looking at the top of
 <samp>/Library/Frameworks/R.framework/Resources/etc/Makeconf</samp>
 will show the compilers and configuration options used for the
-<acronym>CRAN</acronym> binary package for R: at the time of writing
+<acronym>CRAN</acronym> binary package for R: at the time of writing the
+non-default options
 </p><div class="example">
-<pre class="example">--with-system-zlib --enable-memory-profiling --disable-openmp
+<pre class="example">--enable-memory-profiling --enable-R-framework
 </pre></div>
-<p>was used for ‘Snow Leopard’ and the first two for ‘Mavericks’.
+<p>were used.
 </p>
-<p>Configure option <samp>--with-internal-tzcode</samp> is the default, as a
-64-bit <code>time_t</code> is available but the system implementation of time
-zones does not work correctly for times before 1902 or after 2037.
+<p>Configure option <samp>--with-internal-tzcode</samp> is the default on macOS,
+as the system implementation of time zones does not work correctly for
+times before 1902 or after 2037 (despite using a 64-bit <code>time_t</code>).
 </p>
 <p>The TeX implementation used by the developers is MacTeX
-(<a href="http://www.tug.org/mactex/">http://www.tug.org/mactex/</a>): the full installation is about 4GB,
-but a smaller version is available at
-<a href="http://www.tug.org/mactex/morepackages.html">http://www.tug.org/mactex/morepackages.html</a>: you will need to add
-some packages, e.g. for the 2014 version we needed to add
-<strong>cm-super</strong>, <strong>ec</strong>, <strong>helvetic</strong>, <strong>inconsolata</strong> and
-<strong>texinfo</strong> which brought this to about 380MB (or package
-<strong>texinfo</strong> and the collections <strong>collection-fontsrecommended</strong>,
-<strong>collection-fontsextra</strong> and <strong>collection-latexextra</strong> which will
-take this up to about 1GB).  ‘<samp>TeX Live Utility</samp>’ (available
-<em>via</em> the MacTeX front page) provides a graphical means to manage
-TeX packages.
-</p>
-
-<hr>
-<a name="Snow-Leopard"></a>
-<a name="Snow-Leopard-1"></a>
-<h4 class="subsection">C.3.1 Snow Leopard</h4>
-
-<p>A quirk on Snow Leopard is that the X11 libraries are not in the default
-linking path, so something like ‘<samp>LIBS=-L/usr/X11/lib</samp>’ may be
-required in <samp>config.site</samp>, or you can use the <code>configure</code>
-options <samp>--x-includes=/usr/X11/include
---x-libraries=/usr/X11/lib</samp> .
-</p>
-<p>The <acronym>CRAN</acronym> binaries are built using Xcode 4.2, a version
-available only to subscribing developers.  It is believed that 3.2.6 (the
-last public free version for Snow Leopard) will work.
-</p>
-<hr>
-<a name="Lion"></a>
-<a name="Lion-1"></a>
-<h4 class="subsection">C.3.2 Lion</h4>
-
-<p>No tweaks are known to be needed on Lion.  See the notes on Mountain
-Lion if XQuartz is in use.
-</p>
-<hr>
-<a name="Mountain-Lion"></a>
-<a name="Mountain-Lion-1"></a>
-<h4 class="subsection">C.3.3 Mountain Lion</h4>
-
-<p>The X11 system used with Mountain Lion is XQuartz (see above).
-</p>
-<p>To build the graphics devices depending on cairographics the XQuartz
-path for <code>pkg-config</code> files needs to be known to
-<code>pkg-config</code> when <code>configure</code> is run: this usually means
-adding it to the <code>PKG_CONFIG_PATH</code> environment variable, e.g.
-</p>
-<div class="example">
-<pre class="example">export PKG_CONFIG_PATH= \
-  /opt/X11/lib/pkgconfig:/usr/local/lib/pkgconfig:/usr/lib/pkgconfig
-</pre></div>
-
-<p>or putting
-</p><div class="example">
-<pre class="example">PKG_CONFIG_PATH=/opt/X11/lib/pkgconfig:/usr/local/lib/pkgconfig:/usr/lib/pkgconfig
-</pre></div>
-
-<p>in <samp>config.site</samp>.
+(<a href="https://www.tug.org/mactex/">https://www.tug.org/mactex/</a>): the full installation is about
+5GB, but a smaller version (‘Basic TeX’) 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 2016 version we needed to
+add<a name="DOCF70" href="#FOOT70"><sup>70</sup></a>  <strong>cm-super</strong>, <strong>helvetic</strong>,
+<strong>inconsolata</strong> and <strong>texinfo</strong> which brought this to about 410MB.
+‘<samp>TeX Live Utility</samp>’ (available <em>via</em> the MacTeX front page)
+provides a graphical means to manage TeX packages.
 </p>
-<p>For some pre-compiled software, for example the GTK framework,
-<samp>/opt/X11/include</samp> may need to be added to the include paths.
+<p>One macOS quirk is that the default path has <samp>/usr/local/bin</samp> after
+<samp>/usr/bin</samp>, contrary to common practice on Unix-alikes.  This means
+that if you install tools from the sources they will by default be
+installed under <samp>/usr/local</samp> and not supersede the system
+versions.
 </p>
-<p>If you install the command-line tools for Xcode 4.6.3 you will get the
-compilers used for the CRAN binary distribution: those for Xcode 5 can
-be installed afterwards.
+<p>If you upgrade your OS you should re-install the ‘Command Line Tools’
+and may need to re-install XQuartz and Java (this has been needed for
+some upgrades but not others).
 </p>
-<hr>
-<a name="Mavericks"></a>
-<a name="Mavericks-1"></a>
-<h4 class="subsection">C.3.4 Mavericks</h4>
-
-<p>Xcode for Mavericks provides different compilers, headers and libraries from
-earlier versions.  In particular the compilers (even those called
-<code>gcc</code> and <code>g++</code>) are based on <code>clang</code>, and the 
-C++ headers and runtime are from LLVM’s ‘<samp>libc++</samp>’ project).
-</p>
-<p>The command-line tools can be (re-)installed by <code>xcode-select
---install</code>.  (If you have a fresh installation of Mavericks, running
-e.g. <code>make</code> in a terminal will offer the installation of the
-command-line tools, or perhaps use the versions from Xcode.  However,
-after an update to Mavericks, you are advised to re-install them.)  They
-are not available under the ‘<samp>Downloads</samp>’ preference pane in Xcode.
-</p>
-<p>To use the compilers from the command-line tools for Xcode 5 or 6 with
-the recommended Fortran compiler, have in <samp>config.site</samp> something
-like
-</p>
-<div class="example">
-<pre class="example">CC=clang
-CXX=clang++
-F77=gfortran-4.8
-FC=$F77
-OBJC=clang
-</pre></div>
-<p>(<code>CC=gcc</code> and <code>CXX=g++</code> are slightly different front-ends to
-the same compilers.)  Recent versions of the <acronym>CRAN</acronym> binary package
-installer for ‘Snow Leopard’ change the settings in <samp>etc/Makeconf</samp>
-to
-</p><div class="example">
-<pre class="example">CC = gcc -arch x86_64 -std=gnu99
-CXX g++ -arch x86_64
-F77 = gfortran-4.2 -arch x86_64
-OBJC = gcc -arch x86_64
-OBJCXX = g++ -arch x86_64
-</pre></div>
-<p>when installing on Mavericks.
-</p>
-<p>See the comments under Mountain Lion about X11 and GTK.
-</p>
-<hr>
-<a name="Yosemite"></a>
-<a name="Yosemite-1"></a>
-<h4 class="subsection">C.3.5 Yosemite</h4>
 
-<p>See the comments under ‘Mavericks’.
-</p>
-<p>Note that if you upgrade to Yosemite you should re-install any of
-XQuartz, the ‘Command-line Tools for Xcode’ and Java which you have
-installed.
-</p>
 
 <hr>
 <a name="Tcl_002fTk-headers-and-libraries"></a>
 <a name="Tcl_002fTk-headers-and-libraries-1"></a>
-<h4 class="subsection">C.3.6 Tcl/Tk headers and libraries</h4>
+<h4 class="subsection">C.3.1 Tcl/Tk headers and libraries</h4>
 
 <p>If you plan to use the <code>tcltk</code> package for R, you need to
 install a distribution of Tcl/Tk.  There are two alternatives.  If you
 use <small>R.APP</small> you will want to use X11-based Tcl/Tk (as used on other
-Unix-alikes), which is installed as part of the CRAN binary for R.
-This may need
+Unix-alikes), which is installed as part of the CRAN binary for R and
+available as separate <code>tcl</code> and <code>tk</code> components from
+<a href="https://r.research.att.com/libs/">https://r.research.att.com/libs/</a>.  This may need
+<code>configure</code> options
 </p><div class="example">
 <pre class="example">-with-tcltk=/usr/local/lib
 </pre></div>
@@ -4949,54 +5106,53 @@ This may need
 <pre class="example">--with-tcl-config=/usr/local/lib/tclConfig.sh 
 --with-tk-config=/usr/local/lib/tkConfig.sh
 </pre></div>
-<p>Note that this requires a fully-updated X11 installation (XQuartz for
-Mountain Lion and later).
+<p>Note that this requires a matching XQuartz installation.
 </p>
 <p>There is also a native (‘Aqua’) version of Tcl/Tk which produces widgets
-in the native OS X style: this will not work with <small>R.APP</small> because of
-conflicts over the OS X menu, but for those only using command-line R
+in the native macOS style: this will not work with <small>R.APP</small> because of
+conflicts over the macOS menu, but for those only using command-line R
 this provides a much more intuitive interface to Tk for experienced Mac
-users.  Most versions of OS X come with Aqua Tcl/Tk libraries, but these
-are not current (nor recent) versions of Tcl/Tk (8.5.9 in Mountain
-Lion and Mavericks).  It is better to install Tcl/Tk 8.6.x or 8.5.x from
-the sources or a binary distribution from
-<a href="http://www.activestate.com/activetcl/downloads">http://www.activestate.com/activetcl/downloads</a>.  Configure R
+users.  Most versions of macOS come with Aqua Tcl/Tk libraries, but these
+are not at all recent versions of Tcl/Tk (8.5.9 in Sierra, which is
+not even the latest patched version in that series).  It is better to
+install Tcl/Tk 8.6.x from the sources or a binary distribution from
+<a href="https://www.activestate.com/activetcl/downloads">https://www.activestate.com/activetcl/downloads</a>.  Configure R
 with
 </p><div class="example">
 <pre class="example">--with-tcl-config=/Library/Frameworks/Tcl.framework/tclConfig.sh 
 --with-tk-config=/Library/Frameworks/Tk.framework/tkConfig.sh
 </pre></div>
 
-<p>(for the versions bundled with OS X, use paths starting with
+<p>(for the versions bundled with macOS, use paths starting with
 <samp>/System/Library</samp>).
 </p>
-<p>If you need to find out which version of Tk in use at run time, use
+<p>If you need to find out which distribution of Tk is in use at run time,
+use
 </p><div class="example">
 <pre class="example">library(tcltk)
 tclvalue(.Tcl("tk windowingsystem"))  # "x11" or "aqua"
 </pre></div>
 
 <hr>
-<a name="Java-_0028OS-X_0029"></a>
+<a name="Java-_0028macOS_0029"></a>
 <a name="Java"></a>
-<h4 class="subsection">C.3.7 Java</h4>
+<h4 class="subsection">C.3.2 Java</h4>
 
-<p>The situation with Java support on OS X is messy, with Apple essentially
-no longer supporting Java (and what it does support is Java 6, which has
-reached end-of-life).  Snow Leopard and Lion shipped with a Java 6
-runtime (JRE).
+<p>The situation with Java support on macOS is messy.<a name="DOCF71" href="#FOOT71"><sup>71</sup></a>
 </p>
-<p>Mountain Lion and later do not come with an installed JRE, and an OS X
-upgrade removes 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 this
-should prompt you to install it.
+<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 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>).
 </p>
-<p>You may want/need to install the latest Java from Oracle (currently Java
-8 from
-<a href="http://www.oracle.com/technetwork/java/javase/downloads/index.html">http://www.oracle.com/technetwork/java/javase/downloads/index.html</a>);
-this is for Lion and later.
+<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
+needed before using Java-using packages.
 </p>
+
 <p>To see what compatible versions of Java are currently installed, run
 <code>/usr/libexec/java_home -V -a x86_64</code>.  If needed, set the
 environment variable <code>JAVA_HOME</code> to choose between these, both when
@@ -5004,50 +5160,49 @@ R is built from the sources and when <code>R CMD javareconf</code> is
 run.
 </p>
 <p>Configuring and building R both looks for a JRE and for support for
-compiling JNI programs (used by packages <a href="http://CRAN.R-project.org/package=rJava"><strong>rJava</strong></a> and
-<a href="http://CRAN.R-project.org/package=JavaGD"><strong>JavaGD</strong></a>); the latter requires a JDK (Java SDK) and not just a
+compiling JNI programs (used by packages <a href="https://CRAN.R-project.org/package=rJava"><strong>rJava</strong></a> and
+<a href="https://CRAN.R-project.org/package=JavaGD"><strong>JavaGD</strong></a>); the latter requires a JDK (Java SDK) and not just a
 JRE.
 </p>
 <p>The build process tries to fathom out what JRE/JDK to use, but it may
-need some help, e.g. by setting <code>JAVA_HOME</code>.  The Apple JRE can be
-specified explicitly by something like
-</p><div class="example">
-<pre class="example">JAVA_HOME=/System/Library/Frameworks/JavaVM.framework/Home
-JAVA_CPPFLAGS="-I/System/Library/Frameworks/JavaVM.framework/Headers"
-JAVA_LD_LIBRARY_PATH=
-JAVA_LIBS="-framework JavaVM"
-</pre></div>
-<p>The Apple developer versions of the JDK install somewhere like
-</p><div class="example">
-<pre class="example">JAVA_HOME=/Library/Java/JavaVirtualMachines/1.6.0_43-b01-447.jdk/Contents/Home
-</pre></div>
-<p>The Oracle JDK can be specified explicitly by something like
+need some help, e.g. by setting <code>JAVA_HOME</code>.  The Oracle JDK can
+be specified explicitly by something like
 </p><div class="example">
-<pre class="example">JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_25.jdk/Contents/Home
+<pre class="example">JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_121.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" 
 </pre></div>
 <p>in <samp>config.site</samp>.
 </p>
-<p>Note that it is necessary to set the environment variable <code>NOAWT</code>
-to <code>1</code> to install many of the Java-using packages.
+<p>(An Apple JRE, if available, can be specified explicitly by something
+like
+</p><div class="example">
+<pre class="example">JAVA_HOME=/System/Library/Frameworks/JavaVM.framework/Home
+JAVA_CPPFLAGS="-I/System/Library/Frameworks/JavaVM.framework/Headers"
+JAVA_LD_LIBRARY_PATH=
+JAVA_LIBS="-framework JavaVM"
+</pre></div>
+<p>.)
+</p>
+<p>Note that it is necessary to set the environment variable <code>NOAWT</code> to
+<code>1</code> to install many of the Java-using packages.
 </p>
 
 <hr>
 <a name="Frameworks"></a>
 <a name="Frameworks-1"></a>
-<h4 class="subsection">C.3.8 Frameworks</h4>
+<h4 class="subsection">C.3.3 Frameworks</h4>
 
 <p>The <acronym>CRAN</acronym> build of R is installed as a framework, which is
-selected by the default option
+selected by the option
 </p>
 <div class="example">
 <pre class="example">./configure --enable-R-framework
 </pre></div>
 
-<p>(This is intended to be used with an Apple toolchain: other compilers may
-not support frameworks correctly.)
+<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.)
 </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
@@ -5055,21 +5210,22 @@ dynamic library.  This option configures R to be built and installed
 as a framework called <samp>R.framework</samp>.  The default installation path
 for <samp>R.framework</samp> is <samp>/Library/Frameworks</samp> but this can be
 changed at configure time by specifying the flag
-<samp>--enable-R-framework[=<var>DIR</var>]</samp> or at install time as
+<samp>--enable-R-framework[=<var>DIR</var>]</samp> (or <samp>--prefix</samp>) or at
+install time <em>via</em>
 </p>
 <div class="example">
 <pre class="example">make prefix=/where/you/want/R.framework/to/go install
 </pre></div>
 
 <p>Note that installation as a framework is non-standard (especially to a
-non-standard location) and utilities may not support it (e.g. the
+non-standard location) and Unix utilities may not support it (e.g. the
 <code>pkg-config</code> file <samp>libR.pc</samp> will be put somewhere unknown
 to <code>pkg-config</code>).
 </p>
 <hr>
 <a name="Building-R_002eapp"></a>
 <a name="Building-R_002eapp-1"></a>
-<h4 class="subsection">C.3.9 Building R.app</h4>
+<h4 class="subsection">C.3.4 Building R.app</h4>
 
 <p>Note that building the <small>R.APP</small> GUI console is a separate project, using
 Xcode.  Before compiling <small>R.APP</small> make sure the current version of R
@@ -5080,11 +5236,11 @@ the command-line (this can be a binary install).
 </p><div class="example">
 <pre class="example">svn co https://svn.r-project.org/R-packages/trunk/Mac-GUI
 </pre></div>
-<p>This can be built by loading the <code>R.xcodeproj</code> project (select the
-<code>R</code> target and the <code>SnowLeopard64</code> or <code>Lion64</code>
-configuration), or from the command-line by e.g.
+<p>and built by loading the <code>R.xcodeproj</code> project (select the
+<code>R</code> target and a suitable configuration), or from the command-line
+by e.g.
 </p><div class="example">
-<pre class="example">xcodebuild -target R -configuration SnowLeopard64
+<pre class="example">xcodebuild -target R -configuration Release
 </pre></div>
 <p>See also the <samp>INSTALL</samp> file in the checkout or directly at
 <a href="https://svn.r-project.org/R-packages/trunk/Mac-GUI/INSTALL">https://svn.r-project.org/R-packages/trunk/Mac-GUI/INSTALL</a>.
@@ -5101,29 +5257,44 @@ in the <samp>/Applications</samp> folder.
 <h3 class="section">C.4 Solaris</h3>
 <a name="index-Solaris"></a>
 
+
 <p>R has been built successfully on Solaris 10 (both Sparc and
-‘<samp>x86</samp>’) using the (zero cost) Oracle Solaris Studio compilers:
-there has been some success with
-<code>gcc</code> 4/<code>gfortran</code>.  (Recent Sun machines are AMD
-Opterons or Intel Xeons (‘<samp>amd64</samp>’) rather than ‘<samp>x86</samp>’, but
-32-bit ‘<samp>x86</samp>’ executables are the default.)
+‘<samp>x86</samp>’) using the (zero cost) Oracle Developer
+Studio<a name="DOCF72" href="#FOOT72"><sup>72</sup></a> compilers: there has been some success with
+<code>gcc</code>/<code>gfortran</code>.  (Recent Sun machines are AMD Opterons
+or Intel Xeons (‘<samp>amd64</samp>’) rather than ‘<samp>x86</samp>’, but 32-bit
+‘<samp>x86</samp>’ executables are the default.)  How these compilers
+identify<a name="DOCF73" href="#FOOT73"><sup>73</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
+manual for R 3.3.x.
 </p>
 <p>There have been few reports on Solaris 11, with no known extra issues.
-Solaris 9 and earlier are now so old that it is unlikely that R is
-still used with them, and they will not be considered here.
 </p>
 <p>The Solaris versions of several of the tools needed to build R
 (e.g. <code>make</code>, <code>ar</code> and <code>ld</code>) are in
 <samp>/usr/ccs/bin</samp>, so if using those tools ensure this is in your
 path.  A version of the preferred <acronym>GNU</acronym> <code>tar</code> is (if
-installed) in <samp>/usr/sfw/bin</samp>, as sometimes are tools like
-<code>makeinfo</code>.  It may be necessary to avoid the tools in
-<samp>/usr/ucb</samp>: POSIX-compliant versions of some tools can be found in
-<samp>/usr/xpg4/bin</samp> and <samp>/usr/xpg6/bin</samp>.
+installed) in <samp>/usr/sfw/bin</samp>.  It may be necessary to avoid the
+tools in <samp>/usr/ucb</samp>: POSIX-compliant versions of some tools can be
+found in <samp>/usr/xpg4/bin</samp> and <samp>/usr/xpg6/bin</samp>.
 </p>
 <p>A large selection of Open Source software can be installed from
-<a href="http://www.opencsw.org">http://www.opencsw.org</a>, by default installed under
-<samp>/opt/csw</samp>.
+<a href="https://www.opencsw.org">https://www.opencsw.org</a>, by default installed under
+<samp>/opt/csw</samp>.  Solaris 10 ships with <code>bzlib</code> version 1.0.6
+(sufficient) but <code>zlib</code> version 1.2.3 (too old): OpenCSW has 1.2.8.
+</p>
+<p>At least when compiling with Oracle compilers, Solaris uses far more
+stack space than other platforms.  This makes it desirable to build PCRE
+with the option <samp>--disable-stack-for-recursion</samp>: the OpenCSW
+distribution was at the time of writing.
+</p>
+<p>The Oracle compilers are unusual in not including
+<samp>/usr/local/include</samp> in the default include search path: R’s
+default <code>CPPFLAGS=-I/usr/local/include</code> remedies this.  If you rely
+on OpenCSW software you may need <code>CPPFLAGS=-I/opt/csw/include</code> (or
+both).
 </p>
 <p>You will need <acronym>GNU</acronym> <code>libiconv</code> and <code>readline</code>: the
 Solaris version of <code>iconv</code> is not sufficiently powerful.
@@ -5133,13 +5304,9 @@ packages require <acronym>GNU</acronym> <code>make</code> (some without good rea
 and without declaring it as ‘<samp>SystemRequirements</samp>’ in the
 <samp>DESCRIPTION</samp> file).
 </p>
-<p>Some people have reported that the Solaris <code>libintl</code> needs to be
-avoided, for example by using <samp>--disable-nls</samp> or
-<samp>--with-included-gettext</samp> or using <code>libintl</code> from OpenCSW.
-</p>
 <p>The support for the C99 <code>long double</code> type on Sparc hardware uses
 quad-precision arithmetic, and this is usually slow because it is done
-by software emulation.  On such systems <code>configure</code> option
+by software emulation.  On such systems the <code>configure</code> option
 <samp>--disable-long-double</samp> can be used for faster but less accurate
 computations.
 </p>
@@ -5150,17 +5317,9 @@ option <samp>--with-internal-tzcode</samp> is recommended, and required if
 you find time-zone abbreviations being given odd values (as has been
 seen on 64-bit builds without it).
 </p>
-<p>When using the Oracle compilers<a name="DOCF47" href="#FOOT47"><sup>47</sup></a> do <em>not</em> specify <samp>-fast</samp>, as this
-disables <acronym>IEEE</acronym> arithmetic and <code>make check</code> will fail.
-</p>
-<p>It has been reported that some Solaris installations need
-</p>
-<div class="example">
-<pre class="example">INTERNET_LIBS="-lsocket -lnsl"
-</pre></div>
-
-<p>on the <code>configure</code> command line or in file <samp>config.site</samp>;
-however, there have been many successful installs without this.
+<p>When using the Oracle compilers do <em>not</em> specify <samp>-fast</samp>, as
+this disables <acronym>IEEE</acronym> arithmetic and <code>make check</code> will
+fail.
 </p>
 <p>A little juggling of paths was needed to ensure <acronym>GNU</acronym>
 <code>libiconv</code> (in <samp>/usr/local</samp>) was used rather than the Solaris
@@ -5171,204 +5330,211 @@ however, there have been many successful installs without this.
 CFLAGS="-O -xlibmieee"
 F77=f95
 FFLAGS=-O
-CXX="CC -library=stlport4"
+CXX=CC
+CXXSTD="-library=stlport4"
 CXXFLAGS=-O
-FC=f95
+FC=$F77
 FCFLAGS=$FFLAGS
-FCLIBS="-lfai -lfsu"
-R_LD_LIBRARY_PATH="/usr/local/lib:/opt/csw/gcc4/lib:/opt/csw/lib"
+FCLIBS="-lfsu -lfui"
+R_LD_LIBRARY_PATH="/opt/developerstudio12.5/lib:/usr/local/lib:/opt/csw/lib"
 </pre></div>
 
-<p>For a 64-bit target add <samp>-m64</samp> to the compiler macros
-and use something like <code>LDFLAGS=-L/usr/local/lib/sparcv9</code> or
-<code>LDFLAGS=-L/usr/local/lib/amd64</code> as appropriate.
-It will also be necessary to point <code>pkg-config</code> at the 64-bit
-directories, e.g. one of
+<p>The Oracle compilers do not by default conform to the C99 standard
+(appendix F 8.9) on the return values of functions such as <code>log</code>:
+use <samp>-xlibmieee</samp> to ensure this.
 </p>
-<div class="example">
-<pre class="example">PKG_CONFIG_PATH=/opt/csw/lib/amd64/pkgconfig:/usr/lib/amd64/pkgconfig
-PKG_CONFIG_PATH=/opt/csw/lib/sparcv9/pkgconfig:/usr/lib/sparcv9/pkgconfig
-</pre></div>
-
-<p>and to specify a 64-bit Java VM by e.g.
-</p>
-<div class="example">
-<pre class="example">JAVA_CPPFLAGS="-I${JAVA_HOME}/../include -I${JAVA_HOME}/../include/solaris"
-JAVA_LD_LIBRARY_PATH=${JAVA_HOME}/lib/amd64/server
-JAVA_LIBS="-L${JAVA_HOME}/lib/amd64/server \
-  -R${JAVA_HOME}/lib/amd64/server -ljvm"
-</pre></div>
-<p>With Solaris Studio 12.[23] on Sparc, <code>FCLIBS</code> needs to be
-</p>
-<div class="example">
-<pre class="example">FCLIBS="-lfai -lfai2 -lfsu"
-</pre></div>
-
-<p>(and possibly other Fortran libraries, but this suffices for the
-packages currently on CRAN).
-</p>
-<p>Currently ‘<samp>amd64</samp>’ and ‘<samp>sparcv9</samp>’ builds work
-out-of-the-box with Sun Studio 12u1 but not Solaris Studio 12.2 and
-12.3: <samp>libRblas.so</samp> and <samp>lapack.so</samp> are generated with code
-that causes relocation errors (which is being linked in from the Fortran
-libraries).  This means that building 64-bit R as a shared library
-may be impossible with Solaris Studio >= 12.2.  For a standard build the
-trick seems to be to manually set <code>FLIBS</code> to avoid the troublesome
-libraries.  For example, on ‘<samp>amd64</samp>’ set in <samp>config.site</samp>
-something like
-</p>
-<div class="example">
-<pre class="example">FLIBS_IN_SO="-R/opt/solarisstudio12.3/lib/amd64
-  /opt/solarisstudio12.3/lib/amd64/libfui.so
-  /opt/solarisstudio12.3/lib/amd64/libfsu.so"
-</pre></div>
-<p>For 64-bit Sparc, set in <samp>config.site</samp> something like
-</p><div class="example">
-<pre class="example">FLIBS="-R/opt/solarisstudio12.3/prod/lib/sparc/64
- -lifai -lsunimath -lfai -lfai2 -lfsumai -lfprodai -lfminlai -lfmaxlai
- -lfminvai -lfmaxvai -lfui -lsunmath -lmtsk
- /opt/solarisstudio12.3/prod/lib/sparc/64/libfsu.so.1"
-</pre></div>
-
-<p>By default the Solaris Studio compilers do not by default conform to the C99
-standard (appendix F 8.9) on the return values of functions such as
-<code>log</code>: use <samp>-xlibmieee</samp> to ensure this.
+<p>A peculiarity of the Fortran compiler is that when asked to link a
+shared object it does not link against the Fortran runtime libraries.
+In R this is only used for packages with F9x code, hence the
+<code>FCLIBS</code> definition (which sufficed for <acronym>CRAN</acronym> packages
+with 12.5).
 </p>
 <p>You can target specific Sparc architectures for (slightly) higher
 performance: <samp>-xtarget=native</samp> (in <code>CFLAGS</code> etc) tunes the
 compilation to the current machine.
 </p>
-<p>Using <code>-xlibmil</code> in <code>CFLAGS</code> and <code>-xlibmil</code> in
+<p>Using <code>-xlibmil</code> in <code>CFLAGS</code> or <code>-xlibmil</code> in
 <code>FFLAGS</code> allows more system mathematical functions to be inlined.
 </p>
 
 <p>On ‘<samp>x86</samp>’ you will get marginally higher performance <em>via</em>
 </p>
 <div class="example">
-<pre class="example">CFLAGS="-xO5 -xc99 -xlibmieee -xlibmil -nofstore -xtarget=native"
-FFLAGS="-O5 -libmil -nofstore -xtarget=native"
+<pre class="example">CFLAGS="-xO5 -xlibmieee -xlibmil -nofstore -xtarget=native"
+FFLAGS="-xO5 -libmil -nofstore -xtarget=native"
 CXXFLAGS="-xO5 -xlibmil -nofstore -xtarget=native"
-SAFE_FFLAGS="-libmil -fstore -xtarget=native"
+SAFE_FFLAGS="-O -libmil -fstore -xtarget=native"
 </pre></div>
 
 <p>but the use of <code>-nofstore</code> can be less numerically stable, and some
-packages (notably <a href="http://CRAN.R-project.org/package=mgcv"><strong>mgcv</strong></a> on ‘<samp>x86</samp>’) failed to compile at
-higher optimization levels with version 12.3.
+packages have in the past failed to compile at optimization
+level 5.
 </p>
-<p>The Solaris Studio compilers provide several implementations of the
+<p>The Oracle compilers provide several implementations of the
 C++98 standard which select both the set of headers and a C++ runtime
 library.  These are selected by the <samp>-library</samp> flag, which as it
 is needed for both compiling and linking is best specified as part of
 the compiler.  The examples above use ‘<samp>stlport4</samp>’, currently the
 most modern of the options: the default (but still needed to be
 specified as it is needed for linking) is ‘<samp>Cstd</samp>’: see
-<a href="http://developers.sun.com/solaris/articles/cmp_stlport_libCstd.html">http://developers.sun.com/solaris/articles/cmp_stlport_libCstd.html</a>.
+<a href="http://www.oracle.com/technetwork/server-storage/solaris/cmp-stlport-libcstd-142559.html">http://www.oracle.com/technetwork/server-storage/solaris/cmp-stlport-libcstd-142559.html</a>.
 Note though that most external Solaris C++ libraries will have been
 built with ‘<samp>Cstd</samp>’ and so an R package using such libraries also
 needs to be.  Occasionally the option <samp>-library=stlport4,Crun</samp>
 has been needed.
 </p>
-<p>Several <acronym>CRAN</acronym> packages using C++ need the more liberal
-interpretation given by adding
-</p>
-<div class="example">
-<pre class="example">CXXFLAGS="-features=tmplrefstatic"
-</pre></div>
-
-
 <a name="index-BLAS-library-2"></a>
 <a name="index-LAPACK-library-2"></a>
 
 <p>The performance library <code>sunperf</code> is available for use with the
-Solaris Studio compilers.  If selected as a <acronym>BLAS</acronym>, it must also
-be selected as LAPACK <em>via</em> (for Solaris Studio 12.2)
+Oracle compilers.  If selected as a <acronym>BLAS</acronym>, it must also be
+selected as LAPACK <em>via</em>
 </p>
 <div class="example">
 <pre class="example">./configure --with-blas='-library=sunperf' --with-lapack
 </pre></div>
 
 <p>This has often given test failures in the past, in several different
-places.  At the time of writing it fails in <samp>tests/reg-BLAS.R</samp>, and on
-some builds, including for ‘<samp>amd64</samp>’, it fails in
-<code>example(eigen)</code>.
+places.<a name="DOCF74" href="#FOOT74"><sup>74</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
 increased to at least 20MB.
 </p>
+<p>Some people have reported that the Solaris <code>libintl</code> needs to be
+avoided, for example by using <samp>--disable-nls</samp> or
+<samp>--with-included-gettext</samp> or using <code>libintl</code> from OpenCSW.
+(On the other hand, there have been many successful installs which
+automatically detected <code>libintl</code> from OpenCSW or selected the
+included <code>gettext</code>.)
+</p>
+<p>It has been reported that some Solaris installations need
+</p>
+<div class="example">
+<pre class="example">INTERNET_LIBS="-lsocket -lnsl"
+</pre></div>
+
+<p>on the <code>configure</code> command line or in file <samp>config.site</samp>;
+however, there have been many successful installs without this.
+</p>
+<hr>
+<a name="g_t64_002dbit-builds"></a>
+<a name="g_t64_002dbit-builds-1"></a>
+<h4 class="subsection">C.4.1 64-bit builds</h4>
+
+<p>On both ‘<samp>x86</samp>’ and ‘<samp>Sparc</samp>’ platforms the compilers default to
+32-bit code.
+</p>
+<p>For a 64-bit target add <samp>-m64</samp> to the compiler macros
+and use something like <code>LDFLAGS=-L/usr/local/lib/amd64</code> or
+<code>LDFLAGS=-L/usr/local/lib/sparcv9</code> as appropriate (and other 64-bit
+library directories if used, e.g. <code>-L/opt/csw/lib/arm64</code>).
+It will also be necessary to point <code>pkg-config</code> at the 64-bit
+directories, e.g. something like one of
+</p>
+<div class="example">
+<pre class="example">PKG_CONFIG_PATH=/opt/csw/lib/amd64/pkgconfig:/usr/lib/amd64/pkgconfig
+PKG_CONFIG_PATH=/opt/csw/lib/sparcv9/pkgconfig:/usr/lib/sparcv9/pkgconfig
+</pre></div>
+
+<p>and to specify a 64-bit Java VM by e.g.
+</p>
+<div class="example">
+<pre class="example">JAVA_CPPFLAGS="-I${JAVA_HOME}/../include -I${JAVA_HOME}/../include/solaris"
+JAVA_LD_LIBRARY_PATH=${JAVA_HOME}/lib/amd64/server
+JAVA_LIBS="-L${JAVA_HOME}/lib/amd64/server \
+  -R${JAVA_HOME}/lib/amd64/server -ljvm"
+</pre></div>
+
+<p>(In most cases the <samp>64</samp> directory is a link to <samp>amd64</samp> or
+<samp>sparcv9</samp> as appropriate.)
+</p>
+<p>Using PCRE with JIT enabled on 64-bit Sparc led to segfaults.
+</p>
 
 
 <hr>
 <a name="Using-gcc"></a>
 <a name="Using-gcc-1"></a>
-<h4 class="subsection">C.4.1 Using gcc</h4>
+<h4 class="subsection">C.4.2 Using gcc</h4>
 
 <p>If using <code>gcc</code>, ensure that the compiler was compiled for the
 version of Solaris in use.  (This can be ascertained from <code>gcc
 -v</code>.)  <code>gcc</code> makes modified versions of some header files, and
 several reports of problems were due to using <code>gcc</code> compiled on
-one version of Solaris on a later version.  
+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="DOCF75" href="#FOOT75"><sup>75</sup></a>  with the modified versions included with OpenCSW’s
+binary distribution.
 </p>
 <p>The notes here are for <code>gcc</code> set up to use the Solaris linker:
 it can also be set up to use GNU <code>ld</code>, but that has not been
-tested.
+tested.  The tests were for compilers from the OpenCSW repository:
+Solaris systems often come with much older compilers installed under
+<samp>/usr/sfw/bin</samp>.  One of <samp>-m32</samp> or <samp>-m64</samp> will be the
+default and could be omitted, but it is not easy to find out which.
+(For OpenCSW it is <samp>-m32</samp>.)
 </p>
-<p>Compilation for a 32-bit Sparc target with <code>gcc</code> 4.9.0
-needed
+<p>Compilation for an ‘<samp>x86</samp>’ target with <code>gcc</code> 4.9.2 or
+<code>gcc</code> 5.2.0 needed
 </p>
 <div class="example">
-<pre class="example">CPPFLAGS=-I/opt/csw/include
-LDFLAGS="-L/opt/csw/gcc4/lib -L/opt/csw/lib"
+<pre class="example">CC="gcc -m32"
+CPPFLAGS="-I/opt/csw/include -I/usr/local/include"
+F77="gfortran -m32"
+CXX="g++ -m32"
+FC=$F77
+LDFLAGS="-L/opt/csw/lib -L/usr/local/lib"
 </pre></div>
 
-<p>and for a 64-bit Sparc target
-</p><div class="example">
+<p>For an ‘<samp>amd64</samp>’ target we used 
+</p>
+<div class="example">
 <pre class="example">CC="gcc -m64"
+CPPFLAGS="-I/opt/csw/include -I/usr/local/include"
 F77="gfortran -m64"
 CXX="g++ -m64"
 FC=$F77
-CPPFLAGS=-I/opt/csw/include
-LDFLAGS="-L/opt/csw/gcc4/lib/sparcv9 -L/opt/csw/lib/sparcv9"
+LDFLAGS="-L/opt/csw/lib/amd64 -L/usr/local/lib/amd64"
 </pre></div>
 
-<p>Note that paths such as <samp>/opt/csw/gcc4/lib/sparcv9</samp> may need to
-be in the
+<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>
 <code>LD_LIBRARY_PATH</code> during configuration.
 </p>
-<p>The compilation can be tuned to a particular cpu: the <acronym>CRAN</acronym>
-check system uses <code>-mtune=niagara2</code>.
-</p>
-<p>Compilation for an ‘<samp>x86</samp>’ target with <code>gcc</code> 4.9.0
-needed
+
+<p>Compilation for a 32-bit Sparc target with <code>gcc</code> 4.9.2 or
+<code>gcc</code> 5.2.0 needed
 </p>
 <div class="example">
-<pre class="example">CC="/opt/csw/gcc4/bin/gcc -m32"
+<pre class="example">CC="gcc -m32"
 CPPFLAGS="-I/opt/csw/include -I/usr/local/include"
-F77="/opt/csw/gcc4/bin/gfortran -m32"
-CXX="/opt/csw/gcc4/bin/g++ -m32"
-FC="/opt/csw/gcc4/bin/gfortran -m32"
-LDFLAGS="-L/opt/csw/gcc4/lib -L/opt/csw/lib -L/usr/local/lib"
+F77="gfortran -m32"
+CXX="g++ -m32"
+FC=$F77
+LDFLAGS="-L/opt/csw/lib -L/usr/local/lib"
 </pre></div>
 
-<p>(<code>-L/opt/csw/lib</code> is needed since TeXLive was built using
-32-bit <code>gcc</code>, and we need <samp>/opt/csw/lib</samp> in
-<code>R_LD_LIBRARY_PATH</code>.)
-</p>
-<p>For an ‘<samp>amd64</samp>’ target with <code>gcc</code> 4.9.0
-we used 
-</p>
-<div class="example">
-<pre class="example">CC="/opt/csw/gcc4/bin/gcc -m64"
+<p>and for a 64-bit Sparc target
+</p><div class="example">
+<pre class="example">CC="gcc -m64"
 CPPFLAGS="-I/opt/csw/include -I/usr/local/include"
-F77="/opt/csw/gcc4/bin/gfortran -m64"
-FPICFLAGS=-fPIC
-CXX="/opt/csw/gcc4/bin/g++ -m64"
+F77="gfortran -m64"
+CXX="g++ -m64"
 FC=$F77
-FCPICFLAGS=$FPICFLAGS
-LDFLAGS="-L/opt/csw/gcc4/lib/amd64 -L/opt/csw/lib/amd64"
+LDFLAGS="-L/opt/csw/lib/sparcv9 -L/usr/local/lib/sparcv9"
 </pre></div>
 
+<p>Note that paths such as <samp>/opt/csw/lib</samp>, <samp>/usr/local/lib/sparcv9</samp> or
+<samp>/opt/csw/lib/sparcv9</samp> may need to be in the
+<a name="index-LD_005fLIBRARY_005fPATH-5"></a>
+<code>LD_LIBRARY_PATH</code> during configuration.
+</p>
+<p>The compilation can be tuned to a particular cpu: the <acronym>CRAN</acronym>
+check Sparc system uses <code>-mcpu=niagara2</code>.
+</p>
+
 <hr>
 <a name="AIX"></a>
 <a name="AIX-1"></a>
@@ -5411,7 +5577,7 @@ be invoked as <code>xlf_r</code>.
 ‘<samp>""</samp>’ and so cannot be used.  (As far as we know <acronym>GNU</acronym>
 <code>libiconv</code> could be installed.)
 </p>
-<p>Fan Long reports success on AIX 5.3 using
+<p>Fan Long reported success on AIX 5.3 using
 </p>
 <div class="example">
 <pre class="example">OBJECT_MODE=64
@@ -5438,7 +5604,7 @@ acknowledged).
 </p>
 <p>It helps to describe the WU build environment first.  A small part of
 the software needed to build R and/or install packages is available
-directly from the AIX Installation DVDs, e.g., Java 6, X11, and Perl.
+directly from the AIX Installation DVDs, e.g., Java 6 and  X11.
 Additional open source software (OSS) is packaged for AIX in <samp>.rpm</samp>
 files and available from both IBM’s “AIX Toolbox for Linux
 Applications”
@@ -5458,7 +5624,7 @@ install the corresponding package from the ICU project
 binaries for various platforms which in case of AIX can be installed via
 unpacking the tarball to the root file system.  For full LaTeX
 support one can install the TeX Live DVD distribution
-(<a href="http://www.tug.org/texlive/">http://www.tug.org/texlive/</a>): it is recommended to update the
+(<a href="https://www.tug.org/texlive/">https://www.tug.org/texlive/</a>): it is recommended to update the
 distribution using the <code>tlmgr</code> update manager.  For 64-bit R builds
 supporting Tcl/Tk this needs to installed from the sources as available
 pre-compiled binaries supply only 32-bit shared objects.
@@ -5511,7 +5677,7 @@ environment, and to use <acronym>GNU</acronym> Make (e.g., via
 </p>
 <p>Further installation instructions to set up a proper R development
 environment can be found in the “R on AIX” project on R-Forge
-(<a href="http://R-Forge.R-project.org/projects/aix/">http://R-Forge.R-project.org/projects/aix/</a>).
+(<a href="https://R-Forge.R-project.org/projects/aix/">https://R-Forge.R-project.org/projects/aix/</a>).
 </p>
 <hr>
 <a name="FreeBSD"></a>
@@ -5519,66 +5685,40 @@ environment can be found in the “R on AIX” project on R-Forge
 <h3 class="section">C.6 FreeBSD</h3>
 <a name="index-FreeBSD"></a>
 
-<p>There have been no reports for R 3.0.0 or later.
+<p>There have been few recent reports on FreeBSD: there is a ‘port’ at
+<a href="https://www.freebsd.org/ports/math.html">https://www.freebsd.org/ports/math.html</a>.
+</p>
+<p>Use of ICU for collation and the <code>configure</code> option
+<samp>--with-internal-tzcode</samp> are desirable workarounds.
+</p>
+<hr>
+<a name="OpenBSD"></a>
+<a name="OpenBSD-1"></a>
+<h3 class="section">C.7 OpenBSD</h3>
+<a name="index-OpenBSD"></a>
+
+<p>Ingo Feinerer installed R version 3.2.2 on OpenBSD 5.8 arch
+‘<samp>amd64</samp>’ (their name for ‘<samp>x86_64</samp>’).  Details of the build
+(and patches applied) are at
+<a href="http://cvsweb.openbsd.org/cgi-bin/cvsweb/ports/math/R/">http://cvsweb.openbsd.org/cgi-bin/cvsweb/ports/math/R/</a>. (Downgrading
+the <code>zlib</code> requirement to 1.2.3 is against the advice of the R
+developers.)
 </p>
 <hr>
 <a name="Cygwin"></a>
 <a name="Cygwin-1"></a>
-<h3 class="section">C.7 Cygwin</h3>
-
-<p>The Cygwin emulation layer on Windows can be treated as a Unix-alike OS.
-This is unsupported, but experiments have been conducted and a few
-workarounds added.  Cygwin has not been tested for R 3.0.0 or later.
-</p>
-<p>The 64-bit version is completely unsupported.  The 32-bit version has
-never worked well enough to pass R’s <code>make check</code>.
-</p>
-<p>R requires C99 complex type support, which is available as from
-Cygwin 1.7.8 (March 2011).  However, the (then) implementation of
-<code>cacos</code> gives incorrect results, so we undefine <code>HAVE_CACOS</code>
-in <samp>src/main/complex.c</samp> on that platform.  It has been reported
-that some C99 long double mathematical functions are missing, so
-configuring with <samp>--disable-long-double</samp> was required.
-</p>
-<p>Only building as a shared library can possibly work,<a name="DOCF48" href="#FOOT48"><sup>48</sup></a> so use e.g.
-</p>
-<div class="example">
-<pre class="example">./configure --disable-nls --enable-R-shlib FLIBS=-lgfortran
-make
-</pre></div>
+<h3 class="section">C.8 Cygwin</h3>
 
-<p>Enabling NLS does work if required, although adding
-<samp>--with-included-gettext</samp> is preferable.  You will see many
-warnings about the use of auto-import.  Setting ‘<samp>FLIBS</samp>’ explicitly
-seems needed currently as the auto-detection gives an incorrect value.
+<p>The 32-bit version has never worked well enough to pass R’s
+<code>make check</code>, and residual support from earlier experiments was
+removed in R 3.3.0.
 </p>
-<p>You will need the <strong>tetex-extra</strong> Cygwin package to build
-<samp>NEWS.pdf</samp> and the vignettes.
-</p>
-<p>Note that this gives you a command-line application using <code>readline</code>
-for command editing.  The ‘<samp>X11</samp>’ graphics device will work if a
-suitable X server is running, and the standard Unix-alike ways of
-installing source packages work.  There was a bug in the
-<samp>/usr/lib/tkConfig.sh</samp> script in the version we looked at, which
-needs to have
-</p>
-<div class="example">
-<pre class="example">TK_LIB_SPEC='-ltk84'
-</pre></div>
-
-<p>The overhead of using shell scripts makes this noticeably slower than a
-native build of R on Windows.
-</p>
-<p>Even when R could be built, not all the tests passed: there were
-incorrect results from wide-character regular expressions code and from
-sourcing CR-delimited files.
-</p>
-<p>Do not use Cygwin’s BLAS library: it is known to give incorrect results.
+<p>The 64-bit version is completely unsupported.
 </p>
 <hr>
 <a name="New-platforms"></a>
 <a name="New-platforms-1"></a>
-<h3 class="section">C.8 New platforms</h3>
+<h3 class="section">C.9 New platforms</h3>
 
 <p>There are a number of sources of problems when installing R on a new
 hardware/OS platform.  These include
@@ -5599,8 +5739,8 @@ directory.
 </p>
 <p>Beware of using high levels of optimization, at least initially.  On
 many compilers these reduce the degree of compliance to the
-<acronym>IEEE</acronym> model.  For example, using <samp>-fast</samp> on the Solaris
-Studio compilers has caused R’s <code>NaN</code> to be set incorrectly, and
+<acronym>IEEE</acronym> model.  For example, using <samp>-fast</samp> on the Oracle
+compilers has caused R’s <code>NaN</code> to be set incorrectly, and
 <code>gcc</code>’s <samp>-ffast-math</samp> and <code>clang</code>’s
 <samp>-Ofast</samp> have given incorrect results.
 </p>
@@ -5646,13 +5786,13 @@ have had a fair amount of practice at porting R to new platforms
 
 <p>If you want to build R or add-on packages from source in Windows, you
 will need to collect, install and test an extensive set of tools.  See
-<a href="http://CRAN.R-project.org/bin/windows/Rtools/">http://CRAN.R-project.org/bin/windows/Rtools/</a> for the current
+<a href="https://CRAN.R-project.org/bin/windows/Rtools/">https://CRAN.R-project.org/bin/windows/Rtools/</a> for the current
 locations and other updates to these instructions.  (Most Windows users
 will not need to build add-on packages from source; see <a href="#Add_002don-packages">Add-on packages</a> for details.)
 </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="DOCF49" href="#FOOT49"><sup>49</sup></a>  The build process for add-on packages is somewhat more
+even to the choice of particular versions of the tools.<a name="DOCF76" href="#FOOT76"><sup>76</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>
@@ -5661,10 +5801,10 @@ here as a result of bitter experience.  Please do not report problems to
 the R mailing lists unless you have followed all the prescriptions.</em>
 </p>
 <p>We have collected most of the necessary tools (unfortunately not all,
-due to license or size limitations) into an executable installer
-named<a name="DOCF50" href="#FOOT50"><sup>50</sup></a>  <samp>Rtools31.exe</samp>,
-available from <a href="http://CRAN.R-project.org/bin/windows/Rtools/">http://CRAN.R-project.org/bin/windows/Rtools/</a>. You
-should download and run it, choosing the default “Package authoring
+due to license or size limitations) into an executable installer named
+<samp>Rtools*.exe</samp>, available from
+<a href="https://CRAN.R-project.org/bin/windows/Rtools/">https://CRAN.R-project.org/bin/windows/Rtools/</a>. You should
+download and run it, choosing the default “Package authoring
 installation” to build add-on packages, or the “full installation” if
 you intend to build R.
 </p>
@@ -5675,8 +5815,7 @@ See the subsections below for detailed descriptions.
 </li><li> The MinGW-w64 32/64-bit toolchain to compile C, Fortran and C++.
 </li></ul>
 <p>For installing simple source packages containing data or R source but
-no compiled code, none of these are needed.  Perl is no longer needed to
-build R nor to install nor develop source packages.
+no compiled code, none of these are needed.
 </p>
 <p>A complete build of R including PDF manuals, and producing the
 installer will also need the following:
@@ -5700,13 +5839,13 @@ use filepaths containing spaces: you can always use the short forms
 <p>For example for a 32-bit build, all on one line,
 </p>
 <div class="example">
-<pre class="example">PATH=c:\Rtools\bin;c:\Rtools\gcc-4.6.3\bin;c:\MiKTeX\miktex\bin;
-     c:\R\R-3.1\bin\i386;c:\windows;c:\windows\system32
+<pre class="example">PATH=c:\Rtools\bin;c:\MiKTeX\miktex\bin;
+     c:\R\R-3.2\bin\i386;c:\windows;c:\windows\system32
 </pre></div>
 
 <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="DOCF51" href="#FOOT51"><sup>51</sup></a> in other directories, and they will <strong>not</strong>
+tools<a name="DOCF77" href="#FOOT77"><sup>77</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>
@@ -5727,10 +5866,10 @@ path.
 LaTeX includes a suitable port of <code>pdftex</code>.  This can be set up
 to install extra packages ‘on the fly’, which is the simplest way to use
 it (and the default).  The ‘basic’ version of ‘<samp>MiKTeX</samp>’ almost
-suffices: when last tested packages
+suffices: when last checked packages
 </p>
 <div class="example">
-<pre class="example">epsf fancyvrb inconsolata listings mptopdf natbib url
+<pre class="example">epsf inconsolata mptopdf url
 </pre></div>
 
 <p>needed to be added (on the fly or <em>via</em> the ‘<samp>MiKTeX</samp>’ Package
@@ -5741,8 +5880,8 @@ Manager.
 <p>The <samp>Rtools*.exe</samp> installer does <em>not</em> include any version of
 LaTeX.
 </p>
-<p>It is also possible to use the TeXLive distribution from
-<a href="http://www.tug.org/texlive/">http://www.tug.org/texlive/</a>.
+<p>It is also possible to use the TeX Live distribution from
+<a href="https://www.tug.org/texlive/">https://www.tug.org/texlive/</a>.
 </p>
 <a name="index-R_005fRD4PDF-2"></a>
 <p>Please read <a href="#Making-the-manuals">Making the manuals</a> about how to make <samp>fullrefman.pdf</samp>
@@ -5755,7 +5894,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.1.2-win.exe</samp>) we
+<p>To make the installer package (<samp>R-3.4.0-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>.
@@ -5779,7 +5918,7 @@ of at least <code>basename</code>, <code>cat</code>, <code>cmp</code>, <code>com
 <code>mkdir</code>, <code>mv</code>, <code>rm</code>, <code>rsync</code>, <code>sed</code>, <code>sh</code>,
 <code>sort</code>, <code>tar</code>, <code>texindex</code>, <code>touch</code> and <code>uniq</code>;
 we use those from the Cygwin distribution
-(<a href="http://www.cygwin.com/">http://www.cygwin.com/</a>) or compiled from the sources.  You will
+(<a href="https://www.cygwin.com/">https://www.cygwin.com/</a>) or compiled from the sources.  You will
 also need <code>zip</code> and <code>unzip</code> from the Info-ZIP project
 (<a href="http://www.info-zip.org/">http://www.info-zip.org/</a>).  All of these tools are in
 <samp>Rtools*.exe</samp>.
@@ -5807,17 +5946,14 @@ Windows-style paths.
 <p>Technically you need more than just a compiler so the set of tools is
 referred to as a ‘toolchain’.
 </p>
-<p>The preferred toolchain since R 2.14.2 is part of
-<code>Rtools30.exe</code>: this uses a beta version of <code>gcc 4.6.3</code>
-and version 2.0.1 of the MinGW-w64 project’s runtime.
+<p>The preferred toolchain is part of <code>Rtools*.exe</code>: this uses a 
+version of <code>gcc 4.9.3</code> and version rt_v3 of the MinGW-w64
+project’s runtime.
 </p>
-<p>This toolchain uses <em>multilib</em>: that is there is a single front-end
-such as <code>gcc.exe</code> for each of the compilers and 32-bit (the
-default) and 64-bit compilation are selected by the flags<a name="DOCF52" href="#FOOT52"><sup>52</sup></a>  <samp>-m32</samp> and <samp>-m64</samp>
-respectively.  The tools are all 32-bit Windows executables and should
-be able to run on any current version of Windows—however you do need a
-64-bit version of Windows to build 64-bit R as the build process runs
-R.
+<p>This toolchain does not use <em>multilib</em>: separate front-ends are
+used for 32-bit and 64-bit compilation.  These compilers need to be
+specified in <code>BINPREF</code> and <code>BINPREF64</code> make variables as 
+described previously at the end of <a href="#Windows-packages">Windows packages</a>.
 </p>
 <p>To select a 32-bit or 64-bit build of R, set the options in
 <samp>MkRules.local</samp> appropriately (following the comments in the file).
@@ -5825,10 +5961,10 @@ R.
 <p>Some external software libraries will need to be re-compiled under the
 new toolchain: especially those providing a C++ interface.  Many of
 those used by <acronym>CRAN</acronym> packages are available from
-<a href="http://www.stats.ox.ac.uk/pub/Rtools/multilib/">http://www.stats.ox.ac.uk/pub/Rtools/multilib/</a>.  Users
-developing packages with <a href="http://CRAN.R-project.org/package=Rcpp"><strong>Rcpp</strong></a> need to ensure that they use a
+<a href="https://www.stats.ox.ac.uk/pub/Rtools/multilib/">https://www.stats.ox.ac.uk/pub/Rtools/multilib/</a>.  Users
+developing packages with <a href="https://CRAN.R-project.org/package=Rcpp"><strong>Rcpp</strong></a> need to ensure that they use a
 version built with exactly the same toolchain as their package: the
-recommendation is to build <a href="http://CRAN.R-project.org/package=Rcpp"><strong>Rcpp</strong></a> from its sources yourself.
+recommendation is to build <a href="https://CRAN.R-project.org/package=Rcpp"><strong>Rcpp</strong></a> from its sources yourself.
 </p>
 <p>There is support for OpenMP and pthreads in this toolchain.  As the
 performance of OpenMP on Windows is poor for small tasks, it is not used
@@ -5846,11 +5982,11 @@ binaries of <code>qpdf</code> are available from
 to the <code>qpdf</code> installation in file <samp>MkRules.local</samp>.
 </p>
 <p>Developers of packages will find some of the ‘goodies’ at
-<a href="http://www.stats.ox.ac.uk/pub/Rtools/goodies">http://www.stats.ox.ac.uk/pub/Rtools/goodies</a> useful.  
+<a href="https://www.stats.ox.ac.uk/pub/Rtools/goodies">https://www.stats.ox.ac.uk/pub/Rtools/goodies</a> useful.  
 </p>
 <p>There is a version of the <code>file</code> command that identifies the
 type of files, and is used by <code>Rcmd check</code> if available.  The
-binary distribution is included in <samp>Rtools30.exe</samp>.
+binary distribution is included in <samp>Rtools*.exe</samp>.
 </p>
 <p>The file <samp>xzutils.zip</samp> contains the program <code>xz</code> which can
 be used to (de)compress files with that form of compression.
@@ -5948,7 +6084,7 @@ be used to (de)compress files with that form of compression.
 <tr><td colspan="4"> <hr></td></tr>
 <tr><th><a name="Concept-index_cp_letter-B">B</a></th><td></td><td></td></tr>
 <tr><td></td><td valign="top"><a href="#index-BLAS-library">BLAS library</a>:</td><td> </td><td valign="top"><a href="#Linear-algebra">Linear algebra</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-BLAS-library-1">BLAS library</a>:</td><td> </td><td valign="top"><a href="#OS-X">OS X</a></td></tr>
+<tr><td></td><td valign="top"><a href="#index-BLAS-library-1">BLAS library</a>:</td><td> </td><td valign="top"><a href="#macOS">macOS</a></td></tr>
 <tr><td></td><td valign="top"><a href="#index-BLAS-library-2">BLAS library</a>:</td><td> </td><td valign="top"><a href="#Solaris">Solaris</a></td></tr>
 <tr><td colspan="4"> <hr></td></tr>
 <tr><th><a name="Concept-index_cp_letter-F">F</a></th><td></td><td></td></tr>
@@ -5963,7 +6099,7 @@ be used to (de)compress files with that form of compression.
 <tr><td colspan="4"> <hr></td></tr>
 <tr><th><a name="Concept-index_cp_letter-L">L</a></th><td></td><td></td></tr>
 <tr><td></td><td valign="top"><a href="#index-LAPACK-library">LAPACK library</a>:</td><td> </td><td valign="top"><a href="#LAPACK">LAPACK</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-LAPACK-library-1">LAPACK library</a>:</td><td> </td><td valign="top"><a href="#OS-X">OS X</a></td></tr>
+<tr><td></td><td valign="top"><a href="#index-LAPACK-library-1">LAPACK library</a>:</td><td> </td><td valign="top"><a href="#macOS">macOS</a></td></tr>
 <tr><td></td><td valign="top"><a href="#index-LAPACK-library-2">LAPACK library</a>:</td><td> </td><td valign="top"><a href="#Solaris">Solaris</a></td></tr>
 <tr><td></td><td valign="top"><a href="#index-Libraries">Libraries</a>:</td><td> </td><td valign="top"><a href="#Add_002don-packages">Add-on packages</a></td></tr>
 <tr><td></td><td valign="top"><a href="#index-Libraries_002c-managing">Libraries, managing</a>:</td><td> </td><td valign="top"><a href="#Managing-libraries">Managing libraries</a></td></tr>
@@ -5976,14 +6112,15 @@ be used to (de)compress files with that form of compression.
 <tr><td></td><td valign="top"><a href="#index-Localization">Localization</a>:</td><td> </td><td valign="top"><a href="#Internationalization">Internationalization</a></td></tr>
 <tr><td colspan="4"> <hr></td></tr>
 <tr><th><a name="Concept-index_cp_letter-M">M</a></th><td></td><td></td></tr>
+<tr><td></td><td valign="top"><a href="#index-macOS">macOS</a>:</td><td> </td><td valign="top"><a href="#Installing-R-under-Unix_002dalikes">Installing R under Unix-alikes</a></td></tr>
+<tr><td></td><td valign="top"><a href="#index-macOS-1">macOS</a>:</td><td> </td><td valign="top"><a href="#Installing-R-under-macOS">Installing R under macOS</a></td></tr>
+<tr><td></td><td valign="top"><a href="#index-macOS-2">macOS</a>:</td><td> </td><td valign="top"><a href="#macOS">macOS</a></td></tr>
 <tr><td></td><td valign="top"><a href="#index-Manuals">Manuals</a>:</td><td> </td><td valign="top"><a href="#Making-the-manuals">Making the manuals</a></td></tr>
 <tr><td></td><td valign="top"><a href="#index-Manuals_002c-installing">Manuals, installing</a>:</td><td> </td><td valign="top"><a href="#Installation">Installation</a></td></tr>
 <tr><td colspan="4"> <hr></td></tr>
 <tr><th><a name="Concept-index_cp_letter-O">O</a></th><td></td><td></td></tr>
 <tr><td></td><td valign="top"><a href="#index-Obtaining-R">Obtaining R</a>:</td><td> </td><td valign="top"><a href="#Obtaining-R">Obtaining R</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-OS-X">OS X</a>:</td><td> </td><td valign="top"><a href="#Installing-R-under-Unix_002dalikes">Installing R under Unix-alikes</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-OS-X-1">OS X</a>:</td><td> </td><td valign="top"><a href="#Installing-R-under-OS-X">Installing R under OS X</a></td></tr>
-<tr><td></td><td valign="top"><a href="#index-OS-X-2">OS X</a>:</td><td> </td><td valign="top"><a href="#OS-X">OS X</a></td></tr>
+<tr><td></td><td valign="top"><a href="#index-OpenBSD">OpenBSD</a>:</td><td> </td><td valign="top"><a href="#OpenBSD">OpenBSD</a></td></tr>
 <tr><td colspan="4"> <hr></td></tr>
 <tr><th><a name="Concept-index_cp_letter-P">P</a></th><td></td><td></td></tr>
 <tr><td></td><td valign="top"><a href="#index-Packages">Packages</a>:</td><td> </td><td valign="top"><a href="#Add_002don-packages">Add-on packages</a></td></tr>
@@ -5993,7 +6130,6 @@ be used to (de)compress files with that form of compression.
 <tr><td></td><td valign="top"><a href="#index-Packages_002c-updating">Packages, updating</a>:</td><td> </td><td valign="top"><a href="#Updating-packages">Updating packages</a></td></tr>
 <tr><td colspan="4"> <hr></td></tr>
 <tr><th><a name="Concept-index_cp_letter-R">R</a></th><td></td><td></td></tr>
-<tr><td></td><td valign="top"><a href="#index-Rbitmap_002edll">Rbitmap.dll</a>:</td><td> </td><td valign="top"><a href="#Building-the-bitmap-files">Building the bitmap files</a></td></tr>
 <tr><td></td><td valign="top"><a href="#index-Repositories">Repositories</a>:</td><td> </td><td valign="top"><a href="#Setting-up-a-package-repository">Setting up a package repository</a></td></tr>
 <tr><td colspan="4"> <hr></td></tr>
 <tr><th><a name="Concept-index_cp_letter-S">S</a></th><td></td><td></td></tr>
@@ -6071,6 +6207,8 @@ be used to (de)compress files with that form of compression.
 <tr><td></td><th align="left">Index Entry</th><td> </td><th align="left"> Section</th></tr>
 <tr><td colspan="4"> <hr></td></tr>
 <tr><th><a name="Environment-variable-index_en_letter-B">B</a></th><td></td><td></td></tr>
+<tr><td></td><td valign="top"><a href="#index-BINPREF"><code>BINPREF</code></a>:</td><td> </td><td valign="top"><a href="#Windows-packages">Windows packages</a></td></tr>
+<tr><td></td><td valign="top"><a href="#index-BINPREF64"><code>BINPREF64</code></a>:</td><td> </td><td valign="top"><a href="#Windows-packages">Windows packages</a></td></tr>
 <tr><td></td><td valign="top"><a href="#index-BLAS_005fLIBS"><code>BLAS_LIBS</code></a>:</td><td> </td><td valign="top"><a href="#BLAS">BLAS</a></td></tr>
 <tr><td colspan="4"> <hr></td></tr>
 <tr><th><a name="Environment-variable-index_en_letter-C">C</a></th><td></td><td></td></tr>
@@ -6104,6 +6242,7 @@ be used to (de)compress files with that form of compression.
 <tr><td></td><td valign="top"><a href="#index-LD_005fLIBRARY_005fPATH-2"><code>LD_LIBRARY_PATH</code></a>:</td><td> </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> </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> </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-5"><code>LD_LIBRARY_PATH</code></a>:</td><td> </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> </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>
@@ -6183,7 +6322,7 @@ be used to (de)compress files with that form of compression.
 <h3><a name="FOOT1" href="#DOCF1">(1)</a></h3>
 <p>e.g. <acronym>GNU</acronym>
 <code>tar</code> version 1.15 or later, or that from the ‘<samp>libarchive</samp>’
-(as used on OS X versions 10.6 and later) or ‘Heirloom Toolchest’
+(as used on macOS versions 10.6 and later) or ‘Heirloom Toolchest’
 distributions.</p>
 <h3><a name="FOOT2" href="#DOCF2">(2)</a></h3>
 <p>for some Subversion clients
@@ -6196,177 +6335,274 @@ paths containing spaces, but external software used by R, e.g.
 <p>which use <samp>lib</samp> rather than
 <samp>lib64</samp> for their primary 64-bit library directories.</p>
 <h3><a name="FOOT5" href="#DOCF5">(5)</a></h3>
-<p>for example, if you configured R with
-<samp>--without-recommended</samp>.</p>
-<h3><a name="FOOT6" href="#DOCF6">(6)</a></h3>
 <p>Instructions on how to install the latest
 version are at
-<a href="http://www.ctan.org/tex-archive/fonts/inconsolata/">http://www.ctan.org/tex-archive/fonts/inconsolata/</a>.</p>
-<h3><a name="FOOT7" href="#DOCF7">(7)</a></h3>
+<a href="https://www.ctan.org/tex-archive/fonts/inconsolata/">https://www.ctan.org/tex-archive/fonts/inconsolata/</a>.</p>
+<h3><a name="FOOT6" href="#DOCF6">(6)</a></h3>
 <p>on a
 Unix-alike, ‘<samp>inconsolata</samp>’ is omitted if not found by
 <code>configure</code>.</p>
-<h3><a name="FOOT8" href="#DOCF8">(8)</a></h3>
-<p>The <code>linktoc</code> 
-settings require <strong>hyperref</strong> version 6.78f or newer; with older versions of
-<strong>hyperref</strong> use <code>linktocpage=false</code> to hyperlink the text.</p>
-<h3><a name="FOOT9" href="#DOCF9">(9)</a></h3>
+<h3><a name="FOOT7" href="#DOCF7">(7)</a></h3>
 <p>This will be needed if more than one
 sub-architecture is to be installed.</p>
-<h3><a name="FOOT10" href="#DOCF10">(10)</a></h3>
+<h3><a name="FOOT8" href="#DOCF8">(8)</a></h3>
 <p>with possible values
 ‘<samp>i386</samp>’, ‘<samp>x64</samp>’, ‘<samp>32</samp>’ and ‘<samp>64</samp>’.</p>
-<h3><a name="FOOT11" href="#DOCF11">(11)</a></h3>
-<p>mainly on RedHat and Fedora, whose layout is described
-here.</p>
-<h3><a name="FOOT12" href="#DOCF12">(12)</a></h3>
+<h3><a name="FOOT9" href="#DOCF9">(9)</a></h3>
+<p>mainly on RedHat and Fedora, whose
+layout is described here.</p>
+<h3><a name="FOOT10" href="#DOCF10">(10)</a></h3>
 <p>How to prepare such a directory is described in file
 <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>
+<h3><a name="FOOT12" href="#DOCF12">(12)</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>
-<p>unless they were excluded in the build.</p>
+<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>
+<p>Currently only
+GCC 6 and later, but this has been mooted for others.</p>
+<h3><a name="FOOT15" href="#DOCF15">(15)</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>
+<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>
+<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>
+<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>
+<h3><a name="FOOT21" href="#DOCF21">(21)</a></h3>
 <p>its binding is locked once the startup files have been
 read, so users cannot easily change it.</p>
-<h3><a name="FOOT15" href="#DOCF15">(15)</a></h3>
+<h3><a name="FOOT22" href="#DOCF22">(22)</a></h3>
 <p>If a proxy needs to be set, see
 <code>?download.file</code>.</p>
-<h3><a name="FOOT16" href="#DOCF16">(16)</a></h3>
+<h3><a name="FOOT23" href="#DOCF23">(23)</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’s <samp>DESCRIPTION</samp> file.</p>
-<h3><a name="FOOT17" href="#DOCF17">(17)</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="FOOT18" href="#DOCF18">(18)</a></h3>
+<h3><a name="FOOT24" href="#DOCF24">(24)</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>
+<p>Note that capitalization and version may differ from
+the Open Source project.</p>
+<h3><a name="FOOT26" href="#DOCF26">(26)</a></h3>
+<p>using a path containing spaces is likely to cause
+problems</p>
+<h3><a name="FOOT27" href="#DOCF27">(27)</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>
 <p>‘X/Open Portability Guide’, which has
 had several versions.</p>
-<h3><a name="FOOT19" href="#DOCF19">(19)</a></h3>
+<h3><a name="FOOT29" href="#DOCF29">(29)</a></h3>
 <p>On some systems setting
 <code>LC_ALL</code> or <code>LC_MESSAGES</code> to ‘<samp>C</samp>’ disables <code>LANGUAGE</code>.</p>
-<h3><a name="FOOT20" href="#DOCF20">(20)</a></h3>
+<h3><a name="FOOT30" href="#DOCF30">(30)</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="FOOT21" href="#DOCF21">(21)</a></h3>
+<h3><a name="FOOT31" href="#DOCF31">(31)</a></h3>
 <p>the
 language written in England: some people living in the USA appropriate
 this name for their language.</p>
-<h3><a name="FOOT22" href="#DOCF22">(22)</a></h3>
+<h3><a name="FOOT32" href="#DOCF32">(32)</a></h3>
 <p>with
 Americanisms.</p>
-<h3><a name="FOOT23" href="#DOCF23">(23)</a></h3>
+<h3><a name="FOOT33" href="#DOCF33">(33)</a></h3>
 <p>also known as
 <acronym>IEEE</acronym> 754</p>
-<h3><a name="FOOT24" href="#DOCF24">(24)</a></h3>
+<h3><a name="FOOT34" href="#DOCF34">(34)</a></h3>
 <p>at least when storing quantities: the on-FPU
 precision is allowed to vary</p>
-<h3><a name="FOOT25" href="#DOCF25">(25)</a></h3>
+<h3><a name="FOOT35" href="#DOCF35">(35)</a></h3>
 <p>e.g. Bessel, beta and gamma functions</p>
-<h3><a name="FOOT26" href="#DOCF26">(26)</a></h3>
+<h3><a name="FOOT36" href="#DOCF36">(36)</a></h3>
 <p>including copying <samp>MkRules.dist</samp> to
 <samp>MkRule.local</samp> and selecting the architecture.</p>
-<h3><a name="FOOT27" href="#DOCF27">(27)</a></h3>
+<h3><a name="FOOT37" href="#DOCF37">(37)</a></h3>
 <p>also known as
 <acronym>IEEE</acronym> 754</p>
-<h3><a name="FOOT28" href="#DOCF28">(28)</a></h3>
+<h3><a name="FOOT38" href="#DOCF38">(38)</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="FOOT29" href="#DOCF29">(29)</a></h3>
+<h3><a name="FOOT39" href="#DOCF39">(39)</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>
 <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.</p>
-<h3><a name="FOOT30" href="#DOCF30">(30)</a></h3>
+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>
+<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>
 <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="FOOT31" href="#DOCF31">(31)</a></h3>
-<p>including the <code>opendir</code>, <code>readdir</code>,
+<h3><a name="FOOT43" href="#DOCF43">(43)</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, and either <code>putenv</code> or
-<code>setenv</code>.</p>
-<h3><a name="FOOT32" href="#DOCF32">(32)</a></h3>
-<p>such as
-<code>realpath</code>, <code>symlink</code>.</p>
-<h3><a name="FOOT33" href="#DOCF33">(33)</a></h3>
+<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>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>
+<p>sometimes known as PCRE1, and not PCRE2 which started at
+version 10.0.</p>
+<h3><a name="FOOT47" href="#DOCF47">(47)</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>
+<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>
 <p>Such as
 <acronym>GNU</acronym> <code>tar</code> 1.15 or later, <code>bsdtar</code> (from
-<a href="http://code.google.com/p/libarchive/">http://code.google.com/p/libarchive/</a>, as used by FreeBSD and OS
-10.6 and later) or <code>tar</code> from the Heirloom Toolchest
+<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="FOOT34" href="#DOCF34">(34)</a></h3>
-<p><code>texi2dvi</code> is normally a
-shell script.  Some versions, e.g. that from <strong>texinfo</strong> 4.13a and
-5.2, need to be run under <code>bash</code> rather than a Bourne shell as
-on, say, Solaris.</p>
-<h3><a name="FOOT35" href="#DOCF35">(35)</a></h3>
+<h3><a name="FOOT50" href="#DOCF50">(50)</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>
+<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>
 <p>also known as <code>ttf-mscorefonts-installer</code> in the
 Debian/Ubuntu world: see also
-<a href="http://en.wikipedia.org/wiki/Core_fonts_for_the_Web">http://en.wikipedia.org/wiki/Core_fonts_for_the_Web</a>.</p>
-<h3><a name="FOOT36" href="#DOCF36">(36)</a></h3>
+<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>
 <p><code>ttf-liberation</code>
 in Debian/Ubuntu.</p>
-<h3><a name="FOOT37" href="#DOCF37">(37)</a></h3>
-<p>which is what is supplied with R: PCRE must be built
-with UTF-8 support (not the default) and support for Unicode properties
-is assumed by some R packages. Neither are tested by
-<code>configure</code>.</p>
-<h3><a name="FOOT38" href="#DOCF38">(38)</a></h3>
-<p>Using the Oracle Solaris Studio
+<h3><a name="FOOT54" href="#DOCF54">(54)</a></h3>
+<p>This is true even for
+the ‘Aqua’ 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>
+<p>Using the Oracle Developer Studio
 <code>cc</code> and <code>f95</code> compilers</p>
-<h3><a name="FOOT39" href="#DOCF39">(39)</a></h3>
+<h3><a name="FOOT56" href="#DOCF56">(56)</a></h3>
+<p>and ‘<samp>i686</samp>’ for earlier
+versions.</p>
+<h3><a name="FOOT57" href="#DOCF57">(57)</a></h3>
 <p>We have measured 15–20% on ‘<samp>i686</samp>’ Linux
 and around 10% on ‘<samp>x86_64</samp>’ Linux.</p>
-<h3><a name="FOOT40" href="#DOCF40">(40)</a></h3>
+<h3><a name="FOOT58" href="#DOCF58">(58)</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>
 <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="FOOT41" href="#DOCF41">(41)</a></h3>
+<h3><a name="FOOT60" href="#DOCF60">(60)</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="FOOT42" href="#DOCF42">(42)</a></h3>
+<h3><a name="FOOT61" href="#DOCF61">(61)</a></h3>
 <p>for example, <code>X11 font at size 14 could not
 be loaded</code>.</p>
-<h3><a name="FOOT43" href="#DOCF43">(43)</a></h3>
+<h3><a name="FOOT62" href="#DOCF62">(62)</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="FOOT63" href="#DOCF63">(63)</a></h3>
 <p>or <code>-mtune=corei7</code> for Intel Core
 i3/15/17 with <code>gcc >= 4.6.0</code>.</p>
-<h3><a name="FOOT44" href="#DOCF44">(44)</a></h3>
-<p>These days that is defined by Apple’s
-implementation of <code>clang</code>, so it is strongly recommended to use
-that.</p>
-<h3><a name="FOOT45" href="#DOCF45">(45)</a></h3>
-<p>This
-is a tarball which needs to be unpacked in the Terminal by e.g.
-<code>sudo tar -zxf gfortran-4.8.2-darwin13.tar.bz2 -C /</code>.</p>
-<h3><a name="FOOT46" href="#DOCF46">(46)</a></h3>
-<p>It is reported that for some non-Apple toolchains
-<code>CPPFLAGS</code> needed to contain <code>-D__ACCELERATE__</code>.</p>
-<h3><a name="FOOT47" href="#DOCF47">(47)</a></h3>
-<p>including <code>gcc</code> for
-Sparc from Oracle.</p>
-<h3><a name="FOOT48" href="#DOCF48">(48)</a></h3>
-<p>Windows
-DLLs need to have all links resolved at build time and so cannot resolve
-against <samp>R.bin</samp>.</p>
-<h3><a name="FOOT49" href="#DOCF49">(49)</a></h3>
+<h3><a name="FOOT64" href="#DOCF64">(64)</a></h3>
+<p>This also needs the OpenMP runtime
+which has sometimes been distributed separately.</p>
+<h3><a name="FOOT65" href="#DOCF65">(65)</a></h3>
+<p>It will be necessary to install later versions of
+software such as <code>libcurl</code>.</p>
+<h3><a name="FOOT66" href="#DOCF66">(66)</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’s installation scripts
+will make use of it if GNU readline is not found.</p>
+<h3><a name="FOOT67" href="#DOCF67">(67)</a></h3>
+<p>These days that is defined by Apple’s implementation
+of <code>clang</code>, so it is strongly recommended to use that.</p>
+<h3><a name="FOOT68" href="#DOCF68">(68)</a></h3>
+<p>Some of these are unsigned packages: to
+install them you may need to right-click and select <code>Open with ->
+Installer</code>.</p>
+<h3><a name="FOOT69" href="#DOCF69">(69)</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="FOOT70" href="#DOCF70">(70)</a></h3>
+<p>E.g. <em>via</em> <code>tlmgr install cm-super helvetic
+inconsolata texinfo</code> .</p>
+<h3><a name="FOOT71" href="#DOCF71">(71)</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="FOOT72" href="#DOCF72">(72)</a></h3>
+<p>Oracle Solaris Studio prior to 2016, and previously Sun
+Studio.</p>
+<h3><a name="FOOT73" href="#DOCF73">(73)</a></h3>
+<p>using the <samp>-V</samp> flag.</p>
+<h3><a name="FOOT74" href="#DOCF74">(74)</a></h3>
+<p>When last checked it failed in <samp>tests/reg-BLAS.R</samp>,
+and on some builds, including for ‘<samp>amd64</samp>’, it failed in
+<code>example(eigen)</code>.</p>
+<h3><a name="FOOT75" href="#DOCF75">(75)</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 ‘fixed’ an earlier version
+of the latter.</p>
+<h3><a name="FOOT76" href="#DOCF76">(76)</a></h3>
 <p>For
 example, the Cygwin version of <code>make 3.81</code> fails to work
 correctly.</p>
-<h3><a name="FOOT50" href="#DOCF50">(50)</a></h3>
-<p>for R 3.0.0 and later.</p>
-<h3><a name="FOOT51" href="#DOCF51">(51)</a></h3>
+<h3><a name="FOOT77" href="#DOCF77">(77)</a></h3>
 <p>such as <code>sort</code>, <code>find</code> and perhaps
 <code>make</code>.</p>
-<h3><a name="FOOT52" href="#DOCF52">(52)</a></h3>
-<p>these
-flags apply to the compilers: some of the tools use different flags.
-32-bit builds are the default.</p>
 </div>
 <hr>
 
diff --git a/doc/html/R.css b/doc/html/R.css
index 6f058f3..f10f5ea 100644
--- a/doc/html/R.css
+++ b/doc/html/R.css
@@ -1,57 +1,97 @@
-BODY{		background: white;
-		color: black }
-
-A:link{         background: white;
-                color: blue }
-A:visited{	background: white;
-		color: rgb(50%, 0%, 50%) }
-
-H1{		background: white;
-		color: rgb(55%, 55%, 55%);
-		font-family: monospace;
-		font-size: x-large;
-		text-align: center }
-
-H2{		background: white;
-		color: rgb(40%, 40%, 40%);
-		font-family: monospace;
-		font-size: large;
-		text-align: center }
-
-H3{		background: white;
-		color: rgb(40%, 40%, 40%);
-		font-family: monospace;
-		font-size: large }
-
-H4{		background: white;
-		color: rgb(40%, 40%, 40%);
-		font-family: monospace;
-		font-style: italic;
-		font-size: large }
-
-H5{		background: white;
-		color: rgb(40%, 40%, 40%);
-		font-family: monospace }
-
-H6{		background: white;
-		color: rgb(40%, 40%, 40%);
-		font-family: monospace;
-		font-style: italic }
+body {
+    background: white;
+    color: black;
+}
+
+a:link {
+    background: white;
+    color: blue;
+}
+
+a:visited {
+    background: white;
+    color: rgb(50%, 0%, 50%);
+}
+
+h1 {
+    background: white;
+    color: rgb(55%, 55%, 55%);
+    font-family: monospace;
+    font-size: x-large;
+    text-align: center;
+}
+
+h2 {
+    background: white;
+    color: rgb(40%, 40%, 40%);
+    font-family: monospace;
+    font-size: large;
+    text-align: center;
+}
+
+h3 {
+    background: white;
+    color: rgb(40%, 40%, 40%);
+    font-family: monospace;
+    font-size: large;
+}
+
+h4 {
+    background: white;
+    color: rgb(40%, 40%, 40%);
+    font-family: monospace;
+    font-style: italic;
+    font-size: large;
+}
+
+h5 {
+    background: white;
+    color: rgb(40%, 40%, 40%);
+    font-family: monospace;
+}
+
+h6 {
+    background: white;
+    color: rgb(40%, 40%, 40%);
+    font-family: monospace;
+    font-style: italic;
+}
 		
-IMG.toplogo{	vertical-align: middle }
+img.toplogo {
+    width: 4em;
+    vertical-align: middle;
+}
+
+img.arrow {
+    width: 30px;
+    height: 30px;
+    border: 0;
+}
 
-IMG.arrow{	width: 30px;
-		height: 30px;
-		border: 0 }
+span.acronym {
+    font-size: small;
+}
 
-span.acronym{font-size: small}
-span.env{font-family: monospace}
-span.file{font-family: monospace}
-span.option{font-family: monospace}
-span.pkg{font-weight: bold}
-span.samp{font-family: monospace}
+span.env {
+    font-family: monospace;
+}
 
-div.vignettes a:hover {
-  background: rgb(85%, 85%, 85%);
+span.file {
+    font-family: monospace;
 }
 
+span.option{
+    font-family: monospace;
+}
+
+span.pkg {
+    font-weight: bold;
+}
+
+span.samp{
+    font-family: monospace;
+}
+
+div.vignettes a:hover {
+    background: rgb(85%, 85%, 85%);
+}
diff --git a/doc/html/Rlogo.pdf b/doc/html/Rlogo.pdf
new file mode 100644
index 0000000..f8f03d7
Binary files /dev/null and b/doc/html/Rlogo.pdf differ
diff --git a/doc/html/Rlogo.svg b/doc/html/Rlogo.svg
new file mode 100644
index 0000000..24a1724
--- /dev/null
+++ b/doc/html/Rlogo.svg
@@ -0,0 +1,33 @@
+<!--
+Copyright (C) 2015-2016 The R Foundation
+
+You can distribute this logo under the terms of the Creative
+Commons Attribution-ShareAlike 4.0 International license (CC-BY-SA
+4.0) or (at your option) the GNU General Public License version 2
+(GPL-2).
+
+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.  
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, a copy is available at
+https://www.R-project.org/Licenses/
+
+The text of the CC BY-SA 4.0 license is available at
+https://creativecommons.org/licenses/by-sa/4.0/
+-->
+<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" preserveAspectRatio="xMidYMid" width="724" height="561" viewBox="0 0 724 561">
+  <defs>
+    <linearGradient id="gradientFill-1" x1="0" x2="1" y1="0" y2="1" gradientUnits="objectBoundingBox" spreadMethod="pad">
+      <stop offset="0" stop-color="rgb(203,206,208)" stop-opacity="1"/>
+      <stop offset="1" stop-color="rgb(132,131,139)" stop-opacity="1"/>
+    </linearGradient>
+    <linearGradient id="gradientFill-2" x1="0" x2="1" y1="0" y2="1" gradientUnits="objectBoundingBox" spreadMethod="pad">
+      <stop offset="0" stop-color="rgb(39,109,195)" stop-opacity="1"/>
+      <stop offset="1" stop-color="rgb(22,92,170)" stop-opacity="1"/>
+    </linearGradient>
+  </defs>
+  <path d="M361.453,485.937 C162.329,485.937 0.906,377.828 0.906,244.469 C0.906,111.109 162.329,3.000 361.453,3.000 C560.578,3.000 722.000,111.109 722.000,244.469 C722.000,377.828 560.578,485.937 361.453,485.937 ZM416.641,97.406 C265.289,97.406 142.594,171.314 142.594,262.484 C142.594,353.654 265.289,427.562 416.641,427.562 C567.992,427.562 679.687,377.033 679.687,262.484 C679.687,147.971 567.992,97.406 416.641,97.406 Z" fill="url(#gradientFill-1)" fill-rule="evenodd"/>
+  <path d="M550.000,377.000 C550.000,377.000 571.822,383.585 584.500,390.000 C588.899,392.226 596.510,396.668 602.000,402.500 C607.378,408.212 610.000,414.000 610.000,414.000 L696.000,559.000 L557.000,559.062 L492.000,437.000 C492.000,437.000 478.690,414.131 470.500,407.500 C463.668,401.969 460.755,400.000 454.000,400.000 C449.298,400.000 420.974,400.000 420.974,400.000 L421.000,558.974 L298.000,559.026 L298.000,152.938 L545.000,152.938 C545.000,152.938 657.500,154.967 657.500,262.000 C6 [...]
+</svg>
diff --git a/doc/html/Search.html b/doc/html/Search.html
index 29b9bdd..f424322 100644
--- a/doc/html/Search.html
+++ b/doc/html/Search.html
@@ -8,11 +8,10 @@
 </head>
 
 <body>
-<h1>Search Engine <img class=toplogo src="logo.jpg" alt="R logo"></h1>
+<h1>Search Engine <img class="toplogo" src="Rlogo.svg" alt="[R logo]"></h1>
 
 <div align="center">
-<a href="index.html"><img src="up.jpg"
-alt="[Top]" width="30" height="30" border="0"></a>
+<a href="index.html"><img class="arrow" src="up.jpg" alt="[Top]"></a>
 </div>
 
 <hr width="100%">
diff --git a/doc/html/SearchOn.html b/doc/html/SearchOn.html
index 3dd5230..2a53e84 100644
--- a/doc/html/SearchOn.html
+++ b/doc/html/SearchOn.html
@@ -6,11 +6,10 @@
 </head>
 
 <body>
-<h1>Search Engine <img class="toplogo" src="logo.jpg" alt="R logo"></h1>
+<h1>Search Engine <img class="toplogo" src="Rlogo.svg" alt="[R logo]"></h1>
 
 <div align="center">
-<a href="index.html"><img src="up.jpg"
-alt="[Top]" width="30" height="30" border="0"></a>
+<a href="index.html"><img class="arrow" src="up.jpg" alt="[Top]"></a>
 </div>
 
 <hr width="100%">
@@ -30,113 +29,161 @@ Search button or hit
 
 <form name="f" action="Search" method = "get">
 <input type="text" name="pattern" size="20" maxlength="256" value="">
-<input name="title" type="checkbox" checked value="1"> Help page titles
-<input name="keyword" type="checkbox" checked value="1"> Keywords
-<input name="alias" type="checkbox" checked value="1"> Object names
-<input name="concept" type="checkbox" value="1"> Concepts
+<p>
+Fields:
+<input name="fields.alias" type="checkbox" checked value="1">Topics
+<input name="fields.title" type="checkbox" checked value="1">Titles
+<input name="fields.concept" type="checkbox" checked value="1">Concepts
+<input name="fields.keyword" type="checkbox" value="1">Keywords
+</p>
+<p>
+Options:
+<input name="ignore.case" type="checkbox" checked value="1">Ignore case
+<input name="agrep" type="checkbox" value="1"> Fuzzy match
+</p>
+<p>
+Types:
+<input name="types.help" type="checkbox" checked value="1">Help pages
+<input name="types.vignette" type="checkbox" checked value="1">Vignettes
+<input name="types.demo" type="checkbox" checked value="1">Demos
+</p>
 <br>
 <input value="Search" type="submit">
 <input value="Reset" type="reset">
-<input name="exact" type="checkbox" value="1"> Exact match
 </form>
 
 <hr width="100%">
 
+<h2>Concepts</h2>
+
+<a href="/doc/html/hsearch_db_concepts.html">
+Browse concepts available for searching the help system</a>
+
 <h2>Keywords</h2>
 
-<h3>Keywords by Topic</h3>
+<a href="/doc/html/hsearch_db_keywords.html">
+Browse keywords available for searching the help system</a>
 
+<h3>Keywords by Topic</h3>
 
 <dl>
-<dt>  Basics</dt>
+<dt>Basics</dt>
 <dd>
- <ul><li><a href="Search?category=attribute">attribute</a>:  Data Attributes</li>
- <li><a href="Search?category=chron">chron</a>:  Dates and Times</li>
- <li><a href="Search?category=classes">classes</a>:  Data Types (not OO)
-  <ul><li><a href="Search?category=NA">NA</a>:  Missing Values </li>
-  <li><a href="Search?category=category">category</a>:  Categorical Data</li>
-  <li><a href="Search?category=character">character</a>:  Character Data ("String") Operations</li>
-  <li><a href="Search?category=complex">complex</a>:  Complex Numbers</li>
- </ul></li>
-<li><a href="Search?category=data">data</a>:  Environments, Scoping, Packages </li>
- <li><a href="Search?category=datasets">datasets</a>:  Datasets available by data() </li>
- <li><a href="Search?category=list">list</a>:  Lists</li>
- <li><a href="Search?category=manip">manip</a>:  Data Manipulation</li>
- <li><a href="Search?category=package">package</a>:  Package Summaries</li>
- <li><a href="Search?category=sysdata">sysdata</a>:  Basic System Variables </li>
-</ul></dd>
-<dt>  Graphics</dt>
+  <ul>
+    <li><a href="Search?category=attribute">attribute</a>:  Data Attributes</li>
+    <li><a href="Search?category=chron">chron</a>:  Dates and Times</li>
+    <li><a href="Search?category=classes">classes</a>:  Data Types (not OO)
+      <ul>
+	<li><a href="Search?category=NA">NA</a>:  Missing Values </li>
+	<li><a href="Search?category=category">category</a>:  Categorical Data</li>
+	<li><a href="Search?category=character">character</a>:  Character Data ("String") Operations</li>
+	<li><a href="Search?category=complex">complex</a>:  Complex Numbers</li>
+      </ul>
+    </li>
+    <li><a href="Search?category=data">data</a>:  Environments, Scoping, Packages</li>
+    <li><a href="Search?category=datasets">datasets</a>:  Datasets available by data()</li>
+    <li><a href="Search?category=list">list</a>:  Lists</li>
+    <li><a href="Search?category=manip">manip</a>:  Data Manipulation</li>
+    <li><a href="Search?category=package">package</a>:  Package Summaries</li>
+    <li><a href="Search?category=sysdata">sysdata</a>:  Basic System Variables</li>
+  </ul>
+</dd>
+
+<dt>Graphics</dt>
 <dd>
- <ul><li><a href="Search?category=aplot">aplot</a>:  Add to Existing Plot / internal plot</li>
- <li><a href="Search?category=color">color</a>:  Color, Palettes etc</li>
- <li><a href="Search?category=device">device</a>:  Graphical Devices</li>
- <li><a href="Search?category=dplot">dplot</a>:  Computations Related to Plotting</li>
- <li><a href="Search?category=dynamic">dynamic</a>:  Dynamic Graphics</li>
- <li><a href="Search?category=hplot">hplot</a>:  High-Level Plots</li>
- <li><a href="Search?category=iplot">iplot</a>:  Interacting with Plots</li>
-</ul></dd>
-<dt>  MASS (the book) uses</dt>
+  <ul>
+    <li><a href="Search?category=aplot">aplot</a>:  Add to Existing Plot / internal plot</li>
+    <li><a href="Search?category=color">color</a>:  Color, Palettes etc</li>
+    <li><a href="Search?category=device">device</a>:  Graphical Devices</li>
+    <li><a href="Search?category=dplot">dplot</a>:  Computations Related to Plotting</li>
+    <li><a href="Search?category=dynamic">dynamic</a>:  Dynamic Graphics</li>
+    <li><a href="Search?category=hplot">hplot</a>:  High-Level Plots</li>
+    <li><a href="Search?category=iplot">iplot</a>:  Interacting with Plots</li>
+  </ul>
+</dd>
+
+<dt>MASS (the book) uses</dt>
 <dd>
- <ul><li><a href="Search?category=classif">classif</a>:  Classification </li>
- <li><a href="Search?category=neural">neural</a>:  Neural Networks </li>
- <li><a href="Search?category=spatial">spatial</a>:  Spatial Statistics </li>
-</ul></dd>
-<dt>  Mathematics</dt>
+  <ul>
+    <li><a href="Search?category=classif">classif</a>:  Classification </li>
+    <li><a href="Search?category=neural">neural</a>:  Neural Networks </li>
+    <li><a href="Search?category=spatial">spatial</a>:  Spatial Statistics </li>
+  </ul>
+</dd>
+
+<dt>Mathematics</dt>
 <dd>
- <ul>
-   <li><a href="Search?category=arith">arith</a>:  Basic Arithmetic and Sorting</li>
-   <li><a href="Search?category=array">array</a>:  Matrices and Arrays
-     <ul>
-       <li><a href="Search?category=algebra">algebra</a>:  Linear Algebra</li>
-     </ul></li>
-   <li><a href="Search?category=graphs">graphs</a>:  Graphs (not
-     graphics), i.e nodes & edges, e.g. dendrograms</li>
-   <li><a href="Search?category=logic">logic</a>:  Logical Operators</li>
-   <li><a href="Search?category=math">math</a>:  Mathematical Calculus etc </li>
-   <li><a href="Search?category=optimize">optimize</a>:  Optimization</li>
-   <li><a href="Search?category=symbolmath">symbolmath</a>:  "Symbolic Math", as polynomials, fractions</li>
- </ul>
+  <ul>
+    <li><a href="Search?category=arith">arith</a>:  Basic Arithmetic and Sorting</li>
+    <li><a href="Search?category=array">array</a>:  Matrices and Arrays
+      <ul>
+	<li><a href="Search?category=algebra">algebra</a>:  Linear Algebra</li>
+      </ul>
+    </li>
+    <li><a href="Search?category=graphs">graphs</a>:  Graphs (not
+      graphics), i.e nodes & edges, e.g. dendrograms</li>
+    <li><a href="Search?category=logic">logic</a>:  Logical Operators</li>
+    <li><a href="Search?category=math">math</a>:  Mathematical Calculus etc </li>
+    <li><a href="Search?category=optimize">optimize</a>:  Optimization</li>
+    <li><a href="Search?category=symbolmath">symbolmath</a>:  "Symbolic
+      Math", as polynomials, fractions</li> 
+  </ul>
 </dd>
-<dt>  Programming, Input/Ouput, and Miscellaneous</dt>
+
+<dt>Programming, Input/Ouput, and Miscellaneous</dt>
 <dd>
- <ul>
-   <li><a href="Search?category=IO">IO</a>:   Input/output
-     <ul><li><a href="Search?category=connection">connection</a>:  Input/Output Connections</li>
-       <li><a href="Search?category=database">database</a>:  Interfaces to databases</li>
-       <li><a href="Search?category=file">file</a>:  Input/Output Files</li>
-     </ul></li>
-   <li><a href="Search?category=debugging">debugging</a>:  Debugging Tools</li>
-   <li><a href="Search?category=documentation">documentation</a>:  Documentation</li>
-   <li><a href="Search?category=environment">environment</a>:  Session Environment</li>
-   <li><a href="Search?category=error">error</a>:  Error Handling</li>
-   <li><a href="Search?category=internal">internal</a>:  Internal Objects (not part of API)</li>
-   <li><a href="Search?category=iteration">iteration</a>:  Looping and Iteration</li>
-   <li><a href="Search?category=methods">methods</a>:  Methods and Generic Functions</li>
-   <li><a href="Search?category=misc">misc</a>:  Miscellaneous</li>
-   <li><a href="Search?category=print">print</a>:  Printing</li>
-   <li><a href="Search?category=programming">programming</a>:  Programming
-     <ul><li><a href="Search?category=interface">interface</a>:  Interfaces to Other Languages</li>
-     </ul></li>
-   <li><a href="Search?category=utilities">utilities</a>:  Utilities</li>
-</ul></dd>
-<dt>  Statistics</dt>
+  <ul>
+    <li><a href="Search?category=IO">IO</a>:   Input/output
+      <ul>
+	<li><a href="Search?category=connection">connection</a>:  Input/Output Connections</li>
+	<li><a href="Search?category=database">database</a>:  Interfaces to databases</li>
+	<li><a href="Search?category=file">file</a>:  Input/Output Files</li>
+      </ul>
+    </li>
+    <li><a href="Search?category=debugging">debugging</a>:  Debugging Tools</li>
+    <li><a href="Search?category=documentation">documentation</a>:  Documentation</li>
+    <li><a href="Search?category=environment">environment</a>:  Session Environment</li>
+    <li><a href="Search?category=error">error</a>:  Error Handling</li>
+    <li><a href="Search?category=internal">internal</a>:  Internal Objects (not part of API)</li>
+    <li><a href="Search?category=iteration">iteration</a>:  Looping and Iteration</li>
+    <li><a href="Search?category=methods">methods</a>:  Methods and Generic Functions</li>
+    <li><a href="Search?category=misc">misc</a>:  Miscellaneous</li>
+    <li><a href="Search?category=print">print</a>:  Printing</li>
+    <li><a href="Search?category=programming">programming</a>:  Programming
+      <ul>
+	<li><a href="Search?category=interface">interface</a>:  Interfaces to Other Languages</li>
+      </ul>
+    </li>
+    <li><a href="Search?category=utilities">utilities</a>:  Utilities</li>
+  </ul>
+</dd>
+
+<dt>Statistics</dt>
 <dd>
-  <ul><li><a href="Search?category=cluster">cluster</a>:  Clustering</li>
+  <ul>
+    <li><a href="Search?category=cluster">cluster</a>:  Clustering</li>
     <li><a href="Search?category=datagen">datagen</a>:  Functions for generating data sets</li>
     <li><a href="Search?category=design">design</a>:  Designed Experiments</li>
     <li><a href="Search?category=distribution">distribution</a>:  Probability Distributions and Random Numbers</li>
     <li><a href="Search?category=htest">htest</a>:  Statistical Inference</li>
     <li><a href="Search?category=models">models</a>:  Statistical Models
-    <ul>
-      <li><a href="Search?category=regression">regression</a>:  Regression
-	<ul><li><a href="Search?category=nonlinear">nonlinear</a>:  Non-linear Regression </li>
-    </ul></li></ul></li>
+      <ul>
+	<li><a href="Search?category=regression">regression</a>:  Regression
+	  <ul>
+	    <li><a href="Search?category=nonlinear">nonlinear</a>:
+	      Non-linear Regression </li> 
+	  </ul>
+	</li>
+      </ul>
+    </li>
     <li><a href="Search?category=multivariate">multivariate</a>:  Multivariate Techniques</li>
     <li><a href="Search?category=nonparametric">nonparametric</a>:  Nonparametric Statistics </li>
     <li><a href="Search?category=robust">robust</a>:  Robust/Resistant Techniques</li>
-    <li><a href="Search?category=smooth">smooth</a>:  Curve (and Surface) Smoothing<
-    <ul><li><a href="Search?category=loess">loess</a>:  Loess Objects</li>
-    </ul></li>
+    <li><a href="Search?category=smooth">smooth</a>:  Curve (and Surface) Smoothing
+      <ul>
+	<li><a href="Search?category=loess">loess</a>:  Loess Objects</li>
+      </ul>
+    </li>
     <li><a href="Search?category=survey">survey</a>:  Complex survey samples</li>
     <li><a href="Search?category=survival">survival</a>:  Survival Analysis</li>
     <li><a href="Search?category=tree">tree</a>:  Regression and Classification Trees</li>
diff --git a/doc/html/about.html b/doc/html/about.html
index b2aee85..7c15035 100644
--- a/doc/html/about.html
+++ b/doc/html/about.html
@@ -8,7 +8,7 @@
 
 <body>
 
-<h1>About <img class="toplogo" src="logo.jpg" alt="[R logo]"></h1>
+<h1>About <img class="toplogo" src="Rlogo.svg" alt="[R logo]"></h1>
 
 <hr width="100%">
 
@@ -17,7 +17,7 @@
 <p><b>R</b> is a computer language not entirely unlike the S
 language developed at AT&T Bell Laboratories by Rick Becker,
 John Chambers and Allan Wilks. The two languages are implemented
-quite differently, but bear enough superficial resemblence that
+quite differently, but bear enough superficial resemblance that
 users should be able to switch between the two with relative ease.
 Currently the software is undergoing active development. Discussion
 of the development process is carried out on the "r-devel" mailing
@@ -29,7 +29,7 @@ fashion and in way which requires relatively little in the way of
 machine resources. Implementations exist for many for many members
 of the Unix family of operating systems, including <b>AIX</b>,
 <b>FreeBSD</b>, <b>GNU/Linux</b>, <b>HPUX</b>, <b>Irix</b>,
-<b>MacOS X</b>, <b>Solaris</b>, and <b>Tru64</b>. In addition there
+<b>macOS</b>, <b>Solaris</b>, and <b>Tru64</b>. In addition there
 is a version for <b>Microsoft Windows</b> (9x, ME, NT4, 2000,
 XP).</p>
 
diff --git a/doc/html/favicon.ico b/doc/html/favicon.ico
index 5ae70e6..3e00498 100644
Binary files a/doc/html/favicon.ico and b/doc/html/favicon.ico differ
diff --git a/doc/html/index-default.html b/doc/html/index-default.html
index 92ae9d4..85343ca 100644
--- a/doc/html/index-default.html
+++ b/doc/html/index-default.html
@@ -8,14 +8,14 @@
 <body>
 
 <h1>Statistical Data Analysis
-<img class="toplogo" src="logo.jpg" alt="[R logo]"> 
+<img class="toplogo" src="Rlogo.svg" alt="[R logo]"> 
 </h1>
 
 <hr width="100%">
 
 <h2>Manuals</h2>
 
-<table cols="2" width="100%">
+<table width="100%">
   <tr>
     <td align="center" width="50%">
     <a href="../manual/R-intro.html">An Introduction to R</a>
@@ -45,7 +45,7 @@
 
 <h2>Reference</h2>
 
-<table cols="2" width="100%">
+<table width="100%">
 <tr>
 <td align="center" width="50%"><a href="packages.html">Packages</a></td>
 <td align="center" width="50%"><a href="Search.html">Search Engine & Keywords</a></td>
@@ -54,7 +54,7 @@
 
 <h2>Miscellaneous Material</h2>
 
-<table cols="3" width="100%">
+<table width="100%">
 <tr>
 <td align="center" width="33%"><a href="about.html">About R</a> </td>
 <td align="center" width="33%"><a href="../AUTHORS">Authors</a> </td>
diff --git a/doc/html/logo.jpg b/doc/html/logo.jpg
index 656a6b1..b19e94a 100644
Binary files a/doc/html/logo.jpg and b/doc/html/logo.jpg differ
diff --git a/doc/html/logosm.jpg b/doc/html/logosm.jpg
deleted file mode 100644
index c5bddf4..0000000
Binary files a/doc/html/logosm.jpg and /dev/null differ
diff --git a/doc/html/packages-head-utf8.html b/doc/html/packages-head-utf8.html
index 98fa167..5122d05 100644
--- a/doc/html/packages-head-utf8.html
+++ b/doc/html/packages-head-utf8.html
@@ -1,14 +1,13 @@
 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
 <html><head><title>R: Package Index</title>
 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
-<link rel="stylesheet" type="text/css" href="./R.css">
+<link rel="stylesheet" type="text/css" href="R.css">
 </head><body>
-<h1>Package Index <img class="toplogo" src="./logo.jpg" alt="[R logo]"></h1>
+<h1>Package Index <img class="toplogo" src="Rlogo.svg" alt="[R logo]"></h1>
 
 <hr>
 
 <div align="center">
-<a href="index.html"><img src="./up.jpg"
-alt="[Top]" width="30" height="30" border="0"></a>
+<a href="index.html"><img class="arrow" src="up.jpg" alt="[Top]"></a>
 </div>
 
diff --git a/doc/html/resources.html b/doc/html/resources.html
index 26dbc1c..17b7756 100644
--- a/doc/html/resources.html
+++ b/doc/html/resources.html
@@ -8,7 +8,7 @@
 <meta name="keywords" content="R Resources">
 <meta name="resource-type" content="document">
 <meta name="distribution" content="global">
-<meta name="Generator" content="makeinfo">
+<meta name="Generator" content="texi2any">
 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
 <link href="#Top" rel="start" title="Top">
 <link href="dir.html#Top" rel="up" title="(dir)">
@@ -38,54 +38,102 @@ span.nolinebreak {white-space:nowrap}
 span.roman {font-family:serif; font-weight:normal}
 span.sansserif {font-family:sans-serif; font-weight:normal}
 ul.no-bullet {list-style: none}
-body {margin-left: 5%; margin-right: 5%;}
+body {
+    background: white;
+    color: black;
+}
+
+a:link {
+    background: white;
+    color: blue;
+}
 
-H1 {             
+a:visited {
     background: white;
-    color: rgb(25%, 25%, 25%);
+    color: rgb(50%, 0%, 50%);
+}
+
+h1 {
+    background: white;
+    color: rgb(55%, 55%, 55%);
     font-family: monospace;
-    font-size: xx-large;
-    text-align: center
+    font-size: x-large;
+    text-align: center;
 }
 
-H2 {
+h2 {
     background: white;
     color: rgb(40%, 40%, 40%);
     font-family: monospace;
-    font-size: x-large;
-    text-align: center
+    font-size: large;
+    text-align: center;
+}
+
+h3 {
+    background: white;
+    color: rgb(40%, 40%, 40%);
+    font-family: monospace;
+    font-size: large;
+}
+
+h4 {
+    background: white;
+    color: rgb(40%, 40%, 40%);
+    font-family: monospace;
+    font-style: italic;
+    font-size: large;
 }
 
-H3 {
+h5 {
     background: white;
     color: rgb(40%, 40%, 40%);
     font-family: monospace;
-    font-size: large
 }
 
-H4 {
+h6 {
     background: white;
     color: rgb(40%, 40%, 40%);
-    font-family: monospace
+    font-family: monospace;
+    font-style: italic;
+}
+		
+img.toplogo {
+    width: 4em;
+    vertical-align: middle;
 }
 
-span.samp{font-family: monospace}
-span.command{font-family: monospace}
-span.option{font-family: monospace}
-span.file{font-family: monospace}
-span.env{font-family: monospace}
+img.arrow {
+    width: 30px;
+    height: 30px;
+    border: 0;
+}
 
-ul {
-    margin-top: 0.25ex;
-    margin-bottom: 0.25ex;
+span.acronym {
+    font-size: small;
 }
-li {
-    margin-top: 0.25ex;
-    margin-bottom: 0.25ex;
+
+span.env {
+    font-family: monospace;
 }
-p {
-    margin-top: 0.6ex;
-    margin-bottom: 1.2ex;
+
+span.file {
+    font-family: monospace;
+}
+
+span.option{
+    font-family: monospace;
+}
+
+span.pkg {
+    font-weight: bold;
+}
+
+span.samp{
+    font-family: monospace;
+}
+
+div.vignettes a:hover {
+    background: rgb(85%, 85%, 85%);
 }
 
 -->
@@ -100,15 +148,8 @@ p {
 
 
 
-<HTML>
-<HEAD>
-<TITLE>R: Resources</TITLE>
-<LINK REL=STYLESHEET TYPE="text/css" HREF="R.css">
-</HEAD>
-
-<BODY>
 <h1>Other Resources
-<img class="toplogo" src="logo.jpg" alt="[R logo]">
+<img class="toplogo" src="Rlogo.svg" alt="[R logo]">
 </h1>
 <hr width="100%">
 <a name="Top"></a>
@@ -125,7 +166,7 @@ answers is maintained by <a href="mailto:Kurt.Hornik at R-project.org">Kurt Hornik<
 and can be found at the <acronym>URL</acronym>
 </p>
 <blockquote>
-<p><a href="http://CRAN.R-project.org/doc/FAQ/R-FAQ.html">http://CRAN.R-project.org/doc/FAQ/R-FAQ.html</a>
+<p><a href="https://CRAN.R-project.org/doc/FAQ/R-FAQ.html">https://CRAN.R-project.org/doc/FAQ/R-FAQ.html</a>
 </p></blockquote>
 
 
@@ -139,7 +180,7 @@ are a number of mailing lists which are used by R users and developers.
 See
 </p>
 <blockquote>
-<p><a href="http://www.R-project.org/mail.html">http://www.R-project.org/mail.html</a>
+<p><a href="https://www.R-project.org/mail.html">https://www.R-project.org/mail.html</a>
 </p></blockquote>
 
 <p>for details.
@@ -152,11 +193,11 @@ See
 <p>The Comprehensive R Archive Network (<acronym>CRAN</acronym>) is a collection of
 sites which carry identical material, consisting of the R
 distribution(s), the contributed extensions, documentation for R, and
-binaries, with the master site at <a href="http://CRAN.R-project.org/">http://CRAN.R-project.org/</a> and
+binaries, with the master site at <a href="https://CRAN.R-project.org/">https://CRAN.R-project.org/</a> and
 information on daily mirrors available from
 </p>
 <blockquote>
-<p><a href="http://CRAN.R-project.org/mirrors.html">http://CRAN.R-project.org/mirrors.html</a>
+<p><a href="https://CRAN.R-project.org/mirrors.html">https://CRAN.R-project.org/mirrors.html</a>
 </p></blockquote>
 
 <hr>
@@ -168,7 +209,7 @@ information on daily mirrors available from
 precise description) available on the net at
 </p>
 <blockquote>
-<p><a href="http://bugs.R-project.org/">http://bugs.R-project.org/</a>
+<p><a href="https://bugs.R-project.org/">https://bugs.R-project.org/</a>
 </p></blockquote>
 
 <hr>
diff --git a/doc/manual/Makefile.in b/doc/manual/Makefile.in
index b9b55e0..4fbe04d 100644
--- a/doc/manual/Makefile.in
+++ b/doc/manual/Makefile.in
@@ -39,15 +39,17 @@ MAKEINFO_TEXT_OPTS = --number-sections --fill-column=76 --no-split --no-headers
 TEXI2HTML = $(MAKEINFO) $(MAKEINFO_HTML_OPTS)
 TEXI2TEXT = $(MAKEINFO) $(MAKEINFO_TEXT_OPTS)
 ## some broken versions of texi2dvi need C collation.
-TEXI2DVI0 = @TEXI2DVI@
 TEXI2DVI = LC_COLLATE=C @TEXI2DVI@ --texinfo="@set UseExternalXrefs "
 TEXI2PDF = $(TEXI2DVI) --pdf
 PDFLATEX = @PDFLATEX@
+## These are used to check if there is a non-empty path to the
+## texi2dvi script, and as it uses pdftex if that was detected.
+TEXI2DVI0 = @TEXI2DVI@
 PDFTEX = @PDFTEX@
 
 BATCHPDFLATEX = $(PDFLATEX) -interaction=nonstopmode
 
-## experimental support of ebook conversion.
+## support for ebook conversion.
 ## ebook-convert is part of 'calibre'
 ## (http://calibre-ebook.com/download, or Debian/Fedora/... packages)
 EBOOK = ebook-convert
@@ -84,8 +86,8 @@ docs: html
 
 .texi.html:
 	@if test -z "$(MAKEINFO)"; then \
-	  $(ECHO) "'makeinfo' v4.7 or later needed to make HTML docs but missing on your system." ; \
-	  $(ECHO) "file $@ will be missing"; \
+	  $(ECHO) "'texi2any' v5.1 or later needed to make HTML docs but missing on your system." ; \
+	  $(ECHO) "file $@ will be missing and linked from CRAN"; \
 	else \
 	  $(ECHO) "creating doc/manual/$@"; \
 	  $(TEXI2HTML) -D UseExternalXrefs -I$(srcdir) $< -o $@.tmp || touch $@; \
@@ -95,20 +97,20 @@ docs: html
 
 .texi.info:
 	@if test -z "$(MAKEINFO)"; then \
-	  $(ECHO) "ERROR: 'makeinfo' v4.7 or later needed but missing on your system."; \
+	  $(ECHO) "ERROR: 'texi2any' v5.1 or later needed but missing on your system."; \
 	  exit 1; \
 	fi
 	$(MAKEINFO) --enable-encoding -D UseExternalXrefs -I$(srcdir) $<
 
 .texi.pdf:
-	@if test -z "$(PDFTEX)"; then \
-	  $(ECHO) "ERROR: 'pdftex' needed but missing on your system."; \
-	  exit 1; \
-	fi
 	@if test -z "$(TEXI2DVI0)"; then \
 	  $(ECHO) "ERROR: 'texi2dvi' needed but missing on your system."; \
 	  exit 1; \
 	fi
+	@if test -z "$(PDFTEX)"; then \
+	  $(ECHO) "ERROR: 'pdftex' needed but missing on your system."; \
+	  exit 1; \
+	fi
 	TEXINPUTS="$(srcdir):$$TEXINPUTS" $(TEXI2PDF) $<
 
 ## It seems ebook-convert converts the directory, 
@@ -151,8 +153,8 @@ R-intro.mobi: R-intro.texi
 
 R-admin.html: $(srcdir)/R-admin.texi
 	@if test -z "$(MAKEINFO)"; then \
-	  $(ECHO) "'makeinfo' v4.7 or later needed to make HTML docs but missing on your system." ; \
-	  $(ECHO) "file $@ will be missing"; \
+	  $(ECHO) "'texi2any' v5.1 or later needed to make HTML docs but missing on your system." ; \
+	  $(ECHO) "file $@ will be missing and linked from CRAN"; \
 	else \
 	  $(ECHO) "creating doc/manual/$@"; \
 	  $(TEXI2HTML) -I$(srcdir) $(srcdir)/R-admin.texi -o $@.tmp || touch $@;\
@@ -162,8 +164,8 @@ R-admin.html: $(srcdir)/R-admin.texi
 
 R-FAQ.html: $(srcdir)/R-FAQ.texi
 	@if test -z "$(MAKEINFO)"; then \
-	  $(ECHO) "'makeinfo' v4.7 or later needed to make HTML docs but missing on your system." ; \
-	  $(ECHO) "file $@ will be missing"; \
+	  $(ECHO) "'texi2any' v5.1 or later needed to make HTML docs but missing on your system." ; \
+	  $(ECHO) "file $@ will be missing and linked from CRAN"; \
 	else \
 	  $(ECHO) "creating doc/manual/$@"; \
 	  $(MAKEINFO) --html --no-split --css-include=$(srcdir)/Rfaq.css -D UseExternalXrefs -I$(srcdir) $< -o $@.tmp || touch $@; \
@@ -332,7 +334,7 @@ install-images-pdf: installdirs
 	@-for f in $(srcdir)/images/*.pdf; do \
 	  $(INSTALL_DATA) $${f} "$(DESTDIR)$(rdocdir)/manual/images"; \
 	done
-## if there is no makeinfo >= 4.7 then there are no html pages
+## if there is no makeinfo >= 5.1 then there are no html pages
 install-html: installdirs
 	@for f in $(OBJECTS_HTML); do \
 	  if test -f $${f} ; then \
@@ -391,8 +393,8 @@ clean:
 	  *-pkg.tex refman.i?? refman.tex fullrefman.i?? fullrefman.tex \
 	  version.tex version.texi
 	- at rm -f stamp-*
+	- at rm -f *.epub *.mobi rw-FAQ rw-FAQ.html
 distclean: clean
-	- at rm -f *.epub *.mobi
 	- at rm -f Makefile
 maintainer-clean: distclean
 
@@ -408,31 +410,65 @@ distdir: $(DISTFILES)
 	    || exit 1; \
 	done
 	@if test -z "$(MAKEINFO)"; then \
-	  $(ECHO) "ERROR: 'makeinfo' v4.7 or later needed but missing on your system."; \
+	  $(ECHO) "ERROR: 'texi2any' v5.1 or later needed but missing on your system."; \
 	  exit 1; \
 	fi
 #	$(distdir)/doc/html has already been created
 	@$(TEXI2HTML) --no-headers --number-sections \
 	  $(srcdir)/R-admin.texi -I$(srcdir) \
 	  -o $(distdir)/../html/R-admin.html
-#	front-matter files
-#	@$(TEXI2TEXT) $(srcdir)/resources.texi -o $(distdir)/../../RESOURCES
-#	@$(TEXI2TEXT) $(srcdir)/R-FAQ.texi -o $(distdir)/../../FAQ
-#	@$(TEXI2HTML) --no-headers $(srcdir)/resources.texi \
-#	  -o $(distdir)/../html/resources.html
 
 front-matter: ${top_builddir}/doc/RESOURCES ${top_builddir}/doc/FAQ
 
 ${top_builddir}/doc/RESOURCES: $(srcdir)/resources.texi
-	@$(ECHO) "creating RESOURCES"
-	@$(TEXI2TEXT) $(srcdir)/resources.texi -o $@
+	@if test -z "$(MAKEINFO)"; then \
+	  $(ECHO) "'texi2any' v5.1 or later needed to make HTML docs but missing on your system." ; \
+	  $(ECHO) "file doc/RESOURCES will be missing"; \
+	else \
+	  $(ECHO) "creating RESOURCES"; \
+	  $(TEXI2TEXT) $(srcdir)/resources.texi -o $@; \
+	fi
 
 ${top_builddir}/doc/FAQ: $(srcdir)/R-FAQ.texi
-	@$(ECHO) "creating FAQ"
-	@$(TEXI2TEXT) $(srcdir)/R-FAQ.texi -o $@
+	@if test -z "$(MAKEINFO)"; then \
+	  $(ECHO) "'texi2any' v5.1 or later needed to make HTML docs but missing on your system." ; \
+	  $(ECHO) "file doc/FAQ will be missing"; \
+	else \
+	  $(ECHO) "creating FAQ"; \
+	  $(TEXI2TEXT) $(srcdir)/R-FAQ.texi -o $@; \
+	fi
 
 html-non-svn: ../html/resources.html
 
 ../html/resources.html: $(srcdir)/resources.texi
-	@$(ECHO) "creating doc/html/resources.html"
-	@$(TEXI2HTML) --no-headers $(srcdir)/resources.texi -o $@
+	@if test -z "$(MAKEINFO)"; then \
+	  $(ECHO) "'texi2any' v5.1 or later needed to make HTML docs but missing on your system." ; \
+	  $(ECHO) "file doc/html/resources.html will be missing"; \
+	else \
+	  $(ECHO) "creating doc/html/resources.html"; \
+	  $(MAKEINFO) --html --no-split --no-headers \
+	    --css-include=$(top_srcdir)/doc/html/R.css $(srcdir)/resources.texi -o $@; \
+	fi
+
+## Added here to allow testing rw-FAQ changes on Unix.
+Windows-FAQ: rw-FAQ rw-FAQ.html rw-FAQ.pdf
+
+RVER = `cut -d' ' -f1 $(top_srcdir)/VERSION | $(SED) -n 1p`
+RPREFIX = `../../bin$(R_ARCH)/Rscript $(top_srcdir)/src/gnuwin32/fixed/rwver.R`
+SEDVER = -e s/@RVER@/$(RVER)/g -e s/@RWVER@/$(RPREFIX)/g
+
+rw-FAQ.html: rw-FAQ.texi $(top_srcdir)/VERSION $(srcdir)/Rman.css
+	@echo "making rw-FAQ.html"
+	@$(SED) $(SEDVER) $< | \
+	  $(MAKEINFO) --no-split --html --no-headers --number-sections --css-include=$(srcdir)/Rman.css -o $@ 
+
+rw-FAQ: rw-FAQ.texi $(top_srcdir)/VERSION
+	@echo "making rw-FAQ"
+	@$(SED) $(SEDVER) $< | \
+	  $(MAKEINFO) --no-headers --number-sections -o $@
+
+rw-FAQ.pdf: rw-FAQ.texi $(top_srcdir)/VERSION
+	@$(SED) $(SEDVER) $< > tmp.texi
+	@$(TEXI2PDF) tmp.texi
+	@mv tmp.pdf $@
+	@rm tmp.*
diff --git a/doc/manual/Makefile.win b/doc/manual/Makefile.win
index 0c43d51..8ad9ee0 100644
--- a/doc/manual/Makefile.win
+++ b/doc/manual/Makefile.win
@@ -7,14 +7,14 @@ ECHO = echo
 include ../../src/gnuwin32/MkRules
 
 ifeq "$(MIKTEX)" "TRUE"
-R_TEXOPTS=--include-directory=../../share/texmf/tex/latex
-TEXI2DVI=texi2dvi
+R_TEXOPTS = --include-directory=../../share/texmf/tex/latex
+# TEXI2DVI = texi2dvi
 else
-R_TEXOPTS=
-TEXI2DVI=
+R_TEXOPTS =
+# TEXI2DVI =
 endif
 
-R_EXE=../../$(BINDIR)/Rterm
+R_EXE = ../../$(BINDIR)/Rterm
 
 include ../../share/make/vars.mk
 
@@ -30,7 +30,6 @@ OBJECTS_INFO = $(SOURCES_TEXI:.texi=.info)
 OBJECTS_PDF = $(SOURCES_TEXI:.texi=.pdf)
 
 ## Now set in MkRules
-## MAKEINFO = makeinfo
 PDFLATEX = pdflatex $(R_TEXOPTS)
 PDFTEX = pdftex $(R_TEXOPTS)
 BATCHPDFLATEX = $(PDFLATEX) -interaction=nonstopmode
@@ -60,14 +59,40 @@ texiincludes = version.texi $(srcdir)/R-defs.texi
 
 all: pdf
 
+ifneq "$(MAKEINFO)" "missing"
 .texi.html:
 	@$(ECHO) "creating doc/manual/$@"
 	@$(TEXI2HTML) -D UseExternalXrefs -I$(srcdir) $< -o $@.tmp || touch $@
 	@$(SED) -f $(srcdir)/quot.sed $@.tmp > $@
 	@rm -f $@.tmp
 
+R-admin.html: $(srcdir)/R-admin.texi
+	@$(ECHO) "creating doc/manual/$@"
+	@$(TEXI2HTML) -I$(srcdir) $(srcdir)/R-admin.texi -o $@.tmp || touch $@
+	@$(SED) -f $(srcdir)/quot.sed $@.tmp > $@
+	@rm -f $@.tmp
+
+R-FAQ.html: R-FAQ.texi
+	@$(ECHO) "creating doc/manual/$@"
+	@LC_ALL=C $(MAKEINFO) --html --no-split --css-include=Rfaq.css -D UseExternalXrefs -I$(srcdir) $< -o $@.tmp || touch $@
+	@$(SED) -f $(srcdir)/quot.sed $@.tmp > $@
+	@rm -f $@.tmp
+
 .texi.info:
 	LC_ALL=C $(MAKEINFO) --enable-encoding -D UseExternalXrefs -I$(srcdir) $<
+else
+.texi.html:
+	@$(ECHO) "texi2any is not available"
+
+R-admin.html: $(srcdir)/R-admin.texi
+	@$(ECHO) "texi2any is not available"
+
+R-FAQ.html: R-FAQ.texi
+	@$(ECHO) "texi2any is not available"
+
+.texi.info:
+	@$(ECHO) "texi2any is not available"
+endif
 
 ifeq ($(strip $(TEXI2DVI)),)
 .texi.pdf:
@@ -80,18 +105,6 @@ else
 	$(TEXI2DVI) --pdf --texinfo="@set UseExternalXrefs " $<
 endif
 
-R-admin.html: $(srcdir)/R-admin.texi
-	@$(ECHO) "creating doc/manual/$@"
-	@$(TEXI2HTML) -I$(srcdir) $(srcdir)/R-admin.texi -o $@.tmp || touch $@
-	@$(SED) -f $(srcdir)/quot.sed $@.tmp > $@
-	@rm -f $@.tmp
-
-R-FAQ.html: R-FAQ.texi
-	@$(ECHO) "creating doc/manual/$@"
-	@LC_ALL=C $(MAKEINFO) --html --no-split --css-include=Rfaq.css -D UseExternalXrefs -I$(srcdir) $< -o $@.tmp || touch $@
-	@$(SED) -f $(srcdir)/quot.sed $@.tmp > $@
-	@rm -f $@.tmp
-
 
 html: $(OBJECTS_HTML)
 $(OBJECTS_HTML): $(texiincludes) Rman.css
@@ -186,32 +199,49 @@ distclean: clean
 	@-rm -f *.pdf *.info* *.html
 maintainer-clean: distclean
 
+ifneq "$(MAKEINFO)" "missing"
 ../FAQ: R-FAQ.texi
 	@$(TEXI2TEXT) -o $@ $<
 ../RESOURCES: resources.texi
 	@$(TEXI2TEXT) -o $@ $<
 ../html/resources.html: resources.texi
-	@$(TEXI2HTML) --no-headers -o $@ $<
+	@$(MAKEINFO) --html --no-split --no-headers \
+	  --css-include=$(top_srcdir)/doc/html/R.css -o $@ $<
+else
+../FAQ: R-FAQ.texi
+	@$(ECHO) "texi2any is not available"
+../RESOURCES: resources.texi
+	@$(ECHO) "texi2any is not available"
+../html/resources.html: resources.texi
+	@$(ECHO) "texi2any is not available"
+endif
 
 ## Run from src/gnuwin32/fixed/Makefile
 svnonly: ../FAQ ../RESOURCES ../html/resources.html
 
-## formerly in src/gnuwin32/Makefile.docs
 RVER = $(shell cut -d' ' -f1 $(top_srcdir)/VERSION | sed -n 1p)
 RPREFIX = $(shell ../../bin$(R_ARCH)/Rscript ../../src/gnuwin32/fixed/rwver.R)
 SEDVER = -e s/@RVER@/$(RVER)/g -e s/@RWVER@/$(RPREFIX)/g
 
 FAQ: rw-FAQ ../html/rw-FAQ.html
 
+ifneq "$(MAKEINFO)" "missing"
 ../html/rw-FAQ.html: rw-FAQ.texi $(top_srcdir)/VERSION Rman.css
 	@echo "making rw-FAQ.html"
 	@$(SED) $(SEDVER) $< | \
-	  makeinfo --no-split --html --no-headers --number-sections --css-include=Rman.css -o $@ 
+	  $(MAKEINFO) --no-split --html --no-headers --number-sections --css-include=Rman.css -o $@ 
 
 rw-FAQ: rw-FAQ.texi $(top_srcdir)/VERSION
 	@echo "making rw-FAQ"
 	@$(SED) $(SEDVER) $< | \
-	  makeinfo --no-headers --number-sections -o $@
+	  $(MAKEINFO) --no-headers --number-sections -o $@
+else
+../html/rw-FAQ.html: rw-FAQ.texi $(top_srcdir)/VERSION Rman.css
+	@$(ECHO) "texi2any is not available"
+
+rw-FAQ: rw-FAQ.texi $(top_srcdir)/VERSION
+	@$(ECHO) "texi2any is not available"
+endif
 
 rw-FAQ.pdf: rw-FAQ.texi $(top_srcdir)/VERSION
 	@$(SED) $(SEDVER) $< > tmp.texi
diff --git a/doc/manual/R-FAQ.texi b/doc/manual/R-FAQ.texi
index 91dd340..72d8dcd 100644
--- a/doc/manual/R-FAQ.texi
+++ b/doc/manual/R-FAQ.texi
@@ -4,14 +4,9 @@
 @setfilename R-FAQ.info
 @settitle R FAQ
 @setchapternewpage on
- at set FAQ_YEAR 2014
- at set FAQ_DATE @value{FAQ_YEAR}-10-26
- at set REL_YEAR 2014
- at set REL_MAJOR 3
- at set REL_MINOR 1
- at set REL_PATCHLEVEL 2
- at set REL_VERSION @value{REL_MAJOR}. at value{REL_MINOR}. at value{REL_PATCHLEVEL}
- at set FAQ_VERSION @value{REL_MAJOR}. at value{REL_MINOR}. at value{FAQ_DATE}
+ at set FAQ_YEAR 2016
+ at set FAQ_DATE @value{FAQ_YEAR}-06-06
+ at set FAQ_VERSION @value{FAQ_DATE}
 @documentlanguage en
 @documentencoding ISO-8859-1
 @c %**end of header
@@ -52,7 +47,7 @@ FORTRAN
 @end macro
 
 @macro CRANpkg {p}
- at url{http://CRAN.R-project.org/package=\p\, @strong{\p\}}
+ at url{https://CRAN.R-project.org/package=\p\, @strong{\p\}}
 @end macro
 
 @titlepage
@@ -75,9 +70,9 @@ Kurt Hornik                      @*
 @ifhtml
 @html
 <h2>Frequently Asked Questions on R</h2>
-<h2>Version @value{FAQ_VERSION}</h2>
-<address>Kurt Hornik</address>
-<p><p><hr><p>
+<h3 style="text-align: center;">Version @value{FAQ_VERSION}</h3>
+<h3 style="text-align: center;">Kurt Hornik</h3>
+<hr>
 @end html
 @end ifhtml
 
@@ -137,7 +132,7 @@ Copies of the @acronym{GNU} General Public License versions are
 available at
 
 @display
- at url{http://www.R-project.org/Licenses/}
+ at url{https://www.R-project.org/Licenses/}
 @end display
 
 
@@ -147,20 +142,20 @@ available at
 The latest version of this document is always available from
 
 @display
- at url{http://CRAN.R-project.org/doc/FAQ/}
+ at url{https://CRAN.R-project.org/doc/FAQ/}
 @end display
 
 From there, you can obtain versions converted to
- at url{http://CRAN.R-project.org/doc/FAQ/R-FAQ.txt,, plain
+ at url{https://CRAN.R-project.org/doc/FAQ/R-FAQ.txt,, plain
 @acronym{ASCII} text},
- at c @url{http://CRAN.R-project.org/doc/FAQ/R-FAQ.dvi.gz,, DVI},
- at url{http://CRAN.R-project.org/doc/FAQ/R-FAQ.info.gz,, @acronym{GNU}
-info}, @url{http://CRAN.R-project.org/doc/FAQ/R-FAQ.html,, @HTML{}},
- at url{http://CRAN.R-project.org/doc/FAQ/R-FAQ.pdf,, PDF},
- at c @url{http://CRAN.R-project.org/doc/FAQ/R-FAQ.ps.gz,, PostScript}
-as well as the @url{http://CRAN.R-project.org/doc/FAQ/R-FAQ.texi,,
+ at c @url{https://CRAN.R-project.org/doc/FAQ/R-FAQ.dvi.gz,, DVI},
+ at url{https://CRAN.R-project.org/doc/FAQ/R-FAQ.info.gz,, @acronym{GNU}
+info}, @url{https://CRAN.R-project.org/doc/FAQ/R-FAQ.html,, @HTML{}},
+ at url{https://CRAN.R-project.org/doc/FAQ/R-FAQ.pdf,, PDF},
+ at c @url{https://CRAN.R-project.org/doc/FAQ/R-FAQ.ps.gz,, PostScript}
+as well as the @url{https://CRAN.R-project.org/doc/FAQ/R-FAQ.texi,,
 Texinfo source} used for creating all these formats using the
- at url{http://texinfo.org/, @acronym{GNU} Texinfo system}.
+ at acronym{GNU} Texinfo system.
 
 You can also obtain the R @acronym{FAQ} from the @file{doc/FAQ}
 subdirectory of a @CRAN{} site (@pxref{What is CRAN?}).
@@ -177,8 +172,8 @@ In publications, please refer to this @acronym{FAQ} as Hornik
 @@Misc@{,
   author        = @{Kurt Hornik@},
   title         = @{@{R@} @{FAQ@}@},
-  year          = @{@value{REL_YEAR}@},
-  url           = @{http://CRAN.R-project.org/doc/FAQ/R-FAQ.html@}
+  year          = @{@value{FAQ_YEAR}@},
+  url           = @{https://CRAN.R-project.org/doc/FAQ/R-FAQ.html@}
 @}
 @end group
 @end example
@@ -197,11 +192,11 @@ Feedback via email to @email{Kurt.Hornik@@R-project.org} is of course
 most welcome.
 
 In particular, note that I do not have access to Windows or Mac
-systems.  Features specific to the Windows and OS X ports of R are
+systems.  Features specific to the Windows and macOS ports of R are
 described in the
- at url{http://CRAN.R-project.org/bin/windows/base/rw-FAQ.html, ``R for
+ at url{https://CRAN.R-project.org/bin/windows/base/rw-FAQ.html, ``R for
 Windows @acronym{FAQ}''} and the
- at url{http://CRAN.R-project.org/bin/macosx/RMacOSX-FAQ.html, ``R for Mac
+ at url{https://CRAN.R-project.org/bin/macosx/RMacOSX-FAQ.html, ``R for Mac
 OS X @acronym{FAQ}''}.  If you have information on Mac or Windows
 systems that you think should be added to this document, please let me
 know.
@@ -241,7 +236,7 @@ script files.
 
 The design of R has been heavily influenced by two existing languages:
 Becker, Chambers & Wilks' S (@pxref{What is S?}) and Sussman's
- at url{http://www.cs.indiana.edu/scheme-repository/home.html, Scheme}.
+ at url{https://www.cs.indiana.edu/scheme-repository/home.html, Scheme}.
 Whereas the resulting language is very similar in appearance to S, the
 underlying implementation and semantics are derived from Scheme.
 @xref{What are the differences between R and S?}, for further details.
@@ -273,11 +268,11 @@ Thomas Lumley, Martin Maechler, Duncan Murdoch, Paul Murrell, Martyn
 Plummer, Brian Ripley, Deepayan Sarkar, Duncan Temple Lang, Luke
 Tierney, and Simon Urbanek.
 
-R has a home page at @url{http://www.R-project.org/}.  It is
- at url{http://www.gnu.org/philosophy/free-sw.html, free software}
+R has a home page at @url{https://www.R-project.org/}.  It is
+ at url{https://www.gnu.org/philosophy/free-sw.html, free software}
 distributed under a @acronym{GNU}-style
- at url{http://www.gnu.org/copyleft/copyleft.html, copyleft}, and an
-official part of the @url{http://www.gnu.org/, @acronym{GNU}} project
+ at url{https://www.gnu.org/copyleft/copyleft.html, copyleft}, and an
+official part of the @url{https://www.gnu.org/, @acronym{GNU}} project
 (``@acronym{GNU} S'').
 
 @node What machines does R run on?, What is the current version of R?, What is R?, R Basics
@@ -287,12 +282,12 @@ R is being developed for the Unix-like, Windows and Mac families of
 operating systems.  Support for Mac OS Classic ended with R 1.7.1.
 
 The current version of R will configure and build under a number of
-common Unix-like (e.g., @uref{http://en.wikipedia.org/wiki/Unix-like})
-platforms including @var{cpu}-linux-gnu for the i386, amd64, alpha,
-arm/armel, hppa, ia64, m68k, mips/mipsel, powerpc, s390 and sparc 
- at acronym{CPU}s (e.g., @url{http://buildd.debian.org/build.php?&pkg=r-base}),
-i386-hurd-gnu, @var{cpu}-kfreebsd-gnu for i386 and amd64, 
-powerpc-apple-darwin, mips-sgi-irix,
+common Unix-like (e.g., @uref{https://en.wikipedia.org/wiki/Unix-like})
+platforms including @var{cpu}-linux-gnu for the i386, amd64/x86_64,
+alpha, arm, arm64, hppa, mips/mipsel, powerpc, s390x and sparc
+ at acronym{CPU}s (e.g.,
+ at url{https://buildd.debian.org/build.php?&pkg=r-base}), i386-hurd-gnu,
+ at var{cpu}-kfreebsd-gnu for i386 and amd64,
 @c <FIXME>
 @c Not sure anymore ...
 @c alpha-dec-osf4,
@@ -300,12 +295,14 @@ powerpc-apple-darwin, mips-sgi-irix,
 @c i386-freebsd reported by B. Gian James" <gian.james at gmail.com> on
 @c 2009-01-11
 @c (Architecture: i386, OS: FreeBSD 7.1-PRERELEASE, Vendor: PC-BSD)
-i386-freebsd,
+ at c i386-freebsd,
+ at c but all recent reports are on x86_64
 @c </COMMENT>
- at c i386-sun-solaris,
 @c hppa-hp-hpux, 
+ at c mips-sgi-irix,
 @c </FIXME>
-rs6000-ibm-aix, and sparc-sun-solaris.
+i386-pc-solaris, rs6000-ibm-aix, sparc-sun-solaris, x86_64-apple-darwin,
+x86_64-unknown-freebsd and x86_64-unknown-openbsd.
 
 @c and according to @email{jlindsey@@luc.ac.be, Jim Lindsey} also on
 @c Mac, Amiga and Atari under m68k-linux.
@@ -315,12 +312,15 @@ If you know about other platforms, please drop us a note.
 @node What is the current version of R?, How can R be obtained?, What machines does R run on?, R Basics
 @section What is the current version of R?
  
-The current released version is @value{REL_VERSION}.  Based on this
-`major.minor.patchlevel' numbering scheme, there are two development
-versions of R, a patched version of the current release (`r-patched')
-and one working towards the next minor or eventually major (`r-devel')
-releases of R, respectively.  Version r-patched is for bug fixes mostly.
-New features are typically introduced in r-devel.
+R uses a `major.minor.patchlevel' numbering scheme.  Based on this,
+there are the current release version of R (`r-release') as well as two
+development versions of R, a patched version of the current release
+(`r-patched') and one working towards the next minor or eventually major
+(`r-devel') releases of R, respectively.  New features are typically
+introduced in r-devel, while r-patched is for bug fixes mostly.
+
+See @url{https://CRAN.R-project.org/sources.html} for the current
+versions of r-release, r-patched and r-devel.
 
 @node How can R be obtained?, How can R be installed?, What is the current version of R?, R Basics
 @section How can R be obtained?
@@ -334,7 +334,7 @@ CVS).
 
 Tarballs with daily snapshots of the r-devel and r-patched development
 versions of R can be found at
- at url{ftp://ftp.stat.math.ethz.ch/Software/R}.
+ at url{https://stat.ethz.ch/R/daily}.
 
 @c Sources are also available via anonymous rsync.  Use
 
@@ -468,23 +468,23 @@ Guido Masarotto, and is now being developed and maintained by
 The same directory has links to snapshots of the r-patched and r-devel
 versions of R.
 
-See the @url{http://CRAN.R-project.org/bin/windows/base/@/rw-FAQ.html,
+See the @url{https://CRAN.R-project.org/bin/windows/base/@/rw-FAQ.html,
 ``R for Windows @acronym{FAQ}''} for more details.
 
 @node How can R be installed (Mac),  , How can R be installed (Windows), How can R be installed?
 @subsection How can R be installed (Mac)
 
 The @file{bin/macosx} directory of a @CRAN{} site contains a standard
-Apple installer package to run on OS X 10.6 (`Snow Leopard') and later.
+Apple installer package to run on macOS 10.9 (`Mavericks') and later.
 Once downloaded and executed, the installer will install the current
-release of R and an R.app OS X @acronym{GUI}.  This port of R for OS X
+release of R and R.app, the macOS @acronym{GUI}.  This port of R for macOS
 is maintained by @email{Simon.Urbanek@@R-project.org, Simon Urbanek}
 (and previously by Stefano Iacus).  The
- at url{http://CRAN.R-project.org/bin/macosx/RMacOSX-FAQ.html, ``R for Mac
-OS X @acronym{FAQ}} has more details.
+ at url{https://CRAN.R-project.org/bin/macosx/RMacOSX-FAQ.html, ``R for Mac
+macOS @acronym{FAQ}} has more details.
 
 Snapshots of the r-patched and r-devel versions of R are available as
-Apple installer packages at @uref{http://r.research.att.com}.
+Apple installer packages at @uref{https://r.research.att.com}.
 
 @node Are there Unix-like binaries for R?, What documentation exists for R?, How can R be installed?, R Basics
 @section Are there Unix-like binaries for R?
@@ -532,7 +532,7 @@ install r-base-dev} to obtain the additional tools required for this.
 So-called ``backports'' of the current R packages for at least the
 @dfn{stable} distribution of Debian are provided by Johannes Ranke, and
 available from @CRAN{}.  See
- at url{http://CRAN.R-project.org/bin/linux/debian/README} for details on R
+ at url{https://CRAN.R-project.org/bin/linux/debian/index.html} for details on R
 Debian packages and installing the backports, which should also be
 suitable for other Debian derivatives.  Native backports for Ubuntu are
 provided by Michael Rutter.
@@ -553,11 +553,11 @@ may be a delay of up to 2 weeks until the Fedora RPM becomes publicly
 available, as it must pass through the statutory Fedora review process.
 RPMs for a selection of R packages are also provided by Fedora.  The
 Extra Packages for Enterprise Linux (EPEL) project
-(@url{http://fedoraproject.org/wiki/EPEL}) provides ports of the Fedora
+(@url{https://fedoraproject.org/wiki/EPEL}) provides ports of the Fedora
 RPMs for RedHat Enterprise Linux and compatible distributions (e.g.,
 Centos, Scientific Linux, Oracle Linux).
 
-See @url{http://CRAN.R-project.org/bin/linux/suse/README.html} for
+See @url{https://CRAN.R-project.org/bin/linux/suse/README.html} for
 information about RPMs for openSUSE.
 
 No other binary distributions are currently publically available via
@@ -577,10 +577,11 @@ This documentation can also be made available as one reference manual
 for on-line reading in @HTML{} and PDF formats, and as hardcopy via
 @LaTeX{}, see @ref{How can R be installed?}.  An up-to-date @HTML{}
 version is always available for web browsing at
- at url{http://stat.ethz.ch/R-manual/}.
+ at url{https://stat.ethz.ch/R-manual/}.
 
 Printed copies of the R reference manual for some version(s) are
 available from Network Theory Ltd, at
+ at c https: is untrusted
 @url{http://www.network-theory.co.uk/R/base/}.  For each set of manuals
 sold, the publisher donates USD 10 to the R Foundation (@pxref{What is
 the R Foundation?}).
@@ -612,7 +613,7 @@ An annotated bibliography (Bib at TeX{} format) of R-related publications
 can be found at
 
 @display
- at url{http://www.R-project.org/doc/bib/R.bib}
+ at url{https://www.R-project.org/doc/bib/R.bib}
 @end display
 
 Books on R by R Core Team members include
@@ -620,15 +621,15 @@ Books on R by R Core Team members include
 @quotation
 John M. Chambers (2008), ``Software for Data Analysis: Programming with
 R''.  Springer, New York, ISBN 978-0-387-75935-7,
- at url{http://stat.stanford.edu/~jmc4/Rbook/}.
+ at url{http://statweb.stanford.edu/~jmc4/Rbook/}.
 
 Peter Dalgaard (2008), ``Introductory Statistics with R'', 2nd edition.
 Springer, ISBN 978-0-387-79053-4,
- at url{http://www.biostat.ku.dk/~pd/ISwR.html}.
+ at url{http://publicifsv.sund.ku.dk/~pd/ISwR.html}.
 
 Robert Gentleman (2008), ``R Programming for Bioinformatics''.  Chapman
 & Hall/CRC, Boca Raton, FL, ISBN 978-1-420-06367-7,
- at url{http://www.bioconductor.org/pub/RBioinf/}.
+ at url{https://www.bioconductor.org/pub/RBioinf/}.
 
 Stefano M. Iacus (2008), ``Simulation and Inference for Stochastic
 Differential Equations: With R Examples''. Springer, New York, ISBN
@@ -643,11 +644,11 @@ Cambridge, ISBN 978-0521872652.
 
 P. Murrell (2005), ``R Graphics'', Chapman & Hall/CRC, ISBN:
 1-584-88486-X,
- at url{http://www.stat.auckland.ac.nz/~paul/RGraphics/rgraphics.html}.
+ at url{https://www.stat.auckland.ac.nz/~paul/RGraphics/rgraphics.html}.
 
 William N. Venables and Brian D. Ripley (2002), ``Modern Applied
 Statistics with S'' (4th edition).  Springer, ISBN 0-387-95457-0,
- at url{http://www.stats.ox.ac.uk/pub/MASS4/}.
+ at url{https://www.stats.ox.ac.uk/pub/MASS4/}.
 
 Jose C. Pinheiro and Douglas M. Bates (2000), ``Mixed-Effects Models in
 S and S-Plus''. Springer, ISBN 0-387-98957-0.
@@ -672,11 +673,14 @@ To cite R in publications, use
   author       = @{@{R Core Team@}@},
   organization = @{R Foundation for Statistical Computing@},
   address      = @{Vienna, Austria@},
-  year         = @value{REL_YEAR},
-  url          = @{http://www.R-project.org@}
+  year         = @var{YEAR},
+  url          = @{https://www.R-project.org@}
 @}
 @end group
 @end example
+ at noindent
+where @var{YEAR} is the release year of the version of R used and can
+determined as @code{R.version$year}.
 
 Citation strings (or Bib at TeX{} entries) for R and R packages can also be
 obtained by @code{citation()}.
@@ -685,7 +689,7 @@ obtained by @code{citation()}.
 @section What mailing lists exist for R?
 
 Thanks to @email{Martin.Maechler@@R-project.org, Martin Maechler}, there
-are four mailing lists devoted to R.
+are several mailing lists devoted to R, including the following:
 
 @table @code
 @item R-announce
@@ -706,10 +710,13 @@ This list is for questions and discussion about code development in R.
 @c discussions about the future of R, proposals of new functionality, and
 @c pre-testing of new versions.  It is meant for those who maintain an
 @c active position in the development of R.
+ at item R-package-devel
+A list which which provides a forum for learning about the R package
+development process.
 @end table
 
 @noindent
-Please read the @url{http://www.R-project.org/posting-guide.html,
+Please read the @url{https://www.R-project.org/posting-guide.html,
 posting guide} @emph{before} sending anything to any mailing list.
 
 Note in particular that R-help is intended to be comprehensible to
@@ -720,7 +727,7 @@ involving C or C++) should go to R-devel.
 
 Convenient access to information on these lists, subscription, and
 archives is provided by the web interface at
- at url{http://stat.ethz.ch/mailman/listinfo/}.  One can also subscribe
+ at url{https://stat.ethz.ch/mailman/listinfo/}.  One can also subscribe
 (or unsubscribe) via email, e.g.@: to R-help by sending @samp{subscribe}
 (or @samp{unsubscribe}) in the @emph{body} of the message (not in the
 subject!) to @email{R-help-request@@lists.R-project.org}.
@@ -743,7 +750,7 @@ code which reliably reproduces the problem.  Also, make sure that you
 include information on the system and version of R being used.  See
 @ref{R Bugs} for more details.
 
-See @url{http://www.R-project.org/mail.html} for more information on
+See @url{https://www.R-project.org/mail.html} for more information on
 the R mailing lists.
 
 The R Core Team can be reached at @email{R-core@@lists.R-project.org}
@@ -770,46 +777,14 @@ can be found at the @acronym{URL}
 @quotation
 @c @multitable @columnfractions .45 .30
 @c @item
- at url{http://CRAN.R-project.org/}
+ at url{https://CRAN.R-project.org/}
 @c @tab (Austria)
 @c @end multitable
 @end quotation
 
 @noindent
- at c (which is the same as @url{http://cran.at.R-project.org/})
-Daily mirrors are available at @acronym{URL}s including
-
- at quotation
- at multitable @columnfractions .45 .40
- at item @url{http://cran.at.R-project.org/}
- at tab (WU Wien, Austria)
- at item @url{http://cran.au.R-project.org/}
- at tab (PlanetMirror, Australia)
- at item @url{http://cran.br.R-project.org/}
- at tab (Universidade Federal do Paran@'a, Brazil)
- at item @url{http://cran.ch.R-project.org/}
- at tab (ETH Z@"urich, Switzerland)
- at item @url{http://cran.dk.R-project.org/}
- at tab (SunSITE, Denmark)
- at item @url{http://cran.es.R-project.org/}
- at tab (Spanish National Research Network, Madrid, Spain)
- at item @url{http://cran.fr.R-project.org/}
- at tab (INRA, Toulouse, France)
- at c @item @url{http://cran.hu.R-project.org/}
- at c @tab (Semmelweis U, Hungary)
- at item @url{http://cran.pt.R-project.org/}
- at tab (Universidade do Porto, Portugal)
- at item @url{http://cran.uk.R-project.org/}
- at tab (U of Bristol, United Kingdom)
- at c @item @url{http://cran.us.R-project.org/}
- at c @tab (pair Networks, USA)
- at item @url{http://cran.za.R-project.org/}
- at tab (Rhodes U, South Africa)
- at end multitable
- at end quotation
-
- at noindent
-See @url{http://CRAN.R-project.org/mirrors.html} for a complete list of
+and is mirrored daily to many sites around the world.
+See @url{https://CRAN.R-project.org/mirrors.html} for a complete list of
 mirrors.  Please use the @CRAN{} site closest to you to reduce network
 load.
 
@@ -817,10 +792,13 @@ From @CRAN{}, you can obtain the latest official release of R, daily
 snapshots of R (copies of the current source trees), as gzipped and
 bzipped tar files, a wealth of additional contributed code, as well as
 prebuilt binaries for various operating systems (Linux, Mac OS Classic,
-OS X, and MS Windows).  @CRAN{} also provides access to
+macOS, and MS Windows).  @CRAN{} also provides access to
 documentation on R, existing mailing lists and the R Bug Tracking
 system.
 
+Since March 2016, ``old'' material is made available from a central
+ at CRAN{} archive server (@url{https://CRAN-archive.R-project.org/}).
+
 Please always use the @acronym{URL} of the master site when referring to
 @CRAN{}.
 
@@ -828,7 +806,7 @@ Please always use the @acronym{URL} of the master site when referring to
 @section Can I use R for commercial purposes?
 
 R is released under the
- at url{http://www.gnu.org/licenses/old-licenses/gpl-2.0.html,,
+ at url{https://www.gnu.org/licenses/old-licenses/gpl-2.0.html,,
 @acronym{GNU} General Public License (@acronym{GPL}), version 2}.  If
 you have any questions regarding the legality of using R in any
 particular situation you should bring it up with your legal counsel.  We
@@ -840,7 +818,7 @@ all Open Source licenses, permits all and any use of the package.  It
 only restricts distribution of R or of other programs containing code
 from R.  This is made clear in clause 6 (``No Discrimination Against
 Fields of Endeavor'') of the
- at url{http://www.opensource.org/docs/definition.html, Open Source
+ at url{https://opensource.org/docs/definition.html, Open Source
 Definition}:
 
 @quotation
@@ -888,20 +866,20 @@ computing, provide a reference point for individuals, institutions or
 commercial enterprises that want to support or interact with the R
 development community, and to hold and administer the copyright of R
 software and documentation.  See
- at url{http://www.R-project.org/foundation/} for more information.
+ at url{https://www.R-project.org/foundation/} for more information.
 
 @node What is R-Forge?,  , What is the R Foundation?, R Basics
 @section What is R-Forge?
 
-R-Forge (@url{http://R-Forge.R-project.org/}) offers a central platform
+R-Forge (@url{https://R-Forge.R-project.org/}) offers a central platform
 for the development of R packages, R-related software and further
-projects.  It is based on @url{http://www.gforge.org/, GForge} offering
+projects.  It is based on @url{https://en.wikipedia.org/wiki/GForge, GForge} offering
 easy access to the best in SVN, daily built and checked packages,
 mailing lists, bug tracking, message boards/forums, site hosting,
 permanent file archival, full backups, and total web-based
 administration.  For more information, see the R-Forge web page and
 Stefan Theu at ss{}l and Achim Zeileis (2009), ``Collaborative software
-development using R-Forge'', @url{http://journal.R-project.org/, ,
+development using R-Forge'', @url{https://journal.R-project.org/, ,
 @emph{The R Journal}}, @strong{1}(1):9--14.
 
 
@@ -962,18 +940,18 @@ This is also called the ``@emph{White Book}'', and introduced S version
 @item
 John M. Chambers (1998), ``Programming with Data,'' New York: Springer,
 ISBN 0-387-98503-4
-(@url{http://cm.bell-labs.com/cm/ms/departments/sia/Sbook/}).
+(@url{http://statweb.stanford.edu/~jmc4/Sbook/}).
 
 This ``@emph{Green Book}'' describes version 4 of S, a major revision of
 S designed by John Chambers to improve its usefulness at every stage of
 the programming process.
 @end itemize
 
-See @url{http://cm.bell-labs.com/cm/ms/departments/sia/S/history.html}
-for further information on ``Stages in the Evolution of S''.
+See @url{http://statweb.stanford.edu/~jmc4/papers/96.7.ps}
+for further information on the ``Evolution of the S Language''.
 
-There is a huge amount of user-contributed code for S, available at the
- at url{http://lib.stat.cmu.edu/S/, S Repository} at @acronym{CMU}.
+ at c There is a huge amount of user-contributed code for S, available at the
+ at c @url{http://lib.stat.cmu.edu/S/, S Repository} at @acronym{CMU}.
 
 @c The @url{http://lib.stat.cmu.edu/S/faq, ``Frequently Asked Questions
 @c about S''} contains further information about S, but is not
@@ -982,13 +960,9 @@ There is a huge amount of user-contributed code for S, available at the
 @node What is S-PLUS?, What are the differences between R and S?, What is S?, R and S
 @section What is @sc{S-Plus}?
 
- at SPLUS{} is a value-added version of S sold by
- at url{http://www.insightful.com, Insightful Corporation}, which in 2008
-was acquired by @url{http://www.tibco.com/, TIBCO Software Inc}.  See
-the @url{http://www.insightful.com/products/splus/, Insightful @SPLUS{}
-page} and the
- at url{http://spotfire.tibco.com/Products/S-Plus-Overview.aspx, , TIBCO
-Spotfire S+ Products page} for further information.
+ at SPLUS{} is a value-added version of S currently sold by
+ at url{http://www.tibco.com/, TIBCO Software Inc} as `TIBCO Spotfire S+'.
+See @url{https://en.wikipedia.org/wiki/S-PLUS} for more information.
 
 @node What are the differences between R and S?, Is there anything R can do that S-PLUS cannot?, What is S-PLUS?, R and S
 @section What are the differences between R and S?
@@ -1528,21 +1502,22 @@ For a very long time, there was no such thing.
 currently beta testing a commercially supported version of R named R+
 (read R plus).
 
- at url{http://www.revolution-computing.com/, REvolution Computing} has
+ at url{http://www.revolution-computing.com/, Revolution Analytics} has
 released
 @url{http://www.revolution-computing.com/products/revolution-r.php,
 REvolution R}, an enterprise-class statistical analysis system based on
 R, suitable for deployment in professional, commercial and regulated
 environments.
 
- at url{http://www.random-technologies-llc.com/, Random Technologies}
-offers @url{http://random-technologies-llc.com/products/RStat/rstat,
-RStat}, an enterprise-strength statistical computing environment which
-combines R with enterprise-level validation, documentation, software
-support, and consulting services, as well as related R-based products.
+ at c Now archived at <http://archive.today/WrgxY>
+ at c @url{http://www.random-technologies-llc.com/, Random Technologies}
+ at c offers @url{http://random-technologies-llc.com/products/RStat/rstat,
+ at c RStat}, an enterprise-strength statistical computing environment which
+ at c combines R with enterprise-level validation, documentation, software
+ at c support, and consulting services, as well as related R-based products.
 
 See also
- at url{http://en.wikipedia.org/wiki/R_programming_language#Commercialized_versions_of_R}
+ at url{https://en.wikipedia.org/wiki/R_programming_language#Commercialized_versions_of_R}
 for pointers to commercialized versions of R.
 
 @node R Web Interfaces, R Add-On Packages, R and S, Top
@@ -1550,7 +1525,7 @@ for pointers to commercialized versions of R.
 
 @strong{Rweb} is developed and maintained by
 @email{jeff@@math.montana.edu, Jeff Banfield}.  The
- at url{http://www.math.montana.edu/Rweb/, Rweb Home Page} provides access
+ at url{https://rweb.stat.umn.edu/Rweb/, Rweb Home Page} provides access
 to all three versions of Rweb---a simple text entry form that returns
 output and graphs, a more sophisticated JavaScript version that provides
 a multiple window environment, and a set of point and click modules that
@@ -1568,7 +1543,7 @@ Rweb works, was published in the Journal of Statistical Software
 intends to make the first steps in statistical programming with R
 (especially with time series) as easy as possible.  There is no need for
 a local installation since the only requirement for the user is a
-JavaScript capable browser.  See @url{http://osvisions.com/r-online/}
+JavaScript capable browser.  See @url{http://www.osvisions.com/r_online/}
 for more information.
 
 @strong{Rcgi} is a CGI WWW interface to R by @email{mjr@@dsl.pipex.com,
@@ -1580,15 +1555,18 @@ formats and the executed code was presented to the user for revision.
 However, it is not clear if the project is still active.
 @c URL no longer seems to work ...
 @c See @url{http://stats.mth.uea.ac.uk/Rcgi/} for more information.
-Currently, a modified version of @strong{Rcgi} by
- at email{mai@@ms.uky.edu, Mai Zhou} (actually, two versions: one with
-(bitmap) graphics and one without) as well as the original code are
-available from @url{http://www.ms.uky.edu/~statweb/}.
-
-CGI-based web access to R is also provided at
- at url{http://hermes.sdu.dk/cgi-bin/go/}.  There are many additional
-examples of web interfaces to R which basically allow to submit R code
-to a remote server, see for example the collection of links available from
+ at c This address is invalid
+ at c Currently, a modified version of @strong{Rcgi} by
+ at c @email{mai@@ms.uky.edu, Mai Zhou} (actually, two versions: one with
+ at c (bitmap) graphics and one without) as well as the original code are
+ at c available from @url{http://www.ms.uky.edu/~statweb/}.
+
+ at c No longer works ...
+ at c CGI-based web access to R is also provided at
+ at c @url{http://hermes.sdu.dk/cgi-bin/go/}.
+There are many additional examples of web interfaces to R which
+basically allow to submit R code to a remote server, see for example the
+collection of links available from
 @url{http://biostat.mc.vanderbilt.edu/twiki/bin/view/Main/StatCompCourse}.
 
 @url{http://www.warwick.ac.uk/go/dfirth, David Firth} has written
@@ -1601,31 +1579,35 @@ and a web server provided that the installer has the necessary security
 permissions.  David's paper ``CGIwithR: Facilities for Processing Web
 Forms Using R'' was published in the Journal of Statistical Software
 (@url{http://www.jstatsoft.org/v08/i10/}).  The package is now
-maintained by @email{duncan@@wald.ucdavis.edu, Duncan Temple Lang} and
-has a web page at @url{http://www.omegahat.org/CGIwithR/}.
+maintained by @email{duncan@@wald.ucdavis.edu, Duncan Temple Lang}.
+and has a web page at @url{http://www.omegahat.net/CGIwithR/}.
 
- at url{http://www.rpad.org/Rpad, Rpad}, developed and actively maintained
-by Tom Short, provides a sophisticated environment which combines some
-of the features of the previous approaches with quite a bit of
-JavaScript, allowing for a @acronym{GUI}-like behavior (with sortable
-tables, clickable graphics, editable output), etc.
+ at c See <https://code.google.com/p/rpad/>
+ at c Link to web page <http://www.rpad.org/> no longer works.
+ at c @url{http://www.rpad.org/Rpad, Rpad}, developed and actively maintained
+ at c by Tom Short, provides a sophisticated environment which combines some
+ at c of the features of the previous approaches with quite a bit of
+ at c JavaScript, allowing for a @acronym{GUI}-like behavior (with sortable
+ at c tables, clickable graphics, editable output), etc.
 
 Jeff Horner is working on the R/Apache Integration Project which embeds
 the R interpreter inside Apache 2 (and beyond).  A tutorial and
 presentation are available from the project web page at
 @url{http://biostat.mc.vanderbilt.edu/@/twiki/@/bin/@/view/@/Main/@/RApacheProject}.
 
- at url{http://stats.math.uni-augsburg.de/Rserve/, Rserve} is a project
+ at url{https://www.rforge.net/Rserve/, Rserve} is a project
 actively developed by Simon Urbanek.  It implements a TCP/IP server which
 allows other programs to use facilities of R.  Clients are available from
 the web site for Java and C++ (and could be written for other languages
 that support TCP/IP sockets).
 
- at url{http://openstatserver.org/index.html, OpenStatServer} is being
-developed by a team lead by Greg Warnes; it aims ``to provide clean access
-to computational modules defined in a variety of computational
-environments (R, SAS, Matlab, etc) via a single well-defined client
-interface'' and to turn computational services into web services.
+ at c See <http://sourceforge.net/projects/openstatserver/>:
+ at c Link to web site <http://openstatserver.org/> no longer works.
+ at c @url{http://openstatserver.org/index.html, OpenStatServer} is being
+ at c developed by a team lead by Greg Warnes; it aims ``to provide clean access
+ at c to computational modules defined in a variety of computational
+ at c environments (R, SAS, Matlab, etc) via a single well-defined client
+ at c interface'' and to turn computational services into web services.
 
 Two projects use PHP to provide a web interface to R.
 @url{http://steve-chen.net/R_PHP/, R_PHP_Online} by Steve Chen (though
@@ -1635,7 +1617,7 @@ R-php} is actively developed by Alfredo Pontillo and Angelo Mineo and
 provides both a web interface to R and a set of pre-specified analyses
 that need no R code input.
 
- at url{http://www.bioconductor.org/, webbioc} is ``an integrated web
+ at url{https://www.bioconductor.org/, webbioc} is ``an integrated web
 interface for doing microarray analysis using several of the
 Bioconductor packages'' and is designed to be installed at local sites
 as a shared computing resource.
@@ -1648,11 +1630,12 @@ any extra scripting or learn any new scripting techniques.
 The @CRANpkg{R.rsp} package by Henrik Bengtsson introduces ``R Server
 Pages''.  Analogous to Java Server Pages, an R server page is typically
 @HTML{} with embedded R code that gets evaluated when the page is
-requested.  The package includes an internal cross-platform HTTP server
-implemented in Tcl, so provides a good framework for including web-based
-user interfaces in packages.  The approach is similar to the use of the
- at CRANpkg{brew} package with @url{http://rapache.net/, Rapache} with the
-advantage of cross-platform support and easy installation.
+requested.  The package includes an internal cross-platform
+ at acronym{HTTP} server implemented in Tcl, so provides a good framework
+for including web-based user interfaces in packages.  The approach is
+similar to the use of the @CRANpkg{brew} package with
+ at url{http://rapache.net/, Rapache} with the advantage of cross-platform
+support and easy installation.
 
 The @CRANpkg{Rook} package by Jeffrey Horner provides a web server
 interface borrowing heavily from Ruby's Rack project.
@@ -1666,12 +1649,12 @@ with no programming or web designing background to quickly develop
 flexible and powerful online applications, websites, and psychometrics
 tests.  To maximize its reliability, security, and performance, Concerto
 relies on the popular and reliable open-source elements such as MySQL
-server (exchange and storage of the data), @uref{http://rstudio.org/,
+server (exchange and storage of the data), @uref{https://rstudio.org/,
 Rstudio} (R code designing and testing, file management), CKEditor
 (@HTML{} Layer design), and PHP.
 
-See @url{http://rwiki.sciviews.org/doku.php?id=faq-r#web_interfaces} for
-additional information.
+ at c See @url{http://rwiki.sciviews.org/doku.php?id=faq-r#web_interfaces} for
+ at c additional information.
 
 
 @node R Add-On Packages, R and Emacs, R Web Interfaces, Top
@@ -1802,11 +1785,11 @@ Statistics with S'' by W. Venables and B. Ripley.
 Functions for survival analysis, including penalized likelihood.
 @end table
 @c </FIXME>
-See the @url{http://CRAN.R-project.org/web/packages/, , @CRAN{}
+See the @url{https://CRAN.R-project.org/web/packages/, , @CRAN{}
 contributed packages page} for more information.
 
 Many of these packages are categorized into
- at url{http://CRAN.R-project.org/web/views/, @CRAN{} Task Views}, allowing
+ at url{https://CRAN.R-project.org/web/views/, @CRAN{} Task Views}, allowing
 to browse packages by topic and providing tools to automatically install
 all packages for special areas of interest.
 
@@ -1815,35 +1798,36 @@ require additional software, or are shipping third party libraries for
 Windows cannot be made available on @CRAN{} in form of a Windows binary
 packages.  Nevertheless, some of these packages are available at the
 ``@CRAN{} extras'' repository at
- at url{http://www.stats.ox.ac.uk/pub/RWin/} kindly provided by Brian
+ at url{https://www.stats.ox.ac.uk/pub/RWin/} kindly provided by Brian
 D. Ripley.  Note that this repository is a default repository for recent
 versions of R for Windows.
 
 @node Add-on packages from Omegahat, Add-on packages from Bioconductor, Add-on packages from CRAN, Which add-on packages exist for R?
 @subsection Add-on packages from Omegahat
 
-The @url{http://www.omegahat.org/, Omega Project for Statistical
+The @url{http://www.omegahat.net/, Omega Project for Statistical
 Computing} provides a variety of open-source software for statistical
 applications, with special emphasis on web-based software, Java, the
 Java virtual machine, and distributed computing.  A @acronym{CRAN} style
-R package repository is available via @url{http://www.omegahat.org/R/}.
-See @url{http://www.omegahat.org/} for information on most R packages
+R package repository is available via @url{http://www.omegahat.net/R/}.
+See @url{http://www.omegahat.net/} for information on most R packages
 available from the Omega project.
 
 @node Add-on packages from Bioconductor, Other add-on packages, Add-on packages from Omegahat, Which add-on packages exist for R?
 @subsection Add-on packages from Bioconductor
 
- at url{http://www.bioconductor.org/, Bioconductor} is an open source and
+ at url{https://www.bioconductor.org/, Bioconductor} is an open source and
 open development software project for the analysis and comprehension of
 genomic data.  Most Bioconductor components are distributed as R add-on
 packages.  Initially most of the
- at url{http://www.bioconductor.org/packages/bioc/, Bioconductor software
-packages} focused primarily on DNA microarray data analysis.  As the
+ at url{https://bioconductor.org/packages/release/BiocViews.html#___Software,
+Bioconductor software packages}
+focused primarily on DNA microarray data analysis.  As the 
 project has matured, the functional scope of the software packages
 broadened to include the analysis of all types of genomic data, such as
 SAGE, sequence, or SNP data.  In addition, there are metadata
 (annotation, CDF and probe) and experiment data packages.  See
- at url{http://www.bioconductor.org/download/} for available packages and a
+ at url{https://www.bioconductor.org/download/} for available packages and a
 complete taxonomy via BioC Views.
 
 @node Other add-on packages,  , Add-on packages from Bioconductor, Which add-on packages exist for R?
@@ -1852,7 +1836,7 @@ complete taxonomy via BioC Views.
 Many more packages are available from places other than the three
 default repositories discussed above (@CRAN{}, Bioconductor and
 Omegahat).  In particular, R-Forge provides a @CRAN{} style repository
-at @url{http://R-Forge.R-project.org/}.
+at @url{https://R-Forge.R-project.org/}.
 
 More code has been posted to the R-help mailing list, and can be
 obtained from the mailing list archive.
@@ -2053,7 +2037,7 @@ in.  Also, the developers do not have access to all possible machines
 capable of running R.  So, simply using it and communicating problems is
 certainly of great value.
 
-The @url{http://developer.R-project.org/, R Developer Page} acts as an
+The @url{https://developer.R-project.org/, R Developer Page} acts as an
 intermediate repository for more or less finalized ideas and plans for
 the R statistical system.  It contains (pointers to) TODO lists, RFCs,
 various other writeups, ideas lists, and SVN miscellanea.
@@ -2102,16 +2086,15 @@ editing saved transcripts, and re-evaluating commands from transcript
 files).
 
 The latest stable version of @acronym{ESS} is available via @CRAN{} or
-the @url{http://ESS.R-project.org/, ESS web page}.  The @HTML{} version
-of the documentation can be found at @url{http://stat.ethz.ch/ESS/}.
+the @url{https://ESS.R-project.org/, ESS web page}.
 
 @acronym{ESS} comes with detailed installation instructions.
 
 For help with @acronym{ESS}, send email to
- at email{ESS-help@@stat.math.ethz.ch}.
+ at email{ESS-help@@r-project.org}.
 
 Please send bug reports and suggestions on @acronym{ESS} to
- at email{ESS-bugs@@stat.math.ethz.ch}.  The easiest way to do this from is
+ at email{ESS-bugs@@r-project.org}.  The easiest way to do this from is
 within Emacs by typing @kbd{M-x ess-submit-bug-report} or using the
 [ESS] or [iESS] pulldown menus.
 
@@ -2228,6 +2211,8 @@ dir /opt/R/src/unix
 * How do I access the source code for a function?::
 * Why does summary() report strange results for the R^2 estimate when I fit a linear model with no intercept?::
 * Why is R apparently not releasing memory?::
+* How can I enable secure https downloads in R?::
+* How can I get CRAN package binaries for outdated versions of R?::
 @end menu
 
 @c @node Why does R run out of memory?, Why does sourcing a correct file fail?, R Miscellanea, R Miscellanea
@@ -2769,7 +2754,7 @@ Under a Unix-like, if your installation supports the
 problems, and the default settings should just work.  This option is not
 available for versions of R prior to 2.7.0, or without support for
 cairo.  From R 2.7.0 @code{png()} by default uses the Quartz device
-on OS X, and that too works in batch mode.
+on macOS, and that too works in batch mode.
 
 Earlier versions of the @code{png()} device used the X11 driver, which
 is a problem in batch mode or for remote operation.  If you have
@@ -2777,7 +2762,7 @@ Ghostscript you can use @code{bitmap()}, which produces a PostScript or
 PDF file then converts it to any bitmap format supported by Ghostscript.
 On some installations this produces ugly output, on others it is
 perfectly satisfactory.  Many systems now come with Xvfb from
- at url{http://www.x.org/Downloads.html, X.Org} (possibly as an optional
+ at url{http://www.x.org/, X.Org} (possibly as an optional
 install), which is an X11 server that does not require a screen; and
 there is the @CRANpkg{GDD} package from @CRAN{}, which produces PNG,
 JPEG and GIF bitmaps without X11.
@@ -3016,12 +3001,12 @@ package and library?} for more information.
 @node Why doesn't R think these numbers are equal?, How can I capture or ignore errors in a long simulation?, I installed a package but the functions are not there, R Miscellanea
 @section Why doesn't R think these numbers are equal?
 
-The only numbers that can be represented exactly in R's numeric type 
-are integers and fractions whose denominator is a power of 2.  Other 
-numbers have to be rounded to (typically) 53 binary digits accuracy.  As a 
-result, two floating point numbers will not reliably be equal unless they 
-have been computed by the same algorithm, and not always even then.  For 
-example
+The only numbers that can be represented exactly in R's numeric type are
+integers and fractions whose denominator is a power of 2.  All other
+numbers are internally rounded to (typically) 53 binary digits accuracy.
+As a result, two floating point numbers will not reliably be equal
+unless they have been computed by the same algorithm, and not always
+even then.  For example
 
 @example
 R> a <- sqrt(2)
@@ -3029,6 +3014,8 @@ R> a * a == 2
 [1] FALSE
 R> a * a - 2
 [1] 4.440892e-16
+R> print(a * a, digits = 18)
+[1] 2.00000000000000044
 @end example
 
 The function @code{all.equal()} compares two objects using a numeric
@@ -3036,17 +3023,32 @@ tolerance of @code{.Machine$double.eps ^ 0.5}.  If you want much greater
 accuracy than this you will need to consider error propagation
 carefully.
 
+A discussion with many easily followed examples is in Appendix G
+``Computational Precision and Floating Point Arithmetic'', pages
+753--771 of @emph{Statistical Analysis and Data Display: An Intermediate
+Course with Examples in R}, Richard M. Heiberger and Burt Holland
+(Springer 2015, second edition).  This appendix is a free download from
+ at url{http://link.springer.com/content/pdf/bbm%3A978-1-4939-2122-5%2F1.pdf}.
+
 For more information, see e.g.@: David Goldberg (1991), ``What Every
 Computer Scientist Should Know About Floating-Point Arithmetic'',
 @emph{ACM Computing Surveys}, @strong{23/1}, 5--48, also available via
 @url{http://www.validlab.com/goldberg/paper.pdf}.
 
-To quote from ``The Elements of Programming Style'' by Kernighan and
-Plauger:
+Here is another example, this time using addition:
 
- at quotation
- at emph{10.0 times 0.1 is hardly ever 1.0}.
- at end quotation
+ at example
+R> .3 + .6 == .9
+[1] FALSE
+R> .3 + .6 - .9
+[1] -1.110223e-16
+R> print(matrix(c(.3,  .6,  .9, .3 + .6)), digits = 18)
+                     [,1]
+[1,] 0.299999999999999989
+[2,] 0.599999999999999978
+[3,] 0.900000000000000022
+[4,] 0.899999999999999911
+ at end example
 
 
 @node How can I capture or ignore errors in a long simulation?, Why are powers of negative numbers wrong?, Why doesn't R think these numbers are equal?, R Miscellanea
@@ -3143,7 +3145,7 @@ For some common viewers, consider the following:
 There are options in Preferences to enable/disable text smoothing, image
 smoothing and line art smoothing.
 Disable line art smoothing.
- at item Preview (OS X)
+ at item Preview (macOS)
 There is an option in Preferences to enable/disable anti-aliasing of
 text and line art.
 Disable this option. 
@@ -3263,10 +3265,11 @@ the data, is possible in R but is not recommended.  The basic approach
 for constructing such graphs is to use @code{par(new=TRUE)} (see
 @code{?par}); functions @code{twoord.plot()} (in the @CRANpkg{plotrix}
 package) and @code{doubleYScale()} (in the @CRANpkg{latticeExtra}
-package) automate the process somewhat.  See
- at url{http://rwiki.sciviews.org/@/doku.php?id=tips:graphics-base:2yaxes}
-for more information, including strong arguments against this sort of
-graph.
+package) automate the process somewhat.
+ at c See
+ at c @url{http://rwiki.sciviews.org/@/doku.php?id=tips:graphics-base:2yaxes}
+ at c for more information, including strong arguments against this sort of
+ at c graph.
 
 @node How do I access the source code for a function?, Why does summary() report strange results for the R^2 estimate when I fit a linear model with no intercept?, How do I create a plot with two y-axes?, R Miscellanea
 @section How do I access the source code for a function?
@@ -3275,7 +3278,7 @@ In most cases, typing the name of the function will print its source
 code. However, code is sometimes hidden in a namespace, or compiled.  For 
 a complete overview on how to access source code, see Uwe Ligges (2006),
 ``Help Desk: Accessing the sources'', @emph{R News}, @strong{6/4},
-43--45 (@url{http://CRAN.R-project.org/doc/Rnews/Rnews_2006-4.pdf}).
+43--45 (@url{https://CRAN.R-project.org/doc/Rnews/Rnews_2006-4.pdf}).
 
 @node Why does summary() report strange results for the R^2 estimate when I fit a linear model with no intercept?, Why is R apparently not releasing memory?, How do I access the source code for a function?, R Miscellanea
 @section Why does summary() report strange results for the R^2 estimate when I fit a linear model with no intercept?
@@ -3317,7 +3320,7 @@ of the variance, is the model where @math{E[Y]=0} everywhere.  (If you
 don't know a priori that @math{E[Y]=0} when @math{x=0}, then you
 probably shouldn't be fitting a line through the origin.)
 
- at node Why is R apparently not releasing memory?,  , Why does summary() report strange results for the R^2 estimate when I fit a linear model with no intercept?, R Miscellanea
+ at node Why is R apparently not releasing memory?, How can I enable secure https downloads in R?, Why does summary() report strange results for the R^2 estimate when I fit a linear model with no intercept?, R Miscellanea
 @section Why is R apparently not releasing memory?
 
 This question is often asked in different flavors along the lines of
@@ -3368,10 +3371,65 @@ small objects such as strings or pairlists will be affected by this
 behavior, whereas large objects such as long vectors will be allocated
 using @code{mmap} and thus not affected.  On Linux (and possibly other
 Unix-like systems) it is possible to use the @code{mallinfo} system call
-(also see the @url{http://rforge.net/mallinfo, mallinfo} package) to
+(also see the @url{https://rforge.net/mallinfo, mallinfo} package) to
 query the allocator about the layout of the allocations, including the
 actually used memory as well as unused memory that cannot be released.
 
+ at node How can I enable secure https downloads in R?, How can I get CRAN package binaries for outdated versions of R?, Why is R apparently not releasing memory?, R Miscellanea
+ at section How can I enable secure https downloads in R?
+
+ at c This should be re-phrased for 3.3.0.
+
+When R transfers files over @acronym{HTTP} (e.g., using the
+ at code{install.packages()} or @code{download.file()} function), a
+download method is chosen based on the @option{download.file.method}
+option.  There are several methods available and the default behavior if
+no option is explicitly specified is to use R's internal @acronym{HTTP}
+implementation.  In most circumstances this internal method will not
+support @acronym{HTTPS} URLs so you will need to override the default:
+this is done automatically for such URLs as from R 3.2.2.
+
+R versions 3.2.0 and greater include two download methods
+(@code{"libcurl"} and @code{"wininet"}) that both support
+ at acronym{HTTPS} connections: we recommend that you use these methods.
+The requisite code to add to @file{.Rprofile} or @file{Rprofile.site} is:
+
+ at example
+options(download.file.method = "wininet", url.method = "wininet")
+ at r{(Windows)}
+options(download.file.method = "libcurl", url.method = "libcurl")
+ at r{(Linux and macOS)}
+ at end example
+
+ at noindent
+(Method @code{"wininet"} is the default on Windows as from R 3.2.2.)
+
+Note that the @code{"libcurl"} method may or may not have been compiled
+in.  In the case that it was not, i.e.. @code{capabilities("libcurl") ==
+FALSE}, we recommend method @code{"wget"} on Linux and @code{"curl"} on
+macOS.  It is possible that system versions of @code{"libcurl"},
+ at command{wget} or @command{curl} may have been compiled without
+ at acronym{HTTPS} support, but this is unlikely.  As from R 3.3.0
+ at code{"libcurl"} with @acronym{HTTPS} support is required except on
+Windows.
+
+ at node How can I get CRAN package binaries for outdated versions of R?,  , How can I enable secure https downloads in R?, R Miscellanea
+ at section How can I get CRAN package binaries for outdated versions of R?
+
+Since March 2016, Windows and macOS binaries of @CRAN{} packages for old
+versions of R (released more than 5 years ago) are made available from a
+central @CRAN{} archive server instead of the @CRAN{} mirrors.  To get
+these, one should set the @CRAN{} ``mirror'' element of the @code{repos}
+option accordingly, by something like
+ at example
+local(@{r <- getOption("repos")
+       r["CRAN"] <- "http://CRAN-archive.R-project.org"
+       options(repos = r)
+      @})
+ at end example
+ at noindent
+(see @code{?options} for more information).
+
 @node R Programming, R Bugs, R Miscellanea, Top
 @chapter R Programming
 
@@ -3567,7 +3625,7 @@ that might be expected to produce the bug but actually do not.  If you
 want to debug the problem and find exactly what caused it, that is
 wonderful.  You should still report the facts as well as any
 explanations or solutions.  Please include an example that reproduces
-(e.g., @url{http://en.wikipedia.org/wiki/Reproducibility}) the problem,
+(e.g., @url{https://en.wikipedia.org/wiki/Reproducibility}) the problem,
 preferably the simplest one you have found.
 
 Invoking R with the @option{--vanilla} option may help in isolating a
@@ -3577,7 +3635,7 @@ read.
 Before you actually submit a bug report, you should check whether the
 bug has already been reported and/or fixed.  First, try the ``Show open
 bugs new-to-old'' or the search facility on
- at url{http://bugs.R-project.org/}.  Second, consult
+ at url{https://bugs.R-project.org/}.  Second, consult
 @url{https://svn.R-project.org/@/R/@/trunk/@/doc/@/NEWS.Rd}, which
 records changes that will appear in the @emph{next} release of R,
 including bug fixes that do not appear on the Bug Tracker.  
@@ -3591,7 +3649,7 @@ the subject line.
 
 A bug report can be generated using the function @code{bug.report()}.
 For reports on R this will open the Web page at
- at url{http://bugs.R-project.org/}: for a contributed package it will open
+ at url{https://bugs.R-project.org/}: for a contributed package it will open
 the package's bug tracker Web page or help you compose an email to the
 maintainer.
 
@@ -3607,7 +3665,7 @@ Comments on and suggestions for the Windows port of R should be sent to
 Corrections to and comments on message translations should be sent to the
 last translator (listed at the top of the appropriate @samp{.po} file)
 or to the translation team as listed at
- at url{http://developer.R-project.org/TranslationTeams.html}.
+ at url{https://developer.R-project.org/TranslationTeams.html}.
 
 @node Acknowledgments,  , R Bugs, Top
 @chapter Acknowledgments
diff --git a/doc/manual/R-admin.texi b/doc/manual/R-admin.texi
index 53dc640..a118ab6 100644
--- a/doc/manual/R-admin.texi
+++ b/doc/manual/R-admin.texi
@@ -59,7 +59,7 @@ This is a guide to installation and administration for R.
 * Obtaining R::                 
 * Installing R under Unix-alikes::  
 * Installing R under Windows::  
-* Installing R under OS X::     
+* Installing R under macOS::    
 * Running R::                   
 * Add-on packages::             
 * Internationalization::        
@@ -80,7 +80,7 @@ This is a guide to installation and administration for R.
 
 Sources, binaries and documentation for @R{} can be obtained via
 @acronym{CRAN}, the ``Comprehensive R Archive Network'' whose current
-members are listed at @uref{http://CRAN.R-project.org/@/mirrors.html}.
+members are listed at @uref{https://CRAN.R-project.org/@/mirrors.html}.
 
 @menu
 * Getting and unpacking the sources::  
@@ -101,7 +101,7 @@ tar -xf R- at var{x}. at var{y}. at var{z}.tar.gz
 @noindent
 on systems that have a suitable at footnote{e.g.@: @acronym{GNU}
 @command{tar} version 1.15 or later, or that from the @samp{libarchive}
-(as used on OS X versions 10.6 and later) or `Heirloom Toolchest'
+(as used on macOS versions 10.6 and later) or `Heirloom Toolchest'
 distributions.}  @command{tar} installed.  On other systems you need to
 have the @command{gzip} program installed, when you can use
 
@@ -118,8 +118,8 @@ before unpacking so that the files will be readable by the target group
 (e.g.,@: @code{umask 022} to be usable by all users).  Keep this
 setting of @code{umask} whilst building and installing.
 
-If you use a recent GNU version of @command{tar} and do this as a root
-account (which on Windows includes accounts with administrator
+If you use a recent @acronym{GNU} version of @command{tar} and do this
+as a root account (which on Windows includes accounts with administrator
 privileges) you may see many warnings about changing ownership.  In
 which case you can use
 
@@ -141,17 +141,17 @@ by spaces.)
 
 A patched version of the current release, @samp{r-patched}, and the
 current development version, @samp{r-devel}, are available as daily
-tarballs and via access to the R Subversion repository.  (For the two
+tarballs and via access to the @R{} Subversion repository.  (For the two
 weeks prior to the release of a minor (3.x.0) version, @samp{r-patched}
 tarballs may refer to beta/release candidates of the upcoming release,
 the patched version of the current release being available via
 Subversion.)
 
 The tarballs are available from
- at uref{ftp://ftp.stat.math.ethz.ch/@/pub/@/Software/R/}.  Download
+ at uref{https://stat.ethz.ch/R/daily}.  Download
 @file{R-patched.tar.gz} or @file{R-devel.tar.gz} (or the @file{.tar.bz2}
 versions) and unpack as described in the previous section.  They are
-built in exactly the same way as distributions of R releases.
+built in exactly the same way as distributions of @R{} releases.
 
 @menu
 * Using Subversion and rsync::  
@@ -163,7 +163,7 @@ built in exactly the same way as distributions of R releases.
 
 Sources are also available via @uref{https://svn.R-project.org/R/}, the
 R Subversion repository.  If you have a Subversion client (see
- at uref{http://subversion.apache.org/}), you can check out and update the
+ at uref{https://subversion.apache.org/}), you can check out and update the
 current @samp{r-devel} from
 @uref{https://svn.r-project.org/@/R/@/trunk/} and the current
 @samp{r-patched} from
@@ -184,8 +184,8 @@ the four-week period prior to the release.
 
 Note that @samp{https:} is required at footnote{for some Subversion clients
 @samp{http:} may appear to work, but requires continual redirection.},
-and that the SSL certificate for the Subversion server of the R project
-should be recognized as from a trusted source.
+and that the SSL certificate for the Subversion server of the @R{}
+project should be recognized as from a trusted source.
 
 Note that retrieving the sources by e.g.@: @command{wget -r} or
 @command{svn export} from that URL will not work (and will give a error
@@ -202,19 +202,19 @@ appropriate sources for the recommended packages, run
 If downloading manually from @acronym{CRAN}, do ensure that you have the
 correct versions of the recommended packages: if the number in the file
 @file{VERSION} is @samp{@var{x}. at var{y}. at var{z}} you need to download
-the contents of @samp{http://CRAN.R-project.org/src/contrib/@var{dir}},
+the contents of @samp{https://CRAN.R-project.org/src/contrib/@var{dir}},
 where @var{dir} is @samp{@var{x}. at var{y}. at var{z}/Recommended} for
 r-devel or @file{@var{x}. at var{y}-patched/Recommended} for r-patched,
 respectively, to directory @file{src/library/Recommended} in the sources
 you have unpacked.  After downloading manually you need to execute
 @command{tools/link-recommended} from the top level of the sources to
 make the requisite links in @file{src/library/Recommended}.  A suitable
-incantation from the top level of the R sources using @command{wget}
+incantation from the top level of the @R{} sources using @command{wget}
 might be (for the correct value of @file{@var{dir}})
 
 @example
 wget -r -l1 --no-parent -A\*.gz -nd -P src/library/Recommended \
-  http://CRAN.R-project.org/src/contrib/@var{dir}
+  https://CRAN.R-project.org/src/contrib/@var{dir}
 ./tools/link-recommended
 @end example
 
@@ -227,26 +227,29 @@ wget -r -l1 --no-parent -A\*.gz -nd -P src/library/Recommended \
 @R{} will configure and build under most common Unix and Unix-alike
 platforms including @samp{@var{cpu}-*-linux-gnu} for the
 @cputype{alpha}, @cputype{arm}, @cputype{hppa}, @cputype{ix86},
- at cputype{ia64}, @cputype{m68k}, @cputype{mips}, @cputype{mipsel},
- at cputype{powerpc}, @cputype{s390}, @cputype{sparc}, and @cputype{x86_64}
- at acronym{CPU}s,
- at c (see e.g.@:  @uref{http://buildd.debian.org/build.php?&pkg=r-base}),
- at c Actually, see http://packages.debian.org/unstable/math/r-base-core as
+ at cputype{m68k}, @cputype{mips}, @cputype{mipsel}, @cputype{powerpc},
+ at cputype{s390}, @cputype{sparc}, and @cputype{x86_64} @acronym{CPU}s,
+ at c (see e.g.@:  @uref{https://buildd.debian.org/build.php?&pkg=r-base}),
+ at c Actually, see https://packages.debian.org/unstable/math/r-base-core as
 @c the build daemon is not used for all platforms; note also that Debian
- at c has x86_64 <=> amd, ix86 <=> i386.
+ at c has x86_64 <=> amd64, ix86 <=> i386.
 @samp{x86_64-@/apple-@/darwin}, @samp{i386-@/sun-@/solaris} and
 @samp{sparc-@/sun-@/solaris} as well as
 perhaps (it is tested less frequently on these platforms)
 @samp{i386-@/apple-@/darwin}, @samp{i386-@/*-@/freebsd}, @samp{x86_64-@/*-@/freebsd},
- at samp{i386-@/*-@/netbsd}, @samp{i386-@/*-@/openbsd} and
+ at samp{i386-@/*-@/netbsd}, @samp{x86_64/*-@/openbsd} and
 @samp{powerpc-@/ibm-@/aix6*}
 
 @cindex Linux
- at cindex OS X
+ at cindex macOS
 In addition, binary distributions are available for some common Linux
-distributions and for OS X (formerly Mac OS).  See the @acronym{FAQ} for
-current details.  These are installed in platform-specific ways, so for
-the rest of this chapter we consider only building from the sources.
+distributions and for macOS (formerly OS X and Mac OS).  See the
+ at acronym{FAQ} for current details.  These are installed in
+platform-specific ways, so for the rest of this chapter we consider only
+building from the sources.
+
+Cross-building is not possible: installing @R{} builds a minimal version
+of @R{} and then runs many @R{} scripts to complete the build.
 
 @menu
 * Simple compilation::          
@@ -309,10 +312,9 @@ make check
 
 @noindent
 Failures are not necessarily problems as they might be caused by missing
-functionality, at footnote{for example, if you configured @R{} with
- at option{--without-recommended}.} but you should look carefully at any
-reported discrepancies.  (Some non-fatal errors are expected in locales
-that do not support Latin-1, in particular in true @code{C} locales and
+functionality, but you should look carefully at any reported
+discrepancies.  (Some non-fatal errors are expected in locales that do
+not support Latin-1, in particular in true @code{C} locales and
 non-UTF-8 non-Western-European locales.)  A failure in
 @file{tests/ok-errors.R} may indicate inadequate resource limits
 (@pxref{Running R}).
@@ -333,7 +335,7 @@ make check-all
 @noindent
 see file @file{tests/README} and @ref{Testing a Unix-alike Installation}
 for the possibilities of doing this in parallel.  Note that these checks
-need the recommended packages to be installed.
+are only run completely if the recommended packages are installed.
 
 If the command @command{configure} and @command{make} commands execute
 successfully, a shell-script front-end called @file{R} will be created
@@ -363,7 +365,8 @@ and so on, as described further below.  This has the advantage of always
 keeping your source tree clean and is particularly recommended when you
 work with a version of @R{} from Subversion.  (You may need
 @acronym{GNU} @command{make} to allow this, and you will need no spaces
-in the path to the build directory.)
+in the path to the build directory.  It is unlikely to work if the
+source directory has previously been used for a build.)
 
 @c For those obtaining @R{} @emph{via} Subversion, one additional step is
 @c necessary:
@@ -381,7 +384,7 @@ in the path to the build directory.)
 Now @code{rehash} if necessary, type @kbd{R}, and read the @R{} manuals
 and the @R{} @acronym{FAQ} (files @file{FAQ} or
 @file{doc/manual/R-FAQ.html}, or
- at uref{http://CRAN.R-project.org/@/doc/@/FAQ/@/R-FAQ.html} which always
+ at uref{https://CRAN.R-project.org/@/doc/@/FAQ/@/R-FAQ.html} which always
 has the version for the latest release of @R{}).
 
 Note: if you already have @R{} installed, check that where you installed
@@ -425,9 +428,10 @@ There is a set of manuals that can be built from the sources,
 @table @samp
 @item fullrefman
 Printed versions of all the help pages for base and recommended packages
-(over 3300 pages).
+(around 3500 pages).
 @item refman
-Printed versions of the help pages for selected base packages (over 1900 pages)
+Printed versions of the help pages for selected base packages (around
+2000 pages)
 @item R-FAQ
 R @acronym{FAQ}
 @item R-intro
@@ -450,12 +454,16 @@ make pdf      @r{to create PDF versions}
 make info     @r{to create info files (not @samp{refman} nor @samp{fullrefman}).}
 @end example
 
+ at c texi2any from Mar 2013.
 You will not be able to build any of these unless you have
- at command{makeinfo} version 4.7 or later installed, and for PDF you must
+ at command{texi2any} version 5.1 or later installed, and for PDF you must
 have @command{texi2dvi} and @file{texinfo.tex} installed (which are part
 of the @acronym{GNU} @pkg{texinfo} distribution but are, especially
 @file{texinfo.tex}, often made part of the @TeX{} package in
-re-distributions).
+re-distributions).  For historical reasons, the path to
+ at command{texi2any} can be set by macro @samp{MAKEINFO} in
+ at file{config.site} (@command{makeinfo} is nowadays a link to
+ at command{texi2any}).
 
 The PDF versions can be viewed using any recent PDF viewer: they have
 hyperlinks that can be followed.  The info files are suitable for
@@ -482,13 +490,13 @@ fonts.  We have provided four alternatives:
 and Courier.  This works well both for on-screen viewing and for
 printing.  One disadvantage is that the Usage and Examples sections may
 come out rather wide: this can be overcome by using @emph{in addition}
-either of the options @code{inconsolata}, on a Unix-alike only if found
+either of the options @code{inconsolata} (on a Unix-alike only if found
 by @command{configure}) or @code{beramono}, which replace the Courier
 monospaced font by Inconsolata or Bera Sans mono respectively.  (You
 will need a recent version of the appropriate @LaTeX{} package
 @pkg{inconsolata}@footnote{Instructions on how to install the latest
 version are at
- at uref{http://www.ctan.org/tex-archive/fonts/inconsolata/}.} or
+ at uref{https://www.ctan.org/@/tex-archive/@/fonts/@/inconsolata/}.} or
 @pkg{bera} installed.)
 
 Note that in most @LaTeX{} installations this will not actually use the
@@ -501,14 +509,14 @@ This needs @LaTeX{} packages @pkg{times}, @pkg{helvetic} and (if used)
 @item lm
 Using the @emph{Latin Modern} fonts.  These are not often installed as
 part of a @TeX{} distribution, but can obtained from
- at uref{http://www.ctan.org/@/tex-archive/@/fonts/@/ps-type1/@/lm/} and
+ at uref{https://www.ctan.org/@/tex-archive/@/fonts/@/ps-type1/@/lm/} and
 mirrors.  This uses fonts rather similar to Computer Modern, but is not
 so good on-screen as @code{times}.
 
 @item cm-super
 Using type-1 versions of the Computer Modern fonts by Vladimir Volovich.
 This is a large installation, obtainable from
- at uref{http://www.ctan.org/@/tex-archive/@/fonts/@/ps-type1/@/cm-super/}
+ at uref{https://www.ctan.org/@/tex-archive/@/fonts/@/ps-type1/@/cm-super/}
 and its mirrors.  These type-1 fonts have poor hinting and so are
 nowhere near as readable on-screen as the other three options.
 
@@ -526,7 +534,7 @@ The default can be overridden by setting the environment variable
 @enindex R_RD4PDF
 @env{R_RD4PDF}.  (On Unix-alikes, this will be picked up at install time
 and stored in @file{etc/Renviron}, but can still be overridden when the
-manuals are built, using @command{make -e}.)  The usual @footnote{on a
+manuals are built, using @command{make -e}.)  The usual at footnote{on a
 Unix-alike, @samp{inconsolata} is omitted if not found by
 @command{configure}.}  default value for @env{R_RD4PDF} is
 @samp{times,inconsolata,hyper}: omit @samp{hyper} if you do not want
@@ -535,9 +543,9 @@ package @pkg{hyperref}, and omit @samp{inconsolata} if you do not have
 @LaTeX{} package @pkg{inconsolata} installed.
 
 Further options, e.g@: for @pkg{hyperref}, can be included in a file
- at file{Rd.cfg} somewhere on your @LaTeX{} search path.  For example if
+ at file{Rd.cfg} somewhere on your @LaTeX{} search path.  For example, if
 you prefer the text and not the page number in the table of contents to
-be hyperlinked, use
+be hyperlinked use
 @example
 \ifthenelse@{\boolean@{Rd@@use@@hyper@}@}@{\hypersetup@{linktoc=section@}@}@{@}
 @end example
@@ -549,12 +557,11 @@ or
 @end example
 
 @noindent
-to hyperlink both text and page number at footnote{The @code{linktoc} 
-settings require @pkg{hyperref} version 6.78f or newer; with older versions of
- at pkg{hyperref} use @code{linktocpage=false} to hyperlink the text.}.
+to hyperlink both text and page number.
+ at c Requires 6.78f from Aug 2008.
 
-Ebook versions in one or both of @file{.epub} and @file{.mobi} formats
-can be made by running in @file{doc/manual} one of
+Ebook versions of most of the manuals in one or both of @file{.epub} and
+ at file{.mobi} formats can be made by running in @file{doc/manual} one of
 @example
 make ebooks
 make epub
@@ -564,9 +571,9 @@ make mobi
 @noindent
 This requires @command{ebook-convert} from @command{Calibre}
 (@uref{http://calibre-ebook.com/download}), or from most Linux
-distributions).  If necessary the path to @command{ebook-convert} can be
+distributions.  If necessary the path to @command{ebook-convert} can be
 set as make macro @env{EBOOK} to by editing @file{doc/manual/Makefile}
-(which contains a commented value suitable for OS X).
+(which contains a commented value suitable for macOS).
 
 
 @node Installation, Uninstallation, Making the manuals, Installing R under Unix-alikes
@@ -625,7 +632,8 @@ the option @option{--prefix}, as in
 @end example
 
 @noindent
-This causes @command{make install} to install the @R{} script to
+where the value should be an absolute path.  This causes @command{make
+install} to install the @R{} script to
 @file{/where/you/want/R/to/go/bin}, and so on.  The prefix of the
 installation directories can be seen in the status message that is
 displayed at the end of @command{configure}.  The installation may need
@@ -638,8 +646,8 @@ make prefix=/path/to/here install
 @end example
 
 @noindent
-at least with @acronym{GNU} @command{make} (and current Solaris
- at command{make}, but not some older Unix makes).
+at least with @acronym{GNU} or Solaris @command{make} (but not some
+older Unix makes).
 
 More precise control is available at configure time via options: see
 @command{configure --help} for details.  (However, most of the `Fine
@@ -720,8 +728,8 @@ make install-pdf
 @noindent
 Once again, it is optional to specify @code{prefix}, @code{libdir} or
 @code{rhome} (the PDF manuals are installed under the @R{} home
-directory).  (@command{make install-info} needs Perl installed if there
-is no command @command{install-info} on the system.)
+directory).  (@command{make install-info} needs @command{Perl} installed
+if there is no command @command{install-info} on the system.)
 
 More precise control is possible.  For info, the setting used is that of
 @code{infodir} (default @file{@var{prefix}/info}, set by configure
@@ -733,7 +741,7 @@ temporary directory in order to move the installed tree to its final
 destination.  In this case @code{prefix} (and so on) should reflect the
 @enindex DESTDIR
 final destination, and @env{DESTDIR} should be used: see
- at uref{http://www.gnu.org/@/prep/@/standards/@/html_node/@/DESTDIR.html}.
+ at uref{https://www.gnu.org/@/prep/@/standards/@/html_node/@/DESTDIR.html}.
 
 You can optionally install the run-time tests that are part of
 @command{make check-all} by
@@ -793,7 +801,7 @@ If you have two or more such builds you can install them over each other
 (and for 32/64-bit builds on one architecture, one build can be done
 without @samp{r_arch}).  The space savings can be considerable: on
 @cputype{x86_64} Linux a basic install (without debugging symbols) took
-63Mb, and adding a 32-bit build added 6Mb.  If you have installed
+74Mb, and adding a 32-bit build added 6Mb.  If you have installed
 multiple builds you can select which build to run by
 
 @example
@@ -841,8 +849,8 @@ to select a sub-architecture to check.
 Sub-architectures are also used on Windows, but by selecting executables
 within the appropriate @file{bin} directory,
 @file{@var{R_HOME}/bin/i386} or @file{@var{R_HOME}/bin/x64}.  For
-backwards compatibility with @R{} < 2.12.0, there are executables
- at file{@var{R_HOME}/bin/R.exe} or @file{@var{R_HOME}/bin/Rscript.exe}:
+backwards compatibility there are executables
+ at file{@var{R_HOME}/bin/R.exe} and @file{@var{R_HOME}/bin/Rscript.exe}:
 these will run an executable from one of the subdirectories, which one
 being taken first from the
 @enindex R_ARCH
@@ -859,13 +867,13 @@ installation).
 @node Multilib,  , Sub-architectures, Sub-architectures
 @subsection Multilib
 
-On Linux at footnote{mainly on RedHat and Fedora, whose layout is described
-here.}, there is an alternative mechanism for mixing 32-bit and 64-bit
-libraries known as @emph{multilib}. If a Linux distribution supports
-multilib, then parallel builds of @R{} may be installed in the
-sub-directories @file{lib} (32-bit) and @file{lib64} (64-bit).  The
-build to be run may then be selected using the @command{setarch}
-command. For example, a 32-bit build may be run by
+For some Linux distributions at footnote{mainly on RedHat and Fedora, whose
+layout is described here.}, there is an alternative mechanism for mixing
+32-bit and 64-bit libraries known as @emph{multilib}. If the Linux
+distribution supports multilib, then parallel builds of @R{} may be
+installed in the sub-directories @file{lib} (32-bit) and @file{lib64}
+(64-bit).  The build to be run may then be selected using the
+ at command{setarch} command. For example, a 32-bit build may be run by
 
 @example
 setarch i686 R
@@ -882,8 +890,8 @@ sessions in which packages are to be installed, even if that is the only
 version of @R{} installed (since this tells the package installation
 code the architecture needed).
 
-At present there is a potential problem with packages using Java, as
-the post-install for a @cputype{i686} RPM on @cputype{x86_64} Linux
+There is a potential problem with packages using Java, as the
+post-install for a @cputype{i686} RPM on @cputype{x86_64} Linux
 reconfigures Java and will find the @cputype{x86_64} Java.  If you know
 where a 32-bit Java is installed you may be able to run (as root)
 
@@ -912,10 +920,9 @@ to @R{} or intended for specialist uses by the @R{} developers.
 
 One that may be useful when working on @R{} itself is the option
 @option{--disable-byte-compiled-packages}, which ensures that the base
-and recommended packages are lazyloaded but not byte-compiled.
-(Alternatively the (make or environment) variable
- at env{R_NO_BASE_COMPILE} can be set to a non-empty value for the duration
-of the build.)
+and recommended packages are not byte-compiled.  (Alternatively the
+(make or environment) variable @env{R_NO_BASE_COMPILE} can be set to a
+non-empty value for the duration of the build.)
 
 Option @option{--with-internal-tzcode} makes use of @R{}'s own code and
 copy of the Olson database for managing timezones.  This will be
@@ -929,10 +936,149 @@ deduced correctly, but if necessary it can be set as the value of
 environment variable @env{TZ}.
 
 
+ at menu
+* OpenMP Support::              
+* C++ Support::                 
+ at end menu
+
+ at node OpenMP Support, C++ Support, Other Options, Other Options
+ at subsection OpenMP Support
+
+By default @command{configure} searches for suitable
+options at footnote{for example, @option{-fopenmp}, @option{-xopenmp} or
+ at 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.
+
+Only the C result is currently used for @R{} itself, and only if
+ at code{MAIN_LD}/@code{DYLIB_LD} were not specified.  This can be
+overridden by specifying
+ at example
+R_OPENMP_CFLAGS
+ at end example
+
+Use for packages has similar restrictions (involving @code{SHLIB_LD} and
+similar: note that as FORTRAN 77 code is normally linked by the C
+compiler, both need to support OpenMP) and can be overridden by
+specifying some of
+ at example
+SHLIB_OPENMP_CFLAGS
+SHLIB_OPENMP_CXXFLAGS
+SHLIB_OPENMP_FCFLAGS
+SHLIB_OPENMP_FFLAGS
+ at end example
+
+ at 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.
+
+ at node C++ Support,  , OpenMP Support, Other Options
+ at subsection C++ Support
+
+C++ is not used by @R{} itself, but support is provided for installing
+packages with C++ code via @command{make} macros defined in file
+ at file{etc/Makeconf} (and with explanations in file @file{config.site}):
+ at example
+CXX
+CXXFLAGS
+CXXPICFLAGS
+CXXSTD
+
+CXX98
+CXX98STD
+CXX98FLAGS
+CXX98PICFLAGS
+
+CXX11
+CXX11STD
+CXX11FLAGS
+CXX11PICFLAGS
+
+CXX14
+CXX14STD
+CXX14FLAGS
+CXX14PICFLAGS
+
+CXX17
+CXX17STD
+CXX17FLAGS
+CXX17PICFLAGS
+ at end example
+ at noindent
+The macros @code{CXX} etc are those used by default for C++ code.
+ at command{configure} will attempt to set the rest suitably, choosing for
+ at code{CXX11STD} a suitable flag such as @option{-std=c++11} for C++11
+support. Similarly, configure will if possible choose for
+ at code{CXX14STD} a flag at footnote{Currently this is a valid option for
+ at command{g++} 5 and later and 2016 versions of the Intel and Solaris
+compilers.  For earlier versions of @command{g++} one could try
+ at option{-std=c++1y}.} such as @option{-std=c++14} for C++14 support and
+ at option{-std=c++1z} for support for the forthcoming C++17 standard. The
+inferred values can be overridden in file @file{config.site} or on the
+ at command{configure} command line: user-supplied values will be tested
+compiling some C++11/14/17 code.
+
+ at R{} versions 3.1.0 to 3.3.3 used @code{CXX1X} rather than @code{CXX11},
+and these forms are deprecated but still accepted.
+
+It may be at footnote{This is true for earlier versions of @command{g++} such
+as 4.2.1, and also for commonly-used versions of the Solaris compiler
+ at code{CC}.} that there is no suitable flag for C++11 support, in which
+case a different compiler could be selected for @code{CXX11} and its
+corresponding flags.  Likewise, a different compiler can be specified for
+C++14 support with @code{CXX14} and for C++17 support with @code{CXX17}.
+Some compilers at footnote{Currently only
+GCC 6 and later, but this has been mooted for others.} 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
+ at example
+CXX='g++ -std=gnu++98'
+CXX11=g++
+CXX11STD='-std=c++11'
+CXX14=g++
+CXX14STD='-std=c++14'
+ at end example
+
+The @option{-std} flag is supported by the GCC, @command{clang}, Intel
+and Solaris compilers (the latter from version 12.4).  Currently
+accepted values are (plus some synonyms)
+ at example
+g++:     c++98 gnu++98 c++11 gnu+11 c++14 gnu++14 c++1z gnu++1z
+Intel:   gnu+98 c++11 c++14 (from 16.0) c++17 (from 17.0)
+Solaris: c++03 c++11 c++14 (from 12.5)
+ at end example
+ at noindent
+(Those for @command{clang++} are not documented, but seem to be based on
+ at code{g++}.)  Versions 4.3.x to 4.8.x of @command{g++} accepted flag
+ at option{-std=c++0x} with partial support at footnote{For when features were
+supported, see
+ at uref{https://gcc.gnu.org/@/projects/@/cxx-status.html#cxx11}.} for
+C++11: this is currently still accepted as a deprecated synonym for
+ at option{-std=c++11}.  (At least for versions 4.8.x it has sufficient
+support to be picked by @command{configure}.)  Option
+ at option{-std=c++14} was introduced in version 5.x.
+
+ at c c++1y does not pass the configure test in 4.9.3
+ at c , with @option{-std=c++1y} (introduced at footnote{See
+ at c @uref{https://gcc.gnu.org/@/projects/@/cxx-status.html#cxx14} for which
+ at c C++14 features it supported.} in version 4.9.x) remaining as a deprecated
+ at c synonym.
+
+`Standards' for @command{g++} starting with @samp{gnu} enable `GNU
+extensions': what those are is hard to track down.
+
+For the use of C++11 and later in @R{} packages see the `Writing R
+Extensions' manual.
+
 @node Testing a Unix-alike Installation,  , Other Options, Installing R under Unix-alikes
 @section Testing an Installation
 
-Full testing is possible only if the test files have been installed with
+Full post-installation testing is possible only if the test files have
+been installed with
 
 @example
 make install-tests
@@ -955,8 +1101,8 @@ cd tests
 
 @noindent
 and other useful targets are @code{test-BasePackages} and
- at code{test-Recommended} to the run tests of the standard and
-recommended packages (if installed) respectively.
+ at code{test-Recommended} to run tests of the standard and recommended
+packages (if installed) respectively.
 
 This re-runs all the tests relevant to the installed @R{} (including for
 example code in the package vignettes), but not for example the ones
@@ -983,23 +1129,26 @@ Alternatively, the installed @R{} can be run, preferably with
 
 @example
 Sys.setenv(LC_COLLATE = "C", LC_TIME = "C", LANGUAGE = "en")
-library("tools")
-testInstalledBasic("both")
-testInstalledPackages(scope = "base")
-testInstalledPackages(scope = "recommended")
+tools::testInstalledBasic("both")
+tools::testInstalledPackages(scope = "base")
+tools::testInstalledPackages(scope = "recommended")
 @end example
 
 @noindent
 runs the basic tests and then all the tests on the standard and
 recommended packages.  These tests can be run from anywhere: the basic
 tests write their results in the @file{tests} folder of the @R{} home
-directory and run slightly fewer tests than the first approach: in
-particular they do not test Internet access.
+directory and run fewer tests than the first approach: in particular
+they do not test things which need Internet access---that can be tested
+by
+ at example
+tools::testInstalledBasic("internet")
+ at end example
 
 These tests work best if @command{diff} (in @file{Rtools*.exe} for
 Windows users) is in the path.
 
-It is possible to test the installed packages (but not the
+It is possible to test the installed packages (but not their
 package-specific tests) by @code{testInstalledPackages} even if
 @command{make install-tests} was not run.
 
@@ -1012,32 +1161,34 @@ LANGUAGE=en
 @end example
 
 @noindent
-but use a UTF-8 or Latin-1 locale.
+and use a UTF-8 or Latin-1 locale.
 
 
- at node Installing R under Windows, Installing R under OS X, Installing R under Unix-alikes, Top
+ at node Installing R under Windows, Installing R under macOS, Installing R under Unix-alikes, Top
 @chapter Installing R under Windows
 @cindex Installing under Windows
 
 The @file{bin/windows} directory of a @acronym{CRAN} site contains
 binaries for a base distribution and a large number of add-on packages
-from @acronym{CRAN} to run on Windows XP or later on ix86 @acronym{CPU}s
-(including AMD64/Intel64 cpus and Windows x64).
+from @acronym{CRAN} to run on 32- or 64-bit Windows (XP or later) on
+ at cputype{ix86} and @cputype{x86_64} @acronym{CPU}s.
 
 Your file system must allow long file names (as is likely except
-perhaps for some network-mounted systems).
+perhaps for some network-mounted systems).  If it doesn't also support
+conversion to short name equivalents (a.k.a. DOS 8.3 names), then R
+ at emph{must} be installed in a path that does not contain spaces.
 
 Installation is @emph{via} the installer
 @file{@value{RWVERSION}-win.exe}.  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
+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.
 
 Note that you will be asked to choose a language for installation, and
 that choice applies to both installation and un-installation but not to
 running @R{} itself.
 
-See the @uref{http://CRAN.R-project.org/@/bin/@/windows/@/base/@/rw-FAQ.html, R
+See the @uref{https://CRAN.R-project.org/@/bin/@/windows/@/base/@/rw-FAQ.html, R
 Windows @acronym{FAQ}} for more details on the binary installer.
 
 @menu
@@ -1061,13 +1212,25 @@ Building is only tested in a 8-bit locale: using a multi-byte locale (as
 used for CJK languages) is unsupported and may not work (the scripts do
 try to select a @samp{C} locale; Windows may not honour this).
 
+ at strong{NB:} The build process is currently being changed to require
+external binary distributions of third-party software.  Their location
+is set using macro @code{EXT_LIBS} with default setting
+ at file{$(LOCAL_SOFT)}; the $(LOCAL_SOFT) macro defaults to
+ at file{$(R_HOME)/extsoft}.  This directory can be populated using
+ at command{make rsync-extsoft}. The location can be overridden by
+setting @code{EXT_LIBS} to a different path in
+ at file{src/gnuwin32/MkRules.local}. A suitable collection of files can
+also be obtained from 
+ at uref{https://CRAN.R-project.org/@/bin/@/windows/@/extsoft} or
+ at uref{https://www.stats.ox.ac.uk/@/pub/@/Rtools/@/libs.html}.
+
 @menu
 * Getting the tools::           
 * Getting the source files::    
 * Building the core files::     
-* Building the bitmap files::   
 * Building the cairo devices files::  
 * Using ICU for collation::     
+* Support for libcurl::         
 * Checking the build::          
 * Building the manuals::        
 * Building the Inno Setup installer::  
@@ -1081,7 +1244,7 @@ try to select a @samp{C} locale; Windows may not honour this).
 If you want to build @R{} from the sources, you will first need to
 collect, install and test an extensive set of tools.  See @ref{The
 Windows toolset} (and perhaps updates in
- at uref{http://CRAN.R-project.org/bin/@/windows/@/Rtools/}) for details.
+ at uref{https://CRAN.R-project.org/bin/@/windows/@/Rtools/}) for details.
 
 The @file{Rtools*.exe} executable installer described in @ref{The
 Windows toolset} also includes some source files in addition to the @R{}
@@ -1136,57 +1299,56 @@ automatically by running in @file{@var{R_HOME}/src/gnuwin32}
 make rsync-recommended
 @end example
 
- at end itemize
+ at item
+The binary distributions of external software.  Download
 
-The following additional items are normally installed by
- at file{Rtools31.exe}.  If instead you choose to do a completely manual
-build you will also need
+ at example
+https://www.stats.ox.ac.uk/pub/Rtools/goodies/multilib/local323.zip
+ at end example
 
- at itemize
+ at noindent
+(or a more recent version if appropriate), create an empty directory, 
+say @file{c:/R/extsoft}, and unpack it in
+that directory by e.g.@:
 
- at item
-The Tcl/Tk support files are contained in @file{Rtools31.exe} and
-available as @file{.zip} files from
- at uref{http://www.stats.ox.ac.uk/pub/Rtools}.  Please make sure you
-install the right version: there is a 32-bit version and a 64-bit
-version.  They should be installed to @file{@var{R_HOME}}, creating
-directory @file{Tcl} there.
+ at example
+unzip local323.zip -d c:/R/extsoft
+ at end example
 
 @item
-You need @code{libpng}, @code{jpeg} and @code{libtiff} sources
-(available, e.g., from @uref{http://www.libpng.org/},
- at uref{http://www.ijg.org} and
- at uref{http://download.osgeo.org/@/libtiff/}); current versions are
-recommended and @code{jpeg} 7 or later is required.  It is also possible
-to use @samp{libjpeg-turbo} from
- at uref{http://sourceforge.net/@/projects/@/libjpeg-turbo/@/files/}.
-
-Working in the directory @file{@var{R_HOME}/src/gnuwin32/bitmap},
-install the @code{libpng} and @code{jpeg} sources in sub-directories.
-The @code{jpeg} sub-directory for version 9 is named @file{jpeg-9}; if
-you use a different version (e.g.@: @file{jpeg-9a} or
- at file{libjpeg-turbo}), copy file @file{src/gnuwin32/MkRules.dist} to
- at file{src/gnuwin32/MkRules.local} and edit the definition of
- at code{JPEGDIR}: the names of the @file{libpng} and @file{libtiff}
-directories can also be set there.
-
-Example:
-
- at example
-> tar -zxf libpng-1.6.10.tar.gz
-> mv libpng-1.6.10 libpng
-> tar -zxf jpegsrc.v9a.tar.gz
-> tar -zxf tiff-4.0.3.tar.gz
-> mv tiff-4.0.3/libtiff .
-> rm -rf tiff-4.0.3
+Make a local copy of the configuration rules by
+
+ at example
+cd @var{R_HOME}/src/gnuwin32
+cp MkRules.dist MkRules.local
 @end example
 
 @noindent
-(and see the comment above about @option{--no-same-owner}).
+and edit @file{MkRules.local}, uncommenting @code{EXT_LIBS} and setting
+it to the appropriate path (in our example @file{c:/R/extsoft}).
+
+Look through the file @file{MkRules.local} and make any other changes
+needed: in particular, this is where a 64-bit build is selected and the
+locations are set of external software for ICU collation and the
+cairo-based devices.
 
 @end itemize
 
- at node Building the core files, Building the bitmap files, Getting the source files, Building from source
+The following additional item is normally installed by
+ at file{Rtools*.exe}.  If instead you choose to do a completely manual
+build you will also need
+
+ at itemize
+
+ at item
+The Tcl/Tk support files are contained in @file{Rtools*.exe}.  Please
+make sure you install the right version: there is a 32-bit version and a
+64-bit version.  They should be installed to @file{@var{R_HOME}},
+creating directory @file{Tcl} there.
+
+ at end itemize
+
+ at node Building the core files, Building the cairo devices files, Getting the source files, Building from source
 @subsection Building the core files
 
 @enindex TMPDIR
@@ -1199,13 +1361,10 @@ You may need to compile under a case-honouring file system: we found
 that a @command{samba}-mounted file system (which maps all file names to
 lower case) did not work.
 
-Open a command window at @file{@var{R_HOME}/src/gnuwin32}.  Look at
- at file{MkRules.dist} and if settings need to be altered, copy it to
- at file{MkRules.local} and edit the settings there.  In particular, this
-is where a 64-bit build is selected.  Then run
+Open a command window at @file{@var{R_HOME}/src/gnuwin32}, then run
 
 @example
-make all recommended
+make all recommended vignettes
 @end example
 
 @noindent
@@ -1221,19 +1380,12 @@ anti-virus checking such as the on-access scanning of Sophos can slow
 the build down several-fold.
 
 @item
-By default Doug Lea's @code{malloc} in the file
- at file{@var{R_HOME}/src/gnuwin32/malloc.c} is used for R's internal
-memory allocations.  You can opt out of this by setting
- at code{LEA_MALLOC=NO} in @file{MkRules.dist}, in which case the @code{malloc}
-in @file{msvcrt.dll} is used.  This does impose a considerable
-performance penalty and has not been tested recently.
-
- at item
 You can run a parallel make by e.g.
 
 @example
 make -j4 all
 make -j4 recommended
+make vignettes
 @end example
 
 @noindent
@@ -1248,20 +1400,7 @@ packages.
 
 @end itemize
 
- at node Building the bitmap files, Building the cairo devices files, Building the core files, Building from source
- at subsection Building the bitmap files
- at cindex Rbitmap.dll
-
-The file
- at file{@var{R_HOME}/library/grDevices/libs/@{i386,x64@}Rbitmap.dll} is
-not built automatically.
-
-Running @code{make} in @file{@var{R_HOME}/src/gnuwin32/bitmap} or
- at code{make bitmapdll} in @file{@var{R_HOME}/@/src/gnuwin32} should build
- at file{Rbitmap.dll} and install it under
- at file{@var{R_HOME}/library/grDevices/libs}.
-
- at node Building the cairo devices files, Using ICU for collation, Building the bitmap files, Building from source
+ at node Building the cairo devices files, Using ICU for collation, Building the core files, Building from source
 @subsection Building the cairo devices
 @cindex winCairo.dll
 
@@ -1269,23 +1408,22 @@ The devices based on cairographics (@code{svg}, @code{cairo_pdf},
 @code{cairo_ps} and the @code{type = "cairo"} versions of @code{png},
 @code{jpeg}, @code{tiff} and @code{bmp}) are implemented in a separate
 DLL @file{winCairo.dll} which is loaded when one of these devices is
-first used.  It is not built by default, and needs to be built after
- at file{Rbitmap.dll}, by @command{make cairodevices}.
+first used.  It is not built by default, and needs to be built (after
+ at command{make all}) by @command{make cairodevices}.
 
 To enable the building of these devices you need to install the static
 cairographics libraries built by Simon Urbanek at
- at uref{http://www.rforge.net/Cairo/files/cairo-current-win.tar.gz}.  Set
+ at uref{https://www.rforge.net/@/Cairo/@/files/@/cairo-current-win.tar.gz}.  Set
 the macro @samp{CAIRO_HOME} in @file{MkRules.local}.  (Note that this
 tarball unpacks with a top-level directory @file{src/}:
 @samp{CAIRO_HOME} needs to include that directory in its path.)
 
- at node Using ICU for collation, Checking the build, Building the cairo devices files, Building from source
+ at node Using ICU for collation, Support for libcurl, Building the cairo devices files, Building from source
 @subsection Using ICU for collation
 
-It is possible (and even recommended) to build @R{} to use ICU
-(International Components for Unicode,
- at uref{http://site.icu-project.org/}) for collation, as is commonly done
-on Unix-alikes.
+It is recommended to build @R{} to support ICU (International Components
+for Unicode, @uref{http://site.icu-project.org/}) for collation, as is
+commonly done on Unix-alikes.
 
 Two settings are needed in @file{MkRules.local}, 
 @example
@@ -1298,15 +1436,30 @@ ICU_PATH = /path/to/ICU
 @noindent
 The first should be uncommented and the second set to the top-level
 directory of a suitably packaged binary build of ICU, for example that
-at @url{http://www.stats.ox.ac.uk/pub/Rtools/goodies/ICU_531.zip}.
+at @url{https://www.stats.ox.ac.uk/pub/Rtools/goodies/ICU_531.zip}.
 Depending on the build, it may be necessary to edit the macro
 @code{ICU_LIBS}.
 
-Unlike on a Unix-alike, it is currently necessary to call
+Unlike on a Unix-alike, it is normally necessary to call
 @code{icuSetCollate} to set a locale before ICU is actually used for
-collation.
+collation, or set the environment variable @env{R_ICU_LOCALE}.
+
+ at node Support for libcurl, Checking the build, Using ICU for collation, Building from source
+ at subsection Support for libcurl
+
+ at code{libcurl} version 7.28.0 or later is used to support
+ at code{curlGetHeaders} and the @code{"libcurl"} methods of
+ at code{download.file} and @code{url}.
+
+A suitable distribution can be found @emph{via}
+ at uref{https://www.stats.ox.ac.uk/@/pub/@/Rtools/@/libs.html} and its unpacked
+location should be specified in file @file{MkRules.local}.
+
+For secure use of e.g.@: @samp{https://} URLs Windows users may need to
+specify the path to up-to-date @emph{CA root certificates}: see
+ at code{?download.file}.
 
- at node Checking the build, Building the manuals, Using ICU for collation, Building from source
+ at node Checking the build, Building the manuals, Support for libcurl, Building from source
 @subsection Checking the build
 
 You can test a build by running
@@ -1337,7 +1490,7 @@ make check-all
 @end example
 
 @noindent
-for @code{check-devel} and @code{check-recommended}.
+for both @code{check-devel} and @code{check-recommended}.
 
 If a test fails, there will almost always be a @file{.Rout.fail} file in
 the directory being checked (often @file{tests/Examples} or
@@ -1352,7 +1505,7 @@ run in parallel.
 @node Building the manuals, Building the Inno Setup installer, Checking the build, Building from source
 @subsection Building the manuals
 
-The PDF manuals can be made by
+The PDF manuals require @pkg{texinfo} 5.1 or later, and can be made by
 
 @example
 make manuals
@@ -1374,21 +1527,23 @@ in your path).
 See the @ref{Making the manuals} section in the Unix-alike section for setting
 options such as the paper size and the fonts used.
 
-Version 4.x of @command{makeinfo} from Rtools is assumed by default.  If
-you have version 5.x of @pkg{texinfo}, @command{makeinfo} has been
-replaced by a @command{Perl} script @command{texi2any}: file
- at file{MkRules.dist} contains alternative macros to allow that to be used
-(copy it to @file{MkRules.local} before editing).  (A package of
- at pkg{texinfo} 5.x for use on Windows is available at
- at uref{http://www.stats.ox.ac.uk/pub/Rtools/}: you will also need to
-install @command{Perl}.)
+By default it is assumed that @pkg{texinfo} is not installed, and the
+manuals will not be built.  The comments in file @file{MkRules.dist}
+describe settings to build them.  (Copy that file to
+ at file{MkRules.local} and edit it.)  The @pkg{texinfo} 5.x package for
+use on Windows is available at
+ at uref{https://www.stats.ox.ac.uk/pub/Rtools/}: you will also need to
+install @command{Perl}@footnote{Suitable distributions include
+Strawberry Perl, @uref{http://strawberryperl.com/} and ActivePerl,
+ at uref{https://www.activestate.com/activeperl}.}
 
 @node Building the Inno Setup installer, Building the MSI installer, Building the manuals, Building from source
 @subsection Building the Inno Setup installer
 
-You need to have the files for a complete R build, including bitmap and
-Tcl/Tk support and the manuals, as well as the recommended packages and
-Inno Setup (@pxref{The Inno Setup installer}).
+You need to have the files for a complete @R{} build, including bitmap and
+Tcl/Tk support and the manuals (which requires @pkg{texinfo} installed),
+as well as the recommended packages and Inno Setup (@pxref{The Inno
+Setup installer}).
 
 Once everything is set up
 
@@ -1406,11 +1561,10 @@ building all the parts in the sequence:
 rbuild @r{(the executables, the @acronym{FAQ} docs etc.)}
 rpackages @r{(the base packages)}
 htmldocs @r{(the HTML documentation)}
-bitmapdll @r{(the bitmap support files)}
 cairodevices @r{(the cairo-based graphics devices)}
 recommended @r{(the recommended packages)}
 vignettes @r{(the vignettes in base packages:}
-	  @r{ only needed if building from an svn checkout)}
+	  @r{ only needed if building from an @command{svn} checkout)}
 manuals @r{(the PDF manuals)}
 rinstaller @r{(the install program)}
 crandir @r{(the @acronym{CRAN} distribution directory, only for 64-bit builds)}
@@ -1434,10 +1588,10 @@ make rinstaller EXTRA_PKGS='pkg1 pkg2 pkg3'
 
 
 An alternative way to customize the installer starting with a binary
-distribution is to first make an installation of R from the standard
+distribution is to first make an installation of @R{} from the standard
 installer, then add packages and make other customizations to that
 installation.  Then (after having customized file @file{MkRules},
-possibly @emph{via} @file{MkRules.local}, and having made R in the
+possibly @emph{via} @file{MkRules.local}, and having made @R{} in the
 source tree) in @file{src/gnuwin32/installer} run
 
 @example
@@ -1452,9 +1606,9 @@ Both methods create an executable with a standard name such as
 @file{@value{RWVERSION}-win.exe}, so please rename it to indicate that
 it is customized.  If you intend to @emph{distribute} a customized
 installer please do check that license requirements are met -- note that
-the installer will state that the contents are distributed under GPL-2
+the installer will state that the contents are distributed under GPL
 and this has a requirement for @emph{you} to supply the complete sources
-(including the R sources even if you started with a binary distribution
+(including the @R{} sources even if you started with a binary distribution
 of R, and also the sources of any extra packages (including their
 external software) which are included).
 
@@ -1471,18 +1625,18 @@ mode.  See @file{src/@/gnuwin32/installer/Makefile} for the names and
 values that can be set.
 
 The standard @acronym{CRAN} distribution of a 32/64-bit installer is
-made by first building 32-bit R (just
+made by first building 32-bit @R{} (just
 
 @example
 make 32-bit
 @end example
 
 @noindent
-is needed), and then building 64-bit R with the macro @code{HOME32} set
-in file @file{MkRules.local} to the top-level directory of the 32-bit
-build.  Then the @command{make rinstaller} step copies the files that
-differ between architectures from the 32-bit build as it builds the
-installer image.
+is needed), and then (in a separate directory) building 64-bit @R{} with
+the macro @code{HOME32} set in file @file{MkRules.local} to the
+top-level directory of the 32-bit build.  Then the @command{make
+rinstaller} step copies the files that differ between architectures from
+the 32-bit build as it builds the installer image.
 
 @node Building the MSI installer, 64-bit Windows builds, Building the Inno Setup installer, Building from source
 @subsection Building the MSI installer
@@ -1493,11 +1647,10 @@ installs, and is not recommended for casual use.
 
 It makes use of the Windows Installer XML (WiX) toolkit @emph{version
 3.5} (or perhaps later, untested) available from
- at uref{http://wix.sourceforge.net/} or @uref{http://wixtoolset.org/}.
-Once WiX is installed, set the path to its home directory in
- at file{MkRules.local}.
+ at uref{http://wixtoolset.org/}.  Once WiX is installed, set the path to
+its home directory in @file{MkRules.local}.
 
-You need to have the files for a complete R build, including bitmap and
+You need to have the files for a complete @R{} build, including bitmap and
 Tcl/Tk support and the manuals, as well as the recommended packages.
 There is no option in the installer to customize startup options, so
 edit @file{etc/Rconsole} and @file{etc/Rprofile.site} to set these as
@@ -1533,20 +1686,20 @@ for suggesting WiX and building a prototype installer.
 @node 64-bit Windows builds,  , Building the MSI installer, Building from source
 @subsection 64-bit Windows builds
 
-To build a 64-bit version of R you need a 64-bit toolchain: the only one
+To build a 64-bit version of @R{} you need a 64-bit toolchain: the only one
 discussed here is based on the work of the MinGW-w64 project
 (@uref{http://sourceforge.net/@/projects/@/mingw-w64/}, but commercial
 compilers such as those from Intel and PGI could be used (and have been
 by @R{} redistributors).
 
-Support for MinGW-w64 was developed in the R sources over the period
+Support for MinGW-w64 was developed in the @R{} sources over the period
 2008--10 and was first released as part of @R{} 2.11.0.  The assistance
-of Yu Gong at a crucial step in porting R to MinGW-w64 is gratefully
+of Yu Gong at a crucial step in porting @R{} to MinGW-w64 is gratefully
 acknowledged, as well as help from Kai Tietz, the lead developer of the
 MinGW-w64 project.
 
 Windows 64-bit is now completely integrated into the @R{} and package
-build systems.
+build systems: a 64-bit build is selected in file @file{MkRules.local}.
 
 @node Testing a Windows Installation,  , Building from source, Installing R under Windows
 @section Testing an Installation
@@ -1581,88 +1734,105 @@ differ from the reference output as some files are installed with
 Windows' CRLF line endings.
 
 
- at node Installing R under OS X, Running R, Installing R under Windows, Top
- at chapter Installing R under OS X
- at cindex OS X
+ at node Installing R under macOS, Running R, Installing R under Windows, Top
+ at chapter Installing R under macOS
+ at cindex macOS
 
 @macro Rapp{}
 @sc{R.app}
 @end macro
 
+(`macOS' was known as `OS X' from 2012--2016 and as `Mac OS X' before that.)
+
 The front page of a @acronym{CRAN} site has a link `Download R for OS
-X'. Click on that, then download the file
- at file{R- at value{VERSIONno}-snowleopard.pkg} and install it.  This runs on
-OS X 10.6 and later (Snow Leopard, Lion, Mountain Lion, Mavericks,
-Yosemite, @dots{}); it is a 64-bit (@cputype{x86_64}) build which should
-run on all Macs from mid-2008 on.  For older Intel Macs and some older
-versions of the OS you can install @R{} from the sources.
-
-There is a separate installer package,
- at file{R- at value{VERSIONno}-mavericks.pkg}, for use on Mavericks and
-Yosemite: the `Snow Leopard' installer package also works there and may
-have more binary packages available (but there are a few packages using
-C++11 and only available for the Mavericks build).
+X'. Click on that, then download the file @file{R- at value{VERSIONno}.pkg}
+and install it. This runs on macOS 10.11 and later (El Capitan, Sierra,
+ at dots{}).
+
+Installers for R-patched and R-devel are usually available from
+ at uref{https://r.research.att.com}.  (Some of these packages are
+unsigned: to install those Control/right/two-finger click, select
+ at samp{Open with} and @samp{Installer}.)
+
+For some older versions of the OS you can in principle (it is little
+tested) install @R{} from the sources (see @ref{macOS}).
 
 It is important that if you use a binary installer package that your OS
-is fully updated: run `Software Update' from the Apple menu to be sure.
+is fully updated: look at `Updates' from the `App Store' to be sure.
 (If using XQuartz, check that is current.)
 
 To install, just double-click on the icon of the file you downloaded.
 At the `Installation Type' stage, note the option to `Customize'.  This
-currently shows three components.  Everyone will need the `R Framework'
-component: the `R GUI' and `Tcl/Tk' components are optional (the latter
-being needed to use package @pkg{tcltk}, and requires an X sub-system to
-be installed: @pxref{OS X}).
+currently shows four components: everyone will need the `R Framework'
+component: the remaining components are optional. (The `Tcl/Tk'
+component is needed to use package @pkg{tcltk}. The `Texinfo' component
+is only needed by those installing source packages or @R{} from its
+sources.)
 
 This is an Apple Installer package. If you encounter any problem during
 the installation, please check the Installer log by clicking on the
 ``Window'' menu and item ``Installer Log''. The full output (select
-``Show All Log'') is useful for tracking down problems.
+``Show All Log'') is useful for tracking down problems.  Note the the
+installer is clever enough to try to upgrade the last-installed version
+of the application where you installed it (which may not be where you
+want this time @dots{}).
 
-If you update your OS X version, you should re-install @R{}: the
-installer tailors the installation to the current version of the OS.
+Various parts of the build require XQuartz to be installed: : see
+ at uref{https://xquartz.macosforge.org/}.  These include the @pkg{tcltk}
+package and the @code{X11} device: attempting to use these without
+XQuartz will remind you.  Also the cairographics-based devices (which
+are not often used on macOS) such as @code{png(type = "cairo")}.
 
-For building @R{} from source, see @ref{OS X}.
+If you update your macOS version, you should re-install @R{} (and
+perhaps XQuartz): the installer may tailor the installation to the
+current version of the OS.
+
+For building @R{} from source, see @ref{macOS}.
 
 
 @menu
-* Running R under OS X::        
-* Uninstalling under OS X::     
+* Running R under macOS::       
+* Uninstalling under macOS::    
 * Multiple versions::           
 @end menu
 
- at node Running R under OS X, Uninstalling under OS X, Installing R under OS X, Installing R under OS X
- at section Running R under OS X
+ at node Running R under macOS, Uninstalling under macOS, Installing R under macOS, Installing R under macOS
+ at section Running R under macOS
 
-There are two ways to run @R{} on OS X from a @acronym{CRAN} binary
+There are two ways to run @R{} on macOS from a @acronym{CRAN} binary
 distribution.
 
 There is a GUI console normally installed with the @R{} icon in
 @file{/Applications} which you can run by double-clicking (e.g. from
-Launchpad or Finder).  This is usually referred to as @Rapp{} to
-distinguish it from command-line @R{}: its user manual is currently part
-of the OS X FAQ at
- at uref{http://cran.r-project.org/@/bin/@/macosx/@/RMacOSX-FAQ.html} and
-can be viewed from  @Rapp{}'s `Help' menu.
-
-
-You can run command-line @R{} from a Terminal 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 library directory (under @file{~/Library/R},
-e.g. @file{~/Library/R/3.1/library}), and that warnings, messages and
+Launchpad or Finder).  (If you cannot find it there it was possibly
+installed elsewhere so try searching for it in Spotlight.) This is
+usually referred to as @Rapp{} to distinguish it from command-line @R{}:
+its user manual is currently part of the macOS FAQ at
+ at uref{https://cran.r-project.org/@/bin/@/macosx/@/RMacOSX-FAQ.html} and
+can be viewed from @Rapp{}'s `Help' menu.
+
+
+You can run command-line @R{} and @command{Rscript} from a
+Terminal at footnote{The installer as puts links to @command{R} and
+ at command{Rscript} in @file{/usr/local/bin}. If these are missing, you
+can run directly the copies in
+ at file{/Library/Frameworks/R.framework/Resources/}.} 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
+library directory (under @file{~/Library/R},
+e.g. @file{~/Library/R/3.4/library}), and that warnings, messages and
 other output to @file{stderr} are highlighted in bold.
 
-%% https://stat.ethz.ch/pipermail/r-sig-mac/2014-October/011131.html
-It has been reported that running @Rapp{} under Yosemite may fail if no
-preferences are stored, so if it fails when launched for the very first
-time, try it again (the first attempt will store some preferences).
+ at c https://stat.ethz.ch/pipermail/r-sig-mac/2014-October/011131.html
+It has been reported that running @Rapp{} may fail if no preferences are
+stored, so if it fails when launched for the very first time, try it
+again (the first attempt will store some preferences).
 
-Users of @Rapp{} under Mavericks and later need to be aware of the `App
-Nap' feature
-(@uref{https://developer.apple.com/library/mac/releasenotes/MacOSX/WhatsNewInOSX/Articles/MacOSX10_9.html})
+Users of @Rapp{} need to be aware of the `App Nap' feature
+(@uref{https://developer.apple.com/@/library/@/mac/@/releasenotes/@/MacOSX/@/WhatsNewInOSX/@/Articles/MacOSX10_9.html})
 which can cause @R{} tasks to appear to run very slowly when not
-producing output in the console.  Here are three ways to avoid it:
+producing output in the console.  Here are ways to avoid it:
 
 @itemize
 @item
@@ -1670,93 +1840,107 @@ Ensure that the console is completely visible (or at least the activity
 indicator at the top right corner is visible).
 
 @item
-Call @samp{Get Info} on the application (e.g.@: from Finder). This may
-have two tick boxes in the `General' panel: click the one named `Prevent
-App Nap' if it is not already ticked.  (This only available for builds
-made prior to Mavericks.)
-
- at item
 In a Terminal, run
 @example
 defaults write org.R-project.R NSAppSleepDisabled -bool YES
 @end example
 
 @noindent
-(see @uref{https://developer.apple.com/library/mac/releasenotes/MacOSX/WhatsNewInOSX/Articles/MacOSX10_9.html}).
+(see @uref{https://developer.apple.com/@/library/@/mac/@/releasenotes/@/MacOSX/@/WhatsNewInOSX/@/Articles/MacOSX10_9.html}).
 @end itemize
 
 Using the @code{X11} device or the X11-based versions of @code{View()}
-and @code{edit} for data frames and matrices (the latter are the default
-for command-line @R{} but not @Rapp{}) requires an X sub-system to be
-installed: see @ref{OS X}.  (So do some third-party packages.)
+and @code{edit()} for data frames and matrices (the latter are the
+default for command-line @R{} but not @Rapp{}) requires an X sub-system
+to be installed: see @ref{macOS}.  So do the @pkg{tcltk} package and
+some third-party packages.
 
- at node Uninstalling under OS X, Multiple versions, Running R under OS X, Installing R under OS X
- at section Uninstalling under OS X
+ at node Uninstalling under macOS, Multiple versions, Running R under macOS, Installing R under macOS
+ at section Uninstalling under macOS
 
- at R{} for OS X consists of two parts: the GUI (@Rapp{}) and the R
+ at R{} for macOS consists of two parts: the GUI (@Rapp{}) and the R
 framework. The un-installation is as simple as removing those folders
-(e.g.@: by dragging them into the Trash). The typical installation will
+(e.g.@: by dragging them onto the Trash). The typical installation will
 install the GUI into the @file{/Applications/R.app} folder and the R
-framework into the @file{/Library/Frameworks/R.framework} folder.  This
-does leave some links in @file{/usr/bin}.
+framework into the @file{/Library/Frameworks/R.framework} folder.  The
+links to @file{R} and @file{Rscript} in @file{/usr/local/bin} should
+also be removed.
 
 If you want to get rid of @R{} more completely using a Terminal, simply
-run (prepend @code{sudo} if needed):
+run:
 
 @example
-rm -rf /Library/Frameworks/R.framework /Applications/R.app \
-   /usr/bin/R /usr/bin/Rscript
+sudo rm -rf /Library/Frameworks/R.framework /Applications/R.app \
+   /usr/local/bin/R /usr/local/bin/Rscript
 @end example
 
-The installation consisted of three Apple packages:
- at code{org.r-project.R.x86_64.fw.pkg},
- at code{org.r-project.R.x86_64.GUI.pkg} and
- at code{org.r-project.x86_64.tcltk.x11} (not all of which need be
-installed). You can use @code{pkgutil --unlink} (not supported by Lion
-or later) to remove their files or @code{pkgutil --forget} if you want
-the Apple Installer to forget about the package without deleting its
-files (useful for the @R{} framework when installing multiple R versions
-in parallel), or after you have deleted the files.
+The installation consists of up to four Apple packages:@footnote{The
+framework for @R{} 3.3.x was named
+ at code{org.r-project.R.mavericks.fw.pkg}: use @command{pkgutil --pkgs |
+grep org.r-project} to check for earlier versions of @R{}.}
+ at code{org.r-project.R.el-capitan.fw.pkg},
+ at code{org.r-project.R.el-capitan.GUI.pkg},
+ at code{org.r-project.x86_64.tcltk.x11} and
+ at code{org.r-project.x86_64.texinfo}. You can use @code{pkgutil --forget}
+if you want the Apple Installer to forget about the package without
+deleting its files (useful for the @R{} framework when installing
+multiple @R{} versions in parallel), or after you have deleted the
+files.
 
-Uninstalling the Tcl/Tk component (which is installed under
- at file{/usr/local}) is not simple.  You can list the files it installed
+Uninstalling the Tcl/Tk or Texinfo components (which are installed under
+ at file{/usr/local}) is not as simple.  You can list the files they installed
 in a Terminal by
 
 @example
 pkgutil --files org.r-project.x86_64.tcltk.x11
+pkgutil --files org.r-project.x86_64.texinfo
 @end example
 
 @noindent
 These are paths relative to @file{/}, the root of the file system.
+ at c Maybe too dangerous for naive users.
+ at c file.remove removes empty directories on Unix.
+ at c The second could be uninstalled by an @R{} script like
+
+ at c @example
+ at c lis <- system2("pkgutil", "--files org.r-project.x86_64.texinfo", stdout = TRUE)
+ at c setwd("/")
+ at c file.remove(rev(lis))
+ at c @end example
+
+ at c @noindent
+ at c run as the owner of @file{/usr/local}.
 
- at node Multiple versions,  , Uninstalling under OS X, Installing R under OS X
+ at node Multiple versions,  , Uninstalling under macOS, Installing R under macOS
 @section Multiple versions
 
-The installer will remove any previous version 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
- at file{/Library/Frameworks/R.framework/Versions} as @file{3.0},
- at file{3.1} and so on, so it is not possible to have different
+The installer will remove any previous version at 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
+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
+ at file{/Library/Frameworks/R.framework/Versions} as @file{3.3},
+ at file{3.4} and so on, so it is not possible to have different
 @samp{3.x.y} versions installed for the same @samp{x}.
 
 A version of @R{} can be run directly from the command-line as e.g.@:
 @example
-/Library/Frameworks/R.framework/Versions/3.1/Resources/bin/R
+/Library/Frameworks/R.framework/Versions/3.4/Resources/bin/R
 @end example
 
 @noindent
 However, @Rapp{} will always run the `current' version, that is the last
 installed version.  A small utility, @command{Rswitch.app} (available at
- at url{http://r.research.att.com/#other}), can be used to change the
-`current' version.  However, this is of limited use as @Rapp{} is
-compiled against a particular version of @R{} and will likely crash if
-switched to an earlier version.  This may allow you to install a
-development version of @R{} (de-selecting @Rapp{}) and then switch back
-to the release version.
+ at url{https://r.research.att.com/#other}), can be used to change the
+`current' version.  This is of limited use as @Rapp{} is compiled
+against a particular version of @R{} and will likely crash if switched
+to an earlier version.  This may allow you to install a development
+version of @R{} (de-selecting @Rapp{}) and then switch back to the
+release version.
 
 
- at node Running R, Add-on packages, Installing R under OS X, Top
+ at node Running R, Add-on packages, Installing R under macOS, Top
 @chapter Running R
 
 How to start @R{} and what command-line options are available is discussed
@@ -1764,8 +1948,8 @@ in @ref{Invoking R, , Invoking R, R-intro, An Introduction to R}.
 
 You should ensure that the shell has set adequate resource limits: @R{}
 expects a stack size of at least 8MB and to be able to open at least 256
-file descriptors.  (Any modern OS will have default limits at least as
-large as these, but apparently NetBSD does not.  Use the shell command
+file descriptors.  (Any modern OS should have default limits at least as
+large as these, but apparently NetBSD may not.  Use the shell command
 @command{ulimit} (@command{sh}/@command{bash}) or @command{limit}
 (@command{csh}/@command{tcsh}) to check.)
 
@@ -1902,10 +2086,11 @@ library paths, separated by colons (semicolons on Windows).
 
 @menu
 * Windows packages::            
-* OS X packages::               
+* macOS packages::              
 * Customizing package compilation::  
 * Multiple sub-architectures::  
 * Byte-compilation::            
+* External software::           
 @end menu
 
 
@@ -1983,7 +2168,7 @@ name given is a single @file{.tar.gz} file.
 
 @code{install.packages} can look in several repositories, specified as a
 character vector by the argument @code{repos}: these can include a
- at acronym{CRAN} mirror, Bioconductor, Omegahat, R-forge, rforge.net,
+ at acronym{CRAN} mirror, Bioconductor, R-forge, rforge.net,
 local archives, local files, @dots{}).  Function
 @code{setRepositories()} can select amongst those repositories that the
 @R{} installation is aware of.
@@ -1991,18 +2176,21 @@ local archives, local files, @dots{}).  Function
 Naive users sometimes forget that as well as installing a package, they
 have to use @code{library} to make its functionality available.
 
- at node Windows packages, OS X packages, Installing packages, Installing packages
+ at node Windows packages, macOS packages, Installing packages, Installing packages
 @subsection Windows
 
 What @code{install.packages} does by default is different on Unix-alikes
-(except OS X) and Windows.  On Unix-alikes it consults the list of
+(except macOS) and Windows.  On Unix-alikes it consults the list of
 available @emph{source} packages on @acronym{CRAN} (or other
 repository/ies), downloads the latest version of the package sources,
 and installs them (via @code{R CMD INSTALL}).  On Windows it looks (by
-default) at the list of @emph{binary} versions of packages available for
-your version of @R{} and downloads the latest versions (if any),
-although optionally it will also download and install a source package
-by setting the @code{type} argument.
+default) first at the list of @emph{binary} versions of packages
+available for your version of @R{} and downloads the latest versions (if
+any).  If no binary version is available or the source version is newer,
+it will install the source versions of packages without compiled
+C/C++/Fortran code, and offer to do so for those with, if @command{make}
+is available (and this can be tuned by option
+ at code{"install.packages.compile.from.source"}).
 
 On Windows @code{install.packages} can also install a binary package
 from a local @file{zip} file (or the URL of such a file) by setting
@@ -2015,29 +2203,31 @@ containing either or both architectures (32- and 64-bit).
 
 A few of the binary packages need other software to be installed on your
 system: see for example
- at uref{http://CRAN.R-project.org/@/bin/@/windows/@/contrib/@/3.1/@/@@ReadMe}.
-For 64-bit builds, packages using Gtk+ (@CRANpkg{Cairo},
- at CRANpkg{RGtk2}, @CRANpkg{cairoDevice} and those that depend on them)
-need the @file{bin} directory of a bundled distribution from
- at uref{http://www.gtk.org/@/download/@/win32.php} or
- at uref{http://www.gtk.org/@/download/@/win64.php} in the path: it should
-work to have both 32- and 64-bit Gtk+ @file{bin} directories in the path
-on a 64-bit version of @R{}.
-
- at command{R CMD INSTALL} works in Windows to install source packages.  No
-additional tools are needed if the package does not contain compiled
-code, and @code{install.packages(type="source")} will work for such
-packages (and for those with compiled code if the tools (see @ref{The
-Windows toolset}) are in the path).  We have seen occasional permission
-problems after unpacking source packages on some Windows 7 and Server
-2008 systems: these have been circumvented by setting the environment
-variable @env{R_INSTALL_TAR} to @samp{tar.exe}.
+ at uref{https://CRAN.R-project.org/@/bin/@/windows/@/contrib/@/3.2/@/@@ReadMe}.
+Packages using Gtk+ (@CRANpkg{Cairo}, @CRANpkg{RGtk2},
+ at CRANpkg{cairoDevice} and those that depend on them) need the @file{bin}
+directory of a bundled distribution of Gtk2 from
+ at uref{http://ftp.gnome.org/@/pub/@/gnome/@/binaries/@/win32/@/gtk+} or
+ at uref{http://ftp.gnome.org/@/pub/@/gnome/@/binaries/@/win64/@/gtk+} in
+the path: it should work to have both 32- and 64-bit Gtk+ @file{bin}
+directories in the path on a 64-bit version of @R{}.
+
+ at command{R CMD INSTALL} works in Windows to install source packages.
+No additional tools are needed if the package does not contain
+compiled code, and @code{install.packages(type="source")} will work
+for such packages (and for those with compiled code if the tools (see
+ at ref{The Windows toolset}) are on the path, and the variables
+ at code{BINPREF} and @code{BINPREF64} are set properly; see the
+discussion below).  We have seen occasional permission problems after
+unpacking source packages on some systems: these have been
+circumvented by setting the environment variable @env{R_INSTALL_TAR}
+to @samp{tar.exe}.
 @enindex R_INSTALL_TAR
 
 If you have only a source package that is known to work with current
 @R{} and just want a binary Windows build of it, you could make use of
 the building service offered at
- at uref{http://win-builder.r-project.org/}.
+ at uref{https://win-builder.r-project.org/}.
 
 For almost all packages @command{R CMD INSTALL} will attempt to install
 both 32- and 64-bit builds of a package if run from a 32/64-bit install
@@ -2063,47 +2253,58 @@ sources on Windows without any additional tools.
 
 
 @enindex LOCAL_SOFT
-There is provision to make use of a system-wide library of installed
-external software by setting the @command{make} variable
- at code{LOCAL_SOFT}, to give an equivalent of @file{/usr/local} on a
-Unix-alike.  This can be set in @file{src/gnuwin/MkRules.local} when
- at R{} is built from sources (see the comments in
- at file{src/gnuwin/MkRules.dist}), or in file at footnote{or by adding it in
-a file such as @file{etc/i386/Makevars.site}, which does not exist by
-default.}  @file{etc/i386/Makeconf} or @file{etc/x64/Makeconf} for an
-installed version of @R{}.  The version used by @acronym{CRAN} can be
-downloaded from @uref{http://www.stats.ox.ac.uk/pub/Rtools/libs.html}.
-
- at node OS X packages, Customizing package compilation, Windows packages, Installing packages
- at subsection OS X
-
-On OS X @code{install.packages} works as it does on other Unix-alike
-systems, but there is an additional type @code{mac.binary} (the default
-in the @acronym{CRAN} distribution but not when compiling from source:
- at code{mac.binary.mavericks} for a Mavericks build) which can be
-passed to @code{install.packages} in order to download and install
-binary packages from a suitable repository.  These OS X binary package
-files have the extension @samp{.tgz}.  The @Rapp{} GUI provides menus
-for installation of either binary or source packages, from
- at acronym{CRAN} or local files.
+ at enindex BINPREF
+ at enindex BINPREF64
+Packages with compiled code may need to have paths to the compilers
+set explicitly, and there is provision to make use of a system-wide
+library of installed external software. The compiler paths are set
+using the @command{make} variables @code{BINPREF} and (usually)
+ at code{BINPREF64}.  The library location is set using @command{make}
+variable @code{LOCAL_SOFT}, to give an equivalent of @file{/usr/local}
+on a Unix-alike.  All of these can be set in
+ at file{src/gnuwin32/MkRules.local} when @R{} is built from sources (see
+the comments in @file{src/gnuwin32/MkRules.dist}), or in
+file at footnote{or by adding it in a file such as
+ at file{etc/i386/Makevars.site}, which does not exist by default.}
+ at file{etc/i386/Makeconf} or @file{etc/x64/Makeconf} for an installed
+version of @R{}.  In the latter case only @code{BINPREF} is used, with
+the 64 bit path used in @file{etc/x64/Makeconf}. The version used by
+ at acronym{CRAN} can be installed as described in @ref{Building from
+source}.
+
+
+ at node macOS packages, Customizing package compilation, Windows packages, Installing packages
+ at subsection macOS
+
+On macOS (formerly OS X) @code{install.packages} works as it does on
+other Unix-alike systems, but there are additional types starting with
+ at code{mac.binary} (available for the @acronym{CRAN} distribution but not
+when compiling from source: @code{mac.binary.el-capitan} for a `El
+Capitan and later build with @code{"default"} a synonym for the
+appropriate variant) which can be passed to @code{install.packages} in
+order to download and install binary packages from a suitable
+repository.  These binary package files for macOS have the extension
+ at samp{.tgz}.  The @Rapp{} GUI provides menus for installation of either
+binary or source packages, from @acronym{CRAN} or local files.
+
+On @R{} builds using binary packages, the default is type @code{both}:
+this looks first at the list of binary packages available for your
+version of @R{} and installs the latest versions (if any).  If no binary
+version is available or the source version is newer, it will install the
+source versions of packages without compiled C/C++/Fortran code and offer
+to do so for those with, if @command{make} is available.
 
 Note that most binary packages including compiled code are tied to a
-particular series (e.g.@: @R{} 3.0.x or 3.1.x) of @R{}.
-
-You should not attempt to mix-and-match binary packages built for the
-`Snow Leopard' and `Mavericks' @acronym{CRAN} distributions: doing so is
-likely to lead to crashes or failures to load.
+particular series (e.g.@: @R{} 3.4.x or 3.3.x) of @R{}.
 
 Installing source packages which do not contain compiled code should
 work with no additional tools. For others you will need the
-`Command-line Tools' for @command{Xcode} and compilers which match those
-used to build @R{}: see @ref{OS X}.  (Note that the Fortran compilers
-differ for the `Snow Leopard' and `Mavericks' binary installations of
- at R{}.)
+`Command Line Tools' for @command{Xcode} and compilers which match those
+used to build @R{}: see @ref{macOS}.
 
 Package @CRANpkg{rJava} and those which depend on it need a Java runtime
 installed and several packages need X11 installed, including those using
-Tk.  For Mountain Lion and later see @ref{OS X} and @ref{Java (OS X)}.
+Tk.  See @ref{macOS} and @ref{Java (macOS)}.
 
 Tcl/Tk extensions @code{BWidget} and @code{Tktable} are part of the
 Tcl/Tk contained in the @R{} installer.  These are required by a number
@@ -2112,49 +2313,80 @@ of @acronym{CRAN} and Bioconductor packages.
 A few of the binary packages need other software to be installed on your
 system.  In particular packages using Gtk+ (@CRANpkg{RGtk2},
 @CRANpkg{cairoDevice} and those that depend on them) need the GTK
-framework installed from @uref{http://r.research.att.com/libs/}: the
+framework installed from @uref{https://r.research.att.com/libs/}: the
 appropriate version at the time of writing was
- at uref{http://r.research.att.com/libs/GTK_2.24.17-X11.pkg}
-
-The default compilers specified in
- at file{/Library/Frameworks/R.framework/Resources/etc/Makeconf} depend on
-the version of OS X under which @R{} was installed, and are appropriate
-to the latest version of the Xcode command-line tools for that version
-of OS X.  The settings can be changed, either by editing that file or in
-a file such as @file{~/.R/Makevars} (see the next section).  Entries
-which may need to be changed include @samp{CC}, @samp{CXX}, @samp{FC},
- at samp{F77}, @samp{FLIBS} and the corresponding flags, and perhaps
- at samp{CXXCPP}, @samp{DYLIB_LD}, @samp{MAIN_LD}, @samp{SHLIB_CXXLD},
- at samp{SHLIB_FCLD} and @samp{SHLIB_LD}.
-
-So for example you could select @command{clang} for both C and C++ with
-extensive checking by having in @file{~/.R/Makevars}
+ at uref{https://r.research.att.com/@/libs/@/GTK_2.24.17-X11.pkg}
+
+The default compilers specified are shown in file
+ at file{/Library/Frameworks/R.framework/Resources/etc/Makeconf}.  At the
+time of writing these setting assumed that the C, Fortran and C++
+compilers were on the path, and @command{gfortan} 6.1.0 (see
+ at ref{macOS}).  The settings can be changed, either by editing that file
+or in a file such as @file{~/.R/Makevars} (see the next section).
+Entries which may need to be changed include @samp{CC}, @samp{CXX},
+ at samp{FC}, @samp{F77}, @samp{FLIBS} and the corresponding flags, and
+perhaps @samp{CXXCPP}, @samp{DYLIB_LD}, @samp{MAIN_LD},
+ at samp{SHLIB_CXXLD}, @samp{SHLIB_FCLD} and @samp{SHLIB_LD}, as well as
+the @samp{CXX11}, @samp{CXX14} and @samp{CXX17} variants
+
+So for example you could select a specific build of @command{clang} for
+both C and C++ with extensive checking by having in @file{~/.R/Makevars}
 @example
-CC=clang
-CXX=clang++
-CFLAGS=-mtune=native -g -O2 -Wall -pedantic -Wconversion
-CXXFLAGS=-mtune=native -g -O2 -Wall -pedantic -Wconversion
+CC = /usr/local/clang4/bin/clang
+CXX = /usr/local/clang4/bin/clang++
+CFLAGS = -g -O2 -Wall -pedantic -Wconversion -Wno-sign-conversion
+CXXFLAGS = -g -O2 -Wall -pedantic -Wconversion -Wno-sign-conversion
+CXX11 = $CXX
+CXX14 = $CXX
+CXX17 = $CXX
+CXX1X = $CXX
 @end example
-
 @noindent
-and for a version of @command{gfortran-4.2} we needed
+and the Sierra build of @command{gfortran} by
 @example
-FLIBS=-lgfortran
+F77 = /usr/local/gfortran/bin/gfortran
+FC = $F77
+FLIBS = -L/usr/local/gfortran/lib/gcc/x86_64-apple-darwin16/6.3.0 
+  -L/usr/local/gfortran/lib -lgfortran -lquadmath -lm
 @end example
+ at noindent
+(line split for legibility here).
+
+If using the C/C++ compilers from the Command Line Tools (which does not
+have OpenMP support) one will need to include
+ at example
+SHLIB_OPENMP_CFLAGS =
+SHLIB_OPENMP_CXXFLAGS =
+ at end example
+ at noindent
+to compile OpenMP-using packages.
 
+Apple includes many Open Source libraries in macOS but increasingly
+without the corresponding headers (not even in Xcode nor the Command
+Line Tools): they are often rather old versions.  If installing packages
+from source using them it is usually easiest to install a
+statically-linked up-to-date copy of the Open Source package from its
+sources or from @uref{https://r.research.att.com/libs}.  But sometimes
+it is desirable/necessary to use Apple's dynamically linked library, in
+which case appropriate headers could be extracted from the
+sources at footnote{Note that capitalization and version may differ from
+the Open Source project.} available @emph{via}
+ at uref{https://opensource.apple.com}.
 
- at node Customizing package compilation, Multiple sub-architectures, OS X packages, Installing packages
+ at node Customizing package compilation, Multiple sub-architectures, macOS packages, Installing packages
 @subsection Customizing package compilation
 
-The R system and package-specific compilation flags can be overridden or
-added to by setting the appropriate Make variables in the personal file
- at file{@var{HOME}/.R/Makevars- at var{R_PLATFORM}} (but
+The @R{} system and package-specific compilation flags can be overridden
+or added to by setting the appropriate Make variables in the personal
+file @file{@var{HOME}/.R/Makevars- at var{R_PLATFORM}} (but
 @file{@var{HOME}/.R/Makevars.win} or @file{@var{HOME}/.R/Makevars.win64}
 on Windows), or if that does not exist, @file{@var{HOME}/.R/Makevars},
-where @samp{R_PLATFORM} is the platform for which R was built, as
-available in the @code{platform} component of the R variable
- at code{R.version}.  An alternative personal file can be specified
- at emph{via} the environment variable @env{R_MAKEVARS_USER}.
+where @samp{R_PLATFORM} is the platform for which @R{} was built, as
+available in the @code{platform} component of the @R{} variable
+ at code{R.version}.  The path to an alternative personal
+file at footnote{using a path containing spaces is likely to cause
+problems} can be specified @emph{via} the environment variable
+ at env{R_MAKEVARS_USER}.
 
 Package developers are encouraged to use this mechanism to enable a
 reasonable amount of diagnostic messaging (``warnings'') when compiling,
@@ -2175,12 +2407,29 @@ FFLAGS=-g -O -mtune=native
 FCFLAGS=-g -O -mtune=native
 @end example
 
+Another use is to override the settings in a binary installation of R.
+For example, to use a different Fortran compiler on macOS
+
+ at example
+F77 = /usr/local/gfortran/bin/gfortran
+FC = $F77
+FLIBS = -L/usr/local/gfortran/lib/gcc/x86_64-apple-darwin16/6.3.0 
+  -L/usr/local/gfortran/lib -lgfortran -lquadmath -lm
+ at end example
+
+ at noindent
+(line split for legibility here).
+
 There is also provision for a site-wide @file{Makevars.site} file under
 @file{@var{R_HOME}/etc} (in a sub-architecture-specific directory if
-appropriate).  This is read immediately after @file{Makeconf}, and an
-alternative file can be specified by environment variable
+appropriate).  This is read immediately after @file{Makeconf}, and the
+path to an alternative file can be specified by environment variable
 @env{R_MAKEVARS_SITE}.
 
+Note that these mechanisms do not work with packages which fail to pass
+settings down to sub-makes, perhaps reading @file{etc/Makeconf} in
+makefiles in subdirectories.  Fortunately such packages are unusual.
+
 @node Multiple sub-architectures, Byte-compilation, Customizing package compilation, Installing packages
 @subsection Multiple sub-architectures
 
@@ -2222,17 +2471,16 @@ additional sub-architecture.  There is also @command{R CMD INSTALL
 --merge-multiarch} to build and merge the two architectures, starting
 with a source tarball.
 
- at node Byte-compilation,  , Multiple sub-architectures, Installing packages
+ at node Byte-compilation, External software, Multiple sub-architectures, Installing packages
 @subsection Byte-compilation
 
 The base and recommended packages are byte-compiled by default.  Other
 packages can be byte-compiled on installation by using @command{R CMD
-INSTALL}with option @option{--byte-compile} or by
+INSTALL} with option @option{--byte-compile} or by
 @code{install.packages(type = "source", INSTALL_opts =
 "--byte-compile")}.
 
-Not all contributed packages work correctly when byte-compiled (for
-example because they interfere with the sealing of namespaces).  For
+Not all contributed packages work correctly when byte-compiled.  For
 most packages (especially those which make extensive use of compiled
 code) the speed-up is small.  Unless a package is used frequently the
 time spent in byte-compilation can outweigh the time saved in execution:
@@ -2242,6 +2490,65 @@ package.
 Byte-compilation can be controlled on a per-package basis by the
 @samp{ByteCompile} field in the @file{DESCRIPTION} file.
 
+ at node External software,  , Byte-compilation, Installing packages
+ at subsection External software
+
+Some @R{} packages contain compiled code which links to external
+software libraries.  Unless the external library is statically linked
+(which is done as much as possible for binary packages on Windows and OS
+X), the libraries have to be found when the package is loaded and not
+just when it is installed.  How this should be done depends on the OS
+(and in some cases the version).
+
+For Unix-alikes except macOS the primary mechanism is the @code{ld.so}
+cache controlled by @command{ldconfig}: external dynamic libraries
+recorded in that cache will be found.  Standard library locations will
+be covered by the cache, and well-designed software will add its
+locations (as for example @pkg{openmpi} does on Fedora).  The secondary
+mechanism is to consult the environment variable @env{LD_LIBRARY_PATH}.
+Now the @R{} script controls that variable, and sets it to the
+concatenation of @env{R_LD_LIBRARY_PATH}, @env{R_JAVA_LD_LIBRARY_PATH}
+and the environment value of @env{LD_LIBRARY_PATH}.  The first two have
+defaults which are normally set when @R{} is installed (but can be
+overridden in the environment) so @env{LD_LIBRARY_PATH} is the best
+choice for a user to set.
+
+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 at footnote{They need to have been
+created using @option{-headerpad_max_install_names}, which is the
+default for an @R{} package.} @emph{via} @command{install_name_tool} ---
+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
+resolved is described in @command{man dyld}: the role of
+ at env{LD_LIBRARY_PATH} is replaced on macOS by @env{DYLD_LIBRARY_PATH} and
+latterly @env{DYLD_FALLBACK_LIBRARY_PATH}.  Running @command{R CMD otool
+-L} on the package shared object will show where (if anywhere) its
+dependencies are resolved. @env{DYLD_FALLBACK_LIBRARY_PATH} is preferred
+(and it is that which is manipulated by the @R{} script), but as from
+10.11 (`El Capitan') the default behaviour had been changed for security
+reasons to discard these environment variables when invoking a shell
+script (and @file{R} is a shell script).  That makes the only portable
+option to set @env{R_LD_LIBRARY_PATH} in the environment, something like
+
+ at example
+export R_LD_LIBRARY_PATH="`R RHOME`/lib:/opt/local/lib"
+ at end example
+
+The precise rules for where Windows looks for DLLs are complex and
+depend on the version of Windows.  But for present purposes the main
+solution is to put the directories containing the DLLs the package
+links to (and any those DLLs link to) on the @env{PATH}.  64-bit
+versions of Windows will ignore 32-bit DLLs from 64-bit @R{} and
+ at emph{vice versa}.
+
+The danger with any of the methods which involve setting environment
+variables is of inadvertently masking a system library.  This is less
+for @env{DYLD_FALLBACK_LIBRARY_PATH} and for @emph{appending} to
+ at env{PATH} on Windows (as it should already contain the system library
+paths).
+
 @node Updating packages, Removing packages, Installing packages, Add-on packages
 @section Updating packages
 @findex update.packages
@@ -2295,8 +2602,7 @@ From a running @R{} process they can be removed by
                   lib = file.path("path", "to", "library"))
 @end example
 
-Finally, in most installations one can just remove the package directory
-from the library.
+Finally, one can just remove the package directory from the library.
 
 
 @node Setting up a package repository, Checking installed source packages, Removing packages, Add-on packages
@@ -2306,11 +2612,11 @@ from the library.
 Utilities such as @code{install.packages} can be pointed at any
 @acronym{CRAN}-style repository, and @R{} users may want to set up their
 own.  The `base' of a repository is a URL such as
- at uref{http://www.omegahat.org/R/}: this must be an URL scheme that
- at code{download.packages} supports (which also includes @samp{ftp://} and
- at samp{file://}, but not on most systems @samp{https://}).  Under that
-base URL there should be directory trees for one or more of the
-following types of package distributions:
+ at uref{http://www.stats.ox.ac.uk/pub/RWin}: this must be an URL scheme
+that @code{download.packages} supports (which also includes
+ at samp{https://}, @samp{ftp://} and @samp{file://}).  Under that base URL
+there should be directory trees for one or more of the following types
+of package distributions:
 
 @itemize
 @item 
@@ -2326,20 +2632,10 @@ wise to have a @file{src/contrib} area with a possibly empty
 @R{} versions @var{x.y.z} and containing @file{.zip} files for Windows.
 
 @item 
- at code{"mac.binary"}: located at
- at file{bin/macosx/contrib/@var{3.y}} for @R{} versions
- at var{3.y.z} and containing @file{.tgz} files.
-
- at item 
- at code{"mac.binary.mavericks"}: located at
- at file{bin/macosx/mavericks/contrib/@var{3.y}} for @R{} versions
- at var{3.1.z} to be run under OS X 10.9 (Mavericks) and later, containing
+ at code{"mac.binary.el-capitan"}: located at
+ at file{bin/macosx/el-capitan/contrib/@var{3.y}} for the CRAN builds for
+`El Capitan (and later) for @R{} versions @var{3.y.z}, containing
 @file{.tgz} files.
-
- at item 
- at code{"mac.binary.leopard"}: located at
- at file{bin/macosx/leopard/contrib/@var{2.y}} for @R{} versions
- at var{2.y.z} and containing @file{.tgz} files.
 @end itemize
 
 Each terminal directory must also contain a @file{PACKAGES} file.  This
@@ -2347,12 +2643,12 @@ can be a concatenation of the @file{DESCRIPTION} files of the packages
 separated by blank lines, but only a few of the fields are needed.  The
 simplest way to set up such a file is to use function
 @code{write_PACKAGES} in the @pkg{tools} package, and its help explains
-which fields are needed.  Optionally there can also be a
- at file{PACKAGES.gz} file, a @command{gzip}-compressed version of
- at file{PACKAGES}---as this will be downloaded in preference to
- at file{PACKAGES} it should be included for large repositories.  (If you
-have a mis-configured server that does not report correctly non-existent
-files you may need @file{PACKAGES.gz}.)
+which fields are needed.  Optionally there can also be
+ at file{PACKAGES.rds} and @file{PACKAGES.gz} files, downloaded in
+preference to @file{PACKAGES}.  (These files will be smaller:
+ at file{PACKAGES.rds} is used only from @R{} 3.4.0.  If you have a
+mis-configured server that does not report correctly non-existent files
+you may need these files.)
 
 To add your repository to the list offered by @code{setRepositories()},
 see the help file for that function.
@@ -2437,12 +2733,6 @@ and @option{--build} can be added to zip up the installation.
 for many human languages, and @emph{localization} to adapting to a
 specific country and language.
 
- at c Prior to 2005 @R{} worked in the ISO Latin-1 8-bit character set and so
- at c covered English and most Western European languages (if not necessarily
- at c their currency symbols).  Since @R{} 2.1.0 it has supported Eastern
- at c European 8-bit character sets, and multi-byte character sets such as
- at c UTF-8 and others used for Chinese, Japanese and Korean.
-
 Current builds of @R{} support all the character sets that the
 underlying OS can handle.  These are interpreted according to the
 @cindex Locale
@@ -2478,12 +2768,12 @@ locale needs to specify
 @item
 A human language.  These are generally specified by a lower-case
 two-character abbreviation following ISO 639 (see e.g.@:
- at uref{http://en.wikipedia.org/@/wiki/@/ISO_639-1}).
+ at uref{https://en.wikipedia.org/@/wiki/@/ISO_639-1}).
 
 @item
 A `territory', used mainly to specify the currency. These are generally
 specified by an upper-case two-character abbreviation following ISO 3166
-(see e.g.@: @uref{http://@/en.wikipedia.org/@/wiki/@/ISO_3166}).
+(see e.g.@: @uref{https://@/en.wikipedia.org/@/wiki/@/ISO_3166}).
 
 @item
 A charset encoding, which determines both how a byte stream should be
@@ -2508,7 +2798,7 @@ some OSes offer only one charset per language.
 @menu
 * Locales under Unix-alikes::   
 * Locales under Windows::       
-* Locales under OS X::          
+* Locales under macOS::         
 @end menu
 
 @node Locales under Unix-alikes, Locales under Windows, Locales, Locales
@@ -2526,13 +2816,13 @@ Note that whereas UTF-8 locales are nowadays almost universally used,
 locales such as @samp{en_GB} use 8-bit encodings for backwards
 compatibility.
 
- at node Locales under Windows, Locales under OS X, Locales under Unix-alikes, Locales
+ at node Locales under Windows, Locales under macOS, Locales under Unix-alikes, Locales
 @subsection Locales under Windows
 
 Windows also uses locales, but specified in a rather less concise way.
 Most users will encounter locales only via drop-down menus, but more
 information and lists can be found at
- at uref{http://msdn.microsoft.com/en-us/library/hzz3tw78(v=vs.80)}
+ at uref{https://msdn.microsoft.com/@/en-us/@/library/@/hzz3tw78(v=vs.80)}
 (or if Microsoft moves it yet again, search for @samp{Windows language
 country strings}).
 
@@ -2542,12 +2832,12 @@ Some care is needed with Windows' locale names.  For example,
 @code{chinese} is Traditional Chinese and not Simplified Chinese as used
 in most of the Chinese-speaking world.
 
- at node Locales under OS X,  , Locales under Windows, Locales
- at subsection Locales under OS X
+ at node Locales under macOS,  , Locales under Windows, Locales
+ at subsection Locales under macOS
 
-OS X supports locales in its own particular way, but the R GUI tries to
+macOS supports locales in its own particular way, but the @R{} GUI tries to
 make this easier for users. See
- at uref{http://developer.apple.com/@/documentation/@/MacOSX/@/Conceptual/@/BPInternational/}
+ at uref{https://developer.apple.com/@/documentation/@/MacOSX/@/Conceptual/@/BPInternational/}
 for how users can set their locales.  As with Windows, end users will
 generally only see lists of languages/territories.  Users of @R{} in a
 terminal may need to set the locale to something like @samp{en_GB.UTF-8}
@@ -2556,7 +2846,7 @@ remotely and for batch jobs: note whether @command{Terminal} sets the
 @env{LANG} environment variable is an (advanced) preference, but does so
 by default).
 
-Internally OS X uses a form similar to Linux: the main difference from
+Internally macOS uses a form similar to Linux: the main difference from
 other Unix-alikes is that where a character set is not specified it is
 assumed to be @code{UTF-8}.
 
@@ -2601,7 +2891,7 @@ Domain @code{R} for the C-level error and warning messages from the @R{}
 interpreter.
 
 @item
-Domain @code{R- at var{pkg}} for the R @code{stop}, @code{warning} and
+Domain @code{R- at var{pkg}} for the @R{} @code{stop}, @code{warning} and
 @code{message} messages in each package, including @code{R-base} for the
 @pkg{base} package.
 
@@ -2609,7 +2899,7 @@ Domain @code{R- at var{pkg}} for the R @code{stop}, @code{warning} and
 Domain @code{@var{pkg}} for the C-level messages in each package.
 
 @item
-Domain @code{RGui} for the menus etc of the R for Windows GUI front-end.
+Domain @code{RGui} for the menus etc of the @R{} for Windows GUI front-end.
 
 @end itemize
 
@@ -2651,7 +2941,7 @@ If no suitable translation catalogue is found or a particular message is
 not translated in any suitable catalogue, `English'@footnote{with
 Americanisms.} is used.
 
-See @uref{http://developer.r-project.org/@/Translations.html} for how to
+See @uref{https://developer.r-project.org/@/Translations30.html} for how to
 prepare and install translation catalogues.
 
 @node Choosing between 32- and 64-bit builds, The standalone Rmath library, Internationalization, Top
@@ -2659,9 +2949,9 @@ prepare and install translation catalogues.
 
 Almost all current @acronym{CPU}s have both 32- and 64-bit sets of
 instructions.  Most OSes running on such @acronym{CPU}s offer the choice
-of building a 32-bit or a 64-bit version of R (and details are given
+of building a 32-bit or a 64-bit version of @R{} (and details are given
 below under specific OSes).  For most a 32-bit version is the default,
-but for some (e.g., @cputype{x86_64} Linux and OS X >= 10.6)
+but for some (e.g., @cputype{x86_64} Linux and macOS >= 10.6)
 64-bit is.
 
 All current versions of @R{} use 32-bit integers and
@@ -2686,14 +2976,14 @@ appreciable fraction of the address limit, fragmentation of the address
 space becomes an issue and there may be no hole available that is the
 size requested.  This can cause more frequent garbage collection or the
 inability to allocate large objects.  As a guide, this will become an
-issue with objects more than 10% of the size of the address space
-(around 300Mb) or when the total size of objects in use is around one
-third (around 1Gb).
+issue for 32-bit builds with objects more than 10% of the size of the
+address space (around 300Mb) or when the total size of objects in use is
+around one third (around 1Gb).
 
 @item
 Only 64-bit builds support `long vectors', those with @math{2^{31}} or
-more elements (each of which needs at least 8GB of storage, 16GB for a
-numeric vector).
+more elements (which needs at least 16GB of storage for each numeric
+vector).
 
 @item
 Most 32-bit OSes by default limit file sizes to 2GB (and this may also
@@ -2714,9 +3004,9 @@ However, `other things' may not be equal.  In the specific case of
 @cputype{x86_64} @emph{vs} @cputype{ix86}, the 64-bit CPU has features
 (such as SSE2 instructions) which are guaranteed to be present but are
 optional on the 32-bit CPU, and also has more general-purpose registers.
-This means that on chips like a desktop Intel Core 2 Duo the vanilla
-64-bit version of @R{} has been around 10% faster on both Linux and OS
-X.  (Laptop CPUs are usually relatively slower in 64-bit mode.)
+This means that on chips like a desktop Intel i7 the vanilla 64-bit
+version of @R{} has been around 10% faster on both Linux and macOS.
+(Laptop CPUs are usually relatively slower in 64-bit mode.)
 @end itemize
 
 So, for speed you may want to use a 32-bit build (especially on a
@@ -2726,7 +3016,7 @@ build.  You can often build both and install them in the same place:
 distributions.)
 
 Even on 64-bit builds of @R{} there are limits on the size of @R{}
-objects (see @code{help("Memory-limits")}, some of which stem from the
+objects (see @code{help("Memory-limits")}), some of which stem from the
 use of 32-bit integers (especially in FORTRAN code).  For example, the
 dimensions of an array are limited to @math{2^{31} - 1}.
 
@@ -2746,7 +3036,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.1.0"}.
+string containing the current @R{} version, for example @code{"3.4.0"}.
 
 There is full access to @R{}'s handling of @code{NaN}, @code{Inf} and
 @code{-Inf} via special versions of the macros and functions
@@ -2820,7 +3110,7 @@ make
 
 @noindent
 will make standalone libraries @file{libRmath.a} and @file{libRmath.so}
-(@file{libRmath.dylib} on OS X): @samp{make static} and @samp{make
+(@file{libRmath.dylib} on macOS): @samp{make static} and @samp{make
 shared} will create just one of them.
 
 To use the routines in your own C or C++ programs, include
@@ -2837,7 +3127,7 @@ test the process (via @command{make test}).  Note that you will probably
 not be able to run it unless you add the directory containing
 @enindex LD_LIBRARY_PATH
 @file{libRmath.so} to the @env{LD_LIBRARY_PATH} environment variable
-(@file{libRmath.dylib}, @env{DYLD_LIBRARY_PATH} on OS X).
+(@file{libRmath.dylib}, @env{DYLD_FALLBACK_LIBRARY_PATH} on macOS).
 
 The targets
 
@@ -2898,7 +3188,7 @@ This creates a static library @file{libRmath.a} and a DLL
 make -f Makefile.win shared implib
 @end example
 
-To use the routines in your own C or C++ programs using MinGW, include
+To use the routines in your own C or C++ programs using MinGW-w64, include
 
 @example
 #define MATHLIB_STANDALONE
@@ -2912,7 +3202,7 @@ order, so the result depends on which files are present.  You should be
 able to force static or dynamic linking  @emph{via}
 
 @example
--Wl,-Bstatic -lRmath -Wl,dynamic
+-Wl,-Bstatic -lRmath -Wl,Bdynamic
 -Wl,-Bdynamic -lRmath
 @end example
 
@@ -2923,7 +3213,7 @@ is dynamically linked, and @file{test-static.exe}, which is statically
 linked).
 
 It is possible to link to @file{Rmath.dll} using other compilers, either
-directly or via an import library: if you make a MinGW import library as
+directly or via an import library: if you make a MinGW-w64 import library as
 above, you will create a file @file{Rmath.def} which can be used
 (possibly after editing) to create an import library for other systems
 such as Visual C++.
@@ -2938,7 +3228,7 @@ If you make use of dynamic linking you should use
 
 @noindent
 to ensure that the constants like @code{NA_REAL} are linked correctly.
-(Auto-import will probably work with MinGW, but it is better to be
+(Auto-import will probably work with MinGW-w64, but it is better to be
 sure. This is likely to also work with VC++, Borland and similar
 compilers.)
 
@@ -2951,10 +3241,10 @@ Unix-like platforms, or which will be used by @R{} if found by
 @command{configure}.
 
 Remember that some package management systems (such as @acronym{RPM} and
-deb) make a distinction between the user version of a package and the
-development version.  The latter usually has the same name but with the
-extension @samp{-devel} or @samp{-dev}: you need both versions
-installed.
+Debian/Ubuntu's) make a distinction between the user version of a
+package and the development version.  The latter usually has the same
+name but with the extension @samp{-devel} or @samp{-dev}: you need both
+versions installed.
 
 @menu
 * Essential programs and libraries::  
@@ -2971,40 +3261,44 @@ FORTRAN}).  Your C compiler should be
 @acronym{IEEE}@tie{}754}, POSIX 1003.1 and C99-compliant. at footnote{Note
 that C11 compilers need not be C99-compliant: @R{} requires support for
 @code{double complex} and variable-length arrays which are optional in
-C11 but is mandatory in C99.}  @R{} tries to choose suitable flags for
-the C compilers it knows about, but you may have to set @code{CC} or
- at code{CFLAGS} suitably.  For recent versions of @command{gcc} with
- at code{glibc} this means including
+C11 but is mandatory in C99.}  @R{} tries to choose suitable
+flags at footnote{Examples are @option{-std=gnu99}, @option{-std=c99} and
+ at option{-c99}.} for the C compilers it knows about, but you may have to
+set @code{CC} or @code{CFLAGS} suitably.  For versions of @command{gcc}
+prior to 5.1 with @code{glibc} this means including
 @option{-std=gnu99}@footnote{@option{-std=c99} excludes POSIX
 functionality, but @file{config.h} will turn on all @acronym{GNU}
-extensions to include the POSIX functionality.}.  If the compiler is
-detected as @command{gcc}, @option{-std=gnu99} will be appended to
- at code{CC} unless it conflicts with a setting of @code{CFLAGS}.  (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}
-rather than in @code{CFLAGS}.)
-
-Unless you do not want to view graphs on-screen (or use a Mac) you need
+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 @option{-std=gnu11}, which currently includes the optional
+features @R{} needs.}.  (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} rather than in @code{CFLAGS}.)
+
+Unless you do not want to view graphs on-screen (or use macOS) you need
 @samp{X11} installed, including its headers and client libraries. For
-recent Fedora distributions it means (at least) RPMs @samp{libX11},
- at samp{libX11-devel}, @samp{libXt} and @samp{libXt-devel}.  On Debian we
-recommend the meta-package @samp{xorg-dev}.  If you really do not want
-these you will need to explicitly configure @R{} without X11, using
- at option{--with-x=no}.
+recent Fedora/RedHat distributions it means (at least) RPMs
+ at samp{libX11}, @samp{libX11-devel}, @samp{libXt} and @samp{libXt-devel}.
+On Debian/Ubuntu we recommend the meta-package @samp{xorg-dev}.  If you
+really do not want these you will need to explicitly configure @R{}
+without X11, using @option{--with-x=no}.
 
 The command-line editing (and command completion) depends on the
- at acronym{GNU} @code{readline} library: version 4.2 or later is needed
-for all the features to be enabled.  Otherwise you will need to
-configure with @option{--with-readline=no} (or equivalent).
+ at acronym{GNU} @code{readline} library (including its headers): version
+4.2 or later is needed for all the features to be enabled.  Otherwise
+you will need to configure with @option{--with-readline=no} (or
+equivalent).
 
 A suitably comprehensive @code{iconv} function is essential.  The @R{}
 usage requires @code{iconv} to be able to translate between
 @code{"latin1"} and @code{"UTF-8"}, to recognize @code{""} (as the
 current encoding) and @code{"ASCII"}, and to translate to and from the
 Unicode wide-character formats @code{"UCS-[24][BL]E"} --- this is true
-for @code{glibc} but not of most commercial Unixes.  However, you can
-make use of @acronym{GNU} @code{libiconv} (possibly as a plug-in
-replacement: see @uref{http://www.gnu.org/@/software/@/libiconv/}).
+by default for @code{glibc}@footnote{However, it is possible to break
+the default behaviour of @code{glibc} by re-specifying the @code{gconv}
+modules to be loaded.} but not of most commercial Unixes.  However, you
+can make use of @acronym{GNU} @code{libiconv} (as used on macOS: see
+ at uref{https://www.gnu.org/@/software/@/libiconv/}).
 
 The OS needs to have enough support at footnote{specifically, the C99
 functionality of headers @file{wchar.h} and @file{wctype.h}, types
@@ -3012,23 +3306,70 @@ functionality of headers @file{wchar.h} and @file{wctype.h}, types
 @code{mbstowcs}, @code{wcrtomb}, @code{wcscoll}, @code{wcstombs},
 @code{wctrans}, @code{wctype}, and @code{iswctype}.} for wide-character
 types: this is checked at configuration.  A small number of POSIX
-functions at footnote{including the @code{opendir}, @code{readdir},
+functions at footnote{including @code{opendir}, @code{readdir},
 @code{closedir}, @code{popen}, @code{stat}, @code{glob}, @code{access},
- at code{getcwd} and @code{chdir} system calls, and either @code{putenv} or
- at code{setenv}.} are essential, and others at footnote{such as
- at code{realpath}, @code{symlink}.} will be used if available.
+ at code{getcwd} and @code{chdir} system calls, @code{select} on a
+Unix-alike, and either @code{putenv} or @code{setenv}.} are essential,
+and others at footnote{such as @code{realpath}, @code{symlink}.} will be
+used if available.
+
+ at c zlib 1.2.5 is from July 2010, bzip2 1.0.6 from Sept 2010
+ at c xz 5.0.3 is from May 2011
+Installations of @code{zlib} (version 1.2.5 or later), @code{libbz2}
+(version 1.0.6 or later: called @pkg{bzip2-libs}/@pkg{bzip2-devel} or
+ at pkg{libbz2-1.0}/@pkg{libbz2-dev} by some Linux distributions),
+ at code{liblzma}@footnote{most often distributed as part of @code{xz}:
+possible names in Linux distributions include
+ at code{xz-devel}/@code{xz-libs} and @code{liblzma-dev}.} version 5.0.3 or
+later are required.
+
+ at c PCRE[1] 8.32 is from Nov 2012, but Ubuntu 14.04LTS has 8.31 
+ at c and that is supported until Apr 2019.
+ at c Debian Wheezy has 8.30, Ubuntu 12.04LTS has 8.12
+PCRE at footnote{sometimes known as PCRE1, and not PCRE2 which started at
+version 10.0.} (version 8.32 or later, although versions 8.10--8.31 will
+be accepted with a deprecation warning) is required (or just its library
+and headers if packaged separately).  Only the `8-bit' interface is used
+(and only that is built by default when installing from sources).  PCRE
+must be built with UTF-8 support (not the default, and checked by
+ at command{configure}) and support for Unicode properties is assumed by
+some @R{} packages.  JIT support (optionally available from 8.20) is
+desirable for the best performance: support for this and Unicode
+properties can be checked at run-time by calling @code{pcre_config()}.
+If building PCRE for use with @R{} a suitable @command{configure}
+command might be
+ at example
+./configure --enable-utf --enable-unicode-properties --enable-jit --disable-cpp
+ at end example
+ at noindent  
+The @option{--enable-jit} flag is supported for most common CPUs.  (See
+also the comments for Solaris.)
+
+ at c libcurl 7.22.0 was released in Sep 2011, in Ubuntu 12.04 LTS,
+ at c   end-of-life Apr 2017
+ at c libcurl 7.26.0 was released in May 2012, still in Debian 7 Wheezy LTS,
+ at c   end-of-life May 2018. 
+ at c libcurl 7.28.0 was released in Oct 2012
+Library @code{libcurl} (version 7.22.0 or later at footnote{but not a major
+version greater than 7 should there ever be one: the major version has
+been 7 since 2000.}) is required, with at least 7.28.0 being desirable.
+Information on @code{libcurl} is found from the @command{curl-config}
+script: if that is missing or needs to be overridden at footnote{for
+example to specify static linking with a build which has both shared and
+static libraries.} there are macros to do so described in file
+ at file{config.site}.
 
 A @command{tar} program is needed to unpack the sources and packages
 (including the recommended packages).  A version at footnote{Such as
 @acronym{GNU} @command{tar} 1.15 or later, @command{bsdtar} (from
- at uref{http://code.google.com/@/p/libarchive/}, as used by FreeBSD and OS
-10.6 and later) or @command{tar} from the Heirloom Toolchest
+ at uref{https://github.com/@/libarchive/@/libarchive/}, as used by FreeBSD and OS
+X 10.6 and later) or @command{tar} from the Heirloom Toolchest
 (@uref{http://heirloom.sourceforge.net/@/tools.html}).} that can
 automagically detect compressed archives is preferred for use with
 @code{untar()}: the configure script looks for @command{gtar} and
 @command{gnutar} before
 @enindex TAR
- at command{tar}: use environment variable @env{TAR} to override this.
+ at command{tar} -- use environment variable @env{TAR} to override this.
 
 There need to be suitable versions of the tools @command{grep} and
 @command{sed}: the problems are usually with old AT&T and BSD variants.
@@ -3037,19 +3378,25 @@ looking in @file{/usr/xpg4/bin} which is used on some commercial
 Unixes).
 
 You will not be able to build most of the manuals unless you have
- at command{makeinfo} version 4.7 or later installed, and if not some of
-the @HTML{} manuals will be linked to @acronym{CRAN}. To make PDF
-versions of the manuals you will also need file @file{texinfo.tex}
-installed (which is part of the @acronym{GNU} @pkg{texinfo} distribution
-but is often made part of the @TeX{} package in re-distributions) as
-well as @command{texi2dvi}. at footnote{@command{texi2dvi} is normally a
-shell script.  Some versions, e.g.@: that from @pkg{texinfo} 4.13a and
-5.2, need to be run under @command{bash} rather than a Bourne shell as
-on, say, Solaris.}  Further, the versions of @command{texi2dvi} and
- at file{texinfo.tex} need to be compatible: we have seen problems with
-older @TeX{} distributions (TeXLive 2007 and MiKTeX 2.8) used with
- at pkg{texinfo} 4.13.  It is possible to use @pkg{texinfo} version 5.x,
-preferably 5.2 or later.
+ at command{texi2any} version 5.1 or later installed, and if not most of
+the @HTML{} manuals will be linked to a version on @acronym{CRAN}. To
+make PDF versions of the manuals you will also need file
+ at file{texinfo.tex} installed (which is part of the @acronym{GNU}
+ at pkg{texinfo} distribution but is often made part of the @TeX{} package
+in re-distributions) as well as
+ at command{texi2dvi}. at footnote{@command{texi2dvi} is normally a shell
+script.  Some versions (including that from @pkg{texinfo} 5.2 and 6.0)
+need to be run under @command{bash} rather than a Bourne shell,
+especially on Solaris. Some of the issues which have been observed with
+broken versions of @command{texi2dvi} can be circumvented by setting the
+environment variable @env{R_TEXI2DVICMD} to the value @code{emulation}.}
+Further, the versions of @command{texi2dvi} and @file{texinfo.tex} need
+to be compatible: we have seen problems with older @TeX{} distributions.
+
+ at cindex Subversion
+If you want to build from the @R{} Subversion repository then
+ at command{texi2any} is highly recommended as it is used to create files
+which are in the tarball but not stored in the Subversion repository.
 
 @cindex Vignettes
 The PDF documentation (including @file{doc/NEWS.pdf}) and building
@@ -3059,28 +3406,32 @@ Building PDF package manuals (including the @R{} reference manual) and
 vignettes is sensitive to the version of the @LaTeX{} package
 @pkg{hyperref} and we recommend that the @TeX{} distribution used is
 kept up-to-date.  A number of standard @LaTeX{} packages are required
-(including @pkg{fancyvrb}, @pkg{url} and some of the font packages such
-as @pkg{times}, @pkg{helvetic}, @pkg{ec} and @pkg{cm-super}) and others
-such as @pkg{hyperref} and @pkg{inconsolata} are desirable (and without
-them you may need to change @R{}'s defaults: @pxref{Making the
-manuals}).  Note that package @pkg{hyperref} (currently) requires
-packages @pkg{kvoptions}, @pkg{ltxcmds} and @pkg{refcount}.  For
-distributions based on TeXLive the simplest approach may be to install
-collections @pkg{collection-latex}, @pkg{collection-fontsrecommended},
+(including @pkg{url} and some of the font packages such as @pkg{times},
+ at pkg{helvetic}, @pkg{ec} and @pkg{cm-super}) and others such as
+ at pkg{hyperref} and @pkg{inconsolata} are desirable (and without them you
+may need to change @R{}'s defaults: @pxref{Making the manuals}).  Note
+that package @pkg{hyperref} (currently) requires packages
+ at pkg{kvoptions}, @pkg{ltxcmds} and @pkg{refcount}.  For distributions
+based on TeX Live the simplest approach may be to install collections
+ at pkg{collection-latex}, @pkg{collection-fontsrecommended},
 @pkg{collection-latexrecommended}, @pkg{collection-fontsextra} and
 @pkg{collection-latexextra} (assuming they are not installed by
 default): Fedora uses names like @pkg{texlive-collection-fontsextra} and
 Debian/Ubuntu like @pkg{texlive-fonts-extra}.
 
-
- at cindex Subversion
-If you want to build from the R Subversion repository you need both
- at command{makeinfo} and @command{pdflatex}.
-
 @enindex PATH
 The essential programs should be in your @env{PATH} at the time
 @command{configure} is run: this will capture the full paths.
 
+Those distributing binary versions of @R{} may need to be aware of the
+licences of the external libraries it is linked to (including `useful'
+libraries from the next section).  The @code{liblzma} library is in the
+public domain and X11, @code{libbzip2}, @code{libcurl} and @code{zlib}
+have MIT-style licences. PCRE has a BSD-style licence which requires
+distribution of the licence (included in @R{}'s @file{COPYRIGHTS} file)
+in binary distributions.  GNU @code{readline} is licensed under GPL
+(which version(s) depending on the @code{readline} version).
+
 @node Useful libraries and programs, Linear algebra, Essential programs and libraries, Essential and useful other programs under a Unix-alike
 @section Useful libraries and programs
 
@@ -3099,23 +3450,19 @@ earliest version we have tested.  (For Fedora users we believe the
 @samp{pangocairo} package is installed (and if not, @samp{cairo}) and if
 additional flags are needed for the @samp{cairo-xlib} package, then if
 suitable code can be compiled.  These tests will fail if
- at command{pkg-config} is not installed, and are likely to fail if
- at code{cairo} was built statically (unusual).  Most systems with
- at code{Gtk+} 2.8 or later installed will have suitable libraries.  OS X
-comes with none of these libraries (but XQuartz, as used for 10.8 and
-later, ships @code{cairo}), but @code{cairo} support (without
- at code{Pango}) has been added to the binary distribution (see
- at uref{http://r.research.att.com/libs/} you need @code{fontconfig},
- at code{freetype} and @code{pixman} too): @code{pkg-config} is still
-needed when building @R{} from source and can be installed from its
-sources.
+ at command{pkg-config} is not installed at footnote{If necessary the path to
+ at command{pkg-config} can be specified by setting @env{PKGCONF} in
+ at file{config.site}, on the @command{configure} command line or in the
+environment.}, and are likely to fail if @code{cairo} was built
+statically (unusual).  Most systems with @code{Gtk+} 2.8 or later
+installed will have suitable libraries
 
 For the best font experience with these devices you need suitable fonts
 installed: Linux users will want the @code{urw-fonts} package.  On
 platforms which have it available, the @code{msttcorefonts}
 package at footnote{also known as @code{ttf-mscorefonts-installer} in the
 Debian/Ubuntu world: see also
- at uref{http://en.wikipedia.org/wiki/Core_fonts_for_the_Web}.} provides
+ at uref{https://en.wikipedia.org/@/wiki/@/Core_fonts_for_the_Web}.} provides
 TrueType versions of Monotype fonts such as Arial and Times New Roman.
 Another useful set of fonts is the `liberation' TrueType fonts available
 at
@@ -3123,9 +3470,9 @@ at
 in Debian/Ubuntu.} 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
-(@uref{http://en.wikipedia.org/@/wiki/@/Liberation_fonts}).  Then there
+(@uref{https://en.wikipedia.org/@/wiki/@/Liberation_fonts}).  Then there
 is the `Free UCS Outline Fonts' project
-(@uref{http://www.gnu.org/software/freefont/}) which are
+(@uref{https://www.gnu.org/@/software/@/freefont/}) which are
 OpenType/TrueType fonts based on the URW fonts but with extended Unicode
 coverage.  See the @R{} help on @code{X11} on selecting such fonts.
 
@@ -3147,29 +3494,11 @@ needed).  Recent versions allow several other libraries to be linked
 into @code{libtiff} such as @code{lzma}, @code{jbig} and @code{jpeg12},
 and these may need also to be present.
 
-If you have them installed (including the appropriate headers and of
-suitable versions), system versions of @code{zlib}, @code{libbz2} and
-PCRE will be used if specified by @option{--with-system-zlib} (version
-1.2.5 or later), @option{--with-system-bzlib} or
- at option{--with-system-pcre} (version 8.10 or later, preferably
-8.34 at footnote{which is what is supplied with @R{}: PCRE must be built
-with UTF-8 support (not the default) and support for Unicode properties
-is assumed by some @R{} packages. Neither are tested by
- at command{configure}.}): otherwise versions in the @R{} sources will be
-compiled in.  As the latter suffice and are tested with @R{} you should
-not need to change this.
-
 Option @option{--with-system-tre} is also available: it needs a recent
 version of TRE. (The current sources are in the @command{git} repository
 at @url{https://github.com/laurikari/tre/}, but at the time of writing
 the resulting build will not pass its checks.).
 
- at code{liblzma} from @code{xz-utils} version 5.0.3 or later will be used
-if installed: the version in the @R{} sources can be selected instead by
-configuring with @option{--with-system-xz=no}.  Systems differ in what
-they call the package including this: e.g.@: on Fedora the library is in
- at samp{xz-libs} and the headers in @samp{xz-devel}.
-
 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
@@ -3185,16 +3514,16 @@ Debian meta-package @samp{xorg-dev}), but some distributions have split
 this into smaller parts, so for example recent versions of Fedora
 require the @samp{libXmu} and @samp{libXmu-devel} RPMs.
 
-Some systems (notably OS X and at least some FreeBSD systems) have
+Some systems (notably macOS and at least some FreeBSD systems) have
 inadequate support for collation in multibyte locales.  It is possible
 to replace the OS's collation support by that from ICU (International
 Components for Unicode, @uref{http://site.icu-project.org/}), and this
 provides much more precise control over collation on all systems.  ICU
 is available as sources and as binary distributions for (at least) most
 Linux distributions, Solaris, FreeBSD and AIX, usually as @code{libicu}
-or @code{icu4c}.  It will be used by default where available (including
-on OS X >= 10.4): should a very old or broken version of ICU be found
-this can be suppressed by @option{--without-ICU}.
+or @code{icu4c}.  It will be used by default where available: should a
+very old or broken version of ICU be found this can be suppressed by
+ at option{--without-ICU}.
 
 The @code{bitmap} and @code{dev2bitmap} devices and function
 @code{embedFonts()} use ghostscript
@@ -3214,7 +3543,7 @@ environment variable @env{R_GSCMD} at that time.
 @subsection Tcl/Tk
 
 The @pkg{tcltk} package needs Tcl/Tk >= 8.4 installed: the sources are
-available at @uref{http://@/www.tcl.tk/}.  To specify the locations of the
+available at @uref{https://@/www.tcl.tk/}.  To specify the locations of the
 Tcl/Tk files you may need the configuration options
 
 @table @option
@@ -3234,18 +3563,26 @@ the Tcl and Tk libraries and for finding the @file{tcl.h} and
 versions of Tcl/Tk installed, specifying the paths to the correct config
 files may be necessary to avoid confusion between them.
 
-Versions of Tcl/Tk up to 8.5.12 and 8.6.0 have been tested (including
+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).
 
+Note that the @file{tk.h} header includes at footnote{This is true even for
+the `Aqua' version of Tk on macOS, but distributions of that include a
+copy of the X11 files needed.} X11 headers, so you will need X11 and its
+development files installed.
+
 @node Java support, Other compiled languages, Tcl/Tk, Useful libraries and programs
 @subsection Java support
 
 The build process looks for Java support on the host system, and if it
-finds it sets some settings which are useful for Java-using packages.
+finds it sets some settings which are useful for Java-using packages
+(such as @CRANpkg{rJava} and @CRANpkg{JavaGD}).  This check can be
+suppressed by configure option @option{--disable-java}.
 @enindex JAVA_HOME
- at env{JAVA_HOME} can be set to point to a specific JRE/JDK.
+Configure variable @env{JAVA_HOME} can be set to point to a specific
+JRE/JDK, on the @command{configure} command line or in the environment.
 
-Principal amongst these are setting some library paths to the Java
+Principal amongst these settings are some library paths to the Java
 libraries and JVM, which are stored in environment variable
 @enindex R_JAVA_LD_LIBRARY_PATH
 @env{R_JAVA_LD_LIBRARY_PATH} in file @file{@var{R_HOME}/etc/ldpaths} (or
@@ -3253,16 +3590,17 @@ a sub-architecture-specific version).  A typical setting for
 @cputype{x86_64} Linux is
 
 @example
-JAVA_HOME=/usr/lib/jvm/java-1.7.0-openjdk-1.7.0.25.x86_64/jre
-R_JAVA_LD_LIBRARY_PATH=$@{JAVA_HOME@}/lib/amd64/server
+JAVA_HOME=/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.71-1.b15.fc22.x86_64/jre
+R_JAVA_LD_LIBRARY_PATH=$@{JAVA_HOME@}/lib/that/server
 @end example
 
-Note that this unfortunately depends on the exact version of the JRE/JDK
+Unfortunately this depends on the exact version of the JRE/JDK
 installed, and so may need updating if the Java installation is updated.
 This can be done by running @code{R CMD javareconf} which updates
-settings in both @file{etc/Makeconf} and
+settings in both @file{@var{R_HOME}/etc/Makeconf} and
 @file{@var{R_HOME}/etc/ldpaths}. See @code{R CMD javareconf --help} for
-details.
+details: note that this needs to be done by the account owning the @R{}
+installation.
 
 Another way of overriding those settings is to set the environment variable
 @enindex R_JAVA_LD_LIBRARY_PATH
@@ -3271,15 +3609,16 @@ Another way of overriding those settings is to set the environment variable
 Java-using packages.  For example
 
 @example
-R_JAVA_LD_LIBRARY_PATH=/usr/lib/jvm/java-1.7.0/jre/lib/amd64/server
+R_JAVA_LD_LIBRARY_PATH=/usr/lib/jvm/java-1.8.0/jre/lib/amd64/server
 @end example
 
 It may be possible to avoid this by specifying an invariant link as the
-path. For example, on that system either of
+path when configuring. For example, on that system any of
 
 @example
-JAVA_HOME=/usr/lib/jvm/java-1.7.0
-JAVA_HOME=/usr/lib/jvm/java-1.7.0/jre
+JAVA_HOME=/usr/lib/jvm/java
+JAVA_HOME=/usr/lib/jvm/java-1.8.0
+JAVA_HOME=/usr/lib/jvm/java-1.8.0/jre
 @end example
 
 @noindent
@@ -3291,14 +3630,13 @@ worked.
 Some add-on packages need a C++ compiler.  This is specified by the
 configure variables @code{CXX}, @code{CXXFLAGS} and similar.
 @command{configure} will normally find a suitable compiler.  However, in
-most cases this will be a C++98 compiler, and as from @R{} 3.1.0 it is
+many cases this will be a C++98 compiler, and it is
 possible to specify an alternative compiler for use with C++11 by the
-configure variables @code{CXX1X}, @code{CXX1XSTD}, @code{CXX1XFLAGS} and
-similar.  Again, @command{configure} will normally find a suitable value
-for @code{CXX1XSTD} if the compiler given by @code{CXX} is capable of
-compiling C++11 code, but it is possible that a completely different
-compiler will be needed (it is for OS X < 10.9 and Solaris, for
-example).
+configure variables @code{CXX11}, @code{CXX11STD}, @code{CXX11FLAGS} and
+similar (@pxref{C++ Support}).  Again, @command{configure} will normally
+find a suitable value for @code{CXX11STD} if the compiler given by
+ at code{CXX} is capable of compiling C++11 code, but it is possible that a
+completely different compiler will be needed.
 
 Other packages need full Fortran 90 (or later) support.  For source
 files with extension @file{.f90} or @file{.f95}, the compiler defined by
@@ -3360,11 +3698,11 @@ well as @code{LSAME}), and appears to be usable.  However, an external
 position-independent code), and that is not checked.
 
 Some enhanced @acronym{BLAS}es are compiler-system-specific
-(@code{sunperf} on Solaris at footnote{Using the Oracle Solaris Studio
+(@code{sunperf} on Solaris at footnote{Using the Oracle Developer Studio
 @command{cc} and @command{f95} compilers}, @code{libessl} on IBM,
- at code{Accelerate} on OS X).  The correct incantation for
-these is usually found @emph{via} @option{--with-blas} with no value on
-the appropriate platforms.
+ at code{Accelerate} on macOS).  The correct incantation for these is often
+found @emph{via} @option{--with-blas} with no value on the appropriate
+platforms.
 
 Some of the external @acronym{BLAS}es are multi-threaded.  One issue is
 that @R{} profiling (which uses the @code{SIGPROF} signal) may cause
@@ -3372,7 +3710,9 @@ problems, and you may want to disable profiling if you use a
 multi-threaded @acronym{BLAS}.  Note that using a multi-threaded
 @acronym{BLAS} can result in taking more @acronym{CPU} time and even
 more elapsed time (occasionally dramatically so) than using a similar
-single-threaded @acronym{BLAS}.
+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.
 
 Note that under Unix (but not under Windows) if @R{} is compiled against
 a non-default @acronym{BLAS} and @option{--enable-BLAS-shlib} is
@@ -3383,9 +3723,17 @@ such as @CRANpkg{quantreg} will need to be re-installed.
 @R{} relies on @acronym{ISO}/@acronym{IEC}@tie{}60559 compliance of an
 external @acronym{BLAS}.  This can be broken if for example the code
 assumes that terms with a zero factor are always zero and do not need to
-be computed---whereas @code{x*0} can be @code{NaN}. This is checked in
+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.
 
 @menu
 * ATLAS::                       
@@ -3400,7 +3748,7 @@ the test suite.
 
 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 usually built as a static library that on some
+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}
@@ -3432,17 +3780,15 @@ multi-threaded version of ATLAS, by specifying
 --with-blas="-lptf77blas -lpthread -latlas"
 @end example
 
-Consult its file @file{INSTALL.txt} for how to build ATLAS with
-position-independent code: that file also describes how to build ATLAS
-as a shared library.
+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
 
- at c : there used to be Solaris 10, but it seems no more.
-For @cputype{x86_64} and @cputype{i686} processors under Linux there is
-the AMD Core Math Library (ACML) @uref{http://www.amd.com/@/acml}.  For
-the @command{gcc} version we could use
+For @cputype{x86_64} processors at 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"
@@ -3473,12 +3819,9 @@ handling of @code{NA}s.
 @node Goto and OpenBLAS, MKL, ACML, BLAS
 @subsubsection Goto and OpenBLAS
 
-Dr Kazushige Goto wrote another tuned @acronym{BLAS} which is available
-for several processors and OSes.  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.
-Source code can be obtained from
- at uref{http://www.tacc.utexas.edu/@/tacc-projects/@/gotoblas2/}
-
 Once it is built and installed, it can be used by configuring @R{} with
 
 @example
@@ -3488,11 +3831,9 @@ Once it is built and installed, it can be used by configuring @R{} with
 See @pxref{Shared BLAS} for an alternative (and in many ways preferable)
 way to use it.
 
-Our understanding is that this project is now frozen and so will not be
-updated for CPUs released since mid-2010.  However, OpenBLAS
-(@uref{http://xianyi.github.com/OpenBLAS/}) is a descendant project with
-support for some current CPUs (e.g.@: Intel Sandy Bridge).  Once
-installed it can be used by something like
+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
 
 @example
 --with-blas="-lopenblas"
@@ -3503,60 +3844,42 @@ or as a shared BLAS.
 
 @node MKL, Shared BLAS, 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
-(@uref{http://www.intel.com/@/software/@/products/@/mkl/}).  You are
-strongly encouraged to read the MKL User's Guide, which is installed
-with the library, before attempting to link to MKL.  There are also
-versions of MKL for OS X and Windows, but they did not work with the
-standard compilers used for @R{} on those platforms.
-
-The MKL interface has changed several times, and may change again: the
-following notes apply exactly only to version 10.3 but have been used
-with version 11.1.
-
-Versions 10 and later of MKL support two linking models: the default
-model (which is backward compatible with version 9 see below) and the
-layered model.  The layered model gives the user fine-grained control
-over four different library layers: interface, threading, computation,
-and run-time library support. Some examples of linking to MKL using this
-layered model are given below. (These examples are for GCC compilers on
- at cputype{x86_64}.)  The choice of interface layer is important on
- at cputype{x86_64} since the Intel Fortran compiler returns complex values
-in different registers from the @acronym{GNU} Fortran compiler. You must
-therefore use the interface layer that matches your compiler
-(@code{mkl_intel*} or @code{mkl_gf*}).
-
- at R{} can be linked to a sequential version of MKL by something like
-
- at example
-MKL_LIB_PATH=/opt/intel/mkl/10.311.339/lib/intel64/
-export LD_LIBRARY_PATH=$MKL_LIB_PATH
-MKL="-L$@{MKL_LIB_PATH@} -lmkl_gf_lp64 -lmkl_sequential -lmkl_core"
-./configure --with-blas="$MKL" --with-lapack
- at end example
+For Intel processors (and perhaps others) and some distributions of
+Linux, there is Intel's Math Kernel Library.  You are strongly
+encouraged to read the MKL User's Guide, which is installed with the
+library, before attempting to link to MKL.  This includes a `link line
+advisor' which will suggest appropriate incantations: its use is
+recommended.  Or see
+ at uref{https://software.intel.com/@/en-us/@/articles/@/intel-mkl-link-line-advisor}.
 
- at noindent
-where some versions may need @code{-lmkl_lapack} before
- at code{-lmkl_core}.  The order of the libraries is important.  The option
- at option{--with-lapack} is used since MKL contains a tuned copy of LAPACK
-as well as @acronym{BLAS} (@pxref{LAPACK}), although this can be
-omitted.
+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
+ at 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
+compilers on @cputype{x86_64}.
 
-Threaded MKL may be used (according to Zhang Zhang of Intel) by
-replacing the line defining the variable @code{MKL} with (Intel OMP)
+To a sequential version of MKL we used
 
 @example
-MKL="-L$@{MKL_LIB_PATH@} -lmkl_gf_lp64 -lmkl_intel_thread \
-     -lmkl_core -liomp5 -lpthread"
+MKL_LIB_PATH=/path/to/intel_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
 @end example
 
 @noindent
-or (GNU OMP)
+The option @option{--with-lapack} is used since MKL contains a tuned
+copy of LAPACK as well as @acronym{BLAS} (@pxref{LAPACK}), although this
+can be omitted.
+
+Threaded MKL may be used by replacing the line defining the variable
+ at code{MKL} by
 
 @example
-MKL="-L$@{MKL_LIB_PATH@} -lmkl_gf_lp64 -lmkl_gnu_thread \
-     -lmkl_core -fopenmp -lpthread"
+MKL="-L$@{MKL_LIB_PATH@} -lmkl_gf_lp64 -lmkl_core \
+     -lmkl_gnu_thread -dl -lpthread"
 @end example
 
 @noindent
@@ -3565,38 +3888,15 @@ 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.
 
-Static threaded MKL may be used (GNU OpenMP) with something like
+ at c https://stat.ethz.ch/pipermail/r-devel/2015-September/071717.html
+It has been reported that
 
 @example
-MKL="   -L$@{MKL_LIB_PATH@}                               \
-        -Wl,--start-group                               \
-                $@{MKL_LIB_PATH@}/libmkl_gf_lp64.a        \
-                $@{MKL_LIB_PATH@}/libmkl_gnu_thread.a     \
-                $@{MKL_LIB_PATH@}/libmkl_core.a           \
-        -Wl,--end-group                                 \
-        -lgomp -ldl -lpthread"
+--with-blas='-mkl=parallel' --with-lapack
 @end example
 
 @noindent
-(Thanks to Ei-ji Nakama.  The @code{-ldl} was needed on a Centos 5
-systems and may not be needed everywhere.)
-
-The MKL documentation includes a `link line advisor' which will suggest
-appropriate incantations: an on-line version was available at
- at uref{http://software.intel.com/@/en-us/@/articles/@/intel-mkl-link-line-advisor/}
-
-The default linking model, which was also used by version 9 of MKL, can
-be used by
-
- at example
---with-blas="-lmkl -lguide -lpthread"
- at end example
-
- at noindent
-but this may not match your compiler on a 64-bit platform.  This is
-multi-threaded, but in version 9 the number of threads defaults to 1.
-It can be increased by setting @code{OMP_NUM_THREADS}.  (Thanks to Andy
-Liaw for the information.)
+worked with the Intel 2015.3 compilers on Centos 6.
 
 @node Shared BLAS,  , MKL, BLAS
 @subsubsection Shared BLAS
@@ -3651,9 +3951,9 @@ 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
 @end example
 will change the @acronym{BLAS} in use to multithreaded ACML.  A similar
-link works for some versions of the Goto @acronym{BLAS} and perhaps
-for MKL (provided the appropriate @file{lib} directory is in the
-run-time library path or @command{ld.so} cache).
+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).
 
 
 @node LAPACK, Caveats, BLAS, Linear algebra
@@ -3662,7 +3962,7 @@ run-time 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 OS X and ACML and MKL
+as @code{sunperf} on Solaris, @code{Accelerate} on macOS and ACML 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.
 
@@ -3727,7 +4027,7 @@ have that support.
 
 If you have a pure FORTRAN 77 compiler which cannot compile LAPACK it
 may be possible to use CLAPACK from
- at uref{http://www.netlib.org/clapack/} by something like
+ at uref{http://www.netlib.org/@/clapack/} by something like
 @example
 -with-lapack="-lclapack -lf2c"
 @end example
@@ -3747,12 +4047,11 @@ BLAS used, so it may be simpler to use CLAPACK built to use CBLAS and
 As with all libraries, you need to ensure that they and @R{} were
 compiled with compatible compilers and flags.  For example, this has
 meant that on Sun Sparc using the native compilers the flag
- at option{-dalign} is needed so @code{sunperf} can be used.
+ at option{-dalign} is needed if @code{sunperf} is to be used.
 
-On some systems it is necessary that an external @acronym{BLAS}/LAPACK
-was built with the same FORTRAN compiler used to build @R{}: known
-problems are with @R{} built with @command{gfortran}, @pxref{Using
-gfortran}.
+On some systems it has been necessary that an external
+ at acronym{BLAS}/LAPACK was built with the same FORTRAN compiler used to
+build @R{}.
 
 
 
@@ -3824,9 +4123,24 @@ way.  Also, because packages are linked against @R{} they are on some
 OSes also linked against the dynamic libraries @R{} itself is linked
 against, and this can lead to symbol conflicts.
 
+For maximally effective use of @command{valgrind}, @R{} should be
+compiled with valgrind instrumentation. The @command{configure} option
+is @option{--with-valgrind-instrumentation=@var{level}}, where
+ at var{level} is 0, 1 or 2.  (Level 0 is the default and does not add
+anything.)  The system headers for @command{valgrind} can be requested
+by option @option{--with-system-valgrind-headers}: they will be used if
+present (on Linux they may be in a separate package such as
+ at pkg{valgrind-devel}).  Note though that there is no guarantee that the
+code in @R{} will be compatible with very old at footnote{We believe that
+versions 3.4.0 to 3.10.1 are compatible.} or future @command{valgrind}
+headers.
+
 If you need to re-configure @R{} with different options you may need to run
 @code{make clean} or even @code{make distclean} before doing so.
 
+The @file{configure} script has other generic options added by
+ at command{autoconf} and which are not supported for @R{}: in particular
+building for one architecture on a different host is not possible.
 
 @node Internationalization support, Configuration variables, Configuration options, Configuration on a Unix-alike
 @section Internationalization support
@@ -3936,12 +4250,14 @@ readline, in non-system directories, use the variables @code{LDFLAGS}
 the C/C++ preprocessors), respectively, to specify these locations.
 These default to @samp{-L/usr/local/lib} (@code{LDFLAGS},
 @samp{-L/usr/local/lib64} on most 64-bit Linux OSes) and
- at samp{-I/usr/local/include} (@code{CPPFLAGS}) to catch the most common
-cases.  If libraries are still not found, then maybe your
+ at samp{-I/usr/local/include} (@code{CPPFLAGS}, but note that on most
+systems @file{/usr/local/include} is regarded as a system include
+directory and so instances in that macro will be skipped) to catch the
+most common cases.  If libraries are still not found, then maybe your
 compiler/linker does not support re-ordering of @option{-L} and
- at option{-l} flags (this has been reported to be a problem on HP-UX with
-the native @command{cc}).  In this case, use a different compiler (or a
-front end shell script which does the re-ordering).
+ at option{-l} flags (years ago this was reported to be a problem on HP-UX
+with the native @command{cc}).  In this case, use a different compiler
+(or a front-end shell script which does the re-ordering).
 
 These flags can also be used to build a faster-running version of @R{}.
 On most platforms using @command{gcc}, having @samp{-O3} in
@@ -3952,7 +4268,7 @@ been seen).  On systems using the @acronym{GNU} linker (especially those
 using @R{} as a shared library), it is likely that including
 @samp{-Wl,-O1} in @code{LDFLAGS} is worthwhile, and
 @samp{'-Bdirect,--hash-style=both,-Wl,-O1'} is recommended at
- at uref{http://lwn.net/@/Articles/@/192624/}.  Tuning compilation to a
+ at uref{https://lwn.net/@/Articles/@/192624/}.  Tuning compilation to a
 specific @acronym{CPU} family (e.g.@: @samp{-mtune=native} for
 @command{gcc}) can give worthwhile performance gains, especially on
 older architectures such as @cputype{ix86}.
@@ -3981,13 +4297,12 @@ path to a shell, e.g. @file{/usr/local/bin/bash}).
 
 To compile @R{}, you will most likely find it easiest to use
 @acronym{GNU} @command{make}, although the Sun @command{make} works on
-Solaris, as does the native FreeBSD @command{make}.  The native
- at command{make} has been reported to fail on SGI Irix 6.5 and Alpha/OSF1
-(aka Tru64).
+Solaris.  The native @command{make} has been reported to fail on SGI
+Irix 6.5 and Alpha/OSF1 (aka Tru64).
 
-To build in a separate directory you need a @command{make} that uses the
- at code{VPATH} variable, for example @acronym{GNU} @command{make}, or Sun
- at command{make} on Solaris 7 or later.
+To build in a separate directory you need a @command{make} that supports
+the @code{VPATH} variable, for example @acronym{GNU} @command{make} and
+Sun @command{make}.
 
 @command{dmake} has also been used. e.g,@: on Solaris 10.
 
@@ -4004,10 +4319,6 @@ variable @code{MAKE} at configure time, for example
 @section Using FORTRAN
 @cindex FORTRAN
 
- at menu
-* Using gfortran::              
- at end menu
-
 To compile @R{}, you need a FORTRAN compiler.  The default
 is to search for
 @c F95_compilers in m4/R.m4:
@@ -4078,31 +4389,7 @@ you will need to set
 @env{FPICFLAGS} appropriately.  Also, the included LAPACK sources
 contain constructs that @command{f2c} is unlikely to be able to process,
 so you would need to use an external LAPACK library (such as CLAPACK
-from @uref{http://www.netlib.org/clapack/}).
-
-
- at node Using gfortran,  , Using FORTRAN, Using FORTRAN
- at subsection Using gfortran
-
- at command{gfortran} is the F95 compiler that is part of
- at command{gcc}@tie{}4. at var{x}. at var{y}.
-
-On Linux @cputype{x86_64} systems there is an incompatibility in the
-return conventions for double-complex functions between
- at command{gfortran} and @command{g77} which results in the final example
-in @code{example(eigen)} hanging or segfaulting under external
- at acronym{BLAS}s built under @command{g77} (and also some external
-LAPACKs).  The commonest cases will be detected by a @command{configure}
-test.  Although @command{g77} is long obsolete this is still sometimes
-seen with C versions of external software using @command{g77}
-conventions.
-
-The default @code{FFLAGS} and @code{FCFLAGS} chosen (by
- at command{autoconf}) for a @acronym{GNU} FORTRAN compiler is @samp{-g
--O2}.  This has caused problems (segfaults and infinite loops) on
- at cputype{x86_64} Linux in the past, but seems fine with
- at command{gfortran 4.4.4} and later: for @code{gfortran 4.3.x} set
- at code{FFLAGS} and @code{FCFLAGS} to use at most @samp{-O}.
+from @uref{http://www.netlib.org/@/clapack/}).
 
 @node Compile and load flags, Maintainer mode, Using FORTRAN, Configuration on a Unix-alike
 @section Compile and load flags
@@ -4152,7 +4439,7 @@ special flags for compiling C++ code to be turned into a shared object
 @item FCPICFLAGS
 special flags for compiling Fortran 95 code to be turned into a shared object
 @item DEFS
-defines to be used when compiling C code in R itself
+defines to be used when compiling C code in @R{} itself
 @end table
 
 @noindent
@@ -4212,15 +4499,15 @@ to be satisfactory.
 The ultimate sources for package @pkg{compiler} are in its @file{noweb}
 directory.  To re-create the sources from
 @file{src/library/compiler/noweb/compiler.nw}, the command
- at command{notangle} is required.  This is likely to need to be installed
-from the sources at @url{http://www.cs.tufts.edu/~nr/noweb/} (and can
-also be found on CTAN).  The package sources are only re-created even in
-maintainer mode if @file{src/library/compiler/noweb/compiler.nw} has
-been updated.
+ at command{notangle} is required.  Some Linux distributions include this
+command in package @pkg{noweb}.  It can also be installed from the sources
+at @url{https://www.cs.tufts.edu/~nr/noweb/} (and can also be found on
+CTAN).  The package sources are only re-created even in maintainer mode if
+ at file{src/library/compiler/noweb/compiler.nw} has been updated.
 
 It is likely that in future creating @code{configure} will need the GNU
 `autoconf archive' installed.  This can be found at
- at url{http://www.gnu.org/software/autoconf-archive/} and as a package
+ at url{https://www.gnu.org/software/autoconf-archive/} and as a package
 (usually called @pkg{autoconf-archive}) in most packaged distributions,
 for example Debian, Fedora, OpenCSW, Homebrew and MacPorts.
 
@@ -4240,7 +4527,7 @@ recent reports.
 
 C macros to select particular platforms can be tricky to track down
 (there is a fair amount of misinformation on the Web).  The Wiki
-(currently) at @uref{http://sourceforge.net/p/predef/wiki/Home/} can be
+(currently) at @uref{http://sourceforge.net/@/p/@/predef/@/wiki/@/Home/} can be
 helpful.  The @R{} sources currently use
 @example
 AIX: _AIX
@@ -4249,7 +4536,7 @@ FreeBSD: __FreeBSD__
 HP-UX: __hpux__, __hpux
 IRIX: sgi, __sgi
 Linux: __linux__
-OS X: __APPLE__
+macOS: __APPLE__
 NetBSD: __NetBSD__
 OpenBSD: __OpenBSD__
 Solaris: __sun, sun
@@ -4259,10 +4546,11 @@ Windows: _WIN32, _WIN64
 @menu
 * X11 issues::                  
 * Linux::                       
-* OS X::                        
+* macOS::                       
 * Solaris::                     
 * AIX::                         
 * FreeBSD::                     
+* OpenBSD::                     
 * Cygwin::                      
 * New platforms::               
 @end menu
@@ -4330,7 +4618,7 @@ only contain a subset of the available glyphs (and are often fixed-width
 designed for use in terminals).  In such locales @emph{fontsets} are
 used, made up of fonts encoded in other encodings.  If the locale you
 are using has an entry in the @samp{XLC_LOCALE} directory (typically
- at file{/usr/share/X11/locale}, it is likely that all you need to do is to
+ at file{/usr/share/X11/locale}), it is likely that all you need to do is to
 pick a suitable font specification that has fonts in the encodings
 specified there.  If not, you may have to get hold of a suitable locale
 entry for X11.  This may mean that, for example, Japanese text can be
@@ -4355,12 +4643,14 @@ directory or elsewhere, for example,
 @end example
 
 
- at node Linux, OS X, X11 issues, Platform notes
+ at node Linux, macOS, X11 issues, Platform notes
 @section Linux
 @cindex Linux
 
 Linux is the main development platform for @R{}, so compilation from the
-sources is normally straightforward with the standard compilers.
+sources is normally straightforward with the standard compilers and
+libraries. at footnote{For example, @code{glibc}: other C libraries such as
+ at code{musl} have been used but are not routinely tested.}
 
 Remember that some package management systems (such as @acronym{RPM} and
 deb) make a distinction between the user version of a package and the
@@ -4370,7 +4660,14 @@ installed.  So please check the @code{configure} output to see if the
 expected features are detected: if for example @samp{readline} is
 missing add the developer package.  (On most systems you will also need
 @samp{ncurses} and its developer package, although these should be
-dependencies of the @samp{readline} package(s).)
+dependencies of the @samp{readline} package(s).)  You should expect to
+see in the @command{configure} summary
+
+ at example
+  Interfaces supported:      X11, tcltk
+  External libraries:        readline, zlib, bzlib, lzma, PCRE, curl
+  Additional capabilities:   PNG, JPEG, TIFF, NLS, cairo, ICU
+ at end example
 
 When @R{} has been installed from a binary distribution there are
 sometimes problems with missing components such as the FORTRAN
@@ -4409,7 +4706,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 18 we used
+on @cputype{x86_64} with Fedora 24 we used
 
 @example
 CC="gcc -m32"
@@ -4455,7 +4752,6 @@ the additional flags being needed to resolve problems linking against
 @menu
 * Clang::                       
 * Intel compilers::             
-* Oracle Solaris Studio compilers::  
 @end menu
 
 @node Clang, Intel compilers, Linux, Linux
@@ -4473,10 +4769,15 @@ which is needed for some versions of @command{gfortran}.
 
 The current default for @command{clang++} is to use the C++ runtime from
 the installed @command{g++}.  Using the runtime from the @code{libc++}
-project (@url{http://libcxx.llvm.org/}) has also been tested: for some
- at R{} packages only the variant using @code{libcxxabi} was successful.
+project (@url{http://libcxx.llvm.org/}, Fedora RPM @code{libcxx-devel})
+has also been tested: for some @R{} packages only the variant using
+ at code{libcxxabi} was successful.
+
+Earlier builds of @command{clang} have no OpenMP support, those of
+versions 3.7.0 or later may. at footnote{This also needs the OpenMP runtime
+which has sometimes been distributed separately.}
 
- at node Intel compilers, Oracle Solaris Studio compilers, Clang, Linux
+ at node Intel compilers,  , Clang, Linux
 @subsection Intel compilers
 
 Intel compilers have been used under @cputype{ix86} and @cputype{x86_64}
@@ -4511,160 +4812,172 @@ need add flags to @code{CFLAGS}, @code{FFLAGS} and @code{CXXFLAGS} such
 as @option{-mp} (shown above) or @option{-fp-model precise -fp-model
 source}, depending on the compiler version.
 
-Others have reported success with versions 10.x and 11.x.
+Others have reported success with versions 10.x and 11.x.  
+ at c https://stat.ethz.ch/pipermail/r-devel/2015-September/071717.html
+Bjørn-Helge Mevik reported success with version 2015.3 of the compilers,
+using (for a SandyBridge CPU on Centos 6.x)
+
+ at example
+fast="-fp-model precise -ip -O3 -opt-mem-layout-trans=3 -xHost -mavx"
+CC=icc
+CFLAGS="$fast -wd188"
+F77=ifort
+FFLAGS="$fast"
+CXX=icpc
+CXXFLAGS="$fast"
+FC=$F77
+FCFLAGS=$F77FLAGS
+ at end example
+
+ at node macOS, Solaris, Linux, Platform notes
+ at section macOS
+ at cindex macOS
+
+(`macOS' was known as `OS X' from 2012--2016.)
 
+The instructions here are for @cputype{x86_64} builds on 10.11 (El
+Capitan) or later.  @R{} can be built for 10.9 and 10.10 and in
+principle at footnote{It will be necessary to install later versions of
+software such as @code{libcurl}.} for 10.6 to 10.8.
 
- at node Oracle Solaris Studio compilers,  , Intel compilers, Linux
- at subsection Oracle Solaris Studio compilers
+To build @R{} you need Apple's `Command Line Tools': these can be
+(re-)installed by @command{xcode-select --install}.  (If you have a
+fresh OS installation, running e.g.@: @command{make} in a terminal will
+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.)
 
-Brian Ripley tested the Sun Studio 12 compilers, since renamed to Oracle
-Solaris Studio,
-(@uref{http://developers.sun.com/@/sunstudio/@/index.jsp}) 
-On
- at cputype{x86_64} Linux with
+You need GNU @code{readline}@footnote{Apple provides a partial emulation
+of GNU readline 4.2 based on the NetBSD @code{editline} library.  That
+is not recommended but for the time being @R{}'s installation scripts
+will make use of it if GNU readline is not found.}  That and other
+binary components are available from
+ at uref{https://r.research.att.com/libs}: you will need @code{pcre} and
+ at code{xz} (for @code{libzma}) as recent macOS versions provide libraries
+but not headers for these (and the system @code{pcre} is too old at
+version 8.02).
 
+An X sub-system is required unless configuring using
+ at option{--without-x}: see @uref{https://xquartz.macosforge.org/}. @R{}'s
+ at command{configure} script can be told to look for @code{X11} in
+ at code{XQuartz}'s main location of @file{/opt/X11}, e.g.@: by
 @example
-CC=suncc
-CFLAGS="-xO5 -xc99 -xlibmil -nofstore"
-CPICFLAGS=-Kpic
-F77=sunf95
-FFLAGS="-O5 -libmil -nofstore"
-FPICFLAGS=-Kpic
-CXX="sunCC -library=stlport4"
-CXXFLAGS="-xO5 -xlibmil -nofstore -features=tmplrefstatic"
-CXXPICFLAGS=-Kpic
-FC=sunf95
-FCFLAGS=$FFLAGS
-FCPICFLAGS=-Kpic
-LDFLAGS=-L/opt/sunstudio12.1/rtlibs/amd64
-SHLIB_LDFLAGS=-shared
-SHLIB_CXXLDFLAGS=-G
-SHLIB_FCLDFLAGS=-G
-SAFE_FFLAGS="-O5 -libmil"
+--x-includes=/opt/X11/include --x-libraries=/opt/X11/lib
 @end example
-
 @noindent
- at option{-m64} could be added, but was the default.  Do not use
- at option{-fast}: see the warnings under Solaris. (The C++ options are
-also explained under Solaris.)
-
-Others have found on at least some versions of @cputype{ix86} Linux that
-the configure flag @option{--disable-largefile} was needed (since
- at file{glob.h} on that platform presumed @command{gcc} was being used).
-
-
- at node OS X, Solaris, Linux, Platform notes
- at section OS X
- at cindex OS X
-
-You can build @R{} using Apple's `Command-line Tools for Xcode' and and
-suitable compilers.  You will also need @code{readline} (or to configure
-with @option{--without-readline}).  That and other binary components are
-available from @uref{http://r.research.att.com/libs}.
-
-You may also need to install an X sub-system (or you will need to
-configure using option @option{--without-x}): X is part of the standard
-OS X distribution in versions prior to Mountain Lion, but not always
-installed.  For Mountain Lion and later, see
- at uref{http://xquartz.macosforge.org/}.  (Note that XQuartz will likely
-need to be re-installed after an OS upgrade.)
-
-In principle @R{} can be built for 10.4.x, 10.5.x and for PowerPC Macs
-but this has not been tested recently: 10.6 (Snow Leopard) is the
-earliest version currently tested.  32-bit Intel builds of @R{} 3.0.0
-were tested: they would be needed for Snow Leopard running on very old
-machines with Core Solo or Core Duo CPUs.  The instructions here are for
- at cputype{x86_64} builds.
+although linked versions under @file{/usr/X11} will be found.
 
 To use the @code{quartz()} graphics device you need to configure with
 @option{--with-aqua} (which is the default): @code{quartz()} then
 becomes the default device when running @R{} at the console and X11
-would only be used for the data editor/viewer.  (This needs an
-Objective-C compiler at footnote{These days that is defined by Apple's
-implementation of @code{clang}, so it is strongly recommended to use
-that.} which can compile the code for @code{quartz()}.)
+would only be used for the command-line- at R{} data editor/viewer and one
+version of Tcl/Tk.  (This option needs an Objective-C
+compiler at footnote{These days that is defined by Apple's implementation
+of @code{clang}, so it is strongly recommended to use that.} which can
+compile the source code of @code{quartz()}.)
 
 Use @option{--without-aqua} if you want a standard Unix-alike build:
 apart from disabling @code{quartz()} and the ability to use the build
 with @Rapp{}, it also changes the default location of the personal
-library (see @code{?.libPaths()}).  Also use
- at option{--disable-R-framework} to install in the standard layout.
-
-`Command-line Tools for Xcode' used to be part of the Apple Developer
-Tools (`Xcode') but nowadays need to be installed separately.  They can
-be downloaded from @uref{http://developer.apple.com/devcenter/mac/} (you
-will need to register there: that allows you to download older versions
-available for your OS) or some versions of Xcode (from the App Store or
-from @uref{http://developer.apple.com/devcenter/mac/}) you can install
-the command-line tools from within Xcode, from the @samp{Downloads} pane
-in the @samp{Preferences}.  For Mavericks and later, see the specific
-sub-section below.
-
-Various compilers can be used.  The current @acronym{CRAN} `Snow
-Leopard' distribution of @R{} is built using
+library (see @code{?.libPaths}).
 
- at itemize
- at item @command{gcc}
-from an Xcode distribution prior to version 5.  This is a version of gcc
-4.2.1 with an LLVM backend.
-
- at item @command{gfortran}
-from
- at uref{http://cran.r-project.org/bin/macosx/tools/gfortran-4.2.3.pkg}.
-Note that this installs into @file{/usr/local/bin}, so make sure that is
-on your path.  Other compilers from
- at uref{http://r.research.att.com/tools/} can also be used.
-
- at item @command{clang}
-from the Xcode distribution, to compile the Objective-C parts of the
- at code{quartz()} device. 
- at end itemize
-
-To use these, have in @file{config.site} something like
+Various compilers can be used.  One could use
 
 @example
-CC="llvm-gcc-4.2"
-CXX="llvm-g++-4.2"
-F77="gfortran-4.2 -arch x86_64"
+CC=clang
+CXX=clang++
+F77=/usr/local/gfortran/bin/gfortran
 FC=$F77
-OBJC="clang"
+OBJC=clang
+CFLAGS='-Wal -g -O2'
+CXXFLAGS='-Wall -g -O2'
+OBJCFLAGS='-Wall -g -O2'
+F77FLAGS='-Wall -g -O2 -mtune=generic'
+FCFLAGS=$F77FLAGS
+ at end example
+
+ at noindent
+with @command{clang} and @command{clang++} from the `Command Line Tools'
+and the Fortran compiler from one of the packages described in the next
+paragraph.
+
+There are installers at footnote{Some of these are unsigned packages: to
+install them you may need to right-click and select @code{Open with ->
+Installer}.} for Fortran compilers for El Capitan and Sierra at
+ at uref{http://coudert.name/@/software/@/gfortran-6.1-ElCapitan.dmg} and
+ at uref{http://coudert.name/@/software/@/gfortran-6.3-Sierra.dmg}.  (These
+compilers are also available from a @code{CRAN} mirror: select `Other'
+under `Software' from the left-hand menu.)  One way to use these builds
+with a binary distribution of @R{} is to have a @file{~/.R/Makevars}
+file similar to (El Capitan)
+ at example
+F77 = /usr/local/gfortran/bin/gfortran
+FC = $F77
+FLIBS = -L/usr/local/gfortran/lib/gcc/x86_64-apple-darwin15/6.1.0
+  -L/usr/local/gfortran/lib -lgfortran -lquadmath -lm
+ at end example
+or (Sierra)
+ at example
+F77 = /usr/local/gfortran/bin/gfortran
+FC = $F77
+FLIBS = -L/usr/local/gfortran/lib/gcc/x86_64-apple-darwin16/6.3.0
+  -L/usr/local/gfortran/lib -lgfortran -lquadmath -lm
+ at end example
+ at noindent
+(with lines broken here for legibility).
+
+More recent and complete distributions of @command{clang} are often
+available from @uref{http://llvm.org/releases/}: for example at the time
+of writing for 4.0.0, built for Sierra.  In particular, these should
+include support for OpenMP. Another build of clang 4.0.0 is available at
+ 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
+ at file{/usr/local/clang4}.  Then @R{} could be configured by something
+like
+ at 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 \
+DYLD_FALLBACK_LIBRARY_PATH=/usr/local/clang4/lib:/usr/local/lib
 @end example
-
 @noindent
-Full names help to ensure that the intended compilers are used.  In
-particular @command{gcc} is a copy of @command{llvm-gcc-4.2} for Xcode <
-5 but of @command{clang} in Xcode 5.  The recommended Fortran compiler
-defaults to 32-bit, so @code{-arch x86_64} is needed.  (For a 32-bit
-build, use @code{-arch i386} for all compiler commands.)
-
-The OpenMP support in this version of @command{gcc} is problematic, so
-the @acronym{CRAN} build is configured with @option{--disable-openmp}.
-
-The current @acronym{CRAN} `Mavericks' distribution of @R{} is built
-using
-
+with @file{config.site} containing
 @example
-CC=clang
-CXX=clang++
-F77=gfortran-4.8
+CC=/usr/local/clang4/bin/clang
+OBJC=$CC
+F77=/usr/local/gfortran/bin/gfortran
 FC=$F77
-OBJC=clang
+CXX=/usr/local/clang4/bin/clang++
+LDFLAGS="-L/usr/local/clang4/lib -L/usr/local/lib"
+R_LD_LIBRARY_PATH=/usr/local/clang4/lib:/usr/local/lib
+ at end example
+ at noindent
+The care to specify library paths is to ensure that the OpenMP runtime
+library, here @file{/usr/local/clang4/lib/libomp.dylib}, is found when
+needed. If this works, you should see the line
+ at example
+checking whether OpenMP SIMD reduction is supported... yes
 @end example
-
 @noindent
-with @command{clang} and @command{clang++} from Xcode 5, and the Fortran
-compiler from
- at uref{http://r.research.att.com/libs/gfortran-4.8.2-darwin13.tar.bz2}. at footnote{This
-is a tarball which needs to be unpacked in the Terminal by e.g.@:
- at command{sudo tar -zxf gfortran-4.8.2-darwin13.tar.bz2 -C /}.}  Apple's
-builds of @command{clang} currently have little or no OpenMP support.
+in the @command{configure} output.  Also, @samp{R_LD_LIBRARY_PATH} needs
+to be set to find the latest version of the C++ run-time libraries
+rather than the system ones.
 
 Pre-compiled versions of many of the @ref{Useful libraries and programs}
-are available from @uref{http://r.research.att.com/libs/}.  You will
-most likely want at least @code{jpeg}, @code{libpng} and @code{readline}
-(and perhaps @code{tiff}).  @code{pkg-config} is not provided by Apple
-and useful for many packages: it will also be used if present when
-configuring the @code{X11()} device.
+are available from @uref{https://r.research.att.com/libs/}.  You will
+most likely want at least @code{jpeg} and @code{tiff}.  The
+ at code{pkg-config} utility is not provided by Apple and used for the
+installation from source of many packages: it will also be used if
+present when configuring the @code{X11()} and bitmap devices.
+
+Support for @code{cairo} (without @code{Pango}) can be enabled if
+ at code{pkg-config} and XQuartz are available, Make sure the XQuartz's
+ at code{pkg-config} files are found first on the configuration path: for
+example by setting
+ at example
+export PKG_CONFIG_PATH=/opt/X11/lib/pkgconfig:/usr/local/lib/pkgconfig:/usr/lib/pkgconfig
+ at end example
+ at noindent
+or appending that variable to the @command{configure} command.
 
 @cindex BLAS library
 @cindex LAPACK library
@@ -4676,160 +4989,64 @@ The @code{Accelerate} library can be used @emph{via} the configuration options
 
 @noindent
 to provide potentially higher-performance versions of the @acronym{BLAS}
-and LAPACK routines.  (Use of @code{Accelerate} with
- at option{--with-lapack} does not work on Snow Leopard: it may work there
-without.)@footnote{It is reported that for some non-Apple toolchains
- at code{CPPFLAGS} needed to contain @code{-D__ACCELERATE__}.}
+and LAPACK routines. at 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.}
 
 Looking at the top of
 @file{/Library/Frameworks/R.framework/Resources/etc/Makeconf}
 will show the compilers and configuration options used for the
- at acronym{CRAN} binary package for @R{}: at the time of writing
+ at acronym{CRAN} binary package for @R{}: at the time of writing the
+non-default options
 @example
---with-system-zlib --enable-memory-profiling --disable-openmp
+--enable-memory-profiling --enable-R-framework
 @end example
 @noindent
-was used for `Snow Leopard' and the first two for `Mavericks'.
+were used.
 
-Configure option @option{--with-internal-tzcode} is the default, as a
-64-bit @code{time_t} is available but the system implementation of time
-zones does not work correctly for times before 1902 or after 2037.
+Configure option @option{--with-internal-tzcode} is the default on macOS,
+as the system implementation of time zones does not work correctly for
+times before 1902 or after 2037 (despite using a 64-bit @code{time_t}).
 
 The @TeX{} implementation used by the developers is MacTeX
-(@uref{http://www.tug.org/mactex/}): the full installation is about 4GB,
-but a smaller version is available at
- at uref{http://www.tug.org/mactex/morepackages.html}: you will need to add
-some packages, e.g.@: for the 2014 version we needed to add
- at pkg{cm-super}, @pkg{ec}, @pkg{helvetic}, @pkg{inconsolata} and
- at pkg{texinfo} which brought this to about 380MB (or package
- at pkg{texinfo} and the collections @pkg{collection-fontsrecommended},
- at pkg{collection-fontsextra} and @pkg{collection-latexextra} which will
-take this up to about 1GB).  @samp{TeX Live Utility} (available
- at emph{via} the MacTeX front page) provides a graphical means to manage
- at TeX{} packages.
+(@uref{https://www.tug.org/mactex/}): the full installation is about
+5GB, but a smaller version (`Basic TeX') is available at
+ at uref{https://www.tug.org/mactex/morepackages.html} to which you will
+need to add some packages, e.g.@: for the 2016 version we needed to
+add at footnote{E.g.@: @emph{via} @command{tlmgr install cm-super helvetic
+inconsolata texinfo} .}  @pkg{cm-super}, @pkg{helvetic},
+ at pkg{inconsolata} and @pkg{texinfo} which brought this to about 410MB.
+ at samp{TeX Live Utility} (available @emph{via} the MacTeX front page)
+provides a graphical means to manage @TeX{} packages.
+
+One macOS quirk is that the default path has @file{/usr/local/bin} after
+ at file{/usr/bin}, contrary to common practice on Unix-alikes.  This means
+that if you install tools from the sources they will by default be
+installed under @file{/usr/local} and not supersede the system
+versions.
+
+If you upgrade your OS you should re-install the `Command Line Tools'
+and may need to re-install XQuartz and Java (this has been needed for
+some upgrades but not others).
+
 
 @menu
-* Snow Leopard::                
-* Lion::                        
-* Mountain Lion::               
-* Mavericks::                   
-* Yosemite::                    
 * Tcl/Tk headers and libraries::  
-* Java (OS X)::                 
+* Java (macOS)::                
 * Frameworks::                  
 * Building R.app::              
 @end menu
 
- at node Snow Leopard, Lion, OS X, OS X
- at subsection Snow Leopard
-
-A quirk on Snow Leopard is that the X11 libraries are not in the default
-linking path, so something like @samp{LIBS=-L/usr/X11/lib} may be
-required in @file{config.site}, or you can use the @command{configure}
-options @option{--x-includes=/usr/X11/include
---x-libraries=/usr/X11/lib} .
-
-The @acronym{CRAN} binaries are built using Xcode 4.2, a version
-available only to subscribing developers.  It is believed that 3.2.6 (the
-last public free version for Snow Leopard) will work.
-
- at node Lion, Mountain Lion, Snow Leopard, OS X
- at subsection Lion
-
-No tweaks are known to be needed on Lion.  See the notes on Mountain
-Lion if XQuartz is in use.
-
- at node Mountain Lion, Mavericks, Lion, OS X
- at subsection Mountain Lion
-
-The X11 system used with Mountain Lion is XQuartz (see above).
-
-To build the graphics devices depending on cairographics the XQuartz
-path for @command{pkg-config} files needs to be known to
- at command{pkg-config} when @command{configure} is run: this usually means
-adding it to the @env{PKG_CONFIG_PATH} environment variable, e.g.
-
- at example
-export PKG_CONFIG_PATH= \
-  /opt/X11/lib/pkgconfig:/usr/local/lib/pkgconfig:/usr/lib/pkgconfig
- at end example
-
- at noindent
-or putting
- at example
-PKG_CONFIG_PATH=/opt/X11/lib/pkgconfig:/usr/local/lib/pkgconfig:/usr/lib/pkgconfig
- at end example
-
- at noindent
-in @file{config.site}.
-
-For some pre-compiled software, for example the GTK framework,
- at file{/opt/X11/include} may need to be added to the include paths.
-
-If you install the command-line tools for Xcode 4.6.3 you will get the
-compilers used for the CRAN binary distribution: those for Xcode 5 can
-be installed afterwards.
-
- at node Mavericks, Yosemite, Mountain Lion, OS X
- at subsection Mavericks
-
-Xcode for Mavericks provides different compilers, headers and libraries from
-earlier versions.  In particular the compilers (even those called
- at command{gcc} and @command{g++}) are based on @command{clang}, and the 
-C++ headers and runtime are from LLVM's @samp{libc++} project).
-
-The command-line tools can be (re-)installed by @command{xcode-select
---install}.  (If you have a fresh installation of Mavericks, running
-e.g.@: @command{make} in a terminal will offer the installation of the
-command-line tools, or perhaps use the versions from Xcode.  However,
-after an update to Mavericks, you are advised to re-install them.)  They
-are not available under the @samp{Downloads} preference pane in Xcode.
-
-To use the compilers from the command-line tools for Xcode 5 or 6 with
-the recommended Fortran compiler, have in @file{config.site} something
-like
-
- at example
-CC=clang
-CXX=clang++
-F77=gfortran-4.8
-FC=$F77
-OBJC=clang
- at end example
- at noindent
-(@code{CC=gcc} and @code{CXX=g++} are slightly different front-ends to
-the same compilers.)  Recent versions of the @acronym{CRAN} binary package
-installer for `Snow Leopard' change the settings in @file{etc/Makeconf}
-to
- at example
-CC = gcc -arch x86_64 -std=gnu99
-CXX g++ -arch x86_64
-F77 = gfortran-4.2 -arch x86_64
-OBJC = gcc -arch x86_64
-OBJCXX = g++ -arch x86_64
- at end example
-when installing on Mavericks.
-
-See the comments under Mountain Lion about X11 and GTK.
-
- at node Yosemite, Tcl/Tk headers and libraries, Mavericks, OS X
- at subsection Yosemite
-
-See the comments under `Mavericks'.
-
-Note that if you upgrade to Yosemite you should re-install any of
-XQuartz, the `Command-line Tools for Xcode' and Java which you have
-installed.
-
-
- at node Tcl/Tk headers and libraries, Java (OS X), Yosemite, OS X
+ at node Tcl/Tk headers and libraries, Java (macOS), macOS, macOS
 @subsection Tcl/Tk headers and libraries
 
 If you plan to use the @code{tcltk} package for @R{}, you need to
 install a distribution of Tcl/Tk.  There are two alternatives.  If you
 use @Rapp{} you will want to use X11-based Tcl/Tk (as used on other
-Unix-alikes), which is installed as part of the CRAN binary for @R{}.
-This may need
+Unix-alikes), which is installed as part of the CRAN binary for @R{} and
+available as separate @code{tcl} and @code{tk} components from
+ at uref{https://r.research.att.com/libs/}.  This may need
+ at command{configure} options
 @example
 -with-tcltk=/usr/local/lib
 @end example
@@ -4838,18 +5055,17 @@ or
 --with-tcl-config=/usr/local/lib/tclConfig.sh 
 --with-tk-config=/usr/local/lib/tkConfig.sh
 @end example
-Note that this requires a fully-updated X11 installation (XQuartz for
-Mountain Lion and later).
+Note that this requires a matching XQuartz installation.
 
 There is also a native (`Aqua') version of Tcl/Tk which produces widgets
-in the native OS X style: this will not work with @Rapp{} because of
-conflicts over the OS X menu, but for those only using command-line @R{}
+in the native macOS style: this will not work with @Rapp{} because of
+conflicts over the macOS menu, but for those only using command-line @R{}
 this provides a much more intuitive interface to Tk for experienced Mac
-users.  Most versions of OS X come with Aqua Tcl/Tk libraries, but these
-are not current (nor recent) versions of Tcl/Tk (8.5.9 in Mountain
-Lion and Mavericks).  It is better to install Tcl/Tk 8.6.x or 8.5.x from
-the sources or a binary distribution from
- at uref{http://www.activestate.com/activetcl/downloads}.  Configure @R{}
+users.  Most versions of macOS come with Aqua Tcl/Tk libraries, but these
+are not at all recent versions of Tcl/Tk (8.5.9 in Sierra, which is
+not even the latest patched version in that series).  It is better to
+install Tcl/Tk 8.6.x from the sources or a binary distribution from
+ at uref{https://www.activestate.com/@/activetcl/@/downloads}.  Configure @R{}
 with
 @example
 --with-tcl-config=/Library/Frameworks/Tcl.framework/tclConfig.sh 
@@ -4857,33 +5073,38 @@ with
 @end example
 
 @noindent
-(for the versions bundled with OS X, use paths starting with
+(for the versions bundled with macOS, use paths starting with
 @file{/System/Library}).
 
-If you need to find out which version of Tk in use at run time, use
+If you need to find out which distribution of Tk is in use at run time,
+use
 @example
 library(tcltk)
 tclvalue(.Tcl("tk windowingsystem"))  # "x11" or "aqua"
 @end example
 
- at node Java (OS X), Frameworks, Tcl/Tk headers and libraries, OS X
+ at node Java (macOS), Frameworks, Tcl/Tk headers and libraries, macOS
 @subsection Java
 
-The situation with Java support on OS X is messy, with Apple essentially
-no longer supporting Java (and what it does support is Java 6, which has
-reached end-of-life).  Snow Leopard and Lion shipped with a Java 6
-runtime (JRE).
+The situation with Java support on macOS is messy. at footnote{For more
+details see @uref{http://www.macstrategy.com/@/article.php?3}.}
+
+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
+ at command{java -version} in a @command{Terminal} window: if Java is not
+installed this should prompt you to install it.  You can also install
+directly the latest Java from Oracle (currently from
+ at uref{http://www.oracle.com/@/technetwork/@/java/@/javase/@/downloads/@/index.html}).
 
-Mountain Lion and later do not come with an installed JRE, and an OS X
-upgrade removes one if already installed: it is intended to be 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 this
-should prompt you to install it.
+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
+needed before using Java-using packages.
 
-You may want/need to install the latest Java from Oracle (currently Java
-8 from
- at uref{http://www.oracle.com/technetwork/java/javase/downloads/index.html});
-this is for Lion and later.
+ at c You may need to install what Apple calls `legacy Java'@footnote{e.g.@:
+ at c @code{Java For OS X 2015-001} from
+ at c @uref{https://support.apple.com/@/kb/@/DL1572}.} to suppress pop-up messages
+ at c even if you have a current version installed.
 
 To see what compatible versions of Java are currently installed, run
 @command{/usr/libexec/java_home -V -a x86_64}.  If needed, set the
@@ -4897,45 +5118,42 @@ compiling JNI programs (used by packages @CRANpkg{rJava} and
 JRE.
 
 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}.  The Apple JRE can be
-specified explicitly by something like
+need some help, e.g.@: by setting @env{JAVA_HOME}.  The Oracle JDK can
+be specified explicitly by something like
 @example
-JAVA_HOME=/System/Library/Frameworks/JavaVM.framework/Home
-JAVA_CPPFLAGS="-I/System/Library/Frameworks/JavaVM.framework/Headers"
-JAVA_LD_LIBRARY_PATH=
-JAVA_LIBS="-framework JavaVM"
- at end example
- at noindent
-The Apple developer versions of the JDK install somewhere like
- at example
-JAVA_HOME=/Library/Java/JavaVirtualMachines/1.6.0_43-b01-447.jdk/Contents/Home
- at end example
- at noindent
-The Oracle JDK can be specified explicitly by something like
- at example
-JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_25.jdk/Contents/Home
+JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_121.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" 
 @end example
 in @file{config.site}.
 
-Note that it is necessary to set the environment variable @env{NOAWT}
-to @code{1} to install many of the Java-using packages.
+(An Apple JRE, if available, can be specified explicitly by something
+like
+ at example
+JAVA_HOME=/System/Library/Frameworks/JavaVM.framework/Home
+JAVA_CPPFLAGS="-I/System/Library/Frameworks/JavaVM.framework/Headers"
+JAVA_LD_LIBRARY_PATH=
+JAVA_LIBS="-framework JavaVM"
+ at end example
+.)
 
+Note that it is necessary to set the environment variable @env{NOAWT} to
+ at code{1} to install many of the Java-using packages.
 
- at node Frameworks, Building R.app, Java (OS X), OS X
+
+ at node Frameworks, Building R.app, Java (macOS), macOS
 @subsection Frameworks
 
 The @acronym{CRAN} build of @R{} is installed as a framework, which is
-selected by the default option
+selected by the option
 
 @example
 ./configure --enable-R-framework
 @end example
 
-(This is intended to be used with an Apple toolchain: other compilers may
-not support frameworks correctly.)
+(This is intended to be used with an Apple toolchain: others may not
+support frameworks correctly but that from @code{llvm.org} does.)
 
 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
@@ -4943,18 +5161,19 @@ dynamic library.  This option configures @R{} to be built and installed
 as a framework called @file{R.framework}.  The default installation path
 for @file{R.framework} is @file{/Library/Frameworks} but this can be
 changed at configure time by specifying the flag
- at option{--enable-R-framework[=@var{DIR}]} or at install time as
+ at option{--enable-R-framework[=@var{DIR}]} (or @option{--prefix}) or at
+install time @emph{via}
 
 @example
 make prefix=/where/you/want/R.framework/to/go install
 @end example
 
 Note that installation as a framework is non-standard (especially to a
-non-standard location) and utilities may not support it (e.g.@: the
+non-standard location) and Unix utilities may not support it (e.g.@: the
 @command{pkg-config} file @file{libR.pc} will be put somewhere unknown
 to @command{pkg-config}).
 
- at node Building R.app,  , Frameworks, OS X
+ at node Building R.app,  , Frameworks, macOS
 @subsection Building R.app
 
 Note that building the @Rapp{} GUI console is a separate project, using
@@ -4967,48 +5186,68 @@ The current sources can be checked out by
 svn co https://svn.r-project.org/R-packages/trunk/Mac-GUI
 @end example
 @noindent
-This can be built by loading the @code{R.xcodeproj} project (select the
- at code{R} target and the @code{SnowLeopard64} or @code{Lion64}
-configuration), or from the command-line by e.g.@:
+and built by loading the @code{R.xcodeproj} project (select the
+ at code{R} target and a suitable configuration), or from the command-line
+by e.g.@:
 @example
-xcodebuild -target R -configuration SnowLeopard64
+xcodebuild -target R -configuration Release
 @end example
 See also the @file{INSTALL} file in the checkout or directly at
- at uref{https://svn.r-project.org/R-packages/trunk/Mac-GUI/INSTALL}.
+ at uref{https://svn.r-project.org/@/R-packages/@/trunk/@/Mac-GUI/@/INSTALL}.
 
 @Rapp{} does not need to be installed in any specific way. Building
- at Rapp{} results in the @Rapp{} bundle which appears as one R icon. This
+ at Rapp{} results in the @Rapp{} bundle which appears as one @R{} icon. This
 application bundle can be run anywhere and it is customary to place it
 in the @file{/Applications} folder.
 
 
- at node Solaris, AIX, OS X, Platform notes
+ at node Solaris, AIX, macOS, Platform notes
 @section Solaris
 @cindex Solaris
 
+ at menu
+* 64-bit builds::               
+* Using gcc::                   
+ at end menu
+
 @R{} has been built successfully on Solaris 10 (both Sparc and
- at cputype{x86}) using the (zero cost) Oracle Solaris Studio compilers:
-there has been some success with
- at command{gcc}@tie{}4/@command{gfortran}.  (Recent Sun machines are AMD
-Opterons or Intel Xeons (@cputype{amd64}) rather than @cputype{x86}, but
-32-bit @cputype{x86} executables are the default.)
+ at cputype{x86}) using the (zero cost) Oracle Developer
+Studio at footnote{Oracle Solaris Studio prior to 2016, and previously Sun
+Studio.} compilers: there has been some success with
+ at command{gcc}/@command{gfortran}.  (Recent Sun machines are AMD Opterons
+or Intel Xeons (@cputype{amd64}) rather than @cputype{x86}, but 32-bit
+ at cputype{x86} executables are the default.)  How these compilers
+identify at footnote{using the @option{-V} flag.} 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
+manual for @R{} 3.3.x.
 
 There have been few reports on Solaris 11, with no known extra issues.
-Solaris 9 and earlier are now so old that it is unlikely that @R{} is
-still used with them, and they will not be considered here.
 
 The Solaris versions of several of the tools needed to build @R{}
 (e.g.@: @command{make}, @command{ar} and @command{ld}) are in
 @file{/usr/ccs/bin}, so if using those tools ensure this is in your
 path.  A version of the preferred @acronym{GNU} @command{tar} is (if
-installed) in @file{/usr/sfw/bin}, as sometimes are tools like
- at command{makeinfo}.  It may be necessary to avoid the tools in
- at file{/usr/ucb}: POSIX-compliant versions of some tools can be found in
- at file{/usr/xpg4/bin} and @file{/usr/xpg6/bin}.
+installed) in @file{/usr/sfw/bin}.  It may be necessary to avoid the
+tools in @file{/usr/ucb}: POSIX-compliant versions of some tools can be
+found in @file{/usr/xpg4/bin} and @file{/usr/xpg6/bin}.
 
 A large selection of Open Source software can be installed from
- at uref{http://www.opencsw.org}, by default installed under
- at file{/opt/csw}.
+ at uref{https://www.opencsw.org}, by default installed under
+ at file{/opt/csw}.  Solaris 10 ships with @code{bzlib} version 1.0.6
+(sufficient) but @code{zlib} version 1.2.3 (too old): OpenCSW has 1.2.8.
+
+At least when compiling with Oracle compilers, Solaris uses far more
+stack space than other platforms.  This makes it desirable to build PCRE
+with the option @option{--disable-stack-for-recursion}: the OpenCSW
+distribution was at the time of writing.
+
+The Oracle compilers are unusual in not including
+ at file{/usr/local/include} in the default include search path: @R{}'s
+default @code{CPPFLAGS=-I/usr/local/include} remedies this.  If you rely
+on OpenCSW software you may need @code{CPPFLAGS=-I/opt/csw/include} (or
+both).
 
 You will need @acronym{GNU} @code{libiconv} and @code{readline}: the
 Solaris version of @code{iconv} is not sufficiently powerful.
@@ -5018,13 +5257,9 @@ packages require @acronym{GNU} @command{make} (some without good reason
 and without declaring it as @samp{SystemRequirements} in the
 @file{DESCRIPTION} file).
 
-Some people have reported that the Solaris @code{libintl} needs to be
-avoided, for example by using @option{--disable-nls} or
- at option{--with-included-gettext} or using @code{libintl} from OpenCSW.
-
 The support for the C99 @code{long double} type on Sparc hardware uses
 quad-precision arithmetic, and this is usually slow because it is done
-by software emulation.  On such systems @command{configure} option
+by software emulation.  On such systems the @command{configure} option
 @option{--disable-long-double} can be used for faster but less accurate
 computations.
 
@@ -5035,19 +5270,9 @@ option @option{--with-internal-tzcode} is recommended, and required if
 you find time-zone abbreviations being given odd values (as has been
 seen on 64-bit builds without it).
 
-When using the Oracle compilers at footnote{including @command{gcc} for
-Sparc from Oracle.} do @emph{not} specify @option{-fast}, as this
-disables @acronym{IEEE} arithmetic and @command{make check} will fail.
-
-It has been reported that some Solaris installations need
-
- at example
-INTERNET_LIBS="-lsocket -lnsl"
- at end example
-
- at noindent
-on the @command{configure} command line or in file @file{config.site};
-however, there have been many successful installs without this.
+When using the Oracle compilers do @emph{not} specify @option{-fast}, as
+this disables @acronym{IEEE} arithmetic and @command{make check} will
+fail.
 
 A little juggling of paths was needed to ensure @acronym{GNU}
 @code{libiconv} (in @file{/usr/local}) was used rather than the Solaris
@@ -5058,123 +5283,67 @@ CC="cc -xc99"
 CFLAGS="-O -xlibmieee"
 F77=f95
 FFLAGS=-O
-CXX="CC -library=stlport4"
+CXX=CC
+CXXSTD="-library=stlport4"
 CXXFLAGS=-O
-FC=f95
+FC=$F77
 FCFLAGS=$FFLAGS
-FCLIBS="-lfai -lfsu"
-R_LD_LIBRARY_PATH="/usr/local/lib:/opt/csw/gcc4/lib:/opt/csw/lib"
+FCLIBS="-lfsu -lfui"
+R_LD_LIBRARY_PATH="/opt/developerstudio12.5/lib:/usr/local/lib:/opt/csw/lib"
 @end example
 
- at noindent
-For a 64-bit target add @option{-m64} to the compiler macros
-and use something like @code{LDFLAGS=-L/usr/local/lib/sparcv9} or
- at code{LDFLAGS=-L/usr/local/lib/amd64} as appropriate.
-It will also be necessary to point @command{pkg-config} at the 64-bit
-directories, e.g.@: one of
+The Oracle compilers do not by default conform to the C99 standard
+(appendix F 8.9) on the return values of functions such as @code{log}:
+use @option{-xlibmieee} to ensure this.
 
- at example
-PKG_CONFIG_PATH=/opt/csw/lib/amd64/pkgconfig:/usr/lib/amd64/pkgconfig
-PKG_CONFIG_PATH=/opt/csw/lib/sparcv9/pkgconfig:/usr/lib/sparcv9/pkgconfig
- at end example
-
- at noindent
-and to specify a 64-bit Java VM by e.g.@:
-
- at example
-JAVA_CPPFLAGS="-I$@{JAVA_HOME@}/../include -I$@{JAVA_HOME@}/../include/solaris"
-JAVA_LD_LIBRARY_PATH=$@{JAVA_HOME@}/lib/amd64/server
-JAVA_LIBS="-L$@{JAVA_HOME@}/lib/amd64/server \
-  -R$@{JAVA_HOME@}/lib/amd64/server -ljvm"
- at end example
- at noindent
-With Solaris Studio 12.[23] on Sparc, @code{FCLIBS} needs to be
-
- at example
-FCLIBS="-lfai -lfai2 -lfsu"
- at end example
-
- at noindent
-(and possibly other Fortran libraries, but this suffices for the
-packages currently on CRAN).
-
-Currently @cputype{amd64} and @cputype{sparcv9} builds work
-out-of-the-box with Sun Studio 12u1 but not Solaris Studio 12.2 and
-12.3: @file{libRblas.so} and @file{lapack.so} are generated with code
-that causes relocation errors (which is being linked in from the Fortran
-libraries).  This means that building 64-bit @R{} as a shared library
-may be impossible with Solaris Studio >= 12.2.  For a standard build the
-trick seems to be to manually set @code{FLIBS} to avoid the troublesome
-libraries.  For example, on @cputype{amd64} set in @file{config.site}
-something like
-
- at example
-FLIBS_IN_SO="-R/opt/solarisstudio12.3/lib/amd64
-  /opt/solarisstudio12.3/lib/amd64/libfui.so
-  /opt/solarisstudio12.3/lib/amd64/libfsu.so"
- at end example
- at noindent
-For 64-bit Sparc, set in @file{config.site} something like
- at example
-FLIBS="-R/opt/solarisstudio12.3/prod/lib/sparc/64
- -lifai -lsunimath -lfai -lfai2 -lfsumai -lfprodai -lfminlai -lfmaxlai
- -lfminvai -lfmaxvai -lfui -lsunmath -lmtsk
- /opt/solarisstudio12.3/prod/lib/sparc/64/libfsu.so.1"
- at end example
-
-By default the Solaris Studio compilers do not by default conform to the C99
-standard (appendix F 8.9) on the return values of functions such as
- at code{log}: use @option{-xlibmieee} to ensure this.
+A peculiarity of the Fortran compiler is that when asked to link a
+shared object it does not link against the Fortran runtime libraries.
+In @R{} this is only used for packages with F9x code, hence the
+ at code{FCLIBS} definition (which sufficed for @acronym{CRAN} packages
+with 12.5).
+ at c -lfui is needed for quantre's use of ETIME
 
 You can target specific Sparc architectures for (slightly) higher
 performance: @option{-xtarget=native} (in @code{CFLAGS} etc) tunes the
 compilation to the current machine.
 
-Using @code{-xlibmil} in @code{CFLAGS} and @code{-xlibmil} in
+Using @code{-xlibmil} in @code{CFLAGS} or @code{-xlibmil} in
 @code{FFLAGS} allows more system mathematical functions to be inlined.
 
 
 On @cputype{x86} you will get marginally higher performance @emph{via}
 
 @example
-CFLAGS="-xO5 -xc99 -xlibmieee -xlibmil -nofstore -xtarget=native"
-FFLAGS="-O5 -libmil -nofstore -xtarget=native"
+CFLAGS="-xO5 -xlibmieee -xlibmil -nofstore -xtarget=native"
+FFLAGS="-xO5 -libmil -nofstore -xtarget=native"
 CXXFLAGS="-xO5 -xlibmil -nofstore -xtarget=native"
-SAFE_FFLAGS="-libmil -fstore -xtarget=native"
+SAFE_FFLAGS="-O -libmil -fstore -xtarget=native"
 @end example
 
 @noindent
 but the use of @code{-nofstore} can be less numerically stable, and some
-packages (notably @CRANpkg{mgcv} on @cputype{x86}) failed to compile at
-higher optimization levels with version 12.3.
+packages have in the past failed to compile at optimization
+level 5.
 
-The Solaris Studio compilers provide several implementations of the
+The Oracle compilers provide several implementations of the
 C++98 standard which select both the set of headers and a C++ runtime
 library.  These are selected by the @option{-library} flag, which as it
 is needed for both compiling and linking is best specified as part of
 the compiler.  The examples above use @samp{stlport4}, currently the
 most modern of the options: the default (but still needed to be
 specified as it is needed for linking) is @samp{Cstd}: see
- at uref{http://developers.sun.com/@/solaris/@/articles/@/cmp_stlport_libCstd.html}.
+ at uref{http://www.oracle.com/@/technetwork/@/server-storage/@/solaris/@/cmp-stlport-libcstd-142559.html}.
 Note though that most external Solaris C++ libraries will have been
 built with @samp{Cstd} and so an @R{} package using such libraries also
 needs to be.  Occasionally the option @option{-library=stlport4,Crun}
 has been needed.
 
-Several @acronym{CRAN} packages using C++ need the more liberal
-interpretation given by adding
-
- at example
-CXXFLAGS="-features=tmplrefstatic"
- at end example
-
-
 @cindex BLAS library
 @cindex LAPACK library
 
 The performance library @code{sunperf} is available for use with the
-Solaris Studio compilers.  If selected as a @acronym{BLAS}, it must also
-be selected as LAPACK @emph{via} (for Solaris Studio 12.2)
+Oracle compilers.  If selected as a @acronym{BLAS}, it must also be
+selected as LAPACK @emph{via}
 
 @example
 ./configure --with-blas='-library=sunperf' --with-lapack
@@ -5182,91 +5351,172 @@ be selected as LAPACK @emph{via} (for Solaris Studio 12.2)
 
 @noindent
 This has often given test failures in the past, in several different
-places.  At the time of writing it fails in @file{tests/reg-BLAS.R}, and on
-some builds, including for @cputype{amd64}, it fails in
- at code{example(eigen)}.
+places. at footnote{When last checked it failed in @file{tests/reg-BLAS.R},
+and on some builds, including for @cputype{amd64}, it failed in
+ at code{example(eigen)}.}
 
 Parsing very complex @R{} expressions needs a lot of stack space when
 the Oracle compilers are used: several packages require the stack
 increased to at least 20MB.
 
+Some people have reported that the Solaris @code{libintl} needs to be
+avoided, for example by using @option{--disable-nls} or
+ at option{--with-included-gettext} or using @code{libintl} from OpenCSW.
+(On the other hand, there have been many successful installs which
+automatically detected @code{libintl} from OpenCSW or selected the
+included @code{gettext}.)
 
- at menu
-* Using gcc::                   
- at end menu
+It has been reported that some Solaris installations need
+
+ at example
+INTERNET_LIBS="-lsocket -lnsl"
+ at end example
+
+ at noindent
+on the @command{configure} command line or in file @file{config.site};
+however, there have been many successful installs without this.
+
+ at node 64-bit builds, Using gcc, Solaris, Solaris
+ at subsection 64-bit builds
+
+On both @samp{x86} and @samp{Sparc} platforms the compilers default to
+32-bit code.
+
+For a 64-bit target add @option{-m64} to the compiler macros
+and use something like @code{LDFLAGS=-L/usr/local/lib/amd64} or
+ at code{LDFLAGS=-L/usr/local/lib/sparcv9} as appropriate (and other 64-bit
+library directories if used, e.g.@: @code{-L/opt/csw/lib/arm64}).
+It will also be necessary to point @command{pkg-config} at the 64-bit
+directories, e.g.@: something like one of
+
+ at example
+PKG_CONFIG_PATH=/opt/csw/lib/amd64/pkgconfig:/usr/lib/amd64/pkgconfig
+PKG_CONFIG_PATH=/opt/csw/lib/sparcv9/pkgconfig:/usr/lib/sparcv9/pkgconfig
+ at end example
+
+ at noindent
+and to specify a 64-bit Java VM by e.g.@:
+
+ at example
+JAVA_CPPFLAGS="-I$@{JAVA_HOME@}/../include -I$@{JAVA_HOME@}/../include/solaris"
+JAVA_LD_LIBRARY_PATH=$@{JAVA_HOME@}/lib/amd64/server
+JAVA_LIBS="-L$@{JAVA_HOME@}/lib/amd64/server \
+  -R$@{JAVA_HOME@}/lib/amd64/server -ljvm"
+ at end example
+
+ at noindent
+(In most cases the @file{64} directory is a link to @file{amd64} or
+ at file{sparcv9} as appropriate.)
+
+Using PCRE with JIT enabled on 64-bit Sparc led to segfaults.
+
+
+ at c Builds of @cputype{amd64} and @cputype{sparcv9} did not work with
+ at c Solaris Studio 12.3 and 12.4: @file{libRblas.so} and @file{lapack.so}
+ at c were generated with code that causes relocation errors (code which is
+ at c being linked in from the Fortran libraries).  This means that building
+ at c 64-bit @R{} as a shared library may be impossible.  For a standard build
+ at c a trick seems to be to manually set @code{FLIBS} to avoid the
+ at c troublesome libraries.  For example, on @cputype{amd64} set in
+ at c @file{config.site} something like (for 12.3):
+ at c @example
+ at c FLIBS_IN_SO="-R/opt/solarisstudio12.3/lib/amd64
+ at c   /opt/solarisstudio12.3/lib/amd64/libfui.so
+ at c   /opt/solarisstudio12.3/lib/amd64/libfsu.so"
+ at c @end example
+ at c @noindent
+ at c For 64-bit Sparc, set in @file{config.site} something like (for 12.3)
+ at c @example
+ at c FLIBS="-R/opt/solarisstudio12.3/prod/lib/sparc/64
+ at c  -lifai -lsunimath -lfai -lfai2 -lfsumai -lfprodai -lfminlai -lfmaxlai
+ at c  -lfminvai -lfmaxvai -lfui -lsunmath -lmtsk
+ at c  /opt/solarisstudio12.3/prod/lib/sparc/64/libfsu.so.1"
+ at c @end example
 
- at node Using gcc,  , Solaris, Solaris
+ at node Using gcc,  , 64-bit builds, Solaris
 @subsection Using gcc
 
 If using @command{gcc}, ensure that the compiler was compiled for the
 version of Solaris in use.  (This can be ascertained from @command{gcc
 -v}.)  @command{gcc} makes modified versions of some header files, and
 several reports of problems were due to using @command{gcc} compiled on
-one version of Solaris on a later version.  
+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 at footnote{In particular, header
+ at file{cmath} in C++11 mode includes @file{math.h} and
+ at file{iso/math_c99.h} and @command{gcc} had `fixed' an earlier version
+of the latter.}  with the modified versions included with OpenCSW's
+binary distribution.
 
 The notes here are for @command{gcc} set up to use the Solaris linker:
 it can also be set up to use GNU @command{ld}, but that has not been
-tested.
+tested.  The tests were for compilers from the OpenCSW repository:
+Solaris systems often come with much older compilers installed under
+ at file{/usr/sfw/bin}.  One of @option{-m32} or @option{-m64} will be the
+default and could be omitted, but it is not easy to find out which.
+(For OpenCSW it is @option{-m32}.)
 
-Compilation for a 32-bit Sparc target with @command{gcc}@tie{}4.9.0
-needed
+Compilation for an @cputype{x86} target with @command{gcc}@tie{}4.9.2 or
+ at command{gcc}@tie{}5.2.0 needed
 
 @example
-CPPFLAGS=-I/opt/csw/include
-LDFLAGS="-L/opt/csw/gcc4/lib -L/opt/csw/lib"
+CC="gcc -m32"
+CPPFLAGS="-I/opt/csw/include -I/usr/local/include"
+F77="gfortran -m32"
+CXX="g++ -m32"
+FC=$F77
+LDFLAGS="-L/opt/csw/lib -L/usr/local/lib"
 @end example
 
- at noindent
-and for a 64-bit Sparc target
+For an @cputype{amd64} target we used 
+
 @example
 CC="gcc -m64"
+CPPFLAGS="-I/opt/csw/include -I/usr/local/include"
 F77="gfortran -m64"
 CXX="g++ -m64"
 FC=$F77
-CPPFLAGS=-I/opt/csw/include
-LDFLAGS="-L/opt/csw/gcc4/lib/sparcv9 -L/opt/csw/lib/sparcv9"
+LDFLAGS="-L/opt/csw/lib/amd64 -L/usr/local/lib/amd64"
 @end example
 
- at noindent
-Note that paths such as @file{/opt/csw/gcc4/lib/sparcv9} may need to
-be in the
+Note that paths such as @file{/opt/csw/lib}, @file{/usr/local/lib/amd64}
+and @file{/opt/csw/lib/amd64} may need to be in the
 @enindex LD_LIBRARY_PATH
 @env{LD_LIBRARY_PATH} during configuration.
 
-The compilation can be tuned to a particular cpu: the @acronym{CRAN}
-check system uses @code{-mtune=niagara2}.
 
-Compilation for an @cputype{x86} target with @command{gcc}@tie{}4.9.0
-needed
+Compilation for a 32-bit Sparc target with @command{gcc}@tie{}4.9.2 or
+ at command{gcc}@tie{}5.2.0 needed
 
 @example
-CC="/opt/csw/gcc4/bin/gcc -m32"
+CC="gcc -m32"
 CPPFLAGS="-I/opt/csw/include -I/usr/local/include"
-F77="/opt/csw/gcc4/bin/gfortran -m32"
-CXX="/opt/csw/gcc4/bin/g++ -m32"
-FC="/opt/csw/gcc4/bin/gfortran -m32"
-LDFLAGS="-L/opt/csw/gcc4/lib -L/opt/csw/lib -L/usr/local/lib"
+F77="gfortran -m32"
+CXX="g++ -m32"
+FC=$F77
+LDFLAGS="-L/opt/csw/lib -L/usr/local/lib"
 @end example
 
 @noindent
-(@code{-L/opt/csw/lib} is needed since TeXLive was built using
-32-bit @code{gcc}, and we need @file{/opt/csw/lib} in
- at code{R_LD_LIBRARY_PATH}.)
-
-For an @cputype{amd64} target with @command{gcc}@tie{}4.9.0
-we used 
-
+and for a 64-bit Sparc target
 @example
-CC="/opt/csw/gcc4/bin/gcc -m64"
+CC="gcc -m64"
 CPPFLAGS="-I/opt/csw/include -I/usr/local/include"
-F77="/opt/csw/gcc4/bin/gfortran -m64"
-FPICFLAGS=-fPIC
-CXX="/opt/csw/gcc4/bin/g++ -m64"
+F77="gfortran -m64"
+CXX="g++ -m64"
 FC=$F77
-FCPICFLAGS=$FPICFLAGS
-LDFLAGS="-L/opt/csw/gcc4/lib/amd64 -L/opt/csw/lib/amd64"
+LDFLAGS="-L/opt/csw/lib/sparcv9 -L/usr/local/lib/sparcv9"
 @end example
 
+Note that paths such as @file{/opt/csw/lib}, @file{/usr/local/lib/sparcv9} or
+ at file{/opt/csw/lib/sparcv9} may need to be in the
+ at enindex LD_LIBRARY_PATH
+ at env{LD_LIBRARY_PATH} during configuration.
+
+The compilation can be tuned to a particular cpu: the @acronym{CRAN}
+check Sparc system uses @code{-mcpu=niagara2}.
+
+
 @node AIX, FreeBSD, Solaris, Platform notes
 @section AIX
 @cindex AIX
@@ -5309,7 +5559,7 @@ The AIX native @code{iconv} does not support encodings @samp{latin1} nor
 @samp{""} and so cannot be used.  (As far as we know @acronym{GNU}
 @code{libiconv} could be installed.)
 
-Fan Long reports success on AIX 5.3 using
+Fan Long reported success on AIX 5.3 using
 @c https://stat.ethz.ch/pipermail/r-devel/2008-August/050318.html
 
 @example
@@ -5330,14 +5580,14 @@ On one AIX 6.x system it was necessary to use @env{R_SHELL} to set the
 default shell to be Bash rather than Zsh.
 
 Kurt Hornik and Stefan Theussl at WU (Wirtschaftsuniversit@"at Wien)
-successfully built R on a @cputype{powerpc} (8- at acronym{CPU} Power6
+successfully built @R{} on a @cputype{powerpc} (8- at acronym{CPU} Power6
 system) running AIX 6.1, configuring with or without
 @option{--enable-R-shlib} (Ei-ji Nakama's support is gratefully
 acknowledged).
 
 It helps to describe the WU build environment first.  A small part of
-the software needed to build R and/or install packages is available
-directly from the AIX Installation DVDs, e.g., Java 6, X11, and Perl.
+the software needed to build @R{} and/or install packages is available
+directly from the AIX Installation DVDs, e.g., Java 6 and  X11.
 Additional open source software (OSS) is packaged for AIX in @file{.rpm}
 files and available from both IBM's ``AIX Toolbox for Linux
 Applications''
@@ -5357,8 +5607,8 @@ install the corresponding package from the ICU project
 binaries for various platforms which in case of AIX can be installed via
 unpacking the tarball to the root file system.  For full @LaTeX{}
 support one can install the @TeX{} Live DVD distribution
-(@uref{http://www.tug.org/@/texlive/}): it is recommended to update the
-distribution using the @code{tlmgr} update manager.  For 64-bit R builds
+(@uref{https://www.tug.org/@/texlive/}): it is recommended to update the
+distribution using the @code{tlmgr} update manager.  For 64-bit @R{} builds
 supporting Tcl/Tk this needs to installed from the sources as available
 pre-compiled binaries supply only 32-bit shared objects.
 
@@ -5401,7 +5651,7 @@ the decision for generating 32-bit or 64-bit code is done by setting the
 @enindex OBJECT_MODE
 @env{OBJECT_MODE} environment variable appropriately (recommended) or
 using an additional compiler flag (@option{-q32} or @option{-q64}).  By
-default the IBM XL compilers produce 32 bit code.  Thus, to build R with
+default the IBM XL compilers produce 32 bit code.  Thus, to build @R{} with
 64-bit support one needs to either export @env{OBJECT_MODE=64} in the
 environment or, alternatively, use the @option{-q64} compiler options.
 
@@ -5410,70 +5660,39 @@ shell, e.g., via setting @code{CONFIG_SHELL=/usr/bin/bash} in the
 environment, and to use @acronym{GNU} Make (e.g., via
 (@code{MAKE=/opt/freeware/bin/make}).
 
-Further installation instructions to set up a proper R development
+Further installation instructions to set up a proper @R{} development
 environment can be found in the ``R on AIX'' project on R-Forge
-(@uref{http://R-Forge.R-project.org/@/projects/@/aix/}).
+(@uref{https://R-Forge.R-project.org/@/projects/@/aix/}).
 
- at node FreeBSD, Cygwin, AIX, Platform notes
+ at node FreeBSD, OpenBSD, AIX, Platform notes
 @section FreeBSD
 @cindex FreeBSD
 
-There have been no reports for @R{} 3.0.0 or later.
-
- at node Cygwin, New platforms, FreeBSD, Platform notes
- at section Cygwin
-
-The Cygwin emulation layer on Windows can be treated as a Unix-alike OS.
-This is unsupported, but experiments have been conducted and a few
-workarounds added.  Cygwin has not been tested for @R{} 3.0.0 or later.
-
-The 64-bit version is completely unsupported.  The 32-bit version has
-never worked well enough to pass @R{}'s @command{make check}.
-
- at R{} requires C99 complex type support, which is available as from
-Cygwin 1.7.8 (March 2011).  However, the (then) implementation of
- at code{cacos} gives incorrect results, so we undefine @code{HAVE_CACOS}
-in @file{src/main/complex.c} on that platform.  It has been reported
-that some C99 long double mathematical functions are missing, so
-configuring with @option{--disable-long-double} was required.
-
-Only building as a shared library can possibly work, at footnote{Windows
-DLLs need to have all links resolved at build time and so cannot resolve
-against @file{R.bin}.} so use e.g.@:
+There have been few recent reports on FreeBSD: there is a `port' at
+ at uref{https://www.freebsd.org/@/ports/@/math.html}.
 
- at example
-./configure --disable-nls --enable-R-shlib FLIBS=-lgfortran
-make
- at end example
+Use of ICU for collation and the @command{configure} option
+ at option{--with-internal-tzcode} are desirable workarounds.
 
- at noindent
-Enabling NLS does work if required, although adding
- at option{--with-included-gettext} is preferable.  You will see many
-warnings about the use of auto-import.  Setting @samp{FLIBS} explicitly
-seems needed currently as the auto-detection gives an incorrect value.
-
-You will need the @pkg{tetex-extra} Cygwin package to build
- at file{NEWS.pdf} and the vignettes.
+ at node OpenBSD, Cygwin, FreeBSD, Platform notes
+ at section OpenBSD
+ at cindex OpenBSD
 
-Note that this gives you a command-line application using @code{readline}
-for command editing.  The @samp{X11} graphics device will work if a
-suitable X server is running, and the standard Unix-alike ways of
-installing source packages work.  There was a bug in the
- at file{/usr/lib/tkConfig.sh} script in the version we looked at, which
-needs to have
+Ingo Feinerer installed @R{} version 3.2.2 on OpenBSD 5.8 arch
+ at cputype{amd64} (their name for @cputype{x86_64}).  Details of the build
+(and patches applied) are at
+ at uref{http://cvsweb.openbsd.org/@/cgi-bin/@/cvsweb/@/ports/@/math/@/R/}. (Downgrading
+the @code{zlib} requirement to 1.2.3 is against the advice of the @R{}
+developers.)
 
- at example
-TK_LIB_SPEC='-ltk84'
- at end example
-
-The overhead of using shell scripts makes this noticeably slower than a
-native build of @R{} on Windows.
+ at node Cygwin, New platforms, OpenBSD, Platform notes
+ at section Cygwin
 
-Even when @R{} could be built, not all the tests passed: there were
-incorrect results from wide-character regular expressions code and from
-sourcing CR-delimited files.
+The 32-bit version has never worked well enough to pass @R{}'s
+ at command{make check}, and residual support from earlier experiments was
+removed in @R{} 3.3.0.
 
-Do not use Cygwin's BLAS library: it is known to give incorrect results.
+The 64-bit version is completely unsupported.
 
 @node New platforms,  , Cygwin, Platform notes
 @section New platforms
@@ -5497,8 +5716,8 @@ directory.
 
 Beware of using high levels of optimization, at least initially.  On
 many compilers these reduce the degree of compliance to the
- at acronym{IEEE} model.  For example, using @option{-fast} on the Solaris
-Studio compilers has caused @R{}'s @code{NaN} to be set incorrectly, and
+ at acronym{IEEE} model.  For example, using @option{-fast} on the Oracle
+compilers has caused @R{}'s @code{NaN} to be set incorrectly, and
 @command{gcc}'s @option{-ffast-math} and @command{clang}'s
 @option{-Ofast} have given incorrect results.
 
@@ -5542,7 +5761,7 @@ have had a fair amount of practice at porting @R{} to new platforms
 
 If you want to build @R{} or add-on packages from source in Windows, you
 will need to collect, install and test an extensive set of tools.  See
- at uref{http://CRAN.R-project.org/@/bin/@/windows/@/Rtools/} for the current
+ at uref{https://CRAN.R-project.org/@/bin/@/windows/@/Rtools/} for the current
 locations and other updates to these instructions.  (Most Windows users
 will not need to build add-on packages from source; see @ref{Add-on
 packages} for details.)
@@ -5560,10 +5779,10 @@ here as a result of bitter experience.  Please do not report problems to
 the @R{} mailing lists unless you have followed all the prescriptions.}
 
 We have collected most of the necessary tools (unfortunately not all,
-due to license or size limitations) into an executable installer
-named at footnote{for @R{} 3.0.0 and later.}  @file{Rtools31.exe},
-available from @uref{http://CRAN.R-project.org/@/bin/@/windows/@/Rtools/}. You
-should download and run it, choosing the default ``Package authoring
+due to license or size limitations) into an executable installer named
+ at file{Rtools*.exe}, available from
+ at uref{https://CRAN.R-project.org/@/bin/@/windows/@/Rtools/}. You should
+download and run it, choosing the default ``Package authoring
 installation'' to build add-on packages, or the ``full installation'' if
 you intend to build @R{}.
 
@@ -5576,8 +5795,7 @@ The command line tools (in @file{Rtools*.exe})
 The MinGW-w64 32/64-bit toolchain to compile C, Fortran and C++.
 @end itemize
 For installing simple source packages containing data or @R{} source but
-no compiled code, none of these are needed.  Perl is no longer needed to
-build @R{} nor to install nor develop source packages.
+no compiled code, none of these are needed.
 
 A complete build of @R{} including PDF manuals, and producing the
 installer will also need the following:
@@ -5604,8 +5822,8 @@ use filepaths containing spaces: you can always use the short forms
 For example for a 32-bit build, all on one line,
 
 @example
-PATH=c:\Rtools\bin;c:\Rtools\gcc-4.6.3\bin;c:\MiKTeX\miktex\bin;
-     c:\R\R-3.1\bin\i386;c:\windows;c:\windows\system32
+PATH=c:\Rtools\bin;c:\MiKTeX\miktex\bin;
+     c:\R\R-3.2\bin\i386;c:\windows;c:\windows\system32
 @end example
 
 @noindent
@@ -5638,10 +5856,10 @@ The @samp{MiKTeX} (@uref{http://www.miktex.org/}) distribution of
 @LaTeX{} includes a suitable port of @code{pdftex}.  This can be set up
 to install extra packages `on the fly', which is the simplest way to use
 it (and the default).  The `basic' version of @samp{MiKTeX} almost
-suffices: when last tested packages
+suffices: when last checked packages
 
 @example
-epsf fancyvrb inconsolata listings mptopdf natbib url
+epsf inconsolata mptopdf url
 @end example
 
 @noindent
@@ -5653,8 +5871,8 @@ Manager.
 The @file{Rtools*.exe} installer does @emph{not} include any version of
 @LaTeX{}.
 
-It is also possible to use the TeXLive distribution from
- at uref{http://www.tug.org/texlive/}.
+It is also possible to use the TeX Live distribution from
+ at uref{https://www.tug.org/texlive/}.
 
 @enindex R_RD4PDF
 Please read @ref{Making the manuals} about how to make @file{fullrefman.pdf}
@@ -5709,7 +5927,7 @@ of at least @code{basename}, @code{cat}, @code{cmp}, @code{comm},
 @code{mkdir}, @code{mv}, @code{rm}, @code{rsync}, @code{sed}, @code{sh},
 @code{sort}, @code{tar}, @code{texindex}, @code{touch} and @code{uniq};
 we use those from the Cygwin distribution
-(@uref{http://www.cygwin.com/}) or compiled from the sources.  You will
+(@uref{https://www.cygwin.com/}) or compiled from the sources.  You will
 also need @code{zip} and @code{unzip} from the Info-ZIP project
 (@uref{http://www.info-zip.org/}).  All of these tools are in
 @file{Rtools*.exe}.
@@ -5737,19 +5955,14 @@ Windows-style paths.
 Technically you need more than just a compiler so the set of tools is
 referred to as a `toolchain'.
 
-The preferred toolchain since @R{} 2.14.2 is part of
- at code{Rtools30.exe}: this uses a beta version of @command{gcc 4.6.3}
-and version 2.0.1 of the MinGW-w64 project's runtime.
-
-This toolchain uses @emph{multilib}: that is there is a single front-end
-such as @command{gcc.exe} for each of the compilers and 32-bit (the
-default) and 64-bit compilation are selected by the flags at footnote{these
-flags apply to the compilers: some of the tools use different flags.
-32-bit builds are the default.}  @option{-m32} and @option{-m64}
-respectively.  The tools are all 32-bit Windows executables and should
-be able to run on any current version of Windows---however you do need a
-64-bit version of Windows to build 64-bit @R{} as the build process runs
- at R{}.
+The preferred toolchain is part of @code{Rtools*.exe}: this uses a 
+version of @command{gcc 4.9.3} and version rt_v3 of the MinGW-w64
+project's runtime.
+
+This toolchain does not use @emph{multilib}: separate front-ends are
+used for 32-bit and 64-bit compilation.  These compilers need to be
+specified in @code{BINPREF} and @code{BINPREF64} make variables as 
+described previously at the end of @ref{Windows packages}.
 
 To select a 32-bit or 64-bit build of @R{}, set the options in
 @file{MkRules.local} appropriately (following the comments in the file).
@@ -5757,7 +5970,7 @@ To select a 32-bit or 64-bit build of @R{}, set the options in
 Some external software libraries will need to be re-compiled under the
 new toolchain: especially those providing a C++ interface.  Many of
 those used by @acronym{CRAN} packages are available from
- at uref{http://www.stats.ox.ac.uk/@/pub/@/Rtools/@/multilib/}.  Users
+ at uref{https://www.stats.ox.ac.uk/@/pub/@/Rtools/@/multilib/}.  Users
 developing packages with @CRANpkg{Rcpp} need to ensure that they use a
 version built with exactly the same toolchain as their package: the
 recommendation is to build @CRANpkg{Rcpp} from its sources yourself.
@@ -5776,11 +5989,11 @@ binaries of @code{qpdf} are available from
 to the @code{qpdf} installation in file @file{MkRules.local}.
 
 Developers of packages will find some of the `goodies' at
- at uref{http://www.stats.ox.ac.uk/@/pub/@/Rtools/@/goodies} useful.  
+ at uref{https://www.stats.ox.ac.uk/@/pub/@/Rtools/@/goodies} useful.  
 
 There is a version of the @command{file} command that identifies the
 type of files, and is used by @command{Rcmd check} if available.  The
-binary distribution is included in @file{Rtools30.exe}.
+binary distribution is included in @file{Rtools*.exe}.
 
 The file @file{xzutils.zip} contains the program @command{xz} which can
 be used to (de)compress files with that form of compression.
diff --git a/doc/manual/R-data.texi b/doc/manual/R-data.texi
index 35c1ae9..cdba3d1 100644
--- a/doc/manual/R-data.texi
+++ b/doc/manual/R-data.texi
@@ -82,13 +82,11 @@ principal authors of the packages mentioned are
 
 @quotation
 @multitable {foreign  xxxx} {A longggggggggggggggggggggggggggggggggg description}
- at item @pkg{CORBA} @tab Duncan Temple Lang
 @item @CRANpkg{DBI} @tab David A. James
 @item @CRANpkg{dataframes2xls} @tab Guido van Steen
 @item @CRANpkg{foreign} @tab Thomas Lumley, Saikat DebRoy, Douglas Bates, Duncan Murdoch and Roger Bivand
 @item @CRANpkg{gdata} @tab Gregory R. Warnes
- at item @CRANpkg{hdf5} @tab Marcus Daniels
- at item @CRANpkg{ncdf}, @CRANpkg{ncdf4} @tab David Pierce
+ at item @CRANpkg{ncdf4} @tab David Pierce
 @item @CRANpkg{rJava} @tab Simon Urbanek
 @item @CRANpkg{RJDBC} @tab Simon Urbanek
 @item @CRANpkg{RMySQL} @tab David James and Saikat DebRoy
@@ -102,7 +100,6 @@ principal authors of the packages mentioned are
 @item @pkg{SJava} @tab John Chambers and Duncan Temple Lang
 @item @CRANpkg{WriteXLS} @tab Marc Schwartz
 @item @CRANpkg{XLConnect} @tab Mirai Solutions GmbH
- at item @CRANpkg{xlsReadWrite} @tab Hans-Peter Suter
 @item @CRANpkg{XML} @tab Duncan Temple Lang
 @end multitable
 @end quotation
@@ -139,13 +136,13 @@ here.
 There are packages to allow functionality developed in languages such as
 @code{Java}, @code{perl} and @code{python} to be directly integrated
 with @R{} code, making the use of facilities in these languages even
-more appropriate.  (See the @CRANpkg{rJava} package from @acronym{CRAN} and
-the @pkg{SJava}, @pkg{RSPerl} and @pkg{RSPython} packages from the
-Omegahat project, @uref{http://www.omegahat.org}.)
+more appropriate.  (See the @CRANpkg{rJava} package from @acronym{CRAN}
+and the @pkg{SJava}, @pkg{RSPerl} and @pkg{RSPython} packages from the
+Omegahat project, @uref{http://www.omegahat.net}.)
 
 
 @cindex Unix tools
- at cindex AWK
+ at cindex awk
 @cindex perl
 It is also worth remembering that @R{} like @Sl{} comes from the Unix
 tradition of small re-usable tools, and it can be rewarding to use tools
@@ -155,6 +152,10 @@ after export.  The case study in Becker, Chambers & Wilks (1988, Chapter
 manipulate the data before input to @Sl{}. The traditional Unix tools
 are now much more widely available, including for Windows.
 
+This manual was first written in 2000, and the number of scope of @R{}
+packages has increased a hundredfold since.  For specialist data formats
+it is worth searching to see if a suitable package already exists.
+
 @menu
 * Imports::                     
 * Export to text files::        
@@ -165,10 +166,6 @@ are now much more widely available, including for Windows.
 @section Imports
 @findex scan
 
- at menu
-* Encodings::                   
- at end menu
-
 The easiest form of data to import into @R{} is a simple text file, and
 this will often be acceptable for problems of small or medium scale.
 The primary function to import from a text file is @code{scan}, and this
@@ -185,10 +182,11 @@ on their computers for that purpose).  However, this is not always
 possible, and @ref{Importing from other statistical systems} discusses
 what facilities are available to access such files directly from @R{}.
 For Excel spreadsheets, the available methods are summarized in
- at ref{Reading Excel spreadsheets}.  For ODS spreadsheets from Open
-Office, see the Omegahat package at footnote{Currently not available from
-that repository but as a source package for download from
- at url{http://www.omegahat.org/ROpenOffice/}.} @pkg{ROpenOffice}.
+ at ref{Reading Excel spreadsheets}.  
+ at c For ODS spreadsheets from Open
+ at c Office, see the Omegahat package at footnote{Currently not available from
+ at c that repository but as a source package for download from
+ at c @url{http://www.omegahat.net/ROpenOffice/}.} @pkg{ROpenOffice}.
 
 In a few cases, data have been stored in a binary form for compactness
 and speed of access.  One application of this that we have seen several
@@ -203,6 +201,10 @@ extraction operation can be done directly from an @R{} package:
 @xref{Relational databases}.  Importing data via network connections is
 discussed in @ref{Network interfaces}.
 
+ at menu
+* Encodings::                   
+ at end menu
+
 @node Encodings,  , Imports, Imports
 @subsection Encodings
 @cindex Encodings
@@ -223,11 +225,11 @@ intro.dat: UTF-8 Unicode (with BOM) text
 @end example
 
 @noindent
-Modern Unix-alike systems, including OS X, are likely to produce
+Modern Unix-alike systems, including macOS, are likely to produce
 UTF-8 files.  Windows may produce what it calls `Unicode' files
 (@code{UCS-2LE} or just possibly @code{UTF-16LE}@footnote{the
 distinction is subtle,
- at uref{http://en.wikipedia.org/@/wiki/@/UTF-16/UCS-2}, and the use of
+ at uref{https://en.wikipedia.org/@/wiki/@/UTF-16/UCS-2}, and the use of
 surrogate pairs is very rare.}).  Otherwise most files will be in a
 8-bit encoding unless from a Chinese/Japanese/Korean locale (which have
 a wide range of encodings in common use).  It is not possible to
@@ -237,7 +239,7 @@ example above), so you may simply have to ask the originator for some
 clues (e.g.@: `Russian on Windows').
 
 `BOMs' (Byte Order Marks,
- at uref{http://en.wikipedia.org/wiki/Byte_order_mark}) cause problems for
+ at uref{https://en.wikipedia.org/wiki/Byte_order_mark}) cause problems for
 Unicode files.  In the Unix world BOMs are rarely used, whereas in the
 Windows world they almost always are for UCS-2/UTF-16 files, and often
 are for UTF-8 files.  The @command{file} utility will not even recognize
@@ -257,9 +259,9 @@ called `Mac Roman' encoding.
 
 Exporting results from @R{} is usually a less contentious task, but
 there are still a number of pitfalls.  There will be a target
-application in mind, and normally a text file will be the most
-convenient interchange vehicle.  (If a binary file is required, see
- at ref{Binary files}.)
+application in mind, and often a text file will be the most convenient
+interchange vehicle.  (If a binary file is required, see @ref{Binary
+files}.)
 
 @findex cat
 Function @code{cat} underlies the functions for exporting data.  It
@@ -323,7 +325,7 @@ locales the comma is used as the decimal point (set this in
 semicolon as the field separator: use @code{write.csv2} for appropriate
 defaults.  There is an IETF standard for CSV files (which mandates
 commas and CRLF line endings, for which use @code{eol = "\r\n"}), RFC4180
-(see @uref{http://tools.ietf.org/html/rfc4180}), but what is more
+(see @uref{https://tools.ietf.org/html/rfc4180}), but what is more
 important in practice is that the file is readable by the application it
 is targeted at.
 
@@ -341,9 +343,10 @@ changed by argument @code{na}.  Note that @code{NaN}s are treated as
 @cindex Quoting strings
 
 By default strings are quoted (including the row and column names).
-Argument @code{quote} controls if  character and factor variables are
-quoted: some programs, for example @pkg{Mondrian}, do not accept quoted
-strings (which are the default).
+Argument @code{quote} controls if character and factor variables are
+quoted: some programs, for example @pkg{Mondrian}
+(@uref{https://en.wikipedia.org/wiki/Mondrian_(software)}), do not accept
+quoted strings.
 
 Some care is needed if the strings contain embedded quotes.  Three
 useful forms are
@@ -380,9 +383,9 @@ Windows applications may expect a Byte Order Mark which the
 implementation of @code{iconv} used by @R{} may or may not add depending
 on the platform.}, that is @code{"UTF-16LE"}.  Using UTF-8 is a good way
 to make portable files that will not easily be confused with any other
-encoding, but even OS X applications (where UTF-8 is the system
+encoding, but even macOS applications (where UTF-8 is the system
 encoding) may not recognize them, and Windows applications are most
-unlikely to.  Apparently Excel:mac 2004/8 expects @code{.csv} files in
+unlikely to.  Apparently Excel:mac 2004/8 expected @code{.csv} files in
 @code{"macroman"} encoding (the encoding used in much earlier versions
 of Mac OS).
 
@@ -436,16 +439,18 @@ graphical displays, mathematics and so on.
 although it does not require it.
 
 The @CRANpkg{XML} package provides general facilities for reading and
-writing @acronym{XML} documents within @R{}.  A description of the
-facilities of the @CRANpkg{XML} package is outside the scope of this
-document: see the package's Web page at
- at uref{http://www.omegahat.org/RSXML} for details and examples.  Package
- at CRANpkg{StatDataML} on @acronym{CRAN} is one example building on
- at CRANpkg{XML}.
-
-NB: @CRANpkg{XML} is available as a binary package for Windows, normally
-from the `CRAN extras' repository (which is selected by default on
-Windows).
+writing @acronym{XML} documents within @R{}. 
+ at c A description of the facilities of the @CRANpkg{XML} package is outside
+ at c the scope of this document: see the package's Web page at
+ at c @uref{http://www.omegahat.net/RSXML} for details and examples.
+Package @CRANpkg{StatDataML} on @acronym{CRAN} is one example building
+on @CRANpkg{XML}.  Another interface to the @pkg{libxml2} C library is
+provided by package @CRANpkg{xml2}.
+
+ at cindex yaml
+ at acronym{yaml} is another system for structuring text data, with
+emphasis on human-readability: it is supported by package
+ at CRANpkg{yaml}.
 
 @node Spreadsheet-like data, Importing from other statistical systems, Introduction, Top
 @chapter Spreadsheet-like data
@@ -668,9 +673,9 @@ read.table("intro.dat", fileEncoding = "UTF-8-BOM")
 @noindent
 (This would most likely work without specifying an encoding in a UTF-8 locale.)
 
-Another problem with this (real-life) example is that whereas
- at command{file-5.03} reported the BOM, @command{file-4.17} found on OS
-10.5 (Leopard) did not.
+ at c Another problem with this (real-life) example is that whereas
+ at c @command{file-5.03} reported the BOM, @command{file-4.17} found on OS
+ at c 10.5 (Leopard) did not.
 @end enumerate
 
 @findex read.csv
@@ -1075,11 +1080,10 @@ to handle these.
 @findex read.dta
 @findex write.dta
 Stata @file{.dta} files are a binary file format. Files from versions 5
-up to 11 of Stata can be read and written by functions @code{read.dta}
+up to 12 of Stata can be read and written by functions @code{read.dta}
 and @code{write.dta}.  Stata variables with value labels are optionally
-converted to (and from) @R{} factors.  Stata version 12 by default
-writes `format-115 datasets': @code{read.dta} currently may not be able
-to read those.
+converted to (and from) @R{} factors. For  Stata versions 13 and later
+see @acronym{CRAN} packages @CRANpkg{readstata13} and @CRANpkg{haven}.
 
 
 @cindex Systat
@@ -1165,19 +1169,19 @@ from a database for separate analysis.
 
 Increasingly OSes are themselves making use of DBMSs for these reasons,
 so it is nowadays likely that one will be already installed on your
-(non-Windows) OS.  @uref{http://en.wikipedia.org/wiki/Akonadi, Akonadi}
-is used by KDE4 to store personal information.  Several OS X
+(non-Windows) OS.  @uref{https://en.wikipedia.org/wiki/Akonadi, Akonadi}
+is used by KDE4 to store personal information.  Several macOS
 applications, including Mail and Address Book, use SQLite.
- at c http://www.actualtechnologies.com/sqlite_applications.php
+ at c https://www.actualtech.com/sqlite_applications.php
 
 @node Overview of RDBMSs, R interface packages, Why use a database?, Relational databases
 @section Overview of RDBMSs
 
 Traditionally there had been large (and expensive) commercial RDBMSs
-(@uref{http://www.informix.com, Informix}; @uref{http://www.oracle.com,
+(@uref{http://www.informix.com, Informix}; @uref{https://www.oracle.com,
 Oracle}; @uref{http://www.sybase.com, Sybase};
 @uref{http://www.ibm.com/db2, IBM's DB2};
- at uref{http://www.microsoft.com/SQL/default.mspx, Microsoft @acronym{SQL}
+ at uref{https://www.microsoft.com/SQL/default.mspx, Microsoft @acronym{SQL}
 Server} on Windows) and academic and small-system databases (such as
 MySQL at footnote{and forks, notably MariaDB.}, PostgreSQL, Microsoft
 Access, @dots{}), the former marked out by much greater emphasis on data
@@ -1191,8 +1195,8 @@ There are other commonly used data sources, including spreadsheets,
 non-relational databases and even text files (possibly compressed).
 Open Database Connectivity (@acronym{ODBC}) is a standard to use all of
 these data sources.  It originated on Windows (see
- at uref{http://www.microsoft.com/data/odbc/}) but is also implemented on
-Linux/Unix/OS X.
+ at uref{https://msdn.microsoft.com/@/en-us/@/library/@/ms710252%28v=vs.85%29.aspx})
+but is also implemented on Linux/Unix/macOS.
 
 All of the packages described later in this chapter provide clients to
 client/server databases.  The database can reside on the same machine or
@@ -1331,25 +1335,25 @@ data frame or in pieces (usually as groups of rows).
 
 All except @CRANpkg{RODBC} are tied to one DBMS, but there has been a
 proposal for a unified `front-end' package @CRANpkg{DBI}
-(@uref{http://developer.r-project.org/db}) in conjunction with a
+(@uref{https://developer.r-project.org/db}) in conjunction with a
 `back-end', the most developed of which is @CRANpkg{RMySQL}.  Also on
- at acronym{CRAN} are the back-ends @CRANpkg{ROracle}, @CRANpkg{RPostgreSQL} and
- at CRANpkg{RSQLite} (which works with the bundled DBMS @code{SQLite},
- at uref{http://www.sqlite.org}),  @CRANpkg{RJDBC} (which uses Java and can
-connect to any DBMS that has a JDBC driver) and @CRANpkg{RpgSQL} (a
-specialist interface to PostgreSQL built on top of @CRANpkg{RJBDC}).
+ at acronym{CRAN} are the back-ends @CRANpkg{ROracle},
+ at CRANpkg{RPostgreSQL} and @CRANpkg{RSQLite} (which works with the
+bundled DBMS @code{SQLite}, @uref{https://www.sqlite.org}) and
+ at CRANpkg{RJDBC} (which uses Java and can connect to any DBMS that has a
+JDBC driver).
 
-The BioConductor project has updated @pkg{RdbiPgSQL} (formerly on
- at acronym{CRAN} ca 2000), a first-generation interface to PostgreSQL.
+ at c The BioConductor project has updated @pkg{RdbiPgSQL} (formerly on
+ at c @acronym{CRAN} ca 2000), a first-generation interface to PostgreSQL.
 
 @pkg{PL/R} (@uref{http://www.joeconway.com/plr/,
 @code{http://@/www.joeconway.com/@/plr/}}) is a project to embed R into
 PostgreSQL.
 
 Package @CRANpkg{RMongo} provides an @R{} interface to a Java client for
-`MongoDB' (@uref{http://en.wikipedia.org/wiki/MongoDB}) databases, which
-are queried using JavaScript rather than SQL.  Package @CRANpkg{rmongodb} is
-another client using @pkg{mongodb}'s C driver.
+`MongoDB' (@uref{https://en.wikipedia.org/wiki/MongoDB}) databases,
+which are queried using JavaScript rather than SQL.  Package
+ at CRANpkg{mongolite} is another client using @pkg{mongodb}'s C driver.
 
 
 @menu
@@ -1363,13 +1367,14 @@ another client using @pkg{mongodb}'s C driver.
 @cindex MySQL database system
 
 Package @CRANpkg{RMySQL} on @acronym{CRAN} provides an interface to the
-MySQL database system (see @uref{http://www.mysql.com} and Dubois,
-2000).  The description here applies to version @code{0.5-0}: earlier
+MySQL database system (see @uref{https://www.mysql.com} and Dubois,
+2000) or its fork MariaDB (see @uref{https://mariadb.org/}).  The
+description here applies to versions @code{0.5-0} and later: earlier
 versions had a substantially different interface.  The current version
 requires the @CRANpkg{DBI} package, and this description will apply with
 minor changes to all the other back-ends to @CRANpkg{DBI}.
 
-MySQL exists on Unix/Linux/OS X and Windows: there is a `Community
+MySQL exists on Unix/Linux/macOS and Windows: there is a `Community
 Edition' released under GPL but commercial licenses are also available.
 MySQL was originally a `light and lean' database.  (It preserves the
 case of names where the operating file system is case-sensitive, so not
@@ -1456,7 +1461,7 @@ Arkansas          8.8     190       50 19.5
 Package @CRANpkg{RODBC} on @acronym{CRAN} provides an interface to
 database sources supporting an @acronym{ODBC} interface.  This is very
 widely available, and allows the same @R{} code to access different
-database systems.  @CRANpkg{RODBC} runs on Unix/Linux, Windows and OS X,
+database systems.  @CRANpkg{RODBC} runs on Unix/Linux, Windows and macOS,
 and almost all database systems provide support for @acronym{ODBC}.  We
 have tested Microsoft SQL Server, Access, MySQL, PostgreSQL, Oracle and
 IBM DB2 on Windows and MySQL, MariaDB, Oracle, PostgreSQL and SQLite on
@@ -1468,27 +1473,27 @@ running on a Unix server from a Windows client, and @emph{vice versa}.
 On Windows ODBC support is part of the OS.  On Unix/Linux you will need
 an @acronym{ODBC} Driver Manager such as unixODBC
 (@uref{http://www.unixODBC.org}) or iOBDC (@uref{http://www.iODBC.org}:
-this is pre-installed in OS X) and an installed driver for your
+this is pre-installed in macOS) and an installed driver for your
 database system.
 
 @cindex Excel
- at findex .xls
 @cindex Dbase
 @findex .dbf
 Windows provides drivers not just for DBMSs but also for Excel
 (@file{.xls}) spreadsheets, DBase (@file{.dbf}) files and even text
 files.  (The named applications do @emph{not} need to be
-installed. Which file formats are supported depends on the the versions
-of the drivers.)  There are versions for Excel and Access 2007/2010 (go
-to @uref{http://download.microsoft.com}, and search for `Office ODBC',
-which will lead to @file{AccessDatabaseEngine.exe}), the `2007 Office
-System Driver' (the latter has a version for 64-bit Windows, and that
-will also read earlier versions).
-
-On OS X the Actual Technologies
-(@url{http://www.actualtechnologies.com/product_access.php}) drivers
-provide ODBC interfaces to Access databases (including Access 2007/2010)
-and to Excel spreadsheets (not including Excel 2007/2010).
+installed. Which file formats are supported depends on the versions of
+the drivers.)  There are versions for Excel and Access 2007/2010 (go to
+ at uref{https://www.microsoft.com/@/en-us/@/download/@/default.aspx}, and
+search for `Office ODBC', which will lead to
+ at file{AccessDatabaseEngine.exe}), the `2007 Office System Driver' (the
+latter has a version for 64-bit Windows, and that will also read earlier
+versions).
+
+On macOS the Actual Technologies
+(@url{https://www.actualtech.com/product_access.php}) drivers provide
+ODBC interfaces to Access databases and to Excel spreadsheets (not
+including Excel 2007/2010).
 
 @findex odbcConnect
 @findex odbcDriverConnect
@@ -1745,12 +1750,12 @@ handle binary files.
 @findex netCDF
 @cindex network Common Data Form
 
-Packages @CRANpkg{hdf5}, @CRANpkg{h5r}, Bioconductor's @pkg{rhdf5},
- at CRANpkg{RNetCDF}, @CRANpkg{ncdf} and @CRANpkg{ncdf4} on @acronym{CRAN} provide
-interfaces to @acronym{NASA}'s HDF5 (Hierarchical Data Format, see
- at uref{http://hdf.ncsa.uiuc.edu/HDF5/}) and to UCAR's netCDF data files
+Packages @CRANpkg{h5}, Bioconductor's @pkg{rhdf5}, @CRANpkg{RNetCDF} and
+ at CRANpkg{ncdf4} on @acronym{CRAN} provide interfaces to @acronym{NASA}'s
+HDF5 (Hierarchical Data Format, see
+ at uref{https://www.hdfgroup.org/HDF5/}) and to UCAR's netCDF data files
 (network Common Data Form, see
- at uref{http://www.unidata.ucar.edu/packages/netcdf/}).
+ at uref{http://www.unidata.ucar.edu/software/netcdf/}).
 
 Both of these are systems to store scientific data in array-oriented
 ways, including descriptions, labels, formats, units, @dots{}.  HDF5 also
@@ -1760,8 +1765,8 @@ matrices.
 
 NetCDF's version 4 format (confusingly, implemented in netCDF 4.1.1 and
 later, but not in 4.0.1) includes the use of various HDF5 formats.  This
-is handled by package @CRANpkg{ncdf4} whereas @CRANpkg{RNetCDF} and
- at CRANpkg{ncdf} handle version 3 files.
+is handled by package @CRANpkg{ncdf4} whereas @CRANpkg{RNetCDF} handles
+version 3 files.
 
 The availability of software to support these formats is somewhat
 limited by platform, especially on Windows.
@@ -1780,7 +1785,10 @@ equivalents Visual dBase, Visual Objects and Visual FoxPro (see
 a header and then a series of fields and so is most similar to an @R{}
 data frame.  The data itself is stored in text format, and can include
 character, logical and numeric fields, and other types in later versions
-(see @uref{http://clicketyclick.dk/docs/data_types.html}).
+(see for example
+ at uref{http://www.digitalpreservation.gov/formats/fdd/fdd000325.shtml}
+and
+ at uref{http://www.clicketyclick.dk/databases/xbase/format/index.html}).
 
 @findex read.dbf
 @findex write.dbf
@@ -1817,8 +1825,8 @@ formats after which they are named.  See also packages @CRANpkg{biOps}
 and @CRANpkg{Momocs}, and Bioconductor package @pkg{EBImage}.
 
 TIFF is more a meta-format, a wrapper within which a very large variety
-of image formats can be embedded.  Packages @CRANpkg{rtiff} (orphaned)
-and @CRANpkg{tiff} can read some of the sub-formats (depending on the
+of image formats can be embedded.  Packages @CRANpkg{rtiff} and
+ at CRANpkg{tiff} can read some of the sub-formats (depending on the
 external @code{libtiff} software against which they are compiled).
 There some facilities for specialized sub-formats, for example in
 Bioconductor package @pkg{beadarray}.
@@ -1829,7 +1837,7 @@ facilities of its own to read raster files and links to many others.
 Which formats it supports is determined when GDAL is compiled: use
 @code{gdalDrivers()} to see what these are for the build you are using.
 It can be useful for uncommon formats such as JPEG 2000 (which is a
-different format from JPEG, and not currently supported in the OS X
+different format from JPEG, and not currently supported in the macOS
 nor Windows binary versions of @CRANpkg{rgdal}).
 
 
@@ -1928,10 +1936,10 @@ available for @R{} input from that connection.
 
 @cindex URL connections
 @findex url
- at acronym{URL}s of types @samp{http://}, @samp{ftp://} and @samp{file://}
-can be read from using the function @code{url}.  For convenience,
- at code{file} will also accept these as the file specification and call
- at code{url}.
+ at acronym{URL}s of types @samp{http://}, @samp{https://}, @samp{ftp://}
+and @samp{file://} can be read from using the function @code{url}.  For
+convenience, @code{file} will also accept these as the file
+specification and call @code{url}.
 
 @cindex Sockets
 @findex socketConnection
@@ -2031,9 +2039,9 @@ scan(pipe("sed -e s/,$// data"), sep=",")
 @end example
 
 @cindex URL connections
-For convenience, if the @code{file} argument specifies a FTP or HTTP
- at acronym{URL}, the @acronym{URL} is opened for reading via @code{url}.
-Specifying files via @samp{file://foo.bar} is also allowed.
+For convenience, if the @code{file} argument specifies a FTP, HTTP or
+HTTPS @acronym{URL}, the @acronym{URL} is opened for reading via
+ at code{url}.  Specifying files via @samp{file://foo.bar} is also allowed.
 
 @menu
 * Pushback::                    
@@ -2205,7 +2213,6 @@ by re-assigning them once read).
 @menu
 * Reading from sockets::        
 * Using download.file::         
-* CORBA interface::             
 @end menu
 
 Some limited facilities are available to exchange data at a lower level
@@ -2231,57 +2238,23 @@ The earlier low-level interface is given by functions @code{make.socket},
 @code{read.socket}, @code{write.socket} and @code{close.socket}.
 
 
- at node Using download.file, CORBA interface, Reading from sockets, Network interfaces
+ at node Using download.file,  , Reading from sockets, Network interfaces
 @section Using @code{download.file}
 
-Function @code{download.file} is provided to read a file from a
-Web resource via FTP or HTTP and write it to a file.  Often this can be
-avoided, as functions such as @code{read.table} and @code{scan} can read
-directly from a URL, either by explicitly using @code{url} to open a
-connection, or implicitly using it by giving a URL as the @code{file}
-argument.
-
- at node CORBA interface,  , Using download.file, Network interfaces
- at section @acronym{CORBA} interface
- at cindex CORBA
-
- at acronym{CORBA} (Common Object Request Broker Architecture) is similar
-to @acronym{DCOM}, allowing applications to call methods, or operations,
-in server objects running in other applications, potentially programmed
-in different languages and running on different machines.  There is a
- at pkg{CORBA} package available from the Omegahat project (at
- at uref{http://www.omegahat.org/RSCORBA/}), currently for Unix but a
-Windows version looks to be possible.
-
-This package allows @R{} commands to be used to locate available
- at acronym{CORBA} servers, query the methods they provide, and dynamically
-invoke methods on these objects.  @R{} values given as arguments in
-these calls are exported in the call and made available to that
-operation invocation.  Primitive data types (vectors and lists) are
-exported by default, while more complex objects are exported by
-reference.  Examples of using this include communicating with the
-Gnumeric (@uref{http://www.gnumeric.org}) spreadsheet, and also
-interacting with the data visualization system
- at uref{http://www.ggobi.org, ggobi}.
-
-One can also create @acronym{CORBA} servers within @R{}, allowing other
-applications to call these methods.  For example, one might offer access
-to a particular dataset or to some of @R{}'s modelling software.  This
-is done dynamically by combining @R{} data objects and functions.  This
-allows one to explicitly export data and functionality from @R{}.
-
-One can also use the @pkg{CORBA} package to achieve distributed,
-parallel computing in @R{}.  One @R{} session acts as a manager and
-dispatches tasks to different servers running in other @R{} worker
-sessions.  This uses the ability to invoke asynchronous or background
-CORBA calls in @R{}.  More information is available from the Omegahat
-project at @uref{http://www.omegahat.org/RSCORBA/}.
-
+Function @code{download.file} is provided to read a file from a Web
+resource via FTP or HTTP (including HTTPS) and write it to a file.
+Often this can be avoided, as functions such as @code{read.table} and
+ at code{scan} can read directly from a URL, either by explicitly using
+ at code{url} to open a connection, or implicitly using it by giving a URL
+as the @code{file} argument.
 
 
 @node Reading Excel spreadsheets, References, Network interfaces, Top
 @chapter Reading Excel spreadsheets
 
+ at findex .xls
+ at findex .xlsx
+
 The most common R data import/export question seems to be `how do I read
 an Excel spreadsheet'.  This chapter collects together advice and
 options given earlier.  Note that most of the advice is for pre-Excel
@@ -2303,7 +2276,7 @@ possibility.
 If you do not have Excel, many other programs are able to read such
 spreadsheets and export in a text format on both Windows and Unix, for
 example Gnumeric (@uref{http://www.gnome.org/projects/gnumeric/}) and
-OpenOffice (@uref{http://www.openoffice.org}).  You can also
+OpenOffice (@uref{https://www.openoffice.org}).  You can also
 cut-and-paste between the display of a spreadsheet in such a program and
 R: @code{read.table} will read from the R console or, under Windows,
 from the clipboard (via @code{file = "clipboard"} or
@@ -2324,7 +2297,7 @@ depending on your ODBC drivers: by calling @code{odbcConnect} directly
 versions back to Excel 3.0 can be read).  The version
 @code{odbcConnectExcel2007} will read the Excel 2007 formats as well as
 earlier ones (provided the drivers are installed, including with 64-bit
-Windows @R{}: @pxref{RODBC}).  OS X users can also use @CRANpkg{RODBC} if
+Windows @R{}: @pxref{RODBC}).  macOS users can also use @CRANpkg{RODBC} if
 they have a suitable driver (e.g.@: that from Actual Technologies).
 
 @findex read.xls
@@ -2335,29 +2308,23 @@ provides a basic wrapper in its @code{read.xls} function.  With suitable
 @code{Perl} modules installed this function can also read Excel 2007
 spreadsheets.
 
- at findex xlsReadWrite
-32-bit Windows package @CRANpkg{xlsReadWrite} from
- at uref{http://www.swissr.org/} and CRAN has a function @code{read.xls} to
-read @file{.xls} files (based on a third-party non-Open-Source Delphi
-component).
-
 @findex dataframes2xls
 @findex WriteXLS
 Packages @CRANpkg{dataframes2xls} and @CRANpkg{WriteXLS} each contain a function
 to @emph{write} one or more data frames to an @file{.xls} file, using
-Python and Perl respectively.  Another version of @code{write.xls} in
-available in package @CRANpkg{xlsReadWrite}.
+Python and Perl respectively.
 
 @findex xlsx
- at findex RExcelXML
-Two packages which can read and and manipulate Excel 2007/10
-spreadsheets but not earlier formats are @CRANpkg{xlsx} (which requires
-Java) and the Omegahat package @pkg{RExcelXML}.
+Packages @CRANpkg{xlsx} can read and and manipulate Excel 2007 and later
+spreadsheets: it requires Java.
 
 @findex XLConnect
 Package @CRANpkg{XLConnect} can read, write and manipulate both Excel
-97--2003 and Excel 2007/10 spreadsheets, requiring Java.
+97--2003 and Excel 2007/10 spreadsheets, using Java.
 
+ at findex readxl
+Package @CRANpkg{readxl} can read both Excel 97--2003 and Excel 2007/10
+spreadsheets, using an included C library.
 
 @node References, Function and variable index, Reading Excel spreadsheets, Top
 @appendix References
@@ -2389,11 +2356,11 @@ K.@: Kline and D.@: Kline (2001) @emph{SQL in a Nutshell.} O'Reilly.
 @noindent
 B.@: Momjian (2000) @emph{PostgreSQL: Introduction and Concepts.}
 Addison-Wesley.
-Also downloadable at @uref{http://www.postgresql.org/docs/awbook.html}.
+Also available at @uref{http://momjian.us/main/writings/pgsql/aw_pgsql_book/}.
 
 @noindent
-B.@: D.@: Ripley (2001) Connections. \@emph{R News}, @strong{1/1}, 16--7.
-  \@uref{http://www.r-project.org/doc/Rnews/Rnews_2001-1.pdf}
+B.@: D.@: Ripley (2001) Connections. @emph{R News}, @strong{1/1}, 16--7.
+  @uref{https://www.r-project.org/doc/Rnews/Rnews_2001-1.pdf}
 
 
 @noindent
diff --git a/doc/manual/R-defs.texi b/doc/manual/R-defs.texi
index 215eec9..d33243d 100644
--- a/doc/manual/R-defs.texi
+++ b/doc/manual/R-defs.texi
@@ -35,7 +35,7 @@ $\t\$%
 @end macro
 
 @macro CRANpkg {p}
- at url{http://CRAN.R-project.org/package=\p\, @strong{\p\}}
+ at url{https://CRAN.R-project.org/package=\p\, @strong{\p\}}
 @end macro
 
 @macro cputype {c}
@@ -44,7 +44,7 @@ $\t\$%
 
 @c -- edit these here alone -- in order keep consistency
 @macro Rcopyright{year}
-Copyright @copyright{} \year\--2014 R Core Team
+Copyright @copyright{} \year\--2016 R Core Team
 @end macro
 
 @macro permission{}
diff --git a/doc/manual/R-exts.c b/doc/manual/R-exts.c
index a4518a2..2852112 100644
--- a/doc/manual/R-exts.c
+++ b/doc/manual/R-exts.c
@@ -53,7 +53,7 @@ SEXP getvar(SEXP name, SEXP rho)
 	error("name is not a single string");
     if(!isEnvironment(rho))
 	error("rho should be an environment");
-    ans = findVar(install(CHAR(STRING_ELT(name, 0))), rho);
+    ans = findVar(installChar(STRING_ELT(name, 0)), rho);
     Rprintf("first value is %f\n", REAL(ans)[0]);
     return R_NilValue;
 }
@@ -272,7 +272,7 @@ SEXP numeric_deriv(SEXP args)
     rgr = REAL(gradient); rans = REAL(ans);
 
     for(i = 0, start = 0; i < LENGTH(theta); i++, start += LENGTH(ans)) {
-	PROTECT(par = findVar(install(CHAR(STRING_ELT(theta, i))), rho));
+	PROTECT(par = findVar(installChar(STRING_ELT(theta, i)), rho));
 	tt = REAL(par)[0];
 	xx = fabs(tt);
 	delta = (xx < 1) ? eps : xx*eps;
diff --git a/doc/manual/R-exts.texi b/doc/manual/R-exts.texi
index 8cdd709..034b62c 100644
--- a/doc/manual/R-exts.texi
+++ b/doc/manual/R-exts.texi
@@ -125,7 +125,7 @@ A @emph{package} is a directory of files which extend @R{}, a
 @emph{source package} (the master files of a package), or a tarball
 containing the files of a source package, or an @emph{installed}
 package, the result of running @command{R CMD INSTALL} on a source
-package.  On some platforms (notably OS X and Windows) there are also
+package.  On some platforms (notably macOS and Windows) there are also
 @emph{binary packages}, a zip file or tarball containing the files of an
 installed package which can be unpacked rather than installing from
 sources.
@@ -150,11 +150,11 @@ That used by the operating system, as a shared, dynamic or static
 library or (especially on Windows) a DLL, where the second L stands for
 `library'.  Installed packages may contain compiled code in what is
 known on Unix-alikes as a @emph{shared object} and on Windows as a DLL.
-The concept of a @emph{shared library} (@emph{dynamic library} on OS X)
+The concept of a @emph{shared library} (@emph{dynamic library} on macOS)
 as a collection of compiled code to which a package might link is also
 used, especially for @R{} itself on some platforms. On most platforms
 these concepts are interchangeable (shared objects and DLLs can both be
-loaded into the @R{} process and be linked against), but OS X
+loaded into the @R{} process and be linked against), but macOS
 distinguishes between shared objects (extension @file{.so}) and dynamic
 libraries (extension @file{.dylib}).
 
@@ -217,7 +217,7 @@ use less (virtual) memory.
 and contributed code, especially @R{} packages.  Users of @R{} are
 encouraged to join in the collaborative project and to submit their own
 packages to @acronym{CRAN}: current instructions are linked from
- at uref{http://CRAN.R-project.org/banner.shtml#submitting}.
+ at uref{https://CRAN.R-project.org/@/banner.shtml#submitting}.
 
 
 @menu
@@ -249,12 +249,13 @@ empty).  The package subdirectory may also contain files @file{INDEX},
 installation instructions), @file{README}/@file{README.md}@footnote{This
 seems to be commonly used for a file in `markdown' format.  Be aware
 that most users of @R{} will not know that, nor know how to view such a
-file: platforms such as OS X and Windows do not have a default viewer
-set in their file associations. The @acronym{CRAN} package web pages
-render such files in @HTML{}.}, or @file{ChangeLog} will be ignored by
- at R{}, but may be useful to end users.  The utility @command{R CMD build}
-may add files in a @file{build} directory (but this should not be used
-for other purposes).
+file: platforms such as macOS and Windows do not have a default viewer
+set in their file associations.  The @acronym{CRAN} package web pages
+render such files in @HTML{}: the converter used expects the file to be
+encoded in UTF-8.}, or @file{ChangeLog} will be ignored by @R{}, but may
+be useful to end users.  The utility @command{R CMD build} may add files
+in a @file{build} directory (but this should not be used for other
+purposes).
 
 Except where specifically mentioned, at footnote{currently, top-level files
 @file{.Rbuildignore} and @file{.Rinstignore}, and
@@ -269,15 +270,15 @@ section on @ref{Package namespaces}.
 @cindex configure file
 @cindex cleanup file
 
-The optional files @file{configure} and @file{cleanup} are (Bourne
-shell) script files which are, respectively, executed before and
-(provided that option @option{--clean} was given) after installation on
-Unix-alikes, see @ref{Configure and cleanup}.  The analogues on Windows
-are @file{configure.win} and @file{cleanup.win}.
+The optional files @file{configure} and @file{cleanup} are (Bourne)
+shell scripts which are, respectively, executed before and (if option
+ at option{--clean} was given) after installation on Unix-alikes, see
+ at ref{Configure and cleanup}.  The analogues on Windows are
+ at file{configure.win} and @file{cleanup.win}.
 
 For the conventions for files @file{NEWS} and @file{ChangeLog} in the
 @acronym{GNU} project see
- at uref{http://www.gnu.org/@/prep/@/standards/@/standards.html#Documentation}.
+ at uref{https://www.gnu.org/@/prep/@/standards/@/standards.html#Documentation}.
 
 The package subdirectory should be given the same name as the package.
 Because some file systems (e.g., those on Windows and by default on OS
@@ -328,6 +329,7 @@ structure for a new package: see its help page for details.
 * Package subdirectories::      
 * Data in packages::            
 * Non-R scripts in packages::   
+* Specifying URLs::             
 @end menu
 
 @node The DESCRIPTION file, Licensing, Package structure, Package structure
@@ -342,22 +344,24 @@ in the following format:
 @smallexample
 Package: pkgname
 Version: 0.5-1
-Date: 2004-01-01
+Date: 2015-01-01
 Title: My First Collection of Functions
 Authors@@R: c(person("Joe", "Developer", role = c("aut", "cre"),
-		     email = "Joe.Developer@@some.domain.net"),
-	      person("Pat", "Developer", role = "aut"),
-	      person("A.", "User", role = "ctb",
-		     email = "A.User@@whereever.net"))
-Author: Joe Developer and Pat Developer, with contributions from A. User
+                     email = "Joe.Developer@@some.domain.net"),
+              person("Pat", "Developer", role = "aut"),
+              person("A.", "User", role = "ctb",
+                     email = "A.User@@whereever.net"))
+Author: Joe Developer [aut, cre],
+  Pat Developer [aut],
+  A. User [ctb]
 Maintainer: Joe Developer <Joe.Developer@@some.domain.net>
-Depends: R (>= 1.8.0), nlme
+Depends: R (>= 3.1.0), nlme
 Suggests: MASS
-Description: A short (one paragraph) description of what
+Description: A (one paragraph) description of what
   the package does and why it may be useful.
 License: GPL (>= 2)
-URL: http://www.r-project.org, http://www.another.url
-BugReports: http://pkgname.bugtracker.url
+URL: https://www.r-project.org, http://www.another.url
+BugReports: https://pkgname.bugtracker.url
 @end smallexample
 @end cartouche
 @end quotation
@@ -365,7 +369,7 @@ BugReports: http://pkgname.bugtracker.url
 @noindent
 The format is that of a version of a `Debian Control File' (see the help
 for @samp{read.dcf} and
- at uref{http://www.debian.org/@/doc/@/debian-policy/@/ch-controlfields.html}:
+ at uref{https://www.debian.org/@/doc/@/debian-policy/@/ch-controlfields.html}:
 @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
@@ -391,7 +395,9 @@ be omitted if the latter is provided: however if they are not
 @c DESCRIPTION field Package
 The mandatory @samp{Package} field gives the name of the package.  This
 should contain only (@acronym{ASCII}) letters, numbers and dot, have at
-least two characters and start with a letter and not end in a dot.
+least two characters and start with a letter and not end in a dot.  If
+it needs explaining, this should be done in the @samp{Description} field
+(and not the @samp{Title} field).
 
 @c DESCRIPTION field Version
 The mandatory @samp{Version} field gives the version of the package.
@@ -404,18 +410,30 @@ were @samp{0.1-0}.  It is @strong{not} a decimal number, so for example
 
 The mandatory @samp{License} field is discussed in the next subsection.
 
+ at c DESCRIPTION field Title
+The mandatory @samp{Title} field should give a @emph{short} description
+of the package.  Some package listings may truncate the title to 65
+characters.  It should use @emph{title case} (that is, use capitals for
+the principal words: @code{tools::toTitleCase} can help you with this),
+not use any markup, not have any continuation lines, and not end in a
+period (unless part of @dots{}).  Do not repeat the package name: it is
+often used prefixed by the name.  Refer to other packages and external
+software in single quotes, and to book titles (and similar) in double
+quotes.
 
 @c DESCRIPTION field Description
-The mandatory @samp{Description} field should give a comprehensive
-description of what the package does.  One can use several (complete)
-sentences, but only one paragraph.
-
- at c DESCRIPTION field Title
-The mandatory @samp{Title} field should give a short description of the
-package.  Some package listings may truncate the title to 65 characters.
-It should use @emph{title case} (that is, use capitals for the principal
-words), not use any markup, not have any continuation lines, and not end
-in a period.
+The mandatory @samp{Description} field should give a
+ at emph{comprehensive} description of what the package does.  One can use
+several (complete) sentences, but only one paragraph. It should be
+intelligible to all the intended readership (e.g.@: for a @acronym{CRAN}
+package to all @acronym{CRAN} users).  It is good practice not to start
+with the package name, `This package' or similar.  As with the
+ at samp{Title} field, double quotes should be used for quotations
+(including titles of books and articles), and single quotes for
+non-English usage, including names of other packages and external
+software.  This field should also be used for explaining the package
+name if necessary.  URLs should be enclosed in angle brackets, e.g.@:
+ at samp{<https://www.r-project.org>}: see also @ref{Specifying URLs}.
 
 @c DESCRIPTION field Author
 @c DESCRIPTION field Authors at R
@@ -445,15 +463,18 @@ Both @samp{Author} and @samp{Maintainer} fields can be omitted if a
 suitable @samp{Authors@@R} field is given.  This field can be used to
 provide a refined and machine-readable description of the package
 ``authors'' (in particular specifying their precise @emph{roles}), via
-suitable @R{} code.  The roles can include @samp{"aut"} (author) for
-full authors, @samp{"cre"} (creator) for the package maintainer, and
- at samp{"ctb"} (contributor) for other contributors, @samp{"cph"}
-(copyright holder), among others.  See @code{?person} for more
-information.  Note that no role is assumed by default.  Auto-generated
-package citation information takes advantage of this specification. The
- at samp{Author} and @samp{Maintainer} fields are auto-generated from it if
-needed when building at footnote{at least if this is done in a locale which
-matches the package encoding.} or installing.
+suitable @R{} code. It should create an object of class @code{"person"},
+by either a call to @code{person} or a series of calls (one per
+``author'') concatenated by @code{c()}: see the example
+ at file{DESCRIPTION} file above.  The roles can include @samp{"aut"}
+(author) for full authors, @samp{"cre"} (creator) for the package
+maintainer, and @samp{"ctb"} (contributor) for other contributors,
+ at samp{"cph"} (copyright holder), among others.  See @code{?person} for
+more information.  Note that no role is assumed by default.
+Auto-generated package citation information takes advantage of this
+specification. The @samp{Author} and @samp{Maintainer} fields are
+auto-generated from it if needed when building at footnote{at least if this
+is done in a locale which matches the package encoding.} or installing.
 
 @findex COPYRIGHTS
 @c DESCRIPTION field Copyright
@@ -462,12 +483,15 @@ holder(s) are not the authors.  If necessary, this can refer to an
 installed file: the convention is to use file @file{inst/COPYRIGHTS}.
 
 @c DESCRIPTION field Date
-The @samp{Date} field gives the release date of the current
-version of the package.  It is strongly recommended to use the yyyy-mm-dd
-format conforming to the ISO 8601 standard.
+The optional @samp{Date} field gives the @emph{release date} of the
+current version of the package.  It is strongly recommended at footnote{and
+required by @acronym{CRAN}, so checked by @command{R CMD check
+--as-cran}.} to use the @samp{yyyy-mm-dd} format conforming to the ISO
+8601 standard.
 
-The @samp{Depends}, @samp{Imports}, @samp{Suggests}, @samp{Enhances} and
- at samp{LinkingTo} fields are discussed in a later subsection.
+The @samp{Depends}, @samp{Imports}, @samp{Suggests}, @samp{Enhances},
+ at samp{LinkingTo} and @samp{Additional_repositories} fields are discussed
+in a later subsection.
 
 @c DESCRIPTION field SystemRequirements
 Dependencies external to the @R{} system should be listed in the
@@ -479,13 +503,16 @@ The @samp{URL} field may give a list of @acronym{URL}s
 separated by commas or whitespace, for example the homepage of the
 author or a page where additional material describing the software can
 be found.  These @acronym{URL}s are converted to active hyperlinks in
- at acronym{CRAN} package listings.
+ at acronym{CRAN} package listings.  @xref{Specifying URLs}.
 
 @c DESCRIPTION field BugReports
-The @samp{BugReports} field may contain a single
- at acronym{URL} to which bug reports about the package should be
-submitted.  This @acronym{URL} will be used by @code{bug.report}
-instead of sending an email to the maintainer.
+The @samp{BugReports} field may contain a single @acronym{URL} to which
+bug reports about the package should be submitted.  This @acronym{URL}
+will be used by @code{bug.report} instead of sending an email to the
+maintainer.  A browser is opened for a @samp{http://} or @samp{https://}
+ at acronym{URL}.  As from @R{} 3.4.0, @code{bug.report} will try to
+extract an email address (preferably from a @samp{mailto:} URL or
+enclosed in angle brackets).
 
 @c DESCRIPTION field Priority
 Base and recommended packages (i.e., packages contained in the @R{}
@@ -540,7 +567,6 @@ Windows build would zip up the data directory or not prior to @R{}
 @c DESCRIPTION field Biarch
 The @samp{Biarch} logical field is used on Windows to select the
 @command{INSTALL} option @option{--force-biarch} for this package.
-(Introduced in @R{} 3.0.0.)
 
 @c DESCRIPTION field BuildVignettes
 The @samp{BuildVignettes} logical field can be set to a false value to
@@ -578,8 +604,9 @@ package contains code which to be compiled, otherwise @code{"no"} (when
 the package could be installed from source on any platform without
 additional tools).  This is used by @code{install.packages(type =
 "both")} in @R{} >= 2.15.2 on platforms where binary packages are the
-norm: it is normally set by the repository assuming compilation is
-required if and only if the package has a @file{src} directory.
+norm: it is normally set by @command{R CMD build} or the repository
+assuming compilation is required if and only if the package has a
+ at file{src} directory.
 
 @c DESCRIPTION field OS_type
 The @samp{OS_type} field specifies the OS(es) for which the
@@ -592,32 +619,52 @@ The @samp{Type} field specifies the type of the package:
 @pxref{Package types}.
 
 @c DESCRIPTION field Classification/ACM
+ at c DESCRIPTION field Classification/ACM-2012
 @c DESCRIPTION field Classification/JEL
 @c DESCRIPTION field Classification/MSC
+ at c DESCRIPTION field Classification/MSC-2010
 One can add subject classifications for the content of the package using
-the fields @samp{Classification/ACM} (using the Computing
-Classification System of the Association for Computing Machinery,
- at uref{http://www.acm.org/class/}), @samp{Classification/JEL} (the
-Journal of Economic Literature Classification System,
- at uref{http://www.aeaweb.org/journal/jel_class_system.html}), or
- at samp{Classification/MSC} (the Mathematics Subject Classification of the
-American Mathematical Society, @uref{http://www.ams.org/msc/}).  The
-subject classifications should be comma-separated lists of the
-respective classification codes, e.g.,
- at samp{Classification/ACM: G.4, H.2.8, I.5.1}.
+the fields @samp{Classification/ACM} or @samp{Classification/ACM-2012}
+(using the Computing Classification System of the Association for
+Computing Machinery, @uref{http://www.acm.org/about/class/}; the former refers
+to the 1998 version), @samp{Classification/JEL} (the Journal of Economic
+Literature Classification System,
+ at uref{https://www.aeaweb.org/@/econlit/@/jelCodes.php}, or
+ at samp{Classification/MSC} or @samp{Classification/MSC-2010} (the
+Mathematics Subject Classification of the American Mathematical Society,
+ at uref{http://www.ams.org/msc/}; the former refers to the 2000 version).
+The subject classifications should be comma-separated lists of the
+respective classification codes, e.g., @samp{Classification/ACM: G.4,
+H.2.8, I.5.1}.
 
 @c DESCRIPTION field Language
 A @samp{Language} field can be used to indicate if the package
 documentation is not in English: this should be a comma-separated list
 of standard (not private use or grandfathered) IETF language tags as
 currently defined by RFC 5646
-(@uref{http://tools.ietf.org/@/html/@/rfc5646}, see also
- at uref{http://en.wikipedia.org/@/wiki/@/IETF_language_tag}), i.e., use
+(@uref{https://tools.ietf.org/@/html/@/rfc5646}, see also
+ at uref{https://en.wikipedia.org/@/wiki/@/IETF_language_tag}), i.e., use
 language subtags which in essence are 2-letter ISO 639-1
-(@uref{http://en.wikipedia.@/org/@/wiki/@/ISO_639-1}) or 3-letter ISO
-639-3 (@uref{http://en.wikipedia.@/org/@/wiki/@/ISO_639-3}) language
+(@uref{https://en.wikipedia.@/org/@/wiki/@/ISO_639-1}) or 3-letter ISO
+639-3 (@uref{https://en.wikipedia.@/org/@/wiki/@/ISO_639-3}) language
 codes.
 
+ at 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
+order listed in the @samp{RdMacros} field, before any macro definitions
+in the current package are loaded.  Macro definitions in individual
+ at file{.Rd} files in the @file{man} directory are loaded last, and are
+local to later parts of that file.  In case of duplicates, the last
+loaded definition will be used at footnote{Duplicate definitions may
+trigger a warning: see @ref{User-defined macros}.}  Both @command{R CMD
+Rd2pdf} and @command{R CMD Rdconv} have an optional flag
+ at option{--RdMacros=pkglist}.  The option is also a comma-separated list
+of package names, and has priority over the value given in
+ at file{DESCRIPTION}.  Packages using @file{Rd} macros should depend on
+ at R{} 3.2.0 or later.
+
 @c DESCRIPTION field Built
 @c DESCRIPTION field Packaged
 @quotation Note
@@ -631,7 +678,9 @@ added by the package management tools.
 There is no restriction on the use of other fields not mentioned here
 (but using other capitalizations of these field names would cause
 confusion).  Fields @code{Note}, @code{Contact} (for contacting the
-authors/developers) and @code{MailingList} are in common use. Some
+authors/developers at footnote{As from @R{} 3.4.0, @code{bug.report} will
+try to extract an email address from a @code{Contact} field if there is
+no @code{BugReports} field.}) and @code{MailingList} are in common use. Some
 repositories (including @acronym{CRAN} and R-forge) add their own
 fields.
 
@@ -649,7 +698,7 @@ the package, let alone use it.
 
 The package management tools use the concept of
 `free or open source software'
-(FOSS, e.g., @uref{http://en.wikipedia.org/@/wiki/@/FOSS})
+(FOSS, e.g., @uref{https://en.wikipedia.org/@/wiki/@/FOSS})
 licenses: the idea being that some users of @R{} and its packages want
 to restrict themselves to such software.  Others need to ensure that
 there are no restrictions stopping them using a package, e.g.@:
@@ -673,7 +722,8 @@ One of the ``standard'' short specifications
 GPL-2 GPL-3 LGPL-2 LGPL-2.1 LGPL-3 AGPL-3 Artistic-2.0
 BSD_2_clause BSD_3_clause MIT
 @end example
-as made available @emph{via} @uref{http://www.R-project.org/@/Licenses/} and
+ at noindent
+as made available @emph{via} @uref{https://www.R-project.org/@/Licenses/} and
 contained in subdirectory @file{share/licenses} of the @R{} source or home
 directory.
 @item
@@ -717,6 +767,7 @@ License: GPL-2 | file LICENCE
 License: GPL (>= 2) | BSD_3_clause + file LICENSE
 License: Artistic-2.0 | AGPL-3 + file LICENSE
 @end example
+ at noindent
 Please note in particular that ``Public domain'' is not a valid license,
 since it is not recognized in some jurisdictions.
 
@@ -745,7 +796,7 @@ Whereas you should feel free to include a license file in your
 @emph{source} distribution, please do not arrange to @emph{install} yet
 another copy of the @acronym{GNU} @file{COPYING} or @file{COPYING.LIB}
 files but refer to the copies on
- at uref{http://www.R-project.org/@/Licenses/} and included in the @R{}
+ at uref{https://www.R-project.org/@/Licenses/} and included in the @R{}
 distribution (in directory @file{share/licenses}).  Since files named
 @file{LICENSE} or @file{LICENCE} @emph{will} be installed, do not use
 these names for standard license files.  To include comments about the
@@ -808,11 +859,12 @@ The @samp{Suggests} field uses the same syntax as @samp{Depends} and
 lists packages that are not necessarily needed.  This includes packages
 used only in examples, tests or vignettes (@pxref{Writing package
 vignettes}), and packages loaded in the body of functions.  E.g.,
-suppose an example from package @pkg{foo} uses a dataset from package
- at pkg{bar}. Then it is not necessary to have @pkg{bar} use @pkg{foo}
-unless one wants to execute all the examples/tests/vignettes: it is
-useful to have @pkg{bar}, but not necessary.  Version requirements can
-be specified, and will be used by @command{R CMD check}.
+suppose an example at footnote{even one wrapped in @code{\donttest}.} from
+package @pkg{foo} uses a dataset from package @pkg{bar}. Then it is not
+necessary to have @pkg{bar} use @pkg{foo} unless one wants to execute
+all the examples/tests/vignettes: it is useful to have @pkg{bar}, but
+not necessary.  Version requirements can be specified, and will be used
+by @command{R CMD check}.
 
 @c DESCRIPTION field Enhances
 Finally, the @samp{Enhances} field lists packages ``enhanced'' by the
@@ -900,7 +952,7 @@ by @command{R CMD check}.)
 only exceptionally.  Such calls are never needed for packages listed in
 @samp{Depends} as they will already be on the search path.  It used to
 be common practice to use @code{require} calls for packages listed in
- at samp{suggests} in functions which used their functionality, but
+ at samp{Suggests} in functions which used their functionality, but
 nowadays it is better to access such functionality @emph{via} @code{::}
 calls.
 
@@ -914,20 +966,26 @@ LinkingTo: link1, link2
 @end example
 
 @noindent
-As from @R{} 3.0.2 the @samp{LinkingTo} field can have a version
-requirement which is checked at installation.  (In earlier versions of
- at R{} it would cause the specification to be ignored.)
+The @samp{LinkingTo} field can have a version requirement which is
+checked at installation.
 
 Specifying a package in @samp{LinkingTo} suffices if these are C++
 headers containing source code or static linking is done at
 installation: the packages do not need to be (and usually should not be)
 listed in the @samp{Depends} or @samp{Imports} fields.  This includes
-CRAN packages @CRANpkg{BH} and almost all users of
+ at acronym{CRAN} package @CRANpkg{BH} and almost all users of
 @CRANpkg{RcppArmadillo} and @CRANpkg{RcppEigen}.
 
 For another use of @samp{LinkingTo} see @ref{Linking to native routines
 in other packages}.
 
+ at c DESCRIPTION field Additional_repositories
+The @samp{Additional_repositories} field is a comma-separated list of
+repository URLs where the packages named in the other fields may be
+found.  It is currently used by @command{R CMD check} to check that the
+packages can be found, at least as source packages (which can be
+installed on any platform).
+
 @menu
 * Suggested packages::          
 @end menu
@@ -960,6 +1018,12 @@ visible (and if it is, it need not be the one from that namespace:
 give an error if the suggested package is not available, simply use
 e.g.@: @code{rgl::plot3d}.
 
+Note that the recommendation to use suggested packages conditionally in
+tests does also apply to packages used to manage test suites: a
+notorious example was @CRANpkg{testthat} which in version 1.0.0 contained
+illegal C++ code and hence could not be installed on standards-compliant
+platforms.
+
 As noted above, packages in @samp{Enhances} @emph{must} be used
 conditionally and hence objects within them should always be accessed
 @emph{via} @code{::}.
@@ -1009,24 +1073,25 @@ provided that the objects created do not depend on those packages except
 Two exceptions are allowed: if the @file{R} subdirectory contains a file
 @file{sysdata.rda} (a saved image of one or more @R{} objects: please
 use suitable compression as suggested by @code{tools::resaveRdaFiles},
-and see also @samp{SysDataCompression} @file{DESCRIPTION} field.)  this
-will be lazy-loaded into the namespace environment -- this is intended
-for system datasets that are not intended to be user-accessible
+and see also the @samp{SysDataCompression} @file{DESCRIPTION} field.)
+this will be lazy-loaded into the namespace environment -- this is
+intended for system datasets that are not intended to be user-accessible
 @emph{via} @code{data}.  Also, files ending in @samp{.in} will be
 allowed in the @file{R} directory to allow a @file{configure} script to
 generate suitable files.
 
 Only @acronym{ASCII} characters (and the control characters tab,
 formfeed, LF and CR) should be used in code files.  Other characters are
-accepted in comments, but then the comments may not be readable in
-e.g.@: a UTF-8 locale.  Non- at acronym{ASCII} characters in object names
-will normally at footnote{This is true for OSes which implement the
- at samp{C} locale: Windows' idea of the @samp{C} locale uses the WinAnsi
-charset.} fail when the package is installed.  Any byte will be allowed
-in a quoted character string but @code{\uxxxx} escapes should be used
-for non- at acronym{ASCII} characters.  However, non- at acronym{ASCII}
-character strings may not be usable in some locales and may display
-incorrectly in others.
+accepted in comments at footnote{but they should be in the encoding
+declared in the @file{DESCRIPTION} file.}, but then the comments may not
+be readable in e.g.@: a UTF-8 locale.  Non- at acronym{ASCII} characters in
+object names will normally at footnote{This is true for OSes which
+implement the @samp{C} locale: Windows' idea of the @samp{C} locale uses
+the WinAnsi charset.} fail when the package is installed.  Any byte will
+be allowed in a quoted character string but @code{\uxxxx} escapes should
+be used for non- at acronym{ASCII} characters.  However,
+non- at acronym{ASCII} character strings may not be usable in some locales
+and may display incorrectly in others.
 
 
 @findex library.dynam
@@ -1056,8 +1121,9 @@ Having a @file{man} directory containing no documentation files may give
 an installation error.
 
 The @file{man} subdirectory may contain a subdirectory named @file{macros};
-this will contain source for user-defined Rd macroa used in @R{} 3.2.0
-and later.
+this will contain source for user-defined Rd macros.
+(See @ref{User-defined macros}.)  These use the Rd format, but may
+not contain anything but macro definitions, comments and whitespace.
 
 The @file{R} and @file{man} subdirectories may contain OS-specific
 subdirectories named @file{unix} or @file{windows}.
@@ -1093,7 +1159,7 @@ can be used together and mixing C and C++ seems to be widely successful.
 If your code needs to depend on the platform there are certain defines
 which can used in C or C++.  On all Windows builds (even 64-bit ones)
 @samp{_WIN32} will be defined: on 64-bit Windows builds also
- at samp{_WIN64}, and on OS X @samp{__APPLE__} is defined. at footnote{There
+ at samp{_WIN64}, and on macOS @samp{__APPLE__} is defined. at footnote{There
 is also @samp{__APPLE_CC__}, but that indicates a compiler with
 Apple-specific features, not the OS.  It is used in
 @file{Rinlinedfuns.h}.}
@@ -1151,7 +1217,7 @@ lines of
 execs <- c("one", "two", "three")
 if(WINDOWS) execs <- paste0(execs, ".exe")
 if ( any(file.exists(execs)) ) @{
-  dest <- file.path(R_PACKAGE_DIR,  paste0('bin', R_ARCH)
+  dest <- file.path(R_PACKAGE_DIR,  paste0('bin', R_ARCH))
   dir.create(dest, recursive = TRUE, showWarnings = FALSE)
   file.copy(execs, dest, overwrite = TRUE)
 @}
@@ -1170,12 +1236,12 @@ if testing is desired use code in the @file{tests} directory to achieve
 this.  The script files must start with a (lower or upper case) letter
 and have one of the extensions @file{.R} or @file{.r}.  If present, the
 @file{demo} subdirectory should also have a @file{00Index} file with one
-line for each demo, giving its name and a description separated by white
-space. (Note that it is not possible to generate this index file
+line for each demo, giving its name and a description separated by a tab
+or at least three spaces. (This index file is not generated
 automatically.)  Note that a demo does not have a specified encoding and
-so should be an @acronym{ASCII} file (@pxref{Encoding issues}).  As from
- at R{} 3.0.0 @code{demo()} will use the package encoding if there is one,
-but this is mainly useful for non- at acronym{ASCII} comments.
+so should be an @acronym{ASCII} file (@pxref{Encoding issues}). Function
+ at code{demo()} will use the package encoding if there is one, but this is
+mainly useful for non- at acronym{ASCII} comments.
 
 @cindex .Rinstignore file
 The contents of the @file{inst} subdirectory will be copied recursively
@@ -1189,14 +1255,14 @@ exclude files from being installed, one can specify a list of exclude
 patterns in file @file{.Rinstignore} in the top-level source directory.
 These patterns should be Perl-like regular expressions (see the help for
 @code{regexp} in @R{} for the precise details), one per line, to be
-matched case-insensitively at footnote{on all platforms from @R{} 3.1.0}
-against the file and directory paths, e.g.@: @file{doc/.*[.]png$} will
-exclude all PNG files in @file{inst/doc} based on the extension.
+matched case-insensitively against the file and directory paths, e.g.@:
+ at file{doc/.*[.]png$} will exclude all PNG files in @file{inst/doc} based
+on the extension.
 
 Note that with the exceptions of @file{INDEX},
 @file{LICENSE}/@file{LICENCE} and @file{NEWS}, information files at the
 top level of the package will @emph{not} be installed and so not be
-known to users of Windows and OS X compiled packages (and not seen
+known to users of Windows and macOS compiled packages (and not seen
 by those who use @command{R CMD INSTALL} or @command{install.packages}
 on the tarball).  So any information files you wish an end user to see
 should be included in @file{inst}.  Note that if the named exceptions
@@ -1209,7 +1275,8 @@ in the installed package.
 @cindex news
 Things you might like to add to @file{inst} are a @file{CITATION} file
 for use by the @code{citation} function, and a @file{NEWS.Rd} file for
-use by the @code{news} function.
+use by the @code{news} function.  See its help page for the specific
+format restrictions of the @file{NEWS.Rd} file.
 
 @findex AUTHORS
 @findex COPYRIGHTS
@@ -1219,26 +1286,28 @@ is too complex to put in the @file{DESCRIPTION} file.
 
 Subdirectory @file{tests} is for additional package-specific test code,
 similar to the specific tests that come with the @R{} distribution.
-Test code can either be provided directly in a @file{.R} file, or
- at emph{via} a @file{.Rin} file containing code which in turn creates the
-corresponding @file{.R} file (e.g., by collecting all function objects
-in the package and then calling them with the strangest arguments).  The
-results of running a @file{.R} file are written to a @file{.Rout} file.
-If there is a corresponding at footnote{The best way to generate such a
-file is to copy the @file{.Rout} from a successful run of @command{R CMD
-check}.  If you want to generate it separately, do run @R{} with options
+Test code can either be provided directly in a @file{.R} (or @file{.r}
+as from @R{} 3.4.0) file, or @emph{via} a @file{.Rin} file containing
+code which in turn creates the corresponding @file{.R} file (e.g., by
+collecting all function objects in the package and then calling them
+with the strangest arguments).  The results of running a @file{.R} file
+are written to a @file{.Rout} file.  If there is a
+corresponding at footnote{The best way to generate such a file is to copy
+the @file{.Rout} from a successful run of @command{R CMD check}.  If you
+want to generate it separately, do run @R{} with options
 @option{--vanilla --slave} and with environment variable
- at env{LANGUAGE=en} set to get messages in English.} @file{.Rout.save}
-file, these two are compared, with differences being reported but not
-causing an error.  The directory @file{tests} is copied to the check
-area, and the tests are run with the copy as the working directory and
-with @code{R_LIBS} set to ensure that the copy of the package installed
-during testing will be found by @code{library(@var{pkg_name})}.  Note
-that the package-specific tests are run in a vanilla @R{} session
-without setting the random-number seed, so tests which use random
-numbers will need to set the seed to obtain reproducible results (and it
-can be helpful to do so in all cases, to avoid occasional failures when
-tests are run).
+ at env{LANGUAGE=en} set to get messages in English.  Be careful not to use
+output with the option @option{--timings} (and note that
+ at option{--as-cran} sets it).} @file{.Rout.save} file, these two are
+compared, with differences being reported but not causing an error.  The
+directory @file{tests} is copied to the check area, and the tests are
+run with the copy as the working directory and with @code{R_LIBS} set to
+ensure that the copy of the package installed during testing will be
+found by @code{library(@var{pkg_name})}.  Note that the package-specific
+tests are run in a vanilla @R{} session without setting the
+random-number seed, so tests which use random numbers will need to set
+the seed to obtain reproducible results (and it can be helpful to do so
+in all cases, to avoid occasional failures when tests are run).
 
 If directory @file{tests} has a subdirectory @file{Examples} containing
 a file @code{@var{pkg}-Ex.Rout.save}, this is compared to the output
@@ -1278,17 +1347,19 @@ Data files can have one of three types as indicated by their extension:
 plain @R{} code (@file{.R} or @file{.r}), tables (@file{.tab},
 @file{.txt}, or @file{.csv}, see @code{?data} for the file formats, and
 note that @file{.csv} is @strong{not} the standard at footnote{e.g.@:
- at uref{http://tools.ietf.org/@/html/@/rfc4180}.} CSV format), or
+ at uref{https://tools.ietf.org/@/html/@/rfc4180}.} CSV format), or
 @code{save()} images (@file{.RData} or @file{.rda}).  The files should
 not be hidden (have names starting with a dot).  Note that @R{} code
 should be ``self-sufficient'' and not make use of extra functionality
 provided by the package, so that the data file can also be used without
 having to load the package or its namespace.
 
-Images (extensions @file{.RData} or @file{.rda}) can contain references
-to the namespaces of packages that were used to create them.  Preferably
-there should be no such references in data files, and in any case they
-should only be to packages listed in the @code{Depends} and
+Images (extensions @file{.RData}@footnote{People who have trouble with
+case are advised to use @file{.rda} as a common error is to refer to
+ at file{abc.RData} as @file{abc.Rdata}!} or @file{.rda}) can contain
+references to the namespaces of packages that were used to create them.
+Preferably there should be no such references in data files, and in any
+case they should only be to packages listed in the @code{Depends} and
 @code{Imports} fields, as otherwise it may be impossible to install the
 package.  To check for such references, load all the images into a
 vanilla @R{} session, and look at the output of
@@ -1333,15 +1404,14 @@ is best is to try them all and look at the size of the
 @file{@var{pkgname}/data/Rdata.rdb} file.
 
 Lazy-loading is not supported for very large datasets (those which when
-serialized exceed 2GB, the limit for the format on 32-bit platforms and
-all platforms prior to @R{} 3.0.0).
+serialized exceed 2GB, the limit for the format on 32-bit platforms).
 
 @c DESCRIPTION field SysDataCompression
 The analogue for @file{sysdata.rda} is field @samp{SysDataCompression}:
-the default (since @R{} 2.12.2) is @code{xz} for files bigger than 1MB
-otherwise @code{gzip}.
+the default is @code{xz} for files bigger than 1MB otherwise
+ at code{gzip}.
 
- at node Non-R scripts in packages,  , Data in packages, Package structure
+ at node Non-R scripts in packages, Specifying URLs, Data in packages, Package structure
 @subsection Non-R scripts in packages
 
 Code which needs to be compiled (C, C++, FORTRAN, Fortran 95 @dots{})
@@ -1371,23 +1441,14 @@ this should be declared in the @samp{SystemRequirements} field of its
 
 Windows and Mac users should be aware that the Tcl extensions
 @samp{BWidget} and @samp{Tktable} which are currently included with the
- at R{} for Windows and in the OS X installers @emph{are} extensions and do
-need to be declared.  @samp{Tktable} did ship as part of the X11-based
-Tcl/Tk provided on @acronym{CRAN} for OS X prior to @R{} 3.0.0, but you
-will need to tell your users how to make use of it:
+ at R{} for Windows and in the macOS installers @emph{are} extensions and do
+need to be declared for users of other platforms (and that
+ at samp{Tktable} is less widely available than it used to be, including
+not in the main repositories for major Linux distributions).
+ at c Not in Fedora since 17, only in launchpad for Ubuntu.
 
- at example
-> addTclPath('/usr/local/lib/Tktable2.9')
-> tclRequire('Tktable')
-<Tcl> 2.9
- at end example
-
- at noindent
-It should work with no further user action as from @R{} 3.0.0.
-
- at samp{BWidget} needs to be installed by the user for OS X with @R{}
-2.x.y and on other OSes.  This is fairly easy to do: first find the
-Tcl/Tk search path:
+ at samp{BWidget} needs to be installed by the user on other OSes.  This is
+fairly easy to do: first find the Tcl/Tk search path:
 
 @example
 library(tcltk)
@@ -1396,18 +1457,44 @@ strsplit(tclvalue('auto_path'), " ")[[1]]
 
 @noindent
 then download the sources from
- at uref{http://sourceforge.net/projects/tcllib/files/BWidget/} and
-at the command line run
+ at uref{http://sourceforge.net/@/projects/@/tcllib/@/files/@/BWidget/} and
+at the command line run something like
 
 @example
-tar xf bwidget-1.9.6.tar.gz
-sudo mv bwidget-1.9.6 /usr/local/lib
+tar xf bwidget-1.9.8.tar.gz
+sudo mv bwidget-1.9.8 /usr/local/lib
 @end example
 
 @noindent
 substituting a location on the Tcl/Tk search path for @file{/usr/local/lib} if
 needed.
 
+ at node Specifying URLs,  , Non-R scripts in packages, Package structure
+ at subsection Specifying URLs
+
+URLs in many places in the package documentation will be converted to
+clickable hyperlinks in at least some of their renderings.  So care is
+needed that their forms are correct and portable.
+
+The full URL should be given, including the scheme (often @samp{http://}
+or @samp{https://}) and a final @samp{/} for references to directories.
+
+Spaces in URLs are not portable and how they are handled does vary by
+HTTP server and by client.  There should be no space in the host part of
+an @samp{http://} URL, and spaces in the remainder should be encoded,
+with each space replaced by @samp{%20}.
+
+Other characters may benefit from being encoded: see the help on
+ at code{URLencode()}.
+
+The canonical URL for a @acronym{CRAN} package is
+ at example
+https://cran.r-project.org/package=@var{pkgname}
+ at end example
+
+ at noindent
+and not a version starting
+ at samp{http://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
@@ -1416,7 +1503,13 @@ Note that most of this section is specific to Unix-alikes: see the
 comments later on about the Windows port of @R{}.
 
 If your package needs some system-dependent configuration before
-installation you can include an executable (Bourne shell) script
+installation you can include an executable (Bourne at footnote{The script
+should only assume a POSIX-compliant @command{/bin/sh} -- see
+ at uref{http://pubs.opengroup.org/@/onlinepubs/@/9699919799/@/utilities/@/V3_chap02.html}.
+In particular @command{bash} extensions must not be used, and not all
+ at R{} platforms have a @command{bash} command, let alone one at
+ 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
@@ -1461,7 +1554,7 @@ The definition of the respective @R{} function in @file{foo.R.in} could be
 @group
 foo <- function(x) @{
     if(!@@HAVE_FOO@@)
-      stop("Sorry, library 'foo' is not available"))
+      stop("Sorry, library 'foo' is not available")
     ...
 @end group
 @end example
@@ -1474,7 +1567,7 @@ From this file @command{configure} creates the actual @R{} source file
 @group
 foo <- function(x) @{
     if(!FALSE)
-      stop("Sorry, library 'foo' is not available"))
+      stop("Sorry, library 'foo' is not available")
     ...
 @end group
 @end example
@@ -1490,6 +1583,7 @@ You will very likely need to ensure that the same C compiler and
 compiler flags are used in the @file{configure} tests as when compiling
 @R{} or your package.  Under a Unix-alike, you can achieve this by
 including the following fragment early in @file{configure.ac}
+(@emph{before} calling @code{AC_PROG_CC})
 
 @example
 @group
@@ -1517,8 +1611,10 @@ LDFLAGS=`"$@{R_HOME@}/bin/R" CMD config LDFLAGS`
 
 @noindent
 and packages written with C++ need to pick up the details for the C++
-compiler and switch the current language to C++ by
+compiler and switch the current language to C++ by something like
 @example
+CXX=`"$@{R_HOME@}/bin/R" CMD config CXX`
+CXXFLAGS=`"$@{R_HOME@}/bin/R" CMD config CXXFLAGS`
 AC_LANG(C++)
 @end example
 
@@ -1554,9 +1650,8 @@ override the test for the FORTRAN linker flags.)
 
 @strong{N.B.}: If the @command{configure} script creates files, e.g.@:
 @file{src/Makevars}, you do need a @command{cleanup} script to remove
-them.  Otherwise if the package has vignettes, @command{R CMD build}
-will ship the files that are created.  For example, package
- at CRANpkg{RODBC} has
+them.  Otherwise @command{R CMD build} may ship the files that are
+created.  For example, package @CRANpkg{RODBC} has
 
 @example
 #!/bin/sh
@@ -1597,8 +1692,7 @@ set the value of the @env{LD_LIBRARY_PATH} (or equivalent) environment
 variable, but that the secondary object is automatically resolved.
 Another example is when a package installs support files that are
 required at run time, and their location is substituted into an @R{}
-data structure at installation time. (This happens with the Java Archive
-files in the Omegahat @pkg{SJava} package.)
+data structure at installation time.
 @vindex R_LIBRARY_DIR
 @vindex R_PACKAGE_DIR
 @vindex R_PACKAGE_NAME
@@ -1618,7 +1712,7 @@ quoted in makefiles and configure scripts.
 
 One of the more tricky tasks can be to find the headers and libraries of
 external software.  One tool which is increasingly available on
-Unix-alikes (but not by default on OS X) to do this is
+Unix-alikes (but not by default on macOS) to do this is
 @command{pkg-config}.  The @file{configure} script will need to test for
 the presence of the command itself (see for example package
 @CRANpkg{Cairo}), and if present it can be asked if the software is
@@ -1654,6 +1748,8 @@ pkg-config --list-all | sort
 * Configure example::           
 * Using F95 code::              
 * Using C++11 code::            
+* Using C++14 code::
+* Using C++17 code::
 @end menu
 
 @node Using Makevars, Configure example, Configure and cleanup, Configure and cleanup
@@ -1694,7 +1790,7 @@ example @samp{-L} and @samp{-l} options, @emph{via} @code{PKG_LIBS}.
 When writing a @file{Makevars} file for a package you intend to
 distribute, take care to ensure that it is not specific to your
 compiler: flags such as @option{-O2 -Wall -pedantic} (and all other
- at option{-W} flags: for the Solaris compiler these are used to pass
+ at option{-W} flags: for the Oracle compilers these are used to pass
 arguments to compiler phases) are all specific to GCC.
 
 Also, do not set variables such as @code{CPPFLAGS}, @code{CFLAGS} etc.:
@@ -1743,8 +1839,10 @@ point to an external LAPACK library, or may be empty if an external BLAS
 library also contains LAPACK.
 
 [@code{libRlapack} includes all the double-precision LAPACK routines
-current in 2003: a list of which routines are included is in file
- at file{src/modules/lapack/README}.]
+which were current in 2003: a list of which routines are included is in
+file @file{src/modules/lapack/README}. Note that an external LAPACK/BLAS
+library need not do so, as some were `deprecated' (and not compiled by
+default) in LAPACK 3.6.0 in late 2015.]
 
 For portability, the macros @code{BLAS_LIBS} and @code{FLIBS} should
 always be included @emph{after} @code{LAPACK_LIBS} (and in that order).
@@ -1791,7 +1889,7 @@ SLAMC_FFLAGS=$(R_XTRA_FFLAGS) $(FPICFLAGS) $(SHLIB_FFLAGS) $(SAFE_FFLAGS)
 all: $(SHLIB)
 
 slamc.o: slamc.f
-	$(F77) $(SLAMC_FFLAGS) -c -o slamc.o slamc.f
+        $(F77) $(SLAMC_FFLAGS) -c -o slamc.o slamc.f
 @end example
 
 @noindent
@@ -1802,7 +1900,7 @@ infinite looping.  The Windows equivalent was
 all: $(SHLIB)
 
 slamc.o: slamc.f
-	$(F77) $(SAFE_FFLAGS) -c -o slamc.o slamc.f
+        $(F77) $(SAFE_FFLAGS) -c -o slamc.o slamc.f
 @end example
 
 @noindent
@@ -1821,14 +1919,21 @@ all: $(SHLIB)
 $(SHLIB): mylibs
 
 mylibs:
-	(cd subdir; make)
+        (cd subdir; $(MAKE))
 @end example
 
 @noindent
-Be careful to create all the necessary dependencies, as there is a no
+Be careful to create all the necessary dependencies, as there is no
 guarantee that the dependencies of @code{all} will be run in a
 particular order (and some of the @acronym{CRAN} build machines use
-multiple CPUs and parallel makes).
+multiple CPUs and parallel makes).  In particular,
+
+ at example
+all: mylibs
+ at end example
+
+ at noindent
+does @strong{not} suffice.
 
 Note that on Windows it is required that @file{Makevars[.win]} does
 create a DLL: this is needed as it is the only reliable way to ensure
@@ -1904,7 +2009,7 @@ xxx.dll
 where the first and second are conventionally import libraries, the
 third and fourth often static libraries (with @code{.lib} intended for
 Visual C++), but might be import libraries.  See for example
- at uref{http://sourceware.org/@/binutils/@/docs-2.20/@/ld/@/WIN32.html#WIN32}.
+ at uref{https://sourceware.org/@/binutils/@/docs-2.20/@/ld/@/WIN32.html#WIN32}.
 
 The fly in the ointment is that the DLL might not be named
 @file{libxxx.dll}, and in fact on 32-bit Windows there is a
@@ -1926,7 +2031,7 @@ DLL.
 
 There is some support for packages which wish to use
 OpenMP at footnote{@uref{http://www.openmp.org/},
- at uref{http://en.wikipedia.org/@/wiki/@/OpenMP},
+ at uref{https://en.wikipedia.org/@/wiki/@/OpenMP},
 @uref{https://computing.llnl.gov/@/tutorials/@/openMP/}}.  The
 @command{make} macros
 
@@ -1942,10 +2047,11 @@ are available for use in @file{src/Makevars} or @file{src/Makevars.win}.
 Include the appropriate macro in @code{PKG_CFLAGS}, @code{PKG_CPPFLAGS}
 and so on, and also in @code{PKG_LIBS}.  C/C++ code that needs to be
 conditioned on the use of OpenMP can be used inside @code{#ifdef
-SUPPORT_OPENMP}, a macro defined in the header @file{Rconfig.h}
-(@pxref{Platform and version information}) or @code{_OPENMP}: note that
-some toolchains used for @R{} (including most of those using
- at command{clang}) have no OpenMP support at all, not even @file{omp.h}.
+_OPENMP}: note that some toolchains used for @R{} (including that of
+macOS and some others using @command{clang}@footnote{Default builds of
+ at command{clang} 3.8.0 and later have support for OpenMP, but the
+ at code{libomp} run-time library may not be installed.}) have no OpenMP
+support at all, not even @file{omp.h}.
 
 For example, a package with C code written for OpenMP should have in
 @file{src/Makevars} the lines
@@ -1955,21 +2061,63 @@ PKG_CFLAGS = $(SHLIB_OPENMP_CFLAGS)
 PKG_LIBS = $(SHLIB_OPENMP_CFLAGS)
 @end example
 
-There is nothing to say what version of OpenMP is supported: version 3.0
-(May 2008) is supported by recent versions of the Linux, Windows and
-Solaris platforms, but portable packages cannot assume that end users
-have recent versions.  The compilers used on earlier versions of OS X
-had partial support for OpenMP 2.5, but this was not enabled in the
- at acronym{CRAN} build of @R{}.  As from OS X 10.9 @command{clang} is
-used, and the Apple builds currently at footnote{Projects to add it has
-been announced at @uref{http://clang-omp.github.io/} and
- at uref{http://openmp.llvm.org/}, but it is unknown when or even if the
-Apple builds will incorporate it.} have no OpenMP support.
+Note that the macro @code{SHLIB_OPENMP_CXXFLAGS} applies to the default
+C++ compiler and not necessarily to the C++11/14/17 compiler: users of the
+latter should do their own @command{configure} checks (an example is
+available in CRAN package @CRANpkg{ARTP2}).
+
+Some care is needed when compilers are from different families which may
+use different OpenMP runtimes (e.g.@: @command{clang} @emph{vs} GCC
+including @command{gfortran}, although it is currently possible to use
+the @command{clang} runtime with GCC but not @emph{vice versa}).  For a
+package with Fortran 77 code using OpenMP the appropriate lines are
+
+ at example
+PKG_FFLAGS = $(SHLIB_OPENMP_FFLAGS)
+PKG_LIBS = $(SHLIB_OPENMP_CFLAGS)
+ at end example
 
-The performance of OpenMP varies substantially between platforms.  Both
-the Windows and the Apple OS X (where available) implementations have
-substantial overheads and are only beneficial if quite substantial tasks
-are run in parallel.
+ at noindent
+as the C compiler will be used to link the package code (and there is no
+guarantee that this will work everywhere).  (This does not apply to
+Fortran 9x code, where @code{SHLIB_OPENMP_FCFLAGS} should be used in
+both @code{PKG_FCFLAGS} and @code{PKG_LIBS}.)
+
+For portability, any C/C++ code using the @code{omp_*} functions should
+include the @file{omp.h} header: some compilers (but not all) include it
+when OpenMP mode is switched on (e.g.@: @emph{via} flag
+ at option{-fopenmp}).
+
+ at c http://openmp.org/wp/openmp-compilers/
+ at c clang 3.8.x reports 201307 but has full suport only for 3.1 (201111)
+ at c clang 3.9.x reports 201111 but has all but offloading support of 4.0.
+There is nothing at footnote{In most implementations the @code{_OPENMP}
+macro has value a date which can be mapped to an OpenMP version: for
+example, value @code{201307} is the date of version 4.0 (July
+2013). However this may be used to denote the latest version which is
+partially supported, not that which is fully implemented.}  to say what
+version of OpenMP is supported: version 3.1 (and much of 4.0) is
+supported by recent versions at footnote{GCC since 4.7, hence @R{} builds
+for Windows since @R{} 3.3.0, which also support OpenMP 4.0.} of the
+Linux, Windows and Solaris platforms, but portable packages cannot
+assume that end users have recent versions. at footnote{People do use older
+versions of OSes such as Ubuntu 12.04LTS and Debian Wheezy LTS which
+have GCC 4.4.}  macOS currently uses Apple builds of @command{clang}
+with no OpenMP support (even if invoked as @command{gcc} and despite the
+ at command{man} page including the flag @option{-fopenmp} for that
+command).  @uref{http://www.openmp.org/@/resources/@/openmp-compilers}
+gives some idea of what compilers support what versions.
+
+The performance of OpenMP varies substantially between platforms.  The
+Windows implementation has substantial overheads at footnote{as did the
+GCC-based Apple implementation, but not the Intel/LLVM OpenMP runtime
+on macOS.}, so is only beneficial if quite substantial tasks are run in
+parallel.  Also, on Windows new threads are started with the
+default at 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.
+ at c mingw64-public, 2015-02-02.
+ at c http://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
@@ -1989,8 +2137,8 @@ dubious assumptions.  The best way to limit resources is to limit the
 overall number of threads available to OpenMP in the @R{} process: this
 can be done via environment variable @env{OMP_THREAD_LIMIT}, where
 implemented. at footnote{Which it was at the time of writing with GCC,
-Solaris Studio and Intel compilers.}  Alternatively, the number of
-threads per region can be limited by the environment variable
+Oracle, Intel and Clang compilers.}  Alternatively, the
+number of threads per region can be limited by the environment variable
 @env{OMP_NUM_THREADS} or API call @code{omp_set_num_threads}, or,
 better, for the regions in your code as part of their
 specification. E.g.@: @R{} uses
@@ -2035,19 +2183,24 @@ For a tutorial see
 POSIX threads are not normally used on Windows, which has its own native
 concepts of threads.  However, there are two projects implementing
 @code{pthreads} on top of Windows, @code{pthreads-w32} and
- at code{winpthreads} (a recent part of the MinGW-w64 project).
+ at code{winpthreads} (part of the MinGW-w64 project).
 
 Whether Windows toolchains implement @code{pthreads} is up to the
-toolchain provider: the currently recommended toolchain does by default
-provide it.  A @command{make} variable @code{SHLIB_PTHREAD_FLAGS} is
-available: this should be included in both @code{PKG_CPPFLAGS} (or the
-Fortran or F9x equivalents) and @code{PKG_LIBS}.
+toolchain provider.  A @command{make} variable
+ at code{SHLIB_PTHREAD_FLAGS} is available: this should be included in both
+ at code{PKG_CPPFLAGS} (or the Fortran or F9x equivalents) and
+ at code{PKG_LIBS}.
 
 The presence of a working @code{pthreads} implementation cannot be
 unambiguously determined without testing for yourself: however, that
- at samp{_REENTRANT} is defined at footnote{some Windows toolchains have the
+ at samp{_REENTRANT} is defined at footnote{some Windows toolchains had the
 typo @samp{_REENTRANCE} instead.} in C/C++ code is a good indication.
 
+Note that not all @code{pthreads} implementations are equivalent as parts
+are optional (see
+ at uref{http://pubs.opengroup.org/@/onlinepubs/@/009695399/@/basedefs/@/pthread.h.html}):
+for example, macOS lacks the `Barriers' option.
+
 See also the comments on thread-safety and performance under OpenMP: on
 all known @R{} platforms OpenMP is implemented @emph{via}
 @code{pthreads} and the known performance issues are in the latter.
@@ -2094,9 +2247,9 @@ PKG_LIBS = -LCsdp/lib -lsdp $(LAPACK_LIBS) $(BLAS_LIBS) $(FLIBS)
 
 $(SHLIB): Csdp/lib/libsdp.a
 
-Csdp/lib/libsdp.a
-	@@(cd Csdp/lib && $(MAKE) libsdp.a \
-	  CC="$(CC)" CFLAGS="$(CFLAGS) $(CPICFLAGS)" AR="$(AR)" RANLIB="$(RANLIB)")
+Csdp/lib/libsdp.a:      
+        @@(cd Csdp/lib && $(MAKE) libsdp.a \
+          CC="$(CC)" CFLAGS="$(CFLAGS) $(CPICFLAGS)" AR="$(AR)" RANLIB="$(RANLIB)")
 @end smallexample
 
 @noindent
@@ -2104,7 +2257,10 @@ Note the quotes: the macros can contain spaces, e.g.@: @code{CC = "gcc
 -m64 -std=gnu99"}.  Several authors have forgotten about parallel makes:
 the static library in the subdirectory must be made before the shared
 object (@code{$(SHLIB)}) and so the latter must depend on the former.
-Others forget the need for position-independent code.
+Others forget the need at footnote{A few OSes (AIX, IRIX, Windows) do not
+need special flags for such code, but most do---although compilers will
+often generate PIC code when not asked to do so.} for
+position-independent code.
 
 We really do not recommend using @file{src/Makefile} instead of
 @file{src/Makevars}, and as the example above shows, it is not
@@ -2129,9 +2285,9 @@ AC_INIT([RODBC], 1.1.8) dnl package name, version
 dnl A user-specifiable option
 odbc_mgr=""
 AC_ARG_WITH([odbc-manager],
-	    AC_HELP_STRING([--with-odbc-manager=MGR],
-			   [specify the ODBC manager, e.g. odbc or iodbc]),
-	    [odbc_mgr=$withval])
+            AC_HELP_STRING([--with-odbc-manager=MGR],
+                           [specify the ODBC manager, e.g. odbc or iodbc]),
+            [odbc_mgr=$withval])
 
 if test "$odbc_mgr" = "odbc" ; then
   AC_PATH_PROGS(ODBC_CONFIG, odbc_config)
@@ -2140,9 +2296,9 @@ fi
 dnl Select an optional include path, from a configure option
 dnl or from an environment variable.
 AC_ARG_WITH([odbc-include],
-	    AC_HELP_STRING([--with-odbc-include=INCLUDE_PATH],
-			   [the location of ODBC header files]),
-	    [odbc_include_path=$withval])
+            AC_HELP_STRING([--with-odbc-include=INCLUDE_PATH],
+                           [the location of ODBC header files]),
+            [odbc_include_path=$withval])
 RODBC_CPPFLAGS="-I."
 if test [ -n "$odbc_include_path" ] ; then
    RODBC_CPPFLAGS="-I. -I$@{odbc_include_path@}"
@@ -2154,9 +2310,9 @@ fi
 
 dnl ditto for a library path
 AC_ARG_WITH([odbc-lib],
-	    AC_HELP_STRING([--with-odbc-lib=LIB_PATH],
-			   [the location of ODBC libraries]),
-	    [odbc_lib_path=$withval])
+            AC_HELP_STRING([--with-odbc-lib=LIB_PATH],
+                           [the location of ODBC libraries]),
+            [odbc_lib_path=$withval])
 if test [ -n "$odbc_lib_path" ] ; then
    LIBS="-L$odbc_lib_path $@{LIBS@}"
 else
@@ -2258,7 +2414,7 @@ versions of @R{} for Unix OSes still do.}) platforms have no Fortran
 
 This means that portable packages need to be written in correct
 FORTRAN 77, which will also be valid Fortran 95.  See
- at uref{http://developer.R-project.org/@/Portability.html} for reference
+ at uref{https://developer.R-project.org/@/Portability.html} for reference
 resources.  In particular, @emph{free source form} F95 code is not
 portable.
 
@@ -2279,11 +2435,9 @@ accept Fortran 2003 or 2008 code: such code should still use file
 extension @file{.f90} or @file{.f95}.  For platforms using
 @command{gfortran}, you may need to include @option{-std=f2003} or
 @option{-std=f2008} in @code{PKG_FCFLAGS}: the default is `GNU Fortran',
-Fortran 95 with non-standard extensions.  The Solaris @command{f95}
-compiler `accepts some Fortran 2003 features'.  Note that the compiler
-used for OS X <= 10.8 is @command{gfortran 4.2.3} which has limited
-Fortran 2003 support
-(@uref{http://gcc.gnu.org/onlinedocs/gcc-4.2.3/gfortran/}).
+Fortran 95 with non-standard extensions.  The Oracle @command{f95}
+compiler `accepts some Fortran 2003/8 features' (search for `Oracle
+Developer Studio 12.5: Fortran User's Guide' and look for §4.6).
 
 Modern versions of Fortran support modules, whereby compiling one source
 file creates a module file which is then included in others. (Module
@@ -2301,32 +2455,51 @@ to contain something like
 cmi.o dmi.o: iface.o
 @end example
 
- at node Using C++11 code,  , Using F95 code, Configure and cleanup
+ at node Using C++11 code, Using C++14 code, Using F95 code, Configure and cleanup
 @subsection Using C++11 code
 
- at R{} can be built without a C++ compiler although one is available
-(but not necessarily installed) on all known @R{} platforms.  
-For full portability across platforms, all
-that can be assumed is approximate support for the C++98 standard (the
-widely used @command{g++} deviates considerably from the standard).
-Some compilers have a concept of `C++03' (`essentially a bug fix') or
-`C++ Technical Report 1' (TR1), an optional addition to the `C++03' revision
-which was published in 2007.  Finally a revised standard was published
-in 2011 and compilers with fairly complete implementations are becoming
-available.  C++11 added all of the C99 features which are not otherwise
-implemented in C++, and C++ compilers commonly accept C99 extensions to
-C++98. A minor update to C++11 (sometimes known as C++14) was approved
-in August 2014.
-
-From version 3.1.0, @R{} provides support for C++11 in packages, in
-addition to C++98.  This support is not uniform across platforms as
-it depends on the capabilities of the compiler (see below).  When @R{}
-is configured, it will determine whether the C++ compiler supports C++11
+ at R{} can be built without a C++ compiler although one is available (but
+not necessarily installed) on all known @R{} platforms.  For full
+portability across platforms, all that can be assumed is approximate
+support for the C++98 standard (the widely used @command{g++} deviates
+considerably from the standard).  Some compilers have a concept of
+`C++03' (`essentially a bug fix') or `C++ Technical Report 1' (TR1), an
+optional addition to the `C++03' revision which was published in 2007.
+A revised standard was published in 2011 and compilers with pretty much
+complete implementations are available.  C++11 added all of the C99
+features which are not otherwise implemented in C++, and C++ compilers
+commonly accept C99 extensions to C++98.  A minor update at footnote{The
+changes are linked from
+ at 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 has
+been sent to ISO and is likely to be approved in 2017: it is informally
+known as C++17.
+
+What standard a C++ compiler aims to support can be hard to determine:
+the value at footnote{Values @code{199711}, @code{201103L} and
+ at code{201402L} are most commonly used for C++98, C++11 and C++14
+respectively, but some compilers set @code{1L}.} of @code{__cplusplus}
+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
+native at 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
+ at command{clang} using @code{libc++}.}  @code{libc++} headers and library
+includes many C++11 features, and does not support TR1.
+
+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
+depends on the capabilities of the compiler (see below).  When @R{} is
+configured, it will determine whether the C++ compiler supports C++11
 and which compiler flags, if any, are required to enable C++11 support.
 For example, recent versions of @command{g++} or @command{clang++}
 accept the compiler flag @option{-std=c++11}, and earlier versions
-support a flag @option{-std=c++0x}, but the latter only provides partial
-support for the C++11 standard.
+support a flag @option{-std=c++0x}, but the latter only provided partial
+support for the C++11 standard (it later became a deprecated synonym for
+ at option{-std=c++11}).
 
 In order to use C++11 code in a package, the package's @file{Makevars}
 file (or @file{Makevars.win} on Windows) should include the line
@@ -2334,62 +2507,188 @@ file (or @file{Makevars.win} on Windows) should include the line
 @example
 CXX_STD = CXX11
 @end example
+ at noindent
+Compilation and linking will then be done with the C++11 compiler.
 
-Compilation and linking will then be done with the C++11 compiler.  If
-any other value is given to the @samp{CXX_STD} macro it will be ignored.
-(Further options may become available in the future as the C++ standard
-evolves.)
-
-Packages without a @file{Makevars} file may specify that they require
-C++11 by including @samp{C++11} in the @samp{SystemRequirements} field
-of the @file{DESCRIPTION} file, e.g.
+Packages without a @file{src/Makevars} or @file{src/Makefile} file may
+specify that they require C++11 for code in the @file{src} directory by
+including @samp{C++11} in the @samp{SystemRequirements} field of the
+ at file{DESCRIPTION} file, e.g.
 
 @example
 SystemRequirements: C++11
 @end example
 
-If a package does have a @file{Makevars[.win]} file then setting the
+If a package does have a @file{src/Makevars[.win]} file then setting the
 make variable @samp{CXX_STD} is preferred, as it allows @command{R CMD
 SHLIB} to work correctly in the package's @file{src} directory.
 
+Conversely, to ensure that the C++98 standard is assumed even when this
+is not the compiler default, use
+
+ at example
+SystemRequirements: C++98
+ at end example
+ at noindent
+or
+ at example
+CXX_STD = CXX98
+ at end example
+
 The C++11 compiler will be used systematically by R for all C++ code
-if the environment variable @env{USE_CXX1X} is defined (with any
+if the environment variable @env{USE_CXX11} is defined (with any
 value). Hence this environment variable should be defined when invoking
 @command{R CMD SHLIB} in the absence of a @file{Makevars} file (or
 @file{Makevars.win} on Windows) if a C++11 compiler is required.
 
 Further control over compilation of C++11 code can be obtained by
-specifying the macros @samp{CXX1X} and @samp{CXX1XSTD} when @R{} is
+specifying the macros @samp{CXX11} and @samp{CXX11STD} when @R{} is
 configured at footnote{For
 details of these and related macros, see file @file{config.site} in
 the @R{} sources.}, or in a personal or site @file{Makevars} file.
 @ifset UseExternalXrefs
 @xref{Customizing package compilation, , Customizing package compilation,
- R-admin,  R Installation and Administration}.
+R-admin, R Installation and Administration}.
 @end ifset
-If C++11 support is not available then these macros are both
-empty. Otherwise, @samp{CXX1X} defaults to the same value as the C++
-compiler @samp{CXX} and the flag @samp{CXX1XSTD} defaults to
- at option{-std=c++11} or @option{-std=c++0x} (the latter on Windows).  It
-is possible to specify @samp{CXX1X} to be a distinct compiler just for
-C++11--using packages, e.g.@: @command{g++ 4.9.x} on Solaris.  Note
-however that different C++ compilers (and even different versions of the
-same compiler) often differ in their ABI so their outputs can rarely be
-mixed. By setting @samp{CXX1XSTD} it is also possible to choose a
-different dialect of the standard, such as @option{-std=gnu++11}, or
-enable support for the 2014 revision using something like @option{-std=c++14}
-or @option{-std=c++1y}.
-
-As noted above, support for C++11 varies across platforms.  The default
-compiler at footnote{OS X 10.7 and later have @command{clang++} but for
-10.7 and 10.8 it uses the @command{g++} 4.2.x headers.} for OS X (<=
-10.8) is based on GCC 4.2.1 and has no support for anything other than
-the GNU version of C++98 and GNU extensions (which include TR1).  The
-default compiler on Windows is GCC 4.6.x and supports the
- at option{-std=c++0x} flag and some C++11 features (see
- at uref{http://gcc.gnu.org/gcc-4.6/cxx0x_status.html}).  On these
-platforms, it is necessary to select a different compiler for C++11,
- at emph{via} personal or site @file{Makevars} files.
+If C++11 support is not available then these macros are both empty; if
+it is available by default, @samp{CXX11} defaults to @samp{CXX} and
+ at samp{CXX11STD} is empty . Otherwise, @samp{CXX11} defaults to the same
+value as the C++ compiler @samp{CXX} and the flag @samp{CXX11STD}
+defaults to @option{-std=c++11} or similar.  It is possible to specify
+ at samp{CXX11} to be a distinct compiler just for C++11--using packages,
+e.g.@: @command{g++} on Solaris.  Note however that different C++
+compilers (and even different versions of the same compiler) often
+differ in their ABI so their outputs can rarely be mixed. By setting
+ at samp{CXX11STD} it is also possible to choose a different dialect of the
+standard such as @option{-std=c++11}.
+
+As noted above, support for C++11 varies across platforms: on some
+platforms, it may be possible or necessary to select a different
+compiler for C++11, @emph{via} personal or site @file{Makevars} files.
+
+There is no guarantee that C++11 can be used in a package in combination
+with any other compiled language (even C), as the C++11 compiler may be
+incompatible with the native compilers for the platform.  (There are
+known problems mixing C++11 with Fortran.)
+
+If a package using C++11 has a @command{configure} script it is
+essential that it selects the correct compiler, @emph{via} something like
+
+ at example
+CXX11=`"$@{R_HOME@}/bin/R" CMD config CXX11`
+CXX11STD=`"$@{R_HOME@}/bin/R" CMD config CXX11STD`
+CXX="$@{CXX11@} $@{CXX11STD@}"
+CXXFLAGS=`"$@{R_HOME@}/bin/R" CMD config CXX11FLAGS`
+AC_LANG(C++)
+ at end example
+
+ at noindent
+(paying attention to all the quotes required).
+
+If you want to compile C++11 code in a subdirectory, make sure you pass
+down the macros to specify that compiler, e.g.@: in @file{src/Makevars}
+ at example
+sublibs:
+         @@(cd libs && $(MAKE) \
+            CXX="$(CXX11) $(CXX11STD)" CXXFLAGS="$(CXX11FLAGS) $(CXX11PICFLAGS)")
+ at end example
+
+Note that the mechanisms described here specify C++11 for code compiled
+by @command{R CMD SHLIB} as used by default by @command{R CMD INSTALL}.
+They do not necessarily apply if there is a @file{src/Makefile} file,
+nor to compilation done in vignettes or @emph{via} other packages.
+
+ at node Using C++14 code, Using C++17 code, Using C++11 code, Configure and cleanup
+ at subsection Using C++14 code
+
+Support for a C++14 has been explicitly added to @R{} from version
+3.4.0. Similar considerations to C++11 apply, except that the variables
+associated with the C++14 compiler use the prefix @samp{CXX14} instead
+of @samp{CXX11}. Hence to use C++14 code in a package, the package's
+ at file{Makevars} file (or @file{Makevars.win} on Windows) should include
+the line
+ at example
+CXX_STD = CXX14
+ at end example
+
+In the absence of a @file{Makevars} file, C++14 support can also be
+requested by the line:
+ at example
+SystemRequirements: C++14
+ at end example
+ at noindent
+in the @file{DESCRIPTION} file. Finally, the C++14 compiler can be
+used systematically by setting the environment variable @env{USE_CXX17}.
+
+Note that code written for C++11 that emulates features of C++14 will
+not necessarily compile under a C++14 compiler at footnote{As from @R{}
+3.4.0, @command{configure} attempts to supply a C++14 compiler only if
+explicitly requested.  However, earlier versions of @R{} will use the
+default C++14 mode of @command{g++} 6 and later.}, since the emulation
+typically leads to a namespace clash. In order to ensure that the code
+also compiles under C++14, something like the following should be
+done:
+ at example
+#if __cplusplus >= 201402L
+using std::make_unique;
+#else
+// your emulation
+#endif
+ at end example
+
+ at noindent
+Code needing C++14 features would do better to test for their presence
+ at emph{via} `SD-6 feature tests'@footnote{@uref{See
+https://isocpp.org/@/std/@/standing-documents/@/sd-6-sg10-feature-test-recommendations}
+or
+ at uref{http://en.cppreference.com/@/w/@/cpp/@/experimental/@/feature_test}.
+It seems a reasonable assumption that any compiler promising some C++14
+conformance will provide these---e.g.@: @command{g++} 4.9.x did but
+4.8.5 did not.}.  That test could be
+
+ at example
+#include <memory> // header where this is defined
+#if defined(__cpp_lib_make_unique) && (__cpp_lib_make_unique >= 201304)
+using std::make_unique;
+#else
+// your emulation
+#endif
+ at end example
+
+The webpage
+ at 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).
+
+ at node Using C++17 code,  , Using C++14 code, Configure and cleanup
+ at subsection Using C++17 code
+
+Experimental support for C++17 has been added to @R{} version 3.4.0. The
+ at file{configure} script tests a subset of C++17 features.  At the time
+of writing (March 2017) both @code{clang 4.0.0} and the pre-release
+version @code{gcc 7.0.1 (20170314)} pass these tests (with flags
+ at 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.
+
+The variables associated with the C++17 compiler use the prefix
+ at samp{CXX17}.  Hence to use C++17 code in a package, the package's
+ at file{Makevars} file (or @file{Makevars.win} on Windows) should
+include the line
+ at example
+CXX_STD = CXX17
+ at end example
+
+In the absence of a @file{Makevars} file, C++17 support can also be
+requested by the line:
+ at example
+SystemRequirements: C++17
+ at end example
+ at noindent
+in the @file{DESCRIPTION} file. Finally, the C++17 compiler can be
+used systematically by setting the environment variable @env{USE_CXX17}.
 
 @node Checking and building packages, Writing package vignettes, Configure and cleanup, Creating R packages
 @section Checking and building packages
@@ -2614,7 +2913,14 @@ specified in that directory are run.  (Typically they will consist of a
 set of @file{.R} source files and target output files
 @file{.Rout.save}.)  Please note that the comparison will be done in the
 end user's locale, so the target output files should be @acronym{ASCII}
-if at all possible.
+if at all possible.  (The command line option @code{--test-dir=foo} may
+be used to specify tests in a non-standard location.  For example,
+unusually slow tests could be placed in @file{inst/slowTests} and then
+ at code{R CMD check --test-dir=inst/slowTests} would be used to run them.
+Other names that have been suggested are, for example,
+ at file{inst/testWithOracle} for tests that require Oracle to be installed,
+ at file{inst/randomTests} for tests which use random values and may
+occasionally fail by chance, etc.)
 
 @item
 The code in package vignettes (@pxref{Writing package vignettes}) is
@@ -2662,7 +2968,7 @@ this is to minimize differences between platforms.
 Use @kbd{R CMD check --help} to obtain more information about the usage
 of the @R{} package checker.  A subset of the checking steps can be
 selected by adding command-line options. It also allows customization by
-setting environment variables @w{@env{_R_CHECK_*_}:}, as described in
+setting environment variables @w{@env{_R_CHECK_*_}} as described in
 @ifset UseExternalXrefs
 @ref{Tools, , Tools, R-ints, R Internals}:
 @end ifset
@@ -2671,9 +2977,7 @@ setting environment variables @w{@env{_R_CHECK_*_}:}, as described in
 @end ifclear
 a set of these customizations similar to those used by @acronym{CRAN}
 can be selected by the option @option{--as-cran} (which works best if
-Internet access is available at footnote{Windows users behind proxies may
-want to set environment variable @env{R_WIN_INTERNET2} to a non-empty
-value, e.g.@: in @file{~/.R/check_environ}.}).  Some Windows users may
+Internet access is available).  Some Windows users may
 need to set environment variable @env{R_WIN_NO_JUNCTIONS} to a non-empty
 value.  The test of cyclic declarations at footnote{For example, in early
 2014 @CRANpkg{gdata} declared @samp{Imports: gtools} and @CRANpkg{gtools}
@@ -2681,7 +2985,7 @@ declared @samp{Imports: gdata}.}in @file{DESCRIPTION} files needs
 repositories (including @acronym{CRAN}) set: do this in
 @file{~/.Rprofile}, by e.g.@:
 @example
-options(repos = c(CRAN="http://cran.r-project.org"))
+options(repos = c(CRAN="https://cran.r-project.org"))
 @end example
 
 One check customization which can be revealing is
@@ -2689,15 +2993,21 @@ One check customization which can be revealing is
 _R_CHECK_CODETOOLS_PROFILE_="suppressLocalUnused=FALSE"
 @end example
 @noindent
-which reports unused local assigmnents.  Not only does this point out
+which reports unused local assignments.  Not only does this point out
 computations which are unnecessary because their results are unused, it
-also can show errors.  (Two such are to intend to update an object by
+also can uncover errors.  (Two such are to intend to update an object by
 assigning a value but mistype its name or assign in the wrong scope,
 for example using @code{<-} where @code{<<-} was intended.)  This can
 give false positives, most commonly because of non-standard evaluation
 for formulae and because the intention is to return objects in the
 environment of a function for later use.
 
+Complete checking of a package which contains a file @file{README.md}
+needs @command{pandoc} installed: see
+ at uref{http://johnmacfarlane.net/@/pandoc/@/installing.html}.  This
+should be reasonably current: at the time of writing @acronym{CRAN} used
+version 1.12.4.2 to process these files.
+
 You do need to ensure that the package is checked in a suitable locale
 if it contains non- at acronym{ASCII} characters.  Such packages are likely
 to fail some of the checks in a @code{C} locale, and @command{R CMD
@@ -2724,7 +3034,7 @@ to check the primary sub-architecture, and then to use something like
 @command{R --arch=x86_64 CMD check --extra-arch} or (Windows)
 @command{/path/to/R/bin/x64/Rcmd check --extra-arch} to run for each
 additional sub-architecture just the checks at footnote{loading, examples,
-tests, runnning vignette code} which differ by sub-architecture.  (This
+tests, running vignette code} which differ by sub-architecture.  (This
 approach is required for packages which are installed by @command{R CMD
 INSTALL --merge-multiarch}.)
 
@@ -2746,7 +3056,7 @@ Packages may be distributed in source form as ``tarballs''
 (@file{.tar.gz} files) or in binary form. The source form can be
 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 OS X platforms.
+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).
@@ -2766,19 +3076,20 @@ To exclude files from being put into the package, one can specify a list
 of exclude patterns in file @file{.Rbuildignore} in the top-level source
 directory.  These patterns should be Perl-like regular expressions (see
 the help for @code{regexp} in @R{} for the precise details), one per
-line, to be matched case-insensitively at footnote{on all platforms from
- at R{} 3.1.0.} against the file and directory names relative to the
-top-level package source directory.  In addition, directories from
-source control systems at footnote{called @file{CVS} or @file{.svn} or
- at file{.arch-ids} or @file{.bzr} or @file{.git} (but not files called
- at file{.git}) or @file{.hg}.} or from @command{eclipse}@footnote{called
- at file{.metadata}.}, directories with names ending @file{.Rcheck} or
- at file{Old} or @file{old} and files @file{GNUMakefile},
- at file{Read-and-delete-me} or with base names starting with @samp{.#}, or
-starting and ending with @samp{#}, or ending in @samp{~}, @samp{.bak} or
- at samp{.swp}, are excluded by default.  In addition, those files in the
- at file{R}, @file{demo} and @file{man} directories which are flagged by
- at command{R CMD check} as having invalid names will be excluded.
+line, to be matched case-insensitively against the file and directory
+names relative to the top-level package source directory.  In addition,
+directories from source control systems at footnote{called @file{CVS} or
+ at file{.svn} or @file{.arch-ids} or @file{.bzr} or @file{.git} (but not
+files called @file{.git}) or @file{.hg}.} or from
+ at command{eclipse}@footnote{called @file{.metadata}.}, directories with
+names ending @file{.Rcheck} or @file{Old} or @file{old} and files
+ at file{GNUMakefile}@footnote{which is an error: GNU make uses
+ at file{GNUmakefile}.}, @file{Read-and-delete-me} or with base names
+starting with @samp{.#}, or starting and ending with @samp{#}, or ending
+in @samp{~}, @samp{.bak} or @samp{.swp}, are excluded by default.  In
+addition, those files in the @file{R}, @file{demo} and @file{man}
+directories which are flagged by @command{R CMD check} as having invalid
+names will be excluded.
 
 Use @kbd{R CMD build --help} to obtain more information about the usage
 of the @R{} package builder.
@@ -2867,7 +3178,7 @@ packages.  They contain compiled shared libraries rather than C, C++ or
 Fortran source code, and the R functions are included in their installed
 form.  The format and filename are platform-specific; for example, a
 binary package for Windows is usually supplied as a @file{.zip} file,
-and for the OS X platform the default binary package file extension is
+and for the macOS platform the default binary package file extension is
 @file{.tgz}.
 
 The recommended method of building binary packages is to use
@@ -2909,9 +3220,8 @@ will be installed as a subdirectory of @file{location}, and the package binary
 will be created in the current directory.
 
 Other options for @command{R CMD INSTALL} can be found using @command{R
-CMD INSTALL --help}, and platform-specific details for special cases
-(e.g. handling Fortran sources on OS X) are discussed in the
-platform-specific FAQs.
+CMD INSTALL --help}, and platform-specific details for special cases are
+discussed in the platform-specific FAQs.
 
 
 @c In much earlier versions of @R{}, @command{R CMD build --binary} could
@@ -2921,7 +3231,7 @@ platform-specific FAQs.
 
 Finally, at least one web-based service is available for building binary
 packages from (checked) source code: WinBuilder (see
- at uref{http://win-builder.R-project.org/}) is able to build Windows
+ at uref{https://win-builder.R-project.org/}) is able to build Windows
 binaries. Note that this is intended for developers on other platforms
 who do not have access to Windows but wish to provide binaries for the
 Windows platform.
@@ -2952,7 +3262,7 @@ or underscore.
 A special case is @emph{package vignettes}.  Vignettes are documents in
 PDF or @HTML{} format obtained from plain text literate source files
 from which @R{} knows how to extract @R{} code and create output (in
-PDF/@HTML{} or intermediate (La)@TeX{}).  Vignette engines do this work,
+PDF/@HTML{} or intermediate @LaTeX{}).  Vignette engines do this work,
 using ``tangle'' and ``weave'' functions respectively.  Sweave, provided
 by the R distribution, is the default engine.  Since @R{} version 3.0.0,
 other vignette engines besides Sweave are supported; see @ref{Non-Sweave
@@ -2983,7 +3293,10 @@ placing them in the @file{inst/doc} hierarchy of the source package or
 by using calls to @code{system.file()}.  All other files needed to
 re-make the vignettes (such as @LaTeX{} style files, Bib at TeX{} input
 files and files for any figures not created by running the code in the
-vignette) must be in the vignette source directory.
+vignette) must be in the vignette source directory.  @code{R CMD check} 
+will check that vignette production has succeeded by comparing
+modification times of output files in @file{inst/doc} with
+the source in @file{vignettes}.
 
 @code{R CMD build} will automatically at footnote{unless inhibited by using
 @samp{BuildVignettes: no} in the @file{DESCRIPTION} file.} create the
@@ -3026,10 +3339,10 @@ all: pdf clean
 pdf: ABC-intro.pdf ABC-details.pdf
 
 %.pdf:  %.tex
-	texi2dvi --pdf $*
+        texi2dvi --pdf $*
 
 clean:
-	rm *.tex ABC-details-*.pdf
+        rm *.tex ABC-details-*.pdf
 @end example
 
 @noindent
@@ -3059,8 +3372,8 @@ the package.  If you do supply a @file{inst/doc/index.html} file it
 should contain relative links only to files under the installed
 @file{doc} directory, or perhaps (not really an index) to @HTML{} help
 files or to the @file{DESCRIPTION} file, and be valid @HTML{} as
-confirmed via the @uref{http://validator.w3.org, W3C Markup Validation
-Service} or @uref{http://validator.nu/, Validator.nu}.
+confirmed via the @uref{https://validator.w3.org, W3C Markup Validation
+Service} or @uref{https://validator.nu/, Validator.nu}.
 
 Sweave/Stangle allows the document to specify the @code{split=TRUE}
 option to create a single @R{} file for each code chunk: this will not
@@ -3099,7 +3412,7 @@ tangle functions are called on the vignette source, it will be converted
 to the encoding of the current @R{} session.
 
 @code{Stangle()} will produce an @R{} code file in the current locale's
-encoding: for a non- at acronym{ASCII} vignette what that is recorded in a
+encoding: for a non- at acronym{ASCII} vignette what that is is recorded in a
 comment at the top of the file.
 
 @code{Sweave()} will produce a @file{.tex} file in the current
@@ -3110,15 +3423,26 @@ need to be declared to @LaTeX{} via a line like
 @end example
 @noindent
 (It is also possible to use the more recent @samp{inputenx} @LaTeX{}
-package.)  If the encoding is UTF-8, this can also be declared using
+package.) For files where this line is not needed (e.g. chapters
+included within the body of a larger document, or non-Sweave
+vignettes), the encoding may be declared using a comment like
+ at example
+%\VignetteEncoding@{UTF-8@}
+ at end example
+ at noindent
+If the encoding is UTF-8, this can also be declared using
 the declaration
 @example
-%!\SweaveUTF8
+%\SweaveUTF8
 @end example
 @noindent
-but be aware that @LaTeX{} may require the @samp{usepackage} declaration.
- at command{R CMD check} will warn about any non- at acronym{ASCII}
-vignettes it finds which do not have one of these declarations.
+If no declaration is given in the vignette, it will be assumed to be
+in the encoding declared for the package.  If there is no encoding
+declared in either place, then it is an error to use non- at acronym{ASCII}
+characters in the vignette.
+
+In any case, be aware that @LaTeX{} may require the @samp{usepackage}
+declaration.
 
 @code{Sweave()} will also parse and evaluate the @R{} code in each
 chunk.  The @R{} output will also be in the current locale (or @acronym{UTF-8}
@@ -3148,10 +3472,10 @@ would have been in the locale's encoding.
 @node Non-Sweave vignettes,  , Encodings and vignettes, Writing package vignettes
 @subsection Non-Sweave vignettes
 
- at R{} 3.0.0 and later allow vignettes in formats other than Sweave by
-means of ``vignette engines''.  For example @CRANpkg{knitr} version 1.1
-or later can create @file{.tex} files from a variation on Sweave format,
-and @file{.html} files from a variation on ``markdown'' format. These
+Vignettes in formats other than Sweave are supported @emph{via}
+``vignette engines''.  For example @CRANpkg{knitr} version 1.1 or later
+can create @file{.tex} files from a variation on Sweave format, and
+ at file{.html} files from a variation on ``markdown'' format. These
 engines replace the @code{Sweave()} function with other functions to
 convert vignette source files into @LaTeX{} files for processing into
 @file{.pdf}, or directly into @file{.pdf} or @file{.html} files. The
@@ -3195,7 +3519,7 @@ to register those engines in the package @code{.onLoad} function.
 For example, that function could make the call
 @example
 tools::vignetteEngine("knitr", weave = vweave, tangle = vtangle,
-		      pattern = "[.]Rmd$", package = "knitr")
+                      pattern = "[.]Rmd$", package = "knitr")
 @end example
 @noindent
 (The actual registration in @CRANpkg{knitr} is more complicated, because
@@ -3213,7 +3537,7 @@ package should be @emph{exported} to make them available to package
 users, and which variables should be @emph{imported} from other
 packages.
 
-The mechanism for specifying a namespace for a package is to place a
+The namespace for a package is specified by the
 @file{NAMESPACE} file in the top level package directory.  This file
 contains @emph{namespace directives} describing the imports and exports
 of the namespace.  Additional directives register any shared objects to
@@ -3246,10 +3570,6 @@ functions in the package.  If not found locally, @R{} searches the
 package namespace first, then the imports, then the base namespace and
 then the normal search path.
 
-Prior to @R{} 2.14.0, namespaces were optional in packages: a default
-namespace was generated on installation in 2.14.x and 2.15.x.  As from
-3.0.0 a namespace is mandatory.
-
 
 @menu
 * Specifying imports and exports::  
@@ -3320,7 +3640,21 @@ importFrom(foo, f, g)
 @noindent
 specifies that the exported variables @code{f} and @code{g} of the
 package @pkg{foo} are to be imported.  Using @code{importFrom}
-selectively rather than @code{import} is good practice.
+selectively rather than @code{import} is good practice and recommended
+notably when importing from packages with more than a dozen exports.
+
+To import every symbol from a package but for a few exceptions,
+pass the @code{except} argument to @code{import}. The directive
+
+ at example
+import(foo, except=c(bar, baz))
+ at end example
+
+ at noindent
+imports every symbol from @pkg{foo} except @code{bar} and
+ at code{baz}. The value of @code{except} should evaluate to something
+coercible to a character vector, after substituting each symbol for
+its corresponding string.
 
 It is possible to export variables from a namespace which it has
 imported from other namespaces: this has to be done explicitly and not
@@ -3378,9 +3712,6 @@ S3method(print, check_so_symbols, .print.via.format)
 @noindent
 when @code{print.check_so_symbols} is not needed.
 
-There used to be a limit on the number of @code{S3method} directives: it
-was @code{500} prior to @R{} 3.0.2.
-
 @node Load hooks, useDynLib, Registering S3 methods, Package namespaces
 @subsection Load hooks
 
@@ -3399,16 +3730,15 @@ exported.
 @findex .onUnload
 @findex .onDetach
 @findex .Last.lib
-Packages can use a @code{.onDetach} (as from @R{} 3.0.0) or @code{.Last.lib}
-function (provided the latter is exported from the namespace) when
- at code{detach} is called on the package.  It is called with a single
-argument, the full path to the installed package.  There is also a hook
- at code{.onUnload} which is called when the namespace is unloaded
-(@emph{via} a call to @code{unloadNamespace}, perhaps called by
- at code{detach(unload = TRUE)}) with argument the full path to the installed
-package's directory.  @code{.onUnload} and @code{.onDetach} should be
-defined in the namespace and not exported, but @code{.Last.lib} does
-need to be exported.
+Packages can use a @code{.onDetach} or @code{.Last.lib} function
+(provided the latter is exported from the namespace) when @code{detach}
+is called on the package.  It is called with a single argument, the full
+path to the installed package.  There is also a hook @code{.onUnload}
+which is called when the namespace is unloaded (@emph{via} a call to
+ at code{unloadNamespace}, perhaps called by @code{detach(unload = TRUE)})
+with argument the full path to the installed package's directory.
+ at code{.onUnload} and @code{.onDetach} should be defined in the namespace
+and not exported, but @code{.Last.lib} does need to be exported.
 
 Packages are not likely to need @code{.onAttach} (except perhaps for a
 start-up banner); code to set options and load shared objects should be
@@ -3479,7 +3809,9 @@ rather than
 There are at least two benefits to this approach.  Firstly, the symbol
 lookup is done just once for each symbol rather than each time the
 routine is invoked.  Secondly, this removes any ambiguity in resolving
-symbols that might be present in several compiled DLLs.
+symbols that might be present in several compiled DLLs.  However, this
+approach is nowadays deprecated in favour of supplying registration
+information (see below).
 
 In some circumstances, there will already be an @R{} variable in the
 package with the same name as a native symbol. For example, we may have
@@ -3549,13 +3881,17 @@ type of the parameters.  Using the @code{.registration} argument of
 following registration information for a DLL named @code{myDLL}:
 
 @example
-R_CMethodDef cMethods[] = @{
-   @{"foo", (DL_FUNC) &foo, 4, @{REALSXP, INTSXP, STRSXP, LGLSXP@}@},
+static R_NativePrimitiveArgType foo_t[] = @{
+    REALSXP, INTSXP, STRSXP, LGLSXP
+@};
+
+static const R_CMethodDef cMethods[] = @{
+   @{"foo", (DL_FUNC) &foo, 4, foo_t@},
    @{"bar_sym", (DL_FUNC) &bar, 0@},
-   @{NULL, NULL, 0@}
+   @{NULL, NULL, 0, NULL@}
 @};
 
-R_CallMethodDef callMethods[] = @{
+static const R_CallMethodDef callMethods[] = @{
    @{"R_call_sym", (DL_FUNC) &R_call, 4@},
    @{"R_version_sym", (DL_FUNC) &R_version, 0@},
    @{NULL, NULL, 0@}
@@ -3600,10 +3936,12 @@ which makes the @R{} variables corresponding to the FORTRAN symbols
 @code{F_bkde} and so on, and so avoid clashes with @R{} code in the
 namespace.
 
+ at strong{NB}: Using these arguments for a package which does not register
+native symbols merely slows down the package loading (although at the
+time of writing 90 @acronym{CRAN} packages did so).  Once symbols are
+registered, check that the corresponding @R{} variables are not
+accidentally exported by a pattern in the @file{NAMESPACE} file.
 
- at c More information about this symbol lookup, along with some approaches
- at c for customizing it, is available from
- at c @uref{http://www.omegahat.org/@/examples/@/RDotCall}.
 
 @node An example, Namespaces with S4 classes and methods, useDynLib, Package namespaces
 @subsection An example
@@ -3699,11 +4037,11 @@ importFrom("graphics", plot)
 importFrom("stats", optim, qchisq)
 ## For these, we define methods or (AIC, BIC, nobs) an implicit generic:
 importFrom("stats", AIC, BIC, coef, confint, logLik, nobs, profile,
-	   update, vcov)
+           update, vcov)
 exportClasses(mle, profile.mle, summary.mle)
 ## All methods for imported generics:
 exportMethods(coef, confint, logLik, plot, profile, summary,
-	      show, update, vcov)
+              show, update, vcov)
 ## implicit generics which do not have any methods here
 export(AIC, BIC, nobs)
 @end example
@@ -3843,14 +4181,21 @@ actions are needed).
 @item
 If your package has a @file{Makevars} or @file{Makefile} file, make sure
 that you use only portable make features.  Such files should be
-LF-terminated (including the final line of the file) and not make use of
-GNU extensions.  Commonly misused GNU extensions are conditional
-inclusions (@code{ifeq} and the like), @code{$@{shell ...@}} and
- at code{$@{wildcard ...@}}, and the use of @code{+=} 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.
+LF-terminated at footnote{Solaris @command{make} does not accept
+CRLF-terminated Makefiles; Solaris warns about and some other
+ at command{make}s ignore incomplete final lines.} (including the final
+line of the file) and not make use of GNU extensions.  (The POSIX
+specification is available at
+ 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
+ at 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.@:
 
@@ -3860,78 +4205,140 @@ PKG_CPPFLAGS = `gsl-config --cflags`
 
 @noindent
 which works in all versions of @command{make} known at footnote{GNU make,
-BSD make as in FreeBSD, AT&T make as implemented on Solaris.} to be used
-with @R{}.
+BSD make formerly in FreeBSD and macOS, AT&T make as implemented on
+Solaris, @command{pmake} in FreeBSD, `Distributed Make' (@code{dmake}),
+part of Oracle Studio and available in other versions.} to be used with
+ at R{}.
 
-If you really must assume GNU make, declare it in the @file{DESCRIPTION}
+If you really must require GNU make, declare it in the @file{DESCRIPTION}
 file by
 
 @example
 SystemRequirements: GNU make
 @end example
 
+ at noindent
+and ensure that you use the value of environment variable @env{MAKE}
+(and not just @command{make}) in your scripts.  (On some platforms GNU
+make is available under a name such as @command{gmake}, and there
+ at code{SystemRequirements} is used to set @env{MAKE}.)
+
+If you only need GNU make for parts of the package which are rarely
+needed (for example to create bibliography files under
+ at file{vignettes}), use a file called @file{GNUmakefile} rather than
+ at file{Makefile} as GNU make (only) will use the former.
+
 Since the only viable make for Windows is GNU make, it is permissible to
 use GNU extensions in files @file{Makevars.win} or @file{Makefile.win}.
 
-Moreover, Bash extensions also need to be avoided in shell scripts,
-including expressions in Makefiles (which are passed to the shell for
-processing).  Some @R{} platforms use strictly POSIX-conformant Bourne
-shells, and Windows and some Unix-alike OSes use @command{ash}
-(@uref{http://en.wikipedia.org/wiki/Almquist_shell}), a rather minimal
-shell with few builtins.  Beware of assuming that all the POSIX
-command-line utilities are available, especially on Windows where only a
-minimal set is provided for use with @R{}.
+ at item
+Bash extensions also need to be avoided in shell scripts, including
+expressions in Makefiles (which are passed to the shell for processing).
+Some @R{} platforms use strict at footnote{For example, @command{test}
+options @option{-a} and @option{-e} are not portable, and not supported
+in the AT&T Bourne shell used on Solaris 10/11, even though they are in
+the 2008 POSIX standard.  Nor does Solaris support @samp{$(@var{cmd})}.}
+Bourne shells: the @R{} toolset on Windows and some Unix-alike OSes use
+ at command{ash} (@uref{https://en.wikipedia.org/@/wiki/@/Almquist_shell}),
+a rather minimal shell with few builtins.  Beware of assuming that all
+the POSIX command-line utilities are available, especially on Windows
+where only a minimal set is provided for use with @R{}.
 @ifset UseExternalXrefs
 (@xref{The command line tools, , The command line tools,
 R-admin, R Installation and Administration}.)
 @end ifset
 One particular issue is the use of @command{echo}, for which two
 behaviours are allowed
-(@uref{http://pubs.opengroup.org/onlinepubs/9699919799/utilities/echo.html})
+(@uref{http://pubs.opengroup.org/@/onlinepubs/@/9699919799/@/utilities/@/echo.html})
 and both occur as defaults on @R{} platforms: portable applications
-should not use @option{-n} (as the first argument) nor escape sequences.
+should not use @option{-n} (as the first argument) nor escape
+sequences. Another common issue is the construction
+ at example
+export FOO=value
+ at end example
+ at noindent
+which is bash-specific (first set the variable then export it by name).
 
 @item
 Make use of the abilities of your compilers to check the
-standards-conformance of your code.  For example, @command{gcc} can be
-used with options @option{-Wall -pedantic} to alert you to potential
-problems.  This is particularly important for C++, where @code{g++ -Wall
--pedantic} will alert you to the use of GNU extensions which fail to
-compile on most other C++ compilers. If @R{} was not configured
-accordingly, one can achieve this @emph{via} personal @file{Makevars}
-files.
+standards-conformance of your code.  For example, @command{gcc} and
+ at command{gfortran}@footnote{@uref{http://fortranwiki.org/@/fortran/@/show/Modernizing+Old+Fortran}
+may help explain some of the warnings from @command{gfortran -Wall
+-pedantic}.}  can be used with options @option{-Wall -pedantic} to alert
+you to potential problems.  This is particularly important for C++,
+where @code{g++ -Wall -pedantic} will alert you to the use of some of
+the GNU extensions which fail to compile on most other C++ compilers. If
+ at R{} was not configured accordingly, one can achieve this @emph{via}
+personal @file{Makevars} files.
 @ifset UseExternalXrefs
 @xref{Customizing package compilation, , Customizing package compilation,
- R-admin,  R Installation and Administration},
+R-admin, R Installation and Administration},
 @end ifset
 
-Although there is a 2011 version of the C++ standard, even partial
-implementations are not universally available.  Portable C++ code needs
-to follow the 1998 standard (and not use features from C99).  See also
- at ref{Using C++11 code} to specify a C++11 compiler.
+Portable C++ code needs to follow the 1998 standard (and not use
+features from C99), or to specify a C++11 compiler (see @ref{Using C++11
+code}) where available (which is not the case on all @R{} platforms).
 
 If you use FORTRAN 77, @code{ftnchek}
 (@uref{http://www.dsm.fordham.edu/@/~ftnchek/}) provides thorough testing
 of conformance to the standard.
 
+If using Fortran 9x with the GNU compiler, use the flags
+ at option{-std=f95 -Wall -pedantic} which reject most GNU extensions and
+features from later standards.
+
+ at R{} has tested that @code{DOUBLE COMPLEX} works (although an extension
+to the Fortran standards) and so is preferred to @code{COMPLEX*16}.
+(Fortran 9x code can use something like
+ at code{COMPLEX(KIND=KIND(0.0D0))}@footnote{See
+ at uref{http://people.ds.cam.ac.uk/nmm1/fortran/paper_07.pdf}.}.)
+
+
+Not all common @R{} platforms conform to the expected standards, e.g.@:
+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.
+
+ at item
+ at command{R CMD check} performs some checks for non-portable
+compiler/linker flags in @file{src/Makevars}.  However, it cannot check
+the meaning of such flags, and some are commonly accepted but with
+compiler-specific meanings.  There are other non-portable flags which
+are not checked, nor are @file{src/Makefile} files and makefiles in
+sub-directories.  As a comment in the code says
+
+ at quotation
+It is hard to think of anything apart from @option{-I*} and @option{-D*}
+that is safe for general use @dots{}
+ at end quotation
+
+ at noindent
+although @option{-pthread} is pretty close to portable.  (Option
+ at option{-U} is portable but little use on the command line as it will
+only cancel built-in defines (not portable) and those defined earlier on
+the command line (@R{} does not use any).)
+
 @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
 on some @R{} platforms (including 64-bit Windows), but 64-bit on most
 modern Unix and Linux platforms.  It is rather unlikely that the use of
 @code{long} in C code has been thought through: if you need a longer
-type than @code{int} you should use a configure test for a C99 type such
-as @code{int_fast64_t} (and failing that, @code{long long} @footnote{but
-note that @code{long long} is not a standard C++ type, and C++ compilers
-set up for strict checking will reject it.}) and typedef your own type
-to be @code{long} or @code{long long}, or use another suitable type
-(such as @code{size_t}).
+type than @code{int} you should use a configure test for a C99/C++11
+type such as @code{int_fast64_t} (and failing that, @code{long long}
+ at footnote{but note that @code{long long} is not a standard C++98 type,
+and C++ compilers set up for strict checking will reject it.}) and
+typedef your own type to be @code{long} or @code{long long}, or use
+another suitable type (such as @code{size_t}).
 
 It is not safe to assume that @code{long} and pointer types are the same
 size, and they are not on 64-bit Windows.  If you need to convert
-pointers to and from integers use the C99 integer types @code{intptr_t}
-and @code{uintptr_t} (which are defined in the header @code{<stdint.h>}
-and are not required to be implemented by the C99 standard).
+pointers to and from integers use the C99/C++11 integer types
+ at code{intptr_t} and @code{uintptr_t} (which are defined in the header
+ at code{<stdint.h>} and are not required to be implemented by the C99
+standard but are used in C code by @R{} itself).
 
 Note that @code{integer} in @acronym{FORTRAN} corresponds to @code{int}
 in C on all @R{} platforms.
@@ -3988,6 +4395,19 @@ and checking if any of the symbols marked @code{U} is unexpected is a
 good way to avoid this.
 
 @item
+Linkers have a lot of freedom in how to resolve entry points in
+dynamically-loaded code, so the results may differ by platform.  One
+area that has caused grief is packages including copies of standard
+system software such as @code{libz} (especially those already linked
+into @R{}).  In the case in point, entry point @code{gzgets} was
+sometimes resolved against the old version compiled into the package,
+sometimes against the copy compiled into @R{} and sometimes against the
+system dynamic library.  The only safe solution is to rename the entry
+points in the copy in the package.  We have even seen problems with
+entry point name @code{myprintf}, which is a system entry
+point at footnote{in @file{libselinux}.} on some Linux systems.
+
+ at item
 Conflicts between symbols in DLLs are handled in very platform-specific
 ways.  Good ways to avoid trouble are to make as many symbols as
 possible static (check with @code{nm -pg}), and to use names which are
@@ -3996,6 +4416,15 @@ wrong).  Note that symbol names starting with @code{R_} are regarded as
 part of @R{}'s namespace and should not be used in packages.
 
 @item
+It is good practice for DLLs to register their symbols
+(@pxref{Registering native routines}), restrict visibility
+(@pxref{Controlling visibility}) and not allow symbol search
+(@pxref{Registering native routines}).  It should be possible for a DLL
+to have only one visible symbol, @code{R_init_ at var{pkgname}}, on
+suitable platforms at footnote{At least Linux and Windows, but not macOS.},
+which would completely avoid symbol conflicts.
+
+ at item
 It is not portable to call compiled code in @R{} or other packages
 @emph{via} @code{.Internal}, @code{.C}, @code{.Fortran}, @code{.Call} or
 @code{.External}, since such interfaces are subject to change without
@@ -4008,7 +4437,7 @@ Where possible @command{R CMD build} will replace them by copies.
 
 @item
 If you do not yourself have a Windows system, consider submitting your
-source package to WinBuilder (@uref{http://win-builder.r-project.org/})
+source package to WinBuilder (@uref{https://win-builder.r-project.org/})
 before distribution.
 
 @item
@@ -4016,6 +4445,110 @@ It is bad practice for package code to alter the search path using
 @code{library}, @code{require} or @code{attach} and this often does not
 work as intended.  For alternatives, see @ref{Suggested packages} and
 @code{with}.
+
+ at item
+Examples can be run interactively @emph{via} @code{example} as well as
+in batch mode when checking.  So they should behave appropriately in
+both scenarios, conditioning by @code{interactive()} the parts which
+need an operator or observer.  For instance, progress
+bars at footnote{except perhaps the simplest kind as used by
+ at code{download.file()} in non-interactive use.} are only appropriate in
+interactive use, as is displaying help pages or calling @code{View()}
+(see below).
+
+ at item
+Be careful with the order of entries in macros such as @code{PKG_LIBS}.
+Some linkers will re-order the entries, and behaviour can differ between
+dynamic and static libraries.  Generally @option{-L} options should
+precede at footnote{Whereas the GNU linker reorders so @option{-L} options
+are processed first, the Solaris one does not.} the libraries (typically
+specified by @option{-l} options) to be found from those directories,
+and libraries are searched once in the order they are specified.  Not
+all linkers allow a space after @option{-L} .
+
+ at item
+Care is needed with the use of @code{LinkingTo}.  This puts one or more
+directories on the include search path ahead of system headers but
+(prior to @R{} 3.4.0) after those specified in the @code{CPPFLAGS} macro
+of the @R{} build (which normally includes @code{-I/usr/local/include},
+but most platforms ignore that and include it with the system headers).
+
+Any confusion would be avoided by having @code{LinkingTo} headers in a
+directory named after the package.  In any case, name conflicts of
+headers and directories under package @file{include} directories should
+be avoided, both between packages and between a package and system and
+third-party software.
+
+ at item
+The @command{ar} utility is often used in makefiles to make static
+libraries.  Its modifier @code{u} is defined by POSIX but is disabled in
+GNU @command{ar} on some recent Linux distributions which use
+`deterministic mode'.  The safest way to make a static library is to first
+remove any existing file of that name then use @command{ar -cr} and then
+ at command{ranlib} if needed (which is system-dependent: on most
+systems at footnote{some versions of macOS did not.} @command{ar} always
+maintains a symbol table).  The POSIX standard says options should be
+preceded by a hyphen (as in @option{-cr}), although most OSes accept
+them without.
+ at c flowWorkspace failed on macOS in Mar 2016 because a wildcard spec was empty
+Note that on some systems @command{ar -cr} must have at least one file
+specified.
+
+ at item
+Some people have a need to set a locale.  Locale names are not portable,
+and e.g.@: @samp{fr_FR.utf8} is commonly used on Linux but not accepted on
+either Solaris or macOS.  @samp{fr_FR.UTF-8} is more portable, being
+accepted on recent Linux, AIX, FreeBSD, macOS and Solaris (at least).
+However, some Linux distributions micro-package, so locales defined by
+ at pkg{glibc} (including these examples) may not be installed.
+
+ at item
+Avoid spaces in file names, not least as they can cause difficulties for
+external tools.  A recent example was a package with a @CRANpkg{knitr}
+vignette that used spaces in plot names: this caused some versions of
+ at command{pandoc} to fail with a baffling error message.
+ at c msmtools in June 2016 failed with pandoc 1.12 but not 1.16.
+
+Non-ASCII filenames can also cause problems (particularly in non-UTF-8
+locales).
+
+ at item
+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
+ at example
+.jinit()
+jv <- .jcall("java/lang/System", "S", "getProperty", "java.runtime.version")
+jvn <- as.numeric(paste0(strsplit(jv, "[.]")[[1L]][1:2], collapse = "."))
+if(jvn < 1.8) stop("Java 8 is needed for this package but not available")
+ at end example
+
+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.
+
+ at item
+A package with a hard-to-satisfy system requirement is by definition not
+portable, annoyingly so if this is not declared in the
+ at samp{SystemRequirements} field.  The most common example is the use of
+ at command{pandoc}, which is only available for a very limited range of
+platforms (and has onerous requirements to install from source) and has
+capabilities at 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
+ at samp{SystemRequirements} field.
+
+ at 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.
 @end itemize
 
 Do be careful in what your tests (and examples) actually test.  Bad
@@ -4066,8 +4599,10 @@ was 64-bit on HP/PA Linux.
 If you must try to establish a tolerance empirically, configure and
 build @R{} with @option{--disable-long-double} and use appropriate
 compiler flags (such as @option{-ffloat-store} and
- at option{-fexcess-precision=standard} for @command{gcc}) to mitigate the
-effects of extended-precision calculations.
+ at option{-fexcess-precision=standard} for @command{gcc}, depending on the
+CPU type at footnote{These are not needed for the default compiler settings
+on @cputype{x86_64} but are likely to be needed on @cputype{ix86}.}) to
+mitigate the effects of extended-precision calculations.
 
 Tests which involve random inputs or non-deterministic algorithms should
 normally set a seed or be tested for many seeds.
@@ -4085,16 +4620,16 @@ viewer and take many minutes to print (if they can be printed at all).
 @command{qpdf} (@uref{http://qpdf.sourceforge.net/}) can compress
 losslessly.  It is fairly readily available (e.g.@: it has binaries for
 Windows and packages in Debian/Ubuntu/Fedora, and is installed as part
-of the @acronym{CRAN} OS X distribution of @R{}).  @command{R CMD build}
+of the @acronym{CRAN} macOS distribution of @R{}).  @command{R CMD build}
 has an option to run @command{qpdf} over PDF files under @file{inst/doc}
 and replace them if at least 10Kb and 10% is saved.  The full path to
 the @command{qpdf} command can be supplied as environment variable
- at env{R_QPDF} (and is on the CRAN binary of @R{} for OS X).  It seems
+ at env{R_QPDF} (and is on the @acronym{CRAN} binary of @R{} for macOS).  It seems
 MiKTeX does not use PDF object compression and so @command{qpdf} can
 reduce considerably the files it outputs: MiKTeX can be overridden by
 code in the preamble of an Sweave or @LaTeX{} file --- see how this is
 done for the @R{} reference manual at
- at uref{https://svn.r-project.org/R/trunk/doc/manual/refman.top}.
+ at uref{https://svn.r-project.org/@/R/@/trunk/@/doc/@/manual/@/refman.top}.
 
 Other tools can reduce the size of PDFs containing bitmap images at
 excessively high resolution.  These are often best re-generated (for
@@ -4147,13 +4682,12 @@ Setting @env{_R_CHECK_TIMINGS_} to a positive value sets a threshold (in
 seconds elapsed time) for reporting timings.
 
 If you need to look in more detail at the timings for examples, use
-option @option{--timings} to @command{R CMD check} (this is implied by
- at option{--as-cran} as from @R{} 3.0.2).  This adds a summary to the
-check output for all the examples with CPU or elapsed time of more than
-5 seconds.  It produces a file
- at file{@var{mypkg}.Rcheck/@var{mypkg}-Ex.timings} containing timings for
-each help file: it is a tab-delimited file which can be read into @R{}
-for further analysis.
+option @option{--timings} to @command{R CMD check} (this is set by
+ at option{--as-cran}).  This adds a summary to the check output for all
+the examples with CPU or elapsed time of more than 5 seconds.  It
+produces a file @file{@var{mypkg}.Rcheck/@var{mypkg}-Ex.timings}
+containing timings for each help file: it is a tab-delimited file which
+can be read into @R{} for further analysis.
 
 Timings for the tests and vignette runs are given at the bottom of the
 corresponding log file: note that log files for successful vignette runs
@@ -4184,7 +4718,7 @@ be around 2000, but non-Latin alphabets (Greek, Russian, Georgian,
 characters (Chinese, Japanese, Korean) often need specialist fonts to
 render correctly.
 
-Several CRAN packages have messages in their @R{} code in French (and a
+Several @acronym{CRAN} packages have messages in their @R{} code in French (and a
 few in German).  A better way to tackle this is to use the
 internationalization facilities discussed elsewhere in this manual.
 
@@ -4213,30 +4747,74 @@ language of the UTF-8 locale, and your users would need to be told how
 to select the @samp{encoding} argument.
 
 If you want to run @command{R CMD check} on a Unix-alike over a package
-that sets a package encoding in its @file{DESCRIPTION} file you may need
-to specify a suitable locale @emph{via} environment variable
- at env{R_ENCODING_LOCALES}.  The default is equivalent to the value
+that sets a package encoding in its @file{DESCRIPTION} file @emph{and do
+not use a UTF-8 locale} you may need to specify a suitable locale
+ at emph{via} environment variable @env{R_ENCODING_LOCALES}.  The default
+is equivalent to the value
 
 @example
 "latin1=en_US:latin2=pl_PL:UTF-8=en_US.UTF-8:latin9=fr_FR.iso885915@@euro"
 @end example
 
 @noindent
-(which is appropriate for a system based on @code{glibc}) except that if
-the current locale is UTF-8 then the package code is translated to UTF-8
-for syntax checking.
+(which is appropriate for a system based on @code{glibc}: macOS requires
+ at code{latin9=fr_FR.ISO8859-15}) except that if the current locale is
+UTF-8 then the package code is translated to UTF-8 for syntax checking,
+so it is strongly recommended to check in a UTF-8 locale.
 
 @node Portable C and C++ code, Binary distribution, Encoding issues, Writing portable packages
 @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) and testing that
-extensions (such as POSIX functions) are supported.  However, some
-common errors are worth pointing out here.  It can be helpful to look up
-functions at @uref{http://www.cplusplus.com/reference/} or
+standards (C99, C++98 or where declared C++11/14) and testing that
+extensions (such as POSIX functions) are supported.
+
+Note that the `TR1' C++ extensions are not part of any of these
+standards and the @code{<tr1/@var{name}>} headers are not supplied by some of
+the compilers used for @R{}, including on macOS.  (Use the C++11
+versions instead.)
+
+Note too that the POSIX standards only require recently-defined
+functions to be declared if certain macros are defined with large enough
+values, and on some compiler/OS combinations at footnote{This is seen on
+Linux, Solaris and FreeBSD, although each has other ways to turn on all
+extensions, e.g.@: defining @code{_GNU_SOURCE}, @code{__EXTENSIONS__} or
+ at code{_BSD_SOURCE}: the GCC compilers by default define
+ at code{_GNU_SOURCE} unless a strict standard such as @option{-std=c99} is
+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
+ at code{_XOPEN_SOURCE} beyond 600.}
+ at example
+#define _XOPEN_SOURCE 500
+ at end example
+ at noindent
+or
+ at example
+#ifdef __GLIBC__
+# define _POSIX_C_SOURCE 200809L
+#endif
+ at end example
+ at noindent
+before @emph{any} headers.  (@code{strdup} and @code{strncasecmp} are
+two such functions.)
+
+However, some common errors are worth pointing out here.  It can be
+helpful to look up functions at
+ at uref{http://www.cplusplus.com/reference/} or
 @uref{http://en.cppreference.com/w/} and compare what is defined in the
 various standards.
 
+Both the compiler and OS (@emph{via} system header files, which may
+differ by architecture even for nominally the same OS) affect the
+compilability of C/C++ code.  Compilers from the GCC, @command{clang},
+Intel and Oracle Studio suites are routinely used with @R{}, and both
+ at command{clang} and Oracle have more than one implementation of C++
+headers and library.  The range of possibilities makes comprehensive
+empirical checking impossible, and regrettably compilers are patchy at
+best on warning about non-standard code.
+
 @itemize
 @item
 Mathematical functions such as @code{sqrt} are defined in C++ for
@@ -4245,21 +4823,31 @@ with versions for types @code{float}, @code{double}, @code{long double}
 and possibly more.  This means that calling @code{sqrt} on an integer
 type may have `overloading ambiguity' as it could be promoted to any of
 the supported floating-point types: this is commonly seen on Solaris,
-but for @code{pow} also seen on OS X.  (C++11 requires additional
-overloads for integer types.)
+but for @code{pow} also seen on macOS.  (C++98 has an overload for
+ at code{std::pow(<double>, <int>)}, but this may not be visible from the
+main namespace.  C++11 requires additional overloads for integer types,
+and ambiguous overloads are more common in C++11 (and later) compiler
+modes.)
 
 A not-uncommonly-seen problem is to mistakenly call @code{floor(x/y)} or
 @code{ceil(x/y)} for @code{int} arguments @code{x} and @code{y}.  Since
 @code{x/y} does integer division, the result is an @code{int} and
-`overloading ambiguity' may be reported.
+`overloading ambiguity' may be reported.  Some people have (pointlessly)
+called @code{floor} and @code{ceil} on integer arguments, which may have
+an `overloading ambiguity'.
+
+A surprising common misuse is things like @code{pow(10, -3)}: this
+should be the constant @code{1e-3}.
 
 @item
-Function @code{fabs} is defined for only for floating-point types,
-except in C++11 which has overloads in @file{<cmath>} for integer types.
-Function @code{abs} is defined in C99's @file{<stdlib.h>} for @code{int}
-and in C++98's @file{<cstdlib>} for integer types, overloaded in
- at file{<cmath>} for floating-point types.  C++11 has additional overloads
-for @code{abs} in @file{<cmath>} for integer types.
+Function @code{fabs} is defined only for floating-point types, except in
+C++11 which has overloads for @code{std::fabs} in @file{<cmath>} for
+integer types.  Function @code{abs} is defined in C99's
+ at file{<stdlib.h>} for @code{int} and in C++98's @file{<cstdlib>} for
+integer types, overloaded in @file{<cmath>} for floating-point types.
+C++11 has additional overloads for @code{std::abs} in @file{<cmath>} for
+integer types.  The effect of calling @code{abs} with a floating-point
+type is implementation-specific: it may truncate to an integer.
 
 @item
 Functions/macros such as @code{isnan}, @code{isinf} and @code{isfinite}
@@ -4269,29 +4857,87 @@ way to make use of these functions which works with all C++ compilers
 currently in use on @R{} platforms: use @R{}'s versions such as
 @code{ISNAN} and @code{R_FINITE} instead.
 
+If you must use them in C++11, beware that some
+compilers at footnote{E.g. @command{gcc 5.3} in C++11 mode.} provide both
+ at code{std::isnan} and @code{::isnan}, so using
+
+ at example
+using namespace std;
+ at end example
+
+ at noindent
+may cause `overloading ambiguity' and you must use @code{std::isnan}
+ at emph{etc} explicitly.
+
 It is an error (and make little sense, although has been seen) to call
-these functions for integer arguments.
+these functions for integer arguments: a few compilers give a compilation
+error.
 
 @item
-Including C headers in C++ code is not portable.  Including the C
-header @file{math.h} in C++ code often causes conflicts with
- at file{cmath} which may be included by other headers.  This is
-particularly problematic with C++11 compilers, as functions like
- at code{sqrt} and @code{isnan} are defined for @code{double} arguments in
- at file{math.h} and for a range of types including @code{double} in
- at file{cmath}.
+The GNU C/C++ compilers support a large number of non-portable
+extensions.  For example, @code{INFINITY} (which is in C99 but not
+C++98), for which @R{} provides the portable @code{R_PosInf} (and
+ at code{R_NegInf} for @code{-INFINITY}).  And @code{NAN} is just one NaN
+value: in @R{} code @code{NA_REAL} is usually what is intended, but
+ at code{R_NaN} is also available.
+
+Some (but not all) extensions are listed at
+ at uref{https://gcc.gnu.org/@/onlinedocs/@/gcc/@/C-Extensions.html} and
+ at uref{https://gcc.gnu.org/@/onlinedocs/@/gcc/@/C_002b_002b-Extensions.html}.
+
+Other GNU extensions which have bitten package writers is the use of
+non-portable characters such as @samp{$} in identifiers and use of C++
+headers under @file{ext}.
+
+The GNU Fortran compiler also supports a large number of non-portable
+extensions, the most commonly encountered one being
+ at code{ISNAN}@footnote{There is a portable way to do this in Fortran 2003
+(@code{ieee_is_nan()} in module @code{ieee_arithmetic}), but ironically
+that is not supported in the commonly-used versions 4.x of GNU Fortran.
+A pretty robust alternative is to test @code{if(my_var /= my_var)}.}.
+Some are listed at
+ at uref{https://gcc.gnu.org/@/onlinedocs/@/gfortran/@/Extensions-implemented-in-GNU-Fortran.html}.
+One that frequently catches package writers is that it allows
+out-of-order declarations: in standard-conformant Fortran variables must
+be declared (explicitly or implicitly) before use in other declarations
+such as dimensions.
+
+ at item
+Including C-style headers in C++ code is not portable.  Including the
+legacy header at footnote{which often is the same as the header included by
+the C compiler, but some compilers have wrappers for some of the C
+headers.} @file{math.h} in C++ code may conflict with @file{cmath} which
+may be included by other headers.  This is particularly problematic with
+C++11 compilers, as functions like @code{sqrt} and @code{isnan} are
+defined for @code{double} arguments in @file{math.h} and for a range of
+types including @code{double} in @file{cmath}.  Similar issues have been
+seen for @file{stdlib.h} and @file{cstdlib}.  Including the C++ version
+first used to be a sufficient workaround but for some 2016 compilers
+only one could be included.
 
 @item
 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{}.
+ at c but package treatSens attempted to use it.
+ at c http://stackoverflow.com/questions/6434549/does-c11-add-the-c99-restrict-specifier-if-not-why-not
+
+ at item
 Be careful to include the headers which define the functions you use.
-Some compilers (notably the GCC family) include other system headers in
-their headers which are not required by the standards, and so code may
-compile on such compilers and not on others.  (A prominent example is
-the C++11 header @code{<random>} which is indirectly included by
- at code{<algorithm>} by @command{g++}.)
+Some compilers/OSes include other system headers in their headers which
+are not required by the standards, and so code may compile on such
+systems and not on others.  (A prominent example is the C++11 header
+ at code{<random>} which is indirectly included by @code{<algorithm>} by
+ at command{g++}.  Another frequent issue is the C header @code{<time.h>}
+which is included by other headers on Linux and Windows but not macOS nor
+Solaris.)  Another common issue is that @code{malloc}, @code{calloc},
+ at code{realloc} and @code{free} are defined by C99 in the header
+ at file{stdlib.h} and (in the @code{std::} namespace) by C++ header
+ at file{cstdlib}.  Some earlier implementations used a header
+ at file{malloc.h}, but that is not portable and does not exist on macOS.
 
 @item
 For C++ code, be careful to specify namespaces where needed.  Many
@@ -4301,22 +4947,133 @@ namespace.  One way to do so is to use declarations such as
 @example
 using std::floor;
 @end example
+ at noindent
+but it is usually preferable to use explicit namespace prefixes in the code.
+
+Examples seen in @acronym{CRAN} packages include
+ at example
+abs acos atan calloc ceil div exp fabs floor fmod free log malloc memcpy
+memset pow printf qsort round sin sprintf sqrt strcmp strcpy strerror
+strlen strncmp strtol tan trunc
+ at end example
 
 @item
-Macros defined by the compiler/OS can cause problems.  Macros starting
-with an underscore followed by an upper-case letter or another
-underscore are reserved and should not be used in portable code.  Other
-macros, typically upper-case, may be defined by the compiler or system
-headers and can cause problems. 
+ at c including clang as from 4.0.0
+Some C++ compilers refuse to compile constructs such as
+ at example
+      if(ptr > 0) @{ ....@}
+ at end example
+ at noindent
+which compares a pointer to the integer @code{0}.  This could just use
+ at code{if(ptr)} (pointer addresses cannot be negative) but if needed
+pointers can be tested against @code{nullptr} (C++11 and later) or
+ at code{NULL}.
+
+ at c gcc6 accepts it, gcc5 does not, it seems.
+Note that although @code{nullptr} was only introduced in C++11, some
+compilers accept it in C++98 mode (but most do not).
+
+ at item
+Macros defined by the compiler/OS can cause problems.  Identifiers
+starting with an underscore followed by an upper-case letter or another
+underscore are reserved for system macros and should not be used in
+portable code (including not as guards in C/C++ headers).  Other macros,
+typically upper-case, may be defined by the compiler or system headers
+and can cause problems.
 @c http://lists.x.org/archives/xorg-devel/2013-November/038808.html
 The most common issue involves the names of the Intel CPU registers such
-as @code{CS}, @code{DS} and @code{SS} defined on i586/x64 Solaris in
+as @code{CS}, @code{DS}, @code{ES}, @code{FS}, @code{GS} and @code{SS}
+(and more with longer abbreviations) defined on i586/x64 Solaris in
 @file{<sys/regset.h>} and often included indirectly by @file{<stdlib.h>}
-and other core headers.
+and other core headers.  Further examples are @code{ERR},
+ at code{LITTLE_ENDIAN}, @code{zero} and @code{I} (which is defined in
+Solaris' @file{<complex.h>} as a compiler intrinsic for the imaginary
+unit).  Some of these can be avoided by defining @code{_POSIX_C_SOURCE}
+before including any system headers, but it is better to only use
+all-upper-case names which have a unique prefix such as the package name.
+
+ at item
+ at code{typedef}s in OS headers can conflict with those in the package:
+two examples are @code{ulong} on several OSes and @code{index_t} on
+Solaris.
+
+ at item
+If you use OpenMP, check carefully that you have followed the advice in
+the subsection on @ref{OpenMP support}.  In particular, any use of
+OpenMP in C/C++ code will need to use
+ at example
+#ifdef _OPENMP
+# include <omp.h>
+#endif
+ at end example
+ at noindent
+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
+GCC family of compilers, using the correct linker flag sets up the
+run-time path to the library.
+
+ at item
+Package authors commonly assume things are part of C99 when they are
+not: the most common example is POSIX function @code{strdup}.  The most
+common C library on Linux, @code{glibc}, will hide the declarations of
+such extensions unless a `feature-test macro' is defined @strong{before}
+(almost) any system header is included.  So for @code{strdup} you need
+ at example
+#define _POSIX_C_SOURCE 200809L
+...
+#include <string.h>
+...
+strdup call(s)
+ at end example
+ at noindent
+where the appropriate value can be found by @command{man strdup} on
+Linux.  (Use of @code{strncasecmp} is similar.)
+
+However, modes of @command{gcc} with `GNU EXTENSIONS' (which are the
+default, either @option{-std=gnu99} or @option{-std=gnu11}) declare
+enough macros to ensure that missing declarations are rarely seen.
+
+This applies also to constants such as @code{M_PI} and @code{M_LN2},
+which are part of the X/Open standard: to use these define
+ at code{_XOPEN_SOURCE} before including any headers, or include the @R{}
+header @file{Rmath.h}.
+
+ at item
+Similarly, package authors commonly assume things are part of C++ when
+they were introduced in C++11 if at all.  Recent examples from
+ at acronym{CRAN} packages include the C99/C++11 functions
+ at example
+erf expm1 fmin fmax lgamma lround loglp round snprintf strcasecmp trunc
+ at end example
+ at noindent
+(all of which are in the @code{std} namespace in C++11) and the POSIX
+functions @code{strdup} and @code{strncasecmp} and constants @code{M_PI}
+and @code{M_LN2} (see the previous item).  @R{} has long provided
+ at code{fmax2}, @code{fmin2}, @code{fround}, @code{ftrunc},
+ at code{lgammafn}, @code{log1p} (if needed) and many of the X/Open
+constants, declared in header @file{Rmath.h}.  Uses of @code{erf} can be
+replaced by @code{pnorm} (see the @R{} help page for the latter).
+
+ at item
+Using @code{alloca} portably is tricky: it is neither an ISO C nor a
+POSIX function.  An adequately portable preamble is
+ at example
+#ifdef __GNUC__
+/* Includes GCC, clang and Intel compilers */
+# undef alloca
+# define alloca(x) __builtin_alloca((x))
+#elif defined(__sun) || defined(_AIX)
+/* this is necessary (and sufficient) for Solaris 10 and AIX 6: */
+# include <alloca.h>
+#endif
+ at end example
+
 @end itemize
 
 Some additional information for C++ is available at
- at uref{http://journal.r-project.org/archive/2011-2/RJournal_2011-2_Plummer.pdf}
+ at uref{http://journal.r-project.org/@/archive/@/2011-2/@/RJournal_2011-2_Plummer.pdf}
 by Martyn Plummer.
 
 @node Binary distribution,  , Portable C and C++ code, Writing portable packages
@@ -4341,28 +5098,25 @@ makefiles, watch out in particular for dependencies on the toolchain's
 runtime DLLs such as @file{libgfortran}, @file{libstdc++} and
 @file{libgcc_s}.
 
-For OS X, using @code{R CMD otool -L} on the package's shared object(s)
+For macOS, using @code{R CMD otool -L} on the package's shared object(s)
 in the @file{libs} directory will show what they depend on: watch for
-any dependencies in @file{/usr/local/lib}, notably
- at file{libgfortran.2.dylib}, @file{libgfortran.3.dylib} or
+any dependencies in @file{/usr/local/lib} or
+ at file{/usr/local/gfortran/lib}, notably @file{libgfortran.?.dylib} and
 @file{libquadmath.0.dylib}.
 
 Many people (including the @acronym{CRAN} package repository) will not
 accept source packages containing binary files as the latter are a
 security risk.  If you want to distribute a source package which needs
-external software on Windows or OS X, options include
+external software on Windows or macOS, options include
 @itemize
 @item
 To arrange for installation of the package to download the
 additional software from a URL, as e.g.@: package @CRANpkg{Cairo} does.
 
 @item
-(For CRAN.)
+(For @acronym{CRAN}.)
 To negotiate with Uwe Ligges to host the additional components on
 WinBuilder, and write a @file{configure.win} file to install them.
-There used to be many examples, e.g.@: package @CRANpkg{rgdal} (however
-nowadays CRAN prefers to use a uniform cross-compilation approach for
-software such as GDAL).
 
 @end itemize
 
@@ -4425,9 +5179,9 @@ start and others use it to end).
 In @R{} messages it is also possible to use @code{sQuote} or @code{dQuote} as in
 
 @example
-	stop(gettextf("object must be of class %s or %s",
-		      dQuote("manova"), dQuote("maov")),
-	     domain = NA)
+        stop(gettextf("object must be of class %s or %s",
+                      dQuote("manova"), dQuote("maov")),
+             domain = NA)
 @end example
 
 @item
@@ -4439,12 +5193,12 @@ Slovenian has four).  So avoid constructions such as was once used in
 @example
 if((length(nopkgs) > 0) && !missing(lib.loc)) @{
     if(length(nopkgs) > 1)
-	warning("libraries ",
-		paste(sQuote(nopkgs), collapse = ", "),
-		" contain no packages")
+        warning("libraries ",
+                paste(sQuote(nopkgs), collapse = ", "),
+                " contain no packages")
     else
-	warning("library ", paste(sQuote(nopkgs)),
-		" contains no package")
+        warning("library ", paste(sQuote(nopkgs)),
+                " contains no package")
 @}
 @end example
 
@@ -4455,10 +5209,10 @@ and was replaced by
 if((length(nopkgs) > 0) && !missing(lib.loc)) @{
     pkglist <- paste(sQuote(nopkgs), collapse = ", ")
     msg <- sprintf(ngettext(length(nopkgs),
-			    "library %s contains no packages",
-			    "libraries %s contain no packages",
-			    domain = "R-base"),
-		   pkglist)
+                            "library %s contains no packages",
+                            "libraries %s contain no packages",
+                            domain = "R-base"),
+                   pkglist)
     warning(msg, domain=NA)
 @}
 @end example
@@ -4482,7 +5236,7 @@ the default).
 The procedures make use of @code{msgfmt} and @code{xgettext} which are
 part of @acronym{GNU} @code{gettext} and this will need to be installed:
 Windows users can find pre-compiled binaries at
- at uref{http://www.stats.ox.ac.uk/pub/Rtools/goodies/gettext-tools.zip}.
+ at uref{https://www.stats.ox.ac.uk/@/pub/@/Rtools/@/goodies/@/gettext-tools.zip}.
 
 @menu
 * C-level messages::            
@@ -4533,7 +5287,7 @@ need to add
 and mark strings by
 
 @example
-dngettext(("@var{pkg}", @var{<singular string>}, @var{<plural string>}, n)
+dngettext("@var{pkg}", @var{<singular string>}, @var{<plural string>}, n)
 @end example
 
 @item
@@ -4640,8 +5394,8 @@ path: see its help page.
 @section CITATION files
 
 An installed file named @file{CITATION} will be used by the
- at code{citation()} function.  (To be installed, it needed to be in the
- at file{inst} subdirectory of the package sources.)
+ at code{citation()} function.  (It should be in the @file{inst}
+subdirectory of the package sources.)
 
 The @file{CITATION} file is parsed as @R{} code (in the package's
 declared encoding, or in @acronym{ASCII} if none is declared).  If no
@@ -4669,13 +5423,14 @@ bibentry(bibtype = "Manual",
                     person("R Core Team")),
          year = year,
          note = note,
-         url = "http://CRAN.R-project.org/package=nlme")
+         url = "https://CRAN.R-project.org/package=nlme")
 @end example
 
 Note the way that information that may need to be updated is picked up
-from the @file{DESCRIPTION} file -- it is tempting to hardcode such
-information, but it normally then gets outdated.  See @code{?bibentry}
-for further details of the information which can be provided.
+from object @code{meta}, a parsed version of the @file{DESCRIPTION} file
+-- it is tempting to hardcode such information, but it normally then
+gets outdated.  See @code{?bibentry} for further details of the
+information which can be provided.
 
 In case a bibentry contains @LaTeX{} markup (e.g., for accented
 characters or mathematical symbols), it may be necessary to provide a
@@ -4695,6 +5450,10 @@ argument to @code{bibentry}.  E.g., earlier versions of
 The @file{CITATION} file should itself produce no output when
 @code{source}-d.
 
+It is desirable (and essential for @acronym{CRAN}) that the
+ at file{CITATION} file does not contain calls to functions such as
+ at code{packageDescription} which assume the package is installed in a
+library tree on the package search path.
 
 @node Package types, Services, CITATION files, Creating R packages
 @section Package types
@@ -4732,12 +5491,12 @@ Several members of the @R{} project have set up services to assist those
 writing @R{} packages, particularly those intended for public
 distribution.
 
- at uref{http://win-builder.r-project.org, win-builder.r-project.org}
+ at uref{https://win-builder.r-project.org, win-builder.r-project.org}
 offers the automated preparation of (32/64-bit) Windows binaries from
 well-tested source packages.
 
-R-Forge (@uref{http://R-Forge.r-project.org, R-Forge.r-project.org}) and
-RForge (@uref{http://www.rforge.net, www.rforge.net}) are similar
+R-Forge (@uref{https://R-Forge.r-project.org, R-Forge.r-project.org}) and
+RForge (@uref{https://www.rforge.net, www.rforge.net}) are similar
 services with similar names.  Both provide source-code management
 through SVN, daily building and checking, mailing lists and a repository
 that can be accessed @emph{via} @code{install.packages} (they can be
@@ -4845,7 +5604,7 @@ specified at footnote{e.g.@: @code{\alias}, @code{\keyword} and
 file (in any order), and the processing software will retain only the
 first occurrence of a standard section in the file, with a warning.
 
-See @uref{http://developer.r-project.org/Rds.html, ``Guidelines for Rd
+See @uref{https://developer.r-project.org/Rds.html, ``Guidelines for Rd
 files''} for guidelines for writing documentation in @file{Rd} format
 which should be useful for package writers.
 @findex prompt
@@ -4859,32 +5618,37 @@ other types of @file{Rd} file.
 
 The general syntax of @file{Rd} files is summarized below.  For a detailed
 technical discussion of current @file{Rd} syntax, see
- at uref{http://developer.r-project.org/parseRd.pdf, ``Parsing Rd files''}.
+ at uref{https://developer.r-project.org/parseRd.pdf, ``Parsing Rd files''}.
 
- at file{Rd} files consists of three types of text input.  The most common
+ at file{Rd} files consist of four types of text input.  The most common
 is @LaTeX{}-like, with the backslash used as a prefix on markup
 (e.g. @code{\alias}), and braces used to indicate arguments
-(e.g. @code{@{load@}}).  The least common type of text is verbatim text,
-where no markup is processed. The third type is @R{}-like, intended for
- at R{} code, but allowing some embedded macros.  Quoted strings within
- at R{}-like text are handled specially: regular character escapes such as
- at code{\n} may be entered as-is.  Only markup starting with @code{\l}
-(e.g.  @code{\link}) or @code{\v} (e.g. @code{\var}) will be recognized
-within quoted strings.  The rarely used vertical tab @code{\v} must be
-entered as @code{\\v}.
+(e.g. @code{@{load@}}).  The least common type of text is `verbatim'
+text, where no markup other than the comment marker (@code{%}) is
+processed.  There is also a rare variant of `verbatim' text
+(used in @code{\eqn}, @code{\deqn}, @code{\figure},
+and @code{\newcommand}) where comment markers need not be escaped.
+The final type is @R{}-like, intended for @R{} code, but allowing some
+embedded macros.  Quoted strings within @R{}-like text are handled
+specially: regular character escapes such as @code{\n} may be entered
+as-is.  Only markup starting with @code{\l} (e.g.  @code{\link}) or
+ at code{\v} (e.g. @code{\var}) will be recognized within quoted strings.
+The rarely used vertical tab @code{\v} must be entered as @code{\\v}.
 
 Each macro defines the input type for its argument.  For example, the
 file initially uses @LaTeX{}-like syntax, and this is also used in the
 @code{\description} section, but the @code{\usage} section uses
- at R{}-like syntax, and the @code{\alias} macro uses verbatim syntax.
+ at R{}-like syntax, and the @code{\alias} macro uses `verbatim' syntax.
 Comments run from a percent symbol @code{%} to the end of the line in
-all types of text (as on the first line of the @code{load} example).
+all types of text except the rare `verbatim' variant
+(as on the first line of the @code{load} example).
 
 Because backslashes, braces and percent symbols have special meaning, to
 enter them into text sometimes requires escapes using a backslash.  In
 general balanced braces do not need to be escaped, but percent symbols
-always do.  For the complete list of macros and rules for escapes, see
- at uref{http://developer.r-project.org/parseRd.pdf, ``Parsing Rd files''}.
+always do, except in the `verbatim' variant.
+For the complete list of macros and rules for escapes, see
+ at uref{https://developer.r-project.org/parseRd.pdf, ``Parsing Rd files''}.
 
 @menu
 * Documenting functions::       
@@ -5167,7 +5931,7 @@ for extra commands for testing that should not be shown to users, but
 will be run by @code{example()}.  (Previously this was called
 @code{\testonly}, and that is still accepted.)
 
-Text inside @code{\dontrun@{@}} is verbatim, but the other parts
+Text inside @code{\dontrun@{@}} is `verbatim', but the other parts
 of the @code{\examples} section are @R{}-like text.
 
 For example,
@@ -5186,7 +5950,7 @@ special facilities (such as Internet access or write permission to
 specific directories).  Text included in @code{\dontrun} is indicated by
 comments in the processed help files: it need not be valid @R{} code but
 the escapes must still be used for @code{%}, @code{\} and unpaired
-braces as in other verbatim text.
+braces as in other `verbatim' text.
 
 Example code must be capable of being run by @code{example}, which uses
 @code{source}.  This means that it should not access @file{stdin},
@@ -5198,12 +5962,19 @@ standard data sets listed by @code{data()} (see @code{?data} for more
 info).
 
 Finally, there is @code{\donttest}, used (at the beginning of a separate
-line) to mark code that should be run by @code{examples()} but not by
- at code{R CMD check}.  This should be needed only occasionally but can be
-used for code which might fail in circumstances that are hard to test
-for, for example in some locales.  (Use e.g. @code{capabilities()} to
-test for features needed in the examples wherever possible, and you can
-also use @code{try()} or @code{tryCatch()}.)
+line) to mark code that should be run by @code{example()} but not by
+ at code{R CMD check} (by default: the option @option{--run-donttest} can
+be used).  This should be needed only occasionally but can be used for
+code which might fail in circumstances that are hard to test for, for
+example in some locales.  (Use e.g. @code{capabilities()} or
+ at code{nzchar(Sys.which("someprogram"))} to test for features needed in
+the examples wherever possible, and you can also use @code{try()} or
+ at code{tryCatch()}.  Use @code{interactive()} to condition examples which
+need someone to interact with.)  Note that code included in
+ at code{\donttest} must be correct @R{} code, and any packages used should
+be declared in the @file{DESCRIPTION} file.  It is good practice to
+include a comment in the @code{\donttest} section explaining why it is
+needed.
 
 @findex \keyword
 @item \keyword@{@var{key}@}
@@ -5216,8 +5987,8 @@ within @R{}.  There can be more than one @code{\keyword} entry if the @R{}
 object being documented falls into more than one category, or none.
 
 Do strongly consider using @code{\concept} (@pxref{Indices}) instead of
- at code{\keyword} if you are about to use more than very few non standard
-keywords. 
+ at code{\keyword} if you are about to use more than very few non-standard
+keywords.
 
 The special keyword @samp{internal} marks a page of internal objects
 that are not part of the package's API.  If the help page for object
@@ -5285,9 +6056,9 @@ give a description of each column, preferably as a list or table.
 
 @item \source@{@dots{}@}
 @findex \source
-Details of the original source (a reference or @acronym{URL}).  In
-addition, section @code{\references} could give secondary sources and
-usages.
+Details of the original source (a reference or @acronym{URL},
+ at pxref{Specifying URLs}).  In addition, section @code{\references} could
+give secondary sources and usages.
 @end table
 
 Note also that when documenting data set @var{bar},
@@ -5370,7 +6141,7 @@ another @file{Rd} file, it is helpful to use this as an additional
 @code{\alias}.
 
 Skeletons of documentation for a package can be generated using the
-function @code{promptPackage()}.  If the @code{final = TRUE} argument
+function @code{promptPackage()}.  If the @code{final = LIBS} argument
 is used, then the @file{Rd} file will be generated in final form, containing
 the information that would be produced up to
 @code{library(help = @var{pkgname})}.  Otherwise (the default) comments
@@ -5444,7 +6215,7 @@ possible; @code{\strong} is regarded as stronger (more emphatic).
 
 @item \bold@{@var{text}@}
 @findex \bold
-Set @var{text} in @b{bold} font if possible.
+Set @var{text} in @b{bold} font where possible.
 
 @item \sQuote@{@var{text}@}
 @findex \sQuote
@@ -5458,7 +6229,7 @@ Each of the above commands takes @LaTeX{}-like input, so other macros
 may be used within @var{text}.
 
 The following logical markup commands are available for indicating
-specific kinds of text.  Except as noted, these take verbatim text
+specific kinds of text.  Except as noted, these take `verbatim' text
 input, and so other macros may not be used within them.  Some characters
 will need to be escaped (@pxref{Insertions}).
 
@@ -5468,13 +6239,13 @@ will need to be escaped (@pxref{Insertions}).
 Indicate text that is a literal example of a piece of an @R{} program,
 e.g., a fragment of @R{} code or the name of an @R{} object.  Text is
 entered in @R{}-like syntax, and displayed using @code{typewriter} font
-if possible.  Macros @code{\var} and @code{\link} are interpreted within
+where possible.  Macros @code{\var} and @code{\link} are interpreted within
 @var{text}.
 
 @item \preformatted@{@var{text}@}
 @findex \preformatted
 Indicate text that is a literal example of a piece of a program.  Text
-is displayed using @code{typewriter} font if possible.  Formatting,
+is displayed using @code{typewriter} font where possible.  Formatting,
 e.g.@: line breaks, is preserved.  (Note that this includes a line break
 after the initial @{, so typically text should start on the same line as
 the command.)
@@ -5487,13 +6258,13 @@ nested within other markup macros other than @code{\dQuote} and
 @findex \kbd
 Indicate keyboard input, using @kbd{slanted typewriter} font if
 possible, so users can distinguish the characters they are supposed to
-type from computer output.  Text is entered verbatim.
+type from computer output.  Text is entered `verbatim'.
 
 @item \samp@{@var{text}@}
 @findex \samp
 Indicate text that is a literal example of a sequence of characters,
-entered verbatim.  No wrapping or reformatting will occur.  Displayed
-using @code{typewriter} font if possible.
+entered `verbatim'.  No wrapping or reformatting will occur.  Displayed
+using @code{typewriter} font where possible.
 
 
 @item \verb@{@var{text}@}
@@ -5510,26 +6281,38 @@ Indicate the name of an @R{} package.  @LaTeX{}-like.
 @item \file@{@var{file_name}@}
 @findex \file
 Indicate the name of a file.  Text is @LaTeX{}-like, so backslash needs
-to be escaped.  Displayed using a distinct font if possible.
+to be escaped.  Displayed using a distinct font where possible.
 
 @item \email@{@var{email_address}@}
 @findex \email
 Indicate an electronic mail address.  @LaTeX{}-like, will be rendered as
 a hyperlink in @HTML{} and PDF conversion.  Displayed using
- at code{typewriter} font if possible.
+ at code{typewriter} font where possible.
 
 @item \url@{@var{uniform_resource_locator}@}
 @findex \url
 Indicate a uniform resource locator (@acronym{URL}) for the World Wide
-Web.  The argument is handled verbatim, and rendered as a hyperlink in
- at HTML{} and PDF conversion.  Displayed using @code{typewriter} font if
-possible.
+Web.  The argument is handled as `verbatim' text (with percent and
+braces escaped by backslash), and rendered as a hyperlink in @HTML{} and
+PDF conversion.  Linefeeds are removed, and leading and trailing
+whitespace at footnote{as defined by the @R{} function @code{trimws}.} is
+removed. @xref{Specifying URLs}.
+
+Displayed using @code{typewriter} font where possible.
 
 @item \href@{@var{uniform_resource_locator}@}@{@var{text}@}
 @findex \href
-Indicate a hyperlink to the World Wide Web. The first argument is handled
-verbatim, and is used as the @acronym{URL} in the hyperlink, with the
-second argument of @LaTeX{}-like text displayed to the user.
+Indicate a hyperlink to the World Wide Web. The first argument is
+handled as `verbatim' text (with percent and braces escaped by
+backslash) and is used as the @acronym{URL} in the hyperlink, with the
+second argument of @LaTeX{}-like text displayed to the user.  Linefeeds
+are removed from the first argument, and leading and trailing whitespace
+is removed.
+
+Note that RFC3986-encoded URLs (e.g.@: using @samp{\%28VS.85\%29} in
+place of @samp{(VS.85)}) may not work correctly in versions of @R{}
+before 3.1.3 and are best avoided---use @code{URLdecode()} to decode
+them.
 
 @item \var@{@var{metasyntactic_variable}@}
 @findex \var
@@ -5539,16 +6322,16 @@ rendered differently only in @HTML{} conversions, and @LaTeX{} conversion
 outside @samp{\usage} and @samp{\examples} environments.}. @LaTeX{}-like.
 @item \env@{@var{environment_variable}@}
 @findex \env
-Indicate an environment variable. Verbatim.
-Displayed using @code{typewriter} font if possible
+Indicate an environment variable. `Verbatim'.
+Displayed using @code{typewriter} font where possible
 @item \option@{@var{option}@}
 @findex \option
-Indicate a command-line option.  Verbatim.
-Displayed using @code{typewriter} font if possible.
+Indicate a command-line option.  `Verbatim'.
+Displayed using @code{typewriter} font where possible.
 @item \command@{@var{command_name}@}
 @findex \command
 Indicate the name of a command. @LaTeX{}-like, so @code{\var} is
-interpreted.  Displayed using @code{typewriter} font if possible.
+interpreted.  Displayed using @code{typewriter} font where possible.
 @item \dfn@{@var{term}@}
 @findex \dfn
 Indicate the introductory or defining use of a term. @LaTeX{}-like.
@@ -5689,7 +6472,7 @@ online help.  To this end, the two commands
 is used for ``inline'' formulae (corresponding to @TeX{}'s
 @code{$@dots{}$}), @code{\deqn} gives ``displayed equations'' (as in
 @LaTeX{}'s @code{displaymath} environment, or @TeX{}'s
- at code{$$@dots{}$$}).  Both arguments are treated as verbatim text.
+ at code{$$@dots{}$$}).  Both arguments are treated as `verbatim' text.
 
 Both commands can also be used as @code{\eqn@{@var{latexascii}@}} (only
 @emph{one} argument) which then is used for both @var{latex} and
@@ -5701,7 +6484,7 @@ The following example is from @file{Poisson.Rd}:
 @example
 @group
   \deqn@{p(x) = \frac@{\lambda^x e^@{-\lambda@}@}@{x!@}@}@{%
-	p(x) = \lambda^x exp(-\lambda)/x!@}
+        p(x) = \lambda^x exp(-\lambda)/x!@}
   for \eqn@{x = 0, 1, 2, \ldots@}.
 @end group
 @end example
@@ -5769,8 +6552,8 @@ logo in both @HTML{} (using the simple form) and @LaTeX{} (using the
 expert form), the following could be used:
 
 @example
-\if@{html@}@{\figure@{logo.jpg@}@{Our logo@}@}
-\if@{latex@}@{\figure@{logo.jpg@}@{options: width=0.5in@}@}
+\if@{html@}@{\figure@{Rlogo.svg@}@{options: width=100 alt="R logo"@}@}
+\if@{latex@}@{\figure@{Rlogo.pdf@}@{options: width=0.5in@}@}
 @end example
 
 The files containing the figures should be stored in the directory
@@ -5809,9 +6592,9 @@ backslash.  (Note that @code{\cr} is used for generating line breaks.)
 The ``comment'' character @samp{%} and unpaired braces at footnote{See the
 examples section in the file @file{Paren.Rd} for an example.}
 @emph{almost always} need to be escaped by @samp{\}, and @samp{\\} can
-be used for backslash and needs to be when there two or more adjacent
-backslashes).  In @R{}-like code quoted strings are handled slightly
-differently; see @uref{http://developer.r-project.org/parseRd.pdf,
+be used for backslash and needs to be when there are two or more adjacent
+backslashes.  In @R{}-like code quoted strings are handled slightly
+differently; see @uref{https://developer.r-project.org/parseRd.pdf,
 ``Parsing Rd files''} for details -- in particular braces should not be
 escaped in quoted strings.
 
@@ -5931,7 +6714,7 @@ attempt to escape special characters.  For example, use
 the following to output the markup necessary to display the Greek letter in
 @LaTeX{} or @HTML{}, and the text string @code{alpha} in other formats:
 @example
-\if@{latex@}@{\out@{\alpha@}@}\ifelse@{html@}@{\out@{α@}@}@{alpha@}
+\ifelse@{latex@}@{\out@{$\alpha$@}@}@{\ifelse@{html@}@{\out@{α@}@}@{alpha@}@}
 @end example
 
 @node Dynamic pages, User-defined macros, Conditional text, Writing R documentation files
@@ -6032,7 +6815,7 @@ The @code{\RdOpts} macro is used to set new defaults for options to apply
 to following uses of @code{\Sexpr}.
 
 For more details, see the online document
- at uref{http://developer.r-project.org/parseRd.pdf, ``Parsing Rd files''}.
+ at uref{https://developer.r-project.org/parseRd.pdf, ``Parsing Rd files''}.
 
 @node User-defined macros, Encoding, Dynamic pages, Writing R documentation files
 @section User-defined macros
@@ -6049,6 +6832,9 @@ the name of the new macro including the initial backslash, and the second
 is the macro definition.  As in @LaTeX{}, @code{\newcommand} requires that the
 new macro not have been previously defined, whereas @code{\renewcommand}
 allows existing macros (including all built-in ones) to be replaced.
+(As from version 3.2.0, this test is disabled by default, but may
+be enabled by setting the environment variable @env{_WARN_DUPLICATE_RD_MACROS_}
+to a true value.)
 
 Also as in @LaTeX{}, the new macro may be defined to take arguments,
 and numeric placeholders such as @code{#1} are used in the macro
@@ -6063,11 +6849,16 @@ significance.  All arguments to user-defined macros will be parsed as
 verbatim text, and simple text-substitution will be used to replace
 the place-holders, after which the replacement text will be parsed.
 
-For example, the @file{NEWS.Rd} file currently uses the definition
+As of @R{} version 3.2.0, a number of macros are defined in the file
+ at file{share/Rd/macros/system.Rd} of the @R{} source or home
+directory, and these will normally be available in all @file{.Rd} files.
+For example, that file contains the definition
 @example
 \newcommand@{\PR@}@{\Sexpr[results=rd]@{tools:::Rd_expr_PR(#1)@}@}
 @end example
-which defines @code{\PR} to be a single argument macro; then code like
+ at noindent
+which defines @code{\PR} to be a single argument macro; then code
+(typically used in the @file{NEWS.Rd} file) like
 @example
 \PR@{1234@}
 @end example
@@ -6077,7 +6868,39 @@ will expand to
 \Sexpr[results=rd]@{tools:::Rd_expr_PR(1234)@}
 @end example
 @noindent
-when parsed.
+when parsed.  
+
+Some macros that might be of general use are:
+ at ftable @code
+ at item \CRANpkg@{@var{pkg}@}
+A package on CRAN
+
+ at item \sspace
+A single space (used after a period that does not end a sentence).
+
+ at item \doi@{@var{numbers}@}
+A digital object identifier (DOI).
+ at end ftable
+See the @file{system.Rd} file in @file{share/Rd/macros} for more details
+and macro definitions, including macros @code{\packageTitle},
+ at code{\packageDescription}, @code{\packageAuthor}, @code{\packageMaintainer},
+ at code{\packageDESCRIPTION} and @code{\packageIndices}.
+ at findex @code{\packageTitle}
+ at findex @code{\packageDescription}
+ at findex @code{\packageAuthor}
+ at findex @code{\packageMaintainer}
+ at findex @code{\packageDESCRIPTION}
+ at findex @code{\packageIndices}
+
+
+Packages may also define their own common macros; these would be stored
+in an @file{.Rd} file in @file{man/macros} in the package source and
+will be installed into @file{help/macros} when the package is installed.
+A package may also use the macros from a different package by listing
+the other package in the @samp{RdMacros} field in the @file{DESCRIPTION}
+file.
+
+
 
 @node Encoding, Processing documentation files, User-defined macros, Writing R documentation files
 @section Encoding
@@ -6096,7 +6919,7 @@ files themselves is now UTF-8.
 
 Wherever possible, avoid non- at acronym{ASCII} chars in @file{Rd} files, and
 even symbols such as @samp{<}, @samp{>}, @samp{$}, @samp{^}, @samp{&},
- at samp{|}, @samp{@@}, @samp{~}, and @samp{*} outside verbatim
+ at samp{|}, @samp{@@}, @samp{~}, and @samp{*} outside `verbatim'
 environments (since they may disappear in fonts designed to render
 text).  (Function @code{showNonASCIIfile} in package @pkg{tools} can help
 in finding non- at acronym{ASCII} bytes in the files.)
@@ -6192,19 +7015,19 @@ structure and detect mis-matched braces, and so on.
 
 The system most commonly used for this is some version of
 @command{Emacs} (including @command{XEmacs}) with the @acronym{ESS}
-package (@uref{http://ess.r-project.org/}: it is often is installed with
+package (@uref{https://ESS.R-project.org/}: it is often is installed with
 @command{Emacs} but may need to be loaded, or even installed,
 separately).
 
 Another is the Eclipse IDE with the Stat-ET plugin
 (@uref{http://www.walware.de/goto/statet}), and (on Windows only)
-Tinn-R (@uref{http://sourceforge.net/projects/tinn-r/}).
+Tinn-R (@uref{http://sourceforge.net/@/projects/@/tinn-r/}).
 
 People have also used @LaTeX{} mode in a editor, as @file{.Rd} files are
 rather similar to @LaTeX{} files.
 
 Some @R{} front-ends provide editing support for  @file{.Rd} files, for
-example RStudio (@uref{http://rstudio.org/}).
+example RStudio (@uref{https://rstudio.org/}).
 
 @node Tidying and profiling R code, Debugging, Writing R documentation files, Top
 @chapter Tidying and profiling R code
@@ -6314,12 +7137,12 @@ As an example, consider the following code (from Venables & Ripley,
 @group
 library(MASS); library(boot)
 storm.fm <- nls(Time ~ b*Viscosity/(Wt - c), stormer,
-		start = c(b=30.401, c=2.2183))
+                start = c(b=30.401, c=2.2183))
 st <- cbind(stormer, fit=fitted(storm.fm))
 storm.bf <- function(rs, i) @{
     st$Time <-  st$fit + rs[i]
     tmp <- nls(Time ~ (b * Viscosity)/(Wt - c), st,
-	       start = coef(storm.fm))
+               start = coef(storm.fm))
     tmp$m$getAllPars()
 @}
 rs <- scale(resid(storm.fm), scale = FALSE) # remove the mean
@@ -6411,7 +7234,7 @@ more memory than is conveniently available or when memory allocation and
 copying of objects is responsible for slow code. There are three ways to
 profile memory use over time in @R{} code. All three require @R{} to
 have been compiled with @option{--enable-memory-profiling}, which is not
-the default, but is currently used for the OS X and Windows binary
+the default, but is currently used for the macOS and Windows binary
 distributions. All can be misleading, for different reasons.
 
 In understanding the memory profiles it is useful to know a little more
@@ -6441,8 +7264,7 @@ surprising memory use. For example, in the `survey' package we have
 @smallexample
 print.svycoxph <- function (x, ...)
 @{
-    print(x$survey.design, varnames = FALSE, design.summaries = FALSE,
-	...)
+    print(x$survey.design, varnames = FALSE, design.summaries = FALSE, ...)
     x$call <- x$printcall
     NextMethod()
 @}
@@ -6572,7 +7394,7 @@ profile DLLs on Windows.
 @menu
 * Linux::                       
 * Solaris::                     
-* OS X::                        
+* macOS::                       
 @end menu
 
 @node Linux, Solaris, Profiling compiled code, Profiling compiled code
@@ -6631,10 +7453,11 @@ dates <- sprintf('%04d-%02d-%02d', as.integer(2000+rnorm(N)),
                  as.integer(runif(N, 1, 12)), as.integer(runif(N, 1, 28)))
 system.time(a <- as.POSIXct(dates, format = "%Y-%m-%d"))
 @end example
+ at noindent
 with timings from the final step
 @example
-   user  system elapsed 
-  0.371   0.237   0.612 
+   user  system elapsed
+  0.371   0.237   0.612
 @end example
 
 @R{}-level profiling by @code{Rprof} shows
@@ -6645,6 +7468,7 @@ with timings from the final step
 "sprintf"                 0.74    17.87       0.98     23.67
 ...
 @end example
+ at noindent
 so the conversion from character to @code{POSIXlt} takes most of the
 time.
 
@@ -6655,22 +7479,23 @@ opreport
 opreport -l /path/to/R_HOME/bin/exec/R
 opannotate --source /path/to/R_HOME/bin/exec/R
 ## And for the system time
-opreport -l /lib64/libc.so.6 
+opreport -l /lib64/libc.so.6
 @end example
+ at noindent
 The first report shows where (which library etc) the time was spent:
 @example
 CPU_CLK_UNHALT...|
   samples|      %|
 ------------------
    166761 99.9161 Rdev
-	CPU_CLK_UNHALT...|
-	  samples|      %|
-	------------------
-	    70586 42.3276 no-vmlinux
-	    56963 34.1585 libc-2.16.so
-	    36922 22.1407 R
-	     1584  0.9499 stats.so
-	      624  0.3742 libm-2.16.so
+        CPU_CLK_UNHALT...|
+          samples|      %|
+        ------------------
+            70586 42.3276 no-vmlinux
+            56963 34.1585 libc-2.16.so
+            36922 22.1407 R
+             1584  0.9499 stats.so
+              624  0.3742 libm-2.16.so
 ...
 @end example
 
@@ -6694,13 +7519,14 @@ samples  %        image name symbol name
 584       1.6015  R           day_of_the_week
 ...
 @end example
+ at noindent
 @command{opannotate} shows that 31% of the time in @R{} is spent in
 @file{memory.c}, 21% in @file{datetime.c} and 7% in @file{Rstrptime.h}.
 The analysis for @file{libc} showed that calls to @code{wcsftime}
 dominated, so those calls were cached for @R{} 3.0.3: the time spent in
 @code{no-vmlinux} (the kernel) was reduced dramatically.
 
-On platforms which support it, callgraphs can be produced by
+On platforms which support it, call graphs can be produced by
 @command{opcontrol --callgraph} if collected via @command{operf
 --callgraph}.
 
@@ -6714,7 +7540,7 @@ Another example, from @CRANpkg{sm} version 2.2-5.4.  The example for
 system.time(example(sm.variogram))
 ...
    user  system elapsed
-  5.543   3.202   8.785  
+  5.543   3.202   8.785
 @end example
 
 @noindent
@@ -6725,13 +7551,13 @@ second plot, showed
   samples|      %|
 ------------------
    381845 99.9885 R
-	CPU_CLK_UNHALT...|
-	  samples|      %|
-	------------------
-	   187484 49.0995 sm.so
-	   169627 44.4230 no-vmlinux
-	    12636  3.3092 libgfortran.so.3.0.0
-	     6455  1.6905 R
+        CPU_CLK_UNHALT...|
+          samples|      %|
+        ------------------
+           187484 49.0995 sm.so
+           169627 44.4230 no-vmlinux
+            12636  3.3092 libgfortran.so.3.0.0
+             6455  1.6905 R
 @end example
 
 @noindent
@@ -6785,14 +7611,14 @@ Shutting down the profiler and clearing the records needs to be done as
 root.
 
 
- at node Solaris, OS X, Linux, Profiling compiled code
+ at node Solaris, macOS, Linux, Profiling compiled code
 @subsection Solaris
 
 On 64-bit (only) Solaris, the standard profiling tool @command{gprof}
 collects information from shared objects compiled with @option{-pg}.
 
- at node OS X,  , Solaris, Profiling compiled code
- at subsection OS X
+ at node macOS,  , Solaris, Profiling compiled code
+ at subsection macOS
 
 Developers have recommended @command{sample} (or @command{Sampler.app},
 which is a GUI version), @command{Shark} (in version of @code{Xcode}
@@ -6809,7 +7635,7 @@ ways to get useful error information and moving on to how to deal with
 errors that crash @R{}.  For those who prefer other styles there are
 contributed packages such as @CRANpkg{debug} on @acronym{CRAN}
 (described in an article in
- at uref{http://CRAN.R-project.org/@/doc/@/Rnews/@/Rnews_2003-3.pdf, R-News
+ at uref{https://CRAN.R-project.org/@/doc/@/Rnews/@/Rnews_2003-3.pdf, R-News
 3/3}).  (There are notes from 2002 provided by Roger Peng at
 @uref{http://www.biostat.jhsph.edu/@/~rpeng/@/docs/@/R-debug-tools.pdf}
 which provide complementary examples to those given here.)
@@ -6923,7 +7749,7 @@ suite.
 Error: no valid set of coefficients has been found: please supply starting values
 > traceback()
 3: stop("no valid set of coefficients has been found: please supply
-	 starting values", call. = FALSE)
+         starting values", call. = FALSE)
 2: glm.fit(x = X, y = Y, weights = weights, start = start, etastart = etastart,
        mustart = mustart, offset = offset, family = family, control = control,
        intercept = attr(mt, "intercept") > 0)
@@ -6942,7 +7768,7 @@ compiled code, for example (from @code{?nls})
 
 @smallexample
 Error in nls(y ~ a + b * x, start = list(a = 0.12345, b = 0.54321), trace = TRUE) :
-	step factor 0.000488281 reduced below 'minFactor' of 0.000976563
+        step factor 0.000488281 reduced below 'minFactor' of 0.000976563
 >  traceback()
 2: .Call(R_nls_iter, m, ctrl, trace)
 1: nls(y ~ a + b * x, start = list(a = 0.12345, b = 0.54321), trace = TRUE)
@@ -6967,7 +7793,7 @@ need not be the innermost call, as in
    @{
        setPars(newPars)
        assign("resid", .swts * (lhs - assign("rhs", getRHS(), envir = thisEnv)),
-	   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)))
@@ -7013,7 +7839,8 @@ something like
 options(expressions=500)
 @end example
 
- at noindent and re-run the example showing the error.
+ at noindent 
+and re-run the example showing the error.
 
 Sometimes there is warning that clearly is the precursor to some later
 error, but it is not obvious where it is coming from.  Setting
@@ -7073,16 +7900,16 @@ Browse[1]> ls()
 [31] "varmu"      "w"          "weights"    "x"          "xnames"
 [36] "y"          "ynames"     "z"
 Browse[1]> eta
-	    1             2             3             4             5
+            1             2             3             4             5
  0.000000e+00 -2.235357e-06 -1.117679e-05 -5.588393e-05 -2.794197e-04
-	    6             7             8             9
+            6             7             8             9
 -1.397098e-03 -6.985492e-03 -3.492746e-02 -1.746373e-01
 Browse[1]> valideta(eta)
 [1] TRUE
 Browse[1]> mu
-	1         2         3         4         5         6         7         8
+        1         2         3         4         5         6         7         8
 1.0000000 0.9999978 0.9999888 0.9999441 0.9997206 0.9986039 0.9930389 0.9656755
-	9
+        9
 0.8397616
 Browse[1]> validmu(mu)
 [1] FALSE
@@ -7157,16 +7984,16 @@ Browse[1]> start
 [1] -2.235357e-06
 debug: eta <- drop(x %*% start)
 Browse[1]> eta
-	    1             2             3             4             5
+            1             2             3             4             5
  0.000000e+00 -2.235357e-06 -1.117679e-05 -5.588393e-05 -2.794197e-04
-	    6             7             8             9
+            6             7             8             9
 -1.397098e-03 -6.985492e-03 -3.492746e-02 -1.746373e-01
 Browse[1]>
 debug: mu <- linkinv(eta <- eta + offset)
 Browse[1]> mu
-	1         2         3         4         5         6         7         8
+        1         2         3         4         5         6         7         8
 1.0000000 0.9999978 0.9999888 0.9999441 0.9997206 0.9986039 0.9930389 0.9656755
-	9
+        9
 0.8397616
 @end smallexample
 
@@ -7227,7 +8054,7 @@ damage to the structures which @R{} itself has allocated may only become
 apparent at the next garbage collection (or even at later garbage
 collections after objects have been deleted).
 
-Note that memory access errors may be seen with LAPACK, BLAS and
+Note that memory access errors may be seen with LAPACK, BLAS, OpenMP and
 Java-using packages: some at least of these seem to be intentional, and
 some are related to passing characters to Fortran.
 
@@ -7321,8 +8148,8 @@ 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 OS X at footnote{at the time of writing mainly for 10.7 with some
-support for 10.8, none for the current 10.9.} you can use
+of macOS at 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
@@ -7351,13 +8178,15 @@ of @R{} with extra instrumentation to help @code{valgrind} detect errors
 in the use of memory allocated from the @R{} heap.  The
 @command{configure} option is
 @option{--with-valgrind-instrumentation=@var{level}}, where @var{level}
-is 0, 1, 2 or 3.  Level 0 is the default and does not add any anything.
-Level 1 will detect some uses of uninitialised memory and has little
-impact on speed (compared to level 0). Levels 2 and 3 at footnote{see the
- at R{} source file @file{src/main/memory.c} for precisely what these do.}
-will detect many other memory-use bugs but make @R{} much slower when
-running under @code{valgrind}.  Using this in conjunction with
- at code{gctorture} can be even more effective (and even slower).
+is 0, 1 or 2.  Level 0 is the default and does not add anything.
+Level 1 will detect some uses at footnote{Those in some numeric, logical,
+integer, raw, complex vectors and in memory allocated by
+ at code{R_alloc}.} of uninitialised memory and has little impact on speed
+(compared to level 0). Level 2 will detect many other memory-use
+bugs at footnote{including using the data sections of @R{} vectors after
+they are freed.}  but make @R{} much slower when running under
+ at code{valgrind}.  Using this in conjunction with @code{gctorture} can be
+even more effective (and even slower).
 
 An example of @code{valgrind} output is
 @smallexample
@@ -7419,7 +8248,7 @@ It is possible to run all the examples, tests and vignettes covered by
 @noindent
 or setting the environment variable @env{VALGRIND_OPTS}.
 
-On OS X you may need to ensure that debugging symbols are made available
+On macOS you may need to ensure that debugging symbols are made available
 (so @command{valgrind} reports line numbers in files).  This can usually
 be done with the @command{valgrind} option @option{--dsymutil=yes} to
 ask for the symbols to be dumped when the @file{.so} file is loaded.
@@ -7440,19 +8269,24 @@ threaded programs.
 @command{AddressSanitizer} (`ASan') is a tool with similar aims to the
 memory checker in @command{valgrind}.  It is available with suitable
 builds at footnote{currently only on @cputype{ix86}/@cputype{x86_64} Linux
-and OS X, not including the versions distributed by Apple in
- at code{Xcode} 4.6 or 5. On some platforms, e.g.@: Fedora, the runtime
-library, @pkg{libasan}, needs to be installed separately. OS X users can
-install a suitable @command{clang} from the sources or possibly
-distributions such as MacPorts or Homebrew.} of @command{gcc} 4.8.0 or
- at command{clang} 3.1 and later on common Linux and OS X platforms.  See
- at uref{http://clang.llvm.org/docs/UsersManual.html#controlling-code-generation},
- at uref{http://clang.llvm.org/docs/AddressSanitizer.html} and
- at uref{https://code.google.com/p/address-sanitizer/}.
+and macOS (including the builds in Xcode 7 but not earlier Apple
+releases).  On some platforms the runtime library, @pkg{libasan}, needs
+to be installed separately, and for checking C++ you may also need
+ at pkg{libubsan}.} of @command{gcc} and @command{clang} on common Linux
+and macOS platforms.  See
+ at uref{http://clang.llvm.org/@/docs/@/UsersManual.html#controlling-code-generation},
+ at uref{http://clang.llvm.org/@/docs/@/AddressSanitizer.html} and
+ at uref{https://code.google.com/@/p/@/address-sanitizer/}.
+
+More thorough checks of C++ code are done if the C++ library has been
+`annotated': at the time of writing this applied to @code{std::vector}
+in @code{libc++} for use with @command{clang} and gives rise to
+ at samp{container-overflow}@footnote{see
+ at uref{http://llvm.org/devmtg/2014-04/PDFs/LightningTalks/EuroLLVM%202014%20--%20container%20overflow.pdf}.}
+reports.
 
 It requires code to have been compiled @emph{and linked} with
- at option{-fsanitize=address}@footnote{@option{-faddress-sanitizer} in
- at command{clang} 3.1}, and compiling with @code{-fno-omit-frame-pointer}
+ at option{-fsanitize=address} and compiling with @code{-fno-omit-frame-pointer}
 will give more legible reports.  It has a runtime penalty of 2--3x,
 extended compilation times and uses substantially more memory, often
 1--2GB, at run time.  On 64-bit platforms it reserves (but does not
@@ -7463,28 +8297,31 @@ By comparison with @command{valgrind}, ASan can
 detect misuse of stack and global variables but not the use of
 uninitialized memory.
 
- at command{gcc} as from version 4.9.0 returns symbolic addresses for the
-location of the error, but most other versions do not.  For the latter,
-one possibility is to use an external symbolizer.  Depending on the
-version, this can be done @emph{via} an environment variable, e.g.@:
+Recent versions return symbolic addresses for the location of the error
+provided @command{llvm-symbolizer}@footnote{part of the LLVM project and
+in distributed in @code{llvm} RPMs and @code{.deb}s on Linux.  It is not
+currently shipped by Apple.} is on the path: if it is available but not
+on the path or has been renamed at footnote{as Ubuntu is said to do.}, one
+can use an environment variable, e.g.@:
 
 @example
 ASAN_SYMBOLIZER_PATH=/path/to/llvm-symbolizer
 @end example
 
 @noindent
-or by piping the output through
+An alternative is to pipe the output through
 @command{asan_symbolize.py}@footnote{installed on some Linux systems as
 @command{asan_symbolize}, and obtainable from
- at uref{https://llvm.org/svn/llvm-project/compiler-rt/trunk/lib/asan/scripts/asan_symbolize.py}:
-it makes use of @command{llvm-symbolizer} if available.} and
-perhaps then (for compiled C++ code) @command{c++filt}.
+ at uref{https://llvm.org/@/svn/@/llvm-project/@/compiler-rt/@/trunk/@/lib/@/asan/scripts/@/asan_symbolize.py}:
+it makes use of @command{llvm-symbolizer} if available.} and perhaps
+then (for compiled C++ code) @command{c++filt}.  (On macOS, you may need
+to run @command{dsymutil} to get line-number reports.)
 
 The simplest way to make use of this is to build a version of @R{} with
 something like
 
 @example
-CC="gcc-4.9 -std=gnu99 -fsanitize=address"
+CC="gcc -std=gnu99 -fsanitize=address"
 CFLAGS="-fno-omit-frame-pointer -g -O2 -Wall -pedantic -mtune=native"
 @end example
 
@@ -7493,11 +8330,12 @@ which will ensure that the @code{libasan} run-time library is compiled
 into the @R{} executable.  However this check can be enabled on a
 per-package basis by using a @file{~/.R/Makevars} file like
 @example
-CC = gcc-4.9 -std=gnu99 -fsanitize=address -fno-omit-frame-pointer
-CXX = g++-4.9 -fsanitize=address -fno-omit-frame-pointer
-F77 = gfortran-4.9 -fsanitize=address
-FC = gfortran-4.9 -fsanitize=address
+CC = gcc -std=gnu99 -fsanitize=address -fno-omit-frame-pointer
+CXX = g++ -fsanitize=address -fno-omit-frame-pointer
+F77 = gfortran -fsanitize=address
+FC = gfortran -fsanitize=address
 @end example
+ at noindent
 (Note that @code{-fsanitize=address} has to be part of the compiler
 specification to ensure it is used for linking.  These settings will not
 be honoured by packages which ignore @file{~/.R/Makevars}.)  It will
@@ -7513,7 +8351,7 @@ specified as part of @samp{CC} when @R{} was built.
 
 For options available @emph{via} the environment variable
 @env{ASAN_OPTIONS} see
- at uref{https://code.google.com/p/address-sanitizer/wiki/Flags#Run-time_flags}.
+ at uref{https://code.google.com/@/p/@/address-sanitizer/@/wiki/@/Flags#Run-time_flags}.
 With @command{gcc} additional control is available @emph{via} the
 @option{--params} flag: see its @command{man} page.
 
@@ -7523,8 +8361,15 @@ produced: for @command{gdb} or @command{lldb} you could use
 @example
 break __asan_report_error
 @end example
+ at noindent
 (See
- at uref{http://code.google.com/p/address-sanitizer/wiki/AddressSanitizer#gdb}.)
+ at uref{https://code.google.com/@/p/@/address-sanitizer/@/wiki@//AddressSanitizer#gdb}.)
+
+Recent versions at footnote{This is expected to be in @command{gcc} 7 and
+ at command{clang} 4.0.0.  Currently for @command{gcc} it is implied by
+ at option{-fsanitize=address}.} added the flag
+ at option{-fsanitize-address-use-after-scope}: see
+ at uref{https://github.com//google//sanitizers//wiki//AddressSanitizerUseAfterScope}.
 
 @menu
 * Using Leak Sanitizer::        
@@ -7534,7 +8379,7 @@ break __asan_report_error
 @subsubsection Using the Leak Sanitizer
 
 For @code{x86_64} Linux there is a leak sanitizer, `LSan': see
- at uref{https://code.google.com/p/address-sanitizer/wiki/LeakSanitizer}.
+ at uref{https://code.google.com/@/p/@/address-sanitizer/@/wiki/@/LeakSanitizer}.
 This is available on recent versions of @code{gcc} and @code{clang}, and
 where available is compiled in as part of ASan.
 
@@ -7545,19 +8390,19 @@ variable
 ASAN_OPTIONS='detect_leaks=1'
 @end example
 @noindent
-However, this is the default on @command{clang} 3.5 and pre-releases of
- at command{gcc} 5.0.0.
+However, this was made the default for @command{clang} 3.5 and
+ at command{gcc} 5.1.0.
 
 When LSan is enabled, leaks give the process a failure error status (by
 default @code{23}).  For an @R{} package this means the @R{} process,
 and as the parser retains some memory to the end of the process, if @R{}
 itself was built against ASan, all runs will have a failure error status
-(and that includes running @R{} as part of building @R{} itself).
+(which may include running @R{} as part of building @R{} itself).
 
 To disable both this and some strict checking use
 
 @example
-setenv ASAN_OPTIONS 'alloc_dealloc_mismatch=0:detect_leaks=0'
+setenv ASAN_OPTIONS 'alloc_dealloc_mismatch=0:detect_leaks=0:detect_odr_violation=0'
 @end example
 
 LSan also has a `stand-alone' mode where it is compiled in using
@@ -7579,26 +8424,27 @@ packages are attempts to coerce a @code{NaN} or infinity to type
 might be @code{NA_INTEGER}.
 
 `UBSanitizer' is a tool for C/C++ source code selected by
- at option{-fsanitize=undefined} in suitable builds of @command{clang}, and
-GCC as from 4.9.0.  Its runtime library is linked into each package's
-DLL, so it is less often needed to be included in @env{MAIN_LDFLAGS}.
-
-Some versions have greatly increased compilation times on a few files
-(e.g.@: @file{src/extra/bzip2/decompress.c} in the @R{} sources with
- at command{clang} 3.5).
+ at option{-fsanitize=undefined} in suitable builds at footnote{On some
+platforms the runtime library, @pkg{libubsan}, needs to be installed
+separately.} of @command{clang} and GCC.  Its (main) runtime library is
+linked into each package's DLL, so it is less often needed to be
+included in @env{MAIN_LDFLAGS}.
 
 This sanitizer can be combined with the Address Sanitizer by
- at option{-fsanitize=undefined,address}.
+ at option{-fsanitize=undefined,address} (where both are supported).
 
 Finer control of what is checked can be achieved by other options: for
 @command{clang} see
- at uref{http://clang.llvm.org/docs/UsersManual.html#controlling-code-generation}.
+ at uref{http://clang.llvm.org/@/docs/@/UsersManual.html#controlling-code-generation}. at footnote{or
+the user manual for your version of @command{clang}, e.g.@: (the paths
+have differed for some versions)
+ at uref{http://llvm.org/@/releases/@/4.0.0/@/tools/@/clang/@/docs/@/UsersManual.html}.}
 The current set for @command{clang} is (on a single line):
 @example
--fsanitize=alignment,bounds,bool,enum,float-cast-overflow,
-float-divide-by-zero,function,integer-divide-by-zero,null,object-size,
-return,returns-nonnull-attribute,shift,signed-integer-overflow,
-unreachable,vla-bound,vptr
+-fsanitize=alignment,bool,bounds,enum,float-cast-overflow,
+float-divide-by-zero,function,integer-divide-by-zero,nonnull-attribute,
+null,object-size,return,returns-nonnull-attribute,shift,
+signed-integer-overflow,unreachable,unsigned-integer-overflow,vla-bound,vptr
 @end example
 
 @noindent
@@ -7610,40 +8456,55 @@ like
 @end example
 
 @noindent
-In addition,
- at example
--fsanitize=unsigned-integer-overflow
- at end example
-is available as a separate option in some versions of @command{clang}
-(not enabled by @option{-fsanitize=undefined}).
+(@code{function}, @code{return} and @code{vptr} apply only to C++).
 
- at command{clang} 3.5 needs
+ at command{clang} 3.5 and later may need
 
 @example
 -fsanitize=undefined -fno-sanitize=float-divide-by-zero,vptr
 @end example
 
 @noindent
-for C++ code (in @code{CXX} and @code{CXX1X}).
-
-A smaller selection is available for GCC, for 4.9.x defaulting to
+for C++ code (in @code{CXX} and @code{CXX11}) as the run-time library
+for @code{vptr} needs to be linked into the main @R{} executable (and
+that would need to be linked by @code{clang++}, not @code{clang}: you
+could try building @R{} with something like
 @example
--fsanitize=bounds,float-cast-overflow,integer-divide-by-zero,null,
-return,shift,signed-integer-overflow,unreachable,vla-bound
+MAIN_LD="clang++ -fsanitize=undefined"
 @end example
+ at noindent
+or add @code{-lclang_rt.asan_cxx-x86_64}@footnote{This includes the C++
+UBSAN handlers, despite its name.} or similar to @code{LD_FLAGS}).
 
+See
+ at uref{https://gcc.gnu.org/@/onlinedocs/@/gcc/@/Instrumentation-Options.html}
+(or the manual for your version of GCC, installed or @emph{via}
+ at uref{https://gcc.gnu.org/@/onlinedocs/}) for the options supported by
+GCC: 5.3 supports
+ at example
+-fsanitize=alignment,bool,bounds,enum,float-cast-overflow,
+integer-divide-by-zero,nonnull-attribute,null,object-size,
+return,returns-nonnull-attribute,shift,signed-integer-overflow,
+unreachable,vla-bound,vptr
+ at end example
 @noindent
 with
 @example
 -fsanitize=float-divide-by-zero
 @end example
-
 @noindent
 as a separate option not enabled by @code{-fsanitize=undefined} (and not
-desirable for @R{} uses).  See
- at uref{https://gcc.gnu.org/onlinedocs/gcc/Debugging-Options.html} (or the
-manual for your version of GCC).  GCC 5.0.0 (under development) can
-detect alignment errors.
+desirable for @R{} uses).  At the time of writing the @code{object-size}
+and @code{vptr} checks produced many warnings on GCC's own C++ headers,
+so should be disabled.
+
+GCC 6 added
+ at example
+-fsanitize=bounds-strict
+ at end example
+ at noindent
+(an extension of @code{bounds} to `flexible array member-like arrays'),
+ at option{-fsanitize=shift-base} and @option{-fsanitize=shift-exponent}.
 
 Other useful flags include
 @example
@@ -7669,21 +8530,18 @@ and @option{-ftrapv}, said to be more reliable in @command{clang} than
 
 For more details on the topic see
 @uref{http://blog.regehr.org/archives/213} and
- at uref{http://blog.llvm.org/2011/05/what-every-c-programmer-should-know.html}
+ at uref{http://blog.llvm.org/@/2011/@/05/@/what-every-c-programmer-should-know.html}
 (which has 3 parts).
 
-This option may not compile OpenMP code.
-
-
 
 @node Other analyses with `clang', Using `Dr. Memory', Using Undefined Behaviour Sanitizer, Checking memory access
 @subsection Other analyses with `clang'
 
 Recent versions of @command{clang} on @cputype{x86_64} Linux have
-`ThreadSanitizer' (@uref{https://code.google.com/p/thread-sanitizer/}),
+`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},
- at uref{https://code.google.com/p/memory-sanitizer/wiki/MemorySanitizer})
+(@uref{http://clang.llvm.org/@/docs/@/MemorySanitizer.html},
+ at 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}.
 
@@ -7694,7 +8552,7 @@ files during compilation: see @uref{http://clang-analyzer.llvm.org/}.
 @subsection Using `Dr. Memory'
 
 `Dr. Memory' from @uref{http://www.drmemory.org/} is a memory checker
-for (currently) 32-bit Windows, Linux and OS X with similar aims to
+for (currently) 32-bit Windows, Linux and macOS with similar aims to
 @command{valgrind}.  It works with unmodified executables at footnote{but
 works better if inlining and frame pointer optimizations are disabled.}
 and detects memory access errors, uninitialized reads and memory leaks.
@@ -7704,7 +8562,7 @@ and detects memory access errors, uninitialized reads and memory leaks.
 
 Most of the Fortran compilers used with @R{} allow code to be compiled
 with checking of array bounds: for example @command{gfortran} has option
- at option{-fbounds-check} and Solaris Studio has @option{-C}.  This will
+ at option{-fbounds-check} and Oracle Studio has @option{-C}.  This will
 give an error when the upper or lower bound is exceeded, e.g.
 @example
 At line 97 of file .../src/appl/dqrdc2.f
@@ -7728,11 +8586,10 @@ when you run @command{R CMD check}.
 
 This may report incorrectly errors with the way that Fortran character
 variables are passed, particularly when Fortran subroutines are called
-from C code.  This may include at footnote{depending on the compiler
-version, with @command{gfortran} @code{4.8.x} doing this less than
- at code{4.7.x}.} the use of BLAS and LAPACK subroutines in @R{}, so it is
-not advisable to build @R{} itself with bounds checking (and may not
-even be possible as these subroutines are called during the @R{} build).
+from C code.  This may include the use of BLAS and LAPACK subroutines in
+ at R{}, so it is not advisable to build @R{} itself with bounds checking
+(and may not even be possible as these subroutines are called during the
+ at R{} build).
 
 
 @node Debugging compiled code,  , Checking memory access, Debugging
@@ -7744,7 +8601,7 @@ Sooner or later programmers will be faced with the need to debug
 compiled code loaded into @R{}.  This section is geared to platforms
 using @command{gdb} with code compiled by @code{gcc}, but similar things
 are possible with other debuggers such as @command{lldb}
-(@uref{http://lldb.llvm.org/}, used on OS X) and Sun's @command{dbx}:
+(@uref{http://lldb.llvm.org/}, used on macOS) and Sun's @command{dbx}:
 some debuggers have graphical front-ends available.
 
 Consider first `crashes', that is when @R{} terminated unexpectedly with
@@ -7780,11 +8637,11 @@ disabling it.)
 
 A fairly common cause of such crashes is a package which uses @code{.C}
 or @code{.Fortran} and writes beyond (at either end) one of the
-arguments it is passed.  As from @R{} 3.0.0 there is a good way to
-detect this: using @code{options(CBoundsCheck = TRUE)} (which can be
-selected @emph{via} the environment variable @env{R_C_BOUNDS_CHECK=yes)}
-changes the way @code{.C} and @code{.Fortran} work to check if the
-compiled code writes in the 64 bytes at either end of an argument.
+arguments it is passed.  There is a good way to detect this: using
+ at code{options(CBoundsCheck = TRUE)} (which can be selected @emph{via}
+the environment variable @env{R_C_BOUNDS_CHECK=yes)} changes the way
+ at code{.C} and @code{.Fortran} work to check if the compiled code writes
+in the 64 bytes at either end of an argument.
 
 Another cause of a `crash' is to overrun the C stack.  @R{} tries to
 track that in its own code, but it may happen in third-party compiled
@@ -7945,7 +8802,7 @@ $2 = @{
     vecsxp = @{
       length = 2,
       type = @{c = 0x40634700 "0>X@@D>X@@0>X@@", i = 0x40634700,
-	f = 0x40634700, z = 0x40634700, s = 0x40634700@},
+        f = 0x40634700, z = 0x40634700, s = 0x40634700@},
       truelength = 1075851272,
     @},
     primsxp = @{offset = 2@},
@@ -8028,7 +8885,7 @@ In general the representation of each object follows the format:
 @@<address> <type-nr> <type-name> <gc-info> [<flags>] ...
 @end smallexample
 
-For a more fine-grained control over the the depth of the recursion
+For a more fine-grained control over the depth of the recursion
 and the output of vectors @code{R_inspect3} takes additional two character()
 parameters: maximum depth and the maximal number of elements that will
 be printed for scalar vectors. The defaults in @code{R_inspect} are
@@ -8125,7 +8982,8 @@ subroutine.
 @end multitable
 @end quotation
 
-Do please note the first two.  On the 64-bit Unix/Linux/OS X platforms,
+ at noindent
+Do please note the first two.  On the 64-bit Unix/Linux/macOS platforms,
 @code{long} is 64-bit whereas @code{int} and @code{INTEGER} are 32-bit.
 Code ported from S-PLUS (which uses @code{long *} for @code{logical} and
 @code{integer}) will not work on all 64-bit platforms (although it may
@@ -8171,10 +9029,10 @@ package writers using the same symbol name, and such name clashes are
 normally sufficient to cause @R{} to crash.  (If it is not present and
 the call is from the body of a function defined in a package namespace,
 the shared object loaded by the first (if any) @code{useDynLib}
-directive will be used.  However, prior to @R{} 2.15.2 the detection of
-the correct namespace is unreliable and you are strongly recommended to
-use the @code{PACKAGE} argument for packages to be used with earlier
-versions of @R{}.
+directive will be used.  
+ at c However, prior to @R{} 2.15.2 the detection of the correct namespace is
+ at c unreliable and you are strongly recommended to use the @code{PACKAGE}
+ at c argument for packages to be used with earlier versions of @R{}.
 
 Note that the compiled code should not return anything except through
 its arguments: C functions should be of type @code{void} and FORTRAN
@@ -8191,10 +9049,10 @@ void convolve(double *a, int *na, double *b, int *nb, double *ab)
     int nab = *na + *nb - 1;
 
     for(int i = 0; i < nab; i++)
-	ab[i] = 0.0;
+        ab[i] = 0.0;
     for(int i = 0; i < *na; i++)
-	for(int j = 0; j < *nb; j++)
-	    ab[i + j] += a[i] * b[j];
+        for(int j = 0; j < *nb; j++)
+            ab[i + j] += a[i] * b[j];
 @}
 @end group
 @end example
@@ -8257,7 +9115,7 @@ C/C++ code that includes @file{Rinternals.h} should be called via
 @findex dyn.unload
 
 Compiled code to be used with @R{} is loaded as a shared object
-(Unix-alikes including OS X, @pxref{Creating shared objects} for more
+(Unix-alikes including macOS, @pxref{Creating shared objects} for more
 information) or DLL (Windows).
 
 The shared object/DLL is loaded by @code{dyn.load} and unloaded by
@@ -8337,8 +9195,6 @@ unload routines for the @code{mylib} DLL.
 @quotation
 @cartouche
 @example
-#include <R.h>
-#include <Rinternals.h>
 #include <R_ext/Rdynload.h>
 
 void
@@ -8358,10 +9214,12 @@ R_unload_mylib(DllInfo *info)
 @end quotation
 
 If a shared object/DLL is loaded more than once the most recent version
-is used.  More generally, if the same symbol name appears in several
-shared objects, the most recently loaded occurrence is used.  The
- at code{PACKAGE} argument and registration (see the next section) provide
-good ways to avoid any ambiguity in which occurrence is meant.
+is used. at footnote{Strictly this is OS-specific, but no exceptions have
+been seen for many years.}  More generally, if the same symbol name
+appears in several shared objects, the most recently loaded occurrence
+is used.  The @code{PACKAGE} argument and registration (see the next
+section) provide good ways to avoid any ambiguity in which occurrence is
+meant.
 
 On Unix-alikes the paths used to resolve dynamically linked dependent
 libraries are fixed (for security reasons) when the process is launched,
@@ -8383,20 +9241,39 @@ argument to @code{dyn.load}.  This is (by default) used by
 @section Registering native routines
 @cindex Registering native routines
 
+ at menu
+* Speed considerations::        
+* Converting a package to use registration::  
+* Linking to native routines in other packages::  
+ at end menu
+
 By `native' routine, we mean an entry point in compiled code.
 
 In calls to @code{.C}, @code{.Call}, @code{.Fortran} and
 @code{.External}, @R{} must locate the specified native routine by
 looking in the appropriate shared object/DLL.  By default, @R{} uses the
-operating system-specific dynamic loader to lookup the symbol in all
-loaded DLLs and elsewhere.  Alternatively, the author of the DLL
-can explicitly register routines with @R{} and use a single,
+operating-system-specific dynamic loader to lookup the symbol in
+all at footnote{For calls from within a namespace the search is confined to
+the DLL loaded for that package.} loaded DLLs and the @R{} executable
+or libraries it is linked to.  Alternatively, the author of the DLL can
+explicitly register routines with @R{} and use a single,
 platform-independent mechanism for finding the routines in the DLL.  One
 can use this registration mechanism to provide additional information
 about a routine, including the number and type of the arguments, and
-also make it available to @R{} programmers under a different name.  In
-the future, registration may be used to implement a form of ``secure''
-or limited native access.
+also make it available to @R{} programmers under a different name.
+ at c No sign of this in 15 years ....
+ at c In the future, registration may be used to
+ at c implement a form of ``secure'' or limited native access.
+
+Registering routines has two main advantages: it provides a
+faster at footnote{For unregistered entry points the OS's @code{dlsym}
+routine is used to find addresses.  Its performance varies considerably
+by OS and even in the best case it will need to search a much larger
+symbol table than, say, the table of @code{.Call} entry points.} way to
+find the address of the entry point @emph{via} tables stored in the DLL
+at compilation time, and it provides a run-time check that the entry
+point is called with the right number of arguments and, optionally, the
+right argument types.
 
 @findex R_registerRoutines
 To register routines with @R{}, one calls the C routine
@@ -8408,7 +9285,7 @@ takes 5 arguments.  The first is the @code{DllInfo} object passed by
 information about the methods.  The remaining 4 arguments are arrays
 describing the routines for each of the 4 different interfaces:
 @code{.C}, @code{.Call}, @code{.Fortran} and @code{.External}.  Each
-argument is a @code{FIND}-terminated array of the element types given in
+argument is a @code{NULL}-terminated array of the element types given in
 the following table:
 
 @quotation
@@ -8420,7 +9297,7 @@ the following table:
 @end multitable
 @end quotation
 
-Currently, the @code{R_ExternalMethodDef} is the same as
+Currently, the @code{R_ExternalMethodDef} type is the same as
 @code{R_CallMethodDef} type and contains fields for the name of the
 routine by which it can be accessed in @R{}, a pointer to the actual
 native symbol (i.e., the routine itself), and the number of arguments
@@ -8435,7 +9312,7 @@ SEXP myCall(SEXP a, SEXP b, SEXP c);
 we would describe this as
 
 @example
-R_CallMethodDef callMethods[]  = @{
+static const R_CallMethodDef callMethods[]  = @{
   @{"myCall", (DL_FUNC) &myCall, 3@},
   @{NULL, NULL, 0@}
 @};
@@ -8445,9 +9322,7 @@ R_CallMethodDef callMethods[]  = @{
 along with any other routines for the @code{.Call} interface. For
 routines with a variable number of arguments invoked @emph{via} the
 @code{.External} interface, one specifies @code{-1} for the number of
-arguments which tells @R{} not to check the actual number passed.  Note
-that the number of arguments passed to @code{.External} were not
-checked prior to @R{} 3.0.0.
+arguments which tells @R{} not to check the actual number passed.
 
 Routines for use with the @code{.C} and @code{.Fortran} interfaces are
 described with similar data structures, but which have two additional
@@ -8480,19 +9355,29 @@ void myC(double *x, int *n, char **names, int *status);
 We would register it as
 
 @example
-R_CMethodDef cMethods[] = @{
-   @{"myC", (DL_FUNC) &myC, 4, @{REALSXP, INTSXP, STRSXP, LGLSXP@}@},
-   @{NULL, NULL, 0@}
+ at group
+static R_NativePrimitiveArgType myC_t[] = @{
+    REALSXP, INTSXP, STRSXP, LGLSXP
+@};
+
+static const R_CMethodDef cMethods[] = @{
+   @{"myC", (DL_FUNC) &myC, 4, myC_t@},
+   @{NULL, NULL, 0, NULL@}
 @};
+ at end group
 @end example
 
-One can also specify whether each argument is used simply as input, or
-as output, or as both input and output.  The style field in the
-description of a method is used for this.  The purpose is to
-allow at footnote{but this is not currently done.} @R{} to transfer values
-more efficiently across the @R{}-C/FORTRAN interface by avoiding copying
-values when it is not necessary. Typically, one omits this information
-in the registration data.
+ at c Never implemented ....
+ at c One can also specify whether each argument is used simply as input, or
+ at c as output, or as both input and output.  The style field in the
+ at c description of a method is used for this.  The purpose is to
+ at c allow at footnote{but this is not currently done.} @R{} to transfer values
+ at c more efficiently across the @R{}-C/FORTRAN interface by avoiding copying
+ at c values when it is not necessary. Typically, one omits this information
+ at c in the registration data.
+
+Note that @code{.Fortran} entry points are mapped to lowercase, so
+registration should use lowercase only.
 
 Having created the arrays describing each routine, the last step is to
 actually register them with @R{}.  We do this by calling
@@ -8514,47 +9399,96 @@ This routine will be invoked when @R{} loads the shared object/DLL named
 @code{.Fortran} and @code{.External} interfaces.  In our example, these
 are given as @code{NULL} since we have no routines of these types.
 
-When @R{} unloads a shared object/DLL, its registrations are
-automatically removed.  There is no other facility for unregistering a
-symbol.
+When @R{} unloads a shared object/DLL, its registrations are removed.
+There is no other facility for unregistering a symbol.
 
 Examples of registering routines can be found in the different packages
-in the @R{} source tree (e.g., @pkg{stats}).  Also, there is a
-brief, high-level introduction in @emph{R News} (volume 1/3, September
-2001, pages 20--23, @uref{http://www.r-project.org/doc/Rnews/Rnews_2001-3.pdf}).
+in the @R{} source tree (e.g., @pkg{stats} and @pkg{graphics}).  Also,
+there is a brief, high-level introduction in @emph{R News} (volume 1/3,
+September 2001, pages 20--23,
+ at 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
- at file{NAMESPACE} file (see @ref{useDynLib}).  This avoids the overhead
-of looking up an entry point each time it is used, and ensure that the
-entry point in the package is the one used (without a @code{PACKAGE =
-"pkg"} argument).  So for example the @pkg{stats} package has
+ at file{NAMESPACE} file (see @ref{useDynLib}).  So for example the
+ at pkg{stats} package has
 @example
 # Refer to all C/Fortran routines by their name prefixed by C_
 useDynLib(stats, .registration = TRUE, .fixes = "C_")
 @end example
+
+ at noindent
 in its @file{NAMESPACE} file, and then @code{ansari.test}'s default
 methods can contain
 @example
-	pansari <- function(q, m, n)
-	    .C(C_pansari, as.integer(length(q)), p = as.double(q),
-		as.integer(m), as.integer(n))$p
+        pansari <- function(q, m, n)
+            .C(C_pansari, as.integer(length(q)), p = as.double(q),
+                as.integer(m), as.integer(n))$p
 @end example
 
+ at noindent
+This avoids the overhead of looking up an entry point each time it is
+used, and ensures that the entry point in the package is the one used
+(without a @code{PACKAGE = "pkg"} argument).
 
- at c These tools are not currently operational.
- at c Additionally, there are (experimental) tools that can be used to
- at c automate the generation of the code to register the routines for a
- at c collection of C files. See the @code{GccTranslationUnit} module on the
- at c Omegahat Web site at @uref{http://www.omegahat.org/GccTranslationUnit/}
- at c for more information.
+ at code{R_init_} routines are often of the form
+ at example
+void attribute_visible R_init_mypkg(DllInfo *dll)
+@{
+    R_registerRoutines(dll, CEntries, CallEntries, FortEntries,
+                       ExternalEntries);
+    R_useDynamicSymbols(dll, FALSE);
+    R_forceSymbols(dll, TRUE);
+...
+@}
+ at end example
 
- at menu
-* Speed considerations::        
-* Linking to native routines in other packages::  
- at end menu
+ at noindent
+ at findex R_useDynamicSymbols
+ at findex R_forceSymbols
+The @code{R_useDynamicSymbols} call says the DLL is not to be searched
+for entry points specified by character strings so @code{.C} etc calls
+will only find registered symbols: the @code{R_forceSymbols} call only
+allows @code{.C} etc calls which specify entry points by @R{} objects
+such as @code{C_pansari} (and not by character strings).  Each provides
+some protection against accidentally finding your entry points when
+people supply a character string without a package, and avoids slowing
+down such searches.  Routine @code{R_forceSymbols} is available from
+ at R{} 3.0.0, so packages using it should have a dependency on at least
+ at samp{R (>= 3.0.0)}.  (For the visibility attribute @pxref{Controlling
+visibility}.)
+
+In more detail, if a package @code{mypkg} contains entry points
+ at code{reg} and @code{unreg} and the first is registered as a 0-argument
+ at code{.Call} routine, we could use (from code in the package)
+
+ at example
+.Call("reg")
+.Call("unreg")
+ at end example
+
+ at noindent
+Without or with registration, these will both work.  If
+ at code{R_init_mypkg} calls @code{R_useDynamicSymbols(dll, FALSE)}, only
+the first will work.  If in addition to registration the
+ at file{NAMESPACE} file contains
 
- at node Speed considerations, Linking to native routines in other packages, Registering native routines, Registering native routines
+ at example
+useDynLib(mypkg, .registration = TRUE, .fixes = "C_")
+ at end example
+
+ at noindent
+then we can call @code{.Call(C_reg)}.  Finally, if @code{R_init_mypkg}
+also calls @code{R_forceSymbols(dll, TRUE)}, only @code{.Call(C_reg)}
+will work (and not @code{.Call("reg")}).  This is usually what we want:
+it ensures that all of our own @code{.Call} calls go directly to the
+intended code in our package and that no one else accidentally finds our
+entry points.  (Should someone need to call our code from outside the
+package, for example for debugging, they can use
+ at code{.Call(mypkg:::C_reg)}.)
+
+
+ at node Speed considerations, Converting a package to use registration, Registering native routines, Registering native routines
 @subsection Speed considerations
 
 Sometimes registering native routines or using a @code{PACKAGE} argument
@@ -8567,12 +9501,17 @@ simple @code{.Call} function might be
 @example
 foo <- function(x) .Call("foo", x)
 @end example
+ at noindent
 with C code
 @example
+ at group
+#include <Rinternals.h>
+
 SEXP foo(SEXP x)
 @{
     return x;
 @}
+ at end group
 @end example
 If we compile with by @command{R CMD SHLIB foo.c}, load the code by
 @code{dyn.load("foo.so")} and run @code{foo(pi)} it took around 22
@@ -8580,6 +9519,7 @@ microseconds (us). Specifying the DLL by
 @example
 foo2 <- function(x) .Call("foo", x, PACKAGE = "foo")
 @end example
+ at noindent
 reduced the time to 1.7 us.
 
 Now consider making these functions part of a package whose
@@ -8598,19 +9538,19 @@ now takes about 1 us.  If we register the symbols in the
 @example
 foo3 <- function(x) .Call(C_foo, x)
 @end example
+ at noindent
 then the address for the native routine is looked up just once when the
 package is loaded, and @code{foo3(pi)} takes about 0.8 us.
 
-Versions using @code{.C()} rather than @code{.Call()} take about 0.2 us
+Versions using @code{.C()} rather than @code{.Call()} took about 0.2 us
 longer.
 
 These are all quite small differences, but C routines are not uncommonly
-invoked millions of times for run times of a few microseconds, and those
-doing such things may wish to be aware of the differences.
+invoked millions of times for run times of a few microseconds each, and
+those doing such things may wish to be aware of the differences.
 
-On Linux and Solaris there is a much smaller overhead in looking up
-symbols so @code{foo(pi)} takes around 5 times as long as
- at code{foo3(pi)}.
+On Linux and Solaris there is a smaller overhead in looking up
+symbols.
 
 Symbol lookup on Windows used to be far slower, so @R{} maintains a
 small cache.  If the cache is currently empty enough that the symbol can
@@ -8619,9 +9559,288 @@ Solaris: if not it may be slower.  @R{}'s own code always uses
 registered symbols and so these never contribute to the cache: however
 many other packages do rely on symbol lookup.
 
+In more recent versions of @R{} all the standard packages register
+native symbols and do not allow symbol search, so in a new session
+ at code{foo()} can only look in @file{foo.so} and may be as fast as
+ at code{foo2()}.  This will no longer apply when many contributed packages
+are loaded, and generally those last loaded are searched first.  For
+example, consider @R{} 3.3.2 on x86_64 Linux.  In an empty @R{} session,
+both @code{foo()} and @code{foo2()} took about 0.75 us; however after
+packages @CRANpkg{igraph} and @CRANpkg{spatstat} had been loaded (which
+loaded another 12 DLLs), @code{foo()} took 3.6 us but @code{foo2()}
+still took about 0.80 us.  Using registration in a package reduced this
+to 0.55 us and @code{foo3()} took 0.40 us, times which were unchanged
+when further packages were loaded.
+
+ at node Converting a package to use registration, Linking to native routines in other packages, Speed considerations, Registering native routines
+ at subsection Example: converting a package to use registration
+
+The @pkg{splines} package was converted to use symbol registration in
+2001, but we can use it as an example at footnote{Because it is a standard
+package, one would need to rename it before attempting to reproduce the
+account here.} of what needs to be done for a small package.
+
+ at itemize
+
+ at item
+Find the relevant entry points.
+This is somewhat OS-specific, but something like the following should be
+possible at the OS command-line
+
+ at example
+ at group
+nm -g /path/to/splines.so | grep " T "
+0000000000002670 T _spline_basis
+0000000000001ec0 T _spline_value
+ at end group
+ at end example
+
+ at noindent
+This indicates that there are two relevant entry points. (They may or
+may not have a leading underscore, as here. Fortran entry points will
+have a trailing underscore.)  Check in the @R{} code that they are
+called by the package and how: in this case they are used by
+ at code{.Call}.
+
+Alternatively, examine the package's @R{} code for all @code{.C},
+ at code{.Fortran}, @code{.Call} and @code{.External} calls.
+
+ at item
+Construct the registration table.
+First write skeleton registration code, conventionally in file
+ at file{src/init.c} (or at the end of the only C source file in the
+package):
+
+ at example
+ at group
+#include <stdlib.h> // for NULL
+#include <R_ext/Rdynload.h>
+
+#define CALLDEF(name, n)  @{#name, (DL_FUNC) &name, n@}
+
+static const R_CallMethodDef R_CallDef[] = @{
+   CALLDEF(spline_basis, ?),
+   CALLDEF(spline_value, ?),
+   @{NULL, NULL, 0@}
+@};
+
+void R_init_splines(DllInfo *dll)
+@{
+    R_registerRoutines(dll, NULL, R_CallDef, NULL, NULL);
+@}
+ at end group
+ at end example
+
+ at noindent
+and then replace the @code{?} in the skeleton with the actual numbers of
+arguments.  You will need to add declarations (also known as
+`prototypes') of the functions unless appending to the only C source
+file.  Some packages will already have these in a header file, or you
+could create one and include it in @file{init.c}, for example
+ at file{splines.h} containing
+
+ at smallexample
+ at group
+#include <Rinternals.h> // for SEXP
+extern SEXP spline_basis(SEXP knots, SEXP order, SEXP xvals, SEXP derivs);
+extern SEXP spline_value(SEXP knots, SEXP coeff, SEXP order, SEXP x, SEXP deriv);
+ at end group
+ at end smallexample
+ at noindent
+Tools are available to extract declarations, at least for C and C++
+code: see the help file for
+ at code{package_native_routine_registration_skeleton} in package
+ at pkg{tools}. Here we could have used
+ at example
+cproto -I/path/to/R/include -e splines.c
+ at end example
+
+For examples of registering other types of calls, see packages
+ at pkg{graphics} and @pkg{stats}.  In particular, when registering entry
+points for @code{.Fortran} one needs declarations as if called from C,
+such as
+
+ at example
+ at group
+#include <R_ext/RS.h>
+void F77_NAME(supsmu)(int *n, double *x, double *y,
+                      double *w, int *iper, double *span, double *alpha,
+                      double *smo, double *sc, double *edf);
+ at end group
+ at end example
+
+One can get away with inaccurate argument lists in the declarations: it
+is easy to specify the arguments for @code{.Call} (all @code{SEXP}) and
+ at code{.External} (one @code{SEXP}) and as the arguments for @code{.C}
+and @code{.Fortran} are all pointers, specifying them as @code{void *}
+suffices. (For most platforms one can omit all the arguments.)
+
+ at item
+(Optional but highly recommended.)  Restrict @code{.Call} etc to using the
+symbols you chose to register by editing @file{src/init.c} to contain
+
+ at example
+ at group
+void R_init_splines(DllInfo *dll)
+@{
+    R_registerRoutines(dll, NULL, R_CallDef, NULL, NULL);
+    R_useDynamicSymbols(dll, FALSE);
+@}
+ at end group
+ at end example
+
+ at end itemize
+
+A skeleton for the steps so far can be made using
+ at code{package_native_routine_registration_skeleton} in package
+ at pkg{tools}.  This will optionally create declarations based on the
+usage in the @R{} code.
+
+The remaining steps are optional but recommended.
+
+ at itemize
+ at item
+Edit the @file{NAMESPACE} file to create @R{} objects for the registered
+symbols:
 
+ at example
+useDynLib(splines, .registration = TRUE, .fixes = "C_")
+ at end example
 
- at node Linking to native routines in other packages,  , Speed considerations, Registering native routines
+ at item
+Find all the relevant calls in the @R{} code and edit them to use the
+ at R{} objects.  This entailed changing the lines
+
+ at smallexample
+temp <- .Call("spline_basis", knots, ord, x, derivs, PACKAGE = "splines")
+y[accept] <- .Call("spline_value", knots, coeff, ord, x[accept], deriv, PACKAGE = "splines")
+y = .Call("spline_value", knots, coef(object), ord, x, deriv, PACKAGE = "splines")
+ at end smallexample
+ at noindent
+to
+
+ at smallexample
+temp <- .Call(C_spline_basis, knots, ord, x, derivs)
+y[accept] <- .Call(C_spline_value, knots, coeff, ord, x[accept], deriv)
+y = .Call(C_spline_value, knots, coef(object), ord, x, deriv)
+ at end smallexample
+
+Check that there is no @code{exportPattern} directive which
+unintentionally exports the newly created @R{} objects.
+
+ at item
+Restrict @code{.Call} to using the @R{} symbols by editing
+ at file{src/init.c} to contain
+
+ at example
+ at group
+void R_init_splines(DllInfo *dll)
+@{
+    R_registerRoutines(dll, NULL, R_CallDef, NULL, NULL);
+    R_useDynamicSymbols(dll, FALSE);
+    R_forceSymbols(dll, TRUE);
+@}
+ at end group
+ at end example
+
+ at item
+Consider visibility.  On some OSes we can hide entry points from the
+loader, which precludes any possible name clashes and calling them
+accidentally (usually with incorrect arguments and crashing the @R{}
+process). If we repeat the first step we now see
+
+ at example
+ at group
+nm -g /path/to/splines.so | grep " T "
+0000000000002e00 T _R_init_splines
+00000000000025e0 T _spline_basis
+0000000000001e20 T _spline_value
+ at end group
+ at end example
+
+ at 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
+ at code{static}.  Now the two relevant entry points are only accessed
+ at 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
+ at emph{via}
+
+ at example
+ at group
+#include <R_ext/Visibility.h>
+
+SEXP attribute_hidden
+spline_basis(SEXP knots, SEXP order, SEXP xvals, SEXP derivs)
+ at dots{}
+
+SEXP attribute_hidden
+spline_value(SEXP knots, SEXP coeff, SEXP order, SEXP x, SEXP deriv)
+ at dots{}
+ at end group
+ at end example
+
+ at noindent
+Alternatively, we can change the default visibility for all C symbols by
+including
+
+ at example
+PKG_CFLAGS = $(C_VISIBILITY)
+ at end example
+
+ at noindent
+in @file{src/Makevars}, and then we need to allow registration by
+declaring @code{R_init_splines} to be visible:
+
+ at example
+ at group
+#include <R_ext/Visibility.h>
+
+void attribute_visible
+R_init_splines(DllInfo *dll)
+ at dots{}
+ at end group
+ at end example
+
+ at noindent
+ at xref{Controlling visibility} for more details, including using Fortran
+code and ways to restrict visibility on Windows.
+
+ at item
+We end up with a file @file{src/init.c} containing
+
+ at quotation
+ at cartouche
+ at example
+#include <stdlib.h>
+#include <R_ext/Rdynload.h>
+#include <R_ext/Visibility.h>  // optional
+
+#include "splines.h"
+
+#define CALLDEF(name, n)  @{#name, (DL_FUNC) &name, n@}
+
+static const R_CallMethodDef R_CallDef[] = @{
+    CALLDEF(spline_basis, 4),
+    CALLDEF(spline_value, 5),
+    @{NULL, NULL, 0@}
+@};
+
+void
+attribute_visible  // optional
+R_init_splines(DllInfo *dll)
+@{
+    R_registerRoutines(dll, NULL, R_CallDef, NULL, NULL);
+    R_useDynamicSymbols(dll, FALSE);
+    R_forceSymbols(dll, TRUE);
+@}
+ at end example
+ at end cartouche
+ at end quotation
+
+ at end itemize
+
+ at node Linking to native routines in other packages,  , Converting a package to use registration, Registering native routines
 @subsection Linking to native routines in other packages
 
 In addition to registering C routines to be called by @R{}, it can at
@@ -8633,7 +9852,7 @@ two routines declared in header @file{R_ext/Rdynload.h} as
 @findex R_GetCCallable
 @example
 void R_RegisterCCallable(const char *package, const char *name,
-			 DL_FUNC fptr);
+                         DL_FUNC fptr);
 DL_FUNC R_GetCCallable(const char *package, const char *name);
 @end example
 
@@ -8643,7 +9862,7 @@ available to C code in other packages would include the call
 @example
 R_RegisterCCallable("packA", "myCfun", myCfun);
 @end example
-
+ at noindent
 in its initialization function @code{R_init_packA}.  A package
 @pkg{packB} that wants to use this routine would retrieve the function
 pointer with a call of the form
@@ -8670,8 +9889,9 @@ loaded at footnote{so there needs to be a corresponding @code{import} or
 (so the path to their compiled code has been registered).
 
 
-A @acronym{CRAN} example of the use of this mechanism is package
- at CRANpkg{lme4}, which links to @CRANpkg{Matrix}.
+ at acronym{CRAN} examples of the use of this mechanism include @CRANpkg{coxme}
+linking to @CRANpkg{bdsmatrix} and @CRANpkg{xts} linking to
+ at CRANpkg{zoo}
 
 @node Creating shared objects, Interfacing C++ code, Registering native routines, System and foreign language interfaces
 @section Creating shared objects
@@ -8902,7 +10122,7 @@ destructor Y
 The @R{} for Windows @acronym{FAQ} (@file{rw-FAQ}) contains details of how
 to compile this example under Windows.
 
-Earlier version of this example used C++ iostreams: this is best
+Earlier versions of this example used C++ iostreams: this is best
 avoided.  There is no guarantee that the output will appear in the @R{}
 console, and indeed it will not on the @R{} for Windows console.  Use
 @R{} code or the C entry points (@pxref{Printing}) for all I/O if at all
@@ -8910,13 +10130,50 @@ possible.  Examples have been seen where merely loading a DLL that
 contained calls to C++ I/O upset @R{}'s own C I/O (for example by
 resetting buffers on open files).
 
-Most @R{} header files can be included within C++ programs, and they
+Most @R{} header files can be included within C++ programs but they
 should @strong{not} be included within an @code{extern "C"} block (as
-they include C++ system headers).  It may not be possible to include
-some @R{} headers as they in turn include C header files that may cause
-conflicts---if this happens, define @samp{NO_C_HEADERS} before including
-the @R{} headers, and include C++ versions (such as @samp{cmath}) of the
-appropriate headers yourself before the @R{} headers.
+they include system headers at footnote{Even including C system headers in
+such a block has caused compilation errors.}).  The inclusion of system
+headers in C++ changed in @R{} 3.3.0 at footnote{with an exception for the
+Solaris C++ compiler, removed in @R{} 3.4.0.}, so if you care about
+earlier versions of @R{} please check your package there.
+
+Legacy header @file{S.h} cannot be used with C++.
+
+ at subsection External C++ code
+
+Quite a lot of external C++ software is header-only (e.g.@: most of the
+Boost `libraries' including all those supplied by package @CRANpkg{BH},
+and most of Armadillo as supplied by package @CRANpkg{RcppArmadillo})
+and so is compiled when an @R{} package which uses it is installed.
+This causes few problems.
+
+A small number of external libraries used in @R{} packages have a C++
+interface to a library of compiled code, e.g.@: packages @CRANpkg{rgdal}
+and @CRANpkg{rjags}.  This raises many more problems!  The C++ interface
+uses name-mangling and the
+ABI at footnote{@uref{https://en.wikipedia.org/@/wiki/@/Application_binary_interface}.}
+may depend on the compiler, version and even C++ defines at footnote{For
+example, @samp{_GLIBCXX_USE_CXX11_ABI} in @command{g++} 5.1 and later:
+ at uref{https://gcc.gnu.org/onlinedocs/libstdc++/manual/using_dual_abi.html}.},
+so requires the package C++ code to be compiled in exactly the same way
+as the library (and what that was is often undocumented).  Examples
+include use of @command{g++} @emph{vs} @command{clang++} or Solaris'
+ at command{CC}, and the two ABIs available for C++11 in @command{g++} with
+different defaults for GCC 4.9 and 5.x in some Linux distributions.
+
+Even fewer external libraries use C++ internally but present a C
+interface, such as @CRANpkg{rgeos}.  These require the C++ runtime
+library to be linked into the package's shared object/DLL, and this is
+best done by including a dummy C++ file in the package sources.
+
+There is a recent trend to link to the C++ interfaces offered by C
+software such as @pkg{hdf5}, @pkg{pcre} and @pkg{ImageMagick}.  Their C
+interfaces are much preferred for portability (and can be used from C++
+code).  Also, the C++ interfaces are often optional in the software
+build or packaged separately and so users installing from package
+sources are far less likely to already have them installed.
+
 
 @node Fortran I/O, Linking to other packages, Interfacing C++ code, System and foreign language interfaces
 @section Fortran I/O
@@ -8929,12 +10186,12 @@ and @code{6}. @xref{Printing from FORTRAN}, which describes workarounds.
 In the past most Fortran compilers implemented I/O on top of the C I/O
 system and so the two interworked successfully.  This was true of
 @command{g77}, but it is less true of @command{gfortran} as used in
- at code{gcc 4.y.z}.  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
+ at 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.)
+(Function @code{init} in file @file{src/modules/lapack/init_win.c} shows
+how to mitigate this.)
 
 @node Linking to other packages, Handling R objects in C, Fortran I/O, System and foreign language interfaces
 @section Linking to other packages
@@ -8986,7 +10243,7 @@ PKG_LIBS="$(PKGB_PATH)$(R_ARCH)/libpackB.a"
 @end example
 
 For a dynamic library @file{packB/lib/libpackB.so}
-(@file{packB/lib/libpackB.dylib} on OS X: note that you cannot link to
+(@file{packB/lib/libpackB.dylib} on macOS: note that you cannot link to
 a shared object, @file{.so}, on that platform) we could use
 
 @example
@@ -8999,7 +10256,7 @@ PKG_LIBS=-L"$(PKGB_PATH)$(R_ARCH)" -lpackB
 @noindent
 This will work for installation, but very likely not when package
 @code{packB} is loaded, as the path to package @pkg{packB}'s @file{lib}
-directory is not in the @command{ld.so}@footnote{@command{dyld} on OS X,
+directory is not in the @command{ld.so}@footnote{@command{dyld} on macOS,
 and @env{DYLD_LIBRARY_PATHS} below.}  search path.  You can arrange to
 put it there @strong{before} @R{} is launched by setting (on some
 platforms) @env{LD_RUN_PATH} or @env{LD_LIBRARY_PATH} or adding to the
@@ -9008,8 +10265,8 @@ support it, the path to the directory containing the dynamic library can
 be hardcoded at install time (which assumes that the location of package
 @pkg{packB} will not be changed nor the package updated to a changed
 API).  On systems with the @command{gcc} or @command{clang} and the
- at acronym{GNU} linker (e.g.@: Linux) and some others (e.g.@: OS X) this
-can be done by e.g.@:
+ at acronym{GNU} linker (e.g.@: Linux) and some others this can be done by
+e.g.@:
 
 @example
 PKGB_PATH=`echo 'library(packB);
@@ -9025,9 +10282,7 @@ the compiler as well as the linker).
 
 It may be possible to figure out what is required semi-automatically
 from the result of @command{R CMD libtool --config} (look for
- at samp{hardcode}), although that does not currently know the spell for OS
-X (as given in the example above, as @option{-rpath} is only supported for
-shared objects and not for executables).
+ at samp{hardcode}).
 
 Making headers provided by package @pkg{packB} available to the code to
 be compiled in package @pkg{packA} can be done by the @code{LinkingTo}
@@ -9059,7 +10314,7 @@ This needs an entry in @file{Makevars.win} of the form
 @example
 PKG_LIBS= -L<something> -lexB
 @end example
-
+ at noindent
 and one possibility is that @code{<something>} is the path to the
 installed @file{pkgB/libs} directory.  To find that we need to ask @R{}
 where it is by something like
@@ -9083,7 +10338,7 @@ all: $(SHLIB) before
 before: libexB.dll.a
 libexB.dll.a: exB.def
 @end example
-
+ at noindent
 and then installing package @pkg{packA} will make and use the import
 library for @file{exB.dll}.  (One way to prepare the exports file is to
 use @file{pexports.exe}.)
@@ -9102,7 +10357,7 @@ by setting
 
 @example
 library.dynam("packA", pkg, lib,
-	      DLLpath = system.file("libs", package="packB"))
+              DLLpath = system.file("libs", package="packB"))
 @end example
 
 Note that @code{DLLpath} can only set one path, and so for linking to
@@ -9175,7 +10430,8 @@ In each case the @R{} objects are available for manipulation @emph{via}
 a set of functions and macros defined in the header file
 @file{Rinternals.h} or some @Sl{}-compatibility macros at footnote{That is,
 similar to those defined in @Sl{} version 4 from the 1990s: these are
-not kept up to date and are not recommended for new projects.} defined
+not kept up to date and are not recommended for new projects.  Prior to
+ at R{} 3.3.0 it was not compatible with defining @code{R_NO_REMAP}.} defined
 in @file{Rdefines.h}.  See @ref{Interface functions .Call and .External}
 for details on @code{.Call} and @code{.External}.
 
@@ -9491,9 +10747,9 @@ SEXP out(SEXP x, SEXP y)
     SEXP ans = PROTECT(allocMatrix(REALSXP, nx, ny));
     double *rx = REAL(x), *ry = REAL(y), *rans = REAL(ans);
     for(int i = 0; i < nx; i++) @{
-	double tmp = rx[i];
-	for(int j = 0; j < ny; j++)
-	    rans[i + nx*j] = tmp * ry[j];
+        double tmp = rx[i];
+        for(int j = 0; j < ny; j++)
+            rans[i + nx*j] = tmp * ry[j];
     @}
     UNPROTECT(1);
     return ans;
@@ -9521,7 +10777,7 @@ SEXP out(SEXP x, SEXP y)
     for(int i = 0; i < nx; i++) @{
       double tmp = rx[i];
       for(int j = 0; j < ny; j++)
-	rans[i + nx*j] = tmp * ry[j];
+        rans[i + nx*j] = tmp * ry[j];
     @}
 
     SEXP dimnames = PROTECT(allocVector(VECSXP, 2));
@@ -9665,10 +10921,10 @@ SEXP getListElement(SEXP list, const char *str)
 
 @group
     for (int i = 0; i < length(list); i++)
-	if(strcmp(CHAR(STRING_ELT(names, i)), str) == 0) @{
-	   elmt = VECTOR_ELT(list, i);
-	   break;
-	@}
+        if(strcmp(CHAR(STRING_ELT(names, i)), str) == 0) @{
+           elmt = VECTOR_ELT(list, i);
+           break;
+        @}
     return elmt;
 @}
 @end group
@@ -9734,10 +10990,10 @@ SEXP getvar(SEXP name, SEXP rho)
     SEXP ans;
 
     if(!isString(name) || length(name) != 1)
-	error("name is not a single string");
+        error("name is not a single string");
     if(!isEnvironment(rho))
-	error("rho should be an environment");
-    ans = findVar(install(CHAR(STRING_ELT(name, 0))), rho);
+        error("rho should be an environment");
+    ans = findVar(installChar(STRING_ELT(name, 0)), rho);
     Rprintf("first value is %f\n", REAL(ans)[0]);
     return R_NilValue;
 @}
@@ -9825,7 +11081,7 @@ and language objects (whose internal structures just differ by
 block: it constructs a pairlist from @code{u} followed by @code{v}
 (which is a pairlist or @code{R_NilValue}).  @code{LCONS} is a variant
 that constructs a language object.  Functions @code{list1} to
- at code{list5} construct a pairlist from one to five items, and
+ at code{list6} construct a pairlist from one to six items, and
 @code{lang1} to @code{lang6} do the same for a language object (a
 function to call plus zero to five arguments).  Functions @code{elt} and
 @code{lastElt} find the @var{i}th element and the last element of a
@@ -9992,7 +11248,7 @@ SEXP convolve2(SEXP a, SEXP b)
     xa = REAL(a); xb = REAL(b); xab = REAL(ab);
     for(int i = 0; i < nab; i++) xab[i] = 0.0;
     for(int i = 0; i < na; i++)
-	for(int j = 0; j < nb; j++) xab[i + j] += xa[i] * xb[j];
+        for(int j = 0; j < nb; j++) xab[i + j] += xa[i] * xb[j];
     UNPROTECT(3);
     return ab;
 @}
@@ -10079,43 +11335,43 @@ SEXP showArgs(SEXP args)
 @{
     args = CDR(args); /* skip 'name' */
     for(int i = 0; args != R_NilValue; i++, args = CDR(args)) @{
-	const char *name =
-	    isNull(TAG(args)) ? "" : CHAR(PRINTNAME(TAG(args)));
-	SEXP el = CAR(args);
-	if (length(el) == 0) @{
-	    Rprintf("[%d] '%s' R type, length 0\n", i+1, name);
-	   continue;
-	@}
+        const char *name =
+            isNull(TAG(args)) ? "" : CHAR(PRINTNAME(TAG(args)));
+        SEXP el = CAR(args);
+        if (length(el) == 0) @{
+            Rprintf("[%d] '%s' R type, length 0\n", i+1, name);
+           continue;
+        @}
 @end group
 @group
-	switch(TYPEOF(el)) @{
-	case REALSXP:
-	    Rprintf("[%d] '%s' %f\n", i+1, name, REAL(el)[0]);
-	    break;
+        switch(TYPEOF(el)) @{
+        case REALSXP:
+            Rprintf("[%d] '%s' %f\n", i+1, name, REAL(el)[0]);
+            break;
 @end group
 @group
-	case LGLSXP:
-	case INTSXP:
-	    Rprintf("[%d] '%s' %d\n", i+1, name, INTEGER(el)[0]);
-	    break;
+        case LGLSXP:
+        case INTSXP:
+            Rprintf("[%d] '%s' %d\n", i+1, name, INTEGER(el)[0]);
+            break;
 @end group
 @group
-	case CPLXSXP:
-	@{
-	    Rcomplex cpl = COMPLEX(el)[0];
-	    Rprintf("[%d] '%s' %f + %fi\n", i+1, name, cpl.r, cpl.i);
-	@}
-	    break;
+        case CPLXSXP:
+        @{
+            Rcomplex cpl = COMPLEX(el)[0];
+            Rprintf("[%d] '%s' %f + %fi\n", i+1, name, cpl.r, cpl.i);
+        @}
+            break;
 @end group
 @group
-	case STRSXP:
-	    Rprintf("[%d] '%s' %s\n", i+1, name,
-		   CHAR(STRING_ELT(el, 0)));
-	   break;
+        case STRSXP:
+            Rprintf("[%d] '%s' %s\n", i+1, name,
+                   CHAR(STRING_ELT(el, 0)));
+           break;
 @end group
 @group
-	default:
-	    Rprintf("[%d] '%s' R type\n", i+1, name);
+        default:
+            Rprintf("[%d] '%s' R type\n", i+1, name);
        @}
     @}
     return R_NilValue;
@@ -10154,7 +11410,7 @@ code.  In this example the special values are no problem, as
 implementation this is also true of @code{NA} as it is a type of
 @code{NaN}, but it is unwise to rely on such details.  Thus we will
 re-write the code to handle @code{NA}s using macros defined in
- at file{R_exts/Arith.h} included by @file{R.h}.
+ at file{R_ext/Arith.h} included by @file{R.h}.
 
 The code changes are the same in any of the versions of @code{convolve2}
 or @code{convolveE}:
@@ -10164,10 +11420,10 @@ or @code{convolveE}:
     ...
   for(int i = 0; i < na; i++)
     for(int j = 0; j < nb; j++)
-	if(ISNA(xa[i]) || ISNA(xb[j]) || ISNA(xab[i + j]))
-	    xab[i + j] = NA_REAL;
-	else
-	    xab[i + j] += xa[i] * xb[j];
+        if(ISNA(xa[i]) || ISNA(xb[j]) || ISNA(xab[i + j]))
+            xab[i + j] = NA_REAL;
+        else
+            xab[i + j] += xa[i] * xb[j];
     ...
 @end group
 @end example
@@ -10226,8 +11482,8 @@ SEXP lapply(SEXP list, SEXP expr, SEXP rho)
     if(!isEnvironment(rho)) error("'rho' should be an environment");
     ans = PROTECT(allocVector(VECSXP, n));
     for(int i = 0; i < n; i++) @{
-	defineVar(install("x"), VECTOR_ELT(list, i), rho);
-	SET_VECTOR_ELT(ans, i, eval(expr, rho));
+        defineVar(install("x"), VECTOR_ELT(list, i), rho);
+        SET_VECTOR_ELT(ans, i, eval(expr, rho));
     @}
     setAttrib(ans, R_NamesSymbol, getAttrib(list, R_NamesSymbol));
     UNPROTECT(1);
@@ -10255,8 +11511,8 @@ SEXP lapply2(SEXP list, SEXP fn, SEXP rho)
     R_fcall = PROTECT(lang2(fn, R_NilValue));
     ans = PROTECT(allocVector(VECSXP, n));
     for(int i = 0; i < n; i++) @{
-	SETCADR(R_fcall, VECTOR_ELT(list, i));
-	SET_VECTOR_ELT(ans, i, eval(R_fcall, rho));
+        SETCADR(R_fcall, VECTOR_ELT(list, i));
+        SET_VECTOR_ELT(ans, i, eval(R_fcall, rho));
     @}
     setAttrib(ans, R_NamesSymbol, getAttrib(list, R_NamesSymbol));
     UNPROTECT(2);
@@ -10328,12 +11584,12 @@ and an example are
 @example
 zero <- function(f, guesses, tol = 1e-7) @{
     f.check <- function(x) @{
-	x <- f(x)
-	if(!is.numeric(x)) stop("Need a numeric result")
-	as.double(x)
+        x <- f(x)
+        if(!is.numeric(x)) stop("Need a numeric result")
+        as.double(x)
     @}
     .Call("zero", body(f.check), as.double(guesses), as.double(tol),
-	  new.env())
+          new.env())
 @}
 
 cube1 <- function(x) (x^2 + 1) * (x - 1.5)
@@ -10349,7 +11605,7 @@ The C code is
 SEXP mkans(double x)
 @{
     // no need for PROTECT() here, as REAL(.) does not allocate:
-    SEXP ans = allocVector(REALSXP, 1); 
+    SEXP ans = allocVector(REALSXP, 1);
     REAL(ans)[0] = x;
     return ans;
 @}
@@ -10372,7 +11628,7 @@ double feval(double x, SEXP f, SEXP rho)
 SEXP zero(SEXP f, SEXP guesses, SEXP stol, SEXP rho)
 @{
     double x0 = REAL(guesses)[0], x1 = REAL(guesses)[1],
-	   tol = REAL(stol)[0];
+           tol = REAL(stol)[0];
     double f0, f1, fc, xc;
 @end group
 
@@ -10386,15 +11642,15 @@ SEXP zero(SEXP f, SEXP guesses, SEXP stol, SEXP rho)
 
 @group
     for(;;) @{
-	xc = 0.5*(x0+x1);
-	if(fabs(x0-x1) < tol) return  mkans(xc);
-	fc = feval(xc, f, rho);
-	if(fc == 0) return  mkans(xc);
-	if(f0*fc > 0.0) @{
-	    x0 = xc; f0 = fc;
-	@} else @{
-	    x1 = xc; f1 = fc;
-	@}
+        xc = 0.5*(x0+x1);
+        if(fabs(x0-x1) < tol) return  mkans(xc);
+        fc = feval(xc, f, rho);
+        if(fc == 0) return  mkans(xc);
+        if(f0*fc > 0.0) @{
+            x0 = xc; f0 = fc;
+        @} else @{
+            x1 = xc; f1 = fc;
+        @}
     @}
 @}
 @end group
@@ -10418,14 +11674,14 @@ numeric.deriv <- function(expr, theta, rho=sys.frame(sys.parent()))
     eps <- sqrt(.Machine$double.eps)
     ans <- eval(substitute(expr), rho)
     grad <- matrix(, length(ans), length(theta),
-		   dimnames=list(NULL, theta))
+                   dimnames=list(NULL, theta))
     for (i in seq_along(theta)) @{
-	old <- get(theta[i], envir=rho)
-	delta <- eps * max(1, abs(old))
-	assign(theta[i], old+delta, envir=rho)
-	ans1 <- eval(substitute(expr), rho)
-	assign(theta[i], old, envir=rho)
-	grad[, i] <- (ans1 - ans)/delta
+        old <- get(theta[i], envir=rho)
+        delta <- eps * max(1, abs(old))
+        assign(theta[i], old+delta, envir=rho)
+        ans1 <- eval(substitute(expr), rho)
+        assign(theta[i], old, envir=rho)
+        grad[, i] <- (ans1 - ans)/delta
     @}
     attr(ans, "gradient") <- grad
     ans
@@ -10450,7 +11706,7 @@ with example usage
 
 @example
 .External("numeric_deriv", quote(sin(omega*x*y)),
-	  c("x", "y"), .GlobalEnv)
+          c("x", "y"), .GlobalEnv)
 @end example
 
 @noindent
@@ -10474,9 +11730,9 @@ SEXP numeric_deriv(SEXP args)
 @group
     expr = CADR(args);
     if(!isString(theta = CADDR(args)))
-	error("theta should be of type character");
+        error("theta should be of type character");
     if(!isEnvironment(rho = CADDDR(args)))
-	error("rho should be an environment");
+        error("rho should be an environment");
 @end group
 
 @group
@@ -10487,16 +11743,16 @@ SEXP numeric_deriv(SEXP args)
 
 @group
     for(i = 0, start = 0; i < LENGTH(theta); i++, start += LENGTH(ans)) @{
-	par = PROTECT(findVar(install(CHAR(STRING_ELT(theta, i))), rho));
-	tt = REAL(par)[0];
-	xx = fabs(tt);
-	delta = (xx < 1) ? eps : xx*eps;
-	REAL(par)[0] += delta;
-	ans1 = PROTECT(coerceVector(eval(expr, rho), REALSXP));
-	for(int j = 0; j < LENGTH(ans); j++)
-	    rgr[j + start] = (REAL(ans1)[j] - rans[j])/delta;
-	REAL(par)[0] = tt;
-	UNPROTECT(2); /* par, ans1 */
+        par = PROTECT(findVar(installChar(STRING_ELT(theta, i)), rho));
+        tt = REAL(par)[0];
+        xx = fabs(tt);
+        delta = (xx < 1) ? eps : xx*eps;
+        REAL(par)[0] += delta;
+        ans1 = PROTECT(coerceVector(eval(expr, rho), REALSXP));
+        for(int j = 0; j < LENGTH(ans); j++)
+            rgr[j + start] = (REAL(ans1)[j] - rans[j])/delta;
+        REAL(par)[0] = tt;
+        UNPROTECT(2); /* par, ans1 */
     @}
 @end group
 
@@ -10517,9 +11773,9 @@ The code to handle the arguments is
 @group
     expr = CADR(args);
     if(!isString(theta = CADDR(args)))
-	error("theta should be of type character");
+        error("theta should be of type character");
     if(!isEnvironment(rho = CADDDR(args)))
-	error("rho should be an environment");
+        error("rho should be an environment");
 @end group
 @end example
 
@@ -10554,7 +11810,7 @@ applicable.)
 @example
 @group
     for(i = 0, start = 0; i < LENGTH(theta); i++, start += LENGTH(ans)) @{
-	par = PROTECT(findVar(install(CHAR(STRING_ELT(theta, i))), rho));
+        par = PROTECT(findVar(installChar(STRING_ELT(theta, i)), rho));
 @end group
 @end example
 
@@ -10571,11 +11827,11 @@ install the name and use @code{findVar} to find its value.
 
 @example
 @group
-	tt = REAL(par)[0];
-	xx = fabs(tt);
-	delta = (xx < 1) ? eps : xx*eps;
-	REAL(par)[0] += delta;
-	ans1 = PROTECT(coerceVector(eval(expr, rho), REALSXP));
+        tt = REAL(par)[0];
+        xx = fabs(tt);
+        delta = (xx < 1) ? eps : xx*eps;
+        REAL(par)[0] += delta;
+        ans1 = PROTECT(coerceVector(eval(expr, rho), REALSXP));
 @end group
 @end example
 
@@ -10590,10 +11846,10 @@ changed parameter value.
 
 @example
 @group
-	for(int j = 0; j < LENGTH(ans); j++)
-	    rgr[j + start] = (REAL(ans1)[j] - rans[j])/delta;
-	REAL(par)[0] = tt;
-	UNPROTECT(2);
+        for(int j = 0; j < LENGTH(ans); j++)
+            rgr[j + start] = (REAL(ans1)[j] - rans[j])/delta;
+        REAL(par)[0] = tt;
+        UNPROTECT(2);
     @}
 @end group
 @end example
@@ -10650,17 +11906,17 @@ SEXP menu_ttest3()
     ParseStatus status;
    ...
     if(done == 1) @{
-	cmdSexp = PROTECT(allocVector(STRSXP, 1));
-	SET_STRING_ELT(cmdSexp, 0, mkChar(cmd));
-	cmdexpr = PROTECT(R_ParseVector(cmdSexp, -1, &status, R_NilValue));
-	if (status != PARSE_OK) @{
-	    UNPROTECT(2);
-	    error("invalid call %s", cmd);
-	@}
-	/* Loop is needed here as EXPSEXP will be of length > 1 */
-	for(int i = 0; i < length(cmdexpr); i++)
-	    ans = eval(VECTOR_ELT(cmdexpr, i), R_GlobalEnv);
-	UNPROTECT(2);
+        cmdSexp = PROTECT(allocVector(STRSXP, 1));
+        SET_STRING_ELT(cmdSexp, 0, mkChar(cmd));
+        cmdexpr = PROTECT(R_ParseVector(cmdSexp, -1, &status, R_NilValue));
+        if (status != PARSE_OK) @{
+            UNPROTECT(2);
+            error("invalid call %s", cmd);
+        @}
+        /* Loop is needed here as EXPSEXP will be of length > 1 */
+        for(int i = 0; i < length(cmdexpr); i++)
+            ans = eval(VECTOR_ELT(cmdexpr, i), R_GlobalEnv);
+        UNPROTECT(2);
     @}
     return ans;
 @}
@@ -10754,10 +12010,20 @@ the external pointer represents, if that memory is allocated from the
 @R{} heap.  Both @code{tag} and @code{prot} can be @code{R_NilValue},
 and often are.
 
+An alternative way as from @R{} 3.4.0 to create an external pointer from
+a function pointer is
+
+ at example
+typedef void * (*R_DL_FUNC)();
+SEXP R_MakeExternalPtrFn(R_DL_FUNC p, SEXP tag, SEXP prot);
+ at end example
+
+
 The elements of an external pointer can be accessed and set @emph{via}
 
 @example
 void *R_ExternalPtrAddr(SEXP s);
+DL_FUNC R_ExternalPtrAddrFn(SEXP s);
 SEXP R_ExternalPtrTag(SEXP s);
 SEXP R_ExternalPtrProtected(SEXP s);
 void R_ClearExternalPtr(SEXP s);
@@ -10798,9 +12064,9 @@ set to the C @code{NULL} pointer.
 
 Finalizers can be run at many places in the code base and much of it,
 including the @R{} interpreter, is not re-entrant.  So great care is
-needed in choosing the code to be run in a finalizer. As from @R{} 3.0.3
-finalizers are marked to be run at garbage collection but only run at a
-somewhat safe point thereafter. 
+needed in choosing the code to be run in a finalizer.  Finalizers are
+marked to be run at garbage collection but only run at a somewhat safe
+point thereafter.
 
 @cindex weak reference
 Weak references are used to allow the programmer to maintain information
@@ -10818,7 +12084,7 @@ Weak reference objects are created by one of
 @example
 SEXP R_MakeWeakRef(SEXP key, SEXP val, SEXP fin, Rboolean onexit);
 SEXP R_MakeWeakRefC(SEXP key, SEXP val, R_CFinalizer_t fin,
-		    Rboolean onexit);
+                    Rboolean onexit);
 @end example
 
 @noindent
@@ -10835,8 +12101,8 @@ void R_RunWeakRefFinalizer(SEXP w);
 @end example
 
 A toy example of the use of weak references can be found at
- at uref{http://www.stat.uiowa.edu/~luke/R/references/weakfinex.html,
- at code{www.@/stat.@/uiowa.@/edu/@/~luke/@/R/references/@/weakfinex.html}},
+ at uref{http://homepage.stat.uiowa.edu/~luke/R/references/weakfinex.html,
+ at code{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.
@@ -10852,7 +12118,7 @@ Bioconductor package uses weak references.
 Package @CRANpkg{RODBC} uses external pointers to maintain its
 @emph{channels}, connections to databases.  There can be several
 connections open at once, and the status information for each is stored
-in a C structure (pointed to by @code{this_handle}) in the code extract
+in a C structure (pointed to by @code{thisHandle} in the code extract
 below) that is returned @emph{via} an external pointer as part of the RODBC
 `channel' (as the @code{"handle_ptr"} attribute).  The external pointer
 is created by
@@ -10863,7 +12129,7 @@ is created by
     ptr = R_MakeExternalPtr(thisHandle, install("RODBC_channel"), R_NilValue);
     PROTECT(ptr);
     R_RegisterCFinalizerEx(ptr, chanFinalizer, TRUE);
-	    ...
+            ...
     /* return the channel no */
     INTEGER(ans)[0] = nChannels;
     /* and the connection string as an attribute */
@@ -10876,7 +12142,7 @@ is created by
 @noindent
 Note the symbol given to identify the usage of the external pointer, and
 the use of the finalizer.  Since the final argument when registering the
-finalizer is @code{TRUE}, the finalizer will be run at the the of the
+finalizer is @code{TRUE}, the finalizer will be run at the of the
 @R{} session (unless it crashes).  This is used to close and clean up
 the connection to the database.  The finalizer code is simply
 
@@ -10915,8 +12181,9 @@ obtained by defining @samp{USE_RINTERNALS} before including
 that your code compiles without @samp{USE_RINTERNALS} defined, as this
 provides a stricter test that the accessors have been used correctly.
 Note too that the use of @samp{USE_RINTERNALS} when the header is
-included in C++ code is not supported: doing so uses C99 features which
-are not necessarily in C++.
+included in C++ code is not supported: doing so may use C99 features
+which are not necessarily supported by the C++ compiler.  Nor is use
+with @file{Rdefines.h} supported.
 
 @node Character encoding issues,  , Vector accessor functions, System and foreign language interfaces
 @section Character encoding issues
@@ -10967,7 +12234,7 @@ Function
 @findex reEnc
 @example
 const char *reEnc(const char *x, cetype_t ce_in, cetype_t ce_out,
-		  int subst);
+                  int subst);
 @end example
 
 @noindent
@@ -11031,19 +12298,8 @@ This will include several other header files from the directory
 there that can be included too, but many of the features they contain
 should be regarded as undocumented and unstable.
 
-An alternative is to include the header file @file{S.h}, which may be
-useful when porting code from @Sl{}.  This includes rather less than
- at file{R.h}, and has some extra compatibility definitions (for example
-the @code{S_complex} type from @Sl{}).
-
-The defines used for compatibility with @Sl{} sometimes causes
-conflicts (notably with Windows headers), and the known
-problematic defines can be removed by defining @code{STRICT_R_HEADERS}.
-
 Most of these header files, including all those included by @file{R.h},
-can be used from C++ code.  Some others need to be included within an
- at code{extern "C"} declaration, and for clarity this is advisable for all
- at R{} header files.
+can be used from C++ code.
 
 @quotation Note
 Because @R{} re-maps many of its external names to avoid clashes with
@@ -11098,6 +12354,7 @@ has full control (and responsibility).
 @node Transient storage allocation, User-controlled memory, Memory allocation, Memory allocation
 @subsection Transient storage allocation
 @findex R_alloc
+ at findex R_allocLD
 @findex S_alloc
 @findex S_realloc
 @findex vmaxget
@@ -11166,14 +12423,18 @@ This is only recommended for experts.
 Note that this memory will be freed on error or user interrupt
 (if allowed: @pxref{Allowing interrupts}).
 
-Note that although @var{n} is @code{size_t}, there may be limits imposed
-by @R{}'s internal allocation mechanism.  These will only come into play
-on 64-bit systems, where the limit for @var{n} prior to @R{} 3.0.0 was
-just under 16Gb.
-
 The memory returned is only guaranteed to be aligned as required for
 @code{double} pointers: take precautions if casting to a pointer which
-needs more (e.g.@: @code{(long double *)} on some platforms).
+needs more.  There is also
+
+ at example
+long double *R_allocLD(size_t @var{n})
+ at end example
+
+ at noindent
+which is guaranteed to have the 16-byte alignment needed for @code{long
+double} pointers on some platforms.
+
 
 These functions should only be used in code called by @code{.C} etc,
 never from front-ends.  They are not thread-safe.
@@ -11404,9 +12665,10 @@ The function @code{REprintf} is similar but writes on the error stream
 output stream.
 
 Functions @code{Rvprintf} and @code{REvprintf} are analogues using the
- at code{vprintf} interface.  Because that is a C99 interface, they are
-only defined by @file{R_ext/Print.h} in C++ code if the macro
- at code{R_USE_C99_IN_CXX} is defined when it is included.
+ at code{vprintf} interface.  Because that is a C99 at footnote{also part of
+C++11.} interface, they are only defined by @file{R_ext/Print.h} in C++
+code if the macro @code{R_USE_C99_IN_CXX} is defined when it is
+included.
 
 Another circumstance when it may be important to use these functions is
 when using parallel computation on a cluster of computational nodes, as
@@ -11561,9 +12823,9 @@ normal distribution:
 @group
 double dnorm(double @var{x}, double @var{mu}, double @var{sigma}, int @var{give_log});
 double pnorm(double @var{x}, double @var{mu}, double @var{sigma}, int @var{lower_tail},
-	     int @var{give_log});
+             int @var{give_log});
 double qnorm(double @var{p}, double @var{mu}, double @var{sigma}, int @var{lower_tail},
-	     int @var{log_p});
+             int @var{log_p});
 double rnorm(double @var{mu}, double @var{sigma});
 @end group
 @end example
@@ -11651,6 +12913,25 @@ similarly for the signed rank functions.
 (If remapping is suppressed, the Normal distribution names are
 @code{Rf_dnorm4}, @code{Rf_pnorm5} and @code{Rf_qnorm5}.)
 
+For the negative binomial distribution (@samp{nbinom}), in addition to the
+ at code{(size, prob)} parametrization, the alternative @code{(size, mu)}
+parametrization is provided as well by functions @samp{[dpqr]nbinom_mu()},
+see @kbd{?NegBinomial} in @R{}.
+
+Functions @code{dpois_raw(x, *)} and @code{dbinom_raw(x, *)} are versions of the
+Poisson and binomial probability mass functions which work continuously in
+ at code{x}, whereas @code{dbinom(x,*)} and @code{dpois(x,*)} only return non
+zero values for integer @code{x}.
+ at example
+ at group
+double dbinom_raw(double x, double n, double p, double q, int give_log)
+double dpois_raw (double x, double lambda, int give_log)
+ at end group
+ at end example
+Note that @code{dbinom_raw()} gets both @eqn{p, p} and @eqn{q = 1-p, q = 1-p} which
+may be advantageous when one of them is close to @eqn{1, 1}.
+
+
 @node Mathematical functions, Numerical Utilities, Distribution functions, Numerical analysis subroutines
 @subsection Mathematical functions
 
@@ -11672,7 +12953,7 @@ similarly for the signed rank functions.
 The Gamma function, the natural logarithm of its absolute value and
 first four derivatives and the n-th derivative of Psi, the digamma
 function, which is the derivative of @code{lgammafn}. In other words,
- at code{digamma(x)} is the same as @code{(psigamma(x,0)},
+ at code{digamma(x)} is the same as @code{psigamma(x,0)},
 @code{trigamma(x) == psigamma(x,1)}, etc.
 @end deftypefun
 
@@ -11729,9 +13010,10 @@ missing or infinite or @code{NaN}.
 Computes @code{log(1 + @var{x})} (@emph{log 1 @b{p}lus x}), accurately
 even for small @var{x}, i.e., @eqn{|x| \ll 1, |x| << 1}.
 
-This should be provided by your platform, in which case it is not included
-in @file{Rmath.h}, but is (probably) in @file{math.h} which
- at file{Rmath.h} includes.
+This should be provided by your platform, in which case it is not
+included in @file{Rmath.h}, but is (probably) in @file{math.h} which
+ at file{Rmath.h} includes (except under C++, so it may not be declared for
+C++98).
 @end deftypefun
 
 @deftypefun double log1pmx (double @var{x})
@@ -11750,9 +13032,10 @@ accurately, notably for large @var{x}, e.g., @eqn{x > 720, x > 720}.
 Computes @code{exp(@var{x}) - 1} (@emph{exp x @b{m}inus 1}), accurately
 even for small @var{x}, i.e., @eqn{|x| \ll 1, |x| << 1}.
 
-This should be provided by your platform, in which case it is not included
-in @file{Rmath.h}, but is (probably) in @file{math.h} which
- at file{Rmath.h} includes.
+This should be provided by your platform, in which case it is not
+included in @file{Rmath.h}, but is (probably) in @file{math.h} which
+ at file{Rmath.h} includes (except under C++, so it may not be declared for
+C++98).
 @end deftypefun
 
 @deftypefun double lgamma1p (double @var{x})
@@ -11766,29 +13049,40 @@ accurately, notably for half integer @var{x}.
 
 This might be provided by your platform at footnote{It is an optional C11
 extension.}, in which case it is not included in @file{Rmath.h}, but is
-in @file{math.h} which @file{Rmath.h} includes.
+in @file{math.h} which @file{Rmath.h} includes.  (Ensure that
+neither @file{math.h} nor @file{cmath} is included before
+ at file{Rmath.h} or define
+ at example
+#define __STDC_WANT_IEC_60559_FUNCS_EXT__ 1
+ at end example
+ at noindent
+before the first inclusion.)
 @end deftypefun
 
 @deftypefun double sinpi (double @var{x})
 Computes @code{sin(pi * x)} accurately, notably for (half) integer @var{x}.
 
-This might be provided by your platform, in which case it is not included
-in @file{Rmath.h}, but is in @file{math.h} which @file{Rmath.h} includes.
+This might be provided by your platform, in which case it is not
+included in @file{Rmath.h}, but is in @file{math.h} which @file{Rmath.h}
+includes (but see the comments for @code{cospi}).
 @end deftypefun
 
 @deftypefun double tanpi (double @var{x})
 Computes @code{tan(pi * x)} accurately, notably for (half) integer @var{x}.
 
 This might be provided by your platform, in which case it is not included
-in @file{Rmath.h}, but is in @file{math.h} which @file{Rmath.h} includes.
+in @file{Rmath.h}, but is in @file{math.h} which @file{Rmath.h} includes
+(but see the comments for @code{cospi}).
 @end deftypefun
 
 @deftypefun double logspace_add (double @var{logx}, double @var{logy})
 @deftypefunx double logspace_sub (double @var{logx}, double @var{logy})
+ at deftypefunx double logspace_sum (const double* @var{logx}, int @var{n})
 Compute the log of a sum or difference from logs of terms, i.e., ``x +
 y'' as @code{log (exp(@var{logx}) + exp(@var{logy}))} and ``x - y'' as
- at code{log (exp(@var{logx}) - exp(@var{logy}))}, without causing
-unnecessary overflows or throwing away too much accuracy.
+ at code{log (exp(@var{logx}) - exp(@var{logy}))},
+and ``sum_i x[i]'' as @code{log (sum[i = 1:@var{n} exp(@var{logx}[i])] )}
+without causing unnecessary overflows or throwing away too much accuracy.
 @end deftypefun
 
 @deftypefun int imax2 (int @var{x}, int @var{y})
@@ -11797,8 +13091,8 @@ unnecessary overflows or throwing away too much accuracy.
 @deftypefunx double fmin2 (double @var{x}, double @var{y})
 Return the larger (@code{max}) or smaller (@code{min}) of two integer or
 double numbers, respectively.  Note that @code{fmax2} and @code{fmin2}
-differ from C99's @code{fmax} and @code{fmin} when one of the arguments
-is a @code{NaN}: these versions return @code{NaN}.
+differ from C99/C++11's @code{fmax} and @code{fmin} when one of the
+arguments is a @code{NaN}: these versions return @code{NaN}.
 @end deftypefun
 
 @deftypefun double sign (double @var{x})
@@ -11823,15 +13117,16 @@ This is the function used by @R{}'s @code{signif()}.
 Returns the value of @var{x} rounded to @var{digits} @emph{significant}
 decimal digits.
 
-This is the function used by @R{}'s @code{round()}.
+This is the function used by @R{}'s @code{round()}.  (Note that C99/C++11
+provide a @code{round} function but C++98 need not.)
 @end deftypefun
 
 @deftypefun double ftrunc (double @var{x})
 Returns the value of @var{x} truncated (to an integer value) towards
 zero.
 
-Note that this is no longer needed in C code, as C99 provide a
- at code{trunc} function.  It is needed for portable C++98 code.
+(Note that C99/C++11 provide a @code{round} function but C++98 need
+not.)
 @end deftypefun
 
 @node Mathematical constants,  , Numerical Utilities, Numerical analysis subroutines
@@ -11841,9 +13136,11 @@ Note that this is no longer needed in C code, as C99 provide a
 @c maybe not all into the index ...
 
 @R{} has a set of commonly used mathematical constants encompassing
-constants usually found @file{math.h} and contains further ones that are
-used in statistical computations.  All these are defined to (at least)
-30 digits accuracy in @file{Rmath.h}.  The following definitions
+constants defined by POSIX and usually at footnote{but see the second
+paragraph of @pxref{Portable C and C++ code}.} found in @file{math.h}
+(but maybe not in the C++ header @file{cmath}) and contains further ones
+that are used in statistical computations.  These are defined to (at
+least) 30 digits accuracy in @file{Rmath.h}.  The following definitions
 use @code{ln(x)} for the natural logarithm (@code{log(x)} in @R{}).
 
 @quotation
@@ -11925,44 +13222,44 @@ The interfaces (defined in header @file{R_ext/Applic.h}) are
 @findex nmmin
 @example
 void nmmin(int n, double *xin, double *x, double *Fmin, optimfn fn,
-	   int *fail, double abstol, double intol, void *ex,
-	   double alpha, double beta, double gamma, int trace,
-	   int *fncount, int maxit);
+           int *fail, double abstol, double intol, void *ex,
+           double alpha, double beta, double gamma, int trace,
+           int *fncount, int maxit);
 @end example
 
 @item BFGS:
 @findex vmmin
 @example
 void vmmin(int n, double *x, double *Fmin,
-	   optimfn fn, optimgr gr, int maxit, int trace,
-	   int *mask, double abstol, double reltol, int nREPORT,
-	   void *ex, int *fncount, int *grcount, int *fail);
+           optimfn fn, optimgr gr, int maxit, int trace,
+           int *mask, double abstol, double reltol, int nREPORT,
+           void *ex, int *fncount, int *grcount, int *fail);
 @end example
 
 @item Conjugate gradients:
 @findex cgmin
 @example
 void cgmin(int n, double *xin, double *x, double *Fmin,
-	   optimfn fn, optimgr gr, int *fail, double abstol,
-	   double intol, void *ex, int type, int trace,
-	   int *fncount, int *grcount, int maxit);
+           optimfn fn, optimgr gr, int *fail, double abstol,
+           double intol, void *ex, int type, int trace,
+           int *fncount, int *grcount, int maxit);
 @end example
 
 @item Limited-memory BFGS with bounds:
 @findex lbfgsb
 @example
 void lbfgsb(int n, int lmm, double *x, double *lower,
-	    double *upper, int *nbd, double *Fmin, optimfn fn,
-	    optimgr gr, int *fail, void *ex, double factr,
-	    double pgtol, int *fncount, int *grcount,
-	    int maxit, char *msg, int trace, int nREPORT);
+            double *upper, int *nbd, double *Fmin, optimfn fn,
+            optimgr gr, int *fail, void *ex, double factr,
+            double pgtol, int *fncount, int *grcount,
+            int maxit, char *msg, int trace, int nREPORT);
 @end example
 
 @item Simulated annealing:
 @findex samin
 @example
 void samin(int n, double *x, double *Fmin, optimfn fn, int maxit,
-	   int tmax, double temp, int trace, void *ex);
+           int tmax, double temp, int trace, void *ex);
 @end example
 
 @end itemize
@@ -12000,36 +13297,36 @@ passed down from the calling routine, normally used to carry auxiliary
 information.
 
 There are interfaces (defined in header @file{R_ext/Applic.h}) for
-definite and for indefinite integrals.  `Indefinite' means that at least
-one of the integration boundaries is not finite.
+integrals over finite and infinite intervals (or ``ranges'' or
+``integration boundaries'').
 
 @itemize @bullet
 @item Finite:
 @findex Rdqags
 @example
 void Rdqags(integr_fn f, void *ex, double *a, double *b,
-	    double *epsabs, double *epsrel,
-	    double *result, double *abserr, int *neval, int *ier,
-	    int *limit, int *lenw, int *last,
-	    int *iwork, double *work);
+            double *epsabs, double *epsrel,
+            double *result, double *abserr, int *neval, int *ier,
+            int *limit, int *lenw, int *last,
+            int *iwork, double *work);
 @end example
 
- at item Indefinite:
+ at item Infinite:
 @findex Rdqagi
 @example
 void Rdqagi(integr_fn f, void *ex, double *bound, int *inf,
-	    double *epsabs, double *epsrel,
-	    double *result, double *abserr, int *neval, int *ier,
-	    int *limit, int *lenw, int *last,
-	    int *iwork, double *work);
+            double *epsabs, double *epsrel,
+            double *result, double *abserr, int *neval, int *ier,
+            int *limit, int *lenw, int *last,
+            int *iwork, double *work);
 @end example
 
 @end itemize
 
 @noindent
 Only the 3rd and 4th argument differ for the two integrators; for the
-definite integral, using @code{Rdqags}, @code{a} and @code{b} are the
-integration interval bounds, whereas for an indefinite integral, using
+finite range integral using @code{Rdqags}, @code{a} and @code{b} are the
+integration interval bounds, whereas for an infinite range integral using
 @code{Rdqagi}, @code{bound} is the finite bound of the integration (if
 the integral is not doubly-infinite) and @code{inf} is a code indicating
 the kind of integration range,
@@ -12073,16 +13370,21 @@ available to users' C code.
 The following is declared in header file @file{Rinternals.h}.
 
 @deftypefun void  R_orderVector (int* @var{indx}, int @var{n}, SEXP @var{arglist}, Rboolean @var{nalast}, Rboolean @var{decreasing})
+ at deftypefunx void R_orderVector1 (int* @var{indx}, int @var{n}, SEXP @var{x}, Rboolean @var{nalast}, Rboolean @var{decreasing})
 
-This corresponds to @R{}'s @code{order(..., na.last, decreasing)}.
+ at code{R_orderVector()} corresponds to @R{}'s @code{order(..., na.last, decreasing)}.
 More specifically, @code{indx <- order(x, y, na.last, decreasing)} corresponds to
 @code{R_orderVector(indx, n, Rf_lang2(x, y), nalast, decreasing)} and for
 three vectors, @code{Rf_lang3(x,y,z)} is used as @var{arglist}.
 
-Note that  @code{R_orderVector()} assumes the vector @code{indx}
-to be allocated to length @eqn{\ge n, >= n}.  On return, @code{indx[]}
-contains a permutation of @code{0:(n-1)}, i.e., 0-based C indices (and not
-1-based @R{} indices, as @R{}'s @code{order()}).
+Both @code{R_orderVector} and @code{R_orderVector1} assume the vector
+ at code{indx} to be allocated to length @eqn{\ge n, >= n}.  On return,
+ at code{indx[]} contains a permutation of @code{0:(n-1)}, i.e., 0-based C
+indices (and not 1-based @R{} indices, as @R{}'s @code{order()}).
+
+When ordering only one vector, @code{R_orderVector1} is faster and
+corresponds (but is 0-based) to @R{}'s @code{indx <- order(x, na.last,
+decreasing)}.  It was added in @R{} 3.3.0.
 @end deftypefun
 
 All other sort routines are declared in header file
@@ -12152,6 +13454,7 @@ See @R{}'s help page @code{?max.col}.
 @end deftypefun
 
 @deftypefun int findInterval (double* @var{xt}, int @var{n}, double @var{x}, Rboolean @var{rightmost_closed}, Rboolean @var{all_inside}, int @var{ilo}, int* @var{mflag})
+ at deftypefunx int findInterval2(double* @var{xt}, int @var{n}, double @var{x}, Rboolean @var{rightmost_closed}, Rboolean @var{all_inside}, Rboolean @var{left_open}, int @var{ilo}, int* @var{mflag})
 Given the ordered vector @var{xt} of length @var{n}, return the interval
 or index of @var{x} in @code{@var{xt}[]}, typically max(@math{i}; @eqn{1
 \le i \le @var{n}, 1 <= i <= @var{n}} & @math{@var{xt}[i]} @eqn{\le, <=}
@@ -12167,6 +13470,12 @@ The algorithm is particularly fast when @var{ilo} is set to the last
 result of @code{findInterval()} and @var{x} is a value of a sequence which
 is increasing or decreasing for subsequent calls.
 
+ at code{findInterval2()} is a generalization of @code{findInterval()},
+with an extra @code{Rboolean} argument @var{left_open}.  Setting
+ at code{left_open = TRUE} basically replaces all left-closed right-open
+intervals @eqn{[s, t)} by left-open ones @eqn{(s, t]}, see the help page
+of @R{} function @code{findInterval} for details.
+
 There is also an @code{F77_CALL(interv)()} version of
 @code{findInterval()} with the same arguments, but all pointers.
 @end deftypefun
@@ -12276,14 +13585,12 @@ the code is indeed being used with @R{}.
 Header file @file{Rconfig.h} (included by @file{R.h}) is used to define
 platform-specific macros that are mainly for use in other header files.
 The macro @code{WORDS_BIGENDIAN} is defined on
-big-endian at footnote{@uref{http://en.wikipedia.org/@/wiki/@/Endianness}.}
+big-endian at footnote{@uref{https://en.wikipedia.org/@/wiki/@/Endianness}.}
 systems (e.g.@: most OSes on Sparc and PowerPC hardware) and not on
-little-endian systems (such as @code{i686} and @code{x86_64} on all
-OSes, and Linux on Alpha and Itanium).  It can be useful when
-manipulating binary files.  The macro @code{SUPPORT_OPENMP} is defined
-on suitable systems and can be used in conjunction with the
- at code{SUPPORT_OPENMP_*} macros in packages that want to make use of
-OpenMP.
+little-endian systems (nowadays all the commoner @R{} platforms).  It
+can be useful when manipulating binary files.  NB: these macros apply
+only to the C compiler used to build @R{}, not necessarily to another C
+or C++ compiler.
 
 Header file @file{Rversion.h} (@strong{not} included by @file{R.h})
 defines a macro @code{R_VERSION} giving the version number encoded as an
@@ -12294,7 +13601,7 @@ of @R{} which did not have this macro, use a construction such as
 
 @example
 @group
-#if defined(R_VERSION) && R_VERSION >= R_Version(1, 9, 0)
+#if defined(R_VERSION) && R_VERSION >= R_Version(3, 1, 0)
   ...
 #endif
 @end group
@@ -12303,17 +13610,39 @@ of @R{} which did not have this macro, use a construction such as
 More detailed information is available in the macros @code{R_MAJOR},
 @code{R_MINOR}, @code{R_YEAR}, @code{R_MONTH} and @code{R_DAY}: see the
 header file @file{Rversion.h} for their format.  Note that the minor
-version includes the patchlevel (as in @samp{9.0}).
+version includes the patchlevel (as in @samp{2.2}).
+
+Packages which use @code{alloca} need to ensure it is defined: as it is
+part of neither C nor POSIX there is no standard way to do so.  One can
+use
+
+ at example
+#include <Rconfig.h> // for HAVE_ALLOCA_H
+#ifdef __GNUC__
+// this covers gcc, clang, icc
+# undef alloca
+# define alloca(x) __builtin_alloca((x))
+#elif defined(HAVE_ALLOCA_H)
+// needed for native compilers on Solaris and AIX
+# include <alloca.h>
+#endif
+ at end example
+
+ at noindent
+(and this should be included before standard C headers such as
+ at file{stdlib.h}, since on some platforms these include @file{malloc.h}
+which may have a conflicting definition), which suffices for known @R{}
+platforms.
 
 @node Inlining C functions, Controlling visibility, Platform and version information, The R API
 @section Inlining C functions
 @findex R_INLINE
 
-The C99 keyword @code{inline} should be recognized by all compilers now
-used to build @R{}.  Portable code which might be used with earlier
-versions of @R{} can be written using the macro @code{R_INLINE} (defined
-in file @file{Rconfig.h} included by @file{R.h}), as for example from
-package @CRANpkg{cluster}
+The C99 keyword @code{inline} should be recognized by all compilers
+nowadays used to build @R{}.  Portable code which might be used with
+earlier versions of @R{} can be written using the macro @code{R_INLINE}
+(defined in file @file{Rconfig.h} included by @file{R.h}), as for
+example from package @CRANpkg{cluster}
 
 @example
 #include <R.h>
@@ -12337,15 +13666,18 @@ code.
 @section Controlling visibility
 @cindex Visibility
 
-Header @file{R_ext/Visibility} has some definitions for controlling the
+Header @file{R_ext/Visibility.h} has some definitions for controlling the
 visibility of entry points.  These are only effective when
 @samp{HAVE_VISIBILITY_ATTRIBUTE} is defined -- this is checked when @R{}
 is configured and recorded in header @file{Rconfig.h} (included by
- at file{R_ext/Visibility.h}).  It is generally defined on modern
-Unix-alikes with a recent compiler, but not supported on OS X nor
-Windows.  Minimizing the visibility of symbols in a shared library will
-both speed up its loading (unlikely to be significant) and reduce the
-possibility of linking to other entry points of the same name.
+ at file{R_ext/Visibility.h}).  It is often defined on modern Unix-alikes
+with a recent compiler at footnote{It is defined by the Intel compilers,
+but also hides unsatisfied references and so cannot be used with @R{}.
+It is not supported by the AIX nor Solaris compilers.}, but not
+supported on macOS nor Windows.  Minimizing the visibility of symbols in
+a shared library will both speed up its loading (unlikely to be
+significant) and reduce the possibility of linking to other entry points
+of the same name.
 
 C/C++ entry points prefixed by @code{attribute_hidden} will not be
 visible in the shared object.  There is no comparable mechanism for
@@ -12480,7 +13812,7 @@ packages
 @item @file{R_ext/Riconv.h} @tab interface to @code{iconv}
 @item @file{R_ext/Visibility.h} @tab definitions controlling visibility
 @item @file{R_ext/eventloop.h} @tab for add-on front-ends and for
-packages that need to share in the @R{} event loops (on all platforms)
+packages that need to share in the @R{} event loops (not Windows)
 @end multitable
 @end quotation
 
@@ -12517,7 +13849,7 @@ Let us re-iterate the advice to include system headers before the @R{}
 header files, especially @file{Rinternals.h} (included by
 @file{Rdefines.h}) and @file{Rmath.h}, which redefine names which may be
 used in system headers (fewer if @samp{R_NO_REMAP} is defined, or
- at samp{R_NO_REMAP_RMATH} for @file{Rmath.h}, as from @R{} 3.1.0).
+ at samp{R_NO_REMAP_RMATH} for @file{Rmath.h}).
 
 @node Generic functions and methods, Linking GUIs and other front-ends to R, The R API, Top
 @chapter Generic functions and methods
@@ -12532,6 +13864,11 @@ with examples of the problems caused by not adhering to them.
 This chapter only covers the `informal' class system copied from S3,
 and not with the S4 (formal) methods of package @pkg{methods}.
 
+First, a @emph{caveat}: a function named @code{@var{gen}. at var{cl}} will
+be invoked by the generic @code{@var{gen}} for class @code{@var{cl}}, so
+do not name functions in this style unless they are intended to be
+methods.
+
 The key function for methods is @code{NextMethod}, which dispatches the
 next method.  It is quite typical for a method function to make a few
 changes to its arguments, dispatch to the next method, receive the
@@ -12548,13 +13885,9 @@ t.data.frame <- function(x)
 @end example
 
 @noindent
-Also consider @code{predict.glm}: it happens that in @R{} for historical
-reasons it calls @code{predict.lm} directly, but in principle (and in S
-originally and currently) it could use @code{NextMethod}.
-(@code{NextMethod} seems under-used in the @R{} sources.  Do be aware
-that there are S/R differences in this area, and the example above works
-because there is a @emph{next} method, the default method, not that a
-new method is selected when the class is changed.)
+Note that the example above works because there is a @emph{next} method,
+the default method, not that a new method is selected when the class is
+changed.
 
 @emph{Any} method a programmer writes may be invoked from another method
 by @code{NextMethod}, @emph{with the arguments appropriate to the
@@ -12700,7 +14033,7 @@ mean a GUI or other application that has the ability to submit commands
 to @R{} and perhaps to receive results back (not necessarily in a text
 format).  There are other routes besides those described here, for
 example the package @CRANpkg{Rserve} (from @acronym{CRAN}, see also
- at uref{http://www.rforge.net/@/Rserve/}) and connections to Java in
+ at uref{https://www.rforge.net/@/Rserve/}) and connections to Java in
 @samp{JRI} (part of the @CRANpkg{rJava} package on @acronym{CRAN}) and
 the Omegahat/Bioconductor package @samp{SJava}.
 
@@ -12719,7 +14052,7 @@ front-ends).  Conversely some of the functions from the API (such as
 @node Embedding R under Unix-alikes, Embedding R under Windows, Linking GUIs and other front-ends to R, Linking GUIs and other front-ends to R
 @section Embedding R under Unix-alikes
 
- at R{} can be built as a shared library at footnote{In the parlance of OS X
+ at R{} can be built as a shared library at footnote{In the parlance of macOS
 this is a @emph{dynamic} library, and is the normal way to build @R{} on
 that platform.} if configured with @option{--enable-R-shlib}.  This
 shared library can be used to run @R{} from alternative front-end
@@ -12727,11 +14060,11 @@ programs.  We will assume this has been done for the rest of this
 section.  Also, it can be built as a static library if configured with
 @option{--enable-R-static-lib}, and that can be used in a very similar
 way (at least on Linux: on other platforms one needs to ensure that all
-the symbols exported by @file{libR.a} and linked into the front-end).
+the symbols exported by @file{libR.a} are linked into the front-end).
 
 The command-line @R{} front-end, @file{@var{R_HOME}/bin/exec/R}, is one
 such example, and the former @acronym{GNOME} (see package @pkg{gnomeGUI}
-on @acronym{CRAN}'s @samp{Archive} area) and OS X consoles are others.
+on @acronym{CRAN}'s @samp{Archive} area) and macOS consoles are others.
 The source for @file{@var{R_HOME}/bin/exec/R} is in file
 @file{src/main/Rmain.c} and is very simple
 
@@ -12809,13 +14142,13 @@ int main(int ac, char **av)
     /* do some more setup */
 
     /* submit some code to R, which is done interactively via
-	run_Rmainloop();
+        run_Rmainloop();
 
-	A possible substitute for a pseudo-console is
+        A possible substitute for a pseudo-console is
 
-	R_ReplDLLinit();
-	while(R_ReplDLLdo1() > 0) @{
-	/* add user actions here if desired */
+        R_ReplDLLinit();
+        while(R_ReplDLLdo1() > 0) @{
+        /* add user actions here if desired */
        @}
 
      */
@@ -12883,7 +14216,7 @@ R CMD config --ldflags
 (These apply only to an uninstalled copy or a standard install.)
 
 If @R{} is installed, @code{pkg-config} is available and neither
-sub-architectures nor an OS X framework have been used, alternatives for
+sub-architectures nor a macOS framework have been used, alternatives for
 a shared @R{} library are
 
 @example
@@ -13232,31 +14565,20 @@ the @pkg{tcltk} package.
 
 It is not intended that these facilities are used by packages, but if
 they are needed exceptionally, the package should ensure that it cleans
-up and removes its handlers when its namespace is unloaded.
+up and removes its handlers when its namespace is unloaded.  Note that
+the header @file{sys/select.h} is needed at footnote{At least according to
+POSIX 2004 and later.  Earlier standards prescribed @file{sys/time.h}
+and HP-UX continued to use that: @file{R_ext/eventloop.h} will include
+it from @R{} 3.4.0 if @code{HAVE_SYS_TIME_H} is defined.}: users should
+check this is available and define @code{HAVE_SYS_SELECT_H} before
+including @file{R_ext/eventloop.h}. (It is often the case that another
+header will include @file{sys/select.h} before @file{eventloop.h} is
+processed, but this should not be relied on.)
 
 An alternative front-end needs both to make provision for other @R{}
 events whilst waiting for input, and to ensure that it is not frozen out
-during events of the second type.  This is not handled very well in the
-existing examples.  The GNOME front-end ran a private handler for polled
-events by setting
-
- at example
-extern int (*R_timeout_handler)();
-extern long R_timeout_val;
-
-      if (R_timeout_handler && R_timeout_val)
-          gtk_timeout_add(R_timeout_val, R_timeout_handler, NULL);
-      gtk_main ();
- at end example
-
- at noindent
-whilst it is waiting for console input.  This obviously handles events
-for Gtk windows (such as the graphics device in the @pkg{gtkDevice}
-package), but not X11 events (such as the @code{X11()} device) or for
-other event handlers that might have been registered with @R{}.  It does
-not attempt to keep itself alive whilst @R{} is waiting on sockets.  The
-ability to add a polled handler as @code{R_timeout_handler} is used by
-the @pkg{tcltk} package.
+during events of the second type.  The ability to add a polled handler
+as @code{R_timeout_handler} is used by the @pkg{tcltk} package.
 
 
 @node Threading issues,  , Meshing event loops, Embedding R under Unix-alikes
@@ -13274,17 +14596,23 @@ extern uintptr_t R_CStackStart; /* Initial stack address */
 @end example
 
 @noindent
-Note that @code{uintptr_t} is a C99 type for which a substitute is
-defined in @R{}, so your code needs to define @code{HAVE_UINTPTR_T}
-appropriately.
+Note that @code{uintptr_t} is an optional C99 type for which a
+substitute is defined in @R{}, so your code needs to define
+ at code{HAVE_UINTPTR_T} appropriately.  To do so, test if the type is
+defined in C header @file{stdint.h} or C++ header @file{cstdint} and if
+so include the header and define @code{HAVE_UINTPTR_T} before including
+ at file{Rinterface.h}.  (As from @R{} 3.4.0 for C code one can simply
+include @file{Rconfig.h}, possibly @emph{via} @file{R.h}, and for C++11
+code @file{Rinterface.h} will include the header @file{cstdint}.)
 
 These will be set at footnote{at least on platforms where the values are
 available, that is having @code{getrlimit} and on Linux or having
 @code{sysctl} supporting @code{KERN_USRSTACK}, including FreeBSD and OS
 X.} when @code{Rf_initialize_R} is called, to values appropriate to the
 main thread.  Stack-checking can be disabled by setting
- at code{R_CStackLimit = (uintptr_t)-1}, but it is better to if possible
-set appropriate values.  (What these are and how to determine them are
+ at code{R_CStackLimit = (uintptr_t)-1} immediately after
+ at code{Rf_initialize_R} is called, but it is better to if possible set
+appropriate values.  (What these are and how to determine them are
 OS-specific, and the stack size limit may differ for secondary threads.
 If you have a choice of stack size, at least 10Mb is recommended.)
 
@@ -13295,7 +14623,7 @@ suppressed by setting the variable @code{R_SignalHandlers} (declared in
 @file{Rinterface.h}) to @code{0}.
 
 Note that these variables must not be changed by an @R{}
- at strong{package}: a package should not calling @R{} internals which
+ at strong{package}: a package should not call @R{} internals which
 makes use of the stack-checking mechanism on a secondary thread.
 
 @node Embedding R under Windows,  , Embedding R under Unix-alikes, Linking GUIs and other front-ends to R
@@ -13337,9 +14665,9 @@ which works with @R{} packages to support transfer of data to and from
 Recent versions have usage restrictions.
 
 @item
-Another (D)COM server, @code{RDCOMServer}, is available from
- at uref{http://www.omegahat.org/}.  Its philosophy is discussed in
- at uref{http://www.omegahat.org/@/RDCOMServer/@/Docs/@/Paradigm.html} and is
+Another (D)COM server, @code{RDCOMServer}, may be available from Omegahat,
+ at uref{http://www.omegahat.net/}.  Its philosophy is discussed in
+ at uref{http://www.omegahat.net/@/RDCOMServer/@/Docs/@/Paradigm.html} and is
 very different from the purpose of this section.
 @end itemize
 @node Calling R.dll directly, Finding R_HOME, Using (D)COM, Embedding R under Windows
@@ -13608,11 +14936,6 @@ algorithm as @code{2.11.0 patched > 2.11.0 > 2.11.0 alpha > 2.8.1}) and
 use its value for @code{InstallPath}.
 @end itemize
 
-Prior to @R{} 2.12.0 @file{R.dll} and the various front-end executables
-were in @file{R_HOME\bin}, but they are now in @file{R_HOME\bin\i386} or
- at file{R_HOME\bin\x64}.  So you may need to arrange to look first in the
-architecture-specific subdirectory and then in @file{R_HOME\bin}.
-
 @node Function and variable index, Concept index, Linking GUIs and other front-ends to R, Top
 @unnumbered Function and variable index
 
diff --git a/doc/manual/R-intro.R b/doc/manual/R-intro.R
index a0ede81..7f28d12 100644
--- a/doc/manual/R-intro.R
+++ b/doc/manual/R-intro.R
@@ -123,9 +123,9 @@ incomes <- c(60, 49, 40, 61, 64, 60, 59, 54, 62, 69, 70, 42, 56,
 incmeans <- tapply(incomes, statef, mean)
 incmeans
 
-stderr <- function(x) sqrt(var(x)/length(x))
+stdError <- function(x) sqrt(var(x)/length(x))
 
-incster <- tapply(incomes, statef, stderr)
+incster <- tapply(incomes, statef, stdError)
 incster
 
 ##
@@ -195,8 +195,7 @@ z <- outer(x, y, f)
 
 d <- outer(0:9, 0:9)
 fr <- table(outer(d, d, "-"))
-plot(as.numeric(names(fr)), fr, type="h",
-     xlab="Determinant", ylab="Frequency")
+plot(fr, xlab="Determinant", ylab="Frequency")
 
 ##
 
diff --git a/doc/manual/R-intro.texi b/doc/manual/R-intro.texi
index e372244..0d3edda 100644
--- a/doc/manual/R-intro.texi
+++ b/doc/manual/R-intro.texi
@@ -72,7 +72,7 @@ Copyright @copyright{} 1997, 1998 M.@: Maechler@*
 This is an introduction to R (``GNU S''), a language and environment for
 statistical computing and graphics.  R is similar to the
 award-winning at footnote{ACM Software Systems award, 1998:
- at uref{http://awards.acm.org/award_winners/chambers_6640862.cfm}.} S
+ at uref{https://awards.acm.org/award_winners/chambers_6640862.cfm}.} S
 system, which was developed at Bell Laboratories by John Chambers et al.
 It provides a wide variety of statistical and graphical techniques
 (linear and nonlinear modelling, statistical tests, time series
@@ -228,7 +228,7 @@ built into the base @R{} environment, but many are supplied as
 @emph{packages}.  There are about 25 packages supplied with @R{} (called
 ``standard'' and ``recommended'' packages) and many more are available
 through the @acronym{CRAN} family of Internet sites (via
- at uref{http://CRAN.R-project.org}) and elsewhere.  More details on
+ at uref{https://CRAN.R-project.org}) and elsewhere.  More details on
 packages are given later (@pxref{Packages}).
 
 Most classical statistics and much of the latest methodology is
@@ -255,7 +255,7 @@ generally to any implementation of the @R{} environment.
 Most users will find it necessary to interact directly with the
 operating system on their computer from time to time.  In this guide, we
 mainly discuss interaction with the operating system on UNIX machines.
-If you are running @R{} under Windows or OS X you will need to make
+If you are running @R{} under Windows or macOS you will need to make
 some small adjustments.
 
 Setting up a workstation to take full advantage of the customizable
@@ -558,7 +558,7 @@ you are given the opportunity to save all the currently available
 objects.  If you indicate that you want to do this, the objects are
 written to a file called @file{.RData}@footnote{The leading ``dot'' in
 this file name makes it @emph{invisible} in normal file listings in
-UNIX, and in default GUI file listings on OS X and Windows.} in the
+UNIX, and in default GUI file listings on macOS and Windows.} in the
 current directory, and the command lines used in the session are saved
 to a file called @file{.Rhistory}.
 
@@ -1514,19 +1514,18 @@ function @code{var()} to calculate the sample variance, such a function
 is a very simple one liner, specified by the assignment:
 
 @example
-> stderr <- function(x) sqrt(var(x)/length(x))
+> stdError <- function(x) sqrt(var(x)/length(x))
 @end example
 
 @noindent
 (Writing functions will be considered later in @ref{Writing your own
-functions}, and in this case was unnecessary as @R{} also has a builtin
-function @code{sd()}.)
+functions}.  Note that @R{}'s a builtin function @code{sd()} is something different.)
 @findex sd
 @findex var
 After this assignment, the standard errors are calculated by
 
 @example
-> incster <- tapply(incomes, statef, stderr)
+> incster <- tapply(incomes, statef, stdError)
 @end example
 
 @noindent
@@ -1923,13 +1922,12 @@ A neat way of doing this uses the @code{outer()} function twice:
 @example
 > d <- outer(0:9, 0:9)
 > fr <- table(outer(d, d, "-"))
-> plot(as.numeric(names(fr)), fr, type="h",
-       xlab="Determinant", ylab="Frequency")
+> plot(fr, xlab="Determinant", ylab="Frequency")
 @end example
 
-Notice the coercion of the @code{names} attribute of the frequency table
-to numeric in order to recover the range of the determinant values.  The
-``obvious'' way of doing this problem with @code{for} loops, to be
+Notice that @code{plot()} here uses a histogram like plot method, because
+it ``sees'' that @code{fr} is of class @code{"table"}.
+The ``obvious'' way of doing this problem with @code{for} loops, to be
 discussed in @ref{Loops and conditional execution}, is so inefficient as
 to be impractical.
 
@@ -2571,7 +2569,7 @@ external file.  This is discussed further in @ref{Reading data from
 files}.
 
 @node attach() and detach(), Working with data frames, Making data frames, Data frames
- at subsection @code{attach() and @code{detach()}}
+ at subsection @code{attach()} and @code{detach()}
 @findex attach
 @findex detach
 
@@ -3378,7 +3376,7 @@ Commands may be grouped together in braces, @code{@{@var{expr_1};
 @var{@dots{}}; @var{expr_m}@}}, in which case the value of the group
 is the result of the last expression in the group evaluated.  Since such
 a group is also an expression it may, for example, be itself included in
-parentheses and used a part of an even larger expression, and so on.
+parentheses and used as part of an even larger expression, and so on.
 
 @node Control statements,  , Grouped expressions, Loops and conditional execution
 @section Control statements
@@ -3416,9 +3414,9 @@ if necessary.
 @findex ifelse
 There is a vectorized version of the @code{if}/@code{else} construct,
 the @code{ifelse} function.  This has the form @code{ifelse(condition, a,
-b)} and returns a vector of the length of its longest argument, with
+b)} and returns a vector of the same length as @code{condition}, with
 elements @code{a[i]} if @code{condition[i]} is true, otherwise
- at code{b[i]}.
+ at code{b[i]} (where @code{a} and @code{b} are recycled as necessary).
 
 
 @node Repetitive execution,  , Conditional execution, Control statements
@@ -4183,6 +4181,9 @@ function (object, ...)
 @}
 @end example
 
+A function named @code{@var{gen}. at var{cl}} will be invoked by the
+generic @code{@var{gen}} for class @code{@var{cl}}, so do not name
+functions in this style unless they are intended to be methods.
 
 The reader is referred to the @emph{R Language Definition} for a more
 complete discussion of this mechanism.
@@ -4603,7 +4604,7 @@ fitted model object.
 @section Analysis of variance and model comparison
 @cindex Analysis of variance
 
-The model fitting function @code{aov(@code{formula},
+The model fitting function @code{aov(@var{formula},
 data=@var{data.frame})}
 @findex aov
 operates at the simplest level in a very similar way to the function
@@ -5345,7 +5346,7 @@ is also easy because at startup time @R{} initiates a graphics
 the display of interactive graphics.  Although this is done
 automatically, it may useful to know that the command used is
 @code{X11()} under UNIX, @code{windows()} under Windows and
- at code{quartz()} under OS X.  A new device can always be opened by
+ at code{quartz()} under macOS.  A new device can always be opened by
 @code{dev.new()}.
 
 Once the device driver is running, @R{} plotting commands can be used to
@@ -6253,7 +6254,7 @@ For use with the X11 window system on Unix-alikes
 For use on Windows
 @item quartz()
 @findex quartz
-For use on OS X
+For use on macOS
 @item postscript()
 @findex postscript
 For printing on PostScript printers, or creating PostScript graphics
@@ -6343,7 +6344,7 @@ meanings are as follows:
 @itemx win.metafile()
 [Windows]
 @item quartz()
-[OS X]
+[macOS]
 @item postscript()
 @itemx pdf()
 @item png()
@@ -6443,7 +6444,7 @@ command like
 
 Users connected to the Internet can use the @code{install.packages()}
 and @code{update.packages()} functions (available through the
- at code{Packages} menu in the Windows and OS X GUIs, @pxref{Installing
+ at code{Packages} menu in the Windows and macOS GUIs, @pxref{Installing
 packages, , , R-admin, R Installation and Administration}) to install
 and update packages.
 
@@ -6500,9 +6501,9 @@ statistical methods, others give access to data or hardware, and others
 are designed to complement textbooks.  Some (the @emph{recommended}
 packages) are distributed with every binary distribution of @R{}.  Most
 are available for download from @acronym{CRAN}
-(@uref{http://CRAN.R-project.org/} and its mirrors) and other
-repositories such as Bioconductor (@uref{http://www.bioconductor.org/})
-and Omegahat (@uref{http://www.omegahat.org/}).  The @emph{R FAQ}
+(@uref{https://CRAN.R-project.org/} and its mirrors) and other
+repositories such as Bioconductor (@uref{https://www.bioconductor.org/}).
+and Omegahat (@uref{http://www.omegahat.net/}).  The @emph{R FAQ}
 contains a list of CRAN packages current at the time of release, but the
 collection of available packages changes very frequently.
 
@@ -6512,12 +6513,11 @@ collection of available packages changes very frequently.
 @findex ::
 @findex :::
 
-All packages have @emph{namespaces}, and have since @R{} 2.14.0.
-Namespaces do three things: they allow the package writer to hide
-functions and data that are meant only for internal use, they prevent
-functions from breaking when a user (or other package writer) picks a
-name that clashes with one in the package, and they provide a way to
-refer to an object within a particular package.
+Packages have @emph{namespaces}, which do three things: they allow the
+package writer to hide functions and data that are meant only for
+internal use, they prevent functions from breaking when a user (or other
+package writer) picks a name that clashes with one in the package, and
+they provide a way to refer to an object within a particular package.
 
 For example, @code{t()} is the transpose function in @R{}, but users
 might define their own function named @code{t}.  Namespaces prevent
@@ -6581,7 +6581,7 @@ expression: to select by wildcards use @code{Sys.glob}.
 Many types of information on a filepath (including for example if it is
 a file or directory) can be found by @code{file.info}.
 
-There are several ways to find out if a file `exists' (and file can
+There are several ways to find out if a file `exists' (a file can
 exist on the filesystem and not be visible to the current user).
 There are functions @code{file.exists}, @code{file.access} and
 @code{file_test} with various versions of this test: @code{file_test} is
@@ -6598,7 +6598,7 @@ package: @code{tk_choose.files} and @code{tk_choose.dir}.
 
 Functions @code{file.show} and @code{file.edit} will display and edit
 one or more files in a way appropriate to the @R{} port, using the
-facilities of a console (such as RGui on Windows or R.app on OS X) if
+facilities of a console (such as RGui on Windows or R.app on macOS) if
 one is in use.
 
 There is some support for @emph{links} in the filesystem: see functions
@@ -6621,7 +6621,7 @@ The following are some issues which have been encountered with filepaths.
 @item
 POSIX filesystems are case-sensitive, so @file{foo.png} and
 @file{Foo.PNG} are different files.  However, the defaults on Windows
-and OS X are to be case-insensitive, and FAT filesystems (commonly used
+and macOS are to be case-insensitive, and FAT filesystems (commonly used
 on removable storage) are not normally case-sensitive (and all filepaths
 may be mapped to lower case).
 
@@ -6674,7 +6674,7 @@ is sometimes useful for exporting names from @R{}.
 
 File @emph{permissions} are a related topic.  @R{} has support for the
 POSIX concepts of read/write/execute permission for owner/group/all but
-this may be only partially supported on the filesystem (so for example
+this may be only partially supported on the filesystem, so for example
 on Windows only read-only files (for the account running the @R{}
 session) are recognized.  Access Control Lists (ACLs) are employed on
 several filesystems, but do not have an agreed standard and @R{} has no
@@ -6720,8 +6720,8 @@ available.  These generally achieve higher rates of compression
 decompression and much slower compression.
 
 There is some confusion between @command{xz} and @command{lzma}
-compression (see @uref{http://en.wikipedia.org/wiki/Xz} and
- at uref{http://en.wikipedia.org/wiki/LZMA}): @R{} can read files
+compression (see @uref{https://en.wikipedia.org/wiki/Xz} and
+ at uref{https://en.wikipedia.org/wiki/LZMA}): @R{} can read files
 compressed by most versions of either.
 
 File archives are single files which contain a collection of files, the
@@ -6965,13 +6965,13 @@ want to save it.
 @node Invoking R, The command-line editor, A sample session, Top
 @appendix Invoking R
 
-Users of @R{} on Windows or OS X should read the OS-specific section
+Users of @R{} on Windows or macOS should read the OS-specific section
 first, but command-line use is also supported.
 
 @menu
 * Invoking R from the command line::  
 * Invoking R under Windows::    
-* Invoking R under OS X::       
+* Invoking R under macOS::       
 * Scripting with R::            
 @end menu
 
@@ -7316,7 +7316,7 @@ batch file, or if it has extension @code{.sh} or @code{.pl} the
 appropriate interpreter (if available) is called to run it.
 
 
- at node Invoking R under Windows, Invoking R under OS X, Invoking R from the command line, Invoking R
+ at node Invoking R under Windows, Invoking R under macOS, Invoking R from the command line, Invoking R
 @appendixsec Invoking R under Windows
 
 There are two ways to run @R{} under Windows.  Within a terminal window
@@ -7386,23 +7386,23 @@ will run @LaTeX{} on @file{mydoc.tex}, with the path to @R{}'s
 this does not help with the MiKTeX build of @LaTeX{}, but
 @command{R CMD texify mydoc} will work in that case.)
 
- at node Invoking R under OS X, Scripting with R, Invoking R under Windows, Invoking R
- at appendixsec Invoking R under OS X
+ at node Invoking R under macOS, Scripting with R, Invoking R under Windows, Invoking R
+ at appendixsec Invoking R under macOS
 
-There are two ways to run @R{} under OS X.  Within a @code{Terminal.app}
+There are two ways to run @R{} under macOS.  Within a @code{Terminal.app}
 window by invoking @code{R}, the methods described in the first
 subsection apply.  There is also console-based GUI (@code{R.app}) that by
 default is installed in the @code{Applications} folder on your
-system.  It is a standard double-clickable OS X application.
+system.  It is a standard double-clickable macOS application.
 
-The startup procedure under OS X is very similar to that under UNIX, but
+The startup procedure under macOS is very similar to that under UNIX, but
 @code{R.app} does not make use of command-line arguments.  The `home
 directory' is the one inside the R.framework, but the startup and
 current working directory are set as the user's home directory unless a
 different startup directory is given in the Preferences window
 accessible from within the GUI.
 
- at node Scripting with R,  , Invoking R under OS X, Invoking R
+ at node Scripting with R,  , Invoking R under macOS, Invoking R
 @appendixsec Scripting with R
 
 If you just want to run a file @file{foo.R} of @R{} commands, the
@@ -7461,7 +7461,7 @@ the usual way for the shell running the command.
 
 If you do not wish to hardcode the path to @command{Rscript} but have it
 in your path (which is normally the case for an installed @R{} except on
-Windows, but e.g.@: OS X users may need to add @file{/usr/local/bin}
+Windows, but e.g.@: macOS users may need to add @file{/usr/local/bin}
 to their path), use
 
 @example
@@ -7521,11 +7521,11 @@ When the @acronym{GNU} @strong{readline} library is available at the
 time @R{} is configured for compilation under UNIX, an inbuilt command
 line editor allowing recall, editing and re-submission of prior commands
 is used.  Note that other versions of @strong{readline} exist and may be
-used by the inbuilt command line editor: this used to happen on OS X.
+used by the inbuilt command line editor: this used to happen on macOS.
 
 It can be disabled (useful for usage with @acronym{ESS} @footnote{The
 `Emacs Speaks Statistics' package; see the @acronym{URL}
- at uref{http://ESS.R-project.org}}) using the startup option
+ at uref{https://ESS.R-project.org/}}) using the startup option
 @option{--no-readline}.
 
 Windows versions of @R{} have somewhat simpler command-line editing: see
@@ -7533,9 +7533,12 @@ Windows versions of @R{} have somewhat simpler command-line editing: see
 file @file{README.Rterm} for command-line editing under
 @code{Rterm.exe}.
 
-When using @R{} with @strong{readline} capabilities, the functions
-described below are available, as well as others (probably) documented
-in @command{man readline} or @command{info readline} on your system.
+When using @R{} with GNU at footnote{It is possible to build @R{} using an
+emulation of GNU @strong{readline}, such as one based on NetBSD's
+ at strong{editline}, it which case only a subset of the capabilities may
+be provided.} @strong{readline} capabilities, the functions described
+below are available, as well as others (probably) documented in
+ at command{man readline} or @command{info readline} on your system.
 
 Many of these use either Control or Meta characters.  Control
 characters, such as @kbd{Control-m}, are obtained by holding the
@@ -7551,6 +7554,10 @@ type @key{ESC}@key{b}.  The @kbd{ESC} character sequences are also
 allowed on terminals with real Meta keys.  Note that case is significant
 for Meta characters.
 
+Some but not all versions at footnote{In particular, not versions 6.3 or
+later: this is worked around as from @R{} 3.4.0.} of @strong{readline}
+will recognize resizing of the terminal window so this is best avoided.
+
 @appendixsection Editing actions
 
 The @R{} program keeps a history of the command lines you type,
@@ -7580,7 +7587,8 @@ Go to the previous command (backwards in the history).
 @item C-n
 Go to the next command (forwards in the history).
 @item C-r @var{text}
-Find the last command with the @var{text} string in it.
+Find the last command with the @var{text} string in it.  This can be
+cancelled by @code{C-g} (and on some versions of @R{} by @code{C-c}).
 @end table
 
 On most terminals, you can also use the up and down arrow keys instead
diff --git a/doc/manual/R-ints.texi b/doc/manual/R-ints.texi
index eeb8a7f..f52c075 100644
--- a/doc/manual/R-ints.texi
+++ b/doc/manual/R-ints.texi
@@ -540,7 +540,7 @@ enclosure.
 There are additional places that `variables' can be looked up, called
 `user databases' in comments in the code.  These seem undocumented in
 the @R{} sources, but apparently refer to the @pkg{RObjectTable} package
-at @uref{http://www.omegahat.org/RObjectTables/}.
+at @uref{http://www.omegahat.net/RObjectTables/}.
 
 @cindex base environment
 @cindex environment, base
@@ -611,7 +611,7 @@ which is traversed once the search reaches the global environment.
 @cindex namespace
 Namespaces are environments associated with packages (and once again
 the base package is special and will be considered separately).  A
-package @code{@var{pkg}} with a namespace defines two environments
+package @code{@var{pkg}} defines two environments
 @code{namespace:@var{pkg}} and @code{package:@var{pkg}}: it is
 @code{package:@var{pkg}} that can be @code{attach}ed and form part of
 the search path.
@@ -1051,7 +1051,7 @@ is left brace, which is implemented as a primitive.} are
 
 `Special' primitive and internal functions evaluate their arguments
 internally @emph{after} @code{R_Visible} has been set, and evaluation of
-the arguments (e.g.@: an assignment as in PR#9263)) can change the value
+the arguments (e.g.@: an assignment as in PR#9263) can change the value
 of the flag.
 
 The @code{R_Visible} flag can also get altered during the evaluation of
@@ -1115,8 +1115,8 @@ functions are defined and also in file @file{size.c} which needs access
 to the sizes of the internal structures.)
 
 For background papers see
- at uref{http://www.stat.uiowa.edu/~luke/R/barrier.html} and
- at uref{http://www.stat.uiowa.edu/~luke/R/gengcnotes.html}.
+ at uref{http://homepage.stat.uiowa.edu/~luke/R/barrier.html} and
+ at uref{http://homepage.stat.uiowa.edu/~luke/R/gengcnotes.html}.
 
 @node Serialization Formats, Encodings for CHARSXPs, The write barrier, R Internal Structures
 @section Serialization Formats
@@ -1428,20 +1428,20 @@ objects without needing to know their internal `metaname' (although
 @node S4 methods, Mechanics of S4 dispatch, S4 classes, S4 objects
 @subsection S4 methods
 
-Details of methods are stored in S4 objects of class
- at code{"MethodsList"}.  They have a non-syntactic name of the form
- at code{.__M__ at var{generic}:@var{package}} for all methods defined in the
-current environment for the named generic derived from a specific
-package (which might be @code{.GlobalEnv}).
+Details of the methods are stored in environments (typically hidden in the
+respective namespace) with a non-syntactic name of the form
+ at code{.__T__ at var{generic}:@var{package}} containing objects of class
+ at code{MethodDefinition} for all methods defined in the current environment
+for the named generic derived from a specific package (which might be @code{.GlobalEnv}).
+This is sometimes referred to as a `methods table'.
 
-There is also environment @code{.__T__ at var{generic}:@var{package}} which
-has names the signatures of the methods defined, and values the
-corresponding method functions.  This is often referred to as a `methods
-table'.
-
-When a package without a namespace is attached these objects become
-visible on the search path.  @code{library} calls
- at code{methods:::cacheMetaData} to update the internal tables.
+For example,
+ at example
+ length(nM <- asNamespace("Matrix") )                    # 941 for Matrix 1.2-6
+ length(meth <- grep("^[.]__T__", names(nM), value=TRUE))# 107 generics with methods
+ length(meth.Ops <- nM$`.__T__Ops:base`) # 71 methods for the 'Ops' (group)generic
+ head(sort(names(meth.Ops))) ## "abIndex#abIndex" ... "ANY#ddiMatrix" "ANY#ldiMatrix" "ANY#Matrix"
+ at end example
 
 During an @R{} session there is an environment associated with each
 non-primitive generic containing objects @code{.AllMTable},
@@ -1456,8 +1456,8 @@ directive @code{exportMethods} will export all the methods defined in
 the namespace for a specified generic: the code also adds to the list
 of generics any that are exported directly.  For generics which are
 listed via @code{exportMethods} or exported themselves, the
-corresponding @code{"MethodsList"} and environment are exported and so
-will appear (as hidden objects) in the package environment.
+corresponding environment is exported and so
+will appear (as hidden object) in the package environment.
 
 Methods for primitives which are internally S4 generic (see below) are
 always exported, whether mentioned in the @file{NAMESPACE} file or not.
@@ -1471,7 +1471,7 @@ methods defined on generics in other packages.  Since methods for a
 generic could be imported from several different packages, the methods
 tables are merged.
 
-When a package with a namespace is attached
+When a package is attached
 @code{methods:::cacheMetaData} is called to update the internal tables:
 only the visible methods will be cached.
 
@@ -1480,7 +1480,7 @@ only the visible methods will be cached.
 @subsection Mechanics of S4 dispatch
 
 This subsection does not discuss how S4 methods are chosen: see
- at uref{http://@/developer.@/r-project.org/howMethodsWork.pdf}.
+ at uref{https://@/developer.@/r-project.org/howMethodsWork.pdf}.
 
 For all but primitive functions, setting a method on an existing
 function that is not itself S4 generic creates a new object in the
@@ -1495,7 +1495,7 @@ space there will be two functions called @code{myfn} on the search
 paths, and which will be called depends on which search path is in use.
 This is starkest for functions in the base namespace, where the
 original will be found ahead of the newly created function from any
-other package with a namespace.
+other package.
 
 Primitive functions are treated quite differently, for efficiency
 reasons: this results in different semantics.  @code{setGeneric} is
@@ -1764,36 +1764,26 @@ regarded as a variable created by the user.
 chosen to be loaded `on demand' rather than linked as dynamic libraries
 or incorporated into the main executable/dynamic library.
 
-For a few of these (e.g.@: @code{vfonts}) the issue is size: the
-database for the Hershey fonts is included in the C code of the module
-and was at one time an appreciable part of the codebase for a rarely
-used feature.  However, for most of the modules the motivation has been
-the amount of (often optional) code they will bring in via libraries to
-which they are linked.
+For the remaining modules the motivation has been the amount of (often
+optional) code they will bring in @emph{via} libraries to which they are
+linked.
 
 @table @asis
 
 @item @code{internet}
 The internal HTTP and FTP clients and socket support, which link to
-system-specific support libraries.
+system-specific support libraries.  This may load @code{libcurl} and on
+Windows will load @file{wininet.dll} and @file{ws2_32.dll}.
 
 @item @code{lapack}
 The code which makes use of the LAPACK library, and is linked to
 @file{libRlapack} or an external LAPACK library.
 
- at item @code{vfonts}
-The Hershey font databases and the code to draw with them.
-
 @item @code{X11}
 (Unix-alikes only.)  The @code{X11()}, @code{jpeg()}, @code{png()} and
 @code{tiff()} devices. These are optional, and links to some or all of
 the @code{X11}, @code{pango}, @code{cairo}, @code{jpeg}, @code{libpng}
 and @code{libtiff} libraries.
-
- at item @file{internet2.dll}
-(Windows only.)  An alternative version of the internet access routines,
-compiled against Internet Explorer internals (and so loads
- at file{wininet.dll} and @file{wsock32.dll}).
 @end table
 
 @node Visibility, Lazy loading, Modules, R Internal Structures
@@ -2271,7 +2261,7 @@ break  for function  if  next  repeat  return  while
 @noindent
 ).  One could argue about @code{~}, but it is known to the parser and has
 semantics quite unlike a normal function.  And @code{:} is documented
-with different argument names in its two meanings.)
+with different argument names in its two meanings.
 
 The QC functions @code{codoc} and @code{checkS3methods} also make use of
 these environments (effectively placing them in front of base in the
@@ -2352,7 +2342,7 @@ internationalized in the same way as other packages.
 * R code::                      
 * Main C code::                 
 * Windows-GUI-specific code::   
-* OS X GUI::                    
+* macOS GUI::                    
 * Updating::                    
 @end menu
 
@@ -2419,7 +2409,7 @@ The macro @code{_("msg")} can safely be used in directory
 translation.  (This does not apply to @code{N_} or @code{P_}).
 
 
- at node Windows-GUI-specific code, OS X GUI, Main C code, Internationalization in the R sources
+ at node Windows-GUI-specific code, macOS GUI, Main C code, Internationalization in the R sources
 @section Windows-GUI-specific code
 
 Messages for the Windows GUI are in a separate domain @samp{RGui}.  This
@@ -2449,14 +2439,14 @@ The template and message catalogs for the @samp{RGui} domain are in the
 top-level @file{po} directory.
 
 
- at node OS X GUI, Updating, Windows-GUI-specific code, Internationalization in the R sources
- at section OS X GUI
+ at node macOS GUI, Updating, Windows-GUI-specific code, Internationalization in the R sources
+ at section macOS GUI
 
 This is handled separately: see
- at uref{http://developer.r-project.org/Translations.html}.
+ at uref{https://developer.r-project.org/Translations30.html}.
 
 
- at node Updating,  , OS X GUI, Internationalization in the R sources
+ at node Updating,  , macOS GUI, Internationalization in the R sources
 @section Updating
 
 See file @file{po/README} for how to update the message templates and catalogs.
@@ -2520,7 +2510,8 @@ catalogs.
 
 Directory @file{Meta} contains several files in @code{.rds} format, that
 is serialized @R{} objects written by @code{saveRDS}.  All packages
-have files @file{Rd.rds}, @file{hsearch.rds}, @file{links.rds} and
+have files @file{Rd.rds}, @file{hsearch.rds}, @file{links.rds},
+ at file{features.rds}, and
 @file{package.rds}.  Packages with namespaces have a file
 @file{nsInfo.rds}, and those with data, demos or vignettes have
 @file{data.rds}, @file{demo.rds} or @file{vignette.rds} files.
@@ -2578,7 +2569,7 @@ File @file{data.rds} records a two-column character matrix with columns
 of dataset names and titles from the corresponding help file.  File
 @file{demo.rds} has the same structure for package demos.
 
-File @file{vignette.rds} records a dataframe with one row for each
+File @file{vignette.rds} records a data frame with one row for each
 `vignette' (@file{.[RS]nw} file in @file{inst/doc}) and with columns
 @samp{File} (the full file path in the sources), @samp{Title},
 @samp{PDF} (the pathless file name of the installed PDF version, if
@@ -2644,13 +2635,13 @@ All these functions do tilde expansion, in the same way as
 @code{path.expand}, with the deliberate exception of @code{Sys.glob}.
 
 File names may be case sensitive or not: the latter is the norm on
-Windows and OS X, the former on other Unix-alikes.  Note that this
+Windows and macOS, the former on other Unix-alikes.  Note that this
 is a property of both the OS and the file system: it is often possible
 to map names to upper or lower case when mounting the file system.  This
 can affect the matching of patterns in @code{list.files} and
 @code{Sys.glob}.
 
-File names commonly contain spaces on Windows and OS X but not
+File names commonly contain spaces on Windows and macOS but not
 elsewhere.  As file names are handled as character strings by @R{},
 spaces are not usually a concern unless file names are passed to other
 process, e.g.@: by a @code{system} call.
@@ -2661,7 +2652,7 @@ mounted onto logical directories under that root), Windows has separate
 roots for each physical or logical file system (`volume'), organized
 under @emph{drives} (with file paths starting @code{D:} for an
 @acronym{ASCII} letter, case-insensitively) and @emph{network shares}
-(with paths like @code{\netname\topdir\myfiles\a file}.  There is a
+(with paths like @code{\netname\topdir\myfiles\a file}).  There is a
 current drive, and path names without a drive part are relative to the
 current drive.  Further, each drive has a current directory, and
 relative paths are relative to that current directory, on a particular
@@ -2710,8 +2701,8 @@ that in S and whose @R{} code at footnote{The C code is in files
 @pkg{graphics}) and one implemented in package @pkg{grid}.
 
 Some notes on the historical changes can be found at
- at uref{http://www.stat.auckland.ac.nz/@/~paul/@/R/basegraph.html} and
- at uref{http://www.stat.auckland.ac.nz/@/~paul/R/@/graphicsChanges.html}.
+ at uref{https://www.stat.auckland.ac.nz/@/~paul/@/R/basegraph.html} and
+ at uref{https://www.stat.auckland.ac.nz/@/~paul/R/@/graphicsChanges.html}.
 
 At the lowest level is a graphics device, which manages a plotting
 surface (a screen window or a representation to be written to a file).
@@ -3262,7 +3253,7 @@ returned.  C functions @code{doMouseEvent} and @code{doKeybd} are
 provided to call the R event handlers @code{onMouseDown},
 @code{onMouseMove}, @code{onMouseUp}, and @code{onKeybd} and set
 @code{eventEnv$result} during this step.  Finally, @code{initEvent} is
-called again with @code{init=false} to inform the the devices that the
+called again with @code{init=false} to inform the devices that the
 loop is done, and the result is returned to the user.
 
 @node Specific devices,  , Graphics events, Graphics devices
@@ -3429,8 +3420,7 @@ names: the 657 known names are given in the character vector
 Integer or character @code{NA} colours are mapped internally to
 transparent white, as is the character string @code{"NA"}.
 
-The handling of negative colour numbers was undefined (and inconsistent)
-prior to @R{} 3.0.0, which made them an error.  Colours greater than
+Negative colour numbers are an error.  Colours greater than
 @samp{@var{N}} are wrapped around, so that for example with the default
 palette of size 8, colour @samp{10} is colour @samp{2} in the palette.
 
@@ -3575,10 +3565,10 @@ The handling of missing values differs in the two classes of uses.
 Generally these are errors when used in @code{par} but cause the
 corresponding element of the plot to be omitted when used as an element
 of a vector argument.  Originally the interpretation of arguments was
-mainly left to the device, but as from @R{} 3.0.0 some of this is
-pre-empted in the graphics engine (but for example the handling of
- at code{lwd = 0} remains device-specific, with some interpreting it as a
-`thinnest possible' line).
+mainly left to the device, but nowadays some of this is pre-empted in
+the graphics engine (but for example the handling of @code{lwd = 0}
+remains device-specific, with some interpreting it as a `thinnest
+possible' line).
 
 @node Grid graphics,  , Base graphics, Graphics Devices
 @section Grid graphics
@@ -3604,7 +3594,7 @@ modified startup sequence.
 
 However, the main way to run a GUI console is to launch a separate
 program which runs embedded @R{}: this is done by @command{Rgui.exe} on
-Windows and @command{R.app} on OS X.  The first is an integral part
+Windows and @command{R.app} on macOS.  The first is an integral part
 of @R{} and the code for the console is currently in @file{R.dll}.
 
 @menu
@@ -3614,16 +3604,16 @@ of @R{} and the code for the console is currently in @file{R.dll}.
 @node R.app,  , GUI consoles, GUI consoles
 @section R.app
 
- at command{R.app} is a OS X application which provides a console.  Its
+ at command{R.app} is a macOS application which provides a console.  Its
 sources are a separate project at footnote{an Xcode project, in SVN at
 @uref{https://svn.r-project.org/R-packages/trunk/Mac-GUI}.}, and its binaries
 link to an @R{} installation which it runs as a dynamic library
 @file{libR.dylib}.  The standard @acronym{CRAN} distribution of @R{} for
-OS X bundles the GUI and @R{} itself, but installing the GUI is optional
+macOS bundles the GUI and @R{} itself, but installing the GUI is optional
 and either component can be updated separately.
 
 @command{R.app} relies on @file{libR.dylib} being in a specific place,
-and hence on @R{} having been built and installed as a Mac OS X
+and hence on @R{} having been built and installed as a Mac macOS
 `framework'.  Specifically, it uses
 @file{/Library/Frameworks/R.framework/R}.  This is a symbolic link, as
 frameworks can contain multiple versions of @R{}.  It eventually
@@ -3632,14 +3622,13 @@ resolves to
 which is (in the @acronym{CRAN} distribution) a `fat' binary containing
 multiple sub-architectures.
 
-OS X applications are directory trees: each @command{R.app} contains
+macOS applications are directory trees: each @command{R.app} contains
 a front-end written in Objective-C for one sub-architecture: in the
 standard distribution there are separate applications for 32- and 64-bit
 Intel architectures.
 
 Originally the @R{} sources contained quite a lot of code used only by
-the OS X GUI, but by @R{} 3.0.0 this was been migrated to the
- at command{R.app} sources.
+the macOS GUI, but this was migrated to the @command{R.app} sources.
 
 @command{R.app} starts @R{} as an embedded application with a
 command-line which includes @option{--gui=aqua} (see below).  It uses
@@ -3656,7 +3645,7 @@ There is a @command{configure} option @option{--with-aqua} for @R{}
 which customizes the way @R{} is built: this is distinct from the
 @option{--enable-R-framework} option which causes @command{make install}
 to install @R{} as the framework needed for use with @code{R.app}.  (The
-option @option{--with-aqua} is the default on OS X.)  It sets the
+option @option{--with-aqua} is the default on macOS.)  It sets the
 macro @code{HAVE_AQUA} in @file{config.h} and the make variable
 @code{BUILD_AQUA_TRUE}.  These have several consequences:
 
@@ -3665,7 +3654,7 @@ macro @code{HAVE_AQUA} in @file{config.h} and the make variable
 The @code{quartz()} device is built (other than as a stub) in package
 @pkg{grDevices}: this needs an Objective-C compiler.  Then
 @code{quartz()} can be used with terminal @R{} provided the latter has
-access to the OS X screen.
+access to the macOS screen.
 
 @item
 File @file{src/unix/aqua.c} is compiled.  This now only contains an
@@ -3813,16 +3802,17 @@ Default: @samp{default} (which checks only tarballs, and checks in the
 If true, make use of the @CRANpkg{codetools} package, which provides a
 detailed analysis of visibility of objects (but may give false
 positives).
-Default: true.
+Default: true (if recommended packages are installed).
 @item _R_CHECK_USE_INSTALL_LOG_
 If true, record the output from installing a package as part of its
 check to a log file (@file{00install.out} by default), even when running
 interactively.
 Default: true.
 @item _R_CHECK_VIGNETTES_NLINES_
-Maximum number of lines to show at the bottom of the output when reporting
-errors in running vignettes.
-Default: 10.
+Maximum number of lines to show from the bottom of the output when
+reporting errors in running or re-building vignettes. (As from @R{}
+3.4.0, @code{0} means all lines will be shown.)
+Default: 10 for running, 25 for re-building.
 @item _R_CHECK_CODOC_S4_METHODS_
 Control whether @code{codoc()} testing is also performed on S4 methods.
 Default: true.
@@ -3865,8 +3855,8 @@ Controls the minimum level for reporting warnings from @code{checkRd}.
 Default: -1.
 @item _R_CHECK_XREFS_REPOSITORIES_
 If set to a non-empty value, a space-separated list of repositories to
-use to determine known packages.  Default: empty, when the CRAN,
-Omegahat and Bioconductor repositories known to @R{} is used.
+use to determine known packages.  Default: empty, when the CRAN
+and Bioconductor repositories known to @R{} is used.
 @item _R_CHECK_SRC_MINUS_W_IMPLICIT_
 Control whether installation output is checked for compilation warnings
 about implicit function declarations (as spotted by GCC with command
@@ -3915,7 +3905,7 @@ Should @command{du} be used to find the installed sizes of packages?
 but this option allows the check to be overruled if an unsuitable
 command is found (including one that does not respect the @option{-k}
 flag to report in units of 1Kb, or reports in a different format -- the
-GNU, OS X and Solaris @command{du} commands have been tested).
+GNU, macOS and Solaris @command{du} commands have been tested).
 Default: true if @command{du} is found.
 @item _R_CHECK_DOC_SIZES_
 Should @command{qpdf} be used to check the installed sizes of PDFs?
@@ -3930,17 +3920,19 @@ to a valid program, or @command{gs} (or on Windows,
 Default: false (but true for CRAN submission checks).
 @item _R_CHECK_ALWAYS_LOG_VIGNETTE_OUTPUT_
 By default the output from running the @R{} code in the vignettes is
-kept only if there is an error.
+kept only if there is an error.  This also applies to the
+ at file{build_vignettes.log} log from the re-building of vignettes.
 Default: false.
 @item _R_CHECK_CLEAN_VIGN_TEST_
-Should the @file{vign_test} directory be removed if the test is successful?
+Should the @file{vign_test} directory be removed if the test is
+successful?
 Default: true.
 @item _R_CHECK_REPLACING_IMPORTS_
 Should warnings about replacing imports be reported?  These sometimes come
 from auto-generated @file{NAMESPACE} files in other packages, but most
 often from importing the whole of a namespace rather than using
 @code{importFrom}.
-Default: false (but true for CRAN submission checks).
+Default: true.
 @item _R_CHECK_UNSAFE_CALLS_
 Check for calls that appear to tamper with (or allow tampering with)
 already loaded code not from the current package: such calls may well
@@ -4007,6 +3999,10 @@ TRUE}.
 Check whether package is suitable for publication on CRAN.
 Default: false, except for CRAN submission checks.
 
+ at item _R_CHECK_CRAN_INCOMING_REMOTE_
+Include checks that require remote access among the above.
+Default: same as @code{_R_CHECK_CRAN_INCOMING_}
+
 @item _R_CHECK_XREFS_USE_ALIASES_FROM_CRAN_
 When checking anchored Rd xrefs, use Rd aliases from the CRAN package
 web areas in addition to those in the packages installed locally.
@@ -4015,7 +4011,7 @@ Default: false.
 @item _R_SHLIB_BUILD_OBJECTS_SYMBOL_TABLES_
 Make the checks of compiled code more accurate by recording the symbol
 tables for objects (@file{.o} files) at installation in a file
- at file{symbols.rds}.  (Only currently supported on Linux, Solaris, OS X,
+ at file{symbols.rds}.  (Only currently supported on Linux, Solaris, macOS,
 Windows and FreeBSD.)
 Default: true.
 
@@ -4079,12 +4075,47 @@ If set, check code usage (via @CRANpkg{codetools}) directly on the
 package namespace without loading and attaching the package and its
 suggests and enhances.
 Default: true (and true for CRAN submission checks).
+
+ at item _R_CHECK_CODE_USAGE_WITH_ONLY_BASE_ATTACHED_
+If set, check code usage (via @CRANpkg{codetools}) with only the base
+package attached.
+Default: true.
+
+ at item _R_CHECK_EXIT_ON_FIRST_ERROR_
+If set to a true value, the check will exit on the first error.
+Default: false.
+
+ at item _R_CHECK_S3_METHODS_NOT_REGISTERED_
+If set to a true value, report (apparent) S3 methods exported but not
+registered.
+Default: false (but true for CRAN submission checks).
+
+ at item _R_CHECK_OVERWRITE_REGISTERED_S3_METHODS_
+If set to a true value, report already registered S3 methods in
+base/recommended packages which are overwritten when this package's
+namespace is loaded. 
+Default: false (but true for CRAN submission checks).
+
+ at item _R_CHECK_TESTS_NLINES_
+Number of trailing lines of test output to reproduce in the log.  If
+ at code{0} all lines except the @R{} preamble are reproduced.
+Default: 13.
+
+ at item _R_CHECK_NATIVE_ROUTINE_REGISTRATION_
+If set to a true value, report if the entry points to register native
+routines and to suppress dynamic search are not found in a package's
+DLL.  (@strong{NB:} this requires system commands @command{nm} and on
+Windows, @command{objdump.exe} to be on the @env{PATH}.  This would be
+normal when using a package with compiled code (which are the only ones
+this checks), but Windows' users should check.)
+Default: false (but true for CRAN submission checks).
 @end vtable
 
 CRAN's submission checks use something like
 
 @example
 _R_CHECK_CRAN_INCOMING_=TRUE
+_R_CHECK_CRAN_INCOMING_REMOTE_=TRUE
 _R_CHECK_VC_DIRS_=TRUE
 _R_CHECK_TIMINGS_=10
 _R_CHECK_INSTALL_DEPENDS_=TRUE
@@ -4101,6 +4132,8 @@ _R_CHECK_DEPRECATED_DEFUNCT_=TRUE
 _R_CHECK_REPLACING_IMPORTS_=TRUE
 _R_CHECK_SCREEN_DEVICE_=stop
 _R_CHECK_TOPLEVEL_FILES_=TRUE
+_R_CHECK_S3_METHODS_NOT_REGISTERED_=TRUE
+_R_CHECK_OVERWRITE_REGISTERED_S3_METHODS_=TRUE
 @end example
 
 @noindent
@@ -4114,13 +4147,25 @@ _R_CHECK_FORCE_SUGGESTS_=FALSE
 since some packages do suggest other packages not available on CRAN or
 other commonly-used repositories.
 
+Another variable which enables stricter checks is to set
+ at env{R_CHECK_CONSTANTS} to @code{5}.  This checks that
+nothing at footnote{The usual culprits are calls to compiled code
+ at emph{via} @code{.Call} or @code{.External} which alter their
+arguments.} changes the values of `constants'@footnote{things which the
+byte compiler assumes do not change, e.g.@: function bodies.} in @R{}
+code.  This is best used in conjunction with setting
+ at env{R_JIT_STRATEGY} to @code{3}, which checks code on first use (by
+default most code is only checked after byte-compilation on second use).
+Unfortunately these checks slow down checking of examples, tests and
+vignettes, typically two-fold but in the worst cases at least a
+hundred-fold.
 
 @node R coding standards, Testing R code, Tools, Top
 @chapter R coding standards
 
 @cindex coding standards
 @R{} is meant to run on a wide variety of platforms, including Linux and
-most variants of Unix as well as Windows and OS X.
+most variants of Unix as well as Windows and macOS.
 Therefore, when extending @R{} by either adding to the @R{} base
 distribution or by providing an add-on package, one should not rely on
 features specific to only a few supported platforms, if this can be
@@ -4138,7 +4183,7 @@ The following tools can ``safely be assumed'' for @R{} extensions.
 An ISO C99 C compiler.  Note that extensions such as @acronym{POSIX}
 1003.1 must be tested for, typically using Autoconf unless you are sure
 they are supported on all mainstream @R{} platforms (including Windows
-and OS X).
+and macOS).
 
 @item
 A FORTRAN 77 compiler (but not Fortran 9x, although it is nowadays
@@ -4265,7 +4310,7 @@ if you change internal structures.]
 @node Use of TeX dialects, Current and future directions, Testing R code, Top
 @chapter Use of TeX dialects
 
-Various dialects of TeX and used for different purposes in @R{}.  The
+Various dialects of TeX are used for different purposes in @R{}.  The
 policy is that manuals be written in @samp{texinfo}, and for convenience
 the main and Windows FAQs are also.  This has the advantage that is is
 easy to produce @HTML{} and plain text versions as well as typeset manuals.
@@ -4442,7 +4487,7 @@ introduce `long' versions @code{xlength} and @code{XLENGTH} which return
 @code{R_xlen_t} values.
 
 
-See also @uref{http://www.cs.uiowa.edu/~luke/talks/useR10.pdf}.
+See also @uref{http://homepage.cs.uiowa.edu/~luke/talks/useR10.pdf}.
 
 @node Large matrices,  , 64-bit types, Current and future directions
 @section Large matrices
diff --git a/doc/manual/R-lang.texi b/doc/manual/R-lang.texi
index 5a55ac7..662bf00 100644
--- a/doc/manual/R-lang.texi
+++ b/doc/manual/R-lang.texi
@@ -1360,10 +1360,8 @@ permitted.
 looping. at footnote{Looping is the repeated evaluation of a statement or
 block of statements.}  They are @code{for}, @code{while} and
 @code{repeat}.  The two built-in constructs, @code{next} and
- at code{break}, provide additional control over the evaluation.  Each of
-the three statements returns the value of the last statement that was
-evaluated.  It is possible, although uncommon, to assign the result of
-one of these statements to a symbol.  @R{} provides other functions for
+ at code{break}, provide additional control over the evaluation. 
+ at R{} provides other functions for
 implicit looping such as @code{tapply}, @code{apply}, and @code{lapply}.
 In addition many operations, especially arithmetic ones, are vectorized
 so you may not need to use a loop.
@@ -1592,12 +1590,11 @@ string @code{"NA"}.  Programmers who need to specify an explicit string
 @code{NA} should use @samp{as.character(NA)} rather than @code{"NA"}, or
 set elements to @code{NA} using @code{is.na<-}.
 
-As from @R{} 2.5.0 there are constants @code{NA_integer_},
- at code{NA_real_}, @code{NA_complex_} and @code{NA_character_} which will
-generate (in the parser) an @code{NA} value of the appropriate type,
-and will be used in deparsing when it is not otherwise possible to
-identify the type of an @code{NA} (and the @code{control} options ask
-for this to be done).
+There are constants @code{NA_integer_}, @code{NA_real_},
+ at code{NA_complex_} and @code{NA_character_} which will generate (in the
+parser) an @code{NA} value of the appropriate type, and will be used in
+deparsing when it is not otherwise possible to identify the type of an
+ at code{NA} (and the @code{control} options ask for this to be done).
 
 There is no @code{NA} value for raw vectors.
 
@@ -1649,9 +1646,8 @@ that component, and so on. The result is still a single element.
 The form using @code{$} applies to recursive objects such as lists and
 pairlists.  It allows only a literal character string or a symbol as the
 index.  That is, the index is not computable: for cases where you need
-to evaluate an expression to find the index, use @code{x[[expr]]}.  When
- at code{$} is applied to a non-recursive object the result used to be
-always @code{NULL}: as from @R{} 2.6.0 this is an error.
+to evaluate an expression to find the index, use @code{x[[expr]]}.
+Applying @code{$} to a non-recursive object is an error.
 
 @menu
 * Indexing by vectors::         
@@ -1677,13 +1673,16 @@ selected.  If @code{i} contains negative elements, all elements except
 those indicated are selected.
 
 If @code{i} is positive and exceeds @code{length(x)} then the
-corresponding selection is @code{NA}.  A negative out of bounds value
-for @code{i} causes an error.
+corresponding selection is @code{NA}.  Negative out of bounds values
+for @code{i} are silently disregarded since R version 2.6.0, S compatibly,
+as they mean to drop non-existing elements and that is an empty operation
+(``no-op''). 
 
 A special case is the zero index, which has null effects: @code{x[0]} is
 an empty vector and otherwise including zeros among positive or negative
 indices has the same effect as if they were omitted.
- at c Are there any useful uses of zero indices??
+ at c Q: Are there any useful uses of zero indices?? A: There are cases where
+ at c it is useful that they are allowed and are no-ops
 
 @item
 @strong{Other numeric}.  Non-integer values are converted to integer
@@ -1786,7 +1785,7 @@ operation.
 @end example
 
 @noindent
-Negative indices are not allowed in indexing matrices.  @code{NA} and
+Indexing matrices may not contain negative indices.  @code{NA} and
 zero values are allowed: rows in an index matrix containing a zero are
 ignored, whereas rows containing an @code{NA} produce an @code{NA} in
 the result.
@@ -1839,7 +1838,7 @@ matching.
 
 The most important example of a class method for @code{[} is that used
 for data frames.  It is not described in detail here (see the help
-page for @code{[.data.frame}, but in broad terms, if two indices are
+page for @code{[.data.frame}), but in broad terms, if two indices are
 supplied (even if one is empty) it creates matrix-like indexing for a
 structure that is basically a list of vectors of the same length.  If a
 single index is supplied, it is interpreted as indexing the list of
@@ -4250,7 +4249,7 @@ first place.
 
 @cindex comments
 Comments in @R{} are ignored by the parser.  Any text from a
- at findex @code{#}
+ at findex #
 @code{#} character
 to the end of the line is taken to be a comment, unless
 the @code{#} character is inside a quoted string. For example,
@@ -4396,10 +4395,10 @@ eight hex digits.
 A single quote may also be embedded directly in a double-quote delimited
 string and vice versa.
 
-As from @R{} 2.8.0, a `nul' (@code{\0}) is not allowed in a character
-string, so using @code{\0} in a string constant terminates the constant
-(usually with a warning): further characters up to the closing quote are
-scanned but ignored.
+A `nul' (@code{\0}) is not allowed in a character string, so using
+ at code{\0} in a string constant terminates the constant (usually with a
+warning): further characters up to the closing quote are scanned but
+ignored.
 
 @node Identifiers, Reserved words, Literal constants, Tokens
 @subsection Identifiers
diff --git a/doc/manual/README b/doc/manual/README
index 0be8ce7..ab386dc 100644
--- a/doc/manual/README
+++ b/doc/manual/README
@@ -2,7 +2,7 @@ The version of Rd.sty in R_HOME/share/texmf uses url.sty.  This is
 normally installed, and can be obtained from any CTAN node or mirror:
 see
 
-	http://www.tug.org/ctan.html
+	https://www.tug.org/ctan.html
 
 It also uses the standard package bm, which is part of the standard
 tools bundle and should be part of any reasonably recent LaTeX
diff --git a/doc/manual/Rfaq.css b/doc/manual/Rfaq.css
index d13fcad..ea77fc9 100644
--- a/doc/manual/Rfaq.css
+++ b/doc/manual/Rfaq.css
@@ -1,30 +1,57 @@
-body {margin-left: 5%; margin-right: 5%;}
-
-H1{             background: white;
-                color: rgb(25%, 25%, 25%);
-                font-family: monospace;
-                font-size: xx-large;
-                text-align: center }
-
-H2{             background: white;
-                color: rgb(40%, 40%, 40%);
-                font-family: monospace;
-                font-size: x-large;
-                text-align: center }
-
-H3{             background: white;
-                color: rgb(40%, 40%, 40%);
-                font-family: monospace;
-                font-size: large }
-
-H4{             background: white;
-                color: rgb(40%, 40%, 40%);
-                font-family: monospace }
-
-span.samp{font-family: monospace}
-span.command{font-family: monospace}
-span.option{font-family: monospace}
-span.file{font-family: monospace}
-span.env{font-family: monospace}
-
-ul.menu{list-style-type: decimal}
+body {
+    margin-left: 5%;
+    margin-right: 5%;
+}
+
+h1 {
+    background: white;
+    color: rgb(25%, 25%, 25%);
+    font-family: monospace;
+    font-size: xx-large;
+    text-align: center;
+}
+
+h2 {
+    background: white;
+    color: rgb(40%, 40%, 40%);
+    font-family: monospace;
+    font-size: x-large;
+    text-align: center;
+}
+
+h3 {
+    background: white;
+    color: rgb(40%, 40%, 40%);
+    font-family: monospace;
+    font-size: large;
+}
+
+h4 {
+    background: white;
+    color: rgb(40%, 40%, 40%);
+    font-family: monospace;
+}
+
+span.samp {
+    font-family: monospace;
+}
+
+span.command {
+    font-family: monospace;
+}
+
+span.option {
+    font-family: monospace;
+}
+
+span.file {
+    font-family: monospace;
+}
+
+span.env {
+    font-family: monospace;
+}
+
+ul.menu {
+    list-style-type: decimal;
+}
diff --git a/doc/manual/Rman.css b/doc/manual/Rman.css
index 10ce30b..594937c 100644
--- a/doc/manual/Rman.css
+++ b/doc/manual/Rman.css
@@ -1,48 +1,67 @@
-body {margin-left: 5%; margin-right: 5%;}
+body {
+    margin-left: 5%;
+    margin-right: 5%;
+}
 
-H1 {             
+h1 {             
     background: white;
     color: rgb(25%, 25%, 25%);
     font-family: monospace;
     font-size: xx-large;
-    text-align: center
+    text-align: center;
 }
 
-H2 {
+h2 {
     background: white;
     color: rgb(40%, 40%, 40%);
     font-family: monospace;
     font-size: x-large;
-    text-align: center
+    text-align: center;
 }
 
-H3 {
+h3 {
     background: white;
     color: rgb(40%, 40%, 40%);
     font-family: monospace;
-    font-size: large
+    font-size: large;
 }
 
-H4 {
+h4 {
     background: white;
     color: rgb(40%, 40%, 40%);
-    font-family: monospace
+    font-family: monospace;
+}
+
+span.samp {
+    font-family: monospace;
+}
+
+span.command {
+    font-family: monospace;
+}
+
+span.option {
+    font-family: monospace;
 }
 
-span.samp{font-family: monospace}
-span.command{font-family: monospace}
-span.option{font-family: monospace}
-span.file{font-family: monospace}
-span.env{font-family: monospace}
+span.file {
+    font-family: monospace;
+}
+
+span.env {
+    font-family: monospace;
+}
 
 ul {
     margin-top: 0.25ex;
     margin-bottom: 0.25ex;
 }
+
 li {
     margin-top: 0.25ex;
     margin-bottom: 0.25ex;
 }
+
 p {
     margin-top: 0.6ex;
     margin-bottom: 1.2ex;
diff --git a/doc/manual/quot.sed b/doc/manual/quot.sed
index 5dbf04b..fdc3135 100644
--- a/doc/manual/quot.sed
+++ b/doc/manual/quot.sed
@@ -4,3 +4,6 @@ s/ '\([^`']*\)' / ‘\1’ /g
 s/ '\([^`']*\)'$/ ‘\1’/g
 s/ '\([^`']*\)'\([,:;!\?.>\)]\)/ ‘\1’\2/g
 s/^'\([^`']*\)' /‘\1’ /g
+/<link href="dir.html#Top"/d
+s/, \(Previous\|Up\): <a href="dir.html#Top"[^\/]*\/a>//g
+s/<table/<table summary=""/
diff --git a/doc/manual/refman.top b/doc/manual/refman.top
index 5598ca1..3965347 100644
--- a/doc/manual/refman.top
+++ b/doc/manual/refman.top
@@ -72,7 +72,7 @@
   R is free software and comes with ABSOLUTELY NO WARRANTY.  You are
   welcome to redistribute it under the terms of the GNU General Public
   License.  For more information about these matters, see
-  \textsf{http://www.gnu.org/copyleft/gpl.html}.
+  \textsf{https://www.gnu.org/copyleft/gpl.html}.
 \end{titlepage}
 
 \pagenumbering{roman}
diff --git a/doc/manual/resources.texi b/doc/manual/resources.texi
index c5b2d76..9fd90f0 100644
--- a/doc/manual/resources.texi
+++ b/doc/manual/resources.texi
@@ -23,15 +23,8 @@
 @ifhtml
 @lowersections
 @html
-<HTML>
-<HEAD>
-<TITLE>R: Resources</TITLE>
-<LINK REL=STYLESHEET TYPE="text/css" HREF="R.css">
-</HEAD>
-
-<BODY>
 <h1>Other Resources
-<img class="toplogo" src="logo.jpg" alt="[R logo]">
+<img class="toplogo" src="Rlogo.svg" alt="[R logo]">
 </h1>
 <hr width="100%">
 @end html
@@ -54,7 +47,7 @@ answers is maintained by @email{Kurt.Hornik@@R-project.org, Kurt Hornik}
 and can be found at the @acronym{URL}
 
 @quotation
- at uref{http://CRAN.R-project.org/doc/FAQ/R-FAQ.html}
+ at uref{https://CRAN.R-project.org/doc/FAQ/R-FAQ.html}
 @end quotation
 
 @ifinfo
@@ -71,7 +64,7 @@ are a number of mailing lists which are used by R users and developers.
 See
 
 @quotation
- at uref{http://www.R-project.org/mail.html}
+ at uref{https://www.R-project.org/mail.html}
 @end quotation
 
 for details.
@@ -82,11 +75,11 @@ for details.
 The Comprehensive R Archive Network (@acronym{CRAN}) is a collection of
 sites which carry identical material, consisting of the R
 distribution(s), the contributed extensions, documentation for R, and
-binaries, with the master site at @uref{http://CRAN.R-project.org/} and
+binaries, with the master site at @uref{https://CRAN.R-project.org/} and
 information on daily mirrors available from
 
 @quotation
- at uref{http://CRAN.R-project.org/mirrors.html}
+ at uref{https://CRAN.R-project.org/mirrors.html}
 @end quotation
 
 @node Bug-tracking system,  , Archives, Top
@@ -96,7 +89,7 @@ R has a bug-tracking system (or perhaps a bug-filing system is a more
 precise description) available on the net at
 
 @quotation
- at uref{http://bugs.R-project.org/}
+ at uref{https://bugs.R-project.org/}
 @end quotation
 
 @bye
diff --git a/doc/manual/rw-FAQ.texi b/doc/manual/rw-FAQ.texi
index 7c0b331..de1253c 100644
--- a/doc/manual/rw-FAQ.texi
+++ b/doc/manual/rw-FAQ.texi
@@ -77,11 +77,11 @@ This FAQ is for the Windows port of R: it describes features specific to
 that version.  The main R FAQ can be found at
 
 @display
- at uref{http://CRAN.R-project.org/doc/FAQ/R-FAQ.html}.
+ at uref{https://CRAN.R-project.org/doc/FAQ/R-FAQ.html}.
 @end display
 
 The information here applies only to recent versions of R for Windows,
-(@samp{3.0.0} or later).  It is biased towards users of 64-bit Windows.
+(@samp{3.1.0} or later).  It is biased towards users of 64-bit Windows.
 
 
 @newchap{}
@@ -125,25 +125,24 @@ The information here applies only to recent versions of R for Windows,
 @node Where can I find the latest version?, How do I install R for Windows?, Installation and Usage, Installation and Usage
 @section Where can I find the latest version?
 
-Go to any CRAN site (see @uref{http://cran.r-project.org/@/mirrors.html}
+Go to any CRAN site (see @uref{https://cran.r-project.org/@/mirrors.html}
 for a list), navigate to the @file{bin/windows/base} directory and
 collect the file(s) you need.  The current release is distributed as an
-installer @samp{@RWVER at -win.exe} of about 60Mb.
+installer @samp{@RWVER at -win.exe} of about 65MB.
 
 There are also links on that page to the @samp{r-patched} and
 @samp{r-devel} snapshots.  These are frequently updated builds of
 development versions of R.  The @samp{r-patched} build includes bug
 fixes to the current release, and @samp{r-devel} contains these as well
-as changes that will eventually make it into the next @samp{x.y.0}
-release.
+as changes that are planned to eventually make it into the next
+ at samp{x.y.0} release.
 
 @node How do I install R for Windows?, How do I check an installation?, Where can I find the latest version?, Installation and Usage
 @section How do I install R for Windows?
 
 Current binary versions of R run on Windows XP or later, including on
 64-bit versions: @xref{Can I use R on 64-bit Windows?}. The last version
-known to run on Windows 2000 was 2.12.2 and the last version supporting
-95/98/ME/NT4 was 2.6.1.
+known to run on Windows 2000 was 2.12.2.
 
 @c 2000 went end-of-life 2010-07-13
 @c XP SP3 went end of life 2014-04-08
@@ -152,9 +151,8 @@ We only test on versions of Windows currently supported by Microsoft,
 mainly 64-bit Windows 7 and Server 2008.
 
 Your file system must allow case-honouring long file names (as is likely
-except perhaps for some network-mounted systems).  A installation takes
-75--105Mb of disk space (up to 145Mb if ICU was included in the build,
-which is not currently the default).
+except perhaps for some network-mounted systems).  An installation takes
+up to 150MB of disk space.
 
 If you want to be able to build packages from sources, we recommend that
 you choose an installation path not containing spaces.  (Using a path
@@ -180,6 +178,8 @@ will have a shortcut to @file{Rgui.exe} on your desktop and/or somewhere
 on the Start menu file tree, and perhaps also in the Quick Launch part
 of the taskbar (Vista and earlier).  Right-click each shortcut, select
 Properties... and change the `Start in' field to your working directory.
+(If your account was not the one used for installation, you may need to
+copy the shortcut before editing it.)
 
 On some systems you will have two shortcuts, one for 32-bit with a label
 starting @code{R i386} and one for 64-bit starting @code{R x64}
@@ -239,7 +239,7 @@ after having checked the command line.
 
 A successful installation has exit code 0: unsuccessful ones may give 1,
 2, 3, 4 or 5.  See the help for Inno Setup
-(@uref{http://jrsoftware.org/@/ishelp.php}) for details.
+(@uref{http://jrsoftware.org/}) for details.
 
 We have some facilities for building a customized installer, in
 particular to add packages to the installer.  See the `R Installation
@@ -257,7 +257,10 @@ You may if you prefer run R from the command line of any shell you use,
 for example a `Command Prompt' or a port of a Unix shell such as
 @command{tcsh} or @command{bash}. (The command line can be anything you
 would put in the Target field of a shortcut, and the starting directory
-will be the current working directory of the shell.)
+will be the current working directory of the shell.  Note that the R
+executables are not by default added to the @env{PATH}.)  People running
+from a terminal usually prefer to run @command{Rterm.exe} and not
+ at command{Rgui.exe}.
 
 @node Can I run R from a CD or USB drive?, How do I UNinstall R?, How do I run it?, Installation and Usage
 @section Can I run R from a CD or USB drive?
@@ -276,10 +279,10 @@ without creating a shortcut starting in a writable folder.
 @node How do I UNinstall R?, What's the best way to upgrade?, Can I run R from a CD or USB drive?, Installation and Usage
 @section How do I UNinstall R?
 
-Normally you can do this from the @samp{Programs and Features} group in the
-Control Panel.  If it does not appear there, run @file{unins000.exe} in
-the top-level installation directory.  On recent versions of Windows you
-may well be asked to confirm that you wish to run a program from an
+Normally you can do this from the @samp{Programs and Features} group in
+the Control Panel.  If it does not appear there, run @file{unins000.exe}
+in the top-level installation directory.  On recent versions of Windows
+you may be asked to confirm that you wish to run a program from an
 `unknown' or `unidentified' publisher.
 
 Uninstalling R only removes files from the initial installation, not
@@ -459,7 +462,7 @@ See @code{?Startup} for more details of environment files.
 
 @item
 For all applications via Windows.  How you set an environment variable
-is system specific: under recent versions of Windows, go to `User
+is system-specific: under recent versions of Windows, go to `User
 Accounts' in the Control Panel, and select your account and then `Change
 my environment variables'.
 @end enumerate
@@ -533,10 +536,11 @@ neither sets up nor removes the file associations.
 @node Does R support automation?, The Internet download functions fail., Does R use the Registry?, Installation and Usage
 @section Does R support automation (OLE, COM)?
 
-Directly, no.  See CRAN packages @code{rscproxy} and @code{rcom} as well
-as @code{RDCOMServer}, @code{RDCOMClient}, @code{RDCOMEvents} and
- at code{SWinTypeLibs} from @uref{http://www.omegahat.org/}.
-
+Directly, no.  See packages such as @code{RDCOMClient} from Omegahat
+(source and binary packages available from
+ at uref{https://www.stats.ox.ac.uk/pub/RWin/})
+ at c @uref{http://www.omegahat.net/} 
+and the non-Free project at @uref{http://www.statconn.com/}.
 
 @node The Internet download functions fail., Entering certain characters crashes Rgui., Does R support automation?, Installation and Usage
 @section The Internet download functions fail.
@@ -544,33 +548,13 @@ as @code{RDCOMServer}, @code{RDCOMClient}, @code{RDCOMEvents} and
 for example @code{update.packages()} and the menu items on the Packages menu.
 
 We have had several reports of this, although they do work for us on
- at emph{all} of our machines.  There are two known possible fixes.
+ at emph{all} of our machines.  There are two known possible causes.
 
-(a) Use the alternative @file{internet2.dll} by starting R with the flag
- at option{--internet2} (@pxref{How do I install R for Windows?}) or
-calling @code{setInternet2(TRUE)}, or setting the environment variable
- at env{R_WIN_INTERNET2} to a non-empty value.  These cause R to use the
-Internet Explorer internals, which may already be configured for use
-with proxies.  Note that this does @emph{not} work with proxies that
-need authentication.
+(a) A proxy needs to be set up: see @code{?download.file}.
 
-(b) A proxy needs to be set up: see @code{?download.file}.  Here are two
-versions of an example (a real one, but from a machine that is only
-available locally) of a command-line in a short cut:
-
- at example
-"path_to_R\bin\x64\Rgui.exe" http_proxy=http://user:pass@@gannet:80/
-
-"path_to_R\bin\x64\Rgui.exe" http_proxy=http://gannet/ http_proxy_user=ask
- at end example
-
- at noindent
-The second version will prompt the user for the proxy username and
-password when HTTP downloads are first used.
-
-Another possibility is that firewall settings are blocking the R
-executables from contacting the Internet, but this should result in
-informative error messages from the firewall program.
+(b) Firewall settings are blocking the R executables from contacting the
+Internet (but this should result in informative error messages from the
+firewall program).
 
 
 @node Entering certain characters crashes Rgui., What does 'DLL attempted to change FPU control word' mean?, The Internet download functions fail., Installation and Usage
@@ -654,14 +638,12 @@ software installation to be done by an account which is in the local
 Administrator group with `admin approval mode' turned on.  (The
 Administrator account by default has it turned off.)  Unlike (say)
 Windows XP, such accounts do not run programs with full administrator
-privileges, and this is where the issues arise.  (For background
-information consult e.g.@:
- at url{http://windowsvistablog.com/@/blogs/@/windowsvista/@/archive/@/2007/01/23/@/security-features-vs-convenience.aspx}.)
-These OSes have the concept of `over-the-shoulder' credentials: if you
-are running without full administrator privileges and do something which
-needs them you may be prompted with one or more security-check dialog
-boxes, and may be required to provide administrator credentials or
-confirm that you really want to take that action.
+privileges, and this is where the issues arise.  These OSes have the
+concept of `over-the-shoulder' credentials: if you are running without
+full administrator privileges and do something which needs them you may
+be prompted with one or more security-check dialog boxes, and may be
+required to provide administrator credentials or confirm that you really
+want to take that action.
 
 Vista and later will report that the R installer has an `unidentified
 publisher' or `unknown publisher' and ask if it should be run.  System
@@ -762,11 +744,11 @@ use fonts which render them correctly.
 The font used can affect whether quotes are rendered correctly.  The
 default font in the @code{Rgui} console and internal pager is
 @code{Courier New}, which has directional quotes on all the systems we
-tried.  @code{Lucida Console} has elegant glyphs for directional quotes
-(but seems rather light unless ClearType is in use): @code{Consolas} is
-another font which we often select when ClearType is in use.
-Non-TrueType fonts such as @code{Courier} and @code{FixedSys} lack
-directional double quotes on all the systems we tried.
+tried.  @code{Lucida Console} which has elegant glyphs for directional
+quotes (but seems rather light unless ClearType is in use):
+ at code{Consolas} is another font which we often select when ClearType is
+in use.  Non-TrueType fonts such as @code{Courier} and @code{FixedSys}
+lack directional double quotes on the systems we tried.
 
 There is a related problem with using @code{Sweave} output in
 @code{Rgui}, for LaTeX needs to be told about the encoding of
@@ -787,11 +769,9 @@ Where tilde does not appear on the main keyboard, it can normally be
 accessed by pressing AltGr (the right Alt key) plus some other key.
 This is @code{]} in Canadian (multilingual), German and Scandinavian
 layouts, @code{1} in Eastern Europe, @code{[} in Portuguese, @code{4} or
- at code{5} in Spanish, @code{/} in Francophone Belgian, and so on.  For
-some keyboards the uses of AltGr are at
- at url{http://office.microsoft.com/@/en-us/@/word/@/HP052590631033.aspx}:
-you can explore those for your keyboard via the `On-Screen Keyboard'
-(under Ease of access on Windows 7).
+ at code{5} in Spanish, @code{/} in Francophone Belgian, and so on.  You
+can explore those for your keyboard via the `On-Screen Keyboard' (under
+Ease of access on Windows 7).
 
 On all Windows versions you should be able to get tilde by holding the
 down the left Alt key and typing 0126 on the numeric keypad (if you have
@@ -878,7 +858,7 @@ edit the @env{PATH}.
 The element you want to add to the path is something like
 
 @example
-c:\Program Files\R\R-3.0.0\bin\x64
+c:\Program Files\R\R-3.1.0\bin\x64
 @end example
 
 @noindent
@@ -990,7 +970,8 @@ language characters always being available, which is the case for
 so-called `Unicode' Windows applications.  However, R is primarily
 written for Unix-alikes and is not therefore `Unicode' in the Windows
 sense.)  You can find suitable locale names from
- at uref{http://msdn.microsoft.com/@/library/@/default.asp?url=/@/library/@/en-us/@/vccore98/@/html/@/_crt_language_and_country_strings.asp}:
+ at uref{https://msdn.microsoft.com/@/en-us/@/library/@/39cwe7zf%28v=vs.80%29.aspx}
+and @uref{https://msdn.microsoft.com/@/en-us/@/library/cdax410z%28v=vs.80%29.aspx}
 beware that @code{"Chinese"} is Traditional Chinese (code page 950,
 Big5) and @code{"chs"} is needed for Simplified Chinese (code page 936,
 GB2312).
@@ -1104,11 +1085,11 @@ You can install binary packages either from a repository such as
 CRAN or from a local @code{.zip} file by using @code{install.packages}:
 see its help page.  There are menu items on the @code{Packages} menu to
 provide a point-and-click interface to package installation.  The
-packages for each minor (2.x.? or 3.x.?) version will be stored in a separate area,
-so for R 3.0.? the files are in @file{bin/windows/contrib/3.0}.
+packages for each minor (3.x.?) version will be stored in a separate area,
+so for R 3.1.? the files are in @file{bin/windows/contrib/3.1}.
 
 Note that the binary versions on CRAN are unsupported: see
- at uref{http://cran.r-project.org/@/bin/@/windows/@/contrib/@/3.0/@/ReadMe},
+ at uref{https://cran.r-project.org/@/bin/@/windows/@/contrib/@/3.1/@/ReadMe},
 which also gives the locations of a few other binary packages.
 
 If there is no binary package or that is not up-to-date or you prefer
@@ -1132,7 +1113,7 @@ are because people have not done so.
 
 If you have a source package that is known to work on a Unix-alike
 system, you can try the automated Windows binary package builder
-documented at @url{http://win-builder.r-project.org}.
+documented at @url{https://win-builder.r-project.org}.
 
 @node I don't have permission to write to the @RWVER@\library directory, The packages I installed do not appear in the HTML help system, Can I install packages into libraries in this version?, Packages
 @section I don't have permission to write to the @file{@RWVER@\library} directory.
@@ -1201,12 +1182,12 @@ prepared for R 2.10.0 or later, and packages containing compiled code
 for R 2.12.0 or later.
 
 You can tell the version the package was compiled for by looking at the
- at samp{Built:} line in its @file{DESCRIPTION} file 
+ at samp{Built:} line in its @file{DESCRIPTION} file.
 
 For a small number of binary packages you need to install additional
 software and have its DLLs in your @code{PATH}.  Windows will normally
 give an informative message about a certain DLL not being found.  See
- at uref{http://cran.r-project.org/@/bin/@/windows/@/contrib/@/3.0/@/ReadMe} for a
+ at uref{https://cran.r-project.org/@/bin/@/windows/@/contrib/@/3.1/@/ReadMe} for a
 listing of some of these packages (notably @code{RGtk2},
 @code{cairoDevice}, @code{rggobi}, @code{rJava}, @code{rjags} and some
 of the packages connecting to databases).
@@ -1217,20 +1198,20 @@ of the packages connecting to databases).
 
 For package @code{tcltk} to work (try @code{demo(tkdensity)} or
 @code{demo(tkttest)} after @code{library(tcltk)}) you need to have Tcl/Tk
-installed.  This part of the R installation, so it should be there.
+installed.  This is part of the R installation, so it should be there.
 
 However, if you have the environment variable @env{MY_TCLTK} set to a
 non-empty value, it is assumed that you want to use a different Tcl/Tk
-8.5.x installation with the path to its @file{bin} directory given by
+8.6.x installation with the path to its @file{bin} directory given by
 value of @env{MY_TCLTK}, and that this is set up correctly (with
- at env{TCL_LIBRARY} set if needed).  Note that you do need 8.5.x and not
-8.4.x nor 8.6.0, and you do need the architecture to match, that is a
+ at env{TCL_LIBRARY} set if needed).  Note that you do need 8.6.x and not
+8.5.x nor 8.4.x, and you do need the architecture to match, that is a
 32-bit or 64-bit build of Tcl/Tk to match the R build in use.  (There is
 no guarantee that a 64-bit build will work: it depends on the layout it
 uses.)
 
 In the past several package authors have suggested using ActiveTcl
-(@uref{http://www.activestate.com/@/Products/@/activetcl/}) as a way to
+(@uref{https://www.activestate.com/@/Products/@/activetcl/}) as a way to
 get Tcl/Tk extensions (but the support files do contain the most
 commonly used @code{TkTable} and @code{BWidget} extensions).  This could
 be used by setting (for a default install)
@@ -1325,20 +1306,19 @@ Presumably one not available on CRAN, BioC or a similar repository.
 
 If you have a source package that is known to work on a Unix-alike
 system, you can try the automated Windows binary package builder
-documented at @url{http://win-builder.r-project.org}.  If the package is
+documented at @url{https://win-builder.r-project.org}.  If the package is
 not yours, please remember to change the maintainer address so the
 results go to you and not the author(s)!
 
-However, if a CRAN package is not available in binary form or only
-available for 32-bit R, this usually means that there is a problem
-with some dependent package or external software (often mentioned in the
- at file{@@ReadMe} file in the binary repository directory).  You can email
- at email{R-windows@@r-project.org} expressing a wish for such a package to
-be ported---the maintainers will take such wishes into account when
-prioritizing work on binary packages.
+However, if a CRAN package is not available in binary form, this usually
+means that there is a problem with some dependent package or external
+software (often mentioned in the @file{@@ReadMe} file in the binary
+repository directory).  You can email @email{R-windows@@r-project.org}
+expressing a wish for such a package to be ported---the maintainers will
+take such wishes into account when prioritizing work on binary packages.
 
 In many cases installing packages from the sources is not at all
-difficult (especially if the package contains no compiled code), so
+difficult (it is simple if the package contains no compiled code), so
 please attempt that for yourself before requesting help from the busy
 volunteers.
 
@@ -1352,16 +1332,16 @@ been built and propagated to the CRAN mirror you are using.  This
 normally (but not always) happens within 24 hours.  Sometimes mirrors
 do get behind (especially unofficial ones), so you could try another
 mirror.  (Mirror statistics are linked near the top of the CRAN mirror
-page at @uref{http://cran.r-project.org/mirrors.html}.)
+page at @uref{https://cran.r-project.org/mirrors.html}.)
 
 The latest version of the package might require a later version of R
 than the one you are using.  You can check on the package's HTML page on
 CRAN, and update your R if needed.
 
-Your R might be too old.  Binary packages for the 2.x series were built
-(if possible) whilst 2.(x+1) is current, and once 3.0.0 is released,
-binary packages for 2.14.x will be frozen.  You can always try
-installing from the sources.
+Your R might be too old.  Binary packages for the 3.x series are built
+(if possible) whilst 3.(x+1) is current, but building stops once 3.(x+2)
+reaches alpha (pre-release, about a month before release).  You can
+always try installing from the sources.
 
 @node No binary packages appear to be available for my version of R, How do I build my package for both 32- and 64-bit R?, Package xxx is out of date for Windows, Packages
 @section No binary packages appear to be available for my version of R
@@ -1397,10 +1377,10 @@ other with option @option{--merge-multiarch}, but the package source
 must be a tarball (and as before, running on a 64-bit version of Windows
 with both versions of R installed).
 
-Finally, as from R 2.15.0, a package without a @code{src/Makefile.win}
-file and no or empty or architecture-independent @code{configure.win}
-file can be installed for both architectures from 32-bit Windows if the
-64-bit components were selected when R was installed and option
+Finally, a package without a @code{src/Makefile.win} file and no or
+empty or architecture-independent @code{configure.win} file can be
+installed for both architectures from 32-bit Windows if the 64-bit
+components were selected when R was installed and option
 @option{--compile-both} is given.  Obviously, only the 32-bit
 installation can be tested.
 
@@ -1495,6 +1475,9 @@ On one of our systems, the screen height was reported as 240mm, and the
 width as 300mm in 1280 x 1024 mode and 320mm in 1280 x 960 and 1600 x 1200
 modes.  In fact it was a 21" monitor and 400mm x 300mm!
 
+This is less common with LCD screens but not unknown, particularly if
+they are not running at their native resolution.
+
 @node How do I move focus to a graphics window or the console?, What does TAB completion do?, Circles appear as ovals on screen, Windows Features
 @section How do I move focus to a graphics window or the console?
 
@@ -1545,7 +1528,7 @@ settings available use
 which also explains how the various types of completion work.
 
 This feature is very similar to the completion available in the
- at code{readline}-based command line interface on Unix-alikes: the OS X
+ at code{readline}-based command line interface on Unix-alikes: the macOS
 GUI @code{R.app} has a different completion scheme.
 
 @newchap{}
@@ -1556,7 +1539,7 @@ GUI @code{R.app} has a different completion scheme.
 @menu
 * My workspace gets saved in a strange place.  How do I stop this?::  
 * How do I store my workspace in a different place?::  
-* Can I load workspaces saved under Unix/GNU-Linux or OS X?::  
+* Can I load workspaces saved under Unix/GNU-Linux or macOS?::  
 @end menu
 
 
@@ -1566,7 +1549,7 @@ GUI @code{R.app} has a different completion scheme.
 Have you changed the working directory?: see Q6.2.
 
 
- at node How do I store my workspace in a different place?, Can I load workspaces saved under Unix/GNU-Linux or OS X?, My workspace gets saved in a strange place.  How do I stop this?, Workspaces
+ at node How do I store my workspace in a different place?, Can I load workspaces saved under Unix/GNU-Linux or macOS?, My workspace gets saved in a strange place.  How do I stop this?, Workspaces
 @section How do I store my workspace in a different place?
 
 Use the `File | Change Dir...' menu item to select a new working
@@ -1578,11 +1561,11 @@ From the command line you can change the working directory by the
 function @code{setwd}: see its help page.
 
 
- at node Can I load workspaces saved under Unix/GNU-Linux or OS X?,  , How do I store my workspace in a different place?, Workspaces
- at section Can I load workspaces saved under Unix/GNU-Linux or Mac OS X?
+ at node Can I load workspaces saved under Unix/GNU-Linux or macOS?,  , How do I store my workspace in a different place?, Workspaces
+ at section Can I load workspaces saved under Unix/GNU-Linux or Mac macOS?
 
 Yes.  All ports of R use the same format for saved workspaces, so they
-are interchangeable (for the same 2.x.? version of R, at least).
+are interchangeable (for the same 3.x.? version of R, at least).
 
 Note though that character data in a workspace will be in a particular
 encoding that is not recorded in the workspace, so workspaces containing
@@ -1590,9 +1573,8 @@ non- at acronym{ASCII} character data may not be interchangeable even on
 the same OS.  Since R marks character data when it knows it to be in
 UTF-8 or Latin-1 (including its Windows superset, CP1252), strings in
 those encodings are likely to be transferred correctly: fortunately this
-covers most of the common cases (OS X normally uses UTF-8, and Linux
-users are likely to use UTF-8 or perhaps Latin-1 (which used to be used
-for English)).
+covers most of the common cases (macOS normally uses UTF-8, and Linux
+users are likely to use UTF-8 or perhaps Latin-1).
 
 It is possible to save references to package namespaces when saving the
 workspace: if that happens the package will need to be installed on the
@@ -1680,7 +1662,7 @@ less successful when tried for the common current chips such as Intel's
 Core 2.
 
 Versions of Dr Kazushige Goto's BLAS (see
- at uref{http://en.wikipedia.org/wiki/Kazushige_Goto}) for 64-bit Windows
+ at uref{https://en.wikipedia.org/wiki/Kazushige_Goto}) for 64-bit Windows
 by Ei-Ji Nakama can be found at
 @uref{http://prs.ism.ac.jp/~nakama/SurviveGotoBLAS2/binary/windows/x64/}.
 Just download the file @file{Rblas.dll} appropriate to your CPU and
@@ -1794,13 +1776,6 @@ program under a debugger and sending it a signal to interrupt it and
 drop control back to the debugger does not work with a MinGW version of
 @command{gdb}.  It does often work with the @code{cygwin} version.
 
- at item
-Other debuggers than @command{gdb} can be used.  We have successfully
-used the @command{insight} front-end to @command{gdb} (see
- at uref{http://sources.redhat.com/@/insight/}: there is a MinGW port on
-their site), and Borland's debugger with a DLL compiled in a Borland
-compiler.
-
 @end itemize
 
 See
@@ -1834,13 +1809,6 @@ link /dll /out:X.dll /export:X_main X.obj X_main.obj
 @end example
 
 @noindent
-or (Borland C++, which also requires extension @code{.cpp})
-
- at example
-bcc32 -u- -WDE X.cpp X_main.cpp
- at end example
-
- at noindent
 and call the entry point(s) in @code{X_R}, such as @code{X_main}.
 Construction of static variables will occur when the DLL is loaded, and
 destruction when the DLL is unloaded, usually when R terminates.
@@ -1848,10 +1816,6 @@ destruction when the DLL is unloaded, usually when R terminates.
 Note that you will not see the messages from this example in the GUI
 console: see the next section.
 
-This example used to be in package @file{cxx_0.0-x.tar.gz} in the
- at file{src/contrib/Devel} section on CRAN, and could be compiled as a
-package in the usual way on Windows.
-
 
 @node  The output from my C code disappears., The output from my Fortran code disappears., How do I include C++ code?, Building from Source
 @section  The output from my C code disappears.  Why?
@@ -1889,7 +1853,7 @@ call @code{R_ProcessEvents()} periodically from your compiled code.
 If you want output to be updated on the console, call
 @code{R_FlushConsole()} and then @code{R_ProcessEvents()}.
 
- at set LASTEDIT 2012-12-12
+ at set LASTEDIT 2015-08-13    
 @ifhtml
 @html
 <hr WIDTH="100%">
diff --git a/etc/Makeconf.in b/etc/Makeconf.in
index d68acaf..e7d9fbd 100644
--- a/etc/Makeconf.in
+++ b/etc/Makeconf.in
@@ -10,22 +10,32 @@
 include $(R_SHARE_DIR)/make/vars.mk
 
 AR = @AR@
-## Used by packages 'maps' and 'mapdata'
-AWK = @AWK@
 BLAS_LIBS = @BLAS_LIBS@
 C_VISIBILITY = @C_VISIBILITY@
 CC = @CC@
 CFLAGS = @CFLAGS@ $(LTO)
 CPICFLAGS = @CPICFLAGS@
 CPPFLAGS = @CPPFLAGS@
-CXX = @CXX@
+CXX = @CXX@ @CXXSTD@
 CXXCPP = @CXXCPP0@
 CXXFLAGS = @CXXFLAGS@ $(LTO)
 CXXPICFLAGS = @CXXPICFLAGS@
-CXX1X = @CXX1X@
-CXX1XFLAGS = @CXX1XFLAGS@
-CXX1XPICFLAGS = @CXX1XPICFLAGS@
-CXX1XSTD = @CXX1XSTD@
+CXX98 = @CXX98@
+CXX98FLAGS = @CXX98FLAGS@
+CXX98PICFLAGS = @CXX98PICFLAGS@
+CXX98STD = @CXX98STD@
+CXX11 = @CXX11@
+CXX11FLAGS = @CXX11FLAGS@
+CXX11PICFLAGS = @CXX11PICFLAGS@
+CXX11STD = @CXX11STD@
+CXX14 = @CXX14@
+CXX14FLAGS = @CXX14FLAGS@
+CXX14PICFLAGS = @CXX14PICFLAGS@
+CXX14STD = @CXX14STD@
+CXX17 = @CXX17@
+CXX17FLAGS = @CXX17FLAGS@
+CXX17PICFLAGS = @CXX17PICFLAGS@
+CXX17STD = @CXX17STD@
 DYLIB_EXT = @DYLIB_EXT@
 DYLIB_LD = @DYLIB_LD@
 DYLIB_LDFLAGS = @DYLIB_LDFLAGS@@BUILD_LTO_TRUE@ $(CFLAGS) $(CPICFLAGS)
@@ -37,7 +47,7 @@ ECHO_T = @ECHO_T@
 ## NB, set FC before F77 as on Solaris make, setting FC sets F77
 FC = @FC@
 FCFLAGS = @FCFLAGS@ $(LTO)
-## additional libs needed when linking with $(FC), e.g. on Solaris
+## additional libs needed when linking with $(FC), e.g. on some Oracle compilers
 FCLIBS = @FCLIBS@
 F77 = @F77@
 F77_VISIBILITY = @F77_VISIBILITY@
@@ -88,8 +98,14 @@ SHLIB_CFLAGS = @SHLIB_CFLAGS@
 SHLIB_CXXFLAGS = @SHLIB_CXXFLAGS@
 SHLIB_CXXLD = @SHLIB_CXXLD@
 SHLIB_CXXLDFLAGS = @SHLIB_CXXLDFLAGS@
-SHLIB_CXX1XLD = @SHLIB_CXX1XLD@
-SHLIB_CXX1XLDFLAGS = @SHLIB_CXX1XLDFLAGS@
+SHLIB_CXX98LD = @SHLIB_CXX98LD@
+SHLIB_CXX98LDFLAGS = @SHLIB_CXX98LDFLAGS@
+SHLIB_CXX11LD = @SHLIB_CXX11LD@
+SHLIB_CXX11LDFLAGS = @SHLIB_CXX11LDFLAGS@
+SHLIB_CXX14LD = @SHLIB_CXX14LD@
+SHLIB_CXX14LDFLAGS = @SHLIB_CXX14LDFLAGS@
+SHLIB_CXX17LD = @SHLIB_CXX17LD@
+SHLIB_CXX17LDFLAGS = @SHLIB_CXX17LDFLAGS@
 SHLIB_EXT = @SHLIB_EXT@
 SHLIB_FCLD = @SHLIB_FCLD@
 SHLIB_FCLDFLAGS = @SHLIB_FCLDFLAGS@
@@ -108,6 +124,16 @@ STRIP_LIBS = @striplib@
 STRIP_STATIC_LIBS = @stripstaticlib@
 TCLTK_CPPFLAGS = @TCLTK_CPPFLAGS@
 TCLTK_LIBS = @TCLTK_LIBS@
+YACC = @YACC@
+
+## legacy
+CXX1X = @CXX11@
+CXX1XFLAGS = @CXX11FLAGS@
+CXX1XPICFLAGS = @CXX11PICFLAGS@
+CXX1XSTD = @CXX11STD@
+SHLIB_CXX1XLD = @SHLIB_CXX11LD@
+SHLIB_CXX1XLDFLAGS = @SHLIB_CXX11LDFLAGS@
+
 
 ## for linking to libR.a
 STATIC_LIBR = @WANT_R_STATIC_TRUE@ @STATICR1@ "$(R_HOME)/lib$(R_ARCH)/libR.a" @STATICR2@ $(BLAS_LIBS) $(FLIBS) @R_XTRA_LIBS@ $(LIBINTL) @READLINE_LIBS@ $(LIBS)
@@ -118,7 +144,7 @@ R_XTRA_CXXFLAGS = @R_XTRA_CXXFLAGS@
 R_XTRA_FFLAGS = @R_XTRA_FFLAGS@
 
 ALL_CFLAGS = $(R_XTRA_CFLAGS) $(PKG_CFLAGS) $(CPICFLAGS) $(SHLIB_CFLAGS) $(CFLAGS)
-ALL_CPPFLAGS = $(R_XTRA_CPPFLAGS) $(PKG_CPPFLAGS) $(CPPFLAGS) $(CLINK_CPPFLAGS)
+ALL_CPPFLAGS = $(R_XTRA_CPPFLAGS) $(PKG_CPPFLAGS) $(CLINK_CPPFLAGS) $(CPPFLAGS)
 ALL_CXXFLAGS = $(R_XTRA_CXXFLAGS) $(PKG_CXXFLAGS) $(CXXPICFLAGS) $(SHLIB_CXXFLAGS) $(CXXFLAGS)
 ALL_OBJCFLAGS = $(PKG_OBJCFLAGS) $(CPICFLAGS) $(SHLIB_CFLAGS) $(OBJCFLAGS)
 ALL_OBJCXXFLAGS = $(PKG_OBJCXXFLAGS) $(CXXPICFLAGS) $(SHLIB_CXXFLAGS) $(OBJCXXFLAGS)
diff --git a/etc/ldpaths.in b/etc/ldpaths.in
index 5eb140b..314d364 100644
--- a/etc/ldpaths.in
+++ b/etc/ldpaths.in
@@ -8,7 +8,11 @@ fi
 if test -n "${R_JAVA_LD_LIBRARY_PATH}"; then
   R_LD_LIBRARY_PATH="${R_LD_LIBRARY_PATH}:${R_JAVA_LD_LIBRARY_PATH}"
 fi
-## This is DYLD_FALLBACK_LIBRARY_PATH on Darwin (OS X) and LD_LIBRARY_PATH elsewhere
+## This is DYLD_FALLBACK_LIBRARY_PATH on Darwin (macOS) and
+## LD_LIBRARY_PATH elsewhere.
+## However, on macOS >=10.11 (if SIP is enabled, the default), the
+## environment value will not be passed to a script such as R.sh, so
+## would not seen here.
 if test -z "${@Rshlibpath_var@}"; then
   @Rshlibpath_var@="${R_LD_LIBRARY_PATH}"
 else
diff --git a/etc/repositories b/etc/repositories
index ca7e669..49b1dc5 100644
--- a/etc/repositories
+++ b/etc/repositories
@@ -14,7 +14,7 @@ BioCsoft	"BioC software"	%bm/packages/%v/bioc	FALSE	TRUE	TRUE	TRUE
 BioCann	"BioC annotation"	%bm/packages/%v/data/annotation	FALSE	TRUE	TRUE	TRUE
 BioCexp	"BioC experiment"	%bm/packages/%v/data/experiment	FALSE	TRUE	TRUE	TRUE
 BioCextra	"BioC extra"	%bm/packages/%v/extra	FALSE	TRUE	TRUE	TRUE
-CRANextra	CRAN (extras)	"http://www.stats.ox.ac.uk/pub/RWin"	FALSE	TRUE	TRUE	TRUE
-Omegahat	Omegahat	http://www.omegahat.org/R	FALSE	TRUE	TRUE	FALSE
-R-Forge	R-Forge	http://R-Forge.R-project.org	FALSE	TRUE	TRUE	TRUE
-rforge.net	rforge.net	http://www.rforge.net	FALSE	TRUE	TRUE	TRUE
+CRANextra	CRAN (extras)	https://www.stats.ox.ac.uk/pub/RWin	FALSE	TRUE	TRUE	TRUE
+Omegahat	Omegahat	http://www.omegahat.net/R	FALSE	TRUE	FALSE	FALSE
+R-Forge	R-Forge	https://R-Forge.R-project.org	FALSE	TRUE	TRUE	TRUE
+rforge.net	rforge.net	https://www.rforge.net	FALSE	TRUE	TRUE	TRUE
diff --git a/m4/Makefile.in b/m4/Makefile.in
index 003fae0..5d48554 100644
--- a/m4/Makefile.in
+++ b/m4/Makefile.in
@@ -20,6 +20,7 @@ DISTFILES = Makefile.in README \
 	cxx_11.m4 \
 	gettext.m4 gettext-lib.m4 \
 	libtool.m4 ltoptions.m4 ltsugar.m4 ltversion.m4 lt~obsolete.m4 \
+	openmp.m4 \
 	stat-time.m4
 
 all: Makefile R
diff --git a/m4/R.m4 b/m4/R.m4
index f4068fc..46b120e 100644
--- a/m4/R.m4
+++ b/m4/R.m4
@@ -1,6 +1,6 @@
 ### R.m4 -- extra macros for configuring R		-*- Autoconf -*-
 ###
-### Copyright (C) 1998-2014 R Core Team
+### Copyright (C) 1998-2017 R Core Team
 ###
 ### This file is part of R.
 ###
@@ -16,7 +16,7 @@
 ###
 ### You should have received a copy of the GNU General Public License
 ### along with R; if not, a copy is available at
-### http://www.r-project.org/Licenses/
+### https://www.r-project.org/Licenses/
 
 ### * General support macros
 
@@ -183,7 +183,7 @@ AC_SUBST(R_RD4PDF)
 ## R_PROG_MAKEINFO
 ## ---------------
 AC_DEFUN([R_PROG_MAKEINFO],
-[AC_PATH_PROGS(MAKEINFO, [${MAKEINFO} makeinfo])
+[AC_PATH_PROGS(MAKEINFO, [${MAKEINFO} texi2any])
 if test -n "${MAKEINFO}"; then
   _R_PROG_MAKEINFO_VERSION
   AC_PATH_PROGS(INSTALL_INFO,
@@ -196,7 +196,7 @@ if test -n "${MAKEINFO}"; then
   fi
   AC_SUBST(INSTALL_INFO)
 fi
-if test "${r_cv_prog_makeinfo_v4}" != yes; then
+if test "${r_cv_prog_texi2any_v5}" != yes; then
   warn_info="you cannot build info or HTML versions of the R manuals"
   AC_MSG_WARN([${warn_info}])
   MAKEINFO=""
@@ -207,29 +207,29 @@ fi
 
 ## _R_PROG_MAKEINFO_VERSION
 ## ------------------------
-## Building the R Texinfo manuals requires Makeinfo v4.7 or better.
-## Set shell variable r_cv_prog_makeinfo_v4 to 'yes' if a recent
+## Building the R Texinfo manuals requires texinfo v5.1 or later.
+## Set shell variable r_cv_prog_texi2any_v5 to 'yes' if a recent
 ## enough Makeinfo is found, and to 'no' otherwise.
 ## If you change the minimum version here, also change it in
 ## doc/manual/Makefile.in and doc/manual/R-admin.texi.
 AC_DEFUN([_R_PROG_MAKEINFO_VERSION],
-[AC_CACHE_CHECK([whether makeinfo version is at least 4.7],
-                [r_cv_prog_makeinfo_v4],
-[makeinfo_version=`${MAKEINFO} --version | \
-  grep "^makeinfo" | sed 's/[[^)]]*) \(.*\)/\1/'`
-makeinfo_version_maj=`echo ${makeinfo_version} | cut -f1 -d.`
-makeinfo_version_min=`echo ${makeinfo_version} | \
+[AC_CACHE_CHECK([whether texi2any version is at least 5.1],
+                [r_cv_prog_texi2any_v5],
+[texi2any_version=`${MAKEINFO} --version | \
+  grep -E '^(makeinfo|texi2any)' | sed 's/[[^)]]*) \(.*\)/\1/'`
+texi2any_version_maj=`echo ${texi2any_version} | cut -f1 -d.`
+texi2any_version_min=`echo ${texi2any_version} | \
   cut -f2 -d. | tr -dc '0123456789.' `
-if test -z "${makeinfo_version_maj}" \
-     || test -z "${makeinfo_version_min}"; then
-  r_cv_prog_makeinfo_v4=no
-elif test ${makeinfo_version_maj} -ge 5; then
-  r_cv_prog_makeinfo_v4=yes
-elif test ${makeinfo_version_maj} -lt 4 \
-     || test ${makeinfo_version_min} -lt 7; then
-  r_cv_prog_makeinfo_v4=no
+if test -z "${texi2any_version_maj}" \
+     || test -z "${texi2any_version_min}"; then
+  r_cv_prog_texi2any_v5=no
+elif test ${texi2any_version_maj} -gt 5; then
+  r_cv_prog_texi2any_v5=yes
+elif test ${texi2any_version_maj} -lt 5 \
+     || test ${texi2any_version_min} -lt 1; then
+  r_cv_prog_texi2any_v5=no
 else
-  r_cv_prog_makeinfo_v4=yes
+  r_cv_prog_texi2any_v5=yes
 fi])
 ])# _R_PROG_MAKEINFO_VERSION
 
@@ -538,6 +538,32 @@ esac
 
 ### * C++ compiler and its characteristics.
 
+## R_PROG_CXX
+## ----------
+## Check whether the C++ compiler can compile code
+AC_DEFUN([R_PROG_CXX],
+[AC_CACHE_CHECK([whether ${CXX} ${CXXFLAGS} can compile C++ code],
+[r_cv_prog_cxx],
+[AC_LANG_PUSH([C++])dnl
+r_save_CXX="${CXX}"
+CXX="${CXX} ${CXXSTD}"
+AC_COMPILE_IFELSE([AC_LANG_SOURCE(
+[#ifndef __cplusplus
+# error "not a C++ compiler"
+#endif
+#include <cmath>
+])],
+          [r_cv_prog_cxx=yes], [r_cv_prog_cxx=no])
+CXX="${r_save_CXX}"	  
+AC_LANG_POP([C++])dnl
+])
+if test "${r_cv_prog_cxx}" = no; then
+  CXX=
+  CXXFLAGS=
+  CXXSTD=
+fi
+])# R_PROG_CXX
+
 ## R_PROG_CXX_M
 ## ------------
 ## Check whether the C++ compiler accepts '-M' for generating
@@ -1439,36 +1465,6 @@ AC_SUBST(OBJCXX)
 
 ### * Library functions
 
-## R_FUNC___SETFPUCW
-## -----------------
-AC_DEFUN([R_FUNC___SETFPUCW],
-[AC_CHECK_FUNC(__setfpucw,
-[AC_CACHE_CHECK([whether __setfpucw is needed],
-	        [r_cv_func___setfpucw_needed],
-[AC_RUN_IFELSE([AC_LANG_SOURCE([[
-int main () {
-#include <fpu_control.h>
-#include <stdlib.h>
-#if defined(_FPU_DEFAULT) && defined(_FPU_IEEE)
-  exit(_FPU_DEFAULT != _FPU_IEEE);
-#endif
-  exit(0);
-}
-]])],
-              [r_cv_func___setfpucw_needed=no],
-              [r_cv_func___setfpucw_needed=yes],
-              [r_cv_func___setfpucw_needed=no])])
-if test "x${r_cv_func___setfpucw_needed}" = xyes; then
-  AC_DEFINE(NEED___SETFPUCW, 1,
-	    [Define if your system needs __setfpucw() to control
-             FPU rounding.
-             This was used to control floating point precision,
-             rounding and floating point exceptions on older Linux
-             systems.
-             As of GLIBC 2.1 this function is not used anymore.])
-fi])
-])# R_FUNC___SETFPUCW
-
 ## R_FUNC_CALLOC
 ## -------------
 AC_DEFUN([R_FUNC_CALLOC],
@@ -1693,13 +1689,13 @@ AC_DEFINE_UNQUOTED(R_SOCKLEN_T, ${r_cv_type_socklen},
 AC_DEFUN([R_TYPE_KEYSYM],
 [AC_REQUIRE([R_X11])
 if test "${use_X11}" = yes; then
-  r_save_CFLAGS="${CFLAGS}"
-  CFLAGS="${CFLAGS} ${X_CFLAGS}"
+  r_save_CPPFLAGS="${CPPFLAGS}"
+  CPPFLAGS="${CPPFLAGS} ${X_CFLAGS}"
   AC_CHECK_TYPE([KeySym],
                 r_cv_type_keysym=yes,
                 r_cv_type_keysym=no,
 		[#include <X11/X.h>])
-  CFLAGS="${r_save_CFLAGS}"
+  CPPFLAGS="${r_save_CPPFLAGS}"
   if test "${r_cv_type_keysym}" = yes; then
     AC_DEFINE(HAVE_KEYSYM, 1,
               [Define if you have KeySym defined in X11.])
@@ -1716,10 +1712,10 @@ AC_DEFUN([R_X11],
 use_X11="no"
 if test -z "${no_x}"; then
   ## now we look for Xt and its header: it seems Intrinsic.h is key.
-  r_save_CFLAGS="${CFLAGS}"
-  CFLAGS="${CFLAGS} ${X_CFLAGS}"
+  r_save_CPPFLAGS="${CPPFLAGS}"
+  CPPFLAGS="${CPPFLAGS} ${X_CFLAGS}"
   AC_CHECK_HEADER(X11/Intrinsic.h)
-  CFLAGS="${r_save_CFLAGS}"
+  CPPFLAGS="${r_save_CPPFLAGS}"
   if test "${ac_cv_header_X11_Intrinsic_h}" = yes ; then
     AC_CHECK_LIB(Xt, XtToolkitInitialize, [have_Xt=yes], [have_Xt=no],
                  [${X_LIBS} -lX11])
@@ -1747,10 +1743,10 @@ fi
 ## test for -lXmu and for X11/Xmu/Xatom.h header (for XA_CLIPBOARD).
 AC_DEFUN([R_X11_Xmu],
 [if test "${use_X11}" = yes; then
-  r_save_CFLAGS="${CFLAGS}"
-  CFLAGS="${CFLAGS} ${X_CFLAGS}"
+  r_save_CPPFLAGS="${CPPFLAGS}"
+  CPPFLAGS="${CPPFLAGS} ${X_CFLAGS}"
   AC_CHECK_HEADER(X11/Xmu/Atoms.h)
-  CFLAGS="${r_save_CFLAGS}"
+  CPPFLAGS="${r_save_CPPFLAGS}"
   if test "${ac_cv_header_X11_Xmu_Atoms_h}" = yes ; then
     AC_CHECK_LIB(Xmu, XmuInternAtom, [use_Xmu=yes], [use_Xmu=no], ${X_LIBS})
     if test "${use_Xmu}" = yes; then
@@ -1968,36 +1964,29 @@ AC_DEFUN([R_BSD_NETWORKING],
 [AC_CACHE_CHECK([for BSD networking],
                 [r_cv_bsd_networking],
 [if test "${ac_cv_header_netdb_h}" = yes \
+dnl needed for Rhttpd.c but missed before R 3.2.4
+     && test "${ac_cv_header_arpa_inet_h}" = yes \
      && test "${ac_cv_header_netinet_in_h}" = yes \
      && test "${ac_cv_header_sys_socket_h}" = yes \
      && test "${ac_cv_search_connect}" != no \
      && test "${ac_cv_search_gethostbyname}" !=  no; then
   r_cv_bsd_networking=yes
 else
-  r_cv_bsd_networking=no
+  AC_MSG_ERROR([BSD networking functions are required])
 fi])
-if test "${r_cv_bsd_networking}" = yes; then
-  AC_DEFINE(HAVE_BSD_NETWORKING, 1,
-            [Define if you have BSD networking headers and libraries.])
-  AC_DEFINE(HAVE_SOCKETS, 1,
-            [Define if you have support for sockets.])
-  AC_DEFINE(HAVE_INTERNET, 1,
-            [Define if you have support for ftp/http access.])
-  AC_DEFINE(SUPPORT_LIBXML, 1,
-            [Define if you provide support for the libxml ftp/http
-	     functions.])
-fi
 ])# R_BSD_NETWORKING
 
 ## R_BITMAPS
 ## ---------
+## This is the version used without png-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.
 ## The png code will do a run-time check of the consistency of libpng
 ## versions.
 AC_DEFUN([R_BITMAPS],
-[BITMAP_LIBS=
+[BITMAP_CPPFLAGS=
+BITMAP_LIBS=
 if test "${use_jpeglib}" = yes; then
   _R_HEADER_JPEGLIB
   have_jpeg=${r_cv_header_jpeglib_h}
@@ -2052,9 +2041,104 @@ if test "${use_libtiff}" = yes; then
     fi
   fi
 fi
+AC_SUBST(BITMAP_CPPFLAGS)
 AC_SUBST(BITMAP_LIBS)
 ])# R_BITMAPS
 
+## R_BITMAPS2
+## ---------
+## This is the version used with png-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`
+    CPPFLAGS="${CPPFLAGS} ${JPG_CPPFLAGS}"
+  fi
+  _R_HEADER_JPEGLIB
+  CPPFLAGS=${save_CPPFLAGS}
+  have_jpeg=${r_cv_header_jpeglib_h}
+  if test "${have_jpeg}" = yes; then
+    AC_CHECK_LIB(jpeg, jpeg_destroy_compress,
+		 [have_jpeg=yes], [have_jpeg=no], [${JPG_LIBS} ${LIBS}])
+  fi
+  if test "${have_jpeg}" = yes; then
+    if test -n "${JPG_LIBS}"; then
+      BITMAP_LIBS="${JPG_LIBS}"
+    else
+      BITMAP_LIBS=-ljpeg
+    fi
+    AC_DEFINE(HAVE_JPEG, 1,
+	      [Define if you have the JPEG headers and libraries.])
+  fi
+fi
+if test "${use_libpng}" = yes; then
+  if "${PKGCONF}" --exists libpng; then
+    save_CPPFLAGS=${CPPFLAGS}
+    PNG_CPPFLAGS=`"${PKGCONF}" --cflags libpng`
+    CPPFLAGS="${CPPFLAGS} ${PNG_CPPFLAGS}"
+    _R_HEADER_PNG
+    have_png=${r_cv_header_png_h}
+    CPPFLAGS=${save_CPPFLAGS}
+    if test "${have_png}" = yes; then
+      PNG_LIBS=`"${PKGCONF}" --libs libpng`
+      AC_CHECK_LIB(png, png_create_write_struct, 
+                   [have_png=yes], [have_png=no], [${PNG_LIBS} ${LIBS}])
+      if test "${have_png}" = no; then
+        PNG_LIBS=`"${PKGCONF}" --static --libs libpng`
+        AC_CHECK_LIB(png, png_create_write_struct, 
+                     [have_png=yes], [have_png=no], [${PNG_LIBS} ${LIBS}])
+      fi
+    fi
+    if test "${have_png}" = yes; then
+      BITMAP_CPPFLAGS="${BITMAP_CPPFLAGS} ${PNG_CPPFLAGS}"
+      BITMAP_LIBS="${BITMAP_LIBS} ${PNG_LIBS}"
+      AC_DEFINE(HAVE_PNG, 1,
+	        [Define if you have the PNG headers and libraries.])
+    fi
+  fi
+fi
+if test "${use_libtiff}" = yes; then
+  mod=
+  ## pkg-config support was introduced in libtiff 4.0.0
+  ## I guess the module name might change in future, so
+  ## program defensively here.
+  if "${PKGCONF}" --exists libtiff-4; then
+    mod=libtiff-4
+  fi  
+  if test -n "${mod}"; then
+    save_CPPFLAGS=${CPPFLAGS}
+    TIF_CPPFLAGS=`"${PKGCONF}" --cflags ${mod}`
+    CPPFLAGS="${CPPFLAGS} ${TIF_CPPFLAGS}"
+    AC_CHECK_HEADERS(tiffio.h)
+    CPPFLAGS=${save_CPPFLAGS}
+    if test "x${ac_cv_header_tiffio_h}" = xyes ; then
+      TIF_LIBS=`"${PKGCONF}" --libs ${mod}`
+      AC_CHECK_LIB(tiff, TIFFOpen, [have_tiff=yes], [have_tiff=no],
+                   [${TIF_LIBS} ${BITMAP_LIBS}])
+      if test "x${have_tiff}" = xno; then
+        TIF_LIBS=`"${PKGCONF}" --static --libs ${mod}`
+        AC_CHECK_LIB(tiff, TIFFOpen, [have_tiff=yes], [have_tiff=no],
+                     [${TIF_LIBS} ${BITMAP_LIBS}])
+      fi
+      if test "x${have_tiff}" = xyes; then
+        AC_DEFINE(HAVE_TIFF, 1, [Define this if libtiff is available.])
+        BITMAP_LIBS="${TIF_LIBS} ${BITMAP_LIBS}"
+        BITMAP_CPPFLAGS="${BITMAP_CPPFLAGS} ${TIF_CPPFLAGS}"
+      fi
+    fi
+  fi
+fi
+AC_SUBST(BITMAP_CPPFLAGS)
+AC_SUBST(BITMAP_LIBS)
+])# R_BITMAPS2
+
+
 ## _R_HEADER_JPEGLIB
 ## -----------------
 ## Set shell variable r_cv_header_jpeglib_h to 'yes' if a recent enough
@@ -2303,6 +2387,7 @@ if test -z "${TCLTK_CPPFLAGS}"; then
   if test "${have_tcltk}" = yes; then
     ## Part 2.  Check for tk.h.
     found_tk_h=no
+    found_tk_by_config=no
     if test -n "${TK_CONFIG}"; then
       . ${TK_CONFIG}
       ## TK_INCLUDE_SPEC (if set) is what we want.
@@ -2312,6 +2397,7 @@ if test -z "${TCLTK_CPPFLAGS}"; then
 	AC_CHECK_HEADER([tk.h],
 		        [TCLTK_CPPFLAGS="${TCLTK_CPPFLAGS} ${TK_INCLUDE_SPEC}"
 			 found_tk_h=yes])
+	found_tk_by_config=yes
 	CPPFLAGS="${r_save_CPPFLAGS}"
       fi
       if test "${found_tk_h}" = no; then
@@ -2353,8 +2439,12 @@ if test -z "${TCLTK_CPPFLAGS}"; then
     fi
   fi
 fi
+## TK_XINCLUDES should be empty for Aqua Tk, so earlier test was wrong
+## Our code does not include any X headers, but tk.h may ....
+## That is true even on macOS, but Aqua Tk has a private version of
+## X11 headers, and we want that one and not the XQuartz one.
 if test "${have_tcltk}" = yes; then
-  if test -n "${TK_XINCLUDES}"; then
+  if test "${found_tk_by_config}" = yes; then
     TCLTK_CPPFLAGS="${TCLTK_CPPFLAGS} ${TK_XINCLUDES}"
   else
     TCLTK_CPPFLAGS="${TCLTK_CPPFLAGS} ${X_CFLAGS}"
@@ -2366,8 +2456,7 @@ fi
 ## -------------
 ## Find the tcl and tk libraries.
 AC_DEFUN([_R_TCLTK_LIBS],
-[AC_REQUIRE([AC_PATH_XTRA])
-AC_REQUIRE([_R_TCLTK_CONFIG])
+[AC_REQUIRE([_R_TCLTK_CONFIG])
 if test -z "${TCLTK_LIBS}"; then
   ## We have to do the work.
   if test "${have_tcltk}" = yes; then
@@ -2498,7 +2587,7 @@ AC_SUBST(use_tcltk)
 ##
 ## This is based on ACX_BLAS by Steven G. Johnson <stevenj at alum.mit.edu>
 ## from the Official Autoconf Macro Archive
-## (http://www.gnu.org/software/ac-archive/htmldoc/acx_blas.m4),
+## (https://www.gnu.org/software/ac-archive/htmldoc/acx_blas.m4),
 ## with the following changes:
 ## * We also handle HPUX .sl command line specifications.
 ## * We explictly deal with the case of f2c.  Most likely pointless.
@@ -2641,7 +2730,7 @@ if test "${acx_blas_ok}" = no; then
 fi
 
 ## Now check if zdotu works (fails on AMD64 with the wrong compiler;
-## also fails on OS X with Accelerate/vecLib and gfortran; 
+## also fails on macOS with Accelerate/vecLib and gfortran; 
 ## but in that case we have a work-around using USE_VECLIB_G95FIX)
 
 if test "${acx_blas_ok}" = yes; then
@@ -2713,18 +2802,18 @@ fi
   if test -n "${r_cv_zdotu_is_usable}"; then
     AC_MSG_RESULT([yes])
   else
-    ## NB: this lot is not cached
-    if test "${r_cv_check_fw_accelerate}" != "no"; then
-      AC_MSG_RESULT([yes])
-      ## for vecLib we have a work-around by using cblas_..._sub
-      use_veclib_g95fix=yes
-      ## The fix may not work with internal lapack, but
-      ## is more likely to in R >= 2.15.2.
-    else
-      AC_MSG_RESULT([no])
-      BLAS_LIBS=
-      acx_blas_ok="no"
-    fi
+    case "${BLAS_LIBS}" in
+      *Accelerate* | *vecLib*)
+        ## for vecLib we have a work-around by using cblas_..._sub
+        AC_MSG_RESULT([yes])
+        use_veclib_g95fix=yes
+        ;;
+      *)  
+        AC_MSG_RESULT([no])
+        BLAS_LIBS=
+        acx_blas_ok="no"
+        ;;
+    esac
   fi
 fi
 if test "${acx_blas_ok}" = yes; then
@@ -2864,7 +2953,7 @@ AC_SUBST(BLAS_LIBS)
 ##
 ## This is roughly based on ACX_LAPACK by Steven G. Johnson
 ## <stevenj at alum.mit.edu> from the Official Autoconf Macro Archive
-## (http://www.gnu.org/software/ac-archive/htmldoc/acx_lapack.m4),
+## (https://www.gnu.org/software/ac-archive/htmldoc/acx_lapack.m4),
 ## with the following changes:
 ## * We also handle HPUX .sl command line specifications.
 ## * We explictly deal with the case of f2c.  Most likely pointless.
@@ -2988,27 +3077,22 @@ AC_SUBST(TIRPC_CPPFLAGS)
 ## Try finding zlib library and headers.
 ## We check that both are installed, and that the header >= 1.2.3
 AC_DEFUN([R_ZLIB],
-[if test "x${use_system_zlib}" = xyes; then
-  AC_CHECK_LIB(z, inflateInit2_, [have_zlib=yes], [have_zlib=no])
-  if test "${have_zlib}" = yes; then
-    AC_CHECK_HEADER(zlib.h, [have_zlib=yes], [have_zlib=no])
-  fi
-  if test "${have_zlib}" = yes; then
-    _R_HEADER_ZLIB
-    have_zlib=${r_cv_header_zlib_h}
-  fi
-else
-  have_zlib="no"
+[AC_CHECK_LIB(z, inflateInit2_, [have_zlib=yes], [have_zlib=no])
+if test "${have_zlib}" = yes; then
+  AC_CHECK_HEADER(zlib.h, [have_zlib=yes], [have_zlib=no])
 fi
-AC_MSG_CHECKING([whether zlib support needs to be compiled])
 if test "${have_zlib}" = yes; then
-  AC_MSG_RESULT([no])
-  LIBS="-lz ${LIBS}"
+  _R_HEADER_ZLIB
+  have_zlib=${r_cv_header_zlib_h}
+fi
+AC_MSG_CHECKING([whether zlib support suffices])
+if test "${have_zlib}" != yes; then
+  AC_MSG_ERROR([zlib library and headers are required])
 else
+  LIBS="-lz ${LIBS}"
   AC_MSG_RESULT([yes])
   _R_ZLIB_MMAP
 fi
-AM_CONDITIONAL(BUILD_ZLIB, [test "x${have_zlib}" = xno])
 AM_CONDITIONAL(USE_MMAP_ZLIB,
 [test "x${have_zlib}" = xno && test "x${r_cv_zlib_mmap}" = xyes])
 ])# R_ZLIB
@@ -3025,10 +3109,11 @@ AC_DEFUN([_R_HEADER_ZLIB],
 #include <string.h>
 #include <zlib.h>
 int main() {
-#ifdef ZLIB_VERSION
-/* Work around Debian bug: it uses 1.2.3.4 even though there was no such
-   version on the master site zlib.net */
-  exit(strncmp(ZLIB_VERSION, "1.2.5", 5) < 0);
+#ifdef ZLIB_VERNUM
+  if (ZLIB_VERNUM < 0x1250) {
+    exit(1);
+  }
+  exit(0);
 #else
   exit(1);
 #endif
@@ -3058,27 +3143,27 @@ caddr_t hello() {
               [r_cv_zlib_mmap=yes])])
 ])# _R_ZLIB_MMAP
 
+## Notes on PCRE2 support (in the future).
+## The header is pcre2.h, and the 8-bit lib is libpcre2-8.
+## There is a pcre2-config script, and a pkgconfig file.
 ## R_PCRE
 ## ------
 ## If selected, try finding system pcre library and headers.
 ## RedHat put the headers in /usr/include/pcre.
-## R (2.15.3, 3.0.0) includes 8.32: there are problems < 8.10 and
-## distros are often slow to update.
+## There are known problems < 8.10, and important bug fixes in 8.32
 AC_DEFUN([R_PCRE],
-[if test "x${use_system_pcre}" = xyes; then
-  AC_CHECK_LIB(pcre, pcre_fullinfo, [have_pcre=yes], [have_pcre=no])
-  if test "${have_pcre}" = yes; then
-    AC_CHECK_HEADERS(pcre.h pcre/pcre.h)
-    if test "${ac_cv_header_pcre_h}" = no \
-	&& test "${ac_cv_header_pcre_pcre_h}" = no; then
-      have_pcre=no
-    fi
+[AC_CHECK_LIB(pcre, pcre_fullinfo, [have_pcre=yes], [have_pcre=no])
+if test "${have_pcre}" = yes; then
+  AC_CHECK_HEADERS(pcre.h pcre/pcre.h)
+  if test "${ac_cv_header_pcre_h}" = no \
+    && test "${ac_cv_header_pcre_pcre_h}" = no; then
+    have_pcre=no
   fi
-else
-  have_pcre=no
 fi
 if test "x${have_pcre}" = xyes; then
-AC_CACHE_CHECK([if PCRE version >= 8.10], [r_cv_have_pcre810],
+r_save_LIBS="${LIBS}"
+LIBS="-lpcre ${LIBS}"
+AC_CACHE_CHECK([if PCRE version >= 8.10, < 10.0 and has UTF-8 support], [r_cv_have_pcre810],
 [AC_RUN_IFELSE([AC_LANG_SOURCE([[
 #ifdef HAVE_PCRE_PCRE_H
 #include <pcre/pcre.h>
@@ -3090,9 +3175,13 @@ AC_CACHE_CHECK([if PCRE version >= 8.10], [r_cv_have_pcre810],
 int main() {
 #ifdef PCRE_MAJOR
 #if PCRE_MAJOR > 8
-  exit(0);
+  exit(1);
 #elif PCRE_MAJOR == 8 && PCRE_MINOR >= 10
-  exit(0);
+{
+    int ans;
+    int res = pcre_config(PCRE_CONFIG_UTF8, &ans);
+    if (res || ans != 1) exit(1); else exit(0);
+}
 #else
   exit(1);
 #endif
@@ -3102,16 +3191,39 @@ int main() {
 }
 ]])], [r_cv_have_pcre810=yes], [r_cv_have_pcre810=no], [r_cv_have_pcre810=no])])
 fi
-if test "x${r_cv_have_pcre810}" = xyes; then
-  LIBS="-lpcre ${LIBS}"
+if test "x${r_cv_have_pcre810}" != xyes; then
+  have_pcre=no
+  LIBS="${r_save_LIBS}"
+else
+AC_CACHE_CHECK([if PCRE version >= 8.32], [r_cv_have_pcre832],
+[AC_RUN_IFELSE([AC_LANG_SOURCE([[
+#ifdef HAVE_PCRE_PCRE_H
+#include <pcre/pcre.h>
+#else
+#ifdef HAVE_PCRE_H
+#include <pcre.h>
+#endif
+#endif
+int main() {
+#if PCRE_MAJOR == 8 && PCRE_MINOR >= 32
+  exit(0);
+#else
+  exit(1);
+#endif
+}
+]])], [r_cv_have_pcre832=yes], [r_cv_have_pcre832=no], [r_cv_have_pcre832=no])])
 fi
-AC_MSG_CHECKING([whether PCRE support needs to be compiled])
-if test "x${r_cv_have_pcre810}" = xyes; then
-  AC_MSG_RESULT([no])
+
+AC_MSG_CHECKING([whether PCRE support suffices])
+if test "x${r_cv_have_pcre810}" != xyes; then
+  AC_MSG_ERROR([pcre >= 8.10 library and headers are required])
 else
   AC_MSG_RESULT([yes])
 fi
-AM_CONDITIONAL(BUILD_PCRE, [test "x${r_cv_have_pcre810}" != xyes])
+if test "x${r_cv_have_pcre832}" != xyes; then
+  warn_pcre_version="pcre < 8.32 is deprecated"
+  AC_MSG_WARN([${warn_pcre_version}])
+fi
 ])# R_PCRE
 
 ## R_BZLIB
@@ -3120,13 +3232,9 @@ AM_CONDITIONAL(BUILD_PCRE, [test "x${r_cv_have_pcre810}" != xyes])
 ## We check that both are installed,
 ## and that BZ2_bzlibVersion is in the library.
 AC_DEFUN([R_BZLIB],
-[if test "x${use_system_bzlib}" = xyes; then
-  AC_CHECK_LIB(bz2, BZ2_bzlibVersion, [have_bzlib=yes], [have_bzlib=no])
-  if test "${have_bzlib}" = yes; then
-    AC_CHECK_HEADERS(bzlib.h, [have_bzlib=yes], [have_bzlib=no])
-  fi
-else
-  have_bzlib=no
+[AC_CHECK_LIB(bz2, BZ2_bzlibVersion, [have_bzlib=yes], [have_bzlib=no])
+if test "${have_bzlib}" = yes; then
+  AC_CHECK_HEADERS(bzlib.h, [have_bzlib=yes], [have_bzlib=no])
 fi
 if test "x${have_bzlib}" = xyes; then
 AC_CACHE_CHECK([if bzip2 version >= 1.0.6], [r_cv_have_bzlib],
@@ -3148,14 +3256,13 @@ fi
 if test "x${r_cv_have_bzlib}" = xno; then
   have_bzlib=no
 fi
-AC_MSG_CHECKING([whether bzip2 support needs to be compiled])
+AC_MSG_CHECKING([whether bzip2 support suffices])
 if test "x${have_bzlib}" = xyes; then
-  AC_MSG_RESULT([no])
+  AC_MSG_RESULT([yes])
   LIBS="-lbz2 ${LIBS}"
 else
-  AC_MSG_RESULT([yes])
+  AC_MSG_ERROR([bzip2 library and headers are required])
 fi
-AM_CONDITIONAL(BUILD_BZLIB, [test "x${have_bzlib}" = xno])
 ])# R_BZLIB
 
 ## R_TRE
@@ -3183,11 +3290,10 @@ AM_CONDITIONAL(BUILD_TRE, [test x${have_tre} != xyes])
 ## Try finding liblzma library and headers.
 ## We check that both are installed,
 AC_DEFUN([R_LZMA],
-[if test "x${use_system_xz}" = xyes; then
-  AC_CHECK_LIB(lzma, lzma_version_number, [have_lzma=yes], [have_lzma=no])
-  if test "${have_lzma}" = yes; then
-    AC_CHECK_HEADERS(lzma.h, [have_lzma=yes], [have_lzma=no])
-  fi
+[AC_CHECK_LIB(lzma, lzma_version_number, [have_lzma=yes], [have_lzma=no])
+if test "${have_lzma}" = yes; then
+  AC_CHECK_HEADERS(lzma.h, [have_lzma=yes], [have_lzma=no])
+fi
 if test "x${have_lzma}" = xyes; then
 AC_CACHE_CHECK([if lzma version >= 5.0.3], [r_cv_have_lzma],
 [AC_LANG_PUSH(C)
@@ -3214,11 +3320,9 @@ fi
 if test "x${have_lzma}" = xyes; then
   AC_DEFINE(HAVE_LZMA, 1, [Define if your system has lzma >= 5.0.3.])
   LIBS="-llzma ${LIBS}"
-fi
 else
-  have_lzma="no"
+  AC_MSG_ERROR("liblzma library and headers are required")
 fi
-AM_CONDITIONAL(BUILD_XZ, [test x${have_lzma} != xyes])
 ])# R_LZMA
 
 
@@ -3325,7 +3429,7 @@ fi
 ## -------
 ## Look for iconv, possibly in libiconv.
 ## Need to include <iconv.h> as this may define iconv as a macro.
-## libiconv, e.g. on OS X, has iconv as a macro and needs -liconv.
+## libiconv, e.g. on macOS, has iconv as a macro and needs -liconv.
 AC_DEFUN([R_ICONV],
 [AC_CHECK_HEADERS(iconv.h)
 ## need to ignore cache for this as it may set LIBS
@@ -3558,13 +3662,19 @@ done
 ])# R_CHECK_FUNCS
 
 ## R_GCC4_VISIBILITY
-## Sets up suitable macros for visibility attributes in gcc4/gfortran
+## Sets up suitable macros for visibility attributes in gcc/gfortran
+## Also accepted on clang (which defines __GNUC__). 
+## Intel also defines __GNUC__ but is excluded below, and
+## Solaris <= 12.4 rejected -Werror, but 12.5 did not.
 AC_DEFUN([R_GCC4_VISIBILITY],
 [AC_CACHE_CHECK([whether __attribute__((visibility())) is supported],
                 [r_cv_visibility_attribute],
 [cat > conftest.c <<EOF
 int foo __attribute__ ((visibility ("hidden"))) = 1;
 int bar __attribute__ ((visibility ("default"))) = 1;
+#ifndef __GNUC__
+# error unsupported compiler
+#endif
 EOF
 r_cv_visibility_attribute=no
 if AC_TRY_COMMAND(${CC-cc} -Werror -S conftest.c -o conftest.s 1>&AS_MESSAGE_LOG_FD); then
@@ -3591,8 +3701,8 @@ if test "${r_cv_prog_cc_vis}" = yes; then
     C_VISIBILITY="-fvisibility=hidden"
   fi
 fi
-## Need to exclude Intel compilers, where this does not work.
-## The flag is documented, and is effective but also hides
+## Need to exclude Intel compilers, where this does not work correctly.
+## The flag is documented and is effective, but also hides
 ## unsatisfied references. We cannot test for GCC, as icc passes that test.
 case  "${CC}" in
   ## Intel compiler: note that -c99 may have been appended
@@ -3988,56 +4098,195 @@ if test "x${r_cv_working_mktime}" = xyes; then
 fi
 ])# R_FUNC_MKTIME
 
-## R_CXX1X
-## -------
-## Support for C++11 and later, for use in packages.
-AC_DEFUN([R_CXX1X],
+## R_STDCXX
+## --------
+## Support for C++ standards (C++98, C++11, C++14, C++17), for use in packages.
+## R_STDCXX(VERSION, PREFIX, DEFAULT)
+AC_DEFUN([R_STDCXX],
 [r_save_CXX="${CXX}"
 r_save_CXXFLAGS="${CXXFLAGS}"
 
-: ${CXX1X=${CXX}}
-: ${CXX1XFLAGS=${CXXFLAGS}}
-: ${CXX1XPICFLAGS=${CXXPICFLAGS}}
+: ${$2=${$3}}
+: ${$2FLAGS=${$3FLAGS}}
+: ${$2PICFLAGS=${$3PICFLAGS}}
 
-CXX="${CXX1X} ${CXX1XSTD}"
-CXXFLAGS="${CXX1XFLAGS} ${CXX1XPICFLAGS}"
+CXX="${$2} ${$2STD}"
+CXXFLAGS="${$2FLAGS} ${$2PICFLAGS}"
 AC_LANG_PUSH([C++])dnl
-AX_CXX_COMPILE_STDCXX_11([noext], [optional])
+AX_CXX_COMPILE_STDCXX([$1], [], [optional])
 AC_LANG_POP([C++])dnl Seems the macro does not always get this right
 CXX="${r_save_CXX}"
 CXXFLAGS="${r_save_CXXFLAGS}"
-if test "${HAVE_CXX11}" = "1"; then
-  CXX1XSTD="${CXX1XSTD} ${switch}"
+if test "${HAVE_CXX$1}" = "1"; then
+dnl for aesthetics avoid leading space
+  if test "${$2STD}"x = "x";  then
+    $2STD="${switch}"
+  else
+    $2STD="${$2STD} ${switch}"
+  fi
 else
-  CXX1X=""
-  CXX1XSTD=""
-  CXX1XFLAGS=""
-  CXX1XPICFLAGS=""
-fi
-
-AC_SUBST(CXX1X)
-AC_SUBST(CXX1XSTD)
-AC_SUBST(CXX1XFLAGS)
-AC_SUBST(CXX1XPICFLAGS)
-if test -z "${SHLIB_CXX1XLD}"; then
-  SHLIB_CXX1XLD="\$(CXX1X) \$(CXX1XSTD)"
-fi
-AC_SUBST(SHLIB_CXX1XLD)
-: ${SHLIB_CXX1XLDFLAGS=${SHLIB_CXXLDFLAGS}}
-AC_SUBST(SHLIB_CXX1XLDFLAGS)
-
-AC_ARG_VAR([CXX1X], [C++11 compiler command])
-AC_ARG_VAR([CXX1XSTD],
-           [special flag for compiling and for linking C++11 code, e.g. -std=c++11])
-AC_ARG_VAR([CXX1XFLAGS], [C++11 compiler flags])
-AC_ARG_VAR([CXX1XPICFLAGS],
-           [special flags for compiling C++11 code to be turned into a
+  $2=""
+  $2STD=""
+  $2FLAGS=""
+  $2PICFLAGS=""
+fi
+
+AC_SUBST($2)
+AC_SUBST($2STD)
+AC_SUBST($2FLAGS)
+AC_SUBST($2PICFLAGS)
+if test -z "${SHLIB_$2LD}"; then
+  SHLIB_$2LD="\$($2) \$($2STD)"
+fi
+AC_SUBST(SHLIB_$2LD)
+: ${SHLIB_$2LDFLAGS=${SHLIB_$3LDFLAGS}}
+AC_SUBST(SHLIB_$2LDFLAGS)
+
+AC_ARG_VAR([$2], [C++$1 compiler command])
+AC_ARG_VAR([$2STD],
+           [special flag for compiling and for linking C++$1 code, e.g. -std=c++$1])
+AC_ARG_VAR([$2FLAGS], [C++$1 compiler flags])
+AC_ARG_VAR([$2PICFLAGS],
+           [special flags for compiling C++$1 code to be turned into a
             shared object])
-AC_ARG_VAR([SHLIB_CXX1XLD],
+AC_ARG_VAR([SHLIB_$2LD],
            [command for linking shared objects which contain object
-            files from the C++11 compiler])
-AC_ARG_VAR([SHLIB_CXX1XLDFLAGS], [special flags used by SHLIB_CXX1XLD])
-])# R_CXX1X
+            files from the C++$1 compiler])
+AC_ARG_VAR([SHLIB_$2LDFLAGS], [special flags used by SHLIB_$2LD])
+])# R_STDCXX
+
+## R_LIBCURL
+## ----------------
+AC_DEFUN([R_LIBCURL],
+[## curl-config might not match the installed libcurl,
+## so we allow the user to set CURL_CPPFLAGS, CURL_LIBS
+## and check the version directly rather than by curl-config --checkfor
+AC_PATH_PROG(CURL_CONFIG, curl-config)
+if test -n "${CURL_CONFIG}"; then
+  echo "checking libcurl version ..." \
+    `${CURL_CONFIG} --version | sed -e 's,^[[^0-9]]*,,'`
+  if test -z "${CURL_CPPFLAGS}"; then
+    CURL_CPPFLAGS=`${CURL_CONFIG} --cflags`
+  fi
+  ## This should be correct for a static-only build, user will
+  ## need to override to specify static linking (see config.site)
+  if test -z "${CURL_LIBS}"; then
+    CURL_LIBS=`${CURL_CONFIG} --libs`
+  fi
+fi
+r_save_CPPFLAGS="${CPPFLAGS}"
+CPPFLAGS="${CURL_CPPFLAGS} ${CPPFLAGS}"
+r_save_LIBS="${LIBS}"
+LIBS="${CURL_LIBS} ${LIBS}"
+AC_CHECK_HEADERS(curl/curl.h, [have_libcurl=yes], [have_libcurl=no])
+
+if test "x${have_libcurl}" = "xyes"; then
+AC_CACHE_CHECK([if libcurl is version 7 and >= 7.22.0], [r_cv_have_curl722],
+[AC_RUN_IFELSE([AC_LANG_SOURCE([[
+#include <stdlib.h>
+#include <curl/curl.h>
+int main() 
+{
+#ifdef LIBCURL_VERSION_MAJOR
+#if LIBCURL_VERSION_MAJOR > 7
+  exit(1);
+#elif LIBCURL_VERSION_MAJOR == 7 && LIBCURL_VERSION_MINOR >= 22
+  exit(0);
+#else
+  exit(1);
+#endif
+#else
+  exit(1);
+#endif
+}
+]])], [r_cv_have_curl722=yes], [r_cv_have_curl722=no], [r_cv_have_curl722=no])])
+fi
+if test "x${r_cv_have_curl722}" = xno; then
+  have_libcurl=no
+fi
+
+if test "x${have_libcurl}" = "xyes"; then
+AC_CACHE_CHECK([if libcurl supports https], [r_cv_have_curl_https],
+[AC_RUN_IFELSE([AC_LANG_SOURCE([[
+#include <string.h>
+#include <curl/curl.h>
+int main()
+{
+    curl_version_info_data *data = curl_version_info(CURLVERSION_NOW);
+    const char * const *p  = data->protocols;
+    int found = 0;
+    for (; *p; p++)
+	if(strcmp(*p, "https") == 0) {found = 1; break;}
+    exit(found ? 0 : 1);
+}
+]])], [r_cv_have_curl_https=yes], [r_cv_have_curl_https=no], [r_cv_have_curl_https=no])])
+fi
+if test "x${r_cv_have_curl_https}" = xno; then
+  have_libcurl=no
+fi
+if test "x${have_libcurl}" = xyes; then
+  AC_DEFINE(HAVE_LIBCURL, 1, [Define if your system has libcurl >= 7.22.0 with support for https.])
+  CPPFLAGS="${r_save_CPPFLAGS}"
+  LIBS="${r_save_LIBS}"
+  AC_SUBST(CURL_CPPFLAGS)
+  AC_SUBST(CURL_LIBS)
+else
+  AC_MSG_ERROR([libcurl >= 7.22.0 library and headers are required with support for https])
+fi
+])# R_LIBCURL
+
+## R_OPENMP_SIMDRED
+## ------------
+## Support for SIMD reduction on '+' (part of OpenMP 4.0) in C compiler.
+AC_DEFUN([R_OPENMP_SIMDRED],
+[AC_CACHE_CHECK([whether OpenMP SIMD reduction is supported],
+                [r_cv_openmp_simdred],
+[
+AC_LANG_PUSH(C)
+r_save_CFLAGS="${CFLAGS}"
+CFLAGS="${CFLAGS} ${R_OPENMP_CFLAGS}"
+AC_RUN_IFELSE([AC_LANG_SOURCE([[
+#include <stdlib.h>
+
+double ssum(double *x, int n) {
+/* SIMD reduction is supported since OpenMP 4.0. The value of _OPENMP is
+   unreliable in some compilers, so we do not test its value. */
+#if defined(_OPENMP) 
+    double s = 0;
+    #pragma omp simd reduction(+:s)
+    for(int i = 0; i < n; i++)
+        s += x[i];
+    return s;
+#else
+    exit(1);
+    return 0; /* not reachable */
+#endif
+}
+
+int main() {
+    /* use volatiles to reduce the risk of the
+       computation being inlined and constant-folded */
+    volatile double xv[8] = {1, 2, 3, 4, 5, 6, 7, 8};
+    volatile int n = 8;
+    double x[8], s;
+    int i;
+    
+    for(i = 0; i < 8; i++) x[i] = xv[i];
+    s = ssum(x, n);
+    if (s == 36) exit(0);
+    exit(2);
+}
+]])],
+              [r_cv_openmp_simdred=yes],
+              [r_cv_openmp_simdred=no],
+              [r_cv_openmp_simdred=no])
+CFLAGS="${r_save_CFLAGS}"
+])
+if test "x${r_cv_openmp_simdred}" = xyes; then
+  AC_DEFINE(HAVE_OPENMP_SIMDRED, 1,
+            [Define if your OpenMP 4 implementation fully supports SIMD reduction])
+fi
+])# R_OPENMP_SIMDRED
 
 
 ### Local variables: ***
diff --git a/m4/cairo.m4 b/m4/cairo.m4
index 00883fc..4e7df87 100644
--- a/m4/cairo.m4
+++ b/m4/cairo.m4
@@ -16,7 +16,7 @@
 ###
 ### You should have received a copy of the GNU General Public License
 ### along with R; if not, a copy is available at
-### http://www.r-project.org/Licenses/
+### https://www.r-project.org/Licenses/
 
 
 AC_DEFUN([R_PANGO_CAIRO], [
@@ -75,7 +75,7 @@ else
 #error cairo version >= 1.2 required
 #endif
 int main(void) {
-    cairo_t  *CC;
+    cairo_t  *CC = NULL; // silence picky compilers
     cairo_arc(CC, 0.0, 0.0, 1.0, 0.0, 6.28);
     pango_cairo_create_layout(CC);
     pango_font_description_new();
@@ -125,7 +125,8 @@ int main(void) {
       CAIROX11_CPPFLAGS=`"${PKGCONF}" --cflags ${xmodlist}`
       case "${host_os}" in
         darwin*)
-          ## This is for static OS X build
+          ## This is for static macOS build
+	  ## FIXME: doing that unconditionally is really not a good idea
           CAIRO_LIBS=`"${PKGCONF}" --static --libs ${modlist}`
           CAIROX11_LIBS=`"${PKGCONF}" --static --libs ${xmodlist}`
           ;;
diff --git a/m4/cxx_11.m4 b/m4/cxx_11.m4
index 035b984..46a62a1 100644
--- a/m4/cxx_11.m4
+++ b/m4/cxx_11.m4
@@ -1,133 +1,1033 @@
-# ============================================================================
-#  http://www.gnu.org/software/autoconf-archive/ax_cxx_compile_stdcxx_11.html
-# ============================================================================
+# ===========================================================================
+#  https://www.gnu.org/software/autoconf-archive/ax_cxx_compile_stdcxx.html
+# ===========================================================================
 #
 # SYNOPSIS
 #
-#   AX_CXX_COMPILE_STDCXX_11([ext|noext],[mandatory|optional])
+#   AX_CXX_COMPILE_STDCXX(VERSION, [ext|noext], [mandatory|optional])
 #
 # DESCRIPTION
 #
-#   Check for baseline language coverage in the compiler for the C++11
-#   standard; if necessary, add switches to CXXFLAGS to enable support.
+#   Check for baseline language coverage in the compiler for the specified
+#   version of the C++ standard.  If necessary, add switches to CXX and
+#   CXXCPP to enable support.  VERSION may be '11' (for the C++11 standard),
+#   '14' (for the C++14 standard), '17' (for the C++17 standard) or '98'
+#   (for the C++98 standard).
 #
-#   The first argument, if specified, indicates whether you insist on an
+#   The second argument, if specified, indicates whether you insist on an
 #   extended mode (e.g. -std=gnu++11) or a strict conformance mode (e.g.
 #   -std=c++11).  If neither is specified, you get whatever works, with
 #   preference for an extended mode.
 #
-#   The second argument, if specified 'mandatory' or if left unspecified,
-#   indicates that baseline C++11 support is required and that the macro
-#   should error out if no mode with that support is found.  If specified
-#   'optional', then configuration proceeds regardless, after defining
-#   HAVE_CXX11 if and only if a supporting mode is found.
+#   The third argument, if specified 'mandatory' or if left unspecified,
+#   indicates that baseline support for the specified C++ standard is
+#   required and that the macro should error out if no mode with that
+#   support is found.  If specified 'optional', then configuration proceeds
+#   regardless, after defining HAVE_CXX${VERSION} if and only if a
+#   supporting mode is found.
 #
 # LICENSE
 #
 #   Copyright (c) 2008 Benjamin Kosnik <bkoz at redhat.com>
 #   Copyright (c) 2012 Zack Weinberg <zackw at panix.com>
 #   Copyright (c) 2013 Roy Stogner <roystgnr at ices.utexas.edu>
+#   Copyright (c) 2014, 2015 Google Inc.; contributed by Alexey Sokolov <sokolov at google.com>
+#   Copyright (c) 2015 Paul Norman <penorman at mac.com>
+#   Copyright (c) 2015 Moritz Klammler <moritz at klammler.eu>
+#   Copyright (c) 2016 Krzesimir Nowak <qdlacz at gmail.com>
 #
 #   Copying and distribution of this file, with or without modification, are
 #   permitted in any medium without royalty provided the copyright notice
-#   and this notice are preserved. This file is offered as-is, without any
+#   and this notice are preserved.  This file is offered as-is, without any
 #   warranty.
 
-dnl #serial 3
+# cxx_compile_stdcxx serial 7
 
-m4_define([_AX_CXX_COMPILE_STDCXX_11_testbody], [
-  template <typename T>
-    struct check
-    {
-      static_assert(sizeof(int) <= sizeof(T), "not big enough");
-    };
+dnl  This macro is based on the code from the AX_CXX_COMPILE_STDCXX_11 macro
+dnl  (serial version number 13).
 
-    typedef check<check<bool>> right_angle_brackets;
+dnl  Modifications for R:
+dnl  The macro has been extended to include a search for a flag to support
+dnl  C++98 code. For C++98 and C++11 we also check that the date on the
+dnl  __cplusplus macro is not too recent so that a C++14 compiler does not
+dnl  pass as a C++11, for example. The tests for C++17 have also been
+dnl  modified and are not conditional on the compiler.
 
-    int a;
-    decltype(a) b;
-
-    typedef check<int> check_type;
-    check_type c;
-    check_type&& cr = static_cast<check_type&&>(c);
-
-    auto d = a;
-])
-
-AC_DEFUN([AX_CXX_COMPILE_STDCXX_11], [dnl
-  m4_if([$1], [], [],
-        [$1], [ext], [],
-        [$1], [noext], [],
-        [m4_fatal([invalid argument `$1' to AX_CXX_COMPILE_STDCXX_11])])dnl
-  m4_if([$2], [], [ax_cxx_compile_cxx11_required=true],
-        [$2], [mandatory], [ax_cxx_compile_cxx11_required=true],
-        [$2], [optional], [ax_cxx_compile_cxx11_required=false],
-        [m4_fatal([invalid second argument `$2' to AX_CXX_COMPILE_STDCXX_11])])dnl
+AX_REQUIRE_DEFINED([AC_MSG_WARN])
+AC_DEFUN([AX_CXX_COMPILE_STDCXX], [dnl
+  m4_if([$1], [98], [ax_cxx_compile_alternatives="98 03"],
+	[$1], [11], [ax_cxx_compile_alternatives="11 0x"],
+        [$1], [14], [ax_cxx_compile_alternatives="14 1y"],
+        [$1], [17], [ax_cxx_compile_alternatives="17 1z"],
+        [m4_fatal([invalid first argument `$1' to AX_CXX_COMPILE_STDCXX])])dnl
+  m4_if([$2], [], [],
+        [$2], [ext], [],
+        [$2], [noext], [],
+        [m4_fatal([invalid second argument `$2' to AX_CXX_COMPILE_STDCXX])])dnl
+  m4_if([$3], [], [ax_cxx_compile_cxx$1_required=true],
+        [$3], [mandatory], [ax_cxx_compile_cxx$1_required=true],
+        [$3], [optional], [ax_cxx_compile_cxx$1_required=false],
+        [m4_fatal([invalid third argument `$3' to AX_CXX_COMPILE_STDCXX])])
   AC_LANG_PUSH([C++])dnl
   ac_success=no
-  AC_CACHE_CHECK(whether $CXX supports C++11 features by default,
-  ax_cv_cxx_compile_cxx11,
-  [AC_COMPILE_IFELSE([AC_LANG_SOURCE([_AX_CXX_COMPILE_STDCXX_11_testbody])],
-    [ax_cv_cxx_compile_cxx11=yes],
-    [ax_cv_cxx_compile_cxx11=no])])
-  if test x$ax_cv_cxx_compile_cxx11 = xyes; then
+  switch=""
+  AC_CACHE_CHECK(whether $CXX supports C++$1 features by default,
+  ax_cv_cxx_compile_cxx$1,
+  [AC_COMPILE_IFELSE([AC_LANG_SOURCE([_AX_CXX_COMPILE_STDCXX_testbody_$1])],
+    [ax_cv_cxx_compile_cxx$1=yes],
+    [ax_cv_cxx_compile_cxx$1=no])])
+  if test x$ax_cv_cxx_compile_cxx$1 = xyes; then
     ac_success=yes
   fi
 
-  m4_if([$1], [noext], [], [dnl
+  m4_if([$2], [noext], [], [dnl
   if test x$ac_success = xno; then
-    for switch in -std=gnu++11 -std=gnu++0x; do
-      cachevar=AS_TR_SH([ax_cv_cxx_compile_cxx11_$switch])
-      AC_CACHE_CHECK(whether $CXX supports C++11 features with $switch,
+    for alternative in ${ax_cxx_compile_alternatives}; do
+      switch="-std=gnu++${alternative}"
+      cachevar=AS_TR_SH([ax_cv_cxx_compile_cxx$1_$switch])
+      AC_CACHE_CHECK(whether $CXX supports C++$1 features with $switch,
                      $cachevar,
-        [ac_save_CXXFLAGS="$CXXFLAGS"
-         CXXFLAGS="$CXXFLAGS $switch"
-         AC_COMPILE_IFELSE([AC_LANG_SOURCE([_AX_CXX_COMPILE_STDCXX_11_testbody])],
+        [ac_save_CXX="$CXX"
+         CXX="$CXX $switch"
+         AC_COMPILE_IFELSE([AC_LANG_SOURCE([_AX_CXX_COMPILE_STDCXX_testbody_$1])],
           [eval $cachevar=yes],
           [eval $cachevar=no])
-         CXXFLAGS="$ac_save_CXXFLAGS"])
+         CXX="$ac_save_CXX"])
       if eval test x\$$cachevar = xyes; then
-        CXXFLAGS="$CXXFLAGS $switch"
+        CXX="$CXX $switch"
+        if test -n "$CXXCPP" ; then
+          CXXCPP="$CXXCPP $switch"
+        fi
         ac_success=yes
         break
       fi
     done
   fi])
 
-  m4_if([$1], [ext], [], [dnl
+  m4_if([$2], [ext], [], [dnl
   if test x$ac_success = xno; then
-    for switch in -std=c++11 -std=c++0x; do
-      cachevar=AS_TR_SH([ax_cv_cxx_compile_cxx11_$switch])
-      AC_CACHE_CHECK(whether $CXX supports C++11 features with $switch,
-                     $cachevar,
-        [ac_save_CXXFLAGS="$CXXFLAGS"
-         CXXFLAGS="$CXXFLAGS $switch"
-         AC_COMPILE_IFELSE([AC_LANG_SOURCE([_AX_CXX_COMPILE_STDCXX_11_testbody])],
-          [eval $cachevar=yes],
-          [eval $cachevar=no])
-         CXXFLAGS="$ac_save_CXXFLAGS"])
-      if eval test x\$$cachevar = xyes; then
-        CXXFLAGS="$CXXFLAGS $switch"
-        ac_success=yes
+    dnl HP's aCC needs +std=c++11
+    dnl Cray's crayCC needs "-h std=c++11"
+    dnl Both omitted here
+    for alternative in ${ax_cxx_compile_alternatives}; do
+      for switch in -std=c++${alternative}; do
+        cachevar=AS_TR_SH([ax_cv_cxx_compile_cxx$1_$switch])
+        AC_CACHE_CHECK(whether $CXX supports C++$1 features with $switch,
+                       $cachevar,
+          [ac_save_CXX="$CXX"
+           CXX="$CXX $switch"
+           AC_COMPILE_IFELSE([AC_LANG_SOURCE([_AX_CXX_COMPILE_STDCXX_testbody_$1])],
+            [eval $cachevar=yes],
+            [eval $cachevar=no])
+           CXX="$ac_save_CXX"])
+        if eval test x\$$cachevar = xyes; then
+          CXX="$CXX $switch"
+          if test -n "$CXXCPP" ; then
+            CXXCPP="$CXXCPP $switch"
+          fi
+          ac_success=yes
+          break
+        fi
+      done
+      if test x$ac_success = xyes; then
         break
       fi
     done
   fi])
   AC_LANG_POP([C++])
-  if test x$ax_cxx_compile_cxx11_required = xtrue; then
+  if test x$ax_cxx_compile_cxx$1_required = xtrue; then
     if test x$ac_success = xno; then
-      AC_MSG_ERROR([*** A compiler with support for C++11 language features is required.])
+      AC_MSG_ERROR([*** A compiler with support for C++$1 language features is required.])
     fi
+  fi
+dnl HAVE_CXX$1 is currently unused  
+  if test x$ac_success = xno; then
+    HAVE_CXX$1=0
+    AC_MSG_NOTICE([No compiler with C++$1 support was found])
   else
-    if test x$ac_success = xno; then
-      HAVE_CXX11=0
-      AC_MSG_NOTICE([No compiler with C++11 support was found])
-    else
-      HAVE_CXX11=1
-      AC_DEFINE(HAVE_CXX11,1,
-                [define if the compiler supports basic C++11 syntax])
-    fi
-
-    AC_SUBST(HAVE_CXX11)
+    HAVE_CXX$1=1
+dnl    AC_DEFINE(HAVE_CXX$1,1,
+dnl              [define if the compiler supports basic C++$1 syntax])
   fi
+  AC_SUBST(HAVE_CXX$1)
+dnl  m4_if([$1], [17], [AC_MSG_WARN([C++17 is not yet standardized, so the checks may change in incompatible ways anytime])])
 ])
+
+dnl  Test body for checking C++98 support
+
+m4_define([_AX_CXX_COMPILE_STDCXX_testbody_98],[
+#ifndef __cplusplus
+# error "This is not a C++ compiler"
+#endif
+// or we could test for later than C++03 
+#if __cplusplus >= 201103L
+# error "This is a compiler for C++11 or later" 
+#endif
+])
+
+dnl  Test body for checking C++11 support
+
+m4_define([_AX_CXX_COMPILE_STDCXX_testbody_11],
+#ifndef __cplusplus
+# error "This is not a C++ compiler"
+#elif defined(__GNUC__)  && __GNUC__ == 4 && __GNUC_MINOR__ < 8
+  _AX_CXX_COMPILE_STDCXX_testbody_legacy_11
+#elif __cplusplus < 201103L
+# error "This is not a C++11 compiler"
+#elif __cplusplus >= 201402L
+# error "This is a C++14 compiler"
+#else
+  _AX_CXX_COMPILE_STDCXX_testbody_new_in_11
+#endif
+)
+
+dnl  Test body for checking C++14 support
+
+m4_define([_AX_CXX_COMPILE_STDCXX_testbody_14],
+#ifndef __cplusplus
+# error "This is not a C++ compiler"
+#elif __cplusplus < 201402L
+# error "This is not a C++14 compiler"
+#else
+  _AX_CXX_COMPILE_STDCXX_testbody_new_in_11
+  _AX_CXX_COMPILE_STDCXX_testbody_new_in_14
+#endif
+)
+
+dnl Test body for checking C++17 support
+
+m4_define([_AX_CXX_COMPILE_STDCXX_testbody_17],
+#ifndef __cplusplus
+#error "This is not a C++ compiler"
+#elif __cplusplus <= 201402L
+#error "This is not a C++17 compiler"
+#else
+  _AX_CXX_COMPILE_STDCXX_testbody_new_in_11
+  _AX_CXX_COMPILE_STDCXX_testbody_new_in_14
+  _AX_CXX_COMPILE_STDCXX_testbody_new_in_17
+#endif  
+)
+
+dnl  Tests for new features in C++11
+
+m4_define([_AX_CXX_COMPILE_STDCXX_testbody_legacy_11], [[
+
+  //This is the earlier, less stringent test used in R 3.3.0
+  //Keep this for long-term support platforms with older gcc compilers
+
+  template <typename T>
+  struct check
+  {
+    static_assert(sizeof(int) <= sizeof(T), "not big enough");
+  };
+
+  typedef check<check<bool>> right_angle_brackets;
+
+  int a;
+  decltype(a) b;
+
+  typedef check<int> check_type;
+  check_type c;
+  check_type&& cr = static_cast<check_type&&>(c);
+
+  auto d = a;
+
+]])
+
+m4_define([_AX_CXX_COMPILE_STDCXX_testbody_new_in_11], [[
+
+namespace cxx11
+{
+
+  namespace test_static_assert
+  {
+
+    template <typename T>
+    struct check
+    {
+      static_assert(sizeof(int) <= sizeof(T), "not big enough");
+    };
+
+  }
+
+  namespace test_final_override
+  {
+
+    struct Base
+    {
+      virtual void f() {}
+    };
+
+    struct Derived : public Base
+    {
+      virtual void f() override {}
+    };
+
+  }
+
+  namespace test_double_right_angle_brackets
+  {
+
+    template < typename T >
+    struct check {};
+
+    typedef check<void> single_type;
+    typedef check<check<void>> double_type;
+    typedef check<check<check<void>>> triple_type;
+    typedef check<check<check<check<void>>>> quadruple_type;
+
+  }
+
+  namespace test_decltype
+  {
+
+    int
+    f()
+    {
+      int a = 1;
+      decltype(a) b = 2;
+      return a + b;
+    }
+
+  }
+
+  namespace test_type_deduction
+  {
+
+    template < typename T1, typename T2 >
+    struct is_same
+    {
+      static const bool value = false;
+    };
+
+    template < typename T >
+    struct is_same<T, T>
+    {
+      static const bool value = true;
+    };
+
+    template < typename T1, typename T2 >
+    auto
+    add(T1 a1, T2 a2) -> decltype(a1 + a2)
+    {
+      return a1 + a2;
+    }
+
+    int
+    test(const int c, volatile int v)
+    {
+      static_assert(is_same<int, decltype(0)>::value == true, "");
+      static_assert(is_same<int, decltype(c)>::value == false, "");
+      static_assert(is_same<int, decltype(v)>::value == false, "");
+      auto ac = c;
+      auto av = v;
+      auto sumi = ac + av + 'x';
+      auto sumf = ac + av + 1.0;
+      static_assert(is_same<int, decltype(ac)>::value == true, "");
+      static_assert(is_same<int, decltype(av)>::value == true, "");
+      static_assert(is_same<int, decltype(sumi)>::value == true, "");
+      static_assert(is_same<int, decltype(sumf)>::value == false, "");
+      static_assert(is_same<int, decltype(add(c, v))>::value == true, "");
+      return (sumf > 0.0) ? sumi : add(c, v);
+    }
+
+  }
+
+  namespace test_noexcept
+  {
+
+    int f() { return 0; }
+    int g() noexcept { return 0; }
+
+    static_assert(noexcept(f()) == false, "");
+    static_assert(noexcept(g()) == true, "");
+
+  }
+
+  namespace test_constexpr
+  {
+
+    template < typename CharT >
+    unsigned long constexpr
+    strlen_c_r(const CharT *const s, const unsigned long acc) noexcept
+    {
+      return *s ? strlen_c_r(s + 1, acc + 1) : acc;
+    }
+
+    template < typename CharT >
+    unsigned long constexpr
+    strlen_c(const CharT *const s) noexcept
+    {
+      return strlen_c_r(s, 0UL);
+    }
+
+    static_assert(strlen_c("") == 0UL, "");
+    static_assert(strlen_c("1") == 1UL, "");
+    static_assert(strlen_c("example") == 7UL, "");
+    static_assert(strlen_c("another\0example") == 7UL, "");
+
+  }
+
+  namespace test_rvalue_references
+  {
+
+    template < int N >
+    struct answer
+    {
+      static constexpr int value = N;
+    };
+
+    answer<1> f(int&)       { return answer<1>(); }
+    answer<2> f(const int&) { return answer<2>(); }
+    answer<3> f(int&&)      { return answer<3>(); }
+
+    void
+    test()
+    {
+      int i = 0;
+      const int c = 0;
+      static_assert(decltype(f(i))::value == 1, "");
+      static_assert(decltype(f(c))::value == 2, "");
+      static_assert(decltype(f(0))::value == 3, "");
+    }
+
+  }
+
+  namespace test_uniform_initialization
+  {
+
+    struct test
+    {
+      static const int zero {};
+      static const int one {1};
+    };
+
+    static_assert(test::zero == 0, "");
+    static_assert(test::one == 1, "");
+
+  }
+
+  namespace test_lambdas
+  {
+
+    void
+    test1()
+    {
+      auto lambda1 = [](){};
+      auto lambda2 = lambda1;
+      lambda1();
+      lambda2();
+    }
+
+    int
+    test2()
+    {
+      auto a = [](int i, int j){ return i + j; }(1, 2);
+      auto b = []() -> int { return '0'; }();
+      auto c = [=](){ return a + b; }();
+      auto d = [&](){ return c; }();
+      auto e = [a, &b](int x) mutable {
+        const auto identity = [](int y){ return y; };
+        for (auto i = 0; i < a; ++i)
+          a += b--;
+        return x + identity(a + b);
+      }(0);
+      return a + b + c + d + e;
+    }
+
+    int
+    test3()
+    {
+      const auto nullary = [](){ return 0; };
+      const auto unary = [](int x){ return x; };
+      using nullary_t = decltype(nullary);
+      using unary_t = decltype(unary);
+      const auto higher1st = [](nullary_t f){ return f(); };
+      const auto higher2nd = [unary](nullary_t f1){
+        return [unary, f1](unary_t f2){ return f2(unary(f1())); };
+      };
+      return higher1st(nullary) + higher2nd(nullary)(unary);
+    }
+
+  }
+
+  namespace test_variadic_templates
+  {
+
+    template <int...>
+    struct sum;
+
+    template <int N0, int... N1toN>
+    struct sum<N0, N1toN...>
+    {
+      /*
+        Original test code used the auto keyword instead of declaring
+        the type of "value" to be int. This causes Oracle Solaris Studio
+        12.4 to fail. This is possibly a compiler bug but in any case
+        current test code works around it by an explicit declaration.
+      */
+      static constexpr int value = N0 + sum<N1toN...>::value;
+    };
+
+    template <>
+    struct sum<>
+    {
+      static constexpr auto value = 0;
+    };
+
+    static_assert(sum<>::value == 0, "");
+    static_assert(sum<1>::value == 1, "");
+    static_assert(sum<23>::value == 23, "");
+    static_assert(sum<1, 2>::value == 3, "");
+    static_assert(sum<5, 5, 11>::value == 21, "");
+    static_assert(sum<2, 3, 5, 7, 11, 13>::value == 41, "");
+
+  }
+
+  // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae
+  // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function
+  // because of this.
+  namespace test_template_alias_sfinae
+  {
+
+    struct foo {};
+
+    template<typename T>
+    using member = typename T::member_type;
+
+    template<typename T>
+    void func(...) {}
+
+    template<typename T>
+    void func(member<T>*) {}
+
+    void test();
+
+    void test() { func<foo>(0); }
+
+  }
+
+}  // namespace cxx11
+
+]])
+
+
+dnl  Tests for new features in C++14
+
+m4_define([_AX_CXX_COMPILE_STDCXX_testbody_new_in_14], [[
+
+namespace cxx14
+{
+
+  namespace test_polymorphic_lambdas
+  {
+
+    int
+    test()
+    {
+      const auto lambda = [](auto&&... args){
+        const auto istiny = [](auto x){
+          return (sizeof(x) == 1UL) ? 1 : 0;
+        };
+        const int aretiny[] = { istiny(args)... };
+        return aretiny[0];
+      };
+      return lambda(1, 1L, 1.0f, '1');
+    }
+
+  }
+
+  namespace test_binary_literals
+  {
+
+    constexpr auto ivii = 0b0000000000101010;
+    static_assert(ivii == 42, "wrong value");
+
+  }
+
+  namespace test_generalized_constexpr
+  {
+
+    template < typename CharT >
+    constexpr unsigned long
+    strlen_c(const CharT *const s) noexcept
+    {
+      auto length = 0UL;
+      for (auto p = s; *p; ++p)
+        ++length;
+      return length;
+    }
+
+    static_assert(strlen_c("") == 0UL, "");
+    static_assert(strlen_c("x") == 1UL, "");
+    static_assert(strlen_c("test") == 4UL, "");
+    static_assert(strlen_c("another\0test") == 7UL, "");
+
+  }
+
+  namespace test_lambda_init_capture
+  {
+
+    int
+    test()
+    {
+      auto x = 0;
+      const auto lambda1 = [a = x](int b){ return a + b; };
+      const auto lambda2 = [a = lambda1(x)](){ return a; };
+      return lambda2();
+    }
+
+  }
+
+  namespace test_digit_separators
+  {
+
+    constexpr auto ten_million = 100'000'000;
+    static_assert(ten_million == 100000000, "");
+
+  }
+
+  namespace test_return_type_deduction
+  {
+
+    auto f(int& x) { return x; }
+    decltype(auto) g(int& x) { return x; }
+
+    template < typename T1, typename T2 >
+    struct is_same
+    {
+      static constexpr auto value = false;
+    };
+
+    template < typename T >
+    struct is_same<T, T>
+    {
+      static constexpr auto value = true;
+    };
+
+    int
+    test()
+    {
+      auto x = 0;
+      static_assert(is_same<int, decltype(f(x))>::value, "");
+      static_assert(is_same<int&, decltype(g(x))>::value, "");
+      return x;
+    }
+
+  }
+
+}  // namespace cxx14
+
+]])
+
+
+dnl  Tests for new features in C++17
+
+m4_define([_AX_CXX_COMPILE_STDCXX_testbody_new_in_17], [[
+
+/* We don't want compiler-specific tests for R so these conditional
+   tests are commented out.
+
+   For C++17 features supported by compiler see
+   https://gcc.gnu.org/projects/cxx-status.html#cxx1z  for gcc
+   http://clang.llvm.org/cxx_status.html               for clang
+   http://en.cppreference.com/w/cpp/compiler_support   for an overview
+
+#if defined(__clang__)
+  #define REALLY_CLANG
+#else
+  #if defined(__GNUC__)
+    #define REALLY_GCC
+  #endif
+#endif
+*/
+
+#include <initializer_list>
+#include <utility>
+#include <type_traits>
+
+namespace cxx17
+{
+
+/* Not listed as supported by clang 4 - MTP
+#if !defined(REALLY_CLANG)
+  namespace test_constexpr_lambdas
+  {
+
+    // TODO: test it with clang++ from git
+
+    constexpr int foo = [](){return 42;}();
+
+  }
+#endif // !defined(REALLY_CLANG)
+*/
+
+  namespace test::nested_namespace::definitions
+  {
+
+  }
+
+  namespace test_fold_expression
+  {
+
+    template<typename... Args>
+    int multiply(Args... args)
+    {
+      return (args * ... * 1);
+    }
+
+    template<typename... Args>
+    bool all(Args... args)
+    {
+      return (args && ...);
+    }
+
+  }
+
+  namespace test_extended_static_assert
+  {
+
+    static_assert (true);
+
+  }
+
+  namespace test_auto_brace_init_list
+  {
+
+    auto foo = {5};
+    auto bar {5};
+
+    static_assert(std::is_same<std::initializer_list<int>, decltype(foo)>::value);
+    static_assert(std::is_same<int, decltype(bar)>::value);
+  }
+
+  namespace test_typename_in_template_template_parameter
+  {
+
+    template<template<typename> typename X> struct D;
+
+  }
+
+  namespace test_fallthrough_nodiscard_maybe_unused_attributes
+  {
+
+    int f1()
+    {
+      return 42;
+    }
+
+    [[nodiscard]] int f2()
+    {
+      [[maybe_unused]] auto unused = f1();
+
+      switch (f1())
+      {
+      case 17:
+        f1();
+        [[fallthrough]];
+      case 42:
+        f1();
+      }
+      return f1();
+    }
+
+  }
+
+  namespace test_extended_aggregate_initialization
+  {
+
+    struct base1
+    {
+      int b1, b2 = 42;
+    };
+
+    struct base2
+    {
+      base2() {
+        b3 = 42;
+      }
+      int b3;
+    };
+
+    struct derived : base1, base2
+    {
+        int d;
+    };
+
+    derived d1 {{1, 2}, {}, 4};  // full initialization
+    derived d2 {{}, {}, 4};      // value-initialized bases
+
+  }
+
+  namespace test_general_range_based_for_loop
+  {
+
+    struct iter
+    {
+      int i;
+
+      int& operator* ()
+      {
+        return i;
+      }
+
+      const int& operator* () const
+      {
+        return i;
+      }
+
+      iter& operator++()
+      {
+        ++i;
+        return *this;
+      }
+    };
+
+    struct sentinel
+    {
+      int i;
+    };
+
+    bool operator== (const iter& i, const sentinel& s)
+    {
+      return i.i == s.i;
+    }
+
+    bool operator!= (const iter& i, const sentinel& s)
+    {
+      return !(i == s);
+    }
+
+    struct range
+    {
+      iter begin() const
+      {
+        return {0};
+      }
+
+      sentinel end() const
+      {
+        return {5};
+      }
+    };
+
+    void f()
+    {
+      range r {};
+
+      for (auto i : r)
+      {
+        [[maybe_unused]] auto v = i;
+      }
+    }
+
+  }
+
+  namespace test_lambda_capture_asterisk_this_by_value
+  {
+
+    struct t
+    {
+      int i;
+      int foo()
+      {
+        return [*this]()
+        {
+          return i;
+        }();
+      }
+    };
+
+  }
+
+  namespace test_enum_class_construction
+  {
+
+    enum class byte : unsigned char
+    {};
+
+    byte foo {42};
+
+  }
+
+  namespace test_constexpr_if
+  {
+
+    template <bool cond>
+    int f ()
+    {
+      if constexpr(cond)
+      {
+        return 13;
+      }
+      else
+      {
+        return 42;
+      }
+    }
+
+  }
+
+  namespace test_selection_statement_with_initializer
+  {
+
+    int f()
+    {
+      return 13;
+    }
+
+    int f2()
+    {
+      if (auto i = f(); i > 0)
+      {
+        return 3;
+      }
+
+      switch (auto i = f(); i + 4)
+      {
+      case 17:
+        return 2;
+
+      default:
+        return 1;
+      }
+    }
+
+  }
+
+/* P0091R3 not supported by clang 4.0.0 - MTP
+#if !defined(REALLY_CLANG)
+  namespace test_template_argument_deduction_for_class_templates
+  {
+
+    // TODO: test it with clang++ from git
+
+    template <typename T1, typename T2>
+    struct pair
+    {
+      pair (T1 p1, T2 p2)
+        : m1 {p1},
+          m2 {p2}
+      {}
+
+      T1 m1;
+      T2 m2;
+    };
+
+    void f()
+    {
+      [[maybe_unused]] auto p = pair{13, 42u};
+    }
+
+  }
+#endif // !defined(REALLY_CLANG)
+*/
+
+  namespace test_non_type_auto_template_parameters
+  {
+
+    template <auto n>
+    struct B
+    {};
+
+    B<5> b1;
+    B<'a'> b2;
+
+  }
+
+/* P0217R3 should be supported in clang 4.0.0, but test code dumps core
+   In addition, gcc 7.0.1 fails on the last test - MTP
+#if !defined(REALLY_CLANG)
+  namespace test_structured_bindings
+  {
+
+    // TODO: test it with clang++ from git
+
+    int arr[2] = { 1, 2 };
+    std::pair<int, int> pr = { 1, 2 };
+
+    auto f1() -> int(&)[2]
+    {
+      return arr;
+    }
+
+    auto f2() -> std::pair<int, int>&
+    {
+      return pr;
+    }
+
+    struct S
+    {
+      int x1 : 2;
+      volatile double y1;
+    };
+
+    S f3()
+    {
+      return {};
+    }
+
+    auto [ x1, y1 ] = f1();
+    auto& [ xr1, yr1 ] = f1();
+    auto [ x2, y2 ] = f2();
+    auto& [ xr2, yr2 ] = f2();
+    const auto [ x3, y3 ] = f3();
+
+  }
+#endif // !defined(REALLY_CLANG)
+*/
+
+/*
+  P0012R1 is supported by clang 4.0.0 - MTP
+  #if !defined(REALLY_CLANG)
+*/
+  namespace test_exception_spec_type_system
+  {
+
+    // TODO: test it with clang++ from git
+
+    struct Good {};
+    struct Bad {};
+
+    void g1() noexcept;
+    void g2();
+
+    template<typename T>
+    Bad
+    f(T*, T*);
+
+    template<typename T1, typename T2>
+    Good
+    f(T1*, T2*);
+
+    static_assert (std::is_same_v<Good, decltype(f(g1, g2))>);
+
+  }
+/*
+  #endif // !defined(REALLY_CLANG)
+*/
+
+  namespace test_inline_variables
+  {
+
+    template<class T> void f(T)
+    {}
+
+    template<class T> inline T g(T)
+    {
+      return T{};
+    }
+
+    template<> inline void f<>(int)
+    {}
+
+    template<> int g<>(int)
+    {
+      return 5;
+    }
+
+  }
+
+}  // namespace cxx17
+
+]])
diff --git a/m4/gettext-lib.m4 b/m4/gettext-lib.m4
index 0c081b6..fe25565 100644
--- a/m4/gettext-lib.m4
+++ b/m4/gettext-lib.m4
@@ -1,52 +1,59 @@
-## concatentation of files in gettext-0.14.5/autoconf-lib-link/m4
-# lib-ld.m4 serial 3 (gettext-0.13)
-dnl Copyright (C) 1996-2003 Free Software Foundation, Inc.
+## concatentation of files in gettext-0.19.5.1/gettext-runtime/gnulib-m4
+## cat lib-ld.m4 lib-link.m4 lib-prefix.m4 > gettext-lib.m4
+
+# lib-ld.m4 serial 6
+dnl Copyright (C) 1996-2003, 2009-2015 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
 
 dnl Subroutines of libtool.m4,
-dnl with replacements s/AC_/AC_LIB/ and s/lt_cv/acl_cv/ to avoid collision
-dnl with libtool.m4.
+dnl with replacements s/_*LT_PATH/AC_LIB_PROG/ and s/lt_/acl_/ to avoid
+dnl collision with libtool.m4.
 
-dnl From libtool-1.4. Sets the variable with_gnu_ld to yes or no.
+dnl From libtool-2.4. Sets the variable with_gnu_ld to yes or no.
 AC_DEFUN([AC_LIB_PROG_LD_GNU],
-[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], acl_cv_prog_gnu_ld,
-[# I'd rather use --version here, but apparently some GNU ld's only accept -v.
+[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], [acl_cv_prog_gnu_ld],
+[# I'd rather use --version here, but apparently some GNU lds only accept -v.
 case `$LD -v 2>&1 </dev/null` in
 *GNU* | *'with BFD'*)
-  acl_cv_prog_gnu_ld=yes ;;
+  acl_cv_prog_gnu_ld=yes
+  ;;
 *)
-  acl_cv_prog_gnu_ld=no ;;
+  acl_cv_prog_gnu_ld=no
+  ;;
 esac])
 with_gnu_ld=$acl_cv_prog_gnu_ld
 ])
 
-dnl From libtool-1.4. Sets the variable LD.
+dnl From libtool-2.4. Sets the variable LD.
 AC_DEFUN([AC_LIB_PROG_LD],
-[AC_ARG_WITH(gnu-ld,
-     [AS_HELP_STRING([--with-gnu-ld],
-	[assume the C compiler uses GNU ld @<:@default=no@:>@])],
-test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
-AC_REQUIRE([AC_PROG_CC])dnl
+[AC_REQUIRE([AC_PROG_CC])dnl
 AC_REQUIRE([AC_CANONICAL_HOST])dnl
+
+AC_ARG_WITH([gnu-ld],
+    [AS_HELP_STRING([--with-gnu-ld],
+        [assume the C compiler uses GNU ld [default=no]])],
+    [test "$withval" = no || with_gnu_ld=yes],
+    [with_gnu_ld=no])dnl
+
 # Prepare PATH_SEPARATOR.
 # The user is always right.
 if test "${PATH_SEPARATOR+set}" != set; then
-  echo "#! /bin/sh" >conf$$.sh
-  echo  "exit 0"   >>conf$$.sh
-  chmod +x conf$$.sh
-  if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
-    PATH_SEPARATOR=';'
-  else
-    PATH_SEPARATOR=:
-  fi
-  rm -f conf$$.sh
+  # Determine PATH_SEPARATOR by trying to find /bin/sh in a PATH which
+  # contains only /bin. Note that ksh looks also at the FPATH variable,
+  # so we have to set that as well for the test.
+  PATH_SEPARATOR=:
+  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
+    && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
+           || PATH_SEPARATOR=';'
+       }
 fi
+
 ac_prog=ld
 if test "$GCC" = yes; then
   # Check if gcc -print-prog-name=ld gives a path.
-  AC_MSG_CHECKING([for ld used by GCC])
+  AC_MSG_CHECKING([for ld used by $CC])
   case $host in
   *-*-mingw*)
     # gcc leaves a trailing carriage return which upsets mingw
@@ -56,12 +63,12 @@ if test "$GCC" = yes; then
   esac
   case $ac_prog in
     # Accept absolute paths.
-    [[\\/]* | [A-Za-z]:[\\/]*)]
-      [re_direlt='/[^/][^/]*/\.\./']
-      # Canonicalize the path of ld
-      ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
-      while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
-	ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
+    [[\\/]]* | ?:[[\\/]]*)
+      re_direlt='/[[^/]][[^/]]*/\.\./'
+      # Canonicalize the pathname of ld
+      ac_prog=`echo "$ac_prog"| sed 's%\\\\%/%g'`
+      while echo "$ac_prog" | grep "$re_direlt" > /dev/null 2>&1; do
+        ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
       done
       test -z "$LD" && LD="$ac_prog"
       ;;
@@ -79,92 +86,103 @@ elif test "$with_gnu_ld" = yes; then
 else
   AC_MSG_CHECKING([for non-GNU ld])
 fi
-AC_CACHE_VAL(acl_cv_path_LD,
+AC_CACHE_VAL([acl_cv_path_LD],
 [if test -z "$LD"; then
-  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
+  acl_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
   for ac_dir in $PATH; do
+    IFS="$acl_save_ifs"
     test -z "$ac_dir" && ac_dir=.
     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
       acl_cv_path_LD="$ac_dir/$ac_prog"
       # Check to see if the program is GNU ld.  I'd rather use --version,
-      # but apparently some GNU ld's only accept -v.
+      # but apparently some variants of GNU ld only accept -v.
       # Break only if it was the GNU/non-GNU ld that we prefer.
-      case `"$acl_cv_path_LD" -v 2>&1 < /dev/null` in
+      case `"$acl_cv_path_LD" -v 2>&1 </dev/null` in
       *GNU* | *'with BFD'*)
-	test "$with_gnu_ld" != no && break ;;
+        test "$with_gnu_ld" != no && break
+        ;;
       *)
-	test "$with_gnu_ld" != yes && break ;;
+        test "$with_gnu_ld" != yes && break
+        ;;
       esac
     fi
   done
-  IFS="$ac_save_ifs"
+  IFS="$acl_save_ifs"
 else
   acl_cv_path_LD="$LD" # Let the user override the test with a path.
 fi])
 LD="$acl_cv_path_LD"
 if test -n "$LD"; then
-  AC_MSG_RESULT($LD)
+  AC_MSG_RESULT([$LD])
 else
-  AC_MSG_RESULT(no)
+  AC_MSG_RESULT([no])
 fi
 test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
 AC_LIB_PROG_LD_GNU
 ])
-# lib-link.m4 serial 6 (gettext-0.14.3)
-dnl Copyright (C) 2001-2005 Free Software Foundation, Inc.
+# lib-link.m4 serial 26 (gettext-0.18.2)
+dnl Copyright (C) 2001-2015 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
 
 dnl From Bruno Haible.
 
-AC_PREREQ(2.50)
+AC_PREREQ([2.54])
 
 dnl AC_LIB_LINKFLAGS(name [, dependencies]) searches for libname and
 dnl the libraries corresponding to explicit and implicit dependencies.
 dnl Sets and AC_SUBSTs the LIB${NAME} and LTLIB${NAME} variables and
 dnl augments the CPPFLAGS variable.
+dnl Sets and AC_SUBSTs the LIB${NAME}_PREFIX variable to nonempty if libname
+dnl was found in ${LIB${NAME}_PREFIX}/$acl_libdirstem.
 AC_DEFUN([AC_LIB_LINKFLAGS],
 [
   AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
-dnl  AC_REQUIRE([AC_LIB_RPATH])
-  define([Name],[translit([$1],[./-], [___])])
-  define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
-                               [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
+  AC_REQUIRE([AC_LIB_RPATH])
+  pushdef([Name],[m4_translit([$1],[./+-], [____])])
+  pushdef([NAME],[m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./+-],
+                                   [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])])
   AC_CACHE_CHECK([how to link with lib[]$1], [ac_cv_lib[]Name[]_libs], [
     AC_LIB_LINKFLAGS_BODY([$1], [$2])
     ac_cv_lib[]Name[]_libs="$LIB[]NAME"
     ac_cv_lib[]Name[]_ltlibs="$LTLIB[]NAME"
     ac_cv_lib[]Name[]_cppflags="$INC[]NAME"
+    ac_cv_lib[]Name[]_prefix="$LIB[]NAME[]_PREFIX"
   ])
   LIB[]NAME="$ac_cv_lib[]Name[]_libs"
   LTLIB[]NAME="$ac_cv_lib[]Name[]_ltlibs"
   INC[]NAME="$ac_cv_lib[]Name[]_cppflags"
+  LIB[]NAME[]_PREFIX="$ac_cv_lib[]Name[]_prefix"
   AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
   AC_SUBST([LIB]NAME)
   AC_SUBST([LTLIB]NAME)
+  AC_SUBST([LIB]NAME[_PREFIX])
   dnl Also set HAVE_LIB[]NAME so that AC_LIB_HAVE_LINKFLAGS can reuse the
   dnl results of this search when this library appears as a dependency.
   HAVE_LIB[]NAME=yes
-  undefine([Name])
-  undefine([NAME])
+  popdef([NAME])
+  popdef([Name])
 ])
 
-dnl AC_LIB_HAVE_LINKFLAGS(name, dependencies, includes, testcode)
+dnl AC_LIB_HAVE_LINKFLAGS(name, dependencies, includes, testcode, [missing-message])
 dnl searches for libname and the libraries corresponding to explicit and
 dnl implicit dependencies, together with the specified include files and
-dnl the ability to compile and link the specified testcode. If found, it
-dnl sets and AC_SUBSTs HAVE_LIB${NAME}=yes and the LIB${NAME} and
-dnl LTLIB${NAME} variables and augments the CPPFLAGS variable, and
+dnl the ability to compile and link the specified testcode. The missing-message
+dnl defaults to 'no' and may contain additional hints for the user.
+dnl If found, it sets and AC_SUBSTs HAVE_LIB${NAME}=yes and the LIB${NAME}
+dnl and LTLIB${NAME} variables and augments the CPPFLAGS variable, and
 dnl #defines HAVE_LIB${NAME} to 1. Otherwise, it sets and AC_SUBSTs
 dnl HAVE_LIB${NAME}=no and LIB${NAME} and LTLIB${NAME} to empty.
+dnl Sets and AC_SUBSTs the LIB${NAME}_PREFIX variable to nonempty if libname
+dnl was found in ${LIB${NAME}_PREFIX}/$acl_libdirstem.
 AC_DEFUN([AC_LIB_HAVE_LINKFLAGS],
 [
   AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
-dnl  AC_REQUIRE([AC_LIB_RPATH])
-  define([Name],[translit([$1],[./-], [___])])
-  define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
-                               [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
+  AC_REQUIRE([AC_LIB_RPATH])
+  pushdef([Name],[m4_translit([$1],[./+-], [____])])
+  pushdef([NAME],[m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./+-],
+                                   [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])])
 
   dnl Search for lib[]Name and define LIB[]NAME, LTLIB[]NAME and INC[]NAME
   dnl accordingly.
@@ -178,13 +196,26 @@ dnl  AC_REQUIRE([AC_LIB_RPATH])
 
   AC_CACHE_CHECK([for lib[]$1], [ac_cv_lib[]Name], [
     ac_save_LIBS="$LIBS"
-    LIBS="$LIBS $LIB[]NAME"
-    AC_TRY_LINK([$3], [$4], [ac_cv_lib[]Name=yes], [ac_cv_lib[]Name=no])
+    dnl If $LIB[]NAME contains some -l options, add it to the end of LIBS,
+    dnl because these -l options might require -L options that are present in
+    dnl LIBS. -l options benefit only from the -L options listed before it.
+    dnl Otherwise, add it to the front of LIBS, because it may be a static
+    dnl library that depends on another static library that is present in LIBS.
+    dnl Static libraries benefit only from the static libraries listed after
+    dnl it.
+    case " $LIB[]NAME" in
+      *" -l"*) LIBS="$LIBS $LIB[]NAME" ;;
+      *)       LIBS="$LIB[]NAME $LIBS" ;;
+    esac
+    AC_LINK_IFELSE(
+      [AC_LANG_PROGRAM([[$3]], [[$4]])],
+      [ac_cv_lib[]Name=yes],
+      [ac_cv_lib[]Name='m4_if([$5], [], [no], [[$5]])'])
     LIBS="$ac_save_LIBS"
   ])
   if test "$ac_cv_lib[]Name" = yes; then
     HAVE_LIB[]NAME=yes
-    AC_DEFINE([HAVE_LIB]NAME, 1, [Define if you have the $1 library.])
+    AC_DEFINE([HAVE_LIB]NAME, 1, [Define if you have the lib][$1 library.])
     AC_MSG_CHECKING([how to link with lib[]$1])
     AC_MSG_RESULT([$LIB[]NAME])
   else
@@ -194,26 +225,34 @@ dnl  AC_REQUIRE([AC_LIB_RPATH])
     CPPFLAGS="$ac_save_CPPFLAGS"
     LIB[]NAME=
     LTLIB[]NAME=
+    LIB[]NAME[]_PREFIX=
   fi
   AC_SUBST([HAVE_LIB]NAME)
   AC_SUBST([LIB]NAME)
   AC_SUBST([LTLIB]NAME)
-  undefine([Name])
-  undefine([NAME])
+  AC_SUBST([LIB]NAME[_PREFIX])
+  popdef([NAME])
+  popdef([Name])
 ])
 
 dnl Determine the platform dependent parameters needed to use rpath:
-dnl libext, shlibext, hardcode_libdir_flag_spec, hardcode_libdir_separator,
-dnl hardcode_direct, hardcode_minus_L.
+dnl   acl_libext,
+dnl   acl_shlibext,
+dnl   acl_libname_spec,
+dnl   acl_library_names_spec,
+dnl   acl_hardcode_libdir_flag_spec,
+dnl   acl_hardcode_libdir_separator,
+dnl   acl_hardcode_direct,
+dnl   acl_hardcode_minus_L.
 AC_DEFUN([AC_LIB_RPATH],
 [
   dnl Tell automake >= 1.10 to complain if config.rpath is missing.
   m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([config.rpath])])
   AC_REQUIRE([AC_PROG_CC])                dnl we use $CC, $GCC, $LDFLAGS
-dnl  AC_REQUIRE([AC_LIB_PROG_LD])            dnl we use $LD, $with_gnu_ld
+  AC_REQUIRE([AC_LIB_PROG_LD])            dnl we use $LD, $with_gnu_ld
   AC_REQUIRE([AC_CANONICAL_HOST])         dnl we use $host
   AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT]) dnl we use $ac_aux_dir
-  AC_CACHE_CHECK([for shared library run path origin], acl_cv_rpath, [
+  AC_CACHE_CHECK([for shared library run path origin], [acl_cv_rpath], [
     CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
     ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
     . ./conftest.sh
@@ -221,34 +260,66 @@ dnl  AC_REQUIRE([AC_LIB_PROG_LD])            dnl we use $LD, $with_gnu_ld
     acl_cv_rpath=done
   ])
   wl="$acl_cv_wl"
-  libext="$acl_cv_libext"
-  shlibext="$acl_cv_shlibext"
-  hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
-  hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
-  hardcode_direct="$acl_cv_hardcode_direct"
-  hardcode_minus_L="$acl_cv_hardcode_minus_L"
+  acl_libext="$acl_cv_libext"
+  acl_shlibext="$acl_cv_shlibext"
+  acl_libname_spec="$acl_cv_libname_spec"
+  acl_library_names_spec="$acl_cv_library_names_spec"
+  acl_hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
+  acl_hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
+  acl_hardcode_direct="$acl_cv_hardcode_direct"
+  acl_hardcode_minus_L="$acl_cv_hardcode_minus_L"
   dnl Determine whether the user wants rpath handling at all.
-dnl   AC_ARG_ENABLE(rpath,
-dnl     [  --disable-rpath         do not hardcode runtime library paths],
-dnl     :, enable_rpath=yes)
+  AC_ARG_ENABLE([rpath],
+    [  --disable-rpath         do not hardcode runtime library paths],
+    :, enable_rpath=yes)
+])
+
+dnl AC_LIB_FROMPACKAGE(name, package)
+dnl declares that libname comes from the given package. The configure file
+dnl will then not have a --with-libname-prefix option but a
+dnl --with-package-prefix option. Several libraries can come from the same
+dnl package. This declaration must occur before an AC_LIB_LINKFLAGS or similar
+dnl macro call that searches for libname.
+AC_DEFUN([AC_LIB_FROMPACKAGE],
+[
+  pushdef([NAME],[m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./+-],
+                                   [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])])
+  define([acl_frompackage_]NAME, [$2])
+  popdef([NAME])
+  pushdef([PACK],[$2])
+  pushdef([PACKUP],[m4_translit(PACK,[abcdefghijklmnopqrstuvwxyz./+-],
+                                     [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])])
+  define([acl_libsinpackage_]PACKUP,
+    m4_ifdef([acl_libsinpackage_]PACKUP, [m4_defn([acl_libsinpackage_]PACKUP)[, ]],)[lib$1])
+  popdef([PACKUP])
+  popdef([PACK])
 ])
 
 dnl AC_LIB_LINKFLAGS_BODY(name [, dependencies]) searches for libname and
 dnl the libraries corresponding to explicit and implicit dependencies.
 dnl Sets the LIB${NAME}, LTLIB${NAME} and INC${NAME} variables.
+dnl Also, sets the LIB${NAME}_PREFIX variable to nonempty if libname was found
+dnl in ${LIB${NAME}_PREFIX}/$acl_libdirstem.
 AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
 [
-  define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
-                               [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
+  AC_REQUIRE([AC_LIB_PREPARE_MULTILIB])
+  pushdef([NAME],[m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./+-],
+                                   [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])])
+  pushdef([PACK],[m4_ifdef([acl_frompackage_]NAME, [acl_frompackage_]NAME, lib[$1])])
+  pushdef([PACKUP],[m4_translit(PACK,[abcdefghijklmnopqrstuvwxyz./+-],
+                                     [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])])
+  pushdef([PACKLIBS],[m4_ifdef([acl_frompackage_]NAME, [acl_libsinpackage_]PACKUP, lib[$1])])
+  dnl Autoconf >= 2.61 supports dots in --with options.
+  pushdef([P_A_C_K],[m4_if(m4_version_compare(m4_defn([m4_PACKAGE_VERSION]),[2.61]),[-1],[m4_translit(PACK,[.],[_])],PACK)])
   dnl By default, look in $includedir and $libdir.
   use_additional=yes
   AC_LIB_WITH_FINAL_PREFIX([
     eval additional_includedir=\"$includedir\"
     eval additional_libdir=\"$libdir\"
   ])
-  AC_LIB_ARG_WITH([lib$1-prefix],
-[  --with-lib$1-prefix[=DIR]  search for lib$1 in DIR/include and DIR/lib
-  --without-lib$1-prefix     don't search for lib$1 in includedir and libdir],
+  AC_ARG_WITH(P_A_C_K[-prefix],
+[[  --with-]]P_A_C_K[[-prefix[=DIR]  search for ]PACKLIBS[ in DIR/include and DIR/lib
+  --without-]]P_A_C_K[[-prefix     don't search for ]PACKLIBS[ in includedir and libdir]],
 [
     if test "X$withval" = "Xno"; then
       use_additional=no
@@ -260,7 +331,11 @@ AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
         ])
       else
         additional_includedir="$withval/include"
-        additional_libdir="$withval/lib"
+        additional_libdir="$withval/$acl_libdirstem"
+        if test "$acl_libdirstem2" != "$acl_libdirstem" \
+           && ! test -d "$withval/$acl_libdirstem"; then
+          additional_libdir="$withval/$acl_libdirstem2"
+        fi
       fi
     fi
 ])
@@ -269,6 +344,10 @@ AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
   LIB[]NAME=
   LTLIB[]NAME=
   INC[]NAME=
+  LIB[]NAME[]_PREFIX=
+  dnl HAVE_LIB${NAME} is an indicator that LIB${NAME}, LTLIB${NAME} have been
+  dnl computed. So it has to be reset here.
+  HAVE_LIB[]NAME=
   rpathdirs=
   ltrpathdirs=
   names_already_handled=
@@ -288,7 +367,7 @@ AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
         names_already_handled="$names_already_handled $name"
         dnl See if it was already located by an earlier AC_LIB_LINKFLAGS
         dnl or AC_LIB_HAVE_LINKFLAGS call.
-        uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
+        uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./+-|ABCDEFGHIJKLMNOPQRSTUVWXYZ____|'`
         eval value=\"\$HAVE_LIB$uppername\"
         if test -n "$value"; then
           if test "$value" = yes; then
@@ -308,22 +387,55 @@ AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
           found_la=
           found_so=
           found_a=
+          eval libname=\"$acl_libname_spec\"    # typically: libname=lib$name
+          if test -n "$acl_shlibext"; then
+            shrext=".$acl_shlibext"             # typically: shrext=.so
+          else
+            shrext=
+          fi
           if test $use_additional = yes; then
-            if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
-              found_dir="$additional_libdir"
-              found_so="$additional_libdir/lib$name.$shlibext"
-              if test -f "$additional_libdir/lib$name.la"; then
-                found_la="$additional_libdir/lib$name.la"
-              fi
-            else
-              if test -f "$additional_libdir/lib$name.$libext"; then
-                found_dir="$additional_libdir"
-                found_a="$additional_libdir/lib$name.$libext"
-                if test -f "$additional_libdir/lib$name.la"; then
-                  found_la="$additional_libdir/lib$name.la"
+            dir="$additional_libdir"
+            dnl The same code as in the loop below:
+            dnl First look for a shared library.
+            if test -n "$acl_shlibext"; then
+              if test -f "$dir/$libname$shrext"; then
+                found_dir="$dir"
+                found_so="$dir/$libname$shrext"
+              else
+                if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
+                  ver=`(cd "$dir" && \
+                        for f in "$libname$shrext".*; do echo "$f"; done \
+                        | sed -e "s,^$libname$shrext\\\\.,," \
+                        | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
+                        | sed 1q ) 2>/dev/null`
+                  if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
+                    found_dir="$dir"
+                    found_so="$dir/$libname$shrext.$ver"
+                  fi
+                else
+                  eval library_names=\"$acl_library_names_spec\"
+                  for f in $library_names; do
+                    if test -f "$dir/$f"; then
+                      found_dir="$dir"
+                      found_so="$dir/$f"
+                      break
+                    fi
+                  done
                 fi
               fi
             fi
+            dnl Then look for a static library.
+            if test "X$found_dir" = "X"; then
+              if test -f "$dir/$libname.$acl_libext"; then
+                found_dir="$dir"
+                found_a="$dir/$libname.$acl_libext"
+              fi
+            fi
+            if test "X$found_dir" != "X"; then
+              if test -f "$dir/$libname.la"; then
+                found_la="$dir/$libname.la"
+              fi
+            fi
           fi
           if test "X$found_dir" = "X"; then
             for x in $LDFLAGS $LTLIB[]NAME; do
@@ -331,21 +443,46 @@ AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
               case "$x" in
                 -L*)
                   dir=`echo "X$x" | sed -e 's/^X-L//'`
-                  if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
-                    found_dir="$dir"
-                    found_so="$dir/lib$name.$shlibext"
-                    if test -f "$dir/lib$name.la"; then
-                      found_la="$dir/lib$name.la"
-                    fi
-                  else
-                    if test -f "$dir/lib$name.$libext"; then
+                  dnl First look for a shared library.
+                  if test -n "$acl_shlibext"; then
+                    if test -f "$dir/$libname$shrext"; then
                       found_dir="$dir"
-                      found_a="$dir/lib$name.$libext"
-                      if test -f "$dir/lib$name.la"; then
-                        found_la="$dir/lib$name.la"
+                      found_so="$dir/$libname$shrext"
+                    else
+                      if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
+                        ver=`(cd "$dir" && \
+                              for f in "$libname$shrext".*; do echo "$f"; done \
+                              | sed -e "s,^$libname$shrext\\\\.,," \
+                              | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
+                              | sed 1q ) 2>/dev/null`
+                        if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
+                          found_dir="$dir"
+                          found_so="$dir/$libname$shrext.$ver"
+                        fi
+                      else
+                        eval library_names=\"$acl_library_names_spec\"
+                        for f in $library_names; do
+                          if test -f "$dir/$f"; then
+                            found_dir="$dir"
+                            found_so="$dir/$f"
+                            break
+                          fi
+                        done
                       fi
                     fi
                   fi
+                  dnl Then look for a static library.
+                  if test "X$found_dir" = "X"; then
+                    if test -f "$dir/$libname.$acl_libext"; then
+                      found_dir="$dir"
+                      found_a="$dir/$libname.$acl_libext"
+                    fi
+                  fi
+                  if test "X$found_dir" != "X"; then
+                    if test -f "$dir/$libname.la"; then
+                      found_la="$dir/$libname.la"
+                    fi
+                  fi
                   ;;
               esac
               if test "X$found_dir" != "X"; then
@@ -360,7 +497,9 @@ AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
               dnl Linking with a shared library. We attempt to hardcode its
               dnl directory into the executable's runpath, unless it's the
               dnl standard /usr/lib.
-              if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
+              if test "$enable_rpath" = no \
+                 || test "X$found_dir" = "X/usr/$acl_libdirstem" \
+                 || test "X$found_dir" = "X/usr/$acl_libdirstem2"; then
                 dnl No hardcoding is needed.
                 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
               else
@@ -379,12 +518,12 @@ AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
                   ltrpathdirs="$ltrpathdirs $found_dir"
                 fi
                 dnl The hardcoding into $LIBNAME is system dependent.
-                if test "$hardcode_direct" = yes; then
+                if test "$acl_hardcode_direct" = yes; then
                   dnl Using DIR/libNAME.so during linking hardcodes DIR into the
                   dnl resulting binary.
                   LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
                 else
-                  if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
+                  if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then
                     dnl Use an explicit option to hardcode DIR into the resulting
                     dnl binary.
                     LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
@@ -415,13 +554,13 @@ AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
                     if test -z "$haveit"; then
                       LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir"
                     fi
-                    if test "$hardcode_minus_L" != no; then
+                    if test "$acl_hardcode_minus_L" != no; then
                       dnl FIXME: Not sure whether we should use
                       dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
                       dnl here.
                       LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
                     else
-                      dnl We cannot use $hardcode_runpath_var and LD_RUN_PATH
+                      dnl We cannot use $acl_hardcode_runpath_var and LD_RUN_PATH
                       dnl here, because this doesn't fit in flags passed to the
                       dnl compiler. So give up. No hardcoding. This affects only
                       dnl very old systems.
@@ -446,8 +585,18 @@ AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
             dnl Assume the include files are nearby.
             additional_includedir=
             case "$found_dir" in
-              */lib | */lib/)
-                basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
+              */$acl_libdirstem | */$acl_libdirstem/)
+                basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'`
+                if test "$name" = '$1'; then
+                  LIB[]NAME[]_PREFIX="$basedir"
+                fi
+                additional_includedir="$basedir/include"
+                ;;
+              */$acl_libdirstem2 | */$acl_libdirstem2/)
+                basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem2/"'*$,,'`
+                if test "$name" = '$1'; then
+                  LIB[]NAME[]_PREFIX="$basedir"
+                fi
                 additional_includedir="$basedir/include"
                 ;;
             esac
@@ -508,9 +657,11 @@ AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
                     dnl   3. if it's already present in $LDFLAGS or the already
                     dnl      constructed $LIBNAME,
                     dnl   4. if it doesn't exist as a directory.
-                    if test "X$additional_libdir" != "X/usr/lib"; then
+                    if test "X$additional_libdir" != "X/usr/$acl_libdirstem" \
+                       && test "X$additional_libdir" != "X/usr/$acl_libdirstem2"; then
                       haveit=
-                      if test "X$additional_libdir" = "X/usr/local/lib"; then
+                      if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem" \
+                         || test "X$additional_libdir" = "X/usr/local/$acl_libdirstem2"; then
                         if test -n "$GCC"; then
                           case $host_os in
                             linux* | gnu* | k*bsd*-gnu) haveit=yes;;
@@ -609,18 +760,18 @@ AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
     done
   done
   if test "X$rpathdirs" != "X"; then
-    if test -n "$hardcode_libdir_separator"; then
+    if test -n "$acl_hardcode_libdir_separator"; then
       dnl Weird platform: only the last -rpath option counts, the user must
       dnl pass all path elements in one option. We can arrange that for a
       dnl single library, but not when more than one $LIBNAMEs are used.
       alldirs=
       for found_dir in $rpathdirs; do
-        alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
+        alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir"
       done
-      dnl Note: hardcode_libdir_flag_spec uses $libdir and $wl.
+      dnl Note: acl_hardcode_libdir_flag_spec uses $libdir and $wl.
       acl_save_libdir="$libdir"
       libdir="$alldirs"
-      eval flag=\"$hardcode_libdir_flag_spec\"
+      eval flag=\"$acl_hardcode_libdir_flag_spec\"
       libdir="$acl_save_libdir"
       LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
     else
@@ -628,7 +779,7 @@ AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
       for found_dir in $rpathdirs; do
         acl_save_libdir="$libdir"
         libdir="$found_dir"
-        eval flag=\"$hardcode_libdir_flag_spec\"
+        eval flag=\"$acl_hardcode_libdir_flag_spec\"
         libdir="$acl_save_libdir"
         LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
       done
@@ -641,6 +792,11 @@ AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
       LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-R$found_dir"
     done
   fi
+  popdef([P_A_C_K])
+  popdef([PACKLIBS])
+  popdef([PACKUP])
+  popdef([PACK])
+  popdef([NAME])
 ])
 
 dnl AC_LIB_APPENDTOVAR(VAR, CONTENTS) appends the elements of CONTENTS to VAR,
@@ -663,8 +819,86 @@ AC_DEFUN([AC_LIB_APPENDTOVAR],
     fi
   done
 ])
-# lib-prefix.m4 serial 4 (gettext-0.14.2)
-dnl Copyright (C) 2001-2005 Free Software Foundation, Inc.
+
+dnl For those cases where a variable contains several -L and -l options
+dnl referring to unknown libraries and directories, this macro determines the
+dnl necessary additional linker options for the runtime path.
+dnl AC_LIB_LINKFLAGS_FROM_LIBS([LDADDVAR], [LIBSVALUE], [USE-LIBTOOL])
+dnl sets LDADDVAR to linker options needed together with LIBSVALUE.
+dnl If USE-LIBTOOL evaluates to non-empty, linking with libtool is assumed,
+dnl otherwise linking without libtool is assumed.
+AC_DEFUN([AC_LIB_LINKFLAGS_FROM_LIBS],
+[
+  AC_REQUIRE([AC_LIB_RPATH])
+  AC_REQUIRE([AC_LIB_PREPARE_MULTILIB])
+  $1=
+  if test "$enable_rpath" != no; then
+    if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then
+      dnl Use an explicit option to hardcode directories into the resulting
+      dnl binary.
+      rpathdirs=
+      next=
+      for opt in $2; do
+        if test -n "$next"; then
+          dir="$next"
+          dnl No need to hardcode the standard /usr/lib.
+          if test "X$dir" != "X/usr/$acl_libdirstem" \
+             && test "X$dir" != "X/usr/$acl_libdirstem2"; then
+            rpathdirs="$rpathdirs $dir"
+          fi
+          next=
+        else
+          case $opt in
+            -L) next=yes ;;
+            -L*) dir=`echo "X$opt" | sed -e 's,^X-L,,'`
+                 dnl No need to hardcode the standard /usr/lib.
+                 if test "X$dir" != "X/usr/$acl_libdirstem" \
+                    && test "X$dir" != "X/usr/$acl_libdirstem2"; then
+                   rpathdirs="$rpathdirs $dir"
+                 fi
+                 next= ;;
+            *) next= ;;
+          esac
+        fi
+      done
+      if test "X$rpathdirs" != "X"; then
+        if test -n ""$3""; then
+          dnl libtool is used for linking. Use -R options.
+          for dir in $rpathdirs; do
+            $1="${$1}${$1:+ }-R$dir"
+          done
+        else
+          dnl The linker is used for linking directly.
+          if test -n "$acl_hardcode_libdir_separator"; then
+            dnl Weird platform: only the last -rpath option counts, the user
+            dnl must pass all path elements in one option.
+            alldirs=
+            for dir in $rpathdirs; do
+              alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$dir"
+            done
+            acl_save_libdir="$libdir"
+            libdir="$alldirs"
+            eval flag=\"$acl_hardcode_libdir_flag_spec\"
+            libdir="$acl_save_libdir"
+            $1="$flag"
+          else
+            dnl The -rpath options are cumulative.
+            for dir in $rpathdirs; do
+              acl_save_libdir="$libdir"
+              libdir="$dir"
+              eval flag=\"$acl_hardcode_libdir_flag_spec\"
+              libdir="$acl_save_libdir"
+              $1="${$1}${$1:+ }$flag"
+            done
+          fi
+        fi
+      fi
+    fi
+  fi
+  AC_SUBST([$1])
+])
+# lib-prefix.m4 serial 7 (gettext-0.18)
+dnl Copyright (C) 2001-2005, 2008-2015 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
@@ -689,6 +923,7 @@ AC_DEFUN([AC_LIB_PREFIX],
   AC_BEFORE([$0], [AC_LIB_LINKFLAGS])
   AC_REQUIRE([AC_PROG_CC])
   AC_REQUIRE([AC_CANONICAL_HOST])
+  AC_REQUIRE([AC_LIB_PREPARE_MULTILIB])
   AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
   dnl By default, look in $includedir and $libdir.
   use_additional=yes
@@ -710,7 +945,7 @@ AC_DEFUN([AC_LIB_PREFIX],
         ])
       else
         additional_includedir="$withval/include"
-        additional_libdir="$withval/lib"
+        additional_libdir="$withval/$acl_libdirstem"
       fi
     fi
 ])
@@ -752,7 +987,7 @@ AC_DEFUN([AC_LIB_PREFIX],
     dnl   2. if it's already present in $LDFLAGS,
     dnl   3. if it's /usr/local/lib and we are using GCC on Linux,
     dnl   4. if it doesn't exist as a directory.
-    if test "X$additional_libdir" != "X/usr/lib"; then
+    if test "X$additional_libdir" != "X/usr/$acl_libdirstem"; then
       haveit=
       for x in $LDFLAGS; do
         AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
@@ -762,7 +997,7 @@ AC_DEFUN([AC_LIB_PREFIX],
         fi
       done
       if test -z "$haveit"; then
-        if test "X$additional_libdir" = "X/usr/local/lib"; then
+        if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem"; then
           if test -n "$GCC"; then
             case $host_os in
               linux*) haveit=yes;;
@@ -816,3 +1051,73 @@ AC_DEFUN([AC_LIB_WITH_FINAL_PREFIX],
   exec_prefix="$acl_save_exec_prefix"
   prefix="$acl_save_prefix"
 ])
+
+dnl AC_LIB_PREPARE_MULTILIB creates
+dnl - a variable acl_libdirstem, containing the basename of the libdir, either
+dnl   "lib" or "lib64" or "lib/64",
+dnl - a variable acl_libdirstem2, as a secondary possible value for
+dnl   acl_libdirstem, either the same as acl_libdirstem or "lib/sparcv9" or
+dnl   "lib/amd64".
+AC_DEFUN([AC_LIB_PREPARE_MULTILIB],
+[
+  dnl There is no formal standard regarding lib and lib64.
+  dnl On glibc systems, the current practice is that on a system supporting
+  dnl 32-bit and 64-bit instruction sets or ABIs, 64-bit libraries go under
+  dnl $prefix/lib64 and 32-bit libraries go under $prefix/lib. We determine
+  dnl the compiler's default mode by looking at the compiler's library search
+  dnl path. If at least one of its elements ends in /lib64 or points to a
+  dnl directory whose absolute pathname ends in /lib64, we assume a 64-bit ABI.
+  dnl Otherwise we use the default, namely "lib".
+  dnl On Solaris systems, the current practice is that on a system supporting
+  dnl 32-bit and 64-bit instruction sets or ABIs, 64-bit libraries go under
+  dnl $prefix/lib/64 (which is a symlink to either $prefix/lib/sparcv9 or
+  dnl $prefix/lib/amd64) and 32-bit libraries go under $prefix/lib.
+  AC_REQUIRE([AC_CANONICAL_HOST])
+  acl_libdirstem=lib
+  acl_libdirstem2=
+  case "$host_os" in
+    solaris*)
+      dnl See Solaris 10 Software Developer Collection > Solaris 64-bit Developer's Guide > The Development Environment
+      dnl <http://docs.sun.com/app/docs/doc/816-5138/dev-env?l=en&a=view>.
+      dnl "Portable Makefiles should refer to any library directories using the 64 symbolic link."
+      dnl But we want to recognize the sparcv9 or amd64 subdirectory also if the
+      dnl symlink is missing, so we set acl_libdirstem2 too.
+      AC_CACHE_CHECK([for 64-bit host], [gl_cv_solaris_64bit],
+        [AC_EGREP_CPP([sixtyfour bits], [
+#ifdef _LP64
+sixtyfour bits
+#endif
+           ], [gl_cv_solaris_64bit=yes], [gl_cv_solaris_64bit=no])
+        ])
+      if test $gl_cv_solaris_64bit = yes; then
+        acl_libdirstem=lib/64
+        case "$host_cpu" in
+          sparc*)        acl_libdirstem2=lib/sparcv9 ;;
+          i*86 | x86_64) acl_libdirstem2=lib/amd64 ;;
+        esac
+      fi
+      ;;
+    *)
+      searchpath=`(LC_ALL=C $CC -print-search-dirs) 2>/dev/null | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'`
+      if test -n "$searchpath"; then
+        acl_save_IFS="${IFS= 	}"; IFS=":"
+        for searchdir in $searchpath; do
+          if test -d "$searchdir"; then
+            case "$searchdir" in
+              */lib64/ | */lib64 ) acl_libdirstem=lib64 ;;
+              */../ | */.. )
+                # Better ignore directories of this form. They are misleading.
+                ;;
+              *) searchdir=`cd "$searchdir" && pwd`
+                 case "$searchdir" in
+                   */lib64 ) acl_libdirstem=lib64 ;;
+                 esac ;;
+            esac
+          fi
+        done
+        IFS="$acl_save_IFS"
+      fi
+      ;;
+  esac
+  test -n "$acl_libdirstem2" || acl_libdirstem2="$acl_libdirstem"
+])
diff --git a/m4/gettext.m4 b/m4/gettext.m4
index df3ee92..98b7534 100644
--- a/m4/gettext.m4
+++ b/m4/gettext.m4
@@ -133,7 +133,7 @@ dnl  AC_REQUIRE([AM_PO_SUBDIRS])dnl
     ifelse(gt_included_intl, yes, [
       AC_MSG_CHECKING([whether included gettext is requested])
       AC_ARG_WITH(included-gettext,
-        [  --with-included-gettext use the GNU gettext library included here],
+        [  --with-included-gettext use the GNU gettext library included here @<:@no@:>@],
         nls_cv_force_use_gnu_gettext=$withval,
         nls_cv_force_use_gnu_gettext=no)
       AC_MSG_RESULT($nls_cv_force_use_gnu_gettext)
diff --git a/m4/libtool.m4 b/m4/libtool.m4
index 9338e9d..c52135f 100644
--- a/m4/libtool.m4
+++ b/m4/libtool.m4
@@ -1,7 +1,6 @@
 # libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
 #
-#   Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
-#                 2006, 2007, 2008 Free Software Foundation, Inc.
+#   Copyright (C) 1996-2001, 2003-2015 Free Software Foundation, Inc.
 #   Written by Gordon Matzigkeit, 1996
 #
 # This file is free software; the Free Software Foundation gives
@@ -9,35 +8,31 @@
 # modifications, as long as this notice is preserved.
 
 m4_define([_LT_COPYING], [dnl
-#   Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
-#                 2006, 2007, 2008 Free Software Foundation, Inc.
-#   Written by Gordon Matzigkeit, 1996
-#
-#   This file is part of GNU Libtool.
+# Copyright (C) 2014 Free Software Foundation, Inc.
+# This is free software; see the source for copying conditions.  There is NO
+# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+# GNU Libtool is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of of the License, or
+# (at your option) any later version.
 #
-# GNU Libtool is free software; you can redistribute it and/or
-# modify it under the terms of the GNU General Public License as
-# published by the Free Software Foundation; either version 2 of
-# the License, or (at your option) any later version.
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program or library that is built
+# using GNU Libtool, you may include this file under the  same
+# distribution terms that you use for the rest of that program.
 #
-# As a special exception to the GNU General Public License,
-# if you distribute this file as part of a program or library that
-# is built using GNU Libtool, you may include this file under the
-# same distribution terms that you use for the rest of that program.
-#
-# GNU Libtool is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# GNU Libtool 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 GNU Libtool; see the file COPYING.  If not, a copy
-# can be downloaded from http://www.gnu.org/licenses/gpl.html, or
-# obtained by writing to the Free Software Foundation, Inc.,
-# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
 ])
 
-dnl # serial 56 LT_INIT
+dnl commented out to avoid autoconf warnings
+dnl # serial 58 LT_INIT
 
 
 # LT_PREREQ(VERSION)
@@ -65,7 +60,8 @@ esac
 # LT_INIT([OPTIONS])
 # ------------------
 AC_DEFUN([LT_INIT],
-[AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT
+[AC_PREREQ([2.62])dnl We use AC_PATH_PROGS_FEATURE_CHECK
+AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
 AC_BEFORE([$0], [LT_LANG])dnl
 AC_BEFORE([$0], [LT_OUTPUT])dnl
 AC_BEFORE([$0], [LTDL_INIT])dnl
@@ -82,11 +78,13 @@ AC_REQUIRE([LTVERSION_VERSION])dnl
 AC_REQUIRE([LTOBSOLETE_VERSION])dnl
 m4_require([_LT_PROG_LTMAIN])dnl
 
+_LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}])
+
 dnl Parse OPTIONS
 _LT_SET_OPTIONS([$0], [$1])
 
 # This can be used to rebuild libtool when needed
-LIBTOOL_DEPS="$ltmain"
+LIBTOOL_DEPS=$ltmain
 
 # Always use our own libtool.
 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
@@ -106,26 +104,43 @@ dnl AC_DEFUN([AC_PROG_LIBTOOL], [])
 dnl AC_DEFUN([AM_PROG_LIBTOOL], [])
 
 
+# _LT_PREPARE_CC_BASENAME
+# -----------------------
+m4_defun([_LT_PREPARE_CC_BASENAME], [
+# Calculate cc_basename.  Skip known compiler wrappers and cross-prefix.
+func_cc_basename ()
+{
+    for cc_temp in @S|@*""; do
+      case $cc_temp in
+        compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
+        distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
+        \-*) ;;
+        *) break;;
+      esac
+    done
+    func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
+}
+])# _LT_PREPARE_CC_BASENAME
+
+
 # _LT_CC_BASENAME(CC)
 # -------------------
-# Calculate cc_basename.  Skip known compiler wrappers and cross-prefix.
+# It would be clearer to call AC_REQUIREs from _LT_PREPARE_CC_BASENAME,
+# but that macro is also expanded into generated libtool script, which
+# arranges for $SED and $ECHO to be set by different means.
 m4_defun([_LT_CC_BASENAME],
-[for cc_temp in $1""; do
-  case $cc_temp in
-    compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
-    distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
-    \-*) ;;
-    *) break;;
-  esac
-done
-cc_basename=`$ECHO "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
+[m4_require([_LT_PREPARE_CC_BASENAME])dnl
+AC_REQUIRE([_LT_DECL_SED])dnl
+AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl
+func_cc_basename $1
+cc_basename=$func_cc_basename_result
 ])
 
 
 # _LT_FILEUTILS_DEFAULTS
 # ----------------------
 # It is okay to use these file commands and assume they have been set
-# sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'.
+# sensibly after 'm4_require([_LT_FILEUTILS_DEFAULTS])'.
 m4_defun([_LT_FILEUTILS_DEFAULTS],
 [: ${CP="cp -f"}
 : ${MV="mv -f"}
@@ -138,6 +153,11 @@ m4_defun([_LT_FILEUTILS_DEFAULTS],
 m4_defun([_LT_SETUP],
 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
+AC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl
+AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl
+
+_LT_DECL([], [PATH_SEPARATOR], [1], [The PATH separator for the build system])dnl
+dnl
 _LT_DECL([], [host_alias], [0], [The host system])dnl
 _LT_DECL([], [host], [0])dnl
 _LT_DECL([], [host_os], [0])dnl
@@ -160,68 +180,54 @@ _LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl
 dnl
 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
 m4_require([_LT_CHECK_SHELL_FEATURES])dnl
+m4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl
 m4_require([_LT_CMD_RELOAD])dnl
 m4_require([_LT_CHECK_MAGIC_METHOD])dnl
+m4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl
 m4_require([_LT_CMD_OLD_ARCHIVE])dnl
 m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
+m4_require([_LT_WITH_SYSROOT])dnl
+m4_require([_LT_CMD_TRUNCATE])dnl
 
 _LT_CONFIG_LIBTOOL_INIT([
-# See if we are running on zsh, and set the options which allow our
+# See if we are running on zsh, and set the options that allow our
 # commands through without removal of \ escapes INIT.
-if test -n "\${ZSH_VERSION+set}" ; then
+if test -n "\${ZSH_VERSION+set}"; then
    setopt NO_GLOB_SUBST
 fi
 ])
-if test -n "${ZSH_VERSION+set}" ; then
+if test -n "${ZSH_VERSION+set}"; then
    setopt NO_GLOB_SUBST
 fi
 
 _LT_CHECK_OBJDIR
 
 m4_require([_LT_TAG_COMPILER])dnl
-_LT_PROG_ECHO_BACKSLASH
 
 case $host_os in
 aix3*)
   # AIX sometimes has problems with the GCC collect2 program.  For some
   # reason, if we set the COLLECT_NAMES environment variable, the problems
   # vanish in a puff of smoke.
-  if test "X${COLLECT_NAMES+set}" != Xset; then
+  if test set != "${COLLECT_NAMES+set}"; then
     COLLECT_NAMES=
     export COLLECT_NAMES
   fi
   ;;
 esac
 
-# Sed substitution that helps us do robust quoting.  It backslashifies
-# metacharacters that are still active within double-quoted strings.
-sed_quote_subst='s/\([["`$\\]]\)/\\\1/g'
-
-# Same as above, but do not quote variable references.
-double_quote_subst='s/\([["`\\]]\)/\\\1/g'
-
-# Sed substitution to delay expansion of an escaped shell variable in a
-# double_quote_subst'ed string.
-delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
-
-# Sed substitution to delay expansion of an escaped single quote.
-delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
-
-# Sed substitution to avoid accidental globbing in evaled expressions
-no_glob_subst='s/\*/\\\*/g'
-
 # Global variables:
 ofile=libtool
 can_build_shared=yes
 
-# All known linkers require a `.a' archive for static linking (except MSVC,
+# All known linkers require a '.a' archive for static linking (except MSVC,
 # which needs '.lib').
 libext=a
 
-with_gnu_ld="$lt_cv_prog_gnu_ld"
+with_gnu_ld=$lt_cv_prog_gnu_ld
 
-old_CC="$CC"
-old_CFLAGS="$CFLAGS"
+old_CC=$CC
+old_CFLAGS=$CFLAGS
 
 # Set sane defaults for various variables
 test -z "$CC" && CC=cc
@@ -250,16 +256,38 @@ _LT_CONFIG_COMMANDS
 ])# _LT_SETUP
 
 
+# _LT_PREPARE_SED_QUOTE_VARS
+# --------------------------
+# Define a few sed substitution that help us do robust quoting.
+m4_defun([_LT_PREPARE_SED_QUOTE_VARS],
+[# Backslashify metacharacters that are still active within
+# double-quoted strings.
+sed_quote_subst='s/\([["`$\\]]\)/\\\1/g'
+
+# Same as above, but do not quote variable references.
+double_quote_subst='s/\([["`\\]]\)/\\\1/g'
+
+# Sed substitution to delay expansion of an escaped shell variable in a
+# double_quote_subst'ed string.
+delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
+
+# Sed substitution to delay expansion of an escaped single quote.
+delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
+
+# Sed substitution to avoid accidental globbing in evaled expressions
+no_glob_subst='s/\*/\\\*/g'
+])
+
 # _LT_PROG_LTMAIN
 # ---------------
-# Note that this code is called both from `configure', and `config.status'
+# Note that this code is called both from 'configure', and 'config.status'
 # now that we use AC_CONFIG_COMMANDS to generate libtool.  Notably,
-# `config.status' has no value for ac_aux_dir unless we are using Automake,
+# 'config.status' has no value for ac_aux_dir unless we are using Automake,
 # so we pass a copy along to make sure it has a sensible value anyway.
 m4_defun([_LT_PROG_LTMAIN],
 [m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl
 _LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir'])
-ltmain="$ac_aux_dir/ltmain.sh"
+ltmain=$ac_aux_dir/ltmain.sh
 ])# _LT_PROG_LTMAIN
 
 
@@ -269,7 +297,7 @@ ltmain="$ac_aux_dir/ltmain.sh"
 
 # So that we can recreate a full libtool script including additional
 # tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS
-# in macros and then make a single call at the end using the `libtool'
+# in macros and then make a single call at the end using the 'libtool'
 # label.
 
 
@@ -404,11 +432,11 @@ m4_define([_lt_decl_all_varnames],
 
 # _LT_CONFIG_STATUS_DECLARE([VARNAME])
 # ------------------------------------
-# Quote a variable value, and forward it to `config.status' so that its
-# declaration there will have the same value as in `configure'.  VARNAME
+# Quote a variable value, and forward it to 'config.status' so that its
+# declaration there will have the same value as in 'configure'.  VARNAME
 # must have a single quote delimited value for this to work.
 m4_define([_LT_CONFIG_STATUS_DECLARE],
-[$1='`$ECHO "X$][$1" | $Xsed -e "$delay_single_quote_subst"`'])
+[$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`'])
 
 
 # _LT_CONFIG_STATUS_DECLARATIONS
@@ -418,7 +446,7 @@ m4_define([_LT_CONFIG_STATUS_DECLARE],
 # embedded single quotes properly.  In configure, this macro expands
 # each variable declared with _LT_DECL (and _LT_TAGDECL) into:
 #
-#    <var>='`$ECHO "X$<var>" | $Xsed -e "$delay_single_quote_subst"`'
+#    <var>='`$ECHO "$<var>" | $SED "$delay_single_quote_subst"`'
 m4_defun([_LT_CONFIG_STATUS_DECLARATIONS],
 [m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames),
     [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])])
@@ -429,7 +457,7 @@ m4_defun([_LT_CONFIG_STATUS_DECLARATIONS],
 # Output comment and list of tags supported by the script
 m4_defun([_LT_LIBTOOL_TAGS],
 [_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl
-available_tags="_LT_TAGS"dnl
+available_tags='_LT_TAGS'dnl
 ])
 
 
@@ -457,7 +485,7 @@ m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl
 # _LT_LIBTOOL_CONFIG_VARS
 # -----------------------
 # Produce commented declarations of non-tagged libtool config variables
-# suitable for insertion in the LIBTOOL CONFIG section of the `libtool'
+# suitable for insertion in the LIBTOOL CONFIG section of the 'libtool'
 # script.  Tagged libtool config variables (even for the LIBTOOL CONFIG
 # section) are produced by _LT_LIBTOOL_TAG_VARS.
 m4_defun([_LT_LIBTOOL_CONFIG_VARS],
@@ -483,8 +511,8 @@ m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])])
 # Send accumulated output to $CONFIG_STATUS.  Thanks to the lists of
 # variables for single and double quote escaping we saved from calls
 # to _LT_DECL, we can put quote escaped variables declarations
-# into `config.status', and then the shell code to quote escape them in
-# for loops in `config.status'.  Finally, any additional code accumulated
+# into 'config.status', and then the shell code to quote escape them in
+# for loops in 'config.status'.  Finally, any additional code accumulated
 # from calls to _LT_CONFIG_LIBTOOL_INIT is expanded.
 m4_defun([_LT_CONFIG_COMMANDS],
 [AC_PROVIDE_IFELSE([LT_OUTPUT],
@@ -517,12 +545,20 @@ LTCC='$LTCC'
 LTCFLAGS='$LTCFLAGS'
 compiler='$compiler_DEFAULT'
 
+# A function that is used when there is no print builtin or printf.
+func_fallback_echo ()
+{
+  eval 'cat <<_LTECHO_EOF
+\$[]1
+_LTECHO_EOF'
+}
+
 # Quote evaled strings.
 for var in lt_decl_all_varnames([[ \
 ]], lt_decl_quote_varnames); do
-    case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in
+    case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
     *[[\\\\\\\`\\"\\\$]]*)
-      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$sed_quote_subst\\"\\\`\\\\\\""
+      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes
       ;;
     *)
       eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
@@ -533,9 +569,9 @@ done
 # Double-quote double-evaled strings.
 for var in lt_decl_all_varnames([[ \
 ]], lt_decl_dquote_varnames); do
-    case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in
+    case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
     *[[\\\\\\\`\\"\\\$]]*)
-      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\""
+      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes
       ;;
     *)
       eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
@@ -543,16 +579,38 @@ for var in lt_decl_all_varnames([[ \
     esac
 done
 
-# Fix-up fallback echo if it was mangled by the above quoting rules.
-case \$lt_ECHO in
-*'\\\[$]0 --fallback-echo"')dnl "
-  lt_ECHO=\`\$ECHO "X\$lt_ECHO" | \$Xsed -e 's/\\\\\\\\\\\\\\\[$]0 --fallback-echo"\[$]/\[$]0 --fallback-echo"/'\`
-  ;;
-esac
-
 _LT_OUTPUT_LIBTOOL_INIT
 ])
 
+# _LT_GENERATED_FILE_INIT(FILE, [COMMENT])
+# ------------------------------------
+# Generate a child script FILE with all initialization necessary to
+# reuse the environment learned by the parent script, and make the
+# file executable.  If COMMENT is supplied, it is inserted after the
+# '#!' sequence but before initialization text begins.  After this
+# macro, additional text can be appended to FILE to form the body of
+# the child script.  The macro ends with non-zero status if the
+# file could not be fully written (such as if the disk is full).
+m4_ifdef([AS_INIT_GENERATED],
+[m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])],
+[m4_defun([_LT_GENERATED_FILE_INIT],
+[m4_require([AS_PREPARE])]dnl
+[m4_pushdef([AS_MESSAGE_LOG_FD])]dnl
+[lt_write_fail=0
+cat >$1 <<_ASEOF || lt_write_fail=1
+#! $SHELL
+# Generated by $as_me.
+$2
+SHELL=\${CONFIG_SHELL-$SHELL}
+export SHELL
+_ASEOF
+cat >>$1 <<\_ASEOF || lt_write_fail=1
+AS_SHELL_SANITIZE
+_AS_PREPARE
+exec AS_MESSAGE_FD>&1
+_ASEOF
+test 0 = "$lt_write_fail" && chmod +x $1[]dnl
+m4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT
 
 # LT_OUTPUT
 # ---------
@@ -562,20 +620,11 @@ _LT_OUTPUT_LIBTOOL_INIT
 AC_DEFUN([LT_OUTPUT],
 [: ${CONFIG_LT=./config.lt}
 AC_MSG_NOTICE([creating $CONFIG_LT])
-cat >"$CONFIG_LT" <<_LTEOF
-#! $SHELL
-# Generated by $as_me.
-# Run this file to recreate a libtool stub with the current configuration.
-
-lt_cl_silent=false
-SHELL=\${CONFIG_SHELL-$SHELL}
-_LTEOF
+_LT_GENERATED_FILE_INIT(["$CONFIG_LT"],
+[# Run this file to recreate a libtool stub with the current configuration.])
 
 cat >>"$CONFIG_LT" <<\_LTEOF
-AS_SHELL_SANITIZE
-_AS_PREPARE
-
-exec AS_MESSAGE_FD>&1
+lt_cl_silent=false
 exec AS_MESSAGE_LOG_FD>>config.log
 {
   echo
@@ -583,7 +632,7 @@ exec AS_MESSAGE_LOG_FD>>config.log
 } >&AS_MESSAGE_LOG_FD
 
 lt_cl_help="\
-\`$as_me' creates a local libtool stub from the current configuration,
+'$as_me' creates a local libtool stub from the current configuration,
 for use in further configure time tests before the real libtool is
 generated.
 
@@ -601,11 +650,11 @@ m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl
 m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION])
 configured by $[0], generated by m4_PACKAGE_STRING.
 
-Copyright (C) 2008 Free Software Foundation, Inc.
+Copyright (C) 2011 Free Software Foundation, Inc.
 This config.lt script is free software; the Free Software Foundation
 gives unlimited permision to copy, distribute and modify it."
 
-while test $[#] != 0
+while test 0 != $[#]
 do
   case $[1] in
     --version | --v* | -V )
@@ -618,10 +667,10 @@ do
       lt_cl_silent=: ;;
 
     -*) AC_MSG_ERROR([unrecognized option: $[1]
-Try \`$[0] --help' for more information.]) ;;
+Try '$[0] --help' for more information.]) ;;
 
     *) AC_MSG_ERROR([unrecognized argument: $[1]
-Try \`$[0] --help' for more information.]) ;;
+Try '$[0] --help' for more information.]) ;;
   esac
   shift
 done
@@ -646,15 +695,13 @@ chmod +x "$CONFIG_LT"
 # appending to config.log, which fails on DOS, as config.log is still kept
 # open by configure.  Here we exec the FD to /dev/null, effectively closing
 # config.log, so it can be properly (re)opened and appended to by config.lt.
-if test "$no_create" != yes; then
-  lt_cl_success=:
-  test "$silent" = yes &&
-    lt_config_lt_args="$lt_config_lt_args --quiet"
-  exec AS_MESSAGE_LOG_FD>/dev/null
-  $SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false
-  exec AS_MESSAGE_LOG_FD>>config.log
-  $lt_cl_success || AS_EXIT(1)
-fi
+lt_cl_success=:
+test yes = "$silent" &&
+  lt_config_lt_args="$lt_config_lt_args --quiet"
+exec AS_MESSAGE_LOG_FD>/dev/null
+$SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false
+exec AS_MESSAGE_LOG_FD>>config.log
+$lt_cl_success || AS_EXIT(1)
 ])# LT_OUTPUT
 
 
@@ -669,27 +716,31 @@ m4_defun([_LT_CONFIG],
 _LT_CONFIG_SAVE_COMMANDS([
   m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl
   m4_if(_LT_TAG, [C], [
-    # See if we are running on zsh, and set the options which allow our
+    # See if we are running on zsh, and set the options that allow our
     # commands through without removal of \ escapes.
-    if test -n "${ZSH_VERSION+set}" ; then
+    if test -n "${ZSH_VERSION+set}"; then
       setopt NO_GLOB_SUBST
     fi
 
-    cfgfile="${ofile}T"
+    cfgfile=${ofile}T
     trap "$RM \"$cfgfile\"; exit 1" 1 2 15
     $RM "$cfgfile"
 
     cat <<_LT_EOF >> "$cfgfile"
 #! $SHELL
-
-# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
-# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION
+# Generated automatically by $as_me ($PACKAGE) $VERSION
 # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
 # NOTE: Changes made to this file will be lost: look at ltmain.sh.
-#
+
+# Provide generalized library-building support services.
+# Written by Gordon Matzigkeit, 1996
+
 _LT_COPYING
 _LT_LIBTOOL_TAGS
 
+# Configured defaults for sys_lib_dlsearch_path munging.
+: \${LT_SYS_LIBRARY_PATH="$configure_time_lt_sys_library_path"}
+
 # ### BEGIN LIBTOOL CONFIG
 _LT_LIBTOOL_CONFIG_VARS
 _LT_LIBTOOL_TAG_VARS
@@ -697,13 +748,24 @@ _LT_LIBTOOL_TAG_VARS
 
 _LT_EOF
 
+    cat <<'_LT_EOF' >> "$cfgfile"
+
+# ### BEGIN FUNCTIONS SHARED WITH CONFIGURE
+
+_LT_PREPARE_MUNGE_PATH_LIST
+_LT_PREPARE_CC_BASENAME
+
+# ### END FUNCTIONS SHARED WITH CONFIGURE
+
+_LT_EOF
+
   case $host_os in
   aix3*)
     cat <<\_LT_EOF >> "$cfgfile"
 # AIX sometimes has problems with the GCC collect2 program.  For some
 # reason, if we set the COLLECT_NAMES environment variable, the problems
 # vanish in a puff of smoke.
-if test "X${COLLECT_NAMES+set}" != Xset; then
+if test set != "${COLLECT_NAMES+set}"; then
   COLLECT_NAMES=
   export COLLECT_NAMES
 fi
@@ -717,15 +779,10 @@ _LT_EOF
   # if finds mixed CR/LF and LF-only lines.  Since sed operates in
   # text mode, it properly converts lines to CR/LF.  This bash problem
   # is reportedly fixed, but why not run on old versions too?
-  sed '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \
-    || (rm -f "$cfgfile"; exit 1)
-
-  _LT_PROG_XSI_SHELLFNS
+  sed '$q' "$ltmain" >> "$cfgfile" \
+     || (rm -f "$cfgfile"; exit 1)
 
-  sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \
-    || (rm -f "$cfgfile"; exit 1)
-
-  mv -f "$cfgfile" "$ofile" ||
+   mv -f "$cfgfile" "$ofile" ||
     (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
   chmod +x "$ofile"
 ],
@@ -742,7 +799,6 @@ _LT_EOF
 [m4_if([$1], [], [
     PACKAGE='$PACKAGE'
     VERSION='$VERSION'
-    TIMESTAMP='$TIMESTAMP'
     RM='$RM'
     ofile='$ofile'], [])
 ])dnl /_LT_CONFIG_SAVE_COMMANDS
@@ -770,6 +826,7 @@ AC_DEFUN([LT_LANG],
 m4_case([$1],
   [C],			[_LT_LANG(C)],
   [C++],		[_LT_LANG(CXX)],
+  [Go],			[_LT_LANG(GO)],
   [Java],		[_LT_LANG(GCJ)],
   [Fortran 77],		[_LT_LANG(F77)],
   [Fortran],		[_LT_LANG(FC)],
@@ -791,6 +848,31 @@ m4_defun([_LT_LANG],
 ])# _LT_LANG
 
 
+m4_ifndef([AC_PROG_GO], [
+############################################################
+# NOTE: This macro has been submitted for inclusion into   #
+#  GNU Autoconf as AC_PROG_GO.  When it is available in    #
+#  a released version of Autoconf we should remove this    #
+#  macro and use it instead.                               #
+############################################################
+m4_defun([AC_PROG_GO],
+[AC_LANG_PUSH(Go)dnl
+AC_ARG_VAR([GOC],     [Go compiler command])dnl
+AC_ARG_VAR([GOFLAGS], [Go compiler flags])dnl
+_AC_ARG_VAR_LDFLAGS()dnl
+AC_CHECK_TOOL(GOC, gccgo)
+if test -z "$GOC"; then
+  if test -n "$ac_tool_prefix"; then
+    AC_CHECK_PROG(GOC, [${ac_tool_prefix}gccgo], [${ac_tool_prefix}gccgo])
+  fi
+fi
+if test -z "$GOC"; then
+  AC_CHECK_PROG(GOC, gccgo, gccgo, false)
+fi
+])#m4_defun
+])#m4_ifndef
+
+
 # _LT_LANG_DEFAULT_CONFIG
 # -----------------------
 m4_defun([_LT_LANG_DEFAULT_CONFIG],
@@ -821,6 +903,10 @@ AC_PROVIDE_IFELSE([AC_PROG_GCJ],
        m4_ifdef([LT_PROG_GCJ],
 	[m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])])
 
+AC_PROVIDE_IFELSE([AC_PROG_GO],
+  [LT_LANG(GO)],
+  [m4_define([AC_PROG_GO], defn([AC_PROG_GO])[LT_LANG(GO)])])
+
 AC_PROVIDE_IFELSE([LT_PROG_RC],
   [LT_LANG(RC)],
   [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])])
@@ -831,11 +917,13 @@ AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)])
 AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)])
 AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)])
 AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)])
+AU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)])
 dnl aclocal-1.4 backwards compatibility:
 dnl AC_DEFUN([AC_LIBTOOL_CXX], [])
 dnl AC_DEFUN([AC_LIBTOOL_F77], [])
 dnl AC_DEFUN([AC_LIBTOOL_FC], [])
 dnl AC_DEFUN([AC_LIBTOOL_GCJ], [])
+dnl AC_DEFUN([AC_LIBTOOL_RC], [])
 
 
 # _LT_TAG_COMPILER
@@ -909,7 +997,7 @@ m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[
 
     AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod],
       [lt_cv_apple_cc_single_mod=no
-      if test -z "${LT_MULTI_MODULE}"; then
+      if test -z "$LT_MULTI_MODULE"; then
 	# By default we will add the -single_module flag. You can override
 	# by either setting the environment variable LT_MULTI_MODULE
 	# non-empty at configure time, or by adding -multi_module to the
@@ -921,7 +1009,13 @@ m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[
 	$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
 	  -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
         _lt_result=$?
-	if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then
+	# If there is a non-empty error log, and "single_module"
+	# appears in it, assume the flag caused a linker warning
+        if test -s conftest.err && $GREP single_module conftest.err; then
+	  cat conftest.err >&AS_MESSAGE_LOG_FD
+	# Otherwise, if the output was created with a 0 exit code from
+	# the compiler, it worked.
+	elif test -f libconftest.dylib && test 0 = "$_lt_result"; then
 	  lt_cv_apple_cc_single_mod=yes
 	else
 	  cat conftest.err >&AS_MESSAGE_LOG_FD
@@ -929,6 +1023,7 @@ m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[
 	rm -rf libconftest.dylib*
 	rm -f conftest.*
       fi])
+
     AC_CACHE_CHECK([for -exported_symbols_list linker flag],
       [lt_cv_ld_exported_symbols_list],
       [lt_cv_ld_exported_symbols_list=no
@@ -938,36 +1033,64 @@ m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[
       AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
 	[lt_cv_ld_exported_symbols_list=yes],
 	[lt_cv_ld_exported_symbols_list=no])
-	LDFLAGS="$save_LDFLAGS"
+	LDFLAGS=$save_LDFLAGS
+    ])
+
+    AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load],
+      [lt_cv_ld_force_load=no
+      cat > conftest.c << _LT_EOF
+int forced_loaded() { return 2;}
+_LT_EOF
+      echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD
+      $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD
+      echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD
+      $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD
+      echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD
+      $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD
+      cat > conftest.c << _LT_EOF
+int main() { return 0;}
+_LT_EOF
+      echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD
+      $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err
+      _lt_result=$?
+      if test -s conftest.err && $GREP force_load conftest.err; then
+	cat conftest.err >&AS_MESSAGE_LOG_FD
+      elif test -f conftest && test 0 = "$_lt_result" && $GREP forced_load conftest >/dev/null 2>&1; then
+	lt_cv_ld_force_load=yes
+      else
+	cat conftest.err >&AS_MESSAGE_LOG_FD
+      fi
+        rm -f conftest.err libconftest.a conftest conftest.c
+        rm -rf conftest.dSYM
     ])
     case $host_os in
     rhapsody* | darwin1.[[012]])
-      _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;;
+      _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;;
     darwin1.*)
-      _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
+      _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
     darwin*) # darwin 5.x on
       # if running on 10.5 or later, the deployment target defaults
       # to the OS version, if on x86, and 10.4, the deployment
       # target defaults to 10.4. Don't you love it?
       case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
 	10.0,*86*-darwin8*|10.0,*-darwin[[91]]*)
-	  _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
-	10.[[012]]*)
-	  _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
+	  _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;;
+	10.[[012]][[,.]]*)
+	  _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
 	10.*)
-	  _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
+	  _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;;
       esac
     ;;
   esac
-    if test "$lt_cv_apple_cc_single_mod" = "yes"; then
+    if test yes = "$lt_cv_apple_cc_single_mod"; then
       _lt_dar_single_mod='$single_module'
     fi
-    if test "$lt_cv_ld_exported_symbols_list" = "yes"; then
-      _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym'
+    if test yes = "$lt_cv_ld_exported_symbols_list"; then
+      _lt_dar_export_syms=' $wl-exported_symbols_list,$output_objdir/$libname-symbols.expsym'
     else
-      _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}'
+      _lt_dar_export_syms='~$NMEDIT -s $output_objdir/$libname-symbols.expsym $lib'
     fi
-    if test "$DSYMUTIL" != ":"; then
+    if test : != "$DSYMUTIL" && test no = "$lt_cv_ld_force_load"; then
       _lt_dsymutil='~$DSYMUTIL $lib || :'
     else
       _lt_dsymutil=
@@ -977,8 +1100,8 @@ m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[
 ])
 
 
-# _LT_DARWIN_LINKER_FEATURES
-# --------------------------
+# _LT_DARWIN_LINKER_FEATURES([TAG])
+# ---------------------------------
 # Checks for linker and compiler features on darwin
 m4_defun([_LT_DARWIN_LINKER_FEATURES],
 [
@@ -987,23 +1110,29 @@ m4_defun([_LT_DARWIN_LINKER_FEATURES],
   _LT_TAGVAR(hardcode_direct, $1)=no
   _LT_TAGVAR(hardcode_automatic, $1)=yes
   _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
-  _LT_TAGVAR(whole_archive_flag_spec, $1)=''
+  if test yes = "$lt_cv_ld_force_load"; then
+    _LT_TAGVAR(whole_archive_flag_spec, $1)='`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience $wl-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`'
+    m4_case([$1], [F77], [_LT_TAGVAR(compiler_needs_object, $1)=yes],
+                  [FC],  [_LT_TAGVAR(compiler_needs_object, $1)=yes])
+  else
+    _LT_TAGVAR(whole_archive_flag_spec, $1)=''
+  fi
   _LT_TAGVAR(link_all_deplibs, $1)=yes
-  _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined"
+  _LT_TAGVAR(allow_undefined_flag, $1)=$_lt_dar_allow_undefined
   case $cc_basename in
-     ifort*) _lt_dar_can_shared=yes ;;
+     ifort*|nagfor*) _lt_dar_can_shared=yes ;;
      *) _lt_dar_can_shared=$GCC ;;
   esac
-  if test "$_lt_dar_can_shared" = "yes"; then
-    output_verbose_link_cmd=echo
-    _LT_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}"
-    _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
-    _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}"
-    _LT_TAGVAR(module_expsym_cmds, $1)="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}"
+  if test yes = "$_lt_dar_can_shared"; then
+    output_verbose_link_cmd=func_echo_all
+    _LT_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dsymutil"
+    _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil"
+    _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dar_export_syms$_lt_dsymutil"
+    _LT_TAGVAR(module_expsym_cmds, $1)="sed -e 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dar_export_syms$_lt_dsymutil"
     m4_if([$1], [CXX],
-[   if test "$lt_cv_apple_cc_single_mod" != "yes"; then
-      _LT_TAGVAR(archive_cmds, $1)="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}"
-      _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}"
+[   if test yes != "$lt_cv_apple_cc_single_mod"; then
+      _LT_TAGVAR(archive_cmds, $1)="\$CC -r -keep_private_externs -nostdlib -o \$lib-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$lib-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring$_lt_dsymutil"
+      _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \$lib-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$lib-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring$_lt_dar_export_syms$_lt_dsymutil"
     fi
 ],[])
   else
@@ -1011,234 +1140,176 @@ m4_defun([_LT_DARWIN_LINKER_FEATURES],
   fi
 ])
 
-# _LT_SYS_MODULE_PATH_AIX
-# -----------------------
+# _LT_SYS_MODULE_PATH_AIX([TAGNAME])
+# ----------------------------------
 # Links a minimal program and checks the executable
 # for the system default hardcoded library path. In most cases,
 # this is /usr/lib:/lib, but when the MPI compilers are used
 # the location of the communication and MPI libs are included too.
 # If we don't find anything, use the default library path according
 # to the aix ld manual.
+# Store the results from the different compilers for each TAGNAME.
+# Allow to override them for all tags through lt_cv_aix_libpath.
 m4_defun([_LT_SYS_MODULE_PATH_AIX],
 [m4_require([_LT_DECL_SED])dnl
-AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],[
-lt_aix_libpath_sed='
-    /Import File Strings/,/^$/ {
-	/^0/ {
-	    s/^0  *\(.*\)$/\1/
-	    p
-	}
-    }'
-aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
-# Check for a 64-bit object if we didn't find anything.
-if test -z "$aix_libpath"; then
-  aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
-fi],[])
-if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+if test set = "${lt_cv_aix_libpath+set}"; then
+  aix_libpath=$lt_cv_aix_libpath
+else
+  AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])],
+  [AC_LINK_IFELSE([AC_LANG_PROGRAM],[
+  lt_aix_libpath_sed='[
+      /Import File Strings/,/^$/ {
+	  /^0/ {
+	      s/^0  *\([^ ]*\) *$/\1/
+	      p
+	  }
+      }]'
+  _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+  # Check for a 64-bit object if we didn't find anything.
+  if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then
+    _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+  fi],[])
+  if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then
+    _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=/usr/lib:/lib
+  fi
+  ])
+  aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])
+fi
 ])# _LT_SYS_MODULE_PATH_AIX
 
 
 # _LT_SHELL_INIT(ARG)
 # -------------------
 m4_define([_LT_SHELL_INIT],
-[ifdef([AC_DIVERSION_NOTICE],
-	     [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
-	 [AC_DIVERT_PUSH(NOTICE)])
-$1
-AC_DIVERT_POP
-])# _LT_SHELL_INIT
+[m4_divert_text([M4SH-INIT], [$1
+])])# _LT_SHELL_INIT
+
 
 
 # _LT_PROG_ECHO_BACKSLASH
 # -----------------------
-# Add some code to the start of the generated configure script which
-# will find an echo command which doesn't interpret backslashes.
+# Find how we can fake an echo command that does not interpret backslash.
+# In particular, with Autoconf 2.60 or later we add some code to the start
+# of the generated configure script that will find a shell with a builtin
+# printf (that we can use as an echo command).
 m4_defun([_LT_PROG_ECHO_BACKSLASH],
-[_LT_SHELL_INIT([
-# Check that we are running under the correct shell.
-SHELL=${CONFIG_SHELL-/bin/sh}
-
-case X$lt_ECHO in
-X*--fallback-echo)
-  # Remove one level of quotation (which was required for Make).
-  ECHO=`echo "$lt_ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','`
-  ;;
-esac
-
-ECHO=${lt_ECHO-echo}
-if test "X[$]1" = X--no-reexec; then
-  # Discard the --no-reexec flag, and continue.
-  shift
-elif test "X[$]1" = X--fallback-echo; then
-  # Avoid inline document here, it may be left over
-  :
-elif test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' ; then
-  # Yippee, $ECHO works!
-  :
+[ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
+ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
+ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
+
+AC_MSG_CHECKING([how to print strings])
+# Test print first, because it will be a builtin if present.
+if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \
+   test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then
+  ECHO='print -r --'
+elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then
+  ECHO='printf %s\n'
 else
-  # Restart under the correct shell.
-  exec $SHELL "[$]0" --no-reexec ${1+"[$]@"}
-fi
-
-if test "X[$]1" = X--fallback-echo; then
-  # used as fallback echo
-  shift
-  cat <<_LT_EOF
-[$]*
-_LT_EOF
-  exit 0
+  # Use this function as a fallback that always works.
+  func_fallback_echo ()
+  {
+    eval 'cat <<_LTECHO_EOF
+$[]1
+_LTECHO_EOF'
+  }
+  ECHO='func_fallback_echo'
 fi
 
-# The HP-UX ksh and POSIX shell print the target directory to stdout
-# if CDPATH is set.
-(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
-
-if test -z "$lt_ECHO"; then
-  if test "X${echo_test_string+set}" != Xset; then
-    # find a string as large as possible, as long as the shell can cope with it
-    for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do
-      # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
-      if { echo_test_string=`eval $cmd`; } 2>/dev/null &&
-	 { test "X$echo_test_string" = "X$echo_test_string"; } 2>/dev/null
-      then
-        break
-      fi
-    done
-  fi
-
-  if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' &&
-     echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` &&
-     test "X$echo_testing_string" = "X$echo_test_string"; then
-    :
-  else
-    # The Solaris, AIX, and Digital Unix default echo programs unquote
-    # backslashes.  This makes it impossible to quote backslashes using
-    #   echo "$something" | sed 's/\\/\\\\/g'
-    #
-    # So, first we look for a working echo in the user's PATH.
-
-    lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
-    for dir in $PATH /usr/ucb; do
-      IFS="$lt_save_ifs"
-      if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
-         test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
-         echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
-         test "X$echo_testing_string" = "X$echo_test_string"; then
-        ECHO="$dir/echo"
-        break
-      fi
-    done
-    IFS="$lt_save_ifs"
-
-    if test "X$ECHO" = Xecho; then
-      # We didn't find a better echo, so look for alternatives.
-      if test "X`{ print -r '\t'; } 2>/dev/null`" = 'X\t' &&
-         echo_testing_string=`{ print -r "$echo_test_string"; } 2>/dev/null` &&
-         test "X$echo_testing_string" = "X$echo_test_string"; then
-        # This shell has a builtin print -r that does the trick.
-        ECHO='print -r'
-      elif { test -f /bin/ksh || test -f /bin/ksh$ac_exeext; } &&
-	   test "X$CONFIG_SHELL" != X/bin/ksh; then
-        # If we have ksh, try running configure again with it.
-        ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
-        export ORIGINAL_CONFIG_SHELL
-        CONFIG_SHELL=/bin/ksh
-        export CONFIG_SHELL
-        exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"}
-      else
-        # Try using printf.
-        ECHO='printf %s\n'
-        if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' &&
-	   echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` &&
-	   test "X$echo_testing_string" = "X$echo_test_string"; then
-	  # Cool, printf works
-	  :
-        elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
-	     test "X$echo_testing_string" = 'X\t' &&
-	     echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
-	     test "X$echo_testing_string" = "X$echo_test_string"; then
-	  CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
-	  export CONFIG_SHELL
-	  SHELL="$CONFIG_SHELL"
-	  export SHELL
-	  ECHO="$CONFIG_SHELL [$]0 --fallback-echo"
-        elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
-	     test "X$echo_testing_string" = 'X\t' &&
-	     echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
-	     test "X$echo_testing_string" = "X$echo_test_string"; then
-	  ECHO="$CONFIG_SHELL [$]0 --fallback-echo"
-        else
-	  # maybe with a smaller string...
-	  prev=:
-
-	  for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do
-	    if { test "X$echo_test_string" = "X`eval $cmd`"; } 2>/dev/null
-	    then
-	      break
-	    fi
-	    prev="$cmd"
-	  done
+# func_echo_all arg...
+# Invoke $ECHO with all args, space-separated.
+func_echo_all ()
+{
+    $ECHO "$*"
+}
 
-	  if test "$prev" != 'sed 50q "[$]0"'; then
-	    echo_test_string=`eval $prev`
-	    export echo_test_string
-	    exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"}
-	  else
-	    # Oops.  We lost completely, so just stick with echo.
-	    ECHO=echo
-	  fi
-        fi
-      fi
-    fi
-  fi
-fi
+case $ECHO in
+  printf*) AC_MSG_RESULT([printf]) ;;
+  print*) AC_MSG_RESULT([print -r]) ;;
+  *) AC_MSG_RESULT([cat]) ;;
+esac
 
-# Copy echo and quote the copy suitably for passing to libtool from
-# the Makefile, instead of quoting the original, which is used later.
-lt_ECHO=$ECHO
-if test "X$lt_ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then
-   lt_ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo"
-fi
+m4_ifdef([_AS_DETECT_SUGGESTED],
+[_AS_DETECT_SUGGESTED([
+  test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || (
+    ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
+    ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
+    ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
+    PATH=/empty FPATH=/empty; export PATH FPATH
+    test "X`printf %s $ECHO`" = "X$ECHO" \
+      || test "X`print -r -- $ECHO`" = "X$ECHO" )])])
 
-AC_SUBST(lt_ECHO)
-])
 _LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts])
-_LT_DECL([], [ECHO], [1],
-    [An echo program that does not interpret backslashes])
+_LT_DECL([], [ECHO], [1], [An echo program that protects backslashes])
 ])# _LT_PROG_ECHO_BACKSLASH
 
 
+# _LT_WITH_SYSROOT
+# ----------------
+AC_DEFUN([_LT_WITH_SYSROOT],
+[AC_MSG_CHECKING([for sysroot])
+AC_ARG_WITH([sysroot],
+[AS_HELP_STRING([--with-sysroot@<:@=DIR@:>@],
+  [Search for dependent libraries within DIR (or the compiler's sysroot
+   if not specified).])],
+[], [with_sysroot=no])
+
+dnl lt_sysroot will always be passed unquoted.  We quote it here
+dnl in case the user passed a directory name.
+lt_sysroot=
+case $with_sysroot in #(
+ yes)
+   if test yes = "$GCC"; then
+     lt_sysroot=`$CC --print-sysroot 2>/dev/null`
+   fi
+   ;; #(
+ /*)
+   lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"`
+   ;; #(
+ no|'')
+   ;; #(
+ *)
+   AC_MSG_RESULT([$with_sysroot])
+   AC_MSG_ERROR([The sysroot must be an absolute path.])
+   ;;
+esac
+
+ AC_MSG_RESULT([${lt_sysroot:-no}])
+_LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl
+[dependent libraries, and where our libraries should be installed.])])
+
 # _LT_ENABLE_LOCK
 # ---------------
 m4_defun([_LT_ENABLE_LOCK],
 [AC_ARG_ENABLE([libtool-lock],
   [AS_HELP_STRING([--disable-libtool-lock],
     [avoid locking (might break parallel builds)])])
-test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
+test no = "$enable_libtool_lock" || enable_libtool_lock=yes
 
 # Some flags need to be propagated to the compiler or linker for good
 # libtool support.
 case $host in
 ia64-*-hpux*)
-  # Find out which ABI we are using.
+  # Find out what ABI is being produced by ac_compile, and set mode
+  # options accordingly.
   echo 'int i;' > conftest.$ac_ext
   if AC_TRY_EVAL(ac_compile); then
     case `/usr/bin/file conftest.$ac_objext` in
       *ELF-32*)
-	HPUX_IA64_MODE="32"
+	HPUX_IA64_MODE=32
 	;;
       *ELF-64*)
-	HPUX_IA64_MODE="64"
+	HPUX_IA64_MODE=64
 	;;
     esac
   fi
   rm -rf conftest*
   ;;
 *-*-irix6*)
-  # Find out which ABI we are using.
-  echo '[#]line __oline__ "configure"' > conftest.$ac_ext
+  # Find out what ABI is being produced by ac_compile, and set linker
+  # options accordingly.
+  echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext
   if AC_TRY_EVAL(ac_compile); then
-    if test "$lt_cv_prog_gnu_ld" = yes; then
+    if test yes = "$lt_cv_prog_gnu_ld"; then
       case `/usr/bin/file conftest.$ac_objext` in
 	*32-bit*)
 	  LD="${LD-ld} -melf32bsmip"
@@ -1267,9 +1338,46 @@ ia64-*-hpux*)
   rm -rf conftest*
   ;;
 
-x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \
+mips64*-*linux*)
+  # Find out what ABI is being produced by ac_compile, and set linker
+  # options accordingly.
+  echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext
+  if AC_TRY_EVAL(ac_compile); then
+    emul=elf
+    case `/usr/bin/file conftest.$ac_objext` in
+      *32-bit*)
+	emul="${emul}32"
+	;;
+      *64-bit*)
+	emul="${emul}64"
+	;;
+    esac
+    case `/usr/bin/file conftest.$ac_objext` in
+      *MSB*)
+	emul="${emul}btsmip"
+	;;
+      *LSB*)
+	emul="${emul}ltsmip"
+	;;
+    esac
+    case `/usr/bin/file conftest.$ac_objext` in
+      *N32*)
+	emul="${emul}n32"
+	;;
+    esac
+    LD="${LD-ld} -m $emul"
+  fi
+  rm -rf conftest*
+  ;;
+
+x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \
 s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
-  # Find out which ABI we are using.
+  # Find out what ABI is being produced by ac_compile, and set linker
+  # options accordingly.  Note that the listed cases only cover the
+  # situations where additional linker options are needed (such as when
+  # doing 32-bit compilation for a host where ld defaults to 64-bit, or
+  # vice versa); the common cases where no linker options are needed do
+  # not appear in the list.
   echo 'int i;' > conftest.$ac_ext
   if AC_TRY_EVAL(ac_compile); then
     case `/usr/bin/file conftest.o` in
@@ -1279,9 +1387,19 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
 	    LD="${LD-ld} -m elf_i386_fbsd"
 	    ;;
 	  x86_64-*linux*)
-	    LD="${LD-ld} -m elf_i386"
+	    case `/usr/bin/file conftest.o` in
+	      *x86-64*)
+		LD="${LD-ld} -m elf32_x86_64"
+		;;
+	      *)
+		LD="${LD-ld} -m elf_i386"
+		;;
+	    esac
 	    ;;
-	  ppc64-*linux*|powerpc64-*linux*)
+	  powerpc64le-*linux*)
+	    LD="${LD-ld} -m elf32lppclinux"
+	    ;;
+	  powerpc64-*linux*)
 	    LD="${LD-ld} -m elf32ppclinux"
 	    ;;
 	  s390x-*linux*)
@@ -1300,7 +1418,10 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
 	  x86_64-*linux*)
 	    LD="${LD-ld} -m elf_x86_64"
 	    ;;
-	  ppc*-*linux*|powerpc*-*linux*)
+	  powerpcle-*linux*)
+	    LD="${LD-ld} -m elf64lppc"
+	    ;;
+	  powerpc-*linux*)
 	    LD="${LD-ld} -m elf64ppc"
 	    ;;
 	  s390*-*linux*|s390*-*tpf*)
@@ -1318,25 +1439,39 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
 
 *-*-sco3.2v5*)
   # On SCO OpenServer 5, we need -belf to get full-featured binaries.
-  SAVE_CFLAGS="$CFLAGS"
+  SAVE_CFLAGS=$CFLAGS
   CFLAGS="$CFLAGS -belf"
   AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
     [AC_LANG_PUSH(C)
      AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
      AC_LANG_POP])
-  if test x"$lt_cv_cc_needs_belf" != x"yes"; then
+  if test yes != "$lt_cv_cc_needs_belf"; then
     # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
-    CFLAGS="$SAVE_CFLAGS"
+    CFLAGS=$SAVE_CFLAGS
   fi
   ;;
-sparc*-*solaris*)
-  # Find out which ABI we are using.
+*-*solaris*)
+  # Find out what ABI is being produced by ac_compile, and set linker
+  # options accordingly.
   echo 'int i;' > conftest.$ac_ext
   if AC_TRY_EVAL(ac_compile); then
     case `/usr/bin/file conftest.o` in
     *64-bit*)
       case $lt_cv_prog_gnu_ld in
-      yes*) LD="${LD-ld} -m elf64_sparc" ;;
+      yes*)
+        case $host in
+        i?86-*-solaris*|x86_64-*-solaris*)
+          LD="${LD-ld} -m elf_x86_64"
+          ;;
+        sparc*-*-solaris*)
+          LD="${LD-ld} -m elf64_sparc"
+          ;;
+        esac
+        # GNU ld 2.21 introduced _sol2 emulations.  Use them if available.
+        if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then
+          LD=${LD-ld}_sol2
+        fi
+        ;;
       *)
 	if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
 	  LD="${LD-ld} -64"
@@ -1350,18 +1485,51 @@ sparc*-*solaris*)
   ;;
 esac
 
-need_locks="$enable_libtool_lock"
+need_locks=$enable_libtool_lock
 ])# _LT_ENABLE_LOCK
 
 
+# _LT_PROG_AR
+# -----------
+m4_defun([_LT_PROG_AR],
+[AC_CHECK_TOOLS(AR, [ar], false)
+: ${AR=ar}
+: ${AR_FLAGS=cru}
+_LT_DECL([], [AR], [1], [The archiver])
+_LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive])
+
+AC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file],
+  [lt_cv_ar_at_file=no
+   AC_COMPILE_IFELSE([AC_LANG_PROGRAM],
+     [echo conftest.$ac_objext > conftest.lst
+      lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD'
+      AC_TRY_EVAL([lt_ar_try])
+      if test 0 -eq "$ac_status"; then
+	# Ensure the archiver fails upon bogus file names.
+	rm -f conftest.$ac_objext libconftest.a
+	AC_TRY_EVAL([lt_ar_try])
+	if test 0 -ne "$ac_status"; then
+          lt_cv_ar_at_file=@
+        fi
+      fi
+      rm -f conftest.* libconftest.a
+     ])
+  ])
+
+if test no = "$lt_cv_ar_at_file"; then
+  archiver_list_spec=
+else
+  archiver_list_spec=$lt_cv_ar_at_file
+fi
+_LT_DECL([], [archiver_list_spec], [1],
+  [How to feed a file listing to the archiver])
+])# _LT_PROG_AR
+
+
 # _LT_CMD_OLD_ARCHIVE
 # -------------------
 m4_defun([_LT_CMD_OLD_ARCHIVE],
-[AC_CHECK_TOOL(AR, ar, false)
-test -z "$AR" && AR=ar
-test -z "$AR_FLAGS" && AR_FLAGS=cru
-_LT_DECL([], [AR], [1], [The archiver])
-_LT_DECL([], [AR_FLAGS], [1])
+[_LT_PROG_AR
 
 AC_CHECK_TOOL(STRIP, strip, :)
 test -z "$STRIP" && STRIP=:
@@ -1379,19 +1547,28 @@ old_postuninstall_cmds=
 
 if test -n "$RANLIB"; then
   case $host_os in
-  openbsd*)
-    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib"
+  bitrig* | openbsd*)
+    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib"
     ;;
   *)
-    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib"
+    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib"
     ;;
   esac
-  old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
+  old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib"
 fi
+
+case $host_os in
+  darwin*)
+    lock_old_archive_extraction=yes ;;
+  *)
+    lock_old_archive_extraction=no ;;
+esac
 _LT_DECL([], [old_postinstall_cmds], [2])
 _LT_DECL([], [old_postuninstall_cmds], [2])
 _LT_TAGDECL([], [old_archive_cmds], [2],
     [Commands used to build an old-style archive])
+_LT_DECL([], [lock_old_archive_extraction], [0],
+    [Whether to use a lock for old archive extraction])
 ])# _LT_CMD_OLD_ARCHIVE
 
 
@@ -1406,7 +1583,7 @@ AC_CACHE_CHECK([$1], [$2],
   [$2=no
    m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
    echo "$lt_simple_compile_test_code" > conftest.$ac_ext
-   lt_compiler_flag="$3"
+   lt_compiler_flag="$3"  ## exclude from sc_useless_quotes_in_assignment
    # Insert the option either (1) after the last *FLAGS variable, or
    # (2) before a word containing "conftest.", or (3) at the end.
    # Note that $ac_compile itself does not contain backslashes and begins
@@ -1416,15 +1593,15 @@ AC_CACHE_CHECK([$1], [$2],
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
+   (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
    (eval "$lt_compile" 2>conftest.err)
    ac_status=$?
    cat conftest.err >&AS_MESSAGE_LOG_FD
-   echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
+   echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
    if (exit $ac_status) && test -s "$ac_outfile"; then
      # The compiler can only warn and ignore the option if not recognized
      # So say no if there are warnings other than the usual output.
-     $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
+     $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
      $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
      if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
        $2=yes
@@ -1433,7 +1610,7 @@ AC_CACHE_CHECK([$1], [$2],
    $RM conftest*
 ])
 
-if test x"[$]$2" = xyes; then
+if test yes = "[$]$2"; then
     m4_if([$5], , :, [$5])
 else
     m4_if([$6], , :, [$6])
@@ -1455,7 +1632,7 @@ AC_DEFUN([_LT_LINKER_OPTION],
 m4_require([_LT_DECL_SED])dnl
 AC_CACHE_CHECK([$1], [$2],
   [$2=no
-   save_LDFLAGS="$LDFLAGS"
+   save_LDFLAGS=$LDFLAGS
    LDFLAGS="$LDFLAGS $3"
    echo "$lt_simple_link_test_code" > conftest.$ac_ext
    if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
@@ -1464,7 +1641,7 @@ AC_CACHE_CHECK([$1], [$2],
      if test -s conftest.err; then
        # Append any errors to the config.log.
        cat conftest.err 1>&AS_MESSAGE_LOG_FD
-       $ECHO "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp
+       $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
        $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
        if diff conftest.exp conftest.er2 >/dev/null; then
          $2=yes
@@ -1474,10 +1651,10 @@ AC_CACHE_CHECK([$1], [$2],
      fi
    fi
    $RM -r conftest*
-   LDFLAGS="$save_LDFLAGS"
+   LDFLAGS=$save_LDFLAGS
 ])
 
-if test x"[$]$2" = xyes; then
+if test yes = "[$]$2"; then
     m4_if([$4], , :, [$4])
 else
     m4_if([$5], , :, [$5])
@@ -1498,7 +1675,7 @@ AC_DEFUN([LT_CMD_MAX_LEN],
 AC_MSG_CHECKING([the maximum length of command line arguments])
 AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
   i=0
-  teststring="ABCD"
+  teststring=ABCD
 
   case $build_os in
   msdosdjgpp*)
@@ -1527,13 +1704,18 @@ AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
     lt_cv_sys_max_cmd_len=8192;
     ;;
 
+  mint*)
+    # On MiNT this can take a long time and run out of memory.
+    lt_cv_sys_max_cmd_len=8192;
+    ;;
+
   amigaos*)
     # On AmigaOS with pdksh, this test takes hours, literally.
     # So we just punt and use a minimum line length of 8192.
     lt_cv_sys_max_cmd_len=8192;
     ;;
 
-  netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
+  bitrig* | darwin* | dragonfly* | freebsd* | netbsd* | openbsd*)
     # This has been around since 386BSD, at least.  Likely further.
     if test -x /sbin/sysctl; then
       lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
@@ -1552,6 +1734,11 @@ AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
     lt_cv_sys_max_cmd_len=196608
     ;;
 
+  os2*)
+    # The test takes a long time on OS/2.
+    lt_cv_sys_max_cmd_len=8192
+    ;;
+
   osf*)
     # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
     # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
@@ -1578,22 +1765,23 @@ AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
     ;;
   *)
     lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
-    if test -n "$lt_cv_sys_max_cmd_len"; then
+    if test -n "$lt_cv_sys_max_cmd_len" && \
+       test undefined != "$lt_cv_sys_max_cmd_len"; then
       lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
       lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
     else
       # Make teststring a little bigger before we do anything with it.
       # a 1K string should be a reasonable start.
-      for i in 1 2 3 4 5 6 7 8 ; do
+      for i in 1 2 3 4 5 6 7 8; do
         teststring=$teststring$teststring
       done
       SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
       # If test is not a shell built-in, we'll probably end up computing a
       # maximum length that is only half of the actual maximum length, but
       # we can't tell.
-      while { test "X"`$SHELL [$]0 --fallback-echo "X$teststring$teststring" 2>/dev/null` \
-	         = "XX$teststring$teststring"; } >/dev/null 2>&1 &&
-	      test $i != 17 # 1/2 MB should be enough
+      while { test X`env echo "$teststring$teststring" 2>/dev/null` \
+	         = "X$teststring$teststring"; } >/dev/null 2>&1 &&
+	      test 17 != "$i" # 1/2 MB should be enough
       do
         i=`expr $i + 1`
         teststring=$teststring$teststring
@@ -1609,7 +1797,7 @@ AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
     ;;
   esac
 ])
-if test -n $lt_cv_sys_max_cmd_len ; then
+if test -n "$lt_cv_sys_max_cmd_len"; then
   AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
 else
   AC_MSG_RESULT(none)
@@ -1637,13 +1825,13 @@ m4_defun([_LT_HEADER_DLFCN],
 # ----------------------------------------------------------------
 m4_defun([_LT_TRY_DLOPEN_SELF],
 [m4_require([_LT_HEADER_DLFCN])dnl
-if test "$cross_compiling" = yes; then :
+if test yes = "$cross_compiling"; then :
   [$4]
 else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-[#line __oline__ "configure"
+[#line $LINENO "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -1684,7 +1872,13 @@ else
 #  endif
 #endif
 
-void fnord() { int i=42;}
+/* When -fvisibility=hidden is used, assume the code has been annotated
+   correspondingly for the symbols needed.  */
+#if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
+int fnord () __attribute__((visibility("default")));
+#endif
+
+int fnord () { return 42; }
 int main ()
 {
   void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
@@ -1693,7 +1887,11 @@ int main ()
   if (self)
     {
       if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
-      else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
+      else
+        {
+	  if (dlsym( self,"_fnord"))  status = $lt_dlneed_uscore;
+          else puts (dlerror ());
+	}
       /* dlclose (self); */
     }
   else
@@ -1702,7 +1900,7 @@ int main ()
   return status;
 }]
 _LT_EOF
-  if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
+  if AC_TRY_EVAL(ac_link) && test -s "conftest$ac_exeext" 2>/dev/null; then
     (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
     lt_status=$?
     case x$lt_status in
@@ -1723,7 +1921,7 @@ rm -fr conftest*
 # ------------------
 AC_DEFUN([LT_SYS_DLOPEN_SELF],
 [m4_require([_LT_HEADER_DLFCN])dnl
-if test "x$enable_dlopen" != xyes; then
+if test yes != "$enable_dlopen"; then
   enable_dlopen=unknown
   enable_dlopen_self=unknown
   enable_dlopen_self_static=unknown
@@ -1733,44 +1931,52 @@ else
 
   case $host_os in
   beos*)
-    lt_cv_dlopen="load_add_on"
+    lt_cv_dlopen=load_add_on
     lt_cv_dlopen_libs=
     lt_cv_dlopen_self=yes
     ;;
 
   mingw* | pw32* | cegcc*)
-    lt_cv_dlopen="LoadLibrary"
+    lt_cv_dlopen=LoadLibrary
     lt_cv_dlopen_libs=
     ;;
 
   cygwin*)
-    lt_cv_dlopen="dlopen"
+    lt_cv_dlopen=dlopen
     lt_cv_dlopen_libs=
     ;;
 
   darwin*)
-  # if libdl is installed we need to link against it
+    # if libdl is installed we need to link against it
     AC_CHECK_LIB([dl], [dlopen],
-		[lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
-    lt_cv_dlopen="dyld"
+		[lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl],[
+    lt_cv_dlopen=dyld
     lt_cv_dlopen_libs=
     lt_cv_dlopen_self=yes
     ])
     ;;
 
+  tpf*)
+    # Don't try to run any link tests for TPF.  We know it's impossible
+    # because TPF is a cross-compiler, and we know how we open DSOs.
+    lt_cv_dlopen=dlopen
+    lt_cv_dlopen_libs=
+    lt_cv_dlopen_self=no
+    ;;
+
   *)
     AC_CHECK_FUNC([shl_load],
-	  [lt_cv_dlopen="shl_load"],
+	  [lt_cv_dlopen=shl_load],
       [AC_CHECK_LIB([dld], [shl_load],
-	    [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"],
+	    [lt_cv_dlopen=shl_load lt_cv_dlopen_libs=-ldld],
 	[AC_CHECK_FUNC([dlopen],
-	      [lt_cv_dlopen="dlopen"],
+	      [lt_cv_dlopen=dlopen],
 	  [AC_CHECK_LIB([dl], [dlopen],
-		[lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
+		[lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl],
 	    [AC_CHECK_LIB([svld], [dlopen],
-		  [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
+		  [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-lsvld],
 	      [AC_CHECK_LIB([dld], [dld_link],
-		    [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"])
+		    [lt_cv_dlopen=dld_link lt_cv_dlopen_libs=-ldld])
 	      ])
 	    ])
 	  ])
@@ -1779,21 +1985,21 @@ else
     ;;
   esac
 
-  if test "x$lt_cv_dlopen" != xno; then
-    enable_dlopen=yes
-  else
+  if test no = "$lt_cv_dlopen"; then
     enable_dlopen=no
+  else
+    enable_dlopen=yes
   fi
 
   case $lt_cv_dlopen in
   dlopen)
-    save_CPPFLAGS="$CPPFLAGS"
-    test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
+    save_CPPFLAGS=$CPPFLAGS
+    test yes = "$ac_cv_header_dlfcn_h" && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
 
-    save_LDFLAGS="$LDFLAGS"
+    save_LDFLAGS=$LDFLAGS
     wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
 
-    save_LIBS="$LIBS"
+    save_LIBS=$LIBS
     LIBS="$lt_cv_dlopen_libs $LIBS"
 
     AC_CACHE_CHECK([whether a program can dlopen itself],
@@ -1803,7 +2009,7 @@ else
 	    lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
     ])
 
-    if test "x$lt_cv_dlopen_self" = xyes; then
+    if test yes = "$lt_cv_dlopen_self"; then
       wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
       AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
 	  lt_cv_dlopen_self_static, [dnl
@@ -1813,9 +2019,9 @@ else
       ])
     fi
 
-    CPPFLAGS="$save_CPPFLAGS"
-    LDFLAGS="$save_LDFLAGS"
-    LIBS="$save_LIBS"
+    CPPFLAGS=$save_CPPFLAGS
+    LDFLAGS=$save_LDFLAGS
+    LIBS=$save_LIBS
     ;;
   esac
 
@@ -1869,16 +2075,16 @@ AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
+   (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
    (eval "$lt_compile" 2>out/conftest.err)
    ac_status=$?
    cat out/conftest.err >&AS_MESSAGE_LOG_FD
-   echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
+   echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
    if (exit $ac_status) && test -s out/conftest2.$ac_objext
    then
      # The compiler can only warn and ignore the option if not recognized
      # So say no if there are warnings
-     $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
+     $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
      $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
      if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
        _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
@@ -1903,12 +2109,12 @@ _LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1],
 # ----------------------------------
 # Check to see if we can do hard links to lock some files if needed
 m4_defun([_LT_COMPILER_FILE_LOCKS],
-[dnl m4_require([_LT_ENABLE_LOCK])dnl
+[m4_require([_LT_ENABLE_LOCK])dnl
 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
 _LT_COMPILER_C_O([$1])
 
-hard_links="nottested"
-if test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
+hard_links=nottested
+if test no = "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" && test no != "$need_locks"; then
   # do not overwrite the value of need_locks provided by the user
   AC_MSG_CHECKING([if we can lock with hard links])
   hard_links=yes
@@ -1918,8 +2124,8 @@ if test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" !=
   ln conftest.a conftest.b 2>&5 || hard_links=no
   ln conftest.a conftest.b 2>/dev/null && hard_links=no
   AC_MSG_RESULT([$hard_links])
-  if test "$hard_links" = no; then
-    AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
+  if test no = "$hard_links"; then
+    AC_MSG_WARN(['$CC' does not support '-c -o', so 'make -j' may be unsafe])
     need_locks=warn
   fi
 else
@@ -1946,8 +2152,8 @@ objdir=$lt_cv_objdir
 _LT_DECL([], [objdir], [0],
          [The name of the directory that contains temporary libtool files])dnl
 m4_pattern_allow([LT_OBJDIR])dnl
-AC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/",
-  [Define to the sub-directory in which libtool stores uninstalled libraries.])
+AC_DEFINE_UNQUOTED([LT_OBJDIR], "$lt_cv_objdir/",
+  [Define to the sub-directory where libtool stores uninstalled libraries.])
 ])# _LT_CHECK_OBJDIR
 
 
@@ -1959,15 +2165,15 @@ m4_defun([_LT_LINKER_HARDCODE_LIBPATH],
 _LT_TAGVAR(hardcode_action, $1)=
 if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" ||
    test -n "$_LT_TAGVAR(runpath_var, $1)" ||
-   test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then
+   test yes = "$_LT_TAGVAR(hardcode_automatic, $1)"; then
 
   # We can hardcode non-existent directories.
-  if test "$_LT_TAGVAR(hardcode_direct, $1)" != no &&
+  if test no != "$_LT_TAGVAR(hardcode_direct, $1)" &&
      # If the only mechanism to avoid hardcoding is shlibpath_var, we
      # have to relink, otherwise we might link with an installed library
      # when we should be linking with a yet-to-be-installed one
-     ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
-     test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then
+     ## test no != "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" &&
+     test no != "$_LT_TAGVAR(hardcode_minus_L, $1)"; then
     # Linking always hardcodes the temporary library directory.
     _LT_TAGVAR(hardcode_action, $1)=relink
   else
@@ -1981,12 +2187,12 @@ else
 fi
 AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)])
 
-if test "$_LT_TAGVAR(hardcode_action, $1)" = relink ||
-   test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then
+if test relink = "$_LT_TAGVAR(hardcode_action, $1)" ||
+   test yes = "$_LT_TAGVAR(inherit_rpath, $1)"; then
   # Fast installation is not supported
   enable_fast_install=no
-elif test "$shlibpath_overrides_runpath" = yes ||
-     test "$enable_shared" = no; then
+elif test yes = "$shlibpath_overrides_runpath" ||
+     test no = "$enable_shared"; then
   # Fast installation is not necessary
   enable_fast_install=needless
 fi
@@ -2010,7 +2216,7 @@ else
 # FIXME - insert some real tests, host_os isn't really good enough
   case $host_os in
   darwin*)
-    if test -n "$STRIP" ; then
+    if test -n "$STRIP"; then
       striplib="$STRIP -x"
       old_striplib="$STRIP -S"
       AC_MSG_RESULT([yes])
@@ -2028,6 +2234,47 @@ _LT_DECL([], [striplib], [1])
 ])# _LT_CMD_STRIPLIB
 
 
+# _LT_PREPARE_MUNGE_PATH_LIST
+# ---------------------------
+# Make sure func_munge_path_list() is defined correctly.
+m4_defun([_LT_PREPARE_MUNGE_PATH_LIST],
+[[# func_munge_path_list VARIABLE PATH
+# -----------------------------------
+# VARIABLE is name of variable containing _space_ separated list of
+# directories to be munged by the contents of PATH, which is string
+# having a format:
+# "DIR[:DIR]:"
+#       string "DIR[ DIR]" will be prepended to VARIABLE
+# ":DIR[:DIR]"
+#       string "DIR[ DIR]" will be appended to VARIABLE
+# "DIRP[:DIRP]::[DIRA:]DIRA"
+#       string "DIRP[ DIRP]" will be prepended to VARIABLE and string
+#       "DIRA[ DIRA]" will be appended to VARIABLE
+# "DIR[:DIR]"
+#       VARIABLE will be replaced by "DIR[ DIR]"
+func_munge_path_list ()
+{
+    case x at S|@2 in
+    x)
+        ;;
+    *:)
+        eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'` \@S|@@S|@1\"
+        ;;
+    x:*)
+        eval @S|@1=\"\@S|@@S|@1 `$ECHO @S|@2 | $SED 's/:/ /g'`\"
+        ;;
+    *::*)
+        eval @S|@1=\"\@S|@@S|@1\ `$ECHO @S|@2 | $SED -e 's/.*:://' -e 's/:/ /g'`\"
+        eval @S|@1=\"`$ECHO @S|@2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \@S|@@S|@1\"
+        ;;
+    *)
+        eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'`\"
+        ;;
+    esac
+}
+]])# _LT_PREPARE_PATH_LIST
+
+
 # _LT_SYS_DYNAMIC_LINKER([TAG])
 # -----------------------------
 # PORTME Fill in your ld.so characteristics
@@ -2037,47 +2284,63 @@ m4_require([_LT_DECL_EGREP])dnl
 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
 m4_require([_LT_DECL_OBJDUMP])dnl
 m4_require([_LT_DECL_SED])dnl
+m4_require([_LT_CHECK_SHELL_FEATURES])dnl
+m4_require([_LT_PREPARE_MUNGE_PATH_LIST])dnl
 AC_MSG_CHECKING([dynamic linker characteristics])
 m4_if([$1],
 	[], [
-if test "$GCC" = yes; then
+if test yes = "$GCC"; then
   case $host_os in
-    darwin*) lt_awk_arg="/^libraries:/,/LR/" ;;
-    *) lt_awk_arg="/^libraries:/" ;;
+    darwin*) lt_awk_arg='/^libraries:/,/LR/' ;;
+    *) lt_awk_arg='/^libraries:/' ;;
   esac
-  lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"`
-  if $ECHO "$lt_search_path_spec" | $GREP ';' >/dev/null ; then
+  case $host_os in
+    mingw* | cegcc*) lt_sed_strip_eq='s|=\([[A-Za-z]]:\)|\1|g' ;;
+    *) lt_sed_strip_eq='s|=/|/|g' ;;
+  esac
+  lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq`
+  case $lt_search_path_spec in
+  *\;*)
     # if the path contains ";" then we assume it to be the separator
     # otherwise default to the standard path separator (i.e. ":") - it is
     # assumed that no part of a normal pathname contains ";" but that should
     # okay in the real world where ";" in dirpaths is itself problematic.
-    lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e 's/;/ /g'`
-  else
-    lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
-  fi
+    lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'`
+    ;;
+  *)
+    lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"`
+    ;;
+  esac
   # Ok, now we have the path, separated by spaces, we can step through it
-  # and add multilib dir if necessary.
+  # and add multilib dir if necessary...
   lt_tmp_lt_search_path_spec=
-  lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
+  lt_multi_os_dir=/`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
+  # ...but if some path component already ends with the multilib dir we assume
+  # that all is fine and trust -print-search-dirs as is (GCC 4.2? or newer).
+  case "$lt_multi_os_dir; $lt_search_path_spec " in
+  "/; "* | "/.; "* | "/./; "* | *"$lt_multi_os_dir "* | *"$lt_multi_os_dir/ "*)
+    lt_multi_os_dir=
+    ;;
+  esac
   for lt_sys_path in $lt_search_path_spec; do
-    if test -d "$lt_sys_path/$lt_multi_os_dir"; then
-      lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir"
-    else
+    if test -d "$lt_sys_path$lt_multi_os_dir"; then
+      lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path$lt_multi_os_dir"
+    elif test -n "$lt_multi_os_dir"; then
       test -d "$lt_sys_path" && \
 	lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
     fi
   done
-  lt_search_path_spec=`$ECHO $lt_tmp_lt_search_path_spec | awk '
-BEGIN {RS=" "; FS="/|\n";} {
-  lt_foo="";
-  lt_count=0;
+  lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk '
+BEGIN {RS = " "; FS = "/|\n";} {
+  lt_foo = "";
+  lt_count = 0;
   for (lt_i = NF; lt_i > 0; lt_i--) {
     if ($lt_i != "" && $lt_i != ".") {
       if ($lt_i == "..") {
         lt_count++;
       } else {
         if (lt_count == 0) {
-          lt_foo="/" $lt_i lt_foo;
+          lt_foo = "/" $lt_i lt_foo;
         } else {
           lt_count--;
         }
@@ -2087,14 +2350,20 @@ BEGIN {RS=" "; FS="/|\n";} {
   if (lt_foo != "") { lt_freq[[lt_foo]]++; }
   if (lt_freq[[lt_foo]] == 1) { print lt_foo; }
 }'`
-  sys_lib_search_path_spec=`$ECHO $lt_search_path_spec`
+  # AWK program above erroneously prepends '/' to C:/dos/paths
+  # for these hosts.
+  case $host_os in
+    mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\
+      $SED 's|/\([[A-Za-z]]:\)|\1|g'` ;;
+  esac
+  sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP`
 else
   sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
 fi])
 library_names_spec=
 libname_spec='lib$name'
 soname_spec=
-shrext_cmds=".so"
+shrext_cmds=.so
 postinstall_cmds=
 postuninstall_cmds=
 finish_cmds=
@@ -2111,56 +2380,109 @@ hardcode_into_libs=no
 # flags to be left without arguments
 need_version=unknown
 
+AC_ARG_VAR([LT_SYS_LIBRARY_PATH],
+[User-defined run-time library search path.])
+
 case $host_os in
 aix3*)
-  version_type=linux
-  library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
+  version_type=linux # correct to gnu/linux during the next big refactor
+  library_names_spec='$libname$release$shared_ext$versuffix $libname.a'
   shlibpath_var=LIBPATH
 
   # AIX 3 has no versioning support, so we append a major version to the name.
-  soname_spec='${libname}${release}${shared_ext}$major'
+  soname_spec='$libname$release$shared_ext$major'
   ;;
 
 aix[[4-9]]*)
-  version_type=linux
+  version_type=linux # correct to gnu/linux during the next big refactor
   need_lib_prefix=no
   need_version=no
   hardcode_into_libs=yes
-  if test "$host_cpu" = ia64; then
+  if test ia64 = "$host_cpu"; then
     # AIX 5 supports IA64
-    library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
+    library_names_spec='$libname$release$shared_ext$major $libname$release$shared_ext$versuffix $libname$shared_ext'
     shlibpath_var=LD_LIBRARY_PATH
   else
     # With GCC up to 2.95.x, collect2 would create an import file
     # for dependence libraries.  The import file would start with
-    # the line `#! .'.  This would cause the generated library to
-    # depend on `.', always an invalid library.  This was fixed in
+    # the line '#! .'.  This would cause the generated library to
+    # depend on '.', always an invalid library.  This was fixed in
     # development snapshots of GCC prior to 3.0.
     case $host_os in
       aix4 | aix4.[[01]] | aix4.[[01]].*)
       if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
 	   echo ' yes '
-	   echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then
+	   echo '#endif'; } | $CC -E - | $GREP yes > /dev/null; then
 	:
       else
 	can_build_shared=no
       fi
       ;;
     esac
-    # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
+    # Using Import Files as archive members, it is possible to support
+    # filename-based versioning of shared library archives on AIX. While
+    # this would work for both with and without runtime linking, it will
+    # prevent static linking of such archives. So we do filename-based
+    # shared library versioning with .so extension only, which is used
+    # when both runtime linking and shared linking is enabled.
+    # Unfortunately, runtime linking may impact performance, so we do
+    # not want this to be the default eventually. Also, we use the
+    # versioned .so libs for executables only if there is the -brtl
+    # linker flag in LDFLAGS as well, or --with-aix-soname=svr4 only.
+    # To allow for filename-based versioning support, we need to create
+    # libNAME.so.V as an archive file, containing:
+    # *) an Import File, referring to the versioned filename of the
+    #    archive as well as the shared archive member, telling the
+    #    bitwidth (32 or 64) of that shared object, and providing the
+    #    list of exported symbols of that shared object, eventually
+    #    decorated with the 'weak' keyword
+    # *) the shared object with the F_LOADONLY flag set, to really avoid
+    #    it being seen by the linker.
+    # At run time we better use the real file rather than another symlink,
+    # but for link time we create the symlink libNAME.so -> libNAME.so.V
+
+    case $with_aix_soname,$aix_use_runtimelinking in
+    # AIX (on Power*) has no versioning support, so currently we cannot hardcode correct
     # soname into executable. Probably we can add versioning support to
     # collect2, so additional links can be useful in future.
-    if test "$aix_use_runtimelinking" = yes; then
+    aix,yes) # traditional libtool
+      dynamic_linker='AIX unversionable lib.so'
       # If using run time linking (on AIX 4.2 or later) use lib<name>.so
       # instead of lib<name>.a to let people know that these are not
       # typical AIX shared libraries.
-      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-    else
+      library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+      ;;
+    aix,no) # traditional AIX only
+      dynamic_linker='AIX lib.a[(]lib.so.V[)]'
       # We preserve .a as extension for shared libraries through AIX4.2
       # and later when we are not doing run time linking.
-      library_names_spec='${libname}${release}.a $libname.a'
-      soname_spec='${libname}${release}${shared_ext}$major'
-    fi
+      library_names_spec='$libname$release.a $libname.a'
+      soname_spec='$libname$release$shared_ext$major'
+      ;;
+    svr4,*) # full svr4 only
+      dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)]"
+      library_names_spec='$libname$release$shared_ext$major $libname$shared_ext'
+      # We do not specify a path in Import Files, so LIBPATH fires.
+      shlibpath_overrides_runpath=yes
+      ;;
+    *,yes) # both, prefer svr4
+      dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)], lib.a[(]lib.so.V[)]"
+      library_names_spec='$libname$release$shared_ext$major $libname$shared_ext'
+      # unpreferred sharedlib libNAME.a needs extra handling
+      postinstall_cmds='test -n "$linkname" || linkname="$realname"~func_stripname "" ".so" "$linkname"~$install_shared_prog "$dir/$func_stripname_result.$libext" "$destdir/$func_stripname_result.$libext"~test -z "$tstripme" || test -z "$striplib" || $striplib "$destdir/$func_stripname_result.$libext"'
+      postuninstall_cmds='for n in $library_names $old_library; do :; done~func_stripname "" ".so" "$n"~test "$func_stripname_result" = "$n" || func_append rmfiles " $odir/$func_stripname_result.$libext"'
+      # We do not specify a path in Import Files, so LIBPATH fires.
+      shlibpath_overrides_runpath=yes
+      ;;
+    *,no) # both, prefer aix
+      dynamic_linker="AIX lib.a[(]lib.so.V[)], lib.so.V[(]$shared_archive_member_spec.o[)]"
+      library_names_spec='$libname$release.a $libname.a'
+      soname_spec='$libname$release$shared_ext$major'
+      # unpreferred sharedlib libNAME.so.V and symlink libNAME.so need extra handling
+      postinstall_cmds='test -z "$dlname" || $install_shared_prog $dir/$dlname $destdir/$dlname~test -z "$tstripme" || test -z "$striplib" || $striplib $destdir/$dlname~test -n "$linkname" || linkname=$realname~func_stripname "" ".a" "$linkname"~(cd "$destdir" && $LN_S -f $dlname $func_stripname_result.so)'
+      postuninstall_cmds='test -z "$dlname" || func_append rmfiles " $odir/$dlname"~for n in $old_library $library_names; do :; done~func_stripname "" ".a" "$n"~func_append rmfiles " $odir/$func_stripname_result.so"'
+      ;;
+    esac
     shlibpath_var=LIBPATH
   fi
   ;;
@@ -2170,27 +2492,27 @@ amigaos*)
   powerpc)
     # Since July 2007 AmigaOS4 officially supports .so libraries.
     # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
-    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
     ;;
   m68k)
     library_names_spec='$libname.ixlibrary $libname.a'
     # Create ${libname}_ixlibrary.a entries in /sys/libs.
-    finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$ECHO "X$lib" | $Xsed -e '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
+    finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
     ;;
   esac
   ;;
 
 beos*)
-  library_names_spec='${libname}${shared_ext}'
+  library_names_spec='$libname$shared_ext'
   dynamic_linker="$host_os ld.so"
   shlibpath_var=LIBRARY_PATH
   ;;
 
 bsdi[[45]]*)
-  version_type=linux
+  version_type=linux # correct to gnu/linux during the next big refactor
   need_version=no
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
+  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+  soname_spec='$libname$release$shared_ext$major'
   finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
   shlibpath_var=LD_LIBRARY_PATH
   sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
@@ -2202,16 +2524,17 @@ bsdi[[45]]*)
 
 cygwin* | mingw* | pw32* | cegcc*)
   version_type=windows
-  shrext_cmds=".dll"
+  shrext_cmds=.dll
   need_version=no
   need_lib_prefix=no
 
-  case $GCC,$host_os in
-  yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*)
+  case $GCC,$cc_basename in
+  yes,*)
+    # gcc
     library_names_spec='$libname.dll.a'
     # DLL is installed to $(libdir)/../bin by postinstall_cmds
-    postinstall_cmds='base_file=`basename \${file}`~
-      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
+    postinstall_cmds='base_file=`basename \$file`~
+      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~
       dldir=$destdir/`dirname \$dlpath`~
       test -d \$dldir || mkdir -p \$dldir~
       $install_prog $dir/$dlname \$dldir/$dlname~
@@ -2227,37 +2550,84 @@ cygwin* | mingw* | pw32* | cegcc*)
     case $host_os in
     cygwin*)
       # Cygwin DLLs use 'cyg' prefix rather than 'lib'
-      soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
-      sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
+      soname_spec='`echo $libname | sed -e 's/^lib/cyg/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
+m4_if([$1], [],[
+      sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"])
       ;;
     mingw* | cegcc*)
       # MinGW DLLs use traditional 'lib' prefix
-      soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
-      sys_lib_search_path_spec=`$CC -print-search-dirs | $GREP "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
+      soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
+      ;;
+    pw32*)
+      # pw32 DLLs use 'pw' prefix rather than 'lib'
+      library_names_spec='`echo $libname | sed -e 's/^lib/pw/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
+      ;;
+    esac
+    dynamic_linker='Win32 ld.exe'
+    ;;
+
+  *,cl*)
+    # Native MSVC
+    libname_spec='$name'
+    soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
+    library_names_spec='$libname.dll.lib'
+
+    case $build_os in
+    mingw*)
+      sys_lib_search_path_spec=
+      lt_save_ifs=$IFS
+      IFS=';'
+      for lt_path in $LIB
+      do
+        IFS=$lt_save_ifs
+        # Let DOS variable expansion print the short 8.3 style file name.
+        lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"`
+        sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path"
+      done
+      IFS=$lt_save_ifs
+      # Convert to MSYS style.
+      sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'`
+      ;;
+    cygwin*)
+      # Convert to unix form, then to dos form, then back to unix form
+      # but this time dos style (no spaces!) so that the unix form looks
+      # like /cygdrive/c/PROGRA~1:/cygdr...
+      sys_lib_search_path_spec=`cygpath --path --unix "$LIB"`
+      sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null`
+      sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
+      ;;
+    *)
+      sys_lib_search_path_spec=$LIB
       if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then
-        # It is most probably a Windows format PATH printed by
-        # mingw gcc, but we are running on Cygwin. Gcc prints its search
-        # path with ; separators, and with drive letters. We can handle the
-        # drive letters (cygwin fileutils understands them), so leave them,
-        # especially as we might pass files found there to a mingw objdump,
-        # which wouldn't understand a cygwinified path. Ahh.
+        # It is most probably a Windows format PATH.
         sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
       else
-        sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
+        sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
       fi
-      ;;
-    pw32*)
-      # pw32 DLLs use 'pw' prefix rather than 'lib'
-      library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
+      # FIXME: find the short name or the path components, as spaces are
+      # common. (e.g. "Program Files" -> "PROGRA~1")
       ;;
     esac
+
+    # DLL is installed to $(libdir)/../bin by postinstall_cmds
+    postinstall_cmds='base_file=`basename \$file`~
+      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~
+      dldir=$destdir/`dirname \$dlpath`~
+      test -d \$dldir || mkdir -p \$dldir~
+      $install_prog $dir/$dlname \$dldir/$dlname'
+    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
+      dlpath=$dir/\$dldll~
+       $RM \$dlpath'
+    shlibpath_overrides_runpath=yes
+    dynamic_linker='Win32 link.exe'
     ;;
 
   *)
-    library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
+    # Assume MSVC wrapper
+    library_names_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext $libname.lib'
+    dynamic_linker='Win32 ld.exe'
     ;;
   esac
-  dynamic_linker='Win32 ld.exe'
   # FIXME: first we should search . and the directory the executable is in
   shlibpath_var=PATH
   ;;
@@ -2267,8 +2637,8 @@ darwin* | rhapsody*)
   version_type=darwin
   need_lib_prefix=no
   need_version=no
-  library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext'
-  soname_spec='${libname}${release}${major}$shared_ext'
+  library_names_spec='$libname$release$major$shared_ext $libname$shared_ext'
+  soname_spec='$libname$release$major$shared_ext'
   shlibpath_overrides_runpath=yes
   shlibpath_var=DYLD_LIBRARY_PATH
   shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
@@ -2278,18 +2648,14 @@ m4_if([$1], [],[
   ;;
 
 dgux*)
-  version_type=linux
+  version_type=linux # correct to gnu/linux during the next big refactor
   need_lib_prefix=no
   need_version=no
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
-  soname_spec='${libname}${release}${shared_ext}$major'
+  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+  soname_spec='$libname$release$shared_ext$major'
   shlibpath_var=LD_LIBRARY_PATH
   ;;
 
-freebsd1*)
-  dynamic_linker=no
-  ;;
-
 freebsd* | dragonfly*)
   # DragonFly does not have aout.  When/if they implement a new
   # versioning mechanism, adjust this.
@@ -2297,25 +2663,26 @@ freebsd* | dragonfly*)
     objformat=`/usr/bin/objformat`
   else
     case $host_os in
-    freebsd[[123]]*) objformat=aout ;;
+    freebsd[[23]].*) objformat=aout ;;
     *) objformat=elf ;;
     esac
   fi
   version_type=freebsd-$objformat
   case $version_type in
     freebsd-elf*)
-      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
+      library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+      soname_spec='$libname$release$shared_ext$major'
       need_version=no
       need_lib_prefix=no
       ;;
     freebsd-*)
-      library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
+      library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
       need_version=yes
       ;;
   esac
   shlibpath_var=LD_LIBRARY_PATH
   case $host_os in
-  freebsd2*)
+  freebsd2.*)
     shlibpath_overrides_runpath=yes
     ;;
   freebsd3.[[01]]* | freebsdelf3.[[01]]*)
@@ -2334,13 +2701,16 @@ freebsd* | dragonfly*)
   esac
   ;;
 
-gnu*)
-  version_type=linux
+haiku*)
+  version_type=linux # correct to gnu/linux during the next big refactor
   need_lib_prefix=no
   need_version=no
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
-  shlibpath_var=LD_LIBRARY_PATH
+  dynamic_linker="$host_os runtime_loader"
+  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+  soname_spec='$libname$release$shared_ext$major'
+  shlibpath_var=LIBRARY_PATH
+  shlibpath_overrides_runpath=no
+  sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib'
   hardcode_into_libs=yes
   ;;
 
@@ -2357,14 +2727,15 @@ hpux9* | hpux10* | hpux11*)
     dynamic_linker="$host_os dld.so"
     shlibpath_var=LD_LIBRARY_PATH
     shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
-    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-    soname_spec='${libname}${release}${shared_ext}$major'
-    if test "X$HPUX_IA64_MODE" = X32; then
+    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+    soname_spec='$libname$release$shared_ext$major'
+    if test 32 = "$HPUX_IA64_MODE"; then
       sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
+      sys_lib_dlsearch_path_spec=/usr/lib/hpux32
     else
       sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
+      sys_lib_dlsearch_path_spec=/usr/lib/hpux64
     fi
-    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
     ;;
   hppa*64*)
     shrext_cmds='.sl'
@@ -2372,8 +2743,8 @@ hpux9* | hpux10* | hpux11*)
     dynamic_linker="$host_os dld.sl"
     shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
     shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
-    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-    soname_spec='${libname}${release}${shared_ext}$major'
+    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+    soname_spec='$libname$release$shared_ext$major'
     sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
     sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
     ;;
@@ -2382,20 +2753,22 @@ hpux9* | hpux10* | hpux11*)
     dynamic_linker="$host_os dld.sl"
     shlibpath_var=SHLIB_PATH
     shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
-    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-    soname_spec='${libname}${release}${shared_ext}$major'
+    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+    soname_spec='$libname$release$shared_ext$major'
     ;;
   esac
-  # HP-UX runs *really* slowly unless shared libraries are mode 555.
+  # HP-UX runs *really* slowly unless shared libraries are mode 555, ...
   postinstall_cmds='chmod 555 $lib'
+  # or fails outright, so override atomically:
+  install_override_mode=555
   ;;
 
 interix[[3-9]]*)
-  version_type=linux
+  version_type=linux # correct to gnu/linux during the next big refactor
   need_lib_prefix=no
   need_version=no
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
+  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+  soname_spec='$libname$release$shared_ext$major'
   dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
   shlibpath_var=LD_LIBRARY_PATH
   shlibpath_overrides_runpath=no
@@ -2406,16 +2779,16 @@ irix5* | irix6* | nonstopux*)
   case $host_os in
     nonstopux*) version_type=nonstopux ;;
     *)
-	if test "$lt_cv_prog_gnu_ld" = yes; then
-		version_type=linux
+	if test yes = "$lt_cv_prog_gnu_ld"; then
+		version_type=linux # correct to gnu/linux during the next big refactor
 	else
 		version_type=irix
 	fi ;;
   esac
   need_lib_prefix=no
   need_version=no
-  soname_spec='${libname}${release}${shared_ext}$major'
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
+  soname_spec='$libname$release$shared_ext$major'
+  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$release$shared_ext $libname$shared_ext'
   case $host_os in
   irix5* | nonstopux*)
     libsuff= shlibsuff=
@@ -2434,8 +2807,8 @@ irix5* | irix6* | nonstopux*)
   esac
   shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
   shlibpath_overrides_runpath=no
-  sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
-  sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
+  sys_lib_search_path_spec="/usr/lib$libsuff /lib$libsuff /usr/local/lib$libsuff"
+  sys_lib_dlsearch_path_spec="/usr/lib$libsuff /lib$libsuff"
   hardcode_into_libs=yes
   ;;
 
@@ -2444,35 +2817,65 @@ linux*oldld* | linux*aout* | linux*coff*)
   dynamic_linker=no
   ;;
 
-# This must be Linux ELF.
-linux* | k*bsd*-gnu)
-  version_type=linux
+linux*android*)
+  version_type=none # Android doesn't support versioned libraries.
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='$libname$release$shared_ext'
+  soname_spec='$libname$release$shared_ext'
+  finish_cmds=
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=yes
+
+  # This implies no fast_install, which is unacceptable.
+  # Some rework will be needed to allow for fast_install
+  # before this can be enabled.
+  hardcode_into_libs=yes
+
+  dynamic_linker='Android linker'
+  # Don't embed -rpath directories since the linker doesn't support them.
+  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+  ;;
+
+# This must be glibc/ELF.
+linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
+  version_type=linux # correct to gnu/linux during the next big refactor
   need_lib_prefix=no
   need_version=no
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
+  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+  soname_spec='$libname$release$shared_ext$major'
   finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
   shlibpath_var=LD_LIBRARY_PATH
   shlibpath_overrides_runpath=no
+
   # Some binutils ld are patched to set DT_RUNPATH
-  save_LDFLAGS=$LDFLAGS
-  save_libdir=$libdir
-  eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \
-       LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\""
-  AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
-    [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null],
-       [shlibpath_overrides_runpath=yes])])
-  LDFLAGS=$save_LDFLAGS
-  libdir=$save_libdir
+  AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath],
+    [lt_cv_shlibpath_overrides_runpath=no
+    save_LDFLAGS=$LDFLAGS
+    save_libdir=$libdir
+    eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \
+	 LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\""
+    AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
+      [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null],
+	 [lt_cv_shlibpath_overrides_runpath=yes])])
+    LDFLAGS=$save_LDFLAGS
+    libdir=$save_libdir
+    ])
+  shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath
 
   # This implies no fast_install, which is unacceptable.
   # Some rework will be needed to allow for fast_install
   # before this can be enabled.
   hardcode_into_libs=yes
 
-  # Append ld.so.conf contents to the search path
+  # Ideally, we could use ldconfig to report *all* directores which are
+  # searched for libraries, however this is still not possible.  Aside from not
+  # being certain /sbin/ldconfig is available, command
+  # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64,
+  # even though it is searched at run-time.  Try to do the best guess by
+  # appending ld.so.conf contents (and includes) to the search path.
   if test -f /etc/ld.so.conf; then
-    lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[	 ]*hwcap[	 ]/d;s/[:,	]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
+    lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[	 ]*hwcap[	 ]/d;s/[:,	]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '`
     sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
   fi
 
@@ -2490,12 +2893,12 @@ netbsd*)
   need_lib_prefix=no
   need_version=no
   if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
-    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
+    library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
     finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
     dynamic_linker='NetBSD (a.out) ld.so'
   else
-    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
-    soname_spec='${libname}${release}${shared_ext}$major'
+    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+    soname_spec='$libname$release$shared_ext$major'
     dynamic_linker='NetBSD ld.elf_so'
   fi
   shlibpath_var=LD_LIBRARY_PATH
@@ -2504,8 +2907,8 @@ netbsd*)
   ;;
 
 newsos6)
-  version_type=linux
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  version_type=linux # correct to gnu/linux during the next big refactor
+  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
   shlibpath_var=LD_LIBRARY_PATH
   shlibpath_overrides_runpath=yes
   ;;
@@ -2514,58 +2917,68 @@ newsos6)
   version_type=qnx
   need_lib_prefix=no
   need_version=no
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
+  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+  soname_spec='$libname$release$shared_ext$major'
   shlibpath_var=LD_LIBRARY_PATH
   shlibpath_overrides_runpath=no
   hardcode_into_libs=yes
   dynamic_linker='ldqnx.so'
   ;;
 
-openbsd*)
+openbsd* | bitrig*)
   version_type=sunos
-  sys_lib_dlsearch_path_spec="/usr/lib"
+  sys_lib_dlsearch_path_spec=/usr/lib
   need_lib_prefix=no
-  # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
-  case $host_os in
-    openbsd3.3 | openbsd3.3.*)	need_version=yes ;;
-    *)				need_version=no  ;;
-  esac
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
-  finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
-  shlibpath_var=LD_LIBRARY_PATH
-  if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
-    case $host_os in
-      openbsd2.[[89]] | openbsd2.[[89]].*)
-	shlibpath_overrides_runpath=no
-	;;
-      *)
-	shlibpath_overrides_runpath=yes
-	;;
-      esac
+  if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
+    need_version=no
   else
-    shlibpath_overrides_runpath=yes
+    need_version=yes
   fi
+  library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
+  finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=yes
   ;;
 
 os2*)
   libname_spec='$name'
-  shrext_cmds=".dll"
+  version_type=windows
+  shrext_cmds=.dll
+  need_version=no
   need_lib_prefix=no
-  library_names_spec='$libname${shared_ext} $libname.a'
+  # OS/2 can only load a DLL with a base name of 8 characters or less.
+  soname_spec='`test -n "$os2dllname" && libname="$os2dllname";
+    v=$($ECHO $release$versuffix | tr -d .-);
+    n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _);
+    $ECHO $n$v`$shared_ext'
+  library_names_spec='${libname}_dll.$libext'
   dynamic_linker='OS/2 ld.exe'
-  shlibpath_var=LIBPATH
+  shlibpath_var=BEGINLIBPATH
+  sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
+  sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
+  postinstall_cmds='base_file=`basename \$file`~
+    dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; $ECHO \$dlname'\''`~
+    dldir=$destdir/`dirname \$dlpath`~
+    test -d \$dldir || mkdir -p \$dldir~
+    $install_prog $dir/$dlname \$dldir/$dlname~
+    chmod a+x \$dldir/$dlname~
+    if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
+      eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
+    fi'
+  postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; $ECHO \$dlname'\''`~
+    dlpath=$dir/\$dldll~
+    $RM \$dlpath'
   ;;
 
 osf3* | osf4* | osf5*)
   version_type=osf
   need_lib_prefix=no
   need_version=no
-  soname_spec='${libname}${release}${shared_ext}$major'
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='$libname$release$shared_ext$major'
+  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
   shlibpath_var=LD_LIBRARY_PATH
   sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
-  sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
+  sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
   ;;
 
 rdos*)
@@ -2573,11 +2986,11 @@ rdos*)
   ;;
 
 solaris*)
-  version_type=linux
+  version_type=linux # correct to gnu/linux during the next big refactor
   need_lib_prefix=no
   need_version=no
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
+  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+  soname_spec='$libname$release$shared_ext$major'
   shlibpath_var=LD_LIBRARY_PATH
   shlibpath_overrides_runpath=yes
   hardcode_into_libs=yes
@@ -2587,20 +3000,20 @@ solaris*)
 
 sunos4*)
   version_type=sunos
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
+  library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
   finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
   shlibpath_var=LD_LIBRARY_PATH
   shlibpath_overrides_runpath=yes
-  if test "$with_gnu_ld" = yes; then
+  if test yes = "$with_gnu_ld"; then
     need_lib_prefix=no
   fi
   need_version=yes
   ;;
 
 sysv4 | sysv4.3*)
-  version_type=linux
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
+  version_type=linux # correct to gnu/linux during the next big refactor
+  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+  soname_spec='$libname$release$shared_ext$major'
   shlibpath_var=LD_LIBRARY_PATH
   case $host_vendor in
     sni)
@@ -2621,24 +3034,24 @@ sysv4 | sysv4.3*)
   ;;
 
 sysv4*MP*)
-  if test -d /usr/nec ;then
-    version_type=linux
-    library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
-    soname_spec='$libname${shared_ext}.$major'
+  if test -d /usr/nec; then
+    version_type=linux # correct to gnu/linux during the next big refactor
+    library_names_spec='$libname$shared_ext.$versuffix $libname$shared_ext.$major $libname$shared_ext'
+    soname_spec='$libname$shared_ext.$major'
     shlibpath_var=LD_LIBRARY_PATH
   fi
   ;;
 
 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
-  version_type=freebsd-elf
+  version_type=sco
   need_lib_prefix=no
   need_version=no
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
+  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext $libname$shared_ext'
+  soname_spec='$libname$release$shared_ext$major'
   shlibpath_var=LD_LIBRARY_PATH
   shlibpath_overrides_runpath=yes
   hardcode_into_libs=yes
-  if test "$with_gnu_ld" = yes; then
+  if test yes = "$with_gnu_ld"; then
     sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
   else
     sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
@@ -2653,19 +3066,19 @@ sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
 
 tpf*)
   # TPF is a cross-target only.  Preferred cross-host = GNU/Linux.
-  version_type=linux
+  version_type=linux # correct to gnu/linux during the next big refactor
   need_lib_prefix=no
   need_version=no
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
   shlibpath_var=LD_LIBRARY_PATH
   shlibpath_overrides_runpath=no
   hardcode_into_libs=yes
   ;;
 
 uts4*)
-  version_type=linux
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
+  version_type=linux # correct to gnu/linux during the next big refactor
+  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+  soname_spec='$libname$release$shared_ext$major'
   shlibpath_var=LD_LIBRARY_PATH
   ;;
 
@@ -2674,20 +3087,30 @@ uts4*)
   ;;
 esac
 AC_MSG_RESULT([$dynamic_linker])
-test "$dynamic_linker" = no && can_build_shared=no
+test no = "$dynamic_linker" && can_build_shared=no
 
 variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
-if test "$GCC" = yes; then
+if test yes = "$GCC"; then
   variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
 fi
 
-if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then
-  sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
+if test set = "${lt_cv_sys_lib_search_path_spec+set}"; then
+  sys_lib_search_path_spec=$lt_cv_sys_lib_search_path_spec
 fi
-if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then
-  sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec"
+
+if test set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then
+  sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec
 fi
 
+# remember unaugmented sys_lib_dlsearch_path content for libtool script decls...
+configure_time_dlsearch_path=$sys_lib_dlsearch_path_spec
+
+# ... but it needs LT_SYS_LIBRARY_PATH munging for other configure-time code
+func_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH"
+
+# to be used as default LT_SYS_LIBRARY_PATH value in generated libtool
+configure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH
+
 _LT_DECL([], [variables_saved_for_relink], [1],
     [Variables whose values should be saved in libtool wrapper scripts and
     restored at link time])
@@ -2705,6 +3128,8 @@ _LT_DECL([], [library_names_spec], [1],
     The last name is the one that the linker finds with -lNAME]])
 _LT_DECL([], [soname_spec], [1],
     [[The coded name of the library, if different from the real name]])
+_LT_DECL([], [install_override_mode], [1],
+    [Permission mode override for installation of shared libraries])
 _LT_DECL([], [postinstall_cmds], [2],
     [Command to use after installation of a shared archive])
 _LT_DECL([], [postuninstall_cmds], [2],
@@ -2718,39 +3143,41 @@ _LT_DECL([], [hardcode_into_libs], [0],
     [Whether we should hardcode library paths into libraries])
 _LT_DECL([], [sys_lib_search_path_spec], [2],
     [Compile-time system search path for libraries])
-_LT_DECL([], [sys_lib_dlsearch_path_spec], [2],
-    [Run-time system search path for libraries])
+_LT_DECL([sys_lib_dlsearch_path_spec], [configure_time_dlsearch_path], [2],
+    [Detected run-time system search path for libraries])
+_LT_DECL([], [configure_time_lt_sys_library_path], [2],
+    [Explicit LT_SYS_LIBRARY_PATH set during ./configure time])
 ])# _LT_SYS_DYNAMIC_LINKER
 
 
 # _LT_PATH_TOOL_PREFIX(TOOL)
 # --------------------------
-# find a file program which can recognize shared library
+# find a file program that can recognize shared library
 AC_DEFUN([_LT_PATH_TOOL_PREFIX],
 [m4_require([_LT_DECL_EGREP])dnl
 AC_MSG_CHECKING([for $1])
 AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
 [case $MAGIC_CMD in
 [[\\/*] |  ?:[\\/]*])
-  lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
+  lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path.
   ;;
 *)
-  lt_save_MAGIC_CMD="$MAGIC_CMD"
-  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+  lt_save_MAGIC_CMD=$MAGIC_CMD
+  lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
 dnl $ac_dummy forces splitting on constant user-supplied paths.
 dnl POSIX.2 word splitting is done only on the output of word expansions,
 dnl not every word.  This closes a longstanding sh security hole.
   ac_dummy="m4_if([$2], , $PATH, [$2])"
   for ac_dir in $ac_dummy; do
-    IFS="$lt_save_ifs"
+    IFS=$lt_save_ifs
     test -z "$ac_dir" && ac_dir=.
-    if test -f $ac_dir/$1; then
-      lt_cv_path_MAGIC_CMD="$ac_dir/$1"
+    if test -f "$ac_dir/$1"; then
+      lt_cv_path_MAGIC_CMD=$ac_dir/"$1"
       if test -n "$file_magic_test_file"; then
 	case $deplibs_check_method in
 	"file_magic "*)
 	  file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
-	  MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
+	  MAGIC_CMD=$lt_cv_path_MAGIC_CMD
 	  if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
 	    $EGREP "$file_magic_regex" > /dev/null; then
 	    :
@@ -2773,11 +3200,11 @@ _LT_EOF
       break
     fi
   done
-  IFS="$lt_save_ifs"
-  MAGIC_CMD="$lt_save_MAGIC_CMD"
+  IFS=$lt_save_ifs
+  MAGIC_CMD=$lt_save_MAGIC_CMD
   ;;
 esac])
-MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
+MAGIC_CMD=$lt_cv_path_MAGIC_CMD
 if test -n "$MAGIC_CMD"; then
   AC_MSG_RESULT($MAGIC_CMD)
 else
@@ -2795,7 +3222,7 @@ dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], [])
 
 # _LT_PATH_MAGIC
 # --------------
-# find a file program which can recognize a shared library
+# find a file program that can recognize a shared library
 m4_defun([_LT_PATH_MAGIC],
 [_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
 if test -z "$lt_cv_path_MAGIC_CMD"; then
@@ -2817,20 +3244,21 @@ AC_REQUIRE([AC_CANONICAL_HOST])dnl
 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
 m4_require([_LT_DECL_SED])dnl
 m4_require([_LT_DECL_EGREP])dnl
+m4_require([_LT_PROG_ECHO_BACKSLASH])dnl
 
-dnl AC_ARG_WITH([gnu-ld],
-dnl     [AS_HELP_STRING([--with-gnu-ld],
-dnl 	[assume the C compiler uses GNU ld @<:@default=no@:>@])],
-dnl     [test "$withval" = no || with_gnu_ld=yes],
-dnl     [with_gnu_ld=no])dnl
+AC_ARG_WITH([gnu-ld],
+    [AS_HELP_STRING([--with-gnu-ld],
+	[assume the C compiler uses GNU ld @<:@default=no@:>@])],
+    [test no = "$withval" || with_gnu_ld=yes],
+    [with_gnu_ld=no])dnl
 
 ac_prog=ld
-if test "$GCC" = yes; then
+if test yes = "$GCC"; then
   # Check if gcc -print-prog-name=ld gives a path.
   AC_MSG_CHECKING([for ld used by $CC])
   case $host in
   *-*-mingw*)
-    # gcc leaves a trailing carriage return which upsets mingw
+    # gcc leaves a trailing carriage return, which upsets mingw
     ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
   *)
     ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
@@ -2844,7 +3272,7 @@ if test "$GCC" = yes; then
       while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
 	ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
       done
-      test -z "$LD" && LD="$ac_prog"
+      test -z "$LD" && LD=$ac_prog
       ;;
   "")
     # If it fails, then pretend we aren't using GCC.
@@ -2855,37 +3283,37 @@ if test "$GCC" = yes; then
     with_gnu_ld=unknown
     ;;
   esac
-elif test "$with_gnu_ld" = yes; then
+elif test yes = "$with_gnu_ld"; then
   AC_MSG_CHECKING([for GNU ld])
 else
   AC_MSG_CHECKING([for non-GNU ld])
 fi
 AC_CACHE_VAL(lt_cv_path_LD,
 [if test -z "$LD"; then
-  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+  lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
   for ac_dir in $PATH; do
-    IFS="$lt_save_ifs"
+    IFS=$lt_save_ifs
     test -z "$ac_dir" && ac_dir=.
     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
-      lt_cv_path_LD="$ac_dir/$ac_prog"
+      lt_cv_path_LD=$ac_dir/$ac_prog
       # Check to see if the program is GNU ld.  I'd rather use --version,
       # but apparently some variants of GNU ld only accept -v.
       # Break only if it was the GNU/non-GNU ld that we prefer.
       case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
       *GNU* | *'with BFD'*)
-	test "$with_gnu_ld" != no && break
+	test no != "$with_gnu_ld" && break
 	;;
       *)
-	test "$with_gnu_ld" != yes && break
+	test yes != "$with_gnu_ld" && break
 	;;
       esac
     fi
   done
-  IFS="$lt_save_ifs"
+  IFS=$lt_save_ifs
 else
-  lt_cv_path_LD="$LD" # Let the user override the test with a path.
+  lt_cv_path_LD=$LD # Let the user override the test with a path.
 fi])
-LD="$lt_cv_path_LD"
+LD=$lt_cv_path_LD
 if test -n "$LD"; then
   AC_MSG_RESULT($LD)
 else
@@ -2938,19 +3366,61 @@ case $reload_flag in
 esac
 reload_cmds='$LD$reload_flag -o $output$reload_objs'
 case $host_os in
+  cygwin* | mingw* | pw32* | cegcc*)
+    if test yes != "$GCC"; then
+      reload_cmds=false
+    fi
+    ;;
   darwin*)
-    if test "$GCC" = yes; then
-      reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
+    if test yes = "$GCC"; then
+      reload_cmds='$LTCC $LTCFLAGS -nostdlib $wl-r -o $output$reload_objs'
     else
       reload_cmds='$LD$reload_flag -o $output$reload_objs'
     fi
     ;;
 esac
-_LT_DECL([], [reload_flag], [1], [How to create reloadable object files])dnl
-_LT_DECL([], [reload_cmds], [2])dnl
+_LT_TAGDECL([], [reload_flag], [1], [How to create reloadable object files])dnl
+_LT_TAGDECL([], [reload_cmds], [2])dnl
 ])# _LT_CMD_RELOAD
 
 
+# _LT_PATH_DD
+# -----------
+# find a working dd
+m4_defun([_LT_PATH_DD],
+[AC_CACHE_CHECK([for a working dd], [ac_cv_path_lt_DD],
+[printf 0123456789abcdef0123456789abcdef >conftest.i
+cat conftest.i conftest.i >conftest2.i
+: ${lt_DD:=$DD}
+AC_PATH_PROGS_FEATURE_CHECK([lt_DD], [dd],
+[if "$ac_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then
+  cmp -s conftest.i conftest.out \
+  && ac_cv_path_lt_DD="$ac_path_lt_DD" ac_path_lt_DD_found=:
+fi])
+rm -f conftest.i conftest2.i conftest.out])
+])# _LT_PATH_DD
+
+
+# _LT_CMD_TRUNCATE
+# ----------------
+# find command to truncate a binary pipe
+m4_defun([_LT_CMD_TRUNCATE],
+[m4_require([_LT_PATH_DD])
+AC_CACHE_CHECK([how to truncate binary pipes], [lt_cv_truncate_bin],
+[printf 0123456789abcdef0123456789abcdef >conftest.i
+cat conftest.i conftest.i >conftest2.i
+lt_cv_truncate_bin=
+if "$ac_cv_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then
+  cmp -s conftest.i conftest.out \
+  && lt_cv_truncate_bin="$ac_cv_path_lt_DD bs=4096 count=1"
+fi
+rm -f conftest.i conftest2.i conftest.out
+test -z "$lt_cv_truncate_bin" && lt_cv_truncate_bin="$SED -e 4q"])
+_LT_DECL([lt_truncate_bin], [lt_cv_truncate_bin], [1],
+  [Command to truncate a binary pipe])
+])# _LT_CMD_TRUNCATE
+
+
 # _LT_CHECK_MAGIC_METHOD
 # ----------------------
 # how to check for library dependencies
@@ -2966,13 +3436,13 @@ lt_cv_deplibs_check_method='unknown'
 # Need to set the preceding variable on all platforms that support
 # interlibrary dependencies.
 # 'none' -- dependencies not supported.
-# `unknown' -- same as none, but documents that we really don't know.
+# 'unknown' -- same as none, but documents that we really don't know.
 # 'pass_all' -- all dependencies passed with no checks.
 # 'test_compile' -- check by making test program.
 # 'file_magic [[regex]]' -- check by looking for files in library path
-# which responds to the $file_magic_cmd with a given extended regex.
-# If you have `file' or equivalent on your system and you're not sure
-# whether `pass_all' will *always* work, you probably want this one.
+# that responds to the $file_magic_cmd with a given extended regex.
+# If you have 'file' or equivalent on your system and you're not sure
+# whether 'pass_all' will *always* work, you probably want this one.
 
 case $host_os in
 aix[[4-9]]*)
@@ -3003,12 +3473,13 @@ mingw* | pw32*)
     lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
     lt_cv_file_magic_cmd='func_win32_libid'
   else
-    lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
+    # Keep this pattern in sync with the one in func_win32_libid.
+    lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)'
     lt_cv_file_magic_cmd='$OBJDUMP -f'
   fi
   ;;
 
-cegcc)
+cegcc*)
   # use the weaker test based on 'objdump'. See mingw*.
   lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'
   lt_cv_file_magic_cmd='$OBJDUMP -f'
@@ -3034,7 +3505,7 @@ freebsd* | dragonfly*)
   fi
   ;;
 
-gnu*)
+haiku*)
   lt_cv_deplibs_check_method=pass_all
   ;;
 
@@ -3046,11 +3517,11 @@ hpux10.20* | hpux11*)
     lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
     ;;
   hppa*64*)
-    [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]']
+    [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF[ -][0-9][0-9])(-bit)?( [LM]SB)? shared object( file)?[, -]* PA-RISC [0-9]\.[0-9]']
     lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
     ;;
   *)
-    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library'
+    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library'
     lt_cv_file_magic_test_file=/usr/lib/libc.sl
     ;;
   esac
@@ -3071,8 +3542,8 @@ irix5* | irix6* | nonstopux*)
   lt_cv_deplibs_check_method=pass_all
   ;;
 
-# This must be Linux ELF.
-linux* | k*bsd*-gnu)
+# This must be glibc/ELF.
+linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
   lt_cv_deplibs_check_method=pass_all
   ;;
 
@@ -3094,8 +3565,8 @@ newos6*)
   lt_cv_deplibs_check_method=pass_all
   ;;
 
-openbsd*)
-  if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+openbsd* | bitrig*)
+  if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
     lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
   else
     lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
@@ -3148,8 +3619,26 @@ sysv4 | sysv4.3*)
 tpf*)
   lt_cv_deplibs_check_method=pass_all
   ;;
+os2*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
 esac
 ])
+
+file_magic_glob=
+want_nocaseglob=no
+if test "$build" = "$host"; then
+  case $host_os in
+  mingw* | pw32*)
+    if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then
+      want_nocaseglob=yes
+    else
+      file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"`
+    fi
+    ;;
+  esac
+fi
+
 file_magic_cmd=$lt_cv_file_magic_cmd
 deplibs_check_method=$lt_cv_deplibs_check_method
 test -z "$deplibs_check_method" && deplibs_check_method=unknown
@@ -3157,7 +3646,11 @@ test -z "$deplibs_check_method" && deplibs_check_method=unknown
 _LT_DECL([], [deplibs_check_method], [1],
     [Method to check whether dependent libraries are shared objects])
 _LT_DECL([], [file_magic_cmd], [1],
-    [Command to use when deplibs_check_method == "file_magic"])
+    [Command to use when deplibs_check_method = "file_magic"])
+_LT_DECL([], [file_magic_glob], [1],
+    [How to find potential files when deplibs_check_method = "file_magic"])
+_LT_DECL([], [want_nocaseglob], [1],
+    [Find potential files using nocaseglob when deplibs_check_method = "file_magic"])
 ])# _LT_CHECK_MAGIC_METHOD
 
 
@@ -3169,33 +3662,38 @@ AC_DEFUN([LT_PATH_NM],
 AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM,
 [if test -n "$NM"; then
   # Let the user override the test.
-  lt_cv_path_NM="$NM"
+  lt_cv_path_NM=$NM
 else
-  lt_nm_to_check="${ac_tool_prefix}nm"
+  lt_nm_to_check=${ac_tool_prefix}nm
   if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
     lt_nm_to_check="$lt_nm_to_check nm"
   fi
   for lt_tmp_nm in $lt_nm_to_check; do
-    lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+    lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
     for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
-      IFS="$lt_save_ifs"
+      IFS=$lt_save_ifs
       test -z "$ac_dir" && ac_dir=.
-      tmp_nm="$ac_dir/$lt_tmp_nm"
-      if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
+      tmp_nm=$ac_dir/$lt_tmp_nm
+      if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext"; then
 	# Check to see if the nm accepts a BSD-compat flag.
-	# Adding the `sed 1q' prevents false positives on HP-UX, which says:
+	# Adding the 'sed 1q' prevents false positives on HP-UX, which says:
 	#   nm: unknown option "B" ignored
 	# Tru64's nm complains that /dev/null is an invalid object file
-	case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
-	*/dev/null* | *'Invalid file or object type'*)
+	# MSYS converts /dev/null to NUL, MinGW nm treats NUL as empty
+	case $build_os in
+	mingw*) lt_bad_file=conftest.nm/nofile ;;
+	*) lt_bad_file=/dev/null ;;
+	esac
+	case `"$tmp_nm" -B $lt_bad_file 2>&1 | sed '1q'` in
+	*$lt_bad_file* | *'Invalid file or object type'*)
 	  lt_cv_path_NM="$tmp_nm -B"
-	  break
+	  break 2
 	  ;;
 	*)
 	  case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
 	  */dev/null*)
 	    lt_cv_path_NM="$tmp_nm -p"
-	    break
+	    break 2
 	    ;;
 	  *)
 	    lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
@@ -3206,18 +3704,30 @@ else
 	esac
       fi
     done
-    IFS="$lt_save_ifs"
+    IFS=$lt_save_ifs
   done
   : ${lt_cv_path_NM=no}
 fi])
-if test "$lt_cv_path_NM" != "no"; then
-  NM="$lt_cv_path_NM"
+if test no != "$lt_cv_path_NM"; then
+  NM=$lt_cv_path_NM
 else
   # Didn't find any BSD compatible name lister, look for dumpbin.
-  AC_CHECK_TOOLS(DUMPBIN, ["dumpbin -symbols" "link -dump -symbols"], :)
+  if test -n "$DUMPBIN"; then :
+    # Let the user override the test.
+  else
+    AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :)
+    case `$DUMPBIN -symbols -headers /dev/null 2>&1 | sed '1q'` in
+    *COFF*)
+      DUMPBIN="$DUMPBIN -symbols -headers"
+      ;;
+    *)
+      DUMPBIN=:
+      ;;
+    esac
+  fi
   AC_SUBST([DUMPBIN])
-  if test "$DUMPBIN" != ":"; then
-    NM="$DUMPBIN"
+  if test : != "$DUMPBIN"; then
+    NM=$DUMPBIN
   fi
 fi
 test -z "$NM" && NM=nm
@@ -3227,13 +3737,13 @@ _LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl
 AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface],
   [lt_cv_nm_interface="BSD nm"
   echo "int some_variable = 0;" > conftest.$ac_ext
-  (eval echo "\"\$as_me:__oline__: $ac_compile\"" >&AS_MESSAGE_LOG_FD)
+  (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD)
   (eval "$ac_compile" 2>conftest.err)
   cat conftest.err >&AS_MESSAGE_LOG_FD
-  (eval echo "\"\$as_me:__oline__: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD)
+  (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD)
   (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
   cat conftest.err >&AS_MESSAGE_LOG_FD
-  (eval echo "\"\$as_me:__oline__: output\"" >&AS_MESSAGE_LOG_FD)
+  (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD)
   cat conftest.out >&AS_MESSAGE_LOG_FD
   if $GREP 'External.*some_variable' conftest.out > /dev/null; then
     lt_cv_nm_interface="MS dumpbin"
@@ -3248,6 +3758,82 @@ dnl aclocal-1.4 backwards compatibility:
 dnl AC_DEFUN([AM_PROG_NM], [])
 dnl AC_DEFUN([AC_PROG_NM], [])
 
+# _LT_CHECK_SHAREDLIB_FROM_LINKLIB
+# --------------------------------
+# how to determine the name of the shared library
+# associated with a specific link library.
+#  -- PORTME fill in with the dynamic library characteristics
+m4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB],
+[m4_require([_LT_DECL_EGREP])
+m4_require([_LT_DECL_OBJDUMP])
+m4_require([_LT_DECL_DLLTOOL])
+AC_CACHE_CHECK([how to associate runtime and link libraries],
+lt_cv_sharedlib_from_linklib_cmd,
+[lt_cv_sharedlib_from_linklib_cmd='unknown'
+
+case $host_os in
+cygwin* | mingw* | pw32* | cegcc*)
+  # two different shell functions defined in ltmain.sh;
+  # decide which one to use based on capabilities of $DLLTOOL
+  case `$DLLTOOL --help 2>&1` in
+  *--identify-strict*)
+    lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib
+    ;;
+  *)
+    lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback
+    ;;
+  esac
+  ;;
+*)
+  # fallback: assume linklib IS sharedlib
+  lt_cv_sharedlib_from_linklib_cmd=$ECHO
+  ;;
+esac
+])
+sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd
+test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO
+
+_LT_DECL([], [sharedlib_from_linklib_cmd], [1],
+    [Command to associate shared and link libraries])
+])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB
+
+
+# _LT_PATH_MANIFEST_TOOL
+# ----------------------
+# locate the manifest tool
+m4_defun([_LT_PATH_MANIFEST_TOOL],
+[AC_CHECK_TOOL(MANIFEST_TOOL, mt, :)
+test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt
+AC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool],
+  [lt_cv_path_mainfest_tool=no
+  echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD
+  $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out
+  cat conftest.err >&AS_MESSAGE_LOG_FD
+  if $GREP 'Manifest Tool' conftest.out > /dev/null; then
+    lt_cv_path_mainfest_tool=yes
+  fi
+  rm -f conftest*])
+if test yes != "$lt_cv_path_mainfest_tool"; then
+  MANIFEST_TOOL=:
+fi
+_LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl
+])# _LT_PATH_MANIFEST_TOOL
+
+
+# _LT_DLL_DEF_P([FILE])
+# ---------------------
+# True iff FILE is a Windows DLL '.def' file.
+# Keep in sync with func_dll_def_p in the libtool script
+AC_DEFUN([_LT_DLL_DEF_P],
+[dnl
+  test DEF = "`$SED -n dnl
+    -e '\''s/^[[	 ]]*//'\'' dnl Strip leading whitespace
+    -e '\''/^\(;.*\)*$/d'\'' dnl      Delete empty lines and comments
+    -e '\''s/^\(EXPORTS\|LIBRARY\)\([[	 ]].*\)*$/DEF/p'\'' dnl
+    -e q dnl                          Only consider the first "real" line
+    $1`" dnl
+])# _LT_DLL_DEF_P
+
 
 # LT_LIB_M
 # --------
@@ -3256,15 +3842,15 @@ AC_DEFUN([LT_LIB_M],
 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
 LIBM=
 case $host in
-*-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*)
+*-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*)
   # These system don't have libm, or don't need it
   ;;
 *-ncr-sysv4.3*)
-  AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
+  AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM=-lmw)
   AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
   ;;
 *)
-  AC_CHECK_LIB(m, cos, LIBM="-lm")
+  AC_CHECK_LIB(m, cos, LIBM=-lm)
   ;;
 esac
 AC_SUBST([LIBM])
@@ -3283,8 +3869,13 @@ m4_defun([_LT_COMPILER_NO_RTTI],
 
 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
 
-if test "$GCC" = yes; then
-  _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
+if test yes = "$GCC"; then
+  case $cc_basename in
+  nvcc*)
+    _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;;
+  *)
+    _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;;
+  esac
 
   _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
     lt_cv_prog_compiler_rtti_exceptions,
@@ -3301,6 +3892,7 @@ _LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1],
 m4_defun([_LT_CMD_GLOBAL_SYMBOLS],
 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
 AC_REQUIRE([AC_PROG_CC])dnl
+AC_REQUIRE([AC_PROG_AWK])dnl
 AC_REQUIRE([LT_PATH_NM])dnl
 AC_REQUIRE([LT_PATH_LD])dnl
 m4_require([_LT_DECL_SED])dnl
@@ -3329,7 +3921,7 @@ cygwin* | mingw* | pw32* | cegcc*)
   symcode='[[ABCDGISTW]]'
   ;;
 hpux*)
-  if test "$host_cpu" = ia64; then
+  if test ia64 = "$host_cpu"; then
     symcode='[[ABCDEGRST]]'
   fi
   ;;
@@ -3362,14 +3954,44 @@ case `$NM -V 2>&1` in
   symcode='[[ABCDGIRSTW]]' ;;
 esac
 
+if test "$lt_cv_nm_interface" = "MS dumpbin"; then
+  # Gets list of data symbols to import.
+  lt_cv_sys_global_symbol_to_import="sed -n -e 's/^I .* \(.*\)$/\1/p'"
+  # Adjust the below global symbol transforms to fixup imported variables.
+  lt_cdecl_hook=" -e 's/^I .* \(.*\)$/extern __declspec(dllimport) char \1;/p'"
+  lt_c_name_hook=" -e 's/^I .* \(.*\)$/  {\"\1\", (void *) 0},/p'"
+  lt_c_name_lib_hook="\
+  -e 's/^I .* \(lib.*\)$/  {\"\1\", (void *) 0},/p'\
+  -e 's/^I .* \(.*\)$/  {\"lib\1\", (void *) 0},/p'"
+else
+  # Disable hooks by default.
+  lt_cv_sys_global_symbol_to_import=
+  lt_cdecl_hook=
+  lt_c_name_hook=
+  lt_c_name_lib_hook=
+fi
+
 # Transform an extracted symbol line into a proper C declaration.
 # Some systems (esp. on ia64) link data and code symbols differently,
 # so use this general approach.
-lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
+lt_cv_sys_global_symbol_to_cdecl="sed -n"\
+$lt_cdecl_hook\
+" -e 's/^T .* \(.*\)$/extern int \1();/p'"\
+" -e 's/^$symcode$symcode* .* \(.*\)$/extern char \1;/p'"
 
 # Transform an extracted symbol line into symbol name and symbol address
-lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/  {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/  {\"\2\", (void *) \&\2},/p'"
-lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([[^ ]]*\) $/  {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \(lib[[^ ]]*\)$/  {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/  {\"lib\2\", (void *) \&\2},/p'"
+lt_cv_sys_global_symbol_to_c_name_address="sed -n"\
+$lt_c_name_hook\
+" -e 's/^: \(.*\) .*$/  {\"\1\", (void *) 0},/p'"\
+" -e 's/^$symcode$symcode* .* \(.*\)$/  {\"\1\", (void *) \&\1},/p'"
+
+# Transform an extracted symbol line into symbol name with lib prefix and
+# symbol address.
+lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n"\
+$lt_c_name_lib_hook\
+" -e 's/^: \(.*\) .*$/  {\"\1\", (void *) 0},/p'"\
+" -e 's/^$symcode$symcode* .* \(lib.*\)$/  {\"\1\", (void *) \&\1},/p'"\
+" -e 's/^$symcode$symcode* .* \(.*\)$/  {\"lib\1\", (void *) \&\1},/p'"
 
 # Handle CRLF in mingw tool chain
 opt_cr=
@@ -3387,24 +4009,29 @@ for ac_symprfx in "" "_"; do
 
   # Write the raw and C identifiers.
   if test "$lt_cv_nm_interface" = "MS dumpbin"; then
-    # Fake it for dumpbin and say T for any non-static function
-    # and D for any global variable.
+    # Fake it for dumpbin and say T for any non-static function,
+    # D for any global variable and I for any imported variable.
     # Also find C++ and __fastcall symbols from MSVC++,
     # which start with @ or ?.
     lt_cv_sys_global_symbol_pipe="$AWK ['"\
 "     {last_section=section; section=\$ 3};"\
+"     /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\
 "     /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
+"     /^ *Symbol name *: /{split(\$ 0,sn,\":\"); si=substr(sn[2],2)};"\
+"     /^ *Type *: code/{print \"T\",si,substr(si,length(prfx))};"\
+"     /^ *Type *: data/{print \"I\",si,substr(si,length(prfx))};"\
 "     \$ 0!~/External *\|/{next};"\
 "     / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
 "     {if(hide[section]) next};"\
-"     {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\
-"     {split(\$ 0, a, /\||\r/); split(a[2], s)};"\
-"     s[1]~/^[@?]/{print s[1], s[1]; next};"\
-"     s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\
+"     {f=\"D\"}; \$ 0~/\(\).*\|/{f=\"T\"};"\
+"     {split(\$ 0,a,/\||\r/); split(a[2],s)};"\
+"     s[1]~/^[@?]/{print f,s[1],s[1]; next};"\
+"     s[1]~prfx {split(s[1],t,\"@\"); print f,t[1],substr(t[1],length(prfx))}"\
 "     ' prfx=^$ac_symprfx]"
   else
     lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[	 ]]\($symcode$symcode*\)[[	 ]][[	 ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
   fi
+  lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'"
 
   # Check to see that the pipe works correctly.
   pipe_works=no
@@ -3426,7 +4053,7 @@ _LT_EOF
   if AC_TRY_EVAL(ac_compile); then
     # Now try to grab the symbols.
     nlist=conftest.nm
-    if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then
+    if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then
       # Try sorting and uniquifying the output.
       if sort "$nlist" | uniq > "$nlist"T; then
 	mv -f "$nlist"T "$nlist"
@@ -3438,6 +4065,18 @@ _LT_EOF
       if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
 	if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
 	  cat <<_LT_EOF > conftest.$ac_ext
+/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests.  */
+#if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE
+/* DATA imports from DLLs on WIN32 can't be const, because runtime
+   relocations are performed -- see ld's documentation on pseudo-relocs.  */
+# define LT@&t at _DLSYM_CONST
+#elif defined __osf__
+/* This system does not cope well with relocations in const data.  */
+# define LT@&t at _DLSYM_CONST
+#else
+# define LT@&t at _DLSYM_CONST const
+#endif
+
 #ifdef __cplusplus
 extern "C" {
 #endif
@@ -3449,7 +4088,7 @@ _LT_EOF
 	  cat <<_LT_EOF >> conftest.$ac_ext
 
 /* The mapping between symbol names and symbols.  */
-const struct {
+LT@&t at _DLSYM_CONST struct {
   const char *name;
   void       *address;
 }
@@ -3457,7 +4096,7 @@ lt__PROGRAM__LTX_preloaded_symbols[[]] =
 {
   { "@PROGRAM@", (void *) 0 },
 _LT_EOF
-	  $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
+	  $SED "s/^$symcode$symcode* .* \(.*\)$/  {\"\1\", (void *) \&\1},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
 	  cat <<\_LT_EOF >> conftest.$ac_ext
   {0, (void *) 0}
 };
@@ -3475,15 +4114,15 @@ static const void *lt_preloaded_setup() {
 _LT_EOF
 	  # Now try linking the two files.
 	  mv conftest.$ac_objext conftstm.$ac_objext
-	  lt_save_LIBS="$LIBS"
-	  lt_save_CFLAGS="$CFLAGS"
-	  LIBS="conftstm.$ac_objext"
+	  lt_globsym_save_LIBS=$LIBS
+	  lt_globsym_save_CFLAGS=$CFLAGS
+	  LIBS=conftstm.$ac_objext
 	  CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
-	  if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
+	  if AC_TRY_EVAL(ac_link) && test -s conftest$ac_exeext; then
 	    pipe_works=yes
 	  fi
-	  LIBS="$lt_save_LIBS"
-	  CFLAGS="$lt_save_CFLAGS"
+	  LIBS=$lt_globsym_save_LIBS
+	  CFLAGS=$lt_globsym_save_CFLAGS
 	else
 	  echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
 	fi
@@ -3500,7 +4139,7 @@ _LT_EOF
   rm -rf conftest* conftst*
 
   # Do not use the global_symbol_pipe unless it works.
-  if test "$pipe_works" = yes; then
+  if test yes = "$pipe_works"; then
     break
   else
     lt_cv_sys_global_symbol_pipe=
@@ -3516,16 +4155,29 @@ else
   AC_MSG_RESULT(ok)
 fi
 
+# Response file support.
+if test "$lt_cv_nm_interface" = "MS dumpbin"; then
+  nm_file_list_spec='@'
+elif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then
+  nm_file_list_spec='@'
+fi
+
 _LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1],
     [Take the output of nm and produce a listing of raw symbols and C names])
 _LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1],
     [Transform the output of nm in a proper C declaration])
+_LT_DECL([global_symbol_to_import], [lt_cv_sys_global_symbol_to_import], [1],
+    [Transform the output of nm into a list of symbols to manually relocate])
 _LT_DECL([global_symbol_to_c_name_address],
     [lt_cv_sys_global_symbol_to_c_name_address], [1],
     [Transform the output of nm in a C name address pair])
 _LT_DECL([global_symbol_to_c_name_address_lib_prefix],
     [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1],
     [Transform the output of nm in a C name address pair when lib prefix is needed])
+_LT_DECL([nm_interface], [lt_cv_nm_interface], [1],
+    [The name lister interface])
+_LT_DECL([], [nm_file_list_spec], [1],
+    [Specify filename containing input files for $NM])
 ]) # _LT_CMD_GLOBAL_SYMBOLS
 
 
@@ -3537,20 +4189,20 @@ _LT_TAGVAR(lt_prog_compiler_wl, $1)=
 _LT_TAGVAR(lt_prog_compiler_pic, $1)=
 _LT_TAGVAR(lt_prog_compiler_static, $1)=
 
-AC_MSG_CHECKING([for $compiler option to produce PIC])
 m4_if([$1], [CXX], [
   # C++ specific cases for pic, static, wl, etc.
-  if test "$GXX" = yes; then
+  if test yes = "$GXX"; then
     _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
     _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
 
     case $host_os in
     aix*)
       # All AIX code is PIC.
-      if test "$host_cpu" = ia64; then
+      if test ia64 = "$host_cpu"; then
 	# AIX 5 now supports IA64 processor
 	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
       fi
+      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
       ;;
 
     amigaos*)
@@ -3561,8 +4213,8 @@ m4_if([$1], [CXX], [
         ;;
       m68k)
             # FIXME: we need at least 68020 code to build shared libraries, but
-            # adding the `-m68020' flag to GCC prevents building anything better,
-            # like `-m68040'.
+            # adding the '-m68020' flag to GCC prevents building anything better,
+            # like '-m68040'.
             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
         ;;
       esac
@@ -3578,6 +4230,11 @@ m4_if([$1], [CXX], [
       # (--disable-auto-import) libraries
       m4_if([$1], [GCJ], [],
 	[_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
+      case $host_os in
+      os2*)
+	_LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static'
+	;;
+      esac
       ;;
     darwin* | rhapsody*)
       # PIC is the default on this platform
@@ -3588,6 +4245,11 @@ m4_if([$1], [CXX], [
       # DJGPP does not support shared libraries at all
       _LT_TAGVAR(lt_prog_compiler_pic, $1)=
       ;;
+    haiku*)
+      # PIC is the default for Haiku.
+      # The "-static" flag exists, but is broken.
+      _LT_TAGVAR(lt_prog_compiler_static, $1)=
+      ;;
     interix[[3-9]]*)
       # Interix 3.x gcc -fpic/-fPIC options generate broken code.
       # Instead, we relocate shared libraries at runtime.
@@ -3622,7 +4284,7 @@ m4_if([$1], [CXX], [
     case $host_os in
       aix[[4-9]]*)
 	# All AIX code is PIC.
-	if test "$host_cpu" = ia64; then
+	if test ia64 = "$host_cpu"; then
 	  # AIX 5 now supports IA64 processor
 	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
 	else
@@ -3637,6 +4299,12 @@ m4_if([$1], [CXX], [
 	  ;;
 	esac
 	;;
+      mingw* | cygwin* | os2* | pw32* | cegcc*)
+	# This hack is so that the source file can tell whether it is being
+	# built for inclusion in a dll (and should export symbols for example).
+	m4_if([$1], [GCJ], [],
+	  [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
+	;;
       dgux*)
 	case $cc_basename in
 	  ec++*)
@@ -3657,14 +4325,14 @@ m4_if([$1], [CXX], [
 	case $cc_basename in
 	  CC*)
 	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
-	    _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
-	    if test "$host_cpu" != ia64; then
+	    _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive'
+	    if test ia64 != "$host_cpu"; then
 	      _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
 	    fi
 	    ;;
 	  aCC*)
 	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
-	    _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
+	    _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive'
 	    case $host_cpu in
 	    hppa*64*|ia64*)
 	      # +Z the default
@@ -3693,7 +4361,7 @@ m4_if([$1], [CXX], [
 	    ;;
 	esac
 	;;
-      linux* | k*bsd*-gnu)
+      linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
 	case $cc_basename in
 	  KCC*)
 	    # KAI C++ Compiler
@@ -3701,7 +4369,7 @@ m4_if([$1], [CXX], [
 	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
 	    ;;
 	  ecpc* )
-	    # old Intel C++ for x86_64 which still supported -KPIC.
+	    # old Intel C++ for x86_64, which still supported -KPIC.
 	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
 	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
 	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
@@ -3726,8 +4394,8 @@ m4_if([$1], [CXX], [
 	    _LT_TAGVAR(lt_prog_compiler_pic, $1)=
 	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
 	    ;;
-	  xlc* | xlC*)
-	    # IBM XL 8.0 on PPC
+	  xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*)
+	    # IBM XL 8.0, 9.0 on PPC and BlueGene
 	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
 	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
 	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
@@ -3789,7 +4457,7 @@ m4_if([$1], [CXX], [
 	;;
       solaris*)
 	case $cc_basename in
-	  CC*)
+	  CC* | sunCC*)
 	    # Sun C++ 4.2, 5.x and Centerline C++
 	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
 	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
@@ -3846,17 +4514,18 @@ m4_if([$1], [CXX], [
   fi
 ],
 [
-  if test "$GCC" = yes; then
+  if test yes = "$GCC"; then
     _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
     _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
 
     case $host_os in
       aix*)
       # All AIX code is PIC.
-      if test "$host_cpu" = ia64; then
+      if test ia64 = "$host_cpu"; then
 	# AIX 5 now supports IA64 processor
 	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
       fi
+      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
       ;;
 
     amigaos*)
@@ -3867,8 +4536,8 @@ m4_if([$1], [CXX], [
         ;;
       m68k)
             # FIXME: we need at least 68020 code to build shared libraries, but
-            # adding the `-m68020' flag to GCC prevents building anything better,
-            # like `-m68040'.
+            # adding the '-m68020' flag to GCC prevents building anything better,
+            # like '-m68040'.
             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
         ;;
       esac
@@ -3885,6 +4554,11 @@ m4_if([$1], [CXX], [
       # (--disable-auto-import) libraries
       m4_if([$1], [GCJ], [],
 	[_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
+      case $host_os in
+      os2*)
+	_LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static'
+	;;
+      esac
       ;;
 
     darwin* | rhapsody*)
@@ -3893,6 +4567,12 @@ m4_if([$1], [CXX], [
       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
       ;;
 
+    haiku*)
+      # PIC is the default for Haiku.
+      # The "-static" flag exists, but is broken.
+      _LT_TAGVAR(lt_prog_compiler_static, $1)=
+      ;;
+
     hpux*)
       # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
       # PA HP-UX.  On IA64 HP-UX, PIC is the default but the pic flag
@@ -3935,12 +4615,21 @@ m4_if([$1], [CXX], [
       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
       ;;
     esac
+
+    case $cc_basename in
+    nvcc*) # Cuda Compiler Driver 2.2
+      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker '
+      if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
+        _LT_TAGVAR(lt_prog_compiler_pic, $1)="-Xcompiler $_LT_TAGVAR(lt_prog_compiler_pic, $1)"
+      fi
+      ;;
+    esac
   else
     # PORTME Check for flag to pass linker flags through the system compiler.
     case $host_os in
     aix*)
       _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
-      if test "$host_cpu" = ia64; then
+      if test ia64 = "$host_cpu"; then
 	# AIX 5 now supports IA64 processor
 	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
       else
@@ -3948,11 +4637,30 @@ m4_if([$1], [CXX], [
       fi
       ;;
 
+    darwin* | rhapsody*)
+      # PIC is the default on this platform
+      # Common symbols not allowed in MH_DYLIB files
+      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
+      case $cc_basename in
+      nagfor*)
+        # NAG Fortran compiler
+        _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,'
+        _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
+        _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+        ;;
+      esac
+      ;;
+
     mingw* | cygwin* | pw32* | os2* | cegcc*)
       # This hack is so that the source file can tell whether it is being
       # built for inclusion in a dll (and should export symbols for example).
       m4_if([$1], [GCJ], [],
 	[_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
+      case $host_os in
+      os2*)
+	_LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static'
+	;;
+      esac
       ;;
 
     hpux9* | hpux10* | hpux11*)
@@ -3968,7 +4676,7 @@ m4_if([$1], [CXX], [
 	;;
       esac
       # Is there a better lt_prog_compiler_static that works with the bundled CC?
-      _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
+      _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive'
       ;;
 
     irix5* | irix6* | nonstopux*)
@@ -3977,9 +4685,9 @@ m4_if([$1], [CXX], [
       _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
       ;;
 
-    linux* | k*bsd*-gnu)
+    linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
       case $cc_basename in
-      # old Intel for x86_64 which still supported -KPIC.
+      # old Intel for x86_64, which still supported -KPIC.
       ecc*)
 	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
 	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
@@ -3998,7 +4706,19 @@ m4_if([$1], [CXX], [
 	_LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared'
 	_LT_TAGVAR(lt_prog_compiler_static, $1)='--static'
 	;;
-      pgcc* | pgf77* | pgf90* | pgf95*)
+      nagfor*)
+	# NAG Fortran compiler
+	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,'
+	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
+	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+	;;
+      tcc*)
+	# Fabrice Bellard et al's Tiny C Compiler
+	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+	_LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
+	;;
+      pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
         # Portland Group compilers (*not* the Pentium gcc compiler,
 	# which looks to be a dead project)
 	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
@@ -4010,25 +4730,40 @@ m4_if([$1], [CXX], [
         # All Alpha code is PIC.
         _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
         ;;
-      xl*)
-	# IBM XL C 8.0/Fortran 10.1 on PPC
+      xl* | bgxl* | bgf* | mpixl*)
+	# IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene
 	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
 	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
 	_LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
 	;;
       *)
 	case `$CC -V 2>&1 | sed 5q` in
+	*Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*)
+	  # Sun Fortran 8.3 passes all unrecognized flags to the linker
+	  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+	  _LT_TAGVAR(lt_prog_compiler_wl, $1)=''
+	  ;;
+	*Sun\ F* | *Sun*Fortran*)
+	  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+	  _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
+	  ;;
 	*Sun\ C*)
 	  # Sun C 5.9
 	  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
 	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
 	  _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
 	  ;;
-	*Sun\ F*)
-	  # Sun Fortran 8.3 passes all unrecognized flags to the linker
-	  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+        *Intel*\ [[CF]]*Compiler*)
+	  _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+	  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
+	  ;;
+	*Portland\ Group*)
+	  _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+	  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
 	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
-	  _LT_TAGVAR(lt_prog_compiler_wl, $1)=''
 	  ;;
 	esac
 	;;
@@ -4060,7 +4795,7 @@ m4_if([$1], [CXX], [
       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
       _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
       case $cc_basename in
-      f77* | f90* | f95*)
+      f77* | f90* | f95* | sunf77* | sunf90* | sunf95*)
 	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
       *)
 	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
@@ -4080,7 +4815,7 @@ m4_if([$1], [CXX], [
       ;;
 
     sysv4*MP*)
-      if test -d /usr/nec ;then
+      if test -d /usr/nec; then
 	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
 	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
       fi
@@ -4109,7 +4844,7 @@ m4_if([$1], [CXX], [
   fi
 ])
 case $host_os in
-  # For platforms which do not support PIC, -DPIC is meaningless:
+  # For platforms that do not support PIC, -DPIC is meaningless:
   *djgpp*)
     _LT_TAGVAR(lt_prog_compiler_pic, $1)=
     ;;
@@ -4117,9 +4852,11 @@ case $host_os in
     _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t at m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])"
     ;;
 esac
-AC_MSG_RESULT([$_LT_TAGVAR(lt_prog_compiler_pic, $1)])
-_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1],
-	[How to pass a linker flag through the compiler])
+
+AC_CACHE_CHECK([for $compiler option to produce PIC],
+  [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)],
+  [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)])
+_LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)
 
 #
 # Check to make sure the PIC flag actually works.
@@ -4138,6 +4875,8 @@ fi
 _LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1],
 	[Additional compiler flags for building library objects])
 
+_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1],
+	[How to pass a linker flag through the compiler])
 #
 # Check to make sure the static flag actually works.
 #
@@ -4158,6 +4897,7 @@ _LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1],
 m4_defun([_LT_LINKER_SHLIBS],
 [AC_REQUIRE([LT_PATH_LD])dnl
 AC_REQUIRE([LT_PATH_NM])dnl
+m4_require([_LT_PATH_MANIFEST_TOOL])dnl
 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
 m4_require([_LT_DECL_EGREP])dnl
 m4_require([_LT_DECL_SED])dnl
@@ -4166,27 +4906,41 @@ m4_require([_LT_TAG_COMPILER])dnl
 AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
 m4_if([$1], [CXX], [
   _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
+  _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
   case $host_os in
   aix[[4-9]]*)
     # If we're using GNU nm, then we don't want the "-C" option.
-    # -C means demangle to AIX nm, but means don't demangle with GNU nm
+    # -C means demangle to GNU nm, but means don't demangle to AIX nm.
+    # Without the "-l" option, or with the "-B" option, AIX nm treats
+    # weak defined symbols like other global defined symbols, whereas
+    # GNU nm marks them as "W".
+    # While the 'weak' keyword is ignored in the Export File, we need
+    # it in the Import File for the 'aix-soname' feature, so we have
+    # to replace the "-B" option with "-P" for AIX nm.
     if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
-      _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
+      _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols'
     else
-      _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
+      _LT_TAGVAR(export_symbols_cmds, $1)='`func_echo_all $NM | $SED -e '\''s/B\([[^B]]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && ([substr](\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols'
     fi
     ;;
   pw32*)
-    _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
-  ;;
+    _LT_TAGVAR(export_symbols_cmds, $1)=$ltdll_cmds
+    ;;
   cygwin* | mingw* | cegcc*)
-    _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;/^.*[[ ]]__nm__/s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols'
-  ;;
+    case $cc_basename in
+    cl*)
+      _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
+      ;;
+    *)
+      _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols'
+      _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname']
+      ;;
+    esac
+    ;;
   *)
     _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
-  ;;
+    ;;
   esac
-  _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
 ], [
   runpath_var=
   _LT_TAGVAR(allow_undefined_flag, $1)=
@@ -4201,7 +4955,6 @@ m4_if([$1], [CXX], [
   _LT_TAGVAR(hardcode_direct, $1)=no
   _LT_TAGVAR(hardcode_direct_absolute, $1)=no
   _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
-  _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
   _LT_TAGVAR(hardcode_libdir_separator, $1)=
   _LT_TAGVAR(hardcode_minus_L, $1)=no
   _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
@@ -4217,9 +4970,9 @@ m4_if([$1], [CXX], [
   # included in the symbol list
   _LT_TAGVAR(include_expsyms, $1)=
   # exclude_expsyms can be an extended regexp of symbols to exclude
-  # it will be wrapped by ` (' and `)$', so one must not match beginning or
-  # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
-  # as well as any symbol that contains `d'.
+  # it will be wrapped by ' (' and ')$', so one must not match beginning or
+  # end of line.  Example: 'a|bc|.*d.*' will exclude the symbols 'a' and 'bc',
+  # as well as any symbol that contains 'd'.
   _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
   # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
   # platforms (ab)use it in PIC code, but their linkers get confused if
@@ -4235,7 +4988,7 @@ dnl Note also adjust exclude_expsyms for C++ above.
     # FIXME: the MSVC++ port hasn't been tested in a loooong time
     # When not using gcc, we currently assume that we are using
     # Microsoft Visual C++.
-    if test "$GCC" != yes; then
+    if test yes != "$GCC"; then
       with_gnu_ld=no
     fi
     ;;
@@ -4243,30 +4996,57 @@ dnl Note also adjust exclude_expsyms for C++ above.
     # we just hope/assume this is gcc and not c89 (= MSVC++)
     with_gnu_ld=yes
     ;;
-  openbsd*)
+  openbsd* | bitrig*)
     with_gnu_ld=no
     ;;
   esac
 
   _LT_TAGVAR(ld_shlibs, $1)=yes
-  if test "$with_gnu_ld" = yes; then
+
+  # On some targets, GNU ld is compatible enough with the native linker
+  # that we're better off using the native interface for both.
+  lt_use_gnu_ld_interface=no
+  if test yes = "$with_gnu_ld"; then
+    case $host_os in
+      aix*)
+	# The AIX port of GNU ld has always aspired to compatibility
+	# with the native linker.  However, as the warning in the GNU ld
+	# block says, versions before 2.19.5* couldn't really create working
+	# shared libraries, regardless of the interface used.
+	case `$LD -v 2>&1` in
+	  *\ \(GNU\ Binutils\)\ 2.19.5*) ;;
+	  *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;;
+	  *\ \(GNU\ Binutils\)\ [[3-9]]*) ;;
+	  *)
+	    lt_use_gnu_ld_interface=yes
+	    ;;
+	esac
+	;;
+      *)
+	lt_use_gnu_ld_interface=yes
+	;;
+    esac
+  fi
+
+  if test yes = "$lt_use_gnu_ld_interface"; then
     # If archive_cmds runs LD, not CC, wlarc should be empty
-    wlarc='${wl}'
+    wlarc='$wl'
 
     # Set some defaults for GNU ld with shared library support. These
     # are reset later if shared libraries are not supported. Putting them
     # here allows them to be overridden if necessary.
     runpath_var=LD_RUN_PATH
-    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
-    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
+    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
+    _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
     # ancient GNU ld didn't support --whole-archive et. al.
     if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
-      _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
+      _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive'
     else
       _LT_TAGVAR(whole_archive_flag_spec, $1)=
     fi
     supports_anon_versioning=no
-    case `$LD -v 2>&1` in
+    case `$LD -v | $SED -e 's/([^)]\+)\s\+//' 2>&1` in
+      *GNU\ gold*) supports_anon_versioning=yes ;;
       *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
       *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
       *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
@@ -4278,15 +5058,16 @@ dnl Note also adjust exclude_expsyms for C++ above.
     case $host_os in
     aix[[3-9]]*)
       # On AIX/PPC, the GNU linker is very broken
-      if test "$host_cpu" != ia64; then
+      if test ia64 != "$host_cpu"; then
 	_LT_TAGVAR(ld_shlibs, $1)=no
 	cat <<_LT_EOF 1>&2
 
-*** Warning: the GNU linker, at least up to release 2.9.1, is reported
+*** Warning: the GNU linker, at least up to release 2.19, is reported
 *** to be unable to reliably create shared libraries on AIX.
 *** Therefore, libtool is disabling shared libraries support.  If you
-*** really care for shared libraries, you may want to modify your PATH
-*** so that a non-GNU linker is found, and then restart.
+*** really care for shared libraries, you may want to install binutils
+*** 2.20 or above, or modify your PATH so that a non-GNU linker is found.
+*** You will then need to restart the configuration process.
 
 _LT_EOF
       fi
@@ -4296,7 +5077,7 @@ _LT_EOF
       case $host_cpu in
       powerpc)
             # see comment about AmigaOS4 .so support
-            _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+            _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
             _LT_TAGVAR(archive_expsym_cmds, $1)=''
         ;;
       m68k)
@@ -4312,7 +5093,7 @@ _LT_EOF
 	_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
 	# Joseph Beckenbach <jrb3 at best.com> says some releases of gcc
 	# support --undefined.  This deserves some investigation.  FIXME
-	_LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+	_LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
       else
 	_LT_TAGVAR(ld_shlibs, $1)=no
       fi
@@ -4322,61 +5103,97 @@ _LT_EOF
       # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
       # as there is no search path for DLLs.
       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+      _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-all-symbols'
       _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
       _LT_TAGVAR(always_export_symbols, $1)=no
       _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
-      _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/'\'' | $SED -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols'
+      _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols'
+      _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname']
 
       if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
-        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
-	# If the export-symbols file already is a .def file (1st line
-	# is EXPORTS), use it as is; otherwise, prepend...
-	_LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
-	  cp $export_symbols $output_objdir/$soname.def;
-	else
-	  echo EXPORTS > $output_objdir/$soname.def;
-	  cat $export_symbols >> $output_objdir/$soname.def;
-	fi~
-	$CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
+        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
+	# If the export-symbols file already is a .def file, use it as
+	# is; otherwise, prepend EXPORTS...
+	_LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then
+          cp $export_symbols $output_objdir/$soname.def;
+        else
+          echo EXPORTS > $output_objdir/$soname.def;
+          cat $export_symbols >> $output_objdir/$soname.def;
+        fi~
+        $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
       else
 	_LT_TAGVAR(ld_shlibs, $1)=no
       fi
       ;;
 
+    haiku*)
+      _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
+      _LT_TAGVAR(link_all_deplibs, $1)=yes
+      ;;
+
+    os2*)
+      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+      _LT_TAGVAR(hardcode_minus_L, $1)=yes
+      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
+      shrext_cmds=.dll
+      _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
+	$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
+	$ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
+	$ECHO EXPORTS >> $output_objdir/$libname.def~
+	emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
+	$CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
+	emximp -o $lib $output_objdir/$libname.def'
+      _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
+	$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
+	$ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
+	$ECHO EXPORTS >> $output_objdir/$libname.def~
+	prefix_cmds="$SED"~
+	if test EXPORTS = "`$SED 1q $export_symbols`"; then
+	  prefix_cmds="$prefix_cmds -e 1d";
+	fi~
+	prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
+	cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
+	$CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
+	emximp -o $lib $output_objdir/$libname.def'
+      _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
+      _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
+      ;;
+
     interix[[3-9]]*)
       _LT_TAGVAR(hardcode_direct, $1)=no
       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
-      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
-      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
+      _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
       # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
       # Instead, shared libraries are loaded at an image base (0x10000000 by
       # default) and relocated if they conflict, which is a slow very memory
       # consuming and fragmenting process.  To avoid this, we pick a random,
       # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
       # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
-      _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
-      _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+      _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+      _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
       ;;
 
-    gnu* | linux* | tpf* | k*bsd*-gnu)
+    gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
       tmp_diet=no
-      if test "$host_os" = linux-dietlibc; then
+      if test linux-dietlibc = "$host_os"; then
 	case $cc_basename in
 	  diet\ *) tmp_diet=yes;;	# linux-dietlibc with static linking (!diet-dyn)
 	esac
       fi
       if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
-	 && test "$tmp_diet" = no
+	 && test no = "$tmp_diet"
       then
-	tmp_addflag=
+	tmp_addflag=' $pic_flag'
 	tmp_sharedflag='-shared'
 	case $cc_basename,$host_cpu in
         pgcc*)				# Portland Group C compiler
-	  _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
+	  _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
 	  tmp_addflag=' $pic_flag'
 	  ;;
-	pgf77* | pgf90* | pgf95*)	# Portland Group f77 and f90 compilers
-	  _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
+	pgf77* | pgf90* | pgf95* | pgfortran*)
+					# Portland Group f77 and f90 compilers
+	  _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
 	  tmp_addflag=' $pic_flag -Mnomain' ;;
 	ecc*,ia64* | icc*,ia64*)	# Intel C compiler on ia64
 	  tmp_addflag=' -i_dynamic' ;;
@@ -4387,39 +5204,47 @@ _LT_EOF
 	lf95*)				# Lahey Fortran 8.1
 	  _LT_TAGVAR(whole_archive_flag_spec, $1)=
 	  tmp_sharedflag='--shared' ;;
-	xl[[cC]]*)			# IBM XL C 8.0 on PPC (deal with xlf below)
+        nagfor*)                        # NAGFOR 5.3
+          tmp_sharedflag='-Wl,-shared' ;;
+	xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below)
 	  tmp_sharedflag='-qmkshrobj'
 	  tmp_addflag= ;;
+	nvcc*)	# Cuda Compiler Driver 2.2
+	  _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
+	  _LT_TAGVAR(compiler_needs_object, $1)=yes
+	  ;;
 	esac
 	case `$CC -V 2>&1 | sed 5q` in
 	*Sun\ C*)			# Sun C 5.9
-	  _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
+	  _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
 	  _LT_TAGVAR(compiler_needs_object, $1)=yes
 	  tmp_sharedflag='-G' ;;
 	*Sun\ F*)			# Sun Fortran 8.3
 	  tmp_sharedflag='-G' ;;
 	esac
-	_LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+	_LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
 
-        if test "x$supports_anon_versioning" = xyes; then
+        if test yes = "$supports_anon_versioning"; then
           _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
-	    cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
-	    echo "local: *; };" >> $output_objdir/$libname.ver~
-	    $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
+            cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
+            echo "local: *; };" >> $output_objdir/$libname.ver~
+            $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib'
         fi
 
 	case $cc_basename in
-	xlf*)
+	tcc*)
+	  _LT_TAGVAR(export_dynamic_flag_spec, $1)='-rdynamic'
+	  ;;
+	xlf* | bgf* | bgxlf* | mpixlf*)
 	  # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
 	  _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive'
-	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
-	  _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir'
-	  _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $compiler_flags -soname $soname -o $lib'
-	  if test "x$supports_anon_versioning" = xyes; then
+	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
+	  _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib'
+	  if test yes = "$supports_anon_versioning"; then
 	    _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
-	      cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
-	      echo "local: *; };" >> $output_objdir/$libname.ver~
-	      $LD -shared $libobjs $deplibs $compiler_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
+              cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
+              echo "local: *; };" >> $output_objdir/$libname.ver~
+              $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
 	  fi
 	  ;;
 	esac
@@ -4433,8 +5258,8 @@ _LT_EOF
 	_LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
 	wlarc=
       else
-	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
-	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
+	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
       fi
       ;;
 
@@ -4452,8 +5277,8 @@ _LT_EOF
 
 _LT_EOF
       elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
-	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
-	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
+	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
       else
 	_LT_TAGVAR(ld_shlibs, $1)=no
       fi
@@ -4465,7 +5290,7 @@ _LT_EOF
 	_LT_TAGVAR(ld_shlibs, $1)=no
 	cat <<_LT_EOF 1>&2
 
-*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
+*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 cannot
 *** reliably create shared libraries on SCO systems.  Therefore, libtool
 *** is disabling shared libraries support.  We urge you to upgrade GNU
 *** binutils to release 2.16.91.0.3 or newer.  Another option is to modify
@@ -4480,9 +5305,9 @@ _LT_EOF
 	  # DT_RUNPATH tag from executables and libraries.  But doing so
 	  # requires that you compile everything twice, which is a pain.
 	  if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
-	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
-	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
-	    _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
+	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
+	    _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
 	  else
 	    _LT_TAGVAR(ld_shlibs, $1)=no
 	  fi
@@ -4499,15 +5324,15 @@ _LT_EOF
 
     *)
       if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
-	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
-	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
+	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
       else
 	_LT_TAGVAR(ld_shlibs, $1)=no
       fi
       ;;
     esac
 
-    if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then
+    if test no = "$_LT_TAGVAR(ld_shlibs, $1)"; then
       runpath_var=
       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
       _LT_TAGVAR(export_dynamic_flag_spec, $1)=
@@ -4523,7 +5348,7 @@ _LT_EOF
       # Note: this linker hardcodes the directories in LIBPATH if there
       # are no directories specified by -L.
       _LT_TAGVAR(hardcode_minus_L, $1)=yes
-      if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
+      if test yes = "$GCC" && test -z "$lt_prog_compiler_static"; then
 	# Neither direct hardcoding nor static linking is supported with a
 	# broken collect2.
 	_LT_TAGVAR(hardcode_direct, $1)=unsupported
@@ -4531,32 +5356,57 @@ _LT_EOF
       ;;
 
     aix[[4-9]]*)
-      if test "$host_cpu" = ia64; then
+      if test ia64 = "$host_cpu"; then
 	# On IA64, the linker does run time linking by default, so we don't
 	# have to do anything special.
 	aix_use_runtimelinking=no
 	exp_sym_flag='-Bexport'
-	no_entry_flag=""
+	no_entry_flag=
       else
 	# If we're using GNU nm, then we don't want the "-C" option.
-	# -C means demangle to AIX nm, but means don't demangle with GNU nm
+	# -C means demangle to GNU nm, but means don't demangle to AIX nm.
+	# Without the "-l" option, or with the "-B" option, AIX nm treats
+	# weak defined symbols like other global defined symbols, whereas
+	# GNU nm marks them as "W".
+	# While the 'weak' keyword is ignored in the Export File, we need
+	# it in the Import File for the 'aix-soname' feature, so we have
+	# to replace the "-B" option with "-P" for AIX nm.
 	if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
-	  _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
+	  _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols'
 	else
-	  _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
+	  _LT_TAGVAR(export_symbols_cmds, $1)='`func_echo_all $NM | $SED -e '\''s/B\([[^B]]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && ([substr](\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols'
 	fi
 	aix_use_runtimelinking=no
 
 	# Test if we are trying to use run time linking or normal
 	# AIX style linking. If -brtl is somewhere in LDFLAGS, we
-	# need to do runtime linking.
+	# have runtime linking enabled, and use it for executables.
+	# For shared libraries, we enable/disable runtime linking
+	# depending on the kind of the shared library created -
+	# when "with_aix_soname,aix_use_runtimelinking" is:
+	# "aix,no"   lib.a(lib.so.V) shared, rtl:no,  for executables
+	# "aix,yes"  lib.so          shared, rtl:yes, for executables
+	#            lib.a           static archive
+	# "both,no"  lib.so.V(shr.o) shared, rtl:yes
+	#            lib.a(lib.so.V) shared, rtl:no,  for executables
+	# "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables
+	#            lib.a(lib.so.V) shared, rtl:no
+	# "svr4,*"   lib.so.V(shr.o) shared, rtl:yes, for executables
+	#            lib.a           static archive
 	case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
 	  for ld_flag in $LDFLAGS; do
-	  if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
+	  if (test x-brtl = "x$ld_flag" || test x-Wl,-brtl = "x$ld_flag"); then
 	    aix_use_runtimelinking=yes
 	    break
 	  fi
 	  done
+	  if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then
+	    # With aix-soname=svr4, we create the lib.so.V shared archives only,
+	    # so we don't have lib.a shared libs to link our executables.
+	    # We have to force runtime linking in this case.
+	    aix_use_runtimelinking=yes
+	    LDFLAGS="$LDFLAGS -Wl,-brtl"
+	  fi
 	  ;;
 	esac
 
@@ -4575,13 +5425,21 @@ _LT_EOF
       _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
       _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
       _LT_TAGVAR(link_all_deplibs, $1)=yes
-      _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
+      _LT_TAGVAR(file_list_spec, $1)='$wl-f,'
+      case $with_aix_soname,$aix_use_runtimelinking in
+      aix,*) ;; # traditional, no import file
+      svr4,* | *,yes) # use import file
+	# The Import File defines what to hardcode.
+	_LT_TAGVAR(hardcode_direct, $1)=no
+	_LT_TAGVAR(hardcode_direct_absolute, $1)=no
+	;;
+      esac
 
-      if test "$GCC" = yes; then
+      if test yes = "$GCC"; then
 	case $host_os in aix4.[[012]]|aix4.[[012]].*)
 	# We only want to do this on AIX 4.2 and lower, the check
 	# below for broken collect2 doesn't work under 4.3+
-	  collect2name=`${CC} -print-prog-name=collect2`
+	  collect2name=`$CC -print-prog-name=collect2`
 	  if test -f "$collect2name" &&
 	   strings "$collect2name" | $GREP resolve_lib_name >/dev/null
 	  then
@@ -4600,56 +5458,80 @@ _LT_EOF
 	  ;;
 	esac
 	shared_flag='-shared'
-	if test "$aix_use_runtimelinking" = yes; then
-	  shared_flag="$shared_flag "'${wl}-G'
+	if test yes = "$aix_use_runtimelinking"; then
+	  shared_flag="$shared_flag "'$wl-G'
 	fi
+	# Need to ensure runtime linking is disabled for the traditional
+	# shared library, or the linker may eventually find shared libraries
+	# /with/ Import File - we do not want to mix them.
+	shared_flag_aix='-shared'
+	shared_flag_svr4='-shared $wl-G'
       else
 	# not using gcc
-	if test "$host_cpu" = ia64; then
+	if test ia64 = "$host_cpu"; then
 	# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
 	# chokes on -Wl,-G. The following line is correct:
 	  shared_flag='-G'
 	else
-	  if test "$aix_use_runtimelinking" = yes; then
-	    shared_flag='${wl}-G'
+	  if test yes = "$aix_use_runtimelinking"; then
+	    shared_flag='$wl-G'
 	  else
-	    shared_flag='${wl}-bM:SRE'
+	    shared_flag='$wl-bM:SRE'
 	  fi
+	  shared_flag_aix='$wl-bM:SRE'
+	  shared_flag_svr4='$wl-G'
 	fi
       fi
 
-      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
+      _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-bexpall'
       # It seems that -bexpall does not export symbols beginning with
       # underscore (_), so it is better to generate a list of symbols to export.
       _LT_TAGVAR(always_export_symbols, $1)=yes
-      if test "$aix_use_runtimelinking" = yes; then
+      if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then
 	# Warning - without using the other runtime loading flags (-brtl),
 	# -berok will link without error, but may produce a broken library.
 	_LT_TAGVAR(allow_undefined_flag, $1)='-berok'
         # Determine the default libpath from the value encoded in an
         # empty executable.
-        _LT_SYS_MODULE_PATH_AIX
-        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
-        _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
+        _LT_SYS_MODULE_PATH_AIX([$1])
+        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath"
+        _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs $wl'$no_entry_flag' $compiler_flags `if test -n "$allow_undefined_flag"; then func_echo_all "$wl$allow_undefined_flag"; else :; fi` $wl'$exp_sym_flag:\$export_symbols' '$shared_flag
       else
-	if test "$host_cpu" = ia64; then
-	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
+	if test ia64 = "$host_cpu"; then
+	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $libdir:/usr/lib:/lib'
 	  _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
-	  _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
+	  _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\$wl$no_entry_flag"' $compiler_flags $wl$allow_undefined_flag '"\$wl$exp_sym_flag:\$export_symbols"
 	else
 	 # Determine the default libpath from the value encoded in an
 	 # empty executable.
-	 _LT_SYS_MODULE_PATH_AIX
-	 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
+	 _LT_SYS_MODULE_PATH_AIX([$1])
+	 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath"
 	  # Warning - without using the other run time loading flags,
 	  # -berok will link without error, but may produce a broken library.
-	  _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
-	  _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
-	  # Exported symbols can be pulled into shared objects from archives
-	  _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
+	  _LT_TAGVAR(no_undefined_flag, $1)=' $wl-bernotok'
+	  _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-berok'
+	  if test yes = "$with_gnu_ld"; then
+	    # We only use this code for GNU lds that support --whole-archive.
+	    _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive'
+	  else
+	    # Exported symbols can be pulled into shared objects from archives
+	    _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
+	  fi
 	  _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
-	  # This is similar to how AIX traditionally builds its shared libraries.
-	  _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
+	  _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d'
+	  # -brtl affects multiple linker settings, -berok does not and is overridden later
+	  compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`'
+	  if test svr4 != "$with_aix_soname"; then
+	    # This is similar to how AIX traditionally builds its shared libraries.
+	    _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_aix' -o $output_objdir/$realname.d/$soname $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$realname.d/$soname'
+	  fi
+	  if test aix != "$with_aix_soname"; then
+	    _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_svr4' -o $output_objdir/$realname.d/$shared_archive_member_spec.o $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$STRIP -e $output_objdir/$realname.d/$shared_archive_member_spec.o~( func_echo_all "#! $soname($shared_archive_member_spec.o)"; if test shr_64 = "$shared_archive_member_spec"; then func_echo_all "# 64"; else func_echo_all "# 3 [...]
+	  else
+	    # used by -dlpreopen to get the symbols
+	    _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV  $output_objdir/$realname.d/$soname $output_objdir'
+	  fi
+	  _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d'
 	fi
       fi
       ;;
@@ -4658,7 +5540,7 @@ _LT_EOF
       case $host_cpu in
       powerpc)
             # see comment about AmigaOS4 .so support
-            _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+            _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
             _LT_TAGVAR(archive_expsym_cmds, $1)=''
         ;;
       m68k)
@@ -4678,25 +5560,70 @@ _LT_EOF
       # Microsoft Visual C++.
       # hardcode_libdir_flag_spec is actually meaningless, as there is
       # no search path for DLLs.
-      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
-      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
-      # Tell ltmain to make .lib files, not .a files.
-      libext=lib
-      # Tell ltmain to make .dll files, not .so files.
-      shrext_cmds=".dll"
-      # FIXME: Setting linknames here is a bad hack.
-      _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `$ECHO "X$deplibs" | $Xsed -e '\''s/ -lc$//'\''` -link -dll~linknames='
-      # The linker will automatically build a .lib file if we build a DLL.
-      _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
-      # FIXME: Should let the user specify the lib program.
-      _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs'
-      _LT_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`'
-      _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
-      ;;
-
-    darwin* | rhapsody*)
-      _LT_DARWIN_LINKER_FEATURES($1)
-      ;;
+      case $cc_basename in
+      cl*)
+	# Native MSVC
+	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
+	_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
+	_LT_TAGVAR(always_export_symbols, $1)=yes
+	_LT_TAGVAR(file_list_spec, $1)='@'
+	# Tell ltmain to make .lib files, not .a files.
+	libext=lib
+	# Tell ltmain to make .dll files, not .so files.
+	shrext_cmds=.dll
+	# FIXME: Setting linknames here is a bad hack.
+	_LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames='
+	_LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then
+            cp "$export_symbols" "$output_objdir/$soname.def";
+            echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp";
+          else
+            $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp;
+          fi~
+          $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
+          linknames='
+	# The linker will not automatically build a static lib if we build a DLL.
+	# _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
+	_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
+	_LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
+	_LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1,DATA/'\'' | $SED -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols'
+	# Don't use ranlib
+	_LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
+	_LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~
+          lt_tool_outputfile="@TOOL_OUTPUT@"~
+          case $lt_outputfile in
+            *.exe|*.EXE) ;;
+            *)
+              lt_outputfile=$lt_outputfile.exe
+              lt_tool_outputfile=$lt_tool_outputfile.exe
+              ;;
+          esac~
+          if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then
+            $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
+            $RM "$lt_outputfile.manifest";
+          fi'
+	;;
+      *)
+	# Assume MSVC wrapper
+	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
+	_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
+	# Tell ltmain to make .lib files, not .a files.
+	libext=lib
+	# Tell ltmain to make .dll files, not .so files.
+	shrext_cmds=.dll
+	# FIXME: Setting linknames here is a bad hack.
+	_LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames='
+	# The linker will automatically build a .lib file if we build a DLL.
+	_LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
+	# FIXME: Should let the user specify the lib program.
+	_LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs'
+	_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
+	;;
+      esac
+      ;;
+
+    darwin* | rhapsody*)
+      _LT_DARWIN_LINKER_FEATURES($1)
+      ;;
 
     dgux*)
       _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
@@ -4704,10 +5631,6 @@ _LT_EOF
       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
       ;;
 
-    freebsd1*)
-      _LT_TAGVAR(ld_shlibs, $1)=no
-      ;;
-
     # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
     # support.  Future versions do this automatically, but an explicit c++rt0.o
     # does not break anything, and helps significantly (at the cost of a little
@@ -4720,7 +5643,7 @@ _LT_EOF
       ;;
 
     # Unfortunately, older versions of FreeBSD 2 do not have this feature.
-    freebsd2*)
+    freebsd2.*)
       _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
       _LT_TAGVAR(hardcode_direct, $1)=yes
       _LT_TAGVAR(hardcode_minus_L, $1)=yes
@@ -4729,41 +5652,40 @@ _LT_EOF
 
     # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
     freebsd* | dragonfly*)
-      _LT_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
+      _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
       _LT_TAGVAR(hardcode_direct, $1)=yes
       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
       ;;
 
     hpux9*)
-      if test "$GCC" = yes; then
-	_LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+      if test yes = "$GCC"; then
+	_LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared $pic_flag $wl+b $wl$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib'
       else
-	_LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+	_LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib'
       fi
-      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
+      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir'
       _LT_TAGVAR(hardcode_libdir_separator, $1)=:
       _LT_TAGVAR(hardcode_direct, $1)=yes
 
       # hardcode_minus_L: Not really in the search PATH,
       # but as the default location of the library.
       _LT_TAGVAR(hardcode_minus_L, $1)=yes
-      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+      _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
       ;;
 
     hpux10*)
-      if test "$GCC" = yes -a "$with_gnu_ld" = no; then
-	_LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+      if test yes,no = "$GCC,$with_gnu_ld"; then
+	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
       else
 	_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
       fi
-      if test "$with_gnu_ld" = no; then
-	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
-	_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
+      if test no = "$with_gnu_ld"; then
+	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir'
 	_LT_TAGVAR(hardcode_libdir_separator, $1)=:
 	_LT_TAGVAR(hardcode_direct, $1)=yes
 	_LT_TAGVAR(hardcode_direct_absolute, $1)=yes
-	_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+	_LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
 	# hardcode_minus_L: Not really in the search PATH,
 	# but as the default location of the library.
 	_LT_TAGVAR(hardcode_minus_L, $1)=yes
@@ -4771,33 +5693,40 @@ _LT_EOF
       ;;
 
     hpux11*)
-      if test "$GCC" = yes -a "$with_gnu_ld" = no; then
+      if test yes,no = "$GCC,$with_gnu_ld"; then
 	case $host_cpu in
 	hppa*64*)
-	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
 	  ;;
 	ia64*)
-	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
+	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
 	  ;;
 	*)
-	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
 	  ;;
 	esac
       else
 	case $host_cpu in
 	hppa*64*)
-	  _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+	  _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
 	  ;;
 	ia64*)
-	  _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
+	  _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
 	  ;;
 	*)
-	  _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+	m4_if($1, [], [
+	  # Older versions of the 11.00 compiler do not understand -b yet
+	  # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does)
+	  _LT_LINKER_OPTION([if $CC understands -b],
+	    _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b],
+	    [_LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'],
+	    [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])],
+	  [_LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'])
 	  ;;
 	esac
       fi
-      if test "$with_gnu_ld" = no; then
-	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
+      if test no = "$with_gnu_ld"; then
+	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir'
 	_LT_TAGVAR(hardcode_libdir_separator, $1)=:
 
 	case $host_cpu in
@@ -4808,7 +5737,7 @@ _LT_EOF
 	*)
 	  _LT_TAGVAR(hardcode_direct, $1)=yes
 	  _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
-	  _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+	  _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
 
 	  # hardcode_minus_L: Not really in the search PATH,
 	  # but as the default location of the library.
@@ -4819,28 +5748,53 @@ _LT_EOF
       ;;
 
     irix5* | irix6* | nonstopux*)
-      if test "$GCC" = yes; then
-	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+      if test yes = "$GCC"; then
+	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib'
 	# Try to use the -exported_symbol ld option, if it does not
 	# work, assume that -exports_file does not work either and
 	# implicitly export all symbols.
-        save_LDFLAGS="$LDFLAGS"
-        LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null"
-        AC_LINK_IFELSE([AC_LANG_SOURCE([[int foo(void) {}]])],
-          _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib'
-        )
-        LDFLAGS="$save_LDFLAGS"
+	# This should be the same for all languages, so no per-tag cache variable.
+	AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol],
+	  [lt_cv_irix_exported_symbol],
+	  [save_LDFLAGS=$LDFLAGS
+	   LDFLAGS="$LDFLAGS -shared $wl-exported_symbol ${wl}foo $wl-update_registry $wl/dev/null"
+	   AC_LINK_IFELSE(
+	     [AC_LANG_SOURCE(
+	        [AC_LANG_CASE([C], [[int foo (void) { return 0; }]],
+			      [C++], [[int foo (void) { return 0; }]],
+			      [Fortran 77], [[
+      subroutine foo
+      end]],
+			      [Fortran], [[
+      subroutine foo
+      end]])])],
+	      [lt_cv_irix_exported_symbol=yes],
+	      [lt_cv_irix_exported_symbol=no])
+           LDFLAGS=$save_LDFLAGS])
+	if test yes = "$lt_cv_irix_exported_symbol"; then
+          _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations $wl-exports_file $wl$export_symbols -o $lib'
+	fi
       else
-	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
-	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib'
+	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib'
+	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -exports_file $export_symbols -o $lib'
       fi
       _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
-      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
       _LT_TAGVAR(hardcode_libdir_separator, $1)=:
       _LT_TAGVAR(inherit_rpath, $1)=yes
       _LT_TAGVAR(link_all_deplibs, $1)=yes
       ;;
 
+    linux*)
+      case $cc_basename in
+      tcc*)
+	# Fabrice Bellard et al's Tiny C Compiler
+	_LT_TAGVAR(ld_shlibs, $1)=yes
+	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
+	;;
+      esac
+      ;;
+
     netbsd*)
       if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
 	_LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
@@ -4855,7 +5809,7 @@ _LT_EOF
     newsos6)
       _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
       _LT_TAGVAR(hardcode_direct, $1)=yes
-      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
       _LT_TAGVAR(hardcode_libdir_separator, $1)=:
       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
       ;;
@@ -4863,27 +5817,19 @@ _LT_EOF
     *nto* | *qnx*)
       ;;
 
-    openbsd*)
+    openbsd* | bitrig*)
       if test -f /usr/libexec/ld.so; then
 	_LT_TAGVAR(hardcode_direct, $1)=yes
 	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
 	_LT_TAGVAR(hardcode_direct_absolute, $1)=yes
-	if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+	if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
 	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
-	  _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
-	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
-	  _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+	  _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags $wl-retain-symbols-file,$export_symbols'
+	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
+	  _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
 	else
-	  case $host_os in
-	   openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
-	     _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
-	     _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
-	     ;;
-	   *)
-	     _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
-	     _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
-	     ;;
-	  esac
+	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
+	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
 	fi
       else
 	_LT_TAGVAR(ld_shlibs, $1)=no
@@ -4894,33 +5840,53 @@ _LT_EOF
       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
       _LT_TAGVAR(hardcode_minus_L, $1)=yes
       _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
-      _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$ECHO DATA >> $output_objdir/$libname.def~$ECHO " SINGLE NONSHARED" >> $output_objdir/$libname.def~$ECHO EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def'
-      _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
+      shrext_cmds=.dll
+      _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
+	$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
+	$ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
+	$ECHO EXPORTS >> $output_objdir/$libname.def~
+	emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
+	$CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
+	emximp -o $lib $output_objdir/$libname.def'
+      _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
+	$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
+	$ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
+	$ECHO EXPORTS >> $output_objdir/$libname.def~
+	prefix_cmds="$SED"~
+	if test EXPORTS = "`$SED 1q $export_symbols`"; then
+	  prefix_cmds="$prefix_cmds -e 1d";
+	fi~
+	prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
+	cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
+	$CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
+	emximp -o $lib $output_objdir/$libname.def'
+      _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
+      _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
       ;;
 
     osf3*)
-      if test "$GCC" = yes; then
-	_LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
-	_LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+      if test yes = "$GCC"; then
+	_LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*'
+	_LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib'
       else
 	_LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
-	_LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
+	_LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib'
       fi
       _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
-      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
       _LT_TAGVAR(hardcode_libdir_separator, $1)=:
       ;;
 
     osf4* | osf5*)	# as osf3* with the addition of -msym flag
-      if test "$GCC" = yes; then
-	_LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
-	_LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
-	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+      if test yes = "$GCC"; then
+	_LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*'
+	_LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $pic_flag $libobjs $deplibs $compiler_flags $wl-msym $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib'
+	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
       else
 	_LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
-	_LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
+	_LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib'
 	_LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~
-	$CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp'
+          $CC -shared$allow_undefined_flag $wl-input $wl$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib~$RM $lib.exp'
 
 	# Both c and cxx compiler support -rpath directly
 	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
@@ -4931,24 +5897,24 @@ _LT_EOF
 
     solaris*)
       _LT_TAGVAR(no_undefined_flag, $1)=' -z defs'
-      if test "$GCC" = yes; then
-	wlarc='${wl}'
-	_LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+      if test yes = "$GCC"; then
+	wlarc='$wl'
+	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl-z ${wl}text $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
 	_LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
-	  $CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
+          $CC -shared $pic_flag $wl-z ${wl}text $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
       else
 	case `$CC -V 2>&1` in
 	*"Compilers 5.0"*)
 	  wlarc=''
-	  _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
+	  _LT_TAGVAR(archive_cmds, $1)='$LD -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $linker_flags'
 	  _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
-	  $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
+            $LD -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
 	  ;;
 	*)
-	  wlarc='${wl}'
-	  _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags'
+	  wlarc='$wl'
+	  _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $compiler_flags'
 	  _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
-	  $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
+            $CC -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
 	  ;;
 	esac
       fi
@@ -4958,11 +5924,11 @@ _LT_EOF
       solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
       *)
 	# The compiler driver will combine and reorder linker options,
-	# but understands `-z linker_flag'.  GCC discards it without `$wl',
+	# but understands '-z linker_flag'.  GCC discards it without '$wl',
 	# but is careful enough not to reorder.
 	# Supported since Solaris 2.6 (maybe 2.5.1?)
-	if test "$GCC" = yes; then
-	  _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
+	if test yes = "$GCC"; then
+	  _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract'
 	else
 	  _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
 	fi
@@ -4972,10 +5938,10 @@ _LT_EOF
       ;;
 
     sunos4*)
-      if test "x$host_vendor" = xsequent; then
+      if test sequent = "$host_vendor"; then
 	# Use $CC to link under sequent, because it throws in some extra .o
 	# files that make .init and .fini sections work.
-	_LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
+	_LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h $soname -o $lib $libobjs $deplibs $compiler_flags'
       else
 	_LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
       fi
@@ -5024,43 +5990,43 @@ _LT_EOF
       ;;
 
     sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
-      _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
+      _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text'
       _LT_TAGVAR(archive_cmds_need_lc, $1)=no
       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
       runpath_var='LD_RUN_PATH'
 
-      if test "$GCC" = yes; then
-	_LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
-	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+      if test yes = "$GCC"; then
+	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
       else
-	_LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
-	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	_LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
       fi
       ;;
 
     sysv5* | sco3.2v5* | sco5v6*)
-      # Note: We can NOT use -z defs as we might desire, because we do not
+      # Note: We CANNOT use -z defs as we might desire, because we do not
       # link with -lc, and that would cause any symbols used from libc to
       # always be unresolved, which means just about no library would
       # ever link correctly.  If we're not using GNU ld we use -z text
       # though, which does catch some bad symbols but isn't as heavy-handed
       # as -z defs.
-      _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
-      _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
+      _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text'
+      _LT_TAGVAR(allow_undefined_flag, $1)='$wl-z,nodefs'
       _LT_TAGVAR(archive_cmds_need_lc, $1)=no
       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
-      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
+      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R,$libdir'
       _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
       _LT_TAGVAR(link_all_deplibs, $1)=yes
-      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
+      _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Bexport'
       runpath_var='LD_RUN_PATH'
 
-      if test "$GCC" = yes; then
-	_LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
-	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+      if test yes = "$GCC"; then
+	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
       else
-	_LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
-	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	_LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
       fi
       ;;
 
@@ -5075,17 +6041,17 @@ _LT_EOF
       ;;
     esac
 
-    if test x$host_vendor = xsni; then
+    if test sni = "$host_vendor"; then
       case $host in
       sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
-	_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym'
+	_LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Blargedynsym'
 	;;
       esac
     fi
   fi
 ])
 AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
-test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
+test no = "$_LT_TAGVAR(ld_shlibs, $1)" && can_build_shared=no
 
 _LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld
 
@@ -5102,7 +6068,7 @@ x|xyes)
   # Assume -lc should be added
   _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
 
-  if test "$enable_shared" = yes && test "$GCC" = yes; then
+  if test yes,yes = "$GCC,$enable_shared"; then
     case $_LT_TAGVAR(archive_cmds, $1) in
     *'~'*)
       # FIXME: we may have to deal with multi-command sequences.
@@ -5111,36 +6077,38 @@ x|xyes)
       # Test whether the compiler implicitly links with -lc since on some
       # systems, -lgcc has to come before -lc. If gcc already passes -lc
       # to ld, don't add -lc before -lgcc.
-      AC_MSG_CHECKING([whether -lc should be explicitly linked in])
-      $RM conftest*
-      echo "$lt_simple_compile_test_code" > conftest.$ac_ext
-
-      if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
-        soname=conftest
-        lib=conftest
-        libobjs=conftest.$ac_objext
-        deplibs=
-        wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1)
-	pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1)
-        compiler_flags=-v
-        linker_flags=-v
-        verstring=
-        output_objdir=.
-        libname=conftest
-        lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1)
-        _LT_TAGVAR(allow_undefined_flag, $1)=
-        if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1)
-        then
-	  _LT_TAGVAR(archive_cmds_need_lc, $1)=no
-        else
-	  _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
-        fi
-        _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
-      else
-        cat conftest.err 1>&5
-      fi
-      $RM conftest*
-      AC_MSG_RESULT([$_LT_TAGVAR(archive_cmds_need_lc, $1)])
+      AC_CACHE_CHECK([whether -lc should be explicitly linked in],
+	[lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1),
+	[$RM conftest*
+	echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+
+	if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
+	  soname=conftest
+	  lib=conftest
+	  libobjs=conftest.$ac_objext
+	  deplibs=
+	  wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1)
+	  pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1)
+	  compiler_flags=-v
+	  linker_flags=-v
+	  verstring=
+	  output_objdir=.
+	  libname=conftest
+	  lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1)
+	  _LT_TAGVAR(allow_undefined_flag, $1)=
+	  if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1)
+	  then
+	    lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no
+	  else
+	    lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes
+	  fi
+	  _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
+	else
+	  cat conftest.err 1>&5
+	fi
+	$RM conftest*
+	])
+      _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)
       ;;
     esac
   fi
@@ -5177,18 +6145,15 @@ _LT_TAGDECL([], [no_undefined_flag], [1],
 _LT_TAGDECL([], [hardcode_libdir_flag_spec], [1],
     [Flag to hardcode $libdir into a binary during linking.
     This must work even if $libdir does not exist])
-_LT_TAGDECL([], [hardcode_libdir_flag_spec_ld], [1],
-    [[If ld is used when linking, flag to hardcode $libdir into a binary
-    during linking.  This must work even if $libdir does not exist]])
 _LT_TAGDECL([], [hardcode_libdir_separator], [1],
     [Whether we need a single "-rpath" flag with a separated argument])
 _LT_TAGDECL([], [hardcode_direct], [0],
-    [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
+    [Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes
     DIR into the resulting binary])
 _LT_TAGDECL([], [hardcode_direct_absolute], [0],
-    [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
+    [Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes
     DIR into the resulting binary and the resulting library dependency is
-    "absolute", i.e impossible to change by setting ${shlibpath_var} if the
+    "absolute", i.e impossible to change by setting $shlibpath_var if the
     library is relocated])
 _LT_TAGDECL([], [hardcode_minus_L], [0],
     [Set to "yes" if using the -LDIR flag during linking hardcodes DIR
@@ -5205,8 +6170,6 @@ _LT_TAGDECL([], [inherit_rpath], [0],
     to runtime path list])
 _LT_TAGDECL([], [link_all_deplibs], [0],
     [Whether libtool must link a program against all its dependency libraries])
-_LT_TAGDECL([], [fix_srcfile_path], [1],
-    [Fix the shell variable $srcfile for the compiler])
 _LT_TAGDECL([], [always_export_symbols], [0],
     [Set to "yes" if exported symbols are required])
 _LT_TAGDECL([], [export_symbols_cmds], [2],
@@ -5217,6 +6180,8 @@ _LT_TAGDECL([], [include_expsyms], [1],
     [Symbols that must always be exported])
 _LT_TAGDECL([], [prelink_cmds], [2],
     [Commands necessary for linking programs (against libraries) with templates])
+_LT_TAGDECL([], [postlink_cmds], [2],
+    [Commands necessary for finishing linking programs])
 _LT_TAGDECL([], [file_list_spec], [1],
     [Specify filename containing input files])
 dnl FIXME: Not yet implemented
@@ -5229,10 +6194,10 @@ dnl    [Compiler flag to generate thread safe objects])
 # ------------------------
 # Ensure that the configuration variables for a C compiler are suitably
 # defined.  These variables are subsequently used by _LT_CONFIG to write
-# the compiler configuration to `libtool'.
+# the compiler configuration to 'libtool'.
 m4_defun([_LT_LANG_C_CONFIG],
 [m4_require([_LT_DECL_EGREP])dnl
-lt_save_CC="$CC"
+lt_save_CC=$CC
 AC_LANG_PUSH(C)
 
 # Source file extension for C test sources.
@@ -5272,18 +6237,18 @@ if test -n "$compiler"; then
   LT_SYS_DLOPEN_SELF
   _LT_CMD_STRIPLIB
 
-  # Report which library types will actually be built
+  # Report what library types will actually be built
   AC_MSG_CHECKING([if libtool supports shared libraries])
   AC_MSG_RESULT([$can_build_shared])
 
   AC_MSG_CHECKING([whether to build shared libraries])
-  test "$can_build_shared" = "no" && enable_shared=no
+  test no = "$can_build_shared" && enable_shared=no
 
   # On AIX, shared libraries and static libraries use the same namespace, and
   # are all built from PIC.
   case $host_os in
   aix3*)
-    test "$enable_shared" = yes && enable_static=no
+    test yes = "$enable_shared" && enable_static=no
     if test -n "$RANLIB"; then
       archive_cmds="$archive_cmds~\$RANLIB \$lib"
       postinstall_cmds='$RANLIB $lib'
@@ -5291,8 +6256,12 @@ if test -n "$compiler"; then
     ;;
 
   aix[[4-9]]*)
-    if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
-      test "$enable_shared" = yes && enable_static=no
+    if test ia64 != "$host_cpu"; then
+      case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in
+      yes,aix,yes) ;;			# shared object as lib.so file only
+      yes,svr4,*) ;;			# shared object as lib.so archive member only
+      yes,*) enable_static=no ;;	# shared object in lib.a archive as well
+      esac
     fi
     ;;
   esac
@@ -5300,47 +6269,32 @@ if test -n "$compiler"; then
 
   AC_MSG_CHECKING([whether to build static libraries])
   # Make sure either enable_shared or enable_static is yes.
-  test "$enable_shared" = yes || enable_static=yes
+  test yes = "$enable_shared" || enable_static=yes
   AC_MSG_RESULT([$enable_static])
 
   _LT_CONFIG($1)
 fi
 AC_LANG_POP
-CC="$lt_save_CC"
+CC=$lt_save_CC
 ])# _LT_LANG_C_CONFIG
 
 
-# _LT_PROG_CXX
-# ------------
-# Since AC_PROG_CXX is broken, in that it returns g++ if there is no c++
-# compiler, we have our own version here.
-m4_defun([_LT_PROG_CXX],
-[
-pushdef([AC_MSG_ERROR], [_lt_caught_CXX_error=yes])
-AC_PROG_CXX
-if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
-    ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
-    (test "X$CXX" != "Xg++"))) ; then
-  AC_PROG_CXXCPP
-else
-  _lt_caught_CXX_error=yes
-fi
-popdef([AC_MSG_ERROR])
-])# _LT_PROG_CXX
-
-dnl aclocal-1.4 backwards compatibility:
-dnl AC_DEFUN([_LT_PROG_CXX], [])
-
-
 # _LT_LANG_CXX_CONFIG([TAG])
 # --------------------------
 # Ensure that the configuration variables for a C++ compiler are suitably
 # defined.  These variables are subsequently used by _LT_CONFIG to write
-# the compiler configuration to `libtool'.
+# the compiler configuration to 'libtool'.
 m4_defun([_LT_LANG_CXX_CONFIG],
-[AC_REQUIRE([_LT_PROG_CXX])dnl
-m4_require([_LT_FILEUTILS_DEFAULTS])dnl
+[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
 m4_require([_LT_DECL_EGREP])dnl
+m4_require([_LT_PATH_MANIFEST_TOOL])dnl
+if test -n "$CXX" && ( test no != "$CXX" &&
+    ( (test g++ = "$CXX" && `g++ -v >/dev/null 2>&1` ) ||
+    (test g++ != "$CXX"))); then
+  AC_PROG_CXXCPP
+else
+  _lt_caught_CXX_error=yes
+fi
 
 AC_LANG_PUSH(C++)
 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
@@ -5352,7 +6306,6 @@ _LT_TAGVAR(export_dynamic_flag_spec, $1)=
 _LT_TAGVAR(hardcode_direct, $1)=no
 _LT_TAGVAR(hardcode_direct_absolute, $1)=no
 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
-_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
 _LT_TAGVAR(hardcode_libdir_separator, $1)=
 _LT_TAGVAR(hardcode_minus_L, $1)=no
 _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
@@ -5362,6 +6315,8 @@ _LT_TAGVAR(module_cmds, $1)=
 _LT_TAGVAR(module_expsym_cmds, $1)=
 _LT_TAGVAR(link_all_deplibs, $1)=unknown
 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
+_LT_TAGVAR(reload_flag, $1)=$reload_flag
+_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
 _LT_TAGVAR(no_undefined_flag, $1)=
 _LT_TAGVAR(whole_archive_flag_spec, $1)=
 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
@@ -5377,7 +6332,7 @@ _LT_TAGVAR(objext, $1)=$objext
 # the CXX compiler isn't working.  Some variables (like enable_shared)
 # are currently assumed to apply to all compilers on this platform,
 # and will be corrupted by setting them based on a non-working compiler.
-if test "$_lt_caught_CXX_error" != yes; then
+if test yes != "$_lt_caught_CXX_error"; then
   # Code to be used in simple compile tests
   lt_simple_compile_test_code="int some_variable = 0;"
 
@@ -5393,6 +6348,7 @@ if test "$_lt_caught_CXX_error" != yes; then
 
   # Allow CC to be a program name with arguments.
   lt_save_CC=$CC
+  lt_save_CFLAGS=$CFLAGS
   lt_save_LD=$LD
   lt_save_GCC=$GCC
   GCC=$GXX
@@ -5410,6 +6366,7 @@ if test "$_lt_caught_CXX_error" != yes; then
   fi
   test -z "${LDCXX+set}" || LD=$LDCXX
   CC=${CXX-"c++"}
+  CFLAGS=$CXXFLAGS
   compiler=$CC
   _LT_TAGVAR(compiler, $1)=$CC
   _LT_CC_BASENAME([$compiler])
@@ -5417,35 +6374,35 @@ if test "$_lt_caught_CXX_error" != yes; then
   if test -n "$compiler"; then
     # We don't want -fno-exception when compiling C++ code, so set the
     # no_builtin_flag separately
-    if test "$GXX" = yes; then
+    if test yes = "$GXX"; then
       _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
     else
       _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
     fi
 
-    if test "$GXX" = yes; then
+    if test yes = "$GXX"; then
       # Set up default GNU C++ configuration
 
       LT_PATH_LD
 
       # Check if GNU C++ uses GNU ld as the underlying linker, since the
       # archiving commands below assume that GNU ld is being used.
-      if test "$with_gnu_ld" = yes; then
-        _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
-        _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+      if test yes = "$with_gnu_ld"; then
+        _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
+        _LT_TAGVAR(archive_expsym_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
 
-        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
-        _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
+        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
+        _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
 
         # If archive_cmds runs LD, not CC, wlarc should be empty
         # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
         #     investigate it a little bit more. (MM)
-        wlarc='${wl}'
+        wlarc='$wl'
 
         # ancient GNU ld didn't support --whole-archive et. al.
         if eval "`$CC -print-prog-name=ld` --help 2>&1" |
 	  $GREP 'no-whole-archive' > /dev/null; then
-          _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
+          _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive'
         else
           _LT_TAGVAR(whole_archive_flag_spec, $1)=
         fi
@@ -5464,7 +6421,7 @@ if test "$_lt_caught_CXX_error" != yes; then
       # Commands to make compiler produce verbose output that lists
       # what "hidden" libraries, object files and flags are used when
       # linking a shared library.
-      output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
+      output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
 
     else
       GXX=no
@@ -5481,18 +6438,30 @@ if test "$_lt_caught_CXX_error" != yes; then
         _LT_TAGVAR(ld_shlibs, $1)=no
         ;;
       aix[[4-9]]*)
-        if test "$host_cpu" = ia64; then
+        if test ia64 = "$host_cpu"; then
           # On IA64, the linker does run time linking by default, so we don't
           # have to do anything special.
           aix_use_runtimelinking=no
           exp_sym_flag='-Bexport'
-          no_entry_flag=""
+          no_entry_flag=
         else
           aix_use_runtimelinking=no
 
           # Test if we are trying to use run time linking or normal
           # AIX style linking. If -brtl is somewhere in LDFLAGS, we
-          # need to do runtime linking.
+          # have runtime linking enabled, and use it for executables.
+          # For shared libraries, we enable/disable runtime linking
+          # depending on the kind of the shared library created -
+          # when "with_aix_soname,aix_use_runtimelinking" is:
+          # "aix,no"   lib.a(lib.so.V) shared, rtl:no,  for executables
+          # "aix,yes"  lib.so          shared, rtl:yes, for executables
+          #            lib.a           static archive
+          # "both,no"  lib.so.V(shr.o) shared, rtl:yes
+          #            lib.a(lib.so.V) shared, rtl:no,  for executables
+          # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables
+          #            lib.a(lib.so.V) shared, rtl:no
+          # "svr4,*"   lib.so.V(shr.o) shared, rtl:yes, for executables
+          #            lib.a           static archive
           case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
 	    for ld_flag in $LDFLAGS; do
 	      case $ld_flag in
@@ -5502,6 +6471,13 @@ if test "$_lt_caught_CXX_error" != yes; then
 	        ;;
 	      esac
 	    done
+	    if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then
+	      # With aix-soname=svr4, we create the lib.so.V shared archives only,
+	      # so we don't have lib.a shared libs to link our executables.
+	      # We have to force runtime linking in this case.
+	      aix_use_runtimelinking=yes
+	      LDFLAGS="$LDFLAGS -Wl,-brtl"
+	    fi
 	    ;;
           esac
 
@@ -5520,13 +6496,21 @@ if test "$_lt_caught_CXX_error" != yes; then
         _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
         _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
         _LT_TAGVAR(link_all_deplibs, $1)=yes
-        _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
+        _LT_TAGVAR(file_list_spec, $1)='$wl-f,'
+        case $with_aix_soname,$aix_use_runtimelinking in
+        aix,*) ;;	# no import file
+        svr4,* | *,yes) # use import file
+          # The Import File defines what to hardcode.
+          _LT_TAGVAR(hardcode_direct, $1)=no
+          _LT_TAGVAR(hardcode_direct_absolute, $1)=no
+          ;;
+        esac
 
-        if test "$GXX" = yes; then
+        if test yes = "$GXX"; then
           case $host_os in aix4.[[012]]|aix4.[[012]].*)
           # We only want to do this on AIX 4.2 and lower, the check
           # below for broken collect2 doesn't work under 4.3+
-	  collect2name=`${CC} -print-prog-name=collect2`
+	  collect2name=`$CC -print-prog-name=collect2`
 	  if test -f "$collect2name" &&
 	     strings "$collect2name" | $GREP resolve_lib_name >/dev/null
 	  then
@@ -5544,59 +6528,84 @@ if test "$_lt_caught_CXX_error" != yes; then
 	  fi
           esac
           shared_flag='-shared'
-	  if test "$aix_use_runtimelinking" = yes; then
-	    shared_flag="$shared_flag "'${wl}-G'
+	  if test yes = "$aix_use_runtimelinking"; then
+	    shared_flag=$shared_flag' $wl-G'
 	  fi
+	  # Need to ensure runtime linking is disabled for the traditional
+	  # shared library, or the linker may eventually find shared libraries
+	  # /with/ Import File - we do not want to mix them.
+	  shared_flag_aix='-shared'
+	  shared_flag_svr4='-shared $wl-G'
         else
           # not using gcc
-          if test "$host_cpu" = ia64; then
+          if test ia64 = "$host_cpu"; then
 	  # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
 	  # chokes on -Wl,-G. The following line is correct:
 	  shared_flag='-G'
           else
-	    if test "$aix_use_runtimelinking" = yes; then
-	      shared_flag='${wl}-G'
+	    if test yes = "$aix_use_runtimelinking"; then
+	      shared_flag='$wl-G'
 	    else
-	      shared_flag='${wl}-bM:SRE'
+	      shared_flag='$wl-bM:SRE'
 	    fi
+	    shared_flag_aix='$wl-bM:SRE'
+	    shared_flag_svr4='$wl-G'
           fi
         fi
 
-        _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
+        _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-bexpall'
         # It seems that -bexpall does not export symbols beginning with
         # underscore (_), so it is better to generate a list of symbols to
 	# export.
         _LT_TAGVAR(always_export_symbols, $1)=yes
-        if test "$aix_use_runtimelinking" = yes; then
+	if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then
           # Warning - without using the other runtime loading flags (-brtl),
           # -berok will link without error, but may produce a broken library.
-          _LT_TAGVAR(allow_undefined_flag, $1)='-berok'
+          # The "-G" linker flag allows undefined symbols.
+          _LT_TAGVAR(no_undefined_flag, $1)='-bernotok'
           # Determine the default libpath from the value encoded in an empty
           # executable.
-          _LT_SYS_MODULE_PATH_AIX
-          _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
+          _LT_SYS_MODULE_PATH_AIX([$1])
+          _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath"
 
-          _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
+          _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs $wl'$no_entry_flag' $compiler_flags `if test -n "$allow_undefined_flag"; then func_echo_all "$wl$allow_undefined_flag"; else :; fi` $wl'$exp_sym_flag:\$export_symbols' '$shared_flag
         else
-          if test "$host_cpu" = ia64; then
-	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
+          if test ia64 = "$host_cpu"; then
+	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $libdir:/usr/lib:/lib'
 	    _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
-	    _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
+	    _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\$wl$no_entry_flag"' $compiler_flags $wl$allow_undefined_flag '"\$wl$exp_sym_flag:\$export_symbols"
           else
 	    # Determine the default libpath from the value encoded in an
 	    # empty executable.
-	    _LT_SYS_MODULE_PATH_AIX
-	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
+	    _LT_SYS_MODULE_PATH_AIX([$1])
+	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath"
 	    # Warning - without using the other run time loading flags,
 	    # -berok will link without error, but may produce a broken library.
-	    _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
-	    _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
-	    # Exported symbols can be pulled into shared objects from archives
-	    _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
+	    _LT_TAGVAR(no_undefined_flag, $1)=' $wl-bernotok'
+	    _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-berok'
+	    if test yes = "$with_gnu_ld"; then
+	      # We only use this code for GNU lds that support --whole-archive.
+	      _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive'
+	    else
+	      # Exported symbols can be pulled into shared objects from archives
+	      _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
+	    fi
 	    _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
-	    # This is similar to how AIX traditionally builds its shared
-	    # libraries.
-	    _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
+	    _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d'
+	    # -brtl affects multiple linker settings, -berok does not and is overridden later
+	    compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`'
+	    if test svr4 != "$with_aix_soname"; then
+	      # This is similar to how AIX traditionally builds its shared
+	      # libraries. Need -bnortl late, we may have -brtl in LDFLAGS.
+	      _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_aix' -o $output_objdir/$realname.d/$soname $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$realname.d/$soname'
+	    fi
+	    if test aix != "$with_aix_soname"; then
+	      _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_svr4' -o $output_objdir/$realname.d/$shared_archive_member_spec.o $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$STRIP -e $output_objdir/$realname.d/$shared_archive_member_spec.o~( func_echo_all "#! $soname($shared_archive_member_spec.o)"; if test shr_64 = "$shared_archive_member_spec"; then func_echo_all "# 64"; else func_echo_all "# [...]
+	    else
+	      # used by -dlpreopen to get the symbols
+	      _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV  $output_objdir/$realname.d/$soname $output_objdir'
+	    fi
+	    _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d'
           fi
         fi
         ;;
@@ -5606,7 +6615,7 @@ if test "$_lt_caught_CXX_error" != yes; then
 	  _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
 	  # Joseph Beckenbach <jrb3 at best.com> says some releases of gcc
 	  # support --undefined.  This deserves some investigation.  FIXME
-	  _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+	  _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
 	else
 	  _LT_TAGVAR(ld_shlibs, $1)=no
 	fi
@@ -5622,32 +6631,108 @@ if test "$_lt_caught_CXX_error" != yes; then
         ;;
 
       cygwin* | mingw* | pw32* | cegcc*)
-        # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
-        # as there is no search path for DLLs.
-        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
-        _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
-        _LT_TAGVAR(always_export_symbols, $1)=no
-        _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
-
-        if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
-          _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
-          # If the export-symbols file already is a .def file (1st line
-          # is EXPORTS), use it as is; otherwise, prepend...
-          _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
-	    cp $export_symbols $output_objdir/$soname.def;
-          else
-	    echo EXPORTS > $output_objdir/$soname.def;
-	    cat $export_symbols >> $output_objdir/$soname.def;
-          fi~
-          $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
-        else
-          _LT_TAGVAR(ld_shlibs, $1)=no
-        fi
-        ;;
+	case $GXX,$cc_basename in
+	,cl* | no,cl*)
+	  # Native MSVC
+	  # hardcode_libdir_flag_spec is actually meaningless, as there is
+	  # no search path for DLLs.
+	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
+	  _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
+	  _LT_TAGVAR(always_export_symbols, $1)=yes
+	  _LT_TAGVAR(file_list_spec, $1)='@'
+	  # Tell ltmain to make .lib files, not .a files.
+	  libext=lib
+	  # Tell ltmain to make .dll files, not .so files.
+	  shrext_cmds=.dll
+	  # FIXME: Setting linknames here is a bad hack.
+	  _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames='
+	  _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then
+              cp "$export_symbols" "$output_objdir/$soname.def";
+              echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp";
+            else
+              $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp;
+            fi~
+            $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
+            linknames='
+	  # The linker will not automatically build a static lib if we build a DLL.
+	  # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
+	  _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
+	  # Don't use ranlib
+	  _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
+	  _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~
+            lt_tool_outputfile="@TOOL_OUTPUT@"~
+            case $lt_outputfile in
+              *.exe|*.EXE) ;;
+              *)
+                lt_outputfile=$lt_outputfile.exe
+                lt_tool_outputfile=$lt_tool_outputfile.exe
+                ;;
+            esac~
+            func_to_tool_file "$lt_outputfile"~
+            if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then
+              $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
+              $RM "$lt_outputfile.manifest";
+            fi'
+	  ;;
+	*)
+	  # g++
+	  # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
+	  # as there is no search path for DLLs.
+	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+	  _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-all-symbols'
+	  _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
+	  _LT_TAGVAR(always_export_symbols, $1)=no
+	  _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
+
+	  if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
+	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
+	    # If the export-symbols file already is a .def file, use it as
+	    # is; otherwise, prepend EXPORTS...
+	    _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then
+              cp $export_symbols $output_objdir/$soname.def;
+            else
+              echo EXPORTS > $output_objdir/$soname.def;
+              cat $export_symbols >> $output_objdir/$soname.def;
+            fi~
+            $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
+	  else
+	    _LT_TAGVAR(ld_shlibs, $1)=no
+	  fi
+	  ;;
+	esac
+	;;
       darwin* | rhapsody*)
         _LT_DARWIN_LINKER_FEATURES($1)
 	;;
 
+      os2*)
+	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+	_LT_TAGVAR(hardcode_minus_L, $1)=yes
+	_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
+	shrext_cmds=.dll
+	_LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
+	  $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
+	  $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
+	  $ECHO EXPORTS >> $output_objdir/$libname.def~
+	  emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
+	  $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
+	  emximp -o $lib $output_objdir/$libname.def'
+	_LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
+	  $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
+	  $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
+	  $ECHO EXPORTS >> $output_objdir/$libname.def~
+	  prefix_cmds="$SED"~
+	  if test EXPORTS = "`$SED 1q $export_symbols`"; then
+	    prefix_cmds="$prefix_cmds -e 1d";
+	  fi~
+	  prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
+	  cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
+	  $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
+	  emximp -o $lib $output_objdir/$libname.def'
+	_LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
+	_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
+	;;
+
       dgux*)
         case $cc_basename in
           ec++*)
@@ -5666,7 +6751,7 @@ if test "$_lt_caught_CXX_error" != yes; then
         esac
         ;;
 
-      freebsd[[12]]*)
+      freebsd2.*)
         # C++ shared libraries reported to be fairly broken before
 	# switch to ELF
         _LT_TAGVAR(ld_shlibs, $1)=no
@@ -5682,13 +6767,15 @@ if test "$_lt_caught_CXX_error" != yes; then
         _LT_TAGVAR(ld_shlibs, $1)=yes
         ;;
 
-      gnu*)
+      haiku*)
+        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
+        _LT_TAGVAR(link_all_deplibs, $1)=yes
         ;;
 
       hpux9*)
-        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
+        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir'
         _LT_TAGVAR(hardcode_libdir_separator, $1)=:
-        _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+        _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
         _LT_TAGVAR(hardcode_direct, $1)=yes
         _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
 				             # but as the default
@@ -5700,7 +6787,7 @@ if test "$_lt_caught_CXX_error" != yes; then
             _LT_TAGVAR(ld_shlibs, $1)=no
             ;;
           aCC*)
-            _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+            _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -b $wl+b $wl$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib'
             # Commands to make compiler produce verbose output that lists
             # what "hidden" libraries, object files and flags are used when
             # linking a shared library.
@@ -5709,11 +6796,11 @@ if test "$_lt_caught_CXX_error" != yes; then
             # explicitly linking system object files so we need to strip them
             # from the output so that they don't get included in the library
             # dependencies.
-            output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed'
+            output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
             ;;
           *)
-            if test "$GXX" = yes; then
-              _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+            if test yes = "$GXX"; then
+              _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib $pic_flag $wl+b $wl$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib'
             else
               # FIXME: insert proper C++ library support
               _LT_TAGVAR(ld_shlibs, $1)=no
@@ -5723,15 +6810,15 @@ if test "$_lt_caught_CXX_error" != yes; then
         ;;
 
       hpux10*|hpux11*)
-        if test $with_gnu_ld = no; then
-	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
+        if test no = "$with_gnu_ld"; then
+	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir'
 	  _LT_TAGVAR(hardcode_libdir_separator, $1)=:
 
           case $host_cpu in
             hppa*64*|ia64*)
               ;;
             *)
-	      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+	      _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
               ;;
           esac
         fi
@@ -5757,13 +6844,13 @@ if test "$_lt_caught_CXX_error" != yes; then
           aCC*)
 	    case $host_cpu in
 	      hppa*64*)
-	        _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+	        _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
 	        ;;
 	      ia64*)
-	        _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+	        _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
 	        ;;
 	      *)
-	        _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+	        _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
 	        ;;
 	    esac
 	    # Commands to make compiler produce verbose output that lists
@@ -5774,20 +6861,20 @@ if test "$_lt_caught_CXX_error" != yes; then
 	    # explicitly linking system object files so we need to strip them
 	    # from the output so that they don't get included in the library
 	    # dependencies.
-	    output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed'
+	    output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
 	    ;;
           *)
-	    if test "$GXX" = yes; then
-	      if test $with_gnu_ld = no; then
+	    if test yes = "$GXX"; then
+	      if test no = "$with_gnu_ld"; then
 	        case $host_cpu in
 	          hppa*64*)
-	            _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+	            _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
 	            ;;
 	          ia64*)
-	            _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+	            _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
 	            ;;
 	          *)
-	            _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+	            _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
 	            ;;
 	        esac
 	      fi
@@ -5802,22 +6889,22 @@ if test "$_lt_caught_CXX_error" != yes; then
       interix[[3-9]]*)
 	_LT_TAGVAR(hardcode_direct, $1)=no
 	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
-	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
-	_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
+	_LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
 	# Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
 	# Instead, shared libraries are loaded at an image base (0x10000000 by
 	# default) and relocated if they conflict, which is a slow very memory
 	# consuming and fragmenting process.  To avoid this, we pick a random,
 	# 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
 	# time.  Moving up from 0x10000000 also allows more sbrk(2) space.
-	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
-	_LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+	_LT_TAGVAR(archive_expsym_cmds, $1)='sed "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
 	;;
       irix5* | irix6*)
         case $cc_basename in
           CC*)
 	    # SGI C++
-	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
+	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib'
 
 	    # Archives containing C++ object files must be created using
 	    # "CC -ar", where "CC" is the IRIX C++ compiler.  This is
@@ -5826,22 +6913,22 @@ if test "$_lt_caught_CXX_error" != yes; then
 	    _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
 	    ;;
           *)
-	    if test "$GXX" = yes; then
-	      if test "$with_gnu_ld" = no; then
-	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+	    if test yes = "$GXX"; then
+	      if test no = "$with_gnu_ld"; then
+	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib'
 	      else
-	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` -o $lib'
+	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` -o $lib'
 	      fi
 	    fi
 	    _LT_TAGVAR(link_all_deplibs, $1)=yes
 	    ;;
         esac
-        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
         _LT_TAGVAR(hardcode_libdir_separator, $1)=:
         _LT_TAGVAR(inherit_rpath, $1)=yes
         ;;
 
-      linux* | k*bsd*-gnu)
+      linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
         case $cc_basename in
           KCC*)
 	    # Kuck and Associates, Inc. (KAI) C++ Compiler
@@ -5849,8 +6936,8 @@ if test "$_lt_caught_CXX_error" != yes; then
 	    # KCC will only create a shared library if the output file
 	    # ends with ".so" (or ".sl" for HP-UX), so rename the library
 	    # to its proper name (with version) after linking.
-	    _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
-	    _LT_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib'
+	    _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\$tempext\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
+	    _LT_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\$tempext\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib $wl-retain-symbols-file,$export_symbols; mv \$templib $lib'
 	    # Commands to make compiler produce verbose output that lists
 	    # what "hidden" libraries, object files and flags are used when
 	    # linking a shared library.
@@ -5859,10 +6946,10 @@ if test "$_lt_caught_CXX_error" != yes; then
 	    # explicitly linking system object files so we need to strip them
 	    # from the output so that they don't get included in the library
 	    # dependencies.
-	    output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed'
+	    output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
 
-	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
-	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
+	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
+	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
 
 	    # Archives containing C++ object files must be created using
 	    # "CC -Bstatic", where "CC" is the KAI C++ compiler.
@@ -5876,59 +6963,59 @@ if test "$_lt_caught_CXX_error" != yes; then
 	    # earlier do not add the objects themselves.
 	    case `$CC -V 2>&1` in
 	      *"Version 7."*)
-	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
-		_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
+		_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
 		;;
 	      *)  # Version 8.0 or newer
 	        tmp_idyn=
 	        case $host_cpu in
 		  ia64*) tmp_idyn=' -i_dynamic';;
 		esac
-	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
-		_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
+		_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
 		;;
 	    esac
 	    _LT_TAGVAR(archive_cmds_need_lc, $1)=no
-	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
-	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
-	    _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
+	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
+	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
+	    _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive'
 	    ;;
           pgCC* | pgcpp*)
             # Portland Group C++ compiler
 	    case `$CC -V` in
-	    *pgCC\ [[1-5]]* | *pgcpp\ [[1-5]]*)
+	    *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*)
 	      _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~
-		rm -rf $tpldir~
-		$CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~
-		compile_command="$compile_command `find $tpldir -name \*.o | $NL2SP`"'
+               rm -rf $tpldir~
+               $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~
+               compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"'
 	      _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~
-		rm -rf $tpldir~
-		$CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~
-		$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | $NL2SP`~
-		$RANLIB $oldlib'
+                rm -rf $tpldir~
+                $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~
+                $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~
+                $RANLIB $oldlib'
 	      _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~
-		rm -rf $tpldir~
-		$CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
-		$CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
+                rm -rf $tpldir~
+                $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
+                $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
 	      _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~
-		rm -rf $tpldir~
-		$CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
-		$CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
+                rm -rf $tpldir~
+                $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
+                $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
 	      ;;
-	    *) # Version 6 will use weak symbols
-	      _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
-	      _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
+	    *) # Version 6 and above use weak symbols
+	      _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
+	      _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
 	      ;;
 	    esac
 
-	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
-	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
-	    _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
+	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl--rpath $wl$libdir'
+	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
+	    _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
             ;;
 	  cxx*)
 	    # Compaq C++
-	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
-	    _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname  -o $lib ${wl}-retain-symbols-file $wl$export_symbols'
+	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
+	    _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname  -o $lib $wl-retain-symbols-file $wl$export_symbols'
 
 	    runpath_var=LD_RUN_PATH
 	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
@@ -5942,18 +7029,18 @@ if test "$_lt_caught_CXX_error" != yes; then
 	    # explicitly linking system object files so we need to strip them
 	    # from the output so that they don't get included in the library
 	    # dependencies.
-	    output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`$ECHO "X$templist" | $Xsed -e "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed'
+	    output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "X$list" | $Xsed'
 	    ;;
-	  xl*)
+	  xl* | mpixl* | bgxl*)
 	    # IBM XL 8.0 on PPC, with GNU ld
-	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
-	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
-	    _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
-	    if test "x$supports_anon_versioning" = xyes; then
+	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
+	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
+	    _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
+	    if test yes = "$supports_anon_versioning"; then
 	      _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
-		cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
-		echo "local: *; };" >> $output_objdir/$libname.ver~
-		$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
+                cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
+                echo "local: *; };" >> $output_objdir/$libname.ver~
+                $CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib'
 	    fi
 	    ;;
 	  *)
@@ -5961,16 +7048,16 @@ if test "$_lt_caught_CXX_error" != yes; then
 	    *Sun\ C*)
 	      # Sun C++ 5.9
 	      _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
-	      _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
-	      _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols'
+	      _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+	      _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-retain-symbols-file $wl$export_symbols'
 	      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
-	      _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
+	      _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
 	      _LT_TAGVAR(compiler_needs_object, $1)=yes
 
 	      # Not sure whether something based on
 	      # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1
 	      # would be better.
-	      output_verbose_link_cmd='echo'
+	      output_verbose_link_cmd='func_echo_all'
 
 	      # Archives containing C++ object files must be created using
 	      # "CC -xar", where "CC" is the Sun C++ compiler.  This is
@@ -6022,24 +7109,19 @@ if test "$_lt_caught_CXX_error" != yes; then
         _LT_TAGVAR(ld_shlibs, $1)=yes
 	;;
 
-      openbsd2*)
-        # C++ shared libraries are fairly broken
-	_LT_TAGVAR(ld_shlibs, $1)=no
-	;;
-
-      openbsd*)
+      openbsd* | bitrig*)
 	if test -f /usr/libexec/ld.so; then
 	  _LT_TAGVAR(hardcode_direct, $1)=yes
 	  _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
 	  _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
 	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
-	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
-	  if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
-	    _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib'
-	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
-	    _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
+	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
+	  if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`"; then
+	    _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-retain-symbols-file,$export_symbols -o $lib'
+	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
+	    _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive'
 	  fi
-	  output_verbose_link_cmd=echo
+	  output_verbose_link_cmd=func_echo_all
 	else
 	  _LT_TAGVAR(ld_shlibs, $1)=no
 	fi
@@ -6053,9 +7135,9 @@ if test "$_lt_caught_CXX_error" != yes; then
 	    # KCC will only create a shared library if the output file
 	    # ends with ".so" (or ".sl" for HP-UX), so rename the library
 	    # to its proper name (with version) after linking.
-	    _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
+	    _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\$tempext\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
 
-	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
+	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
 	    _LT_TAGVAR(hardcode_libdir_separator, $1)=:
 
 	    # Archives containing C++ object files must be created using
@@ -6073,17 +7155,17 @@ if test "$_lt_caught_CXX_error" != yes; then
           cxx*)
 	    case $host in
 	      osf3*)
-	        _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
-	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && $ECHO "X${wl}-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
-	        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+	        _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*'
+	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $soname `test -n "$verstring" && func_echo_all "$wl-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib'
+	        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
 		;;
 	      *)
 	        _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
-	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
+	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib'
 	        _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
-	          echo "-hidden">> $lib.exp~
-	          $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname ${wl}-input ${wl}$lib.exp  `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~
-	          $RM $lib.exp'
+                  echo "-hidden">> $lib.exp~
+                  $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname $wl-input $wl$lib.exp  `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib~
+                  $RM $lib.exp'
 	        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
 		;;
 	    esac
@@ -6098,27 +7180,27 @@ if test "$_lt_caught_CXX_error" != yes; then
 	    # explicitly linking system object files so we need to strip them
 	    # from the output so that they don't get included in the library
 	    # dependencies.
-	    output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`$ECHO "X$templist" | $Xsed -e "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed'
+	    output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
 	    ;;
 	  *)
-	    if test "$GXX" = yes && test "$with_gnu_ld" = no; then
-	      _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
+	    if test yes,no = "$GXX,$with_gnu_ld"; then
+	      _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*'
 	      case $host in
 	        osf3*)
-	          _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+	          _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib'
 		  ;;
 	        *)
-	          _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+	          _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-msym $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib'
 		  ;;
 	      esac
 
-	      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+	      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
 	      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
 
 	      # Commands to make compiler produce verbose output that lists
 	      # what "hidden" libraries, object files and flags are used when
 	      # linking a shared library.
-	      output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
+	      output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
 
 	    else
 	      # FIXME: insert proper C++ library support
@@ -6154,13 +7236,13 @@ if test "$_lt_caught_CXX_error" != yes; then
 
       solaris*)
         case $cc_basename in
-          CC*)
+          CC* | sunCC*)
 	    # Sun C++ 4.2, 5.x and Centerline C++
             _LT_TAGVAR(archive_cmds_need_lc,$1)=yes
 	    _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
-	    _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag}  -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+	    _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
 	    _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
-	      $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
+              $CC -G$allow_undefined_flag $wl-M $wl$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
 
 	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
 	    _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
@@ -6168,14 +7250,14 @@ if test "$_lt_caught_CXX_error" != yes; then
 	      solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
 	      *)
 		# The compiler driver will combine and reorder linker options,
-		# but understands `-z linker_flag'.
+		# but understands '-z linker_flag'.
 	        # Supported since Solaris 2.6 (maybe 2.5.1?)
 		_LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
 	        ;;
 	    esac
 	    _LT_TAGVAR(link_all_deplibs, $1)=yes
 
-	    output_verbose_link_cmd='echo'
+	    output_verbose_link_cmd='func_echo_all'
 
 	    # Archives containing C++ object files must be created using
 	    # "CC -xar", where "CC" is the Sun C++ compiler.  This is
@@ -6185,42 +7267,42 @@ if test "$_lt_caught_CXX_error" != yes; then
 	    ;;
           gcx*)
 	    # Green Hills C++ Compiler
-	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
+	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib'
 
 	    # The C++ compiler must be used to create the archive.
 	    _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
 	    ;;
           *)
 	    # GNU C++ compiler with Solaris linker
-	    if test "$GXX" = yes && test "$with_gnu_ld" = no; then
-	      _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
+	    if test yes,no = "$GXX,$with_gnu_ld"; then
+	      _LT_TAGVAR(no_undefined_flag, $1)=' $wl-z ${wl}defs'
 	      if $CC --version | $GREP -v '^2\.7' > /dev/null; then
-	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
+	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib'
 	        _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
-		  $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
+                  $CC -shared $pic_flag -nostdlib $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
 
 	        # Commands to make compiler produce verbose output that lists
 	        # what "hidden" libraries, object files and flags are used when
 	        # linking a shared library.
-	        output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
+	        output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
 	      else
-	        # g++ 2.7 appears to require `-G' NOT `-shared' on this
+	        # g++ 2.7 appears to require '-G' NOT '-shared' on this
 	        # platform.
-	        _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
+	        _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib'
 	        _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
-		  $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
+                  $CC -G -nostdlib $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
 
 	        # Commands to make compiler produce verbose output that lists
 	        # what "hidden" libraries, object files and flags are used when
 	        # linking a shared library.
-	        output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
+	        output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
 	      fi
 
-	      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
+	      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $wl$libdir'
 	      case $host_os in
 		solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
 		*)
-		  _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
+		  _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract'
 		  ;;
 	      esac
 	    fi
@@ -6229,48 +7311,52 @@ if test "$_lt_caught_CXX_error" != yes; then
         ;;
 
     sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
-      _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
+      _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text'
       _LT_TAGVAR(archive_cmds_need_lc, $1)=no
       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
       runpath_var='LD_RUN_PATH'
 
       case $cc_basename in
         CC*)
-	  _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
-	  _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	  _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	  _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
 	  ;;
 	*)
-	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
-	  _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	  _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
 	  ;;
       esac
       ;;
 
       sysv5* | sco3.2v5* | sco5v6*)
-	# Note: We can NOT use -z defs as we might desire, because we do not
+	# Note: We CANNOT use -z defs as we might desire, because we do not
 	# link with -lc, and that would cause any symbols used from libc to
 	# always be unresolved, which means just about no library would
 	# ever link correctly.  If we're not using GNU ld we use -z text
 	# though, which does catch some bad symbols but isn't as heavy-handed
 	# as -z defs.
-	_LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
-	_LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
+	_LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text'
+	_LT_TAGVAR(allow_undefined_flag, $1)='$wl-z,nodefs'
 	_LT_TAGVAR(archive_cmds_need_lc, $1)=no
 	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
-	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
+	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R,$libdir'
 	_LT_TAGVAR(hardcode_libdir_separator, $1)=':'
 	_LT_TAGVAR(link_all_deplibs, $1)=yes
-	_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
+	_LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Bexport'
 	runpath_var='LD_RUN_PATH'
 
 	case $cc_basename in
           CC*)
-	    _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
-	    _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	    _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	    _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	    _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~
+              '"$_LT_TAGVAR(old_archive_cmds, $1)"
+	    _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~
+              '"$_LT_TAGVAR(reload_cmds, $1)"
 	    ;;
 	  *)
-	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
-	    _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	    _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
 	    ;;
 	esac
       ;;
@@ -6301,10 +7387,10 @@ if test "$_lt_caught_CXX_error" != yes; then
     esac
 
     AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
-    test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
+    test no = "$_LT_TAGVAR(ld_shlibs, $1)" && can_build_shared=no
 
-    _LT_TAGVAR(GCC, $1)="$GXX"
-    _LT_TAGVAR(LD, $1)="$LD"
+    _LT_TAGVAR(GCC, $1)=$GXX
+    _LT_TAGVAR(LD, $1)=$LD
 
     ## CAVEAT EMPTOR:
     ## There is no encapsulation within the following macros, do not change
@@ -6322,6 +7408,7 @@ if test "$_lt_caught_CXX_error" != yes; then
   fi # test -n "$compiler"
 
   CC=$lt_save_CC
+  CFLAGS=$lt_save_CFLAGS
   LDCXX=$LD
   LD=$lt_save_LD
   GCC=$lt_save_GCC
@@ -6330,12 +7417,36 @@ if test "$_lt_caught_CXX_error" != yes; then
   lt_cv_path_LD=$lt_save_path_LD
   lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
   lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
-fi # test "$_lt_caught_CXX_error" != yes
+fi # test yes != "$_lt_caught_CXX_error"
 
 AC_LANG_POP
 ])# _LT_LANG_CXX_CONFIG
 
 
+# _LT_FUNC_STRIPNAME_CNF
+# ----------------------
+# func_stripname_cnf prefix suffix name
+# strip PREFIX and SUFFIX off of NAME.
+# PREFIX and SUFFIX must not contain globbing or regex special
+# characters, hashes, percent signs, but SUFFIX may contain a leading
+# dot (in which case that matches only a dot).
+#
+# This function is identical to the (non-XSI) version of func_stripname,
+# except this one can be used by m4 code that may be executed by configure,
+# rather than the libtool script.
+m4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl
+AC_REQUIRE([_LT_DECL_SED])
+AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])
+func_stripname_cnf ()
+{
+  case @S|@2 in
+  .*) func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%\\\\@S|@2\$%%"`;;
+  *)  func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%@S|@2\$%%"`;;
+  esac
+} # func_stripname_cnf
+])# _LT_FUNC_STRIPNAME_CNF
+
+
 # _LT_SYS_HIDDEN_LIBDEPS([TAGNAME])
 # ---------------------------------
 # Figure out "hidden" library dependencies from verbose
@@ -6344,6 +7455,7 @@ AC_LANG_POP
 # objects, libraries and library flags.
 m4_defun([_LT_SYS_HIDDEN_LIBDEPS],
 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
+AC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl
 # Dependencies to place before and after the object being linked:
 _LT_TAGVAR(predep_objects, $1)=
 _LT_TAGVAR(postdep_objects, $1)=
@@ -6393,7 +7505,20 @@ public class foo {
   }
 };
 _LT_EOF
+], [$1], [GO], [cat > conftest.$ac_ext <<_LT_EOF
+package foo
+func foo() {
+}
+_LT_EOF
 ])
+
+_lt_libdeps_save_CFLAGS=$CFLAGS
+case "$CC $CFLAGS " in #(
+*\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;;
+*\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;;
+*\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;;
+esac
+
 dnl Parse the compiler output and extract the necessary
 dnl objects, libraries and library flags.
 if AC_TRY_EVAL(ac_compile); then
@@ -6405,29 +7530,38 @@ if AC_TRY_EVAL(ac_compile); then
   pre_test_object_deps_done=no
 
   for p in `eval "$output_verbose_link_cmd"`; do
-    case $p in
+    case $prev$p in
 
     -L* | -R* | -l*)
        # Some compilers place space between "-{L,R}" and the path.
        # Remove the space.
-       if test $p = "-L" ||
-          test $p = "-R"; then
+       if test x-L = "$p" ||
+          test x-R = "$p"; then
 	 prev=$p
 	 continue
-       else
-	 prev=
        fi
 
-       if test "$pre_test_object_deps_done" = no; then
-	 case $p in
-	 -L* | -R*)
+       # Expand the sysroot to ease extracting the directories later.
+       if test -z "$prev"; then
+         case $p in
+         -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;;
+         -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;;
+         -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;;
+         esac
+       fi
+       case $p in
+       =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;;
+       esac
+       if test no = "$pre_test_object_deps_done"; then
+	 case $prev in
+	 -L | -R)
 	   # Internal compiler library paths should come after those
 	   # provided the user.  The postdeps already come after the
 	   # user supplied libs so there is no need to process them.
 	   if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then
-	     _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
+	     _LT_TAGVAR(compiler_lib_search_path, $1)=$prev$p
 	   else
-	     _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
+	     _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} $prev$p"
 	   fi
 	   ;;
 	 # The "-l" case would never come before the object being
@@ -6435,13 +7569,15 @@ if AC_TRY_EVAL(ac_compile); then
 	 esac
        else
 	 if test -z "$_LT_TAGVAR(postdeps, $1)"; then
-	   _LT_TAGVAR(postdeps, $1)="${prev}${p}"
+	   _LT_TAGVAR(postdeps, $1)=$prev$p
 	 else
-	   _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}"
+	   _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} $prev$p"
 	 fi
        fi
+       prev=
        ;;
 
+    *.lto.$objext) ;; # Ignore GCC LTO objects
     *.$objext)
        # This assumes that the test object file only shows up
        # once in the compiler output.
@@ -6450,15 +7586,15 @@ if AC_TRY_EVAL(ac_compile); then
 	 continue
        fi
 
-       if test "$pre_test_object_deps_done" = no; then
+       if test no = "$pre_test_object_deps_done"; then
 	 if test -z "$_LT_TAGVAR(predep_objects, $1)"; then
-	   _LT_TAGVAR(predep_objects, $1)="$p"
+	   _LT_TAGVAR(predep_objects, $1)=$p
 	 else
 	   _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p"
 	 fi
        else
 	 if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then
-	   _LT_TAGVAR(postdep_objects, $1)="$p"
+	   _LT_TAGVAR(postdep_objects, $1)=$p
 	 else
 	   _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p"
 	 fi
@@ -6477,6 +7613,7 @@ else
 fi
 
 $RM -f confest.$objext
+CFLAGS=$_lt_libdeps_save_CFLAGS
 
 # PORTME: override above test on systems where it is broken
 m4_if([$1], [CXX],
@@ -6488,51 +7625,6 @@ interix[[3-9]]*)
   _LT_TAGVAR(postdep_objects,$1)=
   _LT_TAGVAR(postdeps,$1)=
   ;;
-
-linux*)
-  case `$CC -V 2>&1 | sed 5q` in
-  *Sun\ C*)
-    # Sun C++ 5.9
-
-    # The more standards-conforming stlport4 library is
-    # incompatible with the Cstd library. Avoid specifying
-    # it if it's in CXXFLAGS. Ignore libCrun as
-    # -library=stlport4 depends on it.
-    case " $CXX $CXXFLAGS " in
-    *" -library=stlport4 "*)
-      solaris_use_stlport4=yes
-      ;;
-    esac
-
-    if test "$solaris_use_stlport4" != yes; then
-      _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
-    fi
-    ;;
-  esac
-  ;;
-
-solaris*)
-  case $cc_basename in
-  CC*)
-    # The more standards-conforming stlport4 library is
-    # incompatible with the Cstd library. Avoid specifying
-    # it if it's in CXXFLAGS. Ignore libCrun as
-    # -library=stlport4 depends on it.
-    case " $CXX $CXXFLAGS " in
-    *" -library=stlport4 "*)
-      solaris_use_stlport4=yes
-      ;;
-    esac
-
-    # Adding this requires a known-good setup of shared libraries for
-    # Sun compiler versions before 5.6, else PIC objects from an old
-    # archive will be linked into the output, leading to subtle bugs.
-    if test "$solaris_use_stlport4" != yes; then
-      _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
-    fi
-    ;;
-  esac
-  ;;
 esac
 ])
 
@@ -6541,7 +7633,7 @@ case " $_LT_TAGVAR(postdeps, $1) " in
 esac
  _LT_TAGVAR(compiler_lib_search_dirs, $1)=
 if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then
- _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'`
+ _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | $SED -e 's! -L! !g' -e 's!^ !!'`
 fi
 _LT_TAGDECL([], [compiler_lib_search_dirs], [1],
     [The directories searched by this compiler when creating a shared library])
@@ -6557,32 +7649,16 @@ _LT_TAGDECL([], [compiler_lib_search_path], [1],
 ])# _LT_SYS_HIDDEN_LIBDEPS
 
 
-# _LT_PROG_F77
-# ------------
-# Since AC_PROG_F77 is broken, in that it returns the empty string
-# if there is no fortran compiler, we have our own version here.
-m4_defun([_LT_PROG_F77],
-[
-pushdef([AC_MSG_ERROR], [_lt_disable_F77=yes])
-AC_PROG_F77
-if test -z "$F77" || test "X$F77" = "Xno"; then
-  _lt_disable_F77=yes
-fi
-popdef([AC_MSG_ERROR])
-])# _LT_PROG_F77
-
-dnl aclocal-1.4 backwards compatibility:
-dnl AC_DEFUN([_LT_PROG_F77], [])
-
-
 # _LT_LANG_F77_CONFIG([TAG])
 # --------------------------
 # Ensure that the configuration variables for a Fortran 77 compiler are
 # suitably defined.  These variables are subsequently used by _LT_CONFIG
-# to write the compiler configuration to `libtool'.
+# to write the compiler configuration to 'libtool'.
 m4_defun([_LT_LANG_F77_CONFIG],
-[AC_REQUIRE([_LT_PROG_F77])dnl
-AC_LANG_PUSH(Fortran 77)
+[AC_LANG_PUSH(Fortran 77)
+if test -z "$F77" || test no = "$F77"; then
+  _lt_disable_F77=yes
+fi
 
 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
 _LT_TAGVAR(allow_undefined_flag, $1)=
@@ -6592,7 +7668,6 @@ _LT_TAGVAR(export_dynamic_flag_spec, $1)=
 _LT_TAGVAR(hardcode_direct, $1)=no
 _LT_TAGVAR(hardcode_direct_absolute, $1)=no
 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
-_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
 _LT_TAGVAR(hardcode_libdir_separator, $1)=
 _LT_TAGVAR(hardcode_minus_L, $1)=no
 _LT_TAGVAR(hardcode_automatic, $1)=no
@@ -6601,6 +7676,8 @@ _LT_TAGVAR(module_cmds, $1)=
 _LT_TAGVAR(module_expsym_cmds, $1)=
 _LT_TAGVAR(link_all_deplibs, $1)=unknown
 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
+_LT_TAGVAR(reload_flag, $1)=$reload_flag
+_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
 _LT_TAGVAR(no_undefined_flag, $1)=
 _LT_TAGVAR(whole_archive_flag_spec, $1)=
 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
@@ -6616,7 +7693,7 @@ _LT_TAGVAR(objext, $1)=$objext
 # the F77 compiler isn't working.  Some variables (like enable_shared)
 # are currently assumed to apply to all compilers on this platform,
 # and will be corrupted by setting them based on a non-working compiler.
-if test "$_lt_disable_F77" != yes; then
+if test yes != "$_lt_disable_F77"; then
   # Code to be used in simple compile tests
   lt_simple_compile_test_code="\
       subroutine t
@@ -6638,9 +7715,11 @@ if test "$_lt_disable_F77" != yes; then
   _LT_LINKER_BOILERPLATE
 
   # Allow CC to be a program name with arguments.
-  lt_save_CC="$CC"
+  lt_save_CC=$CC
   lt_save_GCC=$GCC
+  lt_save_CFLAGS=$CFLAGS
   CC=${F77-"f77"}
+  CFLAGS=$FFLAGS
   compiler=$CC
   _LT_TAGVAR(compiler, $1)=$CC
   _LT_CC_BASENAME([$compiler])
@@ -6650,21 +7729,25 @@ if test "$_lt_disable_F77" != yes; then
     AC_MSG_RESULT([$can_build_shared])
 
     AC_MSG_CHECKING([whether to build shared libraries])
-    test "$can_build_shared" = "no" && enable_shared=no
+    test no = "$can_build_shared" && enable_shared=no
 
     # On AIX, shared libraries and static libraries use the same namespace, and
     # are all built from PIC.
     case $host_os in
       aix3*)
-        test "$enable_shared" = yes && enable_static=no
+        test yes = "$enable_shared" && enable_static=no
         if test -n "$RANLIB"; then
           archive_cmds="$archive_cmds~\$RANLIB \$lib"
           postinstall_cmds='$RANLIB $lib'
         fi
         ;;
       aix[[4-9]]*)
-	if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
-	  test "$enable_shared" = yes && enable_static=no
+	if test ia64 != "$host_cpu"; then
+	  case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in
+	  yes,aix,yes) ;;		# shared object as lib.so file only
+	  yes,svr4,*) ;;		# shared object as lib.so archive member only
+	  yes,*) enable_static=no ;;	# shared object in lib.a archive as well
+	  esac
 	fi
         ;;
     esac
@@ -6672,11 +7755,11 @@ if test "$_lt_disable_F77" != yes; then
 
     AC_MSG_CHECKING([whether to build static libraries])
     # Make sure either enable_shared or enable_static is yes.
-    test "$enable_shared" = yes || enable_static=yes
+    test yes = "$enable_shared" || enable_static=yes
     AC_MSG_RESULT([$enable_static])
 
-    _LT_TAGVAR(GCC, $1)="$G77"
-    _LT_TAGVAR(LD, $1)="$LD"
+    _LT_TAGVAR(GCC, $1)=$G77
+    _LT_TAGVAR(LD, $1)=$LD
 
     ## CAVEAT EMPTOR:
     ## There is no encapsulation within the following macros, do not change
@@ -6693,39 +7776,25 @@ if test "$_lt_disable_F77" != yes; then
   fi # test -n "$compiler"
 
   GCC=$lt_save_GCC
-  CC="$lt_save_CC"
-fi # test "$_lt_disable_F77" != yes
+  CC=$lt_save_CC
+  CFLAGS=$lt_save_CFLAGS
+fi # test yes != "$_lt_disable_F77"
 
 AC_LANG_POP
 ])# _LT_LANG_F77_CONFIG
 
 
-# _LT_PROG_FC
-# -----------
-# Since AC_PROG_FC is broken, in that it returns the empty string
-# if there is no fortran compiler, we have our own version here.
-m4_defun([_LT_PROG_FC],
-[
-pushdef([AC_MSG_ERROR], [_lt_disable_FC=yes])
-AC_PROG_FC
-if test -z "$FC" || test "X$FC" = "Xno"; then
-  _lt_disable_FC=yes
-fi
-popdef([AC_MSG_ERROR])
-])# _LT_PROG_FC
-
-dnl aclocal-1.4 backwards compatibility:
-dnl AC_DEFUN([_LT_PROG_FC], [])
-
-
 # _LT_LANG_FC_CONFIG([TAG])
 # -------------------------
 # Ensure that the configuration variables for a Fortran compiler are
 # suitably defined.  These variables are subsequently used by _LT_CONFIG
-# to write the compiler configuration to `libtool'.
+# to write the compiler configuration to 'libtool'.
 m4_defun([_LT_LANG_FC_CONFIG],
-[AC_REQUIRE([_LT_PROG_FC])dnl
-AC_LANG_PUSH(Fortran)
+[AC_LANG_PUSH(Fortran)
+
+if test -z "$FC" || test no = "$FC"; then
+  _lt_disable_FC=yes
+fi
 
 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
 _LT_TAGVAR(allow_undefined_flag, $1)=
@@ -6735,7 +7804,6 @@ _LT_TAGVAR(export_dynamic_flag_spec, $1)=
 _LT_TAGVAR(hardcode_direct, $1)=no
 _LT_TAGVAR(hardcode_direct_absolute, $1)=no
 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
-_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
 _LT_TAGVAR(hardcode_libdir_separator, $1)=
 _LT_TAGVAR(hardcode_minus_L, $1)=no
 _LT_TAGVAR(hardcode_automatic, $1)=no
@@ -6744,6 +7812,8 @@ _LT_TAGVAR(module_cmds, $1)=
 _LT_TAGVAR(module_expsym_cmds, $1)=
 _LT_TAGVAR(link_all_deplibs, $1)=unknown
 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
+_LT_TAGVAR(reload_flag, $1)=$reload_flag
+_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
 _LT_TAGVAR(no_undefined_flag, $1)=
 _LT_TAGVAR(whole_archive_flag_spec, $1)=
 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
@@ -6759,7 +7829,7 @@ _LT_TAGVAR(objext, $1)=$objext
 # the FC compiler isn't working.  Some variables (like enable_shared)
 # are currently assumed to apply to all compilers on this platform,
 # and will be corrupted by setting them based on a non-working compiler.
-if test "$_lt_disable_FC" != yes; then
+if test yes != "$_lt_disable_FC"; then
   # Code to be used in simple compile tests
   lt_simple_compile_test_code="\
       subroutine t
@@ -6781,9 +7851,11 @@ if test "$_lt_disable_FC" != yes; then
   _LT_LINKER_BOILERPLATE
 
   # Allow CC to be a program name with arguments.
-  lt_save_CC="$CC"
+  lt_save_CC=$CC
   lt_save_GCC=$GCC
+  lt_save_CFLAGS=$CFLAGS
   CC=${FC-"f95"}
+  CFLAGS=$FCFLAGS
   compiler=$CC
   GCC=$ac_cv_fc_compiler_gnu
 
@@ -6795,21 +7867,25 @@ if test "$_lt_disable_FC" != yes; then
     AC_MSG_RESULT([$can_build_shared])
 
     AC_MSG_CHECKING([whether to build shared libraries])
-    test "$can_build_shared" = "no" && enable_shared=no
+    test no = "$can_build_shared" && enable_shared=no
 
     # On AIX, shared libraries and static libraries use the same namespace, and
     # are all built from PIC.
     case $host_os in
       aix3*)
-        test "$enable_shared" = yes && enable_static=no
+        test yes = "$enable_shared" && enable_static=no
         if test -n "$RANLIB"; then
           archive_cmds="$archive_cmds~\$RANLIB \$lib"
           postinstall_cmds='$RANLIB $lib'
         fi
         ;;
       aix[[4-9]]*)
-	if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
-	  test "$enable_shared" = yes && enable_static=no
+	if test ia64 != "$host_cpu"; then
+	  case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in
+	  yes,aix,yes) ;;		# shared object as lib.so file only
+	  yes,svr4,*) ;;		# shared object as lib.so archive member only
+	  yes,*) enable_static=no ;;	# shared object in lib.a archive as well
+	  esac
 	fi
         ;;
     esac
@@ -6817,11 +7893,11 @@ if test "$_lt_disable_FC" != yes; then
 
     AC_MSG_CHECKING([whether to build static libraries])
     # Make sure either enable_shared or enable_static is yes.
-    test "$enable_shared" = yes || enable_static=yes
+    test yes = "$enable_shared" || enable_static=yes
     AC_MSG_RESULT([$enable_static])
 
-    _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu"
-    _LT_TAGVAR(LD, $1)="$LD"
+    _LT_TAGVAR(GCC, $1)=$ac_cv_fc_compiler_gnu
+    _LT_TAGVAR(LD, $1)=$LD
 
     ## CAVEAT EMPTOR:
     ## There is no encapsulation within the following macros, do not change
@@ -6839,8 +7915,9 @@ if test "$_lt_disable_FC" != yes; then
   fi # test -n "$compiler"
 
   GCC=$lt_save_GCC
-  CC="$lt_save_CC"
-fi # test "$_lt_disable_FC" != yes
+  CC=$lt_save_CC
+  CFLAGS=$lt_save_CFLAGS
+fi # test yes != "$_lt_disable_FC"
 
 AC_LANG_POP
 ])# _LT_LANG_FC_CONFIG
@@ -6850,7 +7927,7 @@ AC_LANG_POP
 # --------------------------
 # Ensure that the configuration variables for the GNU Java Compiler compiler
 # are suitably defined.  These variables are subsequently used by _LT_CONFIG
-# to write the compiler configuration to `libtool'.
+# to write the compiler configuration to 'libtool'.
 m4_defun([_LT_LANG_GCJ_CONFIG],
 [AC_REQUIRE([LT_PROG_GCJ])dnl
 AC_LANG_SAVE
@@ -6876,19 +7953,23 @@ _LT_COMPILER_BOILERPLATE
 _LT_LINKER_BOILERPLATE
 
 # Allow CC to be a program name with arguments.
-lt_save_CC="$CC"
+lt_save_CC=$CC
+lt_save_CFLAGS=$CFLAGS
 lt_save_GCC=$GCC
 GCC=yes
 CC=${GCJ-"gcj"}
+CFLAGS=$GCJFLAGS
 compiler=$CC
 _LT_TAGVAR(compiler, $1)=$CC
-_LT_TAGVAR(LD, $1)="$LD"
+_LT_TAGVAR(LD, $1)=$LD
 _LT_CC_BASENAME([$compiler])
 
 # GCJ did not exist at the time GCC didn't implicitly link libc in.
 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
 
 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
+_LT_TAGVAR(reload_flag, $1)=$reload_flag
+_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
 
 ## CAVEAT EMPTOR:
 ## There is no encapsulation within the following macros, do not change
@@ -6908,15 +7989,87 @@ fi
 AC_LANG_RESTORE
 
 GCC=$lt_save_GCC
-CC="$lt_save_CC"
+CC=$lt_save_CC
+CFLAGS=$lt_save_CFLAGS
 ])# _LT_LANG_GCJ_CONFIG
 
 
+# _LT_LANG_GO_CONFIG([TAG])
+# --------------------------
+# Ensure that the configuration variables for the GNU Go compiler
+# are suitably defined.  These variables are subsequently used by _LT_CONFIG
+# to write the compiler configuration to 'libtool'.
+m4_defun([_LT_LANG_GO_CONFIG],
+[AC_REQUIRE([LT_PROG_GO])dnl
+AC_LANG_SAVE
+
+# Source file extension for Go test sources.
+ac_ext=go
+
+# Object file extension for compiled Go test sources.
+objext=o
+_LT_TAGVAR(objext, $1)=$objext
+
+# Code to be used in simple compile tests
+lt_simple_compile_test_code="package main; func main() { }"
+
+# Code to be used in simple link tests
+lt_simple_link_test_code='package main; func main() { }'
+
+# ltmain only uses $CC for tagged configurations so make sure $CC is set.
+_LT_TAG_COMPILER
+
+# save warnings/boilerplate of simple test code
+_LT_COMPILER_BOILERPLATE
+_LT_LINKER_BOILERPLATE
+
+# Allow CC to be a program name with arguments.
+lt_save_CC=$CC
+lt_save_CFLAGS=$CFLAGS
+lt_save_GCC=$GCC
+GCC=yes
+CC=${GOC-"gccgo"}
+CFLAGS=$GOFLAGS
+compiler=$CC
+_LT_TAGVAR(compiler, $1)=$CC
+_LT_TAGVAR(LD, $1)=$LD
+_LT_CC_BASENAME([$compiler])
+
+# Go did not exist at the time GCC didn't implicitly link libc in.
+_LT_TAGVAR(archive_cmds_need_lc, $1)=no
+
+_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
+_LT_TAGVAR(reload_flag, $1)=$reload_flag
+_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
+
+## CAVEAT EMPTOR:
+## There is no encapsulation within the following macros, do not change
+## the running order or otherwise move them around unless you know exactly
+## what you are doing...
+if test -n "$compiler"; then
+  _LT_COMPILER_NO_RTTI($1)
+  _LT_COMPILER_PIC($1)
+  _LT_COMPILER_C_O($1)
+  _LT_COMPILER_FILE_LOCKS($1)
+  _LT_LINKER_SHLIBS($1)
+  _LT_LINKER_HARDCODE_LIBPATH($1)
+
+  _LT_CONFIG($1)
+fi
+
+AC_LANG_RESTORE
+
+GCC=$lt_save_GCC
+CC=$lt_save_CC
+CFLAGS=$lt_save_CFLAGS
+])# _LT_LANG_GO_CONFIG
+
+
 # _LT_LANG_RC_CONFIG([TAG])
 # -------------------------
 # Ensure that the configuration variables for the Windows resource compiler
 # are suitably defined.  These variables are subsequently used by _LT_CONFIG
-# to write the compiler configuration to `libtool'.
+# to write the compiler configuration to 'libtool'.
 m4_defun([_LT_LANG_RC_CONFIG],
 [AC_REQUIRE([LT_PROG_RC])dnl
 AC_LANG_SAVE
@@ -6932,7 +8085,7 @@ _LT_TAGVAR(objext, $1)=$objext
 lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }'
 
 # Code to be used in simple link tests
-lt_simple_link_test_code="$lt_simple_compile_test_code"
+lt_simple_link_test_code=$lt_simple_compile_test_code
 
 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
 _LT_TAG_COMPILER
@@ -6942,10 +8095,12 @@ _LT_COMPILER_BOILERPLATE
 _LT_LINKER_BOILERPLATE
 
 # Allow CC to be a program name with arguments.
-lt_save_CC="$CC"
+lt_save_CC=$CC
+lt_save_CFLAGS=$CFLAGS
 lt_save_GCC=$GCC
 GCC=
 CC=${RC-"windres"}
+CFLAGS=
 compiler=$CC
 _LT_TAGVAR(compiler, $1)=$CC
 _LT_CC_BASENAME([$compiler])
@@ -6958,7 +8113,8 @@ fi
 
 GCC=$lt_save_GCC
 AC_LANG_RESTORE
-CC="$lt_save_CC"
+CC=$lt_save_CC
+CFLAGS=$lt_save_CFLAGS
 ])# _LT_LANG_RC_CONFIG
 
 
@@ -6968,7 +8124,7 @@ AC_DEFUN([LT_PROG_GCJ],
 [m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ],
   [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ],
     [AC_CHECK_TOOL(GCJ, gcj,)
-      test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
+      test set = "${GCJFLAGS+set}" || GCJFLAGS="-g -O2"
       AC_SUBST(GCJFLAGS)])])[]dnl
 ])
 
@@ -6978,6 +8134,13 @@ dnl aclocal-1.4 backwards compatibility:
 dnl AC_DEFUN([LT_AC_PROG_GCJ], [])
 
 
+# LT_PROG_GO
+# ----------
+AC_DEFUN([LT_PROG_GO],
+[AC_CHECK_TOOL(GOC, gccgo,)
+])
+
+
 # LT_PROG_RC
 # ----------
 AC_DEFUN([LT_PROG_RC],
@@ -7017,6 +8180,15 @@ _LT_DECL([], [OBJDUMP], [1], [An object symbol dumper])
 AC_SUBST([OBJDUMP])
 ])
 
+# _LT_DECL_DLLTOOL
+# ----------------
+# Ensure DLLTOOL variable is set.
+m4_defun([_LT_DECL_DLLTOOL],
+[AC_CHECK_TOOL(DLLTOOL, dlltool, false)
+test -z "$DLLTOOL" && DLLTOOL=dlltool
+_LT_DECL([], [DLLTOOL], [1], [DLL creation program])
+AC_SUBST([DLLTOOL])
+])
 
 # _LT_DECL_SED
 # ------------
@@ -7063,7 +8235,7 @@ lt_ac_count=0
 # Add /usr/xpg4/bin/sed as it is typically found on Solaris
 # along with /bin/sed that truncates output.
 for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
-  test ! -f $lt_ac_sed && continue
+  test ! -f "$lt_ac_sed" && continue
   cat /dev/null > conftest.in
   lt_ac_count=0
   echo $ECHO_N "0123456789$ECHO_C" >conftest.in
@@ -7080,9 +8252,9 @@ for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
     $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
     cmp -s conftest.out conftest.nl || break
     # 10000 chars as input seems more than enough
-    test $lt_ac_count -gt 10 && break
+    test 10 -lt "$lt_ac_count" && break
     lt_ac_count=`expr $lt_ac_count + 1`
-    if test $lt_ac_count -gt $lt_ac_max; then
+    if test "$lt_ac_count" -gt "$lt_ac_max"; then
       lt_ac_max=$lt_ac_count
       lt_cv_path_SED=$lt_ac_sed
     fi
@@ -7106,27 +8278,7 @@ dnl AC_DEFUN([LT_AC_PROG_SED], [])
 # Find out whether the shell is Bourne or XSI compatible,
 # or has some other useful features.
 m4_defun([_LT_CHECK_SHELL_FEATURES],
-[AC_MSG_CHECKING([whether the shell understands some XSI constructs])
-# Try some XSI features
-xsi_shell=no
-( _lt_dummy="a/b/c"
-  test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \
-      = c,a/b,, \
-    && eval 'test $(( 1 + 1 )) -eq 2 \
-    && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \
-  && xsi_shell=yes
-AC_MSG_RESULT([$xsi_shell])
-_LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell'])
-
-AC_MSG_CHECKING([whether the shell understands "+="])
-lt_shell_append=no
-( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \
-    >/dev/null 2>&1 \
-  && lt_shell_append=yes
-AC_MSG_RESULT([$lt_shell_append])
-_LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append'])
-
-if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
+[if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
   lt_unset=unset
 else
   lt_unset=false
@@ -7150,208 +8302,69 @@ _LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl
 ])# _LT_CHECK_SHELL_FEATURES
 
 
-# _LT_PROG_XSI_SHELLFNS
-# ---------------------
-# Bourne and XSI compatible variants of some useful shell functions.
-m4_defun([_LT_PROG_XSI_SHELLFNS],
-[case $xsi_shell in
-  yes)
-    cat << \_LT_EOF >> "$cfgfile"
-
-# func_dirname file append nondir_replacement
-# Compute the dirname of FILE.  If nonempty, add APPEND to the result,
-# otherwise set result to NONDIR_REPLACEMENT.
-func_dirname ()
-{
-  case ${1} in
-    */*) func_dirname_result="${1%/*}${2}" ;;
-    *  ) func_dirname_result="${3}" ;;
-  esac
-}
-
-# func_basename file
-func_basename ()
-{
-  func_basename_result="${1##*/}"
-}
-
-# func_dirname_and_basename file append nondir_replacement
-# perform func_basename and func_dirname in a single function
-# call:
-#   dirname:  Compute the dirname of FILE.  If nonempty,
-#             add APPEND to the result, otherwise set result
-#             to NONDIR_REPLACEMENT.
-#             value returned in "$func_dirname_result"
-#   basename: Compute filename of FILE.
-#             value retuned in "$func_basename_result"
-# Implementation must be kept synchronized with func_dirname
-# and func_basename. For efficiency, we do not delegate to
-# those functions but instead duplicate the functionality here.
-func_dirname_and_basename ()
-{
-  case ${1} in
-    */*) func_dirname_result="${1%/*}${2}" ;;
-    *  ) func_dirname_result="${3}" ;;
-  esac
-  func_basename_result="${1##*/}"
-}
-
-# func_stripname prefix suffix name
-# strip PREFIX and SUFFIX off of NAME.
-# PREFIX and SUFFIX must not contain globbing or regex special
-# characters, hashes, percent signs, but SUFFIX may contain a leading
-# dot (in which case that matches only a dot).
-func_stripname ()
-{
-  # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are
-  # positional parameters, so assign one to ordinary parameter first.
-  func_stripname_result=${3}
-  func_stripname_result=${func_stripname_result#"${1}"}
-  func_stripname_result=${func_stripname_result%"${2}"}
-}
-
-# func_opt_split
-func_opt_split ()
-{
-  func_opt_split_opt=${1%%=*}
-  func_opt_split_arg=${1#*=}
-}
-
-# func_lo2o object
-func_lo2o ()
-{
-  case ${1} in
-    *.lo) func_lo2o_result=${1%.lo}.${objext} ;;
-    *)    func_lo2o_result=${1} ;;
-  esac
-}
-
-# func_xform libobj-or-source
-func_xform ()
-{
-  func_xform_result=${1%.*}.lo
-}
-
-# func_arith arithmetic-term...
-func_arith ()
-{
-  func_arith_result=$(( $[*] ))
-}
-
-# func_len string
-# STRING may not start with a hyphen.
-func_len ()
-{
-  func_len_result=${#1}
-}
-
-_LT_EOF
+# _LT_PATH_CONVERSION_FUNCTIONS
+# -----------------------------
+# Determine what file name conversion functions should be used by
+# func_to_host_file (and, implicitly, by func_to_host_path).  These are needed
+# for certain cross-compile configurations and native mingw.
+m4_defun([_LT_PATH_CONVERSION_FUNCTIONS],
+[AC_REQUIRE([AC_CANONICAL_HOST])dnl
+AC_REQUIRE([AC_CANONICAL_BUILD])dnl
+AC_MSG_CHECKING([how to convert $build file names to $host format])
+AC_CACHE_VAL(lt_cv_to_host_file_cmd,
+[case $host in
+  *-*-mingw* )
+    case $build in
+      *-*-mingw* ) # actually msys
+        lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32
+        ;;
+      *-*-cygwin* )
+        lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32
+        ;;
+      * ) # otherwise, assume *nix
+        lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32
+        ;;
+    esac
     ;;
-  *) # Bourne compatible functions.
-    cat << \_LT_EOF >> "$cfgfile"
-
-# func_dirname file append nondir_replacement
-# Compute the dirname of FILE.  If nonempty, add APPEND to the result,
-# otherwise set result to NONDIR_REPLACEMENT.
-func_dirname ()
-{
-  # Extract subdirectory from the argument.
-  func_dirname_result=`$ECHO "X${1}" | $Xsed -e "$dirname"`
-  if test "X$func_dirname_result" = "X${1}"; then
-    func_dirname_result="${3}"
-  else
-    func_dirname_result="$func_dirname_result${2}"
-  fi
-}
-
-# func_basename file
-func_basename ()
-{
-  func_basename_result=`$ECHO "X${1}" | $Xsed -e "$basename"`
-}
-
-dnl func_dirname_and_basename
-dnl A portable version of this function is already defined in general.m4sh
-dnl so there is no need for it here.
-
-# func_stripname prefix suffix name
-# strip PREFIX and SUFFIX off of NAME.
-# PREFIX and SUFFIX must not contain globbing or regex special
-# characters, hashes, percent signs, but SUFFIX may contain a leading
-# dot (in which case that matches only a dot).
-# func_strip_suffix prefix name
-func_stripname ()
-{
-  case ${2} in
-    .*) func_stripname_result=`$ECHO "X${3}" \
-           | $Xsed -e "s%^${1}%%" -e "s%\\\\${2}\$%%"`;;
-    *)  func_stripname_result=`$ECHO "X${3}" \
-           | $Xsed -e "s%^${1}%%" -e "s%${2}\$%%"`;;
-  esac
-}
-
-# sed scripts:
-my_sed_long_opt='1s/^\(-[[^=]]*\)=.*/\1/;q'
-my_sed_long_arg='1s/^-[[^=]]*=//'
-
-# func_opt_split
-func_opt_split ()
-{
-  func_opt_split_opt=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_opt"`
-  func_opt_split_arg=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_arg"`
-}
-
-# func_lo2o object
-func_lo2o ()
-{
-  func_lo2o_result=`$ECHO "X${1}" | $Xsed -e "$lo2o"`
-}
-
-# func_xform libobj-or-source
-func_xform ()
-{
-  func_xform_result=`$ECHO "X${1}" | $Xsed -e 's/\.[[^.]]*$/.lo/'`
-}
-
-# func_arith arithmetic-term...
-func_arith ()
-{
-  func_arith_result=`expr "$[@]"`
-}
-
-# func_len string
-# STRING may not start with a hyphen.
-func_len ()
-{
-  func_len_result=`expr "$[1]" : ".*" 2>/dev/null || echo $max_cmd_len`
-}
-
-_LT_EOF
-esac
-
-case $lt_shell_append in
-  yes)
-    cat << \_LT_EOF >> "$cfgfile"
-
-# func_append var value
-# Append VALUE to the end of shell variable VAR.
-func_append ()
-{
-  eval "$[1]+=\$[2]"
-}
-_LT_EOF
+  *-*-cygwin* )
+    case $build in
+      *-*-mingw* ) # actually msys
+        lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin
+        ;;
+      *-*-cygwin* )
+        lt_cv_to_host_file_cmd=func_convert_file_noop
+        ;;
+      * ) # otherwise, assume *nix
+        lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin
+        ;;
+    esac
     ;;
-  *)
-    cat << \_LT_EOF >> "$cfgfile"
-
-# func_append var value
-# Append VALUE to the end of shell variable VAR.
-func_append ()
-{
-  eval "$[1]=\$$[1]\$[2]"
-}
-
-_LT_EOF
+  * ) # unhandled hosts (and "normal" native builds)
+    lt_cv_to_host_file_cmd=func_convert_file_noop
     ;;
-  esac
+esac
+])
+to_host_file_cmd=$lt_cv_to_host_file_cmd
+AC_MSG_RESULT([$lt_cv_to_host_file_cmd])
+_LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd],
+         [0], [convert $build file names to $host format])dnl
+
+AC_MSG_CHECKING([how to convert $build file names to toolchain format])
+AC_CACHE_VAL(lt_cv_to_tool_file_cmd,
+[#assume ordinary cross tools, or native build.
+lt_cv_to_tool_file_cmd=func_convert_file_noop
+case $host in
+  *-*-mingw* )
+    case $build in
+      *-*-mingw* ) # actually msys
+        lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32
+        ;;
+    esac
+    ;;
+esac
 ])
+to_tool_file_cmd=$lt_cv_to_tool_file_cmd
+AC_MSG_RESULT([$lt_cv_to_tool_file_cmd])
+_LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd],
+         [0], [convert $build files to toolchain format])dnl
+])# _LT_PATH_CONVERSION_FUNCTIONS
diff --git a/m4/ltoptions.m4 b/m4/ltoptions.m4
index a3203e3..69f1be7 100644
--- a/m4/ltoptions.m4
+++ b/m4/ltoptions.m4
@@ -1,13 +1,14 @@
 # Helper functions for option handling.                    -*- Autoconf -*-
 #
-#   Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc.
+#   Copyright (C) 2004-2005, 2007-2009, 2011-2015 Free Software
+#   Foundation, Inc.
 #   Written by Gary V. Vaughan, 2004
 #
 # This file is free software; the Free Software Foundation gives
 # unlimited permission to copy and/or distribute it, with or without
 # modifications, as long as this notice is preserved.
 
-dnl # serial 6 ltoptions.m4
+dnl # serial 8 ltoptions.m4
 
 # This is to help aclocal find these macros, as it can't see m4_define.
 AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])])
@@ -28,7 +29,7 @@ m4_define([_LT_SET_OPTION],
 [m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl
 m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]),
         _LT_MANGLE_DEFUN([$1], [$2]),
-    [m4_warning([Unknown $1 option `$2'])])[]dnl
+    [m4_warning([Unknown $1 option '$2'])])[]dnl
 ])
 
 
@@ -74,13 +75,15 @@ m4_if([$1],[LT_INIT],[
   dnl
   dnl If no reference was made to various pairs of opposing options, then
   dnl we run the default mode handler for the pair.  For example, if neither
-  dnl `shared' nor `disable-shared' was passed, we enable building of shared
+  dnl 'shared' nor 'disable-shared' was passed, we enable building of shared
   dnl archives by default:
   _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED])
   _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC])
   _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC])
   _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install],
-  		   [_LT_ENABLE_FAST_INSTALL])
+		   [_LT_ENABLE_FAST_INSTALL])
+  _LT_UNLESS_OPTIONS([LT_INIT], [aix-soname=aix aix-soname=both aix-soname=svr4],
+		   [_LT_WITH_AIX_SONAME([aix])])
   ])
 ])# _LT_SET_OPTIONS
 
@@ -111,7 +114,7 @@ AU_DEFUN([AC_LIBTOOL_DLOPEN],
 [_LT_SET_OPTION([LT_INIT], [dlopen])
 AC_DIAGNOSE([obsolete],
 [$0: Remove this warning and the call to _LT_SET_OPTION when you
-put the `dlopen' option into LT_INIT's first parameter.])
+put the 'dlopen' option into LT_INIT's first parameter.])
 ])
 
 dnl aclocal-1.4 backwards compatibility:
@@ -125,7 +128,7 @@ LT_OPTION_DEFINE([LT_INIT], [win32-dll],
 [enable_win32_dll=yes
 
 case $host in
-*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-cegcc*)
+*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*)
   AC_CHECK_TOOL(AS, as, false)
   AC_CHECK_TOOL(DLLTOOL, dlltool, false)
   AC_CHECK_TOOL(OBJDUMP, objdump, false)
@@ -133,13 +136,13 @@ case $host in
 esac
 
 test -z "$AS" && AS=as
-_LT_DECL([], [AS],      [0], [Assembler program])dnl
+_LT_DECL([], [AS],      [1], [Assembler program])dnl
 
 test -z "$DLLTOOL" && DLLTOOL=dlltool
-_LT_DECL([], [DLLTOOL], [0], [DLL creation program])dnl
+_LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl
 
 test -z "$OBJDUMP" && OBJDUMP=objdump
-_LT_DECL([], [OBJDUMP], [0], [Object dumper program])dnl
+_LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl
 ])# win32-dll
 
 AU_DEFUN([AC_LIBTOOL_WIN32_DLL],
@@ -147,7 +150,7 @@ AU_DEFUN([AC_LIBTOOL_WIN32_DLL],
 _LT_SET_OPTION([LT_INIT], [win32-dll])
 AC_DIAGNOSE([obsolete],
 [$0: Remove this warning and the call to _LT_SET_OPTION when you
-put the `win32-dll' option into LT_INIT's first parameter.])
+put the 'win32-dll' option into LT_INIT's first parameter.])
 ])
 
 dnl aclocal-1.4 backwards compatibility:
@@ -156,9 +159,9 @@ dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [])
 
 # _LT_ENABLE_SHARED([DEFAULT])
 # ----------------------------
-# implement the --enable-shared flag, and supports the `shared' and
-# `disable-shared' LT_INIT options.
-# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
+# implement the --enable-shared flag, and supports the 'shared' and
+# 'disable-shared' LT_INIT options.
+# DEFAULT is either 'yes' or 'no'.  If omitted, it defaults to 'yes'.
 m4_define([_LT_ENABLE_SHARED],
 [m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl
 AC_ARG_ENABLE([shared],
@@ -171,14 +174,14 @@ AC_ARG_ENABLE([shared],
     *)
       enable_shared=no
       # Look at the argument we got.  We use all the common list separators.
-      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
+      lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
       for pkg in $enableval; do
-	IFS="$lt_save_ifs"
+	IFS=$lt_save_ifs
 	if test "X$pkg" = "X$p"; then
 	  enable_shared=yes
 	fi
       done
-      IFS="$lt_save_ifs"
+      IFS=$lt_save_ifs
       ;;
     esac],
     [enable_shared=]_LT_ENABLE_SHARED_DEFAULT)
@@ -210,9 +213,9 @@ dnl AC_DEFUN([AM_DISABLE_SHARED], [])
 
 # _LT_ENABLE_STATIC([DEFAULT])
 # ----------------------------
-# implement the --enable-static flag, and support the `static' and
-# `disable-static' LT_INIT options.
-# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
+# implement the --enable-static flag, and support the 'static' and
+# 'disable-static' LT_INIT options.
+# DEFAULT is either 'yes' or 'no'.  If omitted, it defaults to 'yes'.
 m4_define([_LT_ENABLE_STATIC],
 [m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl
 AC_ARG_ENABLE([static],
@@ -225,14 +228,14 @@ AC_ARG_ENABLE([static],
     *)
      enable_static=no
       # Look at the argument we got.  We use all the common list separators.
-      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
+      lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
       for pkg in $enableval; do
-	IFS="$lt_save_ifs"
+	IFS=$lt_save_ifs
 	if test "X$pkg" = "X$p"; then
 	  enable_static=yes
 	fi
       done
-      IFS="$lt_save_ifs"
+      IFS=$lt_save_ifs
       ;;
     esac],
     [enable_static=]_LT_ENABLE_STATIC_DEFAULT)
@@ -264,15 +267,14 @@ dnl AC_DEFUN([AM_DISABLE_STATIC], [])
 
 # _LT_ENABLE_FAST_INSTALL([DEFAULT])
 # ----------------------------------
-# implement the --enable-fast-install flag, and support the `fast-install'
-# and `disable-fast-install' LT_INIT options.
-# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
+# implement the --enable-fast-install flag, and support the 'fast-install'
+# and 'disable-fast-install' LT_INIT options.
+# DEFAULT is either 'yes' or 'no'.  If omitted, it defaults to 'yes'.
 m4_define([_LT_ENABLE_FAST_INSTALL],
 [m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl
 AC_ARG_ENABLE([fast-install],
-dnl     [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
-dnl     [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
-    ,
+    [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
+    [(libtool) optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
     [p=${PACKAGE-default}
     case $enableval in
     yes) enable_fast_install=yes ;;
@@ -280,14 +282,14 @@ dnl     [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEF
     *)
       enable_fast_install=no
       # Look at the argument we got.  We use all the common list separators.
-      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
+      lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
       for pkg in $enableval; do
-	IFS="$lt_save_ifs"
+	IFS=$lt_save_ifs
 	if test "X$pkg" = "X$p"; then
 	  enable_fast_install=yes
 	fi
       done
-      IFS="$lt_save_ifs"
+      IFS=$lt_save_ifs
       ;;
     esac],
     [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT)
@@ -304,14 +306,14 @@ AU_DEFUN([AC_ENABLE_FAST_INSTALL],
 [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install])
 AC_DIAGNOSE([obsolete],
 [$0: Remove this warning and the call to _LT_SET_OPTION when you put
-the `fast-install' option into LT_INIT's first parameter.])
+the 'fast-install' option into LT_INIT's first parameter.])
 ])
 
 AU_DEFUN([AC_DISABLE_FAST_INSTALL],
 [_LT_SET_OPTION([LT_INIT], [disable-fast-install])
 AC_DIAGNOSE([obsolete],
 [$0: Remove this warning and the call to _LT_SET_OPTION when you put
-the `disable-fast-install' option into LT_INIT's first parameter.])
+the 'disable-fast-install' option into LT_INIT's first parameter.])
 ])
 
 dnl aclocal-1.4 backwards compatibility:
@@ -319,19 +321,85 @@ dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], [])
 dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], [])
 
 
+# _LT_WITH_AIX_SONAME([DEFAULT])
+# ----------------------------------
+# implement the --with-aix-soname flag, and support the `aix-soname=aix'
+# and `aix-soname=both' and `aix-soname=svr4' LT_INIT options. DEFAULT
+# is either `aix', `both' or `svr4'.  If omitted, it defaults to `aix'.
+m4_define([_LT_WITH_AIX_SONAME],
+[m4_define([_LT_WITH_AIX_SONAME_DEFAULT], [m4_if($1, svr4, svr4, m4_if($1, both, both, aix))])dnl
+shared_archive_member_spec=
+case $host,$enable_shared in
+power*-*-aix[[5-9]]*,yes)
+  AC_MSG_CHECKING([which variant of shared library versioning to provide])
+  AC_ARG_WITH([aix-soname],
+    [AS_HELP_STRING([--with-aix-soname=aix|svr4|both],
+      [(libtool) shared library versioning (aka "SONAME") variant to provide on AIX, @<:@default=]_LT_WITH_AIX_SONAME_DEFAULT[@:>@.])],
+    [case $withval in
+    aix|svr4|both)
+      ;;
+    *)
+      AC_MSG_ERROR([Unknown argument to --with-aix-soname])
+      ;;
+    esac
+    lt_cv_with_aix_soname=$with_aix_soname],
+    [AC_CACHE_VAL([lt_cv_with_aix_soname],
+      [lt_cv_with_aix_soname=]_LT_WITH_AIX_SONAME_DEFAULT)
+    with_aix_soname=$lt_cv_with_aix_soname])
+  AC_MSG_RESULT([$with_aix_soname])
+  if test aix != "$with_aix_soname"; then
+    # For the AIX way of multilib, we name the shared archive member
+    # based on the bitwidth used, traditionally 'shr.o' or 'shr_64.o',
+    # and 'shr.imp' or 'shr_64.imp', respectively, for the Import File.
+    # Even when GNU compilers ignore OBJECT_MODE but need '-maix64' flag,
+    # the AIX toolchain works better with OBJECT_MODE set (default 32).
+    if test 64 = "${OBJECT_MODE-32}"; then
+      shared_archive_member_spec=shr_64
+    else
+      shared_archive_member_spec=shr
+    fi
+  fi
+  ;;
+*)
+  with_aix_soname=aix
+  ;;
+esac
+
+_LT_DECL([], [shared_archive_member_spec], [0],
+    [Shared archive member basename, for filename based shared library versioning on AIX])dnl
+])# _LT_WITH_AIX_SONAME
+
+LT_OPTION_DEFINE([LT_INIT], [aix-soname=aix], [_LT_WITH_AIX_SONAME([aix])])
+LT_OPTION_DEFINE([LT_INIT], [aix-soname=both], [_LT_WITH_AIX_SONAME([both])])
+LT_OPTION_DEFINE([LT_INIT], [aix-soname=svr4], [_LT_WITH_AIX_SONAME([svr4])])
+
+
 # _LT_WITH_PIC([MODE])
 # --------------------
-# implement the --with-pic flag, and support the `pic-only' and `no-pic'
+# implement the --with-pic flag, and support the 'pic-only' and 'no-pic'
 # LT_INIT options.
-# MODE is either `yes' or `no'.  If omitted, it defaults to `both'.
+# MODE is either 'yes' or 'no'.  If omitted, it defaults to 'both'.
 m4_define([_LT_WITH_PIC],
 [AC_ARG_WITH([pic],
-    [AS_HELP_STRING([--with-pic],
-	[try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
-    [pic_mode="$withval"],
-    [pic_mode=default])
-
-test -z "$pic_mode" && pic_mode=m4_default([$1], [default])
+    [AS_HELP_STRING([--with-pic@<:@=PKGS@:>@],
+	[(libtool) try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
+    [lt_p=${PACKAGE-default}
+    case $withval in
+    yes|no) pic_mode=$withval ;;
+    *)
+      pic_mode=default
+      # Look at the argument we got.  We use all the common list separators.
+      lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
+      for lt_pkg in $withval; do
+	IFS=$lt_save_ifs
+	if test "X$lt_pkg" = "X$lt_p"; then
+	  pic_mode=yes
+	fi
+      done
+      IFS=$lt_save_ifs
+      ;;
+    esac],
+    [pic_mode=m4_default([$1], [default])])
 
 _LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl
 ])# _LT_WITH_PIC
@@ -344,7 +412,7 @@ AU_DEFUN([AC_LIBTOOL_PICMODE],
 [_LT_SET_OPTION([LT_INIT], [pic-only])
 AC_DIAGNOSE([obsolete],
 [$0: Remove this warning and the call to _LT_SET_OPTION when you
-put the `pic-only' option into LT_INIT's first parameter.])
+put the 'pic-only' option into LT_INIT's first parameter.])
 ])
 
 dnl aclocal-1.4 backwards compatibility:
diff --git a/m4/ltsugar.m4 b/m4/ltsugar.m4
index f90024b..4dddcd5 100644
--- a/m4/ltsugar.m4
+++ b/m4/ltsugar.m4
@@ -1,6 +1,7 @@
 # ltsugar.m4 -- libtool m4 base layer.                         -*-Autoconf-*-
 #
-# Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc.
+# Copyright (C) 2004-2005, 2007-2008, 2011-2015 Free Software
+# Foundation, Inc.
 # Written by Gary V. Vaughan, 2004
 #
 # This file is free software; the Free Software Foundation gives
@@ -33,7 +34,7 @@ m4_define([_lt_join],
 # ------------
 # Manipulate m4 lists.
 # These macros are necessary as long as will still need to support
-# Autoconf-2.59 which quotes differently.
+# Autoconf-2.59, which quotes differently.
 m4_define([lt_car], [[$1]])
 m4_define([lt_cdr],
 [m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])],
@@ -44,7 +45,7 @@ m4_define([lt_unquote], $1)
 
 # lt_append(MACRO-NAME, STRING, [SEPARATOR])
 # ------------------------------------------
-# Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'.
+# Redefine MACRO-NAME to hold its former content plus 'SEPARATOR''STRING'.
 # Note that neither SEPARATOR nor STRING are expanded; they are appended
 # to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked).
 # No SEPARATOR is output if MACRO-NAME was previously undefined (different
diff --git a/m4/ltversion.m4 b/m4/ltversion.m4
index 7c828c0..eaea771 100644
--- a/m4/ltversion.m4
+++ b/m4/ltversion.m4
@@ -1,23 +1,23 @@
 # ltversion.m4 -- version numbers			-*- Autoconf -*-
 #
-#   Copyright (C) 2004 Free Software Foundation, Inc.
+#   Copyright (C) 2004, 2011-2015 Free Software Foundation, Inc.
 #   Written by Scott James Remnant, 2004
 #
 # This file is free software; the Free Software Foundation gives
 # unlimited permission to copy and/or distribute it, with or without
 # modifications, as long as this notice is preserved.
 
-# Generated from ltversion.in.
+# @configure_input@
 
-dnl # serial 3012 ltversion.m4
+dnl # serial 4179 ltversion.m4
 # This file is part of GNU Libtool
 
-m4_define([LT_PACKAGE_VERSION], [2.2.6])
-m4_define([LT_PACKAGE_REVISION], [1.3012])
+m4_define([LT_PACKAGE_VERSION], [2.4.6])
+m4_define([LT_PACKAGE_REVISION], [2.4.6])
 
 AC_DEFUN([LTVERSION_VERSION],
-[macro_version='2.2.6'
-macro_revision='1.3012'
+[macro_version='2.4.6'
+macro_revision='2.4.6'
 _LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?])
 _LT_DECL(, macro_revision, 0)
 ])
diff --git a/m4/lt~obsolete.m4 b/m4/lt~obsolete.m4
index 242855e..81f9b59 100644
--- a/m4/lt~obsolete.m4
+++ b/m4/lt~obsolete.m4
@@ -1,17 +1,18 @@
 # lt~obsolete.m4 -- aclocal satisfying obsolete definitions.    -*-Autoconf-*-
 #
-#   Copyright (C) 2004, 2005, 2007 Free Software Foundation, Inc.
+#   Copyright (C) 2004-2005, 2007, 2009, 2011-2015 Free Software
+#   Foundation, Inc.
 #   Written by Scott James Remnant, 2004.
 #
 # This file is free software; the Free Software Foundation gives
 # unlimited permission to copy and/or distribute it, with or without
 # modifications, as long as this notice is preserved.
 
-dnl # serial 4 lt~obsolete.m4
+dnl # serial 5 lt~obsolete.m4
 
 # These exist entirely to fool aclocal when bootstrapping libtool.
 #
-# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN)
+# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN),
 # which have later been changed to m4_define as they aren't part of the
 # exported API, or moved to Autoconf or Automake where they belong.
 #
@@ -25,7 +26,7 @@ dnl # serial 4 lt~obsolete.m4
 # included after everything else.  This provides aclocal with the
 # AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything
 # because those macros already exist, or will be overwritten later.
-# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. 
+# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6.
 #
 # Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here.
 # Yes, that means every name once taken will need to remain here until
@@ -77,7 +78,6 @@ m4_ifndef([AC_DISABLE_FAST_INSTALL],	[AC_DEFUN([AC_DISABLE_FAST_INSTALL])])
 m4_ifndef([_LT_AC_LANG_CXX],		[AC_DEFUN([_LT_AC_LANG_CXX])])
 m4_ifndef([_LT_AC_LANG_F77],		[AC_DEFUN([_LT_AC_LANG_F77])])
 m4_ifndef([_LT_AC_LANG_GCJ],		[AC_DEFUN([_LT_AC_LANG_GCJ])])
-m4_ifndef([AC_LIBTOOL_RC],		[AC_DEFUN([AC_LIBTOOL_RC])])
 m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])])
 m4_ifndef([_LT_AC_LANG_C_CONFIG],	[AC_DEFUN([_LT_AC_LANG_C_CONFIG])])
 m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])])
@@ -90,3 +90,10 @@ m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])])
 m4_ifndef([_LT_AC_LANG_RC_CONFIG],	[AC_DEFUN([_LT_AC_LANG_RC_CONFIG])])
 m4_ifndef([AC_LIBTOOL_CONFIG],		[AC_DEFUN([AC_LIBTOOL_CONFIG])])
 m4_ifndef([_LT_AC_FILE_LTDLL_C],	[AC_DEFUN([_LT_AC_FILE_LTDLL_C])])
+m4_ifndef([_LT_REQUIRED_DARWIN_CHECKS],	[AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])])
+m4_ifndef([_LT_AC_PROG_CXXCPP],		[AC_DEFUN([_LT_AC_PROG_CXXCPP])])
+m4_ifndef([_LT_PREPARE_SED_QUOTE_VARS],	[AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])])
+m4_ifndef([_LT_PROG_ECHO_BACKSLASH],	[AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])])
+m4_ifndef([_LT_PROG_F77],		[AC_DEFUN([_LT_PROG_F77])])
+m4_ifndef([_LT_PROG_FC],		[AC_DEFUN([_LT_PROG_FC])])
+m4_ifndef([_LT_PROG_CXX],		[AC_DEFUN([_LT_PROG_CXX])])
diff --git a/m4/openmp.m4 b/m4/openmp.m4
new file mode 100644
index 0000000..d559e2c
--- /dev/null
+++ b/m4/openmp.m4
@@ -0,0 +1,98 @@
+# This file is part of Autoconf.			-*- Autoconf -*-
+# Programming languages support.
+# Copyright (C) 2001-2012 Free Software Foundation, Inc.
+# Copyright (C) 2015-2016 R Core Team
+
+# This file is part of Autoconf.  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.
+#
+# Under Section 7 of GPL version 3, you are granted additional
+# permissions described in the Autoconf Configure Script Exception,
+# version 3.0, as published by the Free Software Foundation.
+#
+# You should have received a copy of the GNU General Public License
+# and a copy of the Autoconf Configure Script Exception along with
+# this program; see the files COPYINGv3 and COPYING.EXCEPTION
+# respectively.  If not, see <http://www.gnu.org/licenses/>.
+
+# Written by David MacKenzie, with help from
+# Akim Demaille, Paul Eggert,
+# Franc,ois Pinard, Karl Berry, Richard Pixley, Ian Lance Taylor,
+# Roland McGrath, Noah Friedman, david d zuhn, and many others.
+
+# [a small part, modified for clang and Intel in 2015,6.]
+
+
+# R_OPENMP
+# --------
+# Check which options need to be passed to the C compiler to support OpenMP.
+# Set the OPENMP_CFLAGS / OPENMP_CXXFLAGS / OPENMP_FFLAGS variable to these
+# options.
+# The options are necessary at compile time (so the #pragmas are understood)
+# and at link time (so the appropriate library is linked with).
+# This macro takes care to not produce redundant options if $CC $CFLAGS already
+# supports OpenMP. It also is careful to not pass options to compilers that
+# misinterpret them; for example, most compilers accept "-openmp" and create
+# an output file called 'penmp' rather than activating OpenMP support.
+AC_DEFUN([R_OPENMP],
+[
+  OPENMP_[]_AC_LANG_PREFIX[]FLAGS=
+  AC_ARG_ENABLE([openmp],
+    [AS_HELP_STRING([--disable-openmp], [do not use OpenMP])])
+  if test "$enable_openmp" != no; then
+    AC_CACHE_CHECK([for $[]_AC_CC[] option to support OpenMP],
+      [ac_cv_prog_[]_AC_LANG_ABBREV[]_openmp],
+      [AC_LINK_IFELSE([_AC_LANG_OPENMP],
+	 [ac_cv_prog_[]_AC_LANG_ABBREV[]_openmp='none needed'],
+	 [ac_cv_prog_[]_AC_LANG_ABBREV[]_openmp='unsupported'
+	  dnl Try these flags:
+	  dnl   GCC >= 4.2, clang 3.8 -fopenmp
+	  dnl   clang 3.7.x	      -fopenmp=libomp
+	  dnl   (-fopenmp is accepted but does not work)
+	  dnl   Oracle C, Fortran     -xopenmp
+          dnl   (also accepts -fopenmp as from 12.4)
+	  dnl   Intel C, Fortran      -qopenmp
+	  dnl   Intel                 -openmp (deprecated)
+          dnl   (https://software.intel.com/en-us/node/581863,
+	  dnl    https://software.intel.com/en-us/node/525020)
+	  dnl   SGI C, PGI C          -mp
+	  dnl   Tru64 Compaq C        -omp
+	  dnl   IBM C (AIX, Linux)    -qsmp=omp
+          dnl   Cray CCE              -homp
+          dnl   NEC SX                -Popenmp
+          dnl   Lahey Fortran (Linux) --openmp
+	  dnl If in this loop a compiler is passed an option that it doesn't
+	  dnl understand or that it misinterprets, the AC_LINK_IFELSE test
+	  dnl will fail (since we know that it failed without the option),
+	  dnl therefore the loop will continue searching for an option, and
+	  dnl no output file called 'penmp' or 'mp' is created.
+	  for ac_option in -fopenmp -xopenmp -qopenmp \
+                           -openmp -mp -omp -qsmp=omp -homp \
+			   -fopenmp=libomp \
+                           -Popenmp --openmp; do
+	    ac_save_[]_AC_LANG_PREFIX[]FLAGS=$[]_AC_LANG_PREFIX[]FLAGS
+	    _AC_LANG_PREFIX[]FLAGS="$[]_AC_LANG_PREFIX[]FLAGS $ac_option"
+	    AC_LINK_IFELSE([_AC_LANG_OPENMP],
+	      [ac_cv_prog_[]_AC_LANG_ABBREV[]_openmp=$ac_option])
+	    _AC_LANG_PREFIX[]FLAGS=$ac_save_[]_AC_LANG_PREFIX[]FLAGS
+	    if test "$ac_cv_prog_[]_AC_LANG_ABBREV[]_openmp" != unsupported; then
+	      break
+	    fi
+	  done])])
+    case $ac_cv_prog_[]_AC_LANG_ABBREV[]_openmp in #(
+      "none needed" | unsupported)
+	;; #(
+      *)
+	OPENMP_[]_AC_LANG_PREFIX[]FLAGS=$ac_cv_prog_[]_AC_LANG_ABBREV[]_openmp ;;
+    esac
+  fi
+  AC_SUBST([OPENMP_]_AC_LANG_PREFIX[FLAGS])
+])
diff --git a/po/POTFILES b/po/POTFILES
index ffadfb7..aa0c2b7 100644
--- a/po/POTFILES
+++ b/po/POTFILES
@@ -43,6 +43,7 @@ src/main/engine.c
 src/main/envir.c
 src/main/errors.c
 src/main/eval.c
+src/main/g_alab_her.c
 src/main/gevents.c
 src/main/gram.y
 src/main/graphics.c
@@ -86,19 +87,18 @@ src/main/sysutils.c
 src/main/unique.c
 src/main/util.c
 src/main/version.c
-src/main/vfonts.c
 src/main/xspline.c
 src/modules/X11/dataentry.c
 src/modules/X11/devX11.c
 src/modules/internet/Rhttpd.c
 src/modules/internet/internet.c
+src/modules/internet/libcurl.c
 src/modules/internet/nanoftp.c
 src/modules/internet/nanohttp.c
 src/modules/internet/sockconn.c
 src/modules/lapack/Lapack.c
 src/modules/lapack/init_win.c
 src/modules/lapack/vecLibg95c.c
-src/modules/vfonts/g_alab_her.c
 src/nmath/bessel_i.c
 src/nmath/bessel_j.c
 src/nmath/bessel_k.c
diff --git a/share/Makefile.in b/share/Makefile.in
index 7c48885..75258ab 100644
--- a/share/Makefile.in
+++ b/share/Makefile.in
@@ -14,7 +14,7 @@ distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
 DISTFILES = Makefile.in
 
 ## subdirectories of R_HOME/share
-SUBDIRS_WITH_NO_BUILD = R dictionaries encodings licenses make sh texmf java
+SUBDIRS_WITH_NO_BUILD = R dictionaries encodings licenses make sh texmf java Rd
 
 all: Makefile R
 
@@ -38,6 +38,8 @@ installdirs:
 	@$(MKINSTALLDIRS) "$(DESTDIR)$(rsharedir)/java"
 	@$(MKINSTALLDIRS) "$(DESTDIR)$(rsharedir)/licenses"
 	@$(MKINSTALLDIRS) "$(DESTDIR)$(rsharedir)/make"
+	@$(MKINSTALLDIRS) "$(DESTDIR)$(rsharedir)/Rd"
+	@$(MKINSTALLDIRS) "$(DESTDIR)$(rsharedir)/Rd/macros"
 	@$(MKINSTALLDIRS) "$(DESTDIR)$(rsharedir)/sh"
 	@$(MKINSTALLDIRS) "$(DESTDIR)$(rsharedir)/texmf"
 	@$(MKINSTALLDIRS) "$(DESTDIR)$(rsharedir)/texmf/bibtex/bib"
@@ -64,6 +66,9 @@ install-sources: installdirs  @BUILD_TZONE_TRUE@ install-zoneinfo
 	@for f in $(srcdir)/make/*.mk; do \
 	  $(INSTALL_DATA) $${f} "$(DESTDIR)$(rsharedir)/make"; \
 	done
+	@for f in $(srcdir)/Rd/macros/*; do \
+	  $(INSTALL_DATA) $${f} "$(DESTDIR)$(rsharedir)/Rd/macros"; \
+	done
 	@for f in $(srcdir)/sh/*.sh; do \
 	  $(INSTALL_DATA) $${f} "$(DESTDIR)$(rsharedir)/sh"; \
 	done
diff --git a/share/R/REMOVE.R b/share/R/REMOVE.R
index 61fd8e0..506c972 100644
--- a/share/R/REMOVE.R
+++ b/share/R/REMOVE.R
@@ -29,7 +29,7 @@ Usage <- function() {
         "  -v, --version		print REMOVE version info and exit",
         "  -l, --library=LIB	remove packages from library tree LIB",
         "",
-        "Report bugs at bugs.r-project.org .", sep="\n")
+        "Report bugs at <https://bugs.R-project.org>.", sep="\n")
 }
 
 options(showErrorCalls=FALSE)
diff --git a/share/Rd/macros/system.Rd b/share/Rd/macros/system.Rd
new file mode 100644
index 0000000..7d327cf
--- /dev/null
+++ b/share/Rd/macros/system.Rd
@@ -0,0 +1,47 @@
+% System Rd macros
+
+% These macros are automatically loaded whenever R processes an Rd file.
+
+% Packages may define their own macros, which are stored in man/macros/*.Rd in
+% the source, help/macros/*.Rd after installation.  Those will be processed after
+% this file but before every Rd file in a package.
+
+% Packages may request inclusion of macros from other packages using the 
+% LoadRdMacros line in the DESCRIPTION file, e.g.
+%  LoadRdMacros:  pkgA 
+% These are loaded after the system macros and before the current package macros.
+
+% Individual Rd files may define their own macros.
+
+
+
+% To refer to a package on CRAN
+\newcommand{\CRANpkg}{\href{https://CRAN.R-project.org/package=#1}{\pkg{#1}}}
+
+% To refer to a bug report by number
+\newcommand{\PR}{\Sexpr[results=rd]{tools:::Rd_expr_PR(#1)}}
+
+% To avoid a double space after a period in LaTeX output
+\newcommand{\sspace}{\ifelse{latex}{\out{~}}{ }}
+
+% To get the package title at build time from the DESCRIPTION file
+\newcommand{\packageTitle}{\Sexpr[results=rd,stage=build]{tools:::Rd_package_title("#1")}}
+
+% To get the package description at build time from the DESCRIPTION file
+\newcommand{\packageDescription}{\Sexpr[results=rd,stage=build]{tools:::Rd_package_description("#1")}}
+
+% To get the package author at build time from the DESCRIPTION file
+\newcommand{\packageAuthor}{\Sexpr[results=rd,stage=build]{tools:::Rd_package_author("#1")}}
+
+% To get the package maintainer at build time from the DESCRIPTION file
+\newcommand{\packageMaintainer}{\Sexpr[results=rd,stage=build]{tools:::Rd_package_maintainer("#1")}}
+
+% To get a formatted copy of the whole DESCRIPTION file
+\newcommand{\packageDESCRIPTION}{\Sexpr[results=rd,stage=build]{tools:::Rd_package_DESCRIPTION("#1")}}
+
+% To include various indices about an installed package
+
+\newcommand{\packageIndices}{\Sexpr[results=rd,stage=build]{tools:::Rd_package_indices("#1")}}
+
+% To indicate a DOI.
+\newcommand{\doi}{\Sexpr[results=rd,stage=build]{tools:::Rd_expr_doi("#1")}}
diff --git a/share/dictionaries/en_stats.rds b/share/dictionaries/en_stats.rds
index 457ed28..9c0b09c 100644
Binary files a/share/dictionaries/en_stats.rds and b/share/dictionaries/en_stats.rds differ
diff --git a/share/dictionaries/en_stats.txt b/share/dictionaries/en_stats.txt
index c4b5faf..f91e62b 100644
--- a/share/dictionaries/en_stats.txt
+++ b/share/dictionaries/en_stats.txt
@@ -3,6 +3,7 @@ accessor
 accessors
 ACF
 Affymetrix
+agglomerative
 AIC
 Akaike
 Akaike's
@@ -40,7 +41,6 @@ biplots
 bitwise
 Bivariate
 bivariate
-bivariate
 biweight
 boolean
 boxplot
@@ -67,6 +67,7 @@ cophenetic
 correlation
 covariables
 covariance
+covariances
 Covariate
 covariate
 Covariates
@@ -104,6 +105,9 @@ deviances
 DIC
 dichotomized
 differenced
+differentiable
+differentially
+dimensionality
 dimnames
 discretization
 discretize
@@ -142,7 +146,10 @@ GARCH
 gaussian
 Gaussians
 GCV
+genomic
+genotype
 genotyped
+genotypes
 genotypic
 genotyping
 Ghostscript
@@ -181,6 +188,7 @@ informations
 inline
 internet
 interquartile
+invariance
 invertibility
 IQR
 IRT
@@ -227,6 +235,7 @@ MCMC
 MDI
 medoids
 metacharacters
+metadata
 microarray
 microarrays
 microsatellite
@@ -255,6 +264,8 @@ NAs
 NCBI
 nonlinearity
 nonnegative
+Nonparametric
+nonparametric
 numerics
 OECD
 ok
@@ -263,6 +274,8 @@ Omegahat
 one's
 online
 orthogonalized
+outlier
+outliers
 overdispersed
 overdispersion
 overfitting
@@ -271,10 +284,13 @@ overplotting
 pairlist
 pairlists
 parallelized
+parameterisation
 parameterization
 parameterizations
 parameterize
 parameterized
+parametrization
+parametrizations
 pathname
 patient's
 PCA
@@ -284,11 +300,15 @@ PDF
 pdf
 periodogram
 phenotypic
+Phylogenetic
+phylogenetic
+piecewise
 PLS
 plugin
 PNG
 pointsize
 pointwise
+polytomous
 POSIX
 PostScript
 precalculated
@@ -339,6 +359,7 @@ semiparametric
 shapefile
 sib
 significand
+skewness
 Smirnov
 smoothers
 SNP
@@ -355,6 +376,7 @@ sqrt
 startup
 stationarity
 stepsize
+stepwise
 stochastically
 studentized
 subdirectories
diff --git a/share/licenses/BSD_2_clause b/share/licenses/BSD_2_clause
index bd25127..7d2eddc 100644
--- a/share/licenses/BSD_2_clause
+++ b/share/licenses/BSD_2_clause
@@ -1,15 +1,18 @@
-Based on http://opensource.org/licenses/BSD-2-Clause
+Based on <https://opensource.org/licenses/BSD-2-Clause>
 
-This is a template. Complete and ship as file LICENSE the following 2
-lines (only)
+This is a template.  Provide completed entries of the form
 
 YEAR:
 COPYRIGHT HOLDER: 
 
-and specify as
+(separated by empty lines) as file LICENSE, and specify
 
 License: BSD_2_clause + file LICENSE
 
+in file DESCRIPTION.
+
+************************************************************************
+
 Copyright (c) <YEAR>, <COPYRIGHT HOLDER>
 
 Redistribution and use in source and binary forms, with or without
diff --git a/share/licenses/BSD_3_clause b/share/licenses/BSD_3_clause
index 6a155fc..f7c1c58 100644
--- a/share/licenses/BSD_3_clause
+++ b/share/licenses/BSD_3_clause
@@ -1,16 +1,18 @@
-Based on http://opensource.org/licenses/BSD-3-Clause
+Based on <https://opensource.org/licenses/BSD-3-Clause>
 
-This is a template. Complete and ship as file LICENSE the following 3
-lines (only)
+This is a template.  Provide completed entries of the form
 
 YEAR:
 COPYRIGHT HOLDER: 
 ORGANIZATION:
 
-and specify as
+(separated by empty lines) as file LICENSE, and specify
 
 License: BSD_3_clause + file LICENSE
 
+in file DESCRIPTION.
+
+************************************************************************
 
 Copyright (c) <YEAR>, <COPYRIGHT HOLDER>
 
diff --git a/share/licenses/MIT b/share/licenses/MIT
index c0c840f..02ea336 100644
--- a/share/licenses/MIT
+++ b/share/licenses/MIT
@@ -1,15 +1,18 @@
-Based on http://opensource.org/licenses/MIT
+Based on <http://opensource.org/licenses/MIT>
 
-This is a template. Complete and ship as file LICENSE the following 2
-lines (only)
+This is a template.  Provide completed entries of the form
 
 YEAR:
 COPYRIGHT HOLDER: 
 
-and specify as
+(separated by empty lines) as file LICENSE, and specify
 
 License: MIT + file LICENSE
 
+in file DESCRIPTION.
+
+************************************************************************
+
 Copyright (c) <YEAR>, <COPYRIGHT HOLDER>
 
 Permission is hereby granted, free of charge, to any person obtaining
diff --git a/share/licenses/license.db b/share/licenses/license.db
index fe17104..f7de88b 100644
--- a/share/licenses/license.db
+++ b/share/licenses/license.db
@@ -2,20 +2,20 @@ Name: GNU General Public License
 Abbrev: GPL
 Version: 2
 SSS: GPL-2
-OSI: open (http://opensource.org/licenses/gpl-license)
-FSF: free_and_GPLv3_incompatible (http://www.gnu.org/licenses/license-list.html#GPLv2)
+OSI: open (https://opensource.org/licenses/gpl-license)
+FSF: free_and_GPLv3_incompatible (https://www.gnu.org/licenses/license-list.html#GPLv2)
 File: share/licenses/GPL-2
-URL: http://www.R-project.org/Licenses/GPL-2
+URL: https://www.r-project.org/Licenses/GPL-2
 FOSS: yes
 
 Name: GNU General Public License
 Abbrev: GPL
 Version: 3
 SSS: GPL-3
-OSI: open (http://opensource.org/licenses/gpl-license)
-FSF: free_and_GPLv3_compatible (http://www.gnu.org/licenses/license-list.html#GNUGPL)
+OSI: open (https://opensource.org/licenses/gpl-license)
+FSF: free_and_GPLv3_compatible (https://www.gnu.org/licenses/license-list.html#GNUGPL)
 File: share/licenses/GPL-3
-URL: http://www.R-project.org/Licenses/GPL-3
+URL: https://www.r-project.org/Licenses/GPL-3
 FOSS: yes
 Extensible: yes
 
@@ -26,27 +26,27 @@ SSS: LGPL-2
 OSI: open
 FSF: free_and_GPLv3_incompatible
 File: share/licenses/LGPL-2
-URL: http://www.R-project.org/Licenses/LGPL-2
+URL: https://www.r-project.org/Licenses/LGPL-2
 FOSS: yes
 
 Name: GNU Lesser General Public License
 Abbrev: LGPL
 Version: 2.1
 SSS: LGPL-2.1
-OSI: open (http://opensource.org/licenses/lgpl-license)
-FSF: free_and_GPLv3_incompatible (http://www.gnu.org/licenses/license-list.html#LGPLv2.1)
+OSI: open (https://opensource.org/licenses/lgpl-license)
+FSF: free_and_GPLv3_incompatible (https://www.gnu.org/licenses/license-list.html#LGPLv2.1)
 File: share/licenses/LGPL-2.1
-URL: http://www.R-project.org/Licenses/LGPL-2.1
+URL: https://www.r-project.org/Licenses/LGPL-2.1
 FOSS: yes
 
 Name: GNU Lesser General Public License
 Abbrev: LGPL
 Version: 3
 SSS: LGPL-3
-OSI: open (http://opensource.org/licenses/lgpl-license)
-FSF: free_and_GPLv3_compatible (http://www.gnu.org/licenses/license-list.html#LGPL)
+OSI: open (https://opensource.org/licenses/lgpl-license)
+FSF: free_and_GPLv3_compatible (https://www.gnu.org/licenses/license-list.html#LGPL)
 File: share/licenses/LGPL-3
-URL: http://www.R-project.org/Licenses/LGPL-3
+URL: https://www.r-project.org/Licenses/LGPL-3
 FOSS: yes
 Extensible: yes
 
@@ -54,92 +54,92 @@ Name: GNU Affero General Public License
 Abbrev: AGPL
 Version: 3
 SSS: AGPL-3
-FSF: free_and_GPLv3_compatible (http://www.gnu.org/licenses/license-list.html#AGPLv3.0)
-OSI: open (http://opensource.org/licenses/AGPL-3.0)
+FSF: free_and_GPLv3_compatible (https://www.gnu.org/licenses/license-list.html#AGPLv3.0)
+OSI: open (https://opensource.org/licenses/AGPL-3.0)
 File: share/licenses/AGPL-3
-URL: http://www.R-project.org/Licenses/AGPL-3
+URL: https://www.r-project.org/Licenses/AGPL-3
 FOSS: yes
 Extensible: yes
 
 Name: Apache License
 Version: 1.1
-OSI: open but superseded (http://opensource.org/licenses/apachepl-1.1)
-FSF: free_and_GPLv3_incompatible (http://www.gnu.org/licenses/license-list.html#apache1.1)
-URL: http://www.apache.org/LICENSE-1.1
+OSI: open but superseded (https://opensource.org/licenses/apachepl-1.1)
+FSF: free_and_GPLv3_incompatible (https://www.gnu.org/licenses/license-list.html#apache1.1)
+URL: https://www.apache.org/LICENSE-1.1
 FOSS: yes
 
 Name: Apache License
 Version: 2.0
-OSI: open (http://opensource.org/licenses/Apache-2.0)
-FSF: free_and_GPLv3_compatible (http://www.gnu.org/licenses/license-list.html#apache2)
-URL: http://www.apache.org/licenses/LICENSE-2.0
+OSI: open (https://opensource.org/licenses/Apache-2.0)
+FSF: free_and_GPLv3_compatible (https://www.gnu.org/licenses/license-list.html#apache2)
+URL: https://www.apache.org/licenses/LICENSE-2.0
 FOSS: yes
 
 Name: Artistic License
 Version: 1.0
 SSS: Artistic-1.0
-OSI: open but superseded (http://opensource.org/licenses/artistic-license-1.0)
-FSF: non_free (http://www.gnu.org/licenses/license-list.html#ArtisticLicense)
-URL: http://www.R-project.org/Licenses/Artistic-1.0
+OSI: open but superseded (https://opensource.org/licenses/artistic-license-1.0)
+FSF: non_free (https://www.gnu.org/licenses/license-list.html#ArtisticLicense)
+URL: https://www.r-project.org/Licenses/Artistic-1.0
 FOSS: no
 Restricts_use: no
 
 Name: Artistic License
 Version: 2.0
 SSS: Artistic-2.0
-OSI: open (http://opensource.org/licenses/Artistic-2.0)
-FSF: free_and_GPLv3_compatible (http://www.gnu.org/licenses/license-list.html#ArtisticLicense2)
+OSI: open (https://opensource.org/licenses/Artistic-2.0)
+FSF: free_and_GPLv3_compatible (https://www.gnu.org/licenses/license-list.html#ArtisticLicense2)
 File: share/licenses/Artistic-2.0
-URL: http://www.R-project.org/Licenses/Artistic-2.0
+URL: https://www.r-project.org/Licenses/Artistic-2.0
 FOSS: yes
 
 Name: CeCILL
 Abbrev: CeCILL
 Version: 2
-FSF: free_and_GPLv3_compatible (http://www.gnu.org/licenses/license-list.html#CeCILL)
+FSF: free_and_GPLv3_compatible (https://www.gnu.org/licenses/license-list.html#CeCILL)
 URL: http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
 FOSS: yes
 
 Name: FreeBSD License
 Abbrev: FreeBSD
-OSI: open (http://opensource.org/licenses/BSD-2-Clause)
-FSF: free_and_GPLv3_compatible (http://www.gnu.org/licenses/license-list.html#FreeBSD)
-URL: http://www.freebsd.org/copyright/freebsd-license.html
+OSI: open (https://opensource.org/licenses/BSD-2-Clause)
+FSF: free_and_GPLv3_compatible (https://www.gnu.org/licenses/license-list.html#FreeBSD)
+URL: https://www.freebsd.org/copyright/freebsd-license.html
 FOSS: yes
 
 Name: MIT License
 Abbrev: MIT
-OSI: open (http://opensource.org/licenses/MIT)
+OSI: open (https://opensource.org/licenses/MIT)
 File: share/licenses/MIT
-URL: http://www.opensource.org/licenses/mit-license.php
+URL: https://opensource.org/licenses/mit-license.php
 FOSS: yes
 Extensible: yes
 Note: this is a template, needs + file LICENSE
 
 Name: Modified BSD License
 Abbrev: BSD
-OSI: open (http://opensource.org/licenses/BSD-3-Clause)
-FSF: free_and_GPLv3_compatible (http://www.gnu.org/licenses/license-list.html#ModifiedBSD)
-URL: http://opensource.org/licenses/BSD-3-Clause
+OSI: open (https://opensource.org/licenses/BSD-3-Clause)
+FSF: free_and_GPLv3_compatible (https://www.gnu.org/licenses/license-list.html#ModifiedBSD)
+URL: https://opensource.org/licenses/BSD-3-Clause
 FOSS: yes
 Note: do not use: use BSD_2_clause or BSD_3_clause instead
 
 Name: BSD 2-clause License
 Abbrev: BSD_2_clause
-OSI: open (http://opensource.org/licenses/BSD-2-Clause)
-FSF: free_and_GPLv3_compatible (http://www.gnu.org/licenses/license-list.html#FreeBSD)
+OSI: open (https://opensource.org/licenses/BSD-2-Clause)
+FSF: free_and_GPLv3_compatible (https://www.gnu.org/licenses/license-list.html#FreeBSD)
 File: share/licenses/BSD_2_clause
-URL: http://opensource.org/licenses/BSD-2-Clause
+URL: https://opensource.org/licenses/BSD-2-Clause
 FOSS: yes
 Extensible: yes
 Note: this is a template, needs + file LICENSE
 
 Name: BSD 3-clause License
 Abbrev: BSD_3_clause
-OSI: open (http://opensource.org/licenses/BSD-3-Clause)
-FSF: free_and_GPLv3_compatible (http://www.gnu.org/licenses/license-list.html#ModifiedBSD)
+OSI: open (https://opensource.org/licenses/BSD-3-Clause)
+FSF: free_and_GPLv3_compatible (https://www.gnu.org/licenses/license-list.html#ModifiedBSD)
 File: share/licenses/BSD_3_clause
-URL: http://opensource.org/licenses/BSD-3-Clause
+URL: https://opensource.org/licenses/BSD-3-Clause
 FOSS: yes
 Extensible: yes
 Note: this is a template, needs + file LICENSE
@@ -147,62 +147,62 @@ Note: this is a template, needs + file LICENSE
 Name: Mozilla Public License
 Abbrev: MPL
 Version: 1.0
-OSI: open but superseded (http://opensource.org/licenses/mozilla1.0)
+OSI: open but superseded (https://opensource.org/licenses/mozilla1.0)
 FSF: free_and_GPLv3_incompatible
-URL: http://www.mozilla.org/MPL/MPL-1.0.html
+URL: http://website-archive.mozilla.org/www.mozilla.org/mpl/MPL/1.0/
 FOSS: yes
 
 Name: Mozilla Public License
 Abbrev: MPL
 Version: 1.1
-OSI: open but superseded (http://opensource.org/licenses/MPL-1.1)
-FSF: free_and_GPLv3_incompatible (http://www.gnu.org/licenses/license-list.html#MPL)
-URL: http://www.mozilla.org/MPL/MPL-1.1.html
+OSI: open but superseded (https://opensource.org/licenses/MPL-1.1)
+FSF: free_and_GPLv3_incompatible (https://www.gnu.org/licenses/license-list.html#MPL)
+URL: https://www.mozilla.org/en-US/MPL/1.1/
 FOSS: yes
 
 Name: Mozilla Public License
 Abbrev: MPL
 Version: 2.0
-OSI: open (http://opensource.org/licenses/MPL-2.0)
-FSF: free_and_GPLv3_compatible (http://www.gnu.org/licenses/license-list.html#MPL-2.0)
-URL: http://www.mozilla.org/MPL/2.0
+OSI: open (https://opensource.org/licenses/MPL-2.0)
+FSF: free_and_GPLv3_compatible (https://www.gnu.org/licenses/license-list.html#MPL-2.0)
+URL: https://www.mozilla.org/en-US/MPL/2.0/
 FOSS: yes
 
 Name: Common Public License
 Abbrev: CPL
 Version: 1.0
-FSF: free_and_GPLv3_incompatible (http://www.gnu.org/licenses/license-list.html#CommonPublicLicense10)
-OSI: open but superseded (http://opensource.org/licenses/cpl1.0)
-URL: http://www.eclipse.org/legal/cpl-v10.html
+FSF: free_and_GPLv3_incompatible (https://www.gnu.org/licenses/license-list.html#CommonPublicLicense10)
+OSI: open but superseded (https://opensource.org/licenses/cpl1.0)
+URL: https://www.eclipse.org/legal/cpl-v10.html
 FOSS: yes
 
 Name: Eclipse Public License
 Version: 1.0
 Abbrev: EPL
-FSF: free_and_GPLv3_incompatible (http://www.gnu.org/licenses/license-list.html#EPL)
-OSI: open (http://opensource.org/licenses/EPL-1.0)
-URL: http://www.eclipse.org/legal/epl-v10.html
+FSF: free_and_GPLv3_incompatible (https://www.gnu.org/licenses/license-list.html#EPL)
+OSI: open (https://opensource.org/licenses/EPL-1.0)
+URL: https://www.eclipse.org/legal/epl-v10.html
 FOSS: yes
 
 Name: Lucent Public License
 Version: 1.02
-FSF: free_and_GPLv3_incompatible (http://www.gnu.org/licenses/license-list.html#lucent102)
-OSI: open (http://opensource.org/licenses/LPL-1.02)
-URL: http://www.opensource.org/licenses/lucent1.02.php
+FSF: free_and_GPLv3_incompatible (https://www.gnu.org/licenses/license-list.html#lucent102)
+OSI: open (https://opensource.org/licenses/LPL-1.02)
+URL: https://opensource.org/licenses/lucent1.02.php
 FOSS: yes
 
 Name: European Union Public License
 Version: 1.1
 Abbrev: EUPL
-FSF: free_and_GPLv3_incompatible (http://www.gnu.org/licenses/license-list.html#EUPL)
-OSI: open (http://opensource.org/licenses/EUPL-1.1)
-URL: http://joinup.ec.europa.eu/software/page/eupl
+FSF: free_and_GPLv3_incompatible (https://www.gnu.org/licenses/license-list.html#EUPL)
+OSI: open (https://opensource.org/licenses/EUPL-1.1)
+URL: https://joinup.ec.europa.eu/software/page/eupl
 FOSS: yes
 
 Name: Creative Commons Attribution-ShareAlike 2.0 Generic License
 Abbrev: CC BY-SA 2.0
-FSF: free_and_GPLv3_incompatible (http://www.gnu.org/licenses/license-list.html#ccbysa)
-URL: http://creativecommons.org/licenses/by-sa/2.0
+FSF: free_and_GPLv3_incompatible (https://www.gnu.org/licenses/license-list.html#ccbysa)
+URL: https://creativecommons.org/licenses/by-sa/2.0
 FOSS: yes
 Extensible: yes
 Note: do not use: use CC BY-SA 4.0 instead
@@ -210,7 +210,7 @@ Note: do not use: use CC BY-SA 4.0 instead
 Name: Creative Commons Attribution 3.0 Unported License
 Abbrev: CC BY 3.0
 FSF: free_and_GPLv3_incompatible
-URL: http://creativecommons.org/licenses/by/3.0
+URL: https://creativecommons.org/licenses/by/3.0
 FOSS: yes
 Extensible: yes
 Note: do not use: use CC BY 4.0 instead
@@ -218,14 +218,14 @@ Note: do not use: use CC BY 4.0 instead
 Name: Creative Commons Attribution-ShareAlike 3.0 Unported License
 Abbrev: CC BY-SA 3.0
 FSF: free_and_GPLv3_incompatible
-URL: http://creativecommons.org/licenses/by-sa/3.0
+URL: https://creativecommons.org/licenses/by-sa/3.0
 FOSS: yes
 Extensible: yes
 Note: do not use: use CC BY-SA 4.0 instead
 
 Name: Creative Commons Attribution-NonCommercial 3.0 Unported License
 Abbrev: CC BY-NC 3.0
-URL: http://creativecommons.org/licenses/by-nc/3.0
+URL: https://creativecommons.org/licenses/by-nc/3.0
 FOSS: no
 Extensible: yes
 Restricts_use: yes
@@ -233,7 +233,7 @@ Note: do not use: use CC BY-NC 4.0 instead
 
 Name: Creative Commons Attribution-NonCommercial-NoDerivs 3.0 United States License
 Abbrev: CC BY-NC-ND 3.0 US
-URL: http://creativecommons.org/licenses/by-nc-nd/3.0/us
+URL: https://creativecommons.org/licenses/by-nc-nd/3.0/us
 FOSS: no
 Extensible: yes
 Restricts_use: yes
@@ -241,7 +241,7 @@ Note: do not use: use CC BY-NC-ND 4.0 instead
 
 Name: Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License
 Abbrev: CC BY-NC-SA 3.0
-URL: http://creativecommons.org/licenses/by-nc-sa/3.0
+URL: https://creativecommons.org/licenses/by-nc-sa/3.0
 FOSS: no
 Extensible: yes
 Restricts_use: yes
@@ -250,7 +250,7 @@ Note: do not use: use CC BY-NC-SA 4.0 instead
 Name: Creative Commons Attribution-ShareAlike 3.0 United States License
 Abbrev: CC BY-SA 3.0 US
 FSF: free_and_GPLv3_incompatible
-URL: http://creativecommons.org/licenses/by-sa/3.0/us/
+URL: https://creativecommons.org/licenses/by-sa/3.0/us/
 FOSS: yes
 Extensible: yes
 Note: do not use: use CC BY-SA 4.0 instead
@@ -258,62 +258,62 @@ Note: do not use: use CC BY-SA 4.0 instead
 Name: Creative Commons Attribution 4.0 International License
 Abbrev: CC BY 4.0
 FSF: free_and_GPLv3_incompatible
-URL: http://creativecommons.org/licenses/by/4.0
+URL: https://creativecommons.org/licenses/by/4.0
 FOSS: yes
 Extensible: yes
 
 Name: Creative Commons Attribution-ShareAlike 4.0 International License
 Abbrev: CC BY-SA 4.0
 FSF: free_and_GPLv3_incompatible
-URL: http://creativecommons.org/licenses/by-sa/4.0
+URL: https://creativecommons.org/licenses/by-sa/4.0
 FOSS: yes
 Extensible: yes
 
 Name: Creative Commons Attribution-NonCommercial 4.0 International License
 Abbrev: CC BY-NC 4.0
-URL: http://creativecommons.org/licenses/by-nc/4.0
+URL: https://creativecommons.org/licenses/by-nc/4.0
 FOSS: no
 Extensible: yes
 Restricts_use: yes
 
 Name: Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License
 Abbrev: CC BY-NC-SA 4.0
-URL: http://creativecommons.org/licenses/by-nc-sa/4.0
+URL: https://creativecommons.org/licenses/by-nc-sa/4.0
 FOSS: no
 Extensible: yes
 Restricts_use: yes
 
 Name: Creative Commons Attribution-NonCommercial-NoDerivs 4.0 International License
 Abbrev: CC BY-NC-ND 4.0
-URL: http://creativecommons.org/licenses/by-nc-nd/4.0
+URL: https://creativecommons.org/licenses/by-nc-nd/4.0
 FOSS: no
 Extensible: yes
 Restricts_use: yes
 
 Name: CC0
-FSF: free_and_GPLv3_compatible (http://www.gnu.org/licenses/license-list.html#CC0)
-OSI: NA (http://opensource.org/faq#cc-zero)
-URL: http://creativecommons.org/publicdomain/zero/1.0/legalcode
+FSF: free_and_GPLv3_compatible (https://www.gnu.org/licenses/license-list.html#CC0)
+OSI: NA (https://opensource.org/faq#cc-zero)
+URL: https://creativecommons.org/publicdomain/zero/1.0/legalcode
 FOSS: yes
 
 Name: zlib License
 Abbrev: Zlib
-FSF: free_and_GPLv3_compatible (http://www.gnu.org/licenses/license-list.html#ZLib)
-OSI: open (http://opensource.org/licenses/Zlib)
+FSF: free_and_GPLv3_compatible (https://www.gnu.org/licenses/license-list.html#ZLib)
+OSI: open (https://opensource.org/licenses/Zlib)
 URL: http://www.gzip.org/zlib/zlib_license.html
 FOSS: yes
 
 Name: Boost Software License
 Version: 1.0
 Abbrev: BSL
-FSF: free_and_GPLv3_compatible (http://www.gnu.org/licenses/license-list.html#boost)
-OSI: open (http://opensource.org/licenses/BSL-1.0)
+FSF: free_and_GPLv3_compatible (https://www.gnu.org/licenses/license-list.html#boost)
+OSI: open (https://opensource.org/licenses/BSL-1.0)
 URL: http://www.boost.org/LICENSE_1_0.txt
 FOSS: yes
 
 Name: ACM Software License Agreement
 Version: 1998
 Abbrev: ACM
-URL: http://www.acm.org/publications/policies/softwarecrnotice
+URL: https://www.acm.org/publications/policies/software-copyright-notice
 FOSS: no
 Restricts_use: yes
diff --git a/share/make/basepkg.mk b/share/make/basepkg.mk
index fbea541..4c808f5 100644
--- a/share/make/basepkg.mk
+++ b/share/make/basepkg.mk
@@ -85,15 +85,25 @@ mkRbase:
 
 mkdesc:
 	@if test -f DESCRIPTION; then \
+	  if test "$(PKG_BUILT_STAMP)" != ""; then \
+	    $(ECHO) "tools:::.install_package_description('.', '$(top_builddir)/library/${pkg}', '$(PKG_BUILT_STAMP)')" | \
+	    R_DEFAULT_PACKAGES=NULL $(R_EXE) > /dev/null ; \
+	  else \
 	  $(ECHO) "tools:::.install_package_description('.', '$(top_builddir)/library/${pkg}')" | \
 	  R_DEFAULT_PACKAGES=NULL $(R_EXE) > /dev/null ; \
+	  fi; \
 	fi
 
 ## for base and tools
 mkdesc2:
 	@$(INSTALL_DATA) DESCRIPTION $(top_builddir)/library/$(pkg)
-	@$(ECHO) "Built: R $(VERSION); ; `TZ=UTC date`; $(R_OSTYPE)" \
-	   >> $(top_builddir)/library/$(pkg)/DESCRIPTION
+	@if test "$(PKG_BUILT_STAMP)" != ""; then \
+	  $(ECHO) "Built: R $(VERSION); ; $(PKG_BUILT_STAMP); $(R_OSTYPE)" \
+	     >> $(top_builddir)/library/$(pkg)/DESCRIPTION ; \
+	else \
+	  $(ECHO) "Built: R $(VERSION); ; `TZ=UTC date`; $(R_OSTYPE)" \
+	     >> $(top_builddir)/library/$(pkg)/DESCRIPTION ; \
+	fi
 
 mkdemos:
 	@$(ECHO) "tools:::.install_package_demos('$(srcdir)', '$(top_builddir)/library/$(pkg)')" | \
@@ -133,9 +143,15 @@ mksrc:
 
 mksrc-win2:
 	@if test -d src; then \
-	  (cd src && $(MAKE) -f Makefile.win) || exit 1; \
+	  (cd src && $(MAKE) -f Makefile.win EXT_LIBS="$(EXT_LIBS)") || exit 1; \
 	fi
 
+sysdata: $(srcdir)/R/sysdata.rda
+	@$(ECHO) "installing 'sysdata.rda'"
+	@$(ECHO) "tools:::sysdata2LazyLoadDB(\"$(srcdir)/R/sysdata.rda\",\"$(top_builddir)/library/$(pkg)/R\")" | \
+	  R_DEFAULT_PACKAGES=NULL LC_ALL=C $(R_EXE)
+
+
 ## install man/figures: currently only used for graphics
 mkfigs:
 	@if test -d  $(srcdir)/man/figures; then \
diff --git a/share/make/check_vars_out.mk b/share/make/check_vars_out.mk
index bd67f73..d6ceb86 100644
--- a/share/make/check_vars_out.mk
+++ b/share/make/check_vars_out.mk
@@ -5,7 +5,7 @@
 ##                sprintf("\t at echo %sFLAGS: \"$(%sFLAGS)\"",
 ##                        prefixes, prefixes)))
 
-all:
+makevars_test:
 	@echo PKG_CPPFLAGS: "$(PKG_CPPFLAGS)"
 	@echo PKG_CFLAGS: "$(PKG_CFLAGS)"
 	@echo PKG_CXXFLAGS: "$(PKG_CXXFLAGS)"
diff --git a/share/make/config.mk b/share/make/config.mk
index 5b558d1..0298da4 100644
--- a/share/make/config.mk
+++ b/share/make/config.mk
@@ -1,3 +1,6 @@
 print: FORCE
 	@echo $($(VAR))
 FORCE:
+
+print-name-and-value: FORCE
+	@echo $(VAR) = $($(VAR))
diff --git a/share/make/lazycomp.mk b/share/make/lazycomp.mk
index ac6c429..0b71aa5 100644
--- a/share/make/lazycomp.mk
+++ b/share/make/lazycomp.mk
@@ -3,6 +3,7 @@
 
 .PHONY: Rsimple Rlazy Rlazycomp
 
+## Note that R_COMPILER_SUPPRESS_ALL is now on by default
 $(top_builddir)/library/$(pkg)/R/$(pkg).rdb: all.R
 	@$(INSTALL_DATA) all.R $(top_builddir)/library/$(pkg)/R/$(pkg)
 	@if test -n "$(R_NO_BASE_COMPILE)"; then \
@@ -11,7 +12,7 @@ $(top_builddir)/library/$(pkg)/R/$(pkg).rdb: all.R
 	else \
 	 $(ECHO) "byte-compiling package '$(pkg)'"; \
 	 $(ECHO) "tools:::makeLazyLoading(\"$(pkg)\")" | \
-	  R_COMPILE_PKGS=1 R_COMPILER_SUPPRESS_ALL=1 \
+	  _R_COMPILE_PKGS_=1 R_COMPILER_SUPPRESS_ALL=1 \
 	  R_DEFAULT_PACKAGES=$(DEFPKGS) LC_ALL=C $(R_EXE) > /dev/null; \
 	fi
 
diff --git a/share/make/winshlib.mk b/share/make/winshlib.mk
index 53727c8..15e5352 100644
--- a/share/make/winshlib.mk
+++ b/share/make/winshlib.mk
@@ -4,6 +4,8 @@ all: $(SHLIB)
 
 BASE = $(shell basename $(SHLIB) .dll)
 
+ADDQU = 's/[^ ][^ ]*/"&"/g'
+
 ## do it with explicit rules as packages might add dependencies to this target
 ## (attempts to do this GNUishly failed for parallel makes,
 ## but we do want the link targets echoed)
@@ -14,7 +16,7 @@ $(SHLIB): $(OBJECTS)
 	    $(SHLIB_LD) -shared $(DLLFLAGS) -o $@ $(BASE)-win.def $(OBJECTS) $(ALL_LIBS); \
 	  else \
 	    echo EXPORTS > tmp.def; \
-	    $(NM) $^ | $(SED) -n $(SYMPAT) $(NM_FILTER) >> tmp.def; \
+	    $(NM) $^ | $(SED) -n $(SYMPAT) $(NM_FILTER) | $(SED) $(ADDQU)  >> tmp.def; \
 	    echo $(SHLIB_LD) -shared $(DLLFLAGS) -o $@ tmp.def $(OBJECTS) $(ALL_LIBS); \
 	    $(SHLIB_LD) -shared $(DLLFLAGS) -o $@ tmp.def $(OBJECTS) $(ALL_LIBS); \
 	    $(RM) tmp.def; \
diff --git a/share/texmf/bibtex/bib/RJournal.bib b/share/texmf/bibtex/bib/RJournal.bib
index 5658949..0142f6b 100644
--- a/share/texmf/bibtex/bib/RJournal.bib
+++ b/share/texmf/bibtex/bib/RJournal.bib
@@ -2,2214 +2,4641 @@
 
 
 
-
-
- at Article{ oh:,
-  author       = { Jimmy Oh },
-  title        = { Automatic Conversion of Tables to LongForm Dataframes },
-  journal      = { The R Journal },
-  year         = {  },
-  volume       = {  },
-  number       = {  },
-  pages        = {  },
-  month        = ,
-  url          = { http://journal.r-project.org/archive/-/oh.pdf }
-
-
-
- at Article{ zhang-etal:,
-  author       = { Jonathan Zhang and Nancy Heckman and Davor Cubranic and Joel G. Kingsolver and Travis Gaydos },
-  title        = { Prinsimp },
-  journal      = { The R Journal },
-  year         = {  },
-  volume       = {  },
-  number       = {  },
-  pages        = {  },
-  month        = ,
-  url          = { http://journal.r-project.org/archive/-/zhang-etal.pdf }
-
-
-
- at Article{ grayling:,
-  author       = { Michael J. Grayling },
-  title        = { phaseR: An R Package for Phase Plane Analysis of Autonomous ODE Systems },
-  journal      = { The R Journal },
-  year         = {  },
-  volume       = {  },
-  number       = {  },
-  pages        = {  },
-  month        = ,
-  url          = { http://journal.r-project.org/archive/-/grayling.pdf }
-
-
-
- at Article{ alden-read-andrews-etal:,
-  author       = { Kieran Alden and Mark Read and Paul Andrews and Jon Timmis and Mark Coles },
-  title        = { Applying spartan to Understand Parameter Uncertainty in Simulations },
-  journal      = { The R Journal },
-  year         = {  },
-  volume       = {  },
-  number       = {  },
-  pages        = {  },
-  month        = ,
-  url          = { http://journal.r-project.org/archive/-/alden-read-andrews-etal.pdf }
-
-
-
- at Article{ gesmann-tsanakas:,
-  author       = { Markus Gesmann and Andreas Tsanakas },
-  title        = { Conference Report: R in Insurance 2014 },
-  journal      = { The R Journal },
-  year         = {  },
-  volume       = {  },
-  number       = {  },
-  pages        = {  },
-  month        = ,
-  url          = { http://journal.r-project.org/archive/-/gesmann-tsanakas.pdf }
-
-
-
- at Article{ RJournal:2009-1:Chambers,
-  author       = {John M. Chambers},
-  title        = {{Facets of R}},
-  journal      = {The R Journal},
-  year         = 2009,
-  volume       = 1,
-  number       = 1,
-  pages        = {5--8},
-  month        = jun,
-  url          = {http://journal.r-project.org/archive/2009-1/RJournal_2009-1_Chambers.pdf}
-}
-
-
-
- at Article{ RJournal:2009-1:Theussl+Zeileis,
-  author       = {Stefan Theu\ss{}l and Achim Zeileis}, 
-  title        = {{Collaborative Software Development Using R-Forge}},
-  journal      = {The R Journal},
-  year         = 2009,
-  volume       = 1,
-  number       = 1,
-  pages        = {9--14},
-  month        = jun,
-  url          = {http://journal.r-project.org/archive/2009-1/RJournal_2009-1_Theussl+Zeileis.pdf}
-}
-
-
-
- at Article{ RJournal:2009-1:Murrell,
-  author       = {Paul Murrell},
-  title        = {{Drawing Diagrams with R}},
-  journal      = {The R Journal},
-  year         = 2009,
-  volume       = 1,
-  number       = 1,
-  pages        = {15--21},
-  month        = jun,
-  url          = {http://journal.r-project.org/archive/2009-1/RJournal_2009-1_Murrell.pdf}
-}
-
-
-
- at Article{ RJournal:2009-1:Pau+Huber,
-  author       = {Gregoire Pau and Wolfgang Huber},
-  title        = {{The hwriter Package}},
-  journal      = {The R Journal},
-  year         = 2009,
-  volume       = 1,
-  number       = 1,
-  pages        = {22--24},
-  month        = jun,
-  url          = {http://journal.r-project.org/archive/2009-1/RJournal_2009-1_Pau+Huber.pdf}
-}
-
-
-
- at Article{ RJournal:2009-1:Ardia+et+al,
-  author       = {Lennart F. Hoogerheide David Ardia and Herman K. van Dijk},
-  title        = {{AdMit: Adaptive Mixtures of Student-$t$ Distributions}},
-  journal      = {The R Journal},
-  year         = 2009,
-  volume       = 1,
-  number       = 1,
-  pages        = {25--30},
-  month        = jun,
-  url          = {http://journal.r-project.org/archive/2009-1/RJournal_2009-1_Ardia+et+al.pdf}
-}
-
-
-
- at Article{ RJournal:2009-1:Goulet+et+al,
-  author       = {Michel Jacques Vincent Goulet and Mathieu Pigeon},
-  title        = {{expert: Modeling Without Data Using Expert Opinion}},
-  journal      = {The R Journal},
-  year         = 2009,
-  volume       = 1,
-  number       = 1,
-  pages        = {31--36},
-  month        = jun,
-  url          = {http://journal.r-project.org/archive/2009-1/RJournal_2009-1_Goulet+et+al.pdf}
-}
-
-
-
- at Article{ RJournal:2009-1:Mi+et+al,
-  author       = {Tetsuhisa Miwa Xuefei Mi and Torsten Hothorn},
-  title        = {{mvtnorm: New Numerical Algorithm for Multivariate Normal
-Probabilities}},
-  journal      = {The R Journal},
-  year         = 2009,
-  volume       = 1,
-  number       = 1,
-  pages        = {37--39},
-  month        = jun,
-  url          = {http://journal.r-project.org/archive/2009-1/RJournal_2009-1_Mi+et+al.pdf}
-}
-
-
-
- at Article{ RJournal:2009-1:Kim+Oh,
-  author       = {Donghoh Kim and Hee-Seok Oh},
-  title        = {{EMD: A Package for Empirical Mode Decomposition and Hilbert
-Spectrum}},
-  journal      = {The R Journal},
-  year         = 2009,
-  volume       = 1,
-  number       = 1,
-  pages        = {40--46},
-  month        = jun,
-  url          = {http://journal.r-project.org/archive/2009-1/RJournal_2009-1_Kim+Oh.pdf}
-}
-
-
-
- at Article{ RJournal:2009-1:Orr+Liu,
-  author       = {Megan Orr and Peng Liu},
-  title        = {{Sample Size Estimation while Controlling False Discovery
-Rate for Microarray Experiments Using the ssize.fdr Package}},
-  journal      = {The R Journal},
-  year         = 2009,
-  volume       = 1,
-  number       = 1,
-  pages        = {47--53},
-  month        = jun,
-  url          = {http://journal.r-project.org/archive/2009-1/RJournal_2009-1_Orr+Liu.pdf}
-}
-
-
-
- at Article{ RJournal:2009-1:Knaus+et+al,
-  author       = {Christine Porzelius and Harald Binder Jochen Knaus and Guido Schwarzer},
-  title        = {{Easier Parallel Computing in R with snowfall and sfCluster}},
-  journal      = {The R Journal},
-  year         = 2009,
-  volume       = 1,
-  number       = 1,
-  pages        = {54--59},
-  month        = jun,
-  url          = {http://journal.r-project.org/archive/2009-1/RJournal_2009-1_Knaus+et+al.pdf}
-}
-
-
-
- at Article{ RJournal:2009-1:Guazzelli+et+al,
-  author       = {Michael Zeller and Wen-Ching Lin Alex Guazzelli and Graham Williams},
-  title        = {{PMML: An Open Standard for Sharing Models}},
-  journal      = {The R Journal},
-  year         = 2009,
-  volume       = 1,
-  number       = 1,
-  pages        = {60--65},
-  month        = jun,
-  url          = {http://journal.r-project.org/archive/2009-1/RJournal_2009-1_Guazzelli+et+al.pdf}
-}
-
-
-
- at Article{ RJournal:2009-2:Fox,
-  author       = {John Fox},
-  title        = {{Aspects of the Social Organization and Trajectory of the R
-Project}},
-  journal      = {The R Journal},
-  year         = 2009,
-  volume       = 1,
-  number       = 2,
-  pages        = {5--13},
-  month        = dec,
-  url          = {http://journal.r-project.org/archive/2009-2/RJournal_2009-2_Fox.pdf}
-}
-
-
-
- at Article{ RJournal:2009-2:Strobl~et~al,
-  author       = {Carolin Strobl and Torsten Hothorn and Achim Zeileis},
-  title        = {{Party on!}},
-  journal      = {The R Journal},
-  year         = 2009,
-  volume       = 1,
-  number       = 2,
-  pages        = {14--17},
-  month        = dec,
-  url          = {http://journal.r-project.org/archive/2009-2/RJournal_2009-2_Strobl~et~al.pdf}
-}
-
-
-
- at Article{ RJournal:2009-2:Lafaye~de-Micheaux+Liquet,
-  author       = {Pierre Lafaye de Micheaux and Benoit Liquet},
-  title        = {{ConvergenceConcepts : an R Package to
-Investigate-Various-Modes-of-Convergence}},
-  journal      = {The R Journal},
-  year         = 2009,
-  volume       = 1,
-  number       = 2,
-  pages        = {18--25},
-  month        = dec,
-  url          = {http://journal.r-project.org/archive/2009-2/RJournal_2009-2_Lafaye~de-Micheaux+Liquet.pdf}
-}
-
-
-
- at Article{ RJournal:2009-2:Coeurjolly~et~al,
-  author       = {J. F. Coeurjolly and R. Drouilhet and P. Lafaye de Micheaux and J. F. Robineau},
-  title        = {{asympTest: A Simple R Package for Classical Parametric
-Statistical Tests and Confidence Intervals in Large Samples}},
-  journal      = {The R Journal},
-  year         = 2009,
-  volume       = 1,
-  number       = 2,
-  pages        = {26--30},
-  month        = dec,
-  url          = {http://journal.r-project.org/archive/2009-2/RJournal_2009-2_Coeurjolly~et~al.pdf}
-}
-
-
-
- at Article{ RJournal:2009-2:Carpenter~et~al,
-  author       = {J. Carpenter and G. Rücker and G. Schwarzer},
-  title        = {{copas: An R package for Fitting the Copas Selection Model}},
-  journal      = {The R Journal},
-  year         = 2009,
-  volume       = 1,
-  number       = 2,
-  pages        = {31--36},
-  month        = dec,
-  url          = {http://journal.r-project.org/archive/2009-2/RJournal_2009-2_Carpenter~et~al.pdf}
-}
-
-
-
- at Article{ RJournal:2009-2:Damico,
-  author       = {Anthony Damico},
-  title        = {{Transitioning to R: Replicating SAS, Stata, and SUDAAN
-Analysis Techniques in Health Policy Data}},
-  journal      = {The R Journal},
-  year         = 2009,
-  volume       = 1,
-  number       = 2,
-  pages        = {37--44},
-  month        = dec,
-  url          = {http://journal.r-project.org/archive/2009-2/RJournal_2009-2_Damico.pdf}
-}
-
-
-
- at Article{ RJournal:2009-2:Williams,
-  author       = {Graham J Williams},
-  title        = {{Rattle: A Data Mining GUI for R}},
-  journal      = {The R Journal},
-  year         = 2009,
-  volume       = 1,
-  number       = 2,
-  pages        = {45--55},
-  month        = dec,
-  url          = {http://journal.r-project.org/archive/2009-2/RJournal_2009-2_Williams.pdf}
-}
-
-
-
- at Article{ RJournal:2009-2:Graves~et~al,
-  author       = {Spencer Graves and Sundar Dorai-Raj and Romain François},
-  title        = {{sos: Searching Help Pages of R Packages}},
-  journal      = {The R Journal},
-  year         = 2009,
-  volume       = 1,
-  number       = 2,
-  pages        = {56--59},
-  month        = dec,
-  url          = {http://journal.r-project.org/archive/2009-2/RJournal_2009-2_Graves~et~al.pdf}
-}
-
-
-
- at Article{ RJournal:2009-2:Murdoch+Urbanek,
-  author       = {Duncan Murdoch and Simon Urbanek},
-  title        = {{The New R Help System}},
-  journal      = {The R Journal},
-  year         = 2009,
-  volume       = 1,
-  number       = 2,
-  pages        = {60--65},
-  month        = dec,
-  url          = {http://journal.r-project.org/archive/2009-2/RJournal_2009-2_Murdoch+Urbanek.pdf}
-}
-
-
-
- at Article{ RJournal:2010-1:Pramana~et~al,
-  author       = {Setia Pramana and Dan Lin and Philippe Haldermans and Ziv Shkedy and Tobias Verbeke and Hinrich Göhlmann and An De Bondt and Willem Talloen and Luc Bijnens.},
-  title        = {{IsoGene: An R Package for Analyzing Dose-response Studies
-in Microarray Experiments}},
-  journal      = {The R Journal},
-  year         = 2010,
-  volume       = 2,
-  number       = 1,
-  pages        = {5--12},
-  month        = jun,
-  url          = {http://journal.r-project.org/archive/2010-1/RJournal_2010-1_Pramana~et~al.pdf}
-}
-
-
-
- at Article{ RJournal:2010-1:Brown+Zhou,
-  author       = {Patrick Brown and Lutong Zhou},
-  title        = {{MCMC for Generalized Linear Mixed Models with glmmBUGS}},
-  journal      = {The R Journal},
-  year         = 2010,
-  volume       = 2,
-  number       = 1,
-  pages        = {13--17},
-  month        = jun,
-  url          = {http://journal.r-project.org/archive/2010-1/RJournal_2010-1_Brown+Zhou.pdf}
-}
-
-
-
- at Article{ RJournal:2010-1:Weidmann+Skrede~Gleditsch,
-  author       = {Nils B. Weidmann and Kristian Skrede Gleditsch},
-  title        = {{Mapping and Measuring Country Shapes}},
-  journal      = {The R Journal},
-  year         = 2010,
-  volume       = 2,
-  number       = 1,
-  pages        = {18--24},
-  month        = jun,
-  url          = {http://journal.r-project.org/archive/2010-1/RJournal_2010-1_Weidmann+Skrede~Gleditsch.pdf}
-}
-
-
-
- at Article{ RJournal:2010-1:Wilhelm+Manjunath,
-  author       = {Stefan Wilhelm and B. G. Manjunath},
-  title        = {{tmvtnorm: A Package for the Truncated Multivariate Normal
-Distribution}},
-  journal      = {The R Journal},
-  year         = 2010,
-  volume       = 2,
-  number       = 1,
-  pages        = {25--29},
-  month        = jun,
-  url          = {http://journal.r-project.org/archive/2010-1/RJournal_2010-1_Wilhelm+Manjunath.pdf}
-}
-
-
-
- at Article{ RJournal:2010-1:Guenther+Fritsch,
-  author       = {Frauke Günther and Stefan Fritsch},
-  title        = {{neuralnet: Training of neural networks}},
-  journal      = {The R Journal},
-  year         = 2010,
-  volume       = 2,
-  number       = 1,
-  pages        = {30--38},
-  month        = jun,
-  url          = {http://journal.r-project.org/archive/2010-1/RJournal_2010-1_Guenther+Fritsch.pdf}
-}
-
-
-
- at Article{ RJournal:2010-1:Werft+Benner,
-  author       = {Wiebke Werft and Axel Benner},
-  title        = {{glmperm: A Permutation of Regressor Residuals Test for
-Inference in Generalized Linear Models}},
-  journal      = {The R Journal},
-  year         = 2010,
-  volume       = 2,
-  number       = 1,
-  pages        = {39--43},
-  month        = jun,
-  url          = {http://journal.r-project.org/archive/2010-1/RJournal_2010-1_Werft+Benner.pdf}
-}
-
-
-
- at Article{ RJournal:2010-1:Thioulouse~et~al,
-  author       = {Jean Thioulouse and Claire Valiente-Moro and Lionel Zenner},
-  title        = {{Online Reproducible Research: An Application to
-Multivariate Analysis of Bacterial DNA Fingerprint Data}},
-  journal      = {The R Journal},
-  year         = 2010,
-  volume       = 2,
-  number       = 1,
-  pages        = {44--52},
-  month        = jun,
-  url          = {http://journal.r-project.org/archive/2010-1/RJournal_2010-1_Thioulouse~et~al.pdf}
-}
-
-
-
- at Article{ RJournal:2010-1:Fay,
-  author       = {Michael P. Fay},
-  title        = {{Two-sided Exact Tests and Matching Confidence Intervals for
-Discrete Data}},
-  journal      = {The R Journal},
-  year         = 2010,
-  volume       = 2,
-  number       = 1,
-  pages        = {53--58},
-  month        = jun,
-  url          = {http://journal.r-project.org/archive/2010-1/RJournal_2010-1_Fay.pdf}
-}
-
-
-
- at Article{ RJournal:2010-2:Soetaert~et~al,
-  author       = {Karline Soetaert and Thomas Petzoldt and R. Woodrow Setzer},
-  title        = {{Solving Differential Equations in R}},
-  journal      = {The R Journal},
-  year         = 2010,
-  volume       = 2,
-  number       = 2,
-  pages        = {5--15},
-  month        = dec,
-  url          = {http://journal.r-project.org/archive/2010-2/RJournal_2010-2_Soetaert~et~al.pdf}
-}
-
-
-
- at Article{ RJournal:2010-2:Murdoch,
-  author       = {Duncan Murdoch},
-  title        = {{Source References}},
-  journal      = {The R Journal},
-  year         = 2010,
-  volume       = 2,
-  number       = 2,
-  pages        = {16--19},
-  month        = dec,
-  url          = {http://journal.r-project.org/archive/2010-2/RJournal_2010-2_Murdoch.pdf}
-}
-
-
-
- at Article{ RJournal:2010-2:Roennegaard~et~al,
-  author       = {Lars Rönnegård and Xia Shen and Moudud Alam},
-  title        = {{hglm: A Package for Fitting Hierarchical Generalized Linear
-Models}},
-  journal      = {The R Journal},
-  year         = 2010,
-  volume       = 2,
-  number       = 2,
-  pages        = {20--28},
-  month        = dec,
-  url          = {http://journal.r-project.org/archive/2010-2/RJournal_2010-2_Roennegaard~et~al.pdf}
-}
-
-
-
- at Article{ RJournal:2010-2:Solymos,
-  author       = {Péter Sólymos},
-  title        = {{dclone: Data Cloning in R}},
-  journal      = {The R Journal},
-  year         = 2010,
-  volume       = 2,
-  number       = 2,
-  pages        = {29--37},
-  month        = dec,
-  url          = {http://journal.r-project.org/archive/2010-2/RJournal_2010-2_Solymos.pdf}
-}
-
-
-
- at Article{ RJournal:2010-2:Wickham,
-  author       = {Hadley Wickham},
-  title        = {{stringr: modern, consistent string processing}},
-  journal      = {The R Journal},
-  year         = 2010,
-  volume       = 2,
-  number       = 2,
-  pages        = {38--40},
-  month        = dec,
-  url          = {http://journal.r-project.org/archive/2010-2/RJournal_2010-2_Wickham.pdf}
-}
-
-
-
- at Article{ RJournal:2010-2:Ardia+Hoogerheide,
-  author       = {David Ardia and Lennart F. Hoogerheide},
-  title        = {{Bayesian Estimation of the GARCH(1,1) Model with Student-t
-Innovations}},
-  journal      = {The R Journal},
-  year         = 2010,
-  volume       = 2,
-  number       = 2,
-  pages        = {41--47},
-  month        = dec,
-  url          = {http://journal.r-project.org/archive/2010-2/RJournal_2010-2_Ardia+Hoogerheide.pdf}
-}
-
-
-
- at Article{ RJournal:2010-2:Ferreira~da-Silva,
-  author       = {Adelino Ferreira da Silva},
-  title        = {{cudaBayesreg: Bayesian Computation in CUDA}},
-  journal      = {The R Journal},
-  year         = 2010,
-  volume       = 2,
-  number       = 2,
-  pages        = {48--55},
-  month        = dec,
-  url          = {http://journal.r-project.org/archive/2010-2/RJournal_2010-2_Ferreira~da-Silva.pdf}
-}
-
-
-
- at Article{ RJournal:2010-2:Bilder~et~al,
-  author       = {Christopher R. Bilder and Boan Zhang and Frank Schaarschmidt and Joshua M. Tebbs},
-  title        = {{binGroup: A Package for Group Testing}},
-  journal      = {The R Journal},
-  year         = 2010,
-  volume       = 2,
-  number       = 2,
-  pages        = {56--60},
-  month        = dec,
-  url          = {http://journal.r-project.org/archive/2010-2/RJournal_2010-2_Bilder~et~al.pdf}
-}
-
-
-
- at Article{ RJournal:2010-2:Sariyar+Borg,
-  author       = {Murat Sariyar and Andreas Borg},
-  title        = {{The RecordLinkage Package: Detecting Errors in Data}},
-  journal      = {The R Journal},
-  year         = 2010,
-  volume       = 2,
-  number       = 2,
-  pages        = {61--67},
-  month        = dec,
-  url          = {http://journal.r-project.org/archive/2010-2/RJournal_2010-2_Sariyar+Borg.pdf}
-}
-
-
-
- at Article{ RJournal:2010-2:Ishwaran~et~al,
-  author       = {Hemant Ishwaran and Udaya B. Kogalur and J. Sunil Rao},
-  title        = {{spikeslab: Prediction and Variable Selection Using Spike
-and Slab Regression}},
-  journal      = {The R Journal},
-  year         = 2010,
-  volume       = 2,
-  number       = 2,
-  pages        = {68--73},
-  month        = dec,
-  url          = {http://journal.r-project.org/archive/2010-2/RJournal_2010-2_Ishwaran~et~al.pdf}
-}
-
-
-
- at Article{ RJournal:2011-1:Wickham,
-  author       = {Hadley Wickham},
-  title        = {{testthat: Get Started with Testing}},
-  journal      = {The R Journal},
-  year         = 2011,
-  volume       = 3,
-  number       = 1,
-  pages        = {5--10},
-  month        = jun,
-  url          = {http://journal.r-project.org/archive/2011-1/RJournal_2011-1_Wickham.pdf}
-}
-
-
-
- at Article{ RJournal:2011-1:Bohn~et~al,
-  author       = {Angela Bohn and Ingo Feinerer and Kurt Hornik and Patrick Mair},
-  title        = {{Content-Based Social Network Analysis of Mailing Lists}},
-  journal      = {The R Journal},
-  year         = 2011,
-  volume       = 3,
-  number       = 1,
-  pages        = {11--18},
-  month        = jun,
-  url          = {http://journal.r-project.org/archive/2011-1/RJournal_2011-1_Bohn~et~al.pdf}
-}
-
-
-
- at Article{ RJournal:2011-1:Chalabi~et~al,
-  author       = {Yohan Chalabi and Martin Mächler and Diethelm Würtz},
-  title        = {{Rmetrics - timeDate Package}},
-  journal      = {The R Journal},
-  year         = 2011,
-  volume       = 3,
-  number       = 1,
-  pages        = {19--24},
-  month        = jun,
-  url          = {http://journal.r-project.org/archive/2011-1/RJournal_2011-1_Chalabi~et~al.pdf}
-}
-
-
-
- at Article{ RJournal:2011-1:Poisot,
-  author       = {Timothée Poisot},
-  title        = {{The digitize Package: Extracting Numerical Data from
-Scatterplots}},
-  journal      = {The R Journal},
-  year         = 2011,
-  volume       = 3,
-  number       = 1,
-  pages        = {25--26},
-  month        = jun,
-  url          = {http://journal.r-project.org/archive/2011-1/RJournal_2011-1_Poisot.pdf}
-}
-
-
-
- at Article{ RJournal:2011-1:Ardia~et~al,
-  author       = {David Ardia and Kris Boudt and Peter Carl and Katharine M. Mullen and Brian G. Peterson},
-  title        = {{Differential Evolution with DEoptim}},
-  journal      = {The R Journal},
-  year         = 2011,
-  volume       = 3,
-  number       = 1,
-  pages        = {27--34},
-  month        = jun,
-  url          = {http://journal.r-project.org/archive/2011-1/RJournal_2011-1_Ardia~et~al.pdf}
-}
-
-
-
- at Article{ RJournal:2011-1:South,
-  author       = {Andy South},
-  title        = {{rworldmap: A New R package for Mapping Global Data}},
-  journal      = {The R Journal},
-  year         = 2011,
-  volume       = 3,
-  number       = 1,
-  pages        = {35--43},
-  month        = jun,
-  url          = {http://journal.r-project.org/archive/2011-1/RJournal_2011-1_South.pdf}
-}
-
-
-
- at Article{ RJournal:2011-1:Lafitte~et~al,
-  author       = {Frédéric Lafitte and Dirk Van Heule and Julien Van hamme},
-  title        = {{Cryptographic Boolean Functions with R}},
-  journal      = {The R Journal},
-  year         = 2011,
-  volume       = 3,
-  number       = 1,
-  pages        = {44--47},
-  month        = jun,
-  url          = {http://journal.r-project.org/archive/2011-1/RJournal_2011-1_Lafitte~et~al.pdf}
-}
-
-
-
- at Article{ RJournal:2011-1:Murrell,
-  author       = {Paul Murrell},
-  title        = {{Raster Images in R Graphics}},
-  journal      = {The R Journal},
-  year         = 2011,
-  volume       = 3,
-  number       = 1,
-  pages        = {48--54},
-  month        = jun,
-  url          = {http://journal.r-project.org/archive/2011-1/RJournal_2011-1_Murrell.pdf}
-}
-
-
-
- at Article{ RJournal:2011-1:Fraley~et~al,
-  author       = {Chris Fraley and Adrian Raftery and Tilmann Gneiting and McLean Sloughter and Veronica Berrocal},
-  title        = {{Probabilistic Weather Forecasting in R}},
-  journal      = {The R Journal},
-  year         = 2011,
-  volume       = 3,
-  number       = 1,
-  pages        = {55--63},
-  month        = jun,
-  url          = {http://journal.r-project.org/archive/2011-1/RJournal_2011-1_Fraley~et~al.pdf}
-}
-
-
-
- at Article{ RJournal:2011-1:Kane~et~al,
-  author       = {David Kane and Andrew Liu and Khanh Nguyen},
-  title        = {{Analyzing an Electronic Limit Order Book}},
-  journal      = {The R Journal},
-  year         = 2011,
-  volume       = 3,
-  number       = 1,
-  pages        = {64--68},
-  month        = jun,
-  url          = {http://journal.r-project.org/archive/2011-1/RJournal_2011-1_Kane~et~al.pdf}
-}
-
-
-
- at Article{ RJournal:2011-1:Hyndman,
-  author       = {Rob J. Hyndman},
-  title        = {{Giving a useR! Talk}},
-  journal      = {The R Journal},
-  year         = 2011,
-  volume       = 3,
-  number       = 1,
-  pages        = {69--71},
-  month        = jun,
-  url          = {http://journal.r-project.org/archive/2011-1/RJournal_2011-1_Hyndman.pdf}
-}
-
-
-
- at Article{ RJournal:2011-1:Cook,
-  author       = {Dianne Cook},
-  title        = {{Tips for Presenting Your Work}},
-  journal      = {The R Journal},
-  year         = 2011,
-  volume       = 3,
-  number       = 1,
-  pages        = {72--74},
-  month        = jun,
-  url          = {http://journal.r-project.org/archive/2011-1/RJournal_2011-1_Cook.pdf}
-}
-
-
-
- at Article{ RJournal:2011-2:Baier~et~al,
-  author       = {Thomas Baier and Erich Neuwirth and Michele De Meo},
-  title        = {{Creating and Deploying an Application with (R)Excel and R}},
-  journal      = {The R Journal},
-  year         = 2011,
-  volume       = 3,
-  number       = 2,
-  pages        = {5--11},
-  month        = dec,
-  url          = {http://journal.r-project.org/archive/2011-2/RJournal_2011-2_Baier~et~al.pdf}
-}
-
-
-
- at Article{ RJournal:2011-2:Marschner,
-  author       = {Ian C. Marschner},
-  title        = {{glm2: Fitting Generalized Linear Models with Convergence
-Problems}},
-  journal      = {The R Journal},
-  year         = 2011,
-  volume       = 3,
-  number       = 2,
-  pages        = {12--15},
-  month        = dec,
-  url          = {http://journal.r-project.org/archive/2011-2/RJournal_2011-2_Marschner.pdf}
-}
-
-
-
- at Article{ RJournal:2011-2:Lundholm,
-  author       = {Michael Lundholm},
-  title        = {{Implementing the Compendium Concept with Sweave and
-DOCSTRIP}},
-  journal      = {The R Journal},
-  year         = 2011,
-  volume       = 3,
-  number       = 2,
-  pages        = {16--21},
-  month        = dec,
-  url          = {http://journal.r-project.org/archive/2011-2/RJournal_2011-2_Lundholm.pdf}
-}
-
-
-
- at Article{ RJournal:2011-2:Hornik+Murdoch,
-  author       = {Kurt Hornik and Duncan Murdoch},
-  title        = {{Watch Your Spelling!}},
-  journal      = {The R Journal},
-  year         = 2011,
-  volume       = 3,
-  number       = 2,
-  pages        = {22--28},
-  month        = dec,
-  url          = {http://journal.r-project.org/archive/2011-2/RJournal_2011-2_Hornik+Murdoch.pdf}
-}
-
-
-
- at Article{ RJournal:2011-2:Wang+Song,
-  author       = {Haizhou Wang and Mingzhou Song},
-  title        = {{Ckmeans.1d.dp: Optimal $k$-means Clustering in One
-Dimension by Dynamic Programming}},
-  journal      = {The R Journal},
-  year         = 2011,
-  volume       = 3,
-  number       = 2,
-  pages        = {29--33},
-  month        = dec,
-  url          = {http://journal.r-project.org/archive/2011-2/RJournal_2011-2_Wang+Song.pdf}
-}
-
-
-
- at Article{ RJournal:2011-2:Arnold+Emerson,
-  author       = {Taylor B. Arnold and John W. Emerson},
-  title        = {{Nonparametric Goodness-of-Fit Tests for Discrete Null
-Distributions}},
-  journal      = {The R Journal},
-  year         = 2011,
-  volume       = 3,
-  number       = 2,
-  pages        = {34--39},
-  month        = dec,
-  url          = {http://journal.r-project.org/archive/2011-2/RJournal_2011-2_Arnold+Emerson.pdf}
-}
-
-
-
- at Article{ RJournal:2011-2:Gesmann+de~Castillo,
-  author       = {Markus Gesmann and Diego de Castillo},
-  title        = {{Using the Google Visualisation API with R}},
-  journal      = {The R Journal},
-  year         = 2011,
-  volume       = 3,
-  number       = 2,
-  pages        = {40--44},
-  month        = dec,
-  url          = {http://journal.r-project.org/archive/2011-2/RJournal_2011-2_Gesmann+de~Castillo.pdf}
-}
-
-
-
- at Article{ RJournal:2011-2:Herve,
-  author       = {Maxime Hervé},
-  title        = {{GrapheR: a Multiplatform GUI for Drawing Customizable
-Graphs in R}},
-  journal      = {The R Journal},
-  year         = 2011,
-  volume       = 3,
-  number       = 2,
-  pages        = {45--53},
-  month        = dec,
-  url          = {http://journal.r-project.org/archive/2011-2/RJournal_2011-2_Herve.pdf}
-}
-
-
-
- at Article{ RJournal:2011-2:Lin~Shang,
-  author       = {Han Lin Shang},
-  title        = {{rainbow: An R Package for Visualizing Functional Time
-Series}},
-  journal      = {The R Journal},
-  year         = 2011,
-  volume       = 3,
-  number       = 2,
-  pages        = {54--59},
-  month        = dec,
-  url          = {http://journal.r-project.org/archive/2011-2/RJournal_2011-2_Lin~Shang.pdf}
-}
-
-
-
- at Article{ RJournal:2011-2:Plummer,
-  author       = {Martyn Plummer},
-  title        = {{Portable C++ for R Packages}},
-  journal      = {The R Journal},
-  year         = 2011,
-  volume       = 3,
-  number       = 2,
-  pages        = {60--63},
-  month        = dec,
-  url          = {http://journal.r-project.org/archive/2011-2/RJournal_2011-2_Plummer.pdf}
-}
-
-
-
- at Article{ RJournal:2012-1:G~Barnett-et~al,
-  author       = {Adrian G Barnett and Peter Baker and Annette J Dobson},
-  title        = {{Analysing Seasonal Data}},
-  journal      = {The R Journal},
-  year         = 2012,
-  volume       = 4,
-  number       = 1,
-  pages        = {5--10},
-  month        = jun,
-  url          = {http://journal.r-project.org/archive/2012-1/RJournal_2012-1_G~Barnett-et~al.pdf}
-}
-
-
-
- at Article{ RJournal:2012-1:Holmes~et~al,
-  author       = {Elizabeth E. Holmes and Eric J. Ward and Kellie Wills},
-  title        = {{MARSS: Multivariate Autoregressive State-space Models for
-Analyzing Time-series Data}},
-  journal      = {The R Journal},
-  year         = 2012,
-  volume       = 4,
-  number       = 1,
-  pages        = {11--19},
-  month        = jun,
-  url          = {http://journal.r-project.org/archive/2012-1/RJournal_2012-1_Holmes~et~al.pdf}
-}
-
-
-
- at Article{ RJournal:2012-1:Ropkins+Carslaw,
-  author       = {Karl Ropkins and David C. Carslaw},
-  title        = {{openair -- Data Analysis Tools for the Air Quality
-Community}},
-  journal      = {The R Journal},
-  year         = 2012,
-  volume       = 4,
-  number       = 1,
-  pages        = {20--29},
-  month        = jun,
-  url          = {http://journal.r-project.org/archive/2012-1/RJournal_2012-1_Ropkins+Carslaw.pdf}
-}
-
-
-
- at Article{ RJournal:2012-1:Adler,
-  author       = {Daniel Adler},
-  title        = {{Foreign Library Interface}},
-  journal      = {The R Journal},
-  year         = 2012,
-  volume       = 4,
-  number       = 1,
-  pages        = {30--40},
-  month        = jun,
-  url          = {http://journal.r-project.org/archive/2012-1/RJournal_2012-1_Adler.pdf}
-}
-
-
-
- at Article{ RJournal:2012-1:Lawson,
-  author       = {John Lawson},
-  title        = {{Vdgraph: A Package for Creating Variance Dispersion Graphs}},
-  journal      = {The R Journal},
-  year         = 2012,
-  volume       = 4,
-  number       = 1,
-  pages        = {41--44},
-  month        = jun,
-  url          = {http://journal.r-project.org/archive/2012-1/RJournal_2012-1_Lawson.pdf}
-}
-
-
-
- at Article{ RJournal:2012-1:Anoke~et~al,
-  author       = {Sarah C. Anoke and Yuting Zhao and Rafael Jaeger and Nicholas J. Horton},
-  title        = {{xgrid and R: Parallel Distributed Processing Using
-Heterogeneous Groups of Apple Computers}},
-  journal      = {The R Journal},
-  year         = 2012,
-  volume       = 4,
-  number       = 1,
-  pages        = {45--55},
-  month        = jun,
-  url          = {http://journal.r-project.org/archive/2012-1/RJournal_2012-1_Anoke~et~al.pdf}
-}
-
-
-
- at Article{ RJournal:2012-1:Jurka,
-  author       = {Timothy P. Jurka},
-  title        = {{maxent: An R Package for Low-memory Multinomial Logistic
-Regression with Support for Semi-automated Text
-Classification}},
-  journal      = {The R Journal},
-  year         = 2012,
-  volume       = 4,
-  number       = 1,
-  pages        = {56--59},
-  month        = jun,
-  url          = {http://journal.r-project.org/archive/2012-1/RJournal_2012-1_Jurka.pdf}
-}
-
-
-
- at Article{ RJournal:2012-1:Bergsma+Smith,
-  author       = {Timothy T. Bergsma and Michael S. Smith},
-  title        = {{Sumo: An Authenticating Web Application with an Embedded R
-Session}},
-  journal      = {The R Journal},
-  year         = 2012,
-  volume       = 4,
-  number       = 1,
-  pages        = {60--63},
-  month        = jun,
-  url          = {http://journal.r-project.org/archive/2012-1/RJournal_2012-1_Bergsma+Smith.pdf}
-}
-
-
-
- at Article{ RJournal:2012-1:Hornik~et~al,
-  author       = {Kurt Hornik and Duncan Murdoch and Achim Zeileis},
-  title        = {{Who Did What? The Roles of R Package Authors
-and How to Refer to Them}},
-  journal      = {The R Journal},
-  year         = 2012,
-  volume       = 4,
-  number       = 1,
-  pages        = {64--69},
-  month        = jun,
-  url          = {http://journal.r-project.org/archive/2012-1/RJournal_2012-1_Hornik~et~al.pdf}
-}
-
-
-
- at Article{ RJournal:2012-2:Murrell,
-  author       = {Paul Murrell},
-  title        = {{What's in a Name?}},
-  journal      = {The R Journal},
-  year         = 2012,
-  volume       = 4,
-  number       = 2,
-  pages        = {5--12},
-  month        = dec,
-  url          = {http://journal.r-project.org/archive/2012-2/RJournal_2012-2_Murrell.pdf}
-}
-
-
-
- at Article{ RJournal:2012-2:Murrell2,
-  author       = {Paul Murrell},
-  title        = {{It's Not What You Draw, It's What You Don't Draw}},
-  journal      = {The R Journal},
-  year         = 2012,
-  volume       = 4,
-  number       = 2,
-  pages        = {13--18},
-  month        = dec,
-  url          = {http://journal.r-project.org/archive/2012-2/RJournal_2012-2_Murrell2.pdf}
-}
-
-
-
- at Article{ RJournal:2012-2:Murrell+Ly,
-  author       = {Paul Murrell and Velvet Ly},
-  title        = {{Debugging grid Graphics}},
-  journal      = {The R Journal},
-  year         = 2012,
-  volume       = 4,
-  number       = 2,
-  pages        = {19--27},
-  month        = dec,
-  url          = {http://journal.r-project.org/archive/2012-2/RJournal_2012-2_Murrell+Ly.pdf}
-}
-
-
-
- at Article{ RJournal:2012-2:Do~Ha-et~al,
-  author       = {Il Do Ha and Maengseok Noh and Youngjo Lee},
-  title        = {{frailtyHL: A Package for Fitting Frailty Models with
-H-likelihood}},
-  journal      = {The R Journal},
-  year         = 2012,
-  volume       = 4,
-  number       = 2,
-  pages        = {28--37},
-  month        = dec,
-  url          = {http://journal.r-project.org/archive/2012-2/RJournal_2012-2_Do~Ha-et~al.pdf}
-}
-
-
-
- at Article{ RJournal:2012-2:Nieuwenhuis~et~al,
-  author       = {Rense Nieuwenhuis and Manfred te Grotenhuis and Ben Pelzer},
-  title        = {{influence.ME: Tools for Detecting Influential Data in Mixed
-Effects Models}},
-  journal      = {The R Journal},
-  year         = 2012,
-  volume       = 4,
-  number       = 2,
-  pages        = {38--47},
-  month        = dec,
-  url          = {http://journal.r-project.org/archive/2012-2/RJournal_2012-2_Nieuwenhuis~et~al.pdf}
-}
-
-
-
- at Article{ RJournal:2012-2:Nie+S~Racine,
-  author       = {Zhenghua Nie and Jeffrey S Racine},
-  title        = {{The crs Package: Nonparametric Regression Splines for
-Continuous and Categorical Predictors}},
-  journal      = {The R Journal},
-  year         = 2012,
-  volume       = 4,
-  number       = 2,
-  pages        = {48--56},
-  month        = dec,
-  url          = {http://journal.r-project.org/archive/2012-2/RJournal_2012-2_Nie+S~Racine.pdf}
-}
-
-
-
- at Article{ RJournal:2012-2:Kloke+McKean,
-  author       = {John D. Kloke and Joseph W. McKean},
-  title        = {{Rfit: Rank-based Estimation for Linear Models}},
-  journal      = {The R Journal},
-  year         = 2012,
-  volume       = 4,
-  number       = 2,
-  pages        = {57--64},
-  month        = dec,
-  url          = {http://journal.r-project.org/archive/2012-2/RJournal_2012-2_Kloke+McKean.pdf}
-}
-
-
-
- at Article{ RJournal:2012-2:Sadeghi+Marchetti,
-  author       = {Kayvan Sadeghi and Giovanni M. Marchetti},
-  title        = {{Graphical Markov Models with Mixed Graphs in R}},
-  journal      = {The R Journal},
-  year         = 2012,
-  volume       = 4,
-  number       = 2,
-  pages        = {65--73},
-  month        = dec,
-  url          = {http://journal.r-project.org/archive/2012-2/RJournal_2012-2_Sadeghi+Marchetti.pdf}
-}
-
-
-
- at Article{ RJournal:2012-2:Baaaath,
-  author       = {Rasmus Bååth},
-  title        = {{The State of Naming Conventions in R}},
-  journal      = {The R Journal},
-  year         = 2012,
-  volume       = 4,
-  number       = 2,
-  pages        = {74--75},
-  month        = dec,
-  url          = {http://journal.r-project.org/archive/2012-2/RJournal_2012-2_Baaaath.pdf}
-}
-
-
-
- at Article{ RJournal:2013-1:editorial,
-  author       = {Hadley Wickham},
-  title        = {{Editorial}},
-  journal      = {The R Journal},
-  year         = 2013,
-  volume       = 5,
-  number       = 1,
-  pages        = {4--6},
-  month        = jun,
-  url          = {http://journal.r-project.org/archive/2013-1/RJournal_2013-1_editorial.pdf}
-}
-
-
-
- at Article{ RJournal:2013-1:collingwood-jurka-boydstun-etal,
-  author       = {Loren Collingwood and Timothy P. Jurka and Amber E. Boydstun and Emiliano Grossman and Wouter van Atteveldt},
-  title        = {{RTextTools: A Supervised Learning Package for Text Classification}},
-  journal      = {The R Journal},
-  year         = 2013,
-  volume       = 5,
-  number       = 1,
-  pages        = {6--13},
-  month        = jun,
-  url          = {http://journal.r-project.org/archive/2013-1/RJournal_2013-1_collingwood-jurka-boydstun-etal.pdf}
-}
-
-
-
- at Article{ RJournal:2013-1:xiang-gubian-suomela-etal,
-  author       = {Yang Xiang and Sylvain Gubian and Brian Suomela and Julia Hoeng},
-  title        = {{Generalized Simulated Annealing for Global Optimization: the GenSA Package for R}},
-  journal      = {The R Journal},
-  year         = 2013,
-  volume       = 5,
-  number       = 1,
-  pages        = {13--29},
-  month        = jun,
-  url          = {http://journal.r-project.org/archive/2013-1/RJournal_2013-1_xiang-gubian-suomela-etal.pdf}
-}
-
-
-
- at Article{ RJournal:2013-1:kostov-becuebertaut-husson,
-  author       = {Belchin Kostov and Monica Becue-Bertaut and Francois Husson},
-  title        = {{Multiple Factor Analysis on Contingency Tables in the FactoMineR Package}},
-  journal      = {The R Journal},
-  year         = 2013,
-  volume       = 5,
-  number       = 1,
-  pages        = {29--39},
-  month        = jun,
-  url          = {http://journal.r-project.org/archive/2013-1/RJournal_2013-1_kostov-becuebertaut-husson.pdf}
-}
-
-
-
- at Article{ RJournal:2013-1:fox-friendly-weisberg,
-  author       = {John Fox and Michael Friendly and Sanford Weisberg},
-  title        = {{Hypothesis Tests for Multivariate Linear Models Using the car Package}},
-  journal      = {The R Journal},
-  year         = 2013,
-  volume       = 5,
-  number       = 1,
-  pages        = {39--53},
-  month        = jun,
-  url          = {http://journal.r-project.org/archive/2013-1/RJournal_2013-1_fox-friendly-weisberg.pdf}
-}
-
-
-
- at Article{ RJournal:2013-1:eugster-schlesinger,
-  author       = {Manuel J. A. Eugster and Thomas Schlesinger},
-  title        = {{osmar: OpenStreetMap and R}},
-  journal      = {The R Journal},
-  year         = 2013,
-  volume       = 5,
-  number       = 1,
-  pages        = {53--64},
-  month        = jun,
-  url          = {http://journal.r-project.org/archive/2013-1/RJournal_2013-1_eugster-schlesinger.pdf}
-}
-
-
-
- at Article{ RJournal:2013-1:shang,
-  author       = {Han Shang},
-  title        = {{ftsa: An R Package for Analyzing Functional Time Series}},
-  journal      = {The R Journal},
-  year         = 2013,
-  volume       = 5,
-  number       = 1,
-  pages        = {64--73},
-  month        = jun,
-  url          = {http://journal.r-project.org/archive/2013-1/RJournal_2013-1_shang.pdf}
-}
-
-
-
- at Article{ RJournal:2013-1:godfrey,
-  author       = {A. Jonathan R. Godfrey},
-  title        = {{Statistical Analysis from a Blind Person's Perspective}},
-  journal      = {The R Journal},
-  year         = 2013,
-  volume       = 5,
-  number       = 1,
-  pages        = {73--80},
-  month        = jun,
-  url          = {http://journal.r-project.org/archive/2013-1/RJournal_2013-1_godfrey.pdf}
-}
-
-
-
- at Article{ RJournal:2013-1:zagaglia,
-  author       = {Paolo Zagaglia},
-  title        = {{PIN: Measuring Asymmetric Information in Financial Markets with R}},
-  journal      = {The R Journal},
-  year         = 2013,
-  volume       = 5,
-  number       = 1,
-  pages        = {80--87},
-  month        = jun,
-  url          = {http://journal.r-project.org/archive/2013-1/RJournal_2013-1_zagaglia.pdf}
-}
-
-
-
- at Article{ RJournal:2013-1:thiem-dusa,
-  author       = {Alrik Thiem and Adrian Dusa},
-  title        = {{QCA: A Package for Qualitative Comparative Analysis}},
-  journal      = {The R Journal},
-  year         = 2013,
-  volume       = 5,
-  number       = 1,
-  pages        = {87--98},
-  month        = jun,
-  url          = {http://journal.r-project.org/archive/2013-1/RJournal_2013-1_thiem-dusa.pdf}
-}
-
-
-
- at Article{ RJournal:2013-1:colleter-guitton-gascuel,
-  author       = {Mathieu Colleter and Jerome Guitton and Didier Gascuel},
-  title        = {{An Introduction to the EcoTroph R package: Analyzing Aquatic Ecosystem Trophic Network}},
-  journal      = {The R Journal},
-  year         = 2013,
-  volume       = 5,
-  number       = 1,
-  pages        = {98--108},
-  month        = jun,
-  url          = {http://journal.r-project.org/archive/2013-1/RJournal_2013-1_colleter-guitton-gascuel.pdf}
-}
-
-
-
- at Article{ RJournal:2013-1:valle-dellomodarme,
-  author       = {Giada Valle and Matteo Dell'Omodarme},
-  title        = {{StellaR: a Package to Manage Stellar Evolution Tracks and Isochrones}},
-  journal      = {The R Journal},
-  year         = 2013,
-  volume       = 5,
-  number       = 1,
-  pages        = {108--117},
-  month        = jun,
-  url          = {http://journal.r-project.org/archive/2013-1/RJournal_2013-1_valle-dellomodarme.pdf}
-}
-
-
-
- at Article{ RJournal:2013-1:hofmann-unwin-cook,
-  author       = {Heike Hofmann and Antony Unwin and Dianne Cook},
-  title        = {{Let Graphics Tell the Story - Datasets in R}},
-  journal      = {The R Journal},
-  year         = 2013,
-  volume       = 5,
-  number       = 1,
-  pages        = {117--130},
-  month        = jun,
-  url          = {http://journal.r-project.org/archive/2013-1/RJournal_2013-1_hofmann-unwin-cook.pdf}
-}
-
-
-
- at Article{ RJournal:2013-1:wilhelm-matos,
-  author       = {Stefan Wilhelm and Miguel Godinho de Matos},
-  title        = {{Estimating Spatial Probit Models in R}},
-  journal      = {The R Journal},
-  year         = 2013,
-  volume       = 5,
-  number       = 1,
-  pages        = {130--144},
-  month        = jun,
-  url          = {http://journal.r-project.org/archive/2013-1/RJournal_2013-1_wilhelm-matos.pdf}
-}
-
-
-
- at Article{ RJournal:2013-1:kahle-wickham,
-  author       = {David Kahle and Hadley Wickham},
-  title        = {{ggmap : Spatial Visualization with ggplot2}},
-  journal      = {The R Journal},
-  year         = 2013,
-  volume       = 5,
-  number       = 1,
-  pages        = {144--162},
-  month        = jun,
-  url          = {http://journal.r-project.org/archive/2013-1/RJournal_2013-1_kahle-wickham.pdf}
-}
-
-
-
- at Article{ RJournal:2013-1:kahle,
-  author       = {David Kahle},
-  title        = {{mpoly : Multivariate polynomials in R}},
-  journal      = {The R Journal},
-  year         = 2013,
-  volume       = 5,
-  number       = 1,
-  pages        = {162--171},
-  month        = jun,
-  url          = {http://journal.r-project.org/archive/2013-1/RJournal_2013-1_kahle.pdf}
-}
-
-
-
- at Article{ RJournal:2013-1:forcheh-verbeke-kasim-etal,
-  author       = {Anyiawung Chiara Forcheh and Geert Verbeke and Adetayo Kasim and Dan Lin and Ziv Shkedy and Willem Talloen and Hinrich W.H. Goehlmann and Lieven Clement},
-  title        = {{The beadarrayFilter: An R Package to Filter Beads}},
-  journal      = {The R Journal},
-  year         = 2013,
-  volume       = 5,
-  number       = 1,
-  pages        = {171--181},
-  month        = jun,
-  url          = {http://journal.r-project.org/archive/2013-1/RJournal_2013-1_forcheh-verbeke-kasim-etal.pdf}
-}
-
-
-
- at Article{ RJournal:2013-1:mcdaniel-henderson-rathouz,
-  author       = {Lee S. McDaniel and Nicholas C. Henderson and Paul J. Rathouz},
-  title        = {{Fast Pure R Implementation of GEE: Application of the Matrix Package}},
-  journal      = {The R Journal},
-  year         = 2013,
-  volume       = 5,
-  number       = 1,
-  pages        = {181--188},
-  month        = jun,
-  url          = {http://journal.r-project.org/archive/2013-1/RJournal_2013-1_mcdaniel-henderson-rathouz.pdf}
-}
-
-
-
- at Article{ RJournal:2013-1:bouchetvalat-bastin,
-  author       = {Milan Bouchet-Valat and Gilles Bastin},
-  title        = {{RcmdrPlugin.temis, a Graphical Integrated Text Mining Solution in R}},
-  journal      = {The R Journal},
-  year         = 2013,
-  volume       = 5,
-  number       = 1,
-  pages        = {188--197},
-  month        = jun,
-  url          = {http://journal.r-project.org/archive/2013-1/RJournal_2013-1_bouchetvalat-bastin.pdf}
-}
-
-
-
- at Article{ RJournal:2013-1:ooms,
-  author       = {Jeroen Ooms},
-  title        = {{Directions for Improved Dependency Versioning in R}},
-  journal      = {The R Journal},
-  year         = 2013,
-  volume       = 5,
-  number       = 1,
-  pages        = {197--207},
-  month        = jun,
-  url          = {http://journal.r-project.org/archive/2013-1/RJournal_2013-1_ooms.pdf}
-}
-
-
-
- at Article{ RJournal:2013-1:lebauer-dietze-bolker,
-  author       = {David LeBauer and Michael Dietze and Ben Bolker},
-  title        = {{Translating Probability Distributions: From R to BUGS and Back Again}},
-  journal      = {The R Journal},
-  year         = 2013,
-  volume       = 5,
-  number       = 1,
-  pages        = {207--210},
-  month        = jun,
-  url          = {http://journal.r-project.org/archive/2013-1/RJournal_2013-1_lebauer-dietze-bolker.pdf}
-}
-
-
-
- at Article{ RJournal:2013-1:chinese-r-conf,
-  author       = {Jing Leng and Jingjing Guan},
-  title        = {{Conference Review: The 6th Chinese R Conference}},
-  journal      = {The R Journal},
-  year         = 2013,
-  volume       = 5,
-  number       = 1,
-  pages        = {210--212},
-  month        = jun,
-  url          = {http://journal.r-project.org/archive/2013-1/RJournal_2013-1_chinese-r-conf.pdf}
-}
-
-
-
- at Article{ RJournal:2013-1:r-finance,
-  author       = {Joshua Ulrich},
-  title        = {{Conference Report: R/Finance 2013}},
-  journal      = {The R Journal},
-  year         = 2013,
-  volume       = 5,
-  number       = 1,
-  pages        = {212--215},
-  month        = jun,
-  url          = {http://journal.r-project.org/archive/2013-1/RJournal_2013-1_r-finance.pdf}
-}
-
-
-
- at Article{ RJournal:2013-1:user2013,
-  author       = {UseR 2013 Organising Committee},
-  title        = {{The R User Conference 2013}},
-  journal      = {The R Journal},
-  year         = 2013,
-  volume       = 5,
-  number       = 1,
-  pages        = {215--218},
-  month        = jun,
-  url          = {http://journal.r-project.org/archive/2013-1/RJournal_2013-1_user2013.pdf}
-}
-
-
-
- at Article{ RJournal:2013-1:bioconductor,
-  author       = {Bioconductor Team},
-  title        = {{News from the Bioconductor Project}},
-  journal      = {The R Journal},
-  year         = 2013,
-  volume       = 5,
-  number       = 1,
-  pages        = {218--220},
-  month        = jun,
-  url          = {http://journal.r-project.org/archive/2013-1/RJournal_2013-1_bioconductor.pdf}
-}
-
-
-
- at Article{ RJournal:2013-1:r-foundation,
-  author       = {Kurt Hornik},
-  title        = {{R Foundation News}},
-  journal      = {The R Journal},
-  year         = 2013,
-  volume       = 5,
-  number       = 1,
-  pages        = {220--221},
-  month        = jun,
-  url          = {http://journal.r-project.org/archive/2013-1/RJournal_2013-1_r-foundation.pdf}
-}
-
-
-
- at Article{ RJournal:2013-1:r-changes,
-  author       = {The R Core Team},
-  title        = {{Changes in R}},
-  journal      = {The R Journal},
-  year         = 2013,
-  volume       = 5,
-  number       = 1,
-  pages        = {221--239},
-  month        = jun,
-  url          = {http://journal.r-project.org/archive/2013-1/RJournal_2013-1_r-changes.pdf}
-}
-
-
-
- at Article{ RJournal:2013-1:cran,
-  author       = {Kurt Hornik and Achim Zeileis},
-  title        = {{Changes on CRAN}},
-  journal      = {The R Journal},
-  year         = 2013,
-  volume       = 5,
-  number       = 1,
-  pages        = {239--264},
-  month        = jun,
-  url          = {http://journal.r-project.org/archive/2013-1/RJournal_2013-1_cran.pdf}
-}
-
-
-
- at Article{ RJournal:2013-2:editorial,
-  author       = {Hadley Wickham},
-  title        = {{Editorial}},
-  journal      = {The R Journal},
-  year         = 2013,
-  volume       = 5,
-  number       = 2,
-  pages        = {3--4},
-  month        = Dec,
-  url          = {http://journal.r-project.org/archive/2013-2/RJournal_2013-2_editorial.pdf}
-}
-
-
-
- at Article{ RJournal:2013-2:armstrong,
-  author       = {David A. Armstrong II},
-  title        = {{factorplot: Improving Presentation of Simple Contrasts in GLMs}},
-  journal      = {The R Journal},
-  year         = 2013,
-  volume       = 5,
-  number       = 2,
-  pages        = {4--16},
-  month        = Dec,
-  url          = {http://journal.r-project.org/archive/2013-2/RJournal_2013-2_armstrong.pdf}
-}
-
-
-
- at Article{ RJournal:2013-2:sartore,
-  author       = {Luca Sartore},
-  title        = {{spMC: Modelling Spatial Random Fields with Continuous Lag Markov Chains}},
-  journal      = {The R Journal},
-  year         = 2013,
-  volume       = 5,
-  number       = 2,
-  pages        = {16--29},
-  month        = Dec,
-  url          = {http://journal.r-project.org/archive/2013-2/RJournal_2013-2_sartore.pdf}
-}
-
-
-
- at Article{ RJournal:2013-2:michna-woods,
-  author       = {Pavel Michna and Milton Woods},
-  title        = {{RNetCDF – A Package for Reading and Writing NetCDF Datasets}},
-  journal      = {The R Journal},
-  year         = 2013,
-  volume       = 5,
-  number       = 2,
-  pages        = {29--37},
-  month        = Dec,
-  url          = {http://journal.r-project.org/archive/2013-2/RJournal_2013-2_michna-woods.pdf}
+  
+    
+ at article{RJ-2017-001,
+  author = {Taylor Arnold and Michael J. Kane and Simon Urbanek},
+  title = {{iotools: High-Performance I/O Tools for R}},
+  year = {2017},
+  journal = {{The R Journal}},
+  url = {https://journal.r-project.org/archive/2017/RJ-2017-001/index.html}
+  note = {Accepted, may change after copy-editing.}
+}
+    
+  
+    
+ at article{RJ-2017-002,
+  author = {Martin Otava and Rudradev Sengupta and Ziv Shkedy and
+          Dan Lin and Setia Pramana and Tobias Verbeke and Philippe
+          Haldermans and Ludwig A. Hothorn and Daniel Gerhard and
+          Rebecca M. Kuiper and Florian Klinglmueller and Adetayo
+          Kasim},
+  title = {{IsoGeneGUI: Multiple Approaches for Dose-Response Analysis
+          of Microarray Data Using R}},
+  year = {2017},
+  journal = {{The R Journal}},
+  url = {https://journal.r-project.org/archive/2017/RJ-2017-002/index.html}
+  note = {Accepted, may change after copy-editing.}
+}
+    
+  
+    
+ at article{RJ-2017-003,
+  author = {Mark Pickup and Paul Gustafson and Davor Cubranic and
+          Geoffrey Evans},
+  title = {{OrthoPanels: An R Package for Estimating a Dynamic
+          Panel Model with Fixed Effects Using the Orthogonal Re-
+          parameterization Approach}},
+  year = {2017},
+  journal = {{The R Journal}},
+  url = {https://journal.r-project.org/archive/2017/RJ-2017-003/index.html}
+  note = {Accepted, may change after copy-editing.}
+}
+    
+  
+    
+ at article{RJ-2017-004,
+  author = {Jakob Bossek},
+  title = {{smoof: Single- and Multi-Objective Optimization Test
+          Functions}},
+  year = {2017},
+  journal = {{The R Journal}},
+  url = {https://journal.r-project.org/archive/2017/RJ-2017-004/index.html}
+  note = {Accepted, may change after copy-editing.}
+}
+    
+  
+    
+ at article{RJ-2017-005,
+  author = {Sean S. Downey and Guowei Sun and Peter Norquest},
+  title = {{alineR: an R Package for Optimizing Feature-Weighted
+          Alignments and Linguistic Distances}},
+  year = {2017},
+  journal = {{The R Journal}},
+  url = {https://journal.r-project.org/archive/2017/RJ-2017-005/index.html}
+  note = {Accepted, may change after copy-editing.}
+}
+    
+  
+    
+ at article{RJ-2017-006,
+  author = {Jim Duggan},
+  title = {{Implementing a Metapopulation Bass Diffusion Model using the
+          R Package deSolve}},
+  year = {2017},
+  journal = {{The R Journal}},
+  url = {https://journal.r-project.org/archive/2017/RJ-2017-006/index.html}
+  note = {Accepted, may change after copy-editing.}
+}
+    
+  
+    
+ at article{RJ-2017-007,
+  author = {Christian Margreitter and Chris Oostenbrink},
+  title = {{MDplot: Visualise Molecular Dynamics}},
+  year = {2017},
+  journal = {{The R Journal}},
+  url = {https://journal.r-project.org/archive/2017/RJ-2017-007/index.html}
+  note = {Accepted, may change after copy-editing.}
+}
+    
+  
+    
+ at article{RJ-2017-008,
+  author = {Luca Scrucca},
+  title = {{On some extensions to GA package: hybrid optimisation,
+          parallelisation and islands evolution}},
+  year = {2017},
+  journal = {{The R Journal}},
+  url = {https://journal.r-project.org/archive/2017/RJ-2017-008/index.html}
+  note = {Accepted, may change after copy-editing.}
+}
+    
+  
+    
+ at article{RJ-2017-009,
+  author = {Steffen Moritz and Thomas Bartz-Beielstein},
+  title = {{imputeTS: Time Series Missing Value Imputation in R}},
+  year = {2017},
+  journal = {{The R Journal}},
+  url = {https://journal.r-project.org/archive/2017/RJ-2017-009/index.html}
+  note = {Accepted, may change after copy-editing.}
+}
+    
+  
+    
+ at article{RJ-2017-010,
+  author = {Simon H. Heisterkamp and Engelbertus van Willigen and Paul-
+          Matthias Diderichsen and John Maringwa},
+  title = {{Update of the nlme Package to Allow a Fixed Standard
+          Deviation of the Residual Error}},
+  year = {2017},
+  journal = {{The R Journal}},
+  url = {https://journal.r-project.org/archive/2017/RJ-2017-010/index.html}
+  note = {Accepted, may change after copy-editing.}
+}
+    
+  
+    
+ at article{RJ-2017-011,
+  author = {Hye-Min Choe and Mijeong Kim and Eun-Kyung Lee},
+  title = {{EMSaov: An R Package for the Analysis of Variances with the
+          Expected Mean Squares and its Shiny Application}},
+  year = {2017},
+  journal = {{The R Journal}},
+  url = {https://journal.r-project.org/archive/2017/RJ-2017-011/index.html}
+  note = {Accepted, may change after copy-editing.}
+}
+    
+  
+    
+ at article{RJ-2017-015,
+  author = {Mónica López-Ratón and Elisa M. Molanes-López and Emilio
+          Letón and Carmen Cadarso-Suárez},
+  title = {{GsymPoint: An R Package to Estimate the Generalized Symmetry
+          Point, an Optimal Cut-off Point for Binary Classification in
+          Continuous Diagnostic Tests}},
+  year = {2017},
+  journal = {{The R Journal}},
+  url = {https://journal.r-project.org/archive/2017/RJ-2017-015/index.html}
+  note = {Accepted, may change after copy-editing.}
+}
+    
+  
+    
+ at article{RJ-2017-012,
+  author = {Philipp Probst and Quay Au and Giuseppe Casalicchio and
+          Clemens Stachl and Bernd Bischl},
+  title = {{Multilabel Classification with R Package mlr}},
+  year = {2017},
+  journal = {{The R Journal}},
+  url = {https://journal.r-project.org/archive/2017/RJ-2017-012/index.html}
+  note = {Accepted, may change after copy-editing.}
+}
+    
+  
+    
+ at article{RJ-2017-016,
+  author = {Brandon M. Greenwell},
+  title = {{pdp: An R Package for Constructing Partial Dependence Plots}},
+  year = {2017},
+  journal = {{The R Journal}},
+  url = {https://journal.r-project.org/archive/2017/RJ-2017-016/index.html}
+  note = {Accepted, may change after copy-editing.}
+}
+    
+  
+    
+ at article{RJ-2017-013,
+  author = {Ping-Yang Chen and Ching-Chuan Chen and Chun-Hao Yang and
+          Sheng-Mao Chang and Kuo-Jung Lee},
+  title = {{milr: Multiple-Instance Logistic Regression with Lasso
+          Penalty}},
+  year = {2017},
+  journal = {{The R Journal}},
+  url = {https://journal.r-project.org/archive/2017/RJ-2017-013/index.html}
+  note = {Accepted, may change after copy-editing.}
+}
+    
+  
+    
+ at article{RJ-2017-014,
+  author = {Axel Gandy and Jan Terje Kvaløy},
+  title = {{spcadjust: An R Package for Adjusting for Estimation Error
+          in Control Charts}},
+  year = {2017},
+  journal = {{The R Journal}},
+  url = {https://journal.r-project.org/archive/2017/RJ-2017-014/index.html}
+  note = {Accepted, may change after copy-editing.}
+}
+    
+  
+    
+ at article{RJ-2017-017,
+  author = {Rense Nieuwenhuis and Manfred te Grotenhuis and Ben Pelzer},
+  title = {{Weighted Effect Coding for Observational Data with wec}},
+  year = {2017},
+  journal = {{The R Journal}},
+  url = {https://journal.r-project.org/archive/2017/RJ-2017-017/index.html}
+  note = {Accepted, may change after copy-editing.}
+}
+    
+  
+    
+ at article{RJ-2017-018,
+  author = {Razieh Nabi and Xiaogang Su},
+  title = {{coxphMIC: An R Package for Sparse Estimation of Cox
+          Proportional Hazards Models via Approximated Information
+          Criteria}},
+  year = {2017},
+  journal = {{The R Journal}},
+  url = {https://journal.r-project.org/archive/2017/RJ-2017-018/index.html}
+  note = {Accepted, may change after copy-editing.}
+}
+    
+  
+    
+ at article{RJ-2017-019,
+  author = {Leo Lahti and Janne Huovari and Markus Kainu and Przemysław
+          Biecek},
+  title = {{Retrieval and Analysis of Eurostat Open Data with the
+          eurostat Package}},
+  year = {2017},
+  journal = {{The R Journal}},
+  url = {https://journal.r-project.org/archive/2017/RJ-2017-019/index.html}
+  note = {Accepted, may change after copy-editing.}
+}
+    
+  
+    
+ at article{RJ-2017-020,
+  author = {Thomas Wieland},
+  title = {{Market Area Analysis for Retail and Service Locations with
+          MCI}},
+  year = {2017},
+  journal = {{The R Journal}},
+  url = {https://journal.r-project.org/archive/2017/RJ-2017-020/index.html}
+  note = {Accepted, may change after copy-editing.}
+}
+    
+  
+    
+ at article{RJ-2017-021,
+  author = {Neeraj Bokde and Gualberto Asencio-Cortés and Francisco
+          Martínez-Álvarez and Kishore Kulat},
+  title = {{PSF: Introduction to R Package for Pattern Sequence Based
+          Forecasting Algorithm}},
+  year = {2017},
+  journal = {{The R Journal}},
+  url = {https://journal.r-project.org/archive/2017/RJ-2017-021/index.html}
+  note = {Accepted, may change after copy-editing.}
+}
+    
+  
+    
+ at article{RJ-2017-022,
+  author = {Panagiotis Papastamoulis and Magnus Rattray},
+  title = {{BayesBinMix: an R Package for Model Based Clustering of
+          Multivariate Binary Data}},
+  year = {2017},
+  journal = {{The R Journal}},
+  url = {https://journal.r-project.org/archive/2017/RJ-2017-022/index.html}
+  note = {Accepted, may change after copy-editing.}
+}
+    
+  
+
+  
+    
+ at article{RJ-2009-008,
+  author = {John M. Chambers},
+  title = {{Facets of R}},
+  year = {2009},
+  journal = {{The R Journal}},
+  url = {https://journal.r-project.org/archive/2009/RJ-2009-008/index.html},
+  pages = {5--8},
+  volume = {1},
+  number = {1}
+}
+    
+  
+    
+ at article{RJ-2009-007,
+  author = {Stefan Theußl and Achim Zeileis},
+  title = {{Collaborative Software Development Using R-Forge}},
+  year = {2009},
+  journal = {{The R Journal}},
+  url = {https://journal.r-project.org/archive/2009/RJ-2009-007/index.html},
+  pages = {9--14},
+  volume = {1},
+  number = {1}
+}
+    
+  
+    
+ at article{RJ-2009-006,
+  author = {Paul Murrell},
+  title = {{Drawing Diagrams with R}},
+  year = {2009},
+  journal = {{The R Journal}},
+  url = {https://journal.r-project.org/archive/2009/RJ-2009-006/index.html},
+  pages = {15--21},
+  volume = {1},
+  number = {1}
+}
+    
+  
+    
+ at article{RJ-2009-009,
+  author = {Gregoire Pau and Wolfgang Huber},
+  title = {{The hwriter package: Composing HTML documents with R objects}},
+  year = {2009},
+  journal = {{The R Journal}},
+  url = {https://journal.r-project.org/archive/2009/RJ-2009-009/index.html},
+  pages = {22--24},
+  volume = {1},
+  number = {1}
+}
+    
+  
+    
+ at article{RJ-2009-003,
+  author = {David Ardia and Lennart F. Hoogerheide and Herman K. van
+          Dijk},
+  title = {{AdMit}},
+  year = {2009},
+  journal = {{The R Journal}},
+  url = {https://journal.r-project.org/archive/2009/RJ-2009-003/index.html},
+  pages = {25--30},
+  volume = {1},
+  number = {1}
+}
+    
+  
+    
+ at article{RJ-2009-005,
+  author = {Vincent Goulet and Michel Jacques and Mathieu Pigeon},
+  title = {{expert: Modeling Without Data Using Expert Opinion}},
+  year = {2009},
+  journal = {{The R Journal}},
+  url = {https://journal.r-project.org/archive/2009/RJ-2009-005/index.html},
+  pages = {31--36},
+  volume = {1},
+  number = {1}
+}
+    
+  
+    
+ at article{RJ-2009-001,
+  author = {Xuefei Mi and Tetsuhisa Miwa and Torsten Hothorn},
+  title = {{New Numerical Algorithm for Multivariate Normal
+          Probabilities in Package mvtnorm}},
+  year = {2009},
+  journal = {{The R Journal}},
+  url = {https://journal.r-project.org/archive/2009/RJ-2009-001/index.html},
+  pages = {37--39},
+  volume = {1},
+  number = {1}
+}
+    
+  
+    
+ at article{RJ-2009-002,
+  author = {Donghoh Kim and Hee-Seok Oh},
+  title = {{EMD: A Package for Empirical Mode Decomposition and Hilbert
+          Spectrum}},
+  year = {2009},
+  journal = {{The R Journal}},
+  url = {https://journal.r-project.org/archive/2009/RJ-2009-002/index.html},
+  pages = {40--46},
+  volume = {1},
+  number = {1}
+}
+    
+  
+    
+      
+
+        
+ at Article{RJournal:2009-1:Orr+Liu,
+  author       = {Megan Orr and Peng Liu}, 
+  title        = {Sample Size Estimation while Controlling False Discovery Rate for Microarray Experiments Using the {ssize.fdr} Package}, 
+  journal      = {The R Journal},
+  year         = 2009,
+  volume       = 1,
+  number       = 1,
+  pages        = {47--53},
+  month        = jun,
+  url          = {http://journal.r-project.org/archive/2009-1/RJournal_2009-1_Orr+Liu.pdf}
 }
-
-
-
- at Article{ RJournal:2013-2:roediger-bohm-schimke,
-  author       = {Stefan Roediger and Alexander Bohm and Ingolf Schimke},
-  title        = {{Surface Melting Curve Analysis with R}},
+        
+      
+    
+  
+    
+ at article{RJ-2009-004,
+  author = {Jochen Knaus and Christine Porzelius and Harald Binder and
+          Guido Schwarzer},
+  title = {{Easier parallel computing in R with snowfall and sfCluster}},
+  year = {2009},
+  journal = {{The R Journal}},
+  url = {https://journal.r-project.org/archive/2009/RJ-2009-004/index.html},
+  pages = {54--59},
+  volume = {1},
+  number = {1}
+}
+    
+  
+    
+ at article{RJ-2009-010,
+  author = {Alex Guazzelli and Michael Zeller and Wen-Ching Lin and
+          Graham Williams},
+  title = {{PMML: An Open Standard for Sharing Models}},
+  year = {2009},
+  journal = {{The R Journal}},
+  url = {https://journal.r-project.org/archive/2009/RJ-2009-010/index.html},
+  pages = {60--65},
+  volume = {1},
+  number = {1}
+}
+    
+  
+
+  
+    
+ at article{RJ-2009-014,
+  author = {John Fox},
+  title = {{Aspects of the Social Organization and Trajectory of the R
+          Project}},
+  year = {2009},
+  journal = {{The R Journal}},
+  url = {https://journal.r-project.org/archive/2009/RJ-2009-014/index.html},
+  pages = {5--13},
+  volume = {1},
+  number = {2}
+}
+    
+  
+    
+ at article{RJ-2009-013,
+  author = {Carolin Strobl and Torsten Hothorn and Achim Zeileis},
+  title = {{Party on!}},
+  year = {2009},
+  journal = {{The R Journal}},
+  url = {https://journal.r-project.org/archive/2009/RJ-2009-013/index.html},
+  pages = {14--17},
+  volume = {1},
+  number = {2}
+}
+    
+  
+    
+ at article{RJ-2009-011,
+  author = {Pierre Lafaye de Micheaux and Benoit Liquet},
+  title = {{ConvergenceConcepts: An R Package to Investigate Various
+          Modes of Convergence}},
+  year = {2009},
+  journal = {{The R Journal}},
+  url = {https://journal.r-project.org/archive/2009/RJ-2009-011/index.html},
+  pages = {18--25},
+  volume = {1},
+  number = {2}
+}
+    
+  
+    
+ at article{RJ-2009-015,
+  author = {J.-F. Coeurjolly and R. Drouilhet and P. Lafaye de Micheaux
+          and J.-F. Robineau},
+  title = {{asympTest: A Simple R Package for Classical Parametric
+          Statistical Tests and Confidence Intervals in Large Samples}},
+  year = {2009},
+  journal = {{The R Journal}},
+  url = {https://journal.r-project.org/archive/2009/RJ-2009-015/index.html},
+  pages = {26--30},
+  volume = {1},
+  number = {2}
+}
+    
+  
+    
+ at article{RJ-2009-012,
+  author = {J. Carpenter and G. Rücker and G. Schwarzer},
+  title = {{copas: An R package for Fitting the Copas Selection Model}},
+  year = {2009},
+  journal = {{The R Journal}},
+  url = {https://journal.r-project.org/archive/2009/RJ-2009-012/index.html},
+  pages = {31--36},
+  volume = {1},
+  number = {2}
+}
+    
+  
+    
+ at article{RJ-2009-018,
+  author = {Anthony Damico},
+  title = {{Transitioning to R: Replicating SAS, Stata, and SUDAAN
+          Analysis Techniques in Health Policy Data}},
+  year = {2009},
+  journal = {{The R Journal}},
+  url = {https://journal.r-project.org/archive/2009/RJ-2009-018/index.html},
+  pages = {37--44},
+  volume = {1},
+  number = {2}
+}
+    
+  
+    
+ at article{RJ-2009-016,
+  author = {Graham J Williams},
+  title = {{Rattle: A Data Mining GUI for R}},
+  year = {2009},
+  journal = {{The R Journal}},
+  url = {https://journal.r-project.org/archive/2009/RJ-2009-016/index.html},
+  pages = {45--55},
+  volume = {1},
+  number = {2}
+}
+    
+  
+    
+ at article{RJ-2009-017,
+  author = {Spencer Graves and Sundar Dorai-Raj and Romain François},
+  title = {{sos: Searching Help Pages of R Packages}},
+  year = {2009},
+  journal = {{The R Journal}},
+  url = {https://journal.r-project.org/archive/2009/RJ-2009-017/index.html},
+  pages = {56--59},
+  volume = {1},
+  number = {2}
+}
+    
+  
+    
+      
+
+        
+ at Article{RJournal:2009-2:Murdoch+Urbanek,
+  author       = {Duncan Murdoch and Simon Urbanek}, 
+  title        = {The New {R} Help System}, 
   journal      = {The R Journal},
-  year         = 2013,
-  volume       = 5,
+  year         = 2009,
+  volume       = 1,
   number       = 2,
-  pages        = {37--53},
-  month        = Dec,
-  url          = {http://journal.r-project.org/archive/2013-2/RJournal_2013-2_roediger-bohm-schimke.pdf}
+  pages        = {60--65},
+  month        = dec,
+  url          = {http://journal.r-project.org/archive/2009-2/RJournal_2009-2_Murdoch+Urbanek.pdf}
 }
-
-
-
- at Article{ RJournal:2013-2:lu-kane,
-  author       = {Yang Lu and David Kane},
-  title        = {{Performance Attribution for Equity Portfolios}},
+        
+      
+    
+  
+
+  
+    
+ at article{RJ-2010-001,
+  author = {Setia Pramana and Dan Lin and Philippe Haldermans and Ziv
+          Shkedy and Tobias Verbeke and Hinrich Göhlmann and An De
+          Bondt and Willem Talloen and Luc Bijnens.},
+  title = {{IsoGene: An R Package for Analyzing Dose-response Studies in
+          Microarray Experiments}},
+  year = {2010},
+  journal = {{The R Journal}},
+  url = {https://journal.r-project.org/archive/2010/RJ-2010-001/index.html},
+  pages = {5--12},
+  volume = {2},
+  number = {1}
+}
+    
+  
+    
+ at article{RJ-2010-003,
+  author = {Patrick Brown and Lutong Zhou},
+  title = {{MCMC for Generalized Linear Mixed Models with glmmBUGS}},
+  year = {2010},
+  journal = {{The R Journal}},
+  url = {https://journal.r-project.org/archive/2010/RJ-2010-003/index.html},
+  pages = {13--17},
+  volume = {2},
+  number = {1}
+}
+    
+  
+    
+ at article{RJ-2010-004,
+  author = {Nils B. Weidmann and Kristian Skrede Gleditsch},
+  title = {{Mapping and Measuring Country Shapes}},
+  year = {2010},
+  journal = {{The R Journal}},
+  url = {https://journal.r-project.org/archive/2010/RJ-2010-004/index.html},
+  pages = {18--24},
+  volume = {2},
+  number = {1}
+}
+    
+  
+    
+ at article{RJ-2010-005,
+  author = {Stefan Wilhelm and B. G. Manjunath},
+  title = {{tmvtnorm: A Package for the Truncated Multivariate Normal
+          Distribution}},
+  year = {2010},
+  journal = {{The R Journal}},
+  url = {https://journal.r-project.org/archive/2010/RJ-2010-005/index.html},
+  pages = {25--29},
+  volume = {2},
+  number = {1}
+}
+    
+  
+    
+ at article{RJ-2010-006,
+  author = {Frauke Günther and Stefan Fritsch},
+  title = {{neuralnet: Training of Neural Networks}},
+  year = {2010},
+  journal = {{The R Journal}},
+  url = {https://journal.r-project.org/archive/2010/RJ-2010-006/index.html},
+  pages = {30--38},
+  volume = {2},
+  number = {1}
+}
+    
+  
+    
+ at article{RJ-2010-007,
+  author = {Wiebke Werft and Axel Benner},
+  title = {{glmperm: A Permutation of Regressor Residuals Test for
+          Inference in Generalized Linear Models}},
+  year = {2010},
+  journal = {{The R Journal}},
+  url = {https://journal.r-project.org/archive/2010/RJ-2010-007/index.html},
+  pages = {39--43},
+  volume = {2},
+  number = {1}
+}
+    
+  
+    
+ at article{RJ-2010-002,
+  author = {Jean Thioulouse and Claire Valiente-Moro and Lionel Zenner},
+  title = {{Online Reproducible Research: An Application to Multivariate
+          Analysis of Bacterial DNA Fingerprint Data}},
+  year = {2010},
+  journal = {{The R Journal}},
+  url = {https://journal.r-project.org/archive/2010/RJ-2010-002/index.html},
+  pages = {44--52},
+  volume = {2},
+  number = {1}
+}
+    
+  
+    
+ at article{RJ-2010-008,
+  author = {Michael P. Fay},
+  title = {{Two-sided Exact Tests and Matching Confidence Intervals for
+          Discrete Data}},
+  year = {2010},
+  journal = {{The R Journal}},
+  url = {https://journal.r-project.org/archive/2010/RJ-2010-008/index.html},
+  pages = {53--58},
+  volume = {2},
+  number = {1}
+}
+    
+  
+
+  
+    
+ at article{RJ-2010-013,
+  author = {Karline Soetaert and Thomas Petzoldt and R. Woodrow Setzer},
+  title = {{Solving Differential Equations in R}},
+  year = {2010},
+  journal = {{The R Journal}},
+  url = {https://journal.r-project.org/archive/2010/RJ-2010-013/index.html},
+  pages = {5--15},
+  volume = {2},
+  number = {2}
+}
+    
+  
+    
+ at article{RJ-2010-010,
+  author = {Duncan Murdoch},
+  title = {{Source References}},
+  year = {2010},
+  journal = {{The R Journal}},
+  url = {https://journal.r-project.org/archive/2010/RJ-2010-010/index.html},
+  pages = {16--19},
+  volume = {2},
+  number = {2}
+}
+    
+  
+    
+ at article{RJ-2010-009,
+  author = {Lars Rönnegård and Xia Shen and Moudud Alam},
+  title = {{hglm: A Package for Fitting Hierarchical Generalized Linear
+          Models}},
+  year = {2010},
+  journal = {{The R Journal}},
+  url = {https://journal.r-project.org/archive/2010/RJ-2010-009/index.html},
+  pages = {20--28},
+  volume = {2},
+  number = {2}
+}
+    
+  
+    
+ at article{RJ-2010-011,
+  author = {Péter Sólymos},
+  title = {{dclone: Data Cloning in R}},
+  year = {2010},
+  journal = {{The R Journal}},
+  url = {https://journal.r-project.org/archive/2010/RJ-2010-011/index.html},
+  pages = {29--37},
+  volume = {2},
+  number = {2}
+}
+    
+  
+    
+ at article{RJ-2010-012,
+  author = {Hadley Wickham},
+  title = {{stringr: modern, consistent string processing}},
+  year = {2010},
+  journal = {{The R Journal}},
+  url = {https://journal.r-project.org/archive/2010/RJ-2010-012/index.html},
+  pages = {38--40},
+  volume = {2},
+  number = {2}
+}
+    
+  
+    
+ at article{RJ-2010-014,
+  author = {David Ardia and Lennart F. Hoogerheide},
+  title = {{Bayesian Estimation of the GARCH(1,1) Model with Student-t
+          Innovations}},
+  year = {2010},
+  journal = {{The R Journal}},
+  url = {https://journal.r-project.org/archive/2010/RJ-2010-014/index.html},
+  pages = {41--47},
+  volume = {2},
+  number = {2}
+}
+    
+  
+    
+ at article{RJ-2010-015,
+  author = {Adelino Ferreira da Silva},
+  title = {{cudaBayesreg: Bayesian Computation in CUDA}},
+  year = {2010},
+  journal = {{The R Journal}},
+  url = {https://journal.r-project.org/archive/2010/RJ-2010-015/index.html},
+  pages = {48--55},
+  volume = {2},
+  number = {2}
+}
+    
+  
+    
+ at article{RJ-2010-016,
+  author = {Christopher R. Bilder and Boan Zhang and Frank Schaarschmidt
+          and Joshua M. Tebbs},
+  title = {{binGroup: A Package for Group Testing}},
+  year = {2010},
+  journal = {{The R Journal}},
+  url = {https://journal.r-project.org/archive/2010/RJ-2010-016/index.html},
+  pages = {56--60},
+  volume = {2},
+  number = {2}
+}
+    
+  
+    
+ at article{RJ-2010-017,
+  author = {Murat Sariyar and Andreas Borg},
+  title = {{The RecordLinkage Package: Detecting Errors in Data}},
+  year = {2010},
+  journal = {{The R Journal}},
+  url = {https://journal.r-project.org/archive/2010/RJ-2010-017/index.html},
+  pages = {61--67},
+  volume = {2},
+  number = {2}
+}
+    
+  
+    
+ at article{RJ-2010-018,
+  author = {Hemant Ishwaran and Udaya B. Kogalur and J. Sunil Rao},
+  title = {{spikeslab: Prediction and Variable Selection Using Spike and
+          Slab Regression}},
+  year = {2010},
+  journal = {{The R Journal}},
+  url = {https://journal.r-project.org/archive/2010/RJ-2010-018/index.html},
+  pages = {68--73},
+  volume = {2},
+  number = {2}
+}
+    
+  
+
+  
+    
+ at article{RJ-2011-002,
+  author = {Hadley Wickham},
+  title = {{testthat: Get Started with Testing}},
+  year = {2011},
+  journal = {{The R Journal}},
+  url = {https://journal.r-project.org/archive/2011/RJ-2011-002/index.html},
+  pages = {5--10},
+  volume = {3},
+  number = {1}
+}
+    
+  
+    
+ at article{RJ-2011-003,
+  author = {Angela Bohn and Ingo Feinerer and Kurt Hornik and Patrick
+          Mair},
+  title = {{Content-Based Social Network Analysis of Mailing Lists}},
+  year = {2011},
+  journal = {{The R Journal}},
+  url = {https://journal.r-project.org/archive/2011/RJ-2011-003/index.html},
+  pages = {11--18},
+  volume = {3},
+  number = {1}
+}
+    
+  
+    
+ at article{RJ-2011-001,
+  author = {Yohan Chalabi and Martin Mächler and Diethelm Würtz},
+  title = {{Rmetrics - timeDate Package}},
+  year = {2011},
+  journal = {{The R Journal}},
+  url = {https://journal.r-project.org/archive/2011/RJ-2011-001/index.html},
+  pages = {19--24},
+  volume = {3},
+  number = {1}
+}
+    
+  
+    
+ at article{RJ-2011-004,
+  author = {Timothée Poisot},
+  title = {{The digitize Package: Extracting Numerical Data from
+          Scatterplots}},
+  year = {2011},
+  journal = {{The R Journal}},
+  url = {https://journal.r-project.org/archive/2011/RJ-2011-004/index.html},
+  pages = {25--26},
+  volume = {3},
+  number = {1}
+}
+    
+  
+    
+ at article{RJ-2011-005,
+  author = {David Ardia and Kris Boudt and Peter Carl and Katharine M.
+          Mullen and Brian G. Peterson},
+  title = {{Differential Evolution with DEoptim}},
+  year = {2011},
+  journal = {{The R Journal}},
+  url = {https://journal.r-project.org/archive/2011/RJ-2011-005/index.html},
+  pages = {27--34},
+  volume = {3},
+  number = {1}
+}
+    
+  
+    
+ at article{RJ-2011-006,
+  author = {Andy South},
+  title = {{rworldmap : a new R package for mapping global data}},
+  year = {2011},
+  journal = {{The R Journal}},
+  url = {https://journal.r-project.org/archive/2011/RJ-2011-006/index.html},
+  pages = {35--43},
+  volume = {3},
+  number = {1}
+}
+    
+  
+    
+ at article{RJ-2011-007,
+  author = {Frédéric Lafitte and Dirk Van Heule and Julien Van hamme},
+  title = {{Cryptographic Boolean Functions with R}},
+  year = {2011},
+  journal = {{The R Journal}},
+  url = {https://journal.r-project.org/archive/2011/RJ-2011-007/index.html},
+  pages = {44--47},
+  volume = {3},
+  number = {1}
+}
+    
+  
+    
+ at article{RJ-2011-008,
+  author = {Paul Murrell},
+  title = {{Raster Images in R Graphics}},
+  year = {2011},
+  journal = {{The R Journal}},
+  url = {https://journal.r-project.org/archive/2011/RJ-2011-008/index.html},
+  pages = {48--54},
+  volume = {3},
+  number = {1}
+}
+    
+  
+    
+ at article{RJ-2011-009,
+  author = {Chris Fraley and Adrian Raftery and Tilmann Gneiting and
+          McLean Sloughter and Veronica Berrocal},
+  title = {{Probabilistic Weather Forecasting in R}},
+  year = {2011},
+  journal = {{The R Journal}},
+  url = {https://journal.r-project.org/archive/2011/RJ-2011-009/index.html},
+  pages = {55--63},
+  volume = {3},
+  number = {1}
+}
+    
+  
+    
+ at article{RJ-2011-010,
+  author = {David Kane and Andrew Liu and Khanh Nguyen},
+  title = {{Analyzing an Electronic Limit Order Book}},
+  year = {2011},
+  journal = {{The R Journal}},
+  url = {https://journal.r-project.org/archive/2011/RJ-2011-010/index.html},
+  pages = {64--68},
+  volume = {3},
+  number = {1}
+}
+    
+  
+    
+      
+
+        
+ at Article{RJournal:2011-1:Hyndman,
+  author       = {Rob J. Hyndman}, 
+  title        = {Giving a {useR!} Talk}, 
   journal      = {The R Journal},
-  year         = 2013,
-  volume       = 5,
-  number       = 2,
-  pages        = {53--62},
-  month        = Dec,
-  url          = {http://journal.r-project.org/archive/2013-2/RJournal_2013-2_lu-kane.pdf}
+  year         = 2011,
+  volume       = 3,
+  number       = 1,
+  pages        = {69--71},
+  month        = jun,
+  url          = {http://journal.r-project.org/archive/2011-1/RJournal_2011-1_Hyndman.pdf}
 }
+        
+      
+    
+  
+    
+      
 
-
-
- at Article{ RJournal:2013-2:wang-shan,
-  author       = {Weizhen Wang and Guogen Shan},
-  title        = {{ExactCIdiff: An R Package for Computing Exact Confidence Intervals for the Difference of Two Proportions}},
+        
+ at Article{RJournal:2011-1:Cook,
+  author       = {Dianne Cook}, 
+  title        = {Tips for Presenting Your Work}, 
   journal      = {The R Journal},
-  year         = 2013,
-  volume       = 5,
-  number       = 2,
-  pages        = {62--71},
-  month        = Dec,
-  url          = {http://journal.r-project.org/archive/2013-2/RJournal_2013-2_wang-shan.pdf}
+  year         = 2011,
+  volume       = 3,
+  number       = 1,
+  pages        = {72--74},
+  month        = jun,
+  url          = {http://journal.r-project.org/archive/2011-1/RJournal_2011-1_Cook.pdf}
 }
-
-
-
- at Article{ RJournal:2013-2:bilgic-susmann,
-  author       = {Yusuf K. Bilgic and Herb Susmann},
-  title        = {{rlme: An R Package for Rank-Based Estimation and Prediction in Random Effects Nested Models}},
+        
+      
+    
+  
+
+  
+    
+ at article{RJ-2011-011,
+  author = {Thomas Baier and Erich Neuwirth and Michele De Meo},
+  title = {{Creating and Deploying an Application with (R)Excel and R}},
+  year = {2011},
+  journal = {{The R Journal}},
+  url = {https://journal.r-project.org/archive/2011/RJ-2011-011/index.html},
+  pages = {5--11},
+  volume = {3},
+  number = {2}
+}
+    
+  
+    
+ at article{RJ-2011-012,
+  author = {Ian C. Marschner},
+  title = {{glm2: Fitting Generalized Linear Models with Convergence
+          Problems}},
+  year = {2011},
+  journal = {{The R Journal}},
+  url = {https://journal.r-project.org/archive/2011/RJ-2011-012/index.html},
+  pages = {12--15},
+  volume = {3},
+  number = {2}
+}
+    
+  
+    
+ at article{RJ-2011-013,
+  author = {Michael Lundholm},
+  title = {{Implementing the Compendium Concept with Sweave and DOCSTRIP}},
+  year = {2011},
+  journal = {{The R Journal}},
+  url = {https://journal.r-project.org/archive/2011/RJ-2011-013/index.html},
+  pages = {16--21},
+  volume = {3},
+  number = {2}
+}
+    
+  
+    
+ at article{RJ-2011-014,
+  author = {Kurt Hornik and Duncan Murdoch},
+  title = {{Watch Your Spelling!}},
+  year = {2011},
+  journal = {{The R Journal}},
+  url = {https://journal.r-project.org/archive/2011/RJ-2011-014/index.html},
+  pages = {22--28},
+  volume = {3},
+  number = {2}
+}
+    
+  
+    
+ at article{RJ-2011-015,
+  author = {Haizhou Wang and Mingzhou Song},
+  title = {{Ckmeans.1d.dp: Optimal k-means Clustering in One Dimension
+          by Dynamic Programming}},
+  year = {2011},
+  journal = {{The R Journal}},
+  url = {https://journal.r-project.org/archive/2011/RJ-2011-015/index.html},
+  pages = {29--33},
+  volume = {3},
+  number = {2}
+}
+    
+  
+    
+ at article{RJ-2011-016,
+  author = {Taylor B. Arnold and John W. Emerson},
+  title = {{Nonparametric Goodness-of-Fit Tests for Discrete Null
+          Distributions}},
+  year = {2011},
+  journal = {{The R Journal}},
+  url = {https://journal.r-project.org/archive/2011/RJ-2011-016/index.html},
+  pages = {34--39},
+  volume = {3},
+  number = {2}
+}
+    
+  
+    
+ at article{RJ-2011-017,
+  author = {Markus Gesmann and Diego de Castillo},
+  title = {{Using the Google Visualisation API with R}},
+  year = {2011},
+  journal = {{The R Journal}},
+  url = {https://journal.r-project.org/archive/2011/RJ-2011-017/index.html},
+  pages = {40--44},
+  volume = {3},
+  number = {2}
+}
+    
+  
+    
+ at article{RJ-2011-018,
+  author = {Maxime Hervé},
+  title = {{GrapheR: a Multiplatform GUI for Drawing Customizable Graphs
+          in R}},
+  year = {2011},
+  journal = {{The R Journal}},
+  url = {https://journal.r-project.org/archive/2011/RJ-2011-018/index.html},
+  pages = {45--53},
+  volume = {3},
+  number = {2}
+}
+    
+  
+    
+ at article{RJ-2011-019,
+  author = {Han Lin Shang},
+  title = {{rainbow: An R Package for Visualizing Functional Time Series}},
+  year = {2011},
+  journal = {{The R Journal}},
+  url = {https://journal.r-project.org/archive/2011/RJ-2011-019/index.html},
+  pages = {54--59},
+  volume = {3},
+  number = {2}
+}
+    
+  
+    
+ at article{RJ-2011-020,
+  author = {Martyn Plummer},
+  title = {{Portable C++ for R Packages}},
+  year = {2011},
+  journal = {{The R Journal}},
+  url = {https://journal.r-project.org/archive/2011/RJ-2011-020/index.html},
+  pages = {60--63},
+  volume = {3},
+  number = {2}
+}
+    
+  
+
+  
+    
+ at article{RJ-2012-001,
+  author = {Adrian G Barnett and Peter Baker and Annette J Dobson},
+  title = {{Analysing Seasonal Data}},
+  year = {2012},
+  journal = {{The R Journal}},
+  url = {https://journal.r-project.org/archive/2012/RJ-2012-001/index.html},
+  pages = {5--10},
+  volume = {4},
+  number = {1}
+}
+    
+  
+    
+ at article{RJ-2012-002,
+  author = {Elizabeth E. Holmes and Eric J. Ward and Kellie Wills},
+  title = {{MARSS: Multivariate Autoregressive State-space Models for
+          Analyzing Time-series Data}},
+  year = {2012},
+  journal = {{The R Journal}},
+  url = {https://journal.r-project.org/archive/2012/RJ-2012-002/index.html},
+  pages = {11--19},
+  volume = {4},
+  number = {1}
+}
+    
+  
+    
+ at article{RJ-2012-003,
+  author = {Karl Ropkins and David C. Carslaw},
+  title = {{openair - Data Analysis Tools for the Air Quality Community}},
+  year = {2012},
+  journal = {{The R Journal}},
+  url = {https://journal.r-project.org/archive/2012/RJ-2012-003/index.html},
+  pages = {20--29},
+  volume = {4},
+  number = {1}
+}
+    
+  
+    
+ at article{RJ-2012-004,
+  author = {Daniel Adler},
+  title = {{Foreign Library Interface}},
+  year = {2012},
+  journal = {{The R Journal}},
+  url = {https://journal.r-project.org/archive/2012/RJ-2012-004/index.html},
+  pages = {30--40},
+  volume = {4},
+  number = {1}
+}
+    
+  
+    
+ at article{RJ-2012-005,
+  author = {John Lawson},
+  title = {{Vdgraph: A Package for Creating Variance Dispersion Graphs}},
+  year = {2012},
+  journal = {{The R Journal}},
+  url = {https://journal.r-project.org/archive/2012/RJ-2012-005/index.html},
+  pages = {41--44},
+  volume = {4},
+  number = {1}
+}
+    
+  
+    
+ at article{RJ-2012-006,
+  author = {Sarah C. Anoke and Yuting Zhao and Rafael Jaeger and
+          Nicholas J. Horton},
+  title = {{xgrid and R: Parallel Distributed Processing Using
+          Heterogeneous Groups of Apple Computers}},
+  year = {2012},
+  journal = {{The R Journal}},
+  url = {https://journal.r-project.org/archive/2012/RJ-2012-006/index.html},
+  pages = {45--55},
+  volume = {4},
+  number = {1}
+}
+    
+  
+    
+ at article{RJ-2012-007,
+  author = {Timothy P. Jurka},
+  title = {{maxent: An R Package for Low-memory Multinomial
+          Logistic Regression with Support for Semi-automated Text
+          Classification}},
+  year = {2012},
+  journal = {{The R Journal}},
+  url = {https://journal.r-project.org/archive/2012/RJ-2012-007/index.html},
+  pages = {56--59},
+  volume = {4},
+  number = {1}
+}
+    
+  
+    
+ at article{RJ-2012-008,
+  author = {Timothy T. Bergsma and Michael S. Smith},
+  title = {{Sumo: An Authenticating Web Application with an Embedded R
+          Session}},
+  year = {2012},
+  journal = {{The R Journal}},
+  url = {https://journal.r-project.org/archive/2012/RJ-2012-008/index.html},
+  pages = {60--63},
+  volume = {4},
+  number = {1}
+}
+    
+  
+    
+ at article{RJ-2012-009,
+  author = {Kurt Hornik and Duncan Murdoch and Achim Zeileis},
+  title = {{Who Did What? The Roles of R Package Authors and How to
+          Refer to Them}},
+  year = {2012},
+  journal = {{The R Journal}},
+  url = {https://journal.r-project.org/archive/2012/RJ-2012-009/index.html},
+  pages = {64--69},
+  volume = {4},
+  number = {1}
+}
+    
+  
+
+  
+    
+ at article{RJ-2012-016,
+  author = {Paul Murrell},
+  title = {{What's in a Name?}},
+  year = {2012},
+  journal = {{The R Journal}},
+  url = {https://journal.r-project.org/archive/2012/RJ-2012-016/index.html},
+  pages = {5--12},
+  volume = {4},
+  number = {2}
+}
+    
+  
+    
+ at article{RJ-2012-017,
+  author = {Paul Murrell},
+  title = {{It's Not What You Draw,It's What You Don't Draw}},
+  year = {2012},
+  journal = {{The R Journal}},
+  url = {https://journal.r-project.org/archive/2012/RJ-2012-017/index.html},
+  pages = {13--18},
+  volume = {4},
+  number = {2}
+}
+    
+  
+    
+ at article{RJ-2012-013,
+  author = {Paul Murrell and Velvet Ly},
+  title = {{Debugging grid Graphics}},
+  year = {2012},
+  journal = {{The R Journal}},
+  url = {https://journal.r-project.org/archive/2012/RJ-2012-013/index.html},
+  pages = {19--27},
+  volume = {4},
+  number = {2}
+}
+    
+  
+    
+ at article{RJ-2012-010,
+  author = {Il Do Ha and Maengseok Noh and Youngjo Lee},
+  title = {{frailtyHL: A Package for Fitting Frailty Models with H-
+          likelihood}},
+  year = {2012},
+  journal = {{The R Journal}},
+  url = {https://journal.r-project.org/archive/2012/RJ-2012-010/index.html},
+  pages = {28--37},
+  volume = {4},
+  number = {2}
+}
+    
+  
+    
+ at article{RJ-2012-011,
+  author = {Rense Nieuwenhuis and Manfred te Grotenhuis and Ben Pelzer},
+  title = {{influence.ME: Tools for Detecting Influential Data in Mixed
+          Effects Models}},
+  year = {2012},
+  journal = {{The R Journal}},
+  url = {https://journal.r-project.org/archive/2012/RJ-2012-011/index.html},
+  pages = {38--47},
+  volume = {4},
+  number = {2}
+}
+    
+  
+    
+ at article{RJ-2012-012,
+  author = {Zhenghua Nie and Jeffrey S. Racine},
+  title = {{The crs Package: Nonparametric Regression Splines for
+          Continuous and Categorical Predictors}},
+  year = {2012},
+  journal = {{The R Journal}},
+  url = {https://journal.r-project.org/archive/2012/RJ-2012-012/index.html},
+  pages = {48--56},
+  volume = {4},
+  number = {2}
+}
+    
+  
+    
+ at article{RJ-2012-014,
+  author = {John D. Kloke and Joseph W. McKean},
+  title = {{Rfit: Rank-based Estimation for Linear Models}},
+  year = {2012},
+  journal = {{The R Journal}},
+  url = {https://journal.r-project.org/archive/2012/RJ-2012-014/index.html},
+  pages = {57--64},
+  volume = {4},
+  number = {2}
+}
+    
+  
+    
+ at article{RJ-2012-015,
+  author = {Kayvan Sadeghi and Giovanni M. Marchetti},
+  title = {{Graphical Markov Models with Mixed Graphs in R}},
+  year = {2012},
+  journal = {{The R Journal}},
+  url = {https://journal.r-project.org/archive/2012/RJ-2012-015/index.html},
+  pages = {65--73},
+  volume = {4},
+  number = {2}
+}
+    
+  
+    
+ at article{RJ-2012-018,
+  author = {Rasmus Bååth},
+  title = {{The State of Naming Conventions in R}},
+  year = {2012},
+  journal = {{The R Journal}},
+  url = {https://journal.r-project.org/archive/2012/RJ-2012-018/index.html},
+  pages = {74--75},
+  volume = {4},
+  number = {2}
+}
+    
+  
+
+  
+    
+      
+
+        
+ at Article{editorial:2013,
+  author       = {Hadley Wickham}, 
+  title        = {Editorial}, 
   journal      = {The R Journal},
   year         = 2013,
   volume       = 5,
-  number       = 2,
-  pages        = {71--80},
-  month        = Dec,
-  url          = {http://journal.r-project.org/archive/2013-2/RJournal_2013-2_bilgic-susmann.pdf}
-}
-
-
-
- at Article{ RJournal:2013-2:sax-steiner,
-  author       = {Christoph Sax and Peter Steiner},
-  title        = {{Temporal Disaggregation of Time Series}},
+  number       = 1,
+  pages        = {4--5},  
+  month        = jun,
+  url          = {http://journal.r-project.org/archive/2013-1/editorial.pdf}
+}
+        
+      
+    
+  
+    
+      
+    
+  
+    
+ at article{RJ-2013-001,
+  author = {Timothy P. Jurka and Loren Collingwood and Amber E. Boydstun
+          and Emiliano Grossman and Wouter van Atteveldt},
+  title = {{RTextTools: A Supervised Learning Package for Text
+          Classification}},
+  year = {2013},
+  journal = {{The R Journal}},
+  url = {https://journal.r-project.org/archive/2013/RJ-2013-001/index.html},
+  pages = {6--12},
+  volume = {5},
+  number = {1}
+}
+    
+  
+    
+ at article{RJ-2013-002,
+  author = {Yang Xiang and Sylvain Gubian and Brian Suomela and Julia
+          Hoeng},
+  title = {{Generalized Simulated Annealing for Global Optimization: The
+          GenSA Package}},
+  year = {2013},
+  journal = {{The R Journal}},
+  url = {https://journal.r-project.org/archive/2013/RJ-2013-002/index.html},
+  pages = {13--28},
+  volume = {5},
+  number = {1}
+}
+    
+  
+    
+ at article{RJ-2013-003,
+  author = {Belchin Kostov and Mónica Bécue-Bertaut and François Husson},
+  title = {{Multiple Factor Analysis for Contingency Tables in the
+          FactoMineR Package}},
+  year = {2013},
+  journal = {{The R Journal}},
+  url = {https://journal.r-project.org/archive/2013/RJ-2013-003/index.html},
+  pages = {29--38},
+  volume = {5},
+  number = {1}
+}
+    
+  
+    
+ at article{RJ-2013-004,
+  author = {John Fox and Michael Friendly and Sanford Weisberg},
+  title = {{Hypothesis Tests for Multivariate Linear Models Using the
+          car Package}},
+  year = {2013},
+  journal = {{The R Journal}},
+  url = {https://journal.r-project.org/archive/2013/RJ-2013-004/index.html},
+  pages = {39--52},
+  volume = {5},
+  number = {1}
+}
+    
+  
+    
+ at article{RJ-2013-005,
+  author = {Manuel J. A. Eugster and Thomas Schlesinger},
+  title = {{osmar: OpenStreetMap and R}},
+  year = {2013},
+  journal = {{The R Journal}},
+  url = {https://journal.r-project.org/archive/2013/RJ-2013-005/index.html},
+  pages = {53--63},
+  volume = {5},
+  number = {1}
+}
+    
+  
+    
+ at article{RJ-2013-006,
+  author = {Han Lin Shang},
+  title = {{ftsa: An R Package for Analyzing Functional Time Series}},
+  year = {2013},
+  journal = {{The R Journal}},
+  url = {https://journal.r-project.org/archive/2013/RJ-2013-006/index.html},
+  pages = {64--72},
+  volume = {5},
+  number = {1}
+}
+    
+  
+    
+ at article{RJ-2013-007,
+  author = {A. Jonathan R. Godfrey},
+  title = {{Statistical Software from a Blind Person's Perspective}},
+  year = {2013},
+  journal = {{The R Journal}},
+  url = {https://journal.r-project.org/archive/2013/RJ-2013-007/index.html},
+  pages = {73--79},
+  volume = {5},
+  number = {1}
+}
+    
+  
+    
+ at article{RJ-2013-008,
+  author = {Paolo Zagaglia},
+  title = {{PIN: Measuring Asymmetric Information in Financial Markets
+          with R}},
+  year = {2013},
+  journal = {{The R Journal}},
+  url = {https://journal.r-project.org/archive/2013/RJ-2013-008/index.html},
+  pages = {80--86},
+  volume = {5},
+  number = {1}
+}
+    
+  
+    
+ at article{RJ-2013-009,
+  author = {Alrik Thiem and Adrian Duşa},
+  title = {{QCA: A Package for Qualitative Comparative Analysis}},
+  year = {2013},
+  journal = {{The R Journal}},
+  url = {https://journal.r-project.org/archive/2013/RJ-2013-009/index.html},
+  pages = {87--97},
+  volume = {5},
+  number = {1}
+}
+    
+  
+    
+ at article{RJ-2013-010,
+  author = {Mathieu Colléter and Jérôme Guitton and Didier Gascuel},
+  title = {{An Introduction to the EcoTroph R Package: Analyzing Aquatic
+          Ecosystem Trophic Networks}},
+  year = {2013},
+  journal = {{The R Journal}},
+  url = {https://journal.r-project.org/archive/2013/RJ-2013-010/index.html},
+  pages = {98--107},
+  volume = {5},
+  number = {1}
+}
+    
+  
+    
+ at article{RJ-2013-011,
+  author = {Matteo Dell’Omodarme and Giada Valle},
+  title = {{stellaR: A Package to Manage Stellar Evolution Tracks and
+          Isochrones}},
+  year = {2013},
+  journal = {{The R Journal}},
+  url = {https://journal.r-project.org/archive/2013/RJ-2013-011/index.html},
+  pages = {108--116},
+  volume = {5},
+  number = {1}
+}
+    
+  
+    
+ at article{RJ-2013-012,
+  author = {Antony Unwin and Heike Hofmann and Dianne Cook},
+  title = {{Let Graphics Tell the Story - Datasets in R}},
+  year = {2013},
+  journal = {{The R Journal}},
+  url = {https://journal.r-project.org/archive/2013/RJ-2013-012/index.html},
+  pages = {117--129},
+  volume = {5},
+  number = {1}
+}
+    
+  
+    
+ at article{RJ-2013-013,
+  author = {Stefan Wilhelm and Miguel Godinho de Matos},
+  title = {{Estimating Spatial Probit Models in R}},
+  year = {2013},
+  journal = {{The R Journal}},
+  url = {https://journal.r-project.org/archive/2013/RJ-2013-013/index.html},
+  pages = {130--143},
+  volume = {5},
+  number = {1}
+}
+    
+  
+    
+ at article{RJ-2013-014,
+  author = {David Kahle and Hadley Wickham},
+  title = {{ggmap: Spatial Visualization with ggplot2}},
+  year = {2013},
+  journal = {{The R Journal}},
+  url = {https://journal.r-project.org/archive/2013/RJ-2013-014/index.html},
+  pages = {144--161},
+  volume = {5},
+  number = {1}
+}
+    
+  
+    
+ at article{RJ-2013-015,
+  author = {David Kahle},
+  title = {{mpoly: Multivariate Polynomials in R}},
+  year = {2013},
+  journal = {{The R Journal}},
+  url = {https://journal.r-project.org/archive/2013/RJ-2013-015/index.html},
+  pages = {162--170},
+  volume = {5},
+  number = {1}
+}
+    
+  
+    
+ at article{RJ-2013-016,
+  author = {Anyiawung Chiara Forcheh and Geert Verbeke and Adetayo Kasim
+          and Dan Lin and Ziv Shkedy and Willem Talloen and Hinrich
+          W.H. Göhlmann and Lieven Clement},
+  title = {{beadarrayFilter: An R Package to Filter Beads}},
+  year = {2013},
+  journal = {{The R Journal}},
+  url = {https://journal.r-project.org/archive/2013/RJ-2013-016/index.html},
+  pages = {171--180},
+  volume = {5},
+  number = {1}
+}
+    
+  
+    
+ at article{RJ-2013-017,
+  author = {Lee S. McDaniel and Nicholas C. Henderson and Paul J.
+          Rathouz},
+  title = {{Fast Pure R Implementation of GEE: Application of the Matrix
+          Package}},
+  year = {2013},
+  journal = {{The R Journal}},
+  url = {https://journal.r-project.org/archive/2013/RJ-2013-017/index.html},
+  pages = {181--187},
+  volume = {5},
+  number = {1}
+}
+    
+  
+    
+ at article{RJ-2013-018,
+  author = {Milan Bouchet-Valat and Gilles Bastin},
+  title = {{RcmdrPlugin.temis, a Graphical Integrated Text Mining
+          Solution in R}},
+  year = {2013},
+  journal = {{The R Journal}},
+  url = {https://journal.r-project.org/archive/2013/RJ-2013-018/index.html},
+  pages = {188--196},
+  volume = {5},
+  number = {1}
+}
+    
+  
+    
+ at article{RJ-2013-019,
+  author = {Jeroen Ooms},
+  title = {{Possible Directions for Improving Dependency Versioning in R}},
+  year = {2013},
+  journal = {{The R Journal}},
+  url = {https://journal.r-project.org/archive/2013/RJ-2013-019/index.html},
+  pages = {197--206},
+  volume = {5},
+  number = {1}
+}
+    
+  
+    
+ at article{RJ-2013-020,
+  author = {David S. LeBauer and Michael C. Dietze and Benjamin M.
+          Bolker},
+  title = {{Translating Probability Density Functions: From R to BUGS
+          and Back Again}},
+  year = {2013},
+  journal = {{The R Journal}},
+  url = {https://journal.r-project.org/archive/2013/RJ-2013-020/index.html},
+  pages = {207--209},
+  volume = {5},
+  number = {1}
+}
+    
+  
+    
+      
+    
+  
+    
+      
+
+        
+ at Article{chinese-r-conf:2013,
+  author       = {Jing Leng and Jingjing Guan}, 
+  title        = {Conference Review: The 6th {C}hinese {R} Conference}, 
   journal      = {The R Journal},
   year         = 2013,
   volume       = 5,
-  number       = 2,
-  pages        = {80--88},
-  month        = Dec,
-  url          = {http://journal.r-project.org/archive/2013-2/RJournal_2013-2_sax-steiner.pdf}
+  number       = 1,
+  pages        = {210--211},  
+  month        = jun,
+  url          = {http://journal.r-project.org/archive/2013-1/chinese-r-conf.pdf}
 }
+        
+      
+    
+  
+    
+      
 
-
-
- at Article{ RJournal:2013-2:boehringer,
-  author       = {Stefan Boehringer},
-  title        = {{Dynamic Parallelization of R Functions}},
+        
+ at Article{r-finance:2013,
+  author       = {Joshua Ulrich}, 
+  title        = {Conference Report: {R/F}inance 2013}, 
   journal      = {The R Journal},
   year         = 2013,
   volume       = 5,
-  number       = 2,
-  pages        = {88--97},
-  month        = Dec,
-  url          = {http://journal.r-project.org/archive/2013-2/RJournal_2013-2_boehringer.pdf}
+  number       = 1,
+  pages        = {212--214},  
+  month        = jun,
+  url          = {http://journal.r-project.org/archive/2013-1/r-finance.pdf}
 }
+        
+      
+    
+  
+    
+      
 
-
-
- at Article{ RJournal:2013-2:nadarajah-bakar,
-  author       = {S. Nadarajah and S. A. A. Bakar},
-  title        = {{CompLognormal: An R package for composite lognormal distributions}},
+        
+ at Article{user2013:2013,
+  author       = {{UseR 2013 Organising Committee}}, 
+  title        = {The {R} {U}ser {C}onference 2013}, 
   journal      = {The R Journal},
   year         = 2013,
   volume       = 5,
-  number       = 2,
-  pages        = {97--104},
-  month        = Dec,
-  url          = {http://journal.r-project.org/archive/2013-2/RJournal_2013-2_nadarajah-bakar.pdf}
+  number       = 1,
+  pages        = {215--217},  
+  month        = jun,
+  url          = {http://journal.r-project.org/archive/2013-1/user2013.pdf}
 }
+        
+      
+    
+  
+    
+      
 
-
-
- at Article{ RJournal:2013-2:gaure,
-  author       = {Simen Gaure},
-  title        = {{lfe: Fitting Linear Models with Multiple Factors with Many Levels}},
+        
+ at Article{bioconductor:2013,
+  author       = {{Bioconductor Team}}, 
+  title        = {News from the {B}ioconductor Project}, 
   journal      = {The R Journal},
   year         = 2013,
   volume       = 5,
-  number       = 2,
-  pages        = {104--117},
-  month        = Dec,
-  url          = {http://journal.r-project.org/archive/2013-2/RJournal_2013-2_gaure.pdf}
+  number       = 1,
+  pages        = {218--219},  
+  month        = jun,
+  url          = {http://journal.r-project.org/archive/2013-1/bioconductor.pdf}
 }
+        
+      
+    
+  
+    
+      
 
-
-
- at Article{ RJournal:2013-2:dietrich-zug-kaiser,
-  author       = {André Dietrich and Sebastian Zug and Jörg Kaiser},
-  title        = {{The R in Robotics}},
+        
+ at Article{r-foundation:2013,
+  author       = {Kurt Hornik}, 
+  title        = {{R} {F}oundation News}, 
   journal      = {The R Journal},
   year         = 2013,
   volume       = 5,
-  number       = 2,
-  pages        = {117--129},
-  month        = Dec,
-  url          = {http://journal.r-project.org/archive/2013-2/RJournal_2013-2_dietrich-zug-kaiser.pdf}
+  number       = 1,
+  pages        = {220--220},  
+  month        = jun,
+  url          = {http://journal.r-project.org/archive/2013-1/r-foundation.pdf}
 }
+        
+      
+    
+  
+    
+      
 
-
-
- at Article{ RJournal:2013-2:hofert,
-  author       = {Marius Hofert},
-  title        = {{On Sampling from the Multivariate t Distribution}},
+        
+ at Article{r-changes:2013,
+  author       = {{The R Core Team}}, 
+  title        = {Changes in {R}}, 
   journal      = {The R Journal},
   year         = 2013,
   volume       = 5,
-  number       = 2,
-  pages        = {129--137},
-  month        = Dec,
-  url          = {http://journal.r-project.org/archive/2013-2/RJournal_2013-2_hofert.pdf}
+  number       = 1,
+  pages        = {221--238},  
+  month        = jun,
+  url          = {http://journal.r-project.org/archive/2013-1/r-changes.pdf}
 }
+        
+      
+    
+  
+    
+      
 
-
-
- at Article{ RJournal:2013-2:sucarrat,
-  author       = {Genaro Sucarrat},
-  title        = {{betategarch: Simulation, Estimation and Forecasting of Beta-Skew-t-EGARCH Models}},
+        
+ at Article{cran:2013,
+  author       = {Kurt Hornik and Achim Zeileis}, 
+  title        = {Changes on {CRAN}}, 
   journal      = {The R Journal},
   year         = 2013,
   volume       = 5,
-  number       = 2,
-  pages        = {137--148},
-  month        = Dec,
-  url          = {http://journal.r-project.org/archive/2013-2/RJournal_2013-2_sucarrat.pdf}
+  number       = 1,
+  pages        = {239--264},  
+  month        = jun,
+  url          = {http://journal.r-project.org/archive/2013-1/cran.pdf}
 }
+        
+      
+    
+  
 
+  
+    
+      
 
-
- at Article{ RJournal:2013-2:murrell,
-  author       = {Paul Murrell},
-  title        = {{Changes to grid from 3.0.0}},
+        
+ at Article{editorial:2013,
+  author       = {Hadley Wickham}, 
+  title        = {Editorial}, 
   journal      = {The R Journal},
   year         = 2013,
   volume       = 5,
   number       = 2,
-  pages        = {148--161},
-  month        = Dec,
-  url          = {http://journal.r-project.org/archive/2013-2/RJournal_2013-2_murrell.pdf}
-}
-
-
-
- at Article{ RJournal:2013-2:r-foundation,
-  author       = {Kurt Hornik},
-  title        = {{R Foundation News}},
+  pages        = {3--3},  
+  month        = dec,
+  url          = {http://journal.r-project.org/archive/2013-2/editorial.pdf}
+}
+        
+      
+    
+  
+    
+      
+    
+  
+    
+ at article{RJ-2013-021,
+  author = {David A. Armstrong II},
+  title = {{factorplot: Improving Presentation of Simple Contrasts in
+          Generalized Linear Models}},
+  year = {2013},
+  journal = {{The R Journal}},
+  url = {https://journal.r-project.org/archive/2013/RJ-2013-021/index.html},
+  pages = {4--15},
+  volume = {5},
+  number = {2}
+}
+    
+  
+    
+ at article{RJ-2013-022,
+  author = {Luca Sartore},
+  title = {{spMC: Modelling Spatial Random Fields with Continuous Lag
+          Markov Chains}},
+  year = {2013},
+  journal = {{The R Journal}},
+  url = {https://journal.r-project.org/archive/2013/RJ-2013-022/index.html},
+  pages = {16--28},
+  volume = {5},
+  number = {2}
+}
+    
+  
+    
+ at article{RJ-2013-023,
+  author = {Pavel Michna and Milton Woods},
+  title = {{RNetCDF - A Package for Reading and Writing NetCDF Datasets}},
+  year = {2013},
+  journal = {{The R Journal}},
+  url = {https://journal.r-project.org/archive/2013/RJ-2013-023/index.html},
+  pages = {29--36},
+  volume = {5},
+  number = {2}
+}
+    
+  
+    
+ at article{RJ-2013-024,
+  author = {Stefan Rödiger and Alexander Böhm and Ingolf Schimke},
+  title = {{Surface Melting Curve Analysis with R}},
+  year = {2013},
+  journal = {{The R Journal}},
+  url = {https://journal.r-project.org/archive/2013/RJ-2013-024/index.html},
+  pages = {37--52},
+  volume = {5},
+  number = {2}
+}
+    
+  
+    
+ at article{RJ-2013-025,
+  author = {Yang Lu and David Kane},
+  title = {{Performance Attribution for Equity Portfolios}},
+  year = {2013},
+  journal = {{The R Journal}},
+  url = {https://journal.r-project.org/archive/2013/RJ-2013-025/index.html},
+  pages = {53--62},
+  volume = {5},
+  number = {2}
+}
+    
+  
+    
+ at article{RJ-2013-026,
+  author = {Guogen Shan and Weizhen Wang},
+  title = {{ExactCIdiff: An R Package for Computing Exact Confidence
+          Intervals for the Difference of Two Proportions}},
+  year = {2013},
+  journal = {{The R Journal}},
+  url = {https://journal.r-project.org/archive/2013/RJ-2013-026/index.html},
+  pages = {62--70},
+  volume = {5},
+  number = {2}
+}
+    
+  
+    
+ at article{RJ-2013-027,
+  author = {Yusuf K. Bilgic and Herbert Susmann},
+  title = {{rlme: An R Package for Rank-Based Estimation and Prediction
+          in Random Effects Nested Models}},
+  year = {2013},
+  journal = {{The R Journal}},
+  url = {https://journal.r-project.org/archive/2013/RJ-2013-027/index.html},
+  pages = {71--79},
+  volume = {5},
+  number = {2}
+}
+    
+  
+    
+ at article{RJ-2013-028,
+  author = {Christoph Sax and Peter Steiner},
+  title = {{Temporal Disaggregation of Time Series}},
+  year = {2013},
+  journal = {{The R Journal}},
+  url = {https://journal.r-project.org/archive/2013/RJ-2013-028/index.html},
+  pages = {80--87},
+  volume = {5},
+  number = {2}
+}
+    
+  
+    
+ at article{RJ-2013-029,
+  author = {Stefan Böhringer},
+  title = {{Dynamic Parallelization of R Functions}},
+  year = {2013},
+  journal = {{The R Journal}},
+  url = {https://journal.r-project.org/archive/2013/RJ-2013-029/index.html},
+  pages = {88--96},
+  volume = {5},
+  number = {2}
+}
+    
+  
+    
+ at article{RJ-2013-030,
+  author = {S. Nadarajah and S. A. A. Bakar},
+  title = {{CompLognormal: An R Package for Composite Lognormal
+          Distributions}},
+  year = {2013},
+  journal = {{The R Journal}},
+  url = {https://journal.r-project.org/archive/2013/RJ-2013-030/index.html},
+  pages = {97--103},
+  volume = {5},
+  number = {2}
+}
+    
+  
+    
+ at article{RJ-2013-031,
+  author = {Simen Gaure},
+  title = {{lfe: Linear Group Fixed Effects}},
+  year = {2013},
+  journal = {{The R Journal}},
+  url = {https://journal.r-project.org/archive/2013/RJ-2013-031/index.html},
+  pages = {104--116},
+  volume = {5},
+  number = {2}
+}
+    
+  
+    
+ at article{RJ-2013-032,
+  author = {André Dietrich and Sebastian Zug and Jörg Kaiser},
+  title = {{The R in Robotics}},
+  year = {2013},
+  journal = {{The R Journal}},
+  url = {https://journal.r-project.org/archive/2013/RJ-2013-032/index.html},
+  pages = {117--128},
+  volume = {5},
+  number = {2}
+}
+    
+  
+    
+ at article{RJ-2013-033,
+  author = {Marius Hofert},
+  title = {{On Sampling from the Multivariate t Distribution}},
+  year = {2013},
+  journal = {{The R Journal}},
+  url = {https://journal.r-project.org/archive/2013/RJ-2013-033/index.html},
+  pages = {129--136},
+  volume = {5},
+  number = {2}
+}
+    
+  
+    
+ at article{RJ-2013-034,
+  author = {Genaro Sucarrat},
+  title = {{betategarch: Simulation, Estimation and Forecasting of Beta-
+          Skew-t-EGARCH Models}},
+  year = {2013},
+  journal = {{The R Journal}},
+  url = {https://journal.r-project.org/archive/2013/RJ-2013-034/index.html},
+  pages = {137--147},
+  volume = {5},
+  number = {2}
+}
+    
+  
+    
+ at article{RJ-2013-035,
+  author = {Paul Murrell},
+  title = {{Changes to grid for R 3.0.0}},
+  year = {2013},
+  journal = {{The R Journal}},
+  url = {https://journal.r-project.org/archive/2013/RJ-2013-035/index.html},
+  pages = {148--160},
+  volume = {5},
+  number = {2}
+}
+    
+  
+    
+      
+    
+  
+    
+      
+
+        
+ at Article{r-foundation:2013,
+  author       = {Kurt Hornik}, 
+  title        = {{R} {F}oundation News}, 
   journal      = {The R Journal},
   year         = 2013,
   volume       = 5,
   number       = 2,
-  pages        = {161--162},
-  month        = Dec,
-  url          = {http://journal.r-project.org/archive/2013-2/RJournal_2013-2_r-foundation.pdf}
+  pages        = {161--161},  
+  month        = dec,
+  url          = {http://journal.r-project.org/archive/2013-2/r-foundation.pdf}
 }
+        
+      
+    
+  
+    
+      
 
-
-
- at Article{ RJournal:2013-2:bioconductor,
-  author       = {Bioconductor Team},
-  title        = {{News from the Bioconductor Project}},
+        
+ at Article{bioconductor:2013,
+  author       = {{Bioconductor Team}}, 
+  title        = {News from the {B}ioconductor Project}, 
   journal      = {The R Journal},
   year         = 2013,
   volume       = 5,
   number       = 2,
-  pages        = {162--164},
-  month        = Dec,
-  url          = {http://journal.r-project.org/archive/2013-2/RJournal_2013-2_bioconductor.pdf}
+  pages        = {162--163},  
+  month        = dec,
+  url          = {http://journal.r-project.org/archive/2013-2/bioconductor.pdf}
 }
+        
+      
+    
+  
+    
+      
 
-
-
- at Article{ RJournal:2013-2:siberchicot-dray,
-  author       = {Aurelie Siberchicot and Stephane Dray},
-  title        = {{Conference Report: Deuxièmes Rencontres R}},
+        
+ at Article{siberchicot-dray:2013,
+  author       = {Aurelie Siberchicot and Stephane Dray}, 
+  title        = {Conference Report: Deuxi{\` e}mes Rencontres {R}}, 
   journal      = {The R Journal},
   year         = 2013,
   volume       = 5,
   number       = 2,
-  pages        = {164--166},
-  month        = Dec,
-  url          = {http://journal.r-project.org/archive/2013-2/RJournal_2013-2_siberchicot-dray.pdf}
+  pages        = {164--165},  
+  month        = dec,
+  url          = {http://journal.r-project.org/archive/2013-2/siberchicot-dray.pdf}
 }
+        
+      
+    
+  
+    
+      
 
-
-
- at Article{ RJournal:2013-2:cran,
-  author       = {Kurt Hornik and Achim Zeileis},
-  title        = {{Changes on CRAN}},
+        
+ at Article{cran:2013,
+  author       = {Kurt Hornik and Achim Zeileis}, 
+  title        = {Changes on {CRAN}}, 
   journal      = {The R Journal},
   year         = 2013,
   volume       = 5,
   number       = 2,
-  pages        = {166--192},
-  month        = Dec,
-  url          = {http://journal.r-project.org/archive/2013-2/RJournal_2013-2_cran.pdf}
+  pages        = {166--191},  
+  month        = dec,
+  url          = {http://journal.r-project.org/archive/2013-2/cran.pdf}
 }
+        
+      
+    
+  
+    
+      
 
-
-
- at Article{ RJournal:2013-2:r-changes,
-  author       = {The R Core Team},
-  title        = {{Changes in R}},
+        
+ at Article{r-changes:2013,
+  author       = {{The R Core Team}}, 
+  title        = {Changes in {R}}, 
   journal      = {The R Journal},
   year         = 2013,
   volume       = 5,
   number       = 2,
-  pages        = {192--198},
-  month        = Dec,
-  url          = {http://journal.r-project.org/archive/2013-2/RJournal_2013-2_r-changes.pdf}
-}
-
-
-
- at Article{ RJournal:2014-1:editorial,
-  author       = {Deepayan Sarkar},
-  title        = {{Editorial}},
-  journal      = {The R Journal},
-  year         = 2014,
-  volume       = 6,
-  number       = 1,
-  pages        = {3--3},
-  month        = Jun,
-  url          = {http://journal.r-project.org/archive/2014-1/RJournal_2014-1_editorial.pdf}
+  pages        = {192--198},  
+  month        = dec,
+  url          = {http://journal.r-project.org/archive/2013-2/r-changes.pdf}
 }
+        
+      
+    
+  
 
+  
+    
+      
 
-
- at Article{ RJournal:2014-1:sievert,
-  author       = {Carson Sievert},
-  title        = {{Taming PITCHf/x Data with XML2R and pitchRx}},
+        
+ at Article{editorial:2014,
+  author       = {Deepayan Sarkar}, 
+  title        = {Editorial}, 
   journal      = {The R Journal},
   year         = 2014,
   volume       = 6,
   number       = 1,
-  pages        = {5--19},
-  month        = Jun,
-  url          = {http://journal.r-project.org/archive/2014-1/RJournal_2014-1_sievert.pdf}
-}
-
-
-
- at Article{ RJournal:2014-1:nunes-taylor-eckley,
-  author       = {Matthew A. Nunes and Sarah L. Taylor and Idris A. Eckley},
-  title        = {{Stationarity Testing and Texture Counting in R}},
+  pages        = {3--3},  
+  month        = jun,
+  url          = {http://journal.r-project.org/archive/2014-1/editorial.pdf}
+}
+        
+      
+    
+  
+    
+      
+    
+  
+    
+ at article{RJ-2014-001,
+  author = {Carson Sievert},
+  title = {{Taming PITCHf/x Data with XML2R and pitchRx}},
+  year = {2014},
+  journal = {{The R Journal}},
+  url = {https://journal.r-project.org/archive/2014/RJ-2014-001/index.html},
+  pages = {5--19},
+  volume = {6},
+  number = {1}
+}
+    
+  
+    
+ at article{RJ-2014-002,
+  author = {Matthew A. Nunes and Sarah L. Taylor and Idris A. Eckley},
+  title = {{A Multiscale Test of Spatial Stationarity for Textured
+          Images in R}},
+  year = {2014},
+  journal = {{The R Journal}},
+  url = {https://journal.r-project.org/archive/2014/RJ-2014-002/index.html},
+  pages = {20--30},
+  volume = {6},
+  number = {1}
+}
+    
+  
+    
+ at article{RJ-2014-003,
+  author = {Xiangdong Gu and David Shapiro and Michael D. Hughes and
+          Raji Balasubramanian},
+  title = {{Stratified Weibull Regression Model for Interval-Censored
+          Data}},
+  year = {2014},
+  journal = {{The R Journal}},
+  url = {https://journal.r-project.org/archive/2014/RJ-2014-003/index.html},
+  pages = {31--40},
+  volume = {6},
+  number = {1}
+}
+    
+  
+    
+ at article{RJ-2014-004,
+  author = {John Muschelli and Elizabeth Sweeney and Ciprian Crainiceanu},
+  title = {{brainR: Interactive 3 and 4D Images of High Resolution
+          Neuroimage Data}},
+  year = {2014},
+  journal = {{The R Journal}},
+  url = {https://journal.r-project.org/archive/2014/RJ-2014-004/index.html},
+  pages = {41--48},
+  volume = {6},
+  number = {1}
+}
+    
+  
+    
+ at article{RJ-2014-005,
+  author = {Dominik Wabersich and Joachim Vandekerckhove},
+  title = {{The RWiener Package: an R Package Providing Distribution
+          Functions for the Wiener Diffusion Model}},
+  year = {2014},
+  journal = {{The R Journal}},
+  url = {https://journal.r-project.org/archive/2014/RJ-2014-005/index.html},
+  pages = {49--56},
+  volume = {6},
+  number = {1}
+}
+    
+  
+    
+ at article{RJ-2014-006,
+  author = {Hai Qian},
+  title = {{PivotalR: A Package for Machine Learning on Big Data}},
+  year = {2014},
+  journal = {{The R Journal}},
+  url = {https://journal.r-project.org/archive/2014/RJ-2014-006/index.html},
+  pages = {57--67},
+  volume = {6},
+  number = {1}
+}
+    
+  
+    
+ at article{RJ-2014-007,
+  author = {Bryan Stanfill and Heike Hofmann and Ulrike Genschel},
+  title = {{rotations: An R Package for SO(3) Data}},
+  year = {2014},
+  journal = {{The R Journal}},
+  url = {https://journal.r-project.org/archive/2014/RJ-2014-007/index.html},
+  pages = {68--78},
+  volume = {6},
+  number = {1}
+}
+    
+  
+    
+ at article{RJ-2014-008,
+  author = {Nicola Lunardon and Giovanna Menardi and Nicola Torelli},
+  title = {{ROSE: a Package for Binary Imbalanced Learning}},
+  year = {2014},
+  journal = {{The R Journal}},
+  url = {https://journal.r-project.org/archive/2014/RJ-2014-008/index.html},
+  pages = {79--89},
+  volume = {6},
+  number = {1}
+}
+    
+  
+    
+ at article{RJ-2014-009,
+  author = {Brandon M. Greenwell and Christine M. Schubert Kabban},
+  title = {{investr: An R Package for Inverse Estimation}},
+  year = {2014},
+  journal = {{The R Journal}},
+  url = {https://journal.r-project.org/archive/2014/RJ-2014-009/index.html},
+  pages = {90--100},
+  volume = {6},
+  number = {1}
+}
+    
+  
+    
+ at article{RJ-2014-010,
+  author = {Julien Jacques and Quentin Grimonprez and Christophe
+          Biernacki},
+  title = {{Rankcluster: An R Package for Clustering Multivariate
+          Partial Rankings}},
+  year = {2014},
+  journal = {{The R Journal}},
+  url = {https://journal.r-project.org/archive/2014/RJ-2014-010/index.html},
+  pages = {101--110},
+  volume = {6},
+  number = {1}
+}
+    
+  
+    
+ at article{RJ-2014-011,
+  author = {Mark P.J. van der Loo},
+  title = {{The stringdist Package for Approximate String Matching}},
+  year = {2014},
+  journal = {{The R Journal}},
+  url = {https://journal.r-project.org/archive/2014/RJ-2014-011/index.html},
+  pages = {111--122},
+  volume = {6},
+  number = {1}
+}
+    
+  
+    
+ at article{RJ-2014-012,
+  author = {Maurits Kaptein},
+  title = {{RStorm: Developing and Testing Streaming Algorithms in R}},
+  year = {2014},
+  journal = {{The R Journal}},
+  url = {https://journal.r-project.org/archive/2014/RJ-2014-012/index.html},
+  pages = {123--132},
+  volume = {6},
+  number = {1}
+}
+    
+  
+    
+ at article{RJ-2014-013,
+  author = {Paul Murrell and Simon Potter},
+  title = {{The gridSVG Package}},
+  year = {2014},
+  journal = {{The R Journal}},
+  url = {https://journal.r-project.org/archive/2014/RJ-2014-013/index.html},
+  pages = {133--143},
+  volume = {6},
+  number = {1}
+}
+    
+  
+    
+ at article{RJ-2014-014,
+  author = {Natalie A. Koziol and Christopher R. Bilder},
+  title = {{MRCV: A Package for Analyzing Categorical Variables with
+          Multiple Response Options}},
+  year = {2014},
+  journal = {{The R Journal}},
+  url = {https://journal.r-project.org/archive/2014/RJ-2014-014/index.html},
+  pages = {144--150},
+  volume = {6},
+  number = {1}
+}
+    
+  
+    
+ at article{RJ-2014-015,
+  author = {Thomas J. Leeper1},
+  title = {{Archiving Reproducible Research with R and Dataverse}},
+  year = {2014},
+  journal = {{The R Journal}},
+  url = {https://journal.r-project.org/archive/2014/RJ-2014-015/index.html},
+  pages = {151--158},
+  volume = {6},
+  number = {1}
+}
+    
+  
+    
+ at article{RJ-2014-018,
+  author = {Daniel Bottomly and Beth Wilmot and Shannon K. McWeeney},
+  title = {{oligoMask: A Framework for Assessing and Removing the Effect
+          of Genetic Variants on Microarray Probes}},
+  year = {2014},
+  journal = {{The R Journal}},
+  url = {https://journal.r-project.org/archive/2014/RJ-2014-018/index.html},
+  pages = {159--163},
+  volume = {6},
+  number = {1}
+}
+    
+  
+    
+ at article{RJ-2014-019,
+  author = {Luigi Lombardi and Massimiliano Pastore},
+  title = {{sgr: A Package for Simulating Conditional Fake Ordinal Data}},
+  year = {2014},
+  journal = {{The R Journal}},
+  url = {https://journal.r-project.org/archive/2014/RJ-2014-019/index.html},
+  pages = {164--177},
+  volume = {6},
+  number = {1}
+}
+    
+  
+    
+      
+    
+  
+    
+ at article{RJ-2014-016,
+  author = {Patrick Mair and Scott Chamberlain},
+  title = {{Web Technologies Task View}},
+  year = {2014},
+  journal = {{The R Journal}},
+  url = {https://journal.r-project.org/archive/2014/RJ-2014-016/index.html},
+  pages = {178--181},
+  volume = {6},
+  number = {1}
+}
+    
+  
+    
+ at article{RJ-2014-017,
+  author = {A. Jonathan R. Godfrey and Robert Erhardt},
+  title = {{Addendum to ``Statistical Software from a Blind Person's
+          Perspective''}},
+  year = {2014},
+  journal = {{The R Journal}},
+  url = {https://journal.r-project.org/archive/2014/RJ-2014-017/index.html},
+  pages = {182--182},
+  volume = {6},
+  number = {1}
+}
+    
+  
+    
+      
+
+        
+ at Article{r-foundation:2014,
+  author       = {Kurt Hornik}, 
+  title        = {{R} {F}oundation News}, 
   journal      = {The R Journal},
   year         = 2014,
   volume       = 6,
   number       = 1,
-  pages        = {20--30},
-  month        = Jun,
-  url          = {http://journal.r-project.org/archive/2014-1/RJournal_2014-1_nunes-taylor-eckley.pdf}
+  pages        = {183--183},  
+  month        = jun,
+  url          = {http://journal.r-project.org/archive/2014-1/r-foundation.pdf}
 }
+        
+      
+    
+  
+    
+      
 
-
-
- at Article{ RJournal:2014-1:gu-shapiro-hughes-etal,
-  author       = {Xiangdong Gu and David Shapiro and Michael D. Hughes and Raji Balasubramanian},
-  title        = {{Stratified Weibull Regression Model for Interval-Censored Data}},
+        
+ at Article{bioconductor:2014,
+  author       = {{Bioconductor Team}}, 
+  title        = {News from the {B}ioconductor Project}, 
   journal      = {The R Journal},
   year         = 2014,
   volume       = 6,
   number       = 1,
-  pages        = {31--40},
-  month        = Jun,
-  url          = {http://journal.r-project.org/archive/2014-1/RJournal_2014-1_gu-shapiro-hughes-etal.pdf}
+  pages        = {184--185},  
+  month        = jun,
+  url          = {http://journal.r-project.org/archive/2014-1/bioconductor.pdf}
 }
+        
+      
+    
+  
+    
+      
 
-
-
- at Article{ RJournal:2014-1:muschelli-sweeney-crainiceanu,
-  author       = {John Muschelli and Elizabeth Sweeney and Ciprian Crainiceanu},
-  title        = {{brainR: Interactive 3 and 4D Images of High Resolution Neuroimage Data}},
+        
+ at Article{cran:2014,
+  author       = {Kurt Hornik and Achim Zeileis}, 
+  title        = {Changes on {CRAN}}, 
   journal      = {The R Journal},
   year         = 2014,
   volume       = 6,
   number       = 1,
-  pages        = {41--48},
-  month        = Jun,
-  url          = {http://journal.r-project.org/archive/2014-1/RJournal_2014-1_muschelli-sweeney-crainiceanu.pdf}
+  pages        = {186--220},  
+  month        = jun,
+  url          = {http://journal.r-project.org/archive/2014-1/cran.pdf}
 }
+        
+      
+    
+  
+    
+      
 
-
-
- at Article{ RJournal:2014-1:vandekerckhove-wabersich,
-  author       = {Dominik Wabersich and Joachim Vandekerckhove},
-  title        = {{The RWiener package: an R package providing distribution functions for the Wiener diffusion model}},
+        
+ at Article{r-changes:2014,
+  author       = {{The R Core Team}}, 
+  title        = {Changes in {R}}, 
   journal      = {The R Journal},
   year         = 2014,
   volume       = 6,
   number       = 1,
-  pages        = {49--56},
-  month        = Jun,
-  url          = {http://journal.r-project.org/archive/2014-1/RJournal_2014-1_vandekerckhove-wabersich.pdf}
+  pages        = {221--235},  
+  month        = jun,
+  url          = {http://journal.r-project.org/archive/2014-1/r-changes.pdf}
 }
+        
+      
+    
+  
 
+  
+    
+      
 
-
- at Article{ RJournal:2014-1:qian,
-  author       = {Hai Qian},
-  title        = {{PivotalR: A Package for Machine Learning on Big Data}},
+        
+ at Article{editorial:2014,
+  author       = {Deepayan Sarkar}, 
+  title        = {Editorial}, 
   journal      = {The R Journal},
   year         = 2014,
   volume       = 6,
-  number       = 1,
-  pages        = {57--67},
-  month        = Jun,
-  url          = {http://journal.r-project.org/archive/2014-1/RJournal_2014-1_qian.pdf}
-}
-
-
-
- at Article{ RJournal:2014-1:stanfill-hofmann-genschel,
-  author       = {Bryan Stanfill and Heike Hofmann and Ulrike Genschel},
-  title        = {{rotations: An R Package for SO(3) Data}},
+  number       = 2,
+  pages        = {3--3},  
+  month        = dec,
+  url          = {http://journal.r-project.org/archive/2014-2/editorial.pdf}
+}
+        
+      
+    
+  
+    
+      
+    
+  
+    
+ at article{RJ-2014-020,
+  author = {Andrea Stocco},
+  title = {{Coordinate-Based Meta-Analysis of fMRI Studies with R}},
+  year = {2014},
+  journal = {{The R Journal}},
+  url = {https://journal.r-project.org/archive/2014/RJ-2014-020/index.html},
+  pages = {5--15},
+  volume = {6},
+  number = {2}
+}
+    
+  
+    
+ at article{RJ-2014-021,
+  author = {Jimmy Oh},
+  title = {{Automatic Conversion of Tables to LongForm Dataframes}},
+  year = {2014},
+  journal = {{The R Journal}},
+  url = {https://journal.r-project.org/archive/2014/RJ-2014-021/index.html},
+  pages = {16--26},
+  volume = {6},
+  number = {2}
+}
+    
+  
+    
+ at article{RJ-2014-022,
+  author = {Jonathan Zhang and Nancy Heckman and Davor Cubranic and Joel
+          G. Kingsolver and Travis Gaydos and J.S. Marron},
+  title = {{Prinsimp}},
+  year = {2014},
+  journal = {{The R Journal}},
+  url = {https://journal.r-project.org/archive/2014/RJ-2014-022/index.html},
+  pages = {27--42},
+  volume = {6},
+  number = {2}
+}
+    
+  
+    
+ at article{RJ-2014-023,
+  author = {Michael J. Grayling},
+  title = {{phaseR: An R Package for Phase Plane Analysis of Autonomous
+          ODE Systems}},
+  year = {2014},
+  journal = {{The R Journal}},
+  url = {https://journal.r-project.org/archive/2014/RJ-2014-023/index.html},
+  pages = {43--51},
+  volume = {6},
+  number = {2}
+}
+    
+  
+    
+ at article{RJ-2014-024,
+  author = {Dane R. Van Domelen and W. Stephen Pittard},
+  title = {{Flexible R Functions for Processing Accelerometer Data, with
+          Emphasis on NHANES 2003-2006}},
+  year = {2014},
+  journal = {{The R Journal}},
+  url = {https://journal.r-project.org/archive/2014/RJ-2014-024/index.html},
+  pages = {52--62},
+  volume = {6},
+  number = {2}
+}
+    
+  
+    
+ at article{RJ-2014-025,
+  author = {Kieran Alden and Mark Read and Paul S Andrews and Jon Timmis
+          and Mark Coles},
+  title = {{Applying spartan to Understand Parameter Uncertainty in
+          Simulations}},
+  year = {2014},
+  journal = {{The R Journal}},
+  url = {https://journal.r-project.org/archive/2014/RJ-2014-025/index.html},
+  pages = {63--80},
+  volume = {6},
+  number = {2}
+}
+    
+  
+    
+ at article{RJ-2014-026,
+  author = {John Hughes},
+  title = {{ngspatial: A Package for Fitting the Centered Autologistic
+          and Sparse Spatial Generalized Linear Mixed Models for Areal
+          Data}},
+  year = {2014},
+  journal = {{The R Journal}},
+  url = {https://journal.r-project.org/archive/2014/RJ-2014-026/index.html},
+  pages = {81--95},
+  volume = {6},
+  number = {2}
+}
+    
+  
+    
+ at article{RJ-2014-027,
+  author = {Irene Castro-Conde and Jacobo de Uña-Álvarez},
+  title = {{sgof: An R Package for Multiple Testing Problems}},
+  year = {2014},
+  journal = {{The R Journal}},
+  url = {https://journal.r-project.org/archive/2014/RJ-2014-027/index.html},
+  pages = {96--113},
+  volume = {6},
+  number = {2}
+}
+    
+  
+    
+ at article{RJ-2014-028,
+  author = {Paola Rebora and Agus Salim and Marie Reilly},
+  title = {{bshazard: A Flexible Tool for Nonparametric Smoothing of the
+          Hazard Function}},
+  year = {2014},
+  journal = {{The R Journal}},
+  url = {https://journal.r-project.org/archive/2014/RJ-2014-028/index.html},
+  pages = {114--122},
+  volume = {6},
+  number = {2}
+}
+    
+  
+    
+ at article{RJ-2014-029,
+  author = {Ben Dêivide Oliveira Batista and Daniel Furtado Ferreira},
+  title = {{SMR: An R package for computing the externally studentized
+          normal midrange distribution}},
+  year = {2014},
+  journal = {{The R Journal}},
+  url = {https://journal.r-project.org/archive/2014/RJ-2014-029/index.html},
+  pages = {123--136},
+  volume = {6},
+  number = {2}
+}
+    
+  
+    
+ at article{RJ-2014-030,
+  author = {Rune Hoff and Jon Michael Gran and Daniel Farewell},
+  title = {{Farewell's Linear Increments Model for Missing Data: The
+          FLIM package}},
+  year = {2014},
+  journal = {{The R Journal}},
+  url = {https://journal.r-project.org/archive/2014/RJ-2014-030/index.html},
+  pages = {137--150},
+  volume = {6},
+  number = {2}
+}
+    
+  
+    
+ at article{RJ-2014-031,
+  author = {Selcuk Korkmaz and Dincer Goksuluk and Gokmen Zararsiz},
+  title = {{MVN: An R Package for Assessing Multivariate Normality}},
+  year = {2014},
+  journal = {{The R Journal}},
+  url = {https://journal.r-project.org/archive/2014/RJ-2014-031/index.html},
+  pages = {151--162},
+  volume = {6},
+  number = {2}
+}
+    
+  
+    
+ at article{RJ-2014-032,
+  author = {Aiora Zabala},
+  title = {{qmethod: A Package to Explore Human Perspectives Using Q
+          Methodology}},
+  year = {2014},
+  journal = {{The R Journal}},
+  url = {https://journal.r-project.org/archive/2014/RJ-2014-032/index.html},
+  pages = {163--173},
+  volume = {6},
+  number = {2}
+}
+    
+  
+    
+ at article{RJ-2014-033,
+  author = {Fang Liu},
+  title = {{gset: An R Package for Exact Sequential Test of Equivalence
+          Hypothesis Based on Bivariate Non-Central t-Statistics}},
+  year = {2014},
+  journal = {{The R Journal}},
+  url = {https://journal.r-project.org/archive/2014/RJ-2014-033/index.html},
+  pages = {174--184},
+  volume = {6},
+  number = {2}
+}
+    
+  
+    
+      
+    
+  
+    
+      
+
+        
+ at Article{gesmann-tsanakas:2014,
+  author       = {Markus Gesmann and Andreas Tsanakas}, 
+  title        = {Conference Report: {R} in Insurance 2014}, 
   journal      = {The R Journal},
   year         = 2014,
   volume       = 6,
-  number       = 1,
-  pages        = {68--78},
-  month        = Jun,
-  url          = {http://journal.r-project.org/archive/2014-1/RJournal_2014-1_stanfill-hofmann-genschel.pdf}
+  number       = 2,
+  pages        = {185--186},  
+  month        = dec,
+  url          = {http://journal.r-project.org/archive/2014-2/gesmann-tsanakas.pdf}
 }
+        
+      
+    
+  
+    
+      
 
-
-
- at Article{ RJournal:2014-1:menardi-lunardon-torelli,
-  author       = {Nicola Lunardon and Giovanna Menardi and Nicola Torelli},
-  title        = {{ROSE: A package for class imbalance learning}},
+        
+ at Article{beresewicz-szabelska-zyprychwalczak-etal:2014,
+  author       = {Maciej Ber{\k e}sewicz and Alicja Szabelska and Joanna Zyprych-Walczak and \L{}ukasz Wawrowski}, 
+  title        = {Conference Report: {P}olish Academic {R} User Meeting}, 
   journal      = {The R Journal},
   year         = 2014,
   volume       = 6,
-  number       = 1,
-  pages        = {79--89},
-  month        = Jun,
-  url          = {http://journal.r-project.org/archive/2014-1/RJournal_2014-1_menardi-lunardon-torelli.pdf}
+  number       = 2,
+  pages        = {187--189},  
+  month        = dec,
+  url          = {http://journal.r-project.org/archive/2014-2/beresewicz-szabelska-zyprychwalczak-etal.pdf}
 }
+        
+      
+    
+  
+    
+      
 
-
-
- at Article{ RJournal:2014-1:greenwell-kabban,
-  author       = {Brandon M. Greenwell and Christine M. Schubert Kabban},
-  title        = {{investr: An R Package for Inverse Estimation}},
+        
+ at Article{r-foundation:2014,
+  author       = {Martin M{\" a}chler and Kurt Hornik}, 
+  title        = {{R} {F}oundation News}, 
   journal      = {The R Journal},
   year         = 2014,
   volume       = 6,
-  number       = 1,
-  pages        = {90--100},
-  month        = Jun,
-  url          = {http://journal.r-project.org/archive/2014-1/RJournal_2014-1_greenwell-kabban.pdf}
+  number       = 2,
+  pages        = {190--191},  
+  month        = dec,
+  url          = {http://journal.r-project.org/archive/2014-2/r-foundation.pdf}
 }
+        
+      
+    
+  
+    
+      
 
-
-
- at Article{ RJournal:2014-1:jacques-grimonprez-biernacki,
-  author       = {Julien Jacques and Quentin Grimonprez and Christophe Biernacki},
-  title        = {{Rankcluster: An R Package For Clustering Multivariate Partial Rankings}},
+        
+ at Article{cran:2014,
+  author       = {Kurt Hornik and Achim Zeileis}, 
+  title        = {Changes on {CRAN}}, 
   journal      = {The R Journal},
   year         = 2014,
   volume       = 6,
-  number       = 1,
-  pages        = {101--110},
-  month        = Jun,
-  url          = {http://journal.r-project.org/archive/2014-1/RJournal_2014-1_jacques-grimonprez-biernacki.pdf}
+  number       = 2,
+  pages        = {192--223},  
+  month        = dec,
+  url          = {http://journal.r-project.org/archive/2014-2/cran.pdf}
 }
+        
+      
+    
+  
+    
+      
 
-
-
- at Article{ RJournal:2014-1:loo,
-  author       = {Mark van der Loo},
-  title        = {{stringdist: an R Package for Approximate String Matching}},
+        
+ at Article{r-changes:2014,
+  author       = {{The R Core Team}}, 
+  title        = {Changes in {R}}, 
   journal      = {The R Journal},
   year         = 2014,
   volume       = 6,
-  number       = 1,
-  pages        = {111--122},
-  month        = Jun,
-  url          = {http://journal.r-project.org/archive/2014-1/RJournal_2014-1_loo.pdf}
+  number       = 2,
+  pages        = {224--226},  
+  month        = dec,
+  url          = {http://journal.r-project.org/archive/2014-2/r-changes.pdf}
 }
+        
+      
+    
+  
+    
+      
 
-
-
- at Article{ RJournal:2014-1:kaptein,
-  author       = {Maurits Kaptein},
-  title        = {{RStorm: Developing and Testing Streaming Algorithms in R}},
+        
+ at Article{bioconductor:2014,
+  author       = {{The Bioconductor Team}}, 
+  title        = {News from the {B}ioconductor Project}, 
   journal      = {The R Journal},
   year         = 2014,
   volume       = 6,
-  number       = 1,
-  pages        = {123--132},
-  month        = Jun,
-  url          = {http://journal.r-project.org/archive/2014-1/RJournal_2014-1_kaptein.pdf}
+  number       = 2,
+  pages        = {227--228},  
+  month        = dec,
+  url          = {http://journal.r-project.org/archive/2014-2/bioconductor.pdf}
 }
+        
+      
+    
+  
 
+  
+    
+      
 
-
- at Article{ RJournal:2014-1:murrell-potter,
-  author       = {Paul Murrell and Simon Potter},
-  title        = {{The gridSVG package}},
+        
+ at Article{editorial:2015,
+  author       = {Bettina Gr{\" u}n}, 
+  title        = {Editorial}, 
   journal      = {The R Journal},
-  year         = 2014,
-  volume       = 6,
+  year         = 2015,
+  volume       = 7,
   number       = 1,
-  pages        = {133--143},
-  month        = Jun,
-  url          = {http://journal.r-project.org/archive/2014-1/RJournal_2014-1_murrell-potter.pdf}
-}
-
-
-
- at Article{ RJournal:2014-1:koziol-bilder,
-  author       = {Natalie A. Koziol and Christopher R. Bilder},
-  title        = {{MRCV: A Package for Analyzing Categorical Variables with Multiple Response Options}},
-  journal      = {The R Journal},
-  year         = 2014,
-  volume       = 6,
+  pages        = {3},  
+  month        = jun,
+  url          = {http://journal.r-project.org/archive/2015-1/editorial.pdf}
+}
+        
+      
+    
+  
+    
+      
+    
+  
+    
+ at article{RJ-2015-001,
+  author = {Daniel Osorio and Paola Rondón-Villarreal and Rodrigo Torres},
+  title = {{Peptides: A Package for Data Mining of Antimicrobial
+          Peptides}},
+  year = {2015},
+  journal = {{The R Journal}},
+  url = {https://journal.r-project.org/archive/2015/RJ-2015-001/index.html},
+  pages = {4--14},
+  volume = {7},
+  number = {1}
+}
+    
+  
+    
+ at article{RJ-2015-002,
+  author = {Guy J. Abel},
+  title = {{fanplot: An R Package for Visualising Sequential
+          Distributions}},
+  year = {2015},
+  journal = {{The R Journal}},
+  url = {https://journal.r-project.org/archive/2015/RJ-2015-002/index.html},
+  pages = {15--23},
+  volume = {7},
+  number = {1}
+}
+    
+  
+    
+ at article{RJ-2015-003,
+  author = {Alexander Kowarik and Bernhard Meindl and Matthias Templ},
+  title = {{sparkTable: Generating Graphical Tables for Websites and
+          Documents with R}},
+  year = {2015},
+  journal = {{The R Journal}},
+  url = {https://journal.r-project.org/archive/2015/RJ-2015-003/index.html},
+  pages = {24--37},
+  volume = {7},
+  number = {1}
+}
+    
+  
+    
+ at article{RJ-2015-004,
+  author = {Sebastian Calonico and Matias D. Cattaneo and Rocío Titiunik},
+  title = {{rdrobust: An R Package for Robust Nonparametric Inference in
+          Regression-Discontinuity Designs}},
+  year = {2015},
+  journal = {{The R Journal}},
+  url = {https://journal.r-project.org/archive/2015/RJ-2015-004/index.html},
+  pages = {38--51},
+  volume = {7},
+  number = {1}
+}
+    
+  
+    
+ at article{RJ-2015-005,
+  author = {Antonio Arcos and David Molina and Maria Giovanna Ranalli
+          and María del Mar Rueda},
+  title = {{Frames2: A Package for Estimation in Dual Frame Surveys}},
+  year = {2015},
+  journal = {{The R Journal}},
+  url = {https://journal.r-project.org/archive/2015/RJ-2015-005/index.html},
+  pages = {52--72},
+  volume = {7},
+  number = {1}
+}
+    
+  
+    
+ at article{RJ-2015-006,
+  author = {Robin K. S. Hankin},
+  title = {{The Complex Multivariate Gaussian Distribution}},
+  year = {2015},
+  journal = {{The R Journal}},
+  url = {https://journal.r-project.org/archive/2015/RJ-2015-006/index.html},
+  pages = {73--80},
+  volume = {7},
+  number = {1}
+}
+    
+  
+    
+ at article{RJ-2015-007,
+  author = {Isabel Molina and Yolanda Marhuenda},
+  title = {{sae: An R Package for Small Area Estimation}},
+  year = {2015},
+  journal = {{The R Journal}},
+  url = {https://journal.r-project.org/archive/2015/RJ-2015-007/index.html},
+  pages = {81--98},
+  volume = {7},
+  number = {1}
+}
+    
+  
+    
+ at article{RJ-2015-008,
+  author = {Yixuan Qiu},
+  title = {{showtext: Using System Fonts in R Graphics}},
+  year = {2015},
+  journal = {{The R Journal}},
+  url = {https://journal.r-project.org/archive/2015/RJ-2015-008/index.html},
+  pages = {99--108},
+  volume = {7},
+  number = {1}
+}
+    
+  
+    
+ at article{RJ-2015-010,
+  author = {Belchin Kostov and Mónica Bécue-Bertaut and François Husson},
+  title = {{Correspondence Analysis on Generalised Aggregated Lexical
+          Tables (CA-GALT) in the FactoMineR Package}},
+  year = {2015},
+  journal = {{The R Journal}},
+  url = {https://journal.r-project.org/archive/2015/RJ-2015-010/index.html},
+  pages = {109--117},
+  volume = {7},
+  number = {1}
+}
+    
+  
+    
+ at article{RJ-2015-009,
+  author = {Shawn T. O’Neil},
+  title = {{Implementing Persistent O(1) Stacks and Queues in R}},
+  year = {2015},
+  journal = {{The R Journal}},
+  url = {https://journal.r-project.org/archive/2015/RJ-2015-009/index.html},
+  pages = {118--126},
+  volume = {7},
+  number = {1}
+}
+    
+  
+    
+ at article{RJ-2015-011,
+  author = {Stefan Rödiger and Michał Burdukiewicz and Konstantin
+          Blagodatskikh and Michael Jahn and Peter Schierack},
+  title = {{R as an Environment for Reproducible Analysis of DNA
+          Amplification Experiments}},
+  year = {2015},
+  journal = {{The R Journal}},
+  url = {https://journal.r-project.org/archive/2015/RJ-2015-011/index.html},
+  pages = {127--150},
+  volume = {7},
+  number = {1}
+}
+    
+  
+    
+ at article{RJ-2015-012,
+  author = {Paul Murrell},
+  title = {{The gridGraphics Package}},
+  year = {2015},
+  journal = {{The R Journal}},
+  url = {https://journal.r-project.org/archive/2015/RJ-2015-012/index.html},
+  pages = {151--162},
+  volume = {7},
+  number = {1}
+}
+    
+  
+    
+ at article{RJ-2015-013,
+  author = {John Muschelli and Elizabeth Sweeney and Martin Lindquist
+          and Ciprian Crainiceanu},
+  title = {{fslr: Connecting the FSL Software with R}},
+  year = {2015},
+  journal = {{The R Journal}},
+  url = {https://journal.r-project.org/archive/2015/RJ-2015-013/index.html},
+  pages = {163--175},
+  volume = {7},
+  number = {1}
+}
+    
+  
+    
+ at article{RJ-2015-014,
+  author = {Michael Baumgartner and Alrik Thiem},
+  title = {{Identifying Complex Causal Dependencies in Configurational
+          Data with Coincidence Analysis}},
+  year = {2015},
+  journal = {{The R Journal}},
+  url = {https://journal.r-project.org/archive/2015/RJ-2015-014/index.html},
+  pages = {176--184},
+  volume = {7},
+  number = {1}
+}
+    
+  
+    
+ at article{RJ-2015-015,
+  author = {Eric Hare and Andreas Buja and Heike Hofmann},
+  title = {{Manipulation of Discrete Random Variables with discreteRV}},
+  year = {2015},
+  journal = {{The R Journal}},
+  url = {https://journal.r-project.org/archive/2015/RJ-2015-015/index.html},
+  pages = {185--194},
+  volume = {7},
+  number = {1}
+}
+    
+  
+    
+ at article{RJ-2015-016,
+  author = {Russell V. Lenth},
+  title = {{Estimability Tools for Package Developers}},
+  year = {2015},
+  journal = {{The R Journal}},
+  url = {https://journal.r-project.org/archive/2015/RJ-2015-016/index.html},
+  pages = {195--199},
+  volume = {7},
+  number = {1}
+}
+    
+  
+    
+      
+    
+  
+    
+      
+
+        
+ at Article{r-foundation:2015,
+  author       = {Kurt Hornik}, 
+  title        = {{R} {F}oundation News}, 
+  journal      = {The R Journal},
+  year         = 2015,
+  volume       = 7,
   number       = 1,
-  pages        = {144--150},
-  month        = Jun,
-  url          = {http://journal.r-project.org/archive/2014-1/RJournal_2014-1_koziol-bilder.pdf}
-}
-
-
-
- at Article{ RJournal:2014-1:leeper,
-  author       = {Thomas J. Leeper},
-  title        = {{Archiving Reproducible Research with R and Dataverse}},
-  journal      = {The R Journal},
-  year         = 2014,
-  volume       = 6,
+  pages        = {200},  
+  month        = jun,
+  url          = {http://journal.r-project.org/archive/2015-1/r-foundation.pdf}
+}
+        
+      
+    
+  
+    
+      
+
+        
+ at Article{cran:2015,
+  author       = {Kurt Hornik and Achim Zeileis}, 
+  title        = {Changes on {CRAN}}, 
+  journal      = {The R Journal},
+  year         = 2015,
+  volume       = 7,
   number       = 1,
-  pages        = {151--158},
-  month        = Jun,
-  url          = {http://journal.r-project.org/archive/2014-1/RJournal_2014-1_leeper.pdf}
-}
-
-
-
- at Article{ RJournal:2014-1:bottomly-wilmot-mcweeney,
-  author       = {Daniel Bottomly and Beth Wilmot and Shannon K. McWeeney},
-  title        = {{oligoMask: A framework for assessing and removing the effect of genetic variants on microarray probes}},
-  journal      = {The R Journal},
-  year         = 2014,
-  volume       = 6,
+  pages        = {201--226},  
+  month        = jun,
+  url          = {http://journal.r-project.org/archive/2015-1/cran.pdf}
+}
+        
+      
+    
+  
+    
+      
+
+        
+ at Article{r-changes:2015,
+  author       = {{The R Core Team}}, 
+  title        = {Changes in {R}}, 
+  journal      = {The R Journal},
+  year         = 2015,
+  volume       = 7,
   number       = 1,
-  pages        = {159--163},
-  month        = Jun,
-  url          = {http://journal.r-project.org/archive/2014-1/RJournal_2014-1_bottomly-wilmot-mcweeney.pdf}
-}
-
-
-
- at Article{ RJournal:2014-1:lombardi-pastore,
-  author       = {Luigi Lombardi and Massimiliano Pastore},
-  title        = {{sgr: A Package for Simulating Conditional Fake Ordinal Data}},
-  journal      = {The R Journal},
-  year         = 2014,
-  volume       = 6,
+  pages        = {227--238},  
+  month        = jun,
+  url          = {http://journal.r-project.org/archive/2015-1/r-changes.pdf}
+}
+        
+      
+    
+  
+    
+      
+
+        
+ at Article{bioconductor:2015,
+  author       = {{The Bioconductor Team}}, 
+  title        = {News from the {B}ioconductor Project}, 
+  journal      = {The R Journal},
+  year         = 2015,
+  volume       = 7,
   number       = 1,
-  pages        = {164--177},
-  month        = Jun,
-  url          = {http://journal.r-project.org/archive/2014-1/RJournal_2014-1_lombardi-pastore.pdf}
+  pages        = {239--240},  
+  month        = jun,
+  url          = {http://journal.r-project.org/archive/2015-1/bioconductor.pdf}
 }
+        
+      
+    
+  
 
+  
+    
+      
 
-
- at Article{ RJournal:2014-1:mair-chamberlain,
-  author       = {Patrick Mair and Scott Chamberlain},
-  title        = {{Web Technologies Task View}},
+        
+ at Article{editorial:2015,
+  author       = {Bettina Gr{\" u}n}, 
+  title        = {Editorial}, 
   journal      = {The R Journal},
-  year         = 2014,
-  volume       = 6,
-  number       = 1,
-  pages        = {178--181},
-  month        = Jun,
-  url          = {http://journal.r-project.org/archive/2014-1/RJournal_2014-1_mair-chamberlain.pdf}
+  year         = 2015,
+  volume       = 7,
+  number       = 2,
+  pages        = {4},  
+  month        = dec,
+  url          = {http://journal.r-project.org/archive/2015-2/editorial.pdf}
+}
+        
+      
+    
+  
+    
+      
+    
+  
+    
+ at article{RJ-2015-017,
+  author = {Moudud Alam and Lars Rönnegård and Xia Shen},
+  title = {{Fitting Conditional and Simultaneous Autoregressive Spatial
+          Models in hglm}},
+  year = {2015},
+  journal = {{The R Journal}},
+  url = {https://journal.r-project.org/archive/2015/RJ-2015-017/index.html},
+  pages = {5--18},
+  volume = {7},
+  number = {2}
+}
+    
+  
+    
+ at article{RJ-2015-018,
+  author = {Robin Genuer and Jean-Michel Poggi and Christine Tuleau-
+          Malot},
+  title = {{VSURF: An R Package for Variable Selection Using Random
+          Forests}},
+  year = {2015},
+  journal = {{The R Journal}},
+  url = {https://journal.r-project.org/archive/2015/RJ-2015-018/index.html},
+  pages = {19--33},
+  volume = {7},
+  number = {2}
+}
+    
+  
+    
+ at article{RJ-2015-019,
+  author = {Fang Liu and Yunchuan Kong},
+  title = {{zoib: An R Package for Bayesian Inference for Beta
+          Regression and Zero/One Inflated Beta Regression}},
+  year = {2015},
+  journal = {{The R Journal}},
+  url = {https://journal.r-project.org/archive/2015/RJ-2015-019/index.html},
+  pages = {34--51},
+  volume = {7},
+  number = {2}
+}
+    
+  
+    
+ at article{RJ-2015-020,
+  author = {Bent Nielsen},
+  title = {{apc: An R Package for Age-Period-Cohort Analysis}},
+  year = {2015},
+  journal = {{The R Journal}},
+  url = {https://journal.r-project.org/archive/2015/RJ-2015-020/index.html},
+  pages = {52--64},
+  volume = {7},
+  number = {2}
+}
+    
+  
+    
+ at article{RJ-2015-021,
+  author = {Isabelle Charlier and Davy Paindaveine and Jérôme Saracco},
+  title = {{QuantifQuantile: An R Package for Performing Quantile
+          Regression Through Optimal Quantization}},
+  year = {2015},
+  journal = {{The R Journal}},
+  url = {https://journal.r-project.org/archive/2015/RJ-2015-021/index.html},
+  pages = {65--80},
+  volume = {7},
+  number = {2}
+}
+    
+  
+    
+ at article{RJ-2015-022,
+  author = {Robin K. S. Hankin},
+  title = {{Numerical Evaluation of the Gauss Hypergeometric Function
+          with the hypergeo Package}},
+  year = {2015},
+  journal = {{The R Journal}},
+  url = {https://journal.r-project.org/archive/2015/RJ-2015-022/index.html},
+  pages = {81--88},
+  volume = {7},
+  number = {2}
+}
+    
+  
+    
+ at article{RJ-2015-023,
+  author = {Pablo J. Villacorta and José A. Sáez},
+  title = {{SRCS: Statistical Ranking Color Scheme for Visualizing
+          Parameterized Multiple Pairwise Comparisons with R}},
+  year = {2015},
+  journal = {{The R Journal}},
+  url = {https://journal.r-project.org/archive/2015/RJ-2015-023/index.html},
+  pages = {89--104},
+  volume = {7},
+  number = {2}
+}
+    
+  
+    
+ at article{RJ-2015-024,
+  author = {Ainhoa Vega-Bayo},
+  title = {{An R Package for the Panel Approach Method for Program
+          Evaluation: pampe}},
+  year = {2015},
+  journal = {{The R Journal}},
+  url = {https://journal.r-project.org/archive/2015/RJ-2015-024/index.html},
+  pages = {105--121},
+  volume = {7},
+  number = {2}
+}
+    
+  
+    
+ at article{RJ-2015-025,
+  author = {Kuo-Jung Lee and Ray-Bing Chen},
+  title = {{BSGS: Bayesian Sparse Group Selection}},
+  year = {2015},
+  journal = {{The R Journal}},
+  url = {https://journal.r-project.org/archive/2015/RJ-2015-025/index.html},
+  pages = {122--133},
+  volume = {7},
+  number = {2}
+}
+    
+  
+    
+ at article{RJ-2015-026,
+  author = {Evelyne Vigneau and Mingkun Chen and El Mostafa Qannari},
+  title = {{ClustVarLV: An R Package for the Clustering of Variables
+          Around Latent Variables}},
+  year = {2015},
+  journal = {{The R Journal}},
+  url = {https://journal.r-project.org/archive/2015/RJ-2015-026/index.html},
+  pages = {134--148},
+  volume = {7},
+  number = {2}
+}
+    
+  
+    
+ at article{RJ-2015-027,
+  author = {Francisco Charte and David Charte},
+  title = {{Working with Multilabel Datasets in R: The mldr Package}},
+  year = {2015},
+  journal = {{The R Journal}},
+  url = {https://journal.r-project.org/archive/2015/RJ-2015-027/index.html},
+  pages = {149--162},
+  volume = {7},
+  number = {2}
+}
+    
+  
+    
+ at article{RJ-2015-028,
+  author = {Richard Valliant and Jill A. Dever and Frauke Kreuter},
+  title = {{PracTools: Computations for Design of Finite Population
+          Samples}},
+  year = {2015},
+  journal = {{The R Journal}},
+  url = {https://journal.r-project.org/archive/2015/RJ-2015-028/index.html},
+  pages = {163--176},
+  volume = {7},
+  number = {2}
+}
+    
+  
+    
+ at article{RJ-2015-029,
+  author = {Kangwon Seo and Rong Pan},
+  title = {{ALTopt: An R Package for Optimal Experimental Design of
+          Accelerated Life Testing}},
+  year = {2015},
+  journal = {{The R Journal}},
+  url = {https://journal.r-project.org/archive/2015/RJ-2015-029/index.html},
+  pages = {177--188},
+  volume = {7},
+  number = {2}
+}
+    
+  
+    
+ at article{RJ-2015-030,
+  author = {Matthew A. Nunes and Dennis Prangle},
+  title = {{abctools: An R Package for Tuning Approximate Bayesian
+          Computation Analyses}},
+  year = {2015},
+  journal = {{The R Journal}},
+  url = {https://journal.r-project.org/archive/2015/RJ-2015-030/index.html},
+  pages = {189--205},
+  volume = {7},
+  number = {2}
+}
+    
+  
+    
+ at article{RJ-2015-031,
+  author = {Juhui Wang and Robert Faivre and Hervé Richard and Hervé
+          Monod},
+  title = {{mtk: A General-Purpose and Extensible R Environment
+          for Uncertainty and Sensitivity Analyses of Numerical
+          Experiments}},
+  year = {2015},
+  journal = {{The R Journal}},
+  url = {https://journal.r-project.org/archive/2015/RJ-2015-031/index.html},
+  pages = {206--226},
+  volume = {7},
+  number = {2}
+}
+    
+  
+    
+ at article{RJ-2015-032,
+  author = {Samuel E. Buttrey and Lyn R. Whitaker},
+  title = {{treeClust: An R Package for Tree-Based Clustering
+          Dissimilarities}},
+  year = {2015},
+  journal = {{The R Journal}},
+  url = {https://journal.r-project.org/archive/2015/RJ-2015-032/index.html},
+  pages = {227--236},
+  volume = {7},
+  number = {2}
+}
+    
+  
+    
+ at article{RJ-2015-033,
+  author = {Hideitsu Hino and Ken Takano and Noboru Murata},
+  title = {{mmpp: A Package for Calculating Similarity and Distance
+          Metrics for Simple and Marked Temporal Point Processes}},
+  year = {2015},
+  journal = {{The R Journal}},
+  url = {https://journal.r-project.org/archive/2015/RJ-2015-033/index.html},
+  pages = {237--248},
+  volume = {7},
+  number = {2}
+}
+    
+  
+    
+ at article{RJ-2015-034,
+  author = {Michael C. Koohafkan and Bassam A. Younis},
+  title = {{Open-Channel Computation with R}},
+  year = {2015},
+  journal = {{The R Journal}},
+  url = {https://journal.r-project.org/archive/2015/RJ-2015-034/index.html},
+  pages = {249--262},
+  volume = {7},
+  number = {2}
+}
+    
+  
+    
+ at article{RJ-2015-035,
+  author = {David Moriña and Manuel Higueras and Pedro Puig and María
+          Oliveira},
+  title = {{Generalized Hermite Distribution Modelling with the R
+          Package hermite}},
+  year = {2015},
+  journal = {{The R Journal}},
+  url = {https://journal.r-project.org/archive/2015/RJ-2015-035/index.html},
+  pages = {263--274},
+  volume = {7},
+  number = {2}
+}
+    
+  
+    
+ at article{RJ-2015-036,
+  author = {Angel Rubio and Fernando de Villar},
+  title = {{Code Profiling in R: A Review of Existing Methods and an
+          Introduction to Package GUIProfiler}},
+  year = {2015},
+  journal = {{The R Journal}},
+  url = {https://journal.r-project.org/archive/2015/RJ-2015-036/index.html},
+  pages = {275--287},
+  volume = {7},
+  number = {2}
+}
+    
+  
+    
+      
+    
+  
+    
+      
+
+        
+ at Article{plummer:2015,
+  author       = {Martyn Plummer}, 
+  title        = {The {R} Consortium and the {R} Foundation}, 
+  journal      = {The R Journal},
+  year         = 2015,
+  volume       = 7,
+  number       = 2,
+  pages        = {288},  
+  month        = dec,
+  url          = {http://journal.r-project.org/archive/2015-2/plummer.pdf}
+}
+        
+      
+    
+  
+    
+      
+
+        
+ at Article{tvedebrink:2015,
+  author       = {Torben Tvedebrink}, 
+  title        = {Conference Report: {useR!} 2015}, 
+  journal      = {The R Journal},
+  year         = 2015,
+  volume       = 7,
+  number       = 2,
+  pages        = {289--290},  
+  month        = dec,
+  url          = {http://journal.r-project.org/archive/2015-2/tvedebrink.pdf}
+}
+        
+      
+    
+  
+    
+      
+
+        
+ at Article{bioconductor:2015,
+  author       = {The Bioconductor Team}, 
+  title        = {News from the {B}ioconductor Project}, 
+  journal      = {The R Journal},
+  year         = 2015,
+  volume       = 7,
+  number       = 2,
+  pages        = {291--292},  
+  month        = dec,
+  url          = {http://journal.r-project.org/archive/2015-2/bioconductor.pdf}
+}
+        
+      
+    
+  
+    
+      
+
+        
+ at Article{r-changes:2015,
+  author       = {The R Core Team}, 
+  title        = {Changes in {R}}, 
+  journal      = {The R Journal},
+  year         = 2015,
+  volume       = 7,
+  number       = 2,
+  pages        = {293--297},  
+  month        = dec,
+  url          = {http://journal.r-project.org/archive/2015-2/r-changes.pdf}
+}
+        
+      
+    
+  
+    
+      
+
+        
+ at Article{cran:2015,
+  author       = {Kurt Hornik and Achim Zeileis}, 
+  title        = {Changes on {CRAN}}, 
+  journal      = {The R Journal},
+  year         = 2015,
+  volume       = 7,
+  number       = 2,
+  pages        = {298--339},  
+  month        = dec,
+  url          = {http://journal.r-project.org/archive/2015-2/cran.pdf}
 }
+        
+      
+    
+  
 
+  
+    
+      
 
-
- at Article{ RJournal:2014-1:godfrey-erhardt,
-  author       = {A. Jonathan R. Godfrey and Robert Erhardt},
-  title        = {{Addendum to ``Statistical Software from a Blind Person's Perspective''}},
+        
+ at Article{editorial:2016,
+  author       = {Michael Lawrence}, 
+  title        = {Editorial}, 
   journal      = {The R Journal},
-  year         = 2014,
-  volume       = 6,
+  year         = 2016,
+  volume       = 8,
   number       = 1,
-  pages        = {182--182},
-  month        = Jun,
-  url          = {http://journal.r-project.org/archive/2014-1/RJournal_2014-1_godfrey-erhardt.pdf}
-}
-
-
-
- at Article{ RJournal:2014-1:r-foundation,
-  author       = {Kurt Hornik},
-  title        = {{R Foundation News}},
-  journal      = {The R Journal},
-  year         = 2014,
-  volume       = 6,
+  pages        = {4--4},  
+  month        = aug,
+  url          = {http://journal.r-project.org/archive/2016-1/editorial.pdf}
+}
+        
+      
+    
+  
+    
+      
+    
+  
+    
+ at article{RJ-2016-001,
+  author = {Ken J. Beath},
+  title = {{metaplus: An R Package for the Analysis of Robust Meta-
+          Analysis and Meta-Regression}},
+  year = {2016},
+  journal = {{The R Journal}},
+  url = {https://journal.r-project.org/archive/2016/RJ-2016-001/index.html},
+  pages = {5--16},
+  volume = {8},
+  number = {1}
+}
+    
+  
+    
+ at article{RJ-2016-002,
+  author = {Kamil Wais},
+  title = {{Gender Prediction Methods Based on First Names with
+          genderizeR}},
+  year = {2016},
+  journal = {{The R Journal}},
+  url = {https://journal.r-project.org/archive/2016/RJ-2016-002/index.html},
+  pages = {17--37},
+  volume = {8},
+  number = {1}
+}
+    
+  
+    
+ at article{RJ-2016-003,
+  author = {Alexandre Brouste and Jacques Istas and Sophie Lambert-
+          Lacroix},
+  title = {{Conditional Fractional Gaussian Fields with the Package
+          FieldSim}},
+  year = {2016},
+  journal = {{The R Journal}},
+  url = {https://journal.r-project.org/archive/2016/RJ-2016-003/index.html},
+  pages = {38--47},
+  volume = {8},
+  number = {1}
+}
+    
+  
+    
+ at article{RJ-2016-004,
+  author = {Haydar Demirhan},
+  title = {{rTableICC: An R Package for Random Generation of 22K and RC
+          Contingency Tables}},
+  year = {2016},
+  journal = {{The R Journal}},
+  url = {https://journal.r-project.org/archive/2016/RJ-2016-004/index.html},
+  pages = {48--63},
+  volume = {8},
+  number = {1}
+}
+    
+  
+    
+ at article{RJ-2016-005,
+  author = {Patrick E. Brown},
+  title = {{Maps, Coordinate Reference Systems and Visualising
+          Geographic Data with mapmisc}},
+  year = {2016},
+  journal = {{The R Journal}},
+  url = {https://journal.r-project.org/archive/2016/RJ-2016-005/index.html},
+  pages = {64--91},
+  volume = {8},
+  number = {1}
+}
+    
+  
+    
+ at article{RJ-2016-006,
+  author = {Loïc Yengo and Julien Jacques and Christophe Biernacki and
+          Mickael Canouil},
+  title = {{Variable Clustering in High-Dimensional Linear Regression:
+          The R Package clere}},
+  year = {2016},
+  journal = {{The R Journal}},
+  url = {https://journal.r-project.org/archive/2016/RJ-2016-006/index.html},
+  pages = {92--106},
+  volume = {8},
+  number = {1}
+}
+    
+  
+    
+ at article{RJ-2016-007,
+  author = {Maciej Eder and Jan Rybicki and Mike Kestemont},
+  title = {{Stylometry with R: A Package for Computational Text Analysis}},
+  year = {2016},
+  journal = {{The R Journal}},
+  url = {https://journal.r-project.org/archive/2016/RJ-2016-007/index.html},
+  pages = {107--121},
+  volume = {8},
+  number = {1}
+}
+    
+  
+    
+ at article{RJ-2016-008,
+  author = {Daniel Linares and Joan López-Moliner},
+  title = {{quickpsy: An R Package to Fit Psychometric Functions for
+          Multiple Groups}},
+  year = {2016},
+  journal = {{The R Journal}},
+  url = {https://journal.r-project.org/archive/2016/RJ-2016-008/index.html},
+  pages = {122--131},
+  volume = {8},
+  number = {1}
+}
+    
+  
+    
+ at article{RJ-2016-009,
+  author = {Marta Sestelo and Nora M. Villanueva and Luis Meira-Machado
+          and Javier Roca-Pardiñas},
+  title = {{FWDselect: An R Package for Variable Selection in Regression
+          Models}},
+  year = {2016},
+  journal = {{The R Journal}},
+  url = {https://journal.r-project.org/archive/2016/RJ-2016-009/index.html},
+  pages = {132--148},
+  volume = {8},
+  number = {1}
+}
+    
+  
+    
+ at article{RJ-2016-010,
+  author = {Mitchell Joblin and Wolfgang Mauerer},
+  title = {{An Interactive Survey Application for Validating Social
+          Network Analysis Techniques}},
+  year = {2016},
+  journal = {{The R Journal}},
+  url = {https://journal.r-project.org/archive/2016/RJ-2016-010/index.html},
+  pages = {149--158},
+  volume = {8},
+  number = {1}
+}
+    
+  
+    
+ at article{RJ-2016-011,
+  author = {Christopher T. Franck and Jason A. Osborne},
+  title = {{Exploring Interaction Effects in Two-Factor Studies using
+          the hiddenf Package in R.}},
+  year = {2016},
+  journal = {{The R Journal}},
+  url = {https://journal.r-project.org/archive/2016/RJ-2016-011/index.html},
+  pages = {159--172},
+  volume = {8},
+  number = {1}
+}
+    
+  
+    
+ at article{RJ-2016-012,
+  author = {Jakob W. Messner and Georg J. Mayr and Achim Zeileis},
+  title = {{Heteroscedastic Censored and Truncated Regression with crch}},
+  year = {2016},
+  journal = {{The R Journal}},
+  url = {https://journal.r-project.org/archive/2016/RJ-2016-012/index.html},
+  pages = {173--181},
+  volume = {8},
+  number = {1}
+}
+    
+  
+    
+ at article{RJ-2016-013,
+  author = {Joshua N. Pritikin and Karen M. Schmidt},
+  title = {{Model Builder for Item Factor Analysis with OpenMx}},
+  year = {2016},
+  journal = {{The R Journal}},
+  url = {https://journal.r-project.org/archive/2016/RJ-2016-013/index.html},
+  pages = {182--203},
+  volume = {8},
+  number = {1}
+}
+    
+  
+    
+ at article{RJ-2016-014,
+  author = {Benedikt Gräler and Edzer Pebesma and Gerard Heuvelink},
+  title = {{Spatio-Temporal Interpolation using gstat}},
+  year = {2016},
+  journal = {{The R Journal}},
+  url = {https://journal.r-project.org/archive/2016/RJ-2016-014/index.html},
+  pages = {204--218},
+  volume = {8},
+  number = {1}
+}
+    
+  
+    
+ at article{RJ-2016-015,
+  author = {Marcus W Beck},
+  title = {{SWMPr: An R Package for Retrieving, Organizing, and
+          Analyzing Environmental Data for Estuaries}},
+  year = {2016},
+  journal = {{The R Journal}},
+  url = {https://journal.r-project.org/archive/2016/RJ-2016-015/index.html},
+  pages = {219--232},
+  volume = {8},
+  number = {1}
+}
+    
+  
+    
+ at article{RJ-2016-016,
+  author = {Haydar Demirhan and Nihan Bitirim},
+  title = {{CryptRndTest: An R Package for Testing the Cryptographic
+          Randomness}},
+  year = {2016},
+  journal = {{The R Journal}},
+  url = {https://journal.r-project.org/archive/2016/RJ-2016-016/index.html},
+  pages = {233--247},
+  volume = {8},
+  number = {1}
+}
+    
+  
+    
+ at article{RJ-2016-017,
+  author = {Borja Calvo and Guzmán Santafé},
+  title = {{scmamp: Statistical Comparison of Multiple Algorithms in
+          Multiple Problems}},
+  year = {2016},
+  journal = {{The R Journal}},
+  url = {https://journal.r-project.org/archive/2016/RJ-2016-017/index.html},
+  pages = {248--256},
+  volume = {8},
+  number = {1}
+}
+    
+  
+    
+ at article{RJ-2016-018,
+  author = {Weihua An and Yu-Hsin Liu},
+  title = {{keyplayer: An R Package for Locating Key Players in Social
+          Networks}},
+  year = {2016},
+  journal = {{The R Journal}},
+  url = {https://journal.r-project.org/archive/2016/RJ-2016-018/index.html},
+  pages = {257--268},
+  volume = {8},
+  number = {1}
+}
+    
+  
+    
+ at article{RJ-2016-019,
+  author = {Michael J. North},
+  title = {{SchemaOnRead: A Package for Schema-on-Read in R}},
+  year = {2016},
+  journal = {{The R Journal}},
+  url = {https://journal.r-project.org/archive/2016/RJ-2016-019/index.html},
+  pages = {269--275},
+  volume = {8},
+  number = {1}
+}
+    
+  
+    
+ at article{RJ-2016-020,
+  author = {Thomas J. Leeper},
+  title = {{Crowdsourced Data Preprocessing with R and Amazon Mechanical
+          Turk}},
+  year = {2016},
+  journal = {{The R Journal}},
+  url = {https://journal.r-project.org/archive/2016/RJ-2016-020/index.html},
+  pages = {276--288},
+  volume = {8},
+  number = {1}
+}
+    
+  
+    
+ at article{RJ-2016-021,
+  author = {Luca Scrucca and Michael Fop and T. Brendan Murphy and
+          Adrian E. Raftery},
+  title = {{mclust 5: Clustering, Classification and Density Estimation
+          Using Gaussian Finite Mixture Models}},
+  year = {2016},
+  journal = {{The R Journal}},
+  url = {https://journal.r-project.org/archive/2016/RJ-2016-021/index.html},
+  pages = {289--317},
+  volume = {8},
+  number = {1}
+}
+    
+  
+    
+ at article{RJ-2016-022,
+  author = {Tibor Szkaliczki},
+  title = {{clustering.sc.dp: Optimal Clustering with Sequential
+          Constraint by Using Dynamic Programming}},
+  year = {2016},
+  journal = {{The R Journal}},
+  url = {https://journal.r-project.org/archive/2016/RJ-2016-022/index.html},
+  pages = {318--327},
+  volume = {8},
+  number = {1}
+}
+    
+  
+    
+ at article{RJ-2016-023,
+  author = {Chenyue W. Hu and Amina A. Qutub},
+  title = {{progenyClust: an R package for Progeny Clustering}},
+  year = {2016},
+  journal = {{The R Journal}},
+  url = {https://journal.r-project.org/archive/2016/RJ-2016-023/index.html},
+  pages = {328--338},
+  volume = {8},
+  number = {1}
+}
+    
+  
+    
+ at article{RJ-2016-024,
+  author = {Göknur Giner and Gordon K. Smyth},
+  title = {{statmod: Probability Calculations for the Inverse Gaussian
+          Distribution}},
+  year = {2016},
+  journal = {{The R Journal}},
+  url = {https://journal.r-project.org/archive/2016/RJ-2016-024/index.html},
+  pages = {339--351},
+  volume = {8},
+  number = {1}
+}
+    
+  
+    
+ at article{RJ-2016-025,
+  author = {Erik S. Wright},
+  title = {{Using DECIPHER v2.0 to Analyze Big Biological Sequence Data
+          in R}},
+  year = {2016},
+  journal = {{The R Journal}},
+  url = {https://journal.r-project.org/archive/2016/RJ-2016-025/index.html},
+  pages = {352--359},
+  volume = {8},
+  number = {1}
+}
+    
+  
+    
+ at article{RJ-2016-026,
+  author = {Oliver Keyes and Bob Rudis and Jay Jacobs},
+  title = {{R Packages to Aid in Handling Web Access Logs}},
+  year = {2016},
+  journal = {{The R Journal}},
+  url = {https://journal.r-project.org/archive/2016/RJ-2016-026/index.html},
+  pages = {360--366},
+  volume = {8},
+  number = {1}
+}
+    
+  
+    
+ at article{RJ-2016-027,
+  author = {Jos Feys},
+  title = {{Nonparametric Tests for the Interaction in Two-way Factorial
+          Designs Using R}},
+  year = {2016},
+  journal = {{The R Journal}},
+  url = {https://journal.r-project.org/archive/2016/RJ-2016-027/index.html},
+  pages = {367--378},
+  volume = {8},
+  number = {1}
+}
+    
+  
+    
+ at article{RJ-2016-028,
+  author = {Osman Dag and Ceylan Yozgatligil},
+  title = {{GMDH: An R Package for Short Term Forecasting via GMDH-Type
+          Neural Network Algorithms}},
+  year = {2016},
+  journal = {{The R Journal}},
+  url = {https://journal.r-project.org/archive/2016/RJ-2016-028/index.html},
+  pages = {379--386},
+  volume = {8},
+  number = {1}
+}
+    
+  
+    
+ at article{RJ-2016-029,
+  author = {Luke A Winslow and Scott Chamberlain and Alison P Appling
+          and Jordan S Read},
+  title = {{sbtools: A Package Connecting R to Cloud-based Data for
+          Collaborative Online Research}},
+  year = {2016},
+  journal = {{The R Journal}},
+  url = {https://journal.r-project.org/archive/2016/RJ-2016-029/index.html},
+  pages = {387--398},
+  volume = {8},
+  number = {1}
+}
+    
+  
+    
+      
+    
+  
+    
+      
+
+        
+ at Article{user2016:2016,
+  author       = {Joe Rickert}, 
+  title        = {Conference Report: {useR}! 2016}, 
+  journal      = {The R Journal},
+  year         = 2016,
+  volume       = 8,
   number       = 1,
-  pages        = {183--183},
-  month        = Jun,
-  url          = {http://journal.r-project.org/archive/2014-1/RJournal_2014-1_r-foundation.pdf}
-}
-
-
-
- at Article{ RJournal:2014-1:bioconductor,
-  author       = {Bioconductor Team},
-  title        = {{News from the Bioconductor Project}},
-  journal      = {The R Journal},
-  year         = 2014,
-  volume       = 6,
+  pages        = {399--401},  
+  month        = aug,
+  url          = {http://journal.r-project.org/archive/2016-1/user2016.pdf}
+}
+        
+      
+    
+  
+    
+      
+
+        
+ at Article{cran:2016,
+  author       = {Kurt Hornik and Achim Zeileis}, 
+  title        = {Changes on {CRAN}}, 
+  journal      = {The R Journal},
+  year         = 2016,
+  volume       = 8,
   number       = 1,
-  pages        = {184--185},
-  month        = Jun,
-  url          = {http://journal.r-project.org/archive/2014-1/RJournal_2014-1_bioconductor.pdf}
-}
-
-
-
- at Article{ RJournal:2014-1:cran,
-  author       = {Kurt Hornik and Achim Zeileis},
-  title        = {{Changes on CRAN}},
-  journal      = {The R Journal},
-  year         = 2014,
-  volume       = 6,
+  pages        = {402--403},  
+  month        = aug,
+  url          = {http://journal.r-project.org/archive/2016-1/cran.pdf}
+}
+        
+      
+    
+  
+    
+      
+
+        
+ at Article{bioconductor:2016,
+  author       = {The Bioconductor Team}, 
+  title        = {News from the Bioconductor Project}, 
+  journal      = {The R Journal},
+  year         = 2016,
+  volume       = 8,
   number       = 1,
-  pages        = {186--220},
-  month        = Jun,
-  url          = {http://journal.r-project.org/archive/2014-1/RJournal_2014-1_cran.pdf}
-}
-
-
-
- at Article{ RJournal:2014-1:r-changes,
-  author       = {Kurt Hornik and Achim Zeileis},
-  title        = {{Changes in R}},
-  journal      = {The R Journal},
-  year         = 2014,
-  volume       = 6,
+  pages        = {404--405},  
+  month        = aug,
+  url          = {http://journal.r-project.org/archive/2016-1/bioconductor.pdf}
+}
+        
+      
+    
+  
+    
+      
+
+        
+ at Article{r-changes:2016,
+  author       = {The R Core Team}, 
+  title        = {Changes in {R}}, 
+  journal      = {The R Journal},
+  year         = 2016,
+  volume       = 8,
   number       = 1,
-  pages        = {221--235},
-  month        = Jun,
-  url          = {http://journal.r-project.org/archive/2014-1/RJournal_2014-1_r-changes.pdf}
+  pages        = {406--415},  
+  month        = aug,
+  url          = {http://journal.r-project.org/archive/2016-1/r-changes.pdf}
+}
+        
+      
+    
+  
+
+  
+    
+      
+
+        
+ at Article{editorial:2016,
+  author       = {Michael Lawrence}, 
+  title        = {Editorial}, 
+  journal      = {The R Journal},
+  year         = 2016,
+  volume       = 8,
+  number       = 2,
+  pages        = {4--4},  
+  month        = dec,
+  url          = {http://journal.r-project.org/archive/2016-2/editorial.pdf}
+}
+        
+      
+    
+  
+    
+      
+    
+  
+    
+ at article{RJ-2016-030,
+  author = {Nathalie C. Støer and Sven Ove Samuelsen},
+  title = {{multipleNCC: Inverse Probability Weighting of Nested Case-
+          Control Data}},
+  year = {2016},
+  journal = {{The R Journal}},
+  url = {https://journal.r-project.org/archive/2016/RJ-2016-030/index.html},
+  pages = {5--18},
+  volume = {8},
+  number = {2}
+}
+    
+  
+    
+ at article{RJ-2016-031,
+  author = {Christopher M. Moore and Christopher R. Stieha and Ben C.
+          Nolting and Maria K. Cameron and Karen C. Abbott},
+  title = {{QPot: An R Package for Stochastic Differential Equation
+          Quasi-Potential Analysis}},
+  year = {2016},
+  journal = {{The R Journal}},
+  url = {https://journal.r-project.org/archive/2016/RJ-2016-031/index.html},
+  pages = {19--38},
+  volume = {8},
+  number = {2}
+}
+    
+  
+    
+ at article{RJ-2016-032,
+  author = {Marco Antoniotti and Giulio Caravagna and Luca De Sano
+          and Alex Graudenzi and Giancarlo Mauri and Bud Mishra and
+          Daniele Ramazzotti},
+  title = {{Design of the TRONCO BioConductor Package for TRanslational
+          ONCOlogy}},
+  year = {2016},
+  journal = {{The R Journal}},
+  url = {https://journal.r-project.org/archive/2016/RJ-2016-032/index.html},
+  pages = {39--59},
+  volume = {8},
+  number = {2}
+}
+    
+  
+    
+ at article{RJ-2016-033,
+  author = {Miguel R. Guevara and Dominik Hartmann and Marcelo Mendoza},
+  title = {{diverse: an R Package to Analyze Diversity in Complex
+          Systems}},
+  year = {2016},
+  journal = {{The R Journal}},
+  url = {https://journal.r-project.org/archive/2016/RJ-2016-033/index.html},
+  pages = {60--78},
+  volume = {8},
+  number = {2}
+}
+    
+  
+    
+ at article{RJ-2016-034,
+  author = {Anestis Touloumis},
+  title = {{Simulating Correlated Binary and Multinomial Responses under
+          Marginal Model Specification: The SimCorMultRes Package}},
+  year = {2016},
+  journal = {{The R Journal}},
+  url = {https://journal.r-project.org/archive/2016/RJ-2016-034/index.html},
+  pages = {79--91},
+  volume = {8},
+  number = {2}
+}
+    
+  
+    
+ at article{RJ-2016-035,
+  author = {Loren Collingwood and Kassra Oskooii and Sergio Garcia-Rios
+          and Matt Barreto},
+  title = {{eiCompare: Comparing Ecological Inference Estimates across
+          EI and EI:RC}},
+  year = {2016},
+  journal = {{The R Journal}},
+  url = {https://journal.r-project.org/archive/2016/RJ-2016-035/index.html},
+  pages = {92--101},
+  volume = {8},
+  number = {2}
+}
+    
+  
+    
+ at article{RJ-2016-036,
+  author = {Claudia Vitolo and Matthew Fry and Wouter Buytaert},
+  title = {{rnrfa: An R package to Retrieve, Filter and Visualize Data
+          from the UK National River Flow Archive}},
+  year = {2016},
+  journal = {{The R Journal}},
+  url = {https://journal.r-project.org/archive/2016/RJ-2016-036/index.html},
+  pages = {102--116},
+  volume = {8},
+  number = {2}
+}
+    
+  
+    
+ at article{RJ-2016-037,
+  author = {Marco Geraci},
+  title = {{Qtools: A Collection of Models and Tools for Quantile
+          Inference}},
+  year = {2016},
+  journal = {{The R Journal}},
+  url = {https://journal.r-project.org/archive/2016/RJ-2016-037/index.html},
+  pages = {117--138},
+  volume = {8},
+  number = {2}
+}
+    
+  
+    
+ at article{RJ-2016-038,
+  author = {Silvia Bacci and Francesco Bartolucci},
+  title = {{Two-Tier Latent Class IRT Models in R}},
+  year = {2016},
+  journal = {{The R Journal}},
+  url = {https://journal.r-project.org/archive/2016/RJ-2016-038/index.html},
+  pages = {139--166},
+  volume = {8},
+  number = {2}
+}
+    
+  
+    
+ at article{RJ-2016-039,
+  author = {Rosaria Lombardo and Eric J. Beh},
+  title = {{Variants of Simple Correspondence Analysis}},
+  year = {2016},
+  journal = {{The R Journal}},
+  url = {https://journal.r-project.org/archive/2016/RJ-2016-039/index.html},
+  pages = {167--184},
+  volume = {8},
+  number = {2}
+}
+    
+  
+    
+ at article{RJ-2016-040,
+  author = {Victor Chernozhukov and Chris Hansen and Martin Spindler},
+  title = {{hdm: High-Dimensional Metrics}},
+  year = {2016},
+  journal = {{The R Journal}},
+  url = {https://journal.r-project.org/archive/2016/RJ-2016-040/index.html},
+  pages = {185--199},
+  volume = {8},
+  number = {2}
+}
+    
+  
+    
+ at article{RJ-2016-041,
+  author = {Derek S. Young},
+  title = {{Normal Tolerance Interval Procedures in the tolerance
+          Package}},
+  year = {2016},
+  journal = {{The R Journal}},
+  url = {https://journal.r-project.org/archive/2016/RJ-2016-041/index.html},
+  pages = {200--212},
+  volume = {8},
+  number = {2}
+}
+    
+  
+    
+ at article{RJ-2016-042,
+  author = {Dincer Goksuluk and Selcuk Korkmaz and Gokmen Zararsiz and
+          A. Ergun Karaagaoglu},
+  title = {{easyROC: An Interactive Web-tool for ROC Curve Analysis
+          Using R Language Environment}},
+  year = {2016},
+  journal = {{The R Journal}},
+  url = {https://journal.r-project.org/archive/2016/RJ-2016-042/index.html},
+  pages = {213--230},
+  volume = {8},
+  number = {2}
+}
+    
+  
+    
+ at article{RJ-2016-043,
+  author = {Kyle Walker},
+  title = {{tigris: An R Package to Access and Work with Geographic Data
+          from the US Census Bureau}},
+  year = {2016},
+  journal = {{The R Journal}},
+  url = {https://journal.r-project.org/archive/2016/RJ-2016-043/index.html},
+  pages = {231--242},
+  volume = {8},
+  number = {2}
+}
+    
+  
+    
+ at article{RJ-2016-044,
+  author = {Barret Schloerke and Hadley Wickham and Dianne Cook and
+          Heike Hofmann},
+  title = {{Escape from Boxland}},
+  year = {2016},
+  journal = {{The R Journal}},
+  url = {https://journal.r-project.org/archive/2016/RJ-2016-044/index.html},
+  pages = {243--257},
+  volume = {8},
+  number = {2}
+}
+    
+  
+    
+ at article{RJ-2016-045,
+  author = {Wanbitching E. Wansouwé and Sobom M. Somé and Célestin C.
+          Kokonendji},
+  title = {{Ake: An R Package for Discrete and Continuous Associated
+          Kernel Estimations}},
+  year = {2016},
+  journal = {{The R Journal}},
+  url = {https://journal.r-project.org/archive/2016/RJ-2016-045/index.html},
+  pages = {258--276},
+  volume = {8},
+  number = {2}
+}
+    
+  
+    
+ at article{RJ-2016-046,
+  author = {Michael C. Sachs and Erin E. Gabriel},
+  title = {{An Introduction to Principal Surrogate Evaluation with the
+          pseval Package}},
+  year = {2016},
+  journal = {{The R Journal}},
+  url = {https://journal.r-project.org/archive/2016/RJ-2016-046/index.html},
+  pages = {277--292},
+  volume = {8},
+  number = {2}
+}
+    
+  
+    
+ at article{RJ-2016-047,
+  author = {Paul Deveau and Emmanuel Barillot and Valentina Boeva and
+          Andrei Zinovyev and Eric Bonnet},
+  title = {{Calculating Biological Module Enrichment or Depletion
+          and Visualizing Data on Large-scale Molecular Maps with
+          ACSNMineR and RNaviCell Packages}},
+  year = {2016},
+  journal = {{The R Journal}},
+  url = {https://journal.r-project.org/archive/2016/RJ-2016-047/index.html},
+  pages = {293--306},
+  volume = {8},
+  number = {2}
+}
+    
+  
+    
+ at article{RJ-2016-048,
+  author = {Ángel M. García and Francisco Charte and Pedro González and
+          Cristóbal J. Carmona and María J. del Jesus},
+  title = {{Subgroup Discovery with Evolutionary Fuzzy Systems in R: The
+          SDEFSR Package}},
+  year = {2016},
+  journal = {{The R Journal}},
+  url = {https://journal.r-project.org/archive/2016/RJ-2016-048/index.html},
+  pages = {307--323},
+  volume = {8},
+  number = {2}
+}
+    
+  
+    
+ at article{RJ-2016-049,
+  author = {Maria Pitsillou and Konstantinos Fokianos},
+  title = {{dCovTS: Distance Covariance/Correlation for Time Series}},
+  year = {2016},
+  journal = {{The R Journal}},
+  url = {https://journal.r-project.org/archive/2016/RJ-2016-049/index.html},
+  pages = {324--340},
+  volume = {8},
+  number = {2}
+}
+    
+  
+    
+ at article{RJ-2016-050,
+  author = {Marcel Schweiker},
+  title = {{comf: An R Package for Thermal Comfort Studies}},
+  year = {2016},
+  journal = {{The R Journal}},
+  url = {https://journal.r-project.org/archive/2016/RJ-2016-050/index.html},
+  pages = {341--351},
+  volume = {8},
+  number = {2}
+}
+    
+  
+    
+ at article{RJ-2016-051,
+  author = {Guillermo Federico Olmedo and Samuel Ortega-Farías and
+          Daniel de la Fuente-Sáiz and David Fonseca- Luego and
+          Fernando Fuentes-Peñailillo},
+  title = {{water: Tools and Functions to Estimate Actual
+          Evapotranspiration Using Land Surface Energy Balance Models
+          in R}},
+  year = {2016},
+  journal = {{The R Journal}},
+  url = {https://journal.r-project.org/archive/2016/RJ-2016-051/index.html},
+  pages = {352--369},
+  volume = {8},
+  number = {2}
+}
+    
+  
+    
+ at article{RJ-2016-052,
+  author = {Michael Lipsitz and Alexandre Belloni and Victor
+          Chernozhukov and Iván Fernández-Val},
+  title = {{quantreg.nonpar: An R Package for Performing Nonparametric
+          Series Quantile Regression}},
+  year = {2016},
+  journal = {{The R Journal}},
+  url = {https://journal.r-project.org/archive/2016/RJ-2016-052/index.html},
+  pages = {370--381},
+  volume = {8},
+  number = {2}
+}
+    
+  
+    
+ at article{RJ-2016-053,
+  author = {Sven Koitka and Christoph M. Friedrich},
+  title = {{nmfgpu4R: GPU-Accelerated Computation of the Non-Negative
+          Matrix Factorization (NMF) Using CUDA Capable Hardware}},
+  year = {2016},
+  journal = {{The R Journal}},
+  url = {https://journal.r-project.org/archive/2016/RJ-2016-053/index.html},
+  pages = {382--392},
+  volume = {8},
+  number = {2}
+}
+    
+  
+    
+ at article{RJ-2016-054,
+  author = {Patrick Roocks},
+  title = {{Computing Pareto Frontiers and Database Preferences with the
+          rPref Package}},
+  year = {2016},
+  journal = {{The R Journal}},
+  url = {https://journal.r-project.org/archive/2016/RJ-2016-054/index.html},
+  pages = {393--404},
+  volume = {8},
+  number = {2}
+}
+    
+  
+    
+ at article{RJ-2016-055,
+  author = {Nuno Fachada and João Rodrigues and Vitor V. Lopes and Rui
+          C. Martins and Agostinho C. Rosa},
+  title = {{micompr: An R Package for Multivariate Independent
+          Comparison of Observations}},
+  year = {2016},
+  journal = {{The R Journal}},
+  url = {https://journal.r-project.org/archive/2016/RJ-2016-055/index.html},
+  pages = {405--420},
+  volume = {8},
+  number = {2}
+}
+    
+  
+    
+ at article{RJ-2016-056,
+  author = {Xiang-Wei Zhu and Jian-Yi Chen},
+  title = {{mixtox: An R Package for Mixture Toxicity Assessment}},
+  year = {2016},
+  journal = {{The R Journal}},
+  url = {https://journal.r-project.org/archive/2016/RJ-2016-056/index.html},
+  pages = {421--433},
+  volume = {8},
+  number = {2}
+}
+    
+  
+    
+ at article{RJ-2016-057,
+  author = {Itziar Irigoien and Francesc Mestres and Concepcion Arenas},
+  title = {{Weighted Distance Based Discriminant Analysis: The R Package
+          WeDiBaDis}},
+  year = {2016},
+  journal = {{The R Journal}},
+  url = {https://journal.r-project.org/archive/2016/RJ-2016-057/index.html},
+  pages = {434--450},
+  volume = {8},
+  number = {2}
+}
+    
+  
+    
+ at article{RJ-2016-058,
+  author = {Usue Mori and Alexander Mendiburu and Jose A. Lozano},
+  title = {{Distance Measures for Time Series in R: The TSdist Package}},
+  year = {2016},
+  journal = {{The R Journal}},
+  url = {https://journal.r-project.org/archive/2016/RJ-2016-058/index.html},
+  pages = {451--459},
+  volume = {8},
+  number = {2}
+}
+    
+  
+    
+ at article{RJ-2016-059,
+  author = {Luis Meira-Machado and Marta Sestelo},
+  title = {{condSURV: An R Package for the Estimation of the Conditional
+          Survival Function for Ordered Multivariate Failure Time Data}},
+  year = {2016},
+  journal = {{The R Journal}},
+  url = {https://journal.r-project.org/archive/2016/RJ-2016-059/index.html},
+  pages = {460--473},
+  volume = {8},
+  number = {2}
+}
+    
+  
+    
+ at article{RJ-2016-060,
+  author = {Yuan Tang and Masaaki Horikoshi and Wenxuan Li},
+  title = {{ggfortify: Unified Interface to Visualize Statistical
+          Results of Popular R Packages}},
+  year = {2016},
+  journal = {{The R Journal}},
+  url = {https://journal.r-project.org/archive/2016/RJ-2016-060/index.html},
+  pages = {474--485},
+  volume = {8},
+  number = {2}
+}
+    
+  
+    
+ at article{RJ-2016-061,
+  author = {Edzer Pebesma and Thomas Mailund and James Hiebert},
+  title = {{Measurement Units in R}},
+  year = {2016},
+  journal = {{The R Journal}},
+  url = {https://journal.r-project.org/archive/2016/RJ-2016-061/index.html},
+  pages = {486--494},
+  volume = {8},
+  number = {2}
+}
+    
+  
+    
+ at article{RJ-2016-062,
+  author = {Muhammad Imdadullah and Muhammad Aslam and Saima Altaf},
+  title = {{mctest: An R Package for Detection of Collinearity among
+          Regressors}},
+  year = {2016},
+  journal = {{The R Journal}},
+  url = {https://journal.r-project.org/archive/2016/RJ-2016-062/index.html},
+  pages = {495--505},
+  volume = {8},
+  number = {2}
+}
+    
+  
+    
+      
+    
+  
+    
+      
+
+        
+ at Article{foundation:2016,
+  author       = {by Torsten Hothorn}, 
+  title        = {R Foundation News}, 
+  journal      = {The R Journal},
+  year         = 2016,
+  volume       = 8,
+  number       = 2,
+  pages        = {506--506},  
+  month        = dec,
+  url          = {http://journal.r-project.org/archive/2016-2/foundation.pdf}
+}
+        
+      
+    
+  
+    
+      
+
+        
+ at Article{cran:2016,
+  author       = {by Kurt Hornik and Achim Zeileis}, 
+  title        = {Changes on {CRAN}}, 
+  journal      = {The R Journal},
+  year         = 2016,
+  volume       = 8,
+  number       = 2,
+  pages        = {507--509},  
+  month        = dec,
+  url          = {http://journal.r-project.org/archive/2016-2/cran.pdf}
+}
+        
+      
+    
+  
+    
+      
+
+        
+ at Article{bioc:2016,
+  author       = {by Bioconductor Core Team}, 
+  title        = {News from the Bioconductor Project}, 
+  journal      = {The R Journal},
+  year         = 2016,
+  volume       = 8,
+  number       = 2,
+  pages        = {510--510},  
+  month        = dec,
+  url          = {http://journal.r-project.org/archive/2016-2/bioc.pdf}
+}
+        
+      
+    
+  
+    
+      
+
+        
+ at Article{ch:2016,
+  author       = {by the R Core Team}, 
+  title        = {Changes in {R}}, 
+  journal      = {The R Journal},
+  year         = 2016,
+  volume       = 8,
+  number       = 2,
+  pages        = {511--514},  
+  month        = dec,
+  url          = {http://journal.r-project.org/archive/2016-2/ch.pdf}
 }
+        
+      
+    
+  
 
diff --git a/share/texmf/bibtex/bib/Rnews.bib b/share/texmf/bibtex/bib/Rnews.bib
index fe32b93..8f704dd 100644
--- a/share/texmf/bibtex/bib/Rnews.bib
+++ b/share/texmf/bibtex/bib/Rnews.bib
@@ -1,27 +1,27 @@
- at String{http = "http://CRAN.R-project.org/doc/Rnews/"}
- at String{Rnews2001-1 = "http://CRAN.R-project.org/doc/Rnews/Rnews_2001-1.pdf"}
- at String{Rnews2001-2 = "http://CRAN.R-project.org/doc/Rnews/Rnews_2001-2.pdf"}
- at String{Rnews2001-3 = "http://CRAN.R-project.org/doc/Rnews/Rnews_2001-3.pdf"}
- at String{Rnews2002-1 = "http://CRAN.R-project.org/doc/Rnews/Rnews_2002-1.pdf"}
- at String{Rnews2002-2 = "http://CRAN.R-project.org/doc/Rnews/Rnews_2002-2.pdf"}
- at String{Rnews2002-3 = "http://CRAN.R-project.org/doc/Rnews/Rnews_2002-3.pdf"}
- at String{Rnews2003-1 = "http://CRAN.R-project.org/doc/Rnews/Rnews_2003-1.pdf"}
- at String{Rnews2003-2 = "http://CRAN.R-project.org/doc/Rnews/Rnews_2003-2.pdf"}
- at String{Rnews2003-3 = "http://CRAN.R-project.org/doc/Rnews/Rnews_2003-3.pdf"}
- at String{Rnews2004-1 = "http://CRAN.R-project.org/doc/Rnews/Rnews_2004-1.pdf"}
- at String{Rnews2004-2 = "http://CRAN.R-project.org/doc/Rnews/Rnews_2004-2.pdf"}
- at String{Rnews2005-1 = "http://CRAN.R-project.org/doc/Rnews/Rnews_2005-1.pdf"}
- at String{Rnews2005-2 = "http://CRAN.R-project.org/doc/Rnews/Rnews_2005-2.pdf"}
- at String{Rnews2006-1 = "http://CRAN.R-project.org/doc/Rnews/Rnews_2006-1.pdf"}
- at String{Rnews2006-2 = "http://CRAN.R-project.org/doc/Rnews/Rnews_2006-2.pdf"}
- at String{Rnews2006-3 = "http://CRAN.R-project.org/doc/Rnews/Rnews_2006-3.pdf"}
- at String{Rnews2006-4 = "http://CRAN.R-project.org/doc/Rnews/Rnews_2006-4.pdf"}
- at String{Rnews2006-5 = "http://CRAN.R-project.org/doc/Rnews/Rnews_2006-5.pdf"}
- at String{Rnews2007-1 = "http://CRAN.R-project.org/doc/Rnews/Rnews_2007-1.pdf"}
- at String{Rnews2007-2 = "http://CRAN.R-project.org/doc/Rnews/Rnews_2007-2.pdf"}
- at String{Rnews2007-3 = "http://CRAN.R-project.org/doc/Rnews/Rnews_2007-3.pdf"}
- at String{Rnews2008-1 = "http://CRAN.R-project.org/doc/Rnews/Rnews_2008-1.pdf"}
- at String{Rnews2008-2 = "http://CRAN.R-project.org/doc/Rnews/Rnews_2008-2.pdf"}
+ at String{http = "https://CRAN.R-project.org/doc/Rnews/"}
+ at String{Rnews2001-1 = "https://CRAN.R-project.org/doc/Rnews/Rnews_2001-1.pdf"}
+ at String{Rnews2001-2 = "https://CRAN.R-project.org/doc/Rnews/Rnews_2001-2.pdf"}
+ at String{Rnews2001-3 = "https://CRAN.R-project.org/doc/Rnews/Rnews_2001-3.pdf"}
+ at String{Rnews2002-1 = "https://CRAN.R-project.org/doc/Rnews/Rnews_2002-1.pdf"}
+ at String{Rnews2002-2 = "https://CRAN.R-project.org/doc/Rnews/Rnews_2002-2.pdf"}
+ at String{Rnews2002-3 = "https://CRAN.R-project.org/doc/Rnews/Rnews_2002-3.pdf"}
+ at String{Rnews2003-1 = "https://CRAN.R-project.org/doc/Rnews/Rnews_2003-1.pdf"}
+ at String{Rnews2003-2 = "https://CRAN.R-project.org/doc/Rnews/Rnews_2003-2.pdf"}
+ at String{Rnews2003-3 = "https://CRAN.R-project.org/doc/Rnews/Rnews_2003-3.pdf"}
+ at String{Rnews2004-1 = "https://CRAN.R-project.org/doc/Rnews/Rnews_2004-1.pdf"}
+ at String{Rnews2004-2 = "https://CRAN.R-project.org/doc/Rnews/Rnews_2004-2.pdf"}
+ at String{Rnews2005-1 = "https://CRAN.R-project.org/doc/Rnews/Rnews_2005-1.pdf"}
+ at String{Rnews2005-2 = "https://CRAN.R-project.org/doc/Rnews/Rnews_2005-2.pdf"}
+ at String{Rnews2006-1 = "https://CRAN.R-project.org/doc/Rnews/Rnews_2006-1.pdf"}
+ at String{Rnews2006-2 = "https://CRAN.R-project.org/doc/Rnews/Rnews_2006-2.pdf"}
+ at String{Rnews2006-3 = "https://CRAN.R-project.org/doc/Rnews/Rnews_2006-3.pdf"}
+ at String{Rnews2006-4 = "https://CRAN.R-project.org/doc/Rnews/Rnews_2006-4.pdf"}
+ at String{Rnews2006-5 = "https://CRAN.R-project.org/doc/Rnews/Rnews_2006-5.pdf"}
+ at String{Rnews2007-1 = "https://CRAN.R-project.org/doc/Rnews/Rnews_2007-1.pdf"}
+ at String{Rnews2007-2 = "https://CRAN.R-project.org/doc/Rnews/Rnews_2007-2.pdf"}
+ at String{Rnews2007-3 = "https://CRAN.R-project.org/doc/Rnews/Rnews_2007-3.pdf"}
+ at String{Rnews2008-1 = "https://CRAN.R-project.org/doc/Rnews/Rnews_2008-1.pdf"}
+ at String{Rnews2008-2 = "https://CRAN.R-project.org/doc/Rnews/Rnews_2008-2.pdf"}
 
 @Article{Rnews:Tierney:2001,
   author       = {Luke Tierney},
@@ -2351,7 +2351,7 @@
   number       = 2,
   pages        = {53--54},
   month        = {October},
-  url          = {http://CRAN.R-project.org/doc/Rnews/}
+  url          = {https://CRAN.R-project.org/doc/Rnews/}
 }
 
 @Article{Rnews:Oh+Kim:2007,
diff --git a/share/texmf/tex/latex/Rd.sty b/share/texmf/tex/latex/Rd.sty
index ed9d73b..fd34d37 100644
--- a/share/texmf/tex/latex/Rd.sty
+++ b/share/texmf/tex/latex/Rd.sty
@@ -383,7 +383,7 @@
 {\newcommand{\methaliasA}[3]{}}
 
 \ifthenelse{\boolean{Rd at use@hyper}}
-{\newcommand{\CRANpkg}[1]{\href{http://CRAN.R-project.org/package=#1}{\pkg{#1}}}}
+{\newcommand{\CRANpkg}[1]{\href{https://CRAN.R-project.org/package=#1}{\pkg{#1}}}}
 {\newcommand{\CRANpkg}[1]{\pkg{#1}}}
 
 \newcommand{\HeaderA}[3]{%
diff --git a/share/texmf/tex/latex/jss.cls b/share/texmf/tex/latex/jss.cls
index 4629286..6acb8f4 100644
--- a/share/texmf/tex/latex/jss.cls
+++ b/share/texmf/tex/latex/jss.cls
@@ -1,8 +1,8 @@
 %%
 %% This is file `jss.cls',
-\def\fileversion{2.3}
+\def\fileversion{3.0}
 \def\filename{jss}
-\def\filedate{2013/09/05}
+\def\filedate{2015/09/01}
 %%
 %% Package `jss' to use with LaTeX2e for JSS publications (http://www.jstatsoft.org/)
 %% License: GPL-2 | GPL-3
@@ -104,6 +104,7 @@
 \newcommand{\Plainreviewer}[1]{\def\@Plainreviewer{#1}}
 \newcommand{\Softwaretitle}[1]{\def\@Softwaretitle{#1}}
 \newcommand{\URL}[1]{\def\@URL{#1}}
+\newcommand{\DOI}[1]{\def\@DOI{#1}}
 %% for internal use
 \newcommand{\Seriesname}[1]{\def\@Seriesname{#1}}
 \newcommand{\Hypersubject}[1]{\def\@Hypersubject{#1}}
@@ -142,6 +143,7 @@
 \Pages{xv + 123}
 \Price{USD 69.95 (P)}
 \URL{http://link/to/webpage/}
+\DOI{10.18637/jss.v000.i00}
 \if at article
   \Seriesname{Issue}
   \Hypersubject{Journal of Statistical Software}
@@ -228,13 +230,13 @@
     {\fontfamily{pzc} \fontsize{13}{15} \selectfont Journal of Statistical Software}
     \hfill
     \url{http://www.jstatsoft.org/}\\ \nopagebreak
-    published by the American Statistical Association
+    published by the Foundation for Open Access Statistics
     \hfill
-    \url{http://www.amstat.org/}\\[.3\baselineskip] \nopagebreak
-    {Volume~\@Volume, \@Seriesname~\@Issue}
+    \url{http://www.foastat.org/}\\[.3\baselineskip] \nopagebreak
+    {\@Month{} \@Year, Volume~\@Volume, \@Seriesname~\@Issue}
     \hfill
     \@Firstdate\\ \nopagebreak
-    {\@Month{} \@Year}
+    {\href{http://dx.doi.org/\@DOI}{\tt doi:\@DOI}}
     \hfill
     \@Seconddate  \nopagebreak
     \vspace{.3\baselineskip}
@@ -258,7 +260,7 @@
    {\fontfamily{pzc} \fontsize{28}{32} \selectfont Journal of Statistical Software}
    \vfill
    {\it \small \@Month{} \@Year, Volume~\@Volume, \@Seriesname~\@Issue.%
-            \hfill \href{http://www.jstatsoft.org/}{http://www.jstatsoft.org/}}}\\[0.1cm]
+            \hfill \href{http://dx.doi.org/\@DOI}{doi:\,\@DOI}}}\\[0.1cm]
      \hrule height 3pt}}
 \if at review
   \renewcommand{\maketitle}{
diff --git a/src/appl/Makefile.in b/src/appl/Makefile.in
index 9fa8206..f2d704a 100644
--- a/src/appl/Makefile.in
+++ b/src/appl/Makefile.in
@@ -31,7 +31,7 @@ DISTFILES = \
 @WANT_R_SHLIB_TRUE at ALL_CFLAGS = $(ALL_CFLAGS_LO)
 @WANT_R_SHLIB_TRUE at ALL_FFLAGS = $(ALL_FFLAGS_LO)
 
-Rblas_la = libRblas$(DYLIB_EXT)
+Rblas_la = libRblas$(R_DYLIB_EXT)
 Rblas_la_LIBADD = @DYLIB_UNDEFINED_ALLOWED_FALSE@ -flat_namespace -undefined suppress
 
 all: R
@@ -47,8 +47,8 @@ R: Makedeps
 	@$(MAKE) libappl.a
 
 libappl.a: $(OBJECTS)
-	rm -f $@
-	$(AR) cr $@ $(OBJECTS)
+	@rm -f $@
+	$(AR) -cr $@ $(OBJECTS)
 	$(RANLIB) $@
 
 blas.o: $(top_srcdir)/src/extra/blas/blas.f
diff --git a/src/appl/Makefile.win b/src/appl/Makefile.win
index c962cfd..81c7598 100644
--- a/src/appl/Makefile.win
+++ b/src/appl/Makefile.win
@@ -1,20 +1,20 @@
 #-*- Makefile -*-
 include ../gnuwin32/MkRules
 
-CPPFLAGS=-I../include -DHAVE_CONFIG_H -DR_DLL_BUILD
+CPPFLAGS = -I../include -DHAVE_CONFIG_H -DR_DLL_BUILD
 CSOURCES = \
 	integrate.c interv.c maxcol.c optim.c pretty.c uncmin.c
 FSOURCES = \
 	dchdc.f dpbfa.f dpbsl.f dpoco.f dpodi.f dpofa.f dposl.f dqrdc.f \
 	dqrdc2.f dqrls.f dqrsl.f dqrutl.f dsvdc.f dtrco.f dtrsl.f
-OBJS=$(CSOURCES:.c=.o) $(FSOURCES:.f=.o)
+OBJS = $(CSOURCES:.c=.o) $(FSOURCES:.f=.o)
 
 all: makeMakedeps libappl.a
 
 libappl.a: $(OBJS)
 
 # Dependencies
-DEPS=$(CSOURCES:.c=.d)
+DEPS = $(CSOURCES:.c=.d)
 
 
 makeMakedeps: $(DEPS)
diff --git a/src/appl/dqrdc2.f b/src/appl/dqrdc2.f
index 6e9e23f..e184dc9 100644
--- a/src/appl/dqrdc2.f
+++ b/src/appl/dqrdc2.f
@@ -1,3 +1,4 @@
+C     Dqrdc2 is a *modification* of Linpack's dqrdc ('DQRDC') for R
 c
 c     dqrdc2 uses householder transformations to compute the qr
 c     factorization of an n by p matrix x.  a limited column
@@ -55,21 +56,23 @@ c                with its columns permuted as described by jpvt.
 c
 c        k       integer.
 c                k contains the number of columns of x judged
-c                to be linearly independent.
+c                to be linearly independent, i.e., "the rank"
 c
 c        qraux   double precision(p).
 c                qraux contains further information required to recover
 c                the orthogonal part of the decomposition.
 c
-c        jpvt    jpvt(k) contains the index of the column of the
+c        jpvt    jpvt(j) contains the index of the column of the
 c                original matrix that has been interchanged into
-c                the k-th column.
+c                the j-th column.  Consequently, jpvt[] codes a
+c		 permutation of 1:p; it is called 'pivot' in R
+
 c
 c     original (dqrdc.f) linpack version dated 08/14/78 .
 c     g.w. stewart, university of maryland, argonne national lab.
 c
-c     this version dated 22 august 1995
-c     ross ihaka
+C     This version dated 22 August 1995
+C     Ross Ihaka
 c
 c     bug fixes 29 September 1999 BDR (p > n case, inaccurate ranks)
 c
diff --git a/src/appl/dqrls.f b/src/appl/dqrls.f
index 31e029f..8e94f58 100644
--- a/src/appl/dqrls.f
+++ b/src/appl/dqrls.f
@@ -96,12 +96,15 @@ c     solve the truncated least squares problem for each rhs.
 c
       if(k .gt. 0) then
          do 20 jj=1,ny
-   20       call dqrsl(x,n,n,k,qraux,y(1,jj),rsd(1,jj),qty(1,jj),
+            call dqrsl(x,n,n,k,qraux,y(1,jj),rsd(1,jj),qty(1,jj),
      1           b(1,jj),rsd(1,jj),rsd(1,jj),1110,info)
+   20       continue
       else
-         do 30 i=1,n
+         do 35 i=1,n
             do 30 jj=1,ny
-   30           rsd(i,jj) = y(i,jj)
+                rsd(i,jj) = y(i,jj)
+   30       continue
+   35   continue
       endif
 c
 c     set the unused components of b to zero.
diff --git a/src/appl/integrate.c b/src/appl/integrate.c
index 2a09a95..e29ecce 100644
--- a/src/appl/integrate.c
+++ b/src/appl/integrate.c
@@ -1,6 +1,6 @@
 /*
  *  R : A Computer Language for Statistical Data Analysis
- *  Copyright (C) 2001-2013  The R Core Team
+ *  Copyright (C) 2001-2014  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
@@ -14,11 +14,11 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  *
  *  Most of this file is C translations of Fortran routines in
  *  QUADPACK: the latter is part of SLATEC 'and therefore in the public
- *  domain' (http://en.wikipedia.org/wiki/QUADPACK).
+ *  domain' (https://en.wikipedia.org/wiki/QUADPACK).
  *
  *
  */
diff --git a/src/appl/interv.c b/src/appl/interv.c
index 8b80d9d..7ed6c98 100644
--- a/src/appl/interv.c
+++ b/src/appl/interv.c
@@ -1,6 +1,6 @@
 /*
  *  R : A Computer Language for Statistical Data Analysis
- *  Copyright (C) 2002	      The R Core Team
+ *  Copyright (C) 2002--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
@@ -14,7 +14,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  *
  * The interv() used to be Fortran in ../library/modreg/src/bvalue.f
  * and part of Hastie and Tibshirani's public domain GAMFIT package.
@@ -27,7 +27,8 @@
 #include <R_ext/Boolean.h>
 #include <R_ext/Utils.h>
 
-/* This is called from stats/src/bvalue.f, and packages gam and mda */
+/* This is called from stats/src/bvalue.f, 3 x stats/src/s*.f for smooth.spline()
+   and packages gam and mda */
 int F77_SUB(interv)(double *xt, int *n, double *x,
 		    Rboolean *rightmost_closed, Rboolean *all_inside,
 		    int *ilo, int *mflag)
@@ -35,9 +36,10 @@ int F77_SUB(interv)(double *xt, int *n, double *x,
   return findInterval(xt, *n, *x, *rightmost_closed, *all_inside, *ilo, mflag);
 }
 
-int findInterval(double *xt, int n, double x,
-		  Rboolean rightmost_closed,  Rboolean all_inside, int ilo,
-		  int *mflag)
+int findInterval2(double *xt, int n, double x,
+		  Rboolean rightmost_closed, Rboolean all_inside,
+		  Rboolean left_open, // <- new in findInterval2()
+		  int ilo, int *mflag)
 {
     int istep, middle, ihi;
 
@@ -48,13 +50,15 @@ int findInterval(double *xt, int n, double x,
   xt	numeric vector of length  n , assumed to be nondecreasing
   n	length(xt)
   x	the point whose location with respect to the sequence  xt  is
-        to be determined.
+	to be determined.
   rightmost_closed {logical} indicating if the rightmost xt[] interval
-  	should be closed, i.e. result := n-1 if x == x[n]
-  mflag =: all_inside	    {logical} indicating if result should be coerced
+	should be closed, i.e. result := n-1 if x == x[n]
+	(when left_open, the *leftmost* interval should be closed.)
+  all_inside {logical} indicating if result should be coerced
 		to lie inside {1, n-1}
+  left_open  {logical} use intervals (s, t] instead of [s, t)
   ilo   typically the result of the last call to findInterval(.)
-        `ilo' used to be a static variable (in Fortran) which is not
+	`ilo' used to be a static variable (in Fortran) which is not
 	desirable in R anymore (threads!).
 	Instead, you *should* use a reasonable value, in the first call.
 
@@ -66,11 +70,11 @@ int findInterval(double *xt, int n, double x,
    i      0      if  xt[i]  <= x <  xt[i+1]
    n      1      if  xt[n]  <= x
 
-        in particular,  mflag = 0 is the 'usual' case.  mflag != 0
-        indicates that  x  lies outside the halfopen interval
-        xt[1] <= y < xt[n] . the asymmetric treatment of the
-        interval is due to the decision to make all pp functions cont-
-        inuous from the right.
+	in particular,  mflag = 0 is the 'usual' case.  mflag != 0
+	indicates that  x  lies outside the halfopen interval
+	xt[1] <= y < xt[n] . the asymmetric treatment of the
+	interval is due to the decision to make all pp functions cont-
+	inuous from the right.
 
    Note that if all_inside, left is 1 instead of 0 and n-1 instead of n;
    and if rightmost_closed and x == xt[n],  left is    n-1 instead of n.
@@ -90,61 +94,82 @@ int findInterval(double *xt, int n, double x,
   and are done after just three comparisons.
   otherwise, we repeatedly double the difference  istep = ihi - ilo
   while also moving  ilo  and  ihi  in the direction of  x , until
-                      xt[ilo] <= x < xt[ihi] ,
+		      xt[ilo] <= x < xt[ihi] ,
   after which we use bisection to get, in addition, ilo+1 = ihi .
   left = ilo  is then returned.
 */
 
-#define left_boundary  { *mflag = -1;	return(all_inside ? 1 : 0); }
+#define left_boundary  { *mflag = -1; \
+	return((all_inside || (rightmost_closed && x == xt[1])) ? 1 : 0); }
 
 #define right_boundary { *mflag = +1;					\
 	return((all_inside || (rightmost_closed && x == xt[n]))		\
 		? (n - 1) : n); }
 
+#define X_grtr(XT_v) x > XT_v || (!left_open && x >= XT_v)
+#define X_smlr(XT_v) x < XT_v ||  (left_open && x <= XT_v)
+
+    if(n == 0) { *mflag = 0 ; return 0; }
     /* 1-indexing : */
     --xt;
 
     if(ilo <= 0) {
-	if (x < xt[1])			left_boundary;
+	if (X_smlr(xt[1]))		left_boundary;
 	ilo = 1;
     }
     ihi = ilo + 1;
     if (ihi >= n) {
-	if (x >= xt[n])			right_boundary;
+	if (X_grtr(xt[n]))		right_boundary;
 	if (n <= 1) /* x < xt[1] */	left_boundary;
 	ilo = n - 1;
 	ihi = n;
     }
 
-    if (x < xt[ihi]) {
-	if (x >= xt[ilo]) { /* `lucky': same interval as last time */
+    if (X_smlr(xt[ihi])) {
+	if (X_grtr(xt[ilo])) {
+	    /* `lucky': same interval as last time */
 	    *mflag = 0;	   return ilo;
 	}
 	/* **** now x < xt[ilo] .	decrease  ilo  to capture  x */
-	for(istep = 1; ; istep *= 2) {
+	if(!left_open) for(istep = 1; ; istep *= 2) {
 	    ihi = ilo;
 	    ilo = ihi - istep;
 	    if (ilo <= 1)
 		break;
 	    if (x >= xt[ilo])		goto L50;
+	} else for(istep = 1; ; istep *= 2) {
+	    ihi = ilo;
+	    ilo = ihi - istep;
+	    if (ilo <= 1)
+		break;
+	    if (x > xt[ilo])		goto L51;
 	}
 	ilo = 1;
-	if (x < xt[1])			left_boundary;
+	if (X_smlr(xt[1]))		left_boundary;
     }
     else {
 	/* **** now x >= xt[ihi] .	increase  ihi  to capture  x */
-	for(istep = 1; ; istep *= 2) {
+	if(!left_open) for(istep = 1; ; istep *= 2) {
 	    ilo = ihi;
 	    ihi = ilo + istep;
 	    if (ihi >= n)
 		break;
 	    if (x < xt[ihi])		goto L50;
 	}
-	if (x >= xt[n])			right_boundary;
+	else for(istep = 1; ; istep *= 2) {
+	    ilo = ihi;
+	    ihi = ilo + istep;
+	    if (ihi >= n)
+		break;
+	    if (x <= xt[ihi])		goto L51;
+	}
+	if (X_grtr(xt[n]))		right_boundary;
 	ihi = n;
     }
+    
+    if (left_open) goto L51; /* There _is_ a path to here, avoiding return and goto */
 
-  L50:
+L50: // ! left_open
     /* **** now xt[ilo] <= x < xt[ihi] . narrow the interval. */
     for(;;) {
 	middle = (ilo + ihi) / 2;
@@ -157,4 +182,26 @@ int findInterval(double *xt, int n, double x,
 	else
 	    ihi = middle;
     }
-} /* findInterval */
+
+L51: // left_open
+    /* **** now xt[ilo] < x <= xt[ihi] . narrow the interval. */
+    for(;;) {
+	middle = (ilo + ihi) / 2;
+	if (middle == ilo) {
+	    *mflag = 0;	   return ilo;
+	}
+	/* note. it is assumed that middle = ilo in case ihi = ilo+1 . */
+	if (x > xt[middle])
+	    ilo = middle;
+	else
+	    ihi = middle;
+    }
+} /* findInterval2 */
+
+// has been in API -- keep for compatibility:
+int findInterval(double *xt, int n, double x,
+		 Rboolean rightmost_closed,  Rboolean all_inside, int ilo,
+		 int *mflag)
+{
+    return findInterval2(xt, n, x, rightmost_closed, all_inside, FALSE, ilo, mflag);
+}
diff --git a/src/appl/lbfgsb.c b/src/appl/lbfgsb.c
index c02550a..3c2819f 100644
--- a/src/appl/lbfgsb.c
+++ b/src/appl/lbfgsb.c
@@ -1,6 +1,6 @@
 /*
  *  R : A Computer Language for Statistical Data Analysis
- *  Copyright (C) 2000-2014 The R Core Team
+ *  Copyright (C) 2000-2015 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
@@ -14,7 +14,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  */
 /* l-bfgs-b.f -- translated by f2c (version 19991025).
 
@@ -321,7 +321,7 @@ void setulb(int n, int m, double *x, double *l, double *u, int *nbd,
 
     /* make sure csave is initialized */
     csave[0] = '\0';
-    
+
     /* Parameter adjustments */
     --wa;
 
@@ -565,7 +565,7 @@ static void mainlb(int n, int m, double *x,
     static int nintol, iback, nskip, head, col, itail, iter, iupdat,
 	nint, nfgv, info, ifun, iword, nfree, nact, ileave, nenter;
     // formerly dsave
-    static double theta, fold, tol, dnorm, epsmch, gd, stpmx, sbgnrm, 
+    static double theta, fold, tol, dnorm, epsmch, gd, stpmx, sbgnrm,
 	stp, gdold, dtd;
 
     /* Function Body */
@@ -735,7 +735,7 @@ L333:
     }
 /*	  compute r=-Z'B(xcp-xk)-Z'g (using wa(2m+1)=W'(xcp-x) */
 /*						     from 'cauchy'). */
-    cmprlb(n, m, &x[1], &g[1], &ws[ws_offset], &wy[wy_offset], 
+    cmprlb(n, m, &x[1], &g[1], &ws[ws_offset], &wy[wy_offset],
 	   &sy[sy_offset], &wt[wt_offset], &z[1], &r[1], &wa[1], &indx[1],
 	   &theta, &col, &head, &nfree, &cnstnd, &info);
     if (info != 0)
@@ -915,7 +915,7 @@ L1000:
 //    isave[18-1] = nact;
 //    isave[19-1] = ileave;
 //    isave[20-1] = nenter;
-  
+
     prn3lb(n, x+1, f, task, iprint, info, iter, nfgv, nintol, nskip, nact,
 	   sbgnrm, nint, word, iback, stp, xstep, k);
     return;
@@ -1291,7 +1291,7 @@ static void cauchy(int n, double *x, double *l, double *u, int *nbd,
        info is an integer variable.
 	 On entry info is 0.
 	 On exit info = 0	for normal return,
-		      = nonzero for abnormal return when the the system
+		      = nonzero for abnormal return when the system
 				used in routine bmv is singular.
 
        Subprograms called:
@@ -2284,7 +2284,7 @@ static void freev(int n, int *nfree, int *indx,
 		    Rprintf("Variable %d enters the set of free variables\n",
 			    k);
 	    }
-         if (iprint >= 100)
+	 if (iprint >= 100)
 	     Rprintf("%d variables leave; %d variables enter\n",
 		     n + 1 - *ileave, *nenter);
 	}
@@ -3301,7 +3301,7 @@ static void dcstep(double *stx, double *fx, double *dx,
 	  On exit fp is unchanged.
 
 	dp is a double precision variable.
-	  On entry dp is the the derivative of the function at stp.
+	  On entry dp is the derivative of the function at stp.
 	  On exit dp is unchanged.
 
 	brackt is an logical variable.
@@ -3567,4 +3567,3 @@ static void prn3lb(int n, double *x, double *f, char *task, int iprint,
 	}
     }
 }
-
diff --git a/src/appl/maxcol.c b/src/appl/maxcol.c
index 522ae51..f063327 100644
--- a/src/appl/maxcol.c
+++ b/src/appl/maxcol.c
@@ -2,7 +2,7 @@
  *  R : A Computer Language for Statistical Data Analysis
 
  *  Copyright (C) 1994-9 W. N. Venables and B. D. Ripley
- *  Copyright (C) 2007-12  The R Core Team
+ *  Copyright (C) 2007-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
@@ -16,7 +16,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  */
 
 /* Original (by permission) from
@@ -40,12 +40,12 @@
 
 void R_max_col(double *matrix, int *nr, int *nc, int *maxes, int *ties_meth)
 {
-    int	  r, c, m;
+    int	 c, m;
     size_t  n_r = *nr; // for indexing like r + c * n_r
     double a, b, large;
     Rboolean isna, used_random = FALSE, do_rand = *ties_meth == 1;
 
-    for (r = 0; r < n_r; r++) {
+    for (size_t r = 0; r < n_r; r++) {
 	/* first check row for any NAs and find the largest abs(entry) */
 	large = 0.0;
 	isna = FALSE;
diff --git a/src/appl/optim.c b/src/appl/optim.c
index 66ce5ec..15a293e 100644
--- a/src/appl/optim.c
+++ b/src/appl/optim.c
@@ -1,6 +1,6 @@
 /*
  *  R : A Computer Language for Statistical Data Analysis
- *  Copyright (C) 1999-2013  The R Core Team
+ *  Copyright (C) 1999-2014  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
@@ -14,7 +14,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  */
 
 #ifdef HAVE_CONFIG_H
@@ -279,7 +279,7 @@ void nmmin(int n, double *Bvec, double *X, double *Fmin, optimfn fminfn,
     double oldsize;
     double **P;
     double size, step, temp, trystep;
-    char tstr[9]; // allow for 10^8 iters ...
+    char tstr[12]; // allow for 10^8 iters and pacify gcc7
     double VH, VL, VR;
 
     if (maxit <= 0) {
@@ -368,7 +368,7 @@ void nmmin(int n, double *Bvec, double *X, double *Fmin, optimfn fminfn,
 
 	    // avoid buffer overflow at 100001 iters. (PR#15240)
 	    if (trace) {
-		snprintf(tstr, 9, "%5d", funcount);
+		snprintf(tstr, 12, "%5d", funcount);
 		Rprintf("%s%s %f %f\n", action, tstr, VH, VL);
 	    }
 
diff --git a/src/appl/pretty.c b/src/appl/pretty.c
index eeaf6b0..8f5f606 100644
--- a/src/appl/pretty.c
+++ b/src/appl/pretty.c
@@ -14,7 +14,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  */
 
 /* Pretty Intervals
@@ -98,7 +98,7 @@ double R_pretty(double *lo, double *up, int *ndiv, int min_n,
 
     /*OLD: cell = FLT_EPSILON+ dx / *ndiv; FLT_EPSILON = 1.192e-07 */
     if(i_small) {
-        if(cell > 10)
+	if(cell > 10)
 	    cell = 9 + cell/10;
 	cell *= shrink_sml;
 	if(min_n > 1) cell /= min_n;
@@ -143,8 +143,8 @@ double R_pretty(double *lo, double *up, int *ndiv, int min_n,
 	      eps_correction,	dx, (int)i_small, cell, unit);
 #endif
     if(eps_correction && (eps_correction > 1 || !i_small)) {
-        if(*lo) *lo *= (1- DBL_EPSILON); else *lo = -DBL_MIN;
-        if(*up) *up *= (1+ DBL_EPSILON); else *up = +DBL_MIN;
+	if(*lo != 0.) *lo *= (1- DBL_EPSILON); else *lo = -DBL_MIN;
+	if(*up != 0.) *up *= (1+ DBL_EPSILON); else *up = +DBL_MIN;
     }
 
 #ifdef DEBUGpr
@@ -180,10 +180,10 @@ double R_pretty(double *lo, double *up, int *ndiv, int min_n,
 	*ndiv = k;
     }
     if(return_bounds) { /* if()'s to ensure that result covers original range */
-        if(ns * unit < *lo) *lo = ns * unit;
-        if(nu * unit > *up) *up = nu * unit;
+	if(ns * unit < *lo) *lo = ns * unit;
+	if(nu * unit > *up) *up = nu * unit;
     } else {
-        *lo = ns;
+	*lo = ns;
 	*up = nu;
     }
 #ifdef DEBUGpr
diff --git a/src/appl/uncmin.c b/src/appl/uncmin.c
index 863fb42..3bd4e2c 100644
--- a/src/appl/uncmin.c
+++ b/src/appl/uncmin.c
@@ -1,7 +1,7 @@
 /*
  *  R : A Computer Language for Statistical Data Analysis
  *  Copyright (C) 1997-1999   Saikat DebRoy
- *  Copyright (C) 1999-2014   The R Core Team
+ *  Copyright (C) 1999-2015   The R Core Team
  *  Copyright (C) 2003-2010   The R Foundation
  *
  *  This program is free software; you can redistribute it and/or modify
@@ -16,7 +16,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  *  USA
  */
 
@@ -876,7 +876,7 @@ dogdrv(int nr, int n, double *x, double f, double *g, double *a, double *p,
 
     Rboolean fstdog, nwtake;
     int i;
-    double fplsp, rnwtln, eta = 0.0, cln = 0.0, tmp; /* -Wall */
+    double fplsp = 0.0, rnwtln, eta = 0.0, cln = 0.0, tmp; /* -Wall */
 
     tmp = 0.;
     for (i = 0; i < n; ++i)
@@ -986,13 +986,13 @@ hook_1step(int nr, int n, double *g, double *a, double *udiag, double *p,
 	/*	where h <-- h+amu*(sx**2) [do not actually change (h,udiag)] */
 /* The original code was
    http://people.sc.fsu.edu/~jburkardt/f77_src/uncmin/uncmin.f
-        do 100 j=1,n
-          a(j,j)=udiag(j) + amu*sx(j)*sx(j)
-          if(j.eq.n) go to 100
-          jp1=j+1
-          do i=jp1,n
-            a(i,j)=a(j,i)
-          end do
+	do 100 j=1,n
+	  a(j,j)=udiag(j) + amu*sx(j)*sx(j)
+	  if(j.eq.n) go to 100
+	  jp1=j+1
+	  do i=jp1,n
+	    a(i,j)=a(j,i)
+	  end do
   100   continue
 */
 	for (i = 0; i < n; ++i) {
@@ -1092,7 +1092,7 @@ hookdrv(int nr, int n, double *x, double f, double *g, double *a,
 
     Rboolean fstime, nwtake;
     int i, j;
-    double bet, alpha, fplsp, rnwtln, tmp;
+    double bet, alpha, fplsp = 0.0 /* -Wall */, rnwtln, tmp;
 
     tmp = 0.;
     for (i = 0; i < n; ++i)
diff --git a/src/extra/Makefile.in b/src/extra/Makefile.in
index f27fd59..ef52681 100644
--- a/src/extra/Makefile.in
+++ b/src/extra/Makefile.in
@@ -13,20 +13,15 @@ include $(top_builddir)/Makeconf
 distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
 DISTFILES = Makefile.in
 
-SUBDIRS = blas bzip2 pcre tre xdr xz zlib @USE_NLS_TRUE@ intl
+SUBDIRS = blas tre xdr @USE_NLS_TRUE@ intl
 SUBDIRS_WITH_NO_BUILD = graphapp trio tzone win_iconv @USE_NLS_FALSE@ intl
 
 RBLAS =@BLAS_SHLIB_TRUE@ make.blas
-LIBBZ2 =@BUILD_BZLIB_TRUE@ make.bzip2
-LIBPCRE =@BUILD_PCRE_TRUE@ make.pcre
-LIBZ =@BUILD_ZLIB_TRUE@ make.zlib
 LIBXDR =@BUILD_XDR_TRUE@ make.xdr
 LIBINTL =@BUILD_LIBINTL_TRUE@ make.intl
 LIBTRE =@BUILD_TRE_TRUE@ make.tre
-LIBTZONE = @BUILD_TZONE_TRUE at make.tzone
-LIBXZ =@BUILD_XZ_TRUE@ make.xz
-EXTRAS = $(RBLAS) $(LIBBZ2) $(LIBPCRE) $(LIBZ) $(LIBXDR) $(LIBINTL) \
-  $(LIBTRE) $(LIBTZONE) $(LIBXZ)
+LIBTZONE =@BUILD_TZONE_TRUE at make.tzone
+EXTRAS = $(RBLAS) $(LIBXDR) $(LIBINTL) $(LIBTRE) $(LIBTZONE)
 
 all: Makefile R
 
@@ -39,24 +34,12 @@ R: Makefile $(EXTRAS)
 make.blas: Makefile
 	@(cd blas; $(MAKE))
 
-make.bzip2: Makefile
-	@(cd bzip2; $(MAKE))
-
-make.pcre: Makefile
-	@(cd pcre; $(MAKE))
-
-make.zlib: Makefile
-	@(cd zlib; $(MAKE))
-
 make.tre: Makefile
 	@(cd tre; $(MAKE))
 
 make.xdr: Makefile
 	@(cd xdr; $(MAKE))
 
-make.xz: Makefile
-	@(cd xz; $(MAKE))
-
 make.intl: Makefile
 	@(cd intl; $(MAKE))
 
@@ -73,7 +56,7 @@ distclean: clean
 	@for d in $(SUBDIRS); do \
 	  (cd $${d} && $(MAKE) $@) || exit 1; \
 	done
-	- at rm -f Makefile
+	- at rm -f Makefile tzone/Makefile
 maintainer-clean: distclean
 
 install install-strip:
diff --git a/src/extra/blas/Makefile.in b/src/extra/blas/Makefile.in
index 37f1453..da06ce7 100644
--- a/src/extra/blas/Makefile.in
+++ b/src/extra/blas/Makefile.in
@@ -16,8 +16,8 @@ ALL_FFLAGS = $(ALL_FFLAGS_LO)
 
 SOURCES = blas00.c blas.f cmplxblas.f
 
-Rblas_la = libRblas$(DYLIB_EXT)
-## @RBLAS_LDFLAGS@ is used on Mac OS X
+Rblas_la = libRblas$(R_DYLIB_EXT)
+## @RBLAS_LDFLAGS@ is used on macOS
 ## first for internal BLAS
 Rblas_la_LIBADD = @RBLAS_LDFLAGS@ $(FLIBS_IN_SO)
 ## then external one
@@ -33,8 +33,8 @@ R:
 	@$(MAKE) rhome="$(abs_top_builddir)" Rblas_install
 
 blas_OBJS=blas.o @COMPILE_FORTRAN_DOUBLE_COMPLEX_FALSE@ cmplxblas.o
- at USE_EXTERNAL_BLAS_FALSE@$(Rblas_la): $(blas_OBJS) @BUILD_CYGWIN_TRUE@ xerbla.o
- at USE_EXTERNAL_BLAS_FALSE@	$(DYLIB_LINK) -o $(Rblas_la) $(blas_OBJS) $(Rblas_la_LIBADD) @BUILD_CYGWIN_TRUE@ xerbla.o
+ at USE_EXTERNAL_BLAS_FALSE@$(Rblas_la): $(blas_OBJS)
+ at USE_EXTERNAL_BLAS_FALSE@	$(DYLIB_LINK) -o $(Rblas_la) $(blas_OBJS) $(Rblas_la_LIBADD)
 
 @USE_EXTERNAL_BLAS_TRUE@$(Rblas_la): blas00.o
 @USE_EXTERNAL_BLAS_TRUE@	$(DYLIB_LINK) -o $(Rblas_la) $^ @BLAS_LIBS0@ $(Rblas_la_LIBADD0)
@@ -65,7 +65,7 @@ uninstall TAGS info dvi check:
 
 distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
 DISTFILES = Makefile.in Makefile.win Rblas.def \
-  $(SOURCES) $(HEADERS) xerbla.c
+  $(SOURCES) $(HEADERS)
 
 distdir: $(DISTFILES)
 	@for f in $(DISTFILES); do \
diff --git a/src/extra/blas/xerbla.c b/src/extra/blas/xerbla.c
deleted file mode 100644
index 2654743..0000000
--- a/src/extra/blas/xerbla.c
+++ /dev/null
@@ -1,14 +0,0 @@
-/* It seems Cygwin does not allow mutually dependent dlls, so fake xerbla */
-
-#include <S.h>
-
-/* Fortran-callable error routine for lapack */
-
-void F77_NAME(xerbla)(const char *srname, int *info)
-{
-   /* srname is not null-terminated.  It should be 6 characters. */
-    char buf[7];
-    strncpy(buf, srname, 6);
-    buf[6] = '\0';
-    printf("BLAS/LAPACK routine '%6s' gave error code %d", buf, -(*info));
-}
diff --git a/src/extra/bzip2/LICENSE b/src/extra/bzip2/LICENSE
deleted file mode 100644
index cc61417..0000000
--- a/src/extra/bzip2/LICENSE
+++ /dev/null
@@ -1,42 +0,0 @@
-
---------------------------------------------------------------------------
-
-This program, "bzip2", the associated library "libbzip2", and all
-documentation, are copyright (C) 1996-2010 Julian R Seward.  All
-rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions
-are met:
-
-1. Redistributions of source code must retain the above copyright
-   notice, this list of conditions and the following disclaimer.
-
-2. The origin of this software must not be misrepresented; you must 
-   not claim that you wrote the original software.  If you use this 
-   software in a product, an acknowledgment in the product 
-   documentation would be appreciated but is not required.
-
-3. Altered source versions must be plainly marked as such, and must
-   not be misrepresented as being the original software.
-
-4. The name of the author may not be used to endorse or promote 
-   products derived from this software without specific prior written 
-   permission.
-
-THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
-OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
-DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
-GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
-WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-Julian Seward, jseward at bzip.org
-bzip2/libbzip2 version 1.0.6 of 6 September 2010
-
---------------------------------------------------------------------------
diff --git a/src/extra/bzip2/Makefile.in b/src/extra/bzip2/Makefile.in
deleted file mode 100644
index 0c3f5d5..0000000
--- a/src/extra/bzip2/Makefile.in
+++ /dev/null
@@ -1,70 +0,0 @@
-#
-# ${R_HOME}/src/extra/bzip2/Makefile
-
-VPATH = @srcdir@
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
-
-top_builddir = ../../..
-subdir = src/extra/bzip2
-R_HOME = $(top_builddir)
-
-include $(top_builddir)/Makeconf
-
-BZIP2_CPPFLAGS = -I$(srcdir)
-ALL_CPPFLAGS = $(BZIP2_CPPFLAGS) $(R_XTRA_CPPFLAGS) $(CPPFLAGS) $(DEFS)
-
-SOURCES = blocksort.c bzlib.c bzcompress.c crctable.c decompress.c \
-  huffman.c randtable.c
-HEADERS = bzlib.h bzlib_private.h
-DEPENDS = $(SOURCES:.c=.d)
-OBJECTS = $(SOURCES:.c=.o)
- at WANT_R_SHLIB_TRUE@ALL_CFLAGS = $(ALL_CFLAGS_LO) @C_VISIBILITY@
-
-distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
-DISTFILES = LICENSE Makefile.in Makefile.win R_changes \
-  $(SOURCES) $(HEADERS)
-noinst_LIBRARIES = libbz2.a
-#noinst_LIBRARIES = @BUILD_BZLIB_TRUE@ libbz2.a
-libbz2_a_SOURCES = $(SOURCES)
-libbz2_a_OBJECTS = $(OBJECTS)
-
-
-all: R
-
-Makefile: $(srcdir)/Makefile.in \
-  $(top_builddir)/config.status \
-  $(SOURCES)
-	@cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
-
-Makedeps: Makefile $(DEPENDS)
-	@cat $(DEPENDS) >> Makefile
-	@touch $@
-
-R: Makedeps
-	@$(MAKE) $(noinst_LIBRARIES)
-
-libbz2.a: $(libbz2_a_OBJECTS)
-	rm -f $@
-	$(AR) cr $@ $(libbz2_a_OBJECTS)
-	$(RANLIB) $@
-
-
-mostlyclean: clean
-clean:
-	@-rm -f Makedeps *.d *.o *.lo *.a
-distclean: clean
-	@-rm -f Makefile
-maintainer-clean: distclean
-
-install install-strip uninstall TAGS info dvi check:
-
-distdir: $(DISTFILES)
-	@for f in $(DISTFILES); do \
-	  test -f $(distdir)/$${f} \
-	    || ln $(srcdir)/$${f} $(distdir)/$${f} 2>/dev/null \
-	    || cp -p $(srcdir)/$${f} $(distdir)/$${f}; \
-	done
-
-## Automagically generated dependencies:
-
diff --git a/src/extra/bzip2/Makefile.win b/src/extra/bzip2/Makefile.win
deleted file mode 100644
index 8e871de..0000000
--- a/src/extra/bzip2/Makefile.win
+++ /dev/null
@@ -1,27 +0,0 @@
-#-*- Makefile -*-
-
-include ../../gnuwin32/MkRules
-
-all: makeMakedeps libbz2.a
-
-CPPFLAGS=-I../../include
-
-CSOURCES= blocksort.c huffman.c crctable.c randtable.c bzcompress.c \
-          decompress.c bzlib.c
-OBJS=$(CSOURCES:.c=.o)
-
-libbz2.a: $(OBJS)
-
-clean:
-	$(RM) *.o *~ *.d Makedeps
-distclean: clean
-	@$(RM) libbz2.a
-
-# Dependencies
-DEPS=$(CSOURCES:.c=.d)
-
-makeMakedeps: $(DEPS)
-	@$(RM) Makedeps
-	@cat $(DEPS) >> Makedeps
-
--include Makedeps
diff --git a/src/extra/bzip2/R_changes b/src/extra/bzip2/R_changes
deleted file mode 100644
index bd59df7..0000000
--- a/src/extra/bzip2/R_changes
+++ /dev/null
@@ -1,321 +0,0 @@
-The changes for R are all to do with portability:
-
-__inline__ is not portable.  We make use of static inlining in the 
-file bzlib.c and decompress.c to avoid issues with semantics of 
-'extern inline'.
-
-fdopen is POSIX but not C89
-Solaris' cc objects to inlining functions with names starting with 'main'.
-C character strings are limited to ca 500 chars.
-Various casts were missing.
-
-*** further changes made in November 2006 were not documented ***
-
-diff -u bzip2-1.0.4/blocksort.c bzip2/blocksort.c
---- bzip2-1.0.4/blocksort.c	2007-01-03 02:00:55.000000000 +0000
-+++ bzip2/blocksort.c	2007-05-07 12:56:52.000000000 +0100
-@@ -28,7 +28,7 @@
- 
- /*---------------------------------------------*/
- static 
--__inline__
-+R_INLINE
- void fallbackSimpleSort ( UInt32* fmap, 
-                           UInt32* eclass, 
-                           Int32   lo, 
-@@ -342,9 +342,10 @@
- /*---------------------------------------------*/
- 
- /*---------------------------------------------*/
-+/* Solaris cc objects to inlining functions whose names start with `main' */
- static
--__inline__
--Bool mainGtU ( UInt32  i1, 
-+R_INLINE
-+Bool BZmainGtU ( UInt32  i1, 
-                UInt32  i2,
-                UChar*  block, 
-                UInt16* quadrant,
-@@ -355,7 +356,7 @@
-    UChar  c1, c2;
-    UInt16 s1, s2;
- 
--   AssertD ( i1 != i2, "mainGtU" );
-+   AssertD ( i1 != i2, "BZmainGtU" );
-    /* 1 */
-    c1 = block[i1]; c2 = block[i2];
-    if (c1 != c2) return (c1 > c2);
-@@ -511,7 +512,7 @@
-          if (i > hi) break;
-          v = ptr[i];
-          j = i;
--         while ( mainGtU ( 
-+         while ( BZmainGtU ( 
-                     ptr[j-h]+d, v+d, block, quadrant, nblock, budget 
-                  ) ) {
-             ptr[j] = ptr[j-h];
-@@ -525,7 +526,7 @@
-          if (i > hi) break;
-          v = ptr[i];
-          j = i;
--         while ( mainGtU ( 
-+         while ( BZmainGtU ( 
-                     ptr[j-h]+d, v+d, block, quadrant, nblock, budget 
-                  ) ) {
-             ptr[j] = ptr[j-h];
-@@ -539,7 +540,7 @@
-          if (i > hi) break;
-          v = ptr[i];
-          j = i;
--         while ( mainGtU ( 
-+         while ( BZmainGtU ( 
-                     ptr[j-h]+d, v+d, block, quadrant, nblock, budget 
-                  ) ) {
-             ptr[j] = ptr[j-h];
-@@ -579,7 +580,7 @@
- }
- 
- static 
--__inline__
-+R_INLINE
- UChar mmed3 ( UChar a, UChar b, UChar c )
- {
-    UChar t;
-diff -u bzip2-1.0.4/bzlib.c bzip2/bzlib.c
---- bzip2-1.0.4/bzlib.c	2007-01-03 02:00:55.000000000 +0000
-+++ bzip2/bzlib.c	2007-05-07 12:56:52.000000000 +0100
-@@ -53,8 +53,9 @@
-       BZ2_bzlibVersion()
-    );
- 
-+   /* split up over-long message */
-    if (errcode == 1007) {
--   fprintf(stderr,
-+       fprintf(stderr, "%s%s%s",
-       "\n*** A special note about internal error number 1007 ***\n"
-       "\n"
-       "Experience suggests that a common cause of i.e. 1007\n"
-@@ -62,7 +63,7 @@
-       "just happens to cross-check the results of huge numbers of\n"
-       "memory reads/writes, and so acts (unintendedly) as a stress\n"
-       "test of your memory system.\n"
--      "\n"
-+       "\n",
-       "I suggest the following: try compressing the file again,\n"
-       "possibly monitoring progress in detail with the -vv flag.\n"
-       "\n"
-@@ -72,7 +73,7 @@
-       "  (www.memtest86.com).  At the time of writing it is free (GPLd).\n"
-       "  Memtest86 tests memory much more thorougly than your BIOSs\n"
-       "  power-on test, and may find failures that the BIOS doesn't.\n"
--      "\n"
-+      "\n",
-       "* If the error can be repeatably reproduced, this is a bug in\n"
-       "  bzip2, and I would very much like to hear about it.  Please\n"
-       "  let me know, and, ideally, save a copy of the file causing the\n"
-@@ -165,7 +166,7 @@
-    if (strm->bzalloc == NULL) strm->bzalloc = default_bzalloc;
-    if (strm->bzfree == NULL) strm->bzfree = default_bzfree;
- 
--   s = BZALLOC( sizeof(EState) );
-+   s = (EState *) BZALLOC( sizeof(EState) );
-    if (s == NULL) return BZ_MEM_ERROR;
-    s->strm = strm;
- 
-@@ -174,9 +175,9 @@
-    s->ftab = NULL;
- 
-    n       = 100000 * blockSize100k;
--   s->arr1 = BZALLOC( n                  * sizeof(UInt32) );
--   s->arr2 = BZALLOC( (n+BZ_N_OVERSHOOT) * sizeof(UInt32) );
--   s->ftab = BZALLOC( 65537              * sizeof(UInt32) );
-+   s->arr1 = (UInt32 *) BZALLOC( n                  * sizeof(UInt32) );
-+   s->arr2 = (UInt32 *) BZALLOC( (n+BZ_N_OVERSHOOT) * sizeof(UInt32) );
-+   s->ftab = (UInt32 *) BZALLOC( 65537              * sizeof(UInt32) );
- 
-    if (s->arr1 == NULL || s->arr2 == NULL || s->ftab == NULL) {
-       if (s->arr1 != NULL) BZFREE(s->arr1);
-@@ -362,7 +363,7 @@
- {
-    Bool progress_in  = False;
-    Bool progress_out = False;
--   EState* s = strm->state;
-+   EState* s = (EState *) strm->state;
-    
-    while (True) {
- 
-@@ -409,7 +410,7 @@
-    Bool progress;
-    EState* s;
-    if (strm == NULL) return BZ_PARAM_ERROR;
--   s = strm->state;
-+   s = (EState *) strm->state;
-    if (s == NULL) return BZ_PARAM_ERROR;
-    if (s->strm != strm) return BZ_PARAM_ERROR;
- 
-@@ -469,7 +470,7 @@
- {
-    EState* s;
-    if (strm == NULL) return BZ_PARAM_ERROR;
--   s = strm->state;
-+   s = (EState *) strm->state;
-    if (s == NULL) return BZ_PARAM_ERROR;
-    if (s->strm != strm) return BZ_PARAM_ERROR;
- 
-@@ -505,7 +506,7 @@
-    if (strm->bzalloc == NULL) strm->bzalloc = default_bzalloc;
-    if (strm->bzfree == NULL) strm->bzfree = default_bzfree;
- 
--   s = BZALLOC( sizeof(DState) );
-+   s = (DState *) BZALLOC( sizeof(DState) );
-    if (s == NULL) return BZ_MEM_ERROR;
-    s->strm                  = strm;
-    strm->state              = s;
-@@ -683,7 +684,10 @@
- 
- 
- /*---------------------------------------------------*/
--__inline__ Int32 BZ2_indexIntoF ( Int32 indx, Int32 *cftab )
-+#ifndef __cplusplus
-+R_INLINE 
-+#endif
-+Int32 BZ2_indexIntoF ( Int32 indx, Int32 *cftab )
- {
-    Int32 nb, na, mid;
-    nb = 0;
-@@ -809,7 +813,7 @@
-    Bool    corrupt;
-    DState* s;
-    if (strm == NULL) return BZ_PARAM_ERROR;
--   s = strm->state;
-+   s = (DState *) strm->state;
-    if (s == NULL) return BZ_PARAM_ERROR;
-    if (s->strm != strm) return BZ_PARAM_ERROR;
- 
-@@ -862,7 +866,7 @@
- {
-    DState* s;
-    if (strm == NULL) return BZ_PARAM_ERROR;
--   s = strm->state;
-+   s = (DState *) strm->state;
-    if (s == NULL) return BZ_PARAM_ERROR;
-    if (s->strm != strm) return BZ_PARAM_ERROR;
- 
-@@ -933,7 +937,7 @@
-    if (ferror(f))
-       { BZ_SETERR(BZ_IO_ERROR); return NULL; };
- 
--   bzf = malloc ( sizeof(bzFile) );
-+   bzf = (bzFile *) malloc ( sizeof(bzFile) );
-    if (bzf == NULL)
-       { BZ_SETERR(BZ_MEM_ERROR); return NULL; };
- 
-@@ -981,7 +985,7 @@
-       { BZ_SETERR(BZ_OK); return; };
- 
-    bzf->strm.avail_in = len;
--   bzf->strm.next_in  = buf;
-+   bzf->strm.next_in  = (char *) buf;
- 
-    while (True) {
-       bzf->strm.avail_out = BZ_MAX_UNUSED;
-@@ -1106,7 +1110,7 @@
-    if (ferror(f))
-       { BZ_SETERR(BZ_IO_ERROR); return NULL; };
- 
--   bzf = malloc ( sizeof(bzFile) );
-+   bzf = (bzFile *) malloc ( sizeof(bzFile) );
-    if (bzf == NULL) 
-       { BZ_SETERR(BZ_MEM_ERROR); return NULL; };
- 
-@@ -1178,7 +1182,7 @@
-       { BZ_SETERR(BZ_OK); return 0; };
- 
-    bzf->strm.avail_out = len;
--   bzf->strm.next_out = buf;
-+   bzf->strm.next_out = (char *) buf;
- 
-    while (True) {
- 
-@@ -1378,6 +1382,15 @@
- #else
- #   define SET_BINARY_MODE(file)
- #endif
-+
-+#if !defined(fdopen) && defined(HAVE_FDOPEN)
-+  FILE *fdopen(int fildes, const char *mode)
-+#ifdef __cplusplus
-+	throw ()
-+#endif
-+ ;
-+#endif
-+
- static
- BZFILE * bzopen_or_bzdopen
-                ( const char *path,   /* no use when bzdopen */
-@@ -1424,7 +1437,7 @@
-         fp = fopen(path,mode2);
-       }
-    } else {
--#ifdef BZ_STRICT_ANSI
-+#ifndef HAVE_FDOPEN
-       fp = NULL;
- #else
-       fp = fdopen(fd,mode2);
-@@ -1513,10 +1526,9 @@
- void BZ_API(BZ2_bzclose) (BZFILE* b)
- {
-    int bzerr;
--   FILE *fp;
-+   FILE *fp = ((bzFile *)b)->handle;
-    
-    if (b==NULL) {return;}
--   fp = ((bzFile *)b)->handle;
-    if(((bzFile*)b)->writing){
-       BZ2_bzWriteClose(&bzerr,b,0,NULL,NULL);
-       if(bzerr != BZ_OK){
-diff -u bzip2-1.0.4/bzlib_private.h bzip2/bzlib_private.h
---- bzip2-1.0.4/bzlib_private.h	2007-01-03 02:00:55.000000000 +0000
-+++ bzip2/bzlib_private.h	2007-05-07 12:56:51.000000000 +0100
-@@ -22,6 +22,7 @@
- #ifndef _BZLIB_PRIVATE_H
- #define _BZLIB_PRIVATE_H
- 
-+#include <config.h> /* for R_INLINE */
- #include <stdlib.h>
- 
- #ifndef BZ_NO_STDIO
-diff -u bzip2-1.0.4/compress.c bzip2/compress.c
---- bzip2-1.0.4/compress.c	2007-01-03 02:00:55.000000000 +0000
-+++ bzip2/compress.c	2007-05-07 12:56:50.000000000 +0100
-@@ -69,7 +69,7 @@
- 
- /*---------------------------------------------------*/
- static
--__inline__
-+R_INLINE
- void bsW ( EState* s, Int32 n, UInt32 v )
- {
-    bsNEEDW ( n );
-diff -u bzip2-1.0.4/decompress.c bzip2/decompress.c
---- bzip2-1.0.4/decompress.c	2007-01-03 02:00:55.000000000 +0000
-+++ bzip2/decompress.c	2007-05-07 12:56:50.000000000 +0100
-@@ -209,13 +209,13 @@
-       s->blockSize100k -= BZ_HDR_0;
- 
-       if (s->smallDecompress) {
--         s->ll16 = BZALLOC( s->blockSize100k * 100000 * sizeof(UInt16) );
--         s->ll4  = BZALLOC( 
--                      ((1 + s->blockSize100k * 100000) >> 1) * sizeof(UChar) 
--                   );
-+         s->ll16 = (UInt16*) BZALLOC( s->blockSize100k * 100000 * sizeof(UInt16) );
-+         s->ll4  = (UChar *) BZALLOC( 
-+		               ((1 + s->blockSize100k * 100000) >> 1) * sizeof(UChar) 
-+		             );
-          if (s->ll16 == NULL || s->ll4 == NULL) RETURN(BZ_MEM_ERROR);
-       } else {
--         s->tt  = BZALLOC( s->blockSize100k * 100000 * sizeof(Int32) );
-+         s->tt  = (UInt32 *) BZALLOC( s->blockSize100k * 100000 * sizeof(Int32) );
-          if (s->tt == NULL) RETURN(BZ_MEM_ERROR);
-       }
- 
diff --git a/src/extra/bzip2/blocksort.c b/src/extra/bzip2/blocksort.c
deleted file mode 100644
index 3315ed9..0000000
--- a/src/extra/bzip2/blocksort.c
+++ /dev/null
@@ -1,1095 +0,0 @@
-
-/*-------------------------------------------------------------*/
-/*--- Block sorting machinery                               ---*/
-/*---                                           blocksort.c ---*/
-/*-------------------------------------------------------------*/
-
-/* ------------------------------------------------------------------
-   This file is part of bzip2/libbzip2, a program and library for
-   lossless, block-sorting data compression.
-
-   bzip2/libbzip2 version 1.0.6 of 6 September 2010
-   Copyright (C) 1996-2010 Julian Seward <jseward at bzip.org>
-
-   Please read the WARNING, DISCLAIMER and PATENTS sections in the 
-   README file.
-
-   This program is released under the terms of the license contained
-   in the file LICENSE.
-   ------------------------------------------------------------------ */
-
-
-#include "bzlib_private.h"
-
-/*---------------------------------------------*/
-/*--- Fallback O(N log(N)^2) sorting        ---*/
-/*--- algorithm, for repetitive blocks      ---*/
-/*---------------------------------------------*/
-
-/*---------------------------------------------*/
-static 
-R_INLINE
-void fallbackSimpleSort ( UInt32* fmap, 
-                          UInt32* eclass, 
-                          Int32   lo, 
-                          Int32   hi )
-{
-   Int32 i, j, tmp;
-   UInt32 ec_tmp;
-
-   if (lo == hi) return;
-
-   if (hi - lo > 3) {
-      for ( i = hi-4; i >= lo; i-- ) {
-         tmp = fmap[i];
-         ec_tmp = eclass[tmp];
-         for ( j = i+4; j <= hi && ec_tmp > eclass[fmap[j]]; j += 4 )
-            fmap[j-4] = fmap[j];
-         fmap[j-4] = tmp;
-      }
-   }
-
-   for ( i = hi-1; i >= lo; i-- ) {
-      tmp = fmap[i];
-      ec_tmp = eclass[tmp];
-      for ( j = i+1; j <= hi && ec_tmp > eclass[fmap[j]]; j++ )
-         fmap[j-1] = fmap[j];
-      fmap[j-1] = tmp;
-   }
-}
-
-
-/*---------------------------------------------*/
-#define fswap(zz1, zz2) \
-   { Int32 zztmp = zz1; zz1 = zz2; zz2 = zztmp; }
-
-#define fvswap(zzp1, zzp2, zzn)       \
-{                                     \
-   Int32 yyp1 = (zzp1);               \
-   Int32 yyp2 = (zzp2);               \
-   Int32 yyn  = (zzn);                \
-   while (yyn > 0) {                  \
-      fswap(fmap[yyp1], fmap[yyp2]);  \
-      yyp1++; yyp2++; yyn--;          \
-   }                                  \
-}
-
-
-#define fmin(a,b) ((a) < (b)) ? (a) : (b)
-
-#define fpush(lz,hz) { stackLo[sp] = lz; \
-                       stackHi[sp] = hz; \
-                       sp++; }
-
-#define fpop(lz,hz) { sp--;              \
-                      lz = stackLo[sp];  \
-                      hz = stackHi[sp]; }
-
-#define FALLBACK_QSORT_SMALL_THRESH 10
-#define FALLBACK_QSORT_STACK_SIZE   100
-
-
-static
-void fallbackQSort3 ( UInt32* fmap, 
-                      UInt32* eclass,
-                      Int32   loSt, 
-                      Int32   hiSt )
-{
-   Int32 unLo, unHi, ltLo, gtHi, n, m;
-   Int32 sp, lo, hi;
-   UInt32 med, r, r3;
-   Int32 stackLo[FALLBACK_QSORT_STACK_SIZE];
-   Int32 stackHi[FALLBACK_QSORT_STACK_SIZE];
-
-   r = 0;
-
-   sp = 0;
-   fpush ( loSt, hiSt );
-
-   while (sp > 0) {
-
-      AssertH ( sp < FALLBACK_QSORT_STACK_SIZE - 1, 1004 );
-
-      fpop ( lo, hi );
-      if (hi - lo < FALLBACK_QSORT_SMALL_THRESH) {
-         fallbackSimpleSort ( fmap, eclass, lo, hi );
-         continue;
-      }
-
-      /* Random partitioning.  Median of 3 sometimes fails to
-         avoid bad cases.  Median of 9 seems to help but 
-         looks rather expensive.  This too seems to work but
-         is cheaper.  Guidance for the magic constants 
-         7621 and 32768 is taken from Sedgewick's algorithms
-         book, chapter 35.
-      */
-      r = ((r * 7621) + 1) % 32768;
-      r3 = r % 3;
-      if (r3 == 0) med = eclass[fmap[lo]]; else
-      if (r3 == 1) med = eclass[fmap[(lo+hi)>>1]]; else
-                   med = eclass[fmap[hi]];
-
-      unLo = ltLo = lo;
-      unHi = gtHi = hi;
-
-      while (1) {
-         while (1) {
-            if (unLo > unHi) break;
-            n = (Int32)eclass[fmap[unLo]] - (Int32)med;
-            if (n == 0) { 
-               fswap(fmap[unLo], fmap[ltLo]); 
-               ltLo++; unLo++; 
-               continue; 
-            };
-            if (n > 0) break;
-            unLo++;
-         }
-         while (1) {
-            if (unLo > unHi) break;
-            n = (Int32)eclass[fmap[unHi]] - (Int32)med;
-            if (n == 0) { 
-               fswap(fmap[unHi], fmap[gtHi]); 
-               gtHi--; unHi--; 
-               continue; 
-            };
-            if (n < 0) break;
-            unHi--;
-         }
-         if (unLo > unHi) break;
-         fswap(fmap[unLo], fmap[unHi]); unLo++; unHi--;
-      }
-
-      AssertD ( unHi == unLo-1, "fallbackQSort3(2)" );
-
-      if (gtHi < ltLo) continue;
-
-      n = fmin(ltLo-lo, unLo-ltLo); fvswap(lo, unLo-n, n);
-      m = fmin(hi-gtHi, gtHi-unHi); fvswap(unLo, hi-m+1, m);
-
-      n = lo + unLo - ltLo - 1;
-      m = hi - (gtHi - unHi) + 1;
-
-      if (n - lo > hi - m) {
-         fpush ( lo, n );
-         fpush ( m, hi );
-      } else {
-         fpush ( m, hi );
-         fpush ( lo, n );
-      }
-   }
-}
-
-#undef fmin
-#undef fpush
-#undef fpop
-#undef fswap
-#undef fvswap
-#undef FALLBACK_QSORT_SMALL_THRESH
-#undef FALLBACK_QSORT_STACK_SIZE
-
-
-/*---------------------------------------------*/
-/* Pre:
-      nblock > 0
-      eclass exists for [0 .. nblock-1]
-      ((UChar*)eclass) [0 .. nblock-1] holds block
-      ptr exists for [0 .. nblock-1]
-
-   Post:
-      ((UChar*)eclass) [0 .. nblock-1] holds block
-      All other areas of eclass destroyed
-      fmap [0 .. nblock-1] holds sorted order
-      bhtab [ 0 .. 2+(nblock/32) ] destroyed
-*/
-
-#define       SET_BH(zz)  bhtab[(zz) >> 5] |= (1U << ((zz) & 31))
-#define     CLEAR_BH(zz)  bhtab[(zz) >> 5] &= ~(1U << ((zz) & 31))
-#define     ISSET_BH(zz)  (bhtab[(zz) >> 5] & (1U << ((zz) & 31)))
-#define      WORD_BH(zz)  bhtab[(zz) >> 5]
-#define UNALIGNED_BH(zz)  ((zz) & 0x01f)
-
-static
-void fallbackSort ( UInt32* fmap, 
-                    UInt32* eclass, 
-                    UInt32* bhtab,
-                    Int32   nblock,
-                    Int32   verb )
-{
-   Int32 ftab[257];
-   Int32 ftabCopy[256];
-   Int32 H, i, j, k, l, r, cc, cc1;
-   Int32 nNotDone;
-   Int32 nBhtab;
-   UChar* eclass8 = (UChar*)eclass;
-
-   /*--
-      Initial 1-char radix sort to generate
-      initial fmap and initial BH bits.
-   --*/
-   if (verb >= 4)
-      VPrintf0 ( "        bucket sorting ...\n" );
-   for (i = 0; i < 257;    i++) ftab[i] = 0;
-   for (i = 0; i < nblock; i++) ftab[eclass8[i]]++;
-   for (i = 0; i < 256;    i++) ftabCopy[i] = ftab[i];
-   for (i = 1; i < 257;    i++) ftab[i] += ftab[i-1];
-
-   for (i = 0; i < nblock; i++) {
-      j = eclass8[i];
-      k = ftab[j] - 1;
-      ftab[j] = k;
-      fmap[k] = i;
-   }
-
-   nBhtab = 2 + (nblock / 32);
-   for (i = 0; i < nBhtab; i++) bhtab[i] = 0;
-   for (i = 0; i < 256; i++) SET_BH(ftab[i]);
-
-   /*--
-      Inductively refine the buckets.  Kind-of an
-      "exponential radix sort" (!), inspired by the
-      Manber-Myers suffix array construction algorithm.
-   --*/
-
-   /*-- set sentinel bits for block-end detection --*/
-   for (i = 0; i < 32; i++) { 
-      SET_BH(nblock + 2*i);
-      CLEAR_BH(nblock + 2*i + 1);
-   }
-
-   /*-- the log(N) loop --*/
-   H = 1;
-   while (1) {
-
-      if (verb >= 4) 
-         VPrintf1 ( "        depth %6d has ", H );
-
-      j = 0;
-      for (i = 0; i < nblock; i++) {
-         if (ISSET_BH(i)) j = i;
-         k = fmap[i] - H; if (k < 0) k += nblock;
-         eclass[k] = j;
-      }
-
-      nNotDone = 0;
-      r = -1;
-      while (1) {
-
-	 /*-- find the next non-singleton bucket --*/
-         k = r + 1;
-         while (ISSET_BH(k) && UNALIGNED_BH(k)) k++;
-         if (ISSET_BH(k)) {
-            while (WORD_BH(k) == 0xffffffff) k += 32;
-            while (ISSET_BH(k)) k++;
-         }
-         l = k - 1;
-         if (l >= nblock) break;
-         while (!ISSET_BH(k) && UNALIGNED_BH(k)) k++;
-         if (!ISSET_BH(k)) {
-            while (WORD_BH(k) == 0x00000000) k += 32;
-            while (!ISSET_BH(k)) k++;
-         }
-         r = k - 1;
-         if (r >= nblock) break;
-
-         /*-- now [l, r] bracket current bucket --*/
-         if (r > l) {
-            nNotDone += (r - l + 1);
-            fallbackQSort3 ( fmap, eclass, l, r );
-
-            /*-- scan bucket and generate header bits-- */
-            cc = -1;
-            for (i = l; i <= r; i++) {
-               cc1 = eclass[fmap[i]];
-               if (cc != cc1) { SET_BH(i); cc = cc1; };
-            }
-         }
-      }
-
-      if (verb >= 4) 
-         VPrintf1 ( "%6d unresolved strings\n", nNotDone );
-
-      H *= 2;
-      if (H > nblock || nNotDone == 0) break;
-   }
-
-   /*-- 
-      Reconstruct the original block in
-      eclass8 [0 .. nblock-1], since the
-      previous phase destroyed it.
-   --*/
-   if (verb >= 4)
-      VPrintf0 ( "        reconstructing block ...\n" );
-   j = 0;
-   for (i = 0; i < nblock; i++) {
-      while (ftabCopy[j] == 0) j++;
-      ftabCopy[j]--;
-      eclass8[fmap[i]] = (UChar)j;
-   }
-   AssertH ( j < 256, 1005 );
-}
-
-#undef       SET_BH
-#undef     CLEAR_BH
-#undef     ISSET_BH
-#undef      WORD_BH
-#undef UNALIGNED_BH
-
-
-/*---------------------------------------------*/
-/*--- The main, O(N^2 log(N)) sorting       ---*/
-/*--- algorithm.  Faster for "normal"       ---*/
-/*--- non-repetitive blocks.                ---*/
-/*---------------------------------------------*/
-
-/*---------------------------------------------*/
-/* Solaris cc objects to inlining functions whose names start with `main' */
-static
-R_INLINE
-Bool BZmainGtU ( UInt32  i1, 
-               UInt32  i2,
-               UChar*  block, 
-               UInt16* quadrant,
-               UInt32  nblock,
-               Int32*  budget )
-{
-   Int32  k;
-   UChar  c1, c2;
-   UInt16 s1, s2;
-
-   AssertD ( i1 != i2, "BZmainGtU" );
-   /* 1 */
-   c1 = block[i1]; c2 = block[i2];
-   if (c1 != c2) return (c1 > c2);
-   i1++; i2++;
-   /* 2 */
-   c1 = block[i1]; c2 = block[i2];
-   if (c1 != c2) return (c1 > c2);
-   i1++; i2++;
-   /* 3 */
-   c1 = block[i1]; c2 = block[i2];
-   if (c1 != c2) return (c1 > c2);
-   i1++; i2++;
-   /* 4 */
-   c1 = block[i1]; c2 = block[i2];
-   if (c1 != c2) return (c1 > c2);
-   i1++; i2++;
-   /* 5 */
-   c1 = block[i1]; c2 = block[i2];
-   if (c1 != c2) return (c1 > c2);
-   i1++; i2++;
-   /* 6 */
-   c1 = block[i1]; c2 = block[i2];
-   if (c1 != c2) return (c1 > c2);
-   i1++; i2++;
-   /* 7 */
-   c1 = block[i1]; c2 = block[i2];
-   if (c1 != c2) return (c1 > c2);
-   i1++; i2++;
-   /* 8 */
-   c1 = block[i1]; c2 = block[i2];
-   if (c1 != c2) return (c1 > c2);
-   i1++; i2++;
-   /* 9 */
-   c1 = block[i1]; c2 = block[i2];
-   if (c1 != c2) return (c1 > c2);
-   i1++; i2++;
-   /* 10 */
-   c1 = block[i1]; c2 = block[i2];
-   if (c1 != c2) return (c1 > c2);
-   i1++; i2++;
-   /* 11 */
-   c1 = block[i1]; c2 = block[i2];
-   if (c1 != c2) return (c1 > c2);
-   i1++; i2++;
-   /* 12 */
-   c1 = block[i1]; c2 = block[i2];
-   if (c1 != c2) return (c1 > c2);
-   i1++; i2++;
-
-   k = nblock + 8;
-
-   do {
-      /* 1 */
-      c1 = block[i1]; c2 = block[i2];
-      if (c1 != c2) return (c1 > c2);
-      s1 = quadrant[i1]; s2 = quadrant[i2];
-      if (s1 != s2) return (s1 > s2);
-      i1++; i2++;
-      /* 2 */
-      c1 = block[i1]; c2 = block[i2];
-      if (c1 != c2) return (c1 > c2);
-      s1 = quadrant[i1]; s2 = quadrant[i2];
-      if (s1 != s2) return (s1 > s2);
-      i1++; i2++;
-      /* 3 */
-      c1 = block[i1]; c2 = block[i2];
-      if (c1 != c2) return (c1 > c2);
-      s1 = quadrant[i1]; s2 = quadrant[i2];
-      if (s1 != s2) return (s1 > s2);
-      i1++; i2++;
-      /* 4 */
-      c1 = block[i1]; c2 = block[i2];
-      if (c1 != c2) return (c1 > c2);
-      s1 = quadrant[i1]; s2 = quadrant[i2];
-      if (s1 != s2) return (s1 > s2);
-      i1++; i2++;
-      /* 5 */
-      c1 = block[i1]; c2 = block[i2];
-      if (c1 != c2) return (c1 > c2);
-      s1 = quadrant[i1]; s2 = quadrant[i2];
-      if (s1 != s2) return (s1 > s2);
-      i1++; i2++;
-      /* 6 */
-      c1 = block[i1]; c2 = block[i2];
-      if (c1 != c2) return (c1 > c2);
-      s1 = quadrant[i1]; s2 = quadrant[i2];
-      if (s1 != s2) return (s1 > s2);
-      i1++; i2++;
-      /* 7 */
-      c1 = block[i1]; c2 = block[i2];
-      if (c1 != c2) return (c1 > c2);
-      s1 = quadrant[i1]; s2 = quadrant[i2];
-      if (s1 != s2) return (s1 > s2);
-      i1++; i2++;
-      /* 8 */
-      c1 = block[i1]; c2 = block[i2];
-      if (c1 != c2) return (c1 > c2);
-      s1 = quadrant[i1]; s2 = quadrant[i2];
-      if (s1 != s2) return (s1 > s2);
-      i1++; i2++;
-
-      if (i1 >= nblock) i1 -= nblock;
-      if (i2 >= nblock) i2 -= nblock;
-
-      k -= 8;
-      (*budget)--;
-   }
-      while (k >= 0);
-
-   return False;
-}
-
-
-/*---------------------------------------------*/
-/*--
-   Knuth's increments seem to work better
-   than Incerpi-Sedgewick here.  Possibly
-   because the number of elems to sort is
-   usually small, typically <= 20.
---*/
-static
-Int32 incs[14] = { 1, 4, 13, 40, 121, 364, 1093, 3280,
-                   9841, 29524, 88573, 265720,
-                   797161, 2391484 };
-
-static
-void mainSimpleSort ( UInt32* ptr,
-                      UChar*  block,
-                      UInt16* quadrant,
-                      Int32   nblock,
-                      Int32   lo, 
-                      Int32   hi, 
-                      Int32   d,
-                      Int32*  budget )
-{
-   Int32 i, j, h, bigN, hp;
-   UInt32 v;
-
-   bigN = hi - lo + 1;
-   if (bigN < 2) return;
-
-   hp = 0;
-   while (incs[hp] < bigN) hp++;
-   hp--;
-
-   for (; hp >= 0; hp--) {
-      h = incs[hp];
-
-      i = lo + h;
-      while (True) {
-
-         /*-- copy 1 --*/
-         if (i > hi) break;
-         v = ptr[i];
-         j = i;
-         while ( BZmainGtU ( 
-                    ptr[j-h]+d, v+d, block, quadrant, nblock, budget 
-                 ) ) {
-            ptr[j] = ptr[j-h];
-            j = j - h;
-            if (j <= (lo + h - 1)) break;
-         }
-         ptr[j] = v;
-         i++;
-
-         /*-- copy 2 --*/
-         if (i > hi) break;
-         v = ptr[i];
-         j = i;
-         while ( BZmainGtU ( 
-                    ptr[j-h]+d, v+d, block, quadrant, nblock, budget 
-                 ) ) {
-            ptr[j] = ptr[j-h];
-            j = j - h;
-            if (j <= (lo + h - 1)) break;
-         }
-         ptr[j] = v;
-         i++;
-
-         /*-- copy 3 --*/
-         if (i > hi) break;
-         v = ptr[i];
-         j = i;
-         while ( BZmainGtU ( 
-                    ptr[j-h]+d, v+d, block, quadrant, nblock, budget 
-                 ) ) {
-            ptr[j] = ptr[j-h];
-            j = j - h;
-            if (j <= (lo + h - 1)) break;
-         }
-         ptr[j] = v;
-         i++;
-
-         if (*budget < 0) return;
-      }
-   }
-}
-
-
-/*---------------------------------------------*/
-/*--
-   The following is an implementation of
-   an elegant 3-way quicksort for strings,
-   described in a paper "Fast Algorithms for
-   Sorting and Searching Strings", by Robert
-   Sedgewick and Jon L. Bentley.
---*/
-
-#define mswap(zz1, zz2) \
-   { Int32 zztmp = zz1; zz1 = zz2; zz2 = zztmp; }
-
-#define mvswap(zzp1, zzp2, zzn)       \
-{                                     \
-   Int32 yyp1 = (zzp1);               \
-   Int32 yyp2 = (zzp2);               \
-   Int32 yyn  = (zzn);                \
-   while (yyn > 0) {                  \
-      mswap(ptr[yyp1], ptr[yyp2]);    \
-      yyp1++; yyp2++; yyn--;          \
-   }                                  \
-}
-
-static 
-R_INLINE
-UChar mmed3 ( UChar a, UChar b, UChar c )
-{
-   UChar t;
-   if (a > b) { t = a; a = b; b = t; };
-   if (b > c) { 
-      b = c;
-      if (a > b) b = a;
-   }
-   return b;
-}
-
-#define mmin(a,b) ((a) < (b)) ? (a) : (b)
-
-#define mpush(lz,hz,dz) { stackLo[sp] = lz; \
-                          stackHi[sp] = hz; \
-                          stackD [sp] = dz; \
-                          sp++; }
-
-#define mpop(lz,hz,dz) { sp--;             \
-                         lz = stackLo[sp]; \
-                         hz = stackHi[sp]; \
-                         dz = stackD [sp]; }
-
-
-#define mnextsize(az) (nextHi[az]-nextLo[az])
-
-#define mnextswap(az,bz)                                        \
-   { Int32 tz;                                                  \
-     tz = nextLo[az]; nextLo[az] = nextLo[bz]; nextLo[bz] = tz; \
-     tz = nextHi[az]; nextHi[az] = nextHi[bz]; nextHi[bz] = tz; \
-     tz = nextD [az]; nextD [az] = nextD [bz]; nextD [bz] = tz; }
-
-
-#define MAIN_QSORT_SMALL_THRESH 20
-#define MAIN_QSORT_DEPTH_THRESH (BZ_N_RADIX + BZ_N_QSORT)
-#define MAIN_QSORT_STACK_SIZE 100
-
-static
-void mainQSort3 ( UInt32* ptr,
-                  UChar*  block,
-                  UInt16* quadrant,
-                  Int32   nblock,
-                  Int32   loSt, 
-                  Int32   hiSt, 
-                  Int32   dSt,
-                  Int32*  budget )
-{
-   Int32 unLo, unHi, ltLo, gtHi, n, m, med;
-   Int32 sp, lo, hi, d;
-
-   Int32 stackLo[MAIN_QSORT_STACK_SIZE];
-   Int32 stackHi[MAIN_QSORT_STACK_SIZE];
-   Int32 stackD [MAIN_QSORT_STACK_SIZE];
-
-   Int32 nextLo[3];
-   Int32 nextHi[3];
-   Int32 nextD [3];
-
-   sp = 0;
-   mpush ( loSt, hiSt, dSt );
-
-   while (sp > 0) {
-
-      AssertH ( sp < MAIN_QSORT_STACK_SIZE - 2, 1001 );
-
-      mpop ( lo, hi, d );
-      if (hi - lo < MAIN_QSORT_SMALL_THRESH || 
-          d > MAIN_QSORT_DEPTH_THRESH) {
-         mainSimpleSort ( ptr, block, quadrant, nblock, lo, hi, d, budget );
-         if (*budget < 0) return;
-         continue;
-      }
-
-      med = (Int32) 
-            mmed3 ( block[ptr[ lo         ]+d],
-                    block[ptr[ hi         ]+d],
-                    block[ptr[ (lo+hi)>>1 ]+d] );
-
-      unLo = ltLo = lo;
-      unHi = gtHi = hi;
-
-      while (True) {
-         while (True) {
-            if (unLo > unHi) break;
-            n = ((Int32)block[ptr[unLo]+d]) - med;
-            if (n == 0) { 
-               mswap(ptr[unLo], ptr[ltLo]); 
-               ltLo++; unLo++; continue; 
-            };
-            if (n >  0) break;
-            unLo++;
-         }
-         while (True) {
-            if (unLo > unHi) break;
-            n = ((Int32)block[ptr[unHi]+d]) - med;
-            if (n == 0) { 
-               mswap(ptr[unHi], ptr[gtHi]); 
-               gtHi--; unHi--; continue; 
-            };
-            if (n <  0) break;
-            unHi--;
-         }
-         if (unLo > unHi) break;
-         mswap(ptr[unLo], ptr[unHi]); unLo++; unHi--;
-      }
-
-      AssertD ( unHi == unLo-1, "mainQSort3(2)" );
-
-      if (gtHi < ltLo) {
-         mpush(lo, hi, d+1 );
-         continue;
-      }
-
-      n = mmin(ltLo-lo, unLo-ltLo); mvswap(lo, unLo-n, n);
-      m = mmin(hi-gtHi, gtHi-unHi); mvswap(unLo, hi-m+1, m);
-
-      n = lo + unLo - ltLo - 1;
-      m = hi - (gtHi - unHi) + 1;
-
-      nextLo[0] = lo;  nextHi[0] = n;   nextD[0] = d;
-      nextLo[1] = m;   nextHi[1] = hi;  nextD[1] = d;
-      nextLo[2] = n+1; nextHi[2] = m-1; nextD[2] = d+1;
-
-      if (mnextsize(0) < mnextsize(1)) mnextswap(0,1);
-      if (mnextsize(1) < mnextsize(2)) mnextswap(1,2);
-      if (mnextsize(0) < mnextsize(1)) mnextswap(0,1);
-
-      AssertD (mnextsize(0) >= mnextsize(1), "mainQSort3(8)" );
-      AssertD (mnextsize(1) >= mnextsize(2), "mainQSort3(9)" );
-
-      mpush (nextLo[0], nextHi[0], nextD[0]);
-      mpush (nextLo[1], nextHi[1], nextD[1]);
-      mpush (nextLo[2], nextHi[2], nextD[2]);
-   }
-}
-
-#undef mswap
-#undef mvswap
-#undef mpush
-#undef mpop
-#undef mmin
-#undef mnextsize
-#undef mnextswap
-#undef MAIN_QSORT_SMALL_THRESH
-#undef MAIN_QSORT_DEPTH_THRESH
-#undef MAIN_QSORT_STACK_SIZE
-
-
-/*---------------------------------------------*/
-/* Pre:
-      nblock > N_OVERSHOOT
-      block32 exists for [0 .. nblock-1 +N_OVERSHOOT]
-      ((UChar*)block32) [0 .. nblock-1] holds block
-      ptr exists for [0 .. nblock-1]
-
-   Post:
-      ((UChar*)block32) [0 .. nblock-1] holds block
-      All other areas of block32 destroyed
-      ftab [0 .. 65536 ] destroyed
-      ptr [0 .. nblock-1] holds sorted order
-      if (*budget < 0), sorting was abandoned
-*/
-
-#define BIGFREQ(b) (ftab[((b)+1) << 8] - ftab[(b) << 8])
-#define SETMASK (1 << 21)
-#define CLEARMASK (~(SETMASK))
-
-static
-void mainSort ( UInt32* ptr, 
-                UChar*  block,
-                UInt16* quadrant, 
-                UInt32* ftab,
-                Int32   nblock,
-                Int32   verb,
-                Int32*  budget )
-{
-   Int32  i, j, k, ss, sb;
-   Int32  runningOrder[256];
-   Bool   bigDone[256];
-   Int32  copyStart[256];
-   Int32  copyEnd  [256];
-   UChar  c1;
-   Int32  numQSorted;
-   UInt16 s;
-   if (verb >= 4) VPrintf0 ( "        main sort initialise ...\n" );
-
-   /*-- set up the 2-byte frequency table --*/
-   for (i = 65536; i >= 0; i--) ftab[i] = 0;
-
-   j = block[0] << 8;
-   i = nblock-1;
-   for (; i >= 3; i -= 4) {
-      quadrant[i] = 0;
-      j = (j >> 8) | ( ((UInt16)block[i]) << 8);
-      ftab[j]++;
-      quadrant[i-1] = 0;
-      j = (j >> 8) | ( ((UInt16)block[i-1]) << 8);
-      ftab[j]++;
-      quadrant[i-2] = 0;
-      j = (j >> 8) | ( ((UInt16)block[i-2]) << 8);
-      ftab[j]++;
-      quadrant[i-3] = 0;
-      j = (j >> 8) | ( ((UInt16)block[i-3]) << 8);
-      ftab[j]++;
-   }
-   for (; i >= 0; i--) {
-      quadrant[i] = 0;
-      j = (j >> 8) | ( ((UInt16)block[i]) << 8);
-      ftab[j]++;
-   }
-
-   /*-- (emphasises close relationship of block & quadrant) --*/
-   for (i = 0; i < BZ_N_OVERSHOOT; i++) {
-      block   [nblock+i] = block[i];
-      quadrant[nblock+i] = 0;
-   }
-
-   if (verb >= 4) VPrintf0 ( "        bucket sorting ...\n" );
-
-   /*-- Complete the initial radix sort --*/
-   for (i = 1; i <= 65536; i++) ftab[i] += ftab[i-1];
-
-   s = block[0] << 8;
-   i = nblock-1;
-   for (; i >= 3; i -= 4) {
-      s = (s >> 8) | (block[i] << 8);
-      j = ftab[s] -1;
-      ftab[s] = j;
-      ptr[j] = i;
-      s = (s >> 8) | (block[i-1] << 8);
-      j = ftab[s] -1;
-      ftab[s] = j;
-      ptr[j] = i-1;
-      s = (s >> 8) | (block[i-2] << 8);
-      j = ftab[s] -1;
-      ftab[s] = j;
-      ptr[j] = i-2;
-      s = (s >> 8) | (block[i-3] << 8);
-      j = ftab[s] -1;
-      ftab[s] = j;
-      ptr[j] = i-3;
-   }
-   for (; i >= 0; i--) {
-      s = (s >> 8) | (block[i] << 8);
-      j = ftab[s] -1;
-      ftab[s] = j;
-      ptr[j] = i;
-   }
-
-   /*--
-      Now ftab contains the first loc of every small bucket.
-      Calculate the running order, from smallest to largest
-      big bucket.
-   --*/
-   for (i = 0; i <= 255; i++) {
-      bigDone     [i] = False;
-      runningOrder[i] = i;
-   }
-
-   {
-      Int32 vv;
-      Int32 h = 1;
-      do h = 3 * h + 1; while (h <= 256);
-      do {
-         h = h / 3;
-         for (i = h; i <= 255; i++) {
-            vv = runningOrder[i];
-            j = i;
-            while ( BIGFREQ(runningOrder[j-h]) > BIGFREQ(vv) ) {
-               runningOrder[j] = runningOrder[j-h];
-               j = j - h;
-               if (j <= (h - 1)) goto zero;
-            }
-            zero:
-            runningOrder[j] = vv;
-         }
-      } while (h != 1);
-   }
-
-   /*--
-      The main sorting loop.
-   --*/
-
-   numQSorted = 0;
-
-   for (i = 0; i <= 255; i++) {
-
-      /*--
-         Process big buckets, starting with the least full.
-         Basically this is a 3-step process in which we call
-         mainQSort3 to sort the small buckets [ss, j], but
-         also make a big effort to avoid the calls if we can.
-      --*/
-      ss = runningOrder[i];
-
-      /*--
-         Step 1:
-         Complete the big bucket [ss] by quicksorting
-         any unsorted small buckets [ss, j], for j != ss.  
-         Hopefully previous pointer-scanning phases have already
-         completed many of the small buckets [ss, j], so
-         we don't have to sort them at all.
-      --*/
-      for (j = 0; j <= 255; j++) {
-         if (j != ss) {
-            sb = (ss << 8) + j;
-            if ( ! (ftab[sb] & SETMASK) ) {
-               Int32 lo = ftab[sb]   & CLEARMASK;
-               Int32 hi = (ftab[sb+1] & CLEARMASK) - 1;
-               if (hi > lo) {
-                  if (verb >= 4)
-                     VPrintf4 ( "        qsort [0x%x, 0x%x]   "
-                                "done %d   this %d\n",
-                                ss, j, numQSorted, hi - lo + 1 );
-                  mainQSort3 ( 
-                     ptr, block, quadrant, nblock, 
-                     lo, hi, BZ_N_RADIX, budget 
-                  );   
-                  numQSorted += (hi - lo + 1);
-                  if (*budget < 0) return;
-               }
-            }
-            ftab[sb] |= SETMASK;
-         }
-      }
-
-      AssertH ( !bigDone[ss], 1006 );
-
-      /*--
-         Step 2:
-         Now scan this big bucket [ss] so as to synthesise the
-         sorted order for small buckets [t, ss] for all t,
-         including, magically, the bucket [ss,ss] too.
-         This will avoid doing Real Work in subsequent Step 1's.
-      --*/
-      {
-         for (j = 0; j <= 255; j++) {
-            copyStart[j] =  ftab[(j << 8) + ss]     & CLEARMASK;
-            copyEnd  [j] = (ftab[(j << 8) + ss + 1] & CLEARMASK) - 1;
-         }
-         for (j = ftab[ss << 8] & CLEARMASK; j < copyStart[ss]; j++) {
-            k = ptr[j]-1; if (k < 0) k += nblock;
-            c1 = block[k];
-            if (!bigDone[c1])
-               ptr[ copyStart[c1]++ ] = k;
-         }
-         for (j = (ftab[(ss+1) << 8] & CLEARMASK) - 1; j > copyEnd[ss]; j--) {
-            k = ptr[j]-1; if (k < 0) k += nblock;
-            c1 = block[k];
-            if (!bigDone[c1]) 
-               ptr[ copyEnd[c1]-- ] = k;
-         }
-      }
-
-      AssertH ( (copyStart[ss]-1 == copyEnd[ss])
-                || 
-                /* Extremely rare case missing in bzip2-1.0.0 and 1.0.1.
-                   Necessity for this case is demonstrated by compressing 
-                   a sequence of approximately 48.5 million of character 
-                   251; 1.0.0/1.0.1 will then die here. */
-                (copyStart[ss] == 0 && copyEnd[ss] == nblock-1),
-                1007 )
-
-      for (j = 0; j <= 255; j++) ftab[(j << 8) + ss] |= SETMASK;
-
-      /*--
-         Step 3:
-         The [ss] big bucket is now done.  Record this fact,
-         and update the quadrant descriptors.  Remember to
-         update quadrants in the overshoot area too, if
-         necessary.  The "if (i < 255)" test merely skips
-         this updating for the last bucket processed, since
-         updating for the last bucket is pointless.
-
-         The quadrant array provides a way to incrementally
-         cache sort orderings, as they appear, so as to 
-         make subsequent comparisons in fullGtU() complete
-         faster.  For repetitive blocks this makes a big
-         difference (but not big enough to be able to avoid
-         the fallback sorting mechanism, exponential radix sort).
-
-         The precise meaning is: at all times:
-
-            for 0 <= i < nblock and 0 <= j <= nblock
-
-            if block[i] != block[j], 
-
-               then the relative values of quadrant[i] and 
-                    quadrant[j] are meaningless.
-
-               else {
-                  if quadrant[i] < quadrant[j]
-                     then the string starting at i lexicographically
-                     precedes the string starting at j
-
-                  else if quadrant[i] > quadrant[j]
-                     then the string starting at j lexicographically
-                     precedes the string starting at i
-
-                  else
-                     the relative ordering of the strings starting
-                     at i and j has not yet been determined.
-               }
-      --*/
-      bigDone[ss] = True;
-
-      if (i < 255) {
-         Int32 bbStart  = ftab[ss << 8] & CLEARMASK;
-         Int32 bbSize   = (ftab[(ss+1) << 8] & CLEARMASK) - bbStart;
-         Int32 shifts   = 0;
-
-         while ((bbSize >> shifts) > 65534) shifts++;
-
-         for (j = bbSize-1; j >= 0; j--) {
-            Int32 a2update     = ptr[bbStart + j];
-            UInt16 qVal        = (UInt16)(j >> shifts);
-            quadrant[a2update] = qVal;
-            if (a2update < BZ_N_OVERSHOOT)
-               quadrant[a2update + nblock] = qVal;
-         }
-         AssertH ( ((bbSize-1) >> shifts) <= 65535, 1002 );
-      }
-
-   }
-
-   if (verb >= 4)
-      VPrintf3 ( "        %d pointers, %d sorted, %d scanned\n",
-                 nblock, numQSorted, nblock - numQSorted );
-}
-
-#undef BIGFREQ
-#undef SETMASK
-#undef CLEARMASK
-
-
-/*---------------------------------------------*/
-/* Pre:
-      nblock > 0
-      arr2 exists for [0 .. nblock-1 +N_OVERSHOOT]
-      ((UChar*)arr2)  [0 .. nblock-1] holds block
-      arr1 exists for [0 .. nblock-1]
-
-   Post:
-      ((UChar*)arr2) [0 .. nblock-1] holds block
-      All other areas of block destroyed
-      ftab [ 0 .. 65536 ] destroyed
-      arr1 [0 .. nblock-1] holds sorted order
-*/
-void BZ2_blockSort ( EState* s )
-{
-   UInt32* ptr    = s->ptr; 
-   UChar*  block  = s->block;
-   UInt32* ftab   = s->ftab;
-   Int32   nblock = s->nblock;
-   Int32   verb   = s->verbosity;
-   Int32   wfact  = s->workFactor;
-   UInt16* quadrant;
-   Int32   budget;
-   Int32   budgetInit;
-   Int32   i;
-
-   if (nblock < 10000) {
-      fallbackSort ( s->arr1, s->arr2, ftab, nblock, verb );
-   } else {
-      /* Calculate the location for quadrant, remembering to get
-         the alignment right.  Assumes that &(block[0]) is at least
-         2-byte aligned -- this should be ok since block is really
-         the first section of arr2.
-      */
-      i = nblock+BZ_N_OVERSHOOT;
-      if (i & 1) i++;
-      quadrant = (UInt16*)(&(block[i]));
-
-      /* (wfact-1) / 3 puts the default-factor-30
-         transition point at very roughly the same place as 
-         with v0.1 and v0.9.0.  
-         Not that it particularly matters any more, since the
-         resulting compressed stream is now the same regardless
-         of whether or not we use the main sort or fallback sort.
-      */
-      if (wfact < 1  ) wfact = 1;
-      if (wfact > 100) wfact = 100;
-      budgetInit = nblock * ((wfact-1) / 3);
-      budget = budgetInit;
-
-      mainSort ( ptr, block, quadrant, ftab, nblock, verb, &budget );
-      if (verb >= 3) 
-         VPrintf3 ( "      %d work, %d block, ratio %5.2f\n",
-                    budgetInit - budget,
-                    nblock, 
-                    (float)(budgetInit - budget) /
-                    (float)(nblock==0 ? 1 : nblock) ); 
-      if (budget < 0) {
-         if (verb >= 2) 
-            VPrintf0 ( "    too repetitive; using fallback"
-                       " sorting algorithm\n" );
-         fallbackSort ( s->arr1, s->arr2, ftab, nblock, verb );
-      }
-   }
-
-   s->origPtr = -1;
-   for (i = 0; i < s->nblock; i++)
-      if (ptr[i] == 0)
-         { s->origPtr = i; break; };
-
-   AssertH( s->origPtr != -1, 1003 );
-}
-
-
-/*-------------------------------------------------------------*/
-/*--- end                                       blocksort.c ---*/
-/*-------------------------------------------------------------*/
diff --git a/src/extra/bzip2/bzcompress.c b/src/extra/bzip2/bzcompress.c
deleted file mode 100644
index dbe8eb8..0000000
--- a/src/extra/bzip2/bzcompress.c
+++ /dev/null
@@ -1,672 +0,0 @@
-
-/*-------------------------------------------------------------*/
-/*--- Compression machinery (not incl block sorting)        ---*/
-/*---                                            compress.c ---*/
-/*-------------------------------------------------------------*/
-
-/* ------------------------------------------------------------------
-   This file is part of bzip2/libbzip2, a program and library for
-   lossless, block-sorting data compression.
-
-   bzip2/libbzip2 version 1.0.5 of 10 December 2007
-   Copyright (C) 1996-2007 Julian Seward <jseward at bzip.org>
-
-   Please read the WARNING, DISCLAIMER and PATENTS sections in the 
-   README file.
-
-   This program is released under the terms of the license contained
-   in the file LICENSE.
-   ------------------------------------------------------------------ */
-
-
-/* CHANGES
-    0.9.0    -- original version.
-    0.9.0a/b -- no changes in this file.
-    0.9.0c   -- changed setting of nGroups in sendMTFValues() 
-                so as to do a bit better on small files
-*/
-
-#include "bzlib_private.h"
-
-
-/*---------------------------------------------------*/
-/*--- Bit stream I/O                              ---*/
-/*---------------------------------------------------*/
-
-/*---------------------------------------------------*/
-void BZ2_bsInitWrite ( EState* s )
-{
-   s->bsLive = 0;
-   s->bsBuff = 0;
-}
-
-
-/*---------------------------------------------------*/
-static
-void bsFinishWrite ( EState* s )
-{
-   while (s->bsLive > 0) {
-      s->zbits[s->numZ] = (UChar)(s->bsBuff >> 24);
-      s->numZ++;
-      s->bsBuff <<= 8;
-      s->bsLive -= 8;
-   }
-}
-
-
-/*---------------------------------------------------*/
-#define bsNEEDW(nz)                           \
-{                                             \
-   while (s->bsLive >= 8) {                   \
-      s->zbits[s->numZ]                       \
-         = (UChar)(s->bsBuff >> 24);          \
-      s->numZ++;                              \
-      s->bsBuff <<= 8;                        \
-      s->bsLive -= 8;                         \
-   }                                          \
-}
-
-
-/*---------------------------------------------------*/
-static
-R_INLINE
-void bsW ( EState* s, Int32 n, UInt32 v )
-{
-   bsNEEDW ( n );
-   s->bsBuff |= (v << (32 - s->bsLive - n));
-   s->bsLive += n;
-}
-
-
-/*---------------------------------------------------*/
-static
-void bsPutUInt32 ( EState* s, UInt32 u )
-{
-   bsW ( s, 8, (u >> 24) & 0xffL );
-   bsW ( s, 8, (u >> 16) & 0xffL );
-   bsW ( s, 8, (u >>  8) & 0xffL );
-   bsW ( s, 8,  u        & 0xffL );
-}
-
-
-/*---------------------------------------------------*/
-static
-void bsPutUChar ( EState* s, UChar c )
-{
-   bsW( s, 8, (UInt32)c );
-}
-
-
-/*---------------------------------------------------*/
-/*--- The back end proper                         ---*/
-/*---------------------------------------------------*/
-
-/*---------------------------------------------------*/
-static
-void makeMaps_e ( EState* s )
-{
-   Int32 i;
-   s->nInUse = 0;
-   for (i = 0; i < 256; i++)
-      if (s->inUse[i]) {
-         s->unseqToSeq[i] = s->nInUse;
-         s->nInUse++;
-      }
-}
-
-
-/*---------------------------------------------------*/
-static
-void generateMTFValues ( EState* s )
-{
-   UChar   yy[256];
-   Int32   i, j;
-   Int32   zPend;
-   Int32   wr;
-   Int32   EOB;
-
-   /* 
-      After sorting (eg, here),
-         s->arr1 [ 0 .. s->nblock-1 ] holds sorted order,
-         and
-         ((UChar*)s->arr2) [ 0 .. s->nblock-1 ] 
-         holds the original block data.
-
-      The first thing to do is generate the MTF values,
-      and put them in
-         ((UInt16*)s->arr1) [ 0 .. s->nblock-1 ].
-      Because there are strictly fewer or equal MTF values
-      than block values, ptr values in this area are overwritten
-      with MTF values only when they are no longer needed.
-
-      The final compressed bitstream is generated into the
-      area starting at
-         (UChar*) (&((UChar*)s->arr2)[s->nblock])
-
-      These storage aliases are set up in bzCompressInit(),
-      except for the last one, which is arranged in 
-      compressBlock().
-   */
-   UInt32* ptr   = s->ptr;
-   UChar* block  = s->block;
-   UInt16* mtfv  = s->mtfv;
-
-   makeMaps_e ( s );
-   EOB = s->nInUse+1;
-
-   for (i = 0; i <= EOB; i++) s->mtfFreq[i] = 0;
-
-   wr = 0;
-   zPend = 0;
-   for (i = 0; i < s->nInUse; i++) yy[i] = (UChar) i;
-
-   for (i = 0; i < s->nblock; i++) {
-      UChar ll_i;
-      AssertD ( wr <= i, "generateMTFValues(1)" );
-      j = ptr[i]-1; if (j < 0) j += s->nblock;
-      ll_i = s->unseqToSeq[block[j]];
-      AssertD ( ll_i < s->nInUse, "generateMTFValues(2a)" );
-
-      if (yy[0] == ll_i) { 
-         zPend++;
-      } else {
-
-         if (zPend > 0) {
-            zPend--;
-            while (True) {
-               if (zPend & 1) {
-                  mtfv[wr] = BZ_RUNB; wr++; 
-                  s->mtfFreq[BZ_RUNB]++; 
-               } else {
-                  mtfv[wr] = BZ_RUNA; wr++; 
-                  s->mtfFreq[BZ_RUNA]++; 
-               }
-               if (zPend < 2) break;
-               zPend = (zPend - 2) / 2;
-            };
-            zPend = 0;
-         }
-         {
-            register UChar  rtmp;
-            register UChar* ryy_j;
-            register UChar  rll_i;
-            rtmp  = yy[1];
-            yy[1] = yy[0];
-            ryy_j = &(yy[1]);
-            rll_i = ll_i;
-            while ( rll_i != rtmp ) {
-               register UChar rtmp2;
-               ryy_j++;
-               rtmp2  = rtmp;
-               rtmp   = *ryy_j;
-               *ryy_j = rtmp2;
-            };
-            yy[0] = rtmp;
-            j = ryy_j - &(yy[0]);
-            mtfv[wr] = j+1; wr++; s->mtfFreq[j+1]++;
-         }
-
-      }
-   }
-
-   if (zPend > 0) {
-      zPend--;
-      while (True) {
-         if (zPend & 1) {
-            mtfv[wr] = BZ_RUNB; wr++; 
-            s->mtfFreq[BZ_RUNB]++; 
-         } else {
-            mtfv[wr] = BZ_RUNA; wr++; 
-            s->mtfFreq[BZ_RUNA]++; 
-         }
-         if (zPend < 2) break;
-         zPend = (zPend - 2) / 2;
-      };
-      zPend = 0;
-   }
-
-   mtfv[wr] = EOB; wr++; s->mtfFreq[EOB]++;
-
-   s->nMTF = wr;
-}
-
-
-/*---------------------------------------------------*/
-#define BZ_LESSER_ICOST  0
-#define BZ_GREATER_ICOST 15
-
-static
-void sendMTFValues ( EState* s )
-{
-   Int32 v, t, i, j, gs, ge, totc, bt, bc, iter;
-   Int32 nSelectors, alphaSize, minLen, maxLen, selCtr;
-   Int32 nGroups, nBytes;
-
-   /*--
-   UChar  len [BZ_N_GROUPS][BZ_MAX_ALPHA_SIZE];
-   is a global since the decoder also needs it.
-
-   Int32  code[BZ_N_GROUPS][BZ_MAX_ALPHA_SIZE];
-   Int32  rfreq[BZ_N_GROUPS][BZ_MAX_ALPHA_SIZE];
-   are also globals only used in this proc.
-   Made global to keep stack frame size small.
-   --*/
-
-
-   UInt16 cost[BZ_N_GROUPS];
-   Int32  fave[BZ_N_GROUPS];
-
-   UInt16* mtfv = s->mtfv;
-
-   if (s->verbosity >= 3)
-      VPrintf3( "      %d in block, %d after MTF & 1-2 coding, "
-                "%d+2 syms in use\n", 
-                s->nblock, s->nMTF, s->nInUse );
-
-   alphaSize = s->nInUse+2;
-   for (t = 0; t < BZ_N_GROUPS; t++)
-      for (v = 0; v < alphaSize; v++)
-         s->len[t][v] = BZ_GREATER_ICOST;
-
-   /*--- Decide how many coding tables to use ---*/
-   AssertH ( s->nMTF > 0, 3001 );
-   if (s->nMTF < 200)  nGroups = 2; else
-   if (s->nMTF < 600)  nGroups = 3; else
-   if (s->nMTF < 1200) nGroups = 4; else
-   if (s->nMTF < 2400) nGroups = 5; else
-                       nGroups = 6;
-
-   /*--- Generate an initial set of coding tables ---*/
-   { 
-      Int32 nPart, remF, tFreq, aFreq;
-
-      nPart = nGroups;
-      remF  = s->nMTF;
-      gs = 0;
-      while (nPart > 0) {
-         tFreq = remF / nPart;
-         ge = gs-1;
-         aFreq = 0;
-         while (aFreq < tFreq && ge < alphaSize-1) {
-            ge++;
-            aFreq += s->mtfFreq[ge];
-         }
-
-         if (ge > gs 
-             && nPart != nGroups && nPart != 1 
-             && ((nGroups-nPart) % 2 == 1)) {
-            aFreq -= s->mtfFreq[ge];
-            ge--;
-         }
-
-         if (s->verbosity >= 3)
-            VPrintf5( "      initial group %d, [%d .. %d], "
-                      "has %d syms (%4.1f%%)\n",
-                      nPart, gs, ge, aFreq, 
-                      (100.0 * (float)aFreq) / (float)(s->nMTF) );
- 
-         for (v = 0; v < alphaSize; v++)
-            if (v >= gs && v <= ge) 
-               s->len[nPart-1][v] = BZ_LESSER_ICOST; else
-               s->len[nPart-1][v] = BZ_GREATER_ICOST;
- 
-         nPart--;
-         gs = ge+1;
-         remF -= aFreq;
-      }
-   }
-
-   /*--- 
-      Iterate up to BZ_N_ITERS times to improve the tables.
-   ---*/
-   for (iter = 0; iter < BZ_N_ITERS; iter++) {
-
-      for (t = 0; t < nGroups; t++) fave[t] = 0;
-
-      for (t = 0; t < nGroups; t++)
-         for (v = 0; v < alphaSize; v++)
-            s->rfreq[t][v] = 0;
-
-      /*---
-        Set up an auxiliary length table which is used to fast-track
-	the common case (nGroups == 6). 
-      ---*/
-      if (nGroups == 6) {
-         for (v = 0; v < alphaSize; v++) {
-            s->len_pack[v][0] = (s->len[1][v] << 16) | s->len[0][v];
-            s->len_pack[v][1] = (s->len[3][v] << 16) | s->len[2][v];
-            s->len_pack[v][2] = (s->len[5][v] << 16) | s->len[4][v];
-	 }
-      }
-
-      nSelectors = 0;
-      totc = 0;
-      gs = 0;
-      while (True) {
-
-         /*--- Set group start & end marks. --*/
-         if (gs >= s->nMTF) break;
-         ge = gs + BZ_G_SIZE - 1; 
-         if (ge >= s->nMTF) ge = s->nMTF-1;
-
-         /*-- 
-            Calculate the cost of this group as coded
-            by each of the coding tables.
-         --*/
-         for (t = 0; t < nGroups; t++) cost[t] = 0;
-
-         if (nGroups == 6 && 50 == ge-gs+1) {
-            /*--- fast track the common case ---*/
-            register UInt32 cost01, cost23, cost45;
-            register UInt16 icv;
-            cost01 = cost23 = cost45 = 0;
-
-#           define BZ_ITER(nn)                \
-               icv = mtfv[gs+(nn)];           \
-               cost01 += s->len_pack[icv][0]; \
-               cost23 += s->len_pack[icv][1]; \
-               cost45 += s->len_pack[icv][2]; \
-
-            BZ_ITER(0);  BZ_ITER(1);  BZ_ITER(2);  BZ_ITER(3);  BZ_ITER(4);
-            BZ_ITER(5);  BZ_ITER(6);  BZ_ITER(7);  BZ_ITER(8);  BZ_ITER(9);
-            BZ_ITER(10); BZ_ITER(11); BZ_ITER(12); BZ_ITER(13); BZ_ITER(14);
-            BZ_ITER(15); BZ_ITER(16); BZ_ITER(17); BZ_ITER(18); BZ_ITER(19);
-            BZ_ITER(20); BZ_ITER(21); BZ_ITER(22); BZ_ITER(23); BZ_ITER(24);
-            BZ_ITER(25); BZ_ITER(26); BZ_ITER(27); BZ_ITER(28); BZ_ITER(29);
-            BZ_ITER(30); BZ_ITER(31); BZ_ITER(32); BZ_ITER(33); BZ_ITER(34);
-            BZ_ITER(35); BZ_ITER(36); BZ_ITER(37); BZ_ITER(38); BZ_ITER(39);
-            BZ_ITER(40); BZ_ITER(41); BZ_ITER(42); BZ_ITER(43); BZ_ITER(44);
-            BZ_ITER(45); BZ_ITER(46); BZ_ITER(47); BZ_ITER(48); BZ_ITER(49);
-
-#           undef BZ_ITER
-
-            cost[0] = cost01 & 0xffff; cost[1] = cost01 >> 16;
-            cost[2] = cost23 & 0xffff; cost[3] = cost23 >> 16;
-            cost[4] = cost45 & 0xffff; cost[5] = cost45 >> 16;
-
-         } else {
-	    /*--- slow version which correctly handles all situations ---*/
-            for (i = gs; i <= ge; i++) { 
-               UInt16 icv = mtfv[i];
-               for (t = 0; t < nGroups; t++) cost[t] += s->len[t][icv];
-            }
-         }
- 
-         /*-- 
-            Find the coding table which is best for this group,
-            and record its identity in the selector table.
-         --*/
-         bc = 999999999; bt = -1;
-         for (t = 0; t < nGroups; t++)
-            if (cost[t] < bc) { bc = cost[t]; bt = t; };
-         totc += bc;
-         fave[bt]++;
-         s->selector[nSelectors] = bt;
-         nSelectors++;
-
-         /*-- 
-            Increment the symbol frequencies for the selected table.
-          --*/
-         if (nGroups == 6 && 50 == ge-gs+1) {
-            /*--- fast track the common case ---*/
-
-#           define BZ_ITUR(nn) s->rfreq[bt][ mtfv[gs+(nn)] ]++
-
-            BZ_ITUR(0);  BZ_ITUR(1);  BZ_ITUR(2);  BZ_ITUR(3);  BZ_ITUR(4);
-            BZ_ITUR(5);  BZ_ITUR(6);  BZ_ITUR(7);  BZ_ITUR(8);  BZ_ITUR(9);
-            BZ_ITUR(10); BZ_ITUR(11); BZ_ITUR(12); BZ_ITUR(13); BZ_ITUR(14);
-            BZ_ITUR(15); BZ_ITUR(16); BZ_ITUR(17); BZ_ITUR(18); BZ_ITUR(19);
-            BZ_ITUR(20); BZ_ITUR(21); BZ_ITUR(22); BZ_ITUR(23); BZ_ITUR(24);
-            BZ_ITUR(25); BZ_ITUR(26); BZ_ITUR(27); BZ_ITUR(28); BZ_ITUR(29);
-            BZ_ITUR(30); BZ_ITUR(31); BZ_ITUR(32); BZ_ITUR(33); BZ_ITUR(34);
-            BZ_ITUR(35); BZ_ITUR(36); BZ_ITUR(37); BZ_ITUR(38); BZ_ITUR(39);
-            BZ_ITUR(40); BZ_ITUR(41); BZ_ITUR(42); BZ_ITUR(43); BZ_ITUR(44);
-            BZ_ITUR(45); BZ_ITUR(46); BZ_ITUR(47); BZ_ITUR(48); BZ_ITUR(49);
-
-#           undef BZ_ITUR
-
-         } else {
-	    /*--- slow version which correctly handles all situations ---*/
-            for (i = gs; i <= ge; i++)
-               s->rfreq[bt][ mtfv[i] ]++;
-         }
-
-         gs = ge+1;
-      }
-      if (s->verbosity >= 3) {
-         VPrintf2 ( "      pass %d: size is %d, grp uses are ", 
-                   iter+1, totc/8 );
-         for (t = 0; t < nGroups; t++)
-            VPrintf1 ( "%d ", fave[t] );
-         VPrintf0 ( "\n" );
-      }
-
-      /*--
-        Recompute the tables based on the accumulated frequencies.
-      --*/
-      /* maxLen was changed from 20 to 17 in bzip2-1.0.3.  See 
-         comment in huffman.c for details. */
-      for (t = 0; t < nGroups; t++)
-         BZ2_hbMakeCodeLengths ( &(s->len[t][0]), &(s->rfreq[t][0]), 
-                                 alphaSize, 17 /*20*/ );
-   }
-
-
-   AssertH( nGroups < 8, 3002 );
-   AssertH( nSelectors < 32768 &&
-            nSelectors <= (2 + (900000 / BZ_G_SIZE)),
-            3003 );
-
-
-   /*--- Compute MTF values for the selectors. ---*/
-   {
-      UChar pos[BZ_N_GROUPS], ll_i, tmp2, tmp;
-      for (i = 0; i < nGroups; i++) pos[i] = i;
-      for (i = 0; i < nSelectors; i++) {
-         ll_i = s->selector[i];
-         j = 0;
-         tmp = pos[j];
-         while ( ll_i != tmp ) {
-            j++;
-            tmp2 = tmp;
-            tmp = pos[j];
-            pos[j] = tmp2;
-         };
-         pos[0] = tmp;
-         s->selectorMtf[i] = j;
-      }
-   };
-
-   /*--- Assign actual codes for the tables. --*/
-   for (t = 0; t < nGroups; t++) {
-      minLen = 32;
-      maxLen = 0;
-      for (i = 0; i < alphaSize; i++) {
-         if (s->len[t][i] > maxLen) maxLen = s->len[t][i];
-         if (s->len[t][i] < minLen) minLen = s->len[t][i];
-      }
-      AssertH ( !(maxLen > 17 /*20*/ ), 3004 );
-      AssertH ( !(minLen < 1),  3005 );
-      BZ2_hbAssignCodes ( &(s->code[t][0]), &(s->len[t][0]), 
-                          minLen, maxLen, alphaSize );
-   }
-
-   /*--- Transmit the mapping table. ---*/
-   { 
-      Bool inUse16[16];
-      for (i = 0; i < 16; i++) {
-          inUse16[i] = False;
-          for (j = 0; j < 16; j++)
-             if (s->inUse[i * 16 + j]) inUse16[i] = True;
-      }
-     
-      nBytes = s->numZ;
-      for (i = 0; i < 16; i++)
-         if (inUse16[i]) bsW(s,1,1); else bsW(s,1,0);
-
-      for (i = 0; i < 16; i++)
-         if (inUse16[i])
-            for (j = 0; j < 16; j++) {
-               if (s->inUse[i * 16 + j]) bsW(s,1,1); else bsW(s,1,0);
-            }
-
-      if (s->verbosity >= 3) 
-         VPrintf1( "      bytes: mapping %d, ", s->numZ-nBytes );
-   }
-
-   /*--- Now the selectors. ---*/
-   nBytes = s->numZ;
-   bsW ( s, 3, nGroups );
-   bsW ( s, 15, nSelectors );
-   for (i = 0; i < nSelectors; i++) { 
-      for (j = 0; j < s->selectorMtf[i]; j++) bsW(s,1,1);
-      bsW(s,1,0);
-   }
-   if (s->verbosity >= 3)
-      VPrintf1( "selectors %d, ", s->numZ-nBytes );
-
-   /*--- Now the coding tables. ---*/
-   nBytes = s->numZ;
-
-   for (t = 0; t < nGroups; t++) {
-      Int32 curr = s->len[t][0];
-      bsW ( s, 5, curr );
-      for (i = 0; i < alphaSize; i++) {
-         while (curr < s->len[t][i]) { bsW(s,2,2); curr++; /* 10 */ };
-         while (curr > s->len[t][i]) { bsW(s,2,3); curr--; /* 11 */ };
-         bsW ( s, 1, 0 );
-      }
-   }
-
-   if (s->verbosity >= 3)
-      VPrintf1 ( "code lengths %d, ", s->numZ-nBytes );
-
-   /*--- And finally, the block data proper ---*/
-   nBytes = s->numZ;
-   selCtr = 0;
-   gs = 0;
-   while (True) {
-      if (gs >= s->nMTF) break;
-      ge = gs + BZ_G_SIZE - 1; 
-      if (ge >= s->nMTF) ge = s->nMTF-1;
-      AssertH ( s->selector[selCtr] < nGroups, 3006 );
-
-      if (nGroups == 6 && 50 == ge-gs+1) {
-            /*--- fast track the common case ---*/
-            UInt16 mtfv_i;
-            UChar* s_len_sel_selCtr 
-               = &(s->len[s->selector[selCtr]][0]);
-            Int32* s_code_sel_selCtr
-               = &(s->code[s->selector[selCtr]][0]);
-
-#           define BZ_ITAH(nn)                      \
-               mtfv_i = mtfv[gs+(nn)];              \
-               bsW ( s,                             \
-                     s_len_sel_selCtr[mtfv_i],      \
-                     s_code_sel_selCtr[mtfv_i] )
-
-            BZ_ITAH(0);  BZ_ITAH(1);  BZ_ITAH(2);  BZ_ITAH(3);  BZ_ITAH(4);
-            BZ_ITAH(5);  BZ_ITAH(6);  BZ_ITAH(7);  BZ_ITAH(8);  BZ_ITAH(9);
-            BZ_ITAH(10); BZ_ITAH(11); BZ_ITAH(12); BZ_ITAH(13); BZ_ITAH(14);
-            BZ_ITAH(15); BZ_ITAH(16); BZ_ITAH(17); BZ_ITAH(18); BZ_ITAH(19);
-            BZ_ITAH(20); BZ_ITAH(21); BZ_ITAH(22); BZ_ITAH(23); BZ_ITAH(24);
-            BZ_ITAH(25); BZ_ITAH(26); BZ_ITAH(27); BZ_ITAH(28); BZ_ITAH(29);
-            BZ_ITAH(30); BZ_ITAH(31); BZ_ITAH(32); BZ_ITAH(33); BZ_ITAH(34);
-            BZ_ITAH(35); BZ_ITAH(36); BZ_ITAH(37); BZ_ITAH(38); BZ_ITAH(39);
-            BZ_ITAH(40); BZ_ITAH(41); BZ_ITAH(42); BZ_ITAH(43); BZ_ITAH(44);
-            BZ_ITAH(45); BZ_ITAH(46); BZ_ITAH(47); BZ_ITAH(48); BZ_ITAH(49);
-
-#           undef BZ_ITAH
-
-      } else {
-	 /*--- slow version which correctly handles all situations ---*/
-         for (i = gs; i <= ge; i++) {
-            bsW ( s, 
-                  s->len  [s->selector[selCtr]] [mtfv[i]],
-                  s->code [s->selector[selCtr]] [mtfv[i]] );
-         }
-      }
-
-
-      gs = ge+1;
-      selCtr++;
-   }
-   AssertH( selCtr == nSelectors, 3007 );
-
-   if (s->verbosity >= 3)
-      VPrintf1( "codes %d\n", s->numZ-nBytes );
-}
-
-
-/*---------------------------------------------------*/
-void BZ2_compressBlock ( EState* s, Bool is_last_block )
-{
-   if (s->nblock > 0) {
-
-      BZ_FINALISE_CRC ( s->blockCRC );
-      s->combinedCRC = (s->combinedCRC << 1) | (s->combinedCRC >> 31);
-      s->combinedCRC ^= s->blockCRC;
-      if (s->blockNo > 1) s->numZ = 0;
-
-      if (s->verbosity >= 2)
-         VPrintf4( "    block %d: crc = 0x%08x, "
-                   "combined CRC = 0x%08x, size = %d\n",
-                   s->blockNo, s->blockCRC, s->combinedCRC, s->nblock );
-
-      BZ2_blockSort ( s );
-   }
-
-   s->zbits = (UChar*) (&((UChar*)s->arr2)[s->nblock]);
-
-   /*-- If this is the first block, create the stream header. --*/
-   if (s->blockNo == 1) {
-      BZ2_bsInitWrite ( s );
-      bsPutUChar ( s, BZ_HDR_B );
-      bsPutUChar ( s, BZ_HDR_Z );
-      bsPutUChar ( s, BZ_HDR_h );
-      bsPutUChar ( s, (UChar)(BZ_HDR_0 + s->blockSize100k) );
-   }
-
-   if (s->nblock > 0) {
-
-      bsPutUChar ( s, 0x31 ); bsPutUChar ( s, 0x41 );
-      bsPutUChar ( s, 0x59 ); bsPutUChar ( s, 0x26 );
-      bsPutUChar ( s, 0x53 ); bsPutUChar ( s, 0x59 );
-
-      /*-- Now the block's CRC, so it is in a known place. --*/
-      bsPutUInt32 ( s, s->blockCRC );
-
-      /*-- 
-         Now a single bit indicating (non-)randomisation. 
-         As of version 0.9.5, we use a better sorting algorithm
-         which makes randomisation unnecessary.  So always set
-         the randomised bit to 'no'.  Of course, the decoder
-         still needs to be able to handle randomised blocks
-         so as to maintain backwards compatibility with
-         older versions of bzip2.
-      --*/
-      bsW(s,1,0);
-
-      bsW ( s, 24, s->origPtr );
-      generateMTFValues ( s );
-      sendMTFValues ( s );
-   }
-
-
-   /*-- If this is the last block, add the stream trailer. --*/
-   if (is_last_block) {
-
-      bsPutUChar ( s, 0x17 ); bsPutUChar ( s, 0x72 );
-      bsPutUChar ( s, 0x45 ); bsPutUChar ( s, 0x38 );
-      bsPutUChar ( s, 0x50 ); bsPutUChar ( s, 0x90 );
-      bsPutUInt32 ( s, s->combinedCRC );
-      if (s->verbosity >= 2)
-         VPrintf1( "    final combined CRC = 0x%08x\n   ", s->combinedCRC );
-      bsFinishWrite ( s );
-   }
-}
-
-
-/*-------------------------------------------------------------*/
-/*--- end                                        compress.c ---*/
-/*-------------------------------------------------------------*/
diff --git a/src/extra/bzip2/bzlib.c b/src/extra/bzip2/bzlib.c
deleted file mode 100644
index a44bb13..0000000
--- a/src/extra/bzip2/bzlib.c
+++ /dev/null
@@ -1,1585 +0,0 @@
-
-/*-------------------------------------------------------------*/
-/*--- Library top-level functions.                          ---*/
-/*---                                               bzlib.c ---*/
-/*-------------------------------------------------------------*/
-
-/* ------------------------------------------------------------------
-   This file is part of bzip2/libbzip2, a program and library for
-   lossless, block-sorting data compression.
-
-   bzip2/libbzip2 version 1.0.6 of 6 September 2010
-   Copyright (C) 1996-2010 Julian Seward <jseward at bzip.org>
-
-   Please read the WARNING, DISCLAIMER and PATENTS sections in the 
-   README file.
-
-   This program is released under the terms of the license contained
-   in the file LICENSE.
-   ------------------------------------------------------------------ */
-
-/* CHANGES
-   0.9.0    -- original version.
-   0.9.0a/b -- no changes in this file.
-   0.9.0c   -- made zero-length BZ_FLUSH work correctly in bzCompress().
-     fixed bzWrite/bzRead to ignore zero-length requests.
-     fixed bzread to correctly handle read requests after EOF.
-     wrong parameter order in call to bzDecompressInit in
-     bzBuffToBuffDecompress.  Fixed.
-*/
-
-#include "bzlib_private.h"
-
-
-/*---------------------------------------------------*/
-/*--- Compression stuff                           ---*/
-/*---------------------------------------------------*/
-
-
-/*---------------------------------------------------*/
-#ifndef BZ_NO_STDIO
-void BZ2_bz__AssertH__fail ( int errcode )
-{
-   fprintf(stderr, 
-      "\n\nbzip2/libbzip2: internal error number %d.\n"
-      "This is a bug in bzip2/libbzip2, %s.\n"
-      "Please report it to me at: jseward at bzip.org.  If this happened\n"
-      "when you were using some program which uses libbzip2 as a\n"
-      "component, you should also report this bug to the author(s)\n"
-      "of that program.  Please make an effort to report this bug;\n"
-      "timely and accurate bug reports eventually lead to higher\n"
-      "quality software.  Thanks.  Julian Seward, 10 December 2007.\n\n",
-      errcode,
-      BZ2_bzlibVersion()
-   );
-
-   /* split up over-long message */
-   if (errcode == 1007) {
-       fprintf(stderr, "%s%s%s",
-      "\n*** A special note about internal error number 1007 ***\n"
-      "\n"
-      "Experience suggests that a common cause of i.e. 1007\n"
-      "is unreliable memory or other hardware.  The 1007 assertion\n"
-      "just happens to cross-check the results of huge numbers of\n"
-      "memory reads/writes, and so acts (unintendedly) as a stress\n"
-      "test of your memory system.\n"
-       "\n",
-      "I suggest the following: try compressing the file again,\n"
-      "possibly monitoring progress in detail with the -vv flag.\n"
-      "\n"
-      "* If the error cannot be reproduced, and/or happens at different\n"
-      "  points in compression, you may have a flaky memory system.\n"
-      "  Try a memory-test program.  I have used Memtest86\n"
-      "  (www.memtest86.com).  At the time of writing it is free (GPLd).\n"
-      "  Memtest86 tests memory much more thorougly than your BIOSs\n"
-      "  power-on test, and may find failures that the BIOS doesn't.\n"
-      "\n",
-      "* If the error can be repeatably reproduced, this is a bug in\n"
-      "  bzip2, and I would very much like to hear about it.  Please\n"
-      "  let me know, and, ideally, save a copy of the file causing the\n"
-      "  problem -- without which I will be unable to investigate it.\n"
-      "\n"
-   );
-   }
-
-   exit(3);
-}
-#endif
-
-
-/*---------------------------------------------------*/
-static
-int bz_config_ok ( void )
-{
-   if (sizeof(int)   != 4) return 0;
-   if (sizeof(short) != 2) return 0;
-   if (sizeof(char)  != 1) return 0;
-   return 1;
-}
-
-
-/*---------------------------------------------------*/
-static
-void* default_bzalloc ( void* opaque, Int32 items, Int32 size )
-{
-   void* v = malloc ( items * size );
-   return v;
-}
-
-static
-void default_bzfree ( void* opaque, void* addr )
-{
-   if (addr != NULL) free ( addr );
-}
-
-
-/*---------------------------------------------------*/
-static
-void prepare_new_block ( EState* s )
-{
-   Int32 i;
-   s->nblock = 0;
-   s->numZ = 0;
-   s->state_out_pos = 0;
-   BZ_INITIALISE_CRC ( s->blockCRC );
-   for (i = 0; i < 256; i++) s->inUse[i] = False;
-   s->blockNo++;
-}
-
-
-/*---------------------------------------------------*/
-static
-void init_RL ( EState* s )
-{
-   s->state_in_ch  = 256;
-   s->state_in_len = 0;
-}
-
-
-static
-Bool isempty_RL ( EState* s )
-{
-   if (s->state_in_ch < 256 && s->state_in_len > 0)
-      return False; else
-      return True;
-}
-
-
-/*---------------------------------------------------*/
-int BZ_API(BZ2_bzCompressInit) 
-                    ( bz_stream* strm, 
-                     int        blockSize100k,
-                     int        verbosity,
-                     int        workFactor )
-{
-   Int32   n;
-   EState* s;
-
-   if (!bz_config_ok()) return BZ_CONFIG_ERROR;
-
-   if (strm == NULL || 
-       blockSize100k < 1 || blockSize100k > 9 ||
-       workFactor < 0 || workFactor > 250)
-     return BZ_PARAM_ERROR;
-
-   if (workFactor == 0) workFactor = 30;
-   if (strm->bzalloc == NULL) strm->bzalloc = default_bzalloc;
-   if (strm->bzfree == NULL) strm->bzfree = default_bzfree;
-
-   s = (EState *) BZALLOC( sizeof(EState) );
-   if (s == NULL) return BZ_MEM_ERROR;
-   s->strm = strm;
-
-   s->arr1 = NULL;
-   s->arr2 = NULL;
-   s->ftab = NULL;
-
-   n       = 100000 * blockSize100k;
-   s->arr1 = (UInt32 *) BZALLOC( n                  * sizeof(UInt32) );
-   s->arr2 = (UInt32 *) BZALLOC( (n+BZ_N_OVERSHOOT) * sizeof(UInt32) );
-   s->ftab = (UInt32 *) BZALLOC( 65537              * sizeof(UInt32) );
-
-   if (s->arr1 == NULL || s->arr2 == NULL || s->ftab == NULL) {
-      if (s->arr1 != NULL) BZFREE(s->arr1);
-      if (s->arr2 != NULL) BZFREE(s->arr2);
-      if (s->ftab != NULL) BZFREE(s->ftab);
-      if (s       != NULL) BZFREE(s);
-      return BZ_MEM_ERROR;
-   }
-
-   s->blockNo           = 0;
-   s->state             = BZ_S_INPUT;
-   s->mode              = BZ_M_RUNNING;
-   s->combinedCRC       = 0;
-   s->blockSize100k     = blockSize100k;
-   s->nblockMAX         = 100000 * blockSize100k - 19;
-   s->verbosity         = verbosity;
-   s->workFactor        = workFactor;
-
-   s->block             = (UChar*)s->arr2;
-   s->mtfv              = (UInt16*)s->arr1;
-   s->zbits             = NULL;
-   s->ptr               = (UInt32*)s->arr1;
-
-   strm->state          = s;
-   strm->total_in_lo32  = 0;
-   strm->total_in_hi32  = 0;
-   strm->total_out_lo32 = 0;
-   strm->total_out_hi32 = 0;
-   init_RL ( s );
-   prepare_new_block ( s );
-   return BZ_OK;
-}
-
-
-/*---------------------------------------------------*/
-static
-void add_pair_to_block ( EState* s )
-{
-   Int32 i;
-   UChar ch = (UChar)(s->state_in_ch);
-   for (i = 0; i < s->state_in_len; i++) {
-      BZ_UPDATE_CRC( s->blockCRC, ch );
-   }
-   s->inUse[s->state_in_ch] = True;
-   switch (s->state_in_len) {
-      case 1:
-         s->block[s->nblock] = (UChar)ch; s->nblock++;
-         break;
-      case 2:
-         s->block[s->nblock] = (UChar)ch; s->nblock++;
-         s->block[s->nblock] = (UChar)ch; s->nblock++;
-         break;
-      case 3:
-         s->block[s->nblock] = (UChar)ch; s->nblock++;
-         s->block[s->nblock] = (UChar)ch; s->nblock++;
-         s->block[s->nblock] = (UChar)ch; s->nblock++;
-         break;
-      default:
-         s->inUse[s->state_in_len-4] = True;
-         s->block[s->nblock] = (UChar)ch; s->nblock++;
-         s->block[s->nblock] = (UChar)ch; s->nblock++;
-         s->block[s->nblock] = (UChar)ch; s->nblock++;
-         s->block[s->nblock] = (UChar)ch; s->nblock++;
-         s->block[s->nblock] = ((UChar)(s->state_in_len-4));
-         s->nblock++;
-         break;
-   }
-}
-
-
-/*---------------------------------------------------*/
-static
-void flush_RL ( EState* s )
-{
-   if (s->state_in_ch < 256) add_pair_to_block ( s );
-   init_RL ( s );
-}
-
-
-/*---------------------------------------------------*/
-#define ADD_CHAR_TO_BLOCK(zs,zchh0)               \
-{                                                 \
-   UInt32 zchh = (UInt32)(zchh0);                 \
-   /*-- fast track the common case --*/           \
-   if (zchh != zs->state_in_ch &&                 \
-       zs->state_in_len == 1) {                   \
-      UChar ch = (UChar)(zs->state_in_ch);        \
-      BZ_UPDATE_CRC( zs->blockCRC, ch );          \
-      zs->inUse[zs->state_in_ch] = True;          \
-      zs->block[zs->nblock] = (UChar)ch;          \
-      zs->nblock++;                               \
-      zs->state_in_ch = zchh;                     \
-   }                                              \
-   else                                           \
-   /*-- general, uncommon cases --*/              \
-   if (zchh != zs->state_in_ch ||                 \
-      zs->state_in_len == 255) {                  \
-      if (zs->state_in_ch < 256)                  \
-         add_pair_to_block ( zs );                \
-      zs->state_in_ch = zchh;                     \
-      zs->state_in_len = 1;                       \
-   } else {                                       \
-      zs->state_in_len++;                         \
-   }                                              \
-}
-
-
-/*---------------------------------------------------*/
-static
-Bool copy_input_until_stop ( EState* s )
-{
-   Bool progress_in = False;
-
-   if (s->mode == BZ_M_RUNNING) {
-
-      /*-- fast track the common case --*/
-      while (True) {
-         /*-- block full? --*/
-         if (s->nblock >= s->nblockMAX) break;
-         /*-- no input? --*/
-         if (s->strm->avail_in == 0) break;
-         progress_in = True;
-         ADD_CHAR_TO_BLOCK ( s, (UInt32)(*((UChar*)(s->strm->next_in))) ); 
-         s->strm->next_in++;
-         s->strm->avail_in--;
-         s->strm->total_in_lo32++;
-         if (s->strm->total_in_lo32 == 0) s->strm->total_in_hi32++;
-      }
-
-   } else {
-
-      /*-- general, uncommon case --*/
-      while (True) {
-         /*-- block full? --*/
-         if (s->nblock >= s->nblockMAX) break;
-         /*-- no input? --*/
-         if (s->strm->avail_in == 0) break;
-         /*-- flush/finish end? --*/
-         if (s->avail_in_expect == 0) break;
-         progress_in = True;
-         ADD_CHAR_TO_BLOCK ( s, (UInt32)(*((UChar*)(s->strm->next_in))) ); 
-         s->strm->next_in++;
-         s->strm->avail_in--;
-         s->strm->total_in_lo32++;
-         if (s->strm->total_in_lo32 == 0) s->strm->total_in_hi32++;
-         s->avail_in_expect--;
-      }
-   }
-   return progress_in;
-}
-
-
-/*---------------------------------------------------*/
-static
-Bool copy_output_until_stop ( EState* s )
-{
-   Bool progress_out = False;
-
-   while (True) {
-
-      /*-- no output space? --*/
-      if (s->strm->avail_out == 0) break;
-
-      /*-- block done? --*/
-      if (s->state_out_pos >= s->numZ) break;
-
-      progress_out = True;
-      *(s->strm->next_out) = s->zbits[s->state_out_pos];
-      s->state_out_pos++;
-      s->strm->avail_out--;
-      s->strm->next_out++;
-      s->strm->total_out_lo32++;
-      if (s->strm->total_out_lo32 == 0) s->strm->total_out_hi32++;
-   }
-
-   return progress_out;
-}
-
-
-/*---------------------------------------------------*/
-static
-Bool handle_compress ( bz_stream* strm )
-{
-   Bool progress_in  = False;
-   Bool progress_out = False;
-   EState* s = (EState *) strm->state;
-   
-   while (True) {
-
-      if (s->state == BZ_S_OUTPUT) {
-         progress_out |= copy_output_until_stop ( s );
-         if (s->state_out_pos < s->numZ) break;
-         if (s->mode == BZ_M_FINISHING && 
-             s->avail_in_expect == 0 &&
-             isempty_RL(s)) break;
-         prepare_new_block ( s );
-         s->state = BZ_S_INPUT;
-         if (s->mode == BZ_M_FLUSHING && 
-             s->avail_in_expect == 0 &&
-             isempty_RL(s)) break;
-      }
-
-      if (s->state == BZ_S_INPUT) {
-         progress_in |= copy_input_until_stop ( s );
-         if (s->mode != BZ_M_RUNNING && s->avail_in_expect == 0) {
-            flush_RL ( s );
-            BZ2_compressBlock ( s, (Bool)(s->mode == BZ_M_FINISHING) );
-            s->state = BZ_S_OUTPUT;
-         }
-         else
-         if (s->nblock >= s->nblockMAX) {
-            BZ2_compressBlock ( s, False );
-            s->state = BZ_S_OUTPUT;
-         }
-         else
-         if (s->strm->avail_in == 0) {
-            break;
-         }
-      }
-
-   }
-
-   return progress_in || progress_out;
-}
-
-
-/*---------------------------------------------------*/
-int BZ_API(BZ2_bzCompress) ( bz_stream *strm, int action )
-{
-   Bool progress;
-   EState* s;
-   if (strm == NULL) return BZ_PARAM_ERROR;
-   s = (EState *) strm->state;
-   if (s == NULL) return BZ_PARAM_ERROR;
-   if (s->strm != strm) return BZ_PARAM_ERROR;
-
-   preswitch:
-   switch (s->mode) {
-
-      case BZ_M_IDLE:
-         return BZ_SEQUENCE_ERROR;
-
-      case BZ_M_RUNNING:
-         if (action == BZ_RUN) {
-            progress = handle_compress ( strm );
-            return progress ? BZ_RUN_OK : BZ_PARAM_ERROR;
-         } 
-         else
-	 if (action == BZ_FLUSH) {
-            s->avail_in_expect = strm->avail_in;
-            s->mode = BZ_M_FLUSHING;
-            goto preswitch;
-         }
-         else
-         if (action == BZ_FINISH) {
-            s->avail_in_expect = strm->avail_in;
-            s->mode = BZ_M_FINISHING;
-            goto preswitch;
-         }
-         else 
-            return BZ_PARAM_ERROR;
-
-      case BZ_M_FLUSHING:
-         if (action != BZ_FLUSH) return BZ_SEQUENCE_ERROR;
-         if (s->avail_in_expect != s->strm->avail_in) 
-            return BZ_SEQUENCE_ERROR;
-         progress = handle_compress ( strm );
-         if (s->avail_in_expect > 0 || !isempty_RL(s) ||
-             s->state_out_pos < s->numZ) return BZ_FLUSH_OK;
-         s->mode = BZ_M_RUNNING;
-         return BZ_RUN_OK;
-
-      case BZ_M_FINISHING:
-         if (action != BZ_FINISH) return BZ_SEQUENCE_ERROR;
-         if (s->avail_in_expect != s->strm->avail_in) 
-            return BZ_SEQUENCE_ERROR;
-         progress = handle_compress ( strm );
-         if (!progress) return BZ_SEQUENCE_ERROR;
-         if (s->avail_in_expect > 0 || !isempty_RL(s) ||
-             s->state_out_pos < s->numZ) return BZ_FINISH_OK;
-         s->mode = BZ_M_IDLE;
-         return BZ_STREAM_END;
-   }
-   return BZ_OK; /*--not reached--*/
-}
-
-
-/*---------------------------------------------------*/
-int BZ_API(BZ2_bzCompressEnd)  ( bz_stream *strm )
-{
-   EState* s;
-   if (strm == NULL) return BZ_PARAM_ERROR;
-   s = (EState *) strm->state;
-   if (s == NULL) return BZ_PARAM_ERROR;
-   if (s->strm != strm) return BZ_PARAM_ERROR;
-
-   if (s->arr1 != NULL) BZFREE(s->arr1);
-   if (s->arr2 != NULL) BZFREE(s->arr2);
-   if (s->ftab != NULL) BZFREE(s->ftab);
-   BZFREE(strm->state);
-
-   strm->state = NULL;   
-
-   return BZ_OK;
-}
-
-
-/*---------------------------------------------------*/
-/*--- Decompression stuff                         ---*/
-/*---------------------------------------------------*/
-
-/*---------------------------------------------------*/
-int BZ_API(BZ2_bzDecompressInit) 
-                     ( bz_stream* strm, 
-                       int        verbosity,
-                       int        small )
-{
-   DState* s;
-
-   if (!bz_config_ok()) return BZ_CONFIG_ERROR;
-
-   if (strm == NULL) return BZ_PARAM_ERROR;
-   if (small != 0 && small != 1) return BZ_PARAM_ERROR;
-   if (verbosity < 0 || verbosity > 4) return BZ_PARAM_ERROR;
-
-   if (strm->bzalloc == NULL) strm->bzalloc = default_bzalloc;
-   if (strm->bzfree == NULL) strm->bzfree = default_bzfree;
-
-   s = (DState *) BZALLOC( sizeof(DState) );
-   if (s == NULL) return BZ_MEM_ERROR;
-   s->strm                  = strm;
-   strm->state              = s;
-   s->state                 = BZ_X_MAGIC_1;
-   s->bsLive                = 0;
-   s->bsBuff                = 0;
-   s->calculatedCombinedCRC = 0;
-   strm->total_in_lo32      = 0;
-   strm->total_in_hi32      = 0;
-   strm->total_out_lo32     = 0;
-   strm->total_out_hi32     = 0;
-   s->smallDecompress       = (Bool)small;
-   s->ll4                   = NULL;
-   s->ll16                  = NULL;
-   s->tt                    = NULL;
-   s->currBlockNo           = 0;
-   s->verbosity             = verbosity;
-
-   return BZ_OK;
-}
-
-
-/*---------------------------------------------------*/
-/* Return  True iff data corruption is discovered.
-   Returns False if there is no problem.
-*/
-static
-Bool unRLE_obuf_to_output_FAST ( DState* s )
-{
-   UChar k1;
-
-   if (s->blockRandomised) {
-
-      while (True) {
-         /* try to finish existing run */
-         while (True) {
-            if (s->strm->avail_out == 0) return False;
-            if (s->state_out_len == 0) break;
-            *( (UChar*)(s->strm->next_out) ) = s->state_out_ch;
-            BZ_UPDATE_CRC ( s->calculatedBlockCRC, s->state_out_ch );
-            s->state_out_len--;
-            s->strm->next_out++;
-            s->strm->avail_out--;
-            s->strm->total_out_lo32++;
-            if (s->strm->total_out_lo32 == 0) s->strm->total_out_hi32++;
-         }
-
-         /* can a new run be started? */
-         if (s->nblock_used == s->save_nblock+1) return False;
-               
-         /* Only caused by corrupt data stream? */
-         if (s->nblock_used > s->save_nblock+1)
-            return True;
-   
-         s->state_out_len = 1;
-         s->state_out_ch = s->k0;
-         BZ_GET_FAST(k1); BZ_RAND_UPD_MASK; 
-         k1 ^= BZ_RAND_MASK; s->nblock_used++;
-         if (s->nblock_used == s->save_nblock+1) continue;
-         if (k1 != s->k0) { s->k0 = k1; continue; };
-   
-         s->state_out_len = 2;
-         BZ_GET_FAST(k1); BZ_RAND_UPD_MASK; 
-         k1 ^= BZ_RAND_MASK; s->nblock_used++;
-         if (s->nblock_used == s->save_nblock+1) continue;
-         if (k1 != s->k0) { s->k0 = k1; continue; };
-   
-         s->state_out_len = 3;
-         BZ_GET_FAST(k1); BZ_RAND_UPD_MASK; 
-         k1 ^= BZ_RAND_MASK; s->nblock_used++;
-         if (s->nblock_used == s->save_nblock+1) continue;
-         if (k1 != s->k0) { s->k0 = k1; continue; };
-   
-         BZ_GET_FAST(k1); BZ_RAND_UPD_MASK; 
-         k1 ^= BZ_RAND_MASK; s->nblock_used++;
-         s->state_out_len = ((Int32)k1) + 4;
-         BZ_GET_FAST(s->k0); BZ_RAND_UPD_MASK; 
-         s->k0 ^= BZ_RAND_MASK; s->nblock_used++;
-      }
-
-   } else {
-
-      /* restore */
-      UInt32        c_calculatedBlockCRC = s->calculatedBlockCRC;
-      UChar         c_state_out_ch       = s->state_out_ch;
-      Int32         c_state_out_len      = s->state_out_len;
-      Int32         c_nblock_used        = s->nblock_used;
-      Int32         c_k0                 = s->k0;
-      UInt32*       c_tt                 = s->tt;
-      UInt32        c_tPos               = s->tPos;
-      char*         cs_next_out          = s->strm->next_out;
-      unsigned int  cs_avail_out         = s->strm->avail_out;
-      Int32         ro_blockSize100k     = s->blockSize100k;
-      /* end restore */
-
-      UInt32       avail_out_INIT = cs_avail_out;
-      Int32        s_save_nblockPP = s->save_nblock+1;
-      unsigned int total_out_lo32_old;
-
-      while (True) {
-
-         /* try to finish existing run */
-         if (c_state_out_len > 0) {
-            while (True) {
-               if (cs_avail_out == 0) goto return_notr;
-               if (c_state_out_len == 1) break;
-               *( (UChar*)(cs_next_out) ) = c_state_out_ch;
-               BZ_UPDATE_CRC ( c_calculatedBlockCRC, c_state_out_ch );
-               c_state_out_len--;
-               cs_next_out++;
-               cs_avail_out--;
-            }
-            s_state_out_len_eq_one:
-            {
-               if (cs_avail_out == 0) { 
-                  c_state_out_len = 1; goto return_notr;
-               };
-               *( (UChar*)(cs_next_out) ) = c_state_out_ch;
-               BZ_UPDATE_CRC ( c_calculatedBlockCRC, c_state_out_ch );
-               cs_next_out++;
-               cs_avail_out--;
-            }
-         }   
-         /* Only caused by corrupt data stream? */
-         if (c_nblock_used > s_save_nblockPP)
-            return True;
-
-         /* can a new run be started? */
-         if (c_nblock_used == s_save_nblockPP) {
-            c_state_out_len = 0; goto return_notr;
-         };   
-         c_state_out_ch = c_k0;
-         BZ_GET_FAST_C(k1); c_nblock_used++;
-         if (k1 != c_k0) { 
-            c_k0 = k1; goto s_state_out_len_eq_one; 
-         };
-         if (c_nblock_used == s_save_nblockPP) 
-            goto s_state_out_len_eq_one;
-   
-         c_state_out_len = 2;
-         BZ_GET_FAST_C(k1); c_nblock_used++;
-         if (c_nblock_used == s_save_nblockPP) continue;
-         if (k1 != c_k0) { c_k0 = k1; continue; };
-   
-         c_state_out_len = 3;
-         BZ_GET_FAST_C(k1); c_nblock_used++;
-         if (c_nblock_used == s_save_nblockPP) continue;
-         if (k1 != c_k0) { c_k0 = k1; continue; };
-   
-         BZ_GET_FAST_C(k1); c_nblock_used++;
-         c_state_out_len = ((Int32)k1) + 4;
-         BZ_GET_FAST_C(c_k0); c_nblock_used++;
-      }
-
-      return_notr:
-      total_out_lo32_old = s->strm->total_out_lo32;
-      s->strm->total_out_lo32 += (avail_out_INIT - cs_avail_out);
-      if (s->strm->total_out_lo32 < total_out_lo32_old)
-         s->strm->total_out_hi32++;
-
-      /* save */
-      s->calculatedBlockCRC = c_calculatedBlockCRC;
-      s->state_out_ch       = c_state_out_ch;
-      s->state_out_len      = c_state_out_len;
-      s->nblock_used        = c_nblock_used;
-      s->k0                 = c_k0;
-      s->tt                 = c_tt;
-      s->tPos               = c_tPos;
-      s->strm->next_out     = cs_next_out;
-      s->strm->avail_out    = cs_avail_out;
-      /* end save */
-   }
-   return False;
-}
-
-
-
-/*---------------------------------------------------*/
-Int32 BZ2_indexIntoF ( Int32 indx, Int32 *cftab )
-{
-   Int32 nb, na, mid;
-   nb = 0;
-   na = 256;
-   do {
-      mid = (nb + na) >> 1;
-      if (indx >= cftab[mid]) nb = mid; else na = mid;
-   }
-   while (na - nb != 1);
-   return nb;
-}
-
-
-/*---------------------------------------------------*/
-/* Return  True iff data corruption is discovered.
-   Returns False if there is no problem.
-*/
-static
-Bool unRLE_obuf_to_output_SMALL ( DState* s )
-{
-   UChar k1;
-
-   if (s->blockRandomised) {
-
-      while (True) {
-         /* try to finish existing run */
-         while (True) {
-            if (s->strm->avail_out == 0) return False;
-            if (s->state_out_len == 0) break;
-            *( (UChar*)(s->strm->next_out) ) = s->state_out_ch;
-            BZ_UPDATE_CRC ( s->calculatedBlockCRC, s->state_out_ch );
-            s->state_out_len--;
-            s->strm->next_out++;
-            s->strm->avail_out--;
-            s->strm->total_out_lo32++;
-            if (s->strm->total_out_lo32 == 0) s->strm->total_out_hi32++;
-         }
-   
-         /* can a new run be started? */
-         if (s->nblock_used == s->save_nblock+1) return False;
-
-         /* Only caused by corrupt data stream? */
-         if (s->nblock_used > s->save_nblock+1)
-            return True;
-   
-         s->state_out_len = 1;
-         s->state_out_ch = s->k0;
-         BZ_GET_SMALL(k1); BZ_RAND_UPD_MASK; 
-         k1 ^= BZ_RAND_MASK; s->nblock_used++;
-         if (s->nblock_used == s->save_nblock+1) continue;
-         if (k1 != s->k0) { s->k0 = k1; continue; };
-   
-         s->state_out_len = 2;
-         BZ_GET_SMALL(k1); BZ_RAND_UPD_MASK; 
-         k1 ^= BZ_RAND_MASK; s->nblock_used++;
-         if (s->nblock_used == s->save_nblock+1) continue;
-         if (k1 != s->k0) { s->k0 = k1; continue; };
-   
-         s->state_out_len = 3;
-         BZ_GET_SMALL(k1); BZ_RAND_UPD_MASK; 
-         k1 ^= BZ_RAND_MASK; s->nblock_used++;
-         if (s->nblock_used == s->save_nblock+1) continue;
-         if (k1 != s->k0) { s->k0 = k1; continue; };
-   
-         BZ_GET_SMALL(k1); BZ_RAND_UPD_MASK; 
-         k1 ^= BZ_RAND_MASK; s->nblock_used++;
-         s->state_out_len = ((Int32)k1) + 4;
-         BZ_GET_SMALL(s->k0); BZ_RAND_UPD_MASK; 
-         s->k0 ^= BZ_RAND_MASK; s->nblock_used++;
-      }
-
-   } else {
-
-      while (True) {
-         /* try to finish existing run */
-         while (True) {
-            if (s->strm->avail_out == 0) return False;
-            if (s->state_out_len == 0) break;
-            *( (UChar*)(s->strm->next_out) ) = s->state_out_ch;
-            BZ_UPDATE_CRC ( s->calculatedBlockCRC, s->state_out_ch );
-            s->state_out_len--;
-            s->strm->next_out++;
-            s->strm->avail_out--;
-            s->strm->total_out_lo32++;
-            if (s->strm->total_out_lo32 == 0) s->strm->total_out_hi32++;
-         }
-   
-         /* can a new run be started? */
-         if (s->nblock_used == s->save_nblock+1) return False;
-
-         /* Only caused by corrupt data stream? */
-         if (s->nblock_used > s->save_nblock+1)
-            return True;
-   
-         s->state_out_len = 1;
-         s->state_out_ch = s->k0;
-         BZ_GET_SMALL(k1); s->nblock_used++;
-         if (s->nblock_used == s->save_nblock+1) continue;
-         if (k1 != s->k0) { s->k0 = k1; continue; };
-   
-         s->state_out_len = 2;
-         BZ_GET_SMALL(k1); s->nblock_used++;
-         if (s->nblock_used == s->save_nblock+1) continue;
-         if (k1 != s->k0) { s->k0 = k1; continue; };
-   
-         s->state_out_len = 3;
-         BZ_GET_SMALL(k1); s->nblock_used++;
-         if (s->nblock_used == s->save_nblock+1) continue;
-         if (k1 != s->k0) { s->k0 = k1; continue; };
-   
-         BZ_GET_SMALL(k1); s->nblock_used++;
-         s->state_out_len = ((Int32)k1) + 4;
-         BZ_GET_SMALL(s->k0); s->nblock_used++;
-      }
-
-   }
-}
-
-
-/*---------------------------------------------------*/
-int BZ_API(BZ2_bzDecompress) ( bz_stream *strm )
-{
-   Bool    corrupt;
-   DState* s;
-   if (strm == NULL) return BZ_PARAM_ERROR;
-   s = (DState *) strm->state;
-   if (s == NULL) return BZ_PARAM_ERROR;
-   if (s->strm != strm) return BZ_PARAM_ERROR;
-
-   while (True) {
-      if (s->state == BZ_X_IDLE) return BZ_SEQUENCE_ERROR;
-      if (s->state == BZ_X_OUTPUT) {
-         if (s->smallDecompress)
-            corrupt = unRLE_obuf_to_output_SMALL ( s ); else
-            corrupt = unRLE_obuf_to_output_FAST  ( s );
-         if (corrupt) return BZ_DATA_ERROR;
-         if (s->nblock_used == s->save_nblock+1 && s->state_out_len == 0) {
-            BZ_FINALISE_CRC ( s->calculatedBlockCRC );
-            if (s->verbosity >= 3) 
-               VPrintf2 ( " {0x%08x, 0x%08x}", s->storedBlockCRC, 
-                          s->calculatedBlockCRC );
-            if (s->verbosity >= 2) VPrintf0 ( "]" );
-            if (s->calculatedBlockCRC != s->storedBlockCRC)
-               return BZ_DATA_ERROR;
-            s->calculatedCombinedCRC 
-               = (s->calculatedCombinedCRC << 1) | 
-                    (s->calculatedCombinedCRC >> 31);
-            s->calculatedCombinedCRC ^= s->calculatedBlockCRC;
-            s->state = BZ_X_BLKHDR_1;
-         } else {
-            return BZ_OK;
-         }
-      }
-      if (s->state >= BZ_X_MAGIC_1) {
-         Int32 r = BZ2_decompress ( s );
-         if (r == BZ_STREAM_END) {
-            if (s->verbosity >= 3)
-               VPrintf2 ( "\n    combined CRCs: stored = 0x%08x, computed = 0x%08x", 
-                          s->storedCombinedCRC, s->calculatedCombinedCRC );
-            if (s->calculatedCombinedCRC != s->storedCombinedCRC)
-               return BZ_DATA_ERROR;
-            return r;
-         }
-         if (s->state != BZ_X_OUTPUT) return r;
-      }
-   }
-
-#ifdef UNREACHED
-   AssertH ( 0, 6001 );
-
-   return 0;  /*NOTREACHED*/
-#endif
-}
-
-
-/*---------------------------------------------------*/
-int BZ_API(BZ2_bzDecompressEnd)  ( bz_stream *strm )
-{
-   DState* s;
-   if (strm == NULL) return BZ_PARAM_ERROR;
-   s = (DState *) strm->state;
-   if (s == NULL) return BZ_PARAM_ERROR;
-   if (s->strm != strm) return BZ_PARAM_ERROR;
-
-   if (s->tt   != NULL) BZFREE(s->tt);
-   if (s->ll16 != NULL) BZFREE(s->ll16);
-   if (s->ll4  != NULL) BZFREE(s->ll4);
-
-   BZFREE(strm->state);
-   strm->state = NULL;
-
-   return BZ_OK;
-}
-
-
-#ifndef BZ_NO_STDIO
-/*---------------------------------------------------*/
-/*--- File I/O stuff                              ---*/
-/*---------------------------------------------------*/
-
-#define BZ_SETERR(eee)                    \
-{                                         \
-   if (bzerror != NULL) *bzerror = eee;   \
-   if (bzf != NULL) bzf->lastErr = eee;   \
-}
-
-typedef 
-   struct {
-      FILE*     handle;
-      Char      buf[BZ_MAX_UNUSED];
-      Int32     bufN;
-      Bool      writing;
-      bz_stream strm;
-      Int32     lastErr;
-      Bool      initialisedOk;
-   }
-   bzFile;
-
-
-/*---------------------------------------------*/
-static Bool myfeof ( FILE* f )
-{
-   Int32 c = fgetc ( f );
-   if (c == EOF) return True;
-   ungetc ( c, f );
-   return False;
-}
-
-
-/*---------------------------------------------------*/
-BZFILE* BZ_API(BZ2_bzWriteOpen) 
-                    ( int*  bzerror,      
-                      FILE* f, 
-                      int   blockSize100k, 
-                      int   verbosity,
-                      int   workFactor )
-{
-   Int32   ret;
-   bzFile* bzf = NULL;
-
-   BZ_SETERR(BZ_OK);
-
-   if (f == NULL ||
-       (blockSize100k < 1 || blockSize100k > 9) ||
-       (workFactor < 0 || workFactor > 250) ||
-       (verbosity < 0 || verbosity > 4))
-      { BZ_SETERR(BZ_PARAM_ERROR); return NULL; };
-
-   if (ferror(f))
-      { BZ_SETERR(BZ_IO_ERROR); return NULL; };
-
-   bzf = (bzFile *) malloc ( sizeof(bzFile) );
-   if (bzf == NULL)
-      { BZ_SETERR(BZ_MEM_ERROR); return NULL; };
-
-   BZ_SETERR(BZ_OK);
-   bzf->initialisedOk = False;
-   bzf->bufN          = 0;
-   bzf->handle        = f;
-   bzf->writing       = True;
-   bzf->strm.bzalloc  = NULL;
-   bzf->strm.bzfree   = NULL;
-   bzf->strm.opaque   = NULL;
-
-   if (workFactor == 0) workFactor = 30;
-   ret = BZ2_bzCompressInit ( &(bzf->strm), blockSize100k, 
-                              verbosity, workFactor );
-   if (ret != BZ_OK)
-      { BZ_SETERR(ret); free(bzf); return NULL; };
-
-   bzf->strm.avail_in = 0;
-   bzf->initialisedOk = True;
-   return bzf;   
-}
-
-
-
-/*---------------------------------------------------*/
-void BZ_API(BZ2_bzWrite)
-             ( int*    bzerror, 
-               BZFILE* b, 
-               void*   buf, 
-               int     len )
-{
-   Int32 n, n2, ret;
-   bzFile* bzf = (bzFile*)b;
-
-   BZ_SETERR(BZ_OK);
-   if (bzf == NULL || buf == NULL || len < 0)
-      { BZ_SETERR(BZ_PARAM_ERROR); return; };
-   if (!(bzf->writing))
-      { BZ_SETERR(BZ_SEQUENCE_ERROR); return; };
-   if (ferror(bzf->handle))
-      { BZ_SETERR(BZ_IO_ERROR); return; };
-
-   if (len == 0)
-      { BZ_SETERR(BZ_OK); return; };
-
-   bzf->strm.avail_in = len;
-   bzf->strm.next_in  = (char *) buf;
-
-   while (True) {
-      bzf->strm.avail_out = BZ_MAX_UNUSED;
-      bzf->strm.next_out = bzf->buf;
-      ret = BZ2_bzCompress ( &(bzf->strm), BZ_RUN );
-      if (ret != BZ_RUN_OK)
-         { BZ_SETERR(ret); return; };
-
-      if (bzf->strm.avail_out < BZ_MAX_UNUSED) {
-         n = BZ_MAX_UNUSED - bzf->strm.avail_out;
-         n2 = fwrite ( (void*)(bzf->buf), sizeof(UChar), 
-                       n, bzf->handle );
-         if (n != n2 || ferror(bzf->handle))
-            { BZ_SETERR(BZ_IO_ERROR); return; };
-      }
-
-      if (bzf->strm.avail_in == 0)
-         { BZ_SETERR(BZ_OK); return; };
-   }
-}
-
-
-/*---------------------------------------------------*/
-void BZ_API(BZ2_bzWriteClose)
-                  ( int*          bzerror, 
-                    BZFILE*       b, 
-                    int           abandon,
-                    unsigned int* nbytes_in,
-                    unsigned int* nbytes_out )
-{
-   BZ2_bzWriteClose64 ( bzerror, b, abandon, 
-                        nbytes_in, NULL, nbytes_out, NULL );
-}
-
-
-void BZ_API(BZ2_bzWriteClose64)
-                  ( int*          bzerror, 
-                    BZFILE*       b, 
-                    int           abandon,
-                    unsigned int* nbytes_in_lo32,
-                    unsigned int* nbytes_in_hi32,
-                    unsigned int* nbytes_out_lo32,
-                    unsigned int* nbytes_out_hi32 )
-{
-   Int32   n, n2, ret;
-   bzFile* bzf = (bzFile*)b;
-
-   if (bzf == NULL)
-      { BZ_SETERR(BZ_OK); return; };
-   if (!(bzf->writing))
-      { BZ_SETERR(BZ_SEQUENCE_ERROR); return; };
-   if (ferror(bzf->handle))
-      { BZ_SETERR(BZ_IO_ERROR); return; };
-
-   if (nbytes_in_lo32 != NULL) *nbytes_in_lo32 = 0;
-   if (nbytes_in_hi32 != NULL) *nbytes_in_hi32 = 0;
-   if (nbytes_out_lo32 != NULL) *nbytes_out_lo32 = 0;
-   if (nbytes_out_hi32 != NULL) *nbytes_out_hi32 = 0;
-
-   if ((!abandon) && bzf->lastErr == BZ_OK) {
-      while (True) {
-         bzf->strm.avail_out = BZ_MAX_UNUSED;
-         bzf->strm.next_out = bzf->buf;
-         ret = BZ2_bzCompress ( &(bzf->strm), BZ_FINISH );
-         if (ret != BZ_FINISH_OK && ret != BZ_STREAM_END)
-            { BZ_SETERR(ret); return; };
-
-         if (bzf->strm.avail_out < BZ_MAX_UNUSED) {
-            n = BZ_MAX_UNUSED - bzf->strm.avail_out;
-            n2 = fwrite ( (void*)(bzf->buf), sizeof(UChar), 
-                          n, bzf->handle );
-            if (n != n2 || ferror(bzf->handle))
-               { BZ_SETERR(BZ_IO_ERROR); return; };
-         }
-
-         if (ret == BZ_STREAM_END) break;
-      }
-   }
-
-   if ( !abandon && !ferror ( bzf->handle ) ) {
-      fflush ( bzf->handle );
-      if (ferror(bzf->handle))
-         { BZ_SETERR(BZ_IO_ERROR); return; };
-   }
-
-   if (nbytes_in_lo32 != NULL)
-      *nbytes_in_lo32 = bzf->strm.total_in_lo32;
-   if (nbytes_in_hi32 != NULL)
-      *nbytes_in_hi32 = bzf->strm.total_in_hi32;
-   if (nbytes_out_lo32 != NULL)
-      *nbytes_out_lo32 = bzf->strm.total_out_lo32;
-   if (nbytes_out_hi32 != NULL)
-      *nbytes_out_hi32 = bzf->strm.total_out_hi32;
-
-   BZ_SETERR(BZ_OK);
-   BZ2_bzCompressEnd ( &(bzf->strm) );
-   free ( bzf );
-}
-
-
-/*---------------------------------------------------*/
-BZFILE* BZ_API(BZ2_bzReadOpen) 
-                   ( int*  bzerror, 
-                     FILE* f, 
-                     int   verbosity,
-                     int   small,
-                     void* unused,
-                     int   nUnused )
-{
-   bzFile* bzf = NULL;
-   int     ret;
-
-   BZ_SETERR(BZ_OK);
-
-   if (f == NULL || 
-       (small != 0 && small != 1) ||
-       (verbosity < 0 || verbosity > 4) ||
-       (unused == NULL && nUnused != 0) ||
-       (unused != NULL && (nUnused < 0 || nUnused > BZ_MAX_UNUSED)))
-      { BZ_SETERR(BZ_PARAM_ERROR); return NULL; };
-
-   if (ferror(f))
-      { BZ_SETERR(BZ_IO_ERROR); return NULL; };
-
-   bzf = (bzFile *) malloc ( sizeof(bzFile) );
-   if (bzf == NULL) 
-      { BZ_SETERR(BZ_MEM_ERROR); return NULL; };
-
-   BZ_SETERR(BZ_OK);
-
-   bzf->initialisedOk = False;
-   bzf->handle        = f;
-   bzf->bufN          = 0;
-   bzf->writing       = False;
-   bzf->strm.bzalloc  = NULL;
-   bzf->strm.bzfree   = NULL;
-   bzf->strm.opaque   = NULL;
-   
-   while (nUnused > 0) {
-      bzf->buf[bzf->bufN] = *((UChar*)(unused)); bzf->bufN++;
-      unused = ((void*)( 1 + ((UChar*)(unused))  ));
-      nUnused--;
-   }
-
-   ret = BZ2_bzDecompressInit ( &(bzf->strm), verbosity, small );
-   if (ret != BZ_OK)
-      { BZ_SETERR(ret); free(bzf); return NULL; };
-
-   bzf->strm.avail_in = bzf->bufN;
-   bzf->strm.next_in  = bzf->buf;
-
-   bzf->initialisedOk = True;
-   return bzf;   
-}
-
-
-/*---------------------------------------------------*/
-void BZ_API(BZ2_bzReadClose) ( int *bzerror, BZFILE *b )
-{
-   bzFile* bzf = (bzFile*)b;
-
-   BZ_SETERR(BZ_OK);
-   if (bzf == NULL)
-      { BZ_SETERR(BZ_OK); return; };
-
-   if (bzf->writing)
-      { BZ_SETERR(BZ_SEQUENCE_ERROR); return; };
-
-   if (bzf->initialisedOk)
-      (void)BZ2_bzDecompressEnd ( &(bzf->strm) );
-   free ( bzf );
-}
-
-
-/*---------------------------------------------------*/
-int BZ_API(BZ2_bzRead) 
-           ( int*    bzerror, 
-             BZFILE* b, 
-             void*   buf, 
-             int     len )
-{
-   Int32   n, ret;
-   bzFile* bzf = (bzFile*)b;
-
-   BZ_SETERR(BZ_OK);
-
-   if (bzf == NULL || buf == NULL || len < 0)
-      { BZ_SETERR(BZ_PARAM_ERROR); return 0; };
-
-   if (bzf->writing)
-      { BZ_SETERR(BZ_SEQUENCE_ERROR); return 0; };
-
-   if (len == 0)
-      { BZ_SETERR(BZ_OK); return 0; };
-
-   bzf->strm.avail_out = len;
-   bzf->strm.next_out = (char *) buf;
-
-   while (True) {
-
-      if (ferror(bzf->handle)) 
-         { BZ_SETERR(BZ_IO_ERROR); return 0; };
-
-      if (bzf->strm.avail_in == 0 && !myfeof(bzf->handle)) {
-         n = fread ( bzf->buf, sizeof(UChar), 
-                     BZ_MAX_UNUSED, bzf->handle );
-         if (ferror(bzf->handle))
-            { BZ_SETERR(BZ_IO_ERROR); return 0; };
-         bzf->bufN = n;
-         bzf->strm.avail_in = bzf->bufN;
-         bzf->strm.next_in = bzf->buf;
-      }
-
-      ret = BZ2_bzDecompress ( &(bzf->strm) );
-
-      if (ret != BZ_OK && ret != BZ_STREAM_END)
-         { BZ_SETERR(ret); return 0; };
-
-      if (ret == BZ_OK && myfeof(bzf->handle) && 
-          bzf->strm.avail_in == 0 && bzf->strm.avail_out > 0)
-         { BZ_SETERR(BZ_UNEXPECTED_EOF); return 0; };
-
-      if (ret == BZ_STREAM_END)
-         { BZ_SETERR(BZ_STREAM_END);
-           return len - bzf->strm.avail_out; };
-      if (bzf->strm.avail_out == 0)
-         { BZ_SETERR(BZ_OK); return len; };
-      
-   }
-
-#ifdef UNREACHED
-   return 0; /*not reached*/
-#endif
-}
-
-
-/*---------------------------------------------------*/
-void BZ_API(BZ2_bzReadGetUnused) 
-                     ( int*    bzerror, 
-                       BZFILE* b, 
-                       void**  unused, 
-                       int*    nUnused )
-{
-   bzFile* bzf = (bzFile*)b;
-   if (bzf == NULL)
-      { BZ_SETERR(BZ_PARAM_ERROR); return; };
-   if (bzf->lastErr != BZ_STREAM_END)
-      { BZ_SETERR(BZ_SEQUENCE_ERROR); return; };
-   if (unused == NULL || nUnused == NULL)
-      { BZ_SETERR(BZ_PARAM_ERROR); return; };
-
-   BZ_SETERR(BZ_OK);
-   *nUnused = bzf->strm.avail_in;
-   *unused = bzf->strm.next_in;
-}
-#endif
-
-
-/*---------------------------------------------------*/
-/*--- Misc convenience stuff                      ---*/
-/*---------------------------------------------------*/
-
-/*---------------------------------------------------*/
-int BZ_API(BZ2_bzBuffToBuffCompress) 
-                         ( char*         dest, 
-                           unsigned int* destLen,
-                           char*         source, 
-                           unsigned int  sourceLen,
-                           int           blockSize100k, 
-                           int           verbosity, 
-                           int           workFactor )
-{
-   bz_stream strm;
-   int ret;
-
-   if (dest == NULL || destLen == NULL || 
-       source == NULL ||
-       blockSize100k < 1 || blockSize100k > 9 ||
-       verbosity < 0 || verbosity > 4 ||
-       workFactor < 0 || workFactor > 250) 
-      return BZ_PARAM_ERROR;
-
-   if (workFactor == 0) workFactor = 30;
-   strm.bzalloc = NULL;
-   strm.bzfree = NULL;
-   strm.opaque = NULL;
-   ret = BZ2_bzCompressInit ( &strm, blockSize100k, 
-                              verbosity, workFactor );
-   if (ret != BZ_OK) return ret;
-
-   strm.next_in = source;
-   strm.next_out = dest;
-   strm.avail_in = sourceLen;
-   strm.avail_out = *destLen;
-
-   ret = BZ2_bzCompress ( &strm, BZ_FINISH );
-   if (ret == BZ_FINISH_OK) goto output_overflow;
-   if (ret != BZ_STREAM_END) goto errhandler;
-
-   /* normal termination */
-   *destLen -= strm.avail_out;   
-   BZ2_bzCompressEnd ( &strm );
-   return BZ_OK;
-
-   output_overflow:
-   BZ2_bzCompressEnd ( &strm );
-   return BZ_OUTBUFF_FULL;
-
-   errhandler:
-   BZ2_bzCompressEnd ( &strm );
-   return ret;
-}
-
-
-/*---------------------------------------------------*/
-int BZ_API(BZ2_bzBuffToBuffDecompress) 
-                           ( char*         dest, 
-                             unsigned int* destLen,
-                             char*         source, 
-                             unsigned int  sourceLen,
-                             int           small,
-                             int           verbosity )
-{
-   bz_stream strm;
-   int ret;
-
-   if (dest == NULL || destLen == NULL || 
-       source == NULL ||
-       (small != 0 && small != 1) ||
-       verbosity < 0 || verbosity > 4) 
-          return BZ_PARAM_ERROR;
-
-   strm.bzalloc = NULL;
-   strm.bzfree = NULL;
-   strm.opaque = NULL;
-   ret = BZ2_bzDecompressInit ( &strm, verbosity, small );
-   if (ret != BZ_OK) return ret;
-
-   strm.next_in = source;
-   strm.next_out = dest;
-   strm.avail_in = sourceLen;
-   strm.avail_out = *destLen;
-
-   ret = BZ2_bzDecompress ( &strm );
-   if (ret == BZ_OK) goto output_overflow_or_eof;
-   if (ret != BZ_STREAM_END) goto errhandler;
-
-   /* normal termination */
-   *destLen -= strm.avail_out;
-   BZ2_bzDecompressEnd ( &strm );
-   return BZ_OK;
-
-   output_overflow_or_eof:
-   if (strm.avail_out > 0) {
-      BZ2_bzDecompressEnd ( &strm );
-      return BZ_UNEXPECTED_EOF;
-   } else {
-      BZ2_bzDecompressEnd ( &strm );
-      return BZ_OUTBUFF_FULL;
-   };      
-
-   errhandler:
-   BZ2_bzDecompressEnd ( &strm );
-   return ret; 
-}
-
-
-/*---------------------------------------------------*/
-/*--
-   Code contributed by Yoshioka Tsuneo (tsuneo at rr.iij4u.or.jp)
-   to support better zlib compatibility.
-   This code is not _officially_ part of libbzip2 (yet);
-   I haven't tested it, documented it, or considered the
-   threading-safeness of it.
-   If this code breaks, please contact both Yoshioka and me.
---*/
-/*---------------------------------------------------*/
-
-/*---------------------------------------------------*/
-/*--
-   return version like "0.9.5d, 4-Sept-1999".
---*/
-const char * BZ_API(BZ2_bzlibVersion)(void)
-{
-   return BZ_VERSION;
-}
-
-
-#ifndef BZ_NO_STDIO
-/*---------------------------------------------------*/
-
-#if defined(_WIN32) || defined(OS2) || defined(MSDOS)
-#   include <fcntl.h>
-#   include <io.h>
-#   define SET_BINARY_MODE(file) setmode(fileno(file),O_BINARY)
-#else
-#   define SET_BINARY_MODE(file)
-#endif
-
-#if !defined(fdopen) && defined(HAVE_FDOPEN)
-  FILE *fdopen(int fildes, const char *mode)
-#ifdef __cplusplus
-	throw ()
-#endif
- ;
-#endif
-
-static
-BZFILE * bzopen_or_bzdopen
-               ( const char *path,   /* no use when bzdopen */
-                 int fd,             /* no use when bzdopen */
-                 const char *mode,
-                 int open_mode)      /* bzopen: 0, bzdopen:1 */
-{
-   int    bzerr;
-   char   unused[BZ_MAX_UNUSED];
-   int    blockSize100k = 9;
-   int    writing       = 0;
-   char   mode2[10]     = "";
-   FILE   *fp           = NULL;
-   BZFILE *bzfp         = NULL;
-   int    verbosity     = 0;
-   int    workFactor    = 30;
-   int    smallMode     = 0;
-   int    nUnused       = 0; 
-
-   if (mode == NULL) return NULL;
-   while (*mode) {
-      switch (*mode) {
-      case 'r':
-         writing = 0; break;
-      case 'w':
-         writing = 1; break;
-      case 's':
-         smallMode = 1; break;
-      default:
-         if (isdigit((int)(*mode))) {
-            blockSize100k = *mode-BZ_HDR_0;
-         }
-      }
-      mode++;
-   }
-   strcat(mode2, writing ? "w" : "r" );
-   strcat(mode2,"b");   /* binary mode */
-
-   if (open_mode==0) {
-      if (path==NULL || strcmp(path,"")==0) {
-        fp = (writing ? stdout : stdin);
-        SET_BINARY_MODE(fp);
-      } else {
-        fp = fopen(path,mode2);
-      }
-   } else {
-#ifndef HAVE_FDOPEN
-      fp = NULL;
-#else
-      fp = fdopen(fd,mode2);
-#endif
-   }
-   if (fp == NULL) return NULL;
-
-   if (writing) {
-      /* Guard against total chaos and anarchy -- JRS */
-      if (blockSize100k < 1) blockSize100k = 1;
-      if (blockSize100k > 9) blockSize100k = 9; 
-      bzfp = BZ2_bzWriteOpen(&bzerr,fp,blockSize100k,
-                             verbosity,workFactor);
-   } else {
-      bzfp = BZ2_bzReadOpen(&bzerr,fp,verbosity,smallMode,
-                            unused,nUnused);
-   }
-   if (bzfp == NULL) {
-      if (fp != stdin && fp != stdout) fclose(fp);
-      return NULL;
-   }
-   return bzfp;
-}
-
-
-/*---------------------------------------------------*/
-/*--
-   open file for read or write.
-      ex) bzopen("file","w9")
-      case path="" or NULL => use stdin or stdout.
---*/
-BZFILE * BZ_API(BZ2_bzopen)
-               ( const char *path,
-                 const char *mode )
-{
-   return bzopen_or_bzdopen(path,-1,mode,/*bzopen*/0);
-}
-
-
-/*---------------------------------------------------*/
-BZFILE * BZ_API(BZ2_bzdopen)
-               ( int fd,
-                 const char *mode )
-{
-   return bzopen_or_bzdopen(NULL,fd,mode,/*bzdopen*/1);
-}
-
-
-/*---------------------------------------------------*/
-int BZ_API(BZ2_bzread) (BZFILE* b, void* buf, int len )
-{
-   int bzerr, nread;
-   if (((bzFile*)b)->lastErr == BZ_STREAM_END) return 0;
-   nread = BZ2_bzRead(&bzerr,b,buf,len);
-   if (bzerr == BZ_OK || bzerr == BZ_STREAM_END) {
-      return nread;
-   } else {
-      return -1;
-   }
-}
-
-
-/*---------------------------------------------------*/
-int BZ_API(BZ2_bzwrite) (BZFILE* b, void* buf, int len )
-{
-   int bzerr;
-
-   BZ2_bzWrite(&bzerr,b,buf,len);
-   if(bzerr == BZ_OK){
-      return len;
-   }else{
-      return -1;
-   }
-}
-
-
-/*---------------------------------------------------*/
-int BZ_API(BZ2_bzflush) (BZFILE *b)
-{
-   /* do nothing now... */
-   return 0;
-}
-
-
-/*---------------------------------------------------*/
-void BZ_API(BZ2_bzclose) (BZFILE* b)
-{
-   int bzerr;
-   FILE *fp = ((bzFile *)b)->handle;
-   
-   if (b==NULL) {return;}
-   if(((bzFile*)b)->writing){
-      BZ2_bzWriteClose(&bzerr,b,0,NULL,NULL);
-      if(bzerr != BZ_OK){
-         BZ2_bzWriteClose(NULL,b,1,NULL,NULL);
-      }
-   }else{
-      BZ2_bzReadClose(&bzerr,b);
-   }
-   if(fp!=stdin && fp!=stdout){
-      fclose(fp);
-   }
-}
-
-
-/*---------------------------------------------------*/
-/*--
-   return last error code 
---*/
-static const char *bzerrorstrings[] = {
-       "OK"
-      ,"SEQUENCE_ERROR"
-      ,"PARAM_ERROR"
-      ,"MEM_ERROR"
-      ,"DATA_ERROR"
-      ,"DATA_ERROR_MAGIC"
-      ,"IO_ERROR"
-      ,"UNEXPECTED_EOF"
-      ,"OUTBUFF_FULL"
-      ,"CONFIG_ERROR"
-      ,"???"   /* for future */
-      ,"???"   /* for future */
-      ,"???"   /* for future */
-      ,"???"   /* for future */
-      ,"???"   /* for future */
-      ,"???"   /* for future */
-};
-
-
-const char * BZ_API(BZ2_bzerror) (BZFILE *b, int *errnum)
-{
-   int err = ((bzFile *)b)->lastErr;
-
-   if(err>0) err = 0;
-   *errnum = err;
-   return bzerrorstrings[err*-1];
-}
-#endif
-
-
-/*-------------------------------------------------------------*/
-/*--- end                                           bzlib.c ---*/
-/*-------------------------------------------------------------*/
diff --git a/src/extra/bzip2/bzlib.h b/src/extra/bzip2/bzlib.h
deleted file mode 100644
index 8277123..0000000
--- a/src/extra/bzip2/bzlib.h
+++ /dev/null
@@ -1,282 +0,0 @@
-
-/*-------------------------------------------------------------*/
-/*--- Public header file for the library.                   ---*/
-/*---                                               bzlib.h ---*/
-/*-------------------------------------------------------------*/
-
-/* ------------------------------------------------------------------
-   This file is part of bzip2/libbzip2, a program and library for
-   lossless, block-sorting data compression.
-
-   bzip2/libbzip2 version 1.0.6 of 6 September 2010
-   Copyright (C) 1996-2010 Julian Seward <jseward at bzip.org>
-
-   Please read the WARNING, DISCLAIMER and PATENTS sections in the 
-   README file.
-
-   This program is released under the terms of the license contained
-   in the file LICENSE.
-   ------------------------------------------------------------------ */
-
-
-#ifndef _BZLIB_H
-#define _BZLIB_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#define BZ_RUN               0
-#define BZ_FLUSH             1
-#define BZ_FINISH            2
-
-#define BZ_OK                0
-#define BZ_RUN_OK            1
-#define BZ_FLUSH_OK          2
-#define BZ_FINISH_OK         3
-#define BZ_STREAM_END        4
-#define BZ_SEQUENCE_ERROR    (-1)
-#define BZ_PARAM_ERROR       (-2)
-#define BZ_MEM_ERROR         (-3)
-#define BZ_DATA_ERROR        (-4)
-#define BZ_DATA_ERROR_MAGIC  (-5)
-#define BZ_IO_ERROR          (-6)
-#define BZ_UNEXPECTED_EOF    (-7)
-#define BZ_OUTBUFF_FULL      (-8)
-#define BZ_CONFIG_ERROR      (-9)
-
-typedef 
-   struct {
-      char *next_in;
-      unsigned int avail_in;
-      unsigned int total_in_lo32;
-      unsigned int total_in_hi32;
-
-      char *next_out;
-      unsigned int avail_out;
-      unsigned int total_out_lo32;
-      unsigned int total_out_hi32;
-
-      void *state;
-
-      void *(*bzalloc)(void *,int,int);
-      void (*bzfree)(void *,void *);
-      void *opaque;
-   } 
-   bz_stream;
-
-
-#ifndef BZ_IMPORT
-#define BZ_EXPORT
-#endif
-
-#ifndef BZ_NO_STDIO
-/* Need a definitition for FILE */
-#include <stdio.h>
-#endif
-
-#ifdef _WIN32
-#   include <windows.h>
-#   ifdef small
-      /* windows.h define small to char */
-#      undef small
-#   endif
-#   ifdef BZ_EXPORT
-#   define BZ_API(func) WINAPI func
-#   define BZ_EXTERN extern
-#   else
-   /* import windows dll dynamically */
-#   define BZ_API(func) (WINAPI * func)
-#   define BZ_EXTERN
-#   endif
-#else
-#   define BZ_API(func) func
-#   define BZ_EXTERN extern
-#endif
-
-
-/*-- Core (low-level) library functions --*/
-
-BZ_EXTERN int BZ_API(BZ2_bzCompressInit) ( 
-      bz_stream* strm, 
-      int        blockSize100k, 
-      int        verbosity, 
-      int        workFactor 
-   );
-
-BZ_EXTERN int BZ_API(BZ2_bzCompress) ( 
-      bz_stream* strm, 
-      int action 
-   );
-
-BZ_EXTERN int BZ_API(BZ2_bzCompressEnd) ( 
-      bz_stream* strm 
-   );
-
-BZ_EXTERN int BZ_API(BZ2_bzDecompressInit) ( 
-      bz_stream *strm, 
-      int       verbosity, 
-      int       small
-   );
-
-BZ_EXTERN int BZ_API(BZ2_bzDecompress) ( 
-      bz_stream* strm 
-   );
-
-BZ_EXTERN int BZ_API(BZ2_bzDecompressEnd) ( 
-      bz_stream *strm 
-   );
-
-
-
-/*-- High(er) level library functions --*/
-
-#ifndef BZ_NO_STDIO
-#define BZ_MAX_UNUSED 5000
-
-typedef void BZFILE;
-
-BZ_EXTERN BZFILE* BZ_API(BZ2_bzReadOpen) ( 
-      int*  bzerror,   
-      FILE* f, 
-      int   verbosity, 
-      int   small,
-      void* unused,    
-      int   nUnused 
-   );
-
-BZ_EXTERN void BZ_API(BZ2_bzReadClose) ( 
-      int*    bzerror, 
-      BZFILE* b 
-   );
-
-BZ_EXTERN void BZ_API(BZ2_bzReadGetUnused) ( 
-      int*    bzerror, 
-      BZFILE* b, 
-      void**  unused,  
-      int*    nUnused 
-   );
-
-BZ_EXTERN int BZ_API(BZ2_bzRead) ( 
-      int*    bzerror, 
-      BZFILE* b, 
-      void*   buf, 
-      int     len 
-   );
-
-BZ_EXTERN BZFILE* BZ_API(BZ2_bzWriteOpen) ( 
-      int*  bzerror,      
-      FILE* f, 
-      int   blockSize100k, 
-      int   verbosity, 
-      int   workFactor 
-   );
-
-BZ_EXTERN void BZ_API(BZ2_bzWrite) ( 
-      int*    bzerror, 
-      BZFILE* b, 
-      void*   buf, 
-      int     len 
-   );
-
-BZ_EXTERN void BZ_API(BZ2_bzWriteClose) ( 
-      int*          bzerror, 
-      BZFILE*       b, 
-      int           abandon, 
-      unsigned int* nbytes_in, 
-      unsigned int* nbytes_out 
-   );
-
-BZ_EXTERN void BZ_API(BZ2_bzWriteClose64) ( 
-      int*          bzerror, 
-      BZFILE*       b, 
-      int           abandon, 
-      unsigned int* nbytes_in_lo32, 
-      unsigned int* nbytes_in_hi32, 
-      unsigned int* nbytes_out_lo32, 
-      unsigned int* nbytes_out_hi32
-   );
-#endif
-
-
-/*-- Utility functions --*/
-
-BZ_EXTERN int BZ_API(BZ2_bzBuffToBuffCompress) ( 
-      char*         dest, 
-      unsigned int* destLen,
-      char*         source, 
-      unsigned int  sourceLen,
-      int           blockSize100k, 
-      int           verbosity, 
-      int           workFactor 
-   );
-
-BZ_EXTERN int BZ_API(BZ2_bzBuffToBuffDecompress) ( 
-      char*         dest, 
-      unsigned int* destLen,
-      char*         source, 
-      unsigned int  sourceLen,
-      int           small, 
-      int           verbosity 
-   );
-
-
-/*--
-   Code contributed by Yoshioka Tsuneo (tsuneo at rr.iij4u.or.jp)
-   to support better zlib compatibility.
-   This code is not _officially_ part of libbzip2 (yet);
-   I haven't tested it, documented it, or considered the
-   threading-safeness of it.
-   If this code breaks, please contact both Yoshioka and me.
---*/
-
-BZ_EXTERN const char * BZ_API(BZ2_bzlibVersion) (
-      void
-   );
-
-#ifndef BZ_NO_STDIO
-BZ_EXTERN BZFILE * BZ_API(BZ2_bzopen) (
-      const char *path,
-      const char *mode
-   );
-
-BZ_EXTERN BZFILE * BZ_API(BZ2_bzdopen) (
-      int        fd,
-      const char *mode
-   );
-         
-BZ_EXTERN int BZ_API(BZ2_bzread) (
-      BZFILE* b, 
-      void* buf, 
-      int len 
-   );
-
-BZ_EXTERN int BZ_API(BZ2_bzwrite) (
-      BZFILE* b, 
-      void*   buf, 
-      int     len 
-   );
-
-BZ_EXTERN int BZ_API(BZ2_bzflush) (
-      BZFILE* b
-   );
-
-BZ_EXTERN void BZ_API(BZ2_bzclose) (
-      BZFILE* b
-   );
-
-BZ_EXTERN const char * BZ_API(BZ2_bzerror) (
-      BZFILE *b, 
-      int    *errnum
-   );
-#endif
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
-
-/*-------------------------------------------------------------*/
-/*--- end                                           bzlib.h ---*/
-/*-------------------------------------------------------------*/
diff --git a/src/extra/bzip2/bzlib_private.h b/src/extra/bzip2/bzlib_private.h
deleted file mode 100644
index 0b26970..0000000
--- a/src/extra/bzip2/bzlib_private.h
+++ /dev/null
@@ -1,512 +0,0 @@
-
-/*-------------------------------------------------------------*/
-/*--- Private header file for the library.                  ---*/
-/*---                                       bzlib_private.h ---*/
-/*-------------------------------------------------------------*/
-
-/* ------------------------------------------------------------------
-   This file is part of bzip2/libbzip2, a program and library for
-   lossless, block-sorting data compression.
-
-   bzip2/libbzip2 version 1.0.6 of 6 September 2010
-   Copyright (C) 1996-2010 Julian Seward <jseward at bzip.org>
-
-   Please read the WARNING, DISCLAIMER and PATENTS sections in the 
-   README file.
-
-   This program is released under the terms of the license contained
-   in the file LICENSE.
-   ------------------------------------------------------------------ */
-
-
-#ifndef _BZLIB_PRIVATE_H
-#define _BZLIB_PRIVATE_H
-
-#include <config.h> /* for R_INLINE */
-#undef HAVE_FDOPEN  /* we may have, but this re-declares it and
-		       we don't use BZ2_bzdopen */
-#include <stdlib.h>
-
-#ifndef BZ_NO_STDIO
-#include <stdio.h>
-#include <ctype.h>
-#include <string.h>
-#endif
-
-#include "bzlib.h"
-
-
-
-/*-- General stuff. --*/
-
-#define BZ_VERSION  "1.0.6, 6-Sept-2010"
-
-typedef char            Char;
-typedef unsigned char   Bool;
-typedef unsigned char   UChar;
-typedef int             Int32;
-typedef unsigned int    UInt32;
-typedef short           Int16;
-typedef unsigned short  UInt16;
-
-#define True  ((Bool)1)
-#define False ((Bool)0)
-
-#ifndef __GNUC__
-#define __inline__  /* */
-#endif 
-
-#ifndef BZ_NO_STDIO
-
-extern void BZ2_bz__AssertH__fail ( int errcode );
-#define AssertH(cond,errcode) \
-   { if (!(cond)) BZ2_bz__AssertH__fail ( errcode ); }
-
-#if BZ_DEBUG
-#define AssertD(cond,msg) \
-   { if (!(cond)) {       \
-      fprintf ( stderr,   \
-        "\n\nlibbzip2(debug build): internal error\n\t%s\n", msg );\
-      exit(1); \
-   }}
-#else
-#define AssertD(cond,msg) /* */
-#endif
-
-#define VPrintf0(zf) \
-   fprintf(stderr,zf)
-#define VPrintf1(zf,za1) \
-   fprintf(stderr,zf,za1)
-#define VPrintf2(zf,za1,za2) \
-   fprintf(stderr,zf,za1,za2)
-#define VPrintf3(zf,za1,za2,za3) \
-   fprintf(stderr,zf,za1,za2,za3)
-#define VPrintf4(zf,za1,za2,za3,za4) \
-   fprintf(stderr,zf,za1,za2,za3,za4)
-#define VPrintf5(zf,za1,za2,za3,za4,za5) \
-   fprintf(stderr,zf,za1,za2,za3,za4,za5)
-
-#else
-
-extern void bz_internal_error ( int errcode );
-#define AssertH(cond,errcode) \
-   { if (!(cond)) bz_internal_error ( errcode ); }
-#define AssertD(cond,msg)                do { } while (0)
-#define VPrintf0(zf)                     do { } while (0)
-#define VPrintf1(zf,za1)                 do { } while (0)
-#define VPrintf2(zf,za1,za2)             do { } while (0)
-#define VPrintf3(zf,za1,za2,za3)         do { } while (0)
-#define VPrintf4(zf,za1,za2,za3,za4)     do { } while (0)
-#define VPrintf5(zf,za1,za2,za3,za4,za5) do { } while (0)
-
-#endif
-
-
-#define BZALLOC(nnn) (strm->bzalloc)(strm->opaque,(nnn),1)
-#define BZFREE(ppp)  (strm->bzfree)(strm->opaque,(ppp))
-
-
-/*-- Header bytes. --*/
-
-#define BZ_HDR_B 0x42   /* 'B' */
-#define BZ_HDR_Z 0x5a   /* 'Z' */
-#define BZ_HDR_h 0x68   /* 'h' */
-#define BZ_HDR_0 0x30   /* '0' */
-  
-/*-- Constants for the back end. --*/
-
-#define BZ_MAX_ALPHA_SIZE 258
-#define BZ_MAX_CODE_LEN    23
-
-#define BZ_RUNA 0
-#define BZ_RUNB 1
-
-#define BZ_N_GROUPS 6
-#define BZ_G_SIZE   50
-#define BZ_N_ITERS  4
-
-#define BZ_MAX_SELECTORS (2 + (900000 / BZ_G_SIZE))
-
-
-
-/*-- Stuff for randomising repetitive blocks. --*/
-
-extern Int32 BZ2_rNums[512];
-
-#define BZ_RAND_DECLS                          \
-   Int32 rNToGo;                               \
-   Int32 rTPos                                 \
-
-#define BZ_RAND_INIT_MASK                      \
-   s->rNToGo = 0;                              \
-   s->rTPos  = 0                               \
-
-#define BZ_RAND_MASK ((s->rNToGo == 1) ? 1 : 0)
-
-#define BZ_RAND_UPD_MASK                       \
-   if (s->rNToGo == 0) {                       \
-      s->rNToGo = BZ2_rNums[s->rTPos];         \
-      s->rTPos++;                              \
-      if (s->rTPos == 512) s->rTPos = 0;       \
-   }                                           \
-   s->rNToGo--;
-
-
-
-/*-- Stuff for doing CRCs. --*/
-
-extern UInt32 BZ2_crc32Table[256];
-
-#define BZ_INITIALISE_CRC(crcVar)              \
-{                                              \
-   crcVar = 0xffffffffL;                       \
-}
-
-#define BZ_FINALISE_CRC(crcVar)                \
-{                                              \
-   crcVar = ~(crcVar);                         \
-}
-
-#define BZ_UPDATE_CRC(crcVar,cha)              \
-{                                              \
-   crcVar = (crcVar << 8) ^                    \
-            BZ2_crc32Table[(crcVar >> 24) ^    \
-                           ((UChar)cha)];      \
-}
-
-
-
-/*-- States and modes for compression. --*/
-
-#define BZ_M_IDLE      1
-#define BZ_M_RUNNING   2
-#define BZ_M_FLUSHING  3
-#define BZ_M_FINISHING 4
-
-#define BZ_S_OUTPUT    1
-#define BZ_S_INPUT     2
-
-#define BZ_N_RADIX 2
-#define BZ_N_QSORT 12
-#define BZ_N_SHELL 18
-#define BZ_N_OVERSHOOT (BZ_N_RADIX + BZ_N_QSORT + BZ_N_SHELL + 2)
-
-
-
-
-/*-- Structure holding all the compression-side stuff. --*/
-
-typedef
-   struct {
-      /* pointer back to the struct bz_stream */
-      bz_stream* strm;
-
-      /* mode this stream is in, and whether inputting */
-      /* or outputting data */
-      Int32    mode;
-      Int32    state;
-
-      /* remembers avail_in when flush/finish requested */
-      UInt32   avail_in_expect;
-
-      /* for doing the block sorting */
-      UInt32*  arr1;
-      UInt32*  arr2;
-      UInt32*  ftab;
-      Int32    origPtr;
-
-      /* aliases for arr1 and arr2 */
-      UInt32*  ptr;
-      UChar*   block;
-      UInt16*  mtfv;
-      UChar*   zbits;
-
-      /* for deciding when to use the fallback sorting algorithm */
-      Int32    workFactor;
-
-      /* run-length-encoding of the input */
-      UInt32   state_in_ch;
-      Int32    state_in_len;
-      BZ_RAND_DECLS;
-
-      /* input and output limits and current posns */
-      Int32    nblock;
-      Int32    nblockMAX;
-      Int32    numZ;
-      Int32    state_out_pos;
-
-      /* map of bytes used in block */
-      Int32    nInUse;
-      Bool     inUse[256];
-      UChar    unseqToSeq[256];
-
-      /* the buffer for bit stream creation */
-      UInt32   bsBuff;
-      Int32    bsLive;
-
-      /* block and combined CRCs */
-      UInt32   blockCRC;
-      UInt32   combinedCRC;
-
-      /* misc administratium */
-      Int32    verbosity;
-      Int32    blockNo;
-      Int32    blockSize100k;
-
-      /* stuff for coding the MTF values */
-      Int32    nMTF;
-      Int32    mtfFreq    [BZ_MAX_ALPHA_SIZE];
-      UChar    selector   [BZ_MAX_SELECTORS];
-      UChar    selectorMtf[BZ_MAX_SELECTORS];
-
-      UChar    len     [BZ_N_GROUPS][BZ_MAX_ALPHA_SIZE];
-      Int32    code    [BZ_N_GROUPS][BZ_MAX_ALPHA_SIZE];
-      Int32    rfreq   [BZ_N_GROUPS][BZ_MAX_ALPHA_SIZE];
-      /* second dimension: only 3 needed; 4 makes index calculations faster */
-      UInt32   len_pack[BZ_MAX_ALPHA_SIZE][4];
-
-   }
-   EState;
-
-
-
-/*-- externs for compression. --*/
-
-extern void 
-BZ2_blockSort ( EState* );
-
-extern void 
-BZ2_compressBlock ( EState*, Bool );
-
-extern void 
-BZ2_bsInitWrite ( EState* );
-
-extern void 
-BZ2_hbAssignCodes ( Int32*, UChar*, Int32, Int32, Int32 );
-
-extern void 
-BZ2_hbMakeCodeLengths ( UChar*, Int32*, Int32, Int32 );
-
-
-
-/*-- states for decompression. --*/
-
-#define BZ_X_IDLE        1
-#define BZ_X_OUTPUT      2
-
-#define BZ_X_MAGIC_1     10
-#define BZ_X_MAGIC_2     11
-#define BZ_X_MAGIC_3     12
-#define BZ_X_MAGIC_4     13
-#define BZ_X_BLKHDR_1    14
-#define BZ_X_BLKHDR_2    15
-#define BZ_X_BLKHDR_3    16
-#define BZ_X_BLKHDR_4    17
-#define BZ_X_BLKHDR_5    18
-#define BZ_X_BLKHDR_6    19
-#define BZ_X_BCRC_1      20
-#define BZ_X_BCRC_2      21
-#define BZ_X_BCRC_3      22
-#define BZ_X_BCRC_4      23
-#define BZ_X_RANDBIT     24
-#define BZ_X_ORIGPTR_1   25
-#define BZ_X_ORIGPTR_2   26
-#define BZ_X_ORIGPTR_3   27
-#define BZ_X_MAPPING_1   28
-#define BZ_X_MAPPING_2   29
-#define BZ_X_SELECTOR_1  30
-#define BZ_X_SELECTOR_2  31
-#define BZ_X_SELECTOR_3  32
-#define BZ_X_CODING_1    33
-#define BZ_X_CODING_2    34
-#define BZ_X_CODING_3    35
-#define BZ_X_MTF_1       36
-#define BZ_X_MTF_2       37
-#define BZ_X_MTF_3       38
-#define BZ_X_MTF_4       39
-#define BZ_X_MTF_5       40
-#define BZ_X_MTF_6       41
-#define BZ_X_ENDHDR_2    42
-#define BZ_X_ENDHDR_3    43
-#define BZ_X_ENDHDR_4    44
-#define BZ_X_ENDHDR_5    45
-#define BZ_X_ENDHDR_6    46
-#define BZ_X_CCRC_1      47
-#define BZ_X_CCRC_2      48
-#define BZ_X_CCRC_3      49
-#define BZ_X_CCRC_4      50
-
-
-
-/*-- Constants for the fast MTF decoder. --*/
-
-#define MTFA_SIZE 4096
-#define MTFL_SIZE 16
-
-
-
-/*-- Structure holding all the decompression-side stuff. --*/
-
-typedef
-   struct {
-      /* pointer back to the struct bz_stream */
-      bz_stream* strm;
-
-      /* state indicator for this stream */
-      Int32    state;
-
-      /* for doing the final run-length decoding */
-      UChar    state_out_ch;
-      Int32    state_out_len;
-      Bool     blockRandomised;
-      BZ_RAND_DECLS;
-
-      /* the buffer for bit stream reading */
-      UInt32   bsBuff;
-      Int32    bsLive;
-
-      /* misc administratium */
-      Int32    blockSize100k;
-      Bool     smallDecompress;
-      Int32    currBlockNo;
-      Int32    verbosity;
-
-      /* for undoing the Burrows-Wheeler transform */
-      Int32    origPtr;
-      UInt32   tPos;
-      Int32    k0;
-      Int32    unzftab[256];
-      Int32    nblock_used;
-      Int32    cftab[257];
-      Int32    cftabCopy[257];
-
-      /* for undoing the Burrows-Wheeler transform (FAST) */
-      UInt32   *tt;
-
-      /* for undoing the Burrows-Wheeler transform (SMALL) */
-      UInt16   *ll16;
-      UChar    *ll4;
-
-      /* stored and calculated CRCs */
-      UInt32   storedBlockCRC;
-      UInt32   storedCombinedCRC;
-      UInt32   calculatedBlockCRC;
-      UInt32   calculatedCombinedCRC;
-
-      /* map of bytes used in block */
-      Int32    nInUse;
-      Bool     inUse[256];
-      Bool     inUse16[16];
-      UChar    seqToUnseq[256];
-
-      /* for decoding the MTF values */
-      UChar    mtfa   [MTFA_SIZE];
-      Int32    mtfbase[256 / MTFL_SIZE];
-      UChar    selector   [BZ_MAX_SELECTORS];
-      UChar    selectorMtf[BZ_MAX_SELECTORS];
-      UChar    len  [BZ_N_GROUPS][BZ_MAX_ALPHA_SIZE];
-
-      Int32    limit  [BZ_N_GROUPS][BZ_MAX_ALPHA_SIZE];
-      Int32    base   [BZ_N_GROUPS][BZ_MAX_ALPHA_SIZE];
-      Int32    perm   [BZ_N_GROUPS][BZ_MAX_ALPHA_SIZE];
-      Int32    minLens[BZ_N_GROUPS];
-
-      /* save area for scalars in the main decompress code */
-      Int32    save_i;
-      Int32    save_j;
-      Int32    save_t;
-      Int32    save_alphaSize;
-      Int32    save_nGroups;
-      Int32    save_nSelectors;
-      Int32    save_EOB;
-      Int32    save_groupNo;
-      Int32    save_groupPos;
-      Int32    save_nextSym;
-      Int32    save_nblockMAX;
-      Int32    save_nblock;
-      Int32    save_es;
-      Int32    save_N;
-      Int32    save_curr;
-      Int32    save_zt;
-      Int32    save_zn; 
-      Int32    save_zvec;
-      Int32    save_zj;
-      Int32    save_gSel;
-      Int32    save_gMinlen;
-      Int32*   save_gLimit;
-      Int32*   save_gBase;
-      Int32*   save_gPerm;
-
-   }
-   DState;
-
-
-
-/*-- Macros for decompression. --*/
-
-#define BZ_GET_FAST(cccc)                     \
-    /* c_tPos is unsigned, hence test < 0 is pointless. */ \
-    if (s->tPos >= (UInt32)100000 * (UInt32)s->blockSize100k) return True; \
-    s->tPos = s->tt[s->tPos];                 \
-    cccc = (UChar)(s->tPos & 0xff);           \
-    s->tPos >>= 8;
-
-#define BZ_GET_FAST_C(cccc)                   \
-    /* c_tPos is unsigned, hence test < 0 is pointless. */ \
-    if (c_tPos >= (UInt32)100000 * (UInt32)ro_blockSize100k) return True; \
-    c_tPos = c_tt[c_tPos];                    \
-    cccc = (UChar)(c_tPos & 0xff);            \
-    c_tPos >>= 8;
-
-#define SET_LL4(i,n)                                          \
-   { if (((i) & 0x1) == 0)                                    \
-        s->ll4[(i) >> 1] = (s->ll4[(i) >> 1] & 0xf0) | (n); else    \
-        s->ll4[(i) >> 1] = (s->ll4[(i) >> 1] & 0x0f) | ((n) << 4);  \
-   }
-
-#define GET_LL4(i)                             \
-   ((((UInt32)(s->ll4[(i) >> 1])) >> (((i) << 2) & 0x4)) & 0xF)
-
-#define SET_LL(i,n)                          \
-   { s->ll16[i] = (UInt16)(n & 0x0000ffff);  \
-     SET_LL4(i, n >> 16);                    \
-   }
-
-#define GET_LL(i) \
-   (((UInt32)s->ll16[i]) | (GET_LL4(i) << 16))
-
-#define BZ_GET_SMALL(cccc)                            \
-    /* c_tPos is unsigned, hence test < 0 is pointless. */ \
-    if (s->tPos >= (UInt32)100000 * (UInt32)s->blockSize100k) return True; \
-    cccc = BZ2_indexIntoF ( s->tPos, s->cftab );    \
-    s->tPos = GET_LL(s->tPos);
-
-
-/*-- externs for decompression. --*/
-
-extern Int32 
-BZ2_indexIntoF ( Int32, Int32* );
-
-extern Int32 
-BZ2_decompress ( DState* );
-
-extern void 
-BZ2_hbCreateDecodeTables ( Int32*, Int32*, Int32*, UChar*,
-                           Int32,  Int32, Int32 );
-
-
-#endif
-
-
-/*-- BZ_NO_STDIO seems to make NULL disappear on some platforms. --*/
-
-#ifdef BZ_NO_STDIO
-#ifndef NULL
-#define NULL 0
-#endif
-#endif
-
-
-/*-------------------------------------------------------------*/
-/*--- end                                   bzlib_private.h ---*/
-/*-------------------------------------------------------------*/
diff --git a/src/extra/bzip2/crctable.c b/src/extra/bzip2/crctable.c
deleted file mode 100644
index 1fea7e9..0000000
--- a/src/extra/bzip2/crctable.c
+++ /dev/null
@@ -1,104 +0,0 @@
-
-/*-------------------------------------------------------------*/
-/*--- Table for doing CRCs                                  ---*/
-/*---                                            crctable.c ---*/
-/*-------------------------------------------------------------*/
-
-/* ------------------------------------------------------------------
-   This file is part of bzip2/libbzip2, a program and library for
-   lossless, block-sorting data compression.
-
-   bzip2/libbzip2 version 1.0.6 of 6 September 2010
-   Copyright (C) 1996-2010 Julian Seward <jseward at bzip.org>
-
-   Please read the WARNING, DISCLAIMER and PATENTS sections in the 
-   README file.
-
-   This program is released under the terms of the license contained
-   in the file LICENSE.
-   ------------------------------------------------------------------ */
-
-
-#include "bzlib_private.h"
-
-/*--
-  I think this is an implementation of the AUTODIN-II,
-  Ethernet & FDDI 32-bit CRC standard.  Vaguely derived
-  from code by Rob Warnock, in Section 51 of the
-  comp.compression FAQ.
---*/
-
-UInt32 BZ2_crc32Table[256] = {
-
-   /*-- Ugly, innit? --*/
-
-   0x00000000L, 0x04c11db7L, 0x09823b6eL, 0x0d4326d9L,
-   0x130476dcL, 0x17c56b6bL, 0x1a864db2L, 0x1e475005L,
-   0x2608edb8L, 0x22c9f00fL, 0x2f8ad6d6L, 0x2b4bcb61L,
-   0x350c9b64L, 0x31cd86d3L, 0x3c8ea00aL, 0x384fbdbdL,
-   0x4c11db70L, 0x48d0c6c7L, 0x4593e01eL, 0x4152fda9L,
-   0x5f15adacL, 0x5bd4b01bL, 0x569796c2L, 0x52568b75L,
-   0x6a1936c8L, 0x6ed82b7fL, 0x639b0da6L, 0x675a1011L,
-   0x791d4014L, 0x7ddc5da3L, 0x709f7b7aL, 0x745e66cdL,
-   0x9823b6e0L, 0x9ce2ab57L, 0x91a18d8eL, 0x95609039L,
-   0x8b27c03cL, 0x8fe6dd8bL, 0x82a5fb52L, 0x8664e6e5L,
-   0xbe2b5b58L, 0xbaea46efL, 0xb7a96036L, 0xb3687d81L,
-   0xad2f2d84L, 0xa9ee3033L, 0xa4ad16eaL, 0xa06c0b5dL,
-   0xd4326d90L, 0xd0f37027L, 0xddb056feL, 0xd9714b49L,
-   0xc7361b4cL, 0xc3f706fbL, 0xceb42022L, 0xca753d95L,
-   0xf23a8028L, 0xf6fb9d9fL, 0xfbb8bb46L, 0xff79a6f1L,
-   0xe13ef6f4L, 0xe5ffeb43L, 0xe8bccd9aL, 0xec7dd02dL,
-   0x34867077L, 0x30476dc0L, 0x3d044b19L, 0x39c556aeL,
-   0x278206abL, 0x23431b1cL, 0x2e003dc5L, 0x2ac12072L,
-   0x128e9dcfL, 0x164f8078L, 0x1b0ca6a1L, 0x1fcdbb16L,
-   0x018aeb13L, 0x054bf6a4L, 0x0808d07dL, 0x0cc9cdcaL,
-   0x7897ab07L, 0x7c56b6b0L, 0x71159069L, 0x75d48ddeL,
-   0x6b93dddbL, 0x6f52c06cL, 0x6211e6b5L, 0x66d0fb02L,
-   0x5e9f46bfL, 0x5a5e5b08L, 0x571d7dd1L, 0x53dc6066L,
-   0x4d9b3063L, 0x495a2dd4L, 0x44190b0dL, 0x40d816baL,
-   0xaca5c697L, 0xa864db20L, 0xa527fdf9L, 0xa1e6e04eL,
-   0xbfa1b04bL, 0xbb60adfcL, 0xb6238b25L, 0xb2e29692L,
-   0x8aad2b2fL, 0x8e6c3698L, 0x832f1041L, 0x87ee0df6L,
-   0x99a95df3L, 0x9d684044L, 0x902b669dL, 0x94ea7b2aL,
-   0xe0b41de7L, 0xe4750050L, 0xe9362689L, 0xedf73b3eL,
-   0xf3b06b3bL, 0xf771768cL, 0xfa325055L, 0xfef34de2L,
-   0xc6bcf05fL, 0xc27dede8L, 0xcf3ecb31L, 0xcbffd686L,
-   0xd5b88683L, 0xd1799b34L, 0xdc3abdedL, 0xd8fba05aL,
-   0x690ce0eeL, 0x6dcdfd59L, 0x608edb80L, 0x644fc637L,
-   0x7a089632L, 0x7ec98b85L, 0x738aad5cL, 0x774bb0ebL,
-   0x4f040d56L, 0x4bc510e1L, 0x46863638L, 0x42472b8fL,
-   0x5c007b8aL, 0x58c1663dL, 0x558240e4L, 0x51435d53L,
-   0x251d3b9eL, 0x21dc2629L, 0x2c9f00f0L, 0x285e1d47L,
-   0x36194d42L, 0x32d850f5L, 0x3f9b762cL, 0x3b5a6b9bL,
-   0x0315d626L, 0x07d4cb91L, 0x0a97ed48L, 0x0e56f0ffL,
-   0x1011a0faL, 0x14d0bd4dL, 0x19939b94L, 0x1d528623L,
-   0xf12f560eL, 0xf5ee4bb9L, 0xf8ad6d60L, 0xfc6c70d7L,
-   0xe22b20d2L, 0xe6ea3d65L, 0xeba91bbcL, 0xef68060bL,
-   0xd727bbb6L, 0xd3e6a601L, 0xdea580d8L, 0xda649d6fL,
-   0xc423cd6aL, 0xc0e2d0ddL, 0xcda1f604L, 0xc960ebb3L,
-   0xbd3e8d7eL, 0xb9ff90c9L, 0xb4bcb610L, 0xb07daba7L,
-   0xae3afba2L, 0xaafbe615L, 0xa7b8c0ccL, 0xa379dd7bL,
-   0x9b3660c6L, 0x9ff77d71L, 0x92b45ba8L, 0x9675461fL,
-   0x8832161aL, 0x8cf30badL, 0x81b02d74L, 0x857130c3L,
-   0x5d8a9099L, 0x594b8d2eL, 0x5408abf7L, 0x50c9b640L,
-   0x4e8ee645L, 0x4a4ffbf2L, 0x470cdd2bL, 0x43cdc09cL,
-   0x7b827d21L, 0x7f436096L, 0x7200464fL, 0x76c15bf8L,
-   0x68860bfdL, 0x6c47164aL, 0x61043093L, 0x65c52d24L,
-   0x119b4be9L, 0x155a565eL, 0x18197087L, 0x1cd86d30L,
-   0x029f3d35L, 0x065e2082L, 0x0b1d065bL, 0x0fdc1becL,
-   0x3793a651L, 0x3352bbe6L, 0x3e119d3fL, 0x3ad08088L,
-   0x2497d08dL, 0x2056cd3aL, 0x2d15ebe3L, 0x29d4f654L,
-   0xc5a92679L, 0xc1683bceL, 0xcc2b1d17L, 0xc8ea00a0L,
-   0xd6ad50a5L, 0xd26c4d12L, 0xdf2f6bcbL, 0xdbee767cL,
-   0xe3a1cbc1L, 0xe760d676L, 0xea23f0afL, 0xeee2ed18L,
-   0xf0a5bd1dL, 0xf464a0aaL, 0xf9278673L, 0xfde69bc4L,
-   0x89b8fd09L, 0x8d79e0beL, 0x803ac667L, 0x84fbdbd0L,
-   0x9abc8bd5L, 0x9e7d9662L, 0x933eb0bbL, 0x97ffad0cL,
-   0xafb010b1L, 0xab710d06L, 0xa6322bdfL, 0xa2f33668L,
-   0xbcb4666dL, 0xb8757bdaL, 0xb5365d03L, 0xb1f740b4L
-};
-
-
-/*-------------------------------------------------------------*/
-/*--- end                                        crctable.c ---*/
-/*-------------------------------------------------------------*/
diff --git a/src/extra/bzip2/decompress.c b/src/extra/bzip2/decompress.c
deleted file mode 100644
index 10a33b4..0000000
--- a/src/extra/bzip2/decompress.c
+++ /dev/null
@@ -1,646 +0,0 @@
-
-/*-------------------------------------------------------------*/
-/*--- Decompression machinery                               ---*/
-/*---                                          decompress.c ---*/
-/*-------------------------------------------------------------*/
-
-/* ------------------------------------------------------------------
-   This file is part of bzip2/libbzip2, a program and library for
-   lossless, block-sorting data compression.
-
-   bzip2/libbzip2 version 1.0.6 of 6 September 2010
-   Copyright (C) 1996-2010 Julian Seward <jseward at bzip.org>
-
-   Please read the WARNING, DISCLAIMER and PATENTS sections in the 
-   README file.
-
-   This program is released under the terms of the license contained
-   in the file LICENSE.
-   ------------------------------------------------------------------ */
-
-
-#include "bzlib_private.h"
-
-
-/*---------------------------------------------------*/
-static
-void makeMaps_d ( DState* s )
-{
-   Int32 i;
-   s->nInUse = 0;
-   for (i = 0; i < 256; i++)
-      if (s->inUse[i]) {
-         s->seqToUnseq[s->nInUse] = i;
-         s->nInUse++;
-      }
-}
-
-
-/*---------------------------------------------------*/
-#define RETURN(rrr)                               \
-   { retVal = rrr; goto save_state_and_return; };
-
-#define GET_BITS(lll,vvv,nnn)                     \
-   case lll: s->state = lll;                      \
-   while (True) {                                 \
-      if (s->bsLive >= nnn) {                     \
-         UInt32 v;                                \
-         v = (s->bsBuff >>                        \
-             (s->bsLive-nnn)) & ((1 << nnn)-1);   \
-         s->bsLive -= nnn;                        \
-         vvv = v;                                 \
-         break;                                   \
-      }                                           \
-      if (s->strm->avail_in == 0) RETURN(BZ_OK);  \
-      s->bsBuff                                   \
-         = (s->bsBuff << 8) |                     \
-           ((UInt32)                              \
-              (*((UChar*)(s->strm->next_in))));   \
-      s->bsLive += 8;                             \
-      s->strm->next_in++;                         \
-      s->strm->avail_in--;                        \
-      s->strm->total_in_lo32++;                   \
-      if (s->strm->total_in_lo32 == 0)            \
-         s->strm->total_in_hi32++;                \
-   }
-
-#define GET_UCHAR(lll,uuu)                        \
-   GET_BITS(lll,uuu,8)
-
-#define GET_BIT(lll,uuu)                          \
-   GET_BITS(lll,uuu,1)
-
-/*---------------------------------------------------*/
-#define GET_MTF_VAL(label1,label2,lval)           \
-{                                                 \
-   if (groupPos == 0) {                           \
-      groupNo++;                                  \
-      if (groupNo >= nSelectors)                  \
-         RETURN(BZ_DATA_ERROR);                   \
-      groupPos = BZ_G_SIZE;                       \
-      gSel = s->selector[groupNo];                \
-      gMinlen = s->minLens[gSel];                 \
-      gLimit = &(s->limit[gSel][0]);              \
-      gPerm = &(s->perm[gSel][0]);                \
-      gBase = &(s->base[gSel][0]);                \
-   }                                              \
-   groupPos--;                                    \
-   zn = gMinlen;                                  \
-   GET_BITS(label1, zvec, zn);                    \
-   while (1) {                                    \
-      if (zn > 20 /* the longest code */)         \
-         RETURN(BZ_DATA_ERROR);                   \
-      if (zvec <= gLimit[zn]) break;              \
-      zn++;                                       \
-      GET_BIT(label2, zj);                        \
-      zvec = (zvec << 1) | zj;                    \
-   };                                             \
-   if (zvec - gBase[zn] < 0                       \
-       || zvec - gBase[zn] >= BZ_MAX_ALPHA_SIZE)  \
-      RETURN(BZ_DATA_ERROR);                      \
-   lval = gPerm[zvec - gBase[zn]];                \
-}
-
-
-/*---------------------------------------------------*/
-Int32 BZ2_decompress ( DState* s )
-{
-   UChar      uc;
-   Int32      retVal;
-   Int32      minLen, maxLen;
-   bz_stream* strm = s->strm;
-
-   /* stuff that needs to be saved/restored */
-   Int32  i;
-   Int32  j;
-   Int32  t;
-   Int32  alphaSize;
-   Int32  nGroups;
-   Int32  nSelectors;
-   Int32  EOB;
-   Int32  groupNo;
-   Int32  groupPos;
-   Int32  nextSym;
-   Int32  nblockMAX;
-   Int32  nblock;
-   Int32  es;
-   Int32  N;
-   Int32  curr;
-   Int32  zt;
-   Int32  zn; 
-   Int32  zvec;
-   Int32  zj;
-   Int32  gSel;
-   Int32  gMinlen;
-   Int32* gLimit;
-   Int32* gBase;
-   Int32* gPerm;
-
-   if (s->state == BZ_X_MAGIC_1) {
-      /*initialise the save area*/
-      s->save_i           = 0;
-      s->save_j           = 0;
-      s->save_t           = 0;
-      s->save_alphaSize   = 0;
-      s->save_nGroups     = 0;
-      s->save_nSelectors  = 0;
-      s->save_EOB         = 0;
-      s->save_groupNo     = 0;
-      s->save_groupPos    = 0;
-      s->save_nextSym     = 0;
-      s->save_nblockMAX   = 0;
-      s->save_nblock      = 0;
-      s->save_es          = 0;
-      s->save_N           = 0;
-      s->save_curr        = 0;
-      s->save_zt          = 0;
-      s->save_zn          = 0;
-      s->save_zvec        = 0;
-      s->save_zj          = 0;
-      s->save_gSel        = 0;
-      s->save_gMinlen     = 0;
-      s->save_gLimit      = NULL;
-      s->save_gBase       = NULL;
-      s->save_gPerm       = NULL;
-   }
-
-   /*restore from the save area*/
-   i           = s->save_i;
-   j           = s->save_j;
-   t           = s->save_t;
-   alphaSize   = s->save_alphaSize;
-   nGroups     = s->save_nGroups;
-   nSelectors  = s->save_nSelectors;
-   EOB         = s->save_EOB;
-   groupNo     = s->save_groupNo;
-   groupPos    = s->save_groupPos;
-   nextSym     = s->save_nextSym;
-   nblockMAX   = s->save_nblockMAX;
-   nblock      = s->save_nblock;
-   es          = s->save_es;
-   N           = s->save_N;
-   curr        = s->save_curr;
-   zt          = s->save_zt;
-   zn          = s->save_zn; 
-   zvec        = s->save_zvec;
-   zj          = s->save_zj;
-   gSel        = s->save_gSel;
-   gMinlen     = s->save_gMinlen;
-   gLimit      = s->save_gLimit;
-   gBase       = s->save_gBase;
-   gPerm       = s->save_gPerm;
-
-   retVal = BZ_OK;
-
-   switch (s->state) {
-
-      GET_UCHAR(BZ_X_MAGIC_1, uc);
-      if (uc != BZ_HDR_B) RETURN(BZ_DATA_ERROR_MAGIC);
-
-      GET_UCHAR(BZ_X_MAGIC_2, uc);
-      if (uc != BZ_HDR_Z) RETURN(BZ_DATA_ERROR_MAGIC);
-
-      GET_UCHAR(BZ_X_MAGIC_3, uc)
-      if (uc != BZ_HDR_h) RETURN(BZ_DATA_ERROR_MAGIC);
-
-      GET_BITS(BZ_X_MAGIC_4, s->blockSize100k, 8)
-      if (s->blockSize100k < (BZ_HDR_0 + 1) || 
-          s->blockSize100k > (BZ_HDR_0 + 9)) RETURN(BZ_DATA_ERROR_MAGIC);
-      s->blockSize100k -= BZ_HDR_0;
-
-      if (s->smallDecompress) {
-         s->ll16 = (UInt16*) BZALLOC( s->blockSize100k * 100000 * sizeof(UInt16) );
-         s->ll4  = (UChar *) BZALLOC( 
-		               ((1 + s->blockSize100k * 100000) >> 1) * sizeof(UChar) 
-		             );
-         if (s->ll16 == NULL || s->ll4 == NULL) RETURN(BZ_MEM_ERROR);
-      } else {
-         s->tt  = (UInt32 *) BZALLOC( s->blockSize100k * 100000 * sizeof(Int32) );
-         if (s->tt == NULL) RETURN(BZ_MEM_ERROR);
-      }
-
-      GET_UCHAR(BZ_X_BLKHDR_1, uc);
-
-      if (uc == 0x17) goto endhdr_2;
-      if (uc != 0x31) RETURN(BZ_DATA_ERROR);
-      GET_UCHAR(BZ_X_BLKHDR_2, uc);
-      if (uc != 0x41) RETURN(BZ_DATA_ERROR);
-      GET_UCHAR(BZ_X_BLKHDR_3, uc);
-      if (uc != 0x59) RETURN(BZ_DATA_ERROR);
-      GET_UCHAR(BZ_X_BLKHDR_4, uc);
-      if (uc != 0x26) RETURN(BZ_DATA_ERROR);
-      GET_UCHAR(BZ_X_BLKHDR_5, uc);
-      if (uc != 0x53) RETURN(BZ_DATA_ERROR);
-      GET_UCHAR(BZ_X_BLKHDR_6, uc);
-      if (uc != 0x59) RETURN(BZ_DATA_ERROR);
-
-      s->currBlockNo++;
-      if (s->verbosity >= 2)
-         VPrintf1 ( "\n    [%d: huff+mtf ", s->currBlockNo );
- 
-      s->storedBlockCRC = 0;
-      GET_UCHAR(BZ_X_BCRC_1, uc);
-      s->storedBlockCRC = (s->storedBlockCRC << 8) | ((UInt32)uc);
-      GET_UCHAR(BZ_X_BCRC_2, uc);
-      s->storedBlockCRC = (s->storedBlockCRC << 8) | ((UInt32)uc);
-      GET_UCHAR(BZ_X_BCRC_3, uc);
-      s->storedBlockCRC = (s->storedBlockCRC << 8) | ((UInt32)uc);
-      GET_UCHAR(BZ_X_BCRC_4, uc);
-      s->storedBlockCRC = (s->storedBlockCRC << 8) | ((UInt32)uc);
-
-      GET_BITS(BZ_X_RANDBIT, s->blockRandomised, 1);
-
-      s->origPtr = 0;
-      GET_UCHAR(BZ_X_ORIGPTR_1, uc);
-      s->origPtr = (s->origPtr << 8) | ((Int32)uc);
-      GET_UCHAR(BZ_X_ORIGPTR_2, uc);
-      s->origPtr = (s->origPtr << 8) | ((Int32)uc);
-      GET_UCHAR(BZ_X_ORIGPTR_3, uc);
-      s->origPtr = (s->origPtr << 8) | ((Int32)uc);
-
-      if (s->origPtr < 0)
-         RETURN(BZ_DATA_ERROR);
-      if (s->origPtr > 10 + 100000*s->blockSize100k) 
-         RETURN(BZ_DATA_ERROR);
-
-      /*--- Receive the mapping table ---*/
-      for (i = 0; i < 16; i++) {
-         GET_BIT(BZ_X_MAPPING_1, uc);
-         if (uc == 1) 
-            s->inUse16[i] = True; else 
-            s->inUse16[i] = False;
-      }
-
-      for (i = 0; i < 256; i++) s->inUse[i] = False;
-
-      for (i = 0; i < 16; i++)
-         if (s->inUse16[i])
-            for (j = 0; j < 16; j++) {
-               GET_BIT(BZ_X_MAPPING_2, uc);
-               if (uc == 1) s->inUse[i * 16 + j] = True;
-            }
-      makeMaps_d ( s );
-      if (s->nInUse == 0) RETURN(BZ_DATA_ERROR);
-      alphaSize = s->nInUse+2;
-
-      /*--- Now the selectors ---*/
-      GET_BITS(BZ_X_SELECTOR_1, nGroups, 3);
-      if (nGroups < 2 || nGroups > 6) RETURN(BZ_DATA_ERROR);
-      GET_BITS(BZ_X_SELECTOR_2, nSelectors, 15);
-      if (nSelectors < 1) RETURN(BZ_DATA_ERROR);
-      for (i = 0; i < nSelectors; i++) {
-         j = 0;
-         while (True) {
-            GET_BIT(BZ_X_SELECTOR_3, uc);
-            if (uc == 0) break;
-            j++;
-            if (j >= nGroups) RETURN(BZ_DATA_ERROR);
-         }
-         s->selectorMtf[i] = j;
-      }
-
-      /*--- Undo the MTF values for the selectors. ---*/
-      {
-         UChar pos[BZ_N_GROUPS], tmp, v;
-         for (v = 0; v < nGroups; v++) pos[v] = v;
-   
-         for (i = 0; i < nSelectors; i++) {
-            v = s->selectorMtf[i];
-            tmp = pos[v];
-            while (v > 0) { pos[v] = pos[v-1]; v--; }
-            pos[0] = tmp;
-            s->selector[i] = tmp;
-         }
-      }
-
-      /*--- Now the coding tables ---*/
-      for (t = 0; t < nGroups; t++) {
-         GET_BITS(BZ_X_CODING_1, curr, 5);
-         for (i = 0; i < alphaSize; i++) {
-            while (True) {
-               if (curr < 1 || curr > 20) RETURN(BZ_DATA_ERROR);
-               GET_BIT(BZ_X_CODING_2, uc);
-               if (uc == 0) break;
-               GET_BIT(BZ_X_CODING_3, uc);
-               if (uc == 0) curr++; else curr--;
-            }
-            s->len[t][i] = curr;
-         }
-      }
-
-      /*--- Create the Huffman decoding tables ---*/
-      for (t = 0; t < nGroups; t++) {
-         minLen = 32;
-         maxLen = 0;
-         for (i = 0; i < alphaSize; i++) {
-            if (s->len[t][i] > maxLen) maxLen = s->len[t][i];
-            if (s->len[t][i] < minLen) minLen = s->len[t][i];
-         }
-         BZ2_hbCreateDecodeTables ( 
-            &(s->limit[t][0]), 
-            &(s->base[t][0]), 
-            &(s->perm[t][0]), 
-            &(s->len[t][0]),
-            minLen, maxLen, alphaSize
-         );
-         s->minLens[t] = minLen;
-      }
-
-      /*--- Now the MTF values ---*/
-
-      EOB      = s->nInUse+1;
-      nblockMAX = 100000 * s->blockSize100k;
-      groupNo  = -1;
-      groupPos = 0;
-
-      for (i = 0; i <= 255; i++) s->unzftab[i] = 0;
-
-      /*-- MTF init --*/
-      {
-         Int32 ii, jj, kk;
-         kk = MTFA_SIZE-1;
-         for (ii = 256 / MTFL_SIZE - 1; ii >= 0; ii--) {
-            for (jj = MTFL_SIZE-1; jj >= 0; jj--) {
-               s->mtfa[kk] = (UChar)(ii * MTFL_SIZE + jj);
-               kk--;
-            }
-            s->mtfbase[ii] = kk + 1;
-         }
-      }
-      /*-- end MTF init --*/
-
-      nblock = 0;
-      GET_MTF_VAL(BZ_X_MTF_1, BZ_X_MTF_2, nextSym);
-
-      while (True) {
-
-         if (nextSym == EOB) break;
-
-         if (nextSym == BZ_RUNA || nextSym == BZ_RUNB) {
-
-            es = -1;
-            N = 1;
-            do {
-               /* Check that N doesn't get too big, so that es doesn't
-                  go negative.  The maximum value that can be
-                  RUNA/RUNB encoded is equal to the block size (post
-                  the initial RLE), viz, 900k, so bounding N at 2
-                  million should guard against overflow without
-                  rejecting any legitimate inputs. */
-               if (N >= 2*1024*1024) RETURN(BZ_DATA_ERROR);
-               if (nextSym == BZ_RUNA) es = es + (0+1) * N; else
-               if (nextSym == BZ_RUNB) es = es + (1+1) * N;
-               N = N * 2;
-               GET_MTF_VAL(BZ_X_MTF_3, BZ_X_MTF_4, nextSym);
-            }
-               while (nextSym == BZ_RUNA || nextSym == BZ_RUNB);
-
-            es++;
-            uc = s->seqToUnseq[ s->mtfa[s->mtfbase[0]] ];
-            s->unzftab[uc] += es;
-
-            if (s->smallDecompress)
-               while (es > 0) {
-                  if (nblock >= nblockMAX) RETURN(BZ_DATA_ERROR);
-                  s->ll16[nblock] = (UInt16)uc;
-                  nblock++;
-                  es--;
-               }
-            else
-               while (es > 0) {
-                  if (nblock >= nblockMAX) RETURN(BZ_DATA_ERROR);
-                  s->tt[nblock] = (UInt32)uc;
-                  nblock++;
-                  es--;
-               };
-
-            continue;
-
-         } else {
-
-            if (nblock >= nblockMAX) RETURN(BZ_DATA_ERROR);
-
-            /*-- uc = MTF ( nextSym-1 ) --*/
-            {
-               Int32 ii, jj, kk, pp, lno, off;
-               UInt32 nn;
-               nn = (UInt32)(nextSym - 1);
-
-               if (nn < MTFL_SIZE) {
-                  /* avoid general-case expense */
-                  pp = s->mtfbase[0];
-                  uc = s->mtfa[pp+nn];
-                  while (nn > 3) {
-                     Int32 z = pp+nn;
-                     s->mtfa[(z)  ] = s->mtfa[(z)-1];
-                     s->mtfa[(z)-1] = s->mtfa[(z)-2];
-                     s->mtfa[(z)-2] = s->mtfa[(z)-3];
-                     s->mtfa[(z)-3] = s->mtfa[(z)-4];
-                     nn -= 4;
-                  }
-                  while (nn > 0) { 
-                     s->mtfa[(pp+nn)] = s->mtfa[(pp+nn)-1]; nn--; 
-                  };
-                  s->mtfa[pp] = uc;
-               } else { 
-                  /* general case */
-                  lno = nn / MTFL_SIZE;
-                  off = nn % MTFL_SIZE;
-                  pp = s->mtfbase[lno] + off;
-                  uc = s->mtfa[pp];
-                  while (pp > s->mtfbase[lno]) { 
-                     s->mtfa[pp] = s->mtfa[pp-1]; pp--; 
-                  };
-                  s->mtfbase[lno]++;
-                  while (lno > 0) {
-                     s->mtfbase[lno]--;
-                     s->mtfa[s->mtfbase[lno]] 
-                        = s->mtfa[s->mtfbase[lno-1] + MTFL_SIZE - 1];
-                     lno--;
-                  }
-                  s->mtfbase[0]--;
-                  s->mtfa[s->mtfbase[0]] = uc;
-                  if (s->mtfbase[0] == 0) {
-                     kk = MTFA_SIZE-1;
-                     for (ii = 256 / MTFL_SIZE-1; ii >= 0; ii--) {
-                        for (jj = MTFL_SIZE-1; jj >= 0; jj--) {
-                           s->mtfa[kk] = s->mtfa[s->mtfbase[ii] + jj];
-                           kk--;
-                        }
-                        s->mtfbase[ii] = kk + 1;
-                     }
-                  }
-               }
-            }
-            /*-- end uc = MTF ( nextSym-1 ) --*/
-
-            s->unzftab[s->seqToUnseq[uc]]++;
-            if (s->smallDecompress)
-               s->ll16[nblock] = (UInt16)(s->seqToUnseq[uc]); else
-               s->tt[nblock]   = (UInt32)(s->seqToUnseq[uc]);
-            nblock++;
-
-            GET_MTF_VAL(BZ_X_MTF_5, BZ_X_MTF_6, nextSym);
-            continue;
-         }
-      }
-
-      /* Now we know what nblock is, we can do a better sanity
-         check on s->origPtr.
-      */
-      if (s->origPtr < 0 || s->origPtr >= nblock)
-         RETURN(BZ_DATA_ERROR);
-
-      /*-- Set up cftab to facilitate generation of T^(-1) --*/
-      /* Check: unzftab entries in range. */
-      for (i = 0; i <= 255; i++) {
-         if (s->unzftab[i] < 0 || s->unzftab[i] > nblock)
-            RETURN(BZ_DATA_ERROR);
-      }
-      /* Actually generate cftab. */
-      s->cftab[0] = 0;
-      for (i = 1; i <= 256; i++) s->cftab[i] = s->unzftab[i-1];
-      for (i = 1; i <= 256; i++) s->cftab[i] += s->cftab[i-1];
-      /* Check: cftab entries in range. */
-      for (i = 0; i <= 256; i++) {
-         if (s->cftab[i] < 0 || s->cftab[i] > nblock) {
-            /* s->cftab[i] can legitimately be == nblock */
-            RETURN(BZ_DATA_ERROR);
-         }
-      }
-      /* Check: cftab entries non-descending. */
-      for (i = 1; i <= 256; i++) {
-         if (s->cftab[i-1] > s->cftab[i]) {
-            RETURN(BZ_DATA_ERROR);
-         }
-      }
-
-      s->state_out_len = 0;
-      s->state_out_ch  = 0;
-      BZ_INITIALISE_CRC ( s->calculatedBlockCRC );
-      s->state = BZ_X_OUTPUT;
-      if (s->verbosity >= 2) VPrintf0 ( "rt+rld" );
-
-      if (s->smallDecompress) {
-
-         /*-- Make a copy of cftab, used in generation of T --*/
-         for (i = 0; i <= 256; i++) s->cftabCopy[i] = s->cftab[i];
-
-         /*-- compute the T vector --*/
-         for (i = 0; i < nblock; i++) {
-            uc = (UChar)(s->ll16[i]);
-            SET_LL(i, s->cftabCopy[uc]);
-            s->cftabCopy[uc]++;
-         }
-
-         /*-- Compute T^(-1) by pointer reversal on T --*/
-         i = s->origPtr;
-         j = GET_LL(i);
-         do {
-            Int32 tmp = GET_LL(j);
-            SET_LL(j, i);
-            i = j;
-            j = tmp;
-         }
-            while (i != s->origPtr);
-
-         s->tPos = s->origPtr;
-         s->nblock_used = 0;
-         if (s->blockRandomised) {
-            BZ_RAND_INIT_MASK;
-            BZ_GET_SMALL(s->k0); s->nblock_used++;
-            BZ_RAND_UPD_MASK; s->k0 ^= BZ_RAND_MASK; 
-         } else {
-            BZ_GET_SMALL(s->k0); s->nblock_used++;
-         }
-
-      } else {
-
-         /*-- compute the T^(-1) vector --*/
-         for (i = 0; i < nblock; i++) {
-            uc = (UChar)(s->tt[i] & 0xff);
-            s->tt[s->cftab[uc]] |= (i << 8);
-            s->cftab[uc]++;
-         }
-
-         s->tPos = s->tt[s->origPtr] >> 8;
-         s->nblock_used = 0;
-         if (s->blockRandomised) {
-            BZ_RAND_INIT_MASK;
-            BZ_GET_FAST(s->k0); s->nblock_used++;
-            BZ_RAND_UPD_MASK; s->k0 ^= BZ_RAND_MASK; 
-         } else {
-            BZ_GET_FAST(s->k0); s->nblock_used++;
-         }
-
-      }
-
-      RETURN(BZ_OK);
-
-
-
-    endhdr_2:
-
-      GET_UCHAR(BZ_X_ENDHDR_2, uc);
-      if (uc != 0x72) RETURN(BZ_DATA_ERROR);
-      GET_UCHAR(BZ_X_ENDHDR_3, uc);
-      if (uc != 0x45) RETURN(BZ_DATA_ERROR);
-      GET_UCHAR(BZ_X_ENDHDR_4, uc);
-      if (uc != 0x38) RETURN(BZ_DATA_ERROR);
-      GET_UCHAR(BZ_X_ENDHDR_5, uc);
-      if (uc != 0x50) RETURN(BZ_DATA_ERROR);
-      GET_UCHAR(BZ_X_ENDHDR_6, uc);
-      if (uc != 0x90) RETURN(BZ_DATA_ERROR);
-
-      s->storedCombinedCRC = 0;
-      GET_UCHAR(BZ_X_CCRC_1, uc);
-      s->storedCombinedCRC = (s->storedCombinedCRC << 8) | ((UInt32)uc);
-      GET_UCHAR(BZ_X_CCRC_2, uc);
-      s->storedCombinedCRC = (s->storedCombinedCRC << 8) | ((UInt32)uc);
-      GET_UCHAR(BZ_X_CCRC_3, uc);
-      s->storedCombinedCRC = (s->storedCombinedCRC << 8) | ((UInt32)uc);
-      GET_UCHAR(BZ_X_CCRC_4, uc);
-      s->storedCombinedCRC = (s->storedCombinedCRC << 8) | ((UInt32)uc);
-
-      s->state = BZ_X_IDLE;
-      RETURN(BZ_STREAM_END);
-
-      default: AssertH ( False, 4001 );
-   }
-
-   AssertH ( False, 4002 );
-
-   save_state_and_return:
-
-   s->save_i           = i;
-   s->save_j           = j;
-   s->save_t           = t;
-   s->save_alphaSize   = alphaSize;
-   s->save_nGroups     = nGroups;
-   s->save_nSelectors  = nSelectors;
-   s->save_EOB         = EOB;
-   s->save_groupNo     = groupNo;
-   s->save_groupPos    = groupPos;
-   s->save_nextSym     = nextSym;
-   s->save_nblockMAX   = nblockMAX;
-   s->save_nblock      = nblock;
-   s->save_es          = es;
-   s->save_N           = N;
-   s->save_curr        = curr;
-   s->save_zt          = zt;
-   s->save_zn          = zn;
-   s->save_zvec        = zvec;
-   s->save_zj          = zj;
-   s->save_gSel        = gSel;
-   s->save_gMinlen     = gMinlen;
-   s->save_gLimit      = gLimit;
-   s->save_gBase       = gBase;
-   s->save_gPerm       = gPerm;
-
-   return retVal;   
-}
-
-
-/*-------------------------------------------------------------*/
-/*--- end                                      decompress.c ---*/
-/*-------------------------------------------------------------*/
diff --git a/src/extra/bzip2/huffman.c b/src/extra/bzip2/huffman.c
deleted file mode 100644
index 2283fdb..0000000
--- a/src/extra/bzip2/huffman.c
+++ /dev/null
@@ -1,205 +0,0 @@
-
-/*-------------------------------------------------------------*/
-/*--- Huffman coding low-level stuff                        ---*/
-/*---                                             huffman.c ---*/
-/*-------------------------------------------------------------*/
-
-/* ------------------------------------------------------------------
-   This file is part of bzip2/libbzip2, a program and library for
-   lossless, block-sorting data compression.
-
-   bzip2/libbzip2 version 1.0.6 of 6 September 2010
-   Copyright (C) 1996-2010 Julian Seward <jseward at bzip.org>
-
-   Please read the WARNING, DISCLAIMER and PATENTS sections in the 
-   README file.
-
-   This program is released under the terms of the license contained
-   in the file LICENSE.
-   ------------------------------------------------------------------ */
-
-
-#include "bzlib_private.h"
-
-/*---------------------------------------------------*/
-#define WEIGHTOF(zz0)  ((zz0) & 0xffffff00)
-#define DEPTHOF(zz1)   ((zz1) & 0x000000ff)
-#define MYMAX(zz2,zz3) ((zz2) > (zz3) ? (zz2) : (zz3))
-
-#define ADDWEIGHTS(zw1,zw2)                           \
-   (WEIGHTOF(zw1)+WEIGHTOF(zw2)) |                    \
-   (1 + MYMAX(DEPTHOF(zw1),DEPTHOF(zw2)))
-
-#define UPHEAP(z)                                     \
-{                                                     \
-   Int32 zz, tmp;                                     \
-   zz = z; tmp = heap[zz];                            \
-   while (weight[tmp] < weight[heap[zz >> 1]]) {      \
-      heap[zz] = heap[zz >> 1];                       \
-      zz >>= 1;                                       \
-   }                                                  \
-   heap[zz] = tmp;                                    \
-}
-
-#define DOWNHEAP(z)                                   \
-{                                                     \
-   Int32 zz, yy, tmp;                                 \
-   zz = z; tmp = heap[zz];                            \
-   while (True) {                                     \
-      yy = zz << 1;                                   \
-      if (yy > nHeap) break;                          \
-      if (yy < nHeap &&                               \
-          weight[heap[yy+1]] < weight[heap[yy]])      \
-         yy++;                                        \
-      if (weight[tmp] < weight[heap[yy]]) break;      \
-      heap[zz] = heap[yy];                            \
-      zz = yy;                                        \
-   }                                                  \
-   heap[zz] = tmp;                                    \
-}
-
-
-/*---------------------------------------------------*/
-void BZ2_hbMakeCodeLengths ( UChar *len, 
-                             Int32 *freq,
-                             Int32 alphaSize,
-                             Int32 maxLen )
-{
-   /*--
-      Nodes and heap entries run from 1.  Entry 0
-      for both the heap and nodes is a sentinel.
-   --*/
-   Int32 nNodes, nHeap, n1, n2, i, j, k;
-   Bool  tooLong;
-
-   Int32 heap   [ BZ_MAX_ALPHA_SIZE + 2 ];
-   Int32 weight [ BZ_MAX_ALPHA_SIZE * 2 ];
-   Int32 parent [ BZ_MAX_ALPHA_SIZE * 2 ]; 
-
-   for (i = 0; i < alphaSize; i++)
-      weight[i+1] = (freq[i] == 0 ? 1 : freq[i]) << 8;
-
-   while (True) {
-
-      nNodes = alphaSize;
-      nHeap = 0;
-
-      heap[0] = 0;
-      weight[0] = 0;
-      parent[0] = -2;
-
-      for (i = 1; i <= alphaSize; i++) {
-         parent[i] = -1;
-         nHeap++;
-         heap[nHeap] = i;
-         UPHEAP(nHeap);
-      }
-
-      AssertH( nHeap < (BZ_MAX_ALPHA_SIZE+2), 2001 );
-   
-      while (nHeap > 1) {
-         n1 = heap[1]; heap[1] = heap[nHeap]; nHeap--; DOWNHEAP(1);
-         n2 = heap[1]; heap[1] = heap[nHeap]; nHeap--; DOWNHEAP(1);
-         nNodes++;
-         parent[n1] = parent[n2] = nNodes;
-         weight[nNodes] = ADDWEIGHTS(weight[n1], weight[n2]);
-         parent[nNodes] = -1;
-         nHeap++;
-         heap[nHeap] = nNodes;
-         UPHEAP(nHeap);
-      }
-
-      AssertH( nNodes < (BZ_MAX_ALPHA_SIZE * 2), 2002 );
-
-      tooLong = False;
-      for (i = 1; i <= alphaSize; i++) {
-         j = 0;
-         k = i;
-         while (parent[k] >= 0) { k = parent[k]; j++; }
-         len[i-1] = j;
-         if (j > maxLen) tooLong = True;
-      }
-      
-      if (! tooLong) break;
-
-      /* 17 Oct 04: keep-going condition for the following loop used
-         to be 'i < alphaSize', which missed the last element,
-         theoretically leading to the possibility of the compressor
-         looping.  However, this count-scaling step is only needed if
-         one of the generated Huffman code words is longer than
-         maxLen, which up to and including version 1.0.2 was 20 bits,
-         which is extremely unlikely.  In version 1.0.3 maxLen was
-         changed to 17 bits, which has minimal effect on compression
-         ratio, but does mean this scaling step is used from time to
-         time, enough to verify that it works.
-
-         This means that bzip2-1.0.3 and later will only produce
-         Huffman codes with a maximum length of 17 bits.  However, in
-         order to preserve backwards compatibility with bitstreams
-         produced by versions pre-1.0.3, the decompressor must still
-         handle lengths of up to 20. */
-
-      for (i = 1; i <= alphaSize; i++) {
-         j = weight[i] >> 8;
-         j = 1 + (j / 2);
-         weight[i] = j << 8;
-      }
-   }
-}
-
-
-/*---------------------------------------------------*/
-void BZ2_hbAssignCodes ( Int32 *code,
-                         UChar *length,
-                         Int32 minLen,
-                         Int32 maxLen,
-                         Int32 alphaSize )
-{
-   Int32 n, vec, i;
-
-   vec = 0;
-   for (n = minLen; n <= maxLen; n++) {
-      for (i = 0; i < alphaSize; i++)
-         if (length[i] == n) { code[i] = vec; vec++; };
-      vec <<= 1;
-   }
-}
-
-
-/*---------------------------------------------------*/
-void BZ2_hbCreateDecodeTables ( Int32 *limit,
-                                Int32 *base,
-                                Int32 *perm,
-                                UChar *length,
-                                Int32 minLen,
-                                Int32 maxLen,
-                                Int32 alphaSize )
-{
-   Int32 pp, i, j, vec;
-
-   pp = 0;
-   for (i = minLen; i <= maxLen; i++)
-      for (j = 0; j < alphaSize; j++)
-         if (length[j] == i) { perm[pp] = j; pp++; };
-
-   for (i = 0; i < BZ_MAX_CODE_LEN; i++) base[i] = 0;
-   for (i = 0; i < alphaSize; i++) base[length[i]+1]++;
-
-   for (i = 1; i < BZ_MAX_CODE_LEN; i++) base[i] += base[i-1];
-
-   for (i = 0; i < BZ_MAX_CODE_LEN; i++) limit[i] = 0;
-   vec = 0;
-
-   for (i = minLen; i <= maxLen; i++) {
-      vec += (base[i+1] - base[i]);
-      limit[i] = vec-1;
-      vec <<= 1;
-   }
-   for (i = minLen + 1; i <= maxLen; i++)
-      base[i] = ((limit[i-1] + 1) << 1) - base[i];
-}
-
-
-/*-------------------------------------------------------------*/
-/*--- end                                         huffman.c ---*/
-/*-------------------------------------------------------------*/
diff --git a/src/extra/bzip2/randtable.c b/src/extra/bzip2/randtable.c
deleted file mode 100644
index 6d62459..0000000
--- a/src/extra/bzip2/randtable.c
+++ /dev/null
@@ -1,84 +0,0 @@
-
-/*-------------------------------------------------------------*/
-/*--- Table for randomising repetitive blocks               ---*/
-/*---                                           randtable.c ---*/
-/*-------------------------------------------------------------*/
-
-/* ------------------------------------------------------------------
-   This file is part of bzip2/libbzip2, a program and library for
-   lossless, block-sorting data compression.
-
-   bzip2/libbzip2 version 1.0.6 of 6 September 2010
-   Copyright (C) 1996-2010 Julian Seward <jseward at bzip.org>
-
-   Please read the WARNING, DISCLAIMER and PATENTS sections in the 
-   README file.
-
-   This program is released under the terms of the license contained
-   in the file LICENSE.
-   ------------------------------------------------------------------ */
-
-
-#include "bzlib_private.h"
-
-
-/*---------------------------------------------*/
-Int32 BZ2_rNums[512] = { 
-   619, 720, 127, 481, 931, 816, 813, 233, 566, 247, 
-   985, 724, 205, 454, 863, 491, 741, 242, 949, 214, 
-   733, 859, 335, 708, 621, 574, 73, 654, 730, 472, 
-   419, 436, 278, 496, 867, 210, 399, 680, 480, 51, 
-   878, 465, 811, 169, 869, 675, 611, 697, 867, 561, 
-   862, 687, 507, 283, 482, 129, 807, 591, 733, 623, 
-   150, 238, 59, 379, 684, 877, 625, 169, 643, 105, 
-   170, 607, 520, 932, 727, 476, 693, 425, 174, 647, 
-   73, 122, 335, 530, 442, 853, 695, 249, 445, 515, 
-   909, 545, 703, 919, 874, 474, 882, 500, 594, 612, 
-   641, 801, 220, 162, 819, 984, 589, 513, 495, 799, 
-   161, 604, 958, 533, 221, 400, 386, 867, 600, 782, 
-   382, 596, 414, 171, 516, 375, 682, 485, 911, 276, 
-   98, 553, 163, 354, 666, 933, 424, 341, 533, 870, 
-   227, 730, 475, 186, 263, 647, 537, 686, 600, 224, 
-   469, 68, 770, 919, 190, 373, 294, 822, 808, 206, 
-   184, 943, 795, 384, 383, 461, 404, 758, 839, 887, 
-   715, 67, 618, 276, 204, 918, 873, 777, 604, 560, 
-   951, 160, 578, 722, 79, 804, 96, 409, 713, 940, 
-   652, 934, 970, 447, 318, 353, 859, 672, 112, 785, 
-   645, 863, 803, 350, 139, 93, 354, 99, 820, 908, 
-   609, 772, 154, 274, 580, 184, 79, 626, 630, 742, 
-   653, 282, 762, 623, 680, 81, 927, 626, 789, 125, 
-   411, 521, 938, 300, 821, 78, 343, 175, 128, 250, 
-   170, 774, 972, 275, 999, 639, 495, 78, 352, 126, 
-   857, 956, 358, 619, 580, 124, 737, 594, 701, 612, 
-   669, 112, 134, 694, 363, 992, 809, 743, 168, 974, 
-   944, 375, 748, 52, 600, 747, 642, 182, 862, 81, 
-   344, 805, 988, 739, 511, 655, 814, 334, 249, 515, 
-   897, 955, 664, 981, 649, 113, 974, 459, 893, 228, 
-   433, 837, 553, 268, 926, 240, 102, 654, 459, 51, 
-   686, 754, 806, 760, 493, 403, 415, 394, 687, 700, 
-   946, 670, 656, 610, 738, 392, 760, 799, 887, 653, 
-   978, 321, 576, 617, 626, 502, 894, 679, 243, 440, 
-   680, 879, 194, 572, 640, 724, 926, 56, 204, 700, 
-   707, 151, 457, 449, 797, 195, 791, 558, 945, 679, 
-   297, 59, 87, 824, 713, 663, 412, 693, 342, 606, 
-   134, 108, 571, 364, 631, 212, 174, 643, 304, 329, 
-   343, 97, 430, 751, 497, 314, 983, 374, 822, 928, 
-   140, 206, 73, 263, 980, 736, 876, 478, 430, 305, 
-   170, 514, 364, 692, 829, 82, 855, 953, 676, 246, 
-   369, 970, 294, 750, 807, 827, 150, 790, 288, 923, 
-   804, 378, 215, 828, 592, 281, 565, 555, 710, 82, 
-   896, 831, 547, 261, 524, 462, 293, 465, 502, 56, 
-   661, 821, 976, 991, 658, 869, 905, 758, 745, 193, 
-   768, 550, 608, 933, 378, 286, 215, 979, 792, 961, 
-   61, 688, 793, 644, 986, 403, 106, 366, 905, 644, 
-   372, 567, 466, 434, 645, 210, 389, 550, 919, 135, 
-   780, 773, 635, 389, 707, 100, 626, 958, 165, 504, 
-   920, 176, 193, 713, 857, 265, 203, 50, 668, 108, 
-   645, 990, 626, 197, 510, 357, 358, 850, 858, 364, 
-   936, 638
-};
-
-
-/*-------------------------------------------------------------*/
-/*--- end                                       randtable.c ---*/
-/*-------------------------------------------------------------*/
diff --git a/src/extra/graphapp/Makefile.win b/src/extra/graphapp/Makefile.win
index 3a48412..026043f 100644
--- a/src/extra/graphapp/Makefile.win
+++ b/src/extra/graphapp/Makefile.win
@@ -45,7 +45,7 @@ distclean: clean
 
 # Dependencies
 dllversion.o: ../../include/Rversion.h
-DEPS=$(SOURCES:.c=.d)
+DEPS = $(SOURCES:.c=.d)
 
 makeMakedeps: $(DEPS)
 	@$(RM) Makedeps
diff --git a/src/extra/graphapp/clipboard.c b/src/extra/graphapp/clipboard.c
index 54bba86..8a25a78 100644
--- a/src/extra/graphapp/clipboard.c
+++ b/src/extra/graphapp/clipboard.c
@@ -14,7 +14,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  */
 
 /*
diff --git a/src/extra/graphapp/dialogs.c b/src/extra/graphapp/dialogs.c
index a95115e..da8a848 100644
--- a/src/extra/graphapp/dialogs.c
+++ b/src/extra/graphapp/dialogs.c
@@ -302,6 +302,7 @@ wchar_t *askfilenamesW(const wchar_t *title, const wchar_t *default_name,
     HWND prev = GetFocus();
 
     if (!default_name) default_name = L"";
+    memset(wcsbuf, 0, sizeof(wcsbuf));
     wcscpy(wcsbuf, default_name);
     GetCurrentDirectory(MAX_PATH, cwd);
     if (!strcmp(cod, "")) {
diff --git a/src/extra/graphapp/dllversion.rc b/src/extra/graphapp/dllversion.rc
index e35ad4a..1521574 100644
--- a/src/extra/graphapp/dllversion.rc
+++ b/src/extra/graphapp/dllversion.rc
@@ -16,7 +16,7 @@ BEGIN
             VALUE "FileVersion", R_MAJOR "." R_MINOR " " R_STATUS " (" R_YEAR "-" R_MONTH "-" R_DAY ")\0"
             VALUE "LegalCopyright", "R Core Team 1995-" R_YEAR "\0"
             VALUE "R Version", R_MAJOR "." R_MINOR " " R_STATUS " (" R_YEAR "-" R_MONTH "-" R_DAY ")\0"
-            VALUE "Project info", "http://www.r-project.org\0"
+            VALUE "Project info", "https://www.r-project.org\0"
         END
     END
     BLOCK "VarFileInfo"
diff --git a/src/extra/graphapp/ga.h b/src/extra/graphapp/ga.h
index aa17be5..3704d2f 100644
--- a/src/extra/graphapp/ga.h
+++ b/src/extra/graphapp/ga.h
@@ -17,7 +17,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  */
 
 /*
diff --git a/src/extra/graphapp/gdraw.c b/src/extra/graphapp/gdraw.c
index 6d57149..c026f4f 100644
--- a/src/extra/graphapp/gdraw.c
+++ b/src/extra/graphapp/gdraw.c
@@ -15,7 +15,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  */
 
 /*
diff --git a/src/extra/graphapp/gimage.c b/src/extra/graphapp/gimage.c
index 9df1470..21189c6 100644
--- a/src/extra/graphapp/gimage.c
+++ b/src/extra/graphapp/gimage.c
@@ -14,7 +14,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  */
 
 /*
diff --git a/src/extra/graphapp/gmenus.c b/src/extra/graphapp/gmenus.c
index 9ee7ff8..1ea0e35 100644
--- a/src/extra/graphapp/gmenus.c
+++ b/src/extra/graphapp/gmenus.c
@@ -15,7 +15,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  */
 
 /*
diff --git a/src/extra/graphapp/metafile.c b/src/extra/graphapp/metafile.c
index 2000285..4525ef2 100644
--- a/src/extra/graphapp/metafile.c
+++ b/src/extra/graphapp/metafile.c
@@ -14,7 +14,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  */
 
 /*
diff --git a/src/extra/graphapp/printer.c b/src/extra/graphapp/printer.c
index 8b2fcd1..cc87e18 100644
--- a/src/extra/graphapp/printer.c
+++ b/src/extra/graphapp/printer.c
@@ -14,7 +14,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  */
 
 /* Support for printer
diff --git a/src/extra/graphapp/rgb.c b/src/extra/graphapp/rgb.c
index 27b5e90..72ef474 100644
--- a/src/extra/graphapp/rgb.c
+++ b/src/extra/graphapp/rgb.c
@@ -14,7 +14,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  */
 
 /*
diff --git a/src/extra/graphapp/status.c b/src/extra/graphapp/status.c
index 65382e9..a7140e5 100644
--- a/src/extra/graphapp/status.c
+++ b/src/extra/graphapp/status.c
@@ -14,7 +14,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  */
 
 /*
diff --git a/src/extra/graphapp/tooltips.c b/src/extra/graphapp/tooltips.c
index e575eac..02108ad 100644
--- a/src/extra/graphapp/tooltips.c
+++ b/src/extra/graphapp/tooltips.c
@@ -14,7 +14,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  */
 
 /*
diff --git a/src/extra/intl/Makefile.in b/src/extra/intl/Makefile.in
index 85ef6e5..213e7e0 100644
--- a/src/extra/intl/Makefile.in
+++ b/src/extra/intl/Makefile.in
@@ -56,8 +56,8 @@ Makedeps: Makefile $(DEPENDS)
 	@touch $@
 
 libintl.a: $(libintl_a_OBJECTS)
-	rm -f $@
-	$(AR) cr $@ $(libintl_a_OBJECTS)
+	@rm -f $@
+	$(AR) -cr $@ $(libintl_a_OBJECTS)
 	$(RANLIB) $@
 
 headers: libgnuintl.h
diff --git a/src/extra/intl/R_changes b/src/extra/intl/R_changes
index 5bc26ce..9d90514 100644
--- a/src/extra/intl/R_changes
+++ b/src/extra/intl/R_changes
@@ -18,7 +18,7 @@ Various small changes were made to avoid warnings.
 
 BDR
 
-One more change for Mac OS X: the locale detection is simply off-loaded
+One more change for macOS: the locale detection is simply off-loaded
 to locale2charset, because the built-in detection in gettext doesn't work.
 This also ensures that R and gettext are in sync wrt the charset used.
 
diff --git a/src/extra/intl/dcigettext.c b/src/extra/intl/dcigettext.c
index cf96b18..60ec090 100644
--- a/src/extra/intl/dcigettext.c
+++ b/src/extra/intl/dcigettext.c
@@ -23,6 +23,8 @@
 # define _GNU_SOURCE	1
 #endif
 
+/* R comment: not true for our config.h, which does define _GNU_SOURCE */
+
 #ifdef HAVE_CONFIG_H
 # include <config.h>
 #endif
diff --git a/src/extra/intl/plural.c b/src/extra/intl/plural.c
index 819bb7c..7a46707 100644
--- a/src/extra/intl/plural.c
+++ b/src/extra/intl/plural.c
@@ -1299,7 +1299,7 @@ int yynerrs;
   yyssp++;
 
  yysetstate:
-  *yyssp = yystate;
+  *yyssp = (yytype_int16) yystate;
 
   if (yyss + yystacksize - 1 <= yyssp)
     {
diff --git a/src/extra/pcre/LICENCE b/src/extra/pcre/LICENCE
deleted file mode 100644
index 602e4ae..0000000
--- a/src/extra/pcre/LICENCE
+++ /dev/null
@@ -1,92 +0,0 @@
-PCRE LICENCE
-------------
-
-PCRE is a library of functions to support regular expressions whose syntax
-and semantics are as close as possible to those of the Perl 5 language.
-
-Release 8 of PCRE is distributed under the terms of the "BSD" licence, as
-specified below. The documentation for PCRE, supplied in the "doc"
-directory, is distributed under the same terms as the software itself.
-
-The basic library functions are written in C and are freestanding. Also
-included in the distribution is a set of C++ wrapper functions, and a
-just-in-time compiler that can be used to optimize pattern matching. These
-are both optional features that can be omitted when the library is built.
-
-
-THE BASIC LIBRARY FUNCTIONS
----------------------------
-
-Written by:       Philip Hazel
-Email local part: ph10
-Email domain:     cam.ac.uk
-
-University of Cambridge Computing Service,
-Cambridge, England.
-
-Copyright (c) 1997-2014 University of Cambridge
-All rights reserved.
-
-
-PCRE JUST-IN-TIME COMPILATION SUPPORT
--------------------------------------
-
-Written by:       Zoltan Herczeg
-Email local part: hzmester
-Emain domain:     freemail.hu
-
-Copyright(c) 2010-2014 Zoltan Herczeg
-All rights reserved.
-
-
-STACK-LESS JUST-IN-TIME COMPILER
---------------------------------
-
-Written by:       Zoltan Herczeg
-Email local part: hzmester
-Emain domain:     freemail.hu
-
-Copyright(c) 2009-2014 Zoltan Herczeg
-All rights reserved.
-
-
-THE C++ WRAPPER FUNCTIONS
--------------------------
-
-Contributed by:   Google Inc.
-
-Copyright (c) 2007-2012, Google Inc.
-All rights reserved.
-
-
-THE "BSD" LICENCE
------------------
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are met:
-
-    * Redistributions of source code must retain the above copyright notice,
-      this list of conditions and the following disclaimer.
-
-    * Redistributions in binary form must reproduce the above copyright
-      notice, this list of conditions and the following disclaimer in the
-      documentation and/or other materials provided with the distribution.
-
-    * Neither the name of the University of Cambridge nor the name of Google
-      Inc. nor the names of their contributors may be used to endorse or
-      promote products derived from this software without specific prior
-      written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
-LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-POSSIBILITY OF SUCH DAMAGE.
-
-End
diff --git a/src/extra/pcre/Makefile.in b/src/extra/pcre/Makefile.in
deleted file mode 100644
index e1c227c..0000000
--- a/src/extra/pcre/Makefile.in
+++ /dev/null
@@ -1,82 +0,0 @@
-#
-# ${R_HOME}/src/extra/pcre/Makefile
-
-VPATH = @srcdir@
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
-
-top_builddir = ../../..
-subdir = src/extra/pcre
-R_HOME = $(top_builddir)
-
-include $(top_builddir)/Makeconf
-
-PCRE_CPPFLAGS = -I$(srcdir)
-ALL_CPPFLAGS = $(PCRE_CPPFLAGS) $(R_XTRA_CPPFLAGS) $(CPPFLAGS) $(DEFS)
-
-SOURCES = pcre_chartables.c pcre_compile.c pcre_config.c pcre_exec.c \
-	pcre_fullinfo.c pcre_get.c pcre_globals.c pcre_jit_compile.c \
-	pcre_maketables.c pcre_newline.c pcre_ord2utf8.c pcre_refcount.c \
-	pcre_study.c pcre_tables.c pcre_ucd.c \
-	pcre_valid_utf8.c pcre_version.c pcre_xclass.c
-
-HEADERS = pcre_internal.h pcre.h ucp.h
-DEPENDS = $(SOURCES:.c=.d)
-OBJECTS = $(SOURCES:.c=.o)
- at WANT_R_SHLIB_TRUE@ALL_CFLAGS = $(ALL_CFLAGS_LO) @C_VISIBILITY@
-
-distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
-DISTFILES = LICENCE Makefile.in Makefile.win R_changes \
-  $(SOURCES) $(HEADERS)
-
-SUBDIRS_WITH_NO_BUILD = sljit
-
-
-noinst_LIBRARIES = @BUILD_PCRE_TRUE@ libpcre.a
-libpcre_a_SOURCES = $(SOURCES)
-libpcre_a_OBJECTS = $(OBJECTS)
-
-
-all: R
-
-Makefile: $(srcdir)/Makefile.in \
-  $(top_builddir)/config.status \
-  $(SOURCES)
-	@cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
-
-Makedeps: Makefile $(DEPENDS)
-	@cat $(DEPENDS) >> Makefile
-	@touch $@
-
-R: Makefile
-	@$(MAKE) Makedeps
-	@BUILD_PCRE_TRUE@ @$(MAKE) $(noinst_LIBRARIES)
-
-libpcre.a: $(libpcre_a_OBJECTS)
-	rm -f $@
-	$(AR) cr $@ $(libpcre_a_OBJECTS)
-	$(RANLIB) $@
-
-mostlyclean: clean
-clean:
-	@-rm -f Makedeps *.d *.o *.lo *.a
-distclean: clean
-	@-rm -f Makefile
-maintainer-clean: distclean
-
-install install-strip uninstall TAGS info dvi check:
-
-distdir: $(DISTFILES)
-	@for f in $(DISTFILES); do \
-	  test -f $(distdir)/$${f} \
-	    || ln $(srcdir)/$${f} $(distdir)/$${f} 2>/dev/null \
-	    || cp -p $(srcdir)/$${f} $(distdir)/$${f}; \
-	done
-	@for d in $(SUBDIRS_WITH_NO_BUILD); do \
-	  ((cd $(srcdir); $(TAR) -c -f - --exclude=.svn --exclude=CVS $${d}) \
-	      | (cd $(distdir); $(TAR) -x -f -)) \
-	    || exit 1; \
-	done
-
-## Automagically generated dependencies:
-
diff --git a/src/extra/pcre/Makefile.win b/src/extra/pcre/Makefile.win
deleted file mode 100644
index 5cb60db..0000000
--- a/src/extra/pcre/Makefile.win
+++ /dev/null
@@ -1,34 +0,0 @@
-#-*- Makefile -*-
-include ../../gnuwin32/MkRules
-
-DEFS=-DWIN32 -DPCRE_STATIC
-
-CPPFLAGS=-I../../include -I. $(DEFS)
-
-## done this way for parallel make
-all:
-	$(MAKE) -f Makefile.win makeMakedeps
-	$(MAKE) -f Makefile.win libpcre.a
-
-CSOURCES = pcre_chartables.c pcre_compile.c pcre_config.c pcre_exec.c \
-	pcre_fullinfo.c pcre_get.c pcre_globals.c pcre_jit_compile.c \
-	pcre_maketables.c pcre_newline.c pcre_ord2utf8.c pcre_refcount.c \
-	pcre_study.c pcre_tables.c pcre_ucd.c \
-	pcre_valid_utf8.c pcre_version.c pcre_xclass.c
-OBJS=$(CSOURCES:.c=.o)
-libpcre.a: $(OBJS)
-
-clean:
-	@$(RM) *.o *~ *.d Makedeps
-
-distclean: clean
-	@$(RM) libpcre.a
-
-# Dependencies
-DEPS=$(CSOURCES:.c=.d)
-
-makeMakedeps: $(DEPS)
-	@$(RM) Makedeps
-	@cat $(DEPS) >> Makedeps
-
--include Makedeps
diff --git a/src/extra/pcre/R_changes b/src/extra/pcre/R_changes
deleted file mode 100644
index 94c777f..0000000
--- a/src/extra/pcre/R_changes
+++ /dev/null
@@ -1,31 +0,0 @@
-pcre_internal.h includes the relevant definitions that configure would
-make.
-
---- pcre-7.9/pcre_internal.h	2009-04-11 09:21:17.000000000 +0100
-+++ ./pcre_internal.h	2009-06-13 10:45:35.000000000 +0100
-@@ -81,6 +81,24 @@
- #endif
- 
- 
-+/* Get the definitions provided by running "configure" */
-+
-+#include <config.h>
-+
-+/* and those that are not in R's configure */
-+#define HAVE_MEMMOVE 1
-+#ifndef LINK_SIZE
-+#define LINK_SIZE 2
-+#define MATCH_LIMIT 10000000
-+#define MATCH_LIMIT_RECURSION MATCH_LIMIT
-+#define MAX_NAME_COUNT 10000
-+#define MAX_NAME_SIZE 32
-+#define NEWLINE 10
-+#define POSIX_MALLOC_THRESHOLD 10
-+#define SUPPORT_UTF8
-+#define SUPPORT_UCP
-+#endif
-+
- /* Standard C headers plus the external interface definition. The only time
- setjmp and stdarg are used is when NO_RECURSE is set. */
-
-
diff --git a/src/extra/pcre/pcre.h b/src/extra/pcre/pcre.h
deleted file mode 100644
index ce4251c..0000000
--- a/src/extra/pcre/pcre.h
+++ /dev/null
@@ -1,677 +0,0 @@
-/*************************************************
-*       Perl-Compatible Regular Expressions      *
-*************************************************/
-
-/* This is the public header file for the PCRE library, to be #included by
-applications that call the PCRE functions.
-
-           Copyright (c) 1997-2014 University of Cambridge
-
------------------------------------------------------------------------------
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are met:
-
-    * Redistributions of source code must retain the above copyright notice,
-      this list of conditions and the following disclaimer.
-
-    * Redistributions in binary form must reproduce the above copyright
-      notice, this list of conditions and the following disclaimer in the
-      documentation and/or other materials provided with the distribution.
-
-    * Neither the name of the University of Cambridge nor the names of its
-      contributors may be used to endorse or promote products derived from
-      this software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
-LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-POSSIBILITY OF SUCH DAMAGE.
------------------------------------------------------------------------------
-*/
-
-#ifndef _PCRE_H
-#define _PCRE_H
-
-/* The current PCRE version information. */
-
-#define PCRE_MAJOR          8
-#define PCRE_MINOR          35
-#define PCRE_PRERELEASE     
-#define PCRE_DATE           2014-04-04
-
-/* When an application links to a PCRE DLL in Windows, the symbols that are
-imported have to be identified as such. When building PCRE, the appropriate
-export setting is defined in pcre_internal.h, which includes this file. So we
-don't change existing definitions of PCRE_EXP_DECL and PCRECPP_EXP_DECL. */
-
-#if defined(_WIN32) && !defined(PCRE_STATIC)
-#  ifndef PCRE_EXP_DECL
-#    define PCRE_EXP_DECL  extern __declspec(dllimport)
-#  endif
-#  ifdef __cplusplus
-#    ifndef PCRECPP_EXP_DECL
-#      define PCRECPP_EXP_DECL  extern __declspec(dllimport)
-#    endif
-#    ifndef PCRECPP_EXP_DEFN
-#      define PCRECPP_EXP_DEFN  __declspec(dllimport)
-#    endif
-#  endif
-#endif
-
-/* By default, we use the standard "extern" declarations. */
-
-#ifndef PCRE_EXP_DECL
-#  ifdef __cplusplus
-#    define PCRE_EXP_DECL  extern "C"
-#  else
-#    define PCRE_EXP_DECL  extern
-#  endif
-#endif
-
-#ifdef __cplusplus
-#  ifndef PCRECPP_EXP_DECL
-#    define PCRECPP_EXP_DECL  extern
-#  endif
-#  ifndef PCRECPP_EXP_DEFN
-#    define PCRECPP_EXP_DEFN
-#  endif
-#endif
-
-/* Have to include stdlib.h in order to ensure that size_t is defined;
-it is needed here for malloc. */
-
-#include <stdlib.h>
-
-/* Allow for C++ users */
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/* Public options. Some are compile-time only, some are run-time only, and some
-are both. Most of the compile-time options are saved with the compiled regex so
-that they can be inspected during studying (and therefore JIT compiling). Note
-that pcre_study() has its own set of options. Originally, all the options
-defined here used distinct bits. However, almost all the bits in a 32-bit word
-are now used, so in order to conserve them, option bits that were previously
-only recognized at matching time (i.e. by pcre_exec() or pcre_dfa_exec()) may
-also be used for compile-time options that affect only compiling and are not
-relevant for studying or JIT compiling.
-
-Some options for pcre_compile() change its behaviour but do not affect the
-behaviour of the execution functions. Other options are passed through to the
-execution functions and affect their behaviour, with or without affecting the
-behaviour of pcre_compile().
-
-Options that can be passed to pcre_compile() are tagged Cx below, with these
-variants:
-
-C1   Affects compile only
-C2   Does not affect compile; affects exec, dfa_exec
-C3   Affects compile, exec, dfa_exec
-C4   Affects compile, exec, dfa_exec, study
-C5   Affects compile, exec, study
-
-Options that can be set for pcre_exec() and/or pcre_dfa_exec() are flagged with
-E and D, respectively. They take precedence over C3, C4, and C5 settings passed
-from pcre_compile(). Those that are compatible with JIT execution are flagged
-with J. */
-
-#define PCRE_CASELESS           0x00000001  /* C1       */
-#define PCRE_MULTILINE          0x00000002  /* C1       */
-#define PCRE_DOTALL             0x00000004  /* C1       */
-#define PCRE_EXTENDED           0x00000008  /* C1       */
-#define PCRE_ANCHORED           0x00000010  /* C4 E D   */
-#define PCRE_DOLLAR_ENDONLY     0x00000020  /* C2       */
-#define PCRE_EXTRA              0x00000040  /* C1       */
-#define PCRE_NOTBOL             0x00000080  /*    E D J */
-#define PCRE_NOTEOL             0x00000100  /*    E D J */
-#define PCRE_UNGREEDY           0x00000200  /* C1       */
-#define PCRE_NOTEMPTY           0x00000400  /*    E D J */
-#define PCRE_UTF8               0x00000800  /* C4        )          */
-#define PCRE_UTF16              0x00000800  /* C4        ) Synonyms */
-#define PCRE_UTF32              0x00000800  /* C4        )          */
-#define PCRE_NO_AUTO_CAPTURE    0x00001000  /* C1       */
-#define PCRE_NO_UTF8_CHECK      0x00002000  /* C1 E D J  )          */
-#define PCRE_NO_UTF16_CHECK     0x00002000  /* C1 E D J  ) Synonyms */
-#define PCRE_NO_UTF32_CHECK     0x00002000  /* C1 E D J  )          */
-#define PCRE_AUTO_CALLOUT       0x00004000  /* C1       */
-#define PCRE_PARTIAL_SOFT       0x00008000  /*    E D J  ) Synonyms */
-#define PCRE_PARTIAL            0x00008000  /*    E D J  )          */
-
-/* This pair use the same bit. */
-#define PCRE_NEVER_UTF          0x00010000  /* C1        ) Overlaid */
-#define PCRE_DFA_SHORTEST       0x00010000  /*      D    ) Overlaid */
-
-/* This pair use the same bit. */
-#define PCRE_NO_AUTO_POSSESS    0x00020000  /* C1        ) Overlaid */
-#define PCRE_DFA_RESTART        0x00020000  /*      D    ) Overlaid */
-
-#define PCRE_FIRSTLINE          0x00040000  /* C3       */
-#define PCRE_DUPNAMES           0x00080000  /* C1       */
-#define PCRE_NEWLINE_CR         0x00100000  /* C3 E D   */
-#define PCRE_NEWLINE_LF         0x00200000  /* C3 E D   */
-#define PCRE_NEWLINE_CRLF       0x00300000  /* C3 E D   */
-#define PCRE_NEWLINE_ANY        0x00400000  /* C3 E D   */
-#define PCRE_NEWLINE_ANYCRLF    0x00500000  /* C3 E D   */
-#define PCRE_BSR_ANYCRLF        0x00800000  /* C3 E D   */
-#define PCRE_BSR_UNICODE        0x01000000  /* C3 E D   */
-#define PCRE_JAVASCRIPT_COMPAT  0x02000000  /* C5       */
-#define PCRE_NO_START_OPTIMIZE  0x04000000  /* C2 E D    ) Synonyms */
-#define PCRE_NO_START_OPTIMISE  0x04000000  /* C2 E D    )          */
-#define PCRE_PARTIAL_HARD       0x08000000  /*    E D J */
-#define PCRE_NOTEMPTY_ATSTART   0x10000000  /*    E D J */
-#define PCRE_UCP                0x20000000  /* C3       */
-
-/* Exec-time and get/set-time error codes */
-
-#define PCRE_ERROR_NOMATCH          (-1)
-#define PCRE_ERROR_NULL             (-2)
-#define PCRE_ERROR_BADOPTION        (-3)
-#define PCRE_ERROR_BADMAGIC         (-4)
-#define PCRE_ERROR_UNKNOWN_OPCODE   (-5)
-#define PCRE_ERROR_UNKNOWN_NODE     (-5)  /* For backward compatibility */
-#define PCRE_ERROR_NOMEMORY         (-6)
-#define PCRE_ERROR_NOSUBSTRING      (-7)
-#define PCRE_ERROR_MATCHLIMIT       (-8)
-#define PCRE_ERROR_CALLOUT          (-9)  /* Never used by PCRE itself */
-#define PCRE_ERROR_BADUTF8         (-10)  /* Same for 8/16/32 */
-#define PCRE_ERROR_BADUTF16        (-10)  /* Same for 8/16/32 */
-#define PCRE_ERROR_BADUTF32        (-10)  /* Same for 8/16/32 */
-#define PCRE_ERROR_BADUTF8_OFFSET  (-11)  /* Same for 8/16 */
-#define PCRE_ERROR_BADUTF16_OFFSET (-11)  /* Same for 8/16 */
-#define PCRE_ERROR_PARTIAL         (-12)
-#define PCRE_ERROR_BADPARTIAL      (-13)
-#define PCRE_ERROR_INTERNAL        (-14)
-#define PCRE_ERROR_BADCOUNT        (-15)
-#define PCRE_ERROR_DFA_UITEM       (-16)
-#define PCRE_ERROR_DFA_UCOND       (-17)
-#define PCRE_ERROR_DFA_UMLIMIT     (-18)
-#define PCRE_ERROR_DFA_WSSIZE      (-19)
-#define PCRE_ERROR_DFA_RECURSE     (-20)
-#define PCRE_ERROR_RECURSIONLIMIT  (-21)
-#define PCRE_ERROR_NULLWSLIMIT     (-22)  /* No longer actually used */
-#define PCRE_ERROR_BADNEWLINE      (-23)
-#define PCRE_ERROR_BADOFFSET       (-24)
-#define PCRE_ERROR_SHORTUTF8       (-25)
-#define PCRE_ERROR_SHORTUTF16      (-25)  /* Same for 8/16 */
-#define PCRE_ERROR_RECURSELOOP     (-26)
-#define PCRE_ERROR_JIT_STACKLIMIT  (-27)
-#define PCRE_ERROR_BADMODE         (-28)
-#define PCRE_ERROR_BADENDIANNESS   (-29)
-#define PCRE_ERROR_DFA_BADRESTART  (-30)
-#define PCRE_ERROR_JIT_BADOPTION   (-31)
-#define PCRE_ERROR_BADLENGTH       (-32)
-#define PCRE_ERROR_UNSET           (-33)
-
-/* Specific error codes for UTF-8 validity checks */
-
-#define PCRE_UTF8_ERR0               0
-#define PCRE_UTF8_ERR1               1
-#define PCRE_UTF8_ERR2               2
-#define PCRE_UTF8_ERR3               3
-#define PCRE_UTF8_ERR4               4
-#define PCRE_UTF8_ERR5               5
-#define PCRE_UTF8_ERR6               6
-#define PCRE_UTF8_ERR7               7
-#define PCRE_UTF8_ERR8               8
-#define PCRE_UTF8_ERR9               9
-#define PCRE_UTF8_ERR10             10
-#define PCRE_UTF8_ERR11             11
-#define PCRE_UTF8_ERR12             12
-#define PCRE_UTF8_ERR13             13
-#define PCRE_UTF8_ERR14             14
-#define PCRE_UTF8_ERR15             15
-#define PCRE_UTF8_ERR16             16
-#define PCRE_UTF8_ERR17             17
-#define PCRE_UTF8_ERR18             18
-#define PCRE_UTF8_ERR19             19
-#define PCRE_UTF8_ERR20             20
-#define PCRE_UTF8_ERR21             21
-#define PCRE_UTF8_ERR22             22  /* Unused (was non-character) */
-
-/* Specific error codes for UTF-16 validity checks */
-
-#define PCRE_UTF16_ERR0              0
-#define PCRE_UTF16_ERR1              1
-#define PCRE_UTF16_ERR2              2
-#define PCRE_UTF16_ERR3              3
-#define PCRE_UTF16_ERR4              4  /* Unused (was non-character) */
-
-/* Specific error codes for UTF-32 validity checks */
-
-#define PCRE_UTF32_ERR0              0
-#define PCRE_UTF32_ERR1              1
-#define PCRE_UTF32_ERR2              2  /* Unused (was non-character) */
-#define PCRE_UTF32_ERR3              3
-
-/* Request types for pcre_fullinfo() */
-
-#define PCRE_INFO_OPTIONS            0
-#define PCRE_INFO_SIZE               1
-#define PCRE_INFO_CAPTURECOUNT       2
-#define PCRE_INFO_BACKREFMAX         3
-#define PCRE_INFO_FIRSTBYTE          4
-#define PCRE_INFO_FIRSTCHAR          4  /* For backwards compatibility */
-#define PCRE_INFO_FIRSTTABLE         5
-#define PCRE_INFO_LASTLITERAL        6
-#define PCRE_INFO_NAMEENTRYSIZE      7
-#define PCRE_INFO_NAMECOUNT          8
-#define PCRE_INFO_NAMETABLE          9
-#define PCRE_INFO_STUDYSIZE         10
-#define PCRE_INFO_DEFAULT_TABLES    11
-#define PCRE_INFO_OKPARTIAL         12
-#define PCRE_INFO_JCHANGED          13
-#define PCRE_INFO_HASCRORLF         14
-#define PCRE_INFO_MINLENGTH         15
-#define PCRE_INFO_JIT               16
-#define PCRE_INFO_JITSIZE           17
-#define PCRE_INFO_MAXLOOKBEHIND     18
-#define PCRE_INFO_FIRSTCHARACTER    19
-#define PCRE_INFO_FIRSTCHARACTERFLAGS 20
-#define PCRE_INFO_REQUIREDCHAR      21
-#define PCRE_INFO_REQUIREDCHARFLAGS 22
-#define PCRE_INFO_MATCHLIMIT        23
-#define PCRE_INFO_RECURSIONLIMIT    24
-#define PCRE_INFO_MATCH_EMPTY       25
-
-/* Request types for pcre_config(). Do not re-arrange, in order to remain
-compatible. */
-
-#define PCRE_CONFIG_UTF8                    0
-#define PCRE_CONFIG_NEWLINE                 1
-#define PCRE_CONFIG_LINK_SIZE               2
-#define PCRE_CONFIG_POSIX_MALLOC_THRESHOLD  3
-#define PCRE_CONFIG_MATCH_LIMIT             4
-#define PCRE_CONFIG_STACKRECURSE            5
-#define PCRE_CONFIG_UNICODE_PROPERTIES      6
-#define PCRE_CONFIG_MATCH_LIMIT_RECURSION   7
-#define PCRE_CONFIG_BSR                     8
-#define PCRE_CONFIG_JIT                     9
-#define PCRE_CONFIG_UTF16                  10
-#define PCRE_CONFIG_JITTARGET              11
-#define PCRE_CONFIG_UTF32                  12
-#define PCRE_CONFIG_PARENS_LIMIT           13
-
-/* Request types for pcre_study(). Do not re-arrange, in order to remain
-compatible. */
-
-#define PCRE_STUDY_JIT_COMPILE                0x0001
-#define PCRE_STUDY_JIT_PARTIAL_SOFT_COMPILE   0x0002
-#define PCRE_STUDY_JIT_PARTIAL_HARD_COMPILE   0x0004
-#define PCRE_STUDY_EXTRA_NEEDED               0x0008
-
-/* Bit flags for the pcre[16|32]_extra structure. Do not re-arrange or redefine
-these bits, just add new ones on the end, in order to remain compatible. */
-
-#define PCRE_EXTRA_STUDY_DATA             0x0001
-#define PCRE_EXTRA_MATCH_LIMIT            0x0002
-#define PCRE_EXTRA_CALLOUT_DATA           0x0004
-#define PCRE_EXTRA_TABLES                 0x0008
-#define PCRE_EXTRA_MATCH_LIMIT_RECURSION  0x0010
-#define PCRE_EXTRA_MARK                   0x0020
-#define PCRE_EXTRA_EXECUTABLE_JIT         0x0040
-
-/* Types */
-
-struct real_pcre;                 /* declaration; the definition is private  */
-typedef struct real_pcre pcre;
-
-struct real_pcre16;               /* declaration; the definition is private  */
-typedef struct real_pcre16 pcre16;
-
-struct real_pcre32;               /* declaration; the definition is private  */
-typedef struct real_pcre32 pcre32;
-
-struct real_pcre_jit_stack;       /* declaration; the definition is private  */
-typedef struct real_pcre_jit_stack pcre_jit_stack;
-
-struct real_pcre16_jit_stack;     /* declaration; the definition is private  */
-typedef struct real_pcre16_jit_stack pcre16_jit_stack;
-
-struct real_pcre32_jit_stack;     /* declaration; the definition is private  */
-typedef struct real_pcre32_jit_stack pcre32_jit_stack;
-
-/* If PCRE is compiled with 16 bit character support, PCRE_UCHAR16 must contain
-a 16 bit wide signed data type. Otherwise it can be a dummy data type since
-pcre16 functions are not implemented. There is a check for this in pcre_internal.h. */
-#ifndef PCRE_UCHAR16
-#define PCRE_UCHAR16 unsigned short
-#endif
-
-#ifndef PCRE_SPTR16
-#define PCRE_SPTR16 const PCRE_UCHAR16 *
-#endif
-
-/* If PCRE is compiled with 32 bit character support, PCRE_UCHAR32 must contain
-a 32 bit wide signed data type. Otherwise it can be a dummy data type since
-pcre32 functions are not implemented. There is a check for this in pcre_internal.h. */
-#ifndef PCRE_UCHAR32
-#define PCRE_UCHAR32 unsigned int
-#endif
-
-#ifndef PCRE_SPTR32
-#define PCRE_SPTR32 const PCRE_UCHAR32 *
-#endif
-
-/* When PCRE is compiled as a C++ library, the subject pointer type can be
-replaced with a custom type. For conventional use, the public interface is a
-const char *. */
-
-#ifndef PCRE_SPTR
-#define PCRE_SPTR const char *
-#endif
-
-/* The structure for passing additional data to pcre_exec(). This is defined in
-such as way as to be extensible. Always add new fields at the end, in order to
-remain compatible. */
-
-typedef struct pcre_extra {
-  unsigned long int flags;        /* Bits for which fields are set */
-  void *study_data;               /* Opaque data from pcre_study() */
-  unsigned long int match_limit;  /* Maximum number of calls to match() */
-  void *callout_data;             /* Data passed back in callouts */
-  const unsigned char *tables;    /* Pointer to character tables */
-  unsigned long int match_limit_recursion; /* Max recursive calls to match() */
-  unsigned char **mark;           /* For passing back a mark pointer */
-  void *executable_jit;           /* Contains a pointer to a compiled jit code */
-} pcre_extra;
-
-/* Same structure as above, but with 16 bit char pointers. */
-
-typedef struct pcre16_extra {
-  unsigned long int flags;        /* Bits for which fields are set */
-  void *study_data;               /* Opaque data from pcre_study() */
-  unsigned long int match_limit;  /* Maximum number of calls to match() */
-  void *callout_data;             /* Data passed back in callouts */
-  const unsigned char *tables;    /* Pointer to character tables */
-  unsigned long int match_limit_recursion; /* Max recursive calls to match() */
-  PCRE_UCHAR16 **mark;            /* For passing back a mark pointer */
-  void *executable_jit;           /* Contains a pointer to a compiled jit code */
-} pcre16_extra;
-
-/* Same structure as above, but with 32 bit char pointers. */
-
-typedef struct pcre32_extra {
-  unsigned long int flags;        /* Bits for which fields are set */
-  void *study_data;               /* Opaque data from pcre_study() */
-  unsigned long int match_limit;  /* Maximum number of calls to match() */
-  void *callout_data;             /* Data passed back in callouts */
-  const unsigned char *tables;    /* Pointer to character tables */
-  unsigned long int match_limit_recursion; /* Max recursive calls to match() */
-  PCRE_UCHAR32 **mark;            /* For passing back a mark pointer */
-  void *executable_jit;           /* Contains a pointer to a compiled jit code */
-} pcre32_extra;
-
-/* The structure for passing out data via the pcre_callout_function. We use a
-structure so that new fields can be added on the end in future versions,
-without changing the API of the function, thereby allowing old clients to work
-without modification. */
-
-typedef struct pcre_callout_block {
-  int          version;           /* Identifies version of block */
-  /* ------------------------ Version 0 ------------------------------- */
-  int          callout_number;    /* Number compiled into pattern */
-  int         *offset_vector;     /* The offset vector */
-  PCRE_SPTR    subject;           /* The subject being matched */
-  int          subject_length;    /* The length of the subject */
-  int          start_match;       /* Offset to start of this match attempt */
-  int          current_position;  /* Where we currently are in the subject */
-  int          capture_top;       /* Max current capture */
-  int          capture_last;      /* Most recently closed capture */
-  void        *callout_data;      /* Data passed in with the call */
-  /* ------------------- Added for Version 1 -------------------------- */
-  int          pattern_position;  /* Offset to next item in the pattern */
-  int          next_item_length;  /* Length of next item in the pattern */
-  /* ------------------- Added for Version 2 -------------------------- */
-  const unsigned char *mark;      /* Pointer to current mark or NULL    */
-  /* ------------------------------------------------------------------ */
-} pcre_callout_block;
-
-/* Same structure as above, but with 16 bit char pointers. */
-
-typedef struct pcre16_callout_block {
-  int          version;           /* Identifies version of block */
-  /* ------------------------ Version 0 ------------------------------- */
-  int          callout_number;    /* Number compiled into pattern */
-  int         *offset_vector;     /* The offset vector */
-  PCRE_SPTR16  subject;           /* The subject being matched */
-  int          subject_length;    /* The length of the subject */
-  int          start_match;       /* Offset to start of this match attempt */
-  int          current_position;  /* Where we currently are in the subject */
-  int          capture_top;       /* Max current capture */
-  int          capture_last;      /* Most recently closed capture */
-  void        *callout_data;      /* Data passed in with the call */
-  /* ------------------- Added for Version 1 -------------------------- */
-  int          pattern_position;  /* Offset to next item in the pattern */
-  int          next_item_length;  /* Length of next item in the pattern */
-  /* ------------------- Added for Version 2 -------------------------- */
-  const PCRE_UCHAR16 *mark;       /* Pointer to current mark or NULL    */
-  /* ------------------------------------------------------------------ */
-} pcre16_callout_block;
-
-/* Same structure as above, but with 32 bit char pointers. */
-
-typedef struct pcre32_callout_block {
-  int          version;           /* Identifies version of block */
-  /* ------------------------ Version 0 ------------------------------- */
-  int          callout_number;    /* Number compiled into pattern */
-  int         *offset_vector;     /* The offset vector */
-  PCRE_SPTR32  subject;           /* The subject being matched */
-  int          subject_length;    /* The length of the subject */
-  int          start_match;       /* Offset to start of this match attempt */
-  int          current_position;  /* Where we currently are in the subject */
-  int          capture_top;       /* Max current capture */
-  int          capture_last;      /* Most recently closed capture */
-  void        *callout_data;      /* Data passed in with the call */
-  /* ------------------- Added for Version 1 -------------------------- */
-  int          pattern_position;  /* Offset to next item in the pattern */
-  int          next_item_length;  /* Length of next item in the pattern */
-  /* ------------------- Added for Version 2 -------------------------- */
-  const PCRE_UCHAR32 *mark;       /* Pointer to current mark or NULL    */
-  /* ------------------------------------------------------------------ */
-} pcre32_callout_block;
-
-/* Indirection for store get and free functions. These can be set to
-alternative malloc/free functions if required. Special ones are used in the
-non-recursive case for "frames". There is also an optional callout function
-that is triggered by the (?) regex item. For Virtual Pascal, these definitions
-have to take another form. */
-
-#ifndef VPCOMPAT
-PCRE_EXP_DECL void *(*pcre_malloc)(size_t);
-PCRE_EXP_DECL void  (*pcre_free)(void *);
-PCRE_EXP_DECL void *(*pcre_stack_malloc)(size_t);
-PCRE_EXP_DECL void  (*pcre_stack_free)(void *);
-PCRE_EXP_DECL int   (*pcre_callout)(pcre_callout_block *);
-PCRE_EXP_DECL int   (*pcre_stack_guard)(void);
-
-PCRE_EXP_DECL void *(*pcre16_malloc)(size_t);
-PCRE_EXP_DECL void  (*pcre16_free)(void *);
-PCRE_EXP_DECL void *(*pcre16_stack_malloc)(size_t);
-PCRE_EXP_DECL void  (*pcre16_stack_free)(void *);
-PCRE_EXP_DECL int   (*pcre16_callout)(pcre16_callout_block *);
-PCRE_EXP_DECL int   (*pcre16_stack_guard)(void);
-
-PCRE_EXP_DECL void *(*pcre32_malloc)(size_t);
-PCRE_EXP_DECL void  (*pcre32_free)(void *);
-PCRE_EXP_DECL void *(*pcre32_stack_malloc)(size_t);
-PCRE_EXP_DECL void  (*pcre32_stack_free)(void *);
-PCRE_EXP_DECL int   (*pcre32_callout)(pcre32_callout_block *);
-PCRE_EXP_DECL int   (*pcre32_stack_guard)(void);
-#else   /* VPCOMPAT */
-PCRE_EXP_DECL void *pcre_malloc(size_t);
-PCRE_EXP_DECL void  pcre_free(void *);
-PCRE_EXP_DECL void *pcre_stack_malloc(size_t);
-PCRE_EXP_DECL void  pcre_stack_free(void *);
-PCRE_EXP_DECL int   pcre_callout(pcre_callout_block *);
-PCRE_EXP_DECL int   pcre_stack_guard(void);
-
-PCRE_EXP_DECL void *pcre16_malloc(size_t);
-PCRE_EXP_DECL void  pcre16_free(void *);
-PCRE_EXP_DECL void *pcre16_stack_malloc(size_t);
-PCRE_EXP_DECL void  pcre16_stack_free(void *);
-PCRE_EXP_DECL int   pcre16_callout(pcre16_callout_block *);
-PCRE_EXP_DECL int   pcre16_stack_guard(void);
-
-PCRE_EXP_DECL void *pcre32_malloc(size_t);
-PCRE_EXP_DECL void  pcre32_free(void *);
-PCRE_EXP_DECL void *pcre32_stack_malloc(size_t);
-PCRE_EXP_DECL void  pcre32_stack_free(void *);
-PCRE_EXP_DECL int   pcre32_callout(pcre32_callout_block *);
-PCRE_EXP_DECL int   pcre32_stack_guard(void);
-#endif  /* VPCOMPAT */
-
-/* User defined callback which provides a stack just before the match starts. */
-
-typedef pcre_jit_stack *(*pcre_jit_callback)(void *);
-typedef pcre16_jit_stack *(*pcre16_jit_callback)(void *);
-typedef pcre32_jit_stack *(*pcre32_jit_callback)(void *);
-
-/* Exported PCRE functions */
-
-PCRE_EXP_DECL pcre *pcre_compile(const char *, int, const char **, int *,
-                  const unsigned char *);
-PCRE_EXP_DECL pcre16 *pcre16_compile(PCRE_SPTR16, int, const char **, int *,
-                  const unsigned char *);
-PCRE_EXP_DECL pcre32 *pcre32_compile(PCRE_SPTR32, int, const char **, int *,
-                  const unsigned char *);
-PCRE_EXP_DECL pcre *pcre_compile2(const char *, int, int *, const char **,
-                  int *, const unsigned char *);
-PCRE_EXP_DECL pcre16 *pcre16_compile2(PCRE_SPTR16, int, int *, const char **,
-                  int *, const unsigned char *);
-PCRE_EXP_DECL pcre32 *pcre32_compile2(PCRE_SPTR32, int, int *, const char **,
-                  int *, const unsigned char *);
-PCRE_EXP_DECL int  pcre_config(int, void *);
-PCRE_EXP_DECL int  pcre16_config(int, void *);
-PCRE_EXP_DECL int  pcre32_config(int, void *);
-PCRE_EXP_DECL int  pcre_copy_named_substring(const pcre *, const char *,
-                  int *, int, const char *, char *, int);
-PCRE_EXP_DECL int  pcre16_copy_named_substring(const pcre16 *, PCRE_SPTR16,
-                  int *, int, PCRE_SPTR16, PCRE_UCHAR16 *, int);
-PCRE_EXP_DECL int  pcre32_copy_named_substring(const pcre32 *, PCRE_SPTR32,
-                  int *, int, PCRE_SPTR32, PCRE_UCHAR32 *, int);
-PCRE_EXP_DECL int  pcre_copy_substring(const char *, int *, int, int,
-                  char *, int);
-PCRE_EXP_DECL int  pcre16_copy_substring(PCRE_SPTR16, int *, int, int,
-                  PCRE_UCHAR16 *, int);
-PCRE_EXP_DECL int  pcre32_copy_substring(PCRE_SPTR32, int *, int, int,
-                  PCRE_UCHAR32 *, int);
-PCRE_EXP_DECL int  pcre_dfa_exec(const pcre *, const pcre_extra *,
-                  const char *, int, int, int, int *, int , int *, int);
-PCRE_EXP_DECL int  pcre16_dfa_exec(const pcre16 *, const pcre16_extra *,
-                  PCRE_SPTR16, int, int, int, int *, int , int *, int);
-PCRE_EXP_DECL int  pcre32_dfa_exec(const pcre32 *, const pcre32_extra *,
-                  PCRE_SPTR32, int, int, int, int *, int , int *, int);
-PCRE_EXP_DECL int  pcre_exec(const pcre *, const pcre_extra *, PCRE_SPTR,
-                   int, int, int, int *, int);
-PCRE_EXP_DECL int  pcre16_exec(const pcre16 *, const pcre16_extra *,
-                   PCRE_SPTR16, int, int, int, int *, int);
-PCRE_EXP_DECL int  pcre32_exec(const pcre32 *, const pcre32_extra *,
-                   PCRE_SPTR32, int, int, int, int *, int);
-PCRE_EXP_DECL int  pcre_jit_exec(const pcre *, const pcre_extra *,
-                   PCRE_SPTR, int, int, int, int *, int,
-                   pcre_jit_stack *);
-PCRE_EXP_DECL int  pcre16_jit_exec(const pcre16 *, const pcre16_extra *,
-                   PCRE_SPTR16, int, int, int, int *, int,
-                   pcre16_jit_stack *);
-PCRE_EXP_DECL int  pcre32_jit_exec(const pcre32 *, const pcre32_extra *,
-                   PCRE_SPTR32, int, int, int, int *, int,
-                   pcre32_jit_stack *);
-PCRE_EXP_DECL void pcre_free_substring(const char *);
-PCRE_EXP_DECL void pcre16_free_substring(PCRE_SPTR16);
-PCRE_EXP_DECL void pcre32_free_substring(PCRE_SPTR32);
-PCRE_EXP_DECL void pcre_free_substring_list(const char **);
-PCRE_EXP_DECL void pcre16_free_substring_list(PCRE_SPTR16 *);
-PCRE_EXP_DECL void pcre32_free_substring_list(PCRE_SPTR32 *);
-PCRE_EXP_DECL int  pcre_fullinfo(const pcre *, const pcre_extra *, int,
-                  void *);
-PCRE_EXP_DECL int  pcre16_fullinfo(const pcre16 *, const pcre16_extra *, int,
-                  void *);
-PCRE_EXP_DECL int  pcre32_fullinfo(const pcre32 *, const pcre32_extra *, int,
-                  void *);
-PCRE_EXP_DECL int  pcre_get_named_substring(const pcre *, const char *,
-                  int *, int, const char *, const char **);
-PCRE_EXP_DECL int  pcre16_get_named_substring(const pcre16 *, PCRE_SPTR16,
-                  int *, int, PCRE_SPTR16, PCRE_SPTR16 *);
-PCRE_EXP_DECL int  pcre32_get_named_substring(const pcre32 *, PCRE_SPTR32,
-                  int *, int, PCRE_SPTR32, PCRE_SPTR32 *);
-PCRE_EXP_DECL int  pcre_get_stringnumber(const pcre *, const char *);
-PCRE_EXP_DECL int  pcre16_get_stringnumber(const pcre16 *, PCRE_SPTR16);
-PCRE_EXP_DECL int  pcre32_get_stringnumber(const pcre32 *, PCRE_SPTR32);
-PCRE_EXP_DECL int  pcre_get_stringtable_entries(const pcre *, const char *,
-                  char **, char **);
-PCRE_EXP_DECL int  pcre16_get_stringtable_entries(const pcre16 *, PCRE_SPTR16,
-                  PCRE_UCHAR16 **, PCRE_UCHAR16 **);
-PCRE_EXP_DECL int  pcre32_get_stringtable_entries(const pcre32 *, PCRE_SPTR32,
-                  PCRE_UCHAR32 **, PCRE_UCHAR32 **);
-PCRE_EXP_DECL int  pcre_get_substring(const char *, int *, int, int,
-                  const char **);
-PCRE_EXP_DECL int  pcre16_get_substring(PCRE_SPTR16, int *, int, int,
-                  PCRE_SPTR16 *);
-PCRE_EXP_DECL int  pcre32_get_substring(PCRE_SPTR32, int *, int, int,
-                  PCRE_SPTR32 *);
-PCRE_EXP_DECL int  pcre_get_substring_list(const char *, int *, int,
-                  const char ***);
-PCRE_EXP_DECL int  pcre16_get_substring_list(PCRE_SPTR16, int *, int,
-                  PCRE_SPTR16 **);
-PCRE_EXP_DECL int  pcre32_get_substring_list(PCRE_SPTR32, int *, int,
-                  PCRE_SPTR32 **);
-PCRE_EXP_DECL const unsigned char *pcre_maketables(void);
-PCRE_EXP_DECL const unsigned char *pcre16_maketables(void);
-PCRE_EXP_DECL const unsigned char *pcre32_maketables(void);
-PCRE_EXP_DECL int  pcre_refcount(pcre *, int);
-PCRE_EXP_DECL int  pcre16_refcount(pcre16 *, int);
-PCRE_EXP_DECL int  pcre32_refcount(pcre32 *, int);
-PCRE_EXP_DECL pcre_extra *pcre_study(const pcre *, int, const char **);
-PCRE_EXP_DECL pcre16_extra *pcre16_study(const pcre16 *, int, const char **);
-PCRE_EXP_DECL pcre32_extra *pcre32_study(const pcre32 *, int, const char **);
-PCRE_EXP_DECL void pcre_free_study(pcre_extra *);
-PCRE_EXP_DECL void pcre16_free_study(pcre16_extra *);
-PCRE_EXP_DECL void pcre32_free_study(pcre32_extra *);
-PCRE_EXP_DECL const char *pcre_version(void);
-PCRE_EXP_DECL const char *pcre16_version(void);
-PCRE_EXP_DECL const char *pcre32_version(void);
-
-/* Utility functions for byte order swaps. */
-PCRE_EXP_DECL int  pcre_pattern_to_host_byte_order(pcre *, pcre_extra *,
-                  const unsigned char *);
-PCRE_EXP_DECL int  pcre16_pattern_to_host_byte_order(pcre16 *, pcre16_extra *,
-                  const unsigned char *);
-PCRE_EXP_DECL int  pcre32_pattern_to_host_byte_order(pcre32 *, pcre32_extra *,
-                  const unsigned char *);
-PCRE_EXP_DECL int  pcre16_utf16_to_host_byte_order(PCRE_UCHAR16 *,
-                  PCRE_SPTR16, int, int *, int);
-PCRE_EXP_DECL int  pcre32_utf32_to_host_byte_order(PCRE_UCHAR32 *,
-                  PCRE_SPTR32, int, int *, int);
-
-/* JIT compiler related functions. */
-
-PCRE_EXP_DECL pcre_jit_stack *pcre_jit_stack_alloc(int, int);
-PCRE_EXP_DECL pcre16_jit_stack *pcre16_jit_stack_alloc(int, int);
-PCRE_EXP_DECL pcre32_jit_stack *pcre32_jit_stack_alloc(int, int);
-PCRE_EXP_DECL void pcre_jit_stack_free(pcre_jit_stack *);
-PCRE_EXP_DECL void pcre16_jit_stack_free(pcre16_jit_stack *);
-PCRE_EXP_DECL void pcre32_jit_stack_free(pcre32_jit_stack *);
-PCRE_EXP_DECL void pcre_assign_jit_stack(pcre_extra *,
-                  pcre_jit_callback, void *);
-PCRE_EXP_DECL void pcre16_assign_jit_stack(pcre16_extra *,
-                  pcre16_jit_callback, void *);
-PCRE_EXP_DECL void pcre32_assign_jit_stack(pcre32_extra *,
-                  pcre32_jit_callback, void *);
-PCRE_EXP_DECL void pcre_jit_free_unused_memory(void);
-PCRE_EXP_DECL void pcre16_jit_free_unused_memory(void);
-PCRE_EXP_DECL void pcre32_jit_free_unused_memory(void);
-
-#ifdef __cplusplus
-}  /* extern "C" */
-#endif
-
-#endif /* End of pcre.h */
diff --git a/src/extra/pcre/pcre_chartables.c b/src/extra/pcre/pcre_chartables.c
deleted file mode 100644
index 2a39e9f..0000000
--- a/src/extra/pcre/pcre_chartables.c
+++ /dev/null
@@ -1,198 +0,0 @@
-/*************************************************
-*      Perl-Compatible Regular Expressions       *
-*************************************************/
-
-/* This file contains character tables that are used when no external tables
-are passed to PCRE by the application that calls it. The tables are used only
-for characters whose code values are less than 256.
-
-This is a default version of the tables that assumes ASCII encoding. A program
-called dftables (which is distributed with PCRE) can be used to build
-alternative versions of this file. This is necessary if you are running in an
-EBCDIC environment, or if you want to default to a different encoding, for
-example ISO-8859-1. When dftables is run, it creates these tables in the
-current locale. If PCRE is configured with --enable-rebuild-chartables, this
-happens automatically.
-
-The following #includes are present because without them gcc 4.x may remove the
-array definition from the final binary if PCRE is built into a static library
-and dead code stripping is activated. This leads to link errors. Pulling in the
-header ensures that the array gets flagged as "someone outside this compilation
-unit might reference this" and so it will always be supplied to the linker. */
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include "pcre_internal.h"
-
-const pcre_uint8 PRIV(default_tables)[] = {
-
-/* This table is a lower casing table. */
-
-    0,  1,  2,  3,  4,  5,  6,  7,
-    8,  9, 10, 11, 12, 13, 14, 15,
-   16, 17, 18, 19, 20, 21, 22, 23,
-   24, 25, 26, 27, 28, 29, 30, 31,
-   32, 33, 34, 35, 36, 37, 38, 39,
-   40, 41, 42, 43, 44, 45, 46, 47,
-   48, 49, 50, 51, 52, 53, 54, 55,
-   56, 57, 58, 59, 60, 61, 62, 63,
-   64, 97, 98, 99,100,101,102,103,
-  104,105,106,107,108,109,110,111,
-  112,113,114,115,116,117,118,119,
-  120,121,122, 91, 92, 93, 94, 95,
-   96, 97, 98, 99,100,101,102,103,
-  104,105,106,107,108,109,110,111,
-  112,113,114,115,116,117,118,119,
-  120,121,122,123,124,125,126,127,
-  128,129,130,131,132,133,134,135,
-  136,137,138,139,140,141,142,143,
-  144,145,146,147,148,149,150,151,
-  152,153,154,155,156,157,158,159,
-  160,161,162,163,164,165,166,167,
-  168,169,170,171,172,173,174,175,
-  176,177,178,179,180,181,182,183,
-  184,185,186,187,188,189,190,191,
-  192,193,194,195,196,197,198,199,
-  200,201,202,203,204,205,206,207,
-  208,209,210,211,212,213,214,215,
-  216,217,218,219,220,221,222,223,
-  224,225,226,227,228,229,230,231,
-  232,233,234,235,236,237,238,239,
-  240,241,242,243,244,245,246,247,
-  248,249,250,251,252,253,254,255,
-
-/* This table is a case flipping table. */
-
-    0,  1,  2,  3,  4,  5,  6,  7,
-    8,  9, 10, 11, 12, 13, 14, 15,
-   16, 17, 18, 19, 20, 21, 22, 23,
-   24, 25, 26, 27, 28, 29, 30, 31,
-   32, 33, 34, 35, 36, 37, 38, 39,
-   40, 41, 42, 43, 44, 45, 46, 47,
-   48, 49, 50, 51, 52, 53, 54, 55,
-   56, 57, 58, 59, 60, 61, 62, 63,
-   64, 97, 98, 99,100,101,102,103,
-  104,105,106,107,108,109,110,111,
-  112,113,114,115,116,117,118,119,
-  120,121,122, 91, 92, 93, 94, 95,
-   96, 65, 66, 67, 68, 69, 70, 71,
-   72, 73, 74, 75, 76, 77, 78, 79,
-   80, 81, 82, 83, 84, 85, 86, 87,
-   88, 89, 90,123,124,125,126,127,
-  128,129,130,131,132,133,134,135,
-  136,137,138,139,140,141,142,143,
-  144,145,146,147,148,149,150,151,
-  152,153,154,155,156,157,158,159,
-  160,161,162,163,164,165,166,167,
-  168,169,170,171,172,173,174,175,
-  176,177,178,179,180,181,182,183,
-  184,185,186,187,188,189,190,191,
-  192,193,194,195,196,197,198,199,
-  200,201,202,203,204,205,206,207,
-  208,209,210,211,212,213,214,215,
-  216,217,218,219,220,221,222,223,
-  224,225,226,227,228,229,230,231,
-  232,233,234,235,236,237,238,239,
-  240,241,242,243,244,245,246,247,
-  248,249,250,251,252,253,254,255,
-
-/* This table contains bit maps for various character classes. Each map is 32
-bytes long and the bits run from the least significant end of each byte. The
-classes that have their own maps are: space, xdigit, digit, upper, lower, word,
-graph, print, punct, and cntrl. Other classes are built from combinations. */
-
-  0x00,0x3e,0x00,0x00,0x01,0x00,0x00,0x00,
-  0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
-  0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
-  0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
-
-  0x00,0x00,0x00,0x00,0x00,0x00,0xff,0x03,
-  0x7e,0x00,0x00,0x00,0x7e,0x00,0x00,0x00,
-  0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
-  0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
-
-  0x00,0x00,0x00,0x00,0x00,0x00,0xff,0x03,
-  0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
-  0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
-  0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
-
-  0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
-  0xfe,0xff,0xff,0x07,0x00,0x00,0x00,0x00,
-  0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
-  0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
-
-  0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
-  0x00,0x00,0x00,0x00,0xfe,0xff,0xff,0x07,
-  0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
-  0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
-
-  0x00,0x00,0x00,0x00,0x00,0x00,0xff,0x03,
-  0xfe,0xff,0xff,0x87,0xfe,0xff,0xff,0x07,
-  0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
-  0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
-
-  0x00,0x00,0x00,0x00,0xfe,0xff,0xff,0xff,
-  0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,
-  0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
-  0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
-
-  0x00,0x00,0x00,0x00,0xff,0xff,0xff,0xff,
-  0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,
-  0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
-  0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
-
-  0x00,0x00,0x00,0x00,0xfe,0xff,0x00,0xfc,
-  0x01,0x00,0x00,0xf8,0x01,0x00,0x00,0x78,
-  0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
-  0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
-
-  0xff,0xff,0xff,0xff,0x00,0x00,0x00,0x00,
-  0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,
-  0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
-  0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
-
-/* This table identifies various classes of character by individual bits:
-  0x01   white space character
-  0x02   letter
-  0x04   decimal digit
-  0x08   hexadecimal digit
-  0x10   alphanumeric or '_'
-  0x80   regular expression metacharacter or binary zero
-*/
-
-  0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /*   0-  7 */
-  0x00,0x01,0x01,0x00,0x01,0x01,0x00,0x00, /*   8- 15 */
-  0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /*  16- 23 */
-  0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /*  24- 31 */
-  0x01,0x00,0x00,0x00,0x80,0x00,0x00,0x00, /*    - '  */
-  0x80,0x80,0x80,0x80,0x00,0x00,0x80,0x00, /*  ( - /  */
-  0x1c,0x1c,0x1c,0x1c,0x1c,0x1c,0x1c,0x1c, /*  0 - 7  */
-  0x1c,0x1c,0x00,0x00,0x00,0x00,0x00,0x80, /*  8 - ?  */
-  0x00,0x1a,0x1a,0x1a,0x1a,0x1a,0x1a,0x12, /*  @ - G  */
-  0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12, /*  H - O  */
-  0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12, /*  P - W  */
-  0x12,0x12,0x12,0x80,0x80,0x00,0x80,0x10, /*  X - _  */
-  0x00,0x1a,0x1a,0x1a,0x1a,0x1a,0x1a,0x12, /*  ` - g  */
-  0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12, /*  h - o  */
-  0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12, /*  p - w  */
-  0x12,0x12,0x12,0x80,0x80,0x00,0x00,0x00, /*  x -127 */
-  0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 128-135 */
-  0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 136-143 */
-  0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 144-151 */
-  0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 152-159 */
-  0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 160-167 */
-  0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 168-175 */
-  0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 176-183 */
-  0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 184-191 */
-  0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 192-199 */
-  0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 200-207 */
-  0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 208-215 */
-  0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 216-223 */
-  0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 224-231 */
-  0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 232-239 */
-  0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 240-247 */
-  0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00};/* 248-255 */
-
-/* End of pcre_chartables.c */
diff --git a/src/extra/pcre/pcre_compile.c b/src/extra/pcre/pcre_compile.c
deleted file mode 100644
index 8a5b723..0000000
--- a/src/extra/pcre/pcre_compile.c
+++ /dev/null
@@ -1,9484 +0,0 @@
-/*************************************************
-*      Perl-Compatible Regular Expressions       *
-*************************************************/
-
-/* PCRE is a library of functions to support regular expressions whose syntax
-and semantics are as close as possible to those of the Perl 5 language.
-
-                       Written by Philip Hazel
-           Copyright (c) 1997-2014 University of Cambridge
-
------------------------------------------------------------------------------
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are met:
-
-    * Redistributions of source code must retain the above copyright notice,
-      this list of conditions and the following disclaimer.
-
-    * Redistributions in binary form must reproduce the above copyright
-      notice, this list of conditions and the following disclaimer in the
-      documentation and/or other materials provided with the distribution.
-
-    * Neither the name of the University of Cambridge nor the names of its
-      contributors may be used to endorse or promote products derived from
-      this software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
-LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-POSSIBILITY OF SUCH DAMAGE.
------------------------------------------------------------------------------
-*/
-
-
-/* This module contains the external function pcre_compile(), along with
-supporting internal functions that are not used by other modules. */
-
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#define NLBLOCK cd             /* Block containing newline information */
-#define PSSTART start_pattern  /* Field containing processed string start */
-#define PSEND   end_pattern    /* Field containing processed string end */
-
-#include "pcre_internal.h"
-
-
-/* When PCRE_DEBUG is defined, we need the pcre(16|32)_printint() function, which
-is also used by pcretest. PCRE_DEBUG is not defined when building a production
-library. We do not need to select pcre16_printint.c specially, because the
-COMPILE_PCREx macro will already be appropriately set. */
-
-#ifdef PCRE_DEBUG
-/* pcre_printint.c should not include any headers */
-#define PCRE_INCLUDED
-#include "pcre_printint.c"
-#undef PCRE_INCLUDED
-#endif
-
-
-/* Macro for setting individual bits in class bitmaps. */
-
-#define SETBIT(a,b) a[(b)/8] |= (1 << ((b)&7))
-
-/* Maximum length value to check against when making sure that the integer that
-holds the compiled pattern length does not overflow. We make it a bit less than
-INT_MAX to allow for adding in group terminating bytes, so that we don't have
-to check them every time. */
-
-#define OFLOW_MAX (INT_MAX - 20)
-
-/* Definitions to allow mutual recursion */
-
-static int
-  add_list_to_class(pcre_uint8 *, pcre_uchar **, int, compile_data *,
-    const pcre_uint32 *, unsigned int);
-
-static BOOL
-  compile_regex(int, pcre_uchar **, const pcre_uchar **, int *, BOOL, BOOL, int, int,
-    pcre_uint32 *, pcre_int32 *, pcre_uint32 *, pcre_int32 *, branch_chain *,
-    compile_data *, int *);
-
-
-
-/*************************************************
-*      Code parameters and static tables         *
-*************************************************/
-
-/* This value specifies the size of stack workspace that is used during the
-first pre-compile phase that determines how much memory is required. The regex
-is partly compiled into this space, but the compiled parts are discarded as
-soon as they can be, so that hopefully there will never be an overrun. The code
-does, however, check for an overrun. The largest amount I've seen used is 218,
-so this number is very generous.
-
-The same workspace is used during the second, actual compile phase for
-remembering forward references to groups so that they can be filled in at the
-end. Each entry in this list occupies LINK_SIZE bytes, so even when LINK_SIZE
-is 4 there is plenty of room for most patterns. However, the memory can get
-filled up by repetitions of forward references, for example patterns like
-/(?1){0,1999}(b)/, and one user did hit the limit. The code has been changed so
-that the workspace is expanded using malloc() in this situation. The value
-below is therefore a minimum, and we put a maximum on it for safety. The
-minimum is now also defined in terms of LINK_SIZE so that the use of malloc()
-kicks in at the same number of forward references in all cases. */
-
-#define COMPILE_WORK_SIZE (2048*LINK_SIZE)
-#define COMPILE_WORK_SIZE_MAX (100*COMPILE_WORK_SIZE)
-
-/* This value determines the size of the initial vector that is used for
-remembering named groups during the pre-compile. It is allocated on the stack,
-but if it is too small, it is expanded using malloc(), in a similar way to the
-workspace. The value is the number of slots in the list. */
-
-#define NAMED_GROUP_LIST_SIZE  20
-
-/* The overrun tests check for a slightly smaller size so that they detect the
-overrun before it actually does run off the end of the data block. */
-
-#define WORK_SIZE_SAFETY_MARGIN (100)
-
-/* Private flags added to firstchar and reqchar. */
-
-#define REQ_CASELESS    (1 << 0)        /* Indicates caselessness */
-#define REQ_VARY        (1 << 1)        /* Reqchar followed non-literal item */
-/* Negative values for the firstchar and reqchar flags */
-#define REQ_UNSET       (-2)
-#define REQ_NONE        (-1)
-
-/* Repeated character flags. */
-
-#define UTF_LENGTH     0x10000000l      /* The char contains its length. */
-
-/* Table for handling escaped characters in the range '0'-'z'. Positive returns
-are simple data values; negative values are for special things like \d and so
-on. Zero means further processing is needed (for things like \x), or the escape
-is invalid. */
-
-#ifndef EBCDIC
-
-/* This is the "normal" table for ASCII systems or for EBCDIC systems running
-in UTF-8 mode. */
-
-static const short int escapes[] = {
-     0,                       0,
-     0,                       0,
-     0,                       0,
-     0,                       0,
-     0,                       0,
-     CHAR_COLON,              CHAR_SEMICOLON,
-     CHAR_LESS_THAN_SIGN,     CHAR_EQUALS_SIGN,
-     CHAR_GREATER_THAN_SIGN,  CHAR_QUESTION_MARK,
-     CHAR_COMMERCIAL_AT,      -ESC_A,
-     -ESC_B,                  -ESC_C,
-     -ESC_D,                  -ESC_E,
-     0,                       -ESC_G,
-     -ESC_H,                  0,
-     0,                       -ESC_K,
-     0,                       0,
-     -ESC_N,                  0,
-     -ESC_P,                  -ESC_Q,
-     -ESC_R,                  -ESC_S,
-     0,                       0,
-     -ESC_V,                  -ESC_W,
-     -ESC_X,                  0,
-     -ESC_Z,                  CHAR_LEFT_SQUARE_BRACKET,
-     CHAR_BACKSLASH,          CHAR_RIGHT_SQUARE_BRACKET,
-     CHAR_CIRCUMFLEX_ACCENT,  CHAR_UNDERSCORE,
-     CHAR_GRAVE_ACCENT,       7,
-     -ESC_b,                  0,
-     -ESC_d,                  ESC_e,
-     ESC_f,                   0,
-     -ESC_h,                  0,
-     0,                       -ESC_k,
-     0,                       0,
-     ESC_n,                   0,
-     -ESC_p,                  0,
-     ESC_r,                   -ESC_s,
-     ESC_tee,                 0,
-     -ESC_v,                  -ESC_w,
-     0,                       0,
-     -ESC_z
-};
-
-#else
-
-/* This is the "abnormal" table for EBCDIC systems without UTF-8 support. */
-
-static const short int escapes[] = {
-/*  48 */     0,     0,      0,     '.',    '<',   '(',    '+',    '|',
-/*  50 */   '&',     0,      0,       0,      0,     0,      0,      0,
-/*  58 */     0,     0,    '!',     '$',    '*',   ')',    ';',    '~',
-/*  60 */   '-',   '/',      0,       0,      0,     0,      0,      0,
-/*  68 */     0,     0,    '|',     ',',    '%',   '_',    '>',    '?',
-/*  70 */     0,     0,      0,       0,      0,     0,      0,      0,
-/*  78 */     0,   '`',    ':',     '#',    '@',  '\'',    '=',    '"',
-/*  80 */     0,     7, -ESC_b,       0, -ESC_d, ESC_e,  ESC_f,      0,
-/*  88 */-ESC_h,     0,      0,     '{',      0,     0,      0,      0,
-/*  90 */     0,     0, -ESC_k,     'l',      0, ESC_n,      0, -ESC_p,
-/*  98 */     0, ESC_r,      0,     '}',      0,     0,      0,      0,
-/*  A0 */     0,   '~', -ESC_s, ESC_tee,      0,-ESC_v, -ESC_w,      0,
-/*  A8 */     0,-ESC_z,      0,       0,      0,   '[',      0,      0,
-/*  B0 */     0,     0,      0,       0,      0,     0,      0,      0,
-/*  B8 */     0,     0,      0,       0,      0,   ']',    '=',    '-',
-/*  C0 */   '{',-ESC_A, -ESC_B,  -ESC_C, -ESC_D,-ESC_E,      0, -ESC_G,
-/*  C8 */-ESC_H,     0,      0,       0,      0,     0,      0,      0,
-/*  D0 */   '}',     0, -ESC_K,       0,      0,-ESC_N,      0, -ESC_P,
-/*  D8 */-ESC_Q,-ESC_R,      0,       0,      0,     0,      0,      0,
-/*  E0 */  '\\',     0, -ESC_S,       0,      0,-ESC_V, -ESC_W, -ESC_X,
-/*  E8 */     0,-ESC_Z,      0,       0,      0,     0,      0,      0,
-/*  F0 */     0,     0,      0,       0,      0,     0,      0,      0,
-/*  F8 */     0,     0,      0,       0,      0,     0,      0,      0
-};
-#endif
-
-
-/* Table of special "verbs" like (*PRUNE). This is a short table, so it is
-searched linearly. Put all the names into a single string, in order to reduce
-the number of relocations when a shared library is dynamically linked. The
-string is built from string macros so that it works in UTF-8 mode on EBCDIC
-platforms. */
-
-typedef struct verbitem {
-  int   len;                 /* Length of verb name */
-  int   op;                  /* Op when no arg, or -1 if arg mandatory */
-  int   op_arg;              /* Op when arg present, or -1 if not allowed */
-} verbitem;
-
-static const char verbnames[] =
-  "\0"                       /* Empty name is a shorthand for MARK */
-  STRING_MARK0
-  STRING_ACCEPT0
-  STRING_COMMIT0
-  STRING_F0
-  STRING_FAIL0
-  STRING_PRUNE0
-  STRING_SKIP0
-  STRING_THEN;
-
-static const verbitem verbs[] = {
-  { 0, -1,        OP_MARK },
-  { 4, -1,        OP_MARK },
-  { 6, OP_ACCEPT, -1 },
-  { 6, OP_COMMIT, -1 },
-  { 1, OP_FAIL,   -1 },
-  { 4, OP_FAIL,   -1 },
-  { 5, OP_PRUNE,  OP_PRUNE_ARG },
-  { 4, OP_SKIP,   OP_SKIP_ARG  },
-  { 4, OP_THEN,   OP_THEN_ARG  }
-};
-
-static const int verbcount = sizeof(verbs)/sizeof(verbitem);
-
-
-/* Substitutes for [[:<:]] and [[:>:]], which mean start and end of word in
-another regex library. */
-
-static const pcre_uchar sub_start_of_word[] = {
-  CHAR_BACKSLASH, CHAR_b, CHAR_LEFT_PARENTHESIS, CHAR_QUESTION_MARK,
-  CHAR_EQUALS_SIGN, CHAR_BACKSLASH, CHAR_w, CHAR_RIGHT_PARENTHESIS, '\0' };
-
-static const pcre_uchar sub_end_of_word[] = {
-  CHAR_BACKSLASH, CHAR_b, CHAR_LEFT_PARENTHESIS, CHAR_QUESTION_MARK,
-  CHAR_LESS_THAN_SIGN, CHAR_EQUALS_SIGN, CHAR_BACKSLASH, CHAR_w,
-  CHAR_RIGHT_PARENTHESIS, '\0' };
-
-
-/* Tables of names of POSIX character classes and their lengths. The names are
-now all in a single string, to reduce the number of relocations when a shared
-library is dynamically loaded. The list of lengths is terminated by a zero
-length entry. The first three must be alpha, lower, upper, as this is assumed
-for handling case independence. The indices for graph, print, and punct are
-needed, so identify them. */
-
-static const char posix_names[] =
-  STRING_alpha0 STRING_lower0 STRING_upper0 STRING_alnum0
-  STRING_ascii0 STRING_blank0 STRING_cntrl0 STRING_digit0
-  STRING_graph0 STRING_print0 STRING_punct0 STRING_space0
-  STRING_word0  STRING_xdigit;
-
-static const pcre_uint8 posix_name_lengths[] = {
-  5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 4, 6, 0 };
-
-#define PC_GRAPH  8
-#define PC_PRINT  9
-#define PC_PUNCT 10
-
-
-/* Table of class bit maps for each POSIX class. Each class is formed from a
-base map, with an optional addition or removal of another map. Then, for some
-classes, there is some additional tweaking: for [:blank:] the vertical space
-characters are removed, and for [:alpha:] and [:alnum:] the underscore
-character is removed. The triples in the table consist of the base map offset,
-second map offset or -1 if no second map, and a non-negative value for map
-addition or a negative value for map subtraction (if there are two maps). The
-absolute value of the third field has these meanings: 0 => no tweaking, 1 =>
-remove vertical space characters, 2 => remove underscore. */
-
-static const int posix_class_maps[] = {
-  cbit_word,  cbit_digit, -2,             /* alpha */
-  cbit_lower, -1,          0,             /* lower */
-  cbit_upper, -1,          0,             /* upper */
-  cbit_word,  -1,          2,             /* alnum - word without underscore */
-  cbit_print, cbit_cntrl,  0,             /* ascii */
-  cbit_space, -1,          1,             /* blank - a GNU extension */
-  cbit_cntrl, -1,          0,             /* cntrl */
-  cbit_digit, -1,          0,             /* digit */
-  cbit_graph, -1,          0,             /* graph */
-  cbit_print, -1,          0,             /* print */
-  cbit_punct, -1,          0,             /* punct */
-  cbit_space, -1,          0,             /* space */
-  cbit_word,  -1,          0,             /* word - a Perl extension */
-  cbit_xdigit,-1,          0              /* xdigit */
-};
-
-/* Table of substitutes for \d etc when PCRE_UCP is set. They are replaced by
-Unicode property escapes. */
-
-#ifdef SUPPORT_UCP
-static const pcre_uchar string_PNd[]  = {
-  CHAR_BACKSLASH, CHAR_P, CHAR_LEFT_CURLY_BRACKET,
-  CHAR_N, CHAR_d, CHAR_RIGHT_CURLY_BRACKET, '\0' };
-static const pcre_uchar string_pNd[]  = {
-  CHAR_BACKSLASH, CHAR_p, CHAR_LEFT_CURLY_BRACKET,
-  CHAR_N, CHAR_d, CHAR_RIGHT_CURLY_BRACKET, '\0' };
-static const pcre_uchar string_PXsp[] = {
-  CHAR_BACKSLASH, CHAR_P, CHAR_LEFT_CURLY_BRACKET,
-  CHAR_X, CHAR_s, CHAR_p, CHAR_RIGHT_CURLY_BRACKET, '\0' };
-static const pcre_uchar string_pXsp[] = {
-  CHAR_BACKSLASH, CHAR_p, CHAR_LEFT_CURLY_BRACKET,
-  CHAR_X, CHAR_s, CHAR_p, CHAR_RIGHT_CURLY_BRACKET, '\0' };
-static const pcre_uchar string_PXwd[] = {
-  CHAR_BACKSLASH, CHAR_P, CHAR_LEFT_CURLY_BRACKET,
-  CHAR_X, CHAR_w, CHAR_d, CHAR_RIGHT_CURLY_BRACKET, '\0' };
-static const pcre_uchar string_pXwd[] = {
-  CHAR_BACKSLASH, CHAR_p, CHAR_LEFT_CURLY_BRACKET,
-  CHAR_X, CHAR_w, CHAR_d, CHAR_RIGHT_CURLY_BRACKET, '\0' };
-
-static const pcre_uchar *substitutes[] = {
-  string_PNd,           /* \D */
-  string_pNd,           /* \d */
-  string_PXsp,          /* \S */   /* Xsp is Perl space, but from 8.34, Perl */
-  string_pXsp,          /* \s */   /* space and POSIX space are the same. */
-  string_PXwd,          /* \W */
-  string_pXwd           /* \w */
-};
-
-/* The POSIX class substitutes must be in the order of the POSIX class names,
-defined above, and there are both positive and negative cases. NULL means no
-general substitute of a Unicode property escape (\p or \P). However, for some
-POSIX classes (e.g. graph, print, punct) a special property code is compiled
-directly. */
-
-static const pcre_uchar string_pL[] =   {
-  CHAR_BACKSLASH, CHAR_p, CHAR_LEFT_CURLY_BRACKET,
-  CHAR_L, CHAR_RIGHT_CURLY_BRACKET, '\0' };
-static const pcre_uchar string_pLl[] =  {
-  CHAR_BACKSLASH, CHAR_p, CHAR_LEFT_CURLY_BRACKET,
-  CHAR_L, CHAR_l, CHAR_RIGHT_CURLY_BRACKET, '\0' };
-static const pcre_uchar string_pLu[] =  {
-  CHAR_BACKSLASH, CHAR_p, CHAR_LEFT_CURLY_BRACKET,
-  CHAR_L, CHAR_u, CHAR_RIGHT_CURLY_BRACKET, '\0' };
-static const pcre_uchar string_pXan[] = {
-  CHAR_BACKSLASH, CHAR_p, CHAR_LEFT_CURLY_BRACKET,
-  CHAR_X, CHAR_a, CHAR_n, CHAR_RIGHT_CURLY_BRACKET, '\0' };
-static const pcre_uchar string_h[] =    {
-  CHAR_BACKSLASH, CHAR_h, '\0' };
-static const pcre_uchar string_pXps[] = {
-  CHAR_BACKSLASH, CHAR_p, CHAR_LEFT_CURLY_BRACKET,
-  CHAR_X, CHAR_p, CHAR_s, CHAR_RIGHT_CURLY_BRACKET, '\0' };
-static const pcre_uchar string_PL[] =   {
-  CHAR_BACKSLASH, CHAR_P, CHAR_LEFT_CURLY_BRACKET,
-  CHAR_L, CHAR_RIGHT_CURLY_BRACKET, '\0' };
-static const pcre_uchar string_PLl[] =  {
-  CHAR_BACKSLASH, CHAR_P, CHAR_LEFT_CURLY_BRACKET,
-  CHAR_L, CHAR_l, CHAR_RIGHT_CURLY_BRACKET, '\0' };
-static const pcre_uchar string_PLu[] =  {
-  CHAR_BACKSLASH, CHAR_P, CHAR_LEFT_CURLY_BRACKET,
-  CHAR_L, CHAR_u, CHAR_RIGHT_CURLY_BRACKET, '\0' };
-static const pcre_uchar string_PXan[] = {
-  CHAR_BACKSLASH, CHAR_P, CHAR_LEFT_CURLY_BRACKET,
-  CHAR_X, CHAR_a, CHAR_n, CHAR_RIGHT_CURLY_BRACKET, '\0' };
-static const pcre_uchar string_H[] =    {
-  CHAR_BACKSLASH, CHAR_H, '\0' };
-static const pcre_uchar string_PXps[] = {
-  CHAR_BACKSLASH, CHAR_P, CHAR_LEFT_CURLY_BRACKET,
-  CHAR_X, CHAR_p, CHAR_s, CHAR_RIGHT_CURLY_BRACKET, '\0' };
-
-static const pcre_uchar *posix_substitutes[] = {
-  string_pL,            /* alpha */
-  string_pLl,           /* lower */
-  string_pLu,           /* upper */
-  string_pXan,          /* alnum */
-  NULL,                 /* ascii */
-  string_h,             /* blank */
-  NULL,                 /* cntrl */
-  string_pNd,           /* digit */
-  NULL,                 /* graph */
-  NULL,                 /* print */
-  NULL,                 /* punct */
-  string_pXps,          /* space */   /* Xps is POSIX space, but from 8.34 */
-  string_pXwd,          /* word  */   /* Perl and POSIX space are the same */
-  NULL,                 /* xdigit */
-  /* Negated cases */
-  string_PL,            /* ^alpha */
-  string_PLl,           /* ^lower */
-  string_PLu,           /* ^upper */
-  string_PXan,          /* ^alnum */
-  NULL,                 /* ^ascii */
-  string_H,             /* ^blank */
-  NULL,                 /* ^cntrl */
-  string_PNd,           /* ^digit */
-  NULL,                 /* ^graph */
-  NULL,                 /* ^print */
-  NULL,                 /* ^punct */
-  string_PXps,          /* ^space */  /* Xps is POSIX space, but from 8.34 */
-  string_PXwd,          /* ^word */   /* Perl and POSIX space are the same */
-  NULL                  /* ^xdigit */
-};
-#define POSIX_SUBSIZE (sizeof(posix_substitutes) / sizeof(pcre_uchar *))
-#endif
-
-#define STRING(a)  # a
-#define XSTRING(s) STRING(s)
-
-/* The texts of compile-time error messages. These are "char *" because they
-are passed to the outside world. Do not ever re-use any error number, because
-they are documented. Always add a new error instead. Messages marked DEAD below
-are no longer used. This used to be a table of strings, but in order to reduce
-the number of relocations needed when a shared library is loaded dynamically,
-it is now one long string. We cannot use a table of offsets, because the
-lengths of inserts such as XSTRING(MAX_NAME_SIZE) are not known. Instead, we
-simply count through to the one we want - this isn't a performance issue
-because these strings are used only when there is a compilation error.
-
-Each substring ends with \0 to insert a null character. This includes the final
-substring, so that the whole string ends with \0\0, which can be detected when
-counting through. */
-
-static const char error_texts[] =
-  "no error\0"
-  "\\ at end of pattern\0"
-  "\\c at end of pattern\0"
-  "unrecognized character follows \\\0"
-  "numbers out of order in {} quantifier\0"
-  /* 5 */
-  "number too big in {} quantifier\0"
-  "missing terminating ] for character class\0"
-  "invalid escape sequence in character class\0"
-  "range out of order in character class\0"
-  "nothing to repeat\0"
-  /* 10 */
-  "operand of unlimited repeat could match the empty string\0"  /** DEAD **/
-  "internal error: unexpected repeat\0"
-  "unrecognized character after (? or (?-\0"
-  "POSIX named classes are supported only within a class\0"
-  "missing )\0"
-  /* 15 */
-  "reference to non-existent subpattern\0"
-  "erroffset passed as NULL\0"
-  "unknown option bit(s) set\0"
-  "missing ) after comment\0"
-  "parentheses nested too deeply\0"  /** DEAD **/
-  /* 20 */
-  "regular expression is too large\0"
-  "failed to get memory\0"
-  "unmatched parentheses\0"
-  "internal error: code overflow\0"
-  "unrecognized character after (?<\0"
-  /* 25 */
-  "lookbehind assertion is not fixed length\0"
-  "malformed number or name after (?(\0"
-  "conditional group contains more than two branches\0"
-  "assertion expected after (?(\0"
-  "(?R or (?[+-]digits must be followed by )\0"
-  /* 30 */
-  "unknown POSIX class name\0"
-  "POSIX collating elements are not supported\0"
-  "this version of PCRE is compiled without UTF support\0"
-  "spare error\0"  /** DEAD **/
-  "character value in \\x{} or \\o{} is too large\0"
-  /* 35 */
-  "invalid condition (?(0)\0"
-  "\\C not allowed in lookbehind assertion\0"
-  "PCRE does not support \\L, \\l, \\N{name}, \\U, or \\u\0"
-  "number after (?C is > 255\0"
-  "closing ) for (?C expected\0"
-  /* 40 */
-  "recursive call could loop indefinitely\0"
-  "unrecognized character after (?P\0"
-  "syntax error in subpattern name (missing terminator)\0"
-  "two named subpatterns have the same name\0"
-  "invalid UTF-8 string\0"
-  /* 45 */
-  "support for \\P, \\p, and \\X has not been compiled\0"
-  "malformed \\P or \\p sequence\0"
-  "unknown property name after \\P or \\p\0"
-  "subpattern name is too long (maximum " XSTRING(MAX_NAME_SIZE) " characters)\0"
-  "too many named subpatterns (maximum " XSTRING(MAX_NAME_COUNT) ")\0"
-  /* 50 */
-  "repeated subpattern is too long\0"    /** DEAD **/
-  "octal value is greater than \\377 in 8-bit non-UTF-8 mode\0"
-  "internal error: overran compiling workspace\0"
-  "internal error: previously-checked referenced subpattern not found\0"
-  "DEFINE group contains more than one branch\0"
-  /* 55 */
-  "repeating a DEFINE group is not allowed\0"  /** DEAD **/
-  "inconsistent NEWLINE options\0"
-  "\\g is not followed by a braced, angle-bracketed, or quoted name/number or by a plain number\0"
-  "a numbered reference must not be zero\0"
-  "an argument is not allowed for (*ACCEPT), (*FAIL), or (*COMMIT)\0"
-  /* 60 */
-  "(*VERB) not recognized or malformed\0"
-  "number is too big\0"
-  "subpattern name expected\0"
-  "digit expected after (?+\0"
-  "] is an invalid data character in JavaScript compatibility mode\0"
-  /* 65 */
-  "different names for subpatterns of the same number are not allowed\0"
-  "(*MARK) must have an argument\0"
-  "this version of PCRE is not compiled with Unicode property support\0"
-  "\\c must be followed by an ASCII character\0"
-  "\\k is not followed by a braced, angle-bracketed, or quoted name\0"
-  /* 70 */
-  "internal error: unknown opcode in find_fixedlength()\0"
-  "\\N is not supported in a class\0"
-  "too many forward references\0"
-  "disallowed Unicode code point (>= 0xd800 && <= 0xdfff)\0"
-  "invalid UTF-16 string\0"
-  /* 75 */
-  "name is too long in (*MARK), (*PRUNE), (*SKIP), or (*THEN)\0"
-  "character value in \\u.... sequence is too large\0"
-  "invalid UTF-32 string\0"
-  "setting UTF is disabled by the application\0"
-  "non-hex character in \\x{} (closing brace missing?)\0"
-  /* 80 */
-  "non-octal character in \\o{} (closing brace missing?)\0"
-  "missing opening brace after \\o\0"
-  "parentheses are too deeply nested\0"
-  "invalid range in character class\0"
-  "group name must start with a non-digit\0"
-  /* 85 */
-  "parentheses are too deeply nested (stack check)\0"
-  ;
-
-/* Table to identify digits and hex digits. This is used when compiling
-patterns. Note that the tables in chartables are dependent on the locale, and
-may mark arbitrary characters as digits - but the PCRE compiling code expects
-to handle only 0-9, a-z, and A-Z as digits when compiling. That is why we have
-a private table here. It costs 256 bytes, but it is a lot faster than doing
-character value tests (at least in some simple cases I timed), and in some
-applications one wants PCRE to compile efficiently as well as match
-efficiently.
-
-For convenience, we use the same bit definitions as in chartables:
-
-  0x04   decimal digit
-  0x08   hexadecimal digit
-
-Then we can use ctype_digit and ctype_xdigit in the code. */
-
-/* Using a simple comparison for decimal numbers rather than a memory read
-is much faster, and the resulting code is simpler (the compiler turns it
-into a subtraction and unsigned comparison). */
-
-#define IS_DIGIT(x) ((x) >= CHAR_0 && (x) <= CHAR_9)
-
-#ifndef EBCDIC
-
-/* This is the "normal" case, for ASCII systems, and EBCDIC systems running in
-UTF-8 mode. */
-
-static const pcre_uint8 digitab[] =
-  {
-  0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /*   0-  7 */
-  0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /*   8- 15 */
-  0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /*  16- 23 */
-  0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /*  24- 31 */
-  0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /*    - '  */
-  0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /*  ( - /  */
-  0x0c,0x0c,0x0c,0x0c,0x0c,0x0c,0x0c,0x0c, /*  0 - 7  */
-  0x0c,0x0c,0x00,0x00,0x00,0x00,0x00,0x00, /*  8 - ?  */
-  0x00,0x08,0x08,0x08,0x08,0x08,0x08,0x00, /*  @ - G  */
-  0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /*  H - O  */
-  0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /*  P - W  */
-  0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /*  X - _  */
-  0x00,0x08,0x08,0x08,0x08,0x08,0x08,0x00, /*  ` - g  */
-  0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /*  h - o  */
-  0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /*  p - w  */
-  0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /*  x -127 */
-  0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 128-135 */
-  0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 136-143 */
-  0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 144-151 */
-  0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 152-159 */
-  0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 160-167 */
-  0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 168-175 */
-  0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 176-183 */
-  0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 184-191 */
-  0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 192-199 */
-  0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 200-207 */
-  0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 208-215 */
-  0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 216-223 */
-  0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 224-231 */
-  0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 232-239 */
-  0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 240-247 */
-  0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00};/* 248-255 */
-
-#else
-
-/* This is the "abnormal" case, for EBCDIC systems not running in UTF-8 mode. */
-
-static const pcre_uint8 digitab[] =
-  {
-  0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /*   0-  7  0 */
-  0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /*   8- 15    */
-  0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /*  16- 23 10 */
-  0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /*  24- 31    */
-  0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /*  32- 39 20 */
-  0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /*  40- 47    */
-  0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /*  48- 55 30 */
-  0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /*  56- 63    */
-  0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /*    - 71 40 */
-  0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /*  72- |     */
-  0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /*  & - 87 50 */
-  0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /*  88- 95    */
-  0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /*  - -103 60 */
-  0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 104- ?     */
-  0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 112-119 70 */
-  0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 120- "     */
-  0x00,0x08,0x08,0x08,0x08,0x08,0x08,0x00, /* 128- g  80 */
-  0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /*  h -143    */
-  0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 144- p  90 */
-  0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /*  q -159    */
-  0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 160- x  A0 */
-  0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /*  y -175    */
-  0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /*  ^ -183 B0 */
-  0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 184-191    */
-  0x00,0x08,0x08,0x08,0x08,0x08,0x08,0x00, /*  { - G  C0 */
-  0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /*  H -207    */
-  0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /*  } - P  D0 */
-  0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /*  Q -223    */
-  0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /*  \ - X  E0 */
-  0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /*  Y -239    */
-  0x0c,0x0c,0x0c,0x0c,0x0c,0x0c,0x0c,0x0c, /*  0 - 7  F0 */
-  0x0c,0x0c,0x00,0x00,0x00,0x00,0x00,0x00};/*  8 -255    */
-
-static const pcre_uint8 ebcdic_chartab[] = { /* chartable partial dup */
-  0x80,0x00,0x00,0x00,0x00,0x01,0x00,0x00, /*   0-  7 */
-  0x00,0x00,0x00,0x00,0x01,0x01,0x00,0x00, /*   8- 15 */
-  0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x00, /*  16- 23 */
-  0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /*  24- 31 */
-  0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x00, /*  32- 39 */
-  0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /*  40- 47 */
-  0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /*  48- 55 */
-  0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /*  56- 63 */
-  0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /*    - 71 */
-  0x00,0x00,0x00,0x80,0x00,0x80,0x80,0x80, /*  72- |  */
-  0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /*  & - 87 */
-  0x00,0x00,0x00,0x80,0x80,0x80,0x00,0x00, /*  88- 95 */
-  0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /*  - -103 */
-  0x00,0x00,0x00,0x00,0x00,0x10,0x00,0x80, /* 104- ?  */
-  0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 112-119 */
-  0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 120- "  */
-  0x00,0x1a,0x1a,0x1a,0x1a,0x1a,0x1a,0x12, /* 128- g  */
-  0x12,0x12,0x00,0x00,0x00,0x00,0x00,0x00, /*  h -143 */
-  0x00,0x12,0x12,0x12,0x12,0x12,0x12,0x12, /* 144- p  */
-  0x12,0x12,0x00,0x00,0x00,0x00,0x00,0x00, /*  q -159 */
-  0x00,0x00,0x12,0x12,0x12,0x12,0x12,0x12, /* 160- x  */
-  0x12,0x12,0x00,0x00,0x00,0x00,0x00,0x00, /*  y -175 */
-  0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /*  ^ -183 */
-  0x00,0x00,0x80,0x00,0x00,0x00,0x00,0x00, /* 184-191 */
-  0x80,0x1a,0x1a,0x1a,0x1a,0x1a,0x1a,0x12, /*  { - G  */
-  0x12,0x12,0x00,0x00,0x00,0x00,0x00,0x00, /*  H -207 */
-  0x00,0x12,0x12,0x12,0x12,0x12,0x12,0x12, /*  } - P  */
-  0x12,0x12,0x00,0x00,0x00,0x00,0x00,0x00, /*  Q -223 */
-  0x00,0x00,0x12,0x12,0x12,0x12,0x12,0x12, /*  \ - X  */
-  0x12,0x12,0x00,0x00,0x00,0x00,0x00,0x00, /*  Y -239 */
-  0x1c,0x1c,0x1c,0x1c,0x1c,0x1c,0x1c,0x1c, /*  0 - 7  */
-  0x1c,0x1c,0x00,0x00,0x00,0x00,0x00,0x00};/*  8 -255 */
-#endif
-
-
-/* This table is used to check whether auto-possessification is possible
-between adjacent character-type opcodes. The left-hand (repeated) opcode is
-used to select the row, and the right-hand opcode is use to select the column.
-A value of 1 means that auto-possessification is OK. For example, the second
-value in the first row means that \D+\d can be turned into \D++\d.
-
-The Unicode property types (\P and \p) have to be present to fill out the table
-because of what their opcode values are, but the table values should always be
-zero because property types are handled separately in the code. The last four
-columns apply to items that cannot be repeated, so there is no need to have
-rows for them. Note that OP_DIGIT etc. are generated only when PCRE_UCP is
-*not* set. When it is set, \d etc. are converted into OP_(NOT_)PROP codes. */
-
-#define APTROWS (LAST_AUTOTAB_LEFT_OP - FIRST_AUTOTAB_OP + 1)
-#define APTCOLS (LAST_AUTOTAB_RIGHT_OP - FIRST_AUTOTAB_OP + 1)
-
-static const pcre_uint8 autoposstab[APTROWS][APTCOLS] = {
-/* \D \d \S \s \W \w  . .+ \C \P \p \R \H \h \V \v \X \Z \z  $ $M */
-  { 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0 },  /* \D */
-  { 1, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 1, 0, 1, 1, 1, 1 },  /* \d */
-  { 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 1, 0, 1, 1, 1, 1 },  /* \S */
-  { 0, 1, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0 },  /* \s */
-  { 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0 },  /* \W */
-  { 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 1, 0, 1, 1, 1, 1 },  /* \w */
-  { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0 },  /* .  */
-  { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0 },  /* .+ */
-  { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0 },  /* \C */
-  { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },  /* \P */
-  { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },  /* \p */
-  { 0, 1, 0, 1, 0, 1, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0 },  /* \R */
-  { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0 },  /* \H */
-  { 0, 1, 1, 0, 0, 1, 0, 0, 0, 0, 0, 1, 1, 0, 0, 1, 0, 0, 1, 0, 0 },  /* \h */
-  { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 1, 0, 0 },  /* \V */
-  { 0, 1, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 1, 0, 0 },  /* \v */
-  { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0 }   /* \X */
-};
-
-
-/* This table is used to check whether auto-possessification is possible
-between adjacent Unicode property opcodes (OP_PROP and OP_NOTPROP). The
-left-hand (repeated) opcode is used to select the row, and the right-hand
-opcode is used to select the column. The values are as follows:
-
-  0   Always return FALSE (never auto-possessify)
-  1   Character groups are distinct (possessify if both are OP_PROP)
-  2   Check character categories in the same group (general or particular)
-  3   TRUE if the two opcodes are not the same (PROP vs NOTPROP)
-
-  4   Check left general category vs right particular category
-  5   Check right general category vs left particular category
-
-  6   Left alphanum vs right general category
-  7   Left space vs right general category
-  8   Left word vs right general category
-
-  9   Right alphanum vs left general category
- 10   Right space vs left general category
- 11   Right word vs left general category
-
- 12   Left alphanum vs right particular category
- 13   Left space vs right particular category
- 14   Left word vs right particular category
-
- 15   Right alphanum vs left particular category
- 16   Right space vs left particular category
- 17   Right word vs left particular category
-*/
-
-static const pcre_uint8 propposstab[PT_TABSIZE][PT_TABSIZE] = {
-/* ANY LAMP GC  PC  SC ALNUM SPACE PXSPACE WORD CLIST UCNC */
-  { 0,  0,  0,  0,  0,    0,    0,      0,   0,    0,   0 },  /* PT_ANY */
-  { 0,  3,  0,  0,  0,    3,    1,      1,   0,    0,   0 },  /* PT_LAMP */
-  { 0,  0,  2,  4,  0,    9,   10,     10,  11,    0,   0 },  /* PT_GC */
-  { 0,  0,  5,  2,  0,   15,   16,     16,  17,    0,   0 },  /* PT_PC */
-  { 0,  0,  0,  0,  2,    0,    0,      0,   0,    0,   0 },  /* PT_SC */
-  { 0,  3,  6, 12,  0,    3,    1,      1,   0,    0,   0 },  /* PT_ALNUM */
-  { 0,  1,  7, 13,  0,    1,    3,      3,   1,    0,   0 },  /* PT_SPACE */
-  { 0,  1,  7, 13,  0,    1,    3,      3,   1,    0,   0 },  /* PT_PXSPACE */
-  { 0,  0,  8, 14,  0,    0,    1,      1,   3,    0,   0 },  /* PT_WORD */
-  { 0,  0,  0,  0,  0,    0,    0,      0,   0,    0,   0 },  /* PT_CLIST */
-  { 0,  0,  0,  0,  0,    0,    0,      0,   0,    0,   3 }   /* PT_UCNC */
-};
-
-/* This table is used to check whether auto-possessification is possible
-between adjacent Unicode property opcodes (OP_PROP and OP_NOTPROP) when one
-specifies a general category and the other specifies a particular category. The
-row is selected by the general category and the column by the particular
-category. The value is 1 if the particular category is not part of the general
-category. */
-
-static const pcre_uint8 catposstab[7][30] = {
-/* Cc Cf Cn Co Cs Ll Lm Lo Lt Lu Mc Me Mn Nd Nl No Pc Pd Pe Pf Pi Po Ps Sc Sk Sm So Zl Zp Zs */
-  { 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 },  /* C */
-  { 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 },  /* L */
-  { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 },  /* M */
-  { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 },  /* N */
-  { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1 },  /* P */
-  { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1 },  /* S */
-  { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0 }   /* Z */
-};
-
-/* This table is used when checking ALNUM, (PX)SPACE, SPACE, and WORD against
-a general or particular category. The properties in each row are those
-that apply to the character set in question. Duplication means that a little
-unnecessary work is done when checking, but this keeps things much simpler
-because they can all use the same code. For more details see the comment where
-this table is used.
-
-Note: SPACE and PXSPACE used to be different because Perl excluded VT from
-"space", but from Perl 5.18 it's included, so both categories are treated the
-same here. */
-
-static const pcre_uint8 posspropstab[3][4] = {
-  { ucp_L, ucp_N, ucp_N, ucp_Nl },  /* ALNUM, 3rd and 4th values redundant */
-  { ucp_Z, ucp_Z, ucp_C, ucp_Cc },  /* SPACE and PXSPACE, 2nd value redundant */
-  { ucp_L, ucp_N, ucp_P, ucp_Po }   /* WORD */
-};
-
-/* This table is used when converting repeating opcodes into possessified
-versions as a result of an explicit possessive quantifier such as ++. A zero
-value means there is no possessified version - in those cases the item in
-question must be wrapped in ONCE brackets. The table is truncated at OP_CALLOUT
-because all relevant opcodes are less than that. */
-
-static const pcre_uint8 opcode_possessify[] = {
-  0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,   /* 0 - 15  */
-  0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,   /* 16 - 31 */
-
-  0,                       /* NOTI */
-  OP_POSSTAR, 0,           /* STAR, MINSTAR */
-  OP_POSPLUS, 0,           /* PLUS, MINPLUS */
-  OP_POSQUERY, 0,          /* QUERY, MINQUERY */
-  OP_POSUPTO, 0,           /* UPTO, MINUPTO */
-  0,                       /* EXACT */
-  0, 0, 0, 0,              /* POS{STAR,PLUS,QUERY,UPTO} */
-
-  OP_POSSTARI, 0,          /* STARI, MINSTARI */
-  OP_POSPLUSI, 0,          /* PLUSI, MINPLUSI */
-  OP_POSQUERYI, 0,         /* QUERYI, MINQUERYI */
-  OP_POSUPTOI, 0,          /* UPTOI, MINUPTOI */
-  0,                       /* EXACTI */
-  0, 0, 0, 0,              /* POS{STARI,PLUSI,QUERYI,UPTOI} */
-
-  OP_NOTPOSSTAR, 0,        /* NOTSTAR, NOTMINSTAR */
-  OP_NOTPOSPLUS, 0,        /* NOTPLUS, NOTMINPLUS */
-  OP_NOTPOSQUERY, 0,       /* NOTQUERY, NOTMINQUERY */
-  OP_NOTPOSUPTO, 0,        /* NOTUPTO, NOTMINUPTO */
-  0,                       /* NOTEXACT */
-  0, 0, 0, 0,              /* NOTPOS{STAR,PLUS,QUERY,UPTO} */
-
-  OP_NOTPOSSTARI, 0,       /* NOTSTARI, NOTMINSTARI */
-  OP_NOTPOSPLUSI, 0,       /* NOTPLUSI, NOTMINPLUSI */
-  OP_NOTPOSQUERYI, 0,      /* NOTQUERYI, NOTMINQUERYI */
-  OP_NOTPOSUPTOI, 0,       /* NOTUPTOI, NOTMINUPTOI */
-  0,                       /* NOTEXACTI */
-  0, 0, 0, 0,              /* NOTPOS{STARI,PLUSI,QUERYI,UPTOI} */
-
-  OP_TYPEPOSSTAR, 0,       /* TYPESTAR, TYPEMINSTAR */
-  OP_TYPEPOSPLUS, 0,       /* TYPEPLUS, TYPEMINPLUS */
-  OP_TYPEPOSQUERY, 0,      /* TYPEQUERY, TYPEMINQUERY */
-  OP_TYPEPOSUPTO, 0,       /* TYPEUPTO, TYPEMINUPTO */
-  0,                       /* TYPEEXACT */
-  0, 0, 0, 0,              /* TYPEPOS{STAR,PLUS,QUERY,UPTO} */
-
-  OP_CRPOSSTAR, 0,         /* CRSTAR, CRMINSTAR */
-  OP_CRPOSPLUS, 0,         /* CRPLUS, CRMINPLUS */
-  OP_CRPOSQUERY, 0,        /* CRQUERY, CRMINQUERY */
-  OP_CRPOSRANGE, 0,        /* CRRANGE, CRMINRANGE */
-  0, 0, 0, 0,              /* CRPOS{STAR,PLUS,QUERY,RANGE} */
-
-  0, 0, 0,                 /* CLASS, NCLASS, XCLASS */
-  0, 0,                    /* REF, REFI */
-  0, 0,                    /* DNREF, DNREFI */
-  0, 0                     /* RECURSE, CALLOUT */
-};
-
-
-
-/*************************************************
-*            Find an error text                  *
-*************************************************/
-
-/* The error texts are now all in one long string, to save on relocations. As
-some of the text is of unknown length, we can't use a table of offsets.
-Instead, just count through the strings. This is not a performance issue
-because it happens only when there has been a compilation error.
-
-Argument:   the error number
-Returns:    pointer to the error string
-*/
-
-static const char *
-find_error_text(int n)
-{
-const char *s = error_texts;
-for (; n > 0; n--)
-  {
-  while (*s++ != CHAR_NULL) {};
-  if (*s == CHAR_NULL) return "Error text not found (please report)";
-  }
-return s;
-}
-
-
-
-/*************************************************
-*           Expand the workspace                 *
-*************************************************/
-
-/* This function is called during the second compiling phase, if the number of
-forward references fills the existing workspace, which is originally a block on
-the stack. A larger block is obtained from malloc() unless the ultimate limit
-has been reached or the increase will be rather small.
-
-Argument: pointer to the compile data block
-Returns:  0 if all went well, else an error number
-*/
-
-static int
-expand_workspace(compile_data *cd)
-{
-pcre_uchar *newspace;
-int newsize = cd->workspace_size * 2;
-
-if (newsize > COMPILE_WORK_SIZE_MAX) newsize = COMPILE_WORK_SIZE_MAX;
-if (cd->workspace_size >= COMPILE_WORK_SIZE_MAX ||
-    newsize - cd->workspace_size < WORK_SIZE_SAFETY_MARGIN)
- return ERR72;
-
-newspace = (PUBL(malloc))(IN_UCHARS(newsize));
-if (newspace == NULL) return ERR21;
-memcpy(newspace, cd->start_workspace, cd->workspace_size * sizeof(pcre_uchar));
-cd->hwm = (pcre_uchar *)newspace + (cd->hwm - cd->start_workspace);
-if (cd->workspace_size > COMPILE_WORK_SIZE)
-  (PUBL(free))((void *)cd->start_workspace);
-cd->start_workspace = newspace;
-cd->workspace_size = newsize;
-return 0;
-}
-
-
-
-/*************************************************
-*            Check for counted repeat            *
-*************************************************/
-
-/* This function is called when a '{' is encountered in a place where it might
-start a quantifier. It looks ahead to see if it really is a quantifier or not.
-It is only a quantifier if it is one of the forms {ddd} {ddd,} or {ddd,ddd}
-where the ddds are digits.
-
-Arguments:
-  p         pointer to the first char after '{'
-
-Returns:    TRUE or FALSE
-*/
-
-static BOOL
-is_counted_repeat(const pcre_uchar *p)
-{
-if (!IS_DIGIT(*p)) return FALSE;
-p++;
-while (IS_DIGIT(*p)) p++;
-if (*p == CHAR_RIGHT_CURLY_BRACKET) return TRUE;
-
-if (*p++ != CHAR_COMMA) return FALSE;
-if (*p == CHAR_RIGHT_CURLY_BRACKET) return TRUE;
-
-if (!IS_DIGIT(*p)) return FALSE;
-p++;
-while (IS_DIGIT(*p)) p++;
-
-return (*p == CHAR_RIGHT_CURLY_BRACKET);
-}
-
-
-
-/*************************************************
-*            Handle escapes                      *
-*************************************************/
-
-/* This function is called when a \ has been encountered. It either returns a
-positive value for a simple escape such as \n, or 0 for a data character which
-will be placed in chptr. A backreference to group n is returned as negative n.
-When UTF-8 is enabled, a positive value greater than 255 may be returned in
-chptr. On entry, ptr is pointing at the \. On exit, it is on the final
-character of the escape sequence.
-
-Arguments:
-  ptrptr         points to the pattern position pointer
-  chptr          points to a returned data character
-  errorcodeptr   points to the errorcode variable
-  bracount       number of previous extracting brackets
-  options        the options bits
-  isclass        TRUE if inside a character class
-
-Returns:         zero => a data character
-                 positive => a special escape sequence
-                 negative => a back reference
-                 on error, errorcodeptr is set
-*/
-
-static int
-check_escape(const pcre_uchar **ptrptr, pcre_uint32 *chptr, int *errorcodeptr,
-  int bracount, int options, BOOL isclass)
-{
-/* PCRE_UTF16 has the same value as PCRE_UTF8. */
-BOOL utf = (options & PCRE_UTF8) != 0;
-const pcre_uchar *ptr = *ptrptr + 1;
-pcre_uint32 c;
-int escape = 0;
-int i;
-
-GETCHARINCTEST(c, ptr);           /* Get character value, increment pointer */
-ptr--;                            /* Set pointer back to the last byte */
-
-/* If backslash is at the end of the pattern, it's an error. */
-
-if (c == CHAR_NULL) *errorcodeptr = ERR1;
-
-/* Non-alphanumerics are literals. For digits or letters, do an initial lookup
-in a table. A non-zero result is something that can be returned immediately.
-Otherwise further processing may be required. */
-
-#ifndef EBCDIC  /* ASCII/UTF-8 coding */
-/* Not alphanumeric */
-else if (c < CHAR_0 || c > CHAR_z) {}
-else if ((i = escapes[c - CHAR_0]) != 0)
-  { if (i > 0) c = (pcre_uint32)i; else escape = -i; }
-
-#else           /* EBCDIC coding */
-/* Not alphanumeric */
-else if (c < CHAR_a || (!MAX_255(c) || (ebcdic_chartab[c] & 0x0E) == 0)) {}
-else if ((i = escapes[c - 0x48]) != 0)  { if (i > 0) c = (pcre_uint32)i; else escape = -i; }
-#endif
-
-/* Escapes that need further processing, or are illegal. */
-
-else
-  {
-  const pcre_uchar *oldptr;
-  BOOL braced, negated, overflow;
-  int s;
-
-  switch (c)
-    {
-    /* A number of Perl escapes are not handled by PCRE. We give an explicit
-    error. */
-
-    case CHAR_l:
-    case CHAR_L:
-    *errorcodeptr = ERR37;
-    break;
-
-    case CHAR_u:
-    if ((options & PCRE_JAVASCRIPT_COMPAT) != 0)
-      {
-      /* In JavaScript, \u must be followed by four hexadecimal numbers.
-      Otherwise it is a lowercase u letter. */
-      if (MAX_255(ptr[1]) && (digitab[ptr[1]] & ctype_xdigit) != 0
-        && MAX_255(ptr[2]) && (digitab[ptr[2]] & ctype_xdigit) != 0
-        && MAX_255(ptr[3]) && (digitab[ptr[3]] & ctype_xdigit) != 0
-        && MAX_255(ptr[4]) && (digitab[ptr[4]] & ctype_xdigit) != 0)
-        {
-        c = 0;
-        for (i = 0; i < 4; ++i)
-          {
-          register pcre_uint32 cc = *(++ptr);
-#ifndef EBCDIC  /* ASCII/UTF-8 coding */
-          if (cc >= CHAR_a) cc -= 32;               /* Convert to upper case */
-          c = (c << 4) + cc - ((cc < CHAR_A)? CHAR_0 : (CHAR_A - 10));
-#else           /* EBCDIC coding */
-          if (cc >= CHAR_a && cc <= CHAR_z) cc += 64;  /* Convert to upper case */
-          c = (c << 4) + cc - ((cc >= CHAR_0)? CHAR_0 : (CHAR_A - 10));
-#endif
-          }
-
-#if defined COMPILE_PCRE8
-        if (c > (utf ? 0x10ffffU : 0xffU))
-#elif defined COMPILE_PCRE16
-        if (c > (utf ? 0x10ffffU : 0xffffU))
-#elif defined COMPILE_PCRE32
-        if (utf && c > 0x10ffffU)
-#endif
-          {
-          *errorcodeptr = ERR76;
-          }
-        else if (utf && c >= 0xd800 && c <= 0xdfff) *errorcodeptr = ERR73;
-        }
-      }
-    else
-      *errorcodeptr = ERR37;
-    break;
-
-    case CHAR_U:
-    /* In JavaScript, \U is an uppercase U letter. */
-    if ((options & PCRE_JAVASCRIPT_COMPAT) == 0) *errorcodeptr = ERR37;
-    break;
-
-    /* In a character class, \g is just a literal "g". Outside a character
-    class, \g must be followed by one of a number of specific things:
-
-    (1) A number, either plain or braced. If positive, it is an absolute
-    backreference. If negative, it is a relative backreference. This is a Perl
-    5.10 feature.
-
-    (2) Perl 5.10 also supports \g{name} as a reference to a named group. This
-    is part of Perl's movement towards a unified syntax for back references. As
-    this is synonymous with \k{name}, we fudge it up by pretending it really
-    was \k.
-
-    (3) For Oniguruma compatibility we also support \g followed by a name or a
-    number either in angle brackets or in single quotes. However, these are
-    (possibly recursive) subroutine calls, _not_ backreferences. Just return
-    the ESC_g code (cf \k). */
-
-    case CHAR_g:
-    if (isclass) break;
-    if (ptr[1] == CHAR_LESS_THAN_SIGN || ptr[1] == CHAR_APOSTROPHE)
-      {
-      escape = ESC_g;
-      break;
-      }
-
-    /* Handle the Perl-compatible cases */
-
-    if (ptr[1] == CHAR_LEFT_CURLY_BRACKET)
-      {
-      const pcre_uchar *p;
-      for (p = ptr+2; *p != CHAR_NULL && *p != CHAR_RIGHT_CURLY_BRACKET; p++)
-        if (*p != CHAR_MINUS && !IS_DIGIT(*p)) break;
-      if (*p != CHAR_NULL && *p != CHAR_RIGHT_CURLY_BRACKET)
-        {
-        escape = ESC_k;
-        break;
-        }
-      braced = TRUE;
-      ptr++;
-      }
-    else braced = FALSE;
-
-    if (ptr[1] == CHAR_MINUS)
-      {
-      negated = TRUE;
-      ptr++;
-      }
-    else negated = FALSE;
-
-    /* The integer range is limited by the machine's int representation. */
-    s = 0;
-    overflow = FALSE;
-    while (IS_DIGIT(ptr[1]))
-      {
-      if (s > INT_MAX / 10 - 1) /* Integer overflow */
-        {
-        overflow = TRUE;
-        break;
-        }
-      s = s * 10 + (int)(*(++ptr) - CHAR_0);
-      }
-    if (overflow) /* Integer overflow */
-      {
-      while (IS_DIGIT(ptr[1]))
-        ptr++;
-      *errorcodeptr = ERR61;
-      break;
-      }
-
-    if (braced && *(++ptr) != CHAR_RIGHT_CURLY_BRACKET)
-      {
-      *errorcodeptr = ERR57;
-      break;
-      }
-
-    if (s == 0)
-      {
-      *errorcodeptr = ERR58;
-      break;
-      }
-
-    if (negated)
-      {
-      if (s > bracount)
-        {
-        *errorcodeptr = ERR15;
-        break;
-        }
-      s = bracount - (s - 1);
-      }
-
-    escape = -s;
-    break;
-
-    /* The handling of escape sequences consisting of a string of digits
-    starting with one that is not zero is not straightforward. Perl has changed
-    over the years. Nowadays \g{} for backreferences and \o{} for octal are
-    recommended to avoid the ambiguities in the old syntax.
-
-    Outside a character class, the digits are read as a decimal number. If the
-    number is less than 8 (used to be 10), or if there are that many previous
-    extracting left brackets, then it is a back reference. Otherwise, up to
-    three octal digits are read to form an escaped byte. Thus \123 is likely to
-    be octal 123 (cf \0123, which is octal 012 followed by the literal 3). If
-    the octal value is greater than 377, the least significant 8 bits are
-    taken. \8 and \9 are treated as the literal characters 8 and 9.
-
-    Inside a character class, \ followed by a digit is always either a literal
-    8 or 9 or an octal number. */
-
-    case CHAR_1: case CHAR_2: case CHAR_3: case CHAR_4: case CHAR_5:
-    case CHAR_6: case CHAR_7: case CHAR_8: case CHAR_9:
-
-    if (!isclass)
-      {
-      oldptr = ptr;
-      /* The integer range is limited by the machine's int representation. */
-      s = (int)(c -CHAR_0);
-      overflow = FALSE;
-      while (IS_DIGIT(ptr[1]))
-        {
-        if (s > INT_MAX / 10 - 1) /* Integer overflow */
-          {
-          overflow = TRUE;
-          break;
-          }
-        s = s * 10 + (int)(*(++ptr) - CHAR_0);
-        }
-      if (overflow) /* Integer overflow */
-        {
-        while (IS_DIGIT(ptr[1]))
-          ptr++;
-        *errorcodeptr = ERR61;
-        break;
-        }
-      if (s < 8 || s <= bracount)  /* Check for back reference */
-        {
-        escape = -s;
-        break;
-        }
-      ptr = oldptr;      /* Put the pointer back and fall through */
-      }
-
-    /* Handle a digit following \ when the number is not a back reference. If
-    the first digit is 8 or 9, Perl used to generate a binary zero byte and
-    then treat the digit as a following literal. At least by Perl 5.18 this
-    changed so as not to insert the binary zero. */
-
-    if ((c = *ptr) >= CHAR_8) break;
-
-    /* Fall through with a digit less than 8 */
-
-    /* \0 always starts an octal number, but we may drop through to here with a
-    larger first octal digit. The original code used just to take the least
-    significant 8 bits of octal numbers (I think this is what early Perls used
-    to do). Nowadays we allow for larger numbers in UTF-8 mode and 16-bit mode,
-    but no more than 3 octal digits. */
-
-    case CHAR_0:
-    c -= CHAR_0;
-    while(i++ < 2 && ptr[1] >= CHAR_0 && ptr[1] <= CHAR_7)
-        c = c * 8 + *(++ptr) - CHAR_0;
-#ifdef COMPILE_PCRE8
-    if (!utf && c > 0xff) *errorcodeptr = ERR51;
-#endif
-    break;
-
-    /* \o is a relatively new Perl feature, supporting a more general way of
-    specifying character codes in octal. The only supported form is \o{ddd}. */
-
-    case CHAR_o:
-    if (ptr[1] != CHAR_LEFT_CURLY_BRACKET) *errorcodeptr = ERR81; else
-      {
-      ptr += 2;
-      c = 0;
-      overflow = FALSE;
-      while (*ptr >= CHAR_0 && *ptr <= CHAR_7)
-        {
-        register pcre_uint32 cc = *ptr++;
-        if (c == 0 && cc == CHAR_0) continue;     /* Leading zeroes */
-#ifdef COMPILE_PCRE32
-        if (c >= 0x20000000l) { overflow = TRUE; break; }
-#endif
-        c = (c << 3) + cc - CHAR_0 ;
-#if defined COMPILE_PCRE8
-        if (c > (utf ? 0x10ffffU : 0xffU)) { overflow = TRUE; break; }
-#elif defined COMPILE_PCRE16
-        if (c > (utf ? 0x10ffffU : 0xffffU)) { overflow = TRUE; break; }
-#elif defined COMPILE_PCRE32
-        if (utf && c > 0x10ffffU) { overflow = TRUE; break; }
-#endif
-        }
-      if (overflow)
-        {
-        while (*ptr >= CHAR_0 && *ptr <= CHAR_7) ptr++;
-        *errorcodeptr = ERR34;
-        }
-      else if (*ptr == CHAR_RIGHT_CURLY_BRACKET)
-        {
-        if (utf && c >= 0xd800 && c <= 0xdfff) *errorcodeptr = ERR73;
-        }
-      else *errorcodeptr = ERR80;
-      }
-    break;
-
-    /* \x is complicated. In JavaScript, \x must be followed by two hexadecimal
-    numbers. Otherwise it is a lowercase x letter. */
-
-    case CHAR_x:
-    if ((options & PCRE_JAVASCRIPT_COMPAT) != 0)
-      {
-      if (MAX_255(ptr[1]) && (digitab[ptr[1]] & ctype_xdigit) != 0
-        && MAX_255(ptr[2]) && (digitab[ptr[2]] & ctype_xdigit) != 0)
-        {
-        c = 0;
-        for (i = 0; i < 2; ++i)
-          {
-          register pcre_uint32 cc = *(++ptr);
-#ifndef EBCDIC  /* ASCII/UTF-8 coding */
-          if (cc >= CHAR_a) cc -= 32;               /* Convert to upper case */
-          c = (c << 4) + cc - ((cc < CHAR_A)? CHAR_0 : (CHAR_A - 10));
-#else           /* EBCDIC coding */
-          if (cc >= CHAR_a && cc <= CHAR_z) cc += 64;  /* Convert to upper case */
-          c = (c << 4) + cc - ((cc >= CHAR_0)? CHAR_0 : (CHAR_A - 10));
-#endif
-          }
-        }
-      }    /* End JavaScript handling */
-
-    /* Handle \x in Perl's style. \x{ddd} is a character number which can be
-    greater than 0xff in utf or non-8bit mode, but only if the ddd are hex
-    digits. If not, { used to be treated as a data character. However, Perl
-    seems to read hex digits up to the first non-such, and ignore the rest, so
-    that, for example \x{zz} matches a binary zero. This seems crazy, so PCRE
-    now gives an error. */
-
-    else
-      {
-      if (ptr[1] == CHAR_LEFT_CURLY_BRACKET)
-        {
-        ptr += 2;
-        c = 0;
-        overflow = FALSE;
-        while (MAX_255(*ptr) && (digitab[*ptr] & ctype_xdigit) != 0)
-          {
-          register pcre_uint32 cc = *ptr++;
-          if (c == 0 && cc == CHAR_0) continue;     /* Leading zeroes */
-
-#ifdef COMPILE_PCRE32
-          if (c >= 0x10000000l) { overflow = TRUE; break; }
-#endif
-
-#ifndef EBCDIC  /* ASCII/UTF-8 coding */
-          if (cc >= CHAR_a) cc -= 32;               /* Convert to upper case */
-          c = (c << 4) + cc - ((cc < CHAR_A)? CHAR_0 : (CHAR_A - 10));
-#else           /* EBCDIC coding */
-          if (cc >= CHAR_a && cc <= CHAR_z) cc += 64;  /* Convert to upper case */
-          c = (c << 4) + cc - ((cc >= CHAR_0)? CHAR_0 : (CHAR_A - 10));
-#endif
-
-#if defined COMPILE_PCRE8
-          if (c > (utf ? 0x10ffffU : 0xffU)) { overflow = TRUE; break; }
-#elif defined COMPILE_PCRE16
-          if (c > (utf ? 0x10ffffU : 0xffffU)) { overflow = TRUE; break; }
-#elif defined COMPILE_PCRE32
-          if (utf && c > 0x10ffffU) { overflow = TRUE; break; }
-#endif
-          }
-
-        if (overflow)
-          {
-          while (MAX_255(*ptr) && (digitab[*ptr] & ctype_xdigit) != 0) ptr++;
-          *errorcodeptr = ERR34;
-          }
-
-        else if (*ptr == CHAR_RIGHT_CURLY_BRACKET)
-          {
-          if (utf && c >= 0xd800 && c <= 0xdfff) *errorcodeptr = ERR73;
-          }
-
-        /* If the sequence of hex digits does not end with '}', give an error.
-        We used just to recognize this construct and fall through to the normal
-        \x handling, but nowadays Perl gives an error, which seems much more
-        sensible, so we do too. */
-
-        else *errorcodeptr = ERR79;
-        }   /* End of \x{} processing */
-
-      /* Read a single-byte hex-defined char (up to two hex digits after \x) */
-
-      else
-        {
-        c = 0;
-        while (i++ < 2 && MAX_255(ptr[1]) && (digitab[ptr[1]] & ctype_xdigit) != 0)
-          {
-          pcre_uint32 cc;                          /* Some compilers don't like */
-          cc = *(++ptr);                           /* ++ in initializers */
-#ifndef EBCDIC  /* ASCII/UTF-8 coding */
-          if (cc >= CHAR_a) cc -= 32;              /* Convert to upper case */
-          c = c * 16 + cc - ((cc < CHAR_A)? CHAR_0 : (CHAR_A - 10));
-#else           /* EBCDIC coding */
-          if (cc <= CHAR_z) cc += 64;              /* Convert to upper case */
-          c = c * 16 + cc - ((cc >= CHAR_0)? CHAR_0 : (CHAR_A - 10));
-#endif
-          }
-        }     /* End of \xdd handling */
-      }       /* End of Perl-style \x handling */
-    break;
-
-    /* For \c, a following letter is upper-cased; then the 0x40 bit is flipped.
-    An error is given if the byte following \c is not an ASCII character. This
-    coding is ASCII-specific, but then the whole concept of \cx is
-    ASCII-specific. (However, an EBCDIC equivalent has now been added.) */
-
-    case CHAR_c:
-    c = *(++ptr);
-    if (c == CHAR_NULL)
-      {
-      *errorcodeptr = ERR2;
-      break;
-      }
-#ifndef EBCDIC    /* ASCII/UTF-8 coding */
-    if (c > 127)  /* Excludes all non-ASCII in either mode */
-      {
-      *errorcodeptr = ERR68;
-      break;
-      }
-    if (c >= CHAR_a && c <= CHAR_z) c -= 32;
-    c ^= 0x40;
-#else             /* EBCDIC coding */
-    if (c >= CHAR_a && c <= CHAR_z) c += 64;
-    c ^= 0xC0;
-#endif
-    break;
-
-    /* PCRE_EXTRA enables extensions to Perl in the matter of escapes. Any
-    other alphanumeric following \ is an error if PCRE_EXTRA was set;
-    otherwise, for Perl compatibility, it is a literal. This code looks a bit
-    odd, but there used to be some cases other than the default, and there may
-    be again in future, so I haven't "optimized" it. */
-
-    default:
-    if ((options & PCRE_EXTRA) != 0) switch(c)
-      {
-      default:
-      *errorcodeptr = ERR3;
-      break;
-      }
-    break;
-    }
-  }
-
-/* Perl supports \N{name} for character names, as well as plain \N for "not
-newline". PCRE does not support \N{name}. However, it does support
-quantification such as \N{2,3}. */
-
-if (escape == ESC_N && ptr[1] == CHAR_LEFT_CURLY_BRACKET &&
-     !is_counted_repeat(ptr+2))
-  *errorcodeptr = ERR37;
-
-/* If PCRE_UCP is set, we change the values for \d etc. */
-
-if ((options & PCRE_UCP) != 0 && escape >= ESC_D && escape <= ESC_w)
-  escape += (ESC_DU - ESC_D);
-
-/* Set the pointer to the final character before returning. */
-
-*ptrptr = ptr;
-*chptr = c;
-return escape;
-}
-
-
-
-#ifdef SUPPORT_UCP
-/*************************************************
-*               Handle \P and \p                 *
-*************************************************/
-
-/* This function is called after \P or \p has been encountered, provided that
-PCRE is compiled with support for Unicode properties. On entry, ptrptr is
-pointing at the P or p. On exit, it is pointing at the final character of the
-escape sequence.
-
-Argument:
-  ptrptr         points to the pattern position pointer
-  negptr         points to a boolean that is set TRUE for negation else FALSE
-  ptypeptr       points to an unsigned int that is set to the type value
-  pdataptr       points to an unsigned int that is set to the detailed property value
-  errorcodeptr   points to the error code variable
-
-Returns:         TRUE if the type value was found, or FALSE for an invalid type
-*/
-
-static BOOL
-get_ucp(const pcre_uchar **ptrptr, BOOL *negptr, unsigned int *ptypeptr,
-  unsigned int *pdataptr, int *errorcodeptr)
-{
-pcre_uchar c;
-int i, bot, top;
-const pcre_uchar *ptr = *ptrptr;
-pcre_uchar name[32];
-
-c = *(++ptr);
-if (c == CHAR_NULL) goto ERROR_RETURN;
-
-*negptr = FALSE;
-
-/* \P or \p can be followed by a name in {}, optionally preceded by ^ for
-negation. */
-
-if (c == CHAR_LEFT_CURLY_BRACKET)
-  {
-  if (ptr[1] == CHAR_CIRCUMFLEX_ACCENT)
-    {
-    *negptr = TRUE;
-    ptr++;
-    }
-  for (i = 0; i < (int)(sizeof(name) / sizeof(pcre_uchar)) - 1; i++)
-    {
-    c = *(++ptr);
-    if (c == CHAR_NULL) goto ERROR_RETURN;
-    if (c == CHAR_RIGHT_CURLY_BRACKET) break;
-    name[i] = c;
-    }
-  if (c != CHAR_RIGHT_CURLY_BRACKET) goto ERROR_RETURN;
-  name[i] = 0;
-  }
-
-/* Otherwise there is just one following character */
-
-else
-  {
-  name[0] = c;
-  name[1] = 0;
-  }
-
-*ptrptr = ptr;
-
-/* Search for a recognized property name using binary chop */
-
-bot = 0;
-top = PRIV(utt_size);
-
-while (bot < top)
-  {
-  int r;
-  i = (bot + top) >> 1;
-  r = STRCMP_UC_C8(name, PRIV(utt_names) + PRIV(utt)[i].name_offset);
-  if (r == 0)
-    {
-    *ptypeptr = PRIV(utt)[i].type;
-    *pdataptr = PRIV(utt)[i].value;
-    return TRUE;
-    }
-  if (r > 0) bot = i + 1; else top = i;
-  }
-
-*errorcodeptr = ERR47;
-*ptrptr = ptr;
-return FALSE;
-
-ERROR_RETURN:
-*errorcodeptr = ERR46;
-*ptrptr = ptr;
-return FALSE;
-}
-#endif
-
-
-
-/*************************************************
-*         Read repeat counts                     *
-*************************************************/
-
-/* Read an item of the form {n,m} and return the values. This is called only
-after is_counted_repeat() has confirmed that a repeat-count quantifier exists,
-so the syntax is guaranteed to be correct, but we need to check the values.
-
-Arguments:
-  p              pointer to first char after '{'
-  minp           pointer to int for min
-  maxp           pointer to int for max
-                 returned as -1 if no max
-  errorcodeptr   points to error code variable
-
-Returns:         pointer to '}' on success;
-                 current ptr on error, with errorcodeptr set non-zero
-*/
-
-static const pcre_uchar *
-read_repeat_counts(const pcre_uchar *p, int *minp, int *maxp, int *errorcodeptr)
-{
-int min = 0;
-int max = -1;
-
-/* Read the minimum value and do a paranoid check: a negative value indicates
-an integer overflow. */
-
-while (IS_DIGIT(*p)) min = min * 10 + (int)(*p++ - CHAR_0);
-if (min < 0 || min > 65535)
-  {
-  *errorcodeptr = ERR5;
-  return p;
-  }
-
-/* Read the maximum value if there is one, and again do a paranoid on its size.
-Also, max must not be less than min. */
-
-if (*p == CHAR_RIGHT_CURLY_BRACKET) max = min; else
-  {
-  if (*(++p) != CHAR_RIGHT_CURLY_BRACKET)
-    {
-    max = 0;
-    while(IS_DIGIT(*p)) max = max * 10 + (int)(*p++ - CHAR_0);
-    if (max < 0 || max > 65535)
-      {
-      *errorcodeptr = ERR5;
-      return p;
-      }
-    if (max < min)
-      {
-      *errorcodeptr = ERR4;
-      return p;
-      }
-    }
-  }
-
-/* Fill in the required variables, and pass back the pointer to the terminating
-'}'. */
-
-*minp = min;
-*maxp = max;
-return p;
-}
-
-
-
-/*************************************************
-*      Find first significant op code            *
-*************************************************/
-
-/* This is called by several functions that scan a compiled expression looking
-for a fixed first character, or an anchoring op code etc. It skips over things
-that do not influence this. For some calls, it makes sense to skip negative
-forward and all backward assertions, and also the \b assertion; for others it
-does not.
-
-Arguments:
-  code         pointer to the start of the group
-  skipassert   TRUE if certain assertions are to be skipped
-
-Returns:       pointer to the first significant opcode
-*/
-
-static const pcre_uchar*
-first_significant_code(const pcre_uchar *code, BOOL skipassert)
-{
-for (;;)
-  {
-  switch ((int)*code)
-    {
-    case OP_ASSERT_NOT:
-    case OP_ASSERTBACK:
-    case OP_ASSERTBACK_NOT:
-    if (!skipassert) return code;
-    do code += GET(code, 1); while (*code == OP_ALT);
-    code += PRIV(OP_lengths)[*code];
-    break;
-
-    case OP_WORD_BOUNDARY:
-    case OP_NOT_WORD_BOUNDARY:
-    if (!skipassert) return code;
-    /* Fall through */
-
-    case OP_CALLOUT:
-    case OP_CREF:
-    case OP_DNCREF:
-    case OP_RREF:
-    case OP_DNRREF:
-    case OP_DEF:
-    code += PRIV(OP_lengths)[*code];
-    break;
-
-    default:
-    return code;
-    }
-  }
-/* Control never reaches here */
-}
-
-
-
-/*************************************************
-*        Find the fixed length of a branch       *
-*************************************************/
-
-/* Scan a branch and compute the fixed length of subject that will match it,
-if the length is fixed. This is needed for dealing with backward assertions.
-In UTF8 mode, the result is in characters rather than bytes. The branch is
-temporarily terminated with OP_END when this function is called.
-
-This function is called when a backward assertion is encountered, so that if it
-fails, the error message can point to the correct place in the pattern.
-However, we cannot do this when the assertion contains subroutine calls,
-because they can be forward references. We solve this by remembering this case
-and doing the check at the end; a flag specifies which mode we are running in.
-
-Arguments:
-  code     points to the start of the pattern (the bracket)
-  utf      TRUE in UTF-8 / UTF-16 / UTF-32 mode
-  atend    TRUE if called when the pattern is complete
-  cd       the "compile data" structure
-
-Returns:   the fixed length,
-             or -1 if there is no fixed length,
-             or -2 if \C was encountered (in UTF-8 mode only)
-             or -3 if an OP_RECURSE item was encountered and atend is FALSE
-             or -4 if an unknown opcode was encountered (internal error)
-*/
-
-static int
-find_fixedlength(pcre_uchar *code, BOOL utf, BOOL atend, compile_data *cd)
-{
-int length = -1;
-
-register int branchlength = 0;
-register pcre_uchar *cc = code + 1 + LINK_SIZE;
-
-/* Scan along the opcodes for this branch. If we get to the end of the
-branch, check the length against that of the other branches. */
-
-for (;;)
-  {
-  int d;
-  pcre_uchar *ce, *cs;
-  register pcre_uchar op = *cc;
-
-  switch (op)
-    {
-    /* We only need to continue for OP_CBRA (normal capturing bracket) and
-    OP_BRA (normal non-capturing bracket) because the other variants of these
-    opcodes are all concerned with unlimited repeated groups, which of course
-    are not of fixed length. */
-
-    case OP_CBRA:
-    case OP_BRA:
-    case OP_ONCE:
-    case OP_ONCE_NC:
-    case OP_COND:
-    d = find_fixedlength(cc + ((op == OP_CBRA)? IMM2_SIZE : 0), utf, atend, cd);
-    if (d < 0) return d;
-    branchlength += d;
-    do cc += GET(cc, 1); while (*cc == OP_ALT);
-    cc += 1 + LINK_SIZE;
-    break;
-
-    /* Reached end of a branch; if it's a ket it is the end of a nested call.
-    If it's ALT it is an alternation in a nested call. An ACCEPT is effectively
-    an ALT. If it is END it's the end of the outer call. All can be handled by
-    the same code. Note that we must not include the OP_KETRxxx opcodes here,
-    because they all imply an unlimited repeat. */
-
-    case OP_ALT:
-    case OP_KET:
-    case OP_END:
-    case OP_ACCEPT:
-    case OP_ASSERT_ACCEPT:
-    if (length < 0) length = branchlength;
-      else if (length != branchlength) return -1;
-    if (*cc != OP_ALT) return length;
-    cc += 1 + LINK_SIZE;
-    branchlength = 0;
-    break;
-
-    /* A true recursion implies not fixed length, but a subroutine call may
-    be OK. If the subroutine is a forward reference, we can't deal with
-    it until the end of the pattern, so return -3. */
-
-    case OP_RECURSE:
-    if (!atend) return -3;
-    cs = ce = (pcre_uchar *)cd->start_code + GET(cc, 1);  /* Start subpattern */
-    do ce += GET(ce, 1); while (*ce == OP_ALT);           /* End subpattern */
-    if (cc > cs && cc < ce) return -1;                    /* Recursion */
-    d = find_fixedlength(cs + IMM2_SIZE, utf, atend, cd);
-    if (d < 0) return d;
-    branchlength += d;
-    cc += 1 + LINK_SIZE;
-    break;
-
-    /* Skip over assertive subpatterns */
-
-    case OP_ASSERT:
-    case OP_ASSERT_NOT:
-    case OP_ASSERTBACK:
-    case OP_ASSERTBACK_NOT:
-    do cc += GET(cc, 1); while (*cc == OP_ALT);
-    cc += PRIV(OP_lengths)[*cc];
-    break;
-
-    /* Skip over things that don't match chars */
-
-    case OP_MARK:
-    case OP_PRUNE_ARG:
-    case OP_SKIP_ARG:
-    case OP_THEN_ARG:
-    cc += cc[1] + PRIV(OP_lengths)[*cc];
-    break;
-
-    case OP_CALLOUT:
-    case OP_CIRC:
-    case OP_CIRCM:
-    case OP_CLOSE:
-    case OP_COMMIT:
-    case OP_CREF:
-    case OP_DEF:
-    case OP_DNCREF:
-    case OP_DNRREF:
-    case OP_DOLL:
-    case OP_DOLLM:
-    case OP_EOD:
-    case OP_EODN:
-    case OP_FAIL:
-    case OP_NOT_WORD_BOUNDARY:
-    case OP_PRUNE:
-    case OP_REVERSE:
-    case OP_RREF:
-    case OP_SET_SOM:
-    case OP_SKIP:
-    case OP_SOD:
-    case OP_SOM:
-    case OP_THEN:
-    case OP_WORD_BOUNDARY:
-    cc += PRIV(OP_lengths)[*cc];
-    break;
-
-    /* Handle literal characters */
-
-    case OP_CHAR:
-    case OP_CHARI:
-    case OP_NOT:
-    case OP_NOTI:
-    branchlength++;
-    cc += 2;
-#ifdef SUPPORT_UTF
-    if (utf && HAS_EXTRALEN(cc[-1])) cc += GET_EXTRALEN(cc[-1]);
-#endif
-    break;
-
-    /* Handle exact repetitions. The count is already in characters, but we
-    need to skip over a multibyte character in UTF8 mode.  */
-
-    case OP_EXACT:
-    case OP_EXACTI:
-    case OP_NOTEXACT:
-    case OP_NOTEXACTI:
-    branchlength += (int)GET2(cc,1);
-    cc += 2 + IMM2_SIZE;
-#ifdef SUPPORT_UTF
-    if (utf && HAS_EXTRALEN(cc[-1])) cc += GET_EXTRALEN(cc[-1]);
-#endif
-    break;
-
-    case OP_TYPEEXACT:
-    branchlength += GET2(cc,1);
-    if (cc[1 + IMM2_SIZE] == OP_PROP || cc[1 + IMM2_SIZE] == OP_NOTPROP)
-      cc += 2;
-    cc += 1 + IMM2_SIZE + 1;
-    break;
-
-    /* Handle single-char matchers */
-
-    case OP_PROP:
-    case OP_NOTPROP:
-    cc += 2;
-    /* Fall through */
-
-    case OP_HSPACE:
-    case OP_VSPACE:
-    case OP_NOT_HSPACE:
-    case OP_NOT_VSPACE:
-    case OP_NOT_DIGIT:
-    case OP_DIGIT:
-    case OP_NOT_WHITESPACE:
-    case OP_WHITESPACE:
-    case OP_NOT_WORDCHAR:
-    case OP_WORDCHAR:
-    case OP_ANY:
-    case OP_ALLANY:
-    branchlength++;
-    cc++;
-    break;
-
-    /* The single-byte matcher isn't allowed. This only happens in UTF-8 mode;
-    otherwise \C is coded as OP_ALLANY. */
-
-    case OP_ANYBYTE:
-    return -2;
-
-    /* Check a class for variable quantification */
-
-    case OP_CLASS:
-    case OP_NCLASS:
-#if defined SUPPORT_UTF || defined COMPILE_PCRE16 || defined COMPILE_PCRE32
-    case OP_XCLASS:
-    /* The original code caused an unsigned overflow in 64 bit systems,
-    so now we use a conditional statement. */
-    if (op == OP_XCLASS)
-      cc += GET(cc, 1);
-    else
-      cc += PRIV(OP_lengths)[OP_CLASS];
-#else
-    cc += PRIV(OP_lengths)[OP_CLASS];
-#endif
-
-    switch (*cc)
-      {
-      case OP_CRSTAR:
-      case OP_CRMINSTAR:
-      case OP_CRPLUS:
-      case OP_CRMINPLUS:
-      case OP_CRQUERY:
-      case OP_CRMINQUERY:
-      case OP_CRPOSSTAR:
-      case OP_CRPOSPLUS:
-      case OP_CRPOSQUERY:
-      return -1;
-
-      case OP_CRRANGE:
-      case OP_CRMINRANGE:
-      case OP_CRPOSRANGE:
-      if (GET2(cc,1) != GET2(cc,1+IMM2_SIZE)) return -1;
-      branchlength += (int)GET2(cc,1);
-      cc += 1 + 2 * IMM2_SIZE;
-      break;
-
-      default:
-      branchlength++;
-      }
-    break;
-
-    /* Anything else is variable length */
-
-    case OP_ANYNL:
-    case OP_BRAMINZERO:
-    case OP_BRAPOS:
-    case OP_BRAPOSZERO:
-    case OP_BRAZERO:
-    case OP_CBRAPOS:
-    case OP_EXTUNI:
-    case OP_KETRMAX:
-    case OP_KETRMIN:
-    case OP_KETRPOS:
-    case OP_MINPLUS:
-    case OP_MINPLUSI:
-    case OP_MINQUERY:
-    case OP_MINQUERYI:
-    case OP_MINSTAR:
-    case OP_MINSTARI:
-    case OP_MINUPTO:
-    case OP_MINUPTOI:
-    case OP_NOTMINPLUS:
-    case OP_NOTMINPLUSI:
-    case OP_NOTMINQUERY:
-    case OP_NOTMINQUERYI:
-    case OP_NOTMINSTAR:
-    case OP_NOTMINSTARI:
-    case OP_NOTMINUPTO:
-    case OP_NOTMINUPTOI:
-    case OP_NOTPLUS:
-    case OP_NOTPLUSI:
-    case OP_NOTPOSPLUS:
-    case OP_NOTPOSPLUSI:
-    case OP_NOTPOSQUERY:
-    case OP_NOTPOSQUERYI:
-    case OP_NOTPOSSTAR:
-    case OP_NOTPOSSTARI:
-    case OP_NOTPOSUPTO:
-    case OP_NOTPOSUPTOI:
-    case OP_NOTQUERY:
-    case OP_NOTQUERYI:
-    case OP_NOTSTAR:
-    case OP_NOTSTARI:
-    case OP_NOTUPTO:
-    case OP_NOTUPTOI:
-    case OP_PLUS:
-    case OP_PLUSI:
-    case OP_POSPLUS:
-    case OP_POSPLUSI:
-    case OP_POSQUERY:
-    case OP_POSQUERYI:
-    case OP_POSSTAR:
-    case OP_POSSTARI:
-    case OP_POSUPTO:
-    case OP_POSUPTOI:
-    case OP_QUERY:
-    case OP_QUERYI:
-    case OP_REF:
-    case OP_REFI:
-    case OP_DNREF:
-    case OP_DNREFI:
-    case OP_SBRA:
-    case OP_SBRAPOS:
-    case OP_SCBRA:
-    case OP_SCBRAPOS:
-    case OP_SCOND:
-    case OP_SKIPZERO:
-    case OP_STAR:
-    case OP_STARI:
-    case OP_TYPEMINPLUS:
-    case OP_TYPEMINQUERY:
-    case OP_TYPEMINSTAR:
-    case OP_TYPEMINUPTO:
-    case OP_TYPEPLUS:
-    case OP_TYPEPOSPLUS:
-    case OP_TYPEPOSQUERY:
-    case OP_TYPEPOSSTAR:
-    case OP_TYPEPOSUPTO:
-    case OP_TYPEQUERY:
-    case OP_TYPESTAR:
-    case OP_TYPEUPTO:
-    case OP_UPTO:
-    case OP_UPTOI:
-    return -1;
-
-    /* Catch unrecognized opcodes so that when new ones are added they
-    are not forgotten, as has happened in the past. */
-
-    default:
-    return -4;
-    }
-  }
-/* Control never gets here */
-}
-
-
-
-/*************************************************
-*    Scan compiled regex for specific bracket    *
-*************************************************/
-
-/* This little function scans through a compiled pattern until it finds a
-capturing bracket with the given number, or, if the number is negative, an
-instance of OP_REVERSE for a lookbehind. The function is global in the C sense
-so that it can be called from pcre_study() when finding the minimum matching
-length.
-
-Arguments:
-  code        points to start of expression
-  utf         TRUE in UTF-8 / UTF-16 / UTF-32 mode
-  number      the required bracket number or negative to find a lookbehind
-
-Returns:      pointer to the opcode for the bracket, or NULL if not found
-*/
-
-const pcre_uchar *
-PRIV(find_bracket)(const pcre_uchar *code, BOOL utf, int number)
-{
-for (;;)
-  {
-  register pcre_uchar c = *code;
-
-  if (c == OP_END) return NULL;
-
-  /* XCLASS is used for classes that cannot be represented just by a bit
-  map. This includes negated single high-valued characters. The length in
-  the table is zero; the actual length is stored in the compiled code. */
-
-  if (c == OP_XCLASS) code += GET(code, 1);
-
-  /* Handle recursion */
-
-  else if (c == OP_REVERSE)
-    {
-    if (number < 0) return (pcre_uchar *)code;
-    code += PRIV(OP_lengths)[c];
-    }
-
-  /* Handle capturing bracket */
-
-  else if (c == OP_CBRA || c == OP_SCBRA ||
-           c == OP_CBRAPOS || c == OP_SCBRAPOS)
-    {
-    int n = (int)GET2(code, 1+LINK_SIZE);
-    if (n == number) return (pcre_uchar *)code;
-    code += PRIV(OP_lengths)[c];
-    }
-
-  /* Otherwise, we can get the item's length from the table, except that for
-  repeated character types, we have to test for \p and \P, which have an extra
-  two bytes of parameters, and for MARK/PRUNE/SKIP/THEN with an argument, we
-  must add in its length. */
-
-  else
-    {
-    switch(c)
-      {
-      case OP_TYPESTAR:
-      case OP_TYPEMINSTAR:
-      case OP_TYPEPLUS:
-      case OP_TYPEMINPLUS:
-      case OP_TYPEQUERY:
-      case OP_TYPEMINQUERY:
-      case OP_TYPEPOSSTAR:
-      case OP_TYPEPOSPLUS:
-      case OP_TYPEPOSQUERY:
-      if (code[1] == OP_PROP || code[1] == OP_NOTPROP) code += 2;
-      break;
-
-      case OP_TYPEUPTO:
-      case OP_TYPEMINUPTO:
-      case OP_TYPEEXACT:
-      case OP_TYPEPOSUPTO:
-      if (code[1 + IMM2_SIZE] == OP_PROP || code[1 + IMM2_SIZE] == OP_NOTPROP)
-        code += 2;
-      break;
-
-      case OP_MARK:
-      case OP_PRUNE_ARG:
-      case OP_SKIP_ARG:
-      case OP_THEN_ARG:
-      code += code[1];
-      break;
-      }
-
-    /* Add in the fixed length from the table */
-
-    code += PRIV(OP_lengths)[c];
-
-  /* In UTF-8 mode, opcodes that are followed by a character may be followed by
-  a multi-byte character. The length in the table is a minimum, so we have to
-  arrange to skip the extra bytes. */
-
-#if defined SUPPORT_UTF && !defined COMPILE_PCRE32
-    if (utf) switch(c)
-      {
-      case OP_CHAR:
-      case OP_CHARI:
-      case OP_EXACT:
-      case OP_EXACTI:
-      case OP_UPTO:
-      case OP_UPTOI:
-      case OP_MINUPTO:
-      case OP_MINUPTOI:
-      case OP_POSUPTO:
-      case OP_POSUPTOI:
-      case OP_STAR:
-      case OP_STARI:
-      case OP_MINSTAR:
-      case OP_MINSTARI:
-      case OP_POSSTAR:
-      case OP_POSSTARI:
-      case OP_PLUS:
-      case OP_PLUSI:
-      case OP_MINPLUS:
-      case OP_MINPLUSI:
-      case OP_POSPLUS:
-      case OP_POSPLUSI:
-      case OP_QUERY:
-      case OP_QUERYI:
-      case OP_MINQUERY:
-      case OP_MINQUERYI:
-      case OP_POSQUERY:
-      case OP_POSQUERYI:
-      if (HAS_EXTRALEN(code[-1])) code += GET_EXTRALEN(code[-1]);
-      break;
-      }
-#else
-    (void)(utf);  /* Keep compiler happy by referencing function argument */
-#endif
-    }
-  }
-}
-
-
-
-/*************************************************
-*   Scan compiled regex for recursion reference  *
-*************************************************/
-
-/* This little function scans through a compiled pattern until it finds an
-instance of OP_RECURSE.
-
-Arguments:
-  code        points to start of expression
-  utf         TRUE in UTF-8 / UTF-16 / UTF-32 mode
-
-Returns:      pointer to the opcode for OP_RECURSE, or NULL if not found
-*/
-
-static const pcre_uchar *
-find_recurse(const pcre_uchar *code, BOOL utf)
-{
-for (;;)
-  {
-  register pcre_uchar c = *code;
-  if (c == OP_END) return NULL;
-  if (c == OP_RECURSE) return code;
-
-  /* XCLASS is used for classes that cannot be represented just by a bit
-  map. This includes negated single high-valued characters. The length in
-  the table is zero; the actual length is stored in the compiled code. */
-
-  if (c == OP_XCLASS) code += GET(code, 1);
-
-  /* Otherwise, we can get the item's length from the table, except that for
-  repeated character types, we have to test for \p and \P, which have an extra
-  two bytes of parameters, and for MARK/PRUNE/SKIP/THEN with an argument, we
-  must add in its length. */
-
-  else
-    {
-    switch(c)
-      {
-      case OP_TYPESTAR:
-      case OP_TYPEMINSTAR:
-      case OP_TYPEPLUS:
-      case OP_TYPEMINPLUS:
-      case OP_TYPEQUERY:
-      case OP_TYPEMINQUERY:
-      case OP_TYPEPOSSTAR:
-      case OP_TYPEPOSPLUS:
-      case OP_TYPEPOSQUERY:
-      if (code[1] == OP_PROP || code[1] == OP_NOTPROP) code += 2;
-      break;
-
-      case OP_TYPEPOSUPTO:
-      case OP_TYPEUPTO:
-      case OP_TYPEMINUPTO:
-      case OP_TYPEEXACT:
-      if (code[1 + IMM2_SIZE] == OP_PROP || code[1 + IMM2_SIZE] == OP_NOTPROP)
-        code += 2;
-      break;
-
-      case OP_MARK:
-      case OP_PRUNE_ARG:
-      case OP_SKIP_ARG:
-      case OP_THEN_ARG:
-      code += code[1];
-      break;
-      }
-
-    /* Add in the fixed length from the table */
-
-    code += PRIV(OP_lengths)[c];
-
-    /* In UTF-8 mode, opcodes that are followed by a character may be followed
-    by a multi-byte character. The length in the table is a minimum, so we have
-    to arrange to skip the extra bytes. */
-
-#if defined SUPPORT_UTF && !defined COMPILE_PCRE32
-    if (utf) switch(c)
-      {
-      case OP_CHAR:
-      case OP_CHARI:
-      case OP_NOT:
-      case OP_NOTI:
-      case OP_EXACT:
-      case OP_EXACTI:
-      case OP_NOTEXACT:
-      case OP_NOTEXACTI:
-      case OP_UPTO:
-      case OP_UPTOI:
-      case OP_NOTUPTO:
-      case OP_NOTUPTOI:
-      case OP_MINUPTO:
-      case OP_MINUPTOI:
-      case OP_NOTMINUPTO:
-      case OP_NOTMINUPTOI:
-      case OP_POSUPTO:
-      case OP_POSUPTOI:
-      case OP_NOTPOSUPTO:
-      case OP_NOTPOSUPTOI:
-      case OP_STAR:
-      case OP_STARI:
-      case OP_NOTSTAR:
-      case OP_NOTSTARI:
-      case OP_MINSTAR:
-      case OP_MINSTARI:
-      case OP_NOTMINSTAR:
-      case OP_NOTMINSTARI:
-      case OP_POSSTAR:
-      case OP_POSSTARI:
-      case OP_NOTPOSSTAR:
-      case OP_NOTPOSSTARI:
-      case OP_PLUS:
-      case OP_PLUSI:
-      case OP_NOTPLUS:
-      case OP_NOTPLUSI:
-      case OP_MINPLUS:
-      case OP_MINPLUSI:
-      case OP_NOTMINPLUS:
-      case OP_NOTMINPLUSI:
-      case OP_POSPLUS:
-      case OP_POSPLUSI:
-      case OP_NOTPOSPLUS:
-      case OP_NOTPOSPLUSI:
-      case OP_QUERY:
-      case OP_QUERYI:
-      case OP_NOTQUERY:
-      case OP_NOTQUERYI:
-      case OP_MINQUERY:
-      case OP_MINQUERYI:
-      case OP_NOTMINQUERY:
-      case OP_NOTMINQUERYI:
-      case OP_POSQUERY:
-      case OP_POSQUERYI:
-      case OP_NOTPOSQUERY:
-      case OP_NOTPOSQUERYI:
-      if (HAS_EXTRALEN(code[-1])) code += GET_EXTRALEN(code[-1]);
-      break;
-      }
-#else
-    (void)(utf);  /* Keep compiler happy by referencing function argument */
-#endif
-    }
-  }
-}
-
-
-
-/*************************************************
-*    Scan compiled branch for non-emptiness      *
-*************************************************/
-
-/* This function scans through a branch of a compiled pattern to see whether it
-can match the empty string or not. It is called from could_be_empty()
-below and from compile_branch() when checking for an unlimited repeat of a
-group that can match nothing. Note that first_significant_code() skips over
-backward and negative forward assertions when its final argument is TRUE. If we
-hit an unclosed bracket, we return "empty" - this means we've struck an inner
-bracket whose current branch will already have been scanned.
-
-Arguments:
-  code        points to start of search
-  endcode     points to where to stop
-  utf         TRUE if in UTF-8 / UTF-16 / UTF-32 mode
-  cd          contains pointers to tables etc.
-  recurses    chain of recurse_check to catch mutual recursion
-
-Returns:      TRUE if what is matched could be empty
-*/
-
-typedef struct recurse_check {
-  struct recurse_check *prev;
-  const pcre_uchar *group;
-} recurse_check;
-
-static BOOL
-could_be_empty_branch(const pcre_uchar *code, const pcre_uchar *endcode,
-  BOOL utf, compile_data *cd, recurse_check *recurses)
-{
-register pcre_uchar c;
-recurse_check this_recurse;
-
-for (code = first_significant_code(code + PRIV(OP_lengths)[*code], TRUE);
-     code < endcode;
-     code = first_significant_code(code + PRIV(OP_lengths)[c], TRUE))
-  {
-  const pcre_uchar *ccode;
-
-  c = *code;
-
-  /* Skip over forward assertions; the other assertions are skipped by
-  first_significant_code() with a TRUE final argument. */
-
-  if (c == OP_ASSERT)
-    {
-    do code += GET(code, 1); while (*code == OP_ALT);
-    c = *code;
-    continue;
-    }
-
-  /* For a recursion/subroutine call, if its end has been reached, which
-  implies a backward reference subroutine call, we can scan it. If it's a
-  forward reference subroutine call, we can't. To detect forward reference
-  we have to scan up the list that is kept in the workspace. This function is
-  called only when doing the real compile, not during the pre-compile that
-  measures the size of the compiled pattern. */
-
-  if (c == OP_RECURSE)
-    {
-    const pcre_uchar *scode = cd->start_code + GET(code, 1);
-    BOOL empty_branch;
-
-    /* Test for forward reference or uncompleted reference. This is disabled
-    when called to scan a completed pattern by setting cd->start_workspace to
-    NULL. */
-
-    if (cd->start_workspace != NULL)
-      {
-      const pcre_uchar *tcode;
-      for (tcode = cd->start_workspace; tcode < cd->hwm; tcode += LINK_SIZE)
-        if ((int)GET(tcode, 0) == (int)(code + 1 - cd->start_code)) return TRUE;
-      if (GET(scode, 1) == 0) return TRUE;    /* Unclosed */
-      }
-
-    /* If we are scanning a completed pattern, there are no forward references
-    and all groups are complete. We need to detect whether this is a recursive
-    call, as otherwise there will be an infinite loop. If it is a recursion,
-    just skip over it. Simple recursions are easily detected. For mutual
-    recursions we keep a chain on the stack. */
-
-    else
-      {
-      recurse_check *r = recurses;
-      const pcre_uchar *endgroup = scode;
-
-      do endgroup += GET(endgroup, 1); while (*endgroup == OP_ALT);
-      if (code >= scode && code <= endgroup) continue;  /* Simple recursion */
-
-      for (r = recurses; r != NULL; r = r->prev)
-        if (r->group == scode) break;
-      if (r != NULL) continue;   /* Mutual recursion */
-      }
-
-    /* Completed reference; scan the referenced group, remembering it on the
-    stack chain to detect mutual recursions. */
-
-    empty_branch = FALSE;
-    this_recurse.prev = recurses;
-    this_recurse.group = scode;
-
-    do
-      {
-      if (could_be_empty_branch(scode, endcode, utf, cd, &this_recurse))
-        {
-        empty_branch = TRUE;
-        break;
-        }
-      scode += GET(scode, 1);
-      }
-    while (*scode == OP_ALT);
-
-    if (!empty_branch) return FALSE;  /* All branches are non-empty */
-    continue;
-    }
-
-  /* Groups with zero repeats can of course be empty; skip them. */
-
-  if (c == OP_BRAZERO || c == OP_BRAMINZERO || c == OP_SKIPZERO ||
-      c == OP_BRAPOSZERO)
-    {
-    code += PRIV(OP_lengths)[c];
-    do code += GET(code, 1); while (*code == OP_ALT);
-    c = *code;
-    continue;
-    }
-
-  /* A nested group that is already marked as "could be empty" can just be
-  skipped. */
-
-  if (c == OP_SBRA  || c == OP_SBRAPOS ||
-      c == OP_SCBRA || c == OP_SCBRAPOS)
-    {
-    do code += GET(code, 1); while (*code == OP_ALT);
-    c = *code;
-    continue;
-    }
-
-  /* For other groups, scan the branches. */
-
-  if (c == OP_BRA  || c == OP_BRAPOS ||
-      c == OP_CBRA || c == OP_CBRAPOS ||
-      c == OP_ONCE || c == OP_ONCE_NC ||
-      c == OP_COND)
-    {
-    BOOL empty_branch;
-    if (GET(code, 1) == 0) return TRUE;    /* Hit unclosed bracket */
-
-    /* If a conditional group has only one branch, there is a second, implied,
-    empty branch, so just skip over the conditional, because it could be empty.
-    Otherwise, scan the individual branches of the group. */
-
-    if (c == OP_COND && code[GET(code, 1)] != OP_ALT)
-      code += GET(code, 1);
-    else
-      {
-      empty_branch = FALSE;
-      do
-        {
-        if (!empty_branch && could_be_empty_branch(code, endcode, utf, cd, NULL))
-          empty_branch = TRUE;
-        code += GET(code, 1);
-        }
-      while (*code == OP_ALT);
-      if (!empty_branch) return FALSE;   /* All branches are non-empty */
-      }
-
-    c = *code;
-    continue;
-    }
-
-  /* Handle the other opcodes */
-
-  switch (c)
-    {
-    /* Check for quantifiers after a class. XCLASS is used for classes that
-    cannot be represented just by a bit map. This includes negated single
-    high-valued characters. The length in PRIV(OP_lengths)[] is zero; the
-    actual length is stored in the compiled code, so we must update "code"
-    here. */
-
-#if defined SUPPORT_UTF || !defined COMPILE_PCRE8
-    case OP_XCLASS:
-    ccode = code += GET(code, 1);
-    goto CHECK_CLASS_REPEAT;
-#endif
-
-    case OP_CLASS:
-    case OP_NCLASS:
-    ccode = code + PRIV(OP_lengths)[OP_CLASS];
-
-#if defined SUPPORT_UTF || !defined COMPILE_PCRE8
-    CHECK_CLASS_REPEAT:
-#endif
-
-    switch (*ccode)
-      {
-      case OP_CRSTAR:            /* These could be empty; continue */
-      case OP_CRMINSTAR:
-      case OP_CRQUERY:
-      case OP_CRMINQUERY:
-      case OP_CRPOSSTAR:
-      case OP_CRPOSQUERY:
-      break;
-
-      default:                   /* Non-repeat => class must match */
-      case OP_CRPLUS:            /* These repeats aren't empty */
-      case OP_CRMINPLUS:
-      case OP_CRPOSPLUS:
-      return FALSE;
-
-      case OP_CRRANGE:
-      case OP_CRMINRANGE:
-      case OP_CRPOSRANGE:
-      if (GET2(ccode, 1) > 0) return FALSE;  /* Minimum > 0 */
-      break;
-      }
-    break;
-
-    /* Opcodes that must match a character */
-
-    case OP_ANY:
-    case OP_ALLANY:
-    case OP_ANYBYTE:
-
-    case OP_PROP:
-    case OP_NOTPROP:
-    case OP_ANYNL:
-
-    case OP_NOT_HSPACE:
-    case OP_HSPACE:
-    case OP_NOT_VSPACE:
-    case OP_VSPACE:
-    case OP_EXTUNI:
-
-    case OP_NOT_DIGIT:
-    case OP_DIGIT:
-    case OP_NOT_WHITESPACE:
-    case OP_WHITESPACE:
-    case OP_NOT_WORDCHAR:
-    case OP_WORDCHAR:
-
-    case OP_CHAR:
-    case OP_CHARI:
-    case OP_NOT:
-    case OP_NOTI:
-
-    case OP_PLUS:
-    case OP_PLUSI:
-    case OP_MINPLUS:
-    case OP_MINPLUSI:
-
-    case OP_NOTPLUS:
-    case OP_NOTPLUSI:
-    case OP_NOTMINPLUS:
-    case OP_NOTMINPLUSI:
-
-    case OP_POSPLUS:
-    case OP_POSPLUSI:
-    case OP_NOTPOSPLUS:
-    case OP_NOTPOSPLUSI:
-
-    case OP_EXACT:
-    case OP_EXACTI:
-    case OP_NOTEXACT:
-    case OP_NOTEXACTI:
-
-    case OP_TYPEPLUS:
-    case OP_TYPEMINPLUS:
-    case OP_TYPEPOSPLUS:
-    case OP_TYPEEXACT:
-
-    return FALSE;
-
-    /* These are going to continue, as they may be empty, but we have to
-    fudge the length for the \p and \P cases. */
-
-    case OP_TYPESTAR:
-    case OP_TYPEMINSTAR:
-    case OP_TYPEPOSSTAR:
-    case OP_TYPEQUERY:
-    case OP_TYPEMINQUERY:
-    case OP_TYPEPOSQUERY:
-    if (code[1] == OP_PROP || code[1] == OP_NOTPROP) code += 2;
-    break;
-
-    /* Same for these */
-
-    case OP_TYPEUPTO:
-    case OP_TYPEMINUPTO:
-    case OP_TYPEPOSUPTO:
-    if (code[1 + IMM2_SIZE] == OP_PROP || code[1 + IMM2_SIZE] == OP_NOTPROP)
-      code += 2;
-    break;
-
-    /* End of branch */
-
-    case OP_KET:
-    case OP_KETRMAX:
-    case OP_KETRMIN:
-    case OP_KETRPOS:
-    case OP_ALT:
-    return TRUE;
-
-    /* In UTF-8 mode, STAR, MINSTAR, POSSTAR, QUERY, MINQUERY, POSQUERY, UPTO,
-    MINUPTO, and POSUPTO and their caseless and negative versions may be
-    followed by a multibyte character. */
-
-#if defined SUPPORT_UTF && !defined COMPILE_PCRE32
-    case OP_STAR:
-    case OP_STARI:
-    case OP_NOTSTAR:
-    case OP_NOTSTARI:
-
-    case OP_MINSTAR:
-    case OP_MINSTARI:
-    case OP_NOTMINSTAR:
-    case OP_NOTMINSTARI:
-
-    case OP_POSSTAR:
-    case OP_POSSTARI:
-    case OP_NOTPOSSTAR:
-    case OP_NOTPOSSTARI:
-
-    case OP_QUERY:
-    case OP_QUERYI:
-    case OP_NOTQUERY:
-    case OP_NOTQUERYI:
-
-    case OP_MINQUERY:
-    case OP_MINQUERYI:
-    case OP_NOTMINQUERY:
-    case OP_NOTMINQUERYI:
-
-    case OP_POSQUERY:
-    case OP_POSQUERYI:
-    case OP_NOTPOSQUERY:
-    case OP_NOTPOSQUERYI:
-
-    if (utf && HAS_EXTRALEN(code[1])) code += GET_EXTRALEN(code[1]);
-    break;
-
-    case OP_UPTO:
-    case OP_UPTOI:
-    case OP_NOTUPTO:
-    case OP_NOTUPTOI:
-
-    case OP_MINUPTO:
-    case OP_MINUPTOI:
-    case OP_NOTMINUPTO:
-    case OP_NOTMINUPTOI:
-
-    case OP_POSUPTO:
-    case OP_POSUPTOI:
-    case OP_NOTPOSUPTO:
-    case OP_NOTPOSUPTOI:
-
-    if (utf && HAS_EXTRALEN(code[1 + IMM2_SIZE])) code += GET_EXTRALEN(code[1 + IMM2_SIZE]);
-    break;
-#endif
-
-    /* MARK, and PRUNE/SKIP/THEN with an argument must skip over the argument
-    string. */
-
-    case OP_MARK:
-    case OP_PRUNE_ARG:
-    case OP_SKIP_ARG:
-    case OP_THEN_ARG:
-    code += code[1];
-    break;
-
-    /* None of the remaining opcodes are required to match a character. */
-
-    default:
-    break;
-    }
-  }
-
-return TRUE;
-}
-
-
-
-/*************************************************
-*    Scan compiled regex for non-emptiness       *
-*************************************************/
-
-/* This function is called to check for left recursive calls. We want to check
-the current branch of the current pattern to see if it could match the empty
-string. If it could, we must look outwards for branches at other levels,
-stopping when we pass beyond the bracket which is the subject of the recursion.
-This function is called only during the real compile, not during the
-pre-compile.
-
-Arguments:
-  code        points to start of the recursion
-  endcode     points to where to stop (current RECURSE item)
-  bcptr       points to the chain of current (unclosed) branch starts
-  utf         TRUE if in UTF-8 / UTF-16 / UTF-32 mode
-  cd          pointers to tables etc
-
-Returns:      TRUE if what is matched could be empty
-*/
-
-static BOOL
-could_be_empty(const pcre_uchar *code, const pcre_uchar *endcode,
-  branch_chain *bcptr, BOOL utf, compile_data *cd)
-{
-while (bcptr != NULL && bcptr->current_branch >= code)
-  {
-  if (!could_be_empty_branch(bcptr->current_branch, endcode, utf, cd, NULL))
-    return FALSE;
-  bcptr = bcptr->outer;
-  }
-return TRUE;
-}
-
-
-
-/*************************************************
-*        Base opcode of repeated opcodes         *
-*************************************************/
-
-/* Returns the base opcode for repeated single character type opcodes. If the
-opcode is not a repeated character type, it returns with the original value.
-
-Arguments:  c opcode
-Returns:    base opcode for the type
-*/
-
-static pcre_uchar
-get_repeat_base(pcre_uchar c)
-{
-return (c > OP_TYPEPOSUPTO)? c :
-       (c >= OP_TYPESTAR)?   OP_TYPESTAR :
-       (c >= OP_NOTSTARI)?   OP_NOTSTARI :
-       (c >= OP_NOTSTAR)?    OP_NOTSTAR :
-       (c >= OP_STARI)?      OP_STARI :
-                             OP_STAR;
-}
-
-
-
-#ifdef SUPPORT_UCP
-/*************************************************
-*        Check a character and a property        *
-*************************************************/
-
-/* This function is called by check_auto_possessive() when a property item
-is adjacent to a fixed character.
-
-Arguments:
-  c            the character
-  ptype        the property type
-  pdata        the data for the type
-  negated      TRUE if it's a negated property (\P or \p{^)
-
-Returns:       TRUE if auto-possessifying is OK
-*/
-
-static BOOL
-check_char_prop(pcre_uint32 c, unsigned int ptype, unsigned int pdata,
-  BOOL negated)
-{
-const pcre_uint32 *p;
-const ucd_record *prop = GET_UCD(c);
-
-switch(ptype)
-  {
-  case PT_LAMP:
-  return (prop->chartype == ucp_Lu ||
-          prop->chartype == ucp_Ll ||
-          prop->chartype == ucp_Lt) == negated;
-
-  case PT_GC:
-  return (pdata == PRIV(ucp_gentype)[prop->chartype]) == negated;
-
-  case PT_PC:
-  return (pdata == prop->chartype) == negated;
-
-  case PT_SC:
-  return (pdata == prop->script) == negated;
-
-  /* These are specials */
-
-  case PT_ALNUM:
-  return (PRIV(ucp_gentype)[prop->chartype] == ucp_L ||
-          PRIV(ucp_gentype)[prop->chartype] == ucp_N) == negated;
-
-  /* Perl space used to exclude VT, but from Perl 5.18 it is included, which
-  means that Perl space and POSIX space are now identical. PCRE was changed
-  at release 8.34. */
-
-  case PT_SPACE:    /* Perl space */
-  case PT_PXSPACE:  /* POSIX space */
-  switch(c)
-    {
-    HSPACE_CASES:
-    VSPACE_CASES:
-    return negated;
-
-    default:
-    return (PRIV(ucp_gentype)[prop->chartype] == ucp_Z) == negated;
-    }
-  break;  /* Control never reaches here */
-
-  case PT_WORD:
-  return (PRIV(ucp_gentype)[prop->chartype] == ucp_L ||
-          PRIV(ucp_gentype)[prop->chartype] == ucp_N ||
-          c == CHAR_UNDERSCORE) == negated;
-
-  case PT_CLIST:
-  p = PRIV(ucd_caseless_sets) + prop->caseset;
-  for (;;)
-    {
-    if (c < *p) return !negated;
-    if (c == *p++) return negated;
-    }
-  break;  /* Control never reaches here */
-  }
-
-return FALSE;
-}
-#endif  /* SUPPORT_UCP */
-
-
-
-/*************************************************
-*        Fill the character property list        *
-*************************************************/
-
-/* Checks whether the code points to an opcode that can take part in auto-
-possessification, and if so, fills a list with its properties.
-
-Arguments:
-  code        points to start of expression
-  utf         TRUE if in UTF-8 / UTF-16 / UTF-32 mode
-  fcc         points to case-flipping table
-  list        points to output list
-              list[0] will be filled with the opcode
-              list[1] will be non-zero if this opcode
-                can match an empty character string
-              list[2..7] depends on the opcode
-
-Returns:      points to the start of the next opcode if *code is accepted
-              NULL if *code is not accepted
-*/
-
-static const pcre_uchar *
-get_chr_property_list(const pcre_uchar *code, BOOL utf,
-  const pcre_uint8 *fcc, pcre_uint32 *list)
-{
-pcre_uchar c = *code;
-pcre_uchar base;
-const pcre_uchar *end;
-pcre_uint32 chr;
-
-#ifdef SUPPORT_UCP
-pcre_uint32 *clist_dest;
-const pcre_uint32 *clist_src;
-#else
-utf = utf;  /* Suppress "unused parameter" compiler warning */
-#endif
-
-list[0] = c;
-list[1] = FALSE;
-code++;
-
-if (c >= OP_STAR && c <= OP_TYPEPOSUPTO)
-  {
-  base = get_repeat_base(c);
-  c -= (base - OP_STAR);
-
-  if (c == OP_UPTO || c == OP_MINUPTO || c == OP_EXACT || c == OP_POSUPTO)
-    code += IMM2_SIZE;
-
-  list[1] = (c != OP_PLUS && c != OP_MINPLUS && c != OP_EXACT && c != OP_POSPLUS);
-
-  switch(base)
-    {
-    case OP_STAR:
-    list[0] = OP_CHAR;
-    break;
-
-    case OP_STARI:
-    list[0] = OP_CHARI;
-    break;
-
-    case OP_NOTSTAR:
-    list[0] = OP_NOT;
-    break;
-
-    case OP_NOTSTARI:
-    list[0] = OP_NOTI;
-    break;
-
-    case OP_TYPESTAR:
-    list[0] = *code;
-    code++;
-    break;
-    }
-  c = list[0];
-  }
-
-switch(c)
-  {
-  case OP_NOT_DIGIT:
-  case OP_DIGIT:
-  case OP_NOT_WHITESPACE:
-  case OP_WHITESPACE:
-  case OP_NOT_WORDCHAR:
-  case OP_WORDCHAR:
-  case OP_ANY:
-  case OP_ALLANY:
-  case OP_ANYNL:
-  case OP_NOT_HSPACE:
-  case OP_HSPACE:
-  case OP_NOT_VSPACE:
-  case OP_VSPACE:
-  case OP_EXTUNI:
-  case OP_EODN:
-  case OP_EOD:
-  case OP_DOLL:
-  case OP_DOLLM:
-  return code;
-
-  case OP_CHAR:
-  case OP_NOT:
-  GETCHARINCTEST(chr, code);
-  list[2] = chr;
-  list[3] = NOTACHAR;
-  return code;
-
-  case OP_CHARI:
-  case OP_NOTI:
-  list[0] = (c == OP_CHARI) ? OP_CHAR : OP_NOT;
-  GETCHARINCTEST(chr, code);
-  list[2] = chr;
-
-#ifdef SUPPORT_UCP
-  if (chr < 128 || (chr < 256 && !utf))
-    list[3] = fcc[chr];
-  else
-    list[3] = UCD_OTHERCASE(chr);
-#elif defined SUPPORT_UTF || !defined COMPILE_PCRE8
-  list[3] = (chr < 256) ? fcc[chr] : chr;
-#else
-  list[3] = fcc[chr];
-#endif
-
-  /* The othercase might be the same value. */
-
-  if (chr == list[3])
-    list[3] = NOTACHAR;
-  else
-    list[4] = NOTACHAR;
-  return code;
-
-#ifdef SUPPORT_UCP
-  case OP_PROP:
-  case OP_NOTPROP:
-  if (code[0] != PT_CLIST)
-    {
-    list[2] = code[0];
-    list[3] = code[1];
-    return code + 2;
-    }
-
-  /* Convert only if we have enough space. */
-
-  clist_src = PRIV(ucd_caseless_sets) + code[1];
-  clist_dest = list + 2;
-  code += 2;
-
-  do {
-     if (clist_dest >= list + 8)
-       {
-       /* Early return if there is not enough space. This should never
-       happen, since all clists are shorter than 5 character now. */
-       list[2] = code[0];
-       list[3] = code[1];
-       return code;
-       }
-     *clist_dest++ = *clist_src;
-     }
-  while(*clist_src++ != NOTACHAR);
-
-  /* All characters are stored. The terminating NOTACHAR
-  is copied form the clist itself. */
-
-  list[0] = (c == OP_PROP) ? OP_CHAR : OP_NOT;
-  return code;
-#endif
-
-  case OP_NCLASS:
-  case OP_CLASS:
-#if defined SUPPORT_UTF || !defined COMPILE_PCRE8
-  case OP_XCLASS:
-  if (c == OP_XCLASS)
-    end = code + GET(code, 0) - 1;
-  else
-#endif
-    end = code + 32 / sizeof(pcre_uchar);
-
-  switch(*end)
-    {
-    case OP_CRSTAR:
-    case OP_CRMINSTAR:
-    case OP_CRQUERY:
-    case OP_CRMINQUERY:
-    case OP_CRPOSSTAR:
-    case OP_CRPOSQUERY:
-    list[1] = TRUE;
-    end++;
-    break;
-
-    case OP_CRPLUS:
-    case OP_CRMINPLUS:
-    case OP_CRPOSPLUS:
-    end++;
-    break;
-
-    case OP_CRRANGE:
-    case OP_CRMINRANGE:
-    case OP_CRPOSRANGE:
-    list[1] = (GET2(end, 1) == 0);
-    end += 1 + 2 * IMM2_SIZE;
-    break;
-    }
-  list[2] = end - code;
-  return end;
-  }
-return NULL;    /* Opcode not accepted */
-}
-
-
-
-/*************************************************
-*    Scan further character sets for match       *
-*************************************************/
-
-/* Checks whether the base and the current opcode have a common character, in
-which case the base cannot be possessified.
-
-Arguments:
-  code        points to the byte code
-  utf         TRUE in UTF-8 / UTF-16 / UTF-32 mode
-  cd          static compile data
-  base_list   the data list of the base opcode
-
-Returns:      TRUE if the auto-possessification is possible
-*/
-
-static BOOL
-compare_opcodes(const pcre_uchar *code, BOOL utf, const compile_data *cd,
-  const pcre_uint32 *base_list, const pcre_uchar *base_end)
-{
-pcre_uchar c;
-pcre_uint32 list[8];
-const pcre_uint32 *chr_ptr;
-const pcre_uint32 *ochr_ptr;
-const pcre_uint32 *list_ptr;
-const pcre_uchar *next_code;
-#if defined SUPPORT_UTF || !defined COMPILE_PCRE8
-const pcre_uchar *xclass_flags;
-#endif
-const pcre_uint8 *class_bitset;
-const pcre_uint8 *set1, *set2, *set_end;
-pcre_uint32 chr;
-BOOL accepted, invert_bits;
-
-/* Note: the base_list[1] contains whether the current opcode has greedy
-(represented by a non-zero value) quantifier. This is a different from
-other character type lists, which stores here that the character iterator
-matches to an empty string (also represented by a non-zero value). */
-
-for(;;)
-  {
-  /* All operations move the code pointer forward.
-  Therefore infinite recursions are not possible. */
-
-  c = *code;
-
-  /* Skip over callouts */
-
-  if (c == OP_CALLOUT)
-    {
-    code += PRIV(OP_lengths)[c];
-    continue;
-    }
-
-  if (c == OP_ALT)
-    {
-    do code += GET(code, 1); while (*code == OP_ALT);
-    c = *code;
-    }
-
-  switch(c)
-    {
-    case OP_END:
-    case OP_KETRPOS:
-    /* TRUE only in greedy case. The non-greedy case could be replaced by
-    an OP_EXACT, but it is probably not worth it. (And note that OP_EXACT
-    uses more memory, which we cannot get at this stage.) */
-
-    return base_list[1] != 0;
-
-    case OP_KET:
-    /* If the bracket is capturing, and referenced by an OP_RECURSE, or
-    it is an atomic sub-pattern (assert, once, etc.) the non-greedy case
-    cannot be converted to a possessive form. */
-
-    if (base_list[1] == 0) return FALSE;
-
-    switch(*(code - GET(code, 1)))
-      {
-      case OP_ASSERT:
-      case OP_ASSERT_NOT:
-      case OP_ASSERTBACK:
-      case OP_ASSERTBACK_NOT:
-      case OP_ONCE:
-      case OP_ONCE_NC:
-      /* Atomic sub-patterns and assertions can always auto-possessify their
-      last iterator. */
-      return TRUE;
-      }
-
-    code += PRIV(OP_lengths)[c];
-    continue;
-
-    case OP_ONCE:
-    case OP_ONCE_NC:
-    case OP_BRA:
-    case OP_CBRA:
-    next_code = code + GET(code, 1);
-    code += PRIV(OP_lengths)[c];
-
-    while (*next_code == OP_ALT)
-      {
-      if (!compare_opcodes(code, utf, cd, base_list, base_end)) return FALSE;
-      code = next_code + 1 + LINK_SIZE;
-      next_code += GET(next_code, 1);
-      }
-    continue;
-
-    case OP_BRAZERO:
-    case OP_BRAMINZERO:
-
-    next_code = code + 1;
-    if (*next_code != OP_BRA && *next_code != OP_CBRA
-        && *next_code != OP_ONCE && *next_code != OP_ONCE_NC) return FALSE;
-
-    do next_code += GET(next_code, 1); while (*next_code == OP_ALT);
-
-    /* The bracket content will be checked by the
-    OP_BRA/OP_CBRA case above. */
-    next_code += 1 + LINK_SIZE;
-    if (!compare_opcodes(next_code, utf, cd, base_list, base_end))
-      return FALSE;
-
-    code += PRIV(OP_lengths)[c];
-    continue;
-    }
-
-  /* Check for a supported opcode, and load its properties. */
-
-  code = get_chr_property_list(code, utf, cd->fcc, list);
-  if (code == NULL) return FALSE;    /* Unsupported */
-
-  /* If either opcode is a small character list, set pointers for comparing
-  characters from that list with another list, or with a property. */
-
-  if (base_list[0] == OP_CHAR)
-    {
-    chr_ptr = base_list + 2;
-    list_ptr = list;
-    }
-  else if (list[0] == OP_CHAR)
-    {
-    chr_ptr = list + 2;
-    list_ptr = base_list;
-    }
-
-  /* Character bitsets can also be compared to certain opcodes. */
-
-  else if (base_list[0] == OP_CLASS || list[0] == OP_CLASS
-#ifdef COMPILE_PCRE8
-      /* In 8 bit, non-UTF mode, OP_CLASS and OP_NCLASS are the same. */
-      || (!utf && (base_list[0] == OP_NCLASS || list[0] == OP_NCLASS))
-#endif
-      )
-    {
-#ifdef COMPILE_PCRE8
-    if (base_list[0] == OP_CLASS || (!utf && base_list[0] == OP_NCLASS))
-#else
-    if (base_list[0] == OP_CLASS)
-#endif
-      {
-      set1 = (pcre_uint8 *)(base_end - base_list[2]);
-      list_ptr = list;
-      }
-    else
-      {
-      set1 = (pcre_uint8 *)(code - list[2]);
-      list_ptr = base_list;
-      }
-
-    invert_bits = FALSE;
-    switch(list_ptr[0])
-      {
-      case OP_CLASS:
-      case OP_NCLASS:
-      set2 = (pcre_uint8 *)
-        ((list_ptr == list ? code : base_end) - list_ptr[2]);
-      break;
-
-#if defined SUPPORT_UTF || !defined COMPILE_PCRE8
-      case OP_XCLASS:
-      xclass_flags = (list_ptr == list ? code : base_end) - list_ptr[2] + LINK_SIZE;
-      if ((*xclass_flags & XCL_HASPROP) != 0) return FALSE;
-      if ((*xclass_flags & XCL_MAP) == 0)
-        {
-        /* No bits are set for characters < 256. */
-        if (list[1] == 0) return TRUE;
-        /* Might be an empty repeat. */
-        continue;
-        }
-      set2 = (pcre_uint8 *)(xclass_flags + 1);
-      break;
-#endif
-
-      case OP_NOT_DIGIT:
-      invert_bits = TRUE;
-      /* Fall through */
-      case OP_DIGIT:
-      set2 = (pcre_uint8 *)(cd->cbits + cbit_digit);
-      break;
-
-      case OP_NOT_WHITESPACE:
-      invert_bits = TRUE;
-      /* Fall through */
-      case OP_WHITESPACE:
-      set2 = (pcre_uint8 *)(cd->cbits + cbit_space);
-      break;
-
-      case OP_NOT_WORDCHAR:
-      invert_bits = TRUE;
-      /* Fall through */
-      case OP_WORDCHAR:
-      set2 = (pcre_uint8 *)(cd->cbits + cbit_word);
-      break;
-
-      default:
-      return FALSE;
-      }
-
-    /* Because the sets are unaligned, we need
-    to perform byte comparison here. */
-    set_end = set1 + 32;
-    if (invert_bits)
-      {
-      do
-        {
-        if ((*set1++ & ~(*set2++)) != 0) return FALSE;
-        }
-      while (set1 < set_end);
-      }
-    else
-      {
-      do
-        {
-        if ((*set1++ & *set2++) != 0) return FALSE;
-        }
-      while (set1 < set_end);
-      }
-
-    if (list[1] == 0) return TRUE;
-    /* Might be an empty repeat. */
-    continue;
-    }
-
-  /* Some property combinations also acceptable. Unicode property opcodes are
-  processed specially; the rest can be handled with a lookup table. */
-
-  else
-    {
-    pcre_uint32 leftop, rightop;
-
-    leftop = base_list[0];
-    rightop = list[0];
-
-#ifdef SUPPORT_UCP
-    accepted = FALSE; /* Always set in non-unicode case. */
-    if (leftop == OP_PROP || leftop == OP_NOTPROP)
-      {
-      if (rightop == OP_EOD)
-        accepted = TRUE;
-      else if (rightop == OP_PROP || rightop == OP_NOTPROP)
-        {
-        int n;
-        const pcre_uint8 *p;
-        BOOL same = leftop == rightop;
-        BOOL lisprop = leftop == OP_PROP;
-        BOOL risprop = rightop == OP_PROP;
-        BOOL bothprop = lisprop && risprop;
-
-        /* There's a table that specifies how each combination is to be
-        processed:
-          0   Always return FALSE (never auto-possessify)
-          1   Character groups are distinct (possessify if both are OP_PROP)
-          2   Check character categories in the same group (general or particular)
-          3   Return TRUE if the two opcodes are not the same
-          ... see comments below
-        */
-
-        n = propposstab[base_list[2]][list[2]];
-        switch(n)
-          {
-          case 0: break;
-          case 1: accepted = bothprop; break;
-          case 2: accepted = (base_list[3] == list[3]) != same; break;
-          case 3: accepted = !same; break;
-
-          case 4:  /* Left general category, right particular category */
-          accepted = risprop && catposstab[base_list[3]][list[3]] == same;
-          break;
-
-          case 5:  /* Right general category, left particular category */
-          accepted = lisprop && catposstab[list[3]][base_list[3]] == same;
-          break;
-
-          /* This code is logically tricky. Think hard before fiddling with it.
-          The posspropstab table has four entries per row. Each row relates to
-          one of PCRE's special properties such as ALNUM or SPACE or WORD.
-          Only WORD actually needs all four entries, but using repeats for the
-          others means they can all use the same code below.
-
-          The first two entries in each row are Unicode general categories, and
-          apply always, because all the characters they include are part of the
-          PCRE character set. The third and fourth entries are a general and a
-          particular category, respectively, that include one or more relevant
-          characters. One or the other is used, depending on whether the check
-          is for a general or a particular category. However, in both cases the
-          category contains more characters than the specials that are defined
-          for the property being tested against. Therefore, it cannot be used
-          in a NOTPROP case.
-
-          Example: the row for WORD contains ucp_L, ucp_N, ucp_P, ucp_Po.
-          Underscore is covered by ucp_P or ucp_Po. */
-
-          case 6:  /* Left alphanum vs right general category */
-          case 7:  /* Left space vs right general category */
-          case 8:  /* Left word vs right general category */
-          p = posspropstab[n-6];
-          accepted = risprop && lisprop ==
-            (list[3] != p[0] &&
-             list[3] != p[1] &&
-            (list[3] != p[2] || !lisprop));
-          break;
-
-          case 9:   /* Right alphanum vs left general category */
-          case 10:  /* Right space vs left general category */
-          case 11:  /* Right word vs left general category */
-          p = posspropstab[n-9];
-          accepted = lisprop && risprop ==
-            (base_list[3] != p[0] &&
-             base_list[3] != p[1] &&
-            (base_list[3] != p[2] || !risprop));
-          break;
-
-          case 12:  /* Left alphanum vs right particular category */
-          case 13:  /* Left space vs right particular category */
-          case 14:  /* Left word vs right particular category */
-          p = posspropstab[n-12];
-          accepted = risprop && lisprop ==
-            (catposstab[p[0]][list[3]] &&
-             catposstab[p[1]][list[3]] &&
-            (list[3] != p[3] || !lisprop));
-          break;
-
-          case 15:  /* Right alphanum vs left particular category */
-          case 16:  /* Right space vs left particular category */
-          case 17:  /* Right word vs left particular category */
-          p = posspropstab[n-15];
-          accepted = lisprop && risprop ==
-            (catposstab[p[0]][base_list[3]] &&
-             catposstab[p[1]][base_list[3]] &&
-            (base_list[3] != p[3] || !risprop));
-          break;
-          }
-        }
-      }
-
-    else
-#endif  /* SUPPORT_UCP */
-
-    accepted = leftop >= FIRST_AUTOTAB_OP && leftop <= LAST_AUTOTAB_LEFT_OP &&
-           rightop >= FIRST_AUTOTAB_OP && rightop <= LAST_AUTOTAB_RIGHT_OP &&
-           autoposstab[leftop - FIRST_AUTOTAB_OP][rightop - FIRST_AUTOTAB_OP];
-
-    if (!accepted)
-      return FALSE;
-
-    if (list[1] == 0) return TRUE;
-    /* Might be an empty repeat. */
-    continue;
-    }
-
-  /* Control reaches here only if one of the items is a small character list.
-  All characters are checked against the other side. */
-
-  do
-    {
-    chr = *chr_ptr;
-
-    switch(list_ptr[0])
-      {
-      case OP_CHAR:
-      ochr_ptr = list_ptr + 2;
-      do
-        {
-        if (chr == *ochr_ptr) return FALSE;
-        ochr_ptr++;
-        }
-      while(*ochr_ptr != NOTACHAR);
-      break;
-
-      case OP_NOT:
-      ochr_ptr = list_ptr + 2;
-      do
-        {
-        if (chr == *ochr_ptr)
-          break;
-        ochr_ptr++;
-        }
-      while(*ochr_ptr != NOTACHAR);
-      if (*ochr_ptr == NOTACHAR) return FALSE;   /* Not found */
-      break;
-
-      /* Note that OP_DIGIT etc. are generated only when PCRE_UCP is *not*
-      set. When it is set, \d etc. are converted into OP_(NOT_)PROP codes. */
-
-      case OP_DIGIT:
-      if (chr < 256 && (cd->ctypes[chr] & ctype_digit) != 0) return FALSE;
-      break;
-
-      case OP_NOT_DIGIT:
-      if (chr > 255 || (cd->ctypes[chr] & ctype_digit) == 0) return FALSE;
-      break;
-
-      case OP_WHITESPACE:
-      if (chr < 256 && (cd->ctypes[chr] & ctype_space) != 0) return FALSE;
-      break;
-
-      case OP_NOT_WHITESPACE:
-      if (chr > 255 || (cd->ctypes[chr] & ctype_space) == 0) return FALSE;
-      break;
-
-      case OP_WORDCHAR:
-      if (chr < 255 && (cd->ctypes[chr] & ctype_word) != 0) return FALSE;
-      break;
-
-      case OP_NOT_WORDCHAR:
-      if (chr > 255 || (cd->ctypes[chr] & ctype_word) == 0) return FALSE;
-      break;
-
-      case OP_HSPACE:
-      switch(chr)
-        {
-        HSPACE_CASES: return FALSE;
-        default: break;
-        }
-      break;
-
-      case OP_NOT_HSPACE:
-      switch(chr)
-        {
-        HSPACE_CASES: break;
-        default: return FALSE;
-        }
-      break;
-
-      case OP_ANYNL:
-      case OP_VSPACE:
-      switch(chr)
-        {
-        VSPACE_CASES: return FALSE;
-        default: break;
-        }
-      break;
-
-      case OP_NOT_VSPACE:
-      switch(chr)
-        {
-        VSPACE_CASES: break;
-        default: return FALSE;
-        }
-      break;
-
-      case OP_DOLL:
-      case OP_EODN:
-      switch (chr)
-        {
-        case CHAR_CR:
-        case CHAR_LF:
-        case CHAR_VT:
-        case CHAR_FF:
-        case CHAR_NEL:
-#ifndef EBCDIC
-        case 0x2028:
-        case 0x2029:
-#endif  /* Not EBCDIC */
-        return FALSE;
-        }
-      break;
-
-      case OP_EOD:    /* Can always possessify before \z */
-      break;
-
-#ifdef SUPPORT_UCP
-      case OP_PROP:
-      case OP_NOTPROP:
-      if (!check_char_prop(chr, list_ptr[2], list_ptr[3],
-            list_ptr[0] == OP_NOTPROP))
-        return FALSE;
-      break;
-#endif
-
-      case OP_NCLASS:
-      if (chr > 255) return FALSE;
-      /* Fall through */
-
-      case OP_CLASS:
-      if (chr > 255) break;
-      class_bitset = (pcre_uint8 *)
-        ((list_ptr == list ? code : base_end) - list_ptr[2]);
-      if ((class_bitset[chr >> 3] & (1 << (chr & 7))) != 0) return FALSE;
-      break;
-
-#if defined SUPPORT_UTF || !defined COMPILE_PCRE8
-      case OP_XCLASS:
-      if (PRIV(xclass)(chr, (list_ptr == list ? code : base_end) -
-          list_ptr[2] + LINK_SIZE, utf)) return FALSE;
-      break;
-#endif
-
-      default:
-      return FALSE;
-      }
-
-    chr_ptr++;
-    }
-  while(*chr_ptr != NOTACHAR);
-
-  /* At least one character must be matched from this opcode. */
-
-  if (list[1] == 0) return TRUE;
-  }
-
-/* Control never reaches here. There used to be a fail-save return FALSE; here,
-but some compilers complain about an unreachable statement. */
-
-}
-
-
-
-/*************************************************
-*    Scan compiled regex for auto-possession     *
-*************************************************/
-
-/* Replaces single character iterations with their possessive alternatives
-if appropriate. This function modifies the compiled opcode!
-
-Arguments:
-  code        points to start of the byte code
-  utf         TRUE in UTF-8 / UTF-16 / UTF-32 mode
-  cd          static compile data
-
-Returns:      nothing
-*/
-
-static void
-auto_possessify(pcre_uchar *code, BOOL utf, const compile_data *cd)
-{
-register pcre_uchar c;
-const pcre_uchar *end;
-pcre_uchar *repeat_opcode;
-pcre_uint32 list[8];
-
-for (;;)
-  {
-  c = *code;
-
-  if (c >= OP_STAR && c <= OP_TYPEPOSUPTO)
-    {
-    c -= get_repeat_base(c) - OP_STAR;
-    end = (c <= OP_MINUPTO) ?
-      get_chr_property_list(code, utf, cd->fcc, list) : NULL;
-    list[1] = c == OP_STAR || c == OP_PLUS || c == OP_QUERY || c == OP_UPTO;
-
-    if (end != NULL && compare_opcodes(end, utf, cd, list, end))
-      {
-      switch(c)
-        {
-        case OP_STAR:
-        *code += OP_POSSTAR - OP_STAR;
-        break;
-
-        case OP_MINSTAR:
-        *code += OP_POSSTAR - OP_MINSTAR;
-        break;
-
-        case OP_PLUS:
-        *code += OP_POSPLUS - OP_PLUS;
-        break;
-
-        case OP_MINPLUS:
-        *code += OP_POSPLUS - OP_MINPLUS;
-        break;
-
-        case OP_QUERY:
-        *code += OP_POSQUERY - OP_QUERY;
-        break;
-
-        case OP_MINQUERY:
-        *code += OP_POSQUERY - OP_MINQUERY;
-        break;
-
-        case OP_UPTO:
-        *code += OP_POSUPTO - OP_UPTO;
-        break;
-
-        case OP_MINUPTO:
-        *code += OP_POSUPTO - OP_MINUPTO;
-        break;
-        }
-      }
-    c = *code;
-    }
-  else if (c == OP_CLASS || c == OP_NCLASS || c == OP_XCLASS)
-    {
-#if defined SUPPORT_UTF || !defined COMPILE_PCRE8
-    if (c == OP_XCLASS)
-      repeat_opcode = code + GET(code, 1);
-    else
-#endif
-      repeat_opcode = code + 1 + (32 / sizeof(pcre_uchar));
-
-    c = *repeat_opcode;
-    if (c >= OP_CRSTAR && c <= OP_CRMINRANGE)
-      {
-      /* end must not be NULL. */
-      end = get_chr_property_list(code, utf, cd->fcc, list);
-
-      list[1] = (c & 1) == 0;
-
-      if (compare_opcodes(end, utf, cd, list, end))
-        {
-        switch (c)
-          {
-          case OP_CRSTAR:
-          case OP_CRMINSTAR:
-          *repeat_opcode = OP_CRPOSSTAR;
-          break;
-
-          case OP_CRPLUS:
-          case OP_CRMINPLUS:
-          *repeat_opcode = OP_CRPOSPLUS;
-          break;
-
-          case OP_CRQUERY:
-          case OP_CRMINQUERY:
-          *repeat_opcode = OP_CRPOSQUERY;
-          break;
-
-          case OP_CRRANGE:
-          case OP_CRMINRANGE:
-          *repeat_opcode = OP_CRPOSRANGE;
-          break;
-          }
-        }
-      }
-    c = *code;
-    }
-
-  switch(c)
-    {
-    case OP_END:
-    return;
-
-    case OP_TYPESTAR:
-    case OP_TYPEMINSTAR:
-    case OP_TYPEPLUS:
-    case OP_TYPEMINPLUS:
-    case OP_TYPEQUERY:
-    case OP_TYPEMINQUERY:
-    case OP_TYPEPOSSTAR:
-    case OP_TYPEPOSPLUS:
-    case OP_TYPEPOSQUERY:
-    if (code[1] == OP_PROP || code[1] == OP_NOTPROP) code += 2;
-    break;
-
-    case OP_TYPEUPTO:
-    case OP_TYPEMINUPTO:
-    case OP_TYPEEXACT:
-    case OP_TYPEPOSUPTO:
-    if (code[1 + IMM2_SIZE] == OP_PROP || code[1 + IMM2_SIZE] == OP_NOTPROP)
-      code += 2;
-    break;
-
-#if defined SUPPORT_UTF || !defined COMPILE_PCRE8
-    case OP_XCLASS:
-    code += GET(code, 1);
-    break;
-#endif
-
-    case OP_MARK:
-    case OP_PRUNE_ARG:
-    case OP_SKIP_ARG:
-    case OP_THEN_ARG:
-    code += code[1];
-    break;
-    }
-
-  /* Add in the fixed length from the table */
-
-  code += PRIV(OP_lengths)[c];
-
-  /* In UTF-8 mode, opcodes that are followed by a character may be followed by
-  a multi-byte character. The length in the table is a minimum, so we have to
-  arrange to skip the extra bytes. */
-
-#if defined SUPPORT_UTF && !defined COMPILE_PCRE32
-  if (utf) switch(c)
-    {
-    case OP_CHAR:
-    case OP_CHARI:
-    case OP_NOT:
-    case OP_NOTI:
-    case OP_STAR:
-    case OP_MINSTAR:
-    case OP_PLUS:
-    case OP_MINPLUS:
-    case OP_QUERY:
-    case OP_MINQUERY:
-    case OP_UPTO:
-    case OP_MINUPTO:
-    case OP_EXACT:
-    case OP_POSSTAR:
-    case OP_POSPLUS:
-    case OP_POSQUERY:
-    case OP_POSUPTO:
-    case OP_STARI:
-    case OP_MINSTARI:
-    case OP_PLUSI:
-    case OP_MINPLUSI:
-    case OP_QUERYI:
-    case OP_MINQUERYI:
-    case OP_UPTOI:
-    case OP_MINUPTOI:
-    case OP_EXACTI:
-    case OP_POSSTARI:
-    case OP_POSPLUSI:
-    case OP_POSQUERYI:
-    case OP_POSUPTOI:
-    case OP_NOTSTAR:
-    case OP_NOTMINSTAR:
-    case OP_NOTPLUS:
-    case OP_NOTMINPLUS:
-    case OP_NOTQUERY:
-    case OP_NOTMINQUERY:
-    case OP_NOTUPTO:
-    case OP_NOTMINUPTO:
-    case OP_NOTEXACT:
-    case OP_NOTPOSSTAR:
-    case OP_NOTPOSPLUS:
-    case OP_NOTPOSQUERY:
-    case OP_NOTPOSUPTO:
-    case OP_NOTSTARI:
-    case OP_NOTMINSTARI:
-    case OP_NOTPLUSI:
-    case OP_NOTMINPLUSI:
-    case OP_NOTQUERYI:
-    case OP_NOTMINQUERYI:
-    case OP_NOTUPTOI:
-    case OP_NOTMINUPTOI:
-    case OP_NOTEXACTI:
-    case OP_NOTPOSSTARI:
-    case OP_NOTPOSPLUSI:
-    case OP_NOTPOSQUERYI:
-    case OP_NOTPOSUPTOI:
-    if (HAS_EXTRALEN(code[-1])) code += GET_EXTRALEN(code[-1]);
-    break;
-    }
-#else
-  (void)(utf);  /* Keep compiler happy by referencing function argument */
-#endif
-  }
-}
-
-
-
-/*************************************************
-*           Check for POSIX class syntax         *
-*************************************************/
-
-/* This function is called when the sequence "[:" or "[." or "[=" is
-encountered in a character class. It checks whether this is followed by a
-sequence of characters terminated by a matching ":]" or ".]" or "=]". If we
-reach an unescaped ']' without the special preceding character, return FALSE.
-
-Originally, this function only recognized a sequence of letters between the
-terminators, but it seems that Perl recognizes any sequence of characters,
-though of course unknown POSIX names are subsequently rejected. Perl gives an
-"Unknown POSIX class" error for [:f\oo:] for example, where previously PCRE
-didn't consider this to be a POSIX class. Likewise for [:1234:].
-
-The problem in trying to be exactly like Perl is in the handling of escapes. We
-have to be sure that [abc[:x\]pqr] is *not* treated as containing a POSIX
-class, but [abc[:x\]pqr:]] is (so that an error can be generated). The code
-below handles the special case of \], but does not try to do any other escape
-processing. This makes it different from Perl for cases such as [:l\ower:]
-where Perl recognizes it as the POSIX class "lower" but PCRE does not recognize
-"l\ower". This is a lesser evil than not diagnosing bad classes when Perl does,
-I think.
-
-A user pointed out that PCRE was rejecting [:a[:digit:]] whereas Perl was not.
-It seems that the appearance of a nested POSIX class supersedes an apparent
-external class. For example, [:a[:digit:]b:] matches "a", "b", ":", or
-a digit.
-
-In Perl, unescaped square brackets may also appear as part of class names. For
-example, [:a[:abc]b:] gives unknown POSIX class "[:abc]b:]". However, for
-[:a[:abc]b][b:] it gives unknown POSIX class "[:abc]b][b:]", which does not
-seem right at all. PCRE does not allow closing square brackets in POSIX class
-names.
-
-Arguments:
-  ptr      pointer to the initial [
-  endptr   where to return the end pointer
-
-Returns:   TRUE or FALSE
-*/
-
-static BOOL
-check_posix_syntax(const pcre_uchar *ptr, const pcre_uchar **endptr)
-{
-pcre_uchar terminator;          /* Don't combine these lines; the Solaris cc */
-terminator = *(++ptr);   /* compiler warns about "non-constant" initializer. */
-for (++ptr; *ptr != CHAR_NULL; ptr++)
-  {
-  if (*ptr == CHAR_BACKSLASH && ptr[1] == CHAR_RIGHT_SQUARE_BRACKET)
-    ptr++;
-  else if (*ptr == CHAR_RIGHT_SQUARE_BRACKET) return FALSE;
-  else
-    {
-    if (*ptr == terminator && ptr[1] == CHAR_RIGHT_SQUARE_BRACKET)
-      {
-      *endptr = ptr;
-      return TRUE;
-      }
-    if (*ptr == CHAR_LEFT_SQUARE_BRACKET &&
-         (ptr[1] == CHAR_COLON || ptr[1] == CHAR_DOT ||
-          ptr[1] == CHAR_EQUALS_SIGN) &&
-        check_posix_syntax(ptr, endptr))
-      return FALSE;
-    }
-  }
-return FALSE;
-}
-
-
-
-
-/*************************************************
-*          Check POSIX class name                *
-*************************************************/
-
-/* This function is called to check the name given in a POSIX-style class entry
-such as [:alnum:].
-
-Arguments:
-  ptr        points to the first letter
-  len        the length of the name
-
-Returns:     a value representing the name, or -1 if unknown
-*/
-
-static int
-check_posix_name(const pcre_uchar *ptr, int len)
-{
-const char *pn = posix_names;
-register int yield = 0;
-while (posix_name_lengths[yield] != 0)
-  {
-  if (len == posix_name_lengths[yield] &&
-    STRNCMP_UC_C8(ptr, pn, (unsigned int)len) == 0) return yield;
-  pn += posix_name_lengths[yield] + 1;
-  yield++;
-  }
-return -1;
-}
-
-
-/*************************************************
-*    Adjust OP_RECURSE items in repeated group   *
-*************************************************/
-
-/* OP_RECURSE items contain an offset from the start of the regex to the group
-that is referenced. This means that groups can be replicated for fixed
-repetition simply by copying (because the recursion is allowed to refer to
-earlier groups that are outside the current group). However, when a group is
-optional (i.e. the minimum quantifier is zero), OP_BRAZERO or OP_SKIPZERO is
-inserted before it, after it has been compiled. This means that any OP_RECURSE
-items within it that refer to the group itself or any contained groups have to
-have their offsets adjusted. That one of the jobs of this function. Before it
-is called, the partially compiled regex must be temporarily terminated with
-OP_END.
-
-This function has been extended with the possibility of forward references for
-recursions and subroutine calls. It must also check the list of such references
-for the group we are dealing with. If it finds that one of the recursions in
-the current group is on this list, it adjusts the offset in the list, not the
-value in the reference (which is a group number).
-
-Arguments:
-  group      points to the start of the group
-  adjust     the amount by which the group is to be moved
-  utf        TRUE in UTF-8 / UTF-16 / UTF-32 mode
-  cd         contains pointers to tables etc.
-  save_hwm   the hwm forward reference pointer at the start of the group
-
-Returns:     nothing
-*/
-
-static void
-adjust_recurse(pcre_uchar *group, int adjust, BOOL utf, compile_data *cd,
-  pcre_uchar *save_hwm)
-{
-pcre_uchar *ptr = group;
-
-while ((ptr = (pcre_uchar *)find_recurse(ptr, utf)) != NULL)
-  {
-  int offset;
-  pcre_uchar *hc;
-
-  /* See if this recursion is on the forward reference list. If so, adjust the
-  reference. */
-
-  for (hc = save_hwm; hc < cd->hwm; hc += LINK_SIZE)
-    {
-    offset = (int)GET(hc, 0);
-    if (cd->start_code + offset == ptr + 1)
-      {
-      PUT(hc, 0, offset + adjust);
-      break;
-      }
-    }
-
-  /* Otherwise, adjust the recursion offset if it's after the start of this
-  group. */
-
-  if (hc >= cd->hwm)
-    {
-    offset = (int)GET(ptr, 1);
-    if (cd->start_code + offset >= group) PUT(ptr, 1, offset + adjust);
-    }
-
-  ptr += 1 + LINK_SIZE;
-  }
-}
-
-
-
-/*************************************************
-*        Insert an automatic callout point       *
-*************************************************/
-
-/* This function is called when the PCRE_AUTO_CALLOUT option is set, to insert
-callout points before each pattern item.
-
-Arguments:
-  code           current code pointer
-  ptr            current pattern pointer
-  cd             pointers to tables etc
-
-Returns:         new code pointer
-*/
-
-static pcre_uchar *
-auto_callout(pcre_uchar *code, const pcre_uchar *ptr, compile_data *cd)
-{
-*code++ = OP_CALLOUT;
-*code++ = 255;
-PUT(code, 0, (int)(ptr - cd->start_pattern));  /* Pattern offset */
-PUT(code, LINK_SIZE, 0);                       /* Default length */
-return code + 2 * LINK_SIZE;
-}
-
-
-
-/*************************************************
-*         Complete a callout item                *
-*************************************************/
-
-/* A callout item contains the length of the next item in the pattern, which
-we can't fill in till after we have reached the relevant point. This is used
-for both automatic and manual callouts.
-
-Arguments:
-  previous_callout   points to previous callout item
-  ptr                current pattern pointer
-  cd                 pointers to tables etc
-
-Returns:             nothing
-*/
-
-static void
-complete_callout(pcre_uchar *previous_callout, const pcre_uchar *ptr, compile_data *cd)
-{
-int length = (int)(ptr - cd->start_pattern - GET(previous_callout, 2));
-PUT(previous_callout, 2 + LINK_SIZE, length);
-}
-
-
-
-#ifdef SUPPORT_UCP
-/*************************************************
-*           Get othercase range                  *
-*************************************************/
-
-/* This function is passed the start and end of a class range, in UTF-8 mode
-with UCP support. It searches up the characters, looking for ranges of
-characters in the "other" case. Each call returns the next one, updating the
-start address. A character with multiple other cases is returned on its own
-with a special return value.
-
-Arguments:
-  cptr        points to starting character value; updated
-  d           end value
-  ocptr       where to put start of othercase range
-  odptr       where to put end of othercase range
-
-Yield:        -1 when no more
-               0 when a range is returned
-              >0 the CASESET offset for char with multiple other cases
-                in this case, ocptr contains the original
-*/
-
-static int
-get_othercase_range(pcre_uint32 *cptr, pcre_uint32 d, pcre_uint32 *ocptr,
-  pcre_uint32 *odptr)
-{
-pcre_uint32 c, othercase, next;
-unsigned int co;
-
-/* Find the first character that has an other case. If it has multiple other
-cases, return its case offset value. */
-
-for (c = *cptr; c <= d; c++)
-  {
-  if ((co = UCD_CASESET(c)) != 0)
-    {
-    *ocptr = c++;   /* Character that has the set */
-    *cptr = c;      /* Rest of input range */
-    return (int)co;
-    }
-  if ((othercase = UCD_OTHERCASE(c)) != c) break;
-  }
-
-if (c > d) return -1;  /* Reached end of range */
-
-/* Found a character that has a single other case. Search for the end of the
-range, which is either the end of the input range, or a character that has zero
-or more than one other cases. */
-
-*ocptr = othercase;
-next = othercase + 1;
-
-for (++c; c <= d; c++)
-  {
-  if ((co = UCD_CASESET(c)) != 0 || UCD_OTHERCASE(c) != next) break;
-  next++;
-  }
-
-*odptr = next - 1;     /* End of othercase range */
-*cptr = c;             /* Rest of input range */
-return 0;
-}
-#endif  /* SUPPORT_UCP */
-
-
-
-/*************************************************
-*        Add a character or range to a class     *
-*************************************************/
-
-/* This function packages up the logic of adding a character or range of
-characters to a class. The character values in the arguments will be within the
-valid values for the current mode (8-bit, 16-bit, UTF, etc). This function is
-mutually recursive with the function immediately below.
-
-Arguments:
-  classbits     the bit map for characters < 256
-  uchardptr     points to the pointer for extra data
-  options       the options word
-  cd            contains pointers to tables etc.
-  start         start of range character
-  end           end of range character
-
-Returns:        the number of < 256 characters added
-                the pointer to extra data is updated
-*/
-
-static int
-add_to_class(pcre_uint8 *classbits, pcre_uchar **uchardptr, int options,
-  compile_data *cd, pcre_uint32 start, pcre_uint32 end)
-{
-pcre_uint32 c;
-pcre_uint32 classbits_end = (end <= 0xff ? end : 0xff);
-int n8 = 0;
-
-/* If caseless matching is required, scan the range and process alternate
-cases. In Unicode, there are 8-bit characters that have alternate cases that
-are greater than 255 and vice-versa. Sometimes we can just extend the original
-range. */
-
-if ((options & PCRE_CASELESS) != 0)
-  {
-#ifdef SUPPORT_UCP
-  if ((options & PCRE_UTF8) != 0)
-    {
-    int rc;
-    pcre_uint32 oc, od;
-
-    options &= ~PCRE_CASELESS;   /* Remove for recursive calls */
-    c = start;
-
-    while ((rc = get_othercase_range(&c, end, &oc, &od)) >= 0)
-      {
-      /* Handle a single character that has more than one other case. */
-
-      if (rc > 0) n8 += add_list_to_class(classbits, uchardptr, options, cd,
-        PRIV(ucd_caseless_sets) + rc, oc);
-
-      /* Do nothing if the other case range is within the original range. */
-
-      else if (oc >= start && od <= end) continue;
-
-      /* Extend the original range if there is overlap, noting that if oc < c, we
-      can't have od > end because a subrange is always shorter than the basic
-      range. Otherwise, use a recursive call to add the additional range. */
-
-      else if (oc < start && od >= start - 1) start = oc; /* Extend downwards */
-      else if (od > end && oc <= end + 1) end = od;       /* Extend upwards */
-      else n8 += add_to_class(classbits, uchardptr, options, cd, oc, od);
-      }
-    }
-  else
-#endif  /* SUPPORT_UCP */
-
-  /* Not UTF-mode, or no UCP */
-
-  for (c = start; c <= classbits_end; c++)
-    {
-    SETBIT(classbits, cd->fcc[c]);
-    n8++;
-    }
-  }
-
-/* Now handle the original range. Adjust the final value according to the bit
-length - this means that the same lists of (e.g.) horizontal spaces can be used
-in all cases. */
-
-#if defined COMPILE_PCRE8
-#ifdef SUPPORT_UTF
-  if ((options & PCRE_UTF8) == 0)
-#endif
-  if (end > 0xff) end = 0xff;
-
-#elif defined COMPILE_PCRE16
-#ifdef SUPPORT_UTF
-  if ((options & PCRE_UTF16) == 0)
-#endif
-  if (end > 0xffff) end = 0xffff;
-
-#endif /* COMPILE_PCRE[8|16] */
-
-/* Use the bitmap for characters < 256. Otherwise use extra data.*/
-
-for (c = start; c <= classbits_end; c++)
-  {
-  /* Regardless of start, c will always be <= 255. */
-  SETBIT(classbits, c);
-  n8++;
-  }
-
-#if defined SUPPORT_UTF || !defined COMPILE_PCRE8
-if (start <= 0xff) start = 0xff + 1;
-
-if (end >= start)
-  {
-  pcre_uchar *uchardata = *uchardptr;
-#ifdef SUPPORT_UTF
-  if ((options & PCRE_UTF8) != 0)  /* All UTFs use the same flag bit */
-    {
-    if (start < end)
-      {
-      *uchardata++ = XCL_RANGE;
-      uchardata += PRIV(ord2utf)(start, uchardata);
-      uchardata += PRIV(ord2utf)(end, uchardata);
-      }
-    else if (start == end)
-      {
-      *uchardata++ = XCL_SINGLE;
-      uchardata += PRIV(ord2utf)(start, uchardata);
-      }
-    }
-  else
-#endif  /* SUPPORT_UTF */
-
-  /* Without UTF support, character values are constrained by the bit length,
-  and can only be > 256 for 16-bit and 32-bit libraries. */
-
-#ifdef COMPILE_PCRE8
-    {}
-#else
-  if (start < end)
-    {
-    *uchardata++ = XCL_RANGE;
-    *uchardata++ = start;
-    *uchardata++ = end;
-    }
-  else if (start == end)
-    {
-    *uchardata++ = XCL_SINGLE;
-    *uchardata++ = start;
-    }
-#endif
-
-  *uchardptr = uchardata;   /* Updata extra data pointer */
-  }
-#endif /* SUPPORT_UTF || !COMPILE_PCRE8 */
-
-return n8;    /* Number of 8-bit characters */
-}
-
-
-
-
-/*************************************************
-*        Add a list of characters to a class     *
-*************************************************/
-
-/* This function is used for adding a list of case-equivalent characters to a
-class, and also for adding a list of horizontal or vertical whitespace. If the
-list is in order (which it should be), ranges of characters are detected and
-handled appropriately. This function is mutually recursive with the function
-above.
-
-Arguments:
-  classbits     the bit map for characters < 256
-  uchardptr     points to the pointer for extra data
-  options       the options word
-  cd            contains pointers to tables etc.
-  p             points to row of 32-bit values, terminated by NOTACHAR
-  except        character to omit; this is used when adding lists of
-                  case-equivalent characters to avoid including the one we
-                  already know about
-
-Returns:        the number of < 256 characters added
-                the pointer to extra data is updated
-*/
-
-static int
-add_list_to_class(pcre_uint8 *classbits, pcre_uchar **uchardptr, int options,
-  compile_data *cd, const pcre_uint32 *p, unsigned int except)
-{
-int n8 = 0;
-while (p[0] < NOTACHAR)
-  {
-  int n = 0;
-  if (p[0] != except)
-    {
-    while(p[n+1] == p[0] + n + 1) n++;
-    n8 += add_to_class(classbits, uchardptr, options, cd, p[0], p[n]);
-    }
-  p += n + 1;
-  }
-return n8;
-}
-
-
-
-/*************************************************
-*    Add characters not in a list to a class     *
-*************************************************/
-
-/* This function is used for adding the complement of a list of horizontal or
-vertical whitespace to a class. The list must be in order.
-
-Arguments:
-  classbits     the bit map for characters < 256
-  uchardptr     points to the pointer for extra data
-  options       the options word
-  cd            contains pointers to tables etc.
-  p             points to row of 32-bit values, terminated by NOTACHAR
-
-Returns:        the number of < 256 characters added
-                the pointer to extra data is updated
-*/
-
-static int
-add_not_list_to_class(pcre_uint8 *classbits, pcre_uchar **uchardptr,
-  int options, compile_data *cd, const pcre_uint32 *p)
-{
-BOOL utf = (options & PCRE_UTF8) != 0;
-int n8 = 0;
-if (p[0] > 0)
-  n8 += add_to_class(classbits, uchardptr, options, cd, 0, p[0] - 1);
-while (p[0] < NOTACHAR)
-  {
-  while (p[1] == p[0] + 1) p++;
-  n8 += add_to_class(classbits, uchardptr, options, cd, p[0] + 1,
-    (p[1] == NOTACHAR) ? (utf ? 0x10ffffu : 0xffffffffu) : p[1] - 1);
-  p++;
-  }
-return n8;
-}
-
-
-
-/*************************************************
-*           Compile one branch                   *
-*************************************************/
-
-/* Scan the pattern, compiling it into the a vector. If the options are
-changed during the branch, the pointer is used to change the external options
-bits. This function is used during the pre-compile phase when we are trying
-to find out the amount of memory needed, as well as during the real compile
-phase. The value of lengthptr distinguishes the two phases.
-
-Arguments:
-  optionsptr        pointer to the option bits
-  codeptr           points to the pointer to the current code point
-  ptrptr            points to the current pattern pointer
-  errorcodeptr      points to error code variable
-  firstcharptr      place to put the first required character
-  firstcharflagsptr place to put the first character flags, or a negative number
-  reqcharptr        place to put the last required character
-  reqcharflagsptr   place to put the last required character flags, or a negative number
-  bcptr             points to current branch chain
-  cond_depth        conditional nesting depth
-  cd                contains pointers to tables etc.
-  lengthptr         NULL during the real compile phase
-                    points to length accumulator during pre-compile phase
-
-Returns:            TRUE on success
-                    FALSE, with *errorcodeptr set non-zero on error
-*/
-
-static BOOL
-compile_branch(int *optionsptr, pcre_uchar **codeptr,
-  const pcre_uchar **ptrptr, int *errorcodeptr,
-  pcre_uint32 *firstcharptr, pcre_int32 *firstcharflagsptr,
-  pcre_uint32 *reqcharptr, pcre_int32 *reqcharflagsptr,
-  branch_chain *bcptr, int cond_depth,
-  compile_data *cd, int *lengthptr)
-{
-int repeat_type, op_type;
-int repeat_min = 0, repeat_max = 0;      /* To please picky compilers */
-int bravalue = 0;
-int greedy_default, greedy_non_default;
-pcre_uint32 firstchar, reqchar;
-pcre_int32 firstcharflags, reqcharflags;
-pcre_uint32 zeroreqchar, zerofirstchar;
-pcre_int32 zeroreqcharflags, zerofirstcharflags;
-pcre_int32 req_caseopt, reqvary, tempreqvary;
-int options = *optionsptr;               /* May change dynamically */
-int after_manual_callout = 0;
-int length_prevgroup = 0;
-register pcre_uint32 c;
-int escape;
-register pcre_uchar *code = *codeptr;
-pcre_uchar *last_code = code;
-pcre_uchar *orig_code = code;
-pcre_uchar *tempcode;
-BOOL inescq = FALSE;
-BOOL groupsetfirstchar = FALSE;
-const pcre_uchar *ptr = *ptrptr;
-const pcre_uchar *tempptr;
-const pcre_uchar *nestptr = NULL;
-pcre_uchar *previous = NULL;
-pcre_uchar *previous_callout = NULL;
-pcre_uchar *save_hwm = NULL;
-pcre_uint8 classbits[32];
-
-/* We can fish out the UTF-8 setting once and for all into a BOOL, but we
-must not do this for other options (e.g. PCRE_EXTENDED) because they may change
-dynamically as we process the pattern. */
-
-#ifdef SUPPORT_UTF
-/* PCRE_UTF[16|32] have the same value as PCRE_UTF8. */
-BOOL utf = (options & PCRE_UTF8) != 0;
-#ifndef COMPILE_PCRE32
-pcre_uchar utf_chars[6];
-#endif
-#else
-BOOL utf = FALSE;
-#endif
-
-/* Helper variables for OP_XCLASS opcode (for characters > 255). We define
-class_uchardata always so that it can be passed to add_to_class() always,
-though it will not be used in non-UTF 8-bit cases. This avoids having to supply
-alternative calls for the different cases. */
-
-pcre_uchar *class_uchardata;
-#if defined SUPPORT_UTF || !defined COMPILE_PCRE8
-BOOL xclass;
-pcre_uchar *class_uchardata_base;
-#endif
-
-#ifdef PCRE_DEBUG
-if (lengthptr != NULL) DPRINTF((">> start branch\n"));
-#endif
-
-/* Set up the default and non-default settings for greediness */
-
-greedy_default = ((options & PCRE_UNGREEDY) != 0);
-greedy_non_default = greedy_default ^ 1;
-
-/* Initialize no first byte, no required byte. REQ_UNSET means "no char
-matching encountered yet". It gets changed to REQ_NONE if we hit something that
-matches a non-fixed char first char; reqchar just remains unset if we never
-find one.
-
-When we hit a repeat whose minimum is zero, we may have to adjust these values
-to take the zero repeat into account. This is implemented by setting them to
-zerofirstbyte and zeroreqchar when such a repeat is encountered. The individual
-item types that can be repeated set these backoff variables appropriately. */
-
-firstchar = reqchar = zerofirstchar = zeroreqchar = 0;
-firstcharflags = reqcharflags = zerofirstcharflags = zeroreqcharflags = REQ_UNSET;
-
-/* The variable req_caseopt contains either the REQ_CASELESS value
-or zero, according to the current setting of the caseless flag. The
-REQ_CASELESS leaves the lower 28 bit empty. It is added into the
-firstchar or reqchar variables to record the case status of the
-value. This is used only for ASCII characters. */
-
-req_caseopt = ((options & PCRE_CASELESS) != 0)? REQ_CASELESS:0;
-
-/* Switch on next character until the end of the branch */
-
-for (;; ptr++)
-  {
-  BOOL negate_class;
-  BOOL should_flip_negation;
-  BOOL possessive_quantifier;
-  BOOL is_quantifier;
-  BOOL is_recurse;
-  BOOL reset_bracount;
-  int class_has_8bitchar;
-  int class_one_char;
-#if defined SUPPORT_UTF || !defined COMPILE_PCRE8
-  BOOL xclass_has_prop;
-#endif
-  int newoptions;
-  int recno;
-  int refsign;
-  int skipbytes;
-  pcre_uint32 subreqchar, subfirstchar;
-  pcre_int32 subreqcharflags, subfirstcharflags;
-  int terminator;
-  unsigned int mclength;
-  unsigned int tempbracount;
-  pcre_uint32 ec;
-  pcre_uchar mcbuffer[8];
-
-  /* Get next character in the pattern */
-
-  c = *ptr;
-
-  /* If we are at the end of a nested substitution, revert to the outer level
-  string. Nesting only happens one level deep. */
-
-  if (c == CHAR_NULL && nestptr != NULL)
-    {
-    ptr = nestptr;
-    nestptr = NULL;
-    c = *ptr;
-    }
-
-  /* If we are in the pre-compile phase, accumulate the length used for the
-  previous cycle of this loop. */
-
-  if (lengthptr != NULL)
-    {
-#ifdef PCRE_DEBUG
-    if (code > cd->hwm) cd->hwm = code;                 /* High water info */
-#endif
-    if (code > cd->start_workspace + cd->workspace_size -
-        WORK_SIZE_SAFETY_MARGIN)                       /* Check for overrun */
-      {
-      *errorcodeptr = ERR52;
-      goto FAILED;
-      }
-
-    /* There is at least one situation where code goes backwards: this is the
-    case of a zero quantifier after a class (e.g. [ab]{0}). At compile time,
-    the class is simply eliminated. However, it is created first, so we have to
-    allow memory for it. Therefore, don't ever reduce the length at this point.
-    */
-
-    if (code < last_code) code = last_code;
-
-    /* Paranoid check for integer overflow */
-
-    if (OFLOW_MAX - *lengthptr < code - last_code)
-      {
-      *errorcodeptr = ERR20;
-      goto FAILED;
-      }
-
-    *lengthptr += (int)(code - last_code);
-    DPRINTF(("length=%d added %d c=%c (0x%x)\n", *lengthptr,
-      (int)(code - last_code), c, c));
-
-    /* If "previous" is set and it is not at the start of the work space, move
-    it back to there, in order to avoid filling up the work space. Otherwise,
-    if "previous" is NULL, reset the current code pointer to the start. */
-
-    if (previous != NULL)
-      {
-      if (previous > orig_code)
-        {
-        memmove(orig_code, previous, IN_UCHARS(code - previous));
-        code -= previous - orig_code;
-        previous = orig_code;
-        }
-      }
-    else code = orig_code;
-
-    /* Remember where this code item starts so we can pick up the length
-    next time round. */
-
-    last_code = code;
-    }
-
-  /* In the real compile phase, just check the workspace used by the forward
-  reference list. */
-
-  else if (cd->hwm > cd->start_workspace + cd->workspace_size -
-           WORK_SIZE_SAFETY_MARGIN)
-    {
-    *errorcodeptr = ERR52;
-    goto FAILED;
-    }
-
-  /* If in \Q...\E, check for the end; if not, we have a literal */
-
-  if (inescq && c != CHAR_NULL)
-    {
-    if (c == CHAR_BACKSLASH && ptr[1] == CHAR_E)
-      {
-      inescq = FALSE;
-      ptr++;
-      continue;
-      }
-    else
-      {
-      if (previous_callout != NULL)
-        {
-        if (lengthptr == NULL)  /* Don't attempt in pre-compile phase */
-          complete_callout(previous_callout, ptr, cd);
-        previous_callout = NULL;
-        }
-      if ((options & PCRE_AUTO_CALLOUT) != 0)
-        {
-        previous_callout = code;
-        code = auto_callout(code, ptr, cd);
-        }
-      goto NORMAL_CHAR;
-      }
-    /* Control does not reach here. */
-    }
-
-  /* In extended mode, skip white space and comments. We need a loop in order
-  to check for more white space and more comments after a comment. */
-
-  if ((options & PCRE_EXTENDED) != 0)
-    {
-    for (;;)
-      {
-      while (MAX_255(c) && (cd->ctypes[c] & ctype_space) != 0) c = *(++ptr);
-      if (c != CHAR_NUMBER_SIGN) break;
-      ptr++;
-      while (*ptr != CHAR_NULL)
-        {
-        if (IS_NEWLINE(ptr))         /* For non-fixed-length newline cases, */
-          {                          /* IS_NEWLINE sets cd->nllen. */
-          ptr += cd->nllen;
-          break;
-          }
-        ptr++;
-#ifdef SUPPORT_UTF
-        if (utf) FORWARDCHAR(ptr);
-#endif
-        }
-      c = *ptr;     /* Either NULL or the char after a newline */
-      }
-    }
-
-  /* See if the next thing is a quantifier. */
-
-  is_quantifier =
-    c == CHAR_ASTERISK || c == CHAR_PLUS || c == CHAR_QUESTION_MARK ||
-    (c == CHAR_LEFT_CURLY_BRACKET && is_counted_repeat(ptr+1));
-
-  /* Fill in length of a previous callout, except when the next thing is a
-  quantifier or when processing a property substitution string in UCP mode. */
-
-  if (!is_quantifier && previous_callout != NULL && nestptr == NULL &&
-       after_manual_callout-- <= 0)
-    {
-    if (lengthptr == NULL)      /* Don't attempt in pre-compile phase */
-      complete_callout(previous_callout, ptr, cd);
-    previous_callout = NULL;
-    }
-
-  /* Create auto callout, except for quantifiers, or while processing property
-  strings that are substituted for \w etc in UCP mode. */
-
-  if ((options & PCRE_AUTO_CALLOUT) != 0 && !is_quantifier && nestptr == NULL)
-    {
-    previous_callout = code;
-    code = auto_callout(code, ptr, cd);
-    }
-
-  /* Process the next pattern item. */
-
-  switch(c)
-    {
-    /* ===================================================================*/
-    case CHAR_NULL:                /* The branch terminates at string end */
-    case CHAR_VERTICAL_LINE:       /* or | or ) */
-    case CHAR_RIGHT_PARENTHESIS:
-    *firstcharptr = firstchar;
-    *firstcharflagsptr = firstcharflags;
-    *reqcharptr = reqchar;
-    *reqcharflagsptr = reqcharflags;
-    *codeptr = code;
-    *ptrptr = ptr;
-    if (lengthptr != NULL)
-      {
-      if (OFLOW_MAX - *lengthptr < code - last_code)
-        {
-        *errorcodeptr = ERR20;
-        goto FAILED;
-        }
-      *lengthptr += (int)(code - last_code);   /* To include callout length */
-      DPRINTF((">> end branch\n"));
-      }
-    return TRUE;
-
-
-    /* ===================================================================*/
-    /* Handle single-character metacharacters. In multiline mode, ^ disables
-    the setting of any following char as a first character. */
-
-    case CHAR_CIRCUMFLEX_ACCENT:
-    previous = NULL;
-    if ((options & PCRE_MULTILINE) != 0)
-      {
-      if (firstcharflags == REQ_UNSET) firstcharflags = REQ_NONE;
-      *code++ = OP_CIRCM;
-      }
-    else *code++ = OP_CIRC;
-    break;
-
-    case CHAR_DOLLAR_SIGN:
-    previous = NULL;
-    *code++ = ((options & PCRE_MULTILINE) != 0)? OP_DOLLM : OP_DOLL;
-    break;
-
-    /* There can never be a first char if '.' is first, whatever happens about
-    repeats. The value of reqchar doesn't change either. */
-
-    case CHAR_DOT:
-    if (firstcharflags == REQ_UNSET) firstcharflags = REQ_NONE;
-    zerofirstchar = firstchar;
-    zerofirstcharflags = firstcharflags;
-    zeroreqchar = reqchar;
-    zeroreqcharflags = reqcharflags;
-    previous = code;
-    *code++ = ((options & PCRE_DOTALL) != 0)? OP_ALLANY: OP_ANY;
-    break;
-
-
-    /* ===================================================================*/
-    /* Character classes. If the included characters are all < 256, we build a
-    32-byte bitmap of the permitted characters, except in the special case
-    where there is only one such character. For negated classes, we build the
-    map as usual, then invert it at the end. However, we use a different opcode
-    so that data characters > 255 can be handled correctly.
-
-    If the class contains characters outside the 0-255 range, a different
-    opcode is compiled. It may optionally have a bit map for characters < 256,
-    but those above are are explicitly listed afterwards. A flag byte tells
-    whether the bitmap is present, and whether this is a negated class or not.
-
-    In JavaScript compatibility mode, an isolated ']' causes an error. In
-    default (Perl) mode, it is treated as a data character. */
-
-    case CHAR_RIGHT_SQUARE_BRACKET:
-    if ((cd->external_options & PCRE_JAVASCRIPT_COMPAT) != 0)
-      {
-      *errorcodeptr = ERR64;
-      goto FAILED;
-      }
-    goto NORMAL_CHAR;
-
-    /* In another (POSIX) regex library, the ugly syntax [[:<:]] and [[:>:]] is
-    used for "start of word" and "end of word". As these are otherwise illegal
-    sequences, we don't break anything by recognizing them. They are replaced
-    by \b(?=\w) and \b(?<=\w) respectively. Sequences like [a[:<:]] are
-    erroneous and are handled by the normal code below. */
-
-    case CHAR_LEFT_SQUARE_BRACKET:
-    if (STRNCMP_UC_C8(ptr+1, STRING_WEIRD_STARTWORD, 6) == 0)
-      {
-      nestptr = ptr + 7;
-      ptr = sub_start_of_word - 1;
-      continue;
-      }
-
-    if (STRNCMP_UC_C8(ptr+1, STRING_WEIRD_ENDWORD, 6) == 0)
-      {
-      nestptr = ptr + 7;
-      ptr = sub_end_of_word - 1;
-      continue;
-      }
-
-    /* Handle a real character class. */
-
-    previous = code;
-
-    /* PCRE supports POSIX class stuff inside a class. Perl gives an error if
-    they are encountered at the top level, so we'll do that too. */
-
-    if ((ptr[1] == CHAR_COLON || ptr[1] == CHAR_DOT ||
-         ptr[1] == CHAR_EQUALS_SIGN) &&
-        check_posix_syntax(ptr, &tempptr))
-      {
-      *errorcodeptr = (ptr[1] == CHAR_COLON)? ERR13 : ERR31;
-      goto FAILED;
-      }
-
-    /* If the first character is '^', set the negation flag and skip it. Also,
-    if the first few characters (either before or after ^) are \Q\E or \E we
-    skip them too. This makes for compatibility with Perl. */
-
-    negate_class = FALSE;
-    for (;;)
-      {
-      c = *(++ptr);
-      if (c == CHAR_BACKSLASH)
-        {
-        if (ptr[1] == CHAR_E)
-          ptr++;
-        else if (STRNCMP_UC_C8(ptr + 1, STR_Q STR_BACKSLASH STR_E, 3) == 0)
-          ptr += 3;
-        else
-          break;
-        }
-      else if (!negate_class && c == CHAR_CIRCUMFLEX_ACCENT)
-        negate_class = TRUE;
-      else break;
-      }
-
-    /* Empty classes are allowed in JavaScript compatibility mode. Otherwise,
-    an initial ']' is taken as a data character -- the code below handles
-    that. In JS mode, [] must always fail, so generate OP_FAIL, whereas
-    [^] must match any character, so generate OP_ALLANY. */
-
-    if (c == CHAR_RIGHT_SQUARE_BRACKET &&
-        (cd->external_options & PCRE_JAVASCRIPT_COMPAT) != 0)
-      {
-      *code++ = negate_class? OP_ALLANY : OP_FAIL;
-      if (firstcharflags == REQ_UNSET) firstcharflags = REQ_NONE;
-      zerofirstchar = firstchar;
-      zerofirstcharflags = firstcharflags;
-      break;
-      }
-
-    /* If a class contains a negative special such as \S, we need to flip the
-    negation flag at the end, so that support for characters > 255 works
-    correctly (they are all included in the class). */
-
-    should_flip_negation = FALSE;
-
-    /* Extended class (xclass) will be used when characters > 255
-    might match. */
-
-#if defined SUPPORT_UTF || !defined COMPILE_PCRE8
-    xclass = FALSE;
-    class_uchardata = code + LINK_SIZE + 2;   /* For XCLASS items */
-    class_uchardata_base = class_uchardata;   /* Save the start */
-#endif
-
-    /* For optimization purposes, we track some properties of the class:
-    class_has_8bitchar will be non-zero if the class contains at least one <
-    256 character; class_one_char will be 1 if the class contains just one
-    character; xclass_has_prop will be TRUE if unicode property checks
-    are present in the class. */
-
-    class_has_8bitchar = 0;
-    class_one_char = 0;
-#if defined SUPPORT_UTF || !defined COMPILE_PCRE8
-    xclass_has_prop = FALSE;
-#endif
-
-    /* Initialize the 32-char bit map to all zeros. We build the map in a
-    temporary bit of memory, in case the class contains fewer than two
-    8-bit characters because in that case the compiled code doesn't use the bit
-    map. */
-
-    memset(classbits, 0, 32 * sizeof(pcre_uint8));
-
-    /* Process characters until ] is reached. By writing this as a "do" it
-    means that an initial ] is taken as a data character. At the start of the
-    loop, c contains the first byte of the character. */
-
-    if (c != CHAR_NULL) do
-      {
-      const pcre_uchar *oldptr;
-
-#ifdef SUPPORT_UTF
-      if (utf && HAS_EXTRALEN(c))
-        {                           /* Braces are required because the */
-        GETCHARLEN(c, ptr, ptr);    /* macro generates multiple statements */
-        }
-#endif
-
-#if defined SUPPORT_UTF || !defined COMPILE_PCRE8
-      /* In the pre-compile phase, accumulate the length of any extra
-      data and reset the pointer. This is so that very large classes that
-      contain a zillion > 255 characters no longer overwrite the work space
-      (which is on the stack). We have to remember that there was XCLASS data,
-      however. */
-
-      if (lengthptr != NULL && class_uchardata > class_uchardata_base)
-        {
-        xclass = TRUE;
-        *lengthptr += class_uchardata - class_uchardata_base;
-        class_uchardata = class_uchardata_base;
-        }
-#endif
-
-      /* Inside \Q...\E everything is literal except \E */
-
-      if (inescq)
-        {
-        if (c == CHAR_BACKSLASH && ptr[1] == CHAR_E)  /* If we are at \E */
-          {
-          inescq = FALSE;                   /* Reset literal state */
-          ptr++;                            /* Skip the 'E' */
-          continue;                         /* Carry on with next */
-          }
-        goto CHECK_RANGE;                   /* Could be range if \E follows */
-        }
-
-      /* Handle POSIX class names. Perl allows a negation extension of the
-      form [:^name:]. A square bracket that doesn't match the syntax is
-      treated as a literal. We also recognize the POSIX constructions
-      [.ch.] and [=ch=] ("collating elements") and fault them, as Perl
-      5.6 and 5.8 do. */
-
-      if (c == CHAR_LEFT_SQUARE_BRACKET &&
-          (ptr[1] == CHAR_COLON || ptr[1] == CHAR_DOT ||
-           ptr[1] == CHAR_EQUALS_SIGN) && check_posix_syntax(ptr, &tempptr))
-        {
-        BOOL local_negate = FALSE;
-        int posix_class, taboffset, tabopt;
-        register const pcre_uint8 *cbits = cd->cbits;
-        pcre_uint8 pbits[32];
-
-        if (ptr[1] != CHAR_COLON)
-          {
-          *errorcodeptr = ERR31;
-          goto FAILED;
-          }
-
-        ptr += 2;
-        if (*ptr == CHAR_CIRCUMFLEX_ACCENT)
-          {
-          local_negate = TRUE;
-          should_flip_negation = TRUE;  /* Note negative special */
-          ptr++;
-          }
-
-        posix_class = check_posix_name(ptr, (int)(tempptr - ptr));
-        if (posix_class < 0)
-          {
-          *errorcodeptr = ERR30;
-          goto FAILED;
-          }
-
-        /* If matching is caseless, upper and lower are converted to
-        alpha. This relies on the fact that the class table starts with
-        alpha, lower, upper as the first 3 entries. */
-
-        if ((options & PCRE_CASELESS) != 0 && posix_class <= 2)
-          posix_class = 0;
-
-        /* When PCRE_UCP is set, some of the POSIX classes are converted to
-        different escape sequences that use Unicode properties \p or \P. Others
-        that are not available via \p or \P generate XCL_PROP/XCL_NOTPROP
-        directly. */
-
-#ifdef SUPPORT_UCP
-        if ((options & PCRE_UCP) != 0)
-          {
-          unsigned int ptype = 0;
-          int pc = posix_class + ((local_negate)? POSIX_SUBSIZE/2 : 0);
-
-          /* The posix_substitutes table specifies which POSIX classes can be
-          converted to \p or \P items. */
-
-          if (posix_substitutes[pc] != NULL)
-            {
-            nestptr = tempptr + 1;
-            ptr = posix_substitutes[pc] - 1;
-            continue;
-            }
-
-          /* There are three other classes that generate special property calls
-          that are recognized only in an XCLASS. */
-
-          else switch(posix_class)
-            {
-            case PC_GRAPH:
-            ptype = PT_PXGRAPH;
-            /* Fall through */
-            case PC_PRINT:
-            if (ptype == 0) ptype = PT_PXPRINT;
-            /* Fall through */
-            case PC_PUNCT:
-            if (ptype == 0) ptype = PT_PXPUNCT;
-            *class_uchardata++ = local_negate? XCL_NOTPROP : XCL_PROP;
-            *class_uchardata++ = ptype;
-            *class_uchardata++ = 0;
-            xclass_has_prop = TRUE;
-            ptr = tempptr + 1;
-            continue;
-
-            /* For all other POSIX classes, no special action is taken in UCP
-            mode. Fall through to the non_UCP case. */
-
-            default:
-            break;
-            }
-          }
-#endif
-        /* In the non-UCP case, or when UCP makes no difference, we build the
-        bit map for the POSIX class in a chunk of local store because we may be
-        adding and subtracting from it, and we don't want to subtract bits that
-        may be in the main map already. At the end we or the result into the
-        bit map that is being built. */
-
-        posix_class *= 3;
-
-        /* Copy in the first table (always present) */
-
-        memcpy(pbits, cbits + posix_class_maps[posix_class],
-          32 * sizeof(pcre_uint8));
-
-        /* If there is a second table, add or remove it as required. */
-
-        taboffset = posix_class_maps[posix_class + 1];
-        tabopt = posix_class_maps[posix_class + 2];
-
-        if (taboffset >= 0)
-          {
-          if (tabopt >= 0)
-            for (c = 0; c < 32; c++) pbits[c] |= cbits[c + taboffset];
-          else
-            for (c = 0; c < 32; c++) pbits[c] &= ~cbits[c + taboffset];
-          }
-
-        /* Now see if we need to remove any special characters. An option
-        value of 1 removes vertical space and 2 removes underscore. */
-
-        if (tabopt < 0) tabopt = -tabopt;
-        if (tabopt == 1) pbits[1] &= ~0x3c;
-          else if (tabopt == 2) pbits[11] &= 0x7f;
-
-        /* Add the POSIX table or its complement into the main table that is
-        being built and we are done. */
-
-        if (local_negate)
-          for (c = 0; c < 32; c++) classbits[c] |= ~pbits[c];
-        else
-          for (c = 0; c < 32; c++) classbits[c] |= pbits[c];
-
-        ptr = tempptr + 1;
-        /* Every class contains at least one < 256 character. */
-        class_has_8bitchar = 1;
-        /* Every class contains at least two characters. */
-        class_one_char = 2;
-        continue;    /* End of POSIX syntax handling */
-        }
-
-      /* Backslash may introduce a single character, or it may introduce one
-      of the specials, which just set a flag. The sequence \b is a special
-      case. Inside a class (and only there) it is treated as backspace. We
-      assume that other escapes have more than one character in them, so
-      speculatively set both class_has_8bitchar and class_one_char bigger
-      than one. Unrecognized escapes fall through and are either treated
-      as literal characters (by default), or are faulted if
-      PCRE_EXTRA is set. */
-
-      if (c == CHAR_BACKSLASH)
-        {
-        escape = check_escape(&ptr, &ec, errorcodeptr, cd->bracount, options,
-          TRUE);
-        if (*errorcodeptr != 0) goto FAILED;
-        if (escape == 0) c = ec;
-        else if (escape == ESC_b) c = CHAR_BS; /* \b is backspace in a class */
-        else if (escape == ESC_N)          /* \N is not supported in a class */
-          {
-          *errorcodeptr = ERR71;
-          goto FAILED;
-          }
-        else if (escape == ESC_Q)            /* Handle start of quoted string */
-          {
-          if (ptr[1] == CHAR_BACKSLASH && ptr[2] == CHAR_E)
-            {
-            ptr += 2; /* avoid empty string */
-            }
-          else inescq = TRUE;
-          continue;
-          }
-        else if (escape == ESC_E) continue;  /* Ignore orphan \E */
-
-        else
-          {
-          register const pcre_uint8 *cbits = cd->cbits;
-          /* Every class contains at least two < 256 characters. */
-          class_has_8bitchar++;
-          /* Every class contains at least two characters. */
-          class_one_char += 2;
-
-          switch (escape)
-            {
-#ifdef SUPPORT_UCP
-            case ESC_du:     /* These are the values given for \d etc */
-            case ESC_DU:     /* when PCRE_UCP is set. We replace the */
-            case ESC_wu:     /* escape sequence with an appropriate \p */
-            case ESC_WU:     /* or \P to test Unicode properties instead */
-            case ESC_su:     /* of the default ASCII testing. */
-            case ESC_SU:
-            nestptr = ptr;
-            ptr = substitutes[escape - ESC_DU] - 1;  /* Just before substitute */
-            class_has_8bitchar--;                /* Undo! */
-            continue;
-#endif
-            case ESC_d:
-            for (c = 0; c < 32; c++) classbits[c] |= cbits[c+cbit_digit];
-            continue;
-
-            case ESC_D:
-            should_flip_negation = TRUE;
-            for (c = 0; c < 32; c++) classbits[c] |= ~cbits[c+cbit_digit];
-            continue;
-
-            case ESC_w:
-            for (c = 0; c < 32; c++) classbits[c] |= cbits[c+cbit_word];
-            continue;
-
-            case ESC_W:
-            should_flip_negation = TRUE;
-            for (c = 0; c < 32; c++) classbits[c] |= ~cbits[c+cbit_word];
-            continue;
-
-            /* Perl 5.004 onwards omitted VT from \s, but restored it at Perl
-            5.18. Before PCRE 8.34, we had to preserve the VT bit if it was
-            previously set by something earlier in the character class.
-            Luckily, the value of CHAR_VT is 0x0b in both ASCII and EBCDIC, so
-            we could just adjust the appropriate bit. From PCRE 8.34 we no
-            longer treat \s and \S specially. */
-
-            case ESC_s:
-            for (c = 0; c < 32; c++) classbits[c] |= cbits[c+cbit_space];
-            continue;
-
-            case ESC_S:
-            should_flip_negation = TRUE;
-            for (c = 0; c < 32; c++) classbits[c] |= ~cbits[c+cbit_space];
-            continue;
-
-            /* The rest apply in both UCP and non-UCP cases. */
-
-            case ESC_h:
-            (void)add_list_to_class(classbits, &class_uchardata, options, cd,
-              PRIV(hspace_list), NOTACHAR);
-            continue;
-
-            case ESC_H:
-            (void)add_not_list_to_class(classbits, &class_uchardata, options,
-              cd, PRIV(hspace_list));
-            continue;
-
-            case ESC_v:
-            (void)add_list_to_class(classbits, &class_uchardata, options, cd,
-              PRIV(vspace_list), NOTACHAR);
-            continue;
-
-            case ESC_V:
-            (void)add_not_list_to_class(classbits, &class_uchardata, options,
-              cd, PRIV(vspace_list));
-            continue;
-
-#ifdef SUPPORT_UCP
-            case ESC_p:
-            case ESC_P:
-              {
-              BOOL negated;
-              unsigned int ptype = 0, pdata = 0;
-              if (!get_ucp(&ptr, &negated, &ptype, &pdata, errorcodeptr))
-                goto FAILED;
-              *class_uchardata++ = ((escape == ESC_p) != negated)?
-                XCL_PROP : XCL_NOTPROP;
-              *class_uchardata++ = ptype;
-              *class_uchardata++ = pdata;
-              xclass_has_prop = TRUE;
-              class_has_8bitchar--;                /* Undo! */
-              continue;
-              }
-#endif
-            /* Unrecognized escapes are faulted if PCRE is running in its
-            strict mode. By default, for compatibility with Perl, they are
-            treated as literals. */
-
-            default:
-            if ((options & PCRE_EXTRA) != 0)
-              {
-              *errorcodeptr = ERR7;
-              goto FAILED;
-              }
-            class_has_8bitchar--;    /* Undo the speculative increase. */
-            class_one_char -= 2;     /* Undo the speculative increase. */
-            c = *ptr;                /* Get the final character and fall through */
-            break;
-            }
-          }
-
-        /* Fall through if the escape just defined a single character (c >= 0).
-        This may be greater than 256. */
-
-        escape = 0;
-
-        }   /* End of backslash handling */
-
-      /* A character may be followed by '-' to form a range. However, Perl does
-      not permit ']' to be the end of the range. A '-' character at the end is
-      treated as a literal. Perl ignores orphaned \E sequences entirely. The
-      code for handling \Q and \E is messy. */
-
-      CHECK_RANGE:
-      while (ptr[1] == CHAR_BACKSLASH && ptr[2] == CHAR_E)
-        {
-        inescq = FALSE;
-        ptr += 2;
-        }
-      oldptr = ptr;
-
-      /* Remember if \r or \n were explicitly used */
-
-      if (c == CHAR_CR || c == CHAR_NL) cd->external_flags |= PCRE_HASCRORLF;
-
-      /* Check for range */
-
-      if (!inescq && ptr[1] == CHAR_MINUS)
-        {
-        pcre_uint32 d;
-        ptr += 2;
-        while (*ptr == CHAR_BACKSLASH && ptr[1] == CHAR_E) ptr += 2;
-
-        /* If we hit \Q (not followed by \E) at this point, go into escaped
-        mode. */
-
-        while (*ptr == CHAR_BACKSLASH && ptr[1] == CHAR_Q)
-          {
-          ptr += 2;
-          if (*ptr == CHAR_BACKSLASH && ptr[1] == CHAR_E)
-            { ptr += 2; continue; }
-          inescq = TRUE;
-          break;
-          }
-
-        /* Minus (hyphen) at the end of a class is treated as a literal, so put
-        back the pointer and jump to handle the character that preceded it. */
-
-        if (*ptr == CHAR_NULL || (!inescq && *ptr == CHAR_RIGHT_SQUARE_BRACKET))
-          {
-          ptr = oldptr;
-          goto CLASS_SINGLE_CHARACTER;
-          }
-
-        /* Otherwise, we have a potential range; pick up the next character */
-
-#ifdef SUPPORT_UTF
-        if (utf)
-          {                           /* Braces are required because the */
-          GETCHARLEN(d, ptr, ptr);    /* macro generates multiple statements */
-          }
-        else
-#endif
-        d = *ptr;  /* Not UTF-8 mode */
-
-        /* The second part of a range can be a single-character escape
-        sequence, but not any of the other escapes. Perl treats a hyphen as a
-        literal in such circumstances. However, in Perl's warning mode, a
-        warning is given, so PCRE now faults it as it is almost certainly a
-        mistake on the user's part. */
-
-        if (!inescq)
-          {
-          if (d == CHAR_BACKSLASH)
-            {
-            int descape;
-            descape = check_escape(&ptr, &d, errorcodeptr, cd->bracount, options, TRUE);
-            if (*errorcodeptr != 0) goto FAILED;
-
-            /* 0 means a character was put into d; \b is backspace; any other
-            special causes an error. */
-
-            if (descape != 0)
-              {
-              if (descape == ESC_b) d = CHAR_BS; else
-                {
-                *errorcodeptr = ERR83;
-                goto FAILED;
-                }
-              }
-            }
-
-          /* A hyphen followed by a POSIX class is treated in the same way. */
-
-          else if (d == CHAR_LEFT_SQUARE_BRACKET &&
-                   (ptr[1] == CHAR_COLON || ptr[1] == CHAR_DOT ||
-                    ptr[1] == CHAR_EQUALS_SIGN) &&
-                   check_posix_syntax(ptr, &tempptr))
-            {
-            *errorcodeptr = ERR83;
-            goto FAILED;
-            }
-          }
-
-        /* Check that the two values are in the correct order. Optimize
-        one-character ranges. */
-
-        if (d < c)
-          {
-          *errorcodeptr = ERR8;
-          goto FAILED;
-          }
-        if (d == c) goto CLASS_SINGLE_CHARACTER;  /* A few lines below */
-
-        /* We have found a character range, so single character optimizations
-        cannot be done anymore. Any value greater than 1 indicates that there
-        is more than one character. */
-
-        class_one_char = 2;
-
-        /* Remember an explicit \r or \n, and add the range to the class. */
-
-        if (d == CHAR_CR || d == CHAR_NL) cd->external_flags |= PCRE_HASCRORLF;
-
-        class_has_8bitchar +=
-          add_to_class(classbits, &class_uchardata, options, cd, c, d);
-
-        continue;   /* Go get the next char in the class */
-        }
-
-      /* Handle a single character - we can get here for a normal non-escape
-      char, or after \ that introduces a single character or for an apparent
-      range that isn't. Only the value 1 matters for class_one_char, so don't
-      increase it if it is already 2 or more ... just in case there's a class
-      with a zillion characters in it. */
-
-      CLASS_SINGLE_CHARACTER:
-      if (class_one_char < 2) class_one_char++;
-
-      /* If class_one_char is 1, we have the first single character in the
-      class, and there have been no prior ranges, or XCLASS items generated by
-      escapes. If this is the final character in the class, we can optimize by
-      turning the item into a 1-character OP_CHAR[I] if it's positive, or
-      OP_NOT[I] if it's negative. In the positive case, it can cause firstchar
-      to be set. Otherwise, there can be no first char if this item is first,
-      whatever repeat count may follow. In the case of reqchar, save the
-      previous value for reinstating. */
-
-      if (class_one_char == 1 && ptr[1] == CHAR_RIGHT_SQUARE_BRACKET)
-        {
-        ptr++;
-        zeroreqchar = reqchar;
-        zeroreqcharflags = reqcharflags;
-
-        if (negate_class)
-          {
-#ifdef SUPPORT_UCP
-          int d;
-#endif
-          if (firstcharflags == REQ_UNSET) firstcharflags = REQ_NONE;
-          zerofirstchar = firstchar;
-          zerofirstcharflags = firstcharflags;
-
-          /* For caseless UTF-8 mode when UCP support is available, check
-          whether this character has more than one other case. If so, generate
-          a special OP_NOTPROP item instead of OP_NOTI. */
-
-#ifdef SUPPORT_UCP
-          if (utf && (options & PCRE_CASELESS) != 0 &&
-              (d = UCD_CASESET(c)) != 0)
-            {
-            *code++ = OP_NOTPROP;
-            *code++ = PT_CLIST;
-            *code++ = d;
-            }
-          else
-#endif
-          /* Char has only one other case, or UCP not available */
-
-            {
-            *code++ = ((options & PCRE_CASELESS) != 0)? OP_NOTI: OP_NOT;
-#if defined SUPPORT_UTF && !defined COMPILE_PCRE32
-            if (utf && c > MAX_VALUE_FOR_SINGLE_CHAR)
-              code += PRIV(ord2utf)(c, code);
-            else
-#endif
-              *code++ = c;
-            }
-
-          /* We are finished with this character class */
-
-          goto END_CLASS;
-          }
-
-        /* For a single, positive character, get the value into mcbuffer, and
-        then we can handle this with the normal one-character code. */
-
-#if defined SUPPORT_UTF && !defined COMPILE_PCRE32
-        if (utf && c > MAX_VALUE_FOR_SINGLE_CHAR)
-          mclength = PRIV(ord2utf)(c, mcbuffer);
-        else
-#endif
-          {
-          mcbuffer[0] = c;
-          mclength = 1;
-          }
-        goto ONE_CHAR;
-        }       /* End of 1-char optimization */
-
-      /* There is more than one character in the class, or an XCLASS item
-      has been generated. Add this character to the class. */
-
-      class_has_8bitchar +=
-        add_to_class(classbits, &class_uchardata, options, cd, c, c);
-      }
-
-    /* Loop until ']' reached. This "while" is the end of the "do" far above.
-    If we are at the end of an internal nested string, revert to the outer
-    string. */
-
-    while (((c = *(++ptr)) != CHAR_NULL ||
-           (nestptr != NULL &&
-             (ptr = nestptr, nestptr = NULL, c = *(++ptr)) != CHAR_NULL)) &&
-           (c != CHAR_RIGHT_SQUARE_BRACKET || inescq));
-
-    /* Check for missing terminating ']' */
-
-    if (c == CHAR_NULL)
-      {
-      *errorcodeptr = ERR6;
-      goto FAILED;
-      }
-
-    /* We will need an XCLASS if data has been placed in class_uchardata. In
-    the second phase this is a sufficient test. However, in the pre-compile
-    phase, class_uchardata gets emptied to prevent workspace overflow, so it
-    only if the very last character in the class needs XCLASS will it contain
-    anything at this point. For this reason, xclass gets set TRUE above when
-    uchar_classdata is emptied, and that's why this code is the way it is here
-    instead of just doing a test on class_uchardata below. */
-
-#if defined SUPPORT_UTF || !defined COMPILE_PCRE8
-    if (class_uchardata > class_uchardata_base) xclass = TRUE;
-#endif
-
-    /* If this is the first thing in the branch, there can be no first char
-    setting, whatever the repeat count. Any reqchar setting must remain
-    unchanged after any kind of repeat. */
-
-    if (firstcharflags == REQ_UNSET) firstcharflags = REQ_NONE;
-    zerofirstchar = firstchar;
-    zerofirstcharflags = firstcharflags;
-    zeroreqchar = reqchar;
-    zeroreqcharflags = reqcharflags;
-
-    /* If there are characters with values > 255, we have to compile an
-    extended class, with its own opcode, unless there was a negated special
-    such as \S in the class, and PCRE_UCP is not set, because in that case all
-    characters > 255 are in the class, so any that were explicitly given as
-    well can be ignored. If (when there are explicit characters > 255 that must
-    be listed) there are no characters < 256, we can omit the bitmap in the
-    actual compiled code. */
-
-#ifdef SUPPORT_UTF
-    if (xclass && (!should_flip_negation || (options & PCRE_UCP) != 0))
-#elif !defined COMPILE_PCRE8
-    if (xclass && !should_flip_negation)
-#endif
-#if defined SUPPORT_UTF || !defined COMPILE_PCRE8
-      {
-      *class_uchardata++ = XCL_END;    /* Marks the end of extra data */
-      *code++ = OP_XCLASS;
-      code += LINK_SIZE;
-      *code = negate_class? XCL_NOT:0;
-      if (xclass_has_prop) *code |= XCL_HASPROP;
-
-      /* If the map is required, move up the extra data to make room for it;
-      otherwise just move the code pointer to the end of the extra data. */
-
-      if (class_has_8bitchar > 0)
-        {
-        *code++ |= XCL_MAP;
-        memmove(code + (32 / sizeof(pcre_uchar)), code,
-          IN_UCHARS(class_uchardata - code));
-        if (negate_class && !xclass_has_prop)
-          for (c = 0; c < 32; c++) classbits[c] = ~classbits[c];
-        memcpy(code, classbits, 32);
-        code = class_uchardata + (32 / sizeof(pcre_uchar));
-        }
-      else code = class_uchardata;
-
-      /* Now fill in the complete length of the item */
-
-      PUT(previous, 1, (int)(code - previous));
-      break;   /* End of class handling */
-      }
-#endif
-
-    /* If there are no characters > 255, or they are all to be included or
-    excluded, set the opcode to OP_CLASS or OP_NCLASS, depending on whether the
-    whole class was negated and whether there were negative specials such as \S
-    (non-UCP) in the class. Then copy the 32-byte map into the code vector,
-    negating it if necessary. */
-
-    *code++ = (negate_class == should_flip_negation) ? OP_CLASS : OP_NCLASS;
-    if (lengthptr == NULL)    /* Save time in the pre-compile phase */
-      {
-      if (negate_class)
-        for (c = 0; c < 32; c++) classbits[c] = ~classbits[c];
-      memcpy(code, classbits, 32);
-      }
-    code += 32 / sizeof(pcre_uchar);
-
-    END_CLASS:
-    break;
-
-
-    /* ===================================================================*/
-    /* Various kinds of repeat; '{' is not necessarily a quantifier, but this
-    has been tested above. */
-
-    case CHAR_LEFT_CURLY_BRACKET:
-    if (!is_quantifier) goto NORMAL_CHAR;
-    ptr = read_repeat_counts(ptr+1, &repeat_min, &repeat_max, errorcodeptr);
-    if (*errorcodeptr != 0) goto FAILED;
-    goto REPEAT;
-
-    case CHAR_ASTERISK:
-    repeat_min = 0;
-    repeat_max = -1;
-    goto REPEAT;
-
-    case CHAR_PLUS:
-    repeat_min = 1;
-    repeat_max = -1;
-    goto REPEAT;
-
-    case CHAR_QUESTION_MARK:
-    repeat_min = 0;
-    repeat_max = 1;
-
-    REPEAT:
-    if (previous == NULL)
-      {
-      *errorcodeptr = ERR9;
-      goto FAILED;
-      }
-
-    if (repeat_min == 0)
-      {
-      firstchar = zerofirstchar;    /* Adjust for zero repeat */
-      firstcharflags = zerofirstcharflags;
-      reqchar = zeroreqchar;        /* Ditto */
-      reqcharflags = zeroreqcharflags;
-      }
-
-    /* Remember whether this is a variable length repeat */
-
-    reqvary = (repeat_min == repeat_max)? 0 : REQ_VARY;
-
-    op_type = 0;                    /* Default single-char op codes */
-    possessive_quantifier = FALSE;  /* Default not possessive quantifier */
-
-    /* Save start of previous item, in case we have to move it up in order to
-    insert something before it. */
-
-    tempcode = previous;
-
-    /* Before checking for a possessive quantifier, we must skip over
-    whitespace and comments in extended mode because Perl allows white space at
-    this point. */
-
-    if ((options & PCRE_EXTENDED) != 0)
-      {
-      const pcre_uchar *p = ptr + 1;
-      for (;;)
-        {
-        while (MAX_255(*p) && (cd->ctypes[*p] & ctype_space) != 0) p++;
-        if (*p != CHAR_NUMBER_SIGN) break;
-        p++;
-        while (*p != CHAR_NULL)
-          {
-          if (IS_NEWLINE(p))         /* For non-fixed-length newline cases, */
-            {                        /* IS_NEWLINE sets cd->nllen. */
-            p += cd->nllen;
-            break;
-            }
-          p++;
-#ifdef SUPPORT_UTF
-          if (utf) FORWARDCHAR(p);
-#endif
-          }           /* Loop for comment characters */
-        }             /* Loop for multiple comments */
-      ptr = p - 1;    /* Character before the next significant one. */
-      }
-
-    /* If the next character is '+', we have a possessive quantifier. This
-    implies greediness, whatever the setting of the PCRE_UNGREEDY option.
-    If the next character is '?' this is a minimizing repeat, by default,
-    but if PCRE_UNGREEDY is set, it works the other way round. We change the
-    repeat type to the non-default. */
-
-    if (ptr[1] == CHAR_PLUS)
-      {
-      repeat_type = 0;                  /* Force greedy */
-      possessive_quantifier = TRUE;
-      ptr++;
-      }
-    else if (ptr[1] == CHAR_QUESTION_MARK)
-      {
-      repeat_type = greedy_non_default;
-      ptr++;
-      }
-    else repeat_type = greedy_default;
-
-    /* If previous was a recursion call, wrap it in atomic brackets so that
-    previous becomes the atomic group. All recursions were so wrapped in the
-    past, but it no longer happens for non-repeated recursions. In fact, the
-    repeated ones could be re-implemented independently so as not to need this,
-    but for the moment we rely on the code for repeating groups. */
-
-    if (*previous == OP_RECURSE)
-      {
-      memmove(previous + 1 + LINK_SIZE, previous, IN_UCHARS(1 + LINK_SIZE));
-      *previous = OP_ONCE;
-      PUT(previous, 1, 2 + 2*LINK_SIZE);
-      previous[2 + 2*LINK_SIZE] = OP_KET;
-      PUT(previous, 3 + 2*LINK_SIZE, 2 + 2*LINK_SIZE);
-      code += 2 + 2 * LINK_SIZE;
-      length_prevgroup = 3 + 3*LINK_SIZE;
-
-      /* When actually compiling, we need to check whether this was a forward
-      reference, and if so, adjust the offset. */
-
-      if (lengthptr == NULL && cd->hwm >= cd->start_workspace + LINK_SIZE)
-        {
-        int offset = GET(cd->hwm, -LINK_SIZE);
-        if (offset == previous + 1 - cd->start_code)
-          PUT(cd->hwm, -LINK_SIZE, offset + 1 + LINK_SIZE);
-        }
-      }
-
-    /* Now handle repetition for the different types of item. */
-
-    /* If previous was a character or negated character match, abolish the item
-    and generate a repeat item instead. If a char item has a minimum of more
-    than one, ensure that it is set in reqchar - it might not be if a sequence
-    such as x{3} is the first thing in a branch because the x will have gone
-    into firstchar instead.  */
-
-    if (*previous == OP_CHAR || *previous == OP_CHARI
-        || *previous == OP_NOT || *previous == OP_NOTI)
-      {
-      switch (*previous)
-        {
-        default: /* Make compiler happy. */
-        case OP_CHAR:  op_type = OP_STAR - OP_STAR; break;
-        case OP_CHARI: op_type = OP_STARI - OP_STAR; break;
-        case OP_NOT:   op_type = OP_NOTSTAR - OP_STAR; break;
-        case OP_NOTI:  op_type = OP_NOTSTARI - OP_STAR; break;
-        }
-
-      /* Deal with UTF characters that take up more than one character. It's
-      easier to write this out separately than try to macrify it. Use c to
-      hold the length of the character in bytes, plus UTF_LENGTH to flag that
-      it's a length rather than a small character. */
-
-#if defined SUPPORT_UTF && !defined COMPILE_PCRE32
-      if (utf && NOT_FIRSTCHAR(code[-1]))
-        {
-        pcre_uchar *lastchar = code - 1;
-        BACKCHAR(lastchar);
-        c = (int)(code - lastchar);     /* Length of UTF-8 character */
-        memcpy(utf_chars, lastchar, IN_UCHARS(c)); /* Save the char */
-        c |= UTF_LENGTH;                /* Flag c as a length */
-        }
-      else
-#endif /* SUPPORT_UTF */
-
-      /* Handle the case of a single charater - either with no UTF support, or
-      with UTF disabled, or for a single character UTF character. */
-        {
-        c = code[-1];
-        if (*previous <= OP_CHARI && repeat_min > 1)
-          {
-          reqchar = c;
-          reqcharflags = req_caseopt | cd->req_varyopt;
-          }
-        }
-
-      goto OUTPUT_SINGLE_REPEAT;   /* Code shared with single character types */
-      }
-
-    /* If previous was a character type match (\d or similar), abolish it and
-    create a suitable repeat item. The code is shared with single-character
-    repeats by setting op_type to add a suitable offset into repeat_type. Note
-    the the Unicode property types will be present only when SUPPORT_UCP is
-    defined, but we don't wrap the little bits of code here because it just
-    makes it horribly messy. */
-
-    else if (*previous < OP_EODN)
-      {
-      pcre_uchar *oldcode;
-      int prop_type, prop_value;
-      op_type = OP_TYPESTAR - OP_STAR;  /* Use type opcodes */
-      c = *previous;
-
-      OUTPUT_SINGLE_REPEAT:
-      if (*previous == OP_PROP || *previous == OP_NOTPROP)
-        {
-        prop_type = previous[1];
-        prop_value = previous[2];
-        }
-      else prop_type = prop_value = -1;
-
-      oldcode = code;
-      code = previous;                  /* Usually overwrite previous item */
-
-      /* If the maximum is zero then the minimum must also be zero; Perl allows
-      this case, so we do too - by simply omitting the item altogether. */
-
-      if (repeat_max == 0) goto END_REPEAT;
-
-      /* Combine the op_type with the repeat_type */
-
-      repeat_type += op_type;
-
-      /* A minimum of zero is handled either as the special case * or ?, or as
-      an UPTO, with the maximum given. */
-
-      if (repeat_min == 0)
-        {
-        if (repeat_max == -1) *code++ = OP_STAR + repeat_type;
-          else if (repeat_max == 1) *code++ = OP_QUERY + repeat_type;
-        else
-          {
-          *code++ = OP_UPTO + repeat_type;
-          PUT2INC(code, 0, repeat_max);
-          }
-        }
-
-      /* A repeat minimum of 1 is optimized into some special cases. If the
-      maximum is unlimited, we use OP_PLUS. Otherwise, the original item is
-      left in place and, if the maximum is greater than 1, we use OP_UPTO with
-      one less than the maximum. */
-
-      else if (repeat_min == 1)
-        {
-        if (repeat_max == -1)
-          *code++ = OP_PLUS + repeat_type;
-        else
-          {
-          code = oldcode;                 /* leave previous item in place */
-          if (repeat_max == 1) goto END_REPEAT;
-          *code++ = OP_UPTO + repeat_type;
-          PUT2INC(code, 0, repeat_max - 1);
-          }
-        }
-
-      /* The case {n,n} is just an EXACT, while the general case {n,m} is
-      handled as an EXACT followed by an UPTO. */
-
-      else
-        {
-        *code++ = OP_EXACT + op_type;  /* NB EXACT doesn't have repeat_type */
-        PUT2INC(code, 0, repeat_min);
-
-        /* If the maximum is unlimited, insert an OP_STAR. Before doing so,
-        we have to insert the character for the previous code. For a repeated
-        Unicode property match, there are two extra bytes that define the
-        required property. In UTF-8 mode, long characters have their length in
-        c, with the UTF_LENGTH bit as a flag. */
-
-        if (repeat_max < 0)
-          {
-#if defined SUPPORT_UTF && !defined COMPILE_PCRE32
-          if (utf && (c & UTF_LENGTH) != 0)
-            {
-            memcpy(code, utf_chars, IN_UCHARS(c & 7));
-            code += c & 7;
-            }
-          else
-#endif
-            {
-            *code++ = c;
-            if (prop_type >= 0)
-              {
-              *code++ = prop_type;
-              *code++ = prop_value;
-              }
-            }
-          *code++ = OP_STAR + repeat_type;
-          }
-
-        /* Else insert an UPTO if the max is greater than the min, again
-        preceded by the character, for the previously inserted code. If the
-        UPTO is just for 1 instance, we can use QUERY instead. */
-
-        else if (repeat_max != repeat_min)
-          {
-#if defined SUPPORT_UTF && !defined COMPILE_PCRE32
-          if (utf && (c & UTF_LENGTH) != 0)
-            {
-            memcpy(code, utf_chars, IN_UCHARS(c & 7));
-            code += c & 7;
-            }
-          else
-#endif
-          *code++ = c;
-          if (prop_type >= 0)
-            {
-            *code++ = prop_type;
-            *code++ = prop_value;
-            }
-          repeat_max -= repeat_min;
-
-          if (repeat_max == 1)
-            {
-            *code++ = OP_QUERY + repeat_type;
-            }
-          else
-            {
-            *code++ = OP_UPTO + repeat_type;
-            PUT2INC(code, 0, repeat_max);
-            }
-          }
-        }
-
-      /* The character or character type itself comes last in all cases. */
-
-#if defined SUPPORT_UTF && !defined COMPILE_PCRE32
-      if (utf && (c & UTF_LENGTH) != 0)
-        {
-        memcpy(code, utf_chars, IN_UCHARS(c & 7));
-        code += c & 7;
-        }
-      else
-#endif
-      *code++ = c;
-
-      /* For a repeated Unicode property match, there are two extra bytes that
-      define the required property. */
-
-#ifdef SUPPORT_UCP
-      if (prop_type >= 0)
-        {
-        *code++ = prop_type;
-        *code++ = prop_value;
-        }
-#endif
-      }
-
-    /* If previous was a character class or a back reference, we put the repeat
-    stuff after it, but just skip the item if the repeat was {0,0}. */
-
-    else if (*previous == OP_CLASS || *previous == OP_NCLASS ||
-#if defined SUPPORT_UTF || !defined COMPILE_PCRE8
-             *previous == OP_XCLASS ||
-#endif
-             *previous == OP_REF   || *previous == OP_REFI ||
-             *previous == OP_DNREF || *previous == OP_DNREFI)
-      {
-      if (repeat_max == 0)
-        {
-        code = previous;
-        goto END_REPEAT;
-        }
-
-      if (repeat_min == 0 && repeat_max == -1)
-        *code++ = OP_CRSTAR + repeat_type;
-      else if (repeat_min == 1 && repeat_max == -1)
-        *code++ = OP_CRPLUS + repeat_type;
-      else if (repeat_min == 0 && repeat_max == 1)
-        *code++ = OP_CRQUERY + repeat_type;
-      else
-        {
-        *code++ = OP_CRRANGE + repeat_type;
-        PUT2INC(code, 0, repeat_min);
-        if (repeat_max == -1) repeat_max = 0;  /* 2-byte encoding for max */
-        PUT2INC(code, 0, repeat_max);
-        }
-      }
-
-    /* If previous was a bracket group, we may have to replicate it in certain
-    cases. Note that at this point we can encounter only the "basic" bracket
-    opcodes such as BRA and CBRA, as this is the place where they get converted
-    into the more special varieties such as BRAPOS and SBRA. A test for >=
-    OP_ASSERT and <= OP_COND includes ASSERT, ASSERT_NOT, ASSERTBACK,
-    ASSERTBACK_NOT, ONCE, ONCE_NC, BRA, BRAPOS, CBRA, CBRAPOS, and COND.
-    Originally, PCRE did not allow repetition of assertions, but now it does,
-    for Perl compatibility. */
-
-    else if (*previous >= OP_ASSERT && *previous <= OP_COND)
-      {
-      register int i;
-      int len = (int)(code - previous);
-      pcre_uchar *bralink = NULL;
-      pcre_uchar *brazeroptr = NULL;
-
-      /* Repeating a DEFINE group is pointless, but Perl allows the syntax, so
-      we just ignore the repeat. */
-
-      if (*previous == OP_COND && previous[LINK_SIZE+1] == OP_DEF)
-        goto END_REPEAT;
-
-      /* There is no sense in actually repeating assertions. The only potential
-      use of repetition is in cases when the assertion is optional. Therefore,
-      if the minimum is greater than zero, just ignore the repeat. If the
-      maximum is not zero or one, set it to 1. */
-
-      if (*previous < OP_ONCE)    /* Assertion */
-        {
-        if (repeat_min > 0) goto END_REPEAT;
-        if (repeat_max < 0 || repeat_max > 1) repeat_max = 1;
-        }
-
-      /* The case of a zero minimum is special because of the need to stick
-      OP_BRAZERO in front of it, and because the group appears once in the
-      data, whereas in other cases it appears the minimum number of times. For
-      this reason, it is simplest to treat this case separately, as otherwise
-      the code gets far too messy. There are several special subcases when the
-      minimum is zero. */
-
-      if (repeat_min == 0)
-        {
-        /* If the maximum is also zero, we used to just omit the group from the
-        output altogether, like this:
-
-        ** if (repeat_max == 0)
-        **   {
-        **   code = previous;
-        **   goto END_REPEAT;
-        **   }
-
-        However, that fails when a group or a subgroup within it is referenced
-        as a subroutine from elsewhere in the pattern, so now we stick in
-        OP_SKIPZERO in front of it so that it is skipped on execution. As we
-        don't have a list of which groups are referenced, we cannot do this
-        selectively.
-
-        If the maximum is 1 or unlimited, we just have to stick in the BRAZERO
-        and do no more at this point. However, we do need to adjust any
-        OP_RECURSE calls inside the group that refer to the group itself or any
-        internal or forward referenced group, because the offset is from the
-        start of the whole regex. Temporarily terminate the pattern while doing
-        this. */
-
-        if (repeat_max <= 1)    /* Covers 0, 1, and unlimited */
-          {
-          *code = OP_END;
-          adjust_recurse(previous, 1, utf, cd, save_hwm);
-          memmove(previous + 1, previous, IN_UCHARS(len));
-          code++;
-          if (repeat_max == 0)
-            {
-            *previous++ = OP_SKIPZERO;
-            goto END_REPEAT;
-            }
-          brazeroptr = previous;    /* Save for possessive optimizing */
-          *previous++ = OP_BRAZERO + repeat_type;
-          }
-
-        /* If the maximum is greater than 1 and limited, we have to replicate
-        in a nested fashion, sticking OP_BRAZERO before each set of brackets.
-        The first one has to be handled carefully because it's the original
-        copy, which has to be moved up. The remainder can be handled by code
-        that is common with the non-zero minimum case below. We have to
-        adjust the value or repeat_max, since one less copy is required. Once
-        again, we may have to adjust any OP_RECURSE calls inside the group. */
-
-        else
-          {
-          int offset;
-          *code = OP_END;
-          adjust_recurse(previous, 2 + LINK_SIZE, utf, cd, save_hwm);
-          memmove(previous + 2 + LINK_SIZE, previous, IN_UCHARS(len));
-          code += 2 + LINK_SIZE;
-          *previous++ = OP_BRAZERO + repeat_type;
-          *previous++ = OP_BRA;
-
-          /* We chain together the bracket offset fields that have to be
-          filled in later when the ends of the brackets are reached. */
-
-          offset = (bralink == NULL)? 0 : (int)(previous - bralink);
-          bralink = previous;
-          PUTINC(previous, 0, offset);
-          }
-
-        repeat_max--;
-        }
-
-      /* If the minimum is greater than zero, replicate the group as many
-      times as necessary, and adjust the maximum to the number of subsequent
-      copies that we need. If we set a first char from the group, and didn't
-      set a required char, copy the latter from the former. If there are any
-      forward reference subroutine calls in the group, there will be entries on
-      the workspace list; replicate these with an appropriate increment. */
-
-      else
-        {
-        if (repeat_min > 1)
-          {
-          /* In the pre-compile phase, we don't actually do the replication. We
-          just adjust the length as if we had. Do some paranoid checks for
-          potential integer overflow. The INT64_OR_DOUBLE type is a 64-bit
-          integer type when available, otherwise double. */
-
-          if (lengthptr != NULL)
-            {
-            int delta = (repeat_min - 1)*length_prevgroup;
-            if ((INT64_OR_DOUBLE)(repeat_min - 1)*
-                  (INT64_OR_DOUBLE)length_prevgroup >
-                    (INT64_OR_DOUBLE)INT_MAX ||
-                OFLOW_MAX - *lengthptr < delta)
-              {
-              *errorcodeptr = ERR20;
-              goto FAILED;
-              }
-            *lengthptr += delta;
-            }
-
-          /* This is compiling for real. If there is a set first byte for
-          the group, and we have not yet set a "required byte", set it. Make
-          sure there is enough workspace for copying forward references before
-          doing the copy. */
-
-          else
-            {
-            if (groupsetfirstchar && reqcharflags < 0)
-              {
-              reqchar = firstchar;
-              reqcharflags = firstcharflags;
-              }
-
-            for (i = 1; i < repeat_min; i++)
-              {
-              pcre_uchar *hc;
-              pcre_uchar *this_hwm = cd->hwm;
-              memcpy(code, previous, IN_UCHARS(len));
-
-              while (cd->hwm > cd->start_workspace + cd->workspace_size -
-                     WORK_SIZE_SAFETY_MARGIN - (this_hwm - save_hwm))
-                {
-                int save_offset = save_hwm - cd->start_workspace;
-                int this_offset = this_hwm - cd->start_workspace;
-                *errorcodeptr = expand_workspace(cd);
-                if (*errorcodeptr != 0) goto FAILED;
-                save_hwm = (pcre_uchar *)cd->start_workspace + save_offset;
-                this_hwm = (pcre_uchar *)cd->start_workspace + this_offset;
-                }
-
-              for (hc = save_hwm; hc < this_hwm; hc += LINK_SIZE)
-                {
-                PUT(cd->hwm, 0, GET(hc, 0) + len);
-                cd->hwm += LINK_SIZE;
-                }
-              save_hwm = this_hwm;
-              code += len;
-              }
-            }
-          }
-
-        if (repeat_max > 0) repeat_max -= repeat_min;
-        }
-
-      /* This code is common to both the zero and non-zero minimum cases. If
-      the maximum is limited, it replicates the group in a nested fashion,
-      remembering the bracket starts on a stack. In the case of a zero minimum,
-      the first one was set up above. In all cases the repeat_max now specifies
-      the number of additional copies needed. Again, we must remember to
-      replicate entries on the forward reference list. */
-
-      if (repeat_max >= 0)
-        {
-        /* In the pre-compile phase, we don't actually do the replication. We
-        just adjust the length as if we had. For each repetition we must add 1
-        to the length for BRAZERO and for all but the last repetition we must
-        add 2 + 2*LINKSIZE to allow for the nesting that occurs. Do some
-        paranoid checks to avoid integer overflow. The INT64_OR_DOUBLE type is
-        a 64-bit integer type when available, otherwise double. */
-
-        if (lengthptr != NULL && repeat_max > 0)
-          {
-          int delta = repeat_max * (length_prevgroup + 1 + 2 + 2*LINK_SIZE) -
-                      2 - 2*LINK_SIZE;   /* Last one doesn't nest */
-          if ((INT64_OR_DOUBLE)repeat_max *
-                (INT64_OR_DOUBLE)(length_prevgroup + 1 + 2 + 2*LINK_SIZE)
-                  > (INT64_OR_DOUBLE)INT_MAX ||
-              OFLOW_MAX - *lengthptr < delta)
-            {
-            *errorcodeptr = ERR20;
-            goto FAILED;
-            }
-          *lengthptr += delta;
-          }
-
-        /* This is compiling for real */
-
-        else for (i = repeat_max - 1; i >= 0; i--)
-          {
-          pcre_uchar *hc;
-          pcre_uchar *this_hwm = cd->hwm;
-
-          *code++ = OP_BRAZERO + repeat_type;
-
-          /* All but the final copy start a new nesting, maintaining the
-          chain of brackets outstanding. */
-
-          if (i != 0)
-            {
-            int offset;
-            *code++ = OP_BRA;
-            offset = (bralink == NULL)? 0 : (int)(code - bralink);
-            bralink = code;
-            PUTINC(code, 0, offset);
-            }
-
-          memcpy(code, previous, IN_UCHARS(len));
-
-          /* Ensure there is enough workspace for forward references before
-          copying them. */
-
-          while (cd->hwm > cd->start_workspace + cd->workspace_size -
-                 WORK_SIZE_SAFETY_MARGIN - (this_hwm - save_hwm))
-            {
-            int save_offset = save_hwm - cd->start_workspace;
-            int this_offset = this_hwm - cd->start_workspace;
-            *errorcodeptr = expand_workspace(cd);
-            if (*errorcodeptr != 0) goto FAILED;
-            save_hwm = (pcre_uchar *)cd->start_workspace + save_offset;
-            this_hwm = (pcre_uchar *)cd->start_workspace + this_offset;
-            }
-
-          for (hc = save_hwm; hc < this_hwm; hc += LINK_SIZE)
-            {
-            PUT(cd->hwm, 0, GET(hc, 0) + len + ((i != 0)? 2+LINK_SIZE : 1));
-            cd->hwm += LINK_SIZE;
-            }
-          save_hwm = this_hwm;
-          code += len;
-          }
-
-        /* Now chain through the pending brackets, and fill in their length
-        fields (which are holding the chain links pro tem). */
-
-        while (bralink != NULL)
-          {
-          int oldlinkoffset;
-          int offset = (int)(code - bralink + 1);
-          pcre_uchar *bra = code - offset;
-          oldlinkoffset = GET(bra, 1);
-          bralink = (oldlinkoffset == 0)? NULL : bralink - oldlinkoffset;
-          *code++ = OP_KET;
-          PUTINC(code, 0, offset);
-          PUT(bra, 1, offset);
-          }
-        }
-
-      /* If the maximum is unlimited, set a repeater in the final copy. For
-      ONCE brackets, that's all we need to do. However, possessively repeated
-      ONCE brackets can be converted into non-capturing brackets, as the
-      behaviour of (?:xx)++ is the same as (?>xx)++ and this saves having to
-      deal with possessive ONCEs specially.
-
-      Otherwise, when we are doing the actual compile phase, check to see
-      whether this group is one that could match an empty string. If so,
-      convert the initial operator to the S form (e.g. OP_BRA -> OP_SBRA) so
-      that runtime checking can be done. [This check is also applied to ONCE
-      groups at runtime, but in a different way.]
-
-      Then, if the quantifier was possessive and the bracket is not a
-      conditional, we convert the BRA code to the POS form, and the KET code to
-      KETRPOS. (It turns out to be convenient at runtime to detect this kind of
-      subpattern at both the start and at the end.) The use of special opcodes
-      makes it possible to reduce greatly the stack usage in pcre_exec(). If
-      the group is preceded by OP_BRAZERO, convert this to OP_BRAPOSZERO.
-
-      Then, if the minimum number of matches is 1 or 0, cancel the possessive
-      flag so that the default action below, of wrapping everything inside
-      atomic brackets, does not happen. When the minimum is greater than 1,
-      there will be earlier copies of the group, and so we still have to wrap
-      the whole thing. */
-
-      else
-        {
-        pcre_uchar *ketcode = code - 1 - LINK_SIZE;
-        pcre_uchar *bracode = ketcode - GET(ketcode, 1);
-
-        /* Convert possessive ONCE brackets to non-capturing */
-
-        if ((*bracode == OP_ONCE || *bracode == OP_ONCE_NC) &&
-            possessive_quantifier) *bracode = OP_BRA;
-
-        /* For non-possessive ONCE brackets, all we need to do is to
-        set the KET. */
-
-        if (*bracode == OP_ONCE || *bracode == OP_ONCE_NC)
-          *ketcode = OP_KETRMAX + repeat_type;
-
-        /* Handle non-ONCE brackets and possessive ONCEs (which have been
-        converted to non-capturing above). */
-
-        else
-          {
-          /* In the compile phase, check for empty string matching. */
-
-          if (lengthptr == NULL)
-            {
-            pcre_uchar *scode = bracode;
-            do
-              {
-              if (could_be_empty_branch(scode, ketcode, utf, cd, NULL))
-                {
-                *bracode += OP_SBRA - OP_BRA;
-                break;
-                }
-              scode += GET(scode, 1);
-              }
-            while (*scode == OP_ALT);
-            }
-
-          /* Handle possessive quantifiers. */
-
-          if (possessive_quantifier)
-            {
-            /* For COND brackets, we wrap the whole thing in a possessively
-            repeated non-capturing bracket, because we have not invented POS
-            versions of the COND opcodes. Because we are moving code along, we
-            must ensure that any pending recursive references are updated. */
-
-            if (*bracode == OP_COND || *bracode == OP_SCOND)
-              {
-              int nlen = (int)(code - bracode);
-              *code = OP_END;
-              adjust_recurse(bracode, 1 + LINK_SIZE, utf, cd, save_hwm);
-              memmove(bracode + 1 + LINK_SIZE, bracode, IN_UCHARS(nlen));
-              code += 1 + LINK_SIZE;
-              nlen += 1 + LINK_SIZE;
-              *bracode = OP_BRAPOS;
-              *code++ = OP_KETRPOS;
-              PUTINC(code, 0, nlen);
-              PUT(bracode, 1, nlen);
-              }
-
-            /* For non-COND brackets, we modify the BRA code and use KETRPOS. */
-
-            else
-              {
-              *bracode += 1;              /* Switch to xxxPOS opcodes */
-              *ketcode = OP_KETRPOS;
-              }
-
-            /* If the minimum is zero, mark it as possessive, then unset the
-            possessive flag when the minimum is 0 or 1. */
-
-            if (brazeroptr != NULL) *brazeroptr = OP_BRAPOSZERO;
-            if (repeat_min < 2) possessive_quantifier = FALSE;
-            }
-
-          /* Non-possessive quantifier */
-
-          else *ketcode = OP_KETRMAX + repeat_type;
-          }
-        }
-      }
-
-    /* If previous is OP_FAIL, it was generated by an empty class [] in
-    JavaScript mode. The other ways in which OP_FAIL can be generated, that is
-    by (*FAIL) or (?!) set previous to NULL, which gives a "nothing to repeat"
-    error above. We can just ignore the repeat in JS case. */
-
-    else if (*previous == OP_FAIL) goto END_REPEAT;
-
-    /* Else there's some kind of shambles */
-
-    else
-      {
-      *errorcodeptr = ERR11;
-      goto FAILED;
-      }
-
-    /* If the character following a repeat is '+', possessive_quantifier is
-    TRUE. For some opcodes, there are special alternative opcodes for this
-    case. For anything else, we wrap the entire repeated item inside OP_ONCE
-    brackets. Logically, the '+' notation is just syntactic sugar, taken from
-    Sun's Java package, but the special opcodes can optimize it.
-
-    Some (but not all) possessively repeated subpatterns have already been
-    completely handled in the code just above. For them, possessive_quantifier
-    is always FALSE at this stage. Note that the repeated item starts at
-    tempcode, not at previous, which might be the first part of a string whose
-    (former) last char we repeated. */
-
-    if (possessive_quantifier)
-      {
-      int len;
-
-      /* Possessifying an EXACT quantifier has no effect, so we can ignore it.
-      However, QUERY, STAR, or UPTO may follow (for quantifiers such as {5,6},
-      {5,}, or {5,10}). We skip over an EXACT item; if the length of what
-      remains is greater than zero, there's a further opcode that can be
-      handled. If not, do nothing, leaving the EXACT alone. */
-
-      switch(*tempcode)
-        {
-        case OP_TYPEEXACT:
-        tempcode += PRIV(OP_lengths)[*tempcode] +
-          ((tempcode[1 + IMM2_SIZE] == OP_PROP
-          || tempcode[1 + IMM2_SIZE] == OP_NOTPROP)? 2 : 0);
-        break;
-
-        /* CHAR opcodes are used for exacts whose count is 1. */
-
-        case OP_CHAR:
-        case OP_CHARI:
-        case OP_NOT:
-        case OP_NOTI:
-        case OP_EXACT:
-        case OP_EXACTI:
-        case OP_NOTEXACT:
-        case OP_NOTEXACTI:
-        tempcode += PRIV(OP_lengths)[*tempcode];
-#ifdef SUPPORT_UTF
-        if (utf && HAS_EXTRALEN(tempcode[-1]))
-          tempcode += GET_EXTRALEN(tempcode[-1]);
-#endif
-        break;
-
-        /* For the class opcodes, the repeat operator appears at the end;
-        adjust tempcode to point to it. */
-
-        case OP_CLASS:
-        case OP_NCLASS:
-        tempcode += 1 + 32/sizeof(pcre_uchar);
-        break;
-
-#if defined SUPPORT_UTF || !defined COMPILE_PCRE8
-        case OP_XCLASS:
-        tempcode += GET(tempcode, 1);
-        break;
-#endif
-        }
-
-      /* If tempcode is equal to code (which points to the end of the repeated
-      item), it means we have skipped an EXACT item but there is no following
-      QUERY, STAR, or UPTO; the value of len will be 0, and we do nothing. In
-      all other cases, tempcode will be pointing to the repeat opcode, and will
-      be less than code, so the value of len will be greater than 0. */
-
-      len = (int)(code - tempcode);
-      if (len > 0)
-        {
-        unsigned int repcode = *tempcode;
-
-        /* There is a table for possessifying opcodes, all of which are less
-        than OP_CALLOUT. A zero entry means there is no possessified version.
-        */
-
-        if (repcode < OP_CALLOUT && opcode_possessify[repcode] > 0)
-          *tempcode = opcode_possessify[repcode];
-
-        /* For opcode without a special possessified version, wrap the item in
-        ONCE brackets. Because we are moving code along, we must ensure that any
-        pending recursive references are updated. */
-
-        else
-          {
-          *code = OP_END;
-          adjust_recurse(tempcode, 1 + LINK_SIZE, utf, cd, save_hwm);
-          memmove(tempcode + 1 + LINK_SIZE, tempcode, IN_UCHARS(len));
-          code += 1 + LINK_SIZE;
-          len += 1 + LINK_SIZE;
-          tempcode[0] = OP_ONCE;
-          *code++ = OP_KET;
-          PUTINC(code, 0, len);
-          PUT(tempcode, 1, len);
-          }
-        }
-
-#ifdef NEVER
-      if (len > 0) switch (*tempcode)
-        {
-        case OP_STAR:  *tempcode = OP_POSSTAR; break;
-        case OP_PLUS:  *tempcode = OP_POSPLUS; break;
-        case OP_QUERY: *tempcode = OP_POSQUERY; break;
-        case OP_UPTO:  *tempcode = OP_POSUPTO; break;
-
-        case OP_STARI:  *tempcode = OP_POSSTARI; break;
-        case OP_PLUSI:  *tempcode = OP_POSPLUSI; break;
-        case OP_QUERYI: *tempcode = OP_POSQUERYI; break;
-        case OP_UPTOI:  *tempcode = OP_POSUPTOI; break;
-
-        case OP_NOTSTAR:  *tempcode = OP_NOTPOSSTAR; break;
-        case OP_NOTPLUS:  *tempcode = OP_NOTPOSPLUS; break;
-        case OP_NOTQUERY: *tempcode = OP_NOTPOSQUERY; break;
-        case OP_NOTUPTO:  *tempcode = OP_NOTPOSUPTO; break;
-
-        case OP_NOTSTARI:  *tempcode = OP_NOTPOSSTARI; break;
-        case OP_NOTPLUSI:  *tempcode = OP_NOTPOSPLUSI; break;
-        case OP_NOTQUERYI: *tempcode = OP_NOTPOSQUERYI; break;
-        case OP_NOTUPTOI:  *tempcode = OP_NOTPOSUPTOI; break;
-
-        case OP_TYPESTAR:  *tempcode = OP_TYPEPOSSTAR; break;
-        case OP_TYPEPLUS:  *tempcode = OP_TYPEPOSPLUS; break;
-        case OP_TYPEQUERY: *tempcode = OP_TYPEPOSQUERY; break;
-        case OP_TYPEUPTO:  *tempcode = OP_TYPEPOSUPTO; break;
-
-        case OP_CRSTAR:   *tempcode = OP_CRPOSSTAR; break;
-        case OP_CRPLUS:   *tempcode = OP_CRPOSPLUS; break;
-        case OP_CRQUERY:  *tempcode = OP_CRPOSQUERY; break;
-        case OP_CRRANGE:  *tempcode = OP_CRPOSRANGE; break;
-
-        /* Because we are moving code along, we must ensure that any
-        pending recursive references are updated. */
-
-        default:
-        *code = OP_END;
-        adjust_recurse(tempcode, 1 + LINK_SIZE, utf, cd, save_hwm);
-        memmove(tempcode + 1 + LINK_SIZE, tempcode, IN_UCHARS(len));
-        code += 1 + LINK_SIZE;
-        len += 1 + LINK_SIZE;
-        tempcode[0] = OP_ONCE;
-        *code++ = OP_KET;
-        PUTINC(code, 0, len);
-        PUT(tempcode, 1, len);
-        break;
-        }
-#endif
-      }
-
-    /* In all case we no longer have a previous item. We also set the
-    "follows varying string" flag for subsequently encountered reqchars if
-    it isn't already set and we have just passed a varying length item. */
-
-    END_REPEAT:
-    previous = NULL;
-    cd->req_varyopt |= reqvary;
-    break;
-
-
-    /* ===================================================================*/
-    /* Start of nested parenthesized sub-expression, or comment or lookahead or
-    lookbehind or option setting or condition or all the other extended
-    parenthesis forms.  */
-
-    case CHAR_LEFT_PARENTHESIS:
-    newoptions = options;
-    skipbytes = 0;
-    bravalue = OP_CBRA;
-    save_hwm = cd->hwm;
-    reset_bracount = FALSE;
-
-    /* First deal with various "verbs" that can be introduced by '*'. */
-
-    ptr++;
-    if (ptr[0] == CHAR_ASTERISK && (ptr[1] == ':'
-         || (MAX_255(ptr[1]) && ((cd->ctypes[ptr[1]] & ctype_letter) != 0))))
-      {
-      int i, namelen;
-      int arglen = 0;
-      const char *vn = verbnames;
-      const pcre_uchar *name = ptr + 1;
-      const pcre_uchar *arg = NULL;
-      previous = NULL;
-      ptr++;
-      while (MAX_255(*ptr) && (cd->ctypes[*ptr] & ctype_letter) != 0) ptr++;
-      namelen = (int)(ptr - name);
-
-      /* It appears that Perl allows any characters whatsoever, other than
-      a closing parenthesis, to appear in arguments, so we no longer insist on
-      letters, digits, and underscores. */
-
-      if (*ptr == CHAR_COLON)
-        {
-        arg = ++ptr;
-        while (*ptr != CHAR_NULL && *ptr != CHAR_RIGHT_PARENTHESIS) ptr++;
-        arglen = (int)(ptr - arg);
-        if ((unsigned int)arglen > MAX_MARK)
-          {
-          *errorcodeptr = ERR75;
-          goto FAILED;
-          }
-        }
-
-      if (*ptr != CHAR_RIGHT_PARENTHESIS)
-        {
-        *errorcodeptr = ERR60;
-        goto FAILED;
-        }
-
-      /* Scan the table of verb names */
-
-      for (i = 0; i < verbcount; i++)
-        {
-        if (namelen == verbs[i].len &&
-            STRNCMP_UC_C8(name, vn, namelen) == 0)
-          {
-          int setverb;
-
-          /* Check for open captures before ACCEPT and convert it to
-          ASSERT_ACCEPT if in an assertion. */
-
-          if (verbs[i].op == OP_ACCEPT)
-            {
-            open_capitem *oc;
-            if (arglen != 0)
-              {
-              *errorcodeptr = ERR59;
-              goto FAILED;
-              }
-            cd->had_accept = TRUE;
-            for (oc = cd->open_caps; oc != NULL; oc = oc->next)
-              {
-              *code++ = OP_CLOSE;
-              PUT2INC(code, 0, oc->number);
-              }
-            setverb = *code++ =
-              (cd->assert_depth > 0)? OP_ASSERT_ACCEPT : OP_ACCEPT;
-
-            /* Do not set firstchar after *ACCEPT */
-            if (firstcharflags == REQ_UNSET) firstcharflags = REQ_NONE;
-            }
-
-          /* Handle other cases with/without an argument */
-
-          else if (arglen == 0)
-            {
-            if (verbs[i].op < 0)   /* Argument is mandatory */
-              {
-              *errorcodeptr = ERR66;
-              goto FAILED;
-              }
-            setverb = *code++ = verbs[i].op;
-            }
-
-          else
-            {
-            if (verbs[i].op_arg < 0)   /* Argument is forbidden */
-              {
-              *errorcodeptr = ERR59;
-              goto FAILED;
-              }
-            setverb = *code++ = verbs[i].op_arg;
-            *code++ = arglen;
-            memcpy(code, arg, IN_UCHARS(arglen));
-            code += arglen;
-            *code++ = 0;
-            }
-
-          switch (setverb)
-            {
-            case OP_THEN:
-            case OP_THEN_ARG:
-            cd->external_flags |= PCRE_HASTHEN;
-            break;
-
-            case OP_PRUNE:
-            case OP_PRUNE_ARG:
-            case OP_SKIP:
-            case OP_SKIP_ARG:
-            cd->had_pruneorskip = TRUE;
-            break;
-            }
-
-          break;  /* Found verb, exit loop */
-          }
-
-        vn += verbs[i].len + 1;
-        }
-
-      if (i < verbcount) continue;    /* Successfully handled a verb */
-      *errorcodeptr = ERR60;          /* Verb not recognized */
-      goto FAILED;
-      }
-
-    /* Deal with the extended parentheses; all are introduced by '?', and the
-    appearance of any of them means that this is not a capturing group. */
-
-    else if (*ptr == CHAR_QUESTION_MARK)
-      {
-      int i, set, unset, namelen;
-      int *optset;
-      const pcre_uchar *name;
-      pcre_uchar *slot;
-
-      switch (*(++ptr))
-        {
-        case CHAR_NUMBER_SIGN:                 /* Comment; skip to ket */
-        ptr++;
-        while (*ptr != CHAR_NULL && *ptr != CHAR_RIGHT_PARENTHESIS) ptr++;
-        if (*ptr == CHAR_NULL)
-          {
-          *errorcodeptr = ERR18;
-          goto FAILED;
-          }
-        continue;
-
-
-        /* ------------------------------------------------------------ */
-        case CHAR_VERTICAL_LINE:  /* Reset capture count for each branch */
-        reset_bracount = TRUE;
-        /* Fall through */
-
-        /* ------------------------------------------------------------ */
-        case CHAR_COLON:          /* Non-capturing bracket */
-        bravalue = OP_BRA;
-        ptr++;
-        break;
-
-
-        /* ------------------------------------------------------------ */
-        case CHAR_LEFT_PARENTHESIS:
-        bravalue = OP_COND;       /* Conditional group */
-        tempptr = ptr;
-
-        /* A condition can be an assertion, a number (referring to a numbered
-        group's having been set), a name (referring to a named group), or 'R',
-        referring to recursion. R<digits> and R&name are also permitted for
-        recursion tests.
-
-        There are ways of testing a named group: (?(name)) is used by Python;
-        Perl 5.10 onwards uses (?(<name>) or (?('name')).
-
-        There is one unfortunate ambiguity, caused by history. 'R' can be the
-        recursive thing or the name 'R' (and similarly for 'R' followed by
-        digits). We look for a name first; if not found, we try the other case.
-
-        For compatibility with auto-callouts, we allow a callout to be
-        specified before a condition that is an assertion. First, check for the
-        syntax of a callout; if found, adjust the temporary pointer that is
-        used to check for an assertion condition. That's all that is needed! */
-
-        if (ptr[1] == CHAR_QUESTION_MARK && ptr[2] == CHAR_C)
-          {
-          for (i = 3;; i++) if (!IS_DIGIT(ptr[i])) break;
-          if (ptr[i] == CHAR_RIGHT_PARENTHESIS)
-            tempptr += i + 1;
-          }
-
-        /* For conditions that are assertions, check the syntax, and then exit
-        the switch. This will take control down to where bracketed groups,
-        including assertions, are processed. */
-
-        if (tempptr[1] == CHAR_QUESTION_MARK &&
-              (tempptr[2] == CHAR_EQUALS_SIGN ||
-               tempptr[2] == CHAR_EXCLAMATION_MARK ||
-               tempptr[2] == CHAR_LESS_THAN_SIGN))
-          break;
-
-        /* Other conditions use OP_CREF/OP_DNCREF/OP_RREF/OP_DNRREF, and all
-        need to skip at least 1+IMM2_SIZE bytes at the start of the group. */
-
-        code[1+LINK_SIZE] = OP_CREF;
-        skipbytes = 1+IMM2_SIZE;
-        refsign = -1;     /* => not a number */
-        namelen = -1;     /* => not a name; must set to avoid warning */
-        name = NULL;      /* Always set to avoid warning */
-        recno = 0;        /* Always set to avoid warning */
-
-        /* Check for a test for recursion in a named group. */
-
-        ptr++;
-        if (*ptr == CHAR_R && ptr[1] == CHAR_AMPERSAND)
-          {
-          terminator = -1;
-          ptr += 2;
-          code[1+LINK_SIZE] = OP_RREF;    /* Change the type of test */
-          }
-
-        /* Check for a test for a named group's having been set, using the Perl
-        syntax (?(<name>) or (?('name'), and also allow for the original PCRE
-        syntax of (?(name) or for (?(+n), (?(-n), and just (?(n). */
-
-        else if (*ptr == CHAR_LESS_THAN_SIGN)
-          {
-          terminator = CHAR_GREATER_THAN_SIGN;
-          ptr++;
-          }
-        else if (*ptr == CHAR_APOSTROPHE)
-          {
-          terminator = CHAR_APOSTROPHE;
-          ptr++;
-          }
-        else
-          {
-          terminator = CHAR_NULL;
-          if (*ptr == CHAR_MINUS || *ptr == CHAR_PLUS) refsign = *ptr++;
-            else if (IS_DIGIT(*ptr)) refsign = 0;
-          }
-
-        /* Handle a number */
-
-        if (refsign >= 0)
-          {
-          while (IS_DIGIT(*ptr))
-            {
-            recno = recno * 10 + (int)(*ptr - CHAR_0);
-            ptr++;
-            }
-          }
-
-        /* Otherwise we expect to read a name; anything else is an error. When
-        a name is one of a number of duplicates, a different opcode is used and
-        it needs more memory. Unfortunately we cannot tell whether a name is a
-        duplicate in the first pass, so we have to allow for more memory. */
-
-        else
-          {
-          if (IS_DIGIT(*ptr))
-            {
-            *errorcodeptr = ERR84;
-            goto FAILED;
-            }
-          if (!MAX_255(*ptr) || (cd->ctypes[*ptr] & ctype_word) == 0)
-            {
-            *errorcodeptr = ERR28;   /* Assertion expected */
-            goto FAILED;
-            }
-          name = ptr++;
-          while (MAX_255(*ptr) && (cd->ctypes[*ptr] & ctype_word) != 0)
-            {
-            ptr++;
-            }
-          namelen = (int)(ptr - name);
-          if (lengthptr != NULL) *lengthptr += IMM2_SIZE;
-          }
-
-        /* Check the terminator */
-
-        if ((terminator > 0 && *ptr++ != (pcre_uchar)terminator) ||
-            *ptr++ != CHAR_RIGHT_PARENTHESIS)
-          {
-          ptr--;                  /* Error offset */
-          *errorcodeptr = ERR26;  /* Malformed number or name */
-          goto FAILED;
-          }
-
-        /* Do no further checking in the pre-compile phase. */
-
-        if (lengthptr != NULL) break;
-
-        /* In the real compile we do the work of looking for the actual
-        reference. If refsign is not negative, it means we have a number in
-        recno. */
-
-        if (refsign >= 0)
-          {
-          if (recno <= 0)
-            {
-            *errorcodeptr = ERR35;
-            goto FAILED;
-            }
-          if (refsign != 0) recno = (refsign == CHAR_MINUS)?
-            cd->bracount - recno + 1 : recno + cd->bracount;
-          if (recno <= 0 || recno > cd->final_bracount)
-            {
-            *errorcodeptr = ERR15;
-            goto FAILED;
-            }
-          PUT2(code, 2+LINK_SIZE, recno);
-          break;
-          }
-
-        /* Otherwise look for the name. */
-
-        slot = cd->name_table;
-        for (i = 0; i < cd->names_found; i++)
-          {
-          if (STRNCMP_UC_UC(name, slot+IMM2_SIZE, namelen) == 0) break;
-          slot += cd->name_entry_size;
-          }
-
-        /* Found the named subpattern. If the name is duplicated, add one to
-        the opcode to change CREF/RREF into DNCREF/DNRREF and insert
-        appropriate data values. Otherwise, just insert the unique subpattern
-        number. */
-
-        if (i < cd->names_found)
-          {
-          int offset = i++;
-          int count = 1;
-          recno = GET2(slot, 0);   /* Number from first found */
-          for (; i < cd->names_found; i++)
-            {
-            slot += cd->name_entry_size;
-            if (STRNCMP_UC_UC(name, slot+IMM2_SIZE, namelen) != 0) break;
-            count++;
-            }
-          if (count > 1)
-            {
-            PUT2(code, 2+LINK_SIZE, offset);
-            PUT2(code, 2+LINK_SIZE+IMM2_SIZE, count);
-            skipbytes += IMM2_SIZE;
-            code[1+LINK_SIZE]++;
-            }
-          else  /* Not a duplicated name */
-            {
-            PUT2(code, 2+LINK_SIZE, recno);
-            }
-          }
-
-        /* If terminator == CHAR_NULL it means that the name followed directly
-        after the opening parenthesis [e.g. (?(abc)...] and in this case there
-        are some further alternatives to try. For the cases where terminator !=
-        CHAR_NULL [things like (?(<name>... or (?('name')... or (?(R&name)... ]
-        we have now checked all the possibilities, so give an error. */
-
-        else if (terminator != CHAR_NULL)
-          {
-          *errorcodeptr = ERR15;
-          goto FAILED;
-          }
-
-        /* Check for (?(R) for recursion. Allow digits after R to specify a
-        specific group number. */
-
-        else if (*name == CHAR_R)
-          {
-          recno = 0;
-          for (i = 1; i < namelen; i++)
-            {
-            if (!IS_DIGIT(name[i]))
-              {
-              *errorcodeptr = ERR15;
-              goto FAILED;
-              }
-            recno = recno * 10 + name[i] - CHAR_0;
-            }
-          if (recno == 0) recno = RREF_ANY;
-          code[1+LINK_SIZE] = OP_RREF;      /* Change test type */
-          PUT2(code, 2+LINK_SIZE, recno);
-          }
-
-        /* Similarly, check for the (?(DEFINE) "condition", which is always
-        false. */
-
-        else if (namelen == 6 && STRNCMP_UC_C8(name, STRING_DEFINE, 6) == 0)
-          {
-          code[1+LINK_SIZE] = OP_DEF;
-          skipbytes = 1;
-          }
-
-        /* Reference to an unidentified subpattern. */
-
-        else
-          {
-          *errorcodeptr = ERR15;
-          goto FAILED;
-          }
-        break;
-
-
-        /* ------------------------------------------------------------ */
-        case CHAR_EQUALS_SIGN:                 /* Positive lookahead */
-        bravalue = OP_ASSERT;
-        cd->assert_depth += 1;
-        ptr++;
-        break;
-
-        /* Optimize (?!) to (*FAIL) unless it is quantified - which is a weird
-        thing to do, but Perl allows all assertions to be quantified, and when
-        they contain capturing parentheses there may be a potential use for
-        this feature. Not that that applies to a quantified (?!) but we allow
-        it for uniformity. */
-
-        /* ------------------------------------------------------------ */
-        case CHAR_EXCLAMATION_MARK:            /* Negative lookahead */
-        ptr++;
-        if (*ptr == CHAR_RIGHT_PARENTHESIS && ptr[1] != CHAR_ASTERISK &&
-             ptr[1] != CHAR_PLUS && ptr[1] != CHAR_QUESTION_MARK &&
-            (ptr[1] != CHAR_LEFT_CURLY_BRACKET || !is_counted_repeat(ptr+2)))
-          {
-          *code++ = OP_FAIL;
-          previous = NULL;
-          continue;
-          }
-        bravalue = OP_ASSERT_NOT;
-        cd->assert_depth += 1;
-        break;
-
-
-        /* ------------------------------------------------------------ */
-        case CHAR_LESS_THAN_SIGN:              /* Lookbehind or named define */
-        switch (ptr[1])
-          {
-          case CHAR_EQUALS_SIGN:               /* Positive lookbehind */
-          bravalue = OP_ASSERTBACK;
-          cd->assert_depth += 1;
-          ptr += 2;
-          break;
-
-          case CHAR_EXCLAMATION_MARK:          /* Negative lookbehind */
-          bravalue = OP_ASSERTBACK_NOT;
-          cd->assert_depth += 1;
-          ptr += 2;
-          break;
-
-          default:                /* Could be name define, else bad */
-          if (MAX_255(ptr[1]) && (cd->ctypes[ptr[1]] & ctype_word) != 0)
-            goto DEFINE_NAME;
-          ptr++;                  /* Correct offset for error */
-          *errorcodeptr = ERR24;
-          goto FAILED;
-          }
-        break;
-
-
-        /* ------------------------------------------------------------ */
-        case CHAR_GREATER_THAN_SIGN:           /* One-time brackets */
-        bravalue = OP_ONCE;
-        ptr++;
-        break;
-
-
-        /* ------------------------------------------------------------ */
-        case CHAR_C:                 /* Callout - may be followed by digits; */
-        previous_callout = code;     /* Save for later completion */
-        after_manual_callout = 1;    /* Skip one item before completing */
-        *code++ = OP_CALLOUT;
-          {
-          int n = 0;
-          ptr++;
-          while(IS_DIGIT(*ptr))
-            n = n * 10 + *ptr++ - CHAR_0;
-          if (*ptr != CHAR_RIGHT_PARENTHESIS)
-            {
-            *errorcodeptr = ERR39;
-            goto FAILED;
-            }
-          if (n > 255)
-            {
-            *errorcodeptr = ERR38;
-            goto FAILED;
-            }
-          *code++ = n;
-          PUT(code, 0, (int)(ptr - cd->start_pattern + 1)); /* Pattern offset */
-          PUT(code, LINK_SIZE, 0);                          /* Default length */
-          code += 2 * LINK_SIZE;
-          }
-        previous = NULL;
-        continue;
-
-
-        /* ------------------------------------------------------------ */
-        case CHAR_P:              /* Python-style named subpattern handling */
-        if (*(++ptr) == CHAR_EQUALS_SIGN ||
-            *ptr == CHAR_GREATER_THAN_SIGN)  /* Reference or recursion */
-          {
-          is_recurse = *ptr == CHAR_GREATER_THAN_SIGN;
-          terminator = CHAR_RIGHT_PARENTHESIS;
-          goto NAMED_REF_OR_RECURSE;
-          }
-        else if (*ptr != CHAR_LESS_THAN_SIGN)  /* Test for Python-style defn */
-          {
-          *errorcodeptr = ERR41;
-          goto FAILED;
-          }
-        /* Fall through to handle (?P< as (?< is handled */
-
-
-        /* ------------------------------------------------------------ */
-        DEFINE_NAME:    /* Come here from (?< handling */
-        case CHAR_APOSTROPHE:
-        terminator = (*ptr == CHAR_LESS_THAN_SIGN)?
-          CHAR_GREATER_THAN_SIGN : CHAR_APOSTROPHE;
-        name = ++ptr;
-        if (IS_DIGIT(*ptr))
-          {
-          *errorcodeptr = ERR84;   /* Group name must start with non-digit */
-          goto FAILED;
-          }
-        while (MAX_255(*ptr) && (cd->ctypes[*ptr] & ctype_word) != 0) ptr++;
-        namelen = (int)(ptr - name);
-
-        /* In the pre-compile phase, do a syntax check, remember the longest
-        name, and then remember the group in a vector, expanding it if
-        necessary. Duplicates for the same number are skipped; other duplicates
-        are checked for validity. In the actual compile, there is nothing to
-        do. */
-
-        if (lengthptr != NULL)
-          {
-          named_group *ng;
-          pcre_uint32 number = cd->bracount + 1;
-
-          if (*ptr != (pcre_uchar)terminator)
-            {
-            *errorcodeptr = ERR42;
-            goto FAILED;
-            }
-
-          if (cd->names_found >= MAX_NAME_COUNT)
-            {
-            *errorcodeptr = ERR49;
-            goto FAILED;
-            }
-
-          if (namelen + IMM2_SIZE + 1 > cd->name_entry_size)
-            {
-            cd->name_entry_size = namelen + IMM2_SIZE + 1;
-            if (namelen > MAX_NAME_SIZE)
-              {
-              *errorcodeptr = ERR48;
-              goto FAILED;
-              }
-            }
-
-          /* Scan the list to check for duplicates. For duplicate names, if the
-          number is the same, break the loop, which causes the name to be
-          discarded; otherwise, if DUPNAMES is not set, give an error.
-          If it is set, allow the name with a different number, but continue
-          scanning in case this is a duplicate with the same number. For
-          non-duplicate names, give an error if the number is duplicated. */
-
-          ng = cd->named_groups;
-          for (i = 0; i < cd->names_found; i++, ng++)
-            {
-            if (namelen == ng->length &&
-                STRNCMP_UC_UC(name, ng->name, namelen) == 0)
-              {
-              if (ng->number == number) break;
-              if ((options & PCRE_DUPNAMES) == 0)
-                {
-                *errorcodeptr = ERR43;
-                goto FAILED;
-                }
-              cd->dupnames = TRUE;  /* Duplicate names exist */
-              }
-            else if (ng->number == number)
-              {
-              *errorcodeptr = ERR65;
-              goto FAILED;
-              }
-            }
-
-          if (i >= cd->names_found)     /* Not a duplicate with same number */
-            {
-            /* Increase the list size if necessary */
-
-            if (cd->names_found >= cd->named_group_list_size)
-              {
-              int newsize = cd->named_group_list_size * 2;
-              named_group *newspace = (PUBL(malloc))
-                (newsize * sizeof(named_group));
-
-              if (newspace == NULL)
-                {
-                *errorcodeptr = ERR21;
-                goto FAILED;
-                }
-
-              memcpy(newspace, cd->named_groups,
-                cd->named_group_list_size * sizeof(named_group));
-              if (cd->named_group_list_size > NAMED_GROUP_LIST_SIZE)
-                (PUBL(free))((void *)cd->named_groups);
-              cd->named_groups = newspace;
-              cd->named_group_list_size = newsize;
-              }
-
-            cd->named_groups[cd->names_found].name = name;
-            cd->named_groups[cd->names_found].length = namelen;
-            cd->named_groups[cd->names_found].number = number;
-            cd->names_found++;
-            }
-          }
-
-        ptr++;                    /* Move past > or ' in both passes. */
-        goto NUMBERED_GROUP;
-
-
-        /* ------------------------------------------------------------ */
-        case CHAR_AMPERSAND:            /* Perl recursion/subroutine syntax */
-        terminator = CHAR_RIGHT_PARENTHESIS;
-        is_recurse = TRUE;
-        /* Fall through */
-
-        /* We come here from the Python syntax above that handles both
-        references (?P=name) and recursion (?P>name), as well as falling
-        through from the Perl recursion syntax (?&name). We also come here from
-        the Perl \k<name> or \k'name' back reference syntax and the \k{name}
-        .NET syntax, and the Oniguruma \g<...> and \g'...' subroutine syntax. */
-
-        NAMED_REF_OR_RECURSE:
-        name = ++ptr;
-        if (IS_DIGIT(*ptr))
-          {
-          *errorcodeptr = ERR84;   /* Group name must start with non-digit */
-          goto FAILED;
-          }
-        while (MAX_255(*ptr) && (cd->ctypes[*ptr] & ctype_word) != 0) ptr++;
-        namelen = (int)(ptr - name);
-
-        /* In the pre-compile phase, do a syntax check. We used to just set
-        a dummy reference number, because it was not used in the first pass.
-        However, with the change of recursive back references to be atomic,
-        we have to look for the number so that this state can be identified, as
-        otherwise the incorrect length is computed. If it's not a backwards
-        reference, the dummy number will do. */
-
-        if (lengthptr != NULL)
-          {
-          named_group *ng;
-
-          if (namelen == 0)
-            {
-            *errorcodeptr = ERR62;
-            goto FAILED;
-            }
-          if (*ptr != (pcre_uchar)terminator)
-            {
-            *errorcodeptr = ERR42;
-            goto FAILED;
-            }
-          if (namelen > MAX_NAME_SIZE)
-            {
-            *errorcodeptr = ERR48;
-            goto FAILED;
-            }
-
-          /* The name table does not exist in the first pass; instead we must
-          scan the list of names encountered so far in order to get the
-          number. If the name is not found, set the value to 0 for a forward
-          reference. */
-
-          ng = cd->named_groups;
-          for (i = 0; i < cd->names_found; i++, ng++)
-            {
-            if (namelen == ng->length &&
-                STRNCMP_UC_UC(name, ng->name, namelen) == 0)
-              break;
-            }
-          recno = (i < cd->names_found)? ng->number : 0;
-
-          /* Count named back references. */
-
-          if (!is_recurse) cd->namedrefcount++;
-          }
-
-        /* In the real compile, search the name table. We check the name
-        first, and then check that we have reached the end of the name in the
-        table. That way, if the name is longer than any in the table, the
-        comparison will fail without reading beyond the table entry. */
-
-        else
-          {
-          slot = cd->name_table;
-          for (i = 0; i < cd->names_found; i++)
-            {
-            if (STRNCMP_UC_UC(name, slot+IMM2_SIZE, namelen) == 0 &&
-                slot[IMM2_SIZE+namelen] == 0)
-              break;
-            slot += cd->name_entry_size;
-            }
-
-          if (i < cd->names_found)
-            {
-            recno = GET2(slot, 0);
-            }
-          else
-            {
-            *errorcodeptr = ERR15;
-            goto FAILED;
-            }
-          }
-
-        /* In both phases, for recursions, we can now go to the code than
-        handles numerical recursion. */
-
-        if (is_recurse) goto HANDLE_RECURSION;
-
-        /* In the second pass we must see if the name is duplicated. If so, we
-        generate a different opcode. */
-
-        if (lengthptr == NULL && cd->dupnames)
-          {
-          int count = 1;
-          unsigned int index = i;
-          pcre_uchar *cslot = slot + cd->name_entry_size;
-
-          for (i++; i < cd->names_found; i++)
-            {
-            if (STRCMP_UC_UC(slot + IMM2_SIZE, cslot + IMM2_SIZE) != 0) break;
-            count++;
-            cslot += cd->name_entry_size;
-            }
-
-          if (count > 1)
-            {
-            if (firstcharflags == REQ_UNSET) firstcharflags = REQ_NONE;
-            previous = code;
-            *code++ = ((options & PCRE_CASELESS) != 0)? OP_DNREFI : OP_DNREF;
-            PUT2INC(code, 0, index);
-            PUT2INC(code, 0, count);
-
-            /* Process each potentially referenced group. */
-
-            for (; slot < cslot; slot += cd->name_entry_size)
-              {
-              open_capitem *oc;
-              recno = GET2(slot, 0);
-              cd->backref_map |= (recno < 32)? (1 << recno) : 1;
-              if (recno > cd->top_backref) cd->top_backref = recno;
-
-              /* Check to see if this back reference is recursive, that it, it
-              is inside the group that it references. A flag is set so that the
-              group can be made atomic. */
-
-              for (oc = cd->open_caps; oc != NULL; oc = oc->next)
-                {
-                if (oc->number == recno)
-                  {
-                  oc->flag = TRUE;
-                  break;
-                  }
-                }
-              }
-
-            continue;  /* End of back ref handling */
-            }
-          }
-
-        /* First pass, or a non-duplicated name. */
-
-        goto HANDLE_REFERENCE;
-
-
-        /* ------------------------------------------------------------ */
-        case CHAR_R:              /* Recursion */
-        ptr++;                    /* Same as (?0)      */
-        /* Fall through */
-
-
-        /* ------------------------------------------------------------ */
-        case CHAR_MINUS: case CHAR_PLUS:  /* Recursion or subroutine */
-        case CHAR_0: case CHAR_1: case CHAR_2: case CHAR_3: case CHAR_4:
-        case CHAR_5: case CHAR_6: case CHAR_7: case CHAR_8: case CHAR_9:
-          {
-          const pcre_uchar *called;
-          terminator = CHAR_RIGHT_PARENTHESIS;
-
-          /* Come here from the \g<...> and \g'...' code (Oniguruma
-          compatibility). However, the syntax has been checked to ensure that
-          the ... are a (signed) number, so that neither ERR63 nor ERR29 will
-          be called on this path, nor with the jump to OTHER_CHAR_AFTER_QUERY
-          ever be taken. */
-
-          HANDLE_NUMERICAL_RECURSION:
-
-          if ((refsign = *ptr) == CHAR_PLUS)
-            {
-            ptr++;
-            if (!IS_DIGIT(*ptr))
-              {
-              *errorcodeptr = ERR63;
-              goto FAILED;
-              }
-            }
-          else if (refsign == CHAR_MINUS)
-            {
-            if (!IS_DIGIT(ptr[1]))
-              goto OTHER_CHAR_AFTER_QUERY;
-            ptr++;
-            }
-
-          recno = 0;
-          while(IS_DIGIT(*ptr))
-            recno = recno * 10 + *ptr++ - CHAR_0;
-
-          if (*ptr != (pcre_uchar)terminator)
-            {
-            *errorcodeptr = ERR29;
-            goto FAILED;
-            }
-
-          if (refsign == CHAR_MINUS)
-            {
-            if (recno == 0)
-              {
-              *errorcodeptr = ERR58;
-              goto FAILED;
-              }
-            recno = cd->bracount - recno + 1;
-            if (recno <= 0)
-              {
-              *errorcodeptr = ERR15;
-              goto FAILED;
-              }
-            }
-          else if (refsign == CHAR_PLUS)
-            {
-            if (recno == 0)
-              {
-              *errorcodeptr = ERR58;
-              goto FAILED;
-              }
-            recno += cd->bracount;
-            }
-
-          /* Come here from code above that handles a named recursion */
-
-          HANDLE_RECURSION:
-
-          previous = code;
-          called = cd->start_code;
-
-          /* When we are actually compiling, find the bracket that is being
-          referenced. Temporarily end the regex in case it doesn't exist before
-          this point. If we end up with a forward reference, first check that
-          the bracket does occur later so we can give the error (and position)
-          now. Then remember this forward reference in the workspace so it can
-          be filled in at the end. */
-
-          if (lengthptr == NULL)
-            {
-            *code = OP_END;
-            if (recno != 0)
-              called = PRIV(find_bracket)(cd->start_code, utf, recno);
-
-            /* Forward reference */
-
-            if (called == NULL)
-              {
-              if (recno > cd->final_bracount)
-                {
-                *errorcodeptr = ERR15;
-                goto FAILED;
-                }
-
-              /* Fudge the value of "called" so that when it is inserted as an
-              offset below, what it actually inserted is the reference number
-              of the group. Then remember the forward reference. */
-
-              called = cd->start_code + recno;
-              if (cd->hwm >= cd->start_workspace + cd->workspace_size -
-                  WORK_SIZE_SAFETY_MARGIN)
-                {
-                *errorcodeptr = expand_workspace(cd);
-                if (*errorcodeptr != 0) goto FAILED;
-                }
-              PUTINC(cd->hwm, 0, (int)(code + 1 - cd->start_code));
-              }
-
-            /* If not a forward reference, and the subpattern is still open,
-            this is a recursive call. We check to see if this is a left
-            recursion that could loop for ever, and diagnose that case. We
-            must not, however, do this check if we are in a conditional
-            subpattern because the condition might be testing for recursion in
-            a pattern such as /(?(R)a+|(?R)b)/, which is perfectly valid.
-            Forever loops are also detected at runtime, so those that occur in
-            conditional subpatterns will be picked up then. */
-
-            else if (GET(called, 1) == 0 && cond_depth <= 0 &&
-                     could_be_empty(called, code, bcptr, utf, cd))
-              {
-              *errorcodeptr = ERR40;
-              goto FAILED;
-              }
-            }
-
-          /* Insert the recursion/subroutine item. It does not have a set first
-          character (relevant if it is repeated, because it will then be
-          wrapped with ONCE brackets). */
-
-          *code = OP_RECURSE;
-          PUT(code, 1, (int)(called - cd->start_code));
-          code += 1 + LINK_SIZE;
-          groupsetfirstchar = FALSE;
-          }
-
-        /* Can't determine a first byte now */
-
-        if (firstcharflags == REQ_UNSET) firstcharflags = REQ_NONE;
-        continue;
-
-
-        /* ------------------------------------------------------------ */
-        default:              /* Other characters: check option setting */
-        OTHER_CHAR_AFTER_QUERY:
-        set = unset = 0;
-        optset = &set;
-
-        while (*ptr != CHAR_RIGHT_PARENTHESIS && *ptr != CHAR_COLON)
-          {
-          switch (*ptr++)
-            {
-            case CHAR_MINUS: optset = &unset; break;
-
-            case CHAR_J:    /* Record that it changed in the external options */
-            *optset |= PCRE_DUPNAMES;
-            cd->external_flags |= PCRE_JCHANGED;
-            break;
-
-            case CHAR_i: *optset |= PCRE_CASELESS; break;
-            case CHAR_m: *optset |= PCRE_MULTILINE; break;
-            case CHAR_s: *optset |= PCRE_DOTALL; break;
-            case CHAR_x: *optset |= PCRE_EXTENDED; break;
-            case CHAR_U: *optset |= PCRE_UNGREEDY; break;
-            case CHAR_X: *optset |= PCRE_EXTRA; break;
-
-            default:  *errorcodeptr = ERR12;
-                      ptr--;    /* Correct the offset */
-                      goto FAILED;
-            }
-          }
-
-        /* Set up the changed option bits, but don't change anything yet. */
-
-        newoptions = (options | set) & (~unset);
-
-        /* If the options ended with ')' this is not the start of a nested
-        group with option changes, so the options change at this level. If this
-        item is right at the start of the pattern, the options can be
-        abstracted and made external in the pre-compile phase, and ignored in
-        the compile phase. This can be helpful when matching -- for instance in
-        caseless checking of required bytes.
-
-        If the code pointer is not (cd->start_code + 1 + LINK_SIZE), we are
-        definitely *not* at the start of the pattern because something has been
-        compiled. In the pre-compile phase, however, the code pointer can have
-        that value after the start, because it gets reset as code is discarded
-        during the pre-compile. However, this can happen only at top level - if
-        we are within parentheses, the starting BRA will still be present. At
-        any parenthesis level, the length value can be used to test if anything
-        has been compiled at that level. Thus, a test for both these conditions
-        is necessary to ensure we correctly detect the start of the pattern in
-        both phases.
-
-        If we are not at the pattern start, reset the greedy defaults and the
-        case value for firstchar and reqchar. */
-
-        if (*ptr == CHAR_RIGHT_PARENTHESIS)
-          {
-          if (code == cd->start_code + 1 + LINK_SIZE &&
-               (lengthptr == NULL || *lengthptr == 2 + 2*LINK_SIZE))
-            {
-            cd->external_options = newoptions;
-            }
-          else
-            {
-            greedy_default = ((newoptions & PCRE_UNGREEDY) != 0);
-            greedy_non_default = greedy_default ^ 1;
-            req_caseopt = ((newoptions & PCRE_CASELESS) != 0)? REQ_CASELESS:0;
-            }
-
-          /* Change options at this level, and pass them back for use
-          in subsequent branches. */
-
-          *optionsptr = options = newoptions;
-          previous = NULL;       /* This item can't be repeated */
-          continue;              /* It is complete */
-          }
-
-        /* If the options ended with ':' we are heading into a nested group
-        with possible change of options. Such groups are non-capturing and are
-        not assertions of any kind. All we need to do is skip over the ':';
-        the newoptions value is handled below. */
-
-        bravalue = OP_BRA;
-        ptr++;
-        }     /* End of switch for character following (? */
-      }       /* End of (? handling */
-
-    /* Opening parenthesis not followed by '*' or '?'. If PCRE_NO_AUTO_CAPTURE
-    is set, all unadorned brackets become non-capturing and behave like (?:...)
-    brackets. */
-
-    else if ((options & PCRE_NO_AUTO_CAPTURE) != 0)
-      {
-      bravalue = OP_BRA;
-      }
-
-    /* Else we have a capturing group. */
-
-    else
-      {
-      NUMBERED_GROUP:
-      cd->bracount += 1;
-      PUT2(code, 1+LINK_SIZE, cd->bracount);
-      skipbytes = IMM2_SIZE;
-      }
-
-    /* Process nested bracketed regex. First check for parentheses nested too
-    deeply. */
-
-    if ((cd->parens_depth += 1) > PARENS_NEST_LIMIT)
-      {
-      *errorcodeptr = ERR82;
-      goto FAILED;
-      }
-
-    /* Assertions used not to be repeatable, but this was changed for Perl
-    compatibility, so all kinds can now be repeated. We copy code into a
-    non-register variable (tempcode) in order to be able to pass its address
-    because some compilers complain otherwise. */
-
-    previous = code;                      /* For handling repetition */
-    *code = bravalue;
-    tempcode = code;
-    tempreqvary = cd->req_varyopt;        /* Save value before bracket */
-    tempbracount = cd->bracount;          /* Save value before bracket */
-    length_prevgroup = 0;                 /* Initialize for pre-compile phase */
-
-    if (!compile_regex(
-         newoptions,                      /* The complete new option state */
-         &tempcode,                       /* Where to put code (updated) */
-         &ptr,                            /* Input pointer (updated) */
-         errorcodeptr,                    /* Where to put an error message */
-         (bravalue == OP_ASSERTBACK ||
-          bravalue == OP_ASSERTBACK_NOT), /* TRUE if back assert */
-         reset_bracount,                  /* True if (?| group */
-         skipbytes,                       /* Skip over bracket number */
-         cond_depth +
-           ((bravalue == OP_COND)?1:0),   /* Depth of condition subpatterns */
-         &subfirstchar,                   /* For possible first char */
-         &subfirstcharflags,
-         &subreqchar,                     /* For possible last char */
-         &subreqcharflags,
-         bcptr,                           /* Current branch chain */
-         cd,                              /* Tables block */
-         (lengthptr == NULL)? NULL :      /* Actual compile phase */
-           &length_prevgroup              /* Pre-compile phase */
-         ))
-      goto FAILED;
-
-    cd->parens_depth -= 1;
-
-    /* If this was an atomic group and there are no capturing groups within it,
-    generate OP_ONCE_NC instead of OP_ONCE. */
-
-    if (bravalue == OP_ONCE && cd->bracount <= tempbracount)
-      *code = OP_ONCE_NC;
-
-    if (bravalue >= OP_ASSERT && bravalue <= OP_ASSERTBACK_NOT)
-      cd->assert_depth -= 1;
-
-    /* At the end of compiling, code is still pointing to the start of the
-    group, while tempcode has been updated to point past the end of the group.
-    The pattern pointer (ptr) is on the bracket.
-
-    If this is a conditional bracket, check that there are no more than
-    two branches in the group, or just one if it's a DEFINE group. We do this
-    in the real compile phase, not in the pre-pass, where the whole group may
-    not be available. */
-
-    if (bravalue == OP_COND && lengthptr == NULL)
-      {
-      pcre_uchar *tc = code;
-      int condcount = 0;
-
-      do {
-         condcount++;
-         tc += GET(tc,1);
-         }
-      while (*tc != OP_KET);
-
-      /* A DEFINE group is never obeyed inline (the "condition" is always
-      false). It must have only one branch. */
-
-      if (code[LINK_SIZE+1] == OP_DEF)
-        {
-        if (condcount > 1)
-          {
-          *errorcodeptr = ERR54;
-          goto FAILED;
-          }
-        bravalue = OP_DEF;   /* Just a flag to suppress char handling below */
-        }
-
-      /* A "normal" conditional group. If there is just one branch, we must not
-      make use of its firstchar or reqchar, because this is equivalent to an
-      empty second branch. */
-
-      else
-        {
-        if (condcount > 2)
-          {
-          *errorcodeptr = ERR27;
-          goto FAILED;
-          }
-        if (condcount == 1) subfirstcharflags = subreqcharflags = REQ_NONE;
-        }
-      }
-
-    /* Error if hit end of pattern */
-
-    if (*ptr != CHAR_RIGHT_PARENTHESIS)
-      {
-      *errorcodeptr = ERR14;
-      goto FAILED;
-      }
-
-    /* In the pre-compile phase, update the length by the length of the group,
-    less the brackets at either end. Then reduce the compiled code to just a
-    set of non-capturing brackets so that it doesn't use much memory if it is
-    duplicated by a quantifier.*/
-
-    if (lengthptr != NULL)
-      {
-      if (OFLOW_MAX - *lengthptr < length_prevgroup - 2 - 2*LINK_SIZE)
-        {
-        *errorcodeptr = ERR20;
-        goto FAILED;
-        }
-      *lengthptr += length_prevgroup - 2 - 2*LINK_SIZE;
-      code++;   /* This already contains bravalue */
-      PUTINC(code, 0, 1 + LINK_SIZE);
-      *code++ = OP_KET;
-      PUTINC(code, 0, 1 + LINK_SIZE);
-      break;    /* No need to waste time with special character handling */
-      }
-
-    /* Otherwise update the main code pointer to the end of the group. */
-
-    code = tempcode;
-
-    /* For a DEFINE group, required and first character settings are not
-    relevant. */
-
-    if (bravalue == OP_DEF) break;
-
-    /* Handle updating of the required and first characters for other types of
-    group. Update for normal brackets of all kinds, and conditions with two
-    branches (see code above). If the bracket is followed by a quantifier with
-    zero repeat, we have to back off. Hence the definition of zeroreqchar and
-    zerofirstchar outside the main loop so that they can be accessed for the
-    back off. */
-
-    zeroreqchar = reqchar;
-    zeroreqcharflags = reqcharflags;
-    zerofirstchar = firstchar;
-    zerofirstcharflags = firstcharflags;
-    groupsetfirstchar = FALSE;
-
-    if (bravalue >= OP_ONCE)
-      {
-      /* If we have not yet set a firstchar in this branch, take it from the
-      subpattern, remembering that it was set here so that a repeat of more
-      than one can replicate it as reqchar if necessary. If the subpattern has
-      no firstchar, set "none" for the whole branch. In both cases, a zero
-      repeat forces firstchar to "none". */
-
-      if (firstcharflags == REQ_UNSET)
-        {
-        if (subfirstcharflags >= 0)
-          {
-          firstchar = subfirstchar;
-          firstcharflags = subfirstcharflags;
-          groupsetfirstchar = TRUE;
-          }
-        else firstcharflags = REQ_NONE;
-        zerofirstcharflags = REQ_NONE;
-        }
-
-      /* If firstchar was previously set, convert the subpattern's firstchar
-      into reqchar if there wasn't one, using the vary flag that was in
-      existence beforehand. */
-
-      else if (subfirstcharflags >= 0 && subreqcharflags < 0)
-        {
-        subreqchar = subfirstchar;
-        subreqcharflags = subfirstcharflags | tempreqvary;
-        }
-
-      /* If the subpattern set a required byte (or set a first byte that isn't
-      really the first byte - see above), set it. */
-
-      if (subreqcharflags >= 0)
-        {
-        reqchar = subreqchar;
-        reqcharflags = subreqcharflags;
-        }
-      }
-
-    /* For a forward assertion, we take the reqchar, if set. This can be
-    helpful if the pattern that follows the assertion doesn't set a different
-    char. For example, it's useful for /(?=abcde).+/. We can't set firstchar
-    for an assertion, however because it leads to incorrect effect for patterns
-    such as /(?=a)a.+/ when the "real" "a" would then become a reqchar instead
-    of a firstchar. This is overcome by a scan at the end if there's no
-    firstchar, looking for an asserted first char. */
-
-    else if (bravalue == OP_ASSERT && subreqcharflags >= 0)
-      {
-      reqchar = subreqchar;
-      reqcharflags = subreqcharflags;
-      }
-    break;     /* End of processing '(' */
-
-
-    /* ===================================================================*/
-    /* Handle metasequences introduced by \. For ones like \d, the ESC_ values
-    are arranged to be the negation of the corresponding OP_values in the
-    default case when PCRE_UCP is not set. For the back references, the values
-    are negative the reference number. Only back references and those types
-    that consume a character may be repeated. We can test for values between
-    ESC_b and ESC_Z for the latter; this may have to change if any new ones are
-    ever created. */
-
-    case CHAR_BACKSLASH:
-    tempptr = ptr;
-    escape = check_escape(&ptr, &ec, errorcodeptr, cd->bracount, options, FALSE);
-    if (*errorcodeptr != 0) goto FAILED;
-
-    if (escape == 0)                  /* The escape coded a single character */
-      c = ec;
-    else
-      {
-      if (escape == ESC_Q)            /* Handle start of quoted string */
-        {
-        if (ptr[1] == CHAR_BACKSLASH && ptr[2] == CHAR_E)
-          ptr += 2;               /* avoid empty string */
-            else inescq = TRUE;
-        continue;
-        }
-
-      if (escape == ESC_E) continue;  /* Perl ignores an orphan \E */
-
-      /* For metasequences that actually match a character, we disable the
-      setting of a first character if it hasn't already been set. */
-
-      if (firstcharflags == REQ_UNSET && escape > ESC_b && escape < ESC_Z)
-        firstcharflags = REQ_NONE;
-
-      /* Set values to reset to if this is followed by a zero repeat. */
-
-      zerofirstchar = firstchar;
-      zerofirstcharflags = firstcharflags;
-      zeroreqchar = reqchar;
-      zeroreqcharflags = reqcharflags;
-
-      /* \g<name> or \g'name' is a subroutine call by name and \g<n> or \g'n'
-      is a subroutine call by number (Oniguruma syntax). In fact, the value
-      ESC_g is returned only for these cases. So we don't need to check for <
-      or ' if the value is ESC_g. For the Perl syntax \g{n} the value is
-      -n, and for the Perl syntax \g{name} the result is ESC_k (as
-      that is a synonym for a named back reference). */
-
-      if (escape == ESC_g)
-        {
-        const pcre_uchar *p;
-        pcre_uint32 cf;
-
-        save_hwm = cd->hwm;   /* Normally this is set when '(' is read */
-        terminator = (*(++ptr) == CHAR_LESS_THAN_SIGN)?
-          CHAR_GREATER_THAN_SIGN : CHAR_APOSTROPHE;
-
-        /* These two statements stop the compiler for warning about possibly
-        unset variables caused by the jump to HANDLE_NUMERICAL_RECURSION. In
-        fact, because we do the check for a number below, the paths that
-        would actually be in error are never taken. */
-
-        skipbytes = 0;
-        reset_bracount = FALSE;
-
-        /* If it's not a signed or unsigned number, treat it as a name. */
-
-        cf = ptr[1];
-        if (cf != CHAR_PLUS && cf != CHAR_MINUS && !IS_DIGIT(cf))
-          {
-          is_recurse = TRUE;
-          goto NAMED_REF_OR_RECURSE;
-          }
-
-        /* Signed or unsigned number (cf = ptr[1]) is known to be plus or minus
-        or a digit. */
-
-        p = ptr + 2;
-        while (IS_DIGIT(*p)) p++;
-        if (*p != (pcre_uchar)terminator)
-          {
-          *errorcodeptr = ERR57;
-          break;
-          }
-        ptr++;
-        goto HANDLE_NUMERICAL_RECURSION;
-        }
-
-      /* \k<name> or \k'name' is a back reference by name (Perl syntax).
-      We also support \k{name} (.NET syntax).  */
-
-      if (escape == ESC_k)
-        {
-        if ((ptr[1] != CHAR_LESS_THAN_SIGN &&
-          ptr[1] != CHAR_APOSTROPHE && ptr[1] != CHAR_LEFT_CURLY_BRACKET))
-          {
-          *errorcodeptr = ERR69;
-          break;
-          }
-        is_recurse = FALSE;
-        terminator = (*(++ptr) == CHAR_LESS_THAN_SIGN)?
-          CHAR_GREATER_THAN_SIGN : (*ptr == CHAR_APOSTROPHE)?
-          CHAR_APOSTROPHE : CHAR_RIGHT_CURLY_BRACKET;
-        goto NAMED_REF_OR_RECURSE;
-        }
-
-      /* Back references are handled specially; must disable firstchar if
-      not set to cope with cases like (?=(\w+))\1: which would otherwise set
-      ':' later. */
-
-      if (escape < 0)
-        {
-        open_capitem *oc;
-        recno = -escape;
-
-        /* Come here from named backref handling when the reference is to a
-        single group (i.e. not to a duplicated name. */
-
-        HANDLE_REFERENCE:
-        if (firstcharflags == REQ_UNSET) firstcharflags = REQ_NONE;
-        previous = code;
-        *code++ = ((options & PCRE_CASELESS) != 0)? OP_REFI : OP_REF;
-        PUT2INC(code, 0, recno);
-        cd->backref_map |= (recno < 32)? (1 << recno) : 1;
-        if (recno > cd->top_backref) cd->top_backref = recno;
-
-        /* Check to see if this back reference is recursive, that it, it
-        is inside the group that it references. A flag is set so that the
-        group can be made atomic. */
-
-        for (oc = cd->open_caps; oc != NULL; oc = oc->next)
-          {
-          if (oc->number == recno)
-            {
-            oc->flag = TRUE;
-            break;
-            }
-          }
-        }
-
-      /* So are Unicode property matches, if supported. */
-
-#ifdef SUPPORT_UCP
-      else if (escape == ESC_P || escape == ESC_p)
-        {
-        BOOL negated;
-        unsigned int ptype = 0, pdata = 0;
-        if (!get_ucp(&ptr, &negated, &ptype, &pdata, errorcodeptr))
-          goto FAILED;
-        previous = code;
-        *code++ = ((escape == ESC_p) != negated)? OP_PROP : OP_NOTPROP;
-        *code++ = ptype;
-        *code++ = pdata;
-        }
-#else
-
-      /* If Unicode properties are not supported, \X, \P, and \p are not
-      allowed. */
-
-      else if (escape == ESC_X || escape == ESC_P || escape == ESC_p)
-        {
-        *errorcodeptr = ERR45;
-        goto FAILED;
-        }
-#endif
-
-      /* For the rest (including \X when Unicode properties are supported), we
-      can obtain the OP value by negating the escape value in the default
-      situation when PCRE_UCP is not set. When it *is* set, we substitute
-      Unicode property tests. Note that \b and \B do a one-character
-      lookbehind, and \A also behaves as if it does. */
-
-      else
-        {
-        if ((escape == ESC_b || escape == ESC_B || escape == ESC_A) &&
-             cd->max_lookbehind == 0)
-          cd->max_lookbehind = 1;
-#ifdef SUPPORT_UCP
-        if (escape >= ESC_DU && escape <= ESC_wu)
-          {
-          nestptr = ptr + 1;                   /* Where to resume */
-          ptr = substitutes[escape - ESC_DU] - 1;  /* Just before substitute */
-          }
-        else
-#endif
-        /* In non-UTF-8 mode, we turn \C into OP_ALLANY instead of OP_ANYBYTE
-        so that it works in DFA mode and in lookbehinds. */
-
-          {
-          previous = (escape > ESC_b && escape < ESC_Z)? code : NULL;
-          *code++ = (!utf && escape == ESC_C)? OP_ALLANY : escape;
-          }
-        }
-      continue;
-      }
-
-    /* We have a data character whose value is in c. In UTF-8 mode it may have
-    a value > 127. We set its representation in the length/buffer, and then
-    handle it as a data character. */
-
-#if defined SUPPORT_UTF && !defined COMPILE_PCRE32
-    if (utf && c > MAX_VALUE_FOR_SINGLE_CHAR)
-      mclength = PRIV(ord2utf)(c, mcbuffer);
-    else
-#endif
-
-     {
-     mcbuffer[0] = c;
-     mclength = 1;
-     }
-    goto ONE_CHAR;
-
-
-    /* ===================================================================*/
-    /* Handle a literal character. It is guaranteed not to be whitespace or #
-    when the extended flag is set. If we are in a UTF mode, it may be a
-    multi-unit literal character. */
-
-    default:
-    NORMAL_CHAR:
-    mclength = 1;
-    mcbuffer[0] = c;
-
-#ifdef SUPPORT_UTF
-    if (utf && HAS_EXTRALEN(c))
-      ACROSSCHAR(TRUE, ptr[1], mcbuffer[mclength++] = *(++ptr));
-#endif
-
-    /* At this point we have the character's bytes in mcbuffer, and the length
-    in mclength. When not in UTF-8 mode, the length is always 1. */
-
-    ONE_CHAR:
-    previous = code;
-
-    /* For caseless UTF-8 mode when UCP support is available, check whether
-    this character has more than one other case. If so, generate a special
-    OP_PROP item instead of OP_CHARI. */
-
-#ifdef SUPPORT_UCP
-    if (utf && (options & PCRE_CASELESS) != 0)
-      {
-      GETCHAR(c, mcbuffer);
-      if ((c = UCD_CASESET(c)) != 0)
-        {
-        *code++ = OP_PROP;
-        *code++ = PT_CLIST;
-        *code++ = c;
-        if (firstcharflags == REQ_UNSET)
-          firstcharflags = zerofirstcharflags = REQ_NONE;
-        break;
-        }
-      }
-#endif
-
-    /* Caseful matches, or not one of the multicase characters. */
-
-    *code++ = ((options & PCRE_CASELESS) != 0)? OP_CHARI : OP_CHAR;
-    for (c = 0; c < mclength; c++) *code++ = mcbuffer[c];
-
-    /* Remember if \r or \n were seen */
-
-    if (mcbuffer[0] == CHAR_CR || mcbuffer[0] == CHAR_NL)
-      cd->external_flags |= PCRE_HASCRORLF;
-
-    /* Set the first and required bytes appropriately. If no previous first
-    byte, set it from this character, but revert to none on a zero repeat.
-    Otherwise, leave the firstchar value alone, and don't change it on a zero
-    repeat. */
-
-    if (firstcharflags == REQ_UNSET)
-      {
-      zerofirstcharflags = REQ_NONE;
-      zeroreqchar = reqchar;
-      zeroreqcharflags = reqcharflags;
-
-      /* If the character is more than one byte long, we can set firstchar
-      only if it is not to be matched caselessly. */
-
-      if (mclength == 1 || req_caseopt == 0)
-        {
-        firstchar = mcbuffer[0] | req_caseopt;
-        firstchar = mcbuffer[0];
-        firstcharflags = req_caseopt;
-
-        if (mclength != 1)
-          {
-          reqchar = code[-1];
-          reqcharflags = cd->req_varyopt;
-          }
-        }
-      else firstcharflags = reqcharflags = REQ_NONE;
-      }
-
-    /* firstchar was previously set; we can set reqchar only if the length is
-    1 or the matching is caseful. */
-
-    else
-      {
-      zerofirstchar = firstchar;
-      zerofirstcharflags = firstcharflags;
-      zeroreqchar = reqchar;
-      zeroreqcharflags = reqcharflags;
-      if (mclength == 1 || req_caseopt == 0)
-        {
-        reqchar = code[-1];
-        reqcharflags = req_caseopt | cd->req_varyopt;
-        }
-      }
-
-    break;            /* End of literal character handling */
-    }
-  }                   /* end of big loop */
-
-
-/* Control never reaches here by falling through, only by a goto for all the
-error states. Pass back the position in the pattern so that it can be displayed
-to the user for diagnosing the error. */
-
-FAILED:
-*ptrptr = ptr;
-return FALSE;
-}
-
-
-
-/*************************************************
-*     Compile sequence of alternatives           *
-*************************************************/
-
-/* On entry, ptr is pointing past the bracket character, but on return it
-points to the closing bracket, or vertical bar, or end of string. The code
-variable is pointing at the byte into which the BRA operator has been stored.
-This function is used during the pre-compile phase when we are trying to find
-out the amount of memory needed, as well as during the real compile phase. The
-value of lengthptr distinguishes the two phases.
-
-Arguments:
-  options           option bits, including any changes for this subpattern
-  codeptr           -> the address of the current code pointer
-  ptrptr            -> the address of the current pattern pointer
-  errorcodeptr      -> pointer to error code variable
-  lookbehind        TRUE if this is a lookbehind assertion
-  reset_bracount    TRUE to reset the count for each branch
-  skipbytes         skip this many bytes at start (for brackets and OP_COND)
-  cond_depth        depth of nesting for conditional subpatterns
-  firstcharptr      place to put the first required character
-  firstcharflagsptr place to put the first character flags, or a negative number
-  reqcharptr        place to put the last required character
-  reqcharflagsptr   place to put the last required character flags, or a negative number
-  bcptr             pointer to the chain of currently open branches
-  cd                points to the data block with tables pointers etc.
-  lengthptr         NULL during the real compile phase
-                    points to length accumulator during pre-compile phase
-
-Returns:            TRUE on success
-*/
-
-static BOOL
-compile_regex(int options, pcre_uchar **codeptr, const pcre_uchar **ptrptr,
-  int *errorcodeptr, BOOL lookbehind, BOOL reset_bracount, int skipbytes,
-  int cond_depth,
-  pcre_uint32 *firstcharptr, pcre_int32 *firstcharflagsptr,
-  pcre_uint32 *reqcharptr, pcre_int32 *reqcharflagsptr,
-  branch_chain *bcptr, compile_data *cd, int *lengthptr)
-{
-const pcre_uchar *ptr = *ptrptr;
-pcre_uchar *code = *codeptr;
-pcre_uchar *last_branch = code;
-pcre_uchar *start_bracket = code;
-pcre_uchar *reverse_count = NULL;
-open_capitem capitem;
-int capnumber = 0;
-pcre_uint32 firstchar, reqchar;
-pcre_int32 firstcharflags, reqcharflags;
-pcre_uint32 branchfirstchar, branchreqchar;
-pcre_int32 branchfirstcharflags, branchreqcharflags;
-int length;
-unsigned int orig_bracount;
-unsigned int max_bracount;
-branch_chain bc;
-
-/* If set, call the external function that checks for stack availability. */
-
-if (PUBL(stack_guard) != NULL && PUBL(stack_guard)())
-  {
-  *errorcodeptr= ERR85;
-  return FALSE;
-  }
-
-/* Miscellaneous initialization */
-
-bc.outer = bcptr;
-bc.current_branch = code;
-
-firstchar = reqchar = 0;
-firstcharflags = reqcharflags = REQ_UNSET;
-
-/* Accumulate the length for use in the pre-compile phase. Start with the
-length of the BRA and KET and any extra bytes that are required at the
-beginning. We accumulate in a local variable to save frequent testing of
-lenthptr for NULL. We cannot do this by looking at the value of code at the
-start and end of each alternative, because compiled items are discarded during
-the pre-compile phase so that the work space is not exceeded. */
-
-length = 2 + 2*LINK_SIZE + skipbytes;
-
-/* WARNING: If the above line is changed for any reason, you must also change
-the code that abstracts option settings at the start of the pattern and makes
-them global. It tests the value of length for (2 + 2*LINK_SIZE) in the
-pre-compile phase to find out whether anything has yet been compiled or not. */
-
-/* If this is a capturing subpattern, add to the chain of open capturing items
-so that we can detect them if (*ACCEPT) is encountered. This is also used to
-detect groups that contain recursive back references to themselves. Note that
-only OP_CBRA need be tested here; changing this opcode to one of its variants,
-e.g. OP_SCBRAPOS, happens later, after the group has been compiled. */
-
-if (*code == OP_CBRA)
-  {
-  capnumber = GET2(code, 1 + LINK_SIZE);
-  capitem.number = capnumber;
-  capitem.next = cd->open_caps;
-  capitem.flag = FALSE;
-  cd->open_caps = &capitem;
-  }
-
-/* Offset is set zero to mark that this bracket is still open */
-
-PUT(code, 1, 0);
-code += 1 + LINK_SIZE + skipbytes;
-
-/* Loop for each alternative branch */
-
-orig_bracount = max_bracount = cd->bracount;
-for (;;)
-  {
-  /* For a (?| group, reset the capturing bracket count so that each branch
-  uses the same numbers. */
-
-  if (reset_bracount) cd->bracount = orig_bracount;
-
-  /* Set up dummy OP_REVERSE if lookbehind assertion */
-
-  if (lookbehind)
-    {
-    *code++ = OP_REVERSE;
-    reverse_count = code;
-    PUTINC(code, 0, 0);
-    length += 1 + LINK_SIZE;
-    }
-
-  /* Now compile the branch; in the pre-compile phase its length gets added
-  into the length. */
-
-  if (!compile_branch(&options, &code, &ptr, errorcodeptr, &branchfirstchar,
-        &branchfirstcharflags, &branchreqchar, &branchreqcharflags, &bc,
-        cond_depth, cd, (lengthptr == NULL)? NULL : &length))
-    {
-    *ptrptr = ptr;
-    return FALSE;
-    }
-
-  /* Keep the highest bracket count in case (?| was used and some branch
-  has fewer than the rest. */
-
-  if (cd->bracount > max_bracount) max_bracount = cd->bracount;
-
-  /* In the real compile phase, there is some post-processing to be done. */
-
-  if (lengthptr == NULL)
-    {
-    /* If this is the first branch, the firstchar and reqchar values for the
-    branch become the values for the regex. */
-
-    if (*last_branch != OP_ALT)
-      {
-      firstchar = branchfirstchar;
-      firstcharflags = branchfirstcharflags;
-      reqchar = branchreqchar;
-      reqcharflags = branchreqcharflags;
-      }
-
-    /* If this is not the first branch, the first char and reqchar have to
-    match the values from all the previous branches, except that if the
-    previous value for reqchar didn't have REQ_VARY set, it can still match,
-    and we set REQ_VARY for the regex. */
-
-    else
-      {
-      /* If we previously had a firstchar, but it doesn't match the new branch,
-      we have to abandon the firstchar for the regex, but if there was
-      previously no reqchar, it takes on the value of the old firstchar. */
-
-      if (firstcharflags >= 0 &&
-          (firstcharflags != branchfirstcharflags || firstchar != branchfirstchar))
-        {
-        if (reqcharflags < 0)
-          {
-          reqchar = firstchar;
-          reqcharflags = firstcharflags;
-          }
-        firstcharflags = REQ_NONE;
-        }
-
-      /* If we (now or from before) have no firstchar, a firstchar from the
-      branch becomes a reqchar if there isn't a branch reqchar. */
-
-      if (firstcharflags < 0 && branchfirstcharflags >= 0 && branchreqcharflags < 0)
-        {
-        branchreqchar = branchfirstchar;
-        branchreqcharflags = branchfirstcharflags;
-        }
-
-      /* Now ensure that the reqchars match */
-
-      if (((reqcharflags & ~REQ_VARY) != (branchreqcharflags & ~REQ_VARY)) ||
-          reqchar != branchreqchar)
-        reqcharflags = REQ_NONE;
-      else
-        {
-        reqchar = branchreqchar;
-        reqcharflags |= branchreqcharflags; /* To "or" REQ_VARY */
-        }
-      }
-
-    /* If lookbehind, check that this branch matches a fixed-length string, and
-    put the length into the OP_REVERSE item. Temporarily mark the end of the
-    branch with OP_END. If the branch contains OP_RECURSE, the result is -3
-    because there may be forward references that we can't check here. Set a
-    flag to cause another lookbehind check at the end. Why not do it all at the
-    end? Because common, erroneous checks are picked up here and the offset of
-    the problem can be shown. */
-
-    if (lookbehind)
-      {
-      int fixed_length;
-      *code = OP_END;
-      fixed_length = find_fixedlength(last_branch,  (options & PCRE_UTF8) != 0,
-        FALSE, cd);
-      DPRINTF(("fixed length = %d\n", fixed_length));
-      if (fixed_length == -3)
-        {
-        cd->check_lookbehind = TRUE;
-        }
-      else if (fixed_length < 0)
-        {
-        *errorcodeptr = (fixed_length == -2)? ERR36 :
-                        (fixed_length == -4)? ERR70: ERR25;
-        *ptrptr = ptr;
-        return FALSE;
-        }
-      else
-        {
-        if (fixed_length > cd->max_lookbehind)
-          cd->max_lookbehind = fixed_length;
-        PUT(reverse_count, 0, fixed_length);
-        }
-      }
-    }
-
-  /* Reached end of expression, either ')' or end of pattern. In the real
-  compile phase, go back through the alternative branches and reverse the chain
-  of offsets, with the field in the BRA item now becoming an offset to the
-  first alternative. If there are no alternatives, it points to the end of the
-  group. The length in the terminating ket is always the length of the whole
-  bracketed item. Return leaving the pointer at the terminating char. */
-
-  if (*ptr != CHAR_VERTICAL_LINE)
-    {
-    if (lengthptr == NULL)
-      {
-      int branch_length = (int)(code - last_branch);
-      do
-        {
-        int prev_length = GET(last_branch, 1);
-        PUT(last_branch, 1, branch_length);
-        branch_length = prev_length;
-        last_branch -= branch_length;
-        }
-      while (branch_length > 0);
-      }
-
-    /* Fill in the ket */
-
-    *code = OP_KET;
-    PUT(code, 1, (int)(code - start_bracket));
-    code += 1 + LINK_SIZE;
-
-    /* If it was a capturing subpattern, check to see if it contained any
-    recursive back references. If so, we must wrap it in atomic brackets.
-    In any event, remove the block from the chain. */
-
-    if (capnumber > 0)
-      {
-      if (cd->open_caps->flag)
-        {
-        memmove(start_bracket + 1 + LINK_SIZE, start_bracket,
-          IN_UCHARS(code - start_bracket));
-        *start_bracket = OP_ONCE;
-        code += 1 + LINK_SIZE;
-        PUT(start_bracket, 1, (int)(code - start_bracket));
-        *code = OP_KET;
-        PUT(code, 1, (int)(code - start_bracket));
-        code += 1 + LINK_SIZE;
-        length += 2 + 2*LINK_SIZE;
-        }
-      cd->open_caps = cd->open_caps->next;
-      }
-
-    /* Retain the highest bracket number, in case resetting was used. */
-
-    cd->bracount = max_bracount;
-
-    /* Set values to pass back */
-
-    *codeptr = code;
-    *ptrptr = ptr;
-    *firstcharptr = firstchar;
-    *firstcharflagsptr = firstcharflags;
-    *reqcharptr = reqchar;
-    *reqcharflagsptr = reqcharflags;
-    if (lengthptr != NULL)
-      {
-      if (OFLOW_MAX - *lengthptr < length)
-        {
-        *errorcodeptr = ERR20;
-        return FALSE;
-        }
-      *lengthptr += length;
-      }
-    return TRUE;
-    }
-
-  /* Another branch follows. In the pre-compile phase, we can move the code
-  pointer back to where it was for the start of the first branch. (That is,
-  pretend that each branch is the only one.)
-
-  In the real compile phase, insert an ALT node. Its length field points back
-  to the previous branch while the bracket remains open. At the end the chain
-  is reversed. It's done like this so that the start of the bracket has a
-  zero offset until it is closed, making it possible to detect recursion. */
-
-  if (lengthptr != NULL)
-    {
-    code = *codeptr + 1 + LINK_SIZE + skipbytes;
-    length += 1 + LINK_SIZE;
-    }
-  else
-    {
-    *code = OP_ALT;
-    PUT(code, 1, (int)(code - last_branch));
-    bc.current_branch = last_branch = code;
-    code += 1 + LINK_SIZE;
-    }
-
-  ptr++;
-  }
-/* Control never reaches here */
-}
-
-
-
-
-/*************************************************
-*          Check for anchored expression         *
-*************************************************/
-
-/* Try to find out if this is an anchored regular expression. Consider each
-alternative branch. If they all start with OP_SOD or OP_CIRC, or with a bracket
-all of whose alternatives start with OP_SOD or OP_CIRC (recurse ad lib), then
-it's anchored. However, if this is a multiline pattern, then only OP_SOD will
-be found, because ^ generates OP_CIRCM in that mode.
-
-We can also consider a regex to be anchored if OP_SOM starts all its branches.
-This is the code for \G, which means "match at start of match position, taking
-into account the match offset".
-
-A branch is also implicitly anchored if it starts with .* and DOTALL is set,
-because that will try the rest of the pattern at all possible matching points,
-so there is no point trying again.... er ....
-
-.... except when the .* appears inside capturing parentheses, and there is a
-subsequent back reference to those parentheses. We haven't enough information
-to catch that case precisely.
-
-At first, the best we could do was to detect when .* was in capturing brackets
-and the highest back reference was greater than or equal to that level.
-However, by keeping a bitmap of the first 31 back references, we can catch some
-of the more common cases more precisely.
-
-... A second exception is when the .* appears inside an atomic group, because
-this prevents the number of characters it matches from being adjusted.
-
-Arguments:
-  code           points to start of expression (the bracket)
-  bracket_map    a bitmap of which brackets we are inside while testing; this
-                  handles up to substring 31; after that we just have to take
-                  the less precise approach
-  cd             points to the compile data block
-  atomcount      atomic group level
-
-Returns:     TRUE or FALSE
-*/
-
-static BOOL
-is_anchored(register const pcre_uchar *code, unsigned int bracket_map,
-  compile_data *cd, int atomcount)
-{
-do {
-   const pcre_uchar *scode = first_significant_code(
-     code + PRIV(OP_lengths)[*code], FALSE);
-   register int op = *scode;
-
-   /* Non-capturing brackets */
-
-   if (op == OP_BRA  || op == OP_BRAPOS ||
-       op == OP_SBRA || op == OP_SBRAPOS)
-     {
-     if (!is_anchored(scode, bracket_map, cd, atomcount)) return FALSE;
-     }
-
-   /* Capturing brackets */
-
-   else if (op == OP_CBRA  || op == OP_CBRAPOS ||
-            op == OP_SCBRA || op == OP_SCBRAPOS)
-     {
-     int n = GET2(scode, 1+LINK_SIZE);
-     int new_map = bracket_map | ((n < 32)? (1 << n) : 1);
-     if (!is_anchored(scode, new_map, cd, atomcount)) return FALSE;
-     }
-
-   /* Positive forward assertions and conditions */
-
-   else if (op == OP_ASSERT || op == OP_COND)
-     {
-     if (!is_anchored(scode, bracket_map, cd, atomcount)) return FALSE;
-     }
-
-   /* Atomic groups */
-
-   else if (op == OP_ONCE || op == OP_ONCE_NC)
-     {
-     if (!is_anchored(scode, bracket_map, cd, atomcount + 1))
-       return FALSE;
-     }
-
-   /* .* is not anchored unless DOTALL is set (which generates OP_ALLANY) and
-   it isn't in brackets that are or may be referenced or inside an atomic
-   group. */
-
-   else if ((op == OP_TYPESTAR || op == OP_TYPEMINSTAR ||
-             op == OP_TYPEPOSSTAR))
-     {
-     if (scode[1] != OP_ALLANY || (bracket_map & cd->backref_map) != 0 ||
-         atomcount > 0 || cd->had_pruneorskip)
-       return FALSE;
-     }
-
-   /* Check for explicit anchoring */
-
-   else if (op != OP_SOD && op != OP_SOM && op != OP_CIRC) return FALSE;
-
-   code += GET(code, 1);
-   }
-while (*code == OP_ALT);   /* Loop for each alternative */
-return TRUE;
-}
-
-
-
-/*************************************************
-*         Check for starting with ^ or .*        *
-*************************************************/
-
-/* This is called to find out if every branch starts with ^ or .* so that
-"first char" processing can be done to speed things up in multiline
-matching and for non-DOTALL patterns that start with .* (which must start at
-the beginning or after \n). As in the case of is_anchored() (see above), we
-have to take account of back references to capturing brackets that contain .*
-because in that case we can't make the assumption. Also, the appearance of .*
-inside atomic brackets or in a pattern that contains *PRUNE or *SKIP does not
-count, because once again the assumption no longer holds.
-
-Arguments:
-  code           points to start of expression (the bracket)
-  bracket_map    a bitmap of which brackets we are inside while testing; this
-                  handles up to substring 31; after that we just have to take
-                  the less precise approach
-  cd             points to the compile data
-  atomcount      atomic group level
-
-Returns:         TRUE or FALSE
-*/
-
-static BOOL
-is_startline(const pcre_uchar *code, unsigned int bracket_map,
-  compile_data *cd, int atomcount)
-{
-do {
-   const pcre_uchar *scode = first_significant_code(
-     code + PRIV(OP_lengths)[*code], FALSE);
-   register int op = *scode;
-
-   /* If we are at the start of a conditional assertion group, *both* the
-   conditional assertion *and* what follows the condition must satisfy the test
-   for start of line. Other kinds of condition fail. Note that there may be an
-   auto-callout at the start of a condition. */
-
-   if (op == OP_COND)
-     {
-     scode += 1 + LINK_SIZE;
-     if (*scode == OP_CALLOUT) scode += PRIV(OP_lengths)[OP_CALLOUT];
-     switch (*scode)
-       {
-       case OP_CREF:
-       case OP_DNCREF:
-       case OP_RREF:
-       case OP_DNRREF:
-       case OP_DEF:
-       return FALSE;
-
-       default:     /* Assertion */
-       if (!is_startline(scode, bracket_map, cd, atomcount)) return FALSE;
-       do scode += GET(scode, 1); while (*scode == OP_ALT);
-       scode += 1 + LINK_SIZE;
-       break;
-       }
-     scode = first_significant_code(scode, FALSE);
-     op = *scode;
-     }
-
-   /* Non-capturing brackets */
-
-   if (op == OP_BRA  || op == OP_BRAPOS ||
-       op == OP_SBRA || op == OP_SBRAPOS)
-     {
-     if (!is_startline(scode, bracket_map, cd, atomcount)) return FALSE;
-     }
-
-   /* Capturing brackets */
-
-   else if (op == OP_CBRA  || op == OP_CBRAPOS ||
-            op == OP_SCBRA || op == OP_SCBRAPOS)
-     {
-     int n = GET2(scode, 1+LINK_SIZE);
-     int new_map = bracket_map | ((n < 32)? (1 << n) : 1);
-     if (!is_startline(scode, new_map, cd, atomcount)) return FALSE;
-     }
-
-   /* Positive forward assertions */
-
-   else if (op == OP_ASSERT)
-     {
-     if (!is_startline(scode, bracket_map, cd, atomcount)) return FALSE;
-     }
-
-   /* Atomic brackets */
-
-   else if (op == OP_ONCE || op == OP_ONCE_NC)
-     {
-     if (!is_startline(scode, bracket_map, cd, atomcount + 1)) return FALSE;
-     }
-
-   /* .* means "start at start or after \n" if it isn't in atomic brackets or
-   brackets that may be referenced, as long as the pattern does not contain
-   *PRUNE or *SKIP, because these break the feature. Consider, for example,
-   /.*?a(*PRUNE)b/ with the subject "aab", which matches "ab", i.e. not at the
-   start of a line. */
-
-   else if (op == OP_TYPESTAR || op == OP_TYPEMINSTAR || op == OP_TYPEPOSSTAR)
-     {
-     if (scode[1] != OP_ANY || (bracket_map & cd->backref_map) != 0 ||
-         atomcount > 0 || cd->had_pruneorskip)
-       return FALSE;
-     }
-
-   /* Check for explicit circumflex; anything else gives a FALSE result. Note
-   in particular that this includes atomic brackets OP_ONCE and OP_ONCE_NC
-   because the number of characters matched by .* cannot be adjusted inside
-   them. */
-
-   else if (op != OP_CIRC && op != OP_CIRCM) return FALSE;
-
-   /* Move on to the next alternative */
-
-   code += GET(code, 1);
-   }
-while (*code == OP_ALT);  /* Loop for each alternative */
-return TRUE;
-}
-
-
-
-/*************************************************
-*       Check for asserted fixed first char      *
-*************************************************/
-
-/* During compilation, the "first char" settings from forward assertions are
-discarded, because they can cause conflicts with actual literals that follow.
-However, if we end up without a first char setting for an unanchored pattern,
-it is worth scanning the regex to see if there is an initial asserted first
-char. If all branches start with the same asserted char, or with a
-non-conditional bracket all of whose alternatives start with the same asserted
-char (recurse ad lib), then we return that char, with the flags set to zero or
-REQ_CASELESS; otherwise return zero with REQ_NONE in the flags.
-
-Arguments:
-  code       points to start of expression (the bracket)
-  flags      points to the first char flags, or to REQ_NONE
-  inassert   TRUE if in an assertion
-
-Returns:     the fixed first char, or 0 with REQ_NONE in flags
-*/
-
-static pcre_uint32
-find_firstassertedchar(const pcre_uchar *code, pcre_int32 *flags,
-  BOOL inassert)
-{
-register pcre_uint32 c = 0;
-int cflags = REQ_NONE;
-
-*flags = REQ_NONE;
-do {
-   pcre_uint32 d;
-   int dflags;
-   int xl = (*code == OP_CBRA || *code == OP_SCBRA ||
-             *code == OP_CBRAPOS || *code == OP_SCBRAPOS)? IMM2_SIZE:0;
-   const pcre_uchar *scode = first_significant_code(code + 1+LINK_SIZE + xl,
-     TRUE);
-   register pcre_uchar op = *scode;
-
-   switch(op)
-     {
-     default:
-     return 0;
-
-     case OP_BRA:
-     case OP_BRAPOS:
-     case OP_CBRA:
-     case OP_SCBRA:
-     case OP_CBRAPOS:
-     case OP_SCBRAPOS:
-     case OP_ASSERT:
-     case OP_ONCE:
-     case OP_ONCE_NC:
-     d = find_firstassertedchar(scode, &dflags, op == OP_ASSERT);
-     if (dflags < 0)
-       return 0;
-     if (cflags < 0) { c = d; cflags = dflags; } else if (c != d || cflags != dflags) return 0;
-     break;
-
-     case OP_EXACT:
-     scode += IMM2_SIZE;
-     /* Fall through */
-
-     case OP_CHAR:
-     case OP_PLUS:
-     case OP_MINPLUS:
-     case OP_POSPLUS:
-     if (!inassert) return 0;
-     if (cflags < 0) { c = scode[1]; cflags = 0; }
-       else if (c != scode[1]) return 0;
-     break;
-
-     case OP_EXACTI:
-     scode += IMM2_SIZE;
-     /* Fall through */
-
-     case OP_CHARI:
-     case OP_PLUSI:
-     case OP_MINPLUSI:
-     case OP_POSPLUSI:
-     if (!inassert) return 0;
-     if (cflags < 0) { c = scode[1]; cflags = REQ_CASELESS; }
-       else if (c != scode[1]) return 0;
-     break;
-     }
-
-   code += GET(code, 1);
-   }
-while (*code == OP_ALT);
-
-*flags = cflags;
-return c;
-}
-
-
-
-/*************************************************
-*     Add an entry to the name/number table      *
-*************************************************/
-
-/* This function is called between compiling passes to add an entry to the
-name/number table, maintaining alphabetical order. Checking for permitted
-and forbidden duplicates has already been done.
-
-Arguments:
-  cd           the compile data block
-  name         the name to add
-  length       the length of the name
-  groupno      the group number
-
-Returns:       nothing
-*/
-
-static void
-add_name(compile_data *cd, const pcre_uchar *name, int length,
-  unsigned int groupno)
-{
-int i;
-pcre_uchar *slot = cd->name_table;
-
-for (i = 0; i < cd->names_found; i++)
-  {
-  int crc = memcmp(name, slot+IMM2_SIZE, IN_UCHARS(length));
-  if (crc == 0 && slot[IMM2_SIZE+length] != 0)
-    crc = -1; /* Current name is a substring */
-
-  /* Make space in the table and break the loop for an earlier name. For a
-  duplicate or later name, carry on. We do this for duplicates so that in the
-  simple case (when ?(| is not used) they are in order of their numbers. In all
-  cases they are in the order in which they appear in the pattern. */
-
-  if (crc < 0)
-    {
-    memmove(slot + cd->name_entry_size, slot,
-      IN_UCHARS((cd->names_found - i) * cd->name_entry_size));
-    break;
-    }
-
-  /* Continue the loop for a later or duplicate name */
-
-  slot += cd->name_entry_size;
-  }
-
-PUT2(slot, 0, groupno);
-memcpy(slot + IMM2_SIZE, name, IN_UCHARS(length));
-slot[IMM2_SIZE + length] = 0;
-cd->names_found++;
-}
-
-
-
-/*************************************************
-*        Compile a Regular Expression            *
-*************************************************/
-
-/* This function takes a string and returns a pointer to a block of store
-holding a compiled version of the expression. The original API for this
-function had no error code return variable; it is retained for backwards
-compatibility. The new function is given a new name.
-
-Arguments:
-  pattern       the regular expression
-  options       various option bits
-  errorcodeptr  pointer to error code variable (pcre_compile2() only)
-                  can be NULL if you don't want a code value
-  errorptr      pointer to pointer to error text
-  erroroffset   ptr offset in pattern where error was detected
-  tables        pointer to character tables or NULL
-
-Returns:        pointer to compiled data block, or NULL on error,
-                with errorptr and erroroffset set
-*/
-
-#if defined COMPILE_PCRE8
-PCRE_EXP_DEFN pcre * PCRE_CALL_CONVENTION
-pcre_compile(const char *pattern, int options, const char **errorptr,
-  int *erroroffset, const unsigned char *tables)
-#elif defined COMPILE_PCRE16
-PCRE_EXP_DEFN pcre16 * PCRE_CALL_CONVENTION
-pcre16_compile(PCRE_SPTR16 pattern, int options, const char **errorptr,
-  int *erroroffset, const unsigned char *tables)
-#elif defined COMPILE_PCRE32
-PCRE_EXP_DEFN pcre32 * PCRE_CALL_CONVENTION
-pcre32_compile(PCRE_SPTR32 pattern, int options, const char **errorptr,
-  int *erroroffset, const unsigned char *tables)
-#endif
-{
-#if defined COMPILE_PCRE8
-return pcre_compile2(pattern, options, NULL, errorptr, erroroffset, tables);
-#elif defined COMPILE_PCRE16
-return pcre16_compile2(pattern, options, NULL, errorptr, erroroffset, tables);
-#elif defined COMPILE_PCRE32
-return pcre32_compile2(pattern, options, NULL, errorptr, erroroffset, tables);
-#endif
-}
-
-
-#if defined COMPILE_PCRE8
-PCRE_EXP_DEFN pcre * PCRE_CALL_CONVENTION
-pcre_compile2(const char *pattern, int options, int *errorcodeptr,
-  const char **errorptr, int *erroroffset, const unsigned char *tables)
-#elif defined COMPILE_PCRE16
-PCRE_EXP_DEFN pcre16 * PCRE_CALL_CONVENTION
-pcre16_compile2(PCRE_SPTR16 pattern, int options, int *errorcodeptr,
-  const char **errorptr, int *erroroffset, const unsigned char *tables)
-#elif defined COMPILE_PCRE32
-PCRE_EXP_DEFN pcre32 * PCRE_CALL_CONVENTION
-pcre32_compile2(PCRE_SPTR32 pattern, int options, int *errorcodeptr,
-  const char **errorptr, int *erroroffset, const unsigned char *tables)
-#endif
-{
-REAL_PCRE *re;
-int length = 1;  /* For final END opcode */
-pcre_int32 firstcharflags, reqcharflags;
-pcre_uint32 firstchar, reqchar;
-pcre_uint32 limit_match = PCRE_UINT32_MAX;
-pcre_uint32 limit_recursion = PCRE_UINT32_MAX;
-int newline;
-int errorcode = 0;
-int skipatstart = 0;
-BOOL utf;
-BOOL never_utf = FALSE;
-size_t size;
-pcre_uchar *code;
-const pcre_uchar *codestart;
-const pcre_uchar *ptr;
-compile_data compile_block;
-compile_data *cd = &compile_block;
-
-/* This space is used for "compiling" into during the first phase, when we are
-computing the amount of memory that is needed. Compiled items are thrown away
-as soon as possible, so that a fairly large buffer should be sufficient for
-this purpose. The same space is used in the second phase for remembering where
-to fill in forward references to subpatterns. That may overflow, in which case
-new memory is obtained from malloc(). */
-
-pcre_uchar cworkspace[COMPILE_WORK_SIZE];
-
-/* This vector is used for remembering name groups during the pre-compile. In a
-similar way to cworkspace, it can be expanded using malloc() if necessary. */
-
-named_group named_groups[NAMED_GROUP_LIST_SIZE];
-
-/* Set this early so that early errors get offset 0. */
-
-ptr = (const pcre_uchar *)pattern;
-
-/* We can't pass back an error message if errorptr is NULL; I guess the best we
-can do is just return NULL, but we can set a code value if there is a code
-pointer. */
-
-if (errorptr == NULL)
-  {
-  if (errorcodeptr != NULL) *errorcodeptr = 99;
-  return NULL;
-  }
-
-*errorptr = NULL;
-if (errorcodeptr != NULL) *errorcodeptr = ERR0;
-
-/* However, we can give a message for this error */
-
-if (erroroffset == NULL)
-  {
-  errorcode = ERR16;
-  goto PCRE_EARLY_ERROR_RETURN2;
-  }
-
-*erroroffset = 0;
-
-/* Set up pointers to the individual character tables */
-
-if (tables == NULL) tables = PRIV(default_tables);
-cd->lcc = tables + lcc_offset;
-cd->fcc = tables + fcc_offset;
-cd->cbits = tables + cbits_offset;
-cd->ctypes = tables + ctypes_offset;
-
-/* Check that all undefined public option bits are zero */
-
-if ((options & ~PUBLIC_COMPILE_OPTIONS) != 0)
-  {
-  errorcode = ERR17;
-  goto PCRE_EARLY_ERROR_RETURN;
-  }
-
-/* If PCRE_NEVER_UTF is set, remember it. */
-
-if ((options & PCRE_NEVER_UTF) != 0) never_utf = TRUE;
-
-/* Check for global one-time settings at the start of the pattern, and remember
-the offset for later. */
-
-cd->external_flags = 0;   /* Initialize here for LIMIT_MATCH/RECURSION */
-
-while (ptr[skipatstart] == CHAR_LEFT_PARENTHESIS &&
-       ptr[skipatstart+1] == CHAR_ASTERISK)
-  {
-  int newnl = 0;
-  int newbsr = 0;
-
-/* For completeness and backward compatibility, (*UTFn) is supported in the
-relevant libraries, but (*UTF) is generic and always supported. Note that
-PCRE_UTF8 == PCRE_UTF16 == PCRE_UTF32. */
-
-#ifdef COMPILE_PCRE8
-  if (STRNCMP_UC_C8(ptr+skipatstart+2, STRING_UTF8_RIGHTPAR, 5) == 0)
-    { skipatstart += 7; options |= PCRE_UTF8; continue; }
-#endif
-#ifdef COMPILE_PCRE16
-  if (STRNCMP_UC_C8(ptr+skipatstart+2, STRING_UTF16_RIGHTPAR, 6) == 0)
-    { skipatstart += 8; options |= PCRE_UTF16; continue; }
-#endif
-#ifdef COMPILE_PCRE32
-  if (STRNCMP_UC_C8(ptr+skipatstart+2, STRING_UTF32_RIGHTPAR, 6) == 0)
-    { skipatstart += 8; options |= PCRE_UTF32; continue; }
-#endif
-
-  else if (STRNCMP_UC_C8(ptr+skipatstart+2, STRING_UTF_RIGHTPAR, 4) == 0)
-    { skipatstart += 6; options |= PCRE_UTF8; continue; }
-  else if (STRNCMP_UC_C8(ptr+skipatstart+2, STRING_UCP_RIGHTPAR, 4) == 0)
-    { skipatstart += 6; options |= PCRE_UCP; continue; }
-  else if (STRNCMP_UC_C8(ptr+skipatstart+2, STRING_NO_AUTO_POSSESS_RIGHTPAR, 16) == 0)
-    { skipatstart += 18; options |= PCRE_NO_AUTO_POSSESS; continue; }
-  else if (STRNCMP_UC_C8(ptr+skipatstart+2, STRING_NO_START_OPT_RIGHTPAR, 13) == 0)
-    { skipatstart += 15; options |= PCRE_NO_START_OPTIMIZE; continue; }
-
-  else if (STRNCMP_UC_C8(ptr+skipatstart+2, STRING_LIMIT_MATCH_EQ, 12) == 0)
-    {
-    pcre_uint32 c = 0;
-    int p = skipatstart + 14;
-    while (isdigit(ptr[p]))
-      {
-      if (c > PCRE_UINT32_MAX / 10 - 1) break;   /* Integer overflow */
-      c = c*10 + ptr[p++] - CHAR_0;
-      }
-    if (ptr[p++] != CHAR_RIGHT_PARENTHESIS) break;
-    if (c < limit_match)
-      {
-      limit_match = c;
-      cd->external_flags |= PCRE_MLSET;
-      }
-    skipatstart = p;
-    continue;
-    }
-
-  else if (STRNCMP_UC_C8(ptr+skipatstart+2, STRING_LIMIT_RECURSION_EQ, 16) == 0)
-    {
-    pcre_uint32 c = 0;
-    int p = skipatstart + 18;
-    while (isdigit(ptr[p]))
-      {
-      if (c > PCRE_UINT32_MAX / 10 - 1) break;   /* Integer overflow check */
-      c = c*10 + ptr[p++] - CHAR_0;
-      }
-    if (ptr[p++] != CHAR_RIGHT_PARENTHESIS) break;
-    if (c < limit_recursion)
-      {
-      limit_recursion = c;
-      cd->external_flags |= PCRE_RLSET;
-      }
-    skipatstart = p;
-    continue;
-    }
-
-  if (STRNCMP_UC_C8(ptr+skipatstart+2, STRING_CR_RIGHTPAR, 3) == 0)
-    { skipatstart += 5; newnl = PCRE_NEWLINE_CR; }
-  else if (STRNCMP_UC_C8(ptr+skipatstart+2, STRING_LF_RIGHTPAR, 3)  == 0)
-    { skipatstart += 5; newnl = PCRE_NEWLINE_LF; }
-  else if (STRNCMP_UC_C8(ptr+skipatstart+2, STRING_CRLF_RIGHTPAR, 5)  == 0)
-    { skipatstart += 7; newnl = PCRE_NEWLINE_CR + PCRE_NEWLINE_LF; }
-  else if (STRNCMP_UC_C8(ptr+skipatstart+2, STRING_ANY_RIGHTPAR, 4) == 0)
-    { skipatstart += 6; newnl = PCRE_NEWLINE_ANY; }
-  else if (STRNCMP_UC_C8(ptr+skipatstart+2, STRING_ANYCRLF_RIGHTPAR, 8) == 0)
-    { skipatstart += 10; newnl = PCRE_NEWLINE_ANYCRLF; }
-
-  else if (STRNCMP_UC_C8(ptr+skipatstart+2, STRING_BSR_ANYCRLF_RIGHTPAR, 12) == 0)
-    { skipatstart += 14; newbsr = PCRE_BSR_ANYCRLF; }
-  else if (STRNCMP_UC_C8(ptr+skipatstart+2, STRING_BSR_UNICODE_RIGHTPAR, 12) == 0)
-    { skipatstart += 14; newbsr = PCRE_BSR_UNICODE; }
-
-  if (newnl != 0)
-    options = (options & ~PCRE_NEWLINE_BITS) | newnl;
-  else if (newbsr != 0)
-    options = (options & ~(PCRE_BSR_ANYCRLF|PCRE_BSR_UNICODE)) | newbsr;
-  else break;
-  }
-
-/* PCRE_UTF(16|32) have the same value as PCRE_UTF8. */
-utf = (options & PCRE_UTF8) != 0;
-if (utf && never_utf)
-  {
-  errorcode = ERR78;
-  goto PCRE_EARLY_ERROR_RETURN2;
-  }
-
-/* Can't support UTF unless PCRE has been compiled to include the code. The
-return of an error code from PRIV(valid_utf)() is a new feature, introduced in
-release 8.13. It is passed back from pcre_[dfa_]exec(), but at the moment is
-not used here. */
-
-#ifdef SUPPORT_UTF
-if (utf && (options & PCRE_NO_UTF8_CHECK) == 0 &&
-     (errorcode = PRIV(valid_utf)((PCRE_PUCHAR)pattern, -1, erroroffset)) != 0)
-  {
-#if defined COMPILE_PCRE8
-  errorcode = ERR44;
-#elif defined COMPILE_PCRE16
-  errorcode = ERR74;
-#elif defined COMPILE_PCRE32
-  errorcode = ERR77;
-#endif
-  goto PCRE_EARLY_ERROR_RETURN2;
-  }
-#else
-if (utf)
-  {
-  errorcode = ERR32;
-  goto PCRE_EARLY_ERROR_RETURN;
-  }
-#endif
-
-/* Can't support UCP unless PCRE has been compiled to include the code. */
-
-#ifndef SUPPORT_UCP
-if ((options & PCRE_UCP) != 0)
-  {
-  errorcode = ERR67;
-  goto PCRE_EARLY_ERROR_RETURN;
-  }
-#endif
-
-/* Check validity of \R options. */
-
-if ((options & (PCRE_BSR_ANYCRLF|PCRE_BSR_UNICODE)) ==
-     (PCRE_BSR_ANYCRLF|PCRE_BSR_UNICODE))
-  {
-  errorcode = ERR56;
-  goto PCRE_EARLY_ERROR_RETURN;
-  }
-
-/* Handle different types of newline. The three bits give seven cases. The
-current code allows for fixed one- or two-byte sequences, plus "any" and
-"anycrlf". */
-
-switch (options & PCRE_NEWLINE_BITS)
-  {
-  case 0: newline = NEWLINE; break;   /* Build-time default */
-  case PCRE_NEWLINE_CR: newline = CHAR_CR; break;
-  case PCRE_NEWLINE_LF: newline = CHAR_NL; break;
-  case PCRE_NEWLINE_CR+
-       PCRE_NEWLINE_LF: newline = (CHAR_CR << 8) | CHAR_NL; break;
-  case PCRE_NEWLINE_ANY: newline = -1; break;
-  case PCRE_NEWLINE_ANYCRLF: newline = -2; break;
-  default: errorcode = ERR56; goto PCRE_EARLY_ERROR_RETURN;
-  }
-
-if (newline == -2)
-  {
-  cd->nltype = NLTYPE_ANYCRLF;
-  }
-else if (newline < 0)
-  {
-  cd->nltype = NLTYPE_ANY;
-  }
-else
-  {
-  cd->nltype = NLTYPE_FIXED;
-  if (newline > 255)
-    {
-    cd->nllen = 2;
-    cd->nl[0] = (newline >> 8) & 255;
-    cd->nl[1] = newline & 255;
-    }
-  else
-    {
-    cd->nllen = 1;
-    cd->nl[0] = newline;
-    }
-  }
-
-/* Maximum back reference and backref bitmap. The bitmap records up to 31 back
-references to help in deciding whether (.*) can be treated as anchored or not.
-*/
-
-cd->top_backref = 0;
-cd->backref_map = 0;
-
-/* Reflect pattern for debugging output */
-
-DPRINTF(("------------------------------------------------------------------\n"));
-#ifdef PCRE_DEBUG
-print_puchar(stdout, (PCRE_PUCHAR)pattern);
-#endif
-DPRINTF(("\n"));
-
-/* Pretend to compile the pattern while actually just accumulating the length
-of memory required. This behaviour is triggered by passing a non-NULL final
-argument to compile_regex(). We pass a block of workspace (cworkspace) for it
-to compile parts of the pattern into; the compiled code is discarded when it is
-no longer needed, so hopefully this workspace will never overflow, though there
-is a test for its doing so. */
-
-cd->bracount = cd->final_bracount = 0;
-cd->names_found = 0;
-cd->name_entry_size = 0;
-cd->name_table = NULL;
-cd->dupnames = FALSE;
-cd->namedrefcount = 0;
-cd->start_code = cworkspace;
-cd->hwm = cworkspace;
-cd->start_workspace = cworkspace;
-cd->workspace_size = COMPILE_WORK_SIZE;
-cd->named_groups = named_groups;
-cd->named_group_list_size = NAMED_GROUP_LIST_SIZE;
-cd->start_pattern = (const pcre_uchar *)pattern;
-cd->end_pattern = (const pcre_uchar *)(pattern + STRLEN_UC((const pcre_uchar *)pattern));
-cd->req_varyopt = 0;
-cd->parens_depth = 0;
-cd->assert_depth = 0;
-cd->max_lookbehind = 0;
-cd->external_options = options;
-cd->open_caps = NULL;
-
-/* Now do the pre-compile. On error, errorcode will be set non-zero, so we
-don't need to look at the result of the function here. The initial options have
-been put into the cd block so that they can be changed if an option setting is
-found within the regex right at the beginning. Bringing initial option settings
-outside can help speed up starting point checks. */
-
-ptr += skipatstart;
-code = cworkspace;
-*code = OP_BRA;
-
-(void)compile_regex(cd->external_options, &code, &ptr, &errorcode, FALSE,
-  FALSE, 0, 0, &firstchar, &firstcharflags, &reqchar, &reqcharflags, NULL,
-  cd, &length);
-if (errorcode != 0) goto PCRE_EARLY_ERROR_RETURN;
-
-DPRINTF(("end pre-compile: length=%d workspace=%d\n", length,
-  (int)(cd->hwm - cworkspace)));
-
-if (length > MAX_PATTERN_SIZE)
-  {
-  errorcode = ERR20;
-  goto PCRE_EARLY_ERROR_RETURN;
-  }
-
-/* If there are groups with duplicate names and there are also references by
-name, we must allow for the possibility of named references to duplicated
-groups. These require an extra data item each. */
-
-if (cd->dupnames && cd->namedrefcount > 0)
-  length += cd->namedrefcount * IMM2_SIZE * sizeof(pcre_uchar);
-
-/* Compute the size of the data block for storing the compiled pattern. Integer
-overflow should no longer be possible because nowadays we limit the maximum
-value of cd->names_found and cd->name_entry_size. */
-
-size = sizeof(REAL_PCRE) +
-  (length + cd->names_found * cd->name_entry_size) * sizeof(pcre_uchar);
-
-/* Get the memory. */
-
-re = (REAL_PCRE *)(PUBL(malloc))(size);
-if (re == NULL)
-  {
-  errorcode = ERR21;
-  goto PCRE_EARLY_ERROR_RETURN;
-  }
-
-/* Put in the magic number, and save the sizes, initial options, internal
-flags, and character table pointer. NULL is used for the default character
-tables. The nullpad field is at the end; it's there to help in the case when a
-regex compiled on a system with 4-byte pointers is run on another with 8-byte
-pointers. */
-
-re->magic_number = MAGIC_NUMBER;
-re->size = (int)size;
-re->options = cd->external_options;
-re->flags = cd->external_flags;
-re->limit_match = limit_match;
-re->limit_recursion = limit_recursion;
-re->first_char = 0;
-re->req_char = 0;
-re->name_table_offset = sizeof(REAL_PCRE) / sizeof(pcre_uchar);
-re->name_entry_size = cd->name_entry_size;
-re->name_count = cd->names_found;
-re->ref_count = 0;
-re->tables = (tables == PRIV(default_tables))? NULL : tables;
-re->nullpad = NULL;
-#ifdef COMPILE_PCRE32
-re->dummy = 0;
-#else
-re->dummy1 = re->dummy2 = re->dummy3 = 0;
-#endif
-
-/* The starting points of the name/number translation table and of the code are
-passed around in the compile data block. The start/end pattern and initial
-options are already set from the pre-compile phase, as is the name_entry_size
-field. Reset the bracket count and the names_found field. Also reset the hwm
-field; this time it's used for remembering forward references to subpatterns.
-*/
-
-cd->final_bracount = cd->bracount;  /* Save for checking forward references */
-cd->parens_depth = 0;
-cd->assert_depth = 0;
-cd->bracount = 0;
-cd->max_lookbehind = 0;
-cd->name_table = (pcre_uchar *)re + re->name_table_offset;
-codestart = cd->name_table + re->name_entry_size * re->name_count;
-cd->start_code = codestart;
-cd->hwm = (pcre_uchar *)(cd->start_workspace);
-cd->req_varyopt = 0;
-cd->had_accept = FALSE;
-cd->had_pruneorskip = FALSE;
-cd->check_lookbehind = FALSE;
-cd->open_caps = NULL;
-
-/* If any named groups were found, create the name/number table from the list
-created in the first pass. */
-
-if (cd->names_found > 0)
-  {
-  int i = cd->names_found;
-  named_group *ng = cd->named_groups;
-  cd->names_found = 0;
-  for (; i > 0; i--, ng++)
-    add_name(cd, ng->name, ng->length, ng->number);
-  if (cd->named_group_list_size > NAMED_GROUP_LIST_SIZE)
-    (PUBL(free))((void *)cd->named_groups);
-  }
-
-/* Set up a starting, non-extracting bracket, then compile the expression. On
-error, errorcode will be set non-zero, so we don't need to look at the result
-of the function here. */
-
-ptr = (const pcre_uchar *)pattern + skipatstart;
-code = (pcre_uchar *)codestart;
-*code = OP_BRA;
-(void)compile_regex(re->options, &code, &ptr, &errorcode, FALSE, FALSE, 0, 0,
-  &firstchar, &firstcharflags, &reqchar, &reqcharflags, NULL, cd, NULL);
-re->top_bracket = cd->bracount;
-re->top_backref = cd->top_backref;
-re->max_lookbehind = cd->max_lookbehind;
-re->flags = cd->external_flags | PCRE_MODE;
-
-if (cd->had_accept)
-  {
-  reqchar = 0;              /* Must disable after (*ACCEPT) */
-  reqcharflags = REQ_NONE;
-  }
-
-/* If not reached end of pattern on success, there's an excess bracket. */
-
-if (errorcode == 0 && *ptr != CHAR_NULL) errorcode = ERR22;
-
-/* Fill in the terminating state and check for disastrous overflow, but
-if debugging, leave the test till after things are printed out. */
-
-*code++ = OP_END;
-
-#ifndef PCRE_DEBUG
-if (code - codestart > length) errorcode = ERR23;
-#endif
-
-#ifdef SUPPORT_VALGRIND
-/* If the estimated length exceeds the really used length, mark the extra
-allocated memory as unaddressable, so that any out-of-bound reads can be
-detected. */
-VALGRIND_MAKE_MEM_NOACCESS(code, (length - (code - codestart)) * sizeof(pcre_uchar));
-#endif
-
-/* Fill in any forward references that are required. There may be repeated
-references; optimize for them, as searching a large regex takes time. */
-
-if (cd->hwm > cd->start_workspace)
-  {
-  int prev_recno = -1;
-  const pcre_uchar *groupptr = NULL;
-  while (errorcode == 0 && cd->hwm > cd->start_workspace)
-    {
-    int offset, recno;
-    cd->hwm -= LINK_SIZE;
-    offset = GET(cd->hwm, 0);
-    recno = GET(codestart, offset);
-    if (recno != prev_recno)
-      {
-      groupptr = PRIV(find_bracket)(codestart, utf, recno);
-      prev_recno = recno;
-      }
-    if (groupptr == NULL) errorcode = ERR53;
-      else PUT(((pcre_uchar *)codestart), offset, (int)(groupptr - codestart));
-    }
-  }
-
-/* If the workspace had to be expanded, free the new memory. Set the pointer to
-NULL to indicate that forward references have been filled in. */
-
-if (cd->workspace_size > COMPILE_WORK_SIZE)
-  (PUBL(free))((void *)cd->start_workspace);
-cd->start_workspace = NULL;
-
-/* Give an error if there's back reference to a non-existent capturing
-subpattern. */
-
-if (errorcode == 0 && re->top_backref > re->top_bracket) errorcode = ERR15;
-
-/* Unless disabled, check whether single character iterators can be
-auto-possessified. The function overwrites the appropriate opcode values. */
-
-if ((options & PCRE_NO_AUTO_POSSESS) == 0)
-  auto_possessify((pcre_uchar *)codestart, utf, cd);
-
-/* If there were any lookbehind assertions that contained OP_RECURSE
-(recursions or subroutine calls), a flag is set for them to be checked here,
-because they may contain forward references. Actual recursions cannot be fixed
-length, but subroutine calls can. It is done like this so that those without
-OP_RECURSE that are not fixed length get a diagnosic with a useful offset. The
-exceptional ones forgo this. We scan the pattern to check that they are fixed
-length, and set their lengths. */
-
-if (cd->check_lookbehind)
-  {
-  pcre_uchar *cc = (pcre_uchar *)codestart;
-
-  /* Loop, searching for OP_REVERSE items, and process those that do not have
-  their length set. (Actually, it will also re-process any that have a length
-  of zero, but that is a pathological case, and it does no harm.) When we find
-  one, we temporarily terminate the branch it is in while we scan it. */
-
-  for (cc = (pcre_uchar *)PRIV(find_bracket)(codestart, utf, -1);
-       cc != NULL;
-       cc = (pcre_uchar *)PRIV(find_bracket)(cc, utf, -1))
-    {
-    if (GET(cc, 1) == 0)
-      {
-      int fixed_length;
-      pcre_uchar *be = cc - 1 - LINK_SIZE + GET(cc, -LINK_SIZE);
-      int end_op = *be;
-      *be = OP_END;
-      fixed_length = find_fixedlength(cc, (re->options & PCRE_UTF8) != 0, TRUE,
-        cd);
-      *be = end_op;
-      DPRINTF(("fixed length = %d\n", fixed_length));
-      if (fixed_length < 0)
-        {
-        errorcode = (fixed_length == -2)? ERR36 :
-                    (fixed_length == -4)? ERR70 : ERR25;
-        break;
-        }
-      if (fixed_length > cd->max_lookbehind) cd->max_lookbehind = fixed_length;
-      PUT(cc, 1, fixed_length);
-      }
-    cc += 1 + LINK_SIZE;
-    }
-  }
-
-/* Failed to compile, or error while post-processing */
-
-if (errorcode != 0)
-  {
-  (PUBL(free))(re);
-  PCRE_EARLY_ERROR_RETURN:
-  *erroroffset = (int)(ptr - (const pcre_uchar *)pattern);
-  PCRE_EARLY_ERROR_RETURN2:
-  *errorptr = find_error_text(errorcode);
-  if (errorcodeptr != NULL) *errorcodeptr = errorcode;
-  return NULL;
-  }
-
-/* If the anchored option was not passed, set the flag if we can determine that
-the pattern is anchored by virtue of ^ characters or \A or anything else, such
-as starting with non-atomic .* when DOTALL is set and there are no occurrences
-of *PRUNE or *SKIP.
-
-Otherwise, if we know what the first byte has to be, save it, because that
-speeds up unanchored matches no end. If not, see if we can set the
-PCRE_STARTLINE flag. This is helpful for multiline matches when all branches
-start with ^. and also when all branches start with non-atomic .* for
-non-DOTALL matches when *PRUNE and SKIP are not present. */
-
-if ((re->options & PCRE_ANCHORED) == 0)
-  {
-  if (is_anchored(codestart, 0, cd, 0)) re->options |= PCRE_ANCHORED;
-  else
-    {
-    if (firstcharflags < 0)
-      firstchar = find_firstassertedchar(codestart, &firstcharflags, FALSE);
-    if (firstcharflags >= 0)   /* Remove caseless flag for non-caseable chars */
-      {
-#if defined COMPILE_PCRE8
-      re->first_char = firstchar & 0xff;
-#elif defined COMPILE_PCRE16
-      re->first_char = firstchar & 0xffff;
-#elif defined COMPILE_PCRE32
-      re->first_char = firstchar;
-#endif
-      if ((firstcharflags & REQ_CASELESS) != 0)
-        {
-#if defined SUPPORT_UCP && !(defined COMPILE_PCRE8)
-        /* We ignore non-ASCII first chars in 8 bit mode. */
-        if (utf)
-          {
-          if (re->first_char < 128)
-            {
-            if (cd->fcc[re->first_char] != re->first_char)
-              re->flags |= PCRE_FCH_CASELESS;
-            }
-          else if (UCD_OTHERCASE(re->first_char) != re->first_char)
-            re->flags |= PCRE_FCH_CASELESS;
-          }
-        else
-#endif
-        if (MAX_255(re->first_char)
-            && cd->fcc[re->first_char] != re->first_char)
-          re->flags |= PCRE_FCH_CASELESS;
-        }
-
-      re->flags |= PCRE_FIRSTSET;
-      }
-
-    else if (is_startline(codestart, 0, cd, 0)) re->flags |= PCRE_STARTLINE;
-    }
-  }
-
-/* For an anchored pattern, we use the "required byte" only if it follows a
-variable length item in the regex. Remove the caseless flag for non-caseable
-bytes. */
-
-if (reqcharflags >= 0 &&
-     ((re->options & PCRE_ANCHORED) == 0 || (reqcharflags & REQ_VARY) != 0))
-  {
-#if defined COMPILE_PCRE8
-  re->req_char = reqchar & 0xff;
-#elif defined COMPILE_PCRE16
-  re->req_char = reqchar & 0xffff;
-#elif defined COMPILE_PCRE32
-  re->req_char = reqchar;
-#endif
-  if ((reqcharflags & REQ_CASELESS) != 0)
-    {
-#if defined SUPPORT_UCP && !(defined COMPILE_PCRE8)
-    /* We ignore non-ASCII first chars in 8 bit mode. */
-    if (utf)
-      {
-      if (re->req_char < 128)
-        {
-        if (cd->fcc[re->req_char] != re->req_char)
-          re->flags |= PCRE_RCH_CASELESS;
-        }
-      else if (UCD_OTHERCASE(re->req_char) != re->req_char)
-        re->flags |= PCRE_RCH_CASELESS;
-      }
-    else
-#endif
-    if (MAX_255(re->req_char) && cd->fcc[re->req_char] != re->req_char)
-      re->flags |= PCRE_RCH_CASELESS;
-    }
-
-  re->flags |= PCRE_REQCHSET;
-  }
-
-/* Print out the compiled data if debugging is enabled. This is never the
-case when building a production library. */
-
-#ifdef PCRE_DEBUG
-printf("Length = %d top_bracket = %d top_backref = %d\n",
-  length, re->top_bracket, re->top_backref);
-
-printf("Options=%08x\n", re->options);
-
-if ((re->flags & PCRE_FIRSTSET) != 0)
-  {
-  pcre_uchar ch = re->first_char;
-  const char *caseless =
-    ((re->flags & PCRE_FCH_CASELESS) == 0)? "" : " (caseless)";
-  if (PRINTABLE(ch)) printf("First char = %c%s\n", ch, caseless);
-    else printf("First char = \\x%02x%s\n", ch, caseless);
-  }
-
-if ((re->flags & PCRE_REQCHSET) != 0)
-  {
-  pcre_uchar ch = re->req_char;
-  const char *caseless =
-    ((re->flags & PCRE_RCH_CASELESS) == 0)? "" : " (caseless)";
-  if (PRINTABLE(ch)) printf("Req char = %c%s\n", ch, caseless);
-    else printf("Req char = \\x%02x%s\n", ch, caseless);
-  }
-
-#if defined COMPILE_PCRE8
-pcre_printint((pcre *)re, stdout, TRUE);
-#elif defined COMPILE_PCRE16
-pcre16_printint((pcre *)re, stdout, TRUE);
-#elif defined COMPILE_PCRE32
-pcre32_printint((pcre *)re, stdout, TRUE);
-#endif
-
-/* This check is done here in the debugging case so that the code that
-was compiled can be seen. */
-
-if (code - codestart > length)
-  {
-  (PUBL(free))(re);
-  *errorptr = find_error_text(ERR23);
-  *erroroffset = ptr - (pcre_uchar *)pattern;
-  if (errorcodeptr != NULL) *errorcodeptr = ERR23;
-  return NULL;
-  }
-#endif   /* PCRE_DEBUG */
-
-/* Check for a pattern than can match an empty string, so that this information
-can be provided to applications. */
-
-do
-  {
-  if (could_be_empty_branch(codestart, code, utf, cd, NULL))
-    {
-    re->flags |= PCRE_MATCH_EMPTY;
-    break;
-    }
-  codestart += GET(codestart, 1);
-  }
-while (*codestart == OP_ALT);
-
-#if defined COMPILE_PCRE8
-return (pcre *)re;
-#elif defined COMPILE_PCRE16
-return (pcre16 *)re;
-#elif defined COMPILE_PCRE32
-return (pcre32 *)re;
-#endif
-}
-
-/* End of pcre_compile.c */
-
diff --git a/src/extra/pcre/pcre_config.c b/src/extra/pcre/pcre_config.c
deleted file mode 100644
index 3703c89..0000000
--- a/src/extra/pcre/pcre_config.c
+++ /dev/null
@@ -1,190 +0,0 @@
-/*************************************************
-*      Perl-Compatible Regular Expressions       *
-*************************************************/
-
-/* PCRE is a library of functions to support regular expressions whose syntax
-and semantics are as close as possible to those of the Perl 5 language.
-
-                       Written by Philip Hazel
-           Copyright (c) 1997-2012 University of Cambridge
-
------------------------------------------------------------------------------
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are met:
-
-    * Redistributions of source code must retain the above copyright notice,
-      this list of conditions and the following disclaimer.
-
-    * Redistributions in binary form must reproduce the above copyright
-      notice, this list of conditions and the following disclaimer in the
-      documentation and/or other materials provided with the distribution.
-
-    * Neither the name of the University of Cambridge nor the names of its
-      contributors may be used to endorse or promote products derived from
-      this software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
-LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-POSSIBILITY OF SUCH DAMAGE.
------------------------------------------------------------------------------
-*/
-
-
-/* This module contains the external function pcre_config(). */
-
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-/* Keep the original link size. */
-static int real_link_size = 2; //LINK_SIZE;
-
-#include "pcre_internal.h"
-
-
-/*************************************************
-* Return info about what features are configured *
-*************************************************/
-
-/* This function has an extensible interface so that additional items can be
-added compatibly.
-
-Arguments:
-  what             what information is required
-  where            where to put the information
-
-Returns:           0 if data returned, negative on error
-*/
-
-#if defined COMPILE_PCRE8
-PCRE_EXP_DEFN int PCRE_CALL_CONVENTION
-pcre_config(int what, void *where)
-#elif defined COMPILE_PCRE16
-PCRE_EXP_DEFN int PCRE_CALL_CONVENTION
-pcre16_config(int what, void *where)
-#elif defined COMPILE_PCRE32
-PCRE_EXP_DEFN int PCRE_CALL_CONVENTION
-pcre32_config(int what, void *where)
-#endif
-{
-switch (what)
-  {
-  case PCRE_CONFIG_UTF8:
-#if defined COMPILE_PCRE16 || defined COMPILE_PCRE32
-  *((int *)where) = 0;
-  return PCRE_ERROR_BADOPTION;
-#else
-#if defined SUPPORT_UTF
-  *((int *)where) = 1;
-#else
-  *((int *)where) = 0;
-#endif
-  break;
-#endif
-
-  case PCRE_CONFIG_UTF16:
-#if defined COMPILE_PCRE8 || defined COMPILE_PCRE32
-  *((int *)where) = 0;
-  return PCRE_ERROR_BADOPTION;
-#else
-#if defined SUPPORT_UTF
-  *((int *)where) = 1;
-#else
-  *((int *)where) = 0;
-#endif
-  break;
-#endif
-
-  case PCRE_CONFIG_UTF32:
-#if defined COMPILE_PCRE8 || defined COMPILE_PCRE16
-  *((int *)where) = 0;
-  return PCRE_ERROR_BADOPTION;
-#else
-#if defined SUPPORT_UTF
-  *((int *)where) = 1;
-#else
-  *((int *)where) = 0;
-#endif
-  break;
-#endif
-
-  case PCRE_CONFIG_UNICODE_PROPERTIES:
-#ifdef SUPPORT_UCP
-  *((int *)where) = 1;
-#else
-  *((int *)where) = 0;
-#endif
-  break;
-
-  case PCRE_CONFIG_JIT:
-#ifdef SUPPORT_JIT
-  *((int *)where) = 1;
-#else
-  *((int *)where) = 0;
-#endif
-  break;
-
-  case PCRE_CONFIG_JITTARGET:
-#ifdef SUPPORT_JIT
-  *((const char **)where) = PRIV(jit_get_target)();
-#else
-  *((const char **)where) = NULL;
-#endif
-  break;
-
-  case PCRE_CONFIG_NEWLINE:
-  *((int *)where) = NEWLINE;
-  break;
-
-  case PCRE_CONFIG_BSR:
-#ifdef BSR_ANYCRLF
-  *((int *)where) = 1;
-#else
-  *((int *)where) = 0;
-#endif
-  break;
-
-  case PCRE_CONFIG_LINK_SIZE:
-  *((int *)where) = real_link_size;
-  break;
-
-  case PCRE_CONFIG_POSIX_MALLOC_THRESHOLD:
-  *((int *)where) = POSIX_MALLOC_THRESHOLD;
-  break;
-
-  case PCRE_CONFIG_PARENS_LIMIT:
-  *((unsigned long int *)where) = PARENS_NEST_LIMIT;
-  break;
-
-  case PCRE_CONFIG_MATCH_LIMIT:
-  *((unsigned long int *)where) = MATCH_LIMIT;
-  break;
-
-  case PCRE_CONFIG_MATCH_LIMIT_RECURSION:
-  *((unsigned long int *)where) = MATCH_LIMIT_RECURSION;
-  break;
-
-  case PCRE_CONFIG_STACKRECURSE:
-#ifdef NO_RECURSE
-  *((int *)where) = 0;
-#else
-  *((int *)where) = 1;
-#endif
-  break;
-
-  default: return PCRE_ERROR_BADOPTION;
-  }
-
-return 0;
-}
-
-/* End of pcre_config.c */
diff --git a/src/extra/pcre/pcre_exec.c b/src/extra/pcre/pcre_exec.c
deleted file mode 100644
index 5dec992..0000000
--- a/src/extra/pcre/pcre_exec.c
+++ /dev/null
@@ -1,7178 +0,0 @@
-/*************************************************
-*      Perl-Compatible Regular Expressions       *
-*************************************************/
-
-/* PCRE is a library of functions to support regular expressions whose syntax
-and semantics are as close as possible to those of the Perl 5 language.
-
-                       Written by Philip Hazel
-           Copyright (c) 1997-2014 University of Cambridge
-
------------------------------------------------------------------------------
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are met:
-
-    * Redistributions of source code must retain the above copyright notice,
-      this list of conditions and the following disclaimer.
-
-    * Redistributions in binary form must reproduce the above copyright
-      notice, this list of conditions and the following disclaimer in the
-      documentation and/or other materials provided with the distribution.
-
-    * Neither the name of the University of Cambridge nor the names of its
-      contributors may be used to endorse or promote products derived from
-      this software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
-LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-POSSIBILITY OF SUCH DAMAGE.
------------------------------------------------------------------------------
-*/
-
-/* This module contains pcre_exec(), the externally visible function that does
-pattern matching using an NFA algorithm, trying to mimic Perl as closely as
-possible. There are also some static supporting functions. */
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#define NLBLOCK md             /* Block containing newline information */
-#define PSSTART start_subject  /* Field containing processed string start */
-#define PSEND   end_subject    /* Field containing processed string end */
-
-#include "pcre_internal.h"
-
-/* Undefine some potentially clashing cpp symbols */
-
-#undef min
-#undef max
-
-/* The md->capture_last field uses the lower 16 bits for the last captured
-substring (which can never be greater than 65535) and a bit in the top half
-to mean "capture vector overflowed". This odd way of doing things was
-implemented when it was realized that preserving and restoring the overflow bit
-whenever the last capture number was saved/restored made for a neater
-interface, and doing it this way saved on (a) another variable, which would
-have increased the stack frame size (a big NO-NO in PCRE) and (b) another
-separate set of save/restore instructions. The following defines are used in
-implementing this. */
-
-#define CAPLMASK    0x0000ffff    /* The bits used for last_capture */
-#define OVFLMASK    0xffff0000    /* The bits used for the overflow flag */
-#define OVFLBIT     0x00010000    /* The bit that is set for overflow */
-
-/* Values for setting in md->match_function_type to indicate two special types
-of call to match(). We do it this way to save on using another stack variable,
-as stack usage is to be discouraged. */
-
-#define MATCH_CONDASSERT     1  /* Called to check a condition assertion */
-#define MATCH_CBEGROUP       2  /* Could-be-empty unlimited repeat group */
-
-/* Non-error returns from the match() function. Error returns are externally
-defined PCRE_ERROR_xxx codes, which are all negative. */
-
-#define MATCH_MATCH        1
-#define MATCH_NOMATCH      0
-
-/* Special internal returns from the match() function. Make them sufficiently
-negative to avoid the external error codes. */
-
-#define MATCH_ACCEPT       (-999)
-#define MATCH_KETRPOS      (-998)
-#define MATCH_ONCE         (-997)
-/* The next 5 must be kept together and in sequence so that a test that checks
-for any one of them can use a range. */
-#define MATCH_COMMIT       (-996)
-#define MATCH_PRUNE        (-995)
-#define MATCH_SKIP         (-994)
-#define MATCH_SKIP_ARG     (-993)
-#define MATCH_THEN         (-992)
-#define MATCH_BACKTRACK_MAX MATCH_THEN
-#define MATCH_BACKTRACK_MIN MATCH_COMMIT
-
-/* Maximum number of ints of offset to save on the stack for recursive calls.
-If the offset vector is bigger, malloc is used. This should be a multiple of 3,
-because the offset vector is always a multiple of 3 long. */
-
-#define REC_STACK_SAVE_MAX 30
-
-/* Min and max values for the common repeats; for the maxima, 0 => infinity */
-
-static const char rep_min[] = { 0, 0, 1, 1, 0, 0, 0, 0, 0, 1, 0, };
-static const char rep_max[] = { 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 1, };
-
-#ifdef PCRE_DEBUG
-/*************************************************
-*        Debugging function to print chars       *
-*************************************************/
-
-/* Print a sequence of chars in printable format, stopping at the end of the
-subject if the requested.
-
-Arguments:
-  p           points to characters
-  length      number to print
-  is_subject  TRUE if printing from within md->start_subject
-  md          pointer to matching data block, if is_subject is TRUE
-
-Returns:     nothing
-*/
-
-static void
-pchars(const pcre_uchar *p, int length, BOOL is_subject, match_data *md)
-{
-pcre_uint32 c;
-BOOL utf = md->utf;
-if (is_subject && length > md->end_subject - p) length = md->end_subject - p;
-while (length-- > 0)
-  if (isprint(c = UCHAR21INCTEST(p))) printf("%c", (char)c); else printf("\\x{%02x}", c);
-}
-#endif
-
-
-
-/*************************************************
-*          Match a back-reference                *
-*************************************************/
-
-/* Normally, if a back reference hasn't been set, the length that is passed is
-negative, so the match always fails. However, in JavaScript compatibility mode,
-the length passed is zero. Note that in caseless UTF-8 mode, the number of
-subject bytes matched may be different to the number of reference bytes.
-
-Arguments:
-  offset      index into the offset vector
-  eptr        pointer into the subject
-  length      length of reference to be matched (number of bytes)
-  md          points to match data block
-  caseless    TRUE if caseless
-
-Returns:      >= 0 the number of subject bytes matched
-              -1 no match
-              -2 partial match; always given if at end subject
-*/
-
-static int
-match_ref(int offset, register PCRE_PUCHAR eptr, int length, match_data *md,
-  BOOL caseless)
-{
-PCRE_PUCHAR eptr_start = eptr;
-register PCRE_PUCHAR p = md->start_subject + md->offset_vector[offset];
-#if defined SUPPORT_UTF && defined SUPPORT_UCP
-BOOL utf = md->utf;
-#endif
-
-#ifdef PCRE_DEBUG
-if (eptr >= md->end_subject)
-  printf("matching subject <null>");
-else
-  {
-  printf("matching subject ");
-  pchars(eptr, length, TRUE, md);
-  }
-printf(" against backref ");
-pchars(p, length, FALSE, md);
-printf("\n");
-#endif
-
-/* Always fail if reference not set (and not JavaScript compatible - in that
-case the length is passed as zero). */
-
-if (length < 0) return -1;
-
-/* Separate the caseless case for speed. In UTF-8 mode we can only do this
-properly if Unicode properties are supported. Otherwise, we can check only
-ASCII characters. */
-
-if (caseless)
-  {
-#if defined SUPPORT_UTF && defined SUPPORT_UCP
-  if (utf)
-    {
-    /* Match characters up to the end of the reference. NOTE: the number of
-    data units matched may differ, because in UTF-8 there are some characters
-    whose upper and lower case versions code have different numbers of bytes.
-    For example, U+023A (2 bytes in UTF-8) is the upper case version of U+2C65
-    (3 bytes in UTF-8); a sequence of 3 of the former uses 6 bytes, as does a
-    sequence of two of the latter. It is important, therefore, to check the
-    length along the reference, not along the subject (earlier code did this
-    wrong). */
-
-    PCRE_PUCHAR endptr = p + length;
-    while (p < endptr)
-      {
-      pcre_uint32 c, d;
-      const ucd_record *ur;
-      if (eptr >= md->end_subject) return -2;   /* Partial match */
-      GETCHARINC(c, eptr);
-      GETCHARINC(d, p);
-      ur = GET_UCD(d);
-      if (c != d && c != d + ur->other_case)
-        {
-        const pcre_uint32 *pp = PRIV(ucd_caseless_sets) + ur->caseset;
-        for (;;)
-          {
-          if (c < *pp) return -1;
-          if (c == *pp++) break;
-          }
-        }
-      }
-    }
-  else
-#endif
-
-  /* The same code works when not in UTF-8 mode and in UTF-8 mode when there
-  is no UCP support. */
-    {
-    while (length-- > 0)
-      {
-      pcre_uint32 cc, cp;
-      if (eptr >= md->end_subject) return -2;   /* Partial match */
-      cc = UCHAR21TEST(eptr);
-      cp = UCHAR21TEST(p);
-      if (TABLE_GET(cp, md->lcc, cp) != TABLE_GET(cc, md->lcc, cc)) return -1;
-      p++;
-      eptr++;
-      }
-    }
-  }
-
-/* In the caseful case, we can just compare the bytes, whether or not we
-are in UTF-8 mode. */
-
-else
-  {
-  while (length-- > 0)
-    {
-    if (eptr >= md->end_subject) return -2;   /* Partial match */
-    if (UCHAR21INCTEST(p) != UCHAR21INCTEST(eptr)) return -1;
-    }
-  }
-
-return (int)(eptr - eptr_start);
-}
-
-
-
-/***************************************************************************
-****************************************************************************
-                   RECURSION IN THE match() FUNCTION
-
-The match() function is highly recursive, though not every recursive call
-increases the recursive depth. Nevertheless, some regular expressions can cause
-it to recurse to a great depth. I was writing for Unix, so I just let it call
-itself recursively. This uses the stack for saving everything that has to be
-saved for a recursive call. On Unix, the stack can be large, and this works
-fine.
-
-It turns out that on some non-Unix-like systems there are problems with
-programs that use a lot of stack. (This despite the fact that every last chip
-has oodles of memory these days, and techniques for extending the stack have
-been known for decades.) So....
-
-There is a fudge, triggered by defining NO_RECURSE, which avoids recursive
-calls by keeping local variables that need to be preserved in blocks of memory
-obtained from malloc() instead instead of on the stack. Macros are used to
-achieve this so that the actual code doesn't look very different to what it
-always used to.
-
-The original heap-recursive code used longjmp(). However, it seems that this
-can be very slow on some operating systems. Following a suggestion from Stan
-Switzer, the use of longjmp() has been abolished, at the cost of having to
-provide a unique number for each call to RMATCH. There is no way of generating
-a sequence of numbers at compile time in C. I have given them names, to make
-them stand out more clearly.
-
-Crude tests on x86 Linux show a small speedup of around 5-8%. However, on
-FreeBSD, avoiding longjmp() more than halves the time taken to run the standard
-tests. Furthermore, not using longjmp() means that local dynamic variables
-don't have indeterminate values; this has meant that the frame size can be
-reduced because the result can be "passed back" by straight setting of the
-variable instead of being passed in the frame.
-****************************************************************************
-***************************************************************************/
-
-/* Numbers for RMATCH calls. When this list is changed, the code at HEAP_RETURN
-below must be updated in sync.  */
-
-enum { RM1=1, RM2,  RM3,  RM4,  RM5,  RM6,  RM7,  RM8,  RM9,  RM10,
-       RM11,  RM12, RM13, RM14, RM15, RM16, RM17, RM18, RM19, RM20,
-       RM21,  RM22, RM23, RM24, RM25, RM26, RM27, RM28, RM29, RM30,
-       RM31,  RM32, RM33, RM34, RM35, RM36, RM37, RM38, RM39, RM40,
-       RM41,  RM42, RM43, RM44, RM45, RM46, RM47, RM48, RM49, RM50,
-       RM51,  RM52, RM53, RM54, RM55, RM56, RM57, RM58, RM59, RM60,
-       RM61,  RM62, RM63, RM64, RM65, RM66, RM67 };
-
-/* These versions of the macros use the stack, as normal. There are debugging
-versions and production versions. Note that the "rw" argument of RMATCH isn't
-actually used in this definition. */
-
-#ifndef NO_RECURSE
-#define REGISTER register
-
-#ifdef PCRE_DEBUG
-#define RMATCH(ra,rb,rc,rd,re,rw) \
-  { \
-  printf("match() called in line %d\n", __LINE__); \
-  rrc = match(ra,rb,mstart,rc,rd,re,rdepth+1); \
-  printf("to line %d\n", __LINE__); \
-  }
-#define RRETURN(ra) \
-  { \
-  printf("match() returned %d from line %d\n", ra, __LINE__); \
-  return ra; \
-  }
-#else
-#define RMATCH(ra,rb,rc,rd,re,rw) \
-  rrc = match(ra,rb,mstart,rc,rd,re,rdepth+1)
-#define RRETURN(ra) return ra
-#endif
-
-#else
-
-
-/* These versions of the macros manage a private stack on the heap. Note that
-the "rd" argument of RMATCH isn't actually used in this definition. It's the md
-argument of match(), which never changes. */
-
-#define REGISTER
-
-#define RMATCH(ra,rb,rc,rd,re,rw)\
-  {\
-  heapframe *newframe = frame->Xnextframe;\
-  if (newframe == NULL)\
-    {\
-    newframe = (heapframe *)(PUBL(stack_malloc))(sizeof(heapframe));\
-    if (newframe == NULL) RRETURN(PCRE_ERROR_NOMEMORY);\
-    newframe->Xnextframe = NULL;\
-    frame->Xnextframe = newframe;\
-    }\
-  frame->Xwhere = rw;\
-  newframe->Xeptr = ra;\
-  newframe->Xecode = rb;\
-  newframe->Xmstart = mstart;\
-  newframe->Xoffset_top = rc;\
-  newframe->Xeptrb = re;\
-  newframe->Xrdepth = frame->Xrdepth + 1;\
-  newframe->Xprevframe = frame;\
-  frame = newframe;\
-  DPRINTF(("restarting from line %d\n", __LINE__));\
-  goto HEAP_RECURSE;\
-  L_##rw:\
-  DPRINTF(("jumped back to line %d\n", __LINE__));\
-  }
-
-#define RRETURN(ra)\
-  {\
-  heapframe *oldframe = frame;\
-  frame = oldframe->Xprevframe;\
-  if (frame != NULL)\
-    {\
-    rrc = ra;\
-    goto HEAP_RETURN;\
-    }\
-  return ra;\
-  }
-
-
-/* Structure for remembering the local variables in a private frame */
-
-typedef struct heapframe {
-  struct heapframe *Xprevframe;
-  struct heapframe *Xnextframe;
-
-  /* Function arguments that may change */
-
-  PCRE_PUCHAR Xeptr;
-  const pcre_uchar *Xecode;
-  PCRE_PUCHAR Xmstart;
-  int Xoffset_top;
-  eptrblock *Xeptrb;
-  unsigned int Xrdepth;
-
-  /* Function local variables */
-
-  PCRE_PUCHAR Xcallpat;
-#ifdef SUPPORT_UTF
-  PCRE_PUCHAR Xcharptr;
-#endif
-  PCRE_PUCHAR Xdata;
-  PCRE_PUCHAR Xnext;
-  PCRE_PUCHAR Xpp;
-  PCRE_PUCHAR Xprev;
-  PCRE_PUCHAR Xsaved_eptr;
-
-  recursion_info Xnew_recursive;
-
-  BOOL Xcur_is_word;
-  BOOL Xcondition;
-  BOOL Xprev_is_word;
-
-#ifdef SUPPORT_UCP
-  int Xprop_type;
-  unsigned int Xprop_value;
-  int Xprop_fail_result;
-  int Xoclength;
-  pcre_uchar Xocchars[6];
-#endif
-
-  int Xcodelink;
-  int Xctype;
-  unsigned int Xfc;
-  int Xfi;
-  int Xlength;
-  int Xmax;
-  int Xmin;
-  unsigned int Xnumber;
-  int Xoffset;
-  unsigned int Xop;
-  pcre_int32 Xsave_capture_last;
-  int Xsave_offset1, Xsave_offset2, Xsave_offset3;
-  int Xstacksave[REC_STACK_SAVE_MAX];
-
-  eptrblock Xnewptrb;
-
-  /* Where to jump back to */
-
-  int Xwhere;
-
-} heapframe;
-
-#endif
-
-
-/***************************************************************************
-***************************************************************************/
-
-
-
-/*************************************************
-*         Match from current position            *
-*************************************************/
-
-/* This function is called recursively in many circumstances. Whenever it
-returns a negative (error) response, the outer incarnation must also return the
-same response. */
-
-/* These macros pack up tests that are used for partial matching, and which
-appear several times in the code. We set the "hit end" flag if the pointer is
-at the end of the subject and also past the start of the subject (i.e.
-something has been matched). For hard partial matching, we then return
-immediately. The second one is used when we already know we are past the end of
-the subject. */
-
-#define CHECK_PARTIAL()\
-  if (md->partial != 0 && eptr >= md->end_subject && \
-      eptr > md->start_used_ptr) \
-    { \
-    md->hitend = TRUE; \
-    if (md->partial > 1) RRETURN(PCRE_ERROR_PARTIAL); \
-    }
-
-#define SCHECK_PARTIAL()\
-  if (md->partial != 0 && eptr > md->start_used_ptr) \
-    { \
-    md->hitend = TRUE; \
-    if (md->partial > 1) RRETURN(PCRE_ERROR_PARTIAL); \
-    }
-
-
-/* Performance note: It might be tempting to extract commonly used fields from
-the md structure (e.g. utf, end_subject) into individual variables to improve
-performance. Tests using gcc on a SPARC disproved this; in the first case, it
-made performance worse.
-
-Arguments:
-   eptr        pointer to current character in subject
-   ecode       pointer to current position in compiled code
-   mstart      pointer to the current match start position (can be modified
-                 by encountering \K)
-   offset_top  current top pointer
-   md          pointer to "static" info for the match
-   eptrb       pointer to chain of blocks containing eptr at start of
-                 brackets - for testing for empty matches
-   rdepth      the recursion depth
-
-Returns:       MATCH_MATCH if matched            )  these values are >= 0
-               MATCH_NOMATCH if failed to match  )
-               a negative MATCH_xxx value for PRUNE, SKIP, etc
-               a negative PCRE_ERROR_xxx value if aborted by an error condition
-                 (e.g. stopped by repeated call or recursion limit)
-*/
-
-static int
-match(REGISTER PCRE_PUCHAR eptr, REGISTER const pcre_uchar *ecode,
-  PCRE_PUCHAR mstart, int offset_top, match_data *md, eptrblock *eptrb,
-  unsigned int rdepth)
-{
-/* These variables do not need to be preserved over recursion in this function,
-so they can be ordinary variables in all cases. Mark some of them with
-"register" because they are used a lot in loops. */
-
-register int  rrc;         /* Returns from recursive calls */
-register int  i;           /* Used for loops not involving calls to RMATCH() */
-register pcre_uint32 c;    /* Character values not kept over RMATCH() calls */
-register BOOL utf;         /* Local copy of UTF flag for speed */
-
-BOOL minimize, possessive; /* Quantifier options */
-BOOL caseless;
-int condcode;
-
-/* When recursion is not being used, all "local" variables that have to be
-preserved over calls to RMATCH() are part of a "frame". We set up the top-level
-frame on the stack here; subsequent instantiations are obtained from the heap
-whenever RMATCH() does a "recursion". See the macro definitions above. Putting
-the top-level on the stack rather than malloc-ing them all gives a performance
-boost in many cases where there is not much "recursion". */
-
-#ifdef NO_RECURSE
-heapframe *frame = (heapframe *)md->match_frames_base;
-
-/* Copy in the original argument variables */
-
-frame->Xeptr = eptr;
-frame->Xecode = ecode;
-frame->Xmstart = mstart;
-frame->Xoffset_top = offset_top;
-frame->Xeptrb = eptrb;
-frame->Xrdepth = rdepth;
-
-/* This is where control jumps back to to effect "recursion" */
-
-HEAP_RECURSE:
-
-/* Macros make the argument variables come from the current frame */
-
-#define eptr               frame->Xeptr
-#define ecode              frame->Xecode
-#define mstart             frame->Xmstart
-#define offset_top         frame->Xoffset_top
-#define eptrb              frame->Xeptrb
-#define rdepth             frame->Xrdepth
-
-/* Ditto for the local variables */
-
-#ifdef SUPPORT_UTF
-#define charptr            frame->Xcharptr
-#endif
-#define callpat            frame->Xcallpat
-#define codelink           frame->Xcodelink
-#define data               frame->Xdata
-#define next               frame->Xnext
-#define pp                 frame->Xpp
-#define prev               frame->Xprev
-#define saved_eptr         frame->Xsaved_eptr
-
-#define new_recursive      frame->Xnew_recursive
-
-#define cur_is_word        frame->Xcur_is_word
-#define condition          frame->Xcondition
-#define prev_is_word       frame->Xprev_is_word
-
-#ifdef SUPPORT_UCP
-#define prop_type          frame->Xprop_type
-#define prop_value         frame->Xprop_value
-#define prop_fail_result   frame->Xprop_fail_result
-#define oclength           frame->Xoclength
-#define occhars            frame->Xocchars
-#endif
-
-#define ctype              frame->Xctype
-#define fc                 frame->Xfc
-#define fi                 frame->Xfi
-#define length             frame->Xlength
-#define max                frame->Xmax
-#define min                frame->Xmin
-#define number             frame->Xnumber
-#define offset             frame->Xoffset
-#define op                 frame->Xop
-#define save_capture_last  frame->Xsave_capture_last
-#define save_offset1       frame->Xsave_offset1
-#define save_offset2       frame->Xsave_offset2
-#define save_offset3       frame->Xsave_offset3
-#define stacksave          frame->Xstacksave
-
-#define newptrb            frame->Xnewptrb
-
-/* When recursion is being used, local variables are allocated on the stack and
-get preserved during recursion in the normal way. In this environment, fi and
-i, and fc and c, can be the same variables. */
-
-#else         /* NO_RECURSE not defined */
-#define fi i
-#define fc c
-
-/* Many of the following variables are used only in small blocks of the code.
-My normal style of coding would have declared them within each of those blocks.
-However, in order to accommodate the version of this code that uses an external
-"stack" implemented on the heap, it is easier to declare them all here, so the
-declarations can be cut out in a block. The only declarations within blocks
-below are for variables that do not have to be preserved over a recursive call
-to RMATCH(). */
-
-#ifdef SUPPORT_UTF
-const pcre_uchar *charptr;
-#endif
-const pcre_uchar *callpat;
-const pcre_uchar *data;
-const pcre_uchar *next;
-PCRE_PUCHAR       pp;
-const pcre_uchar *prev;
-PCRE_PUCHAR       saved_eptr;
-
-recursion_info new_recursive;
-
-BOOL cur_is_word;
-BOOL condition;
-BOOL prev_is_word;
-
-#ifdef SUPPORT_UCP
-int prop_type;
-unsigned int prop_value;
-int prop_fail_result;
-int oclength;
-pcre_uchar occhars[6];
-#endif
-
-int codelink;
-int ctype;
-int length;
-int max;
-int min;
-unsigned int number;
-int offset;
-unsigned int op;
-pcre_int32 save_capture_last;
-int save_offset1, save_offset2, save_offset3;
-int stacksave[REC_STACK_SAVE_MAX];
-
-eptrblock newptrb;
-
-/* There is a special fudge for calling match() in a way that causes it to
-measure the size of its basic stack frame when the stack is being used for
-recursion. The second argument (ecode) being NULL triggers this behaviour. It
-cannot normally ever be NULL. The return is the negated value of the frame
-size. */
-
-if (ecode == NULL)
-  {
-  if (rdepth == 0)
-    return match((PCRE_PUCHAR)&rdepth, NULL, NULL, 0, NULL, NULL, 1);
-  else
-    {
-    int len = (char *)&rdepth - (char *)eptr;
-    return (len > 0)? -len : len;
-    }
-  }
-#endif     /* NO_RECURSE */
-
-/* To save space on the stack and in the heap frame, I have doubled up on some
-of the local variables that are used only in localised parts of the code, but
-still need to be preserved over recursive calls of match(). These macros define
-the alternative names that are used. */
-
-#define allow_zero    cur_is_word
-#define cbegroup      condition
-#define code_offset   codelink
-#define condassert    condition
-#define matched_once  prev_is_word
-#define foc           number
-#define save_mark     data
-
-/* These statements are here to stop the compiler complaining about unitialized
-variables. */
-
-#ifdef SUPPORT_UCP
-prop_value = 0;
-prop_fail_result = 0;
-#endif
-
-
-/* This label is used for tail recursion, which is used in a few cases even
-when NO_RECURSE is not defined, in order to reduce the amount of stack that is
-used. Thanks to Ian Taylor for noticing this possibility and sending the
-original patch. */
-
-TAIL_RECURSE:
-
-/* OK, now we can get on with the real code of the function. Recursive calls
-are specified by the macro RMATCH and RRETURN is used to return. When
-NO_RECURSE is *not* defined, these just turn into a recursive call to match()
-and a "return", respectively (possibly with some debugging if PCRE_DEBUG is
-defined). However, RMATCH isn't like a function call because it's quite a
-complicated macro. It has to be used in one particular way. This shouldn't,
-however, impact performance when true recursion is being used. */
-
-#ifdef SUPPORT_UTF
-utf = md->utf;       /* Local copy of the flag */
-#else
-utf = FALSE;
-#endif
-
-/* First check that we haven't called match() too many times, or that we
-haven't exceeded the recursive call limit. */
-
-if (md->match_call_count++ >= md->match_limit) RRETURN(PCRE_ERROR_MATCHLIMIT);
-if (rdepth >= md->match_limit_recursion) RRETURN(PCRE_ERROR_RECURSIONLIMIT);
-
-/* At the start of a group with an unlimited repeat that may match an empty
-string, the variable md->match_function_type is set to MATCH_CBEGROUP. It is
-done this way to save having to use another function argument, which would take
-up space on the stack. See also MATCH_CONDASSERT below.
-
-When MATCH_CBEGROUP is set, add the current subject pointer to the chain of
-such remembered pointers, to be checked when we hit the closing ket, in order
-to break infinite loops that match no characters. When match() is called in
-other circumstances, don't add to the chain. The MATCH_CBEGROUP feature must
-NOT be used with tail recursion, because the memory block that is used is on
-the stack, so a new one may be required for each match(). */
-
-if (md->match_function_type == MATCH_CBEGROUP)
-  {
-  newptrb.epb_saved_eptr = eptr;
-  newptrb.epb_prev = eptrb;
-  eptrb = &newptrb;
-  md->match_function_type = 0;
-  }
-
-/* Now start processing the opcodes. */
-
-for (;;)
-  {
-  minimize = possessive = FALSE;
-  op = *ecode;
-
-  switch(op)
-    {
-    case OP_MARK:
-    md->nomatch_mark = ecode + 2;
-    md->mark = NULL;    /* In case previously set by assertion */
-    RMATCH(eptr, ecode + PRIV(OP_lengths)[*ecode] + ecode[1], offset_top, md,
-      eptrb, RM55);
-    if ((rrc == MATCH_MATCH || rrc == MATCH_ACCEPT) &&
-         md->mark == NULL) md->mark = ecode + 2;
-
-    /* A return of MATCH_SKIP_ARG means that matching failed at SKIP with an
-    argument, and we must check whether that argument matches this MARK's
-    argument. It is passed back in md->start_match_ptr (an overloading of that
-    variable). If it does match, we reset that variable to the current subject
-    position and return MATCH_SKIP. Otherwise, pass back the return code
-    unaltered. */
-
-    else if (rrc == MATCH_SKIP_ARG &&
-        STRCMP_UC_UC_TEST(ecode + 2, md->start_match_ptr) == 0)
-      {
-      md->start_match_ptr = eptr;
-      RRETURN(MATCH_SKIP);
-      }
-    RRETURN(rrc);
-
-    case OP_FAIL:
-    RRETURN(MATCH_NOMATCH);
-
-    case OP_COMMIT:
-    RMATCH(eptr, ecode + PRIV(OP_lengths)[*ecode], offset_top, md,
-      eptrb, RM52);
-    if (rrc != MATCH_NOMATCH) RRETURN(rrc);
-    RRETURN(MATCH_COMMIT);
-
-    case OP_PRUNE:
-    RMATCH(eptr, ecode + PRIV(OP_lengths)[*ecode], offset_top, md,
-      eptrb, RM51);
-    if (rrc != MATCH_NOMATCH) RRETURN(rrc);
-    RRETURN(MATCH_PRUNE);
-
-    case OP_PRUNE_ARG:
-    md->nomatch_mark = ecode + 2;
-    md->mark = NULL;    /* In case previously set by assertion */
-    RMATCH(eptr, ecode + PRIV(OP_lengths)[*ecode] + ecode[1], offset_top, md,
-      eptrb, RM56);
-    if ((rrc == MATCH_MATCH || rrc == MATCH_ACCEPT) &&
-         md->mark == NULL) md->mark = ecode + 2;
-    if (rrc != MATCH_NOMATCH) RRETURN(rrc);
-    RRETURN(MATCH_PRUNE);
-
-    case OP_SKIP:
-    RMATCH(eptr, ecode + PRIV(OP_lengths)[*ecode], offset_top, md,
-      eptrb, RM53);
-    if (rrc != MATCH_NOMATCH) RRETURN(rrc);
-    md->start_match_ptr = eptr;   /* Pass back current position */
-    RRETURN(MATCH_SKIP);
-
-    /* Note that, for Perl compatibility, SKIP with an argument does NOT set
-    nomatch_mark. When a pattern match ends with a SKIP_ARG for which there was
-    not a matching mark, we have to re-run the match, ignoring the SKIP_ARG
-    that failed and any that precede it (either they also failed, or were not
-    triggered). To do this, we maintain a count of executed SKIP_ARGs. If a
-    SKIP_ARG gets to top level, the match is re-run with md->ignore_skip_arg
-    set to the count of the one that failed. */
-
-    case OP_SKIP_ARG:
-    md->skip_arg_count++;
-    if (md->skip_arg_count <= md->ignore_skip_arg)
-      {
-      ecode += PRIV(OP_lengths)[*ecode] + ecode[1];
-      break;
-      }
-    RMATCH(eptr, ecode + PRIV(OP_lengths)[*ecode] + ecode[1], offset_top, md,
-      eptrb, RM57);
-    if (rrc != MATCH_NOMATCH) RRETURN(rrc);
-
-    /* Pass back the current skip name by overloading md->start_match_ptr and
-    returning the special MATCH_SKIP_ARG return code. This will either be
-    caught by a matching MARK, or get to the top, where it causes a rematch
-    with md->ignore_skip_arg set to the value of md->skip_arg_count. */
-
-    md->start_match_ptr = ecode + 2;
-    RRETURN(MATCH_SKIP_ARG);
-
-    /* For THEN (and THEN_ARG) we pass back the address of the opcode, so that
-    the branch in which it occurs can be determined. Overload the start of
-    match pointer to do this. */
-
-    case OP_THEN:
-    RMATCH(eptr, ecode + PRIV(OP_lengths)[*ecode], offset_top, md,
-      eptrb, RM54);
-    if (rrc != MATCH_NOMATCH) RRETURN(rrc);
-    md->start_match_ptr = ecode;
-    RRETURN(MATCH_THEN);
-
-    case OP_THEN_ARG:
-    md->nomatch_mark = ecode + 2;
-    md->mark = NULL;    /* In case previously set by assertion */
-    RMATCH(eptr, ecode + PRIV(OP_lengths)[*ecode] + ecode[1], offset_top,
-      md, eptrb, RM58);
-    if ((rrc == MATCH_MATCH || rrc == MATCH_ACCEPT) &&
-         md->mark == NULL) md->mark = ecode + 2;
-    if (rrc != MATCH_NOMATCH) RRETURN(rrc);
-    md->start_match_ptr = ecode;
-    RRETURN(MATCH_THEN);
-
-    /* Handle an atomic group that does not contain any capturing parentheses.
-    This can be handled like an assertion. Prior to 8.13, all atomic groups
-    were handled this way. In 8.13, the code was changed as below for ONCE, so
-    that backups pass through the group and thereby reset captured values.
-    However, this uses a lot more stack, so in 8.20, atomic groups that do not
-    contain any captures generate OP_ONCE_NC, which can be handled in the old,
-    less stack intensive way.
-
-    Check the alternative branches in turn - the matching won't pass the KET
-    for this kind of subpattern. If any one branch matches, we carry on as at
-    the end of a normal bracket, leaving the subject pointer, but resetting
-    the start-of-match value in case it was changed by \K. */
-
-    case OP_ONCE_NC:
-    prev = ecode;
-    saved_eptr = eptr;
-    save_mark = md->mark;
-    do
-      {
-      RMATCH(eptr, ecode + 1 + LINK_SIZE, offset_top, md, eptrb, RM64);
-      if (rrc == MATCH_MATCH)  /* Note: _not_ MATCH_ACCEPT */
-        {
-        mstart = md->start_match_ptr;
-        break;
-        }
-      if (rrc == MATCH_THEN)
-        {
-        next = ecode + GET(ecode,1);
-        if (md->start_match_ptr < next &&
-            (*ecode == OP_ALT || *next == OP_ALT))
-          rrc = MATCH_NOMATCH;
-        }
-
-      if (rrc != MATCH_NOMATCH) RRETURN(rrc);
-      ecode += GET(ecode,1);
-      md->mark = save_mark;
-      }
-    while (*ecode == OP_ALT);
-
-    /* If hit the end of the group (which could be repeated), fail */
-
-    if (*ecode != OP_ONCE_NC && *ecode != OP_ALT) RRETURN(MATCH_NOMATCH);
-
-    /* Continue as from after the group, updating the offsets high water
-    mark, since extracts may have been taken. */
-
-    do ecode += GET(ecode, 1); while (*ecode == OP_ALT);
-
-    offset_top = md->end_offset_top;
-    eptr = md->end_match_ptr;
-
-    /* For a non-repeating ket, just continue at this level. This also
-    happens for a repeating ket if no characters were matched in the group.
-    This is the forcible breaking of infinite loops as implemented in Perl
-    5.005. */
-
-    if (*ecode == OP_KET || eptr == saved_eptr)
-      {
-      ecode += 1+LINK_SIZE;
-      break;
-      }
-
-    /* The repeating kets try the rest of the pattern or restart from the
-    preceding bracket, in the appropriate order. The second "call" of match()
-    uses tail recursion, to avoid using another stack frame. */
-
-    if (*ecode == OP_KETRMIN)
-      {
-      RMATCH(eptr, ecode + 1 + LINK_SIZE, offset_top, md, eptrb, RM65);
-      if (rrc != MATCH_NOMATCH) RRETURN(rrc);
-      ecode = prev;
-      goto TAIL_RECURSE;
-      }
-    else  /* OP_KETRMAX */
-      {
-      RMATCH(eptr, prev, offset_top, md, eptrb, RM66);
-      if (rrc != MATCH_NOMATCH) RRETURN(rrc);
-      ecode += 1 + LINK_SIZE;
-      goto TAIL_RECURSE;
-      }
-    /* Control never gets here */
-
-    /* Handle a capturing bracket, other than those that are possessive with an
-    unlimited repeat. If there is space in the offset vector, save the current
-    subject position in the working slot at the top of the vector. We mustn't
-    change the current values of the data slot, because they may be set from a
-    previous iteration of this group, and be referred to by a reference inside
-    the group. A failure to match might occur after the group has succeeded,
-    if something later on doesn't match. For this reason, we need to restore
-    the working value and also the values of the final offsets, in case they
-    were set by a previous iteration of the same bracket.
-
-    If there isn't enough space in the offset vector, treat this as if it were
-    a non-capturing bracket. Don't worry about setting the flag for the error
-    case here; that is handled in the code for KET. */
-
-    case OP_CBRA:
-    case OP_SCBRA:
-    number = GET2(ecode, 1+LINK_SIZE);
-    offset = number << 1;
-
-#ifdef PCRE_DEBUG
-    printf("start bracket %d\n", number);
-    printf("subject=");
-    pchars(eptr, 16, TRUE, md);
-    printf("\n");
-#endif
-
-    if (offset < md->offset_max)
-      {
-      save_offset1 = md->offset_vector[offset];
-      save_offset2 = md->offset_vector[offset+1];
-      save_offset3 = md->offset_vector[md->offset_end - number];
-      save_capture_last = md->capture_last;
-      save_mark = md->mark;
-
-      DPRINTF(("saving %d %d %d\n", save_offset1, save_offset2, save_offset3));
-      md->offset_vector[md->offset_end - number] =
-        (int)(eptr - md->start_subject);
-
-      for (;;)
-        {
-        if (op >= OP_SBRA) md->match_function_type = MATCH_CBEGROUP;
-        RMATCH(eptr, ecode + PRIV(OP_lengths)[*ecode], offset_top, md,
-          eptrb, RM1);
-        if (rrc == MATCH_ONCE) break;  /* Backing up through an atomic group */
-
-        /* If we backed up to a THEN, check whether it is within the current
-        branch by comparing the address of the THEN that is passed back with
-        the end of the branch. If it is within the current branch, and the
-        branch is one of two or more alternatives (it either starts or ends
-        with OP_ALT), we have reached the limit of THEN's action, so convert
-        the return code to NOMATCH, which will cause normal backtracking to
-        happen from now on. Otherwise, THEN is passed back to an outer
-        alternative. This implements Perl's treatment of parenthesized groups,
-        where a group not containing | does not affect the current alternative,
-        that is, (X) is NOT the same as (X|(*F)). */
-
-        if (rrc == MATCH_THEN)
-          {
-          next = ecode + GET(ecode,1);
-          if (md->start_match_ptr < next &&
-              (*ecode == OP_ALT || *next == OP_ALT))
-            rrc = MATCH_NOMATCH;
-          }
-
-        /* Anything other than NOMATCH is passed back. */
-
-        if (rrc != MATCH_NOMATCH) RRETURN(rrc);
-        md->capture_last = save_capture_last;
-        ecode += GET(ecode, 1);
-        md->mark = save_mark;
-        if (*ecode != OP_ALT) break;
-        }
-
-      DPRINTF(("bracket %d failed\n", number));
-      md->offset_vector[offset] = save_offset1;
-      md->offset_vector[offset+1] = save_offset2;
-      md->offset_vector[md->offset_end - number] = save_offset3;
-
-      /* At this point, rrc will be one of MATCH_ONCE or MATCH_NOMATCH. */
-
-      RRETURN(rrc);
-      }
-
-    /* FALL THROUGH ... Insufficient room for saving captured contents. Treat
-    as a non-capturing bracket. */
-
-    /* VVVVVVVVVVVVVVVVVVVVVVVVV */
-    /* VVVVVVVVVVVVVVVVVVVVVVVVV */
-
-    DPRINTF(("insufficient capture room: treat as non-capturing\n"));
-
-    /* VVVVVVVVVVVVVVVVVVVVVVVVV */
-    /* VVVVVVVVVVVVVVVVVVVVVVVVV */
-
-    /* Non-capturing or atomic group, except for possessive with unlimited
-    repeat and ONCE group with no captures. Loop for all the alternatives.
-
-    When we get to the final alternative within the brackets, we used to return
-    the result of a recursive call to match() whatever happened so it was
-    possible to reduce stack usage by turning this into a tail recursion,
-    except in the case of a possibly empty group. However, now that there is
-    the possiblity of (*THEN) occurring in the final alternative, this
-    optimization is no longer always possible.
-
-    We can optimize if we know there are no (*THEN)s in the pattern; at present
-    this is the best that can be done.
-
-    MATCH_ONCE is returned when the end of an atomic group is successfully
-    reached, but subsequent matching fails. It passes back up the tree (causing
-    captured values to be reset) until the original atomic group level is
-    reached. This is tested by comparing md->once_target with the start of the
-    group. At this point, the return is converted into MATCH_NOMATCH so that
-    previous backup points can be taken. */
-
-    case OP_ONCE:
-    case OP_BRA:
-    case OP_SBRA:
-    DPRINTF(("start non-capturing bracket\n"));
-
-    for (;;)
-      {
-      if (op >= OP_SBRA || op == OP_ONCE)
-        md->match_function_type = MATCH_CBEGROUP;
-
-      /* If this is not a possibly empty group, and there are no (*THEN)s in
-      the pattern, and this is the final alternative, optimize as described
-      above. */
-
-      else if (!md->hasthen && ecode[GET(ecode, 1)] != OP_ALT)
-        {
-        ecode += PRIV(OP_lengths)[*ecode];
-        goto TAIL_RECURSE;
-        }
-
-      /* In all other cases, we have to make another call to match(). */
-
-      save_mark = md->mark;
-      save_capture_last = md->capture_last;
-      RMATCH(eptr, ecode + PRIV(OP_lengths)[*ecode], offset_top, md, eptrb,
-        RM2);
-
-      /* See comment in the code for capturing groups above about handling
-      THEN. */
-
-      if (rrc == MATCH_THEN)
-        {
-        next = ecode + GET(ecode,1);
-        if (md->start_match_ptr < next &&
-            (*ecode == OP_ALT || *next == OP_ALT))
-          rrc = MATCH_NOMATCH;
-        }
-
-      if (rrc != MATCH_NOMATCH)
-        {
-        if (rrc == MATCH_ONCE)
-          {
-          const pcre_uchar *scode = ecode;
-          if (*scode != OP_ONCE)           /* If not at start, find it */
-            {
-            while (*scode == OP_ALT) scode += GET(scode, 1);
-            scode -= GET(scode, 1);
-            }
-          if (md->once_target == scode) rrc = MATCH_NOMATCH;
-          }
-        RRETURN(rrc);
-        }
-      ecode += GET(ecode, 1);
-      md->mark = save_mark;
-      if (*ecode != OP_ALT) break;
-      md->capture_last = save_capture_last;
-      }
-
-    RRETURN(MATCH_NOMATCH);
-
-    /* Handle possessive capturing brackets with an unlimited repeat. We come
-    here from BRAZERO with allow_zero set TRUE. The offset_vector values are
-    handled similarly to the normal case above. However, the matching is
-    different. The end of these brackets will always be OP_KETRPOS, which
-    returns MATCH_KETRPOS without going further in the pattern. By this means
-    we can handle the group by iteration rather than recursion, thereby
-    reducing the amount of stack needed. */
-
-    case OP_CBRAPOS:
-    case OP_SCBRAPOS:
-    allow_zero = FALSE;
-
-    POSSESSIVE_CAPTURE:
-    number = GET2(ecode, 1+LINK_SIZE);
-    offset = number << 1;
-
-#ifdef PCRE_DEBUG
-    printf("start possessive bracket %d\n", number);
-    printf("subject=");
-    pchars(eptr, 16, TRUE, md);
-    printf("\n");
-#endif
-
-    if (offset < md->offset_max)
-      {
-      matched_once = FALSE;
-      code_offset = (int)(ecode - md->start_code);
-
-      save_offset1 = md->offset_vector[offset];
-      save_offset2 = md->offset_vector[offset+1];
-      save_offset3 = md->offset_vector[md->offset_end - number];
-      save_capture_last = md->capture_last;
-
-      DPRINTF(("saving %d %d %d\n", save_offset1, save_offset2, save_offset3));
-
-      /* Each time round the loop, save the current subject position for use
-      when the group matches. For MATCH_MATCH, the group has matched, so we
-      restart it with a new subject starting position, remembering that we had
-      at least one match. For MATCH_NOMATCH, carry on with the alternatives, as
-      usual. If we haven't matched any alternatives in any iteration, check to
-      see if a previous iteration matched. If so, the group has matched;
-      continue from afterwards. Otherwise it has failed; restore the previous
-      capture values before returning NOMATCH. */
-
-      for (;;)
-        {
-        md->offset_vector[md->offset_end - number] =
-          (int)(eptr - md->start_subject);
-        if (op >= OP_SBRA) md->match_function_type = MATCH_CBEGROUP;
-        RMATCH(eptr, ecode + PRIV(OP_lengths)[*ecode], offset_top, md,
-          eptrb, RM63);
-        if (rrc == MATCH_KETRPOS)
-          {
-          offset_top = md->end_offset_top;
-          eptr = md->end_match_ptr;
-          ecode = md->start_code + code_offset;
-          save_capture_last = md->capture_last;
-          matched_once = TRUE;
-          mstart = md->start_match_ptr;    /* In case \K changed it */
-          continue;
-          }
-
-        /* See comment in the code for capturing groups above about handling
-        THEN. */
-
-        if (rrc == MATCH_THEN)
-          {
-          next = ecode + GET(ecode,1);
-          if (md->start_match_ptr < next &&
-              (*ecode == OP_ALT || *next == OP_ALT))
-            rrc = MATCH_NOMATCH;
-          }
-
-        if (rrc != MATCH_NOMATCH) RRETURN(rrc);
-        md->capture_last = save_capture_last;
-        ecode += GET(ecode, 1);
-        if (*ecode != OP_ALT) break;
-        }
-
-      if (!matched_once)
-        {
-        md->offset_vector[offset] = save_offset1;
-        md->offset_vector[offset+1] = save_offset2;
-        md->offset_vector[md->offset_end - number] = save_offset3;
-        }
-
-      if (allow_zero || matched_once)
-        {
-        ecode += 1 + LINK_SIZE;
-        break;
-        }
-
-      RRETURN(MATCH_NOMATCH);
-      }
-
-    /* FALL THROUGH ... Insufficient room for saving captured contents. Treat
-    as a non-capturing bracket. */
-
-    /* VVVVVVVVVVVVVVVVVVVVVVVVV */
-    /* VVVVVVVVVVVVVVVVVVVVVVVVV */
-
-    DPRINTF(("insufficient capture room: treat as non-capturing\n"));
-
-    /* VVVVVVVVVVVVVVVVVVVVVVVVV */
-    /* VVVVVVVVVVVVVVVVVVVVVVVVV */
-
-    /* Non-capturing possessive bracket with unlimited repeat. We come here
-    from BRAZERO with allow_zero = TRUE. The code is similar to the above,
-    without the capturing complication. It is written out separately for speed
-    and cleanliness. */
-
-    case OP_BRAPOS:
-    case OP_SBRAPOS:
-    allow_zero = FALSE;
-
-    POSSESSIVE_NON_CAPTURE:
-    matched_once = FALSE;
-    code_offset = (int)(ecode - md->start_code);
-    save_capture_last = md->capture_last;
-
-    for (;;)
-      {
-      if (op >= OP_SBRA) md->match_function_type = MATCH_CBEGROUP;
-      RMATCH(eptr, ecode + PRIV(OP_lengths)[*ecode], offset_top, md,
-        eptrb, RM48);
-      if (rrc == MATCH_KETRPOS)
-        {
-        offset_top = md->end_offset_top;
-        eptr = md->end_match_ptr;
-        ecode = md->start_code + code_offset;
-        matched_once = TRUE;
-        mstart = md->start_match_ptr;   /* In case \K reset it */
-        continue;
-        }
-
-      /* See comment in the code for capturing groups above about handling
-      THEN. */
-
-      if (rrc == MATCH_THEN)
-        {
-        next = ecode + GET(ecode,1);
-        if (md->start_match_ptr < next &&
-            (*ecode == OP_ALT || *next == OP_ALT))
-          rrc = MATCH_NOMATCH;
-        }
-
-      if (rrc != MATCH_NOMATCH) RRETURN(rrc);
-      ecode += GET(ecode, 1);
-      if (*ecode != OP_ALT) break;
-      md->capture_last = save_capture_last;
-      }
-
-    if (matched_once || allow_zero)
-      {
-      ecode += 1 + LINK_SIZE;
-      break;
-      }
-    RRETURN(MATCH_NOMATCH);
-
-    /* Control never reaches here. */
-
-    /* Conditional group: compilation checked that there are no more than two
-    branches. If the condition is false, skipping the first branch takes us
-    past the end of the item if there is only one branch, but that's exactly
-    what we want. */
-
-    case OP_COND:
-    case OP_SCOND:
-
-    /* The variable codelink will be added to ecode when the condition is
-    false, to get to the second branch. Setting it to the offset to the ALT
-    or KET, then incrementing ecode achieves this effect. We now have ecode
-    pointing to the condition or callout. */
-
-    codelink = GET(ecode, 1);   /* Offset to the second branch */
-    ecode += 1 + LINK_SIZE;     /* From this opcode */
-
-    /* Because of the way auto-callout works during compile, a callout item is
-    inserted between OP_COND and an assertion condition. */
-
-    if (*ecode == OP_CALLOUT)
-      {
-      if (PUBL(callout) != NULL)
-        {
-        PUBL(callout_block) cb;
-        cb.version          = 2;   /* Version 1 of the callout block */
-        cb.callout_number   = ecode[1];
-        cb.offset_vector    = md->offset_vector;
-#if defined COMPILE_PCRE8
-        cb.subject          = (PCRE_SPTR)md->start_subject;
-#elif defined COMPILE_PCRE16
-        cb.subject          = (PCRE_SPTR16)md->start_subject;
-#elif defined COMPILE_PCRE32
-        cb.subject          = (PCRE_SPTR32)md->start_subject;
-#endif
-        cb.subject_length   = (int)(md->end_subject - md->start_subject);
-        cb.start_match      = (int)(mstart - md->start_subject);
-        cb.current_position = (int)(eptr - md->start_subject);
-        cb.pattern_position = GET(ecode, 2);
-        cb.next_item_length = GET(ecode, 2 + LINK_SIZE);
-        cb.capture_top      = offset_top/2;
-        cb.capture_last     = md->capture_last & CAPLMASK;
-        /* Internal change requires this for API compatibility. */
-        if (cb.capture_last == 0) cb.capture_last = -1;
-        cb.callout_data     = md->callout_data;
-        cb.mark             = md->nomatch_mark;
-        if ((rrc = (*PUBL(callout))(&cb)) > 0) RRETURN(MATCH_NOMATCH);
-        if (rrc < 0) RRETURN(rrc);
-        }
-
-      /* Advance ecode past the callout, so it now points to the condition. We
-      must adjust codelink so that the value of ecode+codelink is unchanged. */
-
-      ecode += PRIV(OP_lengths)[OP_CALLOUT];
-      codelink -= PRIV(OP_lengths)[OP_CALLOUT];
-      }
-
-    /* Test the various possible conditions */
-
-    condition = FALSE;
-    switch(condcode = *ecode)
-      {
-      case OP_RREF:         /* Numbered group recursion test */
-      if (md->recursive != NULL)     /* Not recursing => FALSE */
-        {
-        unsigned int recno = GET2(ecode, 1);   /* Recursion group number*/
-        condition = (recno == RREF_ANY || recno == md->recursive->group_num);
-        }
-      break;
-
-      case OP_DNRREF:       /* Duplicate named group recursion test */
-      if (md->recursive != NULL)
-        {
-        int count = GET2(ecode, 1 + IMM2_SIZE);
-        pcre_uchar *slot = md->name_table + GET2(ecode, 1) * md->name_entry_size;
-        while (count-- > 0)
-          {
-          unsigned int recno = GET2(slot, 0);
-          condition = recno == md->recursive->group_num;
-          if (condition) break;
-          slot += md->name_entry_size;
-          }
-        }
-      break;
-
-      case OP_CREF:         /* Numbered group used test */
-      offset = GET2(ecode, 1) << 1;  /* Doubled ref number */
-      condition = offset < offset_top && md->offset_vector[offset] >= 0;
-      break;
-
-      case OP_DNCREF:      /* Duplicate named group used test */
-        {
-        int count = GET2(ecode, 1 + IMM2_SIZE);
-        pcre_uchar *slot = md->name_table + GET2(ecode, 1) * md->name_entry_size;
-        while (count-- > 0)
-          {
-          offset = GET2(slot, 0) << 1;
-          condition = offset < offset_top && md->offset_vector[offset] >= 0;
-          if (condition) break;
-          slot += md->name_entry_size;
-          }
-        }
-      break;
-
-      case OP_DEF:     /* DEFINE - always false */
-      break;
-
-      /* The condition is an assertion. Call match() to evaluate it - setting
-      md->match_function_type to MATCH_CONDASSERT causes it to stop at the end
-      of an assertion. */
-
-      default:
-      md->match_function_type = MATCH_CONDASSERT;
-      RMATCH(eptr, ecode, offset_top, md, NULL, RM3);
-      if (rrc == MATCH_MATCH)
-        {
-        if (md->end_offset_top > offset_top)
-          offset_top = md->end_offset_top;  /* Captures may have happened */
-        condition = TRUE;
-
-        /* Advance ecode past the assertion to the start of the first branch,
-        but adjust it so that the general choosing code below works. */
-
-        ecode += GET(ecode, 1);
-        while (*ecode == OP_ALT) ecode += GET(ecode, 1);
-        ecode += 1 + LINK_SIZE - PRIV(OP_lengths)[condcode];
-        }
-
-      /* PCRE doesn't allow the effect of (*THEN) to escape beyond an
-      assertion; it is therefore treated as NOMATCH. Any other return is an
-      error. */
-
-      else if (rrc != MATCH_NOMATCH && rrc != MATCH_THEN)
-        {
-        RRETURN(rrc);         /* Need braces because of following else */
-        }
-      break;
-      }
-
-    /* Choose branch according to the condition */
-
-    ecode += condition? PRIV(OP_lengths)[condcode] : codelink;
-
-    /* We are now at the branch that is to be obeyed. As there is only one, we
-    can use tail recursion to avoid using another stack frame, except when
-    there is unlimited repeat of a possibly empty group. In the latter case, a
-    recursive call to match() is always required, unless the second alternative
-    doesn't exist, in which case we can just plough on. Note that, for
-    compatibility with Perl, the | in a conditional group is NOT treated as
-    creating two alternatives. If a THEN is encountered in the branch, it
-    propagates out to the enclosing alternative (unless nested in a deeper set
-    of alternatives, of course). */
-
-    if (condition || ecode[-(1+LINK_SIZE)] == OP_ALT)
-      {
-      if (op != OP_SCOND)
-        {
-        goto TAIL_RECURSE;
-        }
-
-      md->match_function_type = MATCH_CBEGROUP;
-      RMATCH(eptr, ecode, offset_top, md, eptrb, RM49);
-      RRETURN(rrc);
-      }
-
-     /* Condition false & no alternative; continue after the group. */
-
-    else
-      {
-      }
-    break;
-
-
-    /* Before OP_ACCEPT there may be any number of OP_CLOSE opcodes,
-    to close any currently open capturing brackets. */
-
-    case OP_CLOSE:
-    number = GET2(ecode, 1);   /* Must be less than 65536 */
-    offset = number << 1;
-
-#ifdef PCRE_DEBUG
-      printf("end bracket %d at *ACCEPT", number);
-      printf("\n");
-#endif
-
-    md->capture_last = (md->capture_last & OVFLMASK) | number;
-    if (offset >= md->offset_max) md->capture_last |= OVFLBIT; else
-      {
-      md->offset_vector[offset] =
-        md->offset_vector[md->offset_end - number];
-      md->offset_vector[offset+1] = (int)(eptr - md->start_subject);
-      if (offset_top <= offset) offset_top = offset + 2;
-      }
-    ecode += 1 + IMM2_SIZE;
-    break;
-
-
-    /* End of the pattern, either real or forced. */
-
-    case OP_END:
-    case OP_ACCEPT:
-    case OP_ASSERT_ACCEPT:
-
-    /* If we have matched an empty string, fail if not in an assertion and not
-    in a recursion if either PCRE_NOTEMPTY is set, or if PCRE_NOTEMPTY_ATSTART
-    is set and we have matched at the start of the subject. In both cases,
-    backtracking will then try other alternatives, if any. */
-
-    if (eptr == mstart && op != OP_ASSERT_ACCEPT &&
-         md->recursive == NULL &&
-         (md->notempty ||
-           (md->notempty_atstart &&
-             mstart == md->start_subject + md->start_offset)))
-      RRETURN(MATCH_NOMATCH);
-
-    /* Otherwise, we have a match. */
-
-    md->end_match_ptr = eptr;           /* Record where we ended */
-    md->end_offset_top = offset_top;    /* and how many extracts were taken */
-    md->start_match_ptr = mstart;       /* and the start (\K can modify) */
-
-    /* For some reason, the macros don't work properly if an expression is
-    given as the argument to RRETURN when the heap is in use. */
-
-    rrc = (op == OP_END)? MATCH_MATCH : MATCH_ACCEPT;
-    RRETURN(rrc);
-
-    /* Assertion brackets. Check the alternative branches in turn - the
-    matching won't pass the KET for an assertion. If any one branch matches,
-    the assertion is true. Lookbehind assertions have an OP_REVERSE item at the
-    start of each branch to move the current point backwards, so the code at
-    this level is identical to the lookahead case. When the assertion is part
-    of a condition, we want to return immediately afterwards. The caller of
-    this incarnation of the match() function will have set MATCH_CONDASSERT in
-    md->match_function type, and one of these opcodes will be the first opcode
-    that is processed. We use a local variable that is preserved over calls to
-    match() to remember this case. */
-
-    case OP_ASSERT:
-    case OP_ASSERTBACK:
-    save_mark = md->mark;
-    if (md->match_function_type == MATCH_CONDASSERT)
-      {
-      condassert = TRUE;
-      md->match_function_type = 0;
-      }
-    else condassert = FALSE;
-
-    /* Loop for each branch */
-
-    do
-      {
-      RMATCH(eptr, ecode + 1 + LINK_SIZE, offset_top, md, NULL, RM4);
-
-      /* A match means that the assertion is true; break out of the loop
-      that matches its alternatives. */
-
-      if (rrc == MATCH_MATCH || rrc == MATCH_ACCEPT)
-        {
-        mstart = md->start_match_ptr;   /* In case \K reset it */
-        break;
-        }
-
-      /* If not matched, restore the previous mark setting. */
-
-      md->mark = save_mark;
-
-      /* See comment in the code for capturing groups above about handling
-      THEN. */
-
-      if (rrc == MATCH_THEN)
-        {
-        next = ecode + GET(ecode,1);
-        if (md->start_match_ptr < next &&
-            (*ecode == OP_ALT || *next == OP_ALT))
-          rrc = MATCH_NOMATCH;
-        }
-
-      /* Anything other than NOMATCH causes the entire assertion to fail,
-      passing back the return code. This includes COMMIT, SKIP, PRUNE and an
-      uncaptured THEN, which means they take their normal effect. This
-      consistent approach does not always have exactly the same effect as in
-      Perl. */
-
-      if (rrc != MATCH_NOMATCH) RRETURN(rrc);
-      ecode += GET(ecode, 1);
-      }
-    while (*ecode == OP_ALT);   /* Continue for next alternative */
-
-    /* If we have tried all the alternative branches, the assertion has
-    failed. If not, we broke out after a match. */
-
-    if (*ecode == OP_KET) RRETURN(MATCH_NOMATCH);
-
-    /* If checking an assertion for a condition, return MATCH_MATCH. */
-
-    if (condassert) RRETURN(MATCH_MATCH);
-
-    /* Continue from after a successful assertion, updating the offsets high
-    water mark, since extracts may have been taken during the assertion. */
-
-    do ecode += GET(ecode,1); while (*ecode == OP_ALT);
-    ecode += 1 + LINK_SIZE;
-    offset_top = md->end_offset_top;
-    continue;
-
-    /* Negative assertion: all branches must fail to match for the assertion to
-    succeed. */
-
-    case OP_ASSERT_NOT:
-    case OP_ASSERTBACK_NOT:
-    save_mark = md->mark;
-    if (md->match_function_type == MATCH_CONDASSERT)
-      {
-      condassert = TRUE;
-      md->match_function_type = 0;
-      }
-    else condassert = FALSE;
-
-    /* Loop for each alternative branch. */
-
-    do
-      {
-      RMATCH(eptr, ecode + 1 + LINK_SIZE, offset_top, md, NULL, RM5);
-      md->mark = save_mark;   /* Always restore the mark setting */
-
-      switch(rrc)
-        {
-        case MATCH_MATCH:            /* A successful match means */
-        case MATCH_ACCEPT:           /* the assertion has failed. */
-        RRETURN(MATCH_NOMATCH);
-
-        case MATCH_NOMATCH:          /* Carry on with next branch */
-        break;
-
-        /* See comment in the code for capturing groups above about handling
-        THEN. */
-
-        case MATCH_THEN:
-        next = ecode + GET(ecode,1);
-        if (md->start_match_ptr < next &&
-            (*ecode == OP_ALT || *next == OP_ALT))
-          {
-          rrc = MATCH_NOMATCH;
-          break;
-          }
-        /* Otherwise fall through. */
-
-        /* COMMIT, SKIP, PRUNE, and an uncaptured THEN cause the whole
-        assertion to fail to match, without considering any more alternatives.
-        Failing to match means the assertion is true. This is a consistent
-        approach, but does not always have the same effect as in Perl. */
-
-        case MATCH_COMMIT:
-        case MATCH_SKIP:
-        case MATCH_SKIP_ARG:
-        case MATCH_PRUNE:
-        do ecode += GET(ecode,1); while (*ecode == OP_ALT);
-        goto NEG_ASSERT_TRUE;   /* Break out of alternation loop */
-
-        /* Anything else is an error */
-
-        default:
-        RRETURN(rrc);
-        }
-
-      /* Continue with next branch */
-
-      ecode += GET(ecode,1);
-      }
-    while (*ecode == OP_ALT);
-
-    /* All branches in the assertion failed to match. */
-
-    NEG_ASSERT_TRUE:
-    if (condassert) RRETURN(MATCH_MATCH);  /* Condition assertion */
-    ecode += 1 + LINK_SIZE;                /* Continue with current branch */
-    continue;
-
-    /* Move the subject pointer back. This occurs only at the start of
-    each branch of a lookbehind assertion. If we are too close to the start to
-    move back, this match function fails. When working with UTF-8 we move
-    back a number of characters, not bytes. */
-
-    case OP_REVERSE:
-#ifdef SUPPORT_UTF
-    if (utf)
-      {
-      i = GET(ecode, 1);
-      while (i-- > 0)
-        {
-        eptr--;
-        if (eptr < md->start_subject) RRETURN(MATCH_NOMATCH);
-        BACKCHAR(eptr);
-        }
-      }
-    else
-#endif
-
-    /* No UTF-8 support, or not in UTF-8 mode: count is byte count */
-
-      {
-      eptr -= GET(ecode, 1);
-      if (eptr < md->start_subject) RRETURN(MATCH_NOMATCH);
-      }
-
-    /* Save the earliest consulted character, then skip to next op code */
-
-    if (eptr < md->start_used_ptr) md->start_used_ptr = eptr;
-    ecode += 1 + LINK_SIZE;
-    break;
-
-    /* The callout item calls an external function, if one is provided, passing
-    details of the match so far. This is mainly for debugging, though the
-    function is able to force a failure. */
-
-    case OP_CALLOUT:
-    if (PUBL(callout) != NULL)
-      {
-      PUBL(callout_block) cb;
-      cb.version          = 2;   /* Version 1 of the callout block */
-      cb.callout_number   = ecode[1];
-      cb.offset_vector    = md->offset_vector;
-#if defined COMPILE_PCRE8
-      cb.subject          = (PCRE_SPTR)md->start_subject;
-#elif defined COMPILE_PCRE16
-      cb.subject          = (PCRE_SPTR16)md->start_subject;
-#elif defined COMPILE_PCRE32
-      cb.subject          = (PCRE_SPTR32)md->start_subject;
-#endif
-      cb.subject_length   = (int)(md->end_subject - md->start_subject);
-      cb.start_match      = (int)(mstart - md->start_subject);
-      cb.current_position = (int)(eptr - md->start_subject);
-      cb.pattern_position = GET(ecode, 2);
-      cb.next_item_length = GET(ecode, 2 + LINK_SIZE);
-      cb.capture_top      = offset_top/2;
-      cb.capture_last     = md->capture_last & CAPLMASK;
-      /* Internal change requires this for API compatibility. */
-      if (cb.capture_last == 0) cb.capture_last = -1;
-      cb.callout_data     = md->callout_data;
-      cb.mark             = md->nomatch_mark;
-      if ((rrc = (*PUBL(callout))(&cb)) > 0) RRETURN(MATCH_NOMATCH);
-      if (rrc < 0) RRETURN(rrc);
-      }
-    ecode += 2 + 2*LINK_SIZE;
-    break;
-
-    /* Recursion either matches the current regex, or some subexpression. The
-    offset data is the offset to the starting bracket from the start of the
-    whole pattern. (This is so that it works from duplicated subpatterns.)
-
-    The state of the capturing groups is preserved over recursion, and
-    re-instated afterwards. We don't know how many are started and not yet
-    finished (offset_top records the completed total) so we just have to save
-    all the potential data. There may be up to 65535 such values, which is too
-    large to put on the stack, but using malloc for small numbers seems
-    expensive. As a compromise, the stack is used when there are no more than
-    REC_STACK_SAVE_MAX values to store; otherwise malloc is used.
-
-    There are also other values that have to be saved. We use a chained
-    sequence of blocks that actually live on the stack. Thanks to Robin Houston
-    for the original version of this logic. It has, however, been hacked around
-    a lot, so he is not to blame for the current way it works. */
-
-    case OP_RECURSE:
-      {
-      recursion_info *ri;
-      unsigned int recno;
-
-      callpat = md->start_code + GET(ecode, 1);
-      recno = (callpat == md->start_code)? 0 :
-        GET2(callpat, 1 + LINK_SIZE);
-
-      /* Check for repeating a recursion without advancing the subject pointer.
-      This should catch convoluted mutual recursions. (Some simple cases are
-      caught at compile time.) */
-
-      for (ri = md->recursive; ri != NULL; ri = ri->prevrec)
-        if (recno == ri->group_num && eptr == ri->subject_position)
-          RRETURN(PCRE_ERROR_RECURSELOOP);
-
-      /* Add to "recursing stack" */
-
-      new_recursive.group_num = recno;
-      new_recursive.saved_capture_last = md->capture_last;
-      new_recursive.subject_position = eptr;
-      new_recursive.prevrec = md->recursive;
-      md->recursive = &new_recursive;
-
-      /* Where to continue from afterwards */
-
-      ecode += 1 + LINK_SIZE;
-
-      /* Now save the offset data */
-
-      new_recursive.saved_max = md->offset_end;
-      if (new_recursive.saved_max <= REC_STACK_SAVE_MAX)
-        new_recursive.offset_save = stacksave;
-      else
-        {
-        new_recursive.offset_save =
-          (int *)(PUBL(malloc))(new_recursive.saved_max * sizeof(int));
-        if (new_recursive.offset_save == NULL) RRETURN(PCRE_ERROR_NOMEMORY);
-        }
-      memcpy(new_recursive.offset_save, md->offset_vector,
-            new_recursive.saved_max * sizeof(int));
-
-      /* OK, now we can do the recursion. After processing each alternative,
-      restore the offset data and the last captured value. If there were nested
-      recursions, md->recursive might be changed, so reset it before looping.
-      */
-
-      DPRINTF(("Recursing into group %d\n", new_recursive.group_num));
-      cbegroup = (*callpat >= OP_SBRA);
-      do
-        {
-        if (cbegroup) md->match_function_type = MATCH_CBEGROUP;
-        RMATCH(eptr, callpat + PRIV(OP_lengths)[*callpat], offset_top,
-          md, eptrb, RM6);
-        memcpy(md->offset_vector, new_recursive.offset_save,
-            new_recursive.saved_max * sizeof(int));
-        md->capture_last = new_recursive.saved_capture_last;
-        md->recursive = new_recursive.prevrec;
-        if (rrc == MATCH_MATCH || rrc == MATCH_ACCEPT)
-          {
-          DPRINTF(("Recursion matched\n"));
-          if (new_recursive.offset_save != stacksave)
-            (PUBL(free))(new_recursive.offset_save);
-
-          /* Set where we got to in the subject, and reset the start in case
-          it was changed by \K. This *is* propagated back out of a recursion,
-          for Perl compatibility. */
-
-          eptr = md->end_match_ptr;
-          mstart = md->start_match_ptr;
-          goto RECURSION_MATCHED;        /* Exit loop; end processing */
-          }
-
-        /* PCRE does not allow THEN, SKIP, PRUNE or COMMIT to escape beyond a
-        recursion; they cause a NOMATCH for the entire recursion. These codes
-        are defined in a range that can be tested for. */
-
-        if (rrc >= MATCH_BACKTRACK_MIN && rrc <= MATCH_BACKTRACK_MAX)
-          RRETURN(MATCH_NOMATCH);
-
-        /* Any return code other than NOMATCH is an error. */
-
-        if (rrc != MATCH_NOMATCH)
-          {
-          DPRINTF(("Recursion gave error %d\n", rrc));
-          if (new_recursive.offset_save != stacksave)
-            (PUBL(free))(new_recursive.offset_save);
-          RRETURN(rrc);
-          }
-
-        md->recursive = &new_recursive;
-        callpat += GET(callpat, 1);
-        }
-      while (*callpat == OP_ALT);
-
-      DPRINTF(("Recursion didn't match\n"));
-      md->recursive = new_recursive.prevrec;
-      if (new_recursive.offset_save != stacksave)
-        (PUBL(free))(new_recursive.offset_save);
-      RRETURN(MATCH_NOMATCH);
-      }
-
-    RECURSION_MATCHED:
-    break;
-
-    /* An alternation is the end of a branch; scan along to find the end of the
-    bracketed group and go to there. */
-
-    case OP_ALT:
-    do ecode += GET(ecode,1); while (*ecode == OP_ALT);
-    break;
-
-    /* BRAZERO, BRAMINZERO and SKIPZERO occur just before a bracket group,
-    indicating that it may occur zero times. It may repeat infinitely, or not
-    at all - i.e. it could be ()* or ()? or even (){0} in the pattern. Brackets
-    with fixed upper repeat limits are compiled as a number of copies, with the
-    optional ones preceded by BRAZERO or BRAMINZERO. */
-
-    case OP_BRAZERO:
-    next = ecode + 1;
-    RMATCH(eptr, next, offset_top, md, eptrb, RM10);
-    if (rrc != MATCH_NOMATCH) RRETURN(rrc);
-    do next += GET(next, 1); while (*next == OP_ALT);
-    ecode = next + 1 + LINK_SIZE;
-    break;
-
-    case OP_BRAMINZERO:
-    next = ecode + 1;
-    do next += GET(next, 1); while (*next == OP_ALT);
-    RMATCH(eptr, next + 1+LINK_SIZE, offset_top, md, eptrb, RM11);
-    if (rrc != MATCH_NOMATCH) RRETURN(rrc);
-    ecode++;
-    break;
-
-    case OP_SKIPZERO:
-    next = ecode+1;
-    do next += GET(next,1); while (*next == OP_ALT);
-    ecode = next + 1 + LINK_SIZE;
-    break;
-
-    /* BRAPOSZERO occurs before a possessive bracket group. Don't do anything
-    here; just jump to the group, with allow_zero set TRUE. */
-
-    case OP_BRAPOSZERO:
-    op = *(++ecode);
-    allow_zero = TRUE;
-    if (op == OP_CBRAPOS || op == OP_SCBRAPOS) goto POSSESSIVE_CAPTURE;
-      goto POSSESSIVE_NON_CAPTURE;
-
-    /* End of a group, repeated or non-repeating. */
-
-    case OP_KET:
-    case OP_KETRMIN:
-    case OP_KETRMAX:
-    case OP_KETRPOS:
-    prev = ecode - GET(ecode, 1);
-
-    /* If this was a group that remembered the subject start, in order to break
-    infinite repeats of empty string matches, retrieve the subject start from
-    the chain. Otherwise, set it NULL. */
-
-    if (*prev >= OP_SBRA || *prev == OP_ONCE)
-      {
-      saved_eptr = eptrb->epb_saved_eptr;   /* Value at start of group */
-      eptrb = eptrb->epb_prev;              /* Backup to previous group */
-      }
-    else saved_eptr = NULL;
-
-    /* If we are at the end of an assertion group or a non-capturing atomic
-    group, stop matching and return MATCH_MATCH, but record the current high
-    water mark for use by positive assertions. We also need to record the match
-    start in case it was changed by \K. */
-
-    if ((*prev >= OP_ASSERT && *prev <= OP_ASSERTBACK_NOT) ||
-         *prev == OP_ONCE_NC)
-      {
-      md->end_match_ptr = eptr;      /* For ONCE_NC */
-      md->end_offset_top = offset_top;
-      md->start_match_ptr = mstart;
-      RRETURN(MATCH_MATCH);         /* Sets md->mark */
-      }
-
-    /* For capturing groups we have to check the group number back at the start
-    and if necessary complete handling an extraction by setting the offsets and
-    bumping the high water mark. Whole-pattern recursion is coded as a recurse
-    into group 0, so it won't be picked up here. Instead, we catch it when the
-    OP_END is reached. Other recursion is handled here. We just have to record
-    the current subject position and start match pointer and give a MATCH
-    return. */
-
-    if (*prev == OP_CBRA || *prev == OP_SCBRA ||
-        *prev == OP_CBRAPOS || *prev == OP_SCBRAPOS)
-      {
-      number = GET2(prev, 1+LINK_SIZE);
-      offset = number << 1;
-
-#ifdef PCRE_DEBUG
-      printf("end bracket %d", number);
-      printf("\n");
-#endif
-
-      /* Handle a recursively called group. */
-
-      if (md->recursive != NULL && md->recursive->group_num == number)
-        {
-        md->end_match_ptr = eptr;
-        md->start_match_ptr = mstart;
-        RRETURN(MATCH_MATCH);
-        }
-
-      /* Deal with capturing */
-
-      md->capture_last = (md->capture_last & OVFLMASK) | number;
-      if (offset >= md->offset_max) md->capture_last |= OVFLBIT; else
-        {
-        /* If offset is greater than offset_top, it means that we are
-        "skipping" a capturing group, and that group's offsets must be marked
-        unset. In earlier versions of PCRE, all the offsets were unset at the
-        start of matching, but this doesn't work because atomic groups and
-        assertions can cause a value to be set that should later be unset.
-        Example: matching /(?>(a))b|(a)c/ against "ac". This sets group 1 as
-        part of the atomic group, but this is not on the final matching path,
-        so must be unset when 2 is set. (If there is no group 2, there is no
-        problem, because offset_top will then be 2, indicating no capture.) */
-
-        if (offset > offset_top)
-          {
-          register int *iptr = md->offset_vector + offset_top;
-          register int *iend = md->offset_vector + offset;
-          while (iptr < iend) *iptr++ = -1;
-          }
-
-        /* Now make the extraction */
-
-        md->offset_vector[offset] =
-          md->offset_vector[md->offset_end - number];
-        md->offset_vector[offset+1] = (int)(eptr - md->start_subject);
-        if (offset_top <= offset) offset_top = offset + 2;
-        }
-      }
-
-    /* For an ordinary non-repeating ket, just continue at this level. This
-    also happens for a repeating ket if no characters were matched in the
-    group. This is the forcible breaking of infinite loops as implemented in
-    Perl 5.005. For a non-repeating atomic group that includes captures,
-    establish a backup point by processing the rest of the pattern at a lower
-    level. If this results in a NOMATCH return, pass MATCH_ONCE back to the
-    original OP_ONCE level, thereby bypassing intermediate backup points, but
-    resetting any captures that happened along the way. */
-
-    if (*ecode == OP_KET || eptr == saved_eptr)
-      {
-      if (*prev == OP_ONCE)
-        {
-        RMATCH(eptr, ecode + 1 + LINK_SIZE, offset_top, md, eptrb, RM12);
-        if (rrc != MATCH_NOMATCH) RRETURN(rrc);
-        md->once_target = prev;  /* Level at which to change to MATCH_NOMATCH */
-        RRETURN(MATCH_ONCE);
-        }
-      ecode += 1 + LINK_SIZE;    /* Carry on at this level */
-      break;
-      }
-
-    /* OP_KETRPOS is a possessive repeating ket. Remember the current position,
-    and return the MATCH_KETRPOS. This makes it possible to do the repeats one
-    at a time from the outer level, thus saving stack. */
-
-    if (*ecode == OP_KETRPOS)
-      {
-      md->start_match_ptr = mstart;    /* In case \K reset it */
-      md->end_match_ptr = eptr;
-      md->end_offset_top = offset_top;
-      RRETURN(MATCH_KETRPOS);
-      }
-
-    /* The normal repeating kets try the rest of the pattern or restart from
-    the preceding bracket, in the appropriate order. In the second case, we can
-    use tail recursion to avoid using another stack frame, unless we have an
-    an atomic group or an unlimited repeat of a group that can match an empty
-    string. */
-
-    if (*ecode == OP_KETRMIN)
-      {
-      RMATCH(eptr, ecode + 1 + LINK_SIZE, offset_top, md, eptrb, RM7);
-      if (rrc != MATCH_NOMATCH) RRETURN(rrc);
-      if (*prev == OP_ONCE)
-        {
-        RMATCH(eptr, prev, offset_top, md, eptrb, RM8);
-        if (rrc != MATCH_NOMATCH) RRETURN(rrc);
-        md->once_target = prev;  /* Level at which to change to MATCH_NOMATCH */
-        RRETURN(MATCH_ONCE);
-        }
-      if (*prev >= OP_SBRA)    /* Could match an empty string */
-        {
-        RMATCH(eptr, prev, offset_top, md, eptrb, RM50);
-        RRETURN(rrc);
-        }
-      ecode = prev;
-      goto TAIL_RECURSE;
-      }
-    else  /* OP_KETRMAX */
-      {
-      RMATCH(eptr, prev, offset_top, md, eptrb, RM13);
-      if (rrc == MATCH_ONCE && md->once_target == prev) rrc = MATCH_NOMATCH;
-      if (rrc != MATCH_NOMATCH) RRETURN(rrc);
-      if (*prev == OP_ONCE)
-        {
-        RMATCH(eptr, ecode + 1 + LINK_SIZE, offset_top, md, eptrb, RM9);
-        if (rrc != MATCH_NOMATCH) RRETURN(rrc);
-        md->once_target = prev;
-        RRETURN(MATCH_ONCE);
-        }
-      ecode += 1 + LINK_SIZE;
-      goto TAIL_RECURSE;
-      }
-    /* Control never gets here */
-
-    /* Not multiline mode: start of subject assertion, unless notbol. */
-
-    case OP_CIRC:
-    if (md->notbol && eptr == md->start_subject) RRETURN(MATCH_NOMATCH);
-
-    /* Start of subject assertion */
-
-    case OP_SOD:
-    if (eptr != md->start_subject) RRETURN(MATCH_NOMATCH);
-    ecode++;
-    break;
-
-    /* Multiline mode: start of subject unless notbol, or after any newline. */
-
-    case OP_CIRCM:
-    if (md->notbol && eptr == md->start_subject) RRETURN(MATCH_NOMATCH);
-    if (eptr != md->start_subject &&
-        (eptr == md->end_subject || !WAS_NEWLINE(eptr)))
-      RRETURN(MATCH_NOMATCH);
-    ecode++;
-    break;
-
-    /* Start of match assertion */
-
-    case OP_SOM:
-    if (eptr != md->start_subject + md->start_offset) RRETURN(MATCH_NOMATCH);
-    ecode++;
-    break;
-
-    /* Reset the start of match point */
-
-    case OP_SET_SOM:
-    mstart = eptr;
-    ecode++;
-    break;
-
-    /* Multiline mode: assert before any newline, or before end of subject
-    unless noteol is set. */
-
-    case OP_DOLLM:
-    if (eptr < md->end_subject)
-      {
-      if (!IS_NEWLINE(eptr))
-        {
-        if (md->partial != 0 &&
-            eptr + 1 >= md->end_subject &&
-            NLBLOCK->nltype == NLTYPE_FIXED &&
-            NLBLOCK->nllen == 2 &&
-            UCHAR21TEST(eptr) == NLBLOCK->nl[0])
-          {
-          md->hitend = TRUE;
-          if (md->partial > 1) RRETURN(PCRE_ERROR_PARTIAL);
-          }
-        RRETURN(MATCH_NOMATCH);
-        }
-      }
-    else
-      {
-      if (md->noteol) RRETURN(MATCH_NOMATCH);
-      SCHECK_PARTIAL();
-      }
-    ecode++;
-    break;
-
-    /* Not multiline mode: assert before a terminating newline or before end of
-    subject unless noteol is set. */
-
-    case OP_DOLL:
-    if (md->noteol) RRETURN(MATCH_NOMATCH);
-    if (!md->endonly) goto ASSERT_NL_OR_EOS;
-
-    /* ... else fall through for endonly */
-
-    /* End of subject assertion (\z) */
-
-    case OP_EOD:
-    if (eptr < md->end_subject) RRETURN(MATCH_NOMATCH);
-    SCHECK_PARTIAL();
-    ecode++;
-    break;
-
-    /* End of subject or ending \n assertion (\Z) */
-
-    case OP_EODN:
-    ASSERT_NL_OR_EOS:
-    if (eptr < md->end_subject &&
-        (!IS_NEWLINE(eptr) || eptr != md->end_subject - md->nllen))
-      {
-      if (md->partial != 0 &&
-          eptr + 1 >= md->end_subject &&
-          NLBLOCK->nltype == NLTYPE_FIXED &&
-          NLBLOCK->nllen == 2 &&
-          UCHAR21TEST(eptr) == NLBLOCK->nl[0])
-        {
-        md->hitend = TRUE;
-        if (md->partial > 1) RRETURN(PCRE_ERROR_PARTIAL);
-        }
-      RRETURN(MATCH_NOMATCH);
-      }
-
-    /* Either at end of string or \n before end. */
-
-    SCHECK_PARTIAL();
-    ecode++;
-    break;
-
-    /* Word boundary assertions */
-
-    case OP_NOT_WORD_BOUNDARY:
-    case OP_WORD_BOUNDARY:
-      {
-
-      /* Find out if the previous and current characters are "word" characters.
-      It takes a bit more work in UTF-8 mode. Characters > 255 are assumed to
-      be "non-word" characters. Remember the earliest consulted character for
-      partial matching. */
-
-#ifdef SUPPORT_UTF
-      if (utf)
-        {
-        /* Get status of previous character */
-
-        if (eptr == md->start_subject) prev_is_word = FALSE; else
-          {
-          PCRE_PUCHAR lastptr = eptr - 1;
-          BACKCHAR(lastptr);
-          if (lastptr < md->start_used_ptr) md->start_used_ptr = lastptr;
-          GETCHAR(c, lastptr);
-#ifdef SUPPORT_UCP
-          if (md->use_ucp)
-            {
-            if (c == '_') prev_is_word = TRUE; else
-              {
-              int cat = UCD_CATEGORY(c);
-              prev_is_word = (cat == ucp_L || cat == ucp_N);
-              }
-            }
-          else
-#endif
-          prev_is_word = c < 256 && (md->ctypes[c] & ctype_word) != 0;
-          }
-
-        /* Get status of next character */
-
-        if (eptr >= md->end_subject)
-          {
-          SCHECK_PARTIAL();
-          cur_is_word = FALSE;
-          }
-        else
-          {
-          GETCHAR(c, eptr);
-#ifdef SUPPORT_UCP
-          if (md->use_ucp)
-            {
-            if (c == '_') cur_is_word = TRUE; else
-              {
-              int cat = UCD_CATEGORY(c);
-              cur_is_word = (cat == ucp_L || cat == ucp_N);
-              }
-            }
-          else
-#endif
-          cur_is_word = c < 256 && (md->ctypes[c] & ctype_word) != 0;
-          }
-        }
-      else
-#endif
-
-      /* Not in UTF-8 mode, but we may still have PCRE_UCP set, and for
-      consistency with the behaviour of \w we do use it in this case. */
-
-        {
-        /* Get status of previous character */
-
-        if (eptr == md->start_subject) prev_is_word = FALSE; else
-          {
-          if (eptr <= md->start_used_ptr) md->start_used_ptr = eptr - 1;
-#ifdef SUPPORT_UCP
-          if (md->use_ucp)
-            {
-            c = eptr[-1];
-            if (c == '_') prev_is_word = TRUE; else
-              {
-              int cat = UCD_CATEGORY(c);
-              prev_is_word = (cat == ucp_L || cat == ucp_N);
-              }
-            }
-          else
-#endif
-          prev_is_word = MAX_255(eptr[-1])
-            && ((md->ctypes[eptr[-1]] & ctype_word) != 0);
-          }
-
-        /* Get status of next character */
-
-        if (eptr >= md->end_subject)
-          {
-          SCHECK_PARTIAL();
-          cur_is_word = FALSE;
-          }
-        else
-#ifdef SUPPORT_UCP
-        if (md->use_ucp)
-          {
-          c = *eptr;
-          if (c == '_') cur_is_word = TRUE; else
-            {
-            int cat = UCD_CATEGORY(c);
-            cur_is_word = (cat == ucp_L || cat == ucp_N);
-            }
-          }
-        else
-#endif
-        cur_is_word = MAX_255(*eptr)
-          && ((md->ctypes[*eptr] & ctype_word) != 0);
-        }
-
-      /* Now see if the situation is what we want */
-
-      if ((*ecode++ == OP_WORD_BOUNDARY)?
-           cur_is_word == prev_is_word : cur_is_word != prev_is_word)
-        RRETURN(MATCH_NOMATCH);
-      }
-    break;
-
-    /* Match any single character type except newline; have to take care with
-    CRLF newlines and partial matching. */
-
-    case OP_ANY:
-    if (IS_NEWLINE(eptr)) RRETURN(MATCH_NOMATCH);
-    if (md->partial != 0 &&
-        eptr + 1 >= md->end_subject &&
-        NLBLOCK->nltype == NLTYPE_FIXED &&
-        NLBLOCK->nllen == 2 &&
-        UCHAR21TEST(eptr) == NLBLOCK->nl[0])
-      {
-      md->hitend = TRUE;
-      if (md->partial > 1) RRETURN(PCRE_ERROR_PARTIAL);
-      }
-
-    /* Fall through */
-
-    /* Match any single character whatsoever. */
-
-    case OP_ALLANY:
-    if (eptr >= md->end_subject)   /* DO NOT merge the eptr++ here; it must */
-      {                            /* not be updated before SCHECK_PARTIAL. */
-      SCHECK_PARTIAL();
-      RRETURN(MATCH_NOMATCH);
-      }
-    eptr++;
-#ifdef SUPPORT_UTF
-    if (utf) ACROSSCHAR(eptr < md->end_subject, *eptr, eptr++);
-#endif
-    ecode++;
-    break;
-
-    /* Match a single byte, even in UTF-8 mode. This opcode really does match
-    any byte, even newline, independent of the setting of PCRE_DOTALL. */
-
-    case OP_ANYBYTE:
-    if (eptr >= md->end_subject)   /* DO NOT merge the eptr++ here; it must */
-      {                            /* not be updated before SCHECK_PARTIAL. */
-      SCHECK_PARTIAL();
-      RRETURN(MATCH_NOMATCH);
-      }
-    eptr++;
-    ecode++;
-    break;
-
-    case OP_NOT_DIGIT:
-    if (eptr >= md->end_subject)
-      {
-      SCHECK_PARTIAL();
-      RRETURN(MATCH_NOMATCH);
-      }
-    GETCHARINCTEST(c, eptr);
-    if (
-#if defined SUPPORT_UTF || !(defined COMPILE_PCRE8)
-       c < 256 &&
-#endif
-       (md->ctypes[c] & ctype_digit) != 0
-       )
-      RRETURN(MATCH_NOMATCH);
-    ecode++;
-    break;
-
-    case OP_DIGIT:
-    if (eptr >= md->end_subject)
-      {
-      SCHECK_PARTIAL();
-      RRETURN(MATCH_NOMATCH);
-      }
-    GETCHARINCTEST(c, eptr);
-    if (
-#if defined SUPPORT_UTF || !(defined COMPILE_PCRE8)
-       c > 255 ||
-#endif
-       (md->ctypes[c] & ctype_digit) == 0
-       )
-      RRETURN(MATCH_NOMATCH);
-    ecode++;
-    break;
-
-    case OP_NOT_WHITESPACE:
-    if (eptr >= md->end_subject)
-      {
-      SCHECK_PARTIAL();
-      RRETURN(MATCH_NOMATCH);
-      }
-    GETCHARINCTEST(c, eptr);
-    if (
-#if defined SUPPORT_UTF || !(defined COMPILE_PCRE8)
-       c < 256 &&
-#endif
-       (md->ctypes[c] & ctype_space) != 0
-       )
-      RRETURN(MATCH_NOMATCH);
-    ecode++;
-    break;
-
-    case OP_WHITESPACE:
-    if (eptr >= md->end_subject)
-      {
-      SCHECK_PARTIAL();
-      RRETURN(MATCH_NOMATCH);
-      }
-    GETCHARINCTEST(c, eptr);
-    if (
-#if defined SUPPORT_UTF || !(defined COMPILE_PCRE8)
-       c > 255 ||
-#endif
-       (md->ctypes[c] & ctype_space) == 0
-       )
-      RRETURN(MATCH_NOMATCH);
-    ecode++;
-    break;
-
-    case OP_NOT_WORDCHAR:
-    if (eptr >= md->end_subject)
-      {
-      SCHECK_PARTIAL();
-      RRETURN(MATCH_NOMATCH);
-      }
-    GETCHARINCTEST(c, eptr);
-    if (
-#if defined SUPPORT_UTF || !(defined COMPILE_PCRE8)
-       c < 256 &&
-#endif
-       (md->ctypes[c] & ctype_word) != 0
-       )
-      RRETURN(MATCH_NOMATCH);
-    ecode++;
-    break;
-
-    case OP_WORDCHAR:
-    if (eptr >= md->end_subject)
-      {
-      SCHECK_PARTIAL();
-      RRETURN(MATCH_NOMATCH);
-      }
-    GETCHARINCTEST(c, eptr);
-    if (
-#if defined SUPPORT_UTF || !(defined COMPILE_PCRE8)
-       c > 255 ||
-#endif
-       (md->ctypes[c] & ctype_word) == 0
-       )
-      RRETURN(MATCH_NOMATCH);
-    ecode++;
-    break;
-
-    case OP_ANYNL:
-    if (eptr >= md->end_subject)
-      {
-      SCHECK_PARTIAL();
-      RRETURN(MATCH_NOMATCH);
-      }
-    GETCHARINCTEST(c, eptr);
-    switch(c)
-      {
-      default: RRETURN(MATCH_NOMATCH);
-
-      case CHAR_CR:
-      if (eptr >= md->end_subject)
-        {
-        SCHECK_PARTIAL();
-        }
-      else if (UCHAR21TEST(eptr) == CHAR_LF) eptr++;
-      break;
-
-      case CHAR_LF:
-      break;
-
-      case CHAR_VT:
-      case CHAR_FF:
-      case CHAR_NEL:
-#ifndef EBCDIC
-      case 0x2028:
-      case 0x2029:
-#endif  /* Not EBCDIC */
-      if (md->bsr_anycrlf) RRETURN(MATCH_NOMATCH);
-      break;
-      }
-    ecode++;
-    break;
-
-    case OP_NOT_HSPACE:
-    if (eptr >= md->end_subject)
-      {
-      SCHECK_PARTIAL();
-      RRETURN(MATCH_NOMATCH);
-      }
-    GETCHARINCTEST(c, eptr);
-    switch(c)
-      {
-      HSPACE_CASES: RRETURN(MATCH_NOMATCH);  /* Byte and multibyte cases */
-      default: break;
-      }
-    ecode++;
-    break;
-
-    case OP_HSPACE:
-    if (eptr >= md->end_subject)
-      {
-      SCHECK_PARTIAL();
-      RRETURN(MATCH_NOMATCH);
-      }
-    GETCHARINCTEST(c, eptr);
-    switch(c)
-      {
-      HSPACE_CASES: break;  /* Byte and multibyte cases */
-      default: RRETURN(MATCH_NOMATCH);
-      }
-    ecode++;
-    break;
-
-    case OP_NOT_VSPACE:
-    if (eptr >= md->end_subject)
-      {
-      SCHECK_PARTIAL();
-      RRETURN(MATCH_NOMATCH);
-      }
-    GETCHARINCTEST(c, eptr);
-    switch(c)
-      {
-      VSPACE_CASES: RRETURN(MATCH_NOMATCH);
-      default: break;
-      }
-    ecode++;
-    break;
-
-    case OP_VSPACE:
-    if (eptr >= md->end_subject)
-      {
-      SCHECK_PARTIAL();
-      RRETURN(MATCH_NOMATCH);
-      }
-    GETCHARINCTEST(c, eptr);
-    switch(c)
-      {
-      VSPACE_CASES: break;
-      default: RRETURN(MATCH_NOMATCH);
-      }
-    ecode++;
-    break;
-
-#ifdef SUPPORT_UCP
-    /* Check the next character by Unicode property. We will get here only
-    if the support is in the binary; otherwise a compile-time error occurs. */
-
-    case OP_PROP:
-    case OP_NOTPROP:
-    if (eptr >= md->end_subject)
-      {
-      SCHECK_PARTIAL();
-      RRETURN(MATCH_NOMATCH);
-      }
-    GETCHARINCTEST(c, eptr);
-      {
-      const pcre_uint32 *cp;
-      const ucd_record *prop = GET_UCD(c);
-
-      switch(ecode[1])
-        {
-        case PT_ANY:
-        if (op == OP_NOTPROP) RRETURN(MATCH_NOMATCH);
-        break;
-
-        case PT_LAMP:
-        if ((prop->chartype == ucp_Lu ||
-             prop->chartype == ucp_Ll ||
-             prop->chartype == ucp_Lt) == (op == OP_NOTPROP))
-          RRETURN(MATCH_NOMATCH);
-        break;
-
-        case PT_GC:
-        if ((ecode[2] != PRIV(ucp_gentype)[prop->chartype]) == (op == OP_PROP))
-          RRETURN(MATCH_NOMATCH);
-        break;
-
-        case PT_PC:
-        if ((ecode[2] != prop->chartype) == (op == OP_PROP))
-          RRETURN(MATCH_NOMATCH);
-        break;
-
-        case PT_SC:
-        if ((ecode[2] != prop->script) == (op == OP_PROP))
-          RRETURN(MATCH_NOMATCH);
-        break;
-
-        /* These are specials */
-
-        case PT_ALNUM:
-        if ((PRIV(ucp_gentype)[prop->chartype] == ucp_L ||
-             PRIV(ucp_gentype)[prop->chartype] == ucp_N) == (op == OP_NOTPROP))
-          RRETURN(MATCH_NOMATCH);
-        break;
-
-        /* Perl space used to exclude VT, but from Perl 5.18 it is included,
-        which means that Perl space and POSIX space are now identical. PCRE
-        was changed at release 8.34. */
-
-        case PT_SPACE:    /* Perl space */
-        case PT_PXSPACE:  /* POSIX space */
-        switch(c)
-          {
-          HSPACE_CASES:
-          VSPACE_CASES:
-          if (op == OP_NOTPROP) RRETURN(MATCH_NOMATCH);
-          break;
-
-          default:
-          if ((PRIV(ucp_gentype)[prop->chartype] == ucp_Z) ==
-            (op == OP_NOTPROP)) RRETURN(MATCH_NOMATCH);
-          break;
-          }
-        break;
-
-        case PT_WORD:
-        if ((PRIV(ucp_gentype)[prop->chartype] == ucp_L ||
-             PRIV(ucp_gentype)[prop->chartype] == ucp_N ||
-             c == CHAR_UNDERSCORE) == (op == OP_NOTPROP))
-          RRETURN(MATCH_NOMATCH);
-        break;
-
-        case PT_CLIST:
-        cp = PRIV(ucd_caseless_sets) + ecode[2];
-        for (;;)
-          {
-          if (c < *cp)
-            { if (op == OP_PROP) { RRETURN(MATCH_NOMATCH); } else break; }
-          if (c == *cp++)
-            { if (op == OP_PROP) break; else { RRETURN(MATCH_NOMATCH); } }
-          }
-        break;
-
-        case PT_UCNC:
-        if ((c == CHAR_DOLLAR_SIGN || c == CHAR_COMMERCIAL_AT ||
-             c == CHAR_GRAVE_ACCENT || (c >= 0xa0 && c <= 0xd7ff) ||
-             c >= 0xe000) == (op == OP_NOTPROP))
-          RRETURN(MATCH_NOMATCH);
-        break;
-
-        /* This should never occur */
-
-        default:
-        RRETURN(PCRE_ERROR_INTERNAL);
-        }
-
-      ecode += 3;
-      }
-    break;
-
-    /* Match an extended Unicode sequence. We will get here only if the support
-    is in the binary; otherwise a compile-time error occurs. */
-
-    case OP_EXTUNI:
-    if (eptr >= md->end_subject)
-      {
-      SCHECK_PARTIAL();
-      RRETURN(MATCH_NOMATCH);
-      }
-    else
-      {
-      int lgb, rgb;
-      GETCHARINCTEST(c, eptr);
-      lgb = UCD_GRAPHBREAK(c);
-      while (eptr < md->end_subject)
-        {
-        int len = 1;
-        if (!utf) c = *eptr; else { GETCHARLEN(c, eptr, len); }
-        rgb = UCD_GRAPHBREAK(c);
-        if ((PRIV(ucp_gbtable)[lgb] & (1 << rgb)) == 0) break;
-        lgb = rgb;
-        eptr += len;
-        }
-      }
-    CHECK_PARTIAL();
-    ecode++;
-    break;
-#endif  /* SUPPORT_UCP */
-
-
-    /* Match a back reference, possibly repeatedly. Look past the end of the
-    item to see if there is repeat information following. The code is similar
-    to that for character classes, but repeated for efficiency. Then obey
-    similar code to character type repeats - written out again for speed.
-    However, if the referenced string is the empty string, always treat
-    it as matched, any number of times (otherwise there could be infinite
-    loops). If the reference is unset, there are two possibilities:
-
-    (a) In the default, Perl-compatible state, set the length negative;
-    this ensures that every attempt at a match fails. We can't just fail
-    here, because of the possibility of quantifiers with zero minima.
-
-    (b) If the JavaScript compatibility flag is set, set the length to zero
-    so that the back reference matches an empty string.
-
-    Otherwise, set the length to the length of what was matched by the
-    referenced subpattern.
-
-    The OP_REF and OP_REFI opcodes are used for a reference to a numbered group
-    or to a non-duplicated named group. For a duplicated named group, OP_DNREF
-    and OP_DNREFI are used. In this case we must scan the list of groups to
-    which the name refers, and use the first one that is set. */
-
-    case OP_DNREF:
-    case OP_DNREFI:
-    caseless = op == OP_DNREFI;
-      {
-      int count = GET2(ecode, 1+IMM2_SIZE);
-      pcre_uchar *slot = md->name_table + GET2(ecode, 1) * md->name_entry_size;
-      ecode += 1 + 2*IMM2_SIZE;
-
-      /* Setting the default length first and initializing 'offset' avoids
-      compiler warnings in the REF_REPEAT code. */
-
-      length = (md->jscript_compat)? 0 : -1;
-      offset = 0;
-
-      while (count-- > 0)
-        {
-        offset = GET2(slot, 0) << 1;
-        if (offset < offset_top && md->offset_vector[offset] >= 0)
-          {
-          length = md->offset_vector[offset+1] - md->offset_vector[offset];
-          break;
-          }
-        slot += md->name_entry_size;
-        }
-      }
-    goto REF_REPEAT;
-
-    case OP_REF:
-    case OP_REFI:
-    caseless = op == OP_REFI;
-    offset = GET2(ecode, 1) << 1;               /* Doubled ref number */
-    ecode += 1 + IMM2_SIZE;
-    if (offset >= offset_top || md->offset_vector[offset] < 0)
-      length = (md->jscript_compat)? 0 : -1;
-    else
-      length = md->offset_vector[offset+1] - md->offset_vector[offset];
-
-    /* Set up for repetition, or handle the non-repeated case */
-
-    REF_REPEAT:
-    switch (*ecode)
-      {
-      case OP_CRSTAR:
-      case OP_CRMINSTAR:
-      case OP_CRPLUS:
-      case OP_CRMINPLUS:
-      case OP_CRQUERY:
-      case OP_CRMINQUERY:
-      c = *ecode++ - OP_CRSTAR;
-      minimize = (c & 1) != 0;
-      min = rep_min[c];                 /* Pick up values from tables; */
-      max = rep_max[c];                 /* zero for max => infinity */
-      if (max == 0) max = INT_MAX;
-      break;
-
-      case OP_CRRANGE:
-      case OP_CRMINRANGE:
-      minimize = (*ecode == OP_CRMINRANGE);
-      min = GET2(ecode, 1);
-      max = GET2(ecode, 1 + IMM2_SIZE);
-      if (max == 0) max = INT_MAX;
-      ecode += 1 + 2 * IMM2_SIZE;
-      break;
-
-      default:               /* No repeat follows */
-      if ((length = match_ref(offset, eptr, length, md, caseless)) < 0)
-        {
-        if (length == -2) eptr = md->end_subject;   /* Partial match */
-        CHECK_PARTIAL();
-        RRETURN(MATCH_NOMATCH);
-        }
-      eptr += length;
-      continue;              /* With the main loop */
-      }
-
-    /* Handle repeated back references. If the length of the reference is
-    zero, just continue with the main loop. If the length is negative, it
-    means the reference is unset in non-Java-compatible mode. If the minimum is
-    zero, we can continue at the same level without recursion. For any other
-    minimum, carrying on will result in NOMATCH. */
-
-    if (length == 0) continue;
-    if (length < 0 && min == 0) continue;
-
-    /* First, ensure the minimum number of matches are present. We get back
-    the length of the reference string explicitly rather than passing the
-    address of eptr, so that eptr can be a register variable. */
-
-    for (i = 1; i <= min; i++)
-      {
-      int slength;
-      if ((slength = match_ref(offset, eptr, length, md, caseless)) < 0)
-        {
-        if (slength == -2) eptr = md->end_subject;   /* Partial match */
-        CHECK_PARTIAL();
-        RRETURN(MATCH_NOMATCH);
-        }
-      eptr += slength;
-      }
-
-    /* If min = max, continue at the same level without recursion.
-    They are not both allowed to be zero. */
-
-    if (min == max) continue;
-
-    /* If minimizing, keep trying and advancing the pointer */
-
-    if (minimize)
-      {
-      for (fi = min;; fi++)
-        {
-        int slength;
-        RMATCH(eptr, ecode, offset_top, md, eptrb, RM14);
-        if (rrc != MATCH_NOMATCH) RRETURN(rrc);
-        if (fi >= max) RRETURN(MATCH_NOMATCH);
-        if ((slength = match_ref(offset, eptr, length, md, caseless)) < 0)
-          {
-          if (slength == -2) eptr = md->end_subject;   /* Partial match */
-          CHECK_PARTIAL();
-          RRETURN(MATCH_NOMATCH);
-          }
-        eptr += slength;
-        }
-      /* Control never gets here */
-      }
-
-    /* If maximizing, find the longest string and work backwards */
-
-    else
-      {
-      pp = eptr;
-      for (i = min; i < max; i++)
-        {
-        int slength;
-        if ((slength = match_ref(offset, eptr, length, md, caseless)) < 0)
-          {
-          /* Can't use CHECK_PARTIAL because we don't want to update eptr in
-          the soft partial matching case. */
-
-          if (slength == -2 && md->partial != 0 &&
-              md->end_subject > md->start_used_ptr)
-            {
-            md->hitend = TRUE;
-            if (md->partial > 1) RRETURN(PCRE_ERROR_PARTIAL);
-            }
-          break;
-          }
-        eptr += slength;
-        }
-
-      while (eptr >= pp)
-        {
-        RMATCH(eptr, ecode, offset_top, md, eptrb, RM15);
-        if (rrc != MATCH_NOMATCH) RRETURN(rrc);
-        eptr -= length;
-        }
-      RRETURN(MATCH_NOMATCH);
-      }
-    /* Control never gets here */
-
-    /* Match a bit-mapped character class, possibly repeatedly. This op code is
-    used when all the characters in the class have values in the range 0-255,
-    and either the matching is caseful, or the characters are in the range
-    0-127 when UTF-8 processing is enabled. The only difference between
-    OP_CLASS and OP_NCLASS occurs when a data character outside the range is
-    encountered.
-
-    First, look past the end of the item to see if there is repeat information
-    following. Then obey similar code to character type repeats - written out
-    again for speed. */
-
-    case OP_NCLASS:
-    case OP_CLASS:
-      {
-      /* The data variable is saved across frames, so the byte map needs to
-      be stored there. */
-#define BYTE_MAP ((pcre_uint8 *)data)
-      data = ecode + 1;                /* Save for matching */
-      ecode += 1 + (32 / sizeof(pcre_uchar)); /* Advance past the item */
-
-      switch (*ecode)
-        {
-        case OP_CRSTAR:
-        case OP_CRMINSTAR:
-        case OP_CRPLUS:
-        case OP_CRMINPLUS:
-        case OP_CRQUERY:
-        case OP_CRMINQUERY:
-        case OP_CRPOSSTAR:
-        case OP_CRPOSPLUS:
-        case OP_CRPOSQUERY:
-        c = *ecode++ - OP_CRSTAR;
-        if (c < OP_CRPOSSTAR - OP_CRSTAR) minimize = (c & 1) != 0;
-        else possessive = TRUE;
-        min = rep_min[c];                 /* Pick up values from tables; */
-        max = rep_max[c];                 /* zero for max => infinity */
-        if (max == 0) max = INT_MAX;
-        break;
-
-        case OP_CRRANGE:
-        case OP_CRMINRANGE:
-        case OP_CRPOSRANGE:
-        minimize = (*ecode == OP_CRMINRANGE);
-        possessive = (*ecode == OP_CRPOSRANGE);
-        min = GET2(ecode, 1);
-        max = GET2(ecode, 1 + IMM2_SIZE);
-        if (max == 0) max = INT_MAX;
-        ecode += 1 + 2 * IMM2_SIZE;
-        break;
-
-        default:               /* No repeat follows */
-        min = max = 1;
-        break;
-        }
-
-      /* First, ensure the minimum number of matches are present. */
-
-#ifdef SUPPORT_UTF
-      if (utf)
-        {
-        for (i = 1; i <= min; i++)
-          {
-          if (eptr >= md->end_subject)
-            {
-            SCHECK_PARTIAL();
-            RRETURN(MATCH_NOMATCH);
-            }
-          GETCHARINC(c, eptr);
-          if (c > 255)
-            {
-            if (op == OP_CLASS) RRETURN(MATCH_NOMATCH);
-            }
-          else
-            if ((BYTE_MAP[c/8] & (1 << (c&7))) == 0) RRETURN(MATCH_NOMATCH);
-          }
-        }
-      else
-#endif
-      /* Not UTF mode */
-        {
-        for (i = 1; i <= min; i++)
-          {
-          if (eptr >= md->end_subject)
-            {
-            SCHECK_PARTIAL();
-            RRETURN(MATCH_NOMATCH);
-            }
-          c = *eptr++;
-#ifndef COMPILE_PCRE8
-          if (c > 255)
-            {
-            if (op == OP_CLASS) RRETURN(MATCH_NOMATCH);
-            }
-          else
-#endif
-            if ((BYTE_MAP[c/8] & (1 << (c&7))) == 0) RRETURN(MATCH_NOMATCH);
-          }
-        }
-
-      /* If max == min we can continue with the main loop without the
-      need to recurse. */
-
-      if (min == max) continue;
-
-      /* If minimizing, keep testing the rest of the expression and advancing
-      the pointer while it matches the class. */
-
-      if (minimize)
-        {
-#ifdef SUPPORT_UTF
-        if (utf)
-          {
-          for (fi = min;; fi++)
-            {
-            RMATCH(eptr, ecode, offset_top, md, eptrb, RM16);
-            if (rrc != MATCH_NOMATCH) RRETURN(rrc);
-            if (fi >= max) RRETURN(MATCH_NOMATCH);
-            if (eptr >= md->end_subject)
-              {
-              SCHECK_PARTIAL();
-              RRETURN(MATCH_NOMATCH);
-              }
-            GETCHARINC(c, eptr);
-            if (c > 255)
-              {
-              if (op == OP_CLASS) RRETURN(MATCH_NOMATCH);
-              }
-            else
-              if ((BYTE_MAP[c/8] & (1 << (c&7))) == 0) RRETURN(MATCH_NOMATCH);
-            }
-          }
-        else
-#endif
-        /* Not UTF mode */
-          {
-          for (fi = min;; fi++)
-            {
-            RMATCH(eptr, ecode, offset_top, md, eptrb, RM17);
-            if (rrc != MATCH_NOMATCH) RRETURN(rrc);
-            if (fi >= max) RRETURN(MATCH_NOMATCH);
-            if (eptr >= md->end_subject)
-              {
-              SCHECK_PARTIAL();
-              RRETURN(MATCH_NOMATCH);
-              }
-            c = *eptr++;
-#ifndef COMPILE_PCRE8
-            if (c > 255)
-              {
-              if (op == OP_CLASS) RRETURN(MATCH_NOMATCH);
-              }
-            else
-#endif
-              if ((BYTE_MAP[c/8] & (1 << (c&7))) == 0) RRETURN(MATCH_NOMATCH);
-            }
-          }
-        /* Control never gets here */
-        }
-
-      /* If maximizing, find the longest possible run, then work backwards. */
-
-      else
-        {
-        pp = eptr;
-
-#ifdef SUPPORT_UTF
-        if (utf)
-          {
-          for (i = min; i < max; i++)
-            {
-            int len = 1;
-            if (eptr >= md->end_subject)
-              {
-              SCHECK_PARTIAL();
-              break;
-              }
-            GETCHARLEN(c, eptr, len);
-            if (c > 255)
-              {
-              if (op == OP_CLASS) break;
-              }
-            else
-              if ((BYTE_MAP[c/8] & (1 << (c&7))) == 0) break;
-            eptr += len;
-            }
-
-          if (possessive) continue;    /* No backtracking */
-
-          for (;;)
-            {
-            RMATCH(eptr, ecode, offset_top, md, eptrb, RM18);
-            if (rrc != MATCH_NOMATCH) RRETURN(rrc);
-            if (eptr-- == pp) break;        /* Stop if tried at original pos */
-            BACKCHAR(eptr);
-            }
-          }
-        else
-#endif
-          /* Not UTF mode */
-          {
-          for (i = min; i < max; i++)
-            {
-            if (eptr >= md->end_subject)
-              {
-              SCHECK_PARTIAL();
-              break;
-              }
-            c = *eptr;
-#ifndef COMPILE_PCRE8
-            if (c > 255)
-              {
-              if (op == OP_CLASS) break;
-              }
-            else
-#endif
-              if ((BYTE_MAP[c/8] & (1 << (c&7))) == 0) break;
-            eptr++;
-            }
-
-          if (possessive) continue;    /* No backtracking */
-
-          while (eptr >= pp)
-            {
-            RMATCH(eptr, ecode, offset_top, md, eptrb, RM19);
-            if (rrc != MATCH_NOMATCH) RRETURN(rrc);
-            eptr--;
-            }
-          }
-
-        RRETURN(MATCH_NOMATCH);
-        }
-#undef BYTE_MAP
-      }
-    /* Control never gets here */
-
-
-    /* Match an extended character class. In the 8-bit library, this opcode is
-    encountered only when UTF-8 mode mode is supported. In the 16-bit and
-    32-bit libraries, codepoints greater than 255 may be encountered even when
-    UTF is not supported. */
-
-#if defined SUPPORT_UTF || !defined COMPILE_PCRE8
-    case OP_XCLASS:
-      {
-      data = ecode + 1 + LINK_SIZE;                /* Save for matching */
-      ecode += GET(ecode, 1);                      /* Advance past the item */
-
-      switch (*ecode)
-        {
-        case OP_CRSTAR:
-        case OP_CRMINSTAR:
-        case OP_CRPLUS:
-        case OP_CRMINPLUS:
-        case OP_CRQUERY:
-        case OP_CRMINQUERY:
-        case OP_CRPOSSTAR:
-        case OP_CRPOSPLUS:
-        case OP_CRPOSQUERY:
-        c = *ecode++ - OP_CRSTAR;
-        if (c < OP_CRPOSSTAR - OP_CRSTAR) minimize = (c & 1) != 0;
-        else possessive = TRUE;
-        min = rep_min[c];                 /* Pick up values from tables; */
-        max = rep_max[c];                 /* zero for max => infinity */
-        if (max == 0) max = INT_MAX;
-        break;
-
-        case OP_CRRANGE:
-        case OP_CRMINRANGE:
-        case OP_CRPOSRANGE:
-        minimize = (*ecode == OP_CRMINRANGE);
-        possessive = (*ecode == OP_CRPOSRANGE);
-        min = GET2(ecode, 1);
-        max = GET2(ecode, 1 + IMM2_SIZE);
-        if (max == 0) max = INT_MAX;
-        ecode += 1 + 2 * IMM2_SIZE;
-        break;
-
-        default:               /* No repeat follows */
-        min = max = 1;
-        break;
-        }
-
-      /* First, ensure the minimum number of matches are present. */
-
-      for (i = 1; i <= min; i++)
-        {
-        if (eptr >= md->end_subject)
-          {
-          SCHECK_PARTIAL();
-          RRETURN(MATCH_NOMATCH);
-          }
-        GETCHARINCTEST(c, eptr);
-        if (!PRIV(xclass)(c, data, utf)) RRETURN(MATCH_NOMATCH);
-        }
-
-      /* If max == min we can continue with the main loop without the
-      need to recurse. */
-
-      if (min == max) continue;
-
-      /* If minimizing, keep testing the rest of the expression and advancing
-      the pointer while it matches the class. */
-
-      if (minimize)
-        {
-        for (fi = min;; fi++)
-          {
-          RMATCH(eptr, ecode, offset_top, md, eptrb, RM20);
-          if (rrc != MATCH_NOMATCH) RRETURN(rrc);
-          if (fi >= max) RRETURN(MATCH_NOMATCH);
-          if (eptr >= md->end_subject)
-            {
-            SCHECK_PARTIAL();
-            RRETURN(MATCH_NOMATCH);
-            }
-          GETCHARINCTEST(c, eptr);
-          if (!PRIV(xclass)(c, data, utf)) RRETURN(MATCH_NOMATCH);
-          }
-        /* Control never gets here */
-        }
-
-      /* If maximizing, find the longest possible run, then work backwards. */
-
-      else
-        {
-        pp = eptr;
-        for (i = min; i < max; i++)
-          {
-          int len = 1;
-          if (eptr >= md->end_subject)
-            {
-            SCHECK_PARTIAL();
-            break;
-            }
-#ifdef SUPPORT_UTF
-          GETCHARLENTEST(c, eptr, len);
-#else
-          c = *eptr;
-#endif
-          if (!PRIV(xclass)(c, data, utf)) break;
-          eptr += len;
-          }
-
-        if (possessive) continue;    /* No backtracking */
-
-        for(;;)
-          {
-          RMATCH(eptr, ecode, offset_top, md, eptrb, RM21);
-          if (rrc != MATCH_NOMATCH) RRETURN(rrc);
-          if (eptr-- == pp) break;        /* Stop if tried at original pos */
-#ifdef SUPPORT_UTF
-          if (utf) BACKCHAR(eptr);
-#endif
-          }
-        RRETURN(MATCH_NOMATCH);
-        }
-
-      /* Control never gets here */
-      }
-#endif    /* End of XCLASS */
-
-    /* Match a single character, casefully */
-
-    case OP_CHAR:
-#ifdef SUPPORT_UTF
-    if (utf)
-      {
-      length = 1;
-      ecode++;
-      GETCHARLEN(fc, ecode, length);
-      if (length > md->end_subject - eptr)
-        {
-        CHECK_PARTIAL();             /* Not SCHECK_PARTIAL() */
-        RRETURN(MATCH_NOMATCH);
-        }
-      while (length-- > 0) if (*ecode++ != UCHAR21INC(eptr)) RRETURN(MATCH_NOMATCH);
-      }
-    else
-#endif
-    /* Not UTF mode */
-      {
-      if (md->end_subject - eptr < 1)
-        {
-        SCHECK_PARTIAL();            /* This one can use SCHECK_PARTIAL() */
-        RRETURN(MATCH_NOMATCH);
-        }
-      if (ecode[1] != *eptr++) RRETURN(MATCH_NOMATCH);
-      ecode += 2;
-      }
-    break;
-
-    /* Match a single character, caselessly. If we are at the end of the
-    subject, give up immediately. */
-
-    case OP_CHARI:
-    if (eptr >= md->end_subject)
-      {
-      SCHECK_PARTIAL();
-      RRETURN(MATCH_NOMATCH);
-      }
-
-#ifdef SUPPORT_UTF
-    if (utf)
-      {
-      length = 1;
-      ecode++;
-      GETCHARLEN(fc, ecode, length);
-
-      /* If the pattern character's value is < 128, we have only one byte, and
-      we know that its other case must also be one byte long, so we can use the
-      fast lookup table. We know that there is at least one byte left in the
-      subject. */
-
-      if (fc < 128)
-        {
-        pcre_uint32 cc = UCHAR21(eptr);
-        if (md->lcc[fc] != TABLE_GET(cc, md->lcc, cc)) RRETURN(MATCH_NOMATCH);
-        ecode++;
-        eptr++;
-        }
-
-      /* Otherwise we must pick up the subject character. Note that we cannot
-      use the value of "length" to check for sufficient bytes left, because the
-      other case of the character may have more or fewer bytes.  */
-
-      else
-        {
-        pcre_uint32 dc;
-        GETCHARINC(dc, eptr);
-        ecode += length;
-
-        /* If we have Unicode property support, we can use it to test the other
-        case of the character, if there is one. */
-
-        if (fc != dc)
-          {
-#ifdef SUPPORT_UCP
-          if (dc != UCD_OTHERCASE(fc))
-#endif
-            RRETURN(MATCH_NOMATCH);
-          }
-        }
-      }
-    else
-#endif   /* SUPPORT_UTF */
-
-    /* Not UTF mode */
-      {
-      if (TABLE_GET(ecode[1], md->lcc, ecode[1])
-          != TABLE_GET(*eptr, md->lcc, *eptr)) RRETURN(MATCH_NOMATCH);
-      eptr++;
-      ecode += 2;
-      }
-    break;
-
-    /* Match a single character repeatedly. */
-
-    case OP_EXACT:
-    case OP_EXACTI:
-    min = max = GET2(ecode, 1);
-    ecode += 1 + IMM2_SIZE;
-    goto REPEATCHAR;
-
-    case OP_POSUPTO:
-    case OP_POSUPTOI:
-    possessive = TRUE;
-    /* Fall through */
-
-    case OP_UPTO:
-    case OP_UPTOI:
-    case OP_MINUPTO:
-    case OP_MINUPTOI:
-    min = 0;
-    max = GET2(ecode, 1);
-    minimize = *ecode == OP_MINUPTO || *ecode == OP_MINUPTOI;
-    ecode += 1 + IMM2_SIZE;
-    goto REPEATCHAR;
-
-    case OP_POSSTAR:
-    case OP_POSSTARI:
-    possessive = TRUE;
-    min = 0;
-    max = INT_MAX;
-    ecode++;
-    goto REPEATCHAR;
-
-    case OP_POSPLUS:
-    case OP_POSPLUSI:
-    possessive = TRUE;
-    min = 1;
-    max = INT_MAX;
-    ecode++;
-    goto REPEATCHAR;
-
-    case OP_POSQUERY:
-    case OP_POSQUERYI:
-    possessive = TRUE;
-    min = 0;
-    max = 1;
-    ecode++;
-    goto REPEATCHAR;
-
-    case OP_STAR:
-    case OP_STARI:
-    case OP_MINSTAR:
-    case OP_MINSTARI:
-    case OP_PLUS:
-    case OP_PLUSI:
-    case OP_MINPLUS:
-    case OP_MINPLUSI:
-    case OP_QUERY:
-    case OP_QUERYI:
-    case OP_MINQUERY:
-    case OP_MINQUERYI:
-    c = *ecode++ - ((op < OP_STARI)? OP_STAR : OP_STARI);
-    minimize = (c & 1) != 0;
-    min = rep_min[c];                 /* Pick up values from tables; */
-    max = rep_max[c];                 /* zero for max => infinity */
-    if (max == 0) max = INT_MAX;
-
-    /* Common code for all repeated single-character matches. We first check
-    for the minimum number of characters. If the minimum equals the maximum, we
-    are done. Otherwise, if minimizing, check the rest of the pattern for a
-    match; if there isn't one, advance up to the maximum, one character at a
-    time.
-
-    If maximizing, advance up to the maximum number of matching characters,
-    until eptr is past the end of the maximum run. If possessive, we are
-    then done (no backing up). Otherwise, match at this position; anything
-    other than no match is immediately returned. For nomatch, back up one
-    character, unless we are matching \R and the last thing matched was
-    \r\n, in which case, back up two bytes. When we reach the first optional
-    character position, we can save stack by doing a tail recurse.
-
-    The various UTF/non-UTF and caseful/caseless cases are handled separately,
-    for speed. */
-
-    REPEATCHAR:
-#ifdef SUPPORT_UTF
-    if (utf)
-      {
-      length = 1;
-      charptr = ecode;
-      GETCHARLEN(fc, ecode, length);
-      ecode += length;
-
-      /* Handle multibyte character matching specially here. There is
-      support for caseless matching if UCP support is present. */
-
-      if (length > 1)
-        {
-#ifdef SUPPORT_UCP
-        pcre_uint32 othercase;
-        if (op >= OP_STARI &&     /* Caseless */
-            (othercase = UCD_OTHERCASE(fc)) != fc)
-          oclength = PRIV(ord2utf)(othercase, occhars);
-        else oclength = 0;
-#endif  /* SUPPORT_UCP */
-
-        for (i = 1; i <= min; i++)
-          {
-          if (eptr <= md->end_subject - length &&
-            memcmp(eptr, charptr, IN_UCHARS(length)) == 0) eptr += length;
-#ifdef SUPPORT_UCP
-          else if (oclength > 0 &&
-                   eptr <= md->end_subject - oclength &&
-                   memcmp(eptr, occhars, IN_UCHARS(oclength)) == 0) eptr += oclength;
-#endif  /* SUPPORT_UCP */
-          else
-            {
-            CHECK_PARTIAL();
-            RRETURN(MATCH_NOMATCH);
-            }
-          }
-
-        if (min == max) continue;
-
-        if (minimize)
-          {
-          for (fi = min;; fi++)
-            {
-            RMATCH(eptr, ecode, offset_top, md, eptrb, RM22);
-            if (rrc != MATCH_NOMATCH) RRETURN(rrc);
-            if (fi >= max) RRETURN(MATCH_NOMATCH);
-            if (eptr <= md->end_subject - length &&
-              memcmp(eptr, charptr, IN_UCHARS(length)) == 0) eptr += length;
-#ifdef SUPPORT_UCP
-            else if (oclength > 0 &&
-                     eptr <= md->end_subject - oclength &&
-                     memcmp(eptr, occhars, IN_UCHARS(oclength)) == 0) eptr += oclength;
-#endif  /* SUPPORT_UCP */
-            else
-              {
-              CHECK_PARTIAL();
-              RRETURN(MATCH_NOMATCH);
-              }
-            }
-          /* Control never gets here */
-          }
-
-        else  /* Maximize */
-          {
-          pp = eptr;
-          for (i = min; i < max; i++)
-            {
-            if (eptr <= md->end_subject - length &&
-                memcmp(eptr, charptr, IN_UCHARS(length)) == 0) eptr += length;
-#ifdef SUPPORT_UCP
-            else if (oclength > 0 &&
-                     eptr <= md->end_subject - oclength &&
-                     memcmp(eptr, occhars, IN_UCHARS(oclength)) == 0) eptr += oclength;
-#endif  /* SUPPORT_UCP */
-            else
-              {
-              CHECK_PARTIAL();
-              break;
-              }
-            }
-
-          if (possessive) continue;    /* No backtracking */
-          for(;;)
-            {
-            if (eptr == pp) goto TAIL_RECURSE;
-            RMATCH(eptr, ecode, offset_top, md, eptrb, RM23);
-            if (rrc != MATCH_NOMATCH) RRETURN(rrc);
-#ifdef SUPPORT_UCP
-            eptr--;
-            BACKCHAR(eptr);
-#else   /* without SUPPORT_UCP */
-            eptr -= length;
-#endif  /* SUPPORT_UCP */
-            }
-          }
-        /* Control never gets here */
-        }
-
-      /* If the length of a UTF-8 character is 1, we fall through here, and
-      obey the code as for non-UTF-8 characters below, though in this case the
-      value of fc will always be < 128. */
-      }
-    else
-#endif  /* SUPPORT_UTF */
-      /* When not in UTF-8 mode, load a single-byte character. */
-      fc = *ecode++;
-
-    /* The value of fc at this point is always one character, though we may
-    or may not be in UTF mode. The code is duplicated for the caseless and
-    caseful cases, for speed, since matching characters is likely to be quite
-    common. First, ensure the minimum number of matches are present. If min =
-    max, continue at the same level without recursing. Otherwise, if
-    minimizing, keep trying the rest of the expression and advancing one
-    matching character if failing, up to the maximum. Alternatively, if
-    maximizing, find the maximum number of characters and work backwards. */
-
-    DPRINTF(("matching %c{%d,%d} against subject %.*s\n", fc, min, max,
-      max, (char *)eptr));
-
-    if (op >= OP_STARI)  /* Caseless */
-      {
-#ifdef COMPILE_PCRE8
-      /* fc must be < 128 if UTF is enabled. */
-      foc = md->fcc[fc];
-#else
-#ifdef SUPPORT_UTF
-#ifdef SUPPORT_UCP
-      if (utf && fc > 127)
-        foc = UCD_OTHERCASE(fc);
-#else
-      if (utf && fc > 127)
-        foc = fc;
-#endif /* SUPPORT_UCP */
-      else
-#endif /* SUPPORT_UTF */
-        foc = TABLE_GET(fc, md->fcc, fc);
-#endif /* COMPILE_PCRE8 */
-
-      for (i = 1; i <= min; i++)
-        {
-        pcre_uint32 cc;                 /* Faster than pcre_uchar */
-        if (eptr >= md->end_subject)
-          {
-          SCHECK_PARTIAL();
-          RRETURN(MATCH_NOMATCH);
-          }
-        cc = UCHAR21TEST(eptr);
-        if (fc != cc && foc != cc) RRETURN(MATCH_NOMATCH);
-        eptr++;
-        }
-      if (min == max) continue;
-      if (minimize)
-        {
-        for (fi = min;; fi++)
-          {
-          pcre_uint32 cc;               /* Faster than pcre_uchar */
-          RMATCH(eptr, ecode, offset_top, md, eptrb, RM24);
-          if (rrc != MATCH_NOMATCH) RRETURN(rrc);
-          if (fi >= max) RRETURN(MATCH_NOMATCH);
-          if (eptr >= md->end_subject)
-            {
-            SCHECK_PARTIAL();
-            RRETURN(MATCH_NOMATCH);
-            }
-          cc = UCHAR21TEST(eptr);
-          if (fc != cc && foc != cc) RRETURN(MATCH_NOMATCH);
-          eptr++;
-          }
-        /* Control never gets here */
-        }
-      else  /* Maximize */
-        {
-        pp = eptr;
-        for (i = min; i < max; i++)
-          {
-          pcre_uint32 cc;               /* Faster than pcre_uchar */
-          if (eptr >= md->end_subject)
-            {
-            SCHECK_PARTIAL();
-            break;
-            }
-          cc = UCHAR21TEST(eptr);
-          if (fc != cc && foc != cc) break;
-          eptr++;
-          }
-        if (possessive) continue;       /* No backtracking */
-        for (;;)
-          {
-          if (eptr == pp) goto TAIL_RECURSE;
-          RMATCH(eptr, ecode, offset_top, md, eptrb, RM25);
-          eptr--;
-          if (rrc != MATCH_NOMATCH) RRETURN(rrc);
-          }
-        /* Control never gets here */
-        }
-      }
-
-    /* Caseful comparisons (includes all multi-byte characters) */
-
-    else
-      {
-      for (i = 1; i <= min; i++)
-        {
-        if (eptr >= md->end_subject)
-          {
-          SCHECK_PARTIAL();
-          RRETURN(MATCH_NOMATCH);
-          }
-        if (fc != UCHAR21INCTEST(eptr)) RRETURN(MATCH_NOMATCH);
-        }
-
-      if (min == max) continue;
-
-      if (minimize)
-        {
-        for (fi = min;; fi++)
-          {
-          RMATCH(eptr, ecode, offset_top, md, eptrb, RM26);
-          if (rrc != MATCH_NOMATCH) RRETURN(rrc);
-          if (fi >= max) RRETURN(MATCH_NOMATCH);
-          if (eptr >= md->end_subject)
-            {
-            SCHECK_PARTIAL();
-            RRETURN(MATCH_NOMATCH);
-            }
-          if (fc != UCHAR21INCTEST(eptr)) RRETURN(MATCH_NOMATCH);
-          }
-        /* Control never gets here */
-        }
-      else  /* Maximize */
-        {
-        pp = eptr;
-        for (i = min; i < max; i++)
-          {
-          if (eptr >= md->end_subject)
-            {
-            SCHECK_PARTIAL();
-            break;
-            }
-          if (fc != UCHAR21TEST(eptr)) break;
-          eptr++;
-          }
-        if (possessive) continue;    /* No backtracking */
-        for (;;)
-          {
-          if (eptr == pp) goto TAIL_RECURSE;
-          RMATCH(eptr, ecode, offset_top, md, eptrb, RM27);
-          eptr--;
-          if (rrc != MATCH_NOMATCH) RRETURN(rrc);
-          }
-        /* Control never gets here */
-        }
-      }
-    /* Control never gets here */
-
-    /* Match a negated single one-byte character. The character we are
-    checking can be multibyte. */
-
-    case OP_NOT:
-    case OP_NOTI:
-    if (eptr >= md->end_subject)
-      {
-      SCHECK_PARTIAL();
-      RRETURN(MATCH_NOMATCH);
-      }
-#ifdef SUPPORT_UTF
-    if (utf)
-      {
-      register pcre_uint32 ch, och;
-
-      ecode++;
-      GETCHARINC(ch, ecode);
-      GETCHARINC(c, eptr);
-
-      if (op == OP_NOT)
-        {
-        if (ch == c) RRETURN(MATCH_NOMATCH);
-        }
-      else
-        {
-#ifdef SUPPORT_UCP
-        if (ch > 127)
-          och = UCD_OTHERCASE(ch);
-#else
-        if (ch > 127)
-          och = ch;
-#endif /* SUPPORT_UCP */
-        else
-          och = TABLE_GET(ch, md->fcc, ch);
-        if (ch == c || och == c) RRETURN(MATCH_NOMATCH);
-        }
-      }
-    else
-#endif
-      {
-      register pcre_uint32 ch = ecode[1];
-      c = *eptr++;
-      if (ch == c || (op == OP_NOTI && TABLE_GET(ch, md->fcc, ch) == c))
-        RRETURN(MATCH_NOMATCH);
-      ecode += 2;
-      }
-    break;
-
-    /* Match a negated single one-byte character repeatedly. This is almost a
-    repeat of the code for a repeated single character, but I haven't found a
-    nice way of commoning these up that doesn't require a test of the
-    positive/negative option for each character match. Maybe that wouldn't add
-    very much to the time taken, but character matching *is* what this is all
-    about... */
-
-    case OP_NOTEXACT:
-    case OP_NOTEXACTI:
-    min = max = GET2(ecode, 1);
-    ecode += 1 + IMM2_SIZE;
-    goto REPEATNOTCHAR;
-
-    case OP_NOTUPTO:
-    case OP_NOTUPTOI:
-    case OP_NOTMINUPTO:
-    case OP_NOTMINUPTOI:
-    min = 0;
-    max = GET2(ecode, 1);
-    minimize = *ecode == OP_NOTMINUPTO || *ecode == OP_NOTMINUPTOI;
-    ecode += 1 + IMM2_SIZE;
-    goto REPEATNOTCHAR;
-
-    case OP_NOTPOSSTAR:
-    case OP_NOTPOSSTARI:
-    possessive = TRUE;
-    min = 0;
-    max = INT_MAX;
-    ecode++;
-    goto REPEATNOTCHAR;
-
-    case OP_NOTPOSPLUS:
-    case OP_NOTPOSPLUSI:
-    possessive = TRUE;
-    min = 1;
-    max = INT_MAX;
-    ecode++;
-    goto REPEATNOTCHAR;
-
-    case OP_NOTPOSQUERY:
-    case OP_NOTPOSQUERYI:
-    possessive = TRUE;
-    min = 0;
-    max = 1;
-    ecode++;
-    goto REPEATNOTCHAR;
-
-    case OP_NOTPOSUPTO:
-    case OP_NOTPOSUPTOI:
-    possessive = TRUE;
-    min = 0;
-    max = GET2(ecode, 1);
-    ecode += 1 + IMM2_SIZE;
-    goto REPEATNOTCHAR;
-
-    case OP_NOTSTAR:
-    case OP_NOTSTARI:
-    case OP_NOTMINSTAR:
-    case OP_NOTMINSTARI:
-    case OP_NOTPLUS:
-    case OP_NOTPLUSI:
-    case OP_NOTMINPLUS:
-    case OP_NOTMINPLUSI:
-    case OP_NOTQUERY:
-    case OP_NOTQUERYI:
-    case OP_NOTMINQUERY:
-    case OP_NOTMINQUERYI:
-    c = *ecode++ - ((op >= OP_NOTSTARI)? OP_NOTSTARI: OP_NOTSTAR);
-    minimize = (c & 1) != 0;
-    min = rep_min[c];                 /* Pick up values from tables; */
-    max = rep_max[c];                 /* zero for max => infinity */
-    if (max == 0) max = INT_MAX;
-
-    /* Common code for all repeated single-byte matches. */
-
-    REPEATNOTCHAR:
-    GETCHARINCTEST(fc, ecode);
-
-    /* The code is duplicated for the caseless and caseful cases, for speed,
-    since matching characters is likely to be quite common. First, ensure the
-    minimum number of matches are present. If min = max, continue at the same
-    level without recursing. Otherwise, if minimizing, keep trying the rest of
-    the expression and advancing one matching character if failing, up to the
-    maximum. Alternatively, if maximizing, find the maximum number of
-    characters and work backwards. */
-
-    DPRINTF(("negative matching %c{%d,%d} against subject %.*s\n", fc, min, max,
-      max, (char *)eptr));
-
-    if (op >= OP_NOTSTARI)     /* Caseless */
-      {
-#ifdef SUPPORT_UTF
-#ifdef SUPPORT_UCP
-      if (utf && fc > 127)
-        foc = UCD_OTHERCASE(fc);
-#else
-      if (utf && fc > 127)
-        foc = fc;
-#endif /* SUPPORT_UCP */
-      else
-#endif /* SUPPORT_UTF */
-        foc = TABLE_GET(fc, md->fcc, fc);
-
-#ifdef SUPPORT_UTF
-      if (utf)
-        {
-        register pcre_uint32 d;
-        for (i = 1; i <= min; i++)
-          {
-          if (eptr >= md->end_subject)
-            {
-            SCHECK_PARTIAL();
-            RRETURN(MATCH_NOMATCH);
-            }
-          GETCHARINC(d, eptr);
-          if (fc == d || (unsigned int)foc == d) RRETURN(MATCH_NOMATCH);
-          }
-        }
-      else
-#endif  /* SUPPORT_UTF */
-      /* Not UTF mode */
-        {
-        for (i = 1; i <= min; i++)
-          {
-          if (eptr >= md->end_subject)
-            {
-            SCHECK_PARTIAL();
-            RRETURN(MATCH_NOMATCH);
-            }
-          if (fc == *eptr || foc == *eptr) RRETURN(MATCH_NOMATCH);
-          eptr++;
-          }
-        }
-
-      if (min == max) continue;
-
-      if (minimize)
-        {
-#ifdef SUPPORT_UTF
-        if (utf)
-          {
-          register pcre_uint32 d;
-          for (fi = min;; fi++)
-            {
-            RMATCH(eptr, ecode, offset_top, md, eptrb, RM28);
-            if (rrc != MATCH_NOMATCH) RRETURN(rrc);
-            if (fi >= max) RRETURN(MATCH_NOMATCH);
-            if (eptr >= md->end_subject)
-              {
-              SCHECK_PARTIAL();
-              RRETURN(MATCH_NOMATCH);
-              }
-            GETCHARINC(d, eptr);
-            if (fc == d || (unsigned int)foc == d) RRETURN(MATCH_NOMATCH);
-            }
-          }
-        else
-#endif  /*SUPPORT_UTF */
-        /* Not UTF mode */
-          {
-          for (fi = min;; fi++)
-            {
-            RMATCH(eptr, ecode, offset_top, md, eptrb, RM29);
-            if (rrc != MATCH_NOMATCH) RRETURN(rrc);
-            if (fi >= max) RRETURN(MATCH_NOMATCH);
-            if (eptr >= md->end_subject)
-              {
-              SCHECK_PARTIAL();
-              RRETURN(MATCH_NOMATCH);
-              }
-            if (fc == *eptr || foc == *eptr) RRETURN(MATCH_NOMATCH);
-            eptr++;
-            }
-          }
-        /* Control never gets here */
-        }
-
-      /* Maximize case */
-
-      else
-        {
-        pp = eptr;
-
-#ifdef SUPPORT_UTF
-        if (utf)
-          {
-          register pcre_uint32 d;
-          for (i = min; i < max; i++)
-            {
-            int len = 1;
-            if (eptr >= md->end_subject)
-              {
-              SCHECK_PARTIAL();
-              break;
-              }
-            GETCHARLEN(d, eptr, len);
-            if (fc == d || (unsigned int)foc == d) break;
-            eptr += len;
-            }
-          if (possessive) continue;    /* No backtracking */
-          for(;;)
-            {
-            if (eptr == pp) goto TAIL_RECURSE;
-            RMATCH(eptr, ecode, offset_top, md, eptrb, RM30);
-            if (rrc != MATCH_NOMATCH) RRETURN(rrc);
-            eptr--;
-            BACKCHAR(eptr);
-            }
-          }
-        else
-#endif  /* SUPPORT_UTF */
-        /* Not UTF mode */
-          {
-          for (i = min; i < max; i++)
-            {
-            if (eptr >= md->end_subject)
-              {
-              SCHECK_PARTIAL();
-              break;
-              }
-            if (fc == *eptr || foc == *eptr) break;
-            eptr++;
-            }
-          if (possessive) continue;    /* No backtracking */
-          for (;;)
-            {
-            if (eptr == pp) goto TAIL_RECURSE;
-            RMATCH(eptr, ecode, offset_top, md, eptrb, RM31);
-            if (rrc != MATCH_NOMATCH) RRETURN(rrc);
-            eptr--;
-            }
-          }
-        /* Control never gets here */
-        }
-      }
-
-    /* Caseful comparisons */
-
-    else
-      {
-#ifdef SUPPORT_UTF
-      if (utf)
-        {
-        register pcre_uint32 d;
-        for (i = 1; i <= min; i++)
-          {
-          if (eptr >= md->end_subject)
-            {
-            SCHECK_PARTIAL();
-            RRETURN(MATCH_NOMATCH);
-            }
-          GETCHARINC(d, eptr);
-          if (fc == d) RRETURN(MATCH_NOMATCH);
-          }
-        }
-      else
-#endif
-      /* Not UTF mode */
-        {
-        for (i = 1; i <= min; i++)
-          {
-          if (eptr >= md->end_subject)
-            {
-            SCHECK_PARTIAL();
-            RRETURN(MATCH_NOMATCH);
-            }
-          if (fc == *eptr++) RRETURN(MATCH_NOMATCH);
-          }
-        }
-
-      if (min == max) continue;
-
-      if (minimize)
-        {
-#ifdef SUPPORT_UTF
-        if (utf)
-          {
-          register pcre_uint32 d;
-          for (fi = min;; fi++)
-            {
-            RMATCH(eptr, ecode, offset_top, md, eptrb, RM32);
-            if (rrc != MATCH_NOMATCH) RRETURN(rrc);
-            if (fi >= max) RRETURN(MATCH_NOMATCH);
-            if (eptr >= md->end_subject)
-              {
-              SCHECK_PARTIAL();
-              RRETURN(MATCH_NOMATCH);
-              }
-            GETCHARINC(d, eptr);
-            if (fc == d) RRETURN(MATCH_NOMATCH);
-            }
-          }
-        else
-#endif
-        /* Not UTF mode */
-          {
-          for (fi = min;; fi++)
-            {
-            RMATCH(eptr, ecode, offset_top, md, eptrb, RM33);
-            if (rrc != MATCH_NOMATCH) RRETURN(rrc);
-            if (fi >= max) RRETURN(MATCH_NOMATCH);
-            if (eptr >= md->end_subject)
-              {
-              SCHECK_PARTIAL();
-              RRETURN(MATCH_NOMATCH);
-              }
-            if (fc == *eptr++) RRETURN(MATCH_NOMATCH);
-            }
-          }
-        /* Control never gets here */
-        }
-
-      /* Maximize case */
-
-      else
-        {
-        pp = eptr;
-
-#ifdef SUPPORT_UTF
-        if (utf)
-          {
-          register pcre_uint32 d;
-          for (i = min; i < max; i++)
-            {
-            int len = 1;
-            if (eptr >= md->end_subject)
-              {
-              SCHECK_PARTIAL();
-              break;
-              }
-            GETCHARLEN(d, eptr, len);
-            if (fc == d) break;
-            eptr += len;
-            }
-          if (possessive) continue;    /* No backtracking */
-          for(;;)
-            {
-            if (eptr == pp) goto TAIL_RECURSE;
-            RMATCH(eptr, ecode, offset_top, md, eptrb, RM34);
-            if (rrc != MATCH_NOMATCH) RRETURN(rrc);
-            eptr--;
-            BACKCHAR(eptr);
-            }
-          }
-        else
-#endif
-        /* Not UTF mode */
-          {
-          for (i = min; i < max; i++)
-            {
-            if (eptr >= md->end_subject)
-              {
-              SCHECK_PARTIAL();
-              break;
-              }
-            if (fc == *eptr) break;
-            eptr++;
-            }
-          if (possessive) continue;    /* No backtracking */
-          for (;;)
-            {
-            if (eptr == pp) goto TAIL_RECURSE;
-            RMATCH(eptr, ecode, offset_top, md, eptrb, RM35);
-            if (rrc != MATCH_NOMATCH) RRETURN(rrc);
-            eptr--;
-            }
-          }
-        /* Control never gets here */
-        }
-      }
-    /* Control never gets here */
-
-    /* Match a single character type repeatedly; several different opcodes
-    share code. This is very similar to the code for single characters, but we
-    repeat it in the interests of efficiency. */
-
-    case OP_TYPEEXACT:
-    min = max = GET2(ecode, 1);
-    minimize = TRUE;
-    ecode += 1 + IMM2_SIZE;
-    goto REPEATTYPE;
-
-    case OP_TYPEUPTO:
-    case OP_TYPEMINUPTO:
-    min = 0;
-    max = GET2(ecode, 1);
-    minimize = *ecode == OP_TYPEMINUPTO;
-    ecode += 1 + IMM2_SIZE;
-    goto REPEATTYPE;
-
-    case OP_TYPEPOSSTAR:
-    possessive = TRUE;
-    min = 0;
-    max = INT_MAX;
-    ecode++;
-    goto REPEATTYPE;
-
-    case OP_TYPEPOSPLUS:
-    possessive = TRUE;
-    min = 1;
-    max = INT_MAX;
-    ecode++;
-    goto REPEATTYPE;
-
-    case OP_TYPEPOSQUERY:
-    possessive = TRUE;
-    min = 0;
-    max = 1;
-    ecode++;
-    goto REPEATTYPE;
-
-    case OP_TYPEPOSUPTO:
-    possessive = TRUE;
-    min = 0;
-    max = GET2(ecode, 1);
-    ecode += 1 + IMM2_SIZE;
-    goto REPEATTYPE;
-
-    case OP_TYPESTAR:
-    case OP_TYPEMINSTAR:
-    case OP_TYPEPLUS:
-    case OP_TYPEMINPLUS:
-    case OP_TYPEQUERY:
-    case OP_TYPEMINQUERY:
-    c = *ecode++ - OP_TYPESTAR;
-    minimize = (c & 1) != 0;
-    min = rep_min[c];                 /* Pick up values from tables; */
-    max = rep_max[c];                 /* zero for max => infinity */
-    if (max == 0) max = INT_MAX;
-
-    /* Common code for all repeated single character type matches. Note that
-    in UTF-8 mode, '.' matches a character of any length, but for the other
-    character types, the valid characters are all one-byte long. */
-
-    REPEATTYPE:
-    ctype = *ecode++;      /* Code for the character type */
-
-#ifdef SUPPORT_UCP
-    if (ctype == OP_PROP || ctype == OP_NOTPROP)
-      {
-      prop_fail_result = ctype == OP_NOTPROP;
-      prop_type = *ecode++;
-      prop_value = *ecode++;
-      }
-    else prop_type = -1;
-#endif
-
-    /* First, ensure the minimum number of matches are present. Use inline
-    code for maximizing the speed, and do the type test once at the start
-    (i.e. keep it out of the loop). Separate the UTF-8 code completely as that
-    is tidier. Also separate the UCP code, which can be the same for both UTF-8
-    and single-bytes. */
-
-    if (min > 0)
-      {
-#ifdef SUPPORT_UCP
-      if (prop_type >= 0)
-        {
-        switch(prop_type)
-          {
-          case PT_ANY:
-          if (prop_fail_result) RRETURN(MATCH_NOMATCH);
-          for (i = 1; i <= min; i++)
-            {
-            if (eptr >= md->end_subject)
-              {
-              SCHECK_PARTIAL();
-              RRETURN(MATCH_NOMATCH);
-              }
-            GETCHARINCTEST(c, eptr);
-            }
-          break;
-
-          case PT_LAMP:
-          for (i = 1; i <= min; i++)
-            {
-            int chartype;
-            if (eptr >= md->end_subject)
-              {
-              SCHECK_PARTIAL();
-              RRETURN(MATCH_NOMATCH);
-              }
-            GETCHARINCTEST(c, eptr);
-            chartype = UCD_CHARTYPE(c);
-            if ((chartype == ucp_Lu ||
-                 chartype == ucp_Ll ||
-                 chartype == ucp_Lt) == prop_fail_result)
-              RRETURN(MATCH_NOMATCH);
-            }
-          break;
-
-          case PT_GC:
-          for (i = 1; i <= min; i++)
-            {
-            if (eptr >= md->end_subject)
-              {
-              SCHECK_PARTIAL();
-              RRETURN(MATCH_NOMATCH);
-              }
-            GETCHARINCTEST(c, eptr);
-            if ((UCD_CATEGORY(c) == prop_value) == prop_fail_result)
-              RRETURN(MATCH_NOMATCH);
-            }
-          break;
-
-          case PT_PC:
-          for (i = 1; i <= min; i++)
-            {
-            if (eptr >= md->end_subject)
-              {
-              SCHECK_PARTIAL();
-              RRETURN(MATCH_NOMATCH);
-              }
-            GETCHARINCTEST(c, eptr);
-            if ((UCD_CHARTYPE(c) == prop_value) == prop_fail_result)
-              RRETURN(MATCH_NOMATCH);
-            }
-          break;
-
-          case PT_SC:
-          for (i = 1; i <= min; i++)
-            {
-            if (eptr >= md->end_subject)
-              {
-              SCHECK_PARTIAL();
-              RRETURN(MATCH_NOMATCH);
-              }
-            GETCHARINCTEST(c, eptr);
-            if ((UCD_SCRIPT(c) == prop_value) == prop_fail_result)
-              RRETURN(MATCH_NOMATCH);
-            }
-          break;
-
-          case PT_ALNUM:
-          for (i = 1; i <= min; i++)
-            {
-            int category;
-            if (eptr >= md->end_subject)
-              {
-              SCHECK_PARTIAL();
-              RRETURN(MATCH_NOMATCH);
-              }
-            GETCHARINCTEST(c, eptr);
-            category = UCD_CATEGORY(c);
-            if ((category == ucp_L || category == ucp_N) == prop_fail_result)
-              RRETURN(MATCH_NOMATCH);
-            }
-          break;
-
-          /* Perl space used to exclude VT, but from Perl 5.18 it is included,
-          which means that Perl space and POSIX space are now identical. PCRE
-          was changed at release 8.34. */
-
-          case PT_SPACE:    /* Perl space */
-          case PT_PXSPACE:  /* POSIX space */
-          for (i = 1; i <= min; i++)
-            {
-            if (eptr >= md->end_subject)
-              {
-              SCHECK_PARTIAL();
-              RRETURN(MATCH_NOMATCH);
-              }
-            GETCHARINCTEST(c, eptr);
-            switch(c)
-              {
-              HSPACE_CASES:
-              VSPACE_CASES:
-              if (prop_fail_result) RRETURN(MATCH_NOMATCH);
-              break;
-
-              default:
-              if ((UCD_CATEGORY(c) == ucp_Z) == prop_fail_result)
-                RRETURN(MATCH_NOMATCH);
-              break;
-              }
-            }
-          break;
-
-          case PT_WORD:
-          for (i = 1; i <= min; i++)
-            {
-            int category;
-            if (eptr >= md->end_subject)
-              {
-              SCHECK_PARTIAL();
-              RRETURN(MATCH_NOMATCH);
-              }
-            GETCHARINCTEST(c, eptr);
-            category = UCD_CATEGORY(c);
-            if ((category == ucp_L || category == ucp_N || c == CHAR_UNDERSCORE)
-                   == prop_fail_result)
-              RRETURN(MATCH_NOMATCH);
-            }
-          break;
-
-          case PT_CLIST:
-          for (i = 1; i <= min; i++)
-            {
-            const pcre_uint32 *cp;
-            if (eptr >= md->end_subject)
-              {
-              SCHECK_PARTIAL();
-              RRETURN(MATCH_NOMATCH);
-              }
-            GETCHARINCTEST(c, eptr);
-            cp = PRIV(ucd_caseless_sets) + prop_value;
-            for (;;)
-              {
-              if (c < *cp)
-                { if (prop_fail_result) break; else { RRETURN(MATCH_NOMATCH); } }
-              if (c == *cp++)
-                { if (prop_fail_result) { RRETURN(MATCH_NOMATCH); } else break; }
-              }
-            }
-          break;
-
-          case PT_UCNC:
-          for (i = 1; i <= min; i++)
-            {
-            if (eptr >= md->end_subject)
-              {
-              SCHECK_PARTIAL();
-              RRETURN(MATCH_NOMATCH);
-              }
-            GETCHARINCTEST(c, eptr);
-            if ((c == CHAR_DOLLAR_SIGN || c == CHAR_COMMERCIAL_AT ||
-                 c == CHAR_GRAVE_ACCENT || (c >= 0xa0 && c <= 0xd7ff) ||
-                 c >= 0xe000) == prop_fail_result)
-              RRETURN(MATCH_NOMATCH);
-            }
-          break;
-
-          /* This should not occur */
-
-          default:
-          RRETURN(PCRE_ERROR_INTERNAL);
-          }
-        }
-
-      /* Match extended Unicode sequences. We will get here only if the
-      support is in the binary; otherwise a compile-time error occurs. */
-
-      else if (ctype == OP_EXTUNI)
-        {
-        for (i = 1; i <= min; i++)
-          {
-          if (eptr >= md->end_subject)
-            {
-            SCHECK_PARTIAL();
-            RRETURN(MATCH_NOMATCH);
-            }
-          else
-            {
-            int lgb, rgb;
-            GETCHARINCTEST(c, eptr);
-            lgb = UCD_GRAPHBREAK(c);
-           while (eptr < md->end_subject)
-              {
-              int len = 1;
-              if (!utf) c = *eptr; else { GETCHARLEN(c, eptr, len); }
-              rgb = UCD_GRAPHBREAK(c);
-              if ((PRIV(ucp_gbtable)[lgb] & (1 << rgb)) == 0) break;
-              lgb = rgb;
-              eptr += len;
-              }
-            }
-          CHECK_PARTIAL();
-          }
-        }
-
-      else
-#endif     /* SUPPORT_UCP */
-
-/* Handle all other cases when the coding is UTF-8 */
-
-#ifdef SUPPORT_UTF
-      if (utf) switch(ctype)
-        {
-        case OP_ANY:
-        for (i = 1; i <= min; i++)
-          {
-          if (eptr >= md->end_subject)
-            {
-            SCHECK_PARTIAL();
-            RRETURN(MATCH_NOMATCH);
-            }
-          if (IS_NEWLINE(eptr)) RRETURN(MATCH_NOMATCH);
-          if (md->partial != 0 &&
-              eptr + 1 >= md->end_subject &&
-              NLBLOCK->nltype == NLTYPE_FIXED &&
-              NLBLOCK->nllen == 2 &&
-              UCHAR21(eptr) == NLBLOCK->nl[0])
-            {
-            md->hitend = TRUE;
-            if (md->partial > 1) RRETURN(PCRE_ERROR_PARTIAL);
-            }
-          eptr++;
-          ACROSSCHAR(eptr < md->end_subject, *eptr, eptr++);
-          }
-        break;
-
-        case OP_ALLANY:
-        for (i = 1; i <= min; i++)
-          {
-          if (eptr >= md->end_subject)
-            {
-            SCHECK_PARTIAL();
-            RRETURN(MATCH_NOMATCH);
-            }
-          eptr++;
-          ACROSSCHAR(eptr < md->end_subject, *eptr, eptr++);
-          }
-        break;
-
-        case OP_ANYBYTE:
-        if (eptr > md->end_subject - min) RRETURN(MATCH_NOMATCH);
-        eptr += min;
-        break;
-
-        case OP_ANYNL:
-        for (i = 1; i <= min; i++)
-          {
-          if (eptr >= md->end_subject)
-            {
-            SCHECK_PARTIAL();
-            RRETURN(MATCH_NOMATCH);
-            }
-          GETCHARINC(c, eptr);
-          switch(c)
-            {
-            default: RRETURN(MATCH_NOMATCH);
-
-            case CHAR_CR:
-            if (eptr < md->end_subject && UCHAR21(eptr) == CHAR_LF) eptr++;
-            break;
-
-            case CHAR_LF:
-            break;
-
-            case CHAR_VT:
-            case CHAR_FF:
-            case CHAR_NEL:
-#ifndef EBCDIC
-            case 0x2028:
-            case 0x2029:
-#endif  /* Not EBCDIC */
-            if (md->bsr_anycrlf) RRETURN(MATCH_NOMATCH);
-            break;
-            }
-          }
-        break;
-
-        case OP_NOT_HSPACE:
-        for (i = 1; i <= min; i++)
-          {
-          if (eptr >= md->end_subject)
-            {
-            SCHECK_PARTIAL();
-            RRETURN(MATCH_NOMATCH);
-            }
-          GETCHARINC(c, eptr);
-          switch(c)
-            {
-            HSPACE_CASES: RRETURN(MATCH_NOMATCH);  /* Byte and multibyte cases */
-            default: break;
-            }
-          }
-        break;
-
-        case OP_HSPACE:
-        for (i = 1; i <= min; i++)
-          {
-          if (eptr >= md->end_subject)
-            {
-            SCHECK_PARTIAL();
-            RRETURN(MATCH_NOMATCH);
-            }
-          GETCHARINC(c, eptr);
-          switch(c)
-            {
-            HSPACE_CASES: break;  /* Byte and multibyte cases */
-            default: RRETURN(MATCH_NOMATCH);
-            }
-          }
-        break;
-
-        case OP_NOT_VSPACE:
-        for (i = 1; i <= min; i++)
-          {
-          if (eptr >= md->end_subject)
-            {
-            SCHECK_PARTIAL();
-            RRETURN(MATCH_NOMATCH);
-            }
-          GETCHARINC(c, eptr);
-          switch(c)
-            {
-            VSPACE_CASES: RRETURN(MATCH_NOMATCH);
-            default: break;
-            }
-          }
-        break;
-
-        case OP_VSPACE:
-        for (i = 1; i <= min; i++)
-          {
-          if (eptr >= md->end_subject)
-            {
-            SCHECK_PARTIAL();
-            RRETURN(MATCH_NOMATCH);
-            }
-          GETCHARINC(c, eptr);
-          switch(c)
-            {
-            VSPACE_CASES: break;
-            default: RRETURN(MATCH_NOMATCH);
-            }
-          }
-        break;
-
-        case OP_NOT_DIGIT:
-        for (i = 1; i <= min; i++)
-          {
-          if (eptr >= md->end_subject)
-            {
-            SCHECK_PARTIAL();
-            RRETURN(MATCH_NOMATCH);
-            }
-          GETCHARINC(c, eptr);
-          if (c < 128 && (md->ctypes[c] & ctype_digit) != 0)
-            RRETURN(MATCH_NOMATCH);
-          }
-        break;
-
-        case OP_DIGIT:
-        for (i = 1; i <= min; i++)
-          {
-          pcre_uint32 cc;
-          if (eptr >= md->end_subject)
-            {
-            SCHECK_PARTIAL();
-            RRETURN(MATCH_NOMATCH);
-            }
-          cc = UCHAR21(eptr);
-          if (cc >= 128 || (md->ctypes[cc] & ctype_digit) == 0)
-            RRETURN(MATCH_NOMATCH);
-          eptr++;
-          /* No need to skip more bytes - we know it's a 1-byte character */
-          }
-        break;
-
-        case OP_NOT_WHITESPACE:
-        for (i = 1; i <= min; i++)
-          {
-          pcre_uint32 cc;
-          if (eptr >= md->end_subject)
-            {
-            SCHECK_PARTIAL();
-            RRETURN(MATCH_NOMATCH);
-            }
-          cc = UCHAR21(eptr);
-          if (cc < 128 && (md->ctypes[cc] & ctype_space) != 0)
-            RRETURN(MATCH_NOMATCH);
-          eptr++;
-          ACROSSCHAR(eptr < md->end_subject, *eptr, eptr++);
-          }
-        break;
-
-        case OP_WHITESPACE:
-        for (i = 1; i <= min; i++)
-          {
-          pcre_uint32 cc;
-          if (eptr >= md->end_subject)
-            {
-            SCHECK_PARTIAL();
-            RRETURN(MATCH_NOMATCH);
-            }
-          cc = UCHAR21(eptr);
-          if (cc >= 128 || (md->ctypes[cc] & ctype_space) == 0)
-            RRETURN(MATCH_NOMATCH);
-          eptr++;
-          /* No need to skip more bytes - we know it's a 1-byte character */
-          }
-        break;
-
-        case OP_NOT_WORDCHAR:
-        for (i = 1; i <= min; i++)
-          {
-          pcre_uint32 cc;
-          if (eptr >= md->end_subject)
-            {
-            SCHECK_PARTIAL();
-            RRETURN(MATCH_NOMATCH);
-            }
-          cc = UCHAR21(eptr);
-          if (cc < 128 && (md->ctypes[cc] & ctype_word) != 0)
-            RRETURN(MATCH_NOMATCH);
-          eptr++;
-          ACROSSCHAR(eptr < md->end_subject, *eptr, eptr++);
-          }
-        break;
-
-        case OP_WORDCHAR:
-        for (i = 1; i <= min; i++)
-          {
-          pcre_uint32 cc;
-          if (eptr >= md->end_subject)
-            {
-            SCHECK_PARTIAL();
-            RRETURN(MATCH_NOMATCH);
-            }
-          cc = UCHAR21(eptr);
-          if (cc >= 128 || (md->ctypes[cc] & ctype_word) == 0)
-            RRETURN(MATCH_NOMATCH);
-          eptr++;
-          /* No need to skip more bytes - we know it's a 1-byte character */
-          }
-        break;
-
-        default:
-        RRETURN(PCRE_ERROR_INTERNAL);
-        }  /* End switch(ctype) */
-
-      else
-#endif     /* SUPPORT_UTF */
-
-      /* Code for the non-UTF-8 case for minimum matching of operators other
-      than OP_PROP and OP_NOTPROP. */
-
-      switch(ctype)
-        {
-        case OP_ANY:
-        for (i = 1; i <= min; i++)
-          {
-          if (eptr >= md->end_subject)
-            {
-            SCHECK_PARTIAL();
-            RRETURN(MATCH_NOMATCH);
-            }
-          if (IS_NEWLINE(eptr)) RRETURN(MATCH_NOMATCH);
-          if (md->partial != 0 &&
-              eptr + 1 >= md->end_subject &&
-              NLBLOCK->nltype == NLTYPE_FIXED &&
-              NLBLOCK->nllen == 2 &&
-              *eptr == NLBLOCK->nl[0])
-            {
-            md->hitend = TRUE;
-            if (md->partial > 1) RRETURN(PCRE_ERROR_PARTIAL);
-            }
-          eptr++;
-          }
-        break;
-
-        case OP_ALLANY:
-        if (eptr > md->end_subject - min)
-          {
-          SCHECK_PARTIAL();
-          RRETURN(MATCH_NOMATCH);
-          }
-        eptr += min;
-        break;
-
-        case OP_ANYBYTE:
-        if (eptr > md->end_subject - min)
-          {
-          SCHECK_PARTIAL();
-          RRETURN(MATCH_NOMATCH);
-          }
-        eptr += min;
-        break;
-
-        case OP_ANYNL:
-        for (i = 1; i <= min; i++)
-          {
-          if (eptr >= md->end_subject)
-            {
-            SCHECK_PARTIAL();
-            RRETURN(MATCH_NOMATCH);
-            }
-          switch(*eptr++)
-            {
-            default: RRETURN(MATCH_NOMATCH);
-
-            case CHAR_CR:
-            if (eptr < md->end_subject && *eptr == CHAR_LF) eptr++;
-            break;
-
-            case CHAR_LF:
-            break;
-
-            case CHAR_VT:
-            case CHAR_FF:
-            case CHAR_NEL:
-#if defined COMPILE_PCRE16 || defined COMPILE_PCRE32
-            case 0x2028:
-            case 0x2029:
-#endif
-            if (md->bsr_anycrlf) RRETURN(MATCH_NOMATCH);
-            break;
-            }
-          }
-        break;
-
-        case OP_NOT_HSPACE:
-        for (i = 1; i <= min; i++)
-          {
-          if (eptr >= md->end_subject)
-            {
-            SCHECK_PARTIAL();
-            RRETURN(MATCH_NOMATCH);
-            }
-          switch(*eptr++)
-            {
-            default: break;
-            HSPACE_BYTE_CASES:
-#if defined COMPILE_PCRE16 || defined COMPILE_PCRE32
-            HSPACE_MULTIBYTE_CASES:
-#endif
-            RRETURN(MATCH_NOMATCH);
-            }
-          }
-        break;
-
-        case OP_HSPACE:
-        for (i = 1; i <= min; i++)
-          {
-          if (eptr >= md->end_subject)
-            {
-            SCHECK_PARTIAL();
-            RRETURN(MATCH_NOMATCH);
-            }
-          switch(*eptr++)
-            {
-            default: RRETURN(MATCH_NOMATCH);
-            HSPACE_BYTE_CASES:
-#if defined COMPILE_PCRE16 || defined COMPILE_PCRE32
-            HSPACE_MULTIBYTE_CASES:
-#endif
-            break;
-            }
-          }
-        break;
-
-        case OP_NOT_VSPACE:
-        for (i = 1; i <= min; i++)
-          {
-          if (eptr >= md->end_subject)
-            {
-            SCHECK_PARTIAL();
-            RRETURN(MATCH_NOMATCH);
-            }
-          switch(*eptr++)
-            {
-            VSPACE_BYTE_CASES:
-#if defined COMPILE_PCRE16 || defined COMPILE_PCRE32
-            VSPACE_MULTIBYTE_CASES:
-#endif
-            RRETURN(MATCH_NOMATCH);
-            default: break;
-            }
-          }
-        break;
-
-        case OP_VSPACE:
-        for (i = 1; i <= min; i++)
-          {
-          if (eptr >= md->end_subject)
-            {
-            SCHECK_PARTIAL();
-            RRETURN(MATCH_NOMATCH);
-            }
-          switch(*eptr++)
-            {
-            default: RRETURN(MATCH_NOMATCH);
-            VSPACE_BYTE_CASES:
-#if defined COMPILE_PCRE16 || defined COMPILE_PCRE32
-            VSPACE_MULTIBYTE_CASES:
-#endif
-            break;
-            }
-          }
-        break;
-
-        case OP_NOT_DIGIT:
-        for (i = 1; i <= min; i++)
-          {
-          if (eptr >= md->end_subject)
-            {
-            SCHECK_PARTIAL();
-            RRETURN(MATCH_NOMATCH);
-            }
-          if (MAX_255(*eptr) && (md->ctypes[*eptr] & ctype_digit) != 0)
-            RRETURN(MATCH_NOMATCH);
-          eptr++;
-          }
-        break;
-
-        case OP_DIGIT:
-        for (i = 1; i <= min; i++)
-          {
-          if (eptr >= md->end_subject)
-            {
-            SCHECK_PARTIAL();
-            RRETURN(MATCH_NOMATCH);
-            }
-          if (!MAX_255(*eptr) || (md->ctypes[*eptr] & ctype_digit) == 0)
-            RRETURN(MATCH_NOMATCH);
-          eptr++;
-          }
-        break;
-
-        case OP_NOT_WHITESPACE:
-        for (i = 1; i <= min; i++)
-          {
-          if (eptr >= md->end_subject)
-            {
-            SCHECK_PARTIAL();
-            RRETURN(MATCH_NOMATCH);
-            }
-          if (MAX_255(*eptr) && (md->ctypes[*eptr] & ctype_space) != 0)
-            RRETURN(MATCH_NOMATCH);
-          eptr++;
-          }
-        break;
-
-        case OP_WHITESPACE:
-        for (i = 1; i <= min; i++)
-          {
-          if (eptr >= md->end_subject)
-            {
-            SCHECK_PARTIAL();
-            RRETURN(MATCH_NOMATCH);
-            }
-          if (!MAX_255(*eptr) || (md->ctypes[*eptr] & ctype_space) == 0)
-            RRETURN(MATCH_NOMATCH);
-          eptr++;
-          }
-        break;
-
-        case OP_NOT_WORDCHAR:
-        for (i = 1; i <= min; i++)
-          {
-          if (eptr >= md->end_subject)
-            {
-            SCHECK_PARTIAL();
-            RRETURN(MATCH_NOMATCH);
-            }
-          if (MAX_255(*eptr) && (md->ctypes[*eptr] & ctype_word) != 0)
-            RRETURN(MATCH_NOMATCH);
-          eptr++;
-          }
-        break;
-
-        case OP_WORDCHAR:
-        for (i = 1; i <= min; i++)
-          {
-          if (eptr >= md->end_subject)
-            {
-            SCHECK_PARTIAL();
-            RRETURN(MATCH_NOMATCH);
-            }
-          if (!MAX_255(*eptr) || (md->ctypes[*eptr] & ctype_word) == 0)
-            RRETURN(MATCH_NOMATCH);
-          eptr++;
-          }
-        break;
-
-        default:
-        RRETURN(PCRE_ERROR_INTERNAL);
-        }
-      }
-
-    /* If min = max, continue at the same level without recursing */
-
-    if (min == max) continue;
-
-    /* If minimizing, we have to test the rest of the pattern before each
-    subsequent match. Again, separate the UTF-8 case for speed, and also
-    separate the UCP cases. */
-
-    if (minimize)
-      {
-#ifdef SUPPORT_UCP
-      if (prop_type >= 0)
-        {
-        switch(prop_type)
-          {
-          case PT_ANY:
-          for (fi = min;; fi++)
-            {
-            RMATCH(eptr, ecode, offset_top, md, eptrb, RM36);
-            if (rrc != MATCH_NOMATCH) RRETURN(rrc);
-            if (fi >= max) RRETURN(MATCH_NOMATCH);
-            if (eptr >= md->end_subject)
-              {
-              SCHECK_PARTIAL();
-              RRETURN(MATCH_NOMATCH);
-              }
-            GETCHARINCTEST(c, eptr);
-            if (prop_fail_result) RRETURN(MATCH_NOMATCH);
-            }
-          /* Control never gets here */
-
-          case PT_LAMP:
-          for (fi = min;; fi++)
-            {
-            int chartype;
-            RMATCH(eptr, ecode, offset_top, md, eptrb, RM37);
-            if (rrc != MATCH_NOMATCH) RRETURN(rrc);
-            if (fi >= max) RRETURN(MATCH_NOMATCH);
-            if (eptr >= md->end_subject)
-              {
-              SCHECK_PARTIAL();
-              RRETURN(MATCH_NOMATCH);
-              }
-            GETCHARINCTEST(c, eptr);
-            chartype = UCD_CHARTYPE(c);
-            if ((chartype == ucp_Lu ||
-                 chartype == ucp_Ll ||
-                 chartype == ucp_Lt) == prop_fail_result)
-              RRETURN(MATCH_NOMATCH);
-            }
-          /* Control never gets here */
-
-          case PT_GC:
-          for (fi = min;; fi++)
-            {
-            RMATCH(eptr, ecode, offset_top, md, eptrb, RM38);
-            if (rrc != MATCH_NOMATCH) RRETURN(rrc);
-            if (fi >= max) RRETURN(MATCH_NOMATCH);
-            if (eptr >= md->end_subject)
-              {
-              SCHECK_PARTIAL();
-              RRETURN(MATCH_NOMATCH);
-              }
-            GETCHARINCTEST(c, eptr);
-            if ((UCD_CATEGORY(c) == prop_value) == prop_fail_result)
-              RRETURN(MATCH_NOMATCH);
-            }
-          /* Control never gets here */
-
-          case PT_PC:
-          for (fi = min;; fi++)
-            {
-            RMATCH(eptr, ecode, offset_top, md, eptrb, RM39);
-            if (rrc != MATCH_NOMATCH) RRETURN(rrc);
-            if (fi >= max) RRETURN(MATCH_NOMATCH);
-            if (eptr >= md->end_subject)
-              {
-              SCHECK_PARTIAL();
-              RRETURN(MATCH_NOMATCH);
-              }
-            GETCHARINCTEST(c, eptr);
-            if ((UCD_CHARTYPE(c) == prop_value) == prop_fail_result)
-              RRETURN(MATCH_NOMATCH);
-            }
-          /* Control never gets here */
-
-          case PT_SC:
-          for (fi = min;; fi++)
-            {
-            RMATCH(eptr, ecode, offset_top, md, eptrb, RM40);
-            if (rrc != MATCH_NOMATCH) RRETURN(rrc);
-            if (fi >= max) RRETURN(MATCH_NOMATCH);
-            if (eptr >= md->end_subject)
-              {
-              SCHECK_PARTIAL();
-              RRETURN(MATCH_NOMATCH);
-              }
-            GETCHARINCTEST(c, eptr);
-            if ((UCD_SCRIPT(c) == prop_value) == prop_fail_result)
-              RRETURN(MATCH_NOMATCH);
-            }
-          /* Control never gets here */
-
-          case PT_ALNUM:
-          for (fi = min;; fi++)
-            {
-            int category;
-            RMATCH(eptr, ecode, offset_top, md, eptrb, RM59);
-            if (rrc != MATCH_NOMATCH) RRETURN(rrc);
-            if (fi >= max) RRETURN(MATCH_NOMATCH);
-            if (eptr >= md->end_subject)
-              {
-              SCHECK_PARTIAL();
-              RRETURN(MATCH_NOMATCH);
-              }
-            GETCHARINCTEST(c, eptr);
-            category = UCD_CATEGORY(c);
-            if ((category == ucp_L || category == ucp_N) == prop_fail_result)
-              RRETURN(MATCH_NOMATCH);
-            }
-          /* Control never gets here */
-
-          /* Perl space used to exclude VT, but from Perl 5.18 it is included,
-          which means that Perl space and POSIX space are now identical. PCRE
-          was changed at release 8.34. */
-
-          case PT_SPACE:    /* Perl space */
-          case PT_PXSPACE:  /* POSIX space */
-          for (fi = min;; fi++)
-            {
-            RMATCH(eptr, ecode, offset_top, md, eptrb, RM61);
-            if (rrc != MATCH_NOMATCH) RRETURN(rrc);
-            if (fi >= max) RRETURN(MATCH_NOMATCH);
-            if (eptr >= md->end_subject)
-              {
-              SCHECK_PARTIAL();
-              RRETURN(MATCH_NOMATCH);
-              }
-            GETCHARINCTEST(c, eptr);
-            switch(c)
-              {
-              HSPACE_CASES:
-              VSPACE_CASES:
-              if (prop_fail_result) RRETURN(MATCH_NOMATCH);
-              break;
-
-              default:
-              if ((UCD_CATEGORY(c) == ucp_Z) == prop_fail_result)
-                RRETURN(MATCH_NOMATCH);
-              break;
-              }
-            }
-          /* Control never gets here */
-
-          case PT_WORD:
-          for (fi = min;; fi++)
-            {
-            int category;
-            RMATCH(eptr, ecode, offset_top, md, eptrb, RM62);
-            if (rrc != MATCH_NOMATCH) RRETURN(rrc);
-            if (fi >= max) RRETURN(MATCH_NOMATCH);
-            if (eptr >= md->end_subject)
-              {
-              SCHECK_PARTIAL();
-              RRETURN(MATCH_NOMATCH);
-              }
-            GETCHARINCTEST(c, eptr);
-            category = UCD_CATEGORY(c);
-            if ((category == ucp_L ||
-                 category == ucp_N ||
-                 c == CHAR_UNDERSCORE)
-                   == prop_fail_result)
-              RRETURN(MATCH_NOMATCH);
-            }
-          /* Control never gets here */
-
-          case PT_CLIST:
-          for (fi = min;; fi++)
-            {
-            const pcre_uint32 *cp;
-            RMATCH(eptr, ecode, offset_top, md, eptrb, RM67);
-            if (rrc != MATCH_NOMATCH) RRETURN(rrc);
-            if (fi >= max) RRETURN(MATCH_NOMATCH);
-            if (eptr >= md->end_subject)
-              {
-              SCHECK_PARTIAL();
-              RRETURN(MATCH_NOMATCH);
-              }
-            GETCHARINCTEST(c, eptr);
-            cp = PRIV(ucd_caseless_sets) + prop_value;
-            for (;;)
-              {
-              if (c < *cp)
-                { if (prop_fail_result) break; else { RRETURN(MATCH_NOMATCH); } }
-              if (c == *cp++)
-                { if (prop_fail_result) { RRETURN(MATCH_NOMATCH); } else break; }
-              }
-            }
-          /* Control never gets here */
-
-          case PT_UCNC:
-          for (fi = min;; fi++)
-            {
-            RMATCH(eptr, ecode, offset_top, md, eptrb, RM60);
-            if (rrc != MATCH_NOMATCH) RRETURN(rrc);
-            if (fi >= max) RRETURN(MATCH_NOMATCH);
-            if (eptr >= md->end_subject)
-              {
-              SCHECK_PARTIAL();
-              RRETURN(MATCH_NOMATCH);
-              }
-            GETCHARINCTEST(c, eptr);
-            if ((c == CHAR_DOLLAR_SIGN || c == CHAR_COMMERCIAL_AT ||
-                 c == CHAR_GRAVE_ACCENT || (c >= 0xa0 && c <= 0xd7ff) ||
-                 c >= 0xe000) == prop_fail_result)
-              RRETURN(MATCH_NOMATCH);
-            }
-          /* Control never gets here */
-
-          /* This should never occur */
-          default:
-          RRETURN(PCRE_ERROR_INTERNAL);
-          }
-        }
-
-      /* Match extended Unicode sequences. We will get here only if the
-      support is in the binary; otherwise a compile-time error occurs. */
-
-      else if (ctype == OP_EXTUNI)
-        {
-        for (fi = min;; fi++)
-          {
-          RMATCH(eptr, ecode, offset_top, md, eptrb, RM41);
-          if (rrc != MATCH_NOMATCH) RRETURN(rrc);
-          if (fi >= max) RRETURN(MATCH_NOMATCH);
-          if (eptr >= md->end_subject)
-            {
-            SCHECK_PARTIAL();
-            RRETURN(MATCH_NOMATCH);
-            }
-          else
-            {
-            int lgb, rgb;
-            GETCHARINCTEST(c, eptr);
-            lgb = UCD_GRAPHBREAK(c);
-            while (eptr < md->end_subject)
-              {
-              int len = 1;
-              if (!utf) c = *eptr; else { GETCHARLEN(c, eptr, len); }
-              rgb = UCD_GRAPHBREAK(c);
-              if ((PRIV(ucp_gbtable)[lgb] & (1 << rgb)) == 0) break;
-              lgb = rgb;
-              eptr += len;
-              }
-            }
-          CHECK_PARTIAL();
-          }
-        }
-      else
-#endif     /* SUPPORT_UCP */
-
-#ifdef SUPPORT_UTF
-      if (utf)
-        {
-        for (fi = min;; fi++)
-          {
-          RMATCH(eptr, ecode, offset_top, md, eptrb, RM42);
-          if (rrc != MATCH_NOMATCH) RRETURN(rrc);
-          if (fi >= max) RRETURN(MATCH_NOMATCH);
-          if (eptr >= md->end_subject)
-            {
-            SCHECK_PARTIAL();
-            RRETURN(MATCH_NOMATCH);
-            }
-          if (ctype == OP_ANY && IS_NEWLINE(eptr))
-            RRETURN(MATCH_NOMATCH);
-          GETCHARINC(c, eptr);
-          switch(ctype)
-            {
-            case OP_ANY:               /* This is the non-NL case */
-            if (md->partial != 0 &&    /* Take care with CRLF partial */
-                eptr >= md->end_subject &&
-                NLBLOCK->nltype == NLTYPE_FIXED &&
-                NLBLOCK->nllen == 2 &&
-                c == NLBLOCK->nl[0])
-              {
-              md->hitend = TRUE;
-              if (md->partial > 1) RRETURN(PCRE_ERROR_PARTIAL);
-              }
-            break;
-
-            case OP_ALLANY:
-            case OP_ANYBYTE:
-            break;
-
-            case OP_ANYNL:
-            switch(c)
-              {
-              default: RRETURN(MATCH_NOMATCH);
-              case CHAR_CR:
-              if (eptr < md->end_subject && UCHAR21(eptr) == CHAR_LF) eptr++;
-              break;
-
-              case CHAR_LF:
-              break;
-
-              case CHAR_VT:
-              case CHAR_FF:
-              case CHAR_NEL:
-#ifndef EBCDIC
-              case 0x2028:
-              case 0x2029:
-#endif  /* Not EBCDIC */
-              if (md->bsr_anycrlf) RRETURN(MATCH_NOMATCH);
-              break;
-              }
-            break;
-
-            case OP_NOT_HSPACE:
-            switch(c)
-              {
-              HSPACE_CASES: RRETURN(MATCH_NOMATCH);
-              default: break;
-              }
-            break;
-
-            case OP_HSPACE:
-            switch(c)
-              {
-              HSPACE_CASES: break;
-              default: RRETURN(MATCH_NOMATCH);
-              }
-            break;
-
-            case OP_NOT_VSPACE:
-            switch(c)
-              {
-              VSPACE_CASES: RRETURN(MATCH_NOMATCH);
-              default: break;
-              }
-            break;
-
-            case OP_VSPACE:
-            switch(c)
-              {
-              VSPACE_CASES: break;
-              default: RRETURN(MATCH_NOMATCH);
-              }
-            break;
-
-            case OP_NOT_DIGIT:
-            if (c < 256 && (md->ctypes[c] & ctype_digit) != 0)
-              RRETURN(MATCH_NOMATCH);
-            break;
-
-            case OP_DIGIT:
-            if (c >= 256 || (md->ctypes[c] & ctype_digit) == 0)
-              RRETURN(MATCH_NOMATCH);
-            break;
-
-            case OP_NOT_WHITESPACE:
-            if (c < 256 && (md->ctypes[c] & ctype_space) != 0)
-              RRETURN(MATCH_NOMATCH);
-            break;
-
-            case OP_WHITESPACE:
-            if (c >= 256 || (md->ctypes[c] & ctype_space) == 0)
-              RRETURN(MATCH_NOMATCH);
-            break;
-
-            case OP_NOT_WORDCHAR:
-            if (c < 256 && (md->ctypes[c] & ctype_word) != 0)
-              RRETURN(MATCH_NOMATCH);
-            break;
-
-            case OP_WORDCHAR:
-            if (c >= 256 || (md->ctypes[c] & ctype_word) == 0)
-              RRETURN(MATCH_NOMATCH);
-            break;
-
-            default:
-            RRETURN(PCRE_ERROR_INTERNAL);
-            }
-          }
-        }
-      else
-#endif
-      /* Not UTF mode */
-        {
-        for (fi = min;; fi++)
-          {
-          RMATCH(eptr, ecode, offset_top, md, eptrb, RM43);
-          if (rrc != MATCH_NOMATCH) RRETURN(rrc);
-          if (fi >= max) RRETURN(MATCH_NOMATCH);
-          if (eptr >= md->end_subject)
-            {
-            SCHECK_PARTIAL();
-            RRETURN(MATCH_NOMATCH);
-            }
-          if (ctype == OP_ANY && IS_NEWLINE(eptr))
-            RRETURN(MATCH_NOMATCH);
-          c = *eptr++;
-          switch(ctype)
-            {
-            case OP_ANY:               /* This is the non-NL case */
-            if (md->partial != 0 &&    /* Take care with CRLF partial */
-                eptr >= md->end_subject &&
-                NLBLOCK->nltype == NLTYPE_FIXED &&
-                NLBLOCK->nllen == 2 &&
-                c == NLBLOCK->nl[0])
-              {
-              md->hitend = TRUE;
-              if (md->partial > 1) RRETURN(PCRE_ERROR_PARTIAL);
-              }
-            break;
-
-            case OP_ALLANY:
-            case OP_ANYBYTE:
-            break;
-
-            case OP_ANYNL:
-            switch(c)
-              {
-              default: RRETURN(MATCH_NOMATCH);
-              case CHAR_CR:
-              if (eptr < md->end_subject && *eptr == CHAR_LF) eptr++;
-              break;
-
-              case CHAR_LF:
-              break;
-
-              case CHAR_VT:
-              case CHAR_FF:
-              case CHAR_NEL:
-#if defined COMPILE_PCRE16 || defined COMPILE_PCRE32
-              case 0x2028:
-              case 0x2029:
-#endif
-              if (md->bsr_anycrlf) RRETURN(MATCH_NOMATCH);
-              break;
-              }
-            break;
-
-            case OP_NOT_HSPACE:
-            switch(c)
-              {
-              default: break;
-              HSPACE_BYTE_CASES:
-#if defined COMPILE_PCRE16 || defined COMPILE_PCRE32
-              HSPACE_MULTIBYTE_CASES:
-#endif
-              RRETURN(MATCH_NOMATCH);
-              }
-            break;
-
-            case OP_HSPACE:
-            switch(c)
-              {
-              default: RRETURN(MATCH_NOMATCH);
-              HSPACE_BYTE_CASES:
-#if defined COMPILE_PCRE16 || defined COMPILE_PCRE32
-              HSPACE_MULTIBYTE_CASES:
-#endif
-              break;
-              }
-            break;
-
-            case OP_NOT_VSPACE:
-            switch(c)
-              {
-              default: break;
-              VSPACE_BYTE_CASES:
-#if defined COMPILE_PCRE16 || defined COMPILE_PCRE32
-              VSPACE_MULTIBYTE_CASES:
-#endif
-              RRETURN(MATCH_NOMATCH);
-              }
-            break;
-
-            case OP_VSPACE:
-            switch(c)
-              {
-              default: RRETURN(MATCH_NOMATCH);
-              VSPACE_BYTE_CASES:
-#if defined COMPILE_PCRE16 || defined COMPILE_PCRE32
-              VSPACE_MULTIBYTE_CASES:
-#endif
-              break;
-              }
-            break;
-
-            case OP_NOT_DIGIT:
-            if (MAX_255(c) && (md->ctypes[c] & ctype_digit) != 0) RRETURN(MATCH_NOMATCH);
-            break;
-
-            case OP_DIGIT:
-            if (!MAX_255(c) || (md->ctypes[c] & ctype_digit) == 0) RRETURN(MATCH_NOMATCH);
-            break;
-
-            case OP_NOT_WHITESPACE:
-            if (MAX_255(c) && (md->ctypes[c] & ctype_space) != 0) RRETURN(MATCH_NOMATCH);
-            break;
-
-            case OP_WHITESPACE:
-            if (!MAX_255(c) || (md->ctypes[c] & ctype_space) == 0) RRETURN(MATCH_NOMATCH);
-            break;
-
-            case OP_NOT_WORDCHAR:
-            if (MAX_255(c) && (md->ctypes[c] & ctype_word) != 0) RRETURN(MATCH_NOMATCH);
-            break;
-
-            case OP_WORDCHAR:
-            if (!MAX_255(c) || (md->ctypes[c] & ctype_word) == 0) RRETURN(MATCH_NOMATCH);
-            break;
-
-            default:
-            RRETURN(PCRE_ERROR_INTERNAL);
-            }
-          }
-        }
-      /* Control never gets here */
-      }
-
-    /* If maximizing, it is worth using inline code for speed, doing the type
-    test once at the start (i.e. keep it out of the loop). Again, keep the
-    UTF-8 and UCP stuff separate. */
-
-    else
-      {
-      pp = eptr;  /* Remember where we started */
-
-#ifdef SUPPORT_UCP
-      if (prop_type >= 0)
-        {
-        switch(prop_type)
-          {
-          case PT_ANY:
-          for (i = min; i < max; i++)
-            {
-            int len = 1;
-            if (eptr >= md->end_subject)
-              {
-              SCHECK_PARTIAL();
-              break;
-              }
-            GETCHARLENTEST(c, eptr, len);
-            if (prop_fail_result) break;
-            eptr+= len;
-            }
-          break;
-
-          case PT_LAMP:
-          for (i = min; i < max; i++)
-            {
-            int chartype;
-            int len = 1;
-            if (eptr >= md->end_subject)
-              {
-              SCHECK_PARTIAL();
-              break;
-              }
-            GETCHARLENTEST(c, eptr, len);
-            chartype = UCD_CHARTYPE(c);
-            if ((chartype == ucp_Lu ||
-                 chartype == ucp_Ll ||
-                 chartype == ucp_Lt) == prop_fail_result)
-              break;
-            eptr+= len;
-            }
-          break;
-
-          case PT_GC:
-          for (i = min; i < max; i++)
-            {
-            int len = 1;
-            if (eptr >= md->end_subject)
-              {
-              SCHECK_PARTIAL();
-              break;
-              }
-            GETCHARLENTEST(c, eptr, len);
-            if ((UCD_CATEGORY(c) == prop_value) == prop_fail_result) break;
-            eptr+= len;
-            }
-          break;
-
-          case PT_PC:
-          for (i = min; i < max; i++)
-            {
-            int len = 1;
-            if (eptr >= md->end_subject)
-              {
-              SCHECK_PARTIAL();
-              break;
-              }
-            GETCHARLENTEST(c, eptr, len);
-            if ((UCD_CHARTYPE(c) == prop_value) == prop_fail_result) break;
-            eptr+= len;
-            }
-          break;
-
-          case PT_SC:
-          for (i = min; i < max; i++)
-            {
-            int len = 1;
-            if (eptr >= md->end_subject)
-              {
-              SCHECK_PARTIAL();
-              break;
-              }
-            GETCHARLENTEST(c, eptr, len);
-            if ((UCD_SCRIPT(c) == prop_value) == prop_fail_result) break;
-            eptr+= len;
-            }
-          break;
-
-          case PT_ALNUM:
-          for (i = min; i < max; i++)
-            {
-            int category;
-            int len = 1;
-            if (eptr >= md->end_subject)
-              {
-              SCHECK_PARTIAL();
-              break;
-              }
-            GETCHARLENTEST(c, eptr, len);
-            category = UCD_CATEGORY(c);
-            if ((category == ucp_L || category == ucp_N) == prop_fail_result)
-              break;
-            eptr+= len;
-            }
-          break;
-
-          /* Perl space used to exclude VT, but from Perl 5.18 it is included,
-          which means that Perl space and POSIX space are now identical. PCRE
-          was changed at release 8.34. */
-
-          case PT_SPACE:    /* Perl space */
-          case PT_PXSPACE:  /* POSIX space */
-          for (i = min; i < max; i++)
-            {
-            int len = 1;
-            if (eptr >= md->end_subject)
-              {
-              SCHECK_PARTIAL();
-              break;
-              }
-            GETCHARLENTEST(c, eptr, len);
-            switch(c)
-              {
-              HSPACE_CASES:
-              VSPACE_CASES:
-              if (prop_fail_result) goto ENDLOOP99;  /* Break the loop */
-              break;
-
-              default:
-              if ((UCD_CATEGORY(c) == ucp_Z) == prop_fail_result)
-                goto ENDLOOP99;   /* Break the loop */
-              break;
-              }
-            eptr+= len;
-            }
-          ENDLOOP99:
-          break;
-
-          case PT_WORD:
-          for (i = min; i < max; i++)
-            {
-            int category;
-            int len = 1;
-            if (eptr >= md->end_subject)
-              {
-              SCHECK_PARTIAL();
-              break;
-              }
-            GETCHARLENTEST(c, eptr, len);
-            category = UCD_CATEGORY(c);
-            if ((category == ucp_L || category == ucp_N ||
-                 c == CHAR_UNDERSCORE) == prop_fail_result)
-              break;
-            eptr+= len;
-            }
-          break;
-
-          case PT_CLIST:
-          for (i = min; i < max; i++)
-            {
-            const pcre_uint32 *cp;
-            int len = 1;
-            if (eptr >= md->end_subject)
-              {
-              SCHECK_PARTIAL();
-              break;
-              }
-            GETCHARLENTEST(c, eptr, len);
-            cp = PRIV(ucd_caseless_sets) + prop_value;
-            for (;;)
-              {
-              if (c < *cp)
-                { if (prop_fail_result) break; else goto GOT_MAX; }
-              if (c == *cp++)
-                { if (prop_fail_result) goto GOT_MAX; else break; }
-              }
-            eptr += len;
-            }
-          GOT_MAX:
-          break;
-
-          case PT_UCNC:
-          for (i = min; i < max; i++)
-            {
-            int len = 1;
-            if (eptr >= md->end_subject)
-              {
-              SCHECK_PARTIAL();
-              break;
-              }
-            GETCHARLENTEST(c, eptr, len);
-            if ((c == CHAR_DOLLAR_SIGN || c == CHAR_COMMERCIAL_AT ||
-                 c == CHAR_GRAVE_ACCENT || (c >= 0xa0 && c <= 0xd7ff) ||
-                 c >= 0xe000) == prop_fail_result)
-              break;
-            eptr += len;
-            }
-          break;
-
-          default:
-          RRETURN(PCRE_ERROR_INTERNAL);
-          }
-
-        /* eptr is now past the end of the maximum run */
-
-        if (possessive) continue;    /* No backtracking */
-        for(;;)
-          {
-          if (eptr == pp) goto TAIL_RECURSE;
-          RMATCH(eptr, ecode, offset_top, md, eptrb, RM44);
-          if (rrc != MATCH_NOMATCH) RRETURN(rrc);
-          eptr--;
-          if (utf) BACKCHAR(eptr);
-          }
-        }
-
-      /* Match extended Unicode grapheme clusters. We will get here only if the
-      support is in the binary; otherwise a compile-time error occurs. */
-
-      else if (ctype == OP_EXTUNI)
-        {
-        for (i = min; i < max; i++)
-          {
-          if (eptr >= md->end_subject)
-            {
-            SCHECK_PARTIAL();
-            break;
-            }
-          else
-            {
-            int lgb, rgb;
-            GETCHARINCTEST(c, eptr);
-            lgb = UCD_GRAPHBREAK(c);
-            while (eptr < md->end_subject)
-              {
-              int len = 1;
-              if (!utf) c = *eptr; else { GETCHARLEN(c, eptr, len); }
-              rgb = UCD_GRAPHBREAK(c);
-              if ((PRIV(ucp_gbtable)[lgb] & (1 << rgb)) == 0) break;
-              lgb = rgb;
-              eptr += len;
-              }
-            }
-          CHECK_PARTIAL();
-          }
-
-        /* eptr is now past the end of the maximum run */
-
-        if (possessive) continue;    /* No backtracking */
-
-        for(;;)
-          {
-          int lgb, rgb;
-          PCRE_PUCHAR fptr;
-
-          if (eptr == pp) goto TAIL_RECURSE;   /* At start of char run */
-          RMATCH(eptr, ecode, offset_top, md, eptrb, RM45);
-          if (rrc != MATCH_NOMATCH) RRETURN(rrc);
-
-          /* Backtracking over an extended grapheme cluster involves inspecting
-          the previous two characters (if present) to see if a break is
-          permitted between them. */
-
-          eptr--;
-          if (!utf) c = *eptr; else
-            {
-            BACKCHAR(eptr);
-            GETCHAR(c, eptr);
-            }
-          rgb = UCD_GRAPHBREAK(c);
-
-          for (;;)
-            {
-            if (eptr == pp) goto TAIL_RECURSE;   /* At start of char run */
-            fptr = eptr - 1;
-            if (!utf) c = *fptr; else
-              {
-              BACKCHAR(fptr);
-              GETCHAR(c, fptr);
-              }
-            lgb = UCD_GRAPHBREAK(c);
-            if ((PRIV(ucp_gbtable)[lgb] & (1 << rgb)) == 0) break;
-            eptr = fptr;
-            rgb = lgb;
-            }
-          }
-        }
-
-      else
-#endif   /* SUPPORT_UCP */
-
-#ifdef SUPPORT_UTF
-      if (utf)
-        {
-        switch(ctype)
-          {
-          case OP_ANY:
-          if (max < INT_MAX)
-            {
-            for (i = min; i < max; i++)
-              {
-              if (eptr >= md->end_subject)
-                {
-                SCHECK_PARTIAL();
-                break;
-                }
-              if (IS_NEWLINE(eptr)) break;
-              if (md->partial != 0 &&    /* Take care with CRLF partial */
-                  eptr + 1 >= md->end_subject &&
-                  NLBLOCK->nltype == NLTYPE_FIXED &&
-                  NLBLOCK->nllen == 2 &&
-                  UCHAR21(eptr) == NLBLOCK->nl[0])
-                {
-                md->hitend = TRUE;
-                if (md->partial > 1) RRETURN(PCRE_ERROR_PARTIAL);
-                }
-              eptr++;
-              ACROSSCHAR(eptr < md->end_subject, *eptr, eptr++);
-              }
-            }
-
-          /* Handle unlimited UTF-8 repeat */
-
-          else
-            {
-            for (i = min; i < max; i++)
-              {
-              if (eptr >= md->end_subject)
-                {
-                SCHECK_PARTIAL();
-                break;
-                }
-              if (IS_NEWLINE(eptr)) break;
-              if (md->partial != 0 &&    /* Take care with CRLF partial */
-                  eptr + 1 >= md->end_subject &&
-                  NLBLOCK->nltype == NLTYPE_FIXED &&
-                  NLBLOCK->nllen == 2 &&
-                  UCHAR21(eptr) == NLBLOCK->nl[0])
-                {
-                md->hitend = TRUE;
-                if (md->partial > 1) RRETURN(PCRE_ERROR_PARTIAL);
-                }
-              eptr++;
-              ACROSSCHAR(eptr < md->end_subject, *eptr, eptr++);
-              }
-            }
-          break;
-
-          case OP_ALLANY:
-          if (max < INT_MAX)
-            {
-            for (i = min; i < max; i++)
-              {
-              if (eptr >= md->end_subject)
-                {
-                SCHECK_PARTIAL();
-                break;
-                }
-              eptr++;
-              ACROSSCHAR(eptr < md->end_subject, *eptr, eptr++);
-              }
-            }
-          else
-            {
-            eptr = md->end_subject;   /* Unlimited UTF-8 repeat */
-            SCHECK_PARTIAL();
-            }
-          break;
-
-          /* The byte case is the same as non-UTF8 */
-
-          case OP_ANYBYTE:
-          c = max - min;
-          if (c > (unsigned int)(md->end_subject - eptr))
-            {
-            eptr = md->end_subject;
-            SCHECK_PARTIAL();
-            }
-          else eptr += c;
-          break;
-
-          case OP_ANYNL:
-          for (i = min; i < max; i++)
-            {
-            int len = 1;
-            if (eptr >= md->end_subject)
-              {
-              SCHECK_PARTIAL();
-              break;
-              }
-            GETCHARLEN(c, eptr, len);
-            if (c == CHAR_CR)
-              {
-              if (++eptr >= md->end_subject) break;
-              if (UCHAR21(eptr) == CHAR_LF) eptr++;
-              }
-            else
-              {
-              if (c != CHAR_LF &&
-                  (md->bsr_anycrlf ||
-                   (c != CHAR_VT && c != CHAR_FF && c != CHAR_NEL
-#ifndef EBCDIC
-                    && c != 0x2028 && c != 0x2029
-#endif  /* Not EBCDIC */
-                    )))
-                break;
-              eptr += len;
-              }
-            }
-          break;
-
-          case OP_NOT_HSPACE:
-          case OP_HSPACE:
-          for (i = min; i < max; i++)
-            {
-            BOOL gotspace;
-            int len = 1;
-            if (eptr >= md->end_subject)
-              {
-              SCHECK_PARTIAL();
-              break;
-              }
-            GETCHARLEN(c, eptr, len);
-            switch(c)
-              {
-              HSPACE_CASES: gotspace = TRUE; break;
-              default: gotspace = FALSE; break;
-              }
-            if (gotspace == (ctype == OP_NOT_HSPACE)) break;
-            eptr += len;
-            }
-          break;
-
-          case OP_NOT_VSPACE:
-          case OP_VSPACE:
-          for (i = min; i < max; i++)
-            {
-            BOOL gotspace;
-            int len = 1;
-            if (eptr >= md->end_subject)
-              {
-              SCHECK_PARTIAL();
-              break;
-              }
-            GETCHARLEN(c, eptr, len);
-            switch(c)
-              {
-              VSPACE_CASES: gotspace = TRUE; break;
-              default: gotspace = FALSE; break;
-              }
-            if (gotspace == (ctype == OP_NOT_VSPACE)) break;
-            eptr += len;
-            }
-          break;
-
-          case OP_NOT_DIGIT:
-          for (i = min; i < max; i++)
-            {
-            int len = 1;
-            if (eptr >= md->end_subject)
-              {
-              SCHECK_PARTIAL();
-              break;
-              }
-            GETCHARLEN(c, eptr, len);
-            if (c < 256 && (md->ctypes[c] & ctype_digit) != 0) break;
-            eptr+= len;
-            }
-          break;
-
-          case OP_DIGIT:
-          for (i = min; i < max; i++)
-            {
-            int len = 1;
-            if (eptr >= md->end_subject)
-              {
-              SCHECK_PARTIAL();
-              break;
-              }
-            GETCHARLEN(c, eptr, len);
-            if (c >= 256 ||(md->ctypes[c] & ctype_digit) == 0) break;
-            eptr+= len;
-            }
-          break;
-
-          case OP_NOT_WHITESPACE:
-          for (i = min; i < max; i++)
-            {
-            int len = 1;
-            if (eptr >= md->end_subject)
-              {
-              SCHECK_PARTIAL();
-              break;
-              }
-            GETCHARLEN(c, eptr, len);
-            if (c < 256 && (md->ctypes[c] & ctype_space) != 0) break;
-            eptr+= len;
-            }
-          break;
-
-          case OP_WHITESPACE:
-          for (i = min; i < max; i++)
-            {
-            int len = 1;
-            if (eptr >= md->end_subject)
-              {
-              SCHECK_PARTIAL();
-              break;
-              }
-            GETCHARLEN(c, eptr, len);
-            if (c >= 256 ||(md->ctypes[c] & ctype_space) == 0) break;
-            eptr+= len;
-            }
-          break;
-
-          case OP_NOT_WORDCHAR:
-          for (i = min; i < max; i++)
-            {
-            int len = 1;
-            if (eptr >= md->end_subject)
-              {
-              SCHECK_PARTIAL();
-              break;
-              }
-            GETCHARLEN(c, eptr, len);
-            if (c < 256 && (md->ctypes[c] & ctype_word) != 0) break;
-            eptr+= len;
-            }
-          break;
-
-          case OP_WORDCHAR:
-          for (i = min; i < max; i++)
-            {
-            int len = 1;
-            if (eptr >= md->end_subject)
-              {
-              SCHECK_PARTIAL();
-              break;
-              }
-            GETCHARLEN(c, eptr, len);
-            if (c >= 256 || (md->ctypes[c] & ctype_word) == 0) break;
-            eptr+= len;
-            }
-          break;
-
-          default:
-          RRETURN(PCRE_ERROR_INTERNAL);
-          }
-
-        if (possessive) continue;    /* No backtracking */
-        for(;;)
-          {
-          if (eptr == pp) goto TAIL_RECURSE;
-          RMATCH(eptr, ecode, offset_top, md, eptrb, RM46);
-          if (rrc != MATCH_NOMATCH) RRETURN(rrc);
-          eptr--;
-          BACKCHAR(eptr);
-          if (ctype == OP_ANYNL && eptr > pp  && UCHAR21(eptr) == CHAR_NL &&
-              UCHAR21(eptr - 1) == CHAR_CR) eptr--;
-          }
-        }
-      else
-#endif  /* SUPPORT_UTF */
-      /* Not UTF mode */
-        {
-        switch(ctype)
-          {
-          case OP_ANY:
-          for (i = min; i < max; i++)
-            {
-            if (eptr >= md->end_subject)
-              {
-              SCHECK_PARTIAL();
-              break;
-              }
-            if (IS_NEWLINE(eptr)) break;
-            if (md->partial != 0 &&    /* Take care with CRLF partial */
-                eptr + 1 >= md->end_subject &&
-                NLBLOCK->nltype == NLTYPE_FIXED &&
-                NLBLOCK->nllen == 2 &&
-                *eptr == NLBLOCK->nl[0])
-              {
-              md->hitend = TRUE;
-              if (md->partial > 1) RRETURN(PCRE_ERROR_PARTIAL);
-              }
-            eptr++;
-            }
-          break;
-
-          case OP_ALLANY:
-          case OP_ANYBYTE:
-          c = max - min;
-          if (c > (unsigned int)(md->end_subject - eptr))
-            {
-            eptr = md->end_subject;
-            SCHECK_PARTIAL();
-            }
-          else eptr += c;
-          break;
-
-          case OP_ANYNL:
-          for (i = min; i < max; i++)
-            {
-            if (eptr >= md->end_subject)
-              {
-              SCHECK_PARTIAL();
-              break;
-              }
-            c = *eptr;
-            if (c == CHAR_CR)
-              {
-              if (++eptr >= md->end_subject) break;
-              if (*eptr == CHAR_LF) eptr++;
-              }
-            else
-              {
-              if (c != CHAR_LF && (md->bsr_anycrlf ||
-                 (c != CHAR_VT && c != CHAR_FF && c != CHAR_NEL
-#if defined COMPILE_PCRE16 || defined COMPILE_PCRE32
-                 && c != 0x2028 && c != 0x2029
-#endif
-                 ))) break;
-              eptr++;
-              }
-            }
-          break;
-
-          case OP_NOT_HSPACE:
-          for (i = min; i < max; i++)
-            {
-            if (eptr >= md->end_subject)
-              {
-              SCHECK_PARTIAL();
-              break;
-              }
-            switch(*eptr)
-              {
-              default: eptr++; break;
-              HSPACE_BYTE_CASES:
-#if defined COMPILE_PCRE16 || defined COMPILE_PCRE32
-              HSPACE_MULTIBYTE_CASES:
-#endif
-              goto ENDLOOP00;
-              }
-            }
-          ENDLOOP00:
-          break;
-
-          case OP_HSPACE:
-          for (i = min; i < max; i++)
-            {
-            if (eptr >= md->end_subject)
-              {
-              SCHECK_PARTIAL();
-              break;
-              }
-            switch(*eptr)
-              {
-              default: goto ENDLOOP01;
-              HSPACE_BYTE_CASES:
-#if defined COMPILE_PCRE16 || defined COMPILE_PCRE32
-              HSPACE_MULTIBYTE_CASES:
-#endif
-              eptr++; break;
-              }
-            }
-          ENDLOOP01:
-          break;
-
-          case OP_NOT_VSPACE:
-          for (i = min; i < max; i++)
-            {
-            if (eptr >= md->end_subject)
-              {
-              SCHECK_PARTIAL();
-              break;
-              }
-            switch(*eptr)
-              {
-              default: eptr++; break;
-              VSPACE_BYTE_CASES:
-#if defined COMPILE_PCRE16 || defined COMPILE_PCRE32
-              VSPACE_MULTIBYTE_CASES:
-#endif
-              goto ENDLOOP02;
-              }
-            }
-          ENDLOOP02:
-          break;
-
-          case OP_VSPACE:
-          for (i = min; i < max; i++)
-            {
-            if (eptr >= md->end_subject)
-              {
-              SCHECK_PARTIAL();
-              break;
-              }
-            switch(*eptr)
-              {
-              default: goto ENDLOOP03;
-              VSPACE_BYTE_CASES:
-#if defined COMPILE_PCRE16 || defined COMPILE_PCRE32
-              VSPACE_MULTIBYTE_CASES:
-#endif
-              eptr++; break;
-              }
-            }
-          ENDLOOP03:
-          break;
-
-          case OP_NOT_DIGIT:
-          for (i = min; i < max; i++)
-            {
-            if (eptr >= md->end_subject)
-              {
-              SCHECK_PARTIAL();
-              break;
-              }
-            if (MAX_255(*eptr) && (md->ctypes[*eptr] & ctype_digit) != 0) break;
-            eptr++;
-            }
-          break;
-
-          case OP_DIGIT:
-          for (i = min; i < max; i++)
-            {
-            if (eptr >= md->end_subject)
-              {
-              SCHECK_PARTIAL();
-              break;
-              }
-            if (!MAX_255(*eptr) || (md->ctypes[*eptr] & ctype_digit) == 0) break;
-            eptr++;
-            }
-          break;
-
-          case OP_NOT_WHITESPACE:
-          for (i = min; i < max; i++)
-            {
-            if (eptr >= md->end_subject)
-              {
-              SCHECK_PARTIAL();
-              break;
-              }
-            if (MAX_255(*eptr) && (md->ctypes[*eptr] & ctype_space) != 0) break;
-            eptr++;
-            }
-          break;
-
-          case OP_WHITESPACE:
-          for (i = min; i < max; i++)
-            {
-            if (eptr >= md->end_subject)
-              {
-              SCHECK_PARTIAL();
-              break;
-              }
-            if (!MAX_255(*eptr) || (md->ctypes[*eptr] & ctype_space) == 0) break;
-            eptr++;
-            }
-          break;
-
-          case OP_NOT_WORDCHAR:
-          for (i = min; i < max; i++)
-            {
-            if (eptr >= md->end_subject)
-              {
-              SCHECK_PARTIAL();
-              break;
-              }
-            if (MAX_255(*eptr) && (md->ctypes[*eptr] & ctype_word) != 0) break;
-            eptr++;
-            }
-          break;
-
-          case OP_WORDCHAR:
-          for (i = min; i < max; i++)
-            {
-            if (eptr >= md->end_subject)
-              {
-              SCHECK_PARTIAL();
-              break;
-              }
-            if (!MAX_255(*eptr) || (md->ctypes[*eptr] & ctype_word) == 0) break;
-            eptr++;
-            }
-          break;
-
-          default:
-          RRETURN(PCRE_ERROR_INTERNAL);
-          }
-
-        if (possessive) continue;    /* No backtracking */
-        for (;;)
-          {
-          if (eptr == pp) goto TAIL_RECURSE;
-          RMATCH(eptr, ecode, offset_top, md, eptrb, RM47);
-          if (rrc != MATCH_NOMATCH) RRETURN(rrc);
-          eptr--;
-          if (ctype == OP_ANYNL && eptr > pp  && *eptr == CHAR_LF &&
-              eptr[-1] == CHAR_CR) eptr--;
-          }
-        }
-
-      /* Control never gets here */
-      }
-
-    /* There's been some horrible disaster. Arrival here can only mean there is
-    something seriously wrong in the code above or the OP_xxx definitions. */
-
-    default:
-    DPRINTF(("Unknown opcode %d\n", *ecode));
-    RRETURN(PCRE_ERROR_UNKNOWN_OPCODE);
-    }
-
-  /* Do not stick any code in here without much thought; it is assumed
-  that "continue" in the code above comes out to here to repeat the main
-  loop. */
-
-  }             /* End of main loop */
-/* Control never reaches here */
-
-
-/* When compiling to use the heap rather than the stack for recursive calls to
-match(), the RRETURN() macro jumps here. The number that is saved in
-frame->Xwhere indicates which label we actually want to return to. */
-
-#ifdef NO_RECURSE
-#define LBL(val) case val: goto L_RM##val;
-HEAP_RETURN:
-switch (frame->Xwhere)
-  {
-  LBL( 1) LBL( 2) LBL( 3) LBL( 4) LBL( 5) LBL( 6) LBL( 7) LBL( 8)
-  LBL( 9) LBL(10) LBL(11) LBL(12) LBL(13) LBL(14) LBL(15) LBL(17)
-  LBL(19) LBL(24) LBL(25) LBL(26) LBL(27) LBL(29) LBL(31) LBL(33)
-  LBL(35) LBL(43) LBL(47) LBL(48) LBL(49) LBL(50) LBL(51) LBL(52)
-  LBL(53) LBL(54) LBL(55) LBL(56) LBL(57) LBL(58) LBL(63) LBL(64)
-  LBL(65) LBL(66)
-#if defined SUPPORT_UTF || !defined COMPILE_PCRE8
-  LBL(20) LBL(21)
-#endif
-#ifdef SUPPORT_UTF
-  LBL(16) LBL(18)
-  LBL(22) LBL(23) LBL(28) LBL(30)
-  LBL(32) LBL(34) LBL(42) LBL(46)
-#ifdef SUPPORT_UCP
-  LBL(36) LBL(37) LBL(38) LBL(39) LBL(40) LBL(41) LBL(44) LBL(45)
-  LBL(59) LBL(60) LBL(61) LBL(62) LBL(67)
-#endif  /* SUPPORT_UCP */
-#endif  /* SUPPORT_UTF */
-  default:
-  DPRINTF(("jump error in pcre match: label %d non-existent\n", frame->Xwhere));
-  return PCRE_ERROR_INTERNAL;
-  }
-#undef LBL
-#endif  /* NO_RECURSE */
-}
-
-
-/***************************************************************************
-****************************************************************************
-                   RECURSION IN THE match() FUNCTION
-
-Undefine all the macros that were defined above to handle this. */
-
-#ifdef NO_RECURSE
-#undef eptr
-#undef ecode
-#undef mstart
-#undef offset_top
-#undef eptrb
-#undef flags
-
-#undef callpat
-#undef charptr
-#undef data
-#undef next
-#undef pp
-#undef prev
-#undef saved_eptr
-
-#undef new_recursive
-
-#undef cur_is_word
-#undef condition
-#undef prev_is_word
-
-#undef ctype
-#undef length
-#undef max
-#undef min
-#undef number
-#undef offset
-#undef op
-#undef save_capture_last
-#undef save_offset1
-#undef save_offset2
-#undef save_offset3
-#undef stacksave
-
-#undef newptrb
-
-#endif
-
-/* These two are defined as macros in both cases */
-
-#undef fc
-#undef fi
-
-/***************************************************************************
-***************************************************************************/
-
-
-#ifdef NO_RECURSE
-/*************************************************
-*          Release allocated heap frames         *
-*************************************************/
-
-/* This function releases all the allocated frames. The base frame is on the
-machine stack, and so must not be freed.
-
-Argument: the address of the base frame
-Returns:  nothing
-*/
-
-static void
-release_match_heapframes (heapframe *frame_base)
-{
-heapframe *nextframe = frame_base->Xnextframe;
-while (nextframe != NULL)
-  {
-  heapframe *oldframe = nextframe;
-  nextframe = nextframe->Xnextframe;
-  (PUBL(stack_free))(oldframe);
-  }
-}
-#endif
-
-
-/*************************************************
-*         Execute a Regular Expression           *
-*************************************************/
-
-/* This function applies a compiled re to a subject string and picks out
-portions of the string if it matches. Two elements in the vector are set for
-each substring: the offsets to the start and end of the substring.
-
-Arguments:
-  argument_re     points to the compiled expression
-  extra_data      points to extra data or is NULL
-  subject         points to the subject string
-  length          length of subject string (may contain binary zeros)
-  start_offset    where to start in the subject string
-  options         option bits
-  offsets         points to a vector of ints to be filled in with offsets
-  offsetcount     the number of elements in the vector
-
-Returns:          > 0 => success; value is the number of elements filled in
-                  = 0 => success, but offsets is not big enough
-                   -1 => failed to match
-                 < -1 => some kind of unexpected problem
-*/
-
-#if defined COMPILE_PCRE8
-PCRE_EXP_DEFN int PCRE_CALL_CONVENTION
-pcre_exec(const pcre *argument_re, const pcre_extra *extra_data,
-  PCRE_SPTR subject, int length, int start_offset, int options, int *offsets,
-  int offsetcount)
-#elif defined COMPILE_PCRE16
-PCRE_EXP_DEFN int PCRE_CALL_CONVENTION
-pcre16_exec(const pcre16 *argument_re, const pcre16_extra *extra_data,
-  PCRE_SPTR16 subject, int length, int start_offset, int options, int *offsets,
-  int offsetcount)
-#elif defined COMPILE_PCRE32
-PCRE_EXP_DEFN int PCRE_CALL_CONVENTION
-pcre32_exec(const pcre32 *argument_re, const pcre32_extra *extra_data,
-  PCRE_SPTR32 subject, int length, int start_offset, int options, int *offsets,
-  int offsetcount)
-#endif
-{
-int rc, ocount, arg_offset_max;
-int newline;
-BOOL using_temporary_offsets = FALSE;
-BOOL anchored;
-BOOL startline;
-BOOL firstline;
-BOOL utf;
-BOOL has_first_char = FALSE;
-BOOL has_req_char = FALSE;
-pcre_uchar first_char = 0;
-pcre_uchar first_char2 = 0;
-pcre_uchar req_char = 0;
-pcre_uchar req_char2 = 0;
-match_data match_block;
-match_data *md = &match_block;
-const pcre_uint8 *tables;
-const pcre_uint8 *start_bits = NULL;
-PCRE_PUCHAR start_match = (PCRE_PUCHAR)subject + start_offset;
-PCRE_PUCHAR end_subject;
-PCRE_PUCHAR start_partial = NULL;
-PCRE_PUCHAR match_partial = NULL;
-PCRE_PUCHAR req_char_ptr = start_match - 1;
-
-const pcre_study_data *study;
-const REAL_PCRE *re = (const REAL_PCRE *)argument_re;
-
-#ifdef NO_RECURSE
-heapframe frame_zero;
-frame_zero.Xprevframe = NULL;            /* Marks the top level */
-frame_zero.Xnextframe = NULL;            /* None are allocated yet */
-md->match_frames_base = &frame_zero;
-#endif
-
-/* Check for the special magic call that measures the size of the stack used
-per recursive call of match(). Without the funny casting for sizeof, a Windows
-compiler gave this error: "unary minus operator applied to unsigned type,
-result still unsigned". Hopefully the cast fixes that. */
-
-if (re == NULL && extra_data == NULL && subject == NULL && length == -999 &&
-    start_offset == -999)
-#ifdef NO_RECURSE
-  return -((int)sizeof(heapframe));
-#else
-  return match(NULL, NULL, NULL, 0, NULL, NULL, 0);
-#endif
-
-/* Plausibility checks */
-
-if ((options & ~PUBLIC_EXEC_OPTIONS) != 0) return PCRE_ERROR_BADOPTION;
-if (re == NULL || subject == NULL || (offsets == NULL && offsetcount > 0))
-  return PCRE_ERROR_NULL;
-if (offsetcount < 0) return PCRE_ERROR_BADCOUNT;
-if (length < 0) return PCRE_ERROR_BADLENGTH;
-if (start_offset < 0 || start_offset > length) return PCRE_ERROR_BADOFFSET;
-
-/* Check that the first field in the block is the magic number. If it is not,
-return with PCRE_ERROR_BADMAGIC. However, if the magic number is equal to
-REVERSED_MAGIC_NUMBER we return with PCRE_ERROR_BADENDIANNESS, which
-means that the pattern is likely compiled with different endianness. */
-
-if (re->magic_number != MAGIC_NUMBER)
-  return re->magic_number == REVERSED_MAGIC_NUMBER?
-    PCRE_ERROR_BADENDIANNESS:PCRE_ERROR_BADMAGIC;
-if ((re->flags & PCRE_MODE) == 0) return PCRE_ERROR_BADMODE;
-
-/* These two settings are used in the code for checking a UTF-8 string that
-follows immediately afterwards. Other values in the md block are used only
-during "normal" pcre_exec() processing, not when the JIT support is in use,
-so they are set up later. */
-
-/* PCRE_UTF16 has the same value as PCRE_UTF8. */
-utf = md->utf = (re->options & PCRE_UTF8) != 0;
-md->partial = ((options & PCRE_PARTIAL_HARD) != 0)? 2 :
-              ((options & PCRE_PARTIAL_SOFT) != 0)? 1 : 0;
-
-/* Check a UTF-8 string if required. Pass back the character offset and error
-code for an invalid string if a results vector is available. */
-
-#ifdef SUPPORT_UTF
-if (utf && (options & PCRE_NO_UTF8_CHECK) == 0)
-  {
-  int erroroffset;
-  int errorcode = PRIV(valid_utf)((PCRE_PUCHAR)subject, length, &erroroffset);
-  if (errorcode != 0)
-    {
-    if (offsetcount >= 2)
-      {
-      offsets[0] = erroroffset;
-      offsets[1] = errorcode;
-      }
-#if defined COMPILE_PCRE8
-    return (errorcode <= PCRE_UTF8_ERR5 && md->partial > 1)?
-      PCRE_ERROR_SHORTUTF8 : PCRE_ERROR_BADUTF8;
-#elif defined COMPILE_PCRE16
-    return (errorcode <= PCRE_UTF16_ERR1 && md->partial > 1)?
-      PCRE_ERROR_SHORTUTF16 : PCRE_ERROR_BADUTF16;
-#elif defined COMPILE_PCRE32
-    return PCRE_ERROR_BADUTF32;
-#endif
-    }
-#if defined COMPILE_PCRE8 || defined COMPILE_PCRE16
-  /* Check that a start_offset points to the start of a UTF character. */
-  if (start_offset > 0 && start_offset < length &&
-      NOT_FIRSTCHAR(((PCRE_PUCHAR)subject)[start_offset]))
-    return PCRE_ERROR_BADUTF8_OFFSET;
-#endif
-  }
-#endif
-
-/* If the pattern was successfully studied with JIT support, run the JIT
-executable instead of the rest of this function. Most options must be set at
-compile time for the JIT code to be usable. Fallback to the normal code path if
-an unsupported flag is set. */
-
-#ifdef SUPPORT_JIT
-if (extra_data != NULL
-    && (extra_data->flags & (PCRE_EXTRA_EXECUTABLE_JIT |
-                             PCRE_EXTRA_TABLES)) == PCRE_EXTRA_EXECUTABLE_JIT
-    && extra_data->executable_jit != NULL
-    && (options & ~PUBLIC_JIT_EXEC_OPTIONS) == 0)
-  {
-  rc = PRIV(jit_exec)(extra_data, (const pcre_uchar *)subject, length,
-       start_offset, options, offsets, offsetcount);
-
-  /* PCRE_ERROR_NULL means that the selected normal or partial matching
-  mode is not compiled. In this case we simply fallback to interpreter. */
-
-  if (rc != PCRE_ERROR_JIT_BADOPTION) return rc;
-  }
-#endif
-
-/* Carry on with non-JIT matching. This information is for finding all the
-numbers associated with a given name, for condition testing. */
-
-md->name_table = (pcre_uchar *)re + re->name_table_offset;
-md->name_count = re->name_count;
-md->name_entry_size = re->name_entry_size;
-
-/* Fish out the optional data from the extra_data structure, first setting
-the default values. */
-
-study = NULL;
-md->match_limit = MATCH_LIMIT;
-md->match_limit_recursion = MATCH_LIMIT_RECURSION;
-md->callout_data = NULL;
-
-/* The table pointer is always in native byte order. */
-
-tables = re->tables;
-
-/* The two limit values override the defaults, whatever their value. */
-
-if (extra_data != NULL)
-  {
-  register unsigned int flags = extra_data->flags;
-  if ((flags & PCRE_EXTRA_STUDY_DATA) != 0)
-    study = (const pcre_study_data *)extra_data->study_data;
-  if ((flags & PCRE_EXTRA_MATCH_LIMIT) != 0)
-    md->match_limit = extra_data->match_limit;
-  if ((flags & PCRE_EXTRA_MATCH_LIMIT_RECURSION) != 0)
-    md->match_limit_recursion = extra_data->match_limit_recursion;
-  if ((flags & PCRE_EXTRA_CALLOUT_DATA) != 0)
-    md->callout_data = extra_data->callout_data;
-  if ((flags & PCRE_EXTRA_TABLES) != 0) tables = extra_data->tables;
-  }
-
-/* Limits in the regex override only if they are smaller. */
-
-if ((re->flags & PCRE_MLSET) != 0 && re->limit_match < md->match_limit)
-  md->match_limit = re->limit_match;
-
-if ((re->flags & PCRE_RLSET) != 0 &&
-    re->limit_recursion < md->match_limit_recursion)
-  md->match_limit_recursion = re->limit_recursion;
-
-/* If the exec call supplied NULL for tables, use the inbuilt ones. This
-is a feature that makes it possible to save compiled regex and re-use them
-in other programs later. */
-
-if (tables == NULL) tables = PRIV(default_tables);
-
-/* Set up other data */
-
-anchored = ((re->options | options) & PCRE_ANCHORED) != 0;
-startline = (re->flags & PCRE_STARTLINE) != 0;
-firstline = (re->options & PCRE_FIRSTLINE) != 0;
-
-/* The code starts after the real_pcre block and the capture name table. */
-
-md->start_code = (const pcre_uchar *)re + re->name_table_offset +
-  re->name_count * re->name_entry_size;
-
-md->start_subject = (PCRE_PUCHAR)subject;
-md->start_offset = start_offset;
-md->end_subject = md->start_subject + length;
-end_subject = md->end_subject;
-
-md->endonly = (re->options & PCRE_DOLLAR_ENDONLY) != 0;
-md->use_ucp = (re->options & PCRE_UCP) != 0;
-md->jscript_compat = (re->options & PCRE_JAVASCRIPT_COMPAT) != 0;
-md->ignore_skip_arg = 0;
-
-/* Some options are unpacked into BOOL variables in the hope that testing
-them will be faster than individual option bits. */
-
-md->notbol = (options & PCRE_NOTBOL) != 0;
-md->noteol = (options & PCRE_NOTEOL) != 0;
-md->notempty = (options & PCRE_NOTEMPTY) != 0;
-md->notempty_atstart = (options & PCRE_NOTEMPTY_ATSTART) != 0;
-
-md->hitend = FALSE;
-md->mark = md->nomatch_mark = NULL;     /* In case never set */
-
-md->recursive = NULL;                   /* No recursion at top level */
-md->hasthen = (re->flags & PCRE_HASTHEN) != 0;
-
-md->lcc = tables + lcc_offset;
-md->fcc = tables + fcc_offset;
-md->ctypes = tables + ctypes_offset;
-
-/* Handle different \R options. */
-
-switch (options & (PCRE_BSR_ANYCRLF|PCRE_BSR_UNICODE))
-  {
-  case 0:
-  if ((re->options & (PCRE_BSR_ANYCRLF|PCRE_BSR_UNICODE)) != 0)
-    md->bsr_anycrlf = (re->options & PCRE_BSR_ANYCRLF) != 0;
-  else
-#ifdef BSR_ANYCRLF
-  md->bsr_anycrlf = TRUE;
-#else
-  md->bsr_anycrlf = FALSE;
-#endif
-  break;
-
-  case PCRE_BSR_ANYCRLF:
-  md->bsr_anycrlf = TRUE;
-  break;
-
-  case PCRE_BSR_UNICODE:
-  md->bsr_anycrlf = FALSE;
-  break;
-
-  default: return PCRE_ERROR_BADNEWLINE;
-  }
-
-/* Handle different types of newline. The three bits give eight cases. If
-nothing is set at run time, whatever was used at compile time applies. */
-
-switch ((((options & PCRE_NEWLINE_BITS) == 0)? re->options :
-        (pcre_uint32)options) & PCRE_NEWLINE_BITS)
-  {
-  case 0: newline = NEWLINE; break;   /* Compile-time default */
-  case PCRE_NEWLINE_CR: newline = CHAR_CR; break;
-  case PCRE_NEWLINE_LF: newline = CHAR_NL; break;
-  case PCRE_NEWLINE_CR+
-       PCRE_NEWLINE_LF: newline = (CHAR_CR << 8) | CHAR_NL; break;
-  case PCRE_NEWLINE_ANY: newline = -1; break;
-  case PCRE_NEWLINE_ANYCRLF: newline = -2; break;
-  default: return PCRE_ERROR_BADNEWLINE;
-  }
-
-if (newline == -2)
-  {
-  md->nltype = NLTYPE_ANYCRLF;
-  }
-else if (newline < 0)
-  {
-  md->nltype = NLTYPE_ANY;
-  }
-else
-  {
-  md->nltype = NLTYPE_FIXED;
-  if (newline > 255)
-    {
-    md->nllen = 2;
-    md->nl[0] = (newline >> 8) & 255;
-    md->nl[1] = newline & 255;
-    }
-  else
-    {
-    md->nllen = 1;
-    md->nl[0] = newline;
-    }
-  }
-
-/* Partial matching was originally supported only for a restricted set of
-regexes; from release 8.00 there are no restrictions, but the bits are still
-defined (though never set). So there's no harm in leaving this code. */
-
-if (md->partial && (re->flags & PCRE_NOPARTIAL) != 0)
-  return PCRE_ERROR_BADPARTIAL;
-
-/* If the expression has got more back references than the offsets supplied can
-hold, we get a temporary chunk of working store to use during the matching.
-Otherwise, we can use the vector supplied, rounding down its size to a multiple
-of 3. */
-
-ocount = offsetcount - (offsetcount % 3);
-arg_offset_max = (2*ocount)/3;
-
-if (re->top_backref > 0 && re->top_backref >= ocount/3)
-  {
-  ocount = re->top_backref * 3 + 3;
-  md->offset_vector = (int *)(PUBL(malloc))(ocount * sizeof(int));
-  if (md->offset_vector == NULL) return PCRE_ERROR_NOMEMORY;
-  using_temporary_offsets = TRUE;
-  DPRINTF(("Got memory to hold back references\n"));
-  }
-else md->offset_vector = offsets;
-md->offset_end = ocount;
-md->offset_max = (2*ocount)/3;
-md->capture_last = 0;
-
-/* Reset the working variable associated with each extraction. These should
-never be used unless previously set, but they get saved and restored, and so we
-initialize them to avoid reading uninitialized locations. Also, unset the
-offsets for the matched string. This is really just for tidiness with callouts,
-in case they inspect these fields. */
-
-if (md->offset_vector != NULL)
-  {
-  register int *iptr = md->offset_vector + ocount;
-  register int *iend = iptr - re->top_bracket;
-  if (iend < md->offset_vector + 2) iend = md->offset_vector + 2;
-  while (--iptr >= iend) *iptr = -1;
-  md->offset_vector[0] = md->offset_vector[1] = -1;
-  }
-
-/* Set up the first character to match, if available. The first_char value is
-never set for an anchored regular expression, but the anchoring may be forced
-at run time, so we have to test for anchoring. The first char may be unset for
-an unanchored pattern, of course. If there's no first char and the pattern was
-studied, there may be a bitmap of possible first characters. */
-
-if (!anchored)
-  {
-  if ((re->flags & PCRE_FIRSTSET) != 0)
-    {
-    has_first_char = TRUE;
-    first_char = first_char2 = (pcre_uchar)(re->first_char);
-    if ((re->flags & PCRE_FCH_CASELESS) != 0)
-      {
-      first_char2 = TABLE_GET(first_char, md->fcc, first_char);
-#if defined SUPPORT_UCP && !(defined COMPILE_PCRE8)
-      if (utf && first_char > 127)
-        first_char2 = UCD_OTHERCASE(first_char);
-#endif
-      }
-    }
-  else
-    if (!startline && study != NULL &&
-      (study->flags & PCRE_STUDY_MAPPED) != 0)
-        start_bits = study->start_bits;
-  }
-
-/* For anchored or unanchored matches, there may be a "last known required
-character" set. */
-
-if ((re->flags & PCRE_REQCHSET) != 0)
-  {
-  has_req_char = TRUE;
-  req_char = req_char2 = (pcre_uchar)(re->req_char);
-  if ((re->flags & PCRE_RCH_CASELESS) != 0)
-    {
-    req_char2 = TABLE_GET(req_char, md->fcc, req_char);
-#if defined SUPPORT_UCP && !(defined COMPILE_PCRE8)
-    if (utf && req_char > 127)
-      req_char2 = UCD_OTHERCASE(req_char);
-#endif
-    }
-  }
-
-
-/* ==========================================================================*/
-
-/* Loop for handling unanchored repeated matching attempts; for anchored regexs
-the loop runs just once. */
-
-for(;;)
-  {
-  PCRE_PUCHAR save_end_subject = end_subject;
-  PCRE_PUCHAR new_start_match;
-
-  /* If firstline is TRUE, the start of the match is constrained to the first
-  line of a multiline string. That is, the match must be before or at the first
-  newline. Implement this by temporarily adjusting end_subject so that we stop
-  scanning at a newline. If the match fails at the newline, later code breaks
-  this loop. */
-
-  if (firstline)
-    {
-    PCRE_PUCHAR t = start_match;
-#ifdef SUPPORT_UTF
-    if (utf)
-      {
-      while (t < md->end_subject && !IS_NEWLINE(t))
-        {
-        t++;
-        ACROSSCHAR(t < end_subject, *t, t++);
-        }
-      }
-    else
-#endif
-    while (t < md->end_subject && !IS_NEWLINE(t)) t++;
-    end_subject = t;
-    }
-
-  /* There are some optimizations that avoid running the match if a known
-  starting point is not found, or if a known later character is not present.
-  However, there is an option that disables these, for testing and for ensuring
-  that all callouts do actually occur. The option can be set in the regex by
-  (*NO_START_OPT) or passed in match-time options. */
-
-  if (((options | re->options) & PCRE_NO_START_OPTIMIZE) == 0)
-    {
-    /* Advance to a unique first char if there is one. */
-
-    if (has_first_char)
-      {
-      pcre_uchar smc;
-
-      if (first_char != first_char2)
-        while (start_match < end_subject &&
-          (smc = UCHAR21TEST(start_match)) != first_char && smc != first_char2)
-          start_match++;
-      else
-        while (start_match < end_subject && UCHAR21TEST(start_match) != first_char)
-          start_match++;
-      }
-
-    /* Or to just after a linebreak for a multiline match */
-
-    else if (startline)
-      {
-      if (start_match > md->start_subject + start_offset)
-        {
-#ifdef SUPPORT_UTF
-        if (utf)
-          {
-          while (start_match < end_subject && !WAS_NEWLINE(start_match))
-            {
-            start_match++;
-            ACROSSCHAR(start_match < end_subject, *start_match,
-              start_match++);
-            }
-          }
-        else
-#endif
-        while (start_match < end_subject && !WAS_NEWLINE(start_match))
-          start_match++;
-
-        /* If we have just passed a CR and the newline option is ANY or ANYCRLF,
-        and we are now at a LF, advance the match position by one more character.
-        */
-
-        if (start_match[-1] == CHAR_CR &&
-             (md->nltype == NLTYPE_ANY || md->nltype == NLTYPE_ANYCRLF) &&
-             start_match < end_subject &&
-             UCHAR21TEST(start_match) == CHAR_NL)
-          start_match++;
-        }
-      }
-
-    /* Or to a non-unique first byte after study */
-
-    else if (start_bits != NULL)
-      {
-      while (start_match < end_subject)
-        {
-        register pcre_uint32 c = UCHAR21TEST(start_match);
-#ifndef COMPILE_PCRE8
-        if (c > 255) c = 255;
-#endif
-        if ((start_bits[c/8] & (1 << (c&7))) != 0) break;
-        start_match++;
-        }
-      }
-    }   /* Starting optimizations */
-
-  /* Restore fudged end_subject */
-
-  end_subject = save_end_subject;
-
-  /* The following two optimizations are disabled for partial matching or if
-  disabling is explicitly requested. */
-
-  if (((options | re->options) & PCRE_NO_START_OPTIMIZE) == 0 && !md->partial)
-    {
-    /* If the pattern was studied, a minimum subject length may be set. This is
-    a lower bound; no actual string of that length may actually match the
-    pattern. Although the value is, strictly, in characters, we treat it as
-    bytes to avoid spending too much time in this optimization. */
-
-    if (study != NULL && (study->flags & PCRE_STUDY_MINLEN) != 0 &&
-        (pcre_uint32)(end_subject - start_match) < study->minlength)
-      {
-      rc = MATCH_NOMATCH;
-      break;
-      }
-
-    /* If req_char is set, we know that that character must appear in the
-    subject for the match to succeed. If the first character is set, req_char
-    must be later in the subject; otherwise the test starts at the match point.
-    This optimization can save a huge amount of backtracking in patterns with
-    nested unlimited repeats that aren't going to match. Writing separate code
-    for cased/caseless versions makes it go faster, as does using an
-    autoincrement and backing off on a match.
-
-    HOWEVER: when the subject string is very, very long, searching to its end
-    can take a long time, and give bad performance on quite ordinary patterns.
-    This showed up when somebody was matching something like /^\d+C/ on a
-    32-megabyte string... so we don't do this when the string is sufficiently
-    long. */
-
-    if (has_req_char && end_subject - start_match < REQ_BYTE_MAX)
-      {
-      register PCRE_PUCHAR p = start_match + (has_first_char? 1:0);
-
-      /* We don't need to repeat the search if we haven't yet reached the
-      place we found it at last time. */
-
-      if (p > req_char_ptr)
-        {
-        if (req_char != req_char2)
-          {
-          while (p < end_subject)
-            {
-            register pcre_uint32 pp = UCHAR21INCTEST(p);
-            if (pp == req_char || pp == req_char2) { p--; break; }
-            }
-          }
-        else
-          {
-          while (p < end_subject)
-            {
-            if (UCHAR21INCTEST(p) == req_char) { p--; break; }
-            }
-          }
-
-        /* If we can't find the required character, break the matching loop,
-        forcing a match failure. */
-
-        if (p >= end_subject)
-          {
-          rc = MATCH_NOMATCH;
-          break;
-          }
-
-        /* If we have found the required character, save the point where we
-        found it, so that we don't search again next time round the loop if
-        the start hasn't passed this character yet. */
-
-        req_char_ptr = p;
-        }
-      }
-    }
-
-#ifdef PCRE_DEBUG  /* Sigh. Some compilers never learn. */
-  printf(">>>> Match against: ");
-  pchars(start_match, end_subject - start_match, TRUE, md);
-  printf("\n");
-#endif
-
-  /* OK, we can now run the match. If "hitend" is set afterwards, remember the
-  first starting point for which a partial match was found. */
-
-  md->start_match_ptr = start_match;
-  md->start_used_ptr = start_match;
-  md->match_call_count = 0;
-  md->match_function_type = 0;
-  md->end_offset_top = 0;
-  md->skip_arg_count = 0;
-  rc = match(start_match, md->start_code, start_match, 2, md, NULL, 0);
-  if (md->hitend && start_partial == NULL)
-    {
-    start_partial = md->start_used_ptr;
-    match_partial = start_match;
-    }
-
-  switch(rc)
-    {
-    /* If MATCH_SKIP_ARG reaches this level it means that a MARK that matched
-    the SKIP's arg was not found. In this circumstance, Perl ignores the SKIP
-    entirely. The only way we can do that is to re-do the match at the same
-    point, with a flag to force SKIP with an argument to be ignored. Just
-    treating this case as NOMATCH does not work because it does not check other
-    alternatives in patterns such as A(*SKIP:A)B|AC when the subject is AC. */
-
-    case MATCH_SKIP_ARG:
-    new_start_match = start_match;
-    md->ignore_skip_arg = md->skip_arg_count;
-    break;
-
-    /* SKIP passes back the next starting point explicitly, but if it is no
-    greater than the match we have just done, treat it as NOMATCH. */
-
-    case MATCH_SKIP:
-    if (md->start_match_ptr > start_match)
-      {
-      new_start_match = md->start_match_ptr;
-      break;
-      }
-    /* Fall through */
-
-    /* NOMATCH and PRUNE advance by one character. THEN at this level acts
-    exactly like PRUNE. Unset ignore SKIP-with-argument. */
-
-    case MATCH_NOMATCH:
-    case MATCH_PRUNE:
-    case MATCH_THEN:
-    md->ignore_skip_arg = 0;
-    new_start_match = start_match + 1;
-#ifdef SUPPORT_UTF
-    if (utf)
-      ACROSSCHAR(new_start_match < end_subject, *new_start_match,
-        new_start_match++);
-#endif
-    break;
-
-    /* COMMIT disables the bumpalong, but otherwise behaves as NOMATCH. */
-
-    case MATCH_COMMIT:
-    rc = MATCH_NOMATCH;
-    goto ENDLOOP;
-
-    /* Any other return is either a match, or some kind of error. */
-
-    default:
-    goto ENDLOOP;
-    }
-
-  /* Control reaches here for the various types of "no match at this point"
-  result. Reset the code to MATCH_NOMATCH for subsequent checking. */
-
-  rc = MATCH_NOMATCH;
-
-  /* If PCRE_FIRSTLINE is set, the match must happen before or at the first
-  newline in the subject (though it may continue over the newline). Therefore,
-  if we have just failed to match, starting at a newline, do not continue. */
-
-  if (firstline && IS_NEWLINE(start_match)) break;
-
-  /* Advance to new matching position */
-
-  start_match = new_start_match;
-
-  /* Break the loop if the pattern is anchored or if we have passed the end of
-  the subject. */
-
-  if (anchored || start_match > end_subject) break;
-
-  /* If we have just passed a CR and we are now at a LF, and the pattern does
-  not contain any explicit matches for \r or \n, and the newline option is CRLF
-  or ANY or ANYCRLF, advance the match position by one more character. In
-  normal matching start_match will aways be greater than the first position at
-  this stage, but a failed *SKIP can cause a return at the same point, which is
-  why the first test exists. */
-
-  if (start_match > (PCRE_PUCHAR)subject + start_offset &&
-      start_match[-1] == CHAR_CR &&
-      start_match < end_subject &&
-      *start_match == CHAR_NL &&
-      (re->flags & PCRE_HASCRORLF) == 0 &&
-        (md->nltype == NLTYPE_ANY ||
-         md->nltype == NLTYPE_ANYCRLF ||
-         md->nllen == 2))
-    start_match++;
-
-  md->mark = NULL;   /* Reset for start of next match attempt */
-  }                  /* End of for(;;) "bumpalong" loop */
-
-/* ==========================================================================*/
-
-/* We reach here when rc is not MATCH_NOMATCH, or if one of the stopping
-conditions is true:
-
-(1) The pattern is anchored or the match was failed by (*COMMIT);
-
-(2) We are past the end of the subject;
-
-(3) PCRE_FIRSTLINE is set and we have failed to match at a newline, because
-    this option requests that a match occur at or before the first newline in
-    the subject.
-
-When we have a match and the offset vector is big enough to deal with any
-backreferences, captured substring offsets will already be set up. In the case
-where we had to get some local store to hold offsets for backreference
-processing, copy those that we can. In this case there need not be overflow if
-certain parts of the pattern were not used, even though there are more
-capturing parentheses than vector slots. */
-
-ENDLOOP:
-
-if (rc == MATCH_MATCH || rc == MATCH_ACCEPT)
-  {
-  if (using_temporary_offsets)
-    {
-    if (arg_offset_max >= 4)
-      {
-      memcpy(offsets + 2, md->offset_vector + 2,
-        (arg_offset_max - 2) * sizeof(int));
-      DPRINTF(("Copied offsets from temporary memory\n"));
-      }
-    if (md->end_offset_top > arg_offset_max) md->capture_last |= OVFLBIT;
-    DPRINTF(("Freeing temporary memory\n"));
-    (PUBL(free))(md->offset_vector);
-    }
-
-  /* Set the return code to the number of captured strings, or 0 if there were
-  too many to fit into the vector. */
-
-  rc = ((md->capture_last & OVFLBIT) != 0 &&
-         md->end_offset_top >= arg_offset_max)?
-    0 : md->end_offset_top/2;
-
-  /* If there is space in the offset vector, set any unused pairs at the end of
-  the pattern to -1 for backwards compatibility. It is documented that this
-  happens. In earlier versions, the whole set of potential capturing offsets
-  was set to -1 each time round the loop, but this is handled differently now.
-  "Gaps" are set to -1 dynamically instead (this fixes a bug). Thus, it is only
-  those at the end that need unsetting here. We can't just unset them all at
-  the start of the whole thing because they may get set in one branch that is
-  not the final matching branch. */
-
-  if (md->end_offset_top/2 <= re->top_bracket && offsets != NULL)
-    {
-    register int *iptr, *iend;
-    int resetcount = 2 + re->top_bracket * 2;
-    if (resetcount > offsetcount) resetcount = offsetcount;
-    iptr = offsets + md->end_offset_top;
-    iend = offsets + resetcount;
-    while (iptr < iend) *iptr++ = -1;
-    }
-
-  /* If there is space, set up the whole thing as substring 0. The value of
-  md->start_match_ptr might be modified if \K was encountered on the success
-  matching path. */
-
-  if (offsetcount < 2) rc = 0; else
-    {
-    offsets[0] = (int)(md->start_match_ptr - md->start_subject);
-    offsets[1] = (int)(md->end_match_ptr - md->start_subject);
-    }
-
-  /* Return MARK data if requested */
-
-  if (extra_data != NULL && (extra_data->flags & PCRE_EXTRA_MARK) != 0)
-    *(extra_data->mark) = (pcre_uchar *)md->mark;
-  DPRINTF((">>>> returning %d\n", rc));
-#ifdef NO_RECURSE
-  release_match_heapframes(&frame_zero);
-#endif
-  return rc;
-  }
-
-/* Control gets here if there has been an error, or if the overall match
-attempt has failed at all permitted starting positions. */
-
-if (using_temporary_offsets)
-  {
-  DPRINTF(("Freeing temporary memory\n"));
-  (PUBL(free))(md->offset_vector);
-  }
-
-/* For anything other than nomatch or partial match, just return the code. */
-
-if (rc != MATCH_NOMATCH && rc != PCRE_ERROR_PARTIAL)
-  {
-  DPRINTF((">>>> error: returning %d\n", rc));
-#ifdef NO_RECURSE
-  release_match_heapframes(&frame_zero);
-#endif
-  return rc;
-  }
-
-/* Handle partial matches - disable any mark data */
-
-if (match_partial != NULL)
-  {
-  DPRINTF((">>>> returning PCRE_ERROR_PARTIAL\n"));
-  md->mark = NULL;
-  if (offsetcount > 1)
-    {
-    offsets[0] = (int)(start_partial - (PCRE_PUCHAR)subject);
-    offsets[1] = (int)(end_subject - (PCRE_PUCHAR)subject);
-    if (offsetcount > 2)
-      offsets[2] = (int)(match_partial - (PCRE_PUCHAR)subject);
-    }
-  rc = PCRE_ERROR_PARTIAL;
-  }
-
-/* This is the classic nomatch case */
-
-else
-  {
-  DPRINTF((">>>> returning PCRE_ERROR_NOMATCH\n"));
-  rc = PCRE_ERROR_NOMATCH;
-  }
-
-/* Return the MARK data if it has been requested. */
-
-if (extra_data != NULL && (extra_data->flags & PCRE_EXTRA_MARK) != 0)
-  *(extra_data->mark) = (pcre_uchar *)md->nomatch_mark;
-#ifdef NO_RECURSE
-  release_match_heapframes(&frame_zero);
-#endif
-return rc;
-}
-
-/* End of pcre_exec.c */
diff --git a/src/extra/pcre/pcre_fullinfo.c b/src/extra/pcre/pcre_fullinfo.c
deleted file mode 100644
index a6c2ece..0000000
--- a/src/extra/pcre/pcre_fullinfo.c
+++ /dev/null
@@ -1,245 +0,0 @@
-/*************************************************
-*      Perl-Compatible Regular Expressions       *
-*************************************************/
-
-/* PCRE is a library of functions to support regular expressions whose syntax
-and semantics are as close as possible to those of the Perl 5 language.
-
-                       Written by Philip Hazel
-           Copyright (c) 1997-2013 University of Cambridge
-
------------------------------------------------------------------------------
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are met:
-
-    * Redistributions of source code must retain the above copyright notice,
-      this list of conditions and the following disclaimer.
-
-    * Redistributions in binary form must reproduce the above copyright
-      notice, this list of conditions and the following disclaimer in the
-      documentation and/or other materials provided with the distribution.
-
-    * Neither the name of the University of Cambridge nor the names of its
-      contributors may be used to endorse or promote products derived from
-      this software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
-LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-POSSIBILITY OF SUCH DAMAGE.
------------------------------------------------------------------------------
-*/
-
-
-/* This module contains the external function pcre_fullinfo(), which returns
-information about a compiled pattern. */
-
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include "pcre_internal.h"
-
-
-/*************************************************
-*        Return info about compiled pattern      *
-*************************************************/
-
-/* This is a newer "info" function which has an extensible interface so
-that additional items can be added compatibly.
-
-Arguments:
-  argument_re      points to compiled code
-  extra_data       points extra data, or NULL
-  what             what information is required
-  where            where to put the information
-
-Returns:           0 if data returned, negative on error
-*/
-
-#if defined COMPILE_PCRE8
-PCRE_EXP_DEFN int PCRE_CALL_CONVENTION
-pcre_fullinfo(const pcre *argument_re, const pcre_extra *extra_data,
-  int what, void *where)
-#elif defined COMPILE_PCRE16
-PCRE_EXP_DEFN int PCRE_CALL_CONVENTION
-pcre16_fullinfo(const pcre16 *argument_re, const pcre16_extra *extra_data,
-  int what, void *where)
-#elif defined COMPILE_PCRE32
-PCRE_EXP_DEFN int PCRE_CALL_CONVENTION
-pcre32_fullinfo(const pcre32 *argument_re, const pcre32_extra *extra_data,
-  int what, void *where)
-#endif
-{
-const REAL_PCRE *re = (const REAL_PCRE *)argument_re;
-const pcre_study_data *study = NULL;
-
-if (re == NULL || where == NULL) return PCRE_ERROR_NULL;
-
-if (extra_data != NULL && (extra_data->flags & PCRE_EXTRA_STUDY_DATA) != 0)
-  study = (const pcre_study_data *)extra_data->study_data;
-
-/* Check that the first field in the block is the magic number. If it is not,
-return with PCRE_ERROR_BADMAGIC. However, if the magic number is equal to
-REVERSED_MAGIC_NUMBER we return with PCRE_ERROR_BADENDIANNESS, which
-means that the pattern is likely compiled with different endianness. */
-
-if (re->magic_number != MAGIC_NUMBER)
-  return re->magic_number == REVERSED_MAGIC_NUMBER?
-    PCRE_ERROR_BADENDIANNESS:PCRE_ERROR_BADMAGIC;
-
-/* Check that this pattern was compiled in the correct bit mode */
-
-if ((re->flags & PCRE_MODE) == 0) return PCRE_ERROR_BADMODE;
-
-switch (what)
-  {
-  case PCRE_INFO_OPTIONS:
-  *((unsigned long int *)where) = re->options & PUBLIC_COMPILE_OPTIONS;
-  break;
-
-  case PCRE_INFO_SIZE:
-  *((size_t *)where) = re->size;
-  break;
-
-  case PCRE_INFO_STUDYSIZE:
-  *((size_t *)where) = (study == NULL)? 0 : study->size;
-  break;
-
-  case PCRE_INFO_JITSIZE:
-#ifdef SUPPORT_JIT
-  *((size_t *)where) =
-      (extra_data != NULL &&
-      (extra_data->flags & PCRE_EXTRA_EXECUTABLE_JIT) != 0 &&
-      extra_data->executable_jit != NULL)?
-    PRIV(jit_get_size)(extra_data->executable_jit) : 0;
-#else
-  *((size_t *)where) = 0;
-#endif
-  break;
-
-  case PCRE_INFO_CAPTURECOUNT:
-  *((int *)where) = re->top_bracket;
-  break;
-
-  case PCRE_INFO_BACKREFMAX:
-  *((int *)where) = re->top_backref;
-  break;
-
-  case PCRE_INFO_FIRSTBYTE:
-  *((int *)where) =
-    ((re->flags & PCRE_FIRSTSET) != 0)? (int)re->first_char :
-    ((re->flags & PCRE_STARTLINE) != 0)? -1 : -2;
-  break;
-
-  case PCRE_INFO_FIRSTCHARACTER:
-    *((pcre_uint32 *)where) =
-      (re->flags & PCRE_FIRSTSET) != 0 ? re->first_char : 0;
-    break;
-
-  case PCRE_INFO_FIRSTCHARACTERFLAGS:
-    *((int *)where) =
-      ((re->flags & PCRE_FIRSTSET) != 0) ? 1 :
-      ((re->flags & PCRE_STARTLINE) != 0) ? 2 : 0;
-    break;
-
-  /* Make sure we pass back the pointer to the bit vector in the external
-  block, not the internal copy (with flipped integer fields). */
-
-  case PCRE_INFO_FIRSTTABLE:
-  *((const pcre_uint8 **)where) =
-    (study != NULL && (study->flags & PCRE_STUDY_MAPPED) != 0)?
-      ((const pcre_study_data *)extra_data->study_data)->start_bits : NULL;
-  break;
-
-  case PCRE_INFO_MINLENGTH:
-  *((int *)where) =
-    (study != NULL && (study->flags & PCRE_STUDY_MINLEN) != 0)?
-      (int)(study->minlength) : -1;
-  break;
-
-  case PCRE_INFO_JIT:
-  *((int *)where) = extra_data != NULL &&
-                    (extra_data->flags & PCRE_EXTRA_EXECUTABLE_JIT) != 0 &&
-                    extra_data->executable_jit != NULL;
-  break;
-
-  case PCRE_INFO_LASTLITERAL:
-  *((int *)where) =
-    ((re->flags & PCRE_REQCHSET) != 0)? (int)re->req_char : -1;
-  break;
-
-  case PCRE_INFO_REQUIREDCHAR:
-    *((pcre_uint32 *)where) =
-      ((re->flags & PCRE_REQCHSET) != 0) ? re->req_char : 0;
-    break;
-
-  case PCRE_INFO_REQUIREDCHARFLAGS:
-    *((int *)where) =
-      ((re->flags & PCRE_REQCHSET) != 0);
-    break;
-
-  case PCRE_INFO_NAMEENTRYSIZE:
-  *((int *)where) = re->name_entry_size;
-  break;
-
-  case PCRE_INFO_NAMECOUNT:
-  *((int *)where) = re->name_count;
-  break;
-
-  case PCRE_INFO_NAMETABLE:
-  *((const pcre_uchar **)where) = (const pcre_uchar *)re + re->name_table_offset;
-  break;
-
-  case PCRE_INFO_DEFAULT_TABLES:
-  *((const pcre_uint8 **)where) = (const pcre_uint8 *)(PRIV(default_tables));
-  break;
-
-  /* From release 8.00 this will always return TRUE because NOPARTIAL is
-  no longer ever set (the restrictions have been removed). */
-
-  case PCRE_INFO_OKPARTIAL:
-  *((int *)where) = (re->flags & PCRE_NOPARTIAL) == 0;
-  break;
-
-  case PCRE_INFO_JCHANGED:
-  *((int *)where) = (re->flags & PCRE_JCHANGED) != 0;
-  break;
-
-  case PCRE_INFO_HASCRORLF:
-  *((int *)where) = (re->flags & PCRE_HASCRORLF) != 0;
-  break;
-
-  case PCRE_INFO_MAXLOOKBEHIND:
-  *((int *)where) = re->max_lookbehind;
-  break;
-
-  case PCRE_INFO_MATCHLIMIT:
-  if ((re->flags & PCRE_MLSET) == 0) return PCRE_ERROR_UNSET;
-  *((pcre_uint32 *)where) = re->limit_match;
-  break;
-
-  case PCRE_INFO_RECURSIONLIMIT:
-  if ((re->flags & PCRE_RLSET) == 0) return PCRE_ERROR_UNSET;
-  *((pcre_uint32 *)where) = re->limit_recursion;
-  break;
-
-  case PCRE_INFO_MATCH_EMPTY:
-  *((int *)where) = (re->flags & PCRE_MATCH_EMPTY) != 0;
-  break;
-
-  default: return PCRE_ERROR_BADOPTION;
-  }
-
-return 0;
-}
-
-/* End of pcre_fullinfo.c */
diff --git a/src/extra/pcre/pcre_get.c b/src/extra/pcre/pcre_get.c
deleted file mode 100644
index 8094b34..0000000
--- a/src/extra/pcre/pcre_get.c
+++ /dev/null
@@ -1,662 +0,0 @@
-/*************************************************
-*      Perl-Compatible Regular Expressions       *
-*************************************************/
-
-/* PCRE is a library of functions to support regular expressions whose syntax
-and semantics are as close as possible to those of the Perl 5 language.
-
-                       Written by Philip Hazel
-           Copyright (c) 1997-2012 University of Cambridge
-
------------------------------------------------------------------------------
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are met:
-
-    * Redistributions of source code must retain the above copyright notice,
-      this list of conditions and the following disclaimer.
-
-    * Redistributions in binary form must reproduce the above copyright
-      notice, this list of conditions and the following disclaimer in the
-      documentation and/or other materials provided with the distribution.
-
-    * Neither the name of the University of Cambridge nor the names of its
-      contributors may be used to endorse or promote products derived from
-      this software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
-LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-POSSIBILITY OF SUCH DAMAGE.
------------------------------------------------------------------------------
-*/
-
-
-/* This module contains some convenience functions for extracting substrings
-from the subject string after a regex match has succeeded. The original idea
-for these functions came from Scott Wimer. */
-
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include "pcre_internal.h"
-
-
-/*************************************************
-*           Find number for named string         *
-*************************************************/
-
-/* This function is used by the get_first_set() function below, as well
-as being generally available. It assumes that names are unique.
-
-Arguments:
-  code        the compiled regex
-  stringname  the name whose number is required
-
-Returns:      the number of the named parentheses, or a negative number
-                (PCRE_ERROR_NOSUBSTRING) if not found
-*/
-
-#if defined COMPILE_PCRE8
-PCRE_EXP_DEFN int PCRE_CALL_CONVENTION
-pcre_get_stringnumber(const pcre *code, const char *stringname)
-#elif defined COMPILE_PCRE16
-PCRE_EXP_DEFN int PCRE_CALL_CONVENTION
-pcre16_get_stringnumber(const pcre16 *code, PCRE_SPTR16 stringname)
-#elif defined COMPILE_PCRE32
-PCRE_EXP_DEFN int PCRE_CALL_CONVENTION
-pcre32_get_stringnumber(const pcre32 *code, PCRE_SPTR32 stringname)
-#endif
-{
-int rc;
-int entrysize;
-int top, bot;
-pcre_uchar *nametable;
-
-#ifdef COMPILE_PCRE8
-if ((rc = pcre_fullinfo(code, NULL, PCRE_INFO_NAMECOUNT, &top)) != 0)
-  return rc;
-if (top <= 0) return PCRE_ERROR_NOSUBSTRING;
-
-if ((rc = pcre_fullinfo(code, NULL, PCRE_INFO_NAMEENTRYSIZE, &entrysize)) != 0)
-  return rc;
-if ((rc = pcre_fullinfo(code, NULL, PCRE_INFO_NAMETABLE, &nametable)) != 0)
-  return rc;
-#endif
-#ifdef COMPILE_PCRE16
-if ((rc = pcre16_fullinfo(code, NULL, PCRE_INFO_NAMECOUNT, &top)) != 0)
-  return rc;
-if (top <= 0) return PCRE_ERROR_NOSUBSTRING;
-
-if ((rc = pcre16_fullinfo(code, NULL, PCRE_INFO_NAMEENTRYSIZE, &entrysize)) != 0)
-  return rc;
-if ((rc = pcre16_fullinfo(code, NULL, PCRE_INFO_NAMETABLE, &nametable)) != 0)
-  return rc;
-#endif
-#ifdef COMPILE_PCRE32
-if ((rc = pcre32_fullinfo(code, NULL, PCRE_INFO_NAMECOUNT, &top)) != 0)
-  return rc;
-if (top <= 0) return PCRE_ERROR_NOSUBSTRING;
-
-if ((rc = pcre32_fullinfo(code, NULL, PCRE_INFO_NAMEENTRYSIZE, &entrysize)) != 0)
-  return rc;
-if ((rc = pcre32_fullinfo(code, NULL, PCRE_INFO_NAMETABLE, &nametable)) != 0)
-  return rc;
-#endif
-
-bot = 0;
-while (top > bot)
-  {
-  int mid = (top + bot) / 2;
-  pcre_uchar *entry = nametable + entrysize*mid;
-  int c = STRCMP_UC_UC((pcre_uchar *)stringname,
-    (pcre_uchar *)(entry + IMM2_SIZE));
-  if (c == 0) return GET2(entry, 0);
-  if (c > 0) bot = mid + 1; else top = mid;
-  }
-
-return PCRE_ERROR_NOSUBSTRING;
-}
-
-
-
-/*************************************************
-*     Find (multiple) entries for named string   *
-*************************************************/
-
-/* This is used by the get_first_set() function below, as well as being
-generally available. It is used when duplicated names are permitted.
-
-Arguments:
-  code        the compiled regex
-  stringname  the name whose entries required
-  firstptr    where to put the pointer to the first entry
-  lastptr     where to put the pointer to the last entry
-
-Returns:      the length of each entry, or a negative number
-                (PCRE_ERROR_NOSUBSTRING) if not found
-*/
-
-#if defined COMPILE_PCRE8
-PCRE_EXP_DEFN int PCRE_CALL_CONVENTION
-pcre_get_stringtable_entries(const pcre *code, const char *stringname,
-  char **firstptr, char **lastptr)
-#elif defined COMPILE_PCRE16
-PCRE_EXP_DEFN int PCRE_CALL_CONVENTION
-pcre16_get_stringtable_entries(const pcre16 *code, PCRE_SPTR16 stringname,
-  PCRE_UCHAR16 **firstptr, PCRE_UCHAR16 **lastptr)
-#elif defined COMPILE_PCRE32
-PCRE_EXP_DEFN int PCRE_CALL_CONVENTION
-pcre32_get_stringtable_entries(const pcre32 *code, PCRE_SPTR32 stringname,
-  PCRE_UCHAR32 **firstptr, PCRE_UCHAR32 **lastptr)
-#endif
-{
-int rc;
-int entrysize;
-int top, bot;
-pcre_uchar *nametable, *lastentry;
-
-#ifdef COMPILE_PCRE8
-if ((rc = pcre_fullinfo(code, NULL, PCRE_INFO_NAMECOUNT, &top)) != 0)
-  return rc;
-if (top <= 0) return PCRE_ERROR_NOSUBSTRING;
-
-if ((rc = pcre_fullinfo(code, NULL, PCRE_INFO_NAMEENTRYSIZE, &entrysize)) != 0)
-  return rc;
-if ((rc = pcre_fullinfo(code, NULL, PCRE_INFO_NAMETABLE, &nametable)) != 0)
-  return rc;
-#endif
-#ifdef COMPILE_PCRE16
-if ((rc = pcre16_fullinfo(code, NULL, PCRE_INFO_NAMECOUNT, &top)) != 0)
-  return rc;
-if (top <= 0) return PCRE_ERROR_NOSUBSTRING;
-
-if ((rc = pcre16_fullinfo(code, NULL, PCRE_INFO_NAMEENTRYSIZE, &entrysize)) != 0)
-  return rc;
-if ((rc = pcre16_fullinfo(code, NULL, PCRE_INFO_NAMETABLE, &nametable)) != 0)
-  return rc;
-#endif
-#ifdef COMPILE_PCRE32
-if ((rc = pcre32_fullinfo(code, NULL, PCRE_INFO_NAMECOUNT, &top)) != 0)
-  return rc;
-if (top <= 0) return PCRE_ERROR_NOSUBSTRING;
-
-if ((rc = pcre32_fullinfo(code, NULL, PCRE_INFO_NAMEENTRYSIZE, &entrysize)) != 0)
-  return rc;
-if ((rc = pcre32_fullinfo(code, NULL, PCRE_INFO_NAMETABLE, &nametable)) != 0)
-  return rc;
-#endif
-
-lastentry = nametable + entrysize * (top - 1);
-bot = 0;
-while (top > bot)
-  {
-  int mid = (top + bot) / 2;
-  pcre_uchar *entry = nametable + entrysize*mid;
-  int c = STRCMP_UC_UC((pcre_uchar *)stringname,
-    (pcre_uchar *)(entry + IMM2_SIZE));
-  if (c == 0)
-    {
-    pcre_uchar *first = entry;
-    pcre_uchar *last = entry;
-    while (first > nametable)
-      {
-      if (STRCMP_UC_UC((pcre_uchar *)stringname,
-        (pcre_uchar *)(first - entrysize + IMM2_SIZE)) != 0) break;
-      first -= entrysize;
-      }
-    while (last < lastentry)
-      {
-      if (STRCMP_UC_UC((pcre_uchar *)stringname,
-        (pcre_uchar *)(last + entrysize + IMM2_SIZE)) != 0) break;
-      last += entrysize;
-      }
-#if defined COMPILE_PCRE8
-    *firstptr = (char *)first;
-    *lastptr = (char *)last;
-#elif defined COMPILE_PCRE16
-    *firstptr = (PCRE_UCHAR16 *)first;
-    *lastptr = (PCRE_UCHAR16 *)last;
-#elif defined COMPILE_PCRE32
-    *firstptr = (PCRE_UCHAR32 *)first;
-    *lastptr = (PCRE_UCHAR32 *)last;
-#endif
-    return entrysize;
-    }
-  if (c > 0) bot = mid + 1; else top = mid;
-  }
-
-return PCRE_ERROR_NOSUBSTRING;
-}
-
-
-
-/*************************************************
-*    Find first set of multiple named strings    *
-*************************************************/
-
-/* This function allows for duplicate names in the table of named substrings.
-It returns the number of the first one that was set in a pattern match.
-
-Arguments:
-  code         the compiled regex
-  stringname   the name of the capturing substring
-  ovector      the vector of matched substrings
-
-Returns:       the number of the first that is set,
-               or the number of the last one if none are set,
-               or a negative number on error
-*/
-
-#if defined COMPILE_PCRE8
-static int
-get_first_set(const pcre *code, const char *stringname, int *ovector)
-#elif defined COMPILE_PCRE16
-static int
-get_first_set(const pcre16 *code, PCRE_SPTR16 stringname, int *ovector)
-#elif defined COMPILE_PCRE32
-static int
-get_first_set(const pcre32 *code, PCRE_SPTR32 stringname, int *ovector)
-#endif
-{
-const REAL_PCRE *re = (const REAL_PCRE *)code;
-int entrysize;
-pcre_uchar *entry;
-#if defined COMPILE_PCRE8
-char *first, *last;
-#elif defined COMPILE_PCRE16
-PCRE_UCHAR16 *first, *last;
-#elif defined COMPILE_PCRE32
-PCRE_UCHAR32 *first, *last;
-#endif
-
-#if defined COMPILE_PCRE8
-if ((re->options & PCRE_DUPNAMES) == 0 && (re->flags & PCRE_JCHANGED) == 0)
-  return pcre_get_stringnumber(code, stringname);
-entrysize = pcre_get_stringtable_entries(code, stringname, &first, &last);
-#elif defined COMPILE_PCRE16
-if ((re->options & PCRE_DUPNAMES) == 0 && (re->flags & PCRE_JCHANGED) == 0)
-  return pcre16_get_stringnumber(code, stringname);
-entrysize = pcre16_get_stringtable_entries(code, stringname, &first, &last);
-#elif defined COMPILE_PCRE32
-if ((re->options & PCRE_DUPNAMES) == 0 && (re->flags & PCRE_JCHANGED) == 0)
-  return pcre32_get_stringnumber(code, stringname);
-entrysize = pcre32_get_stringtable_entries(code, stringname, &first, &last);
-#endif
-if (entrysize <= 0) return entrysize;
-for (entry = (pcre_uchar *)first; entry <= (pcre_uchar *)last; entry += entrysize)
-  {
-  int n = GET2(entry, 0);
-  if (ovector[n*2] >= 0) return n;
-  }
-return GET2(entry, 0);
-}
-
-
-
-
-/*************************************************
-*      Copy captured string to given buffer      *
-*************************************************/
-
-/* This function copies a single captured substring into a given buffer.
-Note that we use memcpy() rather than strncpy() in case there are binary zeros
-in the string.
-
-Arguments:
-  subject        the subject string that was matched
-  ovector        pointer to the offsets table
-  stringcount    the number of substrings that were captured
-                   (i.e. the yield of the pcre_exec call, unless
-                   that was zero, in which case it should be 1/3
-                   of the offset table size)
-  stringnumber   the number of the required substring
-  buffer         where to put the substring
-  size           the size of the buffer
-
-Returns:         if successful:
-                   the length of the copied string, not including the zero
-                   that is put on the end; can be zero
-                 if not successful:
-                   PCRE_ERROR_NOMEMORY (-6) buffer too small
-                   PCRE_ERROR_NOSUBSTRING (-7) no such captured substring
-*/
-
-#if defined COMPILE_PCRE8
-PCRE_EXP_DEFN int PCRE_CALL_CONVENTION
-pcre_copy_substring(const char *subject, int *ovector, int stringcount,
-  int stringnumber, char *buffer, int size)
-#elif defined COMPILE_PCRE16
-PCRE_EXP_DEFN int PCRE_CALL_CONVENTION
-pcre16_copy_substring(PCRE_SPTR16 subject, int *ovector, int stringcount,
-  int stringnumber, PCRE_UCHAR16 *buffer, int size)
-#elif defined COMPILE_PCRE32
-PCRE_EXP_DEFN int PCRE_CALL_CONVENTION
-pcre32_copy_substring(PCRE_SPTR32 subject, int *ovector, int stringcount,
-  int stringnumber, PCRE_UCHAR32 *buffer, int size)
-#endif
-{
-int yield;
-if (stringnumber < 0 || stringnumber >= stringcount)
-  return PCRE_ERROR_NOSUBSTRING;
-stringnumber *= 2;
-yield = ovector[stringnumber+1] - ovector[stringnumber];
-if (size < yield + 1) return PCRE_ERROR_NOMEMORY;
-memcpy(buffer, subject + ovector[stringnumber], IN_UCHARS(yield));
-buffer[yield] = 0;
-return yield;
-}
-
-
-
-/*************************************************
-*   Copy named captured string to given buffer   *
-*************************************************/
-
-/* This function copies a single captured substring into a given buffer,
-identifying it by name. If the regex permits duplicate names, the first
-substring that is set is chosen.
-
-Arguments:
-  code           the compiled regex
-  subject        the subject string that was matched
-  ovector        pointer to the offsets table
-  stringcount    the number of substrings that were captured
-                   (i.e. the yield of the pcre_exec call, unless
-                   that was zero, in which case it should be 1/3
-                   of the offset table size)
-  stringname     the name of the required substring
-  buffer         where to put the substring
-  size           the size of the buffer
-
-Returns:         if successful:
-                   the length of the copied string, not including the zero
-                   that is put on the end; can be zero
-                 if not successful:
-                   PCRE_ERROR_NOMEMORY (-6) buffer too small
-                   PCRE_ERROR_NOSUBSTRING (-7) no such captured substring
-*/
-
-#if defined COMPILE_PCRE8
-PCRE_EXP_DEFN int PCRE_CALL_CONVENTION
-pcre_copy_named_substring(const pcre *code, const char *subject,
-  int *ovector, int stringcount, const char *stringname,
-  char *buffer, int size)
-#elif defined COMPILE_PCRE16
-PCRE_EXP_DEFN int PCRE_CALL_CONVENTION
-pcre16_copy_named_substring(const pcre16 *code, PCRE_SPTR16 subject,
-  int *ovector, int stringcount, PCRE_SPTR16 stringname,
-  PCRE_UCHAR16 *buffer, int size)
-#elif defined COMPILE_PCRE32
-PCRE_EXP_DEFN int PCRE_CALL_CONVENTION
-pcre32_copy_named_substring(const pcre32 *code, PCRE_SPTR32 subject,
-  int *ovector, int stringcount, PCRE_SPTR32 stringname,
-  PCRE_UCHAR32 *buffer, int size)
-#endif
-{
-int n = get_first_set(code, stringname, ovector);
-if (n <= 0) return n;
-#if defined COMPILE_PCRE8
-return pcre_copy_substring(subject, ovector, stringcount, n, buffer, size);
-#elif defined COMPILE_PCRE16
-return pcre16_copy_substring(subject, ovector, stringcount, n, buffer, size);
-#elif defined COMPILE_PCRE32
-return pcre32_copy_substring(subject, ovector, stringcount, n, buffer, size);
-#endif
-}
-
-
-
-/*************************************************
-*      Copy all captured strings to new store    *
-*************************************************/
-
-/* This function gets one chunk of store and builds a list of pointers and all
-of the captured substrings in it. A NULL pointer is put on the end of the list.
-
-Arguments:
-  subject        the subject string that was matched
-  ovector        pointer to the offsets table
-  stringcount    the number of substrings that were captured
-                   (i.e. the yield of the pcre_exec call, unless
-                   that was zero, in which case it should be 1/3
-                   of the offset table size)
-  listptr        set to point to the list of pointers
-
-Returns:         if successful: 0
-                 if not successful:
-                   PCRE_ERROR_NOMEMORY (-6) failed to get store
-*/
-
-#if defined COMPILE_PCRE8
-PCRE_EXP_DEFN int PCRE_CALL_CONVENTION
-pcre_get_substring_list(const char *subject, int *ovector, int stringcount,
-  const char ***listptr)
-#elif defined COMPILE_PCRE16
-PCRE_EXP_DEFN int PCRE_CALL_CONVENTION
-pcre16_get_substring_list(PCRE_SPTR16 subject, int *ovector, int stringcount,
-  PCRE_SPTR16 **listptr)
-#elif defined COMPILE_PCRE32
-PCRE_EXP_DEFN int PCRE_CALL_CONVENTION
-pcre32_get_substring_list(PCRE_SPTR32 subject, int *ovector, int stringcount,
-  PCRE_SPTR32 **listptr)
-#endif
-{
-int i;
-int size = sizeof(pcre_uchar *);
-int double_count = stringcount * 2;
-pcre_uchar **stringlist;
-pcre_uchar *p;
-
-for (i = 0; i < double_count; i += 2)
-  size += sizeof(pcre_uchar *) + IN_UCHARS(ovector[i+1] - ovector[i] + 1);
-
-stringlist = (pcre_uchar **)(PUBL(malloc))(size);
-if (stringlist == NULL) return PCRE_ERROR_NOMEMORY;
-
-#if defined COMPILE_PCRE8
-*listptr = (const char **)stringlist;
-#elif defined COMPILE_PCRE16
-*listptr = (PCRE_SPTR16 *)stringlist;
-#elif defined COMPILE_PCRE32
-*listptr = (PCRE_SPTR32 *)stringlist;
-#endif
-p = (pcre_uchar *)(stringlist + stringcount + 1);
-
-for (i = 0; i < double_count; i += 2)
-  {
-  int len = ovector[i+1] - ovector[i];
-  memcpy(p, subject + ovector[i], IN_UCHARS(len));
-  *stringlist++ = p;
-  p += len;
-  *p++ = 0;
-  }
-
-*stringlist = NULL;
-return 0;
-}
-
-
-
-/*************************************************
-*   Free store obtained by get_substring_list    *
-*************************************************/
-
-/* This function exists for the benefit of people calling PCRE from non-C
-programs that can call its functions, but not free() or (PUBL(free))()
-directly.
-
-Argument:   the result of a previous pcre_get_substring_list()
-Returns:    nothing
-*/
-
-#if defined COMPILE_PCRE8
-PCRE_EXP_DEFN void PCRE_CALL_CONVENTION
-pcre_free_substring_list(const char **pointer)
-#elif defined COMPILE_PCRE16
-PCRE_EXP_DEFN void PCRE_CALL_CONVENTION
-pcre16_free_substring_list(PCRE_SPTR16 *pointer)
-#elif defined COMPILE_PCRE32
-PCRE_EXP_DEFN void PCRE_CALL_CONVENTION
-pcre32_free_substring_list(PCRE_SPTR32 *pointer)
-#endif
-{
-(PUBL(free))((void *)pointer);
-}
-
-
-
-/*************************************************
-*      Copy captured string to new store         *
-*************************************************/
-
-/* This function copies a single captured substring into a piece of new
-store
-
-Arguments:
-  subject        the subject string that was matched
-  ovector        pointer to the offsets table
-  stringcount    the number of substrings that were captured
-                   (i.e. the yield of the pcre_exec call, unless
-                   that was zero, in which case it should be 1/3
-                   of the offset table size)
-  stringnumber   the number of the required substring
-  stringptr      where to put a pointer to the substring
-
-Returns:         if successful:
-                   the length of the string, not including the zero that
-                   is put on the end; can be zero
-                 if not successful:
-                   PCRE_ERROR_NOMEMORY (-6) failed to get store
-                   PCRE_ERROR_NOSUBSTRING (-7) substring not present
-*/
-
-#if defined COMPILE_PCRE8
-PCRE_EXP_DEFN int PCRE_CALL_CONVENTION
-pcre_get_substring(const char *subject, int *ovector, int stringcount,
-  int stringnumber, const char **stringptr)
-#elif defined COMPILE_PCRE16
-PCRE_EXP_DEFN int PCRE_CALL_CONVENTION
-pcre16_get_substring(PCRE_SPTR16 subject, int *ovector, int stringcount,
-  int stringnumber, PCRE_SPTR16 *stringptr)
-#elif defined COMPILE_PCRE32
-PCRE_EXP_DEFN int PCRE_CALL_CONVENTION
-pcre32_get_substring(PCRE_SPTR32 subject, int *ovector, int stringcount,
-  int stringnumber, PCRE_SPTR32 *stringptr)
-#endif
-{
-int yield;
-pcre_uchar *substring;
-if (stringnumber < 0 || stringnumber >= stringcount)
-  return PCRE_ERROR_NOSUBSTRING;
-stringnumber *= 2;
-yield = ovector[stringnumber+1] - ovector[stringnumber];
-substring = (pcre_uchar *)(PUBL(malloc))(IN_UCHARS(yield + 1));
-if (substring == NULL) return PCRE_ERROR_NOMEMORY;
-memcpy(substring, subject + ovector[stringnumber], IN_UCHARS(yield));
-substring[yield] = 0;
-#if defined COMPILE_PCRE8
-*stringptr = (const char *)substring;
-#elif defined COMPILE_PCRE16
-*stringptr = (PCRE_SPTR16)substring;
-#elif defined COMPILE_PCRE32
-*stringptr = (PCRE_SPTR32)substring;
-#endif
-return yield;
-}
-
-
-
-/*************************************************
-*   Copy named captured string to new store      *
-*************************************************/
-
-/* This function copies a single captured substring, identified by name, into
-new store. If the regex permits duplicate names, the first substring that is
-set is chosen.
-
-Arguments:
-  code           the compiled regex
-  subject        the subject string that was matched
-  ovector        pointer to the offsets table
-  stringcount    the number of substrings that were captured
-                   (i.e. the yield of the pcre_exec call, unless
-                   that was zero, in which case it should be 1/3
-                   of the offset table size)
-  stringname     the name of the required substring
-  stringptr      where to put the pointer
-
-Returns:         if successful:
-                   the length of the copied string, not including the zero
-                   that is put on the end; can be zero
-                 if not successful:
-                   PCRE_ERROR_NOMEMORY (-6) couldn't get memory
-                   PCRE_ERROR_NOSUBSTRING (-7) no such captured substring
-*/
-
-#if defined COMPILE_PCRE8
-PCRE_EXP_DEFN int PCRE_CALL_CONVENTION
-pcre_get_named_substring(const pcre *code, const char *subject,
-  int *ovector, int stringcount, const char *stringname,
-  const char **stringptr)
-#elif defined COMPILE_PCRE16
-PCRE_EXP_DEFN int PCRE_CALL_CONVENTION
-pcre16_get_named_substring(const pcre16 *code, PCRE_SPTR16 subject,
-  int *ovector, int stringcount, PCRE_SPTR16 stringname,
-  PCRE_SPTR16 *stringptr)
-#elif defined COMPILE_PCRE32
-PCRE_EXP_DEFN int PCRE_CALL_CONVENTION
-pcre32_get_named_substring(const pcre32 *code, PCRE_SPTR32 subject,
-  int *ovector, int stringcount, PCRE_SPTR32 stringname,
-  PCRE_SPTR32 *stringptr)
-#endif
-{
-int n = get_first_set(code, stringname, ovector);
-if (n <= 0) return n;
-#if defined COMPILE_PCRE8
-return pcre_get_substring(subject, ovector, stringcount, n, stringptr);
-#elif defined COMPILE_PCRE16
-return pcre16_get_substring(subject, ovector, stringcount, n, stringptr);
-#elif defined COMPILE_PCRE32
-return pcre32_get_substring(subject, ovector, stringcount, n, stringptr);
-#endif
-}
-
-
-
-
-/*************************************************
-*       Free store obtained by get_substring     *
-*************************************************/
-
-/* This function exists for the benefit of people calling PCRE from non-C
-programs that can call its functions, but not free() or (PUBL(free))()
-directly.
-
-Argument:   the result of a previous pcre_get_substring()
-Returns:    nothing
-*/
-
-#if defined COMPILE_PCRE8
-PCRE_EXP_DEFN void PCRE_CALL_CONVENTION
-pcre_free_substring(const char *pointer)
-#elif defined COMPILE_PCRE16
-PCRE_EXP_DEFN void PCRE_CALL_CONVENTION
-pcre16_free_substring(PCRE_SPTR16 pointer)
-#elif defined COMPILE_PCRE32
-PCRE_EXP_DEFN void PCRE_CALL_CONVENTION
-pcre32_free_substring(PCRE_SPTR32 pointer)
-#endif
-{
-(PUBL(free))((void *)pointer);
-}
-
-/* End of pcre_get.c */
diff --git a/src/extra/pcre/pcre_globals.c b/src/extra/pcre/pcre_globals.c
deleted file mode 100644
index 0f106aa..0000000
--- a/src/extra/pcre/pcre_globals.c
+++ /dev/null
@@ -1,86 +0,0 @@
-/*************************************************
-*      Perl-Compatible Regular Expressions       *
-*************************************************/
-
-/* PCRE is a library of functions to support regular expressions whose syntax
-and semantics are as close as possible to those of the Perl 5 language.
-
-                       Written by Philip Hazel
-           Copyright (c) 1997-2014 University of Cambridge
-
------------------------------------------------------------------------------
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are met:
-
-    * Redistributions of source code must retain the above copyright notice,
-      this list of conditions and the following disclaimer.
-
-    * Redistributions in binary form must reproduce the above copyright
-      notice, this list of conditions and the following disclaimer in the
-      documentation and/or other materials provided with the distribution.
-
-    * Neither the name of the University of Cambridge nor the names of its
-      contributors may be used to endorse or promote products derived from
-      this software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
-LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-POSSIBILITY OF SUCH DAMAGE.
------------------------------------------------------------------------------
-*/
-
-
-/* This module contains global variables that are exported by the PCRE library.
-PCRE is thread-clean and doesn't use any global variables in the normal sense.
-However, it calls memory allocation and freeing functions via the four
-indirections below, and it can optionally do callouts, using the fifth
-indirection. These values can be changed by the caller, but are shared between
-all threads.
-
-For MS Visual Studio and Symbian OS, there are problems in initializing these
-variables to non-local functions. In these cases, therefore, an indirection via
-a local function is used.
-
-Also, when compiling for Virtual Pascal, things are done differently, and
-global variables are not used. */
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include "pcre_internal.h"
-
-#if defined _MSC_VER || defined  __SYMBIAN32__
-static void* LocalPcreMalloc(size_t aSize)
-  {
-  return malloc(aSize);
-  }
-static void LocalPcreFree(void* aPtr)
-  {
-  free(aPtr);
-  }
-PCRE_EXP_DATA_DEFN void *(*PUBL(malloc))(size_t) = LocalPcreMalloc;
-PCRE_EXP_DATA_DEFN void  (*PUBL(free))(void *) = LocalPcreFree;
-PCRE_EXP_DATA_DEFN void *(*PUBL(stack_malloc))(size_t) = LocalPcreMalloc;
-PCRE_EXP_DATA_DEFN void  (*PUBL(stack_free))(void *) = LocalPcreFree;
-PCRE_EXP_DATA_DEFN int   (*PUBL(callout))(PUBL(callout_block) *) = NULL;
-PCRE_EXP_DATA_DEFN int   (*PUBL(stack_guard))(void) = NULL;
-
-#elif !defined VPCOMPAT
-PCRE_EXP_DATA_DEFN void *(*PUBL(malloc))(size_t) = malloc;
-PCRE_EXP_DATA_DEFN void  (*PUBL(free))(void *) = free;
-PCRE_EXP_DATA_DEFN void *(*PUBL(stack_malloc))(size_t) = malloc;
-PCRE_EXP_DATA_DEFN void  (*PUBL(stack_free))(void *) = free;
-PCRE_EXP_DATA_DEFN int   (*PUBL(callout))(PUBL(callout_block) *) = NULL;
-PCRE_EXP_DATA_DEFN int   (*PUBL(stack_guard))(void) = NULL;
-#endif
-
-/* End of pcre_globals.c */
diff --git a/src/extra/pcre/pcre_internal.h b/src/extra/pcre/pcre_internal.h
deleted file mode 100644
index 0f28ad4..0000000
--- a/src/extra/pcre/pcre_internal.h
+++ /dev/null
@@ -1,2810 +0,0 @@
-/*************************************************
-*      Perl-Compatible Regular Expressions       *
-*************************************************/
-
-
-/* PCRE is a library of functions to support regular expressions whose syntax
-and semantics are as close as possible to those of the Perl 5 language.
-
-                       Written by Philip Hazel
-           Copyright (c) 1997-2014 University of Cambridge
-
------------------------------------------------------------------------------
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are met:
-
-    * Redistributions of source code must retain the above copyright notice,
-      this list of conditions and the following disclaimer.
-
-    * Redistributions in binary form must reproduce the above copyright
-      notice, this list of conditions and the following disclaimer in the
-      documentation and/or other materials provided with the distribution.
-
-    * Neither the name of the University of Cambridge nor the names of its
-      contributors may be used to endorse or promote products derived from
-      this software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
-LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-POSSIBILITY OF SUCH DAMAGE.
------------------------------------------------------------------------------
-*/
-
-/* This header contains definitions that are shared between the different
-modules, but which are not relevant to the exported API. This includes some
-functions whose names all begin with "_pcre_", "_pcre16_" or "_pcre32_"
-depending on the PRIV macro. */
-
-#ifndef PCRE_INTERNAL_H
-#define PCRE_INTERNAL_H
-
-#include <config.h>
-
-/* and those that are not in R's configure */
-#define HAVE_MEMMOVE 1
-#ifndef LINK_SIZE
-#define LINK_SIZE 2
-#define MATCH_LIMIT 10000000
-#define MATCH_LIMIT_RECURSION MATCH_LIMIT
-#define MAX_NAME_COUNT 10000
-#define MAX_NAME_SIZE 32
-#define NEWLINE 10
-#define PARENS_NEST_LIMIT 250
-#define POSIX_MALLOC_THRESHOLD 10
-#define SUPPORT_UTF8
-#define SUPPORT_UCP
-
-/* See http://sourceforge.net/p/predef/wiki/Architectures/
-   SPARC_32 support added in 8.32, 'experimental'.
-
-   At least i386 support did not compile on Solaris Studio.
- */
-#ifndef __SUNPRO_C
-#if defined(WIN32) || defined(__i386__) || defined(__i386) || defined(__x86_64__) || defined(__ppc64__) || defined(__powerpc64__) || defined(__ppc__) || defined(__powerpc__) || defined(__sparc__)
-# define SUPPORT_JIT
-#endif
-#endif
-
-#endif
-
-/* Define PCRE_DEBUG to get debugging output on stdout. */
-
-#if 0
-#define PCRE_DEBUG
-#endif
-
-/* PCRE is compiled as an 8 bit library if it is not requested otherwise. */
-
-#if !defined COMPILE_PCRE16 && !defined COMPILE_PCRE32
-#define COMPILE_PCRE8
-#endif
-
-/* If SUPPORT_UCP is defined, SUPPORT_UTF must also be defined. The
-"configure" script ensures this, but not everybody uses "configure". */
-
-#if defined SUPPORT_UCP && !(defined SUPPORT_UTF)
-#define SUPPORT_UTF 1
-#endif
-
-/* We define SUPPORT_UTF if SUPPORT_UTF8 is enabled for compatibility
-reasons with existing code. */
-
-#if defined SUPPORT_UTF8 && !(defined SUPPORT_UTF)
-#define SUPPORT_UTF 1
-#endif
-
-/* Fixme: SUPPORT_UTF8 should be eventually disappear from the code.
-Until then we define it if SUPPORT_UTF is defined. */
-
-#if defined SUPPORT_UTF && !(defined SUPPORT_UTF8)
-#define SUPPORT_UTF8 1
-#endif
-
-/* We do not support both EBCDIC and UTF-8/16/32 at the same time. The "configure"
-script prevents both being selected, but not everybody uses "configure". */
-
-#if defined EBCDIC && defined SUPPORT_UTF
-#error The use of both EBCDIC and SUPPORT_UTF is not supported.
-#endif
-
-/* Use a macro for debugging printing, 'cause that eliminates the use of #ifdef
-inline, and there are *still* stupid compilers about that don't like indented
-pre-processor statements, or at least there were when I first wrote this. After
-all, it had only been about 10 years then...
-
-It turns out that the Mac Debugging.h header also defines the macro DPRINTF, so
-be absolutely sure we get our version. */
-
-#undef DPRINTF
-#ifdef PCRE_DEBUG
-#define DPRINTF(p) printf p
-#else
-#define DPRINTF(p) /* Nothing */
-#endif
-
-
-/* Standard C headers plus the external interface definition. The only time
-setjmp and stdarg are used is when NO_RECURSE is set. */
-
-#include <ctype.h>
-#include <limits.h>
-#include <stddef.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
-/* Valgrind (memcheck) support */
-
-#ifdef SUPPORT_VALGRIND
-#include <valgrind/memcheck.h>
-#endif
-
-/* When compiling a DLL for Windows, the exported symbols have to be declared
-using some MS magic. I found some useful information on this web page:
-http://msdn2.microsoft.com/en-us/library/y4h7bcy6(VS.80).aspx. According to the
-information there, using __declspec(dllexport) without "extern" we have a
-definition; with "extern" we have a declaration. The settings here override the
-setting in pcre.h (which is included below); it defines only PCRE_EXP_DECL,
-which is all that is needed for applications (they just import the symbols). We
-use:
-
-  PCRE_EXP_DECL       for declarations
-  PCRE_EXP_DEFN       for definitions of exported functions
-  PCRE_EXP_DATA_DEFN  for definitions of exported variables
-
-The reason for the two DEFN macros is that in non-Windows environments, one
-does not want to have "extern" before variable definitions because it leads to
-compiler warnings. So we distinguish between functions and variables. In
-Windows, the two should always be the same.
-
-The reason for wrapping this in #ifndef PCRE_EXP_DECL is so that pcretest,
-which is an application, but needs to import this file in order to "peek" at
-internals, can #include pcre.h first to get an application's-eye view.
-
-In principle, people compiling for non-Windows, non-Unix-like (i.e. uncommon,
-special-purpose environments) might want to stick other stuff in front of
-exported symbols. That's why, in the non-Windows case, we set PCRE_EXP_DEFN and
-PCRE_EXP_DATA_DEFN only if they are not already set. */
-
-#ifndef PCRE_EXP_DECL
-#  ifdef _WIN32
-#    ifndef PCRE_STATIC
-#      define PCRE_EXP_DECL       extern __declspec(dllexport)
-#      define PCRE_EXP_DEFN       __declspec(dllexport)
-#      define PCRE_EXP_DATA_DEFN  __declspec(dllexport)
-#    else
-#      define PCRE_EXP_DECL       extern
-#      define PCRE_EXP_DEFN
-#      define PCRE_EXP_DATA_DEFN
-#    endif
-#  else
-#    ifdef __cplusplus
-#      define PCRE_EXP_DECL       extern "C"
-#    else
-#      define PCRE_EXP_DECL       extern
-#    endif
-#    ifndef PCRE_EXP_DEFN
-#      define PCRE_EXP_DEFN       PCRE_EXP_DECL
-#    endif
-#    ifndef PCRE_EXP_DATA_DEFN
-#      define PCRE_EXP_DATA_DEFN
-#    endif
-#  endif
-#endif
-
-/* When compiling with the MSVC compiler, it is sometimes necessary to include
-a "calling convention" before exported function names. (This is secondhand
-information; I know nothing about MSVC myself). For example, something like
-
-  void __cdecl function(....)
-
-might be needed. In order so make this easy, all the exported functions have
-PCRE_CALL_CONVENTION just before their names. It is rarely needed; if not
-set, we ensure here that it has no effect. */
-
-#ifndef PCRE_CALL_CONVENTION
-#define PCRE_CALL_CONVENTION
-#endif
-
-/* We need to have types that specify unsigned 8, 16 and 32-bit integers. We
-cannot determine these outside the compilation (e.g. by running a program as
-part of "configure") because PCRE is often cross-compiled for use on other
-systems. Instead we make use of the maximum sizes that are available at
-preprocessor time in standard C environments. */
-
-typedef unsigned char pcre_uint8;
-
-#if USHRT_MAX == 65535
-typedef unsigned short pcre_uint16;
-typedef short pcre_int16;
-#define PCRE_UINT16_MAX USHRT_MAX
-#define PCRE_INT16_MAX SHRT_MAX
-#elif UINT_MAX == 65535
-typedef unsigned int pcre_uint16;
-typedef int pcre_int16;
-#define PCRE_UINT16_MAX UINT_MAX
-#define PCRE_INT16_MAX INT_MAX
-#else
-#error Cannot determine a type for 16-bit integers
-#endif
-
-#if UINT_MAX == 4294967295U
-typedef unsigned int pcre_uint32;
-typedef int pcre_int32;
-#define PCRE_UINT32_MAX UINT_MAX
-#define PCRE_INT32_MAX INT_MAX
-#elif ULONG_MAX == 4294967295UL
-typedef unsigned long int pcre_uint32;
-typedef long int pcre_int32;
-#define PCRE_UINT32_MAX ULONG_MAX
-#define PCRE_INT32_MAX LONG_MAX
-#else
-#error Cannot determine a type for 32-bit integers
-#endif
-
-/* When checking for integer overflow in pcre_compile(), we need to handle
-large integers. If a 64-bit integer type is available, we can use that.
-Otherwise we have to cast to double, which of course requires floating point
-arithmetic. Handle this by defining a macro for the appropriate type. If
-stdint.h is available, include it; it may define INT64_MAX. Systems that do not
-have stdint.h (e.g. Solaris) may have inttypes.h. The macro int64_t may be set
-by "configure". */
-
-#if defined HAVE_STDINT_H
-#include <stdint.h>
-#elif defined HAVE_INTTYPES_H
-#include <inttypes.h>
-#endif
-
-#if defined INT64_MAX || defined int64_t
-#define INT64_OR_DOUBLE int64_t
-#else
-#define INT64_OR_DOUBLE double
-#endif
-
-/* All character handling must be done as unsigned characters. Otherwise there
-are problems with top-bit-set characters and functions such as isspace().
-However, we leave the interface to the outside world as char * or short *,
-because that should make things easier for callers. This character type is
-called pcre_uchar.
-
-The IN_UCHARS macro multiply its argument with the byte size of the current
-pcre_uchar type. Useful for memcpy and such operations, whose require the
-byte size of their input/output buffers.
-
-The MAX_255 macro checks whether its pcre_uchar input is less than 256.
-
-The TABLE_GET macro is designed for accessing elements of tables whose contain
-exactly 256 items. When the character is able to contain more than 256
-items, some check is needed before accessing these tables.
-*/
-
-#if defined COMPILE_PCRE8
-
-typedef unsigned char pcre_uchar;
-#define IN_UCHARS(x) (x)
-#define MAX_255(c) 1
-#define TABLE_GET(c, table, default) ((table)[c])
-
-#elif defined COMPILE_PCRE16
-
-#if USHRT_MAX != 65535
-/* This is a warning message. Change PCRE_UCHAR16 to a 16 bit data type in
-pcre.h(.in) and disable (comment out) this message. */
-#error Warning: PCRE_UCHAR16 is not a 16 bit data type.
-#endif
-
-typedef pcre_uint16 pcre_uchar;
-#define UCHAR_SHIFT (1)
-#define IN_UCHARS(x) ((x) << UCHAR_SHIFT)
-#define MAX_255(c) ((c) <= 255u)
-#define TABLE_GET(c, table, default) (MAX_255(c)? ((table)[c]):(default))
-
-#elif defined COMPILE_PCRE32
-
-typedef pcre_uint32 pcre_uchar;
-#define UCHAR_SHIFT (2)
-#define IN_UCHARS(x) ((x) << UCHAR_SHIFT)
-#define MAX_255(c) ((c) <= 255u)
-#define TABLE_GET(c, table, default) (MAX_255(c)? ((table)[c]):(default))
-
-#else
-#error Unsupported compiling mode
-#endif /* COMPILE_PCRE[8|16|32] */
-
-/* This is an unsigned int value that no character can ever have. UTF-8
-characters only go up to 0x7fffffff (though Unicode doesn't go beyond
-0x0010ffff). */
-
-#define NOTACHAR 0xffffffff
-
-/* PCRE is able to support several different kinds of newline (CR, LF, CRLF,
-"any" and "anycrlf" at present). The following macros are used to package up
-testing for newlines. NLBLOCK, PSSTART, and PSEND are defined in the various
-modules to indicate in which datablock the parameters exist, and what the
-start/end of string field names are. */
-
-#define NLTYPE_FIXED    0     /* Newline is a fixed length string */
-#define NLTYPE_ANY      1     /* Newline is any Unicode line ending */
-#define NLTYPE_ANYCRLF  2     /* Newline is CR, LF, or CRLF */
-
-/* This macro checks for a newline at the given position */
-
-#define IS_NEWLINE(p) \
-  ((NLBLOCK->nltype != NLTYPE_FIXED)? \
-    ((p) < NLBLOCK->PSEND && \
-     PRIV(is_newline)((p), NLBLOCK->nltype, NLBLOCK->PSEND, \
-       &(NLBLOCK->nllen), utf)) \
-    : \
-    ((p) <= NLBLOCK->PSEND - NLBLOCK->nllen && \
-     UCHAR21TEST(p) == NLBLOCK->nl[0] && \
-     (NLBLOCK->nllen == 1 || UCHAR21TEST(p+1) == NLBLOCK->nl[1])       \
-    ) \
-  )
-
-/* This macro checks for a newline immediately preceding the given position */
-
-#define WAS_NEWLINE(p) \
-  ((NLBLOCK->nltype != NLTYPE_FIXED)? \
-    ((p) > NLBLOCK->PSSTART && \
-     PRIV(was_newline)((p), NLBLOCK->nltype, NLBLOCK->PSSTART, \
-       &(NLBLOCK->nllen), utf)) \
-    : \
-    ((p) >= NLBLOCK->PSSTART + NLBLOCK->nllen && \
-     UCHAR21TEST(p - NLBLOCK->nllen) == NLBLOCK->nl[0] &&              \
-     (NLBLOCK->nllen == 1 || UCHAR21TEST(p - NLBLOCK->nllen + 1) == NLBLOCK->nl[1]) \
-    ) \
-  )
-
-/* When PCRE is compiled as a C++ library, the subject pointer can be replaced
-with a custom type. This makes it possible, for example, to allow pcre_exec()
-to process subject strings that are discontinuous by using a smart pointer
-class. It must always be possible to inspect all of the subject string in
-pcre_exec() because of the way it backtracks. Two macros are required in the
-normal case, for sign-unspecified and unsigned char pointers. The former is
-used for the external interface and appears in pcre.h, which is why its name
-must begin with PCRE_. */
-
-#ifdef CUSTOM_SUBJECT_PTR
-#define PCRE_PUCHAR CUSTOM_SUBJECT_PTR
-#else
-#define PCRE_PUCHAR const pcre_uchar *
-#endif
-
-/* Include the public PCRE header and the definitions of UCP character property
-values. */
-
-#include "pcre.h"
-#include "ucp.h"
-
-#ifdef COMPILE_PCRE32
-/* Assert that the public PCRE_UCHAR32 is a 32-bit type */
-typedef int __assert_pcre_uchar32_size[sizeof(PCRE_UCHAR32) == 4 ? 1 : -1];
-#endif
-
-/* When compiling for use with the Virtual Pascal compiler, these functions
-need to have their names changed. PCRE must be compiled with the -DVPCOMPAT
-option on the command line. */
-
-#ifdef VPCOMPAT
-#define strlen(s)        _strlen(s)
-#define strncmp(s1,s2,m) _strncmp(s1,s2,m)
-#define memcmp(s,c,n)    _memcmp(s,c,n)
-#define memcpy(d,s,n)    _memcpy(d,s,n)
-#define memmove(d,s,n)   _memmove(d,s,n)
-#define memset(s,c,n)    _memset(s,c,n)
-#else  /* VPCOMPAT */
-
-/* To cope with SunOS4 and other systems that lack memmove() but have bcopy(),
-define a macro for memmove() if HAVE_MEMMOVE is false, provided that HAVE_BCOPY
-is set. Otherwise, include an emulating function for those systems that have
-neither (there some non-Unix environments where this is the case). */
-
-#ifndef HAVE_MEMMOVE
-#undef  memmove        /* some systems may have a macro */
-#ifdef HAVE_BCOPY
-#define memmove(a, b, c) bcopy(b, a, c)
-#else  /* HAVE_BCOPY */
-static void *
-pcre_memmove(void *d, const void *s, size_t n)
-{
-size_t i;
-unsigned char *dest = (unsigned char *)d;
-const unsigned char *src = (const unsigned char *)s;
-if (dest > src)
-  {
-  dest += n;
-  src += n;
-  for (i = 0; i < n; ++i) *(--dest) = *(--src);
-  return (void *)dest;
-  }
-else
-  {
-  for (i = 0; i < n; ++i) *dest++ = *src++;
-  return (void *)(dest - n);
-  }
-}
-#define memmove(a, b, c) pcre_memmove(a, b, c)
-#endif   /* not HAVE_BCOPY */
-#endif   /* not HAVE_MEMMOVE */
-#endif   /* not VPCOMPAT */
-
-
-/* PCRE keeps offsets in its compiled code as 2-byte quantities (always stored
-in big-endian order) by default. These are used, for example, to link from the
-start of a subpattern to its alternatives and its end. The use of 2 bytes per
-offset limits the size of the compiled regex to around 64K, which is big enough
-for almost everybody. However, I received a request for an even bigger limit.
-For this reason, and also to make the code easier to maintain, the storing and
-loading of offsets from the byte string is now handled by the macros that are
-defined here.
-
-The macros are controlled by the value of LINK_SIZE. This defaults to 2 in
-the config.h file, but can be overridden by using -D on the command line. This
-is automated on Unix systems via the "configure" command. */
-
-#if defined COMPILE_PCRE8
-
-#if LINK_SIZE == 2
-
-#define PUT(a,n,d)   \
-  (a[n] = (d) >> 8), \
-  (a[(n)+1] = (d) & 255)
-
-#define GET(a,n) \
-  (((a)[n] << 8) | (a)[(n)+1])
-
-#define MAX_PATTERN_SIZE (1 << 16)
-
-
-#elif LINK_SIZE == 3
-
-#define PUT(a,n,d)       \
-  (a[n] = (d) >> 16),    \
-  (a[(n)+1] = (d) >> 8), \
-  (a[(n)+2] = (d) & 255)
-
-#define GET(a,n) \
-  (((a)[n] << 16) | ((a)[(n)+1] << 8) | (a)[(n)+2])
-
-#define MAX_PATTERN_SIZE (1 << 24)
-
-
-#elif LINK_SIZE == 4
-
-#define PUT(a,n,d)        \
-  (a[n] = (d) >> 24),     \
-  (a[(n)+1] = (d) >> 16), \
-  (a[(n)+2] = (d) >> 8),  \
-  (a[(n)+3] = (d) & 255)
-
-#define GET(a,n) \
-  (((a)[n] << 24) | ((a)[(n)+1] << 16) | ((a)[(n)+2] << 8) | (a)[(n)+3])
-
-/* Keep it positive */
-#define MAX_PATTERN_SIZE (1 << 30)
-
-#else
-#error LINK_SIZE must be either 2, 3, or 4
-#endif
-
-#elif defined COMPILE_PCRE16
-
-#if LINK_SIZE == 2
-
-/* Redefine LINK_SIZE as a multiple of sizeof(pcre_uchar) */
-#undef LINK_SIZE
-#define LINK_SIZE 1
-
-#define PUT(a,n,d)   \
-  (a[n] = (d))
-
-#define GET(a,n) \
-  (a[n])
-
-#define MAX_PATTERN_SIZE (1 << 16)
-
-#elif LINK_SIZE == 3 || LINK_SIZE == 4
-
-/* Redefine LINK_SIZE as a multiple of sizeof(pcre_uchar) */
-#undef LINK_SIZE
-#define LINK_SIZE 2
-
-#define PUT(a,n,d)   \
-  (a[n] = (d) >> 16), \
-  (a[(n)+1] = (d) & 65535)
-
-#define GET(a,n) \
-  (((a)[n] << 16) | (a)[(n)+1])
-
-/* Keep it positive */
-#define MAX_PATTERN_SIZE (1 << 30)
-
-#else
-#error LINK_SIZE must be either 2, 3, or 4
-#endif
-
-#elif defined COMPILE_PCRE32
-
-/* Only supported LINK_SIZE is 4 */
-/* Redefine LINK_SIZE as a multiple of sizeof(pcre_uchar) */
-#undef LINK_SIZE
-#define LINK_SIZE 1
-
-#define PUT(a,n,d)   \
-  (a[n] = (d))
-
-#define GET(a,n) \
-  (a[n])
-
-/* Keep it positive */
-#define MAX_PATTERN_SIZE (1 << 30)
-
-#else
-#error Unsupported compiling mode
-#endif /* COMPILE_PCRE[8|16|32] */
-
-/* Convenience macro defined in terms of the others */
-
-#define PUTINC(a,n,d)   PUT(a,n,d), a += LINK_SIZE
-
-
-/* PCRE uses some other 2-byte quantities that do not change when the size of
-offsets changes. There are used for repeat counts and for other things such as
-capturing parenthesis numbers in back references. */
-
-#if defined COMPILE_PCRE8
-
-#define IMM2_SIZE 2
-
-#define PUT2(a,n,d)   \
-  a[n] = (d) >> 8; \
-  a[(n)+1] = (d) & 255
-
-/* For reasons that I do not understand, the expression in this GET2 macro is
-treated by gcc as a signed expression, even when a is declared as unsigned. It
-seems that any kind of arithmetic results in a signed value. */
-
-#define GET2(a,n) \
-  (unsigned int)(((a)[n] << 8) | (a)[(n)+1])
-
-#elif defined COMPILE_PCRE16
-
-#define IMM2_SIZE 1
-
-#define PUT2(a,n,d)   \
-   a[n] = d
-
-#define GET2(a,n) \
-   a[n]
-
-#elif defined COMPILE_PCRE32
-
-#define IMM2_SIZE 1
-
-#define PUT2(a,n,d)   \
-   a[n] = d
-
-#define GET2(a,n) \
-   a[n]
-
-#else
-#error Unsupported compiling mode
-#endif /* COMPILE_PCRE[8|16|32] */
-
-#define PUT2INC(a,n,d)  PUT2(a,n,d), a += IMM2_SIZE
-
-/* The maximum length of a MARK name is currently one data unit; it may be
-changed in future to be a fixed number of bytes or to depend on LINK_SIZE. */
-
-#if defined COMPILE_PCRE16 || defined COMPILE_PCRE32
-#define MAX_MARK ((1u << 16) - 1)
-#else
-#define MAX_MARK ((1u << 8) - 1)
-#endif
-
-/* There is a proposed future special "UTF-21" mode, in which only the lowest
-21 bits of a 32-bit character are interpreted as UTF, with the remaining 11
-high-order bits available to the application for other uses. In preparation for
-the future implementation of this mode, there are macros that load a data item
-and, if in this special mode, mask it to 21 bits. These macros all have names
-starting with UCHAR21. In all other modes, including the normal 32-bit
-library, the macros all have the same simple definitions. When the new mode is
-implemented, it is expected that these definitions will be varied appropriately
-using #ifdef when compiling the library that supports the special mode. */
-
-#define UCHAR21(eptr)        (*(eptr))
-#define UCHAR21TEST(eptr)    (*(eptr))
-#define UCHAR21INC(eptr)     (*(eptr)++)
-#define UCHAR21INCTEST(eptr) (*(eptr)++)
-
-/* When UTF encoding is being used, a character is no longer just a single
-byte in 8-bit mode or a single short in 16-bit mode. The macros for character
-handling generate simple sequences when used in the basic mode, and more
-complicated ones for UTF characters. GETCHARLENTEST and other macros are not
-used when UTF is not supported. To make sure they can never even appear when
-UTF support is omitted, we don't even define them. */
-
-#ifndef SUPPORT_UTF
-
-/* #define MAX_VALUE_FOR_SINGLE_CHAR */
-/* #define HAS_EXTRALEN(c) */
-/* #define GET_EXTRALEN(c) */
-/* #define NOT_FIRSTCHAR(c) */
-#define GETCHAR(c, eptr) c = *eptr;
-#define GETCHARTEST(c, eptr) c = *eptr;
-#define GETCHARINC(c, eptr) c = *eptr++;
-#define GETCHARINCTEST(c, eptr) c = *eptr++;
-#define GETCHARLEN(c, eptr, len) c = *eptr;
-/* #define GETCHARLENTEST(c, eptr, len) */
-/* #define BACKCHAR(eptr) */
-/* #define FORWARDCHAR(eptr) */
-/* #define ACROSSCHAR(condition, eptr, action) */
-
-#else   /* SUPPORT_UTF */
-
-/* Tests whether the code point needs extra characters to decode. */
-
-#define HASUTF8EXTRALEN(c) ((c) >= 0xc0)
-
-/* Base macro to pick up the remaining bytes of a UTF-8 character, not
-advancing the pointer. */
-
-#define GETUTF8(c, eptr) \
-    { \
-    if ((c & 0x20) == 0) \
-      c = ((c & 0x1f) << 6) | (eptr[1] & 0x3f); \
-    else if ((c & 0x10) == 0) \
-      c = ((c & 0x0f) << 12) | ((eptr[1] & 0x3f) << 6) | (eptr[2] & 0x3f); \
-    else if ((c & 0x08) == 0) \
-      c = ((c & 0x07) << 18) | ((eptr[1] & 0x3f) << 12) | \
-      ((eptr[2] & 0x3f) << 6) | (eptr[3] & 0x3f); \
-    else if ((c & 0x04) == 0) \
-      c = ((c & 0x03) << 24) | ((eptr[1] & 0x3f) << 18) | \
-          ((eptr[2] & 0x3f) << 12) | ((eptr[3] & 0x3f) << 6) | \
-          (eptr[4] & 0x3f); \
-    else \
-      c = ((c & 0x01) << 30) | ((eptr[1] & 0x3f) << 24) | \
-          ((eptr[2] & 0x3f) << 18) | ((eptr[3] & 0x3f) << 12) | \
-          ((eptr[4] & 0x3f) << 6) | (eptr[5] & 0x3f); \
-    }
-
-/* Base macro to pick up the remaining bytes of a UTF-8 character, advancing
-the pointer. */
-
-#define GETUTF8INC(c, eptr) \
-    { \
-    if ((c & 0x20) == 0) \
-      c = ((c & 0x1f) << 6) | (*eptr++ & 0x3f); \
-    else if ((c & 0x10) == 0) \
-      { \
-      c = ((c & 0x0f) << 12) | ((*eptr & 0x3f) << 6) | (eptr[1] & 0x3f); \
-      eptr += 2; \
-      } \
-    else if ((c & 0x08) == 0) \
-      { \
-      c = ((c & 0x07) << 18) | ((*eptr & 0x3f) << 12) | \
-          ((eptr[1] & 0x3f) << 6) | (eptr[2] & 0x3f); \
-      eptr += 3; \
-      } \
-    else if ((c & 0x04) == 0) \
-      { \
-      c = ((c & 0x03) << 24) | ((*eptr & 0x3f) << 18) | \
-          ((eptr[1] & 0x3f) << 12) | ((eptr[2] & 0x3f) << 6) | \
-          (eptr[3] & 0x3f); \
-      eptr += 4; \
-      } \
-    else \
-      { \
-      c = ((c & 0x01) << 30) | ((*eptr & 0x3f) << 24) | \
-          ((eptr[1] & 0x3f) << 18) | ((eptr[2] & 0x3f) << 12) | \
-          ((eptr[3] & 0x3f) << 6) | (eptr[4] & 0x3f); \
-      eptr += 5; \
-      } \
-    }
-
-#if defined COMPILE_PCRE8
-
-/* These macros were originally written in the form of loops that used data
-from the tables whose names start with PRIV(utf8_table). They were rewritten by
-a user so as not to use loops, because in some environments this gives a
-significant performance advantage, and it seems never to do any harm. */
-
-/* Tells the biggest code point which can be encoded as a single character. */
-
-#define MAX_VALUE_FOR_SINGLE_CHAR 127
-
-/* Tests whether the code point needs extra characters to decode. */
-
-#define HAS_EXTRALEN(c) ((c) >= 0xc0)
-
-/* Returns with the additional number of characters if IS_MULTICHAR(c) is TRUE.
-Otherwise it has an undefined behaviour. */
-
-#define GET_EXTRALEN(c) (PRIV(utf8_table4)[(c) & 0x3f])
-
-/* Returns TRUE, if the given character is not the first character
-of a UTF sequence. */
-
-#define NOT_FIRSTCHAR(c) (((c) & 0xc0) == 0x80)
-
-/* Get the next UTF-8 character, not advancing the pointer. This is called when
-we know we are in UTF-8 mode. */
-
-#define GETCHAR(c, eptr) \
-  c = *eptr; \
-  if (c >= 0xc0) GETUTF8(c, eptr);
-
-/* Get the next UTF-8 character, testing for UTF-8 mode, and not advancing the
-pointer. */
-
-#define GETCHARTEST(c, eptr) \
-  c = *eptr; \
-  if (utf && c >= 0xc0) GETUTF8(c, eptr);
-
-/* Get the next UTF-8 character, advancing the pointer. This is called when we
-know we are in UTF-8 mode. */
-
-#define GETCHARINC(c, eptr) \
-  c = *eptr++; \
-  if (c >= 0xc0) GETUTF8INC(c, eptr);
-
-/* Get the next character, testing for UTF-8 mode, and advancing the pointer.
-This is called when we don't know if we are in UTF-8 mode. */
-
-#define GETCHARINCTEST(c, eptr) \
-  c = *eptr++; \
-  if (utf && c >= 0xc0) GETUTF8INC(c, eptr);
-
-/* Base macro to pick up the remaining bytes of a UTF-8 character, not
-advancing the pointer, incrementing the length. */
-
-#define GETUTF8LEN(c, eptr, len) \
-    { \
-    if ((c & 0x20) == 0) \
-      { \
-      c = ((c & 0x1f) << 6) | (eptr[1] & 0x3f); \
-      len++; \
-      } \
-    else if ((c & 0x10)  == 0) \
-      { \
-      c = ((c & 0x0f) << 12) | ((eptr[1] & 0x3f) << 6) | (eptr[2] & 0x3f); \
-      len += 2; \
-      } \
-    else if ((c & 0x08)  == 0) \
-      {\
-      c = ((c & 0x07) << 18) | ((eptr[1] & 0x3f) << 12) | \
-          ((eptr[2] & 0x3f) << 6) | (eptr[3] & 0x3f); \
-      len += 3; \
-      } \
-    else if ((c & 0x04)  == 0) \
-      { \
-      c = ((c & 0x03) << 24) | ((eptr[1] & 0x3f) << 18) | \
-          ((eptr[2] & 0x3f) << 12) | ((eptr[3] & 0x3f) << 6) | \
-          (eptr[4] & 0x3f); \
-      len += 4; \
-      } \
-    else \
-      {\
-      c = ((c & 0x01) << 30) | ((eptr[1] & 0x3f) << 24) | \
-          ((eptr[2] & 0x3f) << 18) | ((eptr[3] & 0x3f) << 12) | \
-          ((eptr[4] & 0x3f) << 6) | (eptr[5] & 0x3f); \
-      len += 5; \
-      } \
-    }
-
-/* Get the next UTF-8 character, not advancing the pointer, incrementing length
-if there are extra bytes. This is called when we know we are in UTF-8 mode. */
-
-#define GETCHARLEN(c, eptr, len) \
-  c = *eptr; \
-  if (c >= 0xc0) GETUTF8LEN(c, eptr, len);
-
-/* Get the next UTF-8 character, testing for UTF-8 mode, not advancing the
-pointer, incrementing length if there are extra bytes. This is called when we
-do not know if we are in UTF-8 mode. */
-
-#define GETCHARLENTEST(c, eptr, len) \
-  c = *eptr; \
-  if (utf && c >= 0xc0) GETUTF8LEN(c, eptr, len);
-
-/* If the pointer is not at the start of a character, move it back until
-it is. This is called only in UTF-8 mode - we don't put a test within the macro
-because almost all calls are already within a block of UTF-8 only code. */
-
-#define BACKCHAR(eptr) while((*eptr & 0xc0) == 0x80) eptr--
-
-/* Same as above, just in the other direction. */
-#define FORWARDCHAR(eptr) while((*eptr & 0xc0) == 0x80) eptr++
-
-/* Same as above, but it allows a fully customizable form. */
-#define ACROSSCHAR(condition, eptr, action) \
-  while((condition) && ((eptr) & 0xc0) == 0x80) action
-
-#elif defined COMPILE_PCRE16
-
-/* Tells the biggest code point which can be encoded as a single character. */
-
-#define MAX_VALUE_FOR_SINGLE_CHAR 65535
-
-/* Tests whether the code point needs extra characters to decode. */
-
-#define HAS_EXTRALEN(c) (((c) & 0xfc00) == 0xd800)
-
-/* Returns with the additional number of characters if IS_MULTICHAR(c) is TRUE.
-Otherwise it has an undefined behaviour. */
-
-#define GET_EXTRALEN(c) 1
-
-/* Returns TRUE, if the given character is not the first character
-of a UTF sequence. */
-
-#define NOT_FIRSTCHAR(c) (((c) & 0xfc00) == 0xdc00)
-
-/* Base macro to pick up the low surrogate of a UTF-16 character, not
-advancing the pointer. */
-
-#define GETUTF16(c, eptr) \
-   { c = (((c & 0x3ff) << 10) | (eptr[1] & 0x3ff)) + 0x10000; }
-
-/* Get the next UTF-16 character, not advancing the pointer. This is called when
-we know we are in UTF-16 mode. */
-
-#define GETCHAR(c, eptr) \
-  c = *eptr; \
-  if ((c & 0xfc00) == 0xd800) GETUTF16(c, eptr);
-
-/* Get the next UTF-16 character, testing for UTF-16 mode, and not advancing the
-pointer. */
-
-#define GETCHARTEST(c, eptr) \
-  c = *eptr; \
-  if (utf && (c & 0xfc00) == 0xd800) GETUTF16(c, eptr);
-
-/* Base macro to pick up the low surrogate of a UTF-16 character, advancing
-the pointer. */
-
-#define GETUTF16INC(c, eptr) \
-   { c = (((c & 0x3ff) << 10) | (*eptr++ & 0x3ff)) + 0x10000; }
-
-/* Get the next UTF-16 character, advancing the pointer. This is called when we
-know we are in UTF-16 mode. */
-
-#define GETCHARINC(c, eptr) \
-  c = *eptr++; \
-  if ((c & 0xfc00) == 0xd800) GETUTF16INC(c, eptr);
-
-/* Get the next character, testing for UTF-16 mode, and advancing the pointer.
-This is called when we don't know if we are in UTF-16 mode. */
-
-#define GETCHARINCTEST(c, eptr) \
-  c = *eptr++; \
-  if (utf && (c & 0xfc00) == 0xd800) GETUTF16INC(c, eptr);
-
-/* Base macro to pick up the low surrogate of a UTF-16 character, not
-advancing the pointer, incrementing the length. */
-
-#define GETUTF16LEN(c, eptr, len) \
-   { c = (((c & 0x3ff) << 10) | (eptr[1] & 0x3ff)) + 0x10000; len++; }
-
-/* Get the next UTF-16 character, not advancing the pointer, incrementing
-length if there is a low surrogate. This is called when we know we are in
-UTF-16 mode. */
-
-#define GETCHARLEN(c, eptr, len) \
-  c = *eptr; \
-  if ((c & 0xfc00) == 0xd800) GETUTF16LEN(c, eptr, len);
-
-/* Get the next UTF-816character, testing for UTF-16 mode, not advancing the
-pointer, incrementing length if there is a low surrogate. This is called when
-we do not know if we are in UTF-16 mode. */
-
-#define GETCHARLENTEST(c, eptr, len) \
-  c = *eptr; \
-  if (utf && (c & 0xfc00) == 0xd800) GETUTF16LEN(c, eptr, len);
-
-/* If the pointer is not at the start of a character, move it back until
-it is. This is called only in UTF-16 mode - we don't put a test within the
-macro because almost all calls are already within a block of UTF-16 only
-code. */
-
-#define BACKCHAR(eptr) if ((*eptr & 0xfc00) == 0xdc00) eptr--
-
-/* Same as above, just in the other direction. */
-#define FORWARDCHAR(eptr) if ((*eptr & 0xfc00) == 0xdc00) eptr++
-
-/* Same as above, but it allows a fully customizable form. */
-#define ACROSSCHAR(condition, eptr, action) \
-  if ((condition) && ((eptr) & 0xfc00) == 0xdc00) action
-
-#elif defined COMPILE_PCRE32
-
-/* These are trivial for the 32-bit library, since all UTF-32 characters fit
-into one pcre_uchar unit. */
-#define MAX_VALUE_FOR_SINGLE_CHAR (0x10ffffu)
-#define HAS_EXTRALEN(c) (0)
-#define GET_EXTRALEN(c) (0)
-#define NOT_FIRSTCHAR(c) (0)
-
-/* Get the next UTF-32 character, not advancing the pointer. This is called when
-we know we are in UTF-32 mode. */
-
-#define GETCHAR(c, eptr) \
-  c = *(eptr);
-
-/* Get the next UTF-32 character, testing for UTF-32 mode, and not advancing the
-pointer. */
-
-#define GETCHARTEST(c, eptr) \
-  c = *(eptr);
-
-/* Get the next UTF-32 character, advancing the pointer. This is called when we
-know we are in UTF-32 mode. */
-
-#define GETCHARINC(c, eptr) \
-  c = *((eptr)++);
-
-/* Get the next character, testing for UTF-32 mode, and advancing the pointer.
-This is called when we don't know if we are in UTF-32 mode. */
-
-#define GETCHARINCTEST(c, eptr) \
-  c = *((eptr)++);
-
-/* Get the next UTF-32 character, not advancing the pointer, not incrementing
-length (since all UTF-32 is of length 1). This is called when we know we are in
-UTF-32 mode. */
-
-#define GETCHARLEN(c, eptr, len) \
-  GETCHAR(c, eptr)
-
-/* Get the next UTF-32character, testing for UTF-32 mode, not advancing the
-pointer, not incrementing the length (since all UTF-32 is of length 1).
-This is called when we do not know if we are in UTF-32 mode. */
-
-#define GETCHARLENTEST(c, eptr, len) \
-  GETCHARTEST(c, eptr)
-
-/* If the pointer is not at the start of a character, move it back until
-it is. This is called only in UTF-32 mode - we don't put a test within the
-macro because almost all calls are already within a block of UTF-32 only
-code.
-These are all no-ops since all UTF-32 characters fit into one pcre_uchar. */
-
-#define BACKCHAR(eptr) do { } while (0)
-
-/* Same as above, just in the other direction. */
-#define FORWARDCHAR(eptr) do { } while (0)
-
-/* Same as above, but it allows a fully customizable form. */
-#define ACROSSCHAR(condition, eptr, action) do { } while (0)
-
-#else
-#error Unsupported compiling mode
-#endif /* COMPILE_PCRE[8|16|32] */
-
-#endif  /* SUPPORT_UTF */
-
-/* Tests for Unicode horizontal and vertical whitespace characters must check a
-number of different values. Using a switch statement for this generates the
-fastest code (no loop, no memory access), and there are several places in the
-interpreter code where this happens. In order to ensure that all the case lists
-remain in step, we use macros so that there is only one place where the lists
-are defined.
-
-These values are also required as lists in pcre_compile.c when processing \h,
-\H, \v and \V in a character class. The lists are defined in pcre_tables.c, but
-macros that define the values are here so that all the definitions are
-together. The lists must be in ascending character order, terminated by
-NOTACHAR (which is 0xffffffff).
-
-Any changes should ensure that the various macros are kept in step with each
-other. NOTE: The values also appear in pcre_jit_compile.c. */
-
-/* ------ ASCII/Unicode environments ------ */
-
-#ifndef EBCDIC
-
-#define HSPACE_LIST \
-  CHAR_HT, CHAR_SPACE, 0xa0, \
-  0x1680, 0x180e, 0x2000, 0x2001, 0x2002, 0x2003, 0x2004, 0x2005, \
-  0x2006, 0x2007, 0x2008, 0x2009, 0x200A, 0x202f, 0x205f, 0x3000, \
-  NOTACHAR
-
-#define HSPACE_MULTIBYTE_CASES \
-  case 0x1680:  /* OGHAM SPACE MARK */ \
-  case 0x180e:  /* MONGOLIAN VOWEL SEPARATOR */ \
-  case 0x2000:  /* EN QUAD */ \
-  case 0x2001:  /* EM QUAD */ \
-  case 0x2002:  /* EN SPACE */ \
-  case 0x2003:  /* EM SPACE */ \
-  case 0x2004:  /* THREE-PER-EM SPACE */ \
-  case 0x2005:  /* FOUR-PER-EM SPACE */ \
-  case 0x2006:  /* SIX-PER-EM SPACE */ \
-  case 0x2007:  /* FIGURE SPACE */ \
-  case 0x2008:  /* PUNCTUATION SPACE */ \
-  case 0x2009:  /* THIN SPACE */ \
-  case 0x200A:  /* HAIR SPACE */ \
-  case 0x202f:  /* NARROW NO-BREAK SPACE */ \
-  case 0x205f:  /* MEDIUM MATHEMATICAL SPACE */ \
-  case 0x3000   /* IDEOGRAPHIC SPACE */
-
-#define HSPACE_BYTE_CASES \
-  case CHAR_HT: \
-  case CHAR_SPACE: \
-  case 0xa0     /* NBSP */
-
-#define HSPACE_CASES \
-  HSPACE_BYTE_CASES: \
-  HSPACE_MULTIBYTE_CASES
-
-#define VSPACE_LIST \
-  CHAR_LF, CHAR_VT, CHAR_FF, CHAR_CR, CHAR_NEL, 0x2028, 0x2029, NOTACHAR
-
-#define VSPACE_MULTIBYTE_CASES \
-  case 0x2028:    /* LINE SEPARATOR */ \
-  case 0x2029     /* PARAGRAPH SEPARATOR */
-
-#define VSPACE_BYTE_CASES \
-  case CHAR_LF: \
-  case CHAR_VT: \
-  case CHAR_FF: \
-  case CHAR_CR: \
-  case CHAR_NEL
-
-#define VSPACE_CASES \
-  VSPACE_BYTE_CASES: \
-  VSPACE_MULTIBYTE_CASES
-
-/* ------ EBCDIC environments ------ */
-
-#else
-#define HSPACE_LIST CHAR_HT, CHAR_SPACE
-
-#define HSPACE_BYTE_CASES \
-  case CHAR_HT: \
-  case CHAR_SPACE
-
-#define HSPACE_CASES HSPACE_BYTE_CASES
-
-#ifdef EBCDIC_NL25
-#define VSPACE_LIST \
-  CHAR_VT, CHAR_FF, CHAR_CR, CHAR_NEL, CHAR_LF, NOTACHAR
-#else
-#define VSPACE_LIST \
-  CHAR_VT, CHAR_FF, CHAR_CR, CHAR_LF, CHAR_NEL, NOTACHAR
-#endif
-
-#define VSPACE_BYTE_CASES \
-  case CHAR_LF: \
-  case CHAR_VT: \
-  case CHAR_FF: \
-  case CHAR_CR: \
-  case CHAR_NEL
-
-#define VSPACE_CASES VSPACE_BYTE_CASES
-#endif  /* EBCDIC */
-
-/* ------ End of whitespace macros ------ */
-
-
-
-/* Private flags containing information about the compiled regex. They used to
-live at the top end of the options word, but that got almost full, so they were
-moved to a 16-bit flags word - which got almost full, so now they are in a
-32-bit flags word. From release 8.00, PCRE_NOPARTIAL is unused, as the
-restrictions on partial matching have been lifted. It remains for backwards
-compatibility. */
-
-#define PCRE_MODE8         0x00000001  /* compiled in 8 bit mode */
-#define PCRE_MODE16        0x00000002  /* compiled in 16 bit mode */
-#define PCRE_MODE32        0x00000004  /* compiled in 32 bit mode */
-#define PCRE_FIRSTSET      0x00000010  /* first_char is set */
-#define PCRE_FCH_CASELESS  0x00000020  /* caseless first char */
-#define PCRE_REQCHSET      0x00000040  /* req_byte is set */
-#define PCRE_RCH_CASELESS  0x00000080  /* caseless requested char */
-#define PCRE_STARTLINE     0x00000100  /* start after \n for multiline */
-#define PCRE_NOPARTIAL     0x00000200  /* can't use partial with this regex */
-#define PCRE_JCHANGED      0x00000400  /* j option used in regex */
-#define PCRE_HASCRORLF     0x00000800  /* explicit \r or \n in pattern */
-#define PCRE_HASTHEN       0x00001000  /* pattern contains (*THEN) */
-#define PCRE_MLSET         0x00002000  /* match limit set by regex */
-#define PCRE_RLSET         0x00004000  /* recursion limit set by regex */
-#define PCRE_MATCH_EMPTY   0x00008000  /* pattern can match empty string */
-
-#if defined COMPILE_PCRE8
-#define PCRE_MODE          PCRE_MODE8
-#elif defined COMPILE_PCRE16
-#define PCRE_MODE          PCRE_MODE16
-#elif defined COMPILE_PCRE32
-#define PCRE_MODE          PCRE_MODE32
-#endif
-#define PCRE_MODE_MASK     (PCRE_MODE8 | PCRE_MODE16 | PCRE_MODE32)
-
-/* Flags for the "extra" block produced by pcre_study(). */
-
-#define PCRE_STUDY_MAPPED  0x0001  /* a map of starting chars exists */
-#define PCRE_STUDY_MINLEN  0x0002  /* a minimum length field exists */
-
-/* Masks for identifying the public options that are permitted at compile
-time, run time, or study time, respectively. */
-
-#define PCRE_NEWLINE_BITS (PCRE_NEWLINE_CR|PCRE_NEWLINE_LF|PCRE_NEWLINE_ANY| \
-                           PCRE_NEWLINE_ANYCRLF)
-
-#define PUBLIC_COMPILE_OPTIONS \
-  (PCRE_CASELESS|PCRE_EXTENDED|PCRE_ANCHORED|PCRE_MULTILINE| \
-   PCRE_DOTALL|PCRE_DOLLAR_ENDONLY|PCRE_EXTRA|PCRE_UNGREEDY|PCRE_UTF8| \
-   PCRE_NO_AUTO_CAPTURE|PCRE_NO_AUTO_POSSESS| \
-   PCRE_NO_UTF8_CHECK|PCRE_AUTO_CALLOUT|PCRE_FIRSTLINE| \
-   PCRE_DUPNAMES|PCRE_NEWLINE_BITS|PCRE_BSR_ANYCRLF|PCRE_BSR_UNICODE| \
-   PCRE_JAVASCRIPT_COMPAT|PCRE_UCP|PCRE_NO_START_OPTIMIZE|PCRE_NEVER_UTF)
-
-#define PUBLIC_EXEC_OPTIONS \
-  (PCRE_ANCHORED|PCRE_NOTBOL|PCRE_NOTEOL|PCRE_NOTEMPTY|PCRE_NOTEMPTY_ATSTART| \
-   PCRE_NO_UTF8_CHECK|PCRE_PARTIAL_HARD|PCRE_PARTIAL_SOFT|PCRE_NEWLINE_BITS| \
-   PCRE_BSR_ANYCRLF|PCRE_BSR_UNICODE|PCRE_NO_START_OPTIMIZE)
-
-#define PUBLIC_DFA_EXEC_OPTIONS \
-  (PCRE_ANCHORED|PCRE_NOTBOL|PCRE_NOTEOL|PCRE_NOTEMPTY|PCRE_NOTEMPTY_ATSTART| \
-   PCRE_NO_UTF8_CHECK|PCRE_PARTIAL_HARD|PCRE_PARTIAL_SOFT|PCRE_DFA_SHORTEST| \
-   PCRE_DFA_RESTART|PCRE_NEWLINE_BITS|PCRE_BSR_ANYCRLF|PCRE_BSR_UNICODE| \
-   PCRE_NO_START_OPTIMIZE)
-
-#define PUBLIC_STUDY_OPTIONS \
-   (PCRE_STUDY_JIT_COMPILE|PCRE_STUDY_JIT_PARTIAL_SOFT_COMPILE| \
-    PCRE_STUDY_JIT_PARTIAL_HARD_COMPILE|PCRE_STUDY_EXTRA_NEEDED)
-
-#define PUBLIC_JIT_EXEC_OPTIONS \
-   (PCRE_NO_UTF8_CHECK|PCRE_NOTBOL|PCRE_NOTEOL|PCRE_NOTEMPTY|\
-    PCRE_NOTEMPTY_ATSTART|PCRE_PARTIAL_SOFT|PCRE_PARTIAL_HARD)
-
-/* Magic number to provide a small check against being handed junk. */
-
-#define MAGIC_NUMBER  0x50435245UL   /* 'PCRE' */
-
-/* This variable is used to detect a loaded regular expression
-in different endianness. */
-
-#define REVERSED_MAGIC_NUMBER  0x45524350UL   /* 'ERCP' */
-
-/* The maximum remaining length of subject we are prepared to search for a
-req_byte match. */
-
-#define REQ_BYTE_MAX 1000
-
-/* Miscellaneous definitions. The #ifndef is to pacify compiler warnings in
-environments where these macros are defined elsewhere. Unfortunately, there
-is no way to do the same for the typedef. */
-
-typedef int BOOL;
-
-#ifndef FALSE
-#define FALSE   0
-#define TRUE    1
-#endif
-
-/* If PCRE is to support UTF-8 on EBCDIC platforms, we cannot use normal
-character constants like '*' because the compiler would emit their EBCDIC code,
-which is different from their ASCII/UTF-8 code. Instead we define macros for
-the characters so that they always use the ASCII/UTF-8 code when UTF-8 support
-is enabled. When UTF-8 support is not enabled, the definitions use character
-literals. Both character and string versions of each character are needed, and
-there are some longer strings as well.
-
-This means that, on EBCDIC platforms, the PCRE library can handle either
-EBCDIC, or UTF-8, but not both. To support both in the same compiled library
-would need different lookups depending on whether PCRE_UTF8 was set or not.
-This would make it impossible to use characters in switch/case statements,
-which would reduce performance. For a theoretical use (which nobody has asked
-for) in a minority area (EBCDIC platforms), this is not sensible. Any
-application that did need both could compile two versions of the library, using
-macros to give the functions distinct names. */
-
-#ifndef SUPPORT_UTF
-
-/* UTF-8 support is not enabled; use the platform-dependent character literals
-so that PCRE works in both ASCII and EBCDIC environments, but only in non-UTF
-mode. Newline characters are problematic in EBCDIC. Though it has CR and LF
-characters, a common practice has been to use its NL (0x15) character as the
-line terminator in C-like processing environments. However, sometimes the LF
-(0x25) character is used instead, according to this Unicode document:
-
-http://unicode.org/standard/reports/tr13/tr13-5.html
-
-PCRE defaults EBCDIC NL to 0x15, but has a build-time option to select 0x25
-instead. Whichever is *not* chosen is defined as NEL.
-
-In both ASCII and EBCDIC environments, CHAR_NL and CHAR_LF are synonyms for the
-same code point. */
-
-#ifdef EBCDIC
-
-#ifndef EBCDIC_NL25
-#define CHAR_NL                     '\x15'
-#define CHAR_NEL                    '\x25'
-#define STR_NL                      "\x15"
-#define STR_NEL                     "\x25"
-#else
-#define CHAR_NL                     '\x25'
-#define CHAR_NEL                    '\x15'
-#define STR_NL                      "\x25"
-#define STR_NEL                     "\x15"
-#endif
-
-#define CHAR_LF                     CHAR_NL
-#define STR_LF                      STR_NL
-
-#define CHAR_ESC                    '\047'
-#define CHAR_DEL                    '\007'
-#define STR_ESC                     "\047"
-#define STR_DEL                     "\007"
-
-#else  /* Not EBCDIC */
-
-/* In ASCII/Unicode, linefeed is '\n' and we equate this to NL for
-compatibility. NEL is the Unicode newline character; make sure it is
-a positive value. */
-
-#define CHAR_LF                     '\n'
-#define CHAR_NL                     CHAR_LF
-#define CHAR_NEL                    ((unsigned char)'\x85')
-#define CHAR_ESC                    '\033'
-#define CHAR_DEL                    '\177'
-
-#define STR_LF                      "\n"
-#define STR_NL                      STR_LF
-#define STR_NEL                     "\x85"
-#define STR_ESC                     "\033"
-#define STR_DEL                     "\177"
-
-#endif  /* EBCDIC */
-
-/* The remaining definitions work in both environments. */
-
-#define CHAR_NULL                   '\0'
-#define CHAR_HT                     '\t'
-#define CHAR_VT                     '\v'
-#define CHAR_FF                     '\f'
-#define CHAR_CR                     '\r'
-#define CHAR_BS                     '\b'
-#define CHAR_BEL                    '\a'
-
-#define CHAR_SPACE                  ' '
-#define CHAR_EXCLAMATION_MARK       '!'
-#define CHAR_QUOTATION_MARK         '"'
-#define CHAR_NUMBER_SIGN            '#'
-#define CHAR_DOLLAR_SIGN            '$'
-#define CHAR_PERCENT_SIGN           '%'
-#define CHAR_AMPERSAND              '&'
-#define CHAR_APOSTROPHE             '\''
-#define CHAR_LEFT_PARENTHESIS       '('
-#define CHAR_RIGHT_PARENTHESIS      ')'
-#define CHAR_ASTERISK               '*'
-#define CHAR_PLUS                   '+'
-#define CHAR_COMMA                  ','
-#define CHAR_MINUS                  '-'
-#define CHAR_DOT                    '.'
-#define CHAR_SLASH                  '/'
-#define CHAR_0                      '0'
-#define CHAR_1                      '1'
-#define CHAR_2                      '2'
-#define CHAR_3                      '3'
-#define CHAR_4                      '4'
-#define CHAR_5                      '5'
-#define CHAR_6                      '6'
-#define CHAR_7                      '7'
-#define CHAR_8                      '8'
-#define CHAR_9                      '9'
-#define CHAR_COLON                  ':'
-#define CHAR_SEMICOLON              ';'
-#define CHAR_LESS_THAN_SIGN         '<'
-#define CHAR_EQUALS_SIGN            '='
-#define CHAR_GREATER_THAN_SIGN      '>'
-#define CHAR_QUESTION_MARK          '?'
-#define CHAR_COMMERCIAL_AT          '@'
-#define CHAR_A                      'A'
-#define CHAR_B                      'B'
-#define CHAR_C                      'C'
-#define CHAR_D                      'D'
-#define CHAR_E                      'E'
-#define CHAR_F                      'F'
-#define CHAR_G                      'G'
-#define CHAR_H                      'H'
-#define CHAR_I                      'I'
-#define CHAR_J                      'J'
-#define CHAR_K                      'K'
-#define CHAR_L                      'L'
-#define CHAR_M                      'M'
-#define CHAR_N                      'N'
-#define CHAR_O                      'O'
-#define CHAR_P                      'P'
-#define CHAR_Q                      'Q'
-#define CHAR_R                      'R'
-#define CHAR_S                      'S'
-#define CHAR_T                      'T'
-#define CHAR_U                      'U'
-#define CHAR_V                      'V'
-#define CHAR_W                      'W'
-#define CHAR_X                      'X'
-#define CHAR_Y                      'Y'
-#define CHAR_Z                      'Z'
-#define CHAR_LEFT_SQUARE_BRACKET    '['
-#define CHAR_BACKSLASH              '\\'
-#define CHAR_RIGHT_SQUARE_BRACKET   ']'
-#define CHAR_CIRCUMFLEX_ACCENT      '^'
-#define CHAR_UNDERSCORE             '_'
-#define CHAR_GRAVE_ACCENT           '`'
-#define CHAR_a                      'a'
-#define CHAR_b                      'b'
-#define CHAR_c                      'c'
-#define CHAR_d                      'd'
-#define CHAR_e                      'e'
-#define CHAR_f                      'f'
-#define CHAR_g                      'g'
-#define CHAR_h                      'h'
-#define CHAR_i                      'i'
-#define CHAR_j                      'j'
-#define CHAR_k                      'k'
-#define CHAR_l                      'l'
-#define CHAR_m                      'm'
-#define CHAR_n                      'n'
-#define CHAR_o                      'o'
-#define CHAR_p                      'p'
-#define CHAR_q                      'q'
-#define CHAR_r                      'r'
-#define CHAR_s                      's'
-#define CHAR_t                      't'
-#define CHAR_u                      'u'
-#define CHAR_v                      'v'
-#define CHAR_w                      'w'
-#define CHAR_x                      'x'
-#define CHAR_y                      'y'
-#define CHAR_z                      'z'
-#define CHAR_LEFT_CURLY_BRACKET     '{'
-#define CHAR_VERTICAL_LINE          '|'
-#define CHAR_RIGHT_CURLY_BRACKET    '}'
-#define CHAR_TILDE                  '~'
-
-#define STR_HT                      "\t"
-#define STR_VT                      "\v"
-#define STR_FF                      "\f"
-#define STR_CR                      "\r"
-#define STR_BS                      "\b"
-#define STR_BEL                     "\a"
-
-#define STR_SPACE                   " "
-#define STR_EXCLAMATION_MARK        "!"
-#define STR_QUOTATION_MARK          "\""
-#define STR_NUMBER_SIGN             "#"
-#define STR_DOLLAR_SIGN             "$"
-#define STR_PERCENT_SIGN            "%"
-#define STR_AMPERSAND               "&"
-#define STR_APOSTROPHE              "'"
-#define STR_LEFT_PARENTHESIS        "("
-#define STR_RIGHT_PARENTHESIS       ")"
-#define STR_ASTERISK                "*"
-#define STR_PLUS                    "+"
-#define STR_COMMA                   ","
-#define STR_MINUS                   "-"
-#define STR_DOT                     "."
-#define STR_SLASH                   "/"
-#define STR_0                       "0"
-#define STR_1                       "1"
-#define STR_2                       "2"
-#define STR_3                       "3"
-#define STR_4                       "4"
-#define STR_5                       "5"
-#define STR_6                       "6"
-#define STR_7                       "7"
-#define STR_8                       "8"
-#define STR_9                       "9"
-#define STR_COLON                   ":"
-#define STR_SEMICOLON               ";"
-#define STR_LESS_THAN_SIGN          "<"
-#define STR_EQUALS_SIGN             "="
-#define STR_GREATER_THAN_SIGN       ">"
-#define STR_QUESTION_MARK           "?"
-#define STR_COMMERCIAL_AT           "@"
-#define STR_A                       "A"
-#define STR_B                       "B"
-#define STR_C                       "C"
-#define STR_D                       "D"
-#define STR_E                       "E"
-#define STR_F                       "F"
-#define STR_G                       "G"
-#define STR_H                       "H"
-#define STR_I                       "I"
-#define STR_J                       "J"
-#define STR_K                       "K"
-#define STR_L                       "L"
-#define STR_M                       "M"
-#define STR_N                       "N"
-#define STR_O                       "O"
-#define STR_P                       "P"
-#define STR_Q                       "Q"
-#define STR_R                       "R"
-#define STR_S                       "S"
-#define STR_T                       "T"
-#define STR_U                       "U"
-#define STR_V                       "V"
-#define STR_W                       "W"
-#define STR_X                       "X"
-#define STR_Y                       "Y"
-#define STR_Z                       "Z"
-#define STR_LEFT_SQUARE_BRACKET     "["
-#define STR_BACKSLASH               "\\"
-#define STR_RIGHT_SQUARE_BRACKET    "]"
-#define STR_CIRCUMFLEX_ACCENT       "^"
-#define STR_UNDERSCORE              "_"
-#define STR_GRAVE_ACCENT            "`"
-#define STR_a                       "a"
-#define STR_b                       "b"
-#define STR_c                       "c"
-#define STR_d                       "d"
-#define STR_e                       "e"
-#define STR_f                       "f"
-#define STR_g                       "g"
-#define STR_h                       "h"
-#define STR_i                       "i"
-#define STR_j                       "j"
-#define STR_k                       "k"
-#define STR_l                       "l"
-#define STR_m                       "m"
-#define STR_n                       "n"
-#define STR_o                       "o"
-#define STR_p                       "p"
-#define STR_q                       "q"
-#define STR_r                       "r"
-#define STR_s                       "s"
-#define STR_t                       "t"
-#define STR_u                       "u"
-#define STR_v                       "v"
-#define STR_w                       "w"
-#define STR_x                       "x"
-#define STR_y                       "y"
-#define STR_z                       "z"
-#define STR_LEFT_CURLY_BRACKET      "{"
-#define STR_VERTICAL_LINE           "|"
-#define STR_RIGHT_CURLY_BRACKET     "}"
-#define STR_TILDE                   "~"
-
-#define STRING_ACCEPT0              "ACCEPT\0"
-#define STRING_COMMIT0              "COMMIT\0"
-#define STRING_F0                   "F\0"
-#define STRING_FAIL0                "FAIL\0"
-#define STRING_MARK0                "MARK\0"
-#define STRING_PRUNE0               "PRUNE\0"
-#define STRING_SKIP0                "SKIP\0"
-#define STRING_THEN                 "THEN"
-
-#define STRING_alpha0               "alpha\0"
-#define STRING_lower0               "lower\0"
-#define STRING_upper0               "upper\0"
-#define STRING_alnum0               "alnum\0"
-#define STRING_ascii0               "ascii\0"
-#define STRING_blank0               "blank\0"
-#define STRING_cntrl0               "cntrl\0"
-#define STRING_digit0               "digit\0"
-#define STRING_graph0               "graph\0"
-#define STRING_print0               "print\0"
-#define STRING_punct0               "punct\0"
-#define STRING_space0               "space\0"
-#define STRING_word0                "word\0"
-#define STRING_xdigit               "xdigit"
-
-#define STRING_DEFINE               "DEFINE"
-#define STRING_WEIRD_STARTWORD      "[:<:]]"
-#define STRING_WEIRD_ENDWORD        "[:>:]]"
-
-#define STRING_CR_RIGHTPAR              "CR)"
-#define STRING_LF_RIGHTPAR              "LF)"
-#define STRING_CRLF_RIGHTPAR            "CRLF)"
-#define STRING_ANY_RIGHTPAR             "ANY)"
-#define STRING_ANYCRLF_RIGHTPAR         "ANYCRLF)"
-#define STRING_BSR_ANYCRLF_RIGHTPAR     "BSR_ANYCRLF)"
-#define STRING_BSR_UNICODE_RIGHTPAR     "BSR_UNICODE)"
-#define STRING_UTF8_RIGHTPAR            "UTF8)"
-#define STRING_UTF16_RIGHTPAR           "UTF16)"
-#define STRING_UTF32_RIGHTPAR           "UTF32)"
-#define STRING_UTF_RIGHTPAR             "UTF)"
-#define STRING_UCP_RIGHTPAR             "UCP)"
-#define STRING_NO_AUTO_POSSESS_RIGHTPAR "NO_AUTO_POSSESS)"
-#define STRING_NO_START_OPT_RIGHTPAR    "NO_START_OPT)"
-#define STRING_LIMIT_MATCH_EQ           "LIMIT_MATCH="
-#define STRING_LIMIT_RECURSION_EQ       "LIMIT_RECURSION="
-
-#else  /* SUPPORT_UTF */
-
-/* UTF-8 support is enabled; always use UTF-8 (=ASCII) character codes. This
-works in both modes non-EBCDIC platforms, and on EBCDIC platforms in UTF-8 mode
-only. */
-
-#define CHAR_HT                     '\011'
-#define CHAR_VT                     '\013'
-#define CHAR_FF                     '\014'
-#define CHAR_CR                     '\015'
-#define CHAR_LF                     '\012'
-#define CHAR_NL                     CHAR_LF
-#define CHAR_NEL                    ((unsigned char)'\x85')
-#define CHAR_BS                     '\010'
-#define CHAR_BEL                    '\007'
-#define CHAR_ESC                    '\033'
-#define CHAR_DEL                    '\177'
-
-#define CHAR_NULL                   '\0'
-#define CHAR_SPACE                  '\040'
-#define CHAR_EXCLAMATION_MARK       '\041'
-#define CHAR_QUOTATION_MARK         '\042'
-#define CHAR_NUMBER_SIGN            '\043'
-#define CHAR_DOLLAR_SIGN            '\044'
-#define CHAR_PERCENT_SIGN           '\045'
-#define CHAR_AMPERSAND              '\046'
-#define CHAR_APOSTROPHE             '\047'
-#define CHAR_LEFT_PARENTHESIS       '\050'
-#define CHAR_RIGHT_PARENTHESIS      '\051'
-#define CHAR_ASTERISK               '\052'
-#define CHAR_PLUS                   '\053'
-#define CHAR_COMMA                  '\054'
-#define CHAR_MINUS                  '\055'
-#define CHAR_DOT                    '\056'
-#define CHAR_SLASH                  '\057'
-#define CHAR_0                      '\060'
-#define CHAR_1                      '\061'
-#define CHAR_2                      '\062'
-#define CHAR_3                      '\063'
-#define CHAR_4                      '\064'
-#define CHAR_5                      '\065'
-#define CHAR_6                      '\066'
-#define CHAR_7                      '\067'
-#define CHAR_8                      '\070'
-#define CHAR_9                      '\071'
-#define CHAR_COLON                  '\072'
-#define CHAR_SEMICOLON              '\073'
-#define CHAR_LESS_THAN_SIGN         '\074'
-#define CHAR_EQUALS_SIGN            '\075'
-#define CHAR_GREATER_THAN_SIGN      '\076'
-#define CHAR_QUESTION_MARK          '\077'
-#define CHAR_COMMERCIAL_AT          '\100'
-#define CHAR_A                      '\101'
-#define CHAR_B                      '\102'
-#define CHAR_C                      '\103'
-#define CHAR_D                      '\104'
-#define CHAR_E                      '\105'
-#define CHAR_F                      '\106'
-#define CHAR_G                      '\107'
-#define CHAR_H                      '\110'
-#define CHAR_I                      '\111'
-#define CHAR_J                      '\112'
-#define CHAR_K                      '\113'
-#define CHAR_L                      '\114'
-#define CHAR_M                      '\115'
-#define CHAR_N                      '\116'
-#define CHAR_O                      '\117'
-#define CHAR_P                      '\120'
-#define CHAR_Q                      '\121'
-#define CHAR_R                      '\122'
-#define CHAR_S                      '\123'
-#define CHAR_T                      '\124'
-#define CHAR_U                      '\125'
-#define CHAR_V                      '\126'
-#define CHAR_W                      '\127'
-#define CHAR_X                      '\130'
-#define CHAR_Y                      '\131'
-#define CHAR_Z                      '\132'
-#define CHAR_LEFT_SQUARE_BRACKET    '\133'
-#define CHAR_BACKSLASH              '\134'
-#define CHAR_RIGHT_SQUARE_BRACKET   '\135'
-#define CHAR_CIRCUMFLEX_ACCENT      '\136'
-#define CHAR_UNDERSCORE             '\137'
-#define CHAR_GRAVE_ACCENT           '\140'
-#define CHAR_a                      '\141'
-#define CHAR_b                      '\142'
-#define CHAR_c                      '\143'
-#define CHAR_d                      '\144'
-#define CHAR_e                      '\145'
-#define CHAR_f                      '\146'
-#define CHAR_g                      '\147'
-#define CHAR_h                      '\150'
-#define CHAR_i                      '\151'
-#define CHAR_j                      '\152'
-#define CHAR_k                      '\153'
-#define CHAR_l                      '\154'
-#define CHAR_m                      '\155'
-#define CHAR_n                      '\156'
-#define CHAR_o                      '\157'
-#define CHAR_p                      '\160'
-#define CHAR_q                      '\161'
-#define CHAR_r                      '\162'
-#define CHAR_s                      '\163'
-#define CHAR_t                      '\164'
-#define CHAR_u                      '\165'
-#define CHAR_v                      '\166'
-#define CHAR_w                      '\167'
-#define CHAR_x                      '\170'
-#define CHAR_y                      '\171'
-#define CHAR_z                      '\172'
-#define CHAR_LEFT_CURLY_BRACKET     '\173'
-#define CHAR_VERTICAL_LINE          '\174'
-#define CHAR_RIGHT_CURLY_BRACKET    '\175'
-#define CHAR_TILDE                  '\176'
-
-#define STR_HT                      "\011"
-#define STR_VT                      "\013"
-#define STR_FF                      "\014"
-#define STR_CR                      "\015"
-#define STR_NL                      "\012"
-#define STR_BS                      "\010"
-#define STR_BEL                     "\007"
-#define STR_ESC                     "\033"
-#define STR_DEL                     "\177"
-
-#define STR_SPACE                   "\040"
-#define STR_EXCLAMATION_MARK        "\041"
-#define STR_QUOTATION_MARK          "\042"
-#define STR_NUMBER_SIGN             "\043"
-#define STR_DOLLAR_SIGN             "\044"
-#define STR_PERCENT_SIGN            "\045"
-#define STR_AMPERSAND               "\046"
-#define STR_APOSTROPHE              "\047"
-#define STR_LEFT_PARENTHESIS        "\050"
-#define STR_RIGHT_PARENTHESIS       "\051"
-#define STR_ASTERISK                "\052"
-#define STR_PLUS                    "\053"
-#define STR_COMMA                   "\054"
-#define STR_MINUS                   "\055"
-#define STR_DOT                     "\056"
-#define STR_SLASH                   "\057"
-#define STR_0                       "\060"
-#define STR_1                       "\061"
-#define STR_2                       "\062"
-#define STR_3                       "\063"
-#define STR_4                       "\064"
-#define STR_5                       "\065"
-#define STR_6                       "\066"
-#define STR_7                       "\067"
-#define STR_8                       "\070"
-#define STR_9                       "\071"
-#define STR_COLON                   "\072"
-#define STR_SEMICOLON               "\073"
-#define STR_LESS_THAN_SIGN          "\074"
-#define STR_EQUALS_SIGN             "\075"
-#define STR_GREATER_THAN_SIGN       "\076"
-#define STR_QUESTION_MARK           "\077"
-#define STR_COMMERCIAL_AT           "\100"
-#define STR_A                       "\101"
-#define STR_B                       "\102"
-#define STR_C                       "\103"
-#define STR_D                       "\104"
-#define STR_E                       "\105"
-#define STR_F                       "\106"
-#define STR_G                       "\107"
-#define STR_H                       "\110"
-#define STR_I                       "\111"
-#define STR_J                       "\112"
-#define STR_K                       "\113"
-#define STR_L                       "\114"
-#define STR_M                       "\115"
-#define STR_N                       "\116"
-#define STR_O                       "\117"
-#define STR_P                       "\120"
-#define STR_Q                       "\121"
-#define STR_R                       "\122"
-#define STR_S                       "\123"
-#define STR_T                       "\124"
-#define STR_U                       "\125"
-#define STR_V                       "\126"
-#define STR_W                       "\127"
-#define STR_X                       "\130"
-#define STR_Y                       "\131"
-#define STR_Z                       "\132"
-#define STR_LEFT_SQUARE_BRACKET     "\133"
-#define STR_BACKSLASH               "\134"
-#define STR_RIGHT_SQUARE_BRACKET    "\135"
-#define STR_CIRCUMFLEX_ACCENT       "\136"
-#define STR_UNDERSCORE              "\137"
-#define STR_GRAVE_ACCENT            "\140"
-#define STR_a                       "\141"
-#define STR_b                       "\142"
-#define STR_c                       "\143"
-#define STR_d                       "\144"
-#define STR_e                       "\145"
-#define STR_f                       "\146"
-#define STR_g                       "\147"
-#define STR_h                       "\150"
-#define STR_i                       "\151"
-#define STR_j                       "\152"
-#define STR_k                       "\153"
-#define STR_l                       "\154"
-#define STR_m                       "\155"
-#define STR_n                       "\156"
-#define STR_o                       "\157"
-#define STR_p                       "\160"
-#define STR_q                       "\161"
-#define STR_r                       "\162"
-#define STR_s                       "\163"
-#define STR_t                       "\164"
-#define STR_u                       "\165"
-#define STR_v                       "\166"
-#define STR_w                       "\167"
-#define STR_x                       "\170"
-#define STR_y                       "\171"
-#define STR_z                       "\172"
-#define STR_LEFT_CURLY_BRACKET      "\173"
-#define STR_VERTICAL_LINE           "\174"
-#define STR_RIGHT_CURLY_BRACKET     "\175"
-#define STR_TILDE                   "\176"
-
-#define STRING_ACCEPT0              STR_A STR_C STR_C STR_E STR_P STR_T "\0"
-#define STRING_COMMIT0              STR_C STR_O STR_M STR_M STR_I STR_T "\0"
-#define STRING_F0                   STR_F "\0"
-#define STRING_FAIL0                STR_F STR_A STR_I STR_L "\0"
-#define STRING_MARK0                STR_M STR_A STR_R STR_K "\0"
-#define STRING_PRUNE0               STR_P STR_R STR_U STR_N STR_E "\0"
-#define STRING_SKIP0                STR_S STR_K STR_I STR_P "\0"
-#define STRING_THEN                 STR_T STR_H STR_E STR_N
-
-#define STRING_alpha0               STR_a STR_l STR_p STR_h STR_a "\0"
-#define STRING_lower0               STR_l STR_o STR_w STR_e STR_r "\0"
-#define STRING_upper0               STR_u STR_p STR_p STR_e STR_r "\0"
-#define STRING_alnum0               STR_a STR_l STR_n STR_u STR_m "\0"
-#define STRING_ascii0               STR_a STR_s STR_c STR_i STR_i "\0"
-#define STRING_blank0               STR_b STR_l STR_a STR_n STR_k "\0"
-#define STRING_cntrl0               STR_c STR_n STR_t STR_r STR_l "\0"
-#define STRING_digit0               STR_d STR_i STR_g STR_i STR_t "\0"
-#define STRING_graph0               STR_g STR_r STR_a STR_p STR_h "\0"
-#define STRING_print0               STR_p STR_r STR_i STR_n STR_t "\0"
-#define STRING_punct0               STR_p STR_u STR_n STR_c STR_t "\0"
-#define STRING_space0               STR_s STR_p STR_a STR_c STR_e "\0"
-#define STRING_word0                STR_w STR_o STR_r STR_d       "\0"
-#define STRING_xdigit               STR_x STR_d STR_i STR_g STR_i STR_t
-
-#define STRING_DEFINE               STR_D STR_E STR_F STR_I STR_N STR_E
-#define STRING_WEIRD_STARTWORD      STR_LEFT_SQUARE_BRACKET STR_COLON STR_LESS_THAN_SIGN STR_COLON STR_RIGHT_SQUARE_BRACKET STR_RIGHT_SQUARE_BRACKET
-#define STRING_WEIRD_ENDWORD        STR_LEFT_SQUARE_BRACKET STR_COLON STR_GREATER_THAN_SIGN STR_COLON STR_RIGHT_SQUARE_BRACKET STR_RIGHT_SQUARE_BRACKET
-
-#define STRING_CR_RIGHTPAR              STR_C STR_R STR_RIGHT_PARENTHESIS
-#define STRING_LF_RIGHTPAR              STR_L STR_F STR_RIGHT_PARENTHESIS
-#define STRING_CRLF_RIGHTPAR            STR_C STR_R STR_L STR_F STR_RIGHT_PARENTHESIS
-#define STRING_ANY_RIGHTPAR             STR_A STR_N STR_Y STR_RIGHT_PARENTHESIS
-#define STRING_ANYCRLF_RIGHTPAR         STR_A STR_N STR_Y STR_C STR_R STR_L STR_F STR_RIGHT_PARENTHESIS
-#define STRING_BSR_ANYCRLF_RIGHTPAR     STR_B STR_S STR_R STR_UNDERSCORE STR_A STR_N STR_Y STR_C STR_R STR_L STR_F STR_RIGHT_PARENTHESIS
-#define STRING_BSR_UNICODE_RIGHTPAR     STR_B STR_S STR_R STR_UNDERSCORE STR_U STR_N STR_I STR_C STR_O STR_D STR_E STR_RIGHT_PARENTHESIS
-#define STRING_UTF8_RIGHTPAR            STR_U STR_T STR_F STR_8 STR_RIGHT_PARENTHESIS
-#define STRING_UTF16_RIGHTPAR           STR_U STR_T STR_F STR_1 STR_6 STR_RIGHT_PARENTHESIS
-#define STRING_UTF32_RIGHTPAR           STR_U STR_T STR_F STR_3 STR_2 STR_RIGHT_PARENTHESIS
-#define STRING_UTF_RIGHTPAR             STR_U STR_T STR_F STR_RIGHT_PARENTHESIS
-#define STRING_UCP_RIGHTPAR             STR_U STR_C STR_P STR_RIGHT_PARENTHESIS
-#define STRING_NO_AUTO_POSSESS_RIGHTPAR STR_N STR_O STR_UNDERSCORE STR_A STR_U STR_T STR_O STR_UNDERSCORE STR_P STR_O STR_S STR_S STR_E STR_S STR_S STR_RIGHT_PARENTHESIS
-#define STRING_NO_START_OPT_RIGHTPAR    STR_N STR_O STR_UNDERSCORE STR_S STR_T STR_A STR_R STR_T STR_UNDERSCORE STR_O STR_P STR_T STR_RIGHT_PARENTHESIS
-#define STRING_LIMIT_MATCH_EQ           STR_L STR_I STR_M STR_I STR_T STR_UNDERSCORE STR_M STR_A STR_T STR_C STR_H STR_EQUALS_SIGN
-#define STRING_LIMIT_RECURSION_EQ       STR_L STR_I STR_M STR_I STR_T STR_UNDERSCORE STR_R STR_E STR_C STR_U STR_R STR_S STR_I STR_O STR_N STR_EQUALS_SIGN
-
-#endif  /* SUPPORT_UTF */
-
-/* Escape items that are just an encoding of a particular data value. */
-
-#ifndef ESC_e
-#define ESC_e CHAR_ESC
-#endif
-
-#ifndef ESC_f
-#define ESC_f CHAR_FF
-#endif
-
-#ifndef ESC_n
-#define ESC_n CHAR_LF
-#endif
-
-#ifndef ESC_r
-#define ESC_r CHAR_CR
-#endif
-
-/* We can't officially use ESC_t because it is a POSIX reserved identifier
-(presumably because of all the others like size_t). */
-
-#ifndef ESC_tee
-#define ESC_tee CHAR_HT
-#endif
-
-/* Codes for different types of Unicode property */
-
-#define PT_ANY        0    /* Any property - matches all chars */
-#define PT_LAMP       1    /* L& - the union of Lu, Ll, Lt */
-#define PT_GC         2    /* Specified general characteristic (e.g. L) */
-#define PT_PC         3    /* Specified particular characteristic (e.g. Lu) */
-#define PT_SC         4    /* Script (e.g. Han) */
-#define PT_ALNUM      5    /* Alphanumeric - the union of L and N */
-#define PT_SPACE      6    /* Perl space - Z plus 9,10,12,13 */
-#define PT_PXSPACE    7    /* POSIX space - Z plus 9,10,11,12,13 */
-#define PT_WORD       8    /* Word - L plus N plus underscore */
-#define PT_CLIST      9    /* Pseudo-property: match character list */
-#define PT_UCNC      10    /* Universal Character nameable character */
-#define PT_TABSIZE   11    /* Size of square table for autopossessify tests */
-
-/* The following special properties are used only in XCLASS items, when POSIX
-classes are specified and PCRE_UCP is set - in other words, for Unicode
-handling of these classes. They are not available via the \p or \P escapes like
-those in the above list, and so they do not take part in the autopossessifying
-table. */
-
-#define PT_PXGRAPH   11    /* [:graph:] - characters that mark the paper */
-#define PT_PXPRINT   12    /* [:print:] - [:graph:] plus non-control spaces */
-#define PT_PXPUNCT   13    /* [:punct:] - punctuation characters */
-
-/* Flag bits and data types for the extended class (OP_XCLASS) for classes that
-contain characters with values greater than 255. */
-
-#define XCL_NOT       0x01    /* Flag: this is a negative class */
-#define XCL_MAP       0x02    /* Flag: a 32-byte map is present */
-#define XCL_HASPROP   0x04    /* Flag: property checks are present. */
-
-#define XCL_END       0    /* Marks end of individual items */
-#define XCL_SINGLE    1    /* Single item (one multibyte char) follows */
-#define XCL_RANGE     2    /* A range (two multibyte chars) follows */
-#define XCL_PROP      3    /* Unicode property (2-byte property code follows) */
-#define XCL_NOTPROP   4    /* Unicode inverted property (ditto) */
-
-/* These are escaped items that aren't just an encoding of a particular data
-value such as \n. They must have non-zero values, as check_escape() returns 0
-for a data character.  Also, they must appear in the same order as in the
-opcode definitions below, up to ESC_z. There's a dummy for OP_ALLANY because it
-corresponds to "." in DOTALL mode rather than an escape sequence. It is also
-used for [^] in JavaScript compatibility mode, and for \C in non-utf mode. In
-non-DOTALL mode, "." behaves like \N.
-
-The special values ESC_DU, ESC_du, etc. are used instead of ESC_D, ESC_d, etc.
-when PCRE_UCP is set and replacement of \d etc by \p sequences is required.
-They must be contiguous, and remain in order so that the replacements can be
-looked up from a table.
-
-Negative numbers are used to encode a backreference (\1, \2, \3, etc.) in
-check_escape(). There are two tests in the code for an escape
-greater than ESC_b and less than ESC_Z to detect the types that may be
-repeated. These are the types that consume characters. If any new escapes are
-put in between that don't consume a character, that code will have to change.
-*/
-
-enum { ESC_A = 1, ESC_G, ESC_K, ESC_B, ESC_b, ESC_D, ESC_d, ESC_S, ESC_s,
-       ESC_W, ESC_w, ESC_N, ESC_dum, ESC_C, ESC_P, ESC_p, ESC_R, ESC_H,
-       ESC_h, ESC_V, ESC_v, ESC_X, ESC_Z, ESC_z,
-       ESC_E, ESC_Q, ESC_g, ESC_k,
-       ESC_DU, ESC_du, ESC_SU, ESC_su, ESC_WU, ESC_wu };
-
-
-/********************** Opcode definitions ******************/
-
-/****** NOTE NOTE NOTE ******
-
-Starting from 1 (i.e. after OP_END), the values up to OP_EOD must correspond in
-order to the list of escapes immediately above. Furthermore, values up to
-OP_DOLLM must not be changed without adjusting the table called autoposstab in
-pcre_compile.c
-
-Whenever this list is updated, the two macro definitions that follow must be
-updated to match. The possessification table called "opcode_possessify" in
-pcre_compile.c must also be updated, and also the tables called "coptable"
-and "poptable" in pcre_dfa_exec.c.
-
-****** NOTE NOTE NOTE ******/
-
-
-/* The values between FIRST_AUTOTAB_OP and LAST_AUTOTAB_RIGHT_OP, inclusive,
-are used in a table for deciding whether a repeated character type can be
-auto-possessified. */
-
-#define FIRST_AUTOTAB_OP       OP_NOT_DIGIT
-#define LAST_AUTOTAB_LEFT_OP   OP_EXTUNI
-#define LAST_AUTOTAB_RIGHT_OP  OP_DOLLM
-
-enum {
-  OP_END,            /* 0 End of pattern */
-
-  /* Values corresponding to backslashed metacharacters */
-
-  OP_SOD,            /* 1 Start of data: \A */
-  OP_SOM,            /* 2 Start of match (subject + offset): \G */
-  OP_SET_SOM,        /* 3 Set start of match (\K) */
-  OP_NOT_WORD_BOUNDARY,  /*  4 \B */
-  OP_WORD_BOUNDARY,      /*  5 \b */
-  OP_NOT_DIGIT,          /*  6 \D */
-  OP_DIGIT,              /*  7 \d */
-  OP_NOT_WHITESPACE,     /*  8 \S */
-  OP_WHITESPACE,         /*  9 \s */
-  OP_NOT_WORDCHAR,       /* 10 \W */
-  OP_WORDCHAR,           /* 11 \w */
-
-  OP_ANY,            /* 12 Match any character except newline (\N) */
-  OP_ALLANY,         /* 13 Match any character */
-  OP_ANYBYTE,        /* 14 Match any byte (\C); different to OP_ANY for UTF-8 */
-  OP_NOTPROP,        /* 15 \P (not Unicode property) */
-  OP_PROP,           /* 16 \p (Unicode property) */
-  OP_ANYNL,          /* 17 \R (any newline sequence) */
-  OP_NOT_HSPACE,     /* 18 \H (not horizontal whitespace) */
-  OP_HSPACE,         /* 19 \h (horizontal whitespace) */
-  OP_NOT_VSPACE,     /* 20 \V (not vertical whitespace) */
-  OP_VSPACE,         /* 21 \v (vertical whitespace) */
-  OP_EXTUNI,         /* 22 \X (extended Unicode sequence */
-  OP_EODN,           /* 23 End of data or \n at end of data (\Z) */
-  OP_EOD,            /* 24 End of data (\z) */
-
-  /* Line end assertions */
-
-  OP_DOLL,           /* 25 End of line - not multiline */
-  OP_DOLLM,          /* 26 End of line - multiline */
-  OP_CIRC,           /* 27 Start of line - not multiline */
-  OP_CIRCM,          /* 28 Start of line - multiline */
-
-  /* Single characters; caseful must precede the caseless ones */
-
-  OP_CHAR,           /* 29 Match one character, casefully */
-  OP_CHARI,          /* 30 Match one character, caselessly */
-  OP_NOT,            /* 31 Match one character, not the given one, casefully */
-  OP_NOTI,           /* 32 Match one character, not the given one, caselessly */
-
-  /* The following sets of 13 opcodes must always be kept in step because
-  the offset from the first one is used to generate the others. */
-
-  /* Repeated characters; caseful must precede the caseless ones */
-
-  OP_STAR,           /* 33 The maximizing and minimizing versions of */
-  OP_MINSTAR,        /* 34 these six opcodes must come in pairs, with */
-  OP_PLUS,           /* 35 the minimizing one second. */
-  OP_MINPLUS,        /* 36 */
-  OP_QUERY,          /* 37 */
-  OP_MINQUERY,       /* 38 */
-
-  OP_UPTO,           /* 39 From 0 to n matches of one character, caseful*/
-  OP_MINUPTO,        /* 40 */
-  OP_EXACT,          /* 41 Exactly n matches */
-
-  OP_POSSTAR,        /* 42 Possessified star, caseful */
-  OP_POSPLUS,        /* 43 Possessified plus, caseful */
-  OP_POSQUERY,       /* 44 Posesssified query, caseful */
-  OP_POSUPTO,        /* 45 Possessified upto, caseful */
-
-  /* Repeated characters; caseless must follow the caseful ones */
-
-  OP_STARI,          /* 46 */
-  OP_MINSTARI,       /* 47 */
-  OP_PLUSI,          /* 48 */
-  OP_MINPLUSI,       /* 49 */
-  OP_QUERYI,         /* 50 */
-  OP_MINQUERYI,      /* 51 */
-
-  OP_UPTOI,          /* 52 From 0 to n matches of one character, caseless */
-  OP_MINUPTOI,       /* 53 */
-  OP_EXACTI,         /* 54 */
-
-  OP_POSSTARI,       /* 55 Possessified star, caseless */
-  OP_POSPLUSI,       /* 56 Possessified plus, caseless */
-  OP_POSQUERYI,      /* 57 Posesssified query, caseless */
-  OP_POSUPTOI,       /* 58 Possessified upto, caseless */
-
-  /* The negated ones must follow the non-negated ones, and match them */
-  /* Negated repeated character, caseful; must precede the caseless ones */
-
-  OP_NOTSTAR,        /* 59 The maximizing and minimizing versions of */
-  OP_NOTMINSTAR,     /* 60 these six opcodes must come in pairs, with */
-  OP_NOTPLUS,        /* 61 the minimizing one second. They must be in */
-  OP_NOTMINPLUS,     /* 62 exactly the same order as those above. */
-  OP_NOTQUERY,       /* 63 */
-  OP_NOTMINQUERY,    /* 64 */
-
-  OP_NOTUPTO,        /* 65 From 0 to n matches, caseful */
-  OP_NOTMINUPTO,     /* 66 */
-  OP_NOTEXACT,       /* 67 Exactly n matches */
-
-  OP_NOTPOSSTAR,     /* 68 Possessified versions, caseful */
-  OP_NOTPOSPLUS,     /* 69 */
-  OP_NOTPOSQUERY,    /* 70 */
-  OP_NOTPOSUPTO,     /* 71 */
-
-  /* Negated repeated character, caseless; must follow the caseful ones */
-
-  OP_NOTSTARI,       /* 72 */
-  OP_NOTMINSTARI,    /* 73 */
-  OP_NOTPLUSI,       /* 74 */
-  OP_NOTMINPLUSI,    /* 75 */
-  OP_NOTQUERYI,      /* 76 */
-  OP_NOTMINQUERYI,   /* 77 */
-
-  OP_NOTUPTOI,       /* 78 From 0 to n matches, caseless */
-  OP_NOTMINUPTOI,    /* 79 */
-  OP_NOTEXACTI,      /* 80 Exactly n matches */
-
-  OP_NOTPOSSTARI,    /* 81 Possessified versions, caseless */
-  OP_NOTPOSPLUSI,    /* 82 */
-  OP_NOTPOSQUERYI,   /* 83 */
-  OP_NOTPOSUPTOI,    /* 84 */
-
-  /* Character types */
-
-  OP_TYPESTAR,       /* 85 The maximizing and minimizing versions of */
-  OP_TYPEMINSTAR,    /* 86 these six opcodes must come in pairs, with */
-  OP_TYPEPLUS,       /* 87 the minimizing one second. These codes must */
-  OP_TYPEMINPLUS,    /* 88 be in exactly the same order as those above. */
-  OP_TYPEQUERY,      /* 89 */
-  OP_TYPEMINQUERY,   /* 90 */
-
-  OP_TYPEUPTO,       /* 91 From 0 to n matches */
-  OP_TYPEMINUPTO,    /* 92 */
-  OP_TYPEEXACT,      /* 93 Exactly n matches */
-
-  OP_TYPEPOSSTAR,    /* 94 Possessified versions */
-  OP_TYPEPOSPLUS,    /* 95 */
-  OP_TYPEPOSQUERY,   /* 96 */
-  OP_TYPEPOSUPTO,    /* 97 */
-
-  /* These are used for character classes and back references; only the
-  first six are the same as the sets above. */
-
-  OP_CRSTAR,         /* 98 The maximizing and minimizing versions of */
-  OP_CRMINSTAR,      /* 99 all these opcodes must come in pairs, with */
-  OP_CRPLUS,         /* 100 the minimizing one second. These codes must */
-  OP_CRMINPLUS,      /* 101 be in exactly the same order as those above. */
-  OP_CRQUERY,        /* 102 */
-  OP_CRMINQUERY,     /* 103 */
-
-  OP_CRRANGE,        /* 104 These are different to the three sets above. */
-  OP_CRMINRANGE,     /* 105 */
-
-  OP_CRPOSSTAR,      /* 106 Possessified versions */
-  OP_CRPOSPLUS,      /* 107 */
-  OP_CRPOSQUERY,     /* 108 */
-  OP_CRPOSRANGE,     /* 109 */
-
-  /* End of quantifier opcodes */
-
-  OP_CLASS,          /* 110 Match a character class, chars < 256 only */
-  OP_NCLASS,         /* 111 Same, but the bitmap was created from a negative
-                              class - the difference is relevant only when a
-                              character > 255 is encountered. */
-  OP_XCLASS,         /* 112 Extended class for handling > 255 chars within the
-                              class. This does both positive and negative. */
-  OP_REF,            /* 113 Match a back reference, casefully */
-  OP_REFI,           /* 114 Match a back reference, caselessly */
-  OP_DNREF,          /* 115 Match a duplicate name backref, casefully */
-  OP_DNREFI,         /* 116 Match a duplicate name backref, caselessly */
-  OP_RECURSE,        /* 117 Match a numbered subpattern (possibly recursive) */
-  OP_CALLOUT,        /* 118 Call out to external function if provided */
-
-  OP_ALT,            /* 119 Start of alternation */
-  OP_KET,            /* 120 End of group that doesn't have an unbounded repeat */
-  OP_KETRMAX,        /* 121 These two must remain together and in this */
-  OP_KETRMIN,        /* 122 order. They are for groups the repeat for ever. */
-  OP_KETRPOS,        /* 123 Possessive unlimited repeat. */
-
-  /* The assertions must come before BRA, CBRA, ONCE, and COND, and the four
-  asserts must remain in order. */
-
-  OP_REVERSE,        /* 124 Move pointer back - used in lookbehind assertions */
-  OP_ASSERT,         /* 125 Positive lookahead */
-  OP_ASSERT_NOT,     /* 126 Negative lookahead */
-  OP_ASSERTBACK,     /* 127 Positive lookbehind */
-  OP_ASSERTBACK_NOT, /* 128 Negative lookbehind */
-
-  /* ONCE, ONCE_NC, BRA, BRAPOS, CBRA, CBRAPOS, and COND must come immediately
-  after the assertions, with ONCE first, as there's a test for >= ONCE for a
-  subpattern that isn't an assertion. The POS versions must immediately follow
-  the non-POS versions in each case. */
-
-  OP_ONCE,           /* 129 Atomic group, contains captures */
-  OP_ONCE_NC,        /* 130 Atomic group containing no captures */
-  OP_BRA,            /* 131 Start of non-capturing bracket */
-  OP_BRAPOS,         /* 132 Ditto, with unlimited, possessive repeat */
-  OP_CBRA,           /* 133 Start of capturing bracket */
-  OP_CBRAPOS,        /* 134 Ditto, with unlimited, possessive repeat */
-  OP_COND,           /* 135 Conditional group */
-
-  /* These five must follow the previous five, in the same order. There's a
-  check for >= SBRA to distinguish the two sets. */
-
-  OP_SBRA,           /* 136 Start of non-capturing bracket, check empty  */
-  OP_SBRAPOS,        /* 137 Ditto, with unlimited, possessive repeat */
-  OP_SCBRA,          /* 138 Start of capturing bracket, check empty */
-  OP_SCBRAPOS,       /* 139 Ditto, with unlimited, possessive repeat */
-  OP_SCOND,          /* 140 Conditional group, check empty */
-
-  /* The next two pairs must (respectively) be kept together. */
-
-  OP_CREF,           /* 141 Used to hold a capture number as condition */
-  OP_DNCREF,         /* 142 Used to point to duplicate names as a condition */
-  OP_RREF,           /* 143 Used to hold a recursion number as condition */
-  OP_DNRREF,         /* 144 Used to point to duplicate names as a condition */
-  OP_DEF,            /* 145 The DEFINE condition */
-
-  OP_BRAZERO,        /* 146 These two must remain together and in this */
-  OP_BRAMINZERO,     /* 147 order. */
-  OP_BRAPOSZERO,     /* 148 */
-
-  /* These are backtracking control verbs */
-
-  OP_MARK,           /* 149 always has an argument */
-  OP_PRUNE,          /* 150 */
-  OP_PRUNE_ARG,      /* 151 same, but with argument */
-  OP_SKIP,           /* 152 */
-  OP_SKIP_ARG,       /* 153 same, but with argument */
-  OP_THEN,           /* 154 */
-  OP_THEN_ARG,       /* 155 same, but with argument */
-  OP_COMMIT,         /* 156 */
-
-  /* These are forced failure and success verbs */
-
-  OP_FAIL,           /* 157 */
-  OP_ACCEPT,         /* 158 */
-  OP_ASSERT_ACCEPT,  /* 159 Used inside assertions */
-  OP_CLOSE,          /* 160 Used before OP_ACCEPT to close open captures */
-
-  /* This is used to skip a subpattern with a {0} quantifier */
-
-  OP_SKIPZERO,       /* 161 */
-
-  /* This is not an opcode, but is used to check that tables indexed by opcode
-  are the correct length, in order to catch updating errors - there have been
-  some in the past. */
-
-  OP_TABLE_LENGTH
-};
-
-/* *** NOTE NOTE NOTE *** Whenever the list above is updated, the two macro
-definitions that follow must also be updated to match. There are also tables
-called "opcode_possessify" in pcre_compile.c and "coptable" and "poptable" in
-pcre_dfa_exec.c that must be updated. */
-
-
-/* This macro defines textual names for all the opcodes. These are used only
-for debugging, and some of them are only partial names. The macro is referenced
-only in pcre_printint.c, which fills out the full names in many cases (and in
-some cases doesn't actually use these names at all). */
-
-#define OP_NAME_LIST \
-  "End", "\\A", "\\G", "\\K", "\\B", "\\b", "\\D", "\\d",         \
-  "\\S", "\\s", "\\W", "\\w", "Any", "AllAny", "Anybyte",         \
-  "notprop", "prop", "\\R", "\\H", "\\h", "\\V", "\\v",           \
-  "extuni",  "\\Z", "\\z",                                        \
-  "$", "$", "^", "^", "char", "chari", "not", "noti",             \
-  "*", "*?", "+", "+?", "?", "??",                                \
-  "{", "{", "{",                                                  \
-  "*+","++", "?+", "{",                                           \
-  "*", "*?", "+", "+?", "?", "??",                                \
-  "{", "{", "{",                                                  \
-  "*+","++", "?+", "{",                                           \
-  "*", "*?", "+", "+?", "?", "??",                                \
-  "{", "{", "{",                                                  \
-  "*+","++", "?+", "{",                                           \
-  "*", "*?", "+", "+?", "?", "??",                                \
-  "{", "{", "{",                                                  \
-  "*+","++", "?+", "{",                                           \
-  "*", "*?", "+", "+?", "?", "??", "{", "{", "{",                 \
-  "*+","++", "?+", "{",                                           \
-  "*", "*?", "+", "+?", "?", "??", "{", "{",                      \
-  "*+","++", "?+", "{",                                           \
-  "class", "nclass", "xclass", "Ref", "Refi", "DnRef", "DnRefi",  \
-  "Recurse", "Callout",                                           \
-  "Alt", "Ket", "KetRmax", "KetRmin", "KetRpos",                  \
-  "Reverse", "Assert", "Assert not", "AssertB", "AssertB not",    \
-  "Once", "Once_NC",                                              \
-  "Bra", "BraPos", "CBra", "CBraPos",                             \
-  "Cond",                                                         \
-  "SBra", "SBraPos", "SCBra", "SCBraPos",                         \
-  "SCond",                                                        \
-  "Cond ref", "Cond dnref", "Cond rec", "Cond dnrec", "Cond def", \
-  "Brazero", "Braminzero", "Braposzero",                          \
-  "*MARK", "*PRUNE", "*PRUNE", "*SKIP", "*SKIP",                  \
-  "*THEN", "*THEN", "*COMMIT", "*FAIL",                           \
-  "*ACCEPT", "*ASSERT_ACCEPT",                                    \
-  "Close", "Skip zero"
-
-
-/* This macro defines the length of fixed length operations in the compiled
-regex. The lengths are used when searching for specific things, and also in the
-debugging printing of a compiled regex. We use a macro so that it can be
-defined close to the definitions of the opcodes themselves.
-
-As things have been extended, some of these are no longer fixed lenths, but are
-minima instead. For example, the length of a single-character repeat may vary
-in UTF-8 mode. The code that uses this table must know about such things. */
-
-#define OP_LENGTHS \
-  1,                             /* End                                    */ \
-  1, 1, 1, 1, 1,                 /* \A, \G, \K, \B, \b                     */ \
-  1, 1, 1, 1, 1, 1,              /* \D, \d, \S, \s, \W, \w                 */ \
-  1, 1, 1,                       /* Any, AllAny, Anybyte                   */ \
-  3, 3,                          /* \P, \p                                 */ \
-  1, 1, 1, 1, 1,                 /* \R, \H, \h, \V, \v                     */ \
-  1,                             /* \X                                     */ \
-  1, 1, 1, 1, 1, 1,              /* \Z, \z, $, $M ^, ^M                    */ \
-  2,                             /* Char  - the minimum length             */ \
-  2,                             /* Chari  - the minimum length            */ \
-  2,                             /* not                                    */ \
-  2,                             /* noti                                   */ \
-  /* Positive single-char repeats                             ** These are */ \
-  2, 2, 2, 2, 2, 2,              /* *, *?, +, +?, ?, ??       ** minima in */ \
-  2+IMM2_SIZE, 2+IMM2_SIZE,      /* upto, minupto             ** mode      */ \
-  2+IMM2_SIZE,                   /* exact                                  */ \
-  2, 2, 2, 2+IMM2_SIZE,          /* *+, ++, ?+, upto+                      */ \
-  2, 2, 2, 2, 2, 2,              /* *I, *?I, +I, +?I, ?I, ??I ** UTF-8     */ \
-  2+IMM2_SIZE, 2+IMM2_SIZE,      /* upto I, minupto I                      */ \
-  2+IMM2_SIZE,                   /* exact I                                */ \
-  2, 2, 2, 2+IMM2_SIZE,          /* *+I, ++I, ?+I, upto+I                  */ \
-  /* Negative single-char repeats - only for chars < 256                   */ \
-  2, 2, 2, 2, 2, 2,              /* NOT *, *?, +, +?, ?, ??                */ \
-  2+IMM2_SIZE, 2+IMM2_SIZE,      /* NOT upto, minupto                      */ \
-  2+IMM2_SIZE,                   /* NOT exact                              */ \
-  2, 2, 2, 2+IMM2_SIZE,          /* Possessive NOT *, +, ?, upto           */ \
-  2, 2, 2, 2, 2, 2,              /* NOT *I, *?I, +I, +?I, ?I, ??I          */ \
-  2+IMM2_SIZE, 2+IMM2_SIZE,      /* NOT upto I, minupto I                  */ \
-  2+IMM2_SIZE,                   /* NOT exact I                            */ \
-  2, 2, 2, 2+IMM2_SIZE,          /* Possessive NOT *I, +I, ?I, upto I      */ \
-  /* Positive type repeats                                                 */ \
-  2, 2, 2, 2, 2, 2,              /* Type *, *?, +, +?, ?, ??               */ \
-  2+IMM2_SIZE, 2+IMM2_SIZE,      /* Type upto, minupto                     */ \
-  2+IMM2_SIZE,                   /* Type exact                             */ \
-  2, 2, 2, 2+IMM2_SIZE,          /* Possessive *+, ++, ?+, upto+           */ \
-  /* Character class & ref repeats                                         */ \
-  1, 1, 1, 1, 1, 1,              /* *, *?, +, +?, ?, ??                    */ \
-  1+2*IMM2_SIZE, 1+2*IMM2_SIZE,  /* CRRANGE, CRMINRANGE                    */ \
-  1, 1, 1, 1+2*IMM2_SIZE,        /* Possessive *+, ++, ?+, CRPOSRANGE      */ \
-  1+(32/sizeof(pcre_uchar)),     /* CLASS                                  */ \
-  1+(32/sizeof(pcre_uchar)),     /* NCLASS                                 */ \
-  0,                             /* XCLASS - variable length               */ \
-  1+IMM2_SIZE,                   /* REF                                    */ \
-  1+IMM2_SIZE,                   /* REFI                                   */ \
-  1+2*IMM2_SIZE,                 /* DNREF                                  */ \
-  1+2*IMM2_SIZE,                 /* DNREFI                                 */ \
-  1+LINK_SIZE,                   /* RECURSE                                */ \
-  2+2*LINK_SIZE,                 /* CALLOUT                                */ \
-  1+LINK_SIZE,                   /* Alt                                    */ \
-  1+LINK_SIZE,                   /* Ket                                    */ \
-  1+LINK_SIZE,                   /* KetRmax                                */ \
-  1+LINK_SIZE,                   /* KetRmin                                */ \
-  1+LINK_SIZE,                   /* KetRpos                                */ \
-  1+LINK_SIZE,                   /* Reverse                                */ \
-  1+LINK_SIZE,                   /* Assert                                 */ \
-  1+LINK_SIZE,                   /* Assert not                             */ \
-  1+LINK_SIZE,                   /* Assert behind                          */ \
-  1+LINK_SIZE,                   /* Assert behind not                      */ \
-  1+LINK_SIZE,                   /* ONCE                                   */ \
-  1+LINK_SIZE,                   /* ONCE_NC                                */ \
-  1+LINK_SIZE,                   /* BRA                                    */ \
-  1+LINK_SIZE,                   /* BRAPOS                                 */ \
-  1+LINK_SIZE+IMM2_SIZE,         /* CBRA                                   */ \
-  1+LINK_SIZE+IMM2_SIZE,         /* CBRAPOS                                */ \
-  1+LINK_SIZE,                   /* COND                                   */ \
-  1+LINK_SIZE,                   /* SBRA                                   */ \
-  1+LINK_SIZE,                   /* SBRAPOS                                */ \
-  1+LINK_SIZE+IMM2_SIZE,         /* SCBRA                                  */ \
-  1+LINK_SIZE+IMM2_SIZE,         /* SCBRAPOS                               */ \
-  1+LINK_SIZE,                   /* SCOND                                  */ \
-  1+IMM2_SIZE, 1+2*IMM2_SIZE,    /* CREF, DNCREF                           */ \
-  1+IMM2_SIZE, 1+2*IMM2_SIZE,    /* RREF, DNRREF                           */ \
-  1,                             /* DEF                                    */ \
-  1, 1, 1,                       /* BRAZERO, BRAMINZERO, BRAPOSZERO        */ \
-  3, 1, 3,                       /* MARK, PRUNE, PRUNE_ARG                 */ \
-  1, 3,                          /* SKIP, SKIP_ARG                         */ \
-  1, 3,                          /* THEN, THEN_ARG                         */ \
-  1, 1, 1, 1,                    /* COMMIT, FAIL, ACCEPT, ASSERT_ACCEPT    */ \
-  1+IMM2_SIZE, 1                 /* CLOSE, SKIPZERO                        */
-
-/* A magic value for OP_RREF to indicate the "any recursion" condition. */
-
-#define RREF_ANY  0xffff
-
-/* Compile time error code numbers. They are given names so that they can more
-easily be tracked. When a new number is added, the table called eint in
-pcreposix.c must be updated. */
-
-enum { ERR0,  ERR1,  ERR2,  ERR3,  ERR4,  ERR5,  ERR6,  ERR7,  ERR8,  ERR9,
-       ERR10, ERR11, ERR12, ERR13, ERR14, ERR15, ERR16, ERR17, ERR18, ERR19,
-       ERR20, ERR21, ERR22, ERR23, ERR24, ERR25, ERR26, ERR27, ERR28, ERR29,
-       ERR30, ERR31, ERR32, ERR33, ERR34, ERR35, ERR36, ERR37, ERR38, ERR39,
-       ERR40, ERR41, ERR42, ERR43, ERR44, ERR45, ERR46, ERR47, ERR48, ERR49,
-       ERR50, ERR51, ERR52, ERR53, ERR54, ERR55, ERR56, ERR57, ERR58, ERR59,
-       ERR60, ERR61, ERR62, ERR63, ERR64, ERR65, ERR66, ERR67, ERR68, ERR69,
-       ERR70, ERR71, ERR72, ERR73, ERR74, ERR75, ERR76, ERR77, ERR78, ERR79,
-       ERR80, ERR81, ERR82, ERR83, ERR84, ERR85, ERRCOUNT };
-
-/* JIT compiling modes. The function list is indexed by them. */
-
-enum { JIT_COMPILE, JIT_PARTIAL_SOFT_COMPILE, JIT_PARTIAL_HARD_COMPILE,
-       JIT_NUMBER_OF_COMPILE_MODES };
-
-/* The real format of the start of the pcre block; the index of names and the
-code vector run on as long as necessary after the end. We store an explicit
-offset to the name table so that if a regex is compiled on one host, saved, and
-then run on another where the size of pointers is different, all might still
-be well.
-
-The size of the structure must be a multiple of 8 bytes. For the case of
-compiled-on-4 and run-on-8, we include an extra pointer that is always NULL so
-that there are an even number of pointers which therefore are a multiple of 8
-bytes.
-
-It is necessary to fork the struct for the 32 bit library, since it needs to
-use pcre_uint32 for first_char and req_char. We can't put an ifdef inside the
-typedef because pcretest needs access to the struct of the 8-, 16- and 32-bit
-variants.
-
-*** WARNING ***
-When new fields are added to these structures, remember to adjust the code in
-pcre_byte_order.c that is concerned with swapping the byte order of the fields
-when a compiled regex is reloaded on a host with different endianness.
-*** WARNING ***
-There is also similar byte-flipping code in pcretest.c, which is used for
-testing the byte-flipping features. It must also be kept in step.
-*** WARNING ***
-*/
-
-typedef struct real_pcre8_or_16 {
-  pcre_uint32 magic_number;
-  pcre_uint32 size;               /* Total that was malloced */
-  pcre_uint32 options;            /* Public options */
-  pcre_uint32 flags;              /* Private flags */
-  pcre_uint32 limit_match;        /* Limit set from regex */
-  pcre_uint32 limit_recursion;    /* Limit set from regex */
-  pcre_uint16 first_char;         /* Starting character */
-  pcre_uint16 req_char;           /* This character must be seen */
-  pcre_uint16 max_lookbehind;     /* Longest lookbehind (characters) */
-  pcre_uint16 top_bracket;        /* Highest numbered group */
-  pcre_uint16 top_backref;        /* Highest numbered back reference */
-  pcre_uint16 name_table_offset;  /* Offset to name table that follows */
-  pcre_uint16 name_entry_size;    /* Size of any name items */
-  pcre_uint16 name_count;         /* Number of name items */
-  pcre_uint16 ref_count;          /* Reference count */
-  pcre_uint16 dummy1;             /* To ensure size is a multiple of 8 */
-  pcre_uint16 dummy2;             /* To ensure size is a multiple of 8 */
-  pcre_uint16 dummy3;             /* To ensure size is a multiple of 8 */
-  const pcre_uint8 *tables;       /* Pointer to tables or NULL for std */
-  void             *nullpad;      /* NULL padding */
-} real_pcre8_or_16;
-
-typedef struct real_pcre8_or_16 real_pcre;
-typedef struct real_pcre8_or_16 real_pcre16;
-
-typedef struct real_pcre32 {
-  pcre_uint32 magic_number;
-  pcre_uint32 size;               /* Total that was malloced */
-  pcre_uint32 options;            /* Public options */
-  pcre_uint32 flags;              /* Private flags */
-  pcre_uint32 limit_match;        /* Limit set from regex */
-  pcre_uint32 limit_recursion;    /* Limit set from regex */
-  pcre_uint32 first_char;         /* Starting character */
-  pcre_uint32 req_char;           /* This character must be seen */
-  pcre_uint16 max_lookbehind;     /* Longest lookbehind (characters) */
-  pcre_uint16 top_bracket;        /* Highest numbered group */
-  pcre_uint16 top_backref;        /* Highest numbered back reference */
-  pcre_uint16 name_table_offset;  /* Offset to name table that follows */
-  pcre_uint16 name_entry_size;    /* Size of any name items */
-  pcre_uint16 name_count;         /* Number of name items */
-  pcre_uint16 ref_count;          /* Reference count */
-  pcre_uint16 dummy;              /* To ensure size is a multiple of 8 */
-  const pcre_uint8 *tables;       /* Pointer to tables or NULL for std */
-  void             *nullpad;      /* NULL padding */
-} real_pcre32;
-
-#if defined COMPILE_PCRE8
-#define REAL_PCRE real_pcre
-#elif defined COMPILE_PCRE16
-#define REAL_PCRE real_pcre16
-#elif defined COMPILE_PCRE32
-#define REAL_PCRE real_pcre32
-#endif
-
-/* Assert that the size of REAL_PCRE is divisible by 8 */
-typedef int __assert_real_pcre_size_divisible_8[(sizeof(REAL_PCRE) % 8) == 0 ? 1 : -1];
-
-/* Needed in pcretest to access some fields in the real_pcre* structures
- * directly. They're unified for 8/16/32 bits since the structs only differ
- * after these fields; if that ever changes, need to fork those defines into
- * 8/16 and 32 bit versions. */
-#define REAL_PCRE_MAGIC(re)     (((REAL_PCRE*)re)->magic_number)
-#define REAL_PCRE_SIZE(re)      (((REAL_PCRE*)re)->size)
-#define REAL_PCRE_OPTIONS(re)   (((REAL_PCRE*)re)->options)
-#define REAL_PCRE_FLAGS(re)     (((REAL_PCRE*)re)->flags)
-
-/* The format of the block used to store data from pcre_study(). The same
-remark (see NOTE above) about extending this structure applies. */
-
-typedef struct pcre_study_data {
-  pcre_uint32 size;               /* Total that was malloced */
-  pcre_uint32 flags;              /* Private flags */
-  pcre_uint8 start_bits[32];      /* Starting char bits */
-  pcre_uint32 minlength;          /* Minimum subject length */
-} pcre_study_data;
-
-/* Structure for building a chain of open capturing subpatterns during
-compiling, so that instructions to close them can be compiled when (*ACCEPT) is
-encountered. This is also used to identify subpatterns that contain recursive
-back references to themselves, so that they can be made atomic. */
-
-typedef struct open_capitem {
-  struct open_capitem *next;    /* Chain link */
-  pcre_uint16 number;           /* Capture number */
-  pcre_uint16 flag;             /* Set TRUE if recursive back ref */
-} open_capitem;
-
-/* Structure for building a list of named groups during the first pass of
-compiling. */
-
-typedef struct named_group {
-  const pcre_uchar  *name;          /* Points to the name in the pattern */
-  int                length;        /* Length of the name */
-  pcre_uint32        number;        /* Group number */
-} named_group;
-
-/* Structure for passing "static" information around between the functions
-doing the compiling, so that they are thread-safe. */
-
-typedef struct compile_data {
-  const pcre_uint8 *lcc;            /* Points to lower casing table */
-  const pcre_uint8 *fcc;            /* Points to case-flipping table */
-  const pcre_uint8 *cbits;          /* Points to character type table */
-  const pcre_uint8 *ctypes;         /* Points to table of type maps */
-  const pcre_uchar *start_workspace;/* The start of working space */
-  const pcre_uchar *start_code;     /* The start of the compiled code */
-  const pcre_uchar *start_pattern;  /* The start of the pattern */
-  const pcre_uchar *end_pattern;    /* The end of the pattern */
-  pcre_uchar *hwm;                  /* High watermark of workspace */
-  open_capitem *open_caps;          /* Chain of open capture items */
-  named_group *named_groups;        /* Points to vector in pre-compile */
-  pcre_uchar *name_table;           /* The name/number table */
-  int  names_found;                 /* Number of entries so far */
-  int  name_entry_size;             /* Size of each entry */
-  int  named_group_list_size;       /* Number of entries in the list */
-  int  workspace_size;              /* Size of workspace */
-  unsigned int bracount;            /* Count of capturing parens as we compile */
-  int  final_bracount;              /* Saved value after first pass */
-  int  max_lookbehind;              /* Maximum lookbehind (characters) */
-  int  top_backref;                 /* Maximum back reference */
-  unsigned int backref_map;         /* Bitmap of low back refs */
-  unsigned int namedrefcount;       /* Number of backreferences by name */
-  int  parens_depth;                /* Depth of nested parentheses */
-  int  assert_depth;                /* Depth of nested assertions */
-  pcre_uint32 external_options;     /* External (initial) options */
-  pcre_uint32 external_flags;       /* External flag bits to be set */
-  int  req_varyopt;                 /* "After variable item" flag for reqbyte */
-  BOOL had_accept;                  /* (*ACCEPT) encountered */
-  BOOL had_pruneorskip;             /* (*PRUNE) or (*SKIP) encountered */
-  BOOL check_lookbehind;            /* Lookbehinds need later checking */
-  BOOL dupnames;                    /* Duplicate names exist */
-  int  nltype;                      /* Newline type */
-  int  nllen;                       /* Newline string length */
-  pcre_uchar nl[4];                 /* Newline string when fixed length */
-} compile_data;
-
-/* Structure for maintaining a chain of pointers to the currently incomplete
-branches, for testing for left recursion while compiling. */
-
-typedef struct branch_chain {
-  struct branch_chain *outer;
-  pcre_uchar *current_branch;
-} branch_chain;
-
-/* Structure for items in a linked list that represents an explicit recursive
-call within the pattern; used by pcre_exec(). */
-
-typedef struct recursion_info {
-  struct recursion_info *prevrec; /* Previous recursion record (or NULL) */
-  unsigned int group_num;         /* Number of group that was called */
-  int *offset_save;               /* Pointer to start of saved offsets */
-  int saved_max;                  /* Number of saved offsets */
-  int saved_capture_last;         /* Last capture number */
-  PCRE_PUCHAR subject_position;   /* Position at start of recursion */
-} recursion_info;
-
-/* A similar structure for pcre_dfa_exec(). */
-
-typedef struct dfa_recursion_info {
-  struct dfa_recursion_info *prevrec;
-  int group_num;
-  PCRE_PUCHAR subject_position;
-} dfa_recursion_info;
-
-/* Structure for building a chain of data for holding the values of the subject
-pointer at the start of each subpattern, so as to detect when an empty string
-has been matched by a subpattern - to break infinite loops; used by
-pcre_exec(). */
-
-typedef struct eptrblock {
-  struct eptrblock *epb_prev;
-  PCRE_PUCHAR epb_saved_eptr;
-} eptrblock;
-
-
-/* Structure for passing "static" information around between the functions
-doing traditional NFA matching, so that they are thread-safe. */
-
-typedef struct match_data {
-  unsigned long int match_call_count;      /* As it says */
-  unsigned long int match_limit;           /* As it says */
-  unsigned long int match_limit_recursion; /* As it says */
-  int   *offset_vector;           /* Offset vector */
-  int    offset_end;              /* One past the end */
-  int    offset_max;              /* The maximum usable for return data */
-  int    nltype;                  /* Newline type */
-  int    nllen;                   /* Newline string length */
-  int    name_count;              /* Number of names in name table */
-  int    name_entry_size;         /* Size of entry in names table */
-  unsigned int skip_arg_count;    /* For counting SKIP_ARGs */
-  unsigned int ignore_skip_arg;   /* For re-run when SKIP arg name not found */
-  pcre_uchar *name_table;         /* Table of names */
-  pcre_uchar nl[4];               /* Newline string when fixed */
-  const  pcre_uint8 *lcc;         /* Points to lower casing table */
-  const  pcre_uint8 *fcc;         /* Points to case-flipping table */
-  const  pcre_uint8 *ctypes;      /* Points to table of type maps */
-  BOOL   notbol;                  /* NOTBOL flag */
-  BOOL   noteol;                  /* NOTEOL flag */
-  BOOL   utf;                     /* UTF-8 / UTF-16 flag */
-  BOOL   jscript_compat;          /* JAVASCRIPT_COMPAT flag */
-  BOOL   use_ucp;                 /* PCRE_UCP flag */
-  BOOL   endonly;                 /* Dollar not before final \n */
-  BOOL   notempty;                /* Empty string match not wanted */
-  BOOL   notempty_atstart;        /* Empty string match at start not wanted */
-  BOOL   hitend;                  /* Hit the end of the subject at some point */
-  BOOL   bsr_anycrlf;             /* \R is just any CRLF, not full Unicode */
-  BOOL   hasthen;                 /* Pattern contains (*THEN) */
-  const  pcre_uchar *start_code;  /* For use when recursing */
-  PCRE_PUCHAR start_subject;      /* Start of the subject string */
-  PCRE_PUCHAR end_subject;        /* End of the subject string */
-  PCRE_PUCHAR start_match_ptr;    /* Start of matched string */
-  PCRE_PUCHAR end_match_ptr;      /* Subject position at end match */
-  PCRE_PUCHAR start_used_ptr;     /* Earliest consulted character */
-  int    partial;                 /* PARTIAL options */
-  int    end_offset_top;          /* Highwater mark at end of match */
-  pcre_int32 capture_last;        /* Most recent capture number + overflow flag */
-  int    start_offset;            /* The start offset value */
-  int    match_function_type;     /* Set for certain special calls of MATCH() */
-  eptrblock *eptrchain;           /* Chain of eptrblocks for tail recursions */
-  int    eptrn;                   /* Next free eptrblock */
-  recursion_info *recursive;      /* Linked list of recursion data */
-  void  *callout_data;            /* To pass back to callouts */
-  const  pcre_uchar *mark;        /* Mark pointer to pass back on success */
-  const  pcre_uchar *nomatch_mark;/* Mark pointer to pass back on failure */
-  const  pcre_uchar *once_target; /* Where to back up to for atomic groups */
-#ifdef NO_RECURSE
-  void  *match_frames_base;       /* For remembering malloc'd frames */
-#endif
-} match_data;
-
-/* A similar structure is used for the same purpose by the DFA matching
-functions. */
-
-typedef struct dfa_match_data {
-  const pcre_uchar *start_code;     /* Start of the compiled pattern */
-  const pcre_uchar *start_subject ; /* Start of the subject string */
-  const pcre_uchar *end_subject;    /* End of subject string */
-  const pcre_uchar *start_used_ptr; /* Earliest consulted character */
-  const pcre_uint8 *tables;         /* Character tables */
-  int   start_offset;               /* The start offset value */
-  int   moptions;                   /* Match options */
-  int   poptions;                   /* Pattern options */
-  int   nltype;                     /* Newline type */
-  int   nllen;                      /* Newline string length */
-  pcre_uchar nl[4];                 /* Newline string when fixed */
-  void *callout_data;               /* To pass back to callouts */
-  dfa_recursion_info *recursive;    /* Linked list of recursion data */
-} dfa_match_data;
-
-/* Bit definitions for entries in the pcre_ctypes table. */
-
-#define ctype_space   0x01
-#define ctype_letter  0x02
-#define ctype_digit   0x04
-#define ctype_xdigit  0x08
-#define ctype_word    0x10   /* alphanumeric or '_' */
-#define ctype_meta    0x80   /* regexp meta char or zero (end pattern) */
-
-/* Offsets for the bitmap tables in pcre_cbits. Each table contains a set
-of bits for a class map. Some classes are built by combining these tables. */
-
-#define cbit_space     0      /* [:space:] or \s */
-#define cbit_xdigit   32      /* [:xdigit:] */
-#define cbit_digit    64      /* [:digit:] or \d */
-#define cbit_upper    96      /* [:upper:] */
-#define cbit_lower   128      /* [:lower:] */
-#define cbit_word    160      /* [:word:] or \w */
-#define cbit_graph   192      /* [:graph:] */
-#define cbit_print   224      /* [:print:] */
-#define cbit_punct   256      /* [:punct:] */
-#define cbit_cntrl   288      /* [:cntrl:] */
-#define cbit_length  320      /* Length of the cbits table */
-
-/* Offsets of the various tables from the base tables pointer, and
-total length. */
-
-#define lcc_offset      0
-#define fcc_offset    256
-#define cbits_offset  512
-#define ctypes_offset (cbits_offset + cbit_length)
-#define tables_length (ctypes_offset + 256)
-
-/* Internal function and data prefixes. */
-
-#if defined COMPILE_PCRE8
-#ifndef PUBL
-#define PUBL(name) pcre_##name
-#endif
-#ifndef PRIV
-#define PRIV(name) _pcre_##name
-#endif
-#elif defined COMPILE_PCRE16
-#ifndef PUBL
-#define PUBL(name) pcre16_##name
-#endif
-#ifndef PRIV
-#define PRIV(name) _pcre16_##name
-#endif
-#elif defined COMPILE_PCRE32
-#ifndef PUBL
-#define PUBL(name) pcre32_##name
-#endif
-#ifndef PRIV
-#define PRIV(name) _pcre32_##name
-#endif
-#else
-#error Unsupported compiling mode
-#endif /* COMPILE_PCRE[8|16|32] */
-
-/* Layout of the UCP type table that translates property names into types and
-codes. Each entry used to point directly to a name, but to reduce the number of
-relocations in shared libraries, it now has an offset into a single string
-instead. */
-
-typedef struct {
-  pcre_uint16 name_offset;
-  pcre_uint16 type;
-  pcre_uint16 value;
-} ucp_type_table;
-
-
-/* Internal shared data tables. These are tables that are used by more than one
-of the exported public functions. They have to be "external" in the C sense,
-but are not part of the PCRE public API. The data for these tables is in the
-pcre_tables.c module. */
-
-#ifdef COMPILE_PCRE8
-extern const int            PRIV(utf8_table1)[];
-extern const int            PRIV(utf8_table1_size);
-extern const int            PRIV(utf8_table2)[];
-extern const int            PRIV(utf8_table3)[];
-extern const pcre_uint8     PRIV(utf8_table4)[];
-#endif /* COMPILE_PCRE8 */
-
-extern const char           PRIV(utt_names)[];
-extern const ucp_type_table PRIV(utt)[];
-extern const int            PRIV(utt_size);
-
-extern const pcre_uint8     PRIV(OP_lengths)[];
-extern const pcre_uint8     PRIV(default_tables)[];
-
-extern const pcre_uint32    PRIV(hspace_list)[];
-extern const pcre_uint32    PRIV(vspace_list)[];
-
-
-/* Internal shared functions. These are functions that are used by more than
-one of the exported public functions. They have to be "external" in the C
-sense, but are not part of the PCRE public API. */
-
-/* String comparison functions. */
-#if defined COMPILE_PCRE8
-
-#define STRCMP_UC_UC(str1, str2) \
-  strcmp((char *)(str1), (char *)(str2))
-#define STRCMP_UC_C8(str1, str2) \
-  strcmp((char *)(str1), (str2))
-#define STRNCMP_UC_UC(str1, str2, num) \
-  strncmp((char *)(str1), (char *)(str2), (num))
-#define STRNCMP_UC_C8(str1, str2, num) \
-  strncmp((char *)(str1), (str2), (num))
-#define STRLEN_UC(str) strlen((const char *)str)
-
-#elif defined COMPILE_PCRE16 || defined COMPILE_PCRE32
-
-extern int               PRIV(strcmp_uc_uc)(const pcre_uchar *,
-                           const pcre_uchar *);
-extern int               PRIV(strcmp_uc_c8)(const pcre_uchar *,
-                           const char *);
-extern int               PRIV(strncmp_uc_uc)(const pcre_uchar *,
-                           const pcre_uchar *, unsigned int num);
-extern int               PRIV(strncmp_uc_c8)(const pcre_uchar *,
-                           const char *, unsigned int num);
-extern unsigned int      PRIV(strlen_uc)(const pcre_uchar *str);
-
-#define STRCMP_UC_UC(str1, str2) \
-  PRIV(strcmp_uc_uc)((str1), (str2))
-#define STRCMP_UC_C8(str1, str2) \
-  PRIV(strcmp_uc_c8)((str1), (str2))
-#define STRNCMP_UC_UC(str1, str2, num) \
-  PRIV(strncmp_uc_uc)((str1), (str2), (num))
-#define STRNCMP_UC_C8(str1, str2, num) \
-  PRIV(strncmp_uc_c8)((str1), (str2), (num))
-#define STRLEN_UC(str) PRIV(strlen_uc)(str)
-
-#endif /* COMPILE_PCRE[8|16|32] */
-
-#if defined COMPILE_PCRE8 || defined COMPILE_PCRE16
-
-#define STRCMP_UC_UC_TEST(str1, str2) STRCMP_UC_UC(str1, str2)
-#define STRCMP_UC_C8_TEST(str1, str2) STRCMP_UC_C8(str1, str2)
-
-#elif defined COMPILE_PCRE32
-
-extern int               PRIV(strcmp_uc_uc_utf)(const pcre_uchar *,
-                           const pcre_uchar *);
-extern int               PRIV(strcmp_uc_c8_utf)(const pcre_uchar *,
-                           const char *);
-
-#define STRCMP_UC_UC_TEST(str1, str2) \
-  (utf ? PRIV(strcmp_uc_uc_utf)((str1), (str2)) : PRIV(strcmp_uc_uc)((str1), (str2)))
-#define STRCMP_UC_C8_TEST(str1, str2) \
-  (utf ? PRIV(strcmp_uc_c8_utf)((str1), (str2)) : PRIV(strcmp_uc_c8)((str1), (str2)))
-
-#endif /* COMPILE_PCRE[8|16|32] */
-
-extern const pcre_uchar *PRIV(find_bracket)(const pcre_uchar *, BOOL, int);
-extern BOOL              PRIV(is_newline)(PCRE_PUCHAR, int, PCRE_PUCHAR,
-                           int *, BOOL);
-extern unsigned int      PRIV(ord2utf)(pcre_uint32, pcre_uchar *);
-extern int               PRIV(valid_utf)(PCRE_PUCHAR, int, int *);
-extern BOOL              PRIV(was_newline)(PCRE_PUCHAR, int, PCRE_PUCHAR,
-                           int *, BOOL);
-extern BOOL              PRIV(xclass)(pcre_uint32, const pcre_uchar *, BOOL);
-
-#ifdef SUPPORT_JIT
-extern void              PRIV(jit_compile)(const REAL_PCRE *,
-                           PUBL(extra) *, int);
-extern int               PRIV(jit_exec)(const PUBL(extra) *,
-                           const pcre_uchar *, int, int, int, int *, int);
-extern void              PRIV(jit_free)(void *);
-extern int               PRIV(jit_get_size)(void *);
-extern const char*       PRIV(jit_get_target)(void);
-#endif
-
-/* Unicode character database (UCD) */
-
-typedef struct {
-  pcre_uint8 script;     /* ucp_Arabic, etc. */
-  pcre_uint8 chartype;   /* ucp_Cc, etc. (general categories) */
-  pcre_uint8 gbprop;     /* ucp_gbControl, etc. (grapheme break property) */
-  pcre_uint8 caseset;    /* offset to multichar other cases or zero */
-  pcre_int32 other_case; /* offset to other case, or zero if none */
-} ucd_record;
-
-extern const pcre_uint32 PRIV(ucd_caseless_sets)[];
-extern const ucd_record  PRIV(ucd_records)[];
-extern const pcre_uint8  PRIV(ucd_stage1)[];
-extern const pcre_uint16 PRIV(ucd_stage2)[];
-extern const pcre_uint32 PRIV(ucp_gentype)[];
-extern const pcre_uint32 PRIV(ucp_gbtable)[];
-#ifdef SUPPORT_JIT
-extern const int         PRIV(ucp_typerange)[];
-#endif
-
-#ifdef SUPPORT_UCP
-/* UCD access macros */
-
-#define UCD_BLOCK_SIZE 128
-#define GET_UCD(ch) (PRIV(ucd_records) + \
-        PRIV(ucd_stage2)[PRIV(ucd_stage1)[(int)(ch) / UCD_BLOCK_SIZE] * \
-        UCD_BLOCK_SIZE + (int)(ch) % UCD_BLOCK_SIZE])
-
-#define UCD_CHARTYPE(ch)    GET_UCD(ch)->chartype
-#define UCD_SCRIPT(ch)      GET_UCD(ch)->script
-#define UCD_CATEGORY(ch)    PRIV(ucp_gentype)[UCD_CHARTYPE(ch)]
-#define UCD_GRAPHBREAK(ch)  GET_UCD(ch)->gbprop
-#define UCD_CASESET(ch)     GET_UCD(ch)->caseset
-#define UCD_OTHERCASE(ch)   ((pcre_uint32)((int)ch + (int)(GET_UCD(ch)->other_case)))
-
-#endif /* SUPPORT_UCP */
-
-#endif
-
-/* End of pcre_internal.h */
diff --git a/src/extra/pcre/pcre_jit_compile.c b/src/extra/pcre/pcre_jit_compile.c
deleted file mode 100644
index e67071e..0000000
--- a/src/extra/pcre/pcre_jit_compile.c
+++ /dev/null
@@ -1,10701 +0,0 @@
-/*************************************************
-*      Perl-Compatible Regular Expressions       *
-*************************************************/
-
-/* PCRE is a library of functions to support regular expressions whose syntax
-and semantics are as close as possible to those of the Perl 5 language.
-
-                       Written by Philip Hazel
-           Copyright (c) 1997-2013 University of Cambridge
-
-  The machine code generator part (this module) was written by Zoltan Herczeg
-                      Copyright (c) 2010-2013
-
------------------------------------------------------------------------------
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are met:
-
-    * Redistributions of source code must retain the above copyright notice,
-      this list of conditions and the following disclaimer.
-
-    * Redistributions in binary form must reproduce the above copyright
-      notice, this list of conditions and the following disclaimer in the
-      documentation and/or other materials provided with the distribution.
-
-    * Neither the name of the University of Cambridge nor the names of its
-      contributors may be used to endorse or promote products derived from
-      this software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
-LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-POSSIBILITY OF SUCH DAMAGE.
------------------------------------------------------------------------------
-*/
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include "pcre_internal.h"
-
-#if defined SUPPORT_JIT
-
-/* All-in-one: Since we use the JIT compiler only from here,
-we just include it. This way we don't need to touch the build
-system files. */
-
-#define SLJIT_MALLOC(size) (PUBL(malloc))(size)
-#define SLJIT_FREE(ptr) (PUBL(free))(ptr)
-#define SLJIT_CONFIG_AUTO 1
-#define SLJIT_CONFIG_STATIC 1
-#define SLJIT_VERBOSE 0
-#define SLJIT_DEBUG 0
-
-#include "sljit/sljitLir.c"
-
-#if defined SLJIT_CONFIG_UNSUPPORTED && SLJIT_CONFIG_UNSUPPORTED
-#error Unsupported architecture
-#endif
-
-/* Defines for debugging purposes. */
-
-/* 1 - Use unoptimized capturing brackets.
-   2 - Enable capture_last_ptr (includes option 1). */
-/* #define DEBUG_FORCE_UNOPTIMIZED_CBRAS 2 */
-
-/* 1 - Always have a control head. */
-/* #define DEBUG_FORCE_CONTROL_HEAD 1 */
-
-/* Allocate memory for the regex stack on the real machine stack.
-Fast, but limited size. */
-#define MACHINE_STACK_SIZE 32768
-
-/* Growth rate for stack allocated by the OS. Should be the multiply
-of page size. */
-#define STACK_GROWTH_RATE 8192
-
-/* Enable to check that the allocation could destroy temporaries. */
-#if defined SLJIT_DEBUG && SLJIT_DEBUG
-#define DESTROY_REGISTERS 1
-#endif
-
-/*
-Short summary about the backtracking mechanism empolyed by the jit code generator:
-
-The code generator follows the recursive nature of the PERL compatible regular
-expressions. The basic blocks of regular expressions are condition checkers
-whose execute different commands depending on the result of the condition check.
-The relationship between the operators can be horizontal (concatenation) and
-vertical (sub-expression) (See struct backtrack_common for more details).
-
-  'ab' - 'a' and 'b' regexps are concatenated
-  'a+' - 'a' is the sub-expression of the '+' operator
-
-The condition checkers are boolean (true/false) checkers. Machine code is generated
-for the checker itself and for the actions depending on the result of the checker.
-The 'true' case is called as the matching path (expected path), and the other is called as
-the 'backtrack' path. Branch instructions are expesive for all CPUs, so we avoid taken
-branches on the matching path.
-
- Greedy star operator (*) :
-   Matching path: match happens.
-   Backtrack path: match failed.
- Non-greedy star operator (*?) :
-   Matching path: no need to perform a match.
-   Backtrack path: match is required.
-
-The following example shows how the code generated for a capturing bracket
-with two alternatives. Let A, B, C, D are arbirary regular expressions, and
-we have the following regular expression:
-
-   A(B|C)D
-
-The generated code will be the following:
-
- A matching path
- '(' matching path (pushing arguments to the stack)
- B matching path
- ')' matching path (pushing arguments to the stack)
- D matching path
- return with successful match
-
- D backtrack path
- ')' backtrack path (If we arrived from "C" jump to the backtrack of "C")
- B backtrack path
- C expected path
- jump to D matching path
- C backtrack path
- A backtrack path
-
- Notice, that the order of backtrack code paths are the opposite of the fast
- code paths. In this way the topmost value on the stack is always belong
- to the current backtrack code path. The backtrack path must check
- whether there is a next alternative. If so, it needs to jump back to
- the matching path eventually. Otherwise it needs to clear out its own stack
- frame and continue the execution on the backtrack code paths.
-*/
-
-/*
-Saved stack frames:
-
-Atomic blocks and asserts require reloading the values of private data
-when the backtrack mechanism performed. Because of OP_RECURSE, the data
-are not necessarly known in compile time, thus we need a dynamic restore
-mechanism.
-
-The stack frames are stored in a chain list, and have the following format:
-([ capturing bracket offset ][ start value ][ end value ])+ ... [ 0 ] [ previous head ]
-
-Thus we can restore the private data to a particular point in the stack.
-*/
-
-typedef struct jit_arguments {
-  /* Pointers first. */
-  struct sljit_stack *stack;
-  const pcre_uchar *str;
-  const pcre_uchar *begin;
-  const pcre_uchar *end;
-  int *offsets;
-  pcre_uchar *uchar_ptr;
-  pcre_uchar *mark_ptr;
-  void *callout_data;
-  /* Everything else after. */
-  pcre_uint32 limit_match;
-  int real_offset_count;
-  int offset_count;
-  pcre_uint8 notbol;
-  pcre_uint8 noteol;
-  pcre_uint8 notempty;
-  pcre_uint8 notempty_atstart;
-} jit_arguments;
-
-typedef struct executable_functions {
-  void *executable_funcs[JIT_NUMBER_OF_COMPILE_MODES];
-  sljit_uw *read_only_data[JIT_NUMBER_OF_COMPILE_MODES];
-  sljit_uw executable_sizes[JIT_NUMBER_OF_COMPILE_MODES];
-  PUBL(jit_callback) callback;
-  void *userdata;
-  pcre_uint32 top_bracket;
-  pcre_uint32 limit_match;
-} executable_functions;
-
-typedef struct jump_list {
-  struct sljit_jump *jump;
-  struct jump_list *next;
-} jump_list;
-
-typedef struct stub_list {
-  struct sljit_jump *start;
-  struct sljit_label *quit;
-  struct stub_list *next;
-} stub_list;
-
-typedef struct label_addr_list {
-  struct sljit_label *label;
-  sljit_uw *addr;
-  struct label_addr_list *next;
-} label_addr_list;
-
-enum frame_types {
-  no_frame = -1,
-  no_stack = -2
-};
-
-enum control_types {
-  type_mark = 0,
-  type_then_trap = 1
-};
-
-typedef int (SLJIT_CALL *jit_function)(jit_arguments *args);
-
-/* The following structure is the key data type for the recursive
-code generator. It is allocated by compile_matchingpath, and contains
-the arguments for compile_backtrackingpath. Must be the first member
-of its descendants. */
-typedef struct backtrack_common {
-  /* Concatenation stack. */
-  struct backtrack_common *prev;
-  jump_list *nextbacktracks;
-  /* Internal stack (for component operators). */
-  struct backtrack_common *top;
-  jump_list *topbacktracks;
-  /* Opcode pointer. */
-  pcre_uchar *cc;
-} backtrack_common;
-
-typedef struct assert_backtrack {
-  backtrack_common common;
-  jump_list *condfailed;
-  /* Less than 0 if a frame is not needed. */
-  int framesize;
-  /* Points to our private memory word on the stack. */
-  int private_data_ptr;
-  /* For iterators. */
-  struct sljit_label *matchingpath;
-} assert_backtrack;
-
-typedef struct bracket_backtrack {
-  backtrack_common common;
-  /* Where to coninue if an alternative is successfully matched. */
-  struct sljit_label *alternative_matchingpath;
-  /* For rmin and rmax iterators. */
-  struct sljit_label *recursive_matchingpath;
-  /* For greedy ? operator. */
-  struct sljit_label *zero_matchingpath;
-  /* Contains the branches of a failed condition. */
-  union {
-    /* Both for OP_COND, OP_SCOND. */
-    jump_list *condfailed;
-    assert_backtrack *assert;
-    /* For OP_ONCE. Less than 0 if not needed. */
-    int framesize;
-  } u;
-  /* Points to our private memory word on the stack. */
-  int private_data_ptr;
-} bracket_backtrack;
-
-typedef struct bracketpos_backtrack {
-  backtrack_common common;
-  /* Points to our private memory word on the stack. */
-  int private_data_ptr;
-  /* Reverting stack is needed. */
-  int framesize;
-  /* Allocated stack size. */
-  int stacksize;
-} bracketpos_backtrack;
-
-typedef struct braminzero_backtrack {
-  backtrack_common common;
-  struct sljit_label *matchingpath;
-} braminzero_backtrack;
-
-typedef struct iterator_backtrack {
-  backtrack_common common;
-  /* Next iteration. */
-  struct sljit_label *matchingpath;
-} iterator_backtrack;
-
-typedef struct recurse_entry {
-  struct recurse_entry *next;
-  /* Contains the function entry. */
-  struct sljit_label *entry;
-  /* Collects the calls until the function is not created. */
-  jump_list *calls;
-  /* Points to the starting opcode. */
-  sljit_sw start;
-} recurse_entry;
-
-typedef struct recurse_backtrack {
-  backtrack_common common;
-  BOOL inlined_pattern;
-} recurse_backtrack;
-
-#define OP_THEN_TRAP OP_TABLE_LENGTH
-
-typedef struct then_trap_backtrack {
-  backtrack_common common;
-  /* If then_trap is not NULL, this structure contains the real
-  then_trap for the backtracking path. */
-  struct then_trap_backtrack *then_trap;
-  /* Points to the starting opcode. */
-  sljit_sw start;
-  /* Exit point for the then opcodes of this alternative. */
-  jump_list *quit;
-  /* Frame size of the current alternative. */
-  int framesize;
-} then_trap_backtrack;
-
-#define MAX_RANGE_SIZE 4
-
-typedef struct compiler_common {
-  /* The sljit ceneric compiler. */
-  struct sljit_compiler *compiler;
-  /* First byte code. */
-  pcre_uchar *start;
-  /* Maps private data offset to each opcode. */
-  sljit_si *private_data_ptrs;
-  /* This read-only data is available during runtime. */
-  sljit_uw *read_only_data;
-  /* The total size of the read-only data. */
-  sljit_uw read_only_data_size;
-  /* The next free entry of the read_only_data. */
-  sljit_uw *read_only_data_ptr;
-  /* Tells whether the capturing bracket is optimized. */
-  pcre_uint8 *optimized_cbracket;
-  /* Tells whether the starting offset is a target of then. */
-  pcre_uint8 *then_offsets;
-  /* Current position where a THEN must jump. */
-  then_trap_backtrack *then_trap;
-  /* Starting offset of private data for capturing brackets. */
-  int cbra_ptr;
-  /* Output vector starting point. Must be divisible by 2. */
-  int ovector_start;
-  /* Last known position of the requested byte. */
-  int req_char_ptr;
-  /* Head of the last recursion. */
-  int recursive_head_ptr;
-  /* First inspected character for partial matching. */
-  int start_used_ptr;
-  /* Starting pointer for partial soft matches. */
-  int hit_start;
-  /* End pointer of the first line. */
-  int first_line_end;
-  /* Points to the marked string. */
-  int mark_ptr;
-  /* Recursive control verb management chain. */
-  int control_head_ptr;
-  /* Points to the last matched capture block index. */
-  int capture_last_ptr;
-  /* Points to the starting position of the current match. */
-  int start_ptr;
-
-  /* Flipped and lower case tables. */
-  const pcre_uint8 *fcc;
-  sljit_sw lcc;
-  /* Mode can be PCRE_STUDY_JIT_COMPILE and others. */
-  int mode;
-  /* TRUE, when minlength is greater than 0. */
-  BOOL might_be_empty;
-  /* \K is found in the pattern. */
-  BOOL has_set_som;
-  /* (*SKIP:arg) is found in the pattern. */
-  BOOL has_skip_arg;
-  /* (*THEN) is found in the pattern. */
-  BOOL has_then;
-  /* Needs to know the start position anytime. */
-  BOOL needs_start_ptr;
-  /* Currently in recurse or negative assert. */
-  BOOL local_exit;
-  /* Currently in a positive assert. */
-  BOOL positive_assert;
-  /* Newline control. */
-  int nltype;
-  pcre_uint32 nlmax;
-  pcre_uint32 nlmin;
-  int newline;
-  int bsr_nltype;
-  pcre_uint32 bsr_nlmax;
-  pcre_uint32 bsr_nlmin;
-  /* Dollar endonly. */
-  int endonly;
-  /* Tables. */
-  sljit_sw ctypes;
-  /* Named capturing brackets. */
-  pcre_uchar *name_table;
-  sljit_sw name_count;
-  sljit_sw name_entry_size;
-
-  /* Labels and jump lists. */
-  struct sljit_label *partialmatchlabel;
-  struct sljit_label *quit_label;
-  struct sljit_label *forced_quit_label;
-  struct sljit_label *accept_label;
-  struct sljit_label *ff_newline_shortcut;
-  stub_list *stubs;
-  label_addr_list *label_addrs;
-  recurse_entry *entries;
-  recurse_entry *currententry;
-  jump_list *partialmatch;
-  jump_list *quit;
-  jump_list *positive_assert_quit;
-  jump_list *forced_quit;
-  jump_list *accept;
-  jump_list *calllimit;
-  jump_list *stackalloc;
-  jump_list *revertframes;
-  jump_list *wordboundary;
-  jump_list *anynewline;
-  jump_list *hspace;
-  jump_list *vspace;
-  jump_list *casefulcmp;
-  jump_list *caselesscmp;
-  jump_list *reset_match;
-  BOOL jscript_compat;
-#ifdef SUPPORT_UTF
-  BOOL utf;
-#ifdef SUPPORT_UCP
-  BOOL use_ucp;
-#endif
-#ifdef COMPILE_PCRE8
-  jump_list *utfreadchar;
-  jump_list *utfreadchar16;
-  jump_list *utfreadtype8;
-#endif
-#endif /* SUPPORT_UTF */
-#ifdef SUPPORT_UCP
-  jump_list *getucd;
-#endif
-} compiler_common;
-
-/* For byte_sequence_compare. */
-
-typedef struct compare_context {
-  int length;
-  int sourcereg;
-#if defined SLJIT_UNALIGNED && SLJIT_UNALIGNED
-  int ucharptr;
-  union {
-    sljit_si asint;
-    sljit_uh asushort;
-#if defined COMPILE_PCRE8
-    sljit_ub asbyte;
-    sljit_ub asuchars[4];
-#elif defined COMPILE_PCRE16
-    sljit_uh asuchars[2];
-#elif defined COMPILE_PCRE32
-    sljit_ui asuchars[1];
-#endif
-  } c;
-  union {
-    sljit_si asint;
-    sljit_uh asushort;
-#if defined COMPILE_PCRE8
-    sljit_ub asbyte;
-    sljit_ub asuchars[4];
-#elif defined COMPILE_PCRE16
-    sljit_uh asuchars[2];
-#elif defined COMPILE_PCRE32
-    sljit_ui asuchars[1];
-#endif
-  } oc;
-#endif
-} compare_context;
-
-/* Undefine sljit macros. */
-#undef CMP
-
-/* Used for accessing the elements of the stack. */
-#define STACK(i)      ((-(i) - 1) * (int)sizeof(sljit_sw))
-
-#define TMP1          SLJIT_SCRATCH_REG1
-#define TMP2          SLJIT_SCRATCH_REG3
-#define TMP3          SLJIT_TEMPORARY_EREG2
-#define STR_PTR       SLJIT_SAVED_REG1
-#define STR_END       SLJIT_SAVED_REG2
-#define STACK_TOP     SLJIT_SCRATCH_REG2
-#define STACK_LIMIT   SLJIT_SAVED_REG3
-#define ARGUMENTS     SLJIT_SAVED_EREG1
-#define COUNT_MATCH   SLJIT_SAVED_EREG2
-#define RETURN_ADDR   SLJIT_TEMPORARY_EREG1
-
-/* Local space layout. */
-/* These two locals can be used by the current opcode. */
-#define LOCALS0          (0 * sizeof(sljit_sw))
-#define LOCALS1          (1 * sizeof(sljit_sw))
-/* Two local variables for possessive quantifiers (char1 cannot use them). */
-#define POSSESSIVE0      (2 * sizeof(sljit_sw))
-#define POSSESSIVE1      (3 * sizeof(sljit_sw))
-/* Max limit of recursions. */
-#define LIMIT_MATCH      (4 * sizeof(sljit_sw))
-/* The output vector is stored on the stack, and contains pointers
-to characters. The vector data is divided into two groups: the first
-group contains the start / end character pointers, and the second is
-the start pointers when the end of the capturing group has not yet reached. */
-#define OVECTOR_START    (common->ovector_start)
-#define OVECTOR(i)       (OVECTOR_START + (i) * (sljit_sw)sizeof(sljit_sw))
-#define OVECTOR_PRIV(i)  (common->cbra_ptr + (i) * (sljit_sw)sizeof(sljit_sw))
-#define PRIVATE_DATA(cc) (common->private_data_ptrs[(cc) - common->start])
-
-#if defined COMPILE_PCRE8
-#define MOV_UCHAR  SLJIT_MOV_UB
-#define MOVU_UCHAR SLJIT_MOVU_UB
-#elif defined COMPILE_PCRE16
-#define MOV_UCHAR  SLJIT_MOV_UH
-#define MOVU_UCHAR SLJIT_MOVU_UH
-#elif defined COMPILE_PCRE32
-#define MOV_UCHAR  SLJIT_MOV_UI
-#define MOVU_UCHAR SLJIT_MOVU_UI
-#else
-#error Unsupported compiling mode
-#endif
-
-/* Shortcuts. */
-#define DEFINE_COMPILER \
-  struct sljit_compiler *compiler = common->compiler
-#define OP1(op, dst, dstw, src, srcw) \
-  sljit_emit_op1(compiler, (op), (dst), (dstw), (src), (srcw))
-#define OP2(op, dst, dstw, src1, src1w, src2, src2w) \
-  sljit_emit_op2(compiler, (op), (dst), (dstw), (src1), (src1w), (src2), (src2w))
-#define LABEL() \
-  sljit_emit_label(compiler)
-#define JUMP(type) \
-  sljit_emit_jump(compiler, (type))
-#define JUMPTO(type, label) \
-  sljit_set_label(sljit_emit_jump(compiler, (type)), (label))
-#define JUMPHERE(jump) \
-  sljit_set_label((jump), sljit_emit_label(compiler))
-#define SET_LABEL(jump, label) \
-  sljit_set_label((jump), (label))
-#define CMP(type, src1, src1w, src2, src2w) \
-  sljit_emit_cmp(compiler, (type), (src1), (src1w), (src2), (src2w))
-#define CMPTO(type, src1, src1w, src2, src2w, label) \
-  sljit_set_label(sljit_emit_cmp(compiler, (type), (src1), (src1w), (src2), (src2w)), (label))
-#define OP_FLAGS(op, dst, dstw, src, srcw, type) \
-  sljit_emit_op_flags(compiler, (op), (dst), (dstw), (src), (srcw), (type))
-#define GET_LOCAL_BASE(dst, dstw, offset) \
-  sljit_get_local_base(compiler, (dst), (dstw), (offset))
-
-#define READ_CHAR_MAX 0x7fffffff
-
-static pcre_uchar* bracketend(pcre_uchar* cc)
-{
-SLJIT_ASSERT((*cc >= OP_ASSERT && *cc <= OP_ASSERTBACK_NOT) || (*cc >= OP_ONCE && *cc <= OP_SCOND));
-do cc += GET(cc, 1); while (*cc == OP_ALT);
-SLJIT_ASSERT(*cc >= OP_KET && *cc <= OP_KETRPOS);
-cc += 1 + LINK_SIZE;
-return cc;
-}
-
-static int no_alternatives(pcre_uchar* cc)
-{
-int count = 0;
-SLJIT_ASSERT((*cc >= OP_ASSERT && *cc <= OP_ASSERTBACK_NOT) || (*cc >= OP_ONCE && *cc <= OP_SCOND));
-do
-  {
-  cc += GET(cc, 1);
-  count++;
-  }
-while (*cc == OP_ALT);
-SLJIT_ASSERT(*cc >= OP_KET && *cc <= OP_KETRPOS);
-return count;
-}
-
-static int ones_in_half_byte[16] = {
-  /* 0 */ 0, 1, 1, 2, /* 4 */ 1, 2, 2, 3,
-  /* 8 */ 1, 2, 2, 3, /* 12 */ 2, 3, 3, 4
-};
-
-/* Functions whose might need modification for all new supported opcodes:
- next_opcode
- check_opcode_types
- set_private_data_ptrs
- get_framesize
- init_frame
- get_private_data_copy_length
- copy_private_data
- compile_matchingpath
- compile_backtrackingpath
-*/
-
-static pcre_uchar *next_opcode(compiler_common *common, pcre_uchar *cc)
-{
-SLJIT_UNUSED_ARG(common);
-switch(*cc)
-  {
-  case OP_SOD:
-  case OP_SOM:
-  case OP_SET_SOM:
-  case OP_NOT_WORD_BOUNDARY:
-  case OP_WORD_BOUNDARY:
-  case OP_NOT_DIGIT:
-  case OP_DIGIT:
-  case OP_NOT_WHITESPACE:
-  case OP_WHITESPACE:
-  case OP_NOT_WORDCHAR:
-  case OP_WORDCHAR:
-  case OP_ANY:
-  case OP_ALLANY:
-  case OP_NOTPROP:
-  case OP_PROP:
-  case OP_ANYNL:
-  case OP_NOT_HSPACE:
-  case OP_HSPACE:
-  case OP_NOT_VSPACE:
-  case OP_VSPACE:
-  case OP_EXTUNI:
-  case OP_EODN:
-  case OP_EOD:
-  case OP_CIRC:
-  case OP_CIRCM:
-  case OP_DOLL:
-  case OP_DOLLM:
-  case OP_CRSTAR:
-  case OP_CRMINSTAR:
-  case OP_CRPLUS:
-  case OP_CRMINPLUS:
-  case OP_CRQUERY:
-  case OP_CRMINQUERY:
-  case OP_CRRANGE:
-  case OP_CRMINRANGE:
-  case OP_CRPOSSTAR:
-  case OP_CRPOSPLUS:
-  case OP_CRPOSQUERY:
-  case OP_CRPOSRANGE:
-  case OP_CLASS:
-  case OP_NCLASS:
-  case OP_REF:
-  case OP_REFI:
-  case OP_DNREF:
-  case OP_DNREFI:
-  case OP_RECURSE:
-  case OP_CALLOUT:
-  case OP_ALT:
-  case OP_KET:
-  case OP_KETRMAX:
-  case OP_KETRMIN:
-  case OP_KETRPOS:
-  case OP_REVERSE:
-  case OP_ASSERT:
-  case OP_ASSERT_NOT:
-  case OP_ASSERTBACK:
-  case OP_ASSERTBACK_NOT:
-  case OP_ONCE:
-  case OP_ONCE_NC:
-  case OP_BRA:
-  case OP_BRAPOS:
-  case OP_CBRA:
-  case OP_CBRAPOS:
-  case OP_COND:
-  case OP_SBRA:
-  case OP_SBRAPOS:
-  case OP_SCBRA:
-  case OP_SCBRAPOS:
-  case OP_SCOND:
-  case OP_CREF:
-  case OP_DNCREF:
-  case OP_RREF:
-  case OP_DNRREF:
-  case OP_DEF:
-  case OP_BRAZERO:
-  case OP_BRAMINZERO:
-  case OP_BRAPOSZERO:
-  case OP_PRUNE:
-  case OP_SKIP:
-  case OP_THEN:
-  case OP_COMMIT:
-  case OP_FAIL:
-  case OP_ACCEPT:
-  case OP_ASSERT_ACCEPT:
-  case OP_CLOSE:
-  case OP_SKIPZERO:
-  return cc + PRIV(OP_lengths)[*cc];
-
-  case OP_CHAR:
-  case OP_CHARI:
-  case OP_NOT:
-  case OP_NOTI:
-  case OP_STAR:
-  case OP_MINSTAR:
-  case OP_PLUS:
-  case OP_MINPLUS:
-  case OP_QUERY:
-  case OP_MINQUERY:
-  case OP_UPTO:
-  case OP_MINUPTO:
-  case OP_EXACT:
-  case OP_POSSTAR:
-  case OP_POSPLUS:
-  case OP_POSQUERY:
-  case OP_POSUPTO:
-  case OP_STARI:
-  case OP_MINSTARI:
-  case OP_PLUSI:
-  case OP_MINPLUSI:
-  case OP_QUERYI:
-  case OP_MINQUERYI:
-  case OP_UPTOI:
-  case OP_MINUPTOI:
-  case OP_EXACTI:
-  case OP_POSSTARI:
-  case OP_POSPLUSI:
-  case OP_POSQUERYI:
-  case OP_POSUPTOI:
-  case OP_NOTSTAR:
-  case OP_NOTMINSTAR:
-  case OP_NOTPLUS:
-  case OP_NOTMINPLUS:
-  case OP_NOTQUERY:
-  case OP_NOTMINQUERY:
-  case OP_NOTUPTO:
-  case OP_NOTMINUPTO:
-  case OP_NOTEXACT:
-  case OP_NOTPOSSTAR:
-  case OP_NOTPOSPLUS:
-  case OP_NOTPOSQUERY:
-  case OP_NOTPOSUPTO:
-  case OP_NOTSTARI:
-  case OP_NOTMINSTARI:
-  case OP_NOTPLUSI:
-  case OP_NOTMINPLUSI:
-  case OP_NOTQUERYI:
-  case OP_NOTMINQUERYI:
-  case OP_NOTUPTOI:
-  case OP_NOTMINUPTOI:
-  case OP_NOTEXACTI:
-  case OP_NOTPOSSTARI:
-  case OP_NOTPOSPLUSI:
-  case OP_NOTPOSQUERYI:
-  case OP_NOTPOSUPTOI:
-  cc += PRIV(OP_lengths)[*cc];
-#ifdef SUPPORT_UTF
-  if (common->utf && HAS_EXTRALEN(cc[-1])) cc += GET_EXTRALEN(cc[-1]);
-#endif
-  return cc;
-
-  /* Special cases. */
-  case OP_TYPESTAR:
-  case OP_TYPEMINSTAR:
-  case OP_TYPEPLUS:
-  case OP_TYPEMINPLUS:
-  case OP_TYPEQUERY:
-  case OP_TYPEMINQUERY:
-  case OP_TYPEUPTO:
-  case OP_TYPEMINUPTO:
-  case OP_TYPEEXACT:
-  case OP_TYPEPOSSTAR:
-  case OP_TYPEPOSPLUS:
-  case OP_TYPEPOSQUERY:
-  case OP_TYPEPOSUPTO:
-  return cc + PRIV(OP_lengths)[*cc] - 1;
-
-  case OP_ANYBYTE:
-#ifdef SUPPORT_UTF
-  if (common->utf) return NULL;
-#endif
-  return cc + 1;
-
-#if defined SUPPORT_UTF || !defined COMPILE_PCRE8
-  case OP_XCLASS:
-  return cc + GET(cc, 1);
-#endif
-
-  case OP_MARK:
-  case OP_PRUNE_ARG:
-  case OP_SKIP_ARG:
-  case OP_THEN_ARG:
-  return cc + 1 + 2 + cc[1];
-
-  default:
-  /* All opcodes are supported now! */
-  SLJIT_ASSERT_STOP();
-  return NULL;
-  }
-}
-
-static BOOL check_opcode_types(compiler_common *common, pcre_uchar *cc, pcre_uchar *ccend)
-{
-int count;
-pcre_uchar *slot;
-
-/* Calculate important variables (like stack size) and checks whether all opcodes are supported. */
-while (cc < ccend)
-  {
-  switch(*cc)
-    {
-    case OP_SET_SOM:
-    common->has_set_som = TRUE;
-    common->might_be_empty = TRUE;
-    cc += 1;
-    break;
-
-    case OP_REF:
-    case OP_REFI:
-    common->optimized_cbracket[GET2(cc, 1)] = 0;
-    cc += 1 + IMM2_SIZE;
-    break;
-
-    case OP_BRA:
-    case OP_CBRA:
-    case OP_SBRA:
-    case OP_SCBRA:
-    count = no_alternatives(cc);
-    if (count > 4)
-      common->read_only_data_size += count * sizeof(sljit_uw);
-    cc += 1 + LINK_SIZE + (*cc == OP_CBRA || *cc == OP_SCBRA ? IMM2_SIZE : 0);
-    break;
-
-    case OP_CBRAPOS:
-    case OP_SCBRAPOS:
-    common->optimized_cbracket[GET2(cc, 1 + LINK_SIZE)] = 0;
-    cc += 1 + LINK_SIZE + IMM2_SIZE;
-    break;
-
-    case OP_COND:
-    case OP_SCOND:
-    /* Only AUTO_CALLOUT can insert this opcode. We do
-       not intend to support this case. */
-    if (cc[1 + LINK_SIZE] == OP_CALLOUT)
-      return FALSE;
-    cc += 1 + LINK_SIZE;
-    break;
-
-    case OP_CREF:
-    common->optimized_cbracket[GET2(cc, 1)] = 0;
-    cc += 1 + IMM2_SIZE;
-    break;
-
-    case OP_DNREF:
-    case OP_DNREFI:
-    case OP_DNCREF:
-    count = GET2(cc, 1 + IMM2_SIZE);
-    slot = common->name_table + GET2(cc, 1) * common->name_entry_size;
-    while (count-- > 0)
-      {
-      common->optimized_cbracket[GET2(slot, 0)] = 0;
-      slot += common->name_entry_size;
-      }
-    cc += 1 + 2 * IMM2_SIZE;
-    break;
-
-    case OP_RECURSE:
-    /* Set its value only once. */
-    if (common->recursive_head_ptr == 0)
-      {
-      common->recursive_head_ptr = common->ovector_start;
-      common->ovector_start += sizeof(sljit_sw);
-      }
-    cc += 1 + LINK_SIZE;
-    break;
-
-    case OP_CALLOUT:
-    if (common->capture_last_ptr == 0)
-      {
-      common->capture_last_ptr = common->ovector_start;
-      common->ovector_start += sizeof(sljit_sw);
-      }
-    cc += 2 + 2 * LINK_SIZE;
-    break;
-
-    case OP_THEN_ARG:
-    common->has_then = TRUE;
-    common->control_head_ptr = 1;
-    /* Fall through. */
-
-    case OP_PRUNE_ARG:
-    common->needs_start_ptr = TRUE;
-    /* Fall through. */
-
-    case OP_MARK:
-    if (common->mark_ptr == 0)
-      {
-      common->mark_ptr = common->ovector_start;
-      common->ovector_start += sizeof(sljit_sw);
-      }
-    cc += 1 + 2 + cc[1];
-    break;
-
-    case OP_THEN:
-    common->has_then = TRUE;
-    common->control_head_ptr = 1;
-    /* Fall through. */
-
-    case OP_PRUNE:
-    case OP_SKIP:
-    common->needs_start_ptr = TRUE;
-    cc += 1;
-    break;
-
-    case OP_SKIP_ARG:
-    common->control_head_ptr = 1;
-    common->has_skip_arg = TRUE;
-    cc += 1 + 2 + cc[1];
-    break;
-
-    default:
-    cc = next_opcode(common, cc);
-    if (cc == NULL)
-      return FALSE;
-    break;
-    }
-  }
-return TRUE;
-}
-
-static int get_class_iterator_size(pcre_uchar *cc)
-{
-switch(*cc)
-  {
-  case OP_CRSTAR:
-  case OP_CRPLUS:
-  return 2;
-
-  case OP_CRMINSTAR:
-  case OP_CRMINPLUS:
-  case OP_CRQUERY:
-  case OP_CRMINQUERY:
-  return 1;
-
-  case OP_CRRANGE:
-  case OP_CRMINRANGE:
-  if (GET2(cc, 1) == GET2(cc, 1 + IMM2_SIZE))
-    return 0;
-  return 2;
-
-  default:
-  return 0;
-  }
-}
-
-static BOOL detect_repeat(compiler_common *common, pcre_uchar *begin)
-{
-pcre_uchar *end = bracketend(begin);
-pcre_uchar *next;
-pcre_uchar *next_end;
-pcre_uchar *max_end;
-pcre_uchar type;
-sljit_sw length = end - begin;
-int min, max, i;
-
-/* Detect fixed iterations first. */
-if (end[-(1 + LINK_SIZE)] != OP_KET)
-  return FALSE;
-
-/* Already detected repeat. */
-if (common->private_data_ptrs[end - common->start - LINK_SIZE] != 0)
-  return TRUE;
-
-next = end;
-min = 1;
-while (1)
-  {
-  if (*next != *begin)
-    break;
-  next_end = bracketend(next);
-  if (next_end - next != length || memcmp(begin, next, IN_UCHARS(length)) != 0)
-    break;
-  next = next_end;
-  min++;
-  }
-
-if (min == 2)
-  return FALSE;
-
-max = 0;
-max_end = next;
-if (*next == OP_BRAZERO || *next == OP_BRAMINZERO)
-  {
-  type = *next;
-  while (1)
-    {
-    if (next[0] != type || next[1] != OP_BRA || next[2 + LINK_SIZE] != *begin)
-      break;
-    next_end = bracketend(next + 2 + LINK_SIZE);
-    if (next_end - next != (length + 2 + LINK_SIZE) || memcmp(begin, next + 2 + LINK_SIZE, IN_UCHARS(length)) != 0)
-      break;
-    next = next_end;
-    max++;
-    }
-
-  if (next[0] == type && next[1] == *begin && max >= 1)
-    {
-    next_end = bracketend(next + 1);
-    if (next_end - next == (length + 1) && memcmp(begin, next + 1, IN_UCHARS(length)) == 0)
-      {
-      for (i = 0; i < max; i++, next_end += 1 + LINK_SIZE)
-        if (*next_end != OP_KET)
-          break;
-
-      if (i == max)
-        {
-        common->private_data_ptrs[max_end - common->start - LINK_SIZE] = next_end - max_end;
-        common->private_data_ptrs[max_end - common->start - LINK_SIZE + 1] = (type == OP_BRAZERO) ? OP_UPTO : OP_MINUPTO;
-        /* +2 the original and the last. */
-        common->private_data_ptrs[max_end - common->start - LINK_SIZE + 2] = max + 2;
-        if (min == 1)
-          return TRUE;
-        min--;
-        max_end -= (1 + LINK_SIZE) + GET(max_end, -LINK_SIZE);
-        }
-      }
-    }
-  }
-
-if (min >= 3)
-  {
-  common->private_data_ptrs[end - common->start - LINK_SIZE] = max_end - end;
-  common->private_data_ptrs[end - common->start - LINK_SIZE + 1] = OP_EXACT;
-  common->private_data_ptrs[end - common->start - LINK_SIZE + 2] = min;
-  return TRUE;
-  }
-
-return FALSE;
-}
-
-#define CASE_ITERATOR_PRIVATE_DATA_1 \
-    case OP_MINSTAR: \
-    case OP_MINPLUS: \
-    case OP_QUERY: \
-    case OP_MINQUERY: \
-    case OP_MINSTARI: \
-    case OP_MINPLUSI: \
-    case OP_QUERYI: \
-    case OP_MINQUERYI: \
-    case OP_NOTMINSTAR: \
-    case OP_NOTMINPLUS: \
-    case OP_NOTQUERY: \
-    case OP_NOTMINQUERY: \
-    case OP_NOTMINSTARI: \
-    case OP_NOTMINPLUSI: \
-    case OP_NOTQUERYI: \
-    case OP_NOTMINQUERYI:
-
-#define CASE_ITERATOR_PRIVATE_DATA_2A \
-    case OP_STAR: \
-    case OP_PLUS: \
-    case OP_STARI: \
-    case OP_PLUSI: \
-    case OP_NOTSTAR: \
-    case OP_NOTPLUS: \
-    case OP_NOTSTARI: \
-    case OP_NOTPLUSI:
-
-#define CASE_ITERATOR_PRIVATE_DATA_2B \
-    case OP_UPTO: \
-    case OP_MINUPTO: \
-    case OP_UPTOI: \
-    case OP_MINUPTOI: \
-    case OP_NOTUPTO: \
-    case OP_NOTMINUPTO: \
-    case OP_NOTUPTOI: \
-    case OP_NOTMINUPTOI:
-
-#define CASE_ITERATOR_TYPE_PRIVATE_DATA_1 \
-    case OP_TYPEMINSTAR: \
-    case OP_TYPEMINPLUS: \
-    case OP_TYPEQUERY: \
-    case OP_TYPEMINQUERY:
-
-#define CASE_ITERATOR_TYPE_PRIVATE_DATA_2A \
-    case OP_TYPESTAR: \
-    case OP_TYPEPLUS:
-
-#define CASE_ITERATOR_TYPE_PRIVATE_DATA_2B \
-    case OP_TYPEUPTO: \
-    case OP_TYPEMINUPTO:
-
-static void set_private_data_ptrs(compiler_common *common, int *private_data_start, pcre_uchar *ccend)
-{
-pcre_uchar *cc = common->start;
-pcre_uchar *alternative;
-pcre_uchar *end = NULL;
-int private_data_ptr = *private_data_start;
-int space, size, bracketlen;
-
-while (cc < ccend)
-  {
-  space = 0;
-  size = 0;
-  bracketlen = 0;
-  if (private_data_ptr > SLJIT_MAX_LOCAL_SIZE)
-    return;
-
-  if (*cc == OP_ONCE || *cc == OP_ONCE_NC || *cc == OP_BRA || *cc == OP_CBRA || *cc == OP_COND)
-    if (detect_repeat(common, cc))
-      {
-      /* These brackets are converted to repeats, so no global
-      based single character repeat is allowed. */
-      if (cc >= end)
-        end = bracketend(cc);
-      }
-
-  switch(*cc)
-    {
-    case OP_KET:
-    if (common->private_data_ptrs[cc + 1 - common->start] != 0)
-      {
-      common->private_data_ptrs[cc - common->start] = private_data_ptr;
-      private_data_ptr += sizeof(sljit_sw);
-      cc += common->private_data_ptrs[cc + 1 - common->start];
-      }
-    cc += 1 + LINK_SIZE;
-    break;
-
-    case OP_ASSERT:
-    case OP_ASSERT_NOT:
-    case OP_ASSERTBACK:
-    case OP_ASSERTBACK_NOT:
-    case OP_ONCE:
-    case OP_ONCE_NC:
-    case OP_BRAPOS:
-    case OP_SBRA:
-    case OP_SBRAPOS:
-    case OP_SCOND:
-    common->private_data_ptrs[cc - common->start] = private_data_ptr;
-    private_data_ptr += sizeof(sljit_sw);
-    bracketlen = 1 + LINK_SIZE;
-    break;
-
-    case OP_CBRAPOS:
-    case OP_SCBRAPOS:
-    common->private_data_ptrs[cc - common->start] = private_data_ptr;
-    private_data_ptr += sizeof(sljit_sw);
-    bracketlen = 1 + LINK_SIZE + IMM2_SIZE;
-    break;
-
-    case OP_COND:
-    /* Might be a hidden SCOND. */
-    alternative = cc + GET(cc, 1);
-    if (*alternative == OP_KETRMAX || *alternative == OP_KETRMIN)
-      {
-      common->private_data_ptrs[cc - common->start] = private_data_ptr;
-      private_data_ptr += sizeof(sljit_sw);
-      }
-    bracketlen = 1 + LINK_SIZE;
-    break;
-
-    case OP_BRA:
-    bracketlen = 1 + LINK_SIZE;
-    break;
-
-    case OP_CBRA:
-    case OP_SCBRA:
-    bracketlen = 1 + LINK_SIZE + IMM2_SIZE;
-    break;
-
-    CASE_ITERATOR_PRIVATE_DATA_1
-    space = 1;
-    size = -2;
-    break;
-
-    CASE_ITERATOR_PRIVATE_DATA_2A
-    space = 2;
-    size = -2;
-    break;
-
-    CASE_ITERATOR_PRIVATE_DATA_2B
-    space = 2;
-    size = -(2 + IMM2_SIZE);
-    break;
-
-    CASE_ITERATOR_TYPE_PRIVATE_DATA_1
-    space = 1;
-    size = 1;
-    break;
-
-    CASE_ITERATOR_TYPE_PRIVATE_DATA_2A
-    if (cc[1] != OP_ANYNL && cc[1] != OP_EXTUNI)
-      space = 2;
-    size = 1;
-    break;
-
-    CASE_ITERATOR_TYPE_PRIVATE_DATA_2B
-    if (cc[1 + IMM2_SIZE] != OP_ANYNL && cc[1 + IMM2_SIZE] != OP_EXTUNI)
-      space = 2;
-    size = 1 + IMM2_SIZE;
-    break;
-
-    case OP_CLASS:
-    case OP_NCLASS:
-    size += 1 + 32 / sizeof(pcre_uchar);
-    space = get_class_iterator_size(cc + size);
-    break;
-
-#if defined SUPPORT_UTF || !defined COMPILE_PCRE8
-    case OP_XCLASS:
-    size = GET(cc, 1);
-    space = get_class_iterator_size(cc + size);
-    break;
-#endif
-
-    default:
-    cc = next_opcode(common, cc);
-    SLJIT_ASSERT(cc != NULL);
-    break;
-    }
-
-  /* Character iterators, which are not inside a repeated bracket,
-     gets a private slot instead of allocating it on the stack. */
-  if (space > 0 && cc >= end)
-    {
-    common->private_data_ptrs[cc - common->start] = private_data_ptr;
-    private_data_ptr += sizeof(sljit_sw) * space;
-    }
-
-  if (size != 0)
-    {
-    if (size < 0)
-      {
-      cc += -size;
-#ifdef SUPPORT_UTF
-      if (common->utf && HAS_EXTRALEN(cc[-1])) cc += GET_EXTRALEN(cc[-1]);
-#endif
-      }
-    else
-      cc += size;
-    }
-
-  if (bracketlen > 0)
-    {
-    if (cc >= end)
-      {
-      end = bracketend(cc);
-      if (end[-1 - LINK_SIZE] == OP_KET)
-        end = NULL;
-      }
-    cc += bracketlen;
-    }
-  }
-*private_data_start = private_data_ptr;
-}
-
-/* Returns with a frame_types (always < 0) if no need for frame. */
-static int get_framesize(compiler_common *common, pcre_uchar *cc, pcre_uchar *ccend, BOOL recursive, BOOL* needs_control_head)
-{
-int length = 0;
-int possessive = 0;
-BOOL stack_restore = FALSE;
-BOOL setsom_found = recursive;
-BOOL setmark_found = recursive;
-/* The last capture is a local variable even for recursions. */
-BOOL capture_last_found = FALSE;
-
-#if defined DEBUG_FORCE_CONTROL_HEAD && DEBUG_FORCE_CONTROL_HEAD
-SLJIT_ASSERT(common->control_head_ptr != 0);
-*needs_control_head = TRUE;
-#else
-*needs_control_head = FALSE;
-#endif
-
-if (ccend == NULL)
-  {
-  ccend = bracketend(cc) - (1 + LINK_SIZE);
-  if (!recursive && (*cc == OP_CBRAPOS || *cc == OP_SCBRAPOS))
-    {
-    possessive = length = (common->capture_last_ptr != 0) ? 5 : 3;
-    /* This is correct regardless of common->capture_last_ptr. */
-    capture_last_found = TRUE;
-    }
-  cc = next_opcode(common, cc);
-  }
-
-SLJIT_ASSERT(cc != NULL);
-while (cc < ccend)
-  switch(*cc)
-    {
-    case OP_SET_SOM:
-    SLJIT_ASSERT(common->has_set_som);
-    stack_restore = TRUE;
-    if (!setsom_found)
-      {
-      length += 2;
-      setsom_found = TRUE;
-      }
-    cc += 1;
-    break;
-
-    case OP_MARK:
-    case OP_PRUNE_ARG:
-    case OP_THEN_ARG:
-    SLJIT_ASSERT(common->mark_ptr != 0);
-    stack_restore = TRUE;
-    if (!setmark_found)
-      {
-      length += 2;
-      setmark_found = TRUE;
-      }
-    if (common->control_head_ptr != 0)
-      *needs_control_head = TRUE;
-    cc += 1 + 2 + cc[1];
-    break;
-
-    case OP_RECURSE:
-    stack_restore = TRUE;
-    if (common->has_set_som && !setsom_found)
-      {
-      length += 2;
-      setsom_found = TRUE;
-      }
-    if (common->mark_ptr != 0 && !setmark_found)
-      {
-      length += 2;
-      setmark_found = TRUE;
-      }
-    if (common->capture_last_ptr != 0 && !capture_last_found)
-      {
-      length += 2;
-      capture_last_found = TRUE;
-      }
-    cc += 1 + LINK_SIZE;
-    break;
-
-    case OP_CBRA:
-    case OP_CBRAPOS:
-    case OP_SCBRA:
-    case OP_SCBRAPOS:
-    stack_restore = TRUE;
-    if (common->capture_last_ptr != 0 && !capture_last_found)
-      {
-      length += 2;
-      capture_last_found = TRUE;
-      }
-    length += 3;
-    cc += 1 + LINK_SIZE + IMM2_SIZE;
-    break;
-
-    default:
-    stack_restore = TRUE;
-    /* Fall through. */
-
-    case OP_NOT_WORD_BOUNDARY:
-    case OP_WORD_BOUNDARY:
-    case OP_NOT_DIGIT:
-    case OP_DIGIT:
-    case OP_NOT_WHITESPACE:
-    case OP_WHITESPACE:
-    case OP_NOT_WORDCHAR:
-    case OP_WORDCHAR:
-    case OP_ANY:
-    case OP_ALLANY:
-    case OP_ANYBYTE:
-    case OP_NOTPROP:
-    case OP_PROP:
-    case OP_ANYNL:
-    case OP_NOT_HSPACE:
-    case OP_HSPACE:
-    case OP_NOT_VSPACE:
-    case OP_VSPACE:
-    case OP_EXTUNI:
-    case OP_EODN:
-    case OP_EOD:
-    case OP_CIRC:
-    case OP_CIRCM:
-    case OP_DOLL:
-    case OP_DOLLM:
-    case OP_CHAR:
-    case OP_CHARI:
-    case OP_NOT:
-    case OP_NOTI:
-
-    case OP_EXACT:
-    case OP_POSSTAR:
-    case OP_POSPLUS:
-    case OP_POSQUERY:
-    case OP_POSUPTO:
-
-    case OP_EXACTI:
-    case OP_POSSTARI:
-    case OP_POSPLUSI:
-    case OP_POSQUERYI:
-    case OP_POSUPTOI:
-
-    case OP_NOTEXACT:
-    case OP_NOTPOSSTAR:
-    case OP_NOTPOSPLUS:
-    case OP_NOTPOSQUERY:
-    case OP_NOTPOSUPTO:
-
-    case OP_NOTEXACTI:
-    case OP_NOTPOSSTARI:
-    case OP_NOTPOSPLUSI:
-    case OP_NOTPOSQUERYI:
-    case OP_NOTPOSUPTOI:
-
-    case OP_TYPEEXACT:
-    case OP_TYPEPOSSTAR:
-    case OP_TYPEPOSPLUS:
-    case OP_TYPEPOSQUERY:
-    case OP_TYPEPOSUPTO:
-
-    case OP_CLASS:
-    case OP_NCLASS:
-    case OP_XCLASS:
-
-    cc = next_opcode(common, cc);
-    SLJIT_ASSERT(cc != NULL);
-    break;
-    }
-
-/* Possessive quantifiers can use a special case. */
-if (SLJIT_UNLIKELY(possessive == length))
-  return stack_restore ? no_frame : no_stack;
-
-if (length > 0)
-  return length + 1;
-return stack_restore ? no_frame : no_stack;
-}
-
-static void init_frame(compiler_common *common, pcre_uchar *cc, pcre_uchar *ccend, int stackpos, int stacktop, BOOL recursive)
-{
-DEFINE_COMPILER;
-BOOL setsom_found = recursive;
-BOOL setmark_found = recursive;
-/* The last capture is a local variable even for recursions. */
-BOOL capture_last_found = FALSE;
-int offset;
-
-/* >= 1 + shortest item size (2) */
-SLJIT_UNUSED_ARG(stacktop);
-SLJIT_ASSERT(stackpos >= stacktop + 2);
-
-stackpos = STACK(stackpos);
-if (ccend == NULL)
-  {
-  ccend = bracketend(cc) - (1 + LINK_SIZE);
-  if (recursive || (*cc != OP_CBRAPOS && *cc != OP_SCBRAPOS))
-    cc = next_opcode(common, cc);
-  }
-
-SLJIT_ASSERT(cc != NULL);
-while (cc < ccend)
-  switch(*cc)
-    {
-    case OP_SET_SOM:
-    SLJIT_ASSERT(common->has_set_som);
-    if (!setsom_found)
-      {
-      OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), OVECTOR(0));
-      OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), stackpos, SLJIT_IMM, -OVECTOR(0));
-      stackpos += (int)sizeof(sljit_sw);
-      OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), stackpos, TMP1, 0);
-      stackpos += (int)sizeof(sljit_sw);
-      setsom_found = TRUE;
-      }
-    cc += 1;
-    break;
-
-    case OP_MARK:
-    case OP_PRUNE_ARG:
-    case OP_THEN_ARG:
-    SLJIT_ASSERT(common->mark_ptr != 0);
-    if (!setmark_found)
-      {
-      OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), common->mark_ptr);
-      OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), stackpos, SLJIT_IMM, -common->mark_ptr);
-      stackpos += (int)sizeof(sljit_sw);
-      OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), stackpos, TMP1, 0);
-      stackpos += (int)sizeof(sljit_sw);
-      setmark_found = TRUE;
-      }
-    cc += 1 + 2 + cc[1];
-    break;
-
-    case OP_RECURSE:
-    if (common->has_set_som && !setsom_found)
-      {
-      OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), OVECTOR(0));
-      OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), stackpos, SLJIT_IMM, -OVECTOR(0));
-      stackpos += (int)sizeof(sljit_sw);
-      OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), stackpos, TMP1, 0);
-      stackpos += (int)sizeof(sljit_sw);
-      setsom_found = TRUE;
-      }
-    if (common->mark_ptr != 0 && !setmark_found)
-      {
-      OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), common->mark_ptr);
-      OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), stackpos, SLJIT_IMM, -common->mark_ptr);
-      stackpos += (int)sizeof(sljit_sw);
-      OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), stackpos, TMP1, 0);
-      stackpos += (int)sizeof(sljit_sw);
-      setmark_found = TRUE;
-      }
-    if (common->capture_last_ptr != 0 && !capture_last_found)
-      {
-      OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), common->capture_last_ptr);
-      OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), stackpos, SLJIT_IMM, -common->capture_last_ptr);
-      stackpos += (int)sizeof(sljit_sw);
-      OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), stackpos, TMP1, 0);
-      stackpos += (int)sizeof(sljit_sw);
-      capture_last_found = TRUE;
-      }
-    cc += 1 + LINK_SIZE;
-    break;
-
-    case OP_CBRA:
-    case OP_CBRAPOS:
-    case OP_SCBRA:
-    case OP_SCBRAPOS:
-    if (common->capture_last_ptr != 0 && !capture_last_found)
-      {
-      OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), common->capture_last_ptr);
-      OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), stackpos, SLJIT_IMM, -common->capture_last_ptr);
-      stackpos += (int)sizeof(sljit_sw);
-      OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), stackpos, TMP1, 0);
-      stackpos += (int)sizeof(sljit_sw);
-      capture_last_found = TRUE;
-      }
-    offset = (GET2(cc, 1 + LINK_SIZE)) << 1;
-    OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), stackpos, SLJIT_IMM, OVECTOR(offset));
-    stackpos += (int)sizeof(sljit_sw);
-    OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), OVECTOR(offset));
-    OP1(SLJIT_MOV, TMP2, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), OVECTOR(offset + 1));
-    OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), stackpos, TMP1, 0);
-    stackpos += (int)sizeof(sljit_sw);
-    OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), stackpos, TMP2, 0);
-    stackpos += (int)sizeof(sljit_sw);
-
-    cc += 1 + LINK_SIZE + IMM2_SIZE;
-    break;
-
-    default:
-    cc = next_opcode(common, cc);
-    SLJIT_ASSERT(cc != NULL);
-    break;
-    }
-
-OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), stackpos, SLJIT_IMM, 0);
-SLJIT_ASSERT(stackpos == STACK(stacktop));
-}
-
-static SLJIT_INLINE int get_private_data_copy_length(compiler_common *common, pcre_uchar *cc, pcre_uchar *ccend, BOOL needs_control_head)
-{
-int private_data_length = needs_control_head ? 3 : 2;
-int size;
-pcre_uchar *alternative;
-/* Calculate the sum of the private machine words. */
-while (cc < ccend)
-  {
-  size = 0;
-  switch(*cc)
-    {
-    case OP_KET:
-    if (PRIVATE_DATA(cc) != 0)
-      private_data_length++;
-    cc += 1 + LINK_SIZE;
-    break;
-
-    case OP_ASSERT:
-    case OP_ASSERT_NOT:
-    case OP_ASSERTBACK:
-    case OP_ASSERTBACK_NOT:
-    case OP_ONCE:
-    case OP_ONCE_NC:
-    case OP_BRAPOS:
-    case OP_SBRA:
-    case OP_SBRAPOS:
-    case OP_SCOND:
-    private_data_length++;
-    cc += 1 + LINK_SIZE;
-    break;
-
-    case OP_CBRA:
-    case OP_SCBRA:
-    if (common->optimized_cbracket[GET2(cc, 1 + LINK_SIZE)] == 0)
-      private_data_length++;
-    cc += 1 + LINK_SIZE + IMM2_SIZE;
-    break;
-
-    case OP_CBRAPOS:
-    case OP_SCBRAPOS:
-    private_data_length += 2;
-    cc += 1 + LINK_SIZE + IMM2_SIZE;
-    break;
-
-    case OP_COND:
-    /* Might be a hidden SCOND. */
-    alternative = cc + GET(cc, 1);
-    if (*alternative == OP_KETRMAX || *alternative == OP_KETRMIN)
-      private_data_length++;
-    cc += 1 + LINK_SIZE;
-    break;
-
-    CASE_ITERATOR_PRIVATE_DATA_1
-    if (PRIVATE_DATA(cc))
-      private_data_length++;
-    cc += 2;
-#ifdef SUPPORT_UTF
-    if (common->utf && HAS_EXTRALEN(cc[-1])) cc += GET_EXTRALEN(cc[-1]);
-#endif
-    break;
-
-    CASE_ITERATOR_PRIVATE_DATA_2A
-    if (PRIVATE_DATA(cc))
-      private_data_length += 2;
-    cc += 2;
-#ifdef SUPPORT_UTF
-    if (common->utf && HAS_EXTRALEN(cc[-1])) cc += GET_EXTRALEN(cc[-1]);
-#endif
-    break;
-
-    CASE_ITERATOR_PRIVATE_DATA_2B
-    if (PRIVATE_DATA(cc))
-      private_data_length += 2;
-    cc += 2 + IMM2_SIZE;
-#ifdef SUPPORT_UTF
-    if (common->utf && HAS_EXTRALEN(cc[-1])) cc += GET_EXTRALEN(cc[-1]);
-#endif
-    break;
-
-    CASE_ITERATOR_TYPE_PRIVATE_DATA_1
-    if (PRIVATE_DATA(cc))
-      private_data_length++;
-    cc += 1;
-    break;
-
-    CASE_ITERATOR_TYPE_PRIVATE_DATA_2A
-    if (PRIVATE_DATA(cc))
-      private_data_length += 2;
-    cc += 1;
-    break;
-
-    CASE_ITERATOR_TYPE_PRIVATE_DATA_2B
-    if (PRIVATE_DATA(cc))
-      private_data_length += 2;
-    cc += 1 + IMM2_SIZE;
-    break;
-
-    case OP_CLASS:
-    case OP_NCLASS:
-#if defined SUPPORT_UTF || !defined COMPILE_PCRE8
-    case OP_XCLASS:
-    size = (*cc == OP_XCLASS) ? GET(cc, 1) : 1 + 32 / (int)sizeof(pcre_uchar);
-#else
-    size = 1 + 32 / (int)sizeof(pcre_uchar);
-#endif
-    if (PRIVATE_DATA(cc))
-      private_data_length += get_class_iterator_size(cc + size);
-    cc += size;
-    break;
-
-    default:
-    cc = next_opcode(common, cc);
-    SLJIT_ASSERT(cc != NULL);
-    break;
-    }
-  }
-SLJIT_ASSERT(cc == ccend);
-return private_data_length;
-}
-
-static void copy_private_data(compiler_common *common, pcre_uchar *cc, pcre_uchar *ccend,
-  BOOL save, int stackptr, int stacktop, BOOL needs_control_head)
-{
-DEFINE_COMPILER;
-int srcw[2];
-int count, size;
-BOOL tmp1next = TRUE;
-BOOL tmp1empty = TRUE;
-BOOL tmp2empty = TRUE;
-pcre_uchar *alternative;
-enum {
-  start,
-  loop,
-  end
-} status;
-
-status = save ? start : loop;
-stackptr = STACK(stackptr - 2);
-stacktop = STACK(stacktop - 1);
-
-if (!save)
-  {
-  stackptr += (needs_control_head ? 2 : 1) * sizeof(sljit_sw);
-  if (stackptr < stacktop)
-    {
-    OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(STACK_TOP), stackptr);
-    stackptr += sizeof(sljit_sw);
-    tmp1empty = FALSE;
-    }
-  if (stackptr < stacktop)
-    {
-    OP1(SLJIT_MOV, TMP2, 0, SLJIT_MEM1(STACK_TOP), stackptr);
-    stackptr += sizeof(sljit_sw);
-    tmp2empty = FALSE;
-    }
-  /* The tmp1next must be TRUE in either way. */
-  }
-
-do
-  {
-  count = 0;
-  switch(status)
-    {
-    case start:
-    SLJIT_ASSERT(save && common->recursive_head_ptr != 0);
-    count = 1;
-    srcw[0] = common->recursive_head_ptr;
-    if (needs_control_head)
-      {
-      SLJIT_ASSERT(common->control_head_ptr != 0);
-      count = 2;
-      srcw[1] = common->control_head_ptr;
-      }
-    status = loop;
-    break;
-
-    case loop:
-    if (cc >= ccend)
-      {
-      status = end;
-      break;
-      }
-
-    switch(*cc)
-      {
-      case OP_KET:
-      if (PRIVATE_DATA(cc) != 0)
-        {
-        count = 1;
-        srcw[0] = PRIVATE_DATA(cc);
-        }
-      cc += 1 + LINK_SIZE;
-      break;
-
-      case OP_ASSERT:
-      case OP_ASSERT_NOT:
-      case OP_ASSERTBACK:
-      case OP_ASSERTBACK_NOT:
-      case OP_ONCE:
-      case OP_ONCE_NC:
-      case OP_BRAPOS:
-      case OP_SBRA:
-      case OP_SBRAPOS:
-      case OP_SCOND:
-      count = 1;
-      srcw[0] = PRIVATE_DATA(cc);
-      SLJIT_ASSERT(srcw[0] != 0);
-      cc += 1 + LINK_SIZE;
-      break;
-
-      case OP_CBRA:
-      case OP_SCBRA:
-      if (common->optimized_cbracket[GET2(cc, 1 + LINK_SIZE)] == 0)
-        {
-        count = 1;
-        srcw[0] = OVECTOR_PRIV(GET2(cc, 1 + LINK_SIZE));
-        }
-      cc += 1 + LINK_SIZE + IMM2_SIZE;
-      break;
-
-      case OP_CBRAPOS:
-      case OP_SCBRAPOS:
-      count = 2;
-      srcw[0] = PRIVATE_DATA(cc);
-      srcw[1] = OVECTOR_PRIV(GET2(cc, 1 + LINK_SIZE));
-      SLJIT_ASSERT(srcw[0] != 0 && srcw[1] != 0);
-      cc += 1 + LINK_SIZE + IMM2_SIZE;
-      break;
-
-      case OP_COND:
-      /* Might be a hidden SCOND. */
-      alternative = cc + GET(cc, 1);
-      if (*alternative == OP_KETRMAX || *alternative == OP_KETRMIN)
-        {
-        count = 1;
-        srcw[0] = PRIVATE_DATA(cc);
-        SLJIT_ASSERT(srcw[0] != 0);
-        }
-      cc += 1 + LINK_SIZE;
-      break;
-
-      CASE_ITERATOR_PRIVATE_DATA_1
-      if (PRIVATE_DATA(cc))
-        {
-        count = 1;
-        srcw[0] = PRIVATE_DATA(cc);
-        }
-      cc += 2;
-#ifdef SUPPORT_UTF
-      if (common->utf && HAS_EXTRALEN(cc[-1])) cc += GET_EXTRALEN(cc[-1]);
-#endif
-      break;
-
-      CASE_ITERATOR_PRIVATE_DATA_2A
-      if (PRIVATE_DATA(cc))
-        {
-        count = 2;
-        srcw[0] = PRIVATE_DATA(cc);
-        srcw[1] = PRIVATE_DATA(cc) + sizeof(sljit_sw);
-        }
-      cc += 2;
-#ifdef SUPPORT_UTF
-      if (common->utf && HAS_EXTRALEN(cc[-1])) cc += GET_EXTRALEN(cc[-1]);
-#endif
-      break;
-
-      CASE_ITERATOR_PRIVATE_DATA_2B
-      if (PRIVATE_DATA(cc))
-        {
-        count = 2;
-        srcw[0] = PRIVATE_DATA(cc);
-        srcw[1] = PRIVATE_DATA(cc) + sizeof(sljit_sw);
-        }
-      cc += 2 + IMM2_SIZE;
-#ifdef SUPPORT_UTF
-      if (common->utf && HAS_EXTRALEN(cc[-1])) cc += GET_EXTRALEN(cc[-1]);
-#endif
-      break;
-
-      CASE_ITERATOR_TYPE_PRIVATE_DATA_1
-      if (PRIVATE_DATA(cc))
-        {
-        count = 1;
-        srcw[0] = PRIVATE_DATA(cc);
-        }
-      cc += 1;
-      break;
-
-      CASE_ITERATOR_TYPE_PRIVATE_DATA_2A
-      if (PRIVATE_DATA(cc))
-        {
-        count = 2;
-        srcw[0] = PRIVATE_DATA(cc);
-        srcw[1] = srcw[0] + sizeof(sljit_sw);
-        }
-      cc += 1;
-      break;
-
-      CASE_ITERATOR_TYPE_PRIVATE_DATA_2B
-      if (PRIVATE_DATA(cc))
-        {
-        count = 2;
-        srcw[0] = PRIVATE_DATA(cc);
-        srcw[1] = srcw[0] + sizeof(sljit_sw);
-        }
-      cc += 1 + IMM2_SIZE;
-      break;
-
-      case OP_CLASS:
-      case OP_NCLASS:
-#if defined SUPPORT_UTF || !defined COMPILE_PCRE8
-      case OP_XCLASS:
-      size = (*cc == OP_XCLASS) ? GET(cc, 1) : 1 + 32 / (int)sizeof(pcre_uchar);
-#else
-      size = 1 + 32 / (int)sizeof(pcre_uchar);
-#endif
-      if (PRIVATE_DATA(cc))
-        switch(get_class_iterator_size(cc + size))
-          {
-          case 1:
-          count = 1;
-          srcw[0] = PRIVATE_DATA(cc);
-          break;
-
-          case 2:
-          count = 2;
-          srcw[0] = PRIVATE_DATA(cc);
-          srcw[1] = srcw[0] + sizeof(sljit_sw);
-          break;
-
-          default:
-          SLJIT_ASSERT_STOP();
-          break;
-          }
-      cc += size;
-      break;
-
-      default:
-      cc = next_opcode(common, cc);
-      SLJIT_ASSERT(cc != NULL);
-      break;
-      }
-    break;
-
-    case end:
-    SLJIT_ASSERT_STOP();
-    break;
-    }
-
-  while (count > 0)
-    {
-    count--;
-    if (save)
-      {
-      if (tmp1next)
-        {
-        if (!tmp1empty)
-          {
-          OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), stackptr, TMP1, 0);
-          stackptr += sizeof(sljit_sw);
-          }
-        OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), srcw[count]);
-        tmp1empty = FALSE;
-        tmp1next = FALSE;
-        }
-      else
-        {
-        if (!tmp2empty)
-          {
-          OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), stackptr, TMP2, 0);
-          stackptr += sizeof(sljit_sw);
-          }
-        OP1(SLJIT_MOV, TMP2, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), srcw[count]);
-        tmp2empty = FALSE;
-        tmp1next = TRUE;
-        }
-      }
-    else
-      {
-      if (tmp1next)
-        {
-        SLJIT_ASSERT(!tmp1empty);
-        OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_LOCALS_REG), srcw[count], TMP1, 0);
-        tmp1empty = stackptr >= stacktop;
-        if (!tmp1empty)
-          {
-          OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(STACK_TOP), stackptr);
-          stackptr += sizeof(sljit_sw);
-          }
-        tmp1next = FALSE;
-        }
-      else
-        {
-        SLJIT_ASSERT(!tmp2empty);
-        OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_LOCALS_REG), srcw[count], TMP2, 0);
-        tmp2empty = stackptr >= stacktop;
-        if (!tmp2empty)
-          {
-          OP1(SLJIT_MOV, TMP2, 0, SLJIT_MEM1(STACK_TOP), stackptr);
-          stackptr += sizeof(sljit_sw);
-          }
-        tmp1next = TRUE;
-        }
-      }
-    }
-  }
-while (status != end);
-
-if (save)
-  {
-  if (tmp1next)
-    {
-    if (!tmp1empty)
-      {
-      OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), stackptr, TMP1, 0);
-      stackptr += sizeof(sljit_sw);
-      }
-    if (!tmp2empty)
-      {
-      OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), stackptr, TMP2, 0);
-      stackptr += sizeof(sljit_sw);
-      }
-    }
-  else
-    {
-    if (!tmp2empty)
-      {
-      OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), stackptr, TMP2, 0);
-      stackptr += sizeof(sljit_sw);
-      }
-    if (!tmp1empty)
-      {
-      OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), stackptr, TMP1, 0);
-      stackptr += sizeof(sljit_sw);
-      }
-    }
-  }
-SLJIT_ASSERT(cc == ccend && stackptr == stacktop && (save || (tmp1empty && tmp2empty)));
-}
-
-static SLJIT_INLINE pcre_uchar *set_then_offsets(compiler_common *common, pcre_uchar *cc, pcre_uint8 *current_offset)
-{
-pcre_uchar *end = bracketend(cc);
-BOOL has_alternatives = cc[GET(cc, 1)] == OP_ALT;
-
-/* Assert captures then. */
-if (*cc >= OP_ASSERT && *cc <= OP_ASSERTBACK_NOT)
-  current_offset = NULL;
-/* Conditional block does not. */
-if (*cc == OP_COND || *cc == OP_SCOND)
-  has_alternatives = FALSE;
-
-cc = next_opcode(common, cc);
-if (has_alternatives)
-  current_offset = common->then_offsets + (cc - common->start);
-
-while (cc < end)
-  {
-  if ((*cc >= OP_ASSERT && *cc <= OP_ASSERTBACK_NOT) || (*cc >= OP_ONCE && *cc <= OP_SCOND))
-    cc = set_then_offsets(common, cc, current_offset);
-  else
-    {
-    if (*cc == OP_ALT && has_alternatives)
-      current_offset = common->then_offsets + (cc + 1 + LINK_SIZE - common->start);
-    if (*cc >= OP_THEN && *cc <= OP_THEN_ARG && current_offset != NULL)
-      *current_offset = 1;
-    cc = next_opcode(common, cc);
-    }
-  }
-
-return end;
-}
-
-#undef CASE_ITERATOR_PRIVATE_DATA_1
-#undef CASE_ITERATOR_PRIVATE_DATA_2A
-#undef CASE_ITERATOR_PRIVATE_DATA_2B
-#undef CASE_ITERATOR_TYPE_PRIVATE_DATA_1
-#undef CASE_ITERATOR_TYPE_PRIVATE_DATA_2A
-#undef CASE_ITERATOR_TYPE_PRIVATE_DATA_2B
-
-static SLJIT_INLINE BOOL is_powerof2(unsigned int value)
-{
-return (value & (value - 1)) == 0;
-}
-
-static SLJIT_INLINE void set_jumps(jump_list *list, struct sljit_label *label)
-{
-while (list)
-  {
-  /* sljit_set_label is clever enough to do nothing
-  if either the jump or the label is NULL. */
-  SET_LABEL(list->jump, label);
-  list = list->next;
-  }
-}
-
-static SLJIT_INLINE void add_jump(struct sljit_compiler *compiler, jump_list **list, struct sljit_jump* jump)
-{
-jump_list *list_item = sljit_alloc_memory(compiler, sizeof(jump_list));
-if (list_item)
-  {
-  list_item->next = *list;
-  list_item->jump = jump;
-  *list = list_item;
-  }
-}
-
-static void add_stub(compiler_common *common, struct sljit_jump *start)
-{
-DEFINE_COMPILER;
-stub_list* list_item = sljit_alloc_memory(compiler, sizeof(stub_list));
-
-if (list_item)
-  {
-  list_item->start = start;
-  list_item->quit = LABEL();
-  list_item->next = common->stubs;
-  common->stubs = list_item;
-  }
-}
-
-static void flush_stubs(compiler_common *common)
-{
-DEFINE_COMPILER;
-stub_list* list_item = common->stubs;
-
-while (list_item)
-  {
-  JUMPHERE(list_item->start);
-  add_jump(compiler, &common->stackalloc, JUMP(SLJIT_FAST_CALL));
-  JUMPTO(SLJIT_JUMP, list_item->quit);
-  list_item = list_item->next;
-  }
-common->stubs = NULL;
-}
-
-static void add_label_addr(compiler_common *common)
-{
-DEFINE_COMPILER;
-label_addr_list *label_addr;
-
-label_addr = sljit_alloc_memory(compiler, sizeof(label_addr_list));
-if (label_addr == NULL)
-  return;
-label_addr->label = LABEL();
-label_addr->addr = common->read_only_data_ptr;
-label_addr->next = common->label_addrs;
-common->label_addrs = label_addr;
-common->read_only_data_ptr++;
-}
-
-static SLJIT_INLINE void count_match(compiler_common *common)
-{
-DEFINE_COMPILER;
-
-OP2(SLJIT_SUB | SLJIT_SET_E, COUNT_MATCH, 0, COUNT_MATCH, 0, SLJIT_IMM, 1);
-add_jump(compiler, &common->calllimit, JUMP(SLJIT_C_ZERO));
-}
-
-static SLJIT_INLINE void allocate_stack(compiler_common *common, int size)
-{
-/* May destroy all locals and registers except TMP2. */
-DEFINE_COMPILER;
-
-OP2(SLJIT_ADD, STACK_TOP, 0, STACK_TOP, 0, SLJIT_IMM, size * sizeof(sljit_sw));
-#ifdef DESTROY_REGISTERS
-OP1(SLJIT_MOV, TMP1, 0, SLJIT_IMM, 12345);
-OP1(SLJIT_MOV, TMP3, 0, TMP1, 0);
-OP1(SLJIT_MOV, RETURN_ADDR, 0, TMP1, 0);
-OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_LOCALS_REG), LOCALS0, TMP1, 0);
-OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_LOCALS_REG), LOCALS1, TMP1, 0);
-#endif
-add_stub(common, CMP(SLJIT_C_GREATER, STACK_TOP, 0, STACK_LIMIT, 0));
-}
-
-static SLJIT_INLINE void free_stack(compiler_common *common, int size)
-{
-DEFINE_COMPILER;
-OP2(SLJIT_SUB, STACK_TOP, 0, STACK_TOP, 0, SLJIT_IMM, size * sizeof(sljit_sw));
-}
-
-static SLJIT_INLINE void reset_ovector(compiler_common *common, int length)
-{
-DEFINE_COMPILER;
-struct sljit_label *loop;
-int i;
-
-/* At this point we can freely use all temporary registers. */
-SLJIT_ASSERT(length > 1);
-/* TMP1 returns with begin - 1. */
-OP2(SLJIT_SUB, SLJIT_SCRATCH_REG1, 0, SLJIT_MEM1(SLJIT_SAVED_REG1), SLJIT_OFFSETOF(jit_arguments, begin), SLJIT_IMM, IN_UCHARS(1));
-if (length < 8)
-  {
-  for (i = 1; i < length; i++)
-    OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_LOCALS_REG), OVECTOR(i), SLJIT_SCRATCH_REG1, 0);
-  }
-else
-  {
-  GET_LOCAL_BASE(SLJIT_SCRATCH_REG2, 0, OVECTOR_START);
-  OP1(SLJIT_MOV, SLJIT_SCRATCH_REG3, 0, SLJIT_IMM, length - 1);
-  loop = LABEL();
-  OP1(SLJIT_MOVU, SLJIT_MEM1(SLJIT_SCRATCH_REG2), sizeof(sljit_sw), SLJIT_SCRATCH_REG1, 0);
-  OP2(SLJIT_SUB | SLJIT_SET_E, SLJIT_SCRATCH_REG3, 0, SLJIT_SCRATCH_REG3, 0, SLJIT_IMM, 1);
-  JUMPTO(SLJIT_C_NOT_ZERO, loop);
-  }
-}
-
-static SLJIT_INLINE void do_reset_match(compiler_common *common, int length)
-{
-DEFINE_COMPILER;
-struct sljit_label *loop;
-int i;
-
-SLJIT_ASSERT(length > 1);
-/* OVECTOR(1) contains the "string begin - 1" constant. */
-if (length > 2)
-  OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), OVECTOR(1));
-if (length < 8)
-  {
-  for (i = 2; i < length; i++)
-    OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_LOCALS_REG), OVECTOR(i), TMP1, 0);
-  }
-else
-  {
-  GET_LOCAL_BASE(TMP2, 0, OVECTOR_START + sizeof(sljit_sw));
-  OP1(SLJIT_MOV, STACK_TOP, 0, SLJIT_IMM, length - 2);
-  loop = LABEL();
-  OP1(SLJIT_MOVU, SLJIT_MEM1(TMP2), sizeof(sljit_sw), TMP1, 0);
-  OP2(SLJIT_SUB | SLJIT_SET_E, STACK_TOP, 0, STACK_TOP, 0, SLJIT_IMM, 1);
-  JUMPTO(SLJIT_C_NOT_ZERO, loop);
-  }
-
-OP1(SLJIT_MOV, STACK_TOP, 0, ARGUMENTS, 0);
-if (common->mark_ptr != 0)
-  OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_LOCALS_REG), common->mark_ptr, SLJIT_IMM, 0);
-if (common->control_head_ptr != 0)
-  OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_LOCALS_REG), common->control_head_ptr, SLJIT_IMM, 0);
-OP1(SLJIT_MOV, STACK_TOP, 0, SLJIT_MEM1(STACK_TOP), SLJIT_OFFSETOF(jit_arguments, stack));
-OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), common->start_ptr);
-OP1(SLJIT_MOV, STACK_TOP, 0, SLJIT_MEM1(STACK_TOP), SLJIT_OFFSETOF(struct sljit_stack, base));
-}
-
-static sljit_sw SLJIT_CALL do_search_mark(sljit_sw *current, const pcre_uchar *skip_arg)
-{
-while (current != NULL)
-  {
-  switch (current[-2])
-    {
-    case type_then_trap:
-    break;
-
-    case type_mark:
-    if (STRCMP_UC_UC(skip_arg, (pcre_uchar *)current[-3]) == 0)
-      return current[-4];
-    break;
-
-    default:
-    SLJIT_ASSERT_STOP();
-    break;
-    }
-  current = (sljit_sw*)current[-1];
-  }
-return -1;
-}
-
-static SLJIT_INLINE void copy_ovector(compiler_common *common, int topbracket)
-{
-DEFINE_COMPILER;
-struct sljit_label *loop;
-struct sljit_jump *early_quit;
-
-/* At this point we can freely use all registers. */
-OP1(SLJIT_MOV, SLJIT_SAVED_REG3, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), OVECTOR(1));
-OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_LOCALS_REG), OVECTOR(1), STR_PTR, 0);
-
-OP1(SLJIT_MOV, SLJIT_SCRATCH_REG1, 0, ARGUMENTS, 0);
-if (common->mark_ptr != 0)
-  OP1(SLJIT_MOV, SLJIT_SCRATCH_REG3, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), common->mark_ptr);
-OP1(SLJIT_MOV_SI, SLJIT_SCRATCH_REG2, 0, SLJIT_MEM1(SLJIT_SCRATCH_REG1), SLJIT_OFFSETOF(jit_arguments, offset_count));
-if (common->mark_ptr != 0)
-  OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_SCRATCH_REG1), SLJIT_OFFSETOF(jit_arguments, mark_ptr), SLJIT_SCRATCH_REG3, 0);
-OP2(SLJIT_SUB, SLJIT_SCRATCH_REG3, 0, SLJIT_MEM1(SLJIT_SCRATCH_REG1), SLJIT_OFFSETOF(jit_arguments, offsets), SLJIT_IMM, sizeof(int));
-OP1(SLJIT_MOV, SLJIT_SCRATCH_REG1, 0, SLJIT_MEM1(SLJIT_SCRATCH_REG1), SLJIT_OFFSETOF(jit_arguments, begin));
-GET_LOCAL_BASE(SLJIT_SAVED_REG1, 0, OVECTOR_START);
-/* Unlikely, but possible */
-early_quit = CMP(SLJIT_C_EQUAL, SLJIT_SCRATCH_REG2, 0, SLJIT_IMM, 0);
-loop = LABEL();
-OP2(SLJIT_SUB, SLJIT_SAVED_REG2, 0, SLJIT_MEM1(SLJIT_SAVED_REG1), 0, SLJIT_SCRATCH_REG1, 0);
-OP2(SLJIT_ADD, SLJIT_SAVED_REG1, 0, SLJIT_SAVED_REG1, 0, SLJIT_IMM, sizeof(sljit_sw));
-/* Copy the integer value to the output buffer */
-#if defined COMPILE_PCRE16 || defined COMPILE_PCRE32
-OP2(SLJIT_ASHR, SLJIT_SAVED_REG2, 0, SLJIT_SAVED_REG2, 0, SLJIT_IMM, UCHAR_SHIFT);
-#endif
-OP1(SLJIT_MOVU_SI, SLJIT_MEM1(SLJIT_SCRATCH_REG3), sizeof(int), SLJIT_SAVED_REG2, 0);
-OP2(SLJIT_SUB | SLJIT_SET_E, SLJIT_SCRATCH_REG2, 0, SLJIT_SCRATCH_REG2, 0, SLJIT_IMM, 1);
-JUMPTO(SLJIT_C_NOT_ZERO, loop);
-JUMPHERE(early_quit);
-
-/* Calculate the return value, which is the maximum ovector value. */
-if (topbracket > 1)
-  {
-  GET_LOCAL_BASE(SLJIT_SCRATCH_REG1, 0, OVECTOR_START + topbracket * 2 * sizeof(sljit_sw));
-  OP1(SLJIT_MOV, SLJIT_SCRATCH_REG2, 0, SLJIT_IMM, topbracket + 1);
-
-  /* OVECTOR(0) is never equal to SLJIT_SAVED_REG3. */
-  loop = LABEL();
-  OP1(SLJIT_MOVU, SLJIT_SCRATCH_REG3, 0, SLJIT_MEM1(SLJIT_SCRATCH_REG1), -(2 * (sljit_sw)sizeof(sljit_sw)));
-  OP2(SLJIT_SUB, SLJIT_SCRATCH_REG2, 0, SLJIT_SCRATCH_REG2, 0, SLJIT_IMM, 1);
-  CMPTO(SLJIT_C_EQUAL, SLJIT_SCRATCH_REG3, 0, SLJIT_SAVED_REG3, 0, loop);
-  OP1(SLJIT_MOV, SLJIT_RETURN_REG, 0, SLJIT_SCRATCH_REG2, 0);
-  }
-else
-  OP1(SLJIT_MOV, SLJIT_RETURN_REG, 0, SLJIT_IMM, 1);
-}
-
-static SLJIT_INLINE void return_with_partial_match(compiler_common *common, struct sljit_label *quit)
-{
-DEFINE_COMPILER;
-struct sljit_jump *jump;
-
-SLJIT_COMPILE_ASSERT(STR_END == SLJIT_SAVED_REG2, str_end_must_be_saved_reg2);
-SLJIT_ASSERT(common->start_used_ptr != 0 && common->start_ptr != 0
-  && (common->mode == JIT_PARTIAL_SOFT_COMPILE ? common->hit_start != 0 : common->hit_start == 0));
-
-OP1(SLJIT_MOV, SLJIT_SCRATCH_REG2, 0, ARGUMENTS, 0);
-OP1(SLJIT_MOV, SLJIT_RETURN_REG, 0, SLJIT_IMM, PCRE_ERROR_PARTIAL);
-OP1(SLJIT_MOV_SI, SLJIT_SCRATCH_REG3, 0, SLJIT_MEM1(SLJIT_SCRATCH_REG2), SLJIT_OFFSETOF(jit_arguments, real_offset_count));
-CMPTO(SLJIT_C_SIG_LESS, SLJIT_SCRATCH_REG3, 0, SLJIT_IMM, 2, quit);
-
-/* Store match begin and end. */
-OP1(SLJIT_MOV, SLJIT_SAVED_REG1, 0, SLJIT_MEM1(SLJIT_SCRATCH_REG2), SLJIT_OFFSETOF(jit_arguments, begin));
-OP1(SLJIT_MOV, SLJIT_SCRATCH_REG2, 0, SLJIT_MEM1(SLJIT_SCRATCH_REG2), SLJIT_OFFSETOF(jit_arguments, offsets));
-
-jump = CMP(SLJIT_C_SIG_LESS, SLJIT_SCRATCH_REG3, 0, SLJIT_IMM, 3);
-OP2(SLJIT_SUB, SLJIT_SCRATCH_REG3, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), common->mode == JIT_PARTIAL_HARD_COMPILE ? common->start_ptr : (common->hit_start + (int)sizeof(sljit_sw)), SLJIT_SAVED_REG1, 0);
-#if defined COMPILE_PCRE16 || defined COMPILE_PCRE32
-OP2(SLJIT_ASHR, SLJIT_SCRATCH_REG3, 0, SLJIT_SCRATCH_REG3, 0, SLJIT_IMM, UCHAR_SHIFT);
-#endif
-OP1(SLJIT_MOV_SI, SLJIT_MEM1(SLJIT_SCRATCH_REG2), 2 * sizeof(int), SLJIT_SCRATCH_REG3, 0);
-JUMPHERE(jump);
-
-OP1(SLJIT_MOV, SLJIT_SCRATCH_REG3, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), common->mode == JIT_PARTIAL_HARD_COMPILE ? common->start_used_ptr : common->hit_start);
-OP2(SLJIT_SUB, SLJIT_SAVED_REG2, 0, STR_END, 0, SLJIT_SAVED_REG1, 0);
-#if defined COMPILE_PCRE16 || defined COMPILE_PCRE32
-OP2(SLJIT_ASHR, SLJIT_SAVED_REG2, 0, SLJIT_SAVED_REG2, 0, SLJIT_IMM, UCHAR_SHIFT);
-#endif
-OP1(SLJIT_MOV_SI, SLJIT_MEM1(SLJIT_SCRATCH_REG2), sizeof(int), SLJIT_SAVED_REG2, 0);
-
-OP2(SLJIT_SUB, SLJIT_SCRATCH_REG3, 0, SLJIT_SCRATCH_REG3, 0, SLJIT_SAVED_REG1, 0);
-#if defined COMPILE_PCRE16 || defined COMPILE_PCRE32
-OP2(SLJIT_ASHR, SLJIT_SCRATCH_REG3, 0, SLJIT_SCRATCH_REG3, 0, SLJIT_IMM, UCHAR_SHIFT);
-#endif
-OP1(SLJIT_MOV_SI, SLJIT_MEM1(SLJIT_SCRATCH_REG2), 0, SLJIT_SCRATCH_REG3, 0);
-
-JUMPTO(SLJIT_JUMP, quit);
-}
-
-static SLJIT_INLINE void check_start_used_ptr(compiler_common *common)
-{
-/* May destroy TMP1. */
-DEFINE_COMPILER;
-struct sljit_jump *jump;
-
-if (common->mode == JIT_PARTIAL_SOFT_COMPILE)
-  {
-  /* The value of -1 must be kept for start_used_ptr! */
-  OP2(SLJIT_ADD, TMP1, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), common->start_used_ptr, SLJIT_IMM, 1);
-  /* Jumps if start_used_ptr < STR_PTR, or start_used_ptr == -1. Although overwriting
-  is not necessary if start_used_ptr == STR_PTR, it does not hurt as well. */
-  jump = CMP(SLJIT_C_LESS_EQUAL, TMP1, 0, STR_PTR, 0);
-  OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_LOCALS_REG), common->start_used_ptr, STR_PTR, 0);
-  JUMPHERE(jump);
-  }
-else if (common->mode == JIT_PARTIAL_HARD_COMPILE)
-  {
-  jump = CMP(SLJIT_C_LESS_EQUAL, SLJIT_MEM1(SLJIT_LOCALS_REG), common->start_used_ptr, STR_PTR, 0);
-  OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_LOCALS_REG), common->start_used_ptr, STR_PTR, 0);
-  JUMPHERE(jump);
-  }
-}
-
-static SLJIT_INLINE BOOL char_has_othercase(compiler_common *common, pcre_uchar* cc)
-{
-/* Detects if the character has an othercase. */
-unsigned int c;
-
-#ifdef SUPPORT_UTF
-if (common->utf)
-  {
-  GETCHAR(c, cc);
-  if (c > 127)
-    {
-#ifdef SUPPORT_UCP
-    return c != UCD_OTHERCASE(c);
-#else
-    return FALSE;
-#endif
-    }
-#ifndef COMPILE_PCRE8
-  return common->fcc[c] != c;
-#endif
-  }
-else
-#endif
-  c = *cc;
-return MAX_255(c) ? common->fcc[c] != c : FALSE;
-}
-
-static SLJIT_INLINE unsigned int char_othercase(compiler_common *common, unsigned int c)
-{
-/* Returns with the othercase. */
-#ifdef SUPPORT_UTF
-if (common->utf && c > 127)
-  {
-#ifdef SUPPORT_UCP
-  return UCD_OTHERCASE(c);
-#else
-  return c;
-#endif
-  }
-#endif
-return TABLE_GET(c, common->fcc, c);
-}
-
-static unsigned int char_get_othercase_bit(compiler_common *common, pcre_uchar* cc)
-{
-/* Detects if the character and its othercase has only 1 bit difference. */
-unsigned int c, oc, bit;
-#if defined SUPPORT_UTF && defined COMPILE_PCRE8
-int n;
-#endif
-
-#ifdef SUPPORT_UTF
-if (common->utf)
-  {
-  GETCHAR(c, cc);
-  if (c <= 127)
-    oc = common->fcc[c];
-  else
-    {
-#ifdef SUPPORT_UCP
-    oc = UCD_OTHERCASE(c);
-#else
-    oc = c;
-#endif
-    }
-  }
-else
-  {
-  c = *cc;
-  oc = TABLE_GET(c, common->fcc, c);
-  }
-#else
-c = *cc;
-oc = TABLE_GET(c, common->fcc, c);
-#endif
-
-SLJIT_ASSERT(c != oc);
-
-bit = c ^ oc;
-/* Optimized for English alphabet. */
-if (c <= 127 && bit == 0x20)
-  return (0 << 8) | 0x20;
-
-/* Since c != oc, they must have at least 1 bit difference. */
-if (!is_powerof2(bit))
-  return 0;
-
-#if defined COMPILE_PCRE8
-
-#ifdef SUPPORT_UTF
-if (common->utf && c > 127)
-  {
-  n = GET_EXTRALEN(*cc);
-  while ((bit & 0x3f) == 0)
-    {
-    n--;
-    bit >>= 6;
-    }
-  return (n << 8) | bit;
-  }
-#endif /* SUPPORT_UTF */
-return (0 << 8) | bit;
-
-#elif defined COMPILE_PCRE16 || defined COMPILE_PCRE32
-
-#ifdef SUPPORT_UTF
-if (common->utf && c > 65535)
-  {
-  if (bit >= (1 << 10))
-    bit >>= 10;
-  else
-    return (bit < 256) ? ((2 << 8) | bit) : ((3 << 8) | (bit >> 8));
-  }
-#endif /* SUPPORT_UTF */
-return (bit < 256) ? ((0 << 8) | bit) : ((1 << 8) | (bit >> 8));
-
-#endif /* COMPILE_PCRE[8|16|32] */
-}
-
-static void check_partial(compiler_common *common, BOOL force)
-{
-/* Checks whether a partial matching is occurred. Does not modify registers. */
-DEFINE_COMPILER;
-struct sljit_jump *jump = NULL;
-
-SLJIT_ASSERT(!force || common->mode != JIT_COMPILE);
-
-if (common->mode == JIT_COMPILE)
-  return;
-
-if (!force)
-  jump = CMP(SLJIT_C_GREATER_EQUAL, SLJIT_MEM1(SLJIT_LOCALS_REG), common->start_used_ptr, STR_PTR, 0);
-else if (common->mode == JIT_PARTIAL_SOFT_COMPILE)
-  jump = CMP(SLJIT_C_EQUAL, SLJIT_MEM1(SLJIT_LOCALS_REG), common->start_used_ptr, SLJIT_IMM, -1);
-
-if (common->mode == JIT_PARTIAL_SOFT_COMPILE)
-  OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_LOCALS_REG), common->hit_start, SLJIT_IMM, 0);
-else
-  {
-  if (common->partialmatchlabel != NULL)
-    JUMPTO(SLJIT_JUMP, common->partialmatchlabel);
-  else
-    add_jump(compiler, &common->partialmatch, JUMP(SLJIT_JUMP));
-  }
-
-if (jump != NULL)
-  JUMPHERE(jump);
-}
-
-static void check_str_end(compiler_common *common, jump_list **end_reached)
-{
-/* Does not affect registers. Usually used in a tight spot. */
-DEFINE_COMPILER;
-struct sljit_jump *jump;
-
-if (common->mode == JIT_COMPILE)
-  {
-  add_jump(compiler, end_reached, CMP(SLJIT_C_GREATER_EQUAL, STR_PTR, 0, STR_END, 0));
-  return;
-  }
-
-jump = CMP(SLJIT_C_LESS, STR_PTR, 0, STR_END, 0);
-if (common->mode == JIT_PARTIAL_SOFT_COMPILE)
-  {
-  add_jump(compiler, end_reached, CMP(SLJIT_C_GREATER_EQUAL, SLJIT_MEM1(SLJIT_LOCALS_REG), common->start_used_ptr, STR_PTR, 0));
-  OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_LOCALS_REG), common->hit_start, SLJIT_IMM, 0);
-  add_jump(compiler, end_reached, JUMP(SLJIT_JUMP));
-  }
-else
-  {
-  add_jump(compiler, end_reached, CMP(SLJIT_C_GREATER_EQUAL, SLJIT_MEM1(SLJIT_LOCALS_REG), common->start_used_ptr, STR_PTR, 0));
-  if (common->partialmatchlabel != NULL)
-    JUMPTO(SLJIT_JUMP, common->partialmatchlabel);
-  else
-    add_jump(compiler, &common->partialmatch, JUMP(SLJIT_JUMP));
-  }
-JUMPHERE(jump);
-}
-
-static void detect_partial_match(compiler_common *common, jump_list **backtracks)
-{
-DEFINE_COMPILER;
-struct sljit_jump *jump;
-
-if (common->mode == JIT_COMPILE)
-  {
-  add_jump(compiler, backtracks, CMP(SLJIT_C_GREATER_EQUAL, STR_PTR, 0, STR_END, 0));
-  return;
-  }
-
-/* Partial matching mode. */
-jump = CMP(SLJIT_C_LESS, STR_PTR, 0, STR_END, 0);
-add_jump(compiler, backtracks, CMP(SLJIT_C_GREATER_EQUAL, SLJIT_MEM1(SLJIT_LOCALS_REG), common->start_used_ptr, STR_PTR, 0));
-if (common->mode == JIT_PARTIAL_SOFT_COMPILE)
-  {
-  OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_LOCALS_REG), common->hit_start, SLJIT_IMM, 0);
-  add_jump(compiler, backtracks, JUMP(SLJIT_JUMP));
-  }
-else
-  {
-  if (common->partialmatchlabel != NULL)
-    JUMPTO(SLJIT_JUMP, common->partialmatchlabel);
-  else
-    add_jump(compiler, &common->partialmatch, JUMP(SLJIT_JUMP));
-  }
-JUMPHERE(jump);
-}
-
-static void peek_char(compiler_common *common, pcre_uint32 max)
-{
-/* Reads the character into TMP1, keeps STR_PTR.
-Does not check STR_END. TMP2 Destroyed. */
-DEFINE_COMPILER;
-#if defined SUPPORT_UTF && !defined COMPILE_PCRE32
-struct sljit_jump *jump;
-#endif
-
-SLJIT_UNUSED_ARG(max);
-
-OP1(MOV_UCHAR, TMP1, 0, SLJIT_MEM1(STR_PTR), 0);
-#if defined SUPPORT_UTF && defined COMPILE_PCRE8
-if (common->utf)
-  {
-  if (max < 128) return;
-
-  jump = CMP(SLJIT_C_LESS, TMP1, 0, SLJIT_IMM, 0xc0);
-  OP2(SLJIT_ADD, STR_PTR, 0, STR_PTR, 0, SLJIT_IMM, IN_UCHARS(1));
-  add_jump(compiler, &common->utfreadchar, JUMP(SLJIT_FAST_CALL));
-  OP2(SLJIT_SUB, STR_PTR, 0, STR_PTR, 0, TMP2, 0);
-  JUMPHERE(jump);
-  }
-#endif /* SUPPORT_UTF && !COMPILE_PCRE32 */
-
-#if defined SUPPORT_UTF && defined COMPILE_PCRE16
-if (common->utf)
-  {
-  if (max < 0xd800) return;
-
-  OP2(SLJIT_SUB, TMP2, 0, TMP1, 0, SLJIT_IMM, 0xd800);
-  jump = CMP(SLJIT_C_GREATER, TMP2, 0, SLJIT_IMM, 0xdc00 - 0xd800 - 1);
-  /* TMP2 contains the high surrogate. */
-  OP1(MOV_UCHAR, TMP1, 0, SLJIT_MEM1(STR_PTR), IN_UCHARS(0));
-  OP2(SLJIT_ADD, TMP2, 0, TMP2, 0, SLJIT_IMM, 0x40);
-  OP2(SLJIT_SHL, TMP2, 0, TMP2, 0, SLJIT_IMM, 10);
-  OP2(SLJIT_AND, TMP1, 0, TMP1, 0, SLJIT_IMM, 0x3ff);
-  OP2(SLJIT_OR, TMP1, 0, TMP1, 0, TMP2, 0);
-  JUMPHERE(jump);
-  }
-#endif
-}
-
-#if defined SUPPORT_UTF && defined COMPILE_PCRE8
-
-static BOOL is_char7_bitset(const pcre_uint8 *bitset, BOOL nclass)
-{
-/* Tells whether the character codes below 128 are enough
-to determine a match. */
-const pcre_uint8 value = nclass ? 0xff : 0;
-const pcre_uint8* end = bitset + 32;
-
-bitset += 16;
-do
-  {
-  if (*bitset++ != value)
-    return FALSE;
-  }
-while (bitset < end);
-return TRUE;
-}
-
-static void read_char7_type(compiler_common *common, BOOL full_read)
-{
-/* Reads the precise character type of a character into TMP1, if the character
-is less than 128. Otherwise it returns with zero. Does not check STR_END. The
-full_read argument tells whether characters above max are accepted or not. */
-DEFINE_COMPILER;
-struct sljit_jump *jump;
-
-SLJIT_ASSERT(common->utf);
-
-OP1(MOV_UCHAR, TMP2, 0, SLJIT_MEM1(STR_PTR), 0);
-OP2(SLJIT_ADD, STR_PTR, 0, STR_PTR, 0, SLJIT_IMM, IN_UCHARS(1));
-
-OP1(SLJIT_MOV_UB, TMP1, 0, SLJIT_MEM1(TMP2), common->ctypes);
-
-if (full_read)
-  {
-  jump = CMP(SLJIT_C_LESS, TMP2, 0, SLJIT_IMM, 0xc0);
-  OP1(SLJIT_MOV_UB, TMP2, 0, SLJIT_MEM1(TMP2), (sljit_sw)PRIV(utf8_table4) - 0xc0);
-  OP2(SLJIT_ADD, STR_PTR, 0, STR_PTR, 0, TMP2, 0);
-  JUMPHERE(jump);
-  }
-}
-
-#endif /* SUPPORT_UTF && COMPILE_PCRE8 */
-
-static void read_char_range(compiler_common *common, pcre_uint32 min, pcre_uint32 max, BOOL update_str_ptr)
-{
-/* Reads the precise value of a character into TMP1, if the character is
-between min and max (c >= min && c <= max). Otherwise it returns with a value
-outside the range. Does not check STR_END. */
-DEFINE_COMPILER;
-#if defined SUPPORT_UTF && !defined COMPILE_PCRE32
-struct sljit_jump *jump;
-#endif
-#if defined SUPPORT_UTF && defined COMPILE_PCRE8
-struct sljit_jump *jump2;
-#endif
-
-SLJIT_UNUSED_ARG(update_str_ptr);
-SLJIT_UNUSED_ARG(min);
-SLJIT_UNUSED_ARG(max);
-SLJIT_ASSERT(min <= max);
-
-OP1(MOV_UCHAR, TMP1, 0, SLJIT_MEM1(STR_PTR), IN_UCHARS(0));
-OP2(SLJIT_ADD, STR_PTR, 0, STR_PTR, 0, SLJIT_IMM, IN_UCHARS(1));
-
-#if defined SUPPORT_UTF && defined COMPILE_PCRE8
-if (common->utf)
-  {
-  if (max < 128 && !update_str_ptr) return;
-
-  jump = CMP(SLJIT_C_LESS, TMP1, 0, SLJIT_IMM, 0xc0);
-  if (min >= 0x10000)
-    {
-    OP2(SLJIT_SUB, TMP2, 0, TMP1, 0, SLJIT_IMM, 0xf0);
-    if (update_str_ptr)
-      OP1(SLJIT_MOV_UB, RETURN_ADDR, 0, SLJIT_MEM1(TMP1), (sljit_sw)PRIV(utf8_table4) - 0xc0);
-    OP1(MOV_UCHAR, TMP1, 0, SLJIT_MEM1(STR_PTR), IN_UCHARS(0));
-    jump2 = CMP(SLJIT_C_GREATER, TMP2, 0, SLJIT_IMM, 0x7);
-    OP2(SLJIT_SHL, TMP2, 0, TMP2, 0, SLJIT_IMM, 6);
-    OP2(SLJIT_AND, TMP1, 0, TMP1, 0, SLJIT_IMM, 0x3f);
-    OP2(SLJIT_OR, TMP1, 0, TMP1, 0, TMP2, 0);
-    OP1(MOV_UCHAR, TMP2, 0, SLJIT_MEM1(STR_PTR), IN_UCHARS(1));
-    OP2(SLJIT_SHL, TMP1, 0, TMP1, 0, SLJIT_IMM, 6);
-    OP2(SLJIT_AND, TMP2, 0, TMP2, 0, SLJIT_IMM, 0x3f);
-    OP2(SLJIT_OR, TMP1, 0, TMP1, 0, TMP2, 0);
-    OP1(MOV_UCHAR, TMP2, 0, SLJIT_MEM1(STR_PTR), IN_UCHARS(2));
-    if (!update_str_ptr)
-      OP2(SLJIT_ADD, STR_PTR, 0, STR_PTR, 0, SLJIT_IMM, IN_UCHARS(3));
-    OP2(SLJIT_SHL, TMP1, 0, TMP1, 0, SLJIT_IMM, 6);
-    OP2(SLJIT_AND, TMP2, 0, TMP2, 0, SLJIT_IMM, 0x3f);
-    OP2(SLJIT_OR, TMP1, 0, TMP1, 0, TMP2, 0);
-    JUMPHERE(jump2);
-    if (update_str_ptr)
-      OP2(SLJIT_ADD, STR_PTR, 0, STR_PTR, 0, RETURN_ADDR, 0);
-    }
-  else if (min >= 0x800 && max <= 0xffff)
-    {
-    OP2(SLJIT_SUB, TMP2, 0, TMP1, 0, SLJIT_IMM, 0xe0);
-    if (update_str_ptr)
-      OP1(SLJIT_MOV_UB, RETURN_ADDR, 0, SLJIT_MEM1(TMP1), (sljit_sw)PRIV(utf8_table4) - 0xc0);
-    OP1(MOV_UCHAR, TMP1, 0, SLJIT_MEM1(STR_PTR), IN_UCHARS(0));
-    jump2 = CMP(SLJIT_C_GREATER, TMP2, 0, SLJIT_IMM, 0xf);
-    OP2(SLJIT_SHL, TMP2, 0, TMP2, 0, SLJIT_IMM, 6);
-    OP2(SLJIT_AND, TMP1, 0, TMP1, 0, SLJIT_IMM, 0x3f);
-    OP2(SLJIT_OR, TMP1, 0, TMP1, 0, TMP2, 0);
-    OP1(MOV_UCHAR, TMP2, 0, SLJIT_MEM1(STR_PTR), IN_UCHARS(1));
-    if (!update_str_ptr)
-      OP2(SLJIT_ADD, STR_PTR, 0, STR_PTR, 0, SLJIT_IMM, IN_UCHARS(2));
-    OP2(SLJIT_SHL, TMP1, 0, TMP1, 0, SLJIT_IMM, 6);
-    OP2(SLJIT_AND, TMP2, 0, TMP2, 0, SLJIT_IMM, 0x3f);
-    OP2(SLJIT_OR, TMP1, 0, TMP1, 0, TMP2, 0);
-    JUMPHERE(jump2);
-    if (update_str_ptr)
-      OP2(SLJIT_ADD, STR_PTR, 0, STR_PTR, 0, RETURN_ADDR, 0);
-    }
-  else if (max >= 0x800)
-    add_jump(compiler, (max < 0x10000) ? &common->utfreadchar16 : &common->utfreadchar, JUMP(SLJIT_FAST_CALL));
-  else if (max < 128)
-    {
-    OP1(SLJIT_MOV_UB, TMP2, 0, SLJIT_MEM1(TMP1), (sljit_sw)PRIV(utf8_table4) - 0xc0);
-    OP2(SLJIT_ADD, STR_PTR, 0, STR_PTR, 0, TMP2, 0);
-    }
-  else
-    {
-    OP1(MOV_UCHAR, TMP2, 0, SLJIT_MEM1(STR_PTR), IN_UCHARS(0));
-    if (!update_str_ptr)
-      OP2(SLJIT_ADD, STR_PTR, 0, STR_PTR, 0, SLJIT_IMM, IN_UCHARS(1));
-    else
-      OP1(SLJIT_MOV_UB, RETURN_ADDR, 0, SLJIT_MEM1(TMP1), (sljit_sw)PRIV(utf8_table4) - 0xc0);
-    OP2(SLJIT_AND, TMP1, 0, TMP1, 0, SLJIT_IMM, 0x3f);
-    OP2(SLJIT_SHL, TMP1, 0, TMP1, 0, SLJIT_IMM, 6);
-    OP2(SLJIT_AND, TMP2, 0, TMP2, 0, SLJIT_IMM, 0x3f);
-    OP2(SLJIT_OR, TMP1, 0, TMP1, 0, TMP2, 0);
-    if (update_str_ptr)
-      OP2(SLJIT_ADD, STR_PTR, 0, STR_PTR, 0, RETURN_ADDR, 0);
-    }
-  JUMPHERE(jump);
-  }
-#endif
-
-#if defined SUPPORT_UTF && defined COMPILE_PCRE16
-if (common->utf)
-  {
-  if (max >= 0x10000)
-    {
-    OP2(SLJIT_SUB, TMP2, 0, TMP1, 0, SLJIT_IMM, 0xd800);
-    jump = CMP(SLJIT_C_GREATER, TMP2, 0, SLJIT_IMM, 0xdc00 - 0xd800 - 1);
-    /* TMP2 contains the high surrogate. */
-    OP1(MOV_UCHAR, TMP1, 0, SLJIT_MEM1(STR_PTR), IN_UCHARS(0));
-    OP2(SLJIT_ADD, TMP2, 0, TMP2, 0, SLJIT_IMM, 0x40);
-    OP2(SLJIT_SHL, TMP2, 0, TMP2, 0, SLJIT_IMM, 10);
-    OP2(SLJIT_ADD, STR_PTR, 0, STR_PTR, 0, SLJIT_IMM, IN_UCHARS(1));
-    OP2(SLJIT_AND, TMP1, 0, TMP1, 0, SLJIT_IMM, 0x3ff);
-    OP2(SLJIT_OR, TMP1, 0, TMP1, 0, TMP2, 0);
-    JUMPHERE(jump);
-    return;
-    }
-
-  if (max < 0xd800 && !update_str_ptr) return;
-
-  /* Skip low surrogate if necessary. */
-  OP2(SLJIT_SUB, TMP2, 0, TMP1, 0, SLJIT_IMM, 0xd800);
-  jump = CMP(SLJIT_C_GREATER, TMP2, 0, SLJIT_IMM, 0xdc00 - 0xd800 - 1);
-  if (update_str_ptr)
-    OP2(SLJIT_ADD, STR_PTR, 0, STR_PTR, 0, SLJIT_IMM, IN_UCHARS(1));
-  if (max >= 0xd800)
-    OP1(SLJIT_MOV, TMP1, 0, SLJIT_IMM, 0x10000);
-  JUMPHERE(jump);
-  }
-#endif
-}
-
-static SLJIT_INLINE void read_char(compiler_common *common)
-{
-read_char_range(common, 0, READ_CHAR_MAX, TRUE);
-}
-
-static void read_char8_type(compiler_common *common, BOOL update_str_ptr)
-{
-/* Reads the character type into TMP1, updates STR_PTR. Does not check STR_END. */
-DEFINE_COMPILER;
-#if defined SUPPORT_UTF || !defined COMPILE_PCRE8
-struct sljit_jump *jump;
-#endif
-#if defined SUPPORT_UTF && defined COMPILE_PCRE8
-struct sljit_jump *jump2;
-#endif
-
-SLJIT_UNUSED_ARG(update_str_ptr);
-
-OP1(MOV_UCHAR, TMP2, 0, SLJIT_MEM1(STR_PTR), 0);
-OP2(SLJIT_ADD, STR_PTR, 0, STR_PTR, 0, SLJIT_IMM, IN_UCHARS(1));
-
-#if defined SUPPORT_UTF && defined COMPILE_PCRE8
-if (common->utf)
-  {
-  /* This can be an extra read in some situations, but hopefully
-  it is needed in most cases. */
-  OP1(SLJIT_MOV_UB, TMP1, 0, SLJIT_MEM1(TMP2), common->ctypes);
-  jump = CMP(SLJIT_C_LESS, TMP2, 0, SLJIT_IMM, 0xc0);
-  if (!update_str_ptr)
-    {
-    OP1(MOV_UCHAR, TMP1, 0, SLJIT_MEM1(STR_PTR), IN_UCHARS(0));
-    OP2(SLJIT_ADD, STR_PTR, 0, STR_PTR, 0, SLJIT_IMM, IN_UCHARS(1));
-    OP2(SLJIT_AND, TMP2, 0, TMP2, 0, SLJIT_IMM, 0x3f);
-    OP2(SLJIT_SHL, TMP2, 0, TMP2, 0, SLJIT_IMM, 6);
-    OP2(SLJIT_AND, TMP1, 0, TMP1, 0, SLJIT_IMM, 0x3f);
-    OP2(SLJIT_OR, TMP2, 0, TMP2, 0, TMP1, 0);
-    OP1(SLJIT_MOV, TMP1, 0, SLJIT_IMM, 0);
-    jump2 = CMP(SLJIT_C_GREATER, TMP2, 0, SLJIT_IMM, 255);
-    OP1(SLJIT_MOV_UB, TMP1, 0, SLJIT_MEM1(TMP2), common->ctypes);
-    JUMPHERE(jump2);
-    }
-  else
-    add_jump(compiler, &common->utfreadtype8, JUMP(SLJIT_FAST_CALL));
-  JUMPHERE(jump);
-  return;
-  }
-#endif /* SUPPORT_UTF && COMPILE_PCRE8 */
-
-#if !defined COMPILE_PCRE8
-/* The ctypes array contains only 256 values. */
-OP1(SLJIT_MOV, TMP1, 0, SLJIT_IMM, 0);
-jump = CMP(SLJIT_C_GREATER, TMP2, 0, SLJIT_IMM, 255);
-#endif
-OP1(SLJIT_MOV_UB, TMP1, 0, SLJIT_MEM1(TMP2), common->ctypes);
-#if !defined COMPILE_PCRE8
-JUMPHERE(jump);
-#endif
-
-#if defined SUPPORT_UTF && defined COMPILE_PCRE16
-if (common->utf && update_str_ptr)
-  {
-  /* Skip low surrogate if necessary. */
-  OP2(SLJIT_SUB, TMP2, 0, TMP2, 0, SLJIT_IMM, 0xd800);
-  jump = CMP(SLJIT_C_GREATER, TMP2, 0, SLJIT_IMM, 0xdc00 - 0xd800 - 1);
-  OP2(SLJIT_ADD, STR_PTR, 0, STR_PTR, 0, SLJIT_IMM, IN_UCHARS(1));
-  JUMPHERE(jump);
-  }
-#endif /* SUPPORT_UTF && COMPILE_PCRE16 */
-}
-
-static void skip_char_back(compiler_common *common)
-{
-/* Goes one character back. Affects STR_PTR and TMP1. Does not check begin. */
-DEFINE_COMPILER;
-#if defined SUPPORT_UTF && !defined COMPILE_PCRE32
-#if defined COMPILE_PCRE8
-struct sljit_label *label;
-
-if (common->utf)
-  {
-  label = LABEL();
-  OP1(MOV_UCHAR, TMP1, 0, SLJIT_MEM1(STR_PTR), -IN_UCHARS(1));
-  OP2(SLJIT_SUB, STR_PTR, 0, STR_PTR, 0, SLJIT_IMM, IN_UCHARS(1));
-  OP2(SLJIT_AND, TMP1, 0, TMP1, 0, SLJIT_IMM, 0xc0);
-  CMPTO(SLJIT_C_EQUAL, TMP1, 0, SLJIT_IMM, 0x80, label);
-  return;
-  }
-#elif defined COMPILE_PCRE16
-if (common->utf)
-  {
-  OP1(MOV_UCHAR, TMP1, 0, SLJIT_MEM1(STR_PTR), -IN_UCHARS(1));
-  OP2(SLJIT_SUB, STR_PTR, 0, STR_PTR, 0, SLJIT_IMM, IN_UCHARS(1));
-  /* Skip low surrogate if necessary. */
-  OP2(SLJIT_AND, TMP1, 0, TMP1, 0, SLJIT_IMM, 0xfc00);
-  OP2(SLJIT_SUB | SLJIT_SET_E, SLJIT_UNUSED, 0, TMP1, 0, SLJIT_IMM, 0xdc00);
-  OP_FLAGS(SLJIT_MOV, TMP1, 0, SLJIT_UNUSED, 0, SLJIT_C_EQUAL);
-  OP2(SLJIT_SHL, TMP1, 0, TMP1, 0, SLJIT_IMM, 1);
-  OP2(SLJIT_SUB, STR_PTR, 0, STR_PTR, 0, TMP1, 0);
-  return;
-  }
-#endif /* COMPILE_PCRE[8|16] */
-#endif /* SUPPORT_UTF && !COMPILE_PCRE32 */
-OP2(SLJIT_SUB, STR_PTR, 0, STR_PTR, 0, SLJIT_IMM, IN_UCHARS(1));
-}
-
-static void check_newlinechar(compiler_common *common, int nltype, jump_list **backtracks, BOOL jumpifmatch)
-{
-/* Character comes in TMP1. Checks if it is a newline. TMP2 may be destroyed. */
-DEFINE_COMPILER;
-struct sljit_jump *jump;
-
-if (nltype == NLTYPE_ANY)
-  {
-  add_jump(compiler, &common->anynewline, JUMP(SLJIT_FAST_CALL));
-  add_jump(compiler, backtracks, JUMP(jumpifmatch ? SLJIT_C_NOT_ZERO : SLJIT_C_ZERO));
-  }
-else if (nltype == NLTYPE_ANYCRLF)
-  {
-  if (jumpifmatch)
-    {
-    add_jump(compiler, backtracks, CMP(SLJIT_C_EQUAL, TMP1, 0, SLJIT_IMM, CHAR_CR));
-    add_jump(compiler, backtracks, CMP(SLJIT_C_EQUAL, TMP1, 0, SLJIT_IMM, CHAR_NL));
-    }
-  else
-    {
-    jump = CMP(SLJIT_C_EQUAL, TMP1, 0, SLJIT_IMM, CHAR_CR);
-    add_jump(compiler, backtracks, CMP(SLJIT_C_NOT_EQUAL, TMP1, 0, SLJIT_IMM, CHAR_NL));
-    JUMPHERE(jump);
-    }
-  }
-else
-  {
-  SLJIT_ASSERT(nltype == NLTYPE_FIXED && common->newline < 256);
-  add_jump(compiler, backtracks, CMP(jumpifmatch ? SLJIT_C_EQUAL : SLJIT_C_NOT_EQUAL, TMP1, 0, SLJIT_IMM, common->newline));
-  }
-}
-
-#ifdef SUPPORT_UTF
-
-#if defined COMPILE_PCRE8
-static void do_utfreadchar(compiler_common *common)
-{
-/* Fast decoding a UTF-8 character. TMP1 contains the first byte
-of the character (>= 0xc0). Return char value in TMP1, length in TMP2. */
-DEFINE_COMPILER;
-struct sljit_jump *jump;
-
-sljit_emit_fast_enter(compiler, RETURN_ADDR, 0);
-OP1(MOV_UCHAR, TMP2, 0, SLJIT_MEM1(STR_PTR), IN_UCHARS(0));
-OP2(SLJIT_AND, TMP1, 0, TMP1, 0, SLJIT_IMM, 0x3f);
-OP2(SLJIT_SHL, TMP1, 0, TMP1, 0, SLJIT_IMM, 6);
-OP2(SLJIT_AND, TMP2, 0, TMP2, 0, SLJIT_IMM, 0x3f);
-OP2(SLJIT_OR, TMP1, 0, TMP1, 0, TMP2, 0);
-
-/* Searching for the first zero. */
-OP2(SLJIT_AND | SLJIT_SET_E, SLJIT_UNUSED, 0, TMP1, 0, SLJIT_IMM, 0x800);
-jump = JUMP(SLJIT_C_NOT_ZERO);
-/* Two byte sequence. */
-OP2(SLJIT_ADD, STR_PTR, 0, STR_PTR, 0, SLJIT_IMM, IN_UCHARS(1));
-OP1(SLJIT_MOV, TMP2, 0, SLJIT_IMM, IN_UCHARS(2));
-sljit_emit_fast_return(compiler, RETURN_ADDR, 0);
-
-JUMPHERE(jump);
-OP1(MOV_UCHAR, TMP2, 0, SLJIT_MEM1(STR_PTR), IN_UCHARS(1));
-OP2(SLJIT_XOR, TMP1, 0, TMP1, 0, SLJIT_IMM, 0x800);
-OP2(SLJIT_SHL, TMP1, 0, TMP1, 0, SLJIT_IMM, 6);
-OP2(SLJIT_AND, TMP2, 0, TMP2, 0, SLJIT_IMM, 0x3f);
-OP2(SLJIT_OR, TMP1, 0, TMP1, 0, TMP2, 0);
-
-OP2(SLJIT_AND | SLJIT_SET_E, SLJIT_UNUSED, 0, TMP1, 0, SLJIT_IMM, 0x10000);
-jump = JUMP(SLJIT_C_NOT_ZERO);
-/* Three byte sequence. */
-OP2(SLJIT_ADD, STR_PTR, 0, STR_PTR, 0, SLJIT_IMM, IN_UCHARS(2));
-OP1(SLJIT_MOV, TMP2, 0, SLJIT_IMM, IN_UCHARS(3));
-sljit_emit_fast_return(compiler, RETURN_ADDR, 0);
-
-/* Four byte sequence. */
-JUMPHERE(jump);
-OP1(MOV_UCHAR, TMP2, 0, SLJIT_MEM1(STR_PTR), IN_UCHARS(2));
-OP2(SLJIT_XOR, TMP1, 0, TMP1, 0, SLJIT_IMM, 0x10000);
-OP2(SLJIT_SHL, TMP1, 0, TMP1, 0, SLJIT_IMM, 6);
-OP2(SLJIT_ADD, STR_PTR, 0, STR_PTR, 0, SLJIT_IMM, IN_UCHARS(3));
-OP2(SLJIT_AND, TMP2, 0, TMP2, 0, SLJIT_IMM, 0x3f);
-OP2(SLJIT_OR, TMP1, 0, TMP1, 0, TMP2, 0);
-OP1(SLJIT_MOV, TMP2, 0, SLJIT_IMM, IN_UCHARS(4));
-sljit_emit_fast_return(compiler, RETURN_ADDR, 0);
-}
-
-static void do_utfreadchar16(compiler_common *common)
-{
-/* Fast decoding a UTF-8 character. TMP1 contains the first byte
-of the character (>= 0xc0). Return value in TMP1. */
-DEFINE_COMPILER;
-struct sljit_jump *jump;
-
-sljit_emit_fast_enter(compiler, RETURN_ADDR, 0);
-OP1(MOV_UCHAR, TMP2, 0, SLJIT_MEM1(STR_PTR), IN_UCHARS(0));
-OP2(SLJIT_AND, TMP1, 0, TMP1, 0, SLJIT_IMM, 0x3f);
-OP2(SLJIT_SHL, TMP1, 0, TMP1, 0, SLJIT_IMM, 6);
-OP2(SLJIT_AND, TMP2, 0, TMP2, 0, SLJIT_IMM, 0x3f);
-OP2(SLJIT_OR, TMP1, 0, TMP1, 0, TMP2, 0);
-
-/* Searching for the first zero. */
-OP2(SLJIT_AND | SLJIT_SET_E, SLJIT_UNUSED, 0, TMP1, 0, SLJIT_IMM, 0x800);
-jump = JUMP(SLJIT_C_NOT_ZERO);
-/* Two byte sequence. */
-OP2(SLJIT_ADD, STR_PTR, 0, STR_PTR, 0, SLJIT_IMM, IN_UCHARS(1));
-sljit_emit_fast_return(compiler, RETURN_ADDR, 0);
-
-JUMPHERE(jump);
-OP2(SLJIT_AND | SLJIT_SET_E, SLJIT_UNUSED, 0, TMP1, 0, SLJIT_IMM, 0x400);
-OP_FLAGS(SLJIT_MOV, TMP2, 0, SLJIT_UNUSED, 0, SLJIT_C_NOT_ZERO);
-/* This code runs only in 8 bit mode. No need to shift the value. */
-OP2(SLJIT_ADD, STR_PTR, 0, STR_PTR, 0, TMP2, 0);
-OP1(MOV_UCHAR, TMP2, 0, SLJIT_MEM1(STR_PTR), IN_UCHARS(1));
-OP2(SLJIT_XOR, TMP1, 0, TMP1, 0, SLJIT_IMM, 0x800);
-OP2(SLJIT_SHL, TMP1, 0, TMP1, 0, SLJIT_IMM, 6);
-OP2(SLJIT_AND, TMP2, 0, TMP2, 0, SLJIT_IMM, 0x3f);
-OP2(SLJIT_OR, TMP1, 0, TMP1, 0, TMP2, 0);
-/* Three byte sequence. */
-OP2(SLJIT_ADD, STR_PTR, 0, STR_PTR, 0, SLJIT_IMM, IN_UCHARS(2));
-sljit_emit_fast_return(compiler, RETURN_ADDR, 0);
-}
-
-static void do_utfreadtype8(compiler_common *common)
-{
-/* Fast decoding a UTF-8 character type. TMP2 contains the first byte
-of the character (>= 0xc0). Return value in TMP1. */
-DEFINE_COMPILER;
-struct sljit_jump *jump;
-struct sljit_jump *compare;
-
-sljit_emit_fast_enter(compiler, RETURN_ADDR, 0);
-
-OP2(SLJIT_AND | SLJIT_SET_E, SLJIT_UNUSED, 0, TMP2, 0, SLJIT_IMM, 0x20);
-jump = JUMP(SLJIT_C_NOT_ZERO);
-/* Two byte sequence. */
-OP1(MOV_UCHAR, TMP1, 0, SLJIT_MEM1(STR_PTR), IN_UCHARS(0));
-OP2(SLJIT_ADD, STR_PTR, 0, STR_PTR, 0, SLJIT_IMM, IN_UCHARS(1));
-OP2(SLJIT_AND, TMP2, 0, TMP2, 0, SLJIT_IMM, 0x1f);
-/* The upper 5 bits are known at this point. */
-compare = CMP(SLJIT_C_GREATER, TMP2, 0, SLJIT_IMM, 0x3);
-OP2(SLJIT_SHL, TMP2, 0, TMP2, 0, SLJIT_IMM, 6);
-OP2(SLJIT_AND, TMP1, 0, TMP1, 0, SLJIT_IMM, 0x3f);
-OP2(SLJIT_OR, TMP2, 0, TMP2, 0, TMP1, 0);
-OP1(SLJIT_MOV_UB, TMP1, 0, SLJIT_MEM1(TMP2), common->ctypes);
-sljit_emit_fast_return(compiler, RETURN_ADDR, 0);
-
-JUMPHERE(compare);
-OP1(SLJIT_MOV, TMP1, 0, SLJIT_IMM, 0);
-sljit_emit_fast_return(compiler, RETURN_ADDR, 0);
-
-/* We only have types for characters less than 256. */
-JUMPHERE(jump);
-OP1(SLJIT_MOV_UB, TMP2, 0, SLJIT_MEM1(TMP2), (sljit_sw)PRIV(utf8_table4) - 0xc0);
-OP1(SLJIT_MOV, TMP1, 0, SLJIT_IMM, 0);
-OP2(SLJIT_ADD, STR_PTR, 0, STR_PTR, 0, TMP2, 0);
-sljit_emit_fast_return(compiler, RETURN_ADDR, 0);
-}
-
-#endif /* COMPILE_PCRE8 */
-
-#endif /* SUPPORT_UTF */
-
-#ifdef SUPPORT_UCP
-
-/* UCD_BLOCK_SIZE must be 128 (see the assert below). */
-#define UCD_BLOCK_MASK 127
-#define UCD_BLOCK_SHIFT 7
-
-static void do_getucd(compiler_common *common)
-{
-/* Search the UCD record for the character comes in TMP1.
-Returns chartype in TMP1 and UCD offset in TMP2. */
-DEFINE_COMPILER;
-
-SLJIT_ASSERT(UCD_BLOCK_SIZE == 128 && sizeof(ucd_record) == 8);
-
-sljit_emit_fast_enter(compiler, RETURN_ADDR, 0);
-OP2(SLJIT_LSHR, TMP2, 0, TMP1, 0, SLJIT_IMM, UCD_BLOCK_SHIFT);
-OP1(SLJIT_MOV_UB, TMP2, 0, SLJIT_MEM1(TMP2), (sljit_sw)PRIV(ucd_stage1));
-OP2(SLJIT_AND, TMP1, 0, TMP1, 0, SLJIT_IMM, UCD_BLOCK_MASK);
-OP2(SLJIT_SHL, TMP2, 0, TMP2, 0, SLJIT_IMM, UCD_BLOCK_SHIFT);
-OP2(SLJIT_ADD, TMP1, 0, TMP1, 0, TMP2, 0);
-OP1(SLJIT_MOV, TMP2, 0, SLJIT_IMM, (sljit_sw)PRIV(ucd_stage2));
-OP1(SLJIT_MOV_UH, TMP2, 0, SLJIT_MEM2(TMP2, TMP1), 1);
-OP1(SLJIT_MOV, TMP1, 0, SLJIT_IMM, (sljit_sw)PRIV(ucd_records) + SLJIT_OFFSETOF(ucd_record, chartype));
-OP1(SLJIT_MOV_UB, TMP1, 0, SLJIT_MEM2(TMP1, TMP2), 3);
-sljit_emit_fast_return(compiler, RETURN_ADDR, 0);
-}
-#endif
-
-static SLJIT_INLINE struct sljit_label *mainloop_entry(compiler_common *common, BOOL hascrorlf, BOOL firstline)
-{
-DEFINE_COMPILER;
-struct sljit_label *mainloop;
-struct sljit_label *newlinelabel = NULL;
-struct sljit_jump *start;
-struct sljit_jump *end = NULL;
-struct sljit_jump *nl = NULL;
-#if defined SUPPORT_UTF && !defined COMPILE_PCRE32
-struct sljit_jump *singlechar;
-#endif
-jump_list *newline = NULL;
-BOOL newlinecheck = FALSE;
-BOOL readuchar = FALSE;
-
-if (!(hascrorlf || firstline) && (common->nltype == NLTYPE_ANY ||
-    common->nltype == NLTYPE_ANYCRLF || common->newline > 255))
-  newlinecheck = TRUE;
-
-if (firstline)
-  {
-  /* Search for the end of the first line. */
-  SLJIT_ASSERT(common->first_line_end != 0);
-  OP1(SLJIT_MOV, TMP3, 0, STR_PTR, 0);
-
-  if (common->nltype == NLTYPE_FIXED && common->newline > 255)
-    {
-    mainloop = LABEL();
-    OP2(SLJIT_ADD, STR_PTR, 0, STR_PTR, 0, SLJIT_IMM, IN_UCHARS(1));
-    end = CMP(SLJIT_C_GREATER_EQUAL, STR_PTR, 0, STR_END, 0);
-    OP1(MOV_UCHAR, TMP1, 0, SLJIT_MEM1(STR_PTR), IN_UCHARS(-1));
-    OP1(MOV_UCHAR, TMP2, 0, SLJIT_MEM1(STR_PTR), IN_UCHARS(0));
-    CMPTO(SLJIT_C_NOT_EQUAL, TMP1, 0, SLJIT_IMM, (common->newline >> 8) & 0xff, mainloop);
-    CMPTO(SLJIT_C_NOT_EQUAL, TMP2, 0, SLJIT_IMM, common->newline & 0xff, mainloop);
-    JUMPHERE(end);
-    OP2(SLJIT_SUB, SLJIT_MEM1(SLJIT_LOCALS_REG), common->first_line_end, STR_PTR, 0, SLJIT_IMM, IN_UCHARS(1));
-    }
-  else
-    {
-    end = CMP(SLJIT_C_GREATER_EQUAL, STR_PTR, 0, STR_END, 0);
-    mainloop = LABEL();
-    /* Continual stores does not cause data dependency. */
-    OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_LOCALS_REG), common->first_line_end, STR_PTR, 0);
-    read_char_range(common, common->nlmin, common->nlmax, TRUE);
-    check_newlinechar(common, common->nltype, &newline, TRUE);
-    CMPTO(SLJIT_C_LESS, STR_PTR, 0, STR_END, 0, mainloop);
-    JUMPHERE(end);
-    OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_LOCALS_REG), common->first_line_end, STR_PTR, 0);
-    set_jumps(newline, LABEL());
-    }
-
-  OP1(SLJIT_MOV, STR_PTR, 0, TMP3, 0);
-  }
-
-start = JUMP(SLJIT_JUMP);
-
-if (newlinecheck)
-  {
-  newlinelabel = LABEL();
-  OP2(SLJIT_ADD, STR_PTR, 0, STR_PTR, 0, SLJIT_IMM, IN_UCHARS(1));
-  end = CMP(SLJIT_C_GREATER_EQUAL, STR_PTR, 0, STR_END, 0);
-  OP1(MOV_UCHAR, TMP1, 0, SLJIT_MEM1(STR_PTR), 0);
-  OP2(SLJIT_SUB | SLJIT_SET_E, SLJIT_UNUSED, 0, TMP1, 0, SLJIT_IMM, common->newline & 0xff);
-  OP_FLAGS(SLJIT_MOV, TMP1, 0, SLJIT_UNUSED, 0, SLJIT_C_EQUAL);
-#if defined COMPILE_PCRE16 || defined COMPILE_PCRE32
-  OP2(SLJIT_SHL, TMP1, 0, TMP1, 0, SLJIT_IMM, UCHAR_SHIFT);
-#endif
-  OP2(SLJIT_ADD, STR_PTR, 0, STR_PTR, 0, TMP1, 0);
-  nl = JUMP(SLJIT_JUMP);
-  }
-
-mainloop = LABEL();
-
-/* Increasing the STR_PTR here requires one less jump in the most common case. */
-#ifdef SUPPORT_UTF
-if (common->utf) readuchar = TRUE;
-#endif
-if (newlinecheck) readuchar = TRUE;
-
-if (readuchar)
-  OP1(MOV_UCHAR, TMP1, 0, SLJIT_MEM1(STR_PTR), 0);
-
-if (newlinecheck)
-  CMPTO(SLJIT_C_EQUAL, TMP1, 0, SLJIT_IMM, (common->newline >> 8) & 0xff, newlinelabel);
-
-OP2(SLJIT_ADD, STR_PTR, 0, STR_PTR, 0, SLJIT_IMM, IN_UCHARS(1));
-#if defined SUPPORT_UTF && !defined COMPILE_PCRE32
-#if defined COMPILE_PCRE8
-if (common->utf)
-  {
-  singlechar = CMP(SLJIT_C_LESS, TMP1, 0, SLJIT_IMM, 0xc0);
-  OP1(SLJIT_MOV_UB, TMP1, 0, SLJIT_MEM1(TMP1), (sljit_sw)PRIV(utf8_table4) - 0xc0);
-  OP2(SLJIT_ADD, STR_PTR, 0, STR_PTR, 0, TMP1, 0);
-  JUMPHERE(singlechar);
-  }
-#elif defined COMPILE_PCRE16
-if (common->utf)
-  {
-  singlechar = CMP(SLJIT_C_LESS, TMP1, 0, SLJIT_IMM, 0xd800);
-  OP2(SLJIT_AND, TMP1, 0, TMP1, 0, SLJIT_IMM, 0xfc00);
-  OP2(SLJIT_SUB | SLJIT_SET_E, SLJIT_UNUSED, 0, TMP1, 0, SLJIT_IMM, 0xd800);
-  OP_FLAGS(SLJIT_MOV, TMP1, 0, SLJIT_UNUSED, 0, SLJIT_C_EQUAL);
-  OP2(SLJIT_SHL, TMP1, 0, TMP1, 0, SLJIT_IMM, 1);
-  OP2(SLJIT_ADD, STR_PTR, 0, STR_PTR, 0, TMP1, 0);
-  JUMPHERE(singlechar);
-  }
-#endif /* COMPILE_PCRE[8|16] */
-#endif /* SUPPORT_UTF && !COMPILE_PCRE32 */
-JUMPHERE(start);
-
-if (newlinecheck)
-  {
-  JUMPHERE(end);
-  JUMPHERE(nl);
-  }
-
-return mainloop;
-}
-
-#define MAX_N_CHARS 16
-#define MAX_N_BYTES 8
-
-static SLJIT_INLINE void add_prefix_byte(pcre_uint8 byte, pcre_uint8 *bytes)
-{
-pcre_uint8 len = bytes[0];
-int i;
-
-if (len == 255)
-  return;
-
-if (len == 0)
-  {
-  bytes[0] = 1;
-  bytes[1] = byte;
-  return;
-  }
-
-for (i = len; i > 0; i--)
-  if (bytes[i] == byte)
-    return;
-
-if (len >= MAX_N_BYTES - 1)
-  {
-  bytes[0] = 255;
-  return;
-  }
-
-len++;
-bytes[len] = byte;
-bytes[0] = len;
-}
-
-static int scan_prefix(compiler_common *common, pcre_uchar *cc, pcre_uint32 *chars, pcre_uint8 *bytes, int max_chars)
-{
-/* Recursive function, which scans prefix literals. */
-BOOL last, any, caseless;
-int len, repeat, len_save, consumed = 0;
-pcre_uint32 chr, mask;
-pcre_uchar *alternative, *cc_save, *oc;
-#if defined SUPPORT_UTF && defined COMPILE_PCRE8
-pcre_uchar othercase[8];
-#elif defined SUPPORT_UTF && defined COMPILE_PCRE16
-pcre_uchar othercase[2];
-#else
-pcre_uchar othercase[1];
-#endif
-
-repeat = 1;
-while (TRUE)
-  {
-  last = TRUE;
-  any = FALSE;
-  caseless = FALSE;
-  switch (*cc)
-    {
-    case OP_CHARI:
-    caseless = TRUE;
-    case OP_CHAR:
-    last = FALSE;
-    cc++;
-    break;
-
-    case OP_SOD:
-    case OP_SOM:
-    case OP_SET_SOM:
-    case OP_NOT_WORD_BOUNDARY:
-    case OP_WORD_BOUNDARY:
-    case OP_EODN:
-    case OP_EOD:
-    case OP_CIRC:
-    case OP_CIRCM:
-    case OP_DOLL:
-    case OP_DOLLM:
-    /* Zero width assertions. */
-    cc++;
-    continue;
-
-    case OP_ASSERT:
-    case OP_ASSERT_NOT:
-    case OP_ASSERTBACK:
-    case OP_ASSERTBACK_NOT:
-    cc = bracketend(cc);
-    continue;
-
-    case OP_PLUSI:
-    case OP_MINPLUSI:
-    case OP_POSPLUSI:
-    caseless = TRUE;
-    case OP_PLUS:
-    case OP_MINPLUS:
-    case OP_POSPLUS:
-    cc++;
-    break;
-
-    case OP_EXACTI:
-    caseless = TRUE;
-    case OP_EXACT:
-    repeat = GET2(cc, 1);
-    last = FALSE;
-    cc += 1 + IMM2_SIZE;
-    break;
-
-    case OP_QUERYI:
-    case OP_MINQUERYI:
-    case OP_POSQUERYI:
-    caseless = TRUE;
-    case OP_QUERY:
-    case OP_MINQUERY:
-    case OP_POSQUERY:
-    len = 1;
-    cc++;
-#ifdef SUPPORT_UTF
-    if (common->utf && HAS_EXTRALEN(*cc)) len += GET_EXTRALEN(*cc);
-#endif
-    max_chars = scan_prefix(common, cc + len, chars, bytes, max_chars);
-    if (max_chars == 0)
-      return consumed;
-    last = FALSE;
-    break;
-
-    case OP_KET:
-    cc += 1 + LINK_SIZE;
-    continue;
-
-    case OP_ALT:
-    cc += GET(cc, 1);
-    continue;
-
-    case OP_ONCE:
-    case OP_ONCE_NC:
-    case OP_BRA:
-    case OP_BRAPOS:
-    case OP_CBRA:
-    case OP_CBRAPOS:
-    alternative = cc + GET(cc, 1);
-    while (*alternative == OP_ALT)
-      {
-      max_chars = scan_prefix(common, alternative + 1 + LINK_SIZE, chars, bytes, max_chars);
-      if (max_chars == 0)
-        return consumed;
-      alternative += GET(alternative, 1);
-      }
-
-    if (*cc == OP_CBRA || *cc == OP_CBRAPOS)
-      cc += IMM2_SIZE;
-    cc += 1 + LINK_SIZE;
-    continue;
-
-    case OP_CLASS:
-#if defined SUPPORT_UTF && defined COMPILE_PCRE8
-    if (common->utf && !is_char7_bitset((const pcre_uint8 *)(cc + 1), FALSE)) return consumed;
-#endif
-    any = TRUE;
-    cc += 1 + 32 / sizeof(pcre_uchar);
-    break;
-
-    case OP_NCLASS:
-#if defined SUPPORT_UTF && !defined COMPILE_PCRE32
-    if (common->utf) return consumed;
-#endif
-    any = TRUE;
-    cc += 1 + 32 / sizeof(pcre_uchar);
-    break;
-
-#if defined SUPPORT_UTF || !defined COMPILE_PCRE8
-    case OP_XCLASS:
-#if defined SUPPORT_UTF && !defined COMPILE_PCRE32
-    if (common->utf) return consumed;
-#endif
-    any = TRUE;
-    cc += GET(cc, 1);
-    break;
-#endif
-
-    case OP_DIGIT:
-#if defined SUPPORT_UTF && defined COMPILE_PCRE8
-    if (common->utf && !is_char7_bitset((const pcre_uint8 *)common->ctypes - cbit_length + cbit_digit, FALSE))
-      return consumed;
-#endif
-    any = TRUE;
-    cc++;
-    break;
-
-    case OP_WHITESPACE:
-#if defined SUPPORT_UTF && defined COMPILE_PCRE8
-    if (common->utf && !is_char7_bitset((const pcre_uint8 *)common->ctypes - cbit_length + cbit_space, FALSE))
-      return consumed;
-#endif
-    any = TRUE;
-    cc++;
-    break;
-
-    case OP_WORDCHAR:
-#if defined SUPPORT_UTF && defined COMPILE_PCRE8
-    if (common->utf && !is_char7_bitset((const pcre_uint8 *)common->ctypes - cbit_length + cbit_word, FALSE))
-      return consumed;
-#endif
-    any = TRUE;
-    cc++;
-    break;
-
-    case OP_NOT:
-    case OP_NOTI:
-    cc++;
-    /* Fall through. */
-    case OP_NOT_DIGIT:
-    case OP_NOT_WHITESPACE:
-    case OP_NOT_WORDCHAR:
-    case OP_ANY:
-    case OP_ALLANY:
-#if defined SUPPORT_UTF && !defined COMPILE_PCRE32
-    if (common->utf) return consumed;
-#endif
-    any = TRUE;
-    cc++;
-    break;
-
-#ifdef SUPPORT_UCP
-    case OP_NOTPROP:
-    case OP_PROP:
-#if defined SUPPORT_UTF && !defined COMPILE_PCRE32
-    if (common->utf) return consumed;
-#endif
-    any = TRUE;
-    cc += 1 + 2;
-    break;
-#endif
-
-    case OP_TYPEEXACT:
-    repeat = GET2(cc, 1);
-    cc += 1 + IMM2_SIZE;
-    continue;
-
-    case OP_NOTEXACT:
-    case OP_NOTEXACTI:
-#if defined SUPPORT_UTF && !defined COMPILE_PCRE32
-    if (common->utf) return consumed;
-#endif
-    any = TRUE;
-    repeat = GET2(cc, 1);
-    cc += 1 + IMM2_SIZE + 1;
-    break;
-
-    default:
-    return consumed;
-    }
-
-  if (any)
-    {
-#if defined COMPILE_PCRE8
-    mask = 0xff;
-#elif defined COMPILE_PCRE16
-    mask = 0xffff;
-#elif defined COMPILE_PCRE32
-    mask = 0xffffffff;
-#else
-    SLJIT_ASSERT_STOP();
-#endif
-
-    do
-      {
-      chars[0] = mask;
-      chars[1] = mask;
-      bytes[0] = 255;
-
-      consumed++;
-      if (--max_chars == 0)
-        return consumed;
-      chars += 2;
-      bytes += MAX_N_BYTES;
-      }
-    while (--repeat > 0);
-
-    repeat = 1;
-    continue;
-    }
-
-  len = 1;
-#ifdef SUPPORT_UTF
-  if (common->utf && HAS_EXTRALEN(*cc)) len += GET_EXTRALEN(*cc);
-#endif
-
-  if (caseless && char_has_othercase(common, cc))
-    {
-#ifdef SUPPORT_UTF
-    if (common->utf)
-      {
-      GETCHAR(chr, cc);
-      if ((int)PRIV(ord2utf)(char_othercase(common, chr), othercase) != len)
-        return consumed;
-      }
-    else
-#endif
-      {
-      chr = *cc;
-      othercase[0] = TABLE_GET(chr, common->fcc, chr);
-      }
-    }
-  else
-    caseless = FALSE;
-
-  len_save = len;
-  cc_save = cc;
-  while (TRUE)
-    {
-    oc = othercase;
-    do
-      {
-      chr = *cc;
-#ifdef COMPILE_PCRE32
-      if (SLJIT_UNLIKELY(chr == NOTACHAR))
-        return consumed;
-#endif
-      add_prefix_byte((pcre_uint8)chr, bytes);
-
-      mask = 0;
-      if (caseless)
-        {
-        add_prefix_byte((pcre_uint8)*oc, bytes);
-        mask = *cc ^ *oc;
-        chr |= mask;
-        }
-
-#ifdef COMPILE_PCRE32
-      if (chars[0] == NOTACHAR && chars[1] == 0)
-#else
-      if (chars[0] == NOTACHAR)
-#endif
-        {
-        chars[0] = chr;
-        chars[1] = mask;
-        }
-      else
-        {
-        mask |= chars[0] ^ chr;
-        chr |= mask;
-        chars[0] = chr;
-        chars[1] |= mask;
-        }
-
-      len--;
-      consumed++;
-      if (--max_chars == 0)
-        return consumed;
-      chars += 2;
-      bytes += MAX_N_BYTES;
-      cc++;
-      oc++;
-      }
-    while (len > 0);
-
-    if (--repeat == 0)
-      break;
-
-    len = len_save;
-    cc = cc_save;
-    }
-
-  repeat = 1;
-  if (last)
-    return consumed;
-  }
-}
-
-static SLJIT_INLINE BOOL fast_forward_first_n_chars(compiler_common *common, BOOL firstline)
-{
-DEFINE_COMPILER;
-struct sljit_label *start;
-struct sljit_jump *quit;
-pcre_uint32 chars[MAX_N_CHARS * 2];
-pcre_uint8 bytes[MAX_N_CHARS * MAX_N_BYTES];
-pcre_uint8 ones[MAX_N_CHARS];
-int offsets[3];
-pcre_uint32 mask;
-pcre_uint8 *byte_set, *byte_set_end;
-int i, max, from;
-int range_right = -1, range_len = 3 - 1;
-sljit_ub *update_table = NULL;
-BOOL in_range;
-
-/* This is even TRUE, if both are NULL. */
-SLJIT_ASSERT(common->read_only_data_ptr == common->read_only_data);
-
-for (i = 0; i < MAX_N_CHARS; i++)
-  {
-  chars[i << 1] = NOTACHAR;
-  chars[(i << 1) + 1] = 0;
-  bytes[i * MAX_N_BYTES] = 0;
-  }
-
-max = scan_prefix(common, common->start, chars, bytes, MAX_N_CHARS);
-
-if (max <= 1)
-  return FALSE;
-
-for (i = 0; i < max; i++)
-  {
-  mask = chars[(i << 1) + 1];
-  ones[i] = ones_in_half_byte[mask & 0xf];
-  mask >>= 4;
-  while (mask != 0)
-    {
-    ones[i] += ones_in_half_byte[mask & 0xf];
-    mask >>= 4;
-    }
-  }
-
-in_range = FALSE;
-from = 0;   /* Prevent compiler "uninitialized" warning */
-for (i = 0; i <= max; i++)
-  {
-  if (in_range && (i - from) > range_len && (bytes[(i - 1) * MAX_N_BYTES] <= 4))
-    {
-    range_len = i - from;
-    range_right = i - 1;
-    }
-
-  if (i < max && bytes[i * MAX_N_BYTES] < 255)
-    {
-    if (!in_range)
-      {
-      in_range = TRUE;
-      from = i;
-      }
-    }
-  else if (in_range)
-    in_range = FALSE;
-  }
-
-if (range_right >= 0)
-  {
-  /* Since no data is consumed (see the assert in the beginning
-  of this function), this space can be reallocated. */
-  if (common->read_only_data)
-    SLJIT_FREE(common->read_only_data);
-
-  common->read_only_data_size += 256;
-  common->read_only_data = (sljit_uw *)SLJIT_MALLOC(common->read_only_data_size);
-  if (common->read_only_data == NULL)
-    return TRUE;
-
-  update_table = (sljit_ub *)common->read_only_data;
-  common->read_only_data_ptr = (sljit_uw *)(update_table + 256);
-  memset(update_table, IN_UCHARS(range_len), 256);
-
-  for (i = 0; i < range_len; i++)
-    {
-    byte_set = bytes + ((range_right - i) * MAX_N_BYTES);
-    SLJIT_ASSERT(byte_set[0] > 0 && byte_set[0] < 255);
-    byte_set_end = byte_set + byte_set[0];
-    byte_set++;
-    while (byte_set <= byte_set_end)
-      {
-      if (update_table[*byte_set] > IN_UCHARS(i))
-        update_table[*byte_set] = IN_UCHARS(i);
-      byte_set++;
-      }
-    }
-  }
-
-offsets[0] = -1;
-/* Scan forward. */
-for (i = 0; i < max; i++)
-  if (ones[i] <= 2) {
-    offsets[0] = i;
-    break;
-  }
-
-if (offsets[0] < 0 && range_right < 0)
-  return FALSE;
-
-if (offsets[0] >= 0)
-  {
-  /* Scan backward. */
-  offsets[1] = -1;
-  for (i = max - 1; i > offsets[0]; i--)
-    if (ones[i] <= 2 && i != range_right)
-      {
-      offsets[1] = i;
-      break;
-      }
-
-  /* This case is handled better by fast_forward_first_char. */
-  if (offsets[1] == -1 && offsets[0] == 0 && range_right < 0)
-    return FALSE;
-
-  offsets[2] = -1;
-  /* We only search for a middle character if there is no range check. */
-  if (offsets[1] >= 0 && range_right == -1)
-    {
-    /* Scan from middle. */
-    for (i = (offsets[0] + offsets[1]) / 2 + 1; i < offsets[1]; i++)
-      if (ones[i] <= 2)
-        {
-        offsets[2] = i;
-        break;
-        }
-
-    if (offsets[2] == -1)
-      {
-      for (i = (offsets[0] + offsets[1]) / 2; i > offsets[0]; i--)
-        if (ones[i] <= 2)
-          {
-          offsets[2] = i;
-          break;
-          }
-      }
-    }
-
-  SLJIT_ASSERT(offsets[1] == -1 || (offsets[0] < offsets[1]));
-  SLJIT_ASSERT(offsets[2] == -1 || (offsets[0] < offsets[2] && offsets[1] > offsets[2]));
-
-  chars[0] = chars[offsets[0] << 1];
-  chars[1] = chars[(offsets[0] << 1) + 1];
-  if (offsets[2] >= 0)
-    {
-    chars[2] = chars[offsets[2] << 1];
-    chars[3] = chars[(offsets[2] << 1) + 1];
-    }
-  if (offsets[1] >= 0)
-    {
-    chars[4] = chars[offsets[1] << 1];
-    chars[5] = chars[(offsets[1] << 1) + 1];
-    }
-  }
-
-max -= 1;
-if (firstline)
-  {
-  SLJIT_ASSERT(common->first_line_end != 0);
-  OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), common->first_line_end);
-  OP1(SLJIT_MOV, TMP3, 0, STR_END, 0);
-  OP2(SLJIT_SUB, STR_END, 0, STR_END, 0, SLJIT_IMM, IN_UCHARS(max));
-  quit = CMP(SLJIT_C_LESS_EQUAL, STR_END, 0, TMP1, 0);
-  OP1(SLJIT_MOV, STR_END, 0, TMP1, 0);
-  JUMPHERE(quit);
-  }
-else
-  OP2(SLJIT_SUB, STR_END, 0, STR_END, 0, SLJIT_IMM, IN_UCHARS(max));
-
-#if !(defined SLJIT_CONFIG_X86_32 && SLJIT_CONFIG_X86_32)
-if (range_right >= 0)
-  OP1(SLJIT_MOV, RETURN_ADDR, 0, SLJIT_IMM, (sljit_sw)update_table);
-#endif
-
-start = LABEL();
-quit = CMP(SLJIT_C_GREATER_EQUAL, STR_PTR, 0, STR_END, 0);
-
-SLJIT_ASSERT(range_right >= 0 || offsets[0] >= 0);
-
-if (range_right >= 0)
-  {
-#if defined COMPILE_PCRE8 || (defined SLJIT_LITTLE_ENDIAN && SLJIT_LITTLE_ENDIAN)
-  OP1(SLJIT_MOV_UB, TMP1, 0, SLJIT_MEM1(STR_PTR), IN_UCHARS(range_right));
-#else
-  OP1(SLJIT_MOV_UB, TMP1, 0, SLJIT_MEM1(STR_PTR), IN_UCHARS(range_right + 1) - 1);
-#endif
-
-#if !(defined SLJIT_CONFIG_X86_32 && SLJIT_CONFIG_X86_32)
-  OP1(SLJIT_MOV_UB, TMP1, 0, SLJIT_MEM2(RETURN_ADDR, TMP1), 0);
-#else
-  OP1(SLJIT_MOV_UB, TMP1, 0, SLJIT_MEM1(TMP1), (sljit_sw)update_table);
-#endif
-  OP2(SLJIT_ADD, STR_PTR, 0, STR_PTR, 0, TMP1, 0);
-  CMPTO(SLJIT_C_NOT_EQUAL, TMP1, 0, SLJIT_IMM, 0, start);
-  }
-
-if (offsets[0] >= 0)
-  {
-  OP1(MOV_UCHAR, TMP1, 0, SLJIT_MEM1(STR_PTR), IN_UCHARS(offsets[0]));
-  if (offsets[1] >= 0)
-    OP1(MOV_UCHAR, TMP2, 0, SLJIT_MEM1(STR_PTR), IN_UCHARS(offsets[1]));
-  OP2(SLJIT_ADD, STR_PTR, 0, STR_PTR, 0, SLJIT_IMM, IN_UCHARS(1));
-
-  if (chars[1] != 0)
-    OP2(SLJIT_OR, TMP1, 0, TMP1, 0, SLJIT_IMM, chars[1]);
-  CMPTO(SLJIT_C_NOT_EQUAL, TMP1, 0, SLJIT_IMM, chars[0], start);
-  if (offsets[2] >= 0)
-    OP1(MOV_UCHAR, TMP1, 0, SLJIT_MEM1(STR_PTR), IN_UCHARS(offsets[2] - 1));
-
-  if (offsets[1] >= 0)
-    {
-    if (chars[5] != 0)
-      OP2(SLJIT_OR, TMP2, 0, TMP2, 0, SLJIT_IMM, chars[5]);
-    CMPTO(SLJIT_C_NOT_EQUAL, TMP2, 0, SLJIT_IMM, chars[4], start);
-    }
-
-  if (offsets[2] >= 0)
-    {
-    if (chars[3] != 0)
-      OP2(SLJIT_OR, TMP1, 0, TMP1, 0, SLJIT_IMM, chars[3]);
-    CMPTO(SLJIT_C_NOT_EQUAL, TMP1, 0, SLJIT_IMM, chars[2], start);
-    }
-  OP2(SLJIT_SUB, STR_PTR, 0, STR_PTR, 0, SLJIT_IMM, IN_UCHARS(1));
-  }
-
-JUMPHERE(quit);
-
-if (firstline)
-  {
-  if (range_right >= 0)
-    OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), common->first_line_end);
-  OP1(SLJIT_MOV, STR_END, 0, TMP3, 0);
-  if (range_right >= 0)
-    {
-    quit = CMP(SLJIT_C_LESS_EQUAL, STR_PTR, 0, TMP1, 0);
-    OP1(SLJIT_MOV, STR_PTR, 0, TMP1, 0);
-    JUMPHERE(quit);
-    }
-  }
-else
-  OP2(SLJIT_ADD, STR_END, 0, STR_END, 0, SLJIT_IMM, IN_UCHARS(max));
-return TRUE;
-}
-
-#undef MAX_N_CHARS
-#undef MAX_N_BYTES
-
-static SLJIT_INLINE void fast_forward_first_char(compiler_common *common, pcre_uchar first_char, BOOL caseless, BOOL firstline)
-{
-DEFINE_COMPILER;
-struct sljit_label *start;
-struct sljit_jump *quit;
-struct sljit_jump *found;
-pcre_uchar oc, bit;
-
-if (firstline)
-  {
-  SLJIT_ASSERT(common->first_line_end != 0);
-  OP1(SLJIT_MOV, TMP3, 0, STR_END, 0);
-  OP1(SLJIT_MOV, STR_END, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), common->first_line_end);
-  }
-
-start = LABEL();
-quit = CMP(SLJIT_C_GREATER_EQUAL, STR_PTR, 0, STR_END, 0);
-OP1(MOV_UCHAR, TMP1, 0, SLJIT_MEM1(STR_PTR), 0);
-
-oc = first_char;
-if (caseless)
-  {
-  oc = TABLE_GET(first_char, common->fcc, first_char);
-#if defined SUPPORT_UCP && !(defined COMPILE_PCRE8)
-  if (first_char > 127 && common->utf)
-    oc = UCD_OTHERCASE(first_char);
-#endif
-  }
-if (first_char == oc)
-  found = CMP(SLJIT_C_EQUAL, TMP1, 0, SLJIT_IMM, first_char);
-else
-  {
-  bit = first_char ^ oc;
-  if (is_powerof2(bit))
-    {
-    OP2(SLJIT_OR, TMP2, 0, TMP1, 0, SLJIT_IMM, bit);
-    found = CMP(SLJIT_C_EQUAL, TMP2, 0, SLJIT_IMM, first_char | bit);
-    }
-  else
-    {
-    OP2(SLJIT_SUB | SLJIT_SET_E, SLJIT_UNUSED, 0, TMP1, 0, SLJIT_IMM, first_char);
-    OP_FLAGS(SLJIT_MOV, TMP2, 0, SLJIT_UNUSED, 0, SLJIT_C_EQUAL);
-    OP2(SLJIT_SUB | SLJIT_SET_E, SLJIT_UNUSED, 0, TMP1, 0, SLJIT_IMM, oc);
-    OP_FLAGS(SLJIT_OR | SLJIT_SET_E, TMP2, 0, TMP2, 0, SLJIT_C_EQUAL);
-    found = JUMP(SLJIT_C_NOT_ZERO);
-    }
-  }
-
-OP2(SLJIT_ADD, STR_PTR, 0, STR_PTR, 0, SLJIT_IMM, IN_UCHARS(1));
-JUMPTO(SLJIT_JUMP, start);
-JUMPHERE(found);
-JUMPHERE(quit);
-
-if (firstline)
-  OP1(SLJIT_MOV, STR_END, 0, TMP3, 0);
-}
-
-static SLJIT_INLINE void fast_forward_newline(compiler_common *common, BOOL firstline)
-{
-DEFINE_COMPILER;
-struct sljit_label *loop;
-struct sljit_jump *lastchar;
-struct sljit_jump *firstchar;
-struct sljit_jump *quit;
-struct sljit_jump *foundcr = NULL;
-struct sljit_jump *notfoundnl;
-jump_list *newline = NULL;
-
-if (firstline)
-  {
-  SLJIT_ASSERT(common->first_line_end != 0);
-  OP1(SLJIT_MOV, TMP3, 0, STR_END, 0);
-  OP1(SLJIT_MOV, STR_END, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), common->first_line_end);
-  }
-
-if (common->nltype == NLTYPE_FIXED && common->newline > 255)
-  {
-  lastchar = CMP(SLJIT_C_GREATER_EQUAL, STR_PTR, 0, STR_END, 0);
-  OP1(SLJIT_MOV, TMP1, 0, ARGUMENTS, 0);
-  OP1(SLJIT_MOV, TMP2, 0, SLJIT_MEM1(TMP1), SLJIT_OFFSETOF(jit_arguments, str));
-  OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(TMP1), SLJIT_OFFSETOF(jit_arguments, begin));
-  firstchar = CMP(SLJIT_C_LESS_EQUAL, STR_PTR, 0, TMP2, 0);
-
-  OP2(SLJIT_ADD, TMP1, 0, TMP1, 0, SLJIT_IMM, IN_UCHARS(2));
-  OP2(SLJIT_SUB | SLJIT_SET_U, SLJIT_UNUSED, 0, STR_PTR, 0, TMP1, 0);
-  OP_FLAGS(SLJIT_MOV, TMP2, 0, SLJIT_UNUSED, 0, SLJIT_C_GREATER_EQUAL);
-#if defined COMPILE_PCRE16 || defined COMPILE_PCRE32
-  OP2(SLJIT_SHL, TMP2, 0, TMP2, 0, SLJIT_IMM, UCHAR_SHIFT);
-#endif
-  OP2(SLJIT_SUB, STR_PTR, 0, STR_PTR, 0, TMP2, 0);
-
-  loop = LABEL();
-  OP2(SLJIT_ADD, STR_PTR, 0, STR_PTR, 0, SLJIT_IMM, IN_UCHARS(1));
-  quit = CMP(SLJIT_C_GREATER_EQUAL, STR_PTR, 0, STR_END, 0);
-  OP1(MOV_UCHAR, TMP1, 0, SLJIT_MEM1(STR_PTR), IN_UCHARS(-2));
-  OP1(MOV_UCHAR, TMP2, 0, SLJIT_MEM1(STR_PTR), IN_UCHARS(-1));
-  CMPTO(SLJIT_C_NOT_EQUAL, TMP1, 0, SLJIT_IMM, (common->newline >> 8) & 0xff, loop);
-  CMPTO(SLJIT_C_NOT_EQUAL, TMP2, 0, SLJIT_IMM, common->newline & 0xff, loop);
-
-  JUMPHERE(quit);
-  JUMPHERE(firstchar);
-  JUMPHERE(lastchar);
-
-  if (firstline)
-    OP1(SLJIT_MOV, STR_END, 0, TMP3, 0);
-  return;
-  }
-
-OP1(SLJIT_MOV, TMP1, 0, ARGUMENTS, 0);
-OP1(SLJIT_MOV, TMP2, 0, SLJIT_MEM1(TMP1), SLJIT_OFFSETOF(jit_arguments, str));
-firstchar = CMP(SLJIT_C_LESS_EQUAL, STR_PTR, 0, TMP2, 0);
-skip_char_back(common);
-
-loop = LABEL();
-common->ff_newline_shortcut = loop;
-
-read_char_range(common, common->nlmin, common->nlmax, TRUE);
-lastchar = CMP(SLJIT_C_GREATER_EQUAL, STR_PTR, 0, STR_END, 0);
-if (common->nltype == NLTYPE_ANY || common->nltype == NLTYPE_ANYCRLF)
-  foundcr = CMP(SLJIT_C_EQUAL, TMP1, 0, SLJIT_IMM, CHAR_CR);
-check_newlinechar(common, common->nltype, &newline, FALSE);
-set_jumps(newline, loop);
-
-if (common->nltype == NLTYPE_ANY || common->nltype == NLTYPE_ANYCRLF)
-  {
-  quit = JUMP(SLJIT_JUMP);
-  JUMPHERE(foundcr);
-  notfoundnl = CMP(SLJIT_C_GREATER_EQUAL, STR_PTR, 0, STR_END, 0);
-  OP1(MOV_UCHAR, TMP1, 0, SLJIT_MEM1(STR_PTR), 0);
-  OP2(SLJIT_SUB | SLJIT_SET_E, SLJIT_UNUSED, 0, TMP1, 0, SLJIT_IMM, CHAR_NL);
-  OP_FLAGS(SLJIT_MOV, TMP1, 0, SLJIT_UNUSED, 0, SLJIT_C_EQUAL);
-#if defined COMPILE_PCRE16 || defined COMPILE_PCRE32
-  OP2(SLJIT_SHL, TMP1, 0, TMP1, 0, SLJIT_IMM, UCHAR_SHIFT);
-#endif
-  OP2(SLJIT_ADD, STR_PTR, 0, STR_PTR, 0, TMP1, 0);
-  JUMPHERE(notfoundnl);
-  JUMPHERE(quit);
-  }
-JUMPHERE(lastchar);
-JUMPHERE(firstchar);
-
-if (firstline)
-  OP1(SLJIT_MOV, STR_END, 0, TMP3, 0);
-}
-
-static BOOL check_class_ranges(compiler_common *common, const pcre_uint8 *bits, BOOL nclass, BOOL invert, jump_list **backtracks);
-
-static SLJIT_INLINE void fast_forward_start_bits(compiler_common *common, pcre_uint8 *start_bits, BOOL firstline)
-{
-DEFINE_COMPILER;
-struct sljit_label *start;
-struct sljit_jump *quit;
-struct sljit_jump *found = NULL;
-jump_list *matches = NULL;
-#ifndef COMPILE_PCRE8
-struct sljit_jump *jump;
-#endif
-
-if (firstline)
-  {
-  SLJIT_ASSERT(common->first_line_end != 0);
-  OP1(SLJIT_MOV, RETURN_ADDR, 0, STR_END, 0);
-  OP1(SLJIT_MOV, STR_END, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), common->first_line_end);
-  }
-
-start = LABEL();
-quit = CMP(SLJIT_C_GREATER_EQUAL, STR_PTR, 0, STR_END, 0);
-OP1(MOV_UCHAR, TMP1, 0, SLJIT_MEM1(STR_PTR), 0);
-#ifdef SUPPORT_UTF
-if (common->utf)
-  OP1(SLJIT_MOV, TMP3, 0, TMP1, 0);
-#endif
-
-if (!check_class_ranges(common, start_bits, (start_bits[31] & 0x80) != 0, TRUE, &matches))
-  {
-#ifndef COMPILE_PCRE8
-  jump = CMP(SLJIT_C_LESS, TMP1, 0, SLJIT_IMM, 255);
-  OP1(SLJIT_MOV, TMP1, 0, SLJIT_IMM, 255);
-  JUMPHERE(jump);
-#endif
-  OP2(SLJIT_AND, TMP2, 0, TMP1, 0, SLJIT_IMM, 0x7);
-  OP2(SLJIT_LSHR, TMP1, 0, TMP1, 0, SLJIT_IMM, 3);
-  OP1(SLJIT_MOV_UB, TMP1, 0, SLJIT_MEM1(TMP1), (sljit_sw)start_bits);
-  OP2(SLJIT_SHL, TMP2, 0, SLJIT_IMM, 1, TMP2, 0);
-  OP2(SLJIT_AND | SLJIT_SET_E, SLJIT_UNUSED, 0, TMP1, 0, TMP2, 0);
-  found = JUMP(SLJIT_C_NOT_ZERO);
-  }
-
-#ifdef SUPPORT_UTF
-if (common->utf)
-  OP1(SLJIT_MOV, TMP1, 0, TMP3, 0);
-#endif
-OP2(SLJIT_ADD, STR_PTR, 0, STR_PTR, 0, SLJIT_IMM, IN_UCHARS(1));
-#ifdef SUPPORT_UTF
-#if defined COMPILE_PCRE8
-if (common->utf)
-  {
-  CMPTO(SLJIT_C_LESS, TMP1, 0, SLJIT_IMM, 0xc0, start);
-  OP1(SLJIT_MOV_UB, TMP1, 0, SLJIT_MEM1(TMP1), (sljit_sw)PRIV(utf8_table4) - 0xc0);
-  OP2(SLJIT_ADD, STR_PTR, 0, STR_PTR, 0, TMP1, 0);
-  }
-#elif defined COMPILE_PCRE16
-if (common->utf)
-  {
-  CMPTO(SLJIT_C_LESS, TMP1, 0, SLJIT_IMM, 0xd800, start);
-  OP2(SLJIT_AND, TMP1, 0, TMP1, 0, SLJIT_IMM, 0xfc00);
-  OP2(SLJIT_SUB | SLJIT_SET_E, SLJIT_UNUSED, 0, TMP1, 0, SLJIT_IMM, 0xd800);
-  OP_FLAGS(SLJIT_MOV, TMP1, 0, SLJIT_UNUSED, 0, SLJIT_C_EQUAL);
-  OP2(SLJIT_SHL, TMP1, 0, TMP1, 0, SLJIT_IMM, 1);
-  OP2(SLJIT_ADD, STR_PTR, 0, STR_PTR, 0, TMP1, 0);
-  }
-#endif /* COMPILE_PCRE[8|16] */
-#endif /* SUPPORT_UTF */
-JUMPTO(SLJIT_JUMP, start);
-if (found != NULL)
-  JUMPHERE(found);
-if (matches != NULL)
-  set_jumps(matches, LABEL());
-JUMPHERE(quit);
-
-if (firstline)
-  OP1(SLJIT_MOV, STR_END, 0, RETURN_ADDR, 0);
-}
-
-static SLJIT_INLINE struct sljit_jump *search_requested_char(compiler_common *common, pcre_uchar req_char, BOOL caseless, BOOL has_firstchar)
-{
-DEFINE_COMPILER;
-struct sljit_label *loop;
-struct sljit_jump *toolong;
-struct sljit_jump *alreadyfound;
-struct sljit_jump *found;
-struct sljit_jump *foundoc = NULL;
-struct sljit_jump *notfound;
-pcre_uint32 oc, bit;
-
-SLJIT_ASSERT(common->req_char_ptr != 0);
-OP1(SLJIT_MOV, TMP2, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), common->req_char_ptr);
-OP2(SLJIT_ADD, TMP1, 0, STR_PTR, 0, SLJIT_IMM, REQ_BYTE_MAX);
-toolong = CMP(SLJIT_C_LESS, TMP1, 0, STR_END, 0);
-alreadyfound = CMP(SLJIT_C_LESS, STR_PTR, 0, TMP2, 0);
-
-if (has_firstchar)
-  OP2(SLJIT_ADD, TMP1, 0, STR_PTR, 0, SLJIT_IMM, IN_UCHARS(1));
-else
-  OP1(SLJIT_MOV, TMP1, 0, STR_PTR, 0);
-
-loop = LABEL();
-notfound = CMP(SLJIT_C_GREATER_EQUAL, TMP1, 0, STR_END, 0);
-
-OP1(MOV_UCHAR, TMP2, 0, SLJIT_MEM1(TMP1), 0);
-oc = req_char;
-if (caseless)
-  {
-  oc = TABLE_GET(req_char, common->fcc, req_char);
-#if defined SUPPORT_UCP && !(defined COMPILE_PCRE8)
-  if (req_char > 127 && common->utf)
-    oc = UCD_OTHERCASE(req_char);
-#endif
-  }
-if (req_char == oc)
-  found = CMP(SLJIT_C_EQUAL, TMP2, 0, SLJIT_IMM, req_char);
-else
-  {
-  bit = req_char ^ oc;
-  if (is_powerof2(bit))
-    {
-    OP2(SLJIT_OR, TMP2, 0, TMP2, 0, SLJIT_IMM, bit);
-    found = CMP(SLJIT_C_EQUAL, TMP2, 0, SLJIT_IMM, req_char | bit);
-    }
-  else
-    {
-    found = CMP(SLJIT_C_EQUAL, TMP2, 0, SLJIT_IMM, req_char);
-    foundoc = CMP(SLJIT_C_EQUAL, TMP2, 0, SLJIT_IMM, oc);
-    }
-  }
-OP2(SLJIT_ADD, TMP1, 0, TMP1, 0, SLJIT_IMM, IN_UCHARS(1));
-JUMPTO(SLJIT_JUMP, loop);
-
-JUMPHERE(found);
-if (foundoc)
-  JUMPHERE(foundoc);
-OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_LOCALS_REG), common->req_char_ptr, TMP1, 0);
-JUMPHERE(alreadyfound);
-JUMPHERE(toolong);
-return notfound;
-}
-
-static void do_revertframes(compiler_common *common)
-{
-DEFINE_COMPILER;
-struct sljit_jump *jump;
-struct sljit_label *mainloop;
-
-sljit_emit_fast_enter(compiler, RETURN_ADDR, 0);
-OP1(SLJIT_MOV, TMP1, 0, STACK_TOP, 0);
-GET_LOCAL_BASE(TMP3, 0, 0);
-
-/* Drop frames until we reach STACK_TOP. */
-mainloop = LABEL();
-OP1(SLJIT_MOV, TMP2, 0, SLJIT_MEM1(TMP1), 0);
-OP2(SLJIT_SUB | SLJIT_SET_S, SLJIT_UNUSED, 0, TMP2, 0, SLJIT_IMM, 0);
-jump = JUMP(SLJIT_C_SIG_LESS_EQUAL);
-
-OP2(SLJIT_ADD, TMP2, 0, TMP2, 0, TMP3, 0);
-OP1(SLJIT_MOV, SLJIT_MEM1(TMP2), 0, SLJIT_MEM1(TMP1), sizeof(sljit_sw));
-OP1(SLJIT_MOV, SLJIT_MEM1(TMP2), sizeof(sljit_sw), SLJIT_MEM1(TMP1), 2 * sizeof(sljit_sw));
-OP2(SLJIT_ADD, TMP1, 0, TMP1, 0, SLJIT_IMM, 3 * sizeof(sljit_sw));
-JUMPTO(SLJIT_JUMP, mainloop);
-
-JUMPHERE(jump);
-jump = JUMP(SLJIT_C_SIG_LESS);
-/* End of dropping frames. */
-sljit_emit_fast_return(compiler, RETURN_ADDR, 0);
-
-JUMPHERE(jump);
-OP1(SLJIT_NEG, TMP2, 0, TMP2, 0);
-OP2(SLJIT_ADD, TMP2, 0, TMP2, 0, TMP3, 0);
-OP1(SLJIT_MOV, SLJIT_MEM1(TMP2), 0, SLJIT_MEM1(TMP1), sizeof(sljit_sw));
-OP2(SLJIT_ADD, TMP1, 0, TMP1, 0, SLJIT_IMM, 2 * sizeof(sljit_sw));
-JUMPTO(SLJIT_JUMP, mainloop);
-}
-
-static void check_wordboundary(compiler_common *common)
-{
-DEFINE_COMPILER;
-struct sljit_jump *skipread;
-jump_list *skipread_list = NULL;
-#if !(defined COMPILE_PCRE8) || defined SUPPORT_UTF
-struct sljit_jump *jump;
-#endif
-
-SLJIT_COMPILE_ASSERT(ctype_word == 0x10, ctype_word_must_be_16);
-
-sljit_emit_fast_enter(compiler, SLJIT_MEM1(SLJIT_LOCALS_REG), LOCALS0);
-/* Get type of the previous char, and put it to LOCALS1. */
-OP1(SLJIT_MOV, TMP1, 0, ARGUMENTS, 0);
-OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(TMP1), SLJIT_OFFSETOF(jit_arguments, begin));
-OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_LOCALS_REG), LOCALS1, SLJIT_IMM, 0);
-skipread = CMP(SLJIT_C_LESS_EQUAL, STR_PTR, 0, TMP1, 0);
-skip_char_back(common);
-check_start_used_ptr(common);
-read_char(common);
-
-/* Testing char type. */
-#ifdef SUPPORT_UCP
-if (common->use_ucp)
-  {
-  OP1(SLJIT_MOV, TMP2, 0, SLJIT_IMM, 1);
-  jump = CMP(SLJIT_C_EQUAL, TMP1, 0, SLJIT_IMM, CHAR_UNDERSCORE);
-  add_jump(compiler, &common->getucd, JUMP(SLJIT_FAST_CALL));
-  OP2(SLJIT_SUB, TMP1, 0, TMP1, 0, SLJIT_IMM, ucp_Ll);
-  OP2(SLJIT_SUB | SLJIT_SET_U, SLJIT_UNUSED, 0, TMP1, 0, SLJIT_IMM, ucp_Lu - ucp_Ll);
-  OP_FLAGS(SLJIT_MOV, TMP2, 0, SLJIT_UNUSED, 0, SLJIT_C_LESS_EQUAL);
-  OP2(SLJIT_SUB, TMP1, 0, TMP1, 0, SLJIT_IMM, ucp_Nd - ucp_Ll);
-  OP2(SLJIT_SUB | SLJIT_SET_U, SLJIT_UNUSED, 0, TMP1, 0, SLJIT_IMM, ucp_No - ucp_Nd);
-  OP_FLAGS(SLJIT_OR, TMP2, 0, TMP2, 0, SLJIT_C_LESS_EQUAL);
-  JUMPHERE(jump);
-  OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_LOCALS_REG), LOCALS1, TMP2, 0);
-  }
-else
-#endif
-  {
-#ifndef COMPILE_PCRE8
-  jump = CMP(SLJIT_C_GREATER, TMP1, 0, SLJIT_IMM, 255);
-#elif defined SUPPORT_UTF
-  /* Here LOCALS1 has already been zeroed. */
-  jump = NULL;
-  if (common->utf)
-    jump = CMP(SLJIT_C_GREATER, TMP1, 0, SLJIT_IMM, 255);
-#endif /* COMPILE_PCRE8 */
-  OP1(SLJIT_MOV_UB, TMP1, 0, SLJIT_MEM1(TMP1), common->ctypes);
-  OP2(SLJIT_LSHR, TMP1, 0, TMP1, 0, SLJIT_IMM, 4 /* ctype_word */);
-  OP2(SLJIT_AND, TMP1, 0, TMP1, 0, SLJIT_IMM, 1);
-  OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_LOCALS_REG), LOCALS1, TMP1, 0);
-#ifndef COMPILE_PCRE8
-  JUMPHERE(jump);
-#elif defined SUPPORT_UTF
-  if (jump != NULL)
-    JUMPHERE(jump);
-#endif /* COMPILE_PCRE8 */
-  }
-JUMPHERE(skipread);
-
-OP1(SLJIT_MOV, TMP2, 0, SLJIT_IMM, 0);
-check_str_end(common, &skipread_list);
-peek_char(common, READ_CHAR_MAX);
-
-/* Testing char type. This is a code duplication. */
-#ifdef SUPPORT_UCP
-if (common->use_ucp)
-  {
-  OP1(SLJIT_MOV, TMP2, 0, SLJIT_IMM, 1);
-  jump = CMP(SLJIT_C_EQUAL, TMP1, 0, SLJIT_IMM, CHAR_UNDERSCORE);
-  add_jump(compiler, &common->getucd, JUMP(SLJIT_FAST_CALL));
-  OP2(SLJIT_SUB, TMP1, 0, TMP1, 0, SLJIT_IMM, ucp_Ll);
-  OP2(SLJIT_SUB | SLJIT_SET_U, SLJIT_UNUSED, 0, TMP1, 0, SLJIT_IMM, ucp_Lu - ucp_Ll);
-  OP_FLAGS(SLJIT_MOV, TMP2, 0, SLJIT_UNUSED, 0, SLJIT_C_LESS_EQUAL);
-  OP2(SLJIT_SUB, TMP1, 0, TMP1, 0, SLJIT_IMM, ucp_Nd - ucp_Ll);
-  OP2(SLJIT_SUB | SLJIT_SET_U, SLJIT_UNUSED, 0, TMP1, 0, SLJIT_IMM, ucp_No - ucp_Nd);
-  OP_FLAGS(SLJIT_OR, TMP2, 0, TMP2, 0, SLJIT_C_LESS_EQUAL);
-  JUMPHERE(jump);
-  }
-else
-#endif
-  {
-#ifndef COMPILE_PCRE8
-  /* TMP2 may be destroyed by peek_char. */
-  OP1(SLJIT_MOV, TMP2, 0, SLJIT_IMM, 0);
-  jump = CMP(SLJIT_C_GREATER, TMP1, 0, SLJIT_IMM, 255);
-#elif defined SUPPORT_UTF
-  OP1(SLJIT_MOV, TMP2, 0, SLJIT_IMM, 0);
-  jump = NULL;
-  if (common->utf)
-    jump = CMP(SLJIT_C_GREATER, TMP1, 0, SLJIT_IMM, 255);
-#endif
-  OP1(SLJIT_MOV_UB, TMP2, 0, SLJIT_MEM1(TMP1), common->ctypes);
-  OP2(SLJIT_LSHR, TMP2, 0, TMP2, 0, SLJIT_IMM, 4 /* ctype_word */);
-  OP2(SLJIT_AND, TMP2, 0, TMP2, 0, SLJIT_IMM, 1);
-#ifndef COMPILE_PCRE8
-  JUMPHERE(jump);
-#elif defined SUPPORT_UTF
-  if (jump != NULL)
-    JUMPHERE(jump);
-#endif /* COMPILE_PCRE8 */
-  }
-set_jumps(skipread_list, LABEL());
-
-OP2(SLJIT_XOR | SLJIT_SET_E, SLJIT_UNUSED, 0, TMP2, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), LOCALS1);
-sljit_emit_fast_return(compiler, SLJIT_MEM1(SLJIT_LOCALS_REG), LOCALS0);
-}
-
-static BOOL check_class_ranges(compiler_common *common, const pcre_uint8 *bits, BOOL nclass, BOOL invert, jump_list **backtracks)
-{
-DEFINE_COMPILER;
-int ranges[MAX_RANGE_SIZE];
-pcre_uint8 bit, cbit, all;
-int i, byte, length = 0;
-
-bit = bits[0] & 0x1;
-/* All bits will be zero or one (since bit is zero or one). */
-all = -bit;
-
-for (i = 0; i < 256; )
-  {
-  byte = i >> 3;
-  if ((i & 0x7) == 0 && bits[byte] == all)
-    i += 8;
-  else
-    {
-    cbit = (bits[byte] >> (i & 0x7)) & 0x1;
-    if (cbit != bit)
-      {
-      if (length >= MAX_RANGE_SIZE)
-        return FALSE;
-      ranges[length] = i;
-      length++;
-      bit = cbit;
-      all = -cbit;
-      }
-    i++;
-    }
-  }
-
-if (((bit == 0) && nclass) || ((bit == 1) && !nclass))
-  {
-  if (length >= MAX_RANGE_SIZE)
-    return FALSE;
-  ranges[length] = 256;
-  length++;
-  }
-
-if (length < 0 || length > 4)
-  return FALSE;
-
-bit = bits[0] & 0x1;
-if (invert) bit ^= 0x1;
-
-/* No character is accepted. */
-if (length == 0 && bit == 0)
-  add_jump(compiler, backtracks, JUMP(SLJIT_JUMP));
-
-switch(length)
-  {
-  case 0:
-  /* When bit != 0, all characters are accepted. */
-  return TRUE;
-
-  case 1:
-  add_jump(compiler, backtracks, CMP(bit == 0 ? SLJIT_C_LESS : SLJIT_C_GREATER_EQUAL, TMP1, 0, SLJIT_IMM, ranges[0]));
-  return TRUE;
-
-  case 2:
-  if (ranges[0] + 1 != ranges[1])
-    {
-    OP2(SLJIT_SUB, TMP1, 0, TMP1, 0, SLJIT_IMM, ranges[0]);
-    add_jump(compiler, backtracks, CMP(bit != 0 ? SLJIT_C_LESS : SLJIT_C_GREATER_EQUAL, TMP1, 0, SLJIT_IMM, ranges[1] - ranges[0]));
-    }
-  else
-    add_jump(compiler, backtracks, CMP(bit != 0 ? SLJIT_C_EQUAL : SLJIT_C_NOT_EQUAL, TMP1, 0, SLJIT_IMM, ranges[0]));
-  return TRUE;
-
-  case 3:
-  if (bit != 0)
-    {
-    add_jump(compiler, backtracks, CMP(SLJIT_C_GREATER_EQUAL, TMP1, 0, SLJIT_IMM, ranges[2]));
-    if (ranges[0] + 1 != ranges[1])
-      {
-      OP2(SLJIT_SUB, TMP1, 0, TMP1, 0, SLJIT_IMM, ranges[0]);
-      add_jump(compiler, backtracks, CMP(SLJIT_C_LESS, TMP1, 0, SLJIT_IMM, ranges[1] - ranges[0]));
-      }
-    else
-      add_jump(compiler, backtracks, CMP(SLJIT_C_EQUAL, TMP1, 0, SLJIT_IMM, ranges[0]));
-    return TRUE;
-    }
-
-  add_jump(compiler, backtracks, CMP(SLJIT_C_LESS, TMP1, 0, SLJIT_IMM, ranges[0]));
-  if (ranges[1] + 1 != ranges[2])
-    {
-    OP2(SLJIT_SUB, TMP1, 0, TMP1, 0, SLJIT_IMM, ranges[1]);
-    add_jump(compiler, backtracks, CMP(SLJIT_C_LESS, TMP1, 0, SLJIT_IMM, ranges[2] - ranges[1]));
-    }
-  else
-    add_jump(compiler, backtracks, CMP(SLJIT_C_EQUAL, TMP1, 0, SLJIT_IMM, ranges[1]));
-  return TRUE;
-
-  case 4:
-  if ((ranges[1] - ranges[0]) == (ranges[3] - ranges[2])
-      && (ranges[0] | (ranges[2] - ranges[0])) == ranges[2]
-      && is_powerof2(ranges[2] - ranges[0]))
-    {
-    OP2(SLJIT_OR, TMP1, 0, TMP1, 0, SLJIT_IMM, ranges[2] - ranges[0]);
-    if (ranges[2] + 1 != ranges[3])
-      {
-      OP2(SLJIT_SUB, TMP1, 0, TMP1, 0, SLJIT_IMM, ranges[2]);
-      add_jump(compiler, backtracks, CMP(bit != 0 ? SLJIT_C_LESS : SLJIT_C_GREATER_EQUAL, TMP1, 0, SLJIT_IMM, ranges[3] - ranges[2]));
-      }
-    else
-      add_jump(compiler, backtracks, CMP(bit != 0 ? SLJIT_C_EQUAL : SLJIT_C_NOT_EQUAL, TMP1, 0, SLJIT_IMM, ranges[2]));
-    return TRUE;
-    }
-
-  if (bit != 0)
-    {
-    i = 0;
-    if (ranges[0] + 1 != ranges[1])
-      {
-      OP2(SLJIT_SUB, TMP1, 0, TMP1, 0, SLJIT_IMM, ranges[0]);
-      add_jump(compiler, backtracks, CMP(SLJIT_C_LESS, TMP1, 0, SLJIT_IMM, ranges[1] - ranges[0]));
-      i = ranges[0];
-      }
-    else
-      add_jump(compiler, backtracks, CMP(SLJIT_C_EQUAL, TMP1, 0, SLJIT_IMM, ranges[0]));
-
-    if (ranges[2] + 1 != ranges[3])
-      {
-      OP2(SLJIT_SUB, TMP1, 0, TMP1, 0, SLJIT_IMM, ranges[2] - i);
-      add_jump(compiler, backtracks, CMP(SLJIT_C_LESS, TMP1, 0, SLJIT_IMM, ranges[3] - ranges[2]));
-      }
-    else
-      add_jump(compiler, backtracks, CMP(SLJIT_C_EQUAL, TMP1, 0, SLJIT_IMM, ranges[2] - i));
-    return TRUE;
-    }
-
-  OP2(SLJIT_SUB, TMP1, 0, TMP1, 0, SLJIT_IMM, ranges[0]);
-  add_jump(compiler, backtracks, CMP(SLJIT_C_GREATER_EQUAL, TMP1, 0, SLJIT_IMM, ranges[3] - ranges[0]));
-  if (ranges[1] + 1 != ranges[2])
-    {
-    OP2(SLJIT_SUB, TMP1, 0, TMP1, 0, SLJIT_IMM, ranges[1] - ranges[0]);
-    add_jump(compiler, backtracks, CMP(SLJIT_C_LESS, TMP1, 0, SLJIT_IMM, ranges[2] - ranges[1]));
-    }
-  else
-    add_jump(compiler, backtracks, CMP(SLJIT_C_EQUAL, TMP1, 0, SLJIT_IMM, ranges[1] - ranges[0]));
-  return TRUE;
-
-  default:
-  SLJIT_ASSERT_STOP();
-  return FALSE;
-  }
-}
-
-static void check_anynewline(compiler_common *common)
-{
-/* Check whether TMP1 contains a newline character. TMP2 destroyed. */
-DEFINE_COMPILER;
-
-sljit_emit_fast_enter(compiler, RETURN_ADDR, 0);
-
-OP2(SLJIT_SUB, TMP1, 0, TMP1, 0, SLJIT_IMM, 0x0a);
-OP2(SLJIT_SUB | SLJIT_SET_U, SLJIT_UNUSED, 0, TMP1, 0, SLJIT_IMM, 0x0d - 0x0a);
-OP_FLAGS(SLJIT_MOV, TMP2, 0, SLJIT_UNUSED, 0, SLJIT_C_LESS_EQUAL);
-OP2(SLJIT_SUB | SLJIT_SET_E, SLJIT_UNUSED, 0, TMP1, 0, SLJIT_IMM, 0x85 - 0x0a);
-#if defined SUPPORT_UTF || defined COMPILE_PCRE16 || defined COMPILE_PCRE32
-#ifdef COMPILE_PCRE8
-if (common->utf)
-  {
-#endif
-  OP_FLAGS(SLJIT_OR, TMP2, 0, TMP2, 0, SLJIT_C_EQUAL);
-  OP2(SLJIT_OR, TMP1, 0, TMP1, 0, SLJIT_IMM, 0x1);
-  OP2(SLJIT_SUB | SLJIT_SET_E, SLJIT_UNUSED, 0, TMP1, 0, SLJIT_IMM, 0x2029 - 0x0a);
-#ifdef COMPILE_PCRE8
-  }
-#endif
-#endif /* SUPPORT_UTF || COMPILE_PCRE16 || COMPILE_PCRE32 */
-OP_FLAGS(SLJIT_OR | SLJIT_SET_E, TMP2, 0, TMP2, 0, SLJIT_C_EQUAL);
-sljit_emit_fast_return(compiler, RETURN_ADDR, 0);
-}
-
-static void check_hspace(compiler_common *common)
-{
-/* Check whether TMP1 contains a newline character. TMP2 destroyed. */
-DEFINE_COMPILER;
-
-sljit_emit_fast_enter(compiler, RETURN_ADDR, 0);
-
-OP2(SLJIT_SUB | SLJIT_SET_E, SLJIT_UNUSED, 0, TMP1, 0, SLJIT_IMM, 0x09);
-OP_FLAGS(SLJIT_MOV, TMP2, 0, SLJIT_UNUSED, 0, SLJIT_C_EQUAL);
-OP2(SLJIT_SUB | SLJIT_SET_E, SLJIT_UNUSED, 0, TMP1, 0, SLJIT_IMM, 0x20);
-OP_FLAGS(SLJIT_OR, TMP2, 0, TMP2, 0, SLJIT_C_EQUAL);
-OP2(SLJIT_SUB | SLJIT_SET_E, SLJIT_UNUSED, 0, TMP1, 0, SLJIT_IMM, 0xa0);
-#if defined SUPPORT_UTF || defined COMPILE_PCRE16 || defined COMPILE_PCRE32
-#ifdef COMPILE_PCRE8
-if (common->utf)
-  {
-#endif
-  OP_FLAGS(SLJIT_OR, TMP2, 0, TMP2, 0, SLJIT_C_EQUAL);
-  OP2(SLJIT_SUB | SLJIT_SET_E, SLJIT_UNUSED, 0, TMP1, 0, SLJIT_IMM, 0x1680);
-  OP_FLAGS(SLJIT_OR, TMP2, 0, TMP2, 0, SLJIT_C_EQUAL);
-  OP2(SLJIT_SUB | SLJIT_SET_E, SLJIT_UNUSED, 0, TMP1, 0, SLJIT_IMM, 0x180e);
-  OP_FLAGS(SLJIT_OR, TMP2, 0, TMP2, 0, SLJIT_C_EQUAL);
-  OP2(SLJIT_SUB, TMP1, 0, TMP1, 0, SLJIT_IMM, 0x2000);
-  OP2(SLJIT_SUB | SLJIT_SET_U, SLJIT_UNUSED, 0, TMP1, 0, SLJIT_IMM, 0x200A - 0x2000);
-  OP_FLAGS(SLJIT_OR, TMP2, 0, TMP2, 0, SLJIT_C_LESS_EQUAL);
-  OP2(SLJIT_SUB | SLJIT_SET_E, SLJIT_UNUSED, 0, TMP1, 0, SLJIT_IMM, 0x202f - 0x2000);
-  OP_FLAGS(SLJIT_OR, TMP2, 0, TMP2, 0, SLJIT_C_EQUAL);
-  OP2(SLJIT_SUB | SLJIT_SET_E, SLJIT_UNUSED, 0, TMP1, 0, SLJIT_IMM, 0x205f - 0x2000);
-  OP_FLAGS(SLJIT_OR, TMP2, 0, TMP2, 0, SLJIT_C_EQUAL);
-  OP2(SLJIT_SUB | SLJIT_SET_E, SLJIT_UNUSED, 0, TMP1, 0, SLJIT_IMM, 0x3000 - 0x2000);
-#ifdef COMPILE_PCRE8
-  }
-#endif
-#endif /* SUPPORT_UTF || COMPILE_PCRE16 || COMPILE_PCRE32 */
-OP_FLAGS(SLJIT_OR | SLJIT_SET_E, TMP2, 0, TMP2, 0, SLJIT_C_EQUAL);
-
-sljit_emit_fast_return(compiler, RETURN_ADDR, 0);
-}
-
-static void check_vspace(compiler_common *common)
-{
-/* Check whether TMP1 contains a newline character. TMP2 destroyed. */
-DEFINE_COMPILER;
-
-sljit_emit_fast_enter(compiler, RETURN_ADDR, 0);
-
-OP2(SLJIT_SUB, TMP1, 0, TMP1, 0, SLJIT_IMM, 0x0a);
-OP2(SLJIT_SUB | SLJIT_SET_U, SLJIT_UNUSED, 0, TMP1, 0, SLJIT_IMM, 0x0d - 0x0a);
-OP_FLAGS(SLJIT_MOV, TMP2, 0, SLJIT_UNUSED, 0, SLJIT_C_LESS_EQUAL);
-OP2(SLJIT_SUB | SLJIT_SET_E, SLJIT_UNUSED, 0, TMP1, 0, SLJIT_IMM, 0x85 - 0x0a);
-#if defined SUPPORT_UTF || defined COMPILE_PCRE16 || defined COMPILE_PCRE32
-#ifdef COMPILE_PCRE8
-if (common->utf)
-  {
-#endif
-  OP_FLAGS(SLJIT_OR | SLJIT_SET_E, TMP2, 0, TMP2, 0, SLJIT_C_EQUAL);
-  OP2(SLJIT_OR, TMP1, 0, TMP1, 0, SLJIT_IMM, 0x1);
-  OP2(SLJIT_SUB | SLJIT_SET_E, SLJIT_UNUSED, 0, TMP1, 0, SLJIT_IMM, 0x2029 - 0x0a);
-#ifdef COMPILE_PCRE8
-  }
-#endif
-#endif /* SUPPORT_UTF || COMPILE_PCRE16 || COMPILE_PCRE32 */
-OP_FLAGS(SLJIT_OR | SLJIT_SET_E, TMP2, 0, TMP2, 0, SLJIT_C_EQUAL);
-
-sljit_emit_fast_return(compiler, RETURN_ADDR, 0);
-}
-
-#define CHAR1 STR_END
-#define CHAR2 STACK_TOP
-
-static void do_casefulcmp(compiler_common *common)
-{
-DEFINE_COMPILER;
-struct sljit_jump *jump;
-struct sljit_label *label;
-
-sljit_emit_fast_enter(compiler, RETURN_ADDR, 0);
-OP2(SLJIT_SUB, STR_PTR, 0, STR_PTR, 0, TMP2, 0);
-OP1(SLJIT_MOV, TMP3, 0, CHAR1, 0);
-OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_LOCALS_REG), LOCALS0, CHAR2, 0);
-OP2(SLJIT_SUB, TMP1, 0, TMP1, 0, SLJIT_IMM, IN_UCHARS(1));
-OP2(SLJIT_SUB, STR_PTR, 0, STR_PTR, 0, SLJIT_IMM, IN_UCHARS(1));
-
-label = LABEL();
-OP1(MOVU_UCHAR, CHAR1, 0, SLJIT_MEM1(TMP1), IN_UCHARS(1));
-OP1(MOVU_UCHAR, CHAR2, 0, SLJIT_MEM1(STR_PTR), IN_UCHARS(1));
-jump = CMP(SLJIT_C_NOT_EQUAL, CHAR1, 0, CHAR2, 0);
-OP2(SLJIT_SUB | SLJIT_SET_E, TMP2, 0, TMP2, 0, SLJIT_IMM, IN_UCHARS(1));
-JUMPTO(SLJIT_C_NOT_ZERO, label);
-
-JUMPHERE(jump);
-OP2(SLJIT_ADD, STR_PTR, 0, STR_PTR, 0, SLJIT_IMM, IN_UCHARS(1));
-OP1(SLJIT_MOV, CHAR1, 0, TMP3, 0);
-OP1(SLJIT_MOV, CHAR2, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), LOCALS0);
-sljit_emit_fast_return(compiler, RETURN_ADDR, 0);
-}
-
-#define LCC_TABLE STACK_LIMIT
-
-static void do_caselesscmp(compiler_common *common)
-{
-DEFINE_COMPILER;
-struct sljit_jump *jump;
-struct sljit_label *label;
-
-sljit_emit_fast_enter(compiler, RETURN_ADDR, 0);
-OP2(SLJIT_SUB, STR_PTR, 0, STR_PTR, 0, TMP2, 0);
-
-OP1(SLJIT_MOV, TMP3, 0, LCC_TABLE, 0);
-OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_LOCALS_REG), LOCALS0, CHAR1, 0);
-OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_LOCALS_REG), LOCALS1, CHAR2, 0);
-OP1(SLJIT_MOV, LCC_TABLE, 0, SLJIT_IMM, common->lcc);
-OP2(SLJIT_SUB, TMP1, 0, TMP1, 0, SLJIT_IMM, IN_UCHARS(1));
-OP2(SLJIT_SUB, STR_PTR, 0, STR_PTR, 0, SLJIT_IMM, IN_UCHARS(1));
-
-label = LABEL();
-OP1(MOVU_UCHAR, CHAR1, 0, SLJIT_MEM1(TMP1), IN_UCHARS(1));
-OP1(MOVU_UCHAR, CHAR2, 0, SLJIT_MEM1(STR_PTR), IN_UCHARS(1));
-#ifndef COMPILE_PCRE8
-jump = CMP(SLJIT_C_GREATER, CHAR1, 0, SLJIT_IMM, 255);
-#endif
-OP1(SLJIT_MOV_UB, CHAR1, 0, SLJIT_MEM2(LCC_TABLE, CHAR1), 0);
-#ifndef COMPILE_PCRE8
-JUMPHERE(jump);
-jump = CMP(SLJIT_C_GREATER, CHAR2, 0, SLJIT_IMM, 255);
-#endif
-OP1(SLJIT_MOV_UB, CHAR2, 0, SLJIT_MEM2(LCC_TABLE, CHAR2), 0);
-#ifndef COMPILE_PCRE8
-JUMPHERE(jump);
-#endif
-jump = CMP(SLJIT_C_NOT_EQUAL, CHAR1, 0, CHAR2, 0);
-OP2(SLJIT_SUB | SLJIT_SET_E, TMP2, 0, TMP2, 0, SLJIT_IMM, IN_UCHARS(1));
-JUMPTO(SLJIT_C_NOT_ZERO, label);
-
-JUMPHERE(jump);
-OP2(SLJIT_ADD, STR_PTR, 0, STR_PTR, 0, SLJIT_IMM, IN_UCHARS(1));
-OP1(SLJIT_MOV, LCC_TABLE, 0, TMP3, 0);
-OP1(SLJIT_MOV, CHAR1, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), LOCALS0);
-OP1(SLJIT_MOV, CHAR2, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), LOCALS1);
-sljit_emit_fast_return(compiler, RETURN_ADDR, 0);
-}
-
-#undef LCC_TABLE
-#undef CHAR1
-#undef CHAR2
-
-#if defined SUPPORT_UTF && defined SUPPORT_UCP
-
-static const pcre_uchar * SLJIT_CALL do_utf_caselesscmp(pcre_uchar *src1, jit_arguments *args, pcre_uchar *end1)
-{
-/* This function would be ineffective to do in JIT level. */
-pcre_uint32 c1, c2;
-const pcre_uchar *src2 = args->uchar_ptr;
-const pcre_uchar *end2 = args->end;
-const ucd_record *ur;
-const pcre_uint32 *pp;
-
-while (src1 < end1)
-  {
-  if (src2 >= end2)
-    return (pcre_uchar*)1;
-  GETCHARINC(c1, src1);
-  GETCHARINC(c2, src2);
-  ur = GET_UCD(c2);
-  if (c1 != c2 && c1 != c2 + ur->other_case)
-    {
-    pp = PRIV(ucd_caseless_sets) + ur->caseset;
-    for (;;)
-      {
-      if (c1 < *pp) return NULL;
-      if (c1 == *pp++) break;
-      }
-    }
-  }
-return src2;
-}
-
-#endif /* SUPPORT_UTF && SUPPORT_UCP */
-
-static pcre_uchar *byte_sequence_compare(compiler_common *common, BOOL caseless, pcre_uchar *cc,
-    compare_context* context, jump_list **backtracks)
-{
-DEFINE_COMPILER;
-unsigned int othercasebit = 0;
-pcre_uchar *othercasechar = NULL;
-#ifdef SUPPORT_UTF
-int utflength;
-#endif
-
-if (caseless && char_has_othercase(common, cc))
-  {
-  othercasebit = char_get_othercase_bit(common, cc);
-  SLJIT_ASSERT(othercasebit);
-  /* Extracting bit difference info. */
-#if defined COMPILE_PCRE8
-  othercasechar = cc + (othercasebit >> 8);
-  othercasebit &= 0xff;
-#elif defined COMPILE_PCRE16 || defined COMPILE_PCRE32
-  /* Note that this code only handles characters in the BMP. If there
-  ever are characters outside the BMP whose othercase differs in only one
-  bit from itself (there currently are none), this code will need to be
-  revised for COMPILE_PCRE32. */
-  othercasechar = cc + (othercasebit >> 9);
-  if ((othercasebit & 0x100) != 0)
-    othercasebit = (othercasebit & 0xff) << 8;
-  else
-    othercasebit &= 0xff;
-#endif /* COMPILE_PCRE[8|16|32] */
-  }
-
-if (context->sourcereg == -1)
-  {
-#if defined COMPILE_PCRE8
-#if defined SLJIT_UNALIGNED && SLJIT_UNALIGNED
-  if (context->length >= 4)
-    OP1(SLJIT_MOV_SI, TMP1, 0, SLJIT_MEM1(STR_PTR), -context->length);
-  else if (context->length >= 2)
-    OP1(SLJIT_MOV_UH, TMP1, 0, SLJIT_MEM1(STR_PTR), -context->length);
-  else
-#endif
-    OP1(SLJIT_MOV_UB, TMP1, 0, SLJIT_MEM1(STR_PTR), -context->length);
-#elif defined COMPILE_PCRE16
-#if defined SLJIT_UNALIGNED && SLJIT_UNALIGNED
-  if (context->length >= 4)
-    OP1(SLJIT_MOV_SI, TMP1, 0, SLJIT_MEM1(STR_PTR), -context->length);
-  else
-#endif
-    OP1(MOV_UCHAR, TMP1, 0, SLJIT_MEM1(STR_PTR), -context->length);
-#elif defined COMPILE_PCRE32
-  OP1(MOV_UCHAR, TMP1, 0, SLJIT_MEM1(STR_PTR), -context->length);
-#endif /* COMPILE_PCRE[8|16|32] */
-  context->sourcereg = TMP2;
-  }
-
-#ifdef SUPPORT_UTF
-utflength = 1;
-if (common->utf && HAS_EXTRALEN(*cc))
-  utflength += GET_EXTRALEN(*cc);
-
-do
-  {
-#endif
-
-  context->length -= IN_UCHARS(1);
-#if (defined SLJIT_UNALIGNED && SLJIT_UNALIGNED) && (defined COMPILE_PCRE8 || defined COMPILE_PCRE16)
-
-  /* Unaligned read is supported. */
-  if (othercasebit != 0 && othercasechar == cc)
-    {
-    context->c.asuchars[context->ucharptr] = *cc | othercasebit;
-    context->oc.asuchars[context->ucharptr] = othercasebit;
-    }
-  else
-    {
-    context->c.asuchars[context->ucharptr] = *cc;
-    context->oc.asuchars[context->ucharptr] = 0;
-    }
-  context->ucharptr++;
-
-#if defined COMPILE_PCRE8
-  if (context->ucharptr >= 4 || context->length == 0 || (context->ucharptr == 2 && context->length == 1))
-#else
-  if (context->ucharptr >= 2 || context->length == 0)
-#endif
-    {
-    if (context->length >= 4)
-      OP1(SLJIT_MOV_SI, context->sourcereg, 0, SLJIT_MEM1(STR_PTR), -context->length);
-    else if (context->length >= 2)
-      OP1(SLJIT_MOV_UH, context->sourcereg, 0, SLJIT_MEM1(STR_PTR), -context->length);
-#if defined COMPILE_PCRE8
-    else if (context->length >= 1)
-      OP1(SLJIT_MOV_UB, context->sourcereg, 0, SLJIT_MEM1(STR_PTR), -context->length);
-#endif /* COMPILE_PCRE8 */
-    context->sourcereg = context->sourcereg == TMP1 ? TMP2 : TMP1;
-
-    switch(context->ucharptr)
-      {
-      case 4 / sizeof(pcre_uchar):
-      if (context->oc.asint != 0)
-        OP2(SLJIT_OR, context->sourcereg, 0, context->sourcereg, 0, SLJIT_IMM, context->oc.asint);
-      add_jump(compiler, backtracks, CMP(SLJIT_C_NOT_EQUAL, context->sourcereg, 0, SLJIT_IMM, context->c.asint | context->oc.asint));
-      break;
-
-      case 2 / sizeof(pcre_uchar):
-      if (context->oc.asushort != 0)
-        OP2(SLJIT_OR, context->sourcereg, 0, context->sourcereg, 0, SLJIT_IMM, context->oc.asushort);
-      add_jump(compiler, backtracks, CMP(SLJIT_C_NOT_EQUAL, context->sourcereg, 0, SLJIT_IMM, context->c.asushort | context->oc.asushort));
-      break;
-
-#ifdef COMPILE_PCRE8
-      case 1:
-      if (context->oc.asbyte != 0)
-        OP2(SLJIT_OR, context->sourcereg, 0, context->sourcereg, 0, SLJIT_IMM, context->oc.asbyte);
-      add_jump(compiler, backtracks, CMP(SLJIT_C_NOT_EQUAL, context->sourcereg, 0, SLJIT_IMM, context->c.asbyte | context->oc.asbyte));
-      break;
-#endif
-
-      default:
-      SLJIT_ASSERT_STOP();
-      break;
-      }
-    context->ucharptr = 0;
-    }
-
-#else
-
-  /* Unaligned read is unsupported or in 32 bit mode. */
-  if (context->length >= 1)
-    OP1(MOV_UCHAR, context->sourcereg, 0, SLJIT_MEM1(STR_PTR), -context->length);
-
-  context->sourcereg = context->sourcereg == TMP1 ? TMP2 : TMP1;
-
-  if (othercasebit != 0 && othercasechar == cc)
-    {
-    OP2(SLJIT_OR, context->sourcereg, 0, context->sourcereg, 0, SLJIT_IMM, othercasebit);
-    add_jump(compiler, backtracks, CMP(SLJIT_C_NOT_EQUAL, context->sourcereg, 0, SLJIT_IMM, *cc | othercasebit));
-    }
-  else
-    add_jump(compiler, backtracks, CMP(SLJIT_C_NOT_EQUAL, context->sourcereg, 0, SLJIT_IMM, *cc));
-
-#endif
-
-  cc++;
-#ifdef SUPPORT_UTF
-  utflength--;
-  }
-while (utflength > 0);
-#endif
-
-return cc;
-}
-
-#if defined SUPPORT_UTF || !defined COMPILE_PCRE8
-
-#define SET_TYPE_OFFSET(value) \
-  if ((value) != typeoffset) \
-    { \
-    if ((value) < typeoffset) \
-      OP2(SLJIT_ADD, typereg, 0, typereg, 0, SLJIT_IMM, typeoffset - (value)); \
-    else \
-      OP2(SLJIT_SUB, typereg, 0, typereg, 0, SLJIT_IMM, (value) - typeoffset); \
-    } \
-  typeoffset = (value);
-
-#define SET_CHAR_OFFSET(value) \
-  if ((value) != charoffset) \
-    { \
-    if ((value) < charoffset) \
-      OP2(SLJIT_ADD, TMP1, 0, TMP1, 0, SLJIT_IMM, (sljit_sw)(charoffset - (value))); \
-    else \
-      OP2(SLJIT_SUB, TMP1, 0, TMP1, 0, SLJIT_IMM, (sljit_sw)((value) - charoffset)); \
-    } \
-  charoffset = (value);
-
-static void compile_xclass_matchingpath(compiler_common *common, pcre_uchar *cc, jump_list **backtracks)
-{
-DEFINE_COMPILER;
-jump_list *found = NULL;
-jump_list **list = (cc[0] & XCL_NOT) == 0 ? &found : backtracks;
-sljit_uw c, charoffset, max = 256, min = READ_CHAR_MAX;
-struct sljit_jump *jump = NULL;
-pcre_uchar *ccbegin;
-int compares, invertcmp, numberofcmps;
-#if defined SUPPORT_UTF && (defined COMPILE_PCRE8 || defined COMPILE_PCRE16)
-BOOL utf = common->utf;
-#endif
-
-#ifdef SUPPORT_UCP
-BOOL needstype = FALSE, needsscript = FALSE, needschar = FALSE;
-BOOL charsaved = FALSE;
-int typereg = TMP1, scriptreg = TMP1;
-const pcre_uint32 *other_cases;
-sljit_uw typeoffset;
-#endif
-
-/* Scanning the necessary info. */
-cc++;
-ccbegin = cc;
-compares = 0;
-if (cc[-1] & XCL_MAP)
-  {
-  min = 0;
-  cc += 32 / sizeof(pcre_uchar);
-  }
-
-while (*cc != XCL_END)
-  {
-  compares++;
-  if (*cc == XCL_SINGLE)
-    {
-    cc ++;
-    GETCHARINCTEST(c, cc);
-    if (c > max) max = c;
-    if (c < min) min = c;
-#ifdef SUPPORT_UCP
-    needschar = TRUE;
-#endif
-    }
-  else if (*cc == XCL_RANGE)
-    {
-    cc ++;
-    GETCHARINCTEST(c, cc);
-    if (c < min) min = c;
-    GETCHARINCTEST(c, cc);
-    if (c > max) max = c;
-#ifdef SUPPORT_UCP
-    needschar = TRUE;
-#endif
-    }
-#ifdef SUPPORT_UCP
-  else
-    {
-    SLJIT_ASSERT(*cc == XCL_PROP || *cc == XCL_NOTPROP);
-    cc++;
-    if (*cc == PT_CLIST)
-      {
-      other_cases = PRIV(ucd_caseless_sets) + cc[1];
-      while (*other_cases != NOTACHAR)
-        {
-        if (*other_cases > max) max = *other_cases;
-        if (*other_cases < min) min = *other_cases;
-        other_cases++;
-        }
-      }
-    else
-      {
-      max = READ_CHAR_MAX;
-      min = 0;
-      }
-
-    switch(*cc)
-      {
-      case PT_ANY:
-      break;
-
-      case PT_LAMP:
-      case PT_GC:
-      case PT_PC:
-      case PT_ALNUM:
-      needstype = TRUE;
-      break;
-
-      case PT_SC:
-      needsscript = TRUE;
-      break;
-
-      case PT_SPACE:
-      case PT_PXSPACE:
-      case PT_WORD:
-      case PT_PXGRAPH:
-      case PT_PXPRINT:
-      case PT_PXPUNCT:
-      needstype = TRUE;
-      needschar = TRUE;
-      break;
-
-      case PT_CLIST:
-      case PT_UCNC:
-      needschar = TRUE;
-      break;
-
-      default:
-      SLJIT_ASSERT_STOP();
-      break;
-      }
-    cc += 2;
-    }
-#endif
-  }
-
-/* We are not necessary in utf mode even in 8 bit mode. */
-cc = ccbegin;
-detect_partial_match(common, backtracks);
-read_char_range(common, min, max, (cc[-1] & XCL_NOT) != 0);
-
-if ((cc[-1] & XCL_HASPROP) == 0)
-  {
-  if ((cc[-1] & XCL_MAP) != 0)
-    {
-    jump = CMP(SLJIT_C_GREATER, TMP1, 0, SLJIT_IMM, 255);
-    if (!check_class_ranges(common, (const pcre_uint8 *)cc, (((const pcre_uint8 *)cc)[31] & 0x80) != 0, TRUE, &found))
-      {
-      OP2(SLJIT_AND, TMP2, 0, TMP1, 0, SLJIT_IMM, 0x7);
-      OP2(SLJIT_LSHR, TMP1, 0, TMP1, 0, SLJIT_IMM, 3);
-      OP1(SLJIT_MOV_UB, TMP1, 0, SLJIT_MEM1(TMP1), (sljit_sw)cc);
-      OP2(SLJIT_SHL, TMP2, 0, SLJIT_IMM, 1, TMP2, 0);
-      OP2(SLJIT_AND | SLJIT_SET_E, SLJIT_UNUSED, 0, TMP1, 0, TMP2, 0);
-      add_jump(compiler, &found, JUMP(SLJIT_C_NOT_ZERO));
-      }
-
-    add_jump(compiler, backtracks, JUMP(SLJIT_JUMP));
-    JUMPHERE(jump);
-
-    cc += 32 / sizeof(pcre_uchar);
-    }
-  else
-    {
-    OP2(SLJIT_SUB, TMP2, 0, TMP1, 0, SLJIT_IMM, min);
-    add_jump(compiler, (cc[-1] & XCL_NOT) == 0 ? backtracks : &found, CMP(SLJIT_C_GREATER, TMP2, 0, SLJIT_IMM, max - min));
-    }
-  }
-else if ((cc[-1] & XCL_MAP) != 0)
-  {
-  OP1(SLJIT_MOV, TMP3, 0, TMP1, 0);
-#ifdef SUPPORT_UCP
-  charsaved = TRUE;
-#endif
-  if (!check_class_ranges(common, (const pcre_uint8 *)cc, FALSE, TRUE, list))
-    {
-#ifdef COMPILE_PCRE8
-    SLJIT_ASSERT(common->utf);
-#endif
-    jump = CMP(SLJIT_C_GREATER, TMP1, 0, SLJIT_IMM, 255);
-
-    OP2(SLJIT_AND, TMP2, 0, TMP1, 0, SLJIT_IMM, 0x7);
-    OP2(SLJIT_LSHR, TMP1, 0, TMP1, 0, SLJIT_IMM, 3);
-    OP1(SLJIT_MOV_UB, TMP1, 0, SLJIT_MEM1(TMP1), (sljit_sw)cc);
-    OP2(SLJIT_SHL, TMP2, 0, SLJIT_IMM, 1, TMP2, 0);
-    OP2(SLJIT_AND | SLJIT_SET_E, SLJIT_UNUSED, 0, TMP1, 0, TMP2, 0);
-    add_jump(compiler, list, JUMP(SLJIT_C_NOT_ZERO));
-
-    JUMPHERE(jump);
-    }
-
-  OP1(SLJIT_MOV, TMP1, 0, TMP3, 0);
-  cc += 32 / sizeof(pcre_uchar);
-  }
-
-#ifdef SUPPORT_UCP
-/* Simple register allocation. TMP1 is preferred if possible. */
-if (needstype || needsscript)
-  {
-  if (needschar && !charsaved)
-    OP1(SLJIT_MOV, TMP3, 0, TMP1, 0);
-  add_jump(compiler, &common->getucd, JUMP(SLJIT_FAST_CALL));
-  if (needschar)
-    {
-    if (needstype)
-      {
-      OP1(SLJIT_MOV, RETURN_ADDR, 0, TMP1, 0);
-      typereg = RETURN_ADDR;
-      }
-
-    if (needsscript)
-      scriptreg = TMP3;
-    OP1(SLJIT_MOV, TMP1, 0, TMP3, 0);
-    }
-  else if (needstype && needsscript)
-    scriptreg = TMP3;
-  /* In all other cases only one of them was specified, and that can goes to TMP1. */
-
-  if (needsscript)
-    {
-    if (scriptreg == TMP1)
-      {
-      OP1(SLJIT_MOV, scriptreg, 0, SLJIT_IMM, (sljit_sw)PRIV(ucd_records) + SLJIT_OFFSETOF(ucd_record, script));
-      OP1(SLJIT_MOV_UB, scriptreg, 0, SLJIT_MEM2(scriptreg, TMP2), 3);
-      }
-    else
-      {
-      OP2(SLJIT_SHL, TMP2, 0, TMP2, 0, SLJIT_IMM, 3);
-      OP2(SLJIT_ADD, TMP2, 0, TMP2, 0, SLJIT_IMM, (sljit_sw)PRIV(ucd_records) + SLJIT_OFFSETOF(ucd_record, script));
-      OP1(SLJIT_MOV_UB, scriptreg, 0, SLJIT_MEM1(TMP2), 0);
-      }
-    }
-  }
-#endif
-
-/* Generating code. */
-charoffset = 0;
-numberofcmps = 0;
-#ifdef SUPPORT_UCP
-typeoffset = 0;
-#endif
-
-while (*cc != XCL_END)
-  {
-  compares--;
-  invertcmp = (compares == 0 && list != backtracks);
-  jump = NULL;
-
-  if (*cc == XCL_SINGLE)
-    {
-    cc ++;
-    GETCHARINCTEST(c, cc);
-
-    if (numberofcmps < 3 && (*cc == XCL_SINGLE || *cc == XCL_RANGE))
-      {
-      OP2(SLJIT_SUB | SLJIT_SET_E, SLJIT_UNUSED, 0, TMP1, 0, SLJIT_IMM, (sljit_sw)(c - charoffset));
-      OP_FLAGS(numberofcmps == 0 ? SLJIT_MOV : SLJIT_OR, TMP2, 0, numberofcmps == 0 ? SLJIT_UNUSED : TMP2, 0, SLJIT_C_EQUAL);
-      numberofcmps++;
-      }
-    else if (numberofcmps > 0)
-      {
-      OP2(SLJIT_SUB | SLJIT_SET_E, SLJIT_UNUSED, 0, TMP1, 0, SLJIT_IMM, (sljit_sw)(c - charoffset));
-      OP_FLAGS(SLJIT_OR | SLJIT_SET_E, TMP2, 0, TMP2, 0, SLJIT_C_EQUAL);
-      jump = JUMP(SLJIT_C_NOT_ZERO ^ invertcmp);
-      numberofcmps = 0;
-      }
-    else
-      {
-      jump = CMP(SLJIT_C_EQUAL ^ invertcmp, TMP1, 0, SLJIT_IMM, (sljit_sw)(c - charoffset));
-      numberofcmps = 0;
-      }
-    }
-  else if (*cc == XCL_RANGE)
-    {
-    cc ++;
-    GETCHARINCTEST(c, cc);
-    SET_CHAR_OFFSET(c);
-    GETCHARINCTEST(c, cc);
-
-    if (numberofcmps < 3 && (*cc == XCL_SINGLE || *cc == XCL_RANGE))
-      {
-      OP2(SLJIT_SUB | SLJIT_SET_U, SLJIT_UNUSED, 0, TMP1, 0, SLJIT_IMM, (sljit_sw)(c - charoffset));
-      OP_FLAGS(numberofcmps == 0 ? SLJIT_MOV : SLJIT_OR, TMP2, 0, numberofcmps == 0 ? SLJIT_UNUSED : TMP2, 0, SLJIT_C_LESS_EQUAL);
-      numberofcmps++;
-      }
-    else if (numberofcmps > 0)
-      {
-      OP2(SLJIT_SUB | SLJIT_SET_U, SLJIT_UNUSED, 0, TMP1, 0, SLJIT_IMM, (sljit_sw)(c - charoffset));
-      OP_FLAGS(SLJIT_OR | SLJIT_SET_E, TMP2, 0, TMP2, 0, SLJIT_C_LESS_EQUAL);
-      jump = JUMP(SLJIT_C_NOT_ZERO ^ invertcmp);
-      numberofcmps = 0;
-      }
-    else
-      {
-      jump = CMP(SLJIT_C_LESS_EQUAL ^ invertcmp, TMP1, 0, SLJIT_IMM, (sljit_sw)(c - charoffset));
-      numberofcmps = 0;
-      }
-    }
-#ifdef SUPPORT_UCP
-  else
-    {
-    if (*cc == XCL_NOTPROP)
-      invertcmp ^= 0x1;
-    cc++;
-    switch(*cc)
-      {
-      case PT_ANY:
-      if (list != backtracks)
-        {
-        if ((cc[-1] == XCL_NOTPROP && compares > 0) || (cc[-1] == XCL_PROP && compares == 0))
-          continue;
-        }
-      else if (cc[-1] == XCL_NOTPROP)
-        continue;
-      jump = JUMP(SLJIT_JUMP);
-      break;
-
-      case PT_LAMP:
-      OP2(SLJIT_SUB | SLJIT_SET_E, SLJIT_UNUSED, 0, typereg, 0, SLJIT_IMM, ucp_Lu - typeoffset);
-      OP_FLAGS(SLJIT_MOV, TMP2, 0, SLJIT_UNUSED, 0, SLJIT_C_EQUAL);
-      OP2(SLJIT_SUB | SLJIT_SET_E, SLJIT_UNUSED, 0, typereg, 0, SLJIT_IMM, ucp_Ll - typeoffset);
-      OP_FLAGS(SLJIT_OR, TMP2, 0, TMP2, 0, SLJIT_C_EQUAL);
-      OP2(SLJIT_SUB | SLJIT_SET_E, SLJIT_UNUSED, 0, typereg, 0, SLJIT_IMM, ucp_Lt - typeoffset);
-      OP_FLAGS(SLJIT_OR | SLJIT_SET_E, TMP2, 0, TMP2, 0, SLJIT_C_EQUAL);
-      jump = JUMP(SLJIT_C_NOT_ZERO ^ invertcmp);
-      break;
-
-      case PT_GC:
-      c = PRIV(ucp_typerange)[(int)cc[1] * 2];
-      SET_TYPE_OFFSET(c);
-      jump = CMP(SLJIT_C_LESS_EQUAL ^ invertcmp, typereg, 0, SLJIT_IMM, PRIV(ucp_typerange)[(int)cc[1] * 2 + 1] - c);
-      break;
-
-      case PT_PC:
-      jump = CMP(SLJIT_C_EQUAL ^ invertcmp, typereg, 0, SLJIT_IMM, (int)cc[1] - typeoffset);
-      break;
-
-      case PT_SC:
-      jump = CMP(SLJIT_C_EQUAL ^ invertcmp, scriptreg, 0, SLJIT_IMM, (int)cc[1]);
-      break;
-
-      case PT_SPACE:
-      case PT_PXSPACE:
-      SET_CHAR_OFFSET(9);
-      OP2(SLJIT_SUB | SLJIT_SET_U, SLJIT_UNUSED, 0, TMP1, 0, SLJIT_IMM, 0xd - 0x9);
-      OP_FLAGS(SLJIT_MOV, TMP2, 0, SLJIT_UNUSED, 0, SLJIT_C_LESS_EQUAL);
-
-      OP2(SLJIT_SUB | SLJIT_SET_E, SLJIT_UNUSED, 0, TMP1, 0, SLJIT_IMM, 0x85 - 0x9);
-      OP_FLAGS(SLJIT_OR | SLJIT_SET_E, TMP2, 0, TMP2, 0, SLJIT_C_EQUAL);
-
-      OP2(SLJIT_SUB | SLJIT_SET_E, SLJIT_UNUSED, 0, TMP1, 0, SLJIT_IMM, 0x180e - 0x9);
-      OP_FLAGS(SLJIT_OR | SLJIT_SET_E, TMP2, 0, TMP2, 0, SLJIT_C_EQUAL);
-
-      SET_TYPE_OFFSET(ucp_Zl);
-      OP2(SLJIT_SUB | SLJIT_SET_U, SLJIT_UNUSED, 0, typereg, 0, SLJIT_IMM, ucp_Zs - ucp_Zl);
-      OP_FLAGS(SLJIT_OR | SLJIT_SET_E, TMP2, 0, TMP2, 0, SLJIT_C_LESS_EQUAL);
-      jump = JUMP(SLJIT_C_NOT_ZERO ^ invertcmp);
-      break;
-
-      case PT_WORD:
-      OP2(SLJIT_SUB | SLJIT_SET_E, SLJIT_UNUSED, 0, TMP1, 0, SLJIT_IMM, (sljit_sw)(CHAR_UNDERSCORE - charoffset));
-      OP_FLAGS(SLJIT_MOV, TMP2, 0, SLJIT_UNUSED, 0, SLJIT_C_EQUAL);
-      /* Fall through. */
-
-      case PT_ALNUM:
-      SET_TYPE_OFFSET(ucp_Ll);
-      OP2(SLJIT_SUB | SLJIT_SET_U, SLJIT_UNUSED, 0, typereg, 0, SLJIT_IMM, ucp_Lu - ucp_Ll);
-      OP_FLAGS((*cc == PT_ALNUM) ? SLJIT_MOV : SLJIT_OR, TMP2, 0, (*cc == PT_ALNUM) ? SLJIT_UNUSED : TMP2, 0, SLJIT_C_LESS_EQUAL);
-      SET_TYPE_OFFSET(ucp_Nd);
-      OP2(SLJIT_SUB | SLJIT_SET_U, SLJIT_UNUSED, 0, typereg, 0, SLJIT_IMM, ucp_No - ucp_Nd);
-      OP_FLAGS(SLJIT_OR | SLJIT_SET_E, TMP2, 0, TMP2, 0, SLJIT_C_LESS_EQUAL);
-      jump = JUMP(SLJIT_C_NOT_ZERO ^ invertcmp);
-      break;
-
-      case PT_CLIST:
-      other_cases = PRIV(ucd_caseless_sets) + cc[1];
-
-      /* At least three characters are required.
-         Otherwise this case would be handled by the normal code path. */
-      SLJIT_ASSERT(other_cases[0] != NOTACHAR && other_cases[1] != NOTACHAR && other_cases[2] != NOTACHAR);
-      SLJIT_ASSERT(other_cases[0] < other_cases[1] && other_cases[1] < other_cases[2]);
-
-      /* Optimizing character pairs, if their difference is power of 2. */
-      if (is_powerof2(other_cases[1] ^ other_cases[0]))
-        {
-        if (charoffset == 0)
-          OP2(SLJIT_OR, TMP2, 0, TMP1, 0, SLJIT_IMM, other_cases[1] ^ other_cases[0]);
-        else
-          {
-          OP2(SLJIT_ADD, TMP2, 0, TMP1, 0, SLJIT_IMM, (sljit_sw)charoffset);
-          OP2(SLJIT_OR, TMP2, 0, TMP2, 0, SLJIT_IMM, other_cases[1] ^ other_cases[0]);
-          }
-        OP2(SLJIT_SUB | SLJIT_SET_E, SLJIT_UNUSED, 0, TMP2, 0, SLJIT_IMM, other_cases[1]);
-        OP_FLAGS(SLJIT_MOV, TMP2, 0, SLJIT_UNUSED, 0, SLJIT_C_EQUAL);
-        other_cases += 2;
-        }
-      else if (is_powerof2(other_cases[2] ^ other_cases[1]))
-        {
-        if (charoffset == 0)
-          OP2(SLJIT_OR, TMP2, 0, TMP1, 0, SLJIT_IMM, other_cases[2] ^ other_cases[1]);
-        else
-          {
-          OP2(SLJIT_ADD, TMP2, 0, TMP1, 0, SLJIT_IMM, (sljit_sw)charoffset);
-          OP2(SLJIT_OR, TMP2, 0, TMP2, 0, SLJIT_IMM, other_cases[1] ^ other_cases[0]);
-          }
-        OP2(SLJIT_SUB | SLJIT_SET_E, SLJIT_UNUSED, 0, TMP2, 0, SLJIT_IMM, other_cases[2]);
-        OP_FLAGS(SLJIT_MOV, TMP2, 0, SLJIT_UNUSED, 0, SLJIT_C_EQUAL);
-
-        OP2(SLJIT_SUB | SLJIT_SET_E, SLJIT_UNUSED, 0, TMP1, 0, SLJIT_IMM, (sljit_sw)(other_cases[0] - charoffset));
-        OP_FLAGS(SLJIT_OR | ((other_cases[3] == NOTACHAR) ? SLJIT_SET_E : 0), TMP2, 0, TMP2, 0, SLJIT_C_EQUAL);
-
-        other_cases += 3;
-        }
-      else
-        {
-        OP2(SLJIT_SUB | SLJIT_SET_E, SLJIT_UNUSED, 0, TMP1, 0, SLJIT_IMM, (sljit_sw)(*other_cases++ - charoffset));
-        OP_FLAGS(SLJIT_MOV, TMP2, 0, SLJIT_UNUSED, 0, SLJIT_C_EQUAL);
-        }
-
-      while (*other_cases != NOTACHAR)
-        {
-        OP2(SLJIT_SUB | SLJIT_SET_E, SLJIT_UNUSED, 0, TMP1, 0, SLJIT_IMM, (sljit_sw)(*other_cases++ - charoffset));
-        OP_FLAGS(SLJIT_OR | ((*other_cases == NOTACHAR) ? SLJIT_SET_E : 0), TMP2, 0, TMP2, 0, SLJIT_C_EQUAL);
-        }
-      jump = JUMP(SLJIT_C_NOT_ZERO ^ invertcmp);
-      break;
-
-      case PT_UCNC:
-      OP2(SLJIT_SUB | SLJIT_SET_E, SLJIT_UNUSED, 0, TMP1, 0, SLJIT_IMM, (sljit_sw)(CHAR_DOLLAR_SIGN - charoffset));
-      OP_FLAGS(SLJIT_MOV, TMP2, 0, SLJIT_UNUSED, 0, SLJIT_C_EQUAL);
-      OP2(SLJIT_SUB | SLJIT_SET_E, SLJIT_UNUSED, 0, TMP1, 0, SLJIT_IMM, (sljit_sw)(CHAR_COMMERCIAL_AT - charoffset));
-      OP_FLAGS(SLJIT_OR, TMP2, 0, TMP2, 0, SLJIT_C_EQUAL);
-      OP2(SLJIT_SUB | SLJIT_SET_E, SLJIT_UNUSED, 0, TMP1, 0, SLJIT_IMM, (sljit_sw)(CHAR_GRAVE_ACCENT - charoffset));
-      OP_FLAGS(SLJIT_OR, TMP2, 0, TMP2, 0, SLJIT_C_EQUAL);
-
-      SET_CHAR_OFFSET(0xa0);
-      OP2(SLJIT_SUB | SLJIT_SET_U, SLJIT_UNUSED, 0, TMP1, 0, SLJIT_IMM, (sljit_sw)(0xd7ff - charoffset));
-      OP_FLAGS(SLJIT_OR, TMP2, 0, TMP2, 0, SLJIT_C_LESS_EQUAL);
-      SET_CHAR_OFFSET(0);
-      OP2(SLJIT_SUB | SLJIT_SET_U, SLJIT_UNUSED, 0, TMP1, 0, SLJIT_IMM, 0xe000 - 0);
-      OP_FLAGS(SLJIT_OR | SLJIT_SET_E, TMP2, 0, TMP2, 0, SLJIT_C_GREATER_EQUAL);
-      jump = JUMP(SLJIT_C_NOT_ZERO ^ invertcmp);
-      break;
-
-      case PT_PXGRAPH:
-      /* C and Z groups are the farthest two groups. */
-      SET_TYPE_OFFSET(ucp_Ll);
-      OP2(SLJIT_SUB | SLJIT_SET_U, SLJIT_UNUSED, 0, typereg, 0, SLJIT_IMM, ucp_So - ucp_Ll);
-      OP_FLAGS(SLJIT_MOV, TMP2, 0, SLJIT_UNUSED, 0, SLJIT_C_GREATER);
-
-      jump = CMP(SLJIT_C_NOT_EQUAL, typereg, 0, SLJIT_IMM, ucp_Cf - ucp_Ll);
-
-      /* In case of ucp_Cf, we overwrite the result. */
-      SET_CHAR_OFFSET(0x2066);
-      OP2(SLJIT_SUB | SLJIT_SET_U, SLJIT_UNUSED, 0, TMP1, 0, SLJIT_IMM, 0x2069 - 0x2066);
-      OP_FLAGS(SLJIT_MOV, TMP2, 0, SLJIT_UNUSED, 0, SLJIT_C_LESS_EQUAL);
-
-      OP2(SLJIT_SUB | SLJIT_SET_E, SLJIT_UNUSED, 0, TMP1, 0, SLJIT_IMM, 0x061c - 0x2066);
-      OP_FLAGS(SLJIT_OR, TMP2, 0, TMP2, 0, SLJIT_C_EQUAL);
-
-      OP2(SLJIT_SUB | SLJIT_SET_E, SLJIT_UNUSED, 0, TMP1, 0, SLJIT_IMM, 0x180e - 0x2066);
-      OP_FLAGS(SLJIT_OR, TMP2, 0, TMP2, 0, SLJIT_C_EQUAL);
-
-      JUMPHERE(jump);
-      jump = CMP(SLJIT_C_ZERO ^ invertcmp, TMP2, 0, SLJIT_IMM, 0);
-      break;
-
-      case PT_PXPRINT:
-      /* C and Z groups are the farthest two groups. */
-      SET_TYPE_OFFSET(ucp_Ll);
-      OP2(SLJIT_SUB | SLJIT_SET_U, SLJIT_UNUSED, 0, typereg, 0, SLJIT_IMM, ucp_So - ucp_Ll);
-      OP_FLAGS(SLJIT_MOV, TMP2, 0, SLJIT_UNUSED, 0, SLJIT_C_GREATER);
-
-      OP2(SLJIT_SUB | SLJIT_SET_E, SLJIT_UNUSED, 0, typereg, 0, SLJIT_IMM, ucp_Zs - ucp_Ll);
-      OP_FLAGS(SLJIT_AND, TMP2, 0, TMP2, 0, SLJIT_C_NOT_EQUAL);
-
-      jump = CMP(SLJIT_C_NOT_EQUAL, typereg, 0, SLJIT_IMM, ucp_Cf - ucp_Ll);
-
-      /* In case of ucp_Cf, we overwrite the result. */
-      SET_CHAR_OFFSET(0x2066);
-      OP2(SLJIT_SUB | SLJIT_SET_U, SLJIT_UNUSED, 0, TMP1, 0, SLJIT_IMM, 0x2069 - 0x2066);
-      OP_FLAGS(SLJIT_MOV, TMP2, 0, SLJIT_UNUSED, 0, SLJIT_C_LESS_EQUAL);
-
-      OP2(SLJIT_SUB | SLJIT_SET_E, SLJIT_UNUSED, 0, TMP1, 0, SLJIT_IMM, 0x061c - 0x2066);
-      OP_FLAGS(SLJIT_OR, TMP2, 0, TMP2, 0, SLJIT_C_EQUAL);
-
-      JUMPHERE(jump);
-      jump = CMP(SLJIT_C_ZERO ^ invertcmp, TMP2, 0, SLJIT_IMM, 0);
-      break;
-
-      case PT_PXPUNCT:
-      SET_TYPE_OFFSET(ucp_Sc);
-      OP2(SLJIT_SUB | SLJIT_SET_U, SLJIT_UNUSED, 0, typereg, 0, SLJIT_IMM, ucp_So - ucp_Sc);
-      OP_FLAGS(SLJIT_MOV, TMP2, 0, SLJIT_UNUSED, 0, SLJIT_C_LESS_EQUAL);
-
-      SET_CHAR_OFFSET(0);
-      OP2(SLJIT_SUB | SLJIT_SET_U, SLJIT_UNUSED, 0, TMP1, 0, SLJIT_IMM, 0xff);
-      OP_FLAGS(SLJIT_AND, TMP2, 0, TMP2, 0, SLJIT_C_LESS_EQUAL);
-
-      SET_TYPE_OFFSET(ucp_Pc);
-      OP2(SLJIT_SUB | SLJIT_SET_U, SLJIT_UNUSED, 0, typereg, 0, SLJIT_IMM, ucp_Ps - ucp_Pc);
-      OP_FLAGS(SLJIT_OR | SLJIT_SET_E, TMP2, 0, TMP2, 0, SLJIT_C_LESS_EQUAL);
-      jump = JUMP(SLJIT_C_NOT_ZERO ^ invertcmp);
-      break;
-      }
-    cc += 2;
-    }
-#endif
-
-  if (jump != NULL)
-    add_jump(compiler, compares > 0 ? list : backtracks, jump);
-  }
-
-if (found != NULL)
-  set_jumps(found, LABEL());
-}
-
-#undef SET_TYPE_OFFSET
-#undef SET_CHAR_OFFSET
-
-#endif
-
-static pcre_uchar *compile_char1_matchingpath(compiler_common *common, pcre_uchar type, pcre_uchar *cc, jump_list **backtracks)
-{
-DEFINE_COMPILER;
-int length;
-unsigned int c, oc, bit;
-compare_context context;
-struct sljit_jump *jump[4];
-jump_list *end_list;
-#ifdef SUPPORT_UTF
-struct sljit_label *label;
-#ifdef SUPPORT_UCP
-pcre_uchar propdata[5];
-#endif
-#endif /* SUPPORT_UTF */
-
-switch(type)
-  {
-  case OP_SOD:
-  OP1(SLJIT_MOV, TMP1, 0, ARGUMENTS, 0);
-  OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(TMP1), SLJIT_OFFSETOF(jit_arguments, begin));
-  add_jump(compiler, backtracks, CMP(SLJIT_C_NOT_EQUAL, STR_PTR, 0, TMP1, 0));
-  return cc;
-
-  case OP_SOM:
-  OP1(SLJIT_MOV, TMP1, 0, ARGUMENTS, 0);
-  OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(TMP1), SLJIT_OFFSETOF(jit_arguments, str));
-  add_jump(compiler, backtracks, CMP(SLJIT_C_NOT_EQUAL, STR_PTR, 0, TMP1, 0));
-  return cc;
-
-  case OP_NOT_WORD_BOUNDARY:
-  case OP_WORD_BOUNDARY:
-  add_jump(compiler, &common->wordboundary, JUMP(SLJIT_FAST_CALL));
-  add_jump(compiler, backtracks, JUMP(type == OP_NOT_WORD_BOUNDARY ? SLJIT_C_NOT_ZERO : SLJIT_C_ZERO));
-  return cc;
-
-  case OP_NOT_DIGIT:
-  case OP_DIGIT:
-  /* Digits are usually 0-9, so it is worth to optimize them. */
-  detect_partial_match(common, backtracks);
-#if defined SUPPORT_UTF && defined COMPILE_PCRE8
-  if (common->utf && is_char7_bitset((const pcre_uint8*)common->ctypes - cbit_length + cbit_digit, FALSE))
-    read_char7_type(common, type == OP_NOT_DIGIT);
-  else
-#endif
-    read_char8_type(common, type == OP_NOT_DIGIT);
-    /* Flip the starting bit in the negative case. */
-  OP2(SLJIT_AND | SLJIT_SET_E, SLJIT_UNUSED, 0, TMP1, 0, SLJIT_IMM, ctype_digit);
-  add_jump(compiler, backtracks, JUMP(type == OP_DIGIT ? SLJIT_C_ZERO : SLJIT_C_NOT_ZERO));
-  return cc;
-
-  case OP_NOT_WHITESPACE:
-  case OP_WHITESPACE:
-  detect_partial_match(common, backtracks);
-#if defined SUPPORT_UTF && defined COMPILE_PCRE8
-  if (common->utf && is_char7_bitset((const pcre_uint8*)common->ctypes - cbit_length + cbit_space, FALSE))
-    read_char7_type(common, type == OP_NOT_WHITESPACE);
-  else
-#endif
-    read_char8_type(common, type == OP_NOT_WHITESPACE);
-  OP2(SLJIT_AND | SLJIT_SET_E, SLJIT_UNUSED, 0, TMP1, 0, SLJIT_IMM, ctype_space);
-  add_jump(compiler, backtracks, JUMP(type == OP_WHITESPACE ? SLJIT_C_ZERO : SLJIT_C_NOT_ZERO));
-  return cc;
-
-  case OP_NOT_WORDCHAR:
-  case OP_WORDCHAR:
-  detect_partial_match(common, backtracks);
-#if defined SUPPORT_UTF && defined COMPILE_PCRE8
-  if (common->utf && is_char7_bitset((const pcre_uint8*)common->ctypes - cbit_length + cbit_word, FALSE))
-    read_char7_type(common, type == OP_NOT_WORDCHAR);
-  else
-#endif
-    read_char8_type(common, type == OP_NOT_WORDCHAR);
-  OP2(SLJIT_AND | SLJIT_SET_E, SLJIT_UNUSED, 0, TMP1, 0, SLJIT_IMM, ctype_word);
-  add_jump(compiler, backtracks, JUMP(type == OP_WORDCHAR ? SLJIT_C_ZERO : SLJIT_C_NOT_ZERO));
-  return cc;
-
-  case OP_ANY:
-  detect_partial_match(common, backtracks);
-  read_char_range(common, common->nlmin, common->nlmax, TRUE);
-  if (common->nltype == NLTYPE_FIXED && common->newline > 255)
-    {
-    jump[0] = CMP(SLJIT_C_NOT_EQUAL, TMP1, 0, SLJIT_IMM, (common->newline >> 8) & 0xff);
-    end_list = NULL;
-    if (common->mode != JIT_PARTIAL_HARD_COMPILE)
-      add_jump(compiler, &end_list, CMP(SLJIT_C_GREATER_EQUAL, STR_PTR, 0, STR_END, 0));
-    else
-      check_str_end(common, &end_list);
-
-    OP1(MOV_UCHAR, TMP1, 0, SLJIT_MEM1(STR_PTR), 0);
-    add_jump(compiler, backtracks, CMP(SLJIT_C_EQUAL, TMP1, 0, SLJIT_IMM, common->newline & 0xff));
-    set_jumps(end_list, LABEL());
-    JUMPHERE(jump[0]);
-    }
-  else
-    check_newlinechar(common, common->nltype, backtracks, TRUE);
-  return cc;
-
-  case OP_ALLANY:
-  detect_partial_match(common, backtracks);
-#ifdef SUPPORT_UTF
-  if (common->utf)
-    {
-    OP1(MOV_UCHAR, TMP1, 0, SLJIT_MEM1(STR_PTR), 0);
-    OP2(SLJIT_ADD, STR_PTR, 0, STR_PTR, 0, SLJIT_IMM, IN_UCHARS(1));
-#if defined COMPILE_PCRE8 || defined COMPILE_PCRE16
-#if defined COMPILE_PCRE8
-    jump[0] = CMP(SLJIT_C_LESS, TMP1, 0, SLJIT_IMM, 0xc0);
-    OP1(SLJIT_MOV_UB, TMP1, 0, SLJIT_MEM1(TMP1), (sljit_sw)PRIV(utf8_table4) - 0xc0);
-    OP2(SLJIT_ADD, STR_PTR, 0, STR_PTR, 0, TMP1, 0);
-#elif defined COMPILE_PCRE16
-    jump[0] = CMP(SLJIT_C_LESS, TMP1, 0, SLJIT_IMM, 0xd800);
-    OP2(SLJIT_AND, TMP1, 0, TMP1, 0, SLJIT_IMM, 0xfc00);
-    OP2(SLJIT_SUB | SLJIT_SET_E, SLJIT_UNUSED, 0, TMP1, 0, SLJIT_IMM, 0xd800);
-    OP_FLAGS(SLJIT_MOV, TMP1, 0, SLJIT_UNUSED, 0, SLJIT_C_EQUAL);
-    OP2(SLJIT_SHL, TMP1, 0, TMP1, 0, SLJIT_IMM, 1);
-    OP2(SLJIT_ADD, STR_PTR, 0, STR_PTR, 0, TMP1, 0);
-#endif
-    JUMPHERE(jump[0]);
-#endif /* COMPILE_PCRE[8|16] */
-    return cc;
-    }
-#endif
-  OP2(SLJIT_ADD, STR_PTR, 0, STR_PTR, 0, SLJIT_IMM, IN_UCHARS(1));
-  return cc;
-
-  case OP_ANYBYTE:
-  detect_partial_match(common, backtracks);
-  OP2(SLJIT_ADD, STR_PTR, 0, STR_PTR, 0, SLJIT_IMM, IN_UCHARS(1));
-  return cc;
-
-#ifdef SUPPORT_UTF
-#ifdef SUPPORT_UCP
-  case OP_NOTPROP:
-  case OP_PROP:
-  propdata[0] = XCL_HASPROP;
-  propdata[1] = type == OP_NOTPROP ? XCL_NOTPROP : XCL_PROP;
-  propdata[2] = cc[0];
-  propdata[3] = cc[1];
-  propdata[4] = XCL_END;
-  compile_xclass_matchingpath(common, propdata, backtracks);
-  return cc + 2;
-#endif
-#endif
-
-  case OP_ANYNL:
-  detect_partial_match(common, backtracks);
-  read_char_range(common, common->bsr_nlmin, common->bsr_nlmax, FALSE);
-  jump[0] = CMP(SLJIT_C_NOT_EQUAL, TMP1, 0, SLJIT_IMM, CHAR_CR);
-  /* We don't need to handle soft partial matching case. */
-  end_list = NULL;
-  if (common->mode != JIT_PARTIAL_HARD_COMPILE)
-    add_jump(compiler, &end_list, CMP(SLJIT_C_GREATER_EQUAL, STR_PTR, 0, STR_END, 0));
-  else
-    check_str_end(common, &end_list);
-  OP1(MOV_UCHAR, TMP1, 0, SLJIT_MEM1(STR_PTR), 0);
-  jump[1] = CMP(SLJIT_C_NOT_EQUAL, TMP1, 0, SLJIT_IMM, CHAR_NL);
-  OP2(SLJIT_ADD, STR_PTR, 0, STR_PTR, 0, SLJIT_IMM, IN_UCHARS(1));
-  jump[2] = JUMP(SLJIT_JUMP);
-  JUMPHERE(jump[0]);
-  check_newlinechar(common, common->bsr_nltype, backtracks, FALSE);
-  set_jumps(end_list, LABEL());
-  JUMPHERE(jump[1]);
-  JUMPHERE(jump[2]);
-  return cc;
-
-  case OP_NOT_HSPACE:
-  case OP_HSPACE:
-  detect_partial_match(common, backtracks);
-  read_char_range(common, 0x9, 0x3000, type == OP_NOT_HSPACE);
-  add_jump(compiler, &common->hspace, JUMP(SLJIT_FAST_CALL));
-  add_jump(compiler, backtracks, JUMP(type == OP_NOT_HSPACE ? SLJIT_C_NOT_ZERO : SLJIT_C_ZERO));
-  return cc;
-
-  case OP_NOT_VSPACE:
-  case OP_VSPACE:
-  detect_partial_match(common, backtracks);
-  read_char_range(common, 0xa, 0x2029, type == OP_NOT_VSPACE);
-  add_jump(compiler, &common->vspace, JUMP(SLJIT_FAST_CALL));
-  add_jump(compiler, backtracks, JUMP(type == OP_NOT_VSPACE ? SLJIT_C_NOT_ZERO : SLJIT_C_ZERO));
-  return cc;
-
-#ifdef SUPPORT_UCP
-  case OP_EXTUNI:
-  detect_partial_match(common, backtracks);
-  read_char(common);
-  add_jump(compiler, &common->getucd, JUMP(SLJIT_FAST_CALL));
-  OP1(SLJIT_MOV, TMP1, 0, SLJIT_IMM, (sljit_sw)PRIV(ucd_records) + SLJIT_OFFSETOF(ucd_record, gbprop));
-  /* Optimize register allocation: use a real register. */
-  OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_LOCALS_REG), LOCALS0, STACK_TOP, 0);
-  OP1(SLJIT_MOV_UB, STACK_TOP, 0, SLJIT_MEM2(TMP1, TMP2), 3);
-
-  label = LABEL();
-  jump[0] = CMP(SLJIT_C_GREATER_EQUAL, STR_PTR, 0, STR_END, 0);
-  OP1(SLJIT_MOV, TMP3, 0, STR_PTR, 0);
-  read_char(common);
-  add_jump(compiler, &common->getucd, JUMP(SLJIT_FAST_CALL));
-  OP1(SLJIT_MOV, TMP1, 0, SLJIT_IMM, (sljit_sw)PRIV(ucd_records) + SLJIT_OFFSETOF(ucd_record, gbprop));
-  OP1(SLJIT_MOV_UB, TMP2, 0, SLJIT_MEM2(TMP1, TMP2), 3);
-
-  OP2(SLJIT_SHL, STACK_TOP, 0, STACK_TOP, 0, SLJIT_IMM, 2);
-  OP1(SLJIT_MOV_UI, TMP1, 0, SLJIT_MEM1(STACK_TOP), (sljit_sw)PRIV(ucp_gbtable));
-  OP1(SLJIT_MOV, STACK_TOP, 0, TMP2, 0);
-  OP2(SLJIT_SHL, TMP2, 0, SLJIT_IMM, 1, TMP2, 0);
-  OP2(SLJIT_AND | SLJIT_SET_E, SLJIT_UNUSED, 0, TMP1, 0, TMP2, 0);
-  JUMPTO(SLJIT_C_NOT_ZERO, label);
-
-  OP1(SLJIT_MOV, STR_PTR, 0, TMP3, 0);
-  JUMPHERE(jump[0]);
-  OP1(SLJIT_MOV, STACK_TOP, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), LOCALS0);
-
-  if (common->mode == JIT_PARTIAL_HARD_COMPILE)
-    {
-    jump[0] = CMP(SLJIT_C_LESS, STR_PTR, 0, STR_END, 0);
-    /* Since we successfully read a char above, partial matching must occure. */
-    check_partial(common, TRUE);
-    JUMPHERE(jump[0]);
-    }
-  return cc;
-#endif
-
-  case OP_EODN:
-  /* Requires rather complex checks. */
-  jump[0] = CMP(SLJIT_C_GREATER_EQUAL, STR_PTR, 0, STR_END, 0);
-  if (common->nltype == NLTYPE_FIXED && common->newline > 255)
-    {
-    OP2(SLJIT_ADD, TMP2, 0, STR_PTR, 0, SLJIT_IMM, IN_UCHARS(2));
-    OP1(MOV_UCHAR, TMP1, 0, SLJIT_MEM1(STR_PTR), IN_UCHARS(0));
-    if (common->mode == JIT_COMPILE)
-      add_jump(compiler, backtracks, CMP(SLJIT_C_NOT_EQUAL, TMP2, 0, STR_END, 0));
-    else
-      {
-      jump[1] = CMP(SLJIT_C_EQUAL, TMP2, 0, STR_END, 0);
-      OP2(SLJIT_SUB | SLJIT_SET_U, SLJIT_UNUSED, 0, TMP2, 0, STR_END, 0);
-      OP_FLAGS(SLJIT_MOV, TMP2, 0, SLJIT_UNUSED, 0, SLJIT_C_LESS);
-      OP2(SLJIT_SUB | SLJIT_SET_E, SLJIT_UNUSED, 0, TMP1, 0, SLJIT_IMM, (common->newline >> 8) & 0xff);
-      OP_FLAGS(SLJIT_OR | SLJIT_SET_E, TMP2, 0, TMP2, 0, SLJIT_C_NOT_EQUAL);
-      add_jump(compiler, backtracks, JUMP(SLJIT_C_NOT_EQUAL));
-      check_partial(common, TRUE);
-      add_jump(compiler, backtracks, JUMP(SLJIT_JUMP));
-      JUMPHERE(jump[1]);
-      }
-    OP1(MOV_UCHAR, TMP2, 0, SLJIT_MEM1(STR_PTR), IN_UCHARS(1));
-    add_jump(compiler, backtracks, CMP(SLJIT_C_NOT_EQUAL, TMP1, 0, SLJIT_IMM, (common->newline >> 8) & 0xff));
-    add_jump(compiler, backtracks, CMP(SLJIT_C_NOT_EQUAL, TMP2, 0, SLJIT_IMM, common->newline & 0xff));
-    }
-  else if (common->nltype == NLTYPE_FIXED)
-    {
-    OP2(SLJIT_ADD, TMP2, 0, STR_PTR, 0, SLJIT_IMM, IN_UCHARS(1));
-    OP1(MOV_UCHAR, TMP1, 0, SLJIT_MEM1(STR_PTR), IN_UCHARS(0));
-    add_jump(compiler, backtracks, CMP(SLJIT_C_NOT_EQUAL, TMP2, 0, STR_END, 0));
-    add_jump(compiler, backtracks, CMP(SLJIT_C_NOT_EQUAL, TMP1, 0, SLJIT_IMM, common->newline));
-    }
-  else
-    {
-    OP1(MOV_UCHAR, TMP1, 0, SLJIT_MEM1(STR_PTR), IN_UCHARS(0));
-    jump[1] = CMP(SLJIT_C_NOT_EQUAL, TMP1, 0, SLJIT_IMM, CHAR_CR);
-    OP2(SLJIT_ADD, TMP2, 0, STR_PTR, 0, SLJIT_IMM, IN_UCHARS(2));
-    OP2(SLJIT_SUB | SLJIT_SET_U, SLJIT_UNUSED, 0, TMP2, 0, STR_END, 0);
-    jump[2] = JUMP(SLJIT_C_GREATER);
-    add_jump(compiler, backtracks, JUMP(SLJIT_C_LESS));
-    /* Equal. */
-    OP1(MOV_UCHAR, TMP1, 0, SLJIT_MEM1(STR_PTR), IN_UCHARS(1));
-    jump[3] = CMP(SLJIT_C_EQUAL, TMP1, 0, SLJIT_IMM, CHAR_NL);
-    add_jump(compiler, backtracks, JUMP(SLJIT_JUMP));
-
-    JUMPHERE(jump[1]);
-    if (common->nltype == NLTYPE_ANYCRLF)
-      {
-      OP2(SLJIT_ADD, TMP2, 0, STR_PTR, 0, SLJIT_IMM, IN_UCHARS(1));
-      add_jump(compiler, backtracks, CMP(SLJIT_C_LESS, TMP2, 0, STR_END, 0));
-      add_jump(compiler, backtracks, CMP(SLJIT_C_NOT_EQUAL, TMP1, 0, SLJIT_IMM, CHAR_NL));
-      }
-    else
-      {
-      OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_LOCALS_REG), LOCALS1, STR_PTR, 0);
-      read_char_range(common, common->nlmin, common->nlmax, TRUE);
-      add_jump(compiler, backtracks, CMP(SLJIT_C_NOT_EQUAL, STR_PTR, 0, STR_END, 0));
-      add_jump(compiler, &common->anynewline, JUMP(SLJIT_FAST_CALL));
-      add_jump(compiler, backtracks, JUMP(SLJIT_C_ZERO));
-      OP1(SLJIT_MOV, STR_PTR, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), LOCALS1);
-      }
-    JUMPHERE(jump[2]);
-    JUMPHERE(jump[3]);
-    }
-  JUMPHERE(jump[0]);
-  check_partial(common, FALSE);
-  return cc;
-
-  case OP_EOD:
-  add_jump(compiler, backtracks, CMP(SLJIT_C_LESS, STR_PTR, 0, STR_END, 0));
-  check_partial(common, FALSE);
-  return cc;
-
-  case OP_CIRC:
-  OP1(SLJIT_MOV, TMP2, 0, ARGUMENTS, 0);
-  OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(TMP2), SLJIT_OFFSETOF(jit_arguments, begin));
-  add_jump(compiler, backtracks, CMP(SLJIT_C_GREATER, STR_PTR, 0, TMP1, 0));
-  OP1(SLJIT_MOV_UB, TMP2, 0, SLJIT_MEM1(TMP2), SLJIT_OFFSETOF(jit_arguments, notbol));
-  add_jump(compiler, backtracks, CMP(SLJIT_C_NOT_EQUAL, TMP2, 0, SLJIT_IMM, 0));
-  return cc;
-
-  case OP_CIRCM:
-  OP1(SLJIT_MOV, TMP2, 0, ARGUMENTS, 0);
-  OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(TMP2), SLJIT_OFFSETOF(jit_arguments, begin));
-  jump[1] = CMP(SLJIT_C_GREATER, STR_PTR, 0, TMP1, 0);
-  OP1(SLJIT_MOV_UB, TMP2, 0, SLJIT_MEM1(TMP2), SLJIT_OFFSETOF(jit_arguments, notbol));
-  add_jump(compiler, backtracks, CMP(SLJIT_C_NOT_EQUAL, TMP2, 0, SLJIT_IMM, 0));
-  jump[0] = JUMP(SLJIT_JUMP);
-  JUMPHERE(jump[1]);
-
-  add_jump(compiler, backtracks, CMP(SLJIT_C_GREATER_EQUAL, STR_PTR, 0, STR_END, 0));
-  if (common->nltype == NLTYPE_FIXED && common->newline > 255)
-    {
-    OP2(SLJIT_SUB, TMP2, 0, STR_PTR, 0, SLJIT_IMM, IN_UCHARS(2));
-    add_jump(compiler, backtracks, CMP(SLJIT_C_LESS, TMP2, 0, TMP1, 0));
-    OP1(MOV_UCHAR, TMP1, 0, SLJIT_MEM1(STR_PTR), IN_UCHARS(-2));
-    OP1(MOV_UCHAR, TMP2, 0, SLJIT_MEM1(STR_PTR), IN_UCHARS(-1));
-    add_jump(compiler, backtracks, CMP(SLJIT_C_NOT_EQUAL, TMP1, 0, SLJIT_IMM, (common->newline >> 8) & 0xff));
-    add_jump(compiler, backtracks, CMP(SLJIT_C_NOT_EQUAL, TMP2, 0, SLJIT_IMM, common->newline & 0xff));
-    }
-  else
-    {
-    skip_char_back(common);
-    read_char_range(common, common->nlmin, common->nlmax, TRUE);
-    check_newlinechar(common, common->nltype, backtracks, FALSE);
-    }
-  JUMPHERE(jump[0]);
-  return cc;
-
-  case OP_DOLL:
-  OP1(SLJIT_MOV, TMP2, 0, ARGUMENTS, 0);
-  OP1(SLJIT_MOV_UB, TMP2, 0, SLJIT_MEM1(TMP2), SLJIT_OFFSETOF(jit_arguments, noteol));
-  add_jump(compiler, backtracks, CMP(SLJIT_C_NOT_EQUAL, TMP2, 0, SLJIT_IMM, 0));
-
-  if (!common->endonly)
-    compile_char1_matchingpath(common, OP_EODN, cc, backtracks);
-  else
-    {
-    add_jump(compiler, backtracks, CMP(SLJIT_C_LESS, STR_PTR, 0, STR_END, 0));
-    check_partial(common, FALSE);
-    }
-  return cc;
-
-  case OP_DOLLM:
-  jump[1] = CMP(SLJIT_C_LESS, STR_PTR, 0, STR_END, 0);
-  OP1(SLJIT_MOV, TMP2, 0, ARGUMENTS, 0);
-  OP1(SLJIT_MOV_UB, TMP2, 0, SLJIT_MEM1(TMP2), SLJIT_OFFSETOF(jit_arguments, noteol));
-  add_jump(compiler, backtracks, CMP(SLJIT_C_NOT_EQUAL, TMP2, 0, SLJIT_IMM, 0));
-  check_partial(common, FALSE);
-  jump[0] = JUMP(SLJIT_JUMP);
-  JUMPHERE(jump[1]);
-
-  if (common->nltype == NLTYPE_FIXED && common->newline > 255)
-    {
-    OP2(SLJIT_ADD, TMP2, 0, STR_PTR, 0, SLJIT_IMM, IN_UCHARS(2));
-    OP1(MOV_UCHAR, TMP1, 0, SLJIT_MEM1(STR_PTR), IN_UCHARS(0));
-    if (common->mode == JIT_COMPILE)
-      add_jump(compiler, backtracks, CMP(SLJIT_C_GREATER, TMP2, 0, STR_END, 0));
-    else
-      {
-      jump[1] = CMP(SLJIT_C_LESS_EQUAL, TMP2, 0, STR_END, 0);
-      /* STR_PTR = STR_END - IN_UCHARS(1) */
-      add_jump(compiler, backtracks, CMP(SLJIT_C_NOT_EQUAL, TMP1, 0, SLJIT_IMM, (common->newline >> 8) & 0xff));
-      check_partial(common, TRUE);
-      add_jump(compiler, backtracks, JUMP(SLJIT_JUMP));
-      JUMPHERE(jump[1]);
-      }
-
-    OP1(MOV_UCHAR, TMP2, 0, SLJIT_MEM1(STR_PTR), IN_UCHARS(1));
-    add_jump(compiler, backtracks, CMP(SLJIT_C_NOT_EQUAL, TMP1, 0, SLJIT_IMM, (common->newline >> 8) & 0xff));
-    add_jump(compiler, backtracks, CMP(SLJIT_C_NOT_EQUAL, TMP2, 0, SLJIT_IMM, common->newline & 0xff));
-    }
-  else
-    {
-    peek_char(common, common->nlmax);
-    check_newlinechar(common, common->nltype, backtracks, FALSE);
-    }
-  JUMPHERE(jump[0]);
-  return cc;
-
-  case OP_CHAR:
-  case OP_CHARI:
-  length = 1;
-#ifdef SUPPORT_UTF
-  if (common->utf && HAS_EXTRALEN(*cc)) length += GET_EXTRALEN(*cc);
-#endif
-  if (common->mode == JIT_COMPILE && (type == OP_CHAR || !char_has_othercase(common, cc) || char_get_othercase_bit(common, cc) != 0))
-    {
-    OP2(SLJIT_ADD, STR_PTR, 0, STR_PTR, 0, SLJIT_IMM, IN_UCHARS(length));
-    add_jump(compiler, backtracks, CMP(SLJIT_C_GREATER, STR_PTR, 0, STR_END, 0));
-
-    context.length = IN_UCHARS(length);
-    context.sourcereg = -1;
-#if defined SLJIT_UNALIGNED && SLJIT_UNALIGNED
-    context.ucharptr = 0;
-#endif
-    return byte_sequence_compare(common, type == OP_CHARI, cc, &context, backtracks);
-    }
-
-  detect_partial_match(common, backtracks);
-#ifdef SUPPORT_UTF
-  if (common->utf)
-    {
-    GETCHAR(c, cc);
-    }
-  else
-#endif
-    c = *cc;
-
-  if (type == OP_CHAR || !char_has_othercase(common, cc))
-    {
-    read_char_range(common, c, c, FALSE);
-    add_jump(compiler, backtracks, CMP(SLJIT_C_NOT_EQUAL, TMP1, 0, SLJIT_IMM, c));
-    return cc + length;
-    }
-  oc = char_othercase(common, c);
-  read_char_range(common, c < oc ? c : oc, c > oc ? c : oc, FALSE);
-  bit = c ^ oc;
-  if (is_powerof2(bit))
-    {
-    OP2(SLJIT_OR, TMP1, 0, TMP1, 0, SLJIT_IMM, bit);
-    add_jump(compiler, backtracks, CMP(SLJIT_C_NOT_EQUAL, TMP1, 0, SLJIT_IMM, c | bit));
-    return cc + length;
-    }
-  jump[0] = CMP(SLJIT_C_EQUAL, TMP1, 0, SLJIT_IMM, c);
-  add_jump(compiler, backtracks, CMP(SLJIT_C_NOT_EQUAL, TMP1, 0, SLJIT_IMM, oc));
-  JUMPHERE(jump[0]);
-  return cc + length;
-
-  case OP_NOT:
-  case OP_NOTI:
-  detect_partial_match(common, backtracks);
-  length = 1;
-#ifdef SUPPORT_UTF
-  if (common->utf)
-    {
-#ifdef COMPILE_PCRE8
-    c = *cc;
-    if (c < 128)
-      {
-      OP1(SLJIT_MOV_UB, TMP1, 0, SLJIT_MEM1(STR_PTR), 0);
-      if (type == OP_NOT || !char_has_othercase(common, cc))
-        add_jump(compiler, backtracks, CMP(SLJIT_C_EQUAL, TMP1, 0, SLJIT_IMM, c));
-      else
-        {
-        /* Since UTF8 code page is fixed, we know that c is in [a-z] or [A-Z] range. */
-        OP2(SLJIT_OR, TMP2, 0, TMP1, 0, SLJIT_IMM, 0x20);
-        add_jump(compiler, backtracks, CMP(SLJIT_C_EQUAL, TMP2, 0, SLJIT_IMM, c | 0x20));
-        }
-      /* Skip the variable-length character. */
-      OP2(SLJIT_ADD, STR_PTR, 0, STR_PTR, 0, SLJIT_IMM, IN_UCHARS(1));
-      jump[0] = CMP(SLJIT_C_LESS, TMP1, 0, SLJIT_IMM, 0xc0);
-      OP1(MOV_UCHAR, TMP1, 0, SLJIT_MEM1(TMP1), (sljit_sw)PRIV(utf8_table4) - 0xc0);
-      OP2(SLJIT_ADD, STR_PTR, 0, STR_PTR, 0, TMP1, 0);
-      JUMPHERE(jump[0]);
-      return cc + 1;
-      }
-    else
-#endif /* COMPILE_PCRE8 */
-      {
-      GETCHARLEN(c, cc, length);
-      }
-    }
-  else
-#endif /* SUPPORT_UTF */
-    c = *cc;
-
-  if (type == OP_NOT || !char_has_othercase(common, cc))
-    {
-    read_char_range(common, c, c, TRUE);
-    add_jump(compiler, backtracks, CMP(SLJIT_C_EQUAL, TMP1, 0, SLJIT_IMM, c));
-    }
-  else
-    {
-    oc = char_othercase(common, c);
-    read_char_range(common, c < oc ? c : oc, c > oc ? c : oc, TRUE);
-    bit = c ^ oc;
-    if (is_powerof2(bit))
-      {
-      OP2(SLJIT_OR, TMP1, 0, TMP1, 0, SLJIT_IMM, bit);
-      add_jump(compiler, backtracks, CMP(SLJIT_C_EQUAL, TMP1, 0, SLJIT_IMM, c | bit));
-      }
-    else
-      {
-      add_jump(compiler, backtracks, CMP(SLJIT_C_EQUAL, TMP1, 0, SLJIT_IMM, c));
-      add_jump(compiler, backtracks, CMP(SLJIT_C_EQUAL, TMP1, 0, SLJIT_IMM, oc));
-      }
-    }
-  return cc + length;
-
-  case OP_CLASS:
-  case OP_NCLASS:
-  detect_partial_match(common, backtracks);
-
-#if defined SUPPORT_UTF && defined COMPILE_PCRE8
-  bit = (common->utf && is_char7_bitset((const pcre_uint8 *)cc, type == OP_NCLASS)) ? 127 : 255;
-  read_char_range(common, 0, bit, type == OP_NCLASS);
-#else
-  read_char_range(common, 0, 255, type == OP_NCLASS);
-#endif
-
-  if (check_class_ranges(common, (const pcre_uint8 *)cc, type == OP_NCLASS, FALSE, backtracks))
-    return cc + 32 / sizeof(pcre_uchar);
-
-#if defined SUPPORT_UTF && defined COMPILE_PCRE8
-  jump[0] = NULL;
-  if (common->utf)
-    {
-    jump[0] = CMP(SLJIT_C_GREATER, TMP1, 0, SLJIT_IMM, bit);
-    if (type == OP_CLASS)
-      {
-      add_jump(compiler, backtracks, jump[0]);
-      jump[0] = NULL;
-      }
-    }
-#elif !defined COMPILE_PCRE8
-  jump[0] = CMP(SLJIT_C_GREATER, TMP1, 0, SLJIT_IMM, 255);
-  if (type == OP_CLASS)
-    {
-    add_jump(compiler, backtracks, jump[0]);
-    jump[0] = NULL;
-    }
-#endif /* SUPPORT_UTF && COMPILE_PCRE8 */
-
-  OP2(SLJIT_AND, TMP2, 0, TMP1, 0, SLJIT_IMM, 0x7);
-  OP2(SLJIT_LSHR, TMP1, 0, TMP1, 0, SLJIT_IMM, 3);
-  OP1(SLJIT_MOV_UB, TMP1, 0, SLJIT_MEM1(TMP1), (sljit_sw)cc);
-  OP2(SLJIT_SHL, TMP2, 0, SLJIT_IMM, 1, TMP2, 0);
-  OP2(SLJIT_AND | SLJIT_SET_E, SLJIT_UNUSED, 0, TMP1, 0, TMP2, 0);
-  add_jump(compiler, backtracks, JUMP(SLJIT_C_ZERO));
-
-#if defined SUPPORT_UTF || !defined COMPILE_PCRE8
-  if (jump[0] != NULL)
-    JUMPHERE(jump[0]);
-#endif
-
-  return cc + 32 / sizeof(pcre_uchar);
-
-#if defined SUPPORT_UTF || defined COMPILE_PCRE16 || defined COMPILE_PCRE32
-  case OP_XCLASS:
-  compile_xclass_matchingpath(common, cc + LINK_SIZE, backtracks);
-  return cc + GET(cc, 0) - 1;
-#endif
-
-  case OP_REVERSE:
-  length = GET(cc, 0);
-  if (length == 0)
-    return cc + LINK_SIZE;
-  OP1(SLJIT_MOV, TMP1, 0, ARGUMENTS, 0);
-#ifdef SUPPORT_UTF
-  if (common->utf)
-    {
-    OP1(SLJIT_MOV, TMP3, 0, SLJIT_MEM1(TMP1), SLJIT_OFFSETOF(jit_arguments, begin));
-    OP1(SLJIT_MOV, TMP2, 0, SLJIT_IMM, length);
-    label = LABEL();
-    add_jump(compiler, backtracks, CMP(SLJIT_C_LESS_EQUAL, STR_PTR, 0, TMP3, 0));
-    skip_char_back(common);
-    OP2(SLJIT_SUB | SLJIT_SET_E, TMP2, 0, TMP2, 0, SLJIT_IMM, 1);
-    JUMPTO(SLJIT_C_NOT_ZERO, label);
-    }
-  else
-#endif
-    {
-    OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(TMP1), SLJIT_OFFSETOF(jit_arguments, begin));
-    OP2(SLJIT_SUB, STR_PTR, 0, STR_PTR, 0, SLJIT_IMM, IN_UCHARS(length));
-    add_jump(compiler, backtracks, CMP(SLJIT_C_LESS, STR_PTR, 0, TMP1, 0));
-    }
-  check_start_used_ptr(common);
-  return cc + LINK_SIZE;
-  }
-SLJIT_ASSERT_STOP();
-return cc;
-}
-
-static SLJIT_INLINE pcre_uchar *compile_charn_matchingpath(compiler_common *common, pcre_uchar *cc, pcre_uchar *ccend, jump_list **backtracks)
-{
-/* This function consumes at least one input character. */
-/* To decrease the number of length checks, we try to concatenate the fixed length character sequences. */
-DEFINE_COMPILER;
-pcre_uchar *ccbegin = cc;
-compare_context context;
-int size;
-
-context.length = 0;
-do
-  {
-  if (cc >= ccend)
-    break;
-
-  if (*cc == OP_CHAR)
-    {
-    size = 1;
-#ifdef SUPPORT_UTF
-    if (common->utf && HAS_EXTRALEN(cc[1]))
-      size += GET_EXTRALEN(cc[1]);
-#endif
-    }
-  else if (*cc == OP_CHARI)
-    {
-    size = 1;
-#ifdef SUPPORT_UTF
-    if (common->utf)
-      {
-      if (char_has_othercase(common, cc + 1) && char_get_othercase_bit(common, cc + 1) == 0)
-        size = 0;
-      else if (HAS_EXTRALEN(cc[1]))
-        size += GET_EXTRALEN(cc[1]);
-      }
-    else
-#endif
-    if (char_has_othercase(common, cc + 1) && char_get_othercase_bit(common, cc + 1) == 0)
-      size = 0;
-    }
-  else
-    size = 0;
-
-  cc += 1 + size;
-  context.length += IN_UCHARS(size);
-  }
-while (size > 0 && context.length <= 128);
-
-cc = ccbegin;
-if (context.length > 0)
-  {
-  /* We have a fixed-length byte sequence. */
-  OP2(SLJIT_ADD, STR_PTR, 0, STR_PTR, 0, SLJIT_IMM, context.length);
-  add_jump(compiler, backtracks, CMP(SLJIT_C_GREATER, STR_PTR, 0, STR_END, 0));
-
-  context.sourcereg = -1;
-#if defined SLJIT_UNALIGNED && SLJIT_UNALIGNED
-  context.ucharptr = 0;
-#endif
-  do cc = byte_sequence_compare(common, *cc == OP_CHARI, cc + 1, &context, backtracks); while (context.length > 0);
-  return cc;
-  }
-
-/* A non-fixed length character will be checked if length == 0. */
-return compile_char1_matchingpath(common, *cc, cc + 1, backtracks);
-}
-
-/* Forward definitions. */
-static void compile_matchingpath(compiler_common *, pcre_uchar *, pcre_uchar *, backtrack_common *);
-static void compile_backtrackingpath(compiler_common *, struct backtrack_common *);
-
-#define PUSH_BACKTRACK(size, ccstart, error) \
-  do \
-    { \
-    backtrack = sljit_alloc_memory(compiler, (size)); \
-    if (SLJIT_UNLIKELY(sljit_get_compiler_error(compiler))) \
-      return error; \
-    memset(backtrack, 0, size); \
-    backtrack->prev = parent->top; \
-    backtrack->cc = (ccstart); \
-    parent->top = backtrack; \
-    } \
-  while (0)
-
-#define PUSH_BACKTRACK_NOVALUE(size, ccstart) \
-  do \
-    { \
-    backtrack = sljit_alloc_memory(compiler, (size)); \
-    if (SLJIT_UNLIKELY(sljit_get_compiler_error(compiler))) \
-      return; \
-    memset(backtrack, 0, size); \
-    backtrack->prev = parent->top; \
-    backtrack->cc = (ccstart); \
-    parent->top = backtrack; \
-    } \
-  while (0)
-
-#define BACKTRACK_AS(type) ((type *)backtrack)
-
-static void compile_dnref_search(compiler_common *common, pcre_uchar *cc, jump_list **backtracks)
-{
-/* The OVECTOR offset goes to TMP2. */
-DEFINE_COMPILER;
-int count = GET2(cc, 1 + IMM2_SIZE);
-pcre_uchar *slot = common->name_table + GET2(cc, 1) * common->name_entry_size;
-unsigned int offset;
-jump_list *found = NULL;
-
-SLJIT_ASSERT(*cc == OP_DNREF || *cc == OP_DNREFI);
-
-OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), OVECTOR(1));
-
-count--;
-while (count-- > 0)
-  {
-  offset = GET2(slot, 0) << 1;
-  GET_LOCAL_BASE(TMP2, 0, OVECTOR(offset));
-  add_jump(compiler, &found, CMP(SLJIT_C_NOT_EQUAL, SLJIT_MEM1(SLJIT_LOCALS_REG), OVECTOR(offset), TMP1, 0));
-  slot += common->name_entry_size;
-  }
-
-offset = GET2(slot, 0) << 1;
-GET_LOCAL_BASE(TMP2, 0, OVECTOR(offset));
-if (backtracks != NULL && !common->jscript_compat)
-  add_jump(compiler, backtracks, CMP(SLJIT_C_EQUAL, SLJIT_MEM1(SLJIT_LOCALS_REG), OVECTOR(offset), TMP1, 0));
-
-set_jumps(found, LABEL());
-}
-
-static void compile_ref_matchingpath(compiler_common *common, pcre_uchar *cc, jump_list **backtracks, BOOL withchecks, BOOL emptyfail)
-{
-DEFINE_COMPILER;
-BOOL ref = (*cc == OP_REF || *cc == OP_REFI);
-int offset = 0;
-struct sljit_jump *jump = NULL;
-struct sljit_jump *partial;
-struct sljit_jump *nopartial;
-
-if (ref)
-  {
-  offset = GET2(cc, 1) << 1;
-  OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), OVECTOR(offset));
-  /* OVECTOR(1) contains the "string begin - 1" constant. */
-  if (withchecks && !common->jscript_compat)
-    add_jump(compiler, backtracks, CMP(SLJIT_C_EQUAL, TMP1, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), OVECTOR(1)));
-  }
-else
-  OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(TMP2), 0);
-
-#if defined SUPPORT_UTF && defined SUPPORT_UCP
-if (common->utf && *cc == OP_REFI)
-  {
-  SLJIT_ASSERT(TMP1 == SLJIT_SCRATCH_REG1 && STACK_TOP == SLJIT_SCRATCH_REG2 && TMP2 == SLJIT_SCRATCH_REG3);
-  if (ref)
-    OP1(SLJIT_MOV, TMP2, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), OVECTOR(offset + 1));
-  else
-    OP1(SLJIT_MOV, TMP2, 0, SLJIT_MEM1(TMP2), sizeof(sljit_sw));
-
-  if (withchecks)
-    jump = CMP(SLJIT_C_EQUAL, TMP1, 0, TMP2, 0);
-
-  /* Needed to save important temporary registers. */
-  OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_LOCALS_REG), LOCALS0, STACK_TOP, 0);
-  OP1(SLJIT_MOV, SLJIT_SCRATCH_REG2, 0, ARGUMENTS, 0);
-  OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_SCRATCH_REG2), SLJIT_OFFSETOF(jit_arguments, uchar_ptr), STR_PTR, 0);
-  sljit_emit_ijump(compiler, SLJIT_CALL3, SLJIT_IMM, SLJIT_FUNC_OFFSET(do_utf_caselesscmp));
-  OP1(SLJIT_MOV, STACK_TOP, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), LOCALS0);
-  if (common->mode == JIT_COMPILE)
-    add_jump(compiler, backtracks, CMP(SLJIT_C_LESS_EQUAL, SLJIT_RETURN_REG, 0, SLJIT_IMM, 1));
-  else
-    {
-    add_jump(compiler, backtracks, CMP(SLJIT_C_EQUAL, SLJIT_RETURN_REG, 0, SLJIT_IMM, 0));
-    nopartial = CMP(SLJIT_C_NOT_EQUAL, SLJIT_RETURN_REG, 0, SLJIT_IMM, 1);
-    check_partial(common, FALSE);
-    add_jump(compiler, backtracks, JUMP(SLJIT_JUMP));
-    JUMPHERE(nopartial);
-    }
-  OP1(SLJIT_MOV, STR_PTR, 0, SLJIT_RETURN_REG, 0);
-  }
-else
-#endif /* SUPPORT_UTF && SUPPORT_UCP */
-  {
-  if (ref)
-    OP2(SLJIT_SUB | SLJIT_SET_E, TMP2, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), OVECTOR(offset + 1), TMP1, 0);
-  else
-    OP2(SLJIT_SUB | SLJIT_SET_E, TMP2, 0, SLJIT_MEM1(TMP2), sizeof(sljit_sw), TMP1, 0);
-
-  if (withchecks)
-    jump = JUMP(SLJIT_C_ZERO);
-
-  OP2(SLJIT_ADD, STR_PTR, 0, STR_PTR, 0, TMP2, 0);
-  partial = CMP(SLJIT_C_GREATER, STR_PTR, 0, STR_END, 0);
-  if (common->mode == JIT_COMPILE)
-    add_jump(compiler, backtracks, partial);
-
-  add_jump(compiler, *cc == OP_REF ? &common->casefulcmp : &common->caselesscmp, JUMP(SLJIT_FAST_CALL));
-  add_jump(compiler, backtracks, CMP(SLJIT_C_NOT_EQUAL, TMP2, 0, SLJIT_IMM, 0));
-
-  if (common->mode != JIT_COMPILE)
-    {
-    nopartial = JUMP(SLJIT_JUMP);
-    JUMPHERE(partial);
-    /* TMP2 -= STR_END - STR_PTR */
-    OP2(SLJIT_SUB, TMP2, 0, TMP2, 0, STR_PTR, 0);
-    OP2(SLJIT_ADD, TMP2, 0, TMP2, 0, STR_END, 0);
-    partial = CMP(SLJIT_C_EQUAL, TMP2, 0, SLJIT_IMM, 0);
-    OP1(SLJIT_MOV, STR_PTR, 0, STR_END, 0);
-    add_jump(compiler, *cc == OP_REF ? &common->casefulcmp : &common->caselesscmp, JUMP(SLJIT_FAST_CALL));
-    add_jump(compiler, backtracks, CMP(SLJIT_C_NOT_EQUAL, TMP2, 0, SLJIT_IMM, 0));
-    JUMPHERE(partial);
-    check_partial(common, FALSE);
-    add_jump(compiler, backtracks, JUMP(SLJIT_JUMP));
-    JUMPHERE(nopartial);
-    }
-  }
-
-if (jump != NULL)
-  {
-  if (emptyfail)
-    add_jump(compiler, backtracks, jump);
-  else
-    JUMPHERE(jump);
-  }
-}
-
-static SLJIT_INLINE pcre_uchar *compile_ref_iterator_matchingpath(compiler_common *common, pcre_uchar *cc, backtrack_common *parent)
-{
-DEFINE_COMPILER;
-BOOL ref = (*cc == OP_REF || *cc == OP_REFI);
-backtrack_common *backtrack;
-pcre_uchar type;
-int offset = 0;
-struct sljit_label *label;
-struct sljit_jump *zerolength;
-struct sljit_jump *jump = NULL;
-pcre_uchar *ccbegin = cc;
-int min = 0, max = 0;
-BOOL minimize;
-
-PUSH_BACKTRACK(sizeof(iterator_backtrack), cc, NULL);
-
-if (ref)
-  offset = GET2(cc, 1) << 1;
-else
-  cc += IMM2_SIZE;
-type = cc[1 + IMM2_SIZE];
-
-SLJIT_COMPILE_ASSERT((OP_CRSTAR & 0x1) == 0, crstar_opcode_must_be_even);
-minimize = (type & 0x1) != 0;
-switch(type)
-  {
-  case OP_CRSTAR:
-  case OP_CRMINSTAR:
-  min = 0;
-  max = 0;
-  cc += 1 + IMM2_SIZE + 1;
-  break;
-  case OP_CRPLUS:
-  case OP_CRMINPLUS:
-  min = 1;
-  max = 0;
-  cc += 1 + IMM2_SIZE + 1;
-  break;
-  case OP_CRQUERY:
-  case OP_CRMINQUERY:
-  min = 0;
-  max = 1;
-  cc += 1 + IMM2_SIZE + 1;
-  break;
-  case OP_CRRANGE:
-  case OP_CRMINRANGE:
-  min = GET2(cc, 1 + IMM2_SIZE + 1);
-  max = GET2(cc, 1 + IMM2_SIZE + 1 + IMM2_SIZE);
-  cc += 1 + IMM2_SIZE + 1 + 2 * IMM2_SIZE;
-  break;
-  default:
-  SLJIT_ASSERT_STOP();
-  break;
-  }
-
-if (!minimize)
-  {
-  if (min == 0)
-    {
-    allocate_stack(common, 2);
-    if (ref)
-      OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), OVECTOR(offset));
-    OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(0), STR_PTR, 0);
-    OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(1), SLJIT_IMM, 0);
-    /* Temporary release of STR_PTR. */
-    OP2(SLJIT_SUB, STACK_TOP, 0, STACK_TOP, 0, SLJIT_IMM, sizeof(sljit_sw));
-    /* Handles both invalid and empty cases. Since the minimum repeat,
-    is zero the invalid case is basically the same as an empty case. */
-    if (ref)
-      zerolength = CMP(SLJIT_C_EQUAL, TMP1, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), OVECTOR(offset + 1));
-    else
-      {
-      compile_dnref_search(common, ccbegin, NULL);
-      OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(TMP2), 0);
-      OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_LOCALS_REG), POSSESSIVE1, TMP2, 0);
-      zerolength = CMP(SLJIT_C_EQUAL, TMP1, 0, SLJIT_MEM1(TMP2), sizeof(sljit_sw));
-      }
-    /* Restore if not zero length. */
-    OP2(SLJIT_ADD, STACK_TOP, 0, STACK_TOP, 0, SLJIT_IMM, sizeof(sljit_sw));
-    }
-  else
-    {
-    allocate_stack(common, 1);
-    if (ref)
-      OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), OVECTOR(offset));
-    OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(0), SLJIT_IMM, 0);
-    if (ref)
-      {
-      add_jump(compiler, &backtrack->topbacktracks, CMP(SLJIT_C_EQUAL, TMP1, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), OVECTOR(1)));
-      zerolength = CMP(SLJIT_C_EQUAL, TMP1, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), OVECTOR(offset + 1));
-      }
-    else
-      {
-      compile_dnref_search(common, ccbegin, &backtrack->topbacktracks);
-      OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(TMP2), 0);
-      OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_LOCALS_REG), POSSESSIVE1, TMP2, 0);
-      zerolength = CMP(SLJIT_C_EQUAL, TMP1, 0, SLJIT_MEM1(TMP2), sizeof(sljit_sw));
-      }
-    }
-
-  if (min > 1 || max > 1)
-    OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_LOCALS_REG), POSSESSIVE0, SLJIT_IMM, 0);
-
-  label = LABEL();
-  if (!ref)
-    OP1(SLJIT_MOV, TMP2, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), POSSESSIVE1);
-  compile_ref_matchingpath(common, ccbegin, &backtrack->topbacktracks, FALSE, FALSE);
-
-  if (min > 1 || max > 1)
-    {
-    OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), POSSESSIVE0);
-    OP2(SLJIT_ADD, TMP1, 0, TMP1, 0, SLJIT_IMM, 1);
-    OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_LOCALS_REG), POSSESSIVE0, TMP1, 0);
-    if (min > 1)
-      CMPTO(SLJIT_C_LESS, TMP1, 0, SLJIT_IMM, min, label);
-    if (max > 1)
-      {
-      jump = CMP(SLJIT_C_GREATER_EQUAL, TMP1, 0, SLJIT_IMM, max);
-      allocate_stack(common, 1);
-      OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(0), STR_PTR, 0);
-      JUMPTO(SLJIT_JUMP, label);
-      JUMPHERE(jump);
-      }
-    }
-
-  if (max == 0)
-    {
-    /* Includes min > 1 case as well. */
-    allocate_stack(common, 1);
-    OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(0), STR_PTR, 0);
-    JUMPTO(SLJIT_JUMP, label);
-    }
-
-  JUMPHERE(zerolength);
-  BACKTRACK_AS(iterator_backtrack)->matchingpath = LABEL();
-
-  count_match(common);
-  return cc;
-  }
-
-allocate_stack(common, ref ? 2 : 3);
-if (ref)
-  OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), OVECTOR(offset));
-OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(0), SLJIT_IMM, 0);
-if (type != OP_CRMINSTAR)
-  OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(1), SLJIT_IMM, 0);
-
-if (min == 0)
-  {
-  /* Handles both invalid and empty cases. Since the minimum repeat,
-  is zero the invalid case is basically the same as an empty case. */
-  if (ref)
-    zerolength = CMP(SLJIT_C_EQUAL, TMP1, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), OVECTOR(offset + 1));
-  else
-    {
-    compile_dnref_search(common, ccbegin, NULL);
-    OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(TMP2), 0);
-    OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(2), TMP2, 0);
-    zerolength = CMP(SLJIT_C_EQUAL, TMP1, 0, SLJIT_MEM1(TMP2), sizeof(sljit_sw));
-    }
-  /* Length is non-zero, we can match real repeats. */
-  OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(0), STR_PTR, 0);
-  jump = JUMP(SLJIT_JUMP);
-  }
-else
-  {
-  if (ref)
-    {
-    add_jump(compiler, &backtrack->topbacktracks, CMP(SLJIT_C_EQUAL, TMP1, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), OVECTOR(1)));
-    zerolength = CMP(SLJIT_C_EQUAL, TMP1, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), OVECTOR(offset + 1));
-    }
-  else
-    {
-    compile_dnref_search(common, ccbegin, &backtrack->topbacktracks);
-    OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(TMP2), 0);
-    OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(2), TMP2, 0);
-    zerolength = CMP(SLJIT_C_EQUAL, TMP1, 0, SLJIT_MEM1(TMP2), sizeof(sljit_sw));
-    }
-  }
-
-BACKTRACK_AS(iterator_backtrack)->matchingpath = LABEL();
-if (max > 0)
-  add_jump(compiler, &backtrack->topbacktracks, CMP(SLJIT_C_GREATER_EQUAL, SLJIT_MEM1(STACK_TOP), STACK(1), SLJIT_IMM, max));
-
-if (!ref)
-  OP1(SLJIT_MOV, TMP2, 0, SLJIT_MEM1(STACK_TOP), STACK(2));
-compile_ref_matchingpath(common, ccbegin, &backtrack->topbacktracks, TRUE, TRUE);
-OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(0), STR_PTR, 0);
-
-if (min > 1)
-  {
-  OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(STACK_TOP), STACK(1));
-  OP2(SLJIT_ADD, TMP1, 0, TMP1, 0, SLJIT_IMM, 1);
-  OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(1), TMP1, 0);
-  CMPTO(SLJIT_C_LESS, TMP1, 0, SLJIT_IMM, min, BACKTRACK_AS(iterator_backtrack)->matchingpath);
-  }
-else if (max > 0)
-  OP2(SLJIT_ADD, SLJIT_MEM1(STACK_TOP), STACK(1), SLJIT_MEM1(STACK_TOP), STACK(1), SLJIT_IMM, 1);
-
-if (jump != NULL)
-  JUMPHERE(jump);
-JUMPHERE(zerolength);
-
-count_match(common);
-return cc;
-}
-
-static SLJIT_INLINE pcre_uchar *compile_recurse_matchingpath(compiler_common *common, pcre_uchar *cc, backtrack_common *parent)
-{
-DEFINE_COMPILER;
-backtrack_common *backtrack;
-recurse_entry *entry = common->entries;
-recurse_entry *prev = NULL;
-sljit_sw start = GET(cc, 1);
-pcre_uchar *start_cc;
-BOOL needs_control_head;
-
-PUSH_BACKTRACK(sizeof(recurse_backtrack), cc, NULL);
-
-/* Inlining simple patterns. */
-if (get_framesize(common, common->start + start, NULL, TRUE, &needs_control_head) == no_stack)
-  {
-  start_cc = common->start + start;
-  compile_matchingpath(common, next_opcode(common, start_cc), bracketend(start_cc) - (1 + LINK_SIZE), backtrack);
-  BACKTRACK_AS(recurse_backtrack)->inlined_pattern = TRUE;
-  return cc + 1 + LINK_SIZE;
-  }
-
-while (entry != NULL)
-  {
-  if (entry->start == start)
-    break;
-  prev = entry;
-  entry = entry->next;
-  }
-
-if (entry == NULL)
-  {
-  entry = sljit_alloc_memory(compiler, sizeof(recurse_entry));
-  if (SLJIT_UNLIKELY(sljit_get_compiler_error(compiler)))
-    return NULL;
-  entry->next = NULL;
-  entry->entry = NULL;
-  entry->calls = NULL;
-  entry->start = start;
-
-  if (prev != NULL)
-    prev->next = entry;
-  else
-    common->entries = entry;
-  }
-
-if (common->has_set_som && common->mark_ptr != 0)
-  {
-  OP1(SLJIT_MOV, TMP2, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), OVECTOR(0));
-  allocate_stack(common, 2);
-  OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), common->mark_ptr);
-  OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(0), TMP2, 0);
-  OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(1), TMP1, 0);
-  }
-else if (common->has_set_som || common->mark_ptr != 0)
-  {
-  OP1(SLJIT_MOV, TMP2, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), common->has_set_som ? (int)(OVECTOR(0)) : common->mark_ptr);
-  allocate_stack(common, 1);
-  OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(0), TMP2, 0);
-  }
-
-if (entry->entry == NULL)
-  add_jump(compiler, &entry->calls, JUMP(SLJIT_FAST_CALL));
-else
-  JUMPTO(SLJIT_FAST_CALL, entry->entry);
-/* Leave if the match is failed. */
-add_jump(compiler, &backtrack->topbacktracks, CMP(SLJIT_C_EQUAL, TMP1, 0, SLJIT_IMM, 0));
-return cc + 1 + LINK_SIZE;
-}
-
-static int SLJIT_CALL do_callout(struct jit_arguments* arguments, PUBL(callout_block) *callout_block, pcre_uchar **jit_ovector)
-{
-const pcre_uchar *begin = arguments->begin;
-int *offset_vector = arguments->offsets;
-int offset_count = arguments->offset_count;
-int i;
-
-if (PUBL(callout) == NULL)
-  return 0;
-
-callout_block->version = 2;
-callout_block->callout_data = arguments->callout_data;
-
-/* Offsets in subject. */
-callout_block->subject_length = arguments->end - arguments->begin;
-callout_block->start_match = (pcre_uchar*)callout_block->subject - arguments->begin;
-callout_block->current_position = (pcre_uchar*)callout_block->offset_vector - arguments->begin;
-#if defined COMPILE_PCRE8
-callout_block->subject = (PCRE_SPTR)begin;
-#elif defined COMPILE_PCRE16
-callout_block->subject = (PCRE_SPTR16)begin;
-#elif defined COMPILE_PCRE32
-callout_block->subject = (PCRE_SPTR32)begin;
-#endif
-
-/* Convert and copy the JIT offset vector to the offset_vector array. */
-callout_block->capture_top = 0;
-callout_block->offset_vector = offset_vector;
-for (i = 2; i < offset_count; i += 2)
-  {
-  offset_vector[i] = jit_ovector[i] - begin;
-  offset_vector[i + 1] = jit_ovector[i + 1] - begin;
-  if (jit_ovector[i] >= begin)
-    callout_block->capture_top = i;
-  }
-
-callout_block->capture_top = (callout_block->capture_top >> 1) + 1;
-if (offset_count > 0)
-  offset_vector[0] = -1;
-if (offset_count > 1)
-  offset_vector[1] = -1;
-return (*PUBL(callout))(callout_block);
-}
-
-/* Aligning to 8 byte. */
-#define CALLOUT_ARG_SIZE \
-    (((int)sizeof(PUBL(callout_block)) + 7) & ~7)
-
-#define CALLOUT_ARG_OFFSET(arg) \
-    (-CALLOUT_ARG_SIZE + SLJIT_OFFSETOF(PUBL(callout_block), arg))
-
-static SLJIT_INLINE pcre_uchar *compile_callout_matchingpath(compiler_common *common, pcre_uchar *cc, backtrack_common *parent)
-{
-DEFINE_COMPILER;
-backtrack_common *backtrack;
-
-PUSH_BACKTRACK(sizeof(backtrack_common), cc, NULL);
-
-allocate_stack(common, CALLOUT_ARG_SIZE / sizeof(sljit_sw));
-
-OP1(SLJIT_MOV, TMP2, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), common->capture_last_ptr);
-OP1(SLJIT_MOV, TMP1, 0, ARGUMENTS, 0);
-SLJIT_ASSERT(common->capture_last_ptr != 0);
-OP1(SLJIT_MOV_SI, SLJIT_MEM1(STACK_TOP), CALLOUT_ARG_OFFSET(callout_number), SLJIT_IMM, cc[1]);
-OP1(SLJIT_MOV_SI, SLJIT_MEM1(STACK_TOP), CALLOUT_ARG_OFFSET(capture_last), TMP2, 0);
-
-/* These pointer sized fields temporarly stores internal variables. */
-OP1(SLJIT_MOV, TMP2, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), OVECTOR(0));
-OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), CALLOUT_ARG_OFFSET(offset_vector), STR_PTR, 0);
-OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), CALLOUT_ARG_OFFSET(subject), TMP2, 0);
-
-if (common->mark_ptr != 0)
-  OP1(SLJIT_MOV, TMP2, 0, SLJIT_MEM1(TMP1), SLJIT_OFFSETOF(jit_arguments, mark_ptr));
-OP1(SLJIT_MOV_SI, SLJIT_MEM1(STACK_TOP), CALLOUT_ARG_OFFSET(pattern_position), SLJIT_IMM, GET(cc, 2));
-OP1(SLJIT_MOV_SI, SLJIT_MEM1(STACK_TOP), CALLOUT_ARG_OFFSET(next_item_length), SLJIT_IMM, GET(cc, 2 + LINK_SIZE));
-OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), CALLOUT_ARG_OFFSET(mark), (common->mark_ptr != 0) ? TMP2 : SLJIT_IMM, 0);
-
-/* Needed to save important temporary registers. */
-OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_LOCALS_REG), LOCALS0, STACK_TOP, 0);
-OP2(SLJIT_SUB, SLJIT_SCRATCH_REG2, 0, STACK_TOP, 0, SLJIT_IMM, CALLOUT_ARG_SIZE);
-GET_LOCAL_BASE(SLJIT_SCRATCH_REG3, 0, OVECTOR_START);
-sljit_emit_ijump(compiler, SLJIT_CALL3, SLJIT_IMM, SLJIT_FUNC_OFFSET(do_callout));
-OP1(SLJIT_MOV_SI, SLJIT_RETURN_REG, 0, SLJIT_RETURN_REG, 0);
-OP1(SLJIT_MOV, STACK_TOP, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), LOCALS0);
-free_stack(common, CALLOUT_ARG_SIZE / sizeof(sljit_sw));
-
-/* Check return value. */
-OP2(SLJIT_SUB | SLJIT_SET_S, SLJIT_UNUSED, 0, SLJIT_RETURN_REG, 0, SLJIT_IMM, 0);
-add_jump(compiler, &backtrack->topbacktracks, JUMP(SLJIT_C_SIG_GREATER));
-if (common->forced_quit_label == NULL)
-  add_jump(compiler, &common->forced_quit, JUMP(SLJIT_C_SIG_LESS));
-else
-  JUMPTO(SLJIT_C_SIG_LESS, common->forced_quit_label);
-return cc + 2 + 2 * LINK_SIZE;
-}
-
-#undef CALLOUT_ARG_SIZE
-#undef CALLOUT_ARG_OFFSET
-
-static pcre_uchar *compile_assert_matchingpath(compiler_common *common, pcre_uchar *cc, assert_backtrack *backtrack, BOOL conditional)
-{
-DEFINE_COMPILER;
-int framesize;
-int extrasize;
-BOOL needs_control_head;
-int private_data_ptr;
-backtrack_common altbacktrack;
-pcre_uchar *ccbegin;
-pcre_uchar opcode;
-pcre_uchar bra = OP_BRA;
-jump_list *tmp = NULL;
-jump_list **target = (conditional) ? &backtrack->condfailed : &backtrack->common.topbacktracks;
-jump_list **found;
-/* Saving previous accept variables. */
-BOOL save_local_exit = common->local_exit;
-BOOL save_positive_assert = common->positive_assert;
-then_trap_backtrack *save_then_trap = common->then_trap;
-struct sljit_label *save_quit_label = common->quit_label;
-struct sljit_label *save_accept_label = common->accept_label;
-jump_list *save_quit = common->quit;
-jump_list *save_positive_assert_quit = common->positive_assert_quit;
-jump_list *save_accept = common->accept;
-struct sljit_jump *jump;
-struct sljit_jump *brajump = NULL;
-
-/* Assert captures then. */
-common->then_trap = NULL;
-
-if (*cc == OP_BRAZERO || *cc == OP_BRAMINZERO)
-  {
-  SLJIT_ASSERT(!conditional);
-  bra = *cc;
-  cc++;
-  }
-private_data_ptr = PRIVATE_DATA(cc);
-SLJIT_ASSERT(private_data_ptr != 0);
-framesize = get_framesize(common, cc, NULL, FALSE, &needs_control_head);
-backtrack->framesize = framesize;
-backtrack->private_data_ptr = private_data_ptr;
-opcode = *cc;
-SLJIT_ASSERT(opcode >= OP_ASSERT && opcode <= OP_ASSERTBACK_NOT);
-found = (opcode == OP_ASSERT || opcode == OP_ASSERTBACK) ? &tmp : target;
-ccbegin = cc;
-cc += GET(cc, 1);
-
-if (bra == OP_BRAMINZERO)
-  {
-  /* This is a braminzero backtrack path. */
-  OP1(SLJIT_MOV, STR_PTR, 0, SLJIT_MEM1(STACK_TOP), STACK(0));
-  free_stack(common, 1);
-  brajump = CMP(SLJIT_C_EQUAL, STR_PTR, 0, SLJIT_IMM, 0);
-  }
-
-if (framesize < 0)
-  {
-  extrasize = needs_control_head ? 2 : 1;
-  if (framesize == no_frame)
-    OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_LOCALS_REG), private_data_ptr, STACK_TOP, 0);
-  allocate_stack(common, extrasize);
-  if (needs_control_head)
-    OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), common->control_head_ptr);
-  OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(0), STR_PTR, 0);
-  if (needs_control_head)
-    {
-    OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_LOCALS_REG), common->control_head_ptr, SLJIT_IMM, 0);
-    OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(1), TMP1, 0);
-    }
-  }
-else
-  {
-  extrasize = needs_control_head ? 3 : 2;
-  allocate_stack(common, framesize + extrasize);
-  OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), private_data_ptr);
-  OP2(SLJIT_SUB, TMP2, 0, STACK_TOP, 0, SLJIT_IMM, (framesize + extrasize) * sizeof(sljit_sw));
-  OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_LOCALS_REG), private_data_ptr, TMP2, 0);
-  if (needs_control_head)
-    OP1(SLJIT_MOV, TMP2, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), common->control_head_ptr);
-  OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(0), STR_PTR, 0);
-  if (needs_control_head)
-    {
-    OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(2), TMP1, 0);
-    OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(1), TMP2, 0);
-    OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_LOCALS_REG), common->control_head_ptr, SLJIT_IMM, 0);
-    }
-  else
-    OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(1), TMP1, 0);
-  init_frame(common, ccbegin, NULL, framesize + extrasize - 1, extrasize, FALSE);
-  }
-
-memset(&altbacktrack, 0, sizeof(backtrack_common));
-if (opcode == OP_ASSERT_NOT || opcode == OP_ASSERTBACK_NOT)
-  {
-  /* Negative assert is stronger than positive assert. */
-  common->local_exit = TRUE;
-  common->quit_label = NULL;
-  common->quit = NULL;
-  common->positive_assert = FALSE;
-  }
-else
-  common->positive_assert = TRUE;
-common->positive_assert_quit = NULL;
-
-while (1)
-  {
-  common->accept_label = NULL;
-  common->accept = NULL;
-  altbacktrack.top = NULL;
-  altbacktrack.topbacktracks = NULL;
-
-  if (*ccbegin == OP_ALT)
-    OP1(SLJIT_MOV, STR_PTR, 0, SLJIT_MEM1(STACK_TOP), STACK(0));
-
-  altbacktrack.cc = ccbegin;
-  compile_matchingpath(common, ccbegin + 1 + LINK_SIZE, cc, &altbacktrack);
-  if (SLJIT_UNLIKELY(sljit_get_compiler_error(compiler)))
-    {
-    if (opcode == OP_ASSERT_NOT || opcode == OP_ASSERTBACK_NOT)
-      {
-      common->local_exit = save_local_exit;
-      common->quit_label = save_quit_label;
-      common->quit = save_quit;
-      }
-    common->positive_assert = save_positive_assert;
-    common->then_trap = save_then_trap;
-    common->accept_label = save_accept_label;
-    common->positive_assert_quit = save_positive_assert_quit;
-    common->accept = save_accept;
-    return NULL;
-    }
-  common->accept_label = LABEL();
-  if (common->accept != NULL)
-    set_jumps(common->accept, common->accept_label);
-
-  /* Reset stack. */
-  if (framesize < 0)
-    {
-    if (framesize == no_frame)
-      OP1(SLJIT_MOV, STACK_TOP, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), private_data_ptr);
-    else
-      free_stack(common, extrasize);
-    if (needs_control_head)
-      OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_LOCALS_REG), common->control_head_ptr, SLJIT_MEM1(STACK_TOP), 0);
-    }
-  else
-    {
-    if ((opcode != OP_ASSERT_NOT && opcode != OP_ASSERTBACK_NOT) || conditional)
-      {
-      /* We don't need to keep the STR_PTR, only the previous private_data_ptr. */
-      OP2(SLJIT_ADD, STACK_TOP, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), private_data_ptr, SLJIT_IMM, (framesize + 1) * sizeof(sljit_sw));
-      if (needs_control_head)
-        OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_LOCALS_REG), common->control_head_ptr, SLJIT_MEM1(STACK_TOP), 0);
-      }
-    else
-      {
-      OP1(SLJIT_MOV, STACK_TOP, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), private_data_ptr);
-      if (needs_control_head)
-        OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_LOCALS_REG), common->control_head_ptr, SLJIT_MEM1(STACK_TOP), (framesize + 1) * sizeof(sljit_sw));
-      add_jump(compiler, &common->revertframes, JUMP(SLJIT_FAST_CALL));
-      }
-    }
-
-  if (opcode == OP_ASSERT_NOT || opcode == OP_ASSERTBACK_NOT)
-    {
-    /* We know that STR_PTR was stored on the top of the stack. */
-    if (conditional)
-      OP1(SLJIT_MOV, STR_PTR, 0, SLJIT_MEM1(STACK_TOP), needs_control_head ? sizeof(sljit_sw) : 0);
-    else if (bra == OP_BRAZERO)
-      {
-      if (framesize < 0)
-        OP1(SLJIT_MOV, STR_PTR, 0, SLJIT_MEM1(STACK_TOP), (extrasize - 1) * sizeof(sljit_sw));
-      else
-        {
-        OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(STACK_TOP), framesize * sizeof(sljit_sw));
-        OP1(SLJIT_MOV, STR_PTR, 0, SLJIT_MEM1(STACK_TOP), (framesize + extrasize - 1) * sizeof(sljit_sw));
-        OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_LOCALS_REG), private_data_ptr, TMP1, 0);
-        }
-      OP2(SLJIT_ADD, STACK_TOP, 0, STACK_TOP, 0, SLJIT_IMM, sizeof(sljit_sw));
-      OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(0), SLJIT_IMM, 0);
-      }
-    else if (framesize >= 0)
-      {
-      /* For OP_BRA and OP_BRAMINZERO. */
-      OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_LOCALS_REG), private_data_ptr, SLJIT_MEM1(STACK_TOP), framesize * sizeof(sljit_sw));
-      }
-    }
-  add_jump(compiler, found, JUMP(SLJIT_JUMP));
-
-  compile_backtrackingpath(common, altbacktrack.top);
-  if (SLJIT_UNLIKELY(sljit_get_compiler_error(compiler)))
-    {
-    if (opcode == OP_ASSERT_NOT || opcode == OP_ASSERTBACK_NOT)
-      {
-      common->local_exit = save_local_exit;
-      common->quit_label = save_quit_label;
-      common->quit = save_quit;
-      }
-    common->positive_assert = save_positive_assert;
-    common->then_trap = save_then_trap;
-    common->accept_label = save_accept_label;
-    common->positive_assert_quit = save_positive_assert_quit;
-    common->accept = save_accept;
-    return NULL;
-    }
-  set_jumps(altbacktrack.topbacktracks, LABEL());
-
-  if (*cc != OP_ALT)
-    break;
-
-  ccbegin = cc;
-  cc += GET(cc, 1);
-  }
-
-if (opcode == OP_ASSERT_NOT || opcode == OP_ASSERTBACK_NOT)
-  {
-  SLJIT_ASSERT(common->positive_assert_quit == NULL);
-  /* Makes the check less complicated below. */
-  common->positive_assert_quit = common->quit;
-  }
-
-/* None of them matched. */
-if (common->positive_assert_quit != NULL)
-  {
-  jump = JUMP(SLJIT_JUMP);
-  set_jumps(common->positive_assert_quit, LABEL());
-  SLJIT_ASSERT(framesize != no_stack);
-  if (framesize < 0)
-    OP2(SLJIT_ADD, STACK_TOP, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), private_data_ptr, SLJIT_IMM, extrasize * sizeof(sljit_sw));
-  else
-    {
-    OP1(SLJIT_MOV, STACK_TOP, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), private_data_ptr);
-    add_jump(compiler, &common->revertframes, JUMP(SLJIT_FAST_CALL));
-    OP2(SLJIT_ADD, STACK_TOP, 0, STACK_TOP, 0, SLJIT_IMM, (framesize + extrasize) * sizeof(sljit_sw));
-    }
-  JUMPHERE(jump);
-  }
-
-if (needs_control_head)
-  OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_LOCALS_REG), common->control_head_ptr, SLJIT_MEM1(STACK_TOP), STACK(1));
-
-if (opcode == OP_ASSERT || opcode == OP_ASSERTBACK)
-  {
-  /* Assert is failed. */
-  if (conditional || bra == OP_BRAZERO)
-    OP1(SLJIT_MOV, STR_PTR, 0, SLJIT_MEM1(STACK_TOP), STACK(0));
-
-  if (framesize < 0)
-    {
-    /* The topmost item should be 0. */
-    if (bra == OP_BRAZERO)
-      {
-      if (extrasize == 2)
-        free_stack(common, 1);
-      OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(0), SLJIT_IMM, 0);
-      }
-    else
-      free_stack(common, extrasize);
-    }
-  else
-    {
-    OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(STACK_TOP), STACK(extrasize - 1));
-    /* The topmost item should be 0. */
-    if (bra == OP_BRAZERO)
-      {
-      free_stack(common, framesize + extrasize - 1);
-      OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(0), SLJIT_IMM, 0);
-      }
-    else
-      free_stack(common, framesize + extrasize);
-    OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_LOCALS_REG), private_data_ptr, TMP1, 0);
-    }
-  jump = JUMP(SLJIT_JUMP);
-  if (bra != OP_BRAZERO)
-    add_jump(compiler, target, jump);
-
-  /* Assert is successful. */
-  set_jumps(tmp, LABEL());
-  if (framesize < 0)
-    {
-    /* We know that STR_PTR was stored on the top of the stack. */
-    OP1(SLJIT_MOV, STR_PTR, 0, SLJIT_MEM1(STACK_TOP), (extrasize - 1) * sizeof(sljit_sw));
-    /* Keep the STR_PTR on the top of the stack. */
-    if (bra == OP_BRAZERO)
-      {
-      OP2(SLJIT_ADD, STACK_TOP, 0, STACK_TOP, 0, SLJIT_IMM, sizeof(sljit_sw));
-      if (extrasize == 2)
-        OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(0), STR_PTR, 0);
-      }
-    else if (bra == OP_BRAMINZERO)
-      {
-      OP2(SLJIT_ADD, STACK_TOP, 0, STACK_TOP, 0, SLJIT_IMM, sizeof(sljit_sw));
-      OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(0), SLJIT_IMM, 0);
-      }
-    }
-  else
-    {
-    if (bra == OP_BRA)
-      {
-      /* We don't need to keep the STR_PTR, only the previous private_data_ptr. */
-      OP2(SLJIT_ADD, STACK_TOP, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), private_data_ptr, SLJIT_IMM, (framesize + 1) * sizeof(sljit_sw));
-      OP1(SLJIT_MOV, STR_PTR, 0, SLJIT_MEM1(STACK_TOP), (extrasize - 2) * sizeof(sljit_sw));
-      }
-    else
-      {
-      /* We don't need to keep the STR_PTR, only the previous private_data_ptr. */
-      OP2(SLJIT_ADD, STACK_TOP, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), private_data_ptr, SLJIT_IMM, (framesize + 2) * sizeof(sljit_sw));
-      if (extrasize == 2)
-        {
-        OP1(SLJIT_MOV, STR_PTR, 0, SLJIT_MEM1(STACK_TOP), STACK(0));
-        if (bra == OP_BRAMINZERO)
-          OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(0), SLJIT_IMM, 0);
-        }
-      else
-        {
-        OP1(SLJIT_MOV, STR_PTR, 0, SLJIT_MEM1(STACK_TOP), 0);
-        OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(0), bra == OP_BRAZERO ? STR_PTR : SLJIT_IMM, 0);
-        }
-      }
-    }
-
-  if (bra == OP_BRAZERO)
-    {
-    backtrack->matchingpath = LABEL();
-    SET_LABEL(jump, backtrack->matchingpath);
-    }
-  else if (bra == OP_BRAMINZERO)
-    {
-    JUMPTO(SLJIT_JUMP, backtrack->matchingpath);
-    JUMPHERE(brajump);
-    if (framesize >= 0)
-      {
-      OP1(SLJIT_MOV, STACK_TOP, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), private_data_ptr);
-      add_jump(compiler, &common->revertframes, JUMP(SLJIT_FAST_CALL));
-      OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_LOCALS_REG), private_data_ptr, SLJIT_MEM1(STACK_TOP), framesize * sizeof(sljit_sw));
-      }
-    set_jumps(backtrack->common.topbacktracks, LABEL());
-    }
-  }
-else
-  {
-  /* AssertNot is successful. */
-  if (framesize < 0)
-    {
-    OP1(SLJIT_MOV, STR_PTR, 0, SLJIT_MEM1(STACK_TOP), STACK(0));
-    if (bra != OP_BRA)
-      {
-      if (extrasize == 2)
-        free_stack(common, 1);
-      OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(0), SLJIT_IMM, 0);
-      }
-    else
-      free_stack(common, extrasize);
-    }
-  else
-    {
-    OP1(SLJIT_MOV, STR_PTR, 0, SLJIT_MEM1(STACK_TOP), STACK(0));
-    OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(STACK_TOP), STACK(extrasize - 1));
-    /* The topmost item should be 0. */
-    if (bra != OP_BRA)
-      {
-      free_stack(common, framesize + extrasize - 1);
-      OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(0), SLJIT_IMM, 0);
-      }
-    else
-      free_stack(common, framesize + extrasize);
-    OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_LOCALS_REG), private_data_ptr, TMP1, 0);
-    }
-
-  if (bra == OP_BRAZERO)
-    backtrack->matchingpath = LABEL();
-  else if (bra == OP_BRAMINZERO)
-    {
-    JUMPTO(SLJIT_JUMP, backtrack->matchingpath);
-    JUMPHERE(brajump);
-    }
-
-  if (bra != OP_BRA)
-    {
-    SLJIT_ASSERT(found == &backtrack->common.topbacktracks);
-    set_jumps(backtrack->common.topbacktracks, LABEL());
-    backtrack->common.topbacktracks = NULL;
-    }
-  }
-
-if (opcode == OP_ASSERT_NOT || opcode == OP_ASSERTBACK_NOT)
-  {
-  common->local_exit = save_local_exit;
-  common->quit_label = save_quit_label;
-  common->quit = save_quit;
-  }
-common->positive_assert = save_positive_assert;
-common->then_trap = save_then_trap;
-common->accept_label = save_accept_label;
-common->positive_assert_quit = save_positive_assert_quit;
-common->accept = save_accept;
-return cc + 1 + LINK_SIZE;
-}
-
-static SLJIT_INLINE void match_once_common(compiler_common *common, pcre_uchar ket, int framesize, int private_data_ptr, BOOL has_alternatives, BOOL needs_control_head)
-{
-DEFINE_COMPILER;
-int stacksize;
-
-if (framesize < 0)
-  {
-  if (framesize == no_frame)
-    OP1(SLJIT_MOV, STACK_TOP, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), private_data_ptr);
-  else
-    {
-    stacksize = needs_control_head ? 1 : 0;
-    if (ket != OP_KET || has_alternatives)
-      stacksize++;
-    free_stack(common, stacksize);
-    }
-
-  if (needs_control_head)
-    OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(STACK_TOP), (ket != OP_KET || has_alternatives) ? sizeof(sljit_sw) : 0);
-
-  /* TMP2 which is set here used by OP_KETRMAX below. */
-  if (ket == OP_KETRMAX)
-    OP1(SLJIT_MOV, TMP2, 0, SLJIT_MEM1(STACK_TOP), 0);
-  else if (ket == OP_KETRMIN)
-    {
-    /* Move the STR_PTR to the private_data_ptr. */
-    OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_LOCALS_REG), private_data_ptr, SLJIT_MEM1(STACK_TOP), 0);
-    }
-  }
-else
-  {
-  stacksize = (ket != OP_KET || has_alternatives) ? 2 : 1;
-  OP2(SLJIT_ADD, STACK_TOP, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), private_data_ptr, SLJIT_IMM, (framesize + stacksize) * sizeof(sljit_sw));
-  if (needs_control_head)
-    OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(STACK_TOP), 0);
-
-  if (ket == OP_KETRMAX)
-    {
-    /* TMP2 which is set here used by OP_KETRMAX below. */
-    OP1(SLJIT_MOV, TMP2, 0, SLJIT_MEM1(STACK_TOP), STACK(0));
-    }
-  }
-if (needs_control_head)
-  OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_LOCALS_REG), common->control_head_ptr, TMP1, 0);
-}
-
-static SLJIT_INLINE int match_capture_common(compiler_common *common, int stacksize, int offset, int private_data_ptr)
-{
-DEFINE_COMPILER;
-
-if (common->capture_last_ptr != 0)
-  {
-  OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), common->capture_last_ptr);
-  OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_LOCALS_REG), common->capture_last_ptr, SLJIT_IMM, offset >> 1);
-  OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(stacksize), TMP1, 0);
-  stacksize++;
-  }
-if (common->optimized_cbracket[offset >> 1] == 0)
-  {
-  OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), OVECTOR(offset));
-  OP1(SLJIT_MOV, TMP2, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), OVECTOR(offset + 1));
-  OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(stacksize), TMP1, 0);
-  OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), private_data_ptr);
-  OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(stacksize + 1), TMP2, 0);
-  OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_LOCALS_REG), OVECTOR(offset + 1), STR_PTR, 0);
-  OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_LOCALS_REG), OVECTOR(offset), TMP1, 0);
-  stacksize += 2;
-  }
-return stacksize;
-}
-
-/*
-  Handling bracketed expressions is probably the most complex part.
-
-  Stack layout naming characters:
-    S - Push the current STR_PTR
-    0 - Push a 0 (NULL)
-    A - Push the current STR_PTR. Needed for restoring the STR_PTR
-        before the next alternative. Not pushed if there are no alternatives.
-    M - Any values pushed by the current alternative. Can be empty, or anything.
-    C - Push the previous OVECTOR(i), OVECTOR(i+1) and OVECTOR_PRIV(i) to the stack.
-    L - Push the previous local (pointed by localptr) to the stack
-   () - opional values stored on the stack
-  ()* - optonal, can be stored multiple times
-
-  The following list shows the regular expression templates, their PCRE byte codes
-  and stack layout supported by pcre-sljit.
-
-  (?:)                     OP_BRA     | OP_KET                A M
-  ()                       OP_CBRA    | OP_KET                C M
-  (?:)+                    OP_BRA     | OP_KETRMAX        0   A M S   ( A M S )*
-                           OP_SBRA    | OP_KETRMAX        0   L M S   ( L M S )*
-  (?:)+?                   OP_BRA     | OP_KETRMIN        0   A M S   ( A M S )*
-                           OP_SBRA    | OP_KETRMIN        0   L M S   ( L M S )*
-  ()+                      OP_CBRA    | OP_KETRMAX        0   C M S   ( C M S )*
-                           OP_SCBRA   | OP_KETRMAX        0   C M S   ( C M S )*
-  ()+?                     OP_CBRA    | OP_KETRMIN        0   C M S   ( C M S )*
-                           OP_SCBRA   | OP_KETRMIN        0   C M S   ( C M S )*
-  (?:)?    OP_BRAZERO    | OP_BRA     | OP_KET            S ( A M 0 )
-  (?:)??   OP_BRAMINZERO | OP_BRA     | OP_KET            S ( A M 0 )
-  ()?      OP_BRAZERO    | OP_CBRA    | OP_KET            S ( C M 0 )
-  ()??     OP_BRAMINZERO | OP_CBRA    | OP_KET            S ( C M 0 )
-  (?:)*    OP_BRAZERO    | OP_BRA     | OP_KETRMAX      S 0 ( A M S )*
-           OP_BRAZERO    | OP_SBRA    | OP_KETRMAX      S 0 ( L M S )*
-  (?:)*?   OP_BRAMINZERO | OP_BRA     | OP_KETRMIN      S 0 ( A M S )*
-           OP_BRAMINZERO | OP_SBRA    | OP_KETRMIN      S 0 ( L M S )*
-  ()*      OP_BRAZERO    | OP_CBRA    | OP_KETRMAX      S 0 ( C M S )*
-           OP_BRAZERO    | OP_SCBRA   | OP_KETRMAX      S 0 ( C M S )*
-  ()*?     OP_BRAMINZERO | OP_CBRA    | OP_KETRMIN      S 0 ( C M S )*
-           OP_BRAMINZERO | OP_SCBRA   | OP_KETRMIN      S 0 ( C M S )*
-
-
-  Stack layout naming characters:
-    A - Push the alternative index (starting from 0) on the stack.
-        Not pushed if there is no alternatives.
-    M - Any values pushed by the current alternative. Can be empty, or anything.
-
-  The next list shows the possible content of a bracket:
-  (|)     OP_*BRA    | OP_ALT ...         M A
-  (?()|)  OP_*COND   | OP_ALT             M A
-  (?>|)   OP_ONCE    | OP_ALT ...         [stack trace] M A
-  (?>|)   OP_ONCE_NC | OP_ALT ...         [stack trace] M A
-                                          Or nothing, if trace is unnecessary
-*/
-
-static pcre_uchar *compile_bracket_matchingpath(compiler_common *common, pcre_uchar *cc, backtrack_common *parent)
-{
-DEFINE_COMPILER;
-backtrack_common *backtrack;
-pcre_uchar opcode;
-int private_data_ptr = 0;
-int offset = 0;
-int i, stacksize;
-int repeat_ptr = 0, repeat_length = 0;
-int repeat_type = 0, repeat_count = 0;
-pcre_uchar *ccbegin;
-pcre_uchar *matchingpath;
-pcre_uchar *slot;
-pcre_uchar bra = OP_BRA;
-pcre_uchar ket;
-assert_backtrack *assert;
-BOOL has_alternatives;
-BOOL needs_control_head = FALSE;
-struct sljit_jump *jump;
-struct sljit_jump *skip;
-struct sljit_label *rmax_label = NULL;
-struct sljit_jump *braminzero = NULL;
-
-PUSH_BACKTRACK(sizeof(bracket_backtrack), cc, NULL);
-
-if (*cc == OP_BRAZERO || *cc == OP_BRAMINZERO)
-  {
-  bra = *cc;
-  cc++;
-  opcode = *cc;
-  }
-
-opcode = *cc;
-ccbegin = cc;
-matchingpath = bracketend(cc) - 1 - LINK_SIZE;
-ket = *matchingpath;
-if (ket == OP_KET && PRIVATE_DATA(matchingpath) != 0)
-  {
-  repeat_ptr = PRIVATE_DATA(matchingpath);
-  repeat_length = PRIVATE_DATA(matchingpath + 1);
-  repeat_type = PRIVATE_DATA(matchingpath + 2);
-  repeat_count = PRIVATE_DATA(matchingpath + 3);
-  SLJIT_ASSERT(repeat_length != 0 && repeat_type != 0 && repeat_count != 0);
-  if (repeat_type == OP_UPTO)
-    ket = OP_KETRMAX;
-  if (repeat_type == OP_MINUPTO)
-    ket = OP_KETRMIN;
-  }
-
-if ((opcode == OP_COND || opcode == OP_SCOND) && cc[1 + LINK_SIZE] == OP_DEF)
-  {
-  /* Drop this bracket_backtrack. */
-  parent->top = backtrack->prev;
-  return matchingpath + 1 + LINK_SIZE + repeat_length;
-  }
-
-matchingpath = ccbegin + 1 + LINK_SIZE;
-SLJIT_ASSERT(ket == OP_KET || ket == OP_KETRMAX || ket == OP_KETRMIN);
-SLJIT_ASSERT(!((bra == OP_BRAZERO && ket == OP_KETRMIN) || (bra == OP_BRAMINZERO && ket == OP_KETRMAX)));
-cc += GET(cc, 1);
-
-has_alternatives = *cc == OP_ALT;
-if (SLJIT_UNLIKELY(opcode == OP_COND || opcode == OP_SCOND))
-  has_alternatives = (*matchingpath == OP_RREF || *matchingpath == OP_DNRREF) ? FALSE : TRUE;
-
-if (SLJIT_UNLIKELY(opcode == OP_COND) && (*cc == OP_KETRMAX || *cc == OP_KETRMIN))
-  opcode = OP_SCOND;
-if (SLJIT_UNLIKELY(opcode == OP_ONCE_NC))
-  opcode = OP_ONCE;
-
-if (opcode == OP_CBRA || opcode == OP_SCBRA)
-  {
-  /* Capturing brackets has a pre-allocated space. */
-  offset = GET2(ccbegin, 1 + LINK_SIZE);
-  if (common->optimized_cbracket[offset] == 0)
-    {
-    private_data_ptr = OVECTOR_PRIV(offset);
-    offset <<= 1;
-    }
-  else
-    {
-    offset <<= 1;
-    private_data_ptr = OVECTOR(offset);
-    }
-  BACKTRACK_AS(bracket_backtrack)->private_data_ptr = private_data_ptr;
-  matchingpath += IMM2_SIZE;
-  }
-else if (opcode == OP_ONCE || opcode == OP_SBRA || opcode == OP_SCOND)
-  {
-  /* Other brackets simply allocate the next entry. */
-  private_data_ptr = PRIVATE_DATA(ccbegin);
-  SLJIT_ASSERT(private_data_ptr != 0);
-  BACKTRACK_AS(bracket_backtrack)->private_data_ptr = private_data_ptr;
-  if (opcode == OP_ONCE)
-    BACKTRACK_AS(bracket_backtrack)->u.framesize = get_framesize(common, ccbegin, NULL, FALSE, &needs_control_head);
-  }
-
-/* Instructions before the first alternative. */
-stacksize = 0;
-if (ket == OP_KETRMAX || (ket == OP_KETRMIN && bra != OP_BRAMINZERO))
-  stacksize++;
-if (bra == OP_BRAZERO)
-  stacksize++;
-
-if (stacksize > 0)
-  allocate_stack(common, stacksize);
-
-stacksize = 0;
-if (ket == OP_KETRMAX || (ket == OP_KETRMIN && bra != OP_BRAMINZERO))
-  {
-  OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(stacksize), SLJIT_IMM, 0);
-  stacksize++;
-  }
-
-if (bra == OP_BRAZERO)
-  OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(stacksize), STR_PTR, 0);
-
-if (bra == OP_BRAMINZERO)
-  {
-  /* This is a backtrack path! (Since the try-path of OP_BRAMINZERO matches to the empty string) */
-  OP1(SLJIT_MOV, STR_PTR, 0, SLJIT_MEM1(STACK_TOP), STACK(0));
-  if (ket != OP_KETRMIN)
-    {
-    free_stack(common, 1);
-    braminzero = CMP(SLJIT_C_EQUAL, STR_PTR, 0, SLJIT_IMM, 0);
-    }
-  else
-    {
-    if (opcode == OP_ONCE || opcode >= OP_SBRA)
-      {
-      jump = CMP(SLJIT_C_NOT_EQUAL, STR_PTR, 0, SLJIT_IMM, 0);
-      OP1(SLJIT_MOV, STR_PTR, 0, SLJIT_MEM1(STACK_TOP), STACK(1));
-      /* Nothing stored during the first run. */
-      skip = JUMP(SLJIT_JUMP);
-      JUMPHERE(jump);
-      /* Checking zero-length iteration. */
-      if (opcode != OP_ONCE || BACKTRACK_AS(bracket_backtrack)->u.framesize < 0)
-        {
-        /* When we come from outside, private_data_ptr contains the previous STR_PTR. */
-        braminzero = CMP(SLJIT_C_EQUAL, STR_PTR, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), private_data_ptr);
-        }
-      else
-        {
-        /* Except when the whole stack frame must be saved. */
-        OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), private_data_ptr);
-        braminzero = CMP(SLJIT_C_EQUAL, STR_PTR, 0, SLJIT_MEM1(TMP1), (BACKTRACK_AS(bracket_backtrack)->u.framesize + 1) * sizeof(sljit_sw));
-        }
-      JUMPHERE(skip);
-      }
-    else
-      {
-      jump = CMP(SLJIT_C_NOT_EQUAL, STR_PTR, 0, SLJIT_IMM, 0);
-      OP1(SLJIT_MOV, STR_PTR, 0, SLJIT_MEM1(STACK_TOP), STACK(1));
-      JUMPHERE(jump);
-      }
-    }
-  }
-
-if (repeat_type != 0)
-  {
-  OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_LOCALS_REG), repeat_ptr, SLJIT_IMM, repeat_count);
-  if (repeat_type == OP_EXACT)
-    rmax_label = LABEL();
-  }
-
-if (ket == OP_KETRMIN)
-  BACKTRACK_AS(bracket_backtrack)->recursive_matchingpath = LABEL();
-
-if (ket == OP_KETRMAX)
-  {
-  rmax_label = LABEL();
-  if (has_alternatives && opcode != OP_ONCE && opcode < OP_SBRA && repeat_type == 0)
-    BACKTRACK_AS(bracket_backtrack)->alternative_matchingpath = rmax_label;
-  }
-
-/* Handling capturing brackets and alternatives. */
-if (opcode == OP_ONCE)
-  {
-  stacksize = 0;
-  if (needs_control_head)
-    {
-    OP1(SLJIT_MOV, TMP2, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), common->control_head_ptr);
-    stacksize++;
-    }
-
-  if (BACKTRACK_AS(bracket_backtrack)->u.framesize < 0)
-    {
-    /* Neither capturing brackets nor recursions are found in the block. */
-    if (ket == OP_KETRMIN)
-      {
-      stacksize += 2;
-      if (!needs_control_head)
-        OP1(SLJIT_MOV, TMP2, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), private_data_ptr);
-      }
-    else
-      {
-      if (BACKTRACK_AS(bracket_backtrack)->u.framesize == no_frame)
-        OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_LOCALS_REG), private_data_ptr, STACK_TOP, 0);
-      if (ket == OP_KETRMAX || has_alternatives)
-        stacksize++;
-      }
-
-    if (stacksize > 0)
-      allocate_stack(common, stacksize);
-
-    stacksize = 0;
-    if (needs_control_head)
-      {
-      stacksize++;
-      OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(0), TMP2, 0);
-      }
-
-    if (ket == OP_KETRMIN)
-      {
-      if (needs_control_head)
-        OP1(SLJIT_MOV, TMP2, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), private_data_ptr);
-      OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(stacksize), STR_PTR, 0);
-      if (BACKTRACK_AS(bracket_backtrack)->u.framesize == no_frame)
-        OP2(SLJIT_SUB, SLJIT_MEM1(SLJIT_LOCALS_REG), private_data_ptr, STACK_TOP, 0, SLJIT_IMM, needs_control_head ? (2 * sizeof(sljit_sw)) : sizeof(sljit_sw));
-      OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(stacksize + 1), TMP2, 0);
-      }
-    else if (ket == OP_KETRMAX || has_alternatives)
-      OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(stacksize), STR_PTR, 0);
-    }
-  else
-    {
-    if (ket != OP_KET || has_alternatives)
-      stacksize++;
-
-    stacksize += BACKTRACK_AS(bracket_backtrack)->u.framesize + 1;
-    allocate_stack(common, stacksize);
-
-    if (needs_control_head)
-      OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(0), TMP2, 0);
-
-    OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), private_data_ptr);
-    OP2(SLJIT_SUB, TMP2, 0, STACK_TOP, 0, SLJIT_IMM, stacksize * sizeof(sljit_sw));
-
-    stacksize = needs_control_head ? 1 : 0;
-    if (ket != OP_KET || has_alternatives)
-      {
-      OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(stacksize), STR_PTR, 0);
-      OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_LOCALS_REG), private_data_ptr, TMP2, 0);
-      stacksize++;
-      OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(stacksize), TMP1, 0);
-      }
-    else
-      {
-      OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_LOCALS_REG), private_data_ptr, TMP2, 0);
-      OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(stacksize), TMP1, 0);
-      }
-    init_frame(common, ccbegin, NULL, BACKTRACK_AS(bracket_backtrack)->u.framesize + stacksize, stacksize + 1, FALSE);
-    }
-  }
-else if (opcode == OP_CBRA || opcode == OP_SCBRA)
-  {
-  /* Saving the previous values. */
-  if (common->optimized_cbracket[offset >> 1] != 0)
-    {
-    SLJIT_ASSERT(private_data_ptr == OVECTOR(offset));
-    allocate_stack(common, 2);
-    OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), private_data_ptr);
-    OP1(SLJIT_MOV, TMP2, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), private_data_ptr + sizeof(sljit_sw));
-    OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_LOCALS_REG), private_data_ptr, STR_PTR, 0);
-    OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(0), TMP1, 0);
-    OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(1), TMP2, 0);
-    }
-  else
-    {
-    OP1(SLJIT_MOV, TMP2, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), private_data_ptr);
-    allocate_stack(common, 1);
-    OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_LOCALS_REG), private_data_ptr, STR_PTR, 0);
-    OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(0), TMP2, 0);
-    }
-  }
-else if (opcode == OP_SBRA || opcode == OP_SCOND)
-  {
-  /* Saving the previous value. */
-  OP1(SLJIT_MOV, TMP2, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), private_data_ptr);
-  allocate_stack(common, 1);
-  OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_LOCALS_REG), private_data_ptr, STR_PTR, 0);
-  OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(0), TMP2, 0);
-  }
-else if (has_alternatives)
-  {
-  /* Pushing the starting string pointer. */
-  allocate_stack(common, 1);
-  OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(0), STR_PTR, 0);
-  }
-
-/* Generating code for the first alternative. */
-if (opcode == OP_COND || opcode == OP_SCOND)
-  {
-  if (*matchingpath == OP_CREF)
-    {
-    SLJIT_ASSERT(has_alternatives);
-    add_jump(compiler, &(BACKTRACK_AS(bracket_backtrack)->u.condfailed),
-      CMP(SLJIT_C_EQUAL, SLJIT_MEM1(SLJIT_LOCALS_REG), OVECTOR(GET2(matchingpath, 1) << 1), SLJIT_MEM1(SLJIT_LOCALS_REG), OVECTOR(1)));
-    matchingpath += 1 + IMM2_SIZE;
-    }
-  else if (*matchingpath == OP_DNCREF)
-    {
-    SLJIT_ASSERT(has_alternatives);
-
-    i = GET2(matchingpath, 1 + IMM2_SIZE);
-    slot = common->name_table + GET2(matchingpath, 1) * common->name_entry_size;
-    OP1(SLJIT_MOV, TMP3, 0, STR_PTR, 0);
-    OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), OVECTOR(1));
-    OP2(SLJIT_SUB | SLJIT_SET_E, TMP2, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), OVECTOR(GET2(slot, 0) << 1), TMP1, 0);
-    slot += common->name_entry_size;
-    i--;
-    while (i-- > 0)
-      {
-      OP2(SLJIT_SUB, STR_PTR, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), OVECTOR(GET2(slot, 0) << 1), TMP1, 0);
-      OP2(SLJIT_OR | SLJIT_SET_E, TMP2, 0, TMP2, 0, STR_PTR, 0);
-      slot += common->name_entry_size;
-      }
-    OP1(SLJIT_MOV, STR_PTR, 0, TMP3, 0);
-    add_jump(compiler, &(BACKTRACK_AS(bracket_backtrack)->u.condfailed), JUMP(SLJIT_C_ZERO));
-    matchingpath += 1 + 2 * IMM2_SIZE;
-    }
-  else if (*matchingpath == OP_RREF || *matchingpath == OP_DNRREF)
-    {
-    /* Never has other case. */
-    BACKTRACK_AS(bracket_backtrack)->u.condfailed = NULL;
-    SLJIT_ASSERT(!has_alternatives);
-
-    if (*matchingpath == OP_RREF)
-      {
-      stacksize = GET2(matchingpath, 1);
-      if (common->currententry == NULL)
-        stacksize = 0;
-      else if (stacksize == RREF_ANY)
-        stacksize = 1;
-      else if (common->currententry->start == 0)
-        stacksize = stacksize == 0;
-      else
-        stacksize = stacksize == (int)GET2(common->start, common->currententry->start + 1 + LINK_SIZE);
-
-      if (stacksize != 0)
-        matchingpath += 1 + IMM2_SIZE;
-      }
-    else
-      {
-      if (common->currententry == NULL || common->currententry->start == 0)
-        stacksize = 0;
-      else
-        {
-        stacksize = GET2(matchingpath, 1 + IMM2_SIZE);
-        slot = common->name_table + GET2(matchingpath, 1) * common->name_entry_size;
-        i = (int)GET2(common->start, common->currententry->start + 1 + LINK_SIZE);
-        while (stacksize > 0)
-          {
-          if ((int)GET2(slot, 0) == i)
-            break;
-          slot += common->name_entry_size;
-          stacksize--;
-          }
-        }
-
-      if (stacksize != 0)
-        matchingpath += 1 + 2 * IMM2_SIZE;
-      }
-
-      /* The stacksize == 0 is a common "else" case. */
-      if (stacksize == 0)
-        {
-        if (*cc == OP_ALT)
-          {
-          matchingpath = cc + 1 + LINK_SIZE;
-          cc += GET(cc, 1);
-          }
-        else
-          matchingpath = cc;
-        }
-    }
-  else
-    {
-    SLJIT_ASSERT(has_alternatives && *matchingpath >= OP_ASSERT && *matchingpath <= OP_ASSERTBACK_NOT);
-    /* Similar code as PUSH_BACKTRACK macro. */
-    assert = sljit_alloc_memory(compiler, sizeof(assert_backtrack));
-    if (SLJIT_UNLIKELY(sljit_get_compiler_error(compiler)))
-      return NULL;
-    memset(assert, 0, sizeof(assert_backtrack));
-    assert->common.cc = matchingpath;
-    BACKTRACK_AS(bracket_backtrack)->u.assert = assert;
-    matchingpath = compile_assert_matchingpath(common, matchingpath, assert, TRUE);
-    }
-  }
-
-compile_matchingpath(common, matchingpath, cc, backtrack);
-if (SLJIT_UNLIKELY(sljit_get_compiler_error(compiler)))
-  return NULL;
-
-if (opcode == OP_ONCE)
-  match_once_common(common, ket, BACKTRACK_AS(bracket_backtrack)->u.framesize, private_data_ptr, has_alternatives, needs_control_head);
-
-stacksize = 0;
-if (repeat_type == OP_MINUPTO)
-  {
-  /* We need to preserve the counter. TMP2 will be used below. */
-  OP1(SLJIT_MOV, TMP2, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), repeat_ptr);
-  stacksize++;
-  }
-if (ket != OP_KET || bra != OP_BRA)
-  stacksize++;
-if (offset != 0)
-  {
-  if (common->capture_last_ptr != 0)
-    stacksize++;
-  if (common->optimized_cbracket[offset >> 1] == 0)
-    stacksize += 2;
-  }
-if (has_alternatives && opcode != OP_ONCE)
-  stacksize++;
-
-if (stacksize > 0)
-  allocate_stack(common, stacksize);
-
-stacksize = 0;
-if (repeat_type == OP_MINUPTO)
-  {
-  /* TMP2 was set above. */
-  OP2(SLJIT_SUB, SLJIT_MEM1(STACK_TOP), STACK(stacksize), TMP2, 0, SLJIT_IMM, 1);
-  stacksize++;
-  }
-
-if (ket != OP_KET || bra != OP_BRA)
-  {
-  if (ket != OP_KET)
-    OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(stacksize), STR_PTR, 0);
-  else
-    OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(stacksize), SLJIT_IMM, 0);
-  stacksize++;
-  }
-
-if (offset != 0)
-  stacksize = match_capture_common(common, stacksize, offset, private_data_ptr);
-
-if (has_alternatives)
-  {
-  if (opcode != OP_ONCE)
-    OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(stacksize), SLJIT_IMM, 0);
-  if (ket != OP_KETRMAX)
-    BACKTRACK_AS(bracket_backtrack)->alternative_matchingpath = LABEL();
-  }
-
-/* Must be after the matchingpath label. */
-if (offset != 0 && common->optimized_cbracket[offset >> 1] != 0)
-  {
-  SLJIT_ASSERT(private_data_ptr == OVECTOR(offset + 0));
-  OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_LOCALS_REG), OVECTOR(offset + 1), STR_PTR, 0);
-  }
-
-if (ket == OP_KETRMAX)
-  {
-  if (repeat_type != 0)
-    {
-    if (has_alternatives)
-      BACKTRACK_AS(bracket_backtrack)->alternative_matchingpath = LABEL();
-    OP2(SLJIT_SUB | SLJIT_SET_E, SLJIT_MEM1(SLJIT_LOCALS_REG), repeat_ptr, SLJIT_MEM1(SLJIT_LOCALS_REG), repeat_ptr, SLJIT_IMM, 1);
-    JUMPTO(SLJIT_C_NOT_ZERO, rmax_label);
-    /* Drop STR_PTR for greedy plus quantifier. */
-    if (opcode != OP_ONCE)
-      free_stack(common, 1);
-    }
-  else if (opcode == OP_ONCE || opcode >= OP_SBRA)
-    {
-    if (has_alternatives)
-      BACKTRACK_AS(bracket_backtrack)->alternative_matchingpath = LABEL();
-    /* Checking zero-length iteration. */
-    if (opcode != OP_ONCE)
-      {
-      CMPTO(SLJIT_C_NOT_EQUAL, SLJIT_MEM1(SLJIT_LOCALS_REG), private_data_ptr, STR_PTR, 0, rmax_label);
-      /* Drop STR_PTR for greedy plus quantifier. */
-      if (bra != OP_BRAZERO)
-        free_stack(common, 1);
-      }
-    else
-      /* TMP2 must contain the starting STR_PTR. */
-      CMPTO(SLJIT_C_NOT_EQUAL, TMP2, 0, STR_PTR, 0, rmax_label);
-    }
-  else
-    JUMPTO(SLJIT_JUMP, rmax_label);
-  BACKTRACK_AS(bracket_backtrack)->recursive_matchingpath = LABEL();
-  }
-
-if (repeat_type == OP_EXACT)
-  {
-  OP2(SLJIT_SUB | SLJIT_SET_E, SLJIT_MEM1(SLJIT_LOCALS_REG), repeat_ptr, SLJIT_MEM1(SLJIT_LOCALS_REG), repeat_ptr, SLJIT_IMM, 1);
-  JUMPTO(SLJIT_C_NOT_ZERO, rmax_label);
-  }
-else if (repeat_type == OP_UPTO)
-  {
-  /* We need to preserve the counter. */
-  OP1(SLJIT_MOV, TMP2, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), repeat_ptr);
-  allocate_stack(common, 1);
-  OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(0), TMP2, 0);
-  }
-
-if (bra == OP_BRAZERO)
-  BACKTRACK_AS(bracket_backtrack)->zero_matchingpath = LABEL();
-
-if (bra == OP_BRAMINZERO)
-  {
-  /* This is a backtrack path! (From the viewpoint of OP_BRAMINZERO) */
-  JUMPTO(SLJIT_JUMP, ((braminzero_backtrack *)parent)->matchingpath);
-  if (braminzero != NULL)
-    {
-    JUMPHERE(braminzero);
-    /* We need to release the end pointer to perform the
-    backtrack for the zero-length iteration. When
-    framesize is < 0, OP_ONCE will do the release itself. */
-    if (opcode == OP_ONCE && BACKTRACK_AS(bracket_backtrack)->u.framesize >= 0)
-      {
-      OP1(SLJIT_MOV, STACK_TOP, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), private_data_ptr);
-      add_jump(compiler, &common->revertframes, JUMP(SLJIT_FAST_CALL));
-      }
-    else if (ket == OP_KETRMIN && opcode != OP_ONCE)
-      free_stack(common, 1);
-    }
-  /* Continue to the normal backtrack. */
-  }
-
-if ((ket != OP_KET && bra != OP_BRAMINZERO) || bra == OP_BRAZERO)
-  count_match(common);
-
-/* Skip the other alternatives. */
-while (*cc == OP_ALT)
-  cc += GET(cc, 1);
-cc += 1 + LINK_SIZE;
-
-/* Temporarily encoding the needs_control_head in framesize. */
-if (opcode == OP_ONCE)
-  BACKTRACK_AS(bracket_backtrack)->u.framesize = (BACKTRACK_AS(bracket_backtrack)->u.framesize << 1) | (needs_control_head ? 1 : 0);
-return cc + repeat_length;
-}
-
-static pcre_uchar *compile_bracketpos_matchingpath(compiler_common *common, pcre_uchar *cc, backtrack_common *parent)
-{
-DEFINE_COMPILER;
-backtrack_common *backtrack;
-pcre_uchar opcode;
-int private_data_ptr;
-int cbraprivptr = 0;
-BOOL needs_control_head;
-int framesize;
-int stacksize;
-int offset = 0;
-BOOL zero = FALSE;
-pcre_uchar *ccbegin = NULL;
-int stack; /* Also contains the offset of control head. */
-struct sljit_label *loop = NULL;
-struct jump_list *emptymatch = NULL;
-
-PUSH_BACKTRACK(sizeof(bracketpos_backtrack), cc, NULL);
-if (*cc == OP_BRAPOSZERO)
-  {
-  zero = TRUE;
-  cc++;
-  }
-
-opcode = *cc;
-private_data_ptr = PRIVATE_DATA(cc);
-SLJIT_ASSERT(private_data_ptr != 0);
-BACKTRACK_AS(bracketpos_backtrack)->private_data_ptr = private_data_ptr;
-switch(opcode)
-  {
-  case OP_BRAPOS:
-  case OP_SBRAPOS:
-  ccbegin = cc + 1 + LINK_SIZE;
-  break;
-
-  case OP_CBRAPOS:
-  case OP_SCBRAPOS:
-  offset = GET2(cc, 1 + LINK_SIZE);
-  /* This case cannot be optimized in the same was as
-  normal capturing brackets. */
-  SLJIT_ASSERT(common->optimized_cbracket[offset] == 0);
-  cbraprivptr = OVECTOR_PRIV(offset);
-  offset <<= 1;
-  ccbegin = cc + 1 + LINK_SIZE + IMM2_SIZE;
-  break;
-
-  default:
-  SLJIT_ASSERT_STOP();
-  break;
-  }
-
-framesize = get_framesize(common, cc, NULL, FALSE, &needs_control_head);
-BACKTRACK_AS(bracketpos_backtrack)->framesize = framesize;
-if (framesize < 0)
-  {
-  if (offset != 0)
-    {
-    stacksize = 2;
-    if (common->capture_last_ptr != 0)
-      stacksize++;
-    }
-  else
-    stacksize = 1;
-
-  if (needs_control_head)
-    stacksize++;
-  if (!zero)
-    stacksize++;
-
-  BACKTRACK_AS(bracketpos_backtrack)->stacksize = stacksize;
-  allocate_stack(common, stacksize);
-  if (framesize == no_frame)
-    OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_LOCALS_REG), private_data_ptr, STACK_TOP, 0);
-
-  stack = 0;
-  if (offset != 0)
-    {
-    stack = 2;
-    OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), OVECTOR(offset));
-    OP1(SLJIT_MOV, TMP2, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), OVECTOR(offset + 1));
-    OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(0), TMP1, 0);
-    if (common->capture_last_ptr != 0)
-      OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), common->capture_last_ptr);
-    OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(1), TMP2, 0);
-    if (needs_control_head)
-      OP1(SLJIT_MOV, TMP2, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), common->control_head_ptr);
-    if (common->capture_last_ptr != 0)
-      {
-      OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(2), TMP1, 0);
-      stack = 3;
-      }
-    }
-  else
-    {
-    if (needs_control_head)
-      OP1(SLJIT_MOV, TMP2, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), common->control_head_ptr);
-    OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(0), STR_PTR, 0);
-    stack = 1;
-    }
-
-  if (needs_control_head)
-    stack++;
-  if (!zero)
-    OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(stack), SLJIT_IMM, 1);
-  if (needs_control_head)
-    {
-    stack--;
-    OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(stack), TMP2, 0);
-    }
-  }
-else
-  {
-  stacksize = framesize + 1;
-  if (!zero)
-    stacksize++;
-  if (needs_control_head)
-    stacksize++;
-  if (offset == 0)
-    stacksize++;
-  BACKTRACK_AS(bracketpos_backtrack)->stacksize = stacksize;
-
-  allocate_stack(common, stacksize);
-  OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), private_data_ptr);
-  if (needs_control_head)
-    OP1(SLJIT_MOV, TMP2, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), common->control_head_ptr);
-  OP2(SLJIT_SUB, SLJIT_MEM1(SLJIT_LOCALS_REG), private_data_ptr, STACK_TOP, 0, SLJIT_IMM, -STACK(stacksize - 1));
-
-  stack = 0;
-  if (!zero)
-    {
-    OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(0), SLJIT_IMM, 1);
-    stack = 1;
-    }
-  if (needs_control_head)
-    {
-    OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(stack), TMP2, 0);
-    stack++;
-    }
-  if (offset == 0)
-    {
-    OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(stack), STR_PTR, 0);
-    stack++;
-    }
-  OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(stack), TMP1, 0);
-  init_frame(common, cc, NULL, stacksize - 1, stacksize - framesize, FALSE);
-  stack -= 1 + (offset == 0);
-  }
-
-if (offset != 0)
-  OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_LOCALS_REG), cbraprivptr, STR_PTR, 0);
-
-loop = LABEL();
-while (*cc != OP_KETRPOS)
-  {
-  backtrack->top = NULL;
-  backtrack->topbacktracks = NULL;
-  cc += GET(cc, 1);
-
-  compile_matchingpath(common, ccbegin, cc, backtrack);
-  if (SLJIT_UNLIKELY(sljit_get_compiler_error(compiler)))
-    return NULL;
-
-  if (framesize < 0)
-    {
-    if (framesize == no_frame)
-      OP1(SLJIT_MOV, STACK_TOP, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), private_data_ptr);
-
-    if (offset != 0)
-      {
-      OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), cbraprivptr);
-      OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_LOCALS_REG), OVECTOR(offset + 1), STR_PTR, 0);
-      OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_LOCALS_REG), cbraprivptr, STR_PTR, 0);
-      if (common->capture_last_ptr != 0)
-        OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_LOCALS_REG), common->capture_last_ptr, SLJIT_IMM, offset >> 1);
-      OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_LOCALS_REG), OVECTOR(offset), TMP1, 0);
-      }
-    else
-      {
-      if (opcode == OP_SBRAPOS)
-        OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(STACK_TOP), STACK(0));
-      OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(0), STR_PTR, 0);
-      }
-
-    if (opcode == OP_SBRAPOS || opcode == OP_SCBRAPOS)
-      add_jump(compiler, &emptymatch, CMP(SLJIT_C_EQUAL, TMP1, 0, STR_PTR, 0));
-
-    if (!zero)
-      OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(stacksize - 1), SLJIT_IMM, 0);
-    }
-  else
-    {
-    if (offset != 0)
-      {
-      OP2(SLJIT_ADD, STACK_TOP, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), private_data_ptr, SLJIT_IMM, stacksize * sizeof(sljit_sw));
-      OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), cbraprivptr);
-      OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_LOCALS_REG), OVECTOR(offset + 1), STR_PTR, 0);
-      OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_LOCALS_REG), cbraprivptr, STR_PTR, 0);
-      if (common->capture_last_ptr != 0)
-        OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_LOCALS_REG), common->capture_last_ptr, SLJIT_IMM, offset >> 1);
-      OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_LOCALS_REG), OVECTOR(offset), TMP1, 0);
-      }
-    else
-      {
-      OP1(SLJIT_MOV, TMP2, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), private_data_ptr);
-      OP2(SLJIT_ADD, STACK_TOP, 0, TMP2, 0, SLJIT_IMM, stacksize * sizeof(sljit_sw));
-      if (opcode == OP_SBRAPOS)
-        OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(TMP2), (framesize + 1) * sizeof(sljit_sw));
-      OP1(SLJIT_MOV, SLJIT_MEM1(TMP2), (framesize + 1) * sizeof(sljit_sw), STR_PTR, 0);
-      }
-
-    if (opcode == OP_SBRAPOS || opcode == OP_SCBRAPOS)
-      add_jump(compiler, &emptymatch, CMP(SLJIT_C_EQUAL, TMP1, 0, STR_PTR, 0));
-
-    if (!zero)
-      {
-      if (framesize < 0)
-        OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(stacksize - 1), SLJIT_IMM, 0);
-      else
-        OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(0), SLJIT_IMM, 0);
-      }
-    }
-
-  if (needs_control_head)
-    OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_LOCALS_REG), common->control_head_ptr, SLJIT_MEM1(STACK_TOP), STACK(stack));
-
-  JUMPTO(SLJIT_JUMP, loop);
-  flush_stubs(common);
-
-  compile_backtrackingpath(common, backtrack->top);
-  if (SLJIT_UNLIKELY(sljit_get_compiler_error(compiler)))
-    return NULL;
-  set_jumps(backtrack->topbacktracks, LABEL());
-
-  if (framesize < 0)
-    {
-    if (offset != 0)
-      OP1(SLJIT_MOV, STR_PTR, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), cbraprivptr);
-    else
-      OP1(SLJIT_MOV, STR_PTR, 0, SLJIT_MEM1(STACK_TOP), STACK(0));
-    }
-  else
-    {
-    if (offset != 0)
-      {
-      /* Last alternative. */
-      if (*cc == OP_KETRPOS)
-        OP1(SLJIT_MOV, TMP2, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), private_data_ptr);
-      OP1(SLJIT_MOV, STR_PTR, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), cbraprivptr);
-      }
-    else
-      {
-      OP1(SLJIT_MOV, TMP2, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), private_data_ptr);
-      OP1(SLJIT_MOV, STR_PTR, 0, SLJIT_MEM1(TMP2), (framesize + 1) * sizeof(sljit_sw));
-      }
-    }
-
-  if (*cc == OP_KETRPOS)
-    break;
-  ccbegin = cc + 1 + LINK_SIZE;
-  }
-
-/* We don't have to restore the control head in case of a failed match. */
-
-backtrack->topbacktracks = NULL;
-if (!zero)
-  {
-  if (framesize < 0)
-    add_jump(compiler, &backtrack->topbacktracks, CMP(SLJIT_C_NOT_EQUAL, SLJIT_MEM1(STACK_TOP), STACK(stacksize - 1), SLJIT_IMM, 0));
-  else /* TMP2 is set to [private_data_ptr] above. */
-    add_jump(compiler, &backtrack->topbacktracks, CMP(SLJIT_C_NOT_EQUAL, SLJIT_MEM1(TMP2), (stacksize - 1) * sizeof(sljit_sw), SLJIT_IMM, 0));
-  }
-
-/* None of them matched. */
-set_jumps(emptymatch, LABEL());
-count_match(common);
-return cc + 1 + LINK_SIZE;
-}
-
-static SLJIT_INLINE pcre_uchar *get_iterator_parameters(compiler_common *common, pcre_uchar *cc, pcre_uchar *opcode, pcre_uchar *type, int *max, int *min, pcre_uchar **end)
-{
-int class_len;
-
-*opcode = *cc;
-if (*opcode >= OP_STAR && *opcode <= OP_POSUPTO)
-  {
-  cc++;
-  *type = OP_CHAR;
-  }
-else if (*opcode >= OP_STARI && *opcode <= OP_POSUPTOI)
-  {
-  cc++;
-  *type = OP_CHARI;
-  *opcode -= OP_STARI - OP_STAR;
-  }
-else if (*opcode >= OP_NOTSTAR && *opcode <= OP_NOTPOSUPTO)
-  {
-  cc++;
-  *type = OP_NOT;
-  *opcode -= OP_NOTSTAR - OP_STAR;
-  }
-else if (*opcode >= OP_NOTSTARI && *opcode <= OP_NOTPOSUPTOI)
-  {
-  cc++;
-  *type = OP_NOTI;
-  *opcode -= OP_NOTSTARI - OP_STAR;
-  }
-else if (*opcode >= OP_TYPESTAR && *opcode <= OP_TYPEPOSUPTO)
-  {
-  cc++;
-  *opcode -= OP_TYPESTAR - OP_STAR;
-  *type = 0;
-  }
-else
-  {
-  SLJIT_ASSERT(*opcode == OP_CLASS || *opcode == OP_NCLASS || *opcode == OP_XCLASS);
-  *type = *opcode;
-  cc++;
-  class_len = (*type < OP_XCLASS) ? (int)(1 + (32 / sizeof(pcre_uchar))) : GET(cc, 0);
-  *opcode = cc[class_len - 1];
-  if (*opcode >= OP_CRSTAR && *opcode <= OP_CRMINQUERY)
-    {
-    *opcode -= OP_CRSTAR - OP_STAR;
-    if (end != NULL)
-      *end = cc + class_len;
-    }
-  else if (*opcode >= OP_CRPOSSTAR && *opcode <= OP_CRPOSQUERY)
-    {
-    *opcode -= OP_CRPOSSTAR - OP_POSSTAR;
-    if (end != NULL)
-      *end = cc + class_len;
-    }
-  else
-    {
-    SLJIT_ASSERT(*opcode == OP_CRRANGE || *opcode == OP_CRMINRANGE || *opcode == OP_CRPOSRANGE);
-    *max = GET2(cc, (class_len + IMM2_SIZE));
-    *min = GET2(cc, class_len);
-
-    if (*min == 0)
-      {
-      SLJIT_ASSERT(*max != 0);
-      *opcode = (*opcode == OP_CRRANGE) ? OP_UPTO : (*opcode == OP_CRMINRANGE ? OP_MINUPTO : OP_POSUPTO);
-      }
-    if (*max == *min)
-      *opcode = OP_EXACT;
-
-    if (end != NULL)
-      *end = cc + class_len + 2 * IMM2_SIZE;
-    }
-  return cc;
-  }
-
-if (*opcode == OP_UPTO || *opcode == OP_MINUPTO || *opcode == OP_EXACT || *opcode == OP_POSUPTO)
-  {
-  *max = GET2(cc, 0);
-  cc += IMM2_SIZE;
-  }
-
-if (*type == 0)
-  {
-  *type = *cc;
-  if (end != NULL)
-    *end = next_opcode(common, cc);
-  cc++;
-  return cc;
-  }
-
-if (end != NULL)
-  {
-  *end = cc + 1;
-#ifdef SUPPORT_UTF
-  if (common->utf && HAS_EXTRALEN(*cc)) *end += GET_EXTRALEN(*cc);
-#endif
-  }
-return cc;
-}
-
-static pcre_uchar *compile_iterator_matchingpath(compiler_common *common, pcre_uchar *cc, backtrack_common *parent)
-{
-DEFINE_COMPILER;
-backtrack_common *backtrack;
-pcre_uchar opcode;
-pcre_uchar type;
-int max = -1, min = -1;
-pcre_uchar* end;
-jump_list *nomatch = NULL;
-struct sljit_jump *jump = NULL;
-struct sljit_label *label;
-int private_data_ptr = PRIVATE_DATA(cc);
-int base = (private_data_ptr == 0) ? SLJIT_MEM1(STACK_TOP) : SLJIT_MEM1(SLJIT_LOCALS_REG);
-int offset0 = (private_data_ptr == 0) ? STACK(0) : private_data_ptr;
-int offset1 = (private_data_ptr == 0) ? STACK(1) : private_data_ptr + (int)sizeof(sljit_sw);
-int tmp_base, tmp_offset;
-
-PUSH_BACKTRACK(sizeof(iterator_backtrack), cc, NULL);
-
-cc = get_iterator_parameters(common, cc, &opcode, &type, &max, &min, &end);
-
-switch(type)
-  {
-  case OP_NOT_DIGIT:
-  case OP_DIGIT:
-  case OP_NOT_WHITESPACE:
-  case OP_WHITESPACE:
-  case OP_NOT_WORDCHAR:
-  case OP_WORDCHAR:
-  case OP_ANY:
-  case OP_ALLANY:
-  case OP_ANYBYTE:
-  case OP_ANYNL:
-  case OP_NOT_HSPACE:
-  case OP_HSPACE:
-  case OP_NOT_VSPACE:
-  case OP_VSPACE:
-  case OP_CHAR:
-  case OP_CHARI:
-  case OP_NOT:
-  case OP_NOTI:
-  case OP_CLASS:
-  case OP_NCLASS:
-  tmp_base = TMP3;
-  tmp_offset = 0;
-  break;
-
-  default:
-  SLJIT_ASSERT_STOP();
-  /* Fall through. */
-
-  case OP_EXTUNI:
-  case OP_XCLASS:
-  case OP_NOTPROP:
-  case OP_PROP:
-  tmp_base = SLJIT_MEM1(SLJIT_LOCALS_REG);
-  tmp_offset = POSSESSIVE0;
-  break;
-  }
-
-switch(opcode)
-  {
-  case OP_STAR:
-  case OP_PLUS:
-  case OP_UPTO:
-  case OP_CRRANGE:
-  if (type == OP_ANYNL || type == OP_EXTUNI)
-    {
-    SLJIT_ASSERT(private_data_ptr == 0);
-    if (opcode == OP_STAR || opcode == OP_UPTO)
-      {
-      allocate_stack(common, 2);
-      OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(0), STR_PTR, 0);
-      OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(1), SLJIT_IMM, 0);
-      }
-    else
-      {
-      allocate_stack(common, 1);
-      OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(0), SLJIT_IMM, 0);
-      }
-
-    if (opcode == OP_UPTO || opcode == OP_CRRANGE)
-      OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_LOCALS_REG), POSSESSIVE0, SLJIT_IMM, 0);
-
-    label = LABEL();
-    compile_char1_matchingpath(common, type, cc, &backtrack->topbacktracks);
-    if (opcode == OP_UPTO || opcode == OP_CRRANGE)
-      {
-      OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), POSSESSIVE0);
-      OP2(SLJIT_ADD, TMP1, 0, TMP1, 0, SLJIT_IMM, 1);
-      if (opcode == OP_CRRANGE && min > 0)
-        CMPTO(SLJIT_C_LESS, TMP1, 0, SLJIT_IMM, min, label);
-      if (opcode == OP_UPTO || (opcode == OP_CRRANGE && max > 0))
-        jump = CMP(SLJIT_C_GREATER_EQUAL, TMP1, 0, SLJIT_IMM, max);
-      OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_LOCALS_REG), POSSESSIVE0, TMP1, 0);
-      }
-
-    /* We cannot use TMP3 because of this allocate_stack. */
-    allocate_stack(common, 1);
-    OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(0), STR_PTR, 0);
-    JUMPTO(SLJIT_JUMP, label);
-    if (jump != NULL)
-      JUMPHERE(jump);
-    }
-  else
-    {
-    if (opcode == OP_PLUS)
-      compile_char1_matchingpath(common, type, cc, &backtrack->topbacktracks);
-    if (private_data_ptr == 0)
-      allocate_stack(common, 2);
-    OP1(SLJIT_MOV, base, offset0, STR_PTR, 0);
-    if (opcode <= OP_PLUS)
-      OP1(SLJIT_MOV, base, offset1, STR_PTR, 0);
-    else
-      OP1(SLJIT_MOV, base, offset1, SLJIT_IMM, 1);
-    label = LABEL();
-    compile_char1_matchingpath(common, type, cc, &nomatch);
-    OP1(SLJIT_MOV, base, offset0, STR_PTR, 0);
-    if (opcode <= OP_PLUS)
-      JUMPTO(SLJIT_JUMP, label);
-    else if (opcode == OP_CRRANGE && max == 0)
-      {
-      OP2(SLJIT_ADD, base, offset1, base, offset1, SLJIT_IMM, 1);
-      JUMPTO(SLJIT_JUMP, label);
-      }
-    else
-      {
-      OP1(SLJIT_MOV, TMP1, 0, base, offset1);
-      OP2(SLJIT_ADD, TMP1, 0, TMP1, 0, SLJIT_IMM, 1);
-      OP1(SLJIT_MOV, base, offset1, TMP1, 0);
-      CMPTO(SLJIT_C_LESS, TMP1, 0, SLJIT_IMM, max + 1, label);
-      }
-    set_jumps(nomatch, LABEL());
-    if (opcode == OP_CRRANGE)
-      add_jump(compiler, &backtrack->topbacktracks, CMP(SLJIT_C_LESS, base, offset1, SLJIT_IMM, min + 1));
-    OP1(SLJIT_MOV, STR_PTR, 0, base, offset0);
-    }
-  BACKTRACK_AS(iterator_backtrack)->matchingpath = LABEL();
-  break;
-
-  case OP_MINSTAR:
-  case OP_MINPLUS:
-  if (opcode == OP_MINPLUS)
-    compile_char1_matchingpath(common, type, cc, &backtrack->topbacktracks);
-  if (private_data_ptr == 0)
-    allocate_stack(common, 1);
-  OP1(SLJIT_MOV, base, offset0, STR_PTR, 0);
-  BACKTRACK_AS(iterator_backtrack)->matchingpath = LABEL();
-  break;
-
-  case OP_MINUPTO:
-  case OP_CRMINRANGE:
-  if (private_data_ptr == 0)
-    allocate_stack(common, 2);
-  OP1(SLJIT_MOV, base, offset0, STR_PTR, 0);
-  OP1(SLJIT_MOV, base, offset1, SLJIT_IMM, 1);
-  if (opcode == OP_CRMINRANGE)
-    add_jump(compiler, &backtrack->topbacktracks, JUMP(SLJIT_JUMP));
-  BACKTRACK_AS(iterator_backtrack)->matchingpath = LABEL();
-  break;
-
-  case OP_QUERY:
-  case OP_MINQUERY:
-  if (private_data_ptr == 0)
-    allocate_stack(common, 1);
-  OP1(SLJIT_MOV, base, offset0, STR_PTR, 0);
-  if (opcode == OP_QUERY)
-    compile_char1_matchingpath(common, type, cc, &backtrack->topbacktracks);
-  BACKTRACK_AS(iterator_backtrack)->matchingpath = LABEL();
-  break;
-
-  case OP_EXACT:
-  OP1(SLJIT_MOV, tmp_base, tmp_offset, SLJIT_IMM, max);
-  label = LABEL();
-  compile_char1_matchingpath(common, type, cc, &backtrack->topbacktracks);
-  OP2(SLJIT_SUB | SLJIT_SET_E, tmp_base, tmp_offset, tmp_base, tmp_offset, SLJIT_IMM, 1);
-  JUMPTO(SLJIT_C_NOT_ZERO, label);
-  break;
-
-  case OP_POSSTAR:
-  case OP_POSPLUS:
-  case OP_POSUPTO:
-  if (opcode == OP_POSPLUS)
-    compile_char1_matchingpath(common, type, cc, &backtrack->topbacktracks);
-  if (opcode == OP_POSUPTO)
-    OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_LOCALS_REG), POSSESSIVE1, SLJIT_IMM, max);
-  OP1(SLJIT_MOV, tmp_base, tmp_offset, STR_PTR, 0);
-  label = LABEL();
-  compile_char1_matchingpath(common, type, cc, &nomatch);
-  OP1(SLJIT_MOV, tmp_base, tmp_offset, STR_PTR, 0);
-  if (opcode != OP_POSUPTO)
-    JUMPTO(SLJIT_JUMP, label);
-  else
-    {
-    OP2(SLJIT_SUB | SLJIT_SET_E, SLJIT_MEM1(SLJIT_LOCALS_REG), POSSESSIVE1, SLJIT_MEM1(SLJIT_LOCALS_REG), POSSESSIVE1, SLJIT_IMM, 1);
-    JUMPTO(SLJIT_C_NOT_ZERO, label);
-    }
-  set_jumps(nomatch, LABEL());
-  OP1(SLJIT_MOV, STR_PTR, 0, tmp_base, tmp_offset);
-  break;
-
-  case OP_POSQUERY:
-  OP1(SLJIT_MOV, tmp_base, tmp_offset, STR_PTR, 0);
-  compile_char1_matchingpath(common, type, cc, &nomatch);
-  OP1(SLJIT_MOV, tmp_base, tmp_offset, STR_PTR, 0);
-  set_jumps(nomatch, LABEL());
-  OP1(SLJIT_MOV, STR_PTR, 0, tmp_base, tmp_offset);
-  break;
-
-  case OP_CRPOSRANGE:
-  /* Combination of OP_EXACT and OP_POSSTAR or OP_POSUPTO */
-  OP1(SLJIT_MOV, tmp_base, tmp_offset, SLJIT_IMM, min);
-  label = LABEL();
-  compile_char1_matchingpath(common, type, cc, &backtrack->topbacktracks);
-  OP2(SLJIT_SUB | SLJIT_SET_E, tmp_base, tmp_offset, tmp_base, tmp_offset, SLJIT_IMM, 1);
-  JUMPTO(SLJIT_C_NOT_ZERO, label);
-
-  if (max != 0)
-    {
-    SLJIT_ASSERT(max - min > 0);
-    OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_LOCALS_REG), POSSESSIVE1, SLJIT_IMM, max - min);
-    }
-  OP1(SLJIT_MOV, tmp_base, tmp_offset, STR_PTR, 0);
-  label = LABEL();
-  compile_char1_matchingpath(common, type, cc, &nomatch);
-  OP1(SLJIT_MOV, tmp_base, tmp_offset, STR_PTR, 0);
-  if (max == 0)
-    JUMPTO(SLJIT_JUMP, label);
-  else
-    {
-    OP2(SLJIT_SUB | SLJIT_SET_E, SLJIT_MEM1(SLJIT_LOCALS_REG), POSSESSIVE1, SLJIT_MEM1(SLJIT_LOCALS_REG), POSSESSIVE1, SLJIT_IMM, 1);
-    JUMPTO(SLJIT_C_NOT_ZERO, label);
-    }
-  set_jumps(nomatch, LABEL());
-  OP1(SLJIT_MOV, STR_PTR, 0, tmp_base, tmp_offset);
-  break;
-
-  default:
-  SLJIT_ASSERT_STOP();
-  break;
-  }
-
-count_match(common);
-return end;
-}
-
-static SLJIT_INLINE pcre_uchar *compile_fail_accept_matchingpath(compiler_common *common, pcre_uchar *cc, backtrack_common *parent)
-{
-DEFINE_COMPILER;
-backtrack_common *backtrack;
-
-PUSH_BACKTRACK(sizeof(backtrack_common), cc, NULL);
-
-if (*cc == OP_FAIL)
-  {
-  add_jump(compiler, &backtrack->topbacktracks, JUMP(SLJIT_JUMP));
-  return cc + 1;
-  }
-
-if (*cc == OP_ASSERT_ACCEPT || common->currententry != NULL || !common->might_be_empty)
-  {
-  /* No need to check notempty conditions. */
-  if (common->accept_label == NULL)
-    add_jump(compiler, &common->accept, JUMP(SLJIT_JUMP));
-  else
-    JUMPTO(SLJIT_JUMP, common->accept_label);
-  return cc + 1;
-  }
-
-if (common->accept_label == NULL)
-  add_jump(compiler, &common->accept, CMP(SLJIT_C_NOT_EQUAL, STR_PTR, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), OVECTOR(0)));
-else
-  CMPTO(SLJIT_C_NOT_EQUAL, STR_PTR, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), OVECTOR(0), common->accept_label);
-OP1(SLJIT_MOV, TMP1, 0, ARGUMENTS, 0);
-OP1(SLJIT_MOV_UB, TMP2, 0, SLJIT_MEM1(TMP1), SLJIT_OFFSETOF(jit_arguments, notempty));
-add_jump(compiler, &backtrack->topbacktracks, CMP(SLJIT_C_NOT_EQUAL, TMP2, 0, SLJIT_IMM, 0));
-OP1(SLJIT_MOV_UB, TMP2, 0, SLJIT_MEM1(TMP1), SLJIT_OFFSETOF(jit_arguments, notempty_atstart));
-if (common->accept_label == NULL)
-  add_jump(compiler, &common->accept, CMP(SLJIT_C_EQUAL, TMP2, 0, SLJIT_IMM, 0));
-else
-  CMPTO(SLJIT_C_EQUAL, TMP2, 0, SLJIT_IMM, 0, common->accept_label);
-OP1(SLJIT_MOV, TMP2, 0, SLJIT_MEM1(TMP1), SLJIT_OFFSETOF(jit_arguments, str));
-if (common->accept_label == NULL)
-  add_jump(compiler, &common->accept, CMP(SLJIT_C_NOT_EQUAL, TMP2, 0, STR_PTR, 0));
-else
-  CMPTO(SLJIT_C_NOT_EQUAL, TMP2, 0, STR_PTR, 0, common->accept_label);
-add_jump(compiler, &backtrack->topbacktracks, JUMP(SLJIT_JUMP));
-return cc + 1;
-}
-
-static SLJIT_INLINE pcre_uchar *compile_close_matchingpath(compiler_common *common, pcre_uchar *cc)
-{
-DEFINE_COMPILER;
-int offset = GET2(cc, 1);
-BOOL optimized_cbracket = common->optimized_cbracket[offset] != 0;
-
-/* Data will be discarded anyway... */
-if (common->currententry != NULL)
-  return cc + 1 + IMM2_SIZE;
-
-if (!optimized_cbracket)
-  OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), OVECTOR_PRIV(offset));
-offset <<= 1;
-OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_LOCALS_REG), OVECTOR(offset + 1), STR_PTR, 0);
-if (!optimized_cbracket)
-  OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_LOCALS_REG), OVECTOR(offset), TMP1, 0);
-return cc + 1 + IMM2_SIZE;
-}
-
-static SLJIT_INLINE pcre_uchar *compile_control_verb_matchingpath(compiler_common *common, pcre_uchar *cc, backtrack_common *parent)
-{
-DEFINE_COMPILER;
-backtrack_common *backtrack;
-pcre_uchar opcode = *cc;
-pcre_uchar *ccend = cc + 1;
-
-if (opcode == OP_PRUNE_ARG || opcode == OP_SKIP_ARG || opcode == OP_THEN_ARG)
-  ccend += 2 + cc[1];
-
-PUSH_BACKTRACK(sizeof(backtrack_common), cc, NULL);
-
-if (opcode == OP_SKIP)
-  {
-  allocate_stack(common, 1);
-  OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(0), STR_PTR, 0);
-  return ccend;
-  }
-
-if (opcode == OP_PRUNE_ARG || opcode == OP_THEN_ARG)
-  {
-  OP1(SLJIT_MOV, TMP1, 0, ARGUMENTS, 0);
-  OP1(SLJIT_MOV, TMP2, 0, SLJIT_IMM, (sljit_sw)(cc + 2));
-  OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_LOCALS_REG), common->mark_ptr, TMP2, 0);
-  OP1(SLJIT_MOV, SLJIT_MEM1(TMP1), SLJIT_OFFSETOF(jit_arguments, mark_ptr), TMP2, 0);
-  }
-
-return ccend;
-}
-
-static pcre_uchar then_trap_opcode[1] = { OP_THEN_TRAP };
-
-static SLJIT_INLINE void compile_then_trap_matchingpath(compiler_common *common, pcre_uchar *cc, pcre_uchar *ccend, backtrack_common *parent)
-{
-DEFINE_COMPILER;
-backtrack_common *backtrack;
-BOOL needs_control_head;
-int size;
-
-PUSH_BACKTRACK_NOVALUE(sizeof(then_trap_backtrack), cc);
-common->then_trap = BACKTRACK_AS(then_trap_backtrack);
-BACKTRACK_AS(then_trap_backtrack)->common.cc = then_trap_opcode;
-BACKTRACK_AS(then_trap_backtrack)->start = (sljit_sw)(cc - common->start);
-BACKTRACK_AS(then_trap_backtrack)->framesize = get_framesize(common, cc, ccend, FALSE, &needs_control_head);
-
-size = BACKTRACK_AS(then_trap_backtrack)->framesize;
-size = 3 + (size < 0 ? 0 : size);
-
-OP1(SLJIT_MOV, TMP2, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), common->control_head_ptr);
-allocate_stack(common, size);
-if (size > 3)
-  OP2(SLJIT_SUB, SLJIT_MEM1(SLJIT_LOCALS_REG), common->control_head_ptr, STACK_TOP, 0, SLJIT_IMM, (size - 3) * sizeof(sljit_sw));
-else
-  OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_LOCALS_REG), common->control_head_ptr, STACK_TOP, 0);
-OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(size - 1), SLJIT_IMM, BACKTRACK_AS(then_trap_backtrack)->start);
-OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(size - 2), SLJIT_IMM, type_then_trap);
-OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(size - 3), TMP2, 0);
-
-size = BACKTRACK_AS(then_trap_backtrack)->framesize;
-if (size >= 0)
-  init_frame(common, cc, ccend, size - 1, 0, FALSE);
-}
-
-static void compile_matchingpath(compiler_common *common, pcre_uchar *cc, pcre_uchar *ccend, backtrack_common *parent)
-{
-DEFINE_COMPILER;
-backtrack_common *backtrack;
-BOOL has_then_trap = FALSE;
-then_trap_backtrack *save_then_trap = NULL;
-
-SLJIT_ASSERT(*ccend == OP_END || (*ccend >= OP_ALT && *ccend <= OP_KETRPOS));
-
-if (common->has_then && common->then_offsets[cc - common->start] != 0)
-  {
-  SLJIT_ASSERT(*ccend != OP_END && common->control_head_ptr != 0);
-  has_then_trap = TRUE;
-  save_then_trap = common->then_trap;
-  /* Tail item on backtrack. */
-  compile_then_trap_matchingpath(common, cc, ccend, parent);
-  }
-
-while (cc < ccend)
-  {
-  switch(*cc)
-    {
-    case OP_SOD:
-    case OP_SOM:
-    case OP_NOT_WORD_BOUNDARY:
-    case OP_WORD_BOUNDARY:
-    case OP_NOT_DIGIT:
-    case OP_DIGIT:
-    case OP_NOT_WHITESPACE:
-    case OP_WHITESPACE:
-    case OP_NOT_WORDCHAR:
-    case OP_WORDCHAR:
-    case OP_ANY:
-    case OP_ALLANY:
-    case OP_ANYBYTE:
-    case OP_NOTPROP:
-    case OP_PROP:
-    case OP_ANYNL:
-    case OP_NOT_HSPACE:
-    case OP_HSPACE:
-    case OP_NOT_VSPACE:
-    case OP_VSPACE:
-    case OP_EXTUNI:
-    case OP_EODN:
-    case OP_EOD:
-    case OP_CIRC:
-    case OP_CIRCM:
-    case OP_DOLL:
-    case OP_DOLLM:
-    case OP_NOT:
-    case OP_NOTI:
-    case OP_REVERSE:
-    cc = compile_char1_matchingpath(common, *cc, cc + 1, parent->top != NULL ? &parent->top->nextbacktracks : &parent->topbacktracks);
-    break;
-
-    case OP_SET_SOM:
-    PUSH_BACKTRACK_NOVALUE(sizeof(backtrack_common), cc);
-    OP1(SLJIT_MOV, TMP2, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), OVECTOR(0));
-    allocate_stack(common, 1);
-    OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_LOCALS_REG), OVECTOR(0), STR_PTR, 0);
-    OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(0), TMP2, 0);
-    cc++;
-    break;
-
-    case OP_CHAR:
-    case OP_CHARI:
-    if (common->mode == JIT_COMPILE)
-      cc = compile_charn_matchingpath(common, cc, ccend, parent->top != NULL ? &parent->top->nextbacktracks : &parent->topbacktracks);
-    else
-      cc = compile_char1_matchingpath(common, *cc, cc + 1, parent->top != NULL ? &parent->top->nextbacktracks : &parent->topbacktracks);
-    break;
-
-    case OP_STAR:
-    case OP_MINSTAR:
-    case OP_PLUS:
-    case OP_MINPLUS:
-    case OP_QUERY:
-    case OP_MINQUERY:
-    case OP_UPTO:
-    case OP_MINUPTO:
-    case OP_EXACT:
-    case OP_POSSTAR:
-    case OP_POSPLUS:
-    case OP_POSQUERY:
-    case OP_POSUPTO:
-    case OP_STARI:
-    case OP_MINSTARI:
-    case OP_PLUSI:
-    case OP_MINPLUSI:
-    case OP_QUERYI:
-    case OP_MINQUERYI:
-    case OP_UPTOI:
-    case OP_MINUPTOI:
-    case OP_EXACTI:
-    case OP_POSSTARI:
-    case OP_POSPLUSI:
-    case OP_POSQUERYI:
-    case OP_POSUPTOI:
-    case OP_NOTSTAR:
-    case OP_NOTMINSTAR:
-    case OP_NOTPLUS:
-    case OP_NOTMINPLUS:
-    case OP_NOTQUERY:
-    case OP_NOTMINQUERY:
-    case OP_NOTUPTO:
-    case OP_NOTMINUPTO:
-    case OP_NOTEXACT:
-    case OP_NOTPOSSTAR:
-    case OP_NOTPOSPLUS:
-    case OP_NOTPOSQUERY:
-    case OP_NOTPOSUPTO:
-    case OP_NOTSTARI:
-    case OP_NOTMINSTARI:
-    case OP_NOTPLUSI:
-    case OP_NOTMINPLUSI:
-    case OP_NOTQUERYI:
-    case OP_NOTMINQUERYI:
-    case OP_NOTUPTOI:
-    case OP_NOTMINUPTOI:
-    case OP_NOTEXACTI:
-    case OP_NOTPOSSTARI:
-    case OP_NOTPOSPLUSI:
-    case OP_NOTPOSQUERYI:
-    case OP_NOTPOSUPTOI:
-    case OP_TYPESTAR:
-    case OP_TYPEMINSTAR:
-    case OP_TYPEPLUS:
-    case OP_TYPEMINPLUS:
-    case OP_TYPEQUERY:
-    case OP_TYPEMINQUERY:
-    case OP_TYPEUPTO:
-    case OP_TYPEMINUPTO:
-    case OP_TYPEEXACT:
-    case OP_TYPEPOSSTAR:
-    case OP_TYPEPOSPLUS:
-    case OP_TYPEPOSQUERY:
-    case OP_TYPEPOSUPTO:
-    cc = compile_iterator_matchingpath(common, cc, parent);
-    break;
-
-    case OP_CLASS:
-    case OP_NCLASS:
-    if (cc[1 + (32 / sizeof(pcre_uchar))] >= OP_CRSTAR && cc[1 + (32 / sizeof(pcre_uchar))] <= OP_CRPOSRANGE)
-      cc = compile_iterator_matchingpath(common, cc, parent);
-    else
-      cc = compile_char1_matchingpath(common, *cc, cc + 1, parent->top != NULL ? &parent->top->nextbacktracks : &parent->topbacktracks);
-    break;
-
-#if defined SUPPORT_UTF || defined COMPILE_PCRE16 || defined COMPILE_PCRE32
-    case OP_XCLASS:
-    if (*(cc + GET(cc, 1)) >= OP_CRSTAR && *(cc + GET(cc, 1)) <= OP_CRPOSRANGE)
-      cc = compile_iterator_matchingpath(common, cc, parent);
-    else
-      cc = compile_char1_matchingpath(common, *cc, cc + 1, parent->top != NULL ? &parent->top->nextbacktracks : &parent->topbacktracks);
-    break;
-#endif
-
-    case OP_REF:
-    case OP_REFI:
-    if (cc[1 + IMM2_SIZE] >= OP_CRSTAR && cc[1 + IMM2_SIZE] <= OP_CRPOSRANGE)
-      cc = compile_ref_iterator_matchingpath(common, cc, parent);
-    else
-      {
-      compile_ref_matchingpath(common, cc, parent->top != NULL ? &parent->top->nextbacktracks : &parent->topbacktracks, TRUE, FALSE);
-      cc += 1 + IMM2_SIZE;
-      }
-    break;
-
-    case OP_DNREF:
-    case OP_DNREFI:
-    if (cc[1 + 2 * IMM2_SIZE] >= OP_CRSTAR && cc[1 + 2 * IMM2_SIZE] <= OP_CRPOSRANGE)
-      cc = compile_ref_iterator_matchingpath(common, cc, parent);
-    else
-      {
-      compile_dnref_search(common, cc, parent->top != NULL ? &parent->top->nextbacktracks : &parent->topbacktracks);
-      compile_ref_matchingpath(common, cc, parent->top != NULL ? &parent->top->nextbacktracks : &parent->topbacktracks, TRUE, FALSE);
-      cc += 1 + 2 * IMM2_SIZE;
-      }
-    break;
-
-    case OP_RECURSE:
-    cc = compile_recurse_matchingpath(common, cc, parent);
-    break;
-
-    case OP_CALLOUT:
-    cc = compile_callout_matchingpath(common, cc, parent);
-    break;
-
-    case OP_ASSERT:
-    case OP_ASSERT_NOT:
-    case OP_ASSERTBACK:
-    case OP_ASSERTBACK_NOT:
-    PUSH_BACKTRACK_NOVALUE(sizeof(assert_backtrack), cc);
-    cc = compile_assert_matchingpath(common, cc, BACKTRACK_AS(assert_backtrack), FALSE);
-    break;
-
-    case OP_BRAMINZERO:
-    PUSH_BACKTRACK_NOVALUE(sizeof(braminzero_backtrack), cc);
-    cc = bracketend(cc + 1);
-    if (*(cc - 1 - LINK_SIZE) != OP_KETRMIN)
-      {
-      allocate_stack(common, 1);
-      OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(0), STR_PTR, 0);
-      }
-    else
-      {
-      allocate_stack(common, 2);
-      OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(0), SLJIT_IMM, 0);
-      OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(1), STR_PTR, 0);
-      }
-    BACKTRACK_AS(braminzero_backtrack)->matchingpath = LABEL();
-    if (cc[1] > OP_ASSERTBACK_NOT)
-      count_match(common);
-    break;
-
-    case OP_ONCE:
-    case OP_ONCE_NC:
-    case OP_BRA:
-    case OP_CBRA:
-    case OP_COND:
-    case OP_SBRA:
-    case OP_SCBRA:
-    case OP_SCOND:
-    cc = compile_bracket_matchingpath(common, cc, parent);
-    break;
-
-    case OP_BRAZERO:
-    if (cc[1] > OP_ASSERTBACK_NOT)
-      cc = compile_bracket_matchingpath(common, cc, parent);
-    else
-      {
-      PUSH_BACKTRACK_NOVALUE(sizeof(assert_backtrack), cc);
-      cc = compile_assert_matchingpath(common, cc, BACKTRACK_AS(assert_backtrack), FALSE);
-      }
-    break;
-
-    case OP_BRAPOS:
-    case OP_CBRAPOS:
-    case OP_SBRAPOS:
-    case OP_SCBRAPOS:
-    case OP_BRAPOSZERO:
-    cc = compile_bracketpos_matchingpath(common, cc, parent);
-    break;
-
-    case OP_MARK:
-    PUSH_BACKTRACK_NOVALUE(sizeof(backtrack_common), cc);
-    SLJIT_ASSERT(common->mark_ptr != 0);
-    OP1(SLJIT_MOV, TMP2, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), common->mark_ptr);
-    allocate_stack(common, common->has_skip_arg ? 5 : 1);
-    OP1(SLJIT_MOV, TMP1, 0, ARGUMENTS, 0);
-    OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(common->has_skip_arg ? 4 : 0), TMP2, 0);
-    OP1(SLJIT_MOV, TMP2, 0, SLJIT_IMM, (sljit_sw)(cc + 2));
-    OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_LOCALS_REG), common->mark_ptr, TMP2, 0);
-    OP1(SLJIT_MOV, SLJIT_MEM1(TMP1), SLJIT_OFFSETOF(jit_arguments, mark_ptr), TMP2, 0);
-    if (common->has_skip_arg)
-      {
-      OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), common->control_head_ptr);
-      OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_LOCALS_REG), common->control_head_ptr, STACK_TOP, 0);
-      OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(1), SLJIT_IMM, type_mark);
-      OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(2), SLJIT_IMM, (sljit_sw)(cc + 2));
-      OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(3), STR_PTR, 0);
-      OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(0), TMP1, 0);
-      }
-    cc += 1 + 2 + cc[1];
-    break;
-
-    case OP_PRUNE:
-    case OP_PRUNE_ARG:
-    case OP_SKIP:
-    case OP_SKIP_ARG:
-    case OP_THEN:
-    case OP_THEN_ARG:
-    case OP_COMMIT:
-    cc = compile_control_verb_matchingpath(common, cc, parent);
-    break;
-
-    case OP_FAIL:
-    case OP_ACCEPT:
-    case OP_ASSERT_ACCEPT:
-    cc = compile_fail_accept_matchingpath(common, cc, parent);
-    break;
-
-    case OP_CLOSE:
-    cc = compile_close_matchingpath(common, cc);
-    break;
-
-    case OP_SKIPZERO:
-    cc = bracketend(cc + 1);
-    break;
-
-    default:
-    SLJIT_ASSERT_STOP();
-    return;
-    }
-  if (cc == NULL)
-    return;
-  }
-
-if (has_then_trap)
-  {
-  /* Head item on backtrack. */
-  PUSH_BACKTRACK_NOVALUE(sizeof(then_trap_backtrack), cc);
-  BACKTRACK_AS(then_trap_backtrack)->common.cc = then_trap_opcode;
-  BACKTRACK_AS(then_trap_backtrack)->then_trap = common->then_trap;
-  common->then_trap = save_then_trap;
-  }
-SLJIT_ASSERT(cc == ccend);
-}
-
-#undef PUSH_BACKTRACK
-#undef PUSH_BACKTRACK_NOVALUE
-#undef BACKTRACK_AS
-
-#define COMPILE_BACKTRACKINGPATH(current) \
-  do \
-    { \
-    compile_backtrackingpath(common, (current)); \
-    if (SLJIT_UNLIKELY(sljit_get_compiler_error(compiler))) \
-      return; \
-    } \
-  while (0)
-
-#define CURRENT_AS(type) ((type *)current)
-
-static void compile_iterator_backtrackingpath(compiler_common *common, struct backtrack_common *current)
-{
-DEFINE_COMPILER;
-pcre_uchar *cc = current->cc;
-pcre_uchar opcode;
-pcre_uchar type;
-int max = -1, min = -1;
-struct sljit_label *label = NULL;
-struct sljit_jump *jump = NULL;
-jump_list *jumplist = NULL;
-int private_data_ptr = PRIVATE_DATA(cc);
-int base = (private_data_ptr == 0) ? SLJIT_MEM1(STACK_TOP) : SLJIT_MEM1(SLJIT_LOCALS_REG);
-int offset0 = (private_data_ptr == 0) ? STACK(0) : private_data_ptr;
-int offset1 = (private_data_ptr == 0) ? STACK(1) : private_data_ptr + (int)sizeof(sljit_sw);
-
-cc = get_iterator_parameters(common, cc, &opcode, &type, &max, &min, NULL);
-
-switch(opcode)
-  {
-  case OP_STAR:
-  case OP_PLUS:
-  case OP_UPTO:
-  case OP_CRRANGE:
-  if (type == OP_ANYNL || type == OP_EXTUNI)
-    {
-    SLJIT_ASSERT(private_data_ptr == 0);
-    set_jumps(current->topbacktracks, LABEL());
-    OP1(SLJIT_MOV, STR_PTR, 0, SLJIT_MEM1(STACK_TOP), STACK(0));
-    free_stack(common, 1);
-    CMPTO(SLJIT_C_NOT_EQUAL, STR_PTR, 0, SLJIT_IMM, 0, CURRENT_AS(iterator_backtrack)->matchingpath);
-    }
-  else
-    {
-    if (opcode == OP_UPTO)
-      min = 0;
-    if (opcode <= OP_PLUS)
-      {
-      OP1(SLJIT_MOV, STR_PTR, 0, base, offset0);
-      jump = CMP(SLJIT_C_LESS_EQUAL, STR_PTR, 0, base, offset1);
-      }
-    else
-      {
-      OP1(SLJIT_MOV, TMP1, 0, base, offset1);
-      OP1(SLJIT_MOV, STR_PTR, 0, base, offset0);
-      jump = CMP(SLJIT_C_LESS_EQUAL, TMP1, 0, SLJIT_IMM, min + 1);
-      OP2(SLJIT_SUB, base, offset1, TMP1, 0, SLJIT_IMM, 1);
-      }
-    skip_char_back(common);
-    OP1(SLJIT_MOV, base, offset0, STR_PTR, 0);
-    JUMPTO(SLJIT_JUMP, CURRENT_AS(iterator_backtrack)->matchingpath);
-    if (opcode == OP_CRRANGE)
-      set_jumps(current->topbacktracks, LABEL());
-    JUMPHERE(jump);
-    if (private_data_ptr == 0)
-      free_stack(common, 2);
-    if (opcode == OP_PLUS)
-      set_jumps(current->topbacktracks, LABEL());
-    }
-  break;
-
-  case OP_MINSTAR:
-  case OP_MINPLUS:
-  OP1(SLJIT_MOV, STR_PTR, 0, base, offset0);
-  compile_char1_matchingpath(common, type, cc, &jumplist);
-  OP1(SLJIT_MOV, base, offset0, STR_PTR, 0);
-  JUMPTO(SLJIT_JUMP, CURRENT_AS(iterator_backtrack)->matchingpath);
-  set_jumps(jumplist, LABEL());
-  if (private_data_ptr == 0)
-    free_stack(common, 1);
-  if (opcode == OP_MINPLUS)
-    set_jumps(current->topbacktracks, LABEL());
-  break;
-
-  case OP_MINUPTO:
-  case OP_CRMINRANGE:
-  if (opcode == OP_CRMINRANGE)
-    {
-    label = LABEL();
-    set_jumps(current->topbacktracks, label);
-    }
-  OP1(SLJIT_MOV, STR_PTR, 0, base, offset0);
-  compile_char1_matchingpath(common, type, cc, &jumplist);
-
-  OP1(SLJIT_MOV, TMP1, 0, base, offset1);
-  OP1(SLJIT_MOV, base, offset0, STR_PTR, 0);
-  OP2(SLJIT_ADD, TMP1, 0, TMP1, 0, SLJIT_IMM, 1);
-  OP1(SLJIT_MOV, base, offset1, TMP1, 0);
-
-  if (opcode == OP_CRMINRANGE)
-    CMPTO(SLJIT_C_LESS, TMP1, 0, SLJIT_IMM, min + 1, label);
-
-  if (opcode == OP_CRMINRANGE && max == 0)
-    JUMPTO(SLJIT_JUMP, CURRENT_AS(iterator_backtrack)->matchingpath);
-  else
-    CMPTO(SLJIT_C_LESS, TMP1, 0, SLJIT_IMM, max + 2, CURRENT_AS(iterator_backtrack)->matchingpath);
-
-  set_jumps(jumplist, LABEL());
-  if (private_data_ptr == 0)
-    free_stack(common, 2);
-  break;
-
-  case OP_QUERY:
-  OP1(SLJIT_MOV, STR_PTR, 0, base, offset0);
-  OP1(SLJIT_MOV, base, offset0, SLJIT_IMM, 0);
-  CMPTO(SLJIT_C_NOT_EQUAL, STR_PTR, 0, SLJIT_IMM, 0, CURRENT_AS(iterator_backtrack)->matchingpath);
-  jump = JUMP(SLJIT_JUMP);
-  set_jumps(current->topbacktracks, LABEL());
-  OP1(SLJIT_MOV, STR_PTR, 0, base, offset0);
-  OP1(SLJIT_MOV, base, offset0, SLJIT_IMM, 0);
-  JUMPTO(SLJIT_JUMP, CURRENT_AS(iterator_backtrack)->matchingpath);
-  JUMPHERE(jump);
-  if (private_data_ptr == 0)
-    free_stack(common, 1);
-  break;
-
-  case OP_MINQUERY:
-  OP1(SLJIT_MOV, STR_PTR, 0, base, offset0);
-  OP1(SLJIT_MOV, base, offset0, SLJIT_IMM, 0);
-  jump = CMP(SLJIT_C_EQUAL, STR_PTR, 0, SLJIT_IMM, 0);
-  compile_char1_matchingpath(common, type, cc, &jumplist);
-  JUMPTO(SLJIT_JUMP, CURRENT_AS(iterator_backtrack)->matchingpath);
-  set_jumps(jumplist, LABEL());
-  JUMPHERE(jump);
-  if (private_data_ptr == 0)
-    free_stack(common, 1);
-  break;
-
-  case OP_EXACT:
-  case OP_POSPLUS:
-  case OP_CRPOSRANGE:
-  set_jumps(current->topbacktracks, LABEL());
-  break;
-
-  case OP_POSSTAR:
-  case OP_POSQUERY:
-  case OP_POSUPTO:
-  break;
-
-  default:
-  SLJIT_ASSERT_STOP();
-  break;
-  }
-}
-
-static SLJIT_INLINE void compile_ref_iterator_backtrackingpath(compiler_common *common, struct backtrack_common *current)
-{
-DEFINE_COMPILER;
-pcre_uchar *cc = current->cc;
-BOOL ref = (*cc == OP_REF || *cc == OP_REFI);
-pcre_uchar type;
-
-type = cc[ref ? 1 + IMM2_SIZE : 1 + 2 * IMM2_SIZE];
-
-if ((type & 0x1) == 0)
-  {
-  /* Maximize case. */
-  set_jumps(current->topbacktracks, LABEL());
-  OP1(SLJIT_MOV, STR_PTR, 0, SLJIT_MEM1(STACK_TOP), STACK(0));
-  free_stack(common, 1);
-  CMPTO(SLJIT_C_NOT_EQUAL, STR_PTR, 0, SLJIT_IMM, 0, CURRENT_AS(iterator_backtrack)->matchingpath);
-  return;
-  }
-
-OP1(SLJIT_MOV, STR_PTR, 0, SLJIT_MEM1(STACK_TOP), STACK(0));
-CMPTO(SLJIT_C_NOT_EQUAL, STR_PTR, 0, SLJIT_IMM, 0, CURRENT_AS(iterator_backtrack)->matchingpath);
-set_jumps(current->topbacktracks, LABEL());
-free_stack(common, ref ? 2 : 3);
-}
-
-static SLJIT_INLINE void compile_recurse_backtrackingpath(compiler_common *common, struct backtrack_common *current)
-{
-DEFINE_COMPILER;
-
-if (CURRENT_AS(recurse_backtrack)->inlined_pattern)
-  compile_backtrackingpath(common, current->top);
-set_jumps(current->topbacktracks, LABEL());
-if (CURRENT_AS(recurse_backtrack)->inlined_pattern)
-  return;
-
-if (common->has_set_som && common->mark_ptr != 0)
-  {
-  OP1(SLJIT_MOV, TMP2, 0, SLJIT_MEM1(STACK_TOP), STACK(0));
-  OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(STACK_TOP), STACK(1));
-  free_stack(common, 2);
-  OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_LOCALS_REG), OVECTOR(0), TMP2, 0);
-  OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_LOCALS_REG), common->mark_ptr, TMP1, 0);
-  }
-else if (common->has_set_som || common->mark_ptr != 0)
-  {
-  OP1(SLJIT_MOV, TMP2, 0, SLJIT_MEM1(STACK_TOP), STACK(0));
-  free_stack(common, 1);
-  OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_LOCALS_REG), common->has_set_som ? (int)(OVECTOR(0)) : common->mark_ptr, TMP2, 0);
-  }
-}
-
-static void compile_assert_backtrackingpath(compiler_common *common, struct backtrack_common *current)
-{
-DEFINE_COMPILER;
-pcre_uchar *cc = current->cc;
-pcre_uchar bra = OP_BRA;
-struct sljit_jump *brajump = NULL;
-
-SLJIT_ASSERT(*cc != OP_BRAMINZERO);
-if (*cc == OP_BRAZERO)
-  {
-  bra = *cc;
-  cc++;
-  }
-
-if (bra == OP_BRAZERO)
-  {
-  SLJIT_ASSERT(current->topbacktracks == NULL);
-  OP1(SLJIT_MOV, STR_PTR, 0, SLJIT_MEM1(STACK_TOP), STACK(0));
-  }
-
-if (CURRENT_AS(assert_backtrack)->framesize < 0)
-  {
-  set_jumps(current->topbacktracks, LABEL());
-
-  if (bra == OP_BRAZERO)
-    {
-    OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(0), SLJIT_IMM, 0);
-    CMPTO(SLJIT_C_NOT_EQUAL, STR_PTR, 0, SLJIT_IMM, 0, CURRENT_AS(assert_backtrack)->matchingpath);
-    free_stack(common, 1);
-    }
-  return;
-  }
-
-if (bra == OP_BRAZERO)
-  {
-  if (*cc == OP_ASSERT_NOT || *cc == OP_ASSERTBACK_NOT)
-    {
-    OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(0), SLJIT_IMM, 0);
-    CMPTO(SLJIT_C_NOT_EQUAL, STR_PTR, 0, SLJIT_IMM, 0, CURRENT_AS(assert_backtrack)->matchingpath);
-    free_stack(common, 1);
-    return;
-    }
-  free_stack(common, 1);
-  brajump = CMP(SLJIT_C_EQUAL, STR_PTR, 0, SLJIT_IMM, 0);
-  }
-
-if (*cc == OP_ASSERT || *cc == OP_ASSERTBACK)
-  {
-  OP1(SLJIT_MOV, STACK_TOP, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), CURRENT_AS(assert_backtrack)->private_data_ptr);
-  add_jump(compiler, &common->revertframes, JUMP(SLJIT_FAST_CALL));
-  OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_LOCALS_REG), CURRENT_AS(assert_backtrack)->private_data_ptr, SLJIT_MEM1(STACK_TOP), CURRENT_AS(assert_backtrack)->framesize * sizeof(sljit_sw));
-
-  set_jumps(current->topbacktracks, LABEL());
-  }
-else
-  set_jumps(current->topbacktracks, LABEL());
-
-if (bra == OP_BRAZERO)
-  {
-  /* We know there is enough place on the stack. */
-  OP2(SLJIT_ADD, STACK_TOP, 0, STACK_TOP, 0, SLJIT_IMM, sizeof(sljit_sw));
-  OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(0), SLJIT_IMM, 0);
-  JUMPTO(SLJIT_JUMP, CURRENT_AS(assert_backtrack)->matchingpath);
-  JUMPHERE(brajump);
-  }
-}
-
-static void compile_bracket_backtrackingpath(compiler_common *common, struct backtrack_common *current)
-{
-DEFINE_COMPILER;
-int opcode, stacksize, alt_count, alt_max;
-int offset = 0;
-int private_data_ptr = CURRENT_AS(bracket_backtrack)->private_data_ptr;
-int repeat_ptr = 0, repeat_type = 0, repeat_count = 0;
-pcre_uchar *cc = current->cc;
-pcre_uchar *ccbegin;
-pcre_uchar *ccprev;
-pcre_uchar bra = OP_BRA;
-pcre_uchar ket;
-assert_backtrack *assert;
-BOOL has_alternatives;
-BOOL needs_control_head = FALSE;
-struct sljit_jump *brazero = NULL;
-struct sljit_jump *alt1 = NULL;
-struct sljit_jump *alt2 = NULL;
-struct sljit_jump *once = NULL;
-struct sljit_jump *cond = NULL;
-struct sljit_label *rmin_label = NULL;
-struct sljit_label *exact_label = NULL;
-
-if (*cc == OP_BRAZERO || *cc == OP_BRAMINZERO)
-  {
-  bra = *cc;
-  cc++;
-  }
-
-opcode = *cc;
-ccbegin = bracketend(cc) - 1 - LINK_SIZE;
-ket = *ccbegin;
-if (ket == OP_KET && PRIVATE_DATA(ccbegin) != 0)
-  {
-  repeat_ptr = PRIVATE_DATA(ccbegin);
-  repeat_type = PRIVATE_DATA(ccbegin + 2);
-  repeat_count = PRIVATE_DATA(ccbegin + 3);
-  SLJIT_ASSERT(repeat_type != 0 && repeat_count != 0);
-  if (repeat_type == OP_UPTO)
-    ket = OP_KETRMAX;
-  if (repeat_type == OP_MINUPTO)
-    ket = OP_KETRMIN;
-  }
-ccbegin = cc;
-cc += GET(cc, 1);
-has_alternatives = *cc == OP_ALT;
-if (SLJIT_UNLIKELY(opcode == OP_COND) || SLJIT_UNLIKELY(opcode == OP_SCOND))
-  has_alternatives = (ccbegin[1 + LINK_SIZE] >= OP_ASSERT && ccbegin[1 + LINK_SIZE] <= OP_ASSERTBACK_NOT) || CURRENT_AS(bracket_backtrack)->u.condfailed != NULL;
-if (opcode == OP_CBRA || opcode == OP_SCBRA)
-  offset = (GET2(ccbegin, 1 + LINK_SIZE)) << 1;
-if (SLJIT_UNLIKELY(opcode == OP_COND) && (*cc == OP_KETRMAX || *cc == OP_KETRMIN))
-  opcode = OP_SCOND;
-if (SLJIT_UNLIKELY(opcode == OP_ONCE_NC))
-  opcode = OP_ONCE;
-
-alt_max = has_alternatives ? no_alternatives(ccbegin) : 0;
-
-/* Decoding the needs_control_head in framesize. */
-if (opcode == OP_ONCE)
-  {
-  needs_control_head = (CURRENT_AS(bracket_backtrack)->u.framesize & 0x1) != 0;
-  CURRENT_AS(bracket_backtrack)->u.framesize >>= 1;
-  }
-
-if (ket != OP_KET && repeat_type != 0)
-  {
-  /* TMP1 is used in OP_KETRMIN below. */
-  OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(STACK_TOP), STACK(0));
-  free_stack(common, 1);
-  if (repeat_type == OP_UPTO)
-    OP2(SLJIT_ADD, SLJIT_MEM1(SLJIT_LOCALS_REG), repeat_ptr, TMP1, 0, SLJIT_IMM, 1);
-  else
-    OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_LOCALS_REG), repeat_ptr, TMP1, 0);
-  }
-
-if (ket == OP_KETRMAX)
-  {
-  if (bra == OP_BRAZERO)
-    {
-    OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(STACK_TOP), STACK(0));
-    free_stack(common, 1);
-    brazero = CMP(SLJIT_C_EQUAL, TMP1, 0, SLJIT_IMM, 0);
-    }
-  }
-else if (ket == OP_KETRMIN)
-  {
-  if (bra != OP_BRAMINZERO)
-    {
-    OP1(SLJIT_MOV, STR_PTR, 0, SLJIT_MEM1(STACK_TOP), STACK(0));
-    if (repeat_type != 0)
-      {
-      /* TMP1 was set a few lines above. */
-      CMPTO(SLJIT_C_NOT_EQUAL, TMP1, 0, SLJIT_IMM, 0, CURRENT_AS(bracket_backtrack)->recursive_matchingpath);
-      /* Drop STR_PTR for non-greedy plus quantifier. */
-      if (opcode != OP_ONCE)
-        free_stack(common, 1);
-      }
-    else if (opcode >= OP_SBRA || opcode == OP_ONCE)
-      {
-      /* Checking zero-length iteration. */
-      if (opcode != OP_ONCE || CURRENT_AS(bracket_backtrack)->u.framesize < 0)
-        CMPTO(SLJIT_C_NOT_EQUAL, STR_PTR, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), private_data_ptr, CURRENT_AS(bracket_backtrack)->recursive_matchingpath);
-      else
-        {
-        OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), private_data_ptr);
-        CMPTO(SLJIT_C_NOT_EQUAL, STR_PTR, 0, SLJIT_MEM1(TMP1), (CURRENT_AS(bracket_backtrack)->u.framesize + 1) * sizeof(sljit_sw), CURRENT_AS(bracket_backtrack)->recursive_matchingpath);
-        }
-      /* Drop STR_PTR for non-greedy plus quantifier. */
-      if (opcode != OP_ONCE)
-        free_stack(common, 1);
-      }
-    else
-      JUMPTO(SLJIT_JUMP, CURRENT_AS(bracket_backtrack)->recursive_matchingpath);
-    }
-  rmin_label = LABEL();
-  if (repeat_type != 0)
-    OP2(SLJIT_ADD, SLJIT_MEM1(SLJIT_LOCALS_REG), repeat_ptr, SLJIT_MEM1(SLJIT_LOCALS_REG), repeat_ptr, SLJIT_IMM, 1);
-  }
-else if (bra == OP_BRAZERO)
-  {
-  OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(STACK_TOP), STACK(0));
-  free_stack(common, 1);
-  brazero = CMP(SLJIT_C_NOT_EQUAL, TMP1, 0, SLJIT_IMM, 0);
-  }
-else if (repeat_type == OP_EXACT)
-  {
-  OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_LOCALS_REG), repeat_ptr, SLJIT_IMM, 1);
-  exact_label = LABEL();
-  }
-
-if (offset != 0)
-  {
-  if (common->capture_last_ptr != 0)
-    {
-    SLJIT_ASSERT(common->optimized_cbracket[offset >> 1] == 0);
-    OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(STACK_TOP), STACK(0));
-    OP1(SLJIT_MOV, TMP2, 0, SLJIT_MEM1(STACK_TOP), STACK(1));
-    OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_LOCALS_REG), common->capture_last_ptr, TMP1, 0);
-    OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(STACK_TOP), STACK(2));
-    free_stack(common, 3);
-    OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_LOCALS_REG), OVECTOR(offset), TMP2, 0);
-    OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_LOCALS_REG), OVECTOR(offset + 1), TMP1, 0);
-    }
-  else if (common->optimized_cbracket[offset >> 1] == 0)
-    {
-    OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(STACK_TOP), STACK(0));
-    OP1(SLJIT_MOV, TMP2, 0, SLJIT_MEM1(STACK_TOP), STACK(1));
-    free_stack(common, 2);
-    OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_LOCALS_REG), OVECTOR(offset), TMP1, 0);
-    OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_LOCALS_REG), OVECTOR(offset + 1), TMP2, 0);
-    }
-  }
-
-if (SLJIT_UNLIKELY(opcode == OP_ONCE))
-  {
-  if (CURRENT_AS(bracket_backtrack)->u.framesize >= 0)
-    {
-    OP1(SLJIT_MOV, STACK_TOP, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), private_data_ptr);
-    add_jump(compiler, &common->revertframes, JUMP(SLJIT_FAST_CALL));
-    }
-  once = JUMP(SLJIT_JUMP);
-  }
-else if (SLJIT_UNLIKELY(opcode == OP_COND) || SLJIT_UNLIKELY(opcode == OP_SCOND))
-  {
-  if (has_alternatives)
-    {
-    /* Always exactly one alternative. */
-    OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(STACK_TOP), STACK(0));
-    free_stack(common, 1);
-
-    alt_max = 2;
-    alt1 = CMP(SLJIT_C_EQUAL, TMP1, 0, SLJIT_IMM, sizeof(sljit_uw));
-    }
-  }
-else if (has_alternatives)
-  {
-  OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(STACK_TOP), STACK(0));
-  free_stack(common, 1);
-
-  if (alt_max > 4)
-    {
-    /* Table jump if alt_max is greater than 4. */
-    sljit_emit_ijump(compiler, SLJIT_JUMP, SLJIT_MEM1(TMP1), (sljit_sw)common->read_only_data_ptr);
-    add_label_addr(common);
-    }
-  else
-    {
-    if (alt_max == 4)
-      alt2 = CMP(SLJIT_C_GREATER_EQUAL, TMP1, 0, SLJIT_IMM, 2 * sizeof(sljit_uw));
-    alt1 = CMP(SLJIT_C_GREATER_EQUAL, TMP1, 0, SLJIT_IMM, sizeof(sljit_uw));
-    }
-  }
-
-COMPILE_BACKTRACKINGPATH(current->top);
-if (current->topbacktracks)
-  set_jumps(current->topbacktracks, LABEL());
-
-if (SLJIT_UNLIKELY(opcode == OP_COND) || SLJIT_UNLIKELY(opcode == OP_SCOND))
-  {
-  /* Conditional block always has at most one alternative. */
-  if (ccbegin[1 + LINK_SIZE] >= OP_ASSERT && ccbegin[1 + LINK_SIZE] <= OP_ASSERTBACK_NOT)
-    {
-    SLJIT_ASSERT(has_alternatives);
-    assert = CURRENT_AS(bracket_backtrack)->u.assert;
-    if (assert->framesize >= 0 && (ccbegin[1 + LINK_SIZE] == OP_ASSERT || ccbegin[1 + LINK_SIZE] == OP_ASSERTBACK))
-      {
-      OP1(SLJIT_MOV, STACK_TOP, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), assert->private_data_ptr);
-      add_jump(compiler, &common->revertframes, JUMP(SLJIT_FAST_CALL));
-      OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_LOCALS_REG), assert->private_data_ptr, SLJIT_MEM1(STACK_TOP), assert->framesize * sizeof(sljit_sw));
-      }
-    cond = JUMP(SLJIT_JUMP);
-    set_jumps(CURRENT_AS(bracket_backtrack)->u.assert->condfailed, LABEL());
-    }
-  else if (CURRENT_AS(bracket_backtrack)->u.condfailed != NULL)
-    {
-    SLJIT_ASSERT(has_alternatives);
-    cond = JUMP(SLJIT_JUMP);
-    set_jumps(CURRENT_AS(bracket_backtrack)->u.condfailed, LABEL());
-    }
-  else
-    SLJIT_ASSERT(!has_alternatives);
-  }
-
-if (has_alternatives)
-  {
-  alt_count = sizeof(sljit_uw);
-  do
-    {
-    current->top = NULL;
-    current->topbacktracks = NULL;
-    current->nextbacktracks = NULL;
-    /* Conditional blocks always have an additional alternative, even if it is empty. */
-    if (*cc == OP_ALT)
-      {
-      ccprev = cc + 1 + LINK_SIZE;
-      cc += GET(cc, 1);
-      if (opcode != OP_COND && opcode != OP_SCOND)
-        {
-        if (opcode != OP_ONCE)
-          {
-          if (private_data_ptr != 0)
-            OP1(SLJIT_MOV, STR_PTR, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), private_data_ptr);
-          else
-            OP1(SLJIT_MOV, STR_PTR, 0, SLJIT_MEM1(STACK_TOP), STACK(0));
-          }
-        else
-          OP1(SLJIT_MOV, STR_PTR, 0, SLJIT_MEM1(STACK_TOP), STACK(needs_control_head ? 1 : 0));
-        }
-      compile_matchingpath(common, ccprev, cc, current);
-      if (SLJIT_UNLIKELY(sljit_get_compiler_error(compiler)))
-        return;
-      }
-
-    /* Instructions after the current alternative is successfully matched. */
-    /* There is a similar code in compile_bracket_matchingpath. */
-    if (opcode == OP_ONCE)
-      match_once_common(common, ket, CURRENT_AS(bracket_backtrack)->u.framesize, private_data_ptr, has_alternatives, needs_control_head);
-
-    stacksize = 0;
-    if (repeat_type == OP_MINUPTO)
-      {
-      /* We need to preserve the counter. TMP2 will be used below. */
-      OP1(SLJIT_MOV, TMP2, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), repeat_ptr);
-      stacksize++;
-      }
-    if (ket != OP_KET || bra != OP_BRA)
-      stacksize++;
-    if (offset != 0)
-      {
-      if (common->capture_last_ptr != 0)
-        stacksize++;
-      if (common->optimized_cbracket[offset >> 1] == 0)
-        stacksize += 2;
-      }
-    if (opcode != OP_ONCE)
-      stacksize++;
-
-    if (stacksize > 0)
-      allocate_stack(common, stacksize);
-
-    stacksize = 0;
-    if (repeat_type == OP_MINUPTO)
-      {
-      /* TMP2 was set above. */
-      OP2(SLJIT_SUB, SLJIT_MEM1(STACK_TOP), STACK(stacksize), TMP2, 0, SLJIT_IMM, 1);
-      stacksize++;
-      }
-
-    if (ket != OP_KET || bra != OP_BRA)
-      {
-      if (ket != OP_KET)
-        OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(stacksize), STR_PTR, 0);
-      else
-        OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(stacksize), SLJIT_IMM, 0);
-      stacksize++;
-      }
-
-    if (offset != 0)
-      stacksize = match_capture_common(common, stacksize, offset, private_data_ptr);
-
-    if (opcode != OP_ONCE)
-      OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(stacksize), SLJIT_IMM, alt_count);
-
-    if (offset != 0 && ket == OP_KETRMAX && common->optimized_cbracket[offset >> 1] != 0)
-      {
-      /* If ket is not OP_KETRMAX, this code path is executed after the jump to alternative_matchingpath. */
-      SLJIT_ASSERT(private_data_ptr == OVECTOR(offset + 0));
-      OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_LOCALS_REG), OVECTOR(offset + 1), STR_PTR, 0);
-      }
-
-    JUMPTO(SLJIT_JUMP, CURRENT_AS(bracket_backtrack)->alternative_matchingpath);
-
-    if (opcode != OP_ONCE)
-      {
-      if (alt_max > 4)
-        add_label_addr(common);
-      else
-        {
-        if (alt_count != 2 * sizeof(sljit_uw))
-          {
-          JUMPHERE(alt1);
-          if (alt_max == 3 && alt_count == sizeof(sljit_uw))
-            alt2 = CMP(SLJIT_C_GREATER_EQUAL, TMP1, 0, SLJIT_IMM, 2 * sizeof(sljit_uw));
-          }
-        else
-          {
-          JUMPHERE(alt2);
-          if (alt_max == 4)
-            alt1 = CMP(SLJIT_C_GREATER_EQUAL, TMP1, 0, SLJIT_IMM, 3 * sizeof(sljit_uw));
-          }
-        }
-      alt_count += sizeof(sljit_uw);
-      }
-
-    COMPILE_BACKTRACKINGPATH(current->top);
-    if (current->topbacktracks)
-      set_jumps(current->topbacktracks, LABEL());
-    SLJIT_ASSERT(!current->nextbacktracks);
-    }
-  while (*cc == OP_ALT);
-
-  if (cond != NULL)
-    {
-    SLJIT_ASSERT(opcode == OP_COND || opcode == OP_SCOND);
-    assert = CURRENT_AS(bracket_backtrack)->u.assert;
-    if ((ccbegin[1 + LINK_SIZE] == OP_ASSERT_NOT || ccbegin[1 + LINK_SIZE] == OP_ASSERTBACK_NOT) && assert->framesize >= 0)
-      {
-      OP1(SLJIT_MOV, STACK_TOP, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), assert->private_data_ptr);
-      add_jump(compiler, &common->revertframes, JUMP(SLJIT_FAST_CALL));
-      OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_LOCALS_REG), assert->private_data_ptr, SLJIT_MEM1(STACK_TOP), assert->framesize * sizeof(sljit_sw));
-      }
-    JUMPHERE(cond);
-    }
-
-  /* Free the STR_PTR. */
-  if (private_data_ptr == 0)
-    free_stack(common, 1);
-  }
-
-if (offset != 0)
-  {
-  /* Using both tmp register is better for instruction scheduling. */
-  if (common->optimized_cbracket[offset >> 1] != 0)
-    {
-    OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(STACK_TOP), STACK(0));
-    OP1(SLJIT_MOV, TMP2, 0, SLJIT_MEM1(STACK_TOP), STACK(1));
-    free_stack(common, 2);
-    OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_LOCALS_REG), OVECTOR(offset), TMP1, 0);
-    OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_LOCALS_REG), OVECTOR(offset + 1), TMP2, 0);
-    }
-  else
-    {
-    OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(STACK_TOP), STACK(0));
-    free_stack(common, 1);
-    OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_LOCALS_REG), private_data_ptr, TMP1, 0);
-    }
-  }
-else if (opcode == OP_SBRA || opcode == OP_SCOND)
-  {
-  OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_LOCALS_REG), private_data_ptr, SLJIT_MEM1(STACK_TOP), STACK(0));
-  free_stack(common, 1);
-  }
-else if (opcode == OP_ONCE)
-  {
-  cc = ccbegin + GET(ccbegin, 1);
-  stacksize = needs_control_head ? 1 : 0;
-
-  if (CURRENT_AS(bracket_backtrack)->u.framesize >= 0)
-    {
-    /* Reset head and drop saved frame. */
-    stacksize += CURRENT_AS(bracket_backtrack)->u.framesize + ((ket != OP_KET || *cc == OP_ALT) ? 2 : 1);
-    }
-  else if (ket == OP_KETRMAX || (*cc == OP_ALT && ket != OP_KETRMIN))
-    {
-    /* The STR_PTR must be released. */
-    stacksize++;
-    }
-  free_stack(common, stacksize);
-
-  JUMPHERE(once);
-  /* Restore previous private_data_ptr */
-  if (CURRENT_AS(bracket_backtrack)->u.framesize >= 0)
-    OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_LOCALS_REG), private_data_ptr, SLJIT_MEM1(STACK_TOP), CURRENT_AS(bracket_backtrack)->u.framesize * sizeof(sljit_sw));
-  else if (ket == OP_KETRMIN)
-    {
-    OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(STACK_TOP), STACK(1));
-    /* See the comment below. */
-    free_stack(common, 2);
-    OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_LOCALS_REG), private_data_ptr, TMP1, 0);
-    }
-  }
-
-if (repeat_type == OP_EXACT)
-  {
-  OP2(SLJIT_ADD, TMP1, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), repeat_ptr, SLJIT_IMM, 1);
-  OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_LOCALS_REG), repeat_ptr, TMP1, 0);
-  CMPTO(SLJIT_C_LESS_EQUAL, TMP1, 0, SLJIT_IMM, repeat_count, exact_label);
-  }
-else if (ket == OP_KETRMAX)
-  {
-  OP1(SLJIT_MOV, STR_PTR, 0, SLJIT_MEM1(STACK_TOP), STACK(0));
-  if (bra != OP_BRAZERO)
-    free_stack(common, 1);
-
-  CMPTO(SLJIT_C_NOT_EQUAL, STR_PTR, 0, SLJIT_IMM, 0, CURRENT_AS(bracket_backtrack)->recursive_matchingpath);
-  if (bra == OP_BRAZERO)
-    {
-    OP1(SLJIT_MOV, STR_PTR, 0, SLJIT_MEM1(STACK_TOP), STACK(1));
-    JUMPTO(SLJIT_JUMP, CURRENT_AS(bracket_backtrack)->zero_matchingpath);
-    JUMPHERE(brazero);
-    free_stack(common, 1);
-    }
-  }
-else if (ket == OP_KETRMIN)
-  {
-  OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(STACK_TOP), STACK(0));
-
-  /* OP_ONCE removes everything in case of a backtrack, so we don't
-  need to explicitly release the STR_PTR. The extra release would
-  affect badly the free_stack(2) above. */
-  if (opcode != OP_ONCE)
-    free_stack(common, 1);
-  CMPTO(SLJIT_C_NOT_EQUAL, TMP1, 0, SLJIT_IMM, 0, rmin_label);
-  if (opcode == OP_ONCE)
-    free_stack(common, bra == OP_BRAMINZERO ? 2 : 1);
-  else if (bra == OP_BRAMINZERO)
-    free_stack(common, 1);
-  }
-else if (bra == OP_BRAZERO)
-  {
-  OP1(SLJIT_MOV, STR_PTR, 0, SLJIT_MEM1(STACK_TOP), STACK(0));
-  JUMPTO(SLJIT_JUMP, CURRENT_AS(bracket_backtrack)->zero_matchingpath);
-  JUMPHERE(brazero);
-  }
-}
-
-static SLJIT_INLINE void compile_bracketpos_backtrackingpath(compiler_common *common, struct backtrack_common *current)
-{
-DEFINE_COMPILER;
-int offset;
-struct sljit_jump *jump;
-
-if (CURRENT_AS(bracketpos_backtrack)->framesize < 0)
-  {
-  if (*current->cc == OP_CBRAPOS || *current->cc == OP_SCBRAPOS)
-    {
-    offset = (GET2(current->cc, 1 + LINK_SIZE)) << 1;
-    OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(STACK_TOP), STACK(0));
-    OP1(SLJIT_MOV, TMP2, 0, SLJIT_MEM1(STACK_TOP), STACK(1));
-    OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_LOCALS_REG), OVECTOR(offset), TMP1, 0);
-    if (common->capture_last_ptr != 0)
-      OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(STACK_TOP), STACK(2));
-    OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_LOCALS_REG), OVECTOR(offset + 1), TMP2, 0);
-    if (common->capture_last_ptr != 0)
-      OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_LOCALS_REG), common->capture_last_ptr, TMP1, 0);
-    }
-  set_jumps(current->topbacktracks, LABEL());
-  free_stack(common, CURRENT_AS(bracketpos_backtrack)->stacksize);
-  return;
-  }
-
-OP1(SLJIT_MOV, STACK_TOP, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), CURRENT_AS(bracketpos_backtrack)->private_data_ptr);
-add_jump(compiler, &common->revertframes, JUMP(SLJIT_FAST_CALL));
-
-if (current->topbacktracks)
-  {
-  jump = JUMP(SLJIT_JUMP);
-  set_jumps(current->topbacktracks, LABEL());
-  /* Drop the stack frame. */
-  free_stack(common, CURRENT_AS(bracketpos_backtrack)->stacksize);
-  JUMPHERE(jump);
-  }
-OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_LOCALS_REG), CURRENT_AS(bracketpos_backtrack)->private_data_ptr, SLJIT_MEM1(STACK_TOP), CURRENT_AS(bracketpos_backtrack)->framesize * sizeof(sljit_sw));
-}
-
-static SLJIT_INLINE void compile_braminzero_backtrackingpath(compiler_common *common, struct backtrack_common *current)
-{
-assert_backtrack backtrack;
-
-current->top = NULL;
-current->topbacktracks = NULL;
-current->nextbacktracks = NULL;
-if (current->cc[1] > OP_ASSERTBACK_NOT)
-  {
-  /* Manual call of compile_bracket_matchingpath and compile_bracket_backtrackingpath. */
-  compile_bracket_matchingpath(common, current->cc, current);
-  compile_bracket_backtrackingpath(common, current->top);
-  }
-else
-  {
-  memset(&backtrack, 0, sizeof(backtrack));
-  backtrack.common.cc = current->cc;
-  backtrack.matchingpath = CURRENT_AS(braminzero_backtrack)->matchingpath;
-  /* Manual call of compile_assert_matchingpath. */
-  compile_assert_matchingpath(common, current->cc, &backtrack, FALSE);
-  }
-SLJIT_ASSERT(!current->nextbacktracks && !current->topbacktracks);
-}
-
-static SLJIT_INLINE void compile_control_verb_backtrackingpath(compiler_common *common, struct backtrack_common *current)
-{
-DEFINE_COMPILER;
-pcre_uchar opcode = *current->cc;
-struct sljit_label *loop;
-struct sljit_jump *jump;
-
-if (opcode == OP_THEN || opcode == OP_THEN_ARG)
-  {
-  if (common->then_trap != NULL)
-    {
-    SLJIT_ASSERT(common->control_head_ptr != 0);
-
-    OP1(SLJIT_MOV, STACK_TOP, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), common->control_head_ptr);
-    OP1(SLJIT_MOV, TMP1, 0, SLJIT_IMM, type_then_trap);
-    OP1(SLJIT_MOV, TMP2, 0, SLJIT_IMM, common->then_trap->start);
-    jump = JUMP(SLJIT_JUMP);
-
-    loop = LABEL();
-    OP1(SLJIT_MOV, STACK_TOP, 0, SLJIT_MEM1(STACK_TOP), -(int)sizeof(sljit_sw));
-    JUMPHERE(jump);
-    CMPTO(SLJIT_C_NOT_EQUAL, SLJIT_MEM1(STACK_TOP), -(int)(2 * sizeof(sljit_sw)), TMP1, 0, loop);
-    CMPTO(SLJIT_C_NOT_EQUAL, SLJIT_MEM1(STACK_TOP), -(int)(3 * sizeof(sljit_sw)), TMP2, 0, loop);
-    add_jump(compiler, &common->then_trap->quit, JUMP(SLJIT_JUMP));
-    return;
-    }
-  else if (common->positive_assert)
-    {
-    add_jump(compiler, &common->positive_assert_quit, JUMP(SLJIT_JUMP));
-    return;
-    }
-  }
-
-if (common->local_exit)
-  {
-  if (common->quit_label == NULL)
-    add_jump(compiler, &common->quit, JUMP(SLJIT_JUMP));
-  else
-    JUMPTO(SLJIT_JUMP, common->quit_label);
-  return;
-  }
-
-if (opcode == OP_SKIP_ARG)
-  {
-  SLJIT_ASSERT(common->control_head_ptr != 0);
-  OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), common->control_head_ptr);
-  OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_LOCALS_REG), LOCALS0, STACK_TOP, 0);
-  OP1(SLJIT_MOV, STACK_TOP, 0, SLJIT_IMM, (sljit_sw)(current->cc + 2));
-  sljit_emit_ijump(compiler, SLJIT_CALL2, SLJIT_IMM, SLJIT_FUNC_OFFSET(do_search_mark));
-  OP1(SLJIT_MOV, STACK_TOP, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), LOCALS0);
-
-  OP1(SLJIT_MOV, STR_PTR, 0, TMP1, 0);
-  add_jump(compiler, &common->reset_match, CMP(SLJIT_C_NOT_EQUAL, STR_PTR, 0, SLJIT_IMM, -1));
-  return;
-  }
-
-if (opcode == OP_SKIP)
-  OP1(SLJIT_MOV, STR_PTR, 0, SLJIT_MEM1(STACK_TOP), STACK(0));
-else
-  OP1(SLJIT_MOV, STR_PTR, 0, SLJIT_IMM, 0);
-add_jump(compiler, &common->reset_match, JUMP(SLJIT_JUMP));
-}
-
-static SLJIT_INLINE void compile_then_trap_backtrackingpath(compiler_common *common, struct backtrack_common *current)
-{
-DEFINE_COMPILER;
-struct sljit_jump *jump;
-int size;
-
-if (CURRENT_AS(then_trap_backtrack)->then_trap)
-  {
-  common->then_trap = CURRENT_AS(then_trap_backtrack)->then_trap;
-  return;
-  }
-
-size = CURRENT_AS(then_trap_backtrack)->framesize;
-size = 3 + (size < 0 ? 0 : size);
-
-OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(STACK_TOP), STACK(size - 3));
-free_stack(common, size);
-jump = JUMP(SLJIT_JUMP);
-
-set_jumps(CURRENT_AS(then_trap_backtrack)->quit, LABEL());
-/* STACK_TOP is set by THEN. */
-if (CURRENT_AS(then_trap_backtrack)->framesize >= 0)
-  add_jump(compiler, &common->revertframes, JUMP(SLJIT_FAST_CALL));
-OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(STACK_TOP), STACK(0));
-free_stack(common, 3);
-
-JUMPHERE(jump);
-OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_LOCALS_REG), common->control_head_ptr, TMP1, 0);
-}
-
-static void compile_backtrackingpath(compiler_common *common, struct backtrack_common *current)
-{
-DEFINE_COMPILER;
-then_trap_backtrack *save_then_trap = common->then_trap;
-
-while (current)
-  {
-  if (current->nextbacktracks != NULL)
-    set_jumps(current->nextbacktracks, LABEL());
-  switch(*current->cc)
-    {
-    case OP_SET_SOM:
-    OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(STACK_TOP), STACK(0));
-    free_stack(common, 1);
-    OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_LOCALS_REG), OVECTOR(0), TMP1, 0);
-    break;
-
-    case OP_STAR:
-    case OP_MINSTAR:
-    case OP_PLUS:
-    case OP_MINPLUS:
-    case OP_QUERY:
-    case OP_MINQUERY:
-    case OP_UPTO:
-    case OP_MINUPTO:
-    case OP_EXACT:
-    case OP_POSSTAR:
-    case OP_POSPLUS:
-    case OP_POSQUERY:
-    case OP_POSUPTO:
-    case OP_STARI:
-    case OP_MINSTARI:
-    case OP_PLUSI:
-    case OP_MINPLUSI:
-    case OP_QUERYI:
-    case OP_MINQUERYI:
-    case OP_UPTOI:
-    case OP_MINUPTOI:
-    case OP_EXACTI:
-    case OP_POSSTARI:
-    case OP_POSPLUSI:
-    case OP_POSQUERYI:
-    case OP_POSUPTOI:
-    case OP_NOTSTAR:
-    case OP_NOTMINSTAR:
-    case OP_NOTPLUS:
-    case OP_NOTMINPLUS:
-    case OP_NOTQUERY:
-    case OP_NOTMINQUERY:
-    case OP_NOTUPTO:
-    case OP_NOTMINUPTO:
-    case OP_NOTEXACT:
-    case OP_NOTPOSSTAR:
-    case OP_NOTPOSPLUS:
-    case OP_NOTPOSQUERY:
-    case OP_NOTPOSUPTO:
-    case OP_NOTSTARI:
-    case OP_NOTMINSTARI:
-    case OP_NOTPLUSI:
-    case OP_NOTMINPLUSI:
-    case OP_NOTQUERYI:
-    case OP_NOTMINQUERYI:
-    case OP_NOTUPTOI:
-    case OP_NOTMINUPTOI:
-    case OP_NOTEXACTI:
-    case OP_NOTPOSSTARI:
-    case OP_NOTPOSPLUSI:
-    case OP_NOTPOSQUERYI:
-    case OP_NOTPOSUPTOI:
-    case OP_TYPESTAR:
-    case OP_TYPEMINSTAR:
-    case OP_TYPEPLUS:
-    case OP_TYPEMINPLUS:
-    case OP_TYPEQUERY:
-    case OP_TYPEMINQUERY:
-    case OP_TYPEUPTO:
-    case OP_TYPEMINUPTO:
-    case OP_TYPEEXACT:
-    case OP_TYPEPOSSTAR:
-    case OP_TYPEPOSPLUS:
-    case OP_TYPEPOSQUERY:
-    case OP_TYPEPOSUPTO:
-    case OP_CLASS:
-    case OP_NCLASS:
-#if defined SUPPORT_UTF || !defined COMPILE_PCRE8
-    case OP_XCLASS:
-#endif
-    compile_iterator_backtrackingpath(common, current);
-    break;
-
-    case OP_REF:
-    case OP_REFI:
-    case OP_DNREF:
-    case OP_DNREFI:
-    compile_ref_iterator_backtrackingpath(common, current);
-    break;
-
-    case OP_RECURSE:
-    compile_recurse_backtrackingpath(common, current);
-    break;
-
-    case OP_ASSERT:
-    case OP_ASSERT_NOT:
-    case OP_ASSERTBACK:
-    case OP_ASSERTBACK_NOT:
-    compile_assert_backtrackingpath(common, current);
-    break;
-
-    case OP_ONCE:
-    case OP_ONCE_NC:
-    case OP_BRA:
-    case OP_CBRA:
-    case OP_COND:
-    case OP_SBRA:
-    case OP_SCBRA:
-    case OP_SCOND:
-    compile_bracket_backtrackingpath(common, current);
-    break;
-
-    case OP_BRAZERO:
-    if (current->cc[1] > OP_ASSERTBACK_NOT)
-      compile_bracket_backtrackingpath(common, current);
-    else
-      compile_assert_backtrackingpath(common, current);
-    break;
-
-    case OP_BRAPOS:
-    case OP_CBRAPOS:
-    case OP_SBRAPOS:
-    case OP_SCBRAPOS:
-    case OP_BRAPOSZERO:
-    compile_bracketpos_backtrackingpath(common, current);
-    break;
-
-    case OP_BRAMINZERO:
-    compile_braminzero_backtrackingpath(common, current);
-    break;
-
-    case OP_MARK:
-    OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(STACK_TOP), STACK(common->has_skip_arg ? 4 : 0));
-    if (common->has_skip_arg)
-      OP1(SLJIT_MOV, TMP2, 0, SLJIT_MEM1(STACK_TOP), STACK(0));
-    free_stack(common, common->has_skip_arg ? 5 : 1);
-    OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_LOCALS_REG), common->mark_ptr, TMP1, 0);
-    if (common->has_skip_arg)
-      OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_LOCALS_REG), common->control_head_ptr, TMP2, 0);
-    break;
-
-    case OP_THEN:
-    case OP_THEN_ARG:
-    case OP_PRUNE:
-    case OP_PRUNE_ARG:
-    case OP_SKIP:
-    case OP_SKIP_ARG:
-    compile_control_verb_backtrackingpath(common, current);
-    break;
-
-    case OP_COMMIT:
-    if (!common->local_exit)
-      OP1(SLJIT_MOV, SLJIT_RETURN_REG, 0, SLJIT_IMM, PCRE_ERROR_NOMATCH);
-    if (common->quit_label == NULL)
-      add_jump(compiler, &common->quit, JUMP(SLJIT_JUMP));
-    else
-      JUMPTO(SLJIT_JUMP, common->quit_label);
-    break;
-
-    case OP_CALLOUT:
-    case OP_FAIL:
-    case OP_ACCEPT:
-    case OP_ASSERT_ACCEPT:
-    set_jumps(current->topbacktracks, LABEL());
-    break;
-
-    case OP_THEN_TRAP:
-    /* A virtual opcode for then traps. */
-    compile_then_trap_backtrackingpath(common, current);
-    break;
-
-    default:
-    SLJIT_ASSERT_STOP();
-    break;
-    }
-  current = current->prev;
-  }
-common->then_trap = save_then_trap;
-}
-
-static SLJIT_INLINE void compile_recurse(compiler_common *common)
-{
-DEFINE_COMPILER;
-pcre_uchar *cc = common->start + common->currententry->start;
-pcre_uchar *ccbegin = cc + 1 + LINK_SIZE + (*cc == OP_BRA ? 0 : IMM2_SIZE);
-pcre_uchar *ccend = bracketend(cc);
-BOOL needs_control_head;
-int framesize = get_framesize(common, cc, NULL, TRUE, &needs_control_head);
-int private_data_size = get_private_data_copy_length(common, ccbegin, ccend, needs_control_head);
-int alternativesize;
-BOOL needs_frame;
-backtrack_common altbacktrack;
-struct sljit_jump *jump;
-
-/* Recurse captures then. */
-common->then_trap = NULL;
-
-SLJIT_ASSERT(*cc == OP_BRA || *cc == OP_CBRA || *cc == OP_CBRAPOS || *cc == OP_SCBRA || *cc == OP_SCBRAPOS);
-needs_frame = framesize >= 0;
-if (!needs_frame)
-  framesize = 0;
-alternativesize = *(cc + GET(cc, 1)) == OP_ALT ? 1 : 0;
-
-SLJIT_ASSERT(common->currententry->entry == NULL && common->recursive_head_ptr != 0);
-common->currententry->entry = LABEL();
-set_jumps(common->currententry->calls, common->currententry->entry);
-
-sljit_emit_fast_enter(compiler, TMP2, 0);
-allocate_stack(common, private_data_size + framesize + alternativesize);
-OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(private_data_size + framesize + alternativesize - 1), TMP2, 0);
-copy_private_data(common, ccbegin, ccend, TRUE, private_data_size + framesize + alternativesize, framesize + alternativesize, needs_control_head);
-if (needs_control_head)
-  OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_LOCALS_REG), common->control_head_ptr, SLJIT_IMM, 0);
-OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_LOCALS_REG), common->recursive_head_ptr, STACK_TOP, 0);
-if (needs_frame)
-  init_frame(common, cc, NULL, framesize + alternativesize - 1, alternativesize, TRUE);
-
-if (alternativesize > 0)
-  OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(0), STR_PTR, 0);
-
-memset(&altbacktrack, 0, sizeof(backtrack_common));
-common->quit_label = NULL;
-common->accept_label = NULL;
-common->quit = NULL;
-common->accept = NULL;
-altbacktrack.cc = ccbegin;
-cc += GET(cc, 1);
-while (1)
-  {
-  altbacktrack.top = NULL;
-  altbacktrack.topbacktracks = NULL;
-
-  if (altbacktrack.cc != ccbegin)
-    OP1(SLJIT_MOV, STR_PTR, 0, SLJIT_MEM1(STACK_TOP), STACK(0));
-
-  compile_matchingpath(common, altbacktrack.cc, cc, &altbacktrack);
-  if (SLJIT_UNLIKELY(sljit_get_compiler_error(compiler)))
-    return;
-
-  add_jump(compiler, &common->accept, JUMP(SLJIT_JUMP));
-
-  compile_backtrackingpath(common, altbacktrack.top);
-  if (SLJIT_UNLIKELY(sljit_get_compiler_error(compiler)))
-    return;
-  set_jumps(altbacktrack.topbacktracks, LABEL());
-
-  if (*cc != OP_ALT)
-    break;
-
-  altbacktrack.cc = cc + 1 + LINK_SIZE;
-  cc += GET(cc, 1);
-  }
-
-/* None of them matched. */
-OP1(SLJIT_MOV, TMP3, 0, SLJIT_IMM, 0);
-jump = JUMP(SLJIT_JUMP);
-
-if (common->quit != NULL)
-  {
-  set_jumps(common->quit, LABEL());
-  OP1(SLJIT_MOV, STACK_TOP, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), common->recursive_head_ptr);
-  if (needs_frame)
-    {
-    OP2(SLJIT_SUB, STACK_TOP, 0, STACK_TOP, 0, SLJIT_IMM, (framesize + alternativesize) * sizeof(sljit_sw));
-    add_jump(compiler, &common->revertframes, JUMP(SLJIT_FAST_CALL));
-    OP2(SLJIT_ADD, STACK_TOP, 0, STACK_TOP, 0, SLJIT_IMM, (framesize + alternativesize) * sizeof(sljit_sw));
-    }
-  OP1(SLJIT_MOV, TMP3, 0, SLJIT_IMM, 0);
-  common->quit = NULL;
-  add_jump(compiler, &common->quit, JUMP(SLJIT_JUMP));
-  }
-
-set_jumps(common->accept, LABEL());
-OP1(SLJIT_MOV, STACK_TOP, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), common->recursive_head_ptr);
-if (needs_frame)
-  {
-  OP2(SLJIT_SUB, STACK_TOP, 0, STACK_TOP, 0, SLJIT_IMM, (framesize + alternativesize) * sizeof(sljit_sw));
-  add_jump(compiler, &common->revertframes, JUMP(SLJIT_FAST_CALL));
-  OP2(SLJIT_ADD, STACK_TOP, 0, STACK_TOP, 0, SLJIT_IMM, (framesize + alternativesize) * sizeof(sljit_sw));
-  }
-OP1(SLJIT_MOV, TMP3, 0, SLJIT_IMM, 1);
-
-JUMPHERE(jump);
-if (common->quit != NULL)
-  set_jumps(common->quit, LABEL());
-copy_private_data(common, ccbegin, ccend, FALSE, private_data_size + framesize + alternativesize, framesize + alternativesize, needs_control_head);
-free_stack(common, private_data_size + framesize + alternativesize);
-if (needs_control_head)
-  {
-  OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(STACK_TOP), 2 * sizeof(sljit_sw));
-  OP1(SLJIT_MOV, TMP2, 0, SLJIT_MEM1(STACK_TOP), sizeof(sljit_sw));
-  OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_LOCALS_REG), common->recursive_head_ptr, TMP1, 0);
-  OP1(SLJIT_MOV, TMP1, 0, TMP3, 0);
-  OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_LOCALS_REG), common->control_head_ptr, TMP2, 0);
-  }
-else
-  {
-  OP1(SLJIT_MOV, TMP2, 0, SLJIT_MEM1(STACK_TOP), sizeof(sljit_sw));
-  OP1(SLJIT_MOV, TMP1, 0, TMP3, 0);
-  OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_LOCALS_REG), common->recursive_head_ptr, TMP2, 0);
-  }
-sljit_emit_fast_return(compiler, SLJIT_MEM1(STACK_TOP), 0);
-}
-
-#undef COMPILE_BACKTRACKINGPATH
-#undef CURRENT_AS
-
-void
-PRIV(jit_compile)(const REAL_PCRE *re, PUBL(extra) *extra, int mode)
-{
-struct sljit_compiler *compiler;
-backtrack_common rootbacktrack;
-compiler_common common_data;
-compiler_common *common = &common_data;
-const pcre_uint8 *tables = re->tables;
-pcre_study_data *study;
-int private_data_size;
-pcre_uchar *ccend;
-executable_functions *functions;
-void *executable_func;
-sljit_uw executable_size;
-sljit_uw total_length;
-label_addr_list *label_addr;
-struct sljit_label *mainloop_label = NULL;
-struct sljit_label *continue_match_label;
-struct sljit_label *empty_match_found_label = NULL;
-struct sljit_label *empty_match_backtrack_label = NULL;
-struct sljit_label *reset_match_label;
-struct sljit_label *quit_label;
-struct sljit_jump *jump;
-struct sljit_jump *minlength_check_failed = NULL;
-struct sljit_jump *reqbyte_notfound = NULL;
-struct sljit_jump *empty_match = NULL;
-
-SLJIT_ASSERT((extra->flags & PCRE_EXTRA_STUDY_DATA) != 0);
-study = extra->study_data;
-
-if (!tables)
-  tables = PRIV(default_tables);
-
-memset(&rootbacktrack, 0, sizeof(backtrack_common));
-memset(common, 0, sizeof(compiler_common));
-rootbacktrack.cc = (pcre_uchar *)re + re->name_table_offset + re->name_count * re->name_entry_size;
-
-common->start = rootbacktrack.cc;
-common->read_only_data = NULL;
-common->read_only_data_size = 0;
-common->read_only_data_ptr = NULL;
-common->fcc = tables + fcc_offset;
-common->lcc = (sljit_sw)(tables + lcc_offset);
-common->mode = mode;
-common->might_be_empty = study->minlength == 0;
-common->nltype = NLTYPE_FIXED;
-switch(re->options & PCRE_NEWLINE_BITS)
-  {
-  case 0:
-  /* Compile-time default */
-  switch(NEWLINE)
-    {
-    case -1: common->newline = (CHAR_CR << 8) | CHAR_NL; common->nltype = NLTYPE_ANY; break;
-    case -2: common->newline = (CHAR_CR << 8) | CHAR_NL; common->nltype = NLTYPE_ANYCRLF; break;
-    default: common->newline = NEWLINE; break;
-    }
-  break;
-  case PCRE_NEWLINE_CR: common->newline = CHAR_CR; break;
-  case PCRE_NEWLINE_LF: common->newline = CHAR_NL; break;
-  case PCRE_NEWLINE_CR+
-       PCRE_NEWLINE_LF: common->newline = (CHAR_CR << 8) | CHAR_NL; break;
-  case PCRE_NEWLINE_ANY: common->newline = (CHAR_CR << 8) | CHAR_NL; common->nltype = NLTYPE_ANY; break;
-  case PCRE_NEWLINE_ANYCRLF: common->newline = (CHAR_CR << 8) | CHAR_NL; common->nltype = NLTYPE_ANYCRLF; break;
-  default: return;
-  }
-common->nlmax = READ_CHAR_MAX;
-common->nlmin = 0;
-if ((re->options & PCRE_BSR_ANYCRLF) != 0)
-  common->bsr_nltype = NLTYPE_ANYCRLF;
-else if ((re->options & PCRE_BSR_UNICODE) != 0)
-  common->bsr_nltype = NLTYPE_ANY;
-else
-  {
-#ifdef BSR_ANYCRLF
-  common->bsr_nltype = NLTYPE_ANYCRLF;
-#else
-  common->bsr_nltype = NLTYPE_ANY;
-#endif
-  }
-common->bsr_nlmax = READ_CHAR_MAX;
-common->bsr_nlmin = 0;
-common->endonly = (re->options & PCRE_DOLLAR_ENDONLY) != 0;
-common->ctypes = (sljit_sw)(tables + ctypes_offset);
-common->name_table = ((pcre_uchar *)re) + re->name_table_offset;
-common->name_count = re->name_count;
-common->name_entry_size = re->name_entry_size;
-common->jscript_compat = (re->options & PCRE_JAVASCRIPT_COMPAT) != 0;
-#ifdef SUPPORT_UTF
-/* PCRE_UTF[16|32] have the same value as PCRE_UTF8. */
-common->utf = (re->options & PCRE_UTF8) != 0;
-#ifdef SUPPORT_UCP
-common->use_ucp = (re->options & PCRE_UCP) != 0;
-#endif
-if (common->utf)
-  {
-  if (common->nltype == NLTYPE_ANY)
-    common->nlmax = 0x2029;
-  else if (common->nltype == NLTYPE_ANYCRLF)
-    common->nlmax = (CHAR_CR > CHAR_NL) ? CHAR_CR : CHAR_NL;
-  else
-    {
-    /* We only care about the first newline character. */
-    common->nlmax = common->newline & 0xff;
-    }
-
-  if (common->nltype == NLTYPE_FIXED)
-    common->nlmin = common->newline & 0xff;
-  else
-    common->nlmin = (CHAR_CR < CHAR_NL) ? CHAR_CR : CHAR_NL;
-
-  if (common->bsr_nltype == NLTYPE_ANY)
-    common->bsr_nlmax = 0x2029;
-  else
-    common->bsr_nlmax = (CHAR_CR > CHAR_NL) ? CHAR_CR : CHAR_NL;
-  common->bsr_nlmin = (CHAR_CR < CHAR_NL) ? CHAR_CR : CHAR_NL;
-  }
-#endif /* SUPPORT_UTF */
-ccend = bracketend(common->start);
-
-/* Calculate the local space size on the stack. */
-common->ovector_start = LIMIT_MATCH + sizeof(sljit_sw);
-common->optimized_cbracket = (pcre_uint8 *)SLJIT_MALLOC(re->top_bracket + 1);
-if (!common->optimized_cbracket)
-  return;
-#if defined DEBUG_FORCE_UNOPTIMIZED_CBRAS && DEBUG_FORCE_UNOPTIMIZED_CBRAS == 1
-memset(common->optimized_cbracket, 0, re->top_bracket + 1);
-#else
-memset(common->optimized_cbracket, 1, re->top_bracket + 1);
-#endif
-
-SLJIT_ASSERT(*common->start == OP_BRA && ccend[-(1 + LINK_SIZE)] == OP_KET);
-#if defined DEBUG_FORCE_UNOPTIMIZED_CBRAS && DEBUG_FORCE_UNOPTIMIZED_CBRAS == 2
-common->capture_last_ptr = common->ovector_start;
-common->ovector_start += sizeof(sljit_sw);
-#endif
-if (!check_opcode_types(common, common->start, ccend))
-  {
-  SLJIT_FREE(common->optimized_cbracket);
-  return;
-  }
-
-/* Checking flags and updating ovector_start. */
-if (mode == JIT_COMPILE && (re->flags & PCRE_REQCHSET) != 0 && (re->options & PCRE_NO_START_OPTIMIZE) == 0)
-  {
-  common->req_char_ptr = common->ovector_start;
-  common->ovector_start += sizeof(sljit_sw);
-  }
-if (mode != JIT_COMPILE)
-  {
-  common->start_used_ptr = common->ovector_start;
-  common->ovector_start += sizeof(sljit_sw);
-  if (mode == JIT_PARTIAL_SOFT_COMPILE)
-    {
-    common->hit_start = common->ovector_start;
-    common->ovector_start += 2 * sizeof(sljit_sw);
-    }
-  else
-    {
-    SLJIT_ASSERT(mode == JIT_PARTIAL_HARD_COMPILE);
-    common->needs_start_ptr = TRUE;
-    }
-  }
-if ((re->options & PCRE_FIRSTLINE) != 0)
-  {
-  common->first_line_end = common->ovector_start;
-  common->ovector_start += sizeof(sljit_sw);
-  }
-#if defined DEBUG_FORCE_CONTROL_HEAD && DEBUG_FORCE_CONTROL_HEAD
-common->control_head_ptr = 1;
-#endif
-if (common->control_head_ptr != 0)
-  {
-  common->control_head_ptr = common->ovector_start;
-  common->ovector_start += sizeof(sljit_sw);
-  }
-if (common->needs_start_ptr && common->has_set_som)
-  {
-  /* Saving the real start pointer is necessary. */
-  common->start_ptr = common->ovector_start;
-  common->ovector_start += sizeof(sljit_sw);
-  }
-else
-  common->needs_start_ptr = FALSE;
-
-/* Aligning ovector to even number of sljit words. */
-if ((common->ovector_start & sizeof(sljit_sw)) != 0)
-  common->ovector_start += sizeof(sljit_sw);
-
-if (common->start_ptr == 0)
-  common->start_ptr = OVECTOR(0);
-
-/* Capturing brackets cannot be optimized if callouts are allowed. */
-if (common->capture_last_ptr != 0)
-  memset(common->optimized_cbracket, 0, re->top_bracket + 1);
-
-SLJIT_ASSERT(!(common->req_char_ptr != 0 && common->start_used_ptr != 0));
-common->cbra_ptr = OVECTOR_START + (re->top_bracket + 1) * 2 * sizeof(sljit_sw);
-
-total_length = ccend - common->start;
-common->private_data_ptrs = (sljit_si *)SLJIT_MALLOC(total_length * (sizeof(sljit_si) + (common->has_then ? 1 : 0)));
-if (!common->private_data_ptrs)
-  {
-  SLJIT_FREE(common->optimized_cbracket);
-  return;
-  }
-memset(common->private_data_ptrs, 0, total_length * sizeof(sljit_si));
-
-private_data_size = common->cbra_ptr + (re->top_bracket + 1) * sizeof(sljit_sw);
-set_private_data_ptrs(common, &private_data_size, ccend);
-if (private_data_size > SLJIT_MAX_LOCAL_SIZE)
-  {
-  SLJIT_FREE(common->private_data_ptrs);
-  SLJIT_FREE(common->optimized_cbracket);
-  return;
-  }
-
-if (common->has_then)
-  {
-  common->then_offsets = (pcre_uint8 *)(common->private_data_ptrs + total_length);
-  memset(common->then_offsets, 0, total_length);
-  set_then_offsets(common, common->start, NULL);
-  }
-
-if (common->read_only_data_size > 0)
-  {
-  common->read_only_data = (sljit_uw *)SLJIT_MALLOC(common->read_only_data_size);
-  if (common->read_only_data == NULL)
-    {
-    SLJIT_FREE(common->optimized_cbracket);
-    SLJIT_FREE(common->private_data_ptrs);
-    return;
-    }
-  common->read_only_data_ptr = common->read_only_data;
-  }
-
-compiler = sljit_create_compiler();
-if (!compiler)
-  {
-  SLJIT_FREE(common->optimized_cbracket);
-  SLJIT_FREE(common->private_data_ptrs);
-  if (common->read_only_data)
-    SLJIT_FREE(common->read_only_data);
-  return;
-  }
-common->compiler = compiler;
-
-/* Main pcre_jit_exec entry. */
-sljit_emit_enter(compiler, 1, 5, 5, private_data_size);
-
-/* Register init. */
-reset_ovector(common, (re->top_bracket + 1) * 2);
-if (common->req_char_ptr != 0)
-  OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_LOCALS_REG), common->req_char_ptr, SLJIT_SCRATCH_REG1, 0);
-
-OP1(SLJIT_MOV, ARGUMENTS, 0, SLJIT_SAVED_REG1, 0);
-OP1(SLJIT_MOV, TMP1, 0, SLJIT_SAVED_REG1, 0);
-OP1(SLJIT_MOV, STR_PTR, 0, SLJIT_MEM1(TMP1), SLJIT_OFFSETOF(jit_arguments, str));
-OP1(SLJIT_MOV, STR_END, 0, SLJIT_MEM1(TMP1), SLJIT_OFFSETOF(jit_arguments, end));
-OP1(SLJIT_MOV, TMP2, 0, SLJIT_MEM1(TMP1), SLJIT_OFFSETOF(jit_arguments, stack));
-OP1(SLJIT_MOV_UI, TMP1, 0, SLJIT_MEM1(TMP1), SLJIT_OFFSETOF(jit_arguments, limit_match));
-OP1(SLJIT_MOV, STACK_TOP, 0, SLJIT_MEM1(TMP2), SLJIT_OFFSETOF(struct sljit_stack, base));
-OP1(SLJIT_MOV, STACK_LIMIT, 0, SLJIT_MEM1(TMP2), SLJIT_OFFSETOF(struct sljit_stack, limit));
-OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_LOCALS_REG), LIMIT_MATCH, TMP1, 0);
-
-if (mode == JIT_PARTIAL_SOFT_COMPILE)
-  OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_LOCALS_REG), common->hit_start, SLJIT_IMM, -1);
-if (common->mark_ptr != 0)
-  OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_LOCALS_REG), common->mark_ptr, SLJIT_IMM, 0);
-if (common->control_head_ptr != 0)
-  OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_LOCALS_REG), common->control_head_ptr, SLJIT_IMM, 0);
-
-/* Main part of the matching */
-if ((re->options & PCRE_ANCHORED) == 0)
-  {
-  mainloop_label = mainloop_entry(common, (re->flags & PCRE_HASCRORLF) != 0, (re->options & PCRE_FIRSTLINE) != 0);
-  continue_match_label = LABEL();
-  /* Forward search if possible. */
-  if ((re->options & PCRE_NO_START_OPTIMIZE) == 0)
-    {
-    if (mode == JIT_COMPILE && fast_forward_first_n_chars(common, (re->options & PCRE_FIRSTLINE) != 0))
-      {
-      /* If read_only_data is reallocated, we might have an allocation failure. */
-      if (common->read_only_data_size > 0 && common->read_only_data == NULL)
-        {
-        sljit_free_compiler(compiler);
-        SLJIT_FREE(common->optimized_cbracket);
-        SLJIT_FREE(common->private_data_ptrs);
-        return;
-        }
-      }
-    else if ((re->flags & PCRE_FIRSTSET) != 0)
-      fast_forward_first_char(common, (pcre_uchar)re->first_char, (re->flags & PCRE_FCH_CASELESS) != 0, (re->options & PCRE_FIRSTLINE) != 0);
-    else if ((re->flags & PCRE_STARTLINE) != 0)
-      fast_forward_newline(common, (re->options & PCRE_FIRSTLINE) != 0);
-    else if ((re->flags & PCRE_STARTLINE) == 0 && study != NULL && (study->flags & PCRE_STUDY_MAPPED) != 0)
-      fast_forward_start_bits(common, study->start_bits, (re->options & PCRE_FIRSTLINE) != 0);
-    }
-  }
-else
-  continue_match_label = LABEL();
-
-if (mode == JIT_COMPILE && study->minlength > 0 && (re->options & PCRE_NO_START_OPTIMIZE) == 0)
-  {
-  OP1(SLJIT_MOV, SLJIT_RETURN_REG, 0, SLJIT_IMM, PCRE_ERROR_NOMATCH);
-  OP2(SLJIT_ADD, TMP2, 0, STR_PTR, 0, SLJIT_IMM, IN_UCHARS(study->minlength));
-  minlength_check_failed = CMP(SLJIT_C_GREATER, TMP2, 0, STR_END, 0);
-  }
-if (common->req_char_ptr != 0)
-  reqbyte_notfound = search_requested_char(common, (pcre_uchar)re->req_char, (re->flags & PCRE_RCH_CASELESS) != 0, (re->flags & PCRE_FIRSTSET) != 0);
-
-/* Store the current STR_PTR in OVECTOR(0). */
-OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_LOCALS_REG), OVECTOR(0), STR_PTR, 0);
-/* Copy the limit of allowed recursions. */
-OP1(SLJIT_MOV, COUNT_MATCH, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), LIMIT_MATCH);
-if (common->capture_last_ptr != 0)
-  OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_LOCALS_REG), common->capture_last_ptr, SLJIT_IMM, -1);
-
-if (common->needs_start_ptr)
-  {
-  SLJIT_ASSERT(common->start_ptr != OVECTOR(0));
-  OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_LOCALS_REG), common->start_ptr, STR_PTR, 0);
-  }
-else
-  SLJIT_ASSERT(common->start_ptr == OVECTOR(0));
-
-/* Copy the beginning of the string. */
-if (mode == JIT_PARTIAL_SOFT_COMPILE)
-  {
-  jump = CMP(SLJIT_C_NOT_EQUAL, SLJIT_MEM1(SLJIT_LOCALS_REG), common->hit_start, SLJIT_IMM, -1);
-  OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_LOCALS_REG), common->start_used_ptr, STR_PTR, 0);
-  OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_LOCALS_REG), common->hit_start + sizeof(sljit_sw), STR_PTR, 0);
-  JUMPHERE(jump);
-  }
-else if (mode == JIT_PARTIAL_HARD_COMPILE)
-  OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_LOCALS_REG), common->start_used_ptr, STR_PTR, 0);
-
-compile_matchingpath(common, common->start, ccend, &rootbacktrack);
-if (SLJIT_UNLIKELY(sljit_get_compiler_error(compiler)))
-  {
-  sljit_free_compiler(compiler);
-  SLJIT_FREE(common->optimized_cbracket);
-  SLJIT_FREE(common->private_data_ptrs);
-  if (common->read_only_data)
-    SLJIT_FREE(common->read_only_data);
-  return;
-  }
-
-if (common->might_be_empty)
-  {
-  empty_match = CMP(SLJIT_C_EQUAL, STR_PTR, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), OVECTOR(0));
-  empty_match_found_label = LABEL();
-  }
-
-common->accept_label = LABEL();
-if (common->accept != NULL)
-  set_jumps(common->accept, common->accept_label);
-
-/* This means we have a match. Update the ovector. */
-copy_ovector(common, re->top_bracket + 1);
-common->quit_label = common->forced_quit_label = LABEL();
-if (common->quit != NULL)
-  set_jumps(common->quit, common->quit_label);
-if (common->forced_quit != NULL)
-  set_jumps(common->forced_quit, common->forced_quit_label);
-if (minlength_check_failed != NULL)
-  SET_LABEL(minlength_check_failed, common->forced_quit_label);
-sljit_emit_return(compiler, SLJIT_MOV, SLJIT_RETURN_REG, 0);
-
-if (mode != JIT_COMPILE)
-  {
-  common->partialmatchlabel = LABEL();
-  set_jumps(common->partialmatch, common->partialmatchlabel);
-  return_with_partial_match(common, common->quit_label);
-  }
-
-if (common->might_be_empty)
-  empty_match_backtrack_label = LABEL();
-compile_backtrackingpath(common, rootbacktrack.top);
-if (SLJIT_UNLIKELY(sljit_get_compiler_error(compiler)))
-  {
-  sljit_free_compiler(compiler);
-  SLJIT_FREE(common->optimized_cbracket);
-  SLJIT_FREE(common->private_data_ptrs);
-  if (common->read_only_data)
-    SLJIT_FREE(common->read_only_data);
-  return;
-  }
-
-SLJIT_ASSERT(rootbacktrack.prev == NULL);
-reset_match_label = LABEL();
-
-if (mode == JIT_PARTIAL_SOFT_COMPILE)
-  {
-  /* Update hit_start only in the first time. */
-  jump = CMP(SLJIT_C_NOT_EQUAL, SLJIT_MEM1(SLJIT_LOCALS_REG), common->hit_start, SLJIT_IMM, 0);
-  OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), common->start_used_ptr);
-  OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_LOCALS_REG), common->start_used_ptr, SLJIT_IMM, -1);
-  OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_LOCALS_REG), common->hit_start, TMP1, 0);
-  JUMPHERE(jump);
-  }
-
-/* Check we have remaining characters. */
-if ((re->options & PCRE_ANCHORED) == 0 && (re->options & PCRE_FIRSTLINE) != 0)
-  {
-  SLJIT_ASSERT(common->first_line_end != 0);
-  OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), common->first_line_end);
-  }
-
-OP1(SLJIT_MOV, STR_PTR, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), common->start_ptr);
-
-if ((re->options & PCRE_ANCHORED) == 0)
-  {
-  if (common->ff_newline_shortcut != NULL)
-    {
-    if ((re->options & PCRE_FIRSTLINE) == 0)
-      CMPTO(SLJIT_C_LESS, STR_PTR, 0, STR_END, 0, common->ff_newline_shortcut);
-    /* There cannot be more newlines here. */
-    }
-  else
-    {
-    if ((re->options & PCRE_FIRSTLINE) == 0)
-      CMPTO(SLJIT_C_LESS, STR_PTR, 0, STR_END, 0, mainloop_label);
-    else
-      CMPTO(SLJIT_C_LESS, STR_PTR, 0, TMP1, 0, mainloop_label);
-    }
-  }
-
-/* No more remaining characters. */
-if (reqbyte_notfound != NULL)
-  JUMPHERE(reqbyte_notfound);
-
-if (mode == JIT_PARTIAL_SOFT_COMPILE)
-  CMPTO(SLJIT_C_NOT_EQUAL, SLJIT_MEM1(SLJIT_LOCALS_REG), common->hit_start, SLJIT_IMM, -1, common->partialmatchlabel);
-
-OP1(SLJIT_MOV, SLJIT_RETURN_REG, 0, SLJIT_IMM, PCRE_ERROR_NOMATCH);
-JUMPTO(SLJIT_JUMP, common->quit_label);
-
-flush_stubs(common);
-
-if (common->might_be_empty)
-  {
-  JUMPHERE(empty_match);
-  OP1(SLJIT_MOV, TMP1, 0, ARGUMENTS, 0);
-  OP1(SLJIT_MOV_UB, TMP2, 0, SLJIT_MEM1(TMP1), SLJIT_OFFSETOF(jit_arguments, notempty));
-  CMPTO(SLJIT_C_NOT_EQUAL, TMP2, 0, SLJIT_IMM, 0, empty_match_backtrack_label);
-  OP1(SLJIT_MOV_UB, TMP2, 0, SLJIT_MEM1(TMP1), SLJIT_OFFSETOF(jit_arguments, notempty_atstart));
-  CMPTO(SLJIT_C_EQUAL, TMP2, 0, SLJIT_IMM, 0, empty_match_found_label);
-  OP1(SLJIT_MOV, TMP2, 0, SLJIT_MEM1(TMP1), SLJIT_OFFSETOF(jit_arguments, str));
-  CMPTO(SLJIT_C_NOT_EQUAL, TMP2, 0, STR_PTR, 0, empty_match_found_label);
-  JUMPTO(SLJIT_JUMP, empty_match_backtrack_label);
-  }
-
-common->currententry = common->entries;
-common->local_exit = TRUE;
-quit_label = common->quit_label;
-while (common->currententry != NULL)
-  {
-  /* Might add new entries. */
-  compile_recurse(common);
-  if (SLJIT_UNLIKELY(sljit_get_compiler_error(compiler)))
-    {
-    sljit_free_compiler(compiler);
-    SLJIT_FREE(common->optimized_cbracket);
-    SLJIT_FREE(common->private_data_ptrs);
-    if (common->read_only_data)
-      SLJIT_FREE(common->read_only_data);
-    return;
-    }
-  flush_stubs(common);
-  common->currententry = common->currententry->next;
-  }
-common->local_exit = FALSE;
-common->quit_label = quit_label;
-
-/* Allocating stack, returns with PCRE_ERROR_JIT_STACKLIMIT if fails. */
-/* This is a (really) rare case. */
-set_jumps(common->stackalloc, LABEL());
-/* RETURN_ADDR is not a saved register. */
-sljit_emit_fast_enter(compiler, SLJIT_MEM1(SLJIT_LOCALS_REG), LOCALS0);
-OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_LOCALS_REG), LOCALS1, TMP2, 0);
-OP1(SLJIT_MOV, TMP1, 0, ARGUMENTS, 0);
-OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(TMP1), SLJIT_OFFSETOF(jit_arguments, stack));
-OP1(SLJIT_MOV, SLJIT_MEM1(TMP1), SLJIT_OFFSETOF(struct sljit_stack, top), STACK_TOP, 0);
-OP2(SLJIT_ADD, TMP2, 0, SLJIT_MEM1(TMP1), SLJIT_OFFSETOF(struct sljit_stack, limit), SLJIT_IMM, STACK_GROWTH_RATE);
-
-sljit_emit_ijump(compiler, SLJIT_CALL2, SLJIT_IMM, SLJIT_FUNC_OFFSET(sljit_stack_resize));
-jump = CMP(SLJIT_C_NOT_EQUAL, SLJIT_RETURN_REG, 0, SLJIT_IMM, 0);
-OP1(SLJIT_MOV, TMP1, 0, ARGUMENTS, 0);
-OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(TMP1), SLJIT_OFFSETOF(jit_arguments, stack));
-OP1(SLJIT_MOV, STACK_TOP, 0, SLJIT_MEM1(TMP1), SLJIT_OFFSETOF(struct sljit_stack, top));
-OP1(SLJIT_MOV, STACK_LIMIT, 0, SLJIT_MEM1(TMP1), SLJIT_OFFSETOF(struct sljit_stack, limit));
-OP1(SLJIT_MOV, TMP2, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), LOCALS1);
-sljit_emit_fast_return(compiler, SLJIT_MEM1(SLJIT_LOCALS_REG), LOCALS0);
-
-/* Allocation failed. */
-JUMPHERE(jump);
-/* We break the return address cache here, but this is a really rare case. */
-OP1(SLJIT_MOV, SLJIT_RETURN_REG, 0, SLJIT_IMM, PCRE_ERROR_JIT_STACKLIMIT);
-JUMPTO(SLJIT_JUMP, common->quit_label);
-
-/* Call limit reached. */
-set_jumps(common->calllimit, LABEL());
-OP1(SLJIT_MOV, SLJIT_RETURN_REG, 0, SLJIT_IMM, PCRE_ERROR_MATCHLIMIT);
-JUMPTO(SLJIT_JUMP, common->quit_label);
-
-if (common->revertframes != NULL)
-  {
-  set_jumps(common->revertframes, LABEL());
-  do_revertframes(common);
-  }
-if (common->wordboundary != NULL)
-  {
-  set_jumps(common->wordboundary, LABEL());
-  check_wordboundary(common);
-  }
-if (common->anynewline != NULL)
-  {
-  set_jumps(common->anynewline, LABEL());
-  check_anynewline(common);
-  }
-if (common->hspace != NULL)
-  {
-  set_jumps(common->hspace, LABEL());
-  check_hspace(common);
-  }
-if (common->vspace != NULL)
-  {
-  set_jumps(common->vspace, LABEL());
-  check_vspace(common);
-  }
-if (common->casefulcmp != NULL)
-  {
-  set_jumps(common->casefulcmp, LABEL());
-  do_casefulcmp(common);
-  }
-if (common->caselesscmp != NULL)
-  {
-  set_jumps(common->caselesscmp, LABEL());
-  do_caselesscmp(common);
-  }
-if (common->reset_match != NULL)
-  {
-  set_jumps(common->reset_match, LABEL());
-  do_reset_match(common, (re->top_bracket + 1) * 2);
-  CMPTO(SLJIT_C_GREATER, STR_PTR, 0, TMP1, 0, continue_match_label);
-  OP1(SLJIT_MOV, STR_PTR, 0, TMP1, 0);
-  JUMPTO(SLJIT_JUMP, reset_match_label);
-  }
-#ifdef SUPPORT_UTF
-#ifdef COMPILE_PCRE8
-if (common->utfreadchar != NULL)
-  {
-  set_jumps(common->utfreadchar, LABEL());
-  do_utfreadchar(common);
-  }
-if (common->utfreadchar16 != NULL)
-  {
-  set_jumps(common->utfreadchar16, LABEL());
-  do_utfreadchar16(common);
-  }
-if (common->utfreadtype8 != NULL)
-  {
-  set_jumps(common->utfreadtype8, LABEL());
-  do_utfreadtype8(common);
-  }
-#endif /* COMPILE_PCRE8 */
-#endif /* SUPPORT_UTF */
-#ifdef SUPPORT_UCP
-if (common->getucd != NULL)
-  {
-  set_jumps(common->getucd, LABEL());
-  do_getucd(common);
-  }
-#endif
-
-SLJIT_ASSERT(common->read_only_data + (common->read_only_data_size >> SLJIT_WORD_SHIFT) == common->read_only_data_ptr);
-SLJIT_FREE(common->optimized_cbracket);
-SLJIT_FREE(common->private_data_ptrs);
-
-executable_func = sljit_generate_code(compiler);
-executable_size = sljit_get_generated_code_size(compiler);
-label_addr = common->label_addrs;
-while (label_addr != NULL)
-  {
-  *label_addr->addr = sljit_get_label_addr(label_addr->label);
-  label_addr = label_addr->next;
-  }
-sljit_free_compiler(compiler);
-if (executable_func == NULL)
-  {
-  if (common->read_only_data)
-    SLJIT_FREE(common->read_only_data);
-  return;
-  }
-
-/* Reuse the function descriptor if possible. */
-if ((extra->flags & PCRE_EXTRA_EXECUTABLE_JIT) != 0 && extra->executable_jit != NULL)
-  functions = (executable_functions *)extra->executable_jit;
-else
-  {
-  /* Note: If your memory-checker has flagged the allocation below as a
-   * memory leak, it is probably because you either forgot to call
-   * pcre_free_study() (or pcre16_free_study()) on the pcre_extra (or
-   * pcre16_extra) object, or you called said function after having
-   * cleared the PCRE_EXTRA_EXECUTABLE_JIT bit from the "flags" field
-   * of the object. (The function will only free the JIT data if the
-   * bit remains set, as the bit indicates that the pointer to the data
-   * is valid.)
-   */
-  functions = SLJIT_MALLOC(sizeof(executable_functions));
-  if (functions == NULL)
-    {
-    /* This case is highly unlikely since we just recently
-    freed a lot of memory. Not impossible though. */
-    sljit_free_code(executable_func);
-    if (common->read_only_data)
-      SLJIT_FREE(common->read_only_data);
-    return;
-    }
-  memset(functions, 0, sizeof(executable_functions));
-  functions->top_bracket = (re->top_bracket + 1) * 2;
-  functions->limit_match = (re->flags & PCRE_MLSET) != 0 ? re->limit_match : 0;
-  extra->executable_jit = functions;
-  extra->flags |= PCRE_EXTRA_EXECUTABLE_JIT;
-  }
-
-functions->executable_funcs[mode] = executable_func;
-functions->read_only_data[mode] = common->read_only_data;
-functions->executable_sizes[mode] = executable_size;
-}
-
-static int jit_machine_stack_exec(jit_arguments *arguments, void* executable_func)
-{
-union {
-   void* executable_func;
-   jit_function call_executable_func;
-} convert_executable_func;
-pcre_uint8 local_space[MACHINE_STACK_SIZE];
-struct sljit_stack local_stack;
-
-local_stack.top = (sljit_sw)&local_space;
-local_stack.base = local_stack.top;
-local_stack.limit = local_stack.base + MACHINE_STACK_SIZE;
-local_stack.max_limit = local_stack.limit;
-arguments->stack = &local_stack;
-convert_executable_func.executable_func = executable_func;
-return convert_executable_func.call_executable_func(arguments);
-}
-
-int
-PRIV(jit_exec)(const PUBL(extra) *extra_data, const pcre_uchar *subject,
-  int length, int start_offset, int options, int *offsets, int offset_count)
-{
-executable_functions *functions = (executable_functions *)extra_data->executable_jit;
-union {
-   void* executable_func;
-   jit_function call_executable_func;
-} convert_executable_func;
-jit_arguments arguments;
-int max_offset_count;
-int retval;
-int mode = JIT_COMPILE;
-
-if ((options & PCRE_PARTIAL_HARD) != 0)
-  mode = JIT_PARTIAL_HARD_COMPILE;
-else if ((options & PCRE_PARTIAL_SOFT) != 0)
-  mode = JIT_PARTIAL_SOFT_COMPILE;
-
-if (functions->executable_funcs[mode] == NULL)
-  return PCRE_ERROR_JIT_BADOPTION;
-
-/* Sanity checks should be handled by pcre_exec. */
-arguments.str = subject + start_offset;
-arguments.begin = subject;
-arguments.end = subject + length;
-arguments.mark_ptr = NULL;
-/* JIT decreases this value less frequently than the interpreter. */
-arguments.limit_match = ((extra_data->flags & PCRE_EXTRA_MATCH_LIMIT) == 0) ? MATCH_LIMIT : (pcre_uint32)(extra_data->match_limit);
-if (functions->limit_match != 0 && functions->limit_match < arguments.limit_match)
-  arguments.limit_match = functions->limit_match;
-arguments.notbol = (options & PCRE_NOTBOL) != 0;
-arguments.noteol = (options & PCRE_NOTEOL) != 0;
-arguments.notempty = (options & PCRE_NOTEMPTY) != 0;
-arguments.notempty_atstart = (options & PCRE_NOTEMPTY_ATSTART) != 0;
-arguments.offsets = offsets;
-arguments.callout_data = (extra_data->flags & PCRE_EXTRA_CALLOUT_DATA) != 0 ? extra_data->callout_data : NULL;
-arguments.real_offset_count = offset_count;
-
-/* pcre_exec() rounds offset_count to a multiple of 3, and then uses only 2/3 of
-the output vector for storing captured strings, with the remainder used as
-workspace. We don't need the workspace here. For compatibility, we limit the
-number of captured strings in the same way as pcre_exec(), so that the user
-gets the same result with and without JIT. */
-
-if (offset_count != 2)
-  offset_count = ((offset_count - (offset_count % 3)) * 2) / 3;
-max_offset_count = functions->top_bracket;
-if (offset_count > max_offset_count)
-  offset_count = max_offset_count;
-arguments.offset_count = offset_count;
-
-if (functions->callback)
-  arguments.stack = (struct sljit_stack *)functions->callback(functions->userdata);
-else
-  arguments.stack = (struct sljit_stack *)functions->userdata;
-
-if (arguments.stack == NULL)
-  retval = jit_machine_stack_exec(&arguments, functions->executable_funcs[mode]);
-else
-  {
-  convert_executable_func.executable_func = functions->executable_funcs[mode];
-  retval = convert_executable_func.call_executable_func(&arguments);
-  }
-
-if (retval * 2 > offset_count)
-  retval = 0;
-if ((extra_data->flags & PCRE_EXTRA_MARK) != 0)
-  *(extra_data->mark) = arguments.mark_ptr;
-
-return retval;
-}
-
-#if defined COMPILE_PCRE8
-PCRE_EXP_DEFN int PCRE_CALL_CONVENTION
-pcre_jit_exec(const pcre *argument_re, const pcre_extra *extra_data,
-  PCRE_SPTR subject, int length, int start_offset, int options,
-  int *offsets, int offset_count, pcre_jit_stack *stack)
-#elif defined COMPILE_PCRE16
-PCRE_EXP_DEFN int PCRE_CALL_CONVENTION
-pcre16_jit_exec(const pcre16 *argument_re, const pcre16_extra *extra_data,
-  PCRE_SPTR16 subject, int length, int start_offset, int options,
-  int *offsets, int offset_count, pcre16_jit_stack *stack)
-#elif defined COMPILE_PCRE32
-PCRE_EXP_DEFN int PCRE_CALL_CONVENTION
-pcre32_jit_exec(const pcre32 *argument_re, const pcre32_extra *extra_data,
-  PCRE_SPTR32 subject, int length, int start_offset, int options,
-  int *offsets, int offset_count, pcre32_jit_stack *stack)
-#endif
-{
-pcre_uchar *subject_ptr = (pcre_uchar *)subject;
-executable_functions *functions = (executable_functions *)extra_data->executable_jit;
-union {
-   void* executable_func;
-   jit_function call_executable_func;
-} convert_executable_func;
-jit_arguments arguments;
-int max_offset_count;
-int retval;
-int mode = JIT_COMPILE;
-
-SLJIT_UNUSED_ARG(argument_re);
-
-/* Plausibility checks */
-if ((options & ~PUBLIC_JIT_EXEC_OPTIONS) != 0) return PCRE_ERROR_JIT_BADOPTION;
-
-if ((options & PCRE_PARTIAL_HARD) != 0)
-  mode = JIT_PARTIAL_HARD_COMPILE;
-else if ((options & PCRE_PARTIAL_SOFT) != 0)
-  mode = JIT_PARTIAL_SOFT_COMPILE;
-
-if (functions->executable_funcs[mode] == NULL)
-  return PCRE_ERROR_JIT_BADOPTION;
-
-/* Sanity checks should be handled by pcre_exec. */
-arguments.stack = (struct sljit_stack *)stack;
-arguments.str = subject_ptr + start_offset;
-arguments.begin = subject_ptr;
-arguments.end = subject_ptr + length;
-arguments.mark_ptr = NULL;
-/* JIT decreases this value less frequently than the interpreter. */
-arguments.limit_match = ((extra_data->flags & PCRE_EXTRA_MATCH_LIMIT) == 0) ? MATCH_LIMIT : (pcre_uint32)(extra_data->match_limit);
-if (functions->limit_match != 0 && functions->limit_match < arguments.limit_match)
-  arguments.limit_match = functions->limit_match;
-arguments.notbol = (options & PCRE_NOTBOL) != 0;
-arguments.noteol = (options & PCRE_NOTEOL) != 0;
-arguments.notempty = (options & PCRE_NOTEMPTY) != 0;
-arguments.notempty_atstart = (options & PCRE_NOTEMPTY_ATSTART) != 0;
-arguments.offsets = offsets;
-arguments.callout_data = (extra_data->flags & PCRE_EXTRA_CALLOUT_DATA) != 0 ? extra_data->callout_data : NULL;
-arguments.real_offset_count = offset_count;
-
-/* pcre_exec() rounds offset_count to a multiple of 3, and then uses only 2/3 of
-the output vector for storing captured strings, with the remainder used as
-workspace. We don't need the workspace here. For compatibility, we limit the
-number of captured strings in the same way as pcre_exec(), so that the user
-gets the same result with and without JIT. */
-
-if (offset_count != 2)
-  offset_count = ((offset_count - (offset_count % 3)) * 2) / 3;
-max_offset_count = functions->top_bracket;
-if (offset_count > max_offset_count)
-  offset_count = max_offset_count;
-arguments.offset_count = offset_count;
-
-convert_executable_func.executable_func = functions->executable_funcs[mode];
-retval = convert_executable_func.call_executable_func(&arguments);
-
-if (retval * 2 > offset_count)
-  retval = 0;
-if ((extra_data->flags & PCRE_EXTRA_MARK) != 0)
-  *(extra_data->mark) = arguments.mark_ptr;
-
-return retval;
-}
-
-void
-PRIV(jit_free)(void *executable_funcs)
-{
-int i;
-executable_functions *functions = (executable_functions *)executable_funcs;
-for (i = 0; i < JIT_NUMBER_OF_COMPILE_MODES; i++)
-  {
-  if (functions->executable_funcs[i] != NULL)
-    sljit_free_code(functions->executable_funcs[i]);
-  if (functions->read_only_data[i] != NULL)
-    SLJIT_FREE(functions->read_only_data[i]);
-  }
-SLJIT_FREE(functions);
-}
-
-int
-PRIV(jit_get_size)(void *executable_funcs)
-{
-int i;
-sljit_uw size = 0;
-sljit_uw *executable_sizes = ((executable_functions *)executable_funcs)->executable_sizes;
-for (i = 0; i < JIT_NUMBER_OF_COMPILE_MODES; i++)
-  size += executable_sizes[i];
-return (int)size;
-}
-
-const char*
-PRIV(jit_get_target)(void)
-{
-return sljit_get_platform_name();
-}
-
-#if defined COMPILE_PCRE8
-PCRE_EXP_DECL pcre_jit_stack *
-pcre_jit_stack_alloc(int startsize, int maxsize)
-#elif defined COMPILE_PCRE16
-PCRE_EXP_DECL pcre16_jit_stack *
-pcre16_jit_stack_alloc(int startsize, int maxsize)
-#elif defined COMPILE_PCRE32
-PCRE_EXP_DECL pcre32_jit_stack *
-pcre32_jit_stack_alloc(int startsize, int maxsize)
-#endif
-{
-if (startsize < 1 || maxsize < 1)
-  return NULL;
-if (startsize > maxsize)
-  startsize = maxsize;
-startsize = (startsize + STACK_GROWTH_RATE - 1) & ~(STACK_GROWTH_RATE - 1);
-maxsize = (maxsize + STACK_GROWTH_RATE - 1) & ~(STACK_GROWTH_RATE - 1);
-return (PUBL(jit_stack)*)sljit_allocate_stack(startsize, maxsize);
-}
-
-#if defined COMPILE_PCRE8
-PCRE_EXP_DECL void
-pcre_jit_stack_free(pcre_jit_stack *stack)
-#elif defined COMPILE_PCRE16
-PCRE_EXP_DECL void
-pcre16_jit_stack_free(pcre16_jit_stack *stack)
-#elif defined COMPILE_PCRE32
-PCRE_EXP_DECL void
-pcre32_jit_stack_free(pcre32_jit_stack *stack)
-#endif
-{
-sljit_free_stack((struct sljit_stack *)stack);
-}
-
-#if defined COMPILE_PCRE8
-PCRE_EXP_DECL void
-pcre_assign_jit_stack(pcre_extra *extra, pcre_jit_callback callback, void *userdata)
-#elif defined COMPILE_PCRE16
-PCRE_EXP_DECL void
-pcre16_assign_jit_stack(pcre16_extra *extra, pcre16_jit_callback callback, void *userdata)
-#elif defined COMPILE_PCRE32
-PCRE_EXP_DECL void
-pcre32_assign_jit_stack(pcre32_extra *extra, pcre32_jit_callback callback, void *userdata)
-#endif
-{
-executable_functions *functions;
-if (extra != NULL &&
-    (extra->flags & PCRE_EXTRA_EXECUTABLE_JIT) != 0 &&
-    extra->executable_jit != NULL)
-  {
-  functions = (executable_functions *)extra->executable_jit;
-  functions->callback = callback;
-  functions->userdata = userdata;
-  }
-}
-
-#if defined COMPILE_PCRE8
-PCRE_EXP_DECL void
-pcre_jit_free_unused_memory(void)
-#elif defined COMPILE_PCRE16
-PCRE_EXP_DECL void
-pcre16_jit_free_unused_memory(void)
-#elif defined COMPILE_PCRE32
-PCRE_EXP_DECL void
-pcre32_jit_free_unused_memory(void)
-#endif
-{
-sljit_free_unused_memory_exec();
-}
-
-#else  /* SUPPORT_JIT */
-
-/* These are dummy functions to avoid linking errors when JIT support is not
-being compiled. */
-
-#if defined COMPILE_PCRE8
-PCRE_EXP_DECL pcre_jit_stack *
-pcre_jit_stack_alloc(int startsize, int maxsize)
-#elif defined COMPILE_PCRE16
-PCRE_EXP_DECL pcre16_jit_stack *
-pcre16_jit_stack_alloc(int startsize, int maxsize)
-#elif defined COMPILE_PCRE32
-PCRE_EXP_DECL pcre32_jit_stack *
-pcre32_jit_stack_alloc(int startsize, int maxsize)
-#endif
-{
-(void)startsize;
-(void)maxsize;
-return NULL;
-}
-
-#if defined COMPILE_PCRE8
-PCRE_EXP_DECL void
-pcre_jit_stack_free(pcre_jit_stack *stack)
-#elif defined COMPILE_PCRE16
-PCRE_EXP_DECL void
-pcre16_jit_stack_free(pcre16_jit_stack *stack)
-#elif defined COMPILE_PCRE32
-PCRE_EXP_DECL void
-pcre32_jit_stack_free(pcre32_jit_stack *stack)
-#endif
-{
-(void)stack;
-}
-
-#if defined COMPILE_PCRE8
-PCRE_EXP_DECL void
-pcre_assign_jit_stack(pcre_extra *extra, pcre_jit_callback callback, void *userdata)
-#elif defined COMPILE_PCRE16
-PCRE_EXP_DECL void
-pcre16_assign_jit_stack(pcre16_extra *extra, pcre16_jit_callback callback, void *userdata)
-#elif defined COMPILE_PCRE32
-PCRE_EXP_DECL void
-pcre32_assign_jit_stack(pcre32_extra *extra, pcre32_jit_callback callback, void *userdata)
-#endif
-{
-(void)extra;
-(void)callback;
-(void)userdata;
-}
-
-#if defined COMPILE_PCRE8
-PCRE_EXP_DECL void
-pcre_jit_free_unused_memory(void)
-#elif defined COMPILE_PCRE16
-PCRE_EXP_DECL void
-pcre16_jit_free_unused_memory(void)
-#elif defined COMPILE_PCRE32
-PCRE_EXP_DECL void
-pcre32_jit_free_unused_memory(void)
-#endif
-{
-}
-
-#endif
-
-/* End of pcre_jit_compile.c */
diff --git a/src/extra/pcre/pcre_maketables.c b/src/extra/pcre/pcre_maketables.c
deleted file mode 100644
index a44a6ea..0000000
--- a/src/extra/pcre/pcre_maketables.c
+++ /dev/null
@@ -1,156 +0,0 @@
-/*************************************************
-*      Perl-Compatible Regular Expressions       *
-*************************************************/
-
-/* PCRE is a library of functions to support regular expressions whose syntax
-and semantics are as close as possible to those of the Perl 5 language.
-
-                       Written by Philip Hazel
-           Copyright (c) 1997-2012 University of Cambridge
-
------------------------------------------------------------------------------
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are met:
-
-    * Redistributions of source code must retain the above copyright notice,
-      this list of conditions and the following disclaimer.
-
-    * Redistributions in binary form must reproduce the above copyright
-      notice, this list of conditions and the following disclaimer in the
-      documentation and/or other materials provided with the distribution.
-
-    * Neither the name of the University of Cambridge nor the names of its
-      contributors may be used to endorse or promote products derived from
-      this software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
-LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-POSSIBILITY OF SUCH DAMAGE.
------------------------------------------------------------------------------
-*/
-
-
-/* This module contains the external function pcre_maketables(), which builds
-character tables for PCRE in the current locale. The file is compiled on its
-own as part of the PCRE library. However, it is also included in the
-compilation of dftables.c, in which case the macro DFTABLES is defined. */
-
-
-#ifndef DFTABLES
-#  ifdef HAVE_CONFIG_H
-#  include "config.h"
-#  endif
-#  include "pcre_internal.h"
-#endif
-
-
-/*************************************************
-*           Create PCRE character tables         *
-*************************************************/
-
-/* This function builds a set of character tables for use by PCRE and returns
-a pointer to them. They are build using the ctype functions, and consequently
-their contents will depend upon the current locale setting. When compiled as
-part of the library, the store is obtained via PUBL(malloc)(), but when
-compiled inside dftables, use malloc().
-
-Arguments:   none
-Returns:     pointer to the contiguous block of data
-*/
-
-#if defined COMPILE_PCRE8
-const unsigned char *
-pcre_maketables(void)
-#elif defined COMPILE_PCRE16
-const unsigned char *
-pcre16_maketables(void)
-#elif defined COMPILE_PCRE32
-const unsigned char *
-pcre32_maketables(void)
-#endif
-{
-unsigned char *yield, *p;
-int i;
-
-#ifndef DFTABLES
-yield = (unsigned char*)(PUBL(malloc))(tables_length);
-#else
-yield = (unsigned char*)malloc(tables_length);
-#endif
-
-if (yield == NULL) return NULL;
-p = yield;
-
-/* First comes the lower casing table */
-
-for (i = 0; i < 256; i++) *p++ = tolower(i);
-
-/* Next the case-flipping table */
-
-for (i = 0; i < 256; i++) *p++ = islower(i)? toupper(i) : tolower(i);
-
-/* Then the character class tables. Don't try to be clever and save effort on
-exclusive ones - in some locales things may be different.
-
-Note that the table for "space" includes everything "isspace" gives, including
-VT in the default locale. This makes it work for the POSIX class [:space:].
-From release 8.34 is is also correct for Perl space, because Perl added VT at
-release 5.18.
-
-Note also that it is possible for a character to be alnum or alpha without
-being lower or upper, such as "male and female ordinals" (\xAA and \xBA) in the
-fr_FR locale (at least under Debian Linux's locales as of 12/2005). So we must
-test for alnum specially. */
-
-memset(p, 0, cbit_length);
-for (i = 0; i < 256; i++)
-  {
-  if (isdigit(i)) p[cbit_digit  + i/8] |= 1 << (i&7);
-  if (isupper(i)) p[cbit_upper  + i/8] |= 1 << (i&7);
-  if (islower(i)) p[cbit_lower  + i/8] |= 1 << (i&7);
-  if (isalnum(i)) p[cbit_word   + i/8] |= 1 << (i&7);
-  if (i == '_')   p[cbit_word   + i/8] |= 1 << (i&7);
-  if (isspace(i)) p[cbit_space  + i/8] |= 1 << (i&7);
-  if (isxdigit(i))p[cbit_xdigit + i/8] |= 1 << (i&7);
-  if (isgraph(i)) p[cbit_graph  + i/8] |= 1 << (i&7);
-  if (isprint(i)) p[cbit_print  + i/8] |= 1 << (i&7);
-  if (ispunct(i)) p[cbit_punct  + i/8] |= 1 << (i&7);
-  if (iscntrl(i)) p[cbit_cntrl  + i/8] |= 1 << (i&7);
-  }
-p += cbit_length;
-
-/* Finally, the character type table. In this, we used to exclude VT from the
-white space chars, because Perl didn't recognize it as such for \s and for
-comments within regexes. However, Perl changed at release 5.18, so PCRE changed
-at release 8.34. */
-
-for (i = 0; i < 256; i++)
-  {
-  int x = 0;
-  if (isspace(i)) x += ctype_space;
-  if (isalpha(i)) x += ctype_letter;
-  if (isdigit(i)) x += ctype_digit;
-  if (isxdigit(i)) x += ctype_xdigit;
-  if (isalnum(i) || i == '_') x += ctype_word;
-
-  /* Note: strchr includes the terminating zero in the characters it considers.
-  In this instance, that is ok because we want binary zero to be flagged as a
-  meta-character, which in this sense is any character that terminates a run
-  of data characters. */
-
-  if (strchr("\\*+?{^.$|()[", i) != 0) x += ctype_meta;
-  *p++ = x;
-  }
-
-return yield;
-}
-
-/* End of pcre_maketables.c */
diff --git a/src/extra/pcre/pcre_newline.c b/src/extra/pcre/pcre_newline.c
deleted file mode 100644
index b8f5a4d..0000000
--- a/src/extra/pcre/pcre_newline.c
+++ /dev/null
@@ -1,210 +0,0 @@
-/*************************************************
-*      Perl-Compatible Regular Expressions       *
-*************************************************/
-
-/* PCRE is a library of functions to support regular expressions whose syntax
-and semantics are as close as possible to those of the Perl 5 language.
-
-                       Written by Philip Hazel
-           Copyright (c) 1997-2012 University of Cambridge
-
------------------------------------------------------------------------------
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are met:
-
-    * Redistributions of source code must retain the above copyright notice,
-      this list of conditions and the following disclaimer.
-
-    * Redistributions in binary form must reproduce the above copyright
-      notice, this list of conditions and the following disclaimer in the
-      documentation and/or other materials provided with the distribution.
-
-    * Neither the name of the University of Cambridge nor the names of its
-      contributors may be used to endorse or promote products derived from
-      this software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
-LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-POSSIBILITY OF SUCH DAMAGE.
------------------------------------------------------------------------------
-*/
-
-
-/* This module contains internal functions for testing newlines when more than
-one kind of newline is to be recognized. When a newline is found, its length is
-returned. In principle, we could implement several newline "types", each
-referring to a different set of newline characters. At present, PCRE supports
-only NLTYPE_FIXED, which gets handled without these functions, NLTYPE_ANYCRLF,
-and NLTYPE_ANY. The full list of Unicode newline characters is taken from
-http://unicode.org/unicode/reports/tr18/. */
-
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include "pcre_internal.h"
-
-
-
-/*************************************************
-*      Check for newline at given position       *
-*************************************************/
-
-/* It is guaranteed that the initial value of ptr is less than the end of the
-string that is being processed.
-
-Arguments:
-  ptr          pointer to possible newline
-  type         the newline type
-  endptr       pointer to the end of the string
-  lenptr       where to return the length
-  utf          TRUE if in utf mode
-
-Returns:       TRUE or FALSE
-*/
-
-BOOL
-PRIV(is_newline)(PCRE_PUCHAR ptr, int type, PCRE_PUCHAR endptr, int *lenptr,
-  BOOL utf)
-{
-pcre_uint32 c;
-(void)utf;
-#ifdef SUPPORT_UTF
-if (utf)
-  {
-  GETCHAR(c, ptr);
-  }
-else
-#endif  /* SUPPORT_UTF */
-  c = *ptr;
-
-/* Note that this function is called only for ANY or ANYCRLF. */
-
-if (type == NLTYPE_ANYCRLF) switch(c)
-  {
-  case CHAR_LF: *lenptr = 1; return TRUE;
-  case CHAR_CR: *lenptr = (ptr < endptr - 1 && ptr[1] == CHAR_LF)? 2 : 1;
-               return TRUE;
-  default: return FALSE;
-  }
-
-/* NLTYPE_ANY */
-
-else switch(c)
-  {
-#ifdef EBCDIC
-  case CHAR_NEL:
-#endif
-  case CHAR_LF:
-  case CHAR_VT:
-  case CHAR_FF: *lenptr = 1; return TRUE;
-
-  case CHAR_CR:
-  *lenptr = (ptr < endptr - 1 && ptr[1] == CHAR_LF)? 2 : 1;
-  return TRUE;
-
-#ifndef EBCDIC
-#ifdef COMPILE_PCRE8
-  case CHAR_NEL: *lenptr = utf? 2 : 1; return TRUE;
-  case 0x2028:                                       /* LS */
-  case 0x2029: *lenptr = 3; return TRUE;             /* PS */
-#else /* COMPILE_PCRE16 || COMPILE_PCRE32 */
-  case CHAR_NEL:
-  case 0x2028:                                       /* LS */
-  case 0x2029: *lenptr = 1; return TRUE;             /* PS */
-#endif  /* COMPILE_PCRE8 */
-#endif  /* Not EBCDIC */
-
-  default: return FALSE;
-  }
-}
-
-
-
-/*************************************************
-*     Check for newline at previous position     *
-*************************************************/
-
-/* It is guaranteed that the initial value of ptr is greater than the start of
-the string that is being processed.
-
-Arguments:
-  ptr          pointer to possible newline
-  type         the newline type
-  startptr     pointer to the start of the string
-  lenptr       where to return the length
-  utf          TRUE if in utf mode
-
-Returns:       TRUE or FALSE
-*/
-
-BOOL
-PRIV(was_newline)(PCRE_PUCHAR ptr, int type, PCRE_PUCHAR startptr, int *lenptr,
-  BOOL utf)
-{
-pcre_uint32 c;
-(void)utf;
-ptr--;
-#ifdef SUPPORT_UTF
-if (utf)
-  {
-  BACKCHAR(ptr);
-  GETCHAR(c, ptr);
-  }
-else
-#endif  /* SUPPORT_UTF */
-  c = *ptr;
-
-/* Note that this function is called only for ANY or ANYCRLF. */
-
-if (type == NLTYPE_ANYCRLF) switch(c)
-  {
-  case CHAR_LF:
-  *lenptr = (ptr > startptr && ptr[-1] == CHAR_CR)? 2 : 1;
-  return TRUE;
-
-  case CHAR_CR: *lenptr = 1; return TRUE;
-  default: return FALSE;
-  }
-
-/* NLTYPE_ANY */
-
-else switch(c)
-  {
-  case CHAR_LF:
-  *lenptr = (ptr > startptr && ptr[-1] == CHAR_CR)? 2 : 1;
-  return TRUE;
-
-#ifdef EBCDIC
-  case CHAR_NEL:
-#endif
-  case CHAR_VT:
-  case CHAR_FF:
-  case CHAR_CR: *lenptr = 1; return TRUE;
-
-#ifndef EBCDIC
-#ifdef COMPILE_PCRE8
-  case CHAR_NEL: *lenptr = utf? 2 : 1; return TRUE;
-  case 0x2028:                                       /* LS */
-  case 0x2029: *lenptr = 3; return TRUE;             /* PS */
-#else /* COMPILE_PCRE16 || COMPILE_PCRE32 */
-  case CHAR_NEL:
-  case 0x2028:                                       /* LS */
-  case 0x2029: *lenptr = 1; return TRUE;             /* PS */
-#endif  /* COMPILE_PCRE8 */
-#endif  /* NotEBCDIC */
-
-  default: return FALSE;
-  }
-}
-
-/* End of pcre_newline.c */
diff --git a/src/extra/pcre/pcre_ord2utf8.c b/src/extra/pcre/pcre_ord2utf8.c
deleted file mode 100644
index 95f1beb..0000000
--- a/src/extra/pcre/pcre_ord2utf8.c
+++ /dev/null
@@ -1,94 +0,0 @@
-/*************************************************
-*      Perl-Compatible Regular Expressions       *
-*************************************************/
-
-/* PCRE is a library of functions to support regular expressions whose syntax
-and semantics are as close as possible to those of the Perl 5 language.
-
-                       Written by Philip Hazel
-           Copyright (c) 1997-2012 University of Cambridge
-
------------------------------------------------------------------------------
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are met:
-
-    * Redistributions of source code must retain the above copyright notice,
-      this list of conditions and the following disclaimer.
-
-    * Redistributions in binary form must reproduce the above copyright
-      notice, this list of conditions and the following disclaimer in the
-      documentation and/or other materials provided with the distribution.
-
-    * Neither the name of the University of Cambridge nor the names of its
-      contributors may be used to endorse or promote products derived from
-      this software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
-LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-POSSIBILITY OF SUCH DAMAGE.
------------------------------------------------------------------------------
-*/
-
-
-/* This file contains a private PCRE function that converts an ordinal
-character value into a UTF8 string. */
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#define COMPILE_PCRE8
-
-#include "pcre_internal.h"
-
-/*************************************************
-*       Convert character value to UTF-8         *
-*************************************************/
-
-/* This function takes an integer value in the range 0 - 0x10ffff
-and encodes it as a UTF-8 character in 1 to 4 pcre_uchars.
-
-Arguments:
-  cvalue     the character value
-  buffer     pointer to buffer for result - at least 6 pcre_uchars long
-
-Returns:     number of characters placed in the buffer
-*/
-
-unsigned
-int
-PRIV(ord2utf)(pcre_uint32 cvalue, pcre_uchar *buffer)
-{
-#ifdef SUPPORT_UTF
-
-register int i, j;
-
-for (i = 0; i < PRIV(utf8_table1_size); i++)
-  if ((int)cvalue <= PRIV(utf8_table1)[i]) break;
-buffer += i;
-for (j = i; j > 0; j--)
- {
- *buffer-- = 0x80 | (cvalue & 0x3f);
- cvalue >>= 6;
- }
-*buffer = PRIV(utf8_table2)[i] | cvalue;
-return i + 1;
-
-#else
-
-(void)(cvalue);  /* Keep compiler happy; this function won't ever be */
-(void)(buffer);  /* called when SUPPORT_UTF is not defined. */
-return 0;
-
-#endif
-}
-
-/* End of pcre_ord2utf8.c */
diff --git a/src/extra/pcre/pcre_refcount.c b/src/extra/pcre/pcre_refcount.c
deleted file mode 100644
index 79efa90..0000000
--- a/src/extra/pcre/pcre_refcount.c
+++ /dev/null
@@ -1,92 +0,0 @@
-/*************************************************
-*      Perl-Compatible Regular Expressions       *
-*************************************************/
-
-/* PCRE is a library of functions to support regular expressions whose syntax
-and semantics are as close as possible to those of the Perl 5 language.
-
-                       Written by Philip Hazel
-           Copyright (c) 1997-2012 University of Cambridge
-
------------------------------------------------------------------------------
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are met:
-
-    * Redistributions of source code must retain the above copyright notice,
-      this list of conditions and the following disclaimer.
-
-    * Redistributions in binary form must reproduce the above copyright
-      notice, this list of conditions and the following disclaimer in the
-      documentation and/or other materials provided with the distribution.
-
-    * Neither the name of the University of Cambridge nor the names of its
-      contributors may be used to endorse or promote products derived from
-      this software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
-LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-POSSIBILITY OF SUCH DAMAGE.
------------------------------------------------------------------------------
-*/
-
-
-/* This module contains the external function pcre_refcount(), which is an
-auxiliary function that can be used to maintain a reference count in a compiled
-pattern data block. This might be helpful in applications where the block is
-shared by different users. */
-
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include "pcre_internal.h"
-
-
-/*************************************************
-*           Maintain reference count             *
-*************************************************/
-
-/* The reference count is a 16-bit field, initialized to zero. It is not
-possible to transfer a non-zero count from one host to a different host that
-has a different byte order - though I can't see why anyone in their right mind
-would ever want to do that!
-
-Arguments:
-  argument_re   points to compiled code
-  adjust        value to add to the count
-
-Returns:        the (possibly updated) count value (a non-negative number), or
-                a negative error number
-*/
-
-#if defined COMPILE_PCRE8
-PCRE_EXP_DEFN int PCRE_CALL_CONVENTION
-pcre_refcount(pcre *argument_re, int adjust)
-#elif defined COMPILE_PCRE16
-PCRE_EXP_DEFN int PCRE_CALL_CONVENTION
-pcre16_refcount(pcre16 *argument_re, int adjust)
-#elif defined COMPILE_PCRE32
-PCRE_EXP_DEFN int PCRE_CALL_CONVENTION
-pcre32_refcount(pcre32 *argument_re, int adjust)
-#endif
-{
-REAL_PCRE *re = (REAL_PCRE *)argument_re;
-if (re == NULL) return PCRE_ERROR_NULL;
-if (re->magic_number != MAGIC_NUMBER) return PCRE_ERROR_BADMAGIC;
-if ((re->flags & PCRE_MODE) == 0) return PCRE_ERROR_BADMODE;
-re->ref_count = (-adjust > re->ref_count)? 0 :
-                (adjust + re->ref_count > 65535)? 65535 :
-                re->ref_count + adjust;
-return re->ref_count;
-}
-
-/* End of pcre_refcount.c */
diff --git a/src/extra/pcre/pcre_study.c b/src/extra/pcre/pcre_study.c
deleted file mode 100644
index ab9510e..0000000
--- a/src/extra/pcre/pcre_study.c
+++ /dev/null
@@ -1,1626 +0,0 @@
-/*************************************************
-*      Perl-Compatible Regular Expressions       *
-*************************************************/
-
-/* PCRE is a library of functions to support regular expressions whose syntax
-and semantics are as close as possible to those of the Perl 5 language.
-
-                       Written by Philip Hazel
-           Copyright (c) 1997-2012 University of Cambridge
-
------------------------------------------------------------------------------
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are met:
-
-    * Redistributions of source code must retain the above copyright notice,
-      this list of conditions and the following disclaimer.
-
-    * Redistributions in binary form must reproduce the above copyright
-      notice, this list of conditions and the following disclaimer in the
-      documentation and/or other materials provided with the distribution.
-
-    * Neither the name of the University of Cambridge nor the names of its
-      contributors may be used to endorse or promote products derived from
-      this software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
-LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-POSSIBILITY OF SUCH DAMAGE.
------------------------------------------------------------------------------
-*/
-
-
-/* This module contains the external function pcre_study(), along with local
-supporting functions. */
-
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include "pcre_internal.h"
-
-#define SET_BIT(c) start_bits[c/8] |= (1 << (c&7))
-
-/* Returns from set_start_bits() */
-
-enum { SSB_FAIL, SSB_DONE, SSB_CONTINUE, SSB_UNKNOWN };
-
-
-
-/*************************************************
-*   Find the minimum subject length for a group  *
-*************************************************/
-
-/* Scan a parenthesized group and compute the minimum length of subject that
-is needed to match it. This is a lower bound; it does not mean there is a
-string of that length that matches. In UTF8 mode, the result is in characters
-rather than bytes.
-
-Arguments:
-  re              compiled pattern block
-  code            pointer to start of group (the bracket)
-  startcode       pointer to start of the whole pattern's code
-  options         the compiling options
-  int             RECURSE depth
-
-Returns:   the minimum length
-           -1 if \C in UTF-8 mode or (*ACCEPT) was encountered
-           -2 internal error (missing capturing bracket)
-           -3 internal error (opcode not listed)
-*/
-
-static int
-find_minlength(const REAL_PCRE *re, const pcre_uchar *code,
-  const pcre_uchar *startcode, int options, int recurse_depth)
-{
-int length = -1;
-/* PCRE_UTF16 has the same value as PCRE_UTF8. */
-BOOL utf = (options & PCRE_UTF8) != 0;
-BOOL had_recurse = FALSE;
-register int branchlength = 0;
-register pcre_uchar *cc = (pcre_uchar *)code + 1 + LINK_SIZE;
-
-if (*code == OP_CBRA || *code == OP_SCBRA ||
-    *code == OP_CBRAPOS || *code == OP_SCBRAPOS) cc += IMM2_SIZE;
-
-/* Scan along the opcodes for this branch. If we get to the end of the
-branch, check the length against that of the other branches. */
-
-for (;;)
-  {
-  int d, min;
-  pcre_uchar *cs, *ce;
-  register pcre_uchar op = *cc;
-
-  switch (op)
-    {
-    case OP_COND:
-    case OP_SCOND:
-
-    /* If there is only one branch in a condition, the implied branch has zero
-    length, so we don't add anything. This covers the DEFINE "condition"
-    automatically. */
-
-    cs = cc + GET(cc, 1);
-    if (*cs != OP_ALT)
-      {
-      cc = cs + 1 + LINK_SIZE;
-      break;
-      }
-
-    /* Otherwise we can fall through and treat it the same as any other
-    subpattern. */
-
-    case OP_CBRA:
-    case OP_SCBRA:
-    case OP_BRA:
-    case OP_SBRA:
-    case OP_CBRAPOS:
-    case OP_SCBRAPOS:
-    case OP_BRAPOS:
-    case OP_SBRAPOS:
-    case OP_ONCE:
-    case OP_ONCE_NC:
-    d = find_minlength(re, cc, startcode, options, recurse_depth);
-    if (d < 0) return d;
-    branchlength += d;
-    do cc += GET(cc, 1); while (*cc == OP_ALT);
-    cc += 1 + LINK_SIZE;
-    break;
-
-    /* ACCEPT makes things far too complicated; we have to give up. */
-
-    case OP_ACCEPT:
-    case OP_ASSERT_ACCEPT:
-    return -1;
-
-    /* Reached end of a branch; if it's a ket it is the end of a nested
-    call. If it's ALT it is an alternation in a nested call. If it is END it's
-    the end of the outer call. All can be handled by the same code. If an
-    ACCEPT was previously encountered, use the length that was in force at that
-    time, and pass back the shortest ACCEPT length. */
-
-    case OP_ALT:
-    case OP_KET:
-    case OP_KETRMAX:
-    case OP_KETRMIN:
-    case OP_KETRPOS:
-    case OP_END:
-    if (length < 0 || (!had_recurse && branchlength < length))
-      length = branchlength;
-    if (op != OP_ALT) return length;
-    cc += 1 + LINK_SIZE;
-    branchlength = 0;
-    had_recurse = FALSE;
-    break;
-
-    /* Skip over assertive subpatterns */
-
-    case OP_ASSERT:
-    case OP_ASSERT_NOT:
-    case OP_ASSERTBACK:
-    case OP_ASSERTBACK_NOT:
-    do cc += GET(cc, 1); while (*cc == OP_ALT);
-    /* Fall through */
-
-    /* Skip over things that don't match chars */
-
-    case OP_REVERSE:
-    case OP_CREF:
-    case OP_DNCREF:
-    case OP_RREF:
-    case OP_DNRREF:
-    case OP_DEF:
-    case OP_CALLOUT:
-    case OP_SOD:
-    case OP_SOM:
-    case OP_EOD:
-    case OP_EODN:
-    case OP_CIRC:
-    case OP_CIRCM:
-    case OP_DOLL:
-    case OP_DOLLM:
-    case OP_NOT_WORD_BOUNDARY:
-    case OP_WORD_BOUNDARY:
-    cc += PRIV(OP_lengths)[*cc];
-    break;
-
-    /* Skip over a subpattern that has a {0} or {0,x} quantifier */
-
-    case OP_BRAZERO:
-    case OP_BRAMINZERO:
-    case OP_BRAPOSZERO:
-    case OP_SKIPZERO:
-    cc += PRIV(OP_lengths)[*cc];
-    do cc += GET(cc, 1); while (*cc == OP_ALT);
-    cc += 1 + LINK_SIZE;
-    break;
-
-    /* Handle literal characters and + repetitions */
-
-    case OP_CHAR:
-    case OP_CHARI:
-    case OP_NOT:
-    case OP_NOTI:
-    case OP_PLUS:
-    case OP_PLUSI:
-    case OP_MINPLUS:
-    case OP_MINPLUSI:
-    case OP_POSPLUS:
-    case OP_POSPLUSI:
-    case OP_NOTPLUS:
-    case OP_NOTPLUSI:
-    case OP_NOTMINPLUS:
-    case OP_NOTMINPLUSI:
-    case OP_NOTPOSPLUS:
-    case OP_NOTPOSPLUSI:
-    branchlength++;
-    cc += 2;
-#ifdef SUPPORT_UTF
-    if (utf && HAS_EXTRALEN(cc[-1])) cc += GET_EXTRALEN(cc[-1]);
-#endif
-    break;
-
-    case OP_TYPEPLUS:
-    case OP_TYPEMINPLUS:
-    case OP_TYPEPOSPLUS:
-    branchlength++;
-    cc += (cc[1] == OP_PROP || cc[1] == OP_NOTPROP)? 4 : 2;
-    break;
-
-    /* Handle exact repetitions. The count is already in characters, but we
-    need to skip over a multibyte character in UTF8 mode.  */
-
-    case OP_EXACT:
-    case OP_EXACTI:
-    case OP_NOTEXACT:
-    case OP_NOTEXACTI:
-    branchlength += GET2(cc,1);
-    cc += 2 + IMM2_SIZE;
-#ifdef SUPPORT_UTF
-    if (utf && HAS_EXTRALEN(cc[-1])) cc += GET_EXTRALEN(cc[-1]);
-#endif
-    break;
-
-    case OP_TYPEEXACT:
-    branchlength += GET2(cc,1);
-    cc += 2 + IMM2_SIZE + ((cc[1 + IMM2_SIZE] == OP_PROP
-      || cc[1 + IMM2_SIZE] == OP_NOTPROP)? 2 : 0);
-    break;
-
-    /* Handle single-char non-literal matchers */
-
-    case OP_PROP:
-    case OP_NOTPROP:
-    cc += 2;
-    /* Fall through */
-
-    case OP_NOT_DIGIT:
-    case OP_DIGIT:
-    case OP_NOT_WHITESPACE:
-    case OP_WHITESPACE:
-    case OP_NOT_WORDCHAR:
-    case OP_WORDCHAR:
-    case OP_ANY:
-    case OP_ALLANY:
-    case OP_EXTUNI:
-    case OP_HSPACE:
-    case OP_NOT_HSPACE:
-    case OP_VSPACE:
-    case OP_NOT_VSPACE:
-    branchlength++;
-    cc++;
-    break;
-
-    /* "Any newline" might match two characters, but it also might match just
-    one. */
-
-    case OP_ANYNL:
-    branchlength += 1;
-    cc++;
-    break;
-
-    /* The single-byte matcher means we can't proceed in UTF-8 mode. (In
-    non-UTF-8 mode \C will actually be turned into OP_ALLANY, so won't ever
-    appear, but leave the code, just in case.) */
-
-    case OP_ANYBYTE:
-#ifdef SUPPORT_UTF
-    if (utf) return -1;
-#endif
-    branchlength++;
-    cc++;
-    break;
-
-    /* For repeated character types, we have to test for \p and \P, which have
-    an extra two bytes of parameters. */
-
-    case OP_TYPESTAR:
-    case OP_TYPEMINSTAR:
-    case OP_TYPEQUERY:
-    case OP_TYPEMINQUERY:
-    case OP_TYPEPOSSTAR:
-    case OP_TYPEPOSQUERY:
-    if (cc[1] == OP_PROP || cc[1] == OP_NOTPROP) cc += 2;
-    cc += PRIV(OP_lengths)[op];
-    break;
-
-    case OP_TYPEUPTO:
-    case OP_TYPEMINUPTO:
-    case OP_TYPEPOSUPTO:
-    if (cc[1 + IMM2_SIZE] == OP_PROP
-      || cc[1 + IMM2_SIZE] == OP_NOTPROP) cc += 2;
-    cc += PRIV(OP_lengths)[op];
-    break;
-
-    /* Check a class for variable quantification */
-
-    case OP_CLASS:
-    case OP_NCLASS:
-#if defined SUPPORT_UTF || defined COMPILE_PCRE16 || defined COMPILE_PCRE32
-    case OP_XCLASS:
-    /* The original code caused an unsigned overflow in 64 bit systems,
-    so now we use a conditional statement. */
-    if (op == OP_XCLASS)
-      cc += GET(cc, 1);
-    else
-      cc += PRIV(OP_lengths)[OP_CLASS];
-#else
-    cc += PRIV(OP_lengths)[OP_CLASS];
-#endif
-
-    switch (*cc)
-      {
-      case OP_CRPLUS:
-      case OP_CRMINPLUS:
-      case OP_CRPOSPLUS:
-      branchlength++;
-      /* Fall through */
-
-      case OP_CRSTAR:
-      case OP_CRMINSTAR:
-      case OP_CRQUERY:
-      case OP_CRMINQUERY:
-      case OP_CRPOSSTAR:
-      case OP_CRPOSQUERY:
-      cc++;
-      break;
-
-      case OP_CRRANGE:
-      case OP_CRMINRANGE:
-      case OP_CRPOSRANGE:
-      branchlength += GET2(cc,1);
-      cc += 1 + 2 * IMM2_SIZE;
-      break;
-
-      default:
-      branchlength++;
-      break;
-      }
-    break;
-
-    /* Backreferences and subroutine calls are treated in the same way: we find
-    the minimum length for the subpattern. A recursion, however, causes an
-    a flag to be set that causes the length of this branch to be ignored. The
-    logic is that a recursion can only make sense if there is another
-    alternation that stops the recursing. That will provide the minimum length
-    (when no recursion happens). A backreference within the group that it is
-    referencing behaves in the same way.
-
-    If PCRE_JAVASCRIPT_COMPAT is set, a backreference to an unset bracket
-    matches an empty string (by default it causes a matching failure), so in
-    that case we must set the minimum length to zero. */
-
-    case OP_DNREF:     /* Duplicate named pattern back reference */
-    case OP_DNREFI:
-    if ((options & PCRE_JAVASCRIPT_COMPAT) == 0)
-      {
-      int count = GET2(cc, 1+IMM2_SIZE);
-      pcre_uchar *slot = (pcre_uchar *)re +
-        re->name_table_offset + GET2(cc, 1) * re->name_entry_size;
-      d = INT_MAX;
-      while (count-- > 0)
-        {
-        ce = cs = (pcre_uchar *)PRIV(find_bracket)(startcode, utf, GET2(slot, 0));
-        if (cs == NULL) return -2;
-        do ce += GET(ce, 1); while (*ce == OP_ALT);
-        if (cc > cs && cc < ce)
-          {
-          d = 0;
-          had_recurse = TRUE;
-          break;
-          }
-        else
-          {
-          int dd = find_minlength(re, cs, startcode, options, recurse_depth);
-          if (dd < d) d = dd;
-          }
-        slot += re->name_entry_size;
-        }
-      }
-    else d = 0;
-    cc += 1 + 2*IMM2_SIZE;
-    goto REPEAT_BACK_REFERENCE;
-
-    case OP_REF:      /* Single back reference */
-    case OP_REFI:
-    if ((options & PCRE_JAVASCRIPT_COMPAT) == 0)
-      {
-      ce = cs = (pcre_uchar *)PRIV(find_bracket)(startcode, utf, GET2(cc, 1));
-      if (cs == NULL) return -2;
-      do ce += GET(ce, 1); while (*ce == OP_ALT);
-      if (cc > cs && cc < ce)
-        {
-        d = 0;
-        had_recurse = TRUE;
-        }
-      else
-        {
-        d = find_minlength(re, cs, startcode, options, recurse_depth);
-        }
-      }
-    else d = 0;
-    cc += 1 + IMM2_SIZE;
-
-    /* Handle repeated back references */
-
-    REPEAT_BACK_REFERENCE:
-    switch (*cc)
-      {
-      case OP_CRSTAR:
-      case OP_CRMINSTAR:
-      case OP_CRQUERY:
-      case OP_CRMINQUERY:
-      case OP_CRPOSSTAR:
-      case OP_CRPOSQUERY:
-      min = 0;
-      cc++;
-      break;
-
-      case OP_CRPLUS:
-      case OP_CRMINPLUS:
-      case OP_CRPOSPLUS:
-      min = 1;
-      cc++;
-      break;
-
-      case OP_CRRANGE:
-      case OP_CRMINRANGE:
-      case OP_CRPOSRANGE:
-      min = GET2(cc, 1);
-      cc += 1 + 2 * IMM2_SIZE;
-      break;
-
-      default:
-      min = 1;
-      break;
-      }
-
-    branchlength += min * d;
-    break;
-
-    /* We can easily detect direct recursion, but not mutual recursion. This is
-    caught by a recursion depth count. */
-
-    case OP_RECURSE:
-    cs = ce = (pcre_uchar *)startcode + GET(cc, 1);
-    do ce += GET(ce, 1); while (*ce == OP_ALT);
-    if ((cc > cs && cc < ce) || recurse_depth > 10)
-      had_recurse = TRUE;
-    else
-      {
-      branchlength += find_minlength(re, cs, startcode, options,
-        recurse_depth + 1);
-      }
-    cc += 1 + LINK_SIZE;
-    break;
-
-    /* Anything else does not or need not match a character. We can get the
-    item's length from the table, but for those that can match zero occurrences
-    of a character, we must take special action for UTF-8 characters. As it
-    happens, the "NOT" versions of these opcodes are used at present only for
-    ASCII characters, so they could be omitted from this list. However, in
-    future that may change, so we include them here so as not to leave a
-    gotcha for a future maintainer. */
-
-    case OP_UPTO:
-    case OP_UPTOI:
-    case OP_NOTUPTO:
-    case OP_NOTUPTOI:
-    case OP_MINUPTO:
-    case OP_MINUPTOI:
-    case OP_NOTMINUPTO:
-    case OP_NOTMINUPTOI:
-    case OP_POSUPTO:
-    case OP_POSUPTOI:
-    case OP_NOTPOSUPTO:
-    case OP_NOTPOSUPTOI:
-
-    case OP_STAR:
-    case OP_STARI:
-    case OP_NOTSTAR:
-    case OP_NOTSTARI:
-    case OP_MINSTAR:
-    case OP_MINSTARI:
-    case OP_NOTMINSTAR:
-    case OP_NOTMINSTARI:
-    case OP_POSSTAR:
-    case OP_POSSTARI:
-    case OP_NOTPOSSTAR:
-    case OP_NOTPOSSTARI:
-
-    case OP_QUERY:
-    case OP_QUERYI:
-    case OP_NOTQUERY:
-    case OP_NOTQUERYI:
-    case OP_MINQUERY:
-    case OP_MINQUERYI:
-    case OP_NOTMINQUERY:
-    case OP_NOTMINQUERYI:
-    case OP_POSQUERY:
-    case OP_POSQUERYI:
-    case OP_NOTPOSQUERY:
-    case OP_NOTPOSQUERYI:
-
-    cc += PRIV(OP_lengths)[op];
-#ifdef SUPPORT_UTF
-    if (utf && HAS_EXTRALEN(cc[-1])) cc += GET_EXTRALEN(cc[-1]);
-#endif
-    break;
-
-    /* Skip these, but we need to add in the name length. */
-
-    case OP_MARK:
-    case OP_PRUNE_ARG:
-    case OP_SKIP_ARG:
-    case OP_THEN_ARG:
-    cc += PRIV(OP_lengths)[op] + cc[1];
-    break;
-
-    /* The remaining opcodes are just skipped over. */
-
-    case OP_CLOSE:
-    case OP_COMMIT:
-    case OP_FAIL:
-    case OP_PRUNE:
-    case OP_SET_SOM:
-    case OP_SKIP:
-    case OP_THEN:
-    cc += PRIV(OP_lengths)[op];
-    break;
-
-    /* This should not occur: we list all opcodes explicitly so that when
-    new ones get added they are properly considered. */
-
-    default:
-    return -3;
-    }
-  }
-/* Control never gets here */
-}
-
-
-
-/*************************************************
-*      Set a bit and maybe its alternate case    *
-*************************************************/
-
-/* Given a character, set its first byte's bit in the table, and also the
-corresponding bit for the other version of a letter if we are caseless. In
-UTF-8 mode, for characters greater than 127, we can only do the caseless thing
-when Unicode property support is available.
-
-Arguments:
-  start_bits    points to the bit map
-  p             points to the character
-  caseless      the caseless flag
-  cd            the block with char table pointers
-  utf           TRUE for UTF-8 / UTF-16 / UTF-32 mode
-
-Returns:        pointer after the character
-*/
-
-static const pcre_uchar *
-set_table_bit(pcre_uint8 *start_bits, const pcre_uchar *p, BOOL caseless,
-  compile_data *cd, BOOL utf)
-{
-pcre_uint32 c = *p;
-
-#ifdef COMPILE_PCRE8
-SET_BIT(c);
-
-#ifdef SUPPORT_UTF
-if (utf && c > 127)
-  {
-  GETCHARINC(c, p);
-#ifdef SUPPORT_UCP
-  if (caseless)
-    {
-    pcre_uchar buff[6];
-    c = UCD_OTHERCASE(c);
-    (void)PRIV(ord2utf)(c, buff);
-    SET_BIT(buff[0]);
-    }
-#endif  /* Not SUPPORT_UCP */
-  return p;
-  }
-#else   /* Not SUPPORT_UTF */
-(void)(utf);   /* Stops warning for unused parameter */
-#endif  /* SUPPORT_UTF */
-
-/* Not UTF-8 mode, or character is less than 127. */
-
-if (caseless && (cd->ctypes[c] & ctype_letter) != 0) SET_BIT(cd->fcc[c]);
-return p + 1;
-#endif  /* COMPILE_PCRE8 */
-
-#if defined COMPILE_PCRE16 || defined COMPILE_PCRE32
-if (c > 0xff)
-  {
-  c = 0xff;
-  caseless = FALSE;
-  }
-SET_BIT(c);
-
-#ifdef SUPPORT_UTF
-if (utf && c > 127)
-  {
-  GETCHARINC(c, p);
-#ifdef SUPPORT_UCP
-  if (caseless)
-    {
-    c = UCD_OTHERCASE(c);
-    if (c > 0xff)
-      c = 0xff;
-    SET_BIT(c);
-    }
-#endif  /* SUPPORT_UCP */
-  return p;
-  }
-#else   /* Not SUPPORT_UTF */
-(void)(utf);   /* Stops warning for unused parameter */
-#endif  /* SUPPORT_UTF */
-
-if (caseless && (cd->ctypes[c] & ctype_letter) != 0) SET_BIT(cd->fcc[c]);
-return p + 1;
-#endif
-}
-
-
-
-/*************************************************
-*     Set bits for a positive character type     *
-*************************************************/
-
-/* This function sets starting bits for a character type. In UTF-8 mode, we can
-only do a direct setting for bytes less than 128, as otherwise there can be
-confusion with bytes in the middle of UTF-8 characters. In a "traditional"
-environment, the tables will only recognize ASCII characters anyway, but in at
-least one Windows environment, some higher bytes bits were set in the tables.
-So we deal with that case by considering the UTF-8 encoding.
-
-Arguments:
-  start_bits     the starting bitmap
-  cbit type      the type of character wanted
-  table_limit    32 for non-UTF-8; 16 for UTF-8
-  cd             the block with char table pointers
-
-Returns:         nothing
-*/
-
-static void
-set_type_bits(pcre_uint8 *start_bits, int cbit_type, unsigned int table_limit,
-  compile_data *cd)
-{
-register pcre_uint32 c;
-for (c = 0; c < table_limit; c++) start_bits[c] |= cd->cbits[c+cbit_type];
-#if defined SUPPORT_UTF && defined COMPILE_PCRE8
-if (table_limit == 32) return;
-for (c = 128; c < 256; c++)
-  {
-  if ((cd->cbits[c/8] & (1 << (c&7))) != 0)
-    {
-    pcre_uchar buff[6];
-    (void)PRIV(ord2utf)(c, buff);
-    SET_BIT(buff[0]);
-    }
-  }
-#endif
-}
-
-
-/*************************************************
-*     Set bits for a negative character type     *
-*************************************************/
-
-/* This function sets starting bits for a negative character type such as \D.
-In UTF-8 mode, we can only do a direct setting for bytes less than 128, as
-otherwise there can be confusion with bytes in the middle of UTF-8 characters.
-Unlike in the positive case, where we can set appropriate starting bits for
-specific high-valued UTF-8 characters, in this case we have to set the bits for
-all high-valued characters. The lowest is 0xc2, but we overkill by starting at
-0xc0 (192) for simplicity.
-
-Arguments:
-  start_bits     the starting bitmap
-  cbit type      the type of character wanted
-  table_limit    32 for non-UTF-8; 16 for UTF-8
-  cd             the block with char table pointers
-
-Returns:         nothing
-*/
-
-static void
-set_nottype_bits(pcre_uint8 *start_bits, int cbit_type, unsigned int table_limit,
-  compile_data *cd)
-{
-register pcre_uint32 c;
-for (c = 0; c < table_limit; c++) start_bits[c] |= ~cd->cbits[c+cbit_type];
-#if defined SUPPORT_UTF && defined COMPILE_PCRE8
-if (table_limit != 32) for (c = 24; c < 32; c++) start_bits[c] = 0xff;
-#endif
-}
-
-
-
-/*************************************************
-*          Create bitmap of starting bytes       *
-*************************************************/
-
-/* This function scans a compiled unanchored expression recursively and
-attempts to build a bitmap of the set of possible starting bytes. As time goes
-by, we may be able to get more clever at doing this. The SSB_CONTINUE return is
-useful for parenthesized groups in patterns such as (a*)b where the group
-provides some optional starting bytes but scanning must continue at the outer
-level to find at least one mandatory byte. At the outermost level, this
-function fails unless the result is SSB_DONE.
-
-Arguments:
-  code         points to an expression
-  start_bits   points to a 32-byte table, initialized to 0
-  utf          TRUE if in UTF-8 / UTF-16 / UTF-32 mode
-  cd           the block with char table pointers
-
-Returns:       SSB_FAIL     => Failed to find any starting bytes
-               SSB_DONE     => Found mandatory starting bytes
-               SSB_CONTINUE => Found optional starting bytes
-               SSB_UNKNOWN  => Hit an unrecognized opcode
-*/
-
-static int
-set_start_bits(const pcre_uchar *code, pcre_uint8 *start_bits, BOOL utf,
-  compile_data *cd)
-{
-register pcre_uint32 c;
-int yield = SSB_DONE;
-#if defined SUPPORT_UTF && defined COMPILE_PCRE8
-int table_limit = utf? 16:32;
-#else
-int table_limit = 32;
-#endif
-
-#if 0
-/* ========================================================================= */
-/* The following comment and code was inserted in January 1999. In May 2006,
-when it was observed to cause compiler warnings about unused values, I took it
-out again. If anybody is still using OS/2, they will have to put it back
-manually. */
-
-/* This next statement and the later reference to dummy are here in order to
-trick the optimizer of the IBM C compiler for OS/2 into generating correct
-code. Apparently IBM isn't going to fix the problem, and we would rather not
-disable optimization (in this module it actually makes a big difference, and
-the pcre module can use all the optimization it can get). */
-
-volatile int dummy;
-/* ========================================================================= */
-#endif
-
-do
-  {
-  BOOL try_next = TRUE;
-  const pcre_uchar *tcode = code + 1 + LINK_SIZE;
-
-  if (*code == OP_CBRA || *code == OP_SCBRA ||
-      *code == OP_CBRAPOS || *code == OP_SCBRAPOS) tcode += IMM2_SIZE;
-
-  while (try_next)    /* Loop for items in this branch */
-    {
-    int rc;
-
-    switch(*tcode)
-      {
-      /* If we reach something we don't understand, it means a new opcode has
-      been created that hasn't been added to this code. Hopefully this problem
-      will be discovered during testing. */
-
-      default:
-      return SSB_UNKNOWN;
-
-      /* Fail for a valid opcode that implies no starting bits. */
-
-      case OP_ACCEPT:
-      case OP_ASSERT_ACCEPT:
-      case OP_ALLANY:
-      case OP_ANY:
-      case OP_ANYBYTE:
-      case OP_CIRC:
-      case OP_CIRCM:
-      case OP_CLOSE:
-      case OP_COMMIT:
-      case OP_COND:
-      case OP_CREF:
-      case OP_DEF:
-      case OP_DNCREF:
-      case OP_DNREF:
-      case OP_DNREFI:
-      case OP_DNRREF:
-      case OP_DOLL:
-      case OP_DOLLM:
-      case OP_END:
-      case OP_EOD:
-      case OP_EODN:
-      case OP_EXTUNI:
-      case OP_FAIL:
-      case OP_MARK:
-      case OP_NOT:
-      case OP_NOTEXACT:
-      case OP_NOTEXACTI:
-      case OP_NOTI:
-      case OP_NOTMINPLUS:
-      case OP_NOTMINPLUSI:
-      case OP_NOTMINQUERY:
-      case OP_NOTMINQUERYI:
-      case OP_NOTMINSTAR:
-      case OP_NOTMINSTARI:
-      case OP_NOTMINUPTO:
-      case OP_NOTMINUPTOI:
-      case OP_NOTPLUS:
-      case OP_NOTPLUSI:
-      case OP_NOTPOSPLUS:
-      case OP_NOTPOSPLUSI:
-      case OP_NOTPOSQUERY:
-      case OP_NOTPOSQUERYI:
-      case OP_NOTPOSSTAR:
-      case OP_NOTPOSSTARI:
-      case OP_NOTPOSUPTO:
-      case OP_NOTPOSUPTOI:
-      case OP_NOTPROP:
-      case OP_NOTQUERY:
-      case OP_NOTQUERYI:
-      case OP_NOTSTAR:
-      case OP_NOTSTARI:
-      case OP_NOTUPTO:
-      case OP_NOTUPTOI:
-      case OP_NOT_HSPACE:
-      case OP_NOT_VSPACE:
-      case OP_PROP:
-      case OP_PRUNE:
-      case OP_PRUNE_ARG:
-      case OP_RECURSE:
-      case OP_REF:
-      case OP_REFI:
-      case OP_REVERSE:
-      case OP_RREF:
-      case OP_SCOND:
-      case OP_SET_SOM:
-      case OP_SKIP:
-      case OP_SKIP_ARG:
-      case OP_SOD:
-      case OP_SOM:
-      case OP_THEN:
-      case OP_THEN_ARG:
-      return SSB_FAIL;
-
-      /* We can ignore word boundary tests. */
-
-      case OP_WORD_BOUNDARY:
-      case OP_NOT_WORD_BOUNDARY:
-      tcode++;
-      break;
-
-      /* If we hit a bracket or a positive lookahead assertion, recurse to set
-      bits from within the subpattern. If it can't find anything, we have to
-      give up. If it finds some mandatory character(s), we are done for this
-      branch. Otherwise, carry on scanning after the subpattern. */
-
-      case OP_BRA:
-      case OP_SBRA:
-      case OP_CBRA:
-      case OP_SCBRA:
-      case OP_BRAPOS:
-      case OP_SBRAPOS:
-      case OP_CBRAPOS:
-      case OP_SCBRAPOS:
-      case OP_ONCE:
-      case OP_ONCE_NC:
-      case OP_ASSERT:
-      rc = set_start_bits(tcode, start_bits, utf, cd);
-      if (rc == SSB_FAIL || rc == SSB_UNKNOWN) return rc;
-      if (rc == SSB_DONE) try_next = FALSE; else
-        {
-        do tcode += GET(tcode, 1); while (*tcode == OP_ALT);
-        tcode += 1 + LINK_SIZE;
-        }
-      break;
-
-      /* If we hit ALT or KET, it means we haven't found anything mandatory in
-      this branch, though we might have found something optional. For ALT, we
-      continue with the next alternative, but we have to arrange that the final
-      result from subpattern is SSB_CONTINUE rather than SSB_DONE. For KET,
-      return SSB_CONTINUE: if this is the top level, that indicates failure,
-      but after a nested subpattern, it causes scanning to continue. */
-
-      case OP_ALT:
-      yield = SSB_CONTINUE;
-      try_next = FALSE;
-      break;
-
-      case OP_KET:
-      case OP_KETRMAX:
-      case OP_KETRMIN:
-      case OP_KETRPOS:
-      return SSB_CONTINUE;
-
-      /* Skip over callout */
-
-      case OP_CALLOUT:
-      tcode += 2 + 2*LINK_SIZE;
-      break;
-
-      /* Skip over lookbehind and negative lookahead assertions */
-
-      case OP_ASSERT_NOT:
-      case OP_ASSERTBACK:
-      case OP_ASSERTBACK_NOT:
-      do tcode += GET(tcode, 1); while (*tcode == OP_ALT);
-      tcode += 1 + LINK_SIZE;
-      break;
-
-      /* BRAZERO does the bracket, but carries on. */
-
-      case OP_BRAZERO:
-      case OP_BRAMINZERO:
-      case OP_BRAPOSZERO:
-      rc = set_start_bits(++tcode, start_bits, utf, cd);
-      if (rc == SSB_FAIL || rc == SSB_UNKNOWN) return rc;
-/* =========================================================================
-      See the comment at the head of this function concerning the next line,
-      which was an old fudge for the benefit of OS/2.
-      dummy = 1;
-  ========================================================================= */
-      do tcode += GET(tcode,1); while (*tcode == OP_ALT);
-      tcode += 1 + LINK_SIZE;
-      break;
-
-      /* SKIPZERO skips the bracket. */
-
-      case OP_SKIPZERO:
-      tcode++;
-      do tcode += GET(tcode,1); while (*tcode == OP_ALT);
-      tcode += 1 + LINK_SIZE;
-      break;
-
-      /* Single-char * or ? sets the bit and tries the next item */
-
-      case OP_STAR:
-      case OP_MINSTAR:
-      case OP_POSSTAR:
-      case OP_QUERY:
-      case OP_MINQUERY:
-      case OP_POSQUERY:
-      tcode = set_table_bit(start_bits, tcode + 1, FALSE, cd, utf);
-      break;
-
-      case OP_STARI:
-      case OP_MINSTARI:
-      case OP_POSSTARI:
-      case OP_QUERYI:
-      case OP_MINQUERYI:
-      case OP_POSQUERYI:
-      tcode = set_table_bit(start_bits, tcode + 1, TRUE, cd, utf);
-      break;
-
-      /* Single-char upto sets the bit and tries the next */
-
-      case OP_UPTO:
-      case OP_MINUPTO:
-      case OP_POSUPTO:
-      tcode = set_table_bit(start_bits, tcode + 1 + IMM2_SIZE, FALSE, cd, utf);
-      break;
-
-      case OP_UPTOI:
-      case OP_MINUPTOI:
-      case OP_POSUPTOI:
-      tcode = set_table_bit(start_bits, tcode + 1 + IMM2_SIZE, TRUE, cd, utf);
-      break;
-
-      /* At least one single char sets the bit and stops */
-
-      case OP_EXACT:
-      tcode += IMM2_SIZE;
-      /* Fall through */
-      case OP_CHAR:
-      case OP_PLUS:
-      case OP_MINPLUS:
-      case OP_POSPLUS:
-      (void)set_table_bit(start_bits, tcode + 1, FALSE, cd, utf);
-      try_next = FALSE;
-      break;
-
-      case OP_EXACTI:
-      tcode += IMM2_SIZE;
-      /* Fall through */
-      case OP_CHARI:
-      case OP_PLUSI:
-      case OP_MINPLUSI:
-      case OP_POSPLUSI:
-      (void)set_table_bit(start_bits, tcode + 1, TRUE, cd, utf);
-      try_next = FALSE;
-      break;
-
-      /* Special spacing and line-terminating items. These recognize specific
-      lists of characters. The difference between VSPACE and ANYNL is that the
-      latter can match the two-character CRLF sequence, but that is not
-      relevant for finding the first character, so their code here is
-      identical. */
-
-      case OP_HSPACE:
-      SET_BIT(CHAR_HT);
-      SET_BIT(CHAR_SPACE);
-#ifdef SUPPORT_UTF
-      if (utf)
-        {
-#ifdef COMPILE_PCRE8
-        SET_BIT(0xC2);  /* For U+00A0 */
-        SET_BIT(0xE1);  /* For U+1680, U+180E */
-        SET_BIT(0xE2);  /* For U+2000 - U+200A, U+202F, U+205F */
-        SET_BIT(0xE3);  /* For U+3000 */
-#elif defined COMPILE_PCRE16 || defined COMPILE_PCRE32
-        SET_BIT(0xA0);
-        SET_BIT(0xFF);  /* For characters > 255 */
-#endif  /* COMPILE_PCRE[8|16|32] */
-        }
-      else
-#endif /* SUPPORT_UTF */
-        {
-#ifndef EBCDIC
-        SET_BIT(0xA0);
-#endif  /* Not EBCDIC */
-#if defined COMPILE_PCRE16 || defined COMPILE_PCRE32
-        SET_BIT(0xFF);  /* For characters > 255 */
-#endif  /* COMPILE_PCRE[16|32] */
-        }
-      try_next = FALSE;
-      break;
-
-      case OP_ANYNL:
-      case OP_VSPACE:
-      SET_BIT(CHAR_LF);
-      SET_BIT(CHAR_VT);
-      SET_BIT(CHAR_FF);
-      SET_BIT(CHAR_CR);
-#ifdef SUPPORT_UTF
-      if (utf)
-        {
-#ifdef COMPILE_PCRE8
-        SET_BIT(0xC2);  /* For U+0085 */
-        SET_BIT(0xE2);  /* For U+2028, U+2029 */
-#elif defined COMPILE_PCRE16 || defined COMPILE_PCRE32
-        SET_BIT(CHAR_NEL);
-        SET_BIT(0xFF);  /* For characters > 255 */
-#endif  /* COMPILE_PCRE[8|16|32] */
-        }
-      else
-#endif /* SUPPORT_UTF */
-        {
-        SET_BIT(CHAR_NEL);
-#if defined COMPILE_PCRE16 || defined COMPILE_PCRE32
-        SET_BIT(0xFF);  /* For characters > 255 */
-#endif
-        }
-      try_next = FALSE;
-      break;
-
-      /* Single character types set the bits and stop. Note that if PCRE_UCP
-      is set, we do not see these op codes because \d etc are converted to
-      properties. Therefore, these apply in the case when only characters less
-      than 256 are recognized to match the types. */
-
-      case OP_NOT_DIGIT:
-      set_nottype_bits(start_bits, cbit_digit, table_limit, cd);
-      try_next = FALSE;
-      break;
-
-      case OP_DIGIT:
-      set_type_bits(start_bits, cbit_digit, table_limit, cd);
-      try_next = FALSE;
-      break;
-
-      /* The cbit_space table has vertical tab as whitespace; we have to
-      ensure it is set as not whitespace. Luckily, the code value is the same
-      (0x0b) in ASCII and EBCDIC, so we can just adjust the appropriate bit. */
-
-      case OP_NOT_WHITESPACE:
-      set_nottype_bits(start_bits, cbit_space, table_limit, cd);
-      start_bits[1] |= 0x08;
-      try_next = FALSE;
-      break;
-
-      /* The cbit_space table has vertical tab as whitespace; we have to not
-      set it from the table. Luckily, the code value is the same (0x0b) in
-      ASCII and EBCDIC, so we can just adjust the appropriate bit. */
-
-      case OP_WHITESPACE:
-      c = start_bits[1];    /* Save in case it was already set */
-      set_type_bits(start_bits, cbit_space, table_limit, cd);
-      start_bits[1] = (start_bits[1] & ~0x08) | c;
-      try_next = FALSE;
-      break;
-
-      case OP_NOT_WORDCHAR:
-      set_nottype_bits(start_bits, cbit_word, table_limit, cd);
-      try_next = FALSE;
-      break;
-
-      case OP_WORDCHAR:
-      set_type_bits(start_bits, cbit_word, table_limit, cd);
-      try_next = FALSE;
-      break;
-
-      /* One or more character type fudges the pointer and restarts, knowing
-      it will hit a single character type and stop there. */
-
-      case OP_TYPEPLUS:
-      case OP_TYPEMINPLUS:
-      case OP_TYPEPOSPLUS:
-      tcode++;
-      break;
-
-      case OP_TYPEEXACT:
-      tcode += 1 + IMM2_SIZE;
-      break;
-
-      /* Zero or more repeats of character types set the bits and then
-      try again. */
-
-      case OP_TYPEUPTO:
-      case OP_TYPEMINUPTO:
-      case OP_TYPEPOSUPTO:
-      tcode += IMM2_SIZE;  /* Fall through */
-
-      case OP_TYPESTAR:
-      case OP_TYPEMINSTAR:
-      case OP_TYPEPOSSTAR:
-      case OP_TYPEQUERY:
-      case OP_TYPEMINQUERY:
-      case OP_TYPEPOSQUERY:
-      switch(tcode[1])
-        {
-        default:
-        case OP_ANY:
-        case OP_ALLANY:
-        return SSB_FAIL;
-
-        case OP_HSPACE:
-        SET_BIT(CHAR_HT);
-        SET_BIT(CHAR_SPACE);
-#ifdef SUPPORT_UTF
-        if (utf)
-          {
-#ifdef COMPILE_PCRE8
-          SET_BIT(0xC2);  /* For U+00A0 */
-          SET_BIT(0xE1);  /* For U+1680, U+180E */
-          SET_BIT(0xE2);  /* For U+2000 - U+200A, U+202F, U+205F */
-          SET_BIT(0xE3);  /* For U+3000 */
-#elif defined COMPILE_PCRE16 || defined COMPILE_PCRE32
-          SET_BIT(0xA0);
-          SET_BIT(0xFF);  /* For characters > 255 */
-#endif  /* COMPILE_PCRE[8|16|32] */
-          }
-        else
-#endif /* SUPPORT_UTF */
-#ifndef EBCDIC
-          SET_BIT(0xA0);
-#endif  /* Not EBCDIC */
-        break;
-
-        case OP_ANYNL:
-        case OP_VSPACE:
-        SET_BIT(CHAR_LF);
-        SET_BIT(CHAR_VT);
-        SET_BIT(CHAR_FF);
-        SET_BIT(CHAR_CR);
-#ifdef SUPPORT_UTF
-        if (utf)
-          {
-#ifdef COMPILE_PCRE8
-          SET_BIT(0xC2);  /* For U+0085 */
-          SET_BIT(0xE2);  /* For U+2028, U+2029 */
-#elif defined COMPILE_PCRE16 || defined COMPILE_PCRE32
-          SET_BIT(CHAR_NEL);
-          SET_BIT(0xFF);  /* For characters > 255 */
-#endif  /* COMPILE_PCRE16 */
-          }
-        else
-#endif /* SUPPORT_UTF */
-          SET_BIT(CHAR_NEL);
-        break;
-
-        case OP_NOT_DIGIT:
-        set_nottype_bits(start_bits, cbit_digit, table_limit, cd);
-        break;
-
-        case OP_DIGIT:
-        set_type_bits(start_bits, cbit_digit, table_limit, cd);
-        break;
-
-        /* The cbit_space table has vertical tab as whitespace; we no longer
-        have to play fancy tricks because Perl added VT to its whitespace at
-        release 5.18. PCRE added it at release 8.34. */
-
-        case OP_NOT_WHITESPACE:
-        set_nottype_bits(start_bits, cbit_space, table_limit, cd);
-        break;
-
-        case OP_WHITESPACE:
-        set_type_bits(start_bits, cbit_space, table_limit, cd);
-        break;
-
-        case OP_NOT_WORDCHAR:
-        set_nottype_bits(start_bits, cbit_word, table_limit, cd);
-        break;
-
-        case OP_WORDCHAR:
-        set_type_bits(start_bits, cbit_word, table_limit, cd);
-        break;
-        }
-
-      tcode += 2;
-      break;
-
-      /* Character class where all the information is in a bit map: set the
-      bits and either carry on or not, according to the repeat count. If it was
-      a negative class, and we are operating with UTF-8 characters, any byte
-      with a value >= 0xc4 is a potentially valid starter because it starts a
-      character with a value > 255. */
-
-#if defined SUPPORT_UTF || !defined COMPILE_PCRE8
-      case OP_XCLASS:
-      if ((tcode[1 + LINK_SIZE] & XCL_HASPROP) != 0)
-        return SSB_FAIL;
-      /* All bits are set. */
-      if ((tcode[1 + LINK_SIZE] & XCL_MAP) == 0 && (tcode[1 + LINK_SIZE] & XCL_NOT) != 0)
-        return SSB_FAIL;
-#endif
-      /* Fall through */
-
-      case OP_NCLASS:
-#if defined SUPPORT_UTF && defined COMPILE_PCRE8
-      if (utf)
-        {
-        start_bits[24] |= 0xf0;              /* Bits for 0xc4 - 0xc8 */
-        memset(start_bits+25, 0xff, 7);      /* Bits for 0xc9 - 0xff */
-        }
-#endif
-#if defined COMPILE_PCRE16 || defined COMPILE_PCRE32
-      SET_BIT(0xFF);                         /* For characters > 255 */
-#endif
-      /* Fall through */
-
-      case OP_CLASS:
-        {
-        pcre_uint8 *map;
-#if defined SUPPORT_UTF || !defined COMPILE_PCRE8
-        map = NULL;
-        if (*tcode == OP_XCLASS)
-          {
-          if ((tcode[1 + LINK_SIZE] & XCL_MAP) != 0)
-            map = (pcre_uint8 *)(tcode + 1 + LINK_SIZE + 1);
-          tcode += GET(tcode, 1);
-          }
-        else
-#endif
-          {
-          tcode++;
-          map = (pcre_uint8 *)tcode;
-          tcode += 32 / sizeof(pcre_uchar);
-          }
-
-        /* In UTF-8 mode, the bits in a bit map correspond to character
-        values, not to byte values. However, the bit map we are constructing is
-        for byte values. So we have to do a conversion for characters whose
-        value is > 127. In fact, there are only two possible starting bytes for
-        characters in the range 128 - 255. */
-
-#if defined SUPPORT_UTF || !defined COMPILE_PCRE8
-        if (map != NULL)
-#endif
-          {
-#if defined SUPPORT_UTF && defined COMPILE_PCRE8
-          if (utf)
-            {
-            for (c = 0; c < 16; c++) start_bits[c] |= map[c];
-            for (c = 128; c < 256; c++)
-              {
-              if ((map[c/8] && (1 << (c&7))) != 0)
-                {
-                int d = (c >> 6) | 0xc0;            /* Set bit for this starter */
-                start_bits[d/8] |= (1 << (d&7));    /* and then skip on to the */
-                c = (c & 0xc0) + 0x40 - 1;          /* next relevant character. */
-                }
-              }
-            }
-          else
-#endif
-            {
-            /* In non-UTF-8 mode, the two bit maps are completely compatible. */
-            for (c = 0; c < 32; c++) start_bits[c] |= map[c];
-            }
-          }
-
-        /* Advance past the bit map, and act on what follows. For a zero
-        minimum repeat, continue; otherwise stop processing. */
-
-        switch (*tcode)
-          {
-          case OP_CRSTAR:
-          case OP_CRMINSTAR:
-          case OP_CRQUERY:
-          case OP_CRMINQUERY:
-          case OP_CRPOSSTAR:
-          case OP_CRPOSQUERY:
-          tcode++;
-          break;
-
-          case OP_CRRANGE:
-          case OP_CRMINRANGE:
-          case OP_CRPOSRANGE:
-          if (GET2(tcode, 1) == 0) tcode += 1 + 2 * IMM2_SIZE;
-            else try_next = FALSE;
-          break;
-
-          default:
-          try_next = FALSE;
-          break;
-          }
-        }
-      break; /* End of bitmap class handling */
-
-      }      /* End of switch */
-    }        /* End of try_next loop */
-
-  code += GET(code, 1);   /* Advance to next branch */
-  }
-while (*code == OP_ALT);
-return yield;
-}
-
-
-
-
-
-/*************************************************
-*          Study a compiled expression           *
-*************************************************/
-
-/* This function is handed a compiled expression that it must study to produce
-information that will speed up the matching. It returns a pcre[16]_extra block
-which then gets handed back to pcre_exec().
-
-Arguments:
-  re        points to the compiled expression
-  options   contains option bits
-  errorptr  points to where to place error messages;
-            set NULL unless error
-
-Returns:    pointer to a pcre[16]_extra block, with study_data filled in and
-              the appropriate flags set;
-            NULL on error or if no optimization possible
-*/
-
-#if defined COMPILE_PCRE8
-PCRE_EXP_DEFN pcre_extra * PCRE_CALL_CONVENTION
-pcre_study(const pcre *external_re, int options, const char **errorptr)
-#elif defined COMPILE_PCRE16
-PCRE_EXP_DEFN pcre16_extra * PCRE_CALL_CONVENTION
-pcre16_study(const pcre16 *external_re, int options, const char **errorptr)
-#elif defined COMPILE_PCRE32
-PCRE_EXP_DEFN pcre32_extra * PCRE_CALL_CONVENTION
-pcre32_study(const pcre32 *external_re, int options, const char **errorptr)
-#endif
-{
-int min;
-BOOL bits_set = FALSE;
-pcre_uint8 start_bits[32];
-PUBL(extra) *extra = NULL;
-pcre_study_data *study;
-const pcre_uint8 *tables;
-pcre_uchar *code;
-compile_data compile_block;
-const REAL_PCRE *re = (const REAL_PCRE *)external_re;
-
-
-*errorptr = NULL;
-
-if (re == NULL || re->magic_number != MAGIC_NUMBER)
-  {
-  *errorptr = "argument is not a compiled regular expression";
-  return NULL;
-  }
-
-if ((re->flags & PCRE_MODE) == 0)
-  {
-#if defined COMPILE_PCRE8
-  *errorptr = "argument not compiled in 8 bit mode";
-#elif defined COMPILE_PCRE16
-  *errorptr = "argument not compiled in 16 bit mode";
-#elif defined COMPILE_PCRE32
-  *errorptr = "argument not compiled in 32 bit mode";
-#endif
-  return NULL;
-  }
-
-if ((options & ~PUBLIC_STUDY_OPTIONS) != 0)
-  {
-  *errorptr = "unknown or incorrect option bit(s) set";
-  return NULL;
-  }
-
-code = (pcre_uchar *)re + re->name_table_offset +
-  (re->name_count * re->name_entry_size);
-
-/* For an anchored pattern, or an unanchored pattern that has a first char, or
-a multiline pattern that matches only at "line starts", there is no point in
-seeking a list of starting bytes. */
-
-if ((re->options & PCRE_ANCHORED) == 0 &&
-    (re->flags & (PCRE_FIRSTSET|PCRE_STARTLINE)) == 0)
-  {
-  int rc;
-
-  /* Set the character tables in the block that is passed around */
-
-  tables = re->tables;
-
-#if defined COMPILE_PCRE8
-  if (tables == NULL)
-    (void)pcre_fullinfo(external_re, NULL, PCRE_INFO_DEFAULT_TABLES,
-    (void *)(&tables));
-#elif defined COMPILE_PCRE16
-  if (tables == NULL)
-    (void)pcre16_fullinfo(external_re, NULL, PCRE_INFO_DEFAULT_TABLES,
-    (void *)(&tables));
-#elif defined COMPILE_PCRE32
-  if (tables == NULL)
-    (void)pcre32_fullinfo(external_re, NULL, PCRE_INFO_DEFAULT_TABLES,
-    (void *)(&tables));
-#endif
-
-  compile_block.lcc = tables + lcc_offset;
-  compile_block.fcc = tables + fcc_offset;
-  compile_block.cbits = tables + cbits_offset;
-  compile_block.ctypes = tables + ctypes_offset;
-
-  /* See if we can find a fixed set of initial characters for the pattern. */
-
-  memset(start_bits, 0, 32 * sizeof(pcre_uint8));
-  rc = set_start_bits(code, start_bits, (re->options & PCRE_UTF8) != 0,
-    &compile_block);
-  bits_set = rc == SSB_DONE;
-  if (rc == SSB_UNKNOWN)
-    {
-    *errorptr = "internal error: opcode not recognized";
-    return NULL;
-    }
-  }
-
-/* Find the minimum length of subject string. */
-
-switch(min = find_minlength(re, code, code, re->options, 0))
-  {
-  case -2: *errorptr = "internal error: missing capturing bracket"; return NULL;
-  case -3: *errorptr = "internal error: opcode not recognized"; return NULL;
-  default: break;
-  }
-
-/* If a set of starting bytes has been identified, or if the minimum length is
-greater than zero, or if JIT optimization has been requested, or if
-PCRE_STUDY_EXTRA_NEEDED is set, get a pcre[16]_extra block and a
-pcre_study_data block. The study data is put in the latter, which is pointed to
-by the former, which may also get additional data set later by the calling
-program. At the moment, the size of pcre_study_data is fixed. We nevertheless
-save it in a field for returning via the pcre_fullinfo() function so that if it
-becomes variable in the future, we don't have to change that code. */
-
-if (bits_set || min > 0 || (options & (
-#ifdef SUPPORT_JIT
-    PCRE_STUDY_JIT_COMPILE | PCRE_STUDY_JIT_PARTIAL_SOFT_COMPILE |
-    PCRE_STUDY_JIT_PARTIAL_HARD_COMPILE |
-#endif
-    PCRE_STUDY_EXTRA_NEEDED)) != 0)
-  {
-  extra = (PUBL(extra) *)(PUBL(malloc))
-    (sizeof(PUBL(extra)) + sizeof(pcre_study_data));
-  if (extra == NULL)
-    {
-    *errorptr = "failed to get memory";
-    return NULL;
-    }
-
-  study = (pcre_study_data *)((char *)extra + sizeof(PUBL(extra)));
-  extra->flags = PCRE_EXTRA_STUDY_DATA;
-  extra->study_data = study;
-
-  study->size = sizeof(pcre_study_data);
-  study->flags = 0;
-
-  /* Set the start bits always, to avoid unset memory errors if the
-  study data is written to a file, but set the flag only if any of the bits
-  are set, to save time looking when none are. */
-
-  if (bits_set)
-    {
-    study->flags |= PCRE_STUDY_MAPPED;
-    memcpy(study->start_bits, start_bits, sizeof(start_bits));
-    }
-  else memset(study->start_bits, 0, 32 * sizeof(pcre_uint8));
-
-#ifdef PCRE_DEBUG
-  if (bits_set)
-    {
-    pcre_uint8 *ptr = start_bits;
-    int i;
-
-    printf("Start bits:\n");
-    for (i = 0; i < 32; i++)
-      printf("%3d: %02x%s", i * 8, *ptr++, ((i + 1) & 0x7) != 0? " " : "\n");
-    }
-#endif
-
-  /* Always set the minlength value in the block, because the JIT compiler
-  makes use of it. However, don't set the bit unless the length is greater than
-  zero - the interpretive pcre_exec() and pcre_dfa_exec() needn't waste time
-  checking the zero case. */
-
-  if (min > 0)
-    {
-    study->flags |= PCRE_STUDY_MINLEN;
-    study->minlength = min;
-    }
-  else study->minlength = 0;
-
-  /* If JIT support was compiled and requested, attempt the JIT compilation.
-  If no starting bytes were found, and the minimum length is zero, and JIT
-  compilation fails, abandon the extra block and return NULL, unless
-  PCRE_STUDY_EXTRA_NEEDED is set. */
-
-#ifdef SUPPORT_JIT
-  extra->executable_jit = NULL;
-  if ((options & PCRE_STUDY_JIT_COMPILE) != 0)
-    PRIV(jit_compile)(re, extra, JIT_COMPILE);
-  if ((options & PCRE_STUDY_JIT_PARTIAL_SOFT_COMPILE) != 0)
-    PRIV(jit_compile)(re, extra, JIT_PARTIAL_SOFT_COMPILE);
-  if ((options & PCRE_STUDY_JIT_PARTIAL_HARD_COMPILE) != 0)
-    PRIV(jit_compile)(re, extra, JIT_PARTIAL_HARD_COMPILE);
-
-  if (study->flags == 0 && (extra->flags & PCRE_EXTRA_EXECUTABLE_JIT) == 0 &&
-      (options & PCRE_STUDY_EXTRA_NEEDED) == 0)
-    {
-#if defined COMPILE_PCRE8
-    pcre_free_study(extra);
-#elif defined COMPILE_PCRE16
-    pcre16_free_study(extra);
-#elif defined COMPILE_PCRE32
-    pcre32_free_study(extra);
-#endif
-    extra = NULL;
-    }
-#endif
-  }
-
-return extra;
-}
-
-
-/*************************************************
-*          Free the study data                   *
-*************************************************/
-
-/* This function frees the memory that was obtained by pcre_study().
-
-Argument:   a pointer to the pcre[16]_extra block
-Returns:    nothing
-*/
-
-#if defined COMPILE_PCRE8
-PCRE_EXP_DEFN void
-pcre_free_study(pcre_extra *extra)
-#elif defined COMPILE_PCRE16
-PCRE_EXP_DEFN void
-pcre16_free_study(pcre16_extra *extra)
-#elif defined COMPILE_PCRE32
-PCRE_EXP_DEFN void
-pcre32_free_study(pcre32_extra *extra)
-#endif
-{
-if (extra == NULL)
-  return;
-#ifdef SUPPORT_JIT
-if ((extra->flags & PCRE_EXTRA_EXECUTABLE_JIT) != 0 &&
-     extra->executable_jit != NULL)
-  PRIV(jit_free)(extra->executable_jit);
-#endif
-PUBL(free)(extra);
-}
-
-/* End of pcre_study.c */
diff --git a/src/extra/pcre/pcre_tables.c b/src/extra/pcre/pcre_tables.c
deleted file mode 100644
index f38ab52..0000000
--- a/src/extra/pcre/pcre_tables.c
+++ /dev/null
@@ -1,658 +0,0 @@
-/*************************************************
-*      Perl-Compatible Regular Expressions       *
-*************************************************/
-
-/* PCRE is a library of functions to support regular expressions whose syntax
-and semantics are as close as possible to those of the Perl 5 language.
-
-                       Written by Philip Hazel
-           Copyright (c) 1997-2012 University of Cambridge
-
------------------------------------------------------------------------------
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are met:
-
-    * Redistributions of source code must retain the above copyright notice,
-      this list of conditions and the following disclaimer.
-
-    * Redistributions in binary form must reproduce the above copyright
-      notice, this list of conditions and the following disclaimer in the
-      documentation and/or other materials provided with the distribution.
-
-    * Neither the name of the University of Cambridge nor the names of its
-      contributors may be used to endorse or promote products derived from
-      this software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
-LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-POSSIBILITY OF SUCH DAMAGE.
------------------------------------------------------------------------------
-*/
-
-#ifndef PCRE_INCLUDED
-
-/* This module contains some fixed tables that are used by more than one of the
-PCRE code modules. The tables are also #included by the pcretest program, which
-uses macros to change their names from _pcre_xxx to xxxx, thereby avoiding name
-clashes with the library. */
-
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include "pcre_internal.h"
-
-#endif /* PCRE_INCLUDED */
-
-/* Table of sizes for the fixed-length opcodes. It's defined in a macro so that
-the definition is next to the definition of the opcodes in pcre_internal.h. */
-
-const pcre_uint8 PRIV(OP_lengths)[] = { OP_LENGTHS };
-
-/* Tables of horizontal and vertical whitespace characters, suitable for
-adding to classes. */
-
-const pcre_uint32 PRIV(hspace_list)[] = { HSPACE_LIST };
-const pcre_uint32 PRIV(vspace_list)[] = { VSPACE_LIST };
-
-
-
-/*************************************************
-*           Tables for UTF-8 support             *
-*************************************************/
-
-/* These are the breakpoints for different numbers of bytes in a UTF-8
-character. */
-
-#if (defined SUPPORT_UTF && defined COMPILE_PCRE8) \
-  || (defined PCRE_INCLUDED && (defined SUPPORT_PCRE16 || defined SUPPORT_PCRE32))
-
-/* These tables are also required by pcretest in 16- or 32-bit mode. */
-
-const int PRIV(utf8_table1)[] =
-  { 0x7f, 0x7ff, 0xffff, 0x1fffff, 0x3ffffff, 0x7fffffff};
-
-const int PRIV(utf8_table1_size) = sizeof(PRIV(utf8_table1)) / sizeof(int);
-
-/* These are the indicator bits and the mask for the data bits to set in the
-first byte of a character, indexed by the number of additional bytes. */
-
-const int PRIV(utf8_table2)[] = { 0,    0xc0, 0xe0, 0xf0, 0xf8, 0xfc};
-const int PRIV(utf8_table3)[] = { 0xff, 0x1f, 0x0f, 0x07, 0x03, 0x01};
-
-/* Table of the number of extra bytes, indexed by the first byte masked with
-0x3f. The highest number for a valid UTF-8 first byte is in fact 0x3d. */
-
-const pcre_uint8 PRIV(utf8_table4)[] = {
-  1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
-  1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
-  2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,
-  3,3,3,3,3,3,3,3,4,4,4,4,5,5,5,5 };
-
-#endif /* (SUPPORT_UTF && COMPILE_PCRE8) || (PCRE_INCLUDED && SUPPORT_PCRE[16|32])*/
-
-#ifdef SUPPORT_UTF
-
-/* Table to translate from particular type value to the general value. */
-
-const pcre_uint32 PRIV(ucp_gentype)[] = {
-  ucp_C, ucp_C, ucp_C, ucp_C, ucp_C,  /* Cc, Cf, Cn, Co, Cs */
-  ucp_L, ucp_L, ucp_L, ucp_L, ucp_L,  /* Ll, Lu, Lm, Lo, Lt */
-  ucp_M, ucp_M, ucp_M,                /* Mc, Me, Mn */
-  ucp_N, ucp_N, ucp_N,                /* Nd, Nl, No */
-  ucp_P, ucp_P, ucp_P, ucp_P, ucp_P,  /* Pc, Pd, Pe, Pf, Pi */
-  ucp_P, ucp_P,                       /* Ps, Po */
-  ucp_S, ucp_S, ucp_S, ucp_S,         /* Sc, Sk, Sm, So */
-  ucp_Z, ucp_Z, ucp_Z                 /* Zl, Zp, Zs */
-};
-
-/* This table encodes the rules for finding the end of an extended grapheme
-cluster. Every code point has a grapheme break property which is one of the
-ucp_gbXX values defined in ucp.h. The 2-dimensional table is indexed by the
-properties of two adjacent code points. The left property selects a word from
-the table, and the right property selects a bit from that word like this:
-
-  ucp_gbtable[left-property] & (1 << right-property)
-
-The value is non-zero if a grapheme break is NOT permitted between the relevant
-two code points. The breaking rules are as follows:
-
-1. Break at the start and end of text (pretty obviously).
-
-2. Do not break between a CR and LF; otherwise, break before and   after
-   controls.
-
-3. Do not break Hangul syllable sequences, the rules for which are:
-
-    L may be followed by L, V, LV or LVT
-    LV or V may be followed by V or T
-    LVT or T may be followed by T
-
-4. Do not break before extending characters.
-
-The next two rules are only for extended grapheme clusters (but that's what we
-are implementing).
-
-5. Do not break before SpacingMarks.
-
-6. Do not break after Prepend characters.
-
-7. Otherwise, break everywhere.
-*/
-
-const pcre_uint32 PRIV(ucp_gbtable[]) = {
-   (1<<ucp_gbLF),                                           /*  0 CR */
-   0,                                                       /*  1 LF */
-   0,                                                       /*  2 Control */
-   (1<<ucp_gbExtend)|(1<<ucp_gbSpacingMark),                /*  3 Extend */
-   (1<<ucp_gbExtend)|(1<<ucp_gbPrepend)|                    /*  4 Prepend */
-     (1<<ucp_gbSpacingMark)|(1<<ucp_gbL)|
-     (1<<ucp_gbV)|(1<<ucp_gbT)|(1<<ucp_gbLV)|
-     (1<<ucp_gbLVT)|(1<<ucp_gbOther),
-
-   (1<<ucp_gbExtend)|(1<<ucp_gbSpacingMark),                /*  5 SpacingMark */
-   (1<<ucp_gbExtend)|(1<<ucp_gbSpacingMark)|(1<<ucp_gbL)|   /*  6 L */
-     (1<<ucp_gbL)|(1<<ucp_gbV)|(1<<ucp_gbLV)|(1<<ucp_gbLVT),
-
-   (1<<ucp_gbExtend)|(1<<ucp_gbSpacingMark)|(1<<ucp_gbV)|   /*  7 V */
-     (1<<ucp_gbT),
-
-   (1<<ucp_gbExtend)|(1<<ucp_gbSpacingMark)|(1<<ucp_gbT),   /*  8 T */
-   (1<<ucp_gbExtend)|(1<<ucp_gbSpacingMark)|(1<<ucp_gbV)|   /*  9 LV */
-     (1<<ucp_gbT),
-
-   (1<<ucp_gbExtend)|(1<<ucp_gbSpacingMark)|(1<<ucp_gbT),   /* 10 LVT */
-   (1<<ucp_gbRegionalIndicator),                            /* 11 RegionalIndicator */
-   (1<<ucp_gbExtend)|(1<<ucp_gbSpacingMark)                 /* 12 Other */
-};
-
-#ifdef SUPPORT_JIT
-/* This table reverses PRIV(ucp_gentype). We can save the cost
-of a memory load. */
-
-const int PRIV(ucp_typerange)[] = {
-  ucp_Cc, ucp_Cs,
-  ucp_Ll, ucp_Lu,
-  ucp_Mc, ucp_Mn,
-  ucp_Nd, ucp_No,
-  ucp_Pc, ucp_Ps,
-  ucp_Sc, ucp_So,
-  ucp_Zl, ucp_Zs,
-};
-#endif /* SUPPORT_JIT */
-
-/* The pcre_utt[] table below translates Unicode property names into type and
-code values. It is searched by binary chop, so must be in collating sequence of
-name. Originally, the table contained pointers to the name strings in the first
-field of each entry. However, that leads to a large number of relocations when
-a shared library is dynamically loaded. A significant reduction is made by
-putting all the names into a single, large string and then using offsets in the
-table itself. Maintenance is more error-prone, but frequent changes to this
-data are unlikely.
-
-July 2008: There is now a script called maint/GenerateUtt.py that can be used
-to generate this data automatically instead of maintaining it by hand.
-
-The script was updated in March 2009 to generate a new EBCDIC-compliant
-version. Like all other character and string literals that are compared against
-the regular expression pattern, we must use STR_ macros instead of literal
-strings to make sure that UTF-8 support works on EBCDIC platforms. */
-
-#define STRING_Any0 STR_A STR_n STR_y "\0"
-#define STRING_Arabic0 STR_A STR_r STR_a STR_b STR_i STR_c "\0"
-#define STRING_Armenian0 STR_A STR_r STR_m STR_e STR_n STR_i STR_a STR_n "\0"
-#define STRING_Avestan0 STR_A STR_v STR_e STR_s STR_t STR_a STR_n "\0"
-#define STRING_Balinese0 STR_B STR_a STR_l STR_i STR_n STR_e STR_s STR_e "\0"
-#define STRING_Bamum0 STR_B STR_a STR_m STR_u STR_m "\0"
-#define STRING_Batak0 STR_B STR_a STR_t STR_a STR_k "\0"
-#define STRING_Bengali0 STR_B STR_e STR_n STR_g STR_a STR_l STR_i "\0"
-#define STRING_Bopomofo0 STR_B STR_o STR_p STR_o STR_m STR_o STR_f STR_o "\0"
-#define STRING_Brahmi0 STR_B STR_r STR_a STR_h STR_m STR_i "\0"
-#define STRING_Braille0 STR_B STR_r STR_a STR_i STR_l STR_l STR_e "\0"
-#define STRING_Buginese0 STR_B STR_u STR_g STR_i STR_n STR_e STR_s STR_e "\0"
-#define STRING_Buhid0 STR_B STR_u STR_h STR_i STR_d "\0"
-#define STRING_C0 STR_C "\0"
-#define STRING_Canadian_Aboriginal0 STR_C STR_a STR_n STR_a STR_d STR_i STR_a STR_n STR_UNDERSCORE STR_A STR_b STR_o STR_r STR_i STR_g STR_i STR_n STR_a STR_l "\0"
-#define STRING_Carian0 STR_C STR_a STR_r STR_i STR_a STR_n "\0"
-#define STRING_Cc0 STR_C STR_c "\0"
-#define STRING_Cf0 STR_C STR_f "\0"
-#define STRING_Chakma0 STR_C STR_h STR_a STR_k STR_m STR_a "\0"
-#define STRING_Cham0 STR_C STR_h STR_a STR_m "\0"
-#define STRING_Cherokee0 STR_C STR_h STR_e STR_r STR_o STR_k STR_e STR_e "\0"
-#define STRING_Cn0 STR_C STR_n "\0"
-#define STRING_Co0 STR_C STR_o "\0"
-#define STRING_Common0 STR_C STR_o STR_m STR_m STR_o STR_n "\0"
-#define STRING_Coptic0 STR_C STR_o STR_p STR_t STR_i STR_c "\0"
-#define STRING_Cs0 STR_C STR_s "\0"
-#define STRING_Cuneiform0 STR_C STR_u STR_n STR_e STR_i STR_f STR_o STR_r STR_m "\0"
-#define STRING_Cypriot0 STR_C STR_y STR_p STR_r STR_i STR_o STR_t "\0"
-#define STRING_Cyrillic0 STR_C STR_y STR_r STR_i STR_l STR_l STR_i STR_c "\0"
-#define STRING_Deseret0 STR_D STR_e STR_s STR_e STR_r STR_e STR_t "\0"
-#define STRING_Devanagari0 STR_D STR_e STR_v STR_a STR_n STR_a STR_g STR_a STR_r STR_i "\0"
-#define STRING_Egyptian_Hieroglyphs0 STR_E STR_g STR_y STR_p STR_t STR_i STR_a STR_n STR_UNDERSCORE STR_H STR_i STR_e STR_r STR_o STR_g STR_l STR_y STR_p STR_h STR_s "\0"
-#define STRING_Ethiopic0 STR_E STR_t STR_h STR_i STR_o STR_p STR_i STR_c "\0"
-#define STRING_Georgian0 STR_G STR_e STR_o STR_r STR_g STR_i STR_a STR_n "\0"
-#define STRING_Glagolitic0 STR_G STR_l STR_a STR_g STR_o STR_l STR_i STR_t STR_i STR_c "\0"
-#define STRING_Gothic0 STR_G STR_o STR_t STR_h STR_i STR_c "\0"
-#define STRING_Greek0 STR_G STR_r STR_e STR_e STR_k "\0"
-#define STRING_Gujarati0 STR_G STR_u STR_j STR_a STR_r STR_a STR_t STR_i "\0"
-#define STRING_Gurmukhi0 STR_G STR_u STR_r STR_m STR_u STR_k STR_h STR_i "\0"
-#define STRING_Han0 STR_H STR_a STR_n "\0"
-#define STRING_Hangul0 STR_H STR_a STR_n STR_g STR_u STR_l "\0"
-#define STRING_Hanunoo0 STR_H STR_a STR_n STR_u STR_n STR_o STR_o "\0"
-#define STRING_Hebrew0 STR_H STR_e STR_b STR_r STR_e STR_w "\0"
-#define STRING_Hiragana0 STR_H STR_i STR_r STR_a STR_g STR_a STR_n STR_a "\0"
-#define STRING_Imperial_Aramaic0 STR_I STR_m STR_p STR_e STR_r STR_i STR_a STR_l STR_UNDERSCORE STR_A STR_r STR_a STR_m STR_a STR_i STR_c "\0"
-#define STRING_Inherited0 STR_I STR_n STR_h STR_e STR_r STR_i STR_t STR_e STR_d "\0"
-#define STRING_Inscriptional_Pahlavi0 STR_I STR_n STR_s STR_c STR_r STR_i STR_p STR_t STR_i STR_o STR_n STR_a STR_l STR_UNDERSCORE STR_P STR_a STR_h STR_l STR_a STR_v STR_i "\0"
-#define STRING_Inscriptional_Parthian0 STR_I STR_n STR_s STR_c STR_r STR_i STR_p STR_t STR_i STR_o STR_n STR_a STR_l STR_UNDERSCORE STR_P STR_a STR_r STR_t STR_h STR_i STR_a STR_n "\0"
-#define STRING_Javanese0 STR_J STR_a STR_v STR_a STR_n STR_e STR_s STR_e "\0"
-#define STRING_Kaithi0 STR_K STR_a STR_i STR_t STR_h STR_i "\0"
-#define STRING_Kannada0 STR_K STR_a STR_n STR_n STR_a STR_d STR_a "\0"
-#define STRING_Katakana0 STR_K STR_a STR_t STR_a STR_k STR_a STR_n STR_a "\0"
-#define STRING_Kayah_Li0 STR_K STR_a STR_y STR_a STR_h STR_UNDERSCORE STR_L STR_i "\0"
-#define STRING_Kharoshthi0 STR_K STR_h STR_a STR_r STR_o STR_s STR_h STR_t STR_h STR_i "\0"
-#define STRING_Khmer0 STR_K STR_h STR_m STR_e STR_r "\0"
-#define STRING_L0 STR_L "\0"
-#define STRING_L_AMPERSAND0 STR_L STR_AMPERSAND "\0"
-#define STRING_Lao0 STR_L STR_a STR_o "\0"
-#define STRING_Latin0 STR_L STR_a STR_t STR_i STR_n "\0"
-#define STRING_Lepcha0 STR_L STR_e STR_p STR_c STR_h STR_a "\0"
-#define STRING_Limbu0 STR_L STR_i STR_m STR_b STR_u "\0"
-#define STRING_Linear_B0 STR_L STR_i STR_n STR_e STR_a STR_r STR_UNDERSCORE STR_B "\0"
-#define STRING_Lisu0 STR_L STR_i STR_s STR_u "\0"
-#define STRING_Ll0 STR_L STR_l "\0"
-#define STRING_Lm0 STR_L STR_m "\0"
-#define STRING_Lo0 STR_L STR_o "\0"
-#define STRING_Lt0 STR_L STR_t "\0"
-#define STRING_Lu0 STR_L STR_u "\0"
-#define STRING_Lycian0 STR_L STR_y STR_c STR_i STR_a STR_n "\0"
-#define STRING_Lydian0 STR_L STR_y STR_d STR_i STR_a STR_n "\0"
-#define STRING_M0 STR_M "\0"
-#define STRING_Malayalam0 STR_M STR_a STR_l STR_a STR_y STR_a STR_l STR_a STR_m "\0"
-#define STRING_Mandaic0 STR_M STR_a STR_n STR_d STR_a STR_i STR_c "\0"
-#define STRING_Mc0 STR_M STR_c "\0"
-#define STRING_Me0 STR_M STR_e "\0"
-#define STRING_Meetei_Mayek0 STR_M STR_e STR_e STR_t STR_e STR_i STR_UNDERSCORE STR_M STR_a STR_y STR_e STR_k "\0"
-#define STRING_Meroitic_Cursive0 STR_M STR_e STR_r STR_o STR_i STR_t STR_i STR_c STR_UNDERSCORE STR_C STR_u STR_r STR_s STR_i STR_v STR_e "\0"
-#define STRING_Meroitic_Hieroglyphs0 STR_M STR_e STR_r STR_o STR_i STR_t STR_i STR_c STR_UNDERSCORE STR_H STR_i STR_e STR_r STR_o STR_g STR_l STR_y STR_p STR_h STR_s "\0"
-#define STRING_Miao0 STR_M STR_i STR_a STR_o "\0"
-#define STRING_Mn0 STR_M STR_n "\0"
-#define STRING_Mongolian0 STR_M STR_o STR_n STR_g STR_o STR_l STR_i STR_a STR_n "\0"
-#define STRING_Myanmar0 STR_M STR_y STR_a STR_n STR_m STR_a STR_r "\0"
-#define STRING_N0 STR_N "\0"
-#define STRING_Nd0 STR_N STR_d "\0"
-#define STRING_New_Tai_Lue0 STR_N STR_e STR_w STR_UNDERSCORE STR_T STR_a STR_i STR_UNDERSCORE STR_L STR_u STR_e "\0"
-#define STRING_Nko0 STR_N STR_k STR_o "\0"
-#define STRING_Nl0 STR_N STR_l "\0"
-#define STRING_No0 STR_N STR_o "\0"
-#define STRING_Ogham0 STR_O STR_g STR_h STR_a STR_m "\0"
-#define STRING_Ol_Chiki0 STR_O STR_l STR_UNDERSCORE STR_C STR_h STR_i STR_k STR_i "\0"
-#define STRING_Old_Italic0 STR_O STR_l STR_d STR_UNDERSCORE STR_I STR_t STR_a STR_l STR_i STR_c "\0"
-#define STRING_Old_Persian0 STR_O STR_l STR_d STR_UNDERSCORE STR_P STR_e STR_r STR_s STR_i STR_a STR_n "\0"
-#define STRING_Old_South_Arabian0 STR_O STR_l STR_d STR_UNDERSCORE STR_S STR_o STR_u STR_t STR_h STR_UNDERSCORE STR_A STR_r STR_a STR_b STR_i STR_a STR_n "\0"
-#define STRING_Old_Turkic0 STR_O STR_l STR_d STR_UNDERSCORE STR_T STR_u STR_r STR_k STR_i STR_c "\0"
-#define STRING_Oriya0 STR_O STR_r STR_i STR_y STR_a "\0"
-#define STRING_Osmanya0 STR_O STR_s STR_m STR_a STR_n STR_y STR_a "\0"
-#define STRING_P0 STR_P "\0"
-#define STRING_Pc0 STR_P STR_c "\0"
-#define STRING_Pd0 STR_P STR_d "\0"
-#define STRING_Pe0 STR_P STR_e "\0"
-#define STRING_Pf0 STR_P STR_f "\0"
-#define STRING_Phags_Pa0 STR_P STR_h STR_a STR_g STR_s STR_UNDERSCORE STR_P STR_a "\0"
-#define STRING_Phoenician0 STR_P STR_h STR_o STR_e STR_n STR_i STR_c STR_i STR_a STR_n "\0"
-#define STRING_Pi0 STR_P STR_i "\0"
-#define STRING_Po0 STR_P STR_o "\0"
-#define STRING_Ps0 STR_P STR_s "\0"
-#define STRING_Rejang0 STR_R STR_e STR_j STR_a STR_n STR_g "\0"
-#define STRING_Runic0 STR_R STR_u STR_n STR_i STR_c "\0"
-#define STRING_S0 STR_S "\0"
-#define STRING_Samaritan0 STR_S STR_a STR_m STR_a STR_r STR_i STR_t STR_a STR_n "\0"
-#define STRING_Saurashtra0 STR_S STR_a STR_u STR_r STR_a STR_s STR_h STR_t STR_r STR_a "\0"
-#define STRING_Sc0 STR_S STR_c "\0"
-#define STRING_Sharada0 STR_S STR_h STR_a STR_r STR_a STR_d STR_a "\0"
-#define STRING_Shavian0 STR_S STR_h STR_a STR_v STR_i STR_a STR_n "\0"
-#define STRING_Sinhala0 STR_S STR_i STR_n STR_h STR_a STR_l STR_a "\0"
-#define STRING_Sk0 STR_S STR_k "\0"
-#define STRING_Sm0 STR_S STR_m "\0"
-#define STRING_So0 STR_S STR_o "\0"
-#define STRING_Sora_Sompeng0 STR_S STR_o STR_r STR_a STR_UNDERSCORE STR_S STR_o STR_m STR_p STR_e STR_n STR_g "\0"
-#define STRING_Sundanese0 STR_S STR_u STR_n STR_d STR_a STR_n STR_e STR_s STR_e "\0"
-#define STRING_Syloti_Nagri0 STR_S STR_y STR_l STR_o STR_t STR_i STR_UNDERSCORE STR_N STR_a STR_g STR_r STR_i "\0"
-#define STRING_Syriac0 STR_S STR_y STR_r STR_i STR_a STR_c "\0"
-#define STRING_Tagalog0 STR_T STR_a STR_g STR_a STR_l STR_o STR_g "\0"
-#define STRING_Tagbanwa0 STR_T STR_a STR_g STR_b STR_a STR_n STR_w STR_a "\0"
-#define STRING_Tai_Le0 STR_T STR_a STR_i STR_UNDERSCORE STR_L STR_e "\0"
-#define STRING_Tai_Tham0 STR_T STR_a STR_i STR_UNDERSCORE STR_T STR_h STR_a STR_m "\0"
-#define STRING_Tai_Viet0 STR_T STR_a STR_i STR_UNDERSCORE STR_V STR_i STR_e STR_t "\0"
-#define STRING_Takri0 STR_T STR_a STR_k STR_r STR_i "\0"
-#define STRING_Tamil0 STR_T STR_a STR_m STR_i STR_l "\0"
-#define STRING_Telugu0 STR_T STR_e STR_l STR_u STR_g STR_u "\0"
-#define STRING_Thaana0 STR_T STR_h STR_a STR_a STR_n STR_a "\0"
-#define STRING_Thai0 STR_T STR_h STR_a STR_i "\0"
-#define STRING_Tibetan0 STR_T STR_i STR_b STR_e STR_t STR_a STR_n "\0"
-#define STRING_Tifinagh0 STR_T STR_i STR_f STR_i STR_n STR_a STR_g STR_h "\0"
-#define STRING_Ugaritic0 STR_U STR_g STR_a STR_r STR_i STR_t STR_i STR_c "\0"
-#define STRING_Vai0 STR_V STR_a STR_i "\0"
-#define STRING_Xan0 STR_X STR_a STR_n "\0"
-#define STRING_Xps0 STR_X STR_p STR_s "\0"
-#define STRING_Xsp0 STR_X STR_s STR_p "\0"
-#define STRING_Xuc0 STR_X STR_u STR_c "\0"
-#define STRING_Xwd0 STR_X STR_w STR_d "\0"
-#define STRING_Yi0 STR_Y STR_i "\0"
-#define STRING_Z0 STR_Z "\0"
-#define STRING_Zl0 STR_Z STR_l "\0"
-#define STRING_Zp0 STR_Z STR_p "\0"
-#define STRING_Zs0 STR_Z STR_s "\0"
-
-const char PRIV(utt_names)[] =
-  STRING_Any0
-  STRING_Arabic0
-  STRING_Armenian0
-  STRING_Avestan0
-  STRING_Balinese0
-  STRING_Bamum0
-  STRING_Batak0
-  STRING_Bengali0
-  STRING_Bopomofo0
-  STRING_Brahmi0
-  STRING_Braille0
-  STRING_Buginese0
-  STRING_Buhid0
-  STRING_C0
-  STRING_Canadian_Aboriginal0
-  STRING_Carian0
-  STRING_Cc0
-  STRING_Cf0
-  STRING_Chakma0
-  STRING_Cham0
-  STRING_Cherokee0
-  STRING_Cn0
-  STRING_Co0
-  STRING_Common0
-  STRING_Coptic0
-  STRING_Cs0
-  STRING_Cuneiform0
-  STRING_Cypriot0
-  STRING_Cyrillic0
-  STRING_Deseret0
-  STRING_Devanagari0
-  STRING_Egyptian_Hieroglyphs0
-  STRING_Ethiopic0
-  STRING_Georgian0
-  STRING_Glagolitic0
-  STRING_Gothic0
-  STRING_Greek0
-  STRING_Gujarati0
-  STRING_Gurmukhi0
-  STRING_Han0
-  STRING_Hangul0
-  STRING_Hanunoo0
-  STRING_Hebrew0
-  STRING_Hiragana0
-  STRING_Imperial_Aramaic0
-  STRING_Inherited0
-  STRING_Inscriptional_Pahlavi0
-  STRING_Inscriptional_Parthian0
-  STRING_Javanese0
-  STRING_Kaithi0
-  STRING_Kannada0
-  STRING_Katakana0
-  STRING_Kayah_Li0
-  STRING_Kharoshthi0
-  STRING_Khmer0
-  STRING_L0
-  STRING_L_AMPERSAND0
-  STRING_Lao0
-  STRING_Latin0
-  STRING_Lepcha0
-  STRING_Limbu0
-  STRING_Linear_B0
-  STRING_Lisu0
-  STRING_Ll0
-  STRING_Lm0
-  STRING_Lo0
-  STRING_Lt0
-  STRING_Lu0
-  STRING_Lycian0
-  STRING_Lydian0
-  STRING_M0
-  STRING_Malayalam0
-  STRING_Mandaic0
-  STRING_Mc0
-  STRING_Me0
-  STRING_Meetei_Mayek0
-  STRING_Meroitic_Cursive0
-  STRING_Meroitic_Hieroglyphs0
-  STRING_Miao0
-  STRING_Mn0
-  STRING_Mongolian0
-  STRING_Myanmar0
-  STRING_N0
-  STRING_Nd0
-  STRING_New_Tai_Lue0
-  STRING_Nko0
-  STRING_Nl0
-  STRING_No0
-  STRING_Ogham0
-  STRING_Ol_Chiki0
-  STRING_Old_Italic0
-  STRING_Old_Persian0
-  STRING_Old_South_Arabian0
-  STRING_Old_Turkic0
-  STRING_Oriya0
-  STRING_Osmanya0
-  STRING_P0
-  STRING_Pc0
-  STRING_Pd0
-  STRING_Pe0
-  STRING_Pf0
-  STRING_Phags_Pa0
-  STRING_Phoenician0
-  STRING_Pi0
-  STRING_Po0
-  STRING_Ps0
-  STRING_Rejang0
-  STRING_Runic0
-  STRING_S0
-  STRING_Samaritan0
-  STRING_Saurashtra0
-  STRING_Sc0
-  STRING_Sharada0
-  STRING_Shavian0
-  STRING_Sinhala0
-  STRING_Sk0
-  STRING_Sm0
-  STRING_So0
-  STRING_Sora_Sompeng0
-  STRING_Sundanese0
-  STRING_Syloti_Nagri0
-  STRING_Syriac0
-  STRING_Tagalog0
-  STRING_Tagbanwa0
-  STRING_Tai_Le0
-  STRING_Tai_Tham0
-  STRING_Tai_Viet0
-  STRING_Takri0
-  STRING_Tamil0
-  STRING_Telugu0
-  STRING_Thaana0
-  STRING_Thai0
-  STRING_Tibetan0
-  STRING_Tifinagh0
-  STRING_Ugaritic0
-  STRING_Vai0
-  STRING_Xan0
-  STRING_Xps0
-  STRING_Xsp0
-  STRING_Xuc0
-  STRING_Xwd0
-  STRING_Yi0
-  STRING_Z0
-  STRING_Zl0
-  STRING_Zp0
-  STRING_Zs0;
-
-const ucp_type_table PRIV(utt)[] = {
-  {   0, PT_ANY, 0 },
-  {   4, PT_SC, ucp_Arabic },
-  {  11, PT_SC, ucp_Armenian },
-  {  20, PT_SC, ucp_Avestan },
-  {  28, PT_SC, ucp_Balinese },
-  {  37, PT_SC, ucp_Bamum },
-  {  43, PT_SC, ucp_Batak },
-  {  49, PT_SC, ucp_Bengali },
-  {  57, PT_SC, ucp_Bopomofo },
-  {  66, PT_SC, ucp_Brahmi },
-  {  73, PT_SC, ucp_Braille },
-  {  81, PT_SC, ucp_Buginese },
-  {  90, PT_SC, ucp_Buhid },
-  {  96, PT_GC, ucp_C },
-  {  98, PT_SC, ucp_Canadian_Aboriginal },
-  { 118, PT_SC, ucp_Carian },
-  { 125, PT_PC, ucp_Cc },
-  { 128, PT_PC, ucp_Cf },
-  { 131, PT_SC, ucp_Chakma },
-  { 138, PT_SC, ucp_Cham },
-  { 143, PT_SC, ucp_Cherokee },
-  { 152, PT_PC, ucp_Cn },
-  { 155, PT_PC, ucp_Co },
-  { 158, PT_SC, ucp_Common },
-  { 165, PT_SC, ucp_Coptic },
-  { 172, PT_PC, ucp_Cs },
-  { 175, PT_SC, ucp_Cuneiform },
-  { 185, PT_SC, ucp_Cypriot },
-  { 193, PT_SC, ucp_Cyrillic },
-  { 202, PT_SC, ucp_Deseret },
-  { 210, PT_SC, ucp_Devanagari },
-  { 221, PT_SC, ucp_Egyptian_Hieroglyphs },
-  { 242, PT_SC, ucp_Ethiopic },
-  { 251, PT_SC, ucp_Georgian },
-  { 260, PT_SC, ucp_Glagolitic },
-  { 271, PT_SC, ucp_Gothic },
-  { 278, PT_SC, ucp_Greek },
-  { 284, PT_SC, ucp_Gujarati },
-  { 293, PT_SC, ucp_Gurmukhi },
-  { 302, PT_SC, ucp_Han },
-  { 306, PT_SC, ucp_Hangul },
-  { 313, PT_SC, ucp_Hanunoo },
-  { 321, PT_SC, ucp_Hebrew },
-  { 328, PT_SC, ucp_Hiragana },
-  { 337, PT_SC, ucp_Imperial_Aramaic },
-  { 354, PT_SC, ucp_Inherited },
-  { 364, PT_SC, ucp_Inscriptional_Pahlavi },
-  { 386, PT_SC, ucp_Inscriptional_Parthian },
-  { 409, PT_SC, ucp_Javanese },
-  { 418, PT_SC, ucp_Kaithi },
-  { 425, PT_SC, ucp_Kannada },
-  { 433, PT_SC, ucp_Katakana },
-  { 442, PT_SC, ucp_Kayah_Li },
-  { 451, PT_SC, ucp_Kharoshthi },
-  { 462, PT_SC, ucp_Khmer },
-  { 468, PT_GC, ucp_L },
-  { 470, PT_LAMP, 0 },
-  { 473, PT_SC, ucp_Lao },
-  { 477, PT_SC, ucp_Latin },
-  { 483, PT_SC, ucp_Lepcha },
-  { 490, PT_SC, ucp_Limbu },
-  { 496, PT_SC, ucp_Linear_B },
-  { 505, PT_SC, ucp_Lisu },
-  { 510, PT_PC, ucp_Ll },
-  { 513, PT_PC, ucp_Lm },
-  { 516, PT_PC, ucp_Lo },
-  { 519, PT_PC, ucp_Lt },
-  { 522, PT_PC, ucp_Lu },
-  { 525, PT_SC, ucp_Lycian },
-  { 532, PT_SC, ucp_Lydian },
-  { 539, PT_GC, ucp_M },
-  { 541, PT_SC, ucp_Malayalam },
-  { 551, PT_SC, ucp_Mandaic },
-  { 559, PT_PC, ucp_Mc },
-  { 562, PT_PC, ucp_Me },
-  { 565, PT_SC, ucp_Meetei_Mayek },
-  { 578, PT_SC, ucp_Meroitic_Cursive },
-  { 595, PT_SC, ucp_Meroitic_Hieroglyphs },
-  { 616, PT_SC, ucp_Miao },
-  { 621, PT_PC, ucp_Mn },
-  { 624, PT_SC, ucp_Mongolian },
-  { 634, PT_SC, ucp_Myanmar },
-  { 642, PT_GC, ucp_N },
-  { 644, PT_PC, ucp_Nd },
-  { 647, PT_SC, ucp_New_Tai_Lue },
-  { 659, PT_SC, ucp_Nko },
-  { 663, PT_PC, ucp_Nl },
-  { 666, PT_PC, ucp_No },
-  { 669, PT_SC, ucp_Ogham },
-  { 675, PT_SC, ucp_Ol_Chiki },
-  { 684, PT_SC, ucp_Old_Italic },
-  { 695, PT_SC, ucp_Old_Persian },
-  { 707, PT_SC, ucp_Old_South_Arabian },
-  { 725, PT_SC, ucp_Old_Turkic },
-  { 736, PT_SC, ucp_Oriya },
-  { 742, PT_SC, ucp_Osmanya },
-  { 750, PT_GC, ucp_P },
-  { 752, PT_PC, ucp_Pc },
-  { 755, PT_PC, ucp_Pd },
-  { 758, PT_PC, ucp_Pe },
-  { 761, PT_PC, ucp_Pf },
-  { 764, PT_SC, ucp_Phags_Pa },
-  { 773, PT_SC, ucp_Phoenician },
-  { 784, PT_PC, ucp_Pi },
-  { 787, PT_PC, ucp_Po },
-  { 790, PT_PC, ucp_Ps },
-  { 793, PT_SC, ucp_Rejang },
-  { 800, PT_SC, ucp_Runic },
-  { 806, PT_GC, ucp_S },
-  { 808, PT_SC, ucp_Samaritan },
-  { 818, PT_SC, ucp_Saurashtra },
-  { 829, PT_PC, ucp_Sc },
-  { 832, PT_SC, ucp_Sharada },
-  { 840, PT_SC, ucp_Shavian },
-  { 848, PT_SC, ucp_Sinhala },
-  { 856, PT_PC, ucp_Sk },
-  { 859, PT_PC, ucp_Sm },
-  { 862, PT_PC, ucp_So },
-  { 865, PT_SC, ucp_Sora_Sompeng },
-  { 878, PT_SC, ucp_Sundanese },
-  { 888, PT_SC, ucp_Syloti_Nagri },
-  { 901, PT_SC, ucp_Syriac },
-  { 908, PT_SC, ucp_Tagalog },
-  { 916, PT_SC, ucp_Tagbanwa },
-  { 925, PT_SC, ucp_Tai_Le },
-  { 932, PT_SC, ucp_Tai_Tham },
-  { 941, PT_SC, ucp_Tai_Viet },
-  { 950, PT_SC, ucp_Takri },
-  { 956, PT_SC, ucp_Tamil },
-  { 962, PT_SC, ucp_Telugu },
-  { 969, PT_SC, ucp_Thaana },
-  { 976, PT_SC, ucp_Thai },
-  { 981, PT_SC, ucp_Tibetan },
-  { 989, PT_SC, ucp_Tifinagh },
-  { 998, PT_SC, ucp_Ugaritic },
-  { 1007, PT_SC, ucp_Vai },
-  { 1011, PT_ALNUM, 0 },
-  { 1015, PT_PXSPACE, 0 },
-  { 1019, PT_SPACE, 0 },
-  { 1023, PT_UCNC, 0 },
-  { 1027, PT_WORD, 0 },
-  { 1031, PT_SC, ucp_Yi },
-  { 1034, PT_GC, ucp_Z },
-  { 1036, PT_PC, ucp_Zl },
-  { 1039, PT_PC, ucp_Zp },
-  { 1042, PT_PC, ucp_Zs }
-};
-
-const int PRIV(utt_size) = sizeof(PRIV(utt)) / sizeof(ucp_type_table);
-
-#endif /* SUPPORT_UTF */
-
-/* End of pcre_tables.c */
diff --git a/src/extra/pcre/pcre_ucd.c b/src/extra/pcre/pcre_ucd.c
deleted file mode 100644
index 46ea70c..0000000
--- a/src/extra/pcre/pcre_ucd.c
+++ /dev/null
@@ -1,3297 +0,0 @@
-/* This module is generated by the maint/MultiStage2.py script.
-Do not modify it by hand. Instead modify the script and run it
-to regenerate this code.
-
-As well as being part of the PCRE library, this module is #included
-by the pcretest program, which redefines the PRIV macro to change
-table names from _pcre_xxx to xxxx, thereby avoiding name clashes
-with the library. At present, just one of these tables is actually
-needed. */
-
-#ifndef PCRE_INCLUDED
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include "pcre_internal.h"
-
-#endif /* PCRE_INCLUDED */
-
-/* Unicode character database. */
-/* This file was autogenerated by the MultiStage2.py script. */
-/* Total size: 65688 bytes, block size: 128. */
-
-/* The tables herein are needed only when UCP support is built
-into PCRE. This module should not be referenced otherwise, so
-it should not matter whether it is compiled or not. However
-a comment was received about space saving - maybe the guy linked
-all the modules rather than using a library - so we include a
-condition to cut out the tables when not needed. But don't leave
-a totally empty module because some compilers barf at that.
-Instead, just supply small dummy tables. */
-
-#ifndef SUPPORT_UCP
-const ucd_record PRIV(ucd_records)[] = {{0,0,0,0,0 }};
-const pcre_uint8 PRIV(ucd_stage1)[] = {0};
-const pcre_uint16 PRIV(ucd_stage2)[] = {0};
-const pcre_uint32 PRIV(ucd_caseless_sets)[] = {0};
-#else
-
-/* When recompiling tables with a new Unicode version, please check the
-types in this structure definition from pcre_internal.h (the actual
-field names will be different):
-
-typedef struct {
-pcre_uint8 property_0;
-pcre_uint8 property_1;
-pcre_uint8 property_2;
-pcre_uint8 property_3;
-pcre_int32 property_4;
-} ucd_record;
-*/
-
-
-const pcre_uint32 PRIV(ucd_caseless_sets)[] = {
-  NOTACHAR,
-  0x0053,   0x0073,   0x017f,   NOTACHAR,
-  0x01c4,   0x01c5,   0x01c6,   NOTACHAR,
-  0x01c7,   0x01c8,   0x01c9,   NOTACHAR,
-  0x01ca,   0x01cb,   0x01cc,   NOTACHAR,
-  0x01f1,   0x01f2,   0x01f3,   NOTACHAR,
-  0x0345,   0x0399,   0x03b9,   0x1fbe,   NOTACHAR,
-  0x00b5,   0x039c,   0x03bc,   NOTACHAR,
-  0x03a3,   0x03c2,   0x03c3,   NOTACHAR,
-  0x0392,   0x03b2,   0x03d0,   NOTACHAR,
-  0x0398,   0x03b8,   0x03d1,   0x03f4,   NOTACHAR,
-  0x03a6,   0x03c6,   0x03d5,   NOTACHAR,
-  0x03a0,   0x03c0,   0x03d6,   NOTACHAR,
-  0x039a,   0x03ba,   0x03f0,   NOTACHAR,
-  0x03a1,   0x03c1,   0x03f1,   NOTACHAR,
-  0x0395,   0x03b5,   0x03f5,   NOTACHAR,
-  0x1e60,   0x1e61,   0x1e9b,   NOTACHAR,
-  0x03a9,   0x03c9,   0x2126,   NOTACHAR,
-  0x004b,   0x006b,   0x212a,   NOTACHAR,
-  0x00c5,   0x00e5,   0x212b,   NOTACHAR,
-};
-
-/* When #included in pcretest, we don't need this large table. */
-
-#ifndef PCRE_INCLUDED
-
-const ucd_record PRIV(ucd_records)[] = { /* 5016 bytes, record size 8 */
-  {     9,      0,      2,      0,      0, }, /*   0 */
-  {     9,      0,      1,      0,      0, }, /*   1 */
-  {     9,      0,      0,      0,      0, }, /*   2 */
-  {     9,     29,     12,      0,      0, }, /*   3 */
-  {     9,     21,     12,      0,      0, }, /*   4 */
-  {     9,     23,     12,      0,      0, }, /*   5 */
-  {     9,     22,     12,      0,      0, }, /*   6 */
-  {     9,     18,     12,      0,      0, }, /*   7 */
-  {     9,     25,     12,      0,      0, }, /*   8 */
-  {     9,     17,     12,      0,      0, }, /*   9 */
-  {     9,     13,     12,      0,      0, }, /*  10 */
-  {    33,      9,     12,      0,     32, }, /*  11 */
-  {    33,      9,     12,     71,     32, }, /*  12 */
-  {    33,      9,     12,      1,     32, }, /*  13 */
-  {     9,     24,     12,      0,      0, }, /*  14 */
-  {     9,     16,     12,      0,      0, }, /*  15 */
-  {    33,      5,     12,      0,    -32, }, /*  16 */
-  {    33,      5,     12,     71,    -32, }, /*  17 */
-  {    33,      5,     12,      1,    -32, }, /*  18 */
-  {     9,     26,     12,      0,      0, }, /*  19 */
-  {    33,      7,     12,      0,      0, }, /*  20 */
-  {     9,     20,     12,      0,      0, }, /*  21 */
-  {     9,      1,      2,      0,      0, }, /*  22 */
-  {     9,     15,     12,      0,      0, }, /*  23 */
-  {     9,      5,     12,     26,    775, }, /*  24 */
-  {     9,     19,     12,      0,      0, }, /*  25 */
-  {    33,      9,     12,     75,     32, }, /*  26 */
-  {    33,      5,     12,      0,   7615, }, /*  27 */
-  {    33,      5,     12,     75,    -32, }, /*  28 */
-  {    33,      5,     12,      0,    121, }, /*  29 */
-  {    33,      9,     12,      0,      1, }, /*  30 */
-  {    33,      5,     12,      0,     -1, }, /*  31 */
-  {    33,      9,     12,      0,      0, }, /*  32 */
-  {    33,      5,     12,      0,      0, }, /*  33 */
-  {    33,      9,     12,      0,   -121, }, /*  34 */
-  {    33,      5,     12,      1,   -268, }, /*  35 */
-  {    33,      5,     12,      0,    195, }, /*  36 */
-  {    33,      9,     12,      0,    210, }, /*  37 */
-  {    33,      9,     12,      0,    206, }, /*  38 */
-  {    33,      9,     12,      0,    205, }, /*  39 */
-  {    33,      9,     12,      0,     79, }, /*  40 */
-  {    33,      9,     12,      0,    202, }, /*  41 */
-  {    33,      9,     12,      0,    203, }, /*  42 */
-  {    33,      9,     12,      0,    207, }, /*  43 */
-  {    33,      5,     12,      0,     97, }, /*  44 */
-  {    33,      9,     12,      0,    211, }, /*  45 */
-  {    33,      9,     12,      0,    209, }, /*  46 */
-  {    33,      5,     12,      0,    163, }, /*  47 */
-  {    33,      9,     12,      0,    213, }, /*  48 */
-  {    33,      5,     12,      0,    130, }, /*  49 */
-  {    33,      9,     12,      0,    214, }, /*  50 */
-  {    33,      9,     12,      0,    218, }, /*  51 */
-  {    33,      9,     12,      0,    217, }, /*  52 */
-  {    33,      9,     12,      0,    219, }, /*  53 */
-  {    33,      5,     12,      0,     56, }, /*  54 */
-  {    33,      9,     12,      5,      2, }, /*  55 */
-  {    33,      8,     12,      5,      1, }, /*  56 */
-  {    33,      5,     12,      5,     -2, }, /*  57 */
-  {    33,      9,     12,      9,      2, }, /*  58 */
-  {    33,      8,     12,      9,      1, }, /*  59 */
-  {    33,      5,     12,      9,     -2, }, /*  60 */
-  {    33,      9,     12,     13,      2, }, /*  61 */
-  {    33,      8,     12,     13,      1, }, /*  62 */
-  {    33,      5,     12,     13,     -2, }, /*  63 */
-  {    33,      5,     12,      0,    -79, }, /*  64 */
-  {    33,      9,     12,     17,      2, }, /*  65 */
-  {    33,      8,     12,     17,      1, }, /*  66 */
-  {    33,      5,     12,     17,     -2, }, /*  67 */
-  {    33,      9,     12,      0,    -97, }, /*  68 */
-  {    33,      9,     12,      0,    -56, }, /*  69 */
-  {    33,      9,     12,      0,   -130, }, /*  70 */
-  {    33,      9,     12,      0,  10795, }, /*  71 */
-  {    33,      9,     12,      0,   -163, }, /*  72 */
-  {    33,      9,     12,      0,  10792, }, /*  73 */
-  {    33,      5,     12,      0,  10815, }, /*  74 */
-  {    33,      9,     12,      0,   -195, }, /*  75 */
-  {    33,      9,     12,      0,     69, }, /*  76 */
-  {    33,      9,     12,      0,     71, }, /*  77 */
-  {    33,      5,     12,      0,  10783, }, /*  78 */
-  {    33,      5,     12,      0,  10780, }, /*  79 */
-  {    33,      5,     12,      0,  10782, }, /*  80 */
-  {    33,      5,     12,      0,   -210, }, /*  81 */
-  {    33,      5,     12,      0,   -206, }, /*  82 */
-  {    33,      5,     12,      0,   -205, }, /*  83 */
-  {    33,      5,     12,      0,   -202, }, /*  84 */
-  {    33,      5,     12,      0,   -203, }, /*  85 */
-  {    33,      5,     12,      0,   -207, }, /*  86 */
-  {    33,      5,     12,      0,  42280, }, /*  87 */
-  {    33,      5,     12,      0,  42308, }, /*  88 */
-  {    33,      5,     12,      0,   -209, }, /*  89 */
-  {    33,      5,     12,      0,   -211, }, /*  90 */
-  {    33,      5,     12,      0,  10743, }, /*  91 */
-  {    33,      5,     12,      0,  10749, }, /*  92 */
-  {    33,      5,     12,      0,   -213, }, /*  93 */
-  {    33,      5,     12,      0,   -214, }, /*  94 */
-  {    33,      5,     12,      0,  10727, }, /*  95 */
-  {    33,      5,     12,      0,   -218, }, /*  96 */
-  {    33,      5,     12,      0,    -69, }, /*  97 */
-  {    33,      5,     12,      0,   -217, }, /*  98 */
-  {    33,      5,     12,      0,    -71, }, /*  99 */
-  {    33,      5,     12,      0,   -219, }, /* 100 */
-  {    33,      6,     12,      0,      0, }, /* 101 */
-  {     9,      6,     12,      0,      0, }, /* 102 */
-  {     3,     24,     12,      0,      0, }, /* 103 */
-  {    27,     12,      3,      0,      0, }, /* 104 */
-  {    27,     12,      3,     21,    116, }, /* 105 */
-  {    19,      9,     12,      0,      1, }, /* 106 */
-  {    19,      5,     12,      0,     -1, }, /* 107 */
-  {    19,     24,     12,      0,      0, }, /* 108 */
-  {     9,      2,     12,      0,      0, }, /* 109 */
-  {    19,      6,     12,      0,      0, }, /* 110 */
-  {    19,      5,     12,      0,    130, }, /* 111 */
-  {    19,      9,     12,      0,     38, }, /* 112 */
-  {    19,      9,     12,      0,     37, }, /* 113 */
-  {    19,      9,     12,      0,     64, }, /* 114 */
-  {    19,      9,     12,      0,     63, }, /* 115 */
-  {    19,      5,     12,      0,      0, }, /* 116 */
-  {    19,      9,     12,      0,     32, }, /* 117 */
-  {    19,      9,     12,     34,     32, }, /* 118 */
-  {    19,      9,     12,     59,     32, }, /* 119 */
-  {    19,      9,     12,     38,     32, }, /* 120 */
-  {    19,      9,     12,     21,     32, }, /* 121 */
-  {    19,      9,     12,     51,     32, }, /* 122 */
-  {    19,      9,     12,     26,     32, }, /* 123 */
-  {    19,      9,     12,     47,     32, }, /* 124 */
-  {    19,      9,     12,     55,     32, }, /* 125 */
-  {    19,      9,     12,     30,     32, }, /* 126 */
-  {    19,      9,     12,     43,     32, }, /* 127 */
-  {    19,      9,     12,     67,     32, }, /* 128 */
-  {    19,      5,     12,      0,    -38, }, /* 129 */
-  {    19,      5,     12,      0,    -37, }, /* 130 */
-  {    19,      5,     12,      0,    -32, }, /* 131 */
-  {    19,      5,     12,     34,    -32, }, /* 132 */
-  {    19,      5,     12,     59,    -32, }, /* 133 */
-  {    19,      5,     12,     38,    -32, }, /* 134 */
-  {    19,      5,     12,     21,   -116, }, /* 135 */
-  {    19,      5,     12,     51,    -32, }, /* 136 */
-  {    19,      5,     12,     26,   -775, }, /* 137 */
-  {    19,      5,     12,     47,    -32, }, /* 138 */
-  {    19,      5,     12,     55,    -32, }, /* 139 */
-  {    19,      5,     12,     30,      1, }, /* 140 */
-  {    19,      5,     12,     30,    -32, }, /* 141 */
-  {    19,      5,     12,     43,    -32, }, /* 142 */
-  {    19,      5,     12,     67,    -32, }, /* 143 */
-  {    19,      5,     12,      0,    -64, }, /* 144 */
-  {    19,      5,     12,      0,    -63, }, /* 145 */
-  {    19,      9,     12,      0,      8, }, /* 146 */
-  {    19,      5,     12,     34,    -30, }, /* 147 */
-  {    19,      5,     12,     38,    -25, }, /* 148 */
-  {    19,      9,     12,      0,      0, }, /* 149 */
-  {    19,      5,     12,     43,    -15, }, /* 150 */
-  {    19,      5,     12,     47,    -22, }, /* 151 */
-  {    19,      5,     12,      0,     -8, }, /* 152 */
-  {    10,      9,     12,      0,      1, }, /* 153 */
-  {    10,      5,     12,      0,     -1, }, /* 154 */
-  {    19,      5,     12,     51,    -54, }, /* 155 */
-  {    19,      5,     12,     55,    -48, }, /* 156 */
-  {    19,      5,     12,      0,      7, }, /* 157 */
-  {    19,      9,     12,     38,    -60, }, /* 158 */
-  {    19,      5,     12,     59,    -64, }, /* 159 */
-  {    19,     25,     12,      0,      0, }, /* 160 */
-  {    19,      9,     12,      0,     -7, }, /* 161 */
-  {    19,      9,     12,      0,   -130, }, /* 162 */
-  {    12,      9,     12,      0,     80, }, /* 163 */
-  {    12,      9,     12,      0,     32, }, /* 164 */
-  {    12,      5,     12,      0,    -32, }, /* 165 */
-  {    12,      5,     12,      0,    -80, }, /* 166 */
-  {    12,      9,     12,      0,      1, }, /* 167 */
-  {    12,      5,     12,      0,     -1, }, /* 168 */
-  {    12,     26,     12,      0,      0, }, /* 169 */
-  {    12,     12,      3,      0,      0, }, /* 170 */
-  {    12,     11,      3,      0,      0, }, /* 171 */
-  {    12,      9,     12,      0,     15, }, /* 172 */
-  {    12,      5,     12,      0,    -15, }, /* 173 */
-  {     1,      9,     12,      0,     48, }, /* 174 */
-  {     1,      6,     12,      0,      0, }, /* 175 */
-  {     1,     21,     12,      0,      0, }, /* 176 */
-  {     1,      5,     12,      0,    -48, }, /* 177 */
-  {     1,      5,     12,      0,      0, }, /* 178 */
-  {     1,     17,     12,      0,      0, }, /* 179 */
-  {     1,     23,     12,      0,      0, }, /* 180 */
-  {    25,     12,      3,      0,      0, }, /* 181 */
-  {    25,     17,     12,      0,      0, }, /* 182 */
-  {    25,     21,     12,      0,      0, }, /* 183 */
-  {    25,      7,     12,      0,      0, }, /* 184 */
-  {     0,      1,      2,      0,      0, }, /* 185 */
-  {     0,     25,     12,      0,      0, }, /* 186 */
-  {     0,     21,     12,      0,      0, }, /* 187 */
-  {     0,     23,     12,      0,      0, }, /* 188 */
-  {     0,     26,     12,      0,      0, }, /* 189 */
-  {     0,     12,      3,      0,      0, }, /* 190 */
-  {     0,      7,     12,      0,      0, }, /* 191 */
-  {     0,      6,     12,      0,      0, }, /* 192 */
-  {     0,     13,     12,      0,      0, }, /* 193 */
-  {    49,     21,     12,      0,      0, }, /* 194 */
-  {    49,      1,      2,      0,      0, }, /* 195 */
-  {    49,      7,     12,      0,      0, }, /* 196 */
-  {    49,     12,      3,      0,      0, }, /* 197 */
-  {    55,      7,     12,      0,      0, }, /* 198 */
-  {    55,     12,      3,      0,      0, }, /* 199 */
-  {    63,     13,     12,      0,      0, }, /* 200 */
-  {    63,      7,     12,      0,      0, }, /* 201 */
-  {    63,     12,      3,      0,      0, }, /* 202 */
-  {    63,      6,     12,      0,      0, }, /* 203 */
-  {    63,     26,     12,      0,      0, }, /* 204 */
-  {    63,     21,     12,      0,      0, }, /* 205 */
-  {    89,      7,     12,      0,      0, }, /* 206 */
-  {    89,     12,      3,      0,      0, }, /* 207 */
-  {    89,      6,     12,      0,      0, }, /* 208 */
-  {    89,     21,     12,      0,      0, }, /* 209 */
-  {    94,      7,     12,      0,      0, }, /* 210 */
-  {    94,     12,      3,      0,      0, }, /* 211 */
-  {    94,     21,     12,      0,      0, }, /* 212 */
-  {    14,     12,      3,      0,      0, }, /* 213 */
-  {    14,     10,      5,      0,      0, }, /* 214 */
-  {    14,      7,     12,      0,      0, }, /* 215 */
-  {    14,     13,     12,      0,      0, }, /* 216 */
-  {    14,     21,     12,      0,      0, }, /* 217 */
-  {    14,      6,     12,      0,      0, }, /* 218 */
-  {     2,     12,      3,      0,      0, }, /* 219 */
-  {     2,     10,      5,      0,      0, }, /* 220 */
-  {     2,      7,     12,      0,      0, }, /* 221 */
-  {     2,     10,      3,      0,      0, }, /* 222 */
-  {     2,     13,     12,      0,      0, }, /* 223 */
-  {     2,     23,     12,      0,      0, }, /* 224 */
-  {     2,     15,     12,      0,      0, }, /* 225 */
-  {     2,     26,     12,      0,      0, }, /* 226 */
-  {    21,     12,      3,      0,      0, }, /* 227 */
-  {    21,     10,      5,      0,      0, }, /* 228 */
-  {    21,      7,     12,      0,      0, }, /* 229 */
-  {    21,     13,     12,      0,      0, }, /* 230 */
-  {    20,     12,      3,      0,      0, }, /* 231 */
-  {    20,     10,      5,      0,      0, }, /* 232 */
-  {    20,      7,     12,      0,      0, }, /* 233 */
-  {    20,     13,     12,      0,      0, }, /* 234 */
-  {    20,     21,     12,      0,      0, }, /* 235 */
-  {    20,     23,     12,      0,      0, }, /* 236 */
-  {    43,     12,      3,      0,      0, }, /* 237 */
-  {    43,     10,      5,      0,      0, }, /* 238 */
-  {    43,      7,     12,      0,      0, }, /* 239 */
-  {    43,     10,      3,      0,      0, }, /* 240 */
-  {    43,     13,     12,      0,      0, }, /* 241 */
-  {    43,     26,     12,      0,      0, }, /* 242 */
-  {    43,     15,     12,      0,      0, }, /* 243 */
-  {    53,     12,      3,      0,      0, }, /* 244 */
-  {    53,      7,     12,      0,      0, }, /* 245 */
-  {    53,     10,      3,      0,      0, }, /* 246 */
-  {    53,     10,      5,      0,      0, }, /* 247 */
-  {    53,     13,     12,      0,      0, }, /* 248 */
-  {    53,     15,     12,      0,      0, }, /* 249 */
-  {    53,     26,     12,      0,      0, }, /* 250 */
-  {    53,     23,     12,      0,      0, }, /* 251 */
-  {    54,     10,      5,      0,      0, }, /* 252 */
-  {    54,      7,     12,      0,      0, }, /* 253 */
-  {    54,     12,      3,      0,      0, }, /* 254 */
-  {    54,     13,     12,      0,      0, }, /* 255 */
-  {    54,     15,     12,      0,      0, }, /* 256 */
-  {    54,     26,     12,      0,      0, }, /* 257 */
-  {    28,     10,      5,      0,      0, }, /* 258 */
-  {    28,      7,     12,      0,      0, }, /* 259 */
-  {    28,     12,      3,      0,      0, }, /* 260 */
-  {    28,     10,      3,      0,      0, }, /* 261 */
-  {    28,     13,     12,      0,      0, }, /* 262 */
-  {    36,     10,      5,      0,      0, }, /* 263 */
-  {    36,      7,     12,      0,      0, }, /* 264 */
-  {    36,     10,      3,      0,      0, }, /* 265 */
-  {    36,     12,      3,      0,      0, }, /* 266 */
-  {    36,     13,     12,      0,      0, }, /* 267 */
-  {    36,     15,     12,      0,      0, }, /* 268 */
-  {    36,     26,     12,      0,      0, }, /* 269 */
-  {    47,     10,      5,      0,      0, }, /* 270 */
-  {    47,      7,     12,      0,      0, }, /* 271 */
-  {    47,     12,      3,      0,      0, }, /* 272 */
-  {    47,     10,      3,      0,      0, }, /* 273 */
-  {    47,     21,     12,      0,      0, }, /* 274 */
-  {    56,      7,     12,      0,      0, }, /* 275 */
-  {    56,     12,      3,      0,      0, }, /* 276 */
-  {    56,      7,      5,      0,      0, }, /* 277 */
-  {    56,      6,     12,      0,      0, }, /* 278 */
-  {    56,     21,     12,      0,      0, }, /* 279 */
-  {    56,     13,     12,      0,      0, }, /* 280 */
-  {    32,      7,     12,      0,      0, }, /* 281 */
-  {    32,     12,      3,      0,      0, }, /* 282 */
-  {    32,      7,      5,      0,      0, }, /* 283 */
-  {    32,      6,     12,      0,      0, }, /* 284 */
-  {    32,     13,     12,      0,      0, }, /* 285 */
-  {    57,      7,     12,      0,      0, }, /* 286 */
-  {    57,     26,     12,      0,      0, }, /* 287 */
-  {    57,     21,     12,      0,      0, }, /* 288 */
-  {    57,     12,      3,      0,      0, }, /* 289 */
-  {    57,     13,     12,      0,      0, }, /* 290 */
-  {    57,     15,     12,      0,      0, }, /* 291 */
-  {    57,     22,     12,      0,      0, }, /* 292 */
-  {    57,     18,     12,      0,      0, }, /* 293 */
-  {    57,     10,      5,      0,      0, }, /* 294 */
-  {    38,      7,     12,      0,      0, }, /* 295 */
-  {    38,     10,     12,      0,      0, }, /* 296 */
-  {    38,     12,      3,      0,      0, }, /* 297 */
-  {    38,     10,      5,      0,      0, }, /* 298 */
-  {    38,     13,     12,      0,      0, }, /* 299 */
-  {    38,     21,     12,      0,      0, }, /* 300 */
-  {    38,     26,     12,      0,      0, }, /* 301 */
-  {    16,      9,     12,      0,   7264, }, /* 302 */
-  {    16,      7,     12,      0,      0, }, /* 303 */
-  {    16,      6,     12,      0,      0, }, /* 304 */
-  {    23,      7,      6,      0,      0, }, /* 305 */
-  {    23,      7,      7,      0,      0, }, /* 306 */
-  {    23,      7,      8,      0,      0, }, /* 307 */
-  {    15,      7,     12,      0,      0, }, /* 308 */
-  {    15,     12,      3,      0,      0, }, /* 309 */
-  {    15,     21,     12,      0,      0, }, /* 310 */
-  {    15,     15,     12,      0,      0, }, /* 311 */
-  {    15,     26,     12,      0,      0, }, /* 312 */
-  {     8,      7,     12,      0,      0, }, /* 313 */
-  {     7,     17,     12,      0,      0, }, /* 314 */
-  {     7,      7,     12,      0,      0, }, /* 315 */
-  {     7,     21,     12,      0,      0, }, /* 316 */
-  {    40,     29,     12,      0,      0, }, /* 317 */
-  {    40,      7,     12,      0,      0, }, /* 318 */
-  {    40,     22,     12,      0,      0, }, /* 319 */
-  {    40,     18,     12,      0,      0, }, /* 320 */
-  {    45,      7,     12,      0,      0, }, /* 321 */
-  {    45,     14,     12,      0,      0, }, /* 322 */
-  {    50,      7,     12,      0,      0, }, /* 323 */
-  {    50,     12,      3,      0,      0, }, /* 324 */
-  {    24,      7,     12,      0,      0, }, /* 325 */
-  {    24,     12,      3,      0,      0, }, /* 326 */
-  {     6,      7,     12,      0,      0, }, /* 327 */
-  {     6,     12,      3,      0,      0, }, /* 328 */
-  {    51,      7,     12,      0,      0, }, /* 329 */
-  {    51,     12,      3,      0,      0, }, /* 330 */
-  {    31,      7,     12,      0,      0, }, /* 331 */
-  {    31,     12,      3,      0,      0, }, /* 332 */
-  {    31,     10,      5,      0,      0, }, /* 333 */
-  {    31,     21,     12,      0,      0, }, /* 334 */
-  {    31,      6,     12,      0,      0, }, /* 335 */
-  {    31,     23,     12,      0,      0, }, /* 336 */
-  {    31,     13,     12,      0,      0, }, /* 337 */
-  {    31,     15,     12,      0,      0, }, /* 338 */
-  {    37,     21,     12,      0,      0, }, /* 339 */
-  {    37,     17,     12,      0,      0, }, /* 340 */
-  {    37,     12,      3,      0,      0, }, /* 341 */
-  {    37,      1,      2,      0,      0, }, /* 342 */
-  {    37,     13,     12,      0,      0, }, /* 343 */
-  {    37,      7,     12,      0,      0, }, /* 344 */
-  {    37,      6,     12,      0,      0, }, /* 345 */
-  {    34,      7,     12,      0,      0, }, /* 346 */
-  {    34,     12,      3,      0,      0, }, /* 347 */
-  {    34,     10,      5,      0,      0, }, /* 348 */
-  {    34,     26,     12,      0,      0, }, /* 349 */
-  {    34,     21,     12,      0,      0, }, /* 350 */
-  {    34,     13,     12,      0,      0, }, /* 351 */
-  {    52,      7,     12,      0,      0, }, /* 352 */
-  {    39,      7,     12,      0,      0, }, /* 353 */
-  {    39,     10,     12,      0,      0, }, /* 354 */
-  {    39,     10,      5,      0,      0, }, /* 355 */
-  {    39,     13,     12,      0,      0, }, /* 356 */
-  {    39,     15,     12,      0,      0, }, /* 357 */
-  {    39,     26,     12,      0,      0, }, /* 358 */
-  {    31,     26,     12,      0,      0, }, /* 359 */
-  {     5,      7,     12,      0,      0, }, /* 360 */
-  {     5,     12,      3,      0,      0, }, /* 361 */
-  {     5,     10,      5,      0,      0, }, /* 362 */
-  {     5,     21,     12,      0,      0, }, /* 363 */
-  {    90,      7,     12,      0,      0, }, /* 364 */
-  {    90,     10,      5,      0,      0, }, /* 365 */
-  {    90,     12,      3,      0,      0, }, /* 366 */
-  {    90,     10,     12,      0,      0, }, /* 367 */
-  {    90,     13,     12,      0,      0, }, /* 368 */
-  {    90,     21,     12,      0,      0, }, /* 369 */
-  {    90,      6,     12,      0,      0, }, /* 370 */
-  {    61,     12,      3,      0,      0, }, /* 371 */
-  {    61,     10,      5,      0,      0, }, /* 372 */
-  {    61,      7,     12,      0,      0, }, /* 373 */
-  {    61,     13,     12,      0,      0, }, /* 374 */
-  {    61,     21,     12,      0,      0, }, /* 375 */
-  {    61,     26,     12,      0,      0, }, /* 376 */
-  {    75,     12,      3,      0,      0, }, /* 377 */
-  {    75,     10,      5,      0,      0, }, /* 378 */
-  {    75,      7,     12,      0,      0, }, /* 379 */
-  {    75,     13,     12,      0,      0, }, /* 380 */
-  {    92,      7,     12,      0,      0, }, /* 381 */
-  {    92,     12,      3,      0,      0, }, /* 382 */
-  {    92,     10,      5,      0,      0, }, /* 383 */
-  {    92,     21,     12,      0,      0, }, /* 384 */
-  {    69,      7,     12,      0,      0, }, /* 385 */
-  {    69,     10,      5,      0,      0, }, /* 386 */
-  {    69,     12,      3,      0,      0, }, /* 387 */
-  {    69,     21,     12,      0,      0, }, /* 388 */
-  {    69,     13,     12,      0,      0, }, /* 389 */
-  {    72,     13,     12,      0,      0, }, /* 390 */
-  {    72,      7,     12,      0,      0, }, /* 391 */
-  {    72,      6,     12,      0,      0, }, /* 392 */
-  {    72,     21,     12,      0,      0, }, /* 393 */
-  {    75,     21,     12,      0,      0, }, /* 394 */
-  {     9,     10,      5,      0,      0, }, /* 395 */
-  {     9,      7,     12,      0,      0, }, /* 396 */
-  {    12,      5,     12,      0,      0, }, /* 397 */
-  {    12,      6,     12,      0,      0, }, /* 398 */
-  {    33,      5,     12,      0,  35332, }, /* 399 */
-  {    33,      5,     12,      0,   3814, }, /* 400 */
-  {    33,      9,     12,     63,      1, }, /* 401 */
-  {    33,      5,     12,     63,     -1, }, /* 402 */
-  {    33,      5,     12,     63,    -58, }, /* 403 */
-  {    33,      9,     12,      0,  -7615, }, /* 404 */
-  {    19,      5,     12,      0,      8, }, /* 405 */
-  {    19,      9,     12,      0,     -8, }, /* 406 */
-  {    19,      5,     12,      0,     74, }, /* 407 */
-  {    19,      5,     12,      0,     86, }, /* 408 */
-  {    19,      5,     12,      0,    100, }, /* 409 */
-  {    19,      5,     12,      0,    128, }, /* 410 */
-  {    19,      5,     12,      0,    112, }, /* 411 */
-  {    19,      5,     12,      0,    126, }, /* 412 */
-  {    19,      8,     12,      0,     -8, }, /* 413 */
-  {    19,      5,     12,      0,      9, }, /* 414 */
-  {    19,      9,     12,      0,    -74, }, /* 415 */
-  {    19,      8,     12,      0,     -9, }, /* 416 */
-  {    19,      5,     12,     21,  -7173, }, /* 417 */
-  {    19,      9,     12,      0,    -86, }, /* 418 */
-  {    19,      9,     12,      0,   -100, }, /* 419 */
-  {    19,      9,     12,      0,   -112, }, /* 420 */
-  {    19,      9,     12,      0,   -128, }, /* 421 */
-  {    19,      9,     12,      0,   -126, }, /* 422 */
-  {    27,      1,      3,      0,      0, }, /* 423 */
-  {     9,     27,      2,      0,      0, }, /* 424 */
-  {     9,     28,      2,      0,      0, }, /* 425 */
-  {     9,      2,      2,      0,      0, }, /* 426 */
-  {    27,     11,      3,      0,      0, }, /* 427 */
-  {     9,      9,     12,      0,      0, }, /* 428 */
-  {     9,      5,     12,      0,      0, }, /* 429 */
-  {    19,      9,     12,     67,  -7517, }, /* 430 */
-  {    33,      9,     12,     71,  -8383, }, /* 431 */
-  {    33,      9,     12,     75,  -8262, }, /* 432 */
-  {    33,      9,     12,      0,     28, }, /* 433 */
-  {    33,      5,     12,      0,    -28, }, /* 434 */
-  {    33,     14,     12,      0,     16, }, /* 435 */
-  {    33,     14,     12,      0,    -16, }, /* 436 */
-  {    33,     14,     12,      0,      0, }, /* 437 */
-  {     9,     26,     12,      0,     26, }, /* 438 */
-  {     9,     26,     12,      0,    -26, }, /* 439 */
-  {     4,     26,     12,      0,      0, }, /* 440 */
-  {    17,      9,     12,      0,     48, }, /* 441 */
-  {    17,      5,     12,      0,    -48, }, /* 442 */
-  {    33,      9,     12,      0, -10743, }, /* 443 */
-  {    33,      9,     12,      0,  -3814, }, /* 444 */
-  {    33,      9,     12,      0, -10727, }, /* 445 */
-  {    33,      5,     12,      0, -10795, }, /* 446 */
-  {    33,      5,     12,      0, -10792, }, /* 447 */
-  {    33,      9,     12,      0, -10780, }, /* 448 */
-  {    33,      9,     12,      0, -10749, }, /* 449 */
-  {    33,      9,     12,      0, -10783, }, /* 450 */
-  {    33,      9,     12,      0, -10782, }, /* 451 */
-  {    33,      9,     12,      0, -10815, }, /* 452 */
-  {    10,      5,     12,      0,      0, }, /* 453 */
-  {    10,     26,     12,      0,      0, }, /* 454 */
-  {    10,     12,      3,      0,      0, }, /* 455 */
-  {    10,     21,     12,      0,      0, }, /* 456 */
-  {    10,     15,     12,      0,      0, }, /* 457 */
-  {    16,      5,     12,      0,  -7264, }, /* 458 */
-  {    58,      7,     12,      0,      0, }, /* 459 */
-  {    58,      6,     12,      0,      0, }, /* 460 */
-  {    58,     21,     12,      0,      0, }, /* 461 */
-  {    58,     12,      3,      0,      0, }, /* 462 */
-  {    22,     26,     12,      0,      0, }, /* 463 */
-  {    22,      6,     12,      0,      0, }, /* 464 */
-  {    22,     14,     12,      0,      0, }, /* 465 */
-  {    23,     10,      3,      0,      0, }, /* 466 */
-  {    26,      7,     12,      0,      0, }, /* 467 */
-  {    26,      6,     12,      0,      0, }, /* 468 */
-  {    29,      7,     12,      0,      0, }, /* 469 */
-  {    29,      6,     12,      0,      0, }, /* 470 */
-  {     3,      7,     12,      0,      0, }, /* 471 */
-  {    23,      7,     12,      0,      0, }, /* 472 */
-  {    23,     26,     12,      0,      0, }, /* 473 */
-  {    29,     26,     12,      0,      0, }, /* 474 */
-  {    22,      7,     12,      0,      0, }, /* 475 */
-  {    60,      7,     12,      0,      0, }, /* 476 */
-  {    60,      6,     12,      0,      0, }, /* 477 */
-  {    60,     26,     12,      0,      0, }, /* 478 */
-  {    85,      7,     12,      0,      0, }, /* 479 */
-  {    85,      6,     12,      0,      0, }, /* 480 */
-  {    85,     21,     12,      0,      0, }, /* 481 */
-  {    76,      7,     12,      0,      0, }, /* 482 */
-  {    76,      6,     12,      0,      0, }, /* 483 */
-  {    76,     21,     12,      0,      0, }, /* 484 */
-  {    76,     13,     12,      0,      0, }, /* 485 */
-  {    12,      7,     12,      0,      0, }, /* 486 */
-  {    12,     21,     12,      0,      0, }, /* 487 */
-  {    78,      7,     12,      0,      0, }, /* 488 */
-  {    78,     14,     12,      0,      0, }, /* 489 */
-  {    78,     12,      3,      0,      0, }, /* 490 */
-  {    78,     21,     12,      0,      0, }, /* 491 */
-  {    33,      9,     12,      0, -35332, }, /* 492 */
-  {    33,      9,     12,      0, -42280, }, /* 493 */
-  {    33,      9,     12,      0, -42308, }, /* 494 */
-  {    48,      7,     12,      0,      0, }, /* 495 */
-  {    48,     12,      3,      0,      0, }, /* 496 */
-  {    48,     10,      5,      0,      0, }, /* 497 */
-  {    48,     26,     12,      0,      0, }, /* 498 */
-  {    64,      7,     12,      0,      0, }, /* 499 */
-  {    64,     21,     12,      0,      0, }, /* 500 */
-  {    74,     10,      5,      0,      0, }, /* 501 */
-  {    74,      7,     12,      0,      0, }, /* 502 */
-  {    74,     12,      3,      0,      0, }, /* 503 */
-  {    74,     21,     12,      0,      0, }, /* 504 */
-  {    74,     13,     12,      0,      0, }, /* 505 */
-  {    68,     13,     12,      0,      0, }, /* 506 */
-  {    68,      7,     12,      0,      0, }, /* 507 */
-  {    68,     12,      3,      0,      0, }, /* 508 */
-  {    68,     21,     12,      0,      0, }, /* 509 */
-  {    73,      7,     12,      0,      0, }, /* 510 */
-  {    73,     12,      3,      0,      0, }, /* 511 */
-  {    73,     10,      5,      0,      0, }, /* 512 */
-  {    73,     21,     12,      0,      0, }, /* 513 */
-  {    83,     12,      3,      0,      0, }, /* 514 */
-  {    83,     10,      5,      0,      0, }, /* 515 */
-  {    83,      7,     12,      0,      0, }, /* 516 */
-  {    83,     21,     12,      0,      0, }, /* 517 */
-  {    83,     13,     12,      0,      0, }, /* 518 */
-  {    67,      7,     12,      0,      0, }, /* 519 */
-  {    67,     12,      3,      0,      0, }, /* 520 */
-  {    67,     10,      5,      0,      0, }, /* 521 */
-  {    67,     13,     12,      0,      0, }, /* 522 */
-  {    67,     21,     12,      0,      0, }, /* 523 */
-  {    38,      6,     12,      0,      0, }, /* 524 */
-  {    91,      7,     12,      0,      0, }, /* 525 */
-  {    91,     12,      3,      0,      0, }, /* 526 */
-  {    91,      6,     12,      0,      0, }, /* 527 */
-  {    91,     21,     12,      0,      0, }, /* 528 */
-  {    86,      7,     12,      0,      0, }, /* 529 */
-  {    86,     10,      5,      0,      0, }, /* 530 */
-  {    86,     12,      3,      0,      0, }, /* 531 */
-  {    86,     21,     12,      0,      0, }, /* 532 */
-  {    86,      6,     12,      0,      0, }, /* 533 */
-  {    86,     13,     12,      0,      0, }, /* 534 */
-  {    23,      7,      9,      0,      0, }, /* 535 */
-  {    23,      7,     10,      0,      0, }, /* 536 */
-  {     9,      4,      2,      0,      0, }, /* 537 */
-  {     9,      3,     12,      0,      0, }, /* 538 */
-  {    25,     25,     12,      0,      0, }, /* 539 */
-  {     0,     24,     12,      0,      0, }, /* 540 */
-  {     9,      6,      3,      0,      0, }, /* 541 */
-  {    35,      7,     12,      0,      0, }, /* 542 */
-  {    19,     14,     12,      0,      0, }, /* 543 */
-  {    19,     15,     12,      0,      0, }, /* 544 */
-  {    19,     26,     12,      0,      0, }, /* 545 */
-  {    70,      7,     12,      0,      0, }, /* 546 */
-  {    66,      7,     12,      0,      0, }, /* 547 */
-  {    41,      7,     12,      0,      0, }, /* 548 */
-  {    41,     15,     12,      0,      0, }, /* 549 */
-  {    18,      7,     12,      0,      0, }, /* 550 */
-  {    18,     14,     12,      0,      0, }, /* 551 */
-  {    59,      7,     12,      0,      0, }, /* 552 */
-  {    59,     21,     12,      0,      0, }, /* 553 */
-  {    42,      7,     12,      0,      0, }, /* 554 */
-  {    42,     21,     12,      0,      0, }, /* 555 */
-  {    42,     14,     12,      0,      0, }, /* 556 */
-  {    13,      9,     12,      0,     40, }, /* 557 */
-  {    13,      5,     12,      0,    -40, }, /* 558 */
-  {    46,      7,     12,      0,      0, }, /* 559 */
-  {    44,      7,     12,      0,      0, }, /* 560 */
-  {    44,     13,     12,      0,      0, }, /* 561 */
-  {    11,      7,     12,      0,      0, }, /* 562 */
-  {    80,      7,     12,      0,      0, }, /* 563 */
-  {    80,     21,     12,      0,      0, }, /* 564 */
-  {    80,     15,     12,      0,      0, }, /* 565 */
-  {    65,      7,     12,      0,      0, }, /* 566 */
-  {    65,     15,     12,      0,      0, }, /* 567 */
-  {    65,     21,     12,      0,      0, }, /* 568 */
-  {    71,      7,     12,      0,      0, }, /* 569 */
-  {    71,     21,     12,      0,      0, }, /* 570 */
-  {    97,      7,     12,      0,      0, }, /* 571 */
-  {    96,      7,     12,      0,      0, }, /* 572 */
-  {    30,      7,     12,      0,      0, }, /* 573 */
-  {    30,     12,      3,      0,      0, }, /* 574 */
-  {    30,     15,     12,      0,      0, }, /* 575 */
-  {    30,     21,     12,      0,      0, }, /* 576 */
-  {    87,      7,     12,      0,      0, }, /* 577 */
-  {    87,     15,     12,      0,      0, }, /* 578 */
-  {    87,     21,     12,      0,      0, }, /* 579 */
-  {    77,      7,     12,      0,      0, }, /* 580 */
-  {    77,     21,     12,      0,      0, }, /* 581 */
-  {    82,      7,     12,      0,      0, }, /* 582 */
-  {    82,     15,     12,      0,      0, }, /* 583 */
-  {    81,      7,     12,      0,      0, }, /* 584 */
-  {    81,     15,     12,      0,      0, }, /* 585 */
-  {    88,      7,     12,      0,      0, }, /* 586 */
-  {     0,     15,     12,      0,      0, }, /* 587 */
-  {    93,     10,      5,      0,      0, }, /* 588 */
-  {    93,     12,      3,      0,      0, }, /* 589 */
-  {    93,      7,     12,      0,      0, }, /* 590 */
-  {    93,     21,     12,      0,      0, }, /* 591 */
-  {    93,     15,     12,      0,      0, }, /* 592 */
-  {    93,     13,     12,      0,      0, }, /* 593 */
-  {    84,     12,      3,      0,      0, }, /* 594 */
-  {    84,     10,      5,      0,      0, }, /* 595 */
-  {    84,      7,     12,      0,      0, }, /* 596 */
-  {    84,     21,     12,      0,      0, }, /* 597 */
-  {    84,      1,      2,      0,      0, }, /* 598 */
-  {   100,      7,     12,      0,      0, }, /* 599 */
-  {   100,     13,     12,      0,      0, }, /* 600 */
-  {    95,     12,      3,      0,      0, }, /* 601 */
-  {    95,      7,     12,      0,      0, }, /* 602 */
-  {    95,     10,      5,      0,      0, }, /* 603 */
-  {    95,     13,     12,      0,      0, }, /* 604 */
-  {    95,     21,     12,      0,      0, }, /* 605 */
-  {    99,     12,      3,      0,      0, }, /* 606 */
-  {    99,     10,      5,      0,      0, }, /* 607 */
-  {    99,      7,     12,      0,      0, }, /* 608 */
-  {    99,     21,     12,      0,      0, }, /* 609 */
-  {    99,     13,     12,      0,      0, }, /* 610 */
-  {   101,      7,     12,      0,      0, }, /* 611 */
-  {   101,     12,      3,      0,      0, }, /* 612 */
-  {   101,     10,      5,      0,      0, }, /* 613 */
-  {   101,     13,     12,      0,      0, }, /* 614 */
-  {    62,      7,     12,      0,      0, }, /* 615 */
-  {    62,     14,     12,      0,      0, }, /* 616 */
-  {    62,     21,     12,      0,      0, }, /* 617 */
-  {    79,      7,     12,      0,      0, }, /* 618 */
-  {    98,      7,     12,      0,      0, }, /* 619 */
-  {    98,     10,      5,      0,      0, }, /* 620 */
-  {    98,     12,      3,      0,      0, }, /* 621 */
-  {    98,      6,     12,      0,      0, }, /* 622 */
-  {     9,     10,      3,      0,      0, }, /* 623 */
-  {    19,     12,      3,      0,      0, }, /* 624 */
-  {     9,     26,     11,      0,      0, }, /* 625 */
-  {    26,     26,     12,      0,      0, }, /* 626 */
-};
-
-const pcre_uint8 PRIV(ucd_stage1)[] = { /* 8704 bytes */
-  0,  1,  2,  3,  4,  5,  6,  7,  8,  9, 10, 11, 12, 13, 14, 15, /* U+0000 */
- 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, /* U+0800 */
- 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 41, 41, 42, 43, 44, 45, /* U+1000 */
- 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, /* U+1800 */
- 62, 63, 64, 65, 66, 66, 67, 68, 69, 70, 71, 72, 73, 71, 74, 75, /* U+2000 */
- 76, 76, 66, 77, 66, 66, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, /* U+2800 */
- 88, 89, 90, 91, 92, 93, 94, 71, 95, 95, 95, 95, 95, 95, 95, 95, /* U+3000 */
- 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, /* U+3800 */
- 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, /* U+4000 */
- 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 96, 95, 95, 95, 95, /* U+4800 */
- 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, /* U+5000 */
- 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, /* U+5800 */
- 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, /* U+6000 */
- 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, /* U+6800 */
- 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, /* U+7000 */
- 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, /* U+7800 */
- 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, /* U+8000 */
- 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, /* U+8800 */
- 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, /* U+9000 */
- 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 97, /* U+9800 */
- 98, 99, 99, 99, 99, 99, 99, 99, 99,100,101,101,102,103,104,105, /* U+A000 */
-106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,114, /* U+A800 */
-115,116,117,118,119,120,114,115,116,117,118,119,120,114,115,116, /* U+B000 */
-117,118,119,120,114,115,116,117,118,119,120,114,115,116,117,118, /* U+B800 */
-119,120,114,115,116,117,118,119,120,114,115,116,117,118,119,120, /* U+C000 */
-114,115,116,117,118,119,120,114,115,116,117,118,119,120,114,115, /* U+C800 */
-116,117,118,119,120,114,115,116,117,118,119,120,114,115,116,121, /* U+D000 */
-122,122,122,122,122,122,122,122,122,122,122,122,122,122,122,122, /* U+D800 */
-123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123, /* U+E000 */
-123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123, /* U+E800 */
-123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123, /* U+F000 */
-123,123, 95, 95,124,125,126,127,128,128,129,130,131,132,133,134, /* U+F800 */
-135,136,137,138, 79,139,140,141,142,143, 79, 79, 79, 79, 79, 79, /* U+10000 */
-144, 79,145,146,147, 79,148, 79,149, 79, 79, 79,150, 79, 79, 79, /* U+10800 */
-151,152,153,154, 79, 79, 79, 79, 79, 79, 79, 79, 79,155, 79, 79, /* U+11000 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+11800 */
-156,156,156,156,156,156,157, 79,158, 79, 79, 79, 79, 79, 79, 79, /* U+12000 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+12800 */
-159,159,159,159,159,159,159,159,160, 79, 79, 79, 79, 79, 79, 79, /* U+13000 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+13800 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+14000 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+14800 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+15000 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+15800 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+16000 */
-161,161,161,161,162, 79, 79, 79, 79, 79, 79, 79, 79, 79,163,164, /* U+16800 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+17000 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+17800 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+18000 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+18800 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+19000 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+19800 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+1A000 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+1A800 */
-165, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+1B000 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+1B800 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+1C000 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+1C800 */
- 71,166,167,168,169, 79,170, 79,171,172,173,174,175,176,177,178, /* U+1D000 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+1D800 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+1E000 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79,179,180, 79, 79, /* U+1E800 */
-181,182,183,184,185, 79,186,187,188,189,190,191,192,193,194, 79, /* U+1F000 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+1F800 */
- 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, /* U+20000 */
- 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, /* U+20800 */
- 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, /* U+21000 */
- 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, /* U+21800 */
- 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, /* U+22000 */
- 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, /* U+22800 */
- 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, /* U+23000 */
- 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, /* U+23800 */
- 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, /* U+24000 */
- 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, /* U+24800 */
- 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, /* U+25000 */
- 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, /* U+25800 */
- 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, /* U+26000 */
- 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, /* U+26800 */
- 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, /* U+27000 */
- 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, /* U+27800 */
- 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, /* U+28000 */
- 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, /* U+28800 */
- 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, /* U+29000 */
- 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, /* U+29800 */
- 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,195, 95, 95, /* U+2A000 */
- 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, /* U+2A800 */
- 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,196, 95, /* U+2B000 */
-197, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+2B800 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+2C000 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+2C800 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+2D000 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+2D800 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+2E000 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+2E800 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+2F000 */
- 95, 95, 95, 95,197, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+2F800 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+30000 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+30800 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+31000 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+31800 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+32000 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+32800 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+33000 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+33800 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+34000 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+34800 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+35000 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+35800 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+36000 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+36800 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+37000 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+37800 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+38000 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+38800 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+39000 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+39800 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+3A000 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+3A800 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+3B000 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+3B800 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+3C000 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+3C800 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+3D000 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+3D800 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+3E000 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+3E800 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+3F000 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+3F800 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+40000 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+40800 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+41000 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+41800 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+42000 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+42800 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+43000 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+43800 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+44000 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+44800 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+45000 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+45800 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+46000 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+46800 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+47000 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+47800 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+48000 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+48800 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+49000 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+49800 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+4A000 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+4A800 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+4B000 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+4B800 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+4C000 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+4C800 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+4D000 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+4D800 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+4E000 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+4E800 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+4F000 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+4F800 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+50000 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+50800 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+51000 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+51800 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+52000 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+52800 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+53000 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+53800 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+54000 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+54800 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+55000 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+55800 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+56000 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+56800 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+57000 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+57800 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+58000 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+58800 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+59000 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+59800 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+5A000 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+5A800 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+5B000 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+5B800 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+5C000 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+5C800 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+5D000 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+5D800 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+5E000 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+5E800 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+5F000 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+5F800 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+60000 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+60800 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+61000 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+61800 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+62000 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+62800 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+63000 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+63800 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+64000 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+64800 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+65000 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+65800 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+66000 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+66800 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+67000 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+67800 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+68000 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+68800 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+69000 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+69800 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+6A000 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+6A800 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+6B000 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+6B800 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+6C000 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+6C800 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+6D000 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+6D800 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+6E000 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+6E800 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+6F000 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+6F800 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+70000 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+70800 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+71000 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+71800 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+72000 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+72800 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+73000 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+73800 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+74000 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+74800 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+75000 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+75800 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+76000 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+76800 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+77000 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+77800 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+78000 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+78800 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+79000 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+79800 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+7A000 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+7A800 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+7B000 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+7B800 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+7C000 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+7C800 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+7D000 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+7D800 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+7E000 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+7E800 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+7F000 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+7F800 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+80000 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+80800 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+81000 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+81800 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+82000 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+82800 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+83000 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+83800 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+84000 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+84800 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+85000 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+85800 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+86000 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+86800 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+87000 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+87800 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+88000 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+88800 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+89000 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+89800 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+8A000 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+8A800 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+8B000 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+8B800 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+8C000 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+8C800 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+8D000 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+8D800 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+8E000 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+8E800 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+8F000 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+8F800 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+90000 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+90800 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+91000 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+91800 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+92000 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+92800 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+93000 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+93800 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+94000 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+94800 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+95000 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+95800 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+96000 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+96800 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+97000 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+97800 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+98000 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+98800 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+99000 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+99800 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+9A000 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+9A800 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+9B000 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+9B800 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+9C000 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+9C800 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+9D000 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+9D800 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+9E000 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+9E800 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+9F000 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+9F800 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+A0000 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+A0800 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+A1000 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+A1800 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+A2000 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+A2800 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+A3000 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+A3800 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+A4000 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+A4800 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+A5000 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+A5800 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+A6000 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+A6800 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+A7000 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+A7800 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+A8000 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+A8800 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+A9000 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+A9800 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+AA000 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+AA800 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+AB000 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+AB800 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+AC000 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+AC800 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+AD000 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+AD800 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+AE000 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+AE800 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+AF000 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+AF800 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+B0000 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+B0800 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+B1000 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+B1800 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+B2000 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+B2800 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+B3000 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+B3800 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+B4000 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+B4800 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+B5000 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+B5800 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+B6000 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+B6800 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+B7000 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+B7800 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+B8000 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+B8800 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+B9000 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+B9800 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+BA000 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+BA800 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+BB000 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+BB800 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+BC000 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+BC800 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+BD000 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+BD800 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+BE000 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+BE800 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+BF000 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+BF800 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+C0000 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+C0800 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+C1000 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+C1800 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+C2000 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+C2800 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+C3000 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+C3800 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+C4000 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+C4800 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+C5000 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+C5800 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+C6000 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+C6800 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+C7000 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+C7800 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+C8000 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+C8800 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+C9000 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+C9800 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+CA000 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+CA800 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+CB000 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+CB800 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+CC000 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+CC800 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+CD000 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+CD800 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+CE000 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+CE800 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+CF000 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+CF800 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+D0000 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+D0800 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+D1000 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+D1800 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+D2000 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+D2800 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+D3000 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+D3800 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+D4000 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+D4800 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+D5000 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+D5800 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+D6000 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+D6800 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+D7000 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+D7800 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+D8000 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+D8800 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+D9000 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+D9800 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+DA000 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+DA800 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+DB000 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+DB800 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+DC000 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+DC800 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+DD000 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+DD800 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+DE000 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+DE800 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+DF000 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+DF800 */
-198,199,200,201,199,199,199,199,199,199,199,199,199,199,199,199, /* U+E0000 */
-199,199,199,199,199,199,199,199,199,199,199,199,199,199,199,199, /* U+E0800 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+E1000 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+E1800 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+E2000 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+E2800 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+E3000 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+E3800 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+E4000 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+E4800 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+E5000 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+E5800 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+E6000 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+E6800 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+E7000 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+E7800 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+E8000 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+E8800 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+E9000 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+E9800 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+EA000 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+EA800 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+EB000 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+EB800 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+EC000 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+EC800 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+ED000 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+ED800 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+EE000 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+EE800 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+EF000 */
- 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* U+EF800 */
-123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123, /* U+F0000 */
-123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123, /* U+F0800 */
-123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123, /* U+F1000 */
-123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123, /* U+F1800 */
-123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123, /* U+F2000 */
-123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123, /* U+F2800 */
-123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123, /* U+F3000 */
-123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123, /* U+F3800 */
-123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123, /* U+F4000 */
-123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123, /* U+F4800 */
-123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123, /* U+F5000 */
-123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123, /* U+F5800 */
-123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123, /* U+F6000 */
-123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123, /* U+F6800 */
-123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123, /* U+F7000 */
-123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123, /* U+F7800 */
-123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123, /* U+F8000 */
-123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123, /* U+F8800 */
-123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123, /* U+F9000 */
-123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123, /* U+F9800 */
-123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123, /* U+FA000 */
-123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123, /* U+FA800 */
-123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123, /* U+FB000 */
-123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123, /* U+FB800 */
-123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123, /* U+FC000 */
-123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123, /* U+FC800 */
-123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123, /* U+FD000 */
-123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123, /* U+FD800 */
-123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123, /* U+FE000 */
-123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123, /* U+FE800 */
-123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123, /* U+FF000 */
-123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,202, /* U+FF800 */
-123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123, /* U+100000 */
-123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123, /* U+100800 */
-123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123, /* U+101000 */
-123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123, /* U+101800 */
-123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123, /* U+102000 */
-123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123, /* U+102800 */
-123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123, /* U+103000 */
-123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123, /* U+103800 */
-123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123, /* U+104000 */
-123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123, /* U+104800 */
-123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123, /* U+105000 */
-123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123, /* U+105800 */
-123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123, /* U+106000 */
-123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123, /* U+106800 */
-123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123, /* U+107000 */
-123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123, /* U+107800 */
-123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123, /* U+108000 */
-123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123, /* U+108800 */
-123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123, /* U+109000 */
-123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123, /* U+109800 */
-123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123, /* U+10A000 */
-123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123, /* U+10A800 */
-123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123, /* U+10B000 */
-123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123, /* U+10B800 */
-123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123, /* U+10C000 */
-123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123, /* U+10C800 */
-123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123, /* U+10D000 */
-123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123, /* U+10D800 */
-123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123, /* U+10E000 */
-123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123, /* U+10E800 */
-123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123, /* U+10F000 */
-123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,202, /* U+10F800 */
-};
-
-const pcre_uint16 PRIV(ucd_stage2)[] = { /* 51968 bytes, block = 128 */
-/* block 0 */
-  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  1,  0,  0,  2,  0,  0,
-  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
-  3,  4,  4,  4,  5,  4,  4,  4,  6,  7,  4,  8,  4,  9,  4,  4,
- 10, 10, 10, 10, 10, 10, 10, 10, 10, 10,  4,  4,  8,  8,  8,  4,
-  4, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 12, 11, 11, 11, 11,
- 11, 11, 11, 13, 11, 11, 11, 11, 11, 11, 11,  6,  4,  7, 14, 15,
- 14, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 17, 16, 16, 16, 16,
- 16, 16, 16, 18, 16, 16, 16, 16, 16, 16, 16,  6,  8,  7,  8,  0,
-
-/* block 1 */
-  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
-  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
-  3,  4,  5,  5,  5,  5, 19,  4, 14, 19, 20, 21,  8, 22, 19, 14,
- 19,  8, 23, 23, 14, 24,  4,  4, 14, 23, 20, 25, 23, 23, 23,  4,
- 11, 11, 11, 11, 11, 26, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11,
- 11, 11, 11, 11, 11, 11, 11,  8, 11, 11, 11, 11, 11, 11, 11, 27,
- 16, 16, 16, 16, 16, 28, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
- 16, 16, 16, 16, 16, 16, 16,  8, 16, 16, 16, 16, 16, 16, 16, 29,
-
-/* block 2 */
- 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31,
- 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31,
- 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31,
- 32, 33, 30, 31, 30, 31, 30, 31, 33, 30, 31, 30, 31, 30, 31, 30,
- 31, 30, 31, 30, 31, 30, 31, 30, 31, 33, 30, 31, 30, 31, 30, 31,
- 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31,
- 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31,
- 30, 31, 30, 31, 30, 31, 30, 31, 34, 30, 31, 30, 31, 30, 31, 35,
-
-/* block 3 */
- 36, 37, 30, 31, 30, 31, 38, 30, 31, 39, 39, 30, 31, 33, 40, 41,
- 42, 30, 31, 39, 43, 44, 45, 46, 30, 31, 47, 33, 45, 48, 49, 50,
- 30, 31, 30, 31, 30, 31, 51, 30, 31, 51, 33, 33, 30, 31, 51, 30,
- 31, 52, 52, 30, 31, 30, 31, 53, 30, 31, 33, 20, 30, 31, 33, 54,
- 20, 20, 20, 20, 55, 56, 57, 58, 59, 60, 61, 62, 63, 30, 31, 30,
- 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 64, 30, 31,
- 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31,
- 33, 65, 66, 67, 30, 31, 68, 69, 30, 31, 30, 31, 30, 31, 30, 31,
-
-/* block 4 */
- 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31,
- 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31,
- 70, 33, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31,
- 30, 31, 30, 31, 33, 33, 33, 33, 33, 33, 71, 30, 31, 72, 73, 74,
- 74, 30, 31, 75, 76, 77, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31,
- 78, 79, 80, 81, 82, 33, 83, 83, 33, 84, 33, 85, 33, 33, 33, 33,
- 83, 33, 33, 86, 33, 87, 88, 33, 89, 90, 33, 91, 33, 33, 33, 90,
- 33, 92, 93, 33, 33, 94, 33, 33, 33, 33, 33, 33, 33, 95, 33, 33,
-
-/* block 5 */
- 96, 33, 33, 96, 33, 33, 33, 33, 96, 97, 98, 98, 99, 33, 33, 33,
- 33, 33,100, 33, 20, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33,
- 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33,
-101,101,101,101,101,101,101,101,101,102,102,102,102,102,102,102,
-102,102, 14, 14, 14, 14,102,102,102,102,102,102,102,102,102,102,
-102,102, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14,
-101,101,101,101,101, 14, 14, 14, 14, 14,103,103,102, 14,102, 14,
- 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14,
-
-/* block 6 */
-104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,
-104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,
-104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,
-104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,
-104,104,104,104,104,105,104,104,104,104,104,104,104,104,104,104,
-104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,
-104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,
-106,107,106,107,102,108,106,107,109,109,110,111,111,111,  4,109,
-
-/* block 7 */
-109,109,109,109,108, 14,112,  4,113,113,113,109,114,109,115,115,
-116,117,118,117,117,119,117,117,120,121,122,117,123,117,117,117,
-124,125,109,126,117,117,127,117,117,128,117,117,129,130,130,130,
-116,131,132,131,131,133,131,131,134,135,136,131,137,131,131,131,
-138,139,140,141,131,131,142,131,131,143,131,131,144,145,145,146,
-147,148,149,149,149,150,151,152,106,107,106,107,106,107,106,107,
-106,107,153,154,153,154,153,154,153,154,153,154,153,154,153,154,
-155,156,157,116,158,159,160,106,107,161,106,107,116,162,162,162,
-
-/* block 8 */
-163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,
-164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,
-164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,
-165,165,165,165,165,165,165,165,165,165,165,165,165,165,165,165,
-165,165,165,165,165,165,165,165,165,165,165,165,165,165,165,165,
-166,166,166,166,166,166,166,166,166,166,166,166,166,166,166,166,
-167,168,167,168,167,168,167,168,167,168,167,168,167,168,167,168,
-167,168,167,168,167,168,167,168,167,168,167,168,167,168,167,168,
-
-/* block 9 */
-167,168,169,170,170,104,104,170,171,171,167,168,167,168,167,168,
-167,168,167,168,167,168,167,168,167,168,167,168,167,168,167,168,
-167,168,167,168,167,168,167,168,167,168,167,168,167,168,167,168,
-167,168,167,168,167,168,167,168,167,168,167,168,167,168,167,168,
-172,167,168,167,168,167,168,167,168,167,168,167,168,167,168,173,
-167,168,167,168,167,168,167,168,167,168,167,168,167,168,167,168,
-167,168,167,168,167,168,167,168,167,168,167,168,167,168,167,168,
-167,168,167,168,167,168,167,168,167,168,167,168,167,168,167,168,
-
-/* block 10 */
-167,168,167,168,167,168,167,168,167,168,167,168,167,168,167,168,
-167,168,167,168,167,168,167,168,167,168,167,168,167,168,167,168,
-167,168,167,168,167,168,167,168,109,109,109,109,109,109,109,109,
-109,174,174,174,174,174,174,174,174,174,174,174,174,174,174,174,
-174,174,174,174,174,174,174,174,174,174,174,174,174,174,174,174,
-174,174,174,174,174,174,174,109,109,175,176,176,176,176,176,176,
-109,177,177,177,177,177,177,177,177,177,177,177,177,177,177,177,
-177,177,177,177,177,177,177,177,177,177,177,177,177,177,177,177,
-
-/* block 11 */
-177,177,177,177,177,177,177,178,109,  4,179,109,109,109,109,180,
-109,181,181,181,181,181,181,181,181,181,181,181,181,181,181,181,
-181,181,181,181,181,181,181,181,181,181,181,181,181,181,181,181,
-181,181,181,181,181,181,181,181,181,181,181,181,181,181,182,181,
-183,181,181,183,181,181,183,181,109,109,109,109,109,109,109,109,
-184,184,184,184,184,184,184,184,184,184,184,184,184,184,184,184,
-184,184,184,184,184,184,184,184,184,184,184,109,109,109,109,109,
-184,184,184,183,183,109,109,109,109,109,109,109,109,109,109,109,
-
-/* block 12 */
-185,185,185,185,185,109,186,186,186,187,187,188,  4,187,189,189,
-190,190,190,190,190,190,190,190,190,190,190,  4,185,109,187,  4,
-191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,
-191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,
-102,191,191,191,191,191,191,191,191,191,191,104,104,104,104,104,
-104,104,104,104,104,104,190,190,190,190,190,190,190,190,190,190,
- 10, 10, 10, 10, 10, 10, 10, 10, 10, 10,187,187,187,187,191,191,
-104,191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,
-
-/* block 13 */
-191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,
-191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,
-191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,
-191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,
-191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,
-191,191,191,191,187,191,190,190,190,190,190,190,190, 22,189,190,
-190,190,190,190,190,192,192,190,190,189,190,190,190,190,191,191,
-193,193,193,193,193,193,193,193,193,193,191,191,191,189,189,191,
-
-/* block 14 */
-194,194,194,194,194,194,194,194,194,194,194,194,194,194,109,195,
-196,197,196,196,196,196,196,196,196,196,196,196,196,196,196,196,
-196,196,196,196,196,196,196,196,196,196,196,196,196,196,196,196,
-197,197,197,197,197,197,197,197,197,197,197,197,197,197,197,197,
-197,197,197,197,197,197,197,197,197,197,197,109,109,196,196,196,
-191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,
-191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,
-191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,
-
-/* block 15 */
-198,198,198,198,198,198,198,198,198,198,198,198,198,198,198,198,
-198,198,198,198,198,198,198,198,198,198,198,198,198,198,198,198,
-198,198,198,198,198,198,199,199,199,199,199,199,199,199,199,199,
-199,198,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
-200,200,200,200,200,200,200,200,200,200,201,201,201,201,201,201,
-201,201,201,201,201,201,201,201,201,201,201,201,201,201,201,201,
-201,201,201,201,201,201,201,201,201,201,201,202,202,202,202,202,
-202,202,202,202,203,203,204,205,205,205,203,109,109,109,109,109,
-
-/* block 16 */
-206,206,206,206,206,206,206,206,206,206,206,206,206,206,206,206,
-206,206,206,206,206,206,207,207,207,207,208,207,207,207,207,207,
-207,207,207,207,208,207,207,207,208,207,207,207,207,207,109,109,
-209,209,209,209,209,209,209,209,209,209,209,209,209,209,209,109,
-210,210,210,210,210,210,210,210,210,210,210,210,210,210,210,210,
-210,210,210,210,210,210,210,210,210,211,211,211,109,109,212,109,
-109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
-109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
-
-/* block 17 */
-109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
-109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
-191,109,191,191,191,191,191,191,191,191,191,191,191,109,109,109,
-109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
-109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
-109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
-109,109,109,109,190,190,190,190,190,190,190,190,190,190,190,190,
-190,190,190,190,190,190,190,190,190,190,190,190,190,190,190,109,
-
-/* block 18 */
-213,213,213,214,215,215,215,215,215,215,215,215,215,215,215,215,
-215,215,215,215,215,215,215,215,215,215,215,215,215,215,215,215,
-215,215,215,215,215,215,215,215,215,215,215,215,215,215,215,215,
-215,215,215,215,215,215,215,215,215,215,213,214,213,215,214,214,
-214,213,213,213,213,213,213,213,213,214,214,214,214,213,214,214,
-215,104,104,213,213,213,213,213,215,215,215,215,215,215,215,215,
-215,215,213,213,  4,  4,216,216,216,216,216,216,216,216,216,216,
-217,218,215,215,215,215,215,215,109,215,215,215,215,215,215,215,
-
-/* block 19 */
-109,219,220,220,109,221,221,221,221,221,221,221,221,109,109,221,
-221,109,109,221,221,221,221,221,221,221,221,221,221,221,221,221,
-221,221,221,221,221,221,221,221,221,109,221,221,221,221,221,221,
-221,109,221,109,109,109,221,221,221,221,109,109,219,221,222,220,
-220,219,219,219,219,109,109,220,220,109,109,220,220,219,221,109,
-109,109,109,109,109,109,109,222,109,109,109,109,221,221,109,221,
-221,221,219,219,109,109,223,223,223,223,223,223,223,223,223,223,
-221,221,224,224,225,225,225,225,225,225,226,224,109,109,109,109,
-
-/* block 20 */
-109,227,227,228,109,229,229,229,229,229,229,109,109,109,109,229,
-229,109,109,229,229,229,229,229,229,229,229,229,229,229,229,229,
-229,229,229,229,229,229,229,229,229,109,229,229,229,229,229,229,
-229,109,229,229,109,229,229,109,229,229,109,109,227,109,228,228,
-228,227,227,109,109,109,109,227,227,109,109,227,227,227,109,109,
-109,227,109,109,109,109,109,109,109,229,229,229,229,109,229,109,
-109,109,109,109,109,109,230,230,230,230,230,230,230,230,230,230,
-227,227,229,229,229,227,109,109,109,109,109,109,109,109,109,109,
-
-/* block 21 */
-109,231,231,232,109,233,233,233,233,233,233,233,233,233,109,233,
-233,233,109,233,233,233,233,233,233,233,233,233,233,233,233,233,
-233,233,233,233,233,233,233,233,233,109,233,233,233,233,233,233,
-233,109,233,233,109,233,233,233,233,233,109,109,231,233,232,232,
-232,231,231,231,231,231,109,231,231,232,109,232,232,231,109,109,
-233,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
-233,233,231,231,109,109,234,234,234,234,234,234,234,234,234,234,
-235,236,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
-
-/* block 22 */
-109,237,238,238,109,239,239,239,239,239,239,239,239,109,109,239,
-239,109,109,239,239,239,239,239,239,239,239,239,239,239,239,239,
-239,239,239,239,239,239,239,239,239,109,239,239,239,239,239,239,
-239,109,239,239,109,239,239,239,239,239,109,109,237,239,240,237,
-238,237,237,237,237,109,109,238,238,109,109,238,238,237,109,109,
-109,109,109,109,109,109,237,240,109,109,109,109,239,239,109,239,
-239,239,237,237,109,109,241,241,241,241,241,241,241,241,241,241,
-242,239,243,243,243,243,243,243,109,109,109,109,109,109,109,109,
-
-/* block 23 */
-109,109,244,245,109,245,245,245,245,245,245,109,109,109,245,245,
-245,109,245,245,245,245,109,109,109,245,245,109,245,109,245,245,
-109,109,109,245,245,109,109,109,245,245,245,109,109,109,245,245,
-245,245,245,245,245,245,245,245,245,245,109,109,109,109,246,247,
-244,247,247,109,109,109,247,247,247,109,247,247,247,244,109,109,
-245,109,109,109,109,109,109,246,109,109,109,109,109,109,109,109,
-109,109,109,109,109,109,248,248,248,248,248,248,248,248,248,248,
-249,249,249,250,250,250,250,250,250,251,250,109,109,109,109,109,
-
-/* block 24 */
-109,252,252,252,109,253,253,253,253,253,253,253,253,109,253,253,
-253,109,253,253,253,253,253,253,253,253,253,253,253,253,253,253,
-253,253,253,253,253,253,253,253,253,109,253,253,253,253,253,253,
-253,253,253,253,109,253,253,253,253,253,109,109,109,253,254,254,
-254,252,252,252,252,109,254,254,254,109,254,254,254,254,109,109,
-109,109,109,109,109,254,254,109,253,253,109,109,109,109,109,109,
-253,253,254,254,109,109,255,255,255,255,255,255,255,255,255,255,
-109,109,109,109,109,109,109,109,256,256,256,256,256,256,256,257,
-
-/* block 25 */
-109,109,258,258,109,259,259,259,259,259,259,259,259,109,259,259,
-259,109,259,259,259,259,259,259,259,259,259,259,259,259,259,259,
-259,259,259,259,259,259,259,259,259,109,259,259,259,259,259,259,
-259,259,259,259,109,259,259,259,259,259,109,109,260,259,258,260,
-258,258,261,258,258,109,260,258,258,109,258,258,260,260,109,109,
-109,109,109,109,109,261,261,109,109,109,109,109,109,109,259,109,
-259,259,260,260,109,109,262,262,262,262,262,262,262,262,262,262,
-109,259,259,109,109,109,109,109,109,109,109,109,109,109,109,109,
-
-/* block 26 */
-109,109,263,263,109,264,264,264,264,264,264,264,264,109,264,264,
-264,109,264,264,264,264,264,264,264,264,264,264,264,264,264,264,
-264,264,264,264,264,264,264,264,264,264,264,264,264,264,264,264,
-264,264,264,264,264,264,264,264,264,264,264,109,109,264,265,263,
-263,266,266,266,266,109,263,263,263,109,263,263,263,266,264,109,
-109,109,109,109,109,109,109,265,109,109,109,109,109,109,109,109,
-264,264,266,266,109,109,267,267,267,267,267,267,267,267,267,267,
-268,268,268,268,268,268,109,109,109,269,264,264,264,264,264,264,
-
-/* block 27 */
-109,109,270,270,109,271,271,271,271,271,271,271,271,271,271,271,
-271,271,271,271,271,271,271,109,109,109,271,271,271,271,271,271,
-271,271,271,271,271,271,271,271,271,271,271,271,271,271,271,271,
-271,271,109,271,271,271,271,271,271,271,271,271,109,271,109,109,
-271,271,271,271,271,271,271,109,109,109,272,109,109,109,109,273,
-270,270,272,272,272,109,272,109,270,270,270,270,270,270,270,273,
-109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
-109,109,270,270,274,109,109,109,109,109,109,109,109,109,109,109,
-
-/* block 28 */
-109,275,275,275,275,275,275,275,275,275,275,275,275,275,275,275,
-275,275,275,275,275,275,275,275,275,275,275,275,275,275,275,275,
-275,275,275,275,275,275,275,275,275,275,275,275,275,275,275,275,
-275,276,275,277,276,276,276,276,276,276,276,109,109,109,109,  5,
-275,275,275,275,275,275,278,276,276,276,276,276,276,276,276,279,
-280,280,280,280,280,280,280,280,280,280,279,279,109,109,109,109,
-109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
-109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
-
-/* block 29 */
-109,281,281,109,281,109,109,281,281,109,281,109,109,281,109,109,
-109,109,109,109,281,281,281,281,109,281,281,281,281,281,281,281,
-109,281,281,281,109,281,109,281,109,109,281,281,109,281,281,281,
-281,282,281,283,282,282,282,282,282,282,109,282,282,281,109,109,
-281,281,281,281,281,109,284,109,282,282,282,282,282,282,109,109,
-285,285,285,285,285,285,285,285,285,285,109,109,281,281,281,281,
-109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
-109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
-
-/* block 30 */
-286,287,287,287,288,288,288,288,288,288,288,288,288,288,288,288,
-288,288,288,287,288,287,287,287,289,289,287,287,287,287,287,287,
-290,290,290,290,290,290,290,290,290,290,291,291,291,291,291,291,
-291,291,291,291,287,289,287,289,287,289,292,293,292,293,294,294,
-286,286,286,286,286,286,286,286,109,286,286,286,286,286,286,286,
-286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,
-286,286,286,286,286,286,286,286,286,286,286,286,286,109,109,109,
-109,289,289,289,289,289,289,289,289,289,289,289,289,289,289,294,
-
-/* block 31 */
-289,289,289,289,289,288,289,289,286,286,286,286,286,289,289,289,
-289,289,289,289,289,289,289,289,109,289,289,289,289,289,289,289,
-289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,289,
-289,289,289,289,289,289,289,289,289,289,289,289,289,109,287,287,
-287,287,287,287,287,287,289,287,287,287,287,287,287,109,287,287,
-288,288,288,288,288, 19, 19, 19, 19,288,288,109,109,109,109,109,
-109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
-109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
-
-/* block 32 */
-295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,
-295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,
-295,295,295,295,295,295,295,295,295,295,295,296,296,297,297,297,
-297,298,297,297,297,297,297,297,296,297,297,298,298,297,297,295,
-299,299,299,299,299,299,299,299,299,299,300,300,300,300,300,300,
-295,295,295,295,295,295,298,298,297,297,295,295,295,295,297,297,
-297,295,296,296,296,295,295,296,296,296,296,296,296,296,295,295,
-295,297,297,297,297,295,295,295,295,295,295,295,295,295,295,295,
-
-/* block 33 */
-295,295,297,296,298,297,297,296,296,296,296,296,296,297,295,296,
-299,299,299,299,299,299,299,299,299,299,296,296,296,297,301,301,
-302,302,302,302,302,302,302,302,302,302,302,302,302,302,302,302,
-302,302,302,302,302,302,302,302,302,302,302,302,302,302,302,302,
-302,302,302,302,302,302,109,302,109,109,109,109,109,302,109,109,
-303,303,303,303,303,303,303,303,303,303,303,303,303,303,303,303,
-303,303,303,303,303,303,303,303,303,303,303,303,303,303,303,303,
-303,303,303,303,303,303,303,303,303,303,303,  4,304,303,303,303,
-
-/* block 34 */
-305,305,305,305,305,305,305,305,305,305,305,305,305,305,305,305,
-305,305,305,305,305,305,305,305,305,305,305,305,305,305,305,305,
-305,305,305,305,305,305,305,305,305,305,305,305,305,305,305,305,
-305,305,305,305,305,305,305,305,305,305,305,305,305,305,305,305,
-305,305,305,305,305,305,305,305,305,305,305,305,305,305,305,305,
-305,305,305,305,305,305,305,305,305,305,305,305,305,305,305,305,
-306,306,306,306,306,306,306,306,306,306,306,306,306,306,306,306,
-306,306,306,306,306,306,306,306,306,306,306,306,306,306,306,306,
-
-/* block 35 */
-306,306,306,306,306,306,306,306,306,306,306,306,306,306,306,306,
-306,306,306,306,306,306,306,306,306,306,306,306,306,306,306,306,
-306,306,306,306,306,306,306,306,307,307,307,307,307,307,307,307,
-307,307,307,307,307,307,307,307,307,307,307,307,307,307,307,307,
-307,307,307,307,307,307,307,307,307,307,307,307,307,307,307,307,
-307,307,307,307,307,307,307,307,307,307,307,307,307,307,307,307,
-307,307,307,307,307,307,307,307,307,307,307,307,307,307,307,307,
-307,307,307,307,307,307,307,307,307,307,307,307,307,307,307,307,
-
-/* block 36 */
-308,308,308,308,308,308,308,308,308,308,308,308,308,308,308,308,
-308,308,308,308,308,308,308,308,308,308,308,308,308,308,308,308,
-308,308,308,308,308,308,308,308,308,308,308,308,308,308,308,308,
-308,308,308,308,308,308,308,308,308,308,308,308,308,308,308,308,
-308,308,308,308,308,308,308,308,308,109,308,308,308,308,109,109,
-308,308,308,308,308,308,308,109,308,109,308,308,308,308,109,109,
-308,308,308,308,308,308,308,308,308,308,308,308,308,308,308,308,
-308,308,308,308,308,308,308,308,308,308,308,308,308,308,308,308,
-
-/* block 37 */
-308,308,308,308,308,308,308,308,308,109,308,308,308,308,109,109,
-308,308,308,308,308,308,308,308,308,308,308,308,308,308,308,308,
-308,308,308,308,308,308,308,308,308,308,308,308,308,308,308,308,
-308,109,308,308,308,308,109,109,308,308,308,308,308,308,308,109,
-308,109,308,308,308,308,109,109,308,308,308,308,308,308,308,308,
-308,308,308,308,308,308,308,109,308,308,308,308,308,308,308,308,
-308,308,308,308,308,308,308,308,308,308,308,308,308,308,308,308,
-308,308,308,308,308,308,308,308,308,308,308,308,308,308,308,308,
-
-/* block 38 */
-308,308,308,308,308,308,308,308,308,308,308,308,308,308,308,308,
-308,109,308,308,308,308,109,109,308,308,308,308,308,308,308,308,
-308,308,308,308,308,308,308,308,308,308,308,308,308,308,308,308,
-308,308,308,308,308,308,308,308,308,308,308,308,308,308,308,308,
-308,308,308,308,308,308,308,308,308,308,308,308,308,308,308,308,
-308,308,308,308,308,308,308,308,308,308,308,109,109,309,309,309,
-310,310,310,310,310,310,310,310,310,311,311,311,311,311,311,311,
-311,311,311,311,311,311,311,311,311,311,311,311,311,109,109,109,
-
-/* block 39 */
-308,308,308,308,308,308,308,308,308,308,308,308,308,308,308,308,
-312,312,312,312,312,312,312,312,312,312,109,109,109,109,109,109,
-313,313,313,313,313,313,313,313,313,313,313,313,313,313,313,313,
-313,313,313,313,313,313,313,313,313,313,313,313,313,313,313,313,
-313,313,313,313,313,313,313,313,313,313,313,313,313,313,313,313,
-313,313,313,313,313,313,313,313,313,313,313,313,313,313,313,313,
-313,313,313,313,313,313,313,313,313,313,313,313,313,313,313,313,
-313,313,313,313,313,109,109,109,109,109,109,109,109,109,109,109,
-
-/* block 40 */
-314,315,315,315,315,315,315,315,315,315,315,315,315,315,315,315,
-315,315,315,315,315,315,315,315,315,315,315,315,315,315,315,315,
-315,315,315,315,315,315,315,315,315,315,315,315,315,315,315,315,
-315,315,315,315,315,315,315,315,315,315,315,315,315,315,315,315,
-315,315,315,315,315,315,315,315,315,315,315,315,315,315,315,315,
-315,315,315,315,315,315,315,315,315,315,315,315,315,315,315,315,
-315,315,315,315,315,315,315,315,315,315,315,315,315,315,315,315,
-315,315,315,315,315,315,315,315,315,315,315,315,315,315,315,315,
-
-/* block 41 */
-315,315,315,315,315,315,315,315,315,315,315,315,315,315,315,315,
-315,315,315,315,315,315,315,315,315,315,315,315,315,315,315,315,
-315,315,315,315,315,315,315,315,315,315,315,315,315,315,315,315,
-315,315,315,315,315,315,315,315,315,315,315,315,315,315,315,315,
-315,315,315,315,315,315,315,315,315,315,315,315,315,315,315,315,
-315,315,315,315,315,315,315,315,315,315,315,315,315,315,315,315,
-315,315,315,315,315,315,315,315,315,315,315,315,315,315,315,315,
-315,315,315,315,315,315,315,315,315,315,315,315,315,315,315,315,
-
-/* block 42 */
-315,315,315,315,315,315,315,315,315,315,315,315,315,315,315,315,
-315,315,315,315,315,315,315,315,315,315,315,315,315,315,315,315,
-315,315,315,315,315,315,315,315,315,315,315,315,315,315,315,315,
-315,315,315,315,315,315,315,315,315,315,315,315,315,315,315,315,
-315,315,315,315,315,315,315,315,315,315,315,315,315,315,315,315,
-315,315,315,315,315,315,315,315,315,315,315,315,315,315,315,315,
-315,315,315,315,315,315,315,315,315,315,315,315,315,316,316,315,
-315,315,315,315,315,315,315,315,315,315,315,315,315,315,315,315,
-
-/* block 43 */
-317,318,318,318,318,318,318,318,318,318,318,318,318,318,318,318,
-318,318,318,318,318,318,318,318,318,318,318,319,320,109,109,109,
-321,321,321,321,321,321,321,321,321,321,321,321,321,321,321,321,
-321,321,321,321,321,321,321,321,321,321,321,321,321,321,321,321,
-321,321,321,321,321,321,321,321,321,321,321,321,321,321,321,321,
-321,321,321,321,321,321,321,321,321,321,321,321,321,321,321,321,
-321,321,321,321,321,321,321,321,321,321,321,  4,  4,  4,322,322,
-322,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
-
-/* block 44 */
-323,323,323,323,323,323,323,323,323,323,323,323,323,109,323,323,
-323,323,324,324,324,109,109,109,109,109,109,109,109,109,109,109,
-325,325,325,325,325,325,325,325,325,325,325,325,325,325,325,325,
-325,325,326,326,326,  4,  4,109,109,109,109,109,109,109,109,109,
-327,327,327,327,327,327,327,327,327,327,327,327,327,327,327,327,
-327,327,328,328,109,109,109,109,109,109,109,109,109,109,109,109,
-329,329,329,329,329,329,329,329,329,329,329,329,329,109,329,329,
-329,109,330,330,109,109,109,109,109,109,109,109,109,109,109,109,
-
-/* block 45 */
-331,331,331,331,331,331,331,331,331,331,331,331,331,331,331,331,
-331,331,331,331,331,331,331,331,331,331,331,331,331,331,331,331,
-331,331,331,331,331,331,331,331,331,331,331,331,331,331,331,331,
-331,331,331,331,332,332,333,332,332,332,332,332,332,332,333,333,
-333,333,333,333,333,333,332,333,333,332,332,332,332,332,332,332,
-332,332,332,332,334,334,334,335,334,334,334,336,331,332,109,109,
-337,337,337,337,337,337,337,337,337,337,109,109,109,109,109,109,
-338,338,338,338,338,338,338,338,338,338,109,109,109,109,109,109,
-
-/* block 46 */
-339,339,  4,  4,339,  4,340,339,339,339,339,341,341,341,342,109,
-343,343,343,343,343,343,343,343,343,343,109,109,109,109,109,109,
-344,344,344,344,344,344,344,344,344,344,344,344,344,344,344,344,
-344,344,344,344,344,344,344,344,344,344,344,344,344,344,344,344,
-344,344,344,345,344,344,344,344,344,344,344,344,344,344,344,344,
-344,344,344,344,344,344,344,344,344,344,344,344,344,344,344,344,
-344,344,344,344,344,344,344,344,344,344,344,344,344,344,344,344,
-344,344,344,344,344,344,344,344,109,109,109,109,109,109,109,109,
-
-/* block 47 */
-344,344,344,344,344,344,344,344,344,344,344,344,344,344,344,344,
-344,344,344,344,344,344,344,344,344,344,344,344,344,344,344,344,
-344,344,344,344,344,344,344,344,344,341,344,109,109,109,109,109,
-315,315,315,315,315,315,315,315,315,315,315,315,315,315,315,315,
-315,315,315,315,315,315,315,315,315,315,315,315,315,315,315,315,
-315,315,315,315,315,315,315,315,315,315,315,315,315,315,315,315,
-315,315,315,315,315,315,315,315,315,315,315,315,315,315,315,315,
-315,315,315,315,315,315,109,109,109,109,109,109,109,109,109,109,
-
-/* block 48 */
-346,346,346,346,346,346,346,346,346,346,346,346,346,346,346,346,
-346,346,346,346,346,346,346,346,346,346,346,346,346,109,109,109,
-347,347,347,348,348,348,348,347,347,348,348,348,109,109,109,109,
-348,348,347,348,348,348,348,348,348,347,347,347,109,109,109,109,
-349,109,109,109,350,350,351,351,351,351,351,351,351,351,351,351,
-352,352,352,352,352,352,352,352,352,352,352,352,352,352,352,352,
-352,352,352,352,352,352,352,352,352,352,352,352,352,352,109,109,
-352,352,352,352,352,109,109,109,109,109,109,109,109,109,109,109,
-
-/* block 49 */
-353,353,353,353,353,353,353,353,353,353,353,353,353,353,353,353,
-353,353,353,353,353,353,353,353,353,353,353,353,353,353,353,353,
-353,353,353,353,353,353,353,353,353,353,353,353,109,109,109,109,
-354,354,354,354,354,355,355,355,354,354,355,354,354,354,354,354,
-354,353,353,353,353,353,353,353,354,354,109,109,109,109,109,109,
-356,356,356,356,356,356,356,356,356,356,357,109,109,109,358,358,
-359,359,359,359,359,359,359,359,359,359,359,359,359,359,359,359,
-359,359,359,359,359,359,359,359,359,359,359,359,359,359,359,359,
-
-/* block 50 */
-360,360,360,360,360,360,360,360,360,360,360,360,360,360,360,360,
-360,360,360,360,360,360,360,361,361,362,362,361,109,109,363,363,
-364,364,364,364,364,364,364,364,364,364,364,364,364,364,364,364,
-364,364,364,364,364,364,364,364,364,364,364,364,364,364,364,364,
-364,364,364,364,364,364,364,364,364,364,364,364,364,364,364,364,
-364,364,364,364,364,365,366,365,366,366,366,366,366,366,366,109,
-366,367,366,367,367,366,366,366,366,366,366,366,366,365,365,365,
-365,365,365,366,366,366,366,366,366,366,366,366,366,109,109,366,
-
-/* block 51 */
-368,368,368,368,368,368,368,368,368,368,109,109,109,109,109,109,
-368,368,368,368,368,368,368,368,368,368,109,109,109,109,109,109,
-369,369,369,369,369,369,369,370,369,369,369,369,369,369,109,109,
-109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
-109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
-109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
-109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
-109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
-
-/* block 52 */
-371,371,371,371,372,373,373,373,373,373,373,373,373,373,373,373,
-373,373,373,373,373,373,373,373,373,373,373,373,373,373,373,373,
-373,373,373,373,373,373,373,373,373,373,373,373,373,373,373,373,
-373,373,373,373,371,372,371,371,371,371,371,372,371,372,372,372,
-372,372,371,372,372,373,373,373,373,373,373,373,109,109,109,109,
-374,374,374,374,374,374,374,374,374,374,375,375,375,375,375,375,
-375,376,376,376,376,376,376,376,376,376,376,371,371,371,371,371,
-371,371,371,371,376,376,376,376,376,376,376,376,376,109,109,109,
-
-/* block 53 */
-377,377,378,379,379,379,379,379,379,379,379,379,379,379,379,379,
-379,379,379,379,379,379,379,379,379,379,379,379,379,379,379,379,
-379,378,377,377,377,377,378,378,377,377,378,377,378,378,379,379,
-380,380,380,380,380,380,380,380,380,380,379,379,379,379,379,379,
-381,381,381,381,381,381,381,381,381,381,381,381,381,381,381,381,
-381,381,381,381,381,381,381,381,381,381,381,381,381,381,381,381,
-381,381,381,381,381,381,382,383,382,382,383,383,383,382,383,382,
-382,382,383,383,109,109,109,109,109,109,109,109,384,384,384,384,
-
-/* block 54 */
-385,385,385,385,385,385,385,385,385,385,385,385,385,385,385,385,
-385,385,385,385,385,385,385,385,385,385,385,385,385,385,385,385,
-385,385,385,385,386,386,386,386,386,386,386,386,387,387,387,387,
-387,387,387,387,386,386,387,387,109,109,109,388,388,388,388,388,
-389,389,389,389,389,389,389,389,389,389,109,109,109,385,385,385,
-390,390,390,390,390,390,390,390,390,390,391,391,391,391,391,391,
-391,391,391,391,391,391,391,391,391,391,391,391,391,391,391,391,
-391,391,391,391,391,391,391,391,392,392,392,392,392,392,393,393,
-
-/* block 55 */
-109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
-109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
-109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
-109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
-394,394,394,394,394,394,394,394,109,109,109,109,109,109,109,109,
-104,104,104,  4,104,104,104,104,104,104,104,104,104,104,104,104,
-104,395,104,104,104,104,104,104,104,396,396,396,396,104,396,396,
-396,396,395,395,104,396,396,109,109,109,109,109,109,109,109,109,
-
-/* block 56 */
- 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33,
- 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33,
- 33, 33, 33, 33, 33, 33,116,116,116,116,116,397,101,101,101,101,
-101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,
-101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,
-101,101,101,101,101,101,101,101,101,101,101,101,101,110,110,110,
-110,110,101,101,101,101,110,110,110,110,110, 33, 33, 33, 33, 33,
- 33, 33, 33, 33, 33, 33, 33, 33,398,399, 33, 33, 33,400, 33, 33,
-
-/* block 57 */
- 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33,
- 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33,101,101,101,101,101,
-101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,
-101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,110,
-104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,
-104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,
-104,104,104,104,104,104,104,109,109,109,109,109,109,109,109,109,
-109,109,109,109,109,109,109,109,109,109,109,109,104,104,104,104,
-
-/* block 58 */
- 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31,
- 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31,
- 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31,
- 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31,
- 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31,
- 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31,
-401,402, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31,
- 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31,
-
-/* block 59 */
- 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31,
- 30, 31, 30, 31, 30, 31, 33, 33, 33, 33, 33,403, 33, 33,404, 33,
- 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31,
- 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31,
- 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31,
- 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31,
- 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31,
- 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31,
-
-/* block 60 */
-405,405,405,405,405,405,405,405,406,406,406,406,406,406,406,406,
-405,405,405,405,405,405,109,109,406,406,406,406,406,406,109,109,
-405,405,405,405,405,405,405,405,406,406,406,406,406,406,406,406,
-405,405,405,405,405,405,405,405,406,406,406,406,406,406,406,406,
-405,405,405,405,405,405,109,109,406,406,406,406,406,406,109,109,
-116,405,116,405,116,405,116,405,109,406,109,406,109,406,109,406,
-405,405,405,405,405,405,405,405,406,406,406,406,406,406,406,406,
-407,407,408,408,408,408,409,409,410,410,411,411,412,412,109,109,
-
-/* block 61 */
-405,405,405,405,405,405,405,405,413,413,413,413,413,413,413,413,
-405,405,405,405,405,405,405,405,413,413,413,413,413,413,413,413,
-405,405,405,405,405,405,405,405,413,413,413,413,413,413,413,413,
-405,405,116,414,116,109,116,116,406,406,415,415,416,108,417,108,
-108,108,116,414,116,109,116,116,418,418,418,418,416,108,108,108,
-405,405,116,116,109,109,116,116,406,406,419,419,109,108,108,108,
-405,405,116,116,116,157,116,116,406,406,420,420,161,108,108,108,
-109,109,116,414,116,109,116,116,421,421,422,422,416,108,108,109,
-
-/* block 62 */
-  3,  3,  3,  3,  3,  3,  3,  3,  3,  3,  3, 22,423,423, 22, 22,
-  9,  9,  9,  9,  9,  9,  4,  4, 21, 25,  6, 21, 21, 25,  6, 21,
-  4,  4,  4,  4,  4,  4,  4,  4,424,425, 22, 22, 22, 22, 22,  3,
-  4,  4,  4,  4,  4,  4,  4,  4,  4, 21, 25,  4,  4,  4,  4, 15,
- 15,  4,  4,  4,  8,  6,  7,  4,  4,  4,  4,  4,  4,  4,  4,  4,
-  4,  4,  8,  4, 15,  4,  4,  4,  4,  4,  4,  4,  4,  4,  4,  3,
- 22, 22, 22, 22, 22,426, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22,
- 23,101,109,109, 23, 23, 23, 23, 23, 23,  8,  8,  8,  6,  7,101,
-
-/* block 63 */
- 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,  8,  8,  8,  6,  7,109,
-101,101,101,101,101,101,101,101,101,101,101,101,101,109,109,109,
-  5,  5,  5,  5,  5,  5,  5,  5,  5,  5,  5,  5,  5,  5,  5,  5,
-  5,  5,  5,  5,  5,  5,  5,  5,  5,  5,  5,109,109,109,109,109,
-109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
-104,104,104,104,104,104,104,104,104,104,104,104,104,427,427,427,
-427,104,427,427,427,104,104,104,104,104,104,104,104,104,104,104,
-104,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
-
-/* block 64 */
- 19, 19,428, 19, 19, 19, 19,428, 19, 19,429,428,428,428,429,429,
-428,428,428,429, 19,428, 19, 19,  8,428,428,428,428,428, 19, 19,
- 19, 19, 19, 19,428, 19,430, 19,428, 19,431,432,428,428, 19,429,
-428,428,433,428,429,396,396,396,396,429, 19, 19,429,429,428,428,
-  8,  8,  8,  8,  8,428,429,429,429,429, 19,  8, 19, 19,434, 19,
- 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
-435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,
-436,436,436,436,436,436,436,436,436,436,436,436,436,436,436,436,
-
-/* block 65 */
-437,437,437, 30, 31,437,437,437,437, 23,109,109,109,109,109,109,
-  8,  8,  8,  8,  8, 19, 19, 19, 19, 19,  8,  8, 19, 19, 19, 19,
-  8, 19, 19,  8, 19, 19,  8, 19, 19, 19, 19, 19, 19, 19,  8, 19,
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,  8,  8,
- 19, 19,  8, 19,  8, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19,  8,  8,  8,  8,  8,  8,  8,  8,  8,  8,  8,  8,
-
-/* block 66 */
-  8,  8,  8,  8,  8,  8,  8,  8,  8,  8,  8,  8,  8,  8,  8,  8,
-  8,  8,  8,  8,  8,  8,  8,  8,  8,  8,  8,  8,  8,  8,  8,  8,
-  8,  8,  8,  8,  8,  8,  8,  8,  8,  8,  8,  8,  8,  8,  8,  8,
-  8,  8,  8,  8,  8,  8,  8,  8,  8,  8,  8,  8,  8,  8,  8,  8,
-  8,  8,  8,  8,  8,  8,  8,  8,  8,  8,  8,  8,  8,  8,  8,  8,
-  8,  8,  8,  8,  8,  8,  8,  8,  8,  8,  8,  8,  8,  8,  8,  8,
-  8,  8,  8,  8,  8,  8,  8,  8,  8,  8,  8,  8,  8,  8,  8,  8,
-  8,  8,  8,  8,  8,  8,  8,  8,  8,  8,  8,  8,  8,  8,  8,  8,
-
-/* block 67 */
- 19, 19, 19, 19, 19, 19, 19, 19,  6,  7,  6,  7, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
-  8,  8, 19, 19, 19, 19, 19, 19, 19,  6,  7, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,  8, 19, 19, 19,
-
-/* block 68 */
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,  8,  8,  8,  8,  8,
-  8,  8,  8,  8,  8,  8,  8,  8,  8,  8,  8,  8,  8,  8,  8,  8,
-  8,  8,  8,  8, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,  8,  8,  8,  8,
-  8,  8, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19,109,109,109,109,109,109,109,109,109,109,109,109,
-
-/* block 69 */
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19,109,109,109,109,109,109,109,109,109,
-109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,109,109,109,109,109,
-109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
- 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
- 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
-
-/* block 70 */
- 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
- 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19,438,438,438,438,438,438,438,438,438,438,
-438,438,438,438,438,438,438,438,438,438,438,438,438,438,438,438,
-439,439,439,439,439,439,439,439,439,439,439,439,439,439,439,439,
-439,439,439,439,439,439,439,439,439,439, 23, 23, 23, 23, 23, 23,
- 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
-
-/* block 71 */
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
-
-/* block 72 */
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19,  8, 19, 19, 19, 19, 19, 19, 19, 19,
- 19,  8, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19,  8,  8,  8,  8,  8,  8,  8,  8,
-
-/* block 73 */
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,  8,
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
-
-/* block 74 */
-109, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19,  6,  7,  6,  7,  6,  7,  6,  7,
-  6,  7,  6,  7,  6,  7, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
-
-/* block 75 */
- 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
- 23, 23, 23, 23, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
-  8,  8,  8,  8,  8,  6,  7,  8,  8,  8,  8,  8,  8,  8,  8,  8,
-  8,  8,  8,  8,  8,  8,  8,  8,  8,  8,  8,  8,  8,  8,  8,  8,
-  8,  8,  8,  8,  8,  8,  6,  7,  6,  7,  6,  7,  6,  7,  6,  7,
-  8,  8,  8,  8,  8,  8,  8,  8,  8,  8,  8,  8,  8,  8,  8,  8,
-
-/* block 76 */
-440,440,440,440,440,440,440,440,440,440,440,440,440,440,440,440,
-440,440,440,440,440,440,440,440,440,440,440,440,440,440,440,440,
-440,440,440,440,440,440,440,440,440,440,440,440,440,440,440,440,
-440,440,440,440,440,440,440,440,440,440,440,440,440,440,440,440,
-440,440,440,440,440,440,440,440,440,440,440,440,440,440,440,440,
-440,440,440,440,440,440,440,440,440,440,440,440,440,440,440,440,
-440,440,440,440,440,440,440,440,440,440,440,440,440,440,440,440,
-440,440,440,440,440,440,440,440,440,440,440,440,440,440,440,440,
-
-/* block 77 */
-  8,  8,  8,  6,  7,  6,  7,  6,  7,  6,  7,  6,  7,  6,  7,  6,
-  7,  6,  7,  6,  7,  6,  7,  6,  7,  8,  8,  8,  8,  8,  8,  8,
-  8,  8,  8,  8,  8,  8,  8,  8,  8,  8,  8,  8,  8,  8,  8,  8,
-  8,  8,  8,  8,  8,  8,  8,  8,  8,  8,  8,  8,  8,  8,  8,  8,
-  8,  8,  8,  8,  8,  8,  8,  8,  8,  8,  8,  8,  8,  8,  8,  8,
-  8,  8,  8,  8,  8,  8,  8,  8,  6,  7,  6,  7,  8,  8,  8,  8,
-  8,  8,  8,  8,  8,  8,  8,  8,  8,  8,  8,  8,  8,  8,  8,  8,
-  8,  8,  8,  8,  8,  8,  8,  8,  8,  8,  8,  8,  6,  7,  8,  8,
-
-/* block 78 */
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
-  8,  8,  8,  8,  8,  8,  8,  8,  8,  8,  8,  8,  8,  8,  8,  8,
-  8,  8,  8,  8,  8, 19, 19,  8,  8,  8,  8,  8,  8,109,109,109,
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,109,109,109,109,109,109,
-109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
-109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
-
-/* block 79 */
-109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
-109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
-109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
-109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
-109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
-109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
-109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
-109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
-
-/* block 80 */
-441,441,441,441,441,441,441,441,441,441,441,441,441,441,441,441,
-441,441,441,441,441,441,441,441,441,441,441,441,441,441,441,441,
-441,441,441,441,441,441,441,441,441,441,441,441,441,441,441,109,
-442,442,442,442,442,442,442,442,442,442,442,442,442,442,442,442,
-442,442,442,442,442,442,442,442,442,442,442,442,442,442,442,442,
-442,442,442,442,442,442,442,442,442,442,442,442,442,442,442,109,
- 30, 31,443,444,445,446,447, 30, 31, 30, 31, 30, 31,448,449,450,
-451, 33, 30, 31, 33, 30, 31, 33, 33, 33, 33, 33,101,101,452,452,
-
-/* block 81 */
-153,154,153,154,153,154,153,154,153,154,153,154,153,154,153,154,
-153,154,153,154,153,154,153,154,153,154,153,154,153,154,153,154,
-153,154,153,154,153,154,153,154,153,154,153,154,153,154,153,154,
-153,154,153,154,153,154,153,154,153,154,153,154,153,154,153,154,
-153,154,153,154,153,154,153,154,153,154,153,154,153,154,153,154,
-153,154,153,154,153,154,153,154,153,154,153,154,153,154,153,154,
-153,154,153,154,453,454,454,454,454,454,454,153,154,153,154,455,
-455,455,153,154,109,109,109,109,109,456,456,456,456,457,456,456,
-
-/* block 82 */
-458,458,458,458,458,458,458,458,458,458,458,458,458,458,458,458,
-458,458,458,458,458,458,458,458,458,458,458,458,458,458,458,458,
-458,458,458,458,458,458,109,458,109,109,109,109,109,458,109,109,
-459,459,459,459,459,459,459,459,459,459,459,459,459,459,459,459,
-459,459,459,459,459,459,459,459,459,459,459,459,459,459,459,459,
-459,459,459,459,459,459,459,459,459,459,459,459,459,459,459,459,
-459,459,459,459,459,459,459,459,109,109,109,109,109,109,109,460,
-461,109,109,109,109,109,109,109,109,109,109,109,109,109,109,462,
-
-/* block 83 */
-308,308,308,308,308,308,308,308,308,308,308,308,308,308,308,308,
-308,308,308,308,308,308,308,109,109,109,109,109,109,109,109,109,
-308,308,308,308,308,308,308,109,308,308,308,308,308,308,308,109,
-308,308,308,308,308,308,308,109,308,308,308,308,308,308,308,109,
-308,308,308,308,308,308,308,109,308,308,308,308,308,308,308,109,
-308,308,308,308,308,308,308,109,308,308,308,308,308,308,308,109,
-170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,
-170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,
-
-/* block 84 */
-  4,  4, 21, 25, 21, 25,  4,  4,  4, 21, 25,  4, 21, 25,  4,  4,
-  4,  4,  4,  4,  4,  4,  4,  9,  4,  4,  9,  4, 21, 25,  4,  4,
- 21, 25,  6,  7,  6,  7,  6,  7,  6,  7,  4,  4,  4,  4,  4,102,
-  4,  4,  4,  4,  4,  4,  4,  4,  4,  4,  9,  9,109,109,109,109,
-109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
-109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
-109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
-109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
-
-/* block 85 */
-463,463,463,463,463,463,463,463,463,463,463,463,463,463,463,463,
-463,463,463,463,463,463,463,463,463,463,109,463,463,463,463,463,
-463,463,463,463,463,463,463,463,463,463,463,463,463,463,463,463,
-463,463,463,463,463,463,463,463,463,463,463,463,463,463,463,463,
-463,463,463,463,463,463,463,463,463,463,463,463,463,463,463,463,
-463,463,463,463,463,463,463,463,463,463,463,463,463,463,463,463,
-463,463,463,463,463,463,463,463,463,463,463,463,463,463,463,463,
-463,463,463,463,109,109,109,109,109,109,109,109,109,109,109,109,
-
-/* block 86 */
-463,463,463,463,463,463,463,463,463,463,463,463,463,463,463,463,
-463,463,463,463,463,463,463,463,463,463,463,463,463,463,463,463,
-463,463,463,463,463,463,463,463,463,463,463,463,463,463,463,463,
-463,463,463,463,463,463,463,463,463,463,463,463,463,463,463,463,
-463,463,463,463,463,463,463,463,463,463,463,463,463,463,463,463,
-463,463,463,463,463,463,463,463,463,463,463,463,463,463,463,463,
-463,463,463,463,463,463,463,463,463,463,463,463,463,463,463,463,
-463,463,463,463,463,463,463,463,463,463,463,463,463,463,463,463,
-
-/* block 87 */
-463,463,463,463,463,463,463,463,463,463,463,463,463,463,463,463,
-463,463,463,463,463,463,463,463,463,463,463,463,463,463,463,463,
-463,463,463,463,463,463,463,463,463,463,463,463,463,463,463,463,
-463,463,463,463,463,463,463,463,463,463,463,463,463,463,463,463,
-463,463,463,463,463,463,463,463,463,463,463,463,463,463,463,463,
-463,463,463,463,463,463,109,109,109,109,109,109,109,109,109,109,
-109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,109,109,109,109,
-
-/* block 88 */
-  3,  4,  4,  4, 19,464,396,465,  6,  7,  6,  7,  6,  7,  6,  7,
-  6,  7, 19, 19,  6,  7,  6,  7,  6,  7,  6,  7,  9,  6,  7,  7,
- 19,465,465,465,465,465,465,465,465,465,104,104,104,104,466,466,
-  9,102,102,102,102,102, 19, 19,465,465,465,464,396,  4, 19, 19,
-109,467,467,467,467,467,467,467,467,467,467,467,467,467,467,467,
-467,467,467,467,467,467,467,467,467,467,467,467,467,467,467,467,
-467,467,467,467,467,467,467,467,467,467,467,467,467,467,467,467,
-467,467,467,467,467,467,467,467,467,467,467,467,467,467,467,467,
-
-/* block 89 */
-467,467,467,467,467,467,467,467,467,467,467,467,467,467,467,467,
-467,467,467,467,467,467,467,109,109,104,104, 14, 14,468,468,467,
-  9,469,469,469,469,469,469,469,469,469,469,469,469,469,469,469,
-469,469,469,469,469,469,469,469,469,469,469,469,469,469,469,469,
-469,469,469,469,469,469,469,469,469,469,469,469,469,469,469,469,
-469,469,469,469,469,469,469,469,469,469,469,469,469,469,469,469,
-469,469,469,469,469,469,469,469,469,469,469,469,469,469,469,469,
-469,469,469,469,469,469,469,469,469,469,469,  4,102,470,470,469,
-
-/* block 90 */
-109,109,109,109,109,471,471,471,471,471,471,471,471,471,471,471,
-471,471,471,471,471,471,471,471,471,471,471,471,471,471,471,471,
-471,471,471,471,471,471,471,471,471,471,471,471,471,471,109,109,
-109,472,472,472,472,472,472,472,472,472,472,472,472,472,472,472,
-472,472,472,472,472,472,472,472,472,472,472,472,472,472,472,472,
-472,472,472,472,472,472,472,472,472,472,472,472,472,472,472,472,
-472,472,472,472,472,472,472,472,472,472,472,472,472,472,472,472,
-472,472,472,472,472,472,472,472,472,472,472,472,472,472,472,472,
-
-/* block 91 */
-472,472,472,472,472,472,472,472,472,472,472,472,472,472,472,109,
- 19, 19, 23, 23, 23, 23, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
-471,471,471,471,471,471,471,471,471,471,471,471,471,471,471,471,
-471,471,471,471,471,471,471,471,471,471,471,109,109,109,109,109,
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19,109,109,109,109,109,109,109,109,109,109,109,109,
-469,469,469,469,469,469,469,469,469,469,469,469,469,469,469,469,
-
-/* block 92 */
-473,473,473,473,473,473,473,473,473,473,473,473,473,473,473,473,
-473,473,473,473,473,473,473,473,473,473,473,473,473,473,473,109,
- 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19, 23, 23, 23, 23, 23, 23, 23, 23,
- 19, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
-473,473,473,473,473,473,473,473,473,473,473,473,473,473,473,473,
-473,473,473,473,473,473,473,473,473,473,473,473,473,473,473, 19,
-
-/* block 93 */
- 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
-474,474,474,474,474,474,474,474,474,474,474,474,474,474,474,474,
-474,474,474,474,474,474,474,474,474,474,474,474,474,474,474,474,
-474,474,474,474,474,474,474,474,474,474,474,474,474,474,474,109,
-
-/* block 94 */
-474,474,474,474,474,474,474,474,474,474,474,474,474,474,474,474,
-474,474,474,474,474,474,474,474,474,474,474,474,474,474,474,474,
-474,474,474,474,474,474,474,474,474,474,474,474,474,474,474,474,
-474,474,474,474,474,474,474,474,474,474,474,474,474,474,474,474,
-474,474,474,474,474,474,474,474,474,474,474,474,474,474,474,474,
-474,474,474,474,474,474,474,474, 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
-
-/* block 95 */
-475,475,475,475,475,475,475,475,475,475,475,475,475,475,475,475,
-475,475,475,475,475,475,475,475,475,475,475,475,475,475,475,475,
-475,475,475,475,475,475,475,475,475,475,475,475,475,475,475,475,
-475,475,475,475,475,475,475,475,475,475,475,475,475,475,475,475,
-475,475,475,475,475,475,475,475,475,475,475,475,475,475,475,475,
-475,475,475,475,475,475,475,475,475,475,475,475,475,475,475,475,
-475,475,475,475,475,475,475,475,475,475,475,475,475,475,475,475,
-475,475,475,475,475,475,475,475,475,475,475,475,475,475,475,475,
-
-/* block 96 */
-475,475,475,475,475,475,475,475,475,475,475,475,475,475,475,475,
-475,475,475,475,475,475,475,475,475,475,475,475,475,475,475,475,
-475,475,475,475,475,475,475,475,475,475,475,475,475,475,475,475,
-475,475,475,475,475,475,109,109,109,109,109,109,109,109,109,109,
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
-
-/* block 97 */
-475,475,475,475,475,475,475,475,475,475,475,475,475,475,475,475,
-475,475,475,475,475,475,475,475,475,475,475,475,475,475,475,475,
-475,475,475,475,475,475,475,475,475,475,475,475,475,475,475,475,
-475,475,475,475,475,475,475,475,475,475,475,475,475,475,475,475,
-475,475,475,475,475,475,475,475,475,475,475,475,475,109,109,109,
-109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
-109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
-109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
-
-/* block 98 */
-476,476,476,476,476,476,476,476,476,476,476,476,476,476,476,476,
-476,476,476,476,476,477,476,476,476,476,476,476,476,476,476,476,
-476,476,476,476,476,476,476,476,476,476,476,476,476,476,476,476,
-476,476,476,476,476,476,476,476,476,476,476,476,476,476,476,476,
-476,476,476,476,476,476,476,476,476,476,476,476,476,476,476,476,
-476,476,476,476,476,476,476,476,476,476,476,476,476,476,476,476,
-476,476,476,476,476,476,476,476,476,476,476,476,476,476,476,476,
-476,476,476,476,476,476,476,476,476,476,476,476,476,476,476,476,
-
-/* block 99 */
-476,476,476,476,476,476,476,476,476,476,476,476,476,476,476,476,
-476,476,476,476,476,476,476,476,476,476,476,476,476,476,476,476,
-476,476,476,476,476,476,476,476,476,476,476,476,476,476,476,476,
-476,476,476,476,476,476,476,476,476,476,476,476,476,476,476,476,
-476,476,476,476,476,476,476,476,476,476,476,476,476,476,476,476,
-476,476,476,476,476,476,476,476,476,476,476,476,476,476,476,476,
-476,476,476,476,476,476,476,476,476,476,476,476,476,476,476,476,
-476,476,476,476,476,476,476,476,476,476,476,476,476,476,476,476,
-
-/* block 100 */
-476,476,476,476,476,476,476,476,476,476,476,476,476,109,109,109,
-478,478,478,478,478,478,478,478,478,478,478,478,478,478,478,478,
-478,478,478,478,478,478,478,478,478,478,478,478,478,478,478,478,
-478,478,478,478,478,478,478,478,478,478,478,478,478,478,478,478,
-478,478,478,478,478,478,478,109,109,109,109,109,109,109,109,109,
-479,479,479,479,479,479,479,479,479,479,479,479,479,479,479,479,
-479,479,479,479,479,479,479,479,479,479,479,479,479,479,479,479,
-479,479,479,479,479,479,479,479,480,480,480,480,480,480,481,481,
-
-/* block 101 */
-482,482,482,482,482,482,482,482,482,482,482,482,482,482,482,482,
-482,482,482,482,482,482,482,482,482,482,482,482,482,482,482,482,
-482,482,482,482,482,482,482,482,482,482,482,482,482,482,482,482,
-482,482,482,482,482,482,482,482,482,482,482,482,482,482,482,482,
-482,482,482,482,482,482,482,482,482,482,482,482,482,482,482,482,
-482,482,482,482,482,482,482,482,482,482,482,482,482,482,482,482,
-482,482,482,482,482,482,482,482,482,482,482,482,482,482,482,482,
-482,482,482,482,482,482,482,482,482,482,482,482,482,482,482,482,
-
-/* block 102 */
-482,482,482,482,482,482,482,482,482,482,482,482,483,484,484,484,
-482,482,482,482,482,482,482,482,482,482,482,482,482,482,482,482,
-485,485,485,485,485,485,485,485,485,485,482,482,109,109,109,109,
-109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
-167,168,167,168,167,168,167,168,167,168,167,168,167,168,167,168,
-167,168,167,168,167,168,167,168,167,168,167,168,167,168,167,168,
-167,168,167,168,167,168,167,168,167,168,167,168,167,168,486,170,
-171,171,171,487,170,170,170,170,170,170,170,170,170,170,487,398,
-
-/* block 103 */
-167,168,167,168,167,168,167,168,167,168,167,168,167,168,167,168,
-167,168,167,168,167,168,167,168,109,109,109,109,109,109,109,170,
-488,488,488,488,488,488,488,488,488,488,488,488,488,488,488,488,
-488,488,488,488,488,488,488,488,488,488,488,488,488,488,488,488,
-488,488,488,488,488,488,488,488,488,488,488,488,488,488,488,488,
-488,488,488,488,488,488,488,488,488,488,488,488,488,488,488,488,
-488,488,488,488,488,488,489,489,489,489,489,489,489,489,489,489,
-490,490,491,491,491,491,491,491,109,109,109,109,109,109,109,109,
-
-/* block 104 */
- 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14,
- 14, 14, 14, 14, 14, 14, 14,102,102,102,102,102,102,102,102,102,
- 14, 14, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31,
- 33, 33, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31,
- 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31,
- 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31,
- 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31,
-101, 33, 33, 33, 33, 33, 33, 33, 33, 30, 31, 30, 31,492, 30, 31,
-
-/* block 105 */
- 30, 31, 30, 31, 30, 31, 30, 31,102, 14, 14, 30, 31,493, 33,109,
- 30, 31, 30, 31,109,109,109,109,109,109,109,109,109,109,109,109,
- 30, 31, 30, 31, 30, 31, 30, 31, 30, 31,494,109,109,109,109,109,
-109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
-109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
-109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
-109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
-109,109,109,109,109,109,109,109,101,101, 33, 20, 20, 20, 20, 20,
-
-/* block 106 */
-495,495,496,495,495,495,496,495,495,495,495,496,495,495,495,495,
-495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,495,
-495,495,495,497,497,496,496,497,498,498,498,498,109,109,109,109,
- 23, 23, 23, 23, 23, 23, 19, 19,  5, 19,109,109,109,109,109,109,
-499,499,499,499,499,499,499,499,499,499,499,499,499,499,499,499,
-499,499,499,499,499,499,499,499,499,499,499,499,499,499,499,499,
-499,499,499,499,499,499,499,499,499,499,499,499,499,499,499,499,
-499,499,499,499,500,500,500,500,109,109,109,109,109,109,109,109,
-
-/* block 107 */
-501,501,502,502,502,502,502,502,502,502,502,502,502,502,502,502,
-502,502,502,502,502,502,502,502,502,502,502,502,502,502,502,502,
-502,502,502,502,502,502,502,502,502,502,502,502,502,502,502,502,
-502,502,502,502,501,501,501,501,501,501,501,501,501,501,501,501,
-501,501,501,501,503,109,109,109,109,109,109,109,109,109,504,504,
-505,505,505,505,505,505,505,505,505,505,109,109,109,109,109,109,
-213,213,213,213,213,213,213,213,213,213,213,213,213,213,213,213,
-213,213,215,215,215,215,215,215,217,217,217,215,109,109,109,109,
-
-/* block 108 */
-506,506,506,506,506,506,506,506,506,506,507,507,507,507,507,507,
-507,507,507,507,507,507,507,507,507,507,507,507,507,507,507,507,
-507,507,507,507,507,507,508,508,508,508,508,508,508,508,509,509,
-510,510,510,510,510,510,510,510,510,510,510,510,510,510,510,510,
-510,510,510,510,510,510,510,511,511,511,511,511,511,511,511,511,
-511,511,512,512,109,109,109,109,109,109,109,109,109,109,109,513,
-305,305,305,305,305,305,305,305,305,305,305,305,305,305,305,305,
-305,305,305,305,305,305,305,305,305,305,305,305,305,109,109,109,
-
-/* block 109 */
-514,514,514,515,516,516,516,516,516,516,516,516,516,516,516,516,
-516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,
-516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,
-516,516,516,514,515,515,514,514,514,514,515,515,514,515,515,515,
-515,517,517,517,517,517,517,517,517,517,517,517,517,517,109,102,
-518,518,518,518,518,518,518,518,518,518,109,109,109,109,517,517,
-109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
-109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
-
-/* block 110 */
-519,519,519,519,519,519,519,519,519,519,519,519,519,519,519,519,
-519,519,519,519,519,519,519,519,519,519,519,519,519,519,519,519,
-519,519,519,519,519,519,519,519,519,520,520,520,520,520,520,521,
-521,520,520,521,521,520,520,109,109,109,109,109,109,109,109,109,
-519,519,519,520,519,519,519,519,519,519,519,519,520,521,109,109,
-522,522,522,522,522,522,522,522,522,522,109,109,523,523,523,523,
-295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,
-524,295,295,295,295,295,295,301,301,301,295,296,109,109,109,109,
-
-/* block 111 */
-525,525,525,525,525,525,525,525,525,525,525,525,525,525,525,525,
-525,525,525,525,525,525,525,525,525,525,525,525,525,525,525,525,
-525,525,525,525,525,525,525,525,525,525,525,525,525,525,525,525,
-526,525,526,526,526,525,525,526,526,525,525,525,525,525,526,526,
-525,526,525,109,109,109,109,109,109,109,109,109,109,109,109,109,
-109,109,109,109,109,109,109,109,109,109,109,525,525,527,528,528,
-529,529,529,529,529,529,529,529,529,529,529,530,531,531,530,530,
-532,532,529,533,533,530,531,109,109,109,109,109,109,109,109,109,
-
-/* block 112 */
-109,308,308,308,308,308,308,109,109,308,308,308,308,308,308,109,
-109,308,308,308,308,308,308,109,109,109,109,109,109,109,109,109,
-308,308,308,308,308,308,308,109,308,308,308,308,308,308,308,109,
-109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
-109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
-109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
-109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
-109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
-
-/* block 113 */
-109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
-109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
-109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
-109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
-529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,
-529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,529,
-529,529,529,530,530,531,530,530,531,530,530,532,530,531,109,109,
-534,534,534,534,534,534,534,534,534,534,109,109,109,109,109,109,
-
-/* block 114 */
-535,536,536,536,536,536,536,536,536,536,536,536,536,536,536,536,
-536,536,536,536,536,536,536,536,536,536,536,536,535,536,536,536,
-536,536,536,536,536,536,536,536,536,536,536,536,536,536,536,536,
-536,536,536,536,536,536,536,536,535,536,536,536,536,536,536,536,
-536,536,536,536,536,536,536,536,536,536,536,536,536,536,536,536,
-536,536,536,536,535,536,536,536,536,536,536,536,536,536,536,536,
-536,536,536,536,536,536,536,536,536,536,536,536,536,536,536,536,
-535,536,536,536,536,536,536,536,536,536,536,536,536,536,536,536,
-
-/* block 115 */
-536,536,536,536,536,536,536,536,536,536,536,536,535,536,536,536,
-536,536,536,536,536,536,536,536,536,536,536,536,536,536,536,536,
-536,536,536,536,536,536,536,536,535,536,536,536,536,536,536,536,
-536,536,536,536,536,536,536,536,536,536,536,536,536,536,536,536,
-536,536,536,536,535,536,536,536,536,536,536,536,536,536,536,536,
-536,536,536,536,536,536,536,536,536,536,536,536,536,536,536,536,
-535,536,536,536,536,536,536,536,536,536,536,536,536,536,536,536,
-536,536,536,536,536,536,536,536,536,536,536,536,535,536,536,536,
-
-/* block 116 */
-536,536,536,536,536,536,536,536,536,536,536,536,536,536,536,536,
-536,536,536,536,536,536,536,536,535,536,536,536,536,536,536,536,
-536,536,536,536,536,536,536,536,536,536,536,536,536,536,536,536,
-536,536,536,536,535,536,536,536,536,536,536,536,536,536,536,536,
-536,536,536,536,536,536,536,536,536,536,536,536,536,536,536,536,
-535,536,536,536,536,536,536,536,536,536,536,536,536,536,536,536,
-536,536,536,536,536,536,536,536,536,536,536,536,535,536,536,536,
-536,536,536,536,536,536,536,536,536,536,536,536,536,536,536,536,
-
-/* block 117 */
-536,536,536,536,536,536,536,536,535,536,536,536,536,536,536,536,
-536,536,536,536,536,536,536,536,536,536,536,536,536,536,536,536,
-536,536,536,536,535,536,536,536,536,536,536,536,536,536,536,536,
-536,536,536,536,536,536,536,536,536,536,536,536,536,536,536,536,
-535,536,536,536,536,536,536,536,536,536,536,536,536,536,536,536,
-536,536,536,536,536,536,536,536,536,536,536,536,535,536,536,536,
-536,536,536,536,536,536,536,536,536,536,536,536,536,536,536,536,
-536,536,536,536,536,536,536,536,535,536,536,536,536,536,536,536,
-
-/* block 118 */
-536,536,536,536,536,536,536,536,536,536,536,536,536,536,536,536,
-536,536,536,536,535,536,536,536,536,536,536,536,536,536,536,536,
-536,536,536,536,536,536,536,536,536,536,536,536,536,536,536,536,
-535,536,536,536,536,536,536,536,536,536,536,536,536,536,536,536,
-536,536,536,536,536,536,536,536,536,536,536,536,535,536,536,536,
-536,536,536,536,536,536,536,536,536,536,536,536,536,536,536,536,
-536,536,536,536,536,536,536,536,535,536,536,536,536,536,536,536,
-536,536,536,536,536,536,536,536,536,536,536,536,536,536,536,536,
-
-/* block 119 */
-536,536,536,536,535,536,536,536,536,536,536,536,536,536,536,536,
-536,536,536,536,536,536,536,536,536,536,536,536,536,536,536,536,
-535,536,536,536,536,536,536,536,536,536,536,536,536,536,536,536,
-536,536,536,536,536,536,536,536,536,536,536,536,535,536,536,536,
-536,536,536,536,536,536,536,536,536,536,536,536,536,536,536,536,
-536,536,536,536,536,536,536,536,535,536,536,536,536,536,536,536,
-536,536,536,536,536,536,536,536,536,536,536,536,536,536,536,536,
-536,536,536,536,535,536,536,536,536,536,536,536,536,536,536,536,
-
-/* block 120 */
-536,536,536,536,536,536,536,536,536,536,536,536,536,536,536,536,
-535,536,536,536,536,536,536,536,536,536,536,536,536,536,536,536,
-536,536,536,536,536,536,536,536,536,536,536,536,535,536,536,536,
-536,536,536,536,536,536,536,536,536,536,536,536,536,536,536,536,
-536,536,536,536,536,536,536,536,535,536,536,536,536,536,536,536,
-536,536,536,536,536,536,536,536,536,536,536,536,536,536,536,536,
-536,536,536,536,535,536,536,536,536,536,536,536,536,536,536,536,
-536,536,536,536,536,536,536,536,536,536,536,536,536,536,536,536,
-
-/* block 121 */
-536,536,536,536,536,536,536,536,535,536,536,536,536,536,536,536,
-536,536,536,536,536,536,536,536,536,536,536,536,536,536,536,536,
-536,536,536,536,109,109,109,109,109,109,109,109,109,109,109,109,
-306,306,306,306,306,306,306,306,306,306,306,306,306,306,306,306,
-306,306,306,306,306,306,306,109,109,109,109,307,307,307,307,307,
-307,307,307,307,307,307,307,307,307,307,307,307,307,307,307,307,
-307,307,307,307,307,307,307,307,307,307,307,307,307,307,307,307,
-307,307,307,307,307,307,307,307,307,307,307,307,109,109,109,109,
-
-/* block 122 */
-537,537,537,537,537,537,537,537,537,537,537,537,537,537,537,537,
-537,537,537,537,537,537,537,537,537,537,537,537,537,537,537,537,
-537,537,537,537,537,537,537,537,537,537,537,537,537,537,537,537,
-537,537,537,537,537,537,537,537,537,537,537,537,537,537,537,537,
-537,537,537,537,537,537,537,537,537,537,537,537,537,537,537,537,
-537,537,537,537,537,537,537,537,537,537,537,537,537,537,537,537,
-537,537,537,537,537,537,537,537,537,537,537,537,537,537,537,537,
-537,537,537,537,537,537,537,537,537,537,537,537,537,537,537,537,
-
-/* block 123 */
-538,538,538,538,538,538,538,538,538,538,538,538,538,538,538,538,
-538,538,538,538,538,538,538,538,538,538,538,538,538,538,538,538,
-538,538,538,538,538,538,538,538,538,538,538,538,538,538,538,538,
-538,538,538,538,538,538,538,538,538,538,538,538,538,538,538,538,
-538,538,538,538,538,538,538,538,538,538,538,538,538,538,538,538,
-538,538,538,538,538,538,538,538,538,538,538,538,538,538,538,538,
-538,538,538,538,538,538,538,538,538,538,538,538,538,538,538,538,
-538,538,538,538,538,538,538,538,538,538,538,538,538,538,538,538,
-
-/* block 124 */
-475,475,475,475,475,475,475,475,475,475,475,475,475,475,475,475,
-475,475,475,475,475,475,475,475,475,475,475,475,475,475,475,475,
-475,475,475,475,475,475,475,475,475,475,475,475,475,475,475,475,
-475,475,475,475,475,475,475,475,475,475,475,475,475,475,475,475,
-475,475,475,475,475,475,475,475,475,475,475,475,475,475,475,475,
-475,475,475,475,475,475,475,475,475,475,475,475,475,475,475,475,
-475,475,475,475,475,475,475,475,475,475,475,475,475,475,109,109,
-475,475,475,475,475,475,475,475,475,475,475,475,475,475,475,475,
-
-/* block 125 */
-475,475,475,475,475,475,475,475,475,475,475,475,475,475,475,475,
-475,475,475,475,475,475,475,475,475,475,475,475,475,475,475,475,
-475,475,475,475,475,475,475,475,475,475,475,475,475,475,475,475,
-475,475,475,475,475,475,475,475,475,475,475,475,475,475,475,475,
-475,475,475,475,475,475,475,475,475,475,475,475,475,475,475,475,
-475,475,475,475,475,475,475,475,475,475,109,109,109,109,109,109,
-109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
-109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
-
-/* block 126 */
- 33, 33, 33, 33, 33, 33, 33,109,109,109,109,109,109,109,109,109,
-109,109,109,178,178,178,178,178,109,109,109,109,109,184,181,184,
-184,184,184,184,184,184,184,184,184,539,184,184,184,184,184,184,
-184,184,184,184,184,184,184,109,184,184,184,184,184,109,184,109,
-184,184,109,184,184,109,184,184,184,184,184,184,184,184,184,184,
-191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,
-191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,
-191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,
-
-/* block 127 */
-191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,
-191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,
-191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,
-191,191,540,540,540,540,540,540,540,540,540,540,540,540,540,540,
-540,540,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
-109,109,109,191,191,191,191,191,191,191,191,191,191,191,191,191,
-191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,
-191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,
-
-/* block 128 */
-191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,
-191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,
-191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,
-191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,
-191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,
-191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,
-191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,
-191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,
-
-/* block 129 */
-191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,
-191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,
-191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,
-191,191,191,191,191,191,191,191,191,191,191,191,191,191,  6,  7,
-109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
-191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,
-191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,
-191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,
-
-/* block 130 */
-191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,
-109,109,191,191,191,191,191,191,191,191,191,191,191,191,191,191,
-191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,
-191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,
-191,191,191,191,191,191,191,191,109,109,109,109,109,109,109,109,
-109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
-109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
-191,191,191,191,191,191,191,191,191,191,191,191,188, 19,109,109,
-
-/* block 131 */
-104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,
-  4,  4,  4,  4,  4,  4,  4,  6,  7,  4,109,109,109,109,109,109,
-104,104,104,104,104,104,104,109,109,109,109,109,109,109,109,109,
-  4,  9,  9, 15, 15,  6,  7,  6,  7,  6,  7,  6,  7,  6,  7,  6,
-  7,  6,  7,  6,  7,  4,  4,  6,  7,  4,  4,  4,  4, 15, 15, 15,
-  4,  4,  4,109,  4,  4,  4,  4,  9,  6,  7,  6,  7,  6,  7,  4,
-  4,  4,  8,  9,  8,  8,  8,109,  4,  5,  4,  4,109,109,109,109,
-191,191,191,191,191,109,191,191,191,191,191,191,191,191,191,191,
-
-/* block 132 */
-191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,
-191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,
-191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,
-191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,
-191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,
-191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,
-191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,
-191,191,191,191,191,191,191,191,191,191,191,191,191,109,109, 22,
-
-/* block 133 */
-109,  4,  4,  4,  5,  4,  4,  4,  6,  7,  4,  8,  4,  9,  4,  4,
- 10, 10, 10, 10, 10, 10, 10, 10, 10, 10,  4,  4,  8,  8,  8,  4,
-  4, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11,
- 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11,  6,  4,  7, 14, 15,
- 14, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
- 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,  6,  8,  7,  8,  6,
-  7,  4,  6,  7,  4,  4,469,469,469,469,469,469,469,469,469,469,
-102,469,469,469,469,469,469,469,469,469,469,469,469,469,469,469,
-
-/* block 134 */
-469,469,469,469,469,469,469,469,469,469,469,469,469,469,469,469,
-469,469,469,469,469,469,469,469,469,469,469,469,469,469,541,541,
-472,472,472,472,472,472,472,472,472,472,472,472,472,472,472,472,
-472,472,472,472,472,472,472,472,472,472,472,472,472,472,472,109,
-109,109,472,472,472,472,472,472,109,109,472,472,472,472,472,472,
-109,109,472,472,472,472,472,472,109,109,472,472,472,109,109,109,
-  5,  5,  8, 14, 19,  5,  5,109, 19,  8,  8,  8,  8, 19, 19,109,
-426,426,426,426,426,426,426,426,426, 22, 22, 22, 19, 19,109,109,
-
-/* block 135 */
-542,542,542,542,542,542,542,542,542,542,542,542,109,542,542,542,
-542,542,542,542,542,542,542,542,542,542,542,542,542,542,542,542,
-542,542,542,542,542,542,542,109,542,542,542,542,542,542,542,542,
-542,542,542,542,542,542,542,542,542,542,542,109,542,542,109,542,
-542,542,542,542,542,542,542,542,542,542,542,542,542,542,109,109,
-542,542,542,542,542,542,542,542,542,542,542,542,542,542,109,109,
-109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
-109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
-
-/* block 136 */
-542,542,542,542,542,542,542,542,542,542,542,542,542,542,542,542,
-542,542,542,542,542,542,542,542,542,542,542,542,542,542,542,542,
-542,542,542,542,542,542,542,542,542,542,542,542,542,542,542,542,
-542,542,542,542,542,542,542,542,542,542,542,542,542,542,542,542,
-542,542,542,542,542,542,542,542,542,542,542,542,542,542,542,542,
-542,542,542,542,542,542,542,542,542,542,542,542,542,542,542,542,
-542,542,542,542,542,542,542,542,542,542,542,542,542,542,542,542,
-542,542,542,542,542,542,542,542,542,542,542,109,109,109,109,109,
-
-/* block 137 */
-  4,  4,  4,109,109,109,109, 23, 23, 23, 23, 23, 23, 23, 23, 23,
- 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
- 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
- 23, 23, 23, 23,109,109,109, 19, 19, 19, 19, 19, 19, 19, 19, 19,
-543,543,543,543,543,543,543,543,543,543,543,543,543,543,543,543,
-543,543,543,543,543,543,543,543,543,543,543,543,543,543,543,543,
-543,543,543,543,543,543,543,543,543,543,543,543,543,543,543,543,
-543,543,543,543,543,544,544,544,544,545,545,545,545,545,545,545,
-
-/* block 138 */
-545,545,545,545,545,545,545,545,545,545,544,109,109,109,109,109,
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,109,109,109,109,
-109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
-109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
-109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,104,109,109,
-
-/* block 139 */
-546,546,546,546,546,546,546,546,546,546,546,546,546,546,546,546,
-546,546,546,546,546,546,546,546,546,546,546,546,546,109,109,109,
-547,547,547,547,547,547,547,547,547,547,547,547,547,547,547,547,
-547,547,547,547,547,547,547,547,547,547,547,547,547,547,547,547,
-547,547,547,547,547,547,547,547,547,547,547,547,547,547,547,547,
-547,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
-109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
-109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
-
-/* block 140 */
-548,548,548,548,548,548,548,548,548,548,548,548,548,548,548,548,
-548,548,548,548,548,548,548,548,548,548,548,548,548,548,548,109,
-549,549,549,549,109,109,109,109,109,109,109,109,109,109,109,109,
-550,550,550,550,550,550,550,550,550,550,550,550,550,550,550,550,
-550,551,550,550,550,550,550,550,550,550,551,109,109,109,109,109,
-109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
-109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
-109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
-
-/* block 141 */
-552,552,552,552,552,552,552,552,552,552,552,552,552,552,552,552,
-552,552,552,552,552,552,552,552,552,552,552,552,552,552,109,553,
-554,554,554,554,554,554,554,554,554,554,554,554,554,554,554,554,
-554,554,554,554,554,554,554,554,554,554,554,554,554,554,554,554,
-554,554,554,554,109,109,109,109,554,554,554,554,554,554,554,554,
-555,556,556,556,556,556,109,109,109,109,109,109,109,109,109,109,
-109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
-109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
-
-/* block 142 */
-557,557,557,557,557,557,557,557,557,557,557,557,557,557,557,557,
-557,557,557,557,557,557,557,557,557,557,557,557,557,557,557,557,
-557,557,557,557,557,557,557,557,558,558,558,558,558,558,558,558,
-558,558,558,558,558,558,558,558,558,558,558,558,558,558,558,558,
-558,558,558,558,558,558,558,558,558,558,558,558,558,558,558,558,
-559,559,559,559,559,559,559,559,559,559,559,559,559,559,559,559,
-559,559,559,559,559,559,559,559,559,559,559,559,559,559,559,559,
-559,559,559,559,559,559,559,559,559,559,559,559,559,559,559,559,
-
-/* block 143 */
-560,560,560,560,560,560,560,560,560,560,560,560,560,560,560,560,
-560,560,560,560,560,560,560,560,560,560,560,560,560,560,109,109,
-561,561,561,561,561,561,561,561,561,561,109,109,109,109,109,109,
-109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
-109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
-109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
-109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
-109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
-
-/* block 144 */
-562,562,562,562,562,562,109,109,562,109,562,562,562,562,562,562,
-562,562,562,562,562,562,562,562,562,562,562,562,562,562,562,562,
-562,562,562,562,562,562,562,562,562,562,562,562,562,562,562,562,
-562,562,562,562,562,562,109,562,562,109,109,109,562,109,109,562,
-563,563,563,563,563,563,563,563,563,563,563,563,563,563,563,563,
-563,563,563,563,563,563,109,564,565,565,565,565,565,565,565,565,
-109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
-109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
-
-/* block 145 */
-566,566,566,566,566,566,566,566,566,566,566,566,566,566,566,566,
-566,566,566,566,566,566,567,567,567,567,567,567,109,109,109,568,
-569,569,569,569,569,569,569,569,569,569,569,569,569,569,569,569,
-569,569,569,569,569,569,569,569,569,569,109,109,109,109,109,570,
-109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
-109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
-109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
-109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
-
-/* block 146 */
-571,571,571,571,571,571,571,571,571,571,571,571,571,571,571,571,
-571,571,571,571,571,571,571,571,571,571,571,571,571,571,571,571,
-572,572,572,572,572,572,572,572,572,572,572,572,572,572,572,572,
-572,572,572,572,572,572,572,572,109,109,109,109,109,109,572,572,
-109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
-109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
-109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
-109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
-
-/* block 147 */
-573,574,574,574,109,574,574,109,109,109,109,109,574,574,574,574,
-573,573,573,573,109,573,573,573,109,573,573,573,573,573,573,573,
-573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,
-573,573,573,573,109,109,109,109,574,574,574,109,109,109,109,574,
-575,575,575,575,575,575,575,575,109,109,109,109,109,109,109,109,
-576,576,576,576,576,576,576,576,576,109,109,109,109,109,109,109,
-577,577,577,577,577,577,577,577,577,577,577,577,577,577,577,577,
-577,577,577,577,577,577,577,577,577,577,577,577,577,578,578,579,
-
-/* block 148 */
-580,580,580,580,580,580,580,580,580,580,580,580,580,580,580,580,
-580,580,580,580,580,580,580,580,580,580,580,580,580,580,580,580,
-580,580,580,580,580,580,580,580,580,580,580,580,580,580,580,580,
-580,580,580,580,580,580,109,109,109,581,581,581,581,581,581,581,
-582,582,582,582,582,582,582,582,582,582,582,582,582,582,582,582,
-582,582,582,582,582,582,109,109,583,583,583,583,583,583,583,583,
-584,584,584,584,584,584,584,584,584,584,584,584,584,584,584,584,
-584,584,584,109,109,109,109,109,585,585,585,585,585,585,585,585,
-
-/* block 149 */
-586,586,586,586,586,586,586,586,586,586,586,586,586,586,586,586,
-586,586,586,586,586,586,586,586,586,586,586,586,586,586,586,586,
-586,586,586,586,586,586,586,586,586,586,586,586,586,586,586,586,
-586,586,586,586,586,586,586,586,586,586,586,586,586,586,586,586,
-586,586,586,586,586,586,586,586,586,109,109,109,109,109,109,109,
-109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
-109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
-109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
-
-/* block 150 */
-109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
-109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
-109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
-109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
-109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
-109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
-587,587,587,587,587,587,587,587,587,587,587,587,587,587,587,587,
-587,587,587,587,587,587,587,587,587,587,587,587,587,587,587,109,
-
-/* block 151 */
-588,589,588,590,590,590,590,590,590,590,590,590,590,590,590,590,
-590,590,590,590,590,590,590,590,590,590,590,590,590,590,590,590,
-590,590,590,590,590,590,590,590,590,590,590,590,590,590,590,590,
-590,590,590,590,590,590,590,590,589,589,589,589,589,589,589,589,
-589,589,589,589,589,589,589,591,591,591,591,591,591,591,109,109,
-109,109,592,592,592,592,592,592,592,592,592,592,592,592,592,592,
-592,592,592,592,592,592,593,593,593,593,593,593,593,593,593,593,
-109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
-
-/* block 152 */
-594,594,595,596,596,596,596,596,596,596,596,596,596,596,596,596,
-596,596,596,596,596,596,596,596,596,596,596,596,596,596,596,596,
-596,596,596,596,596,596,596,596,596,596,596,596,596,596,596,596,
-595,595,595,594,594,594,594,595,595,594,594,597,597,598,597,597,
-597,597,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
-599,599,599,599,599,599,599,599,599,599,599,599,599,599,599,599,
-599,599,599,599,599,599,599,599,599,109,109,109,109,109,109,109,
-600,600,600,600,600,600,600,600,600,600,109,109,109,109,109,109,
-
-/* block 153 */
-601,601,601,602,602,602,602,602,602,602,602,602,602,602,602,602,
-602,602,602,602,602,602,602,602,602,602,602,602,602,602,602,602,
-602,602,602,602,602,602,602,601,601,601,601,601,603,601,601,601,
-601,601,601,601,601,109,604,604,604,604,604,604,604,604,604,604,
-605,605,605,605,109,109,109,109,109,109,109,109,109,109,109,109,
-109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
-109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
-109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
-
-/* block 154 */
-606,606,607,608,608,608,608,608,608,608,608,608,608,608,608,608,
-608,608,608,608,608,608,608,608,608,608,608,608,608,608,608,608,
-608,608,608,608,608,608,608,608,608,608,608,608,608,608,608,608,
-608,608,608,607,607,607,606,606,606,606,606,606,606,606,606,607,
-607,608,608,608,608,609,609,609,609,109,109,109,109,109,109,109,
-610,610,610,610,610,610,610,610,610,610,109,109,109,109,109,109,
-109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
-109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
-
-/* block 155 */
-611,611,611,611,611,611,611,611,611,611,611,611,611,611,611,611,
-611,611,611,611,611,611,611,611,611,611,611,611,611,611,611,611,
-611,611,611,611,611,611,611,611,611,611,611,612,613,612,613,613,
-612,612,612,612,612,612,613,612,109,109,109,109,109,109,109,109,
-614,614,614,614,614,614,614,614,614,614,109,109,109,109,109,109,
-109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
-109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
-109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
-
-/* block 156 */
-615,615,615,615,615,615,615,615,615,615,615,615,615,615,615,615,
-615,615,615,615,615,615,615,615,615,615,615,615,615,615,615,615,
-615,615,615,615,615,615,615,615,615,615,615,615,615,615,615,615,
-615,615,615,615,615,615,615,615,615,615,615,615,615,615,615,615,
-615,615,615,615,615,615,615,615,615,615,615,615,615,615,615,615,
-615,615,615,615,615,615,615,615,615,615,615,615,615,615,615,615,
-615,615,615,615,615,615,615,615,615,615,615,615,615,615,615,615,
-615,615,615,615,615,615,615,615,615,615,615,615,615,615,615,615,
-
-/* block 157 */
-615,615,615,615,615,615,615,615,615,615,615,615,615,615,615,615,
-615,615,615,615,615,615,615,615,615,615,615,615,615,615,615,615,
-615,615,615,615,615,615,615,615,615,615,615,615,615,615,615,615,
-615,615,615,615,615,615,615,615,615,615,615,615,615,615,615,615,
-615,615,615,615,615,615,615,615,615,615,615,615,615,615,615,615,
-615,615,615,615,615,615,615,615,615,615,615,615,615,615,615,615,
-615,615,615,615,615,615,615,615,615,615,615,615,615,615,615,109,
-109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
-
-/* block 158 */
-616,616,616,616,616,616,616,616,616,616,616,616,616,616,616,616,
-616,616,616,616,616,616,616,616,616,616,616,616,616,616,616,616,
-616,616,616,616,616,616,616,616,616,616,616,616,616,616,616,616,
-616,616,616,616,616,616,616,616,616,616,616,616,616,616,616,616,
-616,616,616,616,616,616,616,616,616,616,616,616,616,616,616,616,
-616,616,616,616,616,616,616,616,616,616,616,616,616,616,616,616,
-616,616,616,109,109,109,109,109,109,109,109,109,109,109,109,109,
-617,617,617,617,109,109,109,109,109,109,109,109,109,109,109,109,
-
-/* block 159 */
-618,618,618,618,618,618,618,618,618,618,618,618,618,618,618,618,
-618,618,618,618,618,618,618,618,618,618,618,618,618,618,618,618,
-618,618,618,618,618,618,618,618,618,618,618,618,618,618,618,618,
-618,618,618,618,618,618,618,618,618,618,618,618,618,618,618,618,
-618,618,618,618,618,618,618,618,618,618,618,618,618,618,618,618,
-618,618,618,618,618,618,618,618,618,618,618,618,618,618,618,618,
-618,618,618,618,618,618,618,618,618,618,618,618,618,618,618,618,
-618,618,618,618,618,618,618,618,618,618,618,618,618,618,618,618,
-
-/* block 160 */
-618,618,618,618,618,618,618,618,618,618,618,618,618,618,618,618,
-618,618,618,618,618,618,618,618,618,618,618,618,618,618,618,618,
-618,618,618,618,618,618,618,618,618,618,618,618,618,618,618,109,
-109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
-109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
-109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
-109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
-109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
-
-/* block 161 */
-488,488,488,488,488,488,488,488,488,488,488,488,488,488,488,488,
-488,488,488,488,488,488,488,488,488,488,488,488,488,488,488,488,
-488,488,488,488,488,488,488,488,488,488,488,488,488,488,488,488,
-488,488,488,488,488,488,488,488,488,488,488,488,488,488,488,488,
-488,488,488,488,488,488,488,488,488,488,488,488,488,488,488,488,
-488,488,488,488,488,488,488,488,488,488,488,488,488,488,488,488,
-488,488,488,488,488,488,488,488,488,488,488,488,488,488,488,488,
-488,488,488,488,488,488,488,488,488,488,488,488,488,488,488,488,
-
-/* block 162 */
-488,488,488,488,488,488,488,488,488,488,488,488,488,488,488,488,
-488,488,488,488,488,488,488,488,488,488,488,488,488,488,488,488,
-488,488,488,488,488,488,488,488,488,488,488,488,488,488,488,488,
-488,488,488,488,488,488,488,488,488,109,109,109,109,109,109,109,
-109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
-109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
-109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
-109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
-
-/* block 163 */
-619,619,619,619,619,619,619,619,619,619,619,619,619,619,619,619,
-619,619,619,619,619,619,619,619,619,619,619,619,619,619,619,619,
-619,619,619,619,619,619,619,619,619,619,619,619,619,619,619,619,
-619,619,619,619,619,619,619,619,619,619,619,619,619,619,619,619,
-619,619,619,619,619,109,109,109,109,109,109,109,109,109,109,109,
-619,620,620,620,620,620,620,620,620,620,620,620,620,620,620,620,
-620,620,620,620,620,620,620,620,620,620,620,620,620,620,620,620,
-620,620,620,620,620,620,620,620,620,620,620,620,620,620,620,109,
-
-/* block 164 */
-109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,621,
-621,621,621,622,622,622,622,622,622,622,622,622,622,622,622,622,
-109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
-109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
-109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
-109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
-109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
-109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
-
-/* block 165 */
-469,467,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
-109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
-109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
-109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
-109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
-109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
-109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
-109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
-
-/* block 166 */
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19,109,109,109,109,109,109,109,109,109,109,
-
-/* block 167 */
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19,109,109, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19,623,395,104,104,104, 19, 19, 19,395,623,623,
-623,623,623, 22, 22, 22, 22, 22, 22, 22, 22,104,104,104,104,104,
-
-/* block 168 */
-104,104,104, 19, 19,104,104,104,104,104,104,104, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,104,104,104,104, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,109,109,
-109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
-109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
-
-/* block 169 */
-545,545,545,545,545,545,545,545,545,545,545,545,545,545,545,545,
-545,545,545,545,545,545,545,545,545,545,545,545,545,545,545,545,
-545,545,545,545,545,545,545,545,545,545,545,545,545,545,545,545,
-545,545,545,545,545,545,545,545,545,545,545,545,545,545,545,545,
-545,545,624,624,624,545,109,109,109,109,109,109,109,109,109,109,
-109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
-109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
-109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
-
-/* block 170 */
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19,109,109,109,109,109,109,109,109,109,
- 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
- 23, 23,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
-
-/* block 171 */
-428,428,428,428,428,428,428,428,428,428,428,428,428,428,428,428,
-428,428,428,428,428,428,428,428,428,428,429,429,429,429,429,429,
-429,429,429,429,429,429,429,429,429,429,429,429,429,429,429,429,
-429,429,429,429,428,428,428,428,428,428,428,428,428,428,428,428,
-428,428,428,428,428,428,428,428,428,428,428,428,428,428,429,429,
-429,429,429,429,429,109,429,429,429,429,429,429,429,429,429,429,
-429,429,429,429,429,429,429,429,428,428,428,428,428,428,428,428,
-428,428,428,428,428,428,428,428,428,428,428,428,428,428,428,428,
-
-/* block 172 */
-428,428,429,429,429,429,429,429,429,429,429,429,429,429,429,429,
-429,429,429,429,429,429,429,429,429,429,429,429,428,109,428,428,
-109,109,428,109,109,428,428,109,109,428,428,428,428,109,428,428,
-428,428,428,428,428,428,429,429,429,429,109,429,109,429,429,429,
-429,429,429,429,109,429,429,429,429,429,429,429,429,429,429,429,
-428,428,428,428,428,428,428,428,428,428,428,428,428,428,428,428,
-428,428,428,428,428,428,428,428,428,428,429,429,429,429,429,429,
-429,429,429,429,429,429,429,429,429,429,429,429,429,429,429,429,
-
-/* block 173 */
-429,429,429,429,428,428,109,428,428,428,428,109,109,428,428,428,
-428,428,428,428,428,109,428,428,428,428,428,428,428,109,429,429,
-429,429,429,429,429,429,429,429,429,429,429,429,429,429,429,429,
-429,429,429,429,429,429,429,429,428,428,109,428,428,428,428,109,
-428,428,428,428,428,109,428,109,109,109,428,428,428,428,428,428,
-428,109,429,429,429,429,429,429,429,429,429,429,429,429,429,429,
-429,429,429,429,429,429,429,429,429,429,429,429,428,428,428,428,
-428,428,428,428,428,428,428,428,428,428,428,428,428,428,428,428,
-
-/* block 174 */
-428,428,428,428,428,428,429,429,429,429,429,429,429,429,429,429,
-429,429,429,429,429,429,429,429,429,429,429,429,429,429,429,429,
-428,428,428,428,428,428,428,428,428,428,428,428,428,428,428,428,
-428,428,428,428,428,428,428,428,428,428,429,429,429,429,429,429,
-429,429,429,429,429,429,429,429,429,429,429,429,429,429,429,429,
-429,429,429,429,428,428,428,428,428,428,428,428,428,428,428,428,
-428,428,428,428,428,428,428,428,428,428,428,428,428,428,429,429,
-429,429,429,429,429,429,429,429,429,429,429,429,429,429,429,429,
-
-/* block 175 */
-429,429,429,429,429,429,429,429,428,428,428,428,428,428,428,428,
-428,428,428,428,428,428,428,428,428,428,428,428,428,428,428,428,
-428,428,429,429,429,429,429,429,429,429,429,429,429,429,429,429,
-429,429,429,429,429,429,429,429,429,429,429,429,428,428,428,428,
-428,428,428,428,428,428,428,428,428,428,428,428,428,428,428,428,
-428,428,428,428,428,428,429,429,429,429,429,429,429,429,429,429,
-429,429,429,429,429,429,429,429,429,429,429,429,429,429,429,429,
-428,428,428,428,428,428,428,428,428,428,428,428,428,428,428,428,
-
-/* block 176 */
-428,428,428,428,428,428,428,428,428,428,429,429,429,429,429,429,
-429,429,429,429,429,429,429,429,429,429,429,429,429,429,429,429,
-429,429,429,429,429,429,109,109,428,428,428,428,428,428,428,428,
-428,428,428,428,428,428,428,428,428,428,428,428,428,428,428,428,
-428,  8,429,429,429,429,429,429,429,429,429,429,429,429,429,429,
-429,429,429,429,429,429,429,429,429,429,429,  8,429,429,429,429,
-429,429,428,428,428,428,428,428,428,428,428,428,428,428,428,428,
-428,428,428,428,428,428,428,428,428,428,428,  8,429,429,429,429,
-
-/* block 177 */
-429,429,429,429,429,429,429,429,429,429,429,429,429,429,429,429,
-429,429,429,429,429,  8,429,429,429,429,429,429,428,428,428,428,
-428,428,428,428,428,428,428,428,428,428,428,428,428,428,428,428,
-428,428,428,428,428,  8,429,429,429,429,429,429,429,429,429,429,
-429,429,429,429,429,429,429,429,429,429,429,429,429,429,429,  8,
-429,429,429,429,429,429,428,428,428,428,428,428,428,428,428,428,
-428,428,428,428,428,428,428,428,428,428,428,428,428,428,428,  8,
-429,429,429,429,429,429,429,429,429,429,429,429,429,429,429,429,
-
-/* block 178 */
-429,429,429,429,429,429,429,429,429,  8,429,429,429,429,429,429,
-428,428,428,428,428,428,428,428,428,428,428,428,428,428,428,428,
-428,428,428,428,428,428,428,428,428,  8,429,429,429,429,429,429,
-429,429,429,429,429,429,429,429,429,429,429,429,429,429,429,429,
-429,429,429,  8,429,429,429,429,429,429,428,429,109,109, 10, 10,
- 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10,
- 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10,
- 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10,
-
-/* block 179 */
-191,191,191,191,109,191,191,191,191,191,191,191,191,191,191,191,
-191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,191,
-109,191,191,109,191,109,109,191,109,191,191,191,191,191,191,191,
-191,191,191,109,191,191,191,191,109,191,109,191,109,109,109,109,
-109,109,191,109,109,109,109,191,109,191,109,191,109,191,191,191,
-109,191,191,109,191,109,109,191,109,191,109,191,109,191,109,191,
-109,191,191,109,191,109,109,191,191,191,191,109,191,191,191,191,
-191,191,191,109,191,191,191,191,109,191,191,191,191,109,191,109,
-
-/* block 180 */
-191,191,191,191,191,191,191,191,191,191,109,191,191,191,191,191,
-191,191,191,191,191,191,191,191,191,191,191,191,109,109,109,109,
-109,191,191,191,109,191,191,191,191,191,109,191,191,191,191,191,
-191,191,191,191,191,191,191,191,191,191,191,191,109,109,109,109,
-109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
-109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
-109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
-186,186,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
-
-/* block 181 */
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,109,109,109,109,
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
-
-/* block 182 */
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19,109,109,109,109,109,109,109,109,109,109,109,109,
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,109,
-109, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,109,
-109, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
-109, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
-109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
-109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
-
-/* block 183 */
- 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,109,109,109,109,109,
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,109,
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,109,109,109,109,
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
-
-/* block 184 */
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,109,109,109,109,109,
-109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
-109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
-109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
-109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
-109,109,109,109,109,109,625,625,625,625,625,625,625,625,625,625,
-625,625,625,625,625,625,625,625,625,625,625,625,625,625,625,625,
-
-/* block 185 */
-626, 19, 19,109,109,109,109,109,109,109,109,109,109,109,109,109,
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,109,109,109,109,109,
- 19, 19, 19, 19, 19, 19, 19, 19, 19,109,109,109,109,109,109,109,
- 19, 19,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
-109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
-109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
-
-/* block 186 */
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
- 19,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
- 19, 19, 19, 19, 19, 19,109, 19, 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,109,109,109,
-
-/* block 187 */
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19,109,109,109,109,109,109,109,109,109,109,109,109,
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19,109, 19, 19, 19, 19, 19,109,109,109,109,109,
-109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
- 19,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
-
-/* block 188 */
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,109,
- 19,109, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
-
-/* block 189 */
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19,109, 19, 19, 19, 19,109,109,109,
-
-/* block 190 */
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,109,109,
- 19, 19, 19, 19,109,109,109,109,109,109,109,109,109,109,109,109,
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19,109,109,109,109,109,109,109,109,
-109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
-
-/* block 191 */
-109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
-109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
-109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
-109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
-109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
-109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
-109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
-109,109,109,109,109,109,109,109,109,109,109, 19, 19, 19, 19, 19,
-
-/* block 192 */
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
- 19,109,109,109,109, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
-109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
-109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
-109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
-
-/* block 193 */
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19,109,109,109,109,109,109,109,109,109,109,
-109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
-109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
-109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
-
-/* block 194 */
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19,109,109,109,109,109,109,109,109,109,109,109,109,
-
-/* block 195 */
-475,475,475,475,475,475,475,475,475,475,475,475,475,475,475,475,
-475,475,475,475,475,475,475,475,475,475,475,475,475,475,475,475,
-475,475,475,475,475,475,475,475,475,475,475,475,475,475,475,475,
-475,475,475,475,475,475,475,475,475,475,475,475,475,475,475,475,
-475,475,475,475,475,475,475,475,475,475,475,475,475,475,475,475,
-475,475,475,475,475,475,475,109,109,109,109,109,109,109,109,109,
-109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
-109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
-
-/* block 196 */
-475,475,475,475,475,475,475,475,475,475,475,475,475,475,475,475,
-475,475,475,475,475,475,475,475,475,475,475,475,475,475,475,475,
-475,475,475,475,475,475,475,475,475,475,475,475,475,475,475,475,
-475,475,475,475,475,109,109,109,109,109,109,109,109,109,109,109,
-475,475,475,475,475,475,475,475,475,475,475,475,475,475,475,475,
-475,475,475,475,475,475,475,475,475,475,475,475,475,475,475,475,
-475,475,475,475,475,475,475,475,475,475,475,475,475,475,475,475,
-475,475,475,475,475,475,475,475,475,475,475,475,475,475,475,475,
-
-/* block 197 */
-475,475,475,475,475,475,475,475,475,475,475,475,475,475,475,475,
-475,475,475,475,475,475,475,475,475,475,475,475,475,475,109,109,
-109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
-109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
-109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
-109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
-109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
-109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
-
-/* block 198 */
-426, 22,426,426,426,426,426,426,426,426,426,426,426,426,426,426,
-426,426,426,426,426,426,426,426,426,426,426,426,426,426,426,426,
- 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22,
- 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22,
- 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22,
- 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22,
- 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22,
- 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22,
-
-/* block 199 */
-426,426,426,426,426,426,426,426,426,426,426,426,426,426,426,426,
-426,426,426,426,426,426,426,426,426,426,426,426,426,426,426,426,
-426,426,426,426,426,426,426,426,426,426,426,426,426,426,426,426,
-426,426,426,426,426,426,426,426,426,426,426,426,426,426,426,426,
-426,426,426,426,426,426,426,426,426,426,426,426,426,426,426,426,
-426,426,426,426,426,426,426,426,426,426,426,426,426,426,426,426,
-426,426,426,426,426,426,426,426,426,426,426,426,426,426,426,426,
-426,426,426,426,426,426,426,426,426,426,426,426,426,426,426,426,
-
-/* block 200 */
-104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,
-104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,
-104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,
-104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,
-104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,
-104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,
-104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,
-104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,
-
-/* block 201 */
-104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,
-104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,
-104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,
-104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,
-104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,
-104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,
-104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,
-426,426,426,426,426,426,426,426,426,426,426,426,426,426,426,426,
-
-/* block 202 */
-538,538,538,538,538,538,538,538,538,538,538,538,538,538,538,538,
-538,538,538,538,538,538,538,538,538,538,538,538,538,538,538,538,
-538,538,538,538,538,538,538,538,538,538,538,538,538,538,538,538,
-538,538,538,538,538,538,538,538,538,538,538,538,538,538,538,538,
-538,538,538,538,538,538,538,538,538,538,538,538,538,538,538,538,
-538,538,538,538,538,538,538,538,538,538,538,538,538,538,538,538,
-538,538,538,538,538,538,538,538,538,538,538,538,538,538,538,538,
-538,538,538,538,538,538,538,538,538,538,538,538,538,538,109,109,
-
-};
-
-#if UCD_BLOCK_SIZE != 128
-#error Please correct UCD_BLOCK_SIZE in pcre_internal.h
-#endif
-#endif  /* SUPPORT_UCP */
-
-#endif  /* PCRE_INCLUDED */
diff --git a/src/extra/pcre/pcre_valid_utf8.c b/src/extra/pcre/pcre_valid_utf8.c
deleted file mode 100644
index 3b0f646..0000000
--- a/src/extra/pcre/pcre_valid_utf8.c
+++ /dev/null
@@ -1,301 +0,0 @@
-/*************************************************
-*      Perl-Compatible Regular Expressions       *
-*************************************************/
-
-/* PCRE is a library of functions to support regular expressions whose syntax
-and semantics are as close as possible to those of the Perl 5 language.
-
-                       Written by Philip Hazel
-           Copyright (c) 1997-2013 University of Cambridge
-
------------------------------------------------------------------------------
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are met:
-
-    * Redistributions of source code must retain the above copyright notice,
-      this list of conditions and the following disclaimer.
-
-    * Redistributions in binary form must reproduce the above copyright
-      notice, this list of conditions and the following disclaimer in the
-      documentation and/or other materials provided with the distribution.
-
-    * Neither the name of the University of Cambridge nor the names of its
-      contributors may be used to endorse or promote products derived from
-      this software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
-LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-POSSIBILITY OF SUCH DAMAGE.
------------------------------------------------------------------------------
-*/
-
-
-/* This module contains an internal function for validating UTF-8 character
-strings. */
-
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include "pcre_internal.h"
-
-
-/*************************************************
-*         Validate a UTF-8 string                *
-*************************************************/
-
-/* This function is called (optionally) at the start of compile or match, to
-check that a supposed UTF-8 string is actually valid. The early check means
-that subsequent code can assume it is dealing with a valid string. The check
-can be turned off for maximum performance, but the consequences of supplying an
-invalid string are then undefined.
-
-Originally, this function checked according to RFC 2279, allowing for values in
-the range 0 to 0x7fffffff, up to 6 bytes long, but ensuring that they were in
-the canonical format. Once somebody had pointed out RFC 3629 to me (it
-obsoletes 2279), additional restrictions were applied. The values are now
-limited to be between 0 and 0x0010ffff, no more than 4 bytes long, and the
-subrange 0xd000 to 0xdfff is excluded. However, the format of 5-byte and 6-byte
-characters is still checked.
-
-From release 8.13 more information about the details of the error are passed
-back in the returned value:
-
-PCRE_UTF8_ERR0   No error
-PCRE_UTF8_ERR1   Missing 1 byte at the end of the string
-PCRE_UTF8_ERR2   Missing 2 bytes at the end of the string
-PCRE_UTF8_ERR3   Missing 3 bytes at the end of the string
-PCRE_UTF8_ERR4   Missing 4 bytes at the end of the string
-PCRE_UTF8_ERR5   Missing 5 bytes at the end of the string
-PCRE_UTF8_ERR6   2nd-byte's two top bits are not 0x80
-PCRE_UTF8_ERR7   3rd-byte's two top bits are not 0x80
-PCRE_UTF8_ERR8   4th-byte's two top bits are not 0x80
-PCRE_UTF8_ERR9   5th-byte's two top bits are not 0x80
-PCRE_UTF8_ERR10  6th-byte's two top bits are not 0x80
-PCRE_UTF8_ERR11  5-byte character is not permitted by RFC 3629
-PCRE_UTF8_ERR12  6-byte character is not permitted by RFC 3629
-PCRE_UTF8_ERR13  4-byte character with value > 0x10ffff is not permitted
-PCRE_UTF8_ERR14  3-byte character with value 0xd000-0xdfff is not permitted
-PCRE_UTF8_ERR15  Overlong 2-byte sequence
-PCRE_UTF8_ERR16  Overlong 3-byte sequence
-PCRE_UTF8_ERR17  Overlong 4-byte sequence
-PCRE_UTF8_ERR18  Overlong 5-byte sequence (won't ever occur)
-PCRE_UTF8_ERR19  Overlong 6-byte sequence (won't ever occur)
-PCRE_UTF8_ERR20  Isolated 0x80 byte (not within UTF-8 character)
-PCRE_UTF8_ERR21  Byte with the illegal value 0xfe or 0xff
-PCRE_UTF8_ERR22  Unused (was non-character)
-
-Arguments:
-  string       points to the string
-  length       length of string, or -1 if the string is zero-terminated
-  errp         pointer to an error position offset variable
-
-Returns:       = 0    if the string is a valid UTF-8 string
-               > 0    otherwise, setting the offset of the bad character
-*/
-
-int
-PRIV(valid_utf)(PCRE_PUCHAR string, int length, int *erroroffset)
-{
-#ifdef SUPPORT_UTF
-register PCRE_PUCHAR p;
-
-if (length < 0)
-  {
-  for (p = string; *p != 0; p++);
-  length = (int)(p - string);
-  }
-
-for (p = string; length-- > 0; p++)
-  {
-  register pcre_uchar ab, c, d;
-
-  c = *p;
-  if (c < 128) continue;                /* ASCII character */
-
-  if (c < 0xc0)                         /* Isolated 10xx xxxx byte */
-    {
-    *erroroffset = (int)(p - string);
-    return PCRE_UTF8_ERR20;
-    }
-
-  if (c >= 0xfe)                        /* Invalid 0xfe or 0xff bytes */
-    {
-    *erroroffset = (int)(p - string);
-    return PCRE_UTF8_ERR21;
-    }
-
-  ab = PRIV(utf8_table4)[c & 0x3f];     /* Number of additional bytes */
-  if (length < ab)
-    {
-    *erroroffset = (int)(p - string);          /* Missing bytes */
-    return ab - length;                 /* Codes ERR1 to ERR5 */
-    }
-  length -= ab;                         /* Length remaining */
-
-  /* Check top bits in the second byte */
-
-  if (((d = *(++p)) & 0xc0) != 0x80)
-    {
-    *erroroffset = (int)(p - string) - 1;
-    return PCRE_UTF8_ERR6;
-    }
-
-  /* For each length, check that the remaining bytes start with the 0x80 bit
-  set and not the 0x40 bit. Then check for an overlong sequence, and for the
-  excluded range 0xd800 to 0xdfff. */
-
-  switch (ab)
-    {
-    /* 2-byte character. No further bytes to check for 0x80. Check first byte
-    for for xx00 000x (overlong sequence). */
-
-    case 1: if ((c & 0x3e) == 0)
-      {
-      *erroroffset = (int)(p - string) - 1;
-      return PCRE_UTF8_ERR15;
-      }
-    break;
-
-    /* 3-byte character. Check third byte for 0x80. Then check first 2 bytes
-      for 1110 0000, xx0x xxxx (overlong sequence) or
-          1110 1101, 1010 xxxx (0xd800 - 0xdfff) */
-
-    case 2:
-    if ((*(++p) & 0xc0) != 0x80)     /* Third byte */
-      {
-      *erroroffset = (int)(p - string) - 2;
-      return PCRE_UTF8_ERR7;
-      }
-    if (c == 0xe0 && (d & 0x20) == 0)
-      {
-      *erroroffset = (int)(p - string) - 2;
-      return PCRE_UTF8_ERR16;
-      }
-    if (c == 0xed && d >= 0xa0)
-      {
-      *erroroffset = (int)(p - string) - 2;
-      return PCRE_UTF8_ERR14;
-      }
-    break;
-
-    /* 4-byte character. Check 3rd and 4th bytes for 0x80. Then check first 2
-       bytes for for 1111 0000, xx00 xxxx (overlong sequence), then check for a
-       character greater than 0x0010ffff (f4 8f bf bf) */
-
-    case 3:
-    if ((*(++p) & 0xc0) != 0x80)     /* Third byte */
-      {
-      *erroroffset = (int)(p - string) - 2;
-      return PCRE_UTF8_ERR7;
-      }
-    if ((*(++p) & 0xc0) != 0x80)     /* Fourth byte */
-      {
-      *erroroffset = (int)(p - string) - 3;
-      return PCRE_UTF8_ERR8;
-      }
-    if (c == 0xf0 && (d & 0x30) == 0)
-      {
-      *erroroffset = (int)(p - string) - 3;
-      return PCRE_UTF8_ERR17;
-      }
-    if (c > 0xf4 || (c == 0xf4 && d > 0x8f))
-      {
-      *erroroffset = (int)(p - string) - 3;
-      return PCRE_UTF8_ERR13;
-      }
-    break;
-
-    /* 5-byte and 6-byte characters are not allowed by RFC 3629, and will be
-    rejected by the length test below. However, we do the appropriate tests
-    here so that overlong sequences get diagnosed, and also in case there is
-    ever an option for handling these larger code points. */
-
-    /* 5-byte character. Check 3rd, 4th, and 5th bytes for 0x80. Then check for
-    1111 1000, xx00 0xxx */
-
-    case 4:
-    if ((*(++p) & 0xc0) != 0x80)     /* Third byte */
-      {
-      *erroroffset = (int)(p - string) - 2;
-      return PCRE_UTF8_ERR7;
-      }
-    if ((*(++p) & 0xc0) != 0x80)     /* Fourth byte */
-      {
-      *erroroffset = (int)(p - string) - 3;
-      return PCRE_UTF8_ERR8;
-      }
-    if ((*(++p) & 0xc0) != 0x80)     /* Fifth byte */
-      {
-      *erroroffset = (int)(p - string) - 4;
-      return PCRE_UTF8_ERR9;
-      }
-    if (c == 0xf8 && (d & 0x38) == 0)
-      {
-      *erroroffset = (int)(p - string) - 4;
-      return PCRE_UTF8_ERR18;
-      }
-    break;
-
-    /* 6-byte character. Check 3rd-6th bytes for 0x80. Then check for
-    1111 1100, xx00 00xx. */
-
-    case 5:
-    if ((*(++p) & 0xc0) != 0x80)     /* Third byte */
-      {
-      *erroroffset = (int)(p - string) - 2;
-      return PCRE_UTF8_ERR7;
-      }
-    if ((*(++p) & 0xc0) != 0x80)     /* Fourth byte */
-      {
-      *erroroffset = (int)(p - string) - 3;
-      return PCRE_UTF8_ERR8;
-      }
-    if ((*(++p) & 0xc0) != 0x80)     /* Fifth byte */
-      {
-      *erroroffset = (int)(p - string) - 4;
-      return PCRE_UTF8_ERR9;
-      }
-    if ((*(++p) & 0xc0) != 0x80)     /* Sixth byte */
-      {
-      *erroroffset = (int)(p - string) - 5;
-      return PCRE_UTF8_ERR10;
-      }
-    if (c == 0xfc && (d & 0x3c) == 0)
-      {
-      *erroroffset = (int)(p - string) - 5;
-      return PCRE_UTF8_ERR19;
-      }
-    break;
-    }
-
-  /* Character is valid under RFC 2279, but 4-byte and 5-byte characters are
-  excluded by RFC 3629. The pointer p is currently at the last byte of the
-  character. */
-
-  if (ab > 3)
-    {
-    *erroroffset = (int)(p - string) - ab;
-    return (ab == 4)? PCRE_UTF8_ERR11 : PCRE_UTF8_ERR12;
-    }
-  }
-
-#else  /* Not SUPPORT_UTF */
-(void)(string);  /* Keep picky compilers happy */
-(void)(length);
-(void)(erroroffset);
-#endif
-
-return PCRE_UTF8_ERR0;   /* This indicates success */
-}
-
-/* End of pcre_valid_utf8.c */
diff --git a/src/extra/pcre/pcre_version.c b/src/extra/pcre/pcre_version.c
deleted file mode 100644
index ae86ff2..0000000
--- a/src/extra/pcre/pcre_version.c
+++ /dev/null
@@ -1,98 +0,0 @@
-/*************************************************
-*      Perl-Compatible Regular Expressions       *
-*************************************************/
-
-/* PCRE is a library of functions to support regular expressions whose syntax
-and semantics are as close as possible to those of the Perl 5 language.
-
-                       Written by Philip Hazel
-           Copyright (c) 1997-2012 University of Cambridge
-
------------------------------------------------------------------------------
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are met:
-
-    * Redistributions of source code must retain the above copyright notice,
-      this list of conditions and the following disclaimer.
-
-    * Redistributions in binary form must reproduce the above copyright
-      notice, this list of conditions and the following disclaimer in the
-      documentation and/or other materials provided with the distribution.
-
-    * Neither the name of the University of Cambridge nor the names of its
-      contributors may be used to endorse or promote products derived from
-      this software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
-LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-POSSIBILITY OF SUCH DAMAGE.
------------------------------------------------------------------------------
-*/
-
-
-/* This module contains the external function pcre_version(), which returns a
-string that identifies the PCRE version that is in use. */
-
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include "pcre_internal.h"
-
-
-/*************************************************
-*          Return version string                 *
-*************************************************/
-
-/* These macros are the standard way of turning unquoted text into C strings.
-They allow macros like PCRE_MAJOR to be defined without quotes, which is
-convenient for user programs that want to test its value. */
-
-#define STRING(a)  # a
-#define XSTRING(s) STRING(s)
-
-/* A problem turned up with PCRE_PRERELEASE, which is defined empty for
-production releases. Originally, it was used naively in this code:
-
-  return XSTRING(PCRE_MAJOR)
-         "." XSTRING(PCRE_MINOR)
-             XSTRING(PCRE_PRERELEASE)
-         " " XSTRING(PCRE_DATE);
-
-However, when PCRE_PRERELEASE is empty, this leads to an attempted expansion of
-STRING(). The C standard states: "If (before argument substitution) any
-argument consists of no preprocessing tokens, the behavior is undefined." It
-turns out the gcc treats this case as a single empty string - which is what we
-really want - but Visual C grumbles about the lack of an argument for the
-macro. Unfortunately, both are within their rights. To cope with both ways of
-handling this, I had resort to some messy hackery that does a test at run time.
-I could find no way of detecting that a macro is defined as an empty string at
-pre-processor time. This hack uses a standard trick for avoiding calling
-the STRING macro with an empty argument when doing the test. */
-
-#if defined COMPILE_PCRE8
-PCRE_EXP_DEFN const char * PCRE_CALL_CONVENTION
-pcre_version(void)
-#elif defined COMPILE_PCRE16
-PCRE_EXP_DEFN const char * PCRE_CALL_CONVENTION
-pcre16_version(void)
-#elif defined COMPILE_PCRE32
-PCRE_EXP_DEFN const char * PCRE_CALL_CONVENTION
-pcre32_version(void)
-#endif
-{
-return (XSTRING(Z PCRE_PRERELEASE)[1] == 0)?
-  XSTRING(PCRE_MAJOR.PCRE_MINOR PCRE_DATE) :
-  XSTRING(PCRE_MAJOR.PCRE_MINOR) XSTRING(PCRE_PRERELEASE PCRE_DATE);
-}
-
-/* End of pcre_version.c */
diff --git a/src/extra/pcre/pcre_xclass.c b/src/extra/pcre/pcre_xclass.c
deleted file mode 100644
index c2b61f0..0000000
--- a/src/extra/pcre/pcre_xclass.c
+++ /dev/null
@@ -1,268 +0,0 @@
-/*************************************************
-*      Perl-Compatible Regular Expressions       *
-*************************************************/
-
-/* PCRE is a library of functions to support regular expressions whose syntax
-and semantics are as close as possible to those of the Perl 5 language.
-
-                       Written by Philip Hazel
-           Copyright (c) 1997-2013 University of Cambridge
-
------------------------------------------------------------------------------
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are met:
-
-    * Redistributions of source code must retain the above copyright notice,
-      this list of conditions and the following disclaimer.
-
-    * Redistributions in binary form must reproduce the above copyright
-      notice, this list of conditions and the following disclaimer in the
-      documentation and/or other materials provided with the distribution.
-
-    * Neither the name of the University of Cambridge nor the names of its
-      contributors may be used to endorse or promote products derived from
-      this software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
-LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-POSSIBILITY OF SUCH DAMAGE.
------------------------------------------------------------------------------
-*/
-
-
-/* This module contains an internal function that is used to match an extended
-class. It is used by both pcre_exec() and pcre_def_exec(). */
-
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include "pcre_internal.h"
-
-
-/*************************************************
-*       Match character against an XCLASS        *
-*************************************************/
-
-/* This function is called to match a character against an extended class that
-might contain values > 255 and/or Unicode properties.
-
-Arguments:
-  c           the character
-  data        points to the flag byte of the XCLASS data
-
-Returns:      TRUE if character matches, else FALSE
-*/
-
-BOOL
-PRIV(xclass)(pcre_uint32 c, const pcre_uchar *data, BOOL utf)
-{
-pcre_uchar t;
-BOOL negated = (*data & XCL_NOT) != 0;
-
-(void)utf;
-#ifdef COMPILE_PCRE8
-/* In 8 bit mode, this must always be TRUE. Help the compiler to know that. */
-utf = TRUE;
-#endif
-
-/* Character values < 256 are matched against a bitmap, if one is present. If
-not, we still carry on, because there may be ranges that start below 256 in the
-additional data. */
-
-if (c < 256)
-  {
-  if ((*data & XCL_HASPROP) == 0)
-    {
-    if ((*data & XCL_MAP) == 0) return negated;
-    return (((pcre_uint8 *)(data + 1))[c/8] & (1 << (c&7))) != 0;
-    }
-  if ((*data & XCL_MAP) != 0 &&
-    (((pcre_uint8 *)(data + 1))[c/8] & (1 << (c&7))) != 0)
-    return !negated; /* char found */
-  }
-
-/* First skip the bit map if present. Then match against the list of Unicode
-properties or large chars or ranges that end with a large char. We won't ever
-encounter XCL_PROP or XCL_NOTPROP when UCP support is not compiled. */
-
-if ((*data++ & XCL_MAP) != 0) data += 32 / sizeof(pcre_uchar);
-
-while ((t = *data++) != XCL_END)
-  {
-  pcre_uint32 x, y;
-  if (t == XCL_SINGLE)
-    {
-#ifdef SUPPORT_UTF
-    if (utf)
-      {
-      GETCHARINC(x, data); /* macro generates multiple statements */
-      }
-    else
-#endif
-      x = *data++;
-    if (c == x) return !negated;
-    }
-  else if (t == XCL_RANGE)
-    {
-#ifdef SUPPORT_UTF
-    if (utf)
-      {
-      GETCHARINC(x, data); /* macro generates multiple statements */
-      GETCHARINC(y, data); /* macro generates multiple statements */
-      }
-    else
-#endif
-      {
-      x = *data++;
-      y = *data++;
-      }
-    if (c >= x && c <= y) return !negated;
-    }
-
-#ifdef SUPPORT_UCP
-  else  /* XCL_PROP & XCL_NOTPROP */
-    {
-    const ucd_record *prop = GET_UCD(c);
-    BOOL isprop = t == XCL_PROP;
-
-    switch(*data)
-      {
-      case PT_ANY:
-      if (isprop) return !negated;
-      break;
-
-      case PT_LAMP:
-      if ((prop->chartype == ucp_Lu || prop->chartype == ucp_Ll ||
-           prop->chartype == ucp_Lt) == isprop) return !negated;
-      break;
-
-      case PT_GC:
-      if ((data[1] == PRIV(ucp_gentype)[prop->chartype]) == isprop)
-        return !negated;
-      break;
-
-      case PT_PC:
-      if ((data[1] == prop->chartype) == isprop) return !negated;
-      break;
-
-      case PT_SC:
-      if ((data[1] == prop->script) == isprop) return !negated;
-      break;
-
-      case PT_ALNUM:
-      if ((PRIV(ucp_gentype)[prop->chartype] == ucp_L ||
-           PRIV(ucp_gentype)[prop->chartype] == ucp_N) == isprop)
-        return !negated;
-      break;
-
-      /* Perl space used to exclude VT, but from Perl 5.18 it is included,
-      which means that Perl space and POSIX space are now identical. PCRE
-      was changed at release 8.34. */
-
-      case PT_SPACE:    /* Perl space */
-      case PT_PXSPACE:  /* POSIX space */
-      switch(c)
-        {
-        HSPACE_CASES:
-        VSPACE_CASES:
-        if (isprop) return !negated;
-        break;
-
-        default:
-        if ((PRIV(ucp_gentype)[prop->chartype] == ucp_Z) == isprop)
-          return !negated;
-        break;
-        }
-      break;
-
-      case PT_WORD:
-      if ((PRIV(ucp_gentype)[prop->chartype] == ucp_L ||
-           PRIV(ucp_gentype)[prop->chartype] == ucp_N || c == CHAR_UNDERSCORE)
-             == isprop)
-        return !negated;
-      break;
-
-      case PT_UCNC:
-      if (c < 0xa0)
-        {
-        if ((c == CHAR_DOLLAR_SIGN || c == CHAR_COMMERCIAL_AT ||
-             c == CHAR_GRAVE_ACCENT) == isprop)
-          return !negated;
-        }
-      else
-        {
-        if ((c < 0xd800 || c > 0xdfff) == isprop)
-          return !negated;
-        }
-      break;
-
-      /* The following three properties can occur only in an XCLASS, as there
-      is no \p or \P coding for them. */
-
-      /* Graphic character. Implement this as not Z (space or separator) and
-      not C (other), except for Cf (format) with a few exceptions. This seems
-      to be what Perl does. The exceptional characters are:
-
-      U+061C           Arabic Letter Mark
-      U+180E           Mongolian Vowel Separator
-      U+2066 - U+2069  Various "isolate"s
-      */
-
-      case PT_PXGRAPH:
-      if ((PRIV(ucp_gentype)[prop->chartype] != ucp_Z &&
-            (PRIV(ucp_gentype)[prop->chartype] != ucp_C ||
-              (prop->chartype == ucp_Cf &&
-                c != 0x061c && c != 0x180e && (c < 0x2066 || c > 0x2069))
-         )) == isprop)
-        return !negated;
-      break;
-
-      /* Printable character: same as graphic, with the addition of Zs, i.e.
-      not Zl and not Zp, and U+180E. */
-
-      case PT_PXPRINT:
-      if ((prop->chartype != ucp_Zl &&
-           prop->chartype != ucp_Zp &&
-            (PRIV(ucp_gentype)[prop->chartype] != ucp_C ||
-              (prop->chartype == ucp_Cf &&
-                c != 0x061c && (c < 0x2066 || c > 0x2069))
-         )) == isprop)
-        return !negated;
-      break;
-
-      /* Punctuation: all Unicode punctuation, plus ASCII characters that
-      Unicode treats as symbols rather than punctuation, for Perl
-      compatibility (these are $+<=>^`|~). */
-
-      case PT_PXPUNCT:
-      if ((PRIV(ucp_gentype)[prop->chartype] == ucp_P ||
-            (c < 256 && PRIV(ucp_gentype)[prop->chartype] == ucp_S)) == isprop)
-        return !negated;
-      break;
-
-      /* This should never occur, but compilers may mutter if there is no
-      default. */
-
-      default:
-      return FALSE;
-      }
-
-    data += 2;
-    }
-#endif  /* SUPPORT_UCP */
-  }
-
-return negated;   /* char did not match */
-}
-
-/* End of pcre_xclass.c */
diff --git a/src/extra/pcre/sljit/sljitConfig.h b/src/extra/pcre/sljit/sljitConfig.h
deleted file mode 100644
index 4d93f4f..0000000
--- a/src/extra/pcre/sljit/sljitConfig.h
+++ /dev/null
@@ -1,120 +0,0 @@
-/*
- *    Stack-less Just-In-Time compiler
- *
- *    Copyright 2009-2012 Zoltan Herczeg (hzmester at freemail.hu). All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without modification, are
- * permitted provided that the following conditions are met:
- *
- *   1. Redistributions of source code must retain the above copyright notice, this list of
- *      conditions and the following disclaimer.
- *
- *   2. Redistributions in binary form must reproduce the above copyright notice, this list
- *      of conditions and the following disclaimer in the documentation and/or other materials
- *      provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER(S) AND CONTRIBUTORS ``AS IS'' AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
- * SHALL THE COPYRIGHT HOLDER(S) OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
- * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
- * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
- * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef _SLJIT_CONFIG_H_
-#define _SLJIT_CONFIG_H_
-
-/* --------------------------------------------------------------------- */
-/*  Custom defines                                                       */
-/* --------------------------------------------------------------------- */
-
-/* Put your custom defines here. This empty section will never change
-   which helps maintaining patches (with diff / patch utilities). */
-
-/* --------------------------------------------------------------------- */
-/*  Architecture                                                         */
-/* --------------------------------------------------------------------- */
-
-/* Architecture selection. */
-/* #define SLJIT_CONFIG_X86_32 1 */
-/* #define SLJIT_CONFIG_X86_64 1 */
-/* #define SLJIT_CONFIG_ARM_V5 1 */
-/* #define SLJIT_CONFIG_ARM_V7 1 */
-/* #define SLJIT_CONFIG_ARM_THUMB2 1 */
-/* #define SLJIT_CONFIG_ARM_64 1 */
-/* #define SLJIT_CONFIG_PPC_32 1 */
-/* #define SLJIT_CONFIG_PPC_64 1 */
-/* #define SLJIT_CONFIG_MIPS_32 1 */
-/* #define SLJIT_CONFIG_MIPS_64 1 */
-/* #define SLJIT_CONFIG_SPARC_32 1 */
-/* #define SLJIT_CONFIG_TILEGX 1 */
-
-/* #define SLJIT_CONFIG_AUTO 1 */
-/* #define SLJIT_CONFIG_UNSUPPORTED 1 */
-
-/* --------------------------------------------------------------------- */
-/*  Utilities                                                            */
-/* --------------------------------------------------------------------- */
-
-/* Useful for thread-safe compiling of global functions. */
-#ifndef SLJIT_UTIL_GLOBAL_LOCK
-/* Enabled by default */
-#define SLJIT_UTIL_GLOBAL_LOCK 1
-#endif
-
-/* Implements a stack like data structure (by using mmap / VirtualAlloc). */
-#ifndef SLJIT_UTIL_STACK
-/* Enabled by default */
-#define SLJIT_UTIL_STACK 1
-#endif
-
-/* Single threaded application. Does not require any locks. */
-#ifndef SLJIT_SINGLE_THREADED
-/* Disabled by default. */
-#define SLJIT_SINGLE_THREADED 0
-#endif
-
-/* --------------------------------------------------------------------- */
-/*  Configuration                                                        */
-/* --------------------------------------------------------------------- */
-
-/* If SLJIT_STD_MACROS_DEFINED is not defined, the application should
-   define SLJIT_MALLOC, SLJIT_FREE, SLJIT_MEMMOVE, and NULL. */
-#ifndef SLJIT_STD_MACROS_DEFINED
-/* Disabled by default. */
-#define SLJIT_STD_MACROS_DEFINED 0
-#endif
-
-/* Executable code allocation:
-   If SLJIT_EXECUTABLE_ALLOCATOR is not defined, the application should
-   define both SLJIT_MALLOC_EXEC and SLJIT_FREE_EXEC. */
-#ifndef SLJIT_EXECUTABLE_ALLOCATOR
-/* Enabled by default. */
-#define SLJIT_EXECUTABLE_ALLOCATOR 1
-#endif
-
-/* Debug checks (assertions, etc.). */
-#ifndef SLJIT_DEBUG
-/* Enabled by default */
-#define SLJIT_DEBUG 1
-#endif
-
-/* Verbose operations */
-#ifndef SLJIT_VERBOSE
-/* Enabled by default */
-#define SLJIT_VERBOSE 1
-#endif
-
-/*
-  SLJIT_IS_FPU_AVAILABLE
-    The availability of the FPU can be controlled by SLJIT_IS_FPU_AVAILABLE.
-      zero value - FPU is NOT present.
-      nonzero value - FPU is present.
-*/
-
-/* For further configurations, see the beginning of sljitConfigInternal.h */
-
-#endif
diff --git a/src/extra/pcre/sljit/sljitConfigInternal.h b/src/extra/pcre/sljit/sljitConfigInternal.h
deleted file mode 100644
index 89be38b..0000000
--- a/src/extra/pcre/sljit/sljitConfigInternal.h
+++ /dev/null
@@ -1,523 +0,0 @@
-/*
- *    Stack-less Just-In-Time compiler
- *
- *    Copyright 2009-2012 Zoltan Herczeg (hzmester at freemail.hu). All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without modification, are
- * permitted provided that the following conditions are met:
- *
- *   1. Redistributions of source code must retain the above copyright notice, this list of
- *      conditions and the following disclaimer.
- *
- *   2. Redistributions in binary form must reproduce the above copyright notice, this list
- *      of conditions and the following disclaimer in the documentation and/or other materials
- *      provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER(S) AND CONTRIBUTORS ``AS IS'' AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
- * SHALL THE COPYRIGHT HOLDER(S) OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
- * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
- * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
- * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef _SLJIT_CONFIG_INTERNAL_H_
-#define _SLJIT_CONFIG_INTERNAL_H_
-
-/*
-   SLJIT defines the following macros depending on the target architecture:
-
-   Feature detection (boolean) macros:
-   SLJIT_32BIT_ARCHITECTURE : 32 bit architecture
-   SLJIT_64BIT_ARCHITECTURE : 64 bit architecture
-   SLJIT_WORD_SHIFT : the shift required to apply when accessing a sljit_sw/sljit_uw array by index
-   SLJIT_DOUBLE_SHIFT : the shift required to apply when accessing a double array by index
-   SLJIT_LITTLE_ENDIAN : little endian architecture
-   SLJIT_BIG_ENDIAN : big endian architecture
-   SLJIT_UNALIGNED : allows unaligned memory accesses for non-fpu operations (only!)
-   SLJIT_INDIRECT_CALL : see SLJIT_FUNC_OFFSET() for more information
-   SLJIT_RETURN_ADDRESS_OFFSET : a return instruction always adds this offset to the return address
-
-   Types and useful macros:
-   sljit_sb, sljit_ub : signed and unsigned 8 bit byte
-   sljit_sh, sljit_uh : signed and unsigned 16 bit half-word (short) type
-   sljit_si, sljit_ui : signed and unsigned 32 bit integer type
-   sljit_sw, sljit_uw : signed and unsigned machine word, enough to store a pointer
-   sljit_p : unsgined pointer value (usually the same as sljit_uw, but
-             some 64 bit ABIs may use 32 bit pointers)
-   sljit_s : single precision floating point value
-   sljit_d : double precision floating point value
-   SLJIT_CALL : C calling convention define for both calling JIT form C and C callbacks for JIT
-   SLJIT_W(number) : defining 64 bit constants on 64 bit architectures (compiler independent helper)
-*/
-
-#if !((defined SLJIT_CONFIG_X86_32 && SLJIT_CONFIG_X86_32) \
-	|| (defined SLJIT_CONFIG_X86_64 && SLJIT_CONFIG_X86_64) \
-	|| (defined SLJIT_CONFIG_ARM_V5 && SLJIT_CONFIG_ARM_V5) \
-	|| (defined SLJIT_CONFIG_ARM_V7 && SLJIT_CONFIG_ARM_V7) \
-	|| (defined SLJIT_CONFIG_ARM_THUMB2 && SLJIT_CONFIG_ARM_THUMB2) \
-	|| (defined SLJIT_CONFIG_ARM_64 && SLJIT_CONFIG_ARM_64) \
-	|| (defined SLJIT_CONFIG_PPC_32 && SLJIT_CONFIG_PPC_32) \
-	|| (defined SLJIT_CONFIG_PPC_64 && SLJIT_CONFIG_PPC_64) \
-	|| (defined SLJIT_CONFIG_MIPS_32 && SLJIT_CONFIG_MIPS_32) \
-	|| (defined SLJIT_CONFIG_MIPS_64 && SLJIT_CONFIG_MIPS_64) \
-	|| (defined SLJIT_CONFIG_SPARC_32 && SLJIT_CONFIG_SPARC_32) \
-	|| (defined SLJIT_CONFIG_TILEGX && SLJIT_CONFIG_TILEGX) \
-	|| (defined SLJIT_CONFIG_AUTO && SLJIT_CONFIG_AUTO) \
-	|| (defined SLJIT_CONFIG_UNSUPPORTED && SLJIT_CONFIG_UNSUPPORTED))
-#error "An architecture must be selected"
-#endif
-
-/* Sanity check. */
-#if (defined SLJIT_CONFIG_X86_32 && SLJIT_CONFIG_X86_32) \
-	+ (defined SLJIT_CONFIG_X86_64 && SLJIT_CONFIG_X86_64) \
-	+ (defined SLJIT_CONFIG_ARM_V5 && SLJIT_CONFIG_ARM_V5) \
-	+ (defined SLJIT_CONFIG_ARM_V7 && SLJIT_CONFIG_ARM_V7) \
-	+ (defined SLJIT_CONFIG_ARM_THUMB2 && SLJIT_CONFIG_ARM_THUMB2) \
-	+ (defined SLJIT_CONFIG_ARM_64 && SLJIT_CONFIG_ARM_64) \
-	+ (defined SLJIT_CONFIG_PPC_32 && SLJIT_CONFIG_PPC_32) \
-	+ (defined SLJIT_CONFIG_PPC_64 && SLJIT_CONFIG_PPC_64) \
-	+ (defined SLJIT_CONFIG_TILEGX && SLJIT_CONFIG_TILEGX) \
-	+ (defined SLJIT_CONFIG_MIPS_32 && SLJIT_CONFIG_MIPS_32) \
-	+ (defined SLJIT_CONFIG_MIPS_64 && SLJIT_CONFIG_MIPS_64) \
-	+ (defined SLJIT_CONFIG_SPARC_32 && SLJIT_CONFIG_SPARC_32) \
-	+ (defined SLJIT_CONFIG_AUTO && SLJIT_CONFIG_AUTO) \
-	+ (defined SLJIT_CONFIG_UNSUPPORTED && SLJIT_CONFIG_UNSUPPORTED) >= 2
-#error "Multiple architectures are selected"
-#endif
-
-/* Auto select option (requires compiler support) */
-#if (defined SLJIT_CONFIG_AUTO && SLJIT_CONFIG_AUTO)
-
-#ifndef _WIN32
-
-#if defined(__i386__) || defined(__i386)
-#define SLJIT_CONFIG_X86_32 1
-#elif defined(__x86_64__)
-#define SLJIT_CONFIG_X86_64 1
-#elif defined(__arm__) || defined(__ARM__)
-#ifdef __thumb2__
-#define SLJIT_CONFIG_ARM_THUMB2 1
-#elif defined(__ARM_ARCH_7__) || defined(__ARM_ARCH_7A__) || defined(__ARM_ARCH_7R__)
-#define SLJIT_CONFIG_ARM_V7 1
-#else
-#define SLJIT_CONFIG_ARM_V5 1
-#endif
-#elif defined (__aarch64__)
-#define SLJIT_CONFIG_ARM_64 1
-#elif defined(__ppc64__) || defined(__powerpc64__) || defined(_ARCH_PPC64) || (defined(_POWER) && defined(__64BIT__))
-#define SLJIT_CONFIG_PPC_64 1
-#elif defined(__ppc__) || defined(__powerpc__) || defined(_ARCH_PPC) || defined(_ARCH_PWR) || defined(_ARCH_PWR2) || defined(_POWER)
-#define SLJIT_CONFIG_PPC_32 1
-#elif defined(__mips__) && !defined(_LP64)
-#define SLJIT_CONFIG_MIPS_32 1
-#elif defined(__mips64)
-#define SLJIT_CONFIG_MIPS_64 1
-#elif defined(__sparc__) || defined(__sparc)
-#define SLJIT_CONFIG_SPARC_32 1
-#elif defined(__tilegx__)
-#define SLJIT_CONFIG_TILEGX 1
-#else
-/* Unsupported architecture */
-#define SLJIT_CONFIG_UNSUPPORTED 1
-#endif
-
-#else /* !_WIN32 */
-
-#if defined(_M_X64) || defined(__x86_64__)
-#define SLJIT_CONFIG_X86_64 1
-#elif defined(_ARM_)
-#define SLJIT_CONFIG_ARM_V5 1
-#else
-#define SLJIT_CONFIG_X86_32 1
-#endif
-
-#endif /* !WIN32 */
-#endif /* SLJIT_CONFIG_AUTO */
-
-#if (defined SLJIT_CONFIG_UNSUPPORTED && SLJIT_CONFIG_UNSUPPORTED)
-#undef SLJIT_EXECUTABLE_ALLOCATOR
-#endif
-
-#if !(defined SLJIT_STD_MACROS_DEFINED && SLJIT_STD_MACROS_DEFINED)
-
-/* These libraries are needed for the macros below. */
-#include <stdlib.h>
-#include <string.h>
-
-#endif /* STD_MACROS_DEFINED */
-
-/* General macros:
-   Note: SLJIT is designed to be independent from them as possible.
-
-   In release mode (SLJIT_DEBUG is not defined) only the following macros are needed:
-*/
-
-#ifndef SLJIT_MALLOC
-#define SLJIT_MALLOC(size) malloc(size)
-#endif
-
-#ifndef SLJIT_FREE
-#define SLJIT_FREE(ptr) free(ptr)
-#endif
-
-#ifndef SLJIT_MEMMOVE
-#define SLJIT_MEMMOVE(dest, src, len) memmove(dest, src, len)
-#endif
-
-#ifndef SLJIT_ZEROMEM
-#define SLJIT_ZEROMEM(dest, len) memset(dest, 0, len)
-#endif
-
-#if !defined(SLJIT_LIKELY) && !defined(SLJIT_UNLIKELY)
-
-#if defined(__GNUC__) && (__GNUC__ >= 3)
-#define SLJIT_LIKELY(x)		__builtin_expect((x), 1)
-#define SLJIT_UNLIKELY(x)	__builtin_expect((x), 0)
-#else
-#define SLJIT_LIKELY(x)		(x)
-#define SLJIT_UNLIKELY(x)	(x)
-#endif
-
-#endif /* !defined(SLJIT_LIKELY) && !defined(SLJIT_UNLIKELY) */
-
-#ifndef SLJIT_INLINE
-/* Inline functions. Some old compilers do not support them. */
-#if defined(__SUNPRO_C) && __SUNPRO_C <= 0x510
-#define SLJIT_INLINE
-#else
-#define SLJIT_INLINE __inline
-#endif
-#endif /* !SLJIT_INLINE */
-
-#ifndef SLJIT_CONST
-/* Const variables. */
-#define SLJIT_CONST const
-#endif
-
-#ifndef SLJIT_UNUSED_ARG
-/* Unused arguments. */
-#define SLJIT_UNUSED_ARG(arg) (void)arg
-#endif
-
-#if (defined SLJIT_CONFIG_STATIC && SLJIT_CONFIG_STATIC)
-/* Static ABI functions. For all-in-one programs. */
-
-#if defined(__GNUC__)
-/* Disable unused warnings in gcc. */
-#define SLJIT_API_FUNC_ATTRIBUTE static __attribute__((unused))
-#else
-#define SLJIT_API_FUNC_ATTRIBUTE static
-#endif
-
-#else
-#define SLJIT_API_FUNC_ATTRIBUTE
-#endif /* (defined SLJIT_CONFIG_STATIC && SLJIT_CONFIG_STATIC) */
-
-#ifndef SLJIT_CACHE_FLUSH
-
-#if (defined SLJIT_CONFIG_X86_32 && SLJIT_CONFIG_X86_32) || (defined SLJIT_CONFIG_X86_64 && SLJIT_CONFIG_X86_64)
-
-/* Not required to implement on archs with unified caches. */
-#define SLJIT_CACHE_FLUSH(from, to)
-
-#elif defined __APPLE__
-
-/* Supported by all macs since Mac OS 10.5.
-   However, it does not work on non-jailbroken iOS devices,
-   although the compilation is successful. */
-
-#define SLJIT_CACHE_FLUSH(from, to) \
-	sys_icache_invalidate((char*)(from), (char*)(to) - (char*)(from))
-
-#elif defined __ANDROID__
-
-/* Android lacks __clear_cache; instead, cacheflush should be used. */
-
-#define SLJIT_CACHE_FLUSH(from, to) \
-    cacheflush((long)(from), (long)(to), 0)
-
-#elif (defined SLJIT_CONFIG_PPC_32 && SLJIT_CONFIG_PPC_32) || (defined SLJIT_CONFIG_PPC_64 && SLJIT_CONFIG_PPC_64)
-
-/* The __clear_cache() implementation of GCC is a dummy function on PowerPC. */
-#define SLJIT_CACHE_FLUSH(from, to) \
-	ppc_cache_flush((from), (to))
-
-#elif (defined SLJIT_CONFIG_SPARC_32 && SLJIT_CONFIG_SPARC_32)
-
-/* The __clear_cache() implementation of GCC is a dummy function on Sparc. */
-#define SLJIT_CACHE_FLUSH(from, to) \
-	sparc_cache_flush((from), (to))
-
-#else
-
-/* Calls __ARM_NR_cacheflush on ARM-Linux. */
-#define SLJIT_CACHE_FLUSH(from, to) \
-	__clear_cache((char*)(from), (char*)(to))
-
-#endif
-
-#endif /* !SLJIT_CACHE_FLUSH */
-
-/* 8 bit byte type. */
-typedef unsigned char sljit_ub;
-typedef signed char sljit_sb;
-
-/* 16 bit half-word type. */
-typedef unsigned short int sljit_uh;
-typedef signed short int sljit_sh;
-
-/* 32 bit integer type. */
-typedef unsigned int sljit_ui;
-typedef signed int sljit_si;
-
-/* Machine word type. Can encapsulate a pointer.
-     32 bit for 32 bit machines.
-     64 bit for 64 bit machines. */
-#if (defined SLJIT_CONFIG_UNSUPPORTED && SLJIT_CONFIG_UNSUPPORTED)
-/* Just to have something. */
-#define SLJIT_WORD_SHIFT 0
-typedef unsigned long int sljit_uw;
-typedef long int sljit_sw;
-#elif !(defined SLJIT_CONFIG_X86_64 && SLJIT_CONFIG_X86_64) \
-	&& !(defined SLJIT_CONFIG_ARM_64 && SLJIT_CONFIG_ARM_64) \
-	&& !(defined SLJIT_CONFIG_PPC_64 && SLJIT_CONFIG_PPC_64) \
-	&& !(defined SLJIT_CONFIG_MIPS_64 && SLJIT_CONFIG_MIPS_64) \
-	&& !(defined SLJIT_CONFIG_TILEGX && SLJIT_CONFIG_TILEGX)
-#define SLJIT_32BIT_ARCHITECTURE 1
-#define SLJIT_WORD_SHIFT 2
-typedef unsigned int sljit_uw;
-typedef int sljit_sw;
-#else
-#define SLJIT_64BIT_ARCHITECTURE 1
-#define SLJIT_WORD_SHIFT 3
-#ifdef _WIN32
-typedef unsigned __int64 sljit_uw;
-typedef __int64 sljit_sw;
-#else
-typedef unsigned long int sljit_uw;
-typedef long int sljit_sw;
-#endif
-#endif
-
-typedef sljit_uw sljit_p;
-
-/* Floating point types. */
-typedef float sljit_s;
-typedef double sljit_d;
-
-/* Shift for pointer sized data. */
-#define SLJIT_POINTER_SHIFT SLJIT_WORD_SHIFT
-
-/* Shift for double precision sized data. */
-#define SLJIT_DOUBLE_SHIFT 3
-
-#ifndef SLJIT_W
-
-/* Defining long constants. */
-#if (defined SLJIT_64BIT_ARCHITECTURE && SLJIT_64BIT_ARCHITECTURE)
-#define SLJIT_W(w)	(w##ll)
-#else
-#define SLJIT_W(w)	(w)
-#endif
-
-#endif /* !SLJIT_W */
-
-#ifndef SLJIT_CALL
-
-/* ABI (Application Binary Interface) types. */
-#if (defined SLJIT_CONFIG_X86_32 && SLJIT_CONFIG_X86_32)
-
-#if defined(__GNUC__) && !defined(__APPLE__)
-
-#define SLJIT_CALL __attribute__ ((fastcall))
-#define SLJIT_X86_32_FASTCALL 1
-
-#elif defined(_MSC_VER)
-
-#define SLJIT_CALL __fastcall
-#define SLJIT_X86_32_FASTCALL 1
-
-#elif defined(__BORLANDC__)
-
-#define SLJIT_CALL __msfastcall
-#define SLJIT_X86_32_FASTCALL 1
-
-#else /* Unknown compiler. */
-
-/* The cdecl attribute is the default. */
-#define SLJIT_CALL
-
-#endif
-
-#else /* Non x86-32 architectures. */
-
-#define SLJIT_CALL
-
-#endif /* SLJIT_CONFIG_X86_32 */
-
-#endif /* !SLJIT_CALL */
-
-#if !defined(SLJIT_BIG_ENDIAN) && !defined(SLJIT_LITTLE_ENDIAN)
-
-/* These macros are useful for the applications. */
-#if (defined SLJIT_CONFIG_PPC_32 && SLJIT_CONFIG_PPC_32) \
-	|| (defined SLJIT_CONFIG_PPC_64 && SLJIT_CONFIG_PPC_64)
-
-#ifdef __LITTLE_ENDIAN__
-#define SLJIT_LITTLE_ENDIAN 1
-#else
-#define SLJIT_BIG_ENDIAN 1
-#endif
-
-#elif (defined SLJIT_CONFIG_MIPS_32 && SLJIT_CONFIG_MIPS_32) \
-	|| (defined SLJIT_CONFIG_MIPS_64 && SLJIT_CONFIG_MIPS_64)
-
-#ifdef __MIPSEL__
-#define SLJIT_LITTLE_ENDIAN 1
-#else
-#define SLJIT_BIG_ENDIAN 1
-#endif
-
-#elif (defined SLJIT_CONFIG_SPARC_32 && SLJIT_CONFIG_SPARC_32)
-
-#define SLJIT_BIG_ENDIAN 1
-
-#else
-#define SLJIT_LITTLE_ENDIAN 1
-#endif
-
-#endif /* !defined(SLJIT_BIG_ENDIAN) && !defined(SLJIT_LITTLE_ENDIAN) */
-
-/* Sanity check. */
-#if (defined SLJIT_BIG_ENDIAN && SLJIT_BIG_ENDIAN) && (defined SLJIT_LITTLE_ENDIAN && SLJIT_LITTLE_ENDIAN)
-#error "Exactly one endianness must be selected"
-#endif
-
-#if !(defined SLJIT_BIG_ENDIAN && SLJIT_BIG_ENDIAN) && !(defined SLJIT_LITTLE_ENDIAN && SLJIT_LITTLE_ENDIAN)
-#error "Exactly one endianness must be selected"
-#endif
-
-#ifndef SLJIT_INDIRECT_CALL
-#if ((defined SLJIT_CONFIG_PPC_64 && SLJIT_CONFIG_PPC_64) && (defined SLJIT_BIG_ENDIAN && SLJIT_BIG_ENDIAN)) \
-	|| ((defined SLJIT_CONFIG_PPC_32 && SLJIT_CONFIG_PPC_32) && defined _AIX)
-/* It seems certain ppc compilers use an indirect addressing for functions
-   which makes things complicated. */
-#define SLJIT_INDIRECT_CALL 1
-#endif
-#endif /* SLJIT_INDIRECT_CALL */
-
-#ifndef SLJIT_RETURN_ADDRESS_OFFSET
-#if (defined SLJIT_CONFIG_SPARC_32 && SLJIT_CONFIG_SPARC_32)
-#define SLJIT_RETURN_ADDRESS_OFFSET 8
-#else
-#define SLJIT_RETURN_ADDRESS_OFFSET 0
-#endif
-#endif /* SLJIT_RETURN_ADDRESS_OFFSET */
-
-#ifndef SLJIT_SSE2
-
-#if (defined SLJIT_CONFIG_X86_32 && SLJIT_CONFIG_X86_32) || (defined SLJIT_CONFIG_X86_64 && SLJIT_CONFIG_X86_64)
-/* Turn on SSE2 support on x86. */
-#define SLJIT_SSE2 1
-
-#if (defined SLJIT_CONFIG_X86_32 && SLJIT_CONFIG_X86_32)
-/* Auto detect SSE2 support using CPUID.
-   On 64 bit x86 cpus, sse2 must be present. */
-#define SLJIT_DETECT_SSE2 1
-#endif
-
-#endif /* (defined SLJIT_CONFIG_X86_32 && SLJIT_CONFIG_X86_32) || (defined SLJIT_CONFIG_X86_64 && SLJIT_CONFIG_X86_64) */
-
-#endif /* !SLJIT_SSE2 */
-
-#ifndef SLJIT_UNALIGNED
-
-#if (defined SLJIT_CONFIG_X86_32 && SLJIT_CONFIG_X86_32) \
-	|| (defined SLJIT_CONFIG_X86_64 && SLJIT_CONFIG_X86_64) \
-	|| (defined SLJIT_CONFIG_ARM_V7 && SLJIT_CONFIG_ARM_V7) \
-	|| (defined SLJIT_CONFIG_ARM_THUMB2 && SLJIT_CONFIG_ARM_THUMB2) \
-	|| (defined SLJIT_CONFIG_ARM_64 && SLJIT_CONFIG_ARM_64) \
-	|| (defined SLJIT_CONFIG_PPC_32 && SLJIT_CONFIG_PPC_32) \
-	|| (defined SLJIT_CONFIG_PPC_64 && SLJIT_CONFIG_PPC_64)
-#define SLJIT_UNALIGNED 1
-#endif
-
-#endif /* !SLJIT_UNALIGNED */
-
-#if (defined SLJIT_EXECUTABLE_ALLOCATOR && SLJIT_EXECUTABLE_ALLOCATOR)
-SLJIT_API_FUNC_ATTRIBUTE void* sljit_malloc_exec(sljit_uw size);
-SLJIT_API_FUNC_ATTRIBUTE void sljit_free_exec(void* ptr);
-SLJIT_API_FUNC_ATTRIBUTE void sljit_free_unused_memory_exec(void);
-#define SLJIT_MALLOC_EXEC(size) sljit_malloc_exec(size)
-#define SLJIT_FREE_EXEC(ptr) sljit_free_exec(ptr)
-#endif
-
-#if (defined SLJIT_VERBOSE && SLJIT_VERBOSE)
-#include <stdio.h>
-#endif
-
-#if (defined SLJIT_DEBUG && SLJIT_DEBUG)
-
-#if !defined(SLJIT_ASSERT) || !defined(SLJIT_ASSERT_STOP)
-
-/* SLJIT_HALT_PROCESS must halt the process. */
-#ifndef SLJIT_HALT_PROCESS
-#include <stdlib.h>
-
-#define SLJIT_HALT_PROCESS() \
-	abort();
-#endif /* !SLJIT_HALT_PROCESS */
-
-#include <stdio.h>
-
-#endif /* !SLJIT_ASSERT || !SLJIT_ASSERT_STOP */
-
-/* Feel free to redefine these two macros. */
-#ifndef SLJIT_ASSERT
-
-#define SLJIT_ASSERT(x) \
-	do { \
-		if (SLJIT_UNLIKELY(!(x))) { \
-			printf("Assertion failed at " __FILE__ ":%d\n", __LINE__); \
-			SLJIT_HALT_PROCESS(); \
-		} \
-	} while (0)
-
-#endif /* !SLJIT_ASSERT */
-
-#ifndef SLJIT_ASSERT_STOP
-
-#define SLJIT_ASSERT_STOP() \
-	do { \
-		printf("Should never been reached " __FILE__ ":%d\n", __LINE__); \
-		SLJIT_HALT_PROCESS(); \
-	} while (0)
-
-#endif /* !SLJIT_ASSERT_STOP */
-
-#else /* (defined SLJIT_DEBUG && SLJIT_DEBUG) */
-
-/* Forcing empty, but valid statements. */
-#undef SLJIT_ASSERT
-#undef SLJIT_ASSERT_STOP
-
-#define SLJIT_ASSERT(x) \
-	do { } while (0)
-#define SLJIT_ASSERT_STOP() \
-	do { } while (0)
-
-#endif /* (defined SLJIT_DEBUG && SLJIT_DEBUG) */
-
-#ifndef SLJIT_COMPILE_ASSERT
-
-/* Should be improved eventually. */
-#define SLJIT_COMPILE_ASSERT(x, description) \
-	SLJIT_ASSERT(x)
-
-#endif /* !SLJIT_COMPILE_ASSERT */
-
-#endif
diff --git a/src/extra/pcre/sljit/sljitExecAllocator.c b/src/extra/pcre/sljit/sljitExecAllocator.c
deleted file mode 100644
index f24ed33..0000000
--- a/src/extra/pcre/sljit/sljitExecAllocator.c
+++ /dev/null
@@ -1,312 +0,0 @@
-/*
- *    Stack-less Just-In-Time compiler
- *
- *    Copyright 2009-2012 Zoltan Herczeg (hzmester at freemail.hu). All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without modification, are
- * permitted provided that the following conditions are met:
- *
- *   1. Redistributions of source code must retain the above copyright notice, this list of
- *      conditions and the following disclaimer.
- *
- *   2. Redistributions in binary form must reproduce the above copyright notice, this list
- *      of conditions and the following disclaimer in the documentation and/or other materials
- *      provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER(S) AND CONTRIBUTORS ``AS IS'' AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
- * SHALL THE COPYRIGHT HOLDER(S) OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
- * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
- * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
- * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/*
-   This file contains a simple executable memory allocator
-
-   It is assumed, that executable code blocks are usually medium (or sometimes
-   large) memory blocks, and the allocator is not too frequently called (less
-   optimized than other allocators). Thus, using it as a generic allocator is
-   not suggested.
-
-   How does it work:
-     Memory is allocated in continuous memory areas called chunks by alloc_chunk()
-     Chunk format:
-     [ block ][ block ] ... [ block ][ block terminator ]
-
-   All blocks and the block terminator is started with block_header. The block
-   header contains the size of the previous and the next block. These sizes
-   can also contain special values.
-     Block size:
-       0 - The block is a free_block, with a different size member.
-       1 - The block is a block terminator.
-       n - The block is used at the moment, and the value contains its size.
-     Previous block size:
-       0 - This is the first block of the memory chunk.
-       n - The size of the previous block.
-
-   Using these size values we can go forward or backward on the block chain.
-   The unused blocks are stored in a chain list pointed by free_blocks. This
-   list is useful if we need to find a suitable memory area when the allocator
-   is called.
-
-   When a block is freed, the new free block is connected to its adjacent free
-   blocks if possible.
-
-     [ free block ][ used block ][ free block ]
-   and "used block" is freed, the three blocks are connected together:
-     [           one big free block           ]
-*/
-
-/* --------------------------------------------------------------------- */
-/*  System (OS) functions                                                */
-/* --------------------------------------------------------------------- */
-
-/* 64 KByte. */
-#define CHUNK_SIZE	0x10000
-
-/*
-   alloc_chunk / free_chunk :
-     * allocate executable system memory chunks
-     * the size is always divisible by CHUNK_SIZE
-   allocator_grab_lock / allocator_release_lock :
-     * make the allocator thread safe
-     * can be empty if the OS (or the application) does not support threading
-     * only the allocator requires this lock, sljit is fully thread safe
-       as it only uses local variables
-*/
-
-#ifdef _WIN32
-
-static SLJIT_INLINE void* alloc_chunk(sljit_uw size)
-{
-	return VirtualAlloc(NULL, size, MEM_COMMIT | MEM_RESERVE, PAGE_EXECUTE_READWRITE);
-}
-
-static SLJIT_INLINE void free_chunk(void* chunk, sljit_uw size)
-{
-	SLJIT_UNUSED_ARG(size);
-	VirtualFree(chunk, 0, MEM_RELEASE);
-}
-
-#else
-
-static SLJIT_INLINE void* alloc_chunk(sljit_uw size)
-{
-	void* retval;
-
-#ifdef MAP_ANON
-	retval = mmap(NULL, size, PROT_READ | PROT_WRITE | PROT_EXEC, MAP_PRIVATE | MAP_ANON, -1, 0);
-#else
-	if (dev_zero < 0) {
-		if (open_dev_zero())
-			return NULL;
-	}
-	retval = mmap(NULL, size, PROT_READ | PROT_WRITE | PROT_EXEC, MAP_PRIVATE, dev_zero, 0);
-#endif
-
-	return (retval != MAP_FAILED) ? retval : NULL;
-}
-
-static SLJIT_INLINE void free_chunk(void* chunk, sljit_uw size)
-{
-	munmap(chunk, size);
-}
-
-#endif
-
-/* --------------------------------------------------------------------- */
-/*  Common functions                                                     */
-/* --------------------------------------------------------------------- */
-
-#define CHUNK_MASK	(~(CHUNK_SIZE - 1))
-
-struct block_header {
-	sljit_uw size;
-	sljit_uw prev_size;
-};
-
-struct free_block {
-	struct block_header header;
-	struct free_block *next;
-	struct free_block *prev;
-	sljit_uw size;
-};
-
-#define AS_BLOCK_HEADER(base, offset) \
-	((struct block_header*)(((sljit_ub*)base) + offset))
-#define AS_FREE_BLOCK(base, offset) \
-	((struct free_block*)(((sljit_ub*)base) + offset))
-#define MEM_START(base)		((void*)(((sljit_ub*)base) + sizeof(struct block_header)))
-#define ALIGN_SIZE(size)	(((size) + sizeof(struct block_header) + 7) & ~7)
-
-static struct free_block* free_blocks;
-static sljit_uw allocated_size;
-static sljit_uw total_size;
-
-static SLJIT_INLINE void sljit_insert_free_block(struct free_block *free_block, sljit_uw size)
-{
-	free_block->header.size = 0;
-	free_block->size = size;
-
-	free_block->next = free_blocks;
-	free_block->prev = 0;
-	if (free_blocks)
-		free_blocks->prev = free_block;
-	free_blocks = free_block;
-}
-
-static SLJIT_INLINE void sljit_remove_free_block(struct free_block *free_block)
-{
-	if (free_block->next)
-		free_block->next->prev = free_block->prev;
-
-	if (free_block->prev)
-		free_block->prev->next = free_block->next;
-	else {
-		SLJIT_ASSERT(free_blocks == free_block);
-		free_blocks = free_block->next;
-	}
-}
-
-SLJIT_API_FUNC_ATTRIBUTE void* sljit_malloc_exec(sljit_uw size)
-{
-	struct block_header *header;
-	struct block_header *next_header;
-	struct free_block *free_block;
-	sljit_uw chunk_size;
-
-	allocator_grab_lock();
-	if (size < sizeof(struct free_block))
-		size = sizeof(struct free_block);
-	size = ALIGN_SIZE(size);
-
-	free_block = free_blocks;
-	while (free_block) {
-		if (free_block->size >= size) {
-			chunk_size = free_block->size;
-			if (chunk_size > size + 64) {
-				/* We just cut a block from the end of the free block. */
-				chunk_size -= size;
-				free_block->size = chunk_size;
-				header = AS_BLOCK_HEADER(free_block, chunk_size);
-				header->prev_size = chunk_size;
-				AS_BLOCK_HEADER(header, size)->prev_size = size;
-			}
-			else {
-				sljit_remove_free_block(free_block);
-				header = (struct block_header*)free_block;
-				size = chunk_size;
-			}
-			allocated_size += size;
-			header->size = size;
-			allocator_release_lock();
-			return MEM_START(header);
-		}
-		free_block = free_block->next;
-	}
-
-	chunk_size = (size + sizeof(struct block_header) + CHUNK_SIZE - 1) & CHUNK_MASK;
-	header = (struct block_header*)alloc_chunk(chunk_size);
-	if (!header) {
-		allocator_release_lock();
-		return NULL;
-	}
-
-	chunk_size -= sizeof(struct block_header);
-	total_size += chunk_size;
-
-	header->prev_size = 0;
-	if (chunk_size > size + 64) {
-		/* Cut the allocated space into a free and a used block. */
-		allocated_size += size;
-		header->size = size;
-		chunk_size -= size;
-
-		free_block = AS_FREE_BLOCK(header, size);
-		free_block->header.prev_size = size;
-		sljit_insert_free_block(free_block, chunk_size);
-		next_header = AS_BLOCK_HEADER(free_block, chunk_size);
-	}
-	else {
-		/* All space belongs to this allocation. */
-		allocated_size += chunk_size;
-		header->size = chunk_size;
-		next_header = AS_BLOCK_HEADER(header, chunk_size);
-	}
-	next_header->size = 1;
-	next_header->prev_size = chunk_size;
-	allocator_release_lock();
-	return MEM_START(header);
-}
-
-SLJIT_API_FUNC_ATTRIBUTE void sljit_free_exec(void* ptr)
-{
-	struct block_header *header;
-	struct free_block* free_block;
-
-	allocator_grab_lock();
-	header = AS_BLOCK_HEADER(ptr, -(sljit_sw)sizeof(struct block_header));
-	allocated_size -= header->size;
-
-	/* Connecting free blocks together if possible. */
-
-	/* If header->prev_size == 0, free_block will equal to header.
-	   In this case, free_block->header.size will be > 0. */
-	free_block = AS_FREE_BLOCK(header, -(sljit_sw)header->prev_size);
-	if (SLJIT_UNLIKELY(!free_block->header.size)) {
-		free_block->size += header->size;
-		header = AS_BLOCK_HEADER(free_block, free_block->size);
-		header->prev_size = free_block->size;
-	}
-	else {
-		free_block = (struct free_block*)header;
-		sljit_insert_free_block(free_block, header->size);
-	}
-
-	header = AS_BLOCK_HEADER(free_block, free_block->size);
-	if (SLJIT_UNLIKELY(!header->size)) {
-		free_block->size += ((struct free_block*)header)->size;
-		sljit_remove_free_block((struct free_block*)header);
-		header = AS_BLOCK_HEADER(free_block, free_block->size);
-		header->prev_size = free_block->size;
-	}
-
-	/* The whole chunk is free. */
-	if (SLJIT_UNLIKELY(!free_block->header.prev_size && header->size == 1)) {
-		/* If this block is freed, we still have (allocated_size / 2) free space. */
-		if (total_size - free_block->size > (allocated_size * 3 / 2)) {
-			total_size -= free_block->size;
-			sljit_remove_free_block(free_block);
-			free_chunk(free_block, free_block->size + sizeof(struct block_header));
-		}
-	}
-
-	allocator_release_lock();
-}
-
-SLJIT_API_FUNC_ATTRIBUTE void sljit_free_unused_memory_exec(void)
-{
-	struct free_block* free_block;
-	struct free_block* next_free_block;
-
-	allocator_grab_lock();
-
-	free_block = free_blocks;
-	while (free_block) {
-		next_free_block = free_block->next;
-		if (!free_block->header.prev_size && 
-				AS_BLOCK_HEADER(free_block, free_block->size)->size == 1) {
-			total_size -= free_block->size;
-			sljit_remove_free_block(free_block);
-			free_chunk(free_block, free_block->size + sizeof(struct block_header));
-		}
-		free_block = next_free_block;
-	}
-
-	SLJIT_ASSERT((total_size && free_blocks) || (!total_size && !free_blocks));
-	allocator_release_lock();
-}
diff --git a/src/extra/pcre/sljit/sljitLir.c b/src/extra/pcre/sljit/sljitLir.c
deleted file mode 100644
index 1acecba..0000000
--- a/src/extra/pcre/sljit/sljitLir.c
+++ /dev/null
@@ -1,1838 +0,0 @@
-/*
- *    Stack-less Just-In-Time compiler
- *
- *    Copyright 2009-2012 Zoltan Herczeg (hzmester at freemail.hu). All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without modification, are
- * permitted provided that the following conditions are met:
- *
- *   1. Redistributions of source code must retain the above copyright notice, this list of
- *      conditions and the following disclaimer.
- *
- *   2. Redistributions in binary form must reproduce the above copyright notice, this list
- *      of conditions and the following disclaimer in the documentation and/or other materials
- *      provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER(S) AND CONTRIBUTORS ``AS IS'' AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
- * SHALL THE COPYRIGHT HOLDER(S) OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
- * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
- * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
- * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "sljitLir.h"
-
-#define CHECK_ERROR() \
-	do { \
-		if (SLJIT_UNLIKELY(compiler->error)) \
-			return compiler->error; \
-	} while (0)
-
-#define CHECK_ERROR_PTR() \
-	do { \
-		if (SLJIT_UNLIKELY(compiler->error)) \
-			return NULL; \
-	} while (0)
-
-#define CHECK_ERROR_VOID() \
-	do { \
-		if (SLJIT_UNLIKELY(compiler->error)) \
-			return; \
-	} while (0)
-
-#define FAIL_IF(expr) \
-	do { \
-		if (SLJIT_UNLIKELY(expr)) \
-			return compiler->error; \
-	} while (0)
-
-#define PTR_FAIL_IF(expr) \
-	do { \
-		if (SLJIT_UNLIKELY(expr)) \
-			return NULL; \
-	} while (0)
-
-#define FAIL_IF_NULL(ptr) \
-	do { \
-		if (SLJIT_UNLIKELY(!(ptr))) { \
-			compiler->error = SLJIT_ERR_ALLOC_FAILED; \
-			return SLJIT_ERR_ALLOC_FAILED; \
-		} \
-	} while (0)
-
-#define PTR_FAIL_IF_NULL(ptr) \
-	do { \
-		if (SLJIT_UNLIKELY(!(ptr))) { \
-			compiler->error = SLJIT_ERR_ALLOC_FAILED; \
-			return NULL; \
-		} \
-	} while (0)
-
-#define PTR_FAIL_WITH_EXEC_IF(ptr) \
-	do { \
-		if (SLJIT_UNLIKELY(!(ptr))) { \
-			compiler->error = SLJIT_ERR_EX_ALLOC_FAILED; \
-			return NULL; \
-		} \
-	} while (0)
-
-#if !(defined SLJIT_CONFIG_UNSUPPORTED && SLJIT_CONFIG_UNSUPPORTED)
-
-#define GET_OPCODE(op) \
-	((op) & ~(SLJIT_INT_OP | SLJIT_SET_E | SLJIT_SET_U | SLJIT_SET_S | SLJIT_SET_O | SLJIT_SET_C | SLJIT_KEEP_FLAGS))
-
-#define GET_FLAGS(op) \
-	((op) & (SLJIT_SET_E | SLJIT_SET_U | SLJIT_SET_S | SLJIT_SET_O | SLJIT_SET_C))
-
-#define GET_ALL_FLAGS(op) \
-	((op) & (SLJIT_INT_OP | SLJIT_SET_E | SLJIT_SET_U | SLJIT_SET_S | SLJIT_SET_O | SLJIT_SET_C | SLJIT_KEEP_FLAGS))
-
-#define TYPE_CAST_NEEDED(op) \
-	(((op) >= SLJIT_MOV_UB && (op) <= SLJIT_MOV_SH) || ((op) >= SLJIT_MOVU_UB && (op) <= SLJIT_MOVU_SH))
-
-#define BUF_SIZE	4096
-
-#if (defined SLJIT_32BIT_ARCHITECTURE && SLJIT_32BIT_ARCHITECTURE)
-#define ABUF_SIZE	2048
-#else
-#define ABUF_SIZE	4096
-#endif
-
-/* Parameter parsing. */
-#define REG_MASK		0x3f
-#define OFFS_REG(reg)		(((reg) >> 8) & REG_MASK)
-#define OFFS_REG_MASK		(REG_MASK << 8)
-#define TO_OFFS_REG(reg)	((reg) << 8)
-/* When reg cannot be unused. */
-#define FAST_IS_REG(reg)	((reg) <= REG_MASK)
-/* When reg can be unused. */
-#define SLOW_IS_REG(reg)	((reg) > 0 && (reg) <= REG_MASK)
-
-/* Jump flags. */
-#define JUMP_LABEL	0x1
-#define JUMP_ADDR	0x2
-/* SLJIT_REWRITABLE_JUMP is 0x1000. */
-
-#if (defined SLJIT_CONFIG_X86_32 && SLJIT_CONFIG_X86_32) || (defined SLJIT_CONFIG_X86_64 && SLJIT_CONFIG_X86_64)
-#	define PATCH_MB	0x4
-#	define PATCH_MW	0x8
-#if (defined SLJIT_CONFIG_X86_64 && SLJIT_CONFIG_X86_64)
-#	define PATCH_MD	0x10
-#endif
-#endif
-
-#if (defined SLJIT_CONFIG_ARM_V5 && SLJIT_CONFIG_ARM_V5) || (defined SLJIT_CONFIG_ARM_V7 && SLJIT_CONFIG_ARM_V7)
-#	define IS_BL		0x4
-#	define PATCH_B		0x8
-#endif
-
-#if (defined SLJIT_CONFIG_ARM_V5 && SLJIT_CONFIG_ARM_V5)
-#	define CPOOL_SIZE	512
-#endif
-
-#if (defined SLJIT_CONFIG_ARM_THUMB2 && SLJIT_CONFIG_ARM_THUMB2)
-#	define IS_COND		0x04
-#	define IS_BL		0x08
-	/* conditional + imm8 */
-#	define PATCH_TYPE1	0x10
-	/* conditional + imm20 */
-#	define PATCH_TYPE2	0x20
-	/* IT + imm24 */
-#	define PATCH_TYPE3	0x30
-	/* imm11 */
-#	define PATCH_TYPE4	0x40
-	/* imm24 */
-#	define PATCH_TYPE5	0x50
-	/* BL + imm24 */
-#	define PATCH_BL		0x60
-	/* 0xf00 cc code for branches */
-#endif
-
-#if (defined SLJIT_CONFIG_ARM_64 && SLJIT_CONFIG_ARM_64)
-#	define IS_COND		0x004
-#	define IS_CBZ		0x008
-#	define IS_BL		0x010
-#	define PATCH_B		0x020
-#	define PATCH_COND	0x040
-#	define PATCH_ABS48	0x080
-#	define PATCH_ABS64	0x100
-#endif
-
-#if (defined SLJIT_CONFIG_PPC_32 && SLJIT_CONFIG_PPC_32) || (defined SLJIT_CONFIG_PPC_64 && SLJIT_CONFIG_PPC_64)
-#	define IS_COND		0x004
-#	define IS_CALL		0x008
-#	define PATCH_B		0x010
-#	define PATCH_ABS_B	0x020
-#if (defined SLJIT_CONFIG_PPC_64 && SLJIT_CONFIG_PPC_64)
-#	define PATCH_ABS32	0x040
-#	define PATCH_ABS48	0x080
-#endif
-#	define REMOVE_COND	0x100
-#endif
-
-#if (defined SLJIT_CONFIG_MIPS_32 && SLJIT_CONFIG_MIPS_32) || (defined SLJIT_CONFIG_MIPS_64 && SLJIT_CONFIG_MIPS_64)
-#	define IS_MOVABLE	0x004
-#	define IS_JAL		0x008
-#	define IS_CALL		0x010
-#	define IS_BIT26_COND	0x020
-#	define IS_BIT16_COND	0x040
-
-#	define IS_COND		(IS_BIT26_COND | IS_BIT16_COND)
-
-#	define PATCH_B		0x080
-#	define PATCH_J		0x100
-
-#if (defined SLJIT_CONFIG_MIPS_64 && SLJIT_CONFIG_MIPS_64)
-#	define PATCH_ABS32	0x200
-#	define PATCH_ABS48	0x400
-#endif
-
-	/* instruction types */
-#	define MOVABLE_INS	0
-	/* 1 - 31 last destination register */
-	/* no destination (i.e: store) */
-#	define UNMOVABLE_INS	32
-	/* FPU status register */
-#	define FCSR_FCC		33
-#endif
-
-#if (defined SLJIT_CONFIG_TILEGX && SLJIT_CONFIG_TILEGX)
-#	define IS_JAL		0x04
-#	define IS_COND		0x08
-
-#	define PATCH_B		0x10
-#	define PATCH_J		0x20
-#endif
-
-#if (defined SLJIT_CONFIG_SPARC_32 && SLJIT_CONFIG_SPARC_32)
-#	define IS_MOVABLE	0x04
-#	define IS_COND		0x08
-#	define IS_CALL		0x10
-
-#	define PATCH_B		0x20
-#	define PATCH_CALL	0x40
-
-	/* instruction types */
-#	define MOVABLE_INS	0
-	/* 1 - 31 last destination register */
-	/* no destination (i.e: store) */
-#	define UNMOVABLE_INS	32
-
-#	define DST_INS_MASK	0xff
-
-	/* ICC_SET is the same as SET_FLAGS. */
-#	define ICC_IS_SET	(1 << 23)
-#	define FCC_IS_SET	(1 << 24)
-#endif
-
-#if (defined SLJIT_CONFIG_X86_32 && SLJIT_CONFIG_X86_32)
-#define SLJIT_HAS_VARIABLE_LOCALS_OFFSET 1
-#if !(defined SLJIT_X86_32_FASTCALL && SLJIT_X86_32_FASTCALL)
-#define FIXED_LOCALS_OFFSET (3 * sizeof(sljit_sw))
-#endif
-#endif
-
-#if (defined SLJIT_CONFIG_X86_64 && SLJIT_CONFIG_X86_64)
-#define SLJIT_HAS_FIXED_LOCALS_OFFSET 1
-#ifdef _WIN64
-#define FIXED_LOCALS_OFFSET ((4 + 2) * sizeof(sljit_sw))
-#else
-#define FIXED_LOCALS_OFFSET (sizeof(sljit_sw))
-#endif
-#endif
-
-#if (defined SLJIT_CONFIG_ARM_64 && SLJIT_CONFIG_ARM_64)
-#define SLJIT_HAS_VARIABLE_LOCALS_OFFSET 1
-#endif
-
-#if (defined SLJIT_CONFIG_PPC_32 && SLJIT_CONFIG_PPC_32)
-#define SLJIT_HAS_FIXED_LOCALS_OFFSET 1
-#ifdef _AIX
-#define FIXED_LOCALS_OFFSET ((6 + 8) * sizeof(sljit_sw))
-#else
-#define FIXED_LOCALS_OFFSET (2 * sizeof(sljit_sw))
-#endif
-#endif
-
-#if (defined SLJIT_CONFIG_PPC_64 && SLJIT_CONFIG_PPC_64)
-#define SLJIT_HAS_FIXED_LOCALS_OFFSET 1
-#define FIXED_LOCALS_OFFSET ((6 + 8) * sizeof(sljit_sw))
-#endif
-
-#if (defined SLJIT_CONFIG_MIPS_32 && SLJIT_CONFIG_MIPS_32)
-#define SLJIT_HAS_FIXED_LOCALS_OFFSET 1
-#define FIXED_LOCALS_OFFSET (4 * sizeof(sljit_sw))
-#endif
-
-#if (defined SLJIT_CONFIG_MIPS_64 && SLJIT_CONFIG_MIPS_64)
-#define SLJIT_HAS_FIXED_LOCALS_OFFSET 1
-#define FIXED_LOCALS_OFFSET 0
-#endif
-
-#if (defined SLJIT_CONFIG_SPARC_32 && SLJIT_CONFIG_SPARC_32)
-#define SLJIT_HAS_FIXED_LOCALS_OFFSET 1
-#define FIXED_LOCALS_OFFSET (23 * sizeof(sljit_sw))
-#endif
-
-#if (defined SLJIT_HAS_VARIABLE_LOCALS_OFFSET && SLJIT_HAS_VARIABLE_LOCALS_OFFSET)
-
-#define ADJUST_LOCAL_OFFSET(p, i) \
-	if ((p) == (SLJIT_MEM1(SLJIT_LOCALS_REG))) \
-		(i) += compiler->locals_offset;
-
-#elif (defined SLJIT_HAS_FIXED_LOCALS_OFFSET && SLJIT_HAS_FIXED_LOCALS_OFFSET)
-
-#define ADJUST_LOCAL_OFFSET(p, i) \
-	if ((p) == (SLJIT_MEM1(SLJIT_LOCALS_REG))) \
-		(i) += FIXED_LOCALS_OFFSET;
-
-#else
-
-#define ADJUST_LOCAL_OFFSET(p, i)
-
-#endif
-
-#endif /* !(defined SLJIT_CONFIG_UNSUPPORTED && SLJIT_CONFIG_UNSUPPORTED) */
-
-/* Utils can still be used even if SLJIT_CONFIG_UNSUPPORTED is set. */
-#include "sljitUtils.c"
-
-#if !(defined SLJIT_CONFIG_UNSUPPORTED && SLJIT_CONFIG_UNSUPPORTED)
-
-#if (defined SLJIT_EXECUTABLE_ALLOCATOR && SLJIT_EXECUTABLE_ALLOCATOR)
-#include "sljitExecAllocator.c"
-#endif
-
-#if (defined SLJIT_SSE2_AUTO && SLJIT_SSE2_AUTO) && !(defined SLJIT_SSE2 && SLJIT_SSE2)
-#error SLJIT_SSE2_AUTO cannot be enabled without SLJIT_SSE2
-#endif
-
-/* --------------------------------------------------------------------- */
-/*  Public functions                                                     */
-/* --------------------------------------------------------------------- */
-
-#if (defined SLJIT_CONFIG_ARM_V5 && SLJIT_CONFIG_ARM_V5) || ((defined SLJIT_SSE2 && SLJIT_SSE2) && ((defined SLJIT_CONFIG_X86_32 && SLJIT_CONFIG_X86_32) || (defined SLJIT_CONFIG_X86_64 && SLJIT_CONFIG_X86_64)))
-#define SLJIT_NEEDS_COMPILER_INIT 1
-static sljit_si compiler_initialized = 0;
-/* A thread safe initialization. */
-static void init_compiler(void);
-#endif
-
-SLJIT_API_FUNC_ATTRIBUTE struct sljit_compiler* sljit_create_compiler(void)
-{
-	struct sljit_compiler *compiler = (struct sljit_compiler*)SLJIT_MALLOC(sizeof(struct sljit_compiler));
-	if (!compiler)
-		return NULL;
-	SLJIT_ZEROMEM(compiler, sizeof(struct sljit_compiler));
-
-	SLJIT_COMPILE_ASSERT(
-		sizeof(sljit_sb) == 1 && sizeof(sljit_ub) == 1
-		&& sizeof(sljit_sh) == 2 && sizeof(sljit_uh) == 2
-		&& sizeof(sljit_si) == 4 && sizeof(sljit_ui) == 4
-		&& (sizeof(sljit_p) == 4 || sizeof(sljit_p) == 8)
-		&& sizeof(sljit_p) <= sizeof(sljit_sw)
-		&& (sizeof(sljit_sw) == 4 || sizeof(sljit_sw) == 8)
-		&& (sizeof(sljit_uw) == 4 || sizeof(sljit_uw) == 8),
-		invalid_integer_types);
-	SLJIT_COMPILE_ASSERT(SLJIT_INT_OP == SLJIT_SINGLE_OP,
-		int_op_and_single_op_must_be_the_same);
-	SLJIT_COMPILE_ASSERT(SLJIT_REWRITABLE_JUMP != SLJIT_SINGLE_OP,
-		rewritable_jump_and_single_op_must_not_be_the_same);
-
-	/* Only the non-zero members must be set. */
-	compiler->error = SLJIT_SUCCESS;
-
-	compiler->buf = (struct sljit_memory_fragment*)SLJIT_MALLOC(BUF_SIZE);
-	compiler->abuf = (struct sljit_memory_fragment*)SLJIT_MALLOC(ABUF_SIZE);
-
-	if (!compiler->buf || !compiler->abuf) {
-		if (compiler->buf)
-			SLJIT_FREE(compiler->buf);
-		if (compiler->abuf)
-			SLJIT_FREE(compiler->abuf);
-		SLJIT_FREE(compiler);
-		return NULL;
-	}
-
-	compiler->buf->next = NULL;
-	compiler->buf->used_size = 0;
-	compiler->abuf->next = NULL;
-	compiler->abuf->used_size = 0;
-
-	compiler->scratches = -1;
-	compiler->saveds = -1;
-
-#if (defined SLJIT_CONFIG_X86_32 && SLJIT_CONFIG_X86_32)
-	compiler->args = -1;
-#endif
-
-#if (defined SLJIT_CONFIG_ARM_V5 && SLJIT_CONFIG_ARM_V5)
-	compiler->cpool = (sljit_uw*)SLJIT_MALLOC(CPOOL_SIZE * sizeof(sljit_uw) + CPOOL_SIZE * sizeof(sljit_ub));
-	if (!compiler->cpool) {
-		SLJIT_FREE(compiler->buf);
-		SLJIT_FREE(compiler->abuf);
-		SLJIT_FREE(compiler);
-		return NULL;
-	}
-	compiler->cpool_unique = (sljit_ub*)(compiler->cpool + CPOOL_SIZE);
-	compiler->cpool_diff = 0xffffffff;
-#endif
-
-#if (defined SLJIT_CONFIG_MIPS_32 && SLJIT_CONFIG_MIPS_32) || (defined SLJIT_CONFIG_MIPS_64 && SLJIT_CONFIG_MIPS_64)
-	compiler->delay_slot = UNMOVABLE_INS;
-#endif
-
-#if (defined SLJIT_CONFIG_SPARC_32 && SLJIT_CONFIG_SPARC_32)
-	compiler->delay_slot = UNMOVABLE_INS;
-#endif
-
-#if (defined SLJIT_NEEDS_COMPILER_INIT && SLJIT_NEEDS_COMPILER_INIT)
-	if (!compiler_initialized) {
-		init_compiler();
-		compiler_initialized = 1;
-	}
-#endif
-
-	return compiler;
-}
-
-SLJIT_API_FUNC_ATTRIBUTE void sljit_free_compiler(struct sljit_compiler *compiler)
-{
-	struct sljit_memory_fragment *buf;
-	struct sljit_memory_fragment *curr;
-
-	buf = compiler->buf;
-	while (buf) {
-		curr = buf;
-		buf = buf->next;
-		SLJIT_FREE(curr);
-	}
-
-	buf = compiler->abuf;
-	while (buf) {
-		curr = buf;
-		buf = buf->next;
-		SLJIT_FREE(curr);
-	}
-
-#if (defined SLJIT_CONFIG_ARM_V5 && SLJIT_CONFIG_ARM_V5)
-	SLJIT_FREE(compiler->cpool);
-#endif
-	SLJIT_FREE(compiler);
-}
-
-#if (defined SLJIT_CONFIG_ARM_THUMB2 && SLJIT_CONFIG_ARM_THUMB2)
-SLJIT_API_FUNC_ATTRIBUTE void sljit_free_code(void* code)
-{
-	/* Remove thumb mode flag. */
-	SLJIT_FREE_EXEC((void*)((sljit_uw)code & ~0x1));
-}
-#elif (defined SLJIT_INDIRECT_CALL && SLJIT_INDIRECT_CALL)
-SLJIT_API_FUNC_ATTRIBUTE void sljit_free_code(void* code)
-{
-	/* Resolve indirection. */
-	code = (void*)(*(sljit_uw*)code);
-	SLJIT_FREE_EXEC(code);
-}
-#else
-SLJIT_API_FUNC_ATTRIBUTE void sljit_free_code(void* code)
-{
-	SLJIT_FREE_EXEC(code);
-}
-#endif
-
-SLJIT_API_FUNC_ATTRIBUTE void sljit_set_label(struct sljit_jump *jump, struct sljit_label* label)
-{
-	if (SLJIT_LIKELY(!!jump) && SLJIT_LIKELY(!!label)) {
-		jump->flags &= ~JUMP_ADDR;
-		jump->flags |= JUMP_LABEL;
-		jump->u.label = label;
-	}
-}
-
-SLJIT_API_FUNC_ATTRIBUTE void sljit_set_target(struct sljit_jump *jump, sljit_uw target)
-{
-	if (SLJIT_LIKELY(!!jump)) {
-		jump->flags &= ~JUMP_LABEL;
-		jump->flags |= JUMP_ADDR;
-		jump->u.target = target;
-	}
-}
-
-/* --------------------------------------------------------------------- */
-/*  Private functions                                                    */
-/* --------------------------------------------------------------------- */
-
-static void* ensure_buf(struct sljit_compiler *compiler, sljit_uw size)
-{
-	sljit_ub *ret;
-	struct sljit_memory_fragment *new_frag;
-
-	SLJIT_ASSERT(size <= 256);
-	if (compiler->buf->used_size + size <= (BUF_SIZE - (sljit_uw)SLJIT_OFFSETOF(struct sljit_memory_fragment, memory))) {
-		ret = compiler->buf->memory + compiler->buf->used_size;
-		compiler->buf->used_size += size;
-		return ret;
-	}
-	new_frag = (struct sljit_memory_fragment*)SLJIT_MALLOC(BUF_SIZE);
-	PTR_FAIL_IF_NULL(new_frag);
-	new_frag->next = compiler->buf;
-	compiler->buf = new_frag;
-	new_frag->used_size = size;
-	return new_frag->memory;
-}
-
-static void* ensure_abuf(struct sljit_compiler *compiler, sljit_uw size)
-{
-	sljit_ub *ret;
-	struct sljit_memory_fragment *new_frag;
-
-	SLJIT_ASSERT(size <= 256);
-	if (compiler->abuf->used_size + size <= (ABUF_SIZE - (sljit_uw)SLJIT_OFFSETOF(struct sljit_memory_fragment, memory))) {
-		ret = compiler->abuf->memory + compiler->abuf->used_size;
-		compiler->abuf->used_size += size;
-		return ret;
-	}
-	new_frag = (struct sljit_memory_fragment*)SLJIT_MALLOC(ABUF_SIZE);
-	PTR_FAIL_IF_NULL(new_frag);
-	new_frag->next = compiler->abuf;
-	compiler->abuf = new_frag;
-	new_frag->used_size = size;
-	return new_frag->memory;
-}
-
-SLJIT_API_FUNC_ATTRIBUTE void* sljit_alloc_memory(struct sljit_compiler *compiler, sljit_si size)
-{
-	CHECK_ERROR_PTR();
-
-#if (defined SLJIT_64BIT_ARCHITECTURE && SLJIT_64BIT_ARCHITECTURE)
-	if (size <= 0 || size > 128)
-		return NULL;
-	size = (size + 7) & ~7;
-#else
-	if (size <= 0 || size > 64)
-		return NULL;
-	size = (size + 3) & ~3;
-#endif
-	return ensure_abuf(compiler, size);
-}
-
-static SLJIT_INLINE void reverse_buf(struct sljit_compiler *compiler)
-{
-	struct sljit_memory_fragment *buf = compiler->buf;
-	struct sljit_memory_fragment *prev = NULL;
-	struct sljit_memory_fragment *tmp;
-
-	do {
-		tmp = buf->next;
-		buf->next = prev;
-		prev = buf;
-		buf = tmp;
-	} while (buf != NULL);
-
-	compiler->buf = prev;
-}
-
-static SLJIT_INLINE void set_label(struct sljit_label *label, struct sljit_compiler *compiler)
-{
-	label->next = NULL;
-	label->size = compiler->size;
-	if (compiler->last_label)
-		compiler->last_label->next = label;
-	else
-		compiler->labels = label;
-	compiler->last_label = label;
-}
-
-static SLJIT_INLINE void set_jump(struct sljit_jump *jump, struct sljit_compiler *compiler, sljit_si flags)
-{
-	jump->next = NULL;
-	jump->flags = flags;
-	if (compiler->last_jump)
-		compiler->last_jump->next = jump;
-	else
-		compiler->jumps = jump;
-	compiler->last_jump = jump;
-}
-
-static SLJIT_INLINE void set_const(struct sljit_const *const_, struct sljit_compiler *compiler)
-{
-	const_->next = NULL;
-	const_->addr = compiler->size;
-	if (compiler->last_const)
-		compiler->last_const->next = const_;
-	else
-		compiler->consts = const_;
-	compiler->last_const = const_;
-}
-
-#define ADDRESSING_DEPENDS_ON(exp, reg) \
-	(((exp) & SLJIT_MEM) && (((exp) & REG_MASK) == reg || OFFS_REG(exp) == reg))
-
-#if (defined SLJIT_DEBUG && SLJIT_DEBUG)
-#define FUNCTION_CHECK_OP() \
-	SLJIT_ASSERT(!GET_FLAGS(op) || !(op & SLJIT_KEEP_FLAGS)); \
-	switch (GET_OPCODE(op)) { \
-	case SLJIT_NOT: \
-	case SLJIT_CLZ: \
-	case SLJIT_AND: \
-	case SLJIT_OR: \
-	case SLJIT_XOR: \
-	case SLJIT_SHL: \
-	case SLJIT_LSHR: \
-	case SLJIT_ASHR: \
-		SLJIT_ASSERT(!(op & (SLJIT_SET_U | SLJIT_SET_S | SLJIT_SET_O | SLJIT_SET_C))); \
-		break; \
-	case SLJIT_NEG: \
-		SLJIT_ASSERT(!(op & (SLJIT_SET_U | SLJIT_SET_S | SLJIT_SET_C))); \
-		break; \
-	case SLJIT_MUL: \
-		SLJIT_ASSERT(!(op & (SLJIT_SET_E | SLJIT_SET_U | SLJIT_SET_S | SLJIT_SET_C))); \
-		break; \
-	case SLJIT_CMPD: \
-		SLJIT_ASSERT(!(op & (SLJIT_SET_U | SLJIT_SET_O | SLJIT_SET_C | SLJIT_KEEP_FLAGS))); \
-		SLJIT_ASSERT((op & (SLJIT_SET_E | SLJIT_SET_S))); \
-		break; \
-	case SLJIT_ADD: \
-		SLJIT_ASSERT(!(op & (SLJIT_SET_U | SLJIT_SET_S))); \
-		break; \
-	case SLJIT_SUB: \
-		break; \
-	case SLJIT_ADDC: \
-	case SLJIT_SUBC: \
-		SLJIT_ASSERT(!(op & (SLJIT_SET_E | SLJIT_SET_U | SLJIT_SET_S | SLJIT_SET_O))); \
-		break; \
-	case SLJIT_BREAKPOINT: \
-	case SLJIT_NOP: \
-	case SLJIT_UMUL: \
-	case SLJIT_SMUL: \
-	case SLJIT_MOV: \
-	case SLJIT_MOV_UI: \
-	case SLJIT_MOV_P: \
-	case SLJIT_MOVU: \
-	case SLJIT_MOVU_UI: \
-	case SLJIT_MOVU_P: \
-		/* Nothing allowed */ \
-		SLJIT_ASSERT(!(op & (SLJIT_INT_OP | SLJIT_SET_E | SLJIT_SET_U | SLJIT_SET_S | SLJIT_SET_O | SLJIT_SET_C | SLJIT_KEEP_FLAGS))); \
-		break; \
-	default: \
-		/* Only SLJIT_INT_OP or SLJIT_SINGLE_OP is allowed. */ \
-		SLJIT_ASSERT(!(op & (SLJIT_SET_E | SLJIT_SET_U | SLJIT_SET_S | SLJIT_SET_O | SLJIT_SET_C | SLJIT_KEEP_FLAGS))); \
-		break; \
-	}
-
-#define FUNCTION_CHECK_IS_REG(r) \
-	((r) == SLJIT_UNUSED || \
-	((r) >= SLJIT_SCRATCH_REG1 && (r) <= SLJIT_SCRATCH_REG1 - 1 + compiler->scratches) || \
-	((r) >= SLJIT_SAVED_REG1 && (r) <= SLJIT_SAVED_REG1 - 1 + compiler->saveds))
-
-#define FUNCTION_CHECK_SRC(p, i) \
-	SLJIT_ASSERT(compiler->scratches != -1 && compiler->saveds != -1); \
-	if (FUNCTION_CHECK_IS_REG(p)) \
-		SLJIT_ASSERT((i) == 0 && (p) != SLJIT_UNUSED); \
-	else if ((p) == SLJIT_IMM) \
-		; \
-	else if ((p) == (SLJIT_MEM1(SLJIT_LOCALS_REG))) \
-		SLJIT_ASSERT((i) >= 0 && (i) < compiler->logical_local_size); \
-	else if ((p) & SLJIT_MEM) { \
-		SLJIT_ASSERT(FUNCTION_CHECK_IS_REG((p) & REG_MASK)); \
-		if ((p) & OFFS_REG_MASK) { \
-			SLJIT_ASSERT(FUNCTION_CHECK_IS_REG(OFFS_REG(p))); \
-			SLJIT_ASSERT(!((i) & ~0x3)); \
-		} \
-		SLJIT_ASSERT(!((p) & ~(SLJIT_MEM | SLJIT_IMM | REG_MASK | OFFS_REG_MASK))); \
-	} \
-	else \
-		SLJIT_ASSERT_STOP();
-
-#define FUNCTION_CHECK_DST(p, i) \
-	SLJIT_ASSERT(compiler->scratches != -1 && compiler->saveds != -1); \
-	if (FUNCTION_CHECK_IS_REG(p)) \
-		SLJIT_ASSERT((i) == 0); \
-	else if ((p) == (SLJIT_MEM1(SLJIT_LOCALS_REG))) \
-		SLJIT_ASSERT((i) >= 0 && (i) < compiler->logical_local_size); \
-	else if ((p) & SLJIT_MEM) { \
-		SLJIT_ASSERT(FUNCTION_CHECK_IS_REG((p) & REG_MASK)); \
-		if ((p) & OFFS_REG_MASK) { \
-			SLJIT_ASSERT(FUNCTION_CHECK_IS_REG(OFFS_REG(p))); \
-			SLJIT_ASSERT(!((i) & ~0x3)); \
-		} \
-		SLJIT_ASSERT(!((p) & ~(SLJIT_MEM | SLJIT_IMM | REG_MASK | OFFS_REG_MASK))); \
-	} \
-	else \
-		SLJIT_ASSERT_STOP();
-
-#define FUNCTION_FCHECK(p, i) \
-	if ((p) >= SLJIT_FLOAT_REG1 && (p) <= SLJIT_FLOAT_REG6) \
-		SLJIT_ASSERT(i == 0); \
-	else if ((p) & SLJIT_MEM) { \
-		SLJIT_ASSERT(FUNCTION_CHECK_IS_REG((p) & REG_MASK)); \
-		if ((p) & OFFS_REG_MASK) { \
-			SLJIT_ASSERT(FUNCTION_CHECK_IS_REG(OFFS_REG(p))); \
-			SLJIT_ASSERT(((p) & OFFS_REG_MASK) != TO_OFFS_REG(SLJIT_LOCALS_REG) && !(i & ~0x3)); \
-		} else \
-			SLJIT_ASSERT(OFFS_REG(p) == 0); \
-		SLJIT_ASSERT(!((p) & ~(SLJIT_MEM | SLJIT_IMM | REG_MASK | OFFS_REG_MASK))); \
-	} \
-	else \
-		SLJIT_ASSERT_STOP();
-
-#define FUNCTION_CHECK_OP1() \
-	if (GET_OPCODE(op) >= SLJIT_MOVU && GET_OPCODE(op) <= SLJIT_MOVU_P) { \
-		SLJIT_ASSERT(!(src & SLJIT_MEM) || (src & REG_MASK) != SLJIT_LOCALS_REG); \
-		SLJIT_ASSERT(!(dst & SLJIT_MEM) || (dst & REG_MASK) != SLJIT_LOCALS_REG); \
-		if ((src & SLJIT_MEM) && (src & REG_MASK)) \
-			SLJIT_ASSERT((dst & REG_MASK) != (src & REG_MASK) && OFFS_REG(dst) != (src & REG_MASK)); \
-	}
-
-#endif
-
-#if (defined SLJIT_VERBOSE && SLJIT_VERBOSE)
-
-SLJIT_API_FUNC_ATTRIBUTE void sljit_compiler_verbose(struct sljit_compiler *compiler, FILE* verbose)
-{
-	compiler->verbose = verbose;
-}
-
-static char* reg_names[] = {
-	(char*)"unused", (char*)"s1", (char*)"s2", (char*)"s3",
-	(char*)"se1", (char*)"se2", (char*)"p1", (char*)"p2",
-	(char*)"p3", (char*)"pe1", (char*)"pe2", (char*)"lc"
-};
-
-static char* freg_names[] = {
-	(char*)"unused", (char*)"f1", (char*)"f2", (char*)"f3",
-	(char*)"f4", (char*)"f5", (char*)"f6"
-};
-
-#if (defined SLJIT_64BIT_ARCHITECTURE && SLJIT_64BIT_ARCHITECTURE)
-#ifdef _WIN64
-#	define SLJIT_PRINT_D	"I64"
-#else
-#	define SLJIT_PRINT_D	"l"
-#endif
-#else
-#	define SLJIT_PRINT_D	""
-#endif
-
-#define sljit_verbose_param(p, i) \
-	if ((p) & SLJIT_IMM) \
-		fprintf(compiler->verbose, "#%" SLJIT_PRINT_D "d", (i)); \
-	else if ((p) & SLJIT_MEM) { \
-		if ((p) & REG_MASK) { \
-			if (i) { \
-				if ((p) & OFFS_REG_MASK) \
-					fprintf(compiler->verbose, "[%s + %s * %d]", reg_names[(p) & REG_MASK], reg_names[OFFS_REG(p)], 1 << (i)); \
-				else \
-					fprintf(compiler->verbose, "[%s + #%" SLJIT_PRINT_D "d]", reg_names[(p) & REG_MASK], (i)); \
-			} \
-			else { \
-				if ((p) & OFFS_REG_MASK) \
-					fprintf(compiler->verbose, "[%s + %s]", reg_names[(p) & REG_MASK], reg_names[OFFS_REG(p)]); \
-				else \
-					fprintf(compiler->verbose, "[%s]", reg_names[(p) & REG_MASK]); \
-			} \
-		} \
-		else \
-			fprintf(compiler->verbose, "[#%" SLJIT_PRINT_D "d]", (i)); \
-	} else \
-		fprintf(compiler->verbose, "%s", reg_names[p]);
-#define sljit_verbose_fparam(p, i) \
-	if ((p) & SLJIT_MEM) { \
-		if ((p) & REG_MASK) { \
-			if (i) { \
-				if ((p) & OFFS_REG_MASK) \
-					fprintf(compiler->verbose, "[%s + %s * %d]", reg_names[(p) & REG_MASK], reg_names[OFFS_REG(p)], 1 << (i)); \
-				else \
-					fprintf(compiler->verbose, "[%s + #%" SLJIT_PRINT_D "d]", reg_names[(p) & REG_MASK], (i)); \
-			} \
-			else { \
-				if ((p) & OFFS_REG_MASK) \
-					fprintf(compiler->verbose, "[%s + %s]", reg_names[(p) & REG_MASK], reg_names[OFFS_REG(p)]); \
-				else \
-					fprintf(compiler->verbose, "[%s]", reg_names[(p) & REG_MASK]); \
-			} \
-		} \
-		else \
-			fprintf(compiler->verbose, "[#%" SLJIT_PRINT_D "d]", (i)); \
-	} else \
-		fprintf(compiler->verbose, "%s", freg_names[p]);
-
-static SLJIT_CONST char* op_names[] = {
-	/* op0 */
-	(char*)"breakpoint", (char*)"nop",
-	(char*)"umul", (char*)"smul", (char*)"udiv", (char*)"sdiv",
-	/* op1 */
-	(char*)"mov", (char*)"mov.ub", (char*)"mov.sb", (char*)"mov.uh",
-	(char*)"mov.sh", (char*)"mov.ui", (char*)"mov.si", (char*)"mov.p",
-	(char*)"movu", (char*)"movu.ub", (char*)"movu.sb", (char*)"movu.uh",
-	(char*)"movu.sh", (char*)"movu.ui", (char*)"movu.si", (char*)"movu.p",
-	(char*)"not", (char*)"neg", (char*)"clz",
-	/* op2 */
-	(char*)"add", (char*)"addc", (char*)"sub", (char*)"subc",
-	(char*)"mul", (char*)"and", (char*)"or", (char*)"xor",
-	(char*)"shl", (char*)"lshr", (char*)"ashr",
-	/* fop1 */
-	(char*)"cmp", (char*)"mov", (char*)"neg", (char*)"abs",
-	/* fop2 */
-	(char*)"add", (char*)"sub", (char*)"mul", (char*)"div"
-};
-
-static char* jump_names[] = {
-	(char*)"equal", (char*)"not_equal",
-	(char*)"less", (char*)"greater_equal",
-	(char*)"greater", (char*)"less_equal",
-	(char*)"sig_less", (char*)"sig_greater_equal",
-	(char*)"sig_greater", (char*)"sig_less_equal",
-	(char*)"overflow", (char*)"not_overflow",
-	(char*)"mul_overflow", (char*)"mul_not_overflow",
-	(char*)"float_equal", (char*)"float_not_equal",
-	(char*)"float_less", (char*)"float_greater_equal",
-	(char*)"float_greater", (char*)"float_less_equal",
-	(char*)"float_unordered", (char*)"float_ordered",
-	(char*)"jump", (char*)"fast_call",
-	(char*)"call0", (char*)"call1", (char*)"call2", (char*)"call3"
-};
-
-#endif
-
-/* --------------------------------------------------------------------- */
-/*  Arch dependent                                                       */
-/* --------------------------------------------------------------------- */
-
-static SLJIT_INLINE void check_sljit_generate_code(struct sljit_compiler *compiler)
-{
-#if (defined SLJIT_DEBUG && SLJIT_DEBUG)
-	struct sljit_jump *jump;
-#endif
-	/* If debug and verbose are disabled, all arguments are unused. */
-	SLJIT_UNUSED_ARG(compiler);
-
-	SLJIT_ASSERT(compiler->size > 0);
-#if (defined SLJIT_DEBUG && SLJIT_DEBUG)
-	jump = compiler->jumps;
-	while (jump) {
-		/* All jumps have target. */
-		SLJIT_ASSERT(jump->flags & (JUMP_LABEL | JUMP_ADDR));
-		jump = jump->next;
-	}
-#endif
-}
-
-static SLJIT_INLINE void check_sljit_emit_enter(struct sljit_compiler *compiler, sljit_si args, sljit_si scratches, sljit_si saveds, sljit_si local_size)
-{
-	/* If debug and verbose are disabled, all arguments are unused. */
-	SLJIT_UNUSED_ARG(compiler);
-	SLJIT_UNUSED_ARG(args);
-	SLJIT_UNUSED_ARG(scratches);
-	SLJIT_UNUSED_ARG(saveds);
-	SLJIT_UNUSED_ARG(local_size);
-
-	SLJIT_ASSERT(args >= 0 && args <= 3);
-	SLJIT_ASSERT(scratches >= 0 && scratches <= SLJIT_NO_TMP_REGISTERS);
-	SLJIT_ASSERT(saveds >= 0 && saveds <= SLJIT_NO_GEN_REGISTERS);
-	SLJIT_ASSERT(args <= saveds);
-	SLJIT_ASSERT(local_size >= 0 && local_size <= SLJIT_MAX_LOCAL_SIZE);
-#if (defined SLJIT_VERBOSE && SLJIT_VERBOSE)
-	if (SLJIT_UNLIKELY(!!compiler->verbose))
-		fprintf(compiler->verbose, "  enter args=%d scratches=%d saveds=%d local_size=%d\n", args, scratches, saveds, local_size);
-#endif
-}
-
-static SLJIT_INLINE void check_sljit_set_context(struct sljit_compiler *compiler, sljit_si args, sljit_si scratches, sljit_si saveds, sljit_si local_size)
-{
-	/* If debug and verbose are disabled, all arguments are unused. */
-	SLJIT_UNUSED_ARG(compiler);
-	SLJIT_UNUSED_ARG(args);
-	SLJIT_UNUSED_ARG(scratches);
-	SLJIT_UNUSED_ARG(saveds);
-	SLJIT_UNUSED_ARG(local_size);
-
-#if (defined SLJIT_VERBOSE && SLJIT_VERBOSE) || (defined SLJIT_DEBUG && SLJIT_DEBUG)
-	if (SLJIT_UNLIKELY(compiler->skip_checks)) {
-		compiler->skip_checks = 0;
-		return;
-	}
-#endif
-
-	SLJIT_ASSERT(args >= 0 && args <= 3);
-	SLJIT_ASSERT(scratches >= 0 && scratches <= SLJIT_NO_TMP_REGISTERS);
-	SLJIT_ASSERT(saveds >= 0 && saveds <= SLJIT_NO_GEN_REGISTERS);
-	SLJIT_ASSERT(args <= saveds);
-	SLJIT_ASSERT(local_size >= 0 && local_size <= SLJIT_MAX_LOCAL_SIZE);
-#if (defined SLJIT_VERBOSE && SLJIT_VERBOSE)
-	if (SLJIT_UNLIKELY(!!compiler->verbose))
-		fprintf(compiler->verbose, "  set_context args=%d scratches=%d saveds=%d local_size=%d\n", args, scratches, saveds, local_size);
-#endif
-}
-
-static SLJIT_INLINE void check_sljit_emit_return(struct sljit_compiler *compiler, sljit_si op, sljit_si src, sljit_sw srcw)
-{
-	/* If debug and verbose are disabled, all arguments are unused. */
-	SLJIT_UNUSED_ARG(compiler);
-	SLJIT_UNUSED_ARG(op);
-	SLJIT_UNUSED_ARG(src);
-	SLJIT_UNUSED_ARG(srcw);
-
-#if (defined SLJIT_DEBUG && SLJIT_DEBUG)
-	if (op != SLJIT_UNUSED) {
-		SLJIT_ASSERT(op >= SLJIT_MOV && op <= SLJIT_MOV_P);
-		FUNCTION_CHECK_SRC(src, srcw);
-	}
-	else
-		SLJIT_ASSERT(src == 0 && srcw == 0);
-#endif
-#if (defined SLJIT_VERBOSE && SLJIT_VERBOSE)
-	if (SLJIT_UNLIKELY(!!compiler->verbose)) {
-		if (op == SLJIT_UNUSED)
-			fprintf(compiler->verbose, "  return\n");
-		else {
-			fprintf(compiler->verbose, "  return %s ", op_names[op]);
-			sljit_verbose_param(src, srcw);
-			fprintf(compiler->verbose, "\n");
-		}
-	}
-#endif
-}
-
-static SLJIT_INLINE void check_sljit_emit_fast_enter(struct sljit_compiler *compiler, sljit_si dst, sljit_sw dstw)
-{
-	/* If debug and verbose are disabled, all arguments are unused. */
-	SLJIT_UNUSED_ARG(compiler);
-	SLJIT_UNUSED_ARG(dst);
-	SLJIT_UNUSED_ARG(dstw);
-
-#if (defined SLJIT_DEBUG && SLJIT_DEBUG)
-	FUNCTION_CHECK_DST(dst, dstw);
-#endif
-#if (defined SLJIT_VERBOSE && SLJIT_VERBOSE)
-	if (SLJIT_UNLIKELY(!!compiler->verbose)) {
-		fprintf(compiler->verbose, "  fast_enter ");
-		sljit_verbose_param(dst, dstw);
-		fprintf(compiler->verbose, "\n");
-	}
-#endif
-}
-
-static SLJIT_INLINE void check_sljit_emit_fast_return(struct sljit_compiler *compiler, sljit_si src, sljit_sw srcw)
-{
-	/* If debug and verbose are disabled, all arguments are unused. */
-	SLJIT_UNUSED_ARG(compiler);
-	SLJIT_UNUSED_ARG(src);
-	SLJIT_UNUSED_ARG(srcw);
-
-#if (defined SLJIT_DEBUG && SLJIT_DEBUG)
-	FUNCTION_CHECK_SRC(src, srcw);
-#endif
-#if (defined SLJIT_VERBOSE && SLJIT_VERBOSE)
-	if (SLJIT_UNLIKELY(!!compiler->verbose)) {
-		fprintf(compiler->verbose, "  fast_return ");
-		sljit_verbose_param(src, srcw);
-		fprintf(compiler->verbose, "\n");
-	}
-#endif
-}
-
-static SLJIT_INLINE void check_sljit_emit_op0(struct sljit_compiler *compiler, sljit_si op)
-{
-	/* If debug and verbose are disabled, all arguments are unused. */
-	SLJIT_UNUSED_ARG(compiler);
-	SLJIT_UNUSED_ARG(op);
-
-	SLJIT_ASSERT((op >= SLJIT_BREAKPOINT && op <= SLJIT_SMUL)
-		|| ((op & ~SLJIT_INT_OP) >= SLJIT_UDIV && (op & ~SLJIT_INT_OP) <= SLJIT_SDIV));
-#if (defined SLJIT_VERBOSE && SLJIT_VERBOSE)
-	if (SLJIT_UNLIKELY(!!compiler->verbose))
-		fprintf(compiler->verbose, "  %s%s\n", !(op & SLJIT_INT_OP) ? "" : "i", op_names[GET_OPCODE(op)]);
-#endif
-}
-
-static SLJIT_INLINE void check_sljit_emit_op1(struct sljit_compiler *compiler, sljit_si op,
-	sljit_si dst, sljit_sw dstw,
-	sljit_si src, sljit_sw srcw)
-{
-	/* If debug and verbose are disabled, all arguments are unused. */
-	SLJIT_UNUSED_ARG(compiler);
-	SLJIT_UNUSED_ARG(op);
-	SLJIT_UNUSED_ARG(dst);
-	SLJIT_UNUSED_ARG(dstw);
-	SLJIT_UNUSED_ARG(src);
-	SLJIT_UNUSED_ARG(srcw);
-
-#if (defined SLJIT_VERBOSE && SLJIT_VERBOSE) || (defined SLJIT_DEBUG && SLJIT_DEBUG)
-	if (SLJIT_UNLIKELY(compiler->skip_checks)) {
-		compiler->skip_checks = 0;
-		return;
-	}
-#endif
-
-	SLJIT_ASSERT(GET_OPCODE(op) >= SLJIT_MOV && GET_OPCODE(op) <= SLJIT_CLZ);
-#if (defined SLJIT_DEBUG && SLJIT_DEBUG)
-	FUNCTION_CHECK_OP();
-	FUNCTION_CHECK_SRC(src, srcw);
-	FUNCTION_CHECK_DST(dst, dstw);
-	FUNCTION_CHECK_OP1();
-#endif
-#if (defined SLJIT_VERBOSE && SLJIT_VERBOSE)
-	if (SLJIT_UNLIKELY(!!compiler->verbose)) {
-		fprintf(compiler->verbose, "  %s%s%s%s%s%s%s%s ", !(op & SLJIT_INT_OP) ? "" : "i", op_names[GET_OPCODE(op)],
-			!(op & SLJIT_SET_E) ? "" : ".e", !(op & SLJIT_SET_U) ? "" : ".u", !(op & SLJIT_SET_S) ? "" : ".s",
-			!(op & SLJIT_SET_O) ? "" : ".o", !(op & SLJIT_SET_C) ? "" : ".c", !(op & SLJIT_KEEP_FLAGS) ? "" : ".k");
-		sljit_verbose_param(dst, dstw);
-		fprintf(compiler->verbose, ", ");
-		sljit_verbose_param(src, srcw);
-		fprintf(compiler->verbose, "\n");
-	}
-#endif
-}
-
-static SLJIT_INLINE void check_sljit_emit_op2(struct sljit_compiler *compiler, sljit_si op,
-	sljit_si dst, sljit_sw dstw,
-	sljit_si src1, sljit_sw src1w,
-	sljit_si src2, sljit_sw src2w)
-{
-	/* If debug and verbose are disabled, all arguments are unused. */
-	SLJIT_UNUSED_ARG(compiler);
-	SLJIT_UNUSED_ARG(op);
-	SLJIT_UNUSED_ARG(dst);
-	SLJIT_UNUSED_ARG(dstw);
-	SLJIT_UNUSED_ARG(src1);
-	SLJIT_UNUSED_ARG(src1w);
-	SLJIT_UNUSED_ARG(src2);
-	SLJIT_UNUSED_ARG(src2w);
-
-#if (defined SLJIT_VERBOSE && SLJIT_VERBOSE) || (defined SLJIT_DEBUG && SLJIT_DEBUG)
-	if (SLJIT_UNLIKELY(compiler->skip_checks)) {
-		compiler->skip_checks = 0;
-		return;
-	}
-#endif
-
-	SLJIT_ASSERT(GET_OPCODE(op) >= SLJIT_ADD && GET_OPCODE(op) <= SLJIT_ASHR);
-#if (defined SLJIT_DEBUG && SLJIT_DEBUG)
-	FUNCTION_CHECK_OP();
-	FUNCTION_CHECK_SRC(src1, src1w);
-	FUNCTION_CHECK_SRC(src2, src2w);
-	FUNCTION_CHECK_DST(dst, dstw);
-#endif
-#if (defined SLJIT_VERBOSE && SLJIT_VERBOSE)
-	if (SLJIT_UNLIKELY(!!compiler->verbose)) {
-		fprintf(compiler->verbose, "  %s%s%s%s%s%s%s%s ", !(op & SLJIT_INT_OP) ? "" : "i", op_names[GET_OPCODE(op)],
-			!(op & SLJIT_SET_E) ? "" : ".e", !(op & SLJIT_SET_U) ? "" : ".u", !(op & SLJIT_SET_S) ? "" : ".s",
-			!(op & SLJIT_SET_O) ? "" : ".o", !(op & SLJIT_SET_C) ? "" : ".c", !(op & SLJIT_KEEP_FLAGS) ? "" : ".k");
-		sljit_verbose_param(dst, dstw);
-		fprintf(compiler->verbose, ", ");
-		sljit_verbose_param(src1, src1w);
-		fprintf(compiler->verbose, ", ");
-		sljit_verbose_param(src2, src2w);
-		fprintf(compiler->verbose, "\n");
-	}
-#endif
-}
-
-static SLJIT_INLINE void check_sljit_get_register_index(sljit_si reg)
-{
-	SLJIT_UNUSED_ARG(reg);
-	SLJIT_ASSERT(reg > 0 && reg <= SLJIT_NO_REGISTERS);
-}
-
-static SLJIT_INLINE void check_sljit_get_float_register_index(sljit_si reg)
-{
-	SLJIT_UNUSED_ARG(reg);
-	SLJIT_ASSERT(reg > 0 && reg <= SLJIT_NO_FLOAT_REGISTERS);
-}
-
-static SLJIT_INLINE void check_sljit_emit_op_custom(struct sljit_compiler *compiler,
-	void *instruction, sljit_si size)
-{
-	SLJIT_UNUSED_ARG(compiler);
-	SLJIT_UNUSED_ARG(instruction);
-	SLJIT_UNUSED_ARG(size);
-	SLJIT_ASSERT(instruction);
-}
-
-static SLJIT_INLINE void check_sljit_emit_fop1(struct sljit_compiler *compiler, sljit_si op,
-	sljit_si dst, sljit_sw dstw,
-	sljit_si src, sljit_sw srcw)
-{
-	/* If debug and verbose are disabled, all arguments are unused. */
-	SLJIT_UNUSED_ARG(compiler);
-	SLJIT_UNUSED_ARG(op);
-	SLJIT_UNUSED_ARG(dst);
-	SLJIT_UNUSED_ARG(dstw);
-	SLJIT_UNUSED_ARG(src);
-	SLJIT_UNUSED_ARG(srcw);
-
-#if (defined SLJIT_VERBOSE && SLJIT_VERBOSE) || (defined SLJIT_DEBUG && SLJIT_DEBUG)
-	if (SLJIT_UNLIKELY(compiler->skip_checks)) {
-		compiler->skip_checks = 0;
-		return;
-	}
-#endif
-
-	SLJIT_ASSERT(sljit_is_fpu_available());
-	SLJIT_ASSERT(GET_OPCODE(op) >= SLJIT_CMPD && GET_OPCODE(op) <= SLJIT_ABSD);
-#if (defined SLJIT_DEBUG && SLJIT_DEBUG)
-	FUNCTION_CHECK_OP();
-	FUNCTION_FCHECK(src, srcw);
-	FUNCTION_FCHECK(dst, dstw);
-#endif
-#if (defined SLJIT_VERBOSE && SLJIT_VERBOSE)
-	if (SLJIT_UNLIKELY(!!compiler->verbose)) {
-		fprintf(compiler->verbose, "  %s%s%s%s ", op_names[GET_OPCODE(op)], (op & SLJIT_SINGLE_OP) ? "s" : "d",
-			!(op & SLJIT_SET_E) ? "" : ".e", !(op & SLJIT_SET_S) ? "" : ".s");
-		sljit_verbose_fparam(dst, dstw);
-		fprintf(compiler->verbose, ", ");
-		sljit_verbose_fparam(src, srcw);
-		fprintf(compiler->verbose, "\n");
-	}
-#endif
-}
-
-static SLJIT_INLINE void check_sljit_emit_fop2(struct sljit_compiler *compiler, sljit_si op,
-	sljit_si dst, sljit_sw dstw,
-	sljit_si src1, sljit_sw src1w,
-	sljit_si src2, sljit_sw src2w)
-{
-	/* If debug and verbose are disabled, all arguments are unused. */
-	SLJIT_UNUSED_ARG(compiler);
-	SLJIT_UNUSED_ARG(op);
-	SLJIT_UNUSED_ARG(dst);
-	SLJIT_UNUSED_ARG(dstw);
-	SLJIT_UNUSED_ARG(src1);
-	SLJIT_UNUSED_ARG(src1w);
-	SLJIT_UNUSED_ARG(src2);
-	SLJIT_UNUSED_ARG(src2w);
-
-	SLJIT_ASSERT(sljit_is_fpu_available());
-	SLJIT_ASSERT(GET_OPCODE(op) >= SLJIT_ADDD && GET_OPCODE(op) <= SLJIT_DIVD);
-#if (defined SLJIT_DEBUG && SLJIT_DEBUG)
-	FUNCTION_CHECK_OP();
-	FUNCTION_FCHECK(src1, src1w);
-	FUNCTION_FCHECK(src2, src2w);
-	FUNCTION_FCHECK(dst, dstw);
-#endif
-#if (defined SLJIT_VERBOSE && SLJIT_VERBOSE)
-	if (SLJIT_UNLIKELY(!!compiler->verbose)) {
-		fprintf(compiler->verbose, "  %s%s ", op_names[GET_OPCODE(op)], (op & SLJIT_SINGLE_OP) ? "s" : "d");
-		sljit_verbose_fparam(dst, dstw);
-		fprintf(compiler->verbose, ", ");
-		sljit_verbose_fparam(src1, src1w);
-		fprintf(compiler->verbose, ", ");
-		sljit_verbose_fparam(src2, src2w);
-		fprintf(compiler->verbose, "\n");
-	}
-#endif
-}
-
-static SLJIT_INLINE void check_sljit_emit_label(struct sljit_compiler *compiler)
-{
-	/* If debug and verbose are disabled, all arguments are unused. */
-	SLJIT_UNUSED_ARG(compiler);
-
-#if (defined SLJIT_VERBOSE && SLJIT_VERBOSE)
-	if (SLJIT_UNLIKELY(!!compiler->verbose))
-		fprintf(compiler->verbose, "label:\n");
-#endif
-}
-
-static SLJIT_INLINE void check_sljit_emit_jump(struct sljit_compiler *compiler, sljit_si type)
-{
-	/* If debug and verbose are disabled, all arguments are unused. */
-	SLJIT_UNUSED_ARG(compiler);
-	SLJIT_UNUSED_ARG(type);
-
-#if (defined SLJIT_VERBOSE && SLJIT_VERBOSE) || (defined SLJIT_DEBUG && SLJIT_DEBUG)
-	if (SLJIT_UNLIKELY(compiler->skip_checks)) {
-		compiler->skip_checks = 0;
-		return;
-	}
-#endif
-
-	SLJIT_ASSERT(!(type & ~(0xff | SLJIT_REWRITABLE_JUMP)));
-	SLJIT_ASSERT((type & 0xff) >= SLJIT_C_EQUAL && (type & 0xff) <= SLJIT_CALL3);
-#if (defined SLJIT_VERBOSE && SLJIT_VERBOSE)
-	if (SLJIT_UNLIKELY(!!compiler->verbose))
-		fprintf(compiler->verbose, "  jump%s.%s\n", !(type & SLJIT_REWRITABLE_JUMP) ? "" : ".r", jump_names[type & 0xff]);
-#endif
-}
-
-static SLJIT_INLINE void check_sljit_emit_cmp(struct sljit_compiler *compiler, sljit_si type,
-	sljit_si src1, sljit_sw src1w,
-	sljit_si src2, sljit_sw src2w)
-{
-	SLJIT_UNUSED_ARG(compiler);
-	SLJIT_UNUSED_ARG(type);
-	SLJIT_UNUSED_ARG(src1);
-	SLJIT_UNUSED_ARG(src1w);
-	SLJIT_UNUSED_ARG(src2);
-	SLJIT_UNUSED_ARG(src2w);
-
-	SLJIT_ASSERT(!(type & ~(0xff | SLJIT_REWRITABLE_JUMP | SLJIT_INT_OP)));
-	SLJIT_ASSERT((type & 0xff) >= SLJIT_C_EQUAL && (type & 0xff) <= SLJIT_C_SIG_LESS_EQUAL);
-#if (defined SLJIT_DEBUG && SLJIT_DEBUG)
-	FUNCTION_CHECK_SRC(src1, src1w);
-	FUNCTION_CHECK_SRC(src2, src2w);
-#endif
-#if (defined SLJIT_VERBOSE && SLJIT_VERBOSE)
-	if (SLJIT_UNLIKELY(!!compiler->verbose)) {
-		fprintf(compiler->verbose, "  %scmp%s.%s ", !(type & SLJIT_INT_OP) ? "" : "i", !(type & SLJIT_REWRITABLE_JUMP) ? "" : ".r", jump_names[type & 0xff]);
-		sljit_verbose_param(src1, src1w);
-		fprintf(compiler->verbose, ", ");
-		sljit_verbose_param(src2, src2w);
-		fprintf(compiler->verbose, "\n");
-	}
-#endif
-}
-
-static SLJIT_INLINE void check_sljit_emit_fcmp(struct sljit_compiler *compiler, sljit_si type,
-	sljit_si src1, sljit_sw src1w,
-	sljit_si src2, sljit_sw src2w)
-{
-	SLJIT_UNUSED_ARG(compiler);
-	SLJIT_UNUSED_ARG(type);
-	SLJIT_UNUSED_ARG(src1);
-	SLJIT_UNUSED_ARG(src1w);
-	SLJIT_UNUSED_ARG(src2);
-	SLJIT_UNUSED_ARG(src2w);
-
-	SLJIT_ASSERT(sljit_is_fpu_available());
-	SLJIT_ASSERT(!(type & ~(0xff | SLJIT_REWRITABLE_JUMP | SLJIT_SINGLE_OP)));
-	SLJIT_ASSERT((type & 0xff) >= SLJIT_C_FLOAT_EQUAL && (type & 0xff) <= SLJIT_C_FLOAT_ORDERED);
-#if (defined SLJIT_DEBUG && SLJIT_DEBUG)
-	FUNCTION_FCHECK(src1, src1w);
-	FUNCTION_FCHECK(src2, src2w);
-#endif
-#if (defined SLJIT_VERBOSE && SLJIT_VERBOSE)
-	if (SLJIT_UNLIKELY(!!compiler->verbose)) {
-		fprintf(compiler->verbose, "  %scmp%s.%s ", (type & SLJIT_SINGLE_OP) ? "s" : "d",
-			!(type & SLJIT_REWRITABLE_JUMP) ? "" : ".r", jump_names[type & 0xff]);
-		sljit_verbose_fparam(src1, src1w);
-		fprintf(compiler->verbose, ", ");
-		sljit_verbose_fparam(src2, src2w);
-		fprintf(compiler->verbose, "\n");
-	}
-#endif
-}
-
-static SLJIT_INLINE void check_sljit_emit_ijump(struct sljit_compiler *compiler, sljit_si type, sljit_si src, sljit_sw srcw)
-{
-	/* If debug and verbose are disabled, all arguments are unused. */
-	SLJIT_UNUSED_ARG(compiler);
-	SLJIT_UNUSED_ARG(type);
-	SLJIT_UNUSED_ARG(src);
-	SLJIT_UNUSED_ARG(srcw);
-
-#if (defined SLJIT_VERBOSE && SLJIT_VERBOSE) || (defined SLJIT_DEBUG && SLJIT_DEBUG)
-	if (SLJIT_UNLIKELY(compiler->skip_checks)) {
-		compiler->skip_checks = 0;
-		return;
-	}
-#endif
-
-	SLJIT_ASSERT(type >= SLJIT_JUMP && type <= SLJIT_CALL3);
-#if (defined SLJIT_DEBUG && SLJIT_DEBUG)
-	FUNCTION_CHECK_SRC(src, srcw);
-#endif
-#if (defined SLJIT_VERBOSE && SLJIT_VERBOSE)
-	if (SLJIT_UNLIKELY(!!compiler->verbose)) {
-		fprintf(compiler->verbose, "  ijump.%s ", jump_names[type]);
-		sljit_verbose_param(src, srcw);
-		fprintf(compiler->verbose, "\n");
-	}
-#endif
-}
-
-static SLJIT_INLINE void check_sljit_emit_op_flags(struct sljit_compiler *compiler, sljit_si op,
-	sljit_si dst, sljit_sw dstw,
-	sljit_si src, sljit_sw srcw,
-	sljit_si type)
-{
-	/* If debug and verbose are disabled, all arguments are unused. */
-	SLJIT_UNUSED_ARG(compiler);
-	SLJIT_UNUSED_ARG(op);
-	SLJIT_UNUSED_ARG(dst);
-	SLJIT_UNUSED_ARG(dstw);
-	SLJIT_UNUSED_ARG(src);
-	SLJIT_UNUSED_ARG(srcw);
-	SLJIT_UNUSED_ARG(type);
-
-	SLJIT_ASSERT(type >= SLJIT_C_EQUAL && type < SLJIT_JUMP);
-	SLJIT_ASSERT(op == SLJIT_MOV || GET_OPCODE(op) == SLJIT_MOV_UI || GET_OPCODE(op) == SLJIT_MOV_SI
-		|| (GET_OPCODE(op) >= SLJIT_AND && GET_OPCODE(op) <= SLJIT_XOR));
-	SLJIT_ASSERT((op & (SLJIT_SET_U | SLJIT_SET_S | SLJIT_SET_O | SLJIT_SET_C)) == 0);
-	SLJIT_ASSERT((op & (SLJIT_SET_E | SLJIT_KEEP_FLAGS)) != (SLJIT_SET_E | SLJIT_KEEP_FLAGS));
-#if (defined SLJIT_DEBUG && SLJIT_DEBUG)
-	if (GET_OPCODE(op) < SLJIT_ADD) {
-		SLJIT_ASSERT(src == SLJIT_UNUSED && srcw == 0);
-	} else {
-		SLJIT_ASSERT(src == dst && srcw == dstw);
-	}
-	FUNCTION_CHECK_DST(dst, dstw);
-#endif
-#if (defined SLJIT_VERBOSE && SLJIT_VERBOSE)
-	if (SLJIT_UNLIKELY(!!compiler->verbose)) {
-		fprintf(compiler->verbose, "  %sflags.%s%s%s ", !(op & SLJIT_INT_OP) ? "" : "i",
-			op_names[GET_OPCODE(op)], !(op & SLJIT_SET_E) ? "" : ".e", !(op & SLJIT_KEEP_FLAGS) ? "" : ".k");
-		sljit_verbose_param(dst, dstw);
-		if (src != SLJIT_UNUSED) {
-			fprintf(compiler->verbose, ", ");
-			sljit_verbose_param(src, srcw);
-		}
-		fprintf(compiler->verbose, ", %s\n", jump_names[type]);
-	}
-#endif
-}
-
-static SLJIT_INLINE void check_sljit_get_local_base(struct sljit_compiler *compiler, sljit_si dst, sljit_sw dstw, sljit_sw offset)
-{
-	SLJIT_UNUSED_ARG(compiler);
-	SLJIT_UNUSED_ARG(dst);
-	SLJIT_UNUSED_ARG(dstw);
-	SLJIT_UNUSED_ARG(offset);
-
-#if (defined SLJIT_DEBUG && SLJIT_DEBUG)
-	FUNCTION_CHECK_DST(dst, dstw);
-#endif
-#if (defined SLJIT_VERBOSE && SLJIT_VERBOSE)
-	if (SLJIT_UNLIKELY(!!compiler->verbose)) {
-		fprintf(compiler->verbose, "  local_base ");
-		sljit_verbose_param(dst, dstw);
-		fprintf(compiler->verbose, ", #%" SLJIT_PRINT_D "d\n", offset);
-	}
-#endif
-}
-
-static SLJIT_INLINE void check_sljit_emit_const(struct sljit_compiler *compiler, sljit_si dst, sljit_sw dstw, sljit_sw init_value)
-{
-	/* If debug and verbose are disabled, all arguments are unused. */
-	SLJIT_UNUSED_ARG(compiler);
-	SLJIT_UNUSED_ARG(dst);
-	SLJIT_UNUSED_ARG(dstw);
-	SLJIT_UNUSED_ARG(init_value);
-
-#if (defined SLJIT_DEBUG && SLJIT_DEBUG)
-	FUNCTION_CHECK_DST(dst, dstw);
-#endif
-#if (defined SLJIT_VERBOSE && SLJIT_VERBOSE)
-	if (SLJIT_UNLIKELY(!!compiler->verbose)) {
-		fprintf(compiler->verbose, "  const ");
-		sljit_verbose_param(dst, dstw);
-		fprintf(compiler->verbose, ", #%" SLJIT_PRINT_D "d\n", init_value);
-	}
-#endif
-}
-
-static SLJIT_INLINE sljit_si emit_mov_before_return(struct sljit_compiler *compiler, sljit_si op, sljit_si src, sljit_sw srcw)
-{
-	/* Return if don't need to do anything. */
-	if (op == SLJIT_UNUSED)
-		return SLJIT_SUCCESS;
-
-#if (defined SLJIT_64BIT_ARCHITECTURE && SLJIT_64BIT_ARCHITECTURE)
-	/* At the moment the pointer size is always equal to sljit_sw. May be changed in the future. */
-	if (src == SLJIT_RETURN_REG && (op == SLJIT_MOV || op == SLJIT_MOV_P))
-		return SLJIT_SUCCESS;
-#else
-	if (src == SLJIT_RETURN_REG && (op == SLJIT_MOV || op == SLJIT_MOV_UI || op == SLJIT_MOV_SI || op == SLJIT_MOV_P))
-		return SLJIT_SUCCESS;
-#endif
-
-#if (defined SLJIT_VERBOSE && SLJIT_VERBOSE) || (defined SLJIT_DEBUG && SLJIT_DEBUG)
-	compiler->skip_checks = 1;
-#endif
-	return sljit_emit_op1(compiler, op, SLJIT_RETURN_REG, 0, src, srcw);
-}
-
-/* CPU description section */
-
-#if (defined SLJIT_32BIT_ARCHITECTURE && SLJIT_32BIT_ARCHITECTURE)
-#define SLJIT_CPUINFO_PART1 " 32bit ("
-#elif (defined SLJIT_64BIT_ARCHITECTURE && SLJIT_64BIT_ARCHITECTURE)
-#define SLJIT_CPUINFO_PART1 " 64bit ("
-#else
-#error "Internal error: CPU type info missing"
-#endif
-
-#if (defined SLJIT_LITTLE_ENDIAN && SLJIT_LITTLE_ENDIAN)
-#define SLJIT_CPUINFO_PART2 "little endian + "
-#elif (defined SLJIT_BIG_ENDIAN && SLJIT_BIG_ENDIAN)
-#define SLJIT_CPUINFO_PART2 "big endian + "
-#else
-#error "Internal error: CPU type info missing"
-#endif
-
-#if (defined SLJIT_UNALIGNED && SLJIT_UNALIGNED)
-#define SLJIT_CPUINFO_PART3 "unaligned)"
-#else
-#define SLJIT_CPUINFO_PART3 "aligned)"
-#endif
-
-#define SLJIT_CPUINFO SLJIT_CPUINFO_PART1 SLJIT_CPUINFO_PART2 SLJIT_CPUINFO_PART3
-
-#if (defined SLJIT_CONFIG_X86_32 && SLJIT_CONFIG_X86_32)
-#	include "sljitNativeX86_common.c"
-#elif (defined SLJIT_CONFIG_X86_64 && SLJIT_CONFIG_X86_64)
-#	include "sljitNativeX86_common.c"
-#elif (defined SLJIT_CONFIG_ARM_V5 && SLJIT_CONFIG_ARM_V5)
-#	include "sljitNativeARM_32.c"
-#elif (defined SLJIT_CONFIG_ARM_V7 && SLJIT_CONFIG_ARM_V7)
-#	include "sljitNativeARM_32.c"
-#elif (defined SLJIT_CONFIG_ARM_THUMB2 && SLJIT_CONFIG_ARM_THUMB2)
-#	include "sljitNativeARM_T2_32.c"
-#elif (defined SLJIT_CONFIG_ARM_64 && SLJIT_CONFIG_ARM_64)
-#	include "sljitNativeARM_64.c"
-#elif (defined SLJIT_CONFIG_PPC_32 && SLJIT_CONFIG_PPC_32)
-#	include "sljitNativePPC_common.c"
-#elif (defined SLJIT_CONFIG_PPC_64 && SLJIT_CONFIG_PPC_64)
-#	include "sljitNativePPC_common.c"
-#elif (defined SLJIT_CONFIG_MIPS_32 && SLJIT_CONFIG_MIPS_32)
-#	include "sljitNativeMIPS_common.c"
-#elif (defined SLJIT_CONFIG_MIPS_64 && SLJIT_CONFIG_MIPS_64)
-#	include "sljitNativeMIPS_common.c"
-#elif (defined SLJIT_CONFIG_SPARC_32 && SLJIT_CONFIG_SPARC_32)
-#	include "sljitNativeSPARC_common.c"
-#elif (defined SLJIT_CONFIG_TILEGX && SLJIT_CONFIG_TILEGX)
-#	include "sljitNativeTILEGX_64.c"
-#endif
-
-#if !(defined SLJIT_CONFIG_MIPS_32 && SLJIT_CONFIG_MIPS_32) && !(defined SLJIT_CONFIG_MIPS_64 && SLJIT_CONFIG_MIPS_64)
-
-SLJIT_API_FUNC_ATTRIBUTE struct sljit_jump* sljit_emit_cmp(struct sljit_compiler *compiler, sljit_si type,
-	sljit_si src1, sljit_sw src1w,
-	sljit_si src2, sljit_sw src2w)
-{
-	/* Default compare for most architectures. */
-	sljit_si flags, tmp_src, condition;
-	sljit_sw tmp_srcw;
-
-	CHECK_ERROR_PTR();
-	check_sljit_emit_cmp(compiler, type, src1, src1w, src2, src2w);
-
-	condition = type & 0xff;
-#if (defined SLJIT_CONFIG_ARM_64 && SLJIT_CONFIG_ARM_64)
-	if ((condition == SLJIT_C_EQUAL || condition == SLJIT_C_NOT_EQUAL)) {
-		if ((src1 & SLJIT_IMM) && !src1w) {
-			src1 = src2;
-			src1w = src2w;
-			src2 = SLJIT_IMM;
-			src2w = 0;
-		}
-		if ((src2 & SLJIT_IMM) && !src2w)
-			return emit_cmp_to0(compiler, type, src1, src1w);
-	}
-#endif
-
-	if (SLJIT_UNLIKELY((src1 & SLJIT_IMM) && !(src2 & SLJIT_IMM))) {
-		/* Immediate is prefered as second argument by most architectures. */
-		switch (condition) {
-		case SLJIT_C_LESS:
-			condition = SLJIT_C_GREATER;
-			break;
-		case SLJIT_C_GREATER_EQUAL:
-			condition = SLJIT_C_LESS_EQUAL;
-			break;
-		case SLJIT_C_GREATER:
-			condition = SLJIT_C_LESS;
-			break;
-		case SLJIT_C_LESS_EQUAL:
-			condition = SLJIT_C_GREATER_EQUAL;
-			break;
-		case SLJIT_C_SIG_LESS:
-			condition = SLJIT_C_SIG_GREATER;
-			break;
-		case SLJIT_C_SIG_GREATER_EQUAL:
-			condition = SLJIT_C_SIG_LESS_EQUAL;
-			break;
-		case SLJIT_C_SIG_GREATER:
-			condition = SLJIT_C_SIG_LESS;
-			break;
-		case SLJIT_C_SIG_LESS_EQUAL:
-			condition = SLJIT_C_SIG_GREATER_EQUAL;
-			break;
-		}
-		type = condition | (type & (SLJIT_INT_OP | SLJIT_REWRITABLE_JUMP));
-		tmp_src = src1;
-		src1 = src2;
-		src2 = tmp_src;
-		tmp_srcw = src1w;
-		src1w = src2w;
-		src2w = tmp_srcw;
-	}
-
-	if (condition <= SLJIT_C_NOT_ZERO)
-		flags = SLJIT_SET_E;
-	else if (condition <= SLJIT_C_LESS_EQUAL)
-		flags = SLJIT_SET_U;
-	else
-		flags = SLJIT_SET_S;
-
-#if (defined SLJIT_VERBOSE && SLJIT_VERBOSE) || (defined SLJIT_DEBUG && SLJIT_DEBUG)
-	compiler->skip_checks = 1;
-#endif
-	PTR_FAIL_IF(sljit_emit_op2(compiler, SLJIT_SUB | flags | (type & SLJIT_INT_OP),
-		SLJIT_UNUSED, 0, src1, src1w, src2, src2w));
-#if (defined SLJIT_VERBOSE && SLJIT_VERBOSE) || (defined SLJIT_DEBUG && SLJIT_DEBUG)
-	compiler->skip_checks = 1;
-#endif
-	return sljit_emit_jump(compiler, condition | (type & SLJIT_REWRITABLE_JUMP));
-}
-
-SLJIT_API_FUNC_ATTRIBUTE struct sljit_jump* sljit_emit_fcmp(struct sljit_compiler *compiler, sljit_si type,
-	sljit_si src1, sljit_sw src1w,
-	sljit_si src2, sljit_sw src2w)
-{
-	sljit_si flags, condition;
-
-	check_sljit_emit_fcmp(compiler, type, src1, src1w, src2, src2w);
-
-	condition = type & 0xff;
-	flags = (condition <= SLJIT_C_FLOAT_NOT_EQUAL) ? SLJIT_SET_E : SLJIT_SET_S;
-	if (type & SLJIT_SINGLE_OP)
-		flags |= SLJIT_SINGLE_OP;
-
-#if (defined SLJIT_VERBOSE && SLJIT_VERBOSE) || (defined SLJIT_DEBUG && SLJIT_DEBUG)
-	compiler->skip_checks = 1;
-#endif
-	sljit_emit_fop1(compiler, SLJIT_CMPD | flags, src1, src1w, src2, src2w);
-
-#if (defined SLJIT_VERBOSE && SLJIT_VERBOSE) || (defined SLJIT_DEBUG && SLJIT_DEBUG)
-	compiler->skip_checks = 1;
-#endif
-	return sljit_emit_jump(compiler, condition | (type & SLJIT_REWRITABLE_JUMP));
-}
-
-#endif
-
-#if !(defined SLJIT_CONFIG_X86_32 && SLJIT_CONFIG_X86_32) && !(defined SLJIT_CONFIG_X86_64 && SLJIT_CONFIG_X86_64)
-
-SLJIT_API_FUNC_ATTRIBUTE sljit_si sljit_get_local_base(struct sljit_compiler *compiler, sljit_si dst, sljit_sw dstw, sljit_sw offset)
-{
-	CHECK_ERROR();
-	check_sljit_get_local_base(compiler, dst, dstw, offset);
-
-	ADJUST_LOCAL_OFFSET(SLJIT_MEM1(SLJIT_LOCALS_REG), offset);
-#if (defined SLJIT_VERBOSE && SLJIT_VERBOSE) || (defined SLJIT_DEBUG && SLJIT_DEBUG)
-	compiler->skip_checks = 1;
-#endif
-	if (offset != 0)
-		return sljit_emit_op2(compiler, SLJIT_ADD | SLJIT_KEEP_FLAGS, dst, dstw, SLJIT_LOCALS_REG, 0, SLJIT_IMM, offset);
-	return sljit_emit_op1(compiler, SLJIT_MOV, dst, dstw, SLJIT_LOCALS_REG, 0);
-}
-
-#endif
-
-#else /* SLJIT_CONFIG_UNSUPPORTED */
-
-/* Empty function bodies for those machines, which are not (yet) supported. */
-
-SLJIT_API_FUNC_ATTRIBUTE SLJIT_CONST char* sljit_get_platform_name(void)
-{
-	return "unsupported";
-}
-
-SLJIT_API_FUNC_ATTRIBUTE struct sljit_compiler* sljit_create_compiler(void)
-{
-	SLJIT_ASSERT_STOP();
-	return NULL;
-}
-
-SLJIT_API_FUNC_ATTRIBUTE void sljit_free_compiler(struct sljit_compiler *compiler)
-{
-	SLJIT_UNUSED_ARG(compiler);
-	SLJIT_ASSERT_STOP();
-}
-
-SLJIT_API_FUNC_ATTRIBUTE void* sljit_alloc_memory(struct sljit_compiler *compiler, sljit_si size)
-{
-	SLJIT_UNUSED_ARG(compiler);
-	SLJIT_UNUSED_ARG(size);
-	SLJIT_ASSERT_STOP();
-	return NULL;
-}
-
-#if (defined SLJIT_VERBOSE && SLJIT_VERBOSE)
-SLJIT_API_FUNC_ATTRIBUTE void sljit_compiler_verbose(struct sljit_compiler *compiler, FILE* verbose)
-{
-	SLJIT_UNUSED_ARG(compiler);
-	SLJIT_UNUSED_ARG(verbose);
-	SLJIT_ASSERT_STOP();
-}
-#endif
-
-SLJIT_API_FUNC_ATTRIBUTE void* sljit_generate_code(struct sljit_compiler *compiler)
-{
-	SLJIT_UNUSED_ARG(compiler);
-	SLJIT_ASSERT_STOP();
-	return NULL;
-}
-
-SLJIT_API_FUNC_ATTRIBUTE void sljit_free_code(void* code)
-{
-	SLJIT_UNUSED_ARG(code);
-	SLJIT_ASSERT_STOP();
-}
-
-SLJIT_API_FUNC_ATTRIBUTE sljit_si sljit_emit_enter(struct sljit_compiler *compiler, sljit_si args, sljit_si scratches, sljit_si saveds, sljit_si local_size)
-{
-	SLJIT_UNUSED_ARG(compiler);
-	SLJIT_UNUSED_ARG(args);
-	SLJIT_UNUSED_ARG(scratches);
-	SLJIT_UNUSED_ARG(saveds);
-	SLJIT_UNUSED_ARG(local_size);
-	SLJIT_ASSERT_STOP();
-	return SLJIT_ERR_UNSUPPORTED;
-}
-
-SLJIT_API_FUNC_ATTRIBUTE void sljit_set_context(struct sljit_compiler *compiler, sljit_si args, sljit_si scratches, sljit_si saveds, sljit_si local_size)
-{
-	SLJIT_UNUSED_ARG(compiler);
-	SLJIT_UNUSED_ARG(args);
-	SLJIT_UNUSED_ARG(scratches);
-	SLJIT_UNUSED_ARG(saveds);
-	SLJIT_UNUSED_ARG(local_size);
-	SLJIT_ASSERT_STOP();
-}
-
-SLJIT_API_FUNC_ATTRIBUTE sljit_si sljit_emit_return(struct sljit_compiler *compiler, sljit_si op, sljit_si src, sljit_sw srcw)
-{
-	SLJIT_UNUSED_ARG(compiler);
-	SLJIT_UNUSED_ARG(op);
-	SLJIT_UNUSED_ARG(src);
-	SLJIT_UNUSED_ARG(srcw);
-	SLJIT_ASSERT_STOP();
-	return SLJIT_ERR_UNSUPPORTED;
-}
-
-SLJIT_API_FUNC_ATTRIBUTE sljit_si sljit_emit_fast_enter(struct sljit_compiler *compiler, sljit_si dst, sljit_sw dstw)
-{
-	SLJIT_UNUSED_ARG(compiler);
-	SLJIT_UNUSED_ARG(dst);
-	SLJIT_UNUSED_ARG(dstw);
-	SLJIT_ASSERT_STOP();
-	return SLJIT_ERR_UNSUPPORTED;
-}
-
-SLJIT_API_FUNC_ATTRIBUTE sljit_si sljit_emit_fast_return(struct sljit_compiler *compiler, sljit_si src, sljit_sw srcw)
-{
-	SLJIT_UNUSED_ARG(compiler);
-	SLJIT_UNUSED_ARG(src);
-	SLJIT_UNUSED_ARG(srcw);
-	SLJIT_ASSERT_STOP();
-	return SLJIT_ERR_UNSUPPORTED;
-}
-
-SLJIT_API_FUNC_ATTRIBUTE sljit_si sljit_emit_op0(struct sljit_compiler *compiler, sljit_si op)
-{
-	SLJIT_UNUSED_ARG(compiler);
-	SLJIT_UNUSED_ARG(op);
-	SLJIT_ASSERT_STOP();
-	return SLJIT_ERR_UNSUPPORTED;
-}
-
-SLJIT_API_FUNC_ATTRIBUTE sljit_si sljit_emit_op1(struct sljit_compiler *compiler, sljit_si op,
-	sljit_si dst, sljit_sw dstw,
-	sljit_si src, sljit_sw srcw)
-{
-	SLJIT_UNUSED_ARG(compiler);
-	SLJIT_UNUSED_ARG(op);
-	SLJIT_UNUSED_ARG(dst);
-	SLJIT_UNUSED_ARG(dstw);
-	SLJIT_UNUSED_ARG(src);
-	SLJIT_UNUSED_ARG(srcw);
-	SLJIT_ASSERT_STOP();
-	return SLJIT_ERR_UNSUPPORTED;
-}
-
-SLJIT_API_FUNC_ATTRIBUTE sljit_si sljit_emit_op2(struct sljit_compiler *compiler, sljit_si op,
-	sljit_si dst, sljit_sw dstw,
-	sljit_si src1, sljit_sw src1w,
-	sljit_si src2, sljit_sw src2w)
-{
-	SLJIT_UNUSED_ARG(compiler);
-	SLJIT_UNUSED_ARG(op);
-	SLJIT_UNUSED_ARG(dst);
-	SLJIT_UNUSED_ARG(dstw);
-	SLJIT_UNUSED_ARG(src1);
-	SLJIT_UNUSED_ARG(src1w);
-	SLJIT_UNUSED_ARG(src2);
-	SLJIT_UNUSED_ARG(src2w);
-	SLJIT_ASSERT_STOP();
-	return SLJIT_ERR_UNSUPPORTED;
-}
-
-SLJIT_API_FUNC_ATTRIBUTE sljit_si sljit_get_register_index(sljit_si reg)
-{
-	SLJIT_ASSERT_STOP();
-	return reg;
-}
-
-SLJIT_API_FUNC_ATTRIBUTE sljit_si sljit_emit_op_custom(struct sljit_compiler *compiler,
-	void *instruction, sljit_si size)
-{
-	SLJIT_UNUSED_ARG(compiler);
-	SLJIT_UNUSED_ARG(instruction);
-	SLJIT_UNUSED_ARG(size);
-	SLJIT_ASSERT_STOP();
-	return SLJIT_ERR_UNSUPPORTED;
-}
-
-SLJIT_API_FUNC_ATTRIBUTE sljit_si sljit_is_fpu_available(void)
-{
-	SLJIT_ASSERT_STOP();
-	return 0;
-}
-
-SLJIT_API_FUNC_ATTRIBUTE sljit_si sljit_emit_fop1(struct sljit_compiler *compiler, sljit_si op,
-	sljit_si dst, sljit_sw dstw,
-	sljit_si src, sljit_sw srcw)
-{
-	SLJIT_UNUSED_ARG(compiler);
-	SLJIT_UNUSED_ARG(op);
-	SLJIT_UNUSED_ARG(dst);
-	SLJIT_UNUSED_ARG(dstw);
-	SLJIT_UNUSED_ARG(src);
-	SLJIT_UNUSED_ARG(srcw);
-	SLJIT_ASSERT_STOP();
-	return SLJIT_ERR_UNSUPPORTED;
-}
-
-SLJIT_API_FUNC_ATTRIBUTE sljit_si sljit_emit_fop2(struct sljit_compiler *compiler, sljit_si op,
-	sljit_si dst, sljit_sw dstw,
-	sljit_si src1, sljit_sw src1w,
-	sljit_si src2, sljit_sw src2w)
-{
-	SLJIT_UNUSED_ARG(compiler);
-	SLJIT_UNUSED_ARG(op);
-	SLJIT_UNUSED_ARG(dst);
-	SLJIT_UNUSED_ARG(dstw);
-	SLJIT_UNUSED_ARG(src1);
-	SLJIT_UNUSED_ARG(src1w);
-	SLJIT_UNUSED_ARG(src2);
-	SLJIT_UNUSED_ARG(src2w);
-	SLJIT_ASSERT_STOP();
-	return SLJIT_ERR_UNSUPPORTED;
-}
-
-SLJIT_API_FUNC_ATTRIBUTE struct sljit_label* sljit_emit_label(struct sljit_compiler *compiler)
-{
-	SLJIT_UNUSED_ARG(compiler);
-	SLJIT_ASSERT_STOP();
-	return NULL;
-}
-
-SLJIT_API_FUNC_ATTRIBUTE struct sljit_jump* sljit_emit_jump(struct sljit_compiler *compiler, sljit_si type)
-{
-	SLJIT_UNUSED_ARG(compiler);
-	SLJIT_UNUSED_ARG(type);
-	SLJIT_ASSERT_STOP();
-	return NULL;
-}
-
-SLJIT_API_FUNC_ATTRIBUTE struct sljit_jump* sljit_emit_cmp(struct sljit_compiler *compiler, sljit_si type,
-	sljit_si src1, sljit_sw src1w,
-	sljit_si src2, sljit_sw src2w)
-{
-	SLJIT_UNUSED_ARG(compiler);
-	SLJIT_UNUSED_ARG(type);
-	SLJIT_UNUSED_ARG(src1);
-	SLJIT_UNUSED_ARG(src1w);
-	SLJIT_UNUSED_ARG(src2);
-	SLJIT_UNUSED_ARG(src2w);
-	SLJIT_ASSERT_STOP();
-	return NULL;
-}
-
-SLJIT_API_FUNC_ATTRIBUTE struct sljit_jump* sljit_emit_fcmp(struct sljit_compiler *compiler, sljit_si type,
-	sljit_si src1, sljit_sw src1w,
-	sljit_si src2, sljit_sw src2w)
-{
-	SLJIT_UNUSED_ARG(compiler);
-	SLJIT_UNUSED_ARG(type);
-	SLJIT_UNUSED_ARG(src1);
-	SLJIT_UNUSED_ARG(src1w);
-	SLJIT_UNUSED_ARG(src2);
-	SLJIT_UNUSED_ARG(src2w);
-	SLJIT_ASSERT_STOP();
-	return NULL;
-}
-
-SLJIT_API_FUNC_ATTRIBUTE void sljit_set_label(struct sljit_jump *jump, struct sljit_label* label)
-{
-	SLJIT_UNUSED_ARG(jump);
-	SLJIT_UNUSED_ARG(label);
-	SLJIT_ASSERT_STOP();
-}
-
-SLJIT_API_FUNC_ATTRIBUTE void sljit_set_target(struct sljit_jump *jump, sljit_uw target)
-{
-	SLJIT_UNUSED_ARG(jump);
-	SLJIT_UNUSED_ARG(target);
-	SLJIT_ASSERT_STOP();
-}
-
-SLJIT_API_FUNC_ATTRIBUTE sljit_si sljit_emit_ijump(struct sljit_compiler *compiler, sljit_si type, sljit_si src, sljit_sw srcw)
-{
-	SLJIT_UNUSED_ARG(compiler);
-	SLJIT_UNUSED_ARG(type);
-	SLJIT_UNUSED_ARG(src);
-	SLJIT_UNUSED_ARG(srcw);
-	SLJIT_ASSERT_STOP();
-	return SLJIT_ERR_UNSUPPORTED;
-}
-
-SLJIT_API_FUNC_ATTRIBUTE sljit_si sljit_emit_op_flags(struct sljit_compiler *compiler, sljit_si op,
-	sljit_si dst, sljit_sw dstw,
-	sljit_si src, sljit_sw srcw,
-	sljit_si type)
-{
-	SLJIT_UNUSED_ARG(compiler);
-	SLJIT_UNUSED_ARG(op);
-	SLJIT_UNUSED_ARG(dst);
-	SLJIT_UNUSED_ARG(dstw);
-	SLJIT_UNUSED_ARG(src);
-	SLJIT_UNUSED_ARG(srcw);
-	SLJIT_UNUSED_ARG(type);
-	SLJIT_ASSERT_STOP();
-	return SLJIT_ERR_UNSUPPORTED;
-}
-
-SLJIT_API_FUNC_ATTRIBUTE sljit_si sljit_get_local_base(struct sljit_compiler *compiler, sljit_si dst, sljit_sw dstw, sljit_sw offset)
-{
-	SLJIT_UNUSED_ARG(compiler);
-	SLJIT_UNUSED_ARG(dst);
-	SLJIT_UNUSED_ARG(dstw);
-	SLJIT_UNUSED_ARG(offset);
-	SLJIT_ASSERT_STOP();
-	return SLJIT_ERR_UNSUPPORTED;
-}
-
-SLJIT_API_FUNC_ATTRIBUTE struct sljit_const* sljit_emit_const(struct sljit_compiler *compiler, sljit_si dst, sljit_sw dstw, sljit_sw initval)
-{
-	SLJIT_UNUSED_ARG(compiler);
-	SLJIT_UNUSED_ARG(dst);
-	SLJIT_UNUSED_ARG(dstw);
-	SLJIT_UNUSED_ARG(initval);
-	SLJIT_ASSERT_STOP();
-	return NULL;
-}
-
-SLJIT_API_FUNC_ATTRIBUTE void sljit_set_jump_addr(sljit_uw addr, sljit_uw new_addr)
-{
-	SLJIT_UNUSED_ARG(addr);
-	SLJIT_UNUSED_ARG(new_addr);
-	SLJIT_ASSERT_STOP();
-}
-
-SLJIT_API_FUNC_ATTRIBUTE void sljit_set_const(sljit_uw addr, sljit_sw new_constant)
-{
-	SLJIT_UNUSED_ARG(addr);
-	SLJIT_UNUSED_ARG(new_constant);
-	SLJIT_ASSERT_STOP();
-}
-
-#endif
diff --git a/src/extra/pcre/sljit/sljitLir.h b/src/extra/pcre/sljit/sljitLir.h
deleted file mode 100644
index e2cd218..0000000
--- a/src/extra/pcre/sljit/sljitLir.h
+++ /dev/null
@@ -1,1001 +0,0 @@
-/*
- *    Stack-less Just-In-Time compiler
- *
- *    Copyright 2009-2012 Zoltan Herczeg (hzmester at freemail.hu). All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without modification, are
- * permitted provided that the following conditions are met:
- *
- *   1. Redistributions of source code must retain the above copyright notice, this list of
- *      conditions and the following disclaimer.
- *
- *   2. Redistributions in binary form must reproduce the above copyright notice, this list
- *      of conditions and the following disclaimer in the documentation and/or other materials
- *      provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER(S) AND CONTRIBUTORS ``AS IS'' AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
- * SHALL THE COPYRIGHT HOLDER(S) OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
- * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
- * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
- * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef _SLJIT_LIR_H_
-#define _SLJIT_LIR_H_
-
-/*
-   ------------------------------------------------------------------------
-    Stack-Less JIT compiler for multiple architectures (x86, ARM, PowerPC)
-   ------------------------------------------------------------------------
-
-   Short description
-    Advantages:
-      - The execution can be continued from any LIR instruction. In other
-        words, it is possible to jump to any label from anywhere, even from
-        a code fragment, which is compiled later, if both compiled code
-        shares the same context. See sljit_emit_enter for more details
-      - Supports self modifying code: target of (conditional) jump and call
-        instructions and some constant values can be dynamically modified
-        during runtime
-        - although it is not suggested to do it frequently
-        - can be used for inline caching: save an important value once
-          in the instruction stream
-        - since this feature limits the optimization possibilities, a
-          special flag must be passed at compile time when these
-          instructions are emitted
-      - A fixed stack space can be allocated for local variables
-      - The compiler is thread-safe
-      - The compiler is highly configurable through preprocessor macros.
-        You can disable unneeded features (multithreading in single
-        threaded applications), and you can use your own system functions
-        (including memory allocators). See sljitConfig.h
-    Disadvantages:
-      - No automatic register allocation, and temporary results are
-        not stored on the stack. (hence the name comes)
-      - Limited number of registers (only 6+4 integer registers, max 3+2
-        scratch, max 3+2 saved and 6 floating point registers)
-    In practice:
-      - This approach is very effective for interpreters
-        - One of the saved registers typically points to a stack interface
-        - It can jump to any exception handler anytime (even if it belongs
-          to another function)
-        - Hot paths can be modified during runtime reflecting the changes
-          of the fastest execution path of the dynamic language
-        - SLJIT supports complex memory addressing modes
-        - mainly position and context independent code (except some cases)
-
-    For valgrind users:
-      - pass --smc-check=all argument to valgrind, since JIT is a "self-modifying code"
-*/
-
-#if !(defined SLJIT_NO_DEFAULT_CONFIG && SLJIT_NO_DEFAULT_CONFIG)
-#include "sljitConfig.h"
-#endif
-
-/* The following header file defines useful macros for fine tuning
-sljit based code generators. They are listed in the beginning
-of sljitConfigInternal.h */
-
-#include "sljitConfigInternal.h"
-
-/* --------------------------------------------------------------------- */
-/*  Error codes                                                          */
-/* --------------------------------------------------------------------- */
-
-/* Indicates no error. */
-#define SLJIT_SUCCESS			0
-/* After the call of sljit_generate_code(), the error code of the compiler
-   is set to this value to avoid future sljit calls (in debug mode at least).
-   The complier should be freed after sljit_generate_code(). */
-#define SLJIT_ERR_COMPILED		1
-/* Cannot allocate non executable memory. */
-#define SLJIT_ERR_ALLOC_FAILED		2
-/* Cannot allocate executable memory.
-   Only for sljit_generate_code() */
-#define SLJIT_ERR_EX_ALLOC_FAILED	3
-/* return value for SLJIT_CONFIG_UNSUPPORTED empty architecture. */
-#define SLJIT_ERR_UNSUPPORTED		4
-
-/* --------------------------------------------------------------------- */
-/*  Registers                                                            */
-/* --------------------------------------------------------------------- */
-
-#define SLJIT_UNUSED		0
-
-/* Scratch (temporary) registers whose may not preserve their values
-   across function calls. */
-#define SLJIT_SCRATCH_REG1	1
-#define SLJIT_SCRATCH_REG2	2
-#define SLJIT_SCRATCH_REG3	3
-/* Note: extra registers cannot be used for memory addressing. */
-/* Note: on x86-32, these registers are emulated (using stack
-   loads & stores). */
-#define SLJIT_TEMPORARY_EREG1	4
-#define SLJIT_TEMPORARY_EREG2	5
-
-/* Saved registers whose preserve their values across function calls. */
-#define SLJIT_SAVED_REG1	6
-#define SLJIT_SAVED_REG2	7
-#define SLJIT_SAVED_REG3	8
-/* Note: extra registers cannot be used for memory addressing. */
-/* Note: on x86-32, these registers are emulated (using stack
-   loads & stores). */
-#define SLJIT_SAVED_EREG1	9
-#define SLJIT_SAVED_EREG2	10
-
-/* Read-only register (cannot be the destination of an operation).
-   Only SLJIT_MEM1(SLJIT_LOCALS_REG) addressing mode is allowed since
-   several ABIs has certain limitations about the stack layout. However
-   sljit_get_local_base() can be used to obtain the offset of a value
-   on the stack. */
-#define SLJIT_LOCALS_REG	11
-
-/* Number of registers. */
-#define SLJIT_NO_TMP_REGISTERS	5
-#define SLJIT_NO_GEN_REGISTERS	5
-#define SLJIT_NO_REGISTERS	11
-
-/* Return with machine word. */
-
-#define SLJIT_RETURN_REG	SLJIT_SCRATCH_REG1
-
-/* x86 prefers specific registers for special purposes. In case of shift
-   by register it supports only SLJIT_SCRATCH_REG3 for shift argument
-   (which is the src2 argument of sljit_emit_op2). If another register is
-   used, sljit must exchange data between registers which cause a minor
-   slowdown. Other architectures has no such limitation. */
-
-#define SLJIT_PREF_SHIFT_REG	SLJIT_SCRATCH_REG3
-
-/* --------------------------------------------------------------------- */
-/*  Floating point registers                                             */
-/* --------------------------------------------------------------------- */
-
-/* Note: SLJIT_UNUSED as destination is not valid for floating point
-     operations, since they cannot be used for setting flags. */
-
-/* Floating point operations are performed on double or
-   single precision values. */
-
-#define SLJIT_FLOAT_REG1		1
-#define SLJIT_FLOAT_REG2		2
-#define SLJIT_FLOAT_REG3		3
-#define SLJIT_FLOAT_REG4		4
-#define SLJIT_FLOAT_REG5		5
-#define SLJIT_FLOAT_REG6		6
-
-#define SLJIT_NO_FLOAT_REGISTERS	6
-
-/* --------------------------------------------------------------------- */
-/*  Main structures and functions                                        */
-/* --------------------------------------------------------------------- */
-
-struct sljit_memory_fragment {
-	struct sljit_memory_fragment *next;
-	sljit_uw used_size;
-	/* Must be aligned to sljit_sw. */
-	sljit_ub memory[1];
-};
-
-struct sljit_label {
-	struct sljit_label *next;
-	sljit_uw addr;
-	/* The maximum size difference. */
-	sljit_uw size;
-};
-
-struct sljit_jump {
-	struct sljit_jump *next;
-	sljit_uw addr;
-	sljit_sw flags;
-	union {
-		sljit_uw target;
-		struct sljit_label* label;
-	} u;
-};
-
-struct sljit_const {
-	struct sljit_const *next;
-	sljit_uw addr;
-};
-
-struct sljit_compiler {
-	sljit_si error;
-
-	struct sljit_label *labels;
-	struct sljit_jump *jumps;
-	struct sljit_const *consts;
-	struct sljit_label *last_label;
-	struct sljit_jump *last_jump;
-	struct sljit_const *last_const;
-
-	struct sljit_memory_fragment *buf;
-	struct sljit_memory_fragment *abuf;
-
-	/* Used local registers. */
-	sljit_si scratches;
-	/* Used saved registers. */
-	sljit_si saveds;
-	/* Local stack size. */
-	sljit_si local_size;
-	/* Code size. */
-	sljit_uw size;
-	/* For statistical purposes. */
-	sljit_uw executable_size;
-
-#if (defined SLJIT_CONFIG_X86_32 && SLJIT_CONFIG_X86_32)
-	sljit_si args;
-	sljit_si locals_offset;
-	sljit_si scratches_start;
-	sljit_si saveds_start;
-#endif
-
-#if (defined SLJIT_CONFIG_X86_64 && SLJIT_CONFIG_X86_64)
-	sljit_si mode32;
-#endif
-
-#if (defined SLJIT_CONFIG_X86_32 && SLJIT_CONFIG_X86_32) || (defined SLJIT_CONFIG_X86_64 && SLJIT_CONFIG_X86_64)
-	sljit_si flags_saved;
-#endif
-
-#if (defined SLJIT_CONFIG_ARM_V5 && SLJIT_CONFIG_ARM_V5)
-	/* Constant pool handling. */
-	sljit_uw *cpool;
-	sljit_ub *cpool_unique;
-	sljit_uw cpool_diff;
-	sljit_uw cpool_fill;
-	/* Other members. */
-	/* Contains pointer, "ldr pc, [...]" pairs. */
-	sljit_uw patches;
-#endif
-
-#if (defined SLJIT_CONFIG_ARM_V5 && SLJIT_CONFIG_ARM_V5) || (defined SLJIT_CONFIG_ARM_V7 && SLJIT_CONFIG_ARM_V7)
-	/* Temporary fields. */
-	sljit_uw shift_imm;
-	sljit_si cache_arg;
-	sljit_sw cache_argw;
-#endif
-
-#if (defined SLJIT_CONFIG_ARM_THUMB2 && SLJIT_CONFIG_ARM_THUMB2)
-	sljit_si cache_arg;
-	sljit_sw cache_argw;
-#endif
-
-#if (defined SLJIT_CONFIG_ARM_64 && SLJIT_CONFIG_ARM_64)
-	sljit_si locals_offset;
-	sljit_si cache_arg;
-	sljit_sw cache_argw;
-#endif
-
-#if (defined SLJIT_CONFIG_PPC_32 && SLJIT_CONFIG_PPC_32) || (defined SLJIT_CONFIG_PPC_64 && SLJIT_CONFIG_PPC_64)
-	sljit_sw imm;
-	sljit_si cache_arg;
-	sljit_sw cache_argw;
-#endif
-
-#if (defined SLJIT_CONFIG_MIPS_32 && SLJIT_CONFIG_MIPS_32) || (defined SLJIT_CONFIG_MIPS_64 && SLJIT_CONFIG_MIPS_64)
-	sljit_si delay_slot;
-	sljit_si cache_arg;
-	sljit_sw cache_argw;
-#endif
-
-#if (defined SLJIT_CONFIG_SPARC_32 && SLJIT_CONFIG_SPARC_32)
-	sljit_si delay_slot;
-	sljit_si cache_arg;
-	sljit_sw cache_argw;
-#endif
-
-#if (defined SLJIT_CONFIG_TILEGX && SLJIT_CONFIG_TILEGX)
-	sljit_si cache_arg;
-	sljit_sw cache_argw;
-#endif
-
-#if (defined SLJIT_VERBOSE && SLJIT_VERBOSE)
-	FILE* verbose;
-#endif
-
-#if (defined SLJIT_DEBUG && SLJIT_DEBUG)
-	/* Local size passed to the functions. */
-	sljit_si logical_local_size;
-#endif
-
-#if (defined SLJIT_VERBOSE && SLJIT_VERBOSE) || (defined SLJIT_DEBUG && SLJIT_DEBUG)
-	sljit_si skip_checks;
-#endif
-};
-
-/* --------------------------------------------------------------------- */
-/*  Main functions                                                       */
-/* --------------------------------------------------------------------- */
-
-/* Creates an sljit compiler.
-   Returns NULL if failed. */
-SLJIT_API_FUNC_ATTRIBUTE struct sljit_compiler* sljit_create_compiler(void);
-
-/* Free everything except the compiled machine code. */
-SLJIT_API_FUNC_ATTRIBUTE void sljit_free_compiler(struct sljit_compiler *compiler);
-
-/* Returns the current error code. If an error is occurred, future sljit
-   calls which uses the same compiler argument returns early with the same
-   error code. Thus there is no need for checking the error after every
-   call, it is enough to do it before the code is compiled. Removing
-   these checks increases the performance of the compiling process. */
-static SLJIT_INLINE sljit_si sljit_get_compiler_error(struct sljit_compiler *compiler) { return compiler->error; }
-
-/*
-   Allocate a small amount of memory. The size must be <= 64 bytes on 32 bit,
-   and <= 128 bytes on 64 bit architectures. The memory area is owned by the
-   compiler, and freed by sljit_free_compiler. The returned pointer is
-   sizeof(sljit_sw) aligned. Excellent for allocating small blocks during
-   the compiling, and no need to worry about freeing them. The size is
-   enough to contain at most 16 pointers. If the size is outside of the range,
-   the function will return with NULL. However, this return value does not
-   indicate that there is no more memory (does not set the current error code
-   of the compiler to out-of-memory status).
-*/
-SLJIT_API_FUNC_ATTRIBUTE void* sljit_alloc_memory(struct sljit_compiler *compiler, sljit_si size);
-
-#if (defined SLJIT_VERBOSE && SLJIT_VERBOSE)
-/* Passing NULL disables verbose. */
-SLJIT_API_FUNC_ATTRIBUTE void sljit_compiler_verbose(struct sljit_compiler *compiler, FILE* verbose);
-#endif
-
-SLJIT_API_FUNC_ATTRIBUTE void* sljit_generate_code(struct sljit_compiler *compiler);
-SLJIT_API_FUNC_ATTRIBUTE void sljit_free_code(void* code);
-
-/*
-   After the machine code generation is finished we can retrieve the allocated
-   executable memory size, although this area may not be fully filled with
-   instructions depending on some optimizations. This function is useful only
-   for statistical purposes.
-
-   Before a successful code generation, this function returns with 0.
-*/
-static SLJIT_INLINE sljit_uw sljit_get_generated_code_size(struct sljit_compiler *compiler) { return compiler->executable_size; }
-
-/* Instruction generation. Returns with any error code. If there is no
-   error, they return with SLJIT_SUCCESS. */
-
-/*
-   The executable code is basically a function call from the viewpoint of
-   the C language. The function calls must obey to the ABI (Application
-   Binary Interface) of the platform, which specify the purpose of machine
-   registers and stack handling among other things. The sljit_emit_enter
-   function emits the necessary instructions for setting up a new context
-   for the executable code and moves function arguments to the saved
-   registers. The number of arguments are specified in the "args"
-   parameter and the first argument goes to SLJIT_SAVED_REG1, the second
-   goes to SLJIT_SAVED_REG2 and so on. The number of scratch and
-   saved registers are passed in "scratches" and "saveds" arguments
-   respectively. Since the saved registers contains the arguments,
-   "args" must be less or equal than "saveds". The sljit_emit_enter
-   is also capable of allocating a stack space for local variables. The
-   "local_size" argument contains the size in bytes of this local area
-   and its staring address is stored in SLJIT_LOCALS_REG. However
-   the SLJIT_LOCALS_REG is not necessary the machine stack pointer.
-   The memory bytes between SLJIT_LOCALS_REG (inclusive) and
-   SLJIT_LOCALS_REG + local_size (exclusive) can be modified freely
-   until the function returns. The stack space is uninitialized.
-
-   Note: every call of sljit_emit_enter and sljit_set_context
-         overwrites the previous context. */
-
-#define SLJIT_MAX_LOCAL_SIZE	65536
-
-SLJIT_API_FUNC_ATTRIBUTE sljit_si sljit_emit_enter(struct sljit_compiler *compiler,
-	sljit_si args, sljit_si scratches, sljit_si saveds, sljit_si local_size);
-
-/* The machine code has a context (which contains the local stack space size,
-   number of used registers, etc.) which initialized by sljit_emit_enter. Several
-   functions (like sljit_emit_return) requres this context to be able to generate
-   the appropriate code. However, some code fragments (like inline cache) may have
-   no normal entry point so their context is unknown for the compiler. Using the
-   function below we can specify their context.
-
-   Note: every call of sljit_emit_enter and sljit_set_context overwrites
-         the previous context. */
-
-SLJIT_API_FUNC_ATTRIBUTE void sljit_set_context(struct sljit_compiler *compiler,
-	sljit_si args, sljit_si scratches, sljit_si saveds, sljit_si local_size);
-
-/* Return from machine code.  The op argument can be SLJIT_UNUSED which means the
-   function does not return with anything or any opcode between SLJIT_MOV and
-   SLJIT_MOV_P (see sljit_emit_op1). As for src and srcw they must be 0 if op
-   is SLJIT_UNUSED, otherwise see below the description about source and
-   destination arguments. */
-
-SLJIT_API_FUNC_ATTRIBUTE sljit_si sljit_emit_return(struct sljit_compiler *compiler, sljit_si op,
-	sljit_si src, sljit_sw srcw);
-
-/* Fast calling mechanism for utility functions (see SLJIT_FAST_CALL). All registers and
-   even the stack frame is passed to the callee. The return address is preserved in
-   dst/dstw by sljit_emit_fast_enter (the type of the value stored by this function
-   is sljit_p), and sljit_emit_fast_return can use this as a return value later. */
-
-/* Note: only for sljit specific, non ABI compilant calls. Fast, since only a few machine
-   instructions are needed. Excellent for small uility functions, where saving registers
-   and setting up a new stack frame would cost too much performance. However, it is still
-   possible to return to the address of the caller (or anywhere else). */
-
-/* Note: flags are not changed (unlike sljit_emit_enter / sljit_emit_return). */
-
-/* Note: although sljit_emit_fast_return could be replaced by an ijump, it is not suggested,
-   since many architectures do clever branch prediction on call / return instruction pairs. */
-
-SLJIT_API_FUNC_ATTRIBUTE sljit_si sljit_emit_fast_enter(struct sljit_compiler *compiler, sljit_si dst, sljit_sw dstw);
-SLJIT_API_FUNC_ATTRIBUTE sljit_si sljit_emit_fast_return(struct sljit_compiler *compiler, sljit_si src, sljit_sw srcw);
-
-/*
-   Source and destination values for arithmetical instructions
-    imm              - a simple immediate value (cannot be used as a destination)
-    reg              - any of the registers (immediate argument must be 0)
-    [imm]            - absolute immediate memory address
-    [reg+imm]        - indirect memory address
-    [reg+(reg<<imm)] - indirect indexed memory address (shift must be between 0 and 3)
-                       useful for (byte, half, int, sljit_sw) array access
-                       (fully supported by both x86 and ARM architectures, and cheap operation on others)
-*/
-
-/*
-   IMPORATNT NOTE: memory access MUST be naturally aligned except
-                   SLJIT_UNALIGNED macro is defined and its value is 1.
-
-     length | alignment
-   ---------+-----------
-     byte   | 1 byte (any physical_address is accepted)
-     half   | 2 byte (physical_address & 0x1 == 0)
-     int    | 4 byte (physical_address & 0x3 == 0)
-     word   | 4 byte if SLJIT_32BIT_ARCHITECTURE is defined and its value is 1
-            | 8 byte if SLJIT_64BIT_ARCHITECTURE is defined and its value is 1
-    pointer | size of sljit_p type (4 byte on 32 bit machines, 4 or 8 byte
-            | on 64 bit machines)
-
-   Note:   Different architectures have different addressing limitations.
-           A single instruction is enough for the following addressing
-           modes. Other adrressing modes are emulated by instruction
-           sequences. This information could help to improve those code
-           generators which focuses only a few architectures.
-
-   x86:    [reg+imm], -2^32+1 <= imm <= 2^32-1 (full address space on x86-32)
-           [reg+(reg<<imm)] is supported
-           [imm], -2^32+1 <= imm <= 2^32-1 is supported
-           Write-back is not supported
-   arm:    [reg+imm], -4095 <= imm <= 4095 or -255 <= imm <= 255 for signed
-                bytes, any halfs or floating point values)
-           [reg+(reg<<imm)] is supported
-           Write-back is supported
-   arm-t2: [reg+imm], -255 <= imm <= 4095
-           [reg+(reg<<imm)] is supported
-           Write back is supported only for [reg+imm], where -255 <= imm <= 255
-   ppc:    [reg+imm], -65536 <= imm <= 65535. 64 bit loads/stores and 32 bit
-                signed load on 64 bit requires immediates divisible by 4.
-                [reg+imm] is not supported for signed 8 bit values.
-           [reg+reg] is supported
-           Write-back is supported except for one instruction: 32 bit signed
-                load with [reg+imm] addressing mode on 64 bit.
-   mips:   [reg+imm], -65536 <= imm <= 65535
-   sparc:  [reg+imm], -4096 <= imm <= 4095
-           [reg+reg] is supported
-*/
-
-/* Register output: simply the name of the register.
-   For destination, you can use SLJIT_UNUSED as well. */
-#define SLJIT_MEM		0x80
-#define SLJIT_MEM0()		(SLJIT_MEM)
-#define SLJIT_MEM1(r1)		(SLJIT_MEM | (r1))
-#define SLJIT_MEM2(r1, r2)	(SLJIT_MEM | (r1) | ((r2) << 8))
-#define SLJIT_IMM		0x40
-
-/* Set 32 bit operation mode (I) on 64 bit CPUs. The flag is totally ignored on
-   32 bit CPUs. If this flag is set for an arithmetic operation, it uses only the
-   lower 32 bit of the input register(s), and set the CPU status flags according
-   to the 32 bit result. The higher 32 bits are undefined for both the input and
-   output. However, the CPU might not ignore those higher 32 bits, like MIPS, which
-   expects it to be the sign extension of the lower 32 bit. All 32 bit operations
-   are undefined, if this condition is not fulfilled. Therefore, when SLJIT_INT_OP
-   is specified, all register arguments must be the result of other operations with
-   the same SLJIT_INT_OP flag. In other words, although a register can hold either
-   a 64 or 32 bit value, these values cannot be mixed. The only exceptions are
-   SLJIT_IMOV and SLJIT_IMOVU (SLJIT_MOV_SI/SLJIT_MOVU_SI with SLJIT_INT_OP flag)
-   which can convert any source argument to SLJIT_INT_OP compatible result. This
-   conversion might be unnecessary on some CPUs like x86-64, since the upper 32
-   bit is always ignored. In this case SLJIT is clever enough to not generate any
-   instructions if the source and destination operands are the same registers.
-   Affects sljit_emit_op0, sljit_emit_op1 and sljit_emit_op2. */
-#define SLJIT_INT_OP		0x100
-
-/* Single precision mode (SP). This flag is similar to SLJIT_INT_OP, just
-   it applies to floating point registers (it is even the same bit). When
-   this flag is passed, the CPU performs single precision floating point
-   operations. Similar to SLJIT_INT_OP, all register arguments must be the
-   result of other floating point operations with this flag. Affects
-   sljit_emit_fop1, sljit_emit_fop2 and sljit_emit_fcmp. */
-#define SLJIT_SINGLE_OP		0x100
-
-/* Common CPU status flags for all architectures (x86, ARM, PPC)
-    - carry flag
-    - overflow flag
-    - zero flag
-    - negative/positive flag (depends on arc)
-   On mips, these flags are emulated by software. */
-
-/* By default, the instructions may, or may not set the CPU status flags.
-   Forcing to set or keep status flags can be done with the following flags: */
-
-/* Note: sljit tries to emit the minimum number of instructions. Using these
-   flags can increase them, so use them wisely to avoid unnecessary code generation. */
-
-/* Set Equal (Zero) status flag (E). */
-#define SLJIT_SET_E			0x0200
-/* Set unsigned status flag (U). */
-#define SLJIT_SET_U			0x0400
-/* Set signed status flag (S). */
-#define SLJIT_SET_S			0x0800
-/* Set signed overflow flag (O). */
-#define SLJIT_SET_O			0x1000
-/* Set carry flag (C).
-   Note: Kinda unsigned overflow, but behaves differently on various cpus. */
-#define SLJIT_SET_C			0x2000
-/* Do not modify the flags (K).
-   Note: This flag cannot be combined with any other SLJIT_SET_* flag. */
-#define SLJIT_KEEP_FLAGS		0x4000
-
-/* Notes:
-     - you cannot postpone conditional jump instructions except if noted that
-       the instruction does not set flags (See: SLJIT_KEEP_FLAGS).
-     - flag combinations: '|' means 'logical or'. */
-
-/* Flags: - (never set any flags)
-   Note: breakpoint instruction is not supported by all architectures (namely ppc)
-         It falls back to SLJIT_NOP in those cases. */
-#define SLJIT_BREAKPOINT		0
-/* Flags: - (never set any flags)
-   Note: may or may not cause an extra cycle wait
-         it can even decrease the runtime in a few cases. */
-#define SLJIT_NOP			1
-/* Flags: - (may destroy flags)
-   Unsigned multiplication of SLJIT_SCRATCH_REG1 and SLJIT_SCRATCH_REG2.
-   Result goes to SLJIT_SCRATCH_REG2:SLJIT_SCRATCH_REG1 (high:low) word */
-#define SLJIT_UMUL			2
-/* Flags: - (may destroy flags)
-   Signed multiplication of SLJIT_SCRATCH_REG1 and SLJIT_SCRATCH_REG2.
-   Result goes to SLJIT_SCRATCH_REG2:SLJIT_SCRATCH_REG1 (high:low) word */
-#define SLJIT_SMUL			3
-/* Flags: I - (may destroy flags)
-   Unsigned divide of the value in SLJIT_SCRATCH_REG1 by the value in SLJIT_SCRATCH_REG2.
-   The result is placed in SLJIT_SCRATCH_REG1 and the remainder goes to SLJIT_SCRATCH_REG2.
-   Note: if SLJIT_SCRATCH_REG2 contains 0, the behaviour is undefined. */
-#define SLJIT_UDIV			4
-#define SLJIT_IUDIV			(SLJIT_UDIV | SLJIT_INT_OP)
-/* Flags: I - (may destroy flags)
-   Signed divide of the value in SLJIT_SCRATCH_REG1 by the value in SLJIT_SCRATCH_REG2.
-   The result is placed in SLJIT_SCRATCH_REG1 and the remainder goes to SLJIT_SCRATCH_REG2.
-   Note: if SLJIT_SCRATCH_REG2 contains 0, the behaviour is undefined. */
-#define SLJIT_SDIV			5
-#define SLJIT_ISDIV			(SLJIT_SDIV | SLJIT_INT_OP)
-
-SLJIT_API_FUNC_ATTRIBUTE sljit_si sljit_emit_op0(struct sljit_compiler *compiler, sljit_si op);
-
-/* Notes for MOV instructions:
-   U = Mov with update (pre form). If source or destination defined as SLJIT_MEM1(r1)
-       or SLJIT_MEM2(r1, r2), r1 is increased by the sum of r2 and the constant argument
-   UB = unsigned byte (8 bit)
-   SB = signed byte (8 bit)
-   UH = unsigned half (16 bit)
-   SH = signed half (16 bit)
-   UI = unsigned int (32 bit)
-   SI = signed int (32 bit)
-   P  = pointer (sljit_p) size */
-
-/* Flags: - (never set any flags) */
-#define SLJIT_MOV			6
-/* Flags: I - (never set any flags) */
-#define SLJIT_MOV_UB			7
-#define SLJIT_IMOV_UB			(SLJIT_MOV_UB | SLJIT_INT_OP)
-/* Flags: I - (never set any flags) */
-#define SLJIT_MOV_SB			8
-#define SLJIT_IMOV_SB			(SLJIT_MOV_SB | SLJIT_INT_OP)
-/* Flags: I - (never set any flags) */
-#define SLJIT_MOV_UH			9
-#define SLJIT_IMOV_UH			(SLJIT_MOV_UH | SLJIT_INT_OP)
-/* Flags: I - (never set any flags) */
-#define SLJIT_MOV_SH			10
-#define SLJIT_IMOV_SH			(SLJIT_MOV_SH | SLJIT_INT_OP)
-/* Flags: I - (never set any flags)
-   Note: see SLJIT_INT_OP for further details. */
-#define SLJIT_MOV_UI			11
-/* No SLJIT_INT_OP form, since it is the same as SLJIT_IMOV. */
-/* Flags: I - (never set any flags)
-   Note: see SLJIT_INT_OP for further details. */
-#define SLJIT_MOV_SI			12
-#define SLJIT_IMOV			(SLJIT_MOV_SI | SLJIT_INT_OP)
-/* Flags: - (never set any flags) */
-#define SLJIT_MOV_P			13
-/* Flags: - (never set any flags) */
-#define SLJIT_MOVU			14
-/* Flags: I - (never set any flags) */
-#define SLJIT_MOVU_UB			15
-#define SLJIT_IMOVU_UB			(SLJIT_MOVU_UB | SLJIT_INT_OP)
-/* Flags: I - (never set any flags) */
-#define SLJIT_MOVU_SB			16
-#define SLJIT_IMOVU_SB			(SLJIT_MOVU_SB | SLJIT_INT_OP)
-/* Flags: I - (never set any flags) */
-#define SLJIT_MOVU_UH			17
-#define SLJIT_IMOVU_UH			(SLJIT_MOVU_UH | SLJIT_INT_OP)
-/* Flags: I - (never set any flags) */
-#define SLJIT_MOVU_SH			18
-#define SLJIT_IMOVU_SH			(SLJIT_MOVU_SH | SLJIT_INT_OP)
-/* Flags: I - (never set any flags)
-   Note: see SLJIT_INT_OP for further details. */
-#define SLJIT_MOVU_UI			19
-/* No SLJIT_INT_OP form, since it is the same as SLJIT_IMOVU. */
-/* Flags: I - (never set any flags)
-   Note: see SLJIT_INT_OP for further details. */
-#define SLJIT_MOVU_SI			20
-#define SLJIT_IMOVU			(SLJIT_MOVU_SI | SLJIT_INT_OP)
-/* Flags: - (never set any flags) */
-#define SLJIT_MOVU_P			21
-/* Flags: I | E | K */
-#define SLJIT_NOT			22
-#define SLJIT_INOT			(SLJIT_NOT | SLJIT_INT_OP)
-/* Flags: I | E | O | K */
-#define SLJIT_NEG			23
-#define SLJIT_INEG			(SLJIT_NEG | SLJIT_INT_OP)
-/* Count leading zeroes
-   Flags: I | E | K
-   Important note! Sparc 32 does not support K flag, since
-   the required popc instruction is introduced only in sparc 64. */
-#define SLJIT_CLZ			24
-#define SLJIT_ICLZ			(SLJIT_CLZ | SLJIT_INT_OP)
-
-SLJIT_API_FUNC_ATTRIBUTE sljit_si sljit_emit_op1(struct sljit_compiler *compiler, sljit_si op,
-	sljit_si dst, sljit_sw dstw,
-	sljit_si src, sljit_sw srcw);
-
-/* Flags: I | E | O | C | K */
-#define SLJIT_ADD			25
-#define SLJIT_IADD			(SLJIT_ADD | SLJIT_INT_OP)
-/* Flags: I | C | K */
-#define SLJIT_ADDC			26
-#define SLJIT_IADDC			(SLJIT_ADDC | SLJIT_INT_OP)
-/* Flags: I | E | U | S | O | C | K */
-#define SLJIT_SUB			27
-#define SLJIT_ISUB			(SLJIT_SUB | SLJIT_INT_OP)
-/* Flags: I | C | K */
-#define SLJIT_SUBC			28
-#define SLJIT_ISUBC			(SLJIT_SUBC | SLJIT_INT_OP)
-/* Note: integer mul
-   Flags: I | O (see SLJIT_C_MUL_*) | K */
-#define SLJIT_MUL			29
-#define SLJIT_IMUL			(SLJIT_MUL | SLJIT_INT_OP)
-/* Flags: I | E | K */
-#define SLJIT_AND			30
-#define SLJIT_IAND			(SLJIT_AND | SLJIT_INT_OP)
-/* Flags: I | E | K */
-#define SLJIT_OR			31
-#define SLJIT_IOR			(SLJIT_OR | SLJIT_INT_OP)
-/* Flags: I | E | K */
-#define SLJIT_XOR			32
-#define SLJIT_IXOR			(SLJIT_XOR | SLJIT_INT_OP)
-/* Flags: I | E | K
-   Let bit_length be the length of the shift operation: 32 or 64.
-   If src2 is immediate, src2w is masked by (bit_length - 1).
-   Otherwise, if the content of src2 is outside the range from 0
-   to bit_length - 1, the operation is undefined. */
-#define SLJIT_SHL			33
-#define SLJIT_ISHL			(SLJIT_SHL | SLJIT_INT_OP)
-/* Flags: I | E | K
-   Let bit_length be the length of the shift operation: 32 or 64.
-   If src2 is immediate, src2w is masked by (bit_length - 1).
-   Otherwise, if the content of src2 is outside the range from 0
-   to bit_length - 1, the operation is undefined. */
-#define SLJIT_LSHR			34
-#define SLJIT_ILSHR			(SLJIT_LSHR | SLJIT_INT_OP)
-/* Flags: I | E | K
-   Let bit_length be the length of the shift operation: 32 or 64.
-   If src2 is immediate, src2w is masked by (bit_length - 1).
-   Otherwise, if the content of src2 is outside the range from 0
-   to bit_length - 1, the operation is undefined. */
-#define SLJIT_ASHR			35
-#define SLJIT_IASHR			(SLJIT_ASHR | SLJIT_INT_OP)
-
-SLJIT_API_FUNC_ATTRIBUTE sljit_si sljit_emit_op2(struct sljit_compiler *compiler, sljit_si op,
-	sljit_si dst, sljit_sw dstw,
-	sljit_si src1, sljit_sw src1w,
-	sljit_si src2, sljit_sw src2w);
-
-/* The following function is a helper function for sljit_emit_op_custom.
-   It returns with the real machine register index of any SLJIT_SCRATCH
-   SLJIT_SAVED or SLJIT_LOCALS register.
-   Note: it returns with -1 for virtual registers (all EREGs on x86-32). */
-
-SLJIT_API_FUNC_ATTRIBUTE sljit_si sljit_get_register_index(sljit_si reg);
-
-/* The following function is a helper function for sljit_emit_op_custom.
-   It returns with the real machine register index of any SLJIT_FLOAT register.
-   Note: the index is divided by 2 on ARM 32 bit architectures. */
-
-SLJIT_API_FUNC_ATTRIBUTE sljit_si sljit_get_float_register_index(sljit_si reg);
-
-/* Any instruction can be inserted into the instruction stream by
-   sljit_emit_op_custom. It has a similar purpose as inline assembly.
-   The size parameter must match to the instruction size of the target
-   architecture:
-
-         x86: 0 < size <= 15. The instruction argument can be byte aligned.
-      Thumb2: if size == 2, the instruction argument must be 2 byte aligned.
-              if size == 4, the instruction argument must be 4 byte aligned.
-   Otherwise: size must be 4 and instruction argument must be 4 byte aligned. */
-
-SLJIT_API_FUNC_ATTRIBUTE sljit_si sljit_emit_op_custom(struct sljit_compiler *compiler,
-	void *instruction, sljit_si size);
-
-/* Returns with non-zero if fpu is available. */
-
-SLJIT_API_FUNC_ATTRIBUTE sljit_si sljit_is_fpu_available(void);
-
-/* Note: dst is the left and src is the right operand for SLJIT_FCMP.
-   Note: NaN check is always performed. If SLJIT_C_FLOAT_UNORDERED is set,
-         the comparison result is unpredictable.
-   Flags: SP | E | S (see SLJIT_C_FLOAT_*) */
-#define SLJIT_CMPD			36
-#define SLJIT_CMPS			(SLJIT_CMPD | SLJIT_SINGLE_OP)
-/* Flags: SP - (never set any flags) */
-#define SLJIT_MOVD			37
-#define SLJIT_MOVS			(SLJIT_MOVD | SLJIT_SINGLE_OP)
-/* Flags: SP - (never set any flags) */
-#define SLJIT_NEGD			38
-#define SLJIT_NEGS			(SLJIT_NEGD | SLJIT_SINGLE_OP)
-/* Flags: SP - (never set any flags) */
-#define SLJIT_ABSD			39
-#define SLJIT_ABSS			(SLJIT_ABSD | SLJIT_SINGLE_OP)
-
-SLJIT_API_FUNC_ATTRIBUTE sljit_si sljit_emit_fop1(struct sljit_compiler *compiler, sljit_si op,
-	sljit_si dst, sljit_sw dstw,
-	sljit_si src, sljit_sw srcw);
-
-/* Flags: SP - (never set any flags) */
-#define SLJIT_ADDD			40
-#define SLJIT_ADDS			(SLJIT_ADDD | SLJIT_SINGLE_OP)
-/* Flags: SP - (never set any flags) */
-#define SLJIT_SUBD			41
-#define SLJIT_SUBS			(SLJIT_SUBD | SLJIT_SINGLE_OP)
-/* Flags: SP - (never set any flags) */
-#define SLJIT_MULD			42
-#define SLJIT_MULS			(SLJIT_MULD | SLJIT_SINGLE_OP)
-/* Flags: SP - (never set any flags) */
-#define SLJIT_DIVD			43
-#define SLJIT_DIVS			(SLJIT_DIVD | SLJIT_SINGLE_OP)
-
-SLJIT_API_FUNC_ATTRIBUTE sljit_si sljit_emit_fop2(struct sljit_compiler *compiler, sljit_si op,
-	sljit_si dst, sljit_sw dstw,
-	sljit_si src1, sljit_sw src1w,
-	sljit_si src2, sljit_sw src2w);
-
-/* Label and jump instructions. */
-
-SLJIT_API_FUNC_ATTRIBUTE struct sljit_label* sljit_emit_label(struct sljit_compiler *compiler);
-
-/* Invert conditional instruction: xor (^) with 0x1 */
-#define SLJIT_C_EQUAL			0
-#define SLJIT_C_ZERO			0
-#define SLJIT_C_NOT_EQUAL		1
-#define SLJIT_C_NOT_ZERO		1
-
-#define SLJIT_C_LESS			2
-#define SLJIT_C_GREATER_EQUAL		3
-#define SLJIT_C_GREATER			4
-#define SLJIT_C_LESS_EQUAL		5
-#define SLJIT_C_SIG_LESS		6
-#define SLJIT_C_SIG_GREATER_EQUAL	7
-#define SLJIT_C_SIG_GREATER		8
-#define SLJIT_C_SIG_LESS_EQUAL		9
-
-#define SLJIT_C_OVERFLOW		10
-#define SLJIT_C_NOT_OVERFLOW		11
-
-#define SLJIT_C_MUL_OVERFLOW		12
-#define SLJIT_C_MUL_NOT_OVERFLOW	13
-
-#define SLJIT_C_FLOAT_EQUAL		14
-#define SLJIT_C_FLOAT_NOT_EQUAL		15
-#define SLJIT_C_FLOAT_LESS		16
-#define SLJIT_C_FLOAT_GREATER_EQUAL	17
-#define SLJIT_C_FLOAT_GREATER		18
-#define SLJIT_C_FLOAT_LESS_EQUAL	19
-#define SLJIT_C_FLOAT_UNORDERED		20
-#define SLJIT_C_FLOAT_ORDERED		21
-
-#define SLJIT_JUMP			22
-#define SLJIT_FAST_CALL			23
-#define SLJIT_CALL0			24
-#define SLJIT_CALL1			25
-#define SLJIT_CALL2			26
-#define SLJIT_CALL3			27
-
-/* Fast calling method. See sljit_emit_fast_enter / sljit_emit_fast_return. */
-
-/* The target can be changed during runtime (see: sljit_set_jump_addr). */
-#define SLJIT_REWRITABLE_JUMP		0x1000
-
-/* Emit a jump instruction. The destination is not set, only the type of the jump.
-    type must be between SLJIT_C_EQUAL and SLJIT_CALL3
-    type can be combined (or'ed) with SLJIT_REWRITABLE_JUMP
-   Flags: - (never set any flags) for both conditional and unconditional jumps.
-   Flags: destroy all flags for calls. */
-SLJIT_API_FUNC_ATTRIBUTE struct sljit_jump* sljit_emit_jump(struct sljit_compiler *compiler, sljit_si type);
-
-/* Basic arithmetic comparison. In most architectures it is implemented as
-   an SLJIT_SUB operation (with SLJIT_UNUSED destination and setting
-   appropriate flags) followed by a sljit_emit_jump. However some
-   architectures (i.e: MIPS) may employ special optimizations here. It is
-   suggested to use this comparison form when appropriate.
-    type must be between SLJIT_C_EQUAL and SLJIT_C_SIG_LESS_EQUAL
-    type can be combined (or'ed) with SLJIT_REWRITABLE_JUMP or SLJIT_INT_OP
-   Flags: destroy flags. */
-SLJIT_API_FUNC_ATTRIBUTE struct sljit_jump* sljit_emit_cmp(struct sljit_compiler *compiler, sljit_si type,
-	sljit_si src1, sljit_sw src1w,
-	sljit_si src2, sljit_sw src2w);
-
-/* Basic floating point comparison. In most architectures it is implemented as
-   an SLJIT_FCMP operation (setting appropriate flags) followed by a
-   sljit_emit_jump. However some architectures (i.e: MIPS) may employ
-   special optimizations here. It is suggested to use this comparison form
-   when appropriate.
-    type must be between SLJIT_C_FLOAT_EQUAL and SLJIT_C_FLOAT_ORDERED
-    type can be combined (or'ed) with SLJIT_REWRITABLE_JUMP and SLJIT_SINGLE_OP
-   Flags: destroy flags.
-   Note: if either operand is NaN, the behaviour is undefined for
-         type <= SLJIT_C_FLOAT_LESS_EQUAL. */
-SLJIT_API_FUNC_ATTRIBUTE struct sljit_jump* sljit_emit_fcmp(struct sljit_compiler *compiler, sljit_si type,
-	sljit_si src1, sljit_sw src1w,
-	sljit_si src2, sljit_sw src2w);
-
-/* Set the destination of the jump to this label. */
-SLJIT_API_FUNC_ATTRIBUTE void sljit_set_label(struct sljit_jump *jump, struct sljit_label* label);
-/* Set the destination address of the jump to this label. */
-SLJIT_API_FUNC_ATTRIBUTE void sljit_set_target(struct sljit_jump *jump, sljit_uw target);
-
-/* Call function or jump anywhere. Both direct and indirect form
-    type must be between SLJIT_JUMP and SLJIT_CALL3
-    Direct form: set src to SLJIT_IMM() and srcw to the address
-    Indirect form: any other valid addressing mode
-   Flags: - (never set any flags) for unconditional jumps.
-   Flags: destroy all flags for calls. */
-SLJIT_API_FUNC_ATTRIBUTE sljit_si sljit_emit_ijump(struct sljit_compiler *compiler, sljit_si type, sljit_si src, sljit_sw srcw);
-
-/* Perform the operation using the conditional flags as the second argument.
-   Type must always be between SLJIT_C_EQUAL and SLJIT_C_FLOAT_ORDERED. The
-   value represented by the type is 1, if the condition represented by the type
-   is fulfilled, and 0 otherwise.
-
-   If op == SLJIT_MOV, SLJIT_MOV_SI, SLJIT_MOV_UI:
-     Set dst to the value represented by the type (0 or 1).
-     Src must be SLJIT_UNUSED, and srcw must be 0
-     Flags: - (never set any flags)
-   If op == SLJIT_OR, op == SLJIT_AND, op == SLJIT_XOR
-     Performs the binary operation using src as the first, and the value
-     represented by type as the second argument.
-     Important note: only dst=src and dstw=srcw is supported at the moment!
-     Flags: I | E | K
-   Note: sljit_emit_op_flags does nothing, if dst is SLJIT_UNUSED (regardless of op). */
-SLJIT_API_FUNC_ATTRIBUTE sljit_si sljit_emit_op_flags(struct sljit_compiler *compiler, sljit_si op,
-	sljit_si dst, sljit_sw dstw,
-	sljit_si src, sljit_sw srcw,
-	sljit_si type);
-
-/* Copies the base address of SLJIT_LOCALS_REG+offset to dst.
-   Flags: - (never set any flags) */
-SLJIT_API_FUNC_ATTRIBUTE sljit_si sljit_get_local_base(struct sljit_compiler *compiler, sljit_si dst, sljit_sw dstw, sljit_sw offset);
-
-/* The constant can be changed runtime (see: sljit_set_const)
-   Flags: - (never set any flags) */
-SLJIT_API_FUNC_ATTRIBUTE struct sljit_const* sljit_emit_const(struct sljit_compiler *compiler, sljit_si dst, sljit_sw dstw, sljit_sw init_value);
-
-/* After the code generation the address for label, jump and const instructions
-   are computed. Since these structures are freed by sljit_free_compiler, the
-   addresses must be preserved by the user program elsewere. */
-static SLJIT_INLINE sljit_uw sljit_get_label_addr(struct sljit_label *label) { return label->addr; }
-static SLJIT_INLINE sljit_uw sljit_get_jump_addr(struct sljit_jump *jump) { return jump->addr; }
-static SLJIT_INLINE sljit_uw sljit_get_const_addr(struct sljit_const *const_) { return const_->addr; }
-
-/* Only the address is required to rewrite the code. */
-SLJIT_API_FUNC_ATTRIBUTE void sljit_set_jump_addr(sljit_uw addr, sljit_uw new_addr);
-SLJIT_API_FUNC_ATTRIBUTE void sljit_set_const(sljit_uw addr, sljit_sw new_constant);
-
-/* --------------------------------------------------------------------- */
-/*  Miscellaneous utility functions                                      */
-/* --------------------------------------------------------------------- */
-
-#define SLJIT_MAJOR_VERSION	0
-#define SLJIT_MINOR_VERSION	91
-
-/* Get the human readable name of the platform. Can be useful on platforms
-   like ARM, where ARM and Thumb2 functions can be mixed, and
-   it is useful to know the type of the code generator. */
-SLJIT_API_FUNC_ATTRIBUTE SLJIT_CONST char* sljit_get_platform_name(void);
-
-/* Portable helper function to get an offset of a member. */
-#define SLJIT_OFFSETOF(base, member) ((sljit_sw)(&((base*)0x10)->member) - 0x10)
-
-#if (defined SLJIT_UTIL_GLOBAL_LOCK && SLJIT_UTIL_GLOBAL_LOCK)
-/* This global lock is useful to compile common functions. */
-SLJIT_API_FUNC_ATTRIBUTE void SLJIT_CALL sljit_grab_lock(void);
-SLJIT_API_FUNC_ATTRIBUTE void SLJIT_CALL sljit_release_lock(void);
-#endif
-
-#if (defined SLJIT_UTIL_STACK && SLJIT_UTIL_STACK)
-
-/* The sljit_stack is a utiliy feature of sljit, which allocates a
-   writable memory region between base (inclusive) and limit (exclusive).
-   Both base and limit is a pointer, and base is always <= than limit.
-   This feature uses the "address space reserve" feature
-   of modern operating systems. Basically we don't need to allocate a
-   huge memory block in one step for the worst case, we can start with
-   a smaller chunk and extend it later. Since the address space is
-   reserved, the data never copied to other regions, thus it is safe
-   to store pointers here. */
-
-/* Note: The base field is aligned to PAGE_SIZE bytes (usually 4k or more).
-   Note: stack growing should not happen in small steps: 4k, 16k or even
-     bigger growth is better.
-   Note: this structure may not be supported by all operating systems.
-     Some kind of fallback mechanism is suggested when SLJIT_UTIL_STACK
-     is not defined. */
-
-struct sljit_stack {
-	/* User data, anything can be stored here.
-	   Starting with the same value as base. */
-	sljit_uw top;
-	/* These members are read only. */
-	sljit_uw base;
-	sljit_uw limit;
-	sljit_uw max_limit;
-};
-
-/* Returns NULL if unsuccessful.
-   Note: limit and max_limit contains the size for stack allocation
-   Note: the top field is initialized to base. */
-SLJIT_API_FUNC_ATTRIBUTE struct sljit_stack* SLJIT_CALL sljit_allocate_stack(sljit_uw limit, sljit_uw max_limit);
-SLJIT_API_FUNC_ATTRIBUTE void SLJIT_CALL sljit_free_stack(struct sljit_stack* stack);
-
-/* Can be used to increase (allocate) or decrease (free) the memory area.
-   Returns with a non-zero value if unsuccessful. If new_limit is greater than
-   max_limit, it will fail. It is very easy to implement a stack data structure,
-   since the growth ratio can be added to the current limit, and sljit_stack_resize
-   will do all the necessary checks. The fields of the stack are not changed if
-   sljit_stack_resize fails. */
-SLJIT_API_FUNC_ATTRIBUTE sljit_sw SLJIT_CALL sljit_stack_resize(struct sljit_stack* stack, sljit_uw new_limit);
-
-#endif /* (defined SLJIT_UTIL_STACK && SLJIT_UTIL_STACK) */
-
-#if !(defined SLJIT_INDIRECT_CALL && SLJIT_INDIRECT_CALL)
-
-/* Get the entry address of a given function. */
-#define SLJIT_FUNC_OFFSET(func_name)	((sljit_sw)func_name)
-
-#else /* !(defined SLJIT_INDIRECT_CALL && SLJIT_INDIRECT_CALL) */
-
-/* All JIT related code should be placed in the same context (library, binary, etc.). */
-
-#define SLJIT_FUNC_OFFSET(func_name)	(*(sljit_sw*)(void*)func_name)
-
-/* For powerpc64, the function pointers point to a context descriptor. */
-struct sljit_function_context {
-	sljit_sw addr;
-	sljit_sw r2;
-	sljit_sw r11;
-};
-
-/* Fill the context arguments using the addr and the function.
-   If func_ptr is NULL, it will not be set to the address of context
-   If addr is NULL, the function address also comes from the func pointer. */
-SLJIT_API_FUNC_ATTRIBUTE void sljit_set_function_context(void** func_ptr, struct sljit_function_context* context, sljit_sw addr, void* func);
-
-#endif /* !(defined SLJIT_INDIRECT_CALL && SLJIT_INDIRECT_CALL) */
-
-#endif /* _SLJIT_LIR_H_ */
diff --git a/src/extra/pcre/sljit/sljitNativePPC_32.c b/src/extra/pcre/sljit/sljitNativePPC_32.c
deleted file mode 100644
index b14b75c..0000000
--- a/src/extra/pcre/sljit/sljitNativePPC_32.c
+++ /dev/null
@@ -1,269 +0,0 @@
-/*
- *    Stack-less Just-In-Time compiler
- *
- *    Copyright 2009-2012 Zoltan Herczeg (hzmester at freemail.hu). All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without modification, are
- * permitted provided that the following conditions are met:
- *
- *   1. Redistributions of source code must retain the above copyright notice, this list of
- *      conditions and the following disclaimer.
- *
- *   2. Redistributions in binary form must reproduce the above copyright notice, this list
- *      of conditions and the following disclaimer in the documentation and/or other materials
- *      provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER(S) AND CONTRIBUTORS ``AS IS'' AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
- * SHALL THE COPYRIGHT HOLDER(S) OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
- * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
- * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
- * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/* ppc 32-bit arch dependent functions. */
-
-static sljit_si load_immediate(struct sljit_compiler *compiler, sljit_si reg, sljit_sw imm)
-{
-	if (imm <= SIMM_MAX && imm >= SIMM_MIN)
-		return push_inst(compiler, ADDI | D(reg) | A(0) | IMM(imm));
-
-	if (!(imm & ~0xffff))
-		return push_inst(compiler, ORI | S(TMP_ZERO) | A(reg) | IMM(imm));
-
-	FAIL_IF(push_inst(compiler, ADDIS | D(reg) | A(0) | IMM(imm >> 16)));
-	return (imm & 0xffff) ? push_inst(compiler, ORI | S(reg) | A(reg) | IMM(imm)) : SLJIT_SUCCESS;
-}
-
-#define INS_CLEAR_LEFT(dst, src, from) \
-	(RLWINM | S(src) | A(dst) | ((from) << 6) | (31 << 1))
-
-static SLJIT_INLINE sljit_si emit_single_op(struct sljit_compiler *compiler, sljit_si op, sljit_si flags,
-	sljit_si dst, sljit_si src1, sljit_si src2)
-{
-	switch (op) {
-	case SLJIT_MOV:
-	case SLJIT_MOV_UI:
-	case SLJIT_MOV_SI:
-	case SLJIT_MOV_P:
-		SLJIT_ASSERT(src1 == TMP_REG1);
-		if (dst != src2)
-			return push_inst(compiler, OR | S(src2) | A(dst) | B(src2));
-		return SLJIT_SUCCESS;
-
-	case SLJIT_MOV_UB:
-	case SLJIT_MOV_SB:
-		SLJIT_ASSERT(src1 == TMP_REG1);
-		if ((flags & (REG_DEST | REG2_SOURCE)) == (REG_DEST | REG2_SOURCE)) {
-			if (op == SLJIT_MOV_SB)
-				return push_inst(compiler, EXTSB | S(src2) | A(dst));
-			return push_inst(compiler, INS_CLEAR_LEFT(dst, src2, 24));
-		}
-		else if ((flags & REG_DEST) && op == SLJIT_MOV_SB)
-			return push_inst(compiler, EXTSB | S(src2) | A(dst));
-		else {
-			SLJIT_ASSERT(dst == src2);
-		}
-		return SLJIT_SUCCESS;
-
-	case SLJIT_MOV_UH:
-	case SLJIT_MOV_SH:
-		SLJIT_ASSERT(src1 == TMP_REG1);
-		if ((flags & (REG_DEST | REG2_SOURCE)) == (REG_DEST | REG2_SOURCE)) {
-			if (op == SLJIT_MOV_SH)
-				return push_inst(compiler, EXTSH | S(src2) | A(dst));
-			return push_inst(compiler, INS_CLEAR_LEFT(dst, src2, 16));
-		}
-		else {
-			SLJIT_ASSERT(dst == src2);
-		}
-		return SLJIT_SUCCESS;
-
-	case SLJIT_NOT:
-		SLJIT_ASSERT(src1 == TMP_REG1);
-		return push_inst(compiler, NOR | RC(flags) | S(src2) | A(dst) | B(src2));
-
-	case SLJIT_NEG:
-		SLJIT_ASSERT(src1 == TMP_REG1);
-		return push_inst(compiler, NEG | OERC(flags) | D(dst) | A(src2));
-
-	case SLJIT_CLZ:
-		SLJIT_ASSERT(src1 == TMP_REG1);
-		return push_inst(compiler, CNTLZW | RC(flags) | S(src2) | A(dst));
-
-	case SLJIT_ADD:
-		if (flags & ALT_FORM1) {
-			/* Flags does not set: BIN_IMM_EXTS unnecessary. */
-			SLJIT_ASSERT(src2 == TMP_REG2);
-			return push_inst(compiler, ADDI | D(dst) | A(src1) | compiler->imm);
-		}
-		if (flags & ALT_FORM2) {
-			/* Flags does not set: BIN_IMM_EXTS unnecessary. */
-			SLJIT_ASSERT(src2 == TMP_REG2);
-			return push_inst(compiler, ADDIS | D(dst) | A(src1) | compiler->imm);
-		}
-		if (flags & ALT_FORM3) {
-			SLJIT_ASSERT(src2 == TMP_REG2);
-			return push_inst(compiler, ADDIC | D(dst) | A(src1) | compiler->imm);
-		}
-		if (flags & ALT_FORM4) {
-			/* Flags does not set: BIN_IMM_EXTS unnecessary. */
-			FAIL_IF(push_inst(compiler, ADDI | D(dst) | A(src1) | (compiler->imm & 0xffff)));
-			return push_inst(compiler, ADDIS | D(dst) | A(dst) | (((compiler->imm >> 16) & 0xffff) + ((compiler->imm >> 15) & 0x1)));
-		}
-		if (!(flags & ALT_SET_FLAGS))
-			return push_inst(compiler, ADD | D(dst) | A(src1) | B(src2));
-		return push_inst(compiler, ADDC | OERC(ALT_SET_FLAGS) | D(dst) | A(src1) | B(src2));
-
-	case SLJIT_ADDC:
-		if (flags & ALT_FORM1) {
-			FAIL_IF(push_inst(compiler, MFXER | D(0)));
-			FAIL_IF(push_inst(compiler, ADDE | D(dst) | A(src1) | B(src2)));
-			return push_inst(compiler, MTXER | S(0));
-		}
-		return push_inst(compiler, ADDE | D(dst) | A(src1) | B(src2));
-
-	case SLJIT_SUB:
-		if (flags & ALT_FORM1) {
-			/* Flags does not set: BIN_IMM_EXTS unnecessary. */
-			SLJIT_ASSERT(src2 == TMP_REG2);
-			return push_inst(compiler, SUBFIC | D(dst) | A(src1) | compiler->imm);
-		}
-		if (flags & (ALT_FORM2 | ALT_FORM3)) {
-			SLJIT_ASSERT(src2 == TMP_REG2);
-			if (flags & ALT_FORM2)
-				FAIL_IF(push_inst(compiler, CMPI | CRD(0) | A(src1) | compiler->imm));
-			if (flags & ALT_FORM3)
-				return push_inst(compiler, CMPLI | CRD(4) | A(src1) | compiler->imm);
-			return SLJIT_SUCCESS;
-		}
-		if (flags & (ALT_FORM4 | ALT_FORM5)) {
-			if (flags & ALT_FORM4)
-				FAIL_IF(push_inst(compiler, CMPL | CRD(4) | A(src1) | B(src2)));
-			if (flags & ALT_FORM5)
-				FAIL_IF(push_inst(compiler, CMP | CRD(0) | A(src1) | B(src2)));
-			return SLJIT_SUCCESS;
-		}
-		if (!(flags & ALT_SET_FLAGS))
-			return push_inst(compiler, SUBF | D(dst) | A(src2) | B(src1));
-		if (flags & ALT_FORM6)
-			FAIL_IF(push_inst(compiler, CMPL | CRD(4) | A(src1) | B(src2)));
-		return push_inst(compiler, SUBFC | OERC(ALT_SET_FLAGS) | D(dst) | A(src2) | B(src1));
-
-	case SLJIT_SUBC:
-		if (flags & ALT_FORM1) {
-			FAIL_IF(push_inst(compiler, MFXER | D(0)));
-			FAIL_IF(push_inst(compiler, SUBFE | D(dst) | A(src2) | B(src1)));
-			return push_inst(compiler, MTXER | S(0));
-		}
-		return push_inst(compiler, SUBFE | D(dst) | A(src2) | B(src1));
-
-	case SLJIT_MUL:
-		if (flags & ALT_FORM1) {
-			SLJIT_ASSERT(src2 == TMP_REG2);
-			return push_inst(compiler, MULLI | D(dst) | A(src1) | compiler->imm);
-		}
-		return push_inst(compiler, MULLW | OERC(flags) | D(dst) | A(src2) | B(src1));
-
-	case SLJIT_AND:
-		if (flags & ALT_FORM1) {
-			SLJIT_ASSERT(src2 == TMP_REG2);
-			return push_inst(compiler, ANDI | S(src1) | A(dst) | compiler->imm);
-		}
-		if (flags & ALT_FORM2) {
-			SLJIT_ASSERT(src2 == TMP_REG2);
-			return push_inst(compiler, ANDIS | S(src1) | A(dst) | compiler->imm);
-		}
-		return push_inst(compiler, AND | RC(flags) | S(src1) | A(dst) | B(src2));
-
-	case SLJIT_OR:
-		if (flags & ALT_FORM1) {
-			SLJIT_ASSERT(src2 == TMP_REG2);
-			return push_inst(compiler, ORI | S(src1) | A(dst) | compiler->imm);
-		}
-		if (flags & ALT_FORM2) {
-			SLJIT_ASSERT(src2 == TMP_REG2);
-			return push_inst(compiler, ORIS | S(src1) | A(dst) | compiler->imm);
-		}
-		if (flags & ALT_FORM3) {
-			SLJIT_ASSERT(src2 == TMP_REG2);
-			FAIL_IF(push_inst(compiler, ORI | S(src1) | A(dst) | IMM(compiler->imm)));
-			return push_inst(compiler, ORIS | S(dst) | A(dst) | IMM(compiler->imm >> 16));
-		}
-		return push_inst(compiler, OR | RC(flags) | S(src1) | A(dst) | B(src2));
-
-	case SLJIT_XOR:
-		if (flags & ALT_FORM1) {
-			SLJIT_ASSERT(src2 == TMP_REG2);
-			return push_inst(compiler, XORI | S(src1) | A(dst) | compiler->imm);
-		}
-		if (flags & ALT_FORM2) {
-			SLJIT_ASSERT(src2 == TMP_REG2);
-			return push_inst(compiler, XORIS | S(src1) | A(dst) | compiler->imm);
-		}
-		if (flags & ALT_FORM3) {
-			SLJIT_ASSERT(src2 == TMP_REG2);
-			FAIL_IF(push_inst(compiler, XORI | S(src1) | A(dst) | IMM(compiler->imm)));
-			return push_inst(compiler, XORIS | S(dst) | A(dst) | IMM(compiler->imm >> 16));
-		}
-		return push_inst(compiler, XOR | RC(flags) | S(src1) | A(dst) | B(src2));
-
-	case SLJIT_SHL:
-		if (flags & ALT_FORM1) {
-			SLJIT_ASSERT(src2 == TMP_REG2);
-			compiler->imm &= 0x1f;
-			return push_inst(compiler, RLWINM | RC(flags) | S(src1) | A(dst) | (compiler->imm << 11) | ((31 - compiler->imm) << 1));
-		}
-		return push_inst(compiler, SLW | RC(flags) | S(src1) | A(dst) | B(src2));
-
-	case SLJIT_LSHR:
-		if (flags & ALT_FORM1) {
-			SLJIT_ASSERT(src2 == TMP_REG2);
-			compiler->imm &= 0x1f;
-			return push_inst(compiler, RLWINM | RC(flags) | S(src1) | A(dst) | (((32 - compiler->imm) & 0x1f) << 11) | (compiler->imm << 6) | (31 << 1));
-		}
-		return push_inst(compiler, SRW | RC(flags) | S(src1) | A(dst) | B(src2));
-
-	case SLJIT_ASHR:
-		if (flags & ALT_FORM3)
-			FAIL_IF(push_inst(compiler, MFXER | D(0)));
-		if (flags & ALT_FORM1) {
-			SLJIT_ASSERT(src2 == TMP_REG2);
-			compiler->imm &= 0x1f;
-			FAIL_IF(push_inst(compiler, SRAWI | RC(flags) | S(src1) | A(dst) | (compiler->imm << 11)));
-		}
-		else
-			FAIL_IF(push_inst(compiler, SRAW | RC(flags) | S(src1) | A(dst) | B(src2)));
-		return (flags & ALT_FORM3) ? push_inst(compiler, MTXER | S(0)) : SLJIT_SUCCESS;
-	}
-
-	SLJIT_ASSERT_STOP();
-	return SLJIT_SUCCESS;
-}
-
-static SLJIT_INLINE sljit_si emit_const(struct sljit_compiler *compiler, sljit_si reg, sljit_sw init_value)
-{
-	FAIL_IF(push_inst(compiler, ADDIS | D(reg) | A(0) | IMM(init_value >> 16)));
-	return push_inst(compiler, ORI | S(reg) | A(reg) | IMM(init_value));
-}
-
-SLJIT_API_FUNC_ATTRIBUTE void sljit_set_jump_addr(sljit_uw addr, sljit_uw new_addr)
-{
-	sljit_ins *inst = (sljit_ins*)addr;
-
-	inst[0] = (inst[0] & 0xffff0000) | ((new_addr >> 16) & 0xffff);
-	inst[1] = (inst[1] & 0xffff0000) | (new_addr & 0xffff);
-	SLJIT_CACHE_FLUSH(inst, inst + 2);
-}
-
-SLJIT_API_FUNC_ATTRIBUTE void sljit_set_const(sljit_uw addr, sljit_sw new_constant)
-{
-	sljit_ins *inst = (sljit_ins*)addr;
-
-	inst[0] = (inst[0] & 0xffff0000) | ((new_constant >> 16) & 0xffff);
-	inst[1] = (inst[1] & 0xffff0000) | (new_constant & 0xffff);
-	SLJIT_CACHE_FLUSH(inst, inst + 2);
-}
diff --git a/src/extra/pcre/sljit/sljitNativePPC_64.c b/src/extra/pcre/sljit/sljitNativePPC_64.c
deleted file mode 100644
index 182ac7b..0000000
--- a/src/extra/pcre/sljit/sljitNativePPC_64.c
+++ /dev/null
@@ -1,421 +0,0 @@
-/*
- *    Stack-less Just-In-Time compiler
- *
- *    Copyright 2009-2012 Zoltan Herczeg (hzmester at freemail.hu). All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without modification, are
- * permitted provided that the following conditions are met:
- *
- *   1. Redistributions of source code must retain the above copyright notice, this list of
- *      conditions and the following disclaimer.
- *
- *   2. Redistributions in binary form must reproduce the above copyright notice, this list
- *      of conditions and the following disclaimer in the documentation and/or other materials
- *      provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER(S) AND CONTRIBUTORS ``AS IS'' AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
- * SHALL THE COPYRIGHT HOLDER(S) OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
- * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
- * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
- * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/* ppc 64-bit arch dependent functions. */
-
-#if defined(__GNUC__) || (defined(__IBM_GCC_ASM) && __IBM_GCC_ASM)
-#define ASM_SLJIT_CLZ(src, dst) \
-	__asm__ volatile ( "cntlzd %0, %1" : "=r"(dst) : "r"(src) )
-#elif defined(__xlc__)
-#error "Please enable GCC syntax for inline assembly statements"
-#else
-#error "Must implement count leading zeroes"
-#endif
-
-#define RLDI(dst, src, sh, mb, type) \
-	(HI(30) | S(src) | A(dst) | ((type) << 2) | (((sh) & 0x1f) << 11) | (((sh) & 0x20) >> 4) | (((mb) & 0x1f) << 6) | ((mb) & 0x20))
-
-#define PUSH_RLDICR(reg, shift) \
-	push_inst(compiler, RLDI(reg, reg, 63 - shift, shift, 1))
-
-static sljit_si load_immediate(struct sljit_compiler *compiler, sljit_si reg, sljit_sw imm)
-{
-	sljit_uw tmp;
-	sljit_uw shift;
-	sljit_uw tmp2;
-	sljit_uw shift2;
-
-	if (imm <= SIMM_MAX && imm >= SIMM_MIN)
-		return push_inst(compiler, ADDI | D(reg) | A(0) | IMM(imm));
-
-	if (!(imm & ~0xffff))
-		return push_inst(compiler, ORI | S(TMP_ZERO) | A(reg) | IMM(imm));
-
-	if (imm <= 0x7fffffffl && imm >= -0x80000000l) {
-		FAIL_IF(push_inst(compiler, ADDIS | D(reg) | A(0) | IMM(imm >> 16)));
-		return (imm & 0xffff) ? push_inst(compiler, ORI | S(reg) | A(reg) | IMM(imm)) : SLJIT_SUCCESS;
-	}
-
-	/* Count leading zeroes. */
-	tmp = (imm >= 0) ? imm : ~imm;
-	ASM_SLJIT_CLZ(tmp, shift);
-	SLJIT_ASSERT(shift > 0);
-	shift--;
-	tmp = (imm << shift);
-
-	if ((tmp & ~0xffff000000000000ul) == 0) {
-		FAIL_IF(push_inst(compiler, ADDI | D(reg) | A(0) | IMM(tmp >> 48)));
-		shift += 15;
-		return PUSH_RLDICR(reg, shift);
-	}
-
-	if ((tmp & ~0xffffffff00000000ul) == 0) {
-		FAIL_IF(push_inst(compiler, ADDIS | D(reg) | A(0) | IMM(tmp >> 48)));
-		FAIL_IF(push_inst(compiler, ORI | S(reg) | A(reg) | IMM(tmp >> 32)));
-		shift += 31;
-		return PUSH_RLDICR(reg, shift);
-	}
-
-	/* Cut out the 16 bit from immediate. */
-	shift += 15;
-	tmp2 = imm & ((1ul << (63 - shift)) - 1);
-
-	if (tmp2 <= 0xffff) {
-		FAIL_IF(push_inst(compiler, ADDI | D(reg) | A(0) | IMM(tmp >> 48)));
-		FAIL_IF(PUSH_RLDICR(reg, shift));
-		return push_inst(compiler, ORI | S(reg) | A(reg) | tmp2);
-	}
-
-	if (tmp2 <= 0xffffffff) {
-		FAIL_IF(push_inst(compiler, ADDI | D(reg) | A(0) | IMM(tmp >> 48)));
-		FAIL_IF(PUSH_RLDICR(reg, shift));
-		FAIL_IF(push_inst(compiler, ORIS | S(reg) | A(reg) | (tmp2 >> 16)));
-		return (imm & 0xffff) ? push_inst(compiler, ORI | S(reg) | A(reg) | IMM(tmp2)) : SLJIT_SUCCESS;
-	}
-
-	ASM_SLJIT_CLZ(tmp2, shift2);
-	tmp2 <<= shift2;
-
-	if ((tmp2 & ~0xffff000000000000ul) == 0) {
-		FAIL_IF(push_inst(compiler, ADDI | D(reg) | A(0) | IMM(tmp >> 48)));
-		shift2 += 15;
-		shift += (63 - shift2);
-		FAIL_IF(PUSH_RLDICR(reg, shift));
-		FAIL_IF(push_inst(compiler, ORI | S(reg) | A(reg) | (tmp2 >> 48)));
-		return PUSH_RLDICR(reg, shift2);
-	}
-
-	/* The general version. */
-	FAIL_IF(push_inst(compiler, ADDIS | D(reg) | A(0) | IMM(imm >> 48)));
-	FAIL_IF(push_inst(compiler, ORI | S(reg) | A(reg) | IMM(imm >> 32)));
-	FAIL_IF(PUSH_RLDICR(reg, 31));
-	FAIL_IF(push_inst(compiler, ORIS | S(reg) | A(reg) | IMM(imm >> 16)));
-	return push_inst(compiler, ORI | S(reg) | A(reg) | IMM(imm));
-}
-
-/* Simplified mnemonics: clrldi. */
-#define INS_CLEAR_LEFT(dst, src, from) \
-	(RLDICL | S(src) | A(dst) | ((from) << 6) | (1 << 5))
-
-/* Sign extension for integer operations. */
-#define UN_EXTS() \
-	if ((flags & (ALT_SIGN_EXT | REG2_SOURCE)) == (ALT_SIGN_EXT | REG2_SOURCE)) { \
-		FAIL_IF(push_inst(compiler, EXTSW | S(src2) | A(TMP_REG2))); \
-		src2 = TMP_REG2; \
-	}
-
-#define BIN_EXTS() \
-	if (flags & ALT_SIGN_EXT) { \
-		if (flags & REG1_SOURCE) { \
-			FAIL_IF(push_inst(compiler, EXTSW | S(src1) | A(TMP_REG1))); \
-			src1 = TMP_REG1; \
-		} \
-		if (flags & REG2_SOURCE) { \
-			FAIL_IF(push_inst(compiler, EXTSW | S(src2) | A(TMP_REG2))); \
-			src2 = TMP_REG2; \
-		} \
-	}
-
-#define BIN_IMM_EXTS() \
-	if ((flags & (ALT_SIGN_EXT | REG1_SOURCE)) == (ALT_SIGN_EXT | REG1_SOURCE)) { \
-		FAIL_IF(push_inst(compiler, EXTSW | S(src1) | A(TMP_REG1))); \
-		src1 = TMP_REG1; \
-	}
-
-static SLJIT_INLINE sljit_si emit_single_op(struct sljit_compiler *compiler, sljit_si op, sljit_si flags,
-	sljit_si dst, sljit_si src1, sljit_si src2)
-{
-	switch (op) {
-	case SLJIT_MOV:
-	case SLJIT_MOV_P:
-		SLJIT_ASSERT(src1 == TMP_REG1);
-		if (dst != src2)
-			return push_inst(compiler, OR | S(src2) | A(dst) | B(src2));
-		return SLJIT_SUCCESS;
-
-	case SLJIT_MOV_UI:
-	case SLJIT_MOV_SI:
-		SLJIT_ASSERT(src1 == TMP_REG1);
-		if ((flags & (REG_DEST | REG2_SOURCE)) == (REG_DEST | REG2_SOURCE)) {
-			if (op == SLJIT_MOV_SI)
-				return push_inst(compiler, EXTSW | S(src2) | A(dst));
-			return push_inst(compiler, INS_CLEAR_LEFT(dst, src2, 0));
-		}
-		else {
-			SLJIT_ASSERT(dst == src2);
-		}
-		return SLJIT_SUCCESS;
-
-	case SLJIT_MOV_UB:
-	case SLJIT_MOV_SB:
-		SLJIT_ASSERT(src1 == TMP_REG1);
-		if ((flags & (REG_DEST | REG2_SOURCE)) == (REG_DEST | REG2_SOURCE)) {
-			if (op == SLJIT_MOV_SB)
-				return push_inst(compiler, EXTSB | S(src2) | A(dst));
-			return push_inst(compiler, INS_CLEAR_LEFT(dst, src2, 24));
-		}
-		else if ((flags & REG_DEST) && op == SLJIT_MOV_SB)
-			return push_inst(compiler, EXTSB | S(src2) | A(dst));
-		else {
-			SLJIT_ASSERT(dst == src2);
-		}
-		return SLJIT_SUCCESS;
-
-	case SLJIT_MOV_UH:
-	case SLJIT_MOV_SH:
-		SLJIT_ASSERT(src1 == TMP_REG1);
-		if ((flags & (REG_DEST | REG2_SOURCE)) == (REG_DEST | REG2_SOURCE)) {
-			if (op == SLJIT_MOV_SH)
-				return push_inst(compiler, EXTSH | S(src2) | A(dst));
-			return push_inst(compiler, INS_CLEAR_LEFT(dst, src2, 16));
-		}
-		else {
-			SLJIT_ASSERT(dst == src2);
-		}
-		return SLJIT_SUCCESS;
-
-	case SLJIT_NOT:
-		SLJIT_ASSERT(src1 == TMP_REG1);
-		UN_EXTS();
-		return push_inst(compiler, NOR | RC(flags) | S(src2) | A(dst) | B(src2));
-
-	case SLJIT_NEG:
-		SLJIT_ASSERT(src1 == TMP_REG1);
-		UN_EXTS();
-		return push_inst(compiler, NEG | OERC(flags) | D(dst) | A(src2));
-
-	case SLJIT_CLZ:
-		SLJIT_ASSERT(src1 == TMP_REG1);
-		if (flags & ALT_FORM1)
-			return push_inst(compiler, CNTLZW | RC(flags) | S(src2) | A(dst));
-		return push_inst(compiler, CNTLZD | RC(flags) | S(src2) | A(dst));
-
-	case SLJIT_ADD:
-		if (flags & ALT_FORM1) {
-			/* Flags does not set: BIN_IMM_EXTS unnecessary. */
-			SLJIT_ASSERT(src2 == TMP_REG2);
-			return push_inst(compiler, ADDI | D(dst) | A(src1) | compiler->imm);
-		}
-		if (flags & ALT_FORM2) {
-			/* Flags does not set: BIN_IMM_EXTS unnecessary. */
-			SLJIT_ASSERT(src2 == TMP_REG2);
-			return push_inst(compiler, ADDIS | D(dst) | A(src1) | compiler->imm);
-		}
-		if (flags & ALT_FORM3) {
-			SLJIT_ASSERT(src2 == TMP_REG2);
-			BIN_IMM_EXTS();
-			return push_inst(compiler, ADDIC | D(dst) | A(src1) | compiler->imm);
-		}
-		if (flags & ALT_FORM4) {
-			/* Flags does not set: BIN_IMM_EXTS unnecessary. */
-			FAIL_IF(push_inst(compiler, ADDI | D(dst) | A(src1) | (compiler->imm & 0xffff)));
-			return push_inst(compiler, ADDIS | D(dst) | A(dst) | (((compiler->imm >> 16) & 0xffff) + ((compiler->imm >> 15) & 0x1)));
-		}
-		if (!(flags & ALT_SET_FLAGS))
-			return push_inst(compiler, ADD | D(dst) | A(src1) | B(src2));
-		BIN_EXTS();
-		return push_inst(compiler, ADDC | OERC(ALT_SET_FLAGS) | D(dst) | A(src1) | B(src2));
-
-	case SLJIT_ADDC:
-		if (flags & ALT_FORM1) {
-			FAIL_IF(push_inst(compiler, MFXER | D(0)));
-			FAIL_IF(push_inst(compiler, ADDE | D(dst) | A(src1) | B(src2)));
-			return push_inst(compiler, MTXER | S(0));
-		}
-		BIN_EXTS();
-		return push_inst(compiler, ADDE | D(dst) | A(src1) | B(src2));
-
-	case SLJIT_SUB:
-		if (flags & ALT_FORM1) {
-			/* Flags does not set: BIN_IMM_EXTS unnecessary. */
-			SLJIT_ASSERT(src2 == TMP_REG2);
-			return push_inst(compiler, SUBFIC | D(dst) | A(src1) | compiler->imm);
-		}
-		if (flags & (ALT_FORM2 | ALT_FORM3)) {
-			SLJIT_ASSERT(src2 == TMP_REG2);
-			if (flags & ALT_FORM2)
-				FAIL_IF(push_inst(compiler, CMPI | CRD(0 | ((flags & ALT_SIGN_EXT) ? 0 : 1)) | A(src1) | compiler->imm));
-			if (flags & ALT_FORM3)
-				return push_inst(compiler, CMPLI | CRD(4 | ((flags & ALT_SIGN_EXT) ? 0 : 1)) | A(src1) | compiler->imm);
-			return SLJIT_SUCCESS;
-		}
-		if (flags & (ALT_FORM4 | ALT_FORM5)) {
-			if (flags & ALT_FORM4)
-				FAIL_IF(push_inst(compiler, CMPL | CRD(4 | ((flags & ALT_SIGN_EXT) ? 0 : 1)) | A(src1) | B(src2)));
-			if (flags & ALT_FORM5)
-				return push_inst(compiler, CMP | CRD(0 | ((flags & ALT_SIGN_EXT) ? 0 : 1)) | A(src1) | B(src2));
-			return SLJIT_SUCCESS;
-		}
-		if (!(flags & ALT_SET_FLAGS))
-			return push_inst(compiler, SUBF | D(dst) | A(src2) | B(src1));
-		BIN_EXTS();
-		if (flags & ALT_FORM6)
-			FAIL_IF(push_inst(compiler, CMPL | CRD(4 | ((flags & ALT_SIGN_EXT) ? 0 : 1)) | A(src1) | B(src2)));
-		return push_inst(compiler, SUBFC | OERC(ALT_SET_FLAGS) | D(dst) | A(src2) | B(src1));
-
-	case SLJIT_SUBC:
-		if (flags & ALT_FORM1) {
-			FAIL_IF(push_inst(compiler, MFXER | D(0)));
-			FAIL_IF(push_inst(compiler, SUBFE | D(dst) | A(src2) | B(src1)));
-			return push_inst(compiler, MTXER | S(0));
-		}
-		BIN_EXTS();
-		return push_inst(compiler, SUBFE | D(dst) | A(src2) | B(src1));
-
-	case SLJIT_MUL:
-		if (flags & ALT_FORM1) {
-			SLJIT_ASSERT(src2 == TMP_REG2);
-			return push_inst(compiler, MULLI | D(dst) | A(src1) | compiler->imm);
-		}
-		BIN_EXTS();
-		if (flags & ALT_FORM2)
-			return push_inst(compiler, MULLW | OERC(flags) | D(dst) | A(src2) | B(src1));
-		return push_inst(compiler, MULLD | OERC(flags) | D(dst) | A(src2) | B(src1));
-
-	case SLJIT_AND:
-		if (flags & ALT_FORM1) {
-			SLJIT_ASSERT(src2 == TMP_REG2);
-			return push_inst(compiler, ANDI | S(src1) | A(dst) | compiler->imm);
-		}
-		if (flags & ALT_FORM2) {
-			SLJIT_ASSERT(src2 == TMP_REG2);
-			return push_inst(compiler, ANDIS | S(src1) | A(dst) | compiler->imm);
-		}
-		return push_inst(compiler, AND | RC(flags) | S(src1) | A(dst) | B(src2));
-
-	case SLJIT_OR:
-		if (flags & ALT_FORM1) {
-			SLJIT_ASSERT(src2 == TMP_REG2);
-			return push_inst(compiler, ORI | S(src1) | A(dst) | compiler->imm);
-		}
-		if (flags & ALT_FORM2) {
-			SLJIT_ASSERT(src2 == TMP_REG2);
-			return push_inst(compiler, ORIS | S(src1) | A(dst) | compiler->imm);
-		}
-		if (flags & ALT_FORM3) {
-			SLJIT_ASSERT(src2 == TMP_REG2);
-			FAIL_IF(push_inst(compiler, ORI | S(src1) | A(dst) | IMM(compiler->imm)));
-			return push_inst(compiler, ORIS | S(dst) | A(dst) | IMM(compiler->imm >> 16));
-		}
-		return push_inst(compiler, OR | RC(flags) | S(src1) | A(dst) | B(src2));
-
-	case SLJIT_XOR:
-		if (flags & ALT_FORM1) {
-			SLJIT_ASSERT(src2 == TMP_REG2);
-			return push_inst(compiler, XORI | S(src1) | A(dst) | compiler->imm);
-		}
-		if (flags & ALT_FORM2) {
-			SLJIT_ASSERT(src2 == TMP_REG2);
-			return push_inst(compiler, XORIS | S(src1) | A(dst) | compiler->imm);
-		}
-		if (flags & ALT_FORM3) {
-			SLJIT_ASSERT(src2 == TMP_REG2);
-			FAIL_IF(push_inst(compiler, XORI | S(src1) | A(dst) | IMM(compiler->imm)));
-			return push_inst(compiler, XORIS | S(dst) | A(dst) | IMM(compiler->imm >> 16));
-		}
-		return push_inst(compiler, XOR | RC(flags) | S(src1) | A(dst) | B(src2));
-
-	case SLJIT_SHL:
-		if (flags & ALT_FORM1) {
-			SLJIT_ASSERT(src2 == TMP_REG2);
-			if (flags & ALT_FORM2) {
-				compiler->imm &= 0x1f;
-				return push_inst(compiler, RLWINM | RC(flags) | S(src1) | A(dst) | (compiler->imm << 11) | ((31 - compiler->imm) << 1));
-			}
-			else {
-				compiler->imm &= 0x3f;
-				return push_inst(compiler, RLDI(dst, src1, compiler->imm, 63 - compiler->imm, 1) | RC(flags));
-			}
-		}
-		return push_inst(compiler, ((flags & ALT_FORM2) ? SLW : SLD) | RC(flags) | S(src1) | A(dst) | B(src2));
-
-	case SLJIT_LSHR:
-		if (flags & ALT_FORM1) {
-			SLJIT_ASSERT(src2 == TMP_REG2);
-			if (flags & ALT_FORM2) {
-				compiler->imm &= 0x1f;
-				return push_inst(compiler, RLWINM | RC(flags) | S(src1) | A(dst) | (((32 - compiler->imm) & 0x1f) << 11) | (compiler->imm << 6) | (31 << 1));
-			}
-			else {
-				compiler->imm &= 0x3f;
-				return push_inst(compiler, RLDI(dst, src1, 64 - compiler->imm, compiler->imm, 0) | RC(flags));
-			}
-		}
-		return push_inst(compiler, ((flags & ALT_FORM2) ? SRW : SRD) | RC(flags) | S(src1) | A(dst) | B(src2));
-
-	case SLJIT_ASHR:
-		if (flags & ALT_FORM3)
-			FAIL_IF(push_inst(compiler, MFXER | D(0)));
-		if (flags & ALT_FORM1) {
-			SLJIT_ASSERT(src2 == TMP_REG2);
-			if (flags & ALT_FORM2) {
-				compiler->imm &= 0x1f;
-				FAIL_IF(push_inst(compiler, SRAWI | RC(flags) | S(src1) | A(dst) | (compiler->imm << 11)));
-			}
-			else {
-				compiler->imm &= 0x3f;
-				FAIL_IF(push_inst(compiler, SRADI | RC(flags) | S(src1) | A(dst) | ((compiler->imm & 0x1f) << 11) | ((compiler->imm & 0x20) >> 4)));
-			}
-		}
-		else
-			FAIL_IF(push_inst(compiler, ((flags & ALT_FORM2) ? SRAW : SRAD) | RC(flags) | S(src1) | A(dst) | B(src2)));
-		return (flags & ALT_FORM3) ? push_inst(compiler, MTXER | S(0)) : SLJIT_SUCCESS;
-	}
-
-	SLJIT_ASSERT_STOP();
-	return SLJIT_SUCCESS;
-}
-
-static SLJIT_INLINE sljit_si emit_const(struct sljit_compiler *compiler, sljit_si reg, sljit_sw init_value)
-{
-	FAIL_IF(push_inst(compiler, ADDIS | D(reg) | A(0) | IMM(init_value >> 48)));
-	FAIL_IF(push_inst(compiler, ORI | S(reg) | A(reg) | IMM(init_value >> 32)));
-	FAIL_IF(PUSH_RLDICR(reg, 31));
-	FAIL_IF(push_inst(compiler, ORIS | S(reg) | A(reg) | IMM(init_value >> 16)));
-	return push_inst(compiler, ORI | S(reg) | A(reg) | IMM(init_value));
-}
-
-SLJIT_API_FUNC_ATTRIBUTE void sljit_set_jump_addr(sljit_uw addr, sljit_uw new_addr)
-{
-	sljit_ins *inst = (sljit_ins*)addr;
-
-	inst[0] = (inst[0] & 0xffff0000) | ((new_addr >> 48) & 0xffff);
-	inst[1] = (inst[1] & 0xffff0000) | ((new_addr >> 32) & 0xffff);
-	inst[3] = (inst[3] & 0xffff0000) | ((new_addr >> 16) & 0xffff);
-	inst[4] = (inst[4] & 0xffff0000) | (new_addr & 0xffff);
-	SLJIT_CACHE_FLUSH(inst, inst + 5);
-}
-
-SLJIT_API_FUNC_ATTRIBUTE void sljit_set_const(sljit_uw addr, sljit_sw new_constant)
-{
-	sljit_ins *inst = (sljit_ins*)addr;
-
-	inst[0] = (inst[0] & 0xffff0000) | ((new_constant >> 48) & 0xffff);
-	inst[1] = (inst[1] & 0xffff0000) | ((new_constant >> 32) & 0xffff);
-	inst[3] = (inst[3] & 0xffff0000) | ((new_constant >> 16) & 0xffff);
-	inst[4] = (inst[4] & 0xffff0000) | (new_constant & 0xffff);
-	SLJIT_CACHE_FLUSH(inst, inst + 5);
-}
diff --git a/src/extra/pcre/sljit/sljitNativePPC_common.c b/src/extra/pcre/sljit/sljitNativePPC_common.c
deleted file mode 100644
index 5e06f2f..0000000
--- a/src/extra/pcre/sljit/sljitNativePPC_common.c
+++ /dev/null
@@ -1,2188 +0,0 @@
-/*
- *    Stack-less Just-In-Time compiler
- *
- *    Copyright 2009-2012 Zoltan Herczeg (hzmester at freemail.hu). All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without modification, are
- * permitted provided that the following conditions are met:
- *
- *   1. Redistributions of source code must retain the above copyright notice, this list of
- *      conditions and the following disclaimer.
- *
- *   2. Redistributions in binary form must reproduce the above copyright notice, this list
- *      of conditions and the following disclaimer in the documentation and/or other materials
- *      provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER(S) AND CONTRIBUTORS ``AS IS'' AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
- * SHALL THE COPYRIGHT HOLDER(S) OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
- * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
- * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
- * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-SLJIT_API_FUNC_ATTRIBUTE SLJIT_CONST char* sljit_get_platform_name(void)
-{
-	return "PowerPC" SLJIT_CPUINFO;
-}
-
-/* Length of an instruction word.
-   Both for ppc-32 and ppc-64. */
-typedef sljit_ui sljit_ins;
-
-#if ((defined SLJIT_CONFIG_PPC_32 && SLJIT_CONFIG_PPC_32) && (defined _AIX)) \
-	|| (defined SLJIT_CONFIG_PPC_64 && SLJIT_CONFIG_PPC_64)
-#define SLJIT_PPC_STACK_FRAME_V2 1
-#endif
-
-#ifdef _AIX
-#include <sys/cache.h>
-#endif
-
-#if (defined SLJIT_LITTLE_ENDIAN && SLJIT_LITTLE_ENDIAN)
-#define SLJIT_PASS_ENTRY_ADDR_TO_CALL 1
-#endif
-
-static void ppc_cache_flush(sljit_ins *from, sljit_ins *to)
-{
-#ifdef _AIX
-	_sync_cache_range((caddr_t)from, (int)((size_t)to - (size_t)from));
-#elif defined(__GNUC__) || (defined(__IBM_GCC_ASM) && __IBM_GCC_ASM)
-#	if defined(_ARCH_PWR) || defined(_ARCH_PWR2)
-	/* Cache flush for POWER architecture. */
-	while (from < to) {
-		__asm__ volatile (
-			"clf 0, %0\n"
-			"dcs\n"
-			: : "r"(from)
-		);
-		from++;
-	}
-	__asm__ volatile ( "ics" );
-#	elif defined(_ARCH_COM) && !defined(_ARCH_PPC)
-#	error "Cache flush is not implemented for PowerPC/POWER common mode."
-#	else
-	/* Cache flush for PowerPC architecture. */
-	while (from < to) {
-		__asm__ volatile (
-			"dcbf 0, %0\n"
-			"sync\n"
-			"icbi 0, %0\n"
-			: : "r"(from)
-		);
-		from++;
-	}
-	__asm__ volatile ( "isync" );
-#	endif
-#	ifdef __xlc__
-#	warning "This file may fail to compile if -qfuncsect is used"
-#	endif
-#elif defined(__xlc__)
-#error "Please enable GCC syntax for inline assembly statements with -qasm=gcc"
-#else
-#error "This platform requires a cache flush implementation."
-#endif /* _AIX */
-}
-
-#define TMP_REG1	(SLJIT_NO_REGISTERS + 1)
-#define TMP_REG2	(SLJIT_NO_REGISTERS + 2)
-#define TMP_REG3	(SLJIT_NO_REGISTERS + 3)
-#define TMP_ZERO	(SLJIT_NO_REGISTERS + 4)
-
-#if (defined SLJIT_PASS_ENTRY_ADDR_TO_CALL && SLJIT_PASS_ENTRY_ADDR_TO_CALL)
-#define TMP_CALL_REG	(SLJIT_NO_REGISTERS + 5)
-#else
-#define TMP_CALL_REG	TMP_REG2
-#endif
-
-#define TMP_FREG1	(0)
-#define TMP_FREG2	(SLJIT_FLOAT_REG6 + 1)
-
-static SLJIT_CONST sljit_ub reg_map[SLJIT_NO_REGISTERS + 6] = {
-	0, 3, 4, 5, 6, 7, 30, 29, 28, 27, 26, 1, 8, 9, 10, 31, 12
-};
-
-/* --------------------------------------------------------------------- */
-/*  Instrucion forms                                                     */
-/* --------------------------------------------------------------------- */
-#define D(d)		(reg_map[d] << 21)
-#define S(s)		(reg_map[s] << 21)
-#define A(a)		(reg_map[a] << 16)
-#define B(b)		(reg_map[b] << 11)
-#define C(c)		(reg_map[c] << 6)
-#define FD(fd)		((fd) << 21)
-#define FA(fa)		((fa) << 16)
-#define FB(fb)		((fb) << 11)
-#define FC(fc)		((fc) << 6)
-#define IMM(imm)	((imm) & 0xffff)
-#define CRD(d)		((d) << 21)
-
-/* Instruction bit sections.
-   OE and Rc flag (see ALT_SET_FLAGS). */
-#define OERC(flags)	(((flags & ALT_SET_FLAGS) >> 10) | (flags & ALT_SET_FLAGS))
-/* Rc flag (see ALT_SET_FLAGS). */
-#define RC(flags)	((flags & ALT_SET_FLAGS) >> 10)
-#define HI(opcode)	((opcode) << 26)
-#define LO(opcode)	((opcode) << 1)
-
-#define ADD		(HI(31) | LO(266))
-#define ADDC		(HI(31) | LO(10))
-#define ADDE		(HI(31) | LO(138))
-#define ADDI		(HI(14))
-#define ADDIC		(HI(13))
-#define ADDIS		(HI(15))
-#define ADDME		(HI(31) | LO(234))
-#define AND		(HI(31) | LO(28))
-#define ANDI		(HI(28))
-#define ANDIS		(HI(29))
-#define Bx		(HI(18))
-#define BCx		(HI(16))
-#define BCCTR		(HI(19) | LO(528) | (3 << 11))
-#define BLR		(HI(19) | LO(16) | (0x14 << 21))
-#define CNTLZD		(HI(31) | LO(58))
-#define CNTLZW		(HI(31) | LO(26))
-#define CMP		(HI(31) | LO(0))
-#define CMPI		(HI(11))
-#define CMPL		(HI(31) | LO(32))
-#define CMPLI		(HI(10))
-#define CROR		(HI(19) | LO(449))
-#define DIVD		(HI(31) | LO(489))
-#define DIVDU		(HI(31) | LO(457))
-#define DIVW		(HI(31) | LO(491))
-#define DIVWU		(HI(31) | LO(459))
-#define EXTSB		(HI(31) | LO(954))
-#define EXTSH		(HI(31) | LO(922))
-#define EXTSW		(HI(31) | LO(986))
-#define FABS		(HI(63) | LO(264))
-#define FADD		(HI(63) | LO(21))
-#define FADDS		(HI(59) | LO(21))
-#define FCMPU		(HI(63) | LO(0))
-#define FDIV		(HI(63) | LO(18))
-#define FDIVS		(HI(59) | LO(18))
-#define FMR		(HI(63) | LO(72))
-#define FMUL		(HI(63) | LO(25))
-#define FMULS		(HI(59) | LO(25))
-#define FNEG		(HI(63) | LO(40))
-#define FSUB		(HI(63) | LO(20))
-#define FSUBS		(HI(59) | LO(20))
-#define LD		(HI(58) | 0)
-#define LWZ		(HI(32))
-#define MFCR		(HI(31) | LO(19))
-#define MFLR		(HI(31) | LO(339) | 0x80000)
-#define MFXER		(HI(31) | LO(339) | 0x10000)
-#define MTCTR		(HI(31) | LO(467) | 0x90000)
-#define MTLR		(HI(31) | LO(467) | 0x80000)
-#define MTXER		(HI(31) | LO(467) | 0x10000)
-#define MULHD		(HI(31) | LO(73))
-#define MULHDU		(HI(31) | LO(9))
-#define MULHW		(HI(31) | LO(75))
-#define MULHWU		(HI(31) | LO(11))
-#define MULLD		(HI(31) | LO(233))
-#define MULLI		(HI(7))
-#define MULLW		(HI(31) | LO(235))
-#define NEG		(HI(31) | LO(104))
-#define NOP		(HI(24))
-#define NOR		(HI(31) | LO(124))
-#define OR		(HI(31) | LO(444))
-#define ORI		(HI(24))
-#define ORIS		(HI(25))
-#define RLDICL		(HI(30))
-#define RLWINM		(HI(21))
-#define SLD		(HI(31) | LO(27))
-#define SLW		(HI(31) | LO(24))
-#define SRAD		(HI(31) | LO(794))
-#define SRADI		(HI(31) | LO(413 << 1))
-#define SRAW		(HI(31) | LO(792))
-#define SRAWI		(HI(31) | LO(824))
-#define SRD		(HI(31) | LO(539))
-#define SRW		(HI(31) | LO(536))
-#define STD		(HI(62) | 0)
-#define STDU		(HI(62) | 1)
-#define STDUX		(HI(31) | LO(181))
-#define STW		(HI(36))
-#define STWU		(HI(37))
-#define STWUX		(HI(31) | LO(183))
-#define SUBF		(HI(31) | LO(40))
-#define SUBFC		(HI(31) | LO(8))
-#define SUBFE		(HI(31) | LO(136))
-#define SUBFIC		(HI(8))
-#define XOR		(HI(31) | LO(316))
-#define XORI		(HI(26))
-#define XORIS		(HI(27))
-
-#define SIMM_MAX	(0x7fff)
-#define SIMM_MIN	(-0x8000)
-#define UIMM_MAX	(0xffff)
-
-#if (defined SLJIT_INDIRECT_CALL && SLJIT_INDIRECT_CALL)
-SLJIT_API_FUNC_ATTRIBUTE void sljit_set_function_context(void** func_ptr, struct sljit_function_context* context, sljit_sw addr, void* func)
-{
-	sljit_sw* ptrs;
-	if (func_ptr)
-		*func_ptr = (void*)context;
-	ptrs = (sljit_sw*)func;
-	context->addr = addr ? addr : ptrs[0];
-	context->r2 = ptrs[1];
-	context->r11 = ptrs[2];
-}
-#endif
-
-static sljit_si push_inst(struct sljit_compiler *compiler, sljit_ins ins)
-{
-	sljit_ins *ptr = (sljit_ins*)ensure_buf(compiler, sizeof(sljit_ins));
-	FAIL_IF(!ptr);
-	*ptr = ins;
-	compiler->size++;
-	return SLJIT_SUCCESS;
-}
-
-static SLJIT_INLINE sljit_si detect_jump_type(struct sljit_jump *jump, sljit_ins *code_ptr, sljit_ins *code)
-{
-	sljit_sw diff;
-	sljit_uw target_addr;
-	sljit_sw extra_jump_flags;
-
-#if (defined SLJIT_PASS_ENTRY_ADDR_TO_CALL && SLJIT_PASS_ENTRY_ADDR_TO_CALL) && (defined SLJIT_CONFIG_PPC_32 && SLJIT_CONFIG_PPC_32)
-	if (jump->flags & (SLJIT_REWRITABLE_JUMP | IS_CALL))
-		return 0;
-#else
-	if (jump->flags & SLJIT_REWRITABLE_JUMP)
-		return 0;
-#endif
-
-	if (jump->flags & JUMP_ADDR)
-		target_addr = jump->u.target;
-	else {
-		SLJIT_ASSERT(jump->flags & JUMP_LABEL);
-		target_addr = (sljit_uw)(code + jump->u.label->size);
-	}
-
-#if (defined SLJIT_PASS_ENTRY_ADDR_TO_CALL && SLJIT_PASS_ENTRY_ADDR_TO_CALL) && (defined SLJIT_CONFIG_PPC_64 && SLJIT_CONFIG_PPC_64)
-	if (jump->flags & IS_CALL)
-		goto keep_address;
-#endif
-
-	diff = ((sljit_sw)target_addr - (sljit_sw)(code_ptr)) & ~0x3l;
-
-	extra_jump_flags = 0;
-	if (jump->flags & IS_COND) {
-		if (diff <= 0x7fff && diff >= -0x8000) {
-			jump->flags |= PATCH_B;
-			return 1;
-		}
-		if (target_addr <= 0xffff) {
-			jump->flags |= PATCH_B | PATCH_ABS_B;
-			return 1;
-		}
-		extra_jump_flags = REMOVE_COND;
-
-		diff -= sizeof(sljit_ins);
-	}
-
-	if (diff <= 0x01ffffff && diff >= -0x02000000) {
-		jump->flags |= PATCH_B | extra_jump_flags;
-		return 1;
-	}
-	if (target_addr <= 0x03ffffff) {
-		jump->flags |= PATCH_B | PATCH_ABS_B | extra_jump_flags;
-		return 1;
-	}
-
-#if (defined SLJIT_CONFIG_PPC_64 && SLJIT_CONFIG_PPC_64)
-#if (defined SLJIT_PASS_ENTRY_ADDR_TO_CALL && SLJIT_PASS_ENTRY_ADDR_TO_CALL)
-keep_address:
-#endif
-	if (target_addr <= 0x7fffffff) {
-		jump->flags |= PATCH_ABS32;
-		return 1;
-	}
-	if (target_addr <= 0x7fffffffffffl) {
-		jump->flags |= PATCH_ABS48;
-		return 1;
-	}
-#endif
-
-	return 0;
-}
-
-SLJIT_API_FUNC_ATTRIBUTE void* sljit_generate_code(struct sljit_compiler *compiler)
-{
-	struct sljit_memory_fragment *buf;
-	sljit_ins *code;
-	sljit_ins *code_ptr;
-	sljit_ins *buf_ptr;
-	sljit_ins *buf_end;
-	sljit_uw word_count;
-	sljit_uw addr;
-
-	struct sljit_label *label;
-	struct sljit_jump *jump;
-	struct sljit_const *const_;
-
-	CHECK_ERROR_PTR();
-	check_sljit_generate_code(compiler);
-	reverse_buf(compiler);
-
-#if (defined SLJIT_INDIRECT_CALL && SLJIT_INDIRECT_CALL)
-#if (defined SLJIT_CONFIG_PPC_64 && SLJIT_CONFIG_PPC_64)
-	compiler->size += (compiler->size & 0x1) + (sizeof(struct sljit_function_context) / sizeof(sljit_ins));
-#else
-	compiler->size += (sizeof(struct sljit_function_context) / sizeof(sljit_ins));
-#endif
-#endif
-	code = (sljit_ins*)SLJIT_MALLOC_EXEC(compiler->size * sizeof(sljit_ins));
-	PTR_FAIL_WITH_EXEC_IF(code);
-	buf = compiler->buf;
-
-	code_ptr = code;
-	word_count = 0;
-	label = compiler->labels;
-	jump = compiler->jumps;
-	const_ = compiler->consts;
-	do {
-		buf_ptr = (sljit_ins*)buf->memory;
-		buf_end = buf_ptr + (buf->used_size >> 2);
-		do {
-			*code_ptr = *buf_ptr++;
-			SLJIT_ASSERT(!label || label->size >= word_count);
-			SLJIT_ASSERT(!jump || jump->addr >= word_count);
-			SLJIT_ASSERT(!const_ || const_->addr >= word_count);
-			/* These structures are ordered by their address. */
-			if (label && label->size == word_count) {
-				/* Just recording the address. */
-				label->addr = (sljit_uw)code_ptr;
-				label->size = code_ptr - code;
-				label = label->next;
-			}
-			if (jump && jump->addr == word_count) {
-#if (defined SLJIT_CONFIG_PPC_32 && SLJIT_CONFIG_PPC_32)
-				jump->addr = (sljit_uw)(code_ptr - 3);
-#else
-				jump->addr = (sljit_uw)(code_ptr - 6);
-#endif
-				if (detect_jump_type(jump, code_ptr, code)) {
-#if (defined SLJIT_CONFIG_PPC_32 && SLJIT_CONFIG_PPC_32)
-					code_ptr[-3] = code_ptr[0];
-					code_ptr -= 3;
-#else
-					if (jump->flags & PATCH_ABS32) {
-						code_ptr -= 3;
-						code_ptr[-1] = code_ptr[2];
-						code_ptr[0] = code_ptr[3];
-					}
-					else if (jump->flags & PATCH_ABS48) {
-						code_ptr--;
-						code_ptr[-1] = code_ptr[0];
-						code_ptr[0] = code_ptr[1];
-						/* rldicr rX,rX,32,31 -> rX,rX,16,47 */
-						SLJIT_ASSERT((code_ptr[-3] & 0xfc00ffff) == 0x780007c6);
-						code_ptr[-3] ^= 0x8422;
-						/* oris -> ori */
-						code_ptr[-2] ^= 0x4000000;
-					}
-					else {
-						code_ptr[-6] = code_ptr[0];
-						code_ptr -= 6;
-					}
-#endif
-					if (jump->flags & REMOVE_COND) {
-						code_ptr[0] = BCx | (2 << 2) | ((code_ptr[0] ^ (8 << 21)) & 0x03ff0001);
-						code_ptr++;
-						jump->addr += sizeof(sljit_ins);
-						code_ptr[0] = Bx;
-						jump->flags -= IS_COND;
-					}
-				}
-				jump = jump->next;
-			}
-			if (const_ && const_->addr == word_count) {
-				const_->addr = (sljit_uw)code_ptr;
-				const_ = const_->next;
-			}
-			code_ptr ++;
-			word_count ++;
-		} while (buf_ptr < buf_end);
-
-		buf = buf->next;
-	} while (buf);
-
-	if (label && label->size == word_count) {
-		label->addr = (sljit_uw)code_ptr;
-		label->size = code_ptr - code;
-		label = label->next;
-	}
-
-	SLJIT_ASSERT(!label);
-	SLJIT_ASSERT(!jump);
-	SLJIT_ASSERT(!const_);
-#if (defined SLJIT_INDIRECT_CALL && SLJIT_INDIRECT_CALL)
-	SLJIT_ASSERT(code_ptr - code <= (sljit_sw)compiler->size - (sizeof(struct sljit_function_context) / sizeof(sljit_ins)));
-#else
-	SLJIT_ASSERT(code_ptr - code <= (sljit_sw)compiler->size);
-#endif
-
-	jump = compiler->jumps;
-	while (jump) {
-		do {
-			addr = (jump->flags & JUMP_LABEL) ? jump->u.label->addr : jump->u.target;
-			buf_ptr = (sljit_ins*)jump->addr;
-			if (jump->flags & PATCH_B) {
-				if (jump->flags & IS_COND) {
-					if (!(jump->flags & PATCH_ABS_B)) {
-						addr = addr - jump->addr;
-						SLJIT_ASSERT((sljit_sw)addr <= 0x7fff && (sljit_sw)addr >= -0x8000);
-						*buf_ptr = BCx | (addr & 0xfffc) | ((*buf_ptr) & 0x03ff0001);
-					}
-					else {
-						SLJIT_ASSERT(addr <= 0xffff);
-						*buf_ptr = BCx | (addr & 0xfffc) | 0x2 | ((*buf_ptr) & 0x03ff0001);
-					}
-				}
-				else {
-					if (!(jump->flags & PATCH_ABS_B)) {
-						addr = addr - jump->addr;
-						SLJIT_ASSERT((sljit_sw)addr <= 0x01ffffff && (sljit_sw)addr >= -0x02000000);
-						*buf_ptr = Bx | (addr & 0x03fffffc) | ((*buf_ptr) & 0x1);
-					}
-					else {
-						SLJIT_ASSERT(addr <= 0x03ffffff);
-						*buf_ptr = Bx | (addr & 0x03fffffc) | 0x2 | ((*buf_ptr) & 0x1);
-					}
-				}
-				break;
-			}
-			/* Set the fields of immediate loads. */
-#if (defined SLJIT_CONFIG_PPC_32 && SLJIT_CONFIG_PPC_32)
-			buf_ptr[0] = (buf_ptr[0] & 0xffff0000) | ((addr >> 16) & 0xffff);
-			buf_ptr[1] = (buf_ptr[1] & 0xffff0000) | (addr & 0xffff);
-#else
-			if (jump->flags & PATCH_ABS32) {
-				SLJIT_ASSERT(addr <= 0x7fffffff);
-				buf_ptr[0] = (buf_ptr[0] & 0xffff0000) | ((addr >> 16) & 0xffff);
-				buf_ptr[1] = (buf_ptr[1] & 0xffff0000) | (addr & 0xffff);
-				break;
-			}
-			if (jump->flags & PATCH_ABS48) {
-				SLJIT_ASSERT(addr <= 0x7fffffffffff);
-				buf_ptr[0] = (buf_ptr[0] & 0xffff0000) | ((addr >> 32) & 0xffff);
-				buf_ptr[1] = (buf_ptr[1] & 0xffff0000) | ((addr >> 16) & 0xffff);
-				buf_ptr[3] = (buf_ptr[3] & 0xffff0000) | (addr & 0xffff);
-				break;
-			}
-			buf_ptr[0] = (buf_ptr[0] & 0xffff0000) | ((addr >> 48) & 0xffff);
-			buf_ptr[1] = (buf_ptr[1] & 0xffff0000) | ((addr >> 32) & 0xffff);
-			buf_ptr[3] = (buf_ptr[3] & 0xffff0000) | ((addr >> 16) & 0xffff);
-			buf_ptr[4] = (buf_ptr[4] & 0xffff0000) | (addr & 0xffff);
-#endif
-		} while (0);
-		jump = jump->next;
-	}
-
-	compiler->error = SLJIT_ERR_COMPILED;
-	compiler->executable_size = (code_ptr - code) * sizeof(sljit_ins);
-	SLJIT_CACHE_FLUSH(code, code_ptr);
-
-#if (defined SLJIT_INDIRECT_CALL && SLJIT_INDIRECT_CALL)
-#if (defined SLJIT_CONFIG_PPC_64 && SLJIT_CONFIG_PPC_64)
-	if (((sljit_sw)code_ptr) & 0x4)
-		code_ptr++;
-	sljit_set_function_context(NULL, (struct sljit_function_context*)code_ptr, (sljit_sw)code, (void*)sljit_generate_code);
-	return code_ptr;
-#else
-	sljit_set_function_context(NULL, (struct sljit_function_context*)code_ptr, (sljit_sw)code, (void*)sljit_generate_code);
-	return code_ptr;
-#endif
-#else
-	return code;
-#endif
-}
-
-/* --------------------------------------------------------------------- */
-/*  Entry, exit                                                          */
-/* --------------------------------------------------------------------- */
-
-/* inp_flags: */
-
-/* Creates an index in data_transfer_insts array. */
-#define LOAD_DATA	0x01
-#define INDEXED		0x02
-#define WRITE_BACK	0x04
-#define WORD_DATA	0x00
-#define BYTE_DATA	0x08
-#define HALF_DATA	0x10
-#define INT_DATA	0x18
-#define SIGNED_DATA	0x20
-/* Separates integer and floating point registers */
-#define GPR_REG		0x3f
-#define DOUBLE_DATA	0x40
-
-#define MEM_MASK	0x7f
-
-/* Other inp_flags. */
-
-#define ARG_TEST	0x000100
-/* Integer opertion and set flags -> requires exts on 64 bit systems. */
-#define ALT_SIGN_EXT	0x000200
-/* This flag affects the RC() and OERC() macros. */
-#define ALT_SET_FLAGS	0x000400
-#define ALT_KEEP_CACHE	0x000800
-#define ALT_FORM1	0x010000
-#define ALT_FORM2	0x020000
-#define ALT_FORM3	0x040000
-#define ALT_FORM4	0x080000
-#define ALT_FORM5	0x100000
-#define ALT_FORM6	0x200000
-
-/* Source and destination is register. */
-#define REG_DEST	0x000001
-#define REG1_SOURCE	0x000002
-#define REG2_SOURCE	0x000004
-/* getput_arg_fast returned true. */
-#define FAST_DEST	0x000008
-/* Multiple instructions are required. */
-#define SLOW_DEST	0x000010
-/*
-ALT_SIGN_EXT		0x000200
-ALT_SET_FLAGS		0x000400
-ALT_FORM1		0x010000
-...
-ALT_FORM6		0x200000 */
-
-#if (defined SLJIT_CONFIG_PPC_32 && SLJIT_CONFIG_PPC_32)
-#include "sljitNativePPC_32.c"
-#else
-#include "sljitNativePPC_64.c"
-#endif
-
-#if (defined SLJIT_CONFIG_PPC_32 && SLJIT_CONFIG_PPC_32)
-#define STACK_STORE	STW
-#define STACK_LOAD	LWZ
-#else
-#define STACK_STORE	STD
-#define STACK_LOAD	LD
-#endif
-
-SLJIT_API_FUNC_ATTRIBUTE sljit_si sljit_emit_enter(struct sljit_compiler *compiler, sljit_si args, sljit_si scratches, sljit_si saveds, sljit_si local_size)
-{
-	CHECK_ERROR();
-	check_sljit_emit_enter(compiler, args, scratches, saveds, local_size);
-
-	compiler->scratches = scratches;
-	compiler->saveds = saveds;
-#if (defined SLJIT_DEBUG && SLJIT_DEBUG)
-	compiler->logical_local_size = local_size;
-#endif
-
-	FAIL_IF(push_inst(compiler, MFLR | D(0)));
-	FAIL_IF(push_inst(compiler, STACK_STORE | S(TMP_ZERO) | A(SLJIT_LOCALS_REG) | IMM(-(sljit_si)(sizeof(sljit_sw))) ));
-	if (saveds >= 1)
-		FAIL_IF(push_inst(compiler, STACK_STORE | S(SLJIT_SAVED_REG1) | A(SLJIT_LOCALS_REG) | IMM(-2 * (sljit_si)(sizeof(sljit_sw))) ));
-	if (saveds >= 2)
-		FAIL_IF(push_inst(compiler, STACK_STORE | S(SLJIT_SAVED_REG2) | A(SLJIT_LOCALS_REG) | IMM(-3 * (sljit_si)(sizeof(sljit_sw))) ));
-	if (saveds >= 3)
-		FAIL_IF(push_inst(compiler, STACK_STORE | S(SLJIT_SAVED_REG3) | A(SLJIT_LOCALS_REG) | IMM(-4 * (sljit_si)(sizeof(sljit_sw))) ));
-	if (saveds >= 4)
-		FAIL_IF(push_inst(compiler, STACK_STORE | S(SLJIT_SAVED_EREG1) | A(SLJIT_LOCALS_REG) | IMM(-5 * (sljit_si)(sizeof(sljit_sw))) ));
-	if (saveds >= 5)
-		FAIL_IF(push_inst(compiler, STACK_STORE | S(SLJIT_SAVED_EREG2) | A(SLJIT_LOCALS_REG) | IMM(-6 * (sljit_si)(sizeof(sljit_sw))) ));
-#if (defined SLJIT_PPC_STACK_FRAME_V2 && SLJIT_PPC_STACK_FRAME_V2)
-	FAIL_IF(push_inst(compiler, STACK_STORE | S(0) | A(SLJIT_LOCALS_REG) | IMM(2 * sizeof(sljit_sw)) ));
-#else
-	FAIL_IF(push_inst(compiler, STACK_STORE | S(0) | A(SLJIT_LOCALS_REG) | IMM(sizeof(sljit_sw)) ));
-#endif
-
-	FAIL_IF(push_inst(compiler, ADDI | D(TMP_ZERO) | A(0) | 0));
-	if (args >= 1)
-		FAIL_IF(push_inst(compiler, OR | S(SLJIT_SCRATCH_REG1) | A(SLJIT_SAVED_REG1) | B(SLJIT_SCRATCH_REG1)));
-	if (args >= 2)
-		FAIL_IF(push_inst(compiler, OR | S(SLJIT_SCRATCH_REG2) | A(SLJIT_SAVED_REG2) | B(SLJIT_SCRATCH_REG2)));
-	if (args >= 3)
-		FAIL_IF(push_inst(compiler, OR | S(SLJIT_SCRATCH_REG3) | A(SLJIT_SAVED_REG3) | B(SLJIT_SCRATCH_REG3)));
-
-#if (defined SLJIT_PPC_STACK_FRAME_V2 && SLJIT_PPC_STACK_FRAME_V2)
-	compiler->local_size = (1 + saveds + 6 + 8) * sizeof(sljit_sw) + local_size;
-#else
-	compiler->local_size = (1 + saveds + 2) * sizeof(sljit_sw) + local_size;
-#endif
-	compiler->local_size = (compiler->local_size + 15) & ~0xf;
-
-#if (defined SLJIT_CONFIG_PPC_32 && SLJIT_CONFIG_PPC_32)
-	if (compiler->local_size <= SIMM_MAX)
-		FAIL_IF(push_inst(compiler, STWU | S(SLJIT_LOCALS_REG) | A(SLJIT_LOCALS_REG) | IMM(-compiler->local_size)));
-	else {
-		FAIL_IF(load_immediate(compiler, 0, -compiler->local_size));
-		FAIL_IF(push_inst(compiler, STWUX | S(SLJIT_LOCALS_REG) | A(SLJIT_LOCALS_REG) | B(0)));
-	}
-#else
-	if (compiler->local_size <= SIMM_MAX)
-		FAIL_IF(push_inst(compiler, STDU | S(SLJIT_LOCALS_REG) | A(SLJIT_LOCALS_REG) | IMM(-compiler->local_size)));
-	else {
-		FAIL_IF(load_immediate(compiler, 0, -compiler->local_size));
-		FAIL_IF(push_inst(compiler, STDUX | S(SLJIT_LOCALS_REG) | A(SLJIT_LOCALS_REG) | B(0)));
-	}
-#endif
-
-	return SLJIT_SUCCESS;
-}
-
-SLJIT_API_FUNC_ATTRIBUTE void sljit_set_context(struct sljit_compiler *compiler, sljit_si args, sljit_si scratches, sljit_si saveds, sljit_si local_size)
-{
-	CHECK_ERROR_VOID();
-	check_sljit_set_context(compiler, args, scratches, saveds, local_size);
-
-	compiler->scratches = scratches;
-	compiler->saveds = saveds;
-#if (defined SLJIT_DEBUG && SLJIT_DEBUG)
-	compiler->logical_local_size = local_size;
-#endif
-
-#if (defined SLJIT_PPC_STACK_FRAME_V2 && SLJIT_PPC_STACK_FRAME_V2)
-	compiler->local_size = (1 + saveds + 6 + 8) * sizeof(sljit_sw) + local_size;
-#else
-	compiler->local_size = (1 + saveds + 2) * sizeof(sljit_sw) + local_size;
-#endif
-	compiler->local_size = (compiler->local_size + 15) & ~0xf;
-}
-
-SLJIT_API_FUNC_ATTRIBUTE sljit_si sljit_emit_return(struct sljit_compiler *compiler, sljit_si op, sljit_si src, sljit_sw srcw)
-{
-	CHECK_ERROR();
-	check_sljit_emit_return(compiler, op, src, srcw);
-
-	FAIL_IF(emit_mov_before_return(compiler, op, src, srcw));
-
-	if (compiler->local_size <= SIMM_MAX)
-		FAIL_IF(push_inst(compiler, ADDI | D(SLJIT_LOCALS_REG) | A(SLJIT_LOCALS_REG) | IMM(compiler->local_size)));
-	else {
-		FAIL_IF(load_immediate(compiler, 0, compiler->local_size));
-		FAIL_IF(push_inst(compiler, ADD | D(SLJIT_LOCALS_REG) | A(SLJIT_LOCALS_REG) | B(0)));
-	}
-
-#if (defined SLJIT_PPC_STACK_FRAME_V2 && SLJIT_PPC_STACK_FRAME_V2)
-	FAIL_IF(push_inst(compiler, STACK_LOAD | D(0) | A(SLJIT_LOCALS_REG) | IMM(2 * sizeof(sljit_sw))));
-#else
-	FAIL_IF(push_inst(compiler, STACK_LOAD | D(0) | A(SLJIT_LOCALS_REG) | IMM(sizeof(sljit_sw))));
-#endif
-	if (compiler->saveds >= 5)
-		FAIL_IF(push_inst(compiler, STACK_LOAD | D(SLJIT_SAVED_EREG2) | A(SLJIT_LOCALS_REG) | IMM(-6 * (sljit_si)(sizeof(sljit_sw))) ));
-	if (compiler->saveds >= 4)
-		FAIL_IF(push_inst(compiler, STACK_LOAD | D(SLJIT_SAVED_EREG1) | A(SLJIT_LOCALS_REG) | IMM(-5 * (sljit_si)(sizeof(sljit_sw))) ));
-	if (compiler->saveds >= 3)
-		FAIL_IF(push_inst(compiler, STACK_LOAD | D(SLJIT_SAVED_REG3) | A(SLJIT_LOCALS_REG) | IMM(-4 * (sljit_si)(sizeof(sljit_sw))) ));
-	if (compiler->saveds >= 2)
-		FAIL_IF(push_inst(compiler, STACK_LOAD | D(SLJIT_SAVED_REG2) | A(SLJIT_LOCALS_REG) | IMM(-3 * (sljit_si)(sizeof(sljit_sw))) ));
-	if (compiler->saveds >= 1)
-		FAIL_IF(push_inst(compiler, STACK_LOAD | D(SLJIT_SAVED_REG1) | A(SLJIT_LOCALS_REG) | IMM(-2 * (sljit_si)(sizeof(sljit_sw))) ));
-	FAIL_IF(push_inst(compiler, STACK_LOAD | D(TMP_ZERO) | A(SLJIT_LOCALS_REG) | IMM(-(sljit_si)(sizeof(sljit_sw))) ));
-
-	FAIL_IF(push_inst(compiler, MTLR | S(0)));
-	FAIL_IF(push_inst(compiler, BLR));
-
-	return SLJIT_SUCCESS;
-}
-
-#undef STACK_STORE
-#undef STACK_LOAD
-
-/* --------------------------------------------------------------------- */
-/*  Operators                                                            */
-/* --------------------------------------------------------------------- */
-
-/* i/x - immediate/indexed form
-   n/w - no write-back / write-back (1 bit)
-   s/l - store/load (1 bit)
-   u/s - signed/unsigned (1 bit)
-   w/b/h/i - word/byte/half/int allowed (2 bit)
-   It contans 32 items, but not all are different. */
-
-/* 64 bit only: [reg+imm] must be aligned to 4 bytes. */
-#define INT_ALIGNED	0x10000
-/* 64-bit only: there is no lwau instruction. */
-#define UPDATE_REQ	0x20000
-
-#if (defined SLJIT_CONFIG_PPC_32 && SLJIT_CONFIG_PPC_32)
-#define ARCH_32_64(a, b)	a
-#define INST_CODE_AND_DST(inst, flags, reg) \
-	((inst) | (((flags) & MEM_MASK) <= GPR_REG ? D(reg) : FD(reg)))
-#else
-#define ARCH_32_64(a, b)	b
-#define INST_CODE_AND_DST(inst, flags, reg) \
-	(((inst) & ~(INT_ALIGNED | UPDATE_REQ)) | (((flags) & MEM_MASK) <= GPR_REG ? D(reg) : FD(reg)))
-#endif
-
-static SLJIT_CONST sljit_ins data_transfer_insts[64 + 8] = {
-
-/* -------- Unsigned -------- */
-
-/* Word. */
-
-/* u w n i s */ ARCH_32_64(HI(36) /* stw */, HI(62) | INT_ALIGNED | 0x0 /* std */),
-/* u w n i l */ ARCH_32_64(HI(32) /* lwz */, HI(58) | INT_ALIGNED | 0x0 /* ld */),
-/* u w n x s */ ARCH_32_64(HI(31) | LO(151) /* stwx */, HI(31) | LO(149) /* stdx */),
-/* u w n x l */ ARCH_32_64(HI(31) | LO(23) /* lwzx */, HI(31) | LO(21) /* ldx */),
-
-/* u w w i s */ ARCH_32_64(HI(37) /* stwu */, HI(62) | INT_ALIGNED | 0x1 /* stdu */),
-/* u w w i l */ ARCH_32_64(HI(33) /* lwzu */, HI(58) | INT_ALIGNED | 0x1 /* ldu */),
-/* u w w x s */ ARCH_32_64(HI(31) | LO(183) /* stwux */, HI(31) | LO(181) /* stdux */),
-/* u w w x l */ ARCH_32_64(HI(31) | LO(55) /* lwzux */, HI(31) | LO(53) /* ldux */),
-
-/* Byte. */
-
-/* u b n i s */ HI(38) /* stb */, 
-/* u b n i l */ HI(34) /* lbz */,
-/* u b n x s */ HI(31) | LO(215) /* stbx */,
-/* u b n x l */ HI(31) | LO(87) /* lbzx */,
-
-/* u b w i s */ HI(39) /* stbu */,
-/* u b w i l */ HI(35) /* lbzu */,
-/* u b w x s */ HI(31) | LO(247) /* stbux */,
-/* u b w x l */ HI(31) | LO(119) /* lbzux */,
-
-/* Half. */
-
-/* u h n i s */ HI(44) /* sth */,
-/* u h n i l */ HI(40) /* lhz */,
-/* u h n x s */ HI(31) | LO(407) /* sthx */,
-/* u h n x l */ HI(31) | LO(279) /* lhzx */,
-
-/* u h w i s */ HI(45) /* sthu */,
-/* u h w i l */ HI(41) /* lhzu */,
-/* u h w x s */ HI(31) | LO(439) /* sthux */,
-/* u h w x l */ HI(31) | LO(311) /* lhzux */,
-
-/* Int. */
-
-/* u i n i s */ HI(36) /* stw */,
-/* u i n i l */ HI(32) /* lwz */,
-/* u i n x s */ HI(31) | LO(151) /* stwx */,
-/* u i n x l */ HI(31) | LO(23) /* lwzx */,
-
-/* u i w i s */ HI(37) /* stwu */,
-/* u i w i l */ HI(33) /* lwzu */,
-/* u i w x s */ HI(31) | LO(183) /* stwux */,
-/* u i w x l */ HI(31) | LO(55) /* lwzux */,
-
-/* -------- Signed -------- */
-
-/* Word. */
-
-/* s w n i s */ ARCH_32_64(HI(36) /* stw */, HI(62) | INT_ALIGNED | 0x0 /* std */),
-/* s w n i l */ ARCH_32_64(HI(32) /* lwz */, HI(58) | INT_ALIGNED | 0x0 /* ld */),
-/* s w n x s */ ARCH_32_64(HI(31) | LO(151) /* stwx */, HI(31) | LO(149) /* stdx */),
-/* s w n x l */ ARCH_32_64(HI(31) | LO(23) /* lwzx */, HI(31) | LO(21) /* ldx */),
-
-/* s w w i s */ ARCH_32_64(HI(37) /* stwu */, HI(62) | INT_ALIGNED | 0x1 /* stdu */),
-/* s w w i l */ ARCH_32_64(HI(33) /* lwzu */, HI(58) | INT_ALIGNED | 0x1 /* ldu */),
-/* s w w x s */ ARCH_32_64(HI(31) | LO(183) /* stwux */, HI(31) | LO(181) /* stdux */),
-/* s w w x l */ ARCH_32_64(HI(31) | LO(55) /* lwzux */, HI(31) | LO(53) /* ldux */),
-
-/* Byte. */
-
-/* s b n i s */ HI(38) /* stb */,
-/* s b n i l */ HI(34) /* lbz */ /* EXTS_REQ */,
-/* s b n x s */ HI(31) | LO(215) /* stbx */,
-/* s b n x l */ HI(31) | LO(87) /* lbzx */ /* EXTS_REQ */,
-
-/* s b w i s */ HI(39) /* stbu */,
-/* s b w i l */ HI(35) /* lbzu */ /* EXTS_REQ */,
-/* s b w x s */ HI(31) | LO(247) /* stbux */,
-/* s b w x l */ HI(31) | LO(119) /* lbzux */ /* EXTS_REQ */,
-
-/* Half. */
-
-/* s h n i s */ HI(44) /* sth */,
-/* s h n i l */ HI(42) /* lha */,
-/* s h n x s */ HI(31) | LO(407) /* sthx */,
-/* s h n x l */ HI(31) | LO(343) /* lhax */,
-
-/* s h w i s */ HI(45) /* sthu */,
-/* s h w i l */ HI(43) /* lhau */,
-/* s h w x s */ HI(31) | LO(439) /* sthux */,
-/* s h w x l */ HI(31) | LO(375) /* lhaux */,
-
-/* Int. */
-
-/* s i n i s */ HI(36) /* stw */,
-/* s i n i l */ ARCH_32_64(HI(32) /* lwz */, HI(58) | INT_ALIGNED | 0x2 /* lwa */),
-/* s i n x s */ HI(31) | LO(151) /* stwx */,
-/* s i n x l */ ARCH_32_64(HI(31) | LO(23) /* lwzx */, HI(31) | LO(341) /* lwax */),
-
-/* s i w i s */ HI(37) /* stwu */,
-/* s i w i l */ ARCH_32_64(HI(33) /* lwzu */, HI(58) | INT_ALIGNED | UPDATE_REQ | 0x2 /* lwa */),
-/* s i w x s */ HI(31) | LO(183) /* stwux */,
-/* s i w x l */ ARCH_32_64(HI(31) | LO(55) /* lwzux */, HI(31) | LO(373) /* lwaux */),
-
-/* -------- Double -------- */
-
-/* d   n i s */ HI(54) /* stfd */,
-/* d   n i l */ HI(50) /* lfd */,
-/* d   n x s */ HI(31) | LO(727) /* stfdx */,
-/* d   n x l */ HI(31) | LO(599) /* lfdx */,
-
-/* s   n i s */ HI(52) /* stfs */,
-/* s   n i l */ HI(48) /* lfs */,
-/* s   n x s */ HI(31) | LO(663) /* stfsx */,
-/* s   n x l */ HI(31) | LO(535) /* lfsx */,
-
-};
-
-#undef ARCH_32_64
-
-/* Simple cases, (no caching is required). */
-static sljit_si getput_arg_fast(struct sljit_compiler *compiler, sljit_si inp_flags, sljit_si reg, sljit_si arg, sljit_sw argw)
-{
-	sljit_ins inst;
-
-	/* Should work when (arg & REG_MASK) == 0. */
-	SLJIT_COMPILE_ASSERT(A(0) == 0, a0_must_be_0);
-	SLJIT_ASSERT(arg & SLJIT_MEM);
-
-	if (arg & OFFS_REG_MASK) {
-		if (argw & 0x3)
-			return 0;
-		if (inp_flags & ARG_TEST)
-			return 1;
-
-		inst = data_transfer_insts[(inp_flags | INDEXED) & MEM_MASK];
-		SLJIT_ASSERT(!(inst & (INT_ALIGNED | UPDATE_REQ)));
-		FAIL_IF(push_inst(compiler, INST_CODE_AND_DST(inst, inp_flags, reg) | A(arg & REG_MASK) | B(OFFS_REG(arg))));
-		return -1;
-	}
-
-	if (SLJIT_UNLIKELY(!(arg & REG_MASK)))
-		inp_flags &= ~WRITE_BACK;
-
-#if (defined SLJIT_CONFIG_PPC_64 && SLJIT_CONFIG_PPC_64)
-	inst = data_transfer_insts[inp_flags & MEM_MASK];
-	SLJIT_ASSERT((arg & REG_MASK) || !(inst & UPDATE_REQ));
-
-	if (argw > SIMM_MAX || argw < SIMM_MIN || ((inst & INT_ALIGNED) && (argw & 0x3)) || (inst & UPDATE_REQ))
-		return 0;
-	if (inp_flags & ARG_TEST)
-		return 1;
-#endif
-
-#if (defined SLJIT_CONFIG_PPC_32 && SLJIT_CONFIG_PPC_32)
-	if (argw > SIMM_MAX || argw < SIMM_MIN)
-		return 0;
-	if (inp_flags & ARG_TEST)
-		return 1;
-
-	inst = data_transfer_insts[inp_flags & MEM_MASK];
-	SLJIT_ASSERT(!(inst & (INT_ALIGNED | UPDATE_REQ)));
-#endif
-
-	FAIL_IF(push_inst(compiler, INST_CODE_AND_DST(inst, inp_flags, reg) | A(arg & REG_MASK) | IMM(argw)));
-	return -1;
-}
-
-/* See getput_arg below.
-   Note: can_cache is called only for binary operators. Those operator always
-   uses word arguments without write back. */
-static sljit_si can_cache(sljit_si arg, sljit_sw argw, sljit_si next_arg, sljit_sw next_argw)
-{
-	sljit_sw high_short, next_high_short;
-#if (defined SLJIT_CONFIG_PPC_64 && SLJIT_CONFIG_PPC_64)
-	sljit_sw diff;
-#endif
-
-	SLJIT_ASSERT((arg & SLJIT_MEM) && (next_arg & SLJIT_MEM));
-
-	if (arg & OFFS_REG_MASK)
-		return ((arg & OFFS_REG_MASK) == (next_arg & OFFS_REG_MASK) && (argw & 0x3) == (next_argw & 0x3));
-
-	if (next_arg & OFFS_REG_MASK)
-		return 0;
-
-#if (defined SLJIT_CONFIG_PPC_32 && SLJIT_CONFIG_PPC_32)
-	high_short = (argw + ((argw & 0x8000) << 1)) & ~0xffff;
-	next_high_short = (next_argw + ((next_argw & 0x8000) << 1)) & ~0xffff;
-	return high_short == next_high_short;
-#else
-	if (argw <= 0x7fffffffl && argw >= -0x80000000l) {
-		high_short = (argw + ((argw & 0x8000) << 1)) & ~0xffff;
-		next_high_short = (next_argw + ((next_argw & 0x8000) << 1)) & ~0xffff;
-		if (high_short == next_high_short)
-			return 1;
-	}
-
-	diff = argw - next_argw;
-	if (!(arg & REG_MASK))
-		return diff <= SIMM_MAX && diff >= SIMM_MIN;
-
-	if (arg == next_arg && diff <= SIMM_MAX && diff >= SIMM_MIN)
-		return 1;
-
-	return 0;
-#endif
-}
-
-#if (defined SLJIT_CONFIG_PPC_64 && SLJIT_CONFIG_PPC_64)
-#define ADJUST_CACHED_IMM(imm) \
-	if ((inst & INT_ALIGNED) && (imm & 0x3)) { \
-		/* Adjust cached value. Fortunately this is really a rare case */ \
-		compiler->cache_argw += imm & 0x3; \
-		FAIL_IF(push_inst(compiler, ADDI | D(TMP_REG3) | A(TMP_REG3) | (imm & 0x3))); \
-		imm &= ~0x3; \
-	}
-#endif
-
-/* Emit the necessary instructions. See can_cache above. */
-static sljit_si getput_arg(struct sljit_compiler *compiler, sljit_si inp_flags, sljit_si reg, sljit_si arg, sljit_sw argw, sljit_si next_arg, sljit_sw next_argw)
-{
-	sljit_si tmp_r;
-	sljit_ins inst;
-	sljit_sw high_short, next_high_short;
-#if (defined SLJIT_CONFIG_PPC_64 && SLJIT_CONFIG_PPC_64)
-	sljit_sw diff;
-#endif
-
-	SLJIT_ASSERT(arg & SLJIT_MEM);
-
-	tmp_r = ((inp_flags & LOAD_DATA) && ((inp_flags) & MEM_MASK) <= GPR_REG) ? reg : TMP_REG1;
-	/* Special case for "mov reg, [reg, ... ]". */
-	if ((arg & REG_MASK) == tmp_r)
-		tmp_r = TMP_REG1;
-
-	if (SLJIT_UNLIKELY(arg & OFFS_REG_MASK)) {
-		argw &= 0x3;
-		/* Otherwise getput_arg_fast would capture it. */
-		SLJIT_ASSERT(argw);
-
-		if ((SLJIT_MEM | (arg & OFFS_REG_MASK)) == compiler->cache_arg && argw == compiler->cache_argw)
-			tmp_r = TMP_REG3;
-		else {
-			if ((arg & OFFS_REG_MASK) == (next_arg & OFFS_REG_MASK) && argw == (next_argw & 0x3)) {
-				compiler->cache_arg = SLJIT_MEM | (arg & OFFS_REG_MASK);
-				compiler->cache_argw = argw;
-				tmp_r = TMP_REG3;
-			}
-#if (defined SLJIT_CONFIG_PPC_32 && SLJIT_CONFIG_PPC_32)
-			FAIL_IF(push_inst(compiler, RLWINM | S(OFFS_REG(arg)) | A(tmp_r) | (argw << 11) | ((31 - argw) << 1)));
-#else
-			FAIL_IF(push_inst(compiler, RLDI(tmp_r, OFFS_REG(arg), argw, 63 - argw, 1)));
-#endif
-		}
-		inst = data_transfer_insts[(inp_flags | INDEXED) & MEM_MASK];
-		SLJIT_ASSERT(!(inst & (INT_ALIGNED | UPDATE_REQ)));
-		return push_inst(compiler, INST_CODE_AND_DST(inst, inp_flags, reg) | A(arg & REG_MASK) | B(tmp_r));
-	}
-
-	if (SLJIT_UNLIKELY(!(arg & REG_MASK)))
-		inp_flags &= ~WRITE_BACK;
-
-	inst = data_transfer_insts[inp_flags & MEM_MASK];
-	SLJIT_ASSERT((arg & REG_MASK) || !(inst & UPDATE_REQ));
-
-#if (defined SLJIT_CONFIG_PPC_64 && SLJIT_CONFIG_PPC_64)
-	if (argw <= 0x7fff7fffl && argw >= -0x80000000l
-			&& (!(inst & INT_ALIGNED) || !(argw & 0x3)) && !(inst & UPDATE_REQ)) {
-#endif
-
-		arg &= REG_MASK;
-		high_short = (sljit_si)(argw + ((argw & 0x8000) << 1)) & ~0xffff;
-		/* The getput_arg_fast should handle this otherwise. */
-#if (defined SLJIT_CONFIG_PPC_64 && SLJIT_CONFIG_PPC_64)
-		SLJIT_ASSERT(high_short && high_short <= 0x7fffffffl && high_short >= -0x80000000l);
-#else
-		SLJIT_ASSERT(high_short && !(inst & (INT_ALIGNED | UPDATE_REQ)));
-#endif
-
-		if (inp_flags & WRITE_BACK) {
-			if (arg == reg) {
-				FAIL_IF(push_inst(compiler, OR | S(reg) | A(tmp_r) | B(reg)));
-				reg = tmp_r;
-			}
-			tmp_r = arg;
-			FAIL_IF(push_inst(compiler, ADDIS | D(arg) | A(arg) | IMM(high_short >> 16)));
-		}
-		else if (compiler->cache_arg != arg || high_short != compiler->cache_argw) {
-			if ((next_arg & SLJIT_MEM) && !(next_arg & OFFS_REG_MASK)) {
-				next_high_short = (sljit_si)(next_argw + ((next_argw & 0x8000) << 1)) & ~0xffff;
-				if (high_short == next_high_short) {
-					compiler->cache_arg = SLJIT_IMM | arg;
-					compiler->cache_argw = next_high_short;
-					tmp_r = TMP_REG3;
-				}
-			}
-			FAIL_IF(push_inst(compiler, ADDIS | D(tmp_r) | A(arg & REG_MASK) | IMM(high_short >> 16)));
-		}
-		else
-			tmp_r = TMP_REG3;
-
-		return push_inst(compiler, INST_CODE_AND_DST(inst, inp_flags, reg) | A(tmp_r) | IMM(argw));
-
-#if (defined SLJIT_CONFIG_PPC_64 && SLJIT_CONFIG_PPC_64)
-	}
-
-	/* Everything else is PPC-64 only. */
-	if (SLJIT_UNLIKELY(!(arg & REG_MASK))) {
-		diff = argw - compiler->cache_argw;
-		if ((compiler->cache_arg & SLJIT_IMM) && diff <= SIMM_MAX && diff >= SIMM_MIN) {
-			ADJUST_CACHED_IMM(diff);
-			return push_inst(compiler, INST_CODE_AND_DST(inst, inp_flags, reg) | A(TMP_REG3) | IMM(diff));
-		}
-
-		diff = argw - next_argw;
-		if ((next_arg & SLJIT_MEM) && diff <= SIMM_MAX && diff >= SIMM_MIN) {
-			SLJIT_ASSERT(inp_flags & LOAD_DATA);
-
-			compiler->cache_arg = SLJIT_IMM;
-			compiler->cache_argw = argw;
-			tmp_r = TMP_REG3;
-		}
-
-		FAIL_IF(load_immediate(compiler, tmp_r, argw));
-		return push_inst(compiler, INST_CODE_AND_DST(inst, inp_flags, reg) | A(tmp_r));
-	}
-
-	diff = argw - compiler->cache_argw;
-	if (compiler->cache_arg == arg && diff <= SIMM_MAX && diff >= SIMM_MIN) {
-		SLJIT_ASSERT(!(inp_flags & WRITE_BACK) && !(inst & UPDATE_REQ));
-		ADJUST_CACHED_IMM(diff);
-		return push_inst(compiler, INST_CODE_AND_DST(inst, inp_flags, reg) | A(TMP_REG3) | IMM(diff));
-	}
-
-	if ((compiler->cache_arg & SLJIT_IMM) && diff <= SIMM_MAX && diff >= SIMM_MIN) {
-		inst = data_transfer_insts[(inp_flags | INDEXED) & MEM_MASK];
-		SLJIT_ASSERT(!(inst & (INT_ALIGNED | UPDATE_REQ)));
-		if (compiler->cache_argw != argw) {
-			FAIL_IF(push_inst(compiler, ADDI | D(TMP_REG3) | A(TMP_REG3) | IMM(diff)));
-			compiler->cache_argw = argw;
-		}
-		return push_inst(compiler, INST_CODE_AND_DST(inst, inp_flags, reg) | A(arg & REG_MASK) | B(TMP_REG3));
-	}
-
-	if (argw == next_argw && (next_arg & SLJIT_MEM)) {
-		SLJIT_ASSERT(inp_flags & LOAD_DATA);
-		FAIL_IF(load_immediate(compiler, TMP_REG3, argw));
-
-		compiler->cache_arg = SLJIT_IMM;
-		compiler->cache_argw = argw;
-
-		inst = data_transfer_insts[(inp_flags | INDEXED) & MEM_MASK];
-		SLJIT_ASSERT(!(inst & (INT_ALIGNED | UPDATE_REQ)));
-		return push_inst(compiler, INST_CODE_AND_DST(inst, inp_flags, reg) | A(arg & REG_MASK) | B(TMP_REG3));
-	}
-
-	diff = argw - next_argw;
-	if (arg == next_arg && !(inp_flags & WRITE_BACK) && diff <= SIMM_MAX && diff >= SIMM_MIN) {
-		SLJIT_ASSERT(inp_flags & LOAD_DATA);
-		FAIL_IF(load_immediate(compiler, TMP_REG3, argw));
-		FAIL_IF(push_inst(compiler, ADD | D(TMP_REG3) | A(TMP_REG3) | B(arg & REG_MASK)));
-
-		compiler->cache_arg = arg;
-		compiler->cache_argw = argw;
-
-		return push_inst(compiler, INST_CODE_AND_DST(inst, inp_flags, reg) | A(TMP_REG3));
-	}
-
-	if ((next_arg & SLJIT_MEM) && !(next_arg & OFFS_REG_MASK) && diff <= SIMM_MAX && diff >= SIMM_MIN) {
-		SLJIT_ASSERT(inp_flags & LOAD_DATA);
-		FAIL_IF(load_immediate(compiler, TMP_REG3, argw));
-
-		compiler->cache_arg = SLJIT_IMM;
-		compiler->cache_argw = argw;
-		tmp_r = TMP_REG3;
-	}
-	else
-		FAIL_IF(load_immediate(compiler, tmp_r, argw));
-
-	/* Get the indexed version instead of the normal one. */
-	inst = data_transfer_insts[(inp_flags | INDEXED) & MEM_MASK];
-	SLJIT_ASSERT(!(inst & (INT_ALIGNED | UPDATE_REQ)));
-	return push_inst(compiler, INST_CODE_AND_DST(inst, inp_flags, reg) | A(arg & REG_MASK) | B(tmp_r));
-#endif
-}
-
-static SLJIT_INLINE sljit_si emit_op_mem2(struct sljit_compiler *compiler, sljit_si flags, sljit_si reg, sljit_si arg1, sljit_sw arg1w, sljit_si arg2, sljit_sw arg2w)
-{
-	if (getput_arg_fast(compiler, flags, reg, arg1, arg1w))
-		return compiler->error;
-	return getput_arg(compiler, flags, reg, arg1, arg1w, arg2, arg2w);
-}
-
-static sljit_si emit_op(struct sljit_compiler *compiler, sljit_si op, sljit_si input_flags,
-	sljit_si dst, sljit_sw dstw,
-	sljit_si src1, sljit_sw src1w,
-	sljit_si src2, sljit_sw src2w)
-{
-	/* arg1 goes to TMP_REG1 or src reg
-	   arg2 goes to TMP_REG2, imm or src reg
-	   TMP_REG3 can be used for caching
-	   result goes to TMP_REG2, so put result can use TMP_REG1 and TMP_REG3. */
-	sljit_si dst_r;
-	sljit_si src1_r;
-	sljit_si src2_r;
-	sljit_si sugg_src2_r = TMP_REG2;
-	sljit_si flags = input_flags & (ALT_FORM1 | ALT_FORM2 | ALT_FORM3 | ALT_FORM4 | ALT_FORM5 | ALT_FORM6 | ALT_SIGN_EXT | ALT_SET_FLAGS);
-
-	if (!(input_flags & ALT_KEEP_CACHE)) {
-		compiler->cache_arg = 0;
-		compiler->cache_argw = 0;
-	}
-
-	/* Destination check. */
-	if (SLJIT_UNLIKELY(dst == SLJIT_UNUSED)) {
-		if (op >= SLJIT_MOV && op <= SLJIT_MOVU_SI && !(src2 & SLJIT_MEM))
-			return SLJIT_SUCCESS;
-		dst_r = TMP_REG2;
-	}
-	else if (FAST_IS_REG(dst)) {
-		dst_r = dst;
-		flags |= REG_DEST;
-		if (op >= SLJIT_MOV && op <= SLJIT_MOVU_SI)
-			sugg_src2_r = dst_r;
-	}
-	else {
-		SLJIT_ASSERT(dst & SLJIT_MEM);
-		if (getput_arg_fast(compiler, input_flags | ARG_TEST, TMP_REG2, dst, dstw)) {
-			flags |= FAST_DEST;
-			dst_r = TMP_REG2;
-		}
-		else {
-			flags |= SLOW_DEST;
-			dst_r = 0;
-		}
-	}
-
-	/* Source 1. */
-	if (FAST_IS_REG(src1)) {
-		src1_r = src1;
-		flags |= REG1_SOURCE;
-	}
-	else if (src1 & SLJIT_IMM) {
-		FAIL_IF(load_immediate(compiler, TMP_REG1, src1w));
-		src1_r = TMP_REG1;
-	}
-	else if (getput_arg_fast(compiler, input_flags | LOAD_DATA, TMP_REG1, src1, src1w)) {
-		FAIL_IF(compiler->error);
-		src1_r = TMP_REG1;
-	}
-	else
-		src1_r = 0;
-
-	/* Source 2. */
-	if (FAST_IS_REG(src2)) {
-		src2_r = src2;
-		flags |= REG2_SOURCE;
-		if (!(flags & REG_DEST) && op >= SLJIT_MOV && op <= SLJIT_MOVU_SI)
-			dst_r = src2_r;
-	}
-	else if (src2 & SLJIT_IMM) {
-		FAIL_IF(load_immediate(compiler, sugg_src2_r, src2w));
-		src2_r = sugg_src2_r;
-	}
-	else if (getput_arg_fast(compiler, input_flags | LOAD_DATA, sugg_src2_r, src2, src2w)) {
-		FAIL_IF(compiler->error);
-		src2_r = sugg_src2_r;
-	}
-	else
-		src2_r = 0;
-
-	/* src1_r, src2_r and dst_r can be zero (=unprocessed).
-	   All arguments are complex addressing modes, and it is a binary operator. */
-	if (src1_r == 0 && src2_r == 0 && dst_r == 0) {
-		if (!can_cache(src1, src1w, src2, src2w) && can_cache(src1, src1w, dst, dstw)) {
-			FAIL_IF(getput_arg(compiler, input_flags | LOAD_DATA, TMP_REG2, src2, src2w, src1, src1w));
-			FAIL_IF(getput_arg(compiler, input_flags | LOAD_DATA, TMP_REG1, src1, src1w, dst, dstw));
-		}
-		else {
-			FAIL_IF(getput_arg(compiler, input_flags | LOAD_DATA, TMP_REG1, src1, src1w, src2, src2w));
-			FAIL_IF(getput_arg(compiler, input_flags | LOAD_DATA, TMP_REG2, src2, src2w, dst, dstw));
-		}
-		src1_r = TMP_REG1;
-		src2_r = TMP_REG2;
-	}
-	else if (src1_r == 0 && src2_r == 0) {
-		FAIL_IF(getput_arg(compiler, input_flags | LOAD_DATA, TMP_REG1, src1, src1w, src2, src2w));
-		src1_r = TMP_REG1;
-	}
-	else if (src1_r == 0 && dst_r == 0) {
-		FAIL_IF(getput_arg(compiler, input_flags | LOAD_DATA, TMP_REG1, src1, src1w, dst, dstw));
-		src1_r = TMP_REG1;
-	}
-	else if (src2_r == 0 && dst_r == 0) {
-		FAIL_IF(getput_arg(compiler, input_flags | LOAD_DATA, sugg_src2_r, src2, src2w, dst, dstw));
-		src2_r = sugg_src2_r;
-	}
-
-	if (dst_r == 0)
-		dst_r = TMP_REG2;
-
-	if (src1_r == 0) {
-		FAIL_IF(getput_arg(compiler, input_flags | LOAD_DATA, TMP_REG1, src1, src1w, 0, 0));
-		src1_r = TMP_REG1;
-	}
-
-	if (src2_r == 0) {
-		FAIL_IF(getput_arg(compiler, input_flags | LOAD_DATA, sugg_src2_r, src2, src2w, 0, 0));
-		src2_r = sugg_src2_r;
-	}
-
-	FAIL_IF(emit_single_op(compiler, op, flags, dst_r, src1_r, src2_r));
-
-	if (flags & (FAST_DEST | SLOW_DEST)) {
-		if (flags & FAST_DEST)
-			FAIL_IF(getput_arg_fast(compiler, input_flags, dst_r, dst, dstw));
-		else
-			FAIL_IF(getput_arg(compiler, input_flags, dst_r, dst, dstw, 0, 0));
-	}
-	return SLJIT_SUCCESS;
-}
-
-SLJIT_API_FUNC_ATTRIBUTE sljit_si sljit_emit_op0(struct sljit_compiler *compiler, sljit_si op)
-{
-#if (defined SLJIT_CONFIG_PPC_64 && SLJIT_CONFIG_PPC_64)
-	sljit_si int_op = op & SLJIT_INT_OP;
-#endif
-
-	CHECK_ERROR();
-	check_sljit_emit_op0(compiler, op);
-
-	op = GET_OPCODE(op);
-	switch (op) {
-	case SLJIT_BREAKPOINT:
-	case SLJIT_NOP:
-		return push_inst(compiler, NOP);
-	case SLJIT_UMUL:
-	case SLJIT_SMUL:
-		FAIL_IF(push_inst(compiler, OR | S(SLJIT_SCRATCH_REG1) | A(TMP_REG1) | B(SLJIT_SCRATCH_REG1)));
-#if (defined SLJIT_CONFIG_PPC_64 && SLJIT_CONFIG_PPC_64)
-		FAIL_IF(push_inst(compiler, MULLD | D(SLJIT_SCRATCH_REG1) | A(TMP_REG1) | B(SLJIT_SCRATCH_REG2)));
-		return push_inst(compiler, (op == SLJIT_UMUL ? MULHDU : MULHD) | D(SLJIT_SCRATCH_REG2) | A(TMP_REG1) | B(SLJIT_SCRATCH_REG2));
-#else
-		FAIL_IF(push_inst(compiler, MULLW | D(SLJIT_SCRATCH_REG1) | A(TMP_REG1) | B(SLJIT_SCRATCH_REG2)));
-		return push_inst(compiler, (op == SLJIT_UMUL ? MULHWU : MULHW) | D(SLJIT_SCRATCH_REG2) | A(TMP_REG1) | B(SLJIT_SCRATCH_REG2));
-#endif
-	case SLJIT_UDIV:
-	case SLJIT_SDIV:
-		FAIL_IF(push_inst(compiler, OR | S(SLJIT_SCRATCH_REG1) | A(TMP_REG1) | B(SLJIT_SCRATCH_REG1)));
-#if (defined SLJIT_CONFIG_PPC_64 && SLJIT_CONFIG_PPC_64)
-		if (int_op) {
-			FAIL_IF(push_inst(compiler, (op == SLJIT_UDIV ? DIVWU : DIVW) | D(SLJIT_SCRATCH_REG1) | A(TMP_REG1) | B(SLJIT_SCRATCH_REG2)));
-			FAIL_IF(push_inst(compiler, MULLW | D(SLJIT_SCRATCH_REG2) | A(SLJIT_SCRATCH_REG1) | B(SLJIT_SCRATCH_REG2)));
-		} else {
-			FAIL_IF(push_inst(compiler, (op == SLJIT_UDIV ? DIVDU : DIVD) | D(SLJIT_SCRATCH_REG1) | A(TMP_REG1) | B(SLJIT_SCRATCH_REG2)));
-			FAIL_IF(push_inst(compiler, MULLD | D(SLJIT_SCRATCH_REG2) | A(SLJIT_SCRATCH_REG1) | B(SLJIT_SCRATCH_REG2)));
-		}
-		return push_inst(compiler, SUBF | D(SLJIT_SCRATCH_REG2) | A(SLJIT_SCRATCH_REG2) | B(TMP_REG1));
-#else
-		FAIL_IF(push_inst(compiler, (op == SLJIT_UDIV ? DIVWU : DIVW) | D(SLJIT_SCRATCH_REG1) | A(TMP_REG1) | B(SLJIT_SCRATCH_REG2)));
-		FAIL_IF(push_inst(compiler, MULLW | D(SLJIT_SCRATCH_REG2) | A(SLJIT_SCRATCH_REG1) | B(SLJIT_SCRATCH_REG2)));
-		return push_inst(compiler, SUBF | D(SLJIT_SCRATCH_REG2) | A(SLJIT_SCRATCH_REG2) | B(TMP_REG1));
-#endif
-	}
-
-	return SLJIT_SUCCESS;
-}
-
-#define EMIT_MOV(type, type_flags, type_cast) \
-	emit_op(compiler, (src & SLJIT_IMM) ? SLJIT_MOV : type, flags | (type_flags), dst, dstw, TMP_REG1, 0, src, (src & SLJIT_IMM) ? type_cast srcw : srcw)
-
-SLJIT_API_FUNC_ATTRIBUTE sljit_si sljit_emit_op1(struct sljit_compiler *compiler, sljit_si op,
-	sljit_si dst, sljit_sw dstw,
-	sljit_si src, sljit_sw srcw)
-{
-	sljit_si flags = GET_FLAGS(op) ? ALT_SET_FLAGS : 0;
-	sljit_si op_flags = GET_ALL_FLAGS(op);
-
-	CHECK_ERROR();
-	check_sljit_emit_op1(compiler, op, dst, dstw, src, srcw);
-	ADJUST_LOCAL_OFFSET(dst, dstw);
-	ADJUST_LOCAL_OFFSET(src, srcw);
-
-	op = GET_OPCODE(op);
-	if ((src & SLJIT_IMM) && srcw == 0)
-		src = TMP_ZERO;
-
-	if (op_flags & SLJIT_SET_O)
-		FAIL_IF(push_inst(compiler, MTXER | S(TMP_ZERO)));
-
-	if (op_flags & SLJIT_INT_OP) {
-		if (op < SLJIT_NOT) {
-			if (FAST_IS_REG(src) && src == dst) {
-				if (!TYPE_CAST_NEEDED(op))
-					return SLJIT_SUCCESS;
-			}
-#if (defined SLJIT_CONFIG_PPC_64 && SLJIT_CONFIG_PPC_64)
-			if (op == SLJIT_MOV_SI && (src & SLJIT_MEM))
-				op = SLJIT_MOV_UI;
-			if (op == SLJIT_MOVU_SI && (src & SLJIT_MEM))
-				op = SLJIT_MOVU_UI;
-			if (op == SLJIT_MOV_UI && (src & SLJIT_IMM))
-				op = SLJIT_MOV_SI;
-			if (op == SLJIT_MOVU_UI && (src & SLJIT_IMM))
-				op = SLJIT_MOVU_SI;
-#endif
-		}
-#if (defined SLJIT_CONFIG_PPC_64 && SLJIT_CONFIG_PPC_64)
-		else {
-			/* Most operations expect sign extended arguments. */
-			flags |= INT_DATA | SIGNED_DATA;
-			if (src & SLJIT_IMM)
-				srcw = (sljit_si)srcw;
-		}
-#endif
-	}
-
-	switch (op) {
-	case SLJIT_MOV:
-	case SLJIT_MOV_P:
-#if (defined SLJIT_CONFIG_PPC_32 && SLJIT_CONFIG_PPC_32)
-	case SLJIT_MOV_UI:
-	case SLJIT_MOV_SI:
-#endif
-		return emit_op(compiler, SLJIT_MOV, flags | WORD_DATA, dst, dstw, TMP_REG1, 0, src, srcw);
-
-#if (defined SLJIT_CONFIG_PPC_64 && SLJIT_CONFIG_PPC_64)
-	case SLJIT_MOV_UI:
-		return EMIT_MOV(SLJIT_MOV_UI, INT_DATA, (sljit_ui));
-
-	case SLJIT_MOV_SI:
-		return EMIT_MOV(SLJIT_MOV_SI, INT_DATA | SIGNED_DATA, (sljit_si));
-#endif
-
-	case SLJIT_MOV_UB:
-		return EMIT_MOV(SLJIT_MOV_UB, BYTE_DATA, (sljit_ub));
-
-	case SLJIT_MOV_SB:
-		return EMIT_MOV(SLJIT_MOV_SB, BYTE_DATA | SIGNED_DATA, (sljit_sb));
-
-	case SLJIT_MOV_UH:
-		return EMIT_MOV(SLJIT_MOV_UH, HALF_DATA, (sljit_uh));
-
-	case SLJIT_MOV_SH:
-		return EMIT_MOV(SLJIT_MOV_SH, HALF_DATA | SIGNED_DATA, (sljit_sh));
-
-	case SLJIT_MOVU:
-	case SLJIT_MOVU_P:
-#if (defined SLJIT_CONFIG_PPC_32 && SLJIT_CONFIG_PPC_32)
-	case SLJIT_MOVU_UI:
-	case SLJIT_MOVU_SI:
-#endif
-		return emit_op(compiler, SLJIT_MOV, flags | WORD_DATA | WRITE_BACK, dst, dstw, TMP_REG1, 0, src, srcw);
-
-#if (defined SLJIT_CONFIG_PPC_64 && SLJIT_CONFIG_PPC_64)
-	case SLJIT_MOVU_UI:
-		return EMIT_MOV(SLJIT_MOV_UI, INT_DATA | WRITE_BACK, (sljit_ui));
-
-	case SLJIT_MOVU_SI:
-		return EMIT_MOV(SLJIT_MOV_SI, INT_DATA | SIGNED_DATA | WRITE_BACK, (sljit_si));
-#endif
-
-	case SLJIT_MOVU_UB:
-		return EMIT_MOV(SLJIT_MOV_UB, BYTE_DATA | WRITE_BACK, (sljit_ub));
-
-	case SLJIT_MOVU_SB:
-		return EMIT_MOV(SLJIT_MOV_SB, BYTE_DATA | SIGNED_DATA | WRITE_BACK, (sljit_sb));
-
-	case SLJIT_MOVU_UH:
-		return EMIT_MOV(SLJIT_MOV_UH, HALF_DATA | WRITE_BACK, (sljit_uh));
-
-	case SLJIT_MOVU_SH:
-		return EMIT_MOV(SLJIT_MOV_SH, HALF_DATA | SIGNED_DATA | WRITE_BACK, (sljit_sh));
-
-	case SLJIT_NOT:
-		return emit_op(compiler, SLJIT_NOT, flags, dst, dstw, TMP_REG1, 0, src, srcw);
-
-	case SLJIT_NEG:
-		return emit_op(compiler, SLJIT_NEG, flags, dst, dstw, TMP_REG1, 0, src, srcw);
-
-	case SLJIT_CLZ:
-#if (defined SLJIT_CONFIG_PPC_64 && SLJIT_CONFIG_PPC_64)
-		return emit_op(compiler, SLJIT_CLZ, flags | (!(op_flags & SLJIT_INT_OP) ? 0 : ALT_FORM1), dst, dstw, TMP_REG1, 0, src, srcw);
-#else
-		return emit_op(compiler, SLJIT_CLZ, flags, dst, dstw, TMP_REG1, 0, src, srcw);
-#endif
-	}
-
-	return SLJIT_SUCCESS;
-}
-
-#undef EMIT_MOV
-
-#define TEST_SL_IMM(src, srcw) \
-	(((src) & SLJIT_IMM) && (srcw) <= SIMM_MAX && (srcw) >= SIMM_MIN)
-
-#define TEST_UL_IMM(src, srcw) \
-	(((src) & SLJIT_IMM) && !((srcw) & ~0xffff))
-
-#if (defined SLJIT_CONFIG_PPC_64 && SLJIT_CONFIG_PPC_64)
-#define TEST_SH_IMM(src, srcw) \
-	(((src) & SLJIT_IMM) && !((srcw) & 0xffff) && (srcw) <= 0x7fffffffl && (srcw) >= -0x80000000l)
-#else
-#define TEST_SH_IMM(src, srcw) \
-	(((src) & SLJIT_IMM) && !((srcw) & 0xffff))
-#endif
-
-#define TEST_UH_IMM(src, srcw) \
-	(((src) & SLJIT_IMM) && !((srcw) & ~0xffff0000))
-
-#if (defined SLJIT_CONFIG_PPC_64 && SLJIT_CONFIG_PPC_64)
-#define TEST_ADD_IMM(src, srcw) \
-	(((src) & SLJIT_IMM) && (srcw) <= 0x7fff7fffl && (srcw) >= -0x80000000l)
-#else
-#define TEST_ADD_IMM(src, srcw) \
-	((src) & SLJIT_IMM)
-#endif
-
-#if (defined SLJIT_CONFIG_PPC_64 && SLJIT_CONFIG_PPC_64)
-#define TEST_UI_IMM(src, srcw) \
-	(((src) & SLJIT_IMM) && !((srcw) & ~0xffffffff))
-#else
-#define TEST_UI_IMM(src, srcw) \
-	((src) & SLJIT_IMM)
-#endif
-
-SLJIT_API_FUNC_ATTRIBUTE sljit_si sljit_emit_op2(struct sljit_compiler *compiler, sljit_si op,
-	sljit_si dst, sljit_sw dstw,
-	sljit_si src1, sljit_sw src1w,
-	sljit_si src2, sljit_sw src2w)
-{
-	sljit_si flags = GET_FLAGS(op) ? ALT_SET_FLAGS : 0;
-
-	CHECK_ERROR();
-	check_sljit_emit_op2(compiler, op, dst, dstw, src1, src1w, src2, src2w);
-	ADJUST_LOCAL_OFFSET(dst, dstw);
-	ADJUST_LOCAL_OFFSET(src1, src1w);
-	ADJUST_LOCAL_OFFSET(src2, src2w);
-
-	if ((src1 & SLJIT_IMM) && src1w == 0)
-		src1 = TMP_ZERO;
-	if ((src2 & SLJIT_IMM) && src2w == 0)
-		src2 = TMP_ZERO;
-
-#if (defined SLJIT_CONFIG_PPC_64 && SLJIT_CONFIG_PPC_64)
-	if (op & SLJIT_INT_OP) {
-		/* Most operations expect sign extended arguments. */
-		flags |= INT_DATA | SIGNED_DATA;
-		if (src1 & SLJIT_IMM)
-			src1w = (sljit_si)(src1w);
-		if (src2 & SLJIT_IMM)
-			src2w = (sljit_si)(src2w);
-		if (GET_FLAGS(op))
-			flags |= ALT_SIGN_EXT;
-	}
-#endif
-	if (op & SLJIT_SET_O)
-		FAIL_IF(push_inst(compiler, MTXER | S(TMP_ZERO)));
-	if (src2 == TMP_REG2)
-		flags |= ALT_KEEP_CACHE;
-
-	switch (GET_OPCODE(op)) {
-	case SLJIT_ADD:
-		if (!GET_FLAGS(op) && ((src1 | src2) & SLJIT_IMM)) {
-			if (TEST_SL_IMM(src2, src2w)) {
-				compiler->imm = src2w & 0xffff;
-				return emit_op(compiler, SLJIT_ADD, flags | ALT_FORM1, dst, dstw, src1, src1w, TMP_REG2, 0);
-			}
-			if (TEST_SL_IMM(src1, src1w)) {
-				compiler->imm = src1w & 0xffff;
-				return emit_op(compiler, SLJIT_ADD, flags | ALT_FORM1, dst, dstw, src2, src2w, TMP_REG2, 0);
-			}
-			if (TEST_SH_IMM(src2, src2w)) {
-				compiler->imm = (src2w >> 16) & 0xffff;
-				return emit_op(compiler, SLJIT_ADD, flags | ALT_FORM2, dst, dstw, src1, src1w, TMP_REG2, 0);
-			}
-			if (TEST_SH_IMM(src1, src1w)) {
-				compiler->imm = (src1w >> 16) & 0xffff;
-				return emit_op(compiler, SLJIT_ADD, flags | ALT_FORM2, dst, dstw, src2, src2w, TMP_REG2, 0);
-			}
-			/* Range between -1 and -32768 is covered above. */
-			if (TEST_ADD_IMM(src2, src2w)) {
-				compiler->imm = src2w & 0xffffffff;
-				return emit_op(compiler, SLJIT_ADD, flags | ALT_FORM4, dst, dstw, src1, src1w, TMP_REG2, 0);
-			}
-			if (TEST_ADD_IMM(src1, src1w)) {
-				compiler->imm = src1w & 0xffffffff;
-				return emit_op(compiler, SLJIT_ADD, flags | ALT_FORM4, dst, dstw, src2, src2w, TMP_REG2, 0);
-			}
-		}
-		if (!(GET_FLAGS(op) & (SLJIT_SET_E | SLJIT_SET_O))) {
-			if (TEST_SL_IMM(src2, src2w)) {
-				compiler->imm = src2w & 0xffff;
-				return emit_op(compiler, SLJIT_ADD, flags | ALT_FORM3, dst, dstw, src1, src1w, TMP_REG2, 0);
-			}
-			if (TEST_SL_IMM(src1, src1w)) {
-				compiler->imm = src1w & 0xffff;
-				return emit_op(compiler, SLJIT_ADD, flags | ALT_FORM3, dst, dstw, src2, src2w, TMP_REG2, 0);
-			}
-		}
-		return emit_op(compiler, SLJIT_ADD, flags, dst, dstw, src1, src1w, src2, src2w);
-
-	case SLJIT_ADDC:
-		return emit_op(compiler, SLJIT_ADDC, flags | (!(op & SLJIT_KEEP_FLAGS) ? 0 : ALT_FORM1), dst, dstw, src1, src1w, src2, src2w);
-
-	case SLJIT_SUB:
-		if (!GET_FLAGS(op) && ((src1 | src2) & SLJIT_IMM)) {
-			if (TEST_SL_IMM(src2, -src2w)) {
-				compiler->imm = (-src2w) & 0xffff;
-				return emit_op(compiler, SLJIT_ADD, flags | ALT_FORM1, dst, dstw, src1, src1w, TMP_REG2, 0);
-			}
-			if (TEST_SL_IMM(src1, src1w)) {
-				compiler->imm = src1w & 0xffff;
-				return emit_op(compiler, SLJIT_SUB, flags | ALT_FORM1, dst, dstw, src2, src2w, TMP_REG2, 0);
-			}
-			if (TEST_SH_IMM(src2, -src2w)) {
-				compiler->imm = ((-src2w) >> 16) & 0xffff;
-				return emit_op(compiler, SLJIT_ADD, flags | ALT_FORM2, dst, dstw, src1, src1w, TMP_REG2, 0);
-			}
-			/* Range between -1 and -32768 is covered above. */
-			if (TEST_ADD_IMM(src2, -src2w)) {
-				compiler->imm = -src2w & 0xffffffff;
-				return emit_op(compiler, SLJIT_ADD, flags | ALT_FORM4, dst, dstw, src1, src1w, TMP_REG2, 0);
-			}
-		}
-		if (dst == SLJIT_UNUSED && (op & (SLJIT_SET_E | SLJIT_SET_U | SLJIT_SET_S)) && !(op & (SLJIT_SET_O | SLJIT_SET_C))) {
-			if (!(op & SLJIT_SET_U)) {
-				/* We know ALT_SIGN_EXT is set if it is an SLJIT_INT_OP on 64 bit systems. */
-				if (TEST_SL_IMM(src2, src2w)) {
-					compiler->imm = src2w & 0xffff;
-					return emit_op(compiler, SLJIT_SUB, flags | ALT_FORM2, dst, dstw, src1, src1w, TMP_REG2, 0);
-				}
-				if (GET_FLAGS(op) == SLJIT_SET_E && TEST_SL_IMM(src1, src1w)) {
-					compiler->imm = src1w & 0xffff;
-					return emit_op(compiler, SLJIT_SUB, flags | ALT_FORM2, dst, dstw, src2, src2w, TMP_REG2, 0);
-				}
-			}
-			if (!(op & (SLJIT_SET_E | SLJIT_SET_S))) {
-				/* We know ALT_SIGN_EXT is set if it is an SLJIT_INT_OP on 64 bit systems. */
-				if (TEST_UL_IMM(src2, src2w)) {
-					compiler->imm = src2w & 0xffff;
-					return emit_op(compiler, SLJIT_SUB, flags | ALT_FORM3, dst, dstw, src1, src1w, TMP_REG2, 0);
-				}
-				return emit_op(compiler, SLJIT_SUB, flags | ALT_FORM4, dst, dstw, src1, src1w, src2, src2w);
-			}
-			if ((src2 & SLJIT_IMM) && src2w >= 0 && src2w <= 0x7fff) {
-				compiler->imm = src2w;
-				return emit_op(compiler, SLJIT_SUB, flags | ALT_FORM2 | ALT_FORM3, dst, dstw, src1, src1w, TMP_REG2, 0);
-			}
-			return emit_op(compiler, SLJIT_SUB, flags | ((op & SLJIT_SET_U) ? ALT_FORM4 : 0) | ((op & (SLJIT_SET_E | SLJIT_SET_S)) ? ALT_FORM5 : 0), dst, dstw, src1, src1w, src2, src2w);
-		}
-		if (!(op & (SLJIT_SET_E | SLJIT_SET_U | SLJIT_SET_S | SLJIT_SET_O))) {
-			if (TEST_SL_IMM(src2, -src2w)) {
-				compiler->imm = (-src2w) & 0xffff;
-				return emit_op(compiler, SLJIT_ADD, flags | ALT_FORM3, dst, dstw, src1, src1w, TMP_REG2, 0);
-			}
-		}
-		/* We know ALT_SIGN_EXT is set if it is an SLJIT_INT_OP on 64 bit systems. */
-		return emit_op(compiler, SLJIT_SUB, flags | (!(op & SLJIT_SET_U) ? 0 : ALT_FORM6), dst, dstw, src1, src1w, src2, src2w);
-
-	case SLJIT_SUBC:
-		return emit_op(compiler, SLJIT_SUBC, flags | (!(op & SLJIT_KEEP_FLAGS) ? 0 : ALT_FORM1), dst, dstw, src1, src1w, src2, src2w);
-
-	case SLJIT_MUL:
-#if (defined SLJIT_CONFIG_PPC_64 && SLJIT_CONFIG_PPC_64)
-		if (op & SLJIT_INT_OP)
-			flags |= ALT_FORM2;
-#endif
-		if (!GET_FLAGS(op)) {
-			if (TEST_SL_IMM(src2, src2w)) {
-				compiler->imm = src2w & 0xffff;
-				return emit_op(compiler, SLJIT_MUL, flags | ALT_FORM1, dst, dstw, src1, src1w, TMP_REG2, 0);
-			}
-			if (TEST_SL_IMM(src1, src1w)) {
-				compiler->imm = src1w & 0xffff;
-				return emit_op(compiler, SLJIT_MUL, flags | ALT_FORM1, dst, dstw, src2, src2w, TMP_REG2, 0);
-			}
-		}
-		return emit_op(compiler, SLJIT_MUL, flags, dst, dstw, src1, src1w, src2, src2w);
-
-	case SLJIT_AND:
-	case SLJIT_OR:
-	case SLJIT_XOR:
-		/* Commutative unsigned operations. */
-		if (!GET_FLAGS(op) || GET_OPCODE(op) == SLJIT_AND) {
-			if (TEST_UL_IMM(src2, src2w)) {
-				compiler->imm = src2w;
-				return emit_op(compiler, GET_OPCODE(op), flags | ALT_FORM1, dst, dstw, src1, src1w, TMP_REG2, 0);
-			}
-			if (TEST_UL_IMM(src1, src1w)) {
-				compiler->imm = src1w;
-				return emit_op(compiler, GET_OPCODE(op), flags | ALT_FORM1, dst, dstw, src2, src2w, TMP_REG2, 0);
-			}
-			if (TEST_UH_IMM(src2, src2w)) {
-				compiler->imm = (src2w >> 16) & 0xffff;
-				return emit_op(compiler, GET_OPCODE(op), flags | ALT_FORM2, dst, dstw, src1, src1w, TMP_REG2, 0);
-			}
-			if (TEST_UH_IMM(src1, src1w)) {
-				compiler->imm = (src1w >> 16) & 0xffff;
-				return emit_op(compiler, GET_OPCODE(op), flags | ALT_FORM2, dst, dstw, src2, src2w, TMP_REG2, 0);
-			}
-		}
-		if (!GET_FLAGS(op) && GET_OPCODE(op) != SLJIT_AND) {
-			if (TEST_UI_IMM(src2, src2w)) {
-				compiler->imm = src2w;
-				return emit_op(compiler, GET_OPCODE(op), flags | ALT_FORM3, dst, dstw, src1, src1w, TMP_REG2, 0);
-			}
-			if (TEST_UI_IMM(src1, src1w)) {
-				compiler->imm = src1w;
-				return emit_op(compiler, GET_OPCODE(op), flags | ALT_FORM3, dst, dstw, src2, src2w, TMP_REG2, 0);
-			}
-		}
-		return emit_op(compiler, GET_OPCODE(op), flags, dst, dstw, src1, src1w, src2, src2w);
-
-	case SLJIT_ASHR:
-		if (op & SLJIT_KEEP_FLAGS)
-			flags |= ALT_FORM3;
-		/* Fall through. */
-	case SLJIT_SHL:
-	case SLJIT_LSHR:
-#if (defined SLJIT_CONFIG_PPC_64 && SLJIT_CONFIG_PPC_64)
-		if (op & SLJIT_INT_OP)
-			flags |= ALT_FORM2;
-#endif
-		if (src2 & SLJIT_IMM) {
-			compiler->imm = src2w;
-			return emit_op(compiler, GET_OPCODE(op), flags | ALT_FORM1, dst, dstw, src1, src1w, TMP_REG2, 0);
-		}
-		return emit_op(compiler, GET_OPCODE(op), flags, dst, dstw, src1, src1w, src2, src2w);
-	}
-
-	return SLJIT_SUCCESS;
-}
-
-SLJIT_API_FUNC_ATTRIBUTE sljit_si sljit_get_register_index(sljit_si reg)
-{
-	check_sljit_get_register_index(reg);
-	return reg_map[reg];
-}
-
-SLJIT_API_FUNC_ATTRIBUTE sljit_si sljit_get_float_register_index(sljit_si reg)
-{
-	check_sljit_get_float_register_index(reg);
-	return reg;
-}
-
-SLJIT_API_FUNC_ATTRIBUTE sljit_si sljit_emit_op_custom(struct sljit_compiler *compiler,
-	void *instruction, sljit_si size)
-{
-	CHECK_ERROR();
-	check_sljit_emit_op_custom(compiler, instruction, size);
-	SLJIT_ASSERT(size == 4);
-
-	return push_inst(compiler, *(sljit_ins*)instruction);
-}
-
-/* --------------------------------------------------------------------- */
-/*  Floating point operators                                             */
-/* --------------------------------------------------------------------- */
-
-SLJIT_API_FUNC_ATTRIBUTE sljit_si sljit_is_fpu_available(void)
-{
-#ifdef SLJIT_IS_FPU_AVAILABLE
-	return SLJIT_IS_FPU_AVAILABLE;
-#else
-	/* Available by default. */
-	return 1;
-#endif
-}
-
-#define FLOAT_DATA(op) (DOUBLE_DATA | ((op & SLJIT_SINGLE_OP) >> 6))
-#define SELECT_FOP(op, single, double) ((op & SLJIT_SINGLE_OP) ? single : double)
-
-SLJIT_API_FUNC_ATTRIBUTE sljit_si sljit_emit_fop1(struct sljit_compiler *compiler, sljit_si op,
-	sljit_si dst, sljit_sw dstw,
-	sljit_si src, sljit_sw srcw)
-{
-	sljit_si dst_fr;
-
-	CHECK_ERROR();
-	check_sljit_emit_fop1(compiler, op, dst, dstw, src, srcw);
-	SLJIT_COMPILE_ASSERT((SLJIT_SINGLE_OP == 0x100) && !(DOUBLE_DATA & 0x4), float_transfer_bit_error);
-
-	compiler->cache_arg = 0;
-	compiler->cache_argw = 0;
-
-	if (GET_OPCODE(op) == SLJIT_CMPD) {
-		if (dst & SLJIT_MEM) {
-			FAIL_IF(emit_op_mem2(compiler, FLOAT_DATA(op) | LOAD_DATA, TMP_FREG1, dst, dstw, src, srcw));
-			dst = TMP_FREG1;
-		}
-
-		if (src & SLJIT_MEM) {
-			FAIL_IF(emit_op_mem2(compiler, FLOAT_DATA(op) | LOAD_DATA, TMP_FREG2, src, srcw, 0, 0));
-			src = TMP_FREG2;
-		}
-
-		return push_inst(compiler, FCMPU | CRD(4) | FA(dst) | FB(src));
-	}
-
-	dst_fr = FAST_IS_REG(dst) ? dst : TMP_FREG1;
-
-	if (src & SLJIT_MEM) {
-		FAIL_IF(emit_op_mem2(compiler, FLOAT_DATA(op) | LOAD_DATA, dst_fr, src, srcw, dst, dstw));
-		src = dst_fr;
-	}
-
-	switch (GET_OPCODE(op)) {
-		case SLJIT_MOVD:
-			if (src != dst_fr && dst_fr != TMP_FREG1)
-				FAIL_IF(push_inst(compiler, FMR | FD(dst_fr) | FB(src)));
-			break;
-		case SLJIT_NEGD:
-			FAIL_IF(push_inst(compiler, FNEG | FD(dst_fr) | FB(src)));
-			break;
-		case SLJIT_ABSD:
-			FAIL_IF(push_inst(compiler, FABS | FD(dst_fr) | FB(src)));
-			break;
-	}
-
-	if (dst_fr == TMP_FREG1) {
-		if (GET_OPCODE(op) == SLJIT_MOVD)
-			dst_fr = src;
-		FAIL_IF(emit_op_mem2(compiler, FLOAT_DATA(op), dst_fr, dst, dstw, 0, 0));
-	}
-
-	return SLJIT_SUCCESS;
-}
-
-SLJIT_API_FUNC_ATTRIBUTE sljit_si sljit_emit_fop2(struct sljit_compiler *compiler, sljit_si op,
-	sljit_si dst, sljit_sw dstw,
-	sljit_si src1, sljit_sw src1w,
-	sljit_si src2, sljit_sw src2w)
-{
-	sljit_si dst_fr, flags = 0;
-
-	CHECK_ERROR();
-	check_sljit_emit_fop2(compiler, op, dst, dstw, src1, src1w, src2, src2w);
-
-	compiler->cache_arg = 0;
-	compiler->cache_argw = 0;
-
-	dst_fr = FAST_IS_REG(dst) ? dst : TMP_FREG2;
-
-	if (src1 & SLJIT_MEM) {
-		if (getput_arg_fast(compiler, FLOAT_DATA(op) | LOAD_DATA, TMP_FREG1, src1, src1w)) {
-			FAIL_IF(compiler->error);
-			src1 = TMP_FREG1;
-		} else
-			flags |= ALT_FORM1;
-	}
-
-	if (src2 & SLJIT_MEM) {
-		if (getput_arg_fast(compiler, FLOAT_DATA(op) | LOAD_DATA, TMP_FREG2, src2, src2w)) {
-			FAIL_IF(compiler->error);
-			src2 = TMP_FREG2;
-		} else
-			flags |= ALT_FORM2;
-	}
-
-	if ((flags & (ALT_FORM1 | ALT_FORM2)) == (ALT_FORM1 | ALT_FORM2)) {
-		if (!can_cache(src1, src1w, src2, src2w) && can_cache(src1, src1w, dst, dstw)) {
-			FAIL_IF(getput_arg(compiler, FLOAT_DATA(op) | LOAD_DATA, TMP_FREG2, src2, src2w, src1, src1w));
-			FAIL_IF(getput_arg(compiler, FLOAT_DATA(op) | LOAD_DATA, TMP_FREG1, src1, src1w, dst, dstw));
-		}
-		else {
-			FAIL_IF(getput_arg(compiler, FLOAT_DATA(op) | LOAD_DATA, TMP_FREG1, src1, src1w, src2, src2w));
-			FAIL_IF(getput_arg(compiler, FLOAT_DATA(op) | LOAD_DATA, TMP_FREG2, src2, src2w, dst, dstw));
-		}
-	}
-	else if (flags & ALT_FORM1)
-		FAIL_IF(getput_arg(compiler, FLOAT_DATA(op) | LOAD_DATA, TMP_FREG1, src1, src1w, dst, dstw));
-	else if (flags & ALT_FORM2)
-		FAIL_IF(getput_arg(compiler, FLOAT_DATA(op) | LOAD_DATA, TMP_FREG2, src2, src2w, dst, dstw));
-
-	if (flags & ALT_FORM1)
-		src1 = TMP_FREG1;
-	if (flags & ALT_FORM2)
-		src2 = TMP_FREG2;
-
-	switch (GET_OPCODE(op)) {
-	case SLJIT_ADDD:
-		FAIL_IF(push_inst(compiler, SELECT_FOP(op, FADDS, FADD) | FD(dst_fr) | FA(src1) | FB(src2)));
-		break;
-
-	case SLJIT_SUBD:
-		FAIL_IF(push_inst(compiler, SELECT_FOP(op, FSUBS, FSUB) | FD(dst_fr) | FA(src1) | FB(src2)));
-		break;
-
-	case SLJIT_MULD:
-		FAIL_IF(push_inst(compiler, SELECT_FOP(op, FMULS, FMUL) | FD(dst_fr) | FA(src1) | FC(src2) /* FMUL use FC as src2 */));
-		break;
-
-	case SLJIT_DIVD:
-		FAIL_IF(push_inst(compiler, SELECT_FOP(op, FDIVS, FDIV) | FD(dst_fr) | FA(src1) | FB(src2)));
-		break;
-	}
-
-	if (dst_fr == TMP_FREG2)
-		FAIL_IF(emit_op_mem2(compiler, FLOAT_DATA(op), TMP_FREG2, dst, dstw, 0, 0));
-
-	return SLJIT_SUCCESS;
-}
-
-#undef FLOAT_DATA
-#undef SELECT_FOP
-
-/* --------------------------------------------------------------------- */
-/*  Other instructions                                                   */
-/* --------------------------------------------------------------------- */
-
-SLJIT_API_FUNC_ATTRIBUTE sljit_si sljit_emit_fast_enter(struct sljit_compiler *compiler, sljit_si dst, sljit_sw dstw)
-{
-	CHECK_ERROR();
-	check_sljit_emit_fast_enter(compiler, dst, dstw);
-	ADJUST_LOCAL_OFFSET(dst, dstw);
-
-	/* For UNUSED dst. Uncommon, but possible. */
-	if (dst == SLJIT_UNUSED)
-		return SLJIT_SUCCESS;
-
-	if (FAST_IS_REG(dst))
-		return push_inst(compiler, MFLR | D(dst));
-
-	/* Memory. */
-	FAIL_IF(push_inst(compiler, MFLR | D(TMP_REG2)));
-	return emit_op(compiler, SLJIT_MOV, WORD_DATA, dst, dstw, TMP_REG1, 0, TMP_REG2, 0);
-}
-
-SLJIT_API_FUNC_ATTRIBUTE sljit_si sljit_emit_fast_return(struct sljit_compiler *compiler, sljit_si src, sljit_sw srcw)
-{
-	CHECK_ERROR();
-	check_sljit_emit_fast_return(compiler, src, srcw);
-	ADJUST_LOCAL_OFFSET(src, srcw);
-
-	if (FAST_IS_REG(src))
-		FAIL_IF(push_inst(compiler, MTLR | S(src)));
-	else {
-		if (src & SLJIT_MEM)
-			FAIL_IF(emit_op(compiler, SLJIT_MOV, WORD_DATA, TMP_REG2, 0, TMP_REG1, 0, src, srcw));
-		else if (src & SLJIT_IMM)
-			FAIL_IF(load_immediate(compiler, TMP_REG2, srcw));
-		FAIL_IF(push_inst(compiler, MTLR | S(TMP_REG2)));
-	}
-	return push_inst(compiler, BLR);
-}
-
-/* --------------------------------------------------------------------- */
-/*  Conditional instructions                                             */
-/* --------------------------------------------------------------------- */
-
-SLJIT_API_FUNC_ATTRIBUTE struct sljit_label* sljit_emit_label(struct sljit_compiler *compiler)
-{
-	struct sljit_label *label;
-
-	CHECK_ERROR_PTR();
-	check_sljit_emit_label(compiler);
-
-	if (compiler->last_label && compiler->last_label->size == compiler->size)
-		return compiler->last_label;
-
-	label = (struct sljit_label*)ensure_abuf(compiler, sizeof(struct sljit_label));
-	PTR_FAIL_IF(!label);
-	set_label(label, compiler);
-	return label;
-}
-
-static sljit_ins get_bo_bi_flags(sljit_si type)
-{
-	switch (type) {
-	case SLJIT_C_EQUAL:
-		return (12 << 21) | (2 << 16);
-
-	case SLJIT_C_NOT_EQUAL:
-		return (4 << 21) | (2 << 16);
-
-	case SLJIT_C_LESS:
-	case SLJIT_C_FLOAT_LESS:
-		return (12 << 21) | ((4 + 0) << 16);
-
-	case SLJIT_C_GREATER_EQUAL:
-	case SLJIT_C_FLOAT_GREATER_EQUAL:
-		return (4 << 21) | ((4 + 0) << 16);
-
-	case SLJIT_C_GREATER:
-	case SLJIT_C_FLOAT_GREATER:
-		return (12 << 21) | ((4 + 1) << 16);
-
-	case SLJIT_C_LESS_EQUAL:
-	case SLJIT_C_FLOAT_LESS_EQUAL:
-		return (4 << 21) | ((4 + 1) << 16);
-
-	case SLJIT_C_SIG_LESS:
-		return (12 << 21) | (0 << 16);
-
-	case SLJIT_C_SIG_GREATER_EQUAL:
-		return (4 << 21) | (0 << 16);
-
-	case SLJIT_C_SIG_GREATER:
-		return (12 << 21) | (1 << 16);
-
-	case SLJIT_C_SIG_LESS_EQUAL:
-		return (4 << 21) | (1 << 16);
-
-	case SLJIT_C_OVERFLOW:
-	case SLJIT_C_MUL_OVERFLOW:
-		return (12 << 21) | (3 << 16);
-
-	case SLJIT_C_NOT_OVERFLOW:
-	case SLJIT_C_MUL_NOT_OVERFLOW:
-		return (4 << 21) | (3 << 16);
-
-	case SLJIT_C_FLOAT_EQUAL:
-		return (12 << 21) | ((4 + 2) << 16);
-
-	case SLJIT_C_FLOAT_NOT_EQUAL:
-		return (4 << 21) | ((4 + 2) << 16);
-
-	case SLJIT_C_FLOAT_UNORDERED:
-		return (12 << 21) | ((4 + 3) << 16);
-
-	case SLJIT_C_FLOAT_ORDERED:
-		return (4 << 21) | ((4 + 3) << 16);
-
-	default:
-		SLJIT_ASSERT(type >= SLJIT_JUMP && type <= SLJIT_CALL3);
-		return (20 << 21);
-	}
-}
-
-SLJIT_API_FUNC_ATTRIBUTE struct sljit_jump* sljit_emit_jump(struct sljit_compiler *compiler, sljit_si type)
-{
-	struct sljit_jump *jump;
-	sljit_ins bo_bi_flags;
-
-	CHECK_ERROR_PTR();
-	check_sljit_emit_jump(compiler, type);
-
-	bo_bi_flags = get_bo_bi_flags(type & 0xff);
-	if (!bo_bi_flags)
-		return NULL;
-
-	jump = (struct sljit_jump*)ensure_abuf(compiler, sizeof(struct sljit_jump));
-	PTR_FAIL_IF(!jump);
-	set_jump(jump, compiler, type & SLJIT_REWRITABLE_JUMP);
-	type &= 0xff;
-
-	/* In PPC, we don't need to touch the arguments. */
-	if (type < SLJIT_JUMP)
-		jump->flags |= IS_COND;
-#if (defined SLJIT_PASS_ENTRY_ADDR_TO_CALL && SLJIT_PASS_ENTRY_ADDR_TO_CALL)
-	if (type >= SLJIT_CALL0)
-		jump->flags |= IS_CALL;
-#endif
-
-	PTR_FAIL_IF(emit_const(compiler, TMP_CALL_REG, 0));
-	PTR_FAIL_IF(push_inst(compiler, MTCTR | S(TMP_CALL_REG)));
-	jump->addr = compiler->size;
-	PTR_FAIL_IF(push_inst(compiler, BCCTR | bo_bi_flags | (type >= SLJIT_FAST_CALL ? 1 : 0)));
-	return jump;
-}
-
-SLJIT_API_FUNC_ATTRIBUTE sljit_si sljit_emit_ijump(struct sljit_compiler *compiler, sljit_si type, sljit_si src, sljit_sw srcw)
-{
-	struct sljit_jump *jump = NULL;
-	sljit_si src_r;
-
-	CHECK_ERROR();
-	check_sljit_emit_ijump(compiler, type, src, srcw);
-	ADJUST_LOCAL_OFFSET(src, srcw);
-
-	if (FAST_IS_REG(src)) {
-#if (defined SLJIT_PASS_ENTRY_ADDR_TO_CALL && SLJIT_PASS_ENTRY_ADDR_TO_CALL)
-		if (type >= SLJIT_CALL0) {
-			FAIL_IF(push_inst(compiler, OR | S(src) | A(TMP_CALL_REG) | B(src)));
-			src_r = TMP_CALL_REG;
-		}
-		else
-			src_r = src;
-#else
-		src_r = src;
-#endif
-	} else if (src & SLJIT_IMM) {
-		jump = (struct sljit_jump*)ensure_abuf(compiler, sizeof(struct sljit_jump));
-		FAIL_IF(!jump);
-		set_jump(jump, compiler, JUMP_ADDR);
-		jump->u.target = srcw;
-#if (defined SLJIT_PASS_ENTRY_ADDR_TO_CALL && SLJIT_PASS_ENTRY_ADDR_TO_CALL)
-		if (type >= SLJIT_CALL0)
-			jump->flags |= IS_CALL;
-#endif
-		FAIL_IF(emit_const(compiler, TMP_CALL_REG, 0));
-		src_r = TMP_CALL_REG;
-	}
-	else {
-		FAIL_IF(emit_op(compiler, SLJIT_MOV, WORD_DATA, TMP_CALL_REG, 0, TMP_REG1, 0, src, srcw));
-		src_r = TMP_CALL_REG;
-	}
-
-	FAIL_IF(push_inst(compiler, MTCTR | S(src_r)));
-	if (jump)
-		jump->addr = compiler->size;
-	return push_inst(compiler, BCCTR | (20 << 21) | (type >= SLJIT_FAST_CALL ? 1 : 0));
-}
-
-/* Get a bit from CR, all other bits are zeroed. */
-#define GET_CR_BIT(bit, dst) \
-	FAIL_IF(push_inst(compiler, MFCR | D(dst))); \
-	FAIL_IF(push_inst(compiler, RLWINM | S(dst) | A(dst) | ((1 + (bit)) << 11) | (31 << 6) | (31 << 1)));
-
-#define INVERT_BIT(dst) \
-	FAIL_IF(push_inst(compiler, XORI | S(dst) | A(dst) | 0x1));
-
-SLJIT_API_FUNC_ATTRIBUTE sljit_si sljit_emit_op_flags(struct sljit_compiler *compiler, sljit_si op,
-	sljit_si dst, sljit_sw dstw,
-	sljit_si src, sljit_sw srcw,
-	sljit_si type)
-{
-	sljit_si reg, input_flags;
-	sljit_si flags = GET_ALL_FLAGS(op);
-	sljit_sw original_dstw = dstw;
-
-	CHECK_ERROR();
-	check_sljit_emit_op_flags(compiler, op, dst, dstw, src, srcw, type);
-	ADJUST_LOCAL_OFFSET(dst, dstw);
-
-	if (dst == SLJIT_UNUSED)
-		return SLJIT_SUCCESS;
-
-	op = GET_OPCODE(op);
-	reg = (op < SLJIT_ADD && FAST_IS_REG(dst)) ? dst : TMP_REG2;
-
-	compiler->cache_arg = 0;
-	compiler->cache_argw = 0;
-	if (op >= SLJIT_ADD && (src & SLJIT_MEM)) {
-		ADJUST_LOCAL_OFFSET(src, srcw);
-#if (defined SLJIT_CONFIG_PPC_64 && SLJIT_CONFIG_PPC_64)
-		input_flags = (flags & SLJIT_INT_OP) ? INT_DATA : WORD_DATA;
-#else
-		input_flags = WORD_DATA;
-#endif
-		FAIL_IF(emit_op_mem2(compiler, input_flags | LOAD_DATA, TMP_REG1, src, srcw, dst, dstw));
-		src = TMP_REG1;
-		srcw = 0;
-	}
-
-	switch (type) {
-	case SLJIT_C_EQUAL:
-		GET_CR_BIT(2, reg);
-		break;
-
-	case SLJIT_C_NOT_EQUAL:
-		GET_CR_BIT(2, reg);
-		INVERT_BIT(reg);
-		break;
-
-	case SLJIT_C_LESS:
-	case SLJIT_C_FLOAT_LESS:
-		GET_CR_BIT(4 + 0, reg);
-		break;
-
-	case SLJIT_C_GREATER_EQUAL:
-	case SLJIT_C_FLOAT_GREATER_EQUAL:
-		GET_CR_BIT(4 + 0, reg);
-		INVERT_BIT(reg);
-		break;
-
-	case SLJIT_C_GREATER:
-	case SLJIT_C_FLOAT_GREATER:
-		GET_CR_BIT(4 + 1, reg);
-		break;
-
-	case SLJIT_C_LESS_EQUAL:
-	case SLJIT_C_FLOAT_LESS_EQUAL:
-		GET_CR_BIT(4 + 1, reg);
-		INVERT_BIT(reg);
-		break;
-
-	case SLJIT_C_SIG_LESS:
-		GET_CR_BIT(0, reg);
-		break;
-
-	case SLJIT_C_SIG_GREATER_EQUAL:
-		GET_CR_BIT(0, reg);
-		INVERT_BIT(reg);
-		break;
-
-	case SLJIT_C_SIG_GREATER:
-		GET_CR_BIT(1, reg);
-		break;
-
-	case SLJIT_C_SIG_LESS_EQUAL:
-		GET_CR_BIT(1, reg);
-		INVERT_BIT(reg);
-		break;
-
-	case SLJIT_C_OVERFLOW:
-	case SLJIT_C_MUL_OVERFLOW:
-		GET_CR_BIT(3, reg);
-		break;
-
-	case SLJIT_C_NOT_OVERFLOW:
-	case SLJIT_C_MUL_NOT_OVERFLOW:
-		GET_CR_BIT(3, reg);
-		INVERT_BIT(reg);
-		break;
-
-	case SLJIT_C_FLOAT_EQUAL:
-		GET_CR_BIT(4 + 2, reg);
-		break;
-
-	case SLJIT_C_FLOAT_NOT_EQUAL:
-		GET_CR_BIT(4 + 2, reg);
-		INVERT_BIT(reg);
-		break;
-
-	case SLJIT_C_FLOAT_UNORDERED:
-		GET_CR_BIT(4 + 3, reg);
-		break;
-
-	case SLJIT_C_FLOAT_ORDERED:
-		GET_CR_BIT(4 + 3, reg);
-		INVERT_BIT(reg);
-		break;
-
-	default:
-		SLJIT_ASSERT_STOP();
-		break;
-	}
-
-	if (op < SLJIT_ADD) {
-#if (defined SLJIT_CONFIG_PPC_64 && SLJIT_CONFIG_PPC_64)
-		if (op == SLJIT_MOV)
-			input_flags = WORD_DATA;
-		else {
-			op = SLJIT_MOV_UI;
-			input_flags = INT_DATA;
-		}
-#else
-		op = SLJIT_MOV;
-		input_flags = WORD_DATA;
-#endif
-		if (reg != TMP_REG2)
-			return SLJIT_SUCCESS;
-		return emit_op(compiler, op, input_flags, dst, dstw, TMP_REG1, 0, TMP_REG2, 0);
-	}
-
-#if (defined SLJIT_VERBOSE && SLJIT_VERBOSE) || (defined SLJIT_DEBUG && SLJIT_DEBUG)
-	compiler->skip_checks = 1;
-#endif
-	return sljit_emit_op2(compiler, op | flags, dst, original_dstw, src, srcw, TMP_REG2, 0);
-}
-
-SLJIT_API_FUNC_ATTRIBUTE struct sljit_const* sljit_emit_const(struct sljit_compiler *compiler, sljit_si dst, sljit_sw dstw, sljit_sw init_value)
-{
-	struct sljit_const *const_;
-	sljit_si reg;
-
-	CHECK_ERROR_PTR();
-	check_sljit_emit_const(compiler, dst, dstw, init_value);
-	ADJUST_LOCAL_OFFSET(dst, dstw);
-
-	const_ = (struct sljit_const*)ensure_abuf(compiler, sizeof(struct sljit_const));
-	PTR_FAIL_IF(!const_);
-	set_const(const_, compiler);
-
-	reg = SLOW_IS_REG(dst) ? dst : TMP_REG2;
-
-	PTR_FAIL_IF(emit_const(compiler, reg, init_value));
-
-	if (dst & SLJIT_MEM)
-		PTR_FAIL_IF(emit_op(compiler, SLJIT_MOV, WORD_DATA, dst, dstw, TMP_REG1, 0, TMP_REG2, 0));
-	return const_;
-}
diff --git a/src/extra/pcre/sljit/sljitNativeSPARC_32.c b/src/extra/pcre/sljit/sljitNativeSPARC_32.c
deleted file mode 100644
index 80479bf..0000000
--- a/src/extra/pcre/sljit/sljitNativeSPARC_32.c
+++ /dev/null
@@ -1,164 +0,0 @@
-/*
- *    Stack-less Just-In-Time compiler
- *
- *    Copyright 2009-2012 Zoltan Herczeg (hzmester at freemail.hu). All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without modification, are
- * permitted provided that the following conditions are met:
- *
- *   1. Redistributions of source code must retain the above copyright notice, this list of
- *      conditions and the following disclaimer.
- *
- *   2. Redistributions in binary form must reproduce the above copyright notice, this list
- *      of conditions and the following disclaimer in the documentation and/or other materials
- *      provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER(S) AND CONTRIBUTORS ``AS IS'' AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
- * SHALL THE COPYRIGHT HOLDER(S) OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
- * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
- * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
- * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-static sljit_si load_immediate(struct sljit_compiler *compiler, sljit_si dst, sljit_sw imm)
-{
-	if (imm <= SIMM_MAX && imm >= SIMM_MIN)
-		return push_inst(compiler, OR | D(dst) | S1(0) | IMM(imm), DR(dst));
-
-	FAIL_IF(push_inst(compiler, SETHI | D(dst) | ((imm >> 10) & 0x3fffff), DR(dst)));
-	return (imm & 0x3ff) ? push_inst(compiler, OR | D(dst) | S1(dst) | IMM_ARG | (imm & 0x3ff), DR(dst)) : SLJIT_SUCCESS;
-}
-
-#define ARG2(flags, src2) ((flags & SRC2_IMM) ? IMM(src2) : S2(src2))
-
-static SLJIT_INLINE sljit_si emit_single_op(struct sljit_compiler *compiler, sljit_si op, sljit_si flags,
-	sljit_si dst, sljit_si src1, sljit_sw src2)
-{
-	SLJIT_COMPILE_ASSERT(ICC_IS_SET == SET_FLAGS, icc_is_set_and_set_flags_must_be_the_same);
-
-	switch (op) {
-	case SLJIT_MOV:
-	case SLJIT_MOV_UI:
-	case SLJIT_MOV_SI:
-	case SLJIT_MOV_P:
-		SLJIT_ASSERT(src1 == TMP_REG1 && !(flags & SRC2_IMM));
-		if (dst != src2)
-			return push_inst(compiler, OR | D(dst) | S1(0) | S2(src2), DR(dst));
-		return SLJIT_SUCCESS;
-
-	case SLJIT_MOV_UB:
-	case SLJIT_MOV_SB:
-		SLJIT_ASSERT(src1 == TMP_REG1 && !(flags & SRC2_IMM));
-		if ((flags & (REG_DEST | REG2_SOURCE)) == (REG_DEST | REG2_SOURCE)) {
-			if (op == SLJIT_MOV_UB)
-				return push_inst(compiler, AND | D(dst) | S1(src2) | IMM(0xff), DR(dst));
-			FAIL_IF(push_inst(compiler, SLL | D(dst) | S1(src2) | IMM(24), DR(dst)));
-			return push_inst(compiler, SRA | D(dst) | S1(dst) | IMM(24), DR(dst));
-		}
-		else if (dst != src2)
-			SLJIT_ASSERT_STOP();
-		return SLJIT_SUCCESS;
-
-	case SLJIT_MOV_UH:
-	case SLJIT_MOV_SH:
-		SLJIT_ASSERT(src1 == TMP_REG1 && !(flags & SRC2_IMM));
-		if ((flags & (REG_DEST | REG2_SOURCE)) == (REG_DEST | REG2_SOURCE)) {
-			FAIL_IF(push_inst(compiler, SLL | D(dst) | S1(src2) | IMM(16), DR(dst)));
-			return push_inst(compiler, (op == SLJIT_MOV_SH ? SRA : SRL) | D(dst) | S1(dst) | IMM(16), DR(dst));
-		}
-		else if (dst != src2)
-			SLJIT_ASSERT_STOP();
-		return SLJIT_SUCCESS;
-
-	case SLJIT_NOT:
-		SLJIT_ASSERT(src1 == TMP_REG1 && !(flags & SRC2_IMM));
-		return push_inst(compiler, XNOR | (flags & SET_FLAGS) | D(dst) | S1(0) | S2(src2), DR(dst) | (flags & SET_FLAGS));
-
-	case SLJIT_CLZ:
-		SLJIT_ASSERT(src1 == TMP_REG1 && !(flags & SRC2_IMM));
-		/* sparc 32 does not support SLJIT_KEEP_FLAGS. Not sure I can fix this. */
-		FAIL_IF(push_inst(compiler, SUB | SET_FLAGS | D(0) | S1(src2) | S2(0), SET_FLAGS));
-		FAIL_IF(push_inst(compiler, OR | D(TMP_REG1) | S1(0) | S2(src2), DR(TMP_REG1)));
-		FAIL_IF(push_inst(compiler, BICC | DA(0x1) | (7 & DISP_MASK), UNMOVABLE_INS));
-		FAIL_IF(push_inst(compiler, OR | (flags & SET_FLAGS) | D(dst) | S1(0) | IMM(32), UNMOVABLE_INS | (flags & SET_FLAGS)));
-		FAIL_IF(push_inst(compiler, OR | D(dst) | S1(0) | IMM(-1), DR(dst)));
-
-		/* Loop. */
-		FAIL_IF(push_inst(compiler, SUB | SET_FLAGS | D(0) | S1(TMP_REG1) | S2(0), SET_FLAGS));
-		FAIL_IF(push_inst(compiler, SLL | D(TMP_REG1) | S1(TMP_REG1) | IMM(1), DR(TMP_REG1)));
-		FAIL_IF(push_inst(compiler, BICC | DA(0xe) | (-2 & DISP_MASK), UNMOVABLE_INS));
-		return push_inst(compiler, ADD | (flags & SET_FLAGS) | D(dst) | S1(dst) | IMM(1), UNMOVABLE_INS | (flags & SET_FLAGS));
-
-	case SLJIT_ADD:
-		return push_inst(compiler, ADD | (flags & SET_FLAGS) | D(dst) | S1(src1) | ARG2(flags, src2), DR(dst) | (flags & SET_FLAGS));
-
-	case SLJIT_ADDC:
-		return push_inst(compiler, ADDC | (flags & SET_FLAGS) | D(dst) | S1(src1) | ARG2(flags, src2), DR(dst) | (flags & SET_FLAGS));
-
-	case SLJIT_SUB:
-		return push_inst(compiler, SUB | (flags & SET_FLAGS) | D(dst) | S1(src1) | ARG2(flags, src2), DR(dst) | (flags & SET_FLAGS));
-
-	case SLJIT_SUBC:
-		return push_inst(compiler, SUBC | (flags & SET_FLAGS) | D(dst) | S1(src1) | ARG2(flags, src2), DR(dst) | (flags & SET_FLAGS));
-
-	case SLJIT_MUL:
-		FAIL_IF(push_inst(compiler, SMUL | D(dst) | S1(src1) | ARG2(flags, src2), DR(dst)));
-		if (!(flags & SET_FLAGS))
-			return SLJIT_SUCCESS;
-		FAIL_IF(push_inst(compiler, SRA | D(TMP_REG1) | S1(dst) | IMM(31), DR(TMP_REG1)));
-		FAIL_IF(push_inst(compiler, RDY | D(TMP_REG4), DR(TMP_REG4)));
-		return push_inst(compiler, SUB | SET_FLAGS | D(0) | S1(TMP_REG1) | S2(TMP_REG4), MOVABLE_INS | SET_FLAGS);
-
-	case SLJIT_AND:
-		return push_inst(compiler, AND | (flags & SET_FLAGS) | D(dst) | S1(src1) | ARG2(flags, src2), DR(dst) | (flags & SET_FLAGS));
-
-	case SLJIT_OR:
-		return push_inst(compiler, OR | (flags & SET_FLAGS) | D(dst) | S1(src1) | ARG2(flags, src2), DR(dst) | (flags & SET_FLAGS));
-
-	case SLJIT_XOR:
-		return push_inst(compiler, XOR | (flags & SET_FLAGS) | D(dst) | S1(src1) | ARG2(flags, src2), DR(dst) | (flags & SET_FLAGS));
-
-	case SLJIT_SHL:
-		FAIL_IF(push_inst(compiler, SLL | D(dst) | S1(src1) | ARG2(flags, src2), DR(dst)));
-		return !(flags & SET_FLAGS) ? SLJIT_SUCCESS : push_inst(compiler, SUB | SET_FLAGS | D(0) | S1(dst) | S2(0), SET_FLAGS);
-
-	case SLJIT_LSHR:
-		FAIL_IF(push_inst(compiler, SRL | D(dst) | S1(src1) | ARG2(flags, src2), DR(dst)));
-		return !(flags & SET_FLAGS) ? SLJIT_SUCCESS : push_inst(compiler, SUB | SET_FLAGS | D(0) | S1(dst) | S2(0), SET_FLAGS);
-
-	case SLJIT_ASHR:
-		FAIL_IF(push_inst(compiler, SRA | D(dst) | S1(src1) | ARG2(flags, src2), DR(dst)));
-		return !(flags & SET_FLAGS) ? SLJIT_SUCCESS : push_inst(compiler, SUB | SET_FLAGS | D(0) | S1(dst) | S2(0), SET_FLAGS);
-	}
-
-	SLJIT_ASSERT_STOP();
-	return SLJIT_SUCCESS;
-}
-
-static SLJIT_INLINE sljit_si emit_const(struct sljit_compiler *compiler, sljit_si dst, sljit_sw init_value)
-{
-	FAIL_IF(push_inst(compiler, SETHI | D(dst) | ((init_value >> 10) & 0x3fffff), DR(dst)));
-	return push_inst(compiler, OR | D(dst) | S1(dst) | IMM_ARG | (init_value & 0x3ff), DR(dst));
-}
-
-SLJIT_API_FUNC_ATTRIBUTE void sljit_set_jump_addr(sljit_uw addr, sljit_uw new_addr)
-{
-	sljit_ins *inst = (sljit_ins*)addr;
-
-	inst[0] = (inst[0] & 0xffc00000) | ((new_addr >> 10) & 0x3fffff);
-	inst[1] = (inst[1] & 0xfffffc00) | (new_addr & 0x3ff);
-	SLJIT_CACHE_FLUSH(inst, inst + 2);
-}
-
-SLJIT_API_FUNC_ATTRIBUTE void sljit_set_const(sljit_uw addr, sljit_sw new_constant)
-{
-	sljit_ins *inst = (sljit_ins*)addr;
-
-	inst[0] = (inst[0] & 0xffc00000) | ((new_constant >> 10) & 0x3fffff);
-	inst[1] = (inst[1] & 0xfffffc00) | (new_constant & 0x3ff);
-	SLJIT_CACHE_FLUSH(inst, inst + 2);
-}
diff --git a/src/extra/pcre/sljit/sljitNativeSPARC_common.c b/src/extra/pcre/sljit/sljitNativeSPARC_common.c
deleted file mode 100644
index d6a1e12..0000000
--- a/src/extra/pcre/sljit/sljitNativeSPARC_common.c
+++ /dev/null
@@ -1,1383 +0,0 @@
-/*
- *    Stack-less Just-In-Time compiler
- *
- *    Copyright 2009-2012 Zoltan Herczeg (hzmester at freemail.hu). All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without modification, are
- * permitted provided that the following conditions are met:
- *
- *   1. Redistributions of source code must retain the above copyright notice, this list of
- *      conditions and the following disclaimer.
- *
- *   2. Redistributions in binary form must reproduce the above copyright notice, this list
- *      of conditions and the following disclaimer in the documentation and/or other materials
- *      provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER(S) AND CONTRIBUTORS ``AS IS'' AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
- * SHALL THE COPYRIGHT HOLDER(S) OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
- * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
- * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
- * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-SLJIT_API_FUNC_ATTRIBUTE SLJIT_CONST char* sljit_get_platform_name(void)
-{
-	return "SPARC" SLJIT_CPUINFO;
-}
-
-/* Length of an instruction word
-   Both for sparc-32 and sparc-64 */
-typedef sljit_ui sljit_ins;
-
-static void sparc_cache_flush(sljit_ins *from, sljit_ins *to)
-{
-#if defined(__SUNPRO_C) && __SUNPRO_C < 0x590
-	__asm (
-		/* if (from == to) return */
-		"cmp %i0, %i1\n"
-		"be .leave\n"
-		"nop\n"
-
-		/* loop until from >= to */
-		".mainloop:\n"
-		"flush %i0\n"
-		"add %i0, 8, %i0\n"
-		"cmp %i0, %i1\n"
-		"bcs .mainloop\n"
-		"nop\n"
-
-		/* The comparison was done above. */
-		"bne .leave\n"
-		/* nop is not necessary here, since the
-		   sub operation has no side effect. */
-		"sub %i0, 4, %i0\n"
-		"flush %i0\n"
-		".leave:"
-	);
-#else
-	if (SLJIT_UNLIKELY(from == to))
-		return;
-
-	do {
-		__asm__ volatile (
-			"flush %0\n"
-			: : "r"(from)
-		);
-		/* Operates at least on doubleword. */
-		from += 2;
-	} while (from < to);
-
-	if (from == to) {
-		/* Flush the last word. */
-		from --;
-		__asm__ volatile (
-			"flush %0\n"
-			: : "r"(from)
-		);
-	}
-#endif
-}
-
-/* TMP_REG2 is not used by getput_arg */
-#define TMP_REG1	(SLJIT_NO_REGISTERS + 1)
-#define TMP_REG2	(SLJIT_NO_REGISTERS + 2)
-#define TMP_REG3	(SLJIT_NO_REGISTERS + 3)
-#define TMP_REG4	(SLJIT_NO_REGISTERS + 4)
-#define TMP_LINK	(SLJIT_NO_REGISTERS + 5)
-
-#define TMP_FREG1	(0)
-#define TMP_FREG2	((SLJIT_FLOAT_REG6 + 1) << 1)
-
-static SLJIT_CONST sljit_ub reg_map[SLJIT_NO_REGISTERS + 7] = {
-	0, 8, 9, 10, 11, 12, 16, 17, 18, 19, 20, 14, 1, 24, 25, 26, 15
-};
-
-/* --------------------------------------------------------------------- */
-/*  Instrucion forms                                                     */
-/* --------------------------------------------------------------------- */
-
-#define D(d)		(reg_map[d] << 25)
-#define DA(d)		((d) << 25)
-#define S1(s1)		(reg_map[s1] << 14)
-#define S2(s2)		(reg_map[s2])
-#define S1A(s1)		((s1) << 14)
-#define S2A(s2)		(s2)
-#define IMM_ARG		0x2000
-#define DOP(op)		((op) << 5)
-#define IMM(imm)	(((imm) & 0x1fff) | IMM_ARG)
-
-#define DR(dr)		(reg_map[dr])
-#define OPC1(opcode)	((opcode) << 30)
-#define OPC2(opcode)	((opcode) << 22)
-#define OPC3(opcode)	((opcode) << 19)
-#define SET_FLAGS	OPC3(0x10)
-
-#define ADD		(OPC1(0x2) | OPC3(0x00))
-#define ADDC		(OPC1(0x2) | OPC3(0x08))
-#define AND		(OPC1(0x2) | OPC3(0x01))
-#define ANDN		(OPC1(0x2) | OPC3(0x05))
-#define CALL		(OPC1(0x1))
-#define FABSS		(OPC1(0x2) | OPC3(0x34) | DOP(0x09))
-#define FADDD		(OPC1(0x2) | OPC3(0x34) | DOP(0x42))
-#define FADDS		(OPC1(0x2) | OPC3(0x34) | DOP(0x41))
-#define FCMPD		(OPC1(0x2) | OPC3(0x35) | DOP(0x52))
-#define FCMPS		(OPC1(0x2) | OPC3(0x35) | DOP(0x51))
-#define FDIVD		(OPC1(0x2) | OPC3(0x34) | DOP(0x4e))
-#define FDIVS		(OPC1(0x2) | OPC3(0x34) | DOP(0x4d))
-#define FMOVS		(OPC1(0x2) | OPC3(0x34) | DOP(0x01))
-#define FMULD		(OPC1(0x2) | OPC3(0x34) | DOP(0x4a))
-#define FMULS		(OPC1(0x2) | OPC3(0x34) | DOP(0x49))
-#define FNEGS		(OPC1(0x2) | OPC3(0x34) | DOP(0x05))
-#define FSUBD		(OPC1(0x2) | OPC3(0x34) | DOP(0x46))
-#define FSUBS		(OPC1(0x2) | OPC3(0x34) | DOP(0x45))
-#define JMPL		(OPC1(0x2) | OPC3(0x38))
-#define NOP		(OPC1(0x0) | OPC2(0x04))
-#define OR		(OPC1(0x2) | OPC3(0x02))
-#define ORN		(OPC1(0x2) | OPC3(0x06))
-#define RDY		(OPC1(0x2) | OPC3(0x28) | S1A(0))
-#define RESTORE		(OPC1(0x2) | OPC3(0x3d))
-#define SAVE		(OPC1(0x2) | OPC3(0x3c))
-#define SETHI		(OPC1(0x0) | OPC2(0x04))
-#define SLL		(OPC1(0x2) | OPC3(0x25))
-#define SLLX		(OPC1(0x2) | OPC3(0x25) | (1 << 12))
-#define SRA		(OPC1(0x2) | OPC3(0x27))
-#define SRAX		(OPC1(0x2) | OPC3(0x27) | (1 << 12))
-#define SRL		(OPC1(0x2) | OPC3(0x26))
-#define SRLX		(OPC1(0x2) | OPC3(0x26) | (1 << 12))
-#define SUB		(OPC1(0x2) | OPC3(0x04))
-#define SUBC		(OPC1(0x2) | OPC3(0x0c))
-#define TA		(OPC1(0x2) | OPC3(0x3a) | (8 << 25))
-#define WRY		(OPC1(0x2) | OPC3(0x30) | DA(0))
-#define XOR		(OPC1(0x2) | OPC3(0x03))
-#define XNOR		(OPC1(0x2) | OPC3(0x07))
-
-#if (defined SLJIT_CONFIG_SPARC_32 && SLJIT_CONFIG_SPARC_32)
-#define MAX_DISP	(0x1fffff)
-#define MIN_DISP	(-0x200000)
-#define DISP_MASK	(0x3fffff)
-
-#define BICC		(OPC1(0x0) | OPC2(0x2))
-#define FBFCC		(OPC1(0x0) | OPC2(0x6))
-#define SLL_W		SLL
-#define SDIV		(OPC1(0x2) | OPC3(0x0f))
-#define SMUL		(OPC1(0x2) | OPC3(0x0b))
-#define UDIV		(OPC1(0x2) | OPC3(0x0e))
-#define UMUL		(OPC1(0x2) | OPC3(0x0a))
-#else
-#define SLL_W		SLLX
-#endif
-
-#define SIMM_MAX	(0x0fff)
-#define SIMM_MIN	(-0x1000)
-
-/* dest_reg is the absolute name of the register
-   Useful for reordering instructions in the delay slot. */
-static sljit_si push_inst(struct sljit_compiler *compiler, sljit_ins ins, sljit_si delay_slot)
-{
-	sljit_ins *ptr;
-	SLJIT_ASSERT((delay_slot & DST_INS_MASK) == UNMOVABLE_INS
-		|| (delay_slot & DST_INS_MASK) == MOVABLE_INS
-		|| (delay_slot & DST_INS_MASK) == ((ins >> 25) & 0x1f));
-	ptr = (sljit_ins*)ensure_buf(compiler, sizeof(sljit_ins));
-	FAIL_IF(!ptr);
-	*ptr = ins;
-	compiler->size++;
-	compiler->delay_slot = delay_slot;
-	return SLJIT_SUCCESS;
-}
-
-static SLJIT_INLINE sljit_ins* detect_jump_type(struct sljit_jump *jump, sljit_ins *code_ptr, sljit_ins *code)
-{
-	sljit_sw diff;
-	sljit_uw target_addr;
-	sljit_ins *inst;
-	sljit_ins saved_inst;
-
-	if (jump->flags & SLJIT_REWRITABLE_JUMP)
-		return code_ptr;
-
-	if (jump->flags & JUMP_ADDR)
-		target_addr = jump->u.target;
-	else {
-		SLJIT_ASSERT(jump->flags & JUMP_LABEL);
-		target_addr = (sljit_uw)(code + jump->u.label->size);
-	}
-	inst = (sljit_ins*)jump->addr;
-
-#if (defined SLJIT_CONFIG_SPARC_32 && SLJIT_CONFIG_SPARC_32)
-	if (jump->flags & IS_CALL) {
-		/* Call is always patchable on sparc 32. */
-		jump->flags |= PATCH_CALL;
-		if (jump->flags & IS_MOVABLE) {
-			inst[0] = inst[-1];
-			inst[-1] = CALL;
-			jump->addr -= sizeof(sljit_ins);
-			return inst;
-		}
-		inst[0] = CALL;
-		inst[1] = NOP;
-		return inst + 1;
-	}
-#else
-	/* Both calls and BPr instructions shall not pass this point. */
-#error "Implementation required"
-#endif
-
-	if (jump->flags & IS_COND)
-		inst--;
-
-	if (jump->flags & IS_MOVABLE) {
-		diff = ((sljit_sw)target_addr - (sljit_sw)(inst - 1)) >> 2;
-		if (diff <= MAX_DISP && diff >= MIN_DISP) {
-			jump->flags |= PATCH_B;
-			inst--;
-			if (jump->flags & IS_COND) {
-				saved_inst = inst[0];
-				inst[0] = inst[1] ^ (1 << 28);
-				inst[1] = saved_inst;
-			} else {
-				inst[1] = inst[0];
-				inst[0] = BICC | DA(0x8);
-			}
-			jump->addr = (sljit_uw)inst;
-			return inst + 1;
-		}
-	}
-
-	diff = ((sljit_sw)target_addr - (sljit_sw)(inst)) >> 2;
-	if (diff <= MAX_DISP && diff >= MIN_DISP) {
-		jump->flags |= PATCH_B;
-		if (jump->flags & IS_COND)
-			inst[0] ^= (1 << 28);
-		else
-			inst[0] = BICC | DA(0x8);
-		inst[1] = NOP;
-		jump->addr = (sljit_uw)inst;
-		return inst + 1;
-	}
-
-	return code_ptr;
-}
-
-SLJIT_API_FUNC_ATTRIBUTE void* sljit_generate_code(struct sljit_compiler *compiler)
-{
-	struct sljit_memory_fragment *buf;
-	sljit_ins *code;
-	sljit_ins *code_ptr;
-	sljit_ins *buf_ptr;
-	sljit_ins *buf_end;
-	sljit_uw word_count;
-	sljit_uw addr;
-
-	struct sljit_label *label;
-	struct sljit_jump *jump;
-	struct sljit_const *const_;
-
-	CHECK_ERROR_PTR();
-	check_sljit_generate_code(compiler);
-	reverse_buf(compiler);
-
-	code = (sljit_ins*)SLJIT_MALLOC_EXEC(compiler->size * sizeof(sljit_ins));
-	PTR_FAIL_WITH_EXEC_IF(code);
-	buf = compiler->buf;
-
-	code_ptr = code;
-	word_count = 0;
-	label = compiler->labels;
-	jump = compiler->jumps;
-	const_ = compiler->consts;
-	do {
-		buf_ptr = (sljit_ins*)buf->memory;
-		buf_end = buf_ptr + (buf->used_size >> 2);
-		do {
-			*code_ptr = *buf_ptr++;
-			SLJIT_ASSERT(!label || label->size >= word_count);
-			SLJIT_ASSERT(!jump || jump->addr >= word_count);
-			SLJIT_ASSERT(!const_ || const_->addr >= word_count);
-			/* These structures are ordered by their address. */
-			if (label && label->size == word_count) {
-				/* Just recording the address. */
-				label->addr = (sljit_uw)code_ptr;
-				label->size = code_ptr - code;
-				label = label->next;
-			}
-			if (jump && jump->addr == word_count) {
-#if (defined SLJIT_CONFIG_SPARC_32 && SLJIT_CONFIG_SPARC_32)
-				jump->addr = (sljit_uw)(code_ptr - 3);
-#else
-				jump->addr = (sljit_uw)(code_ptr - 6);
-#endif
-				code_ptr = detect_jump_type(jump, code_ptr, code);
-				jump = jump->next;
-			}
-			if (const_ && const_->addr == word_count) {
-				/* Just recording the address. */
-				const_->addr = (sljit_uw)code_ptr;
-				const_ = const_->next;
-			}
-			code_ptr ++;
-			word_count ++;
-		} while (buf_ptr < buf_end);
-
-		buf = buf->next;
-	} while (buf);
-
-	if (label && label->size == word_count) {
-		label->addr = (sljit_uw)code_ptr;
-		label->size = code_ptr - code;
-		label = label->next;
-	}
-
-	SLJIT_ASSERT(!label);
-	SLJIT_ASSERT(!jump);
-	SLJIT_ASSERT(!const_);
-	SLJIT_ASSERT(code_ptr - code <= (sljit_si)compiler->size);
-
-	jump = compiler->jumps;
-	while (jump) {
-		do {
-			addr = (jump->flags & JUMP_LABEL) ? jump->u.label->addr : jump->u.target;
-			buf_ptr = (sljit_ins*)jump->addr;
-
-			if (jump->flags & PATCH_CALL) {
-				addr = (sljit_sw)(addr - jump->addr) >> 2;
-				SLJIT_ASSERT((sljit_sw)addr <= 0x1fffffff && (sljit_sw)addr >= -0x20000000);
-				buf_ptr[0] = CALL | (addr & 0x3fffffff);
-				break;
-			}
-			if (jump->flags & PATCH_B) {
-				addr = (sljit_sw)(addr - jump->addr) >> 2;
-				SLJIT_ASSERT((sljit_sw)addr <= MAX_DISP && (sljit_sw)addr >= MIN_DISP);
-				buf_ptr[0] = (buf_ptr[0] & ~DISP_MASK) | (addr & DISP_MASK);
-				break;
-			}
-
-			/* Set the fields of immediate loads. */
-#if (defined SLJIT_CONFIG_SPARC_32 && SLJIT_CONFIG_SPARC_32)
-			buf_ptr[0] = (buf_ptr[0] & 0xffc00000) | ((addr >> 10) & 0x3fffff);
-			buf_ptr[1] = (buf_ptr[1] & 0xfffffc00) | (addr & 0x3ff);
-#else
-#error "Implementation required"
-#endif
-		} while (0);
-		jump = jump->next;
-	}
-
-
-	compiler->error = SLJIT_ERR_COMPILED;
-	compiler->executable_size = (code_ptr - code) * sizeof(sljit_ins);
-	SLJIT_CACHE_FLUSH(code, code_ptr);
-	return code;
-}
-
-/* --------------------------------------------------------------------- */
-/*  Entry, exit                                                          */
-/* --------------------------------------------------------------------- */
-
-/* Creates an index in data_transfer_insts array. */
-#define LOAD_DATA	0x01
-#define WORD_DATA	0x00
-#define BYTE_DATA	0x02
-#define HALF_DATA	0x04
-#define INT_DATA	0x06
-#define SIGNED_DATA	0x08
-/* Separates integer and floating point registers */
-#define GPR_REG		0x0f
-#define DOUBLE_DATA	0x10
-
-#define MEM_MASK	0x1f
-
-#define WRITE_BACK	0x00020
-#define ARG_TEST	0x00040
-#define ALT_KEEP_CACHE	0x00080
-#define CUMULATIVE_OP	0x00100
-#define IMM_OP		0x00200
-#define SRC2_IMM	0x00400
-
-#define REG_DEST	0x00800
-#define REG2_SOURCE	0x01000
-#define SLOW_SRC1	0x02000
-#define SLOW_SRC2	0x04000
-#define SLOW_DEST	0x08000
-
-/* SET_FLAGS (0x10 << 19) also belong here! */
-
-#if (defined SLJIT_CONFIG_SPARC_32 && SLJIT_CONFIG_SPARC_32)
-#include "sljitNativeSPARC_32.c"
-#else
-#include "sljitNativeSPARC_64.c"
-#endif
-
-SLJIT_API_FUNC_ATTRIBUTE sljit_si sljit_emit_enter(struct sljit_compiler *compiler, sljit_si args, sljit_si scratches, sljit_si saveds, sljit_si local_size)
-{
-	CHECK_ERROR();
-	check_sljit_emit_enter(compiler, args, scratches, saveds, local_size);
-
-	compiler->scratches = scratches;
-	compiler->saveds = saveds;
-#if (defined SLJIT_DEBUG && SLJIT_DEBUG)
-	compiler->logical_local_size = local_size;
-#endif
-
-	local_size += 23 * sizeof(sljit_sw);
-	local_size = (local_size + 7) & ~0x7;
-	compiler->local_size = local_size;
-
-	if (local_size <= SIMM_MAX) {
-		FAIL_IF(push_inst(compiler, SAVE | D(SLJIT_LOCALS_REG) | S1(SLJIT_LOCALS_REG) | IMM(-local_size), UNMOVABLE_INS));
-	}
-	else {
-		FAIL_IF(load_immediate(compiler, TMP_REG1, -local_size));
-		FAIL_IF(push_inst(compiler, SAVE | D(SLJIT_LOCALS_REG) | S1(SLJIT_LOCALS_REG) | S2(TMP_REG1), UNMOVABLE_INS));
-	}
-
-	if (args >= 1)
-		FAIL_IF(push_inst(compiler, OR | D(SLJIT_SAVED_REG1) | S1(0) | S2A(24), DR(SLJIT_SAVED_REG1)));
-	if (args >= 2)
-		FAIL_IF(push_inst(compiler, OR | D(SLJIT_SAVED_REG2) | S1(0) | S2A(25), DR(SLJIT_SAVED_REG2)));
-	if (args >= 3)
-		FAIL_IF(push_inst(compiler, OR | D(SLJIT_SAVED_REG3) | S1(0) | S2A(26), DR(SLJIT_SAVED_REG3)));
-
-	return SLJIT_SUCCESS;
-}
-
-SLJIT_API_FUNC_ATTRIBUTE void sljit_set_context(struct sljit_compiler *compiler, sljit_si args, sljit_si scratches, sljit_si saveds, sljit_si local_size)
-{
-	CHECK_ERROR_VOID();
-	check_sljit_set_context(compiler, args, scratches, saveds, local_size);
-
-	compiler->scratches = scratches;
-	compiler->saveds = saveds;
-#if (defined SLJIT_DEBUG && SLJIT_DEBUG)
-	compiler->logical_local_size = local_size;
-#endif
-
-	local_size += 23 * sizeof(sljit_sw);
-	compiler->local_size = (local_size + 7) & ~0x7;
-}
-
-SLJIT_API_FUNC_ATTRIBUTE sljit_si sljit_emit_return(struct sljit_compiler *compiler, sljit_si op, sljit_si src, sljit_sw srcw)
-{
-	CHECK_ERROR();
-	check_sljit_emit_return(compiler, op, src, srcw);
-
-	if (op != SLJIT_MOV || !FAST_IS_REG(src)) {
-		FAIL_IF(emit_mov_before_return(compiler, op, src, srcw));
-		src = SLJIT_SCRATCH_REG1;
-	}
-
-	FAIL_IF(push_inst(compiler, JMPL | D(0) | S1A(31) | IMM(8), UNMOVABLE_INS));
-	return push_inst(compiler, RESTORE | D(SLJIT_SCRATCH_REG1) | S1(src) | S2(0), UNMOVABLE_INS);
-}
-
-/* --------------------------------------------------------------------- */
-/*  Operators                                                            */
-/* --------------------------------------------------------------------- */
-
-#if (defined SLJIT_CONFIG_SPARC_32 && SLJIT_CONFIG_SPARC_32)
-#define ARCH_32_64(a, b)	a
-#else
-#define ARCH_32_64(a, b)	b
-#endif
-
-static SLJIT_CONST sljit_ins data_transfer_insts[16 + 4] = {
-/* u w s */ ARCH_32_64(OPC1(3) | OPC3(0x04) /* stw */, OPC1(3) | OPC3(0x0e) /* stx */),
-/* u w l */ ARCH_32_64(OPC1(3) | OPC3(0x00) /* lduw */, OPC1(3) | OPC3(0x0b) /* ldx */),
-/* u b s */ OPC1(3) | OPC3(0x05) /* stb */,
-/* u b l */ OPC1(3) | OPC3(0x01) /* ldub */,
-/* u h s */ OPC1(3) | OPC3(0x06) /* sth */,
-/* u h l */ OPC1(3) | OPC3(0x02) /* lduh */,
-/* u i s */ OPC1(3) | OPC3(0x04) /* stw */,
-/* u i l */ OPC1(3) | OPC3(0x00) /* lduw */,
-
-/* s w s */ ARCH_32_64(OPC1(3) | OPC3(0x04) /* stw */, OPC1(3) | OPC3(0x0e) /* stx */),
-/* s w l */ ARCH_32_64(OPC1(3) | OPC3(0x00) /* lduw */, OPC1(3) | OPC3(0x0b) /* ldx */),
-/* s b s */ OPC1(3) | OPC3(0x05) /* stb */,
-/* s b l */ OPC1(3) | OPC3(0x09) /* ldsb */,
-/* s h s */ OPC1(3) | OPC3(0x06) /* sth */,
-/* s h l */ OPC1(3) | OPC3(0x0a) /* ldsh */,
-/* s i s */ OPC1(3) | OPC3(0x04) /* stw */,
-/* s i l */ ARCH_32_64(OPC1(3) | OPC3(0x00) /* lduw */, OPC1(3) | OPC3(0x08) /* ldsw */),
-
-/* d   s */ OPC1(3) | OPC3(0x27),
-/* d   l */ OPC1(3) | OPC3(0x23),
-/* s   s */ OPC1(3) | OPC3(0x24),
-/* s   l */ OPC1(3) | OPC3(0x20),
-};
-
-#undef ARCH_32_64
-
-/* Can perform an operation using at most 1 instruction. */
-static sljit_si getput_arg_fast(struct sljit_compiler *compiler, sljit_si flags, sljit_si reg, sljit_si arg, sljit_sw argw)
-{
-	SLJIT_ASSERT(arg & SLJIT_MEM);
-
-	if (!(flags & WRITE_BACK) || !(arg & REG_MASK)) {
-		if ((!(arg & OFFS_REG_MASK) && argw <= SIMM_MAX && argw >= SIMM_MIN)
-				|| ((arg & OFFS_REG_MASK) && (argw & 0x3) == 0)) {
-			/* Works for both absoulte and relative addresses (immediate case). */
-			if (SLJIT_UNLIKELY(flags & ARG_TEST))
-				return 1;
-			FAIL_IF(push_inst(compiler, data_transfer_insts[flags & MEM_MASK]
-				| ((flags & MEM_MASK) <= GPR_REG ? D(reg) : DA(reg))
-				| S1(arg & REG_MASK) | ((arg & OFFS_REG_MASK) ? S2(OFFS_REG(arg)) : IMM(argw)),
-				((flags & MEM_MASK) <= GPR_REG && (flags & LOAD_DATA)) ? DR(reg) : MOVABLE_INS));
-			return -1;
-		}
-	}
-	return 0;
-}
-
-/* See getput_arg below.
-   Note: can_cache is called only for binary operators. Those
-   operators always uses word arguments without write back. */
-static sljit_si can_cache(sljit_si arg, sljit_sw argw, sljit_si next_arg, sljit_sw next_argw)
-{
-	SLJIT_ASSERT((arg & SLJIT_MEM) && (next_arg & SLJIT_MEM));
-
-	/* Simple operation except for updates. */
-	if (arg & OFFS_REG_MASK) {
-		argw &= 0x3;
-		SLJIT_ASSERT(argw);
-		next_argw &= 0x3;
-		if ((arg & OFFS_REG_MASK) == (next_arg & OFFS_REG_MASK) && argw == next_argw)
-			return 1;
-		return 0;
-	}
-
-	if (((next_argw - argw) <= SIMM_MAX && (next_argw - argw) >= SIMM_MIN))
-		return 1;
-	return 0;
-}
-
-/* Emit the necessary instructions. See can_cache above. */
-static sljit_si getput_arg(struct sljit_compiler *compiler, sljit_si flags, sljit_si reg, sljit_si arg, sljit_sw argw, sljit_si next_arg, sljit_sw next_argw)
-{
-	sljit_si base, arg2, delay_slot;
-	sljit_ins dest;
-
-	SLJIT_ASSERT(arg & SLJIT_MEM);
-	if (!(next_arg & SLJIT_MEM)) {
-		next_arg = 0;
-		next_argw = 0;
-	}
-
-	base = arg & REG_MASK;
-	if (SLJIT_UNLIKELY(arg & OFFS_REG_MASK)) {
-		argw &= 0x3;
-		SLJIT_ASSERT(argw != 0);
-
-		/* Using the cache. */
-		if (((SLJIT_MEM | (arg & OFFS_REG_MASK)) == compiler->cache_arg) && (argw == compiler->cache_argw))
-			arg2 = TMP_REG3;
-		else {
-			if ((arg & OFFS_REG_MASK) == (next_arg & OFFS_REG_MASK) && argw == (next_argw & 0x3)) {
-				compiler->cache_arg = SLJIT_MEM | (arg & OFFS_REG_MASK);
-				compiler->cache_argw = argw;
-				arg2 = TMP_REG3;
-			}
-			else if ((flags & LOAD_DATA) && ((flags & MEM_MASK) <= GPR_REG) && reg != base && reg != OFFS_REG(arg))
-				arg2 = reg;
-			else /* It must be a mov operation, so tmp1 must be free to use. */
-				arg2 = TMP_REG1;
-			FAIL_IF(push_inst(compiler, SLL_W | D(arg2) | S1(OFFS_REG(arg)) | IMM_ARG | argw, DR(arg2)));
-		}
-	}
-	else {
-		/* Using the cache. */
-		if ((compiler->cache_arg == SLJIT_MEM) && (argw - compiler->cache_argw) <= SIMM_MAX && (argw - compiler->cache_argw) >= SIMM_MIN) {
-			if (argw != compiler->cache_argw) {
-				FAIL_IF(push_inst(compiler, ADD | D(TMP_REG3) | S1(TMP_REG3) | IMM(argw - compiler->cache_argw), DR(TMP_REG3)));
-				compiler->cache_argw = argw;
-			}
-			arg2 = TMP_REG3;
-		} else {
-			if ((next_argw - argw) <= SIMM_MAX && (next_argw - argw) >= SIMM_MIN) {
-				compiler->cache_arg = SLJIT_MEM;
-				compiler->cache_argw = argw;
-				arg2 = TMP_REG3;
-			}
-			else if ((flags & LOAD_DATA) && ((flags & MEM_MASK) <= GPR_REG) && reg != base)
-				arg2 = reg;
-			else /* It must be a mov operation, so tmp1 must be free to use. */
-				arg2 = TMP_REG1;
-			FAIL_IF(load_immediate(compiler, arg2, argw));
-		}
-	}
-
-	dest = ((flags & MEM_MASK) <= GPR_REG ? D(reg) : DA(reg));
-	delay_slot = ((flags & MEM_MASK) <= GPR_REG && (flags & LOAD_DATA)) ? DR(reg) : MOVABLE_INS;
-	if (!base)
-		return push_inst(compiler, data_transfer_insts[flags & MEM_MASK] | dest | S1(arg2) | IMM(0), delay_slot);
-	if (!(flags & WRITE_BACK))
-		return push_inst(compiler, data_transfer_insts[flags & MEM_MASK] | dest | S1(base) | S2(arg2), delay_slot);
-	FAIL_IF(push_inst(compiler, data_transfer_insts[flags & MEM_MASK] | dest | S1(base) | S2(arg2), delay_slot));
-	return push_inst(compiler, ADD | D(base) | S1(base) | S2(arg2), DR(base));
-}
-
-static SLJIT_INLINE sljit_si emit_op_mem(struct sljit_compiler *compiler, sljit_si flags, sljit_si reg, sljit_si arg, sljit_sw argw)
-{
-	if (getput_arg_fast(compiler, flags, reg, arg, argw))
-		return compiler->error;
-	compiler->cache_arg = 0;
-	compiler->cache_argw = 0;
-	return getput_arg(compiler, flags, reg, arg, argw, 0, 0);
-}
-
-static SLJIT_INLINE sljit_si emit_op_mem2(struct sljit_compiler *compiler, sljit_si flags, sljit_si reg, sljit_si arg1, sljit_sw arg1w, sljit_si arg2, sljit_sw arg2w)
-{
-	if (getput_arg_fast(compiler, flags, reg, arg1, arg1w))
-		return compiler->error;
-	return getput_arg(compiler, flags, reg, arg1, arg1w, arg2, arg2w);
-}
-
-static sljit_si emit_op(struct sljit_compiler *compiler, sljit_si op, sljit_si flags,
-	sljit_si dst, sljit_sw dstw,
-	sljit_si src1, sljit_sw src1w,
-	sljit_si src2, sljit_sw src2w)
-{
-	/* arg1 goes to TMP_REG1 or src reg
-	   arg2 goes to TMP_REG2, imm or src reg
-	   TMP_REG3 can be used for caching
-	   result goes to TMP_REG2, so put result can use TMP_REG1 and TMP_REG3. */
-	sljit_si dst_r = TMP_REG2;
-	sljit_si src1_r;
-	sljit_sw src2_r = 0;
-	sljit_si sugg_src2_r = TMP_REG2;
-
-	if (!(flags & ALT_KEEP_CACHE)) {
-		compiler->cache_arg = 0;
-		compiler->cache_argw = 0;
-	}
-
-	if (SLJIT_UNLIKELY(dst == SLJIT_UNUSED)) {
-		if (op >= SLJIT_MOV && op <= SLJIT_MOVU_SI && !(src2 & SLJIT_MEM))
-			return SLJIT_SUCCESS;
-	}
-	else if (FAST_IS_REG(dst)) {
-		dst_r = dst;
-		flags |= REG_DEST;
-		if (op >= SLJIT_MOV && op <= SLJIT_MOVU_SI)
-			sugg_src2_r = dst_r;
-	}
-	else if ((dst & SLJIT_MEM) && !getput_arg_fast(compiler, flags | ARG_TEST, TMP_REG1, dst, dstw))
-		flags |= SLOW_DEST;
-
-	if (flags & IMM_OP) {
-		if ((src2 & SLJIT_IMM) && src2w) {
-			if (src2w <= SIMM_MAX && src2w >= SIMM_MIN) {
-				flags |= SRC2_IMM;
-				src2_r = src2w;
-			}
-		}
-		if (!(flags & SRC2_IMM) && (flags & CUMULATIVE_OP) && (src1 & SLJIT_IMM) && src1w) {
-			if (src1w <= SIMM_MAX && src1w >= SIMM_MIN) {
-				flags |= SRC2_IMM;
-				src2_r = src1w;
-
-				/* And swap arguments. */
-				src1 = src2;
-				src1w = src2w;
-				src2 = SLJIT_IMM;
-				/* src2w = src2_r unneeded. */
-			}
-		}
-	}
-
-	/* Source 1. */
-	if (FAST_IS_REG(src1))
-		src1_r = src1;
-	else if (src1 & SLJIT_IMM) {
-		if (src1w) {
-			FAIL_IF(load_immediate(compiler, TMP_REG1, src1w));
-			src1_r = TMP_REG1;
-		}
-		else
-			src1_r = 0;
-	}
-	else {
-		if (getput_arg_fast(compiler, flags | LOAD_DATA, TMP_REG1, src1, src1w))
-			FAIL_IF(compiler->error);
-		else
-			flags |= SLOW_SRC1;
-		src1_r = TMP_REG1;
-	}
-
-	/* Source 2. */
-	if (FAST_IS_REG(src2)) {
-		src2_r = src2;
-		flags |= REG2_SOURCE;
-		if (!(flags & REG_DEST) && op >= SLJIT_MOV && op <= SLJIT_MOVU_SI)
-			dst_r = src2_r;
-	}
-	else if (src2 & SLJIT_IMM) {
-		if (!(flags & SRC2_IMM)) {
-			if (src2w) {
-				FAIL_IF(load_immediate(compiler, sugg_src2_r, src2w));
-				src2_r = sugg_src2_r;
-			}
-			else {
-				src2_r = 0;
-				if ((op >= SLJIT_MOV && op <= SLJIT_MOVU_SI) && (dst & SLJIT_MEM))
-					dst_r = 0;
-			}
-		}
-	}
-	else {
-		if (getput_arg_fast(compiler, flags | LOAD_DATA, sugg_src2_r, src2, src2w))
-			FAIL_IF(compiler->error);
-		else
-			flags |= SLOW_SRC2;
-		src2_r = sugg_src2_r;
-	}
-
-	if ((flags & (SLOW_SRC1 | SLOW_SRC2)) == (SLOW_SRC1 | SLOW_SRC2)) {
-		SLJIT_ASSERT(src2_r == TMP_REG2);
-		if (!can_cache(src1, src1w, src2, src2w) && can_cache(src1, src1w, dst, dstw)) {
-			FAIL_IF(getput_arg(compiler, flags | LOAD_DATA, TMP_REG2, src2, src2w, src1, src1w));
-			FAIL_IF(getput_arg(compiler, flags | LOAD_DATA, TMP_REG1, src1, src1w, dst, dstw));
-		}
-		else {
-			FAIL_IF(getput_arg(compiler, flags | LOAD_DATA, TMP_REG1, src1, src1w, src2, src2w));
-			FAIL_IF(getput_arg(compiler, flags | LOAD_DATA, TMP_REG2, src2, src2w, dst, dstw));
-		}
-	}
-	else if (flags & SLOW_SRC1)
-		FAIL_IF(getput_arg(compiler, flags | LOAD_DATA, TMP_REG1, src1, src1w, dst, dstw));
-	else if (flags & SLOW_SRC2)
-		FAIL_IF(getput_arg(compiler, flags | LOAD_DATA, sugg_src2_r, src2, src2w, dst, dstw));
-
-	FAIL_IF(emit_single_op(compiler, op, flags, dst_r, src1_r, src2_r));
-
-	if (dst & SLJIT_MEM) {
-		if (!(flags & SLOW_DEST)) {
-			getput_arg_fast(compiler, flags, dst_r, dst, dstw);
-			return compiler->error;
-		}
-		return getput_arg(compiler, flags, dst_r, dst, dstw, 0, 0);
-	}
-
-	return SLJIT_SUCCESS;
-}
-
-SLJIT_API_FUNC_ATTRIBUTE sljit_si sljit_emit_op0(struct sljit_compiler *compiler, sljit_si op)
-{
-	CHECK_ERROR();
-	check_sljit_emit_op0(compiler, op);
-
-	op = GET_OPCODE(op);
-	switch (op) {
-	case SLJIT_BREAKPOINT:
-		return push_inst(compiler, TA, UNMOVABLE_INS);
-	case SLJIT_NOP:
-		return push_inst(compiler, NOP, UNMOVABLE_INS);
-	case SLJIT_UMUL:
-	case SLJIT_SMUL:
-#if (defined SLJIT_CONFIG_SPARC_32 && SLJIT_CONFIG_SPARC_32)
-		FAIL_IF(push_inst(compiler, (op == SLJIT_UMUL ? UMUL : SMUL) | D(SLJIT_SCRATCH_REG1) | S1(SLJIT_SCRATCH_REG1) | S2(SLJIT_SCRATCH_REG2), DR(SLJIT_SCRATCH_REG1)));
-		return push_inst(compiler, RDY | D(SLJIT_SCRATCH_REG2), DR(SLJIT_SCRATCH_REG2));
-#else
-#error "Implementation required"
-#endif
-	case SLJIT_UDIV:
-	case SLJIT_SDIV:
-#if (defined SLJIT_CONFIG_SPARC_32 && SLJIT_CONFIG_SPARC_32)
-		if (op == SLJIT_UDIV)
-			FAIL_IF(push_inst(compiler, WRY | S1(0), MOVABLE_INS));
-		else {
-			FAIL_IF(push_inst(compiler, SRA | D(TMP_REG1) | S1(SLJIT_SCRATCH_REG1) | IMM(31), DR(TMP_REG1)));
-			FAIL_IF(push_inst(compiler, WRY | S1(TMP_REG1), MOVABLE_INS));
-		}
-		FAIL_IF(push_inst(compiler, OR | D(TMP_REG2) | S1(0) | S2(SLJIT_SCRATCH_REG1), DR(TMP_REG2)));
-		FAIL_IF(push_inst(compiler, (op == SLJIT_UDIV ? UDIV : SDIV) | D(SLJIT_SCRATCH_REG1) | S1(SLJIT_SCRATCH_REG1) | S2(SLJIT_SCRATCH_REG2), DR(SLJIT_SCRATCH_REG1)));
-		FAIL_IF(push_inst(compiler, SMUL | D(SLJIT_SCRATCH_REG2) | S1(SLJIT_SCRATCH_REG1) | S2(SLJIT_SCRATCH_REG2), DR(SLJIT_SCRATCH_REG2)));
-		FAIL_IF(push_inst(compiler, SUB | D(SLJIT_SCRATCH_REG2) | S1(TMP_REG2) | S2(SLJIT_SCRATCH_REG2), DR(SLJIT_SCRATCH_REG2)));
-		return SLJIT_SUCCESS;
-#else
-#error "Implementation required"
-#endif
-	}
-
-	return SLJIT_SUCCESS;
-}
-
-SLJIT_API_FUNC_ATTRIBUTE sljit_si sljit_emit_op1(struct sljit_compiler *compiler, sljit_si op,
-	sljit_si dst, sljit_sw dstw,
-	sljit_si src, sljit_sw srcw)
-{
-	sljit_si flags = GET_FLAGS(op) ? SET_FLAGS : 0;
-
-	CHECK_ERROR();
-	check_sljit_emit_op1(compiler, op, dst, dstw, src, srcw);
-	ADJUST_LOCAL_OFFSET(dst, dstw);
-	ADJUST_LOCAL_OFFSET(src, srcw);
-
-	op = GET_OPCODE(op);
-	switch (op) {
-	case SLJIT_MOV:
-	case SLJIT_MOV_P:
-		return emit_op(compiler, SLJIT_MOV, flags | WORD_DATA, dst, dstw, TMP_REG1, 0, src, srcw);
-
-	case SLJIT_MOV_UI:
-		return emit_op(compiler, SLJIT_MOV_UI, flags | INT_DATA, dst, dstw, TMP_REG1, 0, src, srcw);
-
-	case SLJIT_MOV_SI:
-		return emit_op(compiler, SLJIT_MOV_SI, flags | INT_DATA | SIGNED_DATA, dst, dstw, TMP_REG1, 0, src, srcw);
-
-	case SLJIT_MOV_UB:
-		return emit_op(compiler, SLJIT_MOV_UB, flags | BYTE_DATA, dst, dstw, TMP_REG1, 0, src, (src & SLJIT_IMM) ? (sljit_ub)srcw : srcw);
-
-	case SLJIT_MOV_SB:
-		return emit_op(compiler, SLJIT_MOV_SB, flags | BYTE_DATA | SIGNED_DATA, dst, dstw, TMP_REG1, 0, src, (src & SLJIT_IMM) ? (sljit_sb)srcw : srcw);
-
-	case SLJIT_MOV_UH:
-		return emit_op(compiler, SLJIT_MOV_UH, flags | HALF_DATA, dst, dstw, TMP_REG1, 0, src, (src & SLJIT_IMM) ? (sljit_uh)srcw : srcw);
-
-	case SLJIT_MOV_SH:
-		return emit_op(compiler, SLJIT_MOV_SH, flags | HALF_DATA | SIGNED_DATA, dst, dstw, TMP_REG1, 0, src, (src & SLJIT_IMM) ? (sljit_sh)srcw : srcw);
-
-	case SLJIT_MOVU:
-	case SLJIT_MOVU_P:
-		return emit_op(compiler, SLJIT_MOV, flags | WORD_DATA | WRITE_BACK, dst, dstw, TMP_REG1, 0, src, srcw);
-
-	case SLJIT_MOVU_UI:
-		return emit_op(compiler, SLJIT_MOV_UI, flags | INT_DATA | WRITE_BACK, dst, dstw, TMP_REG1, 0, src, srcw);
-
-	case SLJIT_MOVU_SI:
-		return emit_op(compiler, SLJIT_MOV_SI, flags | INT_DATA | SIGNED_DATA | WRITE_BACK, dst, dstw, TMP_REG1, 0, src, srcw);
-
-	case SLJIT_MOVU_UB:
-		return emit_op(compiler, SLJIT_MOV_UB, flags | BYTE_DATA | WRITE_BACK, dst, dstw, TMP_REG1, 0, src, (src & SLJIT_IMM) ? (sljit_ub)srcw : srcw);
-
-	case SLJIT_MOVU_SB:
-		return emit_op(compiler, SLJIT_MOV_SB, flags | BYTE_DATA | SIGNED_DATA | WRITE_BACK, dst, dstw, TMP_REG1, 0, src, (src & SLJIT_IMM) ? (sljit_sb)srcw : srcw);
-
-	case SLJIT_MOVU_UH:
-		return emit_op(compiler, SLJIT_MOV_UH, flags | HALF_DATA | WRITE_BACK, dst, dstw, TMP_REG1, 0, src, (src & SLJIT_IMM) ? (sljit_uh)srcw : srcw);
-
-	case SLJIT_MOVU_SH:
-		return emit_op(compiler, SLJIT_MOV_SH, flags | HALF_DATA | SIGNED_DATA | WRITE_BACK, dst, dstw, TMP_REG1, 0, src, (src & SLJIT_IMM) ? (sljit_sh)srcw : srcw);
-
-	case SLJIT_NOT:
-	case SLJIT_CLZ:
-		return emit_op(compiler, op, flags, dst, dstw, TMP_REG1, 0, src, srcw);
-
-	case SLJIT_NEG:
-		return emit_op(compiler, SLJIT_SUB, flags | IMM_OP, dst, dstw, SLJIT_IMM, 0, src, srcw);
-	}
-
-	return SLJIT_SUCCESS;
-}
-
-SLJIT_API_FUNC_ATTRIBUTE sljit_si sljit_emit_op2(struct sljit_compiler *compiler, sljit_si op,
-	sljit_si dst, sljit_sw dstw,
-	sljit_si src1, sljit_sw src1w,
-	sljit_si src2, sljit_sw src2w)
-{
-	sljit_si flags = GET_FLAGS(op) ? SET_FLAGS : 0;
-
-	CHECK_ERROR();
-	check_sljit_emit_op2(compiler, op, dst, dstw, src1, src1w, src2, src2w);
-	ADJUST_LOCAL_OFFSET(dst, dstw);
-	ADJUST_LOCAL_OFFSET(src1, src1w);
-	ADJUST_LOCAL_OFFSET(src2, src2w);
-
-	op = GET_OPCODE(op);
-	switch (op) {
-	case SLJIT_ADD:
-	case SLJIT_ADDC:
-	case SLJIT_MUL:
-	case SLJIT_AND:
-	case SLJIT_OR:
-	case SLJIT_XOR:
-		return emit_op(compiler, op, flags | CUMULATIVE_OP | IMM_OP, dst, dstw, src1, src1w, src2, src2w);
-
-	case SLJIT_SUB:
-	case SLJIT_SUBC:
-		return emit_op(compiler, op, flags | IMM_OP, dst, dstw, src1, src1w, src2, src2w);
-
-	case SLJIT_SHL:
-	case SLJIT_LSHR:
-	case SLJIT_ASHR:
-#if (defined SLJIT_CONFIG_SPARC_32 && SLJIT_CONFIG_SPARC_32)
-		if (src2 & SLJIT_IMM)
-			src2w &= 0x1f;
-#else
-		SLJIT_ASSERT_STOP();
-#endif
-		return emit_op(compiler, op, flags | IMM_OP, dst, dstw, src1, src1w, src2, src2w);
-	}
-
-	return SLJIT_SUCCESS;
-}
-
-SLJIT_API_FUNC_ATTRIBUTE sljit_si sljit_get_register_index(sljit_si reg)
-{
-	check_sljit_get_register_index(reg);
-	return reg_map[reg];
-}
-
-SLJIT_API_FUNC_ATTRIBUTE sljit_si sljit_get_float_register_index(sljit_si reg)
-{
-	check_sljit_get_float_register_index(reg);
-	return reg << 1;
-}
-
-SLJIT_API_FUNC_ATTRIBUTE sljit_si sljit_emit_op_custom(struct sljit_compiler *compiler,
-	void *instruction, sljit_si size)
-{
-	CHECK_ERROR();
-	check_sljit_emit_op_custom(compiler, instruction, size);
-	SLJIT_ASSERT(size == 4);
-
-	return push_inst(compiler, *(sljit_ins*)instruction, UNMOVABLE_INS);
-}
-
-/* --------------------------------------------------------------------- */
-/*  Floating point operators                                             */
-/* --------------------------------------------------------------------- */
-
-SLJIT_API_FUNC_ATTRIBUTE sljit_si sljit_is_fpu_available(void)
-{
-#ifdef SLJIT_IS_FPU_AVAILABLE
-	return SLJIT_IS_FPU_AVAILABLE;
-#else
-	/* Available by default. */
-	return 1;
-#endif
-}
-
-#define FLOAT_DATA(op) (DOUBLE_DATA | ((op & SLJIT_SINGLE_OP) >> 7))
-#define SELECT_FOP(op, single, double) ((op & SLJIT_SINGLE_OP) ? single : double)
-
-SLJIT_API_FUNC_ATTRIBUTE sljit_si sljit_emit_fop1(struct sljit_compiler *compiler, sljit_si op,
-	sljit_si dst, sljit_sw dstw,
-	sljit_si src, sljit_sw srcw)
-{
-	sljit_si dst_fr;
-
-	CHECK_ERROR();
-	check_sljit_emit_fop1(compiler, op, dst, dstw, src, srcw);
-	SLJIT_COMPILE_ASSERT((SLJIT_SINGLE_OP == 0x100) && !(DOUBLE_DATA & 0x2), float_transfer_bit_error);
-
-	compiler->cache_arg = 0;
-	compiler->cache_argw = 0;
-
-	if (GET_OPCODE(op) == SLJIT_CMPD) {
-		if (dst & SLJIT_MEM) {
-			FAIL_IF(emit_op_mem2(compiler, FLOAT_DATA(op) | LOAD_DATA, TMP_FREG1, dst, dstw, src, srcw));
-			dst = TMP_FREG1;
-		}
-		else
-			dst <<= 1;
-
-		if (src & SLJIT_MEM) {
-			FAIL_IF(emit_op_mem2(compiler, FLOAT_DATA(op) | LOAD_DATA, TMP_FREG2, src, srcw, 0, 0));
-			src = TMP_FREG2;
-		}
-		else
-			src <<= 1;
-
-		return push_inst(compiler, SELECT_FOP(op, FCMPS, FCMPD) | S1A(dst) | S2A(src), FCC_IS_SET | MOVABLE_INS);
-	}
-
-	dst_fr = FAST_IS_REG(dst) ? (dst << 1) : TMP_FREG1;
-
-	if (src & SLJIT_MEM) {
-		FAIL_IF(emit_op_mem2(compiler, FLOAT_DATA(op) | LOAD_DATA, dst_fr, src, srcw, dst, dstw));
-		src = dst_fr;
-	}
-	else
-		src <<= 1;
-
-	switch (GET_OPCODE(op)) {
-		case SLJIT_MOVD:
-			if (src != dst_fr && dst_fr != TMP_FREG1) {
-				FAIL_IF(push_inst(compiler, FMOVS | DA(dst_fr) | S2A(src), MOVABLE_INS));
-				if (!(op & SLJIT_SINGLE_OP))
-					FAIL_IF(push_inst(compiler, FMOVS | DA(dst_fr | 1) | S2A(src | 1), MOVABLE_INS));
-			}
-			break;
-		case SLJIT_NEGD:
-			FAIL_IF(push_inst(compiler, FNEGS | DA(dst_fr) | S2A(src), MOVABLE_INS));
-			if (dst_fr != src && !(op & SLJIT_SINGLE_OP))
-				FAIL_IF(push_inst(compiler, FMOVS | DA(dst_fr | 1) | S2A(src | 1), MOVABLE_INS));
-			break;
-		case SLJIT_ABSD:
-			FAIL_IF(push_inst(compiler, FABSS | DA(dst_fr) | S2A(src), MOVABLE_INS));
-			if (dst_fr != src && !(op & SLJIT_SINGLE_OP))
-				FAIL_IF(push_inst(compiler, FMOVS | DA(dst_fr | 1) | S2A(src | 1), MOVABLE_INS));
-			break;
-	}
-
-	if (dst_fr == TMP_FREG1) {
-		if (GET_OPCODE(op) == SLJIT_MOVD)
-			dst_fr = src;
-		FAIL_IF(emit_op_mem2(compiler, FLOAT_DATA(op), dst_fr, dst, dstw, 0, 0));
-	}
-
-	return SLJIT_SUCCESS;
-}
-
-SLJIT_API_FUNC_ATTRIBUTE sljit_si sljit_emit_fop2(struct sljit_compiler *compiler, sljit_si op,
-	sljit_si dst, sljit_sw dstw,
-	sljit_si src1, sljit_sw src1w,
-	sljit_si src2, sljit_sw src2w)
-{
-	sljit_si dst_fr, flags = 0;
-
-	CHECK_ERROR();
-	check_sljit_emit_fop2(compiler, op, dst, dstw, src1, src1w, src2, src2w);
-
-	compiler->cache_arg = 0;
-	compiler->cache_argw = 0;
-
-	dst_fr = FAST_IS_REG(dst) ? (dst << 1) : TMP_FREG2;
-
-	if (src1 & SLJIT_MEM) {
-		if (getput_arg_fast(compiler, FLOAT_DATA(op) | LOAD_DATA, TMP_FREG1, src1, src1w)) {
-			FAIL_IF(compiler->error);
-			src1 = TMP_FREG1;
-		} else
-			flags |= SLOW_SRC1;
-	}
-	else
-		src1 <<= 1;
-
-	if (src2 & SLJIT_MEM) {
-		if (getput_arg_fast(compiler, FLOAT_DATA(op) | LOAD_DATA, TMP_FREG2, src2, src2w)) {
-			FAIL_IF(compiler->error);
-			src2 = TMP_FREG2;
-		} else
-			flags |= SLOW_SRC2;
-	}
-	else
-		src2 <<= 1;
-
-	if ((flags & (SLOW_SRC1 | SLOW_SRC2)) == (SLOW_SRC1 | SLOW_SRC2)) {
-		if (!can_cache(src1, src1w, src2, src2w) && can_cache(src1, src1w, dst, dstw)) {
-			FAIL_IF(getput_arg(compiler, FLOAT_DATA(op) | LOAD_DATA, TMP_FREG2, src2, src2w, src1, src1w));
-			FAIL_IF(getput_arg(compiler, FLOAT_DATA(op) | LOAD_DATA, TMP_FREG1, src1, src1w, dst, dstw));
-		}
-		else {
-			FAIL_IF(getput_arg(compiler, FLOAT_DATA(op) | LOAD_DATA, TMP_FREG1, src1, src1w, src2, src2w));
-			FAIL_IF(getput_arg(compiler, FLOAT_DATA(op) | LOAD_DATA, TMP_FREG2, src2, src2w, dst, dstw));
-		}
-	}
-	else if (flags & SLOW_SRC1)
-		FAIL_IF(getput_arg(compiler, FLOAT_DATA(op) | LOAD_DATA, TMP_FREG1, src1, src1w, dst, dstw));
-	else if (flags & SLOW_SRC2)
-		FAIL_IF(getput_arg(compiler, FLOAT_DATA(op) | LOAD_DATA, TMP_FREG2, src2, src2w, dst, dstw));
-
-	if (flags & SLOW_SRC1)
-		src1 = TMP_FREG1;
-	if (flags & SLOW_SRC2)
-		src2 = TMP_FREG2;
-
-	switch (GET_OPCODE(op)) {
-	case SLJIT_ADDD:
-		FAIL_IF(push_inst(compiler, SELECT_FOP(op, FADDS, FADDD) | DA(dst_fr) | S1A(src1) | S2A(src2), MOVABLE_INS));
-		break;
-
-	case SLJIT_SUBD:
-		FAIL_IF(push_inst(compiler, SELECT_FOP(op, FSUBS, FSUBD) | DA(dst_fr) | S1A(src1) | S2A(src2), MOVABLE_INS));
-		break;
-
-	case SLJIT_MULD:
-		FAIL_IF(push_inst(compiler, SELECT_FOP(op, FMULS, FMULD) | DA(dst_fr) | S1A(src1) | S2A(src2), MOVABLE_INS));
-		break;
-
-	case SLJIT_DIVD:
-		FAIL_IF(push_inst(compiler, SELECT_FOP(op, FDIVS, FDIVD) | DA(dst_fr) | S1A(src1) | S2A(src2), MOVABLE_INS));
-		break;
-	}
-
-	if (dst_fr == TMP_FREG2)
-		FAIL_IF(emit_op_mem2(compiler, FLOAT_DATA(op), TMP_FREG2, dst, dstw, 0, 0));
-
-	return SLJIT_SUCCESS;
-}
-
-#undef FLOAT_DATA
-#undef SELECT_FOP
-
-/* --------------------------------------------------------------------- */
-/*  Other instructions                                                   */
-/* --------------------------------------------------------------------- */
-
-SLJIT_API_FUNC_ATTRIBUTE sljit_si sljit_emit_fast_enter(struct sljit_compiler *compiler, sljit_si dst, sljit_sw dstw)
-{
-	CHECK_ERROR();
-	check_sljit_emit_fast_enter(compiler, dst, dstw);
-	ADJUST_LOCAL_OFFSET(dst, dstw);
-
-	/* For UNUSED dst. Uncommon, but possible. */
-	if (dst == SLJIT_UNUSED)
-		return SLJIT_SUCCESS;
-
-	if (FAST_IS_REG(dst))
-		return push_inst(compiler, OR | D(dst) | S1(0) | S2(TMP_LINK), DR(dst));
-
-	/* Memory. */
-	return emit_op_mem(compiler, WORD_DATA, TMP_LINK, dst, dstw);
-}
-
-SLJIT_API_FUNC_ATTRIBUTE sljit_si sljit_emit_fast_return(struct sljit_compiler *compiler, sljit_si src, sljit_sw srcw)
-{
-	CHECK_ERROR();
-	check_sljit_emit_fast_return(compiler, src, srcw);
-	ADJUST_LOCAL_OFFSET(src, srcw);
-
-	if (FAST_IS_REG(src))
-		FAIL_IF(push_inst(compiler, OR | D(TMP_LINK) | S1(0) | S2(src), DR(TMP_LINK)));
-	else if (src & SLJIT_MEM)
-		FAIL_IF(emit_op_mem(compiler, WORD_DATA | LOAD_DATA, TMP_LINK, src, srcw));
-	else if (src & SLJIT_IMM)
-		FAIL_IF(load_immediate(compiler, TMP_LINK, srcw));
-
-	FAIL_IF(push_inst(compiler, JMPL | D(0) | S1(TMP_LINK) | IMM(8), UNMOVABLE_INS));
-	return push_inst(compiler, NOP, UNMOVABLE_INS);
-}
-
-/* --------------------------------------------------------------------- */
-/*  Conditional instructions                                             */
-/* --------------------------------------------------------------------- */
-
-SLJIT_API_FUNC_ATTRIBUTE struct sljit_label* sljit_emit_label(struct sljit_compiler *compiler)
-{
-	struct sljit_label *label;
-
-	CHECK_ERROR_PTR();
-	check_sljit_emit_label(compiler);
-
-	if (compiler->last_label && compiler->last_label->size == compiler->size)
-		return compiler->last_label;
-
-	label = (struct sljit_label*)ensure_abuf(compiler, sizeof(struct sljit_label));
-	PTR_FAIL_IF(!label);
-	set_label(label, compiler);
-	compiler->delay_slot = UNMOVABLE_INS;
-	return label;
-}
-
-static sljit_ins get_cc(sljit_si type)
-{
-	switch (type) {
-	case SLJIT_C_EQUAL:
-	case SLJIT_C_MUL_NOT_OVERFLOW:
-		return DA(0x1);
-
-	case SLJIT_C_NOT_EQUAL:
-	case SLJIT_C_MUL_OVERFLOW:
-		return DA(0x9);
-
-	case SLJIT_C_LESS:
-		return DA(0x5);
-
-	case SLJIT_C_GREATER_EQUAL:
-		return DA(0xd);
-
-	case SLJIT_C_GREATER:
-		return DA(0xc);
-
-	case SLJIT_C_LESS_EQUAL:
-		return DA(0x4);
-
-	case SLJIT_C_SIG_LESS:
-		return DA(0x3);
-
-	case SLJIT_C_SIG_GREATER_EQUAL:
-		return DA(0xb);
-
-	case SLJIT_C_SIG_GREATER:
-		return DA(0xa);
-
-	case SLJIT_C_SIG_LESS_EQUAL:
-		return DA(0x2);
-
-	case SLJIT_C_OVERFLOW:
-		return DA(0x7);
-
-	case SLJIT_C_NOT_OVERFLOW:
-		return DA(0xf);
-
-	case SLJIT_C_FLOAT_EQUAL:
-		return DA(0x9);
-
-	case SLJIT_C_FLOAT_NOT_EQUAL: /* Unordered. */
-		return DA(0x1);
-
-	case SLJIT_C_FLOAT_LESS:
-		return DA(0x4);
-
-	case SLJIT_C_FLOAT_GREATER_EQUAL: /* Unordered. */
-		return DA(0xc);
-
-	case SLJIT_C_FLOAT_LESS_EQUAL:
-		return DA(0xd);
-
-	case SLJIT_C_FLOAT_GREATER: /* Unordered. */
-		return DA(0x5);
-
-	case SLJIT_C_FLOAT_UNORDERED:
-		return DA(0x7);
-
-	case SLJIT_C_FLOAT_ORDERED:
-		return DA(0xf);
-
-	default:
-		SLJIT_ASSERT_STOP();
-		return DA(0x8);
-	}
-}
-
-SLJIT_API_FUNC_ATTRIBUTE struct sljit_jump* sljit_emit_jump(struct sljit_compiler *compiler, sljit_si type)
-{
-	struct sljit_jump *jump;
-
-	CHECK_ERROR_PTR();
-	check_sljit_emit_jump(compiler, type);
-
-	jump = (struct sljit_jump*)ensure_abuf(compiler, sizeof(struct sljit_jump));
-	PTR_FAIL_IF(!jump);
-	set_jump(jump, compiler, type & SLJIT_REWRITABLE_JUMP);
-	type &= 0xff;
-
-	if (type < SLJIT_C_FLOAT_EQUAL) {
-		jump->flags |= IS_COND;
-		if (((compiler->delay_slot & DST_INS_MASK) != UNMOVABLE_INS) && !(compiler->delay_slot & ICC_IS_SET))
-			jump->flags |= IS_MOVABLE;
-#if (defined SLJIT_CONFIG_SPARC_32 && SLJIT_CONFIG_SPARC_32)
-		PTR_FAIL_IF(push_inst(compiler, BICC | get_cc(type ^ 1) | 5, UNMOVABLE_INS));
-#else
-#error "Implementation required"
-#endif
-	}
-	else if (type < SLJIT_JUMP) {
-		jump->flags |= IS_COND;
-		if (((compiler->delay_slot & DST_INS_MASK) != UNMOVABLE_INS) && !(compiler->delay_slot & FCC_IS_SET))
-			jump->flags |= IS_MOVABLE;
-#if (defined SLJIT_CONFIG_SPARC_32 && SLJIT_CONFIG_SPARC_32)
-		PTR_FAIL_IF(push_inst(compiler, FBFCC | get_cc(type ^ 1) | 5, UNMOVABLE_INS));
-#else
-#error "Implementation required"
-#endif
-	} else {
-		if ((compiler->delay_slot & DST_INS_MASK) != UNMOVABLE_INS)
-			jump->flags |= IS_MOVABLE;
-		if (type >= SLJIT_FAST_CALL)
-			jump->flags |= IS_CALL;
-	}
-
-	PTR_FAIL_IF(emit_const(compiler, TMP_REG2, 0));
-	PTR_FAIL_IF(push_inst(compiler, JMPL | D(type >= SLJIT_FAST_CALL ? TMP_LINK : 0) | S1(TMP_REG2) | IMM(0), UNMOVABLE_INS));
-	jump->addr = compiler->size;
-	PTR_FAIL_IF(push_inst(compiler, NOP, UNMOVABLE_INS));
-
-	return jump;
-}
-
-SLJIT_API_FUNC_ATTRIBUTE sljit_si sljit_emit_ijump(struct sljit_compiler *compiler, sljit_si type, sljit_si src, sljit_sw srcw)
-{
-	struct sljit_jump *jump = NULL;
-	sljit_si src_r;
-
-	CHECK_ERROR();
-	check_sljit_emit_ijump(compiler, type, src, srcw);
-	ADJUST_LOCAL_OFFSET(src, srcw);
-
-	if (FAST_IS_REG(src))
-		src_r = src;
-	else if (src & SLJIT_IMM) {
-		jump = (struct sljit_jump*)ensure_abuf(compiler, sizeof(struct sljit_jump));
-		FAIL_IF(!jump);
-		set_jump(jump, compiler, JUMP_ADDR);
-		jump->u.target = srcw;
-		if ((compiler->delay_slot & DST_INS_MASK) != UNMOVABLE_INS)
-			jump->flags |= IS_MOVABLE;
-		if (type >= SLJIT_FAST_CALL)
-			jump->flags |= IS_CALL;
-
-		FAIL_IF(emit_const(compiler, TMP_REG2, 0));
-		src_r = TMP_REG2;
-	}
-	else {
-		FAIL_IF(emit_op_mem(compiler, WORD_DATA | LOAD_DATA, TMP_REG2, src, srcw));
-		src_r = TMP_REG2;
-	}
-
-	FAIL_IF(push_inst(compiler, JMPL | D(type >= SLJIT_FAST_CALL ? TMP_LINK : 0) | S1(src_r) | IMM(0), UNMOVABLE_INS));
-	if (jump)
-		jump->addr = compiler->size;
-	return push_inst(compiler, NOP, UNMOVABLE_INS);
-}
-
-SLJIT_API_FUNC_ATTRIBUTE sljit_si sljit_emit_op_flags(struct sljit_compiler *compiler, sljit_si op,
-	sljit_si dst, sljit_sw dstw,
-	sljit_si src, sljit_sw srcw,
-	sljit_si type)
-{
-	sljit_si reg, flags = (GET_FLAGS(op) ? SET_FLAGS : 0);
-
-	CHECK_ERROR();
-	check_sljit_emit_op_flags(compiler, op, dst, dstw, src, srcw, type);
-	ADJUST_LOCAL_OFFSET(dst, dstw);
-
-	if (dst == SLJIT_UNUSED)
-		return SLJIT_SUCCESS;
-
-#if (defined SLJIT_CONFIG_SPARC_32 && SLJIT_CONFIG_SPARC_32)
-	op = GET_OPCODE(op);
-	reg = (op < SLJIT_ADD && FAST_IS_REG(dst)) ? dst : TMP_REG2;
-
-	compiler->cache_arg = 0;
-	compiler->cache_argw = 0;
-	if (op >= SLJIT_ADD && (src & SLJIT_MEM)) {
-		ADJUST_LOCAL_OFFSET(src, srcw);
-		FAIL_IF(emit_op_mem2(compiler, WORD_DATA | LOAD_DATA, TMP_REG1, src, srcw, dst, dstw));
-		src = TMP_REG1;
-		srcw = 0;
-	}
-
-	if (type < SLJIT_C_FLOAT_EQUAL)
-		FAIL_IF(push_inst(compiler, BICC | get_cc(type) | 3, UNMOVABLE_INS));
-	else
-		FAIL_IF(push_inst(compiler, FBFCC | get_cc(type) | 3, UNMOVABLE_INS));
-
-	FAIL_IF(push_inst(compiler, OR | D(reg) | S1(0) | IMM(1), UNMOVABLE_INS));
-	FAIL_IF(push_inst(compiler, OR | D(reg) | S1(0) | IMM(0), UNMOVABLE_INS));
-
-	if (op >= SLJIT_ADD)
-		return emit_op(compiler, op, flags | CUMULATIVE_OP | IMM_OP | ALT_KEEP_CACHE, dst, dstw, src, srcw, TMP_REG2, 0);
-
-	return (reg == TMP_REG2) ? emit_op_mem(compiler, WORD_DATA, TMP_REG2, dst, dstw) : SLJIT_SUCCESS;
-#else
-#error "Implementation required"
-#endif
-}
-
-SLJIT_API_FUNC_ATTRIBUTE struct sljit_const* sljit_emit_const(struct sljit_compiler *compiler, sljit_si dst, sljit_sw dstw, sljit_sw init_value)
-{
-	sljit_si reg;
-	struct sljit_const *const_;
-
-	CHECK_ERROR_PTR();
-	check_sljit_emit_const(compiler, dst, dstw, init_value);
-	ADJUST_LOCAL_OFFSET(dst, dstw);
-
-	const_ = (struct sljit_const*)ensure_abuf(compiler, sizeof(struct sljit_const));
-	PTR_FAIL_IF(!const_);
-	set_const(const_, compiler);
-
-	reg = SLOW_IS_REG(dst) ? dst : TMP_REG2;
-
-	PTR_FAIL_IF(emit_const(compiler, reg, init_value));
-
-	if (dst & SLJIT_MEM)
-		PTR_FAIL_IF(emit_op_mem(compiler, WORD_DATA, TMP_REG2, dst, dstw));
-	return const_;
-}
diff --git a/src/extra/pcre/sljit/sljitNativeX86_32.c b/src/extra/pcre/sljit/sljitNativeX86_32.c
deleted file mode 100644
index dd03f26..0000000
--- a/src/extra/pcre/sljit/sljitNativeX86_32.c
+++ /dev/null
@@ -1,557 +0,0 @@
-/*
- *    Stack-less Just-In-Time compiler
- *
- *    Copyright 2009-2012 Zoltan Herczeg (hzmester at freemail.hu). All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without modification, are
- * permitted provided that the following conditions are met:
- *
- *   1. Redistributions of source code must retain the above copyright notice, this list of
- *      conditions and the following disclaimer.
- *
- *   2. Redistributions in binary form must reproduce the above copyright notice, this list
- *      of conditions and the following disclaimer in the documentation and/or other materials
- *      provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER(S) AND CONTRIBUTORS ``AS IS'' AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
- * SHALL THE COPYRIGHT HOLDER(S) OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
- * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
- * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
- * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/* x86 32-bit arch dependent functions. */
-
-static sljit_si emit_do_imm(struct sljit_compiler *compiler, sljit_ub opcode, sljit_sw imm)
-{
-	sljit_ub *inst;
-
-	inst = (sljit_ub*)ensure_buf(compiler, 1 + 1 + sizeof(sljit_sw));
-	FAIL_IF(!inst);
-	INC_SIZE(1 + sizeof(sljit_sw));
-	*inst++ = opcode;
-	*(sljit_sw*)inst = imm;
-	return SLJIT_SUCCESS;
-}
-
-static sljit_ub* generate_far_jump_code(struct sljit_jump *jump, sljit_ub *code_ptr, sljit_si type)
-{
-	if (type == SLJIT_JUMP) {
-		*code_ptr++ = JMP_i32;
-		jump->addr++;
-	}
-	else if (type >= SLJIT_FAST_CALL) {
-		*code_ptr++ = CALL_i32;
-		jump->addr++;
-	}
-	else {
-		*code_ptr++ = GROUP_0F;
-		*code_ptr++ = get_jump_code(type);
-		jump->addr += 2;
-	}
-
-	if (jump->flags & JUMP_LABEL)
-		jump->flags |= PATCH_MW;
-	else
-		*(sljit_sw*)code_ptr = jump->u.target - (jump->addr + 4);
-	code_ptr += 4;
-
-	return code_ptr;
-}
-
-SLJIT_API_FUNC_ATTRIBUTE sljit_si sljit_emit_enter(struct sljit_compiler *compiler, sljit_si args, sljit_si scratches, sljit_si saveds, sljit_si local_size)
-{
-	sljit_si size;
-	sljit_si locals_offset;
-	sljit_ub *inst;
-
-	CHECK_ERROR();
-	check_sljit_emit_enter(compiler, args, scratches, saveds, local_size);
-
-	compiler->scratches = scratches;
-	compiler->saveds = saveds;
-	compiler->args = args;
-	compiler->flags_saved = 0;
-#if (defined SLJIT_DEBUG && SLJIT_DEBUG)
-	compiler->logical_local_size = local_size;
-#endif
-
-#if (defined SLJIT_X86_32_FASTCALL && SLJIT_X86_32_FASTCALL)
-	size = 1 + (saveds <= 3 ? saveds : 3) + (args > 0 ? (args * 2) : 0) + (args > 2 ? 2 : 0);
-#else
-	size = 1 + (saveds <= 3 ? saveds : 3) + (args > 0 ? (2 + args * 3) : 0);
-#endif
-	inst = (sljit_ub*)ensure_buf(compiler, 1 + size);
-	FAIL_IF(!inst);
-
-	INC_SIZE(size);
-	PUSH_REG(reg_map[TMP_REG1]);
-#if !(defined SLJIT_X86_32_FASTCALL && SLJIT_X86_32_FASTCALL)
-	if (args > 0) {
-		*inst++ = MOV_r_rm;
-		*inst++ = MOD_REG | (reg_map[TMP_REG1] << 3) | 0x4 /* esp */;
-	}
-#endif
-	if (saveds > 2)
-		PUSH_REG(reg_map[SLJIT_SAVED_REG3]);
-	if (saveds > 1)
-		PUSH_REG(reg_map[SLJIT_SAVED_REG2]);
-	if (saveds > 0)
-		PUSH_REG(reg_map[SLJIT_SAVED_REG1]);
-
-#if (defined SLJIT_X86_32_FASTCALL && SLJIT_X86_32_FASTCALL)
-	if (args > 0) {
-		*inst++ = MOV_r_rm;
-		*inst++ = MOD_REG | (reg_map[SLJIT_SAVED_REG1] << 3) | reg_map[SLJIT_SCRATCH_REG3];
-	}
-	if (args > 1) {
-		*inst++ = MOV_r_rm;
-		*inst++ = MOD_REG | (reg_map[SLJIT_SAVED_REG2] << 3) | reg_map[SLJIT_SCRATCH_REG2];
-	}
-	if (args > 2) {
-		*inst++ = MOV_r_rm;
-		*inst++ = MOD_DISP8 | (reg_map[SLJIT_SAVED_REG3] << 3) | 0x4 /* esp */;
-		*inst++ = 0x24;
-		*inst++ = sizeof(sljit_sw) * (3 + 2); /* saveds >= 3 as well. */
-	}
-#else
-	if (args > 0) {
-		*inst++ = MOV_r_rm;
-		*inst++ = MOD_DISP8 | (reg_map[SLJIT_SAVED_REG1] << 3) | reg_map[TMP_REG1];
-		*inst++ = sizeof(sljit_sw) * 2;
-	}
-	if (args > 1) {
-		*inst++ = MOV_r_rm;
-		*inst++ = MOD_DISP8 | (reg_map[SLJIT_SAVED_REG2] << 3) | reg_map[TMP_REG1];
-		*inst++ = sizeof(sljit_sw) * 3;
-	}
-	if (args > 2) {
-		*inst++ = MOV_r_rm;
-		*inst++ = MOD_DISP8 | (reg_map[SLJIT_SAVED_REG3] << 3) | reg_map[TMP_REG1];
-		*inst++ = sizeof(sljit_sw) * 4;
-	}
-#endif
-
-#if (defined SLJIT_X86_32_FASTCALL && SLJIT_X86_32_FASTCALL)
-	locals_offset = 2 * sizeof(sljit_uw);
-#else
-	SLJIT_COMPILE_ASSERT(FIXED_LOCALS_OFFSET >= 2 * sizeof(sljit_uw), require_at_least_two_words);
-	locals_offset = FIXED_LOCALS_OFFSET;
-#endif
-	compiler->scratches_start = locals_offset;
-	if (scratches > 3)
-		locals_offset += (scratches - 3) * sizeof(sljit_uw);
-	compiler->saveds_start = locals_offset;
-	if (saveds > 3)
-		locals_offset += (saveds - 3) * sizeof(sljit_uw);
-	compiler->locals_offset = locals_offset;
-#if defined(__APPLE__)
-	saveds = (2 + (saveds <= 3 ? saveds : 3)) * sizeof(sljit_uw);
-	local_size = ((locals_offset + saveds + local_size + 15) & ~15) - saveds;
-#else
-	local_size = locals_offset + ((local_size + sizeof(sljit_uw) - 1) & ~(sizeof(sljit_uw) - 1));
-#endif
-
-	compiler->local_size = local_size;
-#ifdef _WIN32
-	if (local_size > 1024) {
-#if (defined SLJIT_X86_32_FASTCALL && SLJIT_X86_32_FASTCALL)
-		FAIL_IF(emit_do_imm(compiler, MOV_r_i32 + reg_map[SLJIT_SCRATCH_REG1], local_size));
-#else
-		local_size -= FIXED_LOCALS_OFFSET;
-		FAIL_IF(emit_do_imm(compiler, MOV_r_i32 + reg_map[SLJIT_SCRATCH_REG1], local_size));
-		FAIL_IF(emit_non_cum_binary(compiler, SUB_r_rm, SUB_rm_r, SUB, SUB_EAX_i32,
-			SLJIT_LOCALS_REG, 0, SLJIT_LOCALS_REG, 0, SLJIT_IMM, FIXED_LOCALS_OFFSET));
-#endif
-		FAIL_IF(sljit_emit_ijump(compiler, SLJIT_CALL1, SLJIT_IMM, SLJIT_FUNC_OFFSET(sljit_grow_stack)));
-	}
-#endif
-
-	SLJIT_ASSERT(local_size > 0);
-	return emit_non_cum_binary(compiler, SUB_r_rm, SUB_rm_r, SUB, SUB_EAX_i32,
-		SLJIT_LOCALS_REG, 0, SLJIT_LOCALS_REG, 0, SLJIT_IMM, local_size);
-}
-
-SLJIT_API_FUNC_ATTRIBUTE void sljit_set_context(struct sljit_compiler *compiler, sljit_si args, sljit_si scratches, sljit_si saveds, sljit_si local_size)
-{
-	sljit_si locals_offset;
-
-	CHECK_ERROR_VOID();
-	check_sljit_set_context(compiler, args, scratches, saveds, local_size);
-
-	compiler->scratches = scratches;
-	compiler->saveds = saveds;
-	compiler->args = args;
-#if (defined SLJIT_DEBUG && SLJIT_DEBUG)
-	compiler->logical_local_size = local_size;
-#endif
-
-#if (defined SLJIT_X86_32_FASTCALL && SLJIT_X86_32_FASTCALL)
-	locals_offset = 2 * sizeof(sljit_uw);
-#else
-	locals_offset = FIXED_LOCALS_OFFSET;
-#endif
-	compiler->scratches_start = locals_offset;
-	if (scratches > 3)
-		locals_offset += (scratches - 3) * sizeof(sljit_uw);
-	compiler->saveds_start = locals_offset;
-	if (saveds > 3)
-		locals_offset += (saveds - 3) * sizeof(sljit_uw);
-	compiler->locals_offset = locals_offset;
-#if defined(__APPLE__)
-	saveds = (2 + (saveds <= 3 ? saveds : 3)) * sizeof(sljit_uw);
-	compiler->local_size = ((locals_offset + saveds + local_size + 15) & ~15) - saveds;
-#else
-	compiler->local_size = locals_offset + ((local_size + sizeof(sljit_uw) - 1) & ~(sizeof(sljit_uw) - 1));
-#endif
-}
-
-SLJIT_API_FUNC_ATTRIBUTE sljit_si sljit_emit_return(struct sljit_compiler *compiler, sljit_si op, sljit_si src, sljit_sw srcw)
-{
-	sljit_si size;
-	sljit_ub *inst;
-
-	CHECK_ERROR();
-	check_sljit_emit_return(compiler, op, src, srcw);
-	SLJIT_ASSERT(compiler->args >= 0);
-
-	compiler->flags_saved = 0;
-	FAIL_IF(emit_mov_before_return(compiler, op, src, srcw));
-
-	SLJIT_ASSERT(compiler->local_size > 0);
-	FAIL_IF(emit_cum_binary(compiler, ADD_r_rm, ADD_rm_r, ADD, ADD_EAX_i32,
-		SLJIT_LOCALS_REG, 0, SLJIT_LOCALS_REG, 0, SLJIT_IMM, compiler->local_size));
-
-	size = 2 + (compiler->saveds <= 3 ? compiler->saveds : 3);
-#if (defined SLJIT_X86_32_FASTCALL && SLJIT_X86_32_FASTCALL)
-	if (compiler->args > 2)
-		size += 2;
-#else
-	if (compiler->args > 0)
-		size += 2;
-#endif
-	inst = (sljit_ub*)ensure_buf(compiler, 1 + size);
-	FAIL_IF(!inst);
-
-	INC_SIZE(size);
-
-	if (compiler->saveds > 0)
-		POP_REG(reg_map[SLJIT_SAVED_REG1]);
-	if (compiler->saveds > 1)
-		POP_REG(reg_map[SLJIT_SAVED_REG2]);
-	if (compiler->saveds > 2)
-		POP_REG(reg_map[SLJIT_SAVED_REG3]);
-	POP_REG(reg_map[TMP_REG1]);
-#if (defined SLJIT_X86_32_FASTCALL && SLJIT_X86_32_FASTCALL)
-	if (compiler->args > 2)
-		RET_I16(sizeof(sljit_sw));
-	else
-		RET();
-#else
-	RET();
-#endif
-
-	return SLJIT_SUCCESS;
-}
-
-/* --------------------------------------------------------------------- */
-/*  Operators                                                            */
-/* --------------------------------------------------------------------- */
-
-/* Size contains the flags as well. */
-static sljit_ub* emit_x86_instruction(struct sljit_compiler *compiler, sljit_si size,
-	/* The register or immediate operand. */
-	sljit_si a, sljit_sw imma,
-	/* The general operand (not immediate). */
-	sljit_si b, sljit_sw immb)
-{
-	sljit_ub *inst;
-	sljit_ub *buf_ptr;
-	sljit_si flags = size & ~0xf;
-	sljit_si inst_size;
-
-	/* Both cannot be switched on. */
-	SLJIT_ASSERT((flags & (EX86_BIN_INS | EX86_SHIFT_INS)) != (EX86_BIN_INS | EX86_SHIFT_INS));
-	/* Size flags not allowed for typed instructions. */
-	SLJIT_ASSERT(!(flags & (EX86_BIN_INS | EX86_SHIFT_INS)) || (flags & (EX86_BYTE_ARG | EX86_HALF_ARG)) == 0);
-	/* Both size flags cannot be switched on. */
-	SLJIT_ASSERT((flags & (EX86_BYTE_ARG | EX86_HALF_ARG)) != (EX86_BYTE_ARG | EX86_HALF_ARG));
-#if (defined SLJIT_SSE2 && SLJIT_SSE2)
-	/* SSE2 and immediate is not possible. */
-	SLJIT_ASSERT(!(a & SLJIT_IMM) || !(flags & EX86_SSE2));
-	SLJIT_ASSERT((flags & (EX86_PREF_F2 | EX86_PREF_F3)) != (EX86_PREF_F2 | EX86_PREF_F3)
-		&& (flags & (EX86_PREF_F2 | EX86_PREF_66)) != (EX86_PREF_F2 | EX86_PREF_66)
-		&& (flags & (EX86_PREF_F3 | EX86_PREF_66)) != (EX86_PREF_F3 | EX86_PREF_66));
-#endif
-
-	size &= 0xf;
-	inst_size = size;
-
-#if (defined SLJIT_SSE2 && SLJIT_SSE2)
-	if (flags & (EX86_PREF_F2 | EX86_PREF_F3))
-		inst_size++;
-#endif
-	if (flags & EX86_PREF_66)
-		inst_size++;
-
-	/* Calculate size of b. */
-	inst_size += 1; /* mod r/m byte. */
-	if (b & SLJIT_MEM) {
-		if ((b & REG_MASK) == SLJIT_UNUSED)
-			inst_size += sizeof(sljit_sw);
-		else if (immb != 0 && !(b & OFFS_REG_MASK)) {
-			/* Immediate operand. */
-			if (immb <= 127 && immb >= -128)
-				inst_size += sizeof(sljit_sb);
-			else
-				inst_size += sizeof(sljit_sw);
-		}
-
-		if ((b & REG_MASK) == SLJIT_LOCALS_REG && !(b & OFFS_REG_MASK))
-			b |= TO_OFFS_REG(SLJIT_LOCALS_REG);
-
-		if ((b & OFFS_REG_MASK) != SLJIT_UNUSED)
-			inst_size += 1; /* SIB byte. */
-	}
-
-	/* Calculate size of a. */
-	if (a & SLJIT_IMM) {
-		if (flags & EX86_BIN_INS) {
-			if (imma <= 127 && imma >= -128) {
-				inst_size += 1;
-				flags |= EX86_BYTE_ARG;
-			} else
-				inst_size += 4;
-		}
-		else if (flags & EX86_SHIFT_INS) {
-			imma &= 0x1f;
-			if (imma != 1) {
-				inst_size ++;
-				flags |= EX86_BYTE_ARG;
-			}
-		} else if (flags & EX86_BYTE_ARG)
-			inst_size++;
-		else if (flags & EX86_HALF_ARG)
-			inst_size += sizeof(short);
-		else
-			inst_size += sizeof(sljit_sw);
-	}
-	else
-		SLJIT_ASSERT(!(flags & EX86_SHIFT_INS) || a == SLJIT_PREF_SHIFT_REG);
-
-	inst = (sljit_ub*)ensure_buf(compiler, 1 + inst_size);
-	PTR_FAIL_IF(!inst);
-
-	/* Encoding the byte. */
-	INC_SIZE(inst_size);
-#if (defined SLJIT_SSE2 && SLJIT_SSE2)
-	if (flags & EX86_PREF_F2)
-		*inst++ = 0xf2;
-	if (flags & EX86_PREF_F3)
-		*inst++ = 0xf3;
-#endif
-	if (flags & EX86_PREF_66)
-		*inst++ = 0x66;
-
-	buf_ptr = inst + size;
-
-	/* Encode mod/rm byte. */
-	if (!(flags & EX86_SHIFT_INS)) {
-		if ((flags & EX86_BIN_INS) && (a & SLJIT_IMM))
-			*inst = (flags & EX86_BYTE_ARG) ? GROUP_BINARY_83 : GROUP_BINARY_81;
-
-		if ((a & SLJIT_IMM) || (a == 0))
-			*buf_ptr = 0;
-#if (defined SLJIT_SSE2 && SLJIT_SSE2)
-		else if (!(flags & EX86_SSE2))
-			*buf_ptr = reg_map[a] << 3;
-		else
-			*buf_ptr = a << 3;
-#else
-		else
-			*buf_ptr = reg_map[a] << 3;
-#endif
-	}
-	else {
-		if (a & SLJIT_IMM) {
-			if (imma == 1)
-				*inst = GROUP_SHIFT_1;
-			else
-				*inst = GROUP_SHIFT_N;
-		} else
-			*inst = GROUP_SHIFT_CL;
-		*buf_ptr = 0;
-	}
-
-	if (!(b & SLJIT_MEM))
-#if (defined SLJIT_SSE2 && SLJIT_SSE2)
-		*buf_ptr++ |= MOD_REG + ((!(flags & EX86_SSE2)) ? reg_map[b] : b);
-#else
-		*buf_ptr++ |= MOD_REG + reg_map[b];
-#endif
-	else if ((b & REG_MASK) != SLJIT_UNUSED) {
-		if ((b & OFFS_REG_MASK) == SLJIT_UNUSED || (b & OFFS_REG_MASK) == TO_OFFS_REG(SLJIT_LOCALS_REG)) {
-			if (immb != 0) {
-				if (immb <= 127 && immb >= -128)
-					*buf_ptr |= 0x40;
-				else
-					*buf_ptr |= 0x80;
-			}
-
-			if ((b & OFFS_REG_MASK) == SLJIT_UNUSED)
-				*buf_ptr++ |= reg_map[b & REG_MASK];
-			else {
-				*buf_ptr++ |= 0x04;
-				*buf_ptr++ = reg_map[b & REG_MASK] | (reg_map[OFFS_REG(b)] << 3);
-			}
-
-			if (immb != 0) {
-				if (immb <= 127 && immb >= -128)
-					*buf_ptr++ = immb; /* 8 bit displacement. */
-				else {
-					*(sljit_sw*)buf_ptr = immb; /* 32 bit displacement. */
-					buf_ptr += sizeof(sljit_sw);
-				}
-			}
-		}
-		else {
-			*buf_ptr++ |= 0x04;
-			*buf_ptr++ = reg_map[b & REG_MASK] | (reg_map[OFFS_REG(b)] << 3) | (immb << 6);
-		}
-	}
-	else {
-		*buf_ptr++ |= 0x05;
-		*(sljit_sw*)buf_ptr = immb; /* 32 bit displacement. */
-		buf_ptr += sizeof(sljit_sw);
-	}
-
-	if (a & SLJIT_IMM) {
-		if (flags & EX86_BYTE_ARG)
-			*buf_ptr = imma;
-		else if (flags & EX86_HALF_ARG)
-			*(short*)buf_ptr = imma;
-		else if (!(flags & EX86_SHIFT_INS))
-			*(sljit_sw*)buf_ptr = imma;
-	}
-
-	return !(flags & EX86_SHIFT_INS) ? inst : (inst + 1);
-}
-
-/* --------------------------------------------------------------------- */
-/*  Call / return instructions                                           */
-/* --------------------------------------------------------------------- */
-
-static SLJIT_INLINE sljit_si call_with_args(struct sljit_compiler *compiler, sljit_si type)
-{
-	sljit_ub *inst;
-
-#if (defined SLJIT_X86_32_FASTCALL && SLJIT_X86_32_FASTCALL)
-	inst = (sljit_ub*)ensure_buf(compiler, type >= SLJIT_CALL3 ? 1 + 2 + 1 : 1 + 2);
-	FAIL_IF(!inst);
-	INC_SIZE(type >= SLJIT_CALL3 ? 2 + 1 : 2);
-
-	if (type >= SLJIT_CALL3)
-		PUSH_REG(reg_map[SLJIT_SCRATCH_REG3]);
-	*inst++ = MOV_r_rm;
-	*inst++ = MOD_REG | (reg_map[SLJIT_SCRATCH_REG3] << 3) | reg_map[SLJIT_SCRATCH_REG1];
-#else
-	inst = (sljit_ub*)ensure_buf(compiler, 1 + 4 * (type - SLJIT_CALL0));
-	FAIL_IF(!inst);
-	INC_SIZE(4 * (type - SLJIT_CALL0));
-
-	*inst++ = MOV_rm_r;
-	*inst++ = MOD_DISP8 | (reg_map[SLJIT_SCRATCH_REG1] << 3) | 0x4 /* SIB */;
-	*inst++ = (0x4 /* none*/ << 3) | reg_map[SLJIT_LOCALS_REG];
-	*inst++ = 0;
-	if (type >= SLJIT_CALL2) {
-		*inst++ = MOV_rm_r;
-		*inst++ = MOD_DISP8 | (reg_map[SLJIT_SCRATCH_REG2] << 3) | 0x4 /* SIB */;
-		*inst++ = (0x4 /* none*/ << 3) | reg_map[SLJIT_LOCALS_REG];
-		*inst++ = sizeof(sljit_sw);
-	}
-	if (type >= SLJIT_CALL3) {
-		*inst++ = MOV_rm_r;
-		*inst++ = MOD_DISP8 | (reg_map[SLJIT_SCRATCH_REG3] << 3) | 0x4 /* SIB */;
-		*inst++ = (0x4 /* none*/ << 3) | reg_map[SLJIT_LOCALS_REG];
-		*inst++ = 2 * sizeof(sljit_sw);
-	}
-#endif
-	return SLJIT_SUCCESS;
-}
-
-SLJIT_API_FUNC_ATTRIBUTE sljit_si sljit_emit_fast_enter(struct sljit_compiler *compiler, sljit_si dst, sljit_sw dstw)
-{
-	sljit_ub *inst;
-
-	CHECK_ERROR();
-	check_sljit_emit_fast_enter(compiler, dst, dstw);
-	ADJUST_LOCAL_OFFSET(dst, dstw);
-
-	CHECK_EXTRA_REGS(dst, dstw, (void)0);
-
-	/* For UNUSED dst. Uncommon, but possible. */
-	if (dst == SLJIT_UNUSED)
-		dst = TMP_REG1;
-
-	if (FAST_IS_REG(dst)) {
-		/* Unused dest is possible here. */
-		inst = (sljit_ub*)ensure_buf(compiler, 1 + 1);
-		FAIL_IF(!inst);
-
-		INC_SIZE(1);
-		POP_REG(reg_map[dst]);
-		return SLJIT_SUCCESS;
-	}
-
-	/* Memory. */
-	inst = emit_x86_instruction(compiler, 1, 0, 0, dst, dstw);
-	FAIL_IF(!inst);
-	*inst++ = POP_rm;
-	return SLJIT_SUCCESS;
-}
-
-SLJIT_API_FUNC_ATTRIBUTE sljit_si sljit_emit_fast_return(struct sljit_compiler *compiler, sljit_si src, sljit_sw srcw)
-{
-	sljit_ub *inst;
-
-	CHECK_ERROR();
-	check_sljit_emit_fast_return(compiler, src, srcw);
-	ADJUST_LOCAL_OFFSET(src, srcw);
-
-	CHECK_EXTRA_REGS(src, srcw, (void)0);
-
-	if (FAST_IS_REG(src)) {
-		inst = (sljit_ub*)ensure_buf(compiler, 1 + 1 + 1);
-		FAIL_IF(!inst);
-
-		INC_SIZE(1 + 1);
-		PUSH_REG(reg_map[src]);
-	}
-	else if (src & SLJIT_MEM) {
-		inst = emit_x86_instruction(compiler, 1, 0, 0, src, srcw);
-		FAIL_IF(!inst);
-		*inst++ = GROUP_FF;
-		*inst |= PUSH_rm;
-
-		inst = (sljit_ub*)ensure_buf(compiler, 1 + 1);
-		FAIL_IF(!inst);
-		INC_SIZE(1);
-	}
-	else {
-		/* SLJIT_IMM. */
-		inst = (sljit_ub*)ensure_buf(compiler, 1 + 5 + 1);
-		FAIL_IF(!inst);
-
-		INC_SIZE(5 + 1);
-		*inst++ = PUSH_i32;
-		*(sljit_sw*)inst = srcw;
-		inst += sizeof(sljit_sw);
-	}
-
-	RET();
-	return SLJIT_SUCCESS;
-}
diff --git a/src/extra/pcre/sljit/sljitNativeX86_64.c b/src/extra/pcre/sljit/sljitNativeX86_64.c
deleted file mode 100644
index 967f3c3..0000000
--- a/src/extra/pcre/sljit/sljitNativeX86_64.c
+++ /dev/null
@@ -1,810 +0,0 @@
-/*
- *    Stack-less Just-In-Time compiler
- *
- *    Copyright 2009-2012 Zoltan Herczeg (hzmester at freemail.hu). All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without modification, are
- * permitted provided that the following conditions are met:
- *
- *   1. Redistributions of source code must retain the above copyright notice, this list of
- *      conditions and the following disclaimer.
- *
- *   2. Redistributions in binary form must reproduce the above copyright notice, this list
- *      of conditions and the following disclaimer in the documentation and/or other materials
- *      provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER(S) AND CONTRIBUTORS ``AS IS'' AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
- * SHALL THE COPYRIGHT HOLDER(S) OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
- * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
- * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
- * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/* x86 64-bit arch dependent functions. */
-
-static sljit_si emit_load_imm64(struct sljit_compiler *compiler, sljit_si reg, sljit_sw imm)
-{
-	sljit_ub *inst;
-
-	inst = (sljit_ub*)ensure_buf(compiler, 1 + 2 + sizeof(sljit_sw));
-	FAIL_IF(!inst);
-	INC_SIZE(2 + sizeof(sljit_sw));
-	*inst++ = REX_W | ((reg_map[reg] <= 7) ? 0 : REX_B);
-	*inst++ = MOV_r_i32 + (reg_map[reg] & 0x7);
-	*(sljit_sw*)inst = imm;
-	return SLJIT_SUCCESS;
-}
-
-static sljit_ub* generate_far_jump_code(struct sljit_jump *jump, sljit_ub *code_ptr, sljit_si type)
-{
-	if (type < SLJIT_JUMP) {
-		/* Invert type. */
-		*code_ptr++ = get_jump_code(type ^ 0x1) - 0x10;
-		*code_ptr++ = 10 + 3;
-	}
-
-	SLJIT_COMPILE_ASSERT(reg_map[TMP_REG3] == 9, tmp3_is_9_first);
-	*code_ptr++ = REX_W | REX_B;
-	*code_ptr++ = MOV_r_i32 + 1;
-	jump->addr = (sljit_uw)code_ptr;
-
-	if (jump->flags & JUMP_LABEL)
-		jump->flags |= PATCH_MD;
-	else
-		*(sljit_sw*)code_ptr = jump->u.target;
-
-	code_ptr += sizeof(sljit_sw);
-	*code_ptr++ = REX_B;
-	*code_ptr++ = GROUP_FF;
-	*code_ptr++ = (type >= SLJIT_FAST_CALL) ? (MOD_REG | CALL_rm | 1) : (MOD_REG | JMP_rm | 1);
-
-	return code_ptr;
-}
-
-static sljit_ub* generate_fixed_jump(sljit_ub *code_ptr, sljit_sw addr, sljit_si type)
-{
-	sljit_sw delta = addr - ((sljit_sw)code_ptr + 1 + sizeof(sljit_si));
-
-	if (delta <= HALFWORD_MAX && delta >= HALFWORD_MIN) {
-		*code_ptr++ = (type == 2) ? CALL_i32 : JMP_i32;
-		*(sljit_sw*)code_ptr = delta;
-	}
-	else {
-		SLJIT_COMPILE_ASSERT(reg_map[TMP_REG3] == 9, tmp3_is_9_second);
-		*code_ptr++ = REX_W | REX_B;
-		*code_ptr++ = MOV_r_i32 + 1;
-		*(sljit_sw*)code_ptr = addr;
-		code_ptr += sizeof(sljit_sw);
-		*code_ptr++ = REX_B;
-		*code_ptr++ = GROUP_FF;
-		*code_ptr++ = (type == 2) ? (MOD_REG | CALL_rm | 1) : (MOD_REG | JMP_rm | 1);
-	}
-
-	return code_ptr;
-}
-
-SLJIT_API_FUNC_ATTRIBUTE sljit_si sljit_emit_enter(struct sljit_compiler *compiler, sljit_si args, sljit_si scratches, sljit_si saveds, sljit_si local_size)
-{
-	sljit_si size, pushed_size;
-	sljit_ub *inst;
-
-	CHECK_ERROR();
-	check_sljit_emit_enter(compiler, args, scratches, saveds, local_size);
-
-	compiler->scratches = scratches;
-	compiler->saveds = saveds;
-	compiler->flags_saved = 0;
-#if (defined SLJIT_DEBUG && SLJIT_DEBUG)
-	compiler->logical_local_size = local_size;
-#endif
-
-	size = saveds;
-	/* Including the return address saved by the call instruction. */
-	pushed_size = (saveds + 1) * sizeof(sljit_sw);
-#ifndef _WIN64
-	if (saveds >= 2)
-		size += saveds - 1;
-#else
-	if (saveds >= 4)
-		size += saveds - 3;
-	if (scratches >= 5) {
-		size += (5 - 4) * 2;
-		pushed_size += sizeof(sljit_sw);
-	}
-#endif
-	size += args * 3;
-	if (size > 0) {
-		inst = (sljit_ub*)ensure_buf(compiler, 1 + size);
-		FAIL_IF(!inst);
-
-		INC_SIZE(size);
-		if (saveds >= 5) {
-			SLJIT_COMPILE_ASSERT(reg_map[SLJIT_SAVED_EREG2] >= 8, saved_ereg2_is_hireg);
-			*inst++ = REX_B;
-			PUSH_REG(reg_lmap[SLJIT_SAVED_EREG2]);
-		}
-		if (saveds >= 4) {
-			SLJIT_COMPILE_ASSERT(reg_map[SLJIT_SAVED_EREG1] >= 8, saved_ereg1_is_hireg);
-			*inst++ = REX_B;
-			PUSH_REG(reg_lmap[SLJIT_SAVED_EREG1]);
-		}
-		if (saveds >= 3) {
-#ifndef _WIN64
-			SLJIT_COMPILE_ASSERT(reg_map[SLJIT_SAVED_REG3] >= 8, saved_reg3_is_hireg);
-			*inst++ = REX_B;
-#else
-			SLJIT_COMPILE_ASSERT(reg_map[SLJIT_SAVED_REG3] < 8, saved_reg3_is_loreg);
-#endif
-			PUSH_REG(reg_lmap[SLJIT_SAVED_REG3]);
-		}
-		if (saveds >= 2) {
-#ifndef _WIN64
-			SLJIT_COMPILE_ASSERT(reg_map[SLJIT_SAVED_REG2] >= 8, saved_reg2_is_hireg);
-			*inst++ = REX_B;
-#else
-			SLJIT_COMPILE_ASSERT(reg_map[SLJIT_SAVED_REG2] < 8, saved_reg2_is_loreg);
-#endif
-			PUSH_REG(reg_lmap[SLJIT_SAVED_REG2]);
-		}
-		if (saveds >= 1) {
-			SLJIT_COMPILE_ASSERT(reg_map[SLJIT_SAVED_REG1] < 8, saved_reg1_is_loreg);
-			PUSH_REG(reg_lmap[SLJIT_SAVED_REG1]);
-		}
-#ifdef _WIN64
-		if (scratches >= 5) {
-			SLJIT_COMPILE_ASSERT(reg_map[SLJIT_TEMPORARY_EREG2] >= 8, temporary_ereg2_is_hireg);
-			*inst++ = REX_B;
-			PUSH_REG(reg_lmap[SLJIT_TEMPORARY_EREG2]);
-		}
-#endif
-
-#ifndef _WIN64
-		if (args > 0) {
-			*inst++ = REX_W;
-			*inst++ = MOV_r_rm;
-			*inst++ = MOD_REG | (reg_map[SLJIT_SAVED_REG1] << 3) | 0x7 /* rdi */;
-		}
-		if (args > 1) {
-			*inst++ = REX_W | REX_R;
-			*inst++ = MOV_r_rm;
-			*inst++ = MOD_REG | (reg_lmap[SLJIT_SAVED_REG2] << 3) | 0x6 /* rsi */;
-		}
-		if (args > 2) {
-			*inst++ = REX_W | REX_R;
-			*inst++ = MOV_r_rm;
-			*inst++ = MOD_REG | (reg_lmap[SLJIT_SAVED_REG3] << 3) | 0x2 /* rdx */;
-		}
-#else
-		if (args > 0) {
-			*inst++ = REX_W;
-			*inst++ = MOV_r_rm;
-			*inst++ = MOD_REG | (reg_map[SLJIT_SAVED_REG1] << 3) | 0x1 /* rcx */;
-		}
-		if (args > 1) {
-			*inst++ = REX_W;
-			*inst++ = MOV_r_rm;
-			*inst++ = MOD_REG | (reg_map[SLJIT_SAVED_REG2] << 3) | 0x2 /* rdx */;
-		}
-		if (args > 2) {
-			*inst++ = REX_W | REX_B;
-			*inst++ = MOV_r_rm;
-			*inst++ = MOD_REG | (reg_map[SLJIT_SAVED_REG3] << 3) | 0x0 /* r8 */;
-		}
-#endif
-	}
-
-	local_size = ((local_size + FIXED_LOCALS_OFFSET + pushed_size + 16 - 1) & ~(16 - 1)) - pushed_size;
-	compiler->local_size = local_size;
-#ifdef _WIN64
-	if (local_size > 1024) {
-		/* Allocate stack for the callback, which grows the stack. */
-		inst = (sljit_ub*)ensure_buf(compiler, 1 + 4 + (3 + sizeof(sljit_si)));
-		FAIL_IF(!inst);
-		INC_SIZE(4 + (3 + sizeof(sljit_si)));
-		*inst++ = REX_W;
-		*inst++ = GROUP_BINARY_83;
-		*inst++ = MOD_REG | SUB | 4;
-		/* Pushed size must be divisible by 8. */
-		SLJIT_ASSERT(!(pushed_size & 0x7));
-		if (pushed_size & 0x8) {
-			*inst++ = 5 * sizeof(sljit_sw);
-			local_size -= 5 * sizeof(sljit_sw);
-		} else {
-			*inst++ = 4 * sizeof(sljit_sw);
-			local_size -= 4 * sizeof(sljit_sw);
-		}
-		/* Second instruction */
-		SLJIT_COMPILE_ASSERT(reg_map[SLJIT_SCRATCH_REG1] < 8, temporary_reg1_is_loreg);
-		*inst++ = REX_W;
-		*inst++ = MOV_rm_i32;
-		*inst++ = MOD_REG | reg_lmap[SLJIT_SCRATCH_REG1];
-		*(sljit_si*)inst = local_size;
-#if (defined SLJIT_VERBOSE && SLJIT_VERBOSE) || (defined SLJIT_DEBUG && SLJIT_DEBUG)
-		compiler->skip_checks = 1;
-#endif
-		FAIL_IF(sljit_emit_ijump(compiler, SLJIT_CALL1, SLJIT_IMM, SLJIT_FUNC_OFFSET(sljit_grow_stack)));
-	}
-#endif
-	SLJIT_ASSERT(local_size > 0);
-	if (local_size <= 127) {
-		inst = (sljit_ub*)ensure_buf(compiler, 1 + 4);
-		FAIL_IF(!inst);
-		INC_SIZE(4);
-		*inst++ = REX_W;
-		*inst++ = GROUP_BINARY_83;
-		*inst++ = MOD_REG | SUB | 4;
-		*inst++ = local_size;
-	}
-	else {
-		inst = (sljit_ub*)ensure_buf(compiler, 1 + 7);
-		FAIL_IF(!inst);
-		INC_SIZE(7);
-		*inst++ = REX_W;
-		*inst++ = GROUP_BINARY_81;
-		*inst++ = MOD_REG | SUB | 4;
-		*(sljit_si*)inst = local_size;
-		inst += sizeof(sljit_si);
-	}
-#ifdef _WIN64
-	/* Save xmm6 with MOVAPS instruction. */
-	inst = (sljit_ub*)ensure_buf(compiler, 1 + 5);
-	FAIL_IF(!inst);
-	INC_SIZE(5);
-	*inst++ = GROUP_0F;
-	*(sljit_si*)inst = 0x20247429;
-#endif
-
-	return SLJIT_SUCCESS;
-}
-
-SLJIT_API_FUNC_ATTRIBUTE void sljit_set_context(struct sljit_compiler *compiler, sljit_si args, sljit_si scratches, sljit_si saveds, sljit_si local_size)
-{
-	sljit_si pushed_size;
-
-	CHECK_ERROR_VOID();
-	check_sljit_set_context(compiler, args, scratches, saveds, local_size);
-
-	compiler->scratches = scratches;
-	compiler->saveds = saveds;
-#if (defined SLJIT_DEBUG && SLJIT_DEBUG)
-	compiler->logical_local_size = local_size;
-#endif
-
-	/* Including the return address saved by the call instruction. */
-	pushed_size = (saveds + 1) * sizeof(sljit_sw);
-#ifdef _WIN64
-	if (scratches >= 5)
-		pushed_size += sizeof(sljit_sw);
-#endif
-	compiler->local_size = ((local_size + FIXED_LOCALS_OFFSET + pushed_size + 16 - 1) & ~(16 - 1)) - pushed_size;
-}
-
-SLJIT_API_FUNC_ATTRIBUTE sljit_si sljit_emit_return(struct sljit_compiler *compiler, sljit_si op, sljit_si src, sljit_sw srcw)
-{
-	sljit_si size;
-	sljit_ub *inst;
-
-	CHECK_ERROR();
-	check_sljit_emit_return(compiler, op, src, srcw);
-
-	compiler->flags_saved = 0;
-	FAIL_IF(emit_mov_before_return(compiler, op, src, srcw));
-
-#ifdef _WIN64
-	/* Restore xmm6 with MOVAPS instruction. */
-	inst = (sljit_ub*)ensure_buf(compiler, 1 + 5);
-	FAIL_IF(!inst);
-	INC_SIZE(5);
-	*inst++ = GROUP_0F;
-	*(sljit_si*)inst = 0x20247428;
-#endif
-	SLJIT_ASSERT(compiler->local_size > 0);
-	if (compiler->local_size <= 127) {
-		inst = (sljit_ub*)ensure_buf(compiler, 1 + 4);
-		FAIL_IF(!inst);
-		INC_SIZE(4);
-		*inst++ = REX_W;
-		*inst++ = GROUP_BINARY_83;
-		*inst++ = MOD_REG | ADD | 4;
-		*inst = compiler->local_size;
-	}
-	else {
-		inst = (sljit_ub*)ensure_buf(compiler, 1 + 7);
-		FAIL_IF(!inst);
-		INC_SIZE(7);
-		*inst++ = REX_W;
-		*inst++ = GROUP_BINARY_81;
-		*inst++ = MOD_REG | ADD | 4;
-		*(sljit_si*)inst = compiler->local_size;
-	}
-
-	size = 1 + compiler->saveds;
-#ifndef _WIN64
-	if (compiler->saveds >= 2)
-		size += compiler->saveds - 1;
-#else
-	if (compiler->saveds >= 4)
-		size += compiler->saveds - 3;
-	if (compiler->scratches >= 5)
-		size += (5 - 4) * 2;
-#endif
-	inst = (sljit_ub*)ensure_buf(compiler, 1 + size);
-	FAIL_IF(!inst);
-
-	INC_SIZE(size);
-
-#ifdef _WIN64
-	if (compiler->scratches >= 5) {
-		*inst++ = REX_B;
-		POP_REG(reg_lmap[SLJIT_TEMPORARY_EREG2]);
-	}
-#endif
-	if (compiler->saveds >= 1)
-		POP_REG(reg_map[SLJIT_SAVED_REG1]);
-	if (compiler->saveds >= 2) {
-#ifndef _WIN64
-		*inst++ = REX_B;
-#endif
-		POP_REG(reg_lmap[SLJIT_SAVED_REG2]);
-	}
-	if (compiler->saveds >= 3) {
-#ifndef _WIN64
-		*inst++ = REX_B;
-#endif
-		POP_REG(reg_lmap[SLJIT_SAVED_REG3]);
-	}
-	if (compiler->saveds >= 4) {
-		*inst++ = REX_B;
-		POP_REG(reg_lmap[SLJIT_SAVED_EREG1]);
-	}
-	if (compiler->saveds >= 5) {
-		*inst++ = REX_B;
-		POP_REG(reg_lmap[SLJIT_SAVED_EREG2]);
-	}
-
-	RET();
-	return SLJIT_SUCCESS;
-}
-
-/* --------------------------------------------------------------------- */
-/*  Operators                                                            */
-/* --------------------------------------------------------------------- */
-
-static sljit_si emit_do_imm32(struct sljit_compiler *compiler, sljit_ub rex, sljit_ub opcode, sljit_sw imm)
-{
-	sljit_ub *inst;
-	sljit_si length = 1 + (rex ? 1 : 0) + sizeof(sljit_si);
-
-	inst = (sljit_ub*)ensure_buf(compiler, 1 + length);
-	FAIL_IF(!inst);
-	INC_SIZE(length);
-	if (rex)
-		*inst++ = rex;
-	*inst++ = opcode;
-	*(sljit_si*)inst = imm;
-	return SLJIT_SUCCESS;
-}
-
-static sljit_ub* emit_x86_instruction(struct sljit_compiler *compiler, sljit_si size,
-	/* The register or immediate operand. */
-	sljit_si a, sljit_sw imma,
-	/* The general operand (not immediate). */
-	sljit_si b, sljit_sw immb)
-{
-	sljit_ub *inst;
-	sljit_ub *buf_ptr;
-	sljit_ub rex = 0;
-	sljit_si flags = size & ~0xf;
-	sljit_si inst_size;
-
-	/* The immediate operand must be 32 bit. */
-	SLJIT_ASSERT(!(a & SLJIT_IMM) || compiler->mode32 || IS_HALFWORD(imma));
-	/* Both cannot be switched on. */
-	SLJIT_ASSERT((flags & (EX86_BIN_INS | EX86_SHIFT_INS)) != (EX86_BIN_INS | EX86_SHIFT_INS));
-	/* Size flags not allowed for typed instructions. */
-	SLJIT_ASSERT(!(flags & (EX86_BIN_INS | EX86_SHIFT_INS)) || (flags & (EX86_BYTE_ARG | EX86_HALF_ARG)) == 0);
-	/* Both size flags cannot be switched on. */
-	SLJIT_ASSERT((flags & (EX86_BYTE_ARG | EX86_HALF_ARG)) != (EX86_BYTE_ARG | EX86_HALF_ARG));
-#if (defined SLJIT_SSE2 && SLJIT_SSE2)
-	/* SSE2 and immediate is not possible. */
-	SLJIT_ASSERT(!(a & SLJIT_IMM) || !(flags & EX86_SSE2));
-	SLJIT_ASSERT((flags & (EX86_PREF_F2 | EX86_PREF_F3)) != (EX86_PREF_F2 | EX86_PREF_F3)
-		&& (flags & (EX86_PREF_F2 | EX86_PREF_66)) != (EX86_PREF_F2 | EX86_PREF_66)
-		&& (flags & (EX86_PREF_F3 | EX86_PREF_66)) != (EX86_PREF_F3 | EX86_PREF_66));
-#endif
-
-	size &= 0xf;
-	inst_size = size;
-
-	if ((b & SLJIT_MEM) && !(b & OFFS_REG_MASK) && NOT_HALFWORD(immb)) {
-		if (emit_load_imm64(compiler, TMP_REG3, immb))
-			return NULL;
-		immb = 0;
-		if (b & REG_MASK)
-			b |= TO_OFFS_REG(TMP_REG3);
-		else
-			b |= TMP_REG3;
-	}
-
-	if (!compiler->mode32 && !(flags & EX86_NO_REXW))
-		rex |= REX_W;
-	else if (flags & EX86_REX)
-		rex |= REX;
-
-#if (defined SLJIT_SSE2 && SLJIT_SSE2)
-	if (flags & (EX86_PREF_F2 | EX86_PREF_F3))
-		inst_size++;
-#endif
-	if (flags & EX86_PREF_66)
-		inst_size++;
-
-	/* Calculate size of b. */
-	inst_size += 1; /* mod r/m byte. */
-	if (b & SLJIT_MEM) {
-		if ((b & REG_MASK) == SLJIT_UNUSED)
-			inst_size += 1 + sizeof(sljit_si); /* SIB byte required to avoid RIP based addressing. */
-		else {
-			if (reg_map[b & REG_MASK] >= 8)
-				rex |= REX_B;
-			if (immb != 0 && !(b & OFFS_REG_MASK)) {
-				/* Immediate operand. */
-				if (immb <= 127 && immb >= -128)
-					inst_size += sizeof(sljit_sb);
-				else
-					inst_size += sizeof(sljit_si);
-			}
-		}
-
-		if ((b & REG_MASK) == SLJIT_LOCALS_REG && !(b & OFFS_REG_MASK))
-			b |= TO_OFFS_REG(SLJIT_LOCALS_REG);
-
-		if ((b & OFFS_REG_MASK) != SLJIT_UNUSED) {
-			inst_size += 1; /* SIB byte. */
-			if (reg_map[OFFS_REG(b)] >= 8)
-				rex |= REX_X;
-		}
-	}
-#if (defined SLJIT_SSE2 && SLJIT_SSE2)
-	else if (!(flags & EX86_SSE2) && reg_map[b] >= 8)
-		rex |= REX_B;
-#else
-	else if (reg_map[b] >= 8)
-		rex |= REX_B;
-#endif
-
-	if (a & SLJIT_IMM) {
-		if (flags & EX86_BIN_INS) {
-			if (imma <= 127 && imma >= -128) {
-				inst_size += 1;
-				flags |= EX86_BYTE_ARG;
-			} else
-				inst_size += 4;
-		}
-		else if (flags & EX86_SHIFT_INS) {
-			imma &= compiler->mode32 ? 0x1f : 0x3f;
-			if (imma != 1) {
-				inst_size ++;
-				flags |= EX86_BYTE_ARG;
-			}
-		} else if (flags & EX86_BYTE_ARG)
-			inst_size++;
-		else if (flags & EX86_HALF_ARG)
-			inst_size += sizeof(short);
-		else
-			inst_size += sizeof(sljit_si);
-	}
-	else {
-		SLJIT_ASSERT(!(flags & EX86_SHIFT_INS) || a == SLJIT_PREF_SHIFT_REG);
-		/* reg_map[SLJIT_PREF_SHIFT_REG] is less than 8. */
-#if (defined SLJIT_SSE2 && SLJIT_SSE2)
-		if (!(flags & EX86_SSE2) && reg_map[a] >= 8)
-			rex |= REX_R;
-#else
-		if (reg_map[a] >= 8)
-			rex |= REX_R;
-#endif
-	}
-
-	if (rex)
-		inst_size++;
-
-	inst = (sljit_ub*)ensure_buf(compiler, 1 + inst_size);
-	PTR_FAIL_IF(!inst);
-
-	/* Encoding the byte. */
-	INC_SIZE(inst_size);
-#if (defined SLJIT_SSE2 && SLJIT_SSE2)
-	if (flags & EX86_PREF_F2)
-		*inst++ = 0xf2;
-	if (flags & EX86_PREF_F3)
-		*inst++ = 0xf3;
-#endif
-	if (flags & EX86_PREF_66)
-		*inst++ = 0x66;
-	if (rex)
-		*inst++ = rex;
-	buf_ptr = inst + size;
-
-	/* Encode mod/rm byte. */
-	if (!(flags & EX86_SHIFT_INS)) {
-		if ((flags & EX86_BIN_INS) && (a & SLJIT_IMM))
-			*inst = (flags & EX86_BYTE_ARG) ? GROUP_BINARY_83 : GROUP_BINARY_81;
-
-		if ((a & SLJIT_IMM) || (a == 0))
-			*buf_ptr = 0;
-#if (defined SLJIT_SSE2 && SLJIT_SSE2)
-		else if (!(flags & EX86_SSE2))
-			*buf_ptr = reg_lmap[a] << 3;
-		else
-			*buf_ptr = a << 3;
-#else
-		else
-			*buf_ptr = reg_lmap[a] << 3;
-#endif
-	}
-	else {
-		if (a & SLJIT_IMM) {
-			if (imma == 1)
-				*inst = GROUP_SHIFT_1;
-			else
-				*inst = GROUP_SHIFT_N;
-		} else
-			*inst = GROUP_SHIFT_CL;
-		*buf_ptr = 0;
-	}
-
-	if (!(b & SLJIT_MEM))
-#if (defined SLJIT_SSE2 && SLJIT_SSE2)
-		*buf_ptr++ |= MOD_REG + ((!(flags & EX86_SSE2)) ? reg_lmap[b] : b);
-#else
-		*buf_ptr++ |= MOD_REG + reg_lmap[b];
-#endif
-	else if ((b & REG_MASK) != SLJIT_UNUSED) {
-		if ((b & OFFS_REG_MASK) == SLJIT_UNUSED || (b & OFFS_REG_MASK) == TO_OFFS_REG(SLJIT_LOCALS_REG)) {
-			if (immb != 0) {
-				if (immb <= 127 && immb >= -128)
-					*buf_ptr |= 0x40;
-				else
-					*buf_ptr |= 0x80;
-			}
-
-			if ((b & OFFS_REG_MASK) == SLJIT_UNUSED)
-				*buf_ptr++ |= reg_lmap[b & REG_MASK];
-			else {
-				*buf_ptr++ |= 0x04;
-				*buf_ptr++ = reg_lmap[b & REG_MASK] | (reg_lmap[OFFS_REG(b)] << 3);
-			}
-
-			if (immb != 0) {
-				if (immb <= 127 && immb >= -128)
-					*buf_ptr++ = immb; /* 8 bit displacement. */
-				else {
-					*(sljit_si*)buf_ptr = immb; /* 32 bit displacement. */
-					buf_ptr += sizeof(sljit_si);
-				}
-			}
-		}
-		else {
-			*buf_ptr++ |= 0x04;
-			*buf_ptr++ = reg_lmap[b & REG_MASK] | (reg_lmap[OFFS_REG(b)] << 3) | (immb << 6);
-		}
-	}
-	else {
-		*buf_ptr++ |= 0x04;
-		*buf_ptr++ = 0x25;
-		*(sljit_si*)buf_ptr = immb; /* 32 bit displacement. */
-		buf_ptr += sizeof(sljit_si);
-	}
-
-	if (a & SLJIT_IMM) {
-		if (flags & EX86_BYTE_ARG)
-			*buf_ptr = imma;
-		else if (flags & EX86_HALF_ARG)
-			*(short*)buf_ptr = imma;
-		else if (!(flags & EX86_SHIFT_INS))
-			*(sljit_si*)buf_ptr = imma;
-	}
-
-	return !(flags & EX86_SHIFT_INS) ? inst : (inst + 1);
-}
-
-/* --------------------------------------------------------------------- */
-/*  Call / return instructions                                           */
-/* --------------------------------------------------------------------- */
-
-static SLJIT_INLINE sljit_si call_with_args(struct sljit_compiler *compiler, sljit_si type)
-{
-	sljit_ub *inst;
-
-#ifndef _WIN64
-	SLJIT_COMPILE_ASSERT(reg_map[SLJIT_SCRATCH_REG2] == 6 && reg_map[SLJIT_SCRATCH_REG1] < 8 && reg_map[SLJIT_SCRATCH_REG3] < 8, args_registers);
-
-	inst = (sljit_ub*)ensure_buf(compiler, 1 + ((type < SLJIT_CALL3) ? 3 : 6));
-	FAIL_IF(!inst);
-	INC_SIZE((type < SLJIT_CALL3) ? 3 : 6);
-	if (type >= SLJIT_CALL3) {
-		*inst++ = REX_W;
-		*inst++ = MOV_r_rm;
-		*inst++ = MOD_REG | (0x2 /* rdx */ << 3) | reg_lmap[SLJIT_SCRATCH_REG3];
-	}
-	*inst++ = REX_W;
-	*inst++ = MOV_r_rm;
-	*inst++ = MOD_REG | (0x7 /* rdi */ << 3) | reg_lmap[SLJIT_SCRATCH_REG1];
-#else
-	SLJIT_COMPILE_ASSERT(reg_map[SLJIT_SCRATCH_REG2] == 2 && reg_map[SLJIT_SCRATCH_REG1] < 8 && reg_map[SLJIT_SCRATCH_REG3] < 8, args_registers);
-
-	inst = (sljit_ub*)ensure_buf(compiler, 1 + ((type < SLJIT_CALL3) ? 3 : 6));
-	FAIL_IF(!inst);
-	INC_SIZE((type < SLJIT_CALL3) ? 3 : 6);
-	if (type >= SLJIT_CALL3) {
-		*inst++ = REX_W | REX_R;
-		*inst++ = MOV_r_rm;
-		*inst++ = MOD_REG | (0x0 /* r8 */ << 3) | reg_lmap[SLJIT_SCRATCH_REG3];
-	}
-	*inst++ = REX_W;
-	*inst++ = MOV_r_rm;
-	*inst++ = MOD_REG | (0x1 /* rcx */ << 3) | reg_lmap[SLJIT_SCRATCH_REG1];
-#endif
-	return SLJIT_SUCCESS;
-}
-
-SLJIT_API_FUNC_ATTRIBUTE sljit_si sljit_emit_fast_enter(struct sljit_compiler *compiler, sljit_si dst, sljit_sw dstw)
-{
-	sljit_ub *inst;
-
-	CHECK_ERROR();
-	check_sljit_emit_fast_enter(compiler, dst, dstw);
-	ADJUST_LOCAL_OFFSET(dst, dstw);
-
-	/* For UNUSED dst. Uncommon, but possible. */
-	if (dst == SLJIT_UNUSED)
-		dst = TMP_REG1;
-
-	if (FAST_IS_REG(dst)) {
-		if (reg_map[dst] < 8) {
-			inst = (sljit_ub*)ensure_buf(compiler, 1 + 1);
-			FAIL_IF(!inst);
-			INC_SIZE(1);
-			POP_REG(reg_lmap[dst]);
-			return SLJIT_SUCCESS;
-		}
-
-		inst = (sljit_ub*)ensure_buf(compiler, 1 + 2);
-		FAIL_IF(!inst);
-		INC_SIZE(2);
-		*inst++ = REX_B;
-		POP_REG(reg_lmap[dst]);
-		return SLJIT_SUCCESS;
-	}
-
-	/* REX_W is not necessary (src is not immediate). */
-	compiler->mode32 = 1;
-	inst = emit_x86_instruction(compiler, 1, 0, 0, dst, dstw);
-	FAIL_IF(!inst);
-	*inst++ = POP_rm;
-	return SLJIT_SUCCESS;
-}
-
-SLJIT_API_FUNC_ATTRIBUTE sljit_si sljit_emit_fast_return(struct sljit_compiler *compiler, sljit_si src, sljit_sw srcw)
-{
-	sljit_ub *inst;
-
-	CHECK_ERROR();
-	check_sljit_emit_fast_return(compiler, src, srcw);
-	ADJUST_LOCAL_OFFSET(src, srcw);
-
-	if ((src & SLJIT_IMM) && NOT_HALFWORD(srcw)) {
-		FAIL_IF(emit_load_imm64(compiler, TMP_REG1, srcw));
-		src = TMP_REG1;
-	}
-
-	if (FAST_IS_REG(src)) {
-		if (reg_map[src] < 8) {
-			inst = (sljit_ub*)ensure_buf(compiler, 1 + 1 + 1);
-			FAIL_IF(!inst);
-
-			INC_SIZE(1 + 1);
-			PUSH_REG(reg_lmap[src]);
-		}
-		else {
-			inst = (sljit_ub*)ensure_buf(compiler, 1 + 2 + 1);
-			FAIL_IF(!inst);
-
-			INC_SIZE(2 + 1);
-			*inst++ = REX_B;
-			PUSH_REG(reg_lmap[src]);
-		}
-	}
-	else if (src & SLJIT_MEM) {
-		/* REX_W is not necessary (src is not immediate). */
-		compiler->mode32 = 1;
-		inst = emit_x86_instruction(compiler, 1, 0, 0, src, srcw);
-		FAIL_IF(!inst);
-		*inst++ = GROUP_FF;
-		*inst |= PUSH_rm;
-
-		inst = (sljit_ub*)ensure_buf(compiler, 1 + 1);
-		FAIL_IF(!inst);
-		INC_SIZE(1);
-	}
-	else {
-		SLJIT_ASSERT(IS_HALFWORD(srcw));
-		/* SLJIT_IMM. */
-		inst = (sljit_ub*)ensure_buf(compiler, 1 + 5 + 1);
-		FAIL_IF(!inst);
-
-		INC_SIZE(5 + 1);
-		*inst++ = PUSH_i32;
-		*(sljit_si*)inst = srcw;
-		inst += sizeof(sljit_si);
-	}
-
-	RET();
-	return SLJIT_SUCCESS;
-}
-
-
-/* --------------------------------------------------------------------- */
-/*  Extend input                                                         */
-/* --------------------------------------------------------------------- */
-
-static sljit_si emit_mov_int(struct sljit_compiler *compiler, sljit_si sign,
-	sljit_si dst, sljit_sw dstw,
-	sljit_si src, sljit_sw srcw)
-{
-	sljit_ub* inst;
-	sljit_si dst_r;
-
-	compiler->mode32 = 0;
-
-	if (dst == SLJIT_UNUSED && !(src & SLJIT_MEM))
-		return SLJIT_SUCCESS; /* Empty instruction. */
-
-	if (src & SLJIT_IMM) {
-		if (FAST_IS_REG(dst)) {
-			if (sign || ((sljit_uw)srcw <= 0x7fffffff)) {
-				inst = emit_x86_instruction(compiler, 1, SLJIT_IMM, (sljit_sw)(sljit_si)srcw, dst, dstw);
-				FAIL_IF(!inst);
-				*inst = MOV_rm_i32;
-				return SLJIT_SUCCESS;
-			}
-			return emit_load_imm64(compiler, dst, srcw);
-		}
-		compiler->mode32 = 1;
-		inst = emit_x86_instruction(compiler, 1, SLJIT_IMM, (sljit_sw)(sljit_si)srcw, dst, dstw);
-		FAIL_IF(!inst);
-		*inst = MOV_rm_i32;
-		compiler->mode32 = 0;
-		return SLJIT_SUCCESS;
-	}
-
-	dst_r = FAST_IS_REG(dst) ? dst : TMP_REG1;
-
-	if ((dst & SLJIT_MEM) && FAST_IS_REG(src))
-		dst_r = src;
-	else {
-		if (sign) {
-			inst = emit_x86_instruction(compiler, 1, dst_r, 0, src, srcw);
-			FAIL_IF(!inst);
-			*inst++ = MOVSXD_r_rm;
-		} else {
-			compiler->mode32 = 1;
-			FAIL_IF(emit_mov(compiler, dst_r, 0, src, srcw));
-			compiler->mode32 = 0;
-		}
-	}
-
-	if (dst & SLJIT_MEM) {
-		compiler->mode32 = 1;
-		inst = emit_x86_instruction(compiler, 1, dst_r, 0, dst, dstw);
-		FAIL_IF(!inst);
-		*inst = MOV_rm_r;
-		compiler->mode32 = 0;
-	}
-
-	return SLJIT_SUCCESS;
-}
diff --git a/src/extra/pcre/sljit/sljitNativeX86_common.c b/src/extra/pcre/sljit/sljitNativeX86_common.c
deleted file mode 100644
index 653705f..0000000
--- a/src/extra/pcre/sljit/sljitNativeX86_common.c
+++ /dev/null
@@ -1,2883 +0,0 @@
-/*
- *    Stack-less Just-In-Time compiler
- *
- *    Copyright 2009-2012 Zoltan Herczeg (hzmester at freemail.hu). All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without modification, are
- * permitted provided that the following conditions are met:
- *
- *   1. Redistributions of source code must retain the above copyright notice, this list of
- *      conditions and the following disclaimer.
- *
- *   2. Redistributions in binary form must reproduce the above copyright notice, this list
- *      of conditions and the following disclaimer in the documentation and/or other materials
- *      provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER(S) AND CONTRIBUTORS ``AS IS'' AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
- * SHALL THE COPYRIGHT HOLDER(S) OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
- * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
- * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
- * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-SLJIT_API_FUNC_ATTRIBUTE SLJIT_CONST char* sljit_get_platform_name(void)
-{
-	return "x86" SLJIT_CPUINFO;
-}
-
-/*
-   32b register indexes:
-     0 - EAX
-     1 - ECX
-     2 - EDX
-     3 - EBX
-     4 - none
-     5 - EBP
-     6 - ESI
-     7 - EDI
-*/
-
-/*
-   64b register indexes:
-     0 - RAX
-     1 - RCX
-     2 - RDX
-     3 - RBX
-     4 - none
-     5 - RBP
-     6 - RSI
-     7 - RDI
-     8 - R8   - From now on REX prefix is required
-     9 - R9
-    10 - R10
-    11 - R11
-    12 - R12
-    13 - R13
-    14 - R14
-    15 - R15
-*/
-
-#if (defined SLJIT_CONFIG_X86_32 && SLJIT_CONFIG_X86_32)
-
-/* Last register + 1. */
-#define TMP_REG1	(SLJIT_NO_REGISTERS + 1)
-
-static SLJIT_CONST sljit_ub reg_map[SLJIT_NO_REGISTERS + 2] = {
-	0, 0, 2, 1, 0, 0, 3, 6, 7, 0, 0, 4, 5
-};
-
-#define CHECK_EXTRA_REGS(p, w, do) \
-	if (p >= SLJIT_TEMPORARY_EREG1 && p <= SLJIT_TEMPORARY_EREG2) { \
-		w = compiler->scratches_start + (p - SLJIT_TEMPORARY_EREG1) * sizeof(sljit_sw); \
-		p = SLJIT_MEM1(SLJIT_LOCALS_REG); \
-		do; \
-	} \
-	else if (p >= SLJIT_SAVED_EREG1 && p <= SLJIT_SAVED_EREG2) { \
-		w = compiler->saveds_start + (p - SLJIT_SAVED_EREG1) * sizeof(sljit_sw); \
-		p = SLJIT_MEM1(SLJIT_LOCALS_REG); \
-		do; \
-	}
-
-#else /* SLJIT_CONFIG_X86_32 */
-
-/* Last register + 1. */
-#define TMP_REG1	(SLJIT_NO_REGISTERS + 1)
-#define TMP_REG2	(SLJIT_NO_REGISTERS + 2)
-#define TMP_REG3	(SLJIT_NO_REGISTERS + 3)
-
-/* Note: r12 & 0x7 == 0b100, which decoded as SIB byte present
-   Note: avoid to use r12 and r13 for memory addessing
-   therefore r12 is better for SAVED_EREG than SAVED_REG. */
-#ifndef _WIN64
-/* 1st passed in rdi, 2nd argument passed in rsi, 3rd in rdx. */
-static SLJIT_CONST sljit_ub reg_map[SLJIT_NO_REGISTERS + 4] = {
-	0, 0, 6, 1, 8, 11, 3, 15, 14, 13, 12, 4, 2, 7, 9
-};
-/* low-map. reg_map & 0x7. */
-static SLJIT_CONST sljit_ub reg_lmap[SLJIT_NO_REGISTERS + 4] = {
-	0, 0, 6, 1, 0, 3,  3, 7,  6,  5,  4,  4, 2, 7, 1
-};
-#else
-/* 1st passed in rcx, 2nd argument passed in rdx, 3rd in r8. */
-static SLJIT_CONST sljit_ub reg_map[SLJIT_NO_REGISTERS + 4] = {
-	0, 0, 2, 1, 11, 13, 3, 6, 7, 14, 15, 4, 10, 8, 9
-};
-/* low-map. reg_map & 0x7. */
-static SLJIT_CONST sljit_ub reg_lmap[SLJIT_NO_REGISTERS + 4] = {
-	0, 0, 2, 1, 3,  5,  3, 6, 7,  6,  7, 4, 2,  0, 1
-};
-#endif
-
-#define REX_W		0x48
-#define REX_R		0x44
-#define REX_X		0x42
-#define REX_B		0x41
-#define REX		0x40
-
-#ifndef _WIN64
-#define HALFWORD_MAX 0x7fffffffl
-#define HALFWORD_MIN -0x80000000l
-#else
-#define HALFWORD_MAX 0x7fffffffll
-#define HALFWORD_MIN -0x80000000ll
-#endif
-
-#define IS_HALFWORD(x)		((x) <= HALFWORD_MAX && (x) >= HALFWORD_MIN)
-#define NOT_HALFWORD(x)		((x) > HALFWORD_MAX || (x) < HALFWORD_MIN)
-
-#define CHECK_EXTRA_REGS(p, w, do)
-
-#endif /* SLJIT_CONFIG_X86_32 */
-
-#if (defined SLJIT_SSE2 && SLJIT_SSE2)
-#define TMP_FREG	(0)
-#endif
-
-/* Size flags for emit_x86_instruction: */
-#define EX86_BIN_INS		0x0010
-#define EX86_SHIFT_INS		0x0020
-#define EX86_REX		0x0040
-#define EX86_NO_REXW		0x0080
-#define EX86_BYTE_ARG		0x0100
-#define EX86_HALF_ARG		0x0200
-#define EX86_PREF_66		0x0400
-
-#if (defined SLJIT_SSE2 && SLJIT_SSE2)
-#define EX86_SSE2		0x0800
-#define EX86_PREF_F2		0x1000
-#define EX86_PREF_F3		0x2000
-#endif
-
-/* --------------------------------------------------------------------- */
-/*  Instrucion forms                                                     */
-/* --------------------------------------------------------------------- */
-
-#define ADD		(/* BINARY */ 0 << 3)
-#define ADD_EAX_i32	0x05
-#define ADD_r_rm	0x03
-#define ADD_rm_r	0x01
-#define ADDSD_x_xm	0x58
-#define ADC		(/* BINARY */ 2 << 3)
-#define ADC_EAX_i32	0x15
-#define ADC_r_rm	0x13
-#define ADC_rm_r	0x11
-#define AND		(/* BINARY */ 4 << 3)
-#define AND_EAX_i32	0x25
-#define AND_r_rm	0x23
-#define AND_rm_r	0x21
-#define ANDPD_x_xm	0x54
-#define BSR_r_rm	(/* GROUP_0F */ 0xbd)
-#define CALL_i32	0xe8
-#define CALL_rm		(/* GROUP_FF */ 2 << 3)
-#define CDQ		0x99
-#define CMOVNE_r_rm	(/* GROUP_0F */ 0x45)
-#define CMP		(/* BINARY */ 7 << 3)
-#define CMP_EAX_i32	0x3d
-#define CMP_r_rm	0x3b
-#define CMP_rm_r	0x39
-#define DIV		(/* GROUP_F7 */ 6 << 3)
-#define DIVSD_x_xm	0x5e
-#define INT3		0xcc
-#define IDIV		(/* GROUP_F7 */ 7 << 3)
-#define IMUL		(/* GROUP_F7 */ 5 << 3)
-#define IMUL_r_rm	(/* GROUP_0F */ 0xaf)
-#define IMUL_r_rm_i8	0x6b
-#define IMUL_r_rm_i32	0x69
-#define JE_i8		0x74
-#define JMP_i8		0xeb
-#define JMP_i32		0xe9
-#define JMP_rm		(/* GROUP_FF */ 4 << 3)
-#define LEA_r_m		0x8d
-#define MOV_r_rm	0x8b
-#define MOV_r_i32	0xb8
-#define MOV_rm_r	0x89
-#define MOV_rm_i32	0xc7
-#define MOV_rm8_i8	0xc6
-#define MOV_rm8_r8	0x88
-#define MOVSD_x_xm	0x10
-#define MOVSD_xm_x	0x11
-#define MOVSXD_r_rm	0x63
-#define MOVSX_r_rm8	(/* GROUP_0F */ 0xbe)
-#define MOVSX_r_rm16	(/* GROUP_0F */ 0xbf)
-#define MOVZX_r_rm8	(/* GROUP_0F */ 0xb6)
-#define MOVZX_r_rm16	(/* GROUP_0F */ 0xb7)
-#define MUL		(/* GROUP_F7 */ 4 << 3)
-#define MULSD_x_xm	0x59
-#define NEG_rm		(/* GROUP_F7 */ 3 << 3)
-#define NOP		0x90
-#define NOT_rm		(/* GROUP_F7 */ 2 << 3)
-#define OR		(/* BINARY */ 1 << 3)
-#define OR_r_rm		0x0b
-#define OR_EAX_i32	0x0d
-#define OR_rm_r		0x09
-#define OR_rm8_r8	0x08
-#define POP_r		0x58
-#define POP_rm		0x8f
-#define POPF		0x9d
-#define PUSH_i32	0x68
-#define PUSH_r		0x50
-#define PUSH_rm		(/* GROUP_FF */ 6 << 3)
-#define PUSHF		0x9c
-#define RET_near	0xc3
-#define RET_i16		0xc2
-#define SBB		(/* BINARY */ 3 << 3)
-#define SBB_EAX_i32	0x1d
-#define SBB_r_rm	0x1b
-#define SBB_rm_r	0x19
-#define SAR		(/* SHIFT */ 7 << 3)
-#define SHL		(/* SHIFT */ 4 << 3)
-#define SHR		(/* SHIFT */ 5 << 3)
-#define SUB		(/* BINARY */ 5 << 3)
-#define SUB_EAX_i32	0x2d
-#define SUB_r_rm	0x2b
-#define SUB_rm_r	0x29
-#define SUBSD_x_xm	0x5c
-#define TEST_EAX_i32	0xa9
-#define TEST_rm_r	0x85
-#define UCOMISD_x_xm	0x2e
-#define XCHG_EAX_r	0x90
-#define XCHG_r_rm	0x87
-#define XOR		(/* BINARY */ 6 << 3)
-#define XOR_EAX_i32	0x35
-#define XOR_r_rm	0x33
-#define XOR_rm_r	0x31
-#define XORPD_x_xm	0x57
-
-#define GROUP_0F	0x0f
-#define GROUP_F7	0xf7
-#define GROUP_FF	0xff
-#define GROUP_BINARY_81	0x81
-#define GROUP_BINARY_83	0x83
-#define GROUP_SHIFT_1	0xd1
-#define GROUP_SHIFT_N	0xc1
-#define GROUP_SHIFT_CL	0xd3
-
-#define MOD_REG		0xc0
-#define MOD_DISP8	0x40
-
-#define INC_SIZE(s)			(*inst++ = (s), compiler->size += (s))
-
-#define PUSH_REG(r)			(*inst++ = (PUSH_r + (r)))
-#define POP_REG(r)			(*inst++ = (POP_r + (r)))
-#define RET()				(*inst++ = (RET_near))
-#define RET_I16(n)			(*inst++ = (RET_i16), *inst++ = n, *inst++ = 0)
-/* r32, r/m32 */
-#define MOV_RM(mod, reg, rm)		(*inst++ = (MOV_r_rm), *inst++ = (mod) << 6 | (reg) << 3 | (rm))
-
-/* Multithreading does not affect these static variables, since they store
-   built-in CPU features. Therefore they can be overwritten by different threads
-   if they detect the CPU features in the same time. */
-#if (defined SLJIT_SSE2 && SLJIT_SSE2) && (defined SLJIT_DETECT_SSE2 && SLJIT_DETECT_SSE2)
-static sljit_si cpu_has_sse2 = -1;
-#endif
-static sljit_si cpu_has_cmov = -1;
-
-#if defined(_MSC_VER) && _MSC_VER >= 1400
-#include <intrin.h>
-#endif
-
-static void get_cpu_features(void)
-{
-	sljit_ui features;
-
-#if defined(_MSC_VER) && _MSC_VER >= 1400
-
-	int CPUInfo[4];
-	__cpuid(CPUInfo, 1);
-	features = (sljit_ui)CPUInfo[3];
-
-#elif defined(__GNUC__) || defined(__INTEL_COMPILER) || defined(__SUNPRO_C)
-
-	/* AT&T syntax. */
-	__asm__ (
-		"movl $0x1, %%eax\n"
-#if (defined SLJIT_CONFIG_X86_32 && SLJIT_CONFIG_X86_32)
-		/* On x86-32, there is no red zone, so this
-		   should work (no need for a local variable). */
-		"push %%ebx\n"
-#endif
-		"cpuid\n"
-#if (defined SLJIT_CONFIG_X86_32 && SLJIT_CONFIG_X86_32)
-		"pop %%ebx\n"
-#endif
-		"movl %%edx, %0\n"
-		: "=g" (features)
-		:
-#if (defined SLJIT_CONFIG_X86_32 && SLJIT_CONFIG_X86_32)
-		: "%eax", "%ecx", "%edx"
-#else
-		: "%rax", "%rbx", "%rcx", "%rdx"
-#endif
-	);
-
-#else /* _MSC_VER && _MSC_VER >= 1400 */
-
-	/* Intel syntax. */
-	__asm {
-		mov eax, 1
-		cpuid
-		mov features, edx
-	}
-
-#endif /* _MSC_VER && _MSC_VER >= 1400 */
-
-#if (defined SLJIT_SSE2 && SLJIT_SSE2) && (defined SLJIT_DETECT_SSE2 && SLJIT_DETECT_SSE2)
-	cpu_has_sse2 = (features >> 26) & 0x1;
-#endif
-	cpu_has_cmov = (features >> 15) & 0x1;
-}
-
-static sljit_ub get_jump_code(sljit_si type)
-{
-	switch (type) {
-	case SLJIT_C_EQUAL:
-	case SLJIT_C_FLOAT_EQUAL:
-		return 0x84 /* je */;
-
-	case SLJIT_C_NOT_EQUAL:
-	case SLJIT_C_FLOAT_NOT_EQUAL:
-		return 0x85 /* jne */;
-
-	case SLJIT_C_LESS:
-	case SLJIT_C_FLOAT_LESS:
-		return 0x82 /* jc */;
-
-	case SLJIT_C_GREATER_EQUAL:
-	case SLJIT_C_FLOAT_GREATER_EQUAL:
-		return 0x83 /* jae */;
-
-	case SLJIT_C_GREATER:
-	case SLJIT_C_FLOAT_GREATER:
-		return 0x87 /* jnbe */;
-
-	case SLJIT_C_LESS_EQUAL:
-	case SLJIT_C_FLOAT_LESS_EQUAL:
-		return 0x86 /* jbe */;
-
-	case SLJIT_C_SIG_LESS:
-		return 0x8c /* jl */;
-
-	case SLJIT_C_SIG_GREATER_EQUAL:
-		return 0x8d /* jnl */;
-
-	case SLJIT_C_SIG_GREATER:
-		return 0x8f /* jnle */;
-
-	case SLJIT_C_SIG_LESS_EQUAL:
-		return 0x8e /* jle */;
-
-	case SLJIT_C_OVERFLOW:
-	case SLJIT_C_MUL_OVERFLOW:
-		return 0x80 /* jo */;
-
-	case SLJIT_C_NOT_OVERFLOW:
-	case SLJIT_C_MUL_NOT_OVERFLOW:
-		return 0x81 /* jno */;
-
-	case SLJIT_C_FLOAT_UNORDERED:
-		return 0x8a /* jp */;
-
-	case SLJIT_C_FLOAT_ORDERED:
-		return 0x8b /* jpo */;
-	}
-	return 0;
-}
-
-static sljit_ub* generate_far_jump_code(struct sljit_jump *jump, sljit_ub *code_ptr, sljit_si type);
-
-#if (defined SLJIT_CONFIG_X86_64 && SLJIT_CONFIG_X86_64)
-static sljit_ub* generate_fixed_jump(sljit_ub *code_ptr, sljit_sw addr, sljit_si type);
-#endif
-
-static sljit_ub* generate_near_jump_code(struct sljit_jump *jump, sljit_ub *code_ptr, sljit_ub *code, sljit_si type)
-{
-	sljit_si short_jump;
-	sljit_uw label_addr;
-
-	if (jump->flags & JUMP_LABEL)
-		label_addr = (sljit_uw)(code + jump->u.label->size);
-	else
-		label_addr = jump->u.target;
-	short_jump = (sljit_sw)(label_addr - (jump->addr + 2)) >= -128 && (sljit_sw)(label_addr - (jump->addr + 2)) <= 127;
-
-#if (defined SLJIT_CONFIG_X86_64 && SLJIT_CONFIG_X86_64)
-	if ((sljit_sw)(label_addr - (jump->addr + 1)) > HALFWORD_MAX || (sljit_sw)(label_addr - (jump->addr + 1)) < HALFWORD_MIN)
-		return generate_far_jump_code(jump, code_ptr, type);
-#endif
-
-	if (type == SLJIT_JUMP) {
-		if (short_jump)
-			*code_ptr++ = JMP_i8;
-		else
-			*code_ptr++ = JMP_i32;
-		jump->addr++;
-	}
-	else if (type >= SLJIT_FAST_CALL) {
-		short_jump = 0;
-		*code_ptr++ = CALL_i32;
-		jump->addr++;
-	}
-	else if (short_jump) {
-		*code_ptr++ = get_jump_code(type) - 0x10;
-		jump->addr++;
-	}
-	else {
-		*code_ptr++ = GROUP_0F;
-		*code_ptr++ = get_jump_code(type);
-		jump->addr += 2;
-	}
-
-	if (short_jump) {
-		jump->flags |= PATCH_MB;
-		code_ptr += sizeof(sljit_sb);
-	} else {
-		jump->flags |= PATCH_MW;
-#if (defined SLJIT_CONFIG_X86_32 && SLJIT_CONFIG_X86_32)
-		code_ptr += sizeof(sljit_sw);
-#else
-		code_ptr += sizeof(sljit_si);
-#endif
-	}
-
-	return code_ptr;
-}
-
-SLJIT_API_FUNC_ATTRIBUTE void* sljit_generate_code(struct sljit_compiler *compiler)
-{
-	struct sljit_memory_fragment *buf;
-	sljit_ub *code;
-	sljit_ub *code_ptr;
-	sljit_ub *buf_ptr;
-	sljit_ub *buf_end;
-	sljit_ub len;
-
-	struct sljit_label *label;
-	struct sljit_jump *jump;
-	struct sljit_const *const_;
-
-	CHECK_ERROR_PTR();
-	check_sljit_generate_code(compiler);
-	reverse_buf(compiler);
-
-	/* Second code generation pass. */
-	code = (sljit_ub*)SLJIT_MALLOC_EXEC(compiler->size);
-	PTR_FAIL_WITH_EXEC_IF(code);
-	buf = compiler->buf;
-
-	code_ptr = code;
-	label = compiler->labels;
-	jump = compiler->jumps;
-	const_ = compiler->consts;
-	do {
-		buf_ptr = buf->memory;
-		buf_end = buf_ptr + buf->used_size;
-		do {
-			len = *buf_ptr++;
-			if (len > 0) {
-				/* The code is already generated. */
-				SLJIT_MEMMOVE(code_ptr, buf_ptr, len);
-				code_ptr += len;
-				buf_ptr += len;
-			}
-			else {
-				if (*buf_ptr >= 4) {
-					jump->addr = (sljit_uw)code_ptr;
-					if (!(jump->flags & SLJIT_REWRITABLE_JUMP))
-						code_ptr = generate_near_jump_code(jump, code_ptr, code, *buf_ptr - 4);
-					else
-						code_ptr = generate_far_jump_code(jump, code_ptr, *buf_ptr - 4);
-					jump = jump->next;
-				}
-				else if (*buf_ptr == 0) {
-					label->addr = (sljit_uw)code_ptr;
-					label->size = code_ptr - code;
-					label = label->next;
-				}
-				else if (*buf_ptr == 1) {
-					const_->addr = ((sljit_uw)code_ptr) - sizeof(sljit_sw);
-					const_ = const_->next;
-				}
-				else {
-#if (defined SLJIT_CONFIG_X86_32 && SLJIT_CONFIG_X86_32)
-					*code_ptr++ = (*buf_ptr == 2) ? CALL_i32 : JMP_i32;
-					buf_ptr++;
-					*(sljit_sw*)code_ptr = *(sljit_sw*)buf_ptr - ((sljit_sw)code_ptr + sizeof(sljit_sw));
-					code_ptr += sizeof(sljit_sw);
-					buf_ptr += sizeof(sljit_sw) - 1;
-#else
-					code_ptr = generate_fixed_jump(code_ptr, *(sljit_sw*)(buf_ptr + 1), *buf_ptr);
-					buf_ptr += sizeof(sljit_sw);
-#endif
-				}
-				buf_ptr++;
-			}
-		} while (buf_ptr < buf_end);
-		SLJIT_ASSERT(buf_ptr == buf_end);
-		buf = buf->next;
-	} while (buf);
-
-	SLJIT_ASSERT(!label);
-	SLJIT_ASSERT(!jump);
-	SLJIT_ASSERT(!const_);
-
-	jump = compiler->jumps;
-	while (jump) {
-		if (jump->flags & PATCH_MB) {
-			SLJIT_ASSERT((sljit_sw)(jump->u.label->addr - (jump->addr + sizeof(sljit_sb))) >= -128 && (sljit_sw)(jump->u.label->addr - (jump->addr + sizeof(sljit_sb))) <= 127);
-			*(sljit_ub*)jump->addr = (sljit_ub)(jump->u.label->addr - (jump->addr + sizeof(sljit_sb)));
-		} else if (jump->flags & PATCH_MW) {
-			if (jump->flags & JUMP_LABEL) {
-#if (defined SLJIT_CONFIG_X86_32 && SLJIT_CONFIG_X86_32)
-				*(sljit_sw*)jump->addr = (sljit_sw)(jump->u.label->addr - (jump->addr + sizeof(sljit_sw)));
-#else
-				SLJIT_ASSERT((sljit_sw)(jump->u.label->addr - (jump->addr + sizeof(sljit_si))) >= HALFWORD_MIN && (sljit_sw)(jump->u.label->addr - (jump->addr + sizeof(sljit_si))) <= HALFWORD_MAX);
-				*(sljit_si*)jump->addr = (sljit_si)(jump->u.label->addr - (jump->addr + sizeof(sljit_si)));
-#endif
-			}
-			else {
-#if (defined SLJIT_CONFIG_X86_32 && SLJIT_CONFIG_X86_32)
-				*(sljit_sw*)jump->addr = (sljit_sw)(jump->u.target - (jump->addr + sizeof(sljit_sw)));
-#else
-				SLJIT_ASSERT((sljit_sw)(jump->u.target - (jump->addr + sizeof(sljit_si))) >= HALFWORD_MIN && (sljit_sw)(jump->u.target - (jump->addr + sizeof(sljit_si))) <= HALFWORD_MAX);
-				*(sljit_si*)jump->addr = (sljit_si)(jump->u.target - (jump->addr + sizeof(sljit_si)));
-#endif
-			}
-		}
-#if (defined SLJIT_CONFIG_X86_64 && SLJIT_CONFIG_X86_64)
-		else if (jump->flags & PATCH_MD)
-			*(sljit_sw*)jump->addr = jump->u.label->addr;
-#endif
-
-		jump = jump->next;
-	}
-
-	/* Maybe we waste some space because of short jumps. */
-	SLJIT_ASSERT(code_ptr <= code + compiler->size);
-	compiler->error = SLJIT_ERR_COMPILED;
-	compiler->executable_size = code_ptr - code;
-	return (void*)code;
-}
-
-/* --------------------------------------------------------------------- */
-/*  Operators                                                            */
-/* --------------------------------------------------------------------- */
-
-static sljit_si emit_cum_binary(struct sljit_compiler *compiler,
-	sljit_ub op_rm, sljit_ub op_mr, sljit_ub op_imm, sljit_ub op_eax_imm,
-	sljit_si dst, sljit_sw dstw,
-	sljit_si src1, sljit_sw src1w,
-	sljit_si src2, sljit_sw src2w);
-
-static sljit_si emit_non_cum_binary(struct sljit_compiler *compiler,
-	sljit_ub op_rm, sljit_ub op_mr, sljit_ub op_imm, sljit_ub op_eax_imm,
-	sljit_si dst, sljit_sw dstw,
-	sljit_si src1, sljit_sw src1w,
-	sljit_si src2, sljit_sw src2w);
-
-static sljit_si emit_mov(struct sljit_compiler *compiler,
-	sljit_si dst, sljit_sw dstw,
-	sljit_si src, sljit_sw srcw);
-
-static SLJIT_INLINE sljit_si emit_save_flags(struct sljit_compiler *compiler)
-{
-	sljit_ub *inst;
-
-#if (defined SLJIT_CONFIG_X86_32 && SLJIT_CONFIG_X86_32)
-	inst = (sljit_ub*)ensure_buf(compiler, 1 + 5);
-	FAIL_IF(!inst);
-	INC_SIZE(5);
-#else
-	inst = (sljit_ub*)ensure_buf(compiler, 1 + 6);
-	FAIL_IF(!inst);
-	INC_SIZE(6);
-	*inst++ = REX_W;
-#endif
-	*inst++ = LEA_r_m; /* lea esp/rsp, [esp/rsp + sizeof(sljit_sw)] */
-	*inst++ = 0x64;
-	*inst++ = 0x24;
-	*inst++ = (sljit_ub)sizeof(sljit_sw);
-	*inst++ = PUSHF;
-	compiler->flags_saved = 1;
-	return SLJIT_SUCCESS;
-}
-
-static SLJIT_INLINE sljit_si emit_restore_flags(struct sljit_compiler *compiler, sljit_si keep_flags)
-{
-	sljit_ub *inst;
-
-#if (defined SLJIT_CONFIG_X86_32 && SLJIT_CONFIG_X86_32)
-	inst = (sljit_ub*)ensure_buf(compiler, 1 + 5);
-	FAIL_IF(!inst);
-	INC_SIZE(5);
-	*inst++ = POPF;
-#else
-	inst = (sljit_ub*)ensure_buf(compiler, 1 + 6);
-	FAIL_IF(!inst);
-	INC_SIZE(6);
-	*inst++ = POPF;
-	*inst++ = REX_W;
-#endif
-	*inst++ = LEA_r_m; /* lea esp/rsp, [esp/rsp - sizeof(sljit_sw)] */
-	*inst++ = 0x64;
-	*inst++ = 0x24;
-	*inst++ = (sljit_ub)-(sljit_sb)sizeof(sljit_sw);
-	compiler->flags_saved = keep_flags;
-	return SLJIT_SUCCESS;
-}
-
-#ifdef _WIN32
-#include <malloc.h>
-
-static void SLJIT_CALL sljit_grow_stack(sljit_sw local_size)
-{
-	/* Workaround for calling the internal _chkstk() function on Windows.
-	This function touches all 4k pages belongs to the requested stack space,
-	which size is passed in local_size. This is necessary on Windows where
-	the stack can only grow in 4k steps. However, this function just burn
-	CPU cycles if the stack is large enough. However, you don't know it in
-	advance, so it must always be called. I think this is a bad design in
-	general even if it has some reasons. */
-	*(volatile sljit_si*)alloca(local_size) = 0;
-}
-
-#endif
-
-#if (defined SLJIT_CONFIG_X86_32 && SLJIT_CONFIG_X86_32)
-#include "sljitNativeX86_32.c"
-#else
-#include "sljitNativeX86_64.c"
-#endif
-
-static sljit_si emit_mov(struct sljit_compiler *compiler,
-	sljit_si dst, sljit_sw dstw,
-	sljit_si src, sljit_sw srcw)
-{
-	sljit_ub* inst;
-
-	if (dst == SLJIT_UNUSED) {
-		/* No destination, doesn't need to setup flags. */
-		if (src & SLJIT_MEM) {
-			inst = emit_x86_instruction(compiler, 1, TMP_REG1, 0, src, srcw);
-			FAIL_IF(!inst);
-			*inst = MOV_r_rm;
-		}
-		return SLJIT_SUCCESS;
-	}
-	if (FAST_IS_REG(src)) {
-		inst = emit_x86_instruction(compiler, 1, src, 0, dst, dstw);
-		FAIL_IF(!inst);
-		*inst = MOV_rm_r;
-		return SLJIT_SUCCESS;
-	}
-	if (src & SLJIT_IMM) {
-		if (FAST_IS_REG(dst)) {
-#if (defined SLJIT_CONFIG_X86_32 && SLJIT_CONFIG_X86_32)
-			return emit_do_imm(compiler, MOV_r_i32 + reg_map[dst], srcw);
-#else
-			if (!compiler->mode32) {
-				if (NOT_HALFWORD(srcw))
-					return emit_load_imm64(compiler, dst, srcw);
-			}
-			else
-				return emit_do_imm32(compiler, (reg_map[dst] >= 8) ? REX_B : 0, MOV_r_i32 + reg_lmap[dst], srcw);
-#endif
-		}
-#if (defined SLJIT_CONFIG_X86_64 && SLJIT_CONFIG_X86_64)
-		if (!compiler->mode32 && NOT_HALFWORD(srcw)) {
-			FAIL_IF(emit_load_imm64(compiler, TMP_REG2, srcw));
-			inst = emit_x86_instruction(compiler, 1, TMP_REG2, 0, dst, dstw);
-			FAIL_IF(!inst);
-			*inst = MOV_rm_r;
-			return SLJIT_SUCCESS;
-		}
-#endif
-		inst = emit_x86_instruction(compiler, 1, SLJIT_IMM, srcw, dst, dstw);
-		FAIL_IF(!inst);
-		*inst = MOV_rm_i32;
-		return SLJIT_SUCCESS;
-	}
-	if (FAST_IS_REG(dst)) {
-		inst = emit_x86_instruction(compiler, 1, dst, 0, src, srcw);
-		FAIL_IF(!inst);
-		*inst = MOV_r_rm;
-		return SLJIT_SUCCESS;
-	}
-
-	/* Memory to memory move. Requires two instruction. */
-	inst = emit_x86_instruction(compiler, 1, TMP_REG1, 0, src, srcw);
-	FAIL_IF(!inst);
-	*inst = MOV_r_rm;
-	inst = emit_x86_instruction(compiler, 1, TMP_REG1, 0, dst, dstw);
-	FAIL_IF(!inst);
-	*inst = MOV_rm_r;
-	return SLJIT_SUCCESS;
-}
-
-#define EMIT_MOV(compiler, dst, dstw, src, srcw) \
-	FAIL_IF(emit_mov(compiler, dst, dstw, src, srcw));
-
-SLJIT_API_FUNC_ATTRIBUTE sljit_si sljit_emit_op0(struct sljit_compiler *compiler, sljit_si op)
-{
-	sljit_ub *inst;
-#if (defined SLJIT_CONFIG_X86_64 && SLJIT_CONFIG_X86_64)
-	sljit_si size;
-#endif
-
-	CHECK_ERROR();
-	check_sljit_emit_op0(compiler, op);
-
-	switch (GET_OPCODE(op)) {
-	case SLJIT_BREAKPOINT:
-		inst = (sljit_ub*)ensure_buf(compiler, 1 + 1);
-		FAIL_IF(!inst);
-		INC_SIZE(1);
-		*inst = INT3;
-		break;
-	case SLJIT_NOP:
-		inst = (sljit_ub*)ensure_buf(compiler, 1 + 1);
-		FAIL_IF(!inst);
-		INC_SIZE(1);
-		*inst = NOP;
-		break;
-	case SLJIT_UMUL:
-	case SLJIT_SMUL:
-	case SLJIT_UDIV:
-	case SLJIT_SDIV:
-		compiler->flags_saved = 0;
-#if (defined SLJIT_CONFIG_X86_64 && SLJIT_CONFIG_X86_64)
-#ifdef _WIN64
-		SLJIT_COMPILE_ASSERT(
-			reg_map[SLJIT_SCRATCH_REG1] == 0
-			&& reg_map[SLJIT_SCRATCH_REG2] == 2
-			&& reg_map[TMP_REG1] > 7,
-			invalid_register_assignment_for_div_mul);
-#else
-		SLJIT_COMPILE_ASSERT(
-			reg_map[SLJIT_SCRATCH_REG1] == 0
-			&& reg_map[SLJIT_SCRATCH_REG2] < 7
-			&& reg_map[TMP_REG1] == 2,
-			invalid_register_assignment_for_div_mul);
-#endif
-		compiler->mode32 = op & SLJIT_INT_OP;
-#endif
-
-		op = GET_OPCODE(op);
-		if (op == SLJIT_UDIV) {
-#if (defined SLJIT_CONFIG_X86_32 && SLJIT_CONFIG_X86_32) || defined(_WIN64)
-			EMIT_MOV(compiler, TMP_REG1, 0, SLJIT_SCRATCH_REG2, 0);
-			inst = emit_x86_instruction(compiler, 1, SLJIT_SCRATCH_REG2, 0, SLJIT_SCRATCH_REG2, 0);
-#else
-			inst = emit_x86_instruction(compiler, 1, TMP_REG1, 0, TMP_REG1, 0);
-#endif
-			FAIL_IF(!inst);
-			*inst = XOR_r_rm;
-		}
-
-		if (op == SLJIT_SDIV) {
-#if (defined SLJIT_CONFIG_X86_32 && SLJIT_CONFIG_X86_32) || defined(_WIN64)
-			EMIT_MOV(compiler, TMP_REG1, 0, SLJIT_SCRATCH_REG2, 0);
-#endif
-
-#if (defined SLJIT_CONFIG_X86_32 && SLJIT_CONFIG_X86_32)
-			inst = (sljit_ub*)ensure_buf(compiler, 1 + 1);
-			FAIL_IF(!inst);
-			INC_SIZE(1);
-			*inst = CDQ;
-#else
-			if (compiler->mode32) {
-				inst = (sljit_ub*)ensure_buf(compiler, 1 + 1);
-				FAIL_IF(!inst);
-				INC_SIZE(1);
-				*inst = CDQ;
-			} else {
-				inst = (sljit_ub*)ensure_buf(compiler, 1 + 2);
-				FAIL_IF(!inst);
-				INC_SIZE(2);
-				*inst++ = REX_W;
-				*inst = CDQ;
-			}
-#endif
-		}
-
-#if (defined SLJIT_CONFIG_X86_32 && SLJIT_CONFIG_X86_32)
-		inst = (sljit_ub*)ensure_buf(compiler, 1 + 2);
-		FAIL_IF(!inst);
-		INC_SIZE(2);
-		*inst++ = GROUP_F7;
-		*inst = MOD_REG | ((op >= SLJIT_UDIV) ? reg_map[TMP_REG1] : reg_map[SLJIT_SCRATCH_REG2]);
-#else
-#ifdef _WIN64
-		size = (!compiler->mode32 || op >= SLJIT_UDIV) ? 3 : 2;
-#else
-		size = (!compiler->mode32) ? 3 : 2;
-#endif
-		inst = (sljit_ub*)ensure_buf(compiler, 1 + size);
-		FAIL_IF(!inst);
-		INC_SIZE(size);
-#ifdef _WIN64
-		if (!compiler->mode32)
-			*inst++ = REX_W | ((op >= SLJIT_UDIV) ? REX_B : 0);
-		else if (op >= SLJIT_UDIV)
-			*inst++ = REX_B;
-		*inst++ = GROUP_F7;
-		*inst = MOD_REG | ((op >= SLJIT_UDIV) ? reg_lmap[TMP_REG1] : reg_lmap[SLJIT_SCRATCH_REG2]);
-#else
-		if (!compiler->mode32)
-			*inst++ = REX_W;
-		*inst++ = GROUP_F7;
-		*inst = MOD_REG | reg_map[SLJIT_SCRATCH_REG2];
-#endif
-#endif
-		switch (op) {
-		case SLJIT_UMUL:
-			*inst |= MUL;
-			break;
-		case SLJIT_SMUL:
-			*inst |= IMUL;
-			break;
-		case SLJIT_UDIV:
-			*inst |= DIV;
-			break;
-		case SLJIT_SDIV:
-			*inst |= IDIV;
-			break;
-		}
-#if (defined SLJIT_CONFIG_X86_64 && SLJIT_CONFIG_X86_64) && !defined(_WIN64)
-		EMIT_MOV(compiler, SLJIT_SCRATCH_REG2, 0, TMP_REG1, 0);
-#endif
-		break;
-	}
-
-	return SLJIT_SUCCESS;
-}
-
-#define ENCODE_PREFIX(prefix) \
-	do { \
-		inst = (sljit_ub*)ensure_buf(compiler, 1 + 1); \
-		FAIL_IF(!inst); \
-		INC_SIZE(1); \
-		*inst = (prefix); \
-	} while (0)
-
-static sljit_si emit_mov_byte(struct sljit_compiler *compiler, sljit_si sign,
-	sljit_si dst, sljit_sw dstw,
-	sljit_si src, sljit_sw srcw)
-{
-	sljit_ub* inst;
-	sljit_si dst_r;
-#if (defined SLJIT_CONFIG_X86_32 && SLJIT_CONFIG_X86_32)
-	sljit_si work_r;
-#endif
-
-#if (defined SLJIT_CONFIG_X86_64 && SLJIT_CONFIG_X86_64)
-	compiler->mode32 = 0;
-#endif
-
-	if (dst == SLJIT_UNUSED && !(src & SLJIT_MEM))
-		return SLJIT_SUCCESS; /* Empty instruction. */
-
-	if (src & SLJIT_IMM) {
-		if (FAST_IS_REG(dst)) {
-#if (defined SLJIT_CONFIG_X86_32 && SLJIT_CONFIG_X86_32)
-			return emit_do_imm(compiler, MOV_r_i32 + reg_map[dst], srcw);
-#else
-			inst = emit_x86_instruction(compiler, 1, SLJIT_IMM, srcw, dst, 0);
-			FAIL_IF(!inst);
-			*inst = MOV_rm_i32;
-			return SLJIT_SUCCESS;
-#endif
-		}
-		inst = emit_x86_instruction(compiler, 1 | EX86_BYTE_ARG | EX86_NO_REXW, SLJIT_IMM, srcw, dst, dstw);
-		FAIL_IF(!inst);
-		*inst = MOV_rm8_i8;
-		return SLJIT_SUCCESS;
-	}
-
-	dst_r = FAST_IS_REG(dst) ? dst : TMP_REG1;
-
-	if ((dst & SLJIT_MEM) && FAST_IS_REG(src)) {
-#if (defined SLJIT_CONFIG_X86_32 && SLJIT_CONFIG_X86_32)
-		if (reg_map[src] >= 4) {
-			SLJIT_ASSERT(dst_r == TMP_REG1);
-			EMIT_MOV(compiler, TMP_REG1, 0, src, 0);
-		} else
-			dst_r = src;
-#else
-		dst_r = src;
-#endif
-	}
-#if (defined SLJIT_CONFIG_X86_32 && SLJIT_CONFIG_X86_32)
-	else if (FAST_IS_REG(src) && reg_map[src] >= 4) {
-		/* src, dst are registers. */
-		SLJIT_ASSERT(SLOW_IS_REG(dst));
-		if (reg_map[dst] < 4) {
-			if (dst != src)
-				EMIT_MOV(compiler, dst, 0, src, 0);
-			inst = emit_x86_instruction(compiler, 2, dst, 0, dst, 0);
-			FAIL_IF(!inst);
-			*inst++ = GROUP_0F;
-			*inst = sign ? MOVSX_r_rm8 : MOVZX_r_rm8;
-		}
-		else {
-			if (dst != src)
-				EMIT_MOV(compiler, dst, 0, src, 0);
-			if (sign) {
-				/* shl reg, 24 */
-				inst = emit_x86_instruction(compiler, 1 | EX86_SHIFT_INS, SLJIT_IMM, 24, dst, 0);
-				FAIL_IF(!inst);
-				*inst |= SHL;
-				/* sar reg, 24 */
-				inst = emit_x86_instruction(compiler, 1 | EX86_SHIFT_INS, SLJIT_IMM, 24, dst, 0);
-				FAIL_IF(!inst);
-				*inst |= SAR;
-			}
-			else {
-				inst = emit_x86_instruction(compiler, 1 | EX86_BIN_INS, SLJIT_IMM, 0xff, dst, 0);
-				FAIL_IF(!inst);
-				*(inst + 1) |= AND;
-			}
-		}
-		return SLJIT_SUCCESS;
-	}
-#endif
-	else {
-		/* src can be memory addr or reg_map[src] < 4 on x86_32 architectures. */
-		inst = emit_x86_instruction(compiler, 2, dst_r, 0, src, srcw);
-		FAIL_IF(!inst);
-		*inst++ = GROUP_0F;
-		*inst = sign ? MOVSX_r_rm8 : MOVZX_r_rm8;
-	}
-
-	if (dst & SLJIT_MEM) {
-#if (defined SLJIT_CONFIG_X86_32 && SLJIT_CONFIG_X86_32)
-		if (dst_r == TMP_REG1) {
-			/* Find a non-used register, whose reg_map[src] < 4. */
-			if ((dst & REG_MASK) == SLJIT_SCRATCH_REG1) {
-				if ((dst & OFFS_REG_MASK) == TO_OFFS_REG(SLJIT_SCRATCH_REG2))
-					work_r = SLJIT_SCRATCH_REG3;
-				else
-					work_r = SLJIT_SCRATCH_REG2;
-			}
-			else {
-				if ((dst & OFFS_REG_MASK) != TO_OFFS_REG(SLJIT_SCRATCH_REG1))
-					work_r = SLJIT_SCRATCH_REG1;
-				else if ((dst & REG_MASK) == SLJIT_SCRATCH_REG2)
-					work_r = SLJIT_SCRATCH_REG3;
-				else
-					work_r = SLJIT_SCRATCH_REG2;
-			}
-
-			if (work_r == SLJIT_SCRATCH_REG1) {
-				ENCODE_PREFIX(XCHG_EAX_r + reg_map[TMP_REG1]);
-			}
-			else {
-				inst = emit_x86_instruction(compiler, 1, work_r, 0, dst_r, 0);
-				FAIL_IF(!inst);
-				*inst = XCHG_r_rm;
-			}
-
-			inst = emit_x86_instruction(compiler, 1, work_r, 0, dst, dstw);
-			FAIL_IF(!inst);
-			*inst = MOV_rm8_r8;
-
-			if (work_r == SLJIT_SCRATCH_REG1) {
-				ENCODE_PREFIX(XCHG_EAX_r + reg_map[TMP_REG1]);
-			}
-			else {
-				inst = emit_x86_instruction(compiler, 1, work_r, 0, dst_r, 0);
-				FAIL_IF(!inst);
-				*inst = XCHG_r_rm;
-			}
-		}
-		else {
-			inst = emit_x86_instruction(compiler, 1, dst_r, 0, dst, dstw);
-			FAIL_IF(!inst);
-			*inst = MOV_rm8_r8;
-		}
-#else
-		inst = emit_x86_instruction(compiler, 1 | EX86_REX | EX86_NO_REXW, dst_r, 0, dst, dstw);
-		FAIL_IF(!inst);
-		*inst = MOV_rm8_r8;
-#endif
-	}
-
-	return SLJIT_SUCCESS;
-}
-
-static sljit_si emit_mov_half(struct sljit_compiler *compiler, sljit_si sign,
-	sljit_si dst, sljit_sw dstw,
-	sljit_si src, sljit_sw srcw)
-{
-	sljit_ub* inst;
-	sljit_si dst_r;
-
-#if (defined SLJIT_CONFIG_X86_64 && SLJIT_CONFIG_X86_64)
-	compiler->mode32 = 0;
-#endif
-
-	if (dst == SLJIT_UNUSED && !(src & SLJIT_MEM))
-		return SLJIT_SUCCESS; /* Empty instruction. */
-
-	if (src & SLJIT_IMM) {
-		if (FAST_IS_REG(dst)) {
-#if (defined SLJIT_CONFIG_X86_32 && SLJIT_CONFIG_X86_32)
-			return emit_do_imm(compiler, MOV_r_i32 + reg_map[dst], srcw);
-#else
-			inst = emit_x86_instruction(compiler, 1, SLJIT_IMM, srcw, dst, 0);
-			FAIL_IF(!inst);
-			*inst = MOV_rm_i32;
-			return SLJIT_SUCCESS;
-#endif
-		}
-		inst = emit_x86_instruction(compiler, 1 | EX86_HALF_ARG | EX86_NO_REXW | EX86_PREF_66, SLJIT_IMM, srcw, dst, dstw);
-		FAIL_IF(!inst);
-		*inst = MOV_rm_i32;
-		return SLJIT_SUCCESS;
-	}
-
-	dst_r = FAST_IS_REG(dst) ? dst : TMP_REG1;
-
-	if ((dst & SLJIT_MEM) && FAST_IS_REG(src))
-		dst_r = src;
-	else {
-		inst = emit_x86_instruction(compiler, 2, dst_r, 0, src, srcw);
-		FAIL_IF(!inst);
-		*inst++ = GROUP_0F;
-		*inst = sign ? MOVSX_r_rm16 : MOVZX_r_rm16;
-	}
-
-	if (dst & SLJIT_MEM) {
-		inst = emit_x86_instruction(compiler, 1 | EX86_NO_REXW | EX86_PREF_66, dst_r, 0, dst, dstw);
-		FAIL_IF(!inst);
-		*inst = MOV_rm_r;
-	}
-
-	return SLJIT_SUCCESS;
-}
-
-static sljit_si emit_unary(struct sljit_compiler *compiler, sljit_ub opcode,
-	sljit_si dst, sljit_sw dstw,
-	sljit_si src, sljit_sw srcw)
-{
-	sljit_ub* inst;
-
-	if (dst == SLJIT_UNUSED) {
-		EMIT_MOV(compiler, TMP_REG1, 0, src, srcw);
-		inst = emit_x86_instruction(compiler, 1, 0, 0, TMP_REG1, 0);
-		FAIL_IF(!inst);
-		*inst++ = GROUP_F7;
-		*inst |= opcode;
-		return SLJIT_SUCCESS;
-	}
-	if (dst == src && dstw == srcw) {
-		/* Same input and output */
-		inst = emit_x86_instruction(compiler, 1, 0, 0, dst, dstw);
-		FAIL_IF(!inst);
-		*inst++ = GROUP_F7;
-		*inst |= opcode;
-		return SLJIT_SUCCESS;
-	}
-	if (FAST_IS_REG(dst)) {
-		EMIT_MOV(compiler, dst, 0, src, srcw);
-		inst = emit_x86_instruction(compiler, 1, 0, 0, dst, dstw);
-		FAIL_IF(!inst);
-		*inst++ = GROUP_F7;
-		*inst |= opcode;
-		return SLJIT_SUCCESS;
-	}
-	EMIT_MOV(compiler, TMP_REG1, 0, src, srcw);
-	inst = emit_x86_instruction(compiler, 1, 0, 0, TMP_REG1, 0);
-	FAIL_IF(!inst);
-	*inst++ = GROUP_F7;
-	*inst |= opcode;
-	EMIT_MOV(compiler, dst, dstw, TMP_REG1, 0);
-	return SLJIT_SUCCESS;
-}
-
-static sljit_si emit_not_with_flags(struct sljit_compiler *compiler,
-	sljit_si dst, sljit_sw dstw,
-	sljit_si src, sljit_sw srcw)
-{
-	sljit_ub* inst;
-
-	if (dst == SLJIT_UNUSED) {
-		EMIT_MOV(compiler, TMP_REG1, 0, src, srcw);
-		inst = emit_x86_instruction(compiler, 1, 0, 0, TMP_REG1, 0);
-		FAIL_IF(!inst);
-		*inst++ = GROUP_F7;
-		*inst |= NOT_rm;
-		inst = emit_x86_instruction(compiler, 1, TMP_REG1, 0, TMP_REG1, 0);
-		FAIL_IF(!inst);
-		*inst = OR_r_rm;
-		return SLJIT_SUCCESS;
-	}
-	if (FAST_IS_REG(dst)) {
-		EMIT_MOV(compiler, dst, 0, src, srcw);
-		inst = emit_x86_instruction(compiler, 1, 0, 0, dst, dstw);
-		FAIL_IF(!inst);
-		*inst++ = GROUP_F7;
-		*inst |= NOT_rm;
-		inst = emit_x86_instruction(compiler, 1, dst, 0, dst, 0);
-		FAIL_IF(!inst);
-		*inst = OR_r_rm;
-		return SLJIT_SUCCESS;
-	}
-	EMIT_MOV(compiler, TMP_REG1, 0, src, srcw);
-	inst = emit_x86_instruction(compiler, 1, 0, 0, TMP_REG1, 0);
-	FAIL_IF(!inst);
-	*inst++ = GROUP_F7;
-	*inst |= NOT_rm;
-	inst = emit_x86_instruction(compiler, 1, TMP_REG1, 0, TMP_REG1, 0);
-	FAIL_IF(!inst);
-	*inst = OR_r_rm;
-	EMIT_MOV(compiler, dst, dstw, TMP_REG1, 0);
-	return SLJIT_SUCCESS;
-}
-
-static sljit_si emit_clz(struct sljit_compiler *compiler, sljit_si op_flags,
-	sljit_si dst, sljit_sw dstw,
-	sljit_si src, sljit_sw srcw)
-{
-	sljit_ub* inst;
-	sljit_si dst_r;
-
-	SLJIT_UNUSED_ARG(op_flags);
-	if (SLJIT_UNLIKELY(dst == SLJIT_UNUSED)) {
-		/* Just set the zero flag. */
-		EMIT_MOV(compiler, TMP_REG1, 0, src, srcw);
-		inst = emit_x86_instruction(compiler, 1, 0, 0, TMP_REG1, 0);
-		FAIL_IF(!inst);
-		*inst++ = GROUP_F7;
-		*inst |= NOT_rm;
-#if (defined SLJIT_CONFIG_X86_32 && SLJIT_CONFIG_X86_32)
-		inst = emit_x86_instruction(compiler, 1 | EX86_SHIFT_INS, SLJIT_IMM, 31, TMP_REG1, 0);
-#else
-		inst = emit_x86_instruction(compiler, 1 | EX86_SHIFT_INS, SLJIT_IMM, !(op_flags & SLJIT_INT_OP) ? 63 : 31, TMP_REG1, 0);
-#endif
-		FAIL_IF(!inst);
-		*inst |= SHR;
-		return SLJIT_SUCCESS;
-	}
-
-	if (SLJIT_UNLIKELY(src & SLJIT_IMM)) {
-		EMIT_MOV(compiler, TMP_REG1, 0, SLJIT_IMM, srcw);
-		src = TMP_REG1;
-		srcw = 0;
-	}
-
-	inst = emit_x86_instruction(compiler, 2, TMP_REG1, 0, src, srcw);
-	FAIL_IF(!inst);
-	*inst++ = GROUP_0F;
-	*inst = BSR_r_rm;
-
-#if (defined SLJIT_CONFIG_X86_32 && SLJIT_CONFIG_X86_32)
-	if (FAST_IS_REG(dst))
-		dst_r = dst;
-	else {
-		/* Find an unused temporary register. */
-		if ((dst & REG_MASK) != SLJIT_SCRATCH_REG1 && (dst & OFFS_REG_MASK) != TO_OFFS_REG(SLJIT_SCRATCH_REG1))
-			dst_r = SLJIT_SCRATCH_REG1;
-		else if ((dst & REG_MASK) != SLJIT_SCRATCH_REG2 && (dst & OFFS_REG_MASK) != TO_OFFS_REG(SLJIT_SCRATCH_REG2))
-			dst_r = SLJIT_SCRATCH_REG2;
-		else
-			dst_r = SLJIT_SCRATCH_REG3;
-		EMIT_MOV(compiler, dst, dstw, dst_r, 0);
-	}
-	EMIT_MOV(compiler, dst_r, 0, SLJIT_IMM, 32 + 31);
-#else
-	dst_r = FAST_IS_REG(dst) ? dst : TMP_REG2;
-	compiler->mode32 = 0;
-	EMIT_MOV(compiler, dst_r, 0, SLJIT_IMM, !(op_flags & SLJIT_INT_OP) ? 64 + 63 : 32 + 31);
-	compiler->mode32 = op_flags & SLJIT_INT_OP;
-#endif
-
-	if (cpu_has_cmov == -1)
-		get_cpu_features();
-
-	if (cpu_has_cmov) {
-		inst = emit_x86_instruction(compiler, 2, dst_r, 0, TMP_REG1, 0);
-		FAIL_IF(!inst);
-		*inst++ = GROUP_0F;
-		*inst = CMOVNE_r_rm;
-	} else {
-#if (defined SLJIT_CONFIG_X86_32 && SLJIT_CONFIG_X86_32)
-		inst = (sljit_ub*)ensure_buf(compiler, 1 + 4);
-		FAIL_IF(!inst);
-		INC_SIZE(4);
-
-		*inst++ = JE_i8;
-		*inst++ = 2;
-		*inst++ = MOV_r_rm;
-		*inst++ = MOD_REG | (reg_map[dst_r] << 3) | reg_map[TMP_REG1];
-#else
-		inst = (sljit_ub*)ensure_buf(compiler, 1 + 5);
-		FAIL_IF(!inst);
-		INC_SIZE(5);
-
-		*inst++ = JE_i8;
-		*inst++ = 3;
-		*inst++ = REX_W | (reg_map[dst_r] >= 8 ? REX_R : 0) | (reg_map[TMP_REG1] >= 8 ? REX_B : 0);
-		*inst++ = MOV_r_rm;
-		*inst++ = MOD_REG | (reg_lmap[dst_r] << 3) | reg_lmap[TMP_REG1];
-#endif
-	}
-
-#if (defined SLJIT_CONFIG_X86_32 && SLJIT_CONFIG_X86_32)
-	inst = emit_x86_instruction(compiler, 1 | EX86_BIN_INS, SLJIT_IMM, 31, dst_r, 0);
-#else
-	inst = emit_x86_instruction(compiler, 1 | EX86_BIN_INS, SLJIT_IMM, !(op_flags & SLJIT_INT_OP) ? 63 : 31, dst_r, 0);
-#endif
-	FAIL_IF(!inst);
-	*(inst + 1) |= XOR;
-
-#if (defined SLJIT_CONFIG_X86_32 && SLJIT_CONFIG_X86_32)
-	if (dst & SLJIT_MEM) {
-		inst = emit_x86_instruction(compiler, 1, dst_r, 0, dst, dstw);
-		FAIL_IF(!inst);
-		*inst = XCHG_r_rm;
-	}
-#else
-	if (dst & SLJIT_MEM)
-		EMIT_MOV(compiler, dst, dstw, TMP_REG2, 0);
-#endif
-	return SLJIT_SUCCESS;
-}
-
-SLJIT_API_FUNC_ATTRIBUTE sljit_si sljit_emit_op1(struct sljit_compiler *compiler, sljit_si op,
-	sljit_si dst, sljit_sw dstw,
-	sljit_si src, sljit_sw srcw)
-{
-	sljit_ub* inst;
-	sljit_si update = 0;
-	sljit_si op_flags = GET_ALL_FLAGS(op);
-#if (defined SLJIT_CONFIG_X86_32 && SLJIT_CONFIG_X86_32)
-	sljit_si dst_is_ereg = 0;
-	sljit_si src_is_ereg = 0;
-#else
-#	define src_is_ereg 0
-#endif
-
-	CHECK_ERROR();
-	check_sljit_emit_op1(compiler, op, dst, dstw, src, srcw);
-	ADJUST_LOCAL_OFFSET(dst, dstw);
-	ADJUST_LOCAL_OFFSET(src, srcw);
-
-	CHECK_EXTRA_REGS(dst, dstw, dst_is_ereg = 1);
-	CHECK_EXTRA_REGS(src, srcw, src_is_ereg = 1);
-#if (defined SLJIT_CONFIG_X86_64 && SLJIT_CONFIG_X86_64)
-	compiler->mode32 = op_flags & SLJIT_INT_OP;
-#endif
-
-	op = GET_OPCODE(op);
-	if (op >= SLJIT_MOV && op <= SLJIT_MOVU_P) {
-#if (defined SLJIT_CONFIG_X86_64 && SLJIT_CONFIG_X86_64)
-		compiler->mode32 = 0;
-#endif
-
-		if (op_flags & SLJIT_INT_OP) {
-			if (FAST_IS_REG(src) && src == dst) {
-				if (!TYPE_CAST_NEEDED(op))
-					return SLJIT_SUCCESS;
-			}
-#if (defined SLJIT_CONFIG_X86_64 && SLJIT_CONFIG_X86_64)
-			if (op == SLJIT_MOV_SI && (src & SLJIT_MEM))
-				op = SLJIT_MOV_UI;
-			if (op == SLJIT_MOVU_SI && (src & SLJIT_MEM))
-				op = SLJIT_MOVU_UI;
-			if (op == SLJIT_MOV_UI && (src & SLJIT_IMM))
-				op = SLJIT_MOV_SI;
-			if (op == SLJIT_MOVU_UI && (src & SLJIT_IMM))
-				op = SLJIT_MOVU_SI;
-#endif
-		}
-
-		SLJIT_COMPILE_ASSERT(SLJIT_MOV + 8 == SLJIT_MOVU, movu_offset);
-		if (op >= SLJIT_MOVU) {
-			update = 1;
-			op -= 8;
-		}
-
-		if (src & SLJIT_IMM) {
-			switch (op) {
-			case SLJIT_MOV_UB:
-				srcw = (sljit_ub)srcw;
-				break;
-			case SLJIT_MOV_SB:
-				srcw = (sljit_sb)srcw;
-				break;
-			case SLJIT_MOV_UH:
-				srcw = (sljit_uh)srcw;
-				break;
-			case SLJIT_MOV_SH:
-				srcw = (sljit_sh)srcw;
-				break;
-#if (defined SLJIT_CONFIG_X86_64 && SLJIT_CONFIG_X86_64)
-			case SLJIT_MOV_UI:
-				srcw = (sljit_ui)srcw;
-				break;
-			case SLJIT_MOV_SI:
-				srcw = (sljit_si)srcw;
-				break;
-#endif
-			}
-#if (defined SLJIT_CONFIG_X86_32 && SLJIT_CONFIG_X86_32)
-			if (SLJIT_UNLIKELY(dst_is_ereg))
-				return emit_mov(compiler, dst, dstw, src, srcw);
-#endif
-		}
-
-		if (SLJIT_UNLIKELY(update) && (src & SLJIT_MEM) && !src_is_ereg && (src & REG_MASK) && (srcw != 0 || (src & OFFS_REG_MASK) != 0)) {
-			inst = emit_x86_instruction(compiler, 1, src & REG_MASK, 0, src, srcw);
-			FAIL_IF(!inst);
-			*inst = LEA_r_m;
-			src &= SLJIT_MEM | 0xf;
-			srcw = 0;
-		}
-
-#if (defined SLJIT_CONFIG_X86_32 && SLJIT_CONFIG_X86_32)
-		if (SLJIT_UNLIKELY(dst_is_ereg) && (!(op == SLJIT_MOV || op == SLJIT_MOV_UI || op == SLJIT_MOV_SI || op == SLJIT_MOV_P) || (src & SLJIT_MEM))) {
-			SLJIT_ASSERT(dst == SLJIT_MEM1(SLJIT_LOCALS_REG));
-			dst = TMP_REG1;
-		}
-#endif
-
-		switch (op) {
-		case SLJIT_MOV:
-		case SLJIT_MOV_P:
-#if (defined SLJIT_CONFIG_X86_32 && SLJIT_CONFIG_X86_32)
-		case SLJIT_MOV_UI:
-		case SLJIT_MOV_SI:
-#endif
-			FAIL_IF(emit_mov(compiler, dst, dstw, src, srcw));
-			break;
-		case SLJIT_MOV_UB:
-			FAIL_IF(emit_mov_byte(compiler, 0, dst, dstw, src, srcw));
-			break;
-		case SLJIT_MOV_SB:
-			FAIL_IF(emit_mov_byte(compiler, 1, dst, dstw, src, srcw));
-			break;
-		case SLJIT_MOV_UH:
-			FAIL_IF(emit_mov_half(compiler, 0, dst, dstw, src, srcw));
-			break;
-		case SLJIT_MOV_SH:
-			FAIL_IF(emit_mov_half(compiler, 1, dst, dstw, src, srcw));
-			break;
-#if (defined SLJIT_CONFIG_X86_64 && SLJIT_CONFIG_X86_64)
-		case SLJIT_MOV_UI:
-			FAIL_IF(emit_mov_int(compiler, 0, dst, dstw, src, srcw));
-			break;
-		case SLJIT_MOV_SI:
-			FAIL_IF(emit_mov_int(compiler, 1, dst, dstw, src, srcw));
-			break;
-#endif
-		}
-
-#if (defined SLJIT_CONFIG_X86_32 && SLJIT_CONFIG_X86_32)
-		if (SLJIT_UNLIKELY(dst_is_ereg) && dst == TMP_REG1)
-			return emit_mov(compiler, SLJIT_MEM1(SLJIT_LOCALS_REG), dstw, TMP_REG1, 0);
-#endif
-
-		if (SLJIT_UNLIKELY(update) && (dst & SLJIT_MEM) && (dst & REG_MASK) && (dstw != 0 || (dst & OFFS_REG_MASK) != 0)) {
-			inst = emit_x86_instruction(compiler, 1, dst & REG_MASK, 0, dst, dstw);
-			FAIL_IF(!inst);
-			*inst = LEA_r_m;
-		}
-		return SLJIT_SUCCESS;
-	}
-
-	if (SLJIT_UNLIKELY(GET_FLAGS(op_flags)))
-		compiler->flags_saved = 0;
-
-	switch (op) {
-	case SLJIT_NOT:
-		if (SLJIT_UNLIKELY(op_flags & SLJIT_SET_E))
-			return emit_not_with_flags(compiler, dst, dstw, src, srcw);
-		return emit_unary(compiler, NOT_rm, dst, dstw, src, srcw);
-
-	case SLJIT_NEG:
-		if (SLJIT_UNLIKELY(op_flags & SLJIT_KEEP_FLAGS) && !compiler->flags_saved)
-			FAIL_IF(emit_save_flags(compiler));
-		return emit_unary(compiler, NEG_rm, dst, dstw, src, srcw);
-
-	case SLJIT_CLZ:
-		if (SLJIT_UNLIKELY(op_flags & SLJIT_KEEP_FLAGS) && !compiler->flags_saved)
-			FAIL_IF(emit_save_flags(compiler));
-		return emit_clz(compiler, op_flags, dst, dstw, src, srcw);
-	}
-
-	return SLJIT_SUCCESS;
-
-#if (defined SLJIT_CONFIG_X86_64 && SLJIT_CONFIG_X86_64)
-#	undef src_is_ereg
-#endif
-}
-
-#if (defined SLJIT_CONFIG_X86_64 && SLJIT_CONFIG_X86_64)
-
-#define BINARY_IMM(op_imm, op_mr, immw, arg, argw) \
-	if (IS_HALFWORD(immw) || compiler->mode32) { \
-		inst = emit_x86_instruction(compiler, 1 | EX86_BIN_INS, SLJIT_IMM, immw, arg, argw); \
-		FAIL_IF(!inst); \
-		*(inst + 1) |= (op_imm); \
-	} \
-	else { \
-		FAIL_IF(emit_load_imm64(compiler, TMP_REG2, immw)); \
-		inst = emit_x86_instruction(compiler, 1, TMP_REG2, 0, arg, argw); \
-		FAIL_IF(!inst); \
-		*inst = (op_mr); \
-	}
-
-#define BINARY_EAX_IMM(op_eax_imm, immw) \
-	FAIL_IF(emit_do_imm32(compiler, (!compiler->mode32) ? REX_W : 0, (op_eax_imm), immw))
-
-#else
-
-#define BINARY_IMM(op_imm, op_mr, immw, arg, argw) \
-	inst = emit_x86_instruction(compiler, 1 | EX86_BIN_INS, SLJIT_IMM, immw, arg, argw); \
-	FAIL_IF(!inst); \
-	*(inst + 1) |= (op_imm);
-
-#define BINARY_EAX_IMM(op_eax_imm, immw) \
-	FAIL_IF(emit_do_imm(compiler, (op_eax_imm), immw))
-
-#endif
-
-static sljit_si emit_cum_binary(struct sljit_compiler *compiler,
-	sljit_ub op_rm, sljit_ub op_mr, sljit_ub op_imm, sljit_ub op_eax_imm,
-	sljit_si dst, sljit_sw dstw,
-	sljit_si src1, sljit_sw src1w,
-	sljit_si src2, sljit_sw src2w)
-{
-	sljit_ub* inst;
-
-	if (dst == SLJIT_UNUSED) {
-		EMIT_MOV(compiler, TMP_REG1, 0, src1, src1w);
-		if (src2 & SLJIT_IMM) {
-			BINARY_IMM(op_imm, op_mr, src2w, TMP_REG1, 0);
-		}
-		else {
-			inst = emit_x86_instruction(compiler, 1, TMP_REG1, 0, src2, src2w);
-			FAIL_IF(!inst);
-			*inst = op_rm;
-		}
-		return SLJIT_SUCCESS;
-	}
-
-	if (dst == src1 && dstw == src1w) {
-		if (src2 & SLJIT_IMM) {
-#if (defined SLJIT_CONFIG_X86_64 && SLJIT_CONFIG_X86_64)
-			if ((dst == SLJIT_SCRATCH_REG1) && (src2w > 127 || src2w < -128) && (compiler->mode32 || IS_HALFWORD(src2w))) {
-#else
-			if ((dst == SLJIT_SCRATCH_REG1) && (src2w > 127 || src2w < -128)) {
-#endif
-				BINARY_EAX_IMM(op_eax_imm, src2w);
-			}
-			else {
-				BINARY_IMM(op_imm, op_mr, src2w, dst, dstw);
-			}
-		}
-		else if (FAST_IS_REG(dst)) {
-			inst = emit_x86_instruction(compiler, 1, dst, dstw, src2, src2w);
-			FAIL_IF(!inst);
-			*inst = op_rm;
-		}
-		else if (FAST_IS_REG(src2)) {
-			/* Special exception for sljit_emit_op_flags. */
-			inst = emit_x86_instruction(compiler, 1, src2, src2w, dst, dstw);
-			FAIL_IF(!inst);
-			*inst = op_mr;
-		}
-		else {
-			EMIT_MOV(compiler, TMP_REG1, 0, src2, src2w);
-			inst = emit_x86_instruction(compiler, 1, TMP_REG1, 0, dst, dstw);
-			FAIL_IF(!inst);
-			*inst = op_mr;
-		}
-		return SLJIT_SUCCESS;
-	}
-
-	/* Only for cumulative operations. */
-	if (dst == src2 && dstw == src2w) {
-		if (src1 & SLJIT_IMM) {
-#if (defined SLJIT_CONFIG_X86_64 && SLJIT_CONFIG_X86_64)
-			if ((dst == SLJIT_SCRATCH_REG1) && (src1w > 127 || src1w < -128) && (compiler->mode32 || IS_HALFWORD(src1w))) {
-#else
-			if ((dst == SLJIT_SCRATCH_REG1) && (src1w > 127 || src1w < -128)) {
-#endif
-				BINARY_EAX_IMM(op_eax_imm, src1w);
-			}
-			else {
-				BINARY_IMM(op_imm, op_mr, src1w, dst, dstw);
-			}
-		}
-		else if (FAST_IS_REG(dst)) {
-			inst = emit_x86_instruction(compiler, 1, dst, dstw, src1, src1w);
-			FAIL_IF(!inst);
-			*inst = op_rm;
-		}
-		else if (FAST_IS_REG(src1)) {
-			inst = emit_x86_instruction(compiler, 1, src1, src1w, dst, dstw);
-			FAIL_IF(!inst);
-			*inst = op_mr;
-		}
-		else {
-			EMIT_MOV(compiler, TMP_REG1, 0, src1, src1w);
-			inst = emit_x86_instruction(compiler, 1, TMP_REG1, 0, dst, dstw);
-			FAIL_IF(!inst);
-			*inst = op_mr;
-		}
-		return SLJIT_SUCCESS;
-	}
-
-	/* General version. */
-	if (FAST_IS_REG(dst)) {
-		EMIT_MOV(compiler, dst, 0, src1, src1w);
-		if (src2 & SLJIT_IMM) {
-			BINARY_IMM(op_imm, op_mr, src2w, dst, 0);
-		}
-		else {
-			inst = emit_x86_instruction(compiler, 1, dst, 0, src2, src2w);
-			FAIL_IF(!inst);
-			*inst = op_rm;
-		}
-	}
-	else {
-		/* This version requires less memory writing. */
-		EMIT_MOV(compiler, TMP_REG1, 0, src1, src1w);
-		if (src2 & SLJIT_IMM) {
-			BINARY_IMM(op_imm, op_mr, src2w, TMP_REG1, 0);
-		}
-		else {
-			inst = emit_x86_instruction(compiler, 1, TMP_REG1, 0, src2, src2w);
-			FAIL_IF(!inst);
-			*inst = op_rm;
-		}
-		EMIT_MOV(compiler, dst, dstw, TMP_REG1, 0);
-	}
-
-	return SLJIT_SUCCESS;
-}
-
-static sljit_si emit_non_cum_binary(struct sljit_compiler *compiler,
-	sljit_ub op_rm, sljit_ub op_mr, sljit_ub op_imm, sljit_ub op_eax_imm,
-	sljit_si dst, sljit_sw dstw,
-	sljit_si src1, sljit_sw src1w,
-	sljit_si src2, sljit_sw src2w)
-{
-	sljit_ub* inst;
-
-	if (dst == SLJIT_UNUSED) {
-		EMIT_MOV(compiler, TMP_REG1, 0, src1, src1w);
-		if (src2 & SLJIT_IMM) {
-			BINARY_IMM(op_imm, op_mr, src2w, TMP_REG1, 0);
-		}
-		else {
-			inst = emit_x86_instruction(compiler, 1, TMP_REG1, 0, src2, src2w);
-			FAIL_IF(!inst);
-			*inst = op_rm;
-		}
-		return SLJIT_SUCCESS;
-	}
-
-	if (dst == src1 && dstw == src1w) {
-		if (src2 & SLJIT_IMM) {
-#if (defined SLJIT_CONFIG_X86_64 && SLJIT_CONFIG_X86_64)
-			if ((dst == SLJIT_SCRATCH_REG1) && (src2w > 127 || src2w < -128) && (compiler->mode32 || IS_HALFWORD(src2w))) {
-#else
-			if ((dst == SLJIT_SCRATCH_REG1) && (src2w > 127 || src2w < -128)) {
-#endif
-				BINARY_EAX_IMM(op_eax_imm, src2w);
-			}
-			else {
-				BINARY_IMM(op_imm, op_mr, src2w, dst, dstw);
-			}
-		}
-		else if (FAST_IS_REG(dst)) {
-			inst = emit_x86_instruction(compiler, 1, dst, dstw, src2, src2w);
-			FAIL_IF(!inst);
-			*inst = op_rm;
-		}
-		else if (FAST_IS_REG(src2)) {
-			inst = emit_x86_instruction(compiler, 1, src2, src2w, dst, dstw);
-			FAIL_IF(!inst);
-			*inst = op_mr;
-		}
-		else {
-			EMIT_MOV(compiler, TMP_REG1, 0, src2, src2w);
-			inst = emit_x86_instruction(compiler, 1, TMP_REG1, 0, dst, dstw);
-			FAIL_IF(!inst);
-			*inst = op_mr;
-		}
-		return SLJIT_SUCCESS;
-	}
-
-	/* General version. */
-	if (FAST_IS_REG(dst) && dst != src2) {
-		EMIT_MOV(compiler, dst, 0, src1, src1w);
-		if (src2 & SLJIT_IMM) {
-			BINARY_IMM(op_imm, op_mr, src2w, dst, 0);
-		}
-		else {
-			inst = emit_x86_instruction(compiler, 1, dst, 0, src2, src2w);
-			FAIL_IF(!inst);
-			*inst = op_rm;
-		}
-	}
-	else {
-		/* This version requires less memory writing. */
-		EMIT_MOV(compiler, TMP_REG1, 0, src1, src1w);
-		if (src2 & SLJIT_IMM) {
-			BINARY_IMM(op_imm, op_mr, src2w, TMP_REG1, 0);
-		}
-		else {
-			inst = emit_x86_instruction(compiler, 1, TMP_REG1, 0, src2, src2w);
-			FAIL_IF(!inst);
-			*inst = op_rm;
-		}
-		EMIT_MOV(compiler, dst, dstw, TMP_REG1, 0);
-	}
-
-	return SLJIT_SUCCESS;
-}
-
-static sljit_si emit_mul(struct sljit_compiler *compiler,
-	sljit_si dst, sljit_sw dstw,
-	sljit_si src1, sljit_sw src1w,
-	sljit_si src2, sljit_sw src2w)
-{
-	sljit_ub* inst;
-	sljit_si dst_r;
-
-	dst_r = FAST_IS_REG(dst) ? dst : TMP_REG1;
-
-	/* Register destination. */
-	if (dst_r == src1 && !(src2 & SLJIT_IMM)) {
-		inst = emit_x86_instruction(compiler, 2, dst_r, 0, src2, src2w);
-		FAIL_IF(!inst);
-		*inst++ = GROUP_0F;
-		*inst = IMUL_r_rm;
-	}
-	else if (dst_r == src2 && !(src1 & SLJIT_IMM)) {
-		inst = emit_x86_instruction(compiler, 2, dst_r, 0, src1, src1w);
-		FAIL_IF(!inst);
-		*inst++ = GROUP_0F;
-		*inst = IMUL_r_rm;
-	}
-	else if (src1 & SLJIT_IMM) {
-		if (src2 & SLJIT_IMM) {
-			EMIT_MOV(compiler, dst_r, 0, SLJIT_IMM, src2w);
-			src2 = dst_r;
-			src2w = 0;
-		}
-
-		if (src1w <= 127 && src1w >= -128) {
-			inst = emit_x86_instruction(compiler, 1, dst_r, 0, src2, src2w);
-			FAIL_IF(!inst);
-			*inst = IMUL_r_rm_i8;
-			inst = (sljit_ub*)ensure_buf(compiler, 1 + 1);
-			FAIL_IF(!inst);
-			INC_SIZE(1);
-			*inst = (sljit_sb)src1w;
-		}
-#if (defined SLJIT_CONFIG_X86_32 && SLJIT_CONFIG_X86_32)
-		else {
-			inst = emit_x86_instruction(compiler, 1, dst_r, 0, src2, src2w);
-			FAIL_IF(!inst);
-			*inst = IMUL_r_rm_i32;
-			inst = (sljit_ub*)ensure_buf(compiler, 1 + 4);
-			FAIL_IF(!inst);
-			INC_SIZE(4);
-			*(sljit_sw*)inst = src1w;
-		}
-#else
-		else if (IS_HALFWORD(src1w)) {
-			inst = emit_x86_instruction(compiler, 1, dst_r, 0, src2, src2w);
-			FAIL_IF(!inst);
-			*inst = IMUL_r_rm_i32;
-			inst = (sljit_ub*)ensure_buf(compiler, 1 + 4);
-			FAIL_IF(!inst);
-			INC_SIZE(4);
-			*(sljit_si*)inst = (sljit_si)src1w;
-		}
-		else {
-			EMIT_MOV(compiler, TMP_REG2, 0, SLJIT_IMM, src1w);
-			if (dst_r != src2)
-				EMIT_MOV(compiler, dst_r, 0, src2, src2w);
-			inst = emit_x86_instruction(compiler, 2, dst_r, 0, TMP_REG2, 0);
-			FAIL_IF(!inst);
-			*inst++ = GROUP_0F;
-			*inst = IMUL_r_rm;
-		}
-#endif
-	}
-	else if (src2 & SLJIT_IMM) {
-		/* Note: src1 is NOT immediate. */
-
-		if (src2w <= 127 && src2w >= -128) {
-			inst = emit_x86_instruction(compiler, 1, dst_r, 0, src1, src1w);
-			FAIL_IF(!inst);
-			*inst = IMUL_r_rm_i8;
-			inst = (sljit_ub*)ensure_buf(compiler, 1 + 1);
-			FAIL_IF(!inst);
-			INC_SIZE(1);
-			*inst = (sljit_sb)src2w;
-		}
-#if (defined SLJIT_CONFIG_X86_32 && SLJIT_CONFIG_X86_32)
-		else {
-			inst = emit_x86_instruction(compiler, 1, dst_r, 0, src1, src1w);
-			FAIL_IF(!inst);
-			*inst = IMUL_r_rm_i32;
-			inst = (sljit_ub*)ensure_buf(compiler, 1 + 4);
-			FAIL_IF(!inst);
-			INC_SIZE(4);
-			*(sljit_sw*)inst = src2w;
-		}
-#else
-		else if (IS_HALFWORD(src2w)) {
-			inst = emit_x86_instruction(compiler, 1, dst_r, 0, src1, src1w);
-			FAIL_IF(!inst);
-			*inst = IMUL_r_rm_i32;
-			inst = (sljit_ub*)ensure_buf(compiler, 1 + 4);
-			FAIL_IF(!inst);
-			INC_SIZE(4);
-			*(sljit_si*)inst = (sljit_si)src2w;
-		}
-		else {
-			EMIT_MOV(compiler, TMP_REG2, 0, SLJIT_IMM, src1w);
-			if (dst_r != src1)
-				EMIT_MOV(compiler, dst_r, 0, src1, src1w);
-			inst = emit_x86_instruction(compiler, 2, dst_r, 0, TMP_REG2, 0);
-			FAIL_IF(!inst);
-			*inst++ = GROUP_0F;
-			*inst = IMUL_r_rm;
-		}
-#endif
-	}
-	else {
-		/* Neither argument is immediate. */
-		if (ADDRESSING_DEPENDS_ON(src2, dst_r))
-			dst_r = TMP_REG1;
-		EMIT_MOV(compiler, dst_r, 0, src1, src1w);
-		inst = emit_x86_instruction(compiler, 2, dst_r, 0, src2, src2w);
-		FAIL_IF(!inst);
-		*inst++ = GROUP_0F;
-		*inst = IMUL_r_rm;
-	}
-
-	if (dst_r == TMP_REG1)
-		EMIT_MOV(compiler, dst, dstw, TMP_REG1, 0);
-
-	return SLJIT_SUCCESS;
-}
-
-static sljit_si emit_lea_binary(struct sljit_compiler *compiler, sljit_si keep_flags,
-	sljit_si dst, sljit_sw dstw,
-	sljit_si src1, sljit_sw src1w,
-	sljit_si src2, sljit_sw src2w)
-{
-	sljit_ub* inst;
-	sljit_si dst_r, done = 0;
-
-	/* These cases better be left to handled by normal way. */
-	if (!keep_flags) {
-		if (dst == src1 && dstw == src1w)
-			return SLJIT_ERR_UNSUPPORTED;
-		if (dst == src2 && dstw == src2w)
-			return SLJIT_ERR_UNSUPPORTED;
-	}
-
-	dst_r = FAST_IS_REG(dst) ? dst : TMP_REG1;
-
-	if (FAST_IS_REG(src1)) {
-		if (FAST_IS_REG(src2)) {
-			inst = emit_x86_instruction(compiler, 1, dst_r, 0, SLJIT_MEM2(src1, src2), 0);
-			FAIL_IF(!inst);
-			*inst = LEA_r_m;
-			done = 1;
-		}
-#if (defined SLJIT_CONFIG_X86_64 && SLJIT_CONFIG_X86_64)
-		if ((src2 & SLJIT_IMM) && (compiler->mode32 || IS_HALFWORD(src2w))) {
-			inst = emit_x86_instruction(compiler, 1, dst_r, 0, SLJIT_MEM1(src1), (sljit_si)src2w);
-#else
-		if (src2 & SLJIT_IMM) {
-			inst = emit_x86_instruction(compiler, 1, dst_r, 0, SLJIT_MEM1(src1), src2w);
-#endif
-			FAIL_IF(!inst);
-			*inst = LEA_r_m;
-			done = 1;
-		}
-	}
-	else if (FAST_IS_REG(src2)) {
-#if (defined SLJIT_CONFIG_X86_64 && SLJIT_CONFIG_X86_64)
-		if ((src1 & SLJIT_IMM) && (compiler->mode32 || IS_HALFWORD(src1w))) {
-			inst = emit_x86_instruction(compiler, 1, dst_r, 0, SLJIT_MEM1(src2), (sljit_si)src1w);
-#else
-		if (src1 & SLJIT_IMM) {
-			inst = emit_x86_instruction(compiler, 1, dst_r, 0, SLJIT_MEM1(src2), src1w);
-#endif
-			FAIL_IF(!inst);
-			*inst = LEA_r_m;
-			done = 1;
-		}
-	}
-
-	if (done) {
-		if (dst_r == TMP_REG1)
-			return emit_mov(compiler, dst, dstw, TMP_REG1, 0);
-		return SLJIT_SUCCESS;
-	}
-	return SLJIT_ERR_UNSUPPORTED;
-}
-
-static sljit_si emit_cmp_binary(struct sljit_compiler *compiler,
-	sljit_si src1, sljit_sw src1w,
-	sljit_si src2, sljit_sw src2w)
-{
-	sljit_ub* inst;
-
-#if (defined SLJIT_CONFIG_X86_64 && SLJIT_CONFIG_X86_64)
-	if (src1 == SLJIT_SCRATCH_REG1 && (src2 & SLJIT_IMM) && (src2w > 127 || src2w < -128) && (compiler->mode32 || IS_HALFWORD(src2w))) {
-#else
-	if (src1 == SLJIT_SCRATCH_REG1 && (src2 & SLJIT_IMM) && (src2w > 127 || src2w < -128)) {
-#endif
-		BINARY_EAX_IMM(CMP_EAX_i32, src2w);
-		return SLJIT_SUCCESS;
-	}
-
-	if (FAST_IS_REG(src1)) {
-		if (src2 & SLJIT_IMM) {
-			BINARY_IMM(CMP, CMP_rm_r, src2w, src1, 0);
-		}
-		else {
-			inst = emit_x86_instruction(compiler, 1, src1, 0, src2, src2w);
-			FAIL_IF(!inst);
-			*inst = CMP_r_rm;
-		}
-		return SLJIT_SUCCESS;
-	}
-
-	if (FAST_IS_REG(src2) && !(src1 & SLJIT_IMM)) {
-		inst = emit_x86_instruction(compiler, 1, src2, 0, src1, src1w);
-		FAIL_IF(!inst);
-		*inst = CMP_rm_r;
-		return SLJIT_SUCCESS;
-	}
-
-	if (src2 & SLJIT_IMM) {
-		if (src1 & SLJIT_IMM) {
-			EMIT_MOV(compiler, TMP_REG1, 0, src1, src1w);
-			src1 = TMP_REG1;
-			src1w = 0;
-		}
-		BINARY_IMM(CMP, CMP_rm_r, src2w, src1, src1w);
-	}
-	else {
-		EMIT_MOV(compiler, TMP_REG1, 0, src1, src1w);
-		inst = emit_x86_instruction(compiler, 1, TMP_REG1, 0, src2, src2w);
-		FAIL_IF(!inst);
-		*inst = CMP_r_rm;
-	}
-	return SLJIT_SUCCESS;
-}
-
-static sljit_si emit_test_binary(struct sljit_compiler *compiler,
-	sljit_si src1, sljit_sw src1w,
-	sljit_si src2, sljit_sw src2w)
-{
-	sljit_ub* inst;
-
-#if (defined SLJIT_CONFIG_X86_64 && SLJIT_CONFIG_X86_64)
-	if (src1 == SLJIT_SCRATCH_REG1 && (src2 & SLJIT_IMM) && (src2w > 127 || src2w < -128) && (compiler->mode32 || IS_HALFWORD(src2w))) {
-#else
-	if (src1 == SLJIT_SCRATCH_REG1 && (src2 & SLJIT_IMM) && (src2w > 127 || src2w < -128)) {
-#endif
-		BINARY_EAX_IMM(TEST_EAX_i32, src2w);
-		return SLJIT_SUCCESS;
-	}
-
-#if (defined SLJIT_CONFIG_X86_64 && SLJIT_CONFIG_X86_64)
-	if (src2 == SLJIT_SCRATCH_REG1 && (src2 & SLJIT_IMM) && (src1w > 127 || src1w < -128) && (compiler->mode32 || IS_HALFWORD(src1w))) {
-#else
-	if (src2 == SLJIT_SCRATCH_REG1 && (src1 & SLJIT_IMM) && (src1w > 127 || src1w < -128)) {
-#endif
-		BINARY_EAX_IMM(TEST_EAX_i32, src1w);
-		return SLJIT_SUCCESS;
-	}
-
-	if (FAST_IS_REG(src1)) {
-		if (src2 & SLJIT_IMM) {
-#if (defined SLJIT_CONFIG_X86_64 && SLJIT_CONFIG_X86_64)
-			if (IS_HALFWORD(src2w) || compiler->mode32) {
-				inst = emit_x86_instruction(compiler, 1, SLJIT_IMM, src2w, src1, 0);
-				FAIL_IF(!inst);
-				*inst = GROUP_F7;
-			}
-			else {
-				FAIL_IF(emit_load_imm64(compiler, TMP_REG2, src2w));
-				inst = emit_x86_instruction(compiler, 1, TMP_REG2, 0, src1, 0);
-				FAIL_IF(!inst);
-				*inst = TEST_rm_r;
-			}
-#else
-			inst = emit_x86_instruction(compiler, 1, SLJIT_IMM, src2w, src1, 0);
-			FAIL_IF(!inst);
-			*inst = GROUP_F7;
-#endif
-		}
-		else {
-			inst = emit_x86_instruction(compiler, 1, src1, 0, src2, src2w);
-			FAIL_IF(!inst);
-			*inst = TEST_rm_r;
-		}
-		return SLJIT_SUCCESS;
-	}
-
-	if (FAST_IS_REG(src2)) {
-		if (src1 & SLJIT_IMM) {
-#if (defined SLJIT_CONFIG_X86_64 && SLJIT_CONFIG_X86_64)
-			if (IS_HALFWORD(src1w) || compiler->mode32) {
-				inst = emit_x86_instruction(compiler, 1, SLJIT_IMM, src1w, src2, 0);
-				FAIL_IF(!inst);
-				*inst = GROUP_F7;
-			}
-			else {
-				FAIL_IF(emit_load_imm64(compiler, TMP_REG2, src1w));
-				inst = emit_x86_instruction(compiler, 1, TMP_REG2, 0, src2, 0);
-				FAIL_IF(!inst);
-				*inst = TEST_rm_r;
-			}
-#else
-			inst = emit_x86_instruction(compiler, 1, src1, src1w, src2, 0);
-			FAIL_IF(!inst);
-			*inst = GROUP_F7;
-#endif
-		}
-		else {
-			inst = emit_x86_instruction(compiler, 1, src2, 0, src1, src1w);
-			FAIL_IF(!inst);
-			*inst = TEST_rm_r;
-		}
-		return SLJIT_SUCCESS;
-	}
-
-	EMIT_MOV(compiler, TMP_REG1, 0, src1, src1w);
-	if (src2 & SLJIT_IMM) {
-#if (defined SLJIT_CONFIG_X86_64 && SLJIT_CONFIG_X86_64)
-		if (IS_HALFWORD(src2w) || compiler->mode32) {
-			inst = emit_x86_instruction(compiler, 1, SLJIT_IMM, src2w, TMP_REG1, 0);
-			FAIL_IF(!inst);
-			*inst = GROUP_F7;
-		}
-		else {
-			FAIL_IF(emit_load_imm64(compiler, TMP_REG2, src2w));
-			inst = emit_x86_instruction(compiler, 1, TMP_REG2, 0, TMP_REG1, 0);
-			FAIL_IF(!inst);
-			*inst = TEST_rm_r;
-		}
-#else
-		inst = emit_x86_instruction(compiler, 1, SLJIT_IMM, src2w, TMP_REG1, 0);
-		FAIL_IF(!inst);
-		*inst = GROUP_F7;
-#endif
-	}
-	else {
-		inst = emit_x86_instruction(compiler, 1, TMP_REG1, 0, src2, src2w);
-		FAIL_IF(!inst);
-		*inst = TEST_rm_r;
-	}
-	return SLJIT_SUCCESS;
-}
-
-static sljit_si emit_shift(struct sljit_compiler *compiler,
-	sljit_ub mode,
-	sljit_si dst, sljit_sw dstw,
-	sljit_si src1, sljit_sw src1w,
-	sljit_si src2, sljit_sw src2w)
-{
-	sljit_ub* inst;
-
-	if ((src2 & SLJIT_IMM) || (src2 == SLJIT_PREF_SHIFT_REG)) {
-		if (dst == src1 && dstw == src1w) {
-			inst = emit_x86_instruction(compiler, 1 | EX86_SHIFT_INS, src2, src2w, dst, dstw);
-			FAIL_IF(!inst);
-			*inst |= mode;
-			return SLJIT_SUCCESS;
-		}
-		if (dst == SLJIT_UNUSED) {
-			EMIT_MOV(compiler, TMP_REG1, 0, src1, src1w);
-			inst = emit_x86_instruction(compiler, 1 | EX86_SHIFT_INS, src2, src2w, TMP_REG1, 0);
-			FAIL_IF(!inst);
-			*inst |= mode;
-			return SLJIT_SUCCESS;
-		}
-		if (dst == SLJIT_PREF_SHIFT_REG && src2 == SLJIT_PREF_SHIFT_REG) {
-			EMIT_MOV(compiler, TMP_REG1, 0, src1, src1w);
-			inst = emit_x86_instruction(compiler, 1 | EX86_SHIFT_INS, SLJIT_PREF_SHIFT_REG, 0, TMP_REG1, 0);
-			FAIL_IF(!inst);
-			*inst |= mode;
-			EMIT_MOV(compiler, SLJIT_PREF_SHIFT_REG, 0, TMP_REG1, 0);
-			return SLJIT_SUCCESS;
-		}
-		if (FAST_IS_REG(dst)) {
-			EMIT_MOV(compiler, dst, 0, src1, src1w);
-			inst = emit_x86_instruction(compiler, 1 | EX86_SHIFT_INS, src2, src2w, dst, 0);
-			FAIL_IF(!inst);
-			*inst |= mode;
-			return SLJIT_SUCCESS;
-		}
-
-		EMIT_MOV(compiler, TMP_REG1, 0, src1, src1w);
-		inst = emit_x86_instruction(compiler, 1 | EX86_SHIFT_INS, src2, src2w, TMP_REG1, 0);
-		FAIL_IF(!inst);
-		*inst |= mode;
-		EMIT_MOV(compiler, dst, dstw, TMP_REG1, 0);
-		return SLJIT_SUCCESS;
-	}
-
-	if (dst == SLJIT_PREF_SHIFT_REG) {
-		EMIT_MOV(compiler, TMP_REG1, 0, src1, src1w);
-		EMIT_MOV(compiler, SLJIT_PREF_SHIFT_REG, 0, src2, src2w);
-		inst = emit_x86_instruction(compiler, 1 | EX86_SHIFT_INS, SLJIT_PREF_SHIFT_REG, 0, TMP_REG1, 0);
-		FAIL_IF(!inst);
-		*inst |= mode;
-		EMIT_MOV(compiler, SLJIT_PREF_SHIFT_REG, 0, TMP_REG1, 0);
-	}
-	else if (FAST_IS_REG(dst) && dst != src2 && !ADDRESSING_DEPENDS_ON(src2, dst)) {
-		if (src1 != dst)
-			EMIT_MOV(compiler, dst, 0, src1, src1w);
-		EMIT_MOV(compiler, TMP_REG1, 0, SLJIT_PREF_SHIFT_REG, 0);
-		EMIT_MOV(compiler, SLJIT_PREF_SHIFT_REG, 0, src2, src2w);
-		inst = emit_x86_instruction(compiler, 1 | EX86_SHIFT_INS, SLJIT_PREF_SHIFT_REG, 0, dst, 0);
-		FAIL_IF(!inst);
-		*inst |= mode;
-		EMIT_MOV(compiler, SLJIT_PREF_SHIFT_REG, 0, TMP_REG1, 0);
-	}
-	else {
-		/* This case is really difficult, since ecx itself may used for
-		   addressing, and we must ensure to work even in that case. */
-		EMIT_MOV(compiler, TMP_REG1, 0, src1, src1w);
-#if (defined SLJIT_CONFIG_X86_64 && SLJIT_CONFIG_X86_64)
-		EMIT_MOV(compiler, TMP_REG2, 0, SLJIT_PREF_SHIFT_REG, 0);
-#else
-		/* [esp+0] contains the flags. */
-		EMIT_MOV(compiler, SLJIT_MEM1(SLJIT_LOCALS_REG), sizeof(sljit_sw), SLJIT_PREF_SHIFT_REG, 0);
-#endif
-		EMIT_MOV(compiler, SLJIT_PREF_SHIFT_REG, 0, src2, src2w);
-		inst = emit_x86_instruction(compiler, 1 | EX86_SHIFT_INS, SLJIT_PREF_SHIFT_REG, 0, TMP_REG1, 0);
-		FAIL_IF(!inst);
-		*inst |= mode;
-#if (defined SLJIT_CONFIG_X86_64 && SLJIT_CONFIG_X86_64)
-		EMIT_MOV(compiler, SLJIT_PREF_SHIFT_REG, 0, TMP_REG2, 0);
-#else
-		EMIT_MOV(compiler, SLJIT_PREF_SHIFT_REG, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), sizeof(sljit_sw));
-#endif
-		EMIT_MOV(compiler, dst, dstw, TMP_REG1, 0);
-	}
-
-	return SLJIT_SUCCESS;
-}
-
-static sljit_si emit_shift_with_flags(struct sljit_compiler *compiler,
-	sljit_ub mode, sljit_si set_flags,
-	sljit_si dst, sljit_sw dstw,
-	sljit_si src1, sljit_sw src1w,
-	sljit_si src2, sljit_sw src2w)
-{
-	/* The CPU does not set flags if the shift count is 0. */
-	if (src2 & SLJIT_IMM) {
-#if (defined SLJIT_CONFIG_X86_64 && SLJIT_CONFIG_X86_64)
-		if ((src2w & 0x3f) != 0 || (compiler->mode32 && (src2w & 0x1f) != 0))
-			return emit_shift(compiler, mode, dst, dstw, src1, src1w, src2, src2w);
-#else
-		if ((src2w & 0x1f) != 0)
-			return emit_shift(compiler, mode, dst, dstw, src1, src1w, src2, src2w);
-#endif
-		if (!set_flags)
-			return emit_mov(compiler, dst, dstw, src1, src1w);
-		/* OR dst, src, 0 */
-		return emit_cum_binary(compiler, OR_r_rm, OR_rm_r, OR, OR_EAX_i32,
-			dst, dstw, src1, src1w, SLJIT_IMM, 0);
-	}
-
-	if (!set_flags)
-		return emit_shift(compiler, mode, dst, dstw, src1, src1w, src2, src2w);
-
-	if (!FAST_IS_REG(dst))
-		FAIL_IF(emit_cmp_binary(compiler, src1, src1w, SLJIT_IMM, 0));
-
-	FAIL_IF(emit_shift(compiler,mode, dst, dstw, src1, src1w, src2, src2w));
-
-	if (FAST_IS_REG(dst))
-		return emit_cmp_binary(compiler, dst, dstw, SLJIT_IMM, 0);
-	return SLJIT_SUCCESS;
-}
-
-SLJIT_API_FUNC_ATTRIBUTE sljit_si sljit_emit_op2(struct sljit_compiler *compiler, sljit_si op,
-	sljit_si dst, sljit_sw dstw,
-	sljit_si src1, sljit_sw src1w,
-	sljit_si src2, sljit_sw src2w)
-{
-	CHECK_ERROR();
-	check_sljit_emit_op2(compiler, op, dst, dstw, src1, src1w, src2, src2w);
-	ADJUST_LOCAL_OFFSET(dst, dstw);
-	ADJUST_LOCAL_OFFSET(src1, src1w);
-	ADJUST_LOCAL_OFFSET(src2, src2w);
-
-	CHECK_EXTRA_REGS(dst, dstw, (void)0);
-	CHECK_EXTRA_REGS(src1, src1w, (void)0);
-	CHECK_EXTRA_REGS(src2, src2w, (void)0);
-#if (defined SLJIT_CONFIG_X86_64 && SLJIT_CONFIG_X86_64)
-	compiler->mode32 = op & SLJIT_INT_OP;
-#endif
-
-	if (GET_OPCODE(op) >= SLJIT_MUL) {
-		if (SLJIT_UNLIKELY(GET_FLAGS(op)))
-			compiler->flags_saved = 0;
-		else if (SLJIT_UNLIKELY(op & SLJIT_KEEP_FLAGS) && !compiler->flags_saved)
-			FAIL_IF(emit_save_flags(compiler));
-	}
-
-	switch (GET_OPCODE(op)) {
-	case SLJIT_ADD:
-		if (!GET_FLAGS(op)) {
-			if (emit_lea_binary(compiler, op & SLJIT_KEEP_FLAGS, dst, dstw, src1, src1w, src2, src2w) != SLJIT_ERR_UNSUPPORTED)
-				return compiler->error;
-		}
-		else
-			compiler->flags_saved = 0;
-		if (SLJIT_UNLIKELY(op & SLJIT_KEEP_FLAGS) && !compiler->flags_saved)
-			FAIL_IF(emit_save_flags(compiler));
-		return emit_cum_binary(compiler, ADD_r_rm, ADD_rm_r, ADD, ADD_EAX_i32,
-			dst, dstw, src1, src1w, src2, src2w);
-	case SLJIT_ADDC:
-		if (SLJIT_UNLIKELY(compiler->flags_saved)) /* C flag must be restored. */
-			FAIL_IF(emit_restore_flags(compiler, 1));
-		else if (SLJIT_UNLIKELY(op & SLJIT_KEEP_FLAGS))
-			FAIL_IF(emit_save_flags(compiler));
-		if (SLJIT_UNLIKELY(GET_FLAGS(op)))
-			compiler->flags_saved = 0;
-		return emit_cum_binary(compiler, ADC_r_rm, ADC_rm_r, ADC, ADC_EAX_i32,
-			dst, dstw, src1, src1w, src2, src2w);
-	case SLJIT_SUB:
-		if (!GET_FLAGS(op)) {
-			if ((src2 & SLJIT_IMM) && emit_lea_binary(compiler, op & SLJIT_KEEP_FLAGS, dst, dstw, src1, src1w, SLJIT_IMM, -src2w) != SLJIT_ERR_UNSUPPORTED)
-				return compiler->error;
-		}
-		else
-			compiler->flags_saved = 0;
-		if (SLJIT_UNLIKELY(op & SLJIT_KEEP_FLAGS) && !compiler->flags_saved)
-			FAIL_IF(emit_save_flags(compiler));
-		if (dst == SLJIT_UNUSED)
-			return emit_cmp_binary(compiler, src1, src1w, src2, src2w);
-		return emit_non_cum_binary(compiler, SUB_r_rm, SUB_rm_r, SUB, SUB_EAX_i32,
-			dst, dstw, src1, src1w, src2, src2w);
-	case SLJIT_SUBC:
-		if (SLJIT_UNLIKELY(compiler->flags_saved)) /* C flag must be restored. */
-			FAIL_IF(emit_restore_flags(compiler, 1));
-		else if (SLJIT_UNLIKELY(op & SLJIT_KEEP_FLAGS))
-			FAIL_IF(emit_save_flags(compiler));
-		if (SLJIT_UNLIKELY(GET_FLAGS(op)))
-			compiler->flags_saved = 0;
-		return emit_non_cum_binary(compiler, SBB_r_rm, SBB_rm_r, SBB, SBB_EAX_i32,
-			dst, dstw, src1, src1w, src2, src2w);
-	case SLJIT_MUL:
-		return emit_mul(compiler, dst, dstw, src1, src1w, src2, src2w);
-	case SLJIT_AND:
-		if (dst == SLJIT_UNUSED)
-			return emit_test_binary(compiler, src1, src1w, src2, src2w);
-		return emit_cum_binary(compiler, AND_r_rm, AND_rm_r, AND, AND_EAX_i32,
-			dst, dstw, src1, src1w, src2, src2w);
-	case SLJIT_OR:
-		return emit_cum_binary(compiler, OR_r_rm, OR_rm_r, OR, OR_EAX_i32,
-			dst, dstw, src1, src1w, src2, src2w);
-	case SLJIT_XOR:
-		return emit_cum_binary(compiler, XOR_r_rm, XOR_rm_r, XOR, XOR_EAX_i32,
-			dst, dstw, src1, src1w, src2, src2w);
-	case SLJIT_SHL:
-		return emit_shift_with_flags(compiler, SHL, GET_FLAGS(op),
-			dst, dstw, src1, src1w, src2, src2w);
-	case SLJIT_LSHR:
-		return emit_shift_with_flags(compiler, SHR, GET_FLAGS(op),
-			dst, dstw, src1, src1w, src2, src2w);
-	case SLJIT_ASHR:
-		return emit_shift_with_flags(compiler, SAR, GET_FLAGS(op),
-			dst, dstw, src1, src1w, src2, src2w);
-	}
-
-	return SLJIT_SUCCESS;
-}
-
-SLJIT_API_FUNC_ATTRIBUTE sljit_si sljit_get_register_index(sljit_si reg)
-{
-	check_sljit_get_register_index(reg);
-#if (defined SLJIT_CONFIG_X86_32 && SLJIT_CONFIG_X86_32)
-	if (reg == SLJIT_TEMPORARY_EREG1 || reg == SLJIT_TEMPORARY_EREG2
-			|| reg == SLJIT_SAVED_EREG1 || reg == SLJIT_SAVED_EREG2)
-		return -1;
-#endif
-	return reg_map[reg];
-}
-
-SLJIT_API_FUNC_ATTRIBUTE sljit_si sljit_get_float_register_index(sljit_si reg)
-{
-	check_sljit_get_float_register_index(reg);
-	return reg;
-}
-
-SLJIT_API_FUNC_ATTRIBUTE sljit_si sljit_emit_op_custom(struct sljit_compiler *compiler,
-	void *instruction, sljit_si size)
-{
-	sljit_ub *inst;
-
-	CHECK_ERROR();
-	check_sljit_emit_op_custom(compiler, instruction, size);
-	SLJIT_ASSERT(size > 0 && size < 16);
-
-	inst = (sljit_ub*)ensure_buf(compiler, 1 + size);
-	FAIL_IF(!inst);
-	INC_SIZE(size);
-	SLJIT_MEMMOVE(inst, instruction, size);
-	return SLJIT_SUCCESS;
-}
-
-/* --------------------------------------------------------------------- */
-/*  Floating point operators                                             */
-/* --------------------------------------------------------------------- */
-
-#if (defined SLJIT_SSE2 && SLJIT_SSE2)
-
-/* Alignment + 2 * 16 bytes. */
-static sljit_si sse2_data[3 + (4 + 4) * 2];
-static sljit_si *sse2_buffer;
-
-static void init_compiler(void)
-{
-	sse2_buffer = (sljit_si*)(((sljit_uw)sse2_data + 15) & ~0xf);
-	/* Single precision constants. */
-	sse2_buffer[0] = 0x80000000;
-	sse2_buffer[4] = 0x7fffffff;
-	/* Double precision constants. */
-	sse2_buffer[8] = 0;
-	sse2_buffer[9] = 0x80000000;
-	sse2_buffer[12] = 0xffffffff;
-	sse2_buffer[13] = 0x7fffffff;
-}
-
-#endif
-
-SLJIT_API_FUNC_ATTRIBUTE sljit_si sljit_is_fpu_available(void)
-{
-#ifdef SLJIT_IS_FPU_AVAILABLE
-	return SLJIT_IS_FPU_AVAILABLE;
-#elif (defined SLJIT_SSE2 && SLJIT_SSE2)
-#if (defined SLJIT_DETECT_SSE2 && SLJIT_DETECT_SSE2)
-	if (cpu_has_sse2 == -1)
-		get_cpu_features();
-	return cpu_has_sse2;
-#else /* SLJIT_DETECT_SSE2 */
-	return 1;
-#endif /* SLJIT_DETECT_SSE2 */
-#else /* SLJIT_SSE2 */
-	return 0;
-#endif
-}
-
-#if (defined SLJIT_SSE2 && SLJIT_SSE2)
-
-static sljit_si emit_sse2(struct sljit_compiler *compiler, sljit_ub opcode,
-	sljit_si single, sljit_si xmm1, sljit_si xmm2, sljit_sw xmm2w)
-{
-	sljit_ub *inst;
-
-	inst = emit_x86_instruction(compiler, 2 | (single ? EX86_PREF_F3 : EX86_PREF_F2) | EX86_SSE2, xmm1, 0, xmm2, xmm2w);
-	FAIL_IF(!inst);
-	*inst++ = GROUP_0F;
-	*inst = opcode;
-	return SLJIT_SUCCESS;
-}
-
-static sljit_si emit_sse2_logic(struct sljit_compiler *compiler, sljit_ub opcode,
-	sljit_si pref66, sljit_si xmm1, sljit_si xmm2, sljit_sw xmm2w)
-{
-	sljit_ub *inst;
-
-	inst = emit_x86_instruction(compiler, 2 | (pref66 ? EX86_PREF_66 : 0) | EX86_SSE2, xmm1, 0, xmm2, xmm2w);
-	FAIL_IF(!inst);
-	*inst++ = GROUP_0F;
-	*inst = opcode;
-	return SLJIT_SUCCESS;
-}
-
-static SLJIT_INLINE sljit_si emit_sse2_load(struct sljit_compiler *compiler,
-	sljit_si single, sljit_si dst, sljit_si src, sljit_sw srcw)
-{
-	return emit_sse2(compiler, MOVSD_x_xm, single, dst, src, srcw);
-}
-
-static SLJIT_INLINE sljit_si emit_sse2_store(struct sljit_compiler *compiler,
-	sljit_si single, sljit_si dst, sljit_sw dstw, sljit_si src)
-{
-	return emit_sse2(compiler, MOVSD_xm_x, single, src, dst, dstw);
-}
-
-SLJIT_API_FUNC_ATTRIBUTE sljit_si sljit_emit_fop1(struct sljit_compiler *compiler, sljit_si op,
-	sljit_si dst, sljit_sw dstw,
-	sljit_si src, sljit_sw srcw)
-{
-	sljit_si dst_r;
-
-	CHECK_ERROR();
-	check_sljit_emit_fop1(compiler, op, dst, dstw, src, srcw);
-
-#if (defined SLJIT_CONFIG_X86_64 && SLJIT_CONFIG_X86_64)
-	compiler->mode32 = 1;
-#endif
-
-	if (GET_OPCODE(op) == SLJIT_CMPD) {
-		compiler->flags_saved = 0;
-		if (FAST_IS_REG(dst))
-			dst_r = dst;
-		else {
-			dst_r = TMP_FREG;
-			FAIL_IF(emit_sse2_load(compiler, op & SLJIT_SINGLE_OP, dst_r, dst, dstw));
-		}
-		return emit_sse2_logic(compiler, UCOMISD_x_xm, !(op & SLJIT_SINGLE_OP), dst_r, src, srcw);
-	}
-
-	if (op == SLJIT_MOVD) {
-		if (FAST_IS_REG(dst))
-			return emit_sse2_load(compiler, op & SLJIT_SINGLE_OP, dst, src, srcw);
-		if (FAST_IS_REG(src))
-			return emit_sse2_store(compiler, op & SLJIT_SINGLE_OP, dst, dstw, src);
-		FAIL_IF(emit_sse2_load(compiler, op & SLJIT_SINGLE_OP, TMP_FREG, src, srcw));
-		return emit_sse2_store(compiler, op & SLJIT_SINGLE_OP, dst, dstw, TMP_FREG);
-	}
-
-	if (SLOW_IS_REG(dst)) {
-		dst_r = dst;
-		if (dst != src)
-			FAIL_IF(emit_sse2_load(compiler, op & SLJIT_SINGLE_OP, dst_r, src, srcw));
-	}
-	else {
-		dst_r = TMP_FREG;
-		FAIL_IF(emit_sse2_load(compiler, op & SLJIT_SINGLE_OP, dst_r, src, srcw));
-	}
-
-	switch (GET_OPCODE(op)) {
-	case SLJIT_NEGD:
-		FAIL_IF(emit_sse2_logic(compiler, XORPD_x_xm, 1, dst_r, SLJIT_MEM0(), (sljit_sw)(op & SLJIT_SINGLE_OP ? sse2_buffer : sse2_buffer + 8)));
-		break;
-
-	case SLJIT_ABSD:
-		FAIL_IF(emit_sse2_logic(compiler, ANDPD_x_xm, 1, dst_r, SLJIT_MEM0(), (sljit_sw)(op & SLJIT_SINGLE_OP ? sse2_buffer + 4 : sse2_buffer + 12)));
-		break;
-	}
-
-	if (dst_r == TMP_FREG)
-		return emit_sse2_store(compiler, op & SLJIT_SINGLE_OP, dst, dstw, TMP_FREG);
-	return SLJIT_SUCCESS;
-}
-
-SLJIT_API_FUNC_ATTRIBUTE sljit_si sljit_emit_fop2(struct sljit_compiler *compiler, sljit_si op,
-	sljit_si dst, sljit_sw dstw,
-	sljit_si src1, sljit_sw src1w,
-	sljit_si src2, sljit_sw src2w)
-{
-	sljit_si dst_r;
-
-	CHECK_ERROR();
-	check_sljit_emit_fop2(compiler, op, dst, dstw, src1, src1w, src2, src2w);
-
-#if (defined SLJIT_CONFIG_X86_64 && SLJIT_CONFIG_X86_64)
-	compiler->mode32 = 1;
-#endif
-
-	if (FAST_IS_REG(dst)) {
-		dst_r = dst;
-		if (dst == src1)
-			; /* Do nothing here. */
-		else if (dst == src2 && (op == SLJIT_ADDD || op == SLJIT_MULD)) {
-			/* Swap arguments. */
-			src2 = src1;
-			src2w = src1w;
-		}
-		else if (dst != src2)
-			FAIL_IF(emit_sse2_load(compiler, op & SLJIT_SINGLE_OP, dst_r, src1, src1w));
-		else {
-			dst_r = TMP_FREG;
-			FAIL_IF(emit_sse2_load(compiler, op & SLJIT_SINGLE_OP, TMP_FREG, src1, src1w));
-		}
-	}
-	else {
-		dst_r = TMP_FREG;
-		FAIL_IF(emit_sse2_load(compiler, op & SLJIT_SINGLE_OP, TMP_FREG, src1, src1w));
-	}
-
-	switch (GET_OPCODE(op)) {
-	case SLJIT_ADDD:
-		FAIL_IF(emit_sse2(compiler, ADDSD_x_xm, op & SLJIT_SINGLE_OP, dst_r, src2, src2w));
-		break;
-
-	case SLJIT_SUBD:
-		FAIL_IF(emit_sse2(compiler, SUBSD_x_xm, op & SLJIT_SINGLE_OP, dst_r, src2, src2w));
-		break;
-
-	case SLJIT_MULD:
-		FAIL_IF(emit_sse2(compiler, MULSD_x_xm, op & SLJIT_SINGLE_OP, dst_r, src2, src2w));
-		break;
-
-	case SLJIT_DIVD:
-		FAIL_IF(emit_sse2(compiler, DIVSD_x_xm, op & SLJIT_SINGLE_OP, dst_r, src2, src2w));
-		break;
-	}
-
-	if (dst_r == TMP_FREG)
-		return emit_sse2_store(compiler, op & SLJIT_SINGLE_OP, dst, dstw, TMP_FREG);
-	return SLJIT_SUCCESS;
-}
-
-#else
-
-SLJIT_API_FUNC_ATTRIBUTE sljit_si sljit_emit_fop1(struct sljit_compiler *compiler, sljit_si op,
-	sljit_si dst, sljit_sw dstw,
-	sljit_si src, sljit_sw srcw)
-{
-	CHECK_ERROR();
-	/* Should cause an assertion fail. */
-	check_sljit_emit_fop1(compiler, op, dst, dstw, src, srcw);
-	compiler->error = SLJIT_ERR_UNSUPPORTED;
-	return SLJIT_ERR_UNSUPPORTED;
-}
-
-SLJIT_API_FUNC_ATTRIBUTE sljit_si sljit_emit_fop2(struct sljit_compiler *compiler, sljit_si op,
-	sljit_si dst, sljit_sw dstw,
-	sljit_si src1, sljit_sw src1w,
-	sljit_si src2, sljit_sw src2w)
-{
-	CHECK_ERROR();
-	/* Should cause an assertion fail. */
-	check_sljit_emit_fop2(compiler, op, dst, dstw, src1, src1w, src2, src2w);
-	compiler->error = SLJIT_ERR_UNSUPPORTED;
-	return SLJIT_ERR_UNSUPPORTED;
-}
-
-#endif
-
-/* --------------------------------------------------------------------- */
-/*  Conditional instructions                                             */
-/* --------------------------------------------------------------------- */
-
-SLJIT_API_FUNC_ATTRIBUTE struct sljit_label* sljit_emit_label(struct sljit_compiler *compiler)
-{
-	sljit_ub *inst;
-	struct sljit_label *label;
-
-	CHECK_ERROR_PTR();
-	check_sljit_emit_label(compiler);
-
-	/* We should restore the flags before the label,
-	   since other taken jumps has their own flags as well. */
-	if (SLJIT_UNLIKELY(compiler->flags_saved))
-		PTR_FAIL_IF(emit_restore_flags(compiler, 0));
-
-	if (compiler->last_label && compiler->last_label->size == compiler->size)
-		return compiler->last_label;
-
-	label = (struct sljit_label*)ensure_abuf(compiler, sizeof(struct sljit_label));
-	PTR_FAIL_IF(!label);
-	set_label(label, compiler);
-
-	inst = (sljit_ub*)ensure_buf(compiler, 2);
-	PTR_FAIL_IF(!inst);
-
-	*inst++ = 0;
-	*inst++ = 0;
-
-	return label;
-}
-
-SLJIT_API_FUNC_ATTRIBUTE struct sljit_jump* sljit_emit_jump(struct sljit_compiler *compiler, sljit_si type)
-{
-	sljit_ub *inst;
-	struct sljit_jump *jump;
-
-	CHECK_ERROR_PTR();
-	check_sljit_emit_jump(compiler, type);
-
-	if (SLJIT_UNLIKELY(compiler->flags_saved)) {
-		if ((type & 0xff) <= SLJIT_JUMP)
-			PTR_FAIL_IF(emit_restore_flags(compiler, 0));
-		compiler->flags_saved = 0;
-	}
-
-	jump = (struct sljit_jump*)ensure_abuf(compiler, sizeof(struct sljit_jump));
-	PTR_FAIL_IF_NULL(jump);
-	set_jump(jump, compiler, type & SLJIT_REWRITABLE_JUMP);
-	type &= 0xff;
-
-	if (type >= SLJIT_CALL1)
-		PTR_FAIL_IF(call_with_args(compiler, type));
-
-	/* Worst case size. */
-#if (defined SLJIT_CONFIG_X86_32 && SLJIT_CONFIG_X86_32)
-	compiler->size += (type >= SLJIT_JUMP) ? 5 : 6;
-#else
-	compiler->size += (type >= SLJIT_JUMP) ? (10 + 3) : (2 + 10 + 3);
-#endif
-
-	inst = (sljit_ub*)ensure_buf(compiler, 2);
-	PTR_FAIL_IF_NULL(inst);
-
-	*inst++ = 0;
-	*inst++ = type + 4;
-	return jump;
-}
-
-SLJIT_API_FUNC_ATTRIBUTE sljit_si sljit_emit_ijump(struct sljit_compiler *compiler, sljit_si type, sljit_si src, sljit_sw srcw)
-{
-	sljit_ub *inst;
-	struct sljit_jump *jump;
-
-	CHECK_ERROR();
-	check_sljit_emit_ijump(compiler, type, src, srcw);
-	ADJUST_LOCAL_OFFSET(src, srcw);
-
-	CHECK_EXTRA_REGS(src, srcw, (void)0);
-
-	if (SLJIT_UNLIKELY(compiler->flags_saved)) {
-		if (type <= SLJIT_JUMP)
-			FAIL_IF(emit_restore_flags(compiler, 0));
-		compiler->flags_saved = 0;
-	}
-
-	if (type >= SLJIT_CALL1) {
-#if (defined SLJIT_CONFIG_X86_32 && SLJIT_CONFIG_X86_32)
-#if (defined SLJIT_X86_32_FASTCALL && SLJIT_X86_32_FASTCALL)
-		if (src == SLJIT_SCRATCH_REG3) {
-			EMIT_MOV(compiler, TMP_REG1, 0, src, 0);
-			src = TMP_REG1;
-		}
-		if (src == SLJIT_MEM1(SLJIT_LOCALS_REG) && type >= SLJIT_CALL3)
-			srcw += sizeof(sljit_sw);
-#endif
-#endif
-#if (defined SLJIT_CONFIG_X86_64 && SLJIT_CONFIG_X86_64) && defined(_WIN64)
-		if (src == SLJIT_SCRATCH_REG3) {
-			EMIT_MOV(compiler, TMP_REG1, 0, src, 0);
-			src = TMP_REG1;
-		}
-#endif
-		FAIL_IF(call_with_args(compiler, type));
-	}
-
-	if (src == SLJIT_IMM) {
-		jump = (struct sljit_jump*)ensure_abuf(compiler, sizeof(struct sljit_jump));
-		FAIL_IF_NULL(jump);
-		set_jump(jump, compiler, JUMP_ADDR);
-		jump->u.target = srcw;
-
-		/* Worst case size. */
-#if (defined SLJIT_CONFIG_X86_32 && SLJIT_CONFIG_X86_32)
-		compiler->size += 5;
-#else
-		compiler->size += 10 + 3;
-#endif
-
-		inst = (sljit_ub*)ensure_buf(compiler, 2);
-		FAIL_IF_NULL(inst);
-
-		*inst++ = 0;
-		*inst++ = type + 4;
-	}
-	else {
-#if (defined SLJIT_CONFIG_X86_64 && SLJIT_CONFIG_X86_64)
-		/* REX_W is not necessary (src is not immediate). */
-		compiler->mode32 = 1;
-#endif
-		inst = emit_x86_instruction(compiler, 1, 0, 0, src, srcw);
-		FAIL_IF(!inst);
-		*inst++ = GROUP_FF;
-		*inst |= (type >= SLJIT_FAST_CALL) ? CALL_rm : JMP_rm;
-	}
-	return SLJIT_SUCCESS;
-}
-
-SLJIT_API_FUNC_ATTRIBUTE sljit_si sljit_emit_op_flags(struct sljit_compiler *compiler, sljit_si op,
-	sljit_si dst, sljit_sw dstw,
-	sljit_si src, sljit_sw srcw,
-	sljit_si type)
-{
-	sljit_ub *inst;
-	sljit_ub cond_set = 0;
-#if (defined SLJIT_CONFIG_X86_64 && SLJIT_CONFIG_X86_64)
-	sljit_si reg;
-#else
-	/* CHECK_EXTRA_REGS migh overwrite these values. */
-	sljit_si dst_save = dst;
-	sljit_sw dstw_save = dstw;
-#endif
-
-	CHECK_ERROR();
-	check_sljit_emit_op_flags(compiler, op, dst, dstw, src, srcw, type);
-
-	if (dst == SLJIT_UNUSED)
-		return SLJIT_SUCCESS;
-
-	ADJUST_LOCAL_OFFSET(dst, dstw);
-	CHECK_EXTRA_REGS(dst, dstw, (void)0);
-	if (SLJIT_UNLIKELY(compiler->flags_saved))
-		FAIL_IF(emit_restore_flags(compiler, op & SLJIT_KEEP_FLAGS));
-
-	/* setcc = jcc + 0x10. */
-	cond_set = get_jump_code(type) + 0x10;
-
-#if (defined SLJIT_CONFIG_X86_64 && SLJIT_CONFIG_X86_64)
-	if (GET_OPCODE(op) == SLJIT_OR && !GET_ALL_FLAGS(op) && FAST_IS_REG(dst) && dst == src) {
-		inst = (sljit_ub*)ensure_buf(compiler, 1 + 4 + 3);
-		FAIL_IF(!inst);
-		INC_SIZE(4 + 3);
-		/* Set low register to conditional flag. */
-		*inst++ = (reg_map[TMP_REG1] <= 7) ? REX : REX_B;
-		*inst++ = GROUP_0F;
-		*inst++ = cond_set;
-		*inst++ = MOD_REG | reg_lmap[TMP_REG1];
-		*inst++ = REX | (reg_map[TMP_REG1] <= 7 ? 0 : REX_R) | (reg_map[dst] <= 7 ? 0 : REX_B);
-		*inst++ = OR_rm8_r8;
-		*inst++ = MOD_REG | (reg_lmap[TMP_REG1] << 3) | reg_lmap[dst];
-		return SLJIT_SUCCESS;
-	}
-
-	reg = (op == SLJIT_MOV && FAST_IS_REG(dst)) ? dst : TMP_REG1;
-
-	inst = (sljit_ub*)ensure_buf(compiler, 1 + 4 + 4);
-	FAIL_IF(!inst);
-	INC_SIZE(4 + 4);
-	/* Set low register to conditional flag. */
-	*inst++ = (reg_map[reg] <= 7) ? REX : REX_B;
-	*inst++ = GROUP_0F;
-	*inst++ = cond_set;
-	*inst++ = MOD_REG | reg_lmap[reg];
-	*inst++ = REX_W | (reg_map[reg] <= 7 ? 0 : (REX_B | REX_R));
-	*inst++ = GROUP_0F;
-	*inst++ = MOVZX_r_rm8;
-	*inst = MOD_REG | (reg_lmap[reg] << 3) | reg_lmap[reg];
-
-	if (reg != TMP_REG1)
-		return SLJIT_SUCCESS;
-
-	if (GET_OPCODE(op) < SLJIT_ADD) {
-		compiler->mode32 = GET_OPCODE(op) != SLJIT_MOV;
-		return emit_mov(compiler, dst, dstw, TMP_REG1, 0);
-	}
-#if (defined SLJIT_VERBOSE && SLJIT_VERBOSE) || (defined SLJIT_DEBUG && SLJIT_DEBUG)
-	compiler->skip_checks = 1;
-#endif
-	return sljit_emit_op2(compiler, op, dst, dstw, dst, dstw, TMP_REG1, 0);
-#else /* SLJIT_CONFIG_X86_64 */
-	if (GET_OPCODE(op) < SLJIT_ADD && FAST_IS_REG(dst)) {
-		if (reg_map[dst] <= 4) {
-			/* Low byte is accessible. */
-			inst = (sljit_ub*)ensure_buf(compiler, 1 + 3 + 3);
-			FAIL_IF(!inst);
-			INC_SIZE(3 + 3);
-			/* Set low byte to conditional flag. */
-			*inst++ = GROUP_0F;
-			*inst++ = cond_set;
-			*inst++ = MOD_REG | reg_map[dst];
-
-			*inst++ = GROUP_0F;
-			*inst++ = MOVZX_r_rm8;
-			*inst = MOD_REG | (reg_map[dst] << 3) | reg_map[dst];
-			return SLJIT_SUCCESS;
-		}
-
-		/* Low byte is not accessible. */
-		if (cpu_has_cmov == -1)
-			get_cpu_features();
-
-		if (cpu_has_cmov) {
-			EMIT_MOV(compiler, TMP_REG1, 0, SLJIT_IMM, 1);
-			/* a xor reg, reg operation would overwrite the flags. */
-			EMIT_MOV(compiler, dst, 0, SLJIT_IMM, 0);
-
-			inst = (sljit_ub*)ensure_buf(compiler, 1 + 3);
-			FAIL_IF(!inst);
-			INC_SIZE(3);
-
-			*inst++ = GROUP_0F;
-			/* cmovcc = setcc - 0x50. */
-			*inst++ = cond_set - 0x50;
-			*inst++ = MOD_REG | (reg_map[dst] << 3) | reg_map[TMP_REG1];
-			return SLJIT_SUCCESS;
-		}
-
-		inst = (sljit_ub*)ensure_buf(compiler, 1 + 1 + 3 + 3 + 1);
-		FAIL_IF(!inst);
-		INC_SIZE(1 + 3 + 3 + 1);
-		*inst++ = XCHG_EAX_r + reg_map[TMP_REG1];
-		/* Set al to conditional flag. */
-		*inst++ = GROUP_0F;
-		*inst++ = cond_set;
-		*inst++ = MOD_REG | 0 /* eax */;
-
-		*inst++ = GROUP_0F;
-		*inst++ = MOVZX_r_rm8;
-		*inst++ = MOD_REG | (reg_map[dst] << 3) | 0 /* eax */;
-		*inst++ = XCHG_EAX_r + reg_map[TMP_REG1];
-		return SLJIT_SUCCESS;
-	}
-
-	if (GET_OPCODE(op) == SLJIT_OR && !GET_ALL_FLAGS(op) && FAST_IS_REG(dst) && dst == src && reg_map[dst] <= 4) {
-		SLJIT_COMPILE_ASSERT(reg_map[SLJIT_SCRATCH_REG1] == 0, scratch_reg1_must_be_eax);
-		if (dst != SLJIT_SCRATCH_REG1) {
-			inst = (sljit_ub*)ensure_buf(compiler, 1 + 1 + 3 + 2 + 1);
-			FAIL_IF(!inst);
-			INC_SIZE(1 + 3 + 2 + 1);
-			/* Set low register to conditional flag. */
-			*inst++ = XCHG_EAX_r + reg_map[TMP_REG1];
-			*inst++ = GROUP_0F;
-			*inst++ = cond_set;
-			*inst++ = MOD_REG | 0 /* eax */;
-			*inst++ = OR_rm8_r8;
-			*inst++ = MOD_REG | (0 /* eax */ << 3) | reg_map[dst];
-			*inst++ = XCHG_EAX_r + reg_map[TMP_REG1];
-		}
-		else {
-			inst = (sljit_ub*)ensure_buf(compiler, 1 + 2 + 3 + 2 + 2);
-			FAIL_IF(!inst);
-			INC_SIZE(2 + 3 + 2 + 2);
-			/* Set low register to conditional flag. */
-			*inst++ = XCHG_r_rm;
-			*inst++ = MOD_REG | (1 /* ecx */ << 3) | reg_map[TMP_REG1];
-			*inst++ = GROUP_0F;
-			*inst++ = cond_set;
-			*inst++ = MOD_REG | 1 /* ecx */;
-			*inst++ = OR_rm8_r8;
-			*inst++ = MOD_REG | (1 /* ecx */ << 3) | 0 /* eax */;
-			*inst++ = XCHG_r_rm;
-			*inst++ = MOD_REG | (1 /* ecx */ << 3) | reg_map[TMP_REG1];
-		}
-		return SLJIT_SUCCESS;
-	}
-
-	/* Set TMP_REG1 to the bit. */
-	inst = (sljit_ub*)ensure_buf(compiler, 1 + 1 + 3 + 3 + 1);
-	FAIL_IF(!inst);
-	INC_SIZE(1 + 3 + 3 + 1);
-	*inst++ = XCHG_EAX_r + reg_map[TMP_REG1];
-	/* Set al to conditional flag. */
-	*inst++ = GROUP_0F;
-	*inst++ = cond_set;
-	*inst++ = MOD_REG | 0 /* eax */;
-
-	*inst++ = GROUP_0F;
-	*inst++ = MOVZX_r_rm8;
-	*inst++ = MOD_REG | (0 << 3) /* eax */ | 0 /* eax */;
-
-	*inst++ = XCHG_EAX_r + reg_map[TMP_REG1];
-
-	if (GET_OPCODE(op) < SLJIT_ADD)
-		return emit_mov(compiler, dst, dstw, TMP_REG1, 0);
-
-#if (defined SLJIT_VERBOSE && SLJIT_VERBOSE) || (defined SLJIT_DEBUG && SLJIT_DEBUG)
-	compiler->skip_checks = 1;
-#endif
-	return sljit_emit_op2(compiler, op, dst_save, dstw_save, dst_save, dstw_save, TMP_REG1, 0);
-#endif /* SLJIT_CONFIG_X86_64 */
-}
-
-SLJIT_API_FUNC_ATTRIBUTE sljit_si sljit_get_local_base(struct sljit_compiler *compiler, sljit_si dst, sljit_sw dstw, sljit_sw offset)
-{
-	CHECK_ERROR();
-	check_sljit_get_local_base(compiler, dst, dstw, offset);
-	ADJUST_LOCAL_OFFSET(dst, dstw);
-
-	CHECK_EXTRA_REGS(dst, dstw, (void)0);
-
-#if (defined SLJIT_CONFIG_X86_64 && SLJIT_CONFIG_X86_64)
-	compiler->mode32 = 0;
-#endif
-
-	ADJUST_LOCAL_OFFSET(SLJIT_MEM1(SLJIT_LOCALS_REG), offset);
-
-#if (defined SLJIT_CONFIG_X86_64 && SLJIT_CONFIG_X86_64)
-	if (NOT_HALFWORD(offset)) {
-		FAIL_IF(emit_load_imm64(compiler, TMP_REG1, offset));
-#if (defined SLJIT_DEBUG && SLJIT_DEBUG)
-		SLJIT_ASSERT(emit_lea_binary(compiler, SLJIT_KEEP_FLAGS, dst, dstw, SLJIT_LOCALS_REG, 0, TMP_REG1, 0) != SLJIT_ERR_UNSUPPORTED);
-		return compiler->error;
-#else
-		return emit_lea_binary(compiler, SLJIT_KEEP_FLAGS, dst, dstw, SLJIT_LOCALS_REG, 0, TMP_REG1, 0);
-#endif
-	}
-#endif
-
-	if (offset != 0)
-		return emit_lea_binary(compiler, SLJIT_KEEP_FLAGS, dst, dstw, SLJIT_LOCALS_REG, 0, SLJIT_IMM, offset);
-	return emit_mov(compiler, dst, dstw, SLJIT_LOCALS_REG, 0);
-}
-
-SLJIT_API_FUNC_ATTRIBUTE struct sljit_const* sljit_emit_const(struct sljit_compiler *compiler, sljit_si dst, sljit_sw dstw, sljit_sw init_value)
-{
-	sljit_ub *inst;
-	struct sljit_const *const_;
-#if (defined SLJIT_CONFIG_X86_64 && SLJIT_CONFIG_X86_64)
-	sljit_si reg;
-#endif
-
-	CHECK_ERROR_PTR();
-	check_sljit_emit_const(compiler, dst, dstw, init_value);
-	ADJUST_LOCAL_OFFSET(dst, dstw);
-
-	CHECK_EXTRA_REGS(dst, dstw, (void)0);
-
-	const_ = (struct sljit_const*)ensure_abuf(compiler, sizeof(struct sljit_const));
-	PTR_FAIL_IF(!const_);
-	set_const(const_, compiler);
-
-#if (defined SLJIT_CONFIG_X86_64 && SLJIT_CONFIG_X86_64)
-	compiler->mode32 = 0;
-	reg = SLOW_IS_REG(dst) ? dst : TMP_REG1;
-
-	if (emit_load_imm64(compiler, reg, init_value))
-		return NULL;
-#else
-	if (dst == SLJIT_UNUSED)
-		dst = TMP_REG1;
-
-	if (emit_mov(compiler, dst, dstw, SLJIT_IMM, init_value))
-		return NULL;
-#endif
-
-	inst = (sljit_ub*)ensure_buf(compiler, 2);
-	PTR_FAIL_IF(!inst);
-
-	*inst++ = 0;
-	*inst++ = 1;
-
-#if (defined SLJIT_CONFIG_X86_64 && SLJIT_CONFIG_X86_64)
-	if (dst & SLJIT_MEM)
-		if (emit_mov(compiler, dst, dstw, TMP_REG1, 0))
-			return NULL;
-#endif
-
-	return const_;
-}
-
-SLJIT_API_FUNC_ATTRIBUTE void sljit_set_jump_addr(sljit_uw addr, sljit_uw new_addr)
-{
-#if (defined SLJIT_CONFIG_X86_32 && SLJIT_CONFIG_X86_32)
-	*(sljit_sw*)addr = new_addr - (addr + 4);
-#else
-	*(sljit_uw*)addr = new_addr;
-#endif
-}
-
-SLJIT_API_FUNC_ATTRIBUTE void sljit_set_const(sljit_uw addr, sljit_sw new_constant)
-{
-	*(sljit_sw*)addr = new_constant;
-}
diff --git a/src/extra/pcre/sljit/sljitUtils.c b/src/extra/pcre/sljit/sljitUtils.c
deleted file mode 100644
index b29b403..0000000
--- a/src/extra/pcre/sljit/sljitUtils.c
+++ /dev/null
@@ -1,332 +0,0 @@
-/*
- *    Stack-less Just-In-Time compiler
- *
- *    Copyright 2009-2012 Zoltan Herczeg (hzmester at freemail.hu). All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without modification, are
- * permitted provided that the following conditions are met:
- *
- *   1. Redistributions of source code must retain the above copyright notice, this list of
- *      conditions and the following disclaimer.
- *
- *   2. Redistributions in binary form must reproduce the above copyright notice, this list
- *      of conditions and the following disclaimer in the documentation and/or other materials
- *      provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER(S) AND CONTRIBUTORS ``AS IS'' AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
- * SHALL THE COPYRIGHT HOLDER(S) OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
- * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
- * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
- * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/* ------------------------------------------------------------------------ */
-/*  Locks                                                                   */
-/* ------------------------------------------------------------------------ */
-
-#if (defined SLJIT_EXECUTABLE_ALLOCATOR && SLJIT_EXECUTABLE_ALLOCATOR) || (defined SLJIT_UTIL_GLOBAL_LOCK && SLJIT_UTIL_GLOBAL_LOCK)
-
-#if (defined SLJIT_SINGLE_THREADED && SLJIT_SINGLE_THREADED)
-
-#if (defined SLJIT_EXECUTABLE_ALLOCATOR && SLJIT_EXECUTABLE_ALLOCATOR)
-
-static SLJIT_INLINE void allocator_grab_lock(void)
-{
-	/* Always successful. */
-}
-
-static SLJIT_INLINE void allocator_release_lock(void)
-{
-	/* Always successful. */
-}
-
-#endif /* SLJIT_EXECUTABLE_ALLOCATOR */
-
-#if (defined SLJIT_UTIL_GLOBAL_LOCK && SLJIT_UTIL_GLOBAL_LOCK)
-
-SLJIT_API_FUNC_ATTRIBUTE void SLJIT_CALL sljit_grab_lock(void)
-{
-	/* Always successful. */
-}
-
-SLJIT_API_FUNC_ATTRIBUTE void SLJIT_CALL sljit_release_lock(void)
-{
-	/* Always successful. */
-}
-
-#endif /* SLJIT_UTIL_GLOBAL_LOCK */
-
-#elif defined(_WIN32) /* SLJIT_SINGLE_THREADED */
-
-#include "windows.h"
-
-#if (defined SLJIT_EXECUTABLE_ALLOCATOR && SLJIT_EXECUTABLE_ALLOCATOR)
-
-static HANDLE allocator_mutex = 0;
-
-static SLJIT_INLINE void allocator_grab_lock(void)
-{
-	/* No idea what to do if an error occures. Static mutexes should never fail... */
-	if (!allocator_mutex)
-		allocator_mutex = CreateMutex(NULL, TRUE, NULL);
-	else
-		WaitForSingleObject(allocator_mutex, INFINITE);
-}
-
-static SLJIT_INLINE void allocator_release_lock(void)
-{
-	ReleaseMutex(allocator_mutex);
-}
-
-#endif /* SLJIT_EXECUTABLE_ALLOCATOR */
-
-#if (defined SLJIT_UTIL_GLOBAL_LOCK && SLJIT_UTIL_GLOBAL_LOCK)
-
-static HANDLE global_mutex = 0;
-
-SLJIT_API_FUNC_ATTRIBUTE void SLJIT_CALL sljit_grab_lock(void)
-{
-	/* No idea what to do if an error occures. Static mutexes should never fail... */
-	if (!global_mutex)
-		global_mutex = CreateMutex(NULL, TRUE, NULL);
-	else
-		WaitForSingleObject(global_mutex, INFINITE);
-}
-
-SLJIT_API_FUNC_ATTRIBUTE void SLJIT_CALL sljit_release_lock(void)
-{
-	ReleaseMutex(global_mutex);
-}
-
-#endif /* SLJIT_UTIL_GLOBAL_LOCK */
-
-#else /* _WIN32 */
-
-#if (defined SLJIT_EXECUTABLE_ALLOCATOR && SLJIT_EXECUTABLE_ALLOCATOR)
-
-#include <pthread.h>
-
-static pthread_mutex_t allocator_mutex = PTHREAD_MUTEX_INITIALIZER;
-
-static SLJIT_INLINE void allocator_grab_lock(void)
-{
-	pthread_mutex_lock(&allocator_mutex);
-}
-
-static SLJIT_INLINE void allocator_release_lock(void)
-{
-	pthread_mutex_unlock(&allocator_mutex);
-}
-
-#endif /* SLJIT_EXECUTABLE_ALLOCATOR */
-
-#if (defined SLJIT_UTIL_GLOBAL_LOCK && SLJIT_UTIL_GLOBAL_LOCK)
-
-#include <pthread.h>
-
-static pthread_mutex_t global_mutex = PTHREAD_MUTEX_INITIALIZER;
-
-SLJIT_API_FUNC_ATTRIBUTE void SLJIT_CALL sljit_grab_lock(void)
-{
-	pthread_mutex_lock(&global_mutex);
-}
-
-SLJIT_API_FUNC_ATTRIBUTE void SLJIT_CALL sljit_release_lock(void)
-{
-	pthread_mutex_unlock(&global_mutex);
-}
-
-#endif /* SLJIT_UTIL_GLOBAL_LOCK */
-
-#endif /* _WIN32 */
-
-/* ------------------------------------------------------------------------ */
-/*  Stack                                                                   */
-/* ------------------------------------------------------------------------ */
-
-#if (defined SLJIT_UTIL_STACK && SLJIT_UTIL_STACK) || (defined SLJIT_EXECUTABLE_ALLOCATOR && SLJIT_EXECUTABLE_ALLOCATOR)
-
-#ifdef _WIN32
-#include "windows.h"
-#else
-/* Provides mmap function. */
-#include <sys/mman.h>
-/* For detecting the page size. */
-#include <unistd.h>
-
-#ifndef MAP_ANON
-
-#include <fcntl.h>
-
-/* Some old systems does not have MAP_ANON. */
-static sljit_si dev_zero = -1;
-
-#if (defined SLJIT_SINGLE_THREADED && SLJIT_SINGLE_THREADED)
-
-static SLJIT_INLINE sljit_si open_dev_zero(void)
-{
-	dev_zero = open("/dev/zero", O_RDWR);
-	return dev_zero < 0;
-}
-
-#else /* SLJIT_SINGLE_THREADED */
-
-#include <pthread.h>
-
-static pthread_mutex_t dev_zero_mutex = PTHREAD_MUTEX_INITIALIZER;
-
-static SLJIT_INLINE sljit_si open_dev_zero(void)
-{
-	pthread_mutex_lock(&dev_zero_mutex);
-	dev_zero = open("/dev/zero", O_RDWR);
-	pthread_mutex_unlock(&dev_zero_mutex);
-	return dev_zero < 0;
-}
-
-#endif /* SLJIT_SINGLE_THREADED */
-
-#endif
-
-#endif
-
-#endif /* SLJIT_UTIL_STACK || SLJIT_EXECUTABLE_ALLOCATOR */
-
-#if (defined SLJIT_UTIL_STACK && SLJIT_UTIL_STACK)
-
-/* Planning to make it even more clever in the future. */
-static sljit_sw sljit_page_align = 0;
-
-SLJIT_API_FUNC_ATTRIBUTE struct sljit_stack* SLJIT_CALL sljit_allocate_stack(sljit_uw limit, sljit_uw max_limit)
-{
-	struct sljit_stack *stack;
-	union {
-		void *ptr;
-		sljit_uw uw;
-	} base;
-#ifdef _WIN32
-	SYSTEM_INFO si;
-#endif
-
-	if (limit > max_limit || limit < 1)
-		return NULL;
-
-#ifdef _WIN32
-	if (!sljit_page_align) {
-		GetSystemInfo(&si);
-		sljit_page_align = si.dwPageSize - 1;
-	}
-#else
-	if (!sljit_page_align) {
-		sljit_page_align = sysconf(_SC_PAGESIZE);
-		/* Should never happen. */
-		if (sljit_page_align < 0)
-			sljit_page_align = 4096;
-		sljit_page_align--;
-	}
-#endif
-
-	/* Align limit and max_limit. */
-	max_limit = (max_limit + sljit_page_align) & ~sljit_page_align;
-
-	stack = (struct sljit_stack*)SLJIT_MALLOC(sizeof(struct sljit_stack));
-	if (!stack)
-		return NULL;
-
-#ifdef _WIN32
-	base.ptr = VirtualAlloc(NULL, max_limit, MEM_RESERVE, PAGE_READWRITE);
-	if (!base.ptr) {
-		SLJIT_FREE(stack);
-		return NULL;
-	}
-	stack->base = base.uw;
-	stack->limit = stack->base;
-	stack->max_limit = stack->base + max_limit;
-	if (sljit_stack_resize(stack, stack->base + limit)) {
-		sljit_free_stack(stack);
-		return NULL;
-	}
-#else
-#ifdef MAP_ANON
-	base.ptr = mmap(NULL, max_limit, PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANON, -1, 0);
-#else
-	if (dev_zero < 0) {
-		if (open_dev_zero()) {
-			SLJIT_FREE(stack);
-			return NULL;
-		}
-	}
-	base.ptr = mmap(NULL, max_limit, PROT_READ | PROT_WRITE, MAP_PRIVATE, dev_zero, 0);
-#endif
-	if (base.ptr == MAP_FAILED) {
-		SLJIT_FREE(stack);
-		return NULL;
-	}
-	stack->base = base.uw;
-	stack->limit = stack->base + limit;
-	stack->max_limit = stack->base + max_limit;
-#endif
-	stack->top = stack->base;
-	return stack;
-}
-
-#undef PAGE_ALIGN
-
-SLJIT_API_FUNC_ATTRIBUTE void SLJIT_CALL sljit_free_stack(struct sljit_stack* stack)
-{
-#ifdef _WIN32
-	VirtualFree((void*)stack->base, 0, MEM_RELEASE);
-#else
-	munmap((void*)stack->base, stack->max_limit - stack->base);
-#endif
-	SLJIT_FREE(stack);
-}
-
-SLJIT_API_FUNC_ATTRIBUTE sljit_sw SLJIT_CALL sljit_stack_resize(struct sljit_stack* stack, sljit_uw new_limit)
-{
-	sljit_uw aligned_old_limit;
-	sljit_uw aligned_new_limit;
-
-	if ((new_limit > stack->max_limit) || (new_limit < stack->base))
-		return -1;
-#ifdef _WIN32
-	aligned_new_limit = (new_limit + sljit_page_align) & ~sljit_page_align;
-	aligned_old_limit = (stack->limit + sljit_page_align) & ~sljit_page_align;
-	if (aligned_new_limit != aligned_old_limit) {
-		if (aligned_new_limit > aligned_old_limit) {
-			if (!VirtualAlloc((void*)aligned_old_limit, aligned_new_limit - aligned_old_limit, MEM_COMMIT, PAGE_READWRITE))
-				return -1;
-		}
-		else {
-			if (!VirtualFree((void*)aligned_new_limit, aligned_old_limit - aligned_new_limit, MEM_DECOMMIT))
-				return -1;
-		}
-	}
-	stack->limit = new_limit;
-	return 0;
-#else
-	if (new_limit >= stack->limit) {
-		stack->limit = new_limit;
-		return 0;
-	}
-	aligned_new_limit = (new_limit + sljit_page_align) & ~sljit_page_align;
-	aligned_old_limit = (stack->limit + sljit_page_align) & ~sljit_page_align;
-	/* If madvise is available, we release the unnecessary space. */
-#if defined(MADV_DONTNEED)
-	if (aligned_new_limit < aligned_old_limit)
-		madvise((void*)aligned_new_limit, aligned_old_limit - aligned_new_limit, MADV_DONTNEED);
-#elif defined(POSIX_MADV_DONTNEED)
-	if (aligned_new_limit < aligned_old_limit)
-		posix_madvise((void*)aligned_new_limit, aligned_old_limit - aligned_new_limit, POSIX_MADV_DONTNEED);
-#endif
-	stack->limit = new_limit;
-	return 0;
-#endif
-}
-
-#endif /* SLJIT_UTIL_STACK */
-
-#endif
diff --git a/src/extra/pcre/ucp.h b/src/extra/pcre/ucp.h
deleted file mode 100644
index d8b34bf..0000000
--- a/src/extra/pcre/ucp.h
+++ /dev/null
@@ -1,200 +0,0 @@
-/*************************************************
-*          Unicode Property Table handler        *
-*************************************************/
-
-#ifndef _UCP_H
-#define _UCP_H
-
-/* This file contains definitions of the property values that are returned by
-the UCD access macros. New values that are added for new releases of Unicode
-should always be at the end of each enum, for backwards compatibility.
-
-IMPORTANT: Note also that the specific numeric values of the enums have to be
-the same as the values that are generated by the maint/MultiStage2.py script,
-where the equivalent property descriptive names are listed in vectors.
-
-ALSO: The specific values of the first two enums are assumed for the table
-called catposstab in pcre_compile.c. */
-
-/* These are the general character categories. */
-
-enum {
-  ucp_C,     /* Other */
-  ucp_L,     /* Letter */
-  ucp_M,     /* Mark */
-  ucp_N,     /* Number */
-  ucp_P,     /* Punctuation */
-  ucp_S,     /* Symbol */
-  ucp_Z      /* Separator */
-};
-
-/* These are the particular character categories. */
-
-enum {
-  ucp_Cc,    /* Control */
-  ucp_Cf,    /* Format */
-  ucp_Cn,    /* Unassigned */
-  ucp_Co,    /* Private use */
-  ucp_Cs,    /* Surrogate */
-  ucp_Ll,    /* Lower case letter */
-  ucp_Lm,    /* Modifier letter */
-  ucp_Lo,    /* Other letter */
-  ucp_Lt,    /* Title case letter */
-  ucp_Lu,    /* Upper case letter */
-  ucp_Mc,    /* Spacing mark */
-  ucp_Me,    /* Enclosing mark */
-  ucp_Mn,    /* Non-spacing mark */
-  ucp_Nd,    /* Decimal number */
-  ucp_Nl,    /* Letter number */
-  ucp_No,    /* Other number */
-  ucp_Pc,    /* Connector punctuation */
-  ucp_Pd,    /* Dash punctuation */
-  ucp_Pe,    /* Close punctuation */
-  ucp_Pf,    /* Final punctuation */
-  ucp_Pi,    /* Initial punctuation */
-  ucp_Po,    /* Other punctuation */
-  ucp_Ps,    /* Open punctuation */
-  ucp_Sc,    /* Currency symbol */
-  ucp_Sk,    /* Modifier symbol */
-  ucp_Sm,    /* Mathematical symbol */
-  ucp_So,    /* Other symbol */
-  ucp_Zl,    /* Line separator */
-  ucp_Zp,    /* Paragraph separator */
-  ucp_Zs     /* Space separator */
-};
-
-/* These are grapheme break properties. Note that the code for processing them
-assumes that the values are less than 16. If more values are added that take
-the number to 16 or more, the code will have to be rewritten. */
-
-enum {
-  ucp_gbCR,                /*  0 */
-  ucp_gbLF,                /*  1 */
-  ucp_gbControl,           /*  2 */
-  ucp_gbExtend,            /*  3 */
-  ucp_gbPrepend,           /*  4 */
-  ucp_gbSpacingMark,       /*  5 */
-  ucp_gbL,                 /*  6 Hangul syllable type L */
-  ucp_gbV,                 /*  7 Hangul syllable type V */
-  ucp_gbT,                 /*  8 Hangul syllable type T */
-  ucp_gbLV,                /*  9 Hangul syllable type LV */
-  ucp_gbLVT,               /* 10 Hangul syllable type LVT */
-  ucp_gbRegionalIndicator, /* 11 */
-  ucp_gbOther              /* 12 */
-};
-
-/* These are the script identifications. */
-
-enum {
-  ucp_Arabic,
-  ucp_Armenian,
-  ucp_Bengali,
-  ucp_Bopomofo,
-  ucp_Braille,
-  ucp_Buginese,
-  ucp_Buhid,
-  ucp_Canadian_Aboriginal,
-  ucp_Cherokee,
-  ucp_Common,
-  ucp_Coptic,
-  ucp_Cypriot,
-  ucp_Cyrillic,
-  ucp_Deseret,
-  ucp_Devanagari,
-  ucp_Ethiopic,
-  ucp_Georgian,
-  ucp_Glagolitic,
-  ucp_Gothic,
-  ucp_Greek,
-  ucp_Gujarati,
-  ucp_Gurmukhi,
-  ucp_Han,
-  ucp_Hangul,
-  ucp_Hanunoo,
-  ucp_Hebrew,
-  ucp_Hiragana,
-  ucp_Inherited,
-  ucp_Kannada,
-  ucp_Katakana,
-  ucp_Kharoshthi,
-  ucp_Khmer,
-  ucp_Lao,
-  ucp_Latin,
-  ucp_Limbu,
-  ucp_Linear_B,
-  ucp_Malayalam,
-  ucp_Mongolian,
-  ucp_Myanmar,
-  ucp_New_Tai_Lue,
-  ucp_Ogham,
-  ucp_Old_Italic,
-  ucp_Old_Persian,
-  ucp_Oriya,
-  ucp_Osmanya,
-  ucp_Runic,
-  ucp_Shavian,
-  ucp_Sinhala,
-  ucp_Syloti_Nagri,
-  ucp_Syriac,
-  ucp_Tagalog,
-  ucp_Tagbanwa,
-  ucp_Tai_Le,
-  ucp_Tamil,
-  ucp_Telugu,
-  ucp_Thaana,
-  ucp_Thai,
-  ucp_Tibetan,
-  ucp_Tifinagh,
-  ucp_Ugaritic,
-  ucp_Yi,
-  /* New for Unicode 5.0: */
-  ucp_Balinese,
-  ucp_Cuneiform,
-  ucp_Nko,
-  ucp_Phags_Pa,
-  ucp_Phoenician,
-  /* New for Unicode 5.1: */
-  ucp_Carian,
-  ucp_Cham,
-  ucp_Kayah_Li,
-  ucp_Lepcha,
-  ucp_Lycian,
-  ucp_Lydian,
-  ucp_Ol_Chiki,
-  ucp_Rejang,
-  ucp_Saurashtra,
-  ucp_Sundanese,
-  ucp_Vai,
-  /* New for Unicode 5.2: */
-  ucp_Avestan,
-  ucp_Bamum,
-  ucp_Egyptian_Hieroglyphs,
-  ucp_Imperial_Aramaic,
-  ucp_Inscriptional_Pahlavi,
-  ucp_Inscriptional_Parthian,
-  ucp_Javanese,
-  ucp_Kaithi,
-  ucp_Lisu,
-  ucp_Meetei_Mayek,
-  ucp_Old_South_Arabian,
-  ucp_Old_Turkic,
-  ucp_Samaritan,
-  ucp_Tai_Tham,
-  ucp_Tai_Viet,
-  /* New for Unicode 6.0.0: */
-  ucp_Batak,
-  ucp_Brahmi,
-  ucp_Mandaic,
-  /* New for Unicode 6.1.0: */
-  ucp_Chakma,
-  ucp_Meroitic_Cursive,
-  ucp_Meroitic_Hieroglyphs,
-  ucp_Miao,
-  ucp_Sharada,
-  ucp_Sora_Sompeng,
-  ucp_Takri
-};
-
-#endif
-
-/* End of ucp.h */
diff --git a/src/extra/tre/Makefile.in b/src/extra/tre/Makefile.in
index a5fab6d..be568e1 100644
--- a/src/extra/tre/Makefile.in
+++ b/src/extra/tre/Makefile.in
@@ -49,8 +49,8 @@ R: Makefile @BUILD_TRE_TRUE@
 	@BUILD_TRE_TRUE@ @$(MAKE) $(noinst_LIBRARIES)
 
 libtre.a: $(libtre_a_OBJECTS)
-	rm -f $@
-	$(AR) cr $@ $(libtre_a_OBJECTS)
+	@rm -f $@
+	$(AR) -cr $@ $(libtre_a_OBJECTS)
 	$(RANLIB) $@
 
 mostlyclean: clean
diff --git a/src/extra/tre/Makefile.win b/src/extra/tre/Makefile.win
index 4fe0af2..45b1182 100644
--- a/src/extra/tre/Makefile.win
+++ b/src/extra/tre/Makefile.win
@@ -1,9 +1,9 @@
 #-*- Makefile -*-
 include ../../gnuwin32/MkRules
 
-DEFS=-DHAVE_CONFIG_H
+DEFS = -DHAVE_CONFIG_H
 
-CPPFLAGS=-I../../include -I. $(DEFS)
+CPPFLAGS = -I../../include -I. $(DEFS)
 
 ## done this way for parallel make
 all:
@@ -24,7 +24,7 @@ distclean: clean
 	@$(RM) libtre.a
 
 # Dependencies
-DEPS=$(CSOURCES:.c=.d)
+DEPS = $(CSOURCES:.c=.d)
 
 makeMakedeps: $(DEPS)
 	@$(RM) Makedeps
diff --git a/src/extra/tre/R_changes b/src/extra/tre/R_changes
index ce067e2..e4b592a 100644
--- a/src/extra/tre/R_changes
+++ b/src/extra/tre/R_changes
@@ -3,9 +3,9 @@ config.h.
 
 We have remapped the POSIX entry points with a tre_ suffix: without
 it there was confusion with entry points in OS libraries on some OSes
-(e.g. Mac OS X).
+(e.g. macOS).
 
-Pro tem alloca has been disabled: the declarations used do not work on
+alloca has been disabled: the declarations used do not work on
 Windows, and most likely not on FreeBSD.
 
 The way we compile it, TRE works internally in one of three modes
@@ -48,4 +48,6 @@ Nov 2011: incorporated minor fixes from https://github.com/GerHobbelt/libtre
 (see http://laurikari.net/tre/website-issues-and-future-plans/#comments).
 
 Oct 2014: fixed R bug PR#16009 by copying the class member of a LITERAL
-in tre_copy_ast.
\ No newline at end of file
+in tre_copy_ast.
+
+Nov 2014: changed tre_version() to report this is a modified version.
diff --git a/src/extra/tre/tre-compile.c b/src/extra/tre/tre-compile.c
index d9fa331..4ea8874 100644
--- a/src/extra/tre/tre-compile.c
+++ b/src/extra/tre/tre-compile.c
@@ -2267,9 +2267,9 @@ tre_version(void)
       (void) tre_config(TRE_CONFIG_VERSION, &version);
 	  assert(strlen(version) < 200);
 #if defined(_MSC_VER)
-	  (void) _snprintf(str, sizeof(str), "TRE %s (BSD)", version);
+	  (void) _snprintf(str, sizeof(str), "TRE %s R_fixes (BSD)", version);
 #else
-	  (void) snprintf(str, sizeof(str), "TRE %s (BSD)", version);
+	  (void) snprintf(str, sizeof(str), "TRE %s R_fixes (BSD)", version);
 #endif
     }
   return str;
diff --git a/src/extra/tre/tre-internal.h b/src/extra/tre/tre-internal.h
index 2aa68df..4b91ce1 100644
--- a/src/extra/tre/tre-internal.h
+++ b/src/extra/tre/tre-internal.h
@@ -48,7 +48,21 @@
 
 /* Wide characters. */
 typedef wint_t tre_cint_t;
-#define TRE_CHAR_MAX WCHAR_MAX
+/* Workaround problem seen on AIX, (2010 & 2015), e.g.,
+    https://stat.ethz.ch/pipermail/r-devel/2015-October/071902.html
+  WCHAR_MAX = UINT32_MAX on AIX and that is "not possible to work"
+  Solaris-sparcv9   WCHAR_MAX = INT32_MAX
+  Linux amd64       WCHAR_MAX = INT32_MAX
+*/
+/*
+   [U]INT32_MAX need to be declared: this is a C99 header which we assume
+ */
+#include <stdint.h>
+#if WCHAR_MAX == UINT32_MAX
+# define TRE_CHAR_MAX INT32_MAX
+#else
+# define TRE_CHAR_MAX WCHAR_MAX
+#endif
 
 #ifdef TRE_MULTIBYTE
 #define TRE_MB_CUR_MAX MB_CUR_MAX
diff --git a/src/extra/tre/tre-match-approx.c b/src/extra/tre/tre-match-approx.c
index f08cd0f..76f0b66 100644
--- a/src/extra/tre/tre-match-approx.c
+++ b/src/extra/tre/tre-match-approx.c
@@ -793,10 +793,10 @@ tre_tnfa_run_approx(const tre_tnfa_t *tnfa, const void *string, int len,
 			       default_params);
 
 	      /* Set the costs after this transition. */
-		memcpy(&reach_next[dest_id].costs,
-		       reach[id].costs,
-		       sizeof(reach[id].costs[0][0])
-		       * TRE_M_LAST * (depth + 1));
+	      memcpy(&reach_next[dest_id].costs,
+		     reach[id].costs,
+		     sizeof(reach[id].costs[0][0])
+		     * TRE_M_LAST * (depth + 1));
 	      reach_next[dest_id].costs[depth][TRE_M_COST] = cost;
 	      reach_next[dest_id].costs[depth][TRE_M_NUM_SUBST] += err;
 	      reach_next[dest_id].costs[depth][TRE_M_NUM_ERR] += err;
diff --git a/src/extra/trio/compat.c b/src/extra/trio/compat.c
index a3a9737..b042c3a 100644
--- a/src/extra/trio/compat.c
+++ b/src/extra/trio/compat.c
@@ -1,5 +1,4 @@
 /* Compatibility wrapper for R */
-
 #include <stdio.h>
 #include <stdlib.h>
 #include <stdarg.h>
@@ -62,6 +61,10 @@ int vfprintf(FILE *file, const char *format, va_list args)
     return trio_vfprintf(file, format, args);
 }
 
+/* The test below excludes both 32 and 64 bit Windows */
+#ifndef _WIN32 
+/* These are needed as MinGW's stdio.h has inline snprintf and vnsprintf.
+   Include the trioremap.h header file to get the replacements */
 int snprintf(char *buffer, size_t max, const char *format, ...)
 {
     int res;
@@ -77,9 +80,6 @@ int vsnprintf(char *buffer, size_t bufferSize, const char *format, va_list args)
     return trio_vsnprintf(buffer, bufferSize, format, args);
 }
 
-#ifndef _W64
-/* This is needed as MinGW's stdio.h has an inline vnsprintf mapping to
-   _vsnprintf: MinGW-w64's maps to __imp__vsnprintf */
 int _vsnprintf(char *buffer, size_t bufferSize, const char *format, va_list args)
 {
     return trio_vsnprintf(buffer, bufferSize, format, args);
diff --git a/src/extra/tzone/Make.zi b/src/extra/tzone/Make.zi
index a93a906..1e2cc78 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 = 2014c
+VERSION = 2017a
 TZDIR = zoneinfo
 TZTMP = tz
 TARFILE = tzdata$(VERSION).tar.gz
diff --git a/src/extra/tzone/Makefile.in b/src/extra/tzone/Makefile.in
index e317b13..22c3011 100644
--- a/src/extra/tzone/Makefile.in
+++ b/src/extra/tzone/Makefile.in
@@ -24,7 +24,7 @@ R all: Makefile
 
 libtz.a: $(OBJECTS)
 	@rm -f $@
-	$(AR) cr $@ $(OBJECTS)
+	$(AR) -cr $@ $(OBJECTS)
 	@$(RANLIB) $@
 
 
diff --git a/src/extra/tzone/Notes b/src/extra/tzone/Notes
index ae148ba..42f9a37 100644
--- a/src/extra/tzone/Notes
+++ b/src/extra/tzone/Notes
@@ -12,23 +12,24 @@ strftime.c is a stripped-down version of that from tzcode, using the
 system version for locale-dependent day/month/am/pm names.
 
 
-zoneinfo.zip was formed by installing tzdata on a system with zic, and
+zoneinfo.zip is formed by installing tzdata on a system with zic, and
 zipping up the results, after adding a file VERSION giving the
-version.  It should be possible to build the compiled databases on
-Windows, but zic.c assumes links and so would need work.  (The binary
-databases are byte streams, and so do not depend on the architecture.
-There are some comments about whether time_t is signed, which it is on
-all sensible platforms.)
+version.  (The binary databases are byte streams, and so do not depend
+on the architecture.  There are some comments about whether time_t is
+signed, which it is on all sensible platforms.  This is only used with
+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=2014f
+make -f Make.zi VERSION=2016i
 
 for the appropriate version.  If zic is not on the path, use something like
 
-make -f Make.zi VERSION=2014f ZIC=/usr/sbin/zic
+make -f Make.zi VERSION=2016i 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 does not
-to suffice on OS X, whose zic seems to be 32-bit.
+or the catalogs will be confined to 1902-2038.  And even that did not
+suffice on macOS.  As a sanity check, the size of zoneinfo.zip should
+be about 400KB if 64-bit: a 32-bit version will be about 280KB.
+
diff --git a/src/extra/tzone/localtime.c b/src/extra/tzone/localtime.c
index a0c8695..889b023 100644
--- a/src/extra/tzone/localtime.c
+++ b/src/extra/tzone/localtime.c
@@ -1,6 +1,6 @@
 /*
  *  R : A Computer Language for Statistical Data Analysis
- *  Modifications copyright (C) 2007-2013  The R Core Team
+ *  Modifications copyright (C) 2007-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
@@ -14,7 +14,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  */
 
 
@@ -38,9 +38,19 @@ use of tm_zone and tm_gmtoff on all platforms.
 #include <string.h>
 #include <limits.h>	/* for CHAR_BIT et al. */
 
-#ifdef __GLIBC__
-// to get tm_zone, tm_gmtoff defined
-# define _BSD_SOURCE
+// To get tm_zone, tm_gmtoff defined in glibc
+// (although this file is not usually used there).
+// Some other header, e.g. math.h, might define the macro.
+#if defined HAVE_FEATURES_H
+# include <features.h>
+# ifdef __GNUC_PREREQ
+#  if __GNUC_PREREQ(2,20) && !defined(_DEFAULT_SOURCE_)
+#   define _DEFAULT_SOURCE 1
+#  endif
+# endif
+#endif
+#if defined(HAVE_GLIBC2) && !defined(_DEFAULT_SOURCE_) && !defined(_BSD_SOURCE)
+# define _BSD_SOURCE 1
 #endif
 #include <time.h>
 
@@ -69,8 +79,16 @@ use of tm_zone and tm_gmtoff on all platforms.
 #endif /* !defined FALSE */
 
 /* merged from private.h */
+#ifndef TYPE_BIT
 #define TYPE_BIT(type)	(sizeof (type) * CHAR_BIT)
+#endif /* !defined TYPE_BIT */
+
+#ifndef TYPE_SIGNED
 #define TYPE_SIGNED(type) (((type) -1) < 0)
+#endif /* !defined TYPE_SIGNED */
+
+#define TWOS_COMPLEMENT(t) ((t) ~ (t) 0 < 0)
+
 #define GRANDPARENTED	"Local time zone must be set--see zic manual page"
 #define YEARSPERREPEAT	 400	/* years before a Gregorian repeat */
 #define AVGSECSPERYEAR	 31556952L
@@ -78,15 +96,20 @@ use of tm_zone and tm_gmtoff on all platforms.
 #define SECSPERREPEAT_BITS  34	/* ceil(log2(SECSPERREPEAT)) */
 #define is_digit(c) ((unsigned)(c) - '0' <= 9)
 #define INITIALIZE(x) (x = 0)
-/* The minimum and maximum finite time values.  */
-static time_t const time_t_min =
-  (TYPE_SIGNED(time_t)
-   ? (time_t) -1 << (CHAR_BIT * sizeof (time_t) - 1)
-   : 0);
-static time_t const time_t_max =
-  (TYPE_SIGNED(time_t)
-   ? - (~ 0 < 0) - ((time_t) -1 << (CHAR_BIT * sizeof (time_t) - 1))
-   : -1);
+
+/* Max and min values of the integer type T, of which only the bottom
+   B bits are used, and where the highest-order used bit is considered
+   to be a sign bit if T is signed.  */
+#define MAXVAL(t, b)						\
+  ((t) (((t) 1 << ((b) - 1 - TYPE_SIGNED(t)))			\
+	- 1 + ((t) 1 << ((b) - 1 - TYPE_SIGNED(t)))))
+#define MINVAL(t, b)						\
+  ((t) (TYPE_SIGNED(t) ? - TWOS_COMPLEMENT(t) - MAXVAL(t, b) : 0))
+
+/* The minimum and maximum finite time values.  This assumes no padding.  */
+static time_t const time_t_min = MINVAL(time_t, TYPE_BIT(time_t));
+static time_t const time_t_max = MAXVAL(time_t, TYPE_BIT(time_t));
+
 
 #include "tzfile.h"
 
@@ -257,6 +280,8 @@ static struct state	gmtmem;
 #define lclptr		(&lclmem)
 #define gmtptr		(&gmtmem)
 
+/* These are abbreviated names, so 255 should be ample.
+   But this was not checked in strcpy below. */
 #ifndef TZ_STRLEN_MAX
 #define TZ_STRLEN_MAX 255
 #endif /* !defined TZ_STRLEN_MAX */
@@ -730,10 +755,10 @@ getsecs(const char *strp, int_fast32_t *const secsp)
     int	num;
 
     /*
-    ** `HOURSPERDAY * DAYSPERWEEK - 1' allows quasi-Posix rules like
+    ** 'HOURSPERDAY * DAYSPERWEEK - 1' allows quasi-Posix rules like
     ** "M10.4.6/26", which does not conform to Posix,
     ** but which specifies the equivalent of
-    ** ``02:00 on the first Sunday on or after 23 Oct''.
+    ** "02:00 on the first Sunday on or after 23 Oct".
     */
     strp = getnum(strp, &num, 0, HOURSPERDAY * DAYSPERWEEK - 1);
     if (strp == NULL)
@@ -747,7 +772,7 @@ getsecs(const char *strp, int_fast32_t *const secsp)
 	*secsp += num * SECSPERMIN;
 	if (*strp == ':') {
 	    ++strp;
-	    /* `SECSPERMIN' allows for leap seconds. */
+	    /* 'SECSPERMIN' allows for leap seconds.  */
 	    strp = getnum(strp, &num, 0, SECSPERMIN);
 	    if (strp == NULL)
 		return NULL;
@@ -1199,8 +1224,11 @@ tzset(void)
     if (lcl_is_set > 0 && strcmp(lcl_TZname, name) == 0)
 	return;
     lcl_is_set = strlen(name) < sizeof lcl_TZname;
-    if (lcl_is_set)
-	(void) strcpy(lcl_TZname, name);
+    /* R change: was strcpy before. */
+    if (lcl_is_set) {
+	(void) strncpy(lcl_TZname, name, TZ_STRLEN_MAX);
+	lcl_TZname[TZ_STRLEN_MAX] = '\0';
+    }
 
     if (*name == '\0') {
 	/*
@@ -1718,15 +1746,8 @@ time2sub(stm *const tmp,
     /*
     ** Do a binary search (this works whatever time_t's type is).
     */
-    if (!TYPE_SIGNED(time_t)) {
-	lo = 0;
-	hi = lo - 1;
-    } else {
-	lo = 1;
-	for (int i = 0; i < (int) TYPE_BIT(time_t) - 1; ++i)
-	    lo *= 2;
-	hi = -(lo + 1);
-    }
+    lo = time_t_min;
+    hi = time_t_max;
     for ( ; ; ) {
 	t = lo / 2 + hi / 2;
 	if (t < lo)
diff --git a/src/extra/tzone/registryTZ.c b/src/extra/tzone/registryTZ.c
index 4793def..47ea25f 100644
--- a/src/extra/tzone/registryTZ.c
+++ b/src/extra/tzone/registryTZ.c
@@ -1,6 +1,6 @@
 /*
  *  R : A Computer Language for Statistical Data Analysis
- *  Copyright (C) 2007-8   The R Core Team
+ *  Copyright (C) 2007-2015   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
@@ -14,7 +14,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  */
 
 #include <string.h>
@@ -22,6 +22,7 @@
 /*
   From http://unicode.org/cldr/data/diff/supplemental/windows_tzid.html
   Added some entries from the XP Registry (and checked on Vista).
+  Table updated from Unicode in August 2015.
  */
 const static struct {
     const wchar_t * const reg;
@@ -284,6 +285,30 @@ const static struct {
     { L"Yekaterinburg Standard Time", "Asia/Yekaterinburg" },
     { L"Yerevan Standard Time", "Asia/Yerevan" },
     { L"Yukon Standard Time", "America/Yakutat" },
+
+/* 2015 additions, seen in then-current Windows 7 */
+    { L"Argentina Standard Time", "America/Buenos_Aires" },
+    { L"Bahia Standard Time", "America/Bahia" },
+    { L"Belarus Standard Time", "Europe/Minsk" },
+    { L"Kaliningrad Standard Time", "Europe/Kaliningrad" },
+    { L"Kamchatka Standard Time", "Asia/Kamchatka" },
+    { L"Libya Standard Time", "Africa/Tripoli" },
+    { L"Morocco Standard Time", "Africa/Casablanca" },
+    { L"Syria Standard Time", "Asia/Damascus" },
+    { L"Ulaanbaatar Standard Time", "Asia/Ulaanbaatar" },
+    // See https://support.microsoft.com/en-gb/gp/cp_dst
+    { L"Russia Time Zone 1", "Europe/Kaliningrad" },
+    { L"Russia Time Zone 2", "Europe/Moscow" },
+    { L"Russia Time Zone 3", "Europe/Samara" },
+    { L"Russia Time Zone 4", "Asia/Yekaterinburg" },
+    { L"Russia Time Zone 5", "Asia/Novosibirsk" },
+    { L"Russia Time Zone 6", "Asia/Krasnoyarsk" },
+    { L"Russia Time Zone 7", "Asia/Irtutsk" },
+    { L"Russia Time Zone 8", "Asia/Yakutsk" },
+    { L"Russia Time Zone 9", "Asia/Magadan" },
+    { L"Russia Time Zone 10", "Asia/Srednekolymsk" },
+    { L"Russia Time Zone 11", "Asia/Kamchatka" },
+
     { NULL,  "" }
 };
 
@@ -373,10 +398,15 @@ static char StandardName[64], DaylightName[64], Olson[64] = "";
 const char *getTZinfo(void)
 {
     if(!Olson[0]) {
-	GetTimeZoneInformation(&tzi);
-	wcstombs(StandardName, tzi.StandardName, 64);
-	wcstombs(DaylightName, tzi.DaylightName, 64);
-	strcpy(Olson, reg2Olson(tzi.StandardName));
+	const char *p = getenv("TZ");
+	if(p) {
+	    strcpy(Olson, p);	    
+	} else {
+	    GetTimeZoneInformation(&tzi);
+	    wcstombs(StandardName, tzi.StandardName, 64);
+	    wcstombs(DaylightName, tzi.DaylightName, 64);
+	    strcpy(Olson, reg2Olson(tzi.StandardName));
+	}
 #ifdef DEBUG
 	printf("names %s, %s\n", StandardName, DaylightName);
 	printf("TZ = %s\n", Olson);
diff --git a/src/extra/tzone/strftime.c b/src/extra/tzone/strftime.c
index bcaf80e..24fa6b3 100644
--- a/src/extra/tzone/strftime.c
+++ b/src/extra/tzone/strftime.c
@@ -15,7 +15,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  */
 
 /*
diff --git a/src/extra/tzone/tzfile.h b/src/extra/tzone/tzfile.h
index 5a550d9..19af45e 100644
--- a/src/extra/tzone/tzfile.h
+++ b/src/extra/tzone/tzfile.h
@@ -24,7 +24,7 @@
 #endif /* !defined TZDIR */
 
 #ifndef TZDEFAULT
-#define TZDEFAULT	"localtime"
+#define TZDEFAULT	"UTC" // needs to be a valid timezone, PR#16503
 #endif /* !defined TZDEFAULT */
 
 /* We don't ship posixrules, which is usually a link to a USA timezeone.
@@ -115,8 +115,9 @@ struct tzhead {
 #endif /* !defined NOSOLAR */
 #endif /* !defined TZ_MAX_TYPES */
 
+// increased from 50, http://mm.icann.org/pipermail/tz/2015-August/022623.html
 #ifndef TZ_MAX_CHARS
-#define TZ_MAX_CHARS	50	/* Maximum number of abbreviation characters */
+#define TZ_MAX_CHARS	100	/* Maximum number of abbreviation characters */
 				/* (limited by what unsigned chars can hold) */
 #endif /* !defined TZ_MAX_CHARS */
 
diff --git a/src/extra/tzone/zoneinfo.zip b/src/extra/tzone/zoneinfo.zip
index 3bc7466..a172df4 100644
Binary files a/src/extra/tzone/zoneinfo.zip and b/src/extra/tzone/zoneinfo.zip differ
diff --git a/src/extra/win_iconv/Makefile.win b/src/extra/win_iconv/Makefile.win
index e104ef3..ce7a498 100644
--- a/src/extra/win_iconv/Makefile.win
+++ b/src/extra/win_iconv/Makefile.win
@@ -8,10 +8,10 @@ all: makeMakedeps install
 install: Riconv.dll
 	@cp Riconv.dll ../../../$(BINDIR)
 
-CPPFLAGS=-I../../include
+CPPFLAGS = -I../../include
 
-CSOURCES= win_iconv.c
-OBJS=$(CSOURCES:.c=.o)
+CSOURCES =  win_iconv.c
+OBJS = $(CSOURCES:.c=.o)
 
 Riconv.dll: $(OBJS)
 
@@ -21,7 +21,7 @@ distclean: clean
 	@$(RM) Riconv.dll
 
 # Dependencies
-DEPS=$(CSOURCES:.c=.d)
+DEPS = $(CSOURCES:.c=.d)
 
 makeMakedeps: $(DEPS)
 	@$(RM) Makedeps
diff --git a/src/extra/win_iconv/win_iconv.c b/src/extra/win_iconv/win_iconv.c
index 8728aee..4591685 100644
--- a/src/extra/win_iconv/win_iconv.c
+++ b/src/extra/win_iconv/win_iconv.c
@@ -11,8 +11,10 @@
  * be used for encoding validation purpose.
  */
 
-/* Primary source is apparently
+/* Primary source was
    http://code.google.com/p/win-iconv/source/checkout
+   but now (Aug 2015)
+   https://raw.githubusercontent.com/win-iconv/win-iconv/master/win_iconv.c
 
    Original R version from http://www.gtk.org/download-windows.html
 
@@ -469,7 +471,7 @@ static struct {
     {10002, "x-mac-chinesetrad"}, /* MAC Traditional Chinese (Big5); Chinese Traditional (Mac) */
     {10003, "x-mac-korean"}, /* Korean (Mac) */
     {10004, "x-mac-arabic"}, /* Arabic (Mac) */
-    {10004, "macarabic"}, /* Arabic (Mac) */
+    {10004, "macarabic"}, /* Arabic (Mac), no longer in the master */
     {10005, "x-mac-hebrew"}, /* Hebrew (Mac) */
     {10005, "machebrew"},
     {10006, "x-mac-greek"}, /* Greek (Mac) */
@@ -543,7 +545,7 @@ static struct {
     /* latin2 etc are R additions */
     {28592, "latin2"},
     {28593, "iso-8859-3"}, /* ISO 8859-3 Latin 3 */
-    {28593, "iso8859-3"},
+    {28593, "iso8859-3"}, /* ISO 8859-3 Latin 3 */
     {28593, "iso_8859-3"},
     {28593, "iso_8859_3"},
     {28593, "latin3"},
@@ -606,6 +608,7 @@ static struct {
     {51932, "euc-jp"}, /* EUC Japanese */
     {51936, "EUC-CN"}, /* EUC Simplified Chinese; Chinese Simplified (EUC) */
     {51949, "euc-kr"}, /* EUC Korean */
+    // R additions
     {51932, "eucjp"},
     {51936, "EUCCN"},
     {51949, "euckr"},
@@ -756,6 +759,7 @@ iconv_open(const char *tocode, const char *fromcode)
     cd = (rec_iconv_t *)calloc(1, sizeof(rec_iconv_t));
     if (cd == NULL)
     {
+	// Setting errno is R addition
 	errno = ENOMEM;
 	return (iconv_t)(-1);
     }
@@ -767,6 +771,7 @@ iconv_open(const char *tocode, const char *fromcode)
 	return (iconv_t)cd;
 
     free(cd);
+    // setting errno is R addition
     errno = EINVAL;
     return (iconv_t)(-1);
 }
@@ -942,6 +947,8 @@ make_csconv(const char *_name, csconv_t *cv)
     char *name;
     char *p;
 
+    // original uses local strndup here, but copies all the string.
+    // encoding names are never very long, so could use a stack buffer
     name = strdup(_name);
     if (name == NULL)
 	return FALSE;
@@ -1111,7 +1118,7 @@ mbtowc_flags(int codepage)
 /*
  * Check if codepage is one those for which the lpUsedDefaultChar
  * parameter to WideCharToMultiByte() must be NULL.  The docs in
- * Platform SDK for for Windows Server 2003 R2 claims that this is the
+ * Platform SDK for Windows Server 2003 R2 claims that this is the
  * list below, while the MSDN docs for MSVS2008 claim that it is only
  * for 65000 (UTF-7) and 65001 (UTF-8). This time the earlier Platform
  * SDK seems to be correct, at least for XP.
@@ -1805,6 +1812,7 @@ iso2022jp_flush(csconv_t *cv, uchar *buf, int bufsize)
     return 0;
 }
 
+// R addition
 void iconvlist (int (*do_one) (unsigned int namescount,
 			       const char * const * names,
 			       void* data),
diff --git a/src/extra/xdr/Makefile.in b/src/extra/xdr/Makefile.in
index 428dfbe..c449a57 100644
--- a/src/extra/xdr/Makefile.in
+++ b/src/extra/xdr/Makefile.in
@@ -44,8 +44,8 @@ R: Makedeps
 	@$(MAKE) $(noinst_LIBRARIES)
 
 libxdr.a: $(libxdr_a_OBJECTS)
-	rm -f $@
-	$(AR) cr $@ $(libxdr_a_OBJECTS)
+	@rm -f $@
+	$(AR) -cr $@ $(libxdr_a_OBJECTS)
 	$(RANLIB) $@
 
 
diff --git a/src/extra/xdr/Makefile.win b/src/extra/xdr/Makefile.win
index a42fe66..96b7ebf 100644
--- a/src/extra/xdr/Makefile.win
+++ b/src/extra/xdr/Makefile.win
@@ -1,12 +1,9 @@
 #-*- Makefile -*-
 include ../../gnuwin32/MkRules
 
-DEFS=-DWIN32 -DHAVE_CONFIG_H
-ifdef LEA_MALLOC
-DEFS+=-DLEA_MALLOC
-endif
+DEFS = -DWIN32 -DHAVE_CONFIG_H
 
-CPPFLAGS=-I. -I../../include $(DEFS)
+CPPFLAGS = -I. -I../../include $(DEFS)
 
 all: libxdr.a
 
diff --git a/src/extra/xdr/rpc/types.h b/src/extra/xdr/rpc/types.h
index 28d7056..bc51ff3 100644
--- a/src/extra/xdr/rpc/types.h
+++ b/src/extra/xdr/rpc/types.h
@@ -62,7 +62,7 @@
 #if !defined(_WIN32) && !defined(macintosh) && !defined(__CYGWIN__)
 #include <stdlib.h> // for malloc
 #endif
-#if defined(_WIN32) && defined(LEA_MALLOC)
+#if defined(_WIN32)
 #include <stddef.h>
 extern void *Rm_malloc(size_t n);
 extern void Rm_free(void * p);
diff --git a/src/extra/xz/Makefile.in b/src/extra/xz/Makefile.in
deleted file mode 100644
index e428a1e..0000000
--- a/src/extra/xz/Makefile.in
+++ /dev/null
@@ -1,87 +0,0 @@
-#
-# ${R_HOME}/src/extra/xz/Makefile
-
-VPATH = @srcdir@
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
-
-top_builddir = ../../..
-subdir = src/extra/xz
-R_HOME = $(top_builddir)
-
-include $(top_builddir)/Makeconf
-
-LZMA_CPPFLAGS = -I$(srcdir)/api
-ALL_CPPFLAGS = $(LZMA_CPPFLAGS) $(R_XTRA_CPPFLAGS) $(CPPFLAGS) $(DEFS)
-
-SOURCES = \
- alone_decoder.c alone_encoder.c arm.c armthumb.c auto_decoder.c \
- block_buffer_decoder.c block_buffer_encoder.c block_decoder.c \
- block_encoder.c block_header_decoder.c block_header_encoder.c block_util.c \
- check.c common.c crc32_fast.c crc32_table.c \
- crc64_fast.c crc64_table.c delta_common.c delta_decoder.c \
- delta_encoder.c easy_buffer_encoder.c easy_decoder_memusage.c easy_encoder.c \
- easy_encoder_memusage.c easy_preset.c fastpos_table.c \
- filter_buffer_decoder.c filter_buffer_encoder.c filter_common.c \
- filter_decoder.c filter_encoder.c filter_flags_decoder.c \
- filter_flags_encoder.c ia64.c index.c index_decoder.c index_encoder.c \
- index_hash.c lz_decoder.c lz_encoder.c lz_encoder_mf.c lzma2_decoder.c \
- lzma2_encoder.c lzma_decoder.c lzma_encoder.c lzma_encoder_optimum_fast.c \
- lzma_encoder_optimum_normal.c lzma_encoder_presets.c powerpc.c \
- price_table.c sha256.c simple_coder.c simple_decoder.c \
- simple_encoder.c sparc.c stream_buffer_decoder.c stream_buffer_encoder.c \
- stream_decoder.c stream_encoder.c stream_flags_common.c \
- stream_flags_decoder.c stream_flags_encoder.c \
- vli_decoder.c vli_encoder.c vli_size.c x86.c
-
-OBJECTS = $(SOURCES:.c=.o)
- at WANT_R_SHLIB_TRUE@ALL_CFLAGS = $(ALL_CFLAGS_LO) @C_VISIBILITY@
-
-distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
-DISTFILES = Makefile.in Makefile.win R_changes
-noinst_LIBRARIES = liblzma.a
-liblzma_a_SOURCES = $(SOURCES)
-liblzma_a_OBJECTS = $(OBJECTS)
-SUBDIRS_WITH_NO_BUILD = \
-  api check common delta lz lzma rangecoder simple
-
-all: @BUILD_XZ_TRUE@ R
-
-Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
-	@cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
-
-R: Makefile @BUILD_XZ_TRUE@ stamp
-	@BUILD_XZ_TRUE@ @$(MAKE) $(noinst_LIBRARIES)
-
-stamp:
-	@ln -s $(srcdir)/*/*.c $(srcdir)/*/*.h .
-	touch stamp
-
-liblzma.a: $(liblzma_a_OBJECTS)
-	rm -f $@
-	$(AR) cr $@ $(liblzma_a_OBJECTS)
-	$(RANLIB) $@
-
-mostlyclean: clean
-clean:
-	@-rm -f Makedeps stamp *.c *.h *.o *.lo *.a
-distclean: clean
-	@-rm -f Makefile
-maintainer-clean: distclean
-
-install install-strip uninstall TAGS info dvi check:
-
-distdir: $(DISTFILES)
-	@for f in $(DISTFILES); do \
-	  test -f $(distdir)/$${f} \
-	    || ln $(srcdir)/$${f} $(distdir)/$${f} 2>/dev/null \
-	    || cp -p $(srcdir)/$${f} $(distdir)/$${f}; \
-	done
-	@for d in $(SUBDIRS_WITH_NO_BUILD); do \
-	  ((cd $(srcdir); $(TAR) -c -f - $(DISTDIR_TAR_EXCLUDE) $${d}) \
-	      | (cd $(distdir); $(TAR) -x -f -)) \
-	    || exit 1; \
-	done
-
-## Automagically generated dependencies:
-
diff --git a/src/extra/xz/Makefile.win b/src/extra/xz/Makefile.win
deleted file mode 100644
index e65b710..0000000
--- a/src/extra/xz/Makefile.win
+++ /dev/null
@@ -1,47 +0,0 @@
-#-*- Makefile -*-
-include ../../gnuwin32/MkRules
-
-CPPFLAGS =-I../../include -I. -Iapi -DLZMA_API_STATIC -DHAVE_CONFIG_H -DWIN32
-
-SOURCES = \
- alone_decoder.c alone_encoder.c arm.c armthumb.c auto_decoder.c \
- block_buffer_decoder.c block_buffer_encoder.c block_decoder.c \
- block_encoder.c block_header_decoder.c block_header_encoder.c block_util.c \
- check.c common.c crc32_table.c \
- crc64_table.c delta_common.c delta_decoder.c \
- delta_encoder.c easy_buffer_encoder.c easy_decoder_memusage.c easy_encoder.c \
- easy_encoder_memusage.c easy_preset.c fastpos_table.c \
- filter_buffer_decoder.c filter_buffer_encoder.c filter_common.c \
- filter_decoder.c filter_encoder.c filter_flags_decoder.c \
- filter_flags_encoder.c ia64.c index.c index_decoder.c index_encoder.c \
- index_hash.c lz_decoder.c lz_encoder.c lz_encoder_mf.c lzma2_decoder.c \
- lzma2_encoder.c lzma_decoder.c lzma_encoder.c lzma_encoder_optimum_fast.c \
- lzma_encoder_optimum_normal.c lzma_encoder_presets.c powerpc.c \
- price_table.c sha256.c simple_coder.c simple_decoder.c \
- simple_encoder.c sparc.c stream_buffer_decoder.c stream_buffer_encoder.c \
- stream_decoder.c stream_encoder.c stream_flags_common.c \
- stream_flags_decoder.c stream_flags_encoder.c \
- vli_decoder.c vli_encoder.c vli_size.c x86.c
-
-
-## Use assembler version on i386
-ifeq "$(WIN)" "64"
-OBJECTS = $(SOURCES:.c=.o) crc32_fast.o crc64_fast.o
-else
-OBJECTS = $(SOURCES:.c=.o) crc32_x86.o crc64_x86.o
-endif
-
-all:
-	@$(MAKE) -f Makefile.win stamp
-	@$(MAKE) -f Makefile.win liblzma.a
-
-stamp:
-	@cp -p */*.c */*.h check/*.S .
-	touch stamp
-
-liblzma.a: $(OBJECTS)
-
-clean:
-	@$(RM) -f Makedeps stamp *.c *.h *.o *.S
-distclean: clean
-	@$(RM) liblzma.a
diff --git a/src/extra/xz/R_changes b/src/extra/xz/R_changes
deleted file mode 100644
index 3f979dc..0000000
--- a/src/extra/xz/R_changes
+++ /dev/null
@@ -1,20 +0,0 @@
-This is subdirectory src/liblzma of xz-utils-5.0.0, except for files
-Makefile.in, Makefile.win and R_changes
-
-common/{bswap,mythread,tuklib*}.h are from xz-utils-5.0.0/src/common.
-
-check/{sha256.c,crc_macros.h} is modified to look on the usual include path.
-
-common/local.h is a set of definitions of features to be built, and
-common/sysdefs.h is a modified copy of
-xz-utils-5.0.0/src/common/sysdefs.h which includes it.
-
-All the files from xz-utils are in the public domain.
-
-x86 performance optimizations are only used on (32-bit) Windows: 
-it is assumed that on other OSes an optimized system liblzma is or 
-could be made available.
-
-common/sysdefs.h:
-  Change _Bool to _Bool8 to avoid clashes on one Solaris 10 system.
-  (Solaris 10 has stdbool.h, but it was not being found.)
diff --git a/src/extra/xz/api/lzma.h b/src/extra/xz/api/lzma.h
deleted file mode 100644
index fb874c3..0000000
--- a/src/extra/xz/api/lzma.h
+++ /dev/null
@@ -1,313 +0,0 @@
-/**
- * \file        api/lzma.h
- * \brief       The public API of liblzma data compression library
- *
- * liblzma is a public domain general-purpose data compression library with
- * a zlib-like API. The native file format is .xz, but also the old .lzma
- * format and raw (no headers) streams are supported. Multiple compression
- * algorithms (filters) are supported. Currently LZMA2 is the primary filter.
- *
- * liblzma is part of XZ Utils <http://tukaani.org/xz/>. XZ Utils includes
- * a gzip-like command line tool named xz and some other tools. XZ Utils
- * is developed and maintained by Lasse Collin.
- *
- * Major parts of liblzma are based on Igor Pavlov's public domain LZMA SDK
- * <http://7-zip.org/sdk.html>.
- *
- * The SHA-256 implementation is based on the public domain code found from
- * 7-Zip <http://7-zip.org/>, which has a modified version of the public
- * domain SHA-256 code found from Crypto++ <http://www.cryptopp.com/>.
- * The SHA-256 code in Crypto++ was written by Kevin Springle and Wei Dai.
- */
-
-/*
- * Author: Lasse Collin
- *
- * This file has been put into the public domain.
- * You can do whatever you want with this file.
- */
-
-#ifndef LZMA_H
-#define LZMA_H
-
-/*****************************
- * Required standard headers *
- *****************************/
-
-/*
- * liblzma API headers need some standard types and macros. To allow
- * including lzma.h without requiring the application to include other
- * headers first, lzma.h includes the required standard headers unless
- * they already seem to be included already or if LZMA_MANUAL_HEADERS
- * has been defined.
- *
- * Here's what types and macros are needed and from which headers:
- *  - stddef.h: size_t, NULL
- *  - stdint.h: uint8_t, uint32_t, uint64_t, UINT32_C(n), uint64_C(n),
- *    UINT32_MAX, UINT64_MAX
- *
- * However, inttypes.h is a little more portable than stdint.h, although
- * inttypes.h declares some unneeded things compared to plain stdint.h.
- *
- * The hacks below aren't perfect, specifically they assume that inttypes.h
- * exists and that it typedefs at least uint8_t, uint32_t, and uint64_t,
- * and that, in case of incomplete inttypes.h, unsigned int is 32-bit.
- * If the application already takes care of setting up all the types and
- * macros properly (for example by using gnulib's stdint.h or inttypes.h),
- * we try to detect that the macros are already defined and don't include
- * inttypes.h here again. However, you may define LZMA_MANUAL_HEADERS to
- * force this file to never include any system headers.
- *
- * Some could argue that liblzma API should provide all the required types,
- * for example lzma_uint64, LZMA_UINT64_C(n), and LZMA_UINT64_MAX. This was
- * seen as an unnecessary mess, since most systems already provide all the
- * necessary types and macros in the standard headers.
- *
- * Note that liblzma API still has lzma_bool, because using stdbool.h would
- * break C89 and C++ programs on many systems. sizeof(bool) in C99 isn't
- * necessarily the same as sizeof(bool) in C++.
- */
-
-#ifndef LZMA_MANUAL_HEADERS
-	/*
-	 * I suppose this works portably also in C++. Note that in C++,
-	 * we need to get size_t into the global namespace.
-	 */
-#	include <stddef.h>
-
-	/*
-	 * Skip inttypes.h if we already have all the required macros. If we
-	 * have the macros, we assume that we have the matching typedefs too.
-	 */
-#	if !defined(UINT32_C) || !defined(UINT64_C) \
-			|| !defined(UINT32_MAX) || !defined(UINT64_MAX)
-		/*
-		 * MSVC has no C99 support, and thus it cannot be used to
-		 * compile liblzma. The liblzma API has to still be usable
-		 * from MSVC, so we need to define the required standard
-		 * integer types here.
-		 */
-#		if defined(_WIN32) && defined(_MSC_VER)
-			typedef unsigned __int8 uint8_t;
-			typedef unsigned __int32 uint32_t;
-			typedef unsigned __int64 uint64_t;
-#		else
-			/* Use the standard inttypes.h. */
-#			ifdef __cplusplus
-				/*
-				 * C99 sections 7.18.2 and 7.18.4 specify
-				 * that C++ implementations define the limit
-				 * and constant macros only if specifically
-				 * requested. Note that if you want the
-				 * format macros (PRIu64 etc.) too, you need
-				 * to define __STDC_FORMAT_MACROS before
-				 * including lzma.h, since re-including
-				 * inttypes.h with __STDC_FORMAT_MACROS
-				 * defined doesn't necessarily work.
-				 */
-#				ifndef __STDC_LIMIT_MACROS
-#					define __STDC_LIMIT_MACROS 1
-#				endif
-#				ifndef __STDC_CONSTANT_MACROS
-#					define __STDC_CONSTANT_MACROS 1
-#				endif
-#			endif
-
-#			include <inttypes.h>
-#		endif
-
-		/*
-		 * Some old systems have only the typedefs in inttypes.h, and
-		 * lack all the macros. For those systems, we need a few more
-		 * hacks. We assume that unsigned int is 32-bit and unsigned
-		 * long is either 32-bit or 64-bit. If these hacks aren't
-		 * enough, the application has to setup the types manually
-		 * before including lzma.h.
-		 */
-#		ifndef UINT32_C
-#			if defined(_WIN32) && defined(_MSC_VER)
-#				define UINT32_C(n) n ## UI32
-#			else
-#				define UINT32_C(n) n ## U
-#			endif
-#		endif
-
-#		ifndef UINT64_C
-#			if defined(_WIN32) && defined(_MSC_VER)
-#				define UINT64_C(n) n ## UI64
-#			else
-				/* Get ULONG_MAX. */
-#				include <limits.h>
-#				if ULONG_MAX == 4294967295UL
-#					define UINT64_C(n) n ## ULL
-#				else
-#					define UINT64_C(n) n ## UL
-#				endif
-#			endif
-#		endif
-
-#		ifndef UINT32_MAX
-#			define UINT32_MAX (UINT32_C(4294967295))
-#		endif
-
-#		ifndef UINT64_MAX
-#			define UINT64_MAX (UINT64_C(18446744073709551615))
-#		endif
-#	endif
-#endif /* ifdef LZMA_MANUAL_HEADERS */
-
-
-/******************
- * LZMA_API macro *
- ******************/
-
-/*
- * Some systems require that the functions and function pointers are
- * declared specially in the headers. LZMA_API_IMPORT is for importing
- * symbols and LZMA_API_CALL is to specify the calling convention.
- *
- * By default it is assumed that the application will link dynamically
- * against liblzma. #define LZMA_API_STATIC in your application if you
- * want to link against static liblzma. If you don't care about portability
- * to operating systems like Windows, or at least don't care about linking
- * against static liblzma on them, don't worry about LZMA_API_STATIC. That
- * is, most developers will never need to use LZMA_API_STATIC.
- *
- * The GCC variants are a special case on Windows (Cygwin and MinGW).
- * We rely on GCC doing the right thing with its auto-import feature,
- * and thus don't use __declspec(dllimport). This way developers don't
- * need to worry about LZMA_API_STATIC. Also the calling convention is
- * omitted on Cygwin but not on MinGW.
- */
-#ifndef LZMA_API_IMPORT
-#	if !defined(LZMA_API_STATIC) && defined(_WIN32) && !defined(__GNUC__)
-#		define LZMA_API_IMPORT __declspec(dllimport)
-#	else
-#		define LZMA_API_IMPORT
-#	endif
-#endif
-
-#ifndef LZMA_API_CALL
-#	if defined(_WIN32) && !defined(__CYGWIN__)
-#		define LZMA_API_CALL __cdecl
-#	else
-#		define LZMA_API_CALL
-#	endif
-#endif
-
-#ifndef LZMA_API
-#	define LZMA_API(type) LZMA_API_IMPORT type LZMA_API_CALL
-#endif
-
-
-/***********
- * nothrow *
- ***********/
-
-/*
- * None of the functions in liblzma may throw an exception. Even
- * the functions that use callback functions won't throw exceptions,
- * because liblzma would break if a callback function threw an exception.
- */
-#ifndef lzma_nothrow
-#	if defined(__cplusplus)
-#		define lzma_nothrow throw()
-#	elif __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3)
-#		define lzma_nothrow __attribute__((__nothrow__))
-#	else
-#		define lzma_nothrow
-#	endif
-#endif
-
-
-/********************
- * GNU C extensions *
- ********************/
-
-/*
- * GNU C extensions are used conditionally in the public API. It doesn't
- * break anything if these are sometimes enabled and sometimes not, only
- * affects warnings and optimizations.
- */
-#if __GNUC__ >= 3
-#	ifndef lzma_attribute
-#		define lzma_attribute(attr) __attribute__(attr)
-#	endif
-
-	/* warn_unused_result was added in GCC 3.4. */
-#	ifndef lzma_attr_warn_unused_result
-#		if __GNUC__ == 3 && __GNUC_MINOR__ < 4
-#			define lzma_attr_warn_unused_result
-#		endif
-#	endif
-
-#else
-#	ifndef lzma_attribute
-#		define lzma_attribute(attr)
-#	endif
-#endif
-
-
-#ifndef lzma_attr_pure
-#	define lzma_attr_pure lzma_attribute((__pure__))
-#endif
-
-#ifndef lzma_attr_const
-#	define lzma_attr_const lzma_attribute((__const__))
-#endif
-
-#ifndef lzma_attr_warn_unused_result
-#	define lzma_attr_warn_unused_result \
-		lzma_attribute((__warn_unused_result__))
-#endif
-
-
-/**************
- * Subheaders *
- **************/
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*
- * Subheaders check that this is defined. It is to prevent including
- * them directly from applications.
- */
-#define LZMA_H_INTERNAL 1
-
-/* Basic features */
-#include "lzma/version.h"
-#include "lzma/base.h"
-#include "lzma/vli.h"
-#include "lzma/check.h"
-
-/* Filters */
-#include "lzma/filter.h"
-#include "lzma/bcj.h"
-#include "lzma/delta.h"
-#include "lzma/lzma.h"
-
-/* Container formats */
-#include "lzma/container.h"
-
-/* Advanced features */
-#include "lzma/stream_flags.h"
-#include "lzma/block.h"
-#include "lzma/index.h"
-#include "lzma/index_hash.h"
-
-/* Hardware information */
-#include "lzma/hardware.h"
-
-/*
- * All subheaders included. Undefine LZMA_H_INTERNAL to prevent applications
- * re-including the subheaders.
- */
-#undef LZMA_H_INTERNAL
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* ifndef LZMA_H */
diff --git a/src/extra/xz/api/lzma/base.h b/src/extra/xz/api/lzma/base.h
deleted file mode 100644
index 43dde8d..0000000
--- a/src/extra/xz/api/lzma/base.h
+++ /dev/null
@@ -1,601 +0,0 @@
-/**
- * \file        lzma/base.h
- * \brief       Data types and functions used in many places in liblzma API
- */
-
-/*
- * Author: Lasse Collin
- *
- * This file has been put into the public domain.
- * You can do whatever you want with this file.
- *
- * See ../lzma.h for information about liblzma as a whole.
- */
-
-#ifndef LZMA_H_INTERNAL
-#	error Never include this file directly. Use <lzma.h> instead.
-#endif
-
-
-/**
- * \brief       Boolean
- *
- * This is here because C89 doesn't have stdbool.h. To set a value for
- * variables having type lzma_bool, you can use
- *   - C99's `true' and `false' from stdbool.h;
- *   - C++'s internal `true' and `false'; or
- *   - integers one (true) and zero (false).
- */
-typedef unsigned char lzma_bool;
-
-
-/**
- * \brief       Type of reserved enumeration variable in structures
- *
- * To avoid breaking library ABI when new features are added, several
- * structures contain extra variables that may be used in future. Since
- * sizeof(enum) can be different than sizeof(int), and sizeof(enum) may
- * even vary depending on the range of enumeration constants, we specify
- * a separate type to be used for reserved enumeration variables. All
- * enumeration constants in liblzma API will be non-negative and less
- * than 128, which should guarantee that the ABI won't break even when
- * new constants are added to existing enumerations.
- */
-typedef enum {
-	LZMA_RESERVED_ENUM      = 0
-} lzma_reserved_enum;
-
-
-/**
- * \brief       Return values used by several functions in liblzma
- *
- * Check the descriptions of specific functions to find out which return
- * values they can return. With some functions the return values may have
- * more specific meanings than described here; those differences are
- * described per-function basis.
- */
-typedef enum {
-	LZMA_OK                 = 0,
-		/**<
-		 * \brief       Operation completed successfully
-		 */
-
-	LZMA_STREAM_END         = 1,
-		/**<
-		 * \brief       End of stream was reached
-		 *
-		 * In encoder, LZMA_SYNC_FLUSH, LZMA_FULL_FLUSH, or
-		 * LZMA_FINISH was finished. In decoder, this indicates
-		 * that all the data was successfully decoded.
-		 *
-		 * In all cases, when LZMA_STREAM_END is returned, the last
-		 * output bytes should be picked from strm->next_out.
-		 */
-
-	LZMA_NO_CHECK           = 2,
-		/**<
-		 * \brief       Input stream has no integrity check
-		 *
-		 * This return value can be returned only if the
-		 * LZMA_TELL_NO_CHECK flag was used when initializing
-		 * the decoder. LZMA_NO_CHECK is just a warning, and
-		 * the decoding can be continued normally.
-		 *
-		 * It is possible to call lzma_get_check() immediately after
-		 * lzma_code has returned LZMA_NO_CHECK. The result will
-		 * naturally be LZMA_CHECK_NONE, but the possibility to call
-		 * lzma_get_check() may be convenient in some applications.
-		 */
-
-	LZMA_UNSUPPORTED_CHECK  = 3,
-		/**<
-		 * \brief       Cannot calculate the integrity check
-		 *
-		 * The usage of this return value is different in encoders
-		 * and decoders.
-		 *
-		 * Encoders can return this value only from the initialization
-		 * function. If initialization fails with this value, the
-		 * encoding cannot be done, because there's no way to produce
-		 * output with the correct integrity check.
-		 *
-		 * Decoders can return this value only from lzma_code() and
-		 * only if the LZMA_TELL_UNSUPPORTED_CHECK flag was used when
-		 * initializing the decoder. The decoding can still be
-		 * continued normally even if the check type is unsupported,
-		 * but naturally the check will not be validated, and possible
-		 * errors may go undetected.
-		 *
-		 * With decoder, it is possible to call lzma_get_check()
-		 * immediately after lzma_code() has returned
-		 * LZMA_UNSUPPORTED_CHECK. This way it is possible to find
-		 * out what the unsupported Check ID was.
-		 */
-
-	LZMA_GET_CHECK          = 4,
-		/**<
-		 * \brief       Integrity check type is now available
-		 *
-		 * This value can be returned only by the lzma_code() function
-		 * and only if the decoder was initialized with the
-		 * LZMA_TELL_ANY_CHECK flag. LZMA_GET_CHECK tells the
-		 * application that it may now call lzma_get_check() to find
-		 * out the Check ID. This can be used, for example, to
-		 * implement a decoder that accepts only files that have
-		 * strong enough integrity check.
-		 */
-
-	LZMA_MEM_ERROR          = 5,
-		/**<
-		 * \brief       Cannot allocate memory
-		 *
-		 * Memory allocation failed, or the size of the allocation
-		 * would be greater than SIZE_MAX.
-		 *
-		 * Due to internal implementation reasons, the coding cannot
-		 * be continued even if more memory were made available after
-		 * LZMA_MEM_ERROR.
-		 */
-
-	LZMA_MEMLIMIT_ERROR     = 6,
-		/**
-		 * \brief       Memory usage limit was reached
-		 *
-		 * Decoder would need more memory than allowed by the
-		 * specified memory usage limit. To continue decoding,
-		 * the memory usage limit has to be increased with
-		 * lzma_memlimit_set().
-		 */
-
-	LZMA_FORMAT_ERROR       = 7,
-		/**<
-		 * \brief       File format not recognized
-		 *
-		 * The decoder did not recognize the input as supported file
-		 * format. This error can occur, for example, when trying to
-		 * decode .lzma format file with lzma_stream_decoder,
-		 * because lzma_stream_decoder accepts only the .xz format.
-		 */
-
-	LZMA_OPTIONS_ERROR      = 8,
-		/**<
-		 * \brief       Invalid or unsupported options
-		 *
-		 * Invalid or unsupported options, for example
-		 *  - unsupported filter(s) or filter options; or
-		 *  - reserved bits set in headers (decoder only).
-		 *
-		 * Rebuilding liblzma with more features enabled, or
-		 * upgrading to a newer version of liblzma may help.
-		 */
-
-	LZMA_DATA_ERROR         = 9,
-		/**<
-		 * \brief       Data is corrupt
-		 *
-		 * The usage of this return value is different in encoders
-		 * and decoders. In both encoder and decoder, the coding
-		 * cannot continue after this error.
-		 *
-		 * Encoders return this if size limits of the target file
-		 * format would be exceeded. These limits are huge, thus
-		 * getting this error from an encoder is mostly theoretical.
-		 * For example, the maximum compressed and uncompressed
-		 * size of a .xz Stream is roughly 8 EiB (2^63 bytes).
-		 *
-		 * Decoders return this error if the input data is corrupt.
-		 * This can mean, for example, invalid CRC32 in headers
-		 * or invalid check of uncompressed data.
-		 */
-
-	LZMA_BUF_ERROR          = 10,
-		/**<
-		 * \brief       No progress is possible
-		 *
-		 * This error code is returned when the coder cannot consume
-		 * any new input and produce any new output. The most common
-		 * reason for this error is that the input stream being
-		 * decoded is truncated or corrupt.
-		 *
-		 * This error is not fatal. Coding can be continued normally
-		 * by providing more input and/or more output space, if
-		 * possible.
-		 *
-		 * Typically the first call to lzma_code() that can do no
-		 * progress returns LZMA_OK instead of LZMA_BUF_ERROR. Only
-		 * the second consecutive call doing no progress will return
-		 * LZMA_BUF_ERROR. This is intentional.
-		 *
-		 * With zlib, Z_BUF_ERROR may be returned even if the
-		 * application is doing nothing wrong, so apps will need
-		 * to handle Z_BUF_ERROR specially. The above hack
-		 * guarantees that liblzma never returns LZMA_BUF_ERROR
-		 * to properly written applications unless the input file
-		 * is truncated or corrupt. This should simplify the
-		 * applications a little.
-		 */
-
-	LZMA_PROG_ERROR         = 11,
-		/**<
-		 * \brief       Programming error
-		 *
-		 * This indicates that the arguments given to the function are
-		 * invalid or the internal state of the decoder is corrupt.
-		 *   - Function arguments are invalid or the structures
-		 *     pointed by the argument pointers are invalid
-		 *     e.g. if strm->next_out has been set to NULL and
-		 *     strm->avail_out > 0 when calling lzma_code().
-		 *   - lzma_* functions have been called in wrong order
-		 *     e.g. lzma_code() was called right after lzma_end().
-		 *   - If errors occur randomly, the reason might be flaky
-		 *     hardware.
-		 *
-		 * If you think that your code is correct, this error code
-		 * can be a sign of a bug in liblzma. See the documentation
-		 * how to report bugs.
-		 */
-} lzma_ret;
-
-
-/**
- * \brief       The `action' argument for lzma_code()
- *
- * After the first use of LZMA_SYNC_FLUSH, LZMA_FULL_FLUSH, or LZMA_FINISH,
- * the same `action' must is used until lzma_code() returns LZMA_STREAM_END.
- * Also, the amount of input (that is, strm->avail_in) must not be modified
- * by the application until lzma_code() returns LZMA_STREAM_END. Changing the
- * `action' or modifying the amount of input will make lzma_code() return
- * LZMA_PROG_ERROR.
- */
-typedef enum {
-	LZMA_RUN = 0,
-		/**<
-		 * \brief       Continue coding
-		 *
-		 * Encoder: Encode as much input as possible. Some internal
-		 * buffering will probably be done (depends on the filter
-		 * chain in use), which causes latency: the input used won't
-		 * usually be decodeable from the output of the same
-		 * lzma_code() call.
-		 *
-		 * Decoder: Decode as much input as possible and produce as
-		 * much output as possible.
-		 */
-
-	LZMA_SYNC_FLUSH = 1,
-		/**<
-		 * \brief       Make all the input available at output
-		 *
-		 * Normally the encoder introduces some latency.
-		 * LZMA_SYNC_FLUSH forces all the buffered data to be
-		 * available at output without resetting the internal
-		 * state of the encoder. This way it is possible to use
-		 * compressed stream for example for communication over
-		 * network.
-		 *
-		 * Only some filters support LZMA_SYNC_FLUSH. Trying to use
-		 * LZMA_SYNC_FLUSH with filters that don't support it will
-		 * make lzma_code() return LZMA_OPTIONS_ERROR. For example,
-		 * LZMA1 doesn't support LZMA_SYNC_FLUSH but LZMA2 does.
-		 *
-		 * Using LZMA_SYNC_FLUSH very often can dramatically reduce
-		 * the compression ratio. With some filters (for example,
-		 * LZMA2), fine-tuning the compression options may help
-		 * mitigate this problem significantly (for example,
-		 * match finder with LZMA2).
-		 *
-		 * Decoders don't support LZMA_SYNC_FLUSH.
-		 */
-
-	LZMA_FULL_FLUSH = 2,
-		/**<
-		 * \brief       Finish encoding of the current Block
-		 *
-		 * All the input data going to the current Block must have
-		 * been given to the encoder (the last bytes can still be
-		 * pending in* next_in). Call lzma_code() with LZMA_FULL_FLUSH
-		 * until it returns LZMA_STREAM_END. Then continue normally
-		 * with LZMA_RUN or finish the Stream with LZMA_FINISH.
-		 *
-		 * This action is currently supported only by Stream encoder
-		 * and easy encoder (which uses Stream encoder). If there is
-		 * no unfinished Block, no empty Block is created.
-		 */
-
-	LZMA_FINISH = 3
-		/**<
-		 * \brief       Finish the coding operation
-		 *
-		 * All the input data must have been given to the encoder
-		 * (the last bytes can still be pending in next_in).
-		 * Call lzma_code() with LZMA_FINISH until it returns
-		 * LZMA_STREAM_END. Once LZMA_FINISH has been used,
-		 * the amount of input must no longer be changed by
-		 * the application.
-		 *
-		 * When decoding, using LZMA_FINISH is optional unless the
-		 * LZMA_CONCATENATED flag was used when the decoder was
-		 * initialized. When LZMA_CONCATENATED was not used, the only
-		 * effect of LZMA_FINISH is that the amount of input must not
-		 * be changed just like in the encoder.
-		 */
-} lzma_action;
-
-
-/**
- * \brief       Custom functions for memory handling
- *
- * A pointer to lzma_allocator may be passed via lzma_stream structure
- * to liblzma, and some advanced functions take a pointer to lzma_allocator
- * as a separate function argument. The library will use the functions
- * specified in lzma_allocator for memory handling instead of the default
- * malloc() and free(). C++ users should note that the custom memory
- * handling functions must not throw exceptions.
- *
- * liblzma doesn't make an internal copy of lzma_allocator. Thus, it is
- * OK to change these function pointers in the middle of the coding
- * process, but obviously it must be done carefully to make sure that the
- * replacement `free' can deallocate memory allocated by the earlier
- * `alloc' function(s).
- */
-typedef struct {
-	/**
-	 * \brief       Pointer to a custom memory allocation function
-	 *
-	 * If you don't want a custom allocator, but still want
-	 * custom free(), set this to NULL and liblzma will use
-	 * the standard malloc().
-	 *
-	 * \param       opaque  lzma_allocator.opaque (see below)
-	 * \param       nmemb   Number of elements like in calloc(). liblzma
-	 *                      will always set nmemb to 1, so it is safe to
-	 *                      ignore nmemb in a custom allocator if you like.
-	 *                      The nmemb argument exists only for
-	 *                      compatibility with zlib and libbzip2.
-	 * \param       size    Size of an element in bytes.
-	 *                      liblzma never sets this to zero.
-	 *
-	 * \return      Pointer to the beginning of a memory block of
-	 *              `size' bytes, or NULL if allocation fails
-	 *              for some reason. When allocation fails, functions
-	 *              of liblzma return LZMA_MEM_ERROR.
-	 *
-	 * The allocator should not waste time zeroing the allocated buffers.
-	 * This is not only about speed, but also memory usage, since the
-	 * operating system kernel doesn't necessarily allocate the requested
-	 * memory in physical memory until it is actually used. With small
-	 * input files, liblzma may actually need only a fraction of the
-	 * memory that it requested for allocation.
-	 *
-	 * \note        LZMA_MEM_ERROR is also used when the size of the
-	 *              allocation would be greater than SIZE_MAX. Thus,
-	 *              don't assume that the custom allocator must have
-	 *              returned NULL if some function from liblzma
-	 *              returns LZMA_MEM_ERROR.
-	 */
-	void *(LZMA_API_CALL *alloc)(void *opaque, size_t nmemb, size_t size);
-
-	/**
-	 * \brief       Pointer to a custom memory freeing function
-	 *
-	 * If you don't want a custom freeing function, but still
-	 * want a custom allocator, set this to NULL and liblzma
-	 * will use the standard free().
-	 *
-	 * \param       opaque  lzma_allocator.opaque (see below)
-	 * \param       ptr     Pointer returned by lzma_allocator.alloc(),
-	 *                      or when it is set to NULL, a pointer returned
-	 *                      by the standard malloc().
-	 */
-	void (LZMA_API_CALL *free)(void *opaque, void *ptr);
-
-	/**
-	 * \brief       Pointer passed to .alloc() and .free()
-	 *
-	 * opaque is passed as the first argument to lzma_allocator.alloc()
-	 * and lzma_allocator.free(). This intended to ease implementing
-	 * custom memory allocation functions for use with liblzma.
-	 *
-	 * If you don't need this, you should set this to NULL.
-	 */
-	void *opaque;
-
-} lzma_allocator;
-
-
-/**
- * \brief       Internal data structure
- *
- * The contents of this structure is not visible outside the library.
- */
-typedef struct lzma_internal_s lzma_internal;
-
-
-/**
- * \brief       Passing data to and from liblzma
- *
- * The lzma_stream structure is used for
- *  - passing pointers to input and output buffers to liblzma;
- *  - defining custom memory hander functions; and
- *  - holding a pointer to coder-specific internal data structures.
- *
- * Typical usage:
- *
- *  - After allocating lzma_stream (on stack or with malloc()), it must be
- *    initialized to LZMA_STREAM_INIT (see LZMA_STREAM_INIT for details).
- *
- *  - Initialize a coder to the lzma_stream, for example by using
- *    lzma_easy_encoder() or lzma_auto_decoder(). Some notes:
- *      - In contrast to zlib, strm->next_in and strm->next_out are
- *        ignored by all initialization functions, thus it is safe
- *        to not initialize them yet.
- *      - The initialization functions always set strm->total_in and
- *        strm->total_out to zero.
- *      - If the initialization function fails, no memory is left allocated
- *        that would require freeing with lzma_end() even if some memory was
- *        associated with the lzma_stream structure when the initialization
- *        function was called.
- *
- *  - Use lzma_code() to do the actual work.
- *
- *  - Once the coding has been finished, the existing lzma_stream can be
- *    reused. It is OK to reuse lzma_stream with different initialization
- *    function without calling lzma_end() first. Old allocations are
- *    automatically freed.
- *
- *  - Finally, use lzma_end() to free the allocated memory. lzma_end() never
- *    frees the lzma_stream structure itself.
- *
- * Application may modify the values of total_in and total_out as it wants.
- * They are updated by liblzma to match the amount of data read and
- * written, but aren't used for anything else.
- */
-typedef struct {
-	const uint8_t *next_in; /**< Pointer to the next input byte. */
-	size_t avail_in;    /**< Number of available input bytes in next_in. */
-	uint64_t total_in;  /**< Total number of bytes read by liblzma. */
-
-	uint8_t *next_out;  /**< Pointer to the next output position. */
-	size_t avail_out;   /**< Amount of free space in next_out. */
-	uint64_t total_out; /**< Total number of bytes written by liblzma. */
-
-	/**
-	 * \brief       Custom memory allocation functions
-	 *
-	 * In most cases this is NULL which makes liblzma use
-	 * the standard malloc() and free().
-	 */
-	lzma_allocator *allocator;
-
-	/** Internal state is not visible to applications. */
-	lzma_internal *internal;
-
-	/*
-	 * Reserved space to allow possible future extensions without
-	 * breaking the ABI. Excluding the initialization of this structure,
-	 * you should not touch these, because the names of these variables
-	 * may change.
-	 */
-	void *reserved_ptr1;
-	void *reserved_ptr2;
-	void *reserved_ptr3;
-	void *reserved_ptr4;
-	uint64_t reserved_int1;
-	uint64_t reserved_int2;
-	size_t reserved_int3;
-	size_t reserved_int4;
-	lzma_reserved_enum reserved_enum1;
-	lzma_reserved_enum reserved_enum2;
-
-} lzma_stream;
-
-
-/**
- * \brief       Initialization for lzma_stream
- *
- * When you declare an instance of lzma_stream, you can immediately
- * initialize it so that initialization functions know that no memory
- * has been allocated yet:
- *
- *     lzma_stream strm = LZMA_STREAM_INIT;
- *
- * If you need to initialize a dynamically allocated lzma_stream, you can use
- * memset(strm_pointer, 0, sizeof(lzma_stream)). Strictly speaking, this
- * violates the C standard since NULL may have different internal
- * representation than zero, but it should be portable enough in practice.
- * Anyway, for maximum portability, you can use something like this:
- *
- *     lzma_stream tmp = LZMA_STREAM_INIT;
- *     *strm = tmp;
- */
-#define LZMA_STREAM_INIT \
-	{ NULL, 0, 0, NULL, 0, 0, NULL, NULL, \
-	NULL, NULL, NULL, NULL, 0, 0, 0, 0, \
-	LZMA_RESERVED_ENUM, LZMA_RESERVED_ENUM }
-
-
-/**
- * \brief       Encode or decode data
- *
- * Once the lzma_stream has been successfully initialized (e.g. with
- * lzma_stream_encoder()), the actual encoding or decoding is done
- * using this function. The application has to update strm->next_in,
- * strm->avail_in, strm->next_out, and strm->avail_out to pass input
- * to and get output from liblzma.
- *
- * See the description of the coder-specific initialization function to find
- * out what `action' values are supported by the coder.
- */
-extern LZMA_API(lzma_ret) lzma_code(lzma_stream *strm, lzma_action action)
-		lzma_nothrow lzma_attr_warn_unused_result;
-
-
-/**
- * \brief       Free memory allocated for the coder data structures
- *
- * \param       strm    Pointer to lzma_stream that is at least initialized
- *                      with LZMA_STREAM_INIT.
- *
- * After lzma_end(strm), strm->internal is guaranteed to be NULL. No other
- * members of the lzma_stream structure are touched.
- *
- * \note        zlib indicates an error if application end()s unfinished
- *              stream structure. liblzma doesn't do this, and assumes that
- *              application knows what it is doing.
- */
-extern LZMA_API(void) lzma_end(lzma_stream *strm) lzma_nothrow;
-
-
-/**
- * \brief       Get the memory usage of decoder filter chain
- *
- * This function is currently supported only when *strm has been initialized
- * with a function that takes a memlimit argument. With other functions, you
- * should use e.g. lzma_raw_encoder_memusage() or lzma_raw_decoder_memusage()
- * to estimate the memory requirements.
- *
- * This function is useful e.g. after LZMA_MEMLIMIT_ERROR to find out how big
- * the memory usage limit should have been to decode the input. Note that
- * this may give misleading information if decoding .xz Streams that have
- * multiple Blocks, because each Block can have different memory requirements.
- *
- * \return      How much memory is currently allocated for the filter
- *              decoders. If no filter chain is currently allocated,
- *              some non-zero value is still returned, which is less than
- *              or equal to what any filter chain would indicate as its
- *              memory requirement.
- *
- *              If this function isn't supported by *strm or some other error
- *              occurs, zero is returned.
- */
-extern LZMA_API(uint64_t) lzma_memusage(const lzma_stream *strm)
-		lzma_nothrow lzma_attr_pure;
-
-
-/**
- * \brief       Get the current memory usage limit
- *
- * This function is supported only when *strm has been initialized with
- * a function that takes a memlimit argument.
- *
- * \return      On success, the current memory usage limit is returned
- *              (always non-zero). On error, zero is returned.
- */
-extern LZMA_API(uint64_t) lzma_memlimit_get(const lzma_stream *strm)
-		lzma_nothrow lzma_attr_pure;
-
-
-/**
- * \brief       Set the memory usage limit
- *
- * This function is supported only when *strm has been initialized with
- * a function that takes a memlimit argument.
- *
- * \return      - LZMA_OK: New memory usage limit successfully set.
- *              - LZMA_MEMLIMIT_ERROR: The new limit is too small.
- *                The limit was not changed.
- *              - LZMA_PROG_ERROR: Invalid arguments, e.g. *strm doesn't
- *                support memory usage limit or memlimit was zero.
- */
-extern LZMA_API(lzma_ret) lzma_memlimit_set(
-		lzma_stream *strm, uint64_t memlimit) lzma_nothrow;
diff --git a/src/extra/xz/api/lzma/bcj.h b/src/extra/xz/api/lzma/bcj.h
deleted file mode 100644
index 8e37538..0000000
--- a/src/extra/xz/api/lzma/bcj.h
+++ /dev/null
@@ -1,90 +0,0 @@
-/**
- * \file        lzma/bcj.h
- * \brief       Branch/Call/Jump conversion filters
- */
-
-/*
- * Author: Lasse Collin
- *
- * This file has been put into the public domain.
- * You can do whatever you want with this file.
- *
- * See ../lzma.h for information about liblzma as a whole.
- */
-
-#ifndef LZMA_H_INTERNAL
-#	error Never include this file directly. Use <lzma.h> instead.
-#endif
-
-
-/* Filter IDs for lzma_filter.id */
-
-#define LZMA_FILTER_X86         LZMA_VLI_C(0x04)
-	/**<
-	 * Filter for x86 binaries
-	 */
-
-#define LZMA_FILTER_POWERPC     LZMA_VLI_C(0x05)
-	/**<
-	 * Filter for Big endian PowerPC binaries
-	 */
-
-#define LZMA_FILTER_IA64        LZMA_VLI_C(0x06)
-	/**<
-	 * Filter for IA-64 (Itanium) binaries.
-	 */
-
-#define LZMA_FILTER_ARM         LZMA_VLI_C(0x07)
-	/**<
-	 * Filter for ARM binaries.
-	 */
-
-#define LZMA_FILTER_ARMTHUMB    LZMA_VLI_C(0x08)
-	/**<
-	 * Filter for ARM-Thumb binaries.
-	 */
-
-#define LZMA_FILTER_SPARC       LZMA_VLI_C(0x09)
-	/**<
-	 * Filter for SPARC binaries.
-	 */
-
-
-/**
- * \brief       Options for BCJ filters
- *
- * The BCJ filters never change the size of the data. Specifying options
- * for them is optional: if pointer to options is NULL, default value is
- * used. You probably never need to specify options to BCJ filters, so just
- * set the options pointer to NULL and be happy.
- *
- * If options with non-default values have been specified when encoding,
- * the same options must also be specified when decoding.
- *
- * \note        At the moment, none of the BCJ filters support
- *              LZMA_SYNC_FLUSH. If LZMA_SYNC_FLUSH is specified,
- *              LZMA_OPTIONS_ERROR will be returned. If there is need,
- *              partial support for LZMA_SYNC_FLUSH can be added in future.
- *              Partial means that flushing would be possible only at
- *              offsets that are multiple of 2, 4, or 16 depending on
- *              the filter, except x86 which cannot be made to support
- *              LZMA_SYNC_FLUSH predictably.
- */
-typedef struct {
-	/**
-	 * \brief       Start offset for conversions
-	 *
-	 * This setting is useful only when the same filter is used
-	 * _separately_ for multiple sections of the same executable file,
-	 * and the sections contain cross-section branch/call/jump
-	 * instructions. In that case it is beneficial to set the start
-	 * offset of the non-first sections so that the relative addresses
-	 * of the cross-section branch/call/jump instructions will use the
-	 * same absolute addresses as in the first section.
-	 *
-	 * When the pointer to options is NULL, the default value (zero)
-	 * is used.
-	 */
-	uint32_t start_offset;
-
-} lzma_options_bcj;
diff --git a/src/extra/xz/api/lzma/block.h b/src/extra/xz/api/lzma/block.h
deleted file mode 100644
index 8a4bf23..0000000
--- a/src/extra/xz/api/lzma/block.h
+++ /dev/null
@@ -1,530 +0,0 @@
-/**
- * \file        lzma/block.h
- * \brief       .xz Block handling
- */
-
-/*
- * Author: Lasse Collin
- *
- * This file has been put into the public domain.
- * You can do whatever you want with this file.
- *
- * See ../lzma.h for information about liblzma as a whole.
- */
-
-#ifndef LZMA_H_INTERNAL
-#	error Never include this file directly. Use <lzma.h> instead.
-#endif
-
-
-/**
- * \brief       Options for the Block and Block Header encoders and decoders
- *
- * Different Block handling functions use different parts of this structure.
- * Some read some members, other functions write, and some do both. Only the
- * members listed for reading need to be initialized when the specified
- * functions are called. The members marked for writing will be assigned
- * new values at some point either by calling the given function or by
- * later calls to lzma_code().
- */
-typedef struct {
-	/**
-	 * \brief       Block format version
-	 *
-	 * To prevent API and ABI breakages if new features are needed in
-	 * the Block field, a version number is used to indicate which
-	 * fields in this structure are in use. For now, version must always
-	 * be zero. With non-zero version, most Block related functions will
-	 * return LZMA_OPTIONS_ERROR.
-	 *
-	 * Read by:
-	 *  - All functions that take pointer to lzma_block as argument,
-	 *    including lzma_block_header_decode().
-	 *
-	 * Written by:
-	 *  - lzma_block_header_decode()
-	 */
-	uint32_t version;
-
-	/**
-	 * \brief       Size of the Block Header field
-	 *
-	 * This is always a multiple of four.
-	 *
-	 * Read by:
-	 *  - lzma_block_header_encode()
-	 *  - lzma_block_header_decode()
-	 *  - lzma_block_compressed_size()
-	 *  - lzma_block_unpadded_size()
-	 *  - lzma_block_total_size()
-	 *  - lzma_block_decoder()
-	 *  - lzma_block_buffer_decode()
-	 *
-	 * Written by:
-	 *  - lzma_block_header_size()
-	 *  - lzma_block_buffer_encode()
-	 */
-	uint32_t header_size;
-#	define LZMA_BLOCK_HEADER_SIZE_MIN 8
-#	define LZMA_BLOCK_HEADER_SIZE_MAX 1024
-
-	/**
-	 * \brief       Type of integrity Check
-	 *
-	 * The Check ID is not stored into the Block Header, thus its value
-	 * must be provided also when decoding.
-	 *
-	 * Read by:
-	 *  - lzma_block_header_encode()
-	 *  - lzma_block_header_decode()
-	 *  - lzma_block_compressed_size()
-	 *  - lzma_block_unpadded_size()
-	 *  - lzma_block_total_size()
-	 *  - lzma_block_encoder()
-	 *  - lzma_block_decoder()
-	 *  - lzma_block_buffer_encode()
-	 *  - lzma_block_buffer_decode()
-	 */
-	lzma_check check;
-
-	/**
-	 * \brief       Size of the Compressed Data in bytes
-	 *
-	 * Encoding: If this is not LZMA_VLI_UNKNOWN, Block Header encoder
-	 * will store this value to the Block Header. Block encoder doesn't
-	 * care about this value, but will set it once the encoding has been
-	 * finished.
-	 *
-	 * Decoding: If this is not LZMA_VLI_UNKNOWN, Block decoder will
-	 * verify that the size of the Compressed Data field matches
-	 * compressed_size.
-	 *
-	 * Usually you don't know this value when encoding in streamed mode,
-	 * and thus cannot write this field into the Block Header.
-	 *
-	 * In non-streamed mode you can reserve space for this field before
-	 * encoding the actual Block. After encoding the data, finish the
-	 * Block by encoding the Block Header. Steps in detail:
-	 *
-	 *  - Set compressed_size to some big enough value. If you don't know
-	 *    better, use LZMA_VLI_MAX, but remember that bigger values take
-	 *    more space in Block Header.
-	 *
-	 *  - Call lzma_block_header_size() to see how much space you need to
-	 *    reserve for the Block Header.
-	 *
-	 *  - Encode the Block using lzma_block_encoder() and lzma_code().
-	 *    It sets compressed_size to the correct value.
-	 *
-	 *  - Use lzma_block_header_encode() to encode the Block Header.
-	 *    Because space was reserved in the first step, you don't need
-	 *    to call lzma_block_header_size() anymore, because due to
-	 *    reserving, header_size has to be big enough. If it is "too big",
-	 *    lzma_block_header_encode() will add enough Header Padding to
-	 *    make Block Header to match the size specified by header_size.
-	 *
-	 * Read by:
-	 *  - lzma_block_header_size()
-	 *  - lzma_block_header_encode()
-	 *  - lzma_block_compressed_size()
-	 *  - lzma_block_unpadded_size()
-	 *  - lzma_block_total_size()
-	 *  - lzma_block_decoder()
-	 *  - lzma_block_buffer_decode()
-	 *
-	 * Written by:
-	 *  - lzma_block_header_decode()
-	 *  - lzma_block_compressed_size()
-	 *  - lzma_block_encoder()
-	 *  - lzma_block_decoder()
-	 *  - lzma_block_buffer_encode()
-	 *  - lzma_block_buffer_decode()
-	 */
-	lzma_vli compressed_size;
-
-	/**
-	 * \brief       Uncompressed Size in bytes
-	 *
-	 * This is handled very similarly to compressed_size above.
-	 *
-	 * uncompressed_size is needed by fewer functions than
-	 * compressed_size. This is because uncompressed_size isn't
-	 * needed to validate that Block stays within proper limits.
-	 *
-	 * Read by:
-	 *  - lzma_block_header_size()
-	 *  - lzma_block_header_encode()
-	 *  - lzma_block_decoder()
-	 *  - lzma_block_buffer_decode()
-	 *
-	 * Written by:
-	 *  - lzma_block_header_decode()
-	 *  - lzma_block_encoder()
-	 *  - lzma_block_decoder()
-	 *  - lzma_block_buffer_encode()
-	 *  - lzma_block_buffer_decode()
-	 */
-	lzma_vli uncompressed_size;
-
-	/**
-	 * \brief       Array of filters
-	 *
-	 * There can be 1-4 filters. The end of the array is marked with
-	 * .id = LZMA_VLI_UNKNOWN.
-	 *
-	 * Read by:
-	 *  - lzma_block_header_size()
-	 *  - lzma_block_header_encode()
-	 *  - lzma_block_encoder()
-	 *  - lzma_block_decoder()
-	 *  - lzma_block_buffer_encode()
-	 *  - lzma_block_buffer_decode()
-	 *
-	 * Written by:
-	 *  - lzma_block_header_decode(): Note that this does NOT free()
-	 *    the old filter options structures. All unused filters[] will
-	 *    have .id == LZMA_VLI_UNKNOWN and .options == NULL. If
-	 *    decoding fails, all filters[] are guaranteed to be
-	 *    LZMA_VLI_UNKNOWN and NULL.
-	 *
-	 * \note        Because of the array is terminated with
-	 *              .id = LZMA_VLI_UNKNOWN, the actual array must
-	 *              have LZMA_FILTERS_MAX + 1 members or the Block
-	 *              Header decoder will overflow the buffer.
-	 */
-	lzma_filter *filters;
-
-	/**
-	 * \brief       Raw value stored in the Check field
-	 *
-	 * After successful coding, the first lzma_check_size(check) bytes
-	 * of this array contain the raw value stored in the Check field.
-	 *
-	 * Note that CRC32 and CRC64 are stored in little endian byte order.
-	 * Take it into account if you display the Check values to the user.
-	 *
-	 * Written by:
-	 *  - lzma_block_encoder()
-	 *  - lzma_block_decoder()
-	 *  - lzma_block_buffer_encode()
-	 *  - lzma_block_buffer_decode()
-	 */
-	uint8_t raw_check[LZMA_CHECK_SIZE_MAX];
-
-	/*
-	 * Reserved space to allow possible future extensions without
-	 * breaking the ABI. You should not touch these, because the names
-	 * of these variables may change. These are and will never be used
-	 * with the currently supported options, so it is safe to leave these
-	 * uninitialized.
-	 */
-	void *reserved_ptr1;
-	void *reserved_ptr2;
-	void *reserved_ptr3;
-	uint32_t reserved_int1;
-	uint32_t reserved_int2;
-	lzma_vli reserved_int3;
-	lzma_vli reserved_int4;
-	lzma_vli reserved_int5;
-	lzma_vli reserved_int6;
-	lzma_vli reserved_int7;
-	lzma_vli reserved_int8;
-	lzma_reserved_enum reserved_enum1;
-	lzma_reserved_enum reserved_enum2;
-	lzma_reserved_enum reserved_enum3;
-	lzma_reserved_enum reserved_enum4;
-	lzma_bool reserved_bool1;
-	lzma_bool reserved_bool2;
-	lzma_bool reserved_bool3;
-	lzma_bool reserved_bool4;
-	lzma_bool reserved_bool5;
-	lzma_bool reserved_bool6;
-	lzma_bool reserved_bool7;
-	lzma_bool reserved_bool8;
-
-} lzma_block;
-
-
-/**
- * \brief       Decode the Block Header Size field
- *
- * To decode Block Header using lzma_block_header_decode(), the size of the
- * Block Header has to be known and stored into lzma_block.header_size.
- * The size can be calculated from the first byte of a Block using this macro.
- * Note that if the first byte is 0x00, it indicates beginning of Index; use
- * this macro only when the byte is not 0x00.
- *
- * There is no encoding macro, because Block Header encoder is enough for that.
- */
-#define lzma_block_header_size_decode(b) (((uint32_t)(b) + 1) * 4)
-
-
-/**
- * \brief       Calculate Block Header Size
- *
- * Calculate the minimum size needed for the Block Header field using the
- * settings specified in the lzma_block structure. Note that it is OK to
- * increase the calculated header_size value as long as it is a multiple of
- * four and doesn't exceed LZMA_BLOCK_HEADER_SIZE_MAX. Increasing header_size
- * just means that lzma_block_header_encode() will add Header Padding.
- *
- * \return      - LZMA_OK: Size calculated successfully and stored to
- *                block->header_size.
- *              - LZMA_OPTIONS_ERROR: Unsupported version, filters or
- *                filter options.
- *              - LZMA_PROG_ERROR: Invalid values like compressed_size == 0.
- *
- * \note        This doesn't check that all the options are valid i.e. this
- *              may return LZMA_OK even if lzma_block_header_encode() or
- *              lzma_block_encoder() would fail. If you want to validate the
- *              filter chain, consider using lzma_memlimit_encoder() which as
- *              a side-effect validates the filter chain.
- */
-extern LZMA_API(lzma_ret) lzma_block_header_size(lzma_block *block)
-		lzma_nothrow lzma_attr_warn_unused_result;
-
-
-/**
- * \brief       Encode Block Header
- *
- * The caller must have calculated the size of the Block Header already with
- * lzma_block_header_size(). If a value larger than the one calculated by
- * lzma_block_header_size() is used, the Block Header will be padded to the
- * specified size.
- *
- * \param       out         Beginning of the output buffer. This must be
- *                          at least block->header_size bytes.
- * \param       block       Block options to be encoded.
- *
- * \return      - LZMA_OK: Encoding was successful. block->header_size
- *                bytes were written to output buffer.
- *              - LZMA_OPTIONS_ERROR: Invalid or unsupported options.
- *              - LZMA_PROG_ERROR: Invalid arguments, for example
- *                block->header_size is invalid or block->filters is NULL.
- */
-extern LZMA_API(lzma_ret) lzma_block_header_encode(
-		const lzma_block *block, uint8_t *out)
-		lzma_nothrow lzma_attr_warn_unused_result;
-
-
-/**
- * \brief       Decode Block Header
- *
- * block->version should be set to the highest value supported by the
- * application; currently the only possible version is zero. This function
- * will set version to the lowest value that still supports all the features
- * required by the Block Header.
- *
- * The size of the Block Header must have already been decoded with
- * lzma_block_header_size_decode() macro and stored to block->header_size.
- *
- * block->filters must have been allocated, but they don't need to be
- * initialized (possible existing filter options are not freed).
- *
- * \param       block       Destination for Block options.
- * \param       allocator   lzma_allocator for custom allocator functions.
- *                          Set to NULL to use malloc() (and also free()
- *                          if an error occurs).
- * \param       in          Beginning of the input buffer. This must be
- *                          at least block->header_size bytes.
- *
- * \return      - LZMA_OK: Decoding was successful. block->header_size
- *                bytes were read from the input buffer.
- *              - LZMA_OPTIONS_ERROR: The Block Header specifies some
- *                unsupported options such as unsupported filters. This can
- *                happen also if block->version was set to a too low value
- *                compared to what would be required to properly represent
- *                the information stored in the Block Header.
- *              - LZMA_DATA_ERROR: Block Header is corrupt, for example,
- *                the CRC32 doesn't match.
- *              - LZMA_PROG_ERROR: Invalid arguments, for example
- *                block->header_size is invalid or block->filters is NULL.
- */
-extern LZMA_API(lzma_ret) lzma_block_header_decode(lzma_block *block,
-		lzma_allocator *allocator, const uint8_t *in)
-		lzma_nothrow lzma_attr_warn_unused_result;
-
-
-/**
- * \brief       Validate and set Compressed Size according to Unpadded Size
- *
- * Block Header stores Compressed Size, but Index has Unpadded Size. If the
- * application has already parsed the Index and is now decoding Blocks,
- * it can calculate Compressed Size from Unpadded Size. This function does
- * exactly that with error checking:
- *
- *  - Compressed Size calculated from Unpadded Size must be positive integer,
- *    that is, Unpadded Size must be big enough that after Block Header and
- *    Check fields there's still at least one byte for Compressed Size.
- *
- *  - If Compressed Size was present in Block Header, the new value
- *    calculated from Unpadded Size is compared against the value
- *    from Block Header.
- *
- * \note        This function must be called _after_ decoding the Block Header
- *              field so that it can properly validate Compressed Size if it
- *              was present in Block Header.
- *
- * \return      - LZMA_OK: block->compressed_size was set successfully.
- *              - LZMA_DATA_ERROR: unpadded_size is too small compared to
- *                block->header_size and lzma_check_size(block->check).
- *              - LZMA_PROG_ERROR: Some values are invalid. For example,
- *                block->header_size must be a multiple of four and
- *                between 8 and 1024 inclusive.
- */
-extern LZMA_API(lzma_ret) lzma_block_compressed_size(
-		lzma_block *block, lzma_vli unpadded_size)
-		lzma_nothrow lzma_attr_warn_unused_result;
-
-
-/**
- * \brief       Calculate Unpadded Size
- *
- * The Index field stores Unpadded Size and Uncompressed Size. The latter
- * can be taken directly from the lzma_block structure after coding a Block,
- * but Unpadded Size needs to be calculated from Block Header Size,
- * Compressed Size, and size of the Check field. This is where this function
- * is needed.
- *
- * \return      Unpadded Size on success, or zero on error.
- */
-extern LZMA_API(lzma_vli) lzma_block_unpadded_size(const lzma_block *block)
-		lzma_nothrow lzma_attr_pure;
-
-
-/**
- * \brief       Calculate the total encoded size of a Block
- *
- * This is equivalent to lzma_block_unpadded_size() except that the returned
- * value includes the size of the Block Padding field.
- *
- * \return      On success, total encoded size of the Block. On error,
- *              zero is returned.
- */
-extern LZMA_API(lzma_vli) lzma_block_total_size(const lzma_block *block)
-		lzma_nothrow lzma_attr_pure;
-
-
-/**
- * \brief       Initialize .xz Block encoder
- *
- * Valid actions for lzma_code() are LZMA_RUN, LZMA_SYNC_FLUSH (only if the
- * filter chain supports it), and LZMA_FINISH.
- *
- * \return      - LZMA_OK: All good, continue with lzma_code().
- *              - LZMA_MEM_ERROR
- *              - LZMA_OPTIONS_ERROR
- *              - LZMA_UNSUPPORTED_CHECK: block->check specifies a Check ID
- *                that is not supported by this buid of liblzma. Initializing
- *                the encoder failed.
- *              - LZMA_PROG_ERROR
- */
-extern LZMA_API(lzma_ret) lzma_block_encoder(
-		lzma_stream *strm, lzma_block *block)
-		lzma_nothrow lzma_attr_warn_unused_result;
-
-
-/**
- * \brief       Initialize .xz Block decoder
- *
- * Valid actions for lzma_code() are LZMA_RUN and LZMA_FINISH. Using
- * LZMA_FINISH is not required. It is supported only for convenience.
- *
- * \return      - LZMA_OK: All good, continue with lzma_code().
- *              - LZMA_UNSUPPORTED_CHECK: Initialization was successful, but
- *                the given Check ID is not supported, thus Check will be
- *                ignored.
- *              - LZMA_PROG_ERROR
- *              - LZMA_MEM_ERROR
- */
-extern LZMA_API(lzma_ret) lzma_block_decoder(
-		lzma_stream *strm, lzma_block *block)
-		lzma_nothrow lzma_attr_warn_unused_result;
-
-
-/**
- * \brief       Calculate maximum output size for single-call Block encoding
- *
- * This is equivalent to lzma_stream_buffer_bound() but for .xz Blocks.
- * See the documentation of lzma_stream_buffer_bound().
- */
-extern LZMA_API(size_t) lzma_block_buffer_bound(size_t uncompressed_size)
-		lzma_nothrow;
-
-
-/**
- * \brief       Single-call .xz Block encoder
- *
- * In contrast to the multi-call encoder initialized with
- * lzma_block_encoder(), this function encodes also the Block Header. This
- * is required to make it possible to write appropriate Block Header also
- * in case the data isn't compressible, and different filter chain has to be
- * used to encode the data in uncompressed form using uncompressed chunks
- * of the LZMA2 filter.
- *
- * When the data isn't compressible, header_size, compressed_size, and
- * uncompressed_size are set just like when the data was compressible, but
- * it is possible that header_size is too small to hold the filter chain
- * specified in block->filters, because that isn't necessarily the filter
- * chain that was actually used to encode the data. lzma_block_unpadded_size()
- * still works normally, because it doesn't read the filters array.
- *
- * \param       block       Block options: block->version, block->check,
- *                          and block->filters must have been initialized.
- * \param       allocator   lzma_allocator for custom allocator functions.
- *                          Set to NULL to use malloc() and free().
- * \param       in          Beginning of the input buffer
- * \param       in_size     Size of the input buffer
- * \param       out         Beginning of the output buffer
- * \param       out_pos     The next byte will be written to out[*out_pos].
- *                          *out_pos is updated only if encoding succeeds.
- * \param       out_size    Size of the out buffer; the first byte into
- *                          which no data is written to is out[out_size].
- *
- * \return      - LZMA_OK: Encoding was successful.
- *              - LZMA_BUF_ERROR: Not enough output buffer space.
- *              - LZMA_UNSUPPORTED_CHECK
- *              - LZMA_OPTIONS_ERROR
- *              - LZMA_MEM_ERROR
- *              - LZMA_DATA_ERROR
- *              - LZMA_PROG_ERROR
- */
-extern LZMA_API(lzma_ret) lzma_block_buffer_encode(
-		lzma_block *block, lzma_allocator *allocator,
-		const uint8_t *in, size_t in_size,
-		uint8_t *out, size_t *out_pos, size_t out_size)
-		lzma_nothrow lzma_attr_warn_unused_result;
-
-
-/**
- * \brief       Single-call .xz Block decoder
- *
- * This is single-call equivalent of lzma_block_decoder(), and requires that
- * the caller has already decoded Block Header and checked its memory usage.
- *
- * \param       block       Block options just like with lzma_block_decoder().
- * \param       allocator   lzma_allocator for custom allocator functions.
- *                          Set to NULL to use malloc() and free().
- * \param       in          Beginning of the input buffer
- * \param       in_pos      The next byte will be read from in[*in_pos].
- *                          *in_pos is updated only if decoding succeeds.
- * \param       in_size     Size of the input buffer; the first byte that
- *                          won't be read is in[in_size].
- * \param       out         Beginning of the output buffer
- * \param       out_pos     The next byte will be written to out[*out_pos].
- *                          *out_pos is updated only if encoding succeeds.
- * \param       out_size    Size of the out buffer; the first byte into
- *                          which no data is written to is out[out_size].
- *
- * \return      - LZMA_OK: Decoding was successful.
- *              - LZMA_OPTIONS_ERROR
- *              - LZMA_DATA_ERROR
- *              - LZMA_MEM_ERROR
- *              - LZMA_BUF_ERROR: Output buffer was too small.
- *              - LZMA_PROG_ERROR
- */
-extern LZMA_API(lzma_ret) lzma_block_buffer_decode(
-		lzma_block *block, lzma_allocator *allocator,
-		const uint8_t *in, size_t *in_pos, size_t in_size,
-		uint8_t *out, size_t *out_pos, size_t out_size)
-		lzma_nothrow;
diff --git a/src/extra/xz/api/lzma/check.h b/src/extra/xz/api/lzma/check.h
deleted file mode 100644
index 6a243db..0000000
--- a/src/extra/xz/api/lzma/check.h
+++ /dev/null
@@ -1,150 +0,0 @@
-/**
- * \file        lzma/check.h
- * \brief       Integrity checks
- */
-
-/*
- * Author: Lasse Collin
- *
- * This file has been put into the public domain.
- * You can do whatever you want with this file.
- *
- * See ../lzma.h for information about liblzma as a whole.
- */
-
-#ifndef LZMA_H_INTERNAL
-#	error Never include this file directly. Use <lzma.h> instead.
-#endif
-
-
-/**
- * \brief       Type of the integrity check (Check ID)
- *
- * The .xz format supports multiple types of checks that are calculated
- * from the uncompressed data. They vary in both speed and ability to
- * detect errors.
- */
-typedef enum {
-	LZMA_CHECK_NONE     = 0,
-		/**<
-		 * No Check is calculated.
-		 *
-		 * Size of the Check field: 0 bytes
-		 */
-
-	LZMA_CHECK_CRC32    = 1,
-		/**<
-		 * CRC32 using the polynomial from the IEEE 802.3 standard
-		 *
-		 * Size of the Check field: 4 bytes
-		 */
-
-	LZMA_CHECK_CRC64    = 4,
-		/**<
-		 * CRC64 using the polynomial from the ECMA-182 standard
-		 *
-		 * Size of the Check field: 8 bytes
-		 */
-
-	LZMA_CHECK_SHA256   = 10
-		/**<
-		 * SHA-256
-		 *
-		 * Size of the Check field: 32 bytes
-		 */
-} lzma_check;
-
-
-/**
- * \brief       Maximum valid Check ID
- *
- * The .xz file format specification specifies 16 Check IDs (0-15). Some
- * of them are only reserved, that is, no actual Check algorithm has been
- * assigned. When decoding, liblzma still accepts unknown Check IDs for
- * future compatibility. If a valid but unsupported Check ID is detected,
- * liblzma can indicate a warning; see the flags LZMA_TELL_NO_CHECK,
- * LZMA_TELL_UNSUPPORTED_CHECK, and LZMA_TELL_ANY_CHECK in container.h.
- */
-#define LZMA_CHECK_ID_MAX 15
-
-
-/**
- * \brief       Test if the given Check ID is supported
- *
- * Return true if the given Check ID is supported by this liblzma build.
- * Otherwise false is returned. It is safe to call this with a value that
- * is not in the range [0, 15]; in that case the return value is always false.
- *
- * You can assume that LZMA_CHECK_NONE and LZMA_CHECK_CRC32 are always
- * supported (even if liblzma is built with limited features).
- */
-extern LZMA_API(lzma_bool) lzma_check_is_supported(lzma_check check)
-		lzma_nothrow lzma_attr_const;
-
-
-/**
- * \brief       Get the size of the Check field with the given Check ID
- *
- * Although not all Check IDs have a check algorithm associated, the size of
- * every Check is already frozen. This function returns the size (in bytes) of
- * the Check field with the specified Check ID. The values are:
- * { 0, 4, 4, 4, 8, 8, 8, 16, 16, 16, 32, 32, 32, 64, 64, 64 }
- *
- * If the argument is not in the range [0, 15], UINT32_MAX is returned.
- */
-extern LZMA_API(uint32_t) lzma_check_size(lzma_check check)
-		lzma_nothrow lzma_attr_const;
-
-
-/**
- * \brief       Maximum size of a Check field
- */
-#define LZMA_CHECK_SIZE_MAX 64
-
-
-/**
- * \brief       Calculate CRC32
- *
- * Calculate CRC32 using the polynomial from the IEEE 802.3 standard.
- *
- * \param       buf     Pointer to the input buffer
- * \param       size    Size of the input buffer
- * \param       crc     Previously returned CRC value. This is used to
- *                      calculate the CRC of a big buffer in smaller chunks.
- *                      Set to zero when starting a new calculation.
- *
- * \return      Updated CRC value, which can be passed to this function
- *              again to continue CRC calculation.
- */
-extern LZMA_API(uint32_t) lzma_crc32(
-		const uint8_t *buf, size_t size, uint32_t crc)
-		lzma_nothrow lzma_attr_pure;
-
-
-/**
- * \brief       Calculate CRC64
- *
- * Calculate CRC64 using the polynomial from the ECMA-182 standard.
- *
- * This function is used similarly to lzma_crc32(). See its documentation.
- */
-extern LZMA_API(uint64_t) lzma_crc64(
-		const uint8_t *buf, size_t size, uint64_t crc)
-		lzma_nothrow lzma_attr_pure;
-
-
-/*
- * SHA-256 functions are currently not exported to public API.
- * Contact Lasse Collin if you think it should be.
- */
-
-
-/**
- * \brief       Get the type of the integrity check
- *
- * This function can be called only immediately after lzma_code() has
- * returned LZMA_NO_CHECK, LZMA_UNSUPPORTED_CHECK, or LZMA_GET_CHECK.
- * Calling this function in any other situation has undefined behavior.
- */
-extern LZMA_API(lzma_check) lzma_get_check(const lzma_stream *strm)
-		lzma_nothrow;
diff --git a/src/extra/xz/api/lzma/container.h b/src/extra/xz/api/lzma/container.h
deleted file mode 100644
index 7a9ffc6..0000000
--- a/src/extra/xz/api/lzma/container.h
+++ /dev/null
@@ -1,424 +0,0 @@
-/**
- * \file        lzma/container.h
- * \brief       File formats
- */
-
-/*
- * Author: Lasse Collin
- *
- * This file has been put into the public domain.
- * You can do whatever you want with this file.
- *
- * See ../lzma.h for information about liblzma as a whole.
- */
-
-#ifndef LZMA_H_INTERNAL
-#	error Never include this file directly. Use <lzma.h> instead.
-#endif
-
-
-/************
- * Encoding *
- ************/
-
-/**
- * \brief       Default compression preset
- *
- * It's not straightforward to recommend a default preset, because in some
- * cases keeping the resource usage relatively low is more important that
- * getting the maximum compression ratio.
- */
-#define LZMA_PRESET_DEFAULT     UINT32_C(6)
-
-
-/**
- * \brief       Mask for preset level
- *
- * This is useful only if you need to extract the level from the preset
- * variable. That should be rare.
- */
-#define LZMA_PRESET_LEVEL_MASK  UINT32_C(0x1F)
-
-
-/*
- * Preset flags
- *
- * Currently only one flag is defined.
- */
-
-/**
- * \brief       Extreme compression preset
- *
- * This flag modifies the preset to make the encoding significantly slower
- * while improving the compression ratio only marginally. This is useful
- * when you don't mind wasting time to get as small result as possible.
- *
- * This flag doesn't affect the memory usage requirements of the decoder (at
- * least not significantly). The memory usage of the encoder may be increased
- * a little but only at the lowest preset levels (0-3).
- */
-#define LZMA_PRESET_EXTREME       (UINT32_C(1) << 31)
-
-
-/**
- * \brief       Calculate approximate memory usage of easy encoder
- *
- * This function is a wrapper for lzma_raw_encoder_memusage().
- *
- * \param       preset  Compression preset (level and possible flags)
- *
- * \return      Number of bytes of memory required for the given
- *              preset when encoding. If an error occurs, for example
- *              due to unsupported preset, UINT64_MAX is returned.
- */
-extern LZMA_API(uint64_t) lzma_easy_encoder_memusage(uint32_t preset)
-		lzma_nothrow lzma_attr_pure;
-
-
-/**
- * \brief       Calculate approximate decoder memory usage of a preset
- *
- * This function is a wrapper for lzma_raw_decoder_memusage().
- *
- * \param       preset  Compression preset (level and possible flags)
- *
- * \return      Number of bytes of memory required to decompress a file
- *              that was compressed using the given preset. If an error
- *              occurs, for example due to unsupported preset, UINT64_MAX
- *              is returned.
- */
-extern LZMA_API(uint64_t) lzma_easy_decoder_memusage(uint32_t preset)
-		lzma_nothrow lzma_attr_pure;
-
-
-/**
- * \brief       Initialize .xz Stream encoder using a preset number
- *
- * This function is intended for those who just want to use the basic features
- * if liblzma (that is, most developers out there).
- *
- * \param       strm    Pointer to lzma_stream that is at least initialized
- *                      with LZMA_STREAM_INIT.
- * \param       preset  Compression preset to use. A preset consist of level
- *                      number and zero or more flags. Usually flags aren't
- *                      used, so preset is simply a number [0, 9] which match
- *                      the options -0 ... -9 of the xz command line tool.
- *                      Additional flags can be be set using bitwise-or with
- *                      the preset level number, e.g. 6 | LZMA_PRESET_EXTREME.
- * \param       check   Integrity check type to use. See check.h for available
- *                      checks. The xz command line tool defaults to
- *                      LZMA_CHECK_CRC64, which is a good choice if you are
- *                      unsure. LZMA_CHECK_CRC32 is good too as long as the
- *                      uncompressed file is not many gigabytes.
- *
- * \return      - LZMA_OK: Initialization succeeded. Use lzma_code() to
- *                encode your data.
- *              - LZMA_MEM_ERROR: Memory allocation failed.
- *              - LZMA_OPTIONS_ERROR: The given compression preset is not
- *                supported by this build of liblzma.
- *              - LZMA_UNSUPPORTED_CHECK: The given check type is not
- *                supported by this liblzma build.
- *              - LZMA_PROG_ERROR: One or more of the parameters have values
- *                that will never be valid. For example, strm == NULL.
- *
- * If initialization fails (return value is not LZMA_OK), all the memory
- * allocated for *strm by liblzma is always freed. Thus, there is no need
- * to call lzma_end() after failed initialization.
- *
- * If initialization succeeds, use lzma_code() to do the actual encoding.
- * Valid values for `action' (the second argument of lzma_code()) are
- * LZMA_RUN, LZMA_SYNC_FLUSH, LZMA_FULL_FLUSH, and LZMA_FINISH. In future,
- * there may be compression levels or flags that don't support LZMA_SYNC_FLUSH.
- */
-extern LZMA_API(lzma_ret) lzma_easy_encoder(
-		lzma_stream *strm, uint32_t preset, lzma_check check)
-		lzma_nothrow lzma_attr_warn_unused_result;
-
-
-/**
- * \brief       Single-call .xz Stream encoding using a preset number
- *
- * The maximum required output buffer size can be calculated with
- * lzma_stream_buffer_bound().
- *
- * \param       preset      Compression preset to use. See the description
- *                          in lzma_easy_encoder().
- * \param       check       Type of the integrity check to calculate from
- *                          uncompressed data.
- * \param       allocator   lzma_allocator for custom allocator functions.
- *                          Set to NULL to use malloc() and free().
- * \param       in          Beginning of the input buffer
- * \param       in_size     Size of the input buffer
- * \param       out         Beginning of the output buffer
- * \param       out_pos     The next byte will be written to out[*out_pos].
- *                          *out_pos is updated only if encoding succeeds.
- * \param       out_size    Size of the out buffer; the first byte into
- *                          which no data is written to is out[out_size].
- *
- * \return      - LZMA_OK: Encoding was successful.
- *              - LZMA_BUF_ERROR: Not enough output buffer space.
- *              - LZMA_UNSUPPORTED_CHECK
- *              - LZMA_OPTIONS_ERROR
- *              - LZMA_MEM_ERROR
- *              - LZMA_DATA_ERROR
- *              - LZMA_PROG_ERROR
- */
-extern LZMA_API(lzma_ret) lzma_easy_buffer_encode(
-		uint32_t preset, lzma_check check,
-		lzma_allocator *allocator, const uint8_t *in, size_t in_size,
-		uint8_t *out, size_t *out_pos, size_t out_size) lzma_nothrow;
-
-
-/**
- * \brief       Initialize .xz Stream encoder using a custom filter chain
- *
- * \param       strm    Pointer to properly prepared lzma_stream
- * \param       filters Array of filters. This must be terminated with
- *                      filters[n].id = LZMA_VLI_UNKNOWN. See filter.h for
- *                      more information.
- * \param       check   Type of the integrity check to calculate from
- *                      uncompressed data.
- *
- * \return      - LZMA_OK: Initialization was successful.
- *              - LZMA_MEM_ERROR
- *              - LZMA_UNSUPPORTED_CHECK
- *              - LZMA_OPTIONS_ERROR
- *              - LZMA_PROG_ERROR
- */
-extern LZMA_API(lzma_ret) lzma_stream_encoder(lzma_stream *strm,
-		const lzma_filter *filters, lzma_check check)
-		lzma_nothrow lzma_attr_warn_unused_result;
-
-
-/**
- * \brief       Initialize .lzma encoder (legacy file format)
- *
- * The .lzma format is sometimes called the LZMA_Alone format, which is the
- * reason for the name of this function. The .lzma format supports only the
- * LZMA1 filter. There is no support for integrity checks like CRC32.
- *
- * Use this function if and only if you need to create files readable by
- * legacy LZMA tools such as LZMA Utils 4.32.x. Moving to the .xz format
- * is strongly recommended.
- *
- * The valid action values for lzma_code() are LZMA_RUN and LZMA_FINISH.
- * No kind of flushing is supported, because the file format doesn't make
- * it possible.
- *
- * \return      - LZMA_OK
- *              - LZMA_MEM_ERROR
- *              - LZMA_OPTIONS_ERROR
- *              - LZMA_PROG_ERROR
- */
-extern LZMA_API(lzma_ret) lzma_alone_encoder(
-		lzma_stream *strm, const lzma_options_lzma *options)
-		lzma_nothrow lzma_attr_warn_unused_result;
-
-
-/**
- * \brief       Calculate output buffer size for single-call Stream encoder
- *
- * When trying to compress uncompressible data, the encoded size will be
- * slightly bigger than the input data. This function calculates how much
- * output buffer space is required to be sure that lzma_stream_buffer_encode()
- * doesn't return LZMA_BUF_ERROR.
- *
- * The calculated value is not exact, but it is guaranteed to be big enough.
- * The actual maximum output space required may be slightly smaller (up to
- * about 100 bytes). This should not be a problem in practice.
- *
- * If the calculated maximum size doesn't fit into size_t or would make the
- * Stream grow past LZMA_VLI_MAX (which should never happen in practice),
- * zero is returned to indicate the error.
- *
- * \note        The limit calculated by this function applies only to
- *              single-call encoding. Multi-call encoding may (and probably
- *              will) have larger maximum expansion when encoding
- *              uncompressible data. Currently there is no function to
- *              calculate the maximum expansion of multi-call encoding.
- */
-extern LZMA_API(size_t) lzma_stream_buffer_bound(size_t uncompressed_size)
-		lzma_nothrow;
-
-
-/**
- * \brief       Single-call .xz Stream encoder
- *
- * \param       filters     Array of filters. This must be terminated with
- *                          filters[n].id = LZMA_VLI_UNKNOWN. See filter.h
- *                          for more information.
- * \param       check       Type of the integrity check to calculate from
- *                          uncompressed data.
- * \param       allocator   lzma_allocator for custom allocator functions.
- *                          Set to NULL to use malloc() and free().
- * \param       in          Beginning of the input buffer
- * \param       in_size     Size of the input buffer
- * \param       out         Beginning of the output buffer
- * \param       out_pos     The next byte will be written to out[*out_pos].
- *                          *out_pos is updated only if encoding succeeds.
- * \param       out_size    Size of the out buffer; the first byte into
- *                          which no data is written to is out[out_size].
- *
- * \return      - LZMA_OK: Encoding was successful.
- *              - LZMA_BUF_ERROR: Not enough output buffer space.
- *              - LZMA_UNSUPPORTED_CHECK
- *              - LZMA_OPTIONS_ERROR
- *              - LZMA_MEM_ERROR
- *              - LZMA_DATA_ERROR
- *              - LZMA_PROG_ERROR
- */
-extern LZMA_API(lzma_ret) lzma_stream_buffer_encode(
-		lzma_filter *filters, lzma_check check,
-		lzma_allocator *allocator, const uint8_t *in, size_t in_size,
-		uint8_t *out, size_t *out_pos, size_t out_size)
-		lzma_nothrow lzma_attr_warn_unused_result;
-
-
-/************
- * Decoding *
- ************/
-
-/**
- * This flag makes lzma_code() return LZMA_NO_CHECK if the input stream
- * being decoded has no integrity check. Note that when used with
- * lzma_auto_decoder(), all .lzma files will trigger LZMA_NO_CHECK
- * if LZMA_TELL_NO_CHECK is used.
- */
-#define LZMA_TELL_NO_CHECK              UINT32_C(0x01)
-
-
-/**
- * This flag makes lzma_code() return LZMA_UNSUPPORTED_CHECK if the input
- * stream has an integrity check, but the type of the integrity check is not
- * supported by this liblzma version or build. Such files can still be
- * decoded, but the integrity check cannot be verified.
- */
-#define LZMA_TELL_UNSUPPORTED_CHECK     UINT32_C(0x02)
-
-
-/**
- * This flag makes lzma_code() return LZMA_GET_CHECK as soon as the type
- * of the integrity check is known. The type can then be got with
- * lzma_get_check().
- */
-#define LZMA_TELL_ANY_CHECK             UINT32_C(0x04)
-
-
-/**
- * This flag enables decoding of concatenated files with file formats that
- * allow concatenating compressed files as is. From the formats currently
- * supported by liblzma, only the .xz format allows concatenated files.
- * Concatenated files are not allowed with the legacy .lzma format.
- *
- * This flag also affects the usage of the `action' argument for lzma_code().
- * When LZMA_CONCATENATED is used, lzma_code() won't return LZMA_STREAM_END
- * unless LZMA_FINISH is used as `action'. Thus, the application has to set
- * LZMA_FINISH in the same way as it does when encoding.
- *
- * If LZMA_CONCATENATED is not used, the decoders still accept LZMA_FINISH
- * as `action' for lzma_code(), but the usage of LZMA_FINISH isn't required.
- */
-#define LZMA_CONCATENATED               UINT32_C(0x08)
-
-
-/**
- * \brief       Initialize .xz Stream decoder
- *
- * \param       strm        Pointer to properly prepared lzma_stream
- * \param       memlimit    Memory usage limit as bytes. Use UINT64_MAX
- *                          to effectively disable the limiter.
- * \param       flags       Bitwise-or of zero or more of the decoder flags:
- *                          LZMA_TELL_NO_CHECK, LZMA_TELL_UNSUPPORTED_CHECK,
- *                          LZMA_TELL_ANY_CHECK, LZMA_CONCATENATED
- *
- * \return      - LZMA_OK: Initialization was successful.
- *              - LZMA_MEM_ERROR: Cannot allocate memory.
- *              - LZMA_OPTIONS_ERROR: Unsupported flags
- *              - LZMA_PROG_ERROR
- */
-extern LZMA_API(lzma_ret) lzma_stream_decoder(
-		lzma_stream *strm, uint64_t memlimit, uint32_t flags)
-		lzma_nothrow lzma_attr_warn_unused_result;
-
-
-/**
- * \brief       Decode .xz Streams and .lzma files with autodetection
- *
- * This decoder autodetects between the .xz and .lzma file formats, and
- * calls lzma_stream_decoder() or lzma_alone_decoder() once the type
- * of the input file has been detected.
- *
- * \param       strm        Pointer to properly prepared lzma_stream
- * \param       memlimit    Memory usage limit as bytes. Use UINT64_MAX
- *                          to effectively disable the limiter.
- * \param       flags       Bitwise-or of flags, or zero for no flags.
- *
- * \return      - LZMA_OK: Initialization was successful.
- *              - LZMA_MEM_ERROR: Cannot allocate memory.
- *              - LZMA_OPTIONS_ERROR: Unsupported flags
- *              - LZMA_PROG_ERROR
- */
-extern LZMA_API(lzma_ret) lzma_auto_decoder(
-		lzma_stream *strm, uint64_t memlimit, uint32_t flags)
-		lzma_nothrow lzma_attr_warn_unused_result;
-
-
-/**
- * \brief       Initialize .lzma decoder (legacy file format)
- *
- * Valid `action' arguments to lzma_code() are LZMA_RUN and LZMA_FINISH.
- * There is no need to use LZMA_FINISH, but allowing it may simplify
- * certain types of applications.
- *
- * \return      - LZMA_OK
- *              - LZMA_MEM_ERROR
- *              - LZMA_PROG_ERROR
- */
-extern LZMA_API(lzma_ret) lzma_alone_decoder(
-		lzma_stream *strm, uint64_t memlimit)
-		lzma_nothrow lzma_attr_warn_unused_result;
-
-
-/**
- * \brief       Single-call .xz Stream decoder
- *
- * \param       memlimit    Pointer to how much memory the decoder is allowed
- *                          to allocate. The value pointed by this pointer is
- *                          modified if and only if LZMA_MEMLIMIT_ERROR is
- *                          returned.
- * \param       flags       Bitwise-or of zero or more of the decoder flags:
- *                          LZMA_TELL_NO_CHECK, LZMA_TELL_UNSUPPORTED_CHECK,
- *                          LZMA_CONCATENATED. Note that LZMA_TELL_ANY_CHECK
- *                          is not allowed and will return LZMA_PROG_ERROR.
- * \param       allocator   lzma_allocator for custom allocator functions.
- *                          Set to NULL to use malloc() and free().
- * \param       in          Beginning of the input buffer
- * \param       in_pos      The next byte will be read from in[*in_pos].
- *                          *in_pos is updated only if decoding succeeds.
- * \param       in_size     Size of the input buffer; the first byte that
- *                          won't be read is in[in_size].
- * \param       out         Beginning of the output buffer
- * \param       out_pos     The next byte will be written to out[*out_pos].
- *                          *out_pos is updated only if decoding succeeds.
- * \param       out_size    Size of the out buffer; the first byte into
- *                          which no data is written to is out[out_size].
- *
- * \return      - LZMA_OK: Decoding was successful.
- *              - LZMA_FORMAT_ERROR
- *              - LZMA_OPTIONS_ERROR
- *              - LZMA_DATA_ERROR
- *              - LZMA_NO_CHECK: This can be returned only if using
- *                the LZMA_TELL_NO_CHECK flag.
- *              - LZMA_UNSUPPORTED_CHECK: This can be returned only if using
- *                the LZMA_TELL_UNSUPPORTED_CHECK flag.
- *              - LZMA_MEM_ERROR
- *              - LZMA_MEMLIMIT_ERROR: Memory usage limit was reached.
- *                The minimum required memlimit value was stored to *memlimit.
- *              - LZMA_BUF_ERROR: Output buffer was too small.
- *              - LZMA_PROG_ERROR
- */
-extern LZMA_API(lzma_ret) lzma_stream_buffer_decode(
-		uint64_t *memlimit, uint32_t flags, lzma_allocator *allocator,
-		const uint8_t *in, size_t *in_pos, size_t in_size,
-		uint8_t *out, size_t *out_pos, size_t out_size)
-		lzma_nothrow lzma_attr_warn_unused_result;
diff --git a/src/extra/xz/api/lzma/delta.h b/src/extra/xz/api/lzma/delta.h
deleted file mode 100644
index 592fc4f..0000000
--- a/src/extra/xz/api/lzma/delta.h
+++ /dev/null
@@ -1,77 +0,0 @@
-/**
- * \file        lzma/delta.h
- * \brief       Delta filter
- */
-
-/*
- * Author: Lasse Collin
- *
- * This file has been put into the public domain.
- * You can do whatever you want with this file.
- *
- * See ../lzma.h for information about liblzma as a whole.
- */
-
-#ifndef LZMA_H_INTERNAL
-#	error Never include this file directly. Use <lzma.h> instead.
-#endif
-
-
-/**
- * \brief       Filter ID
- *
- * Filter ID of the Delta filter. This is used as lzma_filter.id.
- */
-#define LZMA_FILTER_DELTA       LZMA_VLI_C(0x03)
-
-
-/**
- * \brief       Type of the delta calculation
- *
- * Currently only byte-wise delta is supported. Other possible types could
- * be, for example, delta of 16/32/64-bit little/big endian integers, but
- * these are not currently planned since byte-wise delta is almost as good.
- */
-typedef enum {
-	LZMA_DELTA_TYPE_BYTE
-} lzma_delta_type;
-
-
-/**
- * \brief       Options for the Delta filter
- *
- * These options are needed by both encoder and decoder.
- */
-typedef struct {
-	/** For now, this must always be LZMA_DELTA_TYPE_BYTE. */
-	lzma_delta_type type;
-
-	/**
-	 * \brief       Delta distance
-	 *
-	 * With the only currently supported type, LZMA_DELTA_TYPE_BYTE,
-	 * the distance is as bytes.
-	 *
-	 * Examples:
-	 *  - 16-bit stereo audio: distance = 4 bytes
-	 *  - 24-bit RGB image data: distance = 3 bytes
-	 */
-	uint32_t dist;
-#	define LZMA_DELTA_DIST_MIN 1
-#	define LZMA_DELTA_DIST_MAX 256
-
-	/*
-	 * Reserved space to allow possible future extensions without
-	 * breaking the ABI. You should not touch these, because the names
-	 * of these variables may change. These are and will never be used
-	 * when type is LZMA_DELTA_TYPE_BYTE, so it is safe to leave these
-	 * uninitialized.
-	 */
-	uint32_t reserved_int1;
-	uint32_t reserved_int2;
-	uint32_t reserved_int3;
-	uint32_t reserved_int4;
-	void *reserved_ptr1;
-	void *reserved_ptr2;
-
-} lzma_options_delta;
diff --git a/src/extra/xz/api/lzma/filter.h b/src/extra/xz/api/lzma/filter.h
deleted file mode 100644
index e0bc163..0000000
--- a/src/extra/xz/api/lzma/filter.h
+++ /dev/null
@@ -1,424 +0,0 @@
-/**
- * \file        lzma/filter.h
- * \brief       Common filter related types and functions
- */
-
-/*
- * Author: Lasse Collin
- *
- * This file has been put into the public domain.
- * You can do whatever you want with this file.
- *
- * See ../lzma.h for information about liblzma as a whole.
- */
-
-#ifndef LZMA_H_INTERNAL
-#	error Never include this file directly. Use <lzma.h> instead.
-#endif
-
-
-/**
- * \brief       Maximum number of filters in a chain
- *
- * A filter chain can have 1-4 filters, of which three are allowed to change
- * the size of the data. Usually only one or two filters are needed.
- */
-#define LZMA_FILTERS_MAX 4
-
-
-/**
- * \brief       Filter options
- *
- * This structure is used to pass Filter ID and a pointer filter's
- * options to liblzma. A few functions work with a single lzma_filter
- * structure, while most functions expect a filter chain.
- *
- * A filter chain is indicated with an array of lzma_filter structures.
- * The array is terminated with .id = LZMA_VLI_UNKNOWN. Thus, the filter
- * array must have LZMA_FILTERS_MAX + 1 elements (that is, five) to
- * be able to hold any arbitrary filter chain. This is important when
- * using lzma_block_header_decode() from block.h, because too small
- * array would make liblzma write past the end of the filters array.
- */
-typedef struct {
-	/**
-	 * \brief       Filter ID
-	 *
-	 * Use constants whose name begin with `LZMA_FILTER_' to specify
-	 * different filters. In an array of lzma_filter structures, use
-	 * LZMA_VLI_UNKNOWN to indicate end of filters.
-	 *
-	 * \note        This is not an enum, because on some systems enums
-	 *              cannot be 64-bit.
-	 */
-	lzma_vli id;
-
-	/**
-	 * \brief       Pointer to filter-specific options structure
-	 *
-	 * If the filter doesn't need options, set this to NULL. If id is
-	 * set to LZMA_VLI_UNKNOWN, options is ignored, and thus
-	 * doesn't need be initialized.
-	 */
-	void *options;
-
-} lzma_filter;
-
-
-/**
- * \brief       Test if the given Filter ID is supported for encoding
- *
- * Return true if the give Filter ID is supported for encoding by this
- * liblzma build. Otherwise false is returned.
- *
- * There is no way to list which filters are available in this particular
- * liblzma version and build. It would be useless, because the application
- * couldn't know what kind of options the filter would need.
- */
-extern LZMA_API(lzma_bool) lzma_filter_encoder_is_supported(lzma_vli id)
-		lzma_nothrow lzma_attr_const;
-
-
-/**
- * \brief       Test if the given Filter ID is supported for decoding
- *
- * Return true if the give Filter ID is supported for decoding by this
- * liblzma build. Otherwise false is returned.
- */
-extern LZMA_API(lzma_bool) lzma_filter_decoder_is_supported(lzma_vli id)
-		lzma_nothrow lzma_attr_const;
-
-
-/**
- * \brief       Copy the filters array
- *
- * Copy the Filter IDs and filter-specific options from src to dest.
- * Up to LZMA_FILTERS_MAX filters are copied, plus the terminating
- * .id == LZMA_VLI_UNKNOWN. Thus, dest should have at least
- * LZMA_FILTERS_MAX + 1 elements space unless the caller knows that
- * src is smaller than that.
- *
- * Unless the filter-specific options is NULL, the Filter ID has to be
- * supported by liblzma, because liblzma needs to know the size of every
- * filter-specific options structure. The filter-specific options are not
- * validated. If options is NULL, any unsupported Filter IDs are copied
- * without returning an error.
- *
- * Old filter-specific options in dest are not freed, so dest doesn't
- * need to be initialized by the caller in any way.
- *
- * If an error occurs, memory possibly already allocated by this function
- * is always freed.
- *
- * \return      - LZMA_OK
- *              - LZMA_MEM_ERROR
- *              - LZMA_OPTIONS_ERROR: Unsupported Filter ID and its options
- *                is not NULL.
- *              - LZMA_PROG_ERROR: src or dest is NULL.
- */
-extern LZMA_API(lzma_ret) lzma_filters_copy(const lzma_filter *src,
-		lzma_filter *dest, lzma_allocator *allocator) lzma_nothrow;
-
-
-/**
- * \brief       Calculate approximate memory requirements for raw encoder
- *
- * This function can be used to calculate the memory requirements for
- * Block and Stream encoders too because Block and Stream encoders don't
- * need significantly more memory than raw encoder.
- *
- * \param       filters     Array of filters terminated with
- *                          .id == LZMA_VLI_UNKNOWN.
- *
- * \return      Number of bytes of memory required for the given
- *              filter chain when encoding. If an error occurs,
- *              for example due to unsupported filter chain,
- *              UINT64_MAX is returned.
- */
-extern LZMA_API(uint64_t) lzma_raw_encoder_memusage(const lzma_filter *filters)
-		lzma_nothrow lzma_attr_pure;
-
-
-/**
- * \brief       Calculate approximate memory requirements for raw decoder
- *
- * This function can be used to calculate the memory requirements for
- * Block and Stream decoders too because Block and Stream decoders don't
- * need significantly more memory than raw decoder.
- *
- * \param       filters     Array of filters terminated with
- *                          .id == LZMA_VLI_UNKNOWN.
- *
- * \return      Number of bytes of memory required for the given
- *              filter chain when decoding. If an error occurs,
- *              for example due to unsupported filter chain,
- *              UINT64_MAX is returned.
- */
-extern LZMA_API(uint64_t) lzma_raw_decoder_memusage(const lzma_filter *filters)
-		lzma_nothrow lzma_attr_pure;
-
-
-/**
- * \brief       Initialize raw encoder
- *
- * This function may be useful when implementing custom file formats.
- *
- * \param       strm    Pointer to properly prepared lzma_stream
- * \param       filters Array of lzma_filter structures. The end of the
- *                      array must be marked with .id = LZMA_VLI_UNKNOWN.
- *
- * The `action' with lzma_code() can be LZMA_RUN, LZMA_SYNC_FLUSH (if the
- * filter chain supports it), or LZMA_FINISH.
- *
- * \return      - LZMA_OK
- *              - LZMA_MEM_ERROR
- *              - LZMA_OPTIONS_ERROR
- *              - LZMA_PROG_ERROR
- */
-extern LZMA_API(lzma_ret) lzma_raw_encoder(
-		lzma_stream *strm, const lzma_filter *filters)
-		lzma_nothrow lzma_attr_warn_unused_result;
-
-
-/**
- * \brief       Initialize raw decoder
- *
- * The initialization of raw decoder goes similarly to raw encoder.
- *
- * The `action' with lzma_code() can be LZMA_RUN or LZMA_FINISH. Using
- * LZMA_FINISH is not required, it is supported just for convenience.
- *
- * \return      - LZMA_OK
- *              - LZMA_MEM_ERROR
- *              - LZMA_OPTIONS_ERROR
- *              - LZMA_PROG_ERROR
- */
-extern LZMA_API(lzma_ret) lzma_raw_decoder(
-		lzma_stream *strm, const lzma_filter *filters)
-		lzma_nothrow lzma_attr_warn_unused_result;
-
-
-/**
- * \brief       Update the filter chain in the encoder
- *
- * This function is for advanced users only. This function has two slightly
- * different purposes:
- *
- *  - After LZMA_FULL_FLUSH when using Stream encoder: Set a new filter
- *    chain, which will be used starting from the next Block.
- *
- *  - After LZMA_SYNC_FLUSH using Raw, Block, or Stream encoder: Change
- *    the filter-specific options in the middle of encoding. The actual
- *    filters in the chain (Filter IDs) cannot be changed. In the future,
- *    it might become possible to change the filter options without
- *    using LZMA_SYNC_FLUSH.
- *
- * While rarely useful, this function may be called also when no data has
- * been compressed yet. In that case, this function will behave as if
- * LZMA_FULL_FLUSH (Stream encoder) or LZMA_SYNC_FLUSH (Raw or Block
- * encoder) had been used right before calling this function.
- *
- * \return      - LZMA_OK
- *              - LZMA_MEM_ERROR
- *              - LZMA_MEMLIMIT_ERROR
- *              - LZMA_OPTIONS_ERROR
- *              - LZMA_PROG_ERROR
- */
-extern LZMA_API(lzma_ret) lzma_filters_update(
-		lzma_stream *strm, const lzma_filter *filters) lzma_nothrow;
-
-
-/**
- * \brief       Single-call raw encoder
- *
- * \param       filters     Array of lzma_filter structures. The end of the
- *                          array must be marked with .id = LZMA_VLI_UNKNOWN.
- * \param       allocator   lzma_allocator for custom allocator functions.
- *                          Set to NULL to use malloc() and free().
- * \param       in          Beginning of the input buffer
- * \param       in_size     Size of the input buffer
- * \param       out         Beginning of the output buffer
- * \param       out_pos     The next byte will be written to out[*out_pos].
- *                          *out_pos is updated only if encoding succeeds.
- * \param       out_size    Size of the out buffer; the first byte into
- *                          which no data is written to is out[out_size].
- *
- * \return      - LZMA_OK: Encoding was successful.
- *              - LZMA_BUF_ERROR: Not enough output buffer space.
- *              - LZMA_OPTIONS_ERROR
- *              - LZMA_MEM_ERROR
- *              - LZMA_DATA_ERROR
- *              - LZMA_PROG_ERROR
- *
- * \note        There is no function to calculate how big output buffer
- *              would surely be big enough. (lzma_stream_buffer_bound()
- *              works only for lzma_stream_buffer_encode(); raw encoder
- *              won't necessarily meet that bound.)
- */
-extern LZMA_API(lzma_ret) lzma_raw_buffer_encode(
-		const lzma_filter *filters, lzma_allocator *allocator,
-		const uint8_t *in, size_t in_size, uint8_t *out,
-		size_t *out_pos, size_t out_size) lzma_nothrow;
-
-
-/**
- * \brief       Single-call raw decoder
- *
- * \param       filters     Array of lzma_filter structures. The end of the
- *                          array must be marked with .id = LZMA_VLI_UNKNOWN.
- * \param       allocator   lzma_allocator for custom allocator functions.
- *                          Set to NULL to use malloc() and free().
- * \param       in          Beginning of the input buffer
- * \param       in_pos      The next byte will be read from in[*in_pos].
- *                          *in_pos is updated only if decoding succeeds.
- * \param       in_size     Size of the input buffer; the first byte that
- *                          won't be read is in[in_size].
- * \param       out         Beginning of the output buffer
- * \param       out_pos     The next byte will be written to out[*out_pos].
- *                          *out_pos is updated only if encoding succeeds.
- * \param       out_size    Size of the out buffer; the first byte into
- *                          which no data is written to is out[out_size].
- */
-extern LZMA_API(lzma_ret) lzma_raw_buffer_decode(
-		const lzma_filter *filters, lzma_allocator *allocator,
-		const uint8_t *in, size_t *in_pos, size_t in_size,
-		uint8_t *out, size_t *out_pos, size_t out_size) lzma_nothrow;
-
-
-/**
- * \brief       Get the size of the Filter Properties field
- *
- * This function may be useful when implementing custom file formats
- * using the raw encoder and decoder.
- *
- * \param       size    Pointer to uint32_t to hold the size of the properties
- * \param       filter  Filter ID and options (the size of the properties may
- *                      vary depending on the options)
- *
- * \return      - LZMA_OK
- *              - LZMA_OPTIONS_ERROR
- *              - LZMA_PROG_ERROR
- *
- * \note        This function validates the Filter ID, but does not
- *              necessarily validate the options. Thus, it is possible
- *              that this returns LZMA_OK while the following call to
- *              lzma_properties_encode() returns LZMA_OPTIONS_ERROR.
- */
-extern LZMA_API(lzma_ret) lzma_properties_size(
-		uint32_t *size, const lzma_filter *filter) lzma_nothrow;
-
-
-/**
- * \brief       Encode the Filter Properties field
- *
- * \param       filter  Filter ID and options
- * \param       props   Buffer to hold the encoded options. The size of
- *                      buffer must have been already determined with
- *                      lzma_properties_size().
- *
- * \return      - LZMA_OK
- *              - LZMA_OPTIONS_ERROR
- *              - LZMA_PROG_ERROR
- *
- * \note        Even this function won't validate more options than actually
- *              necessary. Thus, it is possible that encoding the properties
- *              succeeds but using the same options to initialize the encoder
- *              will fail.
- *
- * \note        If lzma_properties_size() indicated that the size
- *              of the Filter Properties field is zero, calling
- *              lzma_properties_encode() is not required, but it
- *              won't do any harm either.
- */
-extern LZMA_API(lzma_ret) lzma_properties_encode(
-		const lzma_filter *filter, uint8_t *props) lzma_nothrow;
-
-
-/**
- * \brief       Decode the Filter Properties field
- *
- * \param       filter      filter->id must have been set to the correct
- *                          Filter ID. filter->options doesn't need to be
- *                          initialized (it's not freed by this function). The
- *                          decoded options will be stored to filter->options.
- *                          filter->options is set to NULL if there are no
- *                          properties or if an error occurs.
- * \param       allocator   Custom memory allocator used to allocate the
- *                          options. Set to NULL to use the default malloc(),
- *                          and in case of an error, also free().
- * \param       props       Input buffer containing the properties.
- * \param       props_size  Size of the properties. This must be the exact
- *                          size; giving too much or too little input will
- *                          return LZMA_OPTIONS_ERROR.
- *
- * \return      - LZMA_OK
- *              - LZMA_OPTIONS_ERROR
- *              - LZMA_MEM_ERROR
- */
-extern LZMA_API(lzma_ret) lzma_properties_decode(
-		lzma_filter *filter, lzma_allocator *allocator,
-		const uint8_t *props, size_t props_size) lzma_nothrow;
-
-
-/**
- * \brief       Calculate encoded size of a Filter Flags field
- *
- * Knowing the size of Filter Flags is useful to know when allocating
- * memory to hold the encoded Filter Flags.
- *
- * \param       size    Pointer to integer to hold the calculated size
- * \param       filter  Filter ID and associated options whose encoded
- *                      size is to be calculated
- *
- * \return      - LZMA_OK: *size set successfully. Note that this doesn't
- *                guarantee that filter->options is valid, thus
- *                lzma_filter_flags_encode() may still fail.
- *              - LZMA_OPTIONS_ERROR: Unknown Filter ID or unsupported options.
- *              - LZMA_PROG_ERROR: Invalid options
- *
- * \note        If you need to calculate size of List of Filter Flags,
- *              you need to loop over every lzma_filter entry.
- */
-extern LZMA_API(lzma_ret) lzma_filter_flags_size(
-		uint32_t *size, const lzma_filter *filter)
-		lzma_nothrow lzma_attr_warn_unused_result;
-
-
-/**
- * \brief       Encode Filter Flags into given buffer
- *
- * In contrast to some functions, this doesn't allocate the needed buffer.
- * This is due to how this function is used internally by liblzma.
- *
- * \param       filter      Filter ID and options to be encoded
- * \param       out         Beginning of the output buffer
- * \param       out_pos     out[*out_pos] is the next write position. This
- *                          is updated by the encoder.
- * \param       out_size    out[out_size] is the first byte to not write.
- *
- * \return      - LZMA_OK: Encoding was successful.
- *              - LZMA_OPTIONS_ERROR: Invalid or unsupported options.
- *              - LZMA_PROG_ERROR: Invalid options or not enough output
- *                buffer space (you should have checked it with
- *                lzma_filter_flags_size()).
- */
-extern LZMA_API(lzma_ret) lzma_filter_flags_encode(const lzma_filter *filter,
-		uint8_t *out, size_t *out_pos, size_t out_size)
-		lzma_nothrow lzma_attr_warn_unused_result;
-
-
-/**
- * \brief       Decode Filter Flags from given buffer
- *
- * The decoded result is stored into *filter. The old value of
- * filter->options is not free()d.
- *
- * \return      - LZMA_OK
- *              - LZMA_OPTIONS_ERROR
- *              - LZMA_MEM_ERROR
- *              - LZMA_PROG_ERROR
- */
-extern LZMA_API(lzma_ret) lzma_filter_flags_decode(
-		lzma_filter *filter, lzma_allocator *allocator,
-		const uint8_t *in, size_t *in_pos, size_t in_size)
-		lzma_nothrow lzma_attr_warn_unused_result;
diff --git a/src/extra/xz/api/lzma/hardware.h b/src/extra/xz/api/lzma/hardware.h
deleted file mode 100644
index e7dd03c..0000000
--- a/src/extra/xz/api/lzma/hardware.h
+++ /dev/null
@@ -1,50 +0,0 @@
-/**
- * \file        lzma/hardware.h
- * \brief       Hardware information
- *
- * Since liblzma can consume a lot of system resources, it also provides
- * ways to limit the resource usage. Applications linking against liblzma
- * need to do the actual decisions how much resources to let liblzma to use.
- * To ease making these decisions, liblzma provides functions to find out
- * the relevant capabilities of the underlaying hardware. Currently there
- * is only a function to find out the amount of RAM, but in the future there
- * will be also a function to detect how many concurrent threads the system
- * can run.
- *
- * \note        On some operating systems, these function may temporarily
- *              load a shared library or open file descriptor(s) to find out
- *              the requested hardware information. Unless the application
- *              assumes that specific file descriptors are not touched by
- *              other threads, this should have no effect on thread safety.
- *              Possible operations involving file descriptors will restart
- *              the syscalls if they return EINTR.
- */
-
-/*
- * Author: Lasse Collin
- *
- * This file has been put into the public domain.
- * You can do whatever you want with this file.
- *
- * See ../lzma.h for information about liblzma as a whole.
- */
-
-#ifndef LZMA_H_INTERNAL
-#	error Never include this file directly. Use <lzma.h> instead.
-#endif
-
-
-/**
- * \brief       Get the total amount of physical memory (RAM) in bytes
- *
- * This function may be useful when determining a reasonable memory
- * usage limit for decompressing or how much memory it is OK to use
- * for compressing.
- *
- * \return      On success, the total amount of physical memory in bytes
- *              is returned. If the amount of RAM cannot be determined,
- *              zero is returned. This can happen if an error occurs
- *              or if there is no code in liblzma to detect the amount
- *              of RAM on the specific operating system.
- */
-extern LZMA_API(uint64_t) lzma_physmem(void) lzma_nothrow;
diff --git a/src/extra/xz/api/lzma/index.h b/src/extra/xz/api/lzma/index.h
deleted file mode 100644
index 16bacc2..0000000
--- a/src/extra/xz/api/lzma/index.h
+++ /dev/null
@@ -1,682 +0,0 @@
-/**
- * \file        lzma/index.h
- * \brief       Handling of .xz Index and related information
- */
-
-/*
- * Author: Lasse Collin
- *
- * This file has been put into the public domain.
- * You can do whatever you want with this file.
- *
- * See ../lzma.h for information about liblzma as a whole.
- */
-
-#ifndef LZMA_H_INTERNAL
-#	error Never include this file directly. Use <lzma.h> instead.
-#endif
-
-
-/**
- * \brief       Opaque data type to hold the Index(es) and other information
- *
- * lzma_index often holds just one .xz Index and possibly the Stream Flags
- * of the same Stream and size of the Stream Padding field. However,
- * multiple lzma_indexes can be concatenated with lzma_index_cat() and then
- * there may be information about multiple Streams in the same lzma_index.
- *
- * Notes about thread safety: Only one thread may modify lzma_index at
- * a time. All functions that take non-const pointer to lzma_index
- * modify it. As long as no thread is modifying the lzma_index, getting
- * information from the same lzma_index can be done from multiple threads
- * at the same time with functions that take a const pointer to
- * lzma_index or use lzma_index_iter. The same iterator must be used
- * only by one thread at a time, of course, but there can be as many
- * iterators for the same lzma_index as needed.
- */
-typedef struct lzma_index_s lzma_index;
-
-
-/**
- * \brief       Iterator to get information about Blocks and Streams
- */
-typedef struct {
-	struct {
-		/**
-		 * \brief       Pointer to Stream Flags
-		 *
-		 * This is NULL if Stream Flags have not been set for
-		 * this Stream with lzma_index_stream_flags().
-		 */
-		const lzma_stream_flags *flags;
-
-		const void *reserved_ptr1;
-		const void *reserved_ptr2;
-		const void *reserved_ptr3;
-
-		/**
-		 * \brief       Stream number in the lzma_index
-		 *
-		 * The first Stream is 1.
-		 */
-		lzma_vli number;
-
-		/**
-		 * \brief       Number of Blocks in the Stream
-		 *
-		 * If this is zero, the block structure below has
-		 * undefined values.
-		 */
-		lzma_vli block_count;
-
-		/**
-		 * \brief       Compressed start offset of this Stream
-		 *
-		 * The offset is relative to the beginning of the lzma_index
-		 * (i.e. usually the beginning of the .xz file).
-		 */
-		lzma_vli compressed_offset;
-
-		/**
-		 * \brief       Uncompressed start offset of this Stream
-		 *
-		 * The offset is relative to the beginning of the lzma_index
-		 * (i.e. usually the beginning of the .xz file).
-		 */
-		lzma_vli uncompressed_offset;
-
-		/**
-		 * \brief       Compressed size of this Stream
-		 *
-		 * This includes all headers except the possible
-		 * Stream Padding after this Stream.
-		 */
-		lzma_vli compressed_size;
-
-		/**
-		 * \brief       Uncompressed size of this Stream
-		 */
-		lzma_vli uncompressed_size;
-
-		/**
-		 * \brief       Size of Stream Padding after this Stream
-		 *
-		 * If it hasn't been set with lzma_index_stream_padding(),
-		 * this defaults to zero. Stream Padding is always
-		 * a multiple of four bytes.
-		 */
-		lzma_vli padding;
-
-		lzma_vli reserved_vli1;
-		lzma_vli reserved_vli2;
-		lzma_vli reserved_vli3;
-		lzma_vli reserved_vli4;
-	} stream;
-
-	struct {
-		/**
-		 * \brief       Block number in the file
-		 *
-		 * The first Block is 1.
-		 */
-		lzma_vli number_in_file;
-
-		/**
-		 * \brief       Compressed start offset of this Block
-		 *
-		 * This offset is relative to the beginning of the
-		 * lzma_index (i.e. usually the beginning of the .xz file).
-		 * Normally this is where you should seek in the .xz file
-		 * to start decompressing this Block.
-		 */
-		lzma_vli compressed_file_offset;
-
-		/**
-		 * \brief       Uncompressed start offset of this Block
-		 *
-		 * This offset is relative to the beginning of the lzma_index
-		 * (i.e. usually the beginning of the .xz file).
-		 *
-		 * When doing random-access reading, it is possible that
-		 * the target offset is not exactly at Block boundary. One
-		 * will need to compare the target offset against
-		 * uncompressed_file_offset or uncompressed_stream_offset,
-		 * and possibly decode and throw away some amount of data
-		 * before reaching the target offset.
-		 */
-		lzma_vli uncompressed_file_offset;
-
-		/**
-		 * \brief       Block number in this Stream
-		 *
-		 * The first Block is 1.
-		 */
-		lzma_vli number_in_stream;
-
-		/**
-		 * \brief       Compressed start offset of this Block
-		 *
-		 * This offset is relative to the beginning of the Stream
-		 * containing this Block.
-		 */
-		lzma_vli compressed_stream_offset;
-
-		/**
-		 * \brief       Uncompressed start offset of this Block
-		 *
-		 * This offset is relative to the beginning of the Stream
-		 * containing this Block.
-		 */
-		lzma_vli uncompressed_stream_offset;
-
-		/**
-		 * \brief       Uncompressed size of this Block
-		 *
-		 * You should pass this to the Block decoder if you will
-		 * decode this Block. It will allow the Block decoder to
-		 * validate the uncompressed size.
-		 */
-		lzma_vli uncompressed_size;
-
-		/**
-		 * \brief       Unpadded size of this Block
-		 *
-		 * You should pass this to the Block decoder if you will
-		 * decode this Block. It will allow the Block decoder to
-		 * validate the unpadded size.
-		 */
-		lzma_vli unpadded_size;
-
-		/**
-		 * \brief       Total compressed size
-		 *
-		 * This includes all headers and padding in this Block.
-		 * This is useful if you need to know how many bytes
-		 * the Block decoder will actually read.
-		 */
-		lzma_vli total_size;
-
-		lzma_vli reserved_vli1;
-		lzma_vli reserved_vli2;
-		lzma_vli reserved_vli3;
-		lzma_vli reserved_vli4;
-
-		const void *reserved_ptr1;
-		const void *reserved_ptr2;
-		const void *reserved_ptr3;
-		const void *reserved_ptr4;
-	} block;
-
-	/*
-	 * Internal data which is used to store the state of the iterator.
-	 * The exact format may vary between liblzma versions, so don't
-	 * touch these in any way.
-	 */
-	union {
-		const void *p;
-		size_t s;
-		lzma_vli v;
-	} internal[6];
-} lzma_index_iter;
-
-
-/**
- * \brief       Operation mode for lzma_index_iter_next()
- */
-typedef enum {
-	LZMA_INDEX_ITER_ANY             = 0,
-		/**<
-		 * \brief       Get the next Block or Stream
-		 *
-		 * Go to the next Block if the current Stream has at least
-		 * one Block left. Otherwise go to the next Stream even if
-		 * it has no Blocks. If the Stream has no Blocks
-		 * (lzma_index_iter.stream.block_count == 0),
-		 * lzma_index_iter.block will have undefined values.
-		 */
-
-	LZMA_INDEX_ITER_STREAM          = 1,
-		/**<
-		 * \brief       Get the next Stream
-		 *
-		 * Go to the next Stream even if the current Stream has
-		 * unread Blocks left. If the next Stream has at least one
-		 * Block, the iterator will point to the first Block.
-		 * If there are no Blocks, lzma_index_iter.block will have
-		 * undefined values.
-		 */
-
-	LZMA_INDEX_ITER_BLOCK           = 2,
-		/**<
-		 * \brief       Get the next Block
-		 *
-		 * Go to the next Block if the current Stream has at least
-		 * one Block left. If the current Stream has no Blocks left,
-		 * the next Stream with at least one Block is located and
-		 * the iterator will be made to point to the first Block of
-		 * that Stream.
-		 */
-
-	LZMA_INDEX_ITER_NONEMPTY_BLOCK  = 3
-		/**<
-		 * \brief       Get the next non-empty Block
-		 *
-		 * This is like LZMA_INDEX_ITER_BLOCK except that it will
-		 * skip Blocks whose Uncompressed Size is zero.
-		 */
-
-} lzma_index_iter_mode;
-
-
-/**
- * \brief       Calculate memory usage of lzma_index
- *
- * On disk, the size of the Index field depends on both the number of Records
- * stored and how big values the Records store (due to variable-length integer
- * encoding). When the Index is kept in lzma_index structure, the memory usage
- * depends only on the number of Records/Blocks stored in the Index(es), and
- * in case of concatenated lzma_indexes, the number of Streams. The size in
- * RAM is almost always significantly bigger than in the encoded form on disk.
- *
- * This function calculates an approximate amount of memory needed hold
- * the given number of Streams and Blocks in lzma_index structure. This
- * value may vary between CPU architectures and also between liblzma versions
- * if the internal implementation is modified.
- */
-extern LZMA_API(uint64_t) lzma_index_memusage(
-		lzma_vli streams, lzma_vli blocks) lzma_nothrow;
-
-
-/**
- * \brief       Calculate the memory usage of an existing lzma_index
- *
- * This is a shorthand for lzma_index_memusage(lzma_index_stream_count(i),
- * lzma_index_block_count(i)).
- */
-extern LZMA_API(uint64_t) lzma_index_memused(const lzma_index *i)
-		lzma_nothrow;
-
-
-/**
- * \brief       Allocate and initialize a new lzma_index structure
- *
- * \return      On success, a pointer to an empty initialized lzma_index is
- *              returned. If allocation fails, NULL is returned.
- */
-extern LZMA_API(lzma_index *) lzma_index_init(lzma_allocator *allocator)
-		lzma_nothrow;
-
-
-/**
- * \brief       Deallocate lzma_index
- *
- * If i is NULL, this does nothing.
- */
-extern LZMA_API(void) lzma_index_end(lzma_index *i, lzma_allocator *allocator)
-		lzma_nothrow;
-
-
-/**
- * \brief       Add a new Block to lzma_index
- *
- * \param       i                 Pointer to a lzma_index structure
- * \param       allocator         Pointer to lzma_allocator, or NULL to
- *                                use malloc()
- * \param       unpadded_size     Unpadded Size of a Block. This can be
- *                                calculated with lzma_block_unpadded_size()
- *                                after encoding or decoding the Block.
- * \param       uncompressed_size Uncompressed Size of a Block. This can be
- *                                taken directly from lzma_block structure
- *                                after encoding or decoding the Block.
- *
- * Appending a new Block does not invalidate iterators. For example,
- * if an iterator was pointing to the end of the lzma_index, after
- * lzma_index_append() it is possible to read the next Block with
- * an existing iterator.
- *
- * \return      - LZMA_OK
- *              - LZMA_MEM_ERROR
- *              - LZMA_DATA_ERROR: Compressed or uncompressed size of the
- *                Stream or size of the Index field would grow too big.
- *              - LZMA_PROG_ERROR
- */
-extern LZMA_API(lzma_ret) lzma_index_append(
-		lzma_index *i, lzma_allocator *allocator,
-		lzma_vli unpadded_size, lzma_vli uncompressed_size)
-		lzma_nothrow lzma_attr_warn_unused_result;
-
-
-/**
- * \brief       Set the Stream Flags
- *
- * Set the Stream Flags of the last (and typically the only) Stream
- * in lzma_index. This can be useful when reading information from the
- * lzma_index, because to decode Blocks, knowing the integrity check type
- * is needed.
- *
- * The given Stream Flags are copied into internal preallocated structure
- * in the lzma_index, thus the caller doesn't need to keep the *stream_flags
- * available after calling this function.
- *
- * \return      - LZMA_OK
- *              - LZMA_OPTIONS_ERROR: Unsupported stream_flags->version.
- *              - LZMA_PROG_ERROR
- */
-extern LZMA_API(lzma_ret) lzma_index_stream_flags(
-		lzma_index *i, const lzma_stream_flags *stream_flags)
-		lzma_nothrow lzma_attr_warn_unused_result;
-
-
-/**
- * \brief       Get the types of integrity Checks
- *
- * If lzma_index_stream_flags() is used to set the Stream Flags for
- * every Stream, lzma_index_checks() can be used to get a bitmask to
- * indicate which Check types have been used. It can be useful e.g. if
- * showing the Check types to the user.
- *
- * The bitmask is 1 << check_id, e.g. CRC32 is 1 << 1 and SHA-256 is 1 << 10.
- */
-extern LZMA_API(uint32_t) lzma_index_checks(const lzma_index *i)
-		lzma_nothrow lzma_attr_pure;
-
-
-/**
- * \brief       Set the amount of Stream Padding
- *
- * Set the amount of Stream Padding of the last (and typically the only)
- * Stream in the lzma_index. This is needed when planning to do random-access
- * reading within multiple concatenated Streams.
- *
- * By default, the amount of Stream Padding is assumed to be zero bytes.
- *
- * \return      - LZMA_OK
- *              - LZMA_DATA_ERROR: The file size would grow too big.
- *              - LZMA_PROG_ERROR
- */
-extern LZMA_API(lzma_ret) lzma_index_stream_padding(
-		lzma_index *i, lzma_vli stream_padding)
-		lzma_nothrow lzma_attr_warn_unused_result;
-
-
-/**
- * \brief       Get the number of Streams
- */
-extern LZMA_API(lzma_vli) lzma_index_stream_count(const lzma_index *i)
-		lzma_nothrow lzma_attr_pure;
-
-
-/**
- * \brief       Get the number of Blocks
- *
- * This returns the total number of Blocks in lzma_index. To get number
- * of Blocks in individual Streams, use lzma_index_iter.
- */
-extern LZMA_API(lzma_vli) lzma_index_block_count(const lzma_index *i)
-		lzma_nothrow lzma_attr_pure;
-
-
-/**
- * \brief       Get the size of the Index field as bytes
- *
- * This is needed to verify the Backward Size field in the Stream Footer.
- */
-extern LZMA_API(lzma_vli) lzma_index_size(const lzma_index *i)
-		lzma_nothrow lzma_attr_pure;
-
-
-/**
- * \brief       Get the total size of the Stream
- *
- * If multiple lzma_indexes have been combined, this works as if the Blocks
- * were in a single Stream. This is useful if you are going to combine
- * Blocks from multiple Streams into a single new Stream.
- */
-extern LZMA_API(lzma_vli) lzma_index_stream_size(const lzma_index *i)
-		lzma_nothrow lzma_attr_pure;
-
-
-/**
- * \brief       Get the total size of the Blocks
- *
- * This doesn't include the Stream Header, Stream Footer, Stream Padding,
- * or Index fields.
- */
-extern LZMA_API(lzma_vli) lzma_index_total_size(const lzma_index *i)
-		lzma_nothrow lzma_attr_pure;
-
-
-/**
- * \brief       Get the total size of the file
- *
- * When no lzma_indexes have been combined with lzma_index_cat() and there is
- * no Stream Padding, this function is identical to lzma_index_stream_size().
- * If multiple lzma_indexes have been combined, this includes also the headers
- * of each separate Stream and the possible Stream Padding fields.
- */
-extern LZMA_API(lzma_vli) lzma_index_file_size(const lzma_index *i)
-		lzma_nothrow lzma_attr_pure;
-
-
-/**
- * \brief       Get the uncompressed size of the file
- */
-extern LZMA_API(lzma_vli) lzma_index_uncompressed_size(const lzma_index *i)
-		lzma_nothrow lzma_attr_pure;
-
-
-/**
- * \brief       Initialize an iterator
- *
- * \param       iter    Pointer to a lzma_index_iter structure
- * \param       i       lzma_index to which the iterator will be associated
- *
- * This function associates the iterator with the given lzma_index, and calls
- * lzma_index_iter_rewind() on the iterator.
- *
- * This function doesn't allocate any memory, thus there is no
- * lzma_index_iter_end(). The iterator is valid as long as the
- * associated lzma_index is valid, that is, until lzma_index_end() or
- * using it as source in lzma_index_cat(). Specifically, lzma_index doesn't
- * become invalid if new Blocks are added to it with lzma_index_append() or
- * if it is used as the destination in lzma_index_cat().
- *
- * It is safe to make copies of an initialized lzma_index_iter, for example,
- * to easily restart reading at some particular position.
- */
-extern LZMA_API(void) lzma_index_iter_init(
-		lzma_index_iter *iter, const lzma_index *i) lzma_nothrow;
-
-
-/**
- * \brief       Rewind the iterator
- *
- * Rewind the iterator so that next call to lzma_index_iter_next() will
- * return the first Block or Stream.
- */
-extern LZMA_API(void) lzma_index_iter_rewind(lzma_index_iter *iter)
-		lzma_nothrow;
-
-
-/**
- * \brief       Get the next Block or Stream
- *
- * \param       iter    Iterator initialized with lzma_index_iter_init()
- * \param       mode    Specify what kind of information the caller wants
- *                      to get. See lzma_index_iter_mode for details.
- *
- * \return      If next Block or Stream matching the mode was found, *iter
- *              is updated and this function returns false. If no Block or
- *              Stream matching the mode is found, *iter is not modified
- *              and this function returns true. If mode is set to an unknown
- *              value, *iter is not modified and this function returns true.
- */
-extern LZMA_API(lzma_bool) lzma_index_iter_next(
-		lzma_index_iter *iter, lzma_index_iter_mode mode)
-		lzma_nothrow lzma_attr_warn_unused_result;
-
-
-/**
- * \brief       Locate a Block
- *
- * If it is possible to seek in the .xz file, it is possible to parse
- * the Index field(s) and use lzma_index_iter_locate() to do random-access
- * reading with granularity of Block size.
- *
- * \param       iter    Iterator that was earlier initialized with
- *                      lzma_index_iter_init().
- * \param       target  Uncompressed target offset which the caller would
- *                      like to locate from the Stream
- *
- * If the target is smaller than the uncompressed size of the Stream (can be
- * checked with lzma_index_uncompressed_size()):
- *  - Information about the Stream and Block containing the requested
- *    uncompressed offset is stored into *iter.
- *  - Internal state of the iterator is adjusted so that
- *    lzma_index_iter_next() can be used to read subsequent Blocks or Streams.
- *  - This function returns false.
- *
- * If target is greater than the uncompressed size of the Stream, *iter
- * is not modified, and this function returns true.
- */
-extern LZMA_API(lzma_bool) lzma_index_iter_locate(
-		lzma_index_iter *iter, lzma_vli target) lzma_nothrow;
-
-
-/**
- * \brief       Concatenate lzma_indexes
- *
- * Concatenating lzma_indexes is useful when doing random-access reading in
- * multi-Stream .xz file, or when combining multiple Streams into single
- * Stream.
- *
- * \param       dest      lzma_index after which src is appended
- * \param       src       lzma_index to be appended after dest. If this
- *                        function succeeds, the memory allocated for src
- *                        is freed or moved to be part of dest, and all
- *                        iterators pointing to src will become invalid.
- * \param       allocator Custom memory allocator; can be NULL to use
- *                        malloc() and free().
- *
- * \return      - LZMA_OK: lzma_indexes were concatenated successfully.
- *                src is now a dangling pointer.
- *              - LZMA_DATA_ERROR: *dest would grow too big.
- *              - LZMA_MEM_ERROR
- *              - LZMA_PROG_ERROR
- */
-extern LZMA_API(lzma_ret) lzma_index_cat(
-		lzma_index *dest, lzma_index *src, lzma_allocator *allocator)
-		lzma_nothrow lzma_attr_warn_unused_result;
-
-
-/**
- * \brief       Duplicate lzma_index
- *
- * \return      A copy of the lzma_index, or NULL if memory allocation failed.
- */
-extern LZMA_API(lzma_index *) lzma_index_dup(
-		const lzma_index *i, lzma_allocator *allocator)
-		lzma_nothrow lzma_attr_warn_unused_result;
-
-
-/**
- * \brief       Initialize .xz Index encoder
- *
- * \param       strm        Pointer to properly prepared lzma_stream
- * \param       i           Pointer to lzma_index which should be encoded.
- *
- * The valid `action' values for lzma_code() are LZMA_RUN and LZMA_FINISH.
- * It is enough to use only one of them (you can choose freely; use LZMA_RUN
- * to support liblzma versions older than 5.0.0).
- *
- * \return      - LZMA_OK: Initialization succeeded, continue with lzma_code().
- *              - LZMA_MEM_ERROR
- *              - LZMA_PROG_ERROR
- */
-extern LZMA_API(lzma_ret) lzma_index_encoder(
-		lzma_stream *strm, const lzma_index *i)
-		lzma_nothrow lzma_attr_warn_unused_result;
-
-
-/**
- * \brief       Initialize .xz Index decoder
- *
- * \param       strm        Pointer to properly prepared lzma_stream
- * \param       i           The decoded Index will be made available via
- *                          this pointer. Initially this function will
- *                          set *i to NULL (the old value is ignored). If
- *                          decoding succeeds (lzma_code() returns
- *                          LZMA_STREAM_END), *i will be set to point
- *                          to a new lzma_index, which the application
- *                          has to later free with lzma_index_end().
- * \param       memlimit    How much memory the resulting lzma_index is
- *                          allowed to require.
- *
- * The valid `action' values for lzma_code() are LZMA_RUN and LZMA_FINISH.
- * It is enough to use only one of them (you can choose freely; use LZMA_RUN
- * to support liblzma versions older than 5.0.0).
- *
- * \return      - LZMA_OK: Initialization succeeded, continue with lzma_code().
- *              - LZMA_MEM_ERROR
- *              - LZMA_MEMLIMIT_ERROR
- *              - LZMA_PROG_ERROR
- */
-extern LZMA_API(lzma_ret) lzma_index_decoder(
-		lzma_stream *strm, lzma_index **i, uint64_t memlimit)
-		lzma_nothrow lzma_attr_warn_unused_result;
-
-
-/**
- * \brief       Single-call .xz Index encoder
- *
- * \param       i         lzma_index to be encoded
- * \param       out       Beginning of the output buffer
- * \param       out_pos   The next byte will be written to out[*out_pos].
- *                        *out_pos is updated only if encoding succeeds.
- * \param       out_size  Size of the out buffer; the first byte into
- *                        which no data is written to is out[out_size].
- *
- * \return      - LZMA_OK: Encoding was successful.
- *              - LZMA_BUF_ERROR: Output buffer is too small. Use
- *                lzma_index_size() to find out how much output
- *                space is needed.
- *              - LZMA_PROG_ERROR
- *
- * \note        This function doesn't take allocator argument since all
- *              the internal data is allocated on stack.
- */
-extern LZMA_API(lzma_ret) lzma_index_buffer_encode(const lzma_index *i,
-		uint8_t *out, size_t *out_pos, size_t out_size) lzma_nothrow;
-
-
-/**
- * \brief       Single-call .xz Index decoder
- *
- * \param       i           If decoding succeeds, *i will point to a new
- *                          lzma_index, which the application has to
- *                          later free with lzma_index_end(). If an error
- *                          occurs, *i will be NULL. The old value of *i
- *                          is always ignored and thus doesn't need to be
- *                          initialized by the caller.
- * \param       memlimit    Pointer to how much memory the resulting
- *                          lzma_index is allowed to require. The value
- *                          pointed by this pointer is modified if and only
- *                          if LZMA_MEMLIMIT_ERROR is returned.
- * \param       allocator   Pointer to lzma_allocator, or NULL to use malloc()
- * \param       in          Beginning of the input buffer
- * \param       in_pos      The next byte will be read from in[*in_pos].
- *                          *in_pos is updated only if decoding succeeds.
- * \param       in_size     Size of the input buffer; the first byte that
- *                          won't be read is in[in_size].
- *
- * \return      - LZMA_OK: Decoding was successful.
- *              - LZMA_MEM_ERROR
- *              - LZMA_MEMLIMIT_ERROR: Memory usage limit was reached.
- *                The minimum required memlimit value was stored to *memlimit.
- *              - LZMA_DATA_ERROR
- *              - LZMA_PROG_ERROR
- */
-extern LZMA_API(lzma_ret) lzma_index_buffer_decode(lzma_index **i,
-		uint64_t *memlimit, lzma_allocator *allocator,
-		const uint8_t *in, size_t *in_pos, size_t in_size)
-		lzma_nothrow;
diff --git a/src/extra/xz/api/lzma/index_hash.h b/src/extra/xz/api/lzma/index_hash.h
deleted file mode 100644
index fa2e048..0000000
--- a/src/extra/xz/api/lzma/index_hash.h
+++ /dev/null
@@ -1,107 +0,0 @@
-/**
- * \file        lzma/index_hash.h
- * \brief       Validate Index by using a hash function
- *
- * Hashing makes it possible to use constant amount of memory to validate
- * Index of arbitrary size.
- */
-
-/*
- * Author: Lasse Collin
- *
- * This file has been put into the public domain.
- * You can do whatever you want with this file.
- *
- * See ../lzma.h for information about liblzma as a whole.
- */
-
-#ifndef LZMA_H_INTERNAL
-#	error Never include this file directly. Use <lzma.h> instead.
-#endif
-
-/**
- * \brief       Opaque data type to hold the Index hash
- */
-typedef struct lzma_index_hash_s lzma_index_hash;
-
-
-/**
- * \brief       Allocate and initialize a new lzma_index_hash structure
- *
- * If index_hash is NULL, a new lzma_index_hash structure is allocated,
- * initialized, and a pointer to it returned. If allocation fails, NULL
- * is returned.
- *
- * If index_hash is non-NULL, it is reinitialized and the same pointer
- * returned. In this case, return value cannot be NULL or a different
- * pointer than the index_hash that was given as an argument.
- */
-extern LZMA_API(lzma_index_hash *) lzma_index_hash_init(
-		lzma_index_hash *index_hash, lzma_allocator *allocator)
-		lzma_nothrow lzma_attr_warn_unused_result;
-
-
-/**
- * \brief       Deallocate lzma_index_hash structure
- */
-extern LZMA_API(void) lzma_index_hash_end(
-		lzma_index_hash *index_hash, lzma_allocator *allocator)
-		lzma_nothrow;
-
-
-/**
- * \brief       Add a new Record to an Index hash
- *
- * \param       index             Pointer to a lzma_index_hash structure
- * \param       unpadded_size     Unpadded Size of a Block
- * \param       uncompressed_size Uncompressed Size of a Block
- *
- * \return      - LZMA_OK
- *              - LZMA_DATA_ERROR: Compressed or uncompressed size of the
- *                Stream or size of the Index field would grow too big.
- *              - LZMA_PROG_ERROR: Invalid arguments or this function is being
- *                used when lzma_index_hash_decode() has already been used.
- */
-extern LZMA_API(lzma_ret) lzma_index_hash_append(lzma_index_hash *index_hash,
-		lzma_vli unpadded_size, lzma_vli uncompressed_size)
-		lzma_nothrow lzma_attr_warn_unused_result;
-
-
-/**
- * \brief       Decode and validate the Index field
- *
- * After telling the sizes of all Blocks with lzma_index_hash_append(),
- * the actual Index field is decoded with this function. Specifically,
- * once decoding of the Index field has been started, no more Records
- * can be added using lzma_index_hash_append().
- *
- * This function doesn't use lzma_stream structure to pass the input data.
- * Instead, the input buffer is specified using three arguments. This is
- * because it matches better the internal APIs of liblzma.
- *
- * \param       index_hash      Pointer to a lzma_index_hash structure
- * \param       in              Pointer to the beginning of the input buffer
- * \param       in_pos          in[*in_pos] is the next byte to process
- * \param       in_size         in[in_size] is the first byte not to process
- *
- * \return      - LZMA_OK: So far good, but more input is needed.
- *              - LZMA_STREAM_END: Index decoded successfully and it matches
- *                the Records given with lzma_index_hash_append().
- *              - LZMA_DATA_ERROR: Index is corrupt or doesn't match the
- *                information given with lzma_index_hash_append().
- *              - LZMA_BUF_ERROR: Cannot progress because *in_pos >= in_size.
- *              - LZMA_PROG_ERROR
- */
-extern LZMA_API(lzma_ret) lzma_index_hash_decode(lzma_index_hash *index_hash,
-		const uint8_t *in, size_t *in_pos, size_t in_size)
-		lzma_nothrow lzma_attr_warn_unused_result;
-
-
-/**
- * \brief       Get the size of the Index field as bytes
- *
- * This is needed to verify the Backward Size field in the Stream Footer.
- */
-extern LZMA_API(lzma_vli) lzma_index_hash_size(
-		const lzma_index_hash *index_hash)
-		lzma_nothrow lzma_attr_pure;
diff --git a/src/extra/xz/api/lzma/lzma.h b/src/extra/xz/api/lzma/lzma.h
deleted file mode 100644
index 3f8e095..0000000
--- a/src/extra/xz/api/lzma/lzma.h
+++ /dev/null
@@ -1,420 +0,0 @@
-/**
- * \file        lzma/lzma.h
- * \brief       LZMA1 and LZMA2 filters
- */
-
-/*
- * Author: Lasse Collin
- *
- * This file has been put into the public domain.
- * You can do whatever you want with this file.
- *
- * See ../lzma.h for information about liblzma as a whole.
- */
-
-#ifndef LZMA_H_INTERNAL
-#	error Never include this file directly. Use <lzma.h> instead.
-#endif
-
-
-/**
- * \brief       LZMA1 Filter ID
- *
- * LZMA1 is the very same thing as what was called just LZMA in LZMA Utils,
- * 7-Zip, and LZMA SDK. It's called LZMA1 here to prevent developers from
- * accidentally using LZMA when they actually want LZMA2.
- *
- * LZMA1 shouldn't be used for new applications unless you _really_ know
- * what you are doing. LZMA2 is almost always a better choice.
- */
-#define LZMA_FILTER_LZMA1       LZMA_VLI_C(0x4000000000000001)
-
-/**
- * \brief       LZMA2 Filter ID
- *
- * Usually you want this instead of LZMA1. Compared to LZMA1, LZMA2 adds
- * support for LZMA_SYNC_FLUSH, uncompressed chunks (smaller expansion
- * when trying to compress uncompressible data), possibility to change
- * lc/lp/pb in the middle of encoding, and some other internal improvements.
- */
-#define LZMA_FILTER_LZMA2       LZMA_VLI_C(0x21)
-
-
-/**
- * \brief       Match finders
- *
- * Match finder has major effect on both speed and compression ratio.
- * Usually hash chains are faster than binary trees.
- *
- * If you will use LZMA_SYNC_FLUSH often, the hash chains may be a better
- * choice, because binary trees get much higher compression ratio penalty
- * with LZMA_SYNC_FLUSH.
- *
- * The memory usage formulas are only rough estimates, which are closest to
- * reality when dict_size is a power of two. The formulas are  more complex
- * in reality, and can also change a little between liblzma versions. Use
- * lzma_raw_encoder_memusage() to get more accurate estimate of memory usage.
- */
-typedef enum {
-	LZMA_MF_HC3     = 0x03,
-		/**<
-		 * \brief       Hash Chain with 2- and 3-byte hashing
-		 *
-		 * Minimum nice_len: 3
-		 *
-		 * Memory usage:
-		 *  - dict_size <= 16 MiB: dict_size * 7.5
-		 *  - dict_size > 16 MiB: dict_size * 5.5 + 64 MiB
-		 */
-
-	LZMA_MF_HC4     = 0x04,
-		/**<
-		 * \brief       Hash Chain with 2-, 3-, and 4-byte hashing
-		 *
-		 * Minimum nice_len: 4
-		 *
-		 * Memory usage:
-		 *  - dict_size <= 32 MiB: dict_size * 7.5
-		 *  - dict_size > 32 MiB: dict_size * 6.5
-		 */
-
-	LZMA_MF_BT2     = 0x12,
-		/**<
-		 * \brief       Binary Tree with 2-byte hashing
-		 *
-		 * Minimum nice_len: 2
-		 *
-		 * Memory usage: dict_size * 9.5
-		 */
-
-	LZMA_MF_BT3     = 0x13,
-		/**<
-		 * \brief       Binary Tree with 2- and 3-byte hashing
-		 *
-		 * Minimum nice_len: 3
-		 *
-		 * Memory usage:
-		 *  - dict_size <= 16 MiB: dict_size * 11.5
-		 *  - dict_size > 16 MiB: dict_size * 9.5 + 64 MiB
-		 */
-
-	LZMA_MF_BT4     = 0x14
-		/**<
-		 * \brief       Binary Tree with 2-, 3-, and 4-byte hashing
-		 *
-		 * Minimum nice_len: 4
-		 *
-		 * Memory usage:
-		 *  - dict_size <= 32 MiB: dict_size * 11.5
-		 *  - dict_size > 32 MiB: dict_size * 10.5
-		 */
-} lzma_match_finder;
-
-
-/**
- * \brief       Test if given match finder is supported
- *
- * Return true if the given match finder is supported by this liblzma build.
- * Otherwise false is returned. It is safe to call this with a value that
- * isn't listed in lzma_match_finder enumeration; the return value will be
- * false.
- *
- * There is no way to list which match finders are available in this
- * particular liblzma version and build. It would be useless, because
- * a new match finder, which the application developer wasn't aware,
- * could require giving additional options to the encoder that the older
- * match finders don't need.
- */
-extern LZMA_API(lzma_bool) lzma_mf_is_supported(lzma_match_finder match_finder)
-		lzma_nothrow lzma_attr_const;
-
-
-/**
- * \brief       Compression modes
- *
- * This selects the function used to analyze the data produced by the match
- * finder.
- */
-typedef enum {
-	LZMA_MODE_FAST = 1,
-		/**<
-		 * \brief       Fast compression
-		 *
-		 * Fast mode is usually at its best when combined with
-		 * a hash chain match finder.
-		 */
-
-	LZMA_MODE_NORMAL = 2
-		/**<
-		 * \brief       Normal compression
-		 *
-		 * This is usually notably slower than fast mode. Use this
-		 * together with binary tree match finders to expose the
-		 * full potential of the LZMA1 or LZMA2 encoder.
-		 */
-} lzma_mode;
-
-
-/**
- * \brief       Test if given compression mode is supported
- *
- * Return true if the given compression mode is supported by this liblzma
- * build. Otherwise false is returned. It is safe to call this with a value
- * that isn't listed in lzma_mode enumeration; the return value will be false.
- *
- * There is no way to list which modes are available in this particular
- * liblzma version and build. It would be useless, because a new compression
- * mode, which the application developer wasn't aware, could require giving
- * additional options to the encoder that the older modes don't need.
- */
-extern LZMA_API(lzma_bool) lzma_mode_is_supported(lzma_mode mode)
-		lzma_nothrow lzma_attr_const;
-
-
-/**
- * \brief       Options specific to the LZMA1 and LZMA2 filters
- *
- * Since LZMA1 and LZMA2 share most of the code, it's simplest to share
- * the options structure too. For encoding, all but the reserved variables
- * need to be initialized unless specifically mentioned otherwise.
- * lzma_lzma_preset() can be used to get a good starting point.
- *
- * For raw decoding, both LZMA1 and LZMA2 need dict_size, preset_dict, and
- * preset_dict_size (if preset_dict != NULL). LZMA1 needs also lc, lp, and pb.
- */
-typedef struct {
-	/**
-	 * \brief       Dictionary size in bytes
-	 *
-	 * Dictionary size indicates how many bytes of the recently processed
-	 * uncompressed data is kept in memory. One method to reduce size of
-	 * the uncompressed data is to store distance-length pairs, which
-	 * indicate what data to repeat from the dictionary buffer. Thus,
-	 * the bigger the dictionary, the better the compression ratio
-	 * usually is.
-	 *
-	 * Maximum size of the dictionary depends on multiple things:
-	 *  - Memory usage limit
-	 *  - Available address space (not a problem on 64-bit systems)
-	 *  - Selected match finder (encoder only)
-	 *
-	 * Currently the maximum dictionary size for encoding is 1.5 GiB
-	 * (i.e. (UINT32_C(1) << 30) + (UINT32_C(1) << 29)) even on 64-bit
-	 * systems for certain match finder implementation reasons. In the
-	 * future, there may be match finders that support bigger
-	 * dictionaries.
-	 *
-	 * Decoder already supports dictionaries up to 4 GiB - 1 B (i.e.
-	 * UINT32_MAX), so increasing the maximum dictionary size of the
-	 * encoder won't cause problems for old decoders.
-	 *
-	 * Because extremely small dictionaries sizes would have unneeded
-	 * overhead in the decoder, the minimum dictionary size is 4096 bytes.
-	 *
-	 * \note        When decoding, too big dictionary does no other harm
-	 *              than wasting memory.
-	 */
-	uint32_t dict_size;
-#	define LZMA_DICT_SIZE_MIN       UINT32_C(4096)
-#	define LZMA_DICT_SIZE_DEFAULT   (UINT32_C(1) << 23)
-
-	/**
-	 * \brief       Pointer to an initial dictionary
-	 *
-	 * It is possible to initialize the LZ77 history window using
-	 * a preset dictionary. It is useful when compressing many
-	 * similar, relatively small chunks of data independently from
-	 * each other. The preset dictionary should contain typical
-	 * strings that occur in the files being compressed. The most
-	 * probable strings should be near the end of the preset dictionary.
-	 *
-	 * This feature should be used only in special situations. For
-	 * now, it works correctly only with raw encoding and decoding.
-	 * Currently none of the container formats supported by
-	 * liblzma allow preset dictionary when decoding, thus if
-	 * you create a .xz or .lzma file with preset dictionary, it
-	 * cannot be decoded with the regular decoder functions. In the
-	 * future, the .xz format will likely get support for preset
-	 * dictionary though.
-	 */
-	const uint8_t *preset_dict;
-
-	/**
-	 * \brief       Size of the preset dictionary
-	 *
-	 * Specifies the size of the preset dictionary. If the size is
-	 * bigger than dict_size, only the last dict_size bytes are
-	 * processed.
-	 *
-	 * This variable is read only when preset_dict is not NULL.
-	 * If preset_dict is not NULL but preset_dict_size is zero,
-	 * no preset dictionary is used (identical to only setting
-	 * preset_dict to NULL).
-	 */
-	uint32_t preset_dict_size;
-
-	/**
-	 * \brief       Number of literal context bits
-	 *
-	 * How many of the highest bits of the previous uncompressed
-	 * eight-bit byte (also known as `literal') are taken into
-	 * account when predicting the bits of the next literal.
-	 *
-	 * E.g. in typical English text, an upper-case letter is
-	 * often followed by a lower-case letter, and a lower-case
-	 * letter is usually followed by another lower-case letter.
-	 * In the US-ASCII character set, the highest three bits are 010
-	 * for upper-case letters and 011 for lower-case letters.
-	 * When lc is at least 3, the literal coding can take advantage of
-	 * this property in the uncompressed data.
-	 *
-	 * There is a limit that applies to literal context bits and literal
-	 * position bits together: lc + lp <= 4. Without this limit the
-	 * decoding could become very slow, which could have security related
-	 * results in some cases like email servers doing virus scanning.
-	 * This limit also simplifies the internal implementation in liblzma.
-	 *
-	 * There may be LZMA1 streams that have lc + lp > 4 (maximum possible
-	 * lc would be 8). It is not possible to decode such streams with
-	 * liblzma.
-	 */
-	uint32_t lc;
-#	define LZMA_LCLP_MIN    0
-#	define LZMA_LCLP_MAX    4
-#	define LZMA_LC_DEFAULT  3
-
-	/**
-	 * \brief       Number of literal position bits
-	 *
-	 * lp affects what kind of alignment in the uncompressed data is
-	 * assumed when encoding literals. A literal is a single 8-bit byte.
-	 * See pb below for more information about alignment.
-	 */
-	uint32_t lp;
-#	define LZMA_LP_DEFAULT  0
-
-	/**
-	 * \brief       Number of position bits
-	 *
-	 * pb affects what kind of alignment in the uncompressed data is
-	 * assumed in general. The default means four-byte alignment
-	 * (2^ pb =2^2=4), which is often a good choice when there's
-	 * no better guess.
-	 *
-	 * When the aligment is known, setting pb accordingly may reduce
-	 * the file size a little. E.g. with text files having one-byte
-	 * alignment (US-ASCII, ISO-8859-*, UTF-8), setting pb=0 can
-	 * improve compression slightly. For UTF-16 text, pb=1 is a good
-	 * choice. If the alignment is an odd number like 3 bytes, pb=0
-	 * might be the best choice.
-	 *
-	 * Even though the assumed alignment can be adjusted with pb and
-	 * lp, LZMA1 and LZMA2 still slightly favor 16-byte alignment.
-	 * It might be worth taking into account when designing file formats
-	 * that are likely to be often compressed with LZMA1 or LZMA2.
-	 */
-	uint32_t pb;
-#	define LZMA_PB_MIN      0
-#	define LZMA_PB_MAX      4
-#	define LZMA_PB_DEFAULT  2
-
-	/** Compression mode */
-	lzma_mode mode;
-
-	/**
-	 * \brief       Nice length of a match
-	 *
-	 * This determines how many bytes the encoder compares from the match
-	 * candidates when looking for the best match. Once a match of at
-	 * least nice_len bytes long is found, the encoder stops looking for
-	 * better candidates and encodes the match. (Naturally, if the found
-	 * match is actually longer than nice_len, the actual length is
-	 * encoded; it's not truncated to nice_len.)
-	 *
-	 * Bigger values usually increase the compression ratio and
-	 * compression time. For most files, 32 to 128 is a good value,
-	 * which gives very good compression ratio at good speed.
-	 *
-	 * The exact minimum value depends on the match finder. The maximum
-	 * is 273, which is the maximum length of a match that LZMA1 and
-	 * LZMA2 can encode.
-	 */
-	uint32_t nice_len;
-
-	/** Match finder ID */
-	lzma_match_finder mf;
-
-	/**
-	 * \brief       Maximum search depth in the match finder
-	 *
-	 * For every input byte, match finder searches through the hash chain
-	 * or binary tree in a loop, each iteration going one step deeper in
-	 * the chain or tree. The searching stops if
-	 *  - a match of at least nice_len bytes long is found;
-	 *  - all match candidates from the hash chain or binary tree have
-	 *    been checked; or
-	 *  - maximum search depth is reached.
-	 *
-	 * Maximum search depth is needed to prevent the match finder from
-	 * wasting too much time in case there are lots of short match
-	 * candidates. On the other hand, stopping the search before all
-	 * candidates have been checked can reduce compression ratio.
-	 *
-	 * Setting depth to zero tells liblzma to use an automatic default
-	 * value, that depends on the selected match finder and nice_len.
-	 * The default is in the range [4, 200] or so (it may vary between
-	 * liblzma versions).
-	 *
-	 * Using a bigger depth value than the default can increase
-	 * compression ratio in some cases. There is no strict maximum value,
-	 * but high values (thousands or millions) should be used with care:
-	 * the encoder could remain fast enough with typical input, but
-	 * malicious input could cause the match finder to slow down
-	 * dramatically, possibly creating a denial of service attack.
-	 */
-	uint32_t depth;
-
-	/*
-	 * Reserved space to allow possible future extensions without
-	 * breaking the ABI. You should not touch these, because the names
-	 * of these variables may change. These are and will never be used
-	 * with the currently supported options, so it is safe to leave these
-	 * uninitialized.
-	 */
-	uint32_t reserved_int1;
-	uint32_t reserved_int2;
-	uint32_t reserved_int3;
-	uint32_t reserved_int4;
-	uint32_t reserved_int5;
-	uint32_t reserved_int6;
-	uint32_t reserved_int7;
-	uint32_t reserved_int8;
-	lzma_reserved_enum reserved_enum1;
-	lzma_reserved_enum reserved_enum2;
-	lzma_reserved_enum reserved_enum3;
-	lzma_reserved_enum reserved_enum4;
-	void *reserved_ptr1;
-	void *reserved_ptr2;
-
-} lzma_options_lzma;
-
-
-/**
- * \brief       Set a compression preset to lzma_options_lzma structure
- *
- * 0 is the fastest and 9 is the slowest. These match the switches -0 .. -9
- * of the xz command line tool. In addition, it is possible to bitwise-or
- * flags to the preset. Currently only LZMA_PRESET_EXTREME is supported.
- * The flags are defined in container.h, because the flags are used also
- * with lzma_easy_encoder().
- *
- * The preset values are subject to changes between liblzma versions.
- *
- * This function is available only if LZMA1 or LZMA2 encoder has been enabled
- * when building liblzma.
- *
- * \return      On success, false is returned. If the preset is not
- *              supported, true is returned.
- */
-extern LZMA_API(lzma_bool) lzma_lzma_preset(
-		lzma_options_lzma *options, uint32_t preset) lzma_nothrow;
diff --git a/src/extra/xz/api/lzma/stream_flags.h b/src/extra/xz/api/lzma/stream_flags.h
deleted file mode 100644
index bbdd408..0000000
--- a/src/extra/xz/api/lzma/stream_flags.h
+++ /dev/null
@@ -1,223 +0,0 @@
-/**
- * \file        lzma/stream_flags.h
- * \brief       .xz Stream Header and Stream Footer encoder and decoder
- */
-
-/*
- * Author: Lasse Collin
- *
- * This file has been put into the public domain.
- * You can do whatever you want with this file.
- *
- * See ../lzma.h for information about liblzma as a whole.
- */
-
-#ifndef LZMA_H_INTERNAL
-#	error Never include this file directly. Use <lzma.h> instead.
-#endif
-
-
-/**
- * \brief       Size of Stream Header and Stream Footer
- *
- * Stream Header and Stream Footer have the same size and they are not
- * going to change even if a newer version of the .xz file format is
- * developed in future.
- */
-#define LZMA_STREAM_HEADER_SIZE 12
-
-
-/**
- * \brief       Options for encoding/decoding Stream Header and Stream Footer
- */
-typedef struct {
-	/**
-	 * \brief       Stream Flags format version
-	 *
-	 * To prevent API and ABI breakages if new features are needed in
-	 * Stream Header or Stream Footer, a version number is used to
-	 * indicate which fields in this structure are in use. For now,
-	 * version must always be zero. With non-zero version, the
-	 * lzma_stream_header_encode() and lzma_stream_footer_encode()
-	 * will return LZMA_OPTIONS_ERROR.
-	 *
-	 * lzma_stream_header_decode() and lzma_stream_footer_decode()
-	 * will always set this to the lowest value that supports all the
-	 * features indicated by the Stream Flags field. The application
-	 * must check that the version number set by the decoding functions
-	 * is supported by the application. Otherwise it is possible that
-	 * the application will decode the Stream incorrectly.
-	 */
-	uint32_t version;
-
-	/**
-	 * \brief       Backward Size
-	 *
-	 * Backward Size must be a multiple of four bytes. In this Stream
-	 * format version, Backward Size is the size of the Index field.
-	 *
-	 * Backward Size isn't actually part of the Stream Flags field, but
-	 * it is convenient to include in this structure anyway. Backward
-	 * Size is present only in the Stream Footer. There is no need to
-	 * initialize backward_size when encoding Stream Header.
-	 *
-	 * lzma_stream_header_decode() always sets backward_size to
-	 * LZMA_VLI_UNKNOWN so that it is convenient to use
-	 * lzma_stream_flags_compare() when both Stream Header and Stream
-	 * Footer have been decoded.
-	 */
-	lzma_vli backward_size;
-#	define LZMA_BACKWARD_SIZE_MIN 4
-#	define LZMA_BACKWARD_SIZE_MAX (LZMA_VLI_C(1) << 34)
-
-	/**
-	 * \brief       Check ID
-	 *
-	 * This indicates the type of the integrity check calculated from
-	 * uncompressed data.
-	 */
-	lzma_check check;
-
-	/*
-	 * Reserved space to allow possible future extensions without
-	 * breaking the ABI. You should not touch these, because the
-	 * names of these variables may change.
-	 *
-	 * (We will never be able to use all of these since Stream Flags
-	 * is just two bytes plus Backward Size of four bytes. But it's
-	 * nice to have the proper types when they are needed.)
-	 */
-	lzma_reserved_enum reserved_enum1;
-	lzma_reserved_enum reserved_enum2;
-	lzma_reserved_enum reserved_enum3;
-	lzma_reserved_enum reserved_enum4;
-	lzma_bool reserved_bool1;
-	lzma_bool reserved_bool2;
-	lzma_bool reserved_bool3;
-	lzma_bool reserved_bool4;
-	lzma_bool reserved_bool5;
-	lzma_bool reserved_bool6;
-	lzma_bool reserved_bool7;
-	lzma_bool reserved_bool8;
-	uint32_t reserved_int1;
-	uint32_t reserved_int2;
-
-} lzma_stream_flags;
-
-
-/**
- * \brief       Encode Stream Header
- *
- * \param       options     Stream Header options to be encoded.
- *                          options->backward_size is ignored and doesn't
- *                          need to be initialized.
- * \param       out         Beginning of the output buffer of
- *                          LZMA_STREAM_HEADER_SIZE bytes.
- *
- * \return      - LZMA_OK: Encoding was successful.
- *              - LZMA_OPTIONS_ERROR: options->version is not supported by
- *                this liblzma version.
- *              - LZMA_PROG_ERROR: Invalid options.
- */
-extern LZMA_API(lzma_ret) lzma_stream_header_encode(
-		const lzma_stream_flags *options, uint8_t *out)
-		lzma_nothrow lzma_attr_warn_unused_result;
-
-
-/**
- * \brief       Encode Stream Footer
- *
- * \param       options     Stream Footer options to be encoded.
- * \param       out         Beginning of the output buffer of
- *                          LZMA_STREAM_HEADER_SIZE bytes.
- *
- * \return      - LZMA_OK: Encoding was successful.
- *              - LZMA_OPTIONS_ERROR: options->version is not supported by
- *                this liblzma version.
- *              - LZMA_PROG_ERROR: Invalid options.
- */
-extern LZMA_API(lzma_ret) lzma_stream_footer_encode(
-		const lzma_stream_flags *options, uint8_t *out)
-		lzma_nothrow lzma_attr_warn_unused_result;
-
-
-/**
- * \brief       Decode Stream Header
- *
- * \param       options     Target for the decoded Stream Header options.
- * \param       in          Beginning of the input buffer of
- *                          LZMA_STREAM_HEADER_SIZE bytes.
- *
- * options->backward_size is always set to LZMA_VLI_UNKNOWN. This is to
- * help comparing Stream Flags from Stream Header and Stream Footer with
- * lzma_stream_flags_compare().
- *
- * \return      - LZMA_OK: Decoding was successful.
- *              - LZMA_FORMAT_ERROR: Magic bytes don't match, thus the given
- *                buffer cannot be Stream Header.
- *              - LZMA_DATA_ERROR: CRC32 doesn't match, thus the header
- *                is corrupt.
- *              - LZMA_OPTIONS_ERROR: Unsupported options are present
- *                in the header.
- *
- * \note        When decoding .xz files that contain multiple Streams, it may
- *              make sense to print "file format not recognized" only if
- *              decoding of the Stream Header of the _first_ Stream gives
- *              LZMA_FORMAT_ERROR. If non-first Stream Header gives
- *              LZMA_FORMAT_ERROR, the message used for LZMA_DATA_ERROR is
- *              probably more appropriate.
- *
- *              For example, Stream decoder in liblzma uses LZMA_DATA_ERROR if
- *              LZMA_FORMAT_ERROR is returned by lzma_stream_header_decode()
- *              when decoding non-first Stream.
- */
-extern LZMA_API(lzma_ret) lzma_stream_header_decode(
-		lzma_stream_flags *options, const uint8_t *in)
-		lzma_nothrow lzma_attr_warn_unused_result;
-
-
-/**
- * \brief       Decode Stream Footer
- *
- * \param       options     Target for the decoded Stream Header options.
- * \param       in          Beginning of the input buffer of
- *                          LZMA_STREAM_HEADER_SIZE bytes.
- *
- * \return      - LZMA_OK: Decoding was successful.
- *              - LZMA_FORMAT_ERROR: Magic bytes don't match, thus the given
- *                buffer cannot be Stream Footer.
- *              - LZMA_DATA_ERROR: CRC32 doesn't match, thus the Stream Footer
- *                is corrupt.
- *              - LZMA_OPTIONS_ERROR: Unsupported options are present
- *                in Stream Footer.
- *
- * \note        If Stream Header was already decoded successfully, but
- *              decoding Stream Footer returns LZMA_FORMAT_ERROR, the
- *              application should probably report some other error message
- *              than "file format not recognized", since the file more likely
- *              is corrupt (possibly truncated). Stream decoder in liblzma
- *              uses LZMA_DATA_ERROR in this situation.
- */
-extern LZMA_API(lzma_ret) lzma_stream_footer_decode(
-		lzma_stream_flags *options, const uint8_t *in)
-		lzma_nothrow lzma_attr_warn_unused_result;
-
-
-/**
- * \brief       Compare two lzma_stream_flags structures
- *
- * backward_size values are compared only if both are not
- * LZMA_VLI_UNKNOWN.
- *
- * \return      - LZMA_OK: Both are equal. If either had backward_size set
- *                to LZMA_VLI_UNKNOWN, backward_size values were not
- *                compared or validated.
- *              - LZMA_DATA_ERROR: The structures differ.
- *              - LZMA_OPTIONS_ERROR: version in either structure is greater
- *                than the maximum supported version (currently zero).
- *              - LZMA_PROG_ERROR: Invalid value, e.g. invalid check or
- *                backward_size.
- */
-extern LZMA_API(lzma_ret) lzma_stream_flags_compare(
-		const lzma_stream_flags *a, const lzma_stream_flags *b)
-		lzma_nothrow lzma_attr_pure;
diff --git a/src/extra/xz/api/lzma/version.h b/src/extra/xz/api/lzma/version.h
deleted file mode 100644
index 66e9396..0000000
--- a/src/extra/xz/api/lzma/version.h
+++ /dev/null
@@ -1,121 +0,0 @@
-/**
- * \file        lzma/version.h
- * \brief       Version number
- */
-
-/*
- * Author: Lasse Collin
- *
- * This file has been put into the public domain.
- * You can do whatever you want with this file.
- *
- * See ../lzma.h for information about liblzma as a whole.
- */
-
-#ifndef LZMA_H_INTERNAL
-#	error Never include this file directly. Use <lzma.h> instead.
-#endif
-
-
-/*
- * Version number split into components
- */
-#define LZMA_VERSION_MAJOR 5
-#define LZMA_VERSION_MINOR 0
-#define LZMA_VERSION_PATCH 5
-#define LZMA_VERSION_STABILITY LZMA_VERSION_STABILITY_STABLE
-
-#ifndef LZMA_VERSION_COMMIT
-#	define LZMA_VERSION_COMMIT ""
-#endif
-
-
-/*
- * Map symbolic stability levels to integers.
- */
-#define LZMA_VERSION_STABILITY_ALPHA 0
-#define LZMA_VERSION_STABILITY_BETA 1
-#define LZMA_VERSION_STABILITY_STABLE 2
-
-
-/**
- * \brief       Compile-time version number
- *
- * The version number is of format xyyyzzzs where
- *  - x = major
- *  - yyy = minor
- *  - zzz = revision
- *  - s indicates stability: 0 = alpha, 1 = beta, 2 = stable
- *
- * The same xyyyzzz triplet is never reused with different stability levels.
- * For example, if 5.1.0alpha has been released, there will never be 5.1.0beta
- * or 5.1.0 stable.
- *
- * \note        The version number of liblzma has nothing to with
- *              the version number of Igor Pavlov's LZMA SDK.
- */
-#define LZMA_VERSION (LZMA_VERSION_MAJOR * UINT32_C(10000000) \
-		+ LZMA_VERSION_MINOR * UINT32_C(10000) \
-		+ LZMA_VERSION_PATCH * UINT32_C(10) \
-		+ LZMA_VERSION_STABILITY)
-
-
-/*
- * Macros to construct the compile-time version string
- */
-#if LZMA_VERSION_STABILITY == LZMA_VERSION_STABILITY_ALPHA
-#	define LZMA_VERSION_STABILITY_STRING "alpha"
-#elif LZMA_VERSION_STABILITY == LZMA_VERSION_STABILITY_BETA
-#	define LZMA_VERSION_STABILITY_STRING "beta"
-#elif LZMA_VERSION_STABILITY == LZMA_VERSION_STABILITY_STABLE
-#	define LZMA_VERSION_STABILITY_STRING ""
-#else
-#	error Incorrect LZMA_VERSION_STABILITY
-#endif
-
-#define LZMA_VERSION_STRING_C_(major, minor, patch, stability, commit) \
-		#major "." #minor "." #patch stability commit
-
-#define LZMA_VERSION_STRING_C(major, minor, patch, stability, commit) \
-		LZMA_VERSION_STRING_C_(major, minor, patch, stability, commit)
-
-
-/**
- * \brief       Compile-time version as a string
- *
- * This can be for example "4.999.5alpha", "4.999.8beta", or "5.0.0" (stable
- * versions don't have any "stable" suffix). In future, a snapshot built
- * from source code repository may include an additional suffix, for example
- * "4.999.8beta-21-g1d92". The commit ID won't be available in numeric form
- * in LZMA_VERSION macro.
- */
-#define LZMA_VERSION_STRING LZMA_VERSION_STRING_C( \
-		LZMA_VERSION_MAJOR, LZMA_VERSION_MINOR, \
-		LZMA_VERSION_PATCH, LZMA_VERSION_STABILITY_STRING, \
-		LZMA_VERSION_COMMIT)
-
-
-/* #ifndef is needed for use with windres (MinGW or Cygwin). */
-#ifndef LZMA_H_INTERNAL_RC
-
-/**
- * \brief       Run-time version number as an integer
- *
- * Return the value of LZMA_VERSION macro at the compile time of liblzma.
- * This allows the application to compare if it was built against the same,
- * older, or newer version of liblzma that is currently running.
- */
-extern LZMA_API(uint32_t) lzma_version_number(void)
-		lzma_nothrow lzma_attr_const;
-
-
-/**
- * \brief       Run-time version as a string
- *
- * This function may be useful if you want to display which version of
- * liblzma your application is currently using.
- */
-extern LZMA_API(const char *) lzma_version_string(void)
-		lzma_nothrow lzma_attr_const;
-
-#endif
diff --git a/src/extra/xz/api/lzma/vli.h b/src/extra/xz/api/lzma/vli.h
deleted file mode 100644
index 9ad13f2..0000000
--- a/src/extra/xz/api/lzma/vli.h
+++ /dev/null
@@ -1,166 +0,0 @@
-/**
- * \file        lzma/vli.h
- * \brief       Variable-length integer handling
- *
- * In the .xz format, most integers are encoded in a variable-length
- * representation, which is sometimes called little endian base-128 encoding.
- * This saves space when smaller values are more likely than bigger values.
- *
- * The encoding scheme encodes seven bits to every byte, using minimum
- * number of bytes required to represent the given value. Encodings that use
- * non-minimum number of bytes are invalid, thus every integer has exactly
- * one encoded representation. The maximum number of bits in a VLI is 63,
- * thus the vli argument must be less than or equal to UINT64_MAX / 2. You
- * should use LZMA_VLI_MAX for clarity.
- */
-
-/*
- * Author: Lasse Collin
- *
- * This file has been put into the public domain.
- * You can do whatever you want with this file.
- *
- * See ../lzma.h for information about liblzma as a whole.
- */
-
-#ifndef LZMA_H_INTERNAL
-#	error Never include this file directly. Use <lzma.h> instead.
-#endif
-
-
-/**
- * \brief       Maximum supported value of a variable-length integer
- */
-#define LZMA_VLI_MAX (UINT64_MAX / 2)
-
-/**
- * \brief       VLI value to denote that the value is unknown
- */
-#define LZMA_VLI_UNKNOWN UINT64_MAX
-
-/**
- * \brief       Maximum supported encoded length of variable length integers
- */
-#define LZMA_VLI_BYTES_MAX 9
-
-/**
- * \brief       VLI constant suffix
- */
-#define LZMA_VLI_C(n) UINT64_C(n)
-
-
-/**
- * \brief       Variable-length integer type
- *
- * Valid VLI values are in the range [0, LZMA_VLI_MAX]. Unknown value is
- * indicated with LZMA_VLI_UNKNOWN, which is the maximum value of the
- * underlaying integer type.
- *
- * lzma_vli will be uint64_t for the foreseeable future. If a bigger size
- * is needed in the future, it is guaranteed that 2 * LZMA_VLI_MAX will
- * not overflow lzma_vli. This simplifies integer overflow detection.
- */
-typedef uint64_t lzma_vli;
-
-
-/**
- * \brief       Validate a variable-length integer
- *
- * This is useful to test that application has given acceptable values
- * for example in the uncompressed_size and compressed_size variables.
- *
- * \return      True if the integer is representable as VLI or if it
- *              indicates unknown value.
- */
-#define lzma_vli_is_valid(vli) \
-	((vli) <= LZMA_VLI_MAX || (vli) == LZMA_VLI_UNKNOWN)
-
-
-/**
- * \brief       Encode a variable-length integer
- *
- * This function has two modes: single-call and multi-call. Single-call mode
- * encodes the whole integer at once; it is an error if the output buffer is
- * too small. Multi-call mode saves the position in *vli_pos, and thus it is
- * possible to continue encoding if the buffer becomes full before the whole
- * integer has been encoded.
- *
- * \param       vli       Integer to be encoded
- * \param       vli_pos   How many VLI-encoded bytes have already been written
- *                        out. When starting to encode a new integer in
- *                        multi-call mode, *vli_pos must be set to zero.
- *                        To use single-call encoding, set vli_pos to NULL.
- * \param       out       Beginning of the output buffer
- * \param       out_pos   The next byte will be written to out[*out_pos].
- * \param       out_size  Size of the out buffer; the first byte into
- *                        which no data is written to is out[out_size].
- *
- * \return      Slightly different return values are used in multi-call and
- *              single-call modes.
- *
- *              Single-call (vli_pos == NULL):
- *              - LZMA_OK: Integer successfully encoded.
- *              - LZMA_PROG_ERROR: Arguments are not sane. This can be due
- *                to too little output space; single-call mode doesn't use
- *                LZMA_BUF_ERROR, since the application should have checked
- *                the encoded size with lzma_vli_size().
- *
- *              Multi-call (vli_pos != NULL):
- *              - LZMA_OK: So far all OK, but the integer is not
- *                completely written out yet.
- *              - LZMA_STREAM_END: Integer successfully encoded.
- *              - LZMA_BUF_ERROR: No output space was provided.
- *              - LZMA_PROG_ERROR: Arguments are not sane.
- */
-extern LZMA_API(lzma_ret) lzma_vli_encode(lzma_vli vli, size_t *vli_pos,
-		uint8_t *out, size_t *out_pos, size_t out_size) lzma_nothrow;
-
-
-/**
- * \brief       Decode a variable-length integer
- *
- * Like lzma_vli_encode(), this function has single-call and multi-call modes.
- *
- * \param       vli       Pointer to decoded integer. The decoder will
- *                        initialize it to zero when *vli_pos == 0, so
- *                        application isn't required to initialize *vli.
- * \param       vli_pos   How many bytes have already been decoded. When
- *                        starting to decode a new integer in multi-call
- *                        mode, *vli_pos must be initialized to zero. To
- *                        use single-call decoding, set vli_pos to NULL.
- * \param       in        Beginning of the input buffer
- * \param       in_pos    The next byte will be read from in[*in_pos].
- * \param       in_size   Size of the input buffer; the first byte that
- *                        won't be read is in[in_size].
- *
- * \return      Slightly different return values are used in multi-call and
- *              single-call modes.
- *
- *              Single-call (vli_pos == NULL):
- *              - LZMA_OK: Integer successfully decoded.
- *              - LZMA_DATA_ERROR: Integer is corrupt. This includes hitting
- *                the end of the input buffer before the whole integer was
- *                decoded; providing no input at all will use LZMA_DATA_ERROR.
- *              - LZMA_PROG_ERROR: Arguments are not sane.
- *
- *              Multi-call (vli_pos != NULL):
- *              - LZMA_OK: So far all OK, but the integer is not
- *                completely decoded yet.
- *              - LZMA_STREAM_END: Integer successfully decoded.
- *              - LZMA_DATA_ERROR: Integer is corrupt.
- *              - LZMA_BUF_ERROR: No input was provided.
- *              - LZMA_PROG_ERROR: Arguments are not sane.
- */
-extern LZMA_API(lzma_ret) lzma_vli_decode(lzma_vli *vli, size_t *vli_pos,
-		const uint8_t *in, size_t *in_pos, size_t in_size)
-		lzma_nothrow;
-
-
-/**
- * \brief       Get the number of bytes required to encode a VLI
- *
- * \return      Number of bytes on success (1-9). If vli isn't valid,
- *              zero is returned.
- */
-extern LZMA_API(uint32_t) lzma_vli_size(lzma_vli vli)
-		lzma_nothrow lzma_attr_pure;
diff --git a/src/extra/xz/check/check.c b/src/extra/xz/check/check.c
deleted file mode 100644
index 428ddae..0000000
--- a/src/extra/xz/check/check.c
+++ /dev/null
@@ -1,174 +0,0 @@
-///////////////////////////////////////////////////////////////////////////////
-//
-/// \file       check.c
-/// \brief      Single API to access different integrity checks
-//
-//  Author:     Lasse Collin
-//
-//  This file has been put into the public domain.
-//  You can do whatever you want with this file.
-//
-///////////////////////////////////////////////////////////////////////////////
-
-#include "check.h"
-
-
-extern LZMA_API(lzma_bool)
-lzma_check_is_supported(lzma_check type)
-{
-	if ((unsigned int)(type) > LZMA_CHECK_ID_MAX)
-		return false;
-
-	static const lzma_bool available_checks[LZMA_CHECK_ID_MAX + 1] = {
-		true,   // LZMA_CHECK_NONE
-
-#ifdef HAVE_CHECK_CRC32
-		true,
-#else
-		false,
-#endif
-
-		false,  // Reserved
-		false,  // Reserved
-
-#ifdef HAVE_CHECK_CRC64
-		true,
-#else
-		false,
-#endif
-
-		false,  // Reserved
-		false,  // Reserved
-		false,  // Reserved
-		false,  // Reserved
-		false,  // Reserved
-
-#ifdef HAVE_CHECK_SHA256
-		true,
-#else
-		false,
-#endif
-
-		false,  // Reserved
-		false,  // Reserved
-		false,  // Reserved
-		false,  // Reserved
-		false,  // Reserved
-	};
-
-	return available_checks[(unsigned int)(type)];
-}
-
-
-extern LZMA_API(uint32_t)
-lzma_check_size(lzma_check type)
-{
-	if ((unsigned int)(type) > LZMA_CHECK_ID_MAX)
-		return UINT32_MAX;
-
-	// See file-format.txt section 2.1.1.2.
-	static const uint8_t check_sizes[LZMA_CHECK_ID_MAX + 1] = {
-		0,
-		4, 4, 4,
-		8, 8, 8,
-		16, 16, 16,
-		32, 32, 32,
-		64, 64, 64
-	};
-
-	return check_sizes[(unsigned int)(type)];
-}
-
-
-extern void
-lzma_check_init(lzma_check_state *check, lzma_check type)
-{
-	switch (type) {
-	case LZMA_CHECK_NONE:
-		break;
-
-#ifdef HAVE_CHECK_CRC32
-	case LZMA_CHECK_CRC32:
-		check->state.crc32 = 0;
-		break;
-#endif
-
-#ifdef HAVE_CHECK_CRC64
-	case LZMA_CHECK_CRC64:
-		check->state.crc64 = 0;
-		break;
-#endif
-
-#ifdef HAVE_CHECK_SHA256
-	case LZMA_CHECK_SHA256:
-		lzma_sha256_init(check);
-		break;
-#endif
-
-	default:
-		break;
-	}
-
-	return;
-}
-
-
-extern void
-lzma_check_update(lzma_check_state *check, lzma_check type,
-		const uint8_t *buf, size_t size)
-{
-	switch (type) {
-#ifdef HAVE_CHECK_CRC32
-	case LZMA_CHECK_CRC32:
-		check->state.crc32 = lzma_crc32(buf, size, check->state.crc32);
-		break;
-#endif
-
-#ifdef HAVE_CHECK_CRC64
-	case LZMA_CHECK_CRC64:
-		check->state.crc64 = lzma_crc64(buf, size, check->state.crc64);
-		break;
-#endif
-
-#ifdef HAVE_CHECK_SHA256
-	case LZMA_CHECK_SHA256:
-		lzma_sha256_update(buf, size, check);
-		break;
-#endif
-
-	default:
-		break;
-	}
-
-	return;
-}
-
-
-extern void
-lzma_check_finish(lzma_check_state *check, lzma_check type)
-{
-	switch (type) {
-#ifdef HAVE_CHECK_CRC32
-	case LZMA_CHECK_CRC32:
-		check->buffer.u32[0] = conv32le(check->state.crc32);
-		break;
-#endif
-
-#ifdef HAVE_CHECK_CRC64
-	case LZMA_CHECK_CRC64:
-		check->buffer.u64[0] = conv64le(check->state.crc64);
-		break;
-#endif
-
-#ifdef HAVE_CHECK_SHA256
-	case LZMA_CHECK_SHA256:
-		lzma_sha256_finish(check);
-		break;
-#endif
-
-	default:
-		break;
-	}
-
-	return;
-}
diff --git a/src/extra/xz/check/check.h b/src/extra/xz/check/check.h
deleted file mode 100644
index e100d2b..0000000
--- a/src/extra/xz/check/check.h
+++ /dev/null
@@ -1,95 +0,0 @@
-///////////////////////////////////////////////////////////////////////////////
-//
-/// \file       check.h
-/// \brief      Internal API to different integrity check functions
-//
-//  Author:     Lasse Collin
-//
-//  This file has been put into the public domain.
-//  You can do whatever you want with this file.
-//
-///////////////////////////////////////////////////////////////////////////////
-
-#ifndef LZMA_CHECK_H
-#define LZMA_CHECK_H
-
-#include "common.h"
-
-
-// Index hashing needs the best possible hash function (preferably
-// a cryptographic hash) for maximum reliability.
-#if defined(HAVE_CHECK_SHA256)
-#	define LZMA_CHECK_BEST LZMA_CHECK_SHA256
-#elif defined(HAVE_CHECK_CRC64)
-#	define LZMA_CHECK_BEST LZMA_CHECK_CRC64
-#else
-#	define LZMA_CHECK_BEST LZMA_CHECK_CRC32
-#endif
-
-
-/// \brief      Structure to hold internal state of the check being calculated
-///
-/// \note       This is not in the public API because this structure may
-///             change in future if new integrity check algorithms are added.
-typedef struct {
-	/// Buffer to hold the final result and a temporary buffer for SHA256.
-	union {
-		uint8_t u8[64];
-		uint32_t u32[16];
-		uint64_t u64[8];
-	} buffer;
-
-	/// Check-specific data
-	union {
-		uint32_t crc32;
-		uint64_t crc64;
-
-		struct {
-			/// Internal state
-			uint32_t state[8];
-
-			/// Size of the message excluding padding
-			uint64_t size;
-		} sha256;
-	} state;
-
-} lzma_check_state;
-
-
-/// lzma_crc32_table[0] is needed by LZ encoder so we need to keep
-/// the array two-dimensional.
-#ifdef HAVE_SMALL
-extern uint32_t lzma_crc32_table[1][256];
-extern void lzma_crc32_init(void);
-#else
-extern const uint32_t lzma_crc32_table[8][256];
-extern const uint64_t lzma_crc64_table[4][256];
-#endif
-
-
-/// \brief      Initialize *check depending on type
-///
-/// \return     LZMA_OK on success. LZMA_UNSUPPORTED_CHECK if the type is not
-///             supported by the current version or build of liblzma.
-///             LZMA_PROG_ERROR if type > LZMA_CHECK_ID_MAX.
-extern void lzma_check_init(lzma_check_state *check, lzma_check type);
-
-/// Update the check state
-extern void lzma_check_update(lzma_check_state *check, lzma_check type,
-		const uint8_t *buf, size_t size);
-
-/// Finish the check calculation and store the result to check->buffer.u8.
-extern void lzma_check_finish(lzma_check_state *check, lzma_check type);
-
-
-/// Prepare SHA-256 state for new input.
-extern void lzma_sha256_init(lzma_check_state *check);
-
-/// Update the SHA-256 hash state
-extern void lzma_sha256_update(
-		const uint8_t *buf, size_t size, lzma_check_state *check);
-
-/// Finish the SHA-256 calculation and store the result to check->buffer.u8.
-extern void lzma_sha256_finish(lzma_check_state *check);
-
-#endif
diff --git a/src/extra/xz/check/crc32_fast.c b/src/extra/xz/check/crc32_fast.c
deleted file mode 100644
index 94da855..0000000
--- a/src/extra/xz/check/crc32_fast.c
+++ /dev/null
@@ -1,82 +0,0 @@
-///////////////////////////////////////////////////////////////////////////////
-//
-/// \file       crc32.c
-/// \brief      CRC32 calculation
-///
-/// Calculate the CRC32 using the slice-by-eight algorithm.
-/// It is explained in this document:
-/// http://www.intel.com/technology/comms/perfnet/download/CRC_generators.pdf
-/// The code in this file is not the same as in Intel's paper, but
-/// the basic principle is identical.
-//
-//  Author:     Lasse Collin
-//
-//  This file has been put into the public domain.
-//  You can do whatever you want with this file.
-//
-///////////////////////////////////////////////////////////////////////////////
-
-#include "check.h"
-#include "crc_macros.h"
-
-
-// If you make any changes, do some bench marking! Seemingly unrelated
-// changes can very easily ruin the performance (and very probably is
-// very compiler dependent).
-extern LZMA_API(uint32_t)
-lzma_crc32(const uint8_t *buf, size_t size, uint32_t crc)
-{
-	crc = ~crc;
-
-#ifdef WORDS_BIGENDIAN
-	crc = bswap32(crc);
-#endif
-
-	if (size > 8) {
-		// Fix the alignment, if needed. The if statement above
-		// ensures that this won't read past the end of buf[].
-		while ((uintptr_t)(buf) & 7) {
-			crc = lzma_crc32_table[0][*buf++ ^ A(crc)] ^ S8(crc);
-			--size;
-		}
-
-		// Calculate the position where to stop.
-		const uint8_t *const limit = buf + (size & ~(size_t)(7));
-
-		// Calculate how many bytes must be calculated separately
-		// before returning the result.
-		size &= (size_t)(7);
-
-		// Calculate the CRC32 using the slice-by-eight algorithm.
-		while (buf < limit) {
-			crc ^= *(const uint32_t *)(buf);
-			buf += 4;
-
-			crc = lzma_crc32_table[7][A(crc)]
-			    ^ lzma_crc32_table[6][B(crc)]
-			    ^ lzma_crc32_table[5][C(crc)]
-			    ^ lzma_crc32_table[4][D(crc)];
-
-			const uint32_t tmp = *(const uint32_t *)(buf);
-			buf += 4;
-
-			// At least with some compilers, it is critical for
-			// performance, that the crc variable is XORed
-			// between the two table-lookup pairs.
-			crc = lzma_crc32_table[3][A(tmp)]
-			    ^ lzma_crc32_table[2][B(tmp)]
-			    ^ crc
-			    ^ lzma_crc32_table[1][C(tmp)]
-			    ^ lzma_crc32_table[0][D(tmp)];
-		}
-	}
-
-	while (size-- != 0)
-		crc = lzma_crc32_table[0][*buf++ ^ A(crc)] ^ S8(crc);
-
-#ifdef WORDS_BIGENDIAN
-	crc = bswap32(crc);
-#endif
-
-	return ~crc;
-}
diff --git a/src/extra/xz/check/crc32_small.c b/src/extra/xz/check/crc32_small.c
deleted file mode 100644
index 5f8a328..0000000
--- a/src/extra/xz/check/crc32_small.c
+++ /dev/null
@@ -1,61 +0,0 @@
-///////////////////////////////////////////////////////////////////////////////
-//
-/// \file       crc32_small.c
-/// \brief      CRC32 calculation (size-optimized)
-//
-//  Author:     Lasse Collin
-//
-//  This file has been put into the public domain.
-//  You can do whatever you want with this file.
-//
-///////////////////////////////////////////////////////////////////////////////
-
-#include "check.h"
-
-
-uint32_t lzma_crc32_table[1][256];
-
-
-static void
-crc32_init(void)
-{
-	static const uint32_t poly32 = UINT32_C(0xEDB88320);
-
-	for (size_t b = 0; b < 256; ++b) {
-		uint32_t r = b;
-		for (size_t i = 0; i < 8; ++i) {
-			if (r & 1)
-				r = (r >> 1) ^ poly32;
-			else
-				r >>= 1;
-		}
-
-		lzma_crc32_table[0][b] = r;
-	}
-
-	return;
-}
-
-
-extern void
-lzma_crc32_init(void)
-{
-	mythread_once(crc32_init);
-	return;
-}
-
-
-extern LZMA_API(uint32_t)
-lzma_crc32(const uint8_t *buf, size_t size, uint32_t crc)
-{
-	lzma_crc32_init();
-
-	crc = ~crc;
-
-	while (size != 0) {
-		crc = lzma_crc32_table[0][*buf++ ^ (crc & 0xFF)] ^ (crc >> 8);
-		--size;
-	}
-
-	return ~crc;
-}
diff --git a/src/extra/xz/check/crc32_table.c b/src/extra/xz/check/crc32_table.c
deleted file mode 100644
index 368874e..0000000
--- a/src/extra/xz/check/crc32_table.c
+++ /dev/null
@@ -1,19 +0,0 @@
-///////////////////////////////////////////////////////////////////////////////
-//
-/// \file       crc32_table.c
-/// \brief      Precalculated CRC32 table with correct endianness
-//
-//  Author:     Lasse Collin
-//
-//  This file has been put into the public domain.
-//  You can do whatever you want with this file.
-//
-///////////////////////////////////////////////////////////////////////////////
-
-#include "common.h"
-
-#ifdef WORDS_BIGENDIAN
-#	include "crc32_table_be.h"
-#else
-#	include "crc32_table_le.h"
-#endif
diff --git a/src/extra/xz/check/crc32_table_be.h b/src/extra/xz/check/crc32_table_be.h
deleted file mode 100644
index c483cb6..0000000
--- a/src/extra/xz/check/crc32_table_be.h
+++ /dev/null
@@ -1,525 +0,0 @@
-/* This file has been automatically generated by crc32_tablegen.c. */
-
-const uint32_t lzma_crc32_table[8][256] = {
-	{
-		0x00000000, 0x96300777, 0x2C610EEE, 0xBA510999,
-		0x19C46D07, 0x8FF46A70, 0x35A563E9, 0xA395649E,
-		0x3288DB0E, 0xA4B8DC79, 0x1EE9D5E0, 0x88D9D297,
-		0x2B4CB609, 0xBD7CB17E, 0x072DB8E7, 0x911DBF90,
-		0x6410B71D, 0xF220B06A, 0x4871B9F3, 0xDE41BE84,
-		0x7DD4DA1A, 0xEBE4DD6D, 0x51B5D4F4, 0xC785D383,
-		0x56986C13, 0xC0A86B64, 0x7AF962FD, 0xECC9658A,
-		0x4F5C0114, 0xD96C0663, 0x633D0FFA, 0xF50D088D,
-		0xC8206E3B, 0x5E10694C, 0xE44160D5, 0x727167A2,
-		0xD1E4033C, 0x47D4044B, 0xFD850DD2, 0x6BB50AA5,
-		0xFAA8B535, 0x6C98B242, 0xD6C9BBDB, 0x40F9BCAC,
-		0xE36CD832, 0x755CDF45, 0xCF0DD6DC, 0x593DD1AB,
-		0xAC30D926, 0x3A00DE51, 0x8051D7C8, 0x1661D0BF,
-		0xB5F4B421, 0x23C4B356, 0x9995BACF, 0x0FA5BDB8,
-		0x9EB80228, 0x0888055F, 0xB2D90CC6, 0x24E90BB1,
-		0x877C6F2F, 0x114C6858, 0xAB1D61C1, 0x3D2D66B6,
-		0x9041DC76, 0x0671DB01, 0xBC20D298, 0x2A10D5EF,
-		0x8985B171, 0x1FB5B606, 0xA5E4BF9F, 0x33D4B8E8,
-		0xA2C90778, 0x34F9000F, 0x8EA80996, 0x18980EE1,
-		0xBB0D6A7F, 0x2D3D6D08, 0x976C6491, 0x015C63E6,
-		0xF4516B6B, 0x62616C1C, 0xD8306585, 0x4E0062F2,
-		0xED95066C, 0x7BA5011B, 0xC1F40882, 0x57C40FF5,
-		0xC6D9B065, 0x50E9B712, 0xEAB8BE8B, 0x7C88B9FC,
-		0xDF1DDD62, 0x492DDA15, 0xF37CD38C, 0x654CD4FB,
-		0x5861B24D, 0xCE51B53A, 0x7400BCA3, 0xE230BBD4,
-		0x41A5DF4A, 0xD795D83D, 0x6DC4D1A4, 0xFBF4D6D3,
-		0x6AE96943, 0xFCD96E34, 0x468867AD, 0xD0B860DA,
-		0x732D0444, 0xE51D0333, 0x5F4C0AAA, 0xC97C0DDD,
-		0x3C710550, 0xAA410227, 0x10100BBE, 0x86200CC9,
-		0x25B56857, 0xB3856F20, 0x09D466B9, 0x9FE461CE,
-		0x0EF9DE5E, 0x98C9D929, 0x2298D0B0, 0xB4A8D7C7,
-		0x173DB359, 0x810DB42E, 0x3B5CBDB7, 0xAD6CBAC0,
-		0x2083B8ED, 0xB6B3BF9A, 0x0CE2B603, 0x9AD2B174,
-		0x3947D5EA, 0xAF77D29D, 0x1526DB04, 0x8316DC73,
-		0x120B63E3, 0x843B6494, 0x3E6A6D0D, 0xA85A6A7A,
-		0x0BCF0EE4, 0x9DFF0993, 0x27AE000A, 0xB19E077D,
-		0x44930FF0, 0xD2A30887, 0x68F2011E, 0xFEC20669,
-		0x5D5762F7, 0xCB676580, 0x71366C19, 0xE7066B6E,
-		0x761BD4FE, 0xE02BD389, 0x5A7ADA10, 0xCC4ADD67,
-		0x6FDFB9F9, 0xF9EFBE8E, 0x43BEB717, 0xD58EB060,
-		0xE8A3D6D6, 0x7E93D1A1, 0xC4C2D838, 0x52F2DF4F,
-		0xF167BBD1, 0x6757BCA6, 0xDD06B53F, 0x4B36B248,
-		0xDA2B0DD8, 0x4C1B0AAF, 0xF64A0336, 0x607A0441,
-		0xC3EF60DF, 0x55DF67A8, 0xEF8E6E31, 0x79BE6946,
-		0x8CB361CB, 0x1A8366BC, 0xA0D26F25, 0x36E26852,
-		0x95770CCC, 0x03470BBB, 0xB9160222, 0x2F260555,
-		0xBE3BBAC5, 0x280BBDB2, 0x925AB42B, 0x046AB35C,
-		0xA7FFD7C2, 0x31CFD0B5, 0x8B9ED92C, 0x1DAEDE5B,
-		0xB0C2649B, 0x26F263EC, 0x9CA36A75, 0x0A936D02,
-		0xA906099C, 0x3F360EEB, 0x85670772, 0x13570005,
-		0x824ABF95, 0x147AB8E2, 0xAE2BB17B, 0x381BB60C,
-		0x9B8ED292, 0x0DBED5E5, 0xB7EFDC7C, 0x21DFDB0B,
-		0xD4D2D386, 0x42E2D4F1, 0xF8B3DD68, 0x6E83DA1F,
-		0xCD16BE81, 0x5B26B9F6, 0xE177B06F, 0x7747B718,
-		0xE65A0888, 0x706A0FFF, 0xCA3B0666, 0x5C0B0111,
-		0xFF9E658F, 0x69AE62F8, 0xD3FF6B61, 0x45CF6C16,
-		0x78E20AA0, 0xEED20DD7, 0x5483044E, 0xC2B30339,
-		0x612667A7, 0xF71660D0, 0x4D476949, 0xDB776E3E,
-		0x4A6AD1AE, 0xDC5AD6D9, 0x660BDF40, 0xF03BD837,
-		0x53AEBCA9, 0xC59EBBDE, 0x7FCFB247, 0xE9FFB530,
-		0x1CF2BDBD, 0x8AC2BACA, 0x3093B353, 0xA6A3B424,
-		0x0536D0BA, 0x9306D7CD, 0x2957DE54, 0xBF67D923,
-		0x2E7A66B3, 0xB84A61C4, 0x021B685D, 0x942B6F2A,
-		0x37BE0BB4, 0xA18E0CC3, 0x1BDF055A, 0x8DEF022D
-	}, {
-		0x00000000, 0x41311B19, 0x82623632, 0xC3532D2B,
-		0x04C56C64, 0x45F4777D, 0x86A75A56, 0xC796414F,
-		0x088AD9C8, 0x49BBC2D1, 0x8AE8EFFA, 0xCBD9F4E3,
-		0x0C4FB5AC, 0x4D7EAEB5, 0x8E2D839E, 0xCF1C9887,
-		0x5112C24A, 0x1023D953, 0xD370F478, 0x9241EF61,
-		0x55D7AE2E, 0x14E6B537, 0xD7B5981C, 0x96848305,
-		0x59981B82, 0x18A9009B, 0xDBFA2DB0, 0x9ACB36A9,
-		0x5D5D77E6, 0x1C6C6CFF, 0xDF3F41D4, 0x9E0E5ACD,
-		0xA2248495, 0xE3159F8C, 0x2046B2A7, 0x6177A9BE,
-		0xA6E1E8F1, 0xE7D0F3E8, 0x2483DEC3, 0x65B2C5DA,
-		0xAAAE5D5D, 0xEB9F4644, 0x28CC6B6F, 0x69FD7076,
-		0xAE6B3139, 0xEF5A2A20, 0x2C09070B, 0x6D381C12,
-		0xF33646DF, 0xB2075DC6, 0x715470ED, 0x30656BF4,
-		0xF7F32ABB, 0xB6C231A2, 0x75911C89, 0x34A00790,
-		0xFBBC9F17, 0xBA8D840E, 0x79DEA925, 0x38EFB23C,
-		0xFF79F373, 0xBE48E86A, 0x7D1BC541, 0x3C2ADE58,
-		0x054F79F0, 0x447E62E9, 0x872D4FC2, 0xC61C54DB,
-		0x018A1594, 0x40BB0E8D, 0x83E823A6, 0xC2D938BF,
-		0x0DC5A038, 0x4CF4BB21, 0x8FA7960A, 0xCE968D13,
-		0x0900CC5C, 0x4831D745, 0x8B62FA6E, 0xCA53E177,
-		0x545DBBBA, 0x156CA0A3, 0xD63F8D88, 0x970E9691,
-		0x5098D7DE, 0x11A9CCC7, 0xD2FAE1EC, 0x93CBFAF5,
-		0x5CD76272, 0x1DE6796B, 0xDEB55440, 0x9F844F59,
-		0x58120E16, 0x1923150F, 0xDA703824, 0x9B41233D,
-		0xA76BFD65, 0xE65AE67C, 0x2509CB57, 0x6438D04E,
-		0xA3AE9101, 0xE29F8A18, 0x21CCA733, 0x60FDBC2A,
-		0xAFE124AD, 0xEED03FB4, 0x2D83129F, 0x6CB20986,
-		0xAB2448C9, 0xEA1553D0, 0x29467EFB, 0x687765E2,
-		0xF6793F2F, 0xB7482436, 0x741B091D, 0x352A1204,
-		0xF2BC534B, 0xB38D4852, 0x70DE6579, 0x31EF7E60,
-		0xFEF3E6E7, 0xBFC2FDFE, 0x7C91D0D5, 0x3DA0CBCC,
-		0xFA368A83, 0xBB07919A, 0x7854BCB1, 0x3965A7A8,
-		0x4B98833B, 0x0AA99822, 0xC9FAB509, 0x88CBAE10,
-		0x4F5DEF5F, 0x0E6CF446, 0xCD3FD96D, 0x8C0EC274,
-		0x43125AF3, 0x022341EA, 0xC1706CC1, 0x804177D8,
-		0x47D73697, 0x06E62D8E, 0xC5B500A5, 0x84841BBC,
-		0x1A8A4171, 0x5BBB5A68, 0x98E87743, 0xD9D96C5A,
-		0x1E4F2D15, 0x5F7E360C, 0x9C2D1B27, 0xDD1C003E,
-		0x120098B9, 0x533183A0, 0x9062AE8B, 0xD153B592,
-		0x16C5F4DD, 0x57F4EFC4, 0x94A7C2EF, 0xD596D9F6,
-		0xE9BC07AE, 0xA88D1CB7, 0x6BDE319C, 0x2AEF2A85,
-		0xED796BCA, 0xAC4870D3, 0x6F1B5DF8, 0x2E2A46E1,
-		0xE136DE66, 0xA007C57F, 0x6354E854, 0x2265F34D,
-		0xE5F3B202, 0xA4C2A91B, 0x67918430, 0x26A09F29,
-		0xB8AEC5E4, 0xF99FDEFD, 0x3ACCF3D6, 0x7BFDE8CF,
-		0xBC6BA980, 0xFD5AB299, 0x3E099FB2, 0x7F3884AB,
-		0xB0241C2C, 0xF1150735, 0x32462A1E, 0x73773107,
-		0xB4E17048, 0xF5D06B51, 0x3683467A, 0x77B25D63,
-		0x4ED7FACB, 0x0FE6E1D2, 0xCCB5CCF9, 0x8D84D7E0,
-		0x4A1296AF, 0x0B238DB6, 0xC870A09D, 0x8941BB84,
-		0x465D2303, 0x076C381A, 0xC43F1531, 0x850E0E28,
-		0x42984F67, 0x03A9547E, 0xC0FA7955, 0x81CB624C,
-		0x1FC53881, 0x5EF42398, 0x9DA70EB3, 0xDC9615AA,
-		0x1B0054E5, 0x5A314FFC, 0x996262D7, 0xD85379CE,
-		0x174FE149, 0x567EFA50, 0x952DD77B, 0xD41CCC62,
-		0x138A8D2D, 0x52BB9634, 0x91E8BB1F, 0xD0D9A006,
-		0xECF37E5E, 0xADC26547, 0x6E91486C, 0x2FA05375,
-		0xE836123A, 0xA9070923, 0x6A542408, 0x2B653F11,
-		0xE479A796, 0xA548BC8F, 0x661B91A4, 0x272A8ABD,
-		0xE0BCCBF2, 0xA18DD0EB, 0x62DEFDC0, 0x23EFE6D9,
-		0xBDE1BC14, 0xFCD0A70D, 0x3F838A26, 0x7EB2913F,
-		0xB924D070, 0xF815CB69, 0x3B46E642, 0x7A77FD5B,
-		0xB56B65DC, 0xF45A7EC5, 0x370953EE, 0x763848F7,
-		0xB1AE09B8, 0xF09F12A1, 0x33CC3F8A, 0x72FD2493
-	}, {
-		0x00000000, 0x376AC201, 0x6ED48403, 0x59BE4602,
-		0xDCA80907, 0xEBC2CB06, 0xB27C8D04, 0x85164F05,
-		0xB851130E, 0x8F3BD10F, 0xD685970D, 0xE1EF550C,
-		0x64F91A09, 0x5393D808, 0x0A2D9E0A, 0x3D475C0B,
-		0x70A3261C, 0x47C9E41D, 0x1E77A21F, 0x291D601E,
-		0xAC0B2F1B, 0x9B61ED1A, 0xC2DFAB18, 0xF5B56919,
-		0xC8F23512, 0xFF98F713, 0xA626B111, 0x914C7310,
-		0x145A3C15, 0x2330FE14, 0x7A8EB816, 0x4DE47A17,
-		0xE0464D38, 0xD72C8F39, 0x8E92C93B, 0xB9F80B3A,
-		0x3CEE443F, 0x0B84863E, 0x523AC03C, 0x6550023D,
-		0x58175E36, 0x6F7D9C37, 0x36C3DA35, 0x01A91834,
-		0x84BF5731, 0xB3D59530, 0xEA6BD332, 0xDD011133,
-		0x90E56B24, 0xA78FA925, 0xFE31EF27, 0xC95B2D26,
-		0x4C4D6223, 0x7B27A022, 0x2299E620, 0x15F32421,
-		0x28B4782A, 0x1FDEBA2B, 0x4660FC29, 0x710A3E28,
-		0xF41C712D, 0xC376B32C, 0x9AC8F52E, 0xADA2372F,
-		0xC08D9A70, 0xF7E75871, 0xAE591E73, 0x9933DC72,
-		0x1C259377, 0x2B4F5176, 0x72F11774, 0x459BD575,
-		0x78DC897E, 0x4FB64B7F, 0x16080D7D, 0x2162CF7C,
-		0xA4748079, 0x931E4278, 0xCAA0047A, 0xFDCAC67B,
-		0xB02EBC6C, 0x87447E6D, 0xDEFA386F, 0xE990FA6E,
-		0x6C86B56B, 0x5BEC776A, 0x02523168, 0x3538F369,
-		0x087FAF62, 0x3F156D63, 0x66AB2B61, 0x51C1E960,
-		0xD4D7A665, 0xE3BD6464, 0xBA032266, 0x8D69E067,
-		0x20CBD748, 0x17A11549, 0x4E1F534B, 0x7975914A,
-		0xFC63DE4F, 0xCB091C4E, 0x92B75A4C, 0xA5DD984D,
-		0x989AC446, 0xAFF00647, 0xF64E4045, 0xC1248244,
-		0x4432CD41, 0x73580F40, 0x2AE64942, 0x1D8C8B43,
-		0x5068F154, 0x67023355, 0x3EBC7557, 0x09D6B756,
-		0x8CC0F853, 0xBBAA3A52, 0xE2147C50, 0xD57EBE51,
-		0xE839E25A, 0xDF53205B, 0x86ED6659, 0xB187A458,
-		0x3491EB5D, 0x03FB295C, 0x5A456F5E, 0x6D2FAD5F,
-		0x801B35E1, 0xB771F7E0, 0xEECFB1E2, 0xD9A573E3,
-		0x5CB33CE6, 0x6BD9FEE7, 0x3267B8E5, 0x050D7AE4,
-		0x384A26EF, 0x0F20E4EE, 0x569EA2EC, 0x61F460ED,
-		0xE4E22FE8, 0xD388EDE9, 0x8A36ABEB, 0xBD5C69EA,
-		0xF0B813FD, 0xC7D2D1FC, 0x9E6C97FE, 0xA90655FF,
-		0x2C101AFA, 0x1B7AD8FB, 0x42C49EF9, 0x75AE5CF8,
-		0x48E900F3, 0x7F83C2F2, 0x263D84F0, 0x115746F1,
-		0x944109F4, 0xA32BCBF5, 0xFA958DF7, 0xCDFF4FF6,
-		0x605D78D9, 0x5737BAD8, 0x0E89FCDA, 0x39E33EDB,
-		0xBCF571DE, 0x8B9FB3DF, 0xD221F5DD, 0xE54B37DC,
-		0xD80C6BD7, 0xEF66A9D6, 0xB6D8EFD4, 0x81B22DD5,
-		0x04A462D0, 0x33CEA0D1, 0x6A70E6D3, 0x5D1A24D2,
-		0x10FE5EC5, 0x27949CC4, 0x7E2ADAC6, 0x494018C7,
-		0xCC5657C2, 0xFB3C95C3, 0xA282D3C1, 0x95E811C0,
-		0xA8AF4DCB, 0x9FC58FCA, 0xC67BC9C8, 0xF1110BC9,
-		0x740744CC, 0x436D86CD, 0x1AD3C0CF, 0x2DB902CE,
-		0x4096AF91, 0x77FC6D90, 0x2E422B92, 0x1928E993,
-		0x9C3EA696, 0xAB546497, 0xF2EA2295, 0xC580E094,
-		0xF8C7BC9F, 0xCFAD7E9E, 0x9613389C, 0xA179FA9D,
-		0x246FB598, 0x13057799, 0x4ABB319B, 0x7DD1F39A,
-		0x3035898D, 0x075F4B8C, 0x5EE10D8E, 0x698BCF8F,
-		0xEC9D808A, 0xDBF7428B, 0x82490489, 0xB523C688,
-		0x88649A83, 0xBF0E5882, 0xE6B01E80, 0xD1DADC81,
-		0x54CC9384, 0x63A65185, 0x3A181787, 0x0D72D586,
-		0xA0D0E2A9, 0x97BA20A8, 0xCE0466AA, 0xF96EA4AB,
-		0x7C78EBAE, 0x4B1229AF, 0x12AC6FAD, 0x25C6ADAC,
-		0x1881F1A7, 0x2FEB33A6, 0x765575A4, 0x413FB7A5,
-		0xC429F8A0, 0xF3433AA1, 0xAAFD7CA3, 0x9D97BEA2,
-		0xD073C4B5, 0xE71906B4, 0xBEA740B6, 0x89CD82B7,
-		0x0CDBCDB2, 0x3BB10FB3, 0x620F49B1, 0x55658BB0,
-		0x6822D7BB, 0x5F4815BA, 0x06F653B8, 0x319C91B9,
-		0xB48ADEBC, 0x83E01CBD, 0xDA5E5ABF, 0xED3498BE
-	}, {
-		0x00000000, 0x6567BCB8, 0x8BC809AA, 0xEEAFB512,
-		0x5797628F, 0x32F0DE37, 0xDC5F6B25, 0xB938D79D,
-		0xEF28B4C5, 0x8A4F087D, 0x64E0BD6F, 0x018701D7,
-		0xB8BFD64A, 0xDDD86AF2, 0x3377DFE0, 0x56106358,
-		0x9F571950, 0xFA30A5E8, 0x149F10FA, 0x71F8AC42,
-		0xC8C07BDF, 0xADA7C767, 0x43087275, 0x266FCECD,
-		0x707FAD95, 0x1518112D, 0xFBB7A43F, 0x9ED01887,
-		0x27E8CF1A, 0x428F73A2, 0xAC20C6B0, 0xC9477A08,
-		0x3EAF32A0, 0x5BC88E18, 0xB5673B0A, 0xD00087B2,
-		0x6938502F, 0x0C5FEC97, 0xE2F05985, 0x8797E53D,
-		0xD1878665, 0xB4E03ADD, 0x5A4F8FCF, 0x3F283377,
-		0x8610E4EA, 0xE3775852, 0x0DD8ED40, 0x68BF51F8,
-		0xA1F82BF0, 0xC49F9748, 0x2A30225A, 0x4F579EE2,
-		0xF66F497F, 0x9308F5C7, 0x7DA740D5, 0x18C0FC6D,
-		0x4ED09F35, 0x2BB7238D, 0xC518969F, 0xA07F2A27,
-		0x1947FDBA, 0x7C204102, 0x928FF410, 0xF7E848A8,
-		0x3D58149B, 0x583FA823, 0xB6901D31, 0xD3F7A189,
-		0x6ACF7614, 0x0FA8CAAC, 0xE1077FBE, 0x8460C306,
-		0xD270A05E, 0xB7171CE6, 0x59B8A9F4, 0x3CDF154C,
-		0x85E7C2D1, 0xE0807E69, 0x0E2FCB7B, 0x6B4877C3,
-		0xA20F0DCB, 0xC768B173, 0x29C70461, 0x4CA0B8D9,
-		0xF5986F44, 0x90FFD3FC, 0x7E5066EE, 0x1B37DA56,
-		0x4D27B90E, 0x284005B6, 0xC6EFB0A4, 0xA3880C1C,
-		0x1AB0DB81, 0x7FD76739, 0x9178D22B, 0xF41F6E93,
-		0x03F7263B, 0x66909A83, 0x883F2F91, 0xED589329,
-		0x546044B4, 0x3107F80C, 0xDFA84D1E, 0xBACFF1A6,
-		0xECDF92FE, 0x89B82E46, 0x67179B54, 0x027027EC,
-		0xBB48F071, 0xDE2F4CC9, 0x3080F9DB, 0x55E74563,
-		0x9CA03F6B, 0xF9C783D3, 0x176836C1, 0x720F8A79,
-		0xCB375DE4, 0xAE50E15C, 0x40FF544E, 0x2598E8F6,
-		0x73888BAE, 0x16EF3716, 0xF8408204, 0x9D273EBC,
-		0x241FE921, 0x41785599, 0xAFD7E08B, 0xCAB05C33,
-		0x3BB659ED, 0x5ED1E555, 0xB07E5047, 0xD519ECFF,
-		0x6C213B62, 0x094687DA, 0xE7E932C8, 0x828E8E70,
-		0xD49EED28, 0xB1F95190, 0x5F56E482, 0x3A31583A,
-		0x83098FA7, 0xE66E331F, 0x08C1860D, 0x6DA63AB5,
-		0xA4E140BD, 0xC186FC05, 0x2F294917, 0x4A4EF5AF,
-		0xF3762232, 0x96119E8A, 0x78BE2B98, 0x1DD99720,
-		0x4BC9F478, 0x2EAE48C0, 0xC001FDD2, 0xA566416A,
-		0x1C5E96F7, 0x79392A4F, 0x97969F5D, 0xF2F123E5,
-		0x05196B4D, 0x607ED7F5, 0x8ED162E7, 0xEBB6DE5F,
-		0x528E09C2, 0x37E9B57A, 0xD9460068, 0xBC21BCD0,
-		0xEA31DF88, 0x8F566330, 0x61F9D622, 0x049E6A9A,
-		0xBDA6BD07, 0xD8C101BF, 0x366EB4AD, 0x53090815,
-		0x9A4E721D, 0xFF29CEA5, 0x11867BB7, 0x74E1C70F,
-		0xCDD91092, 0xA8BEAC2A, 0x46111938, 0x2376A580,
-		0x7566C6D8, 0x10017A60, 0xFEAECF72, 0x9BC973CA,
-		0x22F1A457, 0x479618EF, 0xA939ADFD, 0xCC5E1145,
-		0x06EE4D76, 0x6389F1CE, 0x8D2644DC, 0xE841F864,
-		0x51792FF9, 0x341E9341, 0xDAB12653, 0xBFD69AEB,
-		0xE9C6F9B3, 0x8CA1450B, 0x620EF019, 0x07694CA1,
-		0xBE519B3C, 0xDB362784, 0x35999296, 0x50FE2E2E,
-		0x99B95426, 0xFCDEE89E, 0x12715D8C, 0x7716E134,
-		0xCE2E36A9, 0xAB498A11, 0x45E63F03, 0x208183BB,
-		0x7691E0E3, 0x13F65C5B, 0xFD59E949, 0x983E55F1,
-		0x2106826C, 0x44613ED4, 0xAACE8BC6, 0xCFA9377E,
-		0x38417FD6, 0x5D26C36E, 0xB389767C, 0xD6EECAC4,
-		0x6FD61D59, 0x0AB1A1E1, 0xE41E14F3, 0x8179A84B,
-		0xD769CB13, 0xB20E77AB, 0x5CA1C2B9, 0x39C67E01,
-		0x80FEA99C, 0xE5991524, 0x0B36A036, 0x6E511C8E,
-		0xA7166686, 0xC271DA3E, 0x2CDE6F2C, 0x49B9D394,
-		0xF0810409, 0x95E6B8B1, 0x7B490DA3, 0x1E2EB11B,
-		0x483ED243, 0x2D596EFB, 0xC3F6DBE9, 0xA6916751,
-		0x1FA9B0CC, 0x7ACE0C74, 0x9461B966, 0xF10605DE
-	}, {
-		0x00000000, 0xB029603D, 0x6053C07A, 0xD07AA047,
-		0xC0A680F5, 0x708FE0C8, 0xA0F5408F, 0x10DC20B2,
-		0xC14B7030, 0x7162100D, 0xA118B04A, 0x1131D077,
-		0x01EDF0C5, 0xB1C490F8, 0x61BE30BF, 0xD1975082,
-		0x8297E060, 0x32BE805D, 0xE2C4201A, 0x52ED4027,
-		0x42316095, 0xF21800A8, 0x2262A0EF, 0x924BC0D2,
-		0x43DC9050, 0xF3F5F06D, 0x238F502A, 0x93A63017,
-		0x837A10A5, 0x33537098, 0xE329D0DF, 0x5300B0E2,
-		0x042FC1C1, 0xB406A1FC, 0x647C01BB, 0xD4556186,
-		0xC4894134, 0x74A02109, 0xA4DA814E, 0x14F3E173,
-		0xC564B1F1, 0x754DD1CC, 0xA537718B, 0x151E11B6,
-		0x05C23104, 0xB5EB5139, 0x6591F17E, 0xD5B89143,
-		0x86B821A1, 0x3691419C, 0xE6EBE1DB, 0x56C281E6,
-		0x461EA154, 0xF637C169, 0x264D612E, 0x96640113,
-		0x47F35191, 0xF7DA31AC, 0x27A091EB, 0x9789F1D6,
-		0x8755D164, 0x377CB159, 0xE706111E, 0x572F7123,
-		0x4958F358, 0xF9719365, 0x290B3322, 0x9922531F,
-		0x89FE73AD, 0x39D71390, 0xE9ADB3D7, 0x5984D3EA,
-		0x88138368, 0x383AE355, 0xE8404312, 0x5869232F,
-		0x48B5039D, 0xF89C63A0, 0x28E6C3E7, 0x98CFA3DA,
-		0xCBCF1338, 0x7BE67305, 0xAB9CD342, 0x1BB5B37F,
-		0x0B6993CD, 0xBB40F3F0, 0x6B3A53B7, 0xDB13338A,
-		0x0A846308, 0xBAAD0335, 0x6AD7A372, 0xDAFEC34F,
-		0xCA22E3FD, 0x7A0B83C0, 0xAA712387, 0x1A5843BA,
-		0x4D773299, 0xFD5E52A4, 0x2D24F2E3, 0x9D0D92DE,
-		0x8DD1B26C, 0x3DF8D251, 0xED827216, 0x5DAB122B,
-		0x8C3C42A9, 0x3C152294, 0xEC6F82D3, 0x5C46E2EE,
-		0x4C9AC25C, 0xFCB3A261, 0x2CC90226, 0x9CE0621B,
-		0xCFE0D2F9, 0x7FC9B2C4, 0xAFB31283, 0x1F9A72BE,
-		0x0F46520C, 0xBF6F3231, 0x6F159276, 0xDF3CF24B,
-		0x0EABA2C9, 0xBE82C2F4, 0x6EF862B3, 0xDED1028E,
-		0xCE0D223C, 0x7E244201, 0xAE5EE246, 0x1E77827B,
-		0x92B0E6B1, 0x2299868C, 0xF2E326CB, 0x42CA46F6,
-		0x52166644, 0xE23F0679, 0x3245A63E, 0x826CC603,
-		0x53FB9681, 0xE3D2F6BC, 0x33A856FB, 0x838136C6,
-		0x935D1674, 0x23747649, 0xF30ED60E, 0x4327B633,
-		0x102706D1, 0xA00E66EC, 0x7074C6AB, 0xC05DA696,
-		0xD0818624, 0x60A8E619, 0xB0D2465E, 0x00FB2663,
-		0xD16C76E1, 0x614516DC, 0xB13FB69B, 0x0116D6A6,
-		0x11CAF614, 0xA1E39629, 0x7199366E, 0xC1B05653,
-		0x969F2770, 0x26B6474D, 0xF6CCE70A, 0x46E58737,
-		0x5639A785, 0xE610C7B8, 0x366A67FF, 0x864307C2,
-		0x57D45740, 0xE7FD377D, 0x3787973A, 0x87AEF707,
-		0x9772D7B5, 0x275BB788, 0xF72117CF, 0x470877F2,
-		0x1408C710, 0xA421A72D, 0x745B076A, 0xC4726757,
-		0xD4AE47E5, 0x648727D8, 0xB4FD879F, 0x04D4E7A2,
-		0xD543B720, 0x656AD71D, 0xB510775A, 0x05391767,
-		0x15E537D5, 0xA5CC57E8, 0x75B6F7AF, 0xC59F9792,
-		0xDBE815E9, 0x6BC175D4, 0xBBBBD593, 0x0B92B5AE,
-		0x1B4E951C, 0xAB67F521, 0x7B1D5566, 0xCB34355B,
-		0x1AA365D9, 0xAA8A05E4, 0x7AF0A5A3, 0xCAD9C59E,
-		0xDA05E52C, 0x6A2C8511, 0xBA562556, 0x0A7F456B,
-		0x597FF589, 0xE95695B4, 0x392C35F3, 0x890555CE,
-		0x99D9757C, 0x29F01541, 0xF98AB506, 0x49A3D53B,
-		0x983485B9, 0x281DE584, 0xF86745C3, 0x484E25FE,
-		0x5892054C, 0xE8BB6571, 0x38C1C536, 0x88E8A50B,
-		0xDFC7D428, 0x6FEEB415, 0xBF941452, 0x0FBD746F,
-		0x1F6154DD, 0xAF4834E0, 0x7F3294A7, 0xCF1BF49A,
-		0x1E8CA418, 0xAEA5C425, 0x7EDF6462, 0xCEF6045F,
-		0xDE2A24ED, 0x6E0344D0, 0xBE79E497, 0x0E5084AA,
-		0x5D503448, 0xED795475, 0x3D03F432, 0x8D2A940F,
-		0x9DF6B4BD, 0x2DDFD480, 0xFDA574C7, 0x4D8C14FA,
-		0x9C1B4478, 0x2C322445, 0xFC488402, 0x4C61E43F,
-		0x5CBDC48D, 0xEC94A4B0, 0x3CEE04F7, 0x8CC764CA
-	}, {
-		0x00000000, 0xA5D35CCB, 0x0BA1C84D, 0xAE729486,
-		0x1642919B, 0xB391CD50, 0x1DE359D6, 0xB830051D,
-		0x6D8253EC, 0xC8510F27, 0x66239BA1, 0xC3F0C76A,
-		0x7BC0C277, 0xDE139EBC, 0x70610A3A, 0xD5B256F1,
-		0x9B02D603, 0x3ED18AC8, 0x90A31E4E, 0x35704285,
-		0x8D404798, 0x28931B53, 0x86E18FD5, 0x2332D31E,
-		0xF68085EF, 0x5353D924, 0xFD214DA2, 0x58F21169,
-		0xE0C21474, 0x451148BF, 0xEB63DC39, 0x4EB080F2,
-		0x3605AC07, 0x93D6F0CC, 0x3DA4644A, 0x98773881,
-		0x20473D9C, 0x85946157, 0x2BE6F5D1, 0x8E35A91A,
-		0x5B87FFEB, 0xFE54A320, 0x502637A6, 0xF5F56B6D,
-		0x4DC56E70, 0xE81632BB, 0x4664A63D, 0xE3B7FAF6,
-		0xAD077A04, 0x08D426CF, 0xA6A6B249, 0x0375EE82,
-		0xBB45EB9F, 0x1E96B754, 0xB0E423D2, 0x15377F19,
-		0xC08529E8, 0x65567523, 0xCB24E1A5, 0x6EF7BD6E,
-		0xD6C7B873, 0x7314E4B8, 0xDD66703E, 0x78B52CF5,
-		0x6C0A580F, 0xC9D904C4, 0x67AB9042, 0xC278CC89,
-		0x7A48C994, 0xDF9B955F, 0x71E901D9, 0xD43A5D12,
-		0x01880BE3, 0xA45B5728, 0x0A29C3AE, 0xAFFA9F65,
-		0x17CA9A78, 0xB219C6B3, 0x1C6B5235, 0xB9B80EFE,
-		0xF7088E0C, 0x52DBD2C7, 0xFCA94641, 0x597A1A8A,
-		0xE14A1F97, 0x4499435C, 0xEAEBD7DA, 0x4F388B11,
-		0x9A8ADDE0, 0x3F59812B, 0x912B15AD, 0x34F84966,
-		0x8CC84C7B, 0x291B10B0, 0x87698436, 0x22BAD8FD,
-		0x5A0FF408, 0xFFDCA8C3, 0x51AE3C45, 0xF47D608E,
-		0x4C4D6593, 0xE99E3958, 0x47ECADDE, 0xE23FF115,
-		0x378DA7E4, 0x925EFB2F, 0x3C2C6FA9, 0x99FF3362,
-		0x21CF367F, 0x841C6AB4, 0x2A6EFE32, 0x8FBDA2F9,
-		0xC10D220B, 0x64DE7EC0, 0xCAACEA46, 0x6F7FB68D,
-		0xD74FB390, 0x729CEF5B, 0xDCEE7BDD, 0x793D2716,
-		0xAC8F71E7, 0x095C2D2C, 0xA72EB9AA, 0x02FDE561,
-		0xBACDE07C, 0x1F1EBCB7, 0xB16C2831, 0x14BF74FA,
-		0xD814B01E, 0x7DC7ECD5, 0xD3B57853, 0x76662498,
-		0xCE562185, 0x6B857D4E, 0xC5F7E9C8, 0x6024B503,
-		0xB596E3F2, 0x1045BF39, 0xBE372BBF, 0x1BE47774,
-		0xA3D47269, 0x06072EA2, 0xA875BA24, 0x0DA6E6EF,
-		0x4316661D, 0xE6C53AD6, 0x48B7AE50, 0xED64F29B,
-		0x5554F786, 0xF087AB4D, 0x5EF53FCB, 0xFB266300,
-		0x2E9435F1, 0x8B47693A, 0x2535FDBC, 0x80E6A177,
-		0x38D6A46A, 0x9D05F8A1, 0x33776C27, 0x96A430EC,
-		0xEE111C19, 0x4BC240D2, 0xE5B0D454, 0x4063889F,
-		0xF8538D82, 0x5D80D149, 0xF3F245CF, 0x56211904,
-		0x83934FF5, 0x2640133E, 0x883287B8, 0x2DE1DB73,
-		0x95D1DE6E, 0x300282A5, 0x9E701623, 0x3BA34AE8,
-		0x7513CA1A, 0xD0C096D1, 0x7EB20257, 0xDB615E9C,
-		0x63515B81, 0xC682074A, 0x68F093CC, 0xCD23CF07,
-		0x189199F6, 0xBD42C53D, 0x133051BB, 0xB6E30D70,
-		0x0ED3086D, 0xAB0054A6, 0x0572C020, 0xA0A19CEB,
-		0xB41EE811, 0x11CDB4DA, 0xBFBF205C, 0x1A6C7C97,
-		0xA25C798A, 0x078F2541, 0xA9FDB1C7, 0x0C2EED0C,
-		0xD99CBBFD, 0x7C4FE736, 0xD23D73B0, 0x77EE2F7B,
-		0xCFDE2A66, 0x6A0D76AD, 0xC47FE22B, 0x61ACBEE0,
-		0x2F1C3E12, 0x8ACF62D9, 0x24BDF65F, 0x816EAA94,
-		0x395EAF89, 0x9C8DF342, 0x32FF67C4, 0x972C3B0F,
-		0x429E6DFE, 0xE74D3135, 0x493FA5B3, 0xECECF978,
-		0x54DCFC65, 0xF10FA0AE, 0x5F7D3428, 0xFAAE68E3,
-		0x821B4416, 0x27C818DD, 0x89BA8C5B, 0x2C69D090,
-		0x9459D58D, 0x318A8946, 0x9FF81DC0, 0x3A2B410B,
-		0xEF9917FA, 0x4A4A4B31, 0xE438DFB7, 0x41EB837C,
-		0xF9DB8661, 0x5C08DAAA, 0xF27A4E2C, 0x57A912E7,
-		0x19199215, 0xBCCACEDE, 0x12B85A58, 0xB76B0693,
-		0x0F5B038E, 0xAA885F45, 0x04FACBC3, 0xA1299708,
-		0x749BC1F9, 0xD1489D32, 0x7F3A09B4, 0xDAE9557F,
-		0x62D95062, 0xC70A0CA9, 0x6978982F, 0xCCABC4E4
-	}, {
-		0x00000000, 0xB40B77A6, 0x29119F97, 0x9D1AE831,
-		0x13244FF4, 0xA72F3852, 0x3A35D063, 0x8E3EA7C5,
-		0x674EEF33, 0xD3459895, 0x4E5F70A4, 0xFA540702,
-		0x746AA0C7, 0xC061D761, 0x5D7B3F50, 0xE97048F6,
-		0xCE9CDE67, 0x7A97A9C1, 0xE78D41F0, 0x53863656,
-		0xDDB89193, 0x69B3E635, 0xF4A90E04, 0x40A279A2,
-		0xA9D23154, 0x1DD946F2, 0x80C3AEC3, 0x34C8D965,
-		0xBAF67EA0, 0x0EFD0906, 0x93E7E137, 0x27EC9691,
-		0x9C39BDCF, 0x2832CA69, 0xB5282258, 0x012355FE,
-		0x8F1DF23B, 0x3B16859D, 0xA60C6DAC, 0x12071A0A,
-		0xFB7752FC, 0x4F7C255A, 0xD266CD6B, 0x666DBACD,
-		0xE8531D08, 0x5C586AAE, 0xC142829F, 0x7549F539,
-		0x52A563A8, 0xE6AE140E, 0x7BB4FC3F, 0xCFBF8B99,
-		0x41812C5C, 0xF58A5BFA, 0x6890B3CB, 0xDC9BC46D,
-		0x35EB8C9B, 0x81E0FB3D, 0x1CFA130C, 0xA8F164AA,
-		0x26CFC36F, 0x92C4B4C9, 0x0FDE5CF8, 0xBBD52B5E,
-		0x79750B44, 0xCD7E7CE2, 0x506494D3, 0xE46FE375,
-		0x6A5144B0, 0xDE5A3316, 0x4340DB27, 0xF74BAC81,
-		0x1E3BE477, 0xAA3093D1, 0x372A7BE0, 0x83210C46,
-		0x0D1FAB83, 0xB914DC25, 0x240E3414, 0x900543B2,
-		0xB7E9D523, 0x03E2A285, 0x9EF84AB4, 0x2AF33D12,
-		0xA4CD9AD7, 0x10C6ED71, 0x8DDC0540, 0x39D772E6,
-		0xD0A73A10, 0x64AC4DB6, 0xF9B6A587, 0x4DBDD221,
-		0xC38375E4, 0x77880242, 0xEA92EA73, 0x5E999DD5,
-		0xE54CB68B, 0x5147C12D, 0xCC5D291C, 0x78565EBA,
-		0xF668F97F, 0x42638ED9, 0xDF7966E8, 0x6B72114E,
-		0x820259B8, 0x36092E1E, 0xAB13C62F, 0x1F18B189,
-		0x9126164C, 0x252D61EA, 0xB83789DB, 0x0C3CFE7D,
-		0x2BD068EC, 0x9FDB1F4A, 0x02C1F77B, 0xB6CA80DD,
-		0x38F42718, 0x8CFF50BE, 0x11E5B88F, 0xA5EECF29,
-		0x4C9E87DF, 0xF895F079, 0x658F1848, 0xD1846FEE,
-		0x5FBAC82B, 0xEBB1BF8D, 0x76AB57BC, 0xC2A0201A,
-		0xF2EA1688, 0x46E1612E, 0xDBFB891F, 0x6FF0FEB9,
-		0xE1CE597C, 0x55C52EDA, 0xC8DFC6EB, 0x7CD4B14D,
-		0x95A4F9BB, 0x21AF8E1D, 0xBCB5662C, 0x08BE118A,
-		0x8680B64F, 0x328BC1E9, 0xAF9129D8, 0x1B9A5E7E,
-		0x3C76C8EF, 0x887DBF49, 0x15675778, 0xA16C20DE,
-		0x2F52871B, 0x9B59F0BD, 0x0643188C, 0xB2486F2A,
-		0x5B3827DC, 0xEF33507A, 0x7229B84B, 0xC622CFED,
-		0x481C6828, 0xFC171F8E, 0x610DF7BF, 0xD5068019,
-		0x6ED3AB47, 0xDAD8DCE1, 0x47C234D0, 0xF3C94376,
-		0x7DF7E4B3, 0xC9FC9315, 0x54E67B24, 0xE0ED0C82,
-		0x099D4474, 0xBD9633D2, 0x208CDBE3, 0x9487AC45,
-		0x1AB90B80, 0xAEB27C26, 0x33A89417, 0x87A3E3B1,
-		0xA04F7520, 0x14440286, 0x895EEAB7, 0x3D559D11,
-		0xB36B3AD4, 0x07604D72, 0x9A7AA543, 0x2E71D2E5,
-		0xC7019A13, 0x730AEDB5, 0xEE100584, 0x5A1B7222,
-		0xD425D5E7, 0x602EA241, 0xFD344A70, 0x493F3DD6,
-		0x8B9F1DCC, 0x3F946A6A, 0xA28E825B, 0x1685F5FD,
-		0x98BB5238, 0x2CB0259E, 0xB1AACDAF, 0x05A1BA09,
-		0xECD1F2FF, 0x58DA8559, 0xC5C06D68, 0x71CB1ACE,
-		0xFFF5BD0B, 0x4BFECAAD, 0xD6E4229C, 0x62EF553A,
-		0x4503C3AB, 0xF108B40D, 0x6C125C3C, 0xD8192B9A,
-		0x56278C5F, 0xE22CFBF9, 0x7F3613C8, 0xCB3D646E,
-		0x224D2C98, 0x96465B3E, 0x0B5CB30F, 0xBF57C4A9,
-		0x3169636C, 0x856214CA, 0x1878FCFB, 0xAC738B5D,
-		0x17A6A003, 0xA3ADD7A5, 0x3EB73F94, 0x8ABC4832,
-		0x0482EFF7, 0xB0899851, 0x2D937060, 0x999807C6,
-		0x70E84F30, 0xC4E33896, 0x59F9D0A7, 0xEDF2A701,
-		0x63CC00C4, 0xD7C77762, 0x4ADD9F53, 0xFED6E8F5,
-		0xD93A7E64, 0x6D3109C2, 0xF02BE1F3, 0x44209655,
-		0xCA1E3190, 0x7E154636, 0xE30FAE07, 0x5704D9A1,
-		0xBE749157, 0x0A7FE6F1, 0x97650EC0, 0x236E7966,
-		0xAD50DEA3, 0x195BA905, 0x84414134, 0x304A3692
-	}, {
-		0x00000000, 0x9E00AACC, 0x7D072542, 0xE3078F8E,
-		0xFA0E4A84, 0x640EE048, 0x87096FC6, 0x1909C50A,
-		0xB51BE5D3, 0x2B1B4F1F, 0xC81CC091, 0x561C6A5D,
-		0x4F15AF57, 0xD115059B, 0x32128A15, 0xAC1220D9,
-		0x2B31BB7C, 0xB53111B0, 0x56369E3E, 0xC83634F2,
-		0xD13FF1F8, 0x4F3F5B34, 0xAC38D4BA, 0x32387E76,
-		0x9E2A5EAF, 0x002AF463, 0xE32D7BED, 0x7D2DD121,
-		0x6424142B, 0xFA24BEE7, 0x19233169, 0x87239BA5,
-		0x566276F9, 0xC862DC35, 0x2B6553BB, 0xB565F977,
-		0xAC6C3C7D, 0x326C96B1, 0xD16B193F, 0x4F6BB3F3,
-		0xE379932A, 0x7D7939E6, 0x9E7EB668, 0x007E1CA4,
-		0x1977D9AE, 0x87777362, 0x6470FCEC, 0xFA705620,
-		0x7D53CD85, 0xE3536749, 0x0054E8C7, 0x9E54420B,
-		0x875D8701, 0x195D2DCD, 0xFA5AA243, 0x645A088F,
-		0xC8482856, 0x5648829A, 0xB54F0D14, 0x2B4FA7D8,
-		0x324662D2, 0xAC46C81E, 0x4F414790, 0xD141ED5C,
-		0xEDC29D29, 0x73C237E5, 0x90C5B86B, 0x0EC512A7,
-		0x17CCD7AD, 0x89CC7D61, 0x6ACBF2EF, 0xF4CB5823,
-		0x58D978FA, 0xC6D9D236, 0x25DE5DB8, 0xBBDEF774,
-		0xA2D7327E, 0x3CD798B2, 0xDFD0173C, 0x41D0BDF0,
-		0xC6F32655, 0x58F38C99, 0xBBF40317, 0x25F4A9DB,
-		0x3CFD6CD1, 0xA2FDC61D, 0x41FA4993, 0xDFFAE35F,
-		0x73E8C386, 0xEDE8694A, 0x0EEFE6C4, 0x90EF4C08,
-		0x89E68902, 0x17E623CE, 0xF4E1AC40, 0x6AE1068C,
-		0xBBA0EBD0, 0x25A0411C, 0xC6A7CE92, 0x58A7645E,
-		0x41AEA154, 0xDFAE0B98, 0x3CA98416, 0xA2A92EDA,
-		0x0EBB0E03, 0x90BBA4CF, 0x73BC2B41, 0xEDBC818D,
-		0xF4B54487, 0x6AB5EE4B, 0x89B261C5, 0x17B2CB09,
-		0x909150AC, 0x0E91FA60, 0xED9675EE, 0x7396DF22,
-		0x6A9F1A28, 0xF49FB0E4, 0x17983F6A, 0x899895A6,
-		0x258AB57F, 0xBB8A1FB3, 0x588D903D, 0xC68D3AF1,
-		0xDF84FFFB, 0x41845537, 0xA283DAB9, 0x3C837075,
-		0xDA853B53, 0x4485919F, 0xA7821E11, 0x3982B4DD,
-		0x208B71D7, 0xBE8BDB1B, 0x5D8C5495, 0xC38CFE59,
-		0x6F9EDE80, 0xF19E744C, 0x1299FBC2, 0x8C99510E,
-		0x95909404, 0x0B903EC8, 0xE897B146, 0x76971B8A,
-		0xF1B4802F, 0x6FB42AE3, 0x8CB3A56D, 0x12B30FA1,
-		0x0BBACAAB, 0x95BA6067, 0x76BDEFE9, 0xE8BD4525,
-		0x44AF65FC, 0xDAAFCF30, 0x39A840BE, 0xA7A8EA72,
-		0xBEA12F78, 0x20A185B4, 0xC3A60A3A, 0x5DA6A0F6,
-		0x8CE74DAA, 0x12E7E766, 0xF1E068E8, 0x6FE0C224,
-		0x76E9072E, 0xE8E9ADE2, 0x0BEE226C, 0x95EE88A0,
-		0x39FCA879, 0xA7FC02B5, 0x44FB8D3B, 0xDAFB27F7,
-		0xC3F2E2FD, 0x5DF24831, 0xBEF5C7BF, 0x20F56D73,
-		0xA7D6F6D6, 0x39D65C1A, 0xDAD1D394, 0x44D17958,
-		0x5DD8BC52, 0xC3D8169E, 0x20DF9910, 0xBEDF33DC,
-		0x12CD1305, 0x8CCDB9C9, 0x6FCA3647, 0xF1CA9C8B,
-		0xE8C35981, 0x76C3F34D, 0x95C47CC3, 0x0BC4D60F,
-		0x3747A67A, 0xA9470CB6, 0x4A408338, 0xD44029F4,
-		0xCD49ECFE, 0x53494632, 0xB04EC9BC, 0x2E4E6370,
-		0x825C43A9, 0x1C5CE965, 0xFF5B66EB, 0x615BCC27,
-		0x7852092D, 0xE652A3E1, 0x05552C6F, 0x9B5586A3,
-		0x1C761D06, 0x8276B7CA, 0x61713844, 0xFF719288,
-		0xE6785782, 0x7878FD4E, 0x9B7F72C0, 0x057FD80C,
-		0xA96DF8D5, 0x376D5219, 0xD46ADD97, 0x4A6A775B,
-		0x5363B251, 0xCD63189D, 0x2E649713, 0xB0643DDF,
-		0x6125D083, 0xFF257A4F, 0x1C22F5C1, 0x82225F0D,
-		0x9B2B9A07, 0x052B30CB, 0xE62CBF45, 0x782C1589,
-		0xD43E3550, 0x4A3E9F9C, 0xA9391012, 0x3739BADE,
-		0x2E307FD4, 0xB030D518, 0x53375A96, 0xCD37F05A,
-		0x4A146BFF, 0xD414C133, 0x37134EBD, 0xA913E471,
-		0xB01A217B, 0x2E1A8BB7, 0xCD1D0439, 0x531DAEF5,
-		0xFF0F8E2C, 0x610F24E0, 0x8208AB6E, 0x1C0801A2,
-		0x0501C4A8, 0x9B016E64, 0x7806E1EA, 0xE6064B26
-	}
-};
diff --git a/src/extra/xz/check/crc32_table_le.h b/src/extra/xz/check/crc32_table_le.h
deleted file mode 100644
index 25f4fc4..0000000
--- a/src/extra/xz/check/crc32_table_le.h
+++ /dev/null
@@ -1,525 +0,0 @@
-/* This file has been automatically generated by crc32_tablegen.c. */
-
-const uint32_t lzma_crc32_table[8][256] = {
-	{
-		0x00000000, 0x77073096, 0xEE0E612C, 0x990951BA,
-		0x076DC419, 0x706AF48F, 0xE963A535, 0x9E6495A3,
-		0x0EDB8832, 0x79DCB8A4, 0xE0D5E91E, 0x97D2D988,
-		0x09B64C2B, 0x7EB17CBD, 0xE7B82D07, 0x90BF1D91,
-		0x1DB71064, 0x6AB020F2, 0xF3B97148, 0x84BE41DE,
-		0x1ADAD47D, 0x6DDDE4EB, 0xF4D4B551, 0x83D385C7,
-		0x136C9856, 0x646BA8C0, 0xFD62F97A, 0x8A65C9EC,
-		0x14015C4F, 0x63066CD9, 0xFA0F3D63, 0x8D080DF5,
-		0x3B6E20C8, 0x4C69105E, 0xD56041E4, 0xA2677172,
-		0x3C03E4D1, 0x4B04D447, 0xD20D85FD, 0xA50AB56B,
-		0x35B5A8FA, 0x42B2986C, 0xDBBBC9D6, 0xACBCF940,
-		0x32D86CE3, 0x45DF5C75, 0xDCD60DCF, 0xABD13D59,
-		0x26D930AC, 0x51DE003A, 0xC8D75180, 0xBFD06116,
-		0x21B4F4B5, 0x56B3C423, 0xCFBA9599, 0xB8BDA50F,
-		0x2802B89E, 0x5F058808, 0xC60CD9B2, 0xB10BE924,
-		0x2F6F7C87, 0x58684C11, 0xC1611DAB, 0xB6662D3D,
-		0x76DC4190, 0x01DB7106, 0x98D220BC, 0xEFD5102A,
-		0x71B18589, 0x06B6B51F, 0x9FBFE4A5, 0xE8B8D433,
-		0x7807C9A2, 0x0F00F934, 0x9609A88E, 0xE10E9818,
-		0x7F6A0DBB, 0x086D3D2D, 0x91646C97, 0xE6635C01,
-		0x6B6B51F4, 0x1C6C6162, 0x856530D8, 0xF262004E,
-		0x6C0695ED, 0x1B01A57B, 0x8208F4C1, 0xF50FC457,
-		0x65B0D9C6, 0x12B7E950, 0x8BBEB8EA, 0xFCB9887C,
-		0x62DD1DDF, 0x15DA2D49, 0x8CD37CF3, 0xFBD44C65,
-		0x4DB26158, 0x3AB551CE, 0xA3BC0074, 0xD4BB30E2,
-		0x4ADFA541, 0x3DD895D7, 0xA4D1C46D, 0xD3D6F4FB,
-		0x4369E96A, 0x346ED9FC, 0xAD678846, 0xDA60B8D0,
-		0x44042D73, 0x33031DE5, 0xAA0A4C5F, 0xDD0D7CC9,
-		0x5005713C, 0x270241AA, 0xBE0B1010, 0xC90C2086,
-		0x5768B525, 0x206F85B3, 0xB966D409, 0xCE61E49F,
-		0x5EDEF90E, 0x29D9C998, 0xB0D09822, 0xC7D7A8B4,
-		0x59B33D17, 0x2EB40D81, 0xB7BD5C3B, 0xC0BA6CAD,
-		0xEDB88320, 0x9ABFB3B6, 0x03B6E20C, 0x74B1D29A,
-		0xEAD54739, 0x9DD277AF, 0x04DB2615, 0x73DC1683,
-		0xE3630B12, 0x94643B84, 0x0D6D6A3E, 0x7A6A5AA8,
-		0xE40ECF0B, 0x9309FF9D, 0x0A00AE27, 0x7D079EB1,
-		0xF00F9344, 0x8708A3D2, 0x1E01F268, 0x6906C2FE,
-		0xF762575D, 0x806567CB, 0x196C3671, 0x6E6B06E7,
-		0xFED41B76, 0x89D32BE0, 0x10DA7A5A, 0x67DD4ACC,
-		0xF9B9DF6F, 0x8EBEEFF9, 0x17B7BE43, 0x60B08ED5,
-		0xD6D6A3E8, 0xA1D1937E, 0x38D8C2C4, 0x4FDFF252,
-		0xD1BB67F1, 0xA6BC5767, 0x3FB506DD, 0x48B2364B,
-		0xD80D2BDA, 0xAF0A1B4C, 0x36034AF6, 0x41047A60,
-		0xDF60EFC3, 0xA867DF55, 0x316E8EEF, 0x4669BE79,
-		0xCB61B38C, 0xBC66831A, 0x256FD2A0, 0x5268E236,
-		0xCC0C7795, 0xBB0B4703, 0x220216B9, 0x5505262F,
-		0xC5BA3BBE, 0xB2BD0B28, 0x2BB45A92, 0x5CB36A04,
-		0xC2D7FFA7, 0xB5D0CF31, 0x2CD99E8B, 0x5BDEAE1D,
-		0x9B64C2B0, 0xEC63F226, 0x756AA39C, 0x026D930A,
-		0x9C0906A9, 0xEB0E363F, 0x72076785, 0x05005713,
-		0x95BF4A82, 0xE2B87A14, 0x7BB12BAE, 0x0CB61B38,
-		0x92D28E9B, 0xE5D5BE0D, 0x7CDCEFB7, 0x0BDBDF21,
-		0x86D3D2D4, 0xF1D4E242, 0x68DDB3F8, 0x1FDA836E,
-		0x81BE16CD, 0xF6B9265B, 0x6FB077E1, 0x18B74777,
-		0x88085AE6, 0xFF0F6A70, 0x66063BCA, 0x11010B5C,
-		0x8F659EFF, 0xF862AE69, 0x616BFFD3, 0x166CCF45,
-		0xA00AE278, 0xD70DD2EE, 0x4E048354, 0x3903B3C2,
-		0xA7672661, 0xD06016F7, 0x4969474D, 0x3E6E77DB,
-		0xAED16A4A, 0xD9D65ADC, 0x40DF0B66, 0x37D83BF0,
-		0xA9BCAE53, 0xDEBB9EC5, 0x47B2CF7F, 0x30B5FFE9,
-		0xBDBDF21C, 0xCABAC28A, 0x53B39330, 0x24B4A3A6,
-		0xBAD03605, 0xCDD70693, 0x54DE5729, 0x23D967BF,
-		0xB3667A2E, 0xC4614AB8, 0x5D681B02, 0x2A6F2B94,
-		0xB40BBE37, 0xC30C8EA1, 0x5A05DF1B, 0x2D02EF8D
-	}, {
-		0x00000000, 0x191B3141, 0x32366282, 0x2B2D53C3,
-		0x646CC504, 0x7D77F445, 0x565AA786, 0x4F4196C7,
-		0xC8D98A08, 0xD1C2BB49, 0xFAEFE88A, 0xE3F4D9CB,
-		0xACB54F0C, 0xB5AE7E4D, 0x9E832D8E, 0x87981CCF,
-		0x4AC21251, 0x53D92310, 0x78F470D3, 0x61EF4192,
-		0x2EAED755, 0x37B5E614, 0x1C98B5D7, 0x05838496,
-		0x821B9859, 0x9B00A918, 0xB02DFADB, 0xA936CB9A,
-		0xE6775D5D, 0xFF6C6C1C, 0xD4413FDF, 0xCD5A0E9E,
-		0x958424A2, 0x8C9F15E3, 0xA7B24620, 0xBEA97761,
-		0xF1E8E1A6, 0xE8F3D0E7, 0xC3DE8324, 0xDAC5B265,
-		0x5D5DAEAA, 0x44469FEB, 0x6F6BCC28, 0x7670FD69,
-		0x39316BAE, 0x202A5AEF, 0x0B07092C, 0x121C386D,
-		0xDF4636F3, 0xC65D07B2, 0xED705471, 0xF46B6530,
-		0xBB2AF3F7, 0xA231C2B6, 0x891C9175, 0x9007A034,
-		0x179FBCFB, 0x0E848DBA, 0x25A9DE79, 0x3CB2EF38,
-		0x73F379FF, 0x6AE848BE, 0x41C51B7D, 0x58DE2A3C,
-		0xF0794F05, 0xE9627E44, 0xC24F2D87, 0xDB541CC6,
-		0x94158A01, 0x8D0EBB40, 0xA623E883, 0xBF38D9C2,
-		0x38A0C50D, 0x21BBF44C, 0x0A96A78F, 0x138D96CE,
-		0x5CCC0009, 0x45D73148, 0x6EFA628B, 0x77E153CA,
-		0xBABB5D54, 0xA3A06C15, 0x888D3FD6, 0x91960E97,
-		0xDED79850, 0xC7CCA911, 0xECE1FAD2, 0xF5FACB93,
-		0x7262D75C, 0x6B79E61D, 0x4054B5DE, 0x594F849F,
-		0x160E1258, 0x0F152319, 0x243870DA, 0x3D23419B,
-		0x65FD6BA7, 0x7CE65AE6, 0x57CB0925, 0x4ED03864,
-		0x0191AEA3, 0x188A9FE2, 0x33A7CC21, 0x2ABCFD60,
-		0xAD24E1AF, 0xB43FD0EE, 0x9F12832D, 0x8609B26C,
-		0xC94824AB, 0xD05315EA, 0xFB7E4629, 0xE2657768,
-		0x2F3F79F6, 0x362448B7, 0x1D091B74, 0x04122A35,
-		0x4B53BCF2, 0x52488DB3, 0x7965DE70, 0x607EEF31,
-		0xE7E6F3FE, 0xFEFDC2BF, 0xD5D0917C, 0xCCCBA03D,
-		0x838A36FA, 0x9A9107BB, 0xB1BC5478, 0xA8A76539,
-		0x3B83984B, 0x2298A90A, 0x09B5FAC9, 0x10AECB88,
-		0x5FEF5D4F, 0x46F46C0E, 0x6DD93FCD, 0x74C20E8C,
-		0xF35A1243, 0xEA412302, 0xC16C70C1, 0xD8774180,
-		0x9736D747, 0x8E2DE606, 0xA500B5C5, 0xBC1B8484,
-		0x71418A1A, 0x685ABB5B, 0x4377E898, 0x5A6CD9D9,
-		0x152D4F1E, 0x0C367E5F, 0x271B2D9C, 0x3E001CDD,
-		0xB9980012, 0xA0833153, 0x8BAE6290, 0x92B553D1,
-		0xDDF4C516, 0xC4EFF457, 0xEFC2A794, 0xF6D996D5,
-		0xAE07BCE9, 0xB71C8DA8, 0x9C31DE6B, 0x852AEF2A,
-		0xCA6B79ED, 0xD37048AC, 0xF85D1B6F, 0xE1462A2E,
-		0x66DE36E1, 0x7FC507A0, 0x54E85463, 0x4DF36522,
-		0x02B2F3E5, 0x1BA9C2A4, 0x30849167, 0x299FA026,
-		0xE4C5AEB8, 0xFDDE9FF9, 0xD6F3CC3A, 0xCFE8FD7B,
-		0x80A96BBC, 0x99B25AFD, 0xB29F093E, 0xAB84387F,
-		0x2C1C24B0, 0x350715F1, 0x1E2A4632, 0x07317773,
-		0x4870E1B4, 0x516BD0F5, 0x7A468336, 0x635DB277,
-		0xCBFAD74E, 0xD2E1E60F, 0xF9CCB5CC, 0xE0D7848D,
-		0xAF96124A, 0xB68D230B, 0x9DA070C8, 0x84BB4189,
-		0x03235D46, 0x1A386C07, 0x31153FC4, 0x280E0E85,
-		0x674F9842, 0x7E54A903, 0x5579FAC0, 0x4C62CB81,
-		0x8138C51F, 0x9823F45E, 0xB30EA79D, 0xAA1596DC,
-		0xE554001B, 0xFC4F315A, 0xD7626299, 0xCE7953D8,
-		0x49E14F17, 0x50FA7E56, 0x7BD72D95, 0x62CC1CD4,
-		0x2D8D8A13, 0x3496BB52, 0x1FBBE891, 0x06A0D9D0,
-		0x5E7EF3EC, 0x4765C2AD, 0x6C48916E, 0x7553A02F,
-		0x3A1236E8, 0x230907A9, 0x0824546A, 0x113F652B,
-		0x96A779E4, 0x8FBC48A5, 0xA4911B66, 0xBD8A2A27,
-		0xF2CBBCE0, 0xEBD08DA1, 0xC0FDDE62, 0xD9E6EF23,
-		0x14BCE1BD, 0x0DA7D0FC, 0x268A833F, 0x3F91B27E,
-		0x70D024B9, 0x69CB15F8, 0x42E6463B, 0x5BFD777A,
-		0xDC656BB5, 0xC57E5AF4, 0xEE530937, 0xF7483876,
-		0xB809AEB1, 0xA1129FF0, 0x8A3FCC33, 0x9324FD72
-	}, {
-		0x00000000, 0x01C26A37, 0x0384D46E, 0x0246BE59,
-		0x0709A8DC, 0x06CBC2EB, 0x048D7CB2, 0x054F1685,
-		0x0E1351B8, 0x0FD13B8F, 0x0D9785D6, 0x0C55EFE1,
-		0x091AF964, 0x08D89353, 0x0A9E2D0A, 0x0B5C473D,
-		0x1C26A370, 0x1DE4C947, 0x1FA2771E, 0x1E601D29,
-		0x1B2F0BAC, 0x1AED619B, 0x18ABDFC2, 0x1969B5F5,
-		0x1235F2C8, 0x13F798FF, 0x11B126A6, 0x10734C91,
-		0x153C5A14, 0x14FE3023, 0x16B88E7A, 0x177AE44D,
-		0x384D46E0, 0x398F2CD7, 0x3BC9928E, 0x3A0BF8B9,
-		0x3F44EE3C, 0x3E86840B, 0x3CC03A52, 0x3D025065,
-		0x365E1758, 0x379C7D6F, 0x35DAC336, 0x3418A901,
-		0x3157BF84, 0x3095D5B3, 0x32D36BEA, 0x331101DD,
-		0x246BE590, 0x25A98FA7, 0x27EF31FE, 0x262D5BC9,
-		0x23624D4C, 0x22A0277B, 0x20E69922, 0x2124F315,
-		0x2A78B428, 0x2BBADE1F, 0x29FC6046, 0x283E0A71,
-		0x2D711CF4, 0x2CB376C3, 0x2EF5C89A, 0x2F37A2AD,
-		0x709A8DC0, 0x7158E7F7, 0x731E59AE, 0x72DC3399,
-		0x7793251C, 0x76514F2B, 0x7417F172, 0x75D59B45,
-		0x7E89DC78, 0x7F4BB64F, 0x7D0D0816, 0x7CCF6221,
-		0x798074A4, 0x78421E93, 0x7A04A0CA, 0x7BC6CAFD,
-		0x6CBC2EB0, 0x6D7E4487, 0x6F38FADE, 0x6EFA90E9,
-		0x6BB5866C, 0x6A77EC5B, 0x68315202, 0x69F33835,
-		0x62AF7F08, 0x636D153F, 0x612BAB66, 0x60E9C151,
-		0x65A6D7D4, 0x6464BDE3, 0x662203BA, 0x67E0698D,
-		0x48D7CB20, 0x4915A117, 0x4B531F4E, 0x4A917579,
-		0x4FDE63FC, 0x4E1C09CB, 0x4C5AB792, 0x4D98DDA5,
-		0x46C49A98, 0x4706F0AF, 0x45404EF6, 0x448224C1,
-		0x41CD3244, 0x400F5873, 0x4249E62A, 0x438B8C1D,
-		0x54F16850, 0x55330267, 0x5775BC3E, 0x56B7D609,
-		0x53F8C08C, 0x523AAABB, 0x507C14E2, 0x51BE7ED5,
-		0x5AE239E8, 0x5B2053DF, 0x5966ED86, 0x58A487B1,
-		0x5DEB9134, 0x5C29FB03, 0x5E6F455A, 0x5FAD2F6D,
-		0xE1351B80, 0xE0F771B7, 0xE2B1CFEE, 0xE373A5D9,
-		0xE63CB35C, 0xE7FED96B, 0xE5B86732, 0xE47A0D05,
-		0xEF264A38, 0xEEE4200F, 0xECA29E56, 0xED60F461,
-		0xE82FE2E4, 0xE9ED88D3, 0xEBAB368A, 0xEA695CBD,
-		0xFD13B8F0, 0xFCD1D2C7, 0xFE976C9E, 0xFF5506A9,
-		0xFA1A102C, 0xFBD87A1B, 0xF99EC442, 0xF85CAE75,
-		0xF300E948, 0xF2C2837F, 0xF0843D26, 0xF1465711,
-		0xF4094194, 0xF5CB2BA3, 0xF78D95FA, 0xF64FFFCD,
-		0xD9785D60, 0xD8BA3757, 0xDAFC890E, 0xDB3EE339,
-		0xDE71F5BC, 0xDFB39F8B, 0xDDF521D2, 0xDC374BE5,
-		0xD76B0CD8, 0xD6A966EF, 0xD4EFD8B6, 0xD52DB281,
-		0xD062A404, 0xD1A0CE33, 0xD3E6706A, 0xD2241A5D,
-		0xC55EFE10, 0xC49C9427, 0xC6DA2A7E, 0xC7184049,
-		0xC25756CC, 0xC3953CFB, 0xC1D382A2, 0xC011E895,
-		0xCB4DAFA8, 0xCA8FC59F, 0xC8C97BC6, 0xC90B11F1,
-		0xCC440774, 0xCD866D43, 0xCFC0D31A, 0xCE02B92D,
-		0x91AF9640, 0x906DFC77, 0x922B422E, 0x93E92819,
-		0x96A63E9C, 0x976454AB, 0x9522EAF2, 0x94E080C5,
-		0x9FBCC7F8, 0x9E7EADCF, 0x9C381396, 0x9DFA79A1,
-		0x98B56F24, 0x99770513, 0x9B31BB4A, 0x9AF3D17D,
-		0x8D893530, 0x8C4B5F07, 0x8E0DE15E, 0x8FCF8B69,
-		0x8A809DEC, 0x8B42F7DB, 0x89044982, 0x88C623B5,
-		0x839A6488, 0x82580EBF, 0x801EB0E6, 0x81DCDAD1,
-		0x8493CC54, 0x8551A663, 0x8717183A, 0x86D5720D,
-		0xA9E2D0A0, 0xA820BA97, 0xAA6604CE, 0xABA46EF9,
-		0xAEEB787C, 0xAF29124B, 0xAD6FAC12, 0xACADC625,
-		0xA7F18118, 0xA633EB2F, 0xA4755576, 0xA5B73F41,
-		0xA0F829C4, 0xA13A43F3, 0xA37CFDAA, 0xA2BE979D,
-		0xB5C473D0, 0xB40619E7, 0xB640A7BE, 0xB782CD89,
-		0xB2CDDB0C, 0xB30FB13B, 0xB1490F62, 0xB08B6555,
-		0xBBD72268, 0xBA15485F, 0xB853F606, 0xB9919C31,
-		0xBCDE8AB4, 0xBD1CE083, 0xBF5A5EDA, 0xBE9834ED
-	}, {
-		0x00000000, 0xB8BC6765, 0xAA09C88B, 0x12B5AFEE,
-		0x8F629757, 0x37DEF032, 0x256B5FDC, 0x9DD738B9,
-		0xC5B428EF, 0x7D084F8A, 0x6FBDE064, 0xD7018701,
-		0x4AD6BFB8, 0xF26AD8DD, 0xE0DF7733, 0x58631056,
-		0x5019579F, 0xE8A530FA, 0xFA109F14, 0x42ACF871,
-		0xDF7BC0C8, 0x67C7A7AD, 0x75720843, 0xCDCE6F26,
-		0x95AD7F70, 0x2D111815, 0x3FA4B7FB, 0x8718D09E,
-		0x1ACFE827, 0xA2738F42, 0xB0C620AC, 0x087A47C9,
-		0xA032AF3E, 0x188EC85B, 0x0A3B67B5, 0xB28700D0,
-		0x2F503869, 0x97EC5F0C, 0x8559F0E2, 0x3DE59787,
-		0x658687D1, 0xDD3AE0B4, 0xCF8F4F5A, 0x7733283F,
-		0xEAE41086, 0x525877E3, 0x40EDD80D, 0xF851BF68,
-		0xF02BF8A1, 0x48979FC4, 0x5A22302A, 0xE29E574F,
-		0x7F496FF6, 0xC7F50893, 0xD540A77D, 0x6DFCC018,
-		0x359FD04E, 0x8D23B72B, 0x9F9618C5, 0x272A7FA0,
-		0xBAFD4719, 0x0241207C, 0x10F48F92, 0xA848E8F7,
-		0x9B14583D, 0x23A83F58, 0x311D90B6, 0x89A1F7D3,
-		0x1476CF6A, 0xACCAA80F, 0xBE7F07E1, 0x06C36084,
-		0x5EA070D2, 0xE61C17B7, 0xF4A9B859, 0x4C15DF3C,
-		0xD1C2E785, 0x697E80E0, 0x7BCB2F0E, 0xC377486B,
-		0xCB0D0FA2, 0x73B168C7, 0x6104C729, 0xD9B8A04C,
-		0x446F98F5, 0xFCD3FF90, 0xEE66507E, 0x56DA371B,
-		0x0EB9274D, 0xB6054028, 0xA4B0EFC6, 0x1C0C88A3,
-		0x81DBB01A, 0x3967D77F, 0x2BD27891, 0x936E1FF4,
-		0x3B26F703, 0x839A9066, 0x912F3F88, 0x299358ED,
-		0xB4446054, 0x0CF80731, 0x1E4DA8DF, 0xA6F1CFBA,
-		0xFE92DFEC, 0x462EB889, 0x549B1767, 0xEC277002,
-		0x71F048BB, 0xC94C2FDE, 0xDBF98030, 0x6345E755,
-		0x6B3FA09C, 0xD383C7F9, 0xC1366817, 0x798A0F72,
-		0xE45D37CB, 0x5CE150AE, 0x4E54FF40, 0xF6E89825,
-		0xAE8B8873, 0x1637EF16, 0x048240F8, 0xBC3E279D,
-		0x21E91F24, 0x99557841, 0x8BE0D7AF, 0x335CB0CA,
-		0xED59B63B, 0x55E5D15E, 0x47507EB0, 0xFFEC19D5,
-		0x623B216C, 0xDA874609, 0xC832E9E7, 0x708E8E82,
-		0x28ED9ED4, 0x9051F9B1, 0x82E4565F, 0x3A58313A,
-		0xA78F0983, 0x1F336EE6, 0x0D86C108, 0xB53AA66D,
-		0xBD40E1A4, 0x05FC86C1, 0x1749292F, 0xAFF54E4A,
-		0x322276F3, 0x8A9E1196, 0x982BBE78, 0x2097D91D,
-		0x78F4C94B, 0xC048AE2E, 0xD2FD01C0, 0x6A4166A5,
-		0xF7965E1C, 0x4F2A3979, 0x5D9F9697, 0xE523F1F2,
-		0x4D6B1905, 0xF5D77E60, 0xE762D18E, 0x5FDEB6EB,
-		0xC2098E52, 0x7AB5E937, 0x680046D9, 0xD0BC21BC,
-		0x88DF31EA, 0x3063568F, 0x22D6F961, 0x9A6A9E04,
-		0x07BDA6BD, 0xBF01C1D8, 0xADB46E36, 0x15080953,
-		0x1D724E9A, 0xA5CE29FF, 0xB77B8611, 0x0FC7E174,
-		0x9210D9CD, 0x2AACBEA8, 0x38191146, 0x80A57623,
-		0xD8C66675, 0x607A0110, 0x72CFAEFE, 0xCA73C99B,
-		0x57A4F122, 0xEF189647, 0xFDAD39A9, 0x45115ECC,
-		0x764DEE06, 0xCEF18963, 0xDC44268D, 0x64F841E8,
-		0xF92F7951, 0x41931E34, 0x5326B1DA, 0xEB9AD6BF,
-		0xB3F9C6E9, 0x0B45A18C, 0x19F00E62, 0xA14C6907,
-		0x3C9B51BE, 0x842736DB, 0x96929935, 0x2E2EFE50,
-		0x2654B999, 0x9EE8DEFC, 0x8C5D7112, 0x34E11677,
-		0xA9362ECE, 0x118A49AB, 0x033FE645, 0xBB838120,
-		0xE3E09176, 0x5B5CF613, 0x49E959FD, 0xF1553E98,
-		0x6C820621, 0xD43E6144, 0xC68BCEAA, 0x7E37A9CF,
-		0xD67F4138, 0x6EC3265D, 0x7C7689B3, 0xC4CAEED6,
-		0x591DD66F, 0xE1A1B10A, 0xF3141EE4, 0x4BA87981,
-		0x13CB69D7, 0xAB770EB2, 0xB9C2A15C, 0x017EC639,
-		0x9CA9FE80, 0x241599E5, 0x36A0360B, 0x8E1C516E,
-		0x866616A7, 0x3EDA71C2, 0x2C6FDE2C, 0x94D3B949,
-		0x090481F0, 0xB1B8E695, 0xA30D497B, 0x1BB12E1E,
-		0x43D23E48, 0xFB6E592D, 0xE9DBF6C3, 0x516791A6,
-		0xCCB0A91F, 0x740CCE7A, 0x66B96194, 0xDE0506F1
-	}, {
-		0x00000000, 0x3D6029B0, 0x7AC05360, 0x47A07AD0,
-		0xF580A6C0, 0xC8E08F70, 0x8F40F5A0, 0xB220DC10,
-		0x30704BC1, 0x0D106271, 0x4AB018A1, 0x77D03111,
-		0xC5F0ED01, 0xF890C4B1, 0xBF30BE61, 0x825097D1,
-		0x60E09782, 0x5D80BE32, 0x1A20C4E2, 0x2740ED52,
-		0x95603142, 0xA80018F2, 0xEFA06222, 0xD2C04B92,
-		0x5090DC43, 0x6DF0F5F3, 0x2A508F23, 0x1730A693,
-		0xA5107A83, 0x98705333, 0xDFD029E3, 0xE2B00053,
-		0xC1C12F04, 0xFCA106B4, 0xBB017C64, 0x866155D4,
-		0x344189C4, 0x0921A074, 0x4E81DAA4, 0x73E1F314,
-		0xF1B164C5, 0xCCD14D75, 0x8B7137A5, 0xB6111E15,
-		0x0431C205, 0x3951EBB5, 0x7EF19165, 0x4391B8D5,
-		0xA121B886, 0x9C419136, 0xDBE1EBE6, 0xE681C256,
-		0x54A11E46, 0x69C137F6, 0x2E614D26, 0x13016496,
-		0x9151F347, 0xAC31DAF7, 0xEB91A027, 0xD6F18997,
-		0x64D15587, 0x59B17C37, 0x1E1106E7, 0x23712F57,
-		0x58F35849, 0x659371F9, 0x22330B29, 0x1F532299,
-		0xAD73FE89, 0x9013D739, 0xD7B3ADE9, 0xEAD38459,
-		0x68831388, 0x55E33A38, 0x124340E8, 0x2F236958,
-		0x9D03B548, 0xA0639CF8, 0xE7C3E628, 0xDAA3CF98,
-		0x3813CFCB, 0x0573E67B, 0x42D39CAB, 0x7FB3B51B,
-		0xCD93690B, 0xF0F340BB, 0xB7533A6B, 0x8A3313DB,
-		0x0863840A, 0x3503ADBA, 0x72A3D76A, 0x4FC3FEDA,
-		0xFDE322CA, 0xC0830B7A, 0x872371AA, 0xBA43581A,
-		0x9932774D, 0xA4525EFD, 0xE3F2242D, 0xDE920D9D,
-		0x6CB2D18D, 0x51D2F83D, 0x167282ED, 0x2B12AB5D,
-		0xA9423C8C, 0x9422153C, 0xD3826FEC, 0xEEE2465C,
-		0x5CC29A4C, 0x61A2B3FC, 0x2602C92C, 0x1B62E09C,
-		0xF9D2E0CF, 0xC4B2C97F, 0x8312B3AF, 0xBE729A1F,
-		0x0C52460F, 0x31326FBF, 0x7692156F, 0x4BF23CDF,
-		0xC9A2AB0E, 0xF4C282BE, 0xB362F86E, 0x8E02D1DE,
-		0x3C220DCE, 0x0142247E, 0x46E25EAE, 0x7B82771E,
-		0xB1E6B092, 0x8C869922, 0xCB26E3F2, 0xF646CA42,
-		0x44661652, 0x79063FE2, 0x3EA64532, 0x03C66C82,
-		0x8196FB53, 0xBCF6D2E3, 0xFB56A833, 0xC6368183,
-		0x74165D93, 0x49767423, 0x0ED60EF3, 0x33B62743,
-		0xD1062710, 0xEC660EA0, 0xABC67470, 0x96A65DC0,
-		0x248681D0, 0x19E6A860, 0x5E46D2B0, 0x6326FB00,
-		0xE1766CD1, 0xDC164561, 0x9BB63FB1, 0xA6D61601,
-		0x14F6CA11, 0x2996E3A1, 0x6E369971, 0x5356B0C1,
-		0x70279F96, 0x4D47B626, 0x0AE7CCF6, 0x3787E546,
-		0x85A73956, 0xB8C710E6, 0xFF676A36, 0xC2074386,
-		0x4057D457, 0x7D37FDE7, 0x3A978737, 0x07F7AE87,
-		0xB5D77297, 0x88B75B27, 0xCF1721F7, 0xF2770847,
-		0x10C70814, 0x2DA721A4, 0x6A075B74, 0x576772C4,
-		0xE547AED4, 0xD8278764, 0x9F87FDB4, 0xA2E7D404,
-		0x20B743D5, 0x1DD76A65, 0x5A7710B5, 0x67173905,
-		0xD537E515, 0xE857CCA5, 0xAFF7B675, 0x92979FC5,
-		0xE915E8DB, 0xD475C16B, 0x93D5BBBB, 0xAEB5920B,
-		0x1C954E1B, 0x21F567AB, 0x66551D7B, 0x5B3534CB,
-		0xD965A31A, 0xE4058AAA, 0xA3A5F07A, 0x9EC5D9CA,
-		0x2CE505DA, 0x11852C6A, 0x562556BA, 0x6B457F0A,
-		0x89F57F59, 0xB49556E9, 0xF3352C39, 0xCE550589,
-		0x7C75D999, 0x4115F029, 0x06B58AF9, 0x3BD5A349,
-		0xB9853498, 0x84E51D28, 0xC34567F8, 0xFE254E48,
-		0x4C059258, 0x7165BBE8, 0x36C5C138, 0x0BA5E888,
-		0x28D4C7DF, 0x15B4EE6F, 0x521494BF, 0x6F74BD0F,
-		0xDD54611F, 0xE03448AF, 0xA794327F, 0x9AF41BCF,
-		0x18A48C1E, 0x25C4A5AE, 0x6264DF7E, 0x5F04F6CE,
-		0xED242ADE, 0xD044036E, 0x97E479BE, 0xAA84500E,
-		0x4834505D, 0x755479ED, 0x32F4033D, 0x0F942A8D,
-		0xBDB4F69D, 0x80D4DF2D, 0xC774A5FD, 0xFA148C4D,
-		0x78441B9C, 0x4524322C, 0x028448FC, 0x3FE4614C,
-		0x8DC4BD5C, 0xB0A494EC, 0xF704EE3C, 0xCA64C78C
-	}, {
-		0x00000000, 0xCB5CD3A5, 0x4DC8A10B, 0x869472AE,
-		0x9B914216, 0x50CD91B3, 0xD659E31D, 0x1D0530B8,
-		0xEC53826D, 0x270F51C8, 0xA19B2366, 0x6AC7F0C3,
-		0x77C2C07B, 0xBC9E13DE, 0x3A0A6170, 0xF156B2D5,
-		0x03D6029B, 0xC88AD13E, 0x4E1EA390, 0x85427035,
-		0x9847408D, 0x531B9328, 0xD58FE186, 0x1ED33223,
-		0xEF8580F6, 0x24D95353, 0xA24D21FD, 0x6911F258,
-		0x7414C2E0, 0xBF481145, 0x39DC63EB, 0xF280B04E,
-		0x07AC0536, 0xCCF0D693, 0x4A64A43D, 0x81387798,
-		0x9C3D4720, 0x57619485, 0xD1F5E62B, 0x1AA9358E,
-		0xEBFF875B, 0x20A354FE, 0xA6372650, 0x6D6BF5F5,
-		0x706EC54D, 0xBB3216E8, 0x3DA66446, 0xF6FAB7E3,
-		0x047A07AD, 0xCF26D408, 0x49B2A6A6, 0x82EE7503,
-		0x9FEB45BB, 0x54B7961E, 0xD223E4B0, 0x197F3715,
-		0xE82985C0, 0x23755665, 0xA5E124CB, 0x6EBDF76E,
-		0x73B8C7D6, 0xB8E41473, 0x3E7066DD, 0xF52CB578,
-		0x0F580A6C, 0xC404D9C9, 0x4290AB67, 0x89CC78C2,
-		0x94C9487A, 0x5F959BDF, 0xD901E971, 0x125D3AD4,
-		0xE30B8801, 0x28575BA4, 0xAEC3290A, 0x659FFAAF,
-		0x789ACA17, 0xB3C619B2, 0x35526B1C, 0xFE0EB8B9,
-		0x0C8E08F7, 0xC7D2DB52, 0x4146A9FC, 0x8A1A7A59,
-		0x971F4AE1, 0x5C439944, 0xDAD7EBEA, 0x118B384F,
-		0xE0DD8A9A, 0x2B81593F, 0xAD152B91, 0x6649F834,
-		0x7B4CC88C, 0xB0101B29, 0x36846987, 0xFDD8BA22,
-		0x08F40F5A, 0xC3A8DCFF, 0x453CAE51, 0x8E607DF4,
-		0x93654D4C, 0x58399EE9, 0xDEADEC47, 0x15F13FE2,
-		0xE4A78D37, 0x2FFB5E92, 0xA96F2C3C, 0x6233FF99,
-		0x7F36CF21, 0xB46A1C84, 0x32FE6E2A, 0xF9A2BD8F,
-		0x0B220DC1, 0xC07EDE64, 0x46EAACCA, 0x8DB67F6F,
-		0x90B34FD7, 0x5BEF9C72, 0xDD7BEEDC, 0x16273D79,
-		0xE7718FAC, 0x2C2D5C09, 0xAAB92EA7, 0x61E5FD02,
-		0x7CE0CDBA, 0xB7BC1E1F, 0x31286CB1, 0xFA74BF14,
-		0x1EB014D8, 0xD5ECC77D, 0x5378B5D3, 0x98246676,
-		0x852156CE, 0x4E7D856B, 0xC8E9F7C5, 0x03B52460,
-		0xF2E396B5, 0x39BF4510, 0xBF2B37BE, 0x7477E41B,
-		0x6972D4A3, 0xA22E0706, 0x24BA75A8, 0xEFE6A60D,
-		0x1D661643, 0xD63AC5E6, 0x50AEB748, 0x9BF264ED,
-		0x86F75455, 0x4DAB87F0, 0xCB3FF55E, 0x006326FB,
-		0xF135942E, 0x3A69478B, 0xBCFD3525, 0x77A1E680,
-		0x6AA4D638, 0xA1F8059D, 0x276C7733, 0xEC30A496,
-		0x191C11EE, 0xD240C24B, 0x54D4B0E5, 0x9F886340,
-		0x828D53F8, 0x49D1805D, 0xCF45F2F3, 0x04192156,
-		0xF54F9383, 0x3E134026, 0xB8873288, 0x73DBE12D,
-		0x6EDED195, 0xA5820230, 0x2316709E, 0xE84AA33B,
-		0x1ACA1375, 0xD196C0D0, 0x5702B27E, 0x9C5E61DB,
-		0x815B5163, 0x4A0782C6, 0xCC93F068, 0x07CF23CD,
-		0xF6999118, 0x3DC542BD, 0xBB513013, 0x700DE3B6,
-		0x6D08D30E, 0xA65400AB, 0x20C07205, 0xEB9CA1A0,
-		0x11E81EB4, 0xDAB4CD11, 0x5C20BFBF, 0x977C6C1A,
-		0x8A795CA2, 0x41258F07, 0xC7B1FDA9, 0x0CED2E0C,
-		0xFDBB9CD9, 0x36E74F7C, 0xB0733DD2, 0x7B2FEE77,
-		0x662ADECF, 0xAD760D6A, 0x2BE27FC4, 0xE0BEAC61,
-		0x123E1C2F, 0xD962CF8A, 0x5FF6BD24, 0x94AA6E81,
-		0x89AF5E39, 0x42F38D9C, 0xC467FF32, 0x0F3B2C97,
-		0xFE6D9E42, 0x35314DE7, 0xB3A53F49, 0x78F9ECEC,
-		0x65FCDC54, 0xAEA00FF1, 0x28347D5F, 0xE368AEFA,
-		0x16441B82, 0xDD18C827, 0x5B8CBA89, 0x90D0692C,
-		0x8DD55994, 0x46898A31, 0xC01DF89F, 0x0B412B3A,
-		0xFA1799EF, 0x314B4A4A, 0xB7DF38E4, 0x7C83EB41,
-		0x6186DBF9, 0xAADA085C, 0x2C4E7AF2, 0xE712A957,
-		0x15921919, 0xDECECABC, 0x585AB812, 0x93066BB7,
-		0x8E035B0F, 0x455F88AA, 0xC3CBFA04, 0x089729A1,
-		0xF9C19B74, 0x329D48D1, 0xB4093A7F, 0x7F55E9DA,
-		0x6250D962, 0xA90C0AC7, 0x2F987869, 0xE4C4ABCC
-	}, {
-		0x00000000, 0xA6770BB4, 0x979F1129, 0x31E81A9D,
-		0xF44F2413, 0x52382FA7, 0x63D0353A, 0xC5A73E8E,
-		0x33EF4E67, 0x959845D3, 0xA4705F4E, 0x020754FA,
-		0xC7A06A74, 0x61D761C0, 0x503F7B5D, 0xF64870E9,
-		0x67DE9CCE, 0xC1A9977A, 0xF0418DE7, 0x56368653,
-		0x9391B8DD, 0x35E6B369, 0x040EA9F4, 0xA279A240,
-		0x5431D2A9, 0xF246D91D, 0xC3AEC380, 0x65D9C834,
-		0xA07EF6BA, 0x0609FD0E, 0x37E1E793, 0x9196EC27,
-		0xCFBD399C, 0x69CA3228, 0x582228B5, 0xFE552301,
-		0x3BF21D8F, 0x9D85163B, 0xAC6D0CA6, 0x0A1A0712,
-		0xFC5277FB, 0x5A257C4F, 0x6BCD66D2, 0xCDBA6D66,
-		0x081D53E8, 0xAE6A585C, 0x9F8242C1, 0x39F54975,
-		0xA863A552, 0x0E14AEE6, 0x3FFCB47B, 0x998BBFCF,
-		0x5C2C8141, 0xFA5B8AF5, 0xCBB39068, 0x6DC49BDC,
-		0x9B8CEB35, 0x3DFBE081, 0x0C13FA1C, 0xAA64F1A8,
-		0x6FC3CF26, 0xC9B4C492, 0xF85CDE0F, 0x5E2BD5BB,
-		0x440B7579, 0xE27C7ECD, 0xD3946450, 0x75E36FE4,
-		0xB044516A, 0x16335ADE, 0x27DB4043, 0x81AC4BF7,
-		0x77E43B1E, 0xD19330AA, 0xE07B2A37, 0x460C2183,
-		0x83AB1F0D, 0x25DC14B9, 0x14340E24, 0xB2430590,
-		0x23D5E9B7, 0x85A2E203, 0xB44AF89E, 0x123DF32A,
-		0xD79ACDA4, 0x71EDC610, 0x4005DC8D, 0xE672D739,
-		0x103AA7D0, 0xB64DAC64, 0x87A5B6F9, 0x21D2BD4D,
-		0xE47583C3, 0x42028877, 0x73EA92EA, 0xD59D995E,
-		0x8BB64CE5, 0x2DC14751, 0x1C295DCC, 0xBA5E5678,
-		0x7FF968F6, 0xD98E6342, 0xE86679DF, 0x4E11726B,
-		0xB8590282, 0x1E2E0936, 0x2FC613AB, 0x89B1181F,
-		0x4C162691, 0xEA612D25, 0xDB8937B8, 0x7DFE3C0C,
-		0xEC68D02B, 0x4A1FDB9F, 0x7BF7C102, 0xDD80CAB6,
-		0x1827F438, 0xBE50FF8C, 0x8FB8E511, 0x29CFEEA5,
-		0xDF879E4C, 0x79F095F8, 0x48188F65, 0xEE6F84D1,
-		0x2BC8BA5F, 0x8DBFB1EB, 0xBC57AB76, 0x1A20A0C2,
-		0x8816EAF2, 0x2E61E146, 0x1F89FBDB, 0xB9FEF06F,
-		0x7C59CEE1, 0xDA2EC555, 0xEBC6DFC8, 0x4DB1D47C,
-		0xBBF9A495, 0x1D8EAF21, 0x2C66B5BC, 0x8A11BE08,
-		0x4FB68086, 0xE9C18B32, 0xD82991AF, 0x7E5E9A1B,
-		0xEFC8763C, 0x49BF7D88, 0x78576715, 0xDE206CA1,
-		0x1B87522F, 0xBDF0599B, 0x8C184306, 0x2A6F48B2,
-		0xDC27385B, 0x7A5033EF, 0x4BB82972, 0xEDCF22C6,
-		0x28681C48, 0x8E1F17FC, 0xBFF70D61, 0x198006D5,
-		0x47ABD36E, 0xE1DCD8DA, 0xD034C247, 0x7643C9F3,
-		0xB3E4F77D, 0x1593FCC9, 0x247BE654, 0x820CEDE0,
-		0x74449D09, 0xD23396BD, 0xE3DB8C20, 0x45AC8794,
-		0x800BB91A, 0x267CB2AE, 0x1794A833, 0xB1E3A387,
-		0x20754FA0, 0x86024414, 0xB7EA5E89, 0x119D553D,
-		0xD43A6BB3, 0x724D6007, 0x43A57A9A, 0xE5D2712E,
-		0x139A01C7, 0xB5ED0A73, 0x840510EE, 0x22721B5A,
-		0xE7D525D4, 0x41A22E60, 0x704A34FD, 0xD63D3F49,
-		0xCC1D9F8B, 0x6A6A943F, 0x5B828EA2, 0xFDF58516,
-		0x3852BB98, 0x9E25B02C, 0xAFCDAAB1, 0x09BAA105,
-		0xFFF2D1EC, 0x5985DA58, 0x686DC0C5, 0xCE1ACB71,
-		0x0BBDF5FF, 0xADCAFE4B, 0x9C22E4D6, 0x3A55EF62,
-		0xABC30345, 0x0DB408F1, 0x3C5C126C, 0x9A2B19D8,
-		0x5F8C2756, 0xF9FB2CE2, 0xC813367F, 0x6E643DCB,
-		0x982C4D22, 0x3E5B4696, 0x0FB35C0B, 0xA9C457BF,
-		0x6C636931, 0xCA146285, 0xFBFC7818, 0x5D8B73AC,
-		0x03A0A617, 0xA5D7ADA3, 0x943FB73E, 0x3248BC8A,
-		0xF7EF8204, 0x519889B0, 0x6070932D, 0xC6079899,
-		0x304FE870, 0x9638E3C4, 0xA7D0F959, 0x01A7F2ED,
-		0xC400CC63, 0x6277C7D7, 0x539FDD4A, 0xF5E8D6FE,
-		0x647E3AD9, 0xC209316D, 0xF3E12BF0, 0x55962044,
-		0x90311ECA, 0x3646157E, 0x07AE0FE3, 0xA1D90457,
-		0x579174BE, 0xF1E67F0A, 0xC00E6597, 0x66796E23,
-		0xA3DE50AD, 0x05A95B19, 0x34414184, 0x92364A30
-	}, {
-		0x00000000, 0xCCAA009E, 0x4225077D, 0x8E8F07E3,
-		0x844A0EFA, 0x48E00E64, 0xC66F0987, 0x0AC50919,
-		0xD3E51BB5, 0x1F4F1B2B, 0x91C01CC8, 0x5D6A1C56,
-		0x57AF154F, 0x9B0515D1, 0x158A1232, 0xD92012AC,
-		0x7CBB312B, 0xB01131B5, 0x3E9E3656, 0xF23436C8,
-		0xF8F13FD1, 0x345B3F4F, 0xBAD438AC, 0x767E3832,
-		0xAF5E2A9E, 0x63F42A00, 0xED7B2DE3, 0x21D12D7D,
-		0x2B142464, 0xE7BE24FA, 0x69312319, 0xA59B2387,
-		0xF9766256, 0x35DC62C8, 0xBB53652B, 0x77F965B5,
-		0x7D3C6CAC, 0xB1966C32, 0x3F196BD1, 0xF3B36B4F,
-		0x2A9379E3, 0xE639797D, 0x68B67E9E, 0xA41C7E00,
-		0xAED97719, 0x62737787, 0xECFC7064, 0x205670FA,
-		0x85CD537D, 0x496753E3, 0xC7E85400, 0x0B42549E,
-		0x01875D87, 0xCD2D5D19, 0x43A25AFA, 0x8F085A64,
-		0x562848C8, 0x9A824856, 0x140D4FB5, 0xD8A74F2B,
-		0xD2624632, 0x1EC846AC, 0x9047414F, 0x5CED41D1,
-		0x299DC2ED, 0xE537C273, 0x6BB8C590, 0xA712C50E,
-		0xADD7CC17, 0x617DCC89, 0xEFF2CB6A, 0x2358CBF4,
-		0xFA78D958, 0x36D2D9C6, 0xB85DDE25, 0x74F7DEBB,
-		0x7E32D7A2, 0xB298D73C, 0x3C17D0DF, 0xF0BDD041,
-		0x5526F3C6, 0x998CF358, 0x1703F4BB, 0xDBA9F425,
-		0xD16CFD3C, 0x1DC6FDA2, 0x9349FA41, 0x5FE3FADF,
-		0x86C3E873, 0x4A69E8ED, 0xC4E6EF0E, 0x084CEF90,
-		0x0289E689, 0xCE23E617, 0x40ACE1F4, 0x8C06E16A,
-		0xD0EBA0BB, 0x1C41A025, 0x92CEA7C6, 0x5E64A758,
-		0x54A1AE41, 0x980BAEDF, 0x1684A93C, 0xDA2EA9A2,
-		0x030EBB0E, 0xCFA4BB90, 0x412BBC73, 0x8D81BCED,
-		0x8744B5F4, 0x4BEEB56A, 0xC561B289, 0x09CBB217,
-		0xAC509190, 0x60FA910E, 0xEE7596ED, 0x22DF9673,
-		0x281A9F6A, 0xE4B09FF4, 0x6A3F9817, 0xA6959889,
-		0x7FB58A25, 0xB31F8ABB, 0x3D908D58, 0xF13A8DC6,
-		0xFBFF84DF, 0x37558441, 0xB9DA83A2, 0x7570833C,
-		0x533B85DA, 0x9F918544, 0x111E82A7, 0xDDB48239,
-		0xD7718B20, 0x1BDB8BBE, 0x95548C5D, 0x59FE8CC3,
-		0x80DE9E6F, 0x4C749EF1, 0xC2FB9912, 0x0E51998C,
-		0x04949095, 0xC83E900B, 0x46B197E8, 0x8A1B9776,
-		0x2F80B4F1, 0xE32AB46F, 0x6DA5B38C, 0xA10FB312,
-		0xABCABA0B, 0x6760BA95, 0xE9EFBD76, 0x2545BDE8,
-		0xFC65AF44, 0x30CFAFDA, 0xBE40A839, 0x72EAA8A7,
-		0x782FA1BE, 0xB485A120, 0x3A0AA6C3, 0xF6A0A65D,
-		0xAA4DE78C, 0x66E7E712, 0xE868E0F1, 0x24C2E06F,
-		0x2E07E976, 0xE2ADE9E8, 0x6C22EE0B, 0xA088EE95,
-		0x79A8FC39, 0xB502FCA7, 0x3B8DFB44, 0xF727FBDA,
-		0xFDE2F2C3, 0x3148F25D, 0xBFC7F5BE, 0x736DF520,
-		0xD6F6D6A7, 0x1A5CD639, 0x94D3D1DA, 0x5879D144,
-		0x52BCD85D, 0x9E16D8C3, 0x1099DF20, 0xDC33DFBE,
-		0x0513CD12, 0xC9B9CD8C, 0x4736CA6F, 0x8B9CCAF1,
-		0x8159C3E8, 0x4DF3C376, 0xC37CC495, 0x0FD6C40B,
-		0x7AA64737, 0xB60C47A9, 0x3883404A, 0xF42940D4,
-		0xFEEC49CD, 0x32464953, 0xBCC94EB0, 0x70634E2E,
-		0xA9435C82, 0x65E95C1C, 0xEB665BFF, 0x27CC5B61,
-		0x2D095278, 0xE1A352E6, 0x6F2C5505, 0xA386559B,
-		0x061D761C, 0xCAB77682, 0x44387161, 0x889271FF,
-		0x825778E6, 0x4EFD7878, 0xC0727F9B, 0x0CD87F05,
-		0xD5F86DA9, 0x19526D37, 0x97DD6AD4, 0x5B776A4A,
-		0x51B26353, 0x9D1863CD, 0x1397642E, 0xDF3D64B0,
-		0x83D02561, 0x4F7A25FF, 0xC1F5221C, 0x0D5F2282,
-		0x079A2B9B, 0xCB302B05, 0x45BF2CE6, 0x89152C78,
-		0x50353ED4, 0x9C9F3E4A, 0x121039A9, 0xDEBA3937,
-		0xD47F302E, 0x18D530B0, 0x965A3753, 0x5AF037CD,
-		0xFF6B144A, 0x33C114D4, 0xBD4E1337, 0x71E413A9,
-		0x7B211AB0, 0xB78B1A2E, 0x39041DCD, 0xF5AE1D53,
-		0x2C8E0FFF, 0xE0240F61, 0x6EAB0882, 0xA201081C,
-		0xA8C40105, 0x646E019B, 0xEAE10678, 0x264B06E6
-	}
-};
diff --git a/src/extra/xz/check/crc32_tablegen.c b/src/extra/xz/check/crc32_tablegen.c
deleted file mode 100644
index 31a4d27..0000000
--- a/src/extra/xz/check/crc32_tablegen.c
+++ /dev/null
@@ -1,117 +0,0 @@
-///////////////////////////////////////////////////////////////////////////////
-//
-/// \file       crc32_tablegen.c
-/// \brief      Generate crc32_table_le.h and crc32_table_be.h
-///
-/// Compiling: gcc -std=c99 -o crc32_tablegen crc32_tablegen.c
-/// Add -DWORDS_BIGENDIAN to generate big endian table.
-/// Add -DLZ_HASH_TABLE to generate lz_encoder_hash_table.h (little endian).
-//
-//  Author:     Lasse Collin
-//
-//  This file has been put into the public domain.
-//  You can do whatever you want with this file.
-//
-///////////////////////////////////////////////////////////////////////////////
-
-#include <stdio.h>
-#include "../../common/tuklib_integer.h"
-
-
-static uint32_t crc32_table[8][256];
-
-
-static void
-init_crc32_table(void)
-{
-	static const uint32_t poly32 = UINT32_C(0xEDB88320);
-
-	for (size_t s = 0; s < 8; ++s) {
-		for (size_t b = 0; b < 256; ++b) {
-			uint32_t r = s == 0 ? b : crc32_table[s - 1][b];
-
-			for (size_t i = 0; i < 8; ++i) {
-				if (r & 1)
-					r = (r >> 1) ^ poly32;
-				else
-					r >>= 1;
-			}
-
-			crc32_table[s][b] = r;
-		}
-	}
-
-#ifdef WORDS_BIGENDIAN
-	for (size_t s = 0; s < 8; ++s)
-		for (size_t b = 0; b < 256; ++b)
-			crc32_table[s][b] = bswap32(crc32_table[s][b]);
-#endif
-
-	return;
-}
-
-
-static void
-print_crc32_table(void)
-{
-	printf("/* This file has been automatically generated by "
-			"crc32_tablegen.c. */\n\n"
-			"const uint32_t lzma_crc32_table[8][256] = {\n\t{");
-
-	for (size_t s = 0; s < 8; ++s) {
-		for (size_t b = 0; b < 256; ++b) {
-			if ((b % 4) == 0)
-				printf("\n\t\t");
-
-			printf("0x%08" PRIX32, crc32_table[s][b]);
-
-			if (b != 255)
-				printf(",%s", (b+1) % 4 == 0 ? "" : " ");
-		}
-
-		if (s == 7)
-			printf("\n\t}\n};\n");
-		else
-			printf("\n\t}, {");
-	}
-
-	return;
-}
-
-
-static void
-print_lz_table(void)
-{
-	printf("/* This file has been automatically generated by "
-			"crc32_tablegen.c. */\n\n"
-			"const uint32_t lzma_lz_hash_table[256] = {");
-
-	for (size_t b = 0; b < 256; ++b) {
-		if ((b % 4) == 0)
-			printf("\n\t");
-
-		printf("0x%08" PRIX32, crc32_table[0][b]);
-
-		if (b != 255)
-			printf(",%s", (b+1) % 4 == 0 ? "" : " ");
-	}
-
-	printf("\n};\n");
-
-	return;
-}
-
-
-int
-main(void)
-{
-	init_crc32_table();
-
-#ifdef LZ_HASH_TABLE
-	print_lz_table();
-#else
-	print_crc32_table();
-#endif
-
-	return 0;
-}
diff --git a/src/extra/xz/check/crc32_x86.S b/src/extra/xz/check/crc32_x86.S
deleted file mode 100644
index 67f68a4..0000000
--- a/src/extra/xz/check/crc32_x86.S
+++ /dev/null
@@ -1,304 +0,0 @@
-/*
- * Speed-optimized CRC32 using slicing-by-eight algorithm
- *
- * This uses only i386 instructions, but it is optimized for i686 and later
- * (including e.g. Pentium II/III/IV, Athlon XP, and Core 2). For i586
- * (e.g. Pentium), slicing-by-four would be better, and even the C version
- * of slicing-by-eight built with gcc -march=i586 tends to be a little bit
- * better than this. Very few probably run this code on i586 or older x86
- * so this shouldn't be a problem in practice.
- *
- * Authors: Igor Pavlov (original version)
- *          Lasse Collin (AT&T syntax, PIC support, better portability)
- *
- * This file has been put into the public domain.
- * You can do whatever you want with this file.
- *
- * This code needs lzma_crc32_table, which can be created using the
- * following C code:
-
-uint32_t lzma_crc32_table[8][256];
-
-void
-init_table(void)
-{
-	// IEEE-802.3
-	static const uint32_t poly32 = UINT32_C(0xEDB88320);
-
-	// Castagnoli
-	// static const uint32_t poly32 = UINT32_C(0x82F63B78);
-
-	// Koopman
-	// static const uint32_t poly32 = UINT32_C(0xEB31D82E);
-
-	for (size_t s = 0; s < 8; ++s) {
-		for (size_t b = 0; b < 256; ++b) {
-			uint32_t r = s == 0 ? b : lzma_crc32_table[s - 1][b];
-
-			for (size_t i = 0; i < 8; ++i) {
-				if (r & 1)
-					r = (r >> 1) ^ poly32;
-				else
-					r >>= 1;
-			}
-
-			lzma_crc32_table[s][b] = r;
-		}
-	}
-}
-
- * The prototype of the CRC32 function:
- * extern uint32_t lzma_crc32(const uint8_t *buf, size_t size, uint32_t crc);
- */
-
-/*
- * On some systems, the functions need to be prefixed. The prefix is
- * usually an underscore.
- */
-#ifndef __USER_LABEL_PREFIX__
-#	define __USER_LABEL_PREFIX__
-#endif
-#define MAKE_SYM_CAT(prefix, sym) prefix ## sym
-#define MAKE_SYM(prefix, sym) MAKE_SYM_CAT(prefix, sym)
-#define LZMA_CRC32 MAKE_SYM(__USER_LABEL_PREFIX__, lzma_crc32)
-#define LZMA_CRC32_TABLE MAKE_SYM(__USER_LABEL_PREFIX__, lzma_crc32_table)
-
-/*
- * Solaris assembler doesn't have .p2align, and Darwin uses .align
- * differently than GNU/Linux and Solaris.
- */
-#if defined(__APPLE__) || defined(__MSDOS__)
-#	define ALIGN(pow2, abs) .align pow2
-#else
-#	define ALIGN(pow2, abs) .align abs
-#endif
-
-	.text
-	.globl	LZMA_CRC32
-
-#if !defined(__APPLE__) && !defined(_WIN32) && !defined(__CYGWIN__) \
-		&& !defined(__MSDOS__)
-	.type	LZMA_CRC32, @function
-#endif
-
-	ALIGN(4, 16)
-LZMA_CRC32:
-	/*
-	 * Register usage:
-	 * %eax crc
-	 * %esi buf
-	 * %edi size or buf + size
-	 * %ebx lzma_crc32_table
-	 * %ebp Table index
-	 * %ecx Temporary
-	 * %edx Temporary
-	 */
-	pushl	%ebx
-	pushl	%esi
-	pushl	%edi
-	pushl	%ebp
-	movl	0x14(%esp), %esi /* buf */
-	movl	0x18(%esp), %edi /* size */
-	movl	0x1C(%esp), %eax /* crc */
-
-	/*
-	 * Store the address of lzma_crc32_table to %ebx. This is needed to
-	 * get position-independent code (PIC).
-	 *
-	 * The PIC macro is defined by libtool, while __PIC__ is defined
-	 * by GCC but only on some systems. Testing for both makes it simpler
-	 * to test this code without libtool, and keeps the code working also
-	 * when built with libtool but using something else than GCC.
-	 *
-	 * I understood that libtool may define PIC on Windows even though
-	 * the code in Windows DLLs is not PIC in sense that it is in ELF
-	 * binaries, so we need a separate check to always use the non-PIC
-	 * code on Windows.
-	 */
-#if (!defined(PIC) && !defined(__PIC__)) \
-		|| (defined(_WIN32) || defined(__CYGWIN__))
-	/* Not PIC */
-	movl	$ LZMA_CRC32_TABLE, %ebx
-#elif defined(__APPLE__)
-	/* Mach-O */
-	call	.L_get_pc
-.L_pic:
-	leal	.L_lzma_crc32_table$non_lazy_ptr-.L_pic(%ebx), %ebx
-	movl	(%ebx), %ebx
-#else
-	/* ELF */
-	call	.L_get_pc
-	addl	$_GLOBAL_OFFSET_TABLE_, %ebx
-	movl	LZMA_CRC32_TABLE at GOT(%ebx), %ebx
-#endif
-
-	/* Complement the initial value. */
-	notl	%eax
-
-	ALIGN(4, 16)
-.L_align:
-	/*
-	 * Check if there is enough input to use slicing-by-eight.
-	 * We need 16 bytes, because the loop pre-reads eight bytes.
-	 */
-	cmpl	$16, %edi
-	jb	.L_rest
-
-	/* Check if we have reached alignment of eight bytes. */
-	testl	$7, %esi
-	jz	.L_slice
-
-	/* Calculate CRC of the next input byte. */
-	movzbl	(%esi), %ebp
-	incl	%esi
-	movzbl	%al, %ecx
-	xorl	%ecx, %ebp
-	shrl	$8, %eax
-	xorl	(%ebx, %ebp, 4), %eax
-	decl	%edi
-	jmp	.L_align
-
-	ALIGN(2, 4)
-.L_slice:
-	/*
-	 * If we get here, there's at least 16 bytes of aligned input
-	 * available. Make %edi multiple of eight bytes. Store the possible
-	 * remainder over the "size" variable in the argument stack.
-	 */
-	movl	%edi, 0x18(%esp)
-	andl	$-8, %edi
-	subl	%edi, 0x18(%esp)
-
-	/*
-	 * Let %edi be buf + size - 8 while running the main loop. This way
-	 * we can compare for equality to determine when exit the loop.
-	 */
-	addl	%esi, %edi
-	subl	$8, %edi
-
-	/* Read in the first eight aligned bytes. */
-	xorl	(%esi), %eax
-	movl	4(%esi), %ecx
-	movzbl	%cl, %ebp
-
-.L_loop:
-	movl	0x0C00(%ebx, %ebp, 4), %edx
-	movzbl	%ch, %ebp
-	xorl	0x0800(%ebx, %ebp, 4), %edx
-	shrl	$16, %ecx
-	xorl	8(%esi), %edx
-	movzbl	%cl, %ebp
-	xorl	0x0400(%ebx, %ebp, 4), %edx
-	movzbl	%ch, %ebp
-	xorl	(%ebx, %ebp, 4), %edx
-	movzbl	%al, %ebp
-
-	/*
-	 * Read the next four bytes, for which the CRC is calculated
-	 * on the next interation of the loop.
-	 */
-	movl	12(%esi), %ecx
-
-	xorl	0x1C00(%ebx, %ebp, 4), %edx
-	movzbl	%ah, %ebp
-	shrl	$16, %eax
-	xorl	0x1800(%ebx, %ebp, 4), %edx
-	movzbl	%ah, %ebp
-	movzbl	%al, %eax
-	movl	0x1400(%ebx, %eax, 4), %eax
-	addl	$8, %esi
-	xorl	%edx, %eax
-	xorl	0x1000(%ebx, %ebp, 4), %eax
-
-	/* Check for end of aligned input. */
-	cmpl	%edi, %esi
-	movzbl	%cl, %ebp
-	jne	.L_loop
-
-	/*
-	 * Process the remaining eight bytes, which we have already
-	 * copied to %ecx and %edx.
-	 */
-	movl	0x0C00(%ebx, %ebp, 4), %edx
-	movzbl	%ch, %ebp
-	xorl	0x0800(%ebx, %ebp, 4), %edx
-	shrl	$16, %ecx
-	movzbl	%cl, %ebp
-	xorl	0x0400(%ebx, %ebp, 4), %edx
-	movzbl	%ch, %ebp
-	xorl	(%ebx, %ebp, 4), %edx
-	movzbl	%al, %ebp
-
-	xorl	0x1C00(%ebx, %ebp, 4), %edx
-	movzbl	%ah, %ebp
-	shrl	$16, %eax
-	xorl	0x1800(%ebx, %ebp, 4), %edx
-	movzbl	%ah, %ebp
-	movzbl	%al, %eax
-	movl	0x1400(%ebx, %eax, 4), %eax
-	addl	$8, %esi
-	xorl	%edx, %eax
-	xorl	0x1000(%ebx, %ebp, 4), %eax
-
-	/* Copy the number of remaining bytes to %edi. */
-	movl	0x18(%esp), %edi
-
-.L_rest:
-	/* Check for end of input. */
-	testl	%edi, %edi
-	jz	.L_return
-
-	/* Calculate CRC of the next input byte. */
-	movzbl	(%esi), %ebp
-	incl	%esi
-	movzbl	%al, %ecx
-	xorl	%ecx, %ebp
-	shrl	$8, %eax
-	xorl	(%ebx, %ebp, 4), %eax
-	decl	%edi
-	jmp	.L_rest
-
-.L_return:
-	/* Complement the final value. */
-	notl	%eax
-
-	popl	%ebp
-	popl	%edi
-	popl	%esi
-	popl	%ebx
-	ret
-
-#if defined(PIC) || defined(__PIC__)
-	ALIGN(4, 16)
-.L_get_pc:
-	movl	(%esp), %ebx
-	ret
-#endif
-
-#if defined(__APPLE__) && (defined(PIC) || defined(__PIC__))
-	/* Mach-O PIC */
-	.section __IMPORT,__pointers,non_lazy_symbol_pointers
-.L_lzma_crc32_table$non_lazy_ptr:
-	.indirect_symbol LZMA_CRC32_TABLE
-	.long 0
-
-#elif defined(_WIN32) || defined(__CYGWIN__)
-#	ifdef DLL_EXPORT
-	/* This is equivalent of __declspec(dllexport). */
-	.section .drectve
-	.ascii " -export:lzma_crc32"
-#	endif
-
-#elif !defined(__MSDOS__)
-	/* ELF */
-	.size	LZMA_CRC32, .-LZMA_CRC32
-#endif
-
-/*
- * This is needed to support non-executable stack. It's ugly to
- * use __linux__ here, but I don't know a way to detect when
- * we are using GNU assembler.
- */
-#if defined(__ELF__) && defined(__linux__)
-	.section	.note.GNU-stack,"", at progbits
-#endif
diff --git a/src/extra/xz/check/crc64_fast.c b/src/extra/xz/check/crc64_fast.c
deleted file mode 100644
index 6baf251..0000000
--- a/src/extra/xz/check/crc64_fast.c
+++ /dev/null
@@ -1,74 +0,0 @@
-///////////////////////////////////////////////////////////////////////////////
-//
-/// \file       crc64.c
-/// \brief      CRC64 calculation
-///
-/// Calculate the CRC64 using the slice-by-four algorithm. This is the same
-/// idea that is used in crc32_fast.c, but for CRC64 we use only four tables
-/// instead of eight to avoid increasing CPU cache usage.
-//
-//  Author:     Lasse Collin
-//
-//  This file has been put into the public domain.
-//  You can do whatever you want with this file.
-//
-///////////////////////////////////////////////////////////////////////////////
-
-#include "check.h"
-#include "crc_macros.h"
-
-
-#ifdef WORDS_BIGENDIAN
-#	define A1(x) ((x) >> 56)
-#else
-#	define A1 A
-#endif
-
-
-// Used in package utils, so needs to be visible
-#include <R_ext/Visibility.h>
-// See the comments in crc32_fast.c. They aren't duplicated here.
-extern attribute_visible LZMA_API(uint64_t)
-lzma_crc64(const uint8_t *buf, size_t size, uint64_t crc)
-{
-	crc = ~crc;
-
-#ifdef WORDS_BIGENDIAN
-	crc = bswap64(crc);
-#endif
-
-	if (size > 4) {
-		while ((uintptr_t)(buf) & 3) {
-			crc = lzma_crc64_table[0][*buf++ ^ A1(crc)] ^ S8(crc);
-			--size;
-		}
-
-		const uint8_t *const limit = buf + (size & ~(size_t)(3));
-		size &= (size_t)(3);
-
-		while (buf < limit) {
-#ifdef WORDS_BIGENDIAN
-			const uint32_t tmp = (crc >> 32)
-					^ *(const uint32_t *)(buf);
-#else
-			const uint32_t tmp = crc ^ *(const uint32_t *)(buf);
-#endif
-			buf += 4;
-
-			crc = lzma_crc64_table[3][A(tmp)]
-			    ^ lzma_crc64_table[2][B(tmp)]
-			    ^ S32(crc)
-			    ^ lzma_crc64_table[1][C(tmp)]
-			    ^ lzma_crc64_table[0][D(tmp)];
-		}
-	}
-
-	while (size-- != 0)
-		crc = lzma_crc64_table[0][*buf++ ^ A1(crc)] ^ S8(crc);
-
-#ifdef WORDS_BIGENDIAN
-	crc = bswap64(crc);
-#endif
-
-	return ~crc;
-}
diff --git a/src/extra/xz/check/crc64_small.c b/src/extra/xz/check/crc64_small.c
deleted file mode 100644
index 55d7231..0000000
--- a/src/extra/xz/check/crc64_small.c
+++ /dev/null
@@ -1,53 +0,0 @@
-///////////////////////////////////////////////////////////////////////////////
-//
-/// \file       crc64_small.c
-/// \brief      CRC64 calculation (size-optimized)
-//
-//  Author:     Lasse Collin
-//
-//  This file has been put into the public domain.
-//  You can do whatever you want with this file.
-//
-///////////////////////////////////////////////////////////////////////////////
-
-#include "check.h"
-
-
-static uint64_t crc64_table[256];
-
-
-static void
-crc64_init(void)
-{
-	static const uint64_t poly64 = UINT64_C(0xC96C5795D7870F42);
-
-	for (size_t b = 0; b < 256; ++b) {
-		uint64_t r = b;
-		for (size_t i = 0; i < 8; ++i) {
-			if (r & 1)
-				r = (r >> 1) ^ poly64;
-			else
-				r >>= 1;
-		}
-
-		crc64_table[b] = r;
-	}
-
-	return;
-}
-
-
-extern LZMA_API(uint64_t)
-lzma_crc64(const uint8_t *buf, size_t size, uint64_t crc)
-{
-	mythread_once(crc64_init);
-
-	crc = ~crc;
-
-	while (size != 0) {
-		crc = crc64_table[*buf++ ^ (crc & 0xFF)] ^ (crc >> 8);
-		--size;
-	}
-
-	return ~crc;
-}
diff --git a/src/extra/xz/check/crc64_table.c b/src/extra/xz/check/crc64_table.c
deleted file mode 100644
index 1fbcd94..0000000
--- a/src/extra/xz/check/crc64_table.c
+++ /dev/null
@@ -1,19 +0,0 @@
-///////////////////////////////////////////////////////////////////////////////
-//
-/// \file       crc64_table.c
-/// \brief      Precalculated CRC64 table with correct endianness
-//
-//  Author:     Lasse Collin
-//
-//  This file has been put into the public domain.
-//  You can do whatever you want with this file.
-//
-///////////////////////////////////////////////////////////////////////////////
-
-#include "common.h"
-
-#ifdef WORDS_BIGENDIAN
-#	include "crc64_table_be.h"
-#else
-#	include "crc64_table_le.h"
-#endif
diff --git a/src/extra/xz/check/crc64_table_be.h b/src/extra/xz/check/crc64_table_be.h
deleted file mode 100644
index ea074f3..0000000
--- a/src/extra/xz/check/crc64_table_be.h
+++ /dev/null
@@ -1,521 +0,0 @@
-/* This file has been automatically generated by crc64_tablegen.c. */
-
-const uint64_t lzma_crc64_table[4][256] = {
-	{
-		UINT64_C(0x0000000000000000), UINT64_C(0x6F5FA703BE4C2EB3),
-		UINT64_C(0x5BA040A8573684F4), UINT64_C(0x34FFE7ABE97AAA47),
-		UINT64_C(0x335E8FFF84C3D07B), UINT64_C(0x5C0128FC3A8FFEC8),
-		UINT64_C(0x68FECF57D3F5548F), UINT64_C(0x07A168546DB97A3C),
-		UINT64_C(0x66BC1EFF0987A1F7), UINT64_C(0x09E3B9FCB7CB8F44),
-		UINT64_C(0x3D1C5E575EB12503), UINT64_C(0x5243F954E0FD0BB0),
-		UINT64_C(0x55E291008D44718C), UINT64_C(0x3ABD360333085F3F),
-		UINT64_C(0x0E42D1A8DA72F578), UINT64_C(0x611D76AB643EDBCB),
-		UINT64_C(0x4966335138A19B7D), UINT64_C(0x2639945286EDB5CE),
-		UINT64_C(0x12C673F96F971F89), UINT64_C(0x7D99D4FAD1DB313A),
-		UINT64_C(0x7A38BCAEBC624B06), UINT64_C(0x15671BAD022E65B5),
-		UINT64_C(0x2198FC06EB54CFF2), UINT64_C(0x4EC75B055518E141),
-		UINT64_C(0x2FDA2DAE31263A8A), UINT64_C(0x40858AAD8F6A1439),
-		UINT64_C(0x747A6D066610BE7E), UINT64_C(0x1B25CA05D85C90CD),
-		UINT64_C(0x1C84A251B5E5EAF1), UINT64_C(0x73DB05520BA9C442),
-		UINT64_C(0x4724E2F9E2D36E05), UINT64_C(0x287B45FA5C9F40B6),
-		UINT64_C(0x92CC66A2704237FB), UINT64_C(0xFD93C1A1CE0E1948),
-		UINT64_C(0xC96C260A2774B30F), UINT64_C(0xA633810999389DBC),
-		UINT64_C(0xA192E95DF481E780), UINT64_C(0xCECD4E5E4ACDC933),
-		UINT64_C(0xFA32A9F5A3B76374), UINT64_C(0x956D0EF61DFB4DC7),
-		UINT64_C(0xF470785D79C5960C), UINT64_C(0x9B2FDF5EC789B8BF),
-		UINT64_C(0xAFD038F52EF312F8), UINT64_C(0xC08F9FF690BF3C4B),
-		UINT64_C(0xC72EF7A2FD064677), UINT64_C(0xA87150A1434A68C4),
-		UINT64_C(0x9C8EB70AAA30C283), UINT64_C(0xF3D11009147CEC30),
-		UINT64_C(0xDBAA55F348E3AC86), UINT64_C(0xB4F5F2F0F6AF8235),
-		UINT64_C(0x800A155B1FD52872), UINT64_C(0xEF55B258A19906C1),
-		UINT64_C(0xE8F4DA0CCC207CFD), UINT64_C(0x87AB7D0F726C524E),
-		UINT64_C(0xB3549AA49B16F809), UINT64_C(0xDC0B3DA7255AD6BA),
-		UINT64_C(0xBD164B0C41640D71), UINT64_C(0xD249EC0FFF2823C2),
-		UINT64_C(0xE6B60BA416528985), UINT64_C(0x89E9ACA7A81EA736),
-		UINT64_C(0x8E48C4F3C5A7DD0A), UINT64_C(0xE11763F07BEBF3B9),
-		UINT64_C(0xD5E8845B929159FE), UINT64_C(0xBAB723582CDD774D),
-		UINT64_C(0xA187C3EBCA2BB664), UINT64_C(0xCED864E8746798D7),
-		UINT64_C(0xFA2783439D1D3290), UINT64_C(0x9578244023511C23),
-		UINT64_C(0x92D94C144EE8661F), UINT64_C(0xFD86EB17F0A448AC),
-		UINT64_C(0xC9790CBC19DEE2EB), UINT64_C(0xA626ABBFA792CC58),
-		UINT64_C(0xC73BDD14C3AC1793), UINT64_C(0xA8647A177DE03920),
-		UINT64_C(0x9C9B9DBC949A9367), UINT64_C(0xF3C43ABF2AD6BDD4),
-		UINT64_C(0xF46552EB476FC7E8), UINT64_C(0x9B3AF5E8F923E95B),
-		UINT64_C(0xAFC512431059431C), UINT64_C(0xC09AB540AE156DAF),
-		UINT64_C(0xE8E1F0BAF28A2D19), UINT64_C(0x87BE57B94CC603AA),
-		UINT64_C(0xB341B012A5BCA9ED), UINT64_C(0xDC1E17111BF0875E),
-		UINT64_C(0xDBBF7F457649FD62), UINT64_C(0xB4E0D846C805D3D1),
-		UINT64_C(0x801F3FED217F7996), UINT64_C(0xEF4098EE9F335725),
-		UINT64_C(0x8E5DEE45FB0D8CEE), UINT64_C(0xE10249464541A25D),
-		UINT64_C(0xD5FDAEEDAC3B081A), UINT64_C(0xBAA209EE127726A9),
-		UINT64_C(0xBD0361BA7FCE5C95), UINT64_C(0xD25CC6B9C1827226),
-		UINT64_C(0xE6A3211228F8D861), UINT64_C(0x89FC861196B4F6D2),
-		UINT64_C(0x334BA549BA69819F), UINT64_C(0x5C14024A0425AF2C),
-		UINT64_C(0x68EBE5E1ED5F056B), UINT64_C(0x07B442E253132BD8),
-		UINT64_C(0x00152AB63EAA51E4), UINT64_C(0x6F4A8DB580E67F57),
-		UINT64_C(0x5BB56A1E699CD510), UINT64_C(0x34EACD1DD7D0FBA3),
-		UINT64_C(0x55F7BBB6B3EE2068), UINT64_C(0x3AA81CB50DA20EDB),
-		UINT64_C(0x0E57FB1EE4D8A49C), UINT64_C(0x61085C1D5A948A2F),
-		UINT64_C(0x66A93449372DF013), UINT64_C(0x09F6934A8961DEA0),
-		UINT64_C(0x3D0974E1601B74E7), UINT64_C(0x5256D3E2DE575A54),
-		UINT64_C(0x7A2D961882C81AE2), UINT64_C(0x1572311B3C843451),
-		UINT64_C(0x218DD6B0D5FE9E16), UINT64_C(0x4ED271B36BB2B0A5),
-		UINT64_C(0x497319E7060BCA99), UINT64_C(0x262CBEE4B847E42A),
-		UINT64_C(0x12D3594F513D4E6D), UINT64_C(0x7D8CFE4CEF7160DE),
-		UINT64_C(0x1C9188E78B4FBB15), UINT64_C(0x73CE2FE4350395A6),
-		UINT64_C(0x4731C84FDC793FE1), UINT64_C(0x286E6F4C62351152),
-		UINT64_C(0x2FCF07180F8C6B6E), UINT64_C(0x4090A01BB1C045DD),
-		UINT64_C(0x746F47B058BAEF9A), UINT64_C(0x1B30E0B3E6F6C129),
-		UINT64_C(0x420F87D795576CC9), UINT64_C(0x2D5020D42B1B427A),
-		UINT64_C(0x19AFC77FC261E83D), UINT64_C(0x76F0607C7C2DC68E),
-		UINT64_C(0x715108281194BCB2), UINT64_C(0x1E0EAF2BAFD89201),
-		UINT64_C(0x2AF1488046A23846), UINT64_C(0x45AEEF83F8EE16F5),
-		UINT64_C(0x24B399289CD0CD3E), UINT64_C(0x4BEC3E2B229CE38D),
-		UINT64_C(0x7F13D980CBE649CA), UINT64_C(0x104C7E8375AA6779),
-		UINT64_C(0x17ED16D718131D45), UINT64_C(0x78B2B1D4A65F33F6),
-		UINT64_C(0x4C4D567F4F2599B1), UINT64_C(0x2312F17CF169B702),
-		UINT64_C(0x0B69B486ADF6F7B4), UINT64_C(0x6436138513BAD907),
-		UINT64_C(0x50C9F42EFAC07340), UINT64_C(0x3F96532D448C5DF3),
-		UINT64_C(0x38373B79293527CF), UINT64_C(0x57689C7A9779097C),
-		UINT64_C(0x63977BD17E03A33B), UINT64_C(0x0CC8DCD2C04F8D88),
-		UINT64_C(0x6DD5AA79A4715643), UINT64_C(0x028A0D7A1A3D78F0),
-		UINT64_C(0x3675EAD1F347D2B7), UINT64_C(0x592A4DD24D0BFC04),
-		UINT64_C(0x5E8B258620B28638), UINT64_C(0x31D482859EFEA88B),
-		UINT64_C(0x052B652E778402CC), UINT64_C(0x6A74C22DC9C82C7F),
-		UINT64_C(0xD0C3E175E5155B32), UINT64_C(0xBF9C46765B597581),
-		UINT64_C(0x8B63A1DDB223DFC6), UINT64_C(0xE43C06DE0C6FF175),
-		UINT64_C(0xE39D6E8A61D68B49), UINT64_C(0x8CC2C989DF9AA5FA),
-		UINT64_C(0xB83D2E2236E00FBD), UINT64_C(0xD762892188AC210E),
-		UINT64_C(0xB67FFF8AEC92FAC5), UINT64_C(0xD920588952DED476),
-		UINT64_C(0xEDDFBF22BBA47E31), UINT64_C(0x8280182105E85082),
-		UINT64_C(0x8521707568512ABE), UINT64_C(0xEA7ED776D61D040D),
-		UINT64_C(0xDE8130DD3F67AE4A), UINT64_C(0xB1DE97DE812B80F9),
-		UINT64_C(0x99A5D224DDB4C04F), UINT64_C(0xF6FA752763F8EEFC),
-		UINT64_C(0xC205928C8A8244BB), UINT64_C(0xAD5A358F34CE6A08),
-		UINT64_C(0xAAFB5DDB59771034), UINT64_C(0xC5A4FAD8E73B3E87),
-		UINT64_C(0xF15B1D730E4194C0), UINT64_C(0x9E04BA70B00DBA73),
-		UINT64_C(0xFF19CCDBD43361B8), UINT64_C(0x90466BD86A7F4F0B),
-		UINT64_C(0xA4B98C738305E54C), UINT64_C(0xCBE62B703D49CBFF),
-		UINT64_C(0xCC47432450F0B1C3), UINT64_C(0xA318E427EEBC9F70),
-		UINT64_C(0x97E7038C07C63537), UINT64_C(0xF8B8A48FB98A1B84),
-		UINT64_C(0xE388443C5F7CDAAD), UINT64_C(0x8CD7E33FE130F41E),
-		UINT64_C(0xB8280494084A5E59), UINT64_C(0xD777A397B60670EA),
-		UINT64_C(0xD0D6CBC3DBBF0AD6), UINT64_C(0xBF896CC065F32465),
-		UINT64_C(0x8B768B6B8C898E22), UINT64_C(0xE4292C6832C5A091),
-		UINT64_C(0x85345AC356FB7B5A), UINT64_C(0xEA6BFDC0E8B755E9),
-		UINT64_C(0xDE941A6B01CDFFAE), UINT64_C(0xB1CBBD68BF81D11D),
-		UINT64_C(0xB66AD53CD238AB21), UINT64_C(0xD935723F6C748592),
-		UINT64_C(0xEDCA9594850E2FD5), UINT64_C(0x829532973B420166),
-		UINT64_C(0xAAEE776D67DD41D0), UINT64_C(0xC5B1D06ED9916F63),
-		UINT64_C(0xF14E37C530EBC524), UINT64_C(0x9E1190C68EA7EB97),
-		UINT64_C(0x99B0F892E31E91AB), UINT64_C(0xF6EF5F915D52BF18),
-		UINT64_C(0xC210B83AB428155F), UINT64_C(0xAD4F1F390A643BEC),
-		UINT64_C(0xCC5269926E5AE027), UINT64_C(0xA30DCE91D016CE94),
-		UINT64_C(0x97F2293A396C64D3), UINT64_C(0xF8AD8E3987204A60),
-		UINT64_C(0xFF0CE66DEA99305C), UINT64_C(0x9053416E54D51EEF),
-		UINT64_C(0xA4ACA6C5BDAFB4A8), UINT64_C(0xCBF301C603E39A1B),
-		UINT64_C(0x7144229E2F3EED56), UINT64_C(0x1E1B859D9172C3E5),
-		UINT64_C(0x2AE46236780869A2), UINT64_C(0x45BBC535C6444711),
-		UINT64_C(0x421AAD61ABFD3D2D), UINT64_C(0x2D450A6215B1139E),
-		UINT64_C(0x19BAEDC9FCCBB9D9), UINT64_C(0x76E54ACA4287976A),
-		UINT64_C(0x17F83C6126B94CA1), UINT64_C(0x78A79B6298F56212),
-		UINT64_C(0x4C587CC9718FC855), UINT64_C(0x2307DBCACFC3E6E6),
-		UINT64_C(0x24A6B39EA27A9CDA), UINT64_C(0x4BF9149D1C36B269),
-		UINT64_C(0x7F06F336F54C182E), UINT64_C(0x105954354B00369D),
-		UINT64_C(0x382211CF179F762B), UINT64_C(0x577DB6CCA9D35898),
-		UINT64_C(0x6382516740A9F2DF), UINT64_C(0x0CDDF664FEE5DC6C),
-		UINT64_C(0x0B7C9E30935CA650), UINT64_C(0x642339332D1088E3),
-		UINT64_C(0x50DCDE98C46A22A4), UINT64_C(0x3F83799B7A260C17),
-		UINT64_C(0x5E9E0F301E18D7DC), UINT64_C(0x31C1A833A054F96F),
-		UINT64_C(0x053E4F98492E5328), UINT64_C(0x6A61E89BF7627D9B),
-		UINT64_C(0x6DC080CF9ADB07A7), UINT64_C(0x029F27CC24972914),
-		UINT64_C(0x3660C067CDED8353), UINT64_C(0x593F676473A1ADE0)
-	}, {
-		UINT64_C(0x0000000000000000), UINT64_C(0x0DF1D05C9279E954),
-		UINT64_C(0x1AE2A1B924F3D2A9), UINT64_C(0x171371E5B68A3BFD),
-		UINT64_C(0xB1DA4DDC62497DC1), UINT64_C(0xBC2B9D80F0309495),
-		UINT64_C(0xAB38EC6546BAAF68), UINT64_C(0xA6C93C39D4C3463C),
-		UINT64_C(0xE7AB9517EE3D2210), UINT64_C(0xEA5A454B7C44CB44),
-		UINT64_C(0xFD4934AECACEF0B9), UINT64_C(0xF0B8E4F258B719ED),
-		UINT64_C(0x5671D8CB8C745FD1), UINT64_C(0x5B8008971E0DB685),
-		UINT64_C(0x4C937972A8878D78), UINT64_C(0x4162A92E3AFE642C),
-		UINT64_C(0xCE572B2FDC7B4420), UINT64_C(0xC3A6FB734E02AD74),
-		UINT64_C(0xD4B58A96F8889689), UINT64_C(0xD9445ACA6AF17FDD),
-		UINT64_C(0x7F8D66F3BE3239E1), UINT64_C(0x727CB6AF2C4BD0B5),
-		UINT64_C(0x656FC74A9AC1EB48), UINT64_C(0x689E171608B8021C),
-		UINT64_C(0x29FCBE3832466630), UINT64_C(0x240D6E64A03F8F64),
-		UINT64_C(0x331E1F8116B5B499), UINT64_C(0x3EEFCFDD84CC5DCD),
-		UINT64_C(0x9826F3E4500F1BF1), UINT64_C(0x95D723B8C276F2A5),
-		UINT64_C(0x82C4525D74FCC958), UINT64_C(0x8F358201E685200C),
-		UINT64_C(0x9CAF565EB8F78840), UINT64_C(0x915E86022A8E6114),
-		UINT64_C(0x864DF7E79C045AE9), UINT64_C(0x8BBC27BB0E7DB3BD),
-		UINT64_C(0x2D751B82DABEF581), UINT64_C(0x2084CBDE48C71CD5),
-		UINT64_C(0x3797BA3BFE4D2728), UINT64_C(0x3A666A676C34CE7C),
-		UINT64_C(0x7B04C34956CAAA50), UINT64_C(0x76F51315C4B34304),
-		UINT64_C(0x61E662F0723978F9), UINT64_C(0x6C17B2ACE04091AD),
-		UINT64_C(0xCADE8E953483D791), UINT64_C(0xC72F5EC9A6FA3EC5),
-		UINT64_C(0xD03C2F2C10700538), UINT64_C(0xDDCDFF708209EC6C),
-		UINT64_C(0x52F87D71648CCC60), UINT64_C(0x5F09AD2DF6F52534),
-		UINT64_C(0x481ADCC8407F1EC9), UINT64_C(0x45EB0C94D206F79D),
-		UINT64_C(0xE32230AD06C5B1A1), UINT64_C(0xEED3E0F194BC58F5),
-		UINT64_C(0xF9C0911422366308), UINT64_C(0xF4314148B04F8A5C),
-		UINT64_C(0xB553E8668AB1EE70), UINT64_C(0xB8A2383A18C80724),
-		UINT64_C(0xAFB149DFAE423CD9), UINT64_C(0xA24099833C3BD58D),
-		UINT64_C(0x0489A5BAE8F893B1), UINT64_C(0x097875E67A817AE5),
-		UINT64_C(0x1E6B0403CC0B4118), UINT64_C(0x139AD45F5E72A84C),
-		UINT64_C(0x385FADBC70EF1181), UINT64_C(0x35AE7DE0E296F8D5),
-		UINT64_C(0x22BD0C05541CC328), UINT64_C(0x2F4CDC59C6652A7C),
-		UINT64_C(0x8985E06012A66C40), UINT64_C(0x8474303C80DF8514),
-		UINT64_C(0x936741D93655BEE9), UINT64_C(0x9E969185A42C57BD),
-		UINT64_C(0xDFF438AB9ED23391), UINT64_C(0xD205E8F70CABDAC5),
-		UINT64_C(0xC5169912BA21E138), UINT64_C(0xC8E7494E2858086C),
-		UINT64_C(0x6E2E7577FC9B4E50), UINT64_C(0x63DFA52B6EE2A704),
-		UINT64_C(0x74CCD4CED8689CF9), UINT64_C(0x793D04924A1175AD),
-		UINT64_C(0xF6088693AC9455A1), UINT64_C(0xFBF956CF3EEDBCF5),
-		UINT64_C(0xECEA272A88678708), UINT64_C(0xE11BF7761A1E6E5C),
-		UINT64_C(0x47D2CB4FCEDD2860), UINT64_C(0x4A231B135CA4C134),
-		UINT64_C(0x5D306AF6EA2EFAC9), UINT64_C(0x50C1BAAA7857139D),
-		UINT64_C(0x11A3138442A977B1), UINT64_C(0x1C52C3D8D0D09EE5),
-		UINT64_C(0x0B41B23D665AA518), UINT64_C(0x06B06261F4234C4C),
-		UINT64_C(0xA0795E5820E00A70), UINT64_C(0xAD888E04B299E324),
-		UINT64_C(0xBA9BFFE10413D8D9), UINT64_C(0xB76A2FBD966A318D),
-		UINT64_C(0xA4F0FBE2C81899C1), UINT64_C(0xA9012BBE5A617095),
-		UINT64_C(0xBE125A5BECEB4B68), UINT64_C(0xB3E38A077E92A23C),
-		UINT64_C(0x152AB63EAA51E400), UINT64_C(0x18DB666238280D54),
-		UINT64_C(0x0FC817878EA236A9), UINT64_C(0x0239C7DB1CDBDFFD),
-		UINT64_C(0x435B6EF52625BBD1), UINT64_C(0x4EAABEA9B45C5285),
-		UINT64_C(0x59B9CF4C02D66978), UINT64_C(0x54481F1090AF802C),
-		UINT64_C(0xF2812329446CC610), UINT64_C(0xFF70F375D6152F44),
-		UINT64_C(0xE8638290609F14B9), UINT64_C(0xE59252CCF2E6FDED),
-		UINT64_C(0x6AA7D0CD1463DDE1), UINT64_C(0x67560091861A34B5),
-		UINT64_C(0x7045717430900F48), UINT64_C(0x7DB4A128A2E9E61C),
-		UINT64_C(0xDB7D9D11762AA020), UINT64_C(0xD68C4D4DE4534974),
-		UINT64_C(0xC19F3CA852D97289), UINT64_C(0xCC6EECF4C0A09BDD),
-		UINT64_C(0x8D0C45DAFA5EFFF1), UINT64_C(0x80FD9586682716A5),
-		UINT64_C(0x97EEE463DEAD2D58), UINT64_C(0x9A1F343F4CD4C40C),
-		UINT64_C(0x3CD6080698178230), UINT64_C(0x3127D85A0A6E6B64),
-		UINT64_C(0x2634A9BFBCE45099), UINT64_C(0x2BC579E32E9DB9CD),
-		UINT64_C(0xF5A054D6CA71FB90), UINT64_C(0xF851848A580812C4),
-		UINT64_C(0xEF42F56FEE822939), UINT64_C(0xE2B325337CFBC06D),
-		UINT64_C(0x447A190AA8388651), UINT64_C(0x498BC9563A416F05),
-		UINT64_C(0x5E98B8B38CCB54F8), UINT64_C(0x536968EF1EB2BDAC),
-		UINT64_C(0x120BC1C1244CD980), UINT64_C(0x1FFA119DB63530D4),
-		UINT64_C(0x08E9607800BF0B29), UINT64_C(0x0518B02492C6E27D),
-		UINT64_C(0xA3D18C1D4605A441), UINT64_C(0xAE205C41D47C4D15),
-		UINT64_C(0xB9332DA462F676E8), UINT64_C(0xB4C2FDF8F08F9FBC),
-		UINT64_C(0x3BF77FF9160ABFB0), UINT64_C(0x3606AFA5847356E4),
-		UINT64_C(0x2115DE4032F96D19), UINT64_C(0x2CE40E1CA080844D),
-		UINT64_C(0x8A2D32257443C271), UINT64_C(0x87DCE279E63A2B25),
-		UINT64_C(0x90CF939C50B010D8), UINT64_C(0x9D3E43C0C2C9F98C),
-		UINT64_C(0xDC5CEAEEF8379DA0), UINT64_C(0xD1AD3AB26A4E74F4),
-		UINT64_C(0xC6BE4B57DCC44F09), UINT64_C(0xCB4F9B0B4EBDA65D),
-		UINT64_C(0x6D86A7329A7EE061), UINT64_C(0x6077776E08070935),
-		UINT64_C(0x7764068BBE8D32C8), UINT64_C(0x7A95D6D72CF4DB9C),
-		UINT64_C(0x690F0288728673D0), UINT64_C(0x64FED2D4E0FF9A84),
-		UINT64_C(0x73EDA3315675A179), UINT64_C(0x7E1C736DC40C482D),
-		UINT64_C(0xD8D54F5410CF0E11), UINT64_C(0xD5249F0882B6E745),
-		UINT64_C(0xC237EEED343CDCB8), UINT64_C(0xCFC63EB1A64535EC),
-		UINT64_C(0x8EA4979F9CBB51C0), UINT64_C(0x835547C30EC2B894),
-		UINT64_C(0x94463626B8488369), UINT64_C(0x99B7E67A2A316A3D),
-		UINT64_C(0x3F7EDA43FEF22C01), UINT64_C(0x328F0A1F6C8BC555),
-		UINT64_C(0x259C7BFADA01FEA8), UINT64_C(0x286DABA6487817FC),
-		UINT64_C(0xA75829A7AEFD37F0), UINT64_C(0xAAA9F9FB3C84DEA4),
-		UINT64_C(0xBDBA881E8A0EE559), UINT64_C(0xB04B584218770C0D),
-		UINT64_C(0x1682647BCCB44A31), UINT64_C(0x1B73B4275ECDA365),
-		UINT64_C(0x0C60C5C2E8479898), UINT64_C(0x0191159E7A3E71CC),
-		UINT64_C(0x40F3BCB040C015E0), UINT64_C(0x4D026CECD2B9FCB4),
-		UINT64_C(0x5A111D096433C749), UINT64_C(0x57E0CD55F64A2E1D),
-		UINT64_C(0xF129F16C22896821), UINT64_C(0xFCD82130B0F08175),
-		UINT64_C(0xEBCB50D5067ABA88), UINT64_C(0xE63A8089940353DC),
-		UINT64_C(0xCDFFF96ABA9EEA11), UINT64_C(0xC00E293628E70345),
-		UINT64_C(0xD71D58D39E6D38B8), UINT64_C(0xDAEC888F0C14D1EC),
-		UINT64_C(0x7C25B4B6D8D797D0), UINT64_C(0x71D464EA4AAE7E84),
-		UINT64_C(0x66C7150FFC244579), UINT64_C(0x6B36C5536E5DAC2D),
-		UINT64_C(0x2A546C7D54A3C801), UINT64_C(0x27A5BC21C6DA2155),
-		UINT64_C(0x30B6CDC470501AA8), UINT64_C(0x3D471D98E229F3FC),
-		UINT64_C(0x9B8E21A136EAB5C0), UINT64_C(0x967FF1FDA4935C94),
-		UINT64_C(0x816C801812196769), UINT64_C(0x8C9D504480608E3D),
-		UINT64_C(0x03A8D24566E5AE31), UINT64_C(0x0E590219F49C4765),
-		UINT64_C(0x194A73FC42167C98), UINT64_C(0x14BBA3A0D06F95CC),
-		UINT64_C(0xB2729F9904ACD3F0), UINT64_C(0xBF834FC596D53AA4),
-		UINT64_C(0xA8903E20205F0159), UINT64_C(0xA561EE7CB226E80D),
-		UINT64_C(0xE403475288D88C21), UINT64_C(0xE9F2970E1AA16575),
-		UINT64_C(0xFEE1E6EBAC2B5E88), UINT64_C(0xF31036B73E52B7DC),
-		UINT64_C(0x55D90A8EEA91F1E0), UINT64_C(0x5828DAD278E818B4),
-		UINT64_C(0x4F3BAB37CE622349), UINT64_C(0x42CA7B6B5C1BCA1D),
-		UINT64_C(0x5150AF3402696251), UINT64_C(0x5CA17F6890108B05),
-		UINT64_C(0x4BB20E8D269AB0F8), UINT64_C(0x4643DED1B4E359AC),
-		UINT64_C(0xE08AE2E860201F90), UINT64_C(0xED7B32B4F259F6C4),
-		UINT64_C(0xFA68435144D3CD39), UINT64_C(0xF799930DD6AA246D),
-		UINT64_C(0xB6FB3A23EC544041), UINT64_C(0xBB0AEA7F7E2DA915),
-		UINT64_C(0xAC199B9AC8A792E8), UINT64_C(0xA1E84BC65ADE7BBC),
-		UINT64_C(0x072177FF8E1D3D80), UINT64_C(0x0AD0A7A31C64D4D4),
-		UINT64_C(0x1DC3D646AAEEEF29), UINT64_C(0x1032061A3897067D),
-		UINT64_C(0x9F07841BDE122671), UINT64_C(0x92F654474C6BCF25),
-		UINT64_C(0x85E525A2FAE1F4D8), UINT64_C(0x8814F5FE68981D8C),
-		UINT64_C(0x2EDDC9C7BC5B5BB0), UINT64_C(0x232C199B2E22B2E4),
-		UINT64_C(0x343F687E98A88919), UINT64_C(0x39CEB8220AD1604D),
-		UINT64_C(0x78AC110C302F0461), UINT64_C(0x755DC150A256ED35),
-		UINT64_C(0x624EB0B514DCD6C8), UINT64_C(0x6FBF60E986A53F9C),
-		UINT64_C(0xC9765CD0526679A0), UINT64_C(0xC4878C8CC01F90F4),
-		UINT64_C(0xD394FD697695AB09), UINT64_C(0xDE652D35E4EC425D)
-	}, {
-		UINT64_C(0x0000000000000000), UINT64_C(0xCB6D6A914AE10B3F),
-		UINT64_C(0x96DBD42295C2177E), UINT64_C(0x5DB6BEB3DF231C41),
-		UINT64_C(0x2CB7A9452A852FFC), UINT64_C(0xE7DAC3D4606424C3),
-		UINT64_C(0xBA6C7D67BF473882), UINT64_C(0x710117F6F5A633BD),
-		UINT64_C(0xDD705D247FA5876A), UINT64_C(0x161D37B535448C55),
-		UINT64_C(0x4BAB8906EA679014), UINT64_C(0x80C6E397A0869B2B),
-		UINT64_C(0xF1C7F4615520A896), UINT64_C(0x3AAA9EF01FC1A3A9),
-		UINT64_C(0x671C2043C0E2BFE8), UINT64_C(0xAC714AD28A03B4D7),
-		UINT64_C(0xBAE1BA48FE4A0FD5), UINT64_C(0x718CD0D9B4AB04EA),
-		UINT64_C(0x2C3A6E6A6B8818AB), UINT64_C(0xE75704FB21691394),
-		UINT64_C(0x9656130DD4CF2029), UINT64_C(0x5D3B799C9E2E2B16),
-		UINT64_C(0x008DC72F410D3757), UINT64_C(0xCBE0ADBE0BEC3C68),
-		UINT64_C(0x6791E76C81EF88BF), UINT64_C(0xACFC8DFDCB0E8380),
-		UINT64_C(0xF14A334E142D9FC1), UINT64_C(0x3A2759DF5ECC94FE),
-		UINT64_C(0x4B264E29AB6AA743), UINT64_C(0x804B24B8E18BAC7C),
-		UINT64_C(0xDDFD9A0B3EA8B03D), UINT64_C(0x1690F09A7449BB02),
-		UINT64_C(0xF1DD7B3ED73AC638), UINT64_C(0x3AB011AF9DDBCD07),
-		UINT64_C(0x6706AF1C42F8D146), UINT64_C(0xAC6BC58D0819DA79),
-		UINT64_C(0xDD6AD27BFDBFE9C4), UINT64_C(0x1607B8EAB75EE2FB),
-		UINT64_C(0x4BB10659687DFEBA), UINT64_C(0x80DC6CC8229CF585),
-		UINT64_C(0x2CAD261AA89F4152), UINT64_C(0xE7C04C8BE27E4A6D),
-		UINT64_C(0xBA76F2383D5D562C), UINT64_C(0x711B98A977BC5D13),
-		UINT64_C(0x001A8F5F821A6EAE), UINT64_C(0xCB77E5CEC8FB6591),
-		UINT64_C(0x96C15B7D17D879D0), UINT64_C(0x5DAC31EC5D3972EF),
-		UINT64_C(0x4B3CC1762970C9ED), UINT64_C(0x8051ABE76391C2D2),
-		UINT64_C(0xDDE71554BCB2DE93), UINT64_C(0x168A7FC5F653D5AC),
-		UINT64_C(0x678B683303F5E611), UINT64_C(0xACE602A24914ED2E),
-		UINT64_C(0xF150BC119637F16F), UINT64_C(0x3A3DD680DCD6FA50),
-		UINT64_C(0x964C9C5256D54E87), UINT64_C(0x5D21F6C31C3445B8),
-		UINT64_C(0x00974870C31759F9), UINT64_C(0xCBFA22E189F652C6),
-		UINT64_C(0xBAFB35177C50617B), UINT64_C(0x71965F8636B16A44),
-		UINT64_C(0x2C20E135E9927605), UINT64_C(0xE74D8BA4A3737D3A),
-		UINT64_C(0xE2BBF77CAE758C71), UINT64_C(0x29D69DEDE494874E),
-		UINT64_C(0x7460235E3BB79B0F), UINT64_C(0xBF0D49CF71569030),
-		UINT64_C(0xCE0C5E3984F0A38D), UINT64_C(0x056134A8CE11A8B2),
-		UINT64_C(0x58D78A1B1132B4F3), UINT64_C(0x93BAE08A5BD3BFCC),
-		UINT64_C(0x3FCBAA58D1D00B1B), UINT64_C(0xF4A6C0C99B310024),
-		UINT64_C(0xA9107E7A44121C65), UINT64_C(0x627D14EB0EF3175A),
-		UINT64_C(0x137C031DFB5524E7), UINT64_C(0xD811698CB1B42FD8),
-		UINT64_C(0x85A7D73F6E973399), UINT64_C(0x4ECABDAE247638A6),
-		UINT64_C(0x585A4D34503F83A4), UINT64_C(0x933727A51ADE889B),
-		UINT64_C(0xCE819916C5FD94DA), UINT64_C(0x05ECF3878F1C9FE5),
-		UINT64_C(0x74EDE4717ABAAC58), UINT64_C(0xBF808EE0305BA767),
-		UINT64_C(0xE2363053EF78BB26), UINT64_C(0x295B5AC2A599B019),
-		UINT64_C(0x852A10102F9A04CE), UINT64_C(0x4E477A81657B0FF1),
-		UINT64_C(0x13F1C432BA5813B0), UINT64_C(0xD89CAEA3F0B9188F),
-		UINT64_C(0xA99DB955051F2B32), UINT64_C(0x62F0D3C44FFE200D),
-		UINT64_C(0x3F466D7790DD3C4C), UINT64_C(0xF42B07E6DA3C3773),
-		UINT64_C(0x13668C42794F4A49), UINT64_C(0xD80BE6D333AE4176),
-		UINT64_C(0x85BD5860EC8D5D37), UINT64_C(0x4ED032F1A66C5608),
-		UINT64_C(0x3FD1250753CA65B5), UINT64_C(0xF4BC4F96192B6E8A),
-		UINT64_C(0xA90AF125C60872CB), UINT64_C(0x62679BB48CE979F4),
-		UINT64_C(0xCE16D16606EACD23), UINT64_C(0x057BBBF74C0BC61C),
-		UINT64_C(0x58CD05449328DA5D), UINT64_C(0x93A06FD5D9C9D162),
-		UINT64_C(0xE2A178232C6FE2DF), UINT64_C(0x29CC12B2668EE9E0),
-		UINT64_C(0x747AAC01B9ADF5A1), UINT64_C(0xBF17C690F34CFE9E),
-		UINT64_C(0xA987360A8705459C), UINT64_C(0x62EA5C9BCDE44EA3),
-		UINT64_C(0x3F5CE22812C752E2), UINT64_C(0xF43188B9582659DD),
-		UINT64_C(0x85309F4FAD806A60), UINT64_C(0x4E5DF5DEE761615F),
-		UINT64_C(0x13EB4B6D38427D1E), UINT64_C(0xD88621FC72A37621),
-		UINT64_C(0x74F76B2EF8A0C2F6), UINT64_C(0xBF9A01BFB241C9C9),
-		UINT64_C(0xE22CBF0C6D62D588), UINT64_C(0x2941D59D2783DEB7),
-		UINT64_C(0x5840C26BD225ED0A), UINT64_C(0x932DA8FA98C4E635),
-		UINT64_C(0xCE9B164947E7FA74), UINT64_C(0x05F67CD80D06F14B),
-		UINT64_C(0xC477EFF95CEB18E3), UINT64_C(0x0F1A8568160A13DC),
-		UINT64_C(0x52AC3BDBC9290F9D), UINT64_C(0x99C1514A83C804A2),
-		UINT64_C(0xE8C046BC766E371F), UINT64_C(0x23AD2C2D3C8F3C20),
-		UINT64_C(0x7E1B929EE3AC2061), UINT64_C(0xB576F80FA94D2B5E),
-		UINT64_C(0x1907B2DD234E9F89), UINT64_C(0xD26AD84C69AF94B6),
-		UINT64_C(0x8FDC66FFB68C88F7), UINT64_C(0x44B10C6EFC6D83C8),
-		UINT64_C(0x35B01B9809CBB075), UINT64_C(0xFEDD7109432ABB4A),
-		UINT64_C(0xA36BCFBA9C09A70B), UINT64_C(0x6806A52BD6E8AC34),
-		UINT64_C(0x7E9655B1A2A11736), UINT64_C(0xB5FB3F20E8401C09),
-		UINT64_C(0xE84D819337630048), UINT64_C(0x2320EB027D820B77),
-		UINT64_C(0x5221FCF4882438CA), UINT64_C(0x994C9665C2C533F5),
-		UINT64_C(0xC4FA28D61DE62FB4), UINT64_C(0x0F9742475707248B),
-		UINT64_C(0xA3E60895DD04905C), UINT64_C(0x688B620497E59B63),
-		UINT64_C(0x353DDCB748C68722), UINT64_C(0xFE50B62602278C1D),
-		UINT64_C(0x8F51A1D0F781BFA0), UINT64_C(0x443CCB41BD60B49F),
-		UINT64_C(0x198A75F26243A8DE), UINT64_C(0xD2E71F6328A2A3E1),
-		UINT64_C(0x35AA94C78BD1DEDB), UINT64_C(0xFEC7FE56C130D5E4),
-		UINT64_C(0xA37140E51E13C9A5), UINT64_C(0x681C2A7454F2C29A),
-		UINT64_C(0x191D3D82A154F127), UINT64_C(0xD2705713EBB5FA18),
-		UINT64_C(0x8FC6E9A03496E659), UINT64_C(0x44AB83317E77ED66),
-		UINT64_C(0xE8DAC9E3F47459B1), UINT64_C(0x23B7A372BE95528E),
-		UINT64_C(0x7E011DC161B64ECF), UINT64_C(0xB56C77502B5745F0),
-		UINT64_C(0xC46D60A6DEF1764D), UINT64_C(0x0F000A3794107D72),
-		UINT64_C(0x52B6B4844B336133), UINT64_C(0x99DBDE1501D26A0C),
-		UINT64_C(0x8F4B2E8F759BD10E), UINT64_C(0x4426441E3F7ADA31),
-		UINT64_C(0x1990FAADE059C670), UINT64_C(0xD2FD903CAAB8CD4F),
-		UINT64_C(0xA3FC87CA5F1EFEF2), UINT64_C(0x6891ED5B15FFF5CD),
-		UINT64_C(0x352753E8CADCE98C), UINT64_C(0xFE4A3979803DE2B3),
-		UINT64_C(0x523B73AB0A3E5664), UINT64_C(0x9956193A40DF5D5B),
-		UINT64_C(0xC4E0A7899FFC411A), UINT64_C(0x0F8DCD18D51D4A25),
-		UINT64_C(0x7E8CDAEE20BB7998), UINT64_C(0xB5E1B07F6A5A72A7),
-		UINT64_C(0xE8570ECCB5796EE6), UINT64_C(0x233A645DFF9865D9),
-		UINT64_C(0x26CC1885F29E9492), UINT64_C(0xEDA17214B87F9FAD),
-		UINT64_C(0xB017CCA7675C83EC), UINT64_C(0x7B7AA6362DBD88D3),
-		UINT64_C(0x0A7BB1C0D81BBB6E), UINT64_C(0xC116DB5192FAB051),
-		UINT64_C(0x9CA065E24DD9AC10), UINT64_C(0x57CD0F730738A72F),
-		UINT64_C(0xFBBC45A18D3B13F8), UINT64_C(0x30D12F30C7DA18C7),
-		UINT64_C(0x6D67918318F90486), UINT64_C(0xA60AFB1252180FB9),
-		UINT64_C(0xD70BECE4A7BE3C04), UINT64_C(0x1C668675ED5F373B),
-		UINT64_C(0x41D038C6327C2B7A), UINT64_C(0x8ABD5257789D2045),
-		UINT64_C(0x9C2DA2CD0CD49B47), UINT64_C(0x5740C85C46359078),
-		UINT64_C(0x0AF676EF99168C39), UINT64_C(0xC19B1C7ED3F78706),
-		UINT64_C(0xB09A0B882651B4BB), UINT64_C(0x7BF761196CB0BF84),
-		UINT64_C(0x2641DFAAB393A3C5), UINT64_C(0xED2CB53BF972A8FA),
-		UINT64_C(0x415DFFE973711C2D), UINT64_C(0x8A30957839901712),
-		UINT64_C(0xD7862BCBE6B30B53), UINT64_C(0x1CEB415AAC52006C),
-		UINT64_C(0x6DEA56AC59F433D1), UINT64_C(0xA6873C3D131538EE),
-		UINT64_C(0xFB31828ECC3624AF), UINT64_C(0x305CE81F86D72F90),
-		UINT64_C(0xD71163BB25A452AA), UINT64_C(0x1C7C092A6F455995),
-		UINT64_C(0x41CAB799B06645D4), UINT64_C(0x8AA7DD08FA874EEB),
-		UINT64_C(0xFBA6CAFE0F217D56), UINT64_C(0x30CBA06F45C07669),
-		UINT64_C(0x6D7D1EDC9AE36A28), UINT64_C(0xA610744DD0026117),
-		UINT64_C(0x0A613E9F5A01D5C0), UINT64_C(0xC10C540E10E0DEFF),
-		UINT64_C(0x9CBAEABDCFC3C2BE), UINT64_C(0x57D7802C8522C981),
-		UINT64_C(0x26D697DA7084FA3C), UINT64_C(0xEDBBFD4B3A65F103),
-		UINT64_C(0xB00D43F8E546ED42), UINT64_C(0x7B602969AFA7E67D),
-		UINT64_C(0x6DF0D9F3DBEE5D7F), UINT64_C(0xA69DB362910F5640),
-		UINT64_C(0xFB2B0DD14E2C4A01), UINT64_C(0x3046674004CD413E),
-		UINT64_C(0x414770B6F16B7283), UINT64_C(0x8A2A1A27BB8A79BC),
-		UINT64_C(0xD79CA49464A965FD), UINT64_C(0x1CF1CE052E486EC2),
-		UINT64_C(0xB08084D7A44BDA15), UINT64_C(0x7BEDEE46EEAAD12A),
-		UINT64_C(0x265B50F53189CD6B), UINT64_C(0xED363A647B68C654),
-		UINT64_C(0x9C372D928ECEF5E9), UINT64_C(0x575A4703C42FFED6),
-		UINT64_C(0x0AECF9B01B0CE297), UINT64_C(0xC181932151EDE9A8)
-	}, {
-		UINT64_C(0x0000000000000000), UINT64_C(0xDCA12C225E8AEE1D),
-		UINT64_C(0xB8435944BC14DD3B), UINT64_C(0x64E27566E29E3326),
-		UINT64_C(0x7087B2887829BA77), UINT64_C(0xAC269EAA26A3546A),
-		UINT64_C(0xC8C4EBCCC43D674C), UINT64_C(0x1465C7EE9AB78951),
-		UINT64_C(0xE00E6511F15274EF), UINT64_C(0x3CAF4933AFD89AF2),
-		UINT64_C(0x584D3C554D46A9D4), UINT64_C(0x84EC107713CC47C9),
-		UINT64_C(0x9089D799897BCE98), UINT64_C(0x4C28FBBBD7F12085),
-		UINT64_C(0x28CA8EDD356F13A3), UINT64_C(0xF46BA2FF6BE5FDBE),
-		UINT64_C(0x4503C48DC90A304C), UINT64_C(0x99A2E8AF9780DE51),
-		UINT64_C(0xFD409DC9751EED77), UINT64_C(0x21E1B1EB2B94036A),
-		UINT64_C(0x35847605B1238A3B), UINT64_C(0xE9255A27EFA96426),
-		UINT64_C(0x8DC72F410D375700), UINT64_C(0x5166036353BDB91D),
-		UINT64_C(0xA50DA19C385844A3), UINT64_C(0x79AC8DBE66D2AABE),
-		UINT64_C(0x1D4EF8D8844C9998), UINT64_C(0xC1EFD4FADAC67785),
-		UINT64_C(0xD58A13144071FED4), UINT64_C(0x092B3F361EFB10C9),
-		UINT64_C(0x6DC94A50FC6523EF), UINT64_C(0xB1686672A2EFCDF2),
-		UINT64_C(0x8A06881B93156098), UINT64_C(0x56A7A439CD9F8E85),
-		UINT64_C(0x3245D15F2F01BDA3), UINT64_C(0xEEE4FD7D718B53BE),
-		UINT64_C(0xFA813A93EB3CDAEF), UINT64_C(0x262016B1B5B634F2),
-		UINT64_C(0x42C263D7572807D4), UINT64_C(0x9E634FF509A2E9C9),
-		UINT64_C(0x6A08ED0A62471477), UINT64_C(0xB6A9C1283CCDFA6A),
-		UINT64_C(0xD24BB44EDE53C94C), UINT64_C(0x0EEA986C80D92751),
-		UINT64_C(0x1A8F5F821A6EAE00), UINT64_C(0xC62E73A044E4401D),
-		UINT64_C(0xA2CC06C6A67A733B), UINT64_C(0x7E6D2AE4F8F09D26),
-		UINT64_C(0xCF054C965A1F50D4), UINT64_C(0x13A460B40495BEC9),
-		UINT64_C(0x774615D2E60B8DEF), UINT64_C(0xABE739F0B88163F2),
-		UINT64_C(0xBF82FE1E2236EAA3), UINT64_C(0x6323D23C7CBC04BE),
-		UINT64_C(0x07C1A75A9E223798), UINT64_C(0xDB608B78C0A8D985),
-		UINT64_C(0x2F0B2987AB4D243B), UINT64_C(0xF3AA05A5F5C7CA26),
-		UINT64_C(0x974870C31759F900), UINT64_C(0x4BE95CE149D3171D),
-		UINT64_C(0x5F8C9B0FD3649E4C), UINT64_C(0x832DB72D8DEE7051),
-		UINT64_C(0xE7CFC24B6F704377), UINT64_C(0x3B6EEE6931FAAD6A),
-		UINT64_C(0x91131E980D8418A2), UINT64_C(0x4DB232BA530EF6BF),
-		UINT64_C(0x295047DCB190C599), UINT64_C(0xF5F16BFEEF1A2B84),
-		UINT64_C(0xE194AC1075ADA2D5), UINT64_C(0x3D3580322B274CC8),
-		UINT64_C(0x59D7F554C9B97FEE), UINT64_C(0x8576D976973391F3),
-		UINT64_C(0x711D7B89FCD66C4D), UINT64_C(0xADBC57ABA25C8250),
-		UINT64_C(0xC95E22CD40C2B176), UINT64_C(0x15FF0EEF1E485F6B),
-		UINT64_C(0x019AC90184FFD63A), UINT64_C(0xDD3BE523DA753827),
-		UINT64_C(0xB9D9904538EB0B01), UINT64_C(0x6578BC676661E51C),
-		UINT64_C(0xD410DA15C48E28EE), UINT64_C(0x08B1F6379A04C6F3),
-		UINT64_C(0x6C538351789AF5D5), UINT64_C(0xB0F2AF7326101BC8),
-		UINT64_C(0xA497689DBCA79299), UINT64_C(0x783644BFE22D7C84),
-		UINT64_C(0x1CD431D900B34FA2), UINT64_C(0xC0751DFB5E39A1BF),
-		UINT64_C(0x341EBF0435DC5C01), UINT64_C(0xE8BF93266B56B21C),
-		UINT64_C(0x8C5DE64089C8813A), UINT64_C(0x50FCCA62D7426F27),
-		UINT64_C(0x44990D8C4DF5E676), UINT64_C(0x983821AE137F086B),
-		UINT64_C(0xFCDA54C8F1E13B4D), UINT64_C(0x207B78EAAF6BD550),
-		UINT64_C(0x1B1596839E91783A), UINT64_C(0xC7B4BAA1C01B9627),
-		UINT64_C(0xA356CFC72285A501), UINT64_C(0x7FF7E3E57C0F4B1C),
-		UINT64_C(0x6B92240BE6B8C24D), UINT64_C(0xB7330829B8322C50),
-		UINT64_C(0xD3D17D4F5AAC1F76), UINT64_C(0x0F70516D0426F16B),
-		UINT64_C(0xFB1BF3926FC30CD5), UINT64_C(0x27BADFB03149E2C8),
-		UINT64_C(0x4358AAD6D3D7D1EE), UINT64_C(0x9FF986F48D5D3FF3),
-		UINT64_C(0x8B9C411A17EAB6A2), UINT64_C(0x573D6D38496058BF),
-		UINT64_C(0x33DF185EABFE6B99), UINT64_C(0xEF7E347CF5748584),
-		UINT64_C(0x5E16520E579B4876), UINT64_C(0x82B77E2C0911A66B),
-		UINT64_C(0xE6550B4AEB8F954D), UINT64_C(0x3AF42768B5057B50),
-		UINT64_C(0x2E91E0862FB2F201), UINT64_C(0xF230CCA471381C1C),
-		UINT64_C(0x96D2B9C293A62F3A), UINT64_C(0x4A7395E0CD2CC127),
-		UINT64_C(0xBE18371FA6C93C99), UINT64_C(0x62B91B3DF843D284),
-		UINT64_C(0x065B6E5B1ADDE1A2), UINT64_C(0xDAFA427944570FBF),
-		UINT64_C(0xCE9F8597DEE086EE), UINT64_C(0x123EA9B5806A68F3),
-		UINT64_C(0x76DCDCD362F45BD5), UINT64_C(0xAA7DF0F13C7EB5C8),
-		UINT64_C(0xA739329F30A7E9D6), UINT64_C(0x7B981EBD6E2D07CB),
-		UINT64_C(0x1F7A6BDB8CB334ED), UINT64_C(0xC3DB47F9D239DAF0),
-		UINT64_C(0xD7BE8017488E53A1), UINT64_C(0x0B1FAC351604BDBC),
-		UINT64_C(0x6FFDD953F49A8E9A), UINT64_C(0xB35CF571AA106087),
-		UINT64_C(0x4737578EC1F59D39), UINT64_C(0x9B967BAC9F7F7324),
-		UINT64_C(0xFF740ECA7DE14002), UINT64_C(0x23D522E8236BAE1F),
-		UINT64_C(0x37B0E506B9DC274E), UINT64_C(0xEB11C924E756C953),
-		UINT64_C(0x8FF3BC4205C8FA75), UINT64_C(0x535290605B421468),
-		UINT64_C(0xE23AF612F9ADD99A), UINT64_C(0x3E9BDA30A7273787),
-		UINT64_C(0x5A79AF5645B904A1), UINT64_C(0x86D883741B33EABC),
-		UINT64_C(0x92BD449A818463ED), UINT64_C(0x4E1C68B8DF0E8DF0),
-		UINT64_C(0x2AFE1DDE3D90BED6), UINT64_C(0xF65F31FC631A50CB),
-		UINT64_C(0x0234930308FFAD75), UINT64_C(0xDE95BF2156754368),
-		UINT64_C(0xBA77CA47B4EB704E), UINT64_C(0x66D6E665EA619E53),
-		UINT64_C(0x72B3218B70D61702), UINT64_C(0xAE120DA92E5CF91F),
-		UINT64_C(0xCAF078CFCCC2CA39), UINT64_C(0x165154ED92482424),
-		UINT64_C(0x2D3FBA84A3B2894E), UINT64_C(0xF19E96A6FD386753),
-		UINT64_C(0x957CE3C01FA65475), UINT64_C(0x49DDCFE2412CBA68),
-		UINT64_C(0x5DB8080CDB9B3339), UINT64_C(0x8119242E8511DD24),
-		UINT64_C(0xE5FB5148678FEE02), UINT64_C(0x395A7D6A3905001F),
-		UINT64_C(0xCD31DF9552E0FDA1), UINT64_C(0x1190F3B70C6A13BC),
-		UINT64_C(0x757286D1EEF4209A), UINT64_C(0xA9D3AAF3B07ECE87),
-		UINT64_C(0xBDB66D1D2AC947D6), UINT64_C(0x6117413F7443A9CB),
-		UINT64_C(0x05F5345996DD9AED), UINT64_C(0xD954187BC85774F0),
-		UINT64_C(0x683C7E096AB8B902), UINT64_C(0xB49D522B3432571F),
-		UINT64_C(0xD07F274DD6AC6439), UINT64_C(0x0CDE0B6F88268A24),
-		UINT64_C(0x18BBCC8112910375), UINT64_C(0xC41AE0A34C1BED68),
-		UINT64_C(0xA0F895C5AE85DE4E), UINT64_C(0x7C59B9E7F00F3053),
-		UINT64_C(0x88321B189BEACDED), UINT64_C(0x5493373AC56023F0),
-		UINT64_C(0x3071425C27FE10D6), UINT64_C(0xECD06E7E7974FECB),
-		UINT64_C(0xF8B5A990E3C3779A), UINT64_C(0x241485B2BD499987),
-		UINT64_C(0x40F6F0D45FD7AAA1), UINT64_C(0x9C57DCF6015D44BC),
-		UINT64_C(0x362A2C073D23F174), UINT64_C(0xEA8B002563A91F69),
-		UINT64_C(0x8E69754381372C4F), UINT64_C(0x52C85961DFBDC252),
-		UINT64_C(0x46AD9E8F450A4B03), UINT64_C(0x9A0CB2AD1B80A51E),
-		UINT64_C(0xFEEEC7CBF91E9638), UINT64_C(0x224FEBE9A7947825),
-		UINT64_C(0xD6244916CC71859B), UINT64_C(0x0A85653492FB6B86),
-		UINT64_C(0x6E671052706558A0), UINT64_C(0xB2C63C702EEFB6BD),
-		UINT64_C(0xA6A3FB9EB4583FEC), UINT64_C(0x7A02D7BCEAD2D1F1),
-		UINT64_C(0x1EE0A2DA084CE2D7), UINT64_C(0xC2418EF856C60CCA),
-		UINT64_C(0x7329E88AF429C138), UINT64_C(0xAF88C4A8AAA32F25),
-		UINT64_C(0xCB6AB1CE483D1C03), UINT64_C(0x17CB9DEC16B7F21E),
-		UINT64_C(0x03AE5A028C007B4F), UINT64_C(0xDF0F7620D28A9552),
-		UINT64_C(0xBBED03463014A674), UINT64_C(0x674C2F646E9E4869),
-		UINT64_C(0x93278D9B057BB5D7), UINT64_C(0x4F86A1B95BF15BCA),
-		UINT64_C(0x2B64D4DFB96F68EC), UINT64_C(0xF7C5F8FDE7E586F1),
-		UINT64_C(0xE3A03F137D520FA0), UINT64_C(0x3F01133123D8E1BD),
-		UINT64_C(0x5BE36657C146D29B), UINT64_C(0x87424A759FCC3C86),
-		UINT64_C(0xBC2CA41CAE3691EC), UINT64_C(0x608D883EF0BC7FF1),
-		UINT64_C(0x046FFD5812224CD7), UINT64_C(0xD8CED17A4CA8A2CA),
-		UINT64_C(0xCCAB1694D61F2B9B), UINT64_C(0x100A3AB68895C586),
-		UINT64_C(0x74E84FD06A0BF6A0), UINT64_C(0xA84963F2348118BD),
-		UINT64_C(0x5C22C10D5F64E503), UINT64_C(0x8083ED2F01EE0B1E),
-		UINT64_C(0xE4619849E3703838), UINT64_C(0x38C0B46BBDFAD625),
-		UINT64_C(0x2CA57385274D5F74), UINT64_C(0xF0045FA779C7B169),
-		UINT64_C(0x94E62AC19B59824F), UINT64_C(0x484706E3C5D36C52),
-		UINT64_C(0xF92F6091673CA1A0), UINT64_C(0x258E4CB339B64FBD),
-		UINT64_C(0x416C39D5DB287C9B), UINT64_C(0x9DCD15F785A29286),
-		UINT64_C(0x89A8D2191F151BD7), UINT64_C(0x5509FE3B419FF5CA),
-		UINT64_C(0x31EB8B5DA301C6EC), UINT64_C(0xED4AA77FFD8B28F1),
-		UINT64_C(0x19210580966ED54F), UINT64_C(0xC58029A2C8E43B52),
-		UINT64_C(0xA1625CC42A7A0874), UINT64_C(0x7DC370E674F0E669),
-		UINT64_C(0x69A6B708EE476F38), UINT64_C(0xB5079B2AB0CD8125),
-		UINT64_C(0xD1E5EE4C5253B203), UINT64_C(0x0D44C26E0CD95C1E)
-	}
-};
diff --git a/src/extra/xz/check/crc64_table_le.h b/src/extra/xz/check/crc64_table_le.h
deleted file mode 100644
index 1196b31..0000000
--- a/src/extra/xz/check/crc64_table_le.h
+++ /dev/null
@@ -1,521 +0,0 @@
-/* This file has been automatically generated by crc64_tablegen.c. */
-
-const uint64_t lzma_crc64_table[4][256] = {
-	{
-		UINT64_C(0x0000000000000000), UINT64_C(0xB32E4CBE03A75F6F),
-		UINT64_C(0xF4843657A840A05B), UINT64_C(0x47AA7AE9ABE7FF34),
-		UINT64_C(0x7BD0C384FF8F5E33), UINT64_C(0xC8FE8F3AFC28015C),
-		UINT64_C(0x8F54F5D357CFFE68), UINT64_C(0x3C7AB96D5468A107),
-		UINT64_C(0xF7A18709FF1EBC66), UINT64_C(0x448FCBB7FCB9E309),
-		UINT64_C(0x0325B15E575E1C3D), UINT64_C(0xB00BFDE054F94352),
-		UINT64_C(0x8C71448D0091E255), UINT64_C(0x3F5F08330336BD3A),
-		UINT64_C(0x78F572DAA8D1420E), UINT64_C(0xCBDB3E64AB761D61),
-		UINT64_C(0x7D9BA13851336649), UINT64_C(0xCEB5ED8652943926),
-		UINT64_C(0x891F976FF973C612), UINT64_C(0x3A31DBD1FAD4997D),
-		UINT64_C(0x064B62BCAEBC387A), UINT64_C(0xB5652E02AD1B6715),
-		UINT64_C(0xF2CF54EB06FC9821), UINT64_C(0x41E11855055BC74E),
-		UINT64_C(0x8A3A2631AE2DDA2F), UINT64_C(0x39146A8FAD8A8540),
-		UINT64_C(0x7EBE1066066D7A74), UINT64_C(0xCD905CD805CA251B),
-		UINT64_C(0xF1EAE5B551A2841C), UINT64_C(0x42C4A90B5205DB73),
-		UINT64_C(0x056ED3E2F9E22447), UINT64_C(0xB6409F5CFA457B28),
-		UINT64_C(0xFB374270A266CC92), UINT64_C(0x48190ECEA1C193FD),
-		UINT64_C(0x0FB374270A266CC9), UINT64_C(0xBC9D3899098133A6),
-		UINT64_C(0x80E781F45DE992A1), UINT64_C(0x33C9CD4A5E4ECDCE),
-		UINT64_C(0x7463B7A3F5A932FA), UINT64_C(0xC74DFB1DF60E6D95),
-		UINT64_C(0x0C96C5795D7870F4), UINT64_C(0xBFB889C75EDF2F9B),
-		UINT64_C(0xF812F32EF538D0AF), UINT64_C(0x4B3CBF90F69F8FC0),
-		UINT64_C(0x774606FDA2F72EC7), UINT64_C(0xC4684A43A15071A8),
-		UINT64_C(0x83C230AA0AB78E9C), UINT64_C(0x30EC7C140910D1F3),
-		UINT64_C(0x86ACE348F355AADB), UINT64_C(0x3582AFF6F0F2F5B4),
-		UINT64_C(0x7228D51F5B150A80), UINT64_C(0xC10699A158B255EF),
-		UINT64_C(0xFD7C20CC0CDAF4E8), UINT64_C(0x4E526C720F7DAB87),
-		UINT64_C(0x09F8169BA49A54B3), UINT64_C(0xBAD65A25A73D0BDC),
-		UINT64_C(0x710D64410C4B16BD), UINT64_C(0xC22328FF0FEC49D2),
-		UINT64_C(0x85895216A40BB6E6), UINT64_C(0x36A71EA8A7ACE989),
-		UINT64_C(0x0ADDA7C5F3C4488E), UINT64_C(0xB9F3EB7BF06317E1),
-		UINT64_C(0xFE5991925B84E8D5), UINT64_C(0x4D77DD2C5823B7BA),
-		UINT64_C(0x64B62BCAEBC387A1), UINT64_C(0xD7986774E864D8CE),
-		UINT64_C(0x90321D9D438327FA), UINT64_C(0x231C512340247895),
-		UINT64_C(0x1F66E84E144CD992), UINT64_C(0xAC48A4F017EB86FD),
-		UINT64_C(0xEBE2DE19BC0C79C9), UINT64_C(0x58CC92A7BFAB26A6),
-		UINT64_C(0x9317ACC314DD3BC7), UINT64_C(0x2039E07D177A64A8),
-		UINT64_C(0x67939A94BC9D9B9C), UINT64_C(0xD4BDD62ABF3AC4F3),
-		UINT64_C(0xE8C76F47EB5265F4), UINT64_C(0x5BE923F9E8F53A9B),
-		UINT64_C(0x1C4359104312C5AF), UINT64_C(0xAF6D15AE40B59AC0),
-		UINT64_C(0x192D8AF2BAF0E1E8), UINT64_C(0xAA03C64CB957BE87),
-		UINT64_C(0xEDA9BCA512B041B3), UINT64_C(0x5E87F01B11171EDC),
-		UINT64_C(0x62FD4976457FBFDB), UINT64_C(0xD1D305C846D8E0B4),
-		UINT64_C(0x96797F21ED3F1F80), UINT64_C(0x2557339FEE9840EF),
-		UINT64_C(0xEE8C0DFB45EE5D8E), UINT64_C(0x5DA24145464902E1),
-		UINT64_C(0x1A083BACEDAEFDD5), UINT64_C(0xA9267712EE09A2BA),
-		UINT64_C(0x955CCE7FBA6103BD), UINT64_C(0x267282C1B9C65CD2),
-		UINT64_C(0x61D8F8281221A3E6), UINT64_C(0xD2F6B4961186FC89),
-		UINT64_C(0x9F8169BA49A54B33), UINT64_C(0x2CAF25044A02145C),
-		UINT64_C(0x6B055FEDE1E5EB68), UINT64_C(0xD82B1353E242B407),
-		UINT64_C(0xE451AA3EB62A1500), UINT64_C(0x577FE680B58D4A6F),
-		UINT64_C(0x10D59C691E6AB55B), UINT64_C(0xA3FBD0D71DCDEA34),
-		UINT64_C(0x6820EEB3B6BBF755), UINT64_C(0xDB0EA20DB51CA83A),
-		UINT64_C(0x9CA4D8E41EFB570E), UINT64_C(0x2F8A945A1D5C0861),
-		UINT64_C(0x13F02D374934A966), UINT64_C(0xA0DE61894A93F609),
-		UINT64_C(0xE7741B60E174093D), UINT64_C(0x545A57DEE2D35652),
-		UINT64_C(0xE21AC88218962D7A), UINT64_C(0x5134843C1B317215),
-		UINT64_C(0x169EFED5B0D68D21), UINT64_C(0xA5B0B26BB371D24E),
-		UINT64_C(0x99CA0B06E7197349), UINT64_C(0x2AE447B8E4BE2C26),
-		UINT64_C(0x6D4E3D514F59D312), UINT64_C(0xDE6071EF4CFE8C7D),
-		UINT64_C(0x15BB4F8BE788911C), UINT64_C(0xA6950335E42FCE73),
-		UINT64_C(0xE13F79DC4FC83147), UINT64_C(0x521135624C6F6E28),
-		UINT64_C(0x6E6B8C0F1807CF2F), UINT64_C(0xDD45C0B11BA09040),
-		UINT64_C(0x9AEFBA58B0476F74), UINT64_C(0x29C1F6E6B3E0301B),
-		UINT64_C(0xC96C5795D7870F42), UINT64_C(0x7A421B2BD420502D),
-		UINT64_C(0x3DE861C27FC7AF19), UINT64_C(0x8EC62D7C7C60F076),
-		UINT64_C(0xB2BC941128085171), UINT64_C(0x0192D8AF2BAF0E1E),
-		UINT64_C(0x4638A2468048F12A), UINT64_C(0xF516EEF883EFAE45),
-		UINT64_C(0x3ECDD09C2899B324), UINT64_C(0x8DE39C222B3EEC4B),
-		UINT64_C(0xCA49E6CB80D9137F), UINT64_C(0x7967AA75837E4C10),
-		UINT64_C(0x451D1318D716ED17), UINT64_C(0xF6335FA6D4B1B278),
-		UINT64_C(0xB199254F7F564D4C), UINT64_C(0x02B769F17CF11223),
-		UINT64_C(0xB4F7F6AD86B4690B), UINT64_C(0x07D9BA1385133664),
-		UINT64_C(0x4073C0FA2EF4C950), UINT64_C(0xF35D8C442D53963F),
-		UINT64_C(0xCF273529793B3738), UINT64_C(0x7C0979977A9C6857),
-		UINT64_C(0x3BA3037ED17B9763), UINT64_C(0x888D4FC0D2DCC80C),
-		UINT64_C(0x435671A479AAD56D), UINT64_C(0xF0783D1A7A0D8A02),
-		UINT64_C(0xB7D247F3D1EA7536), UINT64_C(0x04FC0B4DD24D2A59),
-		UINT64_C(0x3886B22086258B5E), UINT64_C(0x8BA8FE9E8582D431),
-		UINT64_C(0xCC0284772E652B05), UINT64_C(0x7F2CC8C92DC2746A),
-		UINT64_C(0x325B15E575E1C3D0), UINT64_C(0x8175595B76469CBF),
-		UINT64_C(0xC6DF23B2DDA1638B), UINT64_C(0x75F16F0CDE063CE4),
-		UINT64_C(0x498BD6618A6E9DE3), UINT64_C(0xFAA59ADF89C9C28C),
-		UINT64_C(0xBD0FE036222E3DB8), UINT64_C(0x0E21AC88218962D7),
-		UINT64_C(0xC5FA92EC8AFF7FB6), UINT64_C(0x76D4DE52895820D9),
-		UINT64_C(0x317EA4BB22BFDFED), UINT64_C(0x8250E80521188082),
-		UINT64_C(0xBE2A516875702185), UINT64_C(0x0D041DD676D77EEA),
-		UINT64_C(0x4AAE673FDD3081DE), UINT64_C(0xF9802B81DE97DEB1),
-		UINT64_C(0x4FC0B4DD24D2A599), UINT64_C(0xFCEEF8632775FAF6),
-		UINT64_C(0xBB44828A8C9205C2), UINT64_C(0x086ACE348F355AAD),
-		UINT64_C(0x34107759DB5DFBAA), UINT64_C(0x873E3BE7D8FAA4C5),
-		UINT64_C(0xC094410E731D5BF1), UINT64_C(0x73BA0DB070BA049E),
-		UINT64_C(0xB86133D4DBCC19FF), UINT64_C(0x0B4F7F6AD86B4690),
-		UINT64_C(0x4CE50583738CB9A4), UINT64_C(0xFFCB493D702BE6CB),
-		UINT64_C(0xC3B1F050244347CC), UINT64_C(0x709FBCEE27E418A3),
-		UINT64_C(0x3735C6078C03E797), UINT64_C(0x841B8AB98FA4B8F8),
-		UINT64_C(0xADDA7C5F3C4488E3), UINT64_C(0x1EF430E13FE3D78C),
-		UINT64_C(0x595E4A08940428B8), UINT64_C(0xEA7006B697A377D7),
-		UINT64_C(0xD60ABFDBC3CBD6D0), UINT64_C(0x6524F365C06C89BF),
-		UINT64_C(0x228E898C6B8B768B), UINT64_C(0x91A0C532682C29E4),
-		UINT64_C(0x5A7BFB56C35A3485), UINT64_C(0xE955B7E8C0FD6BEA),
-		UINT64_C(0xAEFFCD016B1A94DE), UINT64_C(0x1DD181BF68BDCBB1),
-		UINT64_C(0x21AB38D23CD56AB6), UINT64_C(0x9285746C3F7235D9),
-		UINT64_C(0xD52F0E859495CAED), UINT64_C(0x6601423B97329582),
-		UINT64_C(0xD041DD676D77EEAA), UINT64_C(0x636F91D96ED0B1C5),
-		UINT64_C(0x24C5EB30C5374EF1), UINT64_C(0x97EBA78EC690119E),
-		UINT64_C(0xAB911EE392F8B099), UINT64_C(0x18BF525D915FEFF6),
-		UINT64_C(0x5F1528B43AB810C2), UINT64_C(0xEC3B640A391F4FAD),
-		UINT64_C(0x27E05A6E926952CC), UINT64_C(0x94CE16D091CE0DA3),
-		UINT64_C(0xD3646C393A29F297), UINT64_C(0x604A2087398EADF8),
-		UINT64_C(0x5C3099EA6DE60CFF), UINT64_C(0xEF1ED5546E415390),
-		UINT64_C(0xA8B4AFBDC5A6ACA4), UINT64_C(0x1B9AE303C601F3CB),
-		UINT64_C(0x56ED3E2F9E224471), UINT64_C(0xE5C372919D851B1E),
-		UINT64_C(0xA26908783662E42A), UINT64_C(0x114744C635C5BB45),
-		UINT64_C(0x2D3DFDAB61AD1A42), UINT64_C(0x9E13B115620A452D),
-		UINT64_C(0xD9B9CBFCC9EDBA19), UINT64_C(0x6A978742CA4AE576),
-		UINT64_C(0xA14CB926613CF817), UINT64_C(0x1262F598629BA778),
-		UINT64_C(0x55C88F71C97C584C), UINT64_C(0xE6E6C3CFCADB0723),
-		UINT64_C(0xDA9C7AA29EB3A624), UINT64_C(0x69B2361C9D14F94B),
-		UINT64_C(0x2E184CF536F3067F), UINT64_C(0x9D36004B35545910),
-		UINT64_C(0x2B769F17CF112238), UINT64_C(0x9858D3A9CCB67D57),
-		UINT64_C(0xDFF2A94067518263), UINT64_C(0x6CDCE5FE64F6DD0C),
-		UINT64_C(0x50A65C93309E7C0B), UINT64_C(0xE388102D33392364),
-		UINT64_C(0xA4226AC498DEDC50), UINT64_C(0x170C267A9B79833F),
-		UINT64_C(0xDCD7181E300F9E5E), UINT64_C(0x6FF954A033A8C131),
-		UINT64_C(0x28532E49984F3E05), UINT64_C(0x9B7D62F79BE8616A),
-		UINT64_C(0xA707DB9ACF80C06D), UINT64_C(0x14299724CC279F02),
-		UINT64_C(0x5383EDCD67C06036), UINT64_C(0xE0ADA17364673F59)
-	}, {
-		UINT64_C(0x0000000000000000), UINT64_C(0x54E979925CD0F10D),
-		UINT64_C(0xA9D2F324B9A1E21A), UINT64_C(0xFD3B8AB6E5711317),
-		UINT64_C(0xC17D4962DC4DDAB1), UINT64_C(0x959430F0809D2BBC),
-		UINT64_C(0x68AFBA4665EC38AB), UINT64_C(0x3C46C3D4393CC9A6),
-		UINT64_C(0x10223DEE1795ABE7), UINT64_C(0x44CB447C4B455AEA),
-		UINT64_C(0xB9F0CECAAE3449FD), UINT64_C(0xED19B758F2E4B8F0),
-		UINT64_C(0xD15F748CCBD87156), UINT64_C(0x85B60D1E9708805B),
-		UINT64_C(0x788D87A87279934C), UINT64_C(0x2C64FE3A2EA96241),
-		UINT64_C(0x20447BDC2F2B57CE), UINT64_C(0x74AD024E73FBA6C3),
-		UINT64_C(0x899688F8968AB5D4), UINT64_C(0xDD7FF16ACA5A44D9),
-		UINT64_C(0xE13932BEF3668D7F), UINT64_C(0xB5D04B2CAFB67C72),
-		UINT64_C(0x48EBC19A4AC76F65), UINT64_C(0x1C02B80816179E68),
-		UINT64_C(0x3066463238BEFC29), UINT64_C(0x648F3FA0646E0D24),
-		UINT64_C(0x99B4B516811F1E33), UINT64_C(0xCD5DCC84DDCFEF3E),
-		UINT64_C(0xF11B0F50E4F32698), UINT64_C(0xA5F276C2B823D795),
-		UINT64_C(0x58C9FC745D52C482), UINT64_C(0x0C2085E60182358F),
-		UINT64_C(0x4088F7B85E56AF9C), UINT64_C(0x14618E2A02865E91),
-		UINT64_C(0xE95A049CE7F74D86), UINT64_C(0xBDB37D0EBB27BC8B),
-		UINT64_C(0x81F5BEDA821B752D), UINT64_C(0xD51CC748DECB8420),
-		UINT64_C(0x28274DFE3BBA9737), UINT64_C(0x7CCE346C676A663A),
-		UINT64_C(0x50AACA5649C3047B), UINT64_C(0x0443B3C41513F576),
-		UINT64_C(0xF9783972F062E661), UINT64_C(0xAD9140E0ACB2176C),
-		UINT64_C(0x91D78334958EDECA), UINT64_C(0xC53EFAA6C95E2FC7),
-		UINT64_C(0x380570102C2F3CD0), UINT64_C(0x6CEC098270FFCDDD),
-		UINT64_C(0x60CC8C64717DF852), UINT64_C(0x3425F5F62DAD095F),
-		UINT64_C(0xC91E7F40C8DC1A48), UINT64_C(0x9DF706D2940CEB45),
-		UINT64_C(0xA1B1C506AD3022E3), UINT64_C(0xF558BC94F1E0D3EE),
-		UINT64_C(0x086336221491C0F9), UINT64_C(0x5C8A4FB0484131F4),
-		UINT64_C(0x70EEB18A66E853B5), UINT64_C(0x2407C8183A38A2B8),
-		UINT64_C(0xD93C42AEDF49B1AF), UINT64_C(0x8DD53B3C839940A2),
-		UINT64_C(0xB193F8E8BAA58904), UINT64_C(0xE57A817AE6757809),
-		UINT64_C(0x18410BCC03046B1E), UINT64_C(0x4CA8725E5FD49A13),
-		UINT64_C(0x8111EF70BCAD5F38), UINT64_C(0xD5F896E2E07DAE35),
-		UINT64_C(0x28C31C54050CBD22), UINT64_C(0x7C2A65C659DC4C2F),
-		UINT64_C(0x406CA61260E08589), UINT64_C(0x1485DF803C307484),
-		UINT64_C(0xE9BE5536D9416793), UINT64_C(0xBD572CA48591969E),
-		UINT64_C(0x9133D29EAB38F4DF), UINT64_C(0xC5DAAB0CF7E805D2),
-		UINT64_C(0x38E121BA129916C5), UINT64_C(0x6C0858284E49E7C8),
-		UINT64_C(0x504E9BFC77752E6E), UINT64_C(0x04A7E26E2BA5DF63),
-		UINT64_C(0xF99C68D8CED4CC74), UINT64_C(0xAD75114A92043D79),
-		UINT64_C(0xA15594AC938608F6), UINT64_C(0xF5BCED3ECF56F9FB),
-		UINT64_C(0x088767882A27EAEC), UINT64_C(0x5C6E1E1A76F71BE1),
-		UINT64_C(0x6028DDCE4FCBD247), UINT64_C(0x34C1A45C131B234A),
-		UINT64_C(0xC9FA2EEAF66A305D), UINT64_C(0x9D135778AABAC150),
-		UINT64_C(0xB177A9428413A311), UINT64_C(0xE59ED0D0D8C3521C),
-		UINT64_C(0x18A55A663DB2410B), UINT64_C(0x4C4C23F46162B006),
-		UINT64_C(0x700AE020585E79A0), UINT64_C(0x24E399B2048E88AD),
-		UINT64_C(0xD9D81304E1FF9BBA), UINT64_C(0x8D316A96BD2F6AB7),
-		UINT64_C(0xC19918C8E2FBF0A4), UINT64_C(0x9570615ABE2B01A9),
-		UINT64_C(0x684BEBEC5B5A12BE), UINT64_C(0x3CA2927E078AE3B3),
-		UINT64_C(0x00E451AA3EB62A15), UINT64_C(0x540D28386266DB18),
-		UINT64_C(0xA936A28E8717C80F), UINT64_C(0xFDDFDB1CDBC73902),
-		UINT64_C(0xD1BB2526F56E5B43), UINT64_C(0x85525CB4A9BEAA4E),
-		UINT64_C(0x7869D6024CCFB959), UINT64_C(0x2C80AF90101F4854),
-		UINT64_C(0x10C66C44292381F2), UINT64_C(0x442F15D675F370FF),
-		UINT64_C(0xB9149F60908263E8), UINT64_C(0xEDFDE6F2CC5292E5),
-		UINT64_C(0xE1DD6314CDD0A76A), UINT64_C(0xB5341A8691005667),
-		UINT64_C(0x480F903074714570), UINT64_C(0x1CE6E9A228A1B47D),
-		UINT64_C(0x20A02A76119D7DDB), UINT64_C(0x744953E44D4D8CD6),
-		UINT64_C(0x8972D952A83C9FC1), UINT64_C(0xDD9BA0C0F4EC6ECC),
-		UINT64_C(0xF1FF5EFADA450C8D), UINT64_C(0xA51627688695FD80),
-		UINT64_C(0x582DADDE63E4EE97), UINT64_C(0x0CC4D44C3F341F9A),
-		UINT64_C(0x308217980608D63C), UINT64_C(0x646B6E0A5AD82731),
-		UINT64_C(0x9950E4BCBFA93426), UINT64_C(0xCDB99D2EE379C52B),
-		UINT64_C(0x90FB71CAD654A0F5), UINT64_C(0xC41208588A8451F8),
-		UINT64_C(0x392982EE6FF542EF), UINT64_C(0x6DC0FB7C3325B3E2),
-		UINT64_C(0x518638A80A197A44), UINT64_C(0x056F413A56C98B49),
-		UINT64_C(0xF854CB8CB3B8985E), UINT64_C(0xACBDB21EEF686953),
-		UINT64_C(0x80D94C24C1C10B12), UINT64_C(0xD43035B69D11FA1F),
-		UINT64_C(0x290BBF007860E908), UINT64_C(0x7DE2C69224B01805),
-		UINT64_C(0x41A405461D8CD1A3), UINT64_C(0x154D7CD4415C20AE),
-		UINT64_C(0xE876F662A42D33B9), UINT64_C(0xBC9F8FF0F8FDC2B4),
-		UINT64_C(0xB0BF0A16F97FF73B), UINT64_C(0xE4567384A5AF0636),
-		UINT64_C(0x196DF93240DE1521), UINT64_C(0x4D8480A01C0EE42C),
-		UINT64_C(0x71C2437425322D8A), UINT64_C(0x252B3AE679E2DC87),
-		UINT64_C(0xD810B0509C93CF90), UINT64_C(0x8CF9C9C2C0433E9D),
-		UINT64_C(0xA09D37F8EEEA5CDC), UINT64_C(0xF4744E6AB23AADD1),
-		UINT64_C(0x094FC4DC574BBEC6), UINT64_C(0x5DA6BD4E0B9B4FCB),
-		UINT64_C(0x61E07E9A32A7866D), UINT64_C(0x350907086E777760),
-		UINT64_C(0xC8328DBE8B066477), UINT64_C(0x9CDBF42CD7D6957A),
-		UINT64_C(0xD073867288020F69), UINT64_C(0x849AFFE0D4D2FE64),
-		UINT64_C(0x79A1755631A3ED73), UINT64_C(0x2D480CC46D731C7E),
-		UINT64_C(0x110ECF10544FD5D8), UINT64_C(0x45E7B682089F24D5),
-		UINT64_C(0xB8DC3C34EDEE37C2), UINT64_C(0xEC3545A6B13EC6CF),
-		UINT64_C(0xC051BB9C9F97A48E), UINT64_C(0x94B8C20EC3475583),
-		UINT64_C(0x698348B826364694), UINT64_C(0x3D6A312A7AE6B799),
-		UINT64_C(0x012CF2FE43DA7E3F), UINT64_C(0x55C58B6C1F0A8F32),
-		UINT64_C(0xA8FE01DAFA7B9C25), UINT64_C(0xFC177848A6AB6D28),
-		UINT64_C(0xF037FDAEA72958A7), UINT64_C(0xA4DE843CFBF9A9AA),
-		UINT64_C(0x59E50E8A1E88BABD), UINT64_C(0x0D0C771842584BB0),
-		UINT64_C(0x314AB4CC7B648216), UINT64_C(0x65A3CD5E27B4731B),
-		UINT64_C(0x989847E8C2C5600C), UINT64_C(0xCC713E7A9E159101),
-		UINT64_C(0xE015C040B0BCF340), UINT64_C(0xB4FCB9D2EC6C024D),
-		UINT64_C(0x49C73364091D115A), UINT64_C(0x1D2E4AF655CDE057),
-		UINT64_C(0x216889226CF129F1), UINT64_C(0x7581F0B03021D8FC),
-		UINT64_C(0x88BA7A06D550CBEB), UINT64_C(0xDC53039489803AE6),
-		UINT64_C(0x11EA9EBA6AF9FFCD), UINT64_C(0x4503E72836290EC0),
-		UINT64_C(0xB8386D9ED3581DD7), UINT64_C(0xECD1140C8F88ECDA),
-		UINT64_C(0xD097D7D8B6B4257C), UINT64_C(0x847EAE4AEA64D471),
-		UINT64_C(0x794524FC0F15C766), UINT64_C(0x2DAC5D6E53C5366B),
-		UINT64_C(0x01C8A3547D6C542A), UINT64_C(0x5521DAC621BCA527),
-		UINT64_C(0xA81A5070C4CDB630), UINT64_C(0xFCF329E2981D473D),
-		UINT64_C(0xC0B5EA36A1218E9B), UINT64_C(0x945C93A4FDF17F96),
-		UINT64_C(0x6967191218806C81), UINT64_C(0x3D8E608044509D8C),
-		UINT64_C(0x31AEE56645D2A803), UINT64_C(0x65479CF41902590E),
-		UINT64_C(0x987C1642FC734A19), UINT64_C(0xCC956FD0A0A3BB14),
-		UINT64_C(0xF0D3AC04999F72B2), UINT64_C(0xA43AD596C54F83BF),
-		UINT64_C(0x59015F20203E90A8), UINT64_C(0x0DE826B27CEE61A5),
-		UINT64_C(0x218CD888524703E4), UINT64_C(0x7565A11A0E97F2E9),
-		UINT64_C(0x885E2BACEBE6E1FE), UINT64_C(0xDCB7523EB73610F3),
-		UINT64_C(0xE0F191EA8E0AD955), UINT64_C(0xB418E878D2DA2858),
-		UINT64_C(0x492362CE37AB3B4F), UINT64_C(0x1DCA1B5C6B7BCA42),
-		UINT64_C(0x5162690234AF5051), UINT64_C(0x058B1090687FA15C),
-		UINT64_C(0xF8B09A268D0EB24B), UINT64_C(0xAC59E3B4D1DE4346),
-		UINT64_C(0x901F2060E8E28AE0), UINT64_C(0xC4F659F2B4327BED),
-		UINT64_C(0x39CDD344514368FA), UINT64_C(0x6D24AAD60D9399F7),
-		UINT64_C(0x414054EC233AFBB6), UINT64_C(0x15A92D7E7FEA0ABB),
-		UINT64_C(0xE892A7C89A9B19AC), UINT64_C(0xBC7BDE5AC64BE8A1),
-		UINT64_C(0x803D1D8EFF772107), UINT64_C(0xD4D4641CA3A7D00A),
-		UINT64_C(0x29EFEEAA46D6C31D), UINT64_C(0x7D0697381A063210),
-		UINT64_C(0x712612DE1B84079F), UINT64_C(0x25CF6B4C4754F692),
-		UINT64_C(0xD8F4E1FAA225E585), UINT64_C(0x8C1D9868FEF51488),
-		UINT64_C(0xB05B5BBCC7C9DD2E), UINT64_C(0xE4B2222E9B192C23),
-		UINT64_C(0x1989A8987E683F34), UINT64_C(0x4D60D10A22B8CE39),
-		UINT64_C(0x61042F300C11AC78), UINT64_C(0x35ED56A250C15D75),
-		UINT64_C(0xC8D6DC14B5B04E62), UINT64_C(0x9C3FA586E960BF6F),
-		UINT64_C(0xA0796652D05C76C9), UINT64_C(0xF4901FC08C8C87C4),
-		UINT64_C(0x09AB957669FD94D3), UINT64_C(0x5D42ECE4352D65DE)
-	}, {
-		UINT64_C(0x0000000000000000), UINT64_C(0x3F0BE14A916A6DCB),
-		UINT64_C(0x7E17C29522D4DB96), UINT64_C(0x411C23DFB3BEB65D),
-		UINT64_C(0xFC2F852A45A9B72C), UINT64_C(0xC3246460D4C3DAE7),
-		UINT64_C(0x823847BF677D6CBA), UINT64_C(0xBD33A6F5F6170171),
-		UINT64_C(0x6A87A57F245D70DD), UINT64_C(0x558C4435B5371D16),
-		UINT64_C(0x149067EA0689AB4B), UINT64_C(0x2B9B86A097E3C680),
-		UINT64_C(0x96A8205561F4C7F1), UINT64_C(0xA9A3C11FF09EAA3A),
-		UINT64_C(0xE8BFE2C043201C67), UINT64_C(0xD7B4038AD24A71AC),
-		UINT64_C(0xD50F4AFE48BAE1BA), UINT64_C(0xEA04ABB4D9D08C71),
-		UINT64_C(0xAB18886B6A6E3A2C), UINT64_C(0x94136921FB0457E7),
-		UINT64_C(0x2920CFD40D135696), UINT64_C(0x162B2E9E9C793B5D),
-		UINT64_C(0x57370D412FC78D00), UINT64_C(0x683CEC0BBEADE0CB),
-		UINT64_C(0xBF88EF816CE79167), UINT64_C(0x80830ECBFD8DFCAC),
-		UINT64_C(0xC19F2D144E334AF1), UINT64_C(0xFE94CC5EDF59273A),
-		UINT64_C(0x43A76AAB294E264B), UINT64_C(0x7CAC8BE1B8244B80),
-		UINT64_C(0x3DB0A83E0B9AFDDD), UINT64_C(0x02BB49749AF09016),
-		UINT64_C(0x38C63AD73E7BDDF1), UINT64_C(0x07CDDB9DAF11B03A),
-		UINT64_C(0x46D1F8421CAF0667), UINT64_C(0x79DA19088DC56BAC),
-		UINT64_C(0xC4E9BFFD7BD26ADD), UINT64_C(0xFBE25EB7EAB80716),
-		UINT64_C(0xBAFE7D685906B14B), UINT64_C(0x85F59C22C86CDC80),
-		UINT64_C(0x52419FA81A26AD2C), UINT64_C(0x6D4A7EE28B4CC0E7),
-		UINT64_C(0x2C565D3D38F276BA), UINT64_C(0x135DBC77A9981B71),
-		UINT64_C(0xAE6E1A825F8F1A00), UINT64_C(0x9165FBC8CEE577CB),
-		UINT64_C(0xD079D8177D5BC196), UINT64_C(0xEF72395DEC31AC5D),
-		UINT64_C(0xEDC9702976C13C4B), UINT64_C(0xD2C29163E7AB5180),
-		UINT64_C(0x93DEB2BC5415E7DD), UINT64_C(0xACD553F6C57F8A16),
-		UINT64_C(0x11E6F50333688B67), UINT64_C(0x2EED1449A202E6AC),
-		UINT64_C(0x6FF1379611BC50F1), UINT64_C(0x50FAD6DC80D63D3A),
-		UINT64_C(0x874ED556529C4C96), UINT64_C(0xB845341CC3F6215D),
-		UINT64_C(0xF95917C370489700), UINT64_C(0xC652F689E122FACB),
-		UINT64_C(0x7B61507C1735FBBA), UINT64_C(0x446AB136865F9671),
-		UINT64_C(0x057692E935E1202C), UINT64_C(0x3A7D73A3A48B4DE7),
-		UINT64_C(0x718C75AE7CF7BBE2), UINT64_C(0x4E8794E4ED9DD629),
-		UINT64_C(0x0F9BB73B5E236074), UINT64_C(0x30905671CF490DBF),
-		UINT64_C(0x8DA3F084395E0CCE), UINT64_C(0xB2A811CEA8346105),
-		UINT64_C(0xF3B432111B8AD758), UINT64_C(0xCCBFD35B8AE0BA93),
-		UINT64_C(0x1B0BD0D158AACB3F), UINT64_C(0x2400319BC9C0A6F4),
-		UINT64_C(0x651C12447A7E10A9), UINT64_C(0x5A17F30EEB147D62),
-		UINT64_C(0xE72455FB1D037C13), UINT64_C(0xD82FB4B18C6911D8),
-		UINT64_C(0x9933976E3FD7A785), UINT64_C(0xA6387624AEBDCA4E),
-		UINT64_C(0xA4833F50344D5A58), UINT64_C(0x9B88DE1AA5273793),
-		UINT64_C(0xDA94FDC5169981CE), UINT64_C(0xE59F1C8F87F3EC05),
-		UINT64_C(0x58ACBA7A71E4ED74), UINT64_C(0x67A75B30E08E80BF),
-		UINT64_C(0x26BB78EF533036E2), UINT64_C(0x19B099A5C25A5B29),
-		UINT64_C(0xCE049A2F10102A85), UINT64_C(0xF10F7B65817A474E),
-		UINT64_C(0xB01358BA32C4F113), UINT64_C(0x8F18B9F0A3AE9CD8),
-		UINT64_C(0x322B1F0555B99DA9), UINT64_C(0x0D20FE4FC4D3F062),
-		UINT64_C(0x4C3CDD90776D463F), UINT64_C(0x73373CDAE6072BF4),
-		UINT64_C(0x494A4F79428C6613), UINT64_C(0x7641AE33D3E60BD8),
-		UINT64_C(0x375D8DEC6058BD85), UINT64_C(0x08566CA6F132D04E),
-		UINT64_C(0xB565CA530725D13F), UINT64_C(0x8A6E2B19964FBCF4),
-		UINT64_C(0xCB7208C625F10AA9), UINT64_C(0xF479E98CB49B6762),
-		UINT64_C(0x23CDEA0666D116CE), UINT64_C(0x1CC60B4CF7BB7B05),
-		UINT64_C(0x5DDA28934405CD58), UINT64_C(0x62D1C9D9D56FA093),
-		UINT64_C(0xDFE26F2C2378A1E2), UINT64_C(0xE0E98E66B212CC29),
-		UINT64_C(0xA1F5ADB901AC7A74), UINT64_C(0x9EFE4CF390C617BF),
-		UINT64_C(0x9C4505870A3687A9), UINT64_C(0xA34EE4CD9B5CEA62),
-		UINT64_C(0xE252C71228E25C3F), UINT64_C(0xDD592658B98831F4),
-		UINT64_C(0x606A80AD4F9F3085), UINT64_C(0x5F6161E7DEF55D4E),
-		UINT64_C(0x1E7D42386D4BEB13), UINT64_C(0x2176A372FC2186D8),
-		UINT64_C(0xF6C2A0F82E6BF774), UINT64_C(0xC9C941B2BF019ABF),
-		UINT64_C(0x88D5626D0CBF2CE2), UINT64_C(0xB7DE83279DD54129),
-		UINT64_C(0x0AED25D26BC24058), UINT64_C(0x35E6C498FAA82D93),
-		UINT64_C(0x74FAE74749169BCE), UINT64_C(0x4BF1060DD87CF605),
-		UINT64_C(0xE318EB5CF9EF77C4), UINT64_C(0xDC130A1668851A0F),
-		UINT64_C(0x9D0F29C9DB3BAC52), UINT64_C(0xA204C8834A51C199),
-		UINT64_C(0x1F376E76BC46C0E8), UINT64_C(0x203C8F3C2D2CAD23),
-		UINT64_C(0x6120ACE39E921B7E), UINT64_C(0x5E2B4DA90FF876B5),
-		UINT64_C(0x899F4E23DDB20719), UINT64_C(0xB694AF694CD86AD2),
-		UINT64_C(0xF7888CB6FF66DC8F), UINT64_C(0xC8836DFC6E0CB144),
-		UINT64_C(0x75B0CB09981BB035), UINT64_C(0x4ABB2A430971DDFE),
-		UINT64_C(0x0BA7099CBACF6BA3), UINT64_C(0x34ACE8D62BA50668),
-		UINT64_C(0x3617A1A2B155967E), UINT64_C(0x091C40E8203FFBB5),
-		UINT64_C(0x4800633793814DE8), UINT64_C(0x770B827D02EB2023),
-		UINT64_C(0xCA382488F4FC2152), UINT64_C(0xF533C5C265964C99),
-		UINT64_C(0xB42FE61DD628FAC4), UINT64_C(0x8B2407574742970F),
-		UINT64_C(0x5C9004DD9508E6A3), UINT64_C(0x639BE59704628B68),
-		UINT64_C(0x2287C648B7DC3D35), UINT64_C(0x1D8C270226B650FE),
-		UINT64_C(0xA0BF81F7D0A1518F), UINT64_C(0x9FB460BD41CB3C44),
-		UINT64_C(0xDEA84362F2758A19), UINT64_C(0xE1A3A228631FE7D2),
-		UINT64_C(0xDBDED18BC794AA35), UINT64_C(0xE4D530C156FEC7FE),
-		UINT64_C(0xA5C9131EE54071A3), UINT64_C(0x9AC2F254742A1C68),
-		UINT64_C(0x27F154A1823D1D19), UINT64_C(0x18FAB5EB135770D2),
-		UINT64_C(0x59E69634A0E9C68F), UINT64_C(0x66ED777E3183AB44),
-		UINT64_C(0xB15974F4E3C9DAE8), UINT64_C(0x8E5295BE72A3B723),
-		UINT64_C(0xCF4EB661C11D017E), UINT64_C(0xF045572B50776CB5),
-		UINT64_C(0x4D76F1DEA6606DC4), UINT64_C(0x727D1094370A000F),
-		UINT64_C(0x3361334B84B4B652), UINT64_C(0x0C6AD20115DEDB99),
-		UINT64_C(0x0ED19B758F2E4B8F), UINT64_C(0x31DA7A3F1E442644),
-		UINT64_C(0x70C659E0ADFA9019), UINT64_C(0x4FCDB8AA3C90FDD2),
-		UINT64_C(0xF2FE1E5FCA87FCA3), UINT64_C(0xCDF5FF155BED9168),
-		UINT64_C(0x8CE9DCCAE8532735), UINT64_C(0xB3E23D8079394AFE),
-		UINT64_C(0x64563E0AAB733B52), UINT64_C(0x5B5DDF403A195699),
-		UINT64_C(0x1A41FC9F89A7E0C4), UINT64_C(0x254A1DD518CD8D0F),
-		UINT64_C(0x9879BB20EEDA8C7E), UINT64_C(0xA7725A6A7FB0E1B5),
-		UINT64_C(0xE66E79B5CC0E57E8), UINT64_C(0xD96598FF5D643A23),
-		UINT64_C(0x92949EF28518CC26), UINT64_C(0xAD9F7FB81472A1ED),
-		UINT64_C(0xEC835C67A7CC17B0), UINT64_C(0xD388BD2D36A67A7B),
-		UINT64_C(0x6EBB1BD8C0B17B0A), UINT64_C(0x51B0FA9251DB16C1),
-		UINT64_C(0x10ACD94DE265A09C), UINT64_C(0x2FA73807730FCD57),
-		UINT64_C(0xF8133B8DA145BCFB), UINT64_C(0xC718DAC7302FD130),
-		UINT64_C(0x8604F9188391676D), UINT64_C(0xB90F185212FB0AA6),
-		UINT64_C(0x043CBEA7E4EC0BD7), UINT64_C(0x3B375FED7586661C),
-		UINT64_C(0x7A2B7C32C638D041), UINT64_C(0x45209D785752BD8A),
-		UINT64_C(0x479BD40CCDA22D9C), UINT64_C(0x789035465CC84057),
-		UINT64_C(0x398C1699EF76F60A), UINT64_C(0x0687F7D37E1C9BC1),
-		UINT64_C(0xBBB45126880B9AB0), UINT64_C(0x84BFB06C1961F77B),
-		UINT64_C(0xC5A393B3AADF4126), UINT64_C(0xFAA872F93BB52CED),
-		UINT64_C(0x2D1C7173E9FF5D41), UINT64_C(0x121790397895308A),
-		UINT64_C(0x530BB3E6CB2B86D7), UINT64_C(0x6C0052AC5A41EB1C),
-		UINT64_C(0xD133F459AC56EA6D), UINT64_C(0xEE3815133D3C87A6),
-		UINT64_C(0xAF2436CC8E8231FB), UINT64_C(0x902FD7861FE85C30),
-		UINT64_C(0xAA52A425BB6311D7), UINT64_C(0x9559456F2A097C1C),
-		UINT64_C(0xD44566B099B7CA41), UINT64_C(0xEB4E87FA08DDA78A),
-		UINT64_C(0x567D210FFECAA6FB), UINT64_C(0x6976C0456FA0CB30),
-		UINT64_C(0x286AE39ADC1E7D6D), UINT64_C(0x176102D04D7410A6),
-		UINT64_C(0xC0D5015A9F3E610A), UINT64_C(0xFFDEE0100E540CC1),
-		UINT64_C(0xBEC2C3CFBDEABA9C), UINT64_C(0x81C922852C80D757),
-		UINT64_C(0x3CFA8470DA97D626), UINT64_C(0x03F1653A4BFDBBED),
-		UINT64_C(0x42ED46E5F8430DB0), UINT64_C(0x7DE6A7AF6929607B),
-		UINT64_C(0x7F5DEEDBF3D9F06D), UINT64_C(0x40560F9162B39DA6),
-		UINT64_C(0x014A2C4ED10D2BFB), UINT64_C(0x3E41CD0440674630),
-		UINT64_C(0x83726BF1B6704741), UINT64_C(0xBC798ABB271A2A8A),
-		UINT64_C(0xFD65A96494A49CD7), UINT64_C(0xC26E482E05CEF11C),
-		UINT64_C(0x15DA4BA4D78480B0), UINT64_C(0x2AD1AAEE46EEED7B),
-		UINT64_C(0x6BCD8931F5505B26), UINT64_C(0x54C6687B643A36ED),
-		UINT64_C(0xE9F5CE8E922D379C), UINT64_C(0xD6FE2FC403475A57),
-		UINT64_C(0x97E20C1BB0F9EC0A), UINT64_C(0xA8E9ED51219381C1)
-	}, {
-		UINT64_C(0x0000000000000000), UINT64_C(0x1DEE8A5E222CA1DC),
-		UINT64_C(0x3BDD14BC445943B8), UINT64_C(0x26339EE26675E264),
-		UINT64_C(0x77BA297888B28770), UINT64_C(0x6A54A326AA9E26AC),
-		UINT64_C(0x4C673DC4CCEBC4C8), UINT64_C(0x5189B79AEEC76514),
-		UINT64_C(0xEF7452F111650EE0), UINT64_C(0xF29AD8AF3349AF3C),
-		UINT64_C(0xD4A9464D553C4D58), UINT64_C(0xC947CC137710EC84),
-		UINT64_C(0x98CE7B8999D78990), UINT64_C(0x8520F1D7BBFB284C),
-		UINT64_C(0xA3136F35DD8ECA28), UINT64_C(0xBEFDE56BFFA26BF4),
-		UINT64_C(0x4C300AC98DC40345), UINT64_C(0x51DE8097AFE8A299),
-		UINT64_C(0x77ED1E75C99D40FD), UINT64_C(0x6A03942BEBB1E121),
-		UINT64_C(0x3B8A23B105768435), UINT64_C(0x2664A9EF275A25E9),
-		UINT64_C(0x0057370D412FC78D), UINT64_C(0x1DB9BD5363036651),
-		UINT64_C(0xA34458389CA10DA5), UINT64_C(0xBEAAD266BE8DAC79),
-		UINT64_C(0x98994C84D8F84E1D), UINT64_C(0x8577C6DAFAD4EFC1),
-		UINT64_C(0xD4FE714014138AD5), UINT64_C(0xC910FB1E363F2B09),
-		UINT64_C(0xEF2365FC504AC96D), UINT64_C(0xF2CDEFA2726668B1),
-		UINT64_C(0x986015931B88068A), UINT64_C(0x858E9FCD39A4A756),
-		UINT64_C(0xA3BD012F5FD14532), UINT64_C(0xBE538B717DFDE4EE),
-		UINT64_C(0xEFDA3CEB933A81FA), UINT64_C(0xF234B6B5B1162026),
-		UINT64_C(0xD4072857D763C242), UINT64_C(0xC9E9A209F54F639E),
-		UINT64_C(0x771447620AED086A), UINT64_C(0x6AFACD3C28C1A9B6),
-		UINT64_C(0x4CC953DE4EB44BD2), UINT64_C(0x5127D9806C98EA0E),
-		UINT64_C(0x00AE6E1A825F8F1A), UINT64_C(0x1D40E444A0732EC6),
-		UINT64_C(0x3B737AA6C606CCA2), UINT64_C(0x269DF0F8E42A6D7E),
-		UINT64_C(0xD4501F5A964C05CF), UINT64_C(0xC9BE9504B460A413),
-		UINT64_C(0xEF8D0BE6D2154677), UINT64_C(0xF26381B8F039E7AB),
-		UINT64_C(0xA3EA36221EFE82BF), UINT64_C(0xBE04BC7C3CD22363),
-		UINT64_C(0x9837229E5AA7C107), UINT64_C(0x85D9A8C0788B60DB),
-		UINT64_C(0x3B244DAB87290B2F), UINT64_C(0x26CAC7F5A505AAF3),
-		UINT64_C(0x00F95917C3704897), UINT64_C(0x1D17D349E15CE94B),
-		UINT64_C(0x4C9E64D30F9B8C5F), UINT64_C(0x5170EE8D2DB72D83),
-		UINT64_C(0x7743706F4BC2CFE7), UINT64_C(0x6AADFA3169EE6E3B),
-		UINT64_C(0xA218840D981E1391), UINT64_C(0xBFF60E53BA32B24D),
-		UINT64_C(0x99C590B1DC475029), UINT64_C(0x842B1AEFFE6BF1F5),
-		UINT64_C(0xD5A2AD7510AC94E1), UINT64_C(0xC84C272B3280353D),
-		UINT64_C(0xEE7FB9C954F5D759), UINT64_C(0xF391339776D97685),
-		UINT64_C(0x4D6CD6FC897B1D71), UINT64_C(0x50825CA2AB57BCAD),
-		UINT64_C(0x76B1C240CD225EC9), UINT64_C(0x6B5F481EEF0EFF15),
-		UINT64_C(0x3AD6FF8401C99A01), UINT64_C(0x273875DA23E53BDD),
-		UINT64_C(0x010BEB384590D9B9), UINT64_C(0x1CE5616667BC7865),
-		UINT64_C(0xEE288EC415DA10D4), UINT64_C(0xF3C6049A37F6B108),
-		UINT64_C(0xD5F59A785183536C), UINT64_C(0xC81B102673AFF2B0),
-		UINT64_C(0x9992A7BC9D6897A4), UINT64_C(0x847C2DE2BF443678),
-		UINT64_C(0xA24FB300D931D41C), UINT64_C(0xBFA1395EFB1D75C0),
-		UINT64_C(0x015CDC3504BF1E34), UINT64_C(0x1CB2566B2693BFE8),
-		UINT64_C(0x3A81C88940E65D8C), UINT64_C(0x276F42D762CAFC50),
-		UINT64_C(0x76E6F54D8C0D9944), UINT64_C(0x6B087F13AE213898),
-		UINT64_C(0x4D3BE1F1C854DAFC), UINT64_C(0x50D56BAFEA787B20),
-		UINT64_C(0x3A78919E8396151B), UINT64_C(0x27961BC0A1BAB4C7),
-		UINT64_C(0x01A58522C7CF56A3), UINT64_C(0x1C4B0F7CE5E3F77F),
-		UINT64_C(0x4DC2B8E60B24926B), UINT64_C(0x502C32B8290833B7),
-		UINT64_C(0x761FAC5A4F7DD1D3), UINT64_C(0x6BF126046D51700F),
-		UINT64_C(0xD50CC36F92F31BFB), UINT64_C(0xC8E24931B0DFBA27),
-		UINT64_C(0xEED1D7D3D6AA5843), UINT64_C(0xF33F5D8DF486F99F),
-		UINT64_C(0xA2B6EA171A419C8B), UINT64_C(0xBF586049386D3D57),
-		UINT64_C(0x996BFEAB5E18DF33), UINT64_C(0x848574F57C347EEF),
-		UINT64_C(0x76489B570E52165E), UINT64_C(0x6BA611092C7EB782),
-		UINT64_C(0x4D958FEB4A0B55E6), UINT64_C(0x507B05B56827F43A),
-		UINT64_C(0x01F2B22F86E0912E), UINT64_C(0x1C1C3871A4CC30F2),
-		UINT64_C(0x3A2FA693C2B9D296), UINT64_C(0x27C12CCDE095734A),
-		UINT64_C(0x993CC9A61F3718BE), UINT64_C(0x84D243F83D1BB962),
-		UINT64_C(0xA2E1DD1A5B6E5B06), UINT64_C(0xBF0F57447942FADA),
-		UINT64_C(0xEE86E0DE97859FCE), UINT64_C(0xF3686A80B5A93E12),
-		UINT64_C(0xD55BF462D3DCDC76), UINT64_C(0xC8B57E3CF1F07DAA),
-		UINT64_C(0xD6E9A7309F3239A7), UINT64_C(0xCB072D6EBD1E987B),
-		UINT64_C(0xED34B38CDB6B7A1F), UINT64_C(0xF0DA39D2F947DBC3),
-		UINT64_C(0xA1538E481780BED7), UINT64_C(0xBCBD041635AC1F0B),
-		UINT64_C(0x9A8E9AF453D9FD6F), UINT64_C(0x876010AA71F55CB3),
-		UINT64_C(0x399DF5C18E573747), UINT64_C(0x24737F9FAC7B969B),
-		UINT64_C(0x0240E17DCA0E74FF), UINT64_C(0x1FAE6B23E822D523),
-		UINT64_C(0x4E27DCB906E5B037), UINT64_C(0x53C956E724C911EB),
-		UINT64_C(0x75FAC80542BCF38F), UINT64_C(0x6814425B60905253),
-		UINT64_C(0x9AD9ADF912F63AE2), UINT64_C(0x873727A730DA9B3E),
-		UINT64_C(0xA104B94556AF795A), UINT64_C(0xBCEA331B7483D886),
-		UINT64_C(0xED6384819A44BD92), UINT64_C(0xF08D0EDFB8681C4E),
-		UINT64_C(0xD6BE903DDE1DFE2A), UINT64_C(0xCB501A63FC315FF6),
-		UINT64_C(0x75ADFF0803933402), UINT64_C(0x6843755621BF95DE),
-		UINT64_C(0x4E70EBB447CA77BA), UINT64_C(0x539E61EA65E6D666),
-		UINT64_C(0x0217D6708B21B372), UINT64_C(0x1FF95C2EA90D12AE),
-		UINT64_C(0x39CAC2CCCF78F0CA), UINT64_C(0x24244892ED545116),
-		UINT64_C(0x4E89B2A384BA3F2D), UINT64_C(0x536738FDA6969EF1),
-		UINT64_C(0x7554A61FC0E37C95), UINT64_C(0x68BA2C41E2CFDD49),
-		UINT64_C(0x39339BDB0C08B85D), UINT64_C(0x24DD11852E241981),
-		UINT64_C(0x02EE8F674851FBE5), UINT64_C(0x1F0005396A7D5A39),
-		UINT64_C(0xA1FDE05295DF31CD), UINT64_C(0xBC136A0CB7F39011),
-		UINT64_C(0x9A20F4EED1867275), UINT64_C(0x87CE7EB0F3AAD3A9),
-		UINT64_C(0xD647C92A1D6DB6BD), UINT64_C(0xCBA943743F411761),
-		UINT64_C(0xED9ADD965934F505), UINT64_C(0xF07457C87B1854D9),
-		UINT64_C(0x02B9B86A097E3C68), UINT64_C(0x1F5732342B529DB4),
-		UINT64_C(0x3964ACD64D277FD0), UINT64_C(0x248A26886F0BDE0C),
-		UINT64_C(0x7503911281CCBB18), UINT64_C(0x68ED1B4CA3E01AC4),
-		UINT64_C(0x4EDE85AEC595F8A0), UINT64_C(0x53300FF0E7B9597C),
-		UINT64_C(0xEDCDEA9B181B3288), UINT64_C(0xF02360C53A379354),
-		UINT64_C(0xD610FE275C427130), UINT64_C(0xCBFE74797E6ED0EC),
-		UINT64_C(0x9A77C3E390A9B5F8), UINT64_C(0x879949BDB2851424),
-		UINT64_C(0xA1AAD75FD4F0F640), UINT64_C(0xBC445D01F6DC579C),
-		UINT64_C(0x74F1233D072C2A36), UINT64_C(0x691FA96325008BEA),
-		UINT64_C(0x4F2C37814375698E), UINT64_C(0x52C2BDDF6159C852),
-		UINT64_C(0x034B0A458F9EAD46), UINT64_C(0x1EA5801BADB20C9A),
-		UINT64_C(0x38961EF9CBC7EEFE), UINT64_C(0x257894A7E9EB4F22),
-		UINT64_C(0x9B8571CC164924D6), UINT64_C(0x866BFB923465850A),
-		UINT64_C(0xA05865705210676E), UINT64_C(0xBDB6EF2E703CC6B2),
-		UINT64_C(0xEC3F58B49EFBA3A6), UINT64_C(0xF1D1D2EABCD7027A),
-		UINT64_C(0xD7E24C08DAA2E01E), UINT64_C(0xCA0CC656F88E41C2),
-		UINT64_C(0x38C129F48AE82973), UINT64_C(0x252FA3AAA8C488AF),
-		UINT64_C(0x031C3D48CEB16ACB), UINT64_C(0x1EF2B716EC9DCB17),
-		UINT64_C(0x4F7B008C025AAE03), UINT64_C(0x52958AD220760FDF),
-		UINT64_C(0x74A614304603EDBB), UINT64_C(0x69489E6E642F4C67),
-		UINT64_C(0xD7B57B059B8D2793), UINT64_C(0xCA5BF15BB9A1864F),
-		UINT64_C(0xEC686FB9DFD4642B), UINT64_C(0xF186E5E7FDF8C5F7),
-		UINT64_C(0xA00F527D133FA0E3), UINT64_C(0xBDE1D8233113013F),
-		UINT64_C(0x9BD246C15766E35B), UINT64_C(0x863CCC9F754A4287),
-		UINT64_C(0xEC9136AE1CA42CBC), UINT64_C(0xF17FBCF03E888D60),
-		UINT64_C(0xD74C221258FD6F04), UINT64_C(0xCAA2A84C7AD1CED8),
-		UINT64_C(0x9B2B1FD69416ABCC), UINT64_C(0x86C59588B63A0A10),
-		UINT64_C(0xA0F60B6AD04FE874), UINT64_C(0xBD188134F26349A8),
-		UINT64_C(0x03E5645F0DC1225C), UINT64_C(0x1E0BEE012FED8380),
-		UINT64_C(0x383870E3499861E4), UINT64_C(0x25D6FABD6BB4C038),
-		UINT64_C(0x745F4D278573A52C), UINT64_C(0x69B1C779A75F04F0),
-		UINT64_C(0x4F82599BC12AE694), UINT64_C(0x526CD3C5E3064748),
-		UINT64_C(0xA0A13C6791602FF9), UINT64_C(0xBD4FB639B34C8E25),
-		UINT64_C(0x9B7C28DBD5396C41), UINT64_C(0x8692A285F715CD9D),
-		UINT64_C(0xD71B151F19D2A889), UINT64_C(0xCAF59F413BFE0955),
-		UINT64_C(0xECC601A35D8BEB31), UINT64_C(0xF1288BFD7FA74AED),
-		UINT64_C(0x4FD56E9680052119), UINT64_C(0x523BE4C8A22980C5),
-		UINT64_C(0x74087A2AC45C62A1), UINT64_C(0x69E6F074E670C37D),
-		UINT64_C(0x386F47EE08B7A669), UINT64_C(0x2581CDB02A9B07B5),
-		UINT64_C(0x03B253524CEEE5D1), UINT64_C(0x1E5CD90C6EC2440D)
-	}
-};
diff --git a/src/extra/xz/check/crc64_tablegen.c b/src/extra/xz/check/crc64_tablegen.c
deleted file mode 100644
index fddaa7e..0000000
--- a/src/extra/xz/check/crc64_tablegen.c
+++ /dev/null
@@ -1,88 +0,0 @@
-///////////////////////////////////////////////////////////////////////////////
-//
-/// \file       crc64_tablegen.c
-/// \brief      Generate crc64_table_le.h and crc64_table_be.h
-///
-/// Compiling: gcc -std=c99 -o crc64_tablegen crc64_tablegen.c
-/// Add -DWORDS_BIGENDIAN to generate big endian table.
-//
-//  Author:     Lasse Collin
-//
-//  This file has been put into the public domain.
-//  You can do whatever you want with this file.
-//
-///////////////////////////////////////////////////////////////////////////////
-
-#include <stdio.h>
-#include "../../common/tuklib_integer.h"
-
-
-static uint64_t crc64_table[4][256];
-
-
-extern void
-init_crc64_table(void)
-{
-	static const uint64_t poly64 = UINT64_C(0xC96C5795D7870F42);
-
-	for (size_t s = 0; s < 4; ++s) {
-		for (size_t b = 0; b < 256; ++b) {
-			uint64_t r = s == 0 ? b : crc64_table[s - 1][b];
-
-			for (size_t i = 0; i < 8; ++i) {
-				if (r & 1)
-					r = (r >> 1) ^ poly64;
-				else
-					r >>= 1;
-			}
-
-			crc64_table[s][b] = r;
-		}
-	}
-
-#ifdef WORDS_BIGENDIAN
-	for (size_t s = 0; s < 4; ++s)
-		for (size_t b = 0; b < 256; ++b)
-			crc64_table[s][b] = bswap64(crc64_table[s][b]);
-#endif
-
-	return;
-}
-
-
-static void
-print_crc64_table(void)
-{
-	printf("/* This file has been automatically generated by "
-			"crc64_tablegen.c. */\n\n"
-			"const uint64_t lzma_crc64_table[4][256] = {\n\t{");
-
-	for (size_t s = 0; s < 4; ++s) {
-		for (size_t b = 0; b < 256; ++b) {
-			if ((b % 2) == 0)
-				printf("\n\t\t");
-
-			printf("UINT64_C(0x%016" PRIX64 ")",
-					crc64_table[s][b]);
-
-			if (b != 255)
-				printf(",%s", (b+1) % 2 == 0 ? "" : " ");
-		}
-
-		if (s == 3)
-			printf("\n\t}\n};\n");
-		else
-			printf("\n\t}, {");
-	}
-
-	return;
-}
-
-
-int
-main(void)
-{
-	init_crc64_table();
-	print_crc64_table();
-	return 0;
-}
diff --git a/src/extra/xz/check/crc64_x86.S b/src/extra/xz/check/crc64_x86.S
deleted file mode 100644
index f5bb84b..0000000
--- a/src/extra/xz/check/crc64_x86.S
+++ /dev/null
@@ -1,287 +0,0 @@
-/*
- * Speed-optimized CRC64 using slicing-by-four algorithm
- *
- * This uses only i386 instructions, but it is optimized for i686 and later
- * (including e.g. Pentium II/III/IV, Athlon XP, and Core 2).
- *
- * Authors: Igor Pavlov (original CRC32 assembly code)
- *          Lasse Collin (CRC64 adaptation of the modified CRC32 code)
- *
- * This file has been put into the public domain.
- * You can do whatever you want with this file.
- *
- * This code needs lzma_crc64_table, which can be created using the
- * following C code:
-
-uint64_t lzma_crc64_table[4][256];
-
-void
-init_table(void)
-{
-	// ECMA-182
-	static const uint64_t poly64 = UINT64_C(0xC96C5795D7870F42);
-
-	for (size_t s = 0; s < 4; ++s) {
-		for (size_t b = 0; b < 256; ++b) {
-			uint64_t r = s == 0 ? b : lzma_crc64_table[s - 1][b];
-
-			for (size_t i = 0; i < 8; ++i) {
-				if (r & 1)
-					r = (r >> 1) ^ poly64;
-				else
-					r >>= 1;
-			}
-
-			lzma_crc64_table[s][b] = r;
-		}
-	}
-}
-
- * The prototype of the CRC64 function:
- * extern uint64_t lzma_crc64(const uint8_t *buf, size_t size, uint64_t crc);
- */
-
-/*
- * On some systems, the functions need to be prefixed. The prefix is
- * usually an underscore.
- */
-#ifndef __USER_LABEL_PREFIX__
-#	define __USER_LABEL_PREFIX__
-#endif
-#define MAKE_SYM_CAT(prefix, sym) prefix ## sym
-#define MAKE_SYM(prefix, sym) MAKE_SYM_CAT(prefix, sym)
-#define LZMA_CRC64 MAKE_SYM(__USER_LABEL_PREFIX__, lzma_crc64)
-#define LZMA_CRC64_TABLE MAKE_SYM(__USER_LABEL_PREFIX__, lzma_crc64_table)
-
-/*
- * Solaris assembler doesn't have .p2align, and Darwin uses .align
- * differently than GNU/Linux and Solaris.
- */
-#if defined(__APPLE__) || defined(__MSDOS__)
-#	define ALIGN(pow2, abs) .align pow2
-#else
-#	define ALIGN(pow2, abs) .align abs
-#endif
-
-	.text
-	.globl	LZMA_CRC64
-
-#if !defined(__APPLE__) && !defined(_WIN32) && !defined(__CYGWIN__) \
-		&& !defined(__MSDOS__)
-	.type	LZMA_CRC64, @function
-#endif
-
-	ALIGN(4, 16)
-LZMA_CRC64:
-	/*
-	 * Register usage:
-	 * %eax crc LSB
-	 * %edx crc MSB
-	 * %esi buf
-	 * %edi size or buf + size
-	 * %ebx lzma_crc64_table
-	 * %ebp Table index
-	 * %ecx Temporary
-	 */
-	pushl	%ebx
-	pushl	%esi
-	pushl	%edi
-	pushl	%ebp
-	movl	0x14(%esp), %esi /* buf */
-	movl	0x18(%esp), %edi /* size */
-	movl	0x1C(%esp), %eax /* crc LSB */
-	movl	0x20(%esp), %edx /* crc MSB */
-
-	/*
-	 * Store the address of lzma_crc64_table to %ebx. This is needed to
-	 * get position-independent code (PIC).
-	 *
-	 * The PIC macro is defined by libtool, while __PIC__ is defined
-	 * by GCC but only on some systems. Testing for both makes it simpler
-	 * to test this code without libtool, and keeps the code working also
-	 * when built with libtool but using something else than GCC.
-	 *
-	 * I understood that libtool may define PIC on Windows even though
-	 * the code in Windows DLLs is not PIC in sense that it is in ELF
-	 * binaries, so we need a separate check to always use the non-PIC
-	 * code on Windows.
-	 */
-#if (!defined(PIC) && !defined(__PIC__)) \
-		|| (defined(_WIN32) || defined(__CYGWIN__))
-	/* Not PIC */
-	movl	$ LZMA_CRC64_TABLE, %ebx
-#elif defined(__APPLE__)
-	/* Mach-O */
-	call	.L_get_pc
-.L_pic:
-	leal	.L_lzma_crc64_table$non_lazy_ptr-.L_pic(%ebx), %ebx
-	movl	(%ebx), %ebx
-#else
-	/* ELF */
-	call	.L_get_pc
-	addl	$_GLOBAL_OFFSET_TABLE_, %ebx
-	movl	LZMA_CRC64_TABLE at GOT(%ebx), %ebx
-#endif
-
-	/* Complement the initial value. */
-	notl	%eax
-	notl	%edx
-
-.L_align:
-	/*
-	 * Check if there is enough input to use slicing-by-four.
-	 * We need eight bytes, because the loop pre-reads four bytes.
-	 */
-	cmpl	$8, %edi
-	jb	.L_rest
-
-	/* Check if we have reached alignment of four bytes. */
-	testl	$3, %esi
-	jz	.L_slice
-
-	/* Calculate CRC of the next input byte. */
-	movzbl	(%esi), %ebp
-	incl	%esi
-	movzbl	%al, %ecx
-	xorl	%ecx, %ebp
-	shrdl	$8, %edx, %eax
-	xorl	(%ebx, %ebp, 8), %eax
-	shrl	$8, %edx
-	xorl	4(%ebx, %ebp, 8), %edx
-	decl	%edi
-	jmp	.L_align
-
-.L_slice:
-	/*
-	 * If we get here, there's at least eight bytes of aligned input
-	 * available. Make %edi multiple of four bytes. Store the possible
-	 * remainder over the "size" variable in the argument stack.
-	 */
-	movl	%edi, 0x18(%esp)
-	andl	$-4, %edi
-	subl	%edi, 0x18(%esp)
-
-	/*
-	 * Let %edi be buf + size - 4 while running the main loop. This way
-	 * we can compare for equality to determine when exit the loop.
-	 */
-	addl	%esi, %edi
-	subl	$4, %edi
-
-	/* Read in the first four aligned bytes. */
-	movl	(%esi), %ecx
-
-.L_loop:
-	xorl	%eax, %ecx
-	movzbl	%cl, %ebp
-	movl	0x1800(%ebx, %ebp, 8), %eax
-	xorl	%edx, %eax
-	movl	0x1804(%ebx, %ebp, 8), %edx
-	movzbl	%ch, %ebp
-	xorl	0x1000(%ebx, %ebp, 8), %eax
-	xorl	0x1004(%ebx, %ebp, 8), %edx
-	shrl	$16, %ecx
-	movzbl	%cl, %ebp
-	xorl	0x0800(%ebx, %ebp, 8), %eax
-	xorl	0x0804(%ebx, %ebp, 8), %edx
-	movzbl	%ch, %ebp
-	addl	$4, %esi
-	xorl	(%ebx, %ebp, 8), %eax
-	xorl	4(%ebx, %ebp, 8), %edx
-
-	/* Check for end of aligned input. */
-	cmpl	%edi, %esi
-
-	/*
-	 * Copy the next input byte to %ecx. It is slightly faster to
-	 * read it here than at the top of the loop.
-	 */
-	movl	(%esi), %ecx
-	jb	.L_loop
-
-	/*
-	 * Process the remaining four bytes, which we have already
-	 * copied to %ecx.
-	 */
-	xorl	%eax, %ecx
-	movzbl	%cl, %ebp
-	movl	0x1800(%ebx, %ebp, 8), %eax
-	xorl	%edx, %eax
-	movl	0x1804(%ebx, %ebp, 8), %edx
-	movzbl	%ch, %ebp
-	xorl	0x1000(%ebx, %ebp, 8), %eax
-	xorl	0x1004(%ebx, %ebp, 8), %edx
-	shrl	$16, %ecx
-	movzbl	%cl, %ebp
-	xorl	0x0800(%ebx, %ebp, 8), %eax
-	xorl	0x0804(%ebx, %ebp, 8), %edx
-	movzbl	%ch, %ebp
-	addl	$4, %esi
-	xorl	(%ebx, %ebp, 8), %eax
-	xorl	4(%ebx, %ebp, 8), %edx
-
-	/* Copy the number of remaining bytes to %edi. */
-	movl	0x18(%esp), %edi
-
-.L_rest:
-	/* Check for end of input. */
-	testl	%edi, %edi
-	jz	.L_return
-
-	/* Calculate CRC of the next input byte. */
-	movzbl	(%esi), %ebp
-	incl	%esi
-	movzbl	%al, %ecx
-	xorl	%ecx, %ebp
-	shrdl	$8, %edx, %eax
-	xorl	(%ebx, %ebp, 8), %eax
-	shrl	$8, %edx
-	xorl	4(%ebx, %ebp, 8), %edx
-	decl	%edi
-	jmp	.L_rest
-
-.L_return:
-	/* Complement the final value. */
-	notl	%eax
-	notl	%edx
-
-	popl	%ebp
-	popl	%edi
-	popl	%esi
-	popl	%ebx
-	ret
-
-#if defined(PIC) || defined(__PIC__)
-	ALIGN(4, 16)
-.L_get_pc:
-	movl	(%esp), %ebx
-	ret
-#endif
-
-#if defined(__APPLE__) && (defined(PIC) || defined(__PIC__))
-	/* Mach-O PIC */
-	.section __IMPORT,__pointers,non_lazy_symbol_pointers
-.L_lzma_crc64_table$non_lazy_ptr:
-	.indirect_symbol LZMA_CRC64_TABLE
-	.long 0
-
-#elif defined(_WIN32) || defined(__CYGWIN__)
-#	ifdef DLL_EXPORT
-	/* This is equivalent of __declspec(dllexport). */
-	.section .drectve
-	.ascii " -export:lzma_crc64"
-#	endif
-
-#elif !defined(__MSDOS__)
-	/* ELF */
-	.size	LZMA_CRC64, .-LZMA_CRC64
-#endif
-
-/*
- * This is needed to support non-executable stack. It's ugly to
- * use __linux__ here, but I don't know a way to detect when
- * we are using GNU assembler.
- */
-#if defined(__ELF__) && defined(__linux__)
-	.section	.note.GNU-stack,"", at progbits
-#endif
diff --git a/src/extra/xz/check/crc_macros.h b/src/extra/xz/check/crc_macros.h
deleted file mode 100644
index 84acdf1..0000000
--- a/src/extra/xz/check/crc_macros.h
+++ /dev/null
@@ -1,32 +0,0 @@
-///////////////////////////////////////////////////////////////////////////////
-//
-/// \file       crc_macros.h
-/// \brief      Some endian-dependent macros for CRC32 and CRC64
-//
-//  Author:     Lasse Collin
-//
-//  This file has been put into the public domain.
-//  You can do whatever you want with this file.
-//
-///////////////////////////////////////////////////////////////////////////////
-
-#ifdef WORDS_BIGENDIAN
-#	include "bswap.h"
-
-#	define A(x) ((x) >> 24)
-#	define B(x) (((x) >> 16) & 0xFF)
-#	define C(x) (((x) >> 8) & 0xFF)
-#	define D(x) ((x) & 0xFF)
-
-#	define S8(x) ((x) << 8)
-#	define S32(x) ((x) << 32)
-
-#else
-#	define A(x) ((x) & 0xFF)
-#	define B(x) (((x) >> 8) & 0xFF)
-#	define C(x) (((x) >> 16) & 0xFF)
-#	define D(x) ((x) >> 24)
-
-#	define S8(x) ((x) >> 8)
-#	define S32(x) ((x) >> 32)
-#endif
diff --git a/src/extra/xz/check/sha256.c b/src/extra/xz/check/sha256.c
deleted file mode 100644
index 23bda92..0000000
--- a/src/extra/xz/check/sha256.c
+++ /dev/null
@@ -1,200 +0,0 @@
-///////////////////////////////////////////////////////////////////////////////
-//
-/// \file       sha256.c
-/// \brief      SHA-256
-///
-/// \todo       Crypto++ has x86 ASM optimizations. They use SSE so if they
-///             are imported to liblzma, SSE instructions need to be used
-///             conditionally to keep the code working on older boxes.
-//
-//  This code is based on the code found from 7-Zip, which has a modified
-//  version of the SHA-256 found from Crypto++ <http://www.cryptopp.com/>.
-//  The code was modified a little to fit into liblzma.
-//
-//  Authors:    Kevin Springle
-//              Wei Dai
-//              Igor Pavlov
-//              Lasse Collin
-//
-//  This file has been put into the public domain.
-//  You can do whatever you want with this file.
-//
-///////////////////////////////////////////////////////////////////////////////
-
-// Avoid bogus warnings in transform().
-#if (__GNUC__ == 4 && __GNUC_MINOR__ >= 2) || __GNUC__ > 4
-#	pragma GCC diagnostic ignored "-Wuninitialized"
-#endif
-
-#include "check.h"
-
-// At least on x86, GCC is able to optimize this to a rotate instruction.
-#define rotr_32(num, amount) ((num) >> (amount) | (num) << (32 - (amount)))
-
-#define blk0(i) (W[i] = data[i])
-#define blk2(i) (W[i & 15] += s1(W[(i - 2) & 15]) + W[(i - 7) & 15] \
-		+ s0(W[(i - 15) & 15]))
-
-#define Ch(x, y, z) (z ^ (x & (y ^ z)))
-#define Maj(x, y, z) ((x & y) | (z & (x | y)))
-
-#define a(i) T[(0 - i) & 7]
-#define b(i) T[(1 - i) & 7]
-#define c(i) T[(2 - i) & 7]
-#define d(i) T[(3 - i) & 7]
-#define e(i) T[(4 - i) & 7]
-#define f(i) T[(5 - i) & 7]
-#define g(i) T[(6 - i) & 7]
-#define h(i) T[(7 - i) & 7]
-
-#define R(i) \
-	h(i) += S1(e(i)) + Ch(e(i), f(i), g(i)) + SHA256_K[i + j] \
-		+ (j ? blk2(i) : blk0(i)); \
-	d(i) += h(i); \
-	h(i) += S0(a(i)) + Maj(a(i), b(i), c(i))
-
-#define S0(x) (rotr_32(x, 2) ^ rotr_32(x, 13) ^ rotr_32(x, 22))
-#define S1(x) (rotr_32(x, 6) ^ rotr_32(x, 11) ^ rotr_32(x, 25))
-#define s0(x) (rotr_32(x, 7) ^ rotr_32(x, 18) ^ (x >> 3))
-#define s1(x) (rotr_32(x, 17) ^ rotr_32(x, 19) ^ (x >> 10))
-
-
-static const uint32_t SHA256_K[64] = {
-	0x428A2F98, 0x71374491, 0xB5C0FBCF, 0xE9B5DBA5,
-	0x3956C25B, 0x59F111F1, 0x923F82A4, 0xAB1C5ED5,
-	0xD807AA98, 0x12835B01, 0x243185BE, 0x550C7DC3,
-	0x72BE5D74, 0x80DEB1FE, 0x9BDC06A7, 0xC19BF174,
-	0xE49B69C1, 0xEFBE4786, 0x0FC19DC6, 0x240CA1CC,
-	0x2DE92C6F, 0x4A7484AA, 0x5CB0A9DC, 0x76F988DA,
-	0x983E5152, 0xA831C66D, 0xB00327C8, 0xBF597FC7,
-	0xC6E00BF3, 0xD5A79147, 0x06CA6351, 0x14292967,
-	0x27B70A85, 0x2E1B2138, 0x4D2C6DFC, 0x53380D13,
-	0x650A7354, 0x766A0ABB, 0x81C2C92E, 0x92722C85,
-	0xA2BFE8A1, 0xA81A664B, 0xC24B8B70, 0xC76C51A3,
-	0xD192E819, 0xD6990624, 0xF40E3585, 0x106AA070,
-	0x19A4C116, 0x1E376C08, 0x2748774C, 0x34B0BCB5,
-	0x391C0CB3, 0x4ED8AA4A, 0x5B9CCA4F, 0x682E6FF3,
-	0x748F82EE, 0x78A5636F, 0x84C87814, 0x8CC70208,
-	0x90BEFFFA, 0xA4506CEB, 0xBEF9A3F7, 0xC67178F2,
-};
-
-
-static void
-transform(uint32_t state[static 8], const uint32_t data[static 16])
-{
-	uint32_t W[16];
-	uint32_t T[8];
-
-	// Copy state[] to working vars.
-	memcpy(T, state, sizeof(T));
-
-	// 64 operations, partially loop unrolled
-	for (unsigned int j = 0; j < 64; j += 16) {
-		R( 0); R( 1); R( 2); R( 3);
-		R( 4); R( 5); R( 6); R( 7);
-		R( 8); R( 9); R(10); R(11);
-		R(12); R(13); R(14); R(15);
-	}
-
-	// Add the working vars back into state[].
-	state[0] += a(0);
-	state[1] += b(0);
-	state[2] += c(0);
-	state[3] += d(0);
-	state[4] += e(0);
-	state[5] += f(0);
-	state[6] += g(0);
-	state[7] += h(0);
-}
-
-
-static void
-process(lzma_check_state *check)
-{
-#ifdef WORDS_BIGENDIAN
-	transform(check->state.sha256.state, check->buffer.u32);
-
-#else
-	uint32_t data[16];
-
-	for (size_t i = 0; i < 16; ++i)
-		data[i] = bswap32(check->buffer.u32[i]);
-
-	transform(check->state.sha256.state, data);
-#endif
-
-	return;
-}
-
-
-extern void
-lzma_sha256_init(lzma_check_state *check)
-{
-	static const uint32_t s[8] = {
-		0x6A09E667, 0xBB67AE85, 0x3C6EF372, 0xA54FF53A,
-		0x510E527F, 0x9B05688C, 0x1F83D9AB, 0x5BE0CD19,
-	};
-
-	memcpy(check->state.sha256.state, s, sizeof(s));
-	check->state.sha256.size = 0;
-
-	return;
-}
-
-
-extern void
-lzma_sha256_update(const uint8_t *buf, size_t size, lzma_check_state *check)
-{
-	// Copy the input data into a properly aligned temporary buffer.
-	// This way we can be called with arbitrarily sized buffers
-	// (no need to be multiple of 64 bytes), and the code works also
-	// on architectures that don't allow unaligned memory access.
-	while (size > 0) {
-		const size_t copy_start = check->state.sha256.size & 0x3F;
-		size_t copy_size = 64 - copy_start;
-		if (copy_size > size)
-			copy_size = size;
-
-		memcpy(check->buffer.u8 + copy_start, buf, copy_size);
-
-		buf += copy_size;
-		size -= copy_size;
-		check->state.sha256.size += copy_size;
-
-		if ((check->state.sha256.size & 0x3F) == 0)
-			process(check);
-	}
-
-	return;
-}
-
-
-extern void
-lzma_sha256_finish(lzma_check_state *check)
-{
-	// Add padding as described in RFC 3174 (it describes SHA-1 but
-	// the same padding style is used for SHA-256 too).
-	size_t pos = check->state.sha256.size & 0x3F;
-	check->buffer.u8[pos++] = 0x80;
-
-	while (pos != 64 - 8) {
-		if (pos == 64) {
-			process(check);
-			pos = 0;
-		}
-
-		check->buffer.u8[pos++] = 0x00;
-	}
-
-	// Convert the message size from bytes to bits.
-	check->state.sha256.size *= 8;
-
-	check->buffer.u64[(64 - 8) / 8] = conv64be(check->state.sha256.size);
-
-	process(check);
-
-	for (size_t i = 0; i < 8; ++i)
-		check->buffer.u32[i] = conv32be(check->state.sha256.state[i]);
-
-	return;
-}
diff --git a/src/extra/xz/common/alone_decoder.c b/src/extra/xz/common/alone_decoder.c
deleted file mode 100644
index c25112e..0000000
--- a/src/extra/xz/common/alone_decoder.c
+++ /dev/null
@@ -1,238 +0,0 @@
-///////////////////////////////////////////////////////////////////////////////
-//
-/// \file       alone_decoder.c
-/// \brief      Decoder for LZMA_Alone files
-//
-//  Author:     Lasse Collin
-//
-//  This file has been put into the public domain.
-//  You can do whatever you want with this file.
-//
-///////////////////////////////////////////////////////////////////////////////
-
-#include "alone_decoder.h"
-#include "lzma_decoder.h"
-#include "lz_decoder.h"
-
-
-struct lzma_coder_s {
-	lzma_next_coder next;
-
-	enum {
-		SEQ_PROPERTIES,
-		SEQ_DICTIONARY_SIZE,
-		SEQ_UNCOMPRESSED_SIZE,
-		SEQ_CODER_INIT,
-		SEQ_CODE,
-	} sequence;
-
-	/// If true, reject files that are unlikely to be .lzma files.
-	/// If false, more non-.lzma files get accepted and will give
-	/// LZMA_DATA_ERROR either immediately or after a few output bytes.
-	bool picky;
-
-	/// Position in the header fields
-	size_t pos;
-
-	/// Uncompressed size decoded from the header
-	lzma_vli uncompressed_size;
-
-	/// Memory usage limit
-	uint64_t memlimit;
-
-	/// Amount of memory actually needed (only an estimate)
-	uint64_t memusage;
-
-	/// Options decoded from the header needed to initialize
-	/// the LZMA decoder
-	lzma_options_lzma options;
-};
-
-
-static lzma_ret
-alone_decode(lzma_coder *coder,
-		lzma_allocator *allocator lzma_attribute((__unused__)),
-		const uint8_t *restrict in, size_t *restrict in_pos,
-		size_t in_size, uint8_t *restrict out,
-		size_t *restrict out_pos, size_t out_size,
-		lzma_action action)
-{
-	while (*out_pos < out_size
-			&& (coder->sequence == SEQ_CODE || *in_pos < in_size))
-	switch (coder->sequence) {
-	case SEQ_PROPERTIES:
-		if (lzma_lzma_lclppb_decode(&coder->options, in[*in_pos]))
-			return LZMA_FORMAT_ERROR;
-
-		coder->sequence = SEQ_DICTIONARY_SIZE;
-		++*in_pos;
-		break;
-
-	case SEQ_DICTIONARY_SIZE:
-		coder->options.dict_size
-				|= (size_t)(in[*in_pos]) << (coder->pos * 8);
-
-		if (++coder->pos == 4) {
-			if (coder->picky && coder->options.dict_size
-					!= UINT32_MAX) {
-				// A hack to ditch tons of false positives:
-				// We allow only dictionary sizes that are
-				// 2^n or 2^n + 2^(n-1). LZMA_Alone created
-				// only files with 2^n, but accepts any
-				// dictionary size.
-				uint32_t d = coder->options.dict_size - 1;
-				d |= d >> 2;
-				d |= d >> 3;
-				d |= d >> 4;
-				d |= d >> 8;
-				d |= d >> 16;
-				++d;
-
-				if (d != coder->options.dict_size)
-					return LZMA_FORMAT_ERROR;
-			}
-
-			coder->pos = 0;
-			coder->sequence = SEQ_UNCOMPRESSED_SIZE;
-		}
-
-		++*in_pos;
-		break;
-
-	case SEQ_UNCOMPRESSED_SIZE:
-		coder->uncompressed_size
-				|= (lzma_vli)(in[*in_pos]) << (coder->pos * 8);
-		++*in_pos;
-		if (++coder->pos < 8)
-			break;
-
-		// Another hack to ditch false positives: Assume that
-		// if the uncompressed size is known, it must be less
-		// than 256 GiB.
-		if (coder->picky
-				&& coder->uncompressed_size != LZMA_VLI_UNKNOWN
-				&& coder->uncompressed_size
-					>= (LZMA_VLI_C(1) << 38))
-			return LZMA_FORMAT_ERROR;
-
-		// Calculate the memory usage so that it is ready
-		// for SEQ_CODER_INIT.
-		coder->memusage = lzma_lzma_decoder_memusage(&coder->options)
-				+ LZMA_MEMUSAGE_BASE;
-
-		coder->pos = 0;
-		coder->sequence = SEQ_CODER_INIT;
-
-	// Fall through
-
-	case SEQ_CODER_INIT: {
-		if (coder->memusage > coder->memlimit)
-			return LZMA_MEMLIMIT_ERROR;
-
-		lzma_filter_info filters[2] = {
-			{
-				.init = &lzma_lzma_decoder_init,
-				.options = &coder->options,
-			}, {
-				.init = NULL,
-			}
-		};
-
-		const lzma_ret ret = lzma_next_filter_init(&coder->next,
-				allocator, filters);
-		if (ret != LZMA_OK)
-			return ret;
-
-		// Use a hack to set the uncompressed size.
-		lzma_lz_decoder_uncompressed(coder->next.coder,
-				coder->uncompressed_size);
-
-		coder->sequence = SEQ_CODE;
-		break;
-	}
-
-	case SEQ_CODE: {
-		return coder->next.code(coder->next.coder,
-				allocator, in, in_pos, in_size,
-				out, out_pos, out_size, action);
-	}
-
-	default:
-		return LZMA_PROG_ERROR;
-	}
-
-	return LZMA_OK;
-}
-
-
-static void
-alone_decoder_end(lzma_coder *coder, lzma_allocator *allocator)
-{
-	lzma_next_end(&coder->next, allocator);
-	lzma_free(coder, allocator);
-	return;
-}
-
-
-static lzma_ret
-alone_decoder_memconfig(lzma_coder *coder, uint64_t *memusage,
-		uint64_t *old_memlimit, uint64_t new_memlimit)
-{
-	*memusage = coder->memusage;
-	*old_memlimit = coder->memlimit;
-
-	if (new_memlimit != 0) {
-		if (new_memlimit < coder->memusage)
-			return LZMA_MEMLIMIT_ERROR;
-
-		coder->memlimit = new_memlimit;
-	}
-
-	return LZMA_OK;
-}
-
-
-extern lzma_ret
-lzma_alone_decoder_init(lzma_next_coder *next, lzma_allocator *allocator,
-		uint64_t memlimit, bool picky)
-{
-	lzma_next_coder_init(&lzma_alone_decoder_init, next, allocator);
-
-	if (memlimit == 0)
-		return LZMA_PROG_ERROR;
-
-	if (next->coder == NULL) {
-		next->coder = lzma_alloc(sizeof(lzma_coder), allocator);
-		if (next->coder == NULL)
-			return LZMA_MEM_ERROR;
-
-		next->code = &alone_decode;
-		next->end = &alone_decoder_end;
-		next->memconfig = &alone_decoder_memconfig;
-		next->coder->next = LZMA_NEXT_CODER_INIT;
-	}
-
-	next->coder->sequence = SEQ_PROPERTIES;
-	next->coder->picky = picky;
-	next->coder->pos = 0;
-	next->coder->options.dict_size = 0;
-	next->coder->options.preset_dict = NULL;
-	next->coder->options.preset_dict_size = 0;
-	next->coder->uncompressed_size = 0;
-	next->coder->memlimit = memlimit;
-	next->coder->memusage = LZMA_MEMUSAGE_BASE;
-
-	return LZMA_OK;
-}
-
-
-extern LZMA_API(lzma_ret)
-lzma_alone_decoder(lzma_stream *strm, uint64_t memlimit)
-{
-	lzma_next_strm_init(lzma_alone_decoder_init, strm, memlimit, false);
-
-	strm->internal->supported_actions[LZMA_RUN] = true;
-	strm->internal->supported_actions[LZMA_FINISH] = true;
-
-	return LZMA_OK;
-}
diff --git a/src/extra/xz/common/alone_decoder.h b/src/extra/xz/common/alone_decoder.h
deleted file mode 100644
index f666fc3..0000000
--- a/src/extra/xz/common/alone_decoder.h
+++ /dev/null
@@ -1,23 +0,0 @@
-///////////////////////////////////////////////////////////////////////////////
-//
-/// \file       alone_decoder.h
-/// \brief      Decoder for LZMA_Alone files
-//
-//  Author:     Lasse Collin
-//
-//  This file has been put into the public domain.
-//  You can do whatever you want with this file.
-//
-///////////////////////////////////////////////////////////////////////////////
-
-#ifndef LZMA_ALONE_DECODER_H
-#define LZMA_ALONE_DECODER_H
-
-#include "common.h"
-
-
-extern lzma_ret lzma_alone_decoder_init(
-		lzma_next_coder *next, lzma_allocator *allocator,
-		uint64_t memlimit, bool picky);
-
-#endif
diff --git a/src/extra/xz/common/alone_encoder.c b/src/extra/xz/common/alone_encoder.c
deleted file mode 100644
index eb1697e..0000000
--- a/src/extra/xz/common/alone_encoder.c
+++ /dev/null
@@ -1,157 +0,0 @@
-///////////////////////////////////////////////////////////////////////////////
-//
-/// \file       alone_decoder.c
-/// \brief      Decoder for LZMA_Alone files
-//
-//  Author:     Lasse Collin
-//
-//  This file has been put into the public domain.
-//  You can do whatever you want with this file.
-//
-///////////////////////////////////////////////////////////////////////////////
-
-#include "common.h"
-#include "lzma_encoder.h"
-
-
-#define ALONE_HEADER_SIZE (1 + 4 + 8)
-
-
-struct lzma_coder_s {
-	lzma_next_coder next;
-
-	enum {
-		SEQ_HEADER,
-		SEQ_CODE,
-	} sequence;
-
-	size_t header_pos;
-	uint8_t header[ALONE_HEADER_SIZE];
-};
-
-
-static lzma_ret
-alone_encode(lzma_coder *coder,
-		lzma_allocator *allocator lzma_attribute((__unused__)),
-		const uint8_t *restrict in, size_t *restrict in_pos,
-		size_t in_size, uint8_t *restrict out,
-		size_t *restrict out_pos, size_t out_size,
-		lzma_action action)
-{
-	while (*out_pos < out_size)
-	switch (coder->sequence) {
-	case SEQ_HEADER:
-		lzma_bufcpy(coder->header, &coder->header_pos,
-				ALONE_HEADER_SIZE,
-				out, out_pos, out_size);
-		if (coder->header_pos < ALONE_HEADER_SIZE)
-			return LZMA_OK;
-
-		coder->sequence = SEQ_CODE;
-		break;
-
-	case SEQ_CODE:
-		return coder->next.code(coder->next.coder,
-				allocator, in, in_pos, in_size,
-				out, out_pos, out_size, action);
-
-	default:
-		assert(0);
-		return LZMA_PROG_ERROR;
-	}
-
-	return LZMA_OK;
-}
-
-
-static void
-alone_encoder_end(lzma_coder *coder, lzma_allocator *allocator)
-{
-	lzma_next_end(&coder->next, allocator);
-	lzma_free(coder, allocator);
-	return;
-}
-
-
-// At least for now, this is not used by any internal function.
-static lzma_ret
-alone_encoder_init(lzma_next_coder *next, lzma_allocator *allocator,
-		const lzma_options_lzma *options)
-{
-	lzma_next_coder_init(&alone_encoder_init, next, allocator);
-
-	if (next->coder == NULL) {
-		next->coder = lzma_alloc(sizeof(lzma_coder), allocator);
-		if (next->coder == NULL)
-			return LZMA_MEM_ERROR;
-
-		next->code = &alone_encode;
-		next->end = &alone_encoder_end;
-		next->coder->next = LZMA_NEXT_CODER_INIT;
-	}
-
-	// Basic initializations
-	next->coder->sequence = SEQ_HEADER;
-	next->coder->header_pos = 0;
-
-	// Encode the header:
-	// - Properties (1 byte)
-	if (lzma_lzma_lclppb_encode(options, next->coder->header))
-		return LZMA_OPTIONS_ERROR;
-
-	// - Dictionary size (4 bytes)
-	if (options->dict_size < LZMA_DICT_SIZE_MIN)
-		return LZMA_OPTIONS_ERROR;
-
-	// Round up to the next 2^n or 2^n + 2^(n - 1) depending on which
-	// one is the next unless it is UINT32_MAX. While the header would
-	// allow any 32-bit integer, we do this to keep the decoder of liblzma
-	// accepting the resulting files.
-	uint32_t d = options->dict_size - 1;
-	d |= d >> 2;
-	d |= d >> 3;
-	d |= d >> 4;
-	d |= d >> 8;
-	d |= d >> 16;
-	if (d != UINT32_MAX)
-		++d;
-
-	unaligned_write32le(next->coder->header + 1, d);
-
-	// - Uncompressed size (always unknown and using EOPM)
-	memset(next->coder->header + 1 + 4, 0xFF, 8);
-
-	// Initialize the LZMA encoder.
-	const lzma_filter_info filters[2] = {
-		{
-			.init = &lzma_lzma_encoder_init,
-			.options = (void *)(options),
-		}, {
-			.init = NULL,
-		}
-	};
-
-	return lzma_next_filter_init(&next->coder->next, allocator, filters);
-}
-
-
-/*
-extern lzma_ret
-lzma_alone_encoder_init(lzma_next_coder *next, lzma_allocator *allocator,
-		const lzma_options_alone *options)
-{
-	lzma_next_coder_init(&alone_encoder_init, next, allocator, options);
-}
-*/
-
-
-extern LZMA_API(lzma_ret)
-lzma_alone_encoder(lzma_stream *strm, const lzma_options_lzma *options)
-{
-	lzma_next_strm_init(alone_encoder_init, strm, options);
-
-	strm->internal->supported_actions[LZMA_RUN] = true;
-	strm->internal->supported_actions[LZMA_FINISH] = true;
-
-	return LZMA_OK;
-}
diff --git a/src/extra/xz/common/auto_decoder.c b/src/extra/xz/common/auto_decoder.c
deleted file mode 100644
index 35c895f..0000000
--- a/src/extra/xz/common/auto_decoder.c
+++ /dev/null
@@ -1,186 +0,0 @@
-///////////////////////////////////////////////////////////////////////////////
-//
-/// \file       auto_decoder.c
-/// \brief      Autodetect between .xz Stream and .lzma (LZMA_Alone) formats
-//
-//  Author:     Lasse Collin
-//
-//  This file has been put into the public domain.
-//  You can do whatever you want with this file.
-//
-///////////////////////////////////////////////////////////////////////////////
-
-#include "stream_decoder.h"
-#include "alone_decoder.h"
-
-
-struct lzma_coder_s {
-	/// Stream decoder or LZMA_Alone decoder
-	lzma_next_coder next;
-
-	uint64_t memlimit;
-	uint32_t flags;
-
-	enum {
-		SEQ_INIT,
-		SEQ_CODE,
-		SEQ_FINISH,
-	} sequence;
-};
-
-
-static lzma_ret
-auto_decode(lzma_coder *coder, lzma_allocator *allocator,
-		const uint8_t *restrict in, size_t *restrict in_pos,
-		size_t in_size, uint8_t *restrict out,
-		size_t *restrict out_pos, size_t out_size, lzma_action action)
-{
-	switch (coder->sequence) {
-	case SEQ_INIT:
-		if (*in_pos >= in_size)
-			return LZMA_OK;
-
-		// Update the sequence now, because we want to continue from
-		// SEQ_CODE even if we return some LZMA_*_CHECK.
-		coder->sequence = SEQ_CODE;
-
-		// Detect the file format. For now this is simple, since if
-		// it doesn't start with 0xFD (the first magic byte of the
-		// new format), it has to be LZMA_Alone, or something that
-		// we don't support at all.
-		if (in[*in_pos] == 0xFD) {
-			return_if_error(lzma_stream_decoder_init(
-					&coder->next, allocator,
-					coder->memlimit, coder->flags));
-		} else {
-			return_if_error(lzma_alone_decoder_init(&coder->next,
-					allocator, coder->memlimit, true));
-
-			// If the application wants to know about missing
-			// integrity check or about the check in general, we
-			// need to handle it here, because LZMA_Alone decoder
-			// doesn't accept any flags.
-			if (coder->flags & LZMA_TELL_NO_CHECK)
-				return LZMA_NO_CHECK;
-
-			if (coder->flags & LZMA_TELL_ANY_CHECK)
-				return LZMA_GET_CHECK;
-		}
-
-	// Fall through
-
-	case SEQ_CODE: {
-		const lzma_ret ret = coder->next.code(
-				coder->next.coder, allocator,
-				in, in_pos, in_size,
-				out, out_pos, out_size, action);
-		if (ret != LZMA_STREAM_END
-				|| (coder->flags & LZMA_CONCATENATED) == 0)
-			return ret;
-
-		coder->sequence = SEQ_FINISH;
-	}
-
-	// Fall through
-
-	case SEQ_FINISH:
-		// When LZMA_DECODE_CONCATENATED was used and we were decoding
-		// LZMA_Alone file, we need to check check that there is no
-		// trailing garbage and wait for LZMA_FINISH.
-		if (*in_pos < in_size)
-			return LZMA_DATA_ERROR;
-
-		return action == LZMA_FINISH ? LZMA_STREAM_END : LZMA_OK;
-
-	default:
-		assert(0);
-		return LZMA_PROG_ERROR;
-	}
-}
-
-
-static void
-auto_decoder_end(lzma_coder *coder, lzma_allocator *allocator)
-{
-	lzma_next_end(&coder->next, allocator);
-	lzma_free(coder, allocator);
-	return;
-}
-
-
-static lzma_check
-auto_decoder_get_check(const lzma_coder *coder)
-{
-	// It is LZMA_Alone if get_check is NULL.
-	return coder->next.get_check == NULL ? LZMA_CHECK_NONE
-			: coder->next.get_check(coder->next.coder);
-}
-
-
-static lzma_ret
-auto_decoder_memconfig(lzma_coder *coder, uint64_t *memusage,
-		uint64_t *old_memlimit, uint64_t new_memlimit)
-{
-	lzma_ret ret;
-
-	if (coder->next.memconfig != NULL) {
-		ret = coder->next.memconfig(coder->next.coder,
-				memusage, old_memlimit, new_memlimit);
-		assert(*old_memlimit == coder->memlimit);
-	} else {
-		// No coder is configured yet. Use the base value as
-		// the current memory usage.
-		*memusage = LZMA_MEMUSAGE_BASE;
-		*old_memlimit = coder->memlimit;
-		ret = LZMA_OK;
-	}
-
-	if (ret == LZMA_OK && new_memlimit != 0)
-		coder->memlimit = new_memlimit;
-
-	return ret;
-}
-
-
-static lzma_ret
-auto_decoder_init(lzma_next_coder *next, lzma_allocator *allocator,
-		uint64_t memlimit, uint32_t flags)
-{
-	lzma_next_coder_init(&auto_decoder_init, next, allocator);
-
-	if (memlimit == 0)
-		return LZMA_PROG_ERROR;
-
-	if (flags & ~LZMA_SUPPORTED_FLAGS)
-		return LZMA_OPTIONS_ERROR;
-
-	if (next->coder == NULL) {
-		next->coder = lzma_alloc(sizeof(lzma_coder), allocator);
-		if (next->coder == NULL)
-			return LZMA_MEM_ERROR;
-
-		next->code = &auto_decode;
-		next->end = &auto_decoder_end;
-		next->get_check = &auto_decoder_get_check;
-		next->memconfig = &auto_decoder_memconfig;
-		next->coder->next = LZMA_NEXT_CODER_INIT;
-	}
-
-	next->coder->memlimit = memlimit;
-	next->coder->flags = flags;
-	next->coder->sequence = SEQ_INIT;
-
-	return LZMA_OK;
-}
-
-
-extern LZMA_API(lzma_ret)
-lzma_auto_decoder(lzma_stream *strm, uint64_t memlimit, uint32_t flags)
-{
-	lzma_next_strm_init(auto_decoder_init, strm, memlimit, flags);
-
-	strm->internal->supported_actions[LZMA_RUN] = true;
-	strm->internal->supported_actions[LZMA_FINISH] = true;
-
-	return LZMA_OK;
-}
diff --git a/src/extra/xz/common/block_buffer_decoder.c b/src/extra/xz/common/block_buffer_decoder.c
deleted file mode 100644
index ff27a11..0000000
--- a/src/extra/xz/common/block_buffer_decoder.c
+++ /dev/null
@@ -1,80 +0,0 @@
-///////////////////////////////////////////////////////////////////////////////
-//
-/// \file       block_buffer_decoder.c
-/// \brief      Single-call .xz Block decoder
-//
-//  Author:     Lasse Collin
-//
-//  This file has been put into the public domain.
-//  You can do whatever you want with this file.
-//
-///////////////////////////////////////////////////////////////////////////////
-
-#include "block_decoder.h"
-
-
-extern LZMA_API(lzma_ret)
-lzma_block_buffer_decode(lzma_block *block, lzma_allocator *allocator,
-		const uint8_t *in, size_t *in_pos, size_t in_size,
-		uint8_t *out, size_t *out_pos, size_t out_size)
-{
-	if (in_pos == NULL || (in == NULL && *in_pos != in_size)
-			|| *in_pos > in_size || out_pos == NULL
-			|| (out == NULL && *out_pos != out_size)
-			|| *out_pos > out_size)
-		return LZMA_PROG_ERROR;
-
-	// Initialize the Block decoder.
-	lzma_next_coder block_decoder = LZMA_NEXT_CODER_INIT;
-	lzma_ret ret = lzma_block_decoder_init(
-			&block_decoder, allocator, block);
-
-	if (ret == LZMA_OK) {
-		// Save the positions so that we can restore them in case
-		// an error occurs.
-		const size_t in_start = *in_pos;
-		const size_t out_start = *out_pos;
-
-		// Do the actual decoding.
-		ret = block_decoder.code(block_decoder.coder, allocator,
-				in, in_pos, in_size, out, out_pos, out_size,
-				LZMA_FINISH);
-
-		if (ret == LZMA_STREAM_END) {
-			ret = LZMA_OK;
-		} else {
-			if (ret == LZMA_OK) {
-				// Either the input was truncated or the
-				// output buffer was too small.
-				assert(*in_pos == in_size
-						|| *out_pos == out_size);
-
-				// If all the input was consumed, then the
-				// input is truncated, even if the output
-				// buffer is also full. This is because
-				// processing the last byte of the Block
-				// never produces output.
-				//
-				// NOTE: This assumption may break when new
-				// filters are added, if the end marker of
-				// the filter doesn't consume at least one
-				// complete byte.
-				if (*in_pos == in_size)
-					ret = LZMA_DATA_ERROR;
-				else
-					ret = LZMA_BUF_ERROR;
-			}
-
-			// Restore the positions.
-			*in_pos = in_start;
-			*out_pos = out_start;
-		}
-	}
-
-	// Free the decoder memory. This needs to be done even if
-	// initialization fails, because the internal API doesn't
-	// require the initialization function to free its memory on error.
-	lzma_next_end(&block_decoder, allocator);
-
-	return ret;
-}
diff --git a/src/extra/xz/common/block_buffer_encoder.c b/src/extra/xz/common/block_buffer_encoder.c
deleted file mode 100644
index 519c6a6..0000000
--- a/src/extra/xz/common/block_buffer_encoder.c
+++ /dev/null
@@ -1,305 +0,0 @@
-///////////////////////////////////////////////////////////////////////////////
-//
-/// \file       block_buffer_encoder.c
-/// \brief      Single-call .xz Block encoder
-//
-//  Author:     Lasse Collin
-//
-//  This file has been put into the public domain.
-//  You can do whatever you want with this file.
-//
-///////////////////////////////////////////////////////////////////////////////
-
-#include "block_encoder.h"
-#include "filter_encoder.h"
-#include "lzma2_encoder.h"
-#include "check.h"
-
-
-/// Estimate the maximum size of the Block Header and Check fields for
-/// a Block that uses LZMA2 uncompressed chunks. We could use
-/// lzma_block_header_size() but this is simpler.
-///
-/// Block Header Size + Block Flags + Compressed Size
-/// + Uncompressed Size + Filter Flags for LZMA2 + CRC32 + Check
-/// and round up to the next multiple of four to take Header Padding
-/// into account.
-#define HEADERS_BOUND ((1 + 1 + 2 * LZMA_VLI_BYTES_MAX + 3 + 4 \
-		+ LZMA_CHECK_SIZE_MAX + 3) & ~3)
-
-
-static lzma_vli
-lzma2_bound(lzma_vli uncompressed_size)
-{
-	// Prevent integer overflow in overhead calculation.
-	if (uncompressed_size > COMPRESSED_SIZE_MAX)
-		return 0;
-
-	// Calculate the exact overhead of the LZMA2 headers: Round
-	// uncompressed_size up to the next multiple of LZMA2_CHUNK_MAX,
-	// multiply by the size of per-chunk header, and add one byte for
-	// the end marker.
-	const lzma_vli overhead = ((uncompressed_size + LZMA2_CHUNK_MAX - 1)
-				/ LZMA2_CHUNK_MAX)
-			* LZMA2_HEADER_UNCOMPRESSED + 1;
-
-	// Catch the possible integer overflow.
-	if (COMPRESSED_SIZE_MAX - overhead < uncompressed_size)
-		return 0;
-
-	return uncompressed_size + overhead;
-}
-
-
-extern LZMA_API(size_t)
-lzma_block_buffer_bound(size_t uncompressed_size)
-{
-	// For now, if the data doesn't compress, we always use uncompressed
-	// chunks of LZMA2. In future we may use Subblock filter too, but
-	// but for simplicity we probably will still use the same bound
-	// calculation even though Subblock filter would have slightly less
-	// overhead.
-	lzma_vli lzma2_size = lzma2_bound(uncompressed_size);
-	if (lzma2_size == 0)
-		return 0;
-
-	// Take Block Padding into account.
-	lzma2_size = (lzma2_size + 3) & ~LZMA_VLI_C(3);
-
-#if SIZE_MAX < LZMA_VLI_MAX
-	// Catch the possible integer overflow on 32-bit systems. There's no
-	// overflow on 64-bit systems, because lzma2_bound() already takes
-	// into account the size of the headers in the Block.
-	if (SIZE_MAX - HEADERS_BOUND < lzma2_size)
-		return 0;
-#endif
-
-	return HEADERS_BOUND + lzma2_size;
-}
-
-
-static lzma_ret
-block_encode_uncompressed(lzma_block *block, const uint8_t *in, size_t in_size,
-		uint8_t *out, size_t *out_pos, size_t out_size)
-{
-	// TODO: Figure out if the last filter is LZMA2 or Subblock and use
-	// that filter to encode the uncompressed chunks.
-
-	// Use LZMA2 uncompressed chunks. We wouldn't need a dictionary at
-	// all, but LZMA2 always requires a dictionary, so use the minimum
-	// value to minimize memory usage of the decoder.
-	lzma_options_lzma lzma2 = {
-		.dict_size = LZMA_DICT_SIZE_MIN,
-	};
-
-	lzma_filter filters[2];
-	filters[0].id = LZMA_FILTER_LZMA2;
-	filters[0].options = &lzma2;
-	filters[1].id = LZMA_VLI_UNKNOWN;
-
-	// Set the above filter options to *block temporarily so that we can
-	// encode the Block Header.
-	lzma_filter *filters_orig = block->filters;
-	block->filters = filters;
-
-	if (lzma_block_header_size(block) != LZMA_OK) {
-		block->filters = filters_orig;
-		return LZMA_PROG_ERROR;
-	}
-
-	// Check that there's enough output space. The caller has already
-	// set block->compressed_size to what lzma2_bound() has returned,
-	// so we can reuse that value. We know that compressed_size is a
-	// known valid VLI and header_size is a small value so their sum
-	// will never overflow.
-	assert(block->compressed_size == lzma2_bound(in_size));
-	if (out_size - *out_pos
-			< block->header_size + block->compressed_size) {
-		block->filters = filters_orig;
-		return LZMA_BUF_ERROR;
-	}
-
-	if (lzma_block_header_encode(block, out + *out_pos) != LZMA_OK) {
-		block->filters = filters_orig;
-		return LZMA_PROG_ERROR;
-	}
-
-	block->filters = filters_orig;
-	*out_pos += block->header_size;
-
-	// Encode the data using LZMA2 uncompressed chunks.
-	size_t in_pos = 0;
-	uint8_t control = 0x01; // Dictionary reset
-
-	while (in_pos < in_size) {
-		// Control byte: Indicate uncompressed chunk, of which
-		// the first resets the dictionary.
-		out[(*out_pos)++] = control;
-		control = 0x02; // No dictionary reset
-
-		// Size of the uncompressed chunk
-		const size_t copy_size
-				= my_min(in_size - in_pos, LZMA2_CHUNK_MAX);
-		out[(*out_pos)++] = (copy_size - 1) >> 8;
-		out[(*out_pos)++] = (copy_size - 1) & 0xFF;
-
-		// The actual data
-		assert(*out_pos + copy_size <= out_size);
-		memcpy(out + *out_pos, in + in_pos, copy_size);
-
-		in_pos += copy_size;
-		*out_pos += copy_size;
-	}
-
-	// End marker
-	out[(*out_pos)++] = 0x00;
-	assert(*out_pos <= out_size);
-
-	return LZMA_OK;
-}
-
-
-static lzma_ret
-block_encode_normal(lzma_block *block, lzma_allocator *allocator,
-		const uint8_t *in, size_t in_size,
-		uint8_t *out, size_t *out_pos, size_t out_size)
-{
-	// Find out the size of the Block Header.
-	block->compressed_size = lzma2_bound(in_size);
-	if (block->compressed_size == 0)
-		return LZMA_DATA_ERROR;
-
-	block->uncompressed_size = in_size;
-	return_if_error(lzma_block_header_size(block));
-
-	// Reserve space for the Block Header and skip it for now.
-	if (out_size - *out_pos <= block->header_size)
-		return LZMA_BUF_ERROR;
-
-	const size_t out_start = *out_pos;
-	*out_pos += block->header_size;
-
-	// Limit out_size so that we stop encoding if the output would grow
-	// bigger than what uncompressed Block would be.
-	if (out_size - *out_pos > block->compressed_size)
-		out_size = *out_pos + block->compressed_size;
-
-	// TODO: In many common cases this could be optimized to use
-	// significantly less memory.
-	lzma_next_coder raw_encoder = LZMA_NEXT_CODER_INIT;
-	lzma_ret ret = lzma_raw_encoder_init(
-			&raw_encoder, allocator, block->filters);
-
-	if (ret == LZMA_OK) {
-		size_t in_pos = 0;
-		ret = raw_encoder.code(raw_encoder.coder, allocator,
-				in, &in_pos, in_size, out, out_pos, out_size,
-				LZMA_FINISH);
-	}
-
-	// NOTE: This needs to be run even if lzma_raw_encoder_init() failed.
-	lzma_next_end(&raw_encoder, allocator);
-
-	if (ret == LZMA_STREAM_END) {
-		// Compression was successful. Write the Block Header.
-		block->compressed_size
-				= *out_pos - (out_start + block->header_size);
-		ret = lzma_block_header_encode(block, out + out_start);
-		if (ret != LZMA_OK)
-			ret = LZMA_PROG_ERROR;
-
-	} else if (ret == LZMA_OK) {
-		// Output buffer became full.
-		ret = LZMA_BUF_ERROR;
-	}
-
-	// Reset *out_pos if something went wrong.
-	if (ret != LZMA_OK)
-		*out_pos = out_start;
-
-	return ret;
-}
-
-
-extern LZMA_API(lzma_ret)
-lzma_block_buffer_encode(lzma_block *block, lzma_allocator *allocator,
-		const uint8_t *in, size_t in_size,
-		uint8_t *out, size_t *out_pos, size_t out_size)
-{
-	// Validate the arguments.
-	if (block == NULL || (in == NULL && in_size != 0) || out == NULL
-			|| out_pos == NULL || *out_pos > out_size)
-		return LZMA_PROG_ERROR;
-
-	// The contents of the structure may depend on the version so
-	// check the version before validating the contents of *block.
-	if (block->version != 0)
-		return LZMA_OPTIONS_ERROR;
-
-	if ((unsigned int)(block->check) > LZMA_CHECK_ID_MAX
-			|| block->filters == NULL)
-		return LZMA_PROG_ERROR;
-
-	if (!lzma_check_is_supported(block->check))
-		return LZMA_UNSUPPORTED_CHECK;
-
-	// Size of a Block has to be a multiple of four, so limit the size
-	// here already. This way we don't need to check it again when adding
-	// Block Padding.
-	out_size -= (out_size - *out_pos) & 3;
-
-	// Get the size of the Check field.
-	const size_t check_size = lzma_check_size(block->check);
-	assert(check_size != UINT32_MAX);
-
-	// Reserve space for the Check field.
-	if (out_size - *out_pos <= check_size)
-		return LZMA_BUF_ERROR;
-
-	out_size -= check_size;
-
-	// Do the actual compression.
-	const lzma_ret ret = block_encode_normal(block, allocator,
-			in, in_size, out, out_pos, out_size);
-	if (ret != LZMA_OK) {
-		// If the error was something else than output buffer
-		// becoming full, return the error now.
-		if (ret != LZMA_BUF_ERROR)
-			return ret;
-
-		// The data was uncompressible (at least with the options
-		// given to us) or the output buffer was too small. Use the
-		// uncompressed chunks of LZMA2 to wrap the data into a valid
-		// Block. If we haven't been given enough output space, even
-		// this may fail.
-		return_if_error(block_encode_uncompressed(block, in, in_size,
-				out, out_pos, out_size));
-	}
-
-	assert(*out_pos <= out_size);
-
-	// Block Padding. No buffer overflow here, because we already adjusted
-	// out_size so that (out_size - out_start) is a multiple of four.
-	// Thus, if the buffer is full, the loop body can never run.
-	for (size_t i = (size_t)(block->compressed_size); i & 3; ++i) {
-		assert(*out_pos < out_size);
-		out[(*out_pos)++] = 0x00;
-	}
-
-	// If there's no Check field, we are done now.
-	if (check_size > 0) {
-		// Calculate the integrity check. We reserved space for
-		// the Check field earlier so we don't need to check for
-		// available output space here.
-		lzma_check_state check;
-		lzma_check_init(&check, block->check);
-		lzma_check_update(&check, block->check, in, in_size);
-		lzma_check_finish(&check, block->check);
-
-		memcpy(block->raw_check, check.buffer.u8, check_size);
-		memcpy(out + *out_pos, check.buffer.u8, check_size);
-		*out_pos += check_size;
-	}
-
-	return LZMA_OK;
-}
diff --git a/src/extra/xz/common/block_decoder.c b/src/extra/xz/common/block_decoder.c
deleted file mode 100644
index a3ce6f4..0000000
--- a/src/extra/xz/common/block_decoder.c
+++ /dev/null
@@ -1,242 +0,0 @@
-///////////////////////////////////////////////////////////////////////////////
-//
-/// \file       block_decoder.c
-/// \brief      Decodes .xz Blocks
-//
-//  Author:     Lasse Collin
-//
-//  This file has been put into the public domain.
-//  You can do whatever you want with this file.
-//
-///////////////////////////////////////////////////////////////////////////////
-
-#include "block_decoder.h"
-#include "filter_decoder.h"
-#include "check.h"
-
-
-struct lzma_coder_s {
-	enum {
-		SEQ_CODE,
-		SEQ_PADDING,
-		SEQ_CHECK,
-	} sequence;
-
-	/// The filters in the chain; initialized with lzma_raw_decoder_init().
-	lzma_next_coder next;
-
-	/// Decoding options; we also write Compressed Size and Uncompressed
-	/// Size back to this structure when the decoding has been finished.
-	lzma_block *block;
-
-	/// Compressed Size calculated while decoding
-	lzma_vli compressed_size;
-
-	/// Uncompressed Size calculated while decoding
-	lzma_vli uncompressed_size;
-
-	/// Maximum allowed Compressed Size; this takes into account the
-	/// size of the Block Header and Check fields when Compressed Size
-	/// is unknown.
-	lzma_vli compressed_limit;
-
-	/// Position when reading the Check field
-	size_t check_pos;
-
-	/// Check of the uncompressed data
-	lzma_check_state check;
-};
-
-
-static inline bool
-update_size(lzma_vli *size, lzma_vli add, lzma_vli limit)
-{
-	if (limit > LZMA_VLI_MAX)
-		limit = LZMA_VLI_MAX;
-
-	if (limit < *size || limit - *size < add)
-		return true;
-
-	*size += add;
-
-	return false;
-}
-
-
-static inline bool
-is_size_valid(lzma_vli size, lzma_vli reference)
-{
-	return reference == LZMA_VLI_UNKNOWN || reference == size;
-}
-
-
-static lzma_ret
-block_decode(lzma_coder *coder, lzma_allocator *allocator,
-		const uint8_t *restrict in, size_t *restrict in_pos,
-		size_t in_size, uint8_t *restrict out,
-		size_t *restrict out_pos, size_t out_size, lzma_action action)
-{
-	switch (coder->sequence) {
-	case SEQ_CODE: {
-		const size_t in_start = *in_pos;
-		const size_t out_start = *out_pos;
-
-		const lzma_ret ret = coder->next.code(coder->next.coder,
-				allocator, in, in_pos, in_size,
-				out, out_pos, out_size, action);
-
-		const size_t in_used = *in_pos - in_start;
-		const size_t out_used = *out_pos - out_start;
-
-		// NOTE: We compare to compressed_limit here, which prevents
-		// the total size of the Block growing past LZMA_VLI_MAX.
-		if (update_size(&coder->compressed_size, in_used,
-					coder->compressed_limit)
-				|| update_size(&coder->uncompressed_size,
-					out_used,
-					coder->block->uncompressed_size))
-			return LZMA_DATA_ERROR;
-
-		lzma_check_update(&coder->check, coder->block->check,
-				out + out_start, out_used);
-
-		if (ret != LZMA_STREAM_END)
-			return ret;
-
-		// Compressed and Uncompressed Sizes are now at their final
-		// values. Verify that they match the values given to us.
-		if (!is_size_valid(coder->compressed_size,
-					coder->block->compressed_size)
-				|| !is_size_valid(coder->uncompressed_size,
-					coder->block->uncompressed_size))
-			return LZMA_DATA_ERROR;
-
-		// Copy the values into coder->block. The caller
-		// may use this information to construct Index.
-		coder->block->compressed_size = coder->compressed_size;
-		coder->block->uncompressed_size = coder->uncompressed_size;
-
-		coder->sequence = SEQ_PADDING;
-	}
-
-	// Fall through
-
-	case SEQ_PADDING:
-		// Compressed Data is padded to a multiple of four bytes.
-		while (coder->compressed_size & 3) {
-			if (*in_pos >= in_size)
-				return LZMA_OK;
-
-			// We use compressed_size here just get the Padding
-			// right. The actual Compressed Size was stored to
-			// coder->block already, and won't be modified by
-			// us anymore.
-			++coder->compressed_size;
-
-			if (in[(*in_pos)++] != 0x00)
-				return LZMA_DATA_ERROR;
-		}
-
-		if (coder->block->check == LZMA_CHECK_NONE)
-			return LZMA_STREAM_END;
-
-		lzma_check_finish(&coder->check, coder->block->check);
-		coder->sequence = SEQ_CHECK;
-
-	// Fall through
-
-	case SEQ_CHECK: {
-		const size_t check_size = lzma_check_size(coder->block->check);
-		lzma_bufcpy(in, in_pos, in_size, coder->block->raw_check,
-				&coder->check_pos, check_size);
-		if (coder->check_pos < check_size)
-			return LZMA_OK;
-
-		// Validate the Check only if we support it.
-		// coder->check.buffer may be uninitialized
-		// when the Check ID is not supported.
-		if (lzma_check_is_supported(coder->block->check)
-				&& memcmp(coder->block->raw_check,
-					coder->check.buffer.u8,
-					check_size) != 0)
-			return LZMA_DATA_ERROR;
-
-		return LZMA_STREAM_END;
-	}
-	}
-
-	return LZMA_PROG_ERROR;
-}
-
-
-static void
-block_decoder_end(lzma_coder *coder, lzma_allocator *allocator)
-{
-	lzma_next_end(&coder->next, allocator);
-	lzma_free(coder, allocator);
-	return;
-}
-
-
-extern lzma_ret
-lzma_block_decoder_init(lzma_next_coder *next, lzma_allocator *allocator,
-		lzma_block *block)
-{
-	lzma_next_coder_init(&lzma_block_decoder_init, next, allocator);
-
-	// Validate the options. lzma_block_unpadded_size() does that for us
-	// except for Uncompressed Size and filters. Filters are validated
-	// by the raw decoder.
-	if (lzma_block_unpadded_size(block) == 0
-			|| !lzma_vli_is_valid(block->uncompressed_size))
-		return LZMA_PROG_ERROR;
-
-	// Allocate and initialize *next->coder if needed.
-	if (next->coder == NULL) {
-		next->coder = lzma_alloc(sizeof(lzma_coder), allocator);
-		if (next->coder == NULL)
-			return LZMA_MEM_ERROR;
-
-		next->code = &block_decode;
-		next->end = &block_decoder_end;
-		next->coder->next = LZMA_NEXT_CODER_INIT;
-	}
-
-	// Basic initializations
-	next->coder->sequence = SEQ_CODE;
-	next->coder->block = block;
-	next->coder->compressed_size = 0;
-	next->coder->uncompressed_size = 0;
-
-	// If Compressed Size is not known, we calculate the maximum allowed
-	// value so that encoded size of the Block (including Block Padding)
-	// is still a valid VLI and a multiple of four.
-	next->coder->compressed_limit
-			= block->compressed_size == LZMA_VLI_UNKNOWN
-				? (LZMA_VLI_MAX & ~LZMA_VLI_C(3))
-					- block->header_size
-					- lzma_check_size(block->check)
-				: block->compressed_size;
-
-	// Initialize the check. It's caller's problem if the Check ID is not
-	// supported, and the Block decoder cannot verify the Check field.
-	// Caller can test lzma_check_is_supported(block->check).
-	next->coder->check_pos = 0;
-	lzma_check_init(&next->coder->check, block->check);
-
-	// Initialize the filter chain.
-	return lzma_raw_decoder_init(&next->coder->next, allocator,
-			block->filters);
-}
-
-
-extern LZMA_API(lzma_ret)
-lzma_block_decoder(lzma_stream *strm, lzma_block *block)
-{
-	lzma_next_strm_init(lzma_block_decoder_init, strm, block);
-
-	strm->internal->supported_actions[LZMA_RUN] = true;
-	strm->internal->supported_actions[LZMA_FINISH] = true;
-
-	return LZMA_OK;
-}
diff --git a/src/extra/xz/common/block_decoder.h b/src/extra/xz/common/block_decoder.h
deleted file mode 100644
index 7da9df6..0000000
--- a/src/extra/xz/common/block_decoder.h
+++ /dev/null
@@ -1,22 +0,0 @@
-///////////////////////////////////////////////////////////////////////////////
-//
-/// \file       block_decoder.h
-/// \brief      Decodes .xz Blocks
-//
-//  Author:     Lasse Collin
-//
-//  This file has been put into the public domain.
-//  You can do whatever you want with this file.
-//
-///////////////////////////////////////////////////////////////////////////////
-
-#ifndef LZMA_BLOCK_DECODER_H
-#define LZMA_BLOCK_DECODER_H
-
-#include "common.h"
-
-
-extern lzma_ret lzma_block_decoder_init(lzma_next_coder *next,
-		lzma_allocator *allocator, lzma_block *block);
-
-#endif
diff --git a/src/extra/xz/common/block_encoder.c b/src/extra/xz/common/block_encoder.c
deleted file mode 100644
index 1eeb502..0000000
--- a/src/extra/xz/common/block_encoder.c
+++ /dev/null
@@ -1,217 +0,0 @@
-///////////////////////////////////////////////////////////////////////////////
-//
-/// \file       block_encoder.c
-/// \brief      Encodes .xz Blocks
-//
-//  Author:     Lasse Collin
-//
-//  This file has been put into the public domain.
-//  You can do whatever you want with this file.
-//
-///////////////////////////////////////////////////////////////////////////////
-
-#include "block_encoder.h"
-#include "filter_encoder.h"
-#include "check.h"
-
-
-struct lzma_coder_s {
-	/// The filters in the chain; initialized with lzma_raw_decoder_init().
-	lzma_next_coder next;
-
-	/// Encoding options; we also write Unpadded Size, Compressed Size,
-	/// and Uncompressed Size back to this structure when the encoding
-	/// has been finished.
-	lzma_block *block;
-
-	enum {
-		SEQ_CODE,
-		SEQ_PADDING,
-		SEQ_CHECK,
-	} sequence;
-
-	/// Compressed Size calculated while encoding
-	lzma_vli compressed_size;
-
-	/// Uncompressed Size calculated while encoding
-	lzma_vli uncompressed_size;
-
-	/// Position in the Check field
-	size_t pos;
-
-	/// Check of the uncompressed data
-	lzma_check_state check;
-};
-
-
-static lzma_ret
-block_encode(lzma_coder *coder, lzma_allocator *allocator,
-		const uint8_t *restrict in, size_t *restrict in_pos,
-		size_t in_size, uint8_t *restrict out,
-		size_t *restrict out_pos, size_t out_size, lzma_action action)
-{
-	// Check that our amount of input stays in proper limits.
-	if (LZMA_VLI_MAX - coder->uncompressed_size < in_size - *in_pos)
-		return LZMA_DATA_ERROR;
-
-	switch (coder->sequence) {
-	case SEQ_CODE: {
-		const size_t in_start = *in_pos;
-		const size_t out_start = *out_pos;
-
-		const lzma_ret ret = coder->next.code(coder->next.coder,
-				allocator, in, in_pos, in_size,
-				out, out_pos, out_size, action);
-
-		const size_t in_used = *in_pos - in_start;
-		const size_t out_used = *out_pos - out_start;
-
-		if (COMPRESSED_SIZE_MAX - coder->compressed_size < out_used)
-			return LZMA_DATA_ERROR;
-
-		coder->compressed_size += out_used;
-
-		// No need to check for overflow because we have already
-		// checked it at the beginning of this function.
-		coder->uncompressed_size += in_used;
-
-		lzma_check_update(&coder->check, coder->block->check,
-				in + in_start, in_used);
-
-		if (ret != LZMA_STREAM_END || action == LZMA_SYNC_FLUSH)
-			return ret;
-
-		assert(*in_pos == in_size);
-		assert(action == LZMA_FINISH);
-
-		// Copy the values into coder->block. The caller
-		// may use this information to construct Index.
-		coder->block->compressed_size = coder->compressed_size;
-		coder->block->uncompressed_size = coder->uncompressed_size;
-
-		coder->sequence = SEQ_PADDING;
-	}
-
-	// Fall through
-
-	case SEQ_PADDING:
-		// Pad Compressed Data to a multiple of four bytes. We can
-		// use coder->compressed_size for this since we don't need
-		// it for anything else anymore.
-		while (coder->compressed_size & 3) {
-			if (*out_pos >= out_size)
-				return LZMA_OK;
-
-			out[*out_pos] = 0x00;
-			++*out_pos;
-			++coder->compressed_size;
-		}
-
-		if (coder->block->check == LZMA_CHECK_NONE)
-			return LZMA_STREAM_END;
-
-		lzma_check_finish(&coder->check, coder->block->check);
-
-		coder->sequence = SEQ_CHECK;
-
-	// Fall through
-
-	case SEQ_CHECK: {
-		const size_t check_size = lzma_check_size(coder->block->check);
-		lzma_bufcpy(coder->check.buffer.u8, &coder->pos, check_size,
-				out, out_pos, out_size);
-		if (coder->pos < check_size)
-			return LZMA_OK;
-
-		memcpy(coder->block->raw_check, coder->check.buffer.u8,
-				check_size);
-		return LZMA_STREAM_END;
-	}
-	}
-
-	return LZMA_PROG_ERROR;
-}
-
-
-static void
-block_encoder_end(lzma_coder *coder, lzma_allocator *allocator)
-{
-	lzma_next_end(&coder->next, allocator);
-	lzma_free(coder, allocator);
-	return;
-}
-
-
-static lzma_ret
-block_encoder_update(lzma_coder *coder, lzma_allocator *allocator,
-		const lzma_filter *filters lzma_attribute((__unused__)),
-		const lzma_filter *reversed_filters)
-{
-	if (coder->sequence != SEQ_CODE)
-		return LZMA_PROG_ERROR;
-
-	return lzma_next_filter_update(
-			&coder->next, allocator, reversed_filters);
-}
-
-
-extern lzma_ret
-lzma_block_encoder_init(lzma_next_coder *next, lzma_allocator *allocator,
-		lzma_block *block)
-{
-	lzma_next_coder_init(&lzma_block_encoder_init, next, allocator);
-
-	if (block == NULL)
-		return LZMA_PROG_ERROR;
-
-	// The contents of the structure may depend on the version so
-	// check the version first.
-	if (block->version != 0)
-		return LZMA_OPTIONS_ERROR;
-
-	// If the Check ID is not supported, we cannot calculate the check and
-	// thus not create a proper Block.
-	if ((unsigned int)(block->check) > LZMA_CHECK_ID_MAX)
-		return LZMA_PROG_ERROR;
-
-	if (!lzma_check_is_supported(block->check))
-		return LZMA_UNSUPPORTED_CHECK;
-
-	// Allocate and initialize *next->coder if needed.
-	if (next->coder == NULL) {
-		next->coder = lzma_alloc(sizeof(lzma_coder), allocator);
-		if (next->coder == NULL)
-			return LZMA_MEM_ERROR;
-
-		next->code = &block_encode;
-		next->end = &block_encoder_end;
-		next->update = &block_encoder_update;
-		next->coder->next = LZMA_NEXT_CODER_INIT;
-	}
-
-	// Basic initializations
-	next->coder->sequence = SEQ_CODE;
-	next->coder->block = block;
-	next->coder->compressed_size = 0;
-	next->coder->uncompressed_size = 0;
-	next->coder->pos = 0;
-
-	// Initialize the check
-	lzma_check_init(&next->coder->check, block->check);
-
-	// Initialize the requested filters.
-	return lzma_raw_encoder_init(&next->coder->next, allocator,
-			block->filters);
-}
-
-
-extern LZMA_API(lzma_ret)
-lzma_block_encoder(lzma_stream *strm, lzma_block *block)
-{
-	lzma_next_strm_init(lzma_block_encoder_init, strm, block);
-
-	strm->internal->supported_actions[LZMA_RUN] = true;
-	strm->internal->supported_actions[LZMA_FINISH] = true;
-
-	return LZMA_OK;
-}
diff --git a/src/extra/xz/common/block_encoder.h b/src/extra/xz/common/block_encoder.h
deleted file mode 100644
index b9eff0b..0000000
--- a/src/extra/xz/common/block_encoder.h
+++ /dev/null
@@ -1,47 +0,0 @@
-///////////////////////////////////////////////////////////////////////////////
-//
-/// \file       block_encoder.h
-/// \brief      Encodes .xz Blocks
-//
-//  Author:     Lasse Collin
-//
-//  This file has been put into the public domain.
-//  You can do whatever you want with this file.
-//
-///////////////////////////////////////////////////////////////////////////////
-
-#ifndef LZMA_BLOCK_ENCODER_H
-#define LZMA_BLOCK_ENCODER_H
-
-#include "common.h"
-
-
-/// \brief      Biggest Compressed Size value that the Block encoder supports
-///
-/// The maximum size of a single Block is limited by the maximum size of
-/// a Stream, which in theory is 2^63 - 3 bytes (i.e. LZMA_VLI_MAX - 3).
-/// While the size is really big and no one should hit it in practice, we
-/// take it into account in some places anyway to catch some errors e.g. if
-/// application passes insanely big value to some function.
-///
-/// We could take into account the headers etc. to determine the exact
-/// maximum size of the Compressed Data field, but the complexity would give
-/// us nothing useful. Instead, limit the size of Compressed Data so that
-/// even with biggest possible Block Header and Check fields the total
-/// encoded size of the Block stays as a valid VLI. This doesn't guarantee
-/// that the size of the Stream doesn't grow too big, but that problem is
-/// taken care outside the Block handling code.
-///
-/// ~LZMA_VLI_C(3) is to guarantee that if we need padding at the end of
-/// the Compressed Data field, it will still stay in the proper limit.
-///
-/// This constant is in this file because it is needed in both
-/// block_encoder.c and block_buffer_encoder.c.
-#define COMPRESSED_SIZE_MAX ((LZMA_VLI_MAX - LZMA_BLOCK_HEADER_SIZE_MAX \
-		- LZMA_CHECK_SIZE_MAX) & ~LZMA_VLI_C(3))
-
-
-extern lzma_ret lzma_block_encoder_init(lzma_next_coder *next,
-		lzma_allocator *allocator, lzma_block *block);
-
-#endif
diff --git a/src/extra/xz/common/block_header_decoder.c b/src/extra/xz/common/block_header_decoder.c
deleted file mode 100644
index 2c9573e..0000000
--- a/src/extra/xz/common/block_header_decoder.c
+++ /dev/null
@@ -1,116 +0,0 @@
-///////////////////////////////////////////////////////////////////////////////
-//
-/// \file       block_header_decoder.c
-/// \brief      Decodes Block Header from .xz files
-//
-//  Author:     Lasse Collin
-//
-//  This file has been put into the public domain.
-//  You can do whatever you want with this file.
-//
-///////////////////////////////////////////////////////////////////////////////
-
-#include "common.h"
-#include "check.h"
-
-
-static void
-free_properties(lzma_block *block, lzma_allocator *allocator)
-{
-	// Free allocated filter options. The last array member is not
-	// touched after the initialization in the beginning of
-	// lzma_block_header_decode(), so we don't need to touch that here.
-	for (size_t i = 0; i < LZMA_FILTERS_MAX; ++i) {
-		lzma_free(block->filters[i].options, allocator);
-		block->filters[i].id = LZMA_VLI_UNKNOWN;
-		block->filters[i].options = NULL;
-	}
-
-	return;
-}
-
-
-extern LZMA_API(lzma_ret)
-lzma_block_header_decode(lzma_block *block,
-		lzma_allocator *allocator, const uint8_t *in)
-{
-	// NOTE: We consider the header to be corrupt not only when the
-	// CRC32 doesn't match, but also when variable-length integers
-	// are invalid or over 63 bits, or if the header is too small
-	// to contain the claimed information.
-
-	// Initialize the filter options array. This way the caller can
-	// safely free() the options even if an error occurs in this function.
-	for (size_t i = 0; i <= LZMA_FILTERS_MAX; ++i) {
-		block->filters[i].id = LZMA_VLI_UNKNOWN;
-		block->filters[i].options = NULL;
-	}
-
-	// Always zero for now.
-	block->version = 0;
-
-	// Validate Block Header Size and Check type. The caller must have
-	// already set these, so it is a programming error if this test fails.
-	if (lzma_block_header_size_decode(in[0]) != block->header_size
-			|| (unsigned int)(block->check) > LZMA_CHECK_ID_MAX)
-		return LZMA_PROG_ERROR;
-
-	// Exclude the CRC32 field.
-	const size_t in_size = block->header_size - 4;
-
-	// Verify CRC32
-	if (lzma_crc32(in, in_size, 0) != unaligned_read32le(in + in_size))
-		return LZMA_DATA_ERROR;
-
-	// Check for unsupported flags.
-	if (in[1] & 0x3C)
-		return LZMA_OPTIONS_ERROR;
-
-	// Start after the Block Header Size and Block Flags fields.
-	size_t in_pos = 2;
-
-	// Compressed Size
-	if (in[1] & 0x40) {
-		return_if_error(lzma_vli_decode(&block->compressed_size,
-				NULL, in, &in_pos, in_size));
-
-		// Validate Compressed Size. This checks that it isn't zero
-		// and that the total size of the Block is a valid VLI.
-		if (lzma_block_unpadded_size(block) == 0)
-			return LZMA_DATA_ERROR;
-	} else {
-		block->compressed_size = LZMA_VLI_UNKNOWN;
-	}
-
-	// Uncompressed Size
-	if (in[1] & 0x80)
-		return_if_error(lzma_vli_decode(&block->uncompressed_size,
-				NULL, in, &in_pos, in_size));
-	else
-		block->uncompressed_size = LZMA_VLI_UNKNOWN;
-
-	// Filter Flags
-	const size_t filter_count = (in[1] & 3) + 1;
-	for (size_t i = 0; i < filter_count; ++i) {
-		const lzma_ret ret = lzma_filter_flags_decode(
-				&block->filters[i], allocator,
-				in, &in_pos, in_size);
-		if (ret != LZMA_OK) {
-			free_properties(block, allocator);
-			return ret;
-		}
-	}
-
-	// Padding
-	while (in_pos < in_size) {
-		if (in[in_pos++] != 0x00) {
-			free_properties(block, allocator);
-
-			// Possibly some new field present so use
-			// LZMA_OPTIONS_ERROR instead of LZMA_DATA_ERROR.
-			return LZMA_OPTIONS_ERROR;
-		}
-	}
-
-	return LZMA_OK;
-}
diff --git a/src/extra/xz/common/block_header_encoder.c b/src/extra/xz/common/block_header_encoder.c
deleted file mode 100644
index 707dd0c..0000000
--- a/src/extra/xz/common/block_header_encoder.c
+++ /dev/null
@@ -1,132 +0,0 @@
-///////////////////////////////////////////////////////////////////////////////
-//
-/// \file       block_header_encoder.c
-/// \brief      Encodes Block Header for .xz files
-//
-//  Author:     Lasse Collin
-//
-//  This file has been put into the public domain.
-//  You can do whatever you want with this file.
-//
-///////////////////////////////////////////////////////////////////////////////
-
-#include "common.h"
-#include "check.h"
-
-
-extern LZMA_API(lzma_ret)
-lzma_block_header_size(lzma_block *block)
-{
-	if (block->version != 0)
-		return LZMA_OPTIONS_ERROR;
-
-	// Block Header Size + Block Flags + CRC32.
-	uint32_t size = 1 + 1 + 4;
-
-	// Compressed Size
-	if (block->compressed_size != LZMA_VLI_UNKNOWN) {
-		const uint32_t add = lzma_vli_size(block->compressed_size);
-		if (add == 0 || block->compressed_size == 0)
-			return LZMA_PROG_ERROR;
-
-		size += add;
-	}
-
-	// Uncompressed Size
-	if (block->uncompressed_size != LZMA_VLI_UNKNOWN) {
-		const uint32_t add = lzma_vli_size(block->uncompressed_size);
-		if (add == 0)
-			return LZMA_PROG_ERROR;
-
-		size += add;
-	}
-
-	// List of Filter Flags
-	if (block->filters == NULL || block->filters[0].id == LZMA_VLI_UNKNOWN)
-		return LZMA_PROG_ERROR;
-
-	for (size_t i = 0; block->filters[i].id != LZMA_VLI_UNKNOWN; ++i) {
-		// Don't allow too many filters.
-		if (i == LZMA_FILTERS_MAX)
-			return LZMA_PROG_ERROR;
-
-		uint32_t add;
-		return_if_error(lzma_filter_flags_size(&add,
-				block->filters + i));
-
-		size += add;
-	}
-
-	// Pad to a multiple of four bytes.
-	block->header_size = (size + 3) & ~UINT32_C(3);
-
-	// NOTE: We don't verify that the encoded size of the Block stays
-	// within limits. This is because it is possible that we are called
-	// with exaggerated Compressed Size (e.g. LZMA_VLI_MAX) to reserve
-	// space for Block Header, and later called again with lower,
-	// real values.
-
-	return LZMA_OK;
-}
-
-
-extern LZMA_API(lzma_ret)
-lzma_block_header_encode(const lzma_block *block, uint8_t *out)
-{
-	// Validate everything but filters.
-	if (lzma_block_unpadded_size(block) == 0
-			|| !lzma_vli_is_valid(block->uncompressed_size))
-		return LZMA_PROG_ERROR;
-
-	// Indicate the size of the buffer _excluding_ the CRC32 field.
-	const size_t out_size = block->header_size - 4;
-
-	// Store the Block Header Size.
-	out[0] = out_size / 4;
-
-	// We write Block Flags in pieces.
-	out[1] = 0x00;
-	size_t out_pos = 2;
-
-	// Compressed Size
-	if (block->compressed_size != LZMA_VLI_UNKNOWN) {
-		return_if_error(lzma_vli_encode(block->compressed_size, NULL,
-				out, &out_pos, out_size));
-
-		out[1] |= 0x40;
-	}
-
-	// Uncompressed Size
-	if (block->uncompressed_size != LZMA_VLI_UNKNOWN) {
-		return_if_error(lzma_vli_encode(block->uncompressed_size, NULL,
-				out, &out_pos, out_size));
-
-		out[1] |= 0x80;
-	}
-
-	// Filter Flags
-	if (block->filters == NULL || block->filters[0].id == LZMA_VLI_UNKNOWN)
-		return LZMA_PROG_ERROR;
-
-	size_t filter_count = 0;
-	do {
-		// There can be a maximum of four filters.
-		if (filter_count == LZMA_FILTERS_MAX)
-			return LZMA_PROG_ERROR;
-
-		return_if_error(lzma_filter_flags_encode(
-				block->filters + filter_count,
-				out, &out_pos, out_size));
-
-	} while (block->filters[++filter_count].id != LZMA_VLI_UNKNOWN);
-
-	out[1] |= filter_count - 1;
-
-	// Padding
-	memzero(out + out_pos, out_size - out_pos);
-
-	// CRC32
-	unaligned_write32le(out + out_size, lzma_crc32(out, out_size, 0));
-
-	return LZMA_OK;
-}
diff --git a/src/extra/xz/common/block_util.c b/src/extra/xz/common/block_util.c
deleted file mode 100644
index 62c9345..0000000
--- a/src/extra/xz/common/block_util.c
+++ /dev/null
@@ -1,90 +0,0 @@
-///////////////////////////////////////////////////////////////////////////////
-//
-/// \file       block_header.c
-/// \brief      Utility functions to handle lzma_block
-//
-//  Author:     Lasse Collin
-//
-//  This file has been put into the public domain.
-//  You can do whatever you want with this file.
-//
-///////////////////////////////////////////////////////////////////////////////
-
-#include "common.h"
-#include "index.h"
-
-
-extern LZMA_API(lzma_ret)
-lzma_block_compressed_size(lzma_block *block, lzma_vli unpadded_size)
-{
-	// Validate everything but Uncompressed Size and filters.
-	if (lzma_block_unpadded_size(block) == 0)
-		return LZMA_PROG_ERROR;
-
-	const uint32_t container_size = block->header_size
-			+ lzma_check_size(block->check);
-
-	// Validate that Compressed Size will be greater than zero.
-	if (unpadded_size <= container_size)
-		return LZMA_DATA_ERROR;
-
-	// Calculate what Compressed Size is supposed to be.
-	// If Compressed Size was present in Block Header,
-	// compare that the new value matches it.
-	const lzma_vli compressed_size = unpadded_size - container_size;
-	if (block->compressed_size != LZMA_VLI_UNKNOWN
-			&& block->compressed_size != compressed_size)
-		return LZMA_DATA_ERROR;
-
-	block->compressed_size = compressed_size;
-
-	return LZMA_OK;
-}
-
-
-extern LZMA_API(lzma_vli)
-lzma_block_unpadded_size(const lzma_block *block)
-{
-	// Validate the values that we are interested in i.e. all but
-	// Uncompressed Size and the filters.
-	//
-	// NOTE: This function is used for validation too, so it is
-	// essential that these checks are always done even if
-	// Compressed Size is unknown.
-	if (block == NULL || block->version != 0
-			|| block->header_size < LZMA_BLOCK_HEADER_SIZE_MIN
-			|| block->header_size > LZMA_BLOCK_HEADER_SIZE_MAX
-			|| (block->header_size & 3)
-			|| !lzma_vli_is_valid(block->compressed_size)
-			|| block->compressed_size == 0
-			|| (unsigned int)(block->check) > LZMA_CHECK_ID_MAX)
-		return 0;
-
-	// If Compressed Size is unknown, return that we cannot know
-	// size of the Block either.
-	if (block->compressed_size == LZMA_VLI_UNKNOWN)
-		return LZMA_VLI_UNKNOWN;
-
-	// Calculate Unpadded Size and validate it.
-	const lzma_vli unpadded_size = block->compressed_size
-				+ block->header_size
-				+ lzma_check_size(block->check);
-
-	assert(unpadded_size >= UNPADDED_SIZE_MIN);
-	if (unpadded_size > UNPADDED_SIZE_MAX)
-		return 0;
-
-	return unpadded_size;
-}
-
-
-extern LZMA_API(lzma_vli)
-lzma_block_total_size(const lzma_block *block)
-{
-	lzma_vli unpadded_size = lzma_block_unpadded_size(block);
-
-	if (unpadded_size != LZMA_VLI_UNKNOWN)
-		unpadded_size = vli_ceil4(unpadded_size);
-
-	return unpadded_size;
-}
diff --git a/src/extra/xz/common/bsr.h b/src/extra/xz/common/bsr.h
deleted file mode 100644
index bef8641..0000000
--- a/src/extra/xz/common/bsr.h
+++ /dev/null
@@ -1,60 +0,0 @@
-///////////////////////////////////////////////////////////////////////////////
-//
-/// \file       bsr.h
-/// \brief      Bit scan reverse
-//
-//  Author:     Lasse Collin
-//
-//  This file has been put into the public domain.
-//  You can do whatever you want with this file.
-//
-///////////////////////////////////////////////////////////////////////////////
-
-#ifndef LZMA_BSR_H
-#define LZMA_BSR_H
-
-// NOTE: Both input and output variables for lzma_bsr must be uint32_t.
-
-#if defined(__GNUC__) && (defined (HAVE_ASM_X86) || defined(HAVE_ASM_X86_64))
-#	define lzma_bsr(dest, n) \
-		__asm__("bsrl %1, %0" : "=r" (dest) : "rm" (n))
-
-#else
-#	define lzma_bsr(dest, n) dest = lzma_bsr_helper(n)
-
-static inline uint32_t
-lzma_bsr_helper(uint32_t n)
-{
-	assert(n != 0);
-
-	uint32_t i = 31;
-
-	if ((n & UINT32_C(0xFFFF0000)) == 0) {
-		n <<= 16;
-		i = 15;
-	}
-
-	if ((n & UINT32_C(0xFF000000)) == 0) {
-		n <<= 8;
-		i -= 8;
-	}
-
-	if ((n & UINT32_C(0xF0000000)) == 0) {
-		n <<= 4;
-		i -= 4;
-	}
-
-	if ((n & UINT32_C(0xC0000000)) == 0) {
-		n <<= 2;
-		i -= 2;
-	}
-
-	if ((n & UINT32_C(0x80000000)) == 0)
-		--i;
-
-	return i;
-}
-
-#endif
-
-#endif
diff --git a/src/extra/xz/common/bswap.h b/src/extra/xz/common/bswap.h
deleted file mode 100644
index c8cf125..0000000
--- a/src/extra/xz/common/bswap.h
+++ /dev/null
@@ -1,52 +0,0 @@
-///////////////////////////////////////////////////////////////////////////////
-//
-/// \file       bswap.h
-/// \brief      Byte swapping
-//
-//  Author:     Lasse Collin
-//
-//  This file has been put into the public domain.
-//  You can do whatever you want with this file.
-//
-///////////////////////////////////////////////////////////////////////////////
-
-#ifndef LZMA_BSWAP_H
-#define LZMA_BSWAP_H
-
-// NOTE: We assume that config.h is already #included.
-
-// At least glibc has byteswap.h which contains inline assembly code for
-// byteswapping. Some systems have byteswap.h but lack one or more of the
-// bswap_xx macros/functions, which is why we check them separately even
-// if byteswap.h is available.
-
-#ifdef HAVE_BYTESWAP_H
-#	include <byteswap.h>
-#endif
-
-#ifndef HAVE_BSWAP_16
-#	define bswap_16(num) \
-		(((num) << 8) | ((num) >> 8))
-#endif
-
-#ifndef HAVE_BSWAP_32
-#	define bswap_32(num) \
-		( (((num) << 24)                       ) \
-		| (((num) <<  8) & UINT32_C(0x00FF0000)) \
-		| (((num) >>  8) & UINT32_C(0x0000FF00)) \
-		| (((num) >> 24)                       ) )
-#endif
-
-#ifndef HAVE_BSWAP_64
-#	define bswap_64(num) \
-		( (((num) << 56)                               ) \
-		| (((num) << 40) & UINT64_C(0x00FF000000000000)) \
-		| (((num) << 24) & UINT64_C(0x0000FF0000000000)) \
-		| (((num) <<  8) & UINT64_C(0x000000FF00000000)) \
-		| (((num) >>  8) & UINT64_C(0x00000000FF000000)) \
-		| (((num) >> 24) & UINT64_C(0x0000000000FF0000)) \
-		| (((num) >> 40) & UINT64_C(0x000000000000FF00)) \
-		| (((num) >> 56)                               ) )
-#endif
-
-#endif
diff --git a/src/extra/xz/common/common.c b/src/extra/xz/common/common.c
deleted file mode 100644
index 0408e15..0000000
--- a/src/extra/xz/common/common.c
+++ /dev/null
@@ -1,388 +0,0 @@
-///////////////////////////////////////////////////////////////////////////////
-//
-/// \file       common.h
-/// \brief      Common functions needed in many places in liblzma
-//
-//  Author:     Lasse Collin
-//
-//  This file has been put into the public domain.
-//  You can do whatever you want with this file.
-//
-///////////////////////////////////////////////////////////////////////////////
-
-#include "common.h"
-
-
-/////////////
-// Version //
-/////////////
-
-extern LZMA_API(uint32_t)
-lzma_version_number(void)
-{
-	return LZMA_VERSION;
-}
-
-
-extern LZMA_API(const char *)
-lzma_version_string(void)
-{
-	return LZMA_VERSION_STRING;
-}
-
-
-///////////////////////
-// Memory allocation //
-///////////////////////
-
-extern void * lzma_attribute((malloc))
-lzma_alloc(size_t size, lzma_allocator *allocator)
-{
-	// Some malloc() variants return NULL if called with size == 0.
-	if (size == 0)
-		size = 1;
-
-	void *ptr;
-
-	if (allocator != NULL && allocator->alloc != NULL)
-		ptr = allocator->alloc(allocator->opaque, 1, size);
-	else
-		ptr = malloc(size);
-
-	return ptr;
-}
-
-
-extern void
-lzma_free(void *ptr, lzma_allocator *allocator)
-{
-	if (allocator != NULL && allocator->free != NULL)
-		allocator->free(allocator->opaque, ptr);
-	else
-		free(ptr);
-
-	return;
-}
-
-
-//////////
-// Misc //
-//////////
-
-extern size_t
-lzma_bufcpy(const uint8_t *restrict in, size_t *restrict in_pos,
-		size_t in_size, uint8_t *restrict out,
-		size_t *restrict out_pos, size_t out_size)
-{
-	const size_t in_avail = in_size - *in_pos;
-	const size_t out_avail = out_size - *out_pos;
-	const size_t copy_size = my_min(in_avail, out_avail);
-
-	memcpy(out + *out_pos, in + *in_pos, copy_size);
-
-	*in_pos += copy_size;
-	*out_pos += copy_size;
-
-	return copy_size;
-}
-
-
-extern lzma_ret
-lzma_next_filter_init(lzma_next_coder *next, lzma_allocator *allocator,
-		const lzma_filter_info *filters)
-{
-	lzma_next_coder_init(filters[0].init, next, allocator);
-	next->id = filters[0].id;
-	return filters[0].init == NULL
-			? LZMA_OK : filters[0].init(next, allocator, filters);
-}
-
-
-extern lzma_ret
-lzma_next_filter_update(lzma_next_coder *next, lzma_allocator *allocator,
-		const lzma_filter *reversed_filters)
-{
-	// Check that the application isn't trying to change the Filter ID.
-	// End of filters is indicated with LZMA_VLI_UNKNOWN in both
-	// reversed_filters[0].id and next->id.
-	if (reversed_filters[0].id != next->id)
-		return LZMA_PROG_ERROR;
-
-	if (reversed_filters[0].id == LZMA_VLI_UNKNOWN)
-		return LZMA_OK;
-
-	assert(next->update != NULL);
-	return next->update(next->coder, allocator, NULL, reversed_filters);
-}
-
-
-extern void
-lzma_next_end(lzma_next_coder *next, lzma_allocator *allocator)
-{
-	if (next->init != (uintptr_t)(NULL)) {
-		// To avoid tiny end functions that simply call
-		// lzma_free(coder, allocator), we allow leaving next->end
-		// NULL and call lzma_free() here.
-		if (next->end != NULL)
-			next->end(next->coder, allocator);
-		else
-			lzma_free(next->coder, allocator);
-
-		// Reset the variables so the we don't accidentally think
-		// that it is an already initialized coder.
-		*next = LZMA_NEXT_CODER_INIT;
-	}
-
-	return;
-}
-
-
-//////////////////////////////////////
-// External to internal API wrapper //
-//////////////////////////////////////
-
-extern lzma_ret
-lzma_strm_init(lzma_stream *strm)
-{
-	if (strm == NULL)
-		return LZMA_PROG_ERROR;
-
-	if (strm->internal == NULL) {
-		strm->internal = lzma_alloc(sizeof(lzma_internal),
-				strm->allocator);
-		if (strm->internal == NULL)
-			return LZMA_MEM_ERROR;
-
-		strm->internal->next = LZMA_NEXT_CODER_INIT;
-	}
-
-	strm->internal->supported_actions[LZMA_RUN] = false;
-	strm->internal->supported_actions[LZMA_SYNC_FLUSH] = false;
-	strm->internal->supported_actions[LZMA_FULL_FLUSH] = false;
-	strm->internal->supported_actions[LZMA_FINISH] = false;
-	strm->internal->sequence = ISEQ_RUN;
-	strm->internal->allow_buf_error = false;
-
-	strm->total_in = 0;
-	strm->total_out = 0;
-
-	return LZMA_OK;
-}
-
-
-extern LZMA_API(lzma_ret)
-lzma_code(lzma_stream *strm, lzma_action action)
-{
-	// Sanity checks
-	if ((strm->next_in == NULL && strm->avail_in != 0)
-			|| (strm->next_out == NULL && strm->avail_out != 0)
-			|| strm->internal == NULL
-			|| strm->internal->next.code == NULL
-			|| (unsigned int)(action) > LZMA_FINISH
-			|| !strm->internal->supported_actions[action])
-		return LZMA_PROG_ERROR;
-
-	// Check if unsupported members have been set to non-zero or non-NULL,
-	// which would indicate that some new feature is wanted.
-	if (strm->reserved_ptr1 != NULL
-			|| strm->reserved_ptr2 != NULL
-			|| strm->reserved_ptr3 != NULL
-			|| strm->reserved_ptr4 != NULL
-			|| strm->reserved_int1 != 0
-			|| strm->reserved_int2 != 0
-			|| strm->reserved_int3 != 0
-			|| strm->reserved_int4 != 0
-			|| strm->reserved_enum1 != LZMA_RESERVED_ENUM
-			|| strm->reserved_enum2 != LZMA_RESERVED_ENUM)
-		return LZMA_OPTIONS_ERROR;
-
-	switch (strm->internal->sequence) {
-	case ISEQ_RUN:
-		switch (action) {
-		case LZMA_RUN:
-			break;
-
-		case LZMA_SYNC_FLUSH:
-			strm->internal->sequence = ISEQ_SYNC_FLUSH;
-			break;
-
-		case LZMA_FULL_FLUSH:
-			strm->internal->sequence = ISEQ_FULL_FLUSH;
-			break;
-
-		case LZMA_FINISH:
-			strm->internal->sequence = ISEQ_FINISH;
-			break;
-		}
-
-		break;
-
-	case ISEQ_SYNC_FLUSH:
-		// The same action must be used until we return
-		// LZMA_STREAM_END, and the amount of input must not change.
-		if (action != LZMA_SYNC_FLUSH
-				|| strm->internal->avail_in != strm->avail_in)
-			return LZMA_PROG_ERROR;
-
-		break;
-
-	case ISEQ_FULL_FLUSH:
-		if (action != LZMA_FULL_FLUSH
-				|| strm->internal->avail_in != strm->avail_in)
-			return LZMA_PROG_ERROR;
-
-		break;
-
-	case ISEQ_FINISH:
-		if (action != LZMA_FINISH
-				|| strm->internal->avail_in != strm->avail_in)
-			return LZMA_PROG_ERROR;
-
-		break;
-
-	case ISEQ_END:
-		return LZMA_STREAM_END;
-
-	case ISEQ_ERROR:
-	default:
-		return LZMA_PROG_ERROR;
-	}
-
-	size_t in_pos = 0;
-	size_t out_pos = 0;
-	lzma_ret ret = strm->internal->next.code(
-			strm->internal->next.coder, strm->allocator,
-			strm->next_in, &in_pos, strm->avail_in,
-			strm->next_out, &out_pos, strm->avail_out, action);
-
-	strm->next_in += in_pos;
-	strm->avail_in -= in_pos;
-	strm->total_in += in_pos;
-
-	strm->next_out += out_pos;
-	strm->avail_out -= out_pos;
-	strm->total_out += out_pos;
-
-	strm->internal->avail_in = strm->avail_in;
-
-	switch (ret) {
-	case LZMA_OK:
-		// Don't return LZMA_BUF_ERROR when it happens the first time.
-		// This is to avoid returning LZMA_BUF_ERROR when avail_out
-		// was zero but still there was no more data left to written
-		// to next_out.
-		if (out_pos == 0 && in_pos == 0) {
-			if (strm->internal->allow_buf_error)
-				ret = LZMA_BUF_ERROR;
-			else
-				strm->internal->allow_buf_error = true;
-		} else {
-			strm->internal->allow_buf_error = false;
-		}
-		break;
-
-	case LZMA_STREAM_END:
-		if (strm->internal->sequence == ISEQ_SYNC_FLUSH
-				|| strm->internal->sequence == ISEQ_FULL_FLUSH)
-			strm->internal->sequence = ISEQ_RUN;
-		else
-			strm->internal->sequence = ISEQ_END;
-
-	// Fall through
-
-	case LZMA_NO_CHECK:
-	case LZMA_UNSUPPORTED_CHECK:
-	case LZMA_GET_CHECK:
-	case LZMA_MEMLIMIT_ERROR:
-		// Something else than LZMA_OK, but not a fatal error,
-		// that is, coding may be continued (except if ISEQ_END).
-		strm->internal->allow_buf_error = false;
-		break;
-
-	default:
-		// All the other errors are fatal; coding cannot be continued.
-		assert(ret != LZMA_BUF_ERROR);
-		strm->internal->sequence = ISEQ_ERROR;
-		break;
-	}
-
-	return ret;
-}
-
-
-extern LZMA_API(void)
-lzma_end(lzma_stream *strm)
-{
-	if (strm != NULL && strm->internal != NULL) {
-		lzma_next_end(&strm->internal->next, strm->allocator);
-		lzma_free(strm->internal, strm->allocator);
-		strm->internal = NULL;
-	}
-
-	return;
-}
-
-
-extern LZMA_API(lzma_check)
-lzma_get_check(const lzma_stream *strm)
-{
-	// Return LZMA_CHECK_NONE if we cannot know the check type.
-	// It's a bug in the application if this happens.
-	if (strm->internal->next.get_check == NULL)
-		return LZMA_CHECK_NONE;
-
-	return strm->internal->next.get_check(strm->internal->next.coder);
-}
-
-
-extern LZMA_API(uint64_t)
-lzma_memusage(const lzma_stream *strm)
-{
-	uint64_t memusage;
-	uint64_t old_memlimit;
-
-	if (strm == NULL || strm->internal == NULL
-			|| strm->internal->next.memconfig == NULL
-			|| strm->internal->next.memconfig(
-				strm->internal->next.coder,
-				&memusage, &old_memlimit, 0) != LZMA_OK)
-		return 0;
-
-	return memusage;
-}
-
-
-extern LZMA_API(uint64_t)
-lzma_memlimit_get(const lzma_stream *strm)
-{
-	uint64_t old_memlimit;
-	uint64_t memusage;
-
-	if (strm == NULL || strm->internal == NULL
-			|| strm->internal->next.memconfig == NULL
-			|| strm->internal->next.memconfig(
-				strm->internal->next.coder,
-				&memusage, &old_memlimit, 0) != LZMA_OK)
-		return 0;
-
-	return old_memlimit;
-}
-
-
-extern LZMA_API(lzma_ret)
-lzma_memlimit_set(lzma_stream *strm, uint64_t new_memlimit)
-{
-	// Dummy variables to simplify memconfig functions
-	uint64_t old_memlimit;
-	uint64_t memusage;
-
-	if (strm == NULL || strm->internal == NULL
-			|| strm->internal->next.memconfig == NULL)
-		return LZMA_PROG_ERROR;
-
-	if (new_memlimit != 0 && new_memlimit < LZMA_MEMUSAGE_BASE)
-		return LZMA_MEMLIMIT_ERROR;
-
-	return strm->internal->next.memconfig(strm->internal->next.coder,
-			&memusage, &old_memlimit, new_memlimit);
-}
diff --git a/src/extra/xz/common/common.h b/src/extra/xz/common/common.h
deleted file mode 100644
index c0aec00..0000000
--- a/src/extra/xz/common/common.h
+++ /dev/null
@@ -1,282 +0,0 @@
-///////////////////////////////////////////////////////////////////////////////
-//
-/// \file       common.h
-/// \brief      Definitions common to the whole liblzma library
-//
-//  Author:     Lasse Collin
-//
-//  This file has been put into the public domain.
-//  You can do whatever you want with this file.
-//
-///////////////////////////////////////////////////////////////////////////////
-
-#ifndef LZMA_COMMON_H
-#define LZMA_COMMON_H
-
-#include "sysdefs.h"
-#include "mythread.h"
-#include "tuklib_integer.h"
-
-#if defined(_WIN32) || defined(__CYGWIN__)
-#	ifdef DLL_EXPORT
-#		define LZMA_API_EXPORT __declspec(dllexport)
-#	else
-#		define LZMA_API_EXPORT
-#	endif
-// Don't use ifdef or defined() below.
-#else
-#	define LZMA_API_EXPORT
-#endif
-
-#define LZMA_API(type) LZMA_API_EXPORT type LZMA_API_CALL
-
-#include "lzma.h"
-
-// These allow helping the compiler in some often-executed branches, whose
-// result is almost always the same.
-#ifdef __GNUC__
-#	define likely(expr) __builtin_expect(expr, true)
-#	define unlikely(expr) __builtin_expect(expr, false)
-#else
-#	define likely(expr) (expr)
-#	define unlikely(expr) (expr)
-#endif
-
-
-/// Size of temporary buffers needed in some filters
-#define LZMA_BUFFER_SIZE 4096
-
-
-/// Starting value for memory usage estimates. Instead of calculating size
-/// of _every_ structure and taking into account malloc() overhead etc., we
-/// add a base size to all memory usage estimates. It's not very accurate
-/// but should be easily good enough.
-#define LZMA_MEMUSAGE_BASE (UINT64_C(1) << 15)
-
-/// Start of internal Filter ID space. These IDs must never be used
-/// in Streams.
-#define LZMA_FILTER_RESERVED_START (LZMA_VLI_C(1) << 62)
-
-
-/// Supported flags that can be passed to lzma_stream_decoder()
-/// or lzma_auto_decoder().
-#define LZMA_SUPPORTED_FLAGS \
-	( LZMA_TELL_NO_CHECK \
-	| LZMA_TELL_UNSUPPORTED_CHECK \
-	| LZMA_TELL_ANY_CHECK \
-	| LZMA_CONCATENATED )
-
-
-/// Type of encoder/decoder specific data; the actual structure is defined
-/// differently in different coders.
-typedef struct lzma_coder_s lzma_coder;
-
-typedef struct lzma_next_coder_s lzma_next_coder;
-
-typedef struct lzma_filter_info_s lzma_filter_info;
-
-
-/// Type of a function used to initialize a filter encoder or decoder
-typedef lzma_ret (*lzma_init_function)(
-		lzma_next_coder *next, lzma_allocator *allocator,
-		const lzma_filter_info *filters);
-
-/// Type of a function to do some kind of coding work (filters, Stream,
-/// Block encoders/decoders etc.). Some special coders use don't use both
-/// input and output buffers, but for simplicity they still use this same
-/// function prototype.
-typedef lzma_ret (*lzma_code_function)(
-		lzma_coder *coder, lzma_allocator *allocator,
-		const uint8_t *restrict in, size_t *restrict in_pos,
-		size_t in_size, uint8_t *restrict out,
-		size_t *restrict out_pos, size_t out_size,
-		lzma_action action);
-
-/// Type of a function to free the memory allocated for the coder
-typedef void (*lzma_end_function)(
-		lzma_coder *coder, lzma_allocator *allocator);
-
-
-/// Raw coder validates and converts an array of lzma_filter structures to
-/// an array of lzma_filter_info structures. This array is used with
-/// lzma_next_filter_init to initialize the filter chain.
-struct lzma_filter_info_s {
-	/// Filter ID. This is used only by the encoder
-	/// with lzma_filters_update().
-	lzma_vli id;
-
-	/// Pointer to function used to initialize the filter.
-	/// This is NULL to indicate end of array.
-	lzma_init_function init;
-
-	/// Pointer to filter's options structure
-	void *options;
-};
-
-
-/// Hold data and function pointers of the next filter in the chain.
-struct lzma_next_coder_s {
-	/// Pointer to coder-specific data
-	lzma_coder *coder;
-
-	/// Filter ID. This is LZMA_VLI_UNKNOWN when this structure doesn't
-	/// point to a filter coder.
-	lzma_vli id;
-
-	/// "Pointer" to init function. This is never called here.
-	/// We need only to detect if we are initializing a coder
-	/// that was allocated earlier. See lzma_next_coder_init and
-	/// lzma_next_strm_init macros in this file.
-	uintptr_t init;
-
-	/// Pointer to function to do the actual coding
-	lzma_code_function code;
-
-	/// Pointer to function to free lzma_next_coder.coder. This can
-	/// be NULL; in that case, lzma_free is called to free
-	/// lzma_next_coder.coder.
-	lzma_end_function end;
-
-	/// Pointer to function to return the type of the integrity check.
-	/// Most coders won't support this.
-	lzma_check (*get_check)(const lzma_coder *coder);
-
-	/// Pointer to function to get and/or change the memory usage limit.
-	/// If new_memlimit == 0, the limit is not changed.
-	lzma_ret (*memconfig)(lzma_coder *coder, uint64_t *memusage,
-			uint64_t *old_memlimit, uint64_t new_memlimit);
-
-	/// Update the filter-specific options or the whole filter chain
-	/// in the encoder.
-	lzma_ret (*update)(lzma_coder *coder, lzma_allocator *allocator,
-			const lzma_filter *filters,
-			const lzma_filter *reversed_filters);
-};
-
-
-/// Macro to initialize lzma_next_coder structure
-#define LZMA_NEXT_CODER_INIT \
-	(lzma_next_coder){ \
-		.coder = NULL, \
-		.init = (uintptr_t)(NULL), \
-		.id = LZMA_VLI_UNKNOWN, \
-		.code = NULL, \
-		.end = NULL, \
-		.get_check = NULL, \
-		.memconfig = NULL, \
-		.update = NULL, \
-	}
-
-
-/// Internal data for lzma_strm_init, lzma_code, and lzma_end. A pointer to
-/// this is stored in lzma_stream.
-struct lzma_internal_s {
-	/// The actual coder that should do something useful
-	lzma_next_coder next;
-
-	/// Track the state of the coder. This is used to validate arguments
-	/// so that the actual coders can rely on e.g. that LZMA_SYNC_FLUSH
-	/// is used on every call to lzma_code until next.code has returned
-	/// LZMA_STREAM_END.
-	enum {
-		ISEQ_RUN,
-		ISEQ_SYNC_FLUSH,
-		ISEQ_FULL_FLUSH,
-		ISEQ_FINISH,
-		ISEQ_END,
-		ISEQ_ERROR,
-	} sequence;
-
-	/// A copy of lzma_stream avail_in. This is used to verify that the
-	/// amount of input doesn't change once e.g. LZMA_FINISH has been
-	/// used.
-	size_t avail_in;
-
-	/// Indicates which lzma_action values are allowed by next.code.
-	bool supported_actions[4];
-
-	/// If true, lzma_code will return LZMA_BUF_ERROR if no progress was
-	/// made (no input consumed and no output produced by next.code).
-	bool allow_buf_error;
-};
-
-
-/// Allocates memory
-extern void *lzma_alloc(size_t size, lzma_allocator *allocator)
-		lzma_attribute((malloc));
-
-/// Frees memory
-extern void lzma_free(void *ptr, lzma_allocator *allocator);
-
-
-/// Allocates strm->internal if it is NULL, and initializes *strm and
-/// strm->internal. This function is only called via lzma_next_strm_init macro.
-extern lzma_ret lzma_strm_init(lzma_stream *strm);
-
-/// Initializes the next filter in the chain, if any. This takes care of
-/// freeing the memory of previously initialized filter if it is different
-/// than the filter being initialized now. This way the actual filter
-/// initialization functions don't need to use lzma_next_coder_init macro.
-extern lzma_ret lzma_next_filter_init(lzma_next_coder *next,
-		lzma_allocator *allocator, const lzma_filter_info *filters);
-
-/// Update the next filter in the chain, if any. This checks that
-/// the application is not trying to change the Filter IDs.
-extern lzma_ret lzma_next_filter_update(
-		lzma_next_coder *next, lzma_allocator *allocator,
-		const lzma_filter *reversed_filters);
-
-/// Frees the memory allocated for next->coder either using next->end or,
-/// if next->end is NULL, using lzma_free.
-extern void lzma_next_end(lzma_next_coder *next, lzma_allocator *allocator);
-
-
-/// Copy as much data as possible from in[] to out[] and update *in_pos
-/// and *out_pos accordingly. Returns the number of bytes copied.
-extern size_t lzma_bufcpy(const uint8_t *restrict in, size_t *restrict in_pos,
-		size_t in_size, uint8_t *restrict out,
-		size_t *restrict out_pos, size_t out_size);
-
-
-/// \brief      Return if expression doesn't evaluate to LZMA_OK
-///
-/// There are several situations where we want to return immediately
-/// with the value of expr if it isn't LZMA_OK. This macro shortens
-/// the code a little.
-#define return_if_error(expr) \
-do { \
-	const lzma_ret ret_ = (expr); \
-	if (ret_ != LZMA_OK) \
-		return ret_; \
-} while (0)
-
-
-/// If next isn't already initialized, free the previous coder. Then mark
-/// that next is _possibly_ initialized for the coder using this macro.
-/// "Possibly" means that if e.g. allocation of next->coder fails, the
-/// structure isn't actually initialized for this coder, but leaving
-/// next->init to func is still OK.
-#define lzma_next_coder_init(func, next, allocator) \
-do { \
-	if ((uintptr_t)(func) != (next)->init) \
-		lzma_next_end(next, allocator); \
-	(next)->init = (uintptr_t)(func); \
-} while (0)
-
-
-/// Initializes lzma_strm and calls func() to initialize strm->internal->next.
-/// (The function being called will use lzma_next_coder_init()). If
-/// initialization fails, memory that wasn't freed by func() is freed
-/// along strm->internal.
-#define lzma_next_strm_init(func, strm, ...) \
-do { \
-	return_if_error(lzma_strm_init(strm)); \
-	const lzma_ret ret_ = func(&(strm)->internal->next, \
-			(strm)->allocator, __VA_ARGS__); \
-	if (ret_ != LZMA_OK) { \
-		lzma_end(strm); \
-		return ret_; \
-	} \
-} while (0)
-
-#endif
diff --git a/src/extra/xz/common/easy_buffer_encoder.c b/src/extra/xz/common/easy_buffer_encoder.c
deleted file mode 100644
index c4be34c..0000000
--- a/src/extra/xz/common/easy_buffer_encoder.c
+++ /dev/null
@@ -1,27 +0,0 @@
-///////////////////////////////////////////////////////////////////////////////
-//
-/// \file       easy_buffer_encoder.c
-/// \brief      Easy single-call .xz Stream encoder
-//
-//  Author:     Lasse Collin
-//
-//  This file has been put into the public domain.
-//  You can do whatever you want with this file.
-//
-///////////////////////////////////////////////////////////////////////////////
-
-#include "easy_preset.h"
-
-
-extern LZMA_API(lzma_ret)
-lzma_easy_buffer_encode(uint32_t preset, lzma_check check,
-		lzma_allocator *allocator, const uint8_t *in, size_t in_size,
-		uint8_t *out, size_t *out_pos, size_t out_size)
-{
-	lzma_options_easy opt_easy;
-	if (lzma_easy_preset(&opt_easy, preset))
-		return LZMA_OPTIONS_ERROR;
-
-	return lzma_stream_buffer_encode(opt_easy.filters, check,
-			allocator, in, in_size, out, out_pos, out_size);
-}
diff --git a/src/extra/xz/common/easy_decoder_memusage.c b/src/extra/xz/common/easy_decoder_memusage.c
deleted file mode 100644
index 20bcd5b..0000000
--- a/src/extra/xz/common/easy_decoder_memusage.c
+++ /dev/null
@@ -1,24 +0,0 @@
-///////////////////////////////////////////////////////////////////////////////
-//
-/// \file       easy_decoder_memusage.c
-/// \brief      Decoder memory usage calculation to match easy encoder presets
-//
-//  Author:     Lasse Collin
-//
-//  This file has been put into the public domain.
-//  You can do whatever you want with this file.
-//
-///////////////////////////////////////////////////////////////////////////////
-
-#include "easy_preset.h"
-
-
-extern LZMA_API(uint64_t)
-lzma_easy_decoder_memusage(uint32_t preset)
-{
-	lzma_options_easy opt_easy;
-	if (lzma_easy_preset(&opt_easy, preset))
-		return UINT32_MAX;
-
-	return lzma_raw_decoder_memusage(opt_easy.filters);
-}
diff --git a/src/extra/xz/common/easy_encoder.c b/src/extra/xz/common/easy_encoder.c
deleted file mode 100644
index d13ccd7..0000000
--- a/src/extra/xz/common/easy_encoder.c
+++ /dev/null
@@ -1,25 +0,0 @@
-///////////////////////////////////////////////////////////////////////////////
-//
-/// \file       easy_encoder.c
-/// \brief      Easy .xz Stream encoder initialization
-//
-//  Author:     Lasse Collin
-//
-//  This file has been put into the public domain.
-//  You can do whatever you want with this file.
-//
-///////////////////////////////////////////////////////////////////////////////
-
-#include "easy_preset.h"
-#include "stream_encoder.h"
-
-
-extern LZMA_API(lzma_ret)
-lzma_easy_encoder(lzma_stream *strm, uint32_t preset, lzma_check check)
-{
-	lzma_options_easy opt_easy;
-	if (lzma_easy_preset(&opt_easy, preset))
-		return LZMA_OPTIONS_ERROR;
-
-	return lzma_stream_encoder(strm, opt_easy.filters, check);
-}
diff --git a/src/extra/xz/common/easy_encoder_memusage.c b/src/extra/xz/common/easy_encoder_memusage.c
deleted file mode 100644
index e910575..0000000
--- a/src/extra/xz/common/easy_encoder_memusage.c
+++ /dev/null
@@ -1,24 +0,0 @@
-///////////////////////////////////////////////////////////////////////////////
-//
-/// \file       easy_encoder_memusage.c
-/// \brief      Easy .xz Stream encoder memory usage calculation
-//
-//  Author:     Lasse Collin
-//
-//  This file has been put into the public domain.
-//  You can do whatever you want with this file.
-//
-///////////////////////////////////////////////////////////////////////////////
-
-#include "easy_preset.h"
-
-
-extern LZMA_API(uint64_t)
-lzma_easy_encoder_memusage(uint32_t preset)
-{
-	lzma_options_easy opt_easy;
-	if (lzma_easy_preset(&opt_easy, preset))
-		return UINT32_MAX;
-
-	return lzma_raw_encoder_memusage(opt_easy.filters);
-}
diff --git a/src/extra/xz/common/easy_preset.c b/src/extra/xz/common/easy_preset.c
deleted file mode 100644
index 2f98598..0000000
--- a/src/extra/xz/common/easy_preset.c
+++ /dev/null
@@ -1,27 +0,0 @@
-///////////////////////////////////////////////////////////////////////////////
-//
-/// \file       easy_preset.c
-/// \brief      Preset handling for easy encoder and decoder
-//
-//  Author:     Lasse Collin
-//
-//  This file has been put into the public domain.
-//  You can do whatever you want with this file.
-//
-///////////////////////////////////////////////////////////////////////////////
-
-#include "easy_preset.h"
-
-
-extern bool
-lzma_easy_preset(lzma_options_easy *opt_easy, uint32_t preset)
-{
-	if (lzma_lzma_preset(&opt_easy->opt_lzma, preset))
-		return true;
-
-	opt_easy->filters[0].id = LZMA_FILTER_LZMA2;
-	opt_easy->filters[0].options = &opt_easy->opt_lzma;
-	opt_easy->filters[1].id = LZMA_VLI_UNKNOWN;
-
-	return false;
-}
diff --git a/src/extra/xz/common/easy_preset.h b/src/extra/xz/common/easy_preset.h
deleted file mode 100644
index 382ade8..0000000
--- a/src/extra/xz/common/easy_preset.h
+++ /dev/null
@@ -1,32 +0,0 @@
-///////////////////////////////////////////////////////////////////////////////
-//
-/// \file       easy_preset.h
-/// \brief      Preset handling for easy encoder and decoder
-//
-//  Author:     Lasse Collin
-//
-//  This file has been put into the public domain.
-//  You can do whatever you want with this file.
-//
-///////////////////////////////////////////////////////////////////////////////
-
-#include "common.h"
-
-
-typedef struct {
-	/// We need to keep the filters array available in case
-	/// LZMA_FULL_FLUSH is used.
-	lzma_filter filters[LZMA_FILTERS_MAX + 1];
-
-	/// Options for LZMA2
-	lzma_options_lzma opt_lzma;
-
-	// Options for more filters can be added later, so this struct
-	// is not ready to be put into the public API.
-
-} lzma_options_easy;
-
-
-/// Set *easy to the settings given by the preset. Returns true on error,
-/// false on success.
-extern bool lzma_easy_preset(lzma_options_easy *easy, uint32_t preset);
diff --git a/src/extra/xz/common/filter_buffer_decoder.c b/src/extra/xz/common/filter_buffer_decoder.c
deleted file mode 100644
index 2d35ef8..0000000
--- a/src/extra/xz/common/filter_buffer_decoder.c
+++ /dev/null
@@ -1,87 +0,0 @@
-///////////////////////////////////////////////////////////////////////////////
-//
-/// \file       filter_buffer_decoder.c
-/// \brief      Single-call raw decoding
-//
-//  Author:     Lasse Collin
-//
-//  This file has been put into the public domain.
-//  You can do whatever you want with this file.
-//
-///////////////////////////////////////////////////////////////////////////////
-
-#include "filter_decoder.h"
-
-
-extern LZMA_API(lzma_ret)
-lzma_raw_buffer_decode(const lzma_filter *filters, lzma_allocator *allocator,
-		const uint8_t *in, size_t *in_pos, size_t in_size,
-		uint8_t *out, size_t *out_pos, size_t out_size)
-{
-	// Validate what isn't validated later in filter_common.c.
-	if (in == NULL || in_pos == NULL || *in_pos > in_size || out == NULL
-			|| out_pos == NULL || *out_pos > out_size)
-		return LZMA_PROG_ERROR;
-
-	// Initialize the decoer.
-	lzma_next_coder next = LZMA_NEXT_CODER_INIT;
-	return_if_error(lzma_raw_decoder_init(&next, allocator, filters));
-
-	// Store the positions so that we can restore them if something
-	// goes wrong.
-	const size_t in_start = *in_pos;
-	const size_t out_start = *out_pos;
-
-	// Do the actual decoding and free decoder's memory.
-	lzma_ret ret = next.code(next.coder, allocator, in, in_pos, in_size,
-			out, out_pos, out_size, LZMA_FINISH);
-
-	if (ret == LZMA_STREAM_END) {
-		ret = LZMA_OK;
-	} else {
-		if (ret == LZMA_OK) {
-			// Either the input was truncated or the
-			// output buffer was too small.
-			assert(*in_pos == in_size || *out_pos == out_size);
-
-			if (*in_pos != in_size) {
-				// Since input wasn't consumed completely,
-				// the output buffer became full and is
-				// too small.
-				ret = LZMA_BUF_ERROR;
-
-			} else if (*out_pos != out_size) {
-				// Since output didn't became full, the input
-				// has to be truncated.
-				ret = LZMA_DATA_ERROR;
-
-			} else {
-				// All the input was consumed and output
-				// buffer is full. Now we don't immediately
-				// know the reason for the error. Try
-				// decoding one more byte. If it succeeds,
-				// then the output buffer was too small. If
-				// we cannot get a new output byte, the input
-				// is truncated.
-				uint8_t tmp[1];
-				size_t tmp_pos = 0;
-				(void)next.code(next.coder, allocator,
-						in, in_pos, in_size,
-						tmp, &tmp_pos, 1, LZMA_FINISH);
-
-				if (tmp_pos == 1)
-					ret = LZMA_BUF_ERROR;
-				else
-					ret = LZMA_DATA_ERROR;
-			}
-		}
-
-		// Restore the positions.
-		*in_pos = in_start;
-		*out_pos = out_start;
-	}
-
-	lzma_next_end(&next, allocator);
-
-	return ret;
-}
diff --git a/src/extra/xz/common/filter_buffer_encoder.c b/src/extra/xz/common/filter_buffer_encoder.c
deleted file mode 100644
index 646e1b3..0000000
--- a/src/extra/xz/common/filter_buffer_encoder.c
+++ /dev/null
@@ -1,54 +0,0 @@
-///////////////////////////////////////////////////////////////////////////////
-//
-/// \file       filter_buffer_encoder.c
-/// \brief      Single-call raw encoding
-//
-//  Author:     Lasse Collin
-//
-//  This file has been put into the public domain.
-//  You can do whatever you want with this file.
-//
-///////////////////////////////////////////////////////////////////////////////
-
-#include "filter_encoder.h"
-
-
-extern LZMA_API(lzma_ret)
-lzma_raw_buffer_encode(const lzma_filter *filters, lzma_allocator *allocator,
-		const uint8_t *in, size_t in_size, uint8_t *out,
-		size_t *out_pos, size_t out_size)
-{
-	// Validate what isn't validated later in filter_common.c.
-	if ((in == NULL && in_size != 0) || out == NULL
-			|| out_pos == NULL || *out_pos > out_size)
-		return LZMA_PROG_ERROR;
-
-	// Initialize the encoder
-	lzma_next_coder next = LZMA_NEXT_CODER_INIT;
-	return_if_error(lzma_raw_encoder_init(&next, allocator, filters));
-
-	// Store the output position so that we can restore it if
-	// something goes wrong.
-	const size_t out_start = *out_pos;
-
-	// Do the actual encoding and free coder's memory.
-	size_t in_pos = 0;
-	lzma_ret ret = next.code(next.coder, allocator, in, &in_pos, in_size,
-			out, out_pos, out_size, LZMA_FINISH);
-	lzma_next_end(&next, allocator);
-
-	if (ret == LZMA_STREAM_END) {
-		ret = LZMA_OK;
-	} else {
-		if (ret == LZMA_OK) {
-			// Output buffer was too small.
-			assert(*out_pos == out_size);
-			ret = LZMA_BUF_ERROR;
-		}
-
-		// Restore the output position.
-		*out_pos = out_start;
-	}
-
-	return ret;
-}
diff --git a/src/extra/xz/common/filter_common.c b/src/extra/xz/common/filter_common.c
deleted file mode 100644
index 7c95b05..0000000
--- a/src/extra/xz/common/filter_common.c
+++ /dev/null
@@ -1,337 +0,0 @@
-///////////////////////////////////////////////////////////////////////////////
-//
-/// \file       filter_common.c
-/// \brief      Filter-specific stuff common for both encoder and decoder
-//
-//  Author:     Lasse Collin
-//
-//  This file has been put into the public domain.
-//  You can do whatever you want with this file.
-//
-///////////////////////////////////////////////////////////////////////////////
-
-#include "filter_common.h"
-
-
-static const struct {
-	/// Filter ID
-	lzma_vli id;
-
-	/// Size of the filter-specific options structure
-	size_t options_size;
-
-	/// True if it is OK to use this filter as non-last filter in
-	/// the chain.
-	bool non_last_ok;
-
-	/// True if it is OK to use this filter as the last filter in
-	/// the chain.
-	bool last_ok;
-
-	/// True if the filter may change the size of the data (that is, the
-	/// amount of encoded output can be different than the amount of
-	/// uncompressed input).
-	bool changes_size;
-
-} features[] = {
-#if defined (HAVE_ENCODER_LZMA1) || defined(HAVE_DECODER_LZMA1)
-	{
-		.id = LZMA_FILTER_LZMA1,
-		.options_size = sizeof(lzma_options_lzma),
-		.non_last_ok = false,
-		.last_ok = true,
-		.changes_size = true,
-	},
-#endif
-#if defined(HAVE_ENCODER_LZMA2) || defined(HAVE_DECODER_LZMA2)
-	{
-		.id = LZMA_FILTER_LZMA2,
-		.options_size = sizeof(lzma_options_lzma),
-		.non_last_ok = false,
-		.last_ok = true,
-		.changes_size = true,
-	},
-#endif
-#if defined(HAVE_ENCODER_X86) || defined(HAVE_DECODER_X86)
-	{
-		.id = LZMA_FILTER_X86,
-		.options_size = sizeof(lzma_options_bcj),
-		.non_last_ok = true,
-		.last_ok = false,
-		.changes_size = false,
-	},
-#endif
-#if defined(HAVE_ENCODER_POWERPC) || defined(HAVE_DECODER_POWERPC)
-	{
-		.id = LZMA_FILTER_POWERPC,
-		.options_size = sizeof(lzma_options_bcj),
-		.non_last_ok = true,
-		.last_ok = false,
-		.changes_size = false,
-	},
-#endif
-#if defined(HAVE_ENCODER_IA64) || defined(HAVE_DECODER_IA64)
-	{
-		.id = LZMA_FILTER_IA64,
-		.options_size = sizeof(lzma_options_bcj),
-		.non_last_ok = true,
-		.last_ok = false,
-		.changes_size = false,
-	},
-#endif
-#if defined(HAVE_ENCODER_ARM) || defined(HAVE_DECODER_ARM)
-	{
-		.id = LZMA_FILTER_ARM,
-		.options_size = sizeof(lzma_options_bcj),
-		.non_last_ok = true,
-		.last_ok = false,
-		.changes_size = false,
-	},
-#endif
-#if defined(HAVE_ENCODER_ARMTHUMB) || defined(HAVE_DECODER_ARMTHUMB)
-	{
-		.id = LZMA_FILTER_ARMTHUMB,
-		.options_size = sizeof(lzma_options_bcj),
-		.non_last_ok = true,
-		.last_ok = false,
-		.changes_size = false,
-	},
-#endif
-#if defined(HAVE_ENCODER_SPARC) || defined(HAVE_DECODER_SPARC)
-	{
-		.id = LZMA_FILTER_SPARC,
-		.options_size = sizeof(lzma_options_bcj),
-		.non_last_ok = true,
-		.last_ok = false,
-		.changes_size = false,
-	},
-#endif
-#if defined(HAVE_ENCODER_DELTA) || defined(HAVE_DECODER_DELTA)
-	{
-		.id = LZMA_FILTER_DELTA,
-		.options_size = sizeof(lzma_options_delta),
-		.non_last_ok = true,
-		.last_ok = false,
-		.changes_size = false,
-	},
-#endif
-	{
-		.id = LZMA_VLI_UNKNOWN
-	}
-};
-
-
-extern LZMA_API(lzma_ret)
-lzma_filters_copy(const lzma_filter *src, lzma_filter *dest,
-		lzma_allocator *allocator)
-{
-	if (src == NULL || dest == NULL)
-		return LZMA_PROG_ERROR;
-
-	lzma_ret ret;
-	size_t i;
-	for (i = 0; src[i].id != LZMA_VLI_UNKNOWN; ++i) {
-		// There must be a maximum of four filters plus
-		// the array terminator.
-		if (i == LZMA_FILTERS_MAX) {
-			ret = LZMA_OPTIONS_ERROR;
-			goto error;
-		}
-
-		dest[i].id = src[i].id;
-
-		if (src[i].options == NULL) {
-			dest[i].options = NULL;
-		} else {
-			// See if the filter is supported only when the
-			// options is not NULL. This might be convenient
-			// sometimes if the app is actually copying only
-			// a partial filter chain with a place holder ID.
-			//
-			// When options is not NULL, the Filter ID must be
-			// supported by us, because otherwise we don't know
-			// how big the options are.
-			size_t j;
-			for (j = 0; src[i].id != features[j].id; ++j) {
-				if (features[j].id == LZMA_VLI_UNKNOWN) {
-					ret = LZMA_OPTIONS_ERROR;
-					goto error;
-				}
-			}
-
-			// Allocate and copy the options.
-			dest[i].options = lzma_alloc(features[j].options_size,
-					allocator);
-			if (dest[i].options == NULL) {
-				ret = LZMA_MEM_ERROR;
-				goto error;
-			}
-
-			memcpy(dest[i].options, src[i].options,
-					features[j].options_size);
-		}
-	}
-
-	// Terminate the filter array.
-	assert(i <= LZMA_FILTERS_MAX + 1);
-	dest[i].id = LZMA_VLI_UNKNOWN;
-	dest[i].options = NULL;
-
-	return LZMA_OK;
-
-error:
-	// Free the options which we have already allocated.
-	while (i-- > 0) {
-		lzma_free(dest[i].options, allocator);
-		dest[i].options = NULL;
-	}
-
-	return ret;
-}
-
-
-static lzma_ret
-validate_chain(const lzma_filter *filters, size_t *count)
-{
-	// There must be at least one filter.
-	if (filters == NULL || filters[0].id == LZMA_VLI_UNKNOWN)
-		return LZMA_PROG_ERROR;
-
-	// Number of non-last filters that may change the size of the data
-	// significantly (that is, more than 1-2 % or so).
-	size_t changes_size_count = 0;
-
-	// True if it is OK to add a new filter after the current filter.
-	bool non_last_ok = true;
-
-	// True if the last filter in the given chain is actually usable as
-	// the last filter. Only filters that support embedding End of Payload
-	// Marker can be used as the last filter in the chain.
-	bool last_ok = false;
-
-	size_t i = 0;
-	do {
-		size_t j;
-		for (j = 0; filters[i].id != features[j].id; ++j)
-			if (features[j].id == LZMA_VLI_UNKNOWN)
-				return LZMA_OPTIONS_ERROR;
-
-		// If the previous filter in the chain cannot be a non-last
-		// filter, the chain is invalid.
-		if (!non_last_ok)
-			return LZMA_OPTIONS_ERROR;
-
-		non_last_ok = features[j].non_last_ok;
-		last_ok = features[j].last_ok;
-		changes_size_count += features[j].changes_size;
-
-	} while (filters[++i].id != LZMA_VLI_UNKNOWN);
-
-	// There must be 1-4 filters. The last filter must be usable as
-	// the last filter in the chain. A maximum of three filters are
-	// allowed to change the size of the data.
-	if (i > LZMA_FILTERS_MAX || !last_ok || changes_size_count > 3)
-		return LZMA_OPTIONS_ERROR;
-
-	*count = i;
-	return LZMA_OK;
-}
-
-
-extern lzma_ret
-lzma_raw_coder_init(lzma_next_coder *next, lzma_allocator *allocator,
-		const lzma_filter *options,
-		lzma_filter_find coder_find, bool is_encoder)
-{
-	// Do some basic validation and get the number of filters.
-	size_t count;
-	return_if_error(validate_chain(options, &count));
-
-	// Set the filter functions and copy the options pointer.
-	lzma_filter_info filters[LZMA_FILTERS_MAX + 1];
-	if (is_encoder) {
-		for (size_t i = 0; i < count; ++i) {
-			// The order of the filters is reversed in the
-			// encoder. It allows more efficient handling
-			// of the uncompressed data.
-			const size_t j = count - i - 1;
-
-			const lzma_filter_coder *const fc
-					= coder_find(options[i].id);
-			if (fc == NULL || fc->init == NULL)
-				return LZMA_OPTIONS_ERROR;
-
-			filters[j].id = options[i].id;
-			filters[j].init = fc->init;
-			filters[j].options = options[i].options;
-		}
-	} else {
-		for (size_t i = 0; i < count; ++i) {
-			const lzma_filter_coder *const fc
-					= coder_find(options[i].id);
-			if (fc == NULL || fc->init == NULL)
-				return LZMA_OPTIONS_ERROR;
-
-			filters[i].id = options[i].id;
-			filters[i].init = fc->init;
-			filters[i].options = options[i].options;
-		}
-	}
-
-	// Terminate the array.
-	filters[count].id = LZMA_VLI_UNKNOWN;
-	filters[count].init = NULL;
-
-	// Initialize the filters.
-	const lzma_ret ret = lzma_next_filter_init(next, allocator, filters);
-	if (ret != LZMA_OK)
-		lzma_next_end(next, allocator);
-
-	return ret;
-}
-
-
-extern uint64_t
-lzma_raw_coder_memusage(lzma_filter_find coder_find,
-		const lzma_filter *filters)
-{
-	// The chain has to have at least one filter.
-	{
-		size_t tmp;
-		if (validate_chain(filters, &tmp) != LZMA_OK)
-			return UINT64_MAX;
-	}
-
-	uint64_t total = 0;
-	size_t i = 0;
-
-	do {
-		const lzma_filter_coder *const fc
-				 = coder_find(filters[i].id);
-		if (fc == NULL)
-			return UINT64_MAX; // Unsupported Filter ID
-
-		if (fc->memusage == NULL) {
-			// This filter doesn't have a function to calculate
-			// the memory usage and validate the options. Such
-			// filters need only little memory, so we use 1 KiB
-			// as a good estimate. They also accept all possible
-			// options, so there's no need to worry about lack
-			// of validation.
-			total += 1024;
-		} else {
-			// Call the filter-specific memory usage calculation
-			// function.
-			const uint64_t usage
-					= fc->memusage(filters[i].options);
-			if (usage == UINT64_MAX)
-				return UINT64_MAX; // Invalid options
-
-			total += usage;
-		}
-	} while (filters[++i].id != LZMA_VLI_UNKNOWN);
-
-	// Add some fixed amount of extra. It's to compensate memory usage
-	// of Stream, Block etc. coders, malloc() overhead, stack etc.
-	return total + LZMA_MEMUSAGE_BASE;
-}
diff --git a/src/extra/xz/common/filter_common.h b/src/extra/xz/common/filter_common.h
deleted file mode 100644
index cd61fc0..0000000
--- a/src/extra/xz/common/filter_common.h
+++ /dev/null
@@ -1,48 +0,0 @@
-///////////////////////////////////////////////////////////////////////////////
-//
-/// \file       filter_common.c
-/// \brief      Filter-specific stuff common for both encoder and decoder
-//
-//  Author:     Lasse Collin
-//
-//  This file has been put into the public domain.
-//  You can do whatever you want with this file.
-//
-///////////////////////////////////////////////////////////////////////////////
-
-#ifndef LZMA_FILTER_COMMON_H
-#define LZMA_FILTER_COMMON_H
-
-#include "common.h"
-
-
-/// Both lzma_filter_encoder and lzma_filter_decoder begin with these members.
-typedef struct {
-	/// Filter ID
-	lzma_vli id;
-
-	/// Initializes the filter encoder and calls lzma_next_filter_init()
-	/// for filters + 1.
-	lzma_init_function init;
-
-	/// Calculates memory usage of the encoder. If the options are
-	/// invalid, UINT64_MAX is returned.
-	uint64_t (*memusage)(const void *options);
-
-} lzma_filter_coder;
-
-
-typedef const lzma_filter_coder *(*lzma_filter_find)(lzma_vli id);
-
-
-extern lzma_ret lzma_raw_coder_init(
-		lzma_next_coder *next, lzma_allocator *allocator,
-		const lzma_filter *filters,
-		lzma_filter_find coder_find, bool is_encoder);
-
-
-extern uint64_t lzma_raw_coder_memusage(lzma_filter_find coder_find,
-		const lzma_filter *filters);
-
-
-#endif
diff --git a/src/extra/xz/common/filter_decoder.c b/src/extra/xz/common/filter_decoder.c
deleted file mode 100644
index 1ebbe2a..0000000
--- a/src/extra/xz/common/filter_decoder.c
+++ /dev/null
@@ -1,183 +0,0 @@
-///////////////////////////////////////////////////////////////////////////////
-//
-/// \file       filter_decoder.c
-/// \brief      Filter ID mapping to filter-specific functions
-//
-//  Author:     Lasse Collin
-//
-//  This file has been put into the public domain.
-//  You can do whatever you want with this file.
-//
-///////////////////////////////////////////////////////////////////////////////
-
-#include "filter_decoder.h"
-#include "filter_common.h"
-#include "lzma_decoder.h"
-#include "lzma2_decoder.h"
-#include "simple_decoder.h"
-#include "delta_decoder.h"
-
-
-typedef struct {
-	/// Filter ID
-	lzma_vli id;
-
-	/// Initializes the filter encoder and calls lzma_next_filter_init()
-	/// for filters + 1.
-	lzma_init_function init;
-
-	/// Calculates memory usage of the encoder. If the options are
-	/// invalid, UINT64_MAX is returned.
-	uint64_t (*memusage)(const void *options);
-
-	/// Decodes Filter Properties.
-	///
-	/// \return     - LZMA_OK: Properties decoded successfully.
-	///             - LZMA_OPTIONS_ERROR: Unsupported properties
-	///             - LZMA_MEM_ERROR: Memory allocation failed.
-	lzma_ret (*props_decode)(void **options, lzma_allocator *allocator,
-			const uint8_t *props, size_t props_size);
-
-} lzma_filter_decoder;
-
-
-static const lzma_filter_decoder decoders[] = {
-#ifdef HAVE_DECODER_LZMA1
-	{
-		.id = LZMA_FILTER_LZMA1,
-		.init = &lzma_lzma_decoder_init,
-		.memusage = &lzma_lzma_decoder_memusage,
-		.props_decode = &lzma_lzma_props_decode,
-	},
-#endif
-#ifdef HAVE_DECODER_LZMA2
-	{
-		.id = LZMA_FILTER_LZMA2,
-		.init = &lzma_lzma2_decoder_init,
-		.memusage = &lzma_lzma2_decoder_memusage,
-		.props_decode = &lzma_lzma2_props_decode,
-	},
-#endif
-#ifdef HAVE_DECODER_X86
-	{
-		.id = LZMA_FILTER_X86,
-		.init = &lzma_simple_x86_decoder_init,
-		.memusage = NULL,
-		.props_decode = &lzma_simple_props_decode,
-	},
-#endif
-#ifdef HAVE_DECODER_POWERPC
-	{
-		.id = LZMA_FILTER_POWERPC,
-		.init = &lzma_simple_powerpc_decoder_init,
-		.memusage = NULL,
-		.props_decode = &lzma_simple_props_decode,
-	},
-#endif
-#ifdef HAVE_DECODER_IA64
-	{
-		.id = LZMA_FILTER_IA64,
-		.init = &lzma_simple_ia64_decoder_init,
-		.memusage = NULL,
-		.props_decode = &lzma_simple_props_decode,
-	},
-#endif
-#ifdef HAVE_DECODER_ARM
-	{
-		.id = LZMA_FILTER_ARM,
-		.init = &lzma_simple_arm_decoder_init,
-		.memusage = NULL,
-		.props_decode = &lzma_simple_props_decode,
-	},
-#endif
-#ifdef HAVE_DECODER_ARMTHUMB
-	{
-		.id = LZMA_FILTER_ARMTHUMB,
-		.init = &lzma_simple_armthumb_decoder_init,
-		.memusage = NULL,
-		.props_decode = &lzma_simple_props_decode,
-	},
-#endif
-#ifdef HAVE_DECODER_SPARC
-	{
-		.id = LZMA_FILTER_SPARC,
-		.init = &lzma_simple_sparc_decoder_init,
-		.memusage = NULL,
-		.props_decode = &lzma_simple_props_decode,
-	},
-#endif
-#ifdef HAVE_DECODER_DELTA
-	{
-		.id = LZMA_FILTER_DELTA,
-		.init = &lzma_delta_decoder_init,
-		.memusage = &lzma_delta_coder_memusage,
-		.props_decode = &lzma_delta_props_decode,
-	},
-#endif
-};
-
-
-static const lzma_filter_decoder *
-decoder_find(lzma_vli id)
-{
-	for (size_t i = 0; i < ARRAY_SIZE(decoders); ++i)
-		if (decoders[i].id == id)
-			return decoders + i;
-
-	return NULL;
-}
-
-
-extern LZMA_API(lzma_bool)
-lzma_filter_decoder_is_supported(lzma_vli id)
-{
-	return decoder_find(id) != NULL;
-}
-
-
-extern lzma_ret
-lzma_raw_decoder_init(lzma_next_coder *next, lzma_allocator *allocator,
-		const lzma_filter *options)
-{
-	return lzma_raw_coder_init(next, allocator,
-			options, (lzma_filter_find)(&decoder_find), false);
-}
-
-
-extern LZMA_API(lzma_ret)
-lzma_raw_decoder(lzma_stream *strm, const lzma_filter *options)
-{
-	lzma_next_strm_init(lzma_raw_decoder_init, strm, options);
-
-	strm->internal->supported_actions[LZMA_RUN] = true;
-	strm->internal->supported_actions[LZMA_FINISH] = true;
-
-	return LZMA_OK;
-}
-
-
-extern LZMA_API(uint64_t)
-lzma_raw_decoder_memusage(const lzma_filter *filters)
-{
-	return lzma_raw_coder_memusage(
-			(lzma_filter_find)(&decoder_find), filters);
-}
-
-
-extern LZMA_API(lzma_ret)
-lzma_properties_decode(lzma_filter *filter, lzma_allocator *allocator,
-		const uint8_t *props, size_t props_size)
-{
-	// Make it always NULL so that the caller can always safely free() it.
-	filter->options = NULL;
-
-	const lzma_filter_decoder *const fd = decoder_find(filter->id);
-	if (fd == NULL)
-		return LZMA_OPTIONS_ERROR;
-
-	if (fd->props_decode == NULL)
-		return props_size == 0 ? LZMA_OK : LZMA_OPTIONS_ERROR;
-
-	return fd->props_decode(
-			&filter->options, allocator, props, props_size);
-}
diff --git a/src/extra/xz/common/filter_decoder.h b/src/extra/xz/common/filter_decoder.h
deleted file mode 100644
index d5c68bd..0000000
--- a/src/extra/xz/common/filter_decoder.h
+++ /dev/null
@@ -1,23 +0,0 @@
-///////////////////////////////////////////////////////////////////////////////
-//
-/// \file       filter_decoder.c
-/// \brief      Filter ID mapping to filter-specific functions
-//
-//  Author:     Lasse Collin
-//
-//  This file has been put into the public domain.
-//  You can do whatever you want with this file.
-//
-///////////////////////////////////////////////////////////////////////////////
-
-#ifndef LZMA_FILTER_DECODER_H
-#define LZMA_FILTER_DECODER_H
-
-#include "common.h"
-
-
-extern lzma_ret lzma_raw_decoder_init(
-		lzma_next_coder *next, lzma_allocator *allocator,
-		const lzma_filter *options);
-
-#endif
diff --git a/src/extra/xz/common/filter_encoder.c b/src/extra/xz/common/filter_encoder.c
deleted file mode 100644
index 635d812..0000000
--- a/src/extra/xz/common/filter_encoder.c
+++ /dev/null
@@ -1,288 +0,0 @@
-///////////////////////////////////////////////////////////////////////////////
-//
-/// \file       filter_decoder.c
-/// \brief      Filter ID mapping to filter-specific functions
-//
-//  Author:     Lasse Collin
-//
-//  This file has been put into the public domain.
-//  You can do whatever you want with this file.
-//
-///////////////////////////////////////////////////////////////////////////////
-
-#include "filter_encoder.h"
-#include "filter_common.h"
-#include "lzma_encoder.h"
-#include "lzma2_encoder.h"
-#include "simple_encoder.h"
-#include "delta_encoder.h"
-
-
-typedef struct {
-	/// Filter ID
-	lzma_vli id;
-
-	/// Initializes the filter encoder and calls lzma_next_filter_init()
-	/// for filters + 1.
-	lzma_init_function init;
-
-	/// Calculates memory usage of the encoder. If the options are
-	/// invalid, UINT64_MAX is returned.
-	uint64_t (*memusage)(const void *options);
-
-	/// Calculates the minimum sane size for Blocks (or other types of
-	/// chunks) to which the input data can be split to make
-	/// multithreaded encoding possible. If this is NULL, it is assumed
-	/// that the encoder is fast enough with single thread.
-	lzma_vli (*chunk_size)(const void *options);
-
-	/// Tells the size of the Filter Properties field. If options are
-	/// invalid, UINT32_MAX is returned. If this is NULL, props_size_fixed
-	/// is used.
-	lzma_ret (*props_size_get)(uint32_t *size, const void *options);
-	uint32_t props_size_fixed;
-
-	/// Encodes Filter Properties.
-	///
-	/// \return     - LZMA_OK: Properties encoded successfully.
-	///             - LZMA_OPTIONS_ERROR: Unsupported options
-	///             - LZMA_PROG_ERROR: Invalid options or not enough
-	///               output space
-	lzma_ret (*props_encode)(const void *options, uint8_t *out);
-
-} lzma_filter_encoder;
-
-
-static const lzma_filter_encoder encoders[] = {
-#ifdef HAVE_ENCODER_LZMA1
-	{
-		.id = LZMA_FILTER_LZMA1,
-		.init = &lzma_lzma_encoder_init,
-		.memusage = &lzma_lzma_encoder_memusage,
-		.chunk_size = NULL, // FIXME
-		.props_size_get = NULL,
-		.props_size_fixed = 5,
-		.props_encode = &lzma_lzma_props_encode,
-	},
-#endif
-#ifdef HAVE_ENCODER_LZMA2
-	{
-		.id = LZMA_FILTER_LZMA2,
-		.init = &lzma_lzma2_encoder_init,
-		.memusage = &lzma_lzma2_encoder_memusage,
-		.chunk_size = NULL, // FIXME
-		.props_size_get = NULL,
-		.props_size_fixed = 1,
-		.props_encode = &lzma_lzma2_props_encode,
-	},
-#endif
-#ifdef HAVE_ENCODER_X86
-	{
-		.id = LZMA_FILTER_X86,
-		.init = &lzma_simple_x86_encoder_init,
-		.memusage = NULL,
-		.chunk_size = NULL,
-		.props_size_get = &lzma_simple_props_size,
-		.props_encode = &lzma_simple_props_encode,
-	},
-#endif
-#ifdef HAVE_ENCODER_POWERPC
-	{
-		.id = LZMA_FILTER_POWERPC,
-		.init = &lzma_simple_powerpc_encoder_init,
-		.memusage = NULL,
-		.chunk_size = NULL,
-		.props_size_get = &lzma_simple_props_size,
-		.props_encode = &lzma_simple_props_encode,
-	},
-#endif
-#ifdef HAVE_ENCODER_IA64
-	{
-		.id = LZMA_FILTER_IA64,
-		.init = &lzma_simple_ia64_encoder_init,
-		.memusage = NULL,
-		.chunk_size = NULL,
-		.props_size_get = &lzma_simple_props_size,
-		.props_encode = &lzma_simple_props_encode,
-	},
-#endif
-#ifdef HAVE_ENCODER_ARM
-	{
-		.id = LZMA_FILTER_ARM,
-		.init = &lzma_simple_arm_encoder_init,
-		.memusage = NULL,
-		.chunk_size = NULL,
-		.props_size_get = &lzma_simple_props_size,
-		.props_encode = &lzma_simple_props_encode,
-	},
-#endif
-#ifdef HAVE_ENCODER_ARMTHUMB
-	{
-		.id = LZMA_FILTER_ARMTHUMB,
-		.init = &lzma_simple_armthumb_encoder_init,
-		.memusage = NULL,
-		.chunk_size = NULL,
-		.props_size_get = &lzma_simple_props_size,
-		.props_encode = &lzma_simple_props_encode,
-	},
-#endif
-#ifdef HAVE_ENCODER_SPARC
-	{
-		.id = LZMA_FILTER_SPARC,
-		.init = &lzma_simple_sparc_encoder_init,
-		.memusage = NULL,
-		.chunk_size = NULL,
-		.props_size_get = &lzma_simple_props_size,
-		.props_encode = &lzma_simple_props_encode,
-	},
-#endif
-#ifdef HAVE_ENCODER_DELTA
-	{
-		.id = LZMA_FILTER_DELTA,
-		.init = &lzma_delta_encoder_init,
-		.memusage = &lzma_delta_coder_memusage,
-		.chunk_size = NULL,
-		.props_size_get = NULL,
-		.props_size_fixed = 1,
-		.props_encode = &lzma_delta_props_encode,
-	},
-#endif
-};
-
-
-static const lzma_filter_encoder *
-encoder_find(lzma_vli id)
-{
-	for (size_t i = 0; i < ARRAY_SIZE(encoders); ++i)
-		if (encoders[i].id == id)
-			return encoders + i;
-
-	return NULL;
-}
-
-
-extern LZMA_API(lzma_bool)
-lzma_filter_encoder_is_supported(lzma_vli id)
-{
-	return encoder_find(id) != NULL;
-}
-
-
-extern LZMA_API(lzma_ret)
-lzma_filters_update(lzma_stream *strm, const lzma_filter *filters)
-{
-	if (strm->internal->next.update == NULL)
-		return LZMA_PROG_ERROR;
-
-	// Validate the filter chain.
-	if (lzma_raw_encoder_memusage(filters) == UINT64_MAX)
-		return LZMA_OPTIONS_ERROR;
-
-	// The actual filter chain in the encoder is reversed. Some things
-	// still want the normal order chain, so we provide both.
-	size_t count = 1;
-	while (filters[count].id != LZMA_VLI_UNKNOWN)
-		++count;
-
-	lzma_filter reversed_filters[LZMA_FILTERS_MAX + 1];
-	for (size_t i = 0; i < count; ++i)
-		reversed_filters[count - i - 1] = filters[i];
-
-	reversed_filters[count].id = LZMA_VLI_UNKNOWN;
-
-	return strm->internal->next.update(strm->internal->next.coder,
-			strm->allocator, filters, reversed_filters);
-}
-
-
-extern lzma_ret
-lzma_raw_encoder_init(lzma_next_coder *next, lzma_allocator *allocator,
-		const lzma_filter *options)
-{
-	return lzma_raw_coder_init(next, allocator,
-			options, (lzma_filter_find)(&encoder_find), true);
-}
-
-
-extern LZMA_API(lzma_ret)
-lzma_raw_encoder(lzma_stream *strm, const lzma_filter *options)
-{
-	lzma_next_strm_init(lzma_raw_coder_init, strm, options,
-			(lzma_filter_find)(&encoder_find), true);
-
-	strm->internal->supported_actions[LZMA_RUN] = true;
-	strm->internal->supported_actions[LZMA_SYNC_FLUSH] = true;
-	strm->internal->supported_actions[LZMA_FINISH] = true;
-
-	return LZMA_OK;
-}
-
-
-extern LZMA_API(uint64_t)
-lzma_raw_encoder_memusage(const lzma_filter *filters)
-{
-	return lzma_raw_coder_memusage(
-			(lzma_filter_find)(&encoder_find), filters);
-}
-
-
-/*
-extern LZMA_API(lzma_vli)
-lzma_chunk_size(const lzma_filter *filters)
-{
-	lzma_vli max = 0;
-
-	for (size_t i = 0; filters[i].id != LZMA_VLI_UNKNOWN; ++i) {
-		const lzma_filter_encoder *const fe
-				= encoder_find(filters[i].id);
-		if (fe->chunk_size != NULL) {
-			const lzma_vli size
-					= fe->chunk_size(filters[i].options);
-			if (size == LZMA_VLI_UNKNOWN)
-				return LZMA_VLI_UNKNOWN;
-
-			if (size > max)
-				max = size;
-		}
-	}
-
-	return max;
-}
-*/
-
-
-extern LZMA_API(lzma_ret)
-lzma_properties_size(uint32_t *size, const lzma_filter *filter)
-{
-	const lzma_filter_encoder *const fe = encoder_find(filter->id);
-	if (fe == NULL) {
-		// Unknown filter - if the Filter ID is a proper VLI,
-		// return LZMA_OPTIONS_ERROR instead of LZMA_PROG_ERROR,
-		// because it's possible that we just don't have support
-		// compiled in for the requested filter.
-		return filter->id <= LZMA_VLI_MAX
-				? LZMA_OPTIONS_ERROR : LZMA_PROG_ERROR;
-	}
-
-	if (fe->props_size_get == NULL) {
-		// No props_size_get() function, use props_size_fixed.
-		*size = fe->props_size_fixed;
-		return LZMA_OK;
-	}
-
-	return fe->props_size_get(size, filter->options);
-}
-
-
-extern LZMA_API(lzma_ret)
-lzma_properties_encode(const lzma_filter *filter, uint8_t *props)
-{
-	const lzma_filter_encoder *const fe = encoder_find(filter->id);
-	if (fe == NULL)
-		return LZMA_PROG_ERROR;
-
-	if (fe->props_encode == NULL)
-		return LZMA_OK;
-
-	return fe->props_encode(filter->options, props);
-}
diff --git a/src/extra/xz/common/filter_encoder.h b/src/extra/xz/common/filter_encoder.h
deleted file mode 100644
index 5bc137f..0000000
--- a/src/extra/xz/common/filter_encoder.h
+++ /dev/null
@@ -1,27 +0,0 @@
-///////////////////////////////////////////////////////////////////////////////
-//
-/// \file       filter_encoder.c
-/// \brief      Filter ID mapping to filter-specific functions
-//
-//  Author:     Lasse Collin
-//
-//  This file has been put into the public domain.
-//  You can do whatever you want with this file.
-//
-///////////////////////////////////////////////////////////////////////////////
-
-#ifndef LZMA_FILTER_ENCODER_H
-#define LZMA_FILTER_ENCODER_H
-
-#include "common.h"
-
-
-// FIXME: Might become a part of the public API once finished.
-// extern lzma_vli lzma_chunk_size(const lzma_filter *filters);
-
-
-extern lzma_ret lzma_raw_encoder_init(
-		lzma_next_coder *next, lzma_allocator *allocator,
-		const lzma_filter *filters);
-
-#endif
diff --git a/src/extra/xz/common/filter_flags_decoder.c b/src/extra/xz/common/filter_flags_decoder.c
deleted file mode 100644
index caae10c..0000000
--- a/src/extra/xz/common/filter_flags_decoder.c
+++ /dev/null
@@ -1,46 +0,0 @@
-///////////////////////////////////////////////////////////////////////////////
-//
-/// \file       filter_flags_decoder.c
-/// \brief      Decodes a Filter Flags field
-//
-//  Author:     Lasse Collin
-//
-//  This file has been put into the public domain.
-//  You can do whatever you want with this file.
-//
-///////////////////////////////////////////////////////////////////////////////
-
-#include "filter_decoder.h"
-
-
-extern LZMA_API(lzma_ret)
-lzma_filter_flags_decode(
-		lzma_filter *filter, lzma_allocator *allocator,
-		const uint8_t *in, size_t *in_pos, size_t in_size)
-{
-	// Set the pointer to NULL so the caller can always safely free it.
-	filter->options = NULL;
-
-	// Filter ID
-	return_if_error(lzma_vli_decode(&filter->id, NULL,
-			in, in_pos, in_size));
-
-	if (filter->id >= LZMA_FILTER_RESERVED_START)
-		return LZMA_DATA_ERROR;
-
-	// Size of Properties
-	lzma_vli props_size;
-	return_if_error(lzma_vli_decode(&props_size, NULL,
-			in, in_pos, in_size));
-
-	// Filter Properties
-	if (in_size - *in_pos < props_size)
-		return LZMA_DATA_ERROR;
-
-	const lzma_ret ret = lzma_properties_decode(
-			filter, allocator, in + *in_pos, props_size);
-
-	*in_pos += props_size;
-
-	return ret;
-}
diff --git a/src/extra/xz/common/filter_flags_encoder.c b/src/extra/xz/common/filter_flags_encoder.c
deleted file mode 100644
index d110566..0000000
--- a/src/extra/xz/common/filter_flags_encoder.c
+++ /dev/null
@@ -1,56 +0,0 @@
-///////////////////////////////////////////////////////////////////////////////
-//
-/// \file       filter_flags_encoder.c
-/// \brief      Decodes a Filter Flags field
-//
-//  Author:     Lasse Collin
-//
-//  This file has been put into the public domain.
-//  You can do whatever you want with this file.
-//
-///////////////////////////////////////////////////////////////////////////////
-
-#include "filter_encoder.h"
-
-
-extern LZMA_API(lzma_ret)
-lzma_filter_flags_size(uint32_t *size, const lzma_filter *filter)
-{
-	if (filter->id >= LZMA_FILTER_RESERVED_START)
-		return LZMA_PROG_ERROR;
-
-	return_if_error(lzma_properties_size(size, filter));
-
-	*size += lzma_vli_size(filter->id) + lzma_vli_size(*size);
-
-	return LZMA_OK;
-}
-
-
-extern LZMA_API(lzma_ret)
-lzma_filter_flags_encode(const lzma_filter *filter,
-		uint8_t *out, size_t *out_pos, size_t out_size)
-{
-	// Filter ID
-	if (filter->id >= LZMA_FILTER_RESERVED_START)
-		return LZMA_PROG_ERROR;
-
-	return_if_error(lzma_vli_encode(filter->id, NULL,
-			out, out_pos, out_size));
-
-	// Size of Properties
-	uint32_t props_size;
-	return_if_error(lzma_properties_size(&props_size, filter));
-	return_if_error(lzma_vli_encode(props_size, NULL,
-			out, out_pos, out_size));
-
-	// Filter Properties
-	if (out_size - *out_pos < props_size)
-		return LZMA_PROG_ERROR;
-
-	return_if_error(lzma_properties_encode(filter, out + *out_pos));
-
-	*out_pos += props_size;
-
-	return LZMA_OK;
-}
diff --git a/src/extra/xz/common/index.c b/src/extra/xz/common/index.c
deleted file mode 100644
index 9af4bc1..0000000
--- a/src/extra/xz/common/index.c
+++ /dev/null
@@ -1,1244 +0,0 @@
-///////////////////////////////////////////////////////////////////////////////
-//
-/// \file       index.c
-/// \brief      Handling of .xz Indexes and some other Stream information
-//
-//  Author:     Lasse Collin
-//
-//  This file has been put into the public domain.
-//  You can do whatever you want with this file.
-//
-///////////////////////////////////////////////////////////////////////////////
-
-#include "index.h"
-#include "stream_flags_common.h"
-
-
-/// \brief      How many Records to allocate at once
-///
-/// This should be big enough to avoid making lots of tiny allocations
-/// but small enough to avoid too much unused memory at once.
-#define INDEX_GROUP_SIZE 512
-
-
-/// \brief      How many Records can be allocated at once at maximum
-#define PREALLOC_MAX ((SIZE_MAX - sizeof(index_group)) / sizeof(index_record))
-
-
-/// \brief      Base structure for index_stream and index_group structures
-typedef struct index_tree_node_s index_tree_node;
-struct index_tree_node_s {
-	/// Uncompressed start offset of this Stream (relative to the
-	/// beginning of the file) or Block (relative to the beginning
-	/// of the Stream)
-	lzma_vli uncompressed_base;
-
-	/// Compressed start offset of this Stream or Block
-	lzma_vli compressed_base;
-
-	index_tree_node *parent;
-	index_tree_node *left;
-	index_tree_node *right;
-};
-
-
-/// \brief      AVL tree to hold index_stream or index_group structures
-typedef struct {
-	/// Root node
-	index_tree_node *root;
-
-	/// Leftmost node. Since the tree will be filled sequentially,
-	/// this won't change after the first node has been added to
-	/// the tree.
-	index_tree_node *leftmost;
-
-	/// The rightmost node in the tree. Since the tree is filled
-	/// sequentially, this is always the node where to add the new data.
-	index_tree_node *rightmost;
-
-	/// Number of nodes in the tree
-	uint32_t count;
-
-} index_tree;
-
-
-typedef struct {
-	lzma_vli uncompressed_sum;
-	lzma_vli unpadded_sum;
-} index_record;
-
-
-typedef struct {
-	/// Every Record group is part of index_stream.groups tree.
-	index_tree_node node;
-
-	/// Number of Blocks in this Stream before this group.
-	lzma_vli number_base;
-
-	/// Number of Records that can be put in records[].
-	size_t allocated;
-
-	/// Index of the last Record in use.
-	size_t last;
-
-	/// The sizes in this array are stored as cumulative sums relative
-	/// to the beginning of the Stream. This makes it possible to
-	/// use binary search in lzma_index_locate().
-	///
-	/// Note that the cumulative summing is done specially for
-	/// unpadded_sum: The previous value is rounded up to the next
-	/// multiple of four before adding the Unpadded Size of the new
-	/// Block. The total encoded size of the Blocks in the Stream
-	/// is records[last].unpadded_sum in the last Record group of
-	/// the Stream.
-	///
-	/// For example, if the Unpadded Sizes are 39, 57, and 81, the
-	/// stored values are 39, 97 (40 + 57), and 181 (100 + 181).
-	/// The total encoded size of these Blocks is 184.
-	///
-	/// This is a flexible array, because it makes easy to optimize
-	/// memory usage in case someone concatenates many Streams that
-	/// have only one or few Blocks.
-	index_record records[];
-
-} index_group;
-
-
-typedef struct {
-	/// Every index_stream is a node in the tree of Sreams.
-	index_tree_node node;
-
-	/// Number of this Stream (first one is 1)
-	uint32_t number;
-
-	/// Total number of Blocks before this Stream
-	lzma_vli block_number_base;
-
-	/// Record groups of this Stream are stored in a tree.
-	/// It's a T-tree with AVL-tree balancing. There are
-	/// INDEX_GROUP_SIZE Records per node by default.
-	/// This keeps the number of memory allocations reasonable
-	/// and finding a Record is fast.
-	index_tree groups;
-
-	/// Number of Records in this Stream
-	lzma_vli record_count;
-
-	/// Size of the List of Records field in this Stream. This is used
-	/// together with record_count to calculate the size of the Index
-	/// field and thus the total size of the Stream.
-	lzma_vli index_list_size;
-
-	/// Stream Flags of this Stream. This is meaningful only if
-	/// the Stream Flags have been told us with lzma_index_stream_flags().
-	/// Initially stream_flags.version is set to UINT32_MAX to indicate
-	/// that the Stream Flags are unknown.
-	lzma_stream_flags stream_flags;
-
-	/// Amount of Stream Padding after this Stream. This defaults to
-	/// zero and can be set with lzma_index_stream_padding().
-	lzma_vli stream_padding;
-
-} index_stream;
-
-
-struct lzma_index_s {
-	/// AVL-tree containing the Stream(s). Often there is just one
-	/// Stream, but using a tree keeps lookups fast even when there
-	/// are many concatenated Streams.
-	index_tree streams;
-
-	/// Uncompressed size of all the Blocks in the Stream(s)
-	lzma_vli uncompressed_size;
-
-	/// Total size of all the Blocks in the Stream(s)
-	lzma_vli total_size;
-
-	/// Total number of Records in all Streams in this lzma_index
-	lzma_vli record_count;
-
-	/// Size of the List of Records field if all the Streams in this
-	/// lzma_index were packed into a single Stream (makes it simpler to
-	/// take many .xz files and combine them into a single Stream).
-	///
-	/// This value together with record_count is needed to calculate
-	/// Backward Size that is stored into Stream Footer.
-	lzma_vli index_list_size;
-
-	/// How many Records to allocate at once in lzma_index_append().
-	/// This defaults to INDEX_GROUP_SIZE but can be overriden with
-	/// lzma_index_prealloc().
-	size_t prealloc;
-
-	/// Bitmask indicating what integrity check types have been used
-	/// as set by lzma_index_stream_flags(). The bit of the last Stream
-	/// is not included here, since it is possible to change it by
-	/// calling lzma_index_stream_flags() again.
-	uint32_t checks;
-};
-
-
-static void
-index_tree_init(index_tree *tree)
-{
-	tree->root = NULL;
-	tree->leftmost = NULL;
-	tree->rightmost = NULL;
-	tree->count = 0;
-	return;
-}
-
-
-/// Helper for index_tree_end()
-static void
-index_tree_node_end(index_tree_node *node, lzma_allocator *allocator,
-		void (*free_func)(void *node, lzma_allocator *allocator))
-{
-	// The tree won't ever be very huge, so recursion should be fine.
-	// 20 levels in the tree is likely quite a lot already in practice.
-	if (node->left != NULL)
-		index_tree_node_end(node->left, allocator, free_func);
-
-	if (node->right != NULL)
-		index_tree_node_end(node->right, allocator, free_func);
-
-	if (free_func != NULL)
-		free_func(node, allocator);
-
-	lzma_free(node, allocator);
-	return;
-}
-
-
-/// Free the meory allocated for a tree. If free_func is not NULL,
-/// it is called on each node before freeing the node. This is used
-/// to free the Record groups from each index_stream before freeing
-/// the index_stream itself.
-static void
-index_tree_end(index_tree *tree, lzma_allocator *allocator,
-		void (*free_func)(void *node, lzma_allocator *allocator))
-{
-	if (tree->root != NULL)
-		index_tree_node_end(tree->root, allocator, free_func);
-
-	return;
-}
-
-
-/// Add a new node to the tree. node->uncompressed_base and
-/// node->compressed_base must have been set by the caller already.
-static void
-index_tree_append(index_tree *tree, index_tree_node *node)
-{
-	node->parent = tree->rightmost;
-	node->left = NULL;
-	node->right = NULL;
-
-	++tree->count;
-
-	// Handle the special case of adding the first node.
-	if (tree->root == NULL) {
-		tree->root = node;
-		tree->leftmost = node;
-		tree->rightmost = node;
-		return;
-	}
-
-	// The tree is always filled sequentially.
-	assert(tree->rightmost->uncompressed_base <= node->uncompressed_base);
-	assert(tree->rightmost->compressed_base < node->compressed_base);
-
-	// Add the new node after the rightmost node. It's the correct
-	// place due to the reason above.
-	tree->rightmost->right = node;
-	tree->rightmost = node;
-
-	// Balance the AVL-tree if needed. We don't need to keep the balance
-	// factors in nodes, because we always fill the tree sequentially,
-	// and thus know the state of the tree just by looking at the node
-	// count. From the node count we can calculate how many steps to go
-	// up in the tree to find the rotation root.
-	uint32_t up = tree->count ^ (UINT32_C(1) << bsr32(tree->count));
-	if (up != 0) {
-		// Locate the root node for the rotation.
-		up = ctz32(tree->count) + 2;
-		do {
-			node = node->parent;
-		} while (--up > 0);
-
-		// Rotate left using node as the rotation root.
-		index_tree_node *pivot = node->right;
-
-		if (node->parent == NULL) {
-			tree->root = pivot;
-		} else {
-			assert(node->parent->right == node);
-			node->parent->right = pivot;
-		}
-
-		pivot->parent = node->parent;
-
-		node->right = pivot->left;
-		if (node->right != NULL)
-			node->right->parent = node;
-
-		pivot->left = node;
-		node->parent = pivot;
-	}
-
-	return;
-}
-
-
-/// Get the next node in the tree. Return NULL if there are no more nodes.
-static void *
-index_tree_next(const index_tree_node *node)
-{
-	if (node->right != NULL) {
-		node = node->right;
-		while (node->left != NULL)
-			node = node->left;
-
-		return (void *)(node);
-	}
-
-	while (node->parent != NULL && node->parent->right == node)
-		node = node->parent;
-
-	return (void *)(node->parent);
-}
-
-
-/// Locate a node that contains the given uncompressed offset. It is
-/// caller's job to check that target is not bigger than the uncompressed
-/// size of the tree (the last node would be returned in that case still).
-static void *
-index_tree_locate(const index_tree *tree, lzma_vli target)
-{
-	const index_tree_node *result = NULL;
-	const index_tree_node *node = tree->root;
-
-	assert(tree->leftmost == NULL
-			|| tree->leftmost->uncompressed_base == 0);
-
-	// Consecutive nodes may have the same uncompressed_base.
-	// We must pick the rightmost one.
-	while (node != NULL) {
-		if (node->uncompressed_base > target) {
-			node = node->left;
-		} else {
-			result = node;
-			node = node->right;
-		}
-	}
-
-	return (void *)(result);
-}
-
-
-/// Allocate and initialize a new Stream using the given base offsets.
-static index_stream *
-index_stream_init(lzma_vli compressed_base, lzma_vli uncompressed_base,
-		lzma_vli stream_number, lzma_vli block_number_base,
-		lzma_allocator *allocator)
-{
-	index_stream *s = lzma_alloc(sizeof(index_stream), allocator);
-	if (s == NULL)
-		return NULL;
-
-	s->node.uncompressed_base = uncompressed_base;
-	s->node.compressed_base = compressed_base;
-	s->node.parent = NULL;
-	s->node.left = NULL;
-	s->node.right = NULL;
-
-	s->number = stream_number;
-	s->block_number_base = block_number_base;
-
-	index_tree_init(&s->groups);
-
-	s->record_count = 0;
-	s->index_list_size = 0;
-	s->stream_flags.version = UINT32_MAX;
-	s->stream_padding = 0;
-
-	return s;
-}
-
-
-/// Free the memory allocated for a Stream and its Record groups.
-static void
-index_stream_end(void *node, lzma_allocator *allocator)
-{
-	index_stream *s = node;
-	index_tree_end(&s->groups, allocator, NULL);
-	return;
-}
-
-
-static lzma_index *
-index_init_plain(lzma_allocator *allocator)
-{
-	lzma_index *i = lzma_alloc(sizeof(lzma_index), allocator);
-	if (i != NULL) {
-		index_tree_init(&i->streams);
-		i->uncompressed_size = 0;
-		i->total_size = 0;
-		i->record_count = 0;
-		i->index_list_size = 0;
-		i->prealloc = INDEX_GROUP_SIZE;
-		i->checks = 0;
-	}
-
-	return i;
-}
-
-
-extern LZMA_API(lzma_index *)
-lzma_index_init(lzma_allocator *allocator)
-{
-	lzma_index *i = index_init_plain(allocator);
-	if (i == NULL)
-		return NULL;
-
-	index_stream *s = index_stream_init(0, 0, 1, 0, allocator);
-	if (s == NULL) {
-		lzma_free(i, allocator);
-		return NULL;
-	}
-
-	index_tree_append(&i->streams, &s->node);
-
-	return i;
-}
-
-
-extern LZMA_API(void)
-lzma_index_end(lzma_index *i, lzma_allocator *allocator)
-{
-	// NOTE: If you modify this function, check also the bottom
-	// of lzma_index_cat().
-	if (i != NULL) {
-		index_tree_end(&i->streams, allocator, &index_stream_end);
-		lzma_free(i, allocator);
-	}
-
-	return;
-}
-
-
-extern void
-lzma_index_prealloc(lzma_index *i, lzma_vli records)
-{
-	if (records > PREALLOC_MAX)
-		records = PREALLOC_MAX;
-
-	i->prealloc = (size_t)(records);
-	return;
-}
-
-
-extern LZMA_API(uint64_t)
-lzma_index_memusage(lzma_vli streams, lzma_vli blocks)
-{
-	// This calculates an upper bound that is only a little bit
-	// bigger than the exact maximum memory usage with the given
-	// parameters.
-
-	// Typical malloc() overhead is 2 * sizeof(void *) but we take
-	// a little bit extra just in case. Using LZMA_MEMUSAGE_BASE
-	// instead would give too inaccurate estimate.
-	const size_t alloc_overhead = 4 * sizeof(void *);
-
-	// Amount of memory needed for each Stream base structures.
-	// We assume that every Stream has at least one Block and
-	// thus at least one group.
-	const size_t stream_base = sizeof(index_stream)
-			+ sizeof(index_group) + 2 * alloc_overhead;
-
-	// Amount of memory needed per group.
-	const size_t group_base = sizeof(index_group)
-			+ INDEX_GROUP_SIZE * sizeof(index_record)
-			+ alloc_overhead;
-
-	// Number of groups. There may actually be more, but that overhead
-	// has been taken into account in stream_base already.
-	const lzma_vli groups
-			= (blocks + INDEX_GROUP_SIZE - 1) / INDEX_GROUP_SIZE;
-
-	// Memory used by index_stream and index_group structures.
-	const uint64_t streams_mem = streams * stream_base;
-	const uint64_t groups_mem = groups * group_base;
-
-	// Memory used by the base structure.
-	const uint64_t index_base = sizeof(lzma_index) + alloc_overhead;
-
-	// Validate the arguments and catch integer overflows.
-	// Maximum number of Streams is "only" UINT32_MAX, because
-	// that limit is used by the tree containing the Streams.
-	const uint64_t limit = UINT64_MAX - index_base;
-	if (streams == 0 || streams > UINT32_MAX || blocks > LZMA_VLI_MAX
-			|| streams > limit / stream_base
-			|| groups > limit / group_base
-			|| limit - streams_mem < groups_mem)
-		return UINT64_MAX;
-
-	return index_base + streams_mem + groups_mem;
-}
-
-
-extern LZMA_API(uint64_t)
-lzma_index_memused(const lzma_index *i)
-{
-	return lzma_index_memusage(i->streams.count, i->record_count);
-}
-
-
-extern LZMA_API(lzma_vli)
-lzma_index_block_count(const lzma_index *i)
-{
-	return i->record_count;
-}
-
-
-extern LZMA_API(lzma_vli)
-lzma_index_stream_count(const lzma_index *i)
-{
-	return i->streams.count;
-}
-
-
-extern LZMA_API(lzma_vli)
-lzma_index_size(const lzma_index *i)
-{
-	return index_size(i->record_count, i->index_list_size);
-}
-
-
-extern LZMA_API(lzma_vli)
-lzma_index_total_size(const lzma_index *i)
-{
-	return i->total_size;
-}
-
-
-extern LZMA_API(lzma_vli)
-lzma_index_stream_size(const lzma_index *i)
-{
-	// Stream Header + Blocks + Index + Stream Footer
-	return LZMA_STREAM_HEADER_SIZE + i->total_size
-			+ index_size(i->record_count, i->index_list_size)
-			+ LZMA_STREAM_HEADER_SIZE;
-}
-
-
-static lzma_vli
-index_file_size(lzma_vli compressed_base, lzma_vli unpadded_sum,
-		lzma_vli record_count, lzma_vli index_list_size,
-		lzma_vli stream_padding)
-{
-	// Earlier Streams and Stream Paddings + Stream Header
-	// + Blocks + Index + Stream Footer + Stream Padding
-	//
-	// This might go over LZMA_VLI_MAX due to too big unpadded_sum
-	// when this function is used in lzma_index_append().
-	lzma_vli file_size = compressed_base + 2 * LZMA_STREAM_HEADER_SIZE
-			+ stream_padding + vli_ceil4(unpadded_sum);
-	if (file_size > LZMA_VLI_MAX)
-		return LZMA_VLI_UNKNOWN;
-
-	// The same applies here.
-	file_size += index_size(record_count, index_list_size);
-	if (file_size > LZMA_VLI_MAX)
-		return LZMA_VLI_UNKNOWN;
-
-	return file_size;
-}
-
-
-extern LZMA_API(lzma_vli)
-lzma_index_file_size(const lzma_index *i)
-{
-	const index_stream *s = (const index_stream *)(i->streams.rightmost);
-	const index_group *g = (const index_group *)(s->groups.rightmost);
-	return index_file_size(s->node.compressed_base,
-			g == NULL ? 0 : g->records[g->last].unpadded_sum,
-			s->record_count, s->index_list_size,
-			s->stream_padding);
-}
-
-
-extern LZMA_API(lzma_vli)
-lzma_index_uncompressed_size(const lzma_index *i)
-{
-	return i->uncompressed_size;
-}
-
-
-extern LZMA_API(uint32_t)
-lzma_index_checks(const lzma_index *i)
-{
-	uint32_t checks = i->checks;
-
-	// Get the type of the Check of the last Stream too.
-	const index_stream *s = (const index_stream *)(i->streams.rightmost);
-	if (s->stream_flags.version != UINT32_MAX)
-		checks |= UINT32_C(1) << s->stream_flags.check;
-
-	return checks;
-}
-
-
-extern uint32_t
-lzma_index_padding_size(const lzma_index *i)
-{
-	return (LZMA_VLI_C(4) - index_size_unpadded(
-			i->record_count, i->index_list_size)) & 3;
-}
-
-
-extern LZMA_API(lzma_ret)
-lzma_index_stream_flags(lzma_index *i, const lzma_stream_flags *stream_flags)
-{
-	if (i == NULL || stream_flags == NULL)
-		return LZMA_PROG_ERROR;
-
-	// Validate the Stream Flags.
-	return_if_error(lzma_stream_flags_compare(
-			stream_flags, stream_flags));
-
-	index_stream *s = (index_stream *)(i->streams.rightmost);
-	s->stream_flags = *stream_flags;
-
-	return LZMA_OK;
-}
-
-
-extern LZMA_API(lzma_ret)
-lzma_index_stream_padding(lzma_index *i, lzma_vli stream_padding)
-{
-	if (i == NULL || stream_padding > LZMA_VLI_MAX
-			|| (stream_padding & 3) != 0)
-		return LZMA_PROG_ERROR;
-
-	index_stream *s = (index_stream *)(i->streams.rightmost);
-
-	// Check that the new value won't make the file grow too big.
-	const lzma_vli old_stream_padding = s->stream_padding;
-	s->stream_padding = 0;
-	if (lzma_index_file_size(i) + stream_padding > LZMA_VLI_MAX) {
-		s->stream_padding = old_stream_padding;
-		return LZMA_DATA_ERROR;
-	}
-
-	s->stream_padding = stream_padding;
-	return LZMA_OK;
-}
-
-
-extern LZMA_API(lzma_ret)
-lzma_index_append(lzma_index *i, lzma_allocator *allocator,
-		lzma_vli unpadded_size, lzma_vli uncompressed_size)
-{
-	// Validate.
-	if (i == NULL || unpadded_size < UNPADDED_SIZE_MIN
-			|| unpadded_size > UNPADDED_SIZE_MAX
-			|| uncompressed_size > LZMA_VLI_MAX)
-		return LZMA_PROG_ERROR;
-
-	index_stream *s = (index_stream *)(i->streams.rightmost);
-	index_group *g = (index_group *)(s->groups.rightmost);
-
-	const lzma_vli compressed_base = g == NULL ? 0
-			: vli_ceil4(g->records[g->last].unpadded_sum);
-	const lzma_vli uncompressed_base = g == NULL ? 0
-			: g->records[g->last].uncompressed_sum;
-	const uint32_t index_list_size_add = lzma_vli_size(unpadded_size)
-			+ lzma_vli_size(uncompressed_size);
-
-	// Check that the file size will stay within limits.
-	if (index_file_size(s->node.compressed_base,
-			compressed_base + unpadded_size, s->record_count + 1,
-			s->index_list_size + index_list_size_add,
-			s->stream_padding) == LZMA_VLI_UNKNOWN)
-		return LZMA_DATA_ERROR;
-
-	// The size of the Index field must not exceed the maximum value
-	// that can be stored in the Backward Size field.
-	if (index_size(i->record_count + 1,
-			i->index_list_size + index_list_size_add)
-			> LZMA_BACKWARD_SIZE_MAX)
-		return LZMA_DATA_ERROR;
-
-	if (g != NULL && g->last + 1 < g->allocated) {
-		// There is space in the last group at least for one Record.
-		++g->last;
-	} else {
-		// We need to allocate a new group.
-		g = lzma_alloc(sizeof(index_group)
-				+ i->prealloc * sizeof(index_record),
-				allocator);
-		if (g == NULL)
-			return LZMA_MEM_ERROR;
-
-		g->last = 0;
-		g->allocated = i->prealloc;
-
-		// Reset prealloc so that if the application happens to
-		// add new Records, the allocation size will be sane.
-		i->prealloc = INDEX_GROUP_SIZE;
-
-		// Set the start offsets of this group.
-		g->node.uncompressed_base = uncompressed_base;
-		g->node.compressed_base = compressed_base;
-		g->number_base = s->record_count + 1;
-
-		// Add the new group to the Stream.
-		index_tree_append(&s->groups, &g->node);
-	}
-
-	// Add the new Record to the group.
-	g->records[g->last].uncompressed_sum
-			= uncompressed_base + uncompressed_size;
-	g->records[g->last].unpadded_sum
-			= compressed_base + unpadded_size;
-
-	// Update the totals.
-	++s->record_count;
-	s->index_list_size += index_list_size_add;
-
-	i->total_size += vli_ceil4(unpadded_size);
-	i->uncompressed_size += uncompressed_size;
-	++i->record_count;
-	i->index_list_size += index_list_size_add;
-
-	return LZMA_OK;
-}
-
-
-/// Structure to pass info to index_cat_helper()
-typedef struct {
-	/// Uncompressed size of the destination
-	lzma_vli uncompressed_size;
-
-	/// Compressed file size of the destination
-	lzma_vli file_size;
-
-	/// Same as above but for Block numbers
-	lzma_vli block_number_add;
-
-	/// Number of Streams that were in the destination index before we
-	/// started appending new Streams from the source index. This is
-	/// used to fix the Stream numbering.
-	uint32_t stream_number_add;
-
-	/// Destination index' Stream tree
-	index_tree *streams;
-
-} index_cat_info;
-
-
-/// Add the Stream nodes from the source index to dest using recursion.
-/// Simplest iterative traversal of the source tree wouldn't work, because
-/// we update the pointers in nodes when moving them to the destination tree.
-static void
-index_cat_helper(const index_cat_info *info, index_stream *this)
-{
-	index_stream *left = (index_stream *)(this->node.left);
-	index_stream *right = (index_stream *)(this->node.right);
-
-	if (left != NULL)
-		index_cat_helper(info, left);
-
-	this->node.uncompressed_base += info->uncompressed_size;
-	this->node.compressed_base += info->file_size;
-	this->number += info->stream_number_add;
-	this->block_number_base += info->block_number_add;
-	index_tree_append(info->streams, &this->node);
-
-	if (right != NULL)
-		index_cat_helper(info, right);
-
-	return;
-}
-
-
-extern LZMA_API(lzma_ret)
-lzma_index_cat(lzma_index *restrict dest, lzma_index *restrict src,
-		lzma_allocator *allocator)
-{
-	const lzma_vli dest_file_size = lzma_index_file_size(dest);
-
-	// Check that we don't exceed the file size limits.
-	if (dest_file_size + lzma_index_file_size(src) > LZMA_VLI_MAX
-			|| dest->uncompressed_size + src->uncompressed_size
-				> LZMA_VLI_MAX)
-		return LZMA_DATA_ERROR;
-
-	// Check that the encoded size of the combined lzma_indexes stays
-	// within limits. In theory, this should be done only if we know
-	// that the user plans to actually combine the Streams and thus
-	// construct a single Index (probably rare). However, exceeding
-	// this limit is quite theoretical, so we do this check always
-	// to simplify things elsewhere.
-	{
-		const lzma_vli dest_size = index_size_unpadded(
-				dest->record_count, dest->index_list_size);
-		const lzma_vli src_size = index_size_unpadded(
-				src->record_count, src->index_list_size);
-		if (vli_ceil4(dest_size + src_size) > LZMA_BACKWARD_SIZE_MAX)
-			return LZMA_DATA_ERROR;
-	}
-
-	// Optimize the last group to minimize memory usage. Allocation has
-	// to be done before modifying dest or src.
-	{
-		index_stream *s = (index_stream *)(dest->streams.rightmost);
-		index_group *g = (index_group *)(s->groups.rightmost);
-		if (g != NULL && g->last + 1 < g->allocated) {
-			assert(g->node.left == NULL);
-			assert(g->node.right == NULL);
-
-			index_group *newg = lzma_alloc(sizeof(index_group)
-					+ (g->last + 1)
-					* sizeof(index_record),
-					allocator);
-			if (newg == NULL)
-				return LZMA_MEM_ERROR;
-
-			newg->node = g->node;
-			newg->allocated = g->last + 1;
-			newg->last = g->last;
-			newg->number_base = g->number_base;
-
-			memcpy(newg->records, g->records, newg->allocated
-					* sizeof(index_record));
-
-			if (g->node.parent != NULL) {
-				assert(g->node.parent->right == &g->node);
-				g->node.parent->right = &newg->node;
-			}
-
-			if (s->groups.leftmost == &g->node) {
-				assert(s->groups.root == &g->node);
-				s->groups.leftmost = &newg->node;
-				s->groups.root = &newg->node;
-			}
-
-			if (s->groups.rightmost == &g->node)
-				s->groups.rightmost = &newg->node;
-
-			lzma_free(g, allocator);
-		}
-	}
-
-	// Add all the Streams from src to dest. Update the base offsets
-	// of each Stream from src.
-	const index_cat_info info = {
-		.uncompressed_size = dest->uncompressed_size,
-		.file_size = dest_file_size,
-		.stream_number_add = dest->streams.count,
-		.block_number_add = dest->record_count,
-		.streams = &dest->streams,
-	};
-	index_cat_helper(&info, (index_stream *)(src->streams.root));
-
-	// Update info about all the combined Streams.
-	dest->uncompressed_size += src->uncompressed_size;
-	dest->total_size += src->total_size;
-	dest->record_count += src->record_count;
-	dest->index_list_size += src->index_list_size;
-	dest->checks = lzma_index_checks(dest) | src->checks;
-
-	// There's nothing else left in src than the base structure.
-	lzma_free(src, allocator);
-
-	return LZMA_OK;
-}
-
-
-/// Duplicate an index_stream.
-static index_stream *
-index_dup_stream(const index_stream *src, lzma_allocator *allocator)
-{
-	// Catch a somewhat theoretical integer overflow.
-	if (src->record_count > PREALLOC_MAX)
-		return NULL;
-
-	// Allocate and initialize a new Stream.
-	index_stream *dest = index_stream_init(src->node.compressed_base,
-			src->node.uncompressed_base, src->number,
-			src->block_number_base, allocator);
-
-	// Return immediately if allocation failed or if there are
-	// no groups to duplicate.
-	if (dest == NULL || src->groups.leftmost == NULL)
-		return dest;
-
-	// Copy the overall information.
-	dest->record_count = src->record_count;
-	dest->index_list_size = src->index_list_size;
-	dest->stream_flags = src->stream_flags;
-	dest->stream_padding = src->stream_padding;
-
-	// Allocate memory for the Records. We put all the Records into
-	// a single group. It's simplest and also tends to make
-	// lzma_index_locate() a little bit faster with very big Indexes.
-	index_group *destg = lzma_alloc(sizeof(index_group)
-			+ src->record_count * sizeof(index_record),
-			allocator);
-	if (destg == NULL) {
-		index_stream_end(dest, allocator);
-		return NULL;
-	}
-
-	// Initialize destg.
-	destg->node.uncompressed_base = 0;
-	destg->node.compressed_base = 0;
-	destg->number_base = 1;
-	destg->allocated = src->record_count;
-	destg->last = src->record_count - 1;
-
-	// Go through all the groups in src and copy the Records into destg.
-	const index_group *srcg = (const index_group *)(src->groups.leftmost);
-	size_t i = 0;
-	do {
-		memcpy(destg->records + i, srcg->records,
-				(srcg->last + 1) * sizeof(index_record));
-		i += srcg->last + 1;
-		srcg = index_tree_next(&srcg->node);
-	} while (srcg != NULL);
-
-	assert(i == destg->allocated);
-
-	// Add the group to the new Stream.
-	index_tree_append(&dest->groups, &destg->node);
-
-	return dest;
-}
-
-
-extern LZMA_API(lzma_index *)
-lzma_index_dup(const lzma_index *src, lzma_allocator *allocator)
-{
-	// Allocate the base structure (no initial Stream).
-	lzma_index *dest = index_init_plain(allocator);
-	if (dest == NULL)
-		return NULL;
-
-	// Copy the totals.
-	dest->uncompressed_size = src->uncompressed_size;
-	dest->total_size = src->total_size;
-	dest->record_count = src->record_count;
-	dest->index_list_size = src->index_list_size;
-
-	// Copy the Streams and the groups in them.
-	const index_stream *srcstream
-			= (const index_stream *)(src->streams.leftmost);
-	do {
-		index_stream *deststream = index_dup_stream(
-				srcstream, allocator);
-		if (deststream == NULL) {
-			lzma_index_end(dest, allocator);
-			return NULL;
-		}
-
-		index_tree_append(&dest->streams, &deststream->node);
-
-		srcstream = index_tree_next(&srcstream->node);
-	} while (srcstream != NULL);
-
-	return dest;
-}
-
-
-/// Indexing for lzma_index_iter.internal[]
-enum {
-	ITER_INDEX,
-	ITER_STREAM,
-	ITER_GROUP,
-	ITER_RECORD,
-	ITER_METHOD,
-};
-
-
-/// Values for lzma_index_iter.internal[ITER_METHOD].s
-enum {
-	ITER_METHOD_NORMAL,
-	ITER_METHOD_NEXT,
-	ITER_METHOD_LEFTMOST,
-};
-
-
-static void
-iter_set_info(lzma_index_iter *iter)
-{
-	const lzma_index *i = iter->internal[ITER_INDEX].p;
-	const index_stream *stream = iter->internal[ITER_STREAM].p;
-	const index_group *group = iter->internal[ITER_GROUP].p;
-	const size_t record = iter->internal[ITER_RECORD].s;
-
-	// lzma_index_iter.internal must not contain a pointer to the last
-	// group in the index, because that may be reallocated by
-	// lzma_index_cat().
-	if (group == NULL) {
-		// There are no groups.
-		assert(stream->groups.root == NULL);
-		iter->internal[ITER_METHOD].s = ITER_METHOD_LEFTMOST;
-
-	} else if (i->streams.rightmost != &stream->node
-			|| stream->groups.rightmost != &group->node) {
-		// The group is not not the last group in the index.
-		iter->internal[ITER_METHOD].s = ITER_METHOD_NORMAL;
-
-	} else if (stream->groups.leftmost != &group->node) {
-		// The group isn't the only group in the Stream, thus we
-		// know that it must have a parent group i.e. it's not
-		// the root node.
-		assert(stream->groups.root != &group->node);
-		assert(group->node.parent->right == &group->node);
-		iter->internal[ITER_METHOD].s = ITER_METHOD_NEXT;
-		iter->internal[ITER_GROUP].p = group->node.parent;
-
-	} else {
-		// The Stream has only one group.
-		assert(stream->groups.root == &group->node);
-		assert(group->node.parent == NULL);
-		iter->internal[ITER_METHOD].s = ITER_METHOD_LEFTMOST;
-		iter->internal[ITER_GROUP].p = NULL;
-	}
-
-	iter->stream.number = stream->number;
-	iter->stream.block_count = stream->record_count;
-	iter->stream.compressed_offset = stream->node.compressed_base;
-	iter->stream.uncompressed_offset = stream->node.uncompressed_base;
-
-	// iter->stream.flags will be NULL if the Stream Flags haven't been
-	// set with lzma_index_stream_flags().
-	iter->stream.flags = stream->stream_flags.version == UINT32_MAX
-			? NULL : &stream->stream_flags;
-	iter->stream.padding = stream->stream_padding;
-
-	if (stream->groups.rightmost == NULL) {
-		// Stream has no Blocks.
-		iter->stream.compressed_size = index_size(0, 0)
-				+ 2 * LZMA_STREAM_HEADER_SIZE;
-		iter->stream.uncompressed_size = 0;
-	} else {
-		const index_group *g = (const index_group *)(
-				stream->groups.rightmost);
-
-		// Stream Header + Stream Footer + Index + Blocks
-		iter->stream.compressed_size = 2 * LZMA_STREAM_HEADER_SIZE
-				+ index_size(stream->record_count,
-					stream->index_list_size)
-				+ vli_ceil4(g->records[g->last].unpadded_sum);
-		iter->stream.uncompressed_size
-				= g->records[g->last].uncompressed_sum;
-	}
-
-	if (group != NULL) {
-		iter->block.number_in_stream = group->number_base + record;
-		iter->block.number_in_file = iter->block.number_in_stream
-				+ stream->block_number_base;
-
-		iter->block.compressed_stream_offset
-				= record == 0 ? group->node.compressed_base
-				: vli_ceil4(group->records[
-					record - 1].unpadded_sum);
-		iter->block.uncompressed_stream_offset
-				= record == 0 ? group->node.uncompressed_base
-				: group->records[record - 1].uncompressed_sum;
-
-		iter->block.uncompressed_size
-				= group->records[record].uncompressed_sum
-				- iter->block.uncompressed_stream_offset;
-		iter->block.unpadded_size
-				= group->records[record].unpadded_sum
-				- iter->block.compressed_stream_offset;
-		iter->block.total_size = vli_ceil4(iter->block.unpadded_size);
-
-		iter->block.compressed_stream_offset
-				+= LZMA_STREAM_HEADER_SIZE;
-
-		iter->block.compressed_file_offset
-				= iter->block.compressed_stream_offset
-				+ iter->stream.compressed_offset;
-		iter->block.uncompressed_file_offset
-				= iter->block.uncompressed_stream_offset
-				+ iter->stream.uncompressed_offset;
-	}
-
-	return;
-}
-
-
-extern LZMA_API(void)
-lzma_index_iter_init(lzma_index_iter *iter, const lzma_index *i)
-{
-	iter->internal[ITER_INDEX].p = i;
-	lzma_index_iter_rewind(iter);
-	return;
-}
-
-
-extern LZMA_API(void)
-lzma_index_iter_rewind(lzma_index_iter *iter)
-{
-	iter->internal[ITER_STREAM].p = NULL;
-	iter->internal[ITER_GROUP].p = NULL;
-	iter->internal[ITER_RECORD].s = 0;
-	iter->internal[ITER_METHOD].s = ITER_METHOD_NORMAL;
-	return;
-}
-
-
-extern LZMA_API(lzma_bool)
-lzma_index_iter_next(lzma_index_iter *iter, lzma_index_iter_mode mode)
-{
-	// Catch unsupported mode values.
-	if ((unsigned int)(mode) > LZMA_INDEX_ITER_NONEMPTY_BLOCK)
-		return true;
-
-	const lzma_index *i = iter->internal[ITER_INDEX].p;
-	const index_stream *stream = iter->internal[ITER_STREAM].p;
-	const index_group *group = NULL;
-	size_t record = iter->internal[ITER_RECORD].s;
-
-	// If we are being asked for the next Stream, leave group to NULL
-	// so that the rest of the this function thinks that this Stream
-	// has no groups and will thus go to the next Stream.
-	if (mode != LZMA_INDEX_ITER_STREAM) {
-		// Get the pointer to the current group. See iter_set_inf()
-		// for explanation.
-		switch (iter->internal[ITER_METHOD].s) {
-		case ITER_METHOD_NORMAL:
-			group = iter->internal[ITER_GROUP].p;
-			break;
-
-		case ITER_METHOD_NEXT:
-			group = index_tree_next(iter->internal[ITER_GROUP].p);
-			break;
-
-		case ITER_METHOD_LEFTMOST:
-			group = (const index_group *)(
-					stream->groups.leftmost);
-			break;
-		}
-	}
-
-again:
-	if (stream == NULL) {
-		// We at the beginning of the lzma_index.
-		// Locate the first Stream.
-		stream = (const index_stream *)(i->streams.leftmost);
-		if (mode >= LZMA_INDEX_ITER_BLOCK) {
-			// Since we are being asked to return information
-			// about the first a Block, skip Streams that have
-			// no Blocks.
-			while (stream->groups.leftmost == NULL) {
-				stream = index_tree_next(&stream->node);
-				if (stream == NULL)
-					return true;
-			}
-		}
-
-		// Start from the first Record in the Stream.
-		group = (const index_group *)(stream->groups.leftmost);
-		record = 0;
-
-	} else if (group != NULL && record < group->last) {
-		// The next Record is in the same group.
-		++record;
-
-	} else {
-		// This group has no more Records or this Stream has
-		// no Blocks at all.
-		record = 0;
-
-		// If group is not NULL, this Stream has at least one Block
-		// and thus at least one group. Find the next group.
-		if (group != NULL)
-			group = index_tree_next(&group->node);
-
-		if (group == NULL) {
-			// This Stream has no more Records. Find the next
-			// Stream. If we are being asked to return information
-			// about a Block, we skip empty Streams.
-			do {
-				stream = index_tree_next(&stream->node);
-				if (stream == NULL)
-					return true;
-			} while (mode >= LZMA_INDEX_ITER_BLOCK
-					&& stream->groups.leftmost == NULL);
-
-			group = (const index_group *)(
-					stream->groups.leftmost);
-		}
-	}
-
-	if (mode == LZMA_INDEX_ITER_NONEMPTY_BLOCK) {
-		// We need to look for the next Block again if this Block
-		// is empty.
-		if (record == 0) {
-			if (group->node.uncompressed_base
-					== group->records[0].uncompressed_sum)
-				goto again;
-		} else if (group->records[record - 1].uncompressed_sum
-				== group->records[record].uncompressed_sum) {
-			goto again;
-		}
-	}
-
-	iter->internal[ITER_STREAM].p = stream;
-	iter->internal[ITER_GROUP].p = group;
-	iter->internal[ITER_RECORD].s = record;
-
-	iter_set_info(iter);
-
-	return false;
-}
-
-
-extern LZMA_API(lzma_bool)
-lzma_index_iter_locate(lzma_index_iter *iter, lzma_vli target)
-{
-	const lzma_index *i = iter->internal[ITER_INDEX].p;
-
-	// If the target is past the end of the file, return immediately.
-	if (i->uncompressed_size <= target)
-		return true;
-
-	// Locate the Stream containing the target offset.
-	const index_stream *stream = index_tree_locate(&i->streams, target);
-	assert(stream != NULL);
-	target -= stream->node.uncompressed_base;
-
-	// Locate the group containing the target offset.
-	const index_group *group = index_tree_locate(&stream->groups, target);
-	assert(group != NULL);
-
-	// Use binary search to locate the exact Record. It is the first
-	// Record whose uncompressed_sum is greater than target.
-	// This is because we want the rightmost Record that fullfills the
-	// search criterion. It is possible that there are empty Blocks;
-	// we don't want to return them.
-	size_t left = 0;
-	size_t right = group->last;
-
-	while (left < right) {
-		const size_t pos = left + (right - left) / 2;
-		if (group->records[pos].uncompressed_sum <= target)
-			left = pos + 1;
-		else
-			right = pos;
-	}
-
-	iter->internal[ITER_STREAM].p = stream;
-	iter->internal[ITER_GROUP].p = group;
-	iter->internal[ITER_RECORD].s = left;
-
-	iter_set_info(iter);
-
-	return false;
-}
diff --git a/src/extra/xz/common/index.h b/src/extra/xz/common/index.h
deleted file mode 100644
index 64e9724..0000000
--- a/src/extra/xz/common/index.h
+++ /dev/null
@@ -1,73 +0,0 @@
-///////////////////////////////////////////////////////////////////////////////
-//
-/// \file       index.h
-/// \brief      Handling of Index
-//
-//  Author:     Lasse Collin
-//
-//  This file has been put into the public domain.
-//  You can do whatever you want with this file.
-//
-///////////////////////////////////////////////////////////////////////////////
-
-#ifndef LZMA_INDEX_H
-#define LZMA_INDEX_H
-
-#include "common.h"
-
-
-/// Minimum Unpadded Size
-#define UNPADDED_SIZE_MIN LZMA_VLI_C(5)
-
-/// Maximum Unpadded Size
-#define UNPADDED_SIZE_MAX (LZMA_VLI_MAX & ~LZMA_VLI_C(3))
-
-
-/// Get the size of the Index Padding field. This is needed by Index encoder
-/// and decoder, but applications should have no use for this.
-extern uint32_t lzma_index_padding_size(const lzma_index *i);
-
-
-/// Set for how many Records to allocate memory the next time
-/// lzma_index_append() needs to allocate space for a new Record.
-/// This is used only by the Index decoder.
-extern void lzma_index_prealloc(lzma_index *i, lzma_vli records);
-
-
-/// Round the variable-length integer to the next multiple of four.
-static inline lzma_vli
-vli_ceil4(lzma_vli vli)
-{
-	assert(vli <= LZMA_VLI_MAX);
-	return (vli + 3) & ~LZMA_VLI_C(3);
-}
-
-
-/// Calculate the size of the Index field excluding Index Padding
-static inline lzma_vli
-index_size_unpadded(lzma_vli count, lzma_vli index_list_size)
-{
-	// Index Indicator + Number of Records + List of Records + CRC32
-	return 1 + lzma_vli_size(count) + index_list_size + 4;
-}
-
-
-/// Calculate the size of the Index field including Index Padding
-static inline lzma_vli
-index_size(lzma_vli count, lzma_vli index_list_size)
-{
-	return vli_ceil4(index_size_unpadded(count, index_list_size));
-}
-
-
-/// Calculate the total size of the Stream
-static inline lzma_vli
-index_stream_size(lzma_vli blocks_size,
-		lzma_vli count, lzma_vli index_list_size)
-{
-	return LZMA_STREAM_HEADER_SIZE + blocks_size
-			+ index_size(count, index_list_size)
-			+ LZMA_STREAM_HEADER_SIZE;
-}
-
-#endif
diff --git a/src/extra/xz/common/index_decoder.c b/src/extra/xz/common/index_decoder.c
deleted file mode 100644
index 83c8a3a..0000000
--- a/src/extra/xz/common/index_decoder.c
+++ /dev/null
@@ -1,345 +0,0 @@
-///////////////////////////////////////////////////////////////////////////////
-//
-/// \file       index_decoder.c
-/// \brief      Decodes the Index field
-//
-//  Author:     Lasse Collin
-//
-//  This file has been put into the public domain.
-//  You can do whatever you want with this file.
-//
-///////////////////////////////////////////////////////////////////////////////
-
-#include "index.h"
-#include "check.h"
-
-
-struct lzma_coder_s {
-	enum {
-		SEQ_INDICATOR,
-		SEQ_COUNT,
-		SEQ_MEMUSAGE,
-		SEQ_UNPADDED,
-		SEQ_UNCOMPRESSED,
-		SEQ_PADDING_INIT,
-		SEQ_PADDING,
-		SEQ_CRC32,
-	} sequence;
-
-	/// Memory usage limit
-	uint64_t memlimit;
-
-	/// Target Index
-	lzma_index *index;
-
-	/// Pointer give by the application, which is set after
-	/// successful decoding.
-	lzma_index **index_ptr;
-
-	/// Number of Records left to decode.
-	lzma_vli count;
-
-	/// The most recent Unpadded Size field
-	lzma_vli unpadded_size;
-
-	/// The most recent Uncompressed Size field
-	lzma_vli uncompressed_size;
-
-	/// Position in integers
-	size_t pos;
-
-	/// CRC32 of the List of Records field
-	uint32_t crc32;
-};
-
-
-static lzma_ret
-index_decode(lzma_coder *coder, lzma_allocator *allocator,
-		const uint8_t *restrict in, size_t *restrict in_pos,
-		size_t in_size,
-		uint8_t *restrict out lzma_attribute((__unused__)),
-		size_t *restrict out_pos lzma_attribute((__unused__)),
-		size_t out_size lzma_attribute((__unused__)),
-		lzma_action action lzma_attribute((__unused__)))
-{
-	// Similar optimization as in index_encoder.c
-	const size_t in_start = *in_pos;
-	lzma_ret ret = LZMA_OK;
-
-	while (*in_pos < in_size)
-	switch (coder->sequence) {
-	case SEQ_INDICATOR:
-		// Return LZMA_DATA_ERROR instead of e.g. LZMA_PROG_ERROR or
-		// LZMA_FORMAT_ERROR, because a typical usage case for Index
-		// decoder is when parsing the Stream backwards. If seeking
-		// backward from the Stream Footer gives us something that
-		// doesn't begin with Index Indicator, the file is considered
-		// corrupt, not "programming error" or "unrecognized file
-		// format". One could argue that the application should
-		// verify the Index Indicator before trying to decode the
-		// Index, but well, I suppose it is simpler this way.
-		if (in[(*in_pos)++] != 0x00)
-			return LZMA_DATA_ERROR;
-
-		coder->sequence = SEQ_COUNT;
-		break;
-
-	case SEQ_COUNT:
-		ret = lzma_vli_decode(&coder->count, &coder->pos,
-				in, in_pos, in_size);
-		if (ret != LZMA_STREAM_END)
-			goto out;
-
-		coder->pos = 0;
-		coder->sequence = SEQ_MEMUSAGE;
-
-	// Fall through
-
-	case SEQ_MEMUSAGE:
-		if (lzma_index_memusage(1, coder->count) > coder->memlimit) {
-			ret = LZMA_MEMLIMIT_ERROR;
-			goto out;
-		}
-
-		// Tell the Index handling code how many Records this
-		// Index has to allow it to allocate memory more efficiently.
-		lzma_index_prealloc(coder->index, coder->count);
-
-		ret = LZMA_OK;
-		coder->sequence = coder->count == 0
-				? SEQ_PADDING_INIT : SEQ_UNPADDED;
-		break;
-
-	case SEQ_UNPADDED:
-	case SEQ_UNCOMPRESSED: {
-		lzma_vli *size = coder->sequence == SEQ_UNPADDED
-				? &coder->unpadded_size
-				: &coder->uncompressed_size;
-
-		ret = lzma_vli_decode(size, &coder->pos,
-				in, in_pos, in_size);
-		if (ret != LZMA_STREAM_END)
-			goto out;
-
-		ret = LZMA_OK;
-		coder->pos = 0;
-
-		if (coder->sequence == SEQ_UNPADDED) {
-			// Validate that encoded Unpadded Size isn't too small
-			// or too big.
-			if (coder->unpadded_size < UNPADDED_SIZE_MIN
-					|| coder->unpadded_size
-						> UNPADDED_SIZE_MAX)
-				return LZMA_DATA_ERROR;
-
-			coder->sequence = SEQ_UNCOMPRESSED;
-		} else {
-			// Add the decoded Record to the Index.
-			return_if_error(lzma_index_append(
-					coder->index, allocator,
-					coder->unpadded_size,
-					coder->uncompressed_size));
-
-			// Check if this was the last Record.
-			coder->sequence = --coder->count == 0
-					? SEQ_PADDING_INIT
-					: SEQ_UNPADDED;
-		}
-
-		break;
-	}
-
-	case SEQ_PADDING_INIT:
-		coder->pos = lzma_index_padding_size(coder->index);
-		coder->sequence = SEQ_PADDING;
-
-	// Fall through
-
-	case SEQ_PADDING:
-		if (coder->pos > 0) {
-			--coder->pos;
-			if (in[(*in_pos)++] != 0x00)
-				return LZMA_DATA_ERROR;
-
-			break;
-		}
-
-		// Finish the CRC32 calculation.
-		coder->crc32 = lzma_crc32(in + in_start,
-				*in_pos - in_start, coder->crc32);
-
-		coder->sequence = SEQ_CRC32;
-
-	// Fall through
-
-	case SEQ_CRC32:
-		do {
-			if (*in_pos == in_size)
-				return LZMA_OK;
-
-			if (((coder->crc32 >> (coder->pos * 8)) & 0xFF)
-					!= in[(*in_pos)++])
-				return LZMA_DATA_ERROR;
-
-		} while (++coder->pos < 4);
-
-		// Decoding was successful, now we can let the application
-		// see the decoded Index.
-		*coder->index_ptr = coder->index;
-
-		// Make index NULL so we don't free it unintentionally.
-		coder->index = NULL;
-
-		return LZMA_STREAM_END;
-
-	default:
-		assert(0);
-		return LZMA_PROG_ERROR;
-	}
-
-out:
-	// Update the CRC32,
-	coder->crc32 = lzma_crc32(in + in_start,
-			*in_pos - in_start, coder->crc32);
-
-	return ret;
-}
-
-
-static void
-index_decoder_end(lzma_coder *coder, lzma_allocator *allocator)
-{
-	lzma_index_end(coder->index, allocator);
-	lzma_free(coder, allocator);
-	return;
-}
-
-
-static lzma_ret
-index_decoder_memconfig(lzma_coder *coder, uint64_t *memusage,
-		uint64_t *old_memlimit, uint64_t new_memlimit)
-{
-	*memusage = lzma_index_memusage(1, coder->count);
-	*old_memlimit = coder->memlimit;
-
-	if (new_memlimit != 0) {
-		if (new_memlimit < *memusage)
-			return LZMA_MEMLIMIT_ERROR;
-
-		coder->memlimit = new_memlimit;
-	}
-
-	return LZMA_OK;
-}
-
-
-static lzma_ret
-index_decoder_reset(lzma_coder *coder, lzma_allocator *allocator,
-		lzma_index **i, uint64_t memlimit)
-{
-	// Remember the pointer given by the application. We will set it
-	// to point to the decoded Index only if decoding is successful.
-	// Before that, keep it NULL so that applications can always safely
-	// pass it to lzma_index_end() no matter did decoding succeed or not.
-	coder->index_ptr = i;
-	*i = NULL;
-
-	// We always allocate a new lzma_index.
-	coder->index = lzma_index_init(allocator);
-	if (coder->index == NULL)
-		return LZMA_MEM_ERROR;
-
-	// Initialize the rest.
-	coder->sequence = SEQ_INDICATOR;
-	coder->memlimit = memlimit;
-	coder->count = 0; // Needs to be initialized due to _memconfig().
-	coder->pos = 0;
-	coder->crc32 = 0;
-
-	return LZMA_OK;
-}
-
-
-static lzma_ret
-index_decoder_init(lzma_next_coder *next, lzma_allocator *allocator,
-		lzma_index **i, uint64_t memlimit)
-{
-	lzma_next_coder_init(&index_decoder_init, next, allocator);
-
-	if (i == NULL || memlimit == 0)
-		return LZMA_PROG_ERROR;
-
-	if (next->coder == NULL) {
-		next->coder = lzma_alloc(sizeof(lzma_coder), allocator);
-		if (next->coder == NULL)
-			return LZMA_MEM_ERROR;
-
-		next->code = &index_decode;
-		next->end = &index_decoder_end;
-		next->memconfig = &index_decoder_memconfig;
-		next->coder->index = NULL;
-	} else {
-		lzma_index_end(next->coder->index, allocator);
-	}
-
-	return index_decoder_reset(next->coder, allocator, i, memlimit);
-}
-
-
-extern LZMA_API(lzma_ret)
-lzma_index_decoder(lzma_stream *strm, lzma_index **i, uint64_t memlimit)
-{
-	lzma_next_strm_init(index_decoder_init, strm, i, memlimit);
-
-	strm->internal->supported_actions[LZMA_RUN] = true;
-	strm->internal->supported_actions[LZMA_FINISH] = true;
-
-	return LZMA_OK;
-}
-
-
-extern LZMA_API(lzma_ret)
-lzma_index_buffer_decode(
-		lzma_index **i, uint64_t *memlimit, lzma_allocator *allocator,
-		const uint8_t *in, size_t *in_pos, size_t in_size)
-{
-	// Sanity checks
-	if (i == NULL || memlimit == NULL
-			|| in == NULL || in_pos == NULL || *in_pos > in_size)
-		return LZMA_PROG_ERROR;
-
-	// Initialize the decoder.
-	lzma_coder coder;
-	return_if_error(index_decoder_reset(&coder, allocator, i, *memlimit));
-
-	// Store the input start position so that we can restore it in case
-	// of an error.
-	const size_t in_start = *in_pos;
-
-	// Do the actual decoding.
-	lzma_ret ret = index_decode(&coder, allocator, in, in_pos, in_size,
-			NULL, NULL, 0, LZMA_RUN);
-
-	if (ret == LZMA_STREAM_END) {
-		ret = LZMA_OK;
-	} else {
-		// Something went wrong, free the Index structure and restore
-		// the input position.
-		lzma_index_end(coder.index, allocator);
-		*in_pos = in_start;
-
-		if (ret == LZMA_OK) {
-			// The input is truncated or otherwise corrupt.
-			// Use LZMA_DATA_ERROR instead of LZMA_BUF_ERROR
-			// like lzma_vli_decode() does in single-call mode.
-			ret = LZMA_DATA_ERROR;
-
-		} else if (ret == LZMA_MEMLIMIT_ERROR) {
-			// Tell the caller how much memory would have
-			// been needed.
-			*memlimit = lzma_index_memusage(1, coder.count);
-		}
-	}
-
-	return ret;
-}
diff --git a/src/extra/xz/common/index_encoder.c b/src/extra/xz/common/index_encoder.c
deleted file mode 100644
index 45919f0..0000000
--- a/src/extra/xz/common/index_encoder.c
+++ /dev/null
@@ -1,254 +0,0 @@
-///////////////////////////////////////////////////////////////////////////////
-//
-/// \file       index_encoder.c
-/// \brief      Encodes the Index field
-//
-//  Author:     Lasse Collin
-//
-//  This file has been put into the public domain.
-//  You can do whatever you want with this file.
-//
-///////////////////////////////////////////////////////////////////////////////
-
-#include "index_encoder.h"
-#include "index.h"
-#include "check.h"
-
-
-struct lzma_coder_s {
-	enum {
-		SEQ_INDICATOR,
-		SEQ_COUNT,
-		SEQ_UNPADDED,
-		SEQ_UNCOMPRESSED,
-		SEQ_NEXT,
-		SEQ_PADDING,
-		SEQ_CRC32,
-	} sequence;
-
-	/// Index being encoded
-	const lzma_index *index;
-
-	/// Iterator for the Index being encoded
-	lzma_index_iter iter;
-
-	/// Position in integers
-	size_t pos;
-
-	/// CRC32 of the List of Records field
-	uint32_t crc32;
-};
-
-
-static lzma_ret
-index_encode(lzma_coder *coder,
-		lzma_allocator *allocator lzma_attribute((__unused__)),
-		const uint8_t *restrict in lzma_attribute((__unused__)),
-		size_t *restrict in_pos lzma_attribute((__unused__)),
-		size_t in_size lzma_attribute((__unused__)),
-		uint8_t *restrict out, size_t *restrict out_pos,
-		size_t out_size,
-		lzma_action action lzma_attribute((__unused__)))
-{
-	// Position where to start calculating CRC32. The idea is that we
-	// need to call lzma_crc32() only once per call to index_encode().
-	const size_t out_start = *out_pos;
-
-	// Return value to use if we return at the end of this function.
-	// We use "goto out" to jump out of the while-switch construct
-	// instead of returning directly, because that way we don't need
-	// to copypaste the lzma_crc32() call to many places.
-	lzma_ret ret = LZMA_OK;
-
-	while (*out_pos < out_size)
-	switch (coder->sequence) {
-	case SEQ_INDICATOR:
-		out[*out_pos] = 0x00;
-		++*out_pos;
-		coder->sequence = SEQ_COUNT;
-		break;
-
-	case SEQ_COUNT: {
-		const lzma_vli count = lzma_index_block_count(coder->index);
-		ret = lzma_vli_encode(count, &coder->pos,
-				out, out_pos, out_size);
-		if (ret != LZMA_STREAM_END)
-			goto out;
-
-		ret = LZMA_OK;
-		coder->pos = 0;
-		coder->sequence = SEQ_NEXT;
-		break;
-	}
-
-	case SEQ_NEXT:
-		if (lzma_index_iter_next(
-				&coder->iter, LZMA_INDEX_ITER_BLOCK)) {
-			// Get the size of the Index Padding field.
-			coder->pos = lzma_index_padding_size(coder->index);
-			assert(coder->pos <= 3);
-			coder->sequence = SEQ_PADDING;
-			break;
-		}
-
-		coder->sequence = SEQ_UNPADDED;
-
-	// Fall through
-
-	case SEQ_UNPADDED:
-	case SEQ_UNCOMPRESSED: {
-		const lzma_vli size = coder->sequence == SEQ_UNPADDED
-				? coder->iter.block.unpadded_size
-				: coder->iter.block.uncompressed_size;
-
-		ret = lzma_vli_encode(size, &coder->pos,
-				out, out_pos, out_size);
-		if (ret != LZMA_STREAM_END)
-			goto out;
-
-		ret = LZMA_OK;
-		coder->pos = 0;
-
-		// Advance to SEQ_UNCOMPRESSED or SEQ_NEXT.
-		++coder->sequence;
-		break;
-	}
-
-	case SEQ_PADDING:
-		if (coder->pos > 0) {
-			--coder->pos;
-			out[(*out_pos)++] = 0x00;
-			break;
-		}
-
-		// Finish the CRC32 calculation.
-		coder->crc32 = lzma_crc32(out + out_start,
-				*out_pos - out_start, coder->crc32);
-
-		coder->sequence = SEQ_CRC32;
-
-	// Fall through
-
-	case SEQ_CRC32:
-		// We don't use the main loop, because we don't want
-		// coder->crc32 to be touched anymore.
-		do {
-			if (*out_pos == out_size)
-				return LZMA_OK;
-
-			out[*out_pos] = (coder->crc32 >> (coder->pos * 8))
-					& 0xFF;
-			++*out_pos;
-
-		} while (++coder->pos < 4);
-
-		return LZMA_STREAM_END;
-
-	default:
-		assert(0);
-		return LZMA_PROG_ERROR;
-	}
-
-out:
-	// Update the CRC32.
-	coder->crc32 = lzma_crc32(out + out_start,
-			*out_pos - out_start, coder->crc32);
-
-	return ret;
-}
-
-
-static void
-index_encoder_end(lzma_coder *coder, lzma_allocator *allocator)
-{
-	lzma_free(coder, allocator);
-	return;
-}
-
-
-static void
-index_encoder_reset(lzma_coder *coder, const lzma_index *i)
-{
-	lzma_index_iter_init(&coder->iter, i);
-
-	coder->sequence = SEQ_INDICATOR;
-	coder->index = i;
-	coder->pos = 0;
-	coder->crc32 = 0;
-
-	return;
-}
-
-
-extern lzma_ret
-lzma_index_encoder_init(lzma_next_coder *next, lzma_allocator *allocator,
-		const lzma_index *i)
-{
-	lzma_next_coder_init(&lzma_index_encoder_init, next, allocator);
-
-	if (i == NULL)
-		return LZMA_PROG_ERROR;
-
-	if (next->coder == NULL) {
-		next->coder = lzma_alloc(sizeof(lzma_coder), allocator);
-		if (next->coder == NULL)
-			return LZMA_MEM_ERROR;
-
-		next->code = &index_encode;
-		next->end = &index_encoder_end;
-	}
-
-	index_encoder_reset(next->coder, i);
-
-	return LZMA_OK;
-}
-
-
-extern LZMA_API(lzma_ret)
-lzma_index_encoder(lzma_stream *strm, const lzma_index *i)
-{
-	lzma_next_strm_init(lzma_index_encoder_init, strm, i);
-
-	strm->internal->supported_actions[LZMA_RUN] = true;
-	strm->internal->supported_actions[LZMA_FINISH] = true;
-
-	return LZMA_OK;
-}
-
-
-extern LZMA_API(lzma_ret)
-lzma_index_buffer_encode(const lzma_index *i,
-		uint8_t *out, size_t *out_pos, size_t out_size)
-{
-	// Validate the arguments.
-	if (i == NULL || out == NULL || out_pos == NULL || *out_pos > out_size)
-		return LZMA_PROG_ERROR;
-
-	// Don't try to encode if there's not enough output space.
-	if (out_size - *out_pos < lzma_index_size(i))
-		return LZMA_BUF_ERROR;
-
-	// The Index encoder needs just one small data structure so we can
-	// allocate it on stack.
-	lzma_coder coder;
-	index_encoder_reset(&coder, i);
-
-	// Do the actual encoding. This should never fail, but store
-	// the original *out_pos just in case.
-	const size_t out_start = *out_pos;
-	lzma_ret ret = index_encode(&coder, NULL, NULL, NULL, 0,
-			out, out_pos, out_size, LZMA_RUN);
-
-	if (ret == LZMA_STREAM_END) {
-		ret = LZMA_OK;
-	} else {
-		// We should never get here, but just in case, restore the
-		// output position and set the error accordingly if something
-		// goes wrong and debugging isn't enabled.
-		assert(0);
-		*out_pos = out_start;
-		ret = LZMA_PROG_ERROR;
-	}
-
-	return ret;
-}
diff --git a/src/extra/xz/common/index_encoder.h b/src/extra/xz/common/index_encoder.h
deleted file mode 100644
index a13c94d..0000000
--- a/src/extra/xz/common/index_encoder.h
+++ /dev/null
@@ -1,23 +0,0 @@
-///////////////////////////////////////////////////////////////////////////////
-//
-/// \file       index_encoder.h
-/// \brief      Encodes the Index field
-//
-//  Author:     Lasse Collin
-//
-//  This file has been put into the public domain.
-//  You can do whatever you want with this file.
-//
-///////////////////////////////////////////////////////////////////////////////
-
-#ifndef LZMA_INDEX_ENCODER_H
-#define LZMA_INDEX_ENCODER_H
-
-#include "common.h"
-
-
-extern lzma_ret lzma_index_encoder_init(lzma_next_coder *next,
-		lzma_allocator *allocator, const lzma_index *i);
-
-
-#endif
diff --git a/src/extra/xz/common/index_hash.c b/src/extra/xz/common/index_hash.c
deleted file mode 100644
index e3e9386..0000000
--- a/src/extra/xz/common/index_hash.c
+++ /dev/null
@@ -1,332 +0,0 @@
-///////////////////////////////////////////////////////////////////////////////
-//
-/// \file       index_hash.c
-/// \brief      Validates Index by using a hash function
-//
-//  Author:     Lasse Collin
-//
-//  This file has been put into the public domain.
-//  You can do whatever you want with this file.
-//
-///////////////////////////////////////////////////////////////////////////////
-
-#include "common.h"
-#include "index.h"
-#include "check.h"
-
-
-typedef struct {
-	/// Sum of the Block sizes (including Block Padding)
-	lzma_vli blocks_size;
-
-	/// Sum of the Uncompressed Size fields
-	lzma_vli uncompressed_size;
-
-	/// Number of Records
-	lzma_vli count;
-
-	/// Size of the List of Index Records as bytes
-	lzma_vli index_list_size;
-
-	/// Check calculated from Unpadded Sizes and Uncompressed Sizes.
-	lzma_check_state check;
-
-} lzma_index_hash_info;
-
-
-struct lzma_index_hash_s {
-	enum {
-		SEQ_BLOCK,
-		SEQ_COUNT,
-		SEQ_UNPADDED,
-		SEQ_UNCOMPRESSED,
-		SEQ_PADDING_INIT,
-		SEQ_PADDING,
-		SEQ_CRC32,
-	} sequence;
-
-	/// Information collected while decoding the actual Blocks.
-	lzma_index_hash_info blocks;
-
-	/// Information collected from the Index field.
-	lzma_index_hash_info records;
-
-	/// Number of Records not fully decoded
-	lzma_vli remaining;
-
-	/// Unpadded Size currently being read from an Index Record.
-	lzma_vli unpadded_size;
-
-	/// Uncompressed Size currently being read from an Index Record.
-	lzma_vli uncompressed_size;
-
-	/// Position in variable-length integers when decoding them from
-	/// the List of Records.
-	size_t pos;
-
-	/// CRC32 of the Index
-	uint32_t crc32;
-};
-
-
-extern LZMA_API(lzma_index_hash *)
-lzma_index_hash_init(lzma_index_hash *index_hash, lzma_allocator *allocator)
-{
-	if (index_hash == NULL) {
-		index_hash = lzma_alloc(sizeof(lzma_index_hash), allocator);
-		if (index_hash == NULL)
-			return NULL;
-	}
-
-	index_hash->sequence = SEQ_BLOCK;
-	index_hash->blocks.blocks_size = 0;
-	index_hash->blocks.uncompressed_size = 0;
-	index_hash->blocks.count = 0;
-	index_hash->blocks.index_list_size = 0;
-	index_hash->records.blocks_size = 0;
-	index_hash->records.uncompressed_size = 0;
-	index_hash->records.count = 0;
-	index_hash->records.index_list_size = 0;
-	index_hash->unpadded_size = 0;
-	index_hash->uncompressed_size = 0;
-	index_hash->pos = 0;
-	index_hash->crc32 = 0;
-
-	// These cannot fail because LZMA_CHECK_BEST is known to be supported.
-	(void)lzma_check_init(&index_hash->blocks.check, LZMA_CHECK_BEST);
-	(void)lzma_check_init(&index_hash->records.check, LZMA_CHECK_BEST);
-
-	return index_hash;
-}
-
-
-extern LZMA_API(void)
-lzma_index_hash_end(lzma_index_hash *index_hash, lzma_allocator *allocator)
-{
-	lzma_free(index_hash, allocator);
-	return;
-}
-
-
-extern LZMA_API(lzma_vli)
-lzma_index_hash_size(const lzma_index_hash *index_hash)
-{
-	// Get the size of the Index from ->blocks instead of ->records for
-	// cases where application wants to know the Index Size before
-	// decoding the Index.
-	return index_size(index_hash->blocks.count,
-			index_hash->blocks.index_list_size);
-}
-
-
-/// Updates the sizes and the hash without any validation.
-static lzma_ret
-hash_append(lzma_index_hash_info *info, lzma_vli unpadded_size,
-		lzma_vli uncompressed_size)
-{
-	info->blocks_size += vli_ceil4(unpadded_size);
-	info->uncompressed_size += uncompressed_size;
-	info->index_list_size += lzma_vli_size(unpadded_size)
-			+ lzma_vli_size(uncompressed_size);
-	++info->count;
-
-	const lzma_vli sizes[2] = { unpadded_size, uncompressed_size };
-	lzma_check_update(&info->check, LZMA_CHECK_BEST,
-			(const uint8_t *)(sizes), sizeof(sizes));
-
-	return LZMA_OK;
-}
-
-
-extern LZMA_API(lzma_ret)
-lzma_index_hash_append(lzma_index_hash *index_hash, lzma_vli unpadded_size,
-		lzma_vli uncompressed_size)
-{
-	// Validate the arguments.
-	if (index_hash->sequence != SEQ_BLOCK
-			|| unpadded_size < UNPADDED_SIZE_MIN
-			|| unpadded_size > UNPADDED_SIZE_MAX
-			|| uncompressed_size > LZMA_VLI_MAX)
-		return LZMA_PROG_ERROR;
-
-	// Update the hash.
-	return_if_error(hash_append(&index_hash->blocks,
-			unpadded_size, uncompressed_size));
-
-	// Validate the properties of *info are still in allowed limits.
-	if (index_hash->blocks.blocks_size > LZMA_VLI_MAX
-			|| index_hash->blocks.uncompressed_size > LZMA_VLI_MAX
-			|| index_size(index_hash->blocks.count,
-					index_hash->blocks.index_list_size)
-				> LZMA_BACKWARD_SIZE_MAX
-			|| index_stream_size(index_hash->blocks.blocks_size,
-					index_hash->blocks.count,
-					index_hash->blocks.index_list_size)
-				> LZMA_VLI_MAX)
-		return LZMA_DATA_ERROR;
-
-	return LZMA_OK;
-}
-
-
-extern LZMA_API(lzma_ret)
-lzma_index_hash_decode(lzma_index_hash *index_hash, const uint8_t *in,
-		size_t *in_pos, size_t in_size)
-{
-	// Catch zero input buffer here, because in contrast to Index encoder
-	// and decoder functions, applications call this function directly
-	// instead of via lzma_code(), which does the buffer checking.
-	if (*in_pos >= in_size)
-		return LZMA_BUF_ERROR;
-
-	// NOTE: This function has many similarities to index_encode() and
-	// index_decode() functions found from index_encoder.c and
-	// index_decoder.c. See the comments especially in index_encoder.c.
-	const size_t in_start = *in_pos;
-	lzma_ret ret = LZMA_OK;
-
-	while (*in_pos < in_size)
-	switch (index_hash->sequence) {
-	case SEQ_BLOCK:
-		// Check the Index Indicator is present.
-		if (in[(*in_pos)++] != 0x00)
-			return LZMA_DATA_ERROR;
-
-		index_hash->sequence = SEQ_COUNT;
-		break;
-
-	case SEQ_COUNT: {
-		ret = lzma_vli_decode(&index_hash->remaining,
-				&index_hash->pos, in, in_pos, in_size);
-		if (ret != LZMA_STREAM_END)
-			goto out;
-
-		// The count must match the count of the Blocks decoded.
-		if (index_hash->remaining != index_hash->blocks.count)
-			return LZMA_DATA_ERROR;
-
-		ret = LZMA_OK;
-		index_hash->pos = 0;
-
-		// Handle the special case when there are no Blocks.
-		index_hash->sequence = index_hash->remaining == 0
-				? SEQ_PADDING_INIT : SEQ_UNPADDED;
-		break;
-	}
-
-	case SEQ_UNPADDED:
-	case SEQ_UNCOMPRESSED: {
-		lzma_vli *size = index_hash->sequence == SEQ_UNPADDED
-				? &index_hash->unpadded_size
-				: &index_hash->uncompressed_size;
-
-		ret = lzma_vli_decode(size, &index_hash->pos,
-				in, in_pos, in_size);
-		if (ret != LZMA_STREAM_END)
-			goto out;
-
-		ret = LZMA_OK;
-		index_hash->pos = 0;
-
-		if (index_hash->sequence == SEQ_UNPADDED) {
-			if (index_hash->unpadded_size < UNPADDED_SIZE_MIN
-					|| index_hash->unpadded_size
-						> UNPADDED_SIZE_MAX)
-				return LZMA_DATA_ERROR;
-
-			index_hash->sequence = SEQ_UNCOMPRESSED;
-		} else {
-			// Update the hash.
-			return_if_error(hash_append(&index_hash->records,
-					index_hash->unpadded_size,
-					index_hash->uncompressed_size));
-
-			// Verify that we don't go over the known sizes. Note
-			// that this validation is simpler than the one used
-			// in lzma_index_hash_append(), because here we know
-			// that values in index_hash->blocks are already
-			// validated and we are fine as long as we don't
-			// exceed them in index_hash->records.
-			if (index_hash->blocks.blocks_size
-					< index_hash->records.blocks_size
-					|| index_hash->blocks.uncompressed_size
-					< index_hash->records.uncompressed_size
-					|| index_hash->blocks.index_list_size
-					< index_hash->records.index_list_size)
-				return LZMA_DATA_ERROR;
-
-			// Check if this was the last Record.
-			index_hash->sequence = --index_hash->remaining == 0
-					? SEQ_PADDING_INIT : SEQ_UNPADDED;
-		}
-
-		break;
-	}
-
-	case SEQ_PADDING_INIT:
-		index_hash->pos = (LZMA_VLI_C(4) - index_size_unpadded(
-				index_hash->records.count,
-				index_hash->records.index_list_size)) & 3;
-		index_hash->sequence = SEQ_PADDING;
-
-	// Fall through
-
-	case SEQ_PADDING:
-		if (index_hash->pos > 0) {
-			--index_hash->pos;
-			if (in[(*in_pos)++] != 0x00)
-				return LZMA_DATA_ERROR;
-
-			break;
-		}
-
-		// Compare the sizes.
-		if (index_hash->blocks.blocks_size
-				!= index_hash->records.blocks_size
-				|| index_hash->blocks.uncompressed_size
-				!= index_hash->records.uncompressed_size
-				|| index_hash->blocks.index_list_size
-				!= index_hash->records.index_list_size)
-			return LZMA_DATA_ERROR;
-
-		// Finish the hashes and compare them.
-		lzma_check_finish(&index_hash->blocks.check, LZMA_CHECK_BEST);
-		lzma_check_finish(&index_hash->records.check, LZMA_CHECK_BEST);
-		if (memcmp(index_hash->blocks.check.buffer.u8,
-				index_hash->records.check.buffer.u8,
-				lzma_check_size(LZMA_CHECK_BEST)) != 0)
-			return LZMA_DATA_ERROR;
-
-		// Finish the CRC32 calculation.
-		index_hash->crc32 = lzma_crc32(in + in_start,
-				*in_pos - in_start, index_hash->crc32);
-
-		index_hash->sequence = SEQ_CRC32;
-
-	// Fall through
-
-	case SEQ_CRC32:
-		do {
-			if (*in_pos == in_size)
-				return LZMA_OK;
-
-			if (((index_hash->crc32 >> (index_hash->pos * 8))
-					& 0xFF) != in[(*in_pos)++])
-				return LZMA_DATA_ERROR;
-
-		} while (++index_hash->pos < 4);
-
-		return LZMA_STREAM_END;
-
-	default:
-		assert(0);
-		return LZMA_PROG_ERROR;
-	}
-
-out:
-	// Update the CRC32,
-	index_hash->crc32 = lzma_crc32(in + in_start,
-			*in_pos - in_start, index_hash->crc32);
-
-	return ret;
-}
diff --git a/src/extra/xz/common/local.h b/src/extra/xz/common/local.h
deleted file mode 100644
index d811a5f..0000000
--- a/src/extra/xz/common/local.h
+++ /dev/null
@@ -1,123 +0,0 @@
-/* Define to 1 if crc32 integrity check is enabled. */
-#define HAVE_CHECK_CRC32 1
-
-/* Define to 1 if crc64 integrity check is enabled. */
-#define HAVE_CHECK_CRC64 1
-
-/* Define to 1 if sha256 integrity check is enabled. */
-#define HAVE_CHECK_SHA256 1
-
-/* Define to 1 if decoder components are enabled. */
-#define HAVE_DECODER 1
-
-/* Define to 1 if arm decoder is enabled. */
-#define HAVE_DECODER_ARM 1
-
-/* Define to 1 if armthumb decoder is enabled. */
-#define HAVE_DECODER_ARMTHUMB 1
-
-/* Define to 1 if delta decoder is enabled. */
-#define HAVE_DECODER_DELTA 1
-
-/* Define to 1 if ia64 decoder is enabled. */
-#define HAVE_DECODER_IA64 1
-
-/* Define to 1 if lzma1 decoder is enabled. */
-#define HAVE_DECODER_LZMA1 1
-
-/* Define to 1 if lzma2 decoder is enabled. */
-#define HAVE_DECODER_LZMA2 1
-
-/* Define to 1 if powerpc decoder is enabled. */
-#define HAVE_DECODER_POWERPC 1
-
-/* Define to 1 if sparc decoder is enabled. */
-#define HAVE_DECODER_SPARC 1
-
-/* Define to 1 if subblock decoder is enabled. */
-#define HAVE_DECODER_SUBBLOCK 1
-
-/* Define to 1 if x86 decoder is enabled. */
-#define HAVE_DECODER_X86 1
-
-/* Define to 1 if you have the <dlfcn.h> header file. */
-#define HAVE_DLFCN_H 1
-
-/* Define to 1 if encoder components are enabled. */
-#define HAVE_ENCODER 1
-
-/* Define to 1 if arm encoder is enabled. */
-#define HAVE_ENCODER_ARM 1
-
-/* Define to 1 if armthumb encoder is enabled. */
-#define HAVE_ENCODER_ARMTHUMB 1
-
-/* Define to 1 if delta encoder is enabled. */
-#define HAVE_ENCODER_DELTA 1
-
-/* Define to 1 if ia64 encoder is enabled. */
-#define HAVE_ENCODER_IA64 1
-
-/* Define to 1 if lzma1 encoder is enabled. */
-#define HAVE_ENCODER_LZMA1 1
-
-/* Define to 1 if lzma2 encoder is enabled. */
-#define HAVE_ENCODER_LZMA2 1
-
-/* Define to 1 if powerpc encoder is enabled. */
-#define HAVE_ENCODER_POWERPC 1
-
-/* Define to 1 if sparc encoder is enabled. */
-#define HAVE_ENCODER_SPARC 1
-
-/* Define to 1 if subblock encoder is enabled. */
-/* #undef HAVE_ENCODER_SUBBLOCK */
-
-/* Define to 1 if x86 encoder is enabled. */
-#define HAVE_ENCODER_X86 1
-
-/* Define to 1 to enable bt2 match finder. */
-#define HAVE_MF_BT2 1
-
-/* Define to 1 to enable bt3 match finder. */
-#define HAVE_MF_BT3 1
-
-/* Define to 1 to enable bt4 match finder. */
-#define HAVE_MF_BT4 1
-
-/* Define to 1 to enable hc3 match finder. */
-#define HAVE_MF_HC3 1
-
-/* Define to 1 to enable hc4 match finder. */
-#define HAVE_MF_HC4 1
-
-/* Things that might be defined on a per-platform basis: */
-
-/* Define to 1 if using x86 assembler optimizations. */
-/* #define HAVE_ASM_X86 1 */
-
-/* Define to 1 if using x86_64 assembler optimizations. */
-/* #undef HAVE_ASM_X86_64 */
-
-/* Define to 1 if bswap_16 is available. */
-/* #undef HAVE_BSWAP_16 */
-
-/* Define to 1 if bswap_32 is available. */
-/* #undef HAVE_BSWAP_32 */
-
-/* Define to 1 if bswap_64 is available. */
-/* #undef HAVE_BSWAP_64 */
-
-/* Define to 1 if you have the <byteswap.h> header file. */
-/* #undef HAVE_BYTESWAP_H */
-
-/* Define to 1 if the system supports fast unaligned memory access. */
-/* #define HAVE_FAST_UNALIGNED_ACCESS 1 */
-
-/* Define to 1 if the system has the type `_Bool'. */
-/* #define HAVE__BOOL 1 */
-
-#ifdef WIN32
-#define HAVE_ASM_X86 1
-#define HAVE_FAST_UNALIGNED_ACCESS 1
-#endif
diff --git a/src/extra/xz/common/mythread.h b/src/extra/xz/common/mythread.h
deleted file mode 100644
index 476c2fc..0000000
--- a/src/extra/xz/common/mythread.h
+++ /dev/null
@@ -1,42 +0,0 @@
-///////////////////////////////////////////////////////////////////////////////
-//
-/// \file       mythread.h
-/// \brief      Wrappers for threads
-//
-//  Author:     Lasse Collin
-//
-//  This file has been put into the public domain.
-//  You can do whatever you want with this file.
-//
-///////////////////////////////////////////////////////////////////////////////
-
-#include "sysdefs.h"
-
-
-#ifdef HAVE_PTHREAD
-#	include <pthread.h>
-
-#	define mythread_once(func) \
-	do { \
-		static pthread_once_t once_ = PTHREAD_ONCE_INIT; \
-		pthread_once(&once_, &func); \
-	} while (0)
-
-#	define mythread_sigmask(how, set, oset) \
-		pthread_sigmask(how, set, oset)
-
-#else
-
-#	define mythread_once(func) \
-	do { \
-		static bool once_ = false; \
-		if (!once_) { \
-			func(); \
-			once_ = true; \
-		} \
-	} while (0)
-
-#	define mythread_sigmask(how, set, oset) \
-		sigprocmask(how, set, oset)
-
-#endif
diff --git a/src/extra/xz/common/stream_buffer_decoder.c b/src/extra/xz/common/stream_buffer_decoder.c
deleted file mode 100644
index ae75315..0000000
--- a/src/extra/xz/common/stream_buffer_decoder.c
+++ /dev/null
@@ -1,91 +0,0 @@
-///////////////////////////////////////////////////////////////////////////////
-//
-/// \file       stream_buffer_decoder.c
-/// \brief      Single-call .xz Stream decoder
-//
-//  Author:     Lasse Collin
-//
-//  This file has been put into the public domain.
-//  You can do whatever you want with this file.
-//
-///////////////////////////////////////////////////////////////////////////////
-
-#include "stream_decoder.h"
-
-
-extern LZMA_API(lzma_ret)
-lzma_stream_buffer_decode(uint64_t *memlimit, uint32_t flags,
-		lzma_allocator *allocator,
-		const uint8_t *in, size_t *in_pos, size_t in_size,
-		uint8_t *out, size_t *out_pos, size_t out_size)
-{
-	// Sanity checks
-	if (in_pos == NULL || (in == NULL && *in_pos != in_size)
-			|| *in_pos > in_size || out_pos == NULL
-			|| (out == NULL && *out_pos != out_size)
-			|| *out_pos > out_size)
-		return LZMA_PROG_ERROR;
-
-	// Catch flags that are not allowed in buffer-to-buffer decoding.
-	if (flags & LZMA_TELL_ANY_CHECK)
-		return LZMA_PROG_ERROR;
-
-	// Initialize the Stream decoder.
-	// TODO: We need something to tell the decoder that it can use the
-	// output buffer as workspace, and thus save significant amount of RAM.
-	lzma_next_coder stream_decoder = LZMA_NEXT_CODER_INIT;
-	lzma_ret ret = lzma_stream_decoder_init(
-			&stream_decoder, allocator, *memlimit, flags);
-
-	if (ret == LZMA_OK) {
-		// Save the positions so that we can restore them in case
-		// an error occurs.
-		const size_t in_start = *in_pos;
-		const size_t out_start = *out_pos;
-
-		// Do the actual decoding.
-		ret = stream_decoder.code(stream_decoder.coder, allocator,
-				in, in_pos, in_size, out, out_pos, out_size,
-				LZMA_FINISH);
-
-		if (ret == LZMA_STREAM_END) {
-			ret = LZMA_OK;
-		} else {
-			// Something went wrong, restore the positions.
-			*in_pos = in_start;
-			*out_pos = out_start;
-
-			if (ret == LZMA_OK) {
-				// Either the input was truncated or the
-				// output buffer was too small.
-				assert(*in_pos == in_size
-						|| *out_pos == out_size);
-
-				// If all the input was consumed, then the
-				// input is truncated, even if the output
-				// buffer is also full. This is because
-				// processing the last byte of the Stream
-				// never produces output.
-				if (*in_pos == in_size)
-					ret = LZMA_DATA_ERROR;
-				else
-					ret = LZMA_BUF_ERROR;
-
-			} else if (ret == LZMA_MEMLIMIT_ERROR) {
-				// Let the caller know how much memory would
-				// have been needed.
-				uint64_t memusage;
-				(void)stream_decoder.memconfig(
-						stream_decoder.coder,
-						memlimit, &memusage, 0);
-			}
-		}
-	}
-
-	// Free the decoder memory. This needs to be done even if
-	// initialization fails, because the internal API doesn't
-	// require the initialization function to free its memory on error.
-	lzma_next_end(&stream_decoder, allocator);
-
-	return ret;
-}
diff --git a/src/extra/xz/common/stream_buffer_encoder.c b/src/extra/xz/common/stream_buffer_encoder.c
deleted file mode 100644
index 2450ee2..0000000
--- a/src/extra/xz/common/stream_buffer_encoder.c
+++ /dev/null
@@ -1,140 +0,0 @@
-///////////////////////////////////////////////////////////////////////////////
-//
-/// \file       stream_buffer_encoder.c
-/// \brief      Single-call .xz Stream encoder
-//
-//  Author:     Lasse Collin
-//
-//  This file has been put into the public domain.
-//  You can do whatever you want with this file.
-//
-///////////////////////////////////////////////////////////////////////////////
-
-#include "index.h"
-
-
-/// Maximum size of Index that has exactly one Record.
-/// Index Indicator + Number of Records + Record + CRC32 rounded up to
-/// the next multiple of four.
-#define INDEX_BOUND ((1 + 1 + 2 * LZMA_VLI_BYTES_MAX + 4 + 3) & ~3)
-
-/// Stream Header, Stream Footer, and Index
-#define HEADERS_BOUND (2 * LZMA_STREAM_HEADER_SIZE + INDEX_BOUND)
-
-
-extern LZMA_API(size_t)
-lzma_stream_buffer_bound(size_t uncompressed_size)
-{
-	// Get the maximum possible size of a Block.
-	const size_t block_bound = lzma_block_buffer_bound(uncompressed_size);
-	if (block_bound == 0)
-		return 0;
-
-	// Catch the possible integer overflow and also prevent the size of
-	// the Stream exceeding LZMA_VLI_MAX (theoretically possible on
-	// 64-bit systems).
-	if (my_min(SIZE_MAX, LZMA_VLI_MAX) - block_bound < HEADERS_BOUND)
-		return 0;
-
-	return block_bound + HEADERS_BOUND;
-}
-
-
-extern LZMA_API(lzma_ret)
-lzma_stream_buffer_encode(lzma_filter *filters, lzma_check check,
-		lzma_allocator *allocator, const uint8_t *in, size_t in_size,
-		uint8_t *out, size_t *out_pos_ptr, size_t out_size)
-{
-	// Sanity checks
-	if (filters == NULL || (unsigned int)(check) > LZMA_CHECK_ID_MAX
-			|| (in == NULL && in_size != 0) || out == NULL
-			|| out_pos_ptr == NULL || *out_pos_ptr > out_size)
-		return LZMA_PROG_ERROR;
-
-	if (!lzma_check_is_supported(check))
-		return LZMA_UNSUPPORTED_CHECK;
-
-	// Note for the paranoids: Index encoder prevents the Stream from
-	// getting too big and still being accepted with LZMA_OK, and Block
-	// encoder catches if the input is too big. So we don't need to
-	// separately check if the buffers are too big.
-
-	// Use a local copy. We update *out_pos_ptr only if everything
-	// succeeds.
-	size_t out_pos = *out_pos_ptr;
-
-	// Check that there's enough space for both Stream Header and
-	// Stream Footer.
-	if (out_size - out_pos <= 2 * LZMA_STREAM_HEADER_SIZE)
-		return LZMA_BUF_ERROR;
-
-	// Reserve space for Stream Footer so we don't need to check for
-	// available space again before encoding Stream Footer.
-	out_size -= LZMA_STREAM_HEADER_SIZE;
-
-	// Encode the Stream Header.
-	lzma_stream_flags stream_flags = {
-		.version = 0,
-		.check = check,
-	};
-
-	if (lzma_stream_header_encode(&stream_flags, out + out_pos)
-			!= LZMA_OK)
-		return LZMA_PROG_ERROR;
-
-	out_pos += LZMA_STREAM_HEADER_SIZE;
-
-	// Encode a Block but only if there is at least one byte of input.
-	lzma_block block = {
-		.version = 0,
-		.check = check,
-		.filters = filters,
-	};
-
-	if (in_size > 0)
-		return_if_error(lzma_block_buffer_encode(&block, allocator,
-				in, in_size, out, &out_pos, out_size));
-
-	// Index
-	{
-		// Create an Index. It will have one Record if there was
-		// at least one byte of input to encode. Otherwise the
-		// Index will be empty.
-		lzma_index *i = lzma_index_init(allocator);
-		if (i == NULL)
-			return LZMA_MEM_ERROR;
-
-		lzma_ret ret = LZMA_OK;
-
-		if (in_size > 0)
-			ret = lzma_index_append(i, allocator,
-					lzma_block_unpadded_size(&block),
-					block.uncompressed_size);
-
-		// If adding the Record was successful, encode the Index
-		// and get its size which will be stored into Stream Footer.
-		if (ret == LZMA_OK) {
-			ret = lzma_index_buffer_encode(
-					i, out, &out_pos, out_size);
-
-			stream_flags.backward_size = lzma_index_size(i);
-		}
-
-		lzma_index_end(i, allocator);
-
-		if (ret != LZMA_OK)
-			return ret;
-	}
-
-	// Stream Footer. We have already reserved space for this.
-	if (lzma_stream_footer_encode(&stream_flags, out + out_pos)
-			!= LZMA_OK)
-		return LZMA_PROG_ERROR;
-
-	out_pos += LZMA_STREAM_HEADER_SIZE;
-
-	// Everything went fine, make the new output position available
-	// to the application.
-	*out_pos_ptr = out_pos;
-	return LZMA_OK;
-}
diff --git a/src/extra/xz/common/stream_decoder.c b/src/extra/xz/common/stream_decoder.c
deleted file mode 100644
index 37ea71e..0000000
--- a/src/extra/xz/common/stream_decoder.c
+++ /dev/null
@@ -1,451 +0,0 @@
-///////////////////////////////////////////////////////////////////////////////
-//
-/// \file       stream_decoder.c
-/// \brief      Decodes .xz Streams
-//
-//  Author:     Lasse Collin
-//
-//  This file has been put into the public domain.
-//  You can do whatever you want with this file.
-//
-///////////////////////////////////////////////////////////////////////////////
-
-#include "stream_decoder.h"
-#include "block_decoder.h"
-
-
-struct lzma_coder_s {
-	enum {
-		SEQ_STREAM_HEADER,
-		SEQ_BLOCK_HEADER,
-		SEQ_BLOCK,
-		SEQ_INDEX,
-		SEQ_STREAM_FOOTER,
-		SEQ_STREAM_PADDING,
-	} sequence;
-
-	/// Block or Metadata decoder. This takes little memory and the same
-	/// data structure can be used to decode every Block Header, so it's
-	/// a good idea to have a separate lzma_next_coder structure for it.
-	lzma_next_coder block_decoder;
-
-	/// Block options decoded by the Block Header decoder and used by
-	/// the Block decoder.
-	lzma_block block_options;
-
-	/// Stream Flags from Stream Header
-	lzma_stream_flags stream_flags;
-
-	/// Index is hashed so that it can be compared to the sizes of Blocks
-	/// with O(1) memory usage.
-	lzma_index_hash *index_hash;
-
-	/// Memory usage limit
-	uint64_t memlimit;
-
-	/// Amount of memory actually needed (only an estimate)
-	uint64_t memusage;
-
-	/// If true, LZMA_NO_CHECK is returned if the Stream has
-	/// no integrity check.
-	bool tell_no_check;
-
-	/// If true, LZMA_UNSUPPORTED_CHECK is returned if the Stream has
-	/// an integrity check that isn't supported by this liblzma build.
-	bool tell_unsupported_check;
-
-	/// If true, LZMA_GET_CHECK is returned after decoding Stream Header.
-	bool tell_any_check;
-
-	/// If true, we will decode concatenated Streams that possibly have
-	/// Stream Padding between or after them. LZMA_STREAM_END is returned
-	/// once the application isn't giving us any new input, and we aren't
-	/// in the middle of a Stream, and possible Stream Padding is a
-	/// multiple of four bytes.
-	bool concatenated;
-
-	/// When decoding concatenated Streams, this is true as long as we
-	/// are decoding the first Stream. This is needed to avoid misleading
-	/// LZMA_FORMAT_ERROR in case the later Streams don't have valid magic
-	/// bytes.
-	bool first_stream;
-
-	/// Write position in buffer[] and position in Stream Padding
-	size_t pos;
-
-	/// Buffer to hold Stream Header, Block Header, and Stream Footer.
-	/// Block Header has biggest maximum size.
-	uint8_t buffer[LZMA_BLOCK_HEADER_SIZE_MAX];
-};
-
-
-static lzma_ret
-stream_decoder_reset(lzma_coder *coder, lzma_allocator *allocator)
-{
-	// Initialize the Index hash used to verify the Index.
-	coder->index_hash = lzma_index_hash_init(coder->index_hash, allocator);
-	if (coder->index_hash == NULL)
-		return LZMA_MEM_ERROR;
-
-	// Reset the rest of the variables.
-	coder->sequence = SEQ_STREAM_HEADER;
-	coder->pos = 0;
-
-	return LZMA_OK;
-}
-
-
-static lzma_ret
-stream_decode(lzma_coder *coder, lzma_allocator *allocator,
-		const uint8_t *restrict in, size_t *restrict in_pos,
-		size_t in_size, uint8_t *restrict out,
-		size_t *restrict out_pos, size_t out_size, lzma_action action)
-{
-	// When decoding the actual Block, it may be able to produce more
-	// output even if we don't give it any new input.
-	while (true)
-	switch (coder->sequence) {
-	case SEQ_STREAM_HEADER: {
-		// Copy the Stream Header to the internal buffer.
-		lzma_bufcpy(in, in_pos, in_size, coder->buffer, &coder->pos,
-				LZMA_STREAM_HEADER_SIZE);
-
-		// Return if we didn't get the whole Stream Header yet.
-		if (coder->pos < LZMA_STREAM_HEADER_SIZE)
-			return LZMA_OK;
-
-		coder->pos = 0;
-
-		// Decode the Stream Header.
-		const lzma_ret ret = lzma_stream_header_decode(
-				&coder->stream_flags, coder->buffer);
-		if (ret != LZMA_OK)
-			return ret == LZMA_FORMAT_ERROR && !coder->first_stream
-					? LZMA_DATA_ERROR : ret;
-
-		// If we are decoding concatenated Streams, and the later
-		// Streams have invalid Header Magic Bytes, we give
-		// LZMA_DATA_ERROR instead of LZMA_FORMAT_ERROR.
-		coder->first_stream = false;
-
-		// Copy the type of the Check so that Block Header and Block
-		// decoders see it.
-		coder->block_options.check = coder->stream_flags.check;
-
-		// Even if we return LZMA_*_CHECK below, we want
-		// to continue from Block Header decoding.
-		coder->sequence = SEQ_BLOCK_HEADER;
-
-		// Detect if there's no integrity check or if it is
-		// unsupported if those were requested by the application.
-		if (coder->tell_no_check && coder->stream_flags.check
-				== LZMA_CHECK_NONE)
-			return LZMA_NO_CHECK;
-
-		if (coder->tell_unsupported_check
-				&& !lzma_check_is_supported(
-					coder->stream_flags.check))
-			return LZMA_UNSUPPORTED_CHECK;
-
-		if (coder->tell_any_check)
-			return LZMA_GET_CHECK;
-	}
-
-	// Fall through
-
-	case SEQ_BLOCK_HEADER: {
-		if (*in_pos >= in_size)
-			return LZMA_OK;
-
-		if (coder->pos == 0) {
-			// Detect if it's Index.
-			if (in[*in_pos] == 0x00) {
-				coder->sequence = SEQ_INDEX;
-				break;
-			}
-
-			// Calculate the size of the Block Header. Note that
-			// Block Header decoder wants to see this byte too
-			// so don't advance *in_pos.
-			coder->block_options.header_size
-					= lzma_block_header_size_decode(
-						in[*in_pos]);
-		}
-
-		// Copy the Block Header to the internal buffer.
-		lzma_bufcpy(in, in_pos, in_size, coder->buffer, &coder->pos,
-				coder->block_options.header_size);
-
-		// Return if we didn't get the whole Block Header yet.
-		if (coder->pos < coder->block_options.header_size)
-			return LZMA_OK;
-
-		coder->pos = 0;
-
-		// Version 0 is currently the only possible version.
-		coder->block_options.version = 0;
-
-		// Set up a buffer to hold the filter chain. Block Header
-		// decoder will initialize all members of this array so
-		// we don't need to do it here.
-		lzma_filter filters[LZMA_FILTERS_MAX + 1];
-		coder->block_options.filters = filters;
-
-		// Decode the Block Header.
-		return_if_error(lzma_block_header_decode(&coder->block_options,
-				allocator, coder->buffer));
-
-		// Check the memory usage limit.
-		const uint64_t memusage = lzma_raw_decoder_memusage(filters);
-		lzma_ret ret;
-
-		if (memusage == UINT64_MAX) {
-			// One or more unknown Filter IDs.
-			ret = LZMA_OPTIONS_ERROR;
-		} else {
-			// Now we can set coder->memusage since we know that
-			// the filter chain is valid. We don't want
-			// lzma_memusage() to return UINT64_MAX in case of
-			// invalid filter chain.
-			coder->memusage = memusage;
-
-			if (memusage > coder->memlimit) {
-				// The chain would need too much memory.
-				ret = LZMA_MEMLIMIT_ERROR;
-			} else {
-				// Memory usage is OK.
-				// Initialize the Block decoder.
-				ret = lzma_block_decoder_init(
-						&coder->block_decoder,
-						allocator,
-						&coder->block_options);
-			}
-		}
-
-		// Free the allocated filter options since they are needed
-		// only to initialize the Block decoder.
-		for (size_t i = 0; i < LZMA_FILTERS_MAX; ++i)
-			lzma_free(filters[i].options, allocator);
-
-		coder->block_options.filters = NULL;
-
-		// Check if memory usage calculation and Block enocoder
-		// initialization succeeded.
-		if (ret != LZMA_OK)
-			return ret;
-
-		coder->sequence = SEQ_BLOCK;
-	}
-
-	// Fall through
-
-	case SEQ_BLOCK: {
-		const lzma_ret ret = coder->block_decoder.code(
-				coder->block_decoder.coder, allocator,
-				in, in_pos, in_size, out, out_pos, out_size,
-				action);
-
-		if (ret != LZMA_STREAM_END)
-			return ret;
-
-		// Block decoded successfully. Add the new size pair to
-		// the Index hash.
-		return_if_error(lzma_index_hash_append(coder->index_hash,
-				lzma_block_unpadded_size(
-					&coder->block_options),
-				coder->block_options.uncompressed_size));
-
-		coder->sequence = SEQ_BLOCK_HEADER;
-		break;
-	}
-
-	case SEQ_INDEX: {
-		// If we don't have any input, don't call
-		// lzma_index_hash_decode() since it would return
-		// LZMA_BUF_ERROR, which we must not do here.
-		if (*in_pos >= in_size)
-			return LZMA_OK;
-
-		// Decode the Index and compare it to the hash calculated
-		// from the sizes of the Blocks (if any).
-		const lzma_ret ret = lzma_index_hash_decode(coder->index_hash,
-				in, in_pos, in_size);
-		if (ret != LZMA_STREAM_END)
-			return ret;
-
-		coder->sequence = SEQ_STREAM_FOOTER;
-	}
-
-	// Fall through
-
-	case SEQ_STREAM_FOOTER: {
-		// Copy the Stream Footer to the internal buffer.
-		lzma_bufcpy(in, in_pos, in_size, coder->buffer, &coder->pos,
-				LZMA_STREAM_HEADER_SIZE);
-
-		// Return if we didn't get the whole Stream Footer yet.
-		if (coder->pos < LZMA_STREAM_HEADER_SIZE)
-			return LZMA_OK;
-
-		coder->pos = 0;
-
-		// Decode the Stream Footer. The decoder gives
-		// LZMA_FORMAT_ERROR if the magic bytes don't match,
-		// so convert that return code to LZMA_DATA_ERROR.
-		lzma_stream_flags footer_flags;
-		const lzma_ret ret = lzma_stream_footer_decode(
-				&footer_flags, coder->buffer);
-		if (ret != LZMA_OK)
-			return ret == LZMA_FORMAT_ERROR
-					? LZMA_DATA_ERROR : ret;
-
-		// Check that Index Size stored in the Stream Footer matches
-		// the real size of the Index field.
-		if (lzma_index_hash_size(coder->index_hash)
-				!= footer_flags.backward_size)
-			return LZMA_DATA_ERROR;
-
-		// Compare that the Stream Flags fields are identical in
-		// both Stream Header and Stream Footer.
-		return_if_error(lzma_stream_flags_compare(
-				&coder->stream_flags, &footer_flags));
-
-		if (!coder->concatenated)
-			return LZMA_STREAM_END;
-
-		coder->sequence = SEQ_STREAM_PADDING;
-	}
-
-	// Fall through
-
-	case SEQ_STREAM_PADDING:
-		assert(coder->concatenated);
-
-		// Skip over possible Stream Padding.
-		while (true) {
-			if (*in_pos >= in_size) {
-				// Unless LZMA_FINISH was used, we cannot
-				// know if there's more input coming later.
-				if (action != LZMA_FINISH)
-					return LZMA_OK;
-
-				// Stream Padding must be a multiple of
-				// four bytes.
-				return coder->pos == 0
-						? LZMA_STREAM_END
-						: LZMA_DATA_ERROR;
-			}
-
-			// If the byte is not zero, it probably indicates
-			// beginning of a new Stream (or the file is corrupt).
-			if (in[*in_pos] != 0x00)
-				break;
-
-			++*in_pos;
-			coder->pos = (coder->pos + 1) & 3;
-		}
-
-		// Stream Padding must be a multiple of four bytes (empty
-		// Stream Padding is OK).
-		if (coder->pos != 0) {
-			++*in_pos;
-			return LZMA_DATA_ERROR;
-		}
-
-		// Prepare to decode the next Stream.
-		return_if_error(stream_decoder_reset(coder, allocator));
-		break;
-
-	default:
-		assert(0);
-		return LZMA_PROG_ERROR;
-	}
-
-	// Never reached
-}
-
-
-static void
-stream_decoder_end(lzma_coder *coder, lzma_allocator *allocator)
-{
-	lzma_next_end(&coder->block_decoder, allocator);
-	lzma_index_hash_end(coder->index_hash, allocator);
-	lzma_free(coder, allocator);
-	return;
-}
-
-
-static lzma_check
-stream_decoder_get_check(const lzma_coder *coder)
-{
-	return coder->stream_flags.check;
-}
-
-
-static lzma_ret
-stream_decoder_memconfig(lzma_coder *coder, uint64_t *memusage,
-		uint64_t *old_memlimit, uint64_t new_memlimit)
-{
-	*memusage = coder->memusage;
-	*old_memlimit = coder->memlimit;
-
-	if (new_memlimit != 0) {
-		if (new_memlimit < coder->memusage)
-			return LZMA_MEMLIMIT_ERROR;
-
-		coder->memlimit = new_memlimit;
-	}
-
-	return LZMA_OK;
-}
-
-
-extern lzma_ret
-lzma_stream_decoder_init(lzma_next_coder *next, lzma_allocator *allocator,
-		uint64_t memlimit, uint32_t flags)
-{
-	lzma_next_coder_init(&lzma_stream_decoder_init, next, allocator);
-
-	if (memlimit == 0)
-		return LZMA_PROG_ERROR;
-
-	if (flags & ~LZMA_SUPPORTED_FLAGS)
-		return LZMA_OPTIONS_ERROR;
-
-	if (next->coder == NULL) {
-		next->coder = lzma_alloc(sizeof(lzma_coder), allocator);
-		if (next->coder == NULL)
-			return LZMA_MEM_ERROR;
-
-		next->code = &stream_decode;
-		next->end = &stream_decoder_end;
-		next->get_check = &stream_decoder_get_check;
-		next->memconfig = &stream_decoder_memconfig;
-
-		next->coder->block_decoder = LZMA_NEXT_CODER_INIT;
-		next->coder->index_hash = NULL;
-	}
-
-	next->coder->memlimit = memlimit;
-	next->coder->memusage = LZMA_MEMUSAGE_BASE;
-	next->coder->tell_no_check = (flags & LZMA_TELL_NO_CHECK) != 0;
-	next->coder->tell_unsupported_check
-			= (flags & LZMA_TELL_UNSUPPORTED_CHECK) != 0;
-	next->coder->tell_any_check = (flags & LZMA_TELL_ANY_CHECK) != 0;
-	next->coder->concatenated = (flags & LZMA_CONCATENATED) != 0;
-	next->coder->first_stream = true;
-
-	return stream_decoder_reset(next->coder, allocator);
-}
-
-
-extern LZMA_API(lzma_ret)
-lzma_stream_decoder(lzma_stream *strm, uint64_t memlimit, uint32_t flags)
-{
-	lzma_next_strm_init(lzma_stream_decoder_init, strm, memlimit, flags);
-
-	strm->internal->supported_actions[LZMA_RUN] = true;
-	strm->internal->supported_actions[LZMA_FINISH] = true;
-
-	return LZMA_OK;
-}
diff --git a/src/extra/xz/common/stream_decoder.h b/src/extra/xz/common/stream_decoder.h
deleted file mode 100644
index e54ac28..0000000
--- a/src/extra/xz/common/stream_decoder.h
+++ /dev/null
@@ -1,21 +0,0 @@
-///////////////////////////////////////////////////////////////////////////////
-//
-/// \file       stream_decoder.h
-/// \brief      Decodes .xz Streams
-//
-//  Author:     Lasse Collin
-//
-//  This file has been put into the public domain.
-//  You can do whatever you want with this file.
-//
-///////////////////////////////////////////////////////////////////////////////
-
-#ifndef LZMA_STREAM_DECODER_H
-#define LZMA_STREAM_DECODER_H
-
-#include "common.h"
-
-extern lzma_ret lzma_stream_decoder_init(lzma_next_coder *next,
-		lzma_allocator *allocator, uint64_t memlimit, uint32_t flags);
-
-#endif
diff --git a/src/extra/xz/common/stream_encoder.c b/src/extra/xz/common/stream_encoder.c
deleted file mode 100644
index 97a7a23..0000000
--- a/src/extra/xz/common/stream_encoder.c
+++ /dev/null
@@ -1,331 +0,0 @@
-///////////////////////////////////////////////////////////////////////////////
-//
-/// \file       stream_encoder.c
-/// \brief      Encodes .xz Streams
-//
-//  Author:     Lasse Collin
-//
-//  This file has been put into the public domain.
-//  You can do whatever you want with this file.
-//
-///////////////////////////////////////////////////////////////////////////////
-
-#include "stream_encoder.h"
-#include "block_encoder.h"
-#include "index_encoder.h"
-
-
-struct lzma_coder_s {
-	enum {
-		SEQ_STREAM_HEADER,
-		SEQ_BLOCK_INIT,
-		SEQ_BLOCK_HEADER,
-		SEQ_BLOCK_ENCODE,
-		SEQ_INDEX_ENCODE,
-		SEQ_STREAM_FOOTER,
-	} sequence;
-
-	/// True if Block encoder has been initialized by
-	/// lzma_stream_encoder_init() or stream_encoder_update()
-	/// and thus doesn't need to be initialized in stream_encode().
-	bool block_encoder_is_initialized;
-
-	/// Block
-	lzma_next_coder block_encoder;
-
-	/// Options for the Block encoder
-	lzma_block block_options;
-
-	/// The filter chain currently in use
-	lzma_filter filters[LZMA_FILTERS_MAX + 1];
-
-	/// Index encoder. This is separate from Block encoder, because this
-	/// doesn't take much memory, and when encoding multiple Streams
-	/// with the same encoding options we avoid reallocating memory.
-	lzma_next_coder index_encoder;
-
-	/// Index to hold sizes of the Blocks
-	lzma_index *index;
-
-	/// Read position in buffer[]
-	size_t buffer_pos;
-
-	/// Total number of bytes in buffer[]
-	size_t buffer_size;
-
-	/// Buffer to hold Stream Header, Block Header, and Stream Footer.
-	/// Block Header has biggest maximum size.
-	uint8_t buffer[LZMA_BLOCK_HEADER_SIZE_MAX];
-};
-
-
-static lzma_ret
-block_encoder_init(lzma_coder *coder, lzma_allocator *allocator)
-{
-	// Prepare the Block options. Even though Block encoder doesn't need
-	// compressed_size, uncompressed_size, and header_size to be
-	// initialized, it is a good idea to do it here, because this way
-	// we catch if someone gave us Filter ID that cannot be used in
-	// Blocks/Streams.
-	coder->block_options.compressed_size = LZMA_VLI_UNKNOWN;
-	coder->block_options.uncompressed_size = LZMA_VLI_UNKNOWN;
-
-	return_if_error(lzma_block_header_size(&coder->block_options));
-
-	// Initialize the actual Block encoder.
-	return lzma_block_encoder_init(&coder->block_encoder, allocator,
-			&coder->block_options);
-}
-
-
-static lzma_ret
-stream_encode(lzma_coder *coder, lzma_allocator *allocator,
-		const uint8_t *restrict in, size_t *restrict in_pos,
-		size_t in_size, uint8_t *restrict out,
-		size_t *restrict out_pos, size_t out_size, lzma_action action)
-{
-	// Main loop
-	while (*out_pos < out_size)
-	switch (coder->sequence) {
-	case SEQ_STREAM_HEADER:
-	case SEQ_BLOCK_HEADER:
-	case SEQ_STREAM_FOOTER:
-		lzma_bufcpy(coder->buffer, &coder->buffer_pos,
-				coder->buffer_size, out, out_pos, out_size);
-		if (coder->buffer_pos < coder->buffer_size)
-			return LZMA_OK;
-
-		if (coder->sequence == SEQ_STREAM_FOOTER)
-			return LZMA_STREAM_END;
-
-		coder->buffer_pos = 0;
-		++coder->sequence;
-		break;
-
-	case SEQ_BLOCK_INIT: {
-		if (*in_pos == in_size) {
-			// If we are requested to flush or finish the current
-			// Block, return LZMA_STREAM_END immediately since
-			// there's nothing to do.
-			if (action != LZMA_FINISH)
-				return action == LZMA_RUN
-						? LZMA_OK : LZMA_STREAM_END;
-
-			// The application had used LZMA_FULL_FLUSH to finish
-			// the previous Block, but now wants to finish without
-			// encoding new data, or it is simply creating an
-			// empty Stream with no Blocks.
-			//
-			// Initialize the Index encoder, and continue to
-			// actually encoding the Index.
-			return_if_error(lzma_index_encoder_init(
-					&coder->index_encoder, allocator,
-					coder->index));
-			coder->sequence = SEQ_INDEX_ENCODE;
-			break;
-		}
-
-		// Initialize the Block encoder unless it was already
-		// initialized by lzma_stream_encoder_init() or
-		// stream_encoder_update().
-		if (!coder->block_encoder_is_initialized)
-			return_if_error(block_encoder_init(coder, allocator));
-
-		// Make it false so that we don't skip the initialization
-		// with the next Block.
-		coder->block_encoder_is_initialized = false;
-
-		// Encode the Block Header. This shouldn't fail since we have
-		// already initialized the Block encoder.
-		if (lzma_block_header_encode(&coder->block_options,
-				coder->buffer) != LZMA_OK)
-			return LZMA_PROG_ERROR;
-
-		coder->buffer_size = coder->block_options.header_size;
-		coder->sequence = SEQ_BLOCK_HEADER;
-		break;
-	}
-
-	case SEQ_BLOCK_ENCODE: {
-		static const lzma_action convert[4] = {
-			LZMA_RUN,
-			LZMA_SYNC_FLUSH,
-			LZMA_FINISH,
-			LZMA_FINISH,
-		};
-
-		const lzma_ret ret = coder->block_encoder.code(
-				coder->block_encoder.coder, allocator,
-				in, in_pos, in_size,
-				out, out_pos, out_size, convert[action]);
-		if (ret != LZMA_STREAM_END || action == LZMA_SYNC_FLUSH)
-			return ret;
-
-		// Add a new Index Record.
-		const lzma_vli unpadded_size = lzma_block_unpadded_size(
-				&coder->block_options);
-		assert(unpadded_size != 0);
-		return_if_error(lzma_index_append(coder->index, allocator,
-				unpadded_size,
-				coder->block_options.uncompressed_size));
-
-		coder->sequence = SEQ_BLOCK_INIT;
-		break;
-	}
-
-	case SEQ_INDEX_ENCODE: {
-		// Call the Index encoder. It doesn't take any input, so
-		// those pointers can be NULL.
-		const lzma_ret ret = coder->index_encoder.code(
-				coder->index_encoder.coder, allocator,
-				NULL, NULL, 0,
-				out, out_pos, out_size, LZMA_RUN);
-		if (ret != LZMA_STREAM_END)
-			return ret;
-
-		// Encode the Stream Footer into coder->buffer.
-		const lzma_stream_flags stream_flags = {
-			.version = 0,
-			.backward_size = lzma_index_size(coder->index),
-			.check = coder->block_options.check,
-		};
-
-		if (lzma_stream_footer_encode(&stream_flags, coder->buffer)
-				!= LZMA_OK)
-			return LZMA_PROG_ERROR;
-
-		coder->buffer_size = LZMA_STREAM_HEADER_SIZE;
-		coder->sequence = SEQ_STREAM_FOOTER;
-		break;
-	}
-
-	default:
-		assert(0);
-		return LZMA_PROG_ERROR;
-	}
-
-	return LZMA_OK;
-}
-
-
-static void
-stream_encoder_end(lzma_coder *coder, lzma_allocator *allocator)
-{
-	lzma_next_end(&coder->block_encoder, allocator);
-	lzma_next_end(&coder->index_encoder, allocator);
-	lzma_index_end(coder->index, allocator);
-
-	for (size_t i = 0; coder->filters[i].id != LZMA_VLI_UNKNOWN; ++i)
-		lzma_free(coder->filters[i].options, allocator);
-
-	lzma_free(coder, allocator);
-	return;
-}
-
-
-static lzma_ret
-stream_encoder_update(lzma_coder *coder, lzma_allocator *allocator,
-		const lzma_filter *filters,
-		const lzma_filter *reversed_filters)
-{
-	if (coder->sequence <= SEQ_BLOCK_INIT) {
-		// There is no incomplete Block waiting to be finished,
-		// thus we can change the whole filter chain. Start by
-		// trying to initialize the Block encoder with the new
-		// chain. This way we detect if the chain is valid.
-		coder->block_encoder_is_initialized = false;
-		coder->block_options.filters = (lzma_filter *)(filters);
-		const lzma_ret ret = block_encoder_init(coder, allocator);
-		coder->block_options.filters = coder->filters;
-		if (ret != LZMA_OK)
-			return ret;
-
-		coder->block_encoder_is_initialized = true;
-
-	} else if (coder->sequence <= SEQ_BLOCK_ENCODE) {
-		// We are in the middle of a Block. Try to update only
-		// the filter-specific options.
-		return_if_error(coder->block_encoder.update(
-				coder->block_encoder.coder, allocator,
-				filters, reversed_filters));
-	} else {
-		// Trying to update the filter chain when we are already
-		// encoding Index or Stream Footer.
-		return LZMA_PROG_ERROR;
-	}
-
-	// Free the copy of the old chain and make a copy of the new chain.
-	for (size_t i = 0; coder->filters[i].id != LZMA_VLI_UNKNOWN; ++i)
-		lzma_free(coder->filters[i].options, allocator);
-
-	return lzma_filters_copy(filters, coder->filters, allocator);
-}
-
-
-extern lzma_ret
-lzma_stream_encoder_init(lzma_next_coder *next, lzma_allocator *allocator,
-		const lzma_filter *filters, lzma_check check)
-{
-	lzma_next_coder_init(&lzma_stream_encoder_init, next, allocator);
-
-	if (filters == NULL)
-		return LZMA_PROG_ERROR;
-
-	if (next->coder == NULL) {
-		next->coder = lzma_alloc(sizeof(lzma_coder), allocator);
-		if (next->coder == NULL)
-			return LZMA_MEM_ERROR;
-
-		next->code = &stream_encode;
-		next->end = &stream_encoder_end;
-		next->update = &stream_encoder_update;
-
-		next->coder->filters[0].id = LZMA_VLI_UNKNOWN;
-		next->coder->block_encoder = LZMA_NEXT_CODER_INIT;
-		next->coder->index_encoder = LZMA_NEXT_CODER_INIT;
-		next->coder->index = NULL;
-	}
-
-	// Basic initializations
-	next->coder->sequence = SEQ_STREAM_HEADER;
-	next->coder->block_options.version = 0;
-	next->coder->block_options.check = check;
-
-	// Initialize the Index
-	lzma_index_end(next->coder->index, allocator);
-	next->coder->index = lzma_index_init(allocator);
-	if (next->coder->index == NULL)
-		return LZMA_MEM_ERROR;
-
-	// Encode the Stream Header
-	lzma_stream_flags stream_flags = {
-		.version = 0,
-		.check = check,
-	};
-	return_if_error(lzma_stream_header_encode(
-			&stream_flags, next->coder->buffer));
-
-	next->coder->buffer_pos = 0;
-	next->coder->buffer_size = LZMA_STREAM_HEADER_SIZE;
-
-	// Initialize the Block encoder. This way we detect unsupported
-	// filter chains when initializing the Stream encoder instead of
-	// giving an error after Stream Header has already written out.
-	return stream_encoder_update(
-			next->coder, allocator, filters, NULL);
-}
-
-
-extern LZMA_API(lzma_ret)
-lzma_stream_encoder(lzma_stream *strm,
-		const lzma_filter *filters, lzma_check check)
-{
-	lzma_next_strm_init(lzma_stream_encoder_init, strm, filters, check);
-
-	strm->internal->supported_actions[LZMA_RUN] = true;
-	strm->internal->supported_actions[LZMA_SYNC_FLUSH] = true;
-	strm->internal->supported_actions[LZMA_FULL_FLUSH] = true;
-	strm->internal->supported_actions[LZMA_FINISH] = true;
-
-	return LZMA_OK;
-}
diff --git a/src/extra/xz/common/stream_encoder.h b/src/extra/xz/common/stream_encoder.h
deleted file mode 100644
index 46a7aed..0000000
--- a/src/extra/xz/common/stream_encoder.h
+++ /dev/null
@@ -1,23 +0,0 @@
-///////////////////////////////////////////////////////////////////////////////
-//
-/// \file       stream_encoder.h
-/// \brief      Encodes .xz Streams
-//
-//  Author:     Lasse Collin
-//
-//  This file has been put into the public domain.
-//  You can do whatever you want with this file.
-//
-///////////////////////////////////////////////////////////////////////////////
-
-#ifndef LZMA_STREAM_ENCODER_H
-#define LZMA_STREAM_ENCODER_H
-
-#include "common.h"
-
-
-extern lzma_ret lzma_stream_encoder_init(
-		lzma_next_coder *next, lzma_allocator *allocator,
-		const lzma_filter *filters, lzma_check check);
-
-#endif
diff --git a/src/extra/xz/common/stream_flags_common.c b/src/extra/xz/common/stream_flags_common.c
deleted file mode 100644
index fbe8eb8..0000000
--- a/src/extra/xz/common/stream_flags_common.c
+++ /dev/null
@@ -1,47 +0,0 @@
-///////////////////////////////////////////////////////////////////////////////
-//
-/// \file       stream_flags_common.c
-/// \brief      Common stuff for Stream flags coders
-//
-//  Author:     Lasse Collin
-//
-//  This file has been put into the public domain.
-//  You can do whatever you want with this file.
-//
-///////////////////////////////////////////////////////////////////////////////
-
-#include "stream_flags_common.h"
-
-
-const uint8_t lzma_header_magic[6] = { 0xFD, 0x37, 0x7A, 0x58, 0x5A, 0x00 };
-const uint8_t lzma_footer_magic[2] = { 0x59, 0x5A };
-
-
-extern LZMA_API(lzma_ret)
-lzma_stream_flags_compare(
-		const lzma_stream_flags *a, const lzma_stream_flags *b)
-{
-	// We can compare only version 0 structures.
-	if (a->version != 0 || b->version != 0)
-		return LZMA_OPTIONS_ERROR;
-
-	// Check type
-	if ((unsigned int)(a->check) > LZMA_CHECK_ID_MAX
-			|| (unsigned int)(b->check) > LZMA_CHECK_ID_MAX)
-		return LZMA_PROG_ERROR;
-
-	if (a->check != b->check)
-		return LZMA_DATA_ERROR;
-
-	// Backward Sizes are compared only if they are known in both.
-	if (a->backward_size != LZMA_VLI_UNKNOWN
-			&& b->backward_size != LZMA_VLI_UNKNOWN) {
-		if (!is_backward_size_valid(a) || !is_backward_size_valid(b))
-			return LZMA_PROG_ERROR;
-
-		if (a->backward_size != b->backward_size)
-			return LZMA_DATA_ERROR;
-	}
-
-	return LZMA_OK;
-}
diff --git a/src/extra/xz/common/stream_flags_common.h b/src/extra/xz/common/stream_flags_common.h
deleted file mode 100644
index 9f3122a..0000000
--- a/src/extra/xz/common/stream_flags_common.h
+++ /dev/null
@@ -1,33 +0,0 @@
-///////////////////////////////////////////////////////////////////////////////
-//
-/// \file       stream_flags_common.h
-/// \brief      Common stuff for Stream flags coders
-//
-//  Author:     Lasse Collin
-//
-//  This file has been put into the public domain.
-//  You can do whatever you want with this file.
-//
-///////////////////////////////////////////////////////////////////////////////
-
-#ifndef LZMA_STREAM_FLAGS_COMMON_H
-#define LZMA_STREAM_FLAGS_COMMON_H
-
-#include "common.h"
-
-/// Size of the Stream Flags field
-#define LZMA_STREAM_FLAGS_SIZE 2
-
-extern const uint8_t lzma_header_magic[6];
-extern const uint8_t lzma_footer_magic[2];
-
-
-static inline bool
-is_backward_size_valid(const lzma_stream_flags *options)
-{
-	return options->backward_size >= LZMA_BACKWARD_SIZE_MIN
-			&& options->backward_size <= LZMA_BACKWARD_SIZE_MAX
-			&& (options->backward_size & 3) == 0;
-}
-
-#endif
diff --git a/src/extra/xz/common/stream_flags_decoder.c b/src/extra/xz/common/stream_flags_decoder.c
deleted file mode 100644
index 1bc2f97..0000000
--- a/src/extra/xz/common/stream_flags_decoder.c
+++ /dev/null
@@ -1,82 +0,0 @@
-///////////////////////////////////////////////////////////////////////////////
-//
-/// \file       stream_flags_decoder.c
-/// \brief      Decodes Stream Header and Stream Footer from .xz files
-//
-//  Author:     Lasse Collin
-//
-//  This file has been put into the public domain.
-//  You can do whatever you want with this file.
-//
-///////////////////////////////////////////////////////////////////////////////
-
-#include "stream_flags_common.h"
-
-
-static bool
-stream_flags_decode(lzma_stream_flags *options, const uint8_t *in)
-{
-	// Reserved bits must be unset.
-	if (in[0] != 0x00 || (in[1] & 0xF0))
-		return true;
-
-	options->version = 0;
-	options->check = in[1] & 0x0F;
-
-	return false;
-}
-
-
-extern LZMA_API(lzma_ret)
-lzma_stream_header_decode(lzma_stream_flags *options, const uint8_t *in)
-{
-	// Magic
-	if (memcmp(in, lzma_header_magic, sizeof(lzma_header_magic)) != 0)
-		return LZMA_FORMAT_ERROR;
-
-	// Verify the CRC32 so we can distinguish between corrupt
-	// and unsupported files.
-	const uint32_t crc = lzma_crc32(in + sizeof(lzma_header_magic),
-			LZMA_STREAM_FLAGS_SIZE, 0);
-	if (crc != unaligned_read32le(in + sizeof(lzma_header_magic)
-			+ LZMA_STREAM_FLAGS_SIZE))
-		return LZMA_DATA_ERROR;
-
-	// Stream Flags
-	if (stream_flags_decode(options, in + sizeof(lzma_header_magic)))
-		return LZMA_OPTIONS_ERROR;
-
-	// Set Backward Size to indicate unknown value. That way
-	// lzma_stream_flags_compare() can be used to compare Stream Header
-	// and Stream Footer while keeping it useful also for comparing
-	// two Stream Footers.
-	options->backward_size = LZMA_VLI_UNKNOWN;
-
-	return LZMA_OK;
-}
-
-
-extern LZMA_API(lzma_ret)
-lzma_stream_footer_decode(lzma_stream_flags *options, const uint8_t *in)
-{
-	// Magic
-	if (memcmp(in + sizeof(uint32_t) * 2 + LZMA_STREAM_FLAGS_SIZE,
-			lzma_footer_magic, sizeof(lzma_footer_magic)) != 0)
-		return LZMA_FORMAT_ERROR;
-
-	// CRC32
-	const uint32_t crc = lzma_crc32(in + sizeof(uint32_t),
-			sizeof(uint32_t) + LZMA_STREAM_FLAGS_SIZE, 0);
-	if (crc != unaligned_read32le(in))
-		return LZMA_DATA_ERROR;
-
-	// Stream Flags
-	if (stream_flags_decode(options, in + sizeof(uint32_t) * 2))
-		return LZMA_OPTIONS_ERROR;
-
-	// Backward Size
-	options->backward_size = unaligned_read32le(in + sizeof(uint32_t));
-	options->backward_size = (options->backward_size + 1) * 4;
-
-	return LZMA_OK;
-}
diff --git a/src/extra/xz/common/stream_flags_encoder.c b/src/extra/xz/common/stream_flags_encoder.c
deleted file mode 100644
index 4e71715..0000000
--- a/src/extra/xz/common/stream_flags_encoder.c
+++ /dev/null
@@ -1,86 +0,0 @@
-///////////////////////////////////////////////////////////////////////////////
-//
-/// \file       stream_flags_encoder.c
-/// \brief      Encodes Stream Header and Stream Footer for .xz files
-//
-//  Author:     Lasse Collin
-//
-//  This file has been put into the public domain.
-//  You can do whatever you want with this file.
-//
-///////////////////////////////////////////////////////////////////////////////
-
-#include "stream_flags_common.h"
-
-
-static bool
-stream_flags_encode(const lzma_stream_flags *options, uint8_t *out)
-{
-	if ((unsigned int)(options->check) > LZMA_CHECK_ID_MAX)
-		return true;
-
-	out[0] = 0x00;
-	out[1] = options->check;
-
-	return false;
-}
-
-
-extern LZMA_API(lzma_ret)
-lzma_stream_header_encode(const lzma_stream_flags *options, uint8_t *out)
-{
-	assert(sizeof(lzma_header_magic) + LZMA_STREAM_FLAGS_SIZE
-			+ 4 == LZMA_STREAM_HEADER_SIZE);
-
-	if (options->version != 0)
-		return LZMA_OPTIONS_ERROR;
-
-	// Magic
-	memcpy(out, lzma_header_magic, sizeof(lzma_header_magic));
-
-	// Stream Flags
-	if (stream_flags_encode(options, out + sizeof(lzma_header_magic)))
-		return LZMA_PROG_ERROR;
-
-	// CRC32 of the Stream Header
-	const uint32_t crc = lzma_crc32(out + sizeof(lzma_header_magic),
-			LZMA_STREAM_FLAGS_SIZE, 0);
-
-	unaligned_write32le(out + sizeof(lzma_header_magic)
-			+ LZMA_STREAM_FLAGS_SIZE, crc);
-
-	return LZMA_OK;
-}
-
-
-extern LZMA_API(lzma_ret)
-lzma_stream_footer_encode(const lzma_stream_flags *options, uint8_t *out)
-{
-	assert(2 * 4 + LZMA_STREAM_FLAGS_SIZE + sizeof(lzma_footer_magic)
-			== LZMA_STREAM_HEADER_SIZE);
-
-	if (options->version != 0)
-		return LZMA_OPTIONS_ERROR;
-
-	// Backward Size
-	if (!is_backward_size_valid(options))
-		return LZMA_PROG_ERROR;
-
-	unaligned_write32le(out + 4, options->backward_size / 4 - 1);
-
-	// Stream Flags
-	if (stream_flags_encode(options, out + 2 * 4))
-		return LZMA_PROG_ERROR;
-
-	// CRC32
-	const uint32_t crc = lzma_crc32(
-			out + 4, 4 + LZMA_STREAM_FLAGS_SIZE, 0);
-
-	unaligned_write32le(out, crc);
-
-	// Magic
-	memcpy(out + 2 * 4 + LZMA_STREAM_FLAGS_SIZE,
-			lzma_footer_magic, sizeof(lzma_footer_magic));
-
-	return LZMA_OK;
-}
diff --git a/src/extra/xz/common/sysdefs.h b/src/extra/xz/common/sysdefs.h
deleted file mode 100644
index ec1fa90..0000000
--- a/src/extra/xz/common/sysdefs.h
+++ /dev/null
@@ -1,189 +0,0 @@
-///////////////////////////////////////////////////////////////////////////////
-//
-/// \file       sysdefs.h
-/// \brief      Common includes, definitions, system-specific things etc.
-///
-/// This file is used also by the lzma command line tool, that's why this
-/// file is separate from common.h.
-//
-//  Author:     Lasse Collin
-//
-//  This file has been put into the public domain.
-//  You can do whatever you want with this file.
-//
-///////////////////////////////////////////////////////////////////////////////
-
-#ifndef LZMA_SYSDEFS_H
-#define LZMA_SYSDEFS_H
-
-//////////////
-// Includes //
-//////////////
-
-#ifdef HAVE_CONFIG_H
-#	include <config.h>
-#endif
-
-// R change
-#include "local.h"
-// Get standard-compliant stdio functions under MinGW and MinGW-w64.
-//#ifdef __MINGW32__
-//#	define __USE_MINGW_ANSI_STDIO 1
-//#endif
-
-// size_t and NULL
-#include <stddef.h>
-
-#ifdef HAVE_INTTYPES_H
-#	include <inttypes.h>
-#endif
-
-// C99 says that inttypes.h always includes stdint.h, but some systems
-// don't do that, and require including stdint.h separately.
-#ifdef HAVE_STDINT_H
-#	include <stdint.h>
-#endif
-
-// Some pre-C99 systems have SIZE_MAX in limits.h instead of stdint.h. The
-// limits are also used to figure out some macros missing from pre-C99 systems.
-#ifdef HAVE_LIMITS_H
-#	include <limits.h>
-#endif
-
-// Be more compatible with systems that have non-conforming inttypes.h.
-// We assume that int is 32-bit and that long is either 32-bit or 64-bit.
-// Full Autoconf test could be more correct, but this should work well enough.
-// Note that this duplicates some code from lzma.h, but this is better since
-// we can work without inttypes.h thanks to Autoconf tests.
-#ifndef UINT32_C
-#	if UINT_MAX != 4294967295U
-#		error UINT32_C is not defined and unsigned int is not 32-bit.
-#	endif
-#	define UINT32_C(n) n ## U
-#endif
-#ifndef UINT32_MAX
-#	define UINT32_MAX UINT32_C(4294967295)
-#endif
-#ifndef PRIu32
-#	define PRIu32 "u"
-#endif
-#ifndef PRIx32
-#	define PRIx32 "x"
-#endif
-#ifndef PRIX32
-#	define PRIX32 "X"
-#endif
-
-#if ULONG_MAX == 4294967295UL
-#	ifndef UINT64_C
-#		define UINT64_C(n) n ## ULL
-#	endif
-#	ifndef PRIu64
-#		define PRIu64 "llu"
-#	endif
-#	ifndef PRIx64
-#		define PRIx64 "llx"
-#	endif
-#	ifndef PRIX64
-#		define PRIX64 "llX"
-#	endif
-#else
-#	ifndef UINT64_C
-#		define UINT64_C(n) n ## UL
-#	endif
-#	ifndef PRIu64
-#		define PRIu64 "lu"
-#	endif
-#	ifndef PRIx64
-#		define PRIx64 "lx"
-#	endif
-#	ifndef PRIX64
-#		define PRIX64 "lX"
-#	endif
-#endif
-#ifndef UINT64_MAX
-#	define UINT64_MAX UINT64_C(18446744073709551615)
-#endif
-
-// Incorrect(?) SIZE_MAX:
-//   - Interix headers typedef size_t to unsigned long,
-//     but a few lines later define SIZE_MAX to INT32_MAX.
-//   - SCO OpenServer (x86) headers typedef size_t to unsigned int
-//     but define SIZE_MAX to INT32_MAX.
-#if defined(__INTERIX) || defined(_SCO_DS)
-#	undef SIZE_MAX
-#endif
-
-// The code currently assumes that size_t is either 32-bit or 64-bit.
-#ifndef SIZE_MAX
-#	if SIZEOF_SIZE_T == 4
-#		define SIZE_MAX UINT32_MAX
-#	elif SIZEOF_SIZE_T == 8
-#		define SIZE_MAX UINT64_MAX
-#	else
-#		error size_t is not 32-bit or 64-bit
-#	endif
-#endif
-#if SIZE_MAX != UINT32_MAX && SIZE_MAX != UINT64_MAX
-#	error size_t is not 32-bit or 64-bit
-#endif
-
-#include <stdlib.h>
-#include <assert.h>
-
-// Pre-C99 systems lack stdbool.h. All the code in LZMA Utils must be written
-// so that it works with fake bool type, for example:
-//
-//    bool foo = (flags & 0x100) != 0;
-//    bool bar = !!(flags & 0x100);
-//
-// This works with the real C99 bool but breaks with fake bool:
-//
-//    bool baz = (flags & 0x100);
-//
-#ifdef HAVE_STDBOOL_H
-#	include <stdbool.h>
-#else
-#	if ! HAVE__BOOL
-/* _Bool gave problems on one Solaris system */
-typedef unsigned char _Bool8;
-#	endif
-#	define bool _Bool8
-#	define false 0
-#	define true 1
-#	define __bool_true_false_are_defined 1
-#endif
-
-// string.h should be enough but let's include strings.h and memory.h too if
-// they exists, since that shouldn't do any harm, but may improve portability.
-#ifdef HAVE_STRING_H
-#	include <string.h>
-#endif
-
-#ifdef HAVE_STRINGS_H
-#	include <strings.h>
-#endif
-
-#ifdef HAVE_MEMORY_H
-#	include <memory.h>
-#endif
-
-
-////////////
-// Macros //
-////////////
-
-#undef memzero
-#define memzero(s, n) memset(s, 0, n)
-
-// NOTE: Avoid using MIN() and MAX(), because even conditionally defining
-// those macros can cause some portability trouble, since on some systems
-// the system headers insist defining their own versions.
-#define my_min(x, y) ((x) < (y) ? (x) : (y))
-#define my_max(x, y) ((x) > (y) ? (x) : (y))
-
-#ifndef ARRAY_SIZE
-#	define ARRAY_SIZE(array) (sizeof(array) / sizeof((array)[0]))
-#endif
-
-#endif
diff --git a/src/extra/xz/common/tuklib_common.h b/src/extra/xz/common/tuklib_common.h
deleted file mode 100644
index 31fbab5..0000000
--- a/src/extra/xz/common/tuklib_common.h
+++ /dev/null
@@ -1,71 +0,0 @@
-///////////////////////////////////////////////////////////////////////////////
-//
-/// \file       tuklib_common.h
-/// \brief      Common definitions for tuklib modules
-//
-//  Author:     Lasse Collin
-//
-//  This file has been put into the public domain.
-//  You can do whatever you want with this file.
-//
-///////////////////////////////////////////////////////////////////////////////
-
-#ifndef TUKLIB_COMMON_H
-#define TUKLIB_COMMON_H
-
-// The config file may be replaced by a package-specific file.
-// It should include at least stddef.h, inttypes.h, and limits.h.
-#include "tuklib_config.h"
-
-// TUKLIB_SYMBOL_PREFIX is prefixed to all symbols exported by
-// the tuklib modules. If you use a tuklib module in a library,
-// you should use TUKLIB_SYMBOL_PREFIX to make sure that there
-// are no symbol conflicts in case someone links your library
-// into application that also uses the same tuklib module.
-#ifndef TUKLIB_SYMBOL_PREFIX
-#	define TUKLIB_SYMBOL_PREFIX
-#endif
-
-#define TUKLIB_CAT_X(a, b) a ## b
-#define TUKLIB_CAT(a, b) TUKLIB_CAT_X(a, b)
-
-#ifndef TUKLIB_SYMBOL
-#	define TUKLIB_SYMBOL(sym) TUKLIB_CAT(TUKLIB_SYMBOL_PREFIX, sym)
-#endif
-
-#ifndef TUKLIB_DECLS_BEGIN
-#	ifdef __cplusplus
-#		define TUKLIB_DECLS_BEGIN extern "C" {
-#	else
-#		define TUKLIB_DECLS_BEGIN
-#	endif
-#endif
-
-#ifndef TUKLIB_DECLS_END
-#	ifdef __cplusplus
-#		define TUKLIB_DECLS_END }
-#	else
-#		define TUKLIB_DECLS_END
-#	endif
-#endif
-
-#if defined(__GNUC__) && defined(__GNUC_MINOR__)
-#	define TUKLIB_GNUC_REQ(major, minor) \
-		((__GNUC__ == (major) && __GNUC_MINOR__ >= (minor)) \
-			|| __GNUC__ > (major))
-#else
-#	define TUKLIB_GNUC_REQ(major, minor) 0
-#endif
-
-#if TUKLIB_GNUC_REQ(2, 5)
-#	define tuklib_attr_noreturn __attribute__((__noreturn__))
-#else
-#	define tuklib_attr_noreturn
-#endif
-
-#if (defined(_WIN32) && !defined(__CYGWIN__)) \
-		|| defined(__OS2__) || defined(__MSDOS__)
-#	define TUKLIB_DOSLIKE 1
-#endif
-
-#endif
diff --git a/src/extra/xz/common/tuklib_config.h b/src/extra/xz/common/tuklib_config.h
deleted file mode 100644
index 549cb24..0000000
--- a/src/extra/xz/common/tuklib_config.h
+++ /dev/null
@@ -1,7 +0,0 @@
-#ifdef HAVE_CONFIG_H
-#	include "sysdefs.h"
-#else
-#	include <stddef.h>
-#	include <inttypes.h>
-#	include <limits.h>
-#endif
diff --git a/src/extra/xz/common/tuklib_integer.h b/src/extra/xz/common/tuklib_integer.h
deleted file mode 100644
index e6daa77..0000000
--- a/src/extra/xz/common/tuklib_integer.h
+++ /dev/null
@@ -1,523 +0,0 @@
-///////////////////////////////////////////////////////////////////////////////
-//
-/// \file       tuklib_integer.h
-/// \brief      Various integer and bit operations
-///
-/// This file provides macros or functions to do some basic integer and bit
-/// operations.
-///
-/// Endianness related integer operations (XX = 16, 32, or 64; Y = b or l):
-///   - Byte swapping: bswapXX(num)
-///   - Byte order conversions to/from native: convXXYe(num)
-///   - Aligned reads: readXXYe(ptr)
-///   - Aligned writes: writeXXYe(ptr, num)
-///   - Unaligned reads (16/32-bit only): unaligned_readXXYe(ptr)
-///   - Unaligned writes (16/32-bit only): unaligned_writeXXYe(ptr, num)
-///
-/// Since they can macros, the arguments should have no side effects since
-/// they may be evaluated more than once.
-///
-/// \todo       PowerPC and possibly some other architectures support
-///             byte swapping load and store instructions. This file
-///             doesn't take advantage of those instructions.
-///
-/// Bit scan operations for non-zero 32-bit integers:
-///   - Bit scan reverse (find highest non-zero bit): bsr32(num)
-///   - Count leading zeros: clz32(num)
-///   - Count trailing zeros: ctz32(num)
-///   - Bit scan forward (simply an alias for ctz32()): bsf32(num)
-///
-/// The above bit scan operations return 0-31. If num is zero,
-/// the result is undefined.
-//
-//  Authors:    Lasse Collin
-//              Joachim Henke
-//
-//  This file has been put into the public domain.
-//  You can do whatever you want with this file.
-//
-///////////////////////////////////////////////////////////////////////////////
-
-#ifndef TUKLIB_INTEGER_H
-#define TUKLIB_INTEGER_H
-
-#include "tuklib_common.h"
-
-
-////////////////////////////////////////
-// Operating system specific features //
-////////////////////////////////////////
-
-#if defined(HAVE_BYTESWAP_H)
-	// glibc, uClibc, dietlibc
-#	include <byteswap.h>
-#	ifdef HAVE_BSWAP_16
-#		define bswap16(num) bswap_16(num)
-#	endif
-#	ifdef HAVE_BSWAP_32
-#		define bswap32(num) bswap_32(num)
-#	endif
-#	ifdef HAVE_BSWAP_64
-#		define bswap64(num) bswap_64(num)
-#	endif
-
-#elif defined(HAVE_SYS_ENDIAN_H)
-	// *BSDs and Darwin
-#	include <sys/endian.h>
-
-#elif defined(HAVE_SYS_BYTEORDER_H)
-	// Solaris
-#	include <sys/byteorder.h>
-#	ifdef BSWAP_16
-#		define bswap16(num) BSWAP_16(num)
-#	endif
-#	ifdef BSWAP_32
-#		define bswap32(num) BSWAP_32(num)
-#	endif
-#	ifdef BSWAP_64
-#		define bswap64(num) BSWAP_64(num)
-#	endif
-#	ifdef BE_16
-#		define conv16be(num) BE_16(num)
-#	endif
-#	ifdef BE_32
-#		define conv32be(num) BE_32(num)
-#	endif
-#	ifdef BE_64
-#		define conv64be(num) BE_64(num)
-#	endif
-#	ifdef LE_16
-#		define conv16le(num) LE_16(num)
-#	endif
-#	ifdef LE_32
-#		define conv32le(num) LE_32(num)
-#	endif
-#	ifdef LE_64
-#		define conv64le(num) LE_64(num)
-#	endif
-#endif
-
-
-///////////////////
-// Byte swapping //
-///////////////////
-
-#ifndef bswap16
-#	define bswap16(num) \
-		(((uint16_t)(num) << 8) | ((uint16_t)(num) >> 8))
-#endif
-
-#ifndef bswap32
-#	define bswap32(num) \
-		( (((uint32_t)(num) << 24)                       ) \
-		| (((uint32_t)(num) <<  8) & UINT32_C(0x00FF0000)) \
-		| (((uint32_t)(num) >>  8) & UINT32_C(0x0000FF00)) \
-		| (((uint32_t)(num) >> 24)                       ) )
-#endif
-
-#ifndef bswap64
-#	define bswap64(num) \
-		( (((uint64_t)(num) << 56)                               ) \
-		| (((uint64_t)(num) << 40) & UINT64_C(0x00FF000000000000)) \
-		| (((uint64_t)(num) << 24) & UINT64_C(0x0000FF0000000000)) \
-		| (((uint64_t)(num) <<  8) & UINT64_C(0x000000FF00000000)) \
-		| (((uint64_t)(num) >>  8) & UINT64_C(0x00000000FF000000)) \
-		| (((uint64_t)(num) >> 24) & UINT64_C(0x0000000000FF0000)) \
-		| (((uint64_t)(num) >> 40) & UINT64_C(0x000000000000FF00)) \
-		| (((uint64_t)(num) >> 56)                               ) )
-#endif
-
-// Define conversion macros using the basic byte swapping macros.
-#ifdef WORDS_BIGENDIAN
-#	ifndef conv16be
-#		define conv16be(num) ((uint16_t)(num))
-#	endif
-#	ifndef conv32be
-#		define conv32be(num) ((uint32_t)(num))
-#	endif
-#	ifndef conv64be
-#		define conv64be(num) ((uint64_t)(num))
-#	endif
-#	ifndef conv16le
-#		define conv16le(num) bswap16(num)
-#	endif
-#	ifndef conv32le
-#		define conv32le(num) bswap32(num)
-#	endif
-#	ifndef conv64le
-#		define conv64le(num) bswap64(num)
-#	endif
-#else
-#	ifndef conv16be
-#		define conv16be(num) bswap16(num)
-#	endif
-#	ifndef conv32be
-#		define conv32be(num) bswap32(num)
-#	endif
-#	ifndef conv64be
-#		define conv64be(num) bswap64(num)
-#	endif
-#	ifndef conv16le
-#		define conv16le(num) ((uint16_t)(num))
-#	endif
-#	ifndef conv32le
-#		define conv32le(num) ((uint32_t)(num))
-#	endif
-#	ifndef conv64le
-#		define conv64le(num) ((uint64_t)(num))
-#	endif
-#endif
-
-
-//////////////////////////////
-// Aligned reads and writes //
-//////////////////////////////
-
-static inline uint16_t
-read16be(const uint8_t *buf)
-{
-	uint16_t num = *(const uint16_t *)buf;
-	return conv16be(num);
-}
-
-
-static inline uint16_t
-read16le(const uint8_t *buf)
-{
-	uint16_t num = *(const uint16_t *)buf;
-	return conv16le(num);
-}
-
-
-static inline uint32_t
-read32be(const uint8_t *buf)
-{
-	uint32_t num = *(const uint32_t *)buf;
-	return conv32be(num);
-}
-
-
-static inline uint32_t
-read32le(const uint8_t *buf)
-{
-	uint32_t num = *(const uint32_t *)buf;
-	return conv32le(num);
-}
-
-
-static inline uint64_t
-read64be(const uint8_t *buf)
-{
-	uint64_t num = *(const uint64_t *)buf;
-	return conv64be(num);
-}
-
-
-static inline uint64_t
-read64le(const uint8_t *buf)
-{
-	uint64_t num = *(const uint64_t *)buf;
-	return conv64le(num);
-}
-
-
-// NOTE: Possible byte swapping must be done in a macro to allow GCC
-// to optimize byte swapping of constants when using glibc's or *BSD's
-// byte swapping macros. The actual write is done in an inline function
-// to make type checking of the buf pointer possible similarly to readXXYe()
-// functions.
-
-#define write16be(buf, num) write16ne((buf), conv16be(num))
-#define write16le(buf, num) write16ne((buf), conv16le(num))
-#define write32be(buf, num) write32ne((buf), conv32be(num))
-#define write32le(buf, num) write32ne((buf), conv32le(num))
-#define write64be(buf, num) write64ne((buf), conv64be(num))
-#define write64le(buf, num) write64ne((buf), conv64le(num))
-
-
-static inline void
-write16ne(uint8_t *buf, uint16_t num)
-{
-	*(uint16_t *)buf = num;
-	return;
-}
-
-
-static inline void
-write32ne(uint8_t *buf, uint32_t num)
-{
-	*(uint32_t *)buf = num;
-	return;
-}
-
-
-static inline void
-write64ne(uint8_t *buf, uint64_t num)
-{
-	*(uint64_t *)buf = num;
-	return;
-}
-
-
-////////////////////////////////
-// Unaligned reads and writes //
-////////////////////////////////
-
-// NOTE: TUKLIB_FAST_UNALIGNED_ACCESS indicates only support for 16-bit and
-// 32-bit unaligned integer loads and stores. It's possible that 64-bit
-// unaligned access doesn't work or is slower than byte-by-byte access.
-// Since unaligned 64-bit is probably not needed as often as 16-bit or
-// 32-bit, we simply don't support 64-bit unaligned access for now.
-#ifdef TUKLIB_FAST_UNALIGNED_ACCESS
-#	define unaligned_read16be read16be
-#	define unaligned_read16le read16le
-#	define unaligned_read32be read32be
-#	define unaligned_read32le read32le
-#	define unaligned_write16be write16be
-#	define unaligned_write16le write16le
-#	define unaligned_write32be write32be
-#	define unaligned_write32le write32le
-
-#else
-
-static inline uint16_t
-unaligned_read16be(const uint8_t *buf)
-{
-	uint16_t num = ((uint16_t)buf[0] << 8) | (uint16_t)buf[1];
-	return num;
-}
-
-
-static inline uint16_t
-unaligned_read16le(const uint8_t *buf)
-{
-	uint16_t num = ((uint16_t)buf[0]) | ((uint16_t)buf[1] << 8);
-	return num;
-}
-
-
-static inline uint32_t
-unaligned_read32be(const uint8_t *buf)
-{
-	uint32_t num = (uint32_t)buf[0] << 24;
-	num |= (uint32_t)buf[1] << 16;
-	num |= (uint32_t)buf[2] << 8;
-	num |= (uint32_t)buf[3];
-	return num;
-}
-
-
-static inline uint32_t
-unaligned_read32le(const uint8_t *buf)
-{
-	uint32_t num = (uint32_t)buf[0];
-	num |= (uint32_t)buf[1] << 8;
-	num |= (uint32_t)buf[2] << 16;
-	num |= (uint32_t)buf[3] << 24;
-	return num;
-}
-
-
-static inline void
-unaligned_write16be(uint8_t *buf, uint16_t num)
-{
-	buf[0] = num >> 8;
-	buf[1] = num;
-	return;
-}
-
-
-static inline void
-unaligned_write16le(uint8_t *buf, uint16_t num)
-{
-	buf[0] = num;
-	buf[1] = num >> 8;
-	return;
-}
-
-
-static inline void
-unaligned_write32be(uint8_t *buf, uint32_t num)
-{
-	buf[0] = num >> 24;
-	buf[1] = num >> 16;
-	buf[2] = num >> 8;
-	buf[3] = num;
-	return;
-}
-
-
-static inline void
-unaligned_write32le(uint8_t *buf, uint32_t num)
-{
-	buf[0] = num;
-	buf[1] = num >> 8;
-	buf[2] = num >> 16;
-	buf[3] = num >> 24;
-	return;
-}
-
-#endif
-
-
-static inline uint32_t
-bsr32(uint32_t n)
-{
-	// Check for ICC first, since it tends to define __GNUC__ too.
-#if defined(__INTEL_COMPILER)
-	return _bit_scan_reverse(n);
-
-#elif TUKLIB_GNUC_REQ(3, 4) && UINT_MAX == UINT32_MAX
-	// GCC >= 3.4 has __builtin_clz(), which gives good results on
-	// multiple architectures. On x86, __builtin_clz() ^ 31U becomes
-	// either plain BSR (so the XOR gets optimized away) or LZCNT and
-	// XOR (if -march indicates that SSE4a instructions are supported).
-	return __builtin_clz(n) ^ 31U;
-
-#elif defined(__GNUC__) && (defined(__i386__) || defined(__x86_64__))
-	uint32_t i;
-	__asm__("bsrl %1, %0" : "=r" (i) : "rm" (n));
-	return i;
-
-#elif defined(_MSC_VER) && _MSC_VER >= 1400
-	// MSVC isn't supported by tuklib, but since this code exists,
-	// it doesn't hurt to have it here anyway.
-	uint32_t i;
-	_BitScanReverse((DWORD *)&i, n);
-	return i;
-
-#else
-	uint32_t i = 31;
-
-	if ((n & UINT32_C(0xFFFF0000)) == 0) {
-		n <<= 16;
-		i = 15;
-	}
-
-	if ((n & UINT32_C(0xFF000000)) == 0) {
-		n <<= 8;
-		i -= 8;
-	}
-
-	if ((n & UINT32_C(0xF0000000)) == 0) {
-		n <<= 4;
-		i -= 4;
-	}
-
-	if ((n & UINT32_C(0xC0000000)) == 0) {
-		n <<= 2;
-		i -= 2;
-	}
-
-	if ((n & UINT32_C(0x80000000)) == 0)
-		--i;
-
-	return i;
-#endif
-}
-
-
-static inline uint32_t
-clz32(uint32_t n)
-{
-#if defined(__INTEL_COMPILER)
-	return _bit_scan_reverse(n) ^ 31U;
-
-#elif TUKLIB_GNUC_REQ(3, 4) && UINT_MAX == UINT32_MAX
-	return __builtin_clz(n);
-
-#elif defined(__GNUC__) && (defined(__i386__) || defined(__x86_64__))
-	uint32_t i;
-	__asm__("bsrl %1, %0\n\t"
-		"xorl $31, %0"
-		: "=r" (i) : "rm" (n));
-	return i;
-
-#elif defined(_MSC_VER) && _MSC_VER >= 1400
-	uint32_t i;
-	_BitScanReverse((DWORD *)&i, n);
-	return i ^ 31U;
-
-#else
-	uint32_t i = 0;
-
-	if ((n & UINT32_C(0xFFFF0000)) == 0) {
-		n <<= 16;
-		i = 16;
-	}
-
-	if ((n & UINT32_C(0xFF000000)) == 0) {
-		n <<= 8;
-		i += 8;
-	}
-
-	if ((n & UINT32_C(0xF0000000)) == 0) {
-		n <<= 4;
-		i += 4;
-	}
-
-	if ((n & UINT32_C(0xC0000000)) == 0) {
-		n <<= 2;
-		i += 2;
-	}
-
-	if ((n & UINT32_C(0x80000000)) == 0)
-		++i;
-
-	return i;
-#endif
-}
-
-
-static inline uint32_t
-ctz32(uint32_t n)
-{
-#if defined(__INTEL_COMPILER)
-	return _bit_scan_forward(n);
-
-#elif TUKLIB_GNUC_REQ(3, 4) && UINT_MAX >= UINT32_MAX
-	return __builtin_ctz(n);
-
-#elif defined(__GNUC__) && (defined(__i386__) || defined(__x86_64__))
-	uint32_t i;
-	__asm__("bsfl %1, %0" : "=r" (i) : "rm" (n));
-	return i;
-
-#elif defined(_MSC_VER) && _MSC_VER >= 1400
-	uint32_t i;
-	_BitScanForward((DWORD *)&i, n);
-	return i;
-
-#else
-	uint32_t i = 0;
-
-	if ((n & UINT32_C(0x0000FFFF)) == 0) {
-		n >>= 16;
-		i = 16;
-	}
-
-	if ((n & UINT32_C(0x000000FF)) == 0) {
-		n >>= 8;
-		i += 8;
-	}
-
-	if ((n & UINT32_C(0x0000000F)) == 0) {
-		n >>= 4;
-		i += 4;
-	}
-
-	if ((n & UINT32_C(0x00000003)) == 0) {
-		n >>= 2;
-		i += 2;
-	}
-
-	if ((n & UINT32_C(0x00000001)) == 0)
-		++i;
-
-	return i;
-#endif
-}
-
-#define bsf32 ctz32
-
-#endif
diff --git a/src/extra/xz/common/vli_decoder.c b/src/extra/xz/common/vli_decoder.c
deleted file mode 100644
index c181828..0000000
--- a/src/extra/xz/common/vli_decoder.c
+++ /dev/null
@@ -1,86 +0,0 @@
-///////////////////////////////////////////////////////////////////////////////
-//
-/// \file       vli_decoder.c
-/// \brief      Decodes variable-length integers
-//
-//  Author:     Lasse Collin
-//
-//  This file has been put into the public domain.
-//  You can do whatever you want with this file.
-//
-///////////////////////////////////////////////////////////////////////////////
-
-#include "common.h"
-
-
-extern LZMA_API(lzma_ret)
-lzma_vli_decode(lzma_vli *restrict vli, size_t *vli_pos,
-		const uint8_t *restrict in, size_t *restrict in_pos,
-		size_t in_size)
-{
-	// If we haven't been given vli_pos, work in single-call mode.
-	size_t vli_pos_internal = 0;
-	if (vli_pos == NULL) {
-		vli_pos = &vli_pos_internal;
-		*vli = 0;
-
-		// If there's no input, use LZMA_DATA_ERROR. This way it is
-		// easy to decode VLIs from buffers that have known size,
-		// and get the correct error code in case the buffer is
-		// too short.
-		if (*in_pos >= in_size)
-			return LZMA_DATA_ERROR;
-
-	} else {
-		// Initialize *vli when starting to decode a new integer.
-		if (*vli_pos == 0)
-			*vli = 0;
-
-		// Validate the arguments.
-		if (*vli_pos >= LZMA_VLI_BYTES_MAX
-				|| (*vli >> (*vli_pos * 7)) != 0)
-			return LZMA_PROG_ERROR;;
-
-		if (*in_pos >= in_size)
-			return LZMA_BUF_ERROR;
-	}
-
-	do {
-		// Read the next byte. Use a temporary variable so that we
-		// can update *in_pos immediately.
-		const uint8_t byte = in[*in_pos];
-		++*in_pos;
-
-		// Add the newly read byte to *vli.
-		*vli += (lzma_vli)(byte & 0x7F) << (*vli_pos * 7);
-		++*vli_pos;
-
-		// Check if this is the last byte of a multibyte integer.
-		if ((byte & 0x80) == 0) {
-			// We don't allow using variable-length integers as
-			// padding i.e. the encoding must use the most the
-			// compact form.
-			if (byte == 0x00 && *vli_pos > 1)
-				return LZMA_DATA_ERROR;
-
-			return vli_pos == &vli_pos_internal
-					? LZMA_OK : LZMA_STREAM_END;
-		}
-
-		// There is at least one more byte coming. If we have already
-		// read maximum number of bytes, the integer is considered
-		// corrupt.
-		//
-		// If we need bigger integers in future, old versions liblzma
-		// will confusingly indicate the file being corrupt istead of
-		// unsupported. I suppose it's still better this way, because
-		// in the foreseeable future (writing this in 2008) the only
-		// reason why files would appear having over 63-bit integers
-		// is that the files are simply corrupt.
-		if (*vli_pos == LZMA_VLI_BYTES_MAX)
-			return LZMA_DATA_ERROR;
-
-	} while (*in_pos < in_size);
-
-	return vli_pos == &vli_pos_internal ? LZMA_DATA_ERROR : LZMA_OK;
-}
diff --git a/src/extra/xz/common/vli_encoder.c b/src/extra/xz/common/vli_encoder.c
deleted file mode 100644
index f864269..0000000
--- a/src/extra/xz/common/vli_encoder.c
+++ /dev/null
@@ -1,69 +0,0 @@
-///////////////////////////////////////////////////////////////////////////////
-//
-/// \file       vli_encoder.c
-/// \brief      Encodes variable-length integers
-//
-//  Author:     Lasse Collin
-//
-//  This file has been put into the public domain.
-//  You can do whatever you want with this file.
-//
-///////////////////////////////////////////////////////////////////////////////
-
-#include "common.h"
-
-
-extern LZMA_API(lzma_ret)
-lzma_vli_encode(lzma_vli vli, size_t *vli_pos,
-		uint8_t *restrict out, size_t *restrict out_pos,
-		size_t out_size)
-{
-	// If we haven't been given vli_pos, work in single-call mode.
-	size_t vli_pos_internal = 0;
-	if (vli_pos == NULL) {
-		vli_pos = &vli_pos_internal;
-
-		// In single-call mode, we expect that the caller has
-		// reserved enough output space.
-		if (*out_pos >= out_size)
-			return LZMA_PROG_ERROR;
-	} else {
-		// This never happens when we are called by liblzma, but
-		// may happen if called directly from an application.
-		if (*out_pos >= out_size)
-			return LZMA_BUF_ERROR;
-	}
-
-	// Validate the arguments.
-	if (*vli_pos >= LZMA_VLI_BYTES_MAX || vli > LZMA_VLI_MAX)
-		return LZMA_PROG_ERROR;
-
-	// Shift vli so that the next bits to encode are the lowest. In
-	// single-call mode this never changes vli since *vli_pos is zero.
-	vli >>= *vli_pos * 7;
-
-	// Write the non-last bytes in a loop.
-	while (vli >= 0x80) {
-		// We don't need *vli_pos during this function call anymore,
-		// but update it here so that it is ready if we need to
-		// return before the whole integer has been decoded.
-		++*vli_pos;
-		assert(*vli_pos < LZMA_VLI_BYTES_MAX);
-
-		// Write the next byte.
-		out[*out_pos] = (uint8_t)(vli) | 0x80;
-		vli >>= 7;
-
-		if (++*out_pos == out_size)
-			return vli_pos == &vli_pos_internal
-					? LZMA_PROG_ERROR : LZMA_OK;
-	}
-
-	// Write the last byte.
-	out[*out_pos] = (uint8_t)(vli);
-	++*out_pos;
-	++*vli_pos;
-
-	return vli_pos == &vli_pos_internal ? LZMA_OK : LZMA_STREAM_END;
-
-}
diff --git a/src/extra/xz/common/vli_size.c b/src/extra/xz/common/vli_size.c
deleted file mode 100644
index ec1b4fa..0000000
--- a/src/extra/xz/common/vli_size.c
+++ /dev/null
@@ -1,30 +0,0 @@
-///////////////////////////////////////////////////////////////////////////////
-//
-/// \file       vli_size.c
-/// \brief      Calculates the encoded size of a variable-length integer
-//
-//  Author:     Lasse Collin
-//
-//  This file has been put into the public domain.
-//  You can do whatever you want with this file.
-//
-///////////////////////////////////////////////////////////////////////////////
-
-#include "common.h"
-
-
-extern LZMA_API(uint32_t)
-lzma_vli_size(lzma_vli vli)
-{
-	if (vli > LZMA_VLI_MAX)
-		return 0;
-
-	uint32_t i = 0;
-	do {
-		vli >>= 7;
-		++i;
-	} while (vli != 0);
-
-	assert(i <= LZMA_VLI_BYTES_MAX);
-	return i;
-}
diff --git a/src/extra/xz/delta/delta_common.c b/src/extra/xz/delta/delta_common.c
deleted file mode 100644
index 930ad21..0000000
--- a/src/extra/xz/delta/delta_common.c
+++ /dev/null
@@ -1,70 +0,0 @@
-///////////////////////////////////////////////////////////////////////////////
-//
-/// \file       delta_common.c
-/// \brief      Common stuff for Delta encoder and decoder
-//
-//  Author:     Lasse Collin
-//
-//  This file has been put into the public domain.
-//  You can do whatever you want with this file.
-//
-///////////////////////////////////////////////////////////////////////////////
-
-#include "delta_common.h"
-#include "delta_private.h"
-
-
-static void
-delta_coder_end(lzma_coder *coder, lzma_allocator *allocator)
-{
-	lzma_next_end(&coder->next, allocator);
-	lzma_free(coder, allocator);
-	return;
-}
-
-
-extern lzma_ret
-lzma_delta_coder_init(lzma_next_coder *next, lzma_allocator *allocator,
-		const lzma_filter_info *filters)
-{
-	// Allocate memory for the decoder if needed.
-	if (next->coder == NULL) {
-		next->coder = lzma_alloc(sizeof(lzma_coder), allocator);
-		if (next->coder == NULL)
-			return LZMA_MEM_ERROR;
-
-		// End function is the same for encoder and decoder.
-		next->end = &delta_coder_end;
-		next->coder->next = LZMA_NEXT_CODER_INIT;
-	}
-
-	// Validate the options.
-	if (lzma_delta_coder_memusage(filters[0].options) == UINT64_MAX)
-		return LZMA_OPTIONS_ERROR;
-
-	// Set the delta distance.
-	const lzma_options_delta *opt = filters[0].options;
-	next->coder->distance = opt->dist;
-
-	// Initialize the rest of the variables.
-	next->coder->pos = 0;
-	memzero(next->coder->history, LZMA_DELTA_DIST_MAX);
-
-	// Initialize the next decoder in the chain, if any.
-	return lzma_next_filter_init(&next->coder->next,
-			allocator, filters + 1);
-}
-
-
-extern uint64_t
-lzma_delta_coder_memusage(const void *options)
-{
-	const lzma_options_delta *opt = options;
-
-	if (opt == NULL || opt->type != LZMA_DELTA_TYPE_BYTE
-			|| opt->dist < LZMA_DELTA_DIST_MIN
-			|| opt->dist > LZMA_DELTA_DIST_MAX)
-		return UINT64_MAX;
-
-	return sizeof(lzma_coder);
-}
diff --git a/src/extra/xz/delta/delta_common.h b/src/extra/xz/delta/delta_common.h
deleted file mode 100644
index 7e7e1ba..0000000
--- a/src/extra/xz/delta/delta_common.h
+++ /dev/null
@@ -1,20 +0,0 @@
-///////////////////////////////////////////////////////////////////////////////
-//
-/// \file       delta_common.h
-/// \brief      Common stuff for Delta encoder and decoder
-//
-//  Author:     Lasse Collin
-//
-//  This file has been put into the public domain.
-//  You can do whatever you want with this file.
-//
-///////////////////////////////////////////////////////////////////////////////
-
-#ifndef LZMA_DELTA_COMMON_H
-#define LZMA_DELTA_COMMON_H
-
-#include "common.h"
-
-extern uint64_t lzma_delta_coder_memusage(const void *options);
-
-#endif
diff --git a/src/extra/xz/delta/delta_decoder.c b/src/extra/xz/delta/delta_decoder.c
deleted file mode 100644
index 2cf60d5..0000000
--- a/src/extra/xz/delta/delta_decoder.c
+++ /dev/null
@@ -1,76 +0,0 @@
-///////////////////////////////////////////////////////////////////////////////
-//
-/// \file       delta_decoder.c
-/// \brief      Delta filter decoder
-//
-//  Author:     Lasse Collin
-//
-//  This file has been put into the public domain.
-//  You can do whatever you want with this file.
-//
-///////////////////////////////////////////////////////////////////////////////
-
-#include "delta_decoder.h"
-#include "delta_private.h"
-
-
-static void
-decode_buffer(lzma_coder *coder, uint8_t *buffer, size_t size)
-{
-	const size_t distance = coder->distance;
-
-	for (size_t i = 0; i < size; ++i) {
-		buffer[i] += coder->history[(distance + coder->pos) & 0xFF];
-		coder->history[coder->pos-- & 0xFF] = buffer[i];
-	}
-}
-
-
-static lzma_ret
-delta_decode(lzma_coder *coder, lzma_allocator *allocator,
-		const uint8_t *restrict in, size_t *restrict in_pos,
-		size_t in_size, uint8_t *restrict out,
-		size_t *restrict out_pos, size_t out_size, lzma_action action)
-{
-	assert(coder->next.code != NULL);
-
-	const size_t out_start = *out_pos;
-
-	const lzma_ret ret = coder->next.code(coder->next.coder, allocator,
-			in, in_pos, in_size, out, out_pos, out_size,
-			action);
-
-	decode_buffer(coder, out + out_start, *out_pos - out_start);
-
-	return ret;
-}
-
-
-extern lzma_ret
-lzma_delta_decoder_init(lzma_next_coder *next, lzma_allocator *allocator,
-		const lzma_filter_info *filters)
-{
-	next->code = &delta_decode;
-	return lzma_delta_coder_init(next, allocator, filters);
-}
-
-
-extern lzma_ret
-lzma_delta_props_decode(void **options, lzma_allocator *allocator,
-		const uint8_t *props, size_t props_size)
-{
-	if (props_size != 1)
-		return LZMA_OPTIONS_ERROR;
-
-	lzma_options_delta *opt
-			= lzma_alloc(sizeof(lzma_options_delta), allocator);
-	if (opt == NULL)
-		return LZMA_MEM_ERROR;
-
-	opt->type = LZMA_DELTA_TYPE_BYTE;
-	opt->dist = props[0] + 1;
-
-	*options = opt;
-
-	return LZMA_OK;
-}
diff --git a/src/extra/xz/delta/delta_decoder.h b/src/extra/xz/delta/delta_decoder.h
deleted file mode 100644
index ae89acc..0000000
--- a/src/extra/xz/delta/delta_decoder.h
+++ /dev/null
@@ -1,25 +0,0 @@
-///////////////////////////////////////////////////////////////////////////////
-//
-/// \file       delta_decoder.h
-/// \brief      Delta filter decoder
-//
-//  Author:     Lasse Collin
-//
-//  This file has been put into the public domain.
-//  You can do whatever you want with this file.
-//
-///////////////////////////////////////////////////////////////////////////////
-
-#ifndef LZMA_DELTA_DECODER_H
-#define LZMA_DELTA_DECODER_H
-
-#include "delta_common.h"
-
-extern lzma_ret lzma_delta_decoder_init(lzma_next_coder *next,
-		lzma_allocator *allocator, const lzma_filter_info *filters);
-
-extern lzma_ret lzma_delta_props_decode(
-		void **options, lzma_allocator *allocator,
-		const uint8_t *props, size_t props_size);
-
-#endif
diff --git a/src/extra/xz/delta/delta_encoder.c b/src/extra/xz/delta/delta_encoder.c
deleted file mode 100644
index 15c7951..0000000
--- a/src/extra/xz/delta/delta_encoder.c
+++ /dev/null
@@ -1,121 +0,0 @@
-///////////////////////////////////////////////////////////////////////////////
-//
-/// \file       delta_encoder.c
-/// \brief      Delta filter encoder
-//
-//  Author:     Lasse Collin
-//
-//  This file has been put into the public domain.
-//  You can do whatever you want with this file.
-//
-///////////////////////////////////////////////////////////////////////////////
-
-#include "delta_encoder.h"
-#include "delta_private.h"
-
-
-/// Copies and encodes the data at the same time. This is used when Delta
-/// is the first filter in the chain (and thus the last filter in the
-/// encoder's filter stack).
-static void
-copy_and_encode(lzma_coder *coder,
-		const uint8_t *restrict in, uint8_t *restrict out, size_t size)
-{
-	const size_t distance = coder->distance;
-
-	for (size_t i = 0; i < size; ++i) {
-		const uint8_t tmp = coder->history[
-				(distance + coder->pos) & 0xFF];
-		coder->history[coder->pos-- & 0xFF] = in[i];
-		out[i] = in[i] - tmp;
-	}
-}
-
-
-/// Encodes the data in place. This is used when we are the last filter
-/// in the chain (and thus non-last filter in the encoder's filter stack).
-static void
-encode_in_place(lzma_coder *coder, uint8_t *buffer, size_t size)
-{
-	const size_t distance = coder->distance;
-
-	for (size_t i = 0; i < size; ++i) {
-		const uint8_t tmp = coder->history[
-				(distance + coder->pos) & 0xFF];
-		coder->history[coder->pos-- & 0xFF] = buffer[i];
-		buffer[i] -= tmp;
-	}
-}
-
-
-static lzma_ret
-delta_encode(lzma_coder *coder, lzma_allocator *allocator,
-		const uint8_t *restrict in, size_t *restrict in_pos,
-		size_t in_size, uint8_t *restrict out,
-		size_t *restrict out_pos, size_t out_size, lzma_action action)
-{
-	lzma_ret ret;
-
-	if (coder->next.code == NULL) {
-		const size_t in_avail = in_size - *in_pos;
-		const size_t out_avail = out_size - *out_pos;
-		const size_t size = my_min(in_avail, out_avail);
-
-		copy_and_encode(coder, in + *in_pos, out + *out_pos, size);
-
-		*in_pos += size;
-		*out_pos += size;
-
-		ret = action != LZMA_RUN && *in_pos == in_size
-				? LZMA_STREAM_END : LZMA_OK;
-
-	} else {
-		const size_t out_start = *out_pos;
-
-		ret = coder->next.code(coder->next.coder, allocator,
-				in, in_pos, in_size, out, out_pos, out_size,
-				action);
-
-		encode_in_place(coder, out + out_start, *out_pos - out_start);
-	}
-
-	return ret;
-}
-
-
-static lzma_ret
-delta_encoder_update(lzma_coder *coder, lzma_allocator *allocator,
-		const lzma_filter *filters_null lzma_attribute((__unused__)),
-		const lzma_filter *reversed_filters)
-{
-	// Delta doesn't and will never support changing the options in
-	// the middle of encoding. If the app tries to change them, we
-	// simply ignore them.
-	return lzma_next_filter_update(
-			&coder->next, allocator, reversed_filters + 1);
-}
-
-
-extern lzma_ret
-lzma_delta_encoder_init(lzma_next_coder *next, lzma_allocator *allocator,
-		const lzma_filter_info *filters)
-{
-	next->code = &delta_encode;
-	next->update = &delta_encoder_update;
-	return lzma_delta_coder_init(next, allocator, filters);
-}
-
-
-extern lzma_ret
-lzma_delta_props_encode(const void *options, uint8_t *out)
-{
-	// The caller must have already validated the options, so it's
-	// LZMA_PROG_ERROR if they are invalid.
-	if (lzma_delta_coder_memusage(options) == UINT64_MAX)
-		return LZMA_PROG_ERROR;
-
-	const lzma_options_delta *opt = options;
-	out[0] = opt->dist - LZMA_DELTA_DIST_MIN;
-
-	return LZMA_OK;
-}
diff --git a/src/extra/xz/delta/delta_encoder.h b/src/extra/xz/delta/delta_encoder.h
deleted file mode 100644
index a447862..0000000
--- a/src/extra/xz/delta/delta_encoder.h
+++ /dev/null
@@ -1,23 +0,0 @@
-///////////////////////////////////////////////////////////////////////////////
-//
-/// \file       delta_encoder.h
-/// \brief      Delta filter encoder
-//
-//  Author:     Lasse Collin
-//
-//  This file has been put into the public domain.
-//  You can do whatever you want with this file.
-//
-///////////////////////////////////////////////////////////////////////////////
-
-#ifndef LZMA_DELTA_ENCODER_H
-#define LZMA_DELTA_ENCODER_H
-
-#include "delta_common.h"
-
-extern lzma_ret lzma_delta_encoder_init(lzma_next_coder *next,
-		lzma_allocator *allocator, const lzma_filter_info *filters);
-
-extern lzma_ret lzma_delta_props_encode(const void *options, uint8_t *out);
-
-#endif
diff --git a/src/extra/xz/delta/delta_private.h b/src/extra/xz/delta/delta_private.h
deleted file mode 100644
index 62b7fed..0000000
--- a/src/extra/xz/delta/delta_private.h
+++ /dev/null
@@ -1,37 +0,0 @@
-///////////////////////////////////////////////////////////////////////////////
-//
-/// \file       delta_private.h
-/// \brief      Private common stuff for Delta encoder and decoder
-//
-//  Author:     Lasse Collin
-//
-//  This file has been put into the public domain.
-//  You can do whatever you want with this file.
-//
-///////////////////////////////////////////////////////////////////////////////
-
-#ifndef LZMA_DELTA_PRIVATE_H
-#define LZMA_DELTA_PRIVATE_H
-
-#include "delta_common.h"
-
-struct lzma_coder_s {
-	/// Next coder in the chain
-	lzma_next_coder next;
-
-	/// Delta distance
-	size_t distance;
-
-	/// Position in history[]
-	uint8_t pos;
-
-	/// Buffer to hold history of the original data
-	uint8_t history[LZMA_DELTA_DIST_MAX];
-};
-
-
-extern lzma_ret lzma_delta_coder_init(
-		lzma_next_coder *next, lzma_allocator *allocator,
-		const lzma_filter_info *filters);
-
-#endif
diff --git a/src/extra/xz/lz/lz_decoder.c b/src/extra/xz/lz/lz_decoder.c
deleted file mode 100644
index d74085c..0000000
--- a/src/extra/xz/lz/lz_decoder.c
+++ /dev/null
@@ -1,300 +0,0 @@
-///////////////////////////////////////////////////////////////////////////////
-//
-/// \file       lz_decoder.c
-/// \brief      LZ out window
-///
-//  Authors:    Igor Pavlov
-//              Lasse Collin
-//
-//  This file has been put into the public domain.
-//  You can do whatever you want with this file.
-//
-///////////////////////////////////////////////////////////////////////////////
-
-// liblzma supports multiple LZ77-based filters. The LZ part is shared
-// between these filters. The LZ code takes care of dictionary handling
-// and passing the data between filters in the chain. The filter-specific
-// part decodes from the input buffer to the dictionary.
-
-
-#include "lz_decoder.h"
-
-
-struct lzma_coder_s {
-	/// Dictionary (history buffer)
-	lzma_dict dict;
-
-	/// The actual LZ-based decoder e.g. LZMA
-	lzma_lz_decoder lz;
-
-	/// Next filter in the chain, if any. Note that LZMA and LZMA2 are
-	/// only allowed as the last filter, but the long-range filter in
-	/// future can be in the middle of the chain.
-	lzma_next_coder next;
-
-	/// True if the next filter in the chain has returned LZMA_STREAM_END.
-	bool next_finished;
-
-	/// True if the LZ decoder (e.g. LZMA) has detected end of payload
-	/// marker. This may become true before next_finished becomes true.
-	bool this_finished;
-
-	/// Temporary buffer needed when the LZ-based filter is not the last
-	/// filter in the chain. The output of the next filter is first
-	/// decoded into buffer[], which is then used as input for the actual
-	/// LZ-based decoder.
-	struct {
-		size_t pos;
-		size_t size;
-		uint8_t buffer[LZMA_BUFFER_SIZE];
-	} temp;
-};
-
-
-static void
-lz_decoder_reset(lzma_coder *coder)
-{
-	coder->dict.pos = 0;
-	coder->dict.full = 0;
-	coder->dict.buf[coder->dict.size - 1] = '\0';
-	coder->dict.need_reset = false;
-	return;
-}
-
-
-static lzma_ret
-decode_buffer(lzma_coder *coder,
-		const uint8_t *restrict in, size_t *restrict in_pos,
-		size_t in_size, uint8_t *restrict out,
-		size_t *restrict out_pos, size_t out_size)
-{
-	while (true) {
-		// Wrap the dictionary if needed.
-		if (coder->dict.pos == coder->dict.size)
-			coder->dict.pos = 0;
-
-		// Store the current dictionary position. It is needed to know
-		// where to start copying to the out[] buffer.
-		const size_t dict_start = coder->dict.pos;
-
-		// Calculate how much we allow coder->lz.code() to decode.
-		// It must not decode past the end of the dictionary
-		// buffer, and we don't want it to decode more than is
-		// actually needed to fill the out[] buffer.
-		coder->dict.limit = coder->dict.pos
-				+ my_min(out_size - *out_pos,
-					coder->dict.size - coder->dict.pos);
-
-		// Call the coder->lz.code() to do the actual decoding.
-		const lzma_ret ret = coder->lz.code(
-				coder->lz.coder, &coder->dict,
-				in, in_pos, in_size);
-
-		// Copy the decoded data from the dictionary to the out[]
-		// buffer.
-		const size_t copy_size = coder->dict.pos - dict_start;
-		assert(copy_size <= out_size - *out_pos);
-		memcpy(out + *out_pos, coder->dict.buf + dict_start,
-				copy_size);
-		*out_pos += copy_size;
-
-		// Reset the dictionary if so requested by coder->lz.code().
-		if (coder->dict.need_reset) {
-			lz_decoder_reset(coder);
-
-			// Since we reset dictionary, we don't check if
-			// dictionary became full.
-			if (ret != LZMA_OK || *out_pos == out_size)
-				return ret;
-		} else {
-			// Return if everything got decoded or an error
-			// occurred, or if there's no more data to decode.
-			//
-			// Note that detecting if there's something to decode
-			// is done by looking if dictionary become full
-			// instead of looking if *in_pos == in_size. This
-			// is because it is possible that all the input was
-			// consumed already but some data is pending to be
-			// written to the dictionary.
-			if (ret != LZMA_OK || *out_pos == out_size
-					|| coder->dict.pos < coder->dict.size)
-				return ret;
-		}
-	}
-}
-
-
-static lzma_ret
-lz_decode(lzma_coder *coder,
-		lzma_allocator *allocator lzma_attribute((__unused__)),
-		const uint8_t *restrict in, size_t *restrict in_pos,
-		size_t in_size, uint8_t *restrict out,
-		size_t *restrict out_pos, size_t out_size,
-		lzma_action action)
-{
-	if (coder->next.code == NULL)
-		return decode_buffer(coder, in, in_pos, in_size,
-				out, out_pos, out_size);
-
-	// We aren't the last coder in the chain, we need to decode
-	// our input to a temporary buffer.
-	while (*out_pos < out_size) {
-		// Fill the temporary buffer if it is empty.
-		if (!coder->next_finished
-				&& coder->temp.pos == coder->temp.size) {
-			coder->temp.pos = 0;
-			coder->temp.size = 0;
-
-			const lzma_ret ret = coder->next.code(
-					coder->next.coder,
-					allocator, in, in_pos, in_size,
-					coder->temp.buffer, &coder->temp.size,
-					LZMA_BUFFER_SIZE, action);
-
-			if (ret == LZMA_STREAM_END)
-				coder->next_finished = true;
-			else if (ret != LZMA_OK || coder->temp.size == 0)
-				return ret;
-		}
-
-		if (coder->this_finished) {
-			if (coder->temp.size != 0)
-				return LZMA_DATA_ERROR;
-
-			if (coder->next_finished)
-				return LZMA_STREAM_END;
-
-			return LZMA_OK;
-		}
-
-		const lzma_ret ret = decode_buffer(coder, coder->temp.buffer,
-				&coder->temp.pos, coder->temp.size,
-				out, out_pos, out_size);
-
-		if (ret == LZMA_STREAM_END)
-			coder->this_finished = true;
-		else if (ret != LZMA_OK)
-			return ret;
-		else if (coder->next_finished && *out_pos < out_size)
-			return LZMA_DATA_ERROR;
-	}
-
-	return LZMA_OK;
-}
-
-
-static void
-lz_decoder_end(lzma_coder *coder, lzma_allocator *allocator)
-{
-	lzma_next_end(&coder->next, allocator);
-	lzma_free(coder->dict.buf, allocator);
-
-	if (coder->lz.end != NULL)
-		coder->lz.end(coder->lz.coder, allocator);
-	else
-		lzma_free(coder->lz.coder, allocator);
-
-	lzma_free(coder, allocator);
-	return;
-}
-
-
-extern lzma_ret
-lzma_lz_decoder_init(lzma_next_coder *next, lzma_allocator *allocator,
-		const lzma_filter_info *filters,
-		lzma_ret (*lz_init)(lzma_lz_decoder *lz,
-			lzma_allocator *allocator, const void *options,
-			lzma_lz_options *lz_options))
-{
-	// Allocate the base structure if it isn't already allocated.
-	if (next->coder == NULL) {
-		next->coder = lzma_alloc(sizeof(lzma_coder), allocator);
-		if (next->coder == NULL)
-			return LZMA_MEM_ERROR;
-
-		next->code = &lz_decode;
-		next->end = &lz_decoder_end;
-
-		next->coder->dict.buf = NULL;
-		next->coder->dict.size = 0;
-		next->coder->lz = LZMA_LZ_DECODER_INIT;
-		next->coder->next = LZMA_NEXT_CODER_INIT;
-	}
-
-	// Allocate and initialize the LZ-based decoder. It will also give
-	// us the dictionary size.
-	lzma_lz_options lz_options;
-	return_if_error(lz_init(&next->coder->lz, allocator,
-			filters[0].options, &lz_options));
-
-	// If the dictionary size is very small, increase it to 4096 bytes.
-	// This is to prevent constant wrapping of the dictionary, which
-	// would slow things down. The downside is that since we don't check
-	// separately for the real dictionary size, we may happily accept
-	// corrupt files.
-	if (lz_options.dict_size < 4096)
-		lz_options.dict_size = 4096;
-
-	// Make dictionary size a multipe of 16. Some LZ-based decoders like
-	// LZMA use the lowest bits lzma_dict.pos to know the alignment of the
-	// data. Aligned buffer is also good when memcpying from the
-	// dictionary to the output buffer, since applications are
-	// recommended to give aligned buffers to liblzma.
-	//
-	// Avoid integer overflow.
-	if (lz_options.dict_size > SIZE_MAX - 15)
-		return LZMA_MEM_ERROR;
-
-	lz_options.dict_size = (lz_options.dict_size + 15) & ~((size_t)(15));
-
-	// Allocate and initialize the dictionary.
-	if (next->coder->dict.size != lz_options.dict_size) {
-		lzma_free(next->coder->dict.buf, allocator);
-		next->coder->dict.buf
-				= lzma_alloc(lz_options.dict_size, allocator);
-		if (next->coder->dict.buf == NULL)
-			return LZMA_MEM_ERROR;
-
-		next->coder->dict.size = lz_options.dict_size;
-	}
-
-	lz_decoder_reset(next->coder);
-
-	// Use the preset dictionary if it was given to us.
-	if (lz_options.preset_dict != NULL
-			&& lz_options.preset_dict_size > 0) {
-		// If the preset dictionary is bigger than the actual
-		// dictionary, copy only the tail.
-		const size_t copy_size = my_min(lz_options.preset_dict_size,
-				lz_options.dict_size);
-		const size_t offset = lz_options.preset_dict_size - copy_size;
-		memcpy(next->coder->dict.buf, lz_options.preset_dict + offset,
-				copy_size);
-		next->coder->dict.pos = copy_size;
-		next->coder->dict.full = copy_size;
-	}
-
-	// Miscellaneous initializations
-	next->coder->next_finished = false;
-	next->coder->this_finished = false;
-	next->coder->temp.pos = 0;
-	next->coder->temp.size = 0;
-
-	// Initialize the next filter in the chain, if any.
-	return lzma_next_filter_init(&next->coder->next, allocator,
-			filters + 1);
-}
-
-
-extern uint64_t
-lzma_lz_decoder_memusage(size_t dictionary_size)
-{
-	return sizeof(lzma_coder) + (uint64_t)(dictionary_size);
-}
-
-
-extern void
-lzma_lz_decoder_uncompressed(lzma_coder *coder, lzma_vli uncompressed_size)
-{
-	coder->lz.set_uncompressed(coder->lz.coder, uncompressed_size);
-}
diff --git a/src/extra/xz/lz/lz_decoder.h b/src/extra/xz/lz/lz_decoder.h
deleted file mode 100644
index 7266e80..0000000
--- a/src/extra/xz/lz/lz_decoder.h
+++ /dev/null
@@ -1,234 +0,0 @@
-///////////////////////////////////////////////////////////////////////////////
-//
-/// \file       lz_decoder.h
-/// \brief      LZ out window
-///
-//  Authors:    Igor Pavlov
-//              Lasse Collin
-//
-//  This file has been put into the public domain.
-//  You can do whatever you want with this file.
-//
-///////////////////////////////////////////////////////////////////////////////
-
-#ifndef LZMA_LZ_DECODER_H
-#define LZMA_LZ_DECODER_H
-
-#include "common.h"
-
-
-typedef struct {
-	/// Pointer to the dictionary buffer. It can be an allocated buffer
-	/// internal to liblzma, or it can a be a buffer given by the
-	/// application when in single-call mode (not implemented yet).
-	uint8_t *buf;
-
-	/// Write position in dictionary. The next byte will be written to
-	/// buf[pos].
-	size_t pos;
-
-	/// Indicates how full the dictionary is. This is used by
-	/// dict_is_distance_valid() to detect corrupt files that would
-	/// read beyond the beginning of the dictionary.
-	size_t full;
-
-	/// Write limit
-	size_t limit;
-
-	/// Size of the dictionary
-	size_t size;
-
-	/// True when dictionary should be reset before decoding more data.
-	bool need_reset;
-
-} lzma_dict;
-
-
-typedef struct {
-	size_t dict_size;
-	const uint8_t *preset_dict;
-	size_t preset_dict_size;
-} lzma_lz_options;
-
-
-typedef struct {
-	/// Data specific to the LZ-based decoder
-	lzma_coder *coder;
-
-	/// Function to decode from in[] to *dict
-	lzma_ret (*code)(lzma_coder *restrict coder,
-			lzma_dict *restrict dict, const uint8_t *restrict in,
-			size_t *restrict in_pos, size_t in_size);
-
-	void (*reset)(lzma_coder *coder, const void *options);
-
-	/// Set the uncompressed size
-	void (*set_uncompressed)(lzma_coder *coder,
-			lzma_vli uncompressed_size);
-
-	/// Free allocated resources
-	void (*end)(lzma_coder *coder, lzma_allocator *allocator);
-
-} lzma_lz_decoder;
-
-
-#define LZMA_LZ_DECODER_INIT \
-	(lzma_lz_decoder){ \
-		.coder = NULL, \
-		.code = NULL, \
-		.reset = NULL, \
-		.set_uncompressed = NULL, \
-		.end = NULL, \
-	}
-
-
-extern lzma_ret lzma_lz_decoder_init(lzma_next_coder *next,
-		lzma_allocator *allocator, const lzma_filter_info *filters,
-		lzma_ret (*lz_init)(lzma_lz_decoder *lz,
-			lzma_allocator *allocator, const void *options,
-			lzma_lz_options *lz_options));
-
-extern uint64_t lzma_lz_decoder_memusage(size_t dictionary_size);
-
-extern void lzma_lz_decoder_uncompressed(
-		lzma_coder *coder, lzma_vli uncompressed_size);
-
-
-//////////////////////
-// Inline functions //
-//////////////////////
-
-/// Get a byte from the history buffer.
-static inline uint8_t
-dict_get(const lzma_dict *const dict, const uint32_t distance)
-{
-	return dict->buf[dict->pos - distance - 1
-			+ (distance < dict->pos ? 0 : dict->size)];
-}
-
-
-/// Test if dictionary is empty.
-static inline bool
-dict_is_empty(const lzma_dict *const dict)
-{
-	return dict->full == 0;
-}
-
-
-/// Validate the match distance
-static inline bool
-dict_is_distance_valid(const lzma_dict *const dict, const size_t distance)
-{
-	return dict->full > distance;
-}
-
-
-/// Repeat *len bytes at distance.
-static inline bool
-dict_repeat(lzma_dict *dict, uint32_t distance, uint32_t *len)
-{
-	// Don't write past the end of the dictionary.
-	const size_t dict_avail = dict->limit - dict->pos;
-	uint32_t left = my_min(dict_avail, *len);
-	*len -= left;
-
-	// Repeat a block of data from the history. Because memcpy() is faster
-	// than copying byte by byte in a loop, the copying process gets split
-	// into three cases.
-	if (distance < left) {
-		// Source and target areas overlap, thus we can't use
-		// memcpy() nor even memmove() safely.
-		do {
-			dict->buf[dict->pos] = dict_get(dict, distance);
-			++dict->pos;
-		} while (--left > 0);
-
-	} else if (distance < dict->pos) {
-		// The easiest and fastest case
-		memcpy(dict->buf + dict->pos,
-				dict->buf + dict->pos - distance - 1,
-				left);
-		dict->pos += left;
-
-	} else {
-		// The bigger the dictionary, the more rare this
-		// case occurs. We need to "wrap" the dict, thus
-		// we might need two memcpy() to copy all the data.
-		assert(dict->full == dict->size);
-		const uint32_t copy_pos
-				= dict->pos - distance - 1 + dict->size;
-		uint32_t copy_size = dict->size - copy_pos;
-
-		if (copy_size < left) {
-			memmove(dict->buf + dict->pos, dict->buf + copy_pos,
-					copy_size);
-			dict->pos += copy_size;
-			copy_size = left - copy_size;
-			memcpy(dict->buf + dict->pos, dict->buf, copy_size);
-			dict->pos += copy_size;
-		} else {
-			memmove(dict->buf + dict->pos, dict->buf + copy_pos,
-					left);
-			dict->pos += left;
-		}
-	}
-
-	// Update how full the dictionary is.
-	if (dict->full < dict->pos)
-		dict->full = dict->pos;
-
-	return unlikely(*len != 0);
-}
-
-
-/// Puts one byte into the dictionary. Returns true if the dictionary was
-/// already full and the byte couldn't be added.
-static inline bool
-dict_put(lzma_dict *dict, uint8_t byte)
-{
-	if (unlikely(dict->pos == dict->limit))
-		return true;
-
-	dict->buf[dict->pos++] = byte;
-
-	if (dict->pos > dict->full)
-		dict->full = dict->pos;
-
-	return false;
-}
-
-
-/// Copies arbitrary amount of data into the dictionary.
-static inline void
-dict_write(lzma_dict *restrict dict, const uint8_t *restrict in,
-		size_t *restrict in_pos, size_t in_size,
-		size_t *restrict left)
-{
-	// NOTE: If we are being given more data than the size of the
-	// dictionary, it could be possible to optimize the LZ decoder
-	// so that not everything needs to go through the dictionary.
-	// This shouldn't be very common thing in practice though, and
-	// the slowdown of one extra memcpy() isn't bad compared to how
-	// much time it would have taken if the data were compressed.
-
-	if (in_size - *in_pos > *left)
-		in_size = *in_pos + *left;
-
-	*left -= lzma_bufcpy(in, in_pos, in_size,
-			dict->buf, &dict->pos, dict->limit);
-
-	if (dict->pos > dict->full)
-		dict->full = dict->pos;
-
-	return;
-}
-
-
-static inline void
-dict_reset(lzma_dict *dict)
-{
-	dict->need_reset = true;
-	return;
-}
-
-#endif
diff --git a/src/extra/xz/lz/lz_encoder.c b/src/extra/xz/lz/lz_encoder.c
deleted file mode 100644
index e240696..0000000
--- a/src/extra/xz/lz/lz_encoder.c
+++ /dev/null
@@ -1,583 +0,0 @@
-///////////////////////////////////////////////////////////////////////////////
-//
-/// \file       lz_encoder.c
-/// \brief      LZ in window
-///
-//  Authors:    Igor Pavlov
-//              Lasse Collin
-//
-//  This file has been put into the public domain.
-//  You can do whatever you want with this file.
-//
-///////////////////////////////////////////////////////////////////////////////
-
-#include "lz_encoder.h"
-#include "lz_encoder_hash.h"
-
-// See lz_encoder_hash.h. This is a bit hackish but avoids making
-// endianness a conditional in makefiles.
-#if defined(WORDS_BIGENDIAN) && !defined(HAVE_SMALL)
-#	include "lz_encoder_hash_table.h"
-#endif
-
-
-struct lzma_coder_s {
-	/// LZ-based encoder e.g. LZMA
-	lzma_lz_encoder lz;
-
-	/// History buffer and match finder
-	lzma_mf mf;
-
-	/// Next coder in the chain
-	lzma_next_coder next;
-};
-
-
-/// \brief      Moves the data in the input window to free space for new data
-///
-/// mf->buffer is a sliding input window, which keeps mf->keep_size_before
-/// bytes of input history available all the time. Now and then we need to
-/// "slide" the buffer to make space for the new data to the end of the
-/// buffer. At the same time, data older than keep_size_before is dropped.
-///
-static void
-move_window(lzma_mf *mf)
-{
-	// Align the move to a multiple of 16 bytes. Some LZ-based encoders
-	// like LZMA use the lowest bits of mf->read_pos to know the
-	// alignment of the uncompressed data. We also get better speed
-	// for memmove() with aligned buffers.
-	assert(mf->read_pos > mf->keep_size_before);
-	const uint32_t move_offset
-		= (mf->read_pos - mf->keep_size_before) & ~UINT32_C(15);
-
-	assert(mf->write_pos > move_offset);
-	const size_t move_size = mf->write_pos - move_offset;
-
-	assert(move_offset + move_size <= mf->size);
-
-	memmove(mf->buffer, mf->buffer + move_offset, move_size);
-
-	mf->offset += move_offset;
-	mf->read_pos -= move_offset;
-	mf->read_limit -= move_offset;
-	mf->write_pos -= move_offset;
-
-	return;
-}
-
-
-/// \brief      Tries to fill the input window (mf->buffer)
-///
-/// If we are the last encoder in the chain, our input data is in in[].
-/// Otherwise we call the next filter in the chain to process in[] and
-/// write its output to mf->buffer.
-///
-/// This function must not be called once it has returned LZMA_STREAM_END.
-///
-static lzma_ret
-fill_window(lzma_coder *coder, lzma_allocator *allocator, const uint8_t *in,
-		size_t *in_pos, size_t in_size, lzma_action action)
-{
-	assert(coder->mf.read_pos <= coder->mf.write_pos);
-
-	// Move the sliding window if needed.
-	if (coder->mf.read_pos >= coder->mf.size - coder->mf.keep_size_after)
-		move_window(&coder->mf);
-
-	// Maybe this is ugly, but lzma_mf uses uint32_t for most things
-	// (which I find cleanest), but we need size_t here when filling
-	// the history window.
-	size_t write_pos = coder->mf.write_pos;
-	lzma_ret ret;
-	if (coder->next.code == NULL) {
-		// Not using a filter, simply memcpy() as much as possible.
-		lzma_bufcpy(in, in_pos, in_size, coder->mf.buffer,
-				&write_pos, coder->mf.size);
-
-		ret = action != LZMA_RUN && *in_pos == in_size
-				? LZMA_STREAM_END : LZMA_OK;
-
-	} else {
-		ret = coder->next.code(coder->next.coder, allocator,
-				in, in_pos, in_size,
-				coder->mf.buffer, &write_pos,
-				coder->mf.size, action);
-	}
-
-	coder->mf.write_pos = write_pos;
-
-	// If end of stream has been reached or flushing completed, we allow
-	// the encoder to process all the input (that is, read_pos is allowed
-	// to reach write_pos). Otherwise we keep keep_size_after bytes
-	// available as prebuffer.
-	if (ret == LZMA_STREAM_END) {
-		assert(*in_pos == in_size);
-		ret = LZMA_OK;
-		coder->mf.action = action;
-		coder->mf.read_limit = coder->mf.write_pos;
-
-	} else if (coder->mf.write_pos > coder->mf.keep_size_after) {
-		// This needs to be done conditionally, because if we got
-		// only little new input, there may be too little input
-		// to do any encoding yet.
-		coder->mf.read_limit = coder->mf.write_pos
-				- coder->mf.keep_size_after;
-	}
-
-	// Restart the match finder after finished LZMA_SYNC_FLUSH.
-	if (coder->mf.pending > 0
-			&& coder->mf.read_pos < coder->mf.read_limit) {
-		// Match finder may update coder->pending and expects it to
-		// start from zero, so use a temporary variable.
-		const size_t pending = coder->mf.pending;
-		coder->mf.pending = 0;
-
-		// Rewind read_pos so that the match finder can hash
-		// the pending bytes.
-		assert(coder->mf.read_pos >= pending);
-		coder->mf.read_pos -= pending;
-
-		// Call the skip function directly instead of using
-		// mf_skip(), since we don't want to touch mf->read_ahead.
-		coder->mf.skip(&coder->mf, pending);
-	}
-
-	return ret;
-}
-
-
-static lzma_ret
-lz_encode(lzma_coder *coder, lzma_allocator *allocator,
-		const uint8_t *restrict in, size_t *restrict in_pos,
-		size_t in_size,
-		uint8_t *restrict out, size_t *restrict out_pos,
-		size_t out_size, lzma_action action)
-{
-	while (*out_pos < out_size
-			&& (*in_pos < in_size || action != LZMA_RUN)) {
-		// Read more data to coder->mf.buffer if needed.
-		if (coder->mf.action == LZMA_RUN && coder->mf.read_pos
-				>= coder->mf.read_limit)
-			return_if_error(fill_window(coder, allocator,
-					in, in_pos, in_size, action));
-
-		// Encode
-		const lzma_ret ret = coder->lz.code(coder->lz.coder,
-				&coder->mf, out, out_pos, out_size);
-		if (ret != LZMA_OK) {
-			// Setting this to LZMA_RUN for cases when we are
-			// flushing. It doesn't matter when finishing or if
-			// an error occurred.
-			coder->mf.action = LZMA_RUN;
-			return ret;
-		}
-	}
-
-	return LZMA_OK;
-}
-
-
-static bool
-lz_encoder_prepare(lzma_mf *mf, lzma_allocator *allocator,
-		const lzma_lz_options *lz_options)
-{
-	// For now, the dictionary size is limited to 1.5 GiB. This may grow
-	// in the future if needed, but it needs a little more work than just
-	// changing this check.
-	if (lz_options->dict_size < LZMA_DICT_SIZE_MIN
-			|| lz_options->dict_size
-				> (UINT32_C(1) << 30) + (UINT32_C(1) << 29)
-			|| lz_options->nice_len > lz_options->match_len_max)
-		return true;
-
-	mf->keep_size_before = lz_options->before_size + lz_options->dict_size;
-
-	mf->keep_size_after = lz_options->after_size
-			+ lz_options->match_len_max;
-
-	// To avoid constant memmove()s, allocate some extra space. Since
-	// memmove()s become more expensive when the size of the buffer
-	// increases, we reserve more space when a large dictionary is
-	// used to make the memmove() calls rarer.
-	//
-	// This works with dictionaries up to about 3 GiB. If bigger
-	// dictionary is wanted, some extra work is needed:
-	//   - Several variables in lzma_mf have to be changed from uint32_t
-	//     to size_t.
-	//   - Memory usage calculation needs something too, e.g. use uint64_t
-	//     for mf->size.
-	uint32_t reserve = lz_options->dict_size / 2;
-	if (reserve > (UINT32_C(1) << 30))
-		reserve /= 2;
-
-	reserve += (lz_options->before_size + lz_options->match_len_max
-			+ lz_options->after_size) / 2 + (UINT32_C(1) << 19);
-
-	const uint32_t old_size = mf->size;
-	mf->size = mf->keep_size_before + reserve + mf->keep_size_after;
-
-	// Deallocate the old history buffer if it exists but has different
-	// size than what is needed now.
-	if (mf->buffer != NULL && old_size != mf->size) {
-		lzma_free(mf->buffer, allocator);
-		mf->buffer = NULL;
-	}
-
-	// Match finder options
-	mf->match_len_max = lz_options->match_len_max;
-	mf->nice_len = lz_options->nice_len;
-
-	// cyclic_size has to stay smaller than 2 Gi. Note that this doesn't
-	// mean limiting dictionary size to less than 2 GiB. With a match
-	// finder that uses multibyte resolution (hashes start at e.g. every
-	// fourth byte), cyclic_size would stay below 2 Gi even when
-	// dictionary size is greater than 2 GiB.
-	//
-	// It would be possible to allow cyclic_size >= 2 Gi, but then we
-	// would need to be careful to use 64-bit types in various places
-	// (size_t could do since we would need bigger than 32-bit address
-	// space anyway). It would also require either zeroing a multigigabyte
-	// buffer at initialization (waste of time and RAM) or allow
-	// normalization in lz_encoder_mf.c to access uninitialized
-	// memory to keep the code simpler. The current way is simple and
-	// still allows pretty big dictionaries, so I don't expect these
-	// limits to change.
-	mf->cyclic_size = lz_options->dict_size + 1;
-
-	// Validate the match finder ID and setup the function pointers.
-	switch (lz_options->match_finder) {
-#ifdef HAVE_MF_HC3
-	case LZMA_MF_HC3:
-		mf->find = &lzma_mf_hc3_find;
-		mf->skip = &lzma_mf_hc3_skip;
-		break;
-#endif
-#ifdef HAVE_MF_HC4
-	case LZMA_MF_HC4:
-		mf->find = &lzma_mf_hc4_find;
-		mf->skip = &lzma_mf_hc4_skip;
-		break;
-#endif
-#ifdef HAVE_MF_BT2
-	case LZMA_MF_BT2:
-		mf->find = &lzma_mf_bt2_find;
-		mf->skip = &lzma_mf_bt2_skip;
-		break;
-#endif
-#ifdef HAVE_MF_BT3
-	case LZMA_MF_BT3:
-		mf->find = &lzma_mf_bt3_find;
-		mf->skip = &lzma_mf_bt3_skip;
-		break;
-#endif
-#ifdef HAVE_MF_BT4
-	case LZMA_MF_BT4:
-		mf->find = &lzma_mf_bt4_find;
-		mf->skip = &lzma_mf_bt4_skip;
-		break;
-#endif
-
-	default:
-		return true;
-	}
-
-	// Calculate the sizes of mf->hash and mf->son and check that
-	// nice_len is big enough for the selected match finder.
-	const uint32_t hash_bytes = lz_options->match_finder & 0x0F;
-	if (hash_bytes > mf->nice_len)
-		return true;
-
-	const bool is_bt = (lz_options->match_finder & 0x10) != 0;
-	uint32_t hs;
-
-	if (hash_bytes == 2) {
-		hs = 0xFFFF;
-	} else {
-		// Round dictionary size up to the next 2^n - 1 so it can
-		// be used as a hash mask.
-		hs = lz_options->dict_size - 1;
-		hs |= hs >> 1;
-		hs |= hs >> 2;
-		hs |= hs >> 4;
-		hs |= hs >> 8;
-		hs >>= 1;
-		hs |= 0xFFFF;
-
-		if (hs > (UINT32_C(1) << 24)) {
-			if (hash_bytes == 3)
-				hs = (UINT32_C(1) << 24) - 1;
-			else
-				hs >>= 1;
-		}
-	}
-
-	mf->hash_mask = hs;
-
-	++hs;
-	if (hash_bytes > 2)
-		hs += HASH_2_SIZE;
-	if (hash_bytes > 3)
-		hs += HASH_3_SIZE;
-/*
-	No match finder uses this at the moment.
-	if (mf->hash_bytes > 4)
-		hs += HASH_4_SIZE;
-*/
-
-	// If the above code calculating hs is modified, make sure that
-	// this assertion stays valid (UINT32_MAX / 5 is not strictly the
-	// exact limit). If it doesn't, you need to calculate that
-	// hash_size_sum + sons_count cannot overflow.
-	assert(hs < UINT32_MAX / 5);
-
-	const uint32_t old_count = mf->hash_size_sum + mf->sons_count;
-	mf->hash_size_sum = hs;
-	mf->sons_count = mf->cyclic_size;
-	if (is_bt)
-		mf->sons_count *= 2;
-
-	const uint32_t new_count = mf->hash_size_sum + mf->sons_count;
-
-	// Deallocate the old hash array if it exists and has different size
-	// than what is needed now.
-	if (old_count != new_count) {
-		lzma_free(mf->hash, allocator);
-		mf->hash = NULL;
-	}
-
-	// Maximum number of match finder cycles
-	mf->depth = lz_options->depth;
-	if (mf->depth == 0) {
-		if (is_bt)
-			mf->depth = 16 + mf->nice_len / 2;
-		else
-			mf->depth = 4 + mf->nice_len / 4;
-	}
-
-	return false;
-}
-
-
-static bool
-lz_encoder_init(lzma_mf *mf, lzma_allocator *allocator,
-		const lzma_lz_options *lz_options)
-{
-	// Allocate the history buffer.
-	if (mf->buffer == NULL) {
-		mf->buffer = lzma_alloc(mf->size, allocator);
-		if (mf->buffer == NULL)
-			return true;
-	}
-
-	// Use cyclic_size as initial mf->offset. This allows
-	// avoiding a few branches in the match finders. The downside is
-	// that match finder needs to be normalized more often, which may
-	// hurt performance with huge dictionaries.
-	mf->offset = mf->cyclic_size;
-	mf->read_pos = 0;
-	mf->read_ahead = 0;
-	mf->read_limit = 0;
-	mf->write_pos = 0;
-	mf->pending = 0;
-
-	// Allocate match finder's hash array.
-	const size_t alloc_count = mf->hash_size_sum + mf->sons_count;
-
-#if UINT32_MAX >= SIZE_MAX / 4
-	// Check for integer overflow. (Huge dictionaries are not
-	// possible on 32-bit CPU.)
-	if (alloc_count > SIZE_MAX / sizeof(uint32_t))
-		return true;
-#endif
-
-	if (mf->hash == NULL) {
-		mf->hash = lzma_alloc(alloc_count * sizeof(uint32_t),
-				allocator);
-		if (mf->hash == NULL)
-			return true;
-	}
-
-	mf->son = mf->hash + mf->hash_size_sum;
-	mf->cyclic_pos = 0;
-
-	// Initialize the hash table. Since EMPTY_HASH_VALUE is zero, we
-	// can use memset().
-/*
-	for (uint32_t i = 0; i < hash_size_sum; ++i)
-		mf->hash[i] = EMPTY_HASH_VALUE;
-*/
-	memzero(mf->hash, (size_t)(mf->hash_size_sum) * sizeof(uint32_t));
-
-	// We don't need to initialize mf->son, but not doing that will
-	// make Valgrind complain in normalization (see normalize() in
-	// lz_encoder_mf.c).
-	//
-	// Skipping this initialization is *very* good when big dictionary is
-	// used but only small amount of data gets actually compressed: most
-	// of the mf->hash won't get actually allocated by the kernel, so
-	// we avoid wasting RAM and improve initialization speed a lot.
-	//memzero(mf->son, (size_t)(mf->sons_count) * sizeof(uint32_t));
-
-	// Handle preset dictionary.
-	if (lz_options->preset_dict != NULL
-			&& lz_options->preset_dict_size > 0) {
-		// If the preset dictionary is bigger than the actual
-		// dictionary, use only the tail.
-		mf->write_pos = my_min(lz_options->preset_dict_size, mf->size);
-		memcpy(mf->buffer, lz_options->preset_dict
-				+ lz_options->preset_dict_size - mf->write_pos,
-				mf->write_pos);
-		mf->action = LZMA_SYNC_FLUSH;
-		mf->skip(mf, mf->write_pos);
-	}
-
-	mf->action = LZMA_RUN;
-
-	return false;
-}
-
-
-extern uint64_t
-lzma_lz_encoder_memusage(const lzma_lz_options *lz_options)
-{
-	// Old buffers must not exist when calling lz_encoder_prepare().
-	lzma_mf mf = {
-		.buffer = NULL,
-		.hash = NULL,
-		.hash_size_sum = 0,
-		.sons_count = 0,
-	};
-
-	// Setup the size information into mf.
-	if (lz_encoder_prepare(&mf, NULL, lz_options))
-		return UINT64_MAX;
-
-	// Calculate the memory usage.
-	return (uint64_t)(mf.hash_size_sum + mf.sons_count)
-				* sizeof(uint32_t)
-			+ (uint64_t)(mf.size) + sizeof(lzma_coder);
-}
-
-
-static void
-lz_encoder_end(lzma_coder *coder, lzma_allocator *allocator)
-{
-	lzma_next_end(&coder->next, allocator);
-
-	lzma_free(coder->mf.hash, allocator);
-	lzma_free(coder->mf.buffer, allocator);
-
-	if (coder->lz.end != NULL)
-		coder->lz.end(coder->lz.coder, allocator);
-	else
-		lzma_free(coder->lz.coder, allocator);
-
-	lzma_free(coder, allocator);
-	return;
-}
-
-
-static lzma_ret
-lz_encoder_update(lzma_coder *coder, lzma_allocator *allocator,
-		const lzma_filter *filters_null lzma_attribute((__unused__)),
-		const lzma_filter *reversed_filters)
-{
-	if (coder->lz.options_update == NULL)
-		return LZMA_PROG_ERROR;
-
-	return_if_error(coder->lz.options_update(
-			coder->lz.coder, reversed_filters));
-
-	return lzma_next_filter_update(
-			&coder->next, allocator, reversed_filters + 1);
-}
-
-
-extern lzma_ret
-lzma_lz_encoder_init(lzma_next_coder *next, lzma_allocator *allocator,
-		const lzma_filter_info *filters,
-		lzma_ret (*lz_init)(lzma_lz_encoder *lz,
-			lzma_allocator *allocator, const void *options,
-			lzma_lz_options *lz_options))
-{
-#ifdef HAVE_SMALL
-	// We need that the CRC32 table has been initialized.
-	lzma_crc32_init();
-#endif
-
-	// Allocate and initialize the base data structure.
-	if (next->coder == NULL) {
-		next->coder = lzma_alloc(sizeof(lzma_coder), allocator);
-		if (next->coder == NULL)
-			return LZMA_MEM_ERROR;
-
-		next->code = &lz_encode;
-		next->end = &lz_encoder_end;
-		next->update = &lz_encoder_update;
-
-		next->coder->lz.coder = NULL;
-		next->coder->lz.code = NULL;
-		next->coder->lz.end = NULL;
-
-		next->coder->mf.buffer = NULL;
-		next->coder->mf.hash = NULL;
-		next->coder->mf.hash_size_sum = 0;
-		next->coder->mf.sons_count = 0;
-
-		next->coder->next = LZMA_NEXT_CODER_INIT;
-	}
-
-	// Initialize the LZ-based encoder.
-	lzma_lz_options lz_options;
-	return_if_error(lz_init(&next->coder->lz, allocator,
-			filters[0].options, &lz_options));
-
-	// Setup the size information into next->coder->mf and deallocate
-	// old buffers if they have wrong size.
-	if (lz_encoder_prepare(&next->coder->mf, allocator, &lz_options))
-		return LZMA_OPTIONS_ERROR;
-
-	// Allocate new buffers if needed, and do the rest of
-	// the initialization.
-	if (lz_encoder_init(&next->coder->mf, allocator, &lz_options))
-		return LZMA_MEM_ERROR;
-
-	// Initialize the next filter in the chain, if any.
-	return lzma_next_filter_init(&next->coder->next, allocator,
-			filters + 1);
-}
-
-
-extern LZMA_API(lzma_bool)
-lzma_mf_is_supported(lzma_match_finder mf)
-{
-	bool ret = false;
-
-#ifdef HAVE_MF_HC3
-	if (mf == LZMA_MF_HC3)
-		ret = true;
-#endif
-
-#ifdef HAVE_MF_HC4
-	if (mf == LZMA_MF_HC4)
-		ret = true;
-#endif
-
-#ifdef HAVE_MF_BT2
-	if (mf == LZMA_MF_BT2)
-		ret = true;
-#endif
-
-#ifdef HAVE_MF_BT3
-	if (mf == LZMA_MF_BT3)
-		ret = true;
-#endif
-
-#ifdef HAVE_MF_BT4
-	if (mf == LZMA_MF_BT4)
-		ret = true;
-#endif
-
-	return ret;
-}
diff --git a/src/extra/xz/lz/lz_encoder.h b/src/extra/xz/lz/lz_encoder.h
deleted file mode 100644
index 741c453..0000000
--- a/src/extra/xz/lz/lz_encoder.h
+++ /dev/null
@@ -1,328 +0,0 @@
-///////////////////////////////////////////////////////////////////////////////
-//
-/// \file       lz_encoder.h
-/// \brief      LZ in window and match finder API
-///
-//  Authors:    Igor Pavlov
-//              Lasse Collin
-//
-//  This file has been put into the public domain.
-//  You can do whatever you want with this file.
-//
-///////////////////////////////////////////////////////////////////////////////
-
-#ifndef LZMA_LZ_ENCODER_H
-#define LZMA_LZ_ENCODER_H
-
-#include "common.h"
-
-
-/// A table of these is used by the LZ-based encoder to hold
-/// the length-distance pairs found by the match finder.
-typedef struct {
-	uint32_t len;
-	uint32_t dist;
-} lzma_match;
-
-
-typedef struct lzma_mf_s lzma_mf;
-struct lzma_mf_s {
-	///////////////
-	// In Window //
-	///////////////
-
-	/// Pointer to buffer with data to be compressed
-	uint8_t *buffer;
-
-	/// Total size of the allocated buffer (that is, including all
-	/// the extra space)
-	uint32_t size;
-
-	/// Number of bytes that must be kept available in our input history.
-	/// That is, once keep_size_before bytes have been processed,
-	/// buffer[read_pos - keep_size_before] is the oldest byte that
-	/// must be available for reading.
-	uint32_t keep_size_before;
-
-	/// Number of bytes that must be kept in buffer after read_pos.
-	/// That is, read_pos <= write_pos - keep_size_after as long as
-	/// action is LZMA_RUN; when action != LZMA_RUN, read_pos is allowed
-	/// to reach write_pos so that the last bytes get encoded too.
-	uint32_t keep_size_after;
-
-	/// Match finders store locations of matches using 32-bit integers.
-	/// To avoid adjusting several megabytes of integers every time the
-	/// input window is moved with move_window, we only adjust the
-	/// offset of the buffer. Thus, buffer[value_in_hash_table - offset]
-	/// is the byte pointed by value_in_hash_table.
-	uint32_t offset;
-
-	/// buffer[read_pos] is the next byte to run through the match
-	/// finder. This is incremented in the match finder once the byte
-	/// has been processed.
-	uint32_t read_pos;
-
-	/// Number of bytes that have been ran through the match finder, but
-	/// which haven't been encoded by the LZ-based encoder yet.
-	uint32_t read_ahead;
-
-	/// As long as read_pos is less than read_limit, there is enough
-	/// input available in buffer for at least one encoding loop.
-	///
-	/// Because of the stateful API, read_limit may and will get greater
-	/// than read_pos quite often. This is taken into account when
-	/// calculating the value for keep_size_after.
-	uint32_t read_limit;
-
-	/// buffer[write_pos] is the first byte that doesn't contain valid
-	/// uncompressed data; that is, the next input byte will be copied
-	/// to buffer[write_pos].
-	uint32_t write_pos;
-
-	/// Number of bytes not hashed before read_pos. This is needed to
-	/// restart the match finder after LZMA_SYNC_FLUSH.
-	uint32_t pending;
-
-	//////////////////
-	// Match Finder //
-	//////////////////
-
-	/// Find matches. Returns the number of distance-length pairs written
-	/// to the matches array. This is called only via lzma_mf_find().
-	uint32_t (*find)(lzma_mf *mf, lzma_match *matches);
-
-	/// Skips num bytes. This is like find() but doesn't make the
-	/// distance-length pairs available, thus being a little faster.
-	/// This is called only via mf_skip().
-	void (*skip)(lzma_mf *mf, uint32_t num);
-
-	uint32_t *hash;
-	uint32_t *son;
-	uint32_t cyclic_pos;
-	uint32_t cyclic_size; // Must be dictionary size + 1.
-	uint32_t hash_mask;
-
-	/// Maximum number of loops in the match finder
-	uint32_t depth;
-
-	/// Maximum length of a match that the match finder will try to find.
-	uint32_t nice_len;
-
-	/// Maximum length of a match supported by the LZ-based encoder.
-	/// If the longest match found by the match finder is nice_len,
-	/// mf_find() tries to expand it up to match_len_max bytes.
-	uint32_t match_len_max;
-
-	/// When running out of input, binary tree match finders need to know
-	/// if it is due to flushing or finishing. The action is used also
-	/// by the LZ-based encoders themselves.
-	lzma_action action;
-
-	/// Number of elements in hash[]
-	uint32_t hash_size_sum;
-
-	/// Number of elements in son[]
-	uint32_t sons_count;
-};
-
-
-typedef struct {
-	/// Extra amount of data to keep available before the "actual"
-	/// dictionary.
-	size_t before_size;
-
-	/// Size of the history buffer
-	size_t dict_size;
-
-	/// Extra amount of data to keep available after the "actual"
-	/// dictionary.
-	size_t after_size;
-
-	/// Maximum length of a match that the LZ-based encoder can accept.
-	/// This is used to extend matches of length nice_len to the
-	/// maximum possible length.
-	size_t match_len_max;
-
-	/// Match finder will search matches up to this length.
-	/// This must be less than or equal to match_len_max.
-	size_t nice_len;
-
-	/// Type of the match finder to use
-	lzma_match_finder match_finder;
-
-	/// Maximum search depth
-	uint32_t depth;
-
-	/// TODO: Comment
-	const uint8_t *preset_dict;
-
-	uint32_t preset_dict_size;
-
-} lzma_lz_options;
-
-
-// The total usable buffer space at any moment outside the match finder:
-// before_size + dict_size + after_size + match_len_max
-//
-// In reality, there's some extra space allocated to prevent the number of
-// memmove() calls reasonable. The bigger the dict_size is, the bigger
-// this extra buffer will be since with bigger dictionaries memmove() would
-// also take longer.
-//
-// A single encoder loop in the LZ-based encoder may call the match finder
-// (mf_find() or mf_skip()) at most after_size times. In other words,
-// a single encoder loop may increment lzma_mf.read_pos at most after_size
-// times. Since matches are looked up to
-// lzma_mf.buffer[lzma_mf.read_pos + match_len_max - 1], the total
-// amount of extra buffer needed after dict_size becomes
-// after_size + match_len_max.
-//
-// before_size has two uses. The first one is to keep literals available
-// in cases when the LZ-based encoder has made some read ahead.
-// TODO: Maybe this could be changed by making the LZ-based encoders to
-// store the actual literals as they do with length-distance pairs.
-//
-// Algorithms such as LZMA2 first try to compress a chunk, and then check
-// if the encoded result is smaller than the uncompressed one. If the chunk
-// was uncompressible, it is better to store it in uncompressed form in
-// the output stream. To do this, the whole uncompressed chunk has to be
-// still available in the history buffer. before_size achieves that.
-
-
-typedef struct {
-	/// Data specific to the LZ-based encoder
-	lzma_coder *coder;
-
-	/// Function to encode from *dict to out[]
-	lzma_ret (*code)(lzma_coder *restrict coder,
-			lzma_mf *restrict mf, uint8_t *restrict out,
-			size_t *restrict out_pos, size_t out_size);
-
-	/// Free allocated resources
-	void (*end)(lzma_coder *coder, lzma_allocator *allocator);
-
-	/// Update the options in the middle of the encoding.
-	lzma_ret (*options_update)(lzma_coder *coder,
-			const lzma_filter *filter);
-
-} lzma_lz_encoder;
-
-
-// Basic steps:
-//  1. Input gets copied into the dictionary.
-//  2. Data in dictionary gets run through the match finder byte by byte.
-//  3. The literals and matches are encoded using e.g. LZMA.
-//
-// The bytes that have been ran through the match finder, but not encoded yet,
-// are called `read ahead'.
-
-
-/// Get pointer to the first byte not ran through the match finder
-static inline const uint8_t *
-mf_ptr(const lzma_mf *mf)
-{
-	return mf->buffer + mf->read_pos;
-}
-
-
-/// Get the number of bytes that haven't been ran through the match finder yet.
-static inline uint32_t
-mf_avail(const lzma_mf *mf)
-{
-	return mf->write_pos - mf->read_pos;
-}
-
-
-/// Get the number of bytes that haven't been encoded yet (some of these
-/// bytes may have been ran through the match finder though).
-static inline uint32_t
-mf_unencoded(const lzma_mf *mf)
-{
-	return mf->write_pos - mf->read_pos + mf->read_ahead;
-}
-
-
-/// Calculate the absolute offset from the beginning of the most recent
-/// dictionary reset. Only the lowest four bits are important, so there's no
-/// problem that we don't know the 64-bit size of the data encoded so far.
-///
-/// NOTE: When moving the input window, we need to do it so that the lowest
-/// bits of dict->read_pos are not modified to keep this macro working
-/// as intended.
-static inline uint32_t
-mf_position(const lzma_mf *mf)
-{
-	return mf->read_pos - mf->read_ahead;
-}
-
-
-/// Since everything else begins with mf_, use it also for lzma_mf_find().
-#define mf_find lzma_mf_find
-
-
-/// Skip the given number of bytes. This is used when a good match was found.
-/// For example, if mf_find() finds a match of 200 bytes long, the first byte
-/// of that match was already consumed by mf_find(), and the rest 199 bytes
-/// have to be skipped with mf_skip(mf, 199).
-static inline void
-mf_skip(lzma_mf *mf, uint32_t amount)
-{
-	if (amount != 0) {
-		mf->skip(mf, amount);
-		mf->read_ahead += amount;
-	}
-}
-
-
-/// Copies at most *left number of bytes from the history buffer
-/// to out[]. This is needed by LZMA2 to encode uncompressed chunks.
-static inline void
-mf_read(lzma_mf *mf, uint8_t *out, size_t *out_pos, size_t out_size,
-		size_t *left)
-{
-	const size_t out_avail = out_size - *out_pos;
-	const size_t copy_size = my_min(out_avail, *left);
-
-	assert(mf->read_ahead == 0);
-	assert(mf->read_pos >= *left);
-
-	memcpy(out + *out_pos, mf->buffer + mf->read_pos - *left,
-			copy_size);
-
-	*out_pos += copy_size;
-	*left -= copy_size;
-	return;
-}
-
-
-extern lzma_ret lzma_lz_encoder_init(
-		lzma_next_coder *next, lzma_allocator *allocator,
-		const lzma_filter_info *filters,
-		lzma_ret (*lz_init)(lzma_lz_encoder *lz,
-			lzma_allocator *allocator, const void *options,
-			lzma_lz_options *lz_options));
-
-
-extern uint64_t lzma_lz_encoder_memusage(const lzma_lz_options *lz_options);
-
-
-// These are only for LZ encoder's internal use.
-extern uint32_t lzma_mf_find(
-		lzma_mf *mf, uint32_t *count, lzma_match *matches);
-
-extern uint32_t lzma_mf_hc3_find(lzma_mf *dict, lzma_match *matches);
-extern void lzma_mf_hc3_skip(lzma_mf *dict, uint32_t amount);
-
-extern uint32_t lzma_mf_hc4_find(lzma_mf *dict, lzma_match *matches);
-extern void lzma_mf_hc4_skip(lzma_mf *dict, uint32_t amount);
-
-extern uint32_t lzma_mf_bt2_find(lzma_mf *dict, lzma_match *matches);
-extern void lzma_mf_bt2_skip(lzma_mf *dict, uint32_t amount);
-
-extern uint32_t lzma_mf_bt3_find(lzma_mf *dict, lzma_match *matches);
-extern void lzma_mf_bt3_skip(lzma_mf *dict, uint32_t amount);
-
-extern uint32_t lzma_mf_bt4_find(lzma_mf *dict, lzma_match *matches);
-extern void lzma_mf_bt4_skip(lzma_mf *dict, uint32_t amount);
-
-#endif
diff --git a/src/extra/xz/lz/lz_encoder_hash.h b/src/extra/xz/lz/lz_encoder_hash.h
deleted file mode 100644
index 342a333..0000000
--- a/src/extra/xz/lz/lz_encoder_hash.h
+++ /dev/null
@@ -1,108 +0,0 @@
-///////////////////////////////////////////////////////////////////////////////
-//
-/// \file       lz_encoder_hash.h
-/// \brief      Hash macros for match finders
-//
-//  Author:     Igor Pavlov
-//
-//  This file has been put into the public domain.
-//  You can do whatever you want with this file.
-//
-///////////////////////////////////////////////////////////////////////////////
-
-#ifndef LZMA_LZ_ENCODER_HASH_H
-#define LZMA_LZ_ENCODER_HASH_H
-
-#if defined(WORDS_BIGENDIAN) && !defined(HAVE_SMALL)
-	// This is to make liblzma produce the same output on big endian
-	// systems that it does on little endian systems. lz_encoder.c
-	// takes care of including the actual table.
-	extern const uint32_t lzma_lz_hash_table[256];
-#	define hash_table lzma_lz_hash_table
-#else
-#	include "check.h"
-#	define hash_table lzma_crc32_table[0]
-#endif
-
-#define HASH_2_SIZE (UINT32_C(1) << 10)
-#define HASH_3_SIZE (UINT32_C(1) << 16)
-#define HASH_4_SIZE (UINT32_C(1) << 20)
-
-#define HASH_2_MASK (HASH_2_SIZE - 1)
-#define HASH_3_MASK (HASH_3_SIZE - 1)
-#define HASH_4_MASK (HASH_4_SIZE - 1)
-
-#define FIX_3_HASH_SIZE (HASH_2_SIZE)
-#define FIX_4_HASH_SIZE (HASH_2_SIZE + HASH_3_SIZE)
-#define FIX_5_HASH_SIZE (HASH_2_SIZE + HASH_3_SIZE + HASH_4_SIZE)
-
-// Endianness doesn't matter in hash_2_calc() (no effect on the output).
-#ifdef TUKLIB_FAST_UNALIGNED_ACCESS
-#	define hash_2_calc() \
-		const uint32_t hash_value = *(const uint16_t *)(cur)
-#else
-#	define hash_2_calc() \
-		const uint32_t hash_value \
-			= (uint32_t)(cur[0]) | ((uint32_t)(cur[1]) << 8)
-#endif
-
-#define hash_3_calc() \
-	const uint32_t temp = hash_table[cur[0]] ^ cur[1]; \
-	const uint32_t hash_2_value = temp & HASH_2_MASK; \
-	const uint32_t hash_value \
-			= (temp ^ ((uint32_t)(cur[2]) << 8)) & mf->hash_mask
-
-#define hash_4_calc() \
-	const uint32_t temp = hash_table[cur[0]] ^ cur[1]; \
-	const uint32_t hash_2_value = temp & HASH_2_MASK; \
-	const uint32_t hash_3_value \
-			= (temp ^ ((uint32_t)(cur[2]) << 8)) & HASH_3_MASK; \
-	const uint32_t hash_value = (temp ^ ((uint32_t)(cur[2]) << 8) \
-			^ (hash_table[cur[3]] << 5)) & mf->hash_mask
-
-
-// The following are not currently used.
-
-#define hash_5_calc() \
-	const uint32_t temp = hash_table[cur[0]] ^ cur[1]; \
-	const uint32_t hash_2_value = temp & HASH_2_MASK; \
-	const uint32_t hash_3_value \
-			= (temp ^ ((uint32_t)(cur[2]) << 8)) & HASH_3_MASK; \
-	uint32_t hash_4_value = (temp ^ ((uint32_t)(cur[2]) << 8) ^ \
-			^ hash_table[cur[3]] << 5); \
-	const uint32_t hash_value \
-			= (hash_4_value ^ (hash_table[cur[4]] << 3)) \
-				& mf->hash_mask; \
-	hash_4_value &= HASH_4_MASK
-
-/*
-#define hash_zip_calc() \
-	const uint32_t hash_value \
-			= (((uint32_t)(cur[0]) | ((uint32_t)(cur[1]) << 8)) \
-				^ hash_table[cur[2]]) & 0xFFFF
-*/
-
-#define hash_zip_calc() \
-	const uint32_t hash_value \
-			= (((uint32_t)(cur[2]) | ((uint32_t)(cur[0]) << 8)) \
-				^ hash_table[cur[1]]) & 0xFFFF
-
-#define mt_hash_2_calc() \
-	const uint32_t hash_2_value \
-			= (hash_table[cur[0]] ^ cur[1]) & HASH_2_MASK
-
-#define mt_hash_3_calc() \
-	const uint32_t temp = hash_table[cur[0]] ^ cur[1]; \
-	const uint32_t hash_2_value = temp & HASH_2_MASK; \
-	const uint32_t hash_3_value \
-			= (temp ^ ((uint32_t)(cur[2]) << 8)) & HASH_3_MASK
-
-#define mt_hash_4_calc() \
-	const uint32_t temp = hash_table[cur[0]] ^ cur[1]; \
-	const uint32_t hash_2_value = temp & HASH_2_MASK; \
-	const uint32_t hash_3_value \
-			= (temp ^ ((uint32_t)(cur[2]) << 8)) & HASH_3_MASK; \
-	const uint32_t hash_4_value = (temp ^ ((uint32_t)(cur[2]) << 8) ^ \
-			(hash_table[cur[3]] << 5)) & HASH_4_MASK
-
-#endif
diff --git a/src/extra/xz/lz/lz_encoder_hash_table.h b/src/extra/xz/lz/lz_encoder_hash_table.h
deleted file mode 100644
index 8c51717..0000000
--- a/src/extra/xz/lz/lz_encoder_hash_table.h
+++ /dev/null
@@ -1,68 +0,0 @@
-/* This file has been automatically generated by crc32_tablegen.c. */
-
-const uint32_t lzma_lz_hash_table[256] = {
-	0x00000000, 0x77073096, 0xEE0E612C, 0x990951BA,
-	0x076DC419, 0x706AF48F, 0xE963A535, 0x9E6495A3,
-	0x0EDB8832, 0x79DCB8A4, 0xE0D5E91E, 0x97D2D988,
-	0x09B64C2B, 0x7EB17CBD, 0xE7B82D07, 0x90BF1D91,
-	0x1DB71064, 0x6AB020F2, 0xF3B97148, 0x84BE41DE,
-	0x1ADAD47D, 0x6DDDE4EB, 0xF4D4B551, 0x83D385C7,
-	0x136C9856, 0x646BA8C0, 0xFD62F97A, 0x8A65C9EC,
-	0x14015C4F, 0x63066CD9, 0xFA0F3D63, 0x8D080DF5,
-	0x3B6E20C8, 0x4C69105E, 0xD56041E4, 0xA2677172,
-	0x3C03E4D1, 0x4B04D447, 0xD20D85FD, 0xA50AB56B,
-	0x35B5A8FA, 0x42B2986C, 0xDBBBC9D6, 0xACBCF940,
-	0x32D86CE3, 0x45DF5C75, 0xDCD60DCF, 0xABD13D59,
-	0x26D930AC, 0x51DE003A, 0xC8D75180, 0xBFD06116,
-	0x21B4F4B5, 0x56B3C423, 0xCFBA9599, 0xB8BDA50F,
-	0x2802B89E, 0x5F058808, 0xC60CD9B2, 0xB10BE924,
-	0x2F6F7C87, 0x58684C11, 0xC1611DAB, 0xB6662D3D,
-	0x76DC4190, 0x01DB7106, 0x98D220BC, 0xEFD5102A,
-	0x71B18589, 0x06B6B51F, 0x9FBFE4A5, 0xE8B8D433,
-	0x7807C9A2, 0x0F00F934, 0x9609A88E, 0xE10E9818,
-	0x7F6A0DBB, 0x086D3D2D, 0x91646C97, 0xE6635C01,
-	0x6B6B51F4, 0x1C6C6162, 0x856530D8, 0xF262004E,
-	0x6C0695ED, 0x1B01A57B, 0x8208F4C1, 0xF50FC457,
-	0x65B0D9C6, 0x12B7E950, 0x8BBEB8EA, 0xFCB9887C,
-	0x62DD1DDF, 0x15DA2D49, 0x8CD37CF3, 0xFBD44C65,
-	0x4DB26158, 0x3AB551CE, 0xA3BC0074, 0xD4BB30E2,
-	0x4ADFA541, 0x3DD895D7, 0xA4D1C46D, 0xD3D6F4FB,
-	0x4369E96A, 0x346ED9FC, 0xAD678846, 0xDA60B8D0,
-	0x44042D73, 0x33031DE5, 0xAA0A4C5F, 0xDD0D7CC9,
-	0x5005713C, 0x270241AA, 0xBE0B1010, 0xC90C2086,
-	0x5768B525, 0x206F85B3, 0xB966D409, 0xCE61E49F,
-	0x5EDEF90E, 0x29D9C998, 0xB0D09822, 0xC7D7A8B4,
-	0x59B33D17, 0x2EB40D81, 0xB7BD5C3B, 0xC0BA6CAD,
-	0xEDB88320, 0x9ABFB3B6, 0x03B6E20C, 0x74B1D29A,
-	0xEAD54739, 0x9DD277AF, 0x04DB2615, 0x73DC1683,
-	0xE3630B12, 0x94643B84, 0x0D6D6A3E, 0x7A6A5AA8,
-	0xE40ECF0B, 0x9309FF9D, 0x0A00AE27, 0x7D079EB1,
-	0xF00F9344, 0x8708A3D2, 0x1E01F268, 0x6906C2FE,
-	0xF762575D, 0x806567CB, 0x196C3671, 0x6E6B06E7,
-	0xFED41B76, 0x89D32BE0, 0x10DA7A5A, 0x67DD4ACC,
-	0xF9B9DF6F, 0x8EBEEFF9, 0x17B7BE43, 0x60B08ED5,
-	0xD6D6A3E8, 0xA1D1937E, 0x38D8C2C4, 0x4FDFF252,
-	0xD1BB67F1, 0xA6BC5767, 0x3FB506DD, 0x48B2364B,
-	0xD80D2BDA, 0xAF0A1B4C, 0x36034AF6, 0x41047A60,
-	0xDF60EFC3, 0xA867DF55, 0x316E8EEF, 0x4669BE79,
-	0xCB61B38C, 0xBC66831A, 0x256FD2A0, 0x5268E236,
-	0xCC0C7795, 0xBB0B4703, 0x220216B9, 0x5505262F,
-	0xC5BA3BBE, 0xB2BD0B28, 0x2BB45A92, 0x5CB36A04,
-	0xC2D7FFA7, 0xB5D0CF31, 0x2CD99E8B, 0x5BDEAE1D,
-	0x9B64C2B0, 0xEC63F226, 0x756AA39C, 0x026D930A,
-	0x9C0906A9, 0xEB0E363F, 0x72076785, 0x05005713,
-	0x95BF4A82, 0xE2B87A14, 0x7BB12BAE, 0x0CB61B38,
-	0x92D28E9B, 0xE5D5BE0D, 0x7CDCEFB7, 0x0BDBDF21,
-	0x86D3D2D4, 0xF1D4E242, 0x68DDB3F8, 0x1FDA836E,
-	0x81BE16CD, 0xF6B9265B, 0x6FB077E1, 0x18B74777,
-	0x88085AE6, 0xFF0F6A70, 0x66063BCA, 0x11010B5C,
-	0x8F659EFF, 0xF862AE69, 0x616BFFD3, 0x166CCF45,
-	0xA00AE278, 0xD70DD2EE, 0x4E048354, 0x3903B3C2,
-	0xA7672661, 0xD06016F7, 0x4969474D, 0x3E6E77DB,
-	0xAED16A4A, 0xD9D65ADC, 0x40DF0B66, 0x37D83BF0,
-	0xA9BCAE53, 0xDEBB9EC5, 0x47B2CF7F, 0x30B5FFE9,
-	0xBDBDF21C, 0xCABAC28A, 0x53B39330, 0x24B4A3A6,
-	0xBAD03605, 0xCDD70693, 0x54DE5729, 0x23D967BF,
-	0xB3667A2E, 0xC4614AB8, 0x5D681B02, 0x2A6F2B94,
-	0xB40BBE37, 0xC30C8EA1, 0x5A05DF1B, 0x2D02EF8D
-};
diff --git a/src/extra/xz/lz/lz_encoder_mf.c b/src/extra/xz/lz/lz_encoder_mf.c
deleted file mode 100644
index f82a1c1..0000000
--- a/src/extra/xz/lz/lz_encoder_mf.c
+++ /dev/null
@@ -1,753 +0,0 @@
-///////////////////////////////////////////////////////////////////////////////
-//
-/// \file       lz_encoder_mf.c
-/// \brief      Match finders
-///
-//  Authors:    Igor Pavlov
-//              Lasse Collin
-//
-//  This file has been put into the public domain.
-//  You can do whatever you want with this file.
-//
-///////////////////////////////////////////////////////////////////////////////
-
-#include "lz_encoder.h"
-#include "lz_encoder_hash.h"
-
-
-/// \brief      Find matches starting from the current byte
-///
-/// \return     The length of the longest match found
-extern uint32_t
-lzma_mf_find(lzma_mf *mf, uint32_t *count_ptr, lzma_match *matches)
-{
-	// Call the match finder. It returns the number of length-distance
-	// pairs found.
-	// FIXME: Minimum count is zero, what _exactly_ is the maximum?
-	const uint32_t count = mf->find(mf, matches);
-
-	// Length of the longest match; assume that no matches were found
-	// and thus the maximum length is zero.
-	uint32_t len_best = 0;
-
-	if (count > 0) {
-#ifndef NDEBUG
-		// Validate the matches.
-		for (uint32_t i = 0; i < count; ++i) {
-			assert(matches[i].len <= mf->nice_len);
-			assert(matches[i].dist < mf->read_pos);
-			assert(memcmp(mf_ptr(mf) - 1,
-				mf_ptr(mf) - matches[i].dist - 2,
-				matches[i].len) == 0);
-		}
-#endif
-
-		// The last used element in the array contains
-		// the longest match.
-		len_best = matches[count - 1].len;
-
-		// If a match of maximum search length was found, try to
-		// extend the match to maximum possible length.
-		if (len_best == mf->nice_len) {
-			// The limit for the match length is either the
-			// maximum match length supported by the LZ-based
-			// encoder or the number of bytes left in the
-			// dictionary, whichever is smaller.
-			uint32_t limit = mf_avail(mf) + 1;
-			if (limit > mf->match_len_max)
-				limit = mf->match_len_max;
-
-			// Pointer to the byte we just ran through
-			// the match finder.
-			const uint8_t *p1 = mf_ptr(mf) - 1;
-
-			// Pointer to the beginning of the match. We need -1
-			// here because the match distances are zero based.
-			const uint8_t *p2 = p1 - matches[count - 1].dist - 1;
-
-			while (len_best < limit
-					&& p1[len_best] == p2[len_best])
-				++len_best;
-		}
-	}
-
-	*count_ptr = count;
-
-	// Finally update the read position to indicate that match finder was
-	// run for this dictionary offset.
-	++mf->read_ahead;
-
-	return len_best;
-}
-
-
-/// Hash value to indicate unused element in the hash. Since we start the
-/// positions from dict_size + 1, zero is always too far to qualify
-/// as usable match position.
-#define EMPTY_HASH_VALUE 0
-
-
-/// Normalization must be done when lzma_mf.offset + lzma_mf.read_pos
-/// reaches MUST_NORMALIZE_POS.
-#define MUST_NORMALIZE_POS UINT32_MAX
-
-
-/// \brief      Normalizes hash values
-///
-/// The hash arrays store positions of match candidates. The positions are
-/// relative to an arbitrary offset that is not the same as the absolute
-/// offset in the input stream. The relative position of the current byte
-/// is lzma_mf.offset + lzma_mf.read_pos. The distances of the matches are
-/// the differences of the current read position and the position found from
-/// the hash.
-///
-/// To prevent integer overflows of the offsets stored in the hash arrays,
-/// we need to "normalize" the stored values now and then. During the
-/// normalization, we drop values that indicate distance greater than the
-/// dictionary size, thus making space for new values.
-static void
-normalize(lzma_mf *mf)
-{
-	assert(mf->read_pos + mf->offset == MUST_NORMALIZE_POS);
-
-	// In future we may not want to touch the lowest bits, because there
-	// may be match finders that use larger resolution than one byte.
-	const uint32_t subvalue
-			= (MUST_NORMALIZE_POS - mf->cyclic_size);
-				// & (~(UINT32_C(1) << 10) - 1);
-
-	const uint32_t count = mf->hash_size_sum + mf->sons_count;
-	uint32_t *hash = mf->hash;
-
-	for (uint32_t i = 0; i < count; ++i) {
-		// If the distance is greater than the dictionary size,
-		// we can simply mark the hash element as empty.
-		//
-		// NOTE: Only the first mf->hash_size_sum elements are
-		// initialized for sure. There may be uninitialized elements
-		// in mf->son. Since we go through both mf->hash and
-		// mf->son here in normalization, Valgrind may complain
-		// that the "if" below depends on uninitialized value. In
-		// this case it is safe to ignore the warning. See also the
-		// comments in lz_encoder_init() in lz_encoder.c.
-		if (hash[i] <= subvalue)
-			hash[i] = EMPTY_HASH_VALUE;
-		else
-			hash[i] -= subvalue;
-	}
-
-	// Update offset to match the new locations.
-	mf->offset -= subvalue;
-
-	return;
-}
-
-
-/// Mark the current byte as processed from point of view of the match finder.
-static void
-move_pos(lzma_mf *mf)
-{
-	if (++mf->cyclic_pos == mf->cyclic_size)
-		mf->cyclic_pos = 0;
-
-	++mf->read_pos;
-	assert(mf->read_pos <= mf->write_pos);
-
-	if (unlikely(mf->read_pos + mf->offset == UINT32_MAX))
-		normalize(mf);
-}
-
-
-/// When flushing, we cannot run the match finder unless there is nice_len
-/// bytes available in the dictionary. Instead, we skip running the match
-/// finder (indicating that no match was found), and count how many bytes we
-/// have ignored this way.
-///
-/// When new data is given after the flushing was completed, the match finder
-/// is restarted by rewinding mf->read_pos backwards by mf->pending. Then
-/// the missed bytes are added to the hash using the match finder's skip
-/// function (with small amount of input, it may start using mf->pending
-/// again if flushing).
-///
-/// Due to this rewinding, we don't touch cyclic_pos or test for
-/// normalization. It will be done when the match finder's skip function
-/// catches up after a flush.
-static void
-move_pending(lzma_mf *mf)
-{
-	++mf->read_pos;
-	assert(mf->read_pos <= mf->write_pos);
-	++mf->pending;
-}
-
-
-/// Calculate len_limit and determine if there is enough input to run
-/// the actual match finder code. Sets up "cur" and "pos". This macro
-/// is used by all find functions and binary tree skip functions. Hash
-/// chain skip function doesn't need len_limit so a simpler code is used
-/// in them.
-#define header(is_bt, len_min, ret_op) \
-	uint32_t len_limit = mf_avail(mf); \
-	if (mf->nice_len <= len_limit) { \
-		len_limit = mf->nice_len; \
-	} else if (len_limit < (len_min) \
-			|| (is_bt && mf->action == LZMA_SYNC_FLUSH)) { \
-		assert(mf->action != LZMA_RUN); \
-		move_pending(mf); \
-		ret_op; \
-	} \
-	const uint8_t *cur = mf_ptr(mf); \
-	const uint32_t pos = mf->read_pos + mf->offset
-
-
-/// Header for find functions. "return 0" indicates that zero matches
-/// were found.
-#define header_find(is_bt, len_min) \
-	header(is_bt, len_min, return 0); \
-	uint32_t matches_count = 0
-
-
-/// Header for a loop in a skip function. "continue" tells to skip the rest
-/// of the code in the loop.
-#define header_skip(is_bt, len_min) \
-	header(is_bt, len_min, continue)
-
-
-/// Calls hc_find_func() or bt_find_func() and calculates the total number
-/// of matches found. Updates the dictionary position and returns the number
-/// of matches found.
-#define call_find(func, len_best) \
-do { \
-	matches_count = func(len_limit, pos, cur, cur_match, mf->depth, \
-				mf->son, mf->cyclic_pos, mf->cyclic_size, \
-				matches + matches_count, len_best) \
-			- matches; \
-	move_pos(mf); \
-	return matches_count; \
-} while (0)
-
-
-////////////////
-// Hash Chain //
-////////////////
-
-#if defined(HAVE_MF_HC3) || defined(HAVE_MF_HC4)
-///
-///
-/// \param      len_limit       Don't look for matches longer than len_limit.
-/// \param      pos             lzma_mf.read_pos + lzma_mf.offset
-/// \param      cur             Pointer to current byte (mf_ptr(mf))
-/// \param      cur_match       Start position of the current match candidate
-/// \param      depth           Maximum length of the hash chain
-/// \param      son             lzma_mf.son (contains the hash chain)
-/// \param      cyclic_pos
-/// \param      cyclic_size
-/// \param      matches         Array to hold the matches.
-/// \param      len_best        The length of the longest match found so far.
-static lzma_match *
-hc_find_func(
-		const uint32_t len_limit,
-		const uint32_t pos,
-		const uint8_t *const cur,
-		uint32_t cur_match,
-		uint32_t depth,
-		uint32_t *const son,
-		const uint32_t cyclic_pos,
-		const uint32_t cyclic_size,
-		lzma_match *matches,
-		uint32_t len_best)
-{
-	son[cyclic_pos] = cur_match;
-
-	while (true) {
-		const uint32_t delta = pos - cur_match;
-		if (depth-- == 0 || delta >= cyclic_size)
-			return matches;
-
-		const uint8_t *const pb = cur - delta;
-		cur_match = son[cyclic_pos - delta
-				+ (delta > cyclic_pos ? cyclic_size : 0)];
-
-		if (pb[len_best] == cur[len_best] && pb[0] == cur[0]) {
-			uint32_t len = 0;
-			while (++len != len_limit)
-				if (pb[len] != cur[len])
-					break;
-
-			if (len_best < len) {
-				len_best = len;
-				matches->len = len;
-				matches->dist = delta - 1;
-				++matches;
-
-				if (len == len_limit)
-					return matches;
-			}
-		}
-	}
-}
-
-
-#define hc_find(len_best) \
-	call_find(hc_find_func, len_best)
-
-
-#define hc_skip() \
-do { \
-	mf->son[mf->cyclic_pos] = cur_match; \
-	move_pos(mf); \
-} while (0)
-
-#endif
-
-
-#ifdef HAVE_MF_HC3
-extern uint32_t
-lzma_mf_hc3_find(lzma_mf *mf, lzma_match *matches)
-{
-	header_find(false, 3);
-
-	hash_3_calc();
-
-	const uint32_t delta2 = pos - mf->hash[hash_2_value];
-	const uint32_t cur_match = mf->hash[FIX_3_HASH_SIZE + hash_value];
-
-	mf->hash[hash_2_value] = pos;
-	mf->hash[FIX_3_HASH_SIZE + hash_value] = pos;
-
-	uint32_t len_best = 2;
-
-	if (delta2 < mf->cyclic_size && *(cur - delta2) == *cur) {
-		for ( ; len_best != len_limit; ++len_best)
-			if (*(cur + len_best - delta2) != cur[len_best])
-				break;
-
-		matches[0].len = len_best;
-		matches[0].dist = delta2 - 1;
-		matches_count = 1;
-
-		if (len_best == len_limit) {
-			hc_skip();
-			return 1; // matches_count
-		}
-	}
-
-	hc_find(len_best);
-}
-
-
-extern void
-lzma_mf_hc3_skip(lzma_mf *mf, uint32_t amount)
-{
-	do {
-		if (mf_avail(mf) < 3) {
-			move_pending(mf);
-			continue;
-		}
-
-		const uint8_t *cur = mf_ptr(mf);
-		const uint32_t pos = mf->read_pos + mf->offset;
-
-		hash_3_calc();
-
-		const uint32_t cur_match
-				= mf->hash[FIX_3_HASH_SIZE + hash_value];
-
-		mf->hash[hash_2_value] = pos;
-		mf->hash[FIX_3_HASH_SIZE + hash_value] = pos;
-
-		hc_skip();
-
-	} while (--amount != 0);
-}
-#endif
-
-
-#ifdef HAVE_MF_HC4
-extern uint32_t
-lzma_mf_hc4_find(lzma_mf *mf, lzma_match *matches)
-{
-	header_find(false, 4);
-
-	hash_4_calc();
-
-	uint32_t delta2 = pos - mf->hash[hash_2_value];
-	const uint32_t delta3
-			= pos - mf->hash[FIX_3_HASH_SIZE + hash_3_value];
-	const uint32_t cur_match = mf->hash[FIX_4_HASH_SIZE + hash_value];
-
-	mf->hash[hash_2_value ] = pos;
-	mf->hash[FIX_3_HASH_SIZE + hash_3_value] = pos;
-	mf->hash[FIX_4_HASH_SIZE + hash_value] = pos;
-
-	uint32_t len_best = 1;
-
-	if (delta2 < mf->cyclic_size && *(cur - delta2) == *cur) {
-		len_best = 2;
-		matches[0].len = 2;
-		matches[0].dist = delta2 - 1;
-		matches_count = 1;
-	}
-
-	if (delta2 != delta3 && delta3 < mf->cyclic_size
-			&& *(cur - delta3) == *cur) {
-		len_best = 3;
-		matches[matches_count++].dist = delta3 - 1;
-		delta2 = delta3;
-	}
-
-	if (matches_count != 0) {
-		for ( ; len_best != len_limit; ++len_best)
-			if (*(cur + len_best - delta2) != cur[len_best])
-				break;
-
-		matches[matches_count - 1].len = len_best;
-
-		if (len_best == len_limit) {
-			hc_skip();
-			return matches_count;
-		}
-	}
-
-	if (len_best < 3)
-		len_best = 3;
-
-	hc_find(len_best);
-}
-
-
-extern void
-lzma_mf_hc4_skip(lzma_mf *mf, uint32_t amount)
-{
-	do {
-		if (mf_avail(mf) < 4) {
-			move_pending(mf);
-			continue;
-		}
-
-		const uint8_t *cur = mf_ptr(mf);
-		const uint32_t pos = mf->read_pos + mf->offset;
-
-		hash_4_calc();
-
-		const uint32_t cur_match
-				= mf->hash[FIX_4_HASH_SIZE + hash_value];
-
-		mf->hash[hash_2_value] = pos;
-		mf->hash[FIX_3_HASH_SIZE + hash_3_value] = pos;
-		mf->hash[FIX_4_HASH_SIZE + hash_value] = pos;
-
-		hc_skip();
-
-	} while (--amount != 0);
-}
-#endif
-
-
-/////////////////
-// Binary Tree //
-/////////////////
-
-#if defined(HAVE_MF_BT2) || defined(HAVE_MF_BT3) || defined(HAVE_MF_BT4)
-static lzma_match *
-bt_find_func(
-		const uint32_t len_limit,
-		const uint32_t pos,
-		const uint8_t *const cur,
-		uint32_t cur_match,
-		uint32_t depth,
-		uint32_t *const son,
-		const uint32_t cyclic_pos,
-		const uint32_t cyclic_size,
-		lzma_match *matches,
-		uint32_t len_best)
-{
-	uint32_t *ptr0 = son + (cyclic_pos << 1) + 1;
-	uint32_t *ptr1 = son + (cyclic_pos << 1);
-
-	uint32_t len0 = 0;
-	uint32_t len1 = 0;
-
-	while (true) {
-		const uint32_t delta = pos - cur_match;
-		if (depth-- == 0 || delta >= cyclic_size) {
-			*ptr0 = EMPTY_HASH_VALUE;
-			*ptr1 = EMPTY_HASH_VALUE;
-			return matches;
-		}
-
-		uint32_t *const pair = son + ((cyclic_pos - delta
-				+ (delta > cyclic_pos ? cyclic_size : 0))
-				<< 1);
-
-		const uint8_t *const pb = cur - delta;
-		uint32_t len = my_min(len0, len1);
-
-		if (pb[len] == cur[len]) {
-			while (++len != len_limit)
-				if (pb[len] != cur[len])
-					break;
-
-			if (len_best < len) {
-				len_best = len;
-				matches->len = len;
-				matches->dist = delta - 1;
-				++matches;
-
-				if (len == len_limit) {
-					*ptr1 = pair[0];
-					*ptr0 = pair[1];
-					return matches;
-				}
-			}
-		}
-
-		if (pb[len] < cur[len]) {
-			*ptr1 = cur_match;
-			ptr1 = pair + 1;
-			cur_match = *ptr1;
-			len1 = len;
-		} else {
-			*ptr0 = cur_match;
-			ptr0 = pair;
-			cur_match = *ptr0;
-			len0 = len;
-		}
-	}
-}
-
-
-static void
-bt_skip_func(
-		const uint32_t len_limit,
-		const uint32_t pos,
-		const uint8_t *const cur,
-		uint32_t cur_match,
-		uint32_t depth,
-		uint32_t *const son,
-		const uint32_t cyclic_pos,
-		const uint32_t cyclic_size)
-{
-	uint32_t *ptr0 = son + (cyclic_pos << 1) + 1;
-	uint32_t *ptr1 = son + (cyclic_pos << 1);
-
-	uint32_t len0 = 0;
-	uint32_t len1 = 0;
-
-	while (true) {
-		const uint32_t delta = pos - cur_match;
-		if (depth-- == 0 || delta >= cyclic_size) {
-			*ptr0 = EMPTY_HASH_VALUE;
-			*ptr1 = EMPTY_HASH_VALUE;
-			return;
-		}
-
-		uint32_t *pair = son + ((cyclic_pos - delta
-				+ (delta > cyclic_pos ? cyclic_size : 0))
-				<< 1);
-		const uint8_t *pb = cur - delta;
-		uint32_t len = my_min(len0, len1);
-
-		if (pb[len] == cur[len]) {
-			while (++len != len_limit)
-				if (pb[len] != cur[len])
-					break;
-
-			if (len == len_limit) {
-				*ptr1 = pair[0];
-				*ptr0 = pair[1];
-				return;
-			}
-		}
-
-		if (pb[len] < cur[len]) {
-			*ptr1 = cur_match;
-			ptr1 = pair + 1;
-			cur_match = *ptr1;
-			len1 = len;
-		} else {
-			*ptr0 = cur_match;
-			ptr0 = pair;
-			cur_match = *ptr0;
-			len0 = len;
-		}
-	}
-}
-
-
-#define bt_find(len_best) \
-	call_find(bt_find_func, len_best)
-
-#define bt_skip() \
-do { \
-	bt_skip_func(len_limit, pos, cur, cur_match, mf->depth, \
-			mf->son, mf->cyclic_pos, \
-			mf->cyclic_size); \
-	move_pos(mf); \
-} while (0)
-
-#endif
-
-
-#ifdef HAVE_MF_BT2
-extern uint32_t
-lzma_mf_bt2_find(lzma_mf *mf, lzma_match *matches)
-{
-	header_find(true, 2);
-
-	hash_2_calc();
-
-	const uint32_t cur_match = mf->hash[hash_value];
-	mf->hash[hash_value] = pos;
-
-	bt_find(1);
-}
-
-
-extern void
-lzma_mf_bt2_skip(lzma_mf *mf, uint32_t amount)
-{
-	do {
-		header_skip(true, 2);
-
-		hash_2_calc();
-
-		const uint32_t cur_match = mf->hash[hash_value];
-		mf->hash[hash_value] = pos;
-
-		bt_skip();
-
-	} while (--amount != 0);
-}
-#endif
-
-
-#ifdef HAVE_MF_BT3
-extern uint32_t
-lzma_mf_bt3_find(lzma_mf *mf, lzma_match *matches)
-{
-	header_find(true, 3);
-
-	hash_3_calc();
-
-	const uint32_t delta2 = pos - mf->hash[hash_2_value];
-	const uint32_t cur_match = mf->hash[FIX_3_HASH_SIZE + hash_value];
-
-	mf->hash[hash_2_value] = pos;
-	mf->hash[FIX_3_HASH_SIZE + hash_value] = pos;
-
-	uint32_t len_best = 2;
-
-	if (delta2 < mf->cyclic_size && *(cur - delta2) == *cur) {
-		for ( ; len_best != len_limit; ++len_best)
-			if (*(cur + len_best - delta2) != cur[len_best])
-				break;
-
-		matches[0].len = len_best;
-		matches[0].dist = delta2 - 1;
-		matches_count = 1;
-
-		if (len_best == len_limit) {
-			bt_skip();
-			return 1; // matches_count
-		}
-	}
-
-	bt_find(len_best);
-}
-
-
-extern void
-lzma_mf_bt3_skip(lzma_mf *mf, uint32_t amount)
-{
-	do {
-		header_skip(true, 3);
-
-		hash_3_calc();
-
-		const uint32_t cur_match
-				= mf->hash[FIX_3_HASH_SIZE + hash_value];
-
-		mf->hash[hash_2_value] = pos;
-		mf->hash[FIX_3_HASH_SIZE + hash_value] = pos;
-
-		bt_skip();
-
-	} while (--amount != 0);
-}
-#endif
-
-
-#ifdef HAVE_MF_BT4
-extern uint32_t
-lzma_mf_bt4_find(lzma_mf *mf, lzma_match *matches)
-{
-	header_find(true, 4);
-
-	hash_4_calc();
-
-	uint32_t delta2 = pos - mf->hash[hash_2_value];
-	const uint32_t delta3
-			= pos - mf->hash[FIX_3_HASH_SIZE + hash_3_value];
-	const uint32_t cur_match = mf->hash[FIX_4_HASH_SIZE + hash_value];
-
-	mf->hash[hash_2_value] = pos;
-	mf->hash[FIX_3_HASH_SIZE + hash_3_value] = pos;
-	mf->hash[FIX_4_HASH_SIZE + hash_value] = pos;
-
-	uint32_t len_best = 1;
-
-	if (delta2 < mf->cyclic_size && *(cur - delta2) == *cur) {
-		len_best = 2;
-		matches[0].len = 2;
-		matches[0].dist = delta2 - 1;
-		matches_count = 1;
-	}
-
-	if (delta2 != delta3 && delta3 < mf->cyclic_size
-			&& *(cur - delta3) == *cur) {
-		len_best = 3;
-		matches[matches_count++].dist = delta3 - 1;
-		delta2 = delta3;
-	}
-
-	if (matches_count != 0) {
-		for ( ; len_best != len_limit; ++len_best)
-			if (*(cur + len_best - delta2) != cur[len_best])
-				break;
-
-		matches[matches_count - 1].len = len_best;
-
-		if (len_best == len_limit) {
-			bt_skip();
-			return matches_count;
-		}
-	}
-
-	if (len_best < 3)
-		len_best = 3;
-
-	bt_find(len_best);
-}
-
-
-extern void
-lzma_mf_bt4_skip(lzma_mf *mf, uint32_t amount)
-{
-	do {
-		header_skip(true, 4);
-
-		hash_4_calc();
-
-		const uint32_t cur_match
-				= mf->hash[FIX_4_HASH_SIZE + hash_value];
-
-		mf->hash[hash_2_value] = pos;
-		mf->hash[FIX_3_HASH_SIZE + hash_3_value] = pos;
-		mf->hash[FIX_4_HASH_SIZE + hash_value] = pos;
-
-		bt_skip();
-
-	} while (--amount != 0);
-}
-#endif
diff --git a/src/extra/xz/lzma/fastpos.h b/src/extra/xz/lzma/fastpos.h
deleted file mode 100644
index 4aea231..0000000
--- a/src/extra/xz/lzma/fastpos.h
+++ /dev/null
@@ -1,140 +0,0 @@
-///////////////////////////////////////////////////////////////////////////////
-//
-/// \file       fastpos.h
-/// \brief      Kind of two-bit version of bit scan reverse
-///
-//  Authors:    Igor Pavlov
-//              Lasse Collin
-//
-//  This file has been put into the public domain.
-//  You can do whatever you want with this file.
-//
-///////////////////////////////////////////////////////////////////////////////
-
-#ifndef LZMA_FASTPOS_H
-#define LZMA_FASTPOS_H
-
-// LZMA encodes match distances (positions) by storing the highest two
-// bits using a six-bit value [0, 63], and then the missing lower bits.
-// Dictionary size is also stored using this encoding in the new .lzma
-// file format header.
-//
-// fastpos.h provides a way to quickly find out the correct six-bit
-// values. The following table gives some examples of this encoding:
-//
-//      pos   return
-//       0       0
-//       1       1
-//       2       2
-//       3       3
-//       4       4
-//       5       4
-//       6       5
-//       7       5
-//       8       6
-//      11       6
-//      12       7
-//     ...      ...
-//      15       7
-//      16       8
-//      17       8
-//     ...      ...
-//      23       8
-//      24       9
-//      25       9
-//     ...      ...
-//
-//
-// Provided functions or macros
-// ----------------------------
-//
-// get_pos_slot(pos) is the basic version. get_pos_slot_2(pos)
-// assumes that pos >= FULL_DISTANCES, thus the result is at least
-// FULL_DISTANCES_BITS * 2. Using get_pos_slot(pos) instead of
-// get_pos_slot_2(pos) would give the same result, but get_pos_slot_2(pos)
-// should be tiny bit faster due to the assumption being made.
-//
-//
-// Size vs. speed
-// --------------
-//
-// With some CPUs that have fast BSR (bit scan reverse) instruction, the
-// size optimized version is slightly faster than the bigger table based
-// approach. Such CPUs include Intel Pentium Pro, Pentium II, Pentium III
-// and Core 2 (possibly others). AMD K7 seems to have slower BSR, but that
-// would still have speed roughly comparable to the table version. Older
-// x86 CPUs like the original Pentium have very slow BSR; on those systems
-// the table version is a lot faster.
-//
-// On some CPUs, the table version is a lot faster when using position
-// dependent code, but with position independent code the size optimized
-// version is slightly faster. This occurs at least on 32-bit SPARC (no
-// ASM optimizations).
-//
-// I'm making the table version the default, because that has good speed
-// on all systems I have tried. The size optimized version is sometimes
-// slightly faster, but sometimes it is a lot slower.
-
-#ifdef HAVE_SMALL
-#	define get_pos_slot(pos) ((pos) <= 4 ? (pos) : get_pos_slot_2(pos))
-
-static inline uint32_t
-get_pos_slot_2(uint32_t pos)
-{
-	const uint32_t i = bsr32(pos);
-	return (i + i) + ((pos >> (i - 1)) & 1);
-}
-
-
-#else
-
-#define FASTPOS_BITS 13
-
-extern const uint8_t lzma_fastpos[1 << FASTPOS_BITS];
-
-
-#define fastpos_shift(extra, n) \
-	((extra) + (n) * (FASTPOS_BITS - 1))
-
-#define fastpos_limit(extra, n) \
-	(UINT32_C(1) << (FASTPOS_BITS + fastpos_shift(extra, n)))
-
-#define fastpos_result(pos, extra, n) \
-	lzma_fastpos[(pos) >> fastpos_shift(extra, n)] \
-			+ 2 * fastpos_shift(extra, n)
-
-
-static inline uint32_t
-get_pos_slot(uint32_t pos)
-{
-	// If it is small enough, we can pick the result directly from
-	// the precalculated table.
-	if (pos < fastpos_limit(0, 0))
-		return lzma_fastpos[pos];
-
-	if (pos < fastpos_limit(0, 1))
-		return fastpos_result(pos, 0, 1);
-
-	return fastpos_result(pos, 0, 2);
-}
-
-
-#ifdef FULL_DISTANCES_BITS
-static inline uint32_t
-get_pos_slot_2(uint32_t pos)
-{
-	assert(pos >= FULL_DISTANCES);
-
-	if (pos < fastpos_limit(FULL_DISTANCES_BITS - 1, 0))
-		return fastpos_result(pos, FULL_DISTANCES_BITS - 1, 0);
-
-	if (pos < fastpos_limit(FULL_DISTANCES_BITS - 1, 1))
-		return fastpos_result(pos, FULL_DISTANCES_BITS - 1, 1);
-
-	return fastpos_result(pos, FULL_DISTANCES_BITS - 1, 2);
-}
-#endif
-
-#endif
-
-#endif
diff --git a/src/extra/xz/lzma/fastpos_table.c b/src/extra/xz/lzma/fastpos_table.c
deleted file mode 100644
index 6a3ceac..0000000
--- a/src/extra/xz/lzma/fastpos_table.c
+++ /dev/null
@@ -1,519 +0,0 @@
-/* This file has been automatically generated by fastpos_tablegen.c. */
-
-#include "common.h"
-#include "fastpos.h"
-
-const uint8_t lzma_fastpos[1 << FASTPOS_BITS] = {
-	  0,  1,  2,  3,  4,  4,  5,  5,  6,  6,  6,  6,  7,  7,  7,  7,
-	  8,  8,  8,  8,  8,  8,  8,  8,  9,  9,  9,  9,  9,  9,  9,  9,
-	 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10,
-	 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11,
-	 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12,
-	 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12,
-	 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
-	 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
-	 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14,
-	 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14,
-	 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14,
-	 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14,
-	 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
-	 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
-	 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
-	 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
-	 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
-	 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
-	 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
-	 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
-	 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
-	 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
-	 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
-	 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
-	 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17,
-	 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17,
-	 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17,
-	 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17,
-	 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17,
-	 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17,
-	 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17,
-	 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17,
-	 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18,
-	 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18,
-	 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18,
-	 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18,
-	 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18,
-	 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18,
-	 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18,
-	 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18,
-	 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18,
-	 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18,
-	 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18,
-	 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18,
-	 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18,
-	 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18,
-	 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18,
-	 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18,
-	 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
-	 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
-	 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
-	 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
-	 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
-	 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
-	 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
-	 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
-	 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
-	 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
-	 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
-	 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
-	 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
-	 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
-	 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
-	 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
-	 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
-	 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
-	 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
-	 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
-	 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
-	 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
-	 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
-	 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
-	 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
-	 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
-	 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
-	 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
-	 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
-	 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
-	 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
-	 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
-	 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
-	 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
-	 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
-	 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
-	 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
-	 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
-	 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
-	 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
-	 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
-	 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
-	 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
-	 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
-	 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
-	 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
-	 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
-	 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
-	 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21,
-	 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21,
-	 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21,
-	 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21,
-	 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21,
-	 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21,
-	 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21,
-	 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21,
-	 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21,
-	 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21,
-	 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21,
-	 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21,
-	 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21,
-	 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21,
-	 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21,
-	 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21,
-	 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21,
-	 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21,
-	 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21,
-	 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21,
-	 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21,
-	 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21,
-	 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21,
-	 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21,
-	 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21,
-	 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21,
-	 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21,
-	 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21,
-	 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21,
-	 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21,
-	 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21,
-	 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21,
-	 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22,
-	 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22,
-	 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22,
-	 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22,
-	 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22,
-	 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22,
-	 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22,
-	 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22,
-	 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22,
-	 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22,
-	 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22,
-	 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22,
-	 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22,
-	 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22,
-	 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22,
-	 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22,
-	 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22,
-	 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22,
-	 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22,
-	 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22,
-	 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22,
-	 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22,
-	 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22,
-	 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22,
-	 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22,
-	 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22,
-	 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22,
-	 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22,
-	 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22,
-	 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22,
-	 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22,
-	 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22,
-	 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22,
-	 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22,
-	 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22,
-	 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22,
-	 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22,
-	 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22,
-	 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22,
-	 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22,
-	 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22,
-	 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22,
-	 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22,
-	 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22,
-	 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22,
-	 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22,
-	 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22,
-	 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22,
-	 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22,
-	 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22,
-	 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22,
-	 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22,
-	 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22,
-	 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22,
-	 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22,
-	 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22,
-	 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22,
-	 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22,
-	 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22,
-	 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22,
-	 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22,
-	 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22,
-	 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22,
-	 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22,
-	 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
-	 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
-	 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
-	 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
-	 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
-	 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
-	 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
-	 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
-	 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
-	 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
-	 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
-	 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
-	 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
-	 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
-	 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
-	 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
-	 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
-	 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
-	 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
-	 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
-	 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
-	 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
-	 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
-	 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
-	 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
-	 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
-	 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
-	 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
-	 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
-	 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
-	 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
-	 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
-	 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
-	 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
-	 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
-	 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
-	 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
-	 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
-	 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
-	 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
-	 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
-	 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
-	 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
-	 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
-	 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
-	 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
-	 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
-	 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
-	 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
-	 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
-	 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
-	 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
-	 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
-	 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
-	 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
-	 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
-	 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
-	 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
-	 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
-	 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
-	 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
-	 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
-	 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
-	 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
-	 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
-	 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
-	 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
-	 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
-	 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
-	 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
-	 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
-	 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
-	 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
-	 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
-	 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
-	 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
-	 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
-	 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
-	 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
-	 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
-	 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
-	 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
-	 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
-	 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
-	 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
-	 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
-	 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
-	 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
-	 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
-	 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
-	 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
-	 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
-	 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
-	 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
-	 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
-	 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
-	 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
-	 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
-	 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
-	 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
-	 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
-	 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
-	 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
-	 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
-	 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
-	 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
-	 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
-	 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
-	 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
-	 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
-	 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
-	 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
-	 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
-	 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
-	 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
-	 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
-	 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
-	 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
-	 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
-	 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
-	 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
-	 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
-	 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
-	 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
-	 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
-	 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
-	 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
-	 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
-	 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
-	 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
-	 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
-	 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
-	 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
-	 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
-	 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
-	 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
-	 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
-	 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
-	 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
-	 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
-	 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
-	 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
-	 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
-	 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
-	 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
-	 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
-	 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
-	 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
-	 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
-	 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
-	 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
-	 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
-	 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
-	 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
-	 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
-	 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
-	 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
-	 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
-	 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
-	 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
-	 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
-	 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
-	 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
-	 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
-	 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
-	 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
-	 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
-	 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
-	 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
-	 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
-	 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
-	 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
-	 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
-	 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
-	 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
-	 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
-	 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
-	 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
-	 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
-	 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
-	 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
-	 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
-	 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
-	 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
-	 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
-	 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
-	 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
-	 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
-	 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
-	 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
-	 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
-	 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
-	 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
-	 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
-	 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
-	 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
-	 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
-	 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
-	 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
-	 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
-	 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
-	 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
-	 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
-	 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
-	 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
-	 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
-	 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
-	 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
-	 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
-	 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
-	 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
-	 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
-	 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
-	 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
-	 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
-	 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
-	 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
-	 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
-	 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
-	 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
-	 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
-	 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
-	 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
-	 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
-	 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
-	 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
-	 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
-	 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
-	 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
-	 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
-	 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
-	 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
-	 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
-	 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
-	 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
-	 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
-	 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
-	 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
-	 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
-	 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
-	 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
-	 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
-	 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
-	 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
-	 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
-	 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
-	 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
-	 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
-	 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
-	 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
-	 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
-	 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
-	 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
-	 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
-	 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
-	 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
-	 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
-	 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
-	 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
-	 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
-	 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
-	 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
-	 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
-	 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
-	 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
-	 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
-	 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
-	 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
-	 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
-	 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
-	 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
-	 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
-	 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
-	 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
-	 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
-	 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
-	 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
-	 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
-	 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
-	 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
-	 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
-	 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
-	 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
-	 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
-	 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
-	 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
-	 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
-	 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
-	 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
-	 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
-	 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
-	 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
-	 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
-	 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
-	 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
-	 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
-	 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
-	 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
-	 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
-	 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
-	 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
-	 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
-	 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
-	 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
-	 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
-	 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
-	 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
-	 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
-	 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
-	 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
-	 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
-	 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
-	 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
-	 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
-	 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
-	 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
-	 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
-	 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
-	 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
-	 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25
-};
diff --git a/src/extra/xz/lzma/fastpos_tablegen.c b/src/extra/xz/lzma/fastpos_tablegen.c
deleted file mode 100644
index c97e6f4..0000000
--- a/src/extra/xz/lzma/fastpos_tablegen.c
+++ /dev/null
@@ -1,56 +0,0 @@
-///////////////////////////////////////////////////////////////////////////////
-//
-/// \file       fastpos_tablegen.c
-/// \brief      Generates the lzma_fastpos[] lookup table
-///
-//  Authors:    Igor Pavlov
-//              Lasse Collin
-//
-//  This file has been put into the public domain.
-//  You can do whatever you want with this file.
-//
-///////////////////////////////////////////////////////////////////////////////
-
-#include <sys/types.h>
-#include <inttypes.h>
-#include <stdio.h>
-#include "fastpos.h"
-
-
-int
-main(void)
-{
-	uint8_t fastpos[1 << FASTPOS_BITS];
-
-	const uint8_t fast_slots = 2 * FASTPOS_BITS;
-	uint32_t c = 2;
-
-	fastpos[0] = 0;
-	fastpos[1] = 1;
-
-	for (uint8_t slot_fast = 2; slot_fast < fast_slots; ++slot_fast) {
-		const uint32_t k = 1 << ((slot_fast >> 1) - 1);
-		for (uint32_t j = 0; j < k; ++j, ++c)
-			fastpos[c] = slot_fast;
-	}
-
-	printf("/* This file has been automatically generated "
-			"by fastpos_tablegen.c. */\n\n"
-			"#include \"common.h\"\n"
-			"#include \"fastpos.h\"\n\n"
-			"const uint8_t lzma_fastpos[1 << FASTPOS_BITS] = {");
-
-	for (size_t i = 0; i < (1 << FASTPOS_BITS); ++i) {
-		if (i % 16 == 0)
-			printf("\n\t");
-
-		printf("%3u", (unsigned int)(fastpos[i]));
-
-		if (i != (1 << FASTPOS_BITS) - 1)
-			printf(",");
-	}
-
-	printf("\n};\n");
-
-	return 0;
-}
diff --git a/src/extra/xz/lzma/lzma2_decoder.c b/src/extra/xz/lzma/lzma2_decoder.c
deleted file mode 100644
index 3e42575..0000000
--- a/src/extra/xz/lzma/lzma2_decoder.c
+++ /dev/null
@@ -1,304 +0,0 @@
-///////////////////////////////////////////////////////////////////////////////
-//
-/// \file       lzma2_decoder.c
-/// \brief      LZMA2 decoder
-///
-//  Authors:    Igor Pavlov
-//              Lasse Collin
-//
-//  This file has been put into the public domain.
-//  You can do whatever you want with this file.
-//
-///////////////////////////////////////////////////////////////////////////////
-
-#include "lzma2_decoder.h"
-#include "lz_decoder.h"
-#include "lzma_decoder.h"
-
-
-struct lzma_coder_s {
-	enum sequence {
-		SEQ_CONTROL,
-		SEQ_UNCOMPRESSED_1,
-		SEQ_UNCOMPRESSED_2,
-		SEQ_COMPRESSED_0,
-		SEQ_COMPRESSED_1,
-		SEQ_PROPERTIES,
-		SEQ_LZMA,
-		SEQ_COPY,
-	} sequence;
-
-	/// Sequence after the size fields have been decoded.
-	enum sequence next_sequence;
-
-	/// LZMA decoder
-	lzma_lz_decoder lzma;
-
-	/// Uncompressed size of LZMA chunk
-	size_t uncompressed_size;
-
-	/// Compressed size of the chunk (naturally equals to uncompressed
-	/// size of uncompressed chunk)
-	size_t compressed_size;
-
-	/// True if properties are needed. This is false before the
-	/// first LZMA chunk.
-	bool need_properties;
-
-	/// True if dictionary reset is needed. This is false before the
-	/// first chunk (LZMA or uncompressed).
-	bool need_dictionary_reset;
-
-	lzma_options_lzma options;
-};
-
-
-static lzma_ret
-lzma2_decode(lzma_coder *restrict coder, lzma_dict *restrict dict,
-		const uint8_t *restrict in, size_t *restrict in_pos,
-		size_t in_size)
-{
-	// With SEQ_LZMA it is possible that no new input is needed to do
-	// some progress. The rest of the sequences assume that there is
-	// at least one byte of input.
-	while (*in_pos < in_size || coder->sequence == SEQ_LZMA)
-	switch (coder->sequence) {
-	case SEQ_CONTROL: {
-		const uint32_t control = in[*in_pos];
-		++*in_pos;
-
-		// End marker
-		if (control == 0x00)
-			return LZMA_STREAM_END;
-
-		if (control >= 0xE0 || control == 1) {
-			// Dictionary reset implies that next LZMA chunk has
-			// to set new properties.
-			coder->need_properties = true;
-			coder->need_dictionary_reset = true;
-		} else if (coder->need_dictionary_reset) {
-			return LZMA_DATA_ERROR;
-		}
-
-		if (control >= 0x80) {
-			// LZMA chunk. The highest five bits of the
-			// uncompressed size are taken from the control byte.
-			coder->uncompressed_size = (control & 0x1F) << 16;
-			coder->sequence = SEQ_UNCOMPRESSED_1;
-
-			// See if there are new properties or if we need to
-			// reset the state.
-			if (control >= 0xC0) {
-				// When there are new properties, state reset
-				// is done at SEQ_PROPERTIES.
-				coder->need_properties = false;
-				coder->next_sequence = SEQ_PROPERTIES;
-
-			} else if (coder->need_properties) {
-				return LZMA_DATA_ERROR;
-
-			} else {
-				coder->next_sequence = SEQ_LZMA;
-
-				// If only state reset is wanted with old
-				// properties, do the resetting here for
-				// simplicity.
-				if (control >= 0xA0)
-					coder->lzma.reset(coder->lzma.coder,
-							&coder->options);
-			}
-		} else {
-			// Invalid control values
-			if (control > 2)
-				return LZMA_DATA_ERROR;
-
-			// It's uncompressed chunk
-			coder->sequence = SEQ_COMPRESSED_0;
-			coder->next_sequence = SEQ_COPY;
-		}
-
-		if (coder->need_dictionary_reset) {
-			// Finish the dictionary reset and let the caller
-			// flush the dictionary to the actual output buffer.
-			coder->need_dictionary_reset = false;
-			dict_reset(dict);
-			return LZMA_OK;
-		}
-
-		break;
-	}
-
-	case SEQ_UNCOMPRESSED_1:
-		coder->uncompressed_size += (uint32_t)(in[(*in_pos)++]) << 8;
-		coder->sequence = SEQ_UNCOMPRESSED_2;
-		break;
-
-	case SEQ_UNCOMPRESSED_2:
-		coder->uncompressed_size += in[(*in_pos)++] + 1;
-		coder->sequence = SEQ_COMPRESSED_0;
-		coder->lzma.set_uncompressed(coder->lzma.coder,
-				coder->uncompressed_size);
-		break;
-
-	case SEQ_COMPRESSED_0:
-		coder->compressed_size = (uint32_t)(in[(*in_pos)++]) << 8;
-		coder->sequence = SEQ_COMPRESSED_1;
-		break;
-
-	case SEQ_COMPRESSED_1:
-		coder->compressed_size += in[(*in_pos)++] + 1;
-		coder->sequence = coder->next_sequence;
-		break;
-
-	case SEQ_PROPERTIES:
-		if (lzma_lzma_lclppb_decode(&coder->options, in[(*in_pos)++]))
-			return LZMA_DATA_ERROR;
-
-		coder->lzma.reset(coder->lzma.coder, &coder->options);
-
-		coder->sequence = SEQ_LZMA;
-		break;
-
-	case SEQ_LZMA: {
-		// Store the start offset so that we can update
-		// coder->compressed_size later.
-		const size_t in_start = *in_pos;
-
-		// Decode from in[] to *dict.
-		const lzma_ret ret = coder->lzma.code(coder->lzma.coder,
-				dict, in, in_pos, in_size);
-
-		// Validate and update coder->compressed_size.
-		const size_t in_used = *in_pos - in_start;
-		if (in_used > coder->compressed_size)
-			return LZMA_DATA_ERROR;
-
-		coder->compressed_size -= in_used;
-
-		// Return if we didn't finish the chunk, or an error occurred.
-		if (ret != LZMA_STREAM_END)
-			return ret;
-
-		// The LZMA decoder must have consumed the whole chunk now.
-		// We don't need to worry about uncompressed size since it
-		// is checked by the LZMA decoder.
-		if (coder->compressed_size != 0)
-			return LZMA_DATA_ERROR;
-
-		coder->sequence = SEQ_CONTROL;
-		break;
-	}
-
-	case SEQ_COPY: {
-		// Copy from input to the dictionary as is.
-		dict_write(dict, in, in_pos, in_size, &coder->compressed_size);
-		if (coder->compressed_size != 0)
-			return LZMA_OK;
-
-		coder->sequence = SEQ_CONTROL;
-		break;
-	}
-
-	default:
-		assert(0);
-		return LZMA_PROG_ERROR;
-	}
-
-	return LZMA_OK;
-}
-
-
-static void
-lzma2_decoder_end(lzma_coder *coder, lzma_allocator *allocator)
-{
-	assert(coder->lzma.end == NULL);
-	lzma_free(coder->lzma.coder, allocator);
-
-	lzma_free(coder, allocator);
-
-	return;
-}
-
-
-static lzma_ret
-lzma2_decoder_init(lzma_lz_decoder *lz, lzma_allocator *allocator,
-		const void *opt, lzma_lz_options *lz_options)
-{
-	if (lz->coder == NULL) {
-		lz->coder = lzma_alloc(sizeof(lzma_coder), allocator);
-		if (lz->coder == NULL)
-			return LZMA_MEM_ERROR;
-
-		lz->code = &lzma2_decode;
-		lz->end = &lzma2_decoder_end;
-
-		lz->coder->lzma = LZMA_LZ_DECODER_INIT;
-	}
-
-	const lzma_options_lzma *options = opt;
-
-	lz->coder->sequence = SEQ_CONTROL;
-	lz->coder->need_properties = true;
-	lz->coder->need_dictionary_reset = options->preset_dict == NULL
-			|| options->preset_dict_size == 0;
-
-	return lzma_lzma_decoder_create(&lz->coder->lzma,
-			allocator, options, lz_options);
-}
-
-
-extern lzma_ret
-lzma_lzma2_decoder_init(lzma_next_coder *next, lzma_allocator *allocator,
-		const lzma_filter_info *filters)
-{
-	// LZMA2 can only be the last filter in the chain. This is enforced
-	// by the raw_decoder initialization.
-	assert(filters[1].init == NULL);
-
-	return lzma_lz_decoder_init(next, allocator, filters,
-			&lzma2_decoder_init);
-}
-
-
-extern uint64_t
-lzma_lzma2_decoder_memusage(const void *options)
-{
-	return sizeof(lzma_coder)
-			+ lzma_lzma_decoder_memusage_nocheck(options);
-}
-
-
-extern lzma_ret
-lzma_lzma2_props_decode(void **options, lzma_allocator *allocator,
-		const uint8_t *props, size_t props_size)
-{
-	if (props_size != 1)
-		return LZMA_OPTIONS_ERROR;
-
-	// Check that reserved bits are unset.
-	if (props[0] & 0xC0)
-		return LZMA_OPTIONS_ERROR;
-
-	// Decode the dictionary size.
-	if (props[0] > 40)
-		return LZMA_OPTIONS_ERROR;
-
-	lzma_options_lzma *opt = lzma_alloc(
-			sizeof(lzma_options_lzma), allocator);
-	if (opt == NULL)
-		return LZMA_MEM_ERROR;
-
-	if (props[0] == 40) {
-		opt->dict_size = UINT32_MAX;
-	} else {
-		opt->dict_size = 2 | (props[0] & 1);
-		opt->dict_size <<= props[0] / 2 + 11;
-	}
-
-	opt->preset_dict = NULL;
-	opt->preset_dict_size = 0;
-
-	*options = opt;
-
-	return LZMA_OK;
-}
diff --git a/src/extra/xz/lzma/lzma2_decoder.h b/src/extra/xz/lzma/lzma2_decoder.h
deleted file mode 100644
index fac4ac4..0000000
--- a/src/extra/xz/lzma/lzma2_decoder.h
+++ /dev/null
@@ -1,28 +0,0 @@
-///////////////////////////////////////////////////////////////////////////////
-//
-/// \file       lzma2_decoder.h
-/// \brief      LZMA2 decoder
-///
-//  Authors:    Igor Pavlov
-//              Lasse Collin
-//
-//  This file has been put into the public domain.
-//  You can do whatever you want with this file.
-//
-///////////////////////////////////////////////////////////////////////////////
-
-#ifndef LZMA_LZMA2_DECODER_H
-#define LZMA_LZMA2_DECODER_H
-
-#include "common.h"
-
-extern lzma_ret lzma_lzma2_decoder_init(lzma_next_coder *next,
-		lzma_allocator *allocator, const lzma_filter_info *filters);
-
-extern uint64_t lzma_lzma2_decoder_memusage(const void *options);
-
-extern lzma_ret lzma_lzma2_props_decode(
-		void **options, lzma_allocator *allocator,
-		const uint8_t *props, size_t props_size);
-
-#endif
diff --git a/src/extra/xz/lzma/lzma2_encoder.c b/src/extra/xz/lzma/lzma2_encoder.c
deleted file mode 100644
index 992720c..0000000
--- a/src/extra/xz/lzma/lzma2_encoder.c
+++ /dev/null
@@ -1,393 +0,0 @@
-///////////////////////////////////////////////////////////////////////////////
-//
-/// \file       lzma2_encoder.c
-/// \brief      LZMA2 encoder
-///
-//  Authors:    Igor Pavlov
-//              Lasse Collin
-//
-//  This file has been put into the public domain.
-//  You can do whatever you want with this file.
-//
-///////////////////////////////////////////////////////////////////////////////
-
-#include "lz_encoder.h"
-#include "lzma_encoder.h"
-#include "fastpos.h"
-#include "lzma2_encoder.h"
-
-
-struct lzma_coder_s {
-	enum {
-		SEQ_INIT,
-		SEQ_LZMA_ENCODE,
-		SEQ_LZMA_COPY,
-		SEQ_UNCOMPRESSED_HEADER,
-		SEQ_UNCOMPRESSED_COPY,
-	} sequence;
-
-	/// LZMA encoder
-	lzma_coder *lzma;
-
-	/// LZMA options currently in use.
-	lzma_options_lzma opt_cur;
-
-	bool need_properties;
-	bool need_state_reset;
-	bool need_dictionary_reset;
-
-	/// Uncompressed size of a chunk
-	size_t uncompressed_size;
-
-	/// Compressed size of a chunk (excluding headers); this is also used
-	/// to indicate the end of buf[] in SEQ_LZMA_COPY.
-	size_t compressed_size;
-
-	/// Read position in buf[]
-	size_t buf_pos;
-
-	/// Buffer to hold the chunk header and LZMA compressed data
-	uint8_t buf[LZMA2_HEADER_MAX + LZMA2_CHUNK_MAX];
-};
-
-
-static void
-lzma2_header_lzma(lzma_coder *coder)
-{
-	assert(coder->uncompressed_size > 0);
-	assert(coder->uncompressed_size <= LZMA2_UNCOMPRESSED_MAX);
-	assert(coder->compressed_size > 0);
-	assert(coder->compressed_size <= LZMA2_CHUNK_MAX);
-
-	size_t pos;
-
-	if (coder->need_properties) {
-		pos = 0;
-
-		if (coder->need_dictionary_reset)
-			coder->buf[pos] = 0x80 + (3 << 5);
-		else
-			coder->buf[pos] = 0x80 + (2 << 5);
-	} else {
-		pos = 1;
-
-		if (coder->need_state_reset)
-			coder->buf[pos] = 0x80 + (1 << 5);
-		else
-			coder->buf[pos] = 0x80;
-	}
-
-	// Set the start position for copying.
-	coder->buf_pos = pos;
-
-	// Uncompressed size
-	size_t size = coder->uncompressed_size - 1;
-	coder->buf[pos++] += size >> 16;
-	coder->buf[pos++] = (size >> 8) & 0xFF;
-	coder->buf[pos++] = size & 0xFF;
-
-	// Compressed size
-	size = coder->compressed_size - 1;
-	coder->buf[pos++] = size >> 8;
-	coder->buf[pos++] = size & 0xFF;
-
-	// Properties, if needed
-	if (coder->need_properties)
-		lzma_lzma_lclppb_encode(&coder->opt_cur, coder->buf + pos);
-
-	coder->need_properties = false;
-	coder->need_state_reset = false;
-	coder->need_dictionary_reset = false;
-
-	// The copying code uses coder->compressed_size to indicate the end
-	// of coder->buf[], so we need add the maximum size of the header here.
-	coder->compressed_size += LZMA2_HEADER_MAX;
-
-	return;
-}
-
-
-static void
-lzma2_header_uncompressed(lzma_coder *coder)
-{
-	assert(coder->uncompressed_size > 0);
-	assert(coder->uncompressed_size <= LZMA2_CHUNK_MAX);
-
-	// If this is the first chunk, we need to include dictionary
-	// reset indicator.
-	if (coder->need_dictionary_reset)
-		coder->buf[0] = 1;
-	else
-		coder->buf[0] = 2;
-
-	coder->need_dictionary_reset = false;
-
-	// "Compressed" size
-	coder->buf[1] = (coder->uncompressed_size - 1) >> 8;
-	coder->buf[2] = (coder->uncompressed_size - 1) & 0xFF;
-
-	// Set the start position for copying.
-	coder->buf_pos = 0;
-	return;
-}
-
-
-static lzma_ret
-lzma2_encode(lzma_coder *restrict coder, lzma_mf *restrict mf,
-		uint8_t *restrict out, size_t *restrict out_pos,
-		size_t out_size)
-{
-	while (*out_pos < out_size)
-	switch (coder->sequence) {
-	case SEQ_INIT:
-		// If there's no input left and we are flushing or finishing,
-		// don't start a new chunk.
-		if (mf_unencoded(mf) == 0) {
-			// Write end of payload marker if finishing.
-			if (mf->action == LZMA_FINISH)
-				out[(*out_pos)++] = 0;
-
-			return mf->action == LZMA_RUN
-					? LZMA_OK : LZMA_STREAM_END;
-		}
-
-		if (coder->need_state_reset)
-			return_if_error(lzma_lzma_encoder_reset(
-					coder->lzma, &coder->opt_cur));
-
-		coder->uncompressed_size = 0;
-		coder->compressed_size = 0;
-		coder->sequence = SEQ_LZMA_ENCODE;
-
-	// Fall through
-
-	case SEQ_LZMA_ENCODE: {
-		// Calculate how much more uncompressed data this chunk
-		// could accept.
-		const uint32_t left = LZMA2_UNCOMPRESSED_MAX
-				- coder->uncompressed_size;
-		uint32_t limit;
-
-		if (left < mf->match_len_max) {
-			// Must flush immediately since the next LZMA symbol
-			// could make the uncompressed size of the chunk too
-			// big.
-			limit = 0;
-		} else {
-			// Calculate maximum read_limit that is OK from point
-			// of view of LZMA2 chunk size.
-			limit = mf->read_pos - mf->read_ahead
-					+ left - mf->match_len_max;
-		}
-
-		// Save the start position so that we can update
-		// coder->uncompressed_size.
-		const uint32_t read_start = mf->read_pos - mf->read_ahead;
-
-		// Call the LZMA encoder until the chunk is finished.
-		const lzma_ret ret = lzma_lzma_encode(coder->lzma, mf,
-				coder->buf + LZMA2_HEADER_MAX,
-				&coder->compressed_size,
-				LZMA2_CHUNK_MAX, limit);
-
-		coder->uncompressed_size += mf->read_pos - mf->read_ahead
-				- read_start;
-
-		assert(coder->compressed_size <= LZMA2_CHUNK_MAX);
-		assert(coder->uncompressed_size <= LZMA2_UNCOMPRESSED_MAX);
-
-		if (ret != LZMA_STREAM_END)
-			return LZMA_OK;
-
-		// See if the chunk compressed. If it didn't, we encode it
-		// as uncompressed chunk. This saves a few bytes of space
-		// and makes decoding faster.
-		if (coder->compressed_size >= coder->uncompressed_size) {
-			coder->uncompressed_size += mf->read_ahead;
-			assert(coder->uncompressed_size
-					<= LZMA2_UNCOMPRESSED_MAX);
-			mf->read_ahead = 0;
-			lzma2_header_uncompressed(coder);
-			coder->need_state_reset = true;
-			coder->sequence = SEQ_UNCOMPRESSED_HEADER;
-			break;
-		}
-
-		// The chunk did compress at least by one byte, so we store
-		// the chunk as LZMA.
-		lzma2_header_lzma(coder);
-
-		coder->sequence = SEQ_LZMA_COPY;
-	}
-
-	// Fall through
-
-	case SEQ_LZMA_COPY:
-		// Copy the compressed chunk along its headers to the
-		// output buffer.
-		lzma_bufcpy(coder->buf, &coder->buf_pos,
-				coder->compressed_size,
-				out, out_pos, out_size);
-		if (coder->buf_pos != coder->compressed_size)
-			return LZMA_OK;
-
-		coder->sequence = SEQ_INIT;
-		break;
-
-	case SEQ_UNCOMPRESSED_HEADER:
-		// Copy the three-byte header to indicate uncompressed chunk.
-		lzma_bufcpy(coder->buf, &coder->buf_pos,
-				LZMA2_HEADER_UNCOMPRESSED,
-				out, out_pos, out_size);
-		if (coder->buf_pos != LZMA2_HEADER_UNCOMPRESSED)
-			return LZMA_OK;
-
-		coder->sequence = SEQ_UNCOMPRESSED_COPY;
-
-	// Fall through
-
-	case SEQ_UNCOMPRESSED_COPY:
-		// Copy the uncompressed data as is from the dictionary
-		// to the output buffer.
-		mf_read(mf, out, out_pos, out_size, &coder->uncompressed_size);
-		if (coder->uncompressed_size != 0)
-			return LZMA_OK;
-
-		coder->sequence = SEQ_INIT;
-		break;
-	}
-
-	return LZMA_OK;
-}
-
-
-static void
-lzma2_encoder_end(lzma_coder *coder, lzma_allocator *allocator)
-{
-	lzma_free(coder->lzma, allocator);
-	lzma_free(coder, allocator);
-	return;
-}
-
-
-static lzma_ret
-lzma2_encoder_options_update(lzma_coder *coder, const lzma_filter *filter)
-{
-	// New options can be set only when there is no incomplete chunk.
-	// This is the case at the beginning of the raw stream and right
-	// after LZMA_SYNC_FLUSH.
-	if (filter->options == NULL || coder->sequence != SEQ_INIT)
-		return LZMA_PROG_ERROR;
-
-	// Look if there are new options. At least for now,
-	// only lc/lp/pb can be changed.
-	const lzma_options_lzma *opt = filter->options;
-	if (coder->opt_cur.lc != opt->lc || coder->opt_cur.lp != opt->lp
-			|| coder->opt_cur.pb != opt->pb) {
-		// Validate the options.
-		if (opt->lc > LZMA_LCLP_MAX || opt->lp > LZMA_LCLP_MAX
-				|| opt->lc + opt->lp > LZMA_LCLP_MAX
-				|| opt->pb > LZMA_PB_MAX)
-			return LZMA_OPTIONS_ERROR;
-
-		// The new options will be used when the encoder starts
-		// a new LZMA2 chunk.
-		coder->opt_cur.lc = opt->lc;
-		coder->opt_cur.lp = opt->lp;
-		coder->opt_cur.pb = opt->pb;
-		coder->need_properties = true;
-		coder->need_state_reset = true;
-	}
-
-	return LZMA_OK;
-}
-
-
-static lzma_ret
-lzma2_encoder_init(lzma_lz_encoder *lz, lzma_allocator *allocator,
-		const void *options, lzma_lz_options *lz_options)
-{
-	if (options == NULL)
-		return LZMA_PROG_ERROR;
-
-	if (lz->coder == NULL) {
-		lz->coder = lzma_alloc(sizeof(lzma_coder), allocator);
-		if (lz->coder == NULL)
-			return LZMA_MEM_ERROR;
-
-		lz->code = &lzma2_encode;
-		lz->end = &lzma2_encoder_end;
-		lz->options_update = &lzma2_encoder_options_update;
-
-		lz->coder->lzma = NULL;
-	}
-
-	lz->coder->opt_cur = *(const lzma_options_lzma *)(options);
-
-	lz->coder->sequence = SEQ_INIT;
-	lz->coder->need_properties = true;
-	lz->coder->need_state_reset = false;
-	lz->coder->need_dictionary_reset
-			= lz->coder->opt_cur.preset_dict == NULL
-			|| lz->coder->opt_cur.preset_dict_size == 0;
-
-	// Initialize LZMA encoder
-	return_if_error(lzma_lzma_encoder_create(&lz->coder->lzma, allocator,
-			&lz->coder->opt_cur, lz_options));
-
-	// Make sure that we will always have enough history available in
-	// case we need to use uncompressed chunks. They are used when the
-	// compressed size of a chunk is not smaller than the uncompressed
-	// size, so we need to have at least LZMA2_COMPRESSED_MAX bytes
-	// history available.
-	if (lz_options->before_size + lz_options->dict_size < LZMA2_CHUNK_MAX)
-		lz_options->before_size
-				= LZMA2_CHUNK_MAX - lz_options->dict_size;
-
-	return LZMA_OK;
-}
-
-
-extern lzma_ret
-lzma_lzma2_encoder_init(lzma_next_coder *next, lzma_allocator *allocator,
-		const lzma_filter_info *filters)
-{
-	return lzma_lz_encoder_init(
-			next, allocator, filters, &lzma2_encoder_init);
-}
-
-
-extern uint64_t
-lzma_lzma2_encoder_memusage(const void *options)
-{
-	const uint64_t lzma_mem = lzma_lzma_encoder_memusage(options);
-	if (lzma_mem == UINT64_MAX)
-		return UINT64_MAX;
-
-	return sizeof(lzma_coder) + lzma_mem;
-}
-
-
-extern lzma_ret
-lzma_lzma2_props_encode(const void *options, uint8_t *out)
-{
-	const lzma_options_lzma *const opt = options;
-	uint32_t d = my_max(opt->dict_size, LZMA_DICT_SIZE_MIN);
-
-	// Round up to the next 2^n - 1 or 2^n + 2^(n - 1) - 1 depending
-	// on which one is the next:
-	--d;
-	d |= d >> 2;
-	d |= d >> 3;
-	d |= d >> 4;
-	d |= d >> 8;
-	d |= d >> 16;
-
-	// Get the highest two bits using the proper encoding:
-	if (d == UINT32_MAX)
-		out[0] = 40;
-	else
-		out[0] = get_pos_slot(d + 1) - 24;
-
-	return LZMA_OK;
-}
diff --git a/src/extra/xz/lzma/lzma2_encoder.h b/src/extra/xz/lzma/lzma2_encoder.h
deleted file mode 100644
index ca19ef4..0000000
--- a/src/extra/xz/lzma/lzma2_encoder.h
+++ /dev/null
@@ -1,41 +0,0 @@
-///////////////////////////////////////////////////////////////////////////////
-//
-/// \file       lzma2_encoder.h
-/// \brief      LZMA2 encoder
-///
-//  Authors:    Igor Pavlov
-//              Lasse Collin
-//
-//  This file has been put into the public domain.
-//  You can do whatever you want with this file.
-//
-///////////////////////////////////////////////////////////////////////////////
-
-#ifndef LZMA_LZMA2_ENCODER_H
-#define LZMA_LZMA2_ENCODER_H
-
-#include "common.h"
-
-
-/// Maximum number of bytes of actual data per chunk (no headers)
-#define LZMA2_CHUNK_MAX (UINT32_C(1) << 16)
-
-/// Maximum uncompressed size of LZMA chunk (no headers)
-#define LZMA2_UNCOMPRESSED_MAX (UINT32_C(1) << 21)
-
-/// Maximum size of LZMA2 headers
-#define LZMA2_HEADER_MAX 6
-
-/// Size of a header for uncompressed chunk
-#define LZMA2_HEADER_UNCOMPRESSED 3
-
-
-extern lzma_ret lzma_lzma2_encoder_init(
-		lzma_next_coder *next, lzma_allocator *allocator,
-		const lzma_filter_info *filters);
-
-extern uint64_t lzma_lzma2_encoder_memusage(const void *options);
-
-extern lzma_ret lzma_lzma2_props_encode(const void *options, uint8_t *out);
-
-#endif
diff --git a/src/extra/xz/lzma/lzma_common.h b/src/extra/xz/lzma/lzma_common.h
deleted file mode 100644
index e31e285..0000000
--- a/src/extra/xz/lzma/lzma_common.h
+++ /dev/null
@@ -1,223 +0,0 @@
-///////////////////////////////////////////////////////////////////////////////
-//
-/// \file       lzma_common.h
-/// \brief      Private definitions common to LZMA encoder and decoder
-///
-//  Authors:    Igor Pavlov
-//              Lasse Collin
-//
-//  This file has been put into the public domain.
-//  You can do whatever you want with this file.
-//
-///////////////////////////////////////////////////////////////////////////////
-
-#ifndef LZMA_LZMA_COMMON_H
-#define LZMA_LZMA_COMMON_H
-
-#include "common.h"
-#include "range_common.h"
-
-
-///////////////////
-// Miscellaneous //
-///////////////////
-
-/// Maximum number of position states. A position state is the lowest pos bits
-/// number of bits of the current uncompressed offset. In some places there
-/// are different sets of probabilities for different pos states.
-#define POS_STATES_MAX (1 << LZMA_PB_MAX)
-
-
-/// Validates lc, lp, and pb.
-static inline bool
-is_lclppb_valid(const lzma_options_lzma *options)
-{
-	return options->lc <= LZMA_LCLP_MAX && options->lp <= LZMA_LCLP_MAX
-			&& options->lc + options->lp <= LZMA_LCLP_MAX
-			&& options->pb <= LZMA_PB_MAX;
-}
-
-
-///////////
-// State //
-///////////
-
-/// This enum is used to track which events have occurred most recently and
-/// in which order. This information is used to predict the next event.
-///
-/// Events:
-///  - Literal: One 8-bit byte
-///  - Match: Repeat a chunk of data at some distance
-///  - Long repeat: Multi-byte match at a recently seen distance
-///  - Short repeat: One-byte repeat at a recently seen distance
-///
-/// The event names are in from STATE_oldest_older_previous. REP means
-/// either short or long repeated match, and NONLIT means any non-literal.
-typedef enum {
-	STATE_LIT_LIT,
-	STATE_MATCH_LIT_LIT,
-	STATE_REP_LIT_LIT,
-	STATE_SHORTREP_LIT_LIT,
-	STATE_MATCH_LIT,
-	STATE_REP_LIT,
-	STATE_SHORTREP_LIT,
-	STATE_LIT_MATCH,
-	STATE_LIT_LONGREP,
-	STATE_LIT_SHORTREP,
-	STATE_NONLIT_MATCH,
-	STATE_NONLIT_REP,
-} lzma_lzma_state;
-
-
-/// Total number of states
-#define STATES 12
-
-/// The lowest 7 states indicate that the previous state was a literal.
-#define LIT_STATES 7
-
-
-/// Indicate that the latest state was a literal.
-#define update_literal(state) \
-	state = ((state) <= STATE_SHORTREP_LIT_LIT \
-			? STATE_LIT_LIT \
-			: ((state) <= STATE_LIT_SHORTREP \
-				? (state) - 3 \
-				: (state) - 6))
-
-/// Indicate that the latest state was a match.
-#define update_match(state) \
-	state = ((state) < LIT_STATES ? STATE_LIT_MATCH : STATE_NONLIT_MATCH)
-
-/// Indicate that the latest state was a long repeated match.
-#define update_long_rep(state) \
-	state = ((state) < LIT_STATES ? STATE_LIT_LONGREP : STATE_NONLIT_REP)
-
-/// Indicate that the latest state was a short match.
-#define update_short_rep(state) \
-	state = ((state) < LIT_STATES ? STATE_LIT_SHORTREP : STATE_NONLIT_REP)
-
-/// Test if the previous state was a literal.
-#define is_literal_state(state) \
-	((state) < LIT_STATES)
-
-
-/////////////
-// Literal //
-/////////////
-
-/// Each literal coder is divided in three sections:
-///   - 0x001-0x0FF: Without match byte
-///   - 0x101-0x1FF: With match byte; match bit is 0
-///   - 0x201-0x2FF: With match byte; match bit is 1
-///
-/// Match byte is used when the previous LZMA symbol was something else than
-/// a literal (that is, it was some kind of match).
-#define LITERAL_CODER_SIZE 0x300
-
-/// Maximum number of literal coders
-#define LITERAL_CODERS_MAX (1 << LZMA_LCLP_MAX)
-
-/// Locate the literal coder for the next literal byte. The choice depends on
-///   - the lowest literal_pos_bits bits of the position of the current
-///     byte; and
-///   - the highest literal_context_bits bits of the previous byte.
-#define literal_subcoder(probs, lc, lp_mask, pos, prev_byte) \
-	((probs)[(((pos) & lp_mask) << lc) + ((prev_byte) >> (8 - lc))])
-
-
-static inline void
-literal_init(probability (*probs)[LITERAL_CODER_SIZE],
-		uint32_t lc, uint32_t lp)
-{
-	assert(lc + lp <= LZMA_LCLP_MAX);
-
-	const uint32_t coders = 1U << (lc + lp);
-
-	for (uint32_t i = 0; i < coders; ++i)
-		for (uint32_t j = 0; j < LITERAL_CODER_SIZE; ++j)
-			bit_reset(probs[i][j]);
-
-	return;
-}
-
-
-//////////////////
-// Match length //
-//////////////////
-
-// Minimum length of a match is two bytes.
-#define MATCH_LEN_MIN 2
-
-// Match length is encoded with 4, 5, or 10 bits.
-//
-// Length   Bits
-//  2-9      4 = Choice=0 + 3 bits
-// 10-17     5 = Choice=1 + Choice2=0 + 3 bits
-// 18-273   10 = Choice=1 + Choice2=1 + 8 bits
-#define LEN_LOW_BITS 3
-#define LEN_LOW_SYMBOLS (1 << LEN_LOW_BITS)
-#define LEN_MID_BITS 3
-#define LEN_MID_SYMBOLS (1 << LEN_MID_BITS)
-#define LEN_HIGH_BITS 8
-#define LEN_HIGH_SYMBOLS (1 << LEN_HIGH_BITS)
-#define LEN_SYMBOLS (LEN_LOW_SYMBOLS + LEN_MID_SYMBOLS + LEN_HIGH_SYMBOLS)
-
-// Maximum length of a match is 273 which is a result of the encoding
-// described above.
-#define MATCH_LEN_MAX (MATCH_LEN_MIN + LEN_SYMBOLS - 1)
-
-
-////////////////////
-// Match distance //
-////////////////////
-
-// Different set of probabilities is used for match distances that have very
-// short match length: Lengths of 2, 3, and 4 bytes have a separate set of
-// probabilities for each length. The matches with longer length use a shared
-// set of probabilities.
-#define LEN_TO_POS_STATES 4
-
-// Macro to get the index of the appropriate probability array.
-#define get_len_to_pos_state(len) \
-	((len) < LEN_TO_POS_STATES + MATCH_LEN_MIN \
-		? (len) - MATCH_LEN_MIN \
-		: LEN_TO_POS_STATES - 1)
-
-// The highest two bits of a match distance (pos slot) are encoded using six
-// bits. See fastpos.h for more explanation.
-#define POS_SLOT_BITS 6
-#define POS_SLOTS (1 << POS_SLOT_BITS)
-
-// Match distances up to 127 are fully encoded using probabilities. Since
-// the highest two bits (pos slot) are always encoded using six bits, the
-// distances 0-3 don't need any additional bits to encode, since the pos
-// slot itself is the same as the actual distance. START_POS_MODEL_INDEX
-// indicates the first pos slot where at least one additional bit is needed.
-#define START_POS_MODEL_INDEX 4
-
-// Match distances greater than 127 are encoded in three pieces:
-//   - pos slot: the highest two bits
-//   - direct bits: 2-26 bits below the highest two bits
-//   - alignment bits: four lowest bits
-//
-// Direct bits don't use any probabilities.
-//
-// The pos slot value of 14 is for distances 128-191 (see the table in
-// fastpos.h to understand why).
-#define END_POS_MODEL_INDEX 14
-
-// Pos slots that indicate a distance <= 127.
-#define FULL_DISTANCES_BITS (END_POS_MODEL_INDEX / 2)
-#define FULL_DISTANCES (1 << FULL_DISTANCES_BITS)
-
-// For match distances greater than 127, only the highest two bits and the
-// lowest four bits (alignment) is encoded using probabilities.
-#define ALIGN_BITS 4
-#define ALIGN_TABLE_SIZE (1 << ALIGN_BITS)
-#define ALIGN_MASK (ALIGN_TABLE_SIZE - 1)
-
-// LZMA remembers the four most recent match distances. Reusing these distances
-// tends to take less space than re-encoding the actual distance value.
-#define REP_DISTANCES 4
-
-#endif
diff --git a/src/extra/xz/lzma/lzma_decoder.c b/src/extra/xz/lzma/lzma_decoder.c
deleted file mode 100644
index 9979bb4..0000000
--- a/src/extra/xz/lzma/lzma_decoder.c
+++ /dev/null
@@ -1,1057 +0,0 @@
-///////////////////////////////////////////////////////////////////////////////
-//
-/// \file       lzma_decoder.c
-/// \brief      LZMA decoder
-///
-//  Authors:    Igor Pavlov
-//              Lasse Collin
-//
-//  This file has been put into the public domain.
-//  You can do whatever you want with this file.
-//
-///////////////////////////////////////////////////////////////////////////////
-
-#include "lz_decoder.h"
-#include "lzma_common.h"
-#include "lzma_decoder.h"
-#include "range_decoder.h"
-
-
-#ifdef HAVE_SMALL
-
-// Macros for (somewhat) size-optimized code.
-#define seq_4(seq) seq
-
-#define seq_6(seq) seq
-
-#define seq_8(seq) seq
-
-#define seq_len(seq) \
-	seq ## _CHOICE, \
-	seq ## _CHOICE2, \
-	seq ## _BITTREE
-
-#define len_decode(target, ld, pos_state, seq) \
-do { \
-case seq ## _CHOICE: \
-	rc_if_0(ld.choice, seq ## _CHOICE) { \
-		rc_update_0(ld.choice); \
-		probs = ld.low[pos_state];\
-		limit = LEN_LOW_SYMBOLS; \
-		target = MATCH_LEN_MIN; \
-	} else { \
-		rc_update_1(ld.choice); \
-case seq ## _CHOICE2: \
-		rc_if_0(ld.choice2, seq ## _CHOICE2) { \
-			rc_update_0(ld.choice2); \
-			probs = ld.mid[pos_state]; \
-			limit = LEN_MID_SYMBOLS; \
-			target = MATCH_LEN_MIN + LEN_LOW_SYMBOLS; \
-		} else { \
-			rc_update_1(ld.choice2); \
-			probs = ld.high; \
-			limit = LEN_HIGH_SYMBOLS; \
-			target = MATCH_LEN_MIN + LEN_LOW_SYMBOLS \
-					+ LEN_MID_SYMBOLS; \
-		} \
-	} \
-	symbol = 1; \
-case seq ## _BITTREE: \
-	do { \
-		rc_bit(probs[symbol], , , seq ## _BITTREE); \
-	} while (symbol < limit); \
-	target += symbol - limit; \
-} while (0)
-
-#else // HAVE_SMALL
-
-// Unrolled versions
-#define seq_4(seq) \
-	seq ## 0, \
-	seq ## 1, \
-	seq ## 2, \
-	seq ## 3
-
-#define seq_6(seq) \
-	seq ## 0, \
-	seq ## 1, \
-	seq ## 2, \
-	seq ## 3, \
-	seq ## 4, \
-	seq ## 5
-
-#define seq_8(seq) \
-	seq ## 0, \
-	seq ## 1, \
-	seq ## 2, \
-	seq ## 3, \
-	seq ## 4, \
-	seq ## 5, \
-	seq ## 6, \
-	seq ## 7
-
-#define seq_len(seq) \
-	seq ## _CHOICE, \
-	seq ## _LOW0, \
-	seq ## _LOW1, \
-	seq ## _LOW2, \
-	seq ## _CHOICE2, \
-	seq ## _MID0, \
-	seq ## _MID1, \
-	seq ## _MID2, \
-	seq ## _HIGH0, \
-	seq ## _HIGH1, \
-	seq ## _HIGH2, \
-	seq ## _HIGH3, \
-	seq ## _HIGH4, \
-	seq ## _HIGH5, \
-	seq ## _HIGH6, \
-	seq ## _HIGH7
-
-#define len_decode(target, ld, pos_state, seq) \
-do { \
-	symbol = 1; \
-case seq ## _CHOICE: \
-	rc_if_0(ld.choice, seq ## _CHOICE) { \
-		rc_update_0(ld.choice); \
-		rc_bit_case(ld.low[pos_state][symbol], , , seq ## _LOW0); \
-		rc_bit_case(ld.low[pos_state][symbol], , , seq ## _LOW1); \
-		rc_bit_case(ld.low[pos_state][symbol], , , seq ## _LOW2); \
-		target = symbol - LEN_LOW_SYMBOLS + MATCH_LEN_MIN; \
-	} else { \
-		rc_update_1(ld.choice); \
-case seq ## _CHOICE2: \
-		rc_if_0(ld.choice2, seq ## _CHOICE2) { \
-			rc_update_0(ld.choice2); \
-			rc_bit_case(ld.mid[pos_state][symbol], , , \
-					seq ## _MID0); \
-			rc_bit_case(ld.mid[pos_state][symbol], , , \
-					seq ## _MID1); \
-			rc_bit_case(ld.mid[pos_state][symbol], , , \
-					seq ## _MID2); \
-			target = symbol - LEN_MID_SYMBOLS \
-					+ MATCH_LEN_MIN + LEN_LOW_SYMBOLS; \
-		} else { \
-			rc_update_1(ld.choice2); \
-			rc_bit_case(ld.high[symbol], , , seq ## _HIGH0); \
-			rc_bit_case(ld.high[symbol], , , seq ## _HIGH1); \
-			rc_bit_case(ld.high[symbol], , , seq ## _HIGH2); \
-			rc_bit_case(ld.high[symbol], , , seq ## _HIGH3); \
-			rc_bit_case(ld.high[symbol], , , seq ## _HIGH4); \
-			rc_bit_case(ld.high[symbol], , , seq ## _HIGH5); \
-			rc_bit_case(ld.high[symbol], , , seq ## _HIGH6); \
-			rc_bit_case(ld.high[symbol], , , seq ## _HIGH7); \
-			target = symbol - LEN_HIGH_SYMBOLS \
-					+ MATCH_LEN_MIN \
-					+ LEN_LOW_SYMBOLS + LEN_MID_SYMBOLS; \
-		} \
-	} \
-} while (0)
-
-#endif // HAVE_SMALL
-
-
-/// Length decoder probabilities; see comments in lzma_common.h.
-typedef struct {
-	probability choice;
-	probability choice2;
-	probability low[POS_STATES_MAX][LEN_LOW_SYMBOLS];
-	probability mid[POS_STATES_MAX][LEN_MID_SYMBOLS];
-	probability high[LEN_HIGH_SYMBOLS];
-} lzma_length_decoder;
-
-
-struct lzma_coder_s {
-	///////////////////
-	// Probabilities //
-	///////////////////
-
-	/// Literals; see comments in lzma_common.h.
-	probability literal[LITERAL_CODERS_MAX][LITERAL_CODER_SIZE];
-
-	/// If 1, it's a match. Otherwise it's a single 8-bit literal.
-	probability is_match[STATES][POS_STATES_MAX];
-
-	/// If 1, it's a repeated match. The distance is one of rep0 .. rep3.
-	probability is_rep[STATES];
-
-	/// If 0, distance of a repeated match is rep0.
-	/// Otherwise check is_rep1.
-	probability is_rep0[STATES];
-
-	/// If 0, distance of a repeated match is rep1.
-	/// Otherwise check is_rep2.
-	probability is_rep1[STATES];
-
-	/// If 0, distance of a repeated match is rep2. Otherwise it is rep3.
-	probability is_rep2[STATES];
-
-	/// If 1, the repeated match has length of one byte. Otherwise
-	/// the length is decoded from rep_len_decoder.
-	probability is_rep0_long[STATES][POS_STATES_MAX];
-
-	/// Probability tree for the highest two bits of the match distance.
-	/// There is a separate probability tree for match lengths of
-	/// 2 (i.e. MATCH_LEN_MIN), 3, 4, and [5, 273].
-	probability pos_slot[LEN_TO_POS_STATES][POS_SLOTS];
-
-	/// Probability trees for additional bits for match distance when the
-	/// distance is in the range [4, 127].
-	probability pos_special[FULL_DISTANCES - END_POS_MODEL_INDEX];
-
-	/// Probability tree for the lowest four bits of a match distance
-	/// that is equal to or greater than 128.
-	probability pos_align[ALIGN_TABLE_SIZE];
-
-	/// Length of a normal match
-	lzma_length_decoder match_len_decoder;
-
-	/// Length of a repeated match
-	lzma_length_decoder rep_len_decoder;
-
-	///////////////////
-	// Decoder state //
-	///////////////////
-
-	// Range coder
-	lzma_range_decoder rc;
-
-	// Types of the most recently seen LZMA symbols
-	lzma_lzma_state state;
-
-	uint32_t rep0;      ///< Distance of the latest match
-	uint32_t rep1;      ///< Distance of second latest match
-	uint32_t rep2;      ///< Distance of third latest match
-	uint32_t rep3;      ///< Distance of fourth latest match
-
-	uint32_t pos_mask; // (1U << pb) - 1
-	uint32_t literal_context_bits;
-	uint32_t literal_pos_mask;
-
-	/// Uncompressed size as bytes, or LZMA_VLI_UNKNOWN if end of
-	/// payload marker is expected.
-	lzma_vli uncompressed_size;
-
-	////////////////////////////////
-	// State of incomplete symbol //
-	////////////////////////////////
-
-	/// Position where to continue the decoder loop
-	enum {
-		SEQ_NORMALIZE,
-		SEQ_IS_MATCH,
-		seq_8(SEQ_LITERAL),
-		seq_8(SEQ_LITERAL_MATCHED),
-		SEQ_LITERAL_WRITE,
-		SEQ_IS_REP,
-		seq_len(SEQ_MATCH_LEN),
-		seq_6(SEQ_POS_SLOT),
-		SEQ_POS_MODEL,
-		SEQ_DIRECT,
-		seq_4(SEQ_ALIGN),
-		SEQ_EOPM,
-		SEQ_IS_REP0,
-		SEQ_SHORTREP,
-		SEQ_IS_REP0_LONG,
-		SEQ_IS_REP1,
-		SEQ_IS_REP2,
-		seq_len(SEQ_REP_LEN),
-		SEQ_COPY,
-	} sequence;
-
-	/// Base of the current probability tree
-	probability *probs;
-
-	/// Symbol being decoded. This is also used as an index variable in
-	/// bittree decoders: probs[symbol]
-	uint32_t symbol;
-
-	/// Used as a loop termination condition on bittree decoders and
-	/// direct bits decoder.
-	uint32_t limit;
-
-	/// Matched literal decoder: 0x100 or 0 to help avoiding branches.
-	/// Bittree reverse decoders: Offset of the next bit: 1 << offset
-	uint32_t offset;
-
-	/// If decoding a literal: match byte.
-	/// If decoding a match: length of the match.
-	uint32_t len;
-};
-
-
-static lzma_ret
-lzma_decode(lzma_coder *restrict coder, lzma_dict *restrict dictptr,
-		const uint8_t *restrict in,
-		size_t *restrict in_pos, size_t in_size)
-{
-	////////////////////
-	// Initialization //
-	////////////////////
-
-	if (!rc_read_init(&coder->rc, in, in_pos, in_size))
-		return LZMA_OK;
-
-	///////////////
-	// Variables //
-	///////////////
-
-	// Making local copies of often-used variables improves both
-	// speed and readability.
-
-	lzma_dict dict = *dictptr;
-
-	const size_t dict_start = dict.pos;
-
-	// Range decoder
-	rc_to_local(coder->rc, *in_pos);
-
-	// State
-	uint32_t state = coder->state;
-	uint32_t rep0 = coder->rep0;
-	uint32_t rep1 = coder->rep1;
-	uint32_t rep2 = coder->rep2;
-	uint32_t rep3 = coder->rep3;
-
-	const uint32_t pos_mask = coder->pos_mask;
-
-	// These variables are actually needed only if we last time ran
-	// out of input in the middle of the decoder loop.
-	probability *probs = coder->probs;
-	uint32_t symbol = coder->symbol;
-	uint32_t limit = coder->limit;
-	uint32_t offset = coder->offset;
-	uint32_t len = coder->len;
-
-	const uint32_t literal_pos_mask = coder->literal_pos_mask;
-	const uint32_t literal_context_bits = coder->literal_context_bits;
-
-	// Temporary variables
-	uint32_t pos_state = dict.pos & pos_mask;
-
-	lzma_ret ret = LZMA_OK;
-
-	// If uncompressed size is known, there must be no end of payload
-	// marker.
-	const bool no_eopm = coder->uncompressed_size
-			!= LZMA_VLI_UNKNOWN;
-	if (no_eopm && coder->uncompressed_size < dict.limit - dict.pos)
-		dict.limit = dict.pos + (size_t)(coder->uncompressed_size);
-
-	// The main decoder loop. The "switch" is used to restart the decoder at
-	// correct location. Once restarted, the "switch" is no longer used.
-	switch (coder->sequence)
-	while (true) {
-		// Calculate new pos_state. This is skipped on the first loop
-		// since we already calculated it when setting up the local
-		// variables.
-		pos_state = dict.pos & pos_mask;
-
-	case SEQ_NORMALIZE:
-	case SEQ_IS_MATCH:
-		if (unlikely(no_eopm && dict.pos == dict.limit))
-			break;
-
-		rc_if_0(coder->is_match[state][pos_state], SEQ_IS_MATCH) {
-			rc_update_0(coder->is_match[state][pos_state]);
-
-			// It's a literal i.e. a single 8-bit byte.
-
-			probs = literal_subcoder(coder->literal,
-					literal_context_bits, literal_pos_mask,
-					dict.pos, dict_get(&dict, 0));
-			symbol = 1;
-
-			if (is_literal_state(state)) {
-				// Decode literal without match byte.
-#ifdef HAVE_SMALL
-	case SEQ_LITERAL:
-				do {
-					rc_bit(probs[symbol], , , SEQ_LITERAL);
-				} while (symbol < (1 << 8));
-#else
-				rc_bit_case(probs[symbol], , , SEQ_LITERAL0);
-				rc_bit_case(probs[symbol], , , SEQ_LITERAL1);
-				rc_bit_case(probs[symbol], , , SEQ_LITERAL2);
-				rc_bit_case(probs[symbol], , , SEQ_LITERAL3);
-				rc_bit_case(probs[symbol], , , SEQ_LITERAL4);
-				rc_bit_case(probs[symbol], , , SEQ_LITERAL5);
-				rc_bit_case(probs[symbol], , , SEQ_LITERAL6);
-				rc_bit_case(probs[symbol], , , SEQ_LITERAL7);
-#endif
-			} else {
-				// Decode literal with match byte.
-				//
-				// We store the byte we compare against
-				// ("match byte") to "len" to minimize the
-				// number of variables we need to store
-				// between decoder calls.
-				len = dict_get(&dict, rep0) << 1;
-
-				// The usage of "offset" allows omitting some
-				// branches, which should give tiny speed
-				// improvement on some CPUs. "offset" gets
-				// set to zero if match_bit didn't match.
-				offset = 0x100;
-
-#ifdef HAVE_SMALL
-	case SEQ_LITERAL_MATCHED:
-				do {
-					const uint32_t match_bit
-							= len & offset;
-					const uint32_t subcoder_index
-							= offset + match_bit
-							+ symbol;
-
-					rc_bit(probs[subcoder_index],
-							offset &= ~match_bit,
-							offset &= match_bit,
-							SEQ_LITERAL_MATCHED);
-
-					// It seems to be faster to do this
-					// here instead of putting it to the
-					// beginning of the loop and then
-					// putting the "case" in the middle
-					// of the loop.
-					len <<= 1;
-
-				} while (symbol < (1 << 8));
-#else
-				// Unroll the loop.
-				uint32_t match_bit;
-				uint32_t subcoder_index;
-
-#	define d(seq) \
-		case seq: \
-			match_bit = len & offset; \
-			subcoder_index = offset + match_bit + symbol; \
-			rc_bit(probs[subcoder_index], \
-					offset &= ~match_bit, \
-					offset &= match_bit, \
-					seq)
-
-				d(SEQ_LITERAL_MATCHED0);
-				len <<= 1;
-				d(SEQ_LITERAL_MATCHED1);
-				len <<= 1;
-				d(SEQ_LITERAL_MATCHED2);
-				len <<= 1;
-				d(SEQ_LITERAL_MATCHED3);
-				len <<= 1;
-				d(SEQ_LITERAL_MATCHED4);
-				len <<= 1;
-				d(SEQ_LITERAL_MATCHED5);
-				len <<= 1;
-				d(SEQ_LITERAL_MATCHED6);
-				len <<= 1;
-				d(SEQ_LITERAL_MATCHED7);
-#	undef d
-#endif
-			}
-
-			//update_literal(state);
-			// Use a lookup table to update to literal state,
-			// since compared to other state updates, this would
-			// need two branches.
-			static const lzma_lzma_state next_state[] = {
-				STATE_LIT_LIT,
-				STATE_LIT_LIT,
-				STATE_LIT_LIT,
-				STATE_LIT_LIT,
-				STATE_MATCH_LIT_LIT,
-				STATE_REP_LIT_LIT,
-				STATE_SHORTREP_LIT_LIT,
-				STATE_MATCH_LIT,
-				STATE_REP_LIT,
-				STATE_SHORTREP_LIT,
-				STATE_MATCH_LIT,
-				STATE_REP_LIT
-			};
-			state = next_state[state];
-
-	case SEQ_LITERAL_WRITE:
-			if (unlikely(dict_put(&dict, symbol))) {
-				coder->sequence = SEQ_LITERAL_WRITE;
-				goto out;
-			}
-
-			continue;
-		}
-
-		// Instead of a new byte we are going to get a byte range
-		// (distance and length) which will be repeated from our
-		// output history.
-
-		rc_update_1(coder->is_match[state][pos_state]);
-
-	case SEQ_IS_REP:
-		rc_if_0(coder->is_rep[state], SEQ_IS_REP) {
-			// Not a repeated match
-			rc_update_0(coder->is_rep[state]);
-			update_match(state);
-
-			// The latest three match distances are kept in
-			// memory in case there are repeated matches.
-			rep3 = rep2;
-			rep2 = rep1;
-			rep1 = rep0;
-
-			// Decode the length of the match.
-			len_decode(len, coder->match_len_decoder,
-					pos_state, SEQ_MATCH_LEN);
-
-			// Prepare to decode the highest two bits of the
-			// match distance.
-			probs = coder->pos_slot[get_len_to_pos_state(len)];
-			symbol = 1;
-
-#ifdef HAVE_SMALL
-	case SEQ_POS_SLOT:
-			do {
-				rc_bit(probs[symbol], , , SEQ_POS_SLOT);
-			} while (symbol < POS_SLOTS);
-#else
-			rc_bit_case(probs[symbol], , , SEQ_POS_SLOT0);
-			rc_bit_case(probs[symbol], , , SEQ_POS_SLOT1);
-			rc_bit_case(probs[symbol], , , SEQ_POS_SLOT2);
-			rc_bit_case(probs[symbol], , , SEQ_POS_SLOT3);
-			rc_bit_case(probs[symbol], , , SEQ_POS_SLOT4);
-			rc_bit_case(probs[symbol], , , SEQ_POS_SLOT5);
-#endif
-			// Get rid of the highest bit that was needed for
-			// indexing of the probability array.
-			symbol -= POS_SLOTS;
-			assert(symbol <= 63);
-
-			if (symbol < START_POS_MODEL_INDEX) {
-				// Match distances [0, 3] have only two bits.
-				rep0 = symbol;
-			} else {
-				// Decode the lowest [1, 29] bits of
-				// the match distance.
-				limit = (symbol >> 1) - 1;
-				assert(limit >= 1 && limit <= 30);
-				rep0 = 2 + (symbol & 1);
-
-				if (symbol < END_POS_MODEL_INDEX) {
-					// Prepare to decode the low bits for
-					// a distance of [4, 127].
-					assert(limit <= 5);
-					rep0 <<= limit;
-					assert(rep0 <= 96);
-					// -1 is fine, because we start
-					// decoding at probs[1], not probs[0].
-					// NOTE: This violates the C standard,
-					// since we are doing pointer
-					// arithmetic past the beginning of
-					// the array.
-					assert((int32_t)(rep0 - symbol - 1)
-							>= -1);
-					assert((int32_t)(rep0 - symbol - 1)
-							<= 82);
-					probs = coder->pos_special + rep0
-							- symbol - 1;
-					symbol = 1;
-					offset = 0;
-	case SEQ_POS_MODEL:
-#ifdef HAVE_SMALL
-					do {
-						rc_bit(probs[symbol], ,
-							rep0 += 1 << offset,
-							SEQ_POS_MODEL);
-					} while (++offset < limit);
-#else
-					switch (limit) {
-					case 5:
-						assert(offset == 0);
-						rc_bit(probs[symbol], ,
-							rep0 += 1,
-							SEQ_POS_MODEL);
-						++offset;
-						--limit;
-					case 4:
-						rc_bit(probs[symbol], ,
-							rep0 += 1 << offset,
-							SEQ_POS_MODEL);
-						++offset;
-						--limit;
-					case 3:
-						rc_bit(probs[symbol], ,
-							rep0 += 1 << offset,
-							SEQ_POS_MODEL);
-						++offset;
-						--limit;
-					case 2:
-						rc_bit(probs[symbol], ,
-							rep0 += 1 << offset,
-							SEQ_POS_MODEL);
-						++offset;
-						--limit;
-					case 1:
-						// We need "symbol" only for
-						// indexing the probability
-						// array, thus we can use
-						// rc_bit_last() here to omit
-						// the unneeded updating of
-						// "symbol".
-						rc_bit_last(probs[symbol], ,
-							rep0 += 1 << offset,
-							SEQ_POS_MODEL);
-					}
-#endif
-				} else {
-					// The distance is >= 128. Decode the
-					// lower bits without probabilities
-					// except the lowest four bits.
-					assert(symbol >= 14);
-					assert(limit >= 6);
-					limit -= ALIGN_BITS;
-					assert(limit >= 2);
-	case SEQ_DIRECT:
-					// Not worth manual unrolling
-					do {
-						rc_direct(rep0, SEQ_DIRECT);
-					} while (--limit > 0);
-
-					// Decode the lowest four bits using
-					// probabilities.
-					rep0 <<= ALIGN_BITS;
-					symbol = 1;
-#ifdef HAVE_SMALL
-					offset = 0;
-	case SEQ_ALIGN:
-					do {
-						rc_bit(coder->pos_align[
-								symbol], ,
-							rep0 += 1 << offset,
-							SEQ_ALIGN);
-					} while (++offset < ALIGN_BITS);
-#else
-	case SEQ_ALIGN0:
-					rc_bit(coder->pos_align[symbol], ,
-							rep0 += 1, SEQ_ALIGN0);
-	case SEQ_ALIGN1:
-					rc_bit(coder->pos_align[symbol], ,
-							rep0 += 2, SEQ_ALIGN1);
-	case SEQ_ALIGN2:
-					rc_bit(coder->pos_align[symbol], ,
-							rep0 += 4, SEQ_ALIGN2);
-	case SEQ_ALIGN3:
-					// Like in SEQ_POS_MODEL, we don't
-					// need "symbol" for anything else
-					// than indexing the probability array.
-					rc_bit_last(coder->pos_align[symbol], ,
-							rep0 += 8, SEQ_ALIGN3);
-#endif
-
-					if (rep0 == UINT32_MAX) {
-						// End of payload marker was
-						// found. It must not be
-						// present if uncompressed
-						// size is known.
-						if (coder->uncompressed_size
-						!= LZMA_VLI_UNKNOWN) {
-							ret = LZMA_DATA_ERROR;
-							goto out;
-						}
-
-	case SEQ_EOPM:
-						// LZMA1 stream with
-						// end-of-payload marker.
-						rc_normalize(SEQ_EOPM);
-						ret = LZMA_STREAM_END;
-						goto out;
-					}
-				}
-			}
-
-			// Validate the distance we just decoded.
-			if (unlikely(!dict_is_distance_valid(&dict, rep0))) {
-				ret = LZMA_DATA_ERROR;
-				goto out;
-			}
-
-		} else {
-			rc_update_1(coder->is_rep[state]);
-
-			// Repeated match
-			//
-			// The match distance is a value that we have had
-			// earlier. The latest four match distances are
-			// available as rep0, rep1, rep2 and rep3. We will
-			// now decode which of them is the new distance.
-			//
-			// There cannot be a match if we haven't produced
-			// any output, so check that first.
-			if (unlikely(!dict_is_distance_valid(&dict, 0))) {
-				ret = LZMA_DATA_ERROR;
-				goto out;
-			}
-
-	case SEQ_IS_REP0:
-			rc_if_0(coder->is_rep0[state], SEQ_IS_REP0) {
-				rc_update_0(coder->is_rep0[state]);
-				// The distance is rep0.
-
-	case SEQ_IS_REP0_LONG:
-				rc_if_0(coder->is_rep0_long[state][pos_state],
-						SEQ_IS_REP0_LONG) {
-					rc_update_0(coder->is_rep0_long[
-							state][pos_state]);
-
-					update_short_rep(state);
-
-	case SEQ_SHORTREP:
-					if (unlikely(dict_put(&dict, dict_get(
-							&dict, rep0)))) {
-						coder->sequence = SEQ_SHORTREP;
-						goto out;
-					}
-
-					continue;
-				}
-
-				// Repeating more than one byte at
-				// distance of rep0.
-				rc_update_1(coder->is_rep0_long[
-						state][pos_state]);
-
-			} else {
-				rc_update_1(coder->is_rep0[state]);
-
-	case SEQ_IS_REP1:
-				// The distance is rep1, rep2 or rep3. Once
-				// we find out which one of these three, it
-				// is stored to rep0 and rep1, rep2 and rep3
-				// are updated accordingly.
-				rc_if_0(coder->is_rep1[state], SEQ_IS_REP1) {
-					rc_update_0(coder->is_rep1[state]);
-
-					const uint32_t distance = rep1;
-					rep1 = rep0;
-					rep0 = distance;
-
-				} else {
-					rc_update_1(coder->is_rep1[state]);
-	case SEQ_IS_REP2:
-					rc_if_0(coder->is_rep2[state],
-							SEQ_IS_REP2) {
-						rc_update_0(coder->is_rep2[
-								state]);
-
-						const uint32_t distance = rep2;
-						rep2 = rep1;
-						rep1 = rep0;
-						rep0 = distance;
-
-					} else {
-						rc_update_1(coder->is_rep2[
-								state]);
-
-						const uint32_t distance = rep3;
-						rep3 = rep2;
-						rep2 = rep1;
-						rep1 = rep0;
-						rep0 = distance;
-					}
-				}
-			}
-
-			update_long_rep(state);
-
-			// Decode the length of the repeated match.
-			len_decode(len, coder->rep_len_decoder,
-					pos_state, SEQ_REP_LEN);
-		}
-
-		/////////////////////////////////
-		// Repeat from history buffer. //
-		/////////////////////////////////
-
-		// The length is always between these limits. There is no way
-		// to trigger the algorithm to set len outside this range.
-		assert(len >= MATCH_LEN_MIN);
-		assert(len <= MATCH_LEN_MAX);
-
-	case SEQ_COPY:
-		// Repeat len bytes from distance of rep0.
-		if (unlikely(dict_repeat(&dict, rep0, &len))) {
-			coder->sequence = SEQ_COPY;
-			goto out;
-		}
-	}
-
-	rc_normalize(SEQ_NORMALIZE);
-	coder->sequence = SEQ_IS_MATCH;
-
-out:
-	// Save state
-
-	// NOTE: Must not copy dict.limit.
-	dictptr->pos = dict.pos;
-	dictptr->full = dict.full;
-
-	rc_from_local(coder->rc, *in_pos);
-
-	coder->state = state;
-	coder->rep0 = rep0;
-	coder->rep1 = rep1;
-	coder->rep2 = rep2;
-	coder->rep3 = rep3;
-
-	coder->probs = probs;
-	coder->symbol = symbol;
-	coder->limit = limit;
-	coder->offset = offset;
-	coder->len = len;
-
-	// Update the remaining amount of uncompressed data if uncompressed
-	// size was known.
-	if (coder->uncompressed_size != LZMA_VLI_UNKNOWN) {
-		coder->uncompressed_size -= dict.pos - dict_start;
-
-		// Since there cannot be end of payload marker if the
-		// uncompressed size was known, we check here if we
-		// finished decoding.
-		if (coder->uncompressed_size == 0 && ret == LZMA_OK
-				&& coder->sequence != SEQ_NORMALIZE)
-			ret = coder->sequence == SEQ_IS_MATCH
-					? LZMA_STREAM_END : LZMA_DATA_ERROR;
-	}
-
-	// We can do an additional check in the range decoder to catch some
-	// corrupted files.
-	if (ret == LZMA_STREAM_END) {
-		if (!rc_is_finished(coder->rc))
-			ret = LZMA_DATA_ERROR;
-
-		// Reset the range decoder so that it is ready to reinitialize
-		// for a new LZMA2 chunk.
-		rc_reset(coder->rc);
-	}
-
-	return ret;
-}
-
-
-
-static void
-lzma_decoder_uncompressed(lzma_coder *coder, lzma_vli uncompressed_size)
-{
-	coder->uncompressed_size = uncompressed_size;
-}
-
-/*
-extern void
-lzma_lzma_decoder_uncompressed(void *coder_ptr, lzma_vli uncompressed_size)
-{
-	// This is hack.
-	(*(lzma_coder **)(coder))->uncompressed_size = uncompressed_size;
-}
-*/
-
-static void
-lzma_decoder_reset(lzma_coder *coder, const void *opt)
-{
-	const lzma_options_lzma *options = opt;
-
-	// NOTE: We assume that lc/lp/pb are valid since they were
-	// successfully decoded with lzma_lzma_decode_properties().
-
-	// Calculate pos_mask. We don't need pos_bits as is for anything.
-	coder->pos_mask = (1U << options->pb) - 1;
-
-	// Initialize the literal decoder.
-	literal_init(coder->literal, options->lc, options->lp);
-
-	coder->literal_context_bits = options->lc;
-	coder->literal_pos_mask = (1U << options->lp) - 1;
-
-	// State
-	coder->state = STATE_LIT_LIT;
-	coder->rep0 = 0;
-	coder->rep1 = 0;
-	coder->rep2 = 0;
-	coder->rep3 = 0;
-	coder->pos_mask = (1U << options->pb) - 1;
-
-	// Range decoder
-	rc_reset(coder->rc);
-
-	// Bit and bittree decoders
-	for (uint32_t i = 0; i < STATES; ++i) {
-		for (uint32_t j = 0; j <= coder->pos_mask; ++j) {
-			bit_reset(coder->is_match[i][j]);
-			bit_reset(coder->is_rep0_long[i][j]);
-		}
-
-		bit_reset(coder->is_rep[i]);
-		bit_reset(coder->is_rep0[i]);
-		bit_reset(coder->is_rep1[i]);
-		bit_reset(coder->is_rep2[i]);
-	}
-
-	for (uint32_t i = 0; i < LEN_TO_POS_STATES; ++i)
-		bittree_reset(coder->pos_slot[i], POS_SLOT_BITS);
-
-	for (uint32_t i = 0; i < FULL_DISTANCES - END_POS_MODEL_INDEX; ++i)
-		bit_reset(coder->pos_special[i]);
-
-	bittree_reset(coder->pos_align, ALIGN_BITS);
-
-	// Len decoders (also bit/bittree)
-	const uint32_t num_pos_states = 1U << options->pb;
-	bit_reset(coder->match_len_decoder.choice);
-	bit_reset(coder->match_len_decoder.choice2);
-	bit_reset(coder->rep_len_decoder.choice);
-	bit_reset(coder->rep_len_decoder.choice2);
-
-	for (uint32_t pos_state = 0; pos_state < num_pos_states; ++pos_state) {
-		bittree_reset(coder->match_len_decoder.low[pos_state],
-				LEN_LOW_BITS);
-		bittree_reset(coder->match_len_decoder.mid[pos_state],
-				LEN_MID_BITS);
-
-		bittree_reset(coder->rep_len_decoder.low[pos_state],
-				LEN_LOW_BITS);
-		bittree_reset(coder->rep_len_decoder.mid[pos_state],
-				LEN_MID_BITS);
-	}
-
-	bittree_reset(coder->match_len_decoder.high, LEN_HIGH_BITS);
-	bittree_reset(coder->rep_len_decoder.high, LEN_HIGH_BITS);
-
-	coder->sequence = SEQ_IS_MATCH;
-	coder->probs = NULL;
-	coder->symbol = 0;
-	coder->limit = 0;
-	coder->offset = 0;
-	coder->len = 0;
-
-	return;
-}
-
-
-extern lzma_ret
-lzma_lzma_decoder_create(lzma_lz_decoder *lz, lzma_allocator *allocator,
-		const void *opt, lzma_lz_options *lz_options)
-{
-	if (lz->coder == NULL) {
-		lz->coder = lzma_alloc(sizeof(lzma_coder), allocator);
-		if (lz->coder == NULL)
-			return LZMA_MEM_ERROR;
-
-		lz->code = &lzma_decode;
-		lz->reset = &lzma_decoder_reset;
-		lz->set_uncompressed = &lzma_decoder_uncompressed;
-	}
-
-	// All dictionary sizes are OK here. LZ decoder will take care of
-	// the special cases.
-	const lzma_options_lzma *options = opt;
-	lz_options->dict_size = options->dict_size;
-	lz_options->preset_dict = options->preset_dict;
-	lz_options->preset_dict_size = options->preset_dict_size;
-
-	return LZMA_OK;
-}
-
-
-/// Allocate and initialize LZMA decoder. This is used only via LZ
-/// initialization (lzma_lzma_decoder_init() passes function pointer to
-/// the LZ initialization).
-static lzma_ret
-lzma_decoder_init(lzma_lz_decoder *lz, lzma_allocator *allocator,
-		const void *options, lzma_lz_options *lz_options)
-{
-	if (!is_lclppb_valid(options))
-		return LZMA_PROG_ERROR;
-
-	return_if_error(lzma_lzma_decoder_create(
-			lz, allocator, options, lz_options));
-
-	lzma_decoder_reset(lz->coder, options);
-	lzma_decoder_uncompressed(lz->coder, LZMA_VLI_UNKNOWN);
-
-	return LZMA_OK;
-}
-
-
-extern lzma_ret
-lzma_lzma_decoder_init(lzma_next_coder *next, lzma_allocator *allocator,
-		const lzma_filter_info *filters)
-{
-	// LZMA can only be the last filter in the chain. This is enforced
-	// by the raw_decoder initialization.
-	assert(filters[1].init == NULL);
-
-	return lzma_lz_decoder_init(next, allocator, filters,
-			&lzma_decoder_init);
-}
-
-
-extern bool
-lzma_lzma_lclppb_decode(lzma_options_lzma *options, uint8_t byte)
-{
-	if (byte > (4 * 5 + 4) * 9 + 8)
-		return true;
-
-	// See the file format specification to understand this.
-	options->pb = byte / (9 * 5);
-	byte -= options->pb * 9 * 5;
-	options->lp = byte / 9;
-	options->lc = byte - options->lp * 9;
-
-	return options->lc + options->lp > LZMA_LCLP_MAX;
-}
-
-
-extern uint64_t
-lzma_lzma_decoder_memusage_nocheck(const void *options)
-{
-	const lzma_options_lzma *const opt = options;
-	return sizeof(lzma_coder) + lzma_lz_decoder_memusage(opt->dict_size);
-}
-
-
-extern uint64_t
-lzma_lzma_decoder_memusage(const void *options)
-{
-	if (!is_lclppb_valid(options))
-		return UINT64_MAX;
-
-	return lzma_lzma_decoder_memusage_nocheck(options);
-}
-
-
-extern lzma_ret
-lzma_lzma_props_decode(void **options, lzma_allocator *allocator,
-		const uint8_t *props, size_t props_size)
-{
-	if (props_size != 5)
-		return LZMA_OPTIONS_ERROR;
-
-	lzma_options_lzma *opt
-			= lzma_alloc(sizeof(lzma_options_lzma), allocator);
-	if (opt == NULL)
-		return LZMA_MEM_ERROR;
-
-	if (lzma_lzma_lclppb_decode(opt, props[0]))
-		goto error;
-
-	// All dictionary sizes are accepted, including zero. LZ decoder
-	// will automatically use a dictionary at least a few KiB even if
-	// a smaller dictionary is requested.
-	opt->dict_size = unaligned_read32le(props + 1);
-
-	opt->preset_dict = NULL;
-	opt->preset_dict_size = 0;
-
-	*options = opt;
-
-	return LZMA_OK;
-
-error:
-	lzma_free(opt, allocator);
-	return LZMA_OPTIONS_ERROR;
-}
diff --git a/src/extra/xz/lzma/lzma_decoder.h b/src/extra/xz/lzma/lzma_decoder.h
deleted file mode 100644
index a463a76..0000000
--- a/src/extra/xz/lzma/lzma_decoder.h
+++ /dev/null
@@ -1,52 +0,0 @@
-///////////////////////////////////////////////////////////////////////////////
-//
-/// \file       lzma_decoder.h
-/// \brief      LZMA decoder API
-///
-//  Authors:    Igor Pavlov
-//              Lasse Collin
-//
-//  This file has been put into the public domain.
-//  You can do whatever you want with this file.
-//
-///////////////////////////////////////////////////////////////////////////////
-
-#ifndef LZMA_LZMA_DECODER_H
-#define LZMA_LZMA_DECODER_H
-
-#include "common.h"
-
-
-/// Allocates and initializes LZMA decoder
-extern lzma_ret lzma_lzma_decoder_init(lzma_next_coder *next,
-		lzma_allocator *allocator, const lzma_filter_info *filters);
-
-extern uint64_t lzma_lzma_decoder_memusage(const void *options);
-
-extern lzma_ret lzma_lzma_props_decode(
-		void **options, lzma_allocator *allocator,
-		const uint8_t *props, size_t props_size);
-
-
-/// \brief      Decodes the LZMA Properties byte (lc/lp/pb)
-///
-/// \return     true if error occurred, false on success
-///
-extern bool lzma_lzma_lclppb_decode(
-		lzma_options_lzma *options, uint8_t byte);
-
-
-#ifdef LZMA_LZ_DECODER_H
-/// Allocate and setup function pointers only. This is used by LZMA1 and
-/// LZMA2 decoders.
-extern lzma_ret lzma_lzma_decoder_create(
-		lzma_lz_decoder *lz, lzma_allocator *allocator,
-		const void *opt, lzma_lz_options *lz_options);
-
-/// Gets memory usage without validating lc/lp/pb. This is used by LZMA2
-/// decoder, because raw LZMA2 decoding doesn't need lc/lp/pb.
-extern uint64_t lzma_lzma_decoder_memusage_nocheck(const void *options);
-
-#endif
-
-#endif
diff --git a/src/extra/xz/lzma/lzma_encoder.c b/src/extra/xz/lzma/lzma_encoder.c
deleted file mode 100644
index 0b9ee9e..0000000
--- a/src/extra/xz/lzma/lzma_encoder.c
+++ /dev/null
@@ -1,675 +0,0 @@
-///////////////////////////////////////////////////////////////////////////////
-//
-/// \file       lzma_encoder.c
-/// \brief      LZMA encoder
-///
-//  Authors:    Igor Pavlov
-//              Lasse Collin
-//
-//  This file has been put into the public domain.
-//  You can do whatever you want with this file.
-//
-///////////////////////////////////////////////////////////////////////////////
-
-#include "lzma2_encoder.h"
-#include "lzma_encoder_private.h"
-#include "fastpos.h"
-
-
-/////////////
-// Literal //
-/////////////
-
-static inline void
-literal_matched(lzma_range_encoder *rc, probability *subcoder,
-		uint32_t match_byte, uint32_t symbol)
-{
-	uint32_t offset = 0x100;
-	symbol += UINT32_C(1) << 8;
-
-	do {
-		match_byte <<= 1;
-		const uint32_t match_bit = match_byte & offset;
-		const uint32_t subcoder_index
-				= offset + match_bit + (symbol >> 8);
-		const uint32_t bit = (symbol >> 7) & 1;
-		rc_bit(rc, &subcoder[subcoder_index], bit);
-
-		symbol <<= 1;
-		offset &= ~(match_byte ^ symbol);
-
-	} while (symbol < (UINT32_C(1) << 16));
-}
-
-
-static inline void
-literal(lzma_coder *coder, lzma_mf *mf, uint32_t position)
-{
-	// Locate the literal byte to be encoded and the subcoder.
-	const uint8_t cur_byte = mf->buffer[
-			mf->read_pos - mf->read_ahead];
-	probability *subcoder = literal_subcoder(coder->literal,
-			coder->literal_context_bits, coder->literal_pos_mask,
-			position, mf->buffer[mf->read_pos - mf->read_ahead - 1]);
-
-	if (is_literal_state(coder->state)) {
-		// Previous LZMA-symbol was a literal. Encode a normal
-		// literal without a match byte.
-		rc_bittree(&coder->rc, subcoder, 8, cur_byte);
-	} else {
-		// Previous LZMA-symbol was a match. Use the last byte of
-		// the match as a "match byte". That is, compare the bits
-		// of the current literal and the match byte.
-		const uint8_t match_byte = mf->buffer[
-				mf->read_pos - coder->reps[0] - 1
-				- mf->read_ahead];
-		literal_matched(&coder->rc, subcoder, match_byte, cur_byte);
-	}
-
-	update_literal(coder->state);
-}
-
-
-//////////////////
-// Match length //
-//////////////////
-
-static void
-length_update_prices(lzma_length_encoder *lc, const uint32_t pos_state)
-{
-	const uint32_t table_size = lc->table_size;
-	lc->counters[pos_state] = table_size;
-
-	const uint32_t a0 = rc_bit_0_price(lc->choice);
-	const uint32_t a1 = rc_bit_1_price(lc->choice);
-	const uint32_t b0 = a1 + rc_bit_0_price(lc->choice2);
-	const uint32_t b1 = a1 + rc_bit_1_price(lc->choice2);
-	uint32_t *const prices = lc->prices[pos_state];
-
-	uint32_t i;
-	for (i = 0; i < table_size && i < LEN_LOW_SYMBOLS; ++i)
-		prices[i] = a0 + rc_bittree_price(lc->low[pos_state],
-				LEN_LOW_BITS, i);
-
-	for (; i < table_size && i < LEN_LOW_SYMBOLS + LEN_MID_SYMBOLS; ++i)
-		prices[i] = b0 + rc_bittree_price(lc->mid[pos_state],
-				LEN_MID_BITS, i - LEN_LOW_SYMBOLS);
-
-	for (; i < table_size; ++i)
-		prices[i] = b1 + rc_bittree_price(lc->high, LEN_HIGH_BITS,
-				i - LEN_LOW_SYMBOLS - LEN_MID_SYMBOLS);
-
-	return;
-}
-
-
-static inline void
-length(lzma_range_encoder *rc, lzma_length_encoder *lc,
-		const uint32_t pos_state, uint32_t len, const bool fast_mode)
-{
-	assert(len <= MATCH_LEN_MAX);
-	len -= MATCH_LEN_MIN;
-
-	if (len < LEN_LOW_SYMBOLS) {
-		rc_bit(rc, &lc->choice, 0);
-		rc_bittree(rc, lc->low[pos_state], LEN_LOW_BITS, len);
-	} else {
-		rc_bit(rc, &lc->choice, 1);
-		len -= LEN_LOW_SYMBOLS;
-
-		if (len < LEN_MID_SYMBOLS) {
-			rc_bit(rc, &lc->choice2, 0);
-			rc_bittree(rc, lc->mid[pos_state], LEN_MID_BITS, len);
-		} else {
-			rc_bit(rc, &lc->choice2, 1);
-			len -= LEN_MID_SYMBOLS;
-			rc_bittree(rc, lc->high, LEN_HIGH_BITS, len);
-		}
-	}
-
-	// Only getoptimum uses the prices so don't update the table when
-	// in fast mode.
-	if (!fast_mode)
-		if (--lc->counters[pos_state] == 0)
-			length_update_prices(lc, pos_state);
-}
-
-
-///////////
-// Match //
-///////////
-
-static inline void
-match(lzma_coder *coder, const uint32_t pos_state,
-		const uint32_t distance, const uint32_t len)
-{
-	update_match(coder->state);
-
-	length(&coder->rc, &coder->match_len_encoder, pos_state, len,
-			coder->fast_mode);
-
-	const uint32_t pos_slot = get_pos_slot(distance);
-	const uint32_t len_to_pos_state = get_len_to_pos_state(len);
-	rc_bittree(&coder->rc, coder->pos_slot[len_to_pos_state],
-			POS_SLOT_BITS, pos_slot);
-
-	if (pos_slot >= START_POS_MODEL_INDEX) {
-		const uint32_t footer_bits = (pos_slot >> 1) - 1;
-		const uint32_t base = (2 | (pos_slot & 1)) << footer_bits;
-		const uint32_t pos_reduced = distance - base;
-
-		if (pos_slot < END_POS_MODEL_INDEX) {
-			// Careful here: base - pos_slot - 1 can be -1, but
-			// rc_bittree_reverse starts at probs[1], not probs[0].
-			rc_bittree_reverse(&coder->rc,
-				coder->pos_special + base - pos_slot - 1,
-				footer_bits, pos_reduced);
-		} else {
-			rc_direct(&coder->rc, pos_reduced >> ALIGN_BITS,
-					footer_bits - ALIGN_BITS);
-			rc_bittree_reverse(
-					&coder->rc, coder->pos_align,
-					ALIGN_BITS, pos_reduced & ALIGN_MASK);
-			++coder->align_price_count;
-		}
-	}
-
-	coder->reps[3] = coder->reps[2];
-	coder->reps[2] = coder->reps[1];
-	coder->reps[1] = coder->reps[0];
-	coder->reps[0] = distance;
-	++coder->match_price_count;
-}
-
-
-////////////////////
-// Repeated match //
-////////////////////
-
-static inline void
-rep_match(lzma_coder *coder, const uint32_t pos_state,
-		const uint32_t rep, const uint32_t len)
-{
-	if (rep == 0) {
-		rc_bit(&coder->rc, &coder->is_rep0[coder->state], 0);
-		rc_bit(&coder->rc,
-				&coder->is_rep0_long[coder->state][pos_state],
-				len != 1);
-	} else {
-		const uint32_t distance = coder->reps[rep];
-		rc_bit(&coder->rc, &coder->is_rep0[coder->state], 1);
-
-		if (rep == 1) {
-			rc_bit(&coder->rc, &coder->is_rep1[coder->state], 0);
-		} else {
-			rc_bit(&coder->rc, &coder->is_rep1[coder->state], 1);
-			rc_bit(&coder->rc, &coder->is_rep2[coder->state],
-					rep - 2);
-
-			if (rep == 3)
-				coder->reps[3] = coder->reps[2];
-
-			coder->reps[2] = coder->reps[1];
-		}
-
-		coder->reps[1] = coder->reps[0];
-		coder->reps[0] = distance;
-	}
-
-	if (len == 1) {
-		update_short_rep(coder->state);
-	} else {
-		length(&coder->rc, &coder->rep_len_encoder, pos_state, len,
-				coder->fast_mode);
-		update_long_rep(coder->state);
-	}
-}
-
-
-//////////
-// Main //
-//////////
-
-static void
-encode_symbol(lzma_coder *coder, lzma_mf *mf,
-		uint32_t back, uint32_t len, uint32_t position)
-{
-	const uint32_t pos_state = position & coder->pos_mask;
-
-	if (back == UINT32_MAX) {
-		// Literal i.e. eight-bit byte
-		assert(len == 1);
-		rc_bit(&coder->rc,
-				&coder->is_match[coder->state][pos_state], 0);
-		literal(coder, mf, position);
-	} else {
-		// Some type of match
-		rc_bit(&coder->rc,
-			&coder->is_match[coder->state][pos_state], 1);
-
-		if (back < REP_DISTANCES) {
-			// It's a repeated match i.e. the same distance
-			// has been used earlier.
-			rc_bit(&coder->rc, &coder->is_rep[coder->state], 1);
-			rep_match(coder, pos_state, back, len);
-		} else {
-			// Normal match
-			rc_bit(&coder->rc, &coder->is_rep[coder->state], 0);
-			match(coder, pos_state, back - REP_DISTANCES, len);
-		}
-	}
-
-	assert(mf->read_ahead >= len);
-	mf->read_ahead -= len;
-}
-
-
-static bool
-encode_init(lzma_coder *coder, lzma_mf *mf)
-{
-	assert(mf_position(mf) == 0);
-
-	if (mf->read_pos == mf->read_limit) {
-		if (mf->action == LZMA_RUN)
-			return false; // We cannot do anything.
-
-		// We are finishing (we cannot get here when flushing).
-		assert(mf->write_pos == mf->read_pos);
-		assert(mf->action == LZMA_FINISH);
-	} else {
-		// Do the actual initialization. The first LZMA symbol must
-		// always be a literal.
-		mf_skip(mf, 1);
-		mf->read_ahead = 0;
-		rc_bit(&coder->rc, &coder->is_match[0][0], 0);
-		rc_bittree(&coder->rc, coder->literal[0], 8, mf->buffer[0]);
-	}
-
-	// Initialization is done (except if empty file).
-	coder->is_initialized = true;
-
-	return true;
-}
-
-
-static void
-encode_eopm(lzma_coder *coder, uint32_t position)
-{
-	const uint32_t pos_state = position & coder->pos_mask;
-	rc_bit(&coder->rc, &coder->is_match[coder->state][pos_state], 1);
-	rc_bit(&coder->rc, &coder->is_rep[coder->state], 0);
-	match(coder, pos_state, UINT32_MAX, MATCH_LEN_MIN);
-}
-
-
-/// Number of bytes that a single encoding loop in lzma_lzma_encode() can
-/// consume from the dictionary. This limit comes from lzma_lzma_optimum()
-/// and may need to be updated if that function is significantly modified.
-#define LOOP_INPUT_MAX (OPTS + 1)
-
-
-extern lzma_ret
-lzma_lzma_encode(lzma_coder *restrict coder, lzma_mf *restrict mf,
-		uint8_t *restrict out, size_t *restrict out_pos,
-		size_t out_size, uint32_t limit)
-{
-	// Initialize the stream if no data has been encoded yet.
-	if (!coder->is_initialized && !encode_init(coder, mf))
-		return LZMA_OK;
-
-	// Get the lowest bits of the uncompressed offset from the LZ layer.
-	uint32_t position = mf_position(mf);
-
-	while (true) {
-		// Encode pending bits, if any. Calling this before encoding
-		// the next symbol is needed only with plain LZMA, since
-		// LZMA2 always provides big enough buffer to flush
-		// everything out from the range encoder. For the same reason,
-		// rc_encode() never returns true when this function is used
-		// as part of LZMA2 encoder.
-		if (rc_encode(&coder->rc, out, out_pos, out_size)) {
-			assert(limit == UINT32_MAX);
-			return LZMA_OK;
-		}
-
-		// With LZMA2 we need to take care that compressed size of
-		// a chunk doesn't get too big.
-		// FIXME? Check if this could be improved.
-		if (limit != UINT32_MAX
-				&& (mf->read_pos - mf->read_ahead >= limit
-					|| *out_pos + rc_pending(&coder->rc)
-						>= LZMA2_CHUNK_MAX
-							- LOOP_INPUT_MAX))
-			break;
-
-		// Check that there is some input to process.
-		if (mf->read_pos >= mf->read_limit) {
-			if (mf->action == LZMA_RUN)
-				return LZMA_OK;
-
-			if (mf->read_ahead == 0)
-				break;
-		}
-
-		// Get optimal match (repeat position and length).
-		// Value ranges for pos:
-		//   - [0, REP_DISTANCES): repeated match
-		//   - [REP_DISTANCES, UINT32_MAX):
-		//     match at (pos - REP_DISTANCES)
-		//   - UINT32_MAX: not a match but a literal
-		// Value ranges for len:
-		//   - [MATCH_LEN_MIN, MATCH_LEN_MAX]
-		uint32_t len;
-		uint32_t back;
-
-		if (coder->fast_mode)
-			lzma_lzma_optimum_fast(coder, mf, &back, &len);
-		else
-			lzma_lzma_optimum_normal(
-					coder, mf, &back, &len, position);
-
-		encode_symbol(coder, mf, back, len, position);
-
-		position += len;
-	}
-
-	if (!coder->is_flushed) {
-		coder->is_flushed = true;
-
-		// We don't support encoding plain LZMA streams without EOPM,
-		// and LZMA2 doesn't use EOPM at LZMA level.
-		if (limit == UINT32_MAX)
-			encode_eopm(coder, position);
-
-		// Flush the remaining bytes from the range encoder.
-		rc_flush(&coder->rc);
-
-		// Copy the remaining bytes to the output buffer. If there
-		// isn't enough output space, we will copy out the remaining
-		// bytes on the next call to this function by using
-		// the rc_encode() call in the encoding loop above.
-		if (rc_encode(&coder->rc, out, out_pos, out_size)) {
-			assert(limit == UINT32_MAX);
-			return LZMA_OK;
-		}
-	}
-
-	// Make it ready for the next LZMA2 chunk.
-	coder->is_flushed = false;
-
-	return LZMA_STREAM_END;
-}
-
-
-static lzma_ret
-lzma_encode(lzma_coder *restrict coder, lzma_mf *restrict mf,
-		uint8_t *restrict out, size_t *restrict out_pos,
-		size_t out_size)
-{
-	// Plain LZMA has no support for sync-flushing.
-	if (unlikely(mf->action == LZMA_SYNC_FLUSH))
-		return LZMA_OPTIONS_ERROR;
-
-	return lzma_lzma_encode(coder, mf, out, out_pos, out_size, UINT32_MAX);
-}
-
-
-////////////////////
-// Initialization //
-////////////////////
-
-static bool
-is_options_valid(const lzma_options_lzma *options)
-{
-	// Validate some of the options. LZ encoder validates nice_len too
-	// but we need a valid value here earlier.
-	return is_lclppb_valid(options)
-			&& options->nice_len >= MATCH_LEN_MIN
-			&& options->nice_len <= MATCH_LEN_MAX
-			&& (options->mode == LZMA_MODE_FAST
-				|| options->mode == LZMA_MODE_NORMAL);
-}
-
-
-static void
-set_lz_options(lzma_lz_options *lz_options, const lzma_options_lzma *options)
-{
-	// LZ encoder initialization does the validation for these so we
-	// don't need to validate here.
-	lz_options->before_size = OPTS;
-	lz_options->dict_size = options->dict_size;
-	lz_options->after_size = LOOP_INPUT_MAX;
-	lz_options->match_len_max = MATCH_LEN_MAX;
-	lz_options->nice_len = options->nice_len;
-	lz_options->match_finder = options->mf;
-	lz_options->depth = options->depth;
-	lz_options->preset_dict = options->preset_dict;
-	lz_options->preset_dict_size = options->preset_dict_size;
-	return;
-}
-
-
-static void
-length_encoder_reset(lzma_length_encoder *lencoder,
-		const uint32_t num_pos_states, const bool fast_mode)
-{
-	bit_reset(lencoder->choice);
-	bit_reset(lencoder->choice2);
-
-	for (size_t pos_state = 0; pos_state < num_pos_states; ++pos_state) {
-		bittree_reset(lencoder->low[pos_state], LEN_LOW_BITS);
-		bittree_reset(lencoder->mid[pos_state], LEN_MID_BITS);
-	}
-
-	bittree_reset(lencoder->high, LEN_HIGH_BITS);
-
-	if (!fast_mode)
-		for (size_t pos_state = 0; pos_state < num_pos_states;
-				++pos_state)
-			length_update_prices(lencoder, pos_state);
-
-	return;
-}
-
-
-extern lzma_ret
-lzma_lzma_encoder_reset(lzma_coder *coder, const lzma_options_lzma *options)
-{
-	if (!is_options_valid(options))
-		return LZMA_OPTIONS_ERROR;
-
-	coder->pos_mask = (1U << options->pb) - 1;
-	coder->literal_context_bits = options->lc;
-	coder->literal_pos_mask = (1U << options->lp) - 1;
-
-	// Range coder
-	rc_reset(&coder->rc);
-
-	// State
-	coder->state = STATE_LIT_LIT;
-	for (size_t i = 0; i < REP_DISTANCES; ++i)
-		coder->reps[i] = 0;
-
-	literal_init(coder->literal, options->lc, options->lp);
-
-	// Bit encoders
-	for (size_t i = 0; i < STATES; ++i) {
-		for (size_t j = 0; j <= coder->pos_mask; ++j) {
-			bit_reset(coder->is_match[i][j]);
-			bit_reset(coder->is_rep0_long[i][j]);
-		}
-
-		bit_reset(coder->is_rep[i]);
-		bit_reset(coder->is_rep0[i]);
-		bit_reset(coder->is_rep1[i]);
-		bit_reset(coder->is_rep2[i]);
-	}
-
-	for (size_t i = 0; i < FULL_DISTANCES - END_POS_MODEL_INDEX; ++i)
-		bit_reset(coder->pos_special[i]);
-
-	// Bit tree encoders
-	for (size_t i = 0; i < LEN_TO_POS_STATES; ++i)
-		bittree_reset(coder->pos_slot[i], POS_SLOT_BITS);
-
-	bittree_reset(coder->pos_align, ALIGN_BITS);
-
-	// Length encoders
-	length_encoder_reset(&coder->match_len_encoder,
-			1U << options->pb, coder->fast_mode);
-
-	length_encoder_reset(&coder->rep_len_encoder,
-			1U << options->pb, coder->fast_mode);
-
-	// Price counts are incremented every time appropriate probabilities
-	// are changed. price counts are set to zero when the price tables
-	// are updated, which is done when the appropriate price counts have
-	// big enough value, and lzma_mf.read_ahead == 0 which happens at
-	// least every OPTS (a few thousand) possible price count increments.
-	//
-	// By resetting price counts to UINT32_MAX / 2, we make sure that the
-	// price tables will be initialized before they will be used (since
-	// the value is definitely big enough), and that it is OK to increment
-	// price counts without risk of integer overflow (since UINT32_MAX / 2
-	// is small enough). The current code doesn't increment price counts
-	// before initializing price tables, but it maybe done in future if
-	// we add support for saving the state between LZMA2 chunks.
-	coder->match_price_count = UINT32_MAX / 2;
-	coder->align_price_count = UINT32_MAX / 2;
-
-	coder->opts_end_index = 0;
-	coder->opts_current_index = 0;
-
-	return LZMA_OK;
-}
-
-
-extern lzma_ret
-lzma_lzma_encoder_create(lzma_coder **coder_ptr, lzma_allocator *allocator,
-		const lzma_options_lzma *options, lzma_lz_options *lz_options)
-{
-	// Allocate lzma_coder if it wasn't already allocated.
-	if (*coder_ptr == NULL) {
-		*coder_ptr = lzma_alloc(sizeof(lzma_coder), allocator);
-		if (*coder_ptr == NULL)
-			return LZMA_MEM_ERROR;
-	}
-
-	lzma_coder *coder = *coder_ptr;
-
-	// Set compression mode. We haven't validates the options yet,
-	// but it's OK here, since nothing bad happens with invalid
-	// options in the code below, and they will get rejected by
-	// lzma_lzma_encoder_reset() call at the end of this function.
-	switch (options->mode) {
-		case LZMA_MODE_FAST:
-			coder->fast_mode = true;
-			break;
-
-		case LZMA_MODE_NORMAL: {
-			coder->fast_mode = false;
-
-			// Set dist_table_size.
-			// Round the dictionary size up to next 2^n.
-			uint32_t log_size = 0;
-			while ((UINT32_C(1) << log_size) < options->dict_size)
-				++log_size;
-
-			coder->dist_table_size = log_size * 2;
-
-			// Length encoders' price table size
-			coder->match_len_encoder.table_size
-				= options->nice_len + 1 - MATCH_LEN_MIN;
-			coder->rep_len_encoder.table_size
-				= options->nice_len + 1 - MATCH_LEN_MIN;
-			break;
-		}
-
-		default:
-			return LZMA_OPTIONS_ERROR;
-	}
-
-	// We don't need to write the first byte as literal if there is
-	// a non-empty preset dictionary. encode_init() wouldn't even work
-	// if there is a non-empty preset dictionary, because encode_init()
-	// assumes that position is zero and previous byte is also zero.
-	coder->is_initialized = options->preset_dict != NULL
-			&& options->preset_dict_size > 0;
-	coder->is_flushed = false;
-
-	set_lz_options(lz_options, options);
-
-	return lzma_lzma_encoder_reset(coder, options);
-}
-
-
-static lzma_ret
-lzma_encoder_init(lzma_lz_encoder *lz, lzma_allocator *allocator,
-		const void *options, lzma_lz_options *lz_options)
-{
-	lz->code = &lzma_encode;
-	return lzma_lzma_encoder_create(
-			&lz->coder, allocator, options, lz_options);
-}
-
-
-extern lzma_ret
-lzma_lzma_encoder_init(lzma_next_coder *next, lzma_allocator *allocator,
-		const lzma_filter_info *filters)
-{
-	return lzma_lz_encoder_init(
-			next, allocator, filters, &lzma_encoder_init);
-}
-
-
-extern uint64_t
-lzma_lzma_encoder_memusage(const void *options)
-{
-	if (!is_options_valid(options))
-		return UINT64_MAX;
-
-	lzma_lz_options lz_options;
-	set_lz_options(&lz_options, options);
-
-	const uint64_t lz_memusage = lzma_lz_encoder_memusage(&lz_options);
-	if (lz_memusage == UINT64_MAX)
-		return UINT64_MAX;
-
-	return (uint64_t)(sizeof(lzma_coder)) + lz_memusage;
-}
-
-
-extern bool
-lzma_lzma_lclppb_encode(const lzma_options_lzma *options, uint8_t *byte)
-{
-	if (!is_lclppb_valid(options))
-		return true;
-
-	*byte = (options->pb * 5 + options->lp) * 9 + options->lc;
-	assert(*byte <= (4 * 5 + 4) * 9 + 8);
-
-	return false;
-}
-
-
-#ifdef HAVE_ENCODER_LZMA1
-extern lzma_ret
-lzma_lzma_props_encode(const void *options, uint8_t *out)
-{
-	const lzma_options_lzma *const opt = options;
-
-	if (lzma_lzma_lclppb_encode(opt, out))
-		return LZMA_PROG_ERROR;
-
-	unaligned_write32le(out + 1, opt->dict_size);
-
-	return LZMA_OK;
-}
-#endif
-
-
-extern LZMA_API(lzma_bool)
-lzma_mode_is_supported(lzma_mode mode)
-{
-	return mode == LZMA_MODE_FAST || mode == LZMA_MODE_NORMAL;
-}
diff --git a/src/extra/xz/lzma/lzma_encoder.h b/src/extra/xz/lzma/lzma_encoder.h
deleted file mode 100644
index 835e1f5..0000000
--- a/src/extra/xz/lzma/lzma_encoder.h
+++ /dev/null
@@ -1,54 +0,0 @@
-///////////////////////////////////////////////////////////////////////////////
-//
-/// \file       lzma_encoder.h
-/// \brief      LZMA encoder API
-///
-//  Authors:    Igor Pavlov
-//              Lasse Collin
-//
-//  This file has been put into the public domain.
-//  You can do whatever you want with this file.
-//
-///////////////////////////////////////////////////////////////////////////////
-
-#ifndef LZMA_LZMA_ENCODER_H
-#define LZMA_LZMA_ENCODER_H
-
-#include "common.h"
-
-
-extern lzma_ret lzma_lzma_encoder_init(lzma_next_coder *next,
-		lzma_allocator *allocator, const lzma_filter_info *filters);
-
-
-extern uint64_t lzma_lzma_encoder_memusage(const void *options);
-
-extern lzma_ret lzma_lzma_props_encode(const void *options, uint8_t *out);
-
-
-/// Encodes lc/lp/pb into one byte. Returns false on success and true on error.
-extern bool lzma_lzma_lclppb_encode(
-		const lzma_options_lzma *options, uint8_t *byte);
-
-
-#ifdef LZMA_LZ_ENCODER_H
-
-/// Initializes raw LZMA encoder; this is used by LZMA2.
-extern lzma_ret lzma_lzma_encoder_create(
-		lzma_coder **coder_ptr, lzma_allocator *allocator,
-		const lzma_options_lzma *options, lzma_lz_options *lz_options);
-
-
-/// Resets an already initialized LZMA encoder; this is used by LZMA2.
-extern lzma_ret lzma_lzma_encoder_reset(
-		lzma_coder *coder, const lzma_options_lzma *options);
-
-
-extern lzma_ret lzma_lzma_encode(lzma_coder *restrict coder,
-		lzma_mf *restrict mf, uint8_t *restrict out,
-		size_t *restrict out_pos, size_t out_size,
-		uint32_t read_limit);
-
-#endif
-
-#endif
diff --git a/src/extra/xz/lzma/lzma_encoder_optimum_fast.c b/src/extra/xz/lzma/lzma_encoder_optimum_fast.c
deleted file mode 100644
index f835f69..0000000
--- a/src/extra/xz/lzma/lzma_encoder_optimum_fast.c
+++ /dev/null
@@ -1,179 +0,0 @@
-///////////////////////////////////////////////////////////////////////////////
-//
-/// \file       lzma_encoder_optimum_fast.c
-//
-//  Author:     Igor Pavlov
-//
-//  This file has been put into the public domain.
-//  You can do whatever you want with this file.
-//
-///////////////////////////////////////////////////////////////////////////////
-
-#include "lzma_encoder_private.h"
-
-
-#define change_pair(small_dist, big_dist) \
-	(((big_dist) >> 7) > (small_dist))
-
-
-extern void
-lzma_lzma_optimum_fast(lzma_coder *restrict coder, lzma_mf *restrict mf,
-		uint32_t *restrict back_res, uint32_t *restrict len_res)
-{
-	const uint32_t nice_len = mf->nice_len;
-
-	uint32_t len_main;
-	uint32_t matches_count;
-	if (mf->read_ahead == 0) {
-		len_main = mf_find(mf, &matches_count, coder->matches);
-	} else {
-		assert(mf->read_ahead == 1);
-		len_main = coder->longest_match_length;
-		matches_count = coder->matches_count;
-	}
-
-	const uint8_t *buf = mf_ptr(mf) - 1;
-	const uint32_t buf_avail = my_min(mf_avail(mf) + 1, MATCH_LEN_MAX);
-
-	if (buf_avail < 2) {
-		// There's not enough input left to encode a match.
-		*back_res = UINT32_MAX;
-		*len_res = 1;
-		return;
-	}
-
-	// Look for repeated matches; scan the previous four match distances
-	uint32_t rep_len = 0;
-	uint32_t rep_index = 0;
-
-	for (uint32_t i = 0; i < REP_DISTANCES; ++i) {
-		// Pointer to the beginning of the match candidate
-		const uint8_t *const buf_back = buf - coder->reps[i] - 1;
-
-		// If the first two bytes (2 == MATCH_LEN_MIN) do not match,
-		// this rep is not useful.
-		if (not_equal_16(buf, buf_back))
-			continue;
-
-		// The first two bytes matched.
-		// Calculate the length of the match.
-		uint32_t len;
-		for (len = 2; len < buf_avail
-				&& buf[len] == buf_back[len]; ++len) ;
-
-		// If we have found a repeated match that is at least
-		// nice_len long, return it immediately.
-		if (len >= nice_len) {
-			*back_res = i;
-			*len_res = len;
-			mf_skip(mf, len - 1);
-			return;
-		}
-
-		if (len > rep_len) {
-			rep_index = i;
-			rep_len = len;
-		}
-	}
-
-	// We didn't find a long enough repeated match. Encode it as a normal
-	// match if the match length is at least nice_len.
-	if (len_main >= nice_len) {
-		*back_res = coder->matches[matches_count - 1].dist
-				+ REP_DISTANCES;
-		*len_res = len_main;
-		mf_skip(mf, len_main - 1);
-		return;
-	}
-
-	uint32_t back_main = 0;
-	if (len_main >= 2) {
-		back_main = coder->matches[matches_count - 1].dist;
-
-		while (matches_count > 1 && len_main ==
-				coder->matches[matches_count - 2].len + 1) {
-			if (!change_pair(coder->matches[
-						matches_count - 2].dist,
-					back_main))
-				break;
-
-			--matches_count;
-			len_main = coder->matches[matches_count - 1].len;
-			back_main = coder->matches[matches_count - 1].dist;
-		}
-
-		if (len_main == 2 && back_main >= 0x80)
-			len_main = 1;
-	}
-
-	if (rep_len >= 2) {
-		if (rep_len + 1 >= len_main
-				|| (rep_len + 2 >= len_main
-					&& back_main > (UINT32_C(1) << 9))
-				|| (rep_len + 3 >= len_main
-					&& back_main > (UINT32_C(1) << 15))) {
-			*back_res = rep_index;
-			*len_res = rep_len;
-			mf_skip(mf, rep_len - 1);
-			return;
-		}
-	}
-
-	if (len_main < 2 || buf_avail <= 2) {
-		*back_res = UINT32_MAX;
-		*len_res = 1;
-		return;
-	}
-
-	// Get the matches for the next byte. If we find a better match,
-	// the current byte is encoded as a literal.
-	coder->longest_match_length = mf_find(mf,
-			&coder->matches_count, coder->matches);
-
-	if (coder->longest_match_length >= 2) {
-		const uint32_t new_dist = coder->matches[
-				coder->matches_count - 1].dist;
-
-		if ((coder->longest_match_length >= len_main
-					&& new_dist < back_main)
-				|| (coder->longest_match_length == len_main + 1
-					&& !change_pair(back_main, new_dist))
-				|| (coder->longest_match_length > len_main + 1)
-				|| (coder->longest_match_length + 1 >= len_main
-					&& len_main >= 3
-					&& change_pair(new_dist, back_main))) {
-			*back_res = UINT32_MAX;
-			*len_res = 1;
-			return;
-		}
-	}
-
-	// In contrast to LZMA SDK, dictionary could not have been moved
-	// between mf_find() calls, thus it is safe to just increment
-	// the old buf pointer instead of recalculating it with mf_ptr().
-	++buf;
-
-	const uint32_t limit = len_main - 1;
-
-	for (uint32_t i = 0; i < REP_DISTANCES; ++i) {
-		const uint8_t *const buf_back = buf - coder->reps[i] - 1;
-
-		if (not_equal_16(buf, buf_back))
-			continue;
-
-		uint32_t len;
-		for (len = 2; len < limit
-				&& buf[len] == buf_back[len]; ++len) ;
-
-		if (len >= limit) {
-			*back_res = UINT32_MAX;
-			*len_res = 1;
-			return;
-		}
-	}
-
-	*back_res = back_main + REP_DISTANCES;
-	*len_res = len_main;
-	mf_skip(mf, len_main - 2);
-	return;
-}
diff --git a/src/extra/xz/lzma/lzma_encoder_optimum_normal.c b/src/extra/xz/lzma/lzma_encoder_optimum_normal.c
deleted file mode 100644
index 7e85649..0000000
--- a/src/extra/xz/lzma/lzma_encoder_optimum_normal.c
+++ /dev/null
@@ -1,868 +0,0 @@
-///////////////////////////////////////////////////////////////////////////////
-//
-/// \file       lzma_encoder_optimum_normal.c
-//
-//  Author:     Igor Pavlov
-//
-//  This file has been put into the public domain.
-//  You can do whatever you want with this file.
-//
-///////////////////////////////////////////////////////////////////////////////
-
-#include "lzma_encoder_private.h"
-#include "fastpos.h"
-
-
-////////////
-// Prices //
-////////////
-
-static uint32_t
-get_literal_price(const lzma_coder *const coder, const uint32_t pos,
-		const uint32_t prev_byte, const bool match_mode,
-		uint32_t match_byte, uint32_t symbol)
-{
-	const probability *const subcoder = literal_subcoder(coder->literal,
-			coder->literal_context_bits, coder->literal_pos_mask,
-			pos, prev_byte);
-
-	uint32_t price = 0;
-
-	if (!match_mode) {
-		price = rc_bittree_price(subcoder, 8, symbol);
-	} else {
-		uint32_t offset = 0x100;
-		symbol += UINT32_C(1) << 8;
-
-		do {
-			match_byte <<= 1;
-
-			const uint32_t match_bit = match_byte & offset;
-			const uint32_t subcoder_index
-					= offset + match_bit + (symbol >> 8);
-			const uint32_t bit = (symbol >> 7) & 1;
-			price += rc_bit_price(subcoder[subcoder_index], bit);
-
-			symbol <<= 1;
-			offset &= ~(match_byte ^ symbol);
-
-		} while (symbol < (UINT32_C(1) << 16));
-	}
-
-	return price;
-}
-
-
-static inline uint32_t
-get_len_price(const lzma_length_encoder *const lencoder,
-		const uint32_t len, const uint32_t pos_state)
-{
-	// NOTE: Unlike the other price tables, length prices are updated
-	// in lzma_encoder.c
-	return lencoder->prices[pos_state][len - MATCH_LEN_MIN];
-}
-
-
-static inline uint32_t
-get_short_rep_price(const lzma_coder *const coder,
-		const lzma_lzma_state state, const uint32_t pos_state)
-{
-	return rc_bit_0_price(coder->is_rep0[state])
-		+ rc_bit_0_price(coder->is_rep0_long[state][pos_state]);
-}
-
-
-static inline uint32_t
-get_pure_rep_price(const lzma_coder *const coder, const uint32_t rep_index,
-		const lzma_lzma_state state, uint32_t pos_state)
-{
-	uint32_t price;
-
-	if (rep_index == 0) {
-		price = rc_bit_0_price(coder->is_rep0[state]);
-		price += rc_bit_1_price(coder->is_rep0_long[state][pos_state]);
-	} else {
-		price = rc_bit_1_price(coder->is_rep0[state]);
-
-		if (rep_index == 1) {
-			price += rc_bit_0_price(coder->is_rep1[state]);
-		} else {
-			price += rc_bit_1_price(coder->is_rep1[state]);
-			price += rc_bit_price(coder->is_rep2[state],
-					rep_index - 2);
-		}
-	}
-
-	return price;
-}
-
-
-static inline uint32_t
-get_rep_price(const lzma_coder *const coder, const uint32_t rep_index,
-		const uint32_t len, const lzma_lzma_state state,
-		const uint32_t pos_state)
-{
-	return get_len_price(&coder->rep_len_encoder, len, pos_state)
-		+ get_pure_rep_price(coder, rep_index, state, pos_state);
-}
-
-
-static inline uint32_t
-get_pos_len_price(const lzma_coder *const coder, const uint32_t pos,
-		const uint32_t len, const uint32_t pos_state)
-{
-	const uint32_t len_to_pos_state = get_len_to_pos_state(len);
-	uint32_t price;
-
-	if (pos < FULL_DISTANCES) {
-		price = coder->distances_prices[len_to_pos_state][pos];
-	} else {
-		const uint32_t pos_slot = get_pos_slot_2(pos);
-		price = coder->pos_slot_prices[len_to_pos_state][pos_slot]
-				+ coder->align_prices[pos & ALIGN_MASK];
-	}
-
-	price += get_len_price(&coder->match_len_encoder, len, pos_state);
-
-	return price;
-}
-
-
-static void
-fill_distances_prices(lzma_coder *coder)
-{
-	for (uint32_t len_to_pos_state = 0;
-			len_to_pos_state < LEN_TO_POS_STATES;
-			++len_to_pos_state) {
-
-		uint32_t *const pos_slot_prices
-				= coder->pos_slot_prices[len_to_pos_state];
-
-		// Price to encode the pos_slot.
-		for (uint32_t pos_slot = 0;
-				pos_slot < coder->dist_table_size; ++pos_slot)
-			pos_slot_prices[pos_slot] = rc_bittree_price(
-					coder->pos_slot[len_to_pos_state],
-					POS_SLOT_BITS, pos_slot);
-
-		// For matches with distance >= FULL_DISTANCES, add the price
-		// of the direct bits part of the match distance. (Align bits
-		// are handled by fill_align_prices()).
-		for (uint32_t pos_slot = END_POS_MODEL_INDEX;
-				pos_slot < coder->dist_table_size; ++pos_slot)
-			pos_slot_prices[pos_slot] += rc_direct_price(
-					((pos_slot >> 1) - 1) - ALIGN_BITS);
-
-		// Distances in the range [0, 3] are fully encoded with
-		// pos_slot, so they are used for coder->distances_prices
-		// as is.
-		for (uint32_t i = 0; i < START_POS_MODEL_INDEX; ++i)
-			coder->distances_prices[len_to_pos_state][i]
-					= pos_slot_prices[i];
-	}
-
-	// Distances in the range [4, 127] depend on pos_slot and pos_special.
-	// We do this in a loop separate from the above loop to avoid
-	// redundant calls to get_pos_slot().
-	for (uint32_t i = START_POS_MODEL_INDEX; i < FULL_DISTANCES; ++i) {
-		const uint32_t pos_slot = get_pos_slot(i);
-		const uint32_t footer_bits = ((pos_slot >> 1) - 1);
-		const uint32_t base = (2 | (pos_slot & 1)) << footer_bits;
-		const uint32_t price = rc_bittree_reverse_price(
-				coder->pos_special + base - pos_slot - 1,
-				footer_bits, i - base);
-
-		for (uint32_t len_to_pos_state = 0;
-				len_to_pos_state < LEN_TO_POS_STATES;
-				++len_to_pos_state)
-			coder->distances_prices[len_to_pos_state][i]
-					= price + coder->pos_slot_prices[
-						len_to_pos_state][pos_slot];
-	}
-
-	coder->match_price_count = 0;
-	return;
-}
-
-
-static void
-fill_align_prices(lzma_coder *coder)
-{
-	for (uint32_t i = 0; i < ALIGN_TABLE_SIZE; ++i)
-		coder->align_prices[i] = rc_bittree_reverse_price(
-				coder->pos_align, ALIGN_BITS, i);
-
-	coder->align_price_count = 0;
-	return;
-}
-
-
-/////////////
-// Optimal //
-/////////////
-
-static inline void
-make_literal(lzma_optimal *optimal)
-{
-	optimal->back_prev = UINT32_MAX;
-	optimal->prev_1_is_literal = false;
-}
-
-
-static inline void
-make_short_rep(lzma_optimal *optimal)
-{
-	optimal->back_prev = 0;
-	optimal->prev_1_is_literal = false;
-}
-
-
-#define is_short_rep(optimal) \
-	((optimal).back_prev == 0)
-
-
-static void
-backward(lzma_coder *restrict coder, uint32_t *restrict len_res,
-		uint32_t *restrict back_res, uint32_t cur)
-{
-	coder->opts_end_index = cur;
-
-	uint32_t pos_mem = coder->opts[cur].pos_prev;
-	uint32_t back_mem = coder->opts[cur].back_prev;
-
-	do {
-		if (coder->opts[cur].prev_1_is_literal) {
-			make_literal(&coder->opts[pos_mem]);
-			coder->opts[pos_mem].pos_prev = pos_mem - 1;
-
-			if (coder->opts[cur].prev_2) {
-				coder->opts[pos_mem - 1].prev_1_is_literal
-						= false;
-				coder->opts[pos_mem - 1].pos_prev
-						= coder->opts[cur].pos_prev_2;
-				coder->opts[pos_mem - 1].back_prev
-						= coder->opts[cur].back_prev_2;
-			}
-		}
-
-		const uint32_t pos_prev = pos_mem;
-		const uint32_t back_cur = back_mem;
-
-		back_mem = coder->opts[pos_prev].back_prev;
-		pos_mem = coder->opts[pos_prev].pos_prev;
-
-		coder->opts[pos_prev].back_prev = back_cur;
-		coder->opts[pos_prev].pos_prev = cur;
-		cur = pos_prev;
-
-	} while (cur != 0);
-
-	coder->opts_current_index = coder->opts[0].pos_prev;
-	*len_res = coder->opts[0].pos_prev;
-	*back_res = coder->opts[0].back_prev;
-
-	return;
-}
-
-
-//////////
-// Main //
-//////////
-
-static inline uint32_t
-helper1(lzma_coder *restrict coder, lzma_mf *restrict mf,
-		uint32_t *restrict back_res, uint32_t *restrict len_res,
-		uint32_t position)
-{
-	const uint32_t nice_len = mf->nice_len;
-
-	uint32_t len_main;
-	uint32_t matches_count;
-
-	if (mf->read_ahead == 0) {
-		len_main = mf_find(mf, &matches_count, coder->matches);
-	} else {
-		assert(mf->read_ahead == 1);
-		len_main = coder->longest_match_length;
-		matches_count = coder->matches_count;
-	}
-
-	const uint32_t buf_avail = my_min(mf_avail(mf) + 1, MATCH_LEN_MAX);
-	if (buf_avail < 2) {
-		*back_res = UINT32_MAX;
-		*len_res = 1;
-		return UINT32_MAX;
-	}
-
-	const uint8_t *const buf = mf_ptr(mf) - 1;
-
-	uint32_t rep_lens[REP_DISTANCES];
-	uint32_t rep_max_index = 0;
-
-	for (uint32_t i = 0; i < REP_DISTANCES; ++i) {
-		const uint8_t *const buf_back = buf - coder->reps[i] - 1;
-
-		if (not_equal_16(buf, buf_back)) {
-			rep_lens[i] = 0;
-			continue;
-		}
-
-		uint32_t len_test;
-		for (len_test = 2; len_test < buf_avail
-				&& buf[len_test] == buf_back[len_test];
-				++len_test) ;
-
-		rep_lens[i] = len_test;
-		if (len_test > rep_lens[rep_max_index])
-			rep_max_index = i;
-	}
-
-	if (rep_lens[rep_max_index] >= nice_len) {
-		*back_res = rep_max_index;
-		*len_res = rep_lens[rep_max_index];
-		mf_skip(mf, *len_res - 1);
-		return UINT32_MAX;
-	}
-
-
-	if (len_main >= nice_len) {
-		*back_res = coder->matches[matches_count - 1].dist
-				+ REP_DISTANCES;
-		*len_res = len_main;
-		mf_skip(mf, len_main - 1);
-		return UINT32_MAX;
-	}
-
-	const uint8_t current_byte = *buf;
-	const uint8_t match_byte = *(buf - coder->reps[0] - 1);
-
-	if (len_main < 2 && current_byte != match_byte
-			&& rep_lens[rep_max_index] < 2) {
-		*back_res = UINT32_MAX;
-		*len_res = 1;
-		return UINT32_MAX;
-	}
-
-	coder->opts[0].state = coder->state;
-
-	const uint32_t pos_state = position & coder->pos_mask;
-
-	coder->opts[1].price = rc_bit_0_price(
-				coder->is_match[coder->state][pos_state])
-			+ get_literal_price(coder, position, buf[-1],
-				!is_literal_state(coder->state),
-				match_byte, current_byte);
-
-	make_literal(&coder->opts[1]);
-
-	const uint32_t match_price = rc_bit_1_price(
-			coder->is_match[coder->state][pos_state]);
-	const uint32_t rep_match_price = match_price
-			+ rc_bit_1_price(coder->is_rep[coder->state]);
-
-	if (match_byte == current_byte) {
-		const uint32_t short_rep_price = rep_match_price
-				+ get_short_rep_price(
-					coder, coder->state, pos_state);
-
-		if (short_rep_price < coder->opts[1].price) {
-			coder->opts[1].price = short_rep_price;
-			make_short_rep(&coder->opts[1]);
-		}
-	}
-
-	const uint32_t len_end = my_max(len_main, rep_lens[rep_max_index]);
-
-	if (len_end < 2) {
-		*back_res = coder->opts[1].back_prev;
-		*len_res = 1;
-		return UINT32_MAX;
-	}
-
-	coder->opts[1].pos_prev = 0;
-
-	for (uint32_t i = 0; i < REP_DISTANCES; ++i)
-		coder->opts[0].backs[i] = coder->reps[i];
-
-	uint32_t len = len_end;
-	do {
-		coder->opts[len].price = RC_INFINITY_PRICE;
-	} while (--len >= 2);
-
-
-	for (uint32_t i = 0; i < REP_DISTANCES; ++i) {
-		uint32_t rep_len = rep_lens[i];
-		if (rep_len < 2)
-			continue;
-
-		const uint32_t price = rep_match_price + get_pure_rep_price(
-				coder, i, coder->state, pos_state);
-
-		do {
-			const uint32_t cur_and_len_price = price
-					+ get_len_price(
-						&coder->rep_len_encoder,
-						rep_len, pos_state);
-
-			if (cur_and_len_price < coder->opts[rep_len].price) {
-				coder->opts[rep_len].price = cur_and_len_price;
-				coder->opts[rep_len].pos_prev = 0;
-				coder->opts[rep_len].back_prev = i;
-				coder->opts[rep_len].prev_1_is_literal = false;
-			}
-		} while (--rep_len >= 2);
-	}
-
-
-	const uint32_t normal_match_price = match_price
-			+ rc_bit_0_price(coder->is_rep[coder->state]);
-
-	len = rep_lens[0] >= 2 ? rep_lens[0] + 1 : 2;
-	if (len <= len_main) {
-		uint32_t i = 0;
-		while (len > coder->matches[i].len)
-			++i;
-
-		for(; ; ++len) {
-			const uint32_t dist = coder->matches[i].dist;
-			const uint32_t cur_and_len_price = normal_match_price
-					+ get_pos_len_price(coder,
-						dist, len, pos_state);
-
-			if (cur_and_len_price < coder->opts[len].price) {
-				coder->opts[len].price = cur_and_len_price;
-				coder->opts[len].pos_prev = 0;
-				coder->opts[len].back_prev
-						= dist + REP_DISTANCES;
-				coder->opts[len].prev_1_is_literal = false;
-			}
-
-			if (len == coder->matches[i].len)
-				if (++i == matches_count)
-					break;
-		}
-	}
-
-	return len_end;
-}
-
-
-static inline uint32_t
-helper2(lzma_coder *coder, uint32_t *reps, const uint8_t *buf,
-		uint32_t len_end, uint32_t position, const uint32_t cur,
-		const uint32_t nice_len, const uint32_t buf_avail_full)
-{
-	uint32_t matches_count = coder->matches_count;
-	uint32_t new_len = coder->longest_match_length;
-	uint32_t pos_prev = coder->opts[cur].pos_prev;
-	lzma_lzma_state state;
-
-	if (coder->opts[cur].prev_1_is_literal) {
-		--pos_prev;
-
-		if (coder->opts[cur].prev_2) {
-			state = coder->opts[coder->opts[cur].pos_prev_2].state;
-
-			if (coder->opts[cur].back_prev_2 < REP_DISTANCES)
-				update_long_rep(state);
-			else
-				update_match(state);
-
-		} else {
-			state = coder->opts[pos_prev].state;
-		}
-
-		update_literal(state);
-
-	} else {
-		state = coder->opts[pos_prev].state;
-	}
-
-	if (pos_prev == cur - 1) {
-		if (is_short_rep(coder->opts[cur]))
-			update_short_rep(state);
-		else
-			update_literal(state);
-	} else {
-		uint32_t pos;
-		if (coder->opts[cur].prev_1_is_literal
-				&& coder->opts[cur].prev_2) {
-			pos_prev = coder->opts[cur].pos_prev_2;
-			pos = coder->opts[cur].back_prev_2;
-			update_long_rep(state);
-		} else {
-			pos = coder->opts[cur].back_prev;
-			if (pos < REP_DISTANCES)
-				update_long_rep(state);
-			else
-				update_match(state);
-		}
-
-		if (pos < REP_DISTANCES) {
-			reps[0] = coder->opts[pos_prev].backs[pos];
-
-			uint32_t i;
-			for (i = 1; i <= pos; ++i)
-				reps[i] = coder->opts[pos_prev].backs[i - 1];
-
-			for (; i < REP_DISTANCES; ++i)
-				reps[i] = coder->opts[pos_prev].backs[i];
-
-		} else {
-			reps[0] = pos - REP_DISTANCES;
-
-			for (uint32_t i = 1; i < REP_DISTANCES; ++i)
-				reps[i] = coder->opts[pos_prev].backs[i - 1];
-		}
-	}
-
-	coder->opts[cur].state = state;
-
-	for (uint32_t i = 0; i < REP_DISTANCES; ++i)
-		coder->opts[cur].backs[i] = reps[i];
-
-	const uint32_t cur_price = coder->opts[cur].price;
-
-	const uint8_t current_byte = *buf;
-	const uint8_t match_byte = *(buf - reps[0] - 1);
-
-	const uint32_t pos_state = position & coder->pos_mask;
-
-	const uint32_t cur_and_1_price = cur_price
-			+ rc_bit_0_price(coder->is_match[state][pos_state])
-			+ get_literal_price(coder, position, buf[-1],
-			!is_literal_state(state), match_byte, current_byte);
-
-	bool next_is_literal = false;
-
-	if (cur_and_1_price < coder->opts[cur + 1].price) {
-		coder->opts[cur + 1].price = cur_and_1_price;
-		coder->opts[cur + 1].pos_prev = cur;
-		make_literal(&coder->opts[cur + 1]);
-		next_is_literal = true;
-	}
-
-	const uint32_t match_price = cur_price
-			+ rc_bit_1_price(coder->is_match[state][pos_state]);
-	const uint32_t rep_match_price = match_price
-			+ rc_bit_1_price(coder->is_rep[state]);
-
-	if (match_byte == current_byte
-			&& !(coder->opts[cur + 1].pos_prev < cur
-				&& coder->opts[cur + 1].back_prev == 0)) {
-
-		const uint32_t short_rep_price = rep_match_price
-				+ get_short_rep_price(coder, state, pos_state);
-
-		if (short_rep_price <= coder->opts[cur + 1].price) {
-			coder->opts[cur + 1].price = short_rep_price;
-			coder->opts[cur + 1].pos_prev = cur;
-			make_short_rep(&coder->opts[cur + 1]);
-			next_is_literal = true;
-		}
-	}
-
-	if (buf_avail_full < 2)
-		return len_end;
-
-	const uint32_t buf_avail = my_min(buf_avail_full, nice_len);
-
-	if (!next_is_literal && match_byte != current_byte) { // speed optimization
-		// try literal + rep0
-		const uint8_t *const buf_back = buf - reps[0] - 1;
-		const uint32_t limit = my_min(buf_avail_full, nice_len + 1);
-
-		uint32_t len_test = 1;
-		while (len_test < limit && buf[len_test] == buf_back[len_test])
-			++len_test;
-
-		--len_test;
-
-		if (len_test >= 2) {
-			lzma_lzma_state state_2 = state;
-			update_literal(state_2);
-
-			const uint32_t pos_state_next = (position + 1) & coder->pos_mask;
-			const uint32_t next_rep_match_price = cur_and_1_price
-					+ rc_bit_1_price(coder->is_match[state_2][pos_state_next])
-					+ rc_bit_1_price(coder->is_rep[state_2]);
-
-			//for (; len_test >= 2; --len_test) {
-			const uint32_t offset = cur + 1 + len_test;
-
-			while (len_end < offset)
-				coder->opts[++len_end].price = RC_INFINITY_PRICE;
-
-			const uint32_t cur_and_len_price = next_rep_match_price
-					+ get_rep_price(coder, 0, len_test,
-						state_2, pos_state_next);
-
-			if (cur_and_len_price < coder->opts[offset].price) {
-				coder->opts[offset].price = cur_and_len_price;
-				coder->opts[offset].pos_prev = cur + 1;
-				coder->opts[offset].back_prev = 0;
-				coder->opts[offset].prev_1_is_literal = true;
-				coder->opts[offset].prev_2 = false;
-			}
-			//}
-		}
-	}
-
-
-	uint32_t start_len = 2; // speed optimization
-
-	for (uint32_t rep_index = 0; rep_index < REP_DISTANCES; ++rep_index) {
-		const uint8_t *const buf_back = buf - reps[rep_index] - 1;
-		if (not_equal_16(buf, buf_back))
-			continue;
-
-		uint32_t len_test;
-		for (len_test = 2; len_test < buf_avail
-				&& buf[len_test] == buf_back[len_test];
-				++len_test) ;
-
-		while (len_end < cur + len_test)
-			coder->opts[++len_end].price = RC_INFINITY_PRICE;
-
-		const uint32_t len_test_temp = len_test;
-		const uint32_t price = rep_match_price + get_pure_rep_price(
-				coder, rep_index, state, pos_state);
-
-		do {
-			const uint32_t cur_and_len_price = price
-					+ get_len_price(&coder->rep_len_encoder,
-							len_test, pos_state);
-
-			if (cur_and_len_price < coder->opts[cur + len_test].price) {
-				coder->opts[cur + len_test].price = cur_and_len_price;
-				coder->opts[cur + len_test].pos_prev = cur;
-				coder->opts[cur + len_test].back_prev = rep_index;
-				coder->opts[cur + len_test].prev_1_is_literal = false;
-			}
-		} while (--len_test >= 2);
-
-		len_test = len_test_temp;
-
-		if (rep_index == 0)
-			start_len = len_test + 1;
-
-
-		uint32_t len_test_2 = len_test + 1;
-		const uint32_t limit = my_min(buf_avail_full,
-				len_test_2 + nice_len);
-		for (; len_test_2 < limit
-				&& buf[len_test_2] == buf_back[len_test_2];
-				++len_test_2) ;
-
-		len_test_2 -= len_test + 1;
-
-		if (len_test_2 >= 2) {
-			lzma_lzma_state state_2 = state;
-			update_long_rep(state_2);
-
-			uint32_t pos_state_next = (position + len_test) & coder->pos_mask;
-
-			const uint32_t cur_and_len_literal_price = price
-					+ get_len_price(&coder->rep_len_encoder,
-						len_test, pos_state)
-					+ rc_bit_0_price(coder->is_match[state_2][pos_state_next])
-					+ get_literal_price(coder, position + len_test,
-						buf[len_test - 1], true,
-						buf_back[len_test], buf[len_test]);
-
-			update_literal(state_2);
-
-			pos_state_next = (position + len_test + 1) & coder->pos_mask;
-
-			const uint32_t next_rep_match_price = cur_and_len_literal_price
-					+ rc_bit_1_price(coder->is_match[state_2][pos_state_next])
-					+ rc_bit_1_price(coder->is_rep[state_2]);
-
-			//for(; len_test_2 >= 2; len_test_2--) {
-			const uint32_t offset = cur + len_test + 1 + len_test_2;
-
-			while (len_end < offset)
-				coder->opts[++len_end].price = RC_INFINITY_PRICE;
-
-			const uint32_t cur_and_len_price = next_rep_match_price
-					+ get_rep_price(coder, 0, len_test_2,
-						state_2, pos_state_next);
-
-			if (cur_and_len_price < coder->opts[offset].price) {
-				coder->opts[offset].price = cur_and_len_price;
-				coder->opts[offset].pos_prev = cur + len_test + 1;
-				coder->opts[offset].back_prev = 0;
-				coder->opts[offset].prev_1_is_literal = true;
-				coder->opts[offset].prev_2 = true;
-				coder->opts[offset].pos_prev_2 = cur;
-				coder->opts[offset].back_prev_2 = rep_index;
-			}
-			//}
-		}
-	}
-
-
-	//for (uint32_t len_test = 2; len_test <= new_len; ++len_test)
-	if (new_len > buf_avail) {
-		new_len = buf_avail;
-
-		matches_count = 0;
-		while (new_len > coder->matches[matches_count].len)
-			++matches_count;
-
-		coder->matches[matches_count++].len = new_len;
-	}
-
-
-	if (new_len >= start_len) {
-		const uint32_t normal_match_price = match_price
-				+ rc_bit_0_price(coder->is_rep[state]);
-
-		while (len_end < cur + new_len)
-			coder->opts[++len_end].price = RC_INFINITY_PRICE;
-
-		uint32_t i = 0;
-		while (start_len > coder->matches[i].len)
-			++i;
-
-		for (uint32_t len_test = start_len; ; ++len_test) {
-			const uint32_t cur_back = coder->matches[i].dist;
-			uint32_t cur_and_len_price = normal_match_price
-					+ get_pos_len_price(coder,
-						cur_back, len_test, pos_state);
-
-			if (cur_and_len_price < coder->opts[cur + len_test].price) {
-				coder->opts[cur + len_test].price = cur_and_len_price;
-				coder->opts[cur + len_test].pos_prev = cur;
-				coder->opts[cur + len_test].back_prev
-						= cur_back + REP_DISTANCES;
-				coder->opts[cur + len_test].prev_1_is_literal = false;
-			}
-
-			if (len_test == coder->matches[i].len) {
-				// Try Match + Literal + Rep0
-				const uint8_t *const buf_back = buf - cur_back - 1;
-				uint32_t len_test_2 = len_test + 1;
-				const uint32_t limit = my_min(buf_avail_full,
-						len_test_2 + nice_len);
-
-				for (; len_test_2 < limit &&
-						buf[len_test_2] == buf_back[len_test_2];
-						++len_test_2) ;
-
-				len_test_2 -= len_test + 1;
-
-				if (len_test_2 >= 2) {
-					lzma_lzma_state state_2 = state;
-					update_match(state_2);
-					uint32_t pos_state_next
-							= (position + len_test) & coder->pos_mask;
-
-					const uint32_t cur_and_len_literal_price = cur_and_len_price
-							+ rc_bit_0_price(
-								coder->is_match[state_2][pos_state_next])
-							+ get_literal_price(coder,
-								position + len_test,
-								buf[len_test - 1],
-								true,
-								buf_back[len_test],
-								buf[len_test]);
-
-					update_literal(state_2);
-					pos_state_next = (pos_state_next + 1) & coder->pos_mask;
-
-					const uint32_t next_rep_match_price
-							= cur_and_len_literal_price
-							+ rc_bit_1_price(
-								coder->is_match[state_2][pos_state_next])
-							+ rc_bit_1_price(coder->is_rep[state_2]);
-
-					// for(; len_test_2 >= 2; --len_test_2) {
-					const uint32_t offset = cur + len_test + 1 + len_test_2;
-
-					while (len_end < offset)
-						coder->opts[++len_end].price = RC_INFINITY_PRICE;
-
-					cur_and_len_price = next_rep_match_price
-							+ get_rep_price(coder, 0, len_test_2,
-								state_2, pos_state_next);
-
-					if (cur_and_len_price < coder->opts[offset].price) {
-						coder->opts[offset].price = cur_and_len_price;
-						coder->opts[offset].pos_prev = cur + len_test + 1;
-						coder->opts[offset].back_prev = 0;
-						coder->opts[offset].prev_1_is_literal = true;
-						coder->opts[offset].prev_2 = true;
-						coder->opts[offset].pos_prev_2 = cur;
-						coder->opts[offset].back_prev_2
-								= cur_back + REP_DISTANCES;
-					}
-					//}
-				}
-
-				if (++i == matches_count)
-					break;
-			}
-		}
-	}
-
-	return len_end;
-}
-
-
-extern void
-lzma_lzma_optimum_normal(lzma_coder *restrict coder, lzma_mf *restrict mf,
-		uint32_t *restrict back_res, uint32_t *restrict len_res,
-		uint32_t position)
-{
-	// If we have symbols pending, return the next pending symbol.
-	if (coder->opts_end_index != coder->opts_current_index) {
-		assert(mf->read_ahead > 0);
-		*len_res = coder->opts[coder->opts_current_index].pos_prev
-				- coder->opts_current_index;
-		*back_res = coder->opts[coder->opts_current_index].back_prev;
-		coder->opts_current_index = coder->opts[
-				coder->opts_current_index].pos_prev;
-		return;
-	}
-
-	// Update the price tables. In LZMA SDK <= 4.60 (and possibly later)
-	// this was done in both initialization function and in the main loop.
-	// In liblzma they were moved into this single place.
-	if (mf->read_ahead == 0) {
-		if (coder->match_price_count >= (1 << 7))
-			fill_distances_prices(coder);
-
-		if (coder->align_price_count >= ALIGN_TABLE_SIZE)
-			fill_align_prices(coder);
-	}
-
-	// TODO: This needs quite a bit of cleaning still. But splitting
-	// the original function into two pieces makes it at least a little
-	// more readable, since those two parts don't share many variables.
-
-	uint32_t len_end = helper1(coder, mf, back_res, len_res, position);
-	if (len_end == UINT32_MAX)
-		return;
-
-	uint32_t reps[REP_DISTANCES];
-	memcpy(reps, coder->reps, sizeof(reps));
-
-	uint32_t cur;
-	for (cur = 1; cur < len_end; ++cur) {
-		assert(cur < OPTS);
-
-		coder->longest_match_length = mf_find(
-				mf, &coder->matches_count, coder->matches);
-
-		if (coder->longest_match_length >= mf->nice_len)
-			break;
-
-		len_end = helper2(coder, reps, mf_ptr(mf) - 1, len_end,
-				position + cur, cur, mf->nice_len,
-				my_min(mf_avail(mf) + 1, OPTS - 1 - cur));
-	}
-
-	backward(coder, len_res, back_res, cur);
-	return;
-}
diff --git a/src/extra/xz/lzma/lzma_encoder_presets.c b/src/extra/xz/lzma/lzma_encoder_presets.c
deleted file mode 100644
index 21e427a..0000000
--- a/src/extra/xz/lzma/lzma_encoder_presets.c
+++ /dev/null
@@ -1,61 +0,0 @@
-///////////////////////////////////////////////////////////////////////////////
-//
-/// \file       lzma_encoder_presets.c
-/// \brief      Encoder presets
-//
-//  Author:     Lasse Collin
-//
-//  This file has been put into the public domain.
-//  You can do whatever you want with this file.
-//
-///////////////////////////////////////////////////////////////////////////////
-
-#include "common.h"
-
-
-extern LZMA_API(lzma_bool)
-lzma_lzma_preset(lzma_options_lzma *options, uint32_t preset)
-{
-	const uint32_t level = preset & LZMA_PRESET_LEVEL_MASK;
-	const uint32_t flags = preset & ~LZMA_PRESET_LEVEL_MASK;
-	const uint32_t supported_flags = LZMA_PRESET_EXTREME;
-
-	if (level > 9 || (flags & ~supported_flags))
-		return true;
-
-	options->preset_dict = NULL;
-	options->preset_dict_size = 0;
-
-	options->lc = LZMA_LC_DEFAULT;
-	options->lp = LZMA_LP_DEFAULT;
-	options->pb = LZMA_PB_DEFAULT;
-
-	options->dict_size = UINT32_C(1) << (uint8_t []){
-			18, 20, 21, 22, 22, 23, 23, 24, 25, 26 }[level];
-
-	if (level <= 3) {
-		options->mode = LZMA_MODE_FAST;
-		options->mf = level == 0 ? LZMA_MF_HC3 : LZMA_MF_HC4;
-		options->nice_len = level <= 1 ? 128 : 273;
-		options->depth = (uint8_t []){ 4, 8, 24, 48 }[level];
-	} else {
-		options->mode = LZMA_MODE_NORMAL;
-		options->mf = LZMA_MF_BT4;
-		options->nice_len = level == 4 ? 16 : level == 5 ? 32 : 64;
-		options->depth = 0;
-	}
-
-	if (flags & LZMA_PRESET_EXTREME) {
-		options->mode = LZMA_MODE_NORMAL;
-		options->mf = LZMA_MF_BT4;
-		if (level == 3 || level == 5) {
-			options->nice_len = 192;
-			options->depth = 0;
-		} else {
-			options->nice_len = 273;
-			options->depth = 512;
-		}
-	}
-
-	return false;
-}
diff --git a/src/extra/xz/lzma/lzma_encoder_private.h b/src/extra/xz/lzma/lzma_encoder_private.h
deleted file mode 100644
index 6847452..0000000
--- a/src/extra/xz/lzma/lzma_encoder_private.h
+++ /dev/null
@@ -1,148 +0,0 @@
-///////////////////////////////////////////////////////////////////////////////
-//
-/// \file       lzma_encoder_private.h
-/// \brief      Private definitions for LZMA encoder
-///
-//  Authors:    Igor Pavlov
-//              Lasse Collin
-//
-//  This file has been put into the public domain.
-//  You can do whatever you want with this file.
-//
-///////////////////////////////////////////////////////////////////////////////
-
-#ifndef LZMA_LZMA_ENCODER_PRIVATE_H
-#define LZMA_LZMA_ENCODER_PRIVATE_H
-
-#include "lz_encoder.h"
-#include "range_encoder.h"
-#include "lzma_common.h"
-#include "lzma_encoder.h"
-
-
-// Macro to compare if the first two bytes in two buffers differ. This is
-// needed in lzma_lzma_optimum_*() to test if the match is at least
-// MATCH_LEN_MIN bytes. Unaligned access gives tiny gain so there's no
-// reason to not use it when it is supported.
-#ifdef TUKLIB_FAST_UNALIGNED_ACCESS
-#	define not_equal_16(a, b) \
-		(*(const uint16_t *)(a) != *(const uint16_t *)(b))
-#else
-#	define not_equal_16(a, b) \
-		((a)[0] != (b)[0] || (a)[1] != (b)[1])
-#endif
-
-
-// Optimal - Number of entries in the optimum array.
-#define OPTS (1 << 12)
-
-
-typedef struct {
-	probability choice;
-	probability choice2;
-	probability low[POS_STATES_MAX][LEN_LOW_SYMBOLS];
-	probability mid[POS_STATES_MAX][LEN_MID_SYMBOLS];
-	probability high[LEN_HIGH_SYMBOLS];
-
-	uint32_t prices[POS_STATES_MAX][LEN_SYMBOLS];
-	uint32_t table_size;
-	uint32_t counters[POS_STATES_MAX];
-
-} lzma_length_encoder;
-
-
-typedef struct {
-	lzma_lzma_state state;
-
-	bool prev_1_is_literal;
-	bool prev_2;
-
-	uint32_t pos_prev_2;
-	uint32_t back_prev_2;
-
-	uint32_t price;
-	uint32_t pos_prev;  // pos_next;
-	uint32_t back_prev;
-
-	uint32_t backs[REP_DISTANCES];
-
-} lzma_optimal;
-
-
-struct lzma_coder_s {
-	/// Range encoder
-	lzma_range_encoder rc;
-
-	/// State
-	lzma_lzma_state state;
-
-	/// The four most recent match distances
-	uint32_t reps[REP_DISTANCES];
-
-	/// Array of match candidates
-	lzma_match matches[MATCH_LEN_MAX + 1];
-
-	/// Number of match candidates in matches[]
-	uint32_t matches_count;
-
-	/// Variable to hold the length of the longest match between calls
-	/// to lzma_lzma_optimum_*().
-	uint32_t longest_match_length;
-
-	/// True if using getoptimumfast
-	bool fast_mode;
-
-	/// True if the encoder has been initialized by encoding the first
-	/// byte as a literal.
-	bool is_initialized;
-
-	/// True if the range encoder has been flushed, but not all bytes
-	/// have been written to the output buffer yet.
-	bool is_flushed;
-
-	uint32_t pos_mask;         ///< (1 << pos_bits) - 1
-	uint32_t literal_context_bits;
-	uint32_t literal_pos_mask;
-
-	// These are the same as in lzma_decoder.c. See comments there.
-	probability literal[LITERAL_CODERS_MAX][LITERAL_CODER_SIZE];
-	probability is_match[STATES][POS_STATES_MAX];
-	probability is_rep[STATES];
-	probability is_rep0[STATES];
-	probability is_rep1[STATES];
-	probability is_rep2[STATES];
-	probability is_rep0_long[STATES][POS_STATES_MAX];
-	probability pos_slot[LEN_TO_POS_STATES][POS_SLOTS];
-	probability pos_special[FULL_DISTANCES - END_POS_MODEL_INDEX];
-	probability pos_align[ALIGN_TABLE_SIZE];
-
-	// These are the same as in lzma_decoder.c except that the encoders
-	// include also price tables.
-	lzma_length_encoder match_len_encoder;
-	lzma_length_encoder rep_len_encoder;
-
-	// Price tables
-	uint32_t pos_slot_prices[LEN_TO_POS_STATES][POS_SLOTS];
-	uint32_t distances_prices[LEN_TO_POS_STATES][FULL_DISTANCES];
-	uint32_t dist_table_size;
-	uint32_t match_price_count;
-
-	uint32_t align_prices[ALIGN_TABLE_SIZE];
-	uint32_t align_price_count;
-
-	// Optimal
-	uint32_t opts_end_index;
-	uint32_t opts_current_index;
-	lzma_optimal opts[OPTS];
-};
-
-
-extern void lzma_lzma_optimum_fast(
-		lzma_coder *restrict coder, lzma_mf *restrict mf,
-		uint32_t *restrict back_res, uint32_t *restrict len_res);
-
-extern void lzma_lzma_optimum_normal(lzma_coder *restrict coder,
-		lzma_mf *restrict mf, uint32_t *restrict back_res,
-		uint32_t *restrict len_res, uint32_t position);
-
-#endif
diff --git a/src/extra/xz/rangecoder/price.h b/src/extra/xz/rangecoder/price.h
deleted file mode 100644
index 8ae02ca..0000000
--- a/src/extra/xz/rangecoder/price.h
+++ /dev/null
@@ -1,92 +0,0 @@
-///////////////////////////////////////////////////////////////////////////////
-//
-/// \file       price.h
-/// \brief      Probability price calculation
-//
-//  Author:     Igor Pavlov
-//
-//  This file has been put into the public domain.
-//  You can do whatever you want with this file.
-//
-///////////////////////////////////////////////////////////////////////////////
-
-#ifndef LZMA_PRICE_H
-#define LZMA_PRICE_H
-
-
-#define RC_MOVE_REDUCING_BITS 4
-#define RC_BIT_PRICE_SHIFT_BITS 4
-#define RC_PRICE_TABLE_SIZE (RC_BIT_MODEL_TOTAL >> RC_MOVE_REDUCING_BITS)
-
-#define RC_INFINITY_PRICE (UINT32_C(1) << 30)
-
-
-/// Lookup table for the inline functions defined in this file.
-extern const uint8_t lzma_rc_prices[RC_PRICE_TABLE_SIZE];
-
-
-static inline uint32_t
-rc_bit_price(const probability prob, const uint32_t bit)
-{
-	return lzma_rc_prices[(prob ^ ((UINT32_C(0) - bit)
-			& (RC_BIT_MODEL_TOTAL - 1))) >> RC_MOVE_REDUCING_BITS];
-}
-
-
-static inline uint32_t
-rc_bit_0_price(const probability prob)
-{
-	return lzma_rc_prices[prob >> RC_MOVE_REDUCING_BITS];
-}
-
-
-static inline uint32_t
-rc_bit_1_price(const probability prob)
-{
-	return lzma_rc_prices[(prob ^ (RC_BIT_MODEL_TOTAL - 1))
-			>> RC_MOVE_REDUCING_BITS];
-}
-
-
-static inline uint32_t
-rc_bittree_price(const probability *const probs,
-		const uint32_t bit_levels, uint32_t symbol)
-{
-	uint32_t price = 0;
-	symbol += UINT32_C(1) << bit_levels;
-
-	do {
-		const uint32_t bit = symbol & 1;
-		symbol >>= 1;
-		price += rc_bit_price(probs[symbol], bit);
-	} while (symbol != 1);
-
-	return price;
-}
-
-
-static inline uint32_t
-rc_bittree_reverse_price(const probability *const probs,
-		uint32_t bit_levels, uint32_t symbol)
-{
-	uint32_t price = 0;
-	uint32_t model_index = 1;
-
-	do {
-		const uint32_t bit = symbol & 1;
-		symbol >>= 1;
-		price += rc_bit_price(probs[model_index], bit);
-		model_index = (model_index << 1) + bit;
-	} while (--bit_levels != 0);
-
-	return price;
-}
-
-
-static inline uint32_t
-rc_direct_price(const uint32_t bits)
-{
-	 return bits << RC_BIT_PRICE_SHIFT_BITS;
-}
-
-#endif
diff --git a/src/extra/xz/rangecoder/price_table.c b/src/extra/xz/rangecoder/price_table.c
deleted file mode 100644
index ac64bf6..0000000
--- a/src/extra/xz/rangecoder/price_table.c
+++ /dev/null
@@ -1,22 +0,0 @@
-/* This file has been automatically generated by price_tablegen.c. */
-
-#include "range_encoder.h"
-
-const uint8_t lzma_rc_prices[RC_PRICE_TABLE_SIZE] = {
-	 128, 103,  91,  84,  78,  73,  69,  66,
-	  63,  61,  58,  56,  54,  52,  51,  49,
-	  48,  46,  45,  44,  43,  42,  41,  40,
-	  39,  38,  37,  36,  35,  34,  34,  33,
-	  32,  31,  31,  30,  29,  29,  28,  28,
-	  27,  26,  26,  25,  25,  24,  24,  23,
-	  23,  22,  22,  22,  21,  21,  20,  20,
-	  19,  19,  19,  18,  18,  17,  17,  17,
-	  16,  16,  16,  15,  15,  15,  14,  14,
-	  14,  13,  13,  13,  12,  12,  12,  11,
-	  11,  11,  11,  10,  10,  10,  10,   9,
-	   9,   9,   9,   8,   8,   8,   8,   7,
-	   7,   7,   7,   6,   6,   6,   6,   5,
-	   5,   5,   5,   5,   4,   4,   4,   4,
-	   3,   3,   3,   3,   3,   2,   2,   2,
-	   2,   2,   2,   1,   1,   1,   1,   1
-};
diff --git a/src/extra/xz/rangecoder/price_tablegen.c b/src/extra/xz/rangecoder/price_tablegen.c
deleted file mode 100644
index bf08ce3..0000000
--- a/src/extra/xz/rangecoder/price_tablegen.c
+++ /dev/null
@@ -1,87 +0,0 @@
-///////////////////////////////////////////////////////////////////////////////
-//
-/// \file       price_tablegen.c
-/// \brief      Probability price table generator
-///
-/// Compiling: gcc -std=c99 -o price_tablegen price_tablegen.c
-///
-//  Authors:    Igor Pavlov
-//              Lasse Collin
-//
-//  This file has been put into the public domain.
-//  You can do whatever you want with this file.
-//
-///////////////////////////////////////////////////////////////////////////////
-
-#include <inttypes.h>
-#include <stdio.h>
-#include "range_common.h"
-#include "price.h"
-
-
-static uint32_t rc_prices[RC_PRICE_TABLE_SIZE];
-
-
-static void
-init_price_table(void)
-{
-	for (uint32_t i = (UINT32_C(1) << RC_MOVE_REDUCING_BITS) / 2;
-			i < RC_BIT_MODEL_TOTAL;
-			i += (UINT32_C(1) << RC_MOVE_REDUCING_BITS)) {
-		const uint32_t cycles_bits = RC_BIT_PRICE_SHIFT_BITS;
-		uint32_t w = i;
-		uint32_t bit_count = 0;
-
-		for (uint32_t j = 0; j < cycles_bits; ++j) {
-			w *= w;
-			bit_count <<= 1;
-
-			while (w >= (UINT32_C(1) << 16)) {
-				w >>= 1;
-				++bit_count;
-			}
-		}
-
-		rc_prices[i >> RC_MOVE_REDUCING_BITS]
-				= (RC_BIT_MODEL_TOTAL_BITS << cycles_bits)
-				- 15 - bit_count;
-	}
-
-	return;
-}
-
-
-static void
-print_price_table(void)
-{
-	printf("/* This file has been automatically generated by "
-			"price_tablegen.c. */\n\n"
-			"#include \"range_encoder.h\"\n\n"
-			"const uint8_t lzma_rc_prices["
-			"RC_PRICE_TABLE_SIZE] = {");
-
-	const size_t array_size = sizeof(lzma_rc_prices)
-			/ sizeof(lzma_rc_prices[0]);
-	for (size_t i = 0; i < array_size; ++i) {
-		if (i % 8 == 0)
-			printf("\n\t");
-
-		printf("%4" PRIu32, rc_prices[i]);
-
-		if (i != array_size - 1)
-			printf(",");
-	}
-
-	printf("\n};\n");
-
-	return;
-}
-
-
-int
-main(void)
-{
-	init_price_table();
-	print_price_table();
-	return 0;
-}
diff --git a/src/extra/xz/rangecoder/range_common.h b/src/extra/xz/rangecoder/range_common.h
deleted file mode 100644
index 0e64241..0000000
--- a/src/extra/xz/rangecoder/range_common.h
+++ /dev/null
@@ -1,73 +0,0 @@
-///////////////////////////////////////////////////////////////////////////////
-//
-/// \file       range_common.h
-/// \brief      Common things for range encoder and decoder
-///
-//  Authors:    Igor Pavlov
-//              Lasse Collin
-//
-//  This file has been put into the public domain.
-//  You can do whatever you want with this file.
-//
-///////////////////////////////////////////////////////////////////////////////
-
-#ifndef LZMA_RANGE_COMMON_H
-#define LZMA_RANGE_COMMON_H
-
-#ifdef HAVE_CONFIG_H
-#	include "common.h"
-#endif
-
-
-///////////////
-// Constants //
-///////////////
-
-#define RC_SHIFT_BITS 8
-#define RC_TOP_BITS 24
-#define RC_TOP_VALUE (UINT32_C(1) << RC_TOP_BITS)
-#define RC_BIT_MODEL_TOTAL_BITS 11
-#define RC_BIT_MODEL_TOTAL (UINT32_C(1) << RC_BIT_MODEL_TOTAL_BITS)
-#define RC_MOVE_BITS 5
-
-
-////////////
-// Macros //
-////////////
-
-// Resets the probability so that both 0 and 1 have probability of 50 %
-#define bit_reset(prob) \
-	prob = RC_BIT_MODEL_TOTAL >> 1
-
-// This does the same for a complete bit tree.
-// (A tree represented as an array.)
-#define bittree_reset(probs, bit_levels) \
-	for (uint32_t bt_i = 0; bt_i < (1 << (bit_levels)); ++bt_i) \
-		bit_reset((probs)[bt_i])
-
-
-//////////////////////
-// Type definitions //
-//////////////////////
-
-/// \brief      Type of probabilities used with range coder
-///
-/// This needs to be at least 12-bit integer, so uint16_t is a logical choice.
-/// However, on some architecture and compiler combinations, a bigger type
-/// may give better speed, because the probability variables are accessed
-/// a lot. On the other hand, bigger probability type increases cache
-/// footprint, since there are 2 to 14 thousand probability variables in
-/// LZMA (assuming the limit of lc + lp <= 4; with lc + lp <= 12 there
-/// would be about 1.5 million variables).
-///
-/// With malicious files, the initialization speed of the LZMA decoder can
-/// become important. In that case, smaller probability variables mean that
-/// there is less bytes to write to RAM, which makes initialization faster.
-/// With big probability type, the initialization can become so slow that it
-/// can be a problem e.g. for email servers doing virus scanning.
-///
-/// I will be sticking to uint16_t unless some specific architectures
-/// are *much* faster (20-50 %) with uint32_t.
-typedef uint16_t probability;
-
-#endif
diff --git a/src/extra/xz/rangecoder/range_decoder.h b/src/extra/xz/rangecoder/range_decoder.h
deleted file mode 100644
index fb96180..0000000
--- a/src/extra/xz/rangecoder/range_decoder.h
+++ /dev/null
@@ -1,179 +0,0 @@
-///////////////////////////////////////////////////////////////////////////////
-//
-/// \file       range_decoder.h
-/// \brief      Range Decoder
-///
-//  Authors:    Igor Pavlov
-//              Lasse Collin
-//
-//  This file has been put into the public domain.
-//  You can do whatever you want with this file.
-//
-///////////////////////////////////////////////////////////////////////////////
-
-#ifndef LZMA_RANGE_DECODER_H
-#define LZMA_RANGE_DECODER_H
-
-#include "range_common.h"
-
-
-typedef struct {
-	uint32_t range;
-	uint32_t code;
-	uint32_t init_bytes_left;
-} lzma_range_decoder;
-
-
-/// Reads the first five bytes to initialize the range decoder.
-static inline bool
-rc_read_init(lzma_range_decoder *rc, const uint8_t *restrict in,
-		size_t *restrict in_pos, size_t in_size)
-{
-	while (rc->init_bytes_left > 0) {
-		if (*in_pos == in_size)
-			return false;
-
-		rc->code = (rc->code << 8) | in[*in_pos];
-		++*in_pos;
-		--rc->init_bytes_left;
-	}
-
-	return true;
-}
-
-
-/// Makes local copies of range decoder and *in_pos variables. Doing this
-/// improves speed significantly. The range decoder macros expect also
-/// variables `in' and `in_size' to be defined.
-#define rc_to_local(range_decoder, in_pos) \
-	lzma_range_decoder rc = range_decoder; \
-	size_t rc_in_pos = (in_pos); \
-	uint32_t rc_bound
-
-
-/// Stores the local copes back to the range decoder structure.
-#define rc_from_local(range_decoder, in_pos) \
-do { \
-	range_decoder = rc; \
-	in_pos = rc_in_pos; \
-} while (0)
-
-
-/// Resets the range decoder structure.
-#define rc_reset(range_decoder) \
-do { \
-	(range_decoder).range = UINT32_MAX; \
-	(range_decoder).code = 0; \
-	(range_decoder).init_bytes_left = 5; \
-} while (0)
-
-
-/// When decoding has been properly finished, rc.code is always zero unless
-/// the input stream is corrupt. So checking this can catch some corrupt
-/// files especially if they don't have any other integrity check.
-#define rc_is_finished(range_decoder) \
-	((range_decoder).code == 0)
-
-
-/// Read the next input byte if needed. If more input is needed but there is
-/// no more input available, "goto out" is used to jump out of the main
-/// decoder loop.
-#define rc_normalize(seq) \
-do { \
-	if (rc.range < RC_TOP_VALUE) { \
-		if (unlikely(rc_in_pos == in_size)) { \
-			coder->sequence = seq; \
-			goto out; \
-		} \
-		rc.range <<= RC_SHIFT_BITS; \
-		rc.code = (rc.code << RC_SHIFT_BITS) | in[rc_in_pos++]; \
-	} \
-} while (0)
-
-
-/// Start decoding a bit. This must be used together with rc_update_0()
-/// and rc_update_1():
-///
-///     rc_if_0(prob, seq) {
-///         rc_update_0(prob);
-///         // Do something
-///     } else {
-///         rc_update_1(prob);
-///         // Do something else
-///     }
-///
-#define rc_if_0(prob, seq) \
-	rc_normalize(seq); \
-	rc_bound = (rc.range >> RC_BIT_MODEL_TOTAL_BITS) * (prob); \
-	if (rc.code < rc_bound)
-
-
-/// Update the range decoder state and the used probability variable to
-/// match a decoded bit of 0.
-#define rc_update_0(prob) \
-do { \
-	rc.range = rc_bound; \
-	prob += (RC_BIT_MODEL_TOTAL - (prob)) >> RC_MOVE_BITS; \
-} while (0)
-
-
-/// Update the range decoder state and the used probability variable to
-/// match a decoded bit of 1.
-#define rc_update_1(prob) \
-do { \
-	rc.range -= rc_bound; \
-	rc.code -= rc_bound; \
-	prob -= (prob) >> RC_MOVE_BITS; \
-} while (0)
-
-
-/// Decodes one bit and runs action0 or action1 depending on the decoded bit.
-/// This macro is used as the last step in bittree reverse decoders since
-/// those don't use "symbol" for anything else than indexing the probability
-/// arrays.
-#define rc_bit_last(prob, action0, action1, seq) \
-do { \
-	rc_if_0(prob, seq) { \
-		rc_update_0(prob); \
-		action0; \
-	} else { \
-		rc_update_1(prob); \
-		action1; \
-	} \
-} while (0)
-
-
-/// Decodes one bit, updates "symbol", and runs action0 or action1 depending
-/// on the decoded bit.
-#define rc_bit(prob, action0, action1, seq) \
-	rc_bit_last(prob, \
-		symbol <<= 1; action0, \
-		symbol = (symbol << 1) + 1; action1, \
-		seq);
-
-
-/// Like rc_bit() but add "case seq:" as a prefix. This makes the unrolled
-/// loops more readable because the code isn't littered with "case"
-/// statements. On the other hand this also makes it less readable, since
-/// spotting the places where the decoder loop may be restarted is less
-/// obvious.
-#define rc_bit_case(prob, action0, action1, seq) \
-	case seq: rc_bit(prob, action0, action1, seq)
-
-
-/// Decode a bit without using a probability.
-#define rc_direct(dest, seq) \
-do { \
-	rc_normalize(seq); \
-	rc.range >>= 1; \
-	rc.code -= rc.range; \
-	rc_bound = UINT32_C(0) - (rc.code >> 31); \
-	rc.code += rc.range & rc_bound; \
-	dest = (dest << 1) + (rc_bound + 1); \
-} while (0)
-
-
-// NOTE: No macros are provided for bittree decoding. It seems to be simpler
-// to just write them open in the code.
-
-#endif
diff --git a/src/extra/xz/rangecoder/range_encoder.h b/src/extra/xz/rangecoder/range_encoder.h
deleted file mode 100644
index 1e1c369..0000000
--- a/src/extra/xz/rangecoder/range_encoder.h
+++ /dev/null
@@ -1,231 +0,0 @@
-///////////////////////////////////////////////////////////////////////////////
-//
-/// \file       range_encoder.h
-/// \brief      Range Encoder
-///
-//  Authors:    Igor Pavlov
-//              Lasse Collin
-//
-//  This file has been put into the public domain.
-//  You can do whatever you want with this file.
-//
-///////////////////////////////////////////////////////////////////////////////
-
-#ifndef LZMA_RANGE_ENCODER_H
-#define LZMA_RANGE_ENCODER_H
-
-#include "range_common.h"
-#include "price.h"
-
-
-/// Maximum number of symbols that can be put pending into lzma_range_encoder
-/// structure between calls to lzma_rc_encode(). For LZMA, 52+5 is enough
-/// (match with big distance and length followed by range encoder flush).
-#define RC_SYMBOLS_MAX 58
-
-
-typedef struct {
-	uint64_t low;
-	uint64_t cache_size;
-	uint32_t range;
-	uint8_t cache;
-
-	/// Number of symbols in the tables
-	size_t count;
-
-	/// rc_encode()'s position in the tables
-	size_t pos;
-
-	/// Symbols to encode
-	enum {
-		RC_BIT_0,
-		RC_BIT_1,
-		RC_DIRECT_0,
-		RC_DIRECT_1,
-		RC_FLUSH,
-	} symbols[RC_SYMBOLS_MAX];
-
-	/// Probabilities associated with RC_BIT_0 or RC_BIT_1
-	probability *probs[RC_SYMBOLS_MAX];
-
-} lzma_range_encoder;
-
-
-static inline void
-rc_reset(lzma_range_encoder *rc)
-{
-	rc->low = 0;
-	rc->cache_size = 1;
-	rc->range = UINT32_MAX;
-	rc->cache = 0;
-	rc->count = 0;
-	rc->pos = 0;
-}
-
-
-static inline void
-rc_bit(lzma_range_encoder *rc, probability *prob, uint32_t bit)
-{
-	rc->symbols[rc->count] = bit;
-	rc->probs[rc->count] = prob;
-	++rc->count;
-}
-
-
-static inline void
-rc_bittree(lzma_range_encoder *rc, probability *probs,
-		uint32_t bit_count, uint32_t symbol)
-{
-	uint32_t model_index = 1;
-
-	do {
-		const uint32_t bit = (symbol >> --bit_count) & 1;
-		rc_bit(rc, &probs[model_index], bit);
-		model_index = (model_index << 1) + bit;
-	} while (bit_count != 0);
-}
-
-
-static inline void
-rc_bittree_reverse(lzma_range_encoder *rc, probability *probs,
-		uint32_t bit_count, uint32_t symbol)
-{
-	uint32_t model_index = 1;
-
-	do {
-		const uint32_t bit = symbol & 1;
-		symbol >>= 1;
-		rc_bit(rc, &probs[model_index], bit);
-		model_index = (model_index << 1) + bit;
-	} while (--bit_count != 0);
-}
-
-
-static inline void
-rc_direct(lzma_range_encoder *rc,
-		uint32_t value, uint32_t bit_count)
-{
-	do {
-		rc->symbols[rc->count++]
-				= RC_DIRECT_0 + ((value >> --bit_count) & 1);
-	} while (bit_count != 0);
-}
-
-
-static inline void
-rc_flush(lzma_range_encoder *rc)
-{
-	for (size_t i = 0; i < 5; ++i)
-		rc->symbols[rc->count++] = RC_FLUSH;
-}
-
-
-static inline bool
-rc_shift_low(lzma_range_encoder *rc,
-		uint8_t *out, size_t *out_pos, size_t out_size)
-{
-	if ((uint32_t)(rc->low) < (uint32_t)(0xFF000000)
-			|| (uint32_t)(rc->low >> 32) != 0) {
-		do {
-			if (*out_pos == out_size)
-				return true;
-
-			out[*out_pos] = rc->cache + (uint8_t)(rc->low >> 32);
-			++*out_pos;
-			rc->cache = 0xFF;
-
-		} while (--rc->cache_size != 0);
-
-		rc->cache = (rc->low >> 24) & 0xFF;
-	}
-
-	++rc->cache_size;
-	rc->low = (rc->low & 0x00FFFFFF) << RC_SHIFT_BITS;
-
-	return false;
-}
-
-
-static inline bool
-rc_encode(lzma_range_encoder *rc,
-		uint8_t *out, size_t *out_pos, size_t out_size)
-{
-	assert(rc->count <= RC_SYMBOLS_MAX);
-
-	while (rc->pos < rc->count) {
-		// Normalize
-		if (rc->range < RC_TOP_VALUE) {
-			if (rc_shift_low(rc, out, out_pos, out_size))
-				return true;
-
-			rc->range <<= RC_SHIFT_BITS;
-		}
-
-		// Encode a bit
-		switch (rc->symbols[rc->pos]) {
-		case RC_BIT_0: {
-			probability prob = *rc->probs[rc->pos];
-			rc->range = (rc->range >> RC_BIT_MODEL_TOTAL_BITS)
-					* prob;
-			prob += (RC_BIT_MODEL_TOTAL - prob) >> RC_MOVE_BITS;
-			*rc->probs[rc->pos] = prob;
-			break;
-		}
-
-		case RC_BIT_1: {
-			probability prob = *rc->probs[rc->pos];
-			const uint32_t bound = prob * (rc->range
-					>> RC_BIT_MODEL_TOTAL_BITS);
-			rc->low += bound;
-			rc->range -= bound;
-			prob -= prob >> RC_MOVE_BITS;
-			*rc->probs[rc->pos] = prob;
-			break;
-		}
-
-		case RC_DIRECT_0:
-			rc->range >>= 1;
-			break;
-
-		case RC_DIRECT_1:
-			rc->range >>= 1;
-			rc->low += rc->range;
-			break;
-
-		case RC_FLUSH:
-			// Prevent further normalizations.
-			rc->range = UINT32_MAX;
-
-			// Flush the last five bytes (see rc_flush()).
-			do {
-				if (rc_shift_low(rc, out, out_pos, out_size))
-					return true;
-			} while (++rc->pos < rc->count);
-
-			// Reset the range encoder so we are ready to continue
-			// encoding if we weren't finishing the stream.
-			rc_reset(rc);
-			return false;
-
-		default:
-			assert(0);
-			break;
-		}
-
-		++rc->pos;
-	}
-
-	rc->count = 0;
-	rc->pos = 0;
-
-	return false;
-}
-
-
-static inline uint64_t
-rc_pending(const lzma_range_encoder *rc)
-{
-	return rc->cache_size + 5 - 1;
-}
-
-#endif
diff --git a/src/extra/xz/simple/arm.c b/src/extra/xz/simple/arm.c
deleted file mode 100644
index a84702a..0000000
--- a/src/extra/xz/simple/arm.c
+++ /dev/null
@@ -1,69 +0,0 @@
-///////////////////////////////////////////////////////////////////////////////
-//
-/// \file       arm.c
-/// \brief      Filter for ARM binaries
-///
-//  Authors:    Igor Pavlov
-//              Lasse Collin
-//
-//  This file has been put into the public domain.
-//  You can do whatever you want with this file.
-//
-///////////////////////////////////////////////////////////////////////////////
-
-#include "simple_private.h"
-
-
-static size_t
-arm_code(lzma_simple *simple lzma_attribute((__unused__)),
-		uint32_t now_pos, bool is_encoder,
-		uint8_t *buffer, size_t size)
-{
-	size_t i;
-	for (i = 0; i + 4 <= size; i += 4) {
-		if (buffer[i + 3] == 0xEB) {
-			uint32_t src = (buffer[i + 2] << 16)
-					| (buffer[i + 1] << 8)
-					| (buffer[i + 0]);
-			src <<= 2;
-
-			uint32_t dest;
-			if (is_encoder)
-				dest = now_pos + (uint32_t)(i) + 8 + src;
-			else
-				dest = src - (now_pos + (uint32_t)(i) + 8);
-
-			dest >>= 2;
-			buffer[i + 2] = (dest >> 16);
-			buffer[i + 1] = (dest >> 8);
-			buffer[i + 0] = dest;
-		}
-	}
-
-	return i;
-}
-
-
-static lzma_ret
-arm_coder_init(lzma_next_coder *next, lzma_allocator *allocator,
-		const lzma_filter_info *filters, bool is_encoder)
-{
-	return lzma_simple_coder_init(next, allocator, filters,
-			&arm_code, 0, 4, 4, is_encoder);
-}
-
-
-extern lzma_ret
-lzma_simple_arm_encoder_init(lzma_next_coder *next, lzma_allocator *allocator,
-		const lzma_filter_info *filters)
-{
-	return arm_coder_init(next, allocator, filters, true);
-}
-
-
-extern lzma_ret
-lzma_simple_arm_decoder_init(lzma_next_coder *next, lzma_allocator *allocator,
-		const lzma_filter_info *filters)
-{
-	return arm_coder_init(next, allocator, filters, false);
-}
diff --git a/src/extra/xz/simple/armthumb.c b/src/extra/xz/simple/armthumb.c
deleted file mode 100644
index 4b49175..0000000
--- a/src/extra/xz/simple/armthumb.c
+++ /dev/null
@@ -1,74 +0,0 @@
-///////////////////////////////////////////////////////////////////////////////
-//
-/// \file       armthumb.c
-/// \brief      Filter for ARM-Thumb binaries
-///
-//  Authors:    Igor Pavlov
-//              Lasse Collin
-//
-//  This file has been put into the public domain.
-//  You can do whatever you want with this file.
-//
-///////////////////////////////////////////////////////////////////////////////
-
-#include "simple_private.h"
-
-
-static size_t
-armthumb_code(lzma_simple *simple lzma_attribute((__unused__)),
-		uint32_t now_pos, bool is_encoder,
-		uint8_t *buffer, size_t size)
-{
-	size_t i;
-	for (i = 0; i + 4 <= size; i += 2) {
-		if ((buffer[i + 1] & 0xF8) == 0xF0
-				&& (buffer[i + 3] & 0xF8) == 0xF8) {
-			uint32_t src = ((buffer[i + 1] & 0x7) << 19)
-					| (buffer[i + 0] << 11)
-					| ((buffer[i + 3] & 0x7) << 8)
-					| (buffer[i + 2]);
-
-			src <<= 1;
-
-			uint32_t dest;
-			if (is_encoder)
-				dest = now_pos + (uint32_t)(i) + 4 + src;
-			else
-				dest = src - (now_pos + (uint32_t)(i) + 4);
-
-			dest >>= 1;
-			buffer[i + 1] = 0xF0 | ((dest >> 19) & 0x7);
-			buffer[i + 0] = (dest >> 11);
-			buffer[i + 3] = 0xF8 | ((dest >> 8) & 0x7);
-			buffer[i + 2] = (dest);
-			i += 2;
-		}
-	}
-
-	return i;
-}
-
-
-static lzma_ret
-armthumb_coder_init(lzma_next_coder *next, lzma_allocator *allocator,
-		const lzma_filter_info *filters, bool is_encoder)
-{
-	return lzma_simple_coder_init(next, allocator, filters,
-			&armthumb_code, 0, 4, 2, is_encoder);
-}
-
-
-extern lzma_ret
-lzma_simple_armthumb_encoder_init(lzma_next_coder *next,
-		lzma_allocator *allocator, const lzma_filter_info *filters)
-{
-	return armthumb_coder_init(next, allocator, filters, true);
-}
-
-
-extern lzma_ret
-lzma_simple_armthumb_decoder_init(lzma_next_coder *next,
-		lzma_allocator *allocator, const lzma_filter_info *filters)
-{
-	return armthumb_coder_init(next, allocator, filters, false);
-}
diff --git a/src/extra/xz/simple/ia64.c b/src/extra/xz/simple/ia64.c
deleted file mode 100644
index ce3692b..0000000
--- a/src/extra/xz/simple/ia64.c
+++ /dev/null
@@ -1,110 +0,0 @@
-///////////////////////////////////////////////////////////////////////////////
-//
-/// \file       ia64.c
-/// \brief      Filter for IA64 (Itanium) binaries
-///
-//  Authors:    Igor Pavlov
-//              Lasse Collin
-//
-//  This file has been put into the public domain.
-//  You can do whatever you want with this file.
-//
-///////////////////////////////////////////////////////////////////////////////
-
-#include "simple_private.h"
-
-
-static size_t
-ia64_code(lzma_simple *simple lzma_attribute((__unused__)),
-		uint32_t now_pos, bool is_encoder,
-		uint8_t *buffer, size_t size)
-{
-	static const uint32_t BRANCH_TABLE[32] = {
-		0, 0, 0, 0, 0, 0, 0, 0,
-		0, 0, 0, 0, 0, 0, 0, 0,
-		4, 4, 6, 6, 0, 0, 7, 7,
-		4, 4, 0, 0, 4, 4, 0, 0
-	};
-
-	size_t i;
-	for (i = 0; i + 16 <= size; i += 16) {
-		const uint32_t instr_template = buffer[i] & 0x1F;
-		const uint32_t mask = BRANCH_TABLE[instr_template];
-		uint32_t bit_pos = 5;
-
-		for (size_t slot = 0; slot < 3; ++slot, bit_pos += 41) {
-			if (((mask >> slot) & 1) == 0)
-				continue;
-
-			const size_t byte_pos = (bit_pos >> 3);
-			const uint32_t bit_res = bit_pos & 0x7;
-			uint64_t instruction = 0;
-
-			for (size_t j = 0; j < 6; ++j)
-				instruction += (uint64_t)(
-						buffer[i + j + byte_pos])
-						<< (8 * j);
-
-			uint64_t inst_norm = instruction >> bit_res;
-
-			if (((inst_norm >> 37) & 0xF) == 0x5
-					&& ((inst_norm >> 9) & 0x7) == 0
-					/* &&  (inst_norm & 0x3F)== 0 */
-					) {
-				uint32_t src = (uint32_t)(
-						(inst_norm >> 13) & 0xFFFFF);
-				src |= ((inst_norm >> 36) & 1) << 20;
-
-				src <<= 4;
-
-				uint32_t dest;
-				if (is_encoder)
-					dest = now_pos + (uint32_t)(i) + src;
-				else
-					dest = src - (now_pos + (uint32_t)(i));
-
-				dest >>= 4;
-
-				inst_norm &= ~((uint64_t)(0x8FFFFF) << 13);
-				inst_norm |= (uint64_t)(dest & 0xFFFFF) << 13;
-				inst_norm |= (uint64_t)(dest & 0x100000)
-						<< (36 - 20);
-
-				instruction &= (1 << bit_res) - 1;
-				instruction |= (inst_norm << bit_res);
-
-				for (size_t j = 0; j < 6; j++)
-					buffer[i + j + byte_pos] = (uint8_t)(
-							instruction
-							>> (8 * j));
-			}
-		}
-	}
-
-	return i;
-}
-
-
-static lzma_ret
-ia64_coder_init(lzma_next_coder *next, lzma_allocator *allocator,
-		const lzma_filter_info *filters, bool is_encoder)
-{
-	return lzma_simple_coder_init(next, allocator, filters,
-			&ia64_code, 0, 16, 16, is_encoder);
-}
-
-
-extern lzma_ret
-lzma_simple_ia64_encoder_init(lzma_next_coder *next,
-		lzma_allocator *allocator, const lzma_filter_info *filters)
-{
-	return ia64_coder_init(next, allocator, filters, true);
-}
-
-
-extern lzma_ret
-lzma_simple_ia64_decoder_init(lzma_next_coder *next,
-		lzma_allocator *allocator, const lzma_filter_info *filters)
-{
-	return ia64_coder_init(next, allocator, filters, false);
-}
diff --git a/src/extra/xz/simple/powerpc.c b/src/extra/xz/simple/powerpc.c
deleted file mode 100644
index 6f83511..0000000
--- a/src/extra/xz/simple/powerpc.c
+++ /dev/null
@@ -1,73 +0,0 @@
-///////////////////////////////////////////////////////////////////////////////
-//
-/// \file       powerpc.c
-/// \brief      Filter for PowerPC (big endian) binaries
-///
-//  Authors:    Igor Pavlov
-//              Lasse Collin
-//
-//  This file has been put into the public domain.
-//  You can do whatever you want with this file.
-//
-///////////////////////////////////////////////////////////////////////////////
-
-#include "simple_private.h"
-
-
-static size_t
-powerpc_code(lzma_simple *simple lzma_attribute((__unused__)),
-		uint32_t now_pos, bool is_encoder,
-		uint8_t *buffer, size_t size)
-{
-	size_t i;
-	for (i = 0; i + 4 <= size; i += 4) {
-		// PowerPC branch 6(48) 24(Offset) 1(Abs) 1(Link)
-		if ((buffer[i] >> 2) == 0x12
-				&& ((buffer[i + 3] & 3) == 1)) {
-
-			const uint32_t src = ((buffer[i + 0] & 3) << 24)
-					| (buffer[i + 1] << 16)
-					| (buffer[i + 2] << 8)
-					| (buffer[i + 3] & (~3));
-
-			uint32_t dest;
-			if (is_encoder)
-				dest = now_pos + (uint32_t)(i) + src;
-			else
-				dest = src - (now_pos + (uint32_t)(i));
-
-			buffer[i + 0] = 0x48 | ((dest >> 24) &  0x03);
-			buffer[i + 1] = (dest >> 16);
-			buffer[i + 2] = (dest >> 8);
-			buffer[i + 3] &= 0x03;
-			buffer[i + 3] |= dest;
-		}
-	}
-
-	return i;
-}
-
-
-static lzma_ret
-powerpc_coder_init(lzma_next_coder *next, lzma_allocator *allocator,
-		const lzma_filter_info *filters, bool is_encoder)
-{
-	return lzma_simple_coder_init(next, allocator, filters,
-			&powerpc_code, 0, 4, 4, is_encoder);
-}
-
-
-extern lzma_ret
-lzma_simple_powerpc_encoder_init(lzma_next_coder *next,
-		lzma_allocator *allocator, const lzma_filter_info *filters)
-{
-	return powerpc_coder_init(next, allocator, filters, true);
-}
-
-
-extern lzma_ret
-lzma_simple_powerpc_decoder_init(lzma_next_coder *next,
-		lzma_allocator *allocator, const lzma_filter_info *filters)
-{
-	return powerpc_coder_init(next, allocator, filters, false);
-}
diff --git a/src/extra/xz/simple/simple_coder.c b/src/extra/xz/simple/simple_coder.c
deleted file mode 100644
index a02b039..0000000
--- a/src/extra/xz/simple/simple_coder.c
+++ /dev/null
@@ -1,277 +0,0 @@
-///////////////////////////////////////////////////////////////////////////////
-//
-/// \file       simple_coder.c
-/// \brief      Wrapper for simple filters
-///
-/// Simple filters don't change the size of the data i.e. number of bytes
-/// in equals the number of bytes out.
-//
-//  Author:     Lasse Collin
-//
-//  This file has been put into the public domain.
-//  You can do whatever you want with this file.
-//
-///////////////////////////////////////////////////////////////////////////////
-
-#include "simple_private.h"
-
-
-/// Copied or encodes/decodes more data to out[].
-static lzma_ret
-copy_or_code(lzma_coder *coder, lzma_allocator *allocator,
-		const uint8_t *restrict in, size_t *restrict in_pos,
-		size_t in_size, uint8_t *restrict out,
-		size_t *restrict out_pos, size_t out_size, lzma_action action)
-{
-	assert(!coder->end_was_reached);
-
-	if (coder->next.code == NULL) {
-		lzma_bufcpy(in, in_pos, in_size, out, out_pos, out_size);
-
-		// Check if end of stream was reached.
-		if (coder->is_encoder && action == LZMA_FINISH
-				&& *in_pos == in_size)
-			coder->end_was_reached = true;
-
-	} else {
-		// Call the next coder in the chain to provide us some data.
-		const lzma_ret ret = coder->next.code(
-				coder->next.coder, allocator,
-				in, in_pos, in_size,
-				out, out_pos, out_size, action);
-
-		if (ret == LZMA_STREAM_END) {
-			assert(!coder->is_encoder
-					|| action == LZMA_FINISH);
-			coder->end_was_reached = true;
-
-		} else if (ret != LZMA_OK) {
-			return ret;
-		}
-	}
-
-	return LZMA_OK;
-}
-
-
-static size_t
-call_filter(lzma_coder *coder, uint8_t *buffer, size_t size)
-{
-	const size_t filtered = coder->filter(coder->simple,
-			coder->now_pos, coder->is_encoder,
-			buffer, size);
-	coder->now_pos += filtered;
-	return filtered;
-}
-
-
-static lzma_ret
-simple_code(lzma_coder *coder, lzma_allocator *allocator,
-		const uint8_t *restrict in, size_t *restrict in_pos,
-		size_t in_size, uint8_t *restrict out,
-		size_t *restrict out_pos, size_t out_size, lzma_action action)
-{
-	// TODO: Add partial support for LZMA_SYNC_FLUSH. We can support it
-	// in cases when the filter is able to filter everything. With most
-	// simple filters it can be done at offset that is a multiple of 2,
-	// 4, or 16. With x86 filter, it needs good luck, and thus cannot
-	// be made to work predictably.
-	if (action == LZMA_SYNC_FLUSH)
-		return LZMA_OPTIONS_ERROR;
-
-	// Flush already filtered data from coder->buffer[] to out[].
-	if (coder->pos < coder->filtered) {
-		lzma_bufcpy(coder->buffer, &coder->pos, coder->filtered,
-				out, out_pos, out_size);
-
-		// If we couldn't flush all the filtered data, return to
-		// application immediately.
-		if (coder->pos < coder->filtered)
-			return LZMA_OK;
-
-		if (coder->end_was_reached) {
-			assert(coder->filtered == coder->size);
-			return LZMA_STREAM_END;
-		}
-	}
-
-	// If we get here, there is no filtered data left in the buffer.
-	coder->filtered = 0;
-
-	assert(!coder->end_was_reached);
-
-	// If there is more output space left than there is unfiltered data
-	// in coder->buffer[], flush coder->buffer[] to out[], and copy/code
-	// more data to out[] hopefully filling it completely. Then filter
-	// the data in out[]. This step is where most of the data gets
-	// filtered if the buffer sizes used by the application are reasonable.
-	const size_t out_avail = out_size - *out_pos;
-	const size_t buf_avail = coder->size - coder->pos;
-	if (out_avail > buf_avail || buf_avail == 0) {
-		// Store the old position so that we know from which byte
-		// to start filtering.
-		const size_t out_start = *out_pos;
-
-		// Flush data from coder->buffer[] to out[], but don't reset
-		// coder->pos and coder->size yet. This way the coder can be
-		// restarted if the next filter in the chain returns e.g.
-		// LZMA_MEM_ERROR.
-		memcpy(out + *out_pos, coder->buffer + coder->pos, buf_avail);
-		*out_pos += buf_avail;
-
-		// Copy/Encode/Decode more data to out[].
-		{
-			const lzma_ret ret = copy_or_code(coder, allocator,
-					in, in_pos, in_size,
-					out, out_pos, out_size, action);
-			assert(ret != LZMA_STREAM_END);
-			if (ret != LZMA_OK)
-				return ret;
-		}
-
-		// Filter out[].
-		const size_t size = *out_pos - out_start;
-		const size_t filtered = call_filter(
-				coder, out + out_start, size);
-
-		const size_t unfiltered = size - filtered;
-		assert(unfiltered <= coder->allocated / 2);
-
-		// Now we can update coder->pos and coder->size, because
-		// the next coder in the chain (if any) was successful.
-		coder->pos = 0;
-		coder->size = unfiltered;
-
-		if (coder->end_was_reached) {
-			// The last byte has been copied to out[] already.
-			// They are left as is.
-			coder->size = 0;
-
-		} else if (unfiltered > 0) {
-			// There is unfiltered data left in out[]. Copy it to
-			// coder->buffer[] and rewind *out_pos appropriately.
-			*out_pos -= unfiltered;
-			memcpy(coder->buffer, out + *out_pos, unfiltered);
-		}
-	} else if (coder->pos > 0) {
-		memmove(coder->buffer, coder->buffer + coder->pos, buf_avail);
-		coder->size -= coder->pos;
-		coder->pos = 0;
-	}
-
-	assert(coder->pos == 0);
-
-	// If coder->buffer[] isn't empty, try to fill it by copying/decoding
-	// more data. Then filter coder->buffer[] and copy the successfully
-	// filtered data to out[]. It is probable, that some filtered and
-	// unfiltered data will be left to coder->buffer[].
-	if (coder->size > 0) {
-		{
-			const lzma_ret ret = copy_or_code(coder, allocator,
-					in, in_pos, in_size,
-					coder->buffer, &coder->size,
-					coder->allocated, action);
-			assert(ret != LZMA_STREAM_END);
-			if (ret != LZMA_OK)
-				return ret;
-		}
-
-		coder->filtered = call_filter(
-				coder, coder->buffer, coder->size);
-
-		// Everything is considered to be filtered if coder->buffer[]
-		// contains the last bytes of the data.
-		if (coder->end_was_reached)
-			coder->filtered = coder->size;
-
-		// Flush as much as possible.
-		lzma_bufcpy(coder->buffer, &coder->pos, coder->filtered,
-				out, out_pos, out_size);
-	}
-
-	// Check if we got everything done.
-	if (coder->end_was_reached && coder->pos == coder->size)
-		return LZMA_STREAM_END;
-
-	return LZMA_OK;
-}
-
-
-static void
-simple_coder_end(lzma_coder *coder, lzma_allocator *allocator)
-{
-	lzma_next_end(&coder->next, allocator);
-	lzma_free(coder->simple, allocator);
-	lzma_free(coder, allocator);
-	return;
-}
-
-
-static lzma_ret
-simple_coder_update(lzma_coder *coder, lzma_allocator *allocator,
-		const lzma_filter *filters_null lzma_attribute((__unused__)),
-		const lzma_filter *reversed_filters)
-{
-	// No update support, just call the next filter in the chain.
-	return lzma_next_filter_update(
-			&coder->next, allocator, reversed_filters + 1);
-}
-
-
-extern lzma_ret
-lzma_simple_coder_init(lzma_next_coder *next, lzma_allocator *allocator,
-		const lzma_filter_info *filters,
-		size_t (*filter)(lzma_simple *simple, uint32_t now_pos,
-			bool is_encoder, uint8_t *buffer, size_t size),
-		size_t simple_size, size_t unfiltered_max,
-		uint32_t alignment, bool is_encoder)
-{
-	// Allocate memory for the lzma_coder structure if needed.
-	if (next->coder == NULL) {
-		// Here we allocate space also for the temporary buffer. We
-		// need twice the size of unfiltered_max, because then it
-		// is always possible to filter at least unfiltered_max bytes
-		// more data in coder->buffer[] if it can be filled completely.
-		next->coder = lzma_alloc(sizeof(lzma_coder)
-				+ 2 * unfiltered_max, allocator);
-		if (next->coder == NULL)
-			return LZMA_MEM_ERROR;
-
-		next->code = &simple_code;
-		next->end = &simple_coder_end;
-		next->update = &simple_coder_update;
-
-		next->coder->next = LZMA_NEXT_CODER_INIT;
-		next->coder->filter = filter;
-		next->coder->allocated = 2 * unfiltered_max;
-
-		// Allocate memory for filter-specific data structure.
-		if (simple_size > 0) {
-			next->coder->simple = lzma_alloc(
-					simple_size, allocator);
-			if (next->coder->simple == NULL)
-				return LZMA_MEM_ERROR;
-		} else {
-			next->coder->simple = NULL;
-		}
-	}
-
-	if (filters[0].options != NULL) {
-		const lzma_options_bcj *simple = filters[0].options;
-		next->coder->now_pos = simple->start_offset;
-		if (next->coder->now_pos & (alignment - 1))
-			return LZMA_OPTIONS_ERROR;
-	} else {
-		next->coder->now_pos = 0;
-	}
-
-	// Reset variables.
-	next->coder->is_encoder = is_encoder;
-	next->coder->end_was_reached = false;
-	next->coder->pos = 0;
-	next->coder->filtered = 0;
-	next->coder->size = 0;
-
-	return lzma_next_filter_init(
-			&next->coder->next, allocator, filters + 1);
-}
diff --git a/src/extra/xz/simple/simple_coder.h b/src/extra/xz/simple/simple_coder.h
deleted file mode 100644
index 0952fad..0000000
--- a/src/extra/xz/simple/simple_coder.h
+++ /dev/null
@@ -1,60 +0,0 @@
-///////////////////////////////////////////////////////////////////////////////
-//
-/// \file       simple_coder.h
-/// \brief      Wrapper for simple filters
-//
-//  Author:     Lasse Collin
-//
-//  This file has been put into the public domain.
-//  You can do whatever you want with this file.
-//
-///////////////////////////////////////////////////////////////////////////////
-
-#ifndef LZMA_SIMPLE_CODER_H
-#define LZMA_SIMPLE_CODER_H
-
-#include "common.h"
-
-
-extern lzma_ret lzma_simple_x86_encoder_init(lzma_next_coder *next,
-		lzma_allocator *allocator, const lzma_filter_info *filters);
-
-extern lzma_ret lzma_simple_x86_decoder_init(lzma_next_coder *next,
-		lzma_allocator *allocator, const lzma_filter_info *filters);
-
-
-extern lzma_ret lzma_simple_powerpc_encoder_init(lzma_next_coder *next,
-		lzma_allocator *allocator, const lzma_filter_info *filters);
-
-extern lzma_ret lzma_simple_powerpc_decoder_init(lzma_next_coder *next,
-		lzma_allocator *allocator, const lzma_filter_info *filters);
-
-
-extern lzma_ret lzma_simple_ia64_encoder_init(lzma_next_coder *next,
-		lzma_allocator *allocator, const lzma_filter_info *filters);
-
-extern lzma_ret lzma_simple_ia64_decoder_init(lzma_next_coder *next,
-		lzma_allocator *allocator, const lzma_filter_info *filters);
-
-
-extern lzma_ret lzma_simple_arm_encoder_init(lzma_next_coder *next,
-		lzma_allocator *allocator, const lzma_filter_info *filters);
-
-extern lzma_ret lzma_simple_arm_decoder_init(lzma_next_coder *next,
-		lzma_allocator *allocator, const lzma_filter_info *filters);
-
-
-extern lzma_ret lzma_simple_armthumb_encoder_init(lzma_next_coder *next,
-		lzma_allocator *allocator, const lzma_filter_info *filters);
-
-extern lzma_ret lzma_simple_armthumb_decoder_init(lzma_next_coder *next,
-		lzma_allocator *allocator, const lzma_filter_info *filters);
-
-
-extern lzma_ret lzma_simple_sparc_encoder_init(lzma_next_coder *next,
-		lzma_allocator *allocator, const lzma_filter_info *filters);
-
-extern lzma_ret lzma_simple_sparc_decoder_init(lzma_next_coder *next,
-		lzma_allocator *allocator, const lzma_filter_info *filters);
-
-#endif
diff --git a/src/extra/xz/simple/simple_decoder.c b/src/extra/xz/simple/simple_decoder.c
deleted file mode 100644
index 0beccd3..0000000
--- a/src/extra/xz/simple/simple_decoder.c
+++ /dev/null
@@ -1,40 +0,0 @@
-///////////////////////////////////////////////////////////////////////////////
-//
-/// \file       simple_decoder.c
-/// \brief      Properties decoder for simple filters
-//
-//  Author:     Lasse Collin
-//
-//  This file has been put into the public domain.
-//  You can do whatever you want with this file.
-//
-///////////////////////////////////////////////////////////////////////////////
-
-#include "simple_decoder.h"
-
-
-extern lzma_ret
-lzma_simple_props_decode(void **options, lzma_allocator *allocator,
-		const uint8_t *props, size_t props_size)
-{
-	if (props_size == 0)
-		return LZMA_OK;
-
-	if (props_size != 4)
-		return LZMA_OPTIONS_ERROR;
-
-	lzma_options_bcj *opt = lzma_alloc(
-			sizeof(lzma_options_bcj), allocator);
-	if (opt == NULL)
-		return LZMA_MEM_ERROR;
-
-	opt->start_offset = unaligned_read32le(props);
-
-	// Don't leave an options structure allocated if start_offset is zero.
-	if (opt->start_offset == 0)
-		lzma_free(opt, allocator);
-	else
-		*options = opt;
-
-	return LZMA_OK;
-}
diff --git a/src/extra/xz/simple/simple_decoder.h b/src/extra/xz/simple/simple_decoder.h
deleted file mode 100644
index b8bf590..0000000
--- a/src/extra/xz/simple/simple_decoder.h
+++ /dev/null
@@ -1,22 +0,0 @@
-///////////////////////////////////////////////////////////////////////////////
-//
-/// \file       simple_decoder.h
-/// \brief      Properties decoder for simple filters
-//
-//  Author:     Lasse Collin
-//
-//  This file has been put into the public domain.
-//  You can do whatever you want with this file.
-//
-///////////////////////////////////////////////////////////////////////////////
-
-#ifndef LZMA_SIMPLE_DECODER_H
-#define LZMA_SIMPLE_DECODER_H
-
-#include "simple_coder.h"
-
-extern lzma_ret lzma_simple_props_decode(
-		void **options, lzma_allocator *allocator,
-		const uint8_t *props, size_t props_size);
-
-#endif
diff --git a/src/extra/xz/simple/simple_encoder.c b/src/extra/xz/simple/simple_encoder.c
deleted file mode 100644
index 8aa463b..0000000
--- a/src/extra/xz/simple/simple_encoder.c
+++ /dev/null
@@ -1,38 +0,0 @@
-///////////////////////////////////////////////////////////////////////////////
-//
-/// \file       simple_encoder.c
-/// \brief      Properties encoder for simple filters
-//
-//  Author:     Lasse Collin
-//
-//  This file has been put into the public domain.
-//  You can do whatever you want with this file.
-//
-///////////////////////////////////////////////////////////////////////////////
-
-#include "simple_encoder.h"
-
-
-extern lzma_ret
-lzma_simple_props_size(uint32_t *size, const void *options)
-{
-	const lzma_options_bcj *const opt = options;
-	*size = (opt == NULL || opt->start_offset == 0) ? 0 : 4;
-	return LZMA_OK;
-}
-
-
-extern lzma_ret
-lzma_simple_props_encode(const void *options, uint8_t *out)
-{
-	const lzma_options_bcj *const opt = options;
-
-	// The default start offset is zero, so we don't need to store any
-	// options unless the start offset is non-zero.
-	if (opt == NULL || opt->start_offset == 0)
-		return LZMA_OK;
-
-	unaligned_write32le(out, opt->start_offset);
-
-	return LZMA_OK;
-}
diff --git a/src/extra/xz/simple/simple_encoder.h b/src/extra/xz/simple/simple_encoder.h
deleted file mode 100644
index 1cee482..0000000
--- a/src/extra/xz/simple/simple_encoder.h
+++ /dev/null
@@ -1,23 +0,0 @@
-///////////////////////////////////////////////////////////////////////////////
-//
-/// \file       simple_encoder.c
-/// \brief      Properties encoder for simple filters
-//
-//  Author:     Lasse Collin
-//
-//  This file has been put into the public domain.
-//  You can do whatever you want with this file.
-//
-///////////////////////////////////////////////////////////////////////////////
-
-#ifndef LZMA_SIMPLE_ENCODER_H
-#define LZMA_SIMPLE_ENCODER_H
-
-#include "simple_coder.h"
-
-
-extern lzma_ret lzma_simple_props_size(uint32_t *size, const void *options);
-
-extern lzma_ret lzma_simple_props_encode(const void *options, uint8_t *out);
-
-#endif
diff --git a/src/extra/xz/simple/simple_private.h b/src/extra/xz/simple/simple_private.h
deleted file mode 100644
index fcf9f7c..0000000
--- a/src/extra/xz/simple/simple_private.h
+++ /dev/null
@@ -1,75 +0,0 @@
-///////////////////////////////////////////////////////////////////////////////
-//
-/// \file       simple_private.h
-/// \brief      Private definitions for so called simple filters
-//
-//  Author:     Lasse Collin
-//
-//  This file has been put into the public domain.
-//  You can do whatever you want with this file.
-//
-///////////////////////////////////////////////////////////////////////////////
-
-#ifndef LZMA_SIMPLE_PRIVATE_H
-#define LZMA_SIMPLE_PRIVATE_H
-
-#include "simple_coder.h"
-
-
-typedef struct lzma_simple_s lzma_simple;
-
-struct lzma_coder_s {
-	/// Next filter in the chain
-	lzma_next_coder next;
-
-	/// True if the next coder in the chain has returned LZMA_STREAM_END.
-	bool end_was_reached;
-
-	/// True if filter() should encode the data; false to decode.
-	/// Currently all simple filters use the same function for encoding
-	/// and decoding, because the difference between encoders and decoders
-	/// is very small.
-	bool is_encoder;
-
-	/// Pointer to filter-specific function, which does
-	/// the actual filtering.
-	size_t (*filter)(lzma_simple *simple, uint32_t now_pos,
-			bool is_encoder, uint8_t *buffer, size_t size);
-
-	/// Pointer to filter-specific data, or NULL if filter doesn't need
-	/// any extra data.
-	lzma_simple *simple;
-
-	/// The lowest 32 bits of the current position in the data. Most
-	/// filters need this to do conversions between absolute and relative
-	/// addresses.
-	uint32_t now_pos;
-
-	/// Size of the memory allocated for the buffer.
-	size_t allocated;
-
-	/// Flushing position in the temporary buffer. buffer[pos] is the
-	/// next byte to be copied to out[].
-	size_t pos;
-
-	/// buffer[filtered] is the first unfiltered byte. When pos is smaller
-	/// than filtered, there is unflushed filtered data in the buffer.
-	size_t filtered;
-
-	/// Total number of bytes (both filtered and unfiltered) currently
-	/// in the temporary buffer.
-	size_t size;
-
-	/// Temporary buffer
-	uint8_t buffer[];
-};
-
-
-extern lzma_ret lzma_simple_coder_init(lzma_next_coder *next,
-		lzma_allocator *allocator, const lzma_filter_info *filters,
-		size_t (*filter)(lzma_simple *simple, uint32_t now_pos,
-			bool is_encoder, uint8_t *buffer, size_t size),
-		size_t simple_size, size_t unfiltered_max,
-		uint32_t alignment, bool is_encoder);
-
-#endif
diff --git a/src/extra/xz/simple/sparc.c b/src/extra/xz/simple/sparc.c
deleted file mode 100644
index 8270d6a..0000000
--- a/src/extra/xz/simple/sparc.c
+++ /dev/null
@@ -1,81 +0,0 @@
-///////////////////////////////////////////////////////////////////////////////
-//
-/// \file       sparc.c
-/// \brief      Filter for SPARC binaries
-///
-//  Authors:    Igor Pavlov
-//              Lasse Collin
-//
-//  This file has been put into the public domain.
-//  You can do whatever you want with this file.
-//
-///////////////////////////////////////////////////////////////////////////////
-
-#include "simple_private.h"
-
-
-static size_t
-sparc_code(lzma_simple *simple lzma_attribute((__unused__)),
-		uint32_t now_pos, bool is_encoder,
-		uint8_t *buffer, size_t size)
-{
-	size_t i;
-	for (i = 0; i + 4 <= size; i += 4) {
-
-		if ((buffer[i] == 0x40 && (buffer[i + 1] & 0xC0) == 0x00)
-				|| (buffer[i] == 0x7F
-				&& (buffer[i + 1] & 0xC0) == 0xC0)) {
-
-			uint32_t src = ((uint32_t)buffer[i + 0] << 24)
-					| ((uint32_t)buffer[i + 1] << 16)
-					| ((uint32_t)buffer[i + 2] << 8)
-					| ((uint32_t)buffer[i + 3]);
-
-			src <<= 2;
-
-			uint32_t dest;
-			if (is_encoder)
-				dest = now_pos + (uint32_t)(i) + src;
-			else
-				dest = src - (now_pos + (uint32_t)(i));
-
-			dest >>= 2;
-
-			dest = (((0 - ((dest >> 22) & 1)) << 22) & 0x3FFFFFFF)
-					| (dest & 0x3FFFFF)
-					| 0x40000000;
-
-			buffer[i + 0] = (uint8_t)(dest >> 24);
-			buffer[i + 1] = (uint8_t)(dest >> 16);
-			buffer[i + 2] = (uint8_t)(dest >> 8);
-			buffer[i + 3] = (uint8_t)(dest);
-		}
-	}
-
-	return i;
-}
-
-
-static lzma_ret
-sparc_coder_init(lzma_next_coder *next, lzma_allocator *allocator,
-		const lzma_filter_info *filters, bool is_encoder)
-{
-	return lzma_simple_coder_init(next, allocator, filters,
-			&sparc_code, 0, 4, 4, is_encoder);
-}
-
-
-extern lzma_ret
-lzma_simple_sparc_encoder_init(lzma_next_coder *next,
-		lzma_allocator *allocator, const lzma_filter_info *filters)
-{
-	return sparc_coder_init(next, allocator, filters, true);
-}
-
-
-extern lzma_ret
-lzma_simple_sparc_decoder_init(lzma_next_coder *next,
-		lzma_allocator *allocator, const lzma_filter_info *filters)
-{
-	return sparc_coder_init(next, allocator, filters, false);
-}
diff --git a/src/extra/xz/simple/x86.c b/src/extra/xz/simple/x86.c
deleted file mode 100644
index 5d1509b..0000000
--- a/src/extra/xz/simple/x86.c
+++ /dev/null
@@ -1,154 +0,0 @@
-///////////////////////////////////////////////////////////////////////////////
-//
-/// \file       x86.c
-/// \brief      Filter for x86 binaries (BCJ filter)
-///
-//  Authors:    Igor Pavlov
-//              Lasse Collin
-//
-//  This file has been put into the public domain.
-//  You can do whatever you want with this file.
-//
-///////////////////////////////////////////////////////////////////////////////
-
-#include "simple_private.h"
-
-
-#define Test86MSByte(b) ((b) == 0 || (b) == 0xFF)
-
-
-struct lzma_simple_s {
-	uint32_t prev_mask;
-	uint32_t prev_pos;
-};
-
-
-static size_t
-x86_code(lzma_simple *simple, uint32_t now_pos, bool is_encoder,
-		uint8_t *buffer, size_t size)
-{
-	static const bool MASK_TO_ALLOWED_STATUS[8]
-		= { true, true, true, false, true, false, false, false };
-
-	static const uint32_t MASK_TO_BIT_NUMBER[8]
-			= { 0, 1, 2, 2, 3, 3, 3, 3 };
-
-	uint32_t prev_mask = simple->prev_mask;
-	uint32_t prev_pos = simple->prev_pos;
-
-	if (size < 5)
-		return 0;
-
-	if (now_pos - prev_pos > 5)
-		prev_pos = now_pos - 5;
-
-	const size_t limit = size - 5;
-	size_t buffer_pos = 0;
-
-	while (buffer_pos <= limit) {
-		uint8_t b = buffer[buffer_pos];
-		if (b != 0xE8 && b != 0xE9) {
-			++buffer_pos;
-			continue;
-		}
-
-		const uint32_t offset = now_pos + (uint32_t)(buffer_pos)
-				- prev_pos;
-		prev_pos = now_pos + (uint32_t)(buffer_pos);
-
-		if (offset > 5) {
-			prev_mask = 0;
-		} else {
-			for (uint32_t i = 0; i < offset; ++i) {
-				prev_mask &= 0x77;
-				prev_mask <<= 1;
-			}
-		}
-
-		b = buffer[buffer_pos + 4];
-
-		if (Test86MSByte(b)
-			&& MASK_TO_ALLOWED_STATUS[(prev_mask >> 1) & 0x7]
-				&& (prev_mask >> 1) < 0x10) {
-
-			uint32_t src = ((uint32_t)(b) << 24)
-				| ((uint32_t)(buffer[buffer_pos + 3]) << 16)
-				| ((uint32_t)(buffer[buffer_pos + 2]) << 8)
-				| (buffer[buffer_pos + 1]);
-
-			uint32_t dest;
-			while (true) {
-				if (is_encoder)
-					dest = src + (now_pos + (uint32_t)(
-							buffer_pos) + 5);
-				else
-					dest = src - (now_pos + (uint32_t)(
-							buffer_pos) + 5);
-
-				if (prev_mask == 0)
-					break;
-
-				const uint32_t i = MASK_TO_BIT_NUMBER[
-						prev_mask >> 1];
-
-				b = (uint8_t)(dest >> (24 - i * 8));
-
-				if (!Test86MSByte(b))
-					break;
-
-				src = dest ^ ((1 << (32 - i * 8)) - 1);
-			}
-
-			buffer[buffer_pos + 4]
-					= (uint8_t)(~(((dest >> 24) & 1) - 1));
-			buffer[buffer_pos + 3] = (uint8_t)(dest >> 16);
-			buffer[buffer_pos + 2] = (uint8_t)(dest >> 8);
-			buffer[buffer_pos + 1] = (uint8_t)(dest);
-			buffer_pos += 5;
-			prev_mask = 0;
-
-		} else {
-			++buffer_pos;
-			prev_mask |= 1;
-			if (Test86MSByte(b))
-				prev_mask |= 0x10;
-		}
-	}
-
-	simple->prev_mask = prev_mask;
-	simple->prev_pos = prev_pos;
-
-	return buffer_pos;
-}
-
-
-static lzma_ret
-x86_coder_init(lzma_next_coder *next, lzma_allocator *allocator,
-		const lzma_filter_info *filters, bool is_encoder)
-{
-	const lzma_ret ret = lzma_simple_coder_init(next, allocator, filters,
-			&x86_code, sizeof(lzma_simple), 5, 1, is_encoder);
-
-	if (ret == LZMA_OK) {
-		next->coder->simple->prev_mask = 0;
-		next->coder->simple->prev_pos = (uint32_t)(-5);
-	}
-
-	return ret;
-}
-
-
-extern lzma_ret
-lzma_simple_x86_encoder_init(lzma_next_coder *next, lzma_allocator *allocator,
-		const lzma_filter_info *filters)
-{
-	return x86_coder_init(next, allocator, filters, true);
-}
-
-
-extern lzma_ret
-lzma_simple_x86_decoder_init(lzma_next_coder *next, lzma_allocator *allocator,
-		const lzma_filter_info *filters)
-{
-	return x86_coder_init(next, allocator, filters, false);
-}
diff --git a/src/extra/zlib/Makefile.in b/src/extra/zlib/Makefile.in
deleted file mode 100644
index 0d59e14..0000000
--- a/src/extra/zlib/Makefile.in
+++ /dev/null
@@ -1,73 +0,0 @@
-#
-# ${R_HOME}/src/extra/zlib/Makefile
-
-VPATH = @srcdir@
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
-
-top_builddir = ../../..
-subdir = src/extra/zlib
-R_HOME = $(top_builddir)
-
-include $(top_builddir)/Makeconf
-
-ZLIB_CPPFLAGS = -I$(srcdir) @USE_MMAP_ZLIB_TRUE@ -DUSE_MMAP
-ALL_CPPFLAGS = $(ZLIB_CPPFLAGS) $(R_XTRA_CPPFLAGS) $(CPPFLAGS) $(DEFS)
-## need to be PIC for use in grDevices
-ALL_CFLAGS = $(R_XTRA_CFLAGS) $(R_OPENMP_CFLAGS) $(MAIN_CFLAGS) $(CFLAGS) $(CPICFLAGS)
-
-SOURCES = adler32.c compress.c crc32.c deflate.c infback.c \
-  inffast.c inflate.c inftrees.c trees.c uncompr.c zutil.c
-HEADERS = crc32.h deflate.h inffast.h inffixed.h inflate.h inftrees.h \
-  trees.h zconf.h zlib.h zutil.h
-DEPENDS = $(SOURCES:.c=.d)
-OBJECTS = $(SOURCES:.c=.o)
- at WANT_R_SHLIB_TRUE@ALL_CFLAGS = $(ALL_CFLAGS_LO) @C_VISIBILITY@
-
-
-distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
-DISTFILES = R_changes README Makefile.in Makefile.win Rzlib.def \
-  $(SOURCES) $(HEADERS)
-noinst_LIBRARIES = @BUILD_ZLIB_TRUE@ libz.a
-libz_a_SOURCES = $(SOURCES)
-libz_a_OBJECTS = $(OBJECTS)
-
-
-all: R
-
-Makefile: $(srcdir)/Makefile.in \
-  $(top_builddir)/config.status \
-  $(SOURCES)
-	@cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
-
-Makedeps: Makefile $(DEPENDS)
-	@cat $(DEPENDS) >> Makefile
-	@touch $@
-
-R: Makedeps
-	@$(MAKE) $(noinst_LIBRARIES)
-
-libz.a: $(libz_a_OBJECTS)
-	rm -f $@
-	$(AR) cr $@ $(libz_a_OBJECTS)
-	$(RANLIB) $@
-
-
-mostlyclean: clean
-clean:
-	@-rm -f Makedeps *.d *.o *.lo *.a
-distclean: clean
-	@-rm -f Makefile
-maintainer-clean: distclean
-
-install install-strip uninstall TAGS info dvi check:
-
-distdir: $(DISTFILES)
-	@for f in $(DISTFILES); do \
-	  test -f $(distdir)/$${f} \
-	    || ln $(srcdir)/$${f} $(distdir)/$${f} 2>/dev/null \
-	    || cp -p $(srcdir)/$${f} $(distdir)/$${f}; \
-	done
-
-## Automagically generated dependencies:
-
diff --git a/src/extra/zlib/Makefile.win b/src/extra/zlib/Makefile.win
deleted file mode 100644
index a5810e9..0000000
--- a/src/extra/zlib/Makefile.win
+++ /dev/null
@@ -1,45 +0,0 @@
-#-*- Makefile -*-
-include ../../gnuwin32/MkRules
-
-all: makeMakedeps DLL implib headers
-
-SOURCES = adler32.c compress.c crc32.c deflate.c infback.c \
-  inffast.c inflate.c inftrees.c trees.c uncompr.c zutil.c
-OBJECTS = $(SOURCES:.c=.o)
-
-CPPFLAGS=-I../../include -DHAVE_CONFIG_H
-
-# libz.a: $(OBJECTS)
-
-DLL: Rzlib.dll
-	@cp Rzlib.dll ../../../$(BINDIR)
-
-Rzlib.dll: $(OBJECTS) Rzlib.def
-	$(DLL) -shared $(DLLFLAGS) -o $@ Rzlib.def $(OBJECTS)
-
-ifdef USE_IMPLIBS
-implib: libRzlib.dll.a
-	@$(MKDIR) -p ../../../lib
-	@$(CP) libRzlib.dll.a ../../../lib
-else
-implib:
-endif
-
-libRzlib.dll.a: Rzlib.def
-
-headers:
-	@$(CP) -p zlib.h zconf.h ../../../include
-
-clean:
-	@$(RM) *.o *~ *.d Makedeps
-distclean: clean
-	@$(RM) libz.a Rzlib.dll libRzlib.dll.a
-
-# Dependencies
-DEPS=$(SOURCES:.c=.d)
-
-makeMakedeps: $(DEPS)
-	@$(RM) Makedeps
-	@cat $(DEPS) >> Makedeps
-
--include Makedeps
diff --git a/src/extra/zlib/README b/src/extra/zlib/README
deleted file mode 100644
index 5ca9d12..0000000
--- a/src/extra/zlib/README
+++ /dev/null
@@ -1,115 +0,0 @@
-ZLIB DATA COMPRESSION LIBRARY
-
-zlib 1.2.8 is a general purpose data compression library.  All the code is
-thread safe.  The data format used by the zlib library is described by RFCs
-(Request for Comments) 1950 to 1952 in the files
-http://tools.ietf.org/html/rfc1950 (zlib format), rfc1951 (deflate format) and
-rfc1952 (gzip format).
-
-All functions of the compression library are documented in the file zlib.h
-(volunteer to write man pages welcome, contact zlib at gzip.org).  A usage example
-of the library is given in the file test/example.c which also tests that
-the library is working correctly.  Another example is given in the file
-test/minigzip.c.  The compression library itself is composed of all source
-files in the root directory.
-
-To compile all files and run the test program, follow the instructions given at
-the top of Makefile.in.  In short "./configure; make test", and if that goes
-well, "make install" should work for most flavors of Unix.  For Windows, use
-one of the special makefiles in win32/ or contrib/vstudio/ .  For VMS, use
-make_vms.com.
-
-Questions about zlib should be sent to <zlib at gzip.org>, or to Gilles Vollant
-<info at winimage.com> for the Windows DLL version.  The zlib home page is
-http://zlib.net/ .  Before reporting a problem, please check this site to
-verify that you have the latest version of zlib; otherwise get the latest
-version and check whether the problem still exists or not.
-
-PLEASE read the zlib FAQ http://zlib.net/zlib_faq.html before asking for help.
-
-Mark Nelson <markn at ieee.org> wrote an article about zlib for the Jan.  1997
-issue of Dr.  Dobb's Journal; a copy of the article is available at
-http://marknelson.us/1997/01/01/zlib-engine/ .
-
-The changes made in version 1.2.8 are documented in the file ChangeLog.
-
-Unsupported third party contributions are provided in directory contrib/ .
-
-zlib is available in Java using the java.util.zip package, documented at
-http://java.sun.com/developer/technicalArticles/Programming/compression/ .
-
-A Perl interface to zlib written by Paul Marquess <pmqs at cpan.org> is available
-at CPAN (Comprehensive Perl Archive Network) sites, including
-http://search.cpan.org/~pmqs/IO-Compress-Zlib/ .
-
-A Python interface to zlib written by A.M. Kuchling <amk at amk.ca> is
-available in Python 1.5 and later versions, see
-http://docs.python.org/library/zlib.html .
-
-zlib is built into tcl: http://wiki.tcl.tk/4610 .
-
-An experimental package to read and write files in .zip format, written on top
-of zlib by Gilles Vollant <info at winimage.com>, is available in the
-contrib/minizip directory of zlib.
-
-
-Notes for some targets:
-
-- For Windows DLL versions, please see win32/DLL_FAQ.txt
-
-- For 64-bit Irix, deflate.c must be compiled without any optimization. With
-  -O, one libpng test fails. The test works in 32 bit mode (with the -n32
-  compiler flag). The compiler bug has been reported to SGI.
-
-- zlib doesn't work with gcc 2.6.3 on a DEC 3000/300LX under OSF/1 2.1 it works
-  when compiled with cc.
-
-- On Digital Unix 4.0D (formely OSF/1) on AlphaServer, the cc option -std1 is
-  necessary to get gzprintf working correctly. This is done by configure.
-
-- zlib doesn't work on HP-UX 9.05 with some versions of /bin/cc. It works with
-  other compilers. Use "make test" to check your compiler.
-
-- gzdopen is not supported on RISCOS or BEOS.
-
-- For PalmOs, see http://palmzlib.sourceforge.net/
-
-
-Acknowledgments:
-
-  The deflate format used by zlib was defined by Phil Katz.  The deflate and
-  zlib specifications were written by L.  Peter Deutsch.  Thanks to all the
-  people who reported problems and suggested various improvements in zlib; they
-  are too numerous to cite here.
-
-Copyright notice:
-
- (C) 1995-2013 Jean-loup Gailly and Mark Adler
-
-  This software is provided 'as-is', without any express or implied
-  warranty.  In no event will the authors be held liable for any damages
-  arising from the use of this software.
-
-  Permission is granted to anyone to use this software for any purpose,
-  including commercial applications, and to alter it and redistribute it
-  freely, subject to the following restrictions:
-
-  1. The origin of this software must not be misrepresented; you must not
-     claim that you wrote the original software. If you use this software
-     in a product, an acknowledgment in the product documentation would be
-     appreciated but is not required.
-  2. Altered source versions must be plainly marked as such, and must not be
-     misrepresented as being the original software.
-  3. This notice may not be removed or altered from any source distribution.
-
-  Jean-loup Gailly        Mark Adler
-  jloup at gzip.org          madler at alumni.caltech.edu
-
-If you use the zlib library in a product, we would appreciate *not* receiving
-lengthy legal documents to sign.  The sources are provided for free but without
-warranty of any kind.  The library has been entirely written by Jean-loup
-Gailly and Mark Adler; it does not include third-party code.
-
-If you redistribute modified sources, we would appreciate that you include in
-the file ChangeLog history information documenting your changes.  Please read
-the FAQ for more information on the distribution of modified source versions.
diff --git a/src/extra/zlib/R_changes b/src/extra/zlib/R_changes
deleted file mode 100644
index 482a4d8..0000000
--- a/src/extra/zlib/R_changes
+++ /dev/null
@@ -1,71 +0,0 @@
-There are a very few to the source code of zlib-1.2.5 used here.
-
-zconf.h includes R's config.h
-
-Makefile.in is ours, not zlib's, and allows us to use PIC flags so this
-can be included in libR.so.
-
-As from R 2.12.2, on a Unix-alike we remap all the symbols (not just
-those remapped by defining Z_PREFIX) to avoid conflict with system
-versions of zlib (notably 1.2.5) linked into packages' *.so.  The
-known problems are with libxml2 and libggobi, both of which are linked
-to libz.  This is not needed on Windows where the DLL is named
-Rzlib.dll and symbols are imported from a named DLL.  But Rzlib.def is
-used to confine exports to symbols marked ZEXPORT in zlib.h.
-
-From 2.13.0, Z_PREFIX is defined in zconf.h, except on Windows.
-
-Visibility does not work on all platforms in gcc >= 3.3.
-
-diff -u /Users/ripley/Sources/zlib-1.2.5/zconf.h ./zconf.h
---- /Users/ripley/Sources/zlib-1.2.5/zconf.h	2010-04-18 18:58:06.000000000 +0100
-+++ ./zconf.h	2011-04-19 18:49:24.000000000 +0100
-@@ -8,127 +8,84 @@
- #ifndef ZCONF_H
- #define ZCONF_H
- 
-+#ifdef HAVE_CONFIG_H
-+#include <config.h>
-+#endif
-+
-+/* R change */
-+#ifndef WIN32
-+#define Z_PREFIX
-+#endif
-
-plus lots of changes to the defines.
-
-diff -u /Users/ripley/Sources/zlib-1.2.5/zlib.h ./zlib.h
---- /Users/ripley/Sources/zlib-1.2.5/zlib.h	2010-04-20 05:12:48.000000000 +0100
-+++ ./zlib.h	2011-04-19 22:18:56.000000000 +0100
-@@ -1576,8 +1576,15 @@
- #  define gzseek gzseek64
- #  define gztell gztell64
- #  define gzoffset gzoffset64
-+#  undef adler32_combine
-+#  undef crc32_combine
-+# ifdef Z_PREFIX
-+#  define adler32_combine Rz_adler32_combine64
-+#  define crc32_combine Rz_crc32_combine64
-+# else
- #  define adler32_combine adler32_combine64
- #  define crc32_combine crc32_combine64
-+# endif
- #  ifdef _LARGEFILE64_SOURCE
-      ZEXTERN gzFile ZEXPORT gzopen64 OF((const char *, const char *));
-      ZEXTERN z_off_t ZEXPORT gzseek64 OF((gzFile, z_off_t, int));
-
-diff -u /Users/ripley/Sources/zlib-1.2.5/zutil.h ./zutil.h
---- /Users/ripley/Sources/zlib-1.2.5/zutil.h	2010-04-18 20:29:24.000000000 +0100
-+++ ./zutil.h	2011-04-19 19:41:57.000000000 +0100
-@@ -13,6 +13,10 @@
- #ifndef ZUTIL_H
- #define ZUTIL_H
- 
-+#ifdef WIN32
-+# define NO_VIZ
-+#endif
-+
- #if ((__GNUC__-0) * 10 + __GNUC_MINOR__-0 >= 33) && !defined(NO_VIZ)
- #  define ZLIB_INTERNAL __attribute__((visibility ("hidden")))
- #else
diff --git a/src/extra/zlib/Rzlib.def b/src/extra/zlib/Rzlib.def
deleted file mode 100644
index f75e26d..0000000
--- a/src/extra/zlib/Rzlib.def
+++ /dev/null
@@ -1,42 +0,0 @@
-EXPORTS
- adler32
- adler32_combine
- adler32_combine64
- compress
- compress2
- compressBound
- crc32
- crc32_combine
- crc32_combine64
- deflate
- deflateBound
- deflateCopy
- deflateEnd
- deflateInit2_
- deflateInit_
- deflateParams
- deflatePrime
- deflateReset
- deflateSetDictionary
- deflateSetHeader
- deflateTune
- get_crc_table   
- inflate
- inflateBack
- inflateBackEnd
- inflateBackInit_
- inflateCopy
- inflateEnd
- inflateGetHeader
- inflateInit2_
- inflateInit_
- inflateMark
- inflatePrime
- inflateReset
- inflateReset2
- inflateSetDictionary
- inflateSync
- uncompress
- zError         
- zlibCompileFlags
- zlibVersion
diff --git a/src/extra/zlib/adler32.c b/src/extra/zlib/adler32.c
deleted file mode 100644
index a868f07..0000000
--- a/src/extra/zlib/adler32.c
+++ /dev/null
@@ -1,179 +0,0 @@
-/* adler32.c -- compute the Adler-32 checksum of a data stream
- * Copyright (C) 1995-2011 Mark Adler
- * For conditions of distribution and use, see copyright notice in zlib.h
- */
-
-/* @(#) $Id$ */
-
-#include "zutil.h"
-
-#define local static
-
-local uLong adler32_combine_ OF((uLong adler1, uLong adler2, z_off64_t len2));
-
-#define BASE 65521      /* largest prime smaller than 65536 */
-#define NMAX 5552
-/* NMAX is the largest n such that 255n(n+1)/2 + (n+1)(BASE-1) <= 2^32-1 */
-
-#define DO1(buf,i)  {adler += (buf)[i]; sum2 += adler;}
-#define DO2(buf,i)  DO1(buf,i); DO1(buf,i+1);
-#define DO4(buf,i)  DO2(buf,i); DO2(buf,i+2);
-#define DO8(buf,i)  DO4(buf,i); DO4(buf,i+4);
-#define DO16(buf)   DO8(buf,0); DO8(buf,8);
-
-/* use NO_DIVIDE if your processor does not do division in hardware --
-   try it both ways to see which is faster */
-#ifdef NO_DIVIDE
-/* note that this assumes BASE is 65521, where 65536 % 65521 == 15
-   (thank you to John Reiser for pointing this out) */
-#  define CHOP(a) \
-    do { \
-        unsigned long tmp = a >> 16; \
-        a &= 0xffffUL; \
-        a += (tmp << 4) - tmp; \
-    } while (0)
-#  define MOD28(a) \
-    do { \
-        CHOP(a); \
-        if (a >= BASE) a -= BASE; \
-    } while (0)
-#  define MOD(a) \
-    do { \
-        CHOP(a); \
-        MOD28(a); \
-    } while (0)
-#  define MOD63(a) \
-    do { /* this assumes a is not negative */ \
-        z_off64_t tmp = a >> 32; \
-        a &= 0xffffffffL; \
-        a += (tmp << 8) - (tmp << 5) + tmp; \
-        tmp = a >> 16; \
-        a &= 0xffffL; \
-        a += (tmp << 4) - tmp; \
-        tmp = a >> 16; \
-        a &= 0xffffL; \
-        a += (tmp << 4) - tmp; \
-        if (a >= BASE) a -= BASE; \
-    } while (0)
-#else
-#  define MOD(a) a %= BASE
-#  define MOD28(a) a %= BASE
-#  define MOD63(a) a %= BASE
-#endif
-
-/* ========================================================================= */
-uLong ZEXPORT adler32(adler, buf, len)
-    uLong adler;
-    const Bytef *buf;
-    uInt len;
-{
-    unsigned long sum2;
-    unsigned n;
-
-    /* split Adler-32 into component sums */
-    sum2 = (adler >> 16) & 0xffff;
-    adler &= 0xffff;
-
-    /* in case user likes doing a byte at a time, keep it fast */
-    if (len == 1) {
-        adler += buf[0];
-        if (adler >= BASE)
-            adler -= BASE;
-        sum2 += adler;
-        if (sum2 >= BASE)
-            sum2 -= BASE;
-        return adler | (sum2 << 16);
-    }
-
-    /* initial Adler-32 value (deferred check for len == 1 speed) */
-    if (buf == Z_NULL)
-        return 1L;
-
-    /* in case short lengths are provided, keep it somewhat fast */
-    if (len < 16) {
-        while (len--) {
-            adler += *buf++;
-            sum2 += adler;
-        }
-        if (adler >= BASE)
-            adler -= BASE;
-        MOD28(sum2);            /* only added so many BASE's */
-        return adler | (sum2 << 16);
-    }
-
-    /* do length NMAX blocks -- requires just one modulo operation */
-    while (len >= NMAX) {
-        len -= NMAX;
-        n = NMAX / 16;          /* NMAX is divisible by 16 */
-        do {
-            DO16(buf);          /* 16 sums unrolled */
-            buf += 16;
-        } while (--n);
-        MOD(adler);
-        MOD(sum2);
-    }
-
-    /* do remaining bytes (less than NMAX, still just one modulo) */
-    if (len) {                  /* avoid modulos if none remaining */
-        while (len >= 16) {
-            len -= 16;
-            DO16(buf);
-            buf += 16;
-        }
-        while (len--) {
-            adler += *buf++;
-            sum2 += adler;
-        }
-        MOD(adler);
-        MOD(sum2);
-    }
-
-    /* return recombined sums */
-    return adler | (sum2 << 16);
-}
-
-/* ========================================================================= */
-local uLong adler32_combine_(adler1, adler2, len2)
-    uLong adler1;
-    uLong adler2;
-    z_off64_t len2;
-{
-    unsigned long sum1;
-    unsigned long sum2;
-    unsigned rem;
-
-    /* for negative len, return invalid adler32 as a clue for debugging */
-    if (len2 < 0)
-        return 0xffffffffUL;
-
-    /* the derivation of this formula is left as an exercise for the reader */
-    MOD63(len2);                /* assumes len2 >= 0 */
-    rem = (unsigned)len2;
-    sum1 = adler1 & 0xffff;
-    sum2 = rem * sum1;
-    MOD(sum2);
-    sum1 += (adler2 & 0xffff) + BASE - 1;
-    sum2 += ((adler1 >> 16) & 0xffff) + ((adler2 >> 16) & 0xffff) + BASE - rem;
-    if (sum1 >= BASE) sum1 -= BASE;
-    if (sum1 >= BASE) sum1 -= BASE;
-    if (sum2 >= (BASE << 1)) sum2 -= (BASE << 1);
-    if (sum2 >= BASE) sum2 -= BASE;
-    return sum1 | (sum2 << 16);
-}
-
-/* ========================================================================= */
-uLong ZEXPORT adler32_combine(adler1, adler2, len2)
-    uLong adler1;
-    uLong adler2;
-    z_off_t len2;
-{
-    return adler32_combine_(adler1, adler2, len2);
-}
-
-uLong ZEXPORT adler32_combine64(adler1, adler2, len2)
-    uLong adler1;
-    uLong adler2;
-    z_off64_t len2;
-{
-    return adler32_combine_(adler1, adler2, len2);
-}
diff --git a/src/extra/zlib/compress.c b/src/extra/zlib/compress.c
deleted file mode 100644
index 6e97626..0000000
--- a/src/extra/zlib/compress.c
+++ /dev/null
@@ -1,80 +0,0 @@
-/* compress.c -- compress a memory buffer
- * Copyright (C) 1995-2005 Jean-loup Gailly.
- * For conditions of distribution and use, see copyright notice in zlib.h
- */
-
-/* @(#) $Id$ */
-
-#define ZLIB_INTERNAL
-#include "zlib.h"
-
-/* ===========================================================================
-     Compresses the source buffer into the destination buffer. The level
-   parameter has the same meaning as in deflateInit.  sourceLen is the byte
-   length of the source buffer. Upon entry, destLen is the total size of the
-   destination buffer, which must be at least 0.1% larger than sourceLen plus
-   12 bytes. Upon exit, destLen is the actual size of the compressed buffer.
-
-     compress2 returns Z_OK if success, Z_MEM_ERROR if there was not enough
-   memory, Z_BUF_ERROR if there was not enough room in the output buffer,
-   Z_STREAM_ERROR if the level parameter is invalid.
-*/
-int ZEXPORT compress2 (dest, destLen, source, sourceLen, level)
-    Bytef *dest;
-    uLongf *destLen;
-    const Bytef *source;
-    uLong sourceLen;
-    int level;
-{
-    z_stream stream;
-    int err;
-
-    stream.next_in = (z_const Bytef *)source;
-    stream.avail_in = (uInt)sourceLen;
-#ifdef MAXSEG_64K
-    /* Check for source > 64K on 16-bit machine: */
-    if ((uLong)stream.avail_in != sourceLen) return Z_BUF_ERROR;
-#endif
-    stream.next_out = dest;
-    stream.avail_out = (uInt)*destLen;
-    if ((uLong)stream.avail_out != *destLen) return Z_BUF_ERROR;
-
-    stream.zalloc = (alloc_func)0;
-    stream.zfree = (free_func)0;
-    stream.opaque = (voidpf)0;
-
-    err = deflateInit(&stream, level);
-    if (err != Z_OK) return err;
-
-    err = deflate(&stream, Z_FINISH);
-    if (err != Z_STREAM_END) {
-        deflateEnd(&stream);
-        return err == Z_OK ? Z_BUF_ERROR : err;
-    }
-    *destLen = stream.total_out;
-
-    err = deflateEnd(&stream);
-    return err;
-}
-
-/* ===========================================================================
- */
-int ZEXPORT compress (dest, destLen, source, sourceLen)
-    Bytef *dest;
-    uLongf *destLen;
-    const Bytef *source;
-    uLong sourceLen;
-{
-    return compress2(dest, destLen, source, sourceLen, Z_DEFAULT_COMPRESSION);
-}
-
-/* ===========================================================================
-     If the default memLevel or windowBits for deflateInit() is changed, then
-   this function needs to be updated.
- */
-uLong ZEXPORT compressBound (sourceLen)
-    uLong sourceLen;
-{
-    return sourceLen + (sourceLen >> 12) + (sourceLen >> 14) +
-           (sourceLen >> 25) + 13;
-}
diff --git a/src/extra/zlib/crc32.c b/src/extra/zlib/crc32.c
deleted file mode 100644
index 979a719..0000000
--- a/src/extra/zlib/crc32.c
+++ /dev/null
@@ -1,425 +0,0 @@
-/* crc32.c -- compute the CRC-32 of a data stream
- * Copyright (C) 1995-2006, 2010, 2011, 2012 Mark Adler
- * For conditions of distribution and use, see copyright notice in zlib.h
- *
- * Thanks to Rodney Brown <rbrown64 at csc.com.au> for his contribution of faster
- * CRC methods: exclusive-oring 32 bits of data at a time, and pre-computing
- * tables for updating the shift register in one step with three exclusive-ors
- * instead of four steps with four exclusive-ors.  This results in about a
- * factor of two increase in speed on a Power PC G4 (PPC7455) using gcc -O3.
- */
-
-/* @(#) $Id$ */
-
-/*
-  Note on the use of DYNAMIC_CRC_TABLE: there is no mutex or semaphore
-  protection on the static variables used to control the first-use generation
-  of the crc tables.  Therefore, if you #define DYNAMIC_CRC_TABLE, you should
-  first call get_crc_table() to initialize the tables before allowing more than
-  one thread to use crc32().
-
-  DYNAMIC_CRC_TABLE and MAKECRCH can be #defined to write out crc32.h.
- */
-
-#ifdef MAKECRCH
-#  include <stdio.h>
-#  ifndef DYNAMIC_CRC_TABLE
-#    define DYNAMIC_CRC_TABLE
-#  endif /* !DYNAMIC_CRC_TABLE */
-#endif /* MAKECRCH */
-
-#include "zutil.h"      /* for STDC and FAR definitions */
-
-#define local static
-
-/* Definitions for doing the crc four data bytes at a time. */
-#if !defined(NOBYFOUR) && defined(Z_U4)
-#  define BYFOUR
-#endif
-#ifdef BYFOUR
-   local unsigned long crc32_little OF((unsigned long,
-                        const unsigned char FAR *, unsigned));
-   local unsigned long crc32_big OF((unsigned long,
-                        const unsigned char FAR *, unsigned));
-#  define TBLS 8
-#else
-#  define TBLS 1
-#endif /* BYFOUR */
-
-/* Local functions for crc concatenation */
-local unsigned long gf2_matrix_times OF((unsigned long *mat,
-                                         unsigned long vec));
-local void gf2_matrix_square OF((unsigned long *square, unsigned long *mat));
-local uLong crc32_combine_ OF((uLong crc1, uLong crc2, z_off64_t len2));
-
-
-#ifdef DYNAMIC_CRC_TABLE
-
-local volatile int crc_table_empty = 1;
-local z_crc_t FAR crc_table[TBLS][256];
-local void make_crc_table OF((void));
-#ifdef MAKECRCH
-   local void write_table OF((FILE *, const z_crc_t FAR *));
-#endif /* MAKECRCH */
-/*
-  Generate tables for a byte-wise 32-bit CRC calculation on the polynomial:
-  x^32+x^26+x^23+x^22+x^16+x^12+x^11+x^10+x^8+x^7+x^5+x^4+x^2+x+1.
-
-  Polynomials over GF(2) are represented in binary, one bit per coefficient,
-  with the lowest powers in the most significant bit.  Then adding polynomials
-  is just exclusive-or, and multiplying a polynomial by x is a right shift by
-  one.  If we call the above polynomial p, and represent a byte as the
-  polynomial q, also with the lowest power in the most significant bit (so the
-  byte 0xb1 is the polynomial x^7+x^3+x+1), then the CRC is (q*x^32) mod p,
-  where a mod b means the remainder after dividing a by b.
-
-  This calculation is done using the shift-register method of multiplying and
-  taking the remainder.  The register is initialized to zero, and for each
-  incoming bit, x^32 is added mod p to the register if the bit is a one (where
-  x^32 mod p is p+x^32 = x^26+...+1), and the register is multiplied mod p by
-  x (which is shifting right by one and adding x^32 mod p if the bit shifted
-  out is a one).  We start with the highest power (least significant bit) of
-  q and repeat for all eight bits of q.
-
-  The first table is simply the CRC of all possible eight bit values.  This is
-  all the information needed to generate CRCs on data a byte at a time for all
-  combinations of CRC register values and incoming bytes.  The remaining tables
-  allow for word-at-a-time CRC calculation for both big-endian and little-
-  endian machines, where a word is four bytes.
-*/
-local void make_crc_table()
-{
-    z_crc_t c;
-    int n, k;
-    z_crc_t poly;                       /* polynomial exclusive-or pattern */
-    /* terms of polynomial defining this crc (except x^32): */
-    static volatile int first = 1;      /* flag to limit concurrent making */
-    static const unsigned char p[] = {0,1,2,4,5,7,8,10,11,12,16,22,23,26};
-
-    /* See if another task is already doing this (not thread-safe, but better
-       than nothing -- significantly reduces duration of vulnerability in
-       case the advice about DYNAMIC_CRC_TABLE is ignored) */
-    if (first) {
-        first = 0;
-
-        /* make exclusive-or pattern from polynomial (0xedb88320UL) */
-        poly = 0;
-        for (n = 0; n < (int)(sizeof(p)/sizeof(unsigned char)); n++)
-            poly |= (z_crc_t)1 << (31 - p[n]);
-
-        /* generate a crc for every 8-bit value */
-        for (n = 0; n < 256; n++) {
-            c = (z_crc_t)n;
-            for (k = 0; k < 8; k++)
-                c = c & 1 ? poly ^ (c >> 1) : c >> 1;
-            crc_table[0][n] = c;
-        }
-
-#ifdef BYFOUR
-        /* generate crc for each value followed by one, two, and three zeros,
-           and then the byte reversal of those as well as the first table */
-        for (n = 0; n < 256; n++) {
-            c = crc_table[0][n];
-            crc_table[4][n] = ZSWAP32(c);
-            for (k = 1; k < 4; k++) {
-                c = crc_table[0][c & 0xff] ^ (c >> 8);
-                crc_table[k][n] = c;
-                crc_table[k + 4][n] = ZSWAP32(c);
-            }
-        }
-#endif /* BYFOUR */
-
-        crc_table_empty = 0;
-    }
-    else {      /* not first */
-        /* wait for the other guy to finish (not efficient, but rare) */
-        while (crc_table_empty)
-            ;
-    }
-
-#ifdef MAKECRCH
-    /* write out CRC tables to crc32.h */
-    {
-        FILE *out;
-
-        out = fopen("crc32.h", "w");
-        if (out == NULL) return;
-        fprintf(out, "/* crc32.h -- tables for rapid CRC calculation\n");
-        fprintf(out, " * Generated automatically by crc32.c\n */\n\n");
-        fprintf(out, "local const z_crc_t FAR ");
-        fprintf(out, "crc_table[TBLS][256] =\n{\n  {\n");
-        write_table(out, crc_table[0]);
-#  ifdef BYFOUR
-        fprintf(out, "#ifdef BYFOUR\n");
-        for (k = 1; k < 8; k++) {
-            fprintf(out, "  },\n  {\n");
-            write_table(out, crc_table[k]);
-        }
-        fprintf(out, "#endif\n");
-#  endif /* BYFOUR */
-        fprintf(out, "  }\n};\n");
-        fclose(out);
-    }
-#endif /* MAKECRCH */
-}
-
-#ifdef MAKECRCH
-local void write_table(out, table)
-    FILE *out;
-    const z_crc_t FAR *table;
-{
-    int n;
-
-    for (n = 0; n < 256; n++)
-        fprintf(out, "%s0x%08lxUL%s", n % 5 ? "" : "    ",
-                (unsigned long)(table[n]),
-                n == 255 ? "\n" : (n % 5 == 4 ? ",\n" : ", "));
-}
-#endif /* MAKECRCH */
-
-#else /* !DYNAMIC_CRC_TABLE */
-/* ========================================================================
- * Tables of CRC-32s of all single-byte values, made by make_crc_table().
- */
-#include "crc32.h"
-#endif /* DYNAMIC_CRC_TABLE */
-
-/* =========================================================================
- * This function can be used by asm versions of crc32()
- */
-const z_crc_t FAR * ZEXPORT get_crc_table()
-{
-#ifdef DYNAMIC_CRC_TABLE
-    if (crc_table_empty)
-        make_crc_table();
-#endif /* DYNAMIC_CRC_TABLE */
-    return (const z_crc_t FAR *)crc_table;
-}
-
-/* ========================================================================= */
-#define DO1 crc = crc_table[0][((int)crc ^ (*buf++)) & 0xff] ^ (crc >> 8)
-#define DO8 DO1; DO1; DO1; DO1; DO1; DO1; DO1; DO1
-
-/* ========================================================================= */
-unsigned long ZEXPORT crc32(crc, buf, len)
-    unsigned long crc;
-    const unsigned char FAR *buf;
-    uInt len;
-{
-    if (buf == Z_NULL) return 0UL;
-
-#ifdef DYNAMIC_CRC_TABLE
-    if (crc_table_empty)
-        make_crc_table();
-#endif /* DYNAMIC_CRC_TABLE */
-
-#ifdef BYFOUR
-    if (sizeof(void *) == sizeof(ptrdiff_t)) {
-        z_crc_t endian;
-
-        endian = 1;
-        if (*((unsigned char *)(&endian)))
-            return crc32_little(crc, buf, len);
-        else
-            return crc32_big(crc, buf, len);
-    }
-#endif /* BYFOUR */
-    crc = crc ^ 0xffffffffUL;
-    while (len >= 8) {
-        DO8;
-        len -= 8;
-    }
-    if (len) do {
-        DO1;
-    } while (--len);
-    return crc ^ 0xffffffffUL;
-}
-
-#ifdef BYFOUR
-
-/* ========================================================================= */
-#define DOLIT4 c ^= *buf4++; \
-        c = crc_table[3][c & 0xff] ^ crc_table[2][(c >> 8) & 0xff] ^ \
-            crc_table[1][(c >> 16) & 0xff] ^ crc_table[0][c >> 24]
-#define DOLIT32 DOLIT4; DOLIT4; DOLIT4; DOLIT4; DOLIT4; DOLIT4; DOLIT4; DOLIT4
-
-/* ========================================================================= */
-local unsigned long crc32_little(crc, buf, len)
-    unsigned long crc;
-    const unsigned char FAR *buf;
-    unsigned len;
-{
-    register z_crc_t c;
-    register const z_crc_t FAR *buf4;
-
-    c = (z_crc_t)crc;
-    c = ~c;
-    while (len && ((ptrdiff_t)buf & 3)) {
-        c = crc_table[0][(c ^ *buf++) & 0xff] ^ (c >> 8);
-        len--;
-    }
-
-    buf4 = (const z_crc_t FAR *)(const void FAR *)buf;
-    while (len >= 32) {
-        DOLIT32;
-        len -= 32;
-    }
-    while (len >= 4) {
-        DOLIT4;
-        len -= 4;
-    }
-    buf = (const unsigned char FAR *)buf4;
-
-    if (len) do {
-        c = crc_table[0][(c ^ *buf++) & 0xff] ^ (c >> 8);
-    } while (--len);
-    c = ~c;
-    return (unsigned long)c;
-}
-
-/* ========================================================================= */
-#define DOBIG4 c ^= *++buf4; \
-        c = crc_table[4][c & 0xff] ^ crc_table[5][(c >> 8) & 0xff] ^ \
-            crc_table[6][(c >> 16) & 0xff] ^ crc_table[7][c >> 24]
-#define DOBIG32 DOBIG4; DOBIG4; DOBIG4; DOBIG4; DOBIG4; DOBIG4; DOBIG4; DOBIG4
-
-/* ========================================================================= */
-local unsigned long crc32_big(crc, buf, len)
-    unsigned long crc;
-    const unsigned char FAR *buf;
-    unsigned len;
-{
-    register z_crc_t c;
-    register const z_crc_t FAR *buf4;
-
-    c = ZSWAP32((z_crc_t)crc);
-    c = ~c;
-    while (len && ((ptrdiff_t)buf & 3)) {
-        c = crc_table[4][(c >> 24) ^ *buf++] ^ (c << 8);
-        len--;
-    }
-
-    buf4 = (const z_crc_t FAR *)(const void FAR *)buf;
-    buf4--;
-    while (len >= 32) {
-        DOBIG32;
-        len -= 32;
-    }
-    while (len >= 4) {
-        DOBIG4;
-        len -= 4;
-    }
-    buf4++;
-    buf = (const unsigned char FAR *)buf4;
-
-    if (len) do {
-        c = crc_table[4][(c >> 24) ^ *buf++] ^ (c << 8);
-    } while (--len);
-    c = ~c;
-    return (unsigned long)(ZSWAP32(c));
-}
-
-#endif /* BYFOUR */
-
-#define GF2_DIM 32      /* dimension of GF(2) vectors (length of CRC) */
-
-/* ========================================================================= */
-local unsigned long gf2_matrix_times(mat, vec)
-    unsigned long *mat;
-    unsigned long vec;
-{
-    unsigned long sum;
-
-    sum = 0;
-    while (vec) {
-        if (vec & 1)
-            sum ^= *mat;
-        vec >>= 1;
-        mat++;
-    }
-    return sum;
-}
-
-/* ========================================================================= */
-local void gf2_matrix_square(square, mat)
-    unsigned long *square;
-    unsigned long *mat;
-{
-    int n;
-
-    for (n = 0; n < GF2_DIM; n++)
-        square[n] = gf2_matrix_times(mat, mat[n]);
-}
-
-/* ========================================================================= */
-local uLong crc32_combine_(crc1, crc2, len2)
-    uLong crc1;
-    uLong crc2;
-    z_off64_t len2;
-{
-    int n;
-    unsigned long row;
-    unsigned long even[GF2_DIM];    /* even-power-of-two zeros operator */
-    unsigned long odd[GF2_DIM];     /* odd-power-of-two zeros operator */
-
-    /* degenerate case (also disallow negative lengths) */
-    if (len2 <= 0)
-        return crc1;
-
-    /* put operator for one zero bit in odd */
-    odd[0] = 0xedb88320UL;          /* CRC-32 polynomial */
-    row = 1;
-    for (n = 1; n < GF2_DIM; n++) {
-        odd[n] = row;
-        row <<= 1;
-    }
-
-    /* put operator for two zero bits in even */
-    gf2_matrix_square(even, odd);
-
-    /* put operator for four zero bits in odd */
-    gf2_matrix_square(odd, even);
-
-    /* apply len2 zeros to crc1 (first square will put the operator for one
-       zero byte, eight zero bits, in even) */
-    do {
-        /* apply zeros operator for this bit of len2 */
-        gf2_matrix_square(even, odd);
-        if (len2 & 1)
-            crc1 = gf2_matrix_times(even, crc1);
-        len2 >>= 1;
-
-        /* if no more bits set, then done */
-        if (len2 == 0)
-            break;
-
-        /* another iteration of the loop with odd and even swapped */
-        gf2_matrix_square(odd, even);
-        if (len2 & 1)
-            crc1 = gf2_matrix_times(odd, crc1);
-        len2 >>= 1;
-
-        /* if no more bits set, then done */
-    } while (len2 != 0);
-
-    /* return combined crc */
-    crc1 ^= crc2;
-    return crc1;
-}
-
-/* ========================================================================= */
-uLong ZEXPORT crc32_combine(crc1, crc2, len2)
-    uLong crc1;
-    uLong crc2;
-    z_off_t len2;
-{
-    return crc32_combine_(crc1, crc2, len2);
-}
-
-uLong ZEXPORT crc32_combine64(crc1, crc2, len2)
-    uLong crc1;
-    uLong crc2;
-    z_off64_t len2;
-{
-    return crc32_combine_(crc1, crc2, len2);
-}
diff --git a/src/extra/zlib/crc32.h b/src/extra/zlib/crc32.h
deleted file mode 100644
index 9e0c778..0000000
--- a/src/extra/zlib/crc32.h
+++ /dev/null
@@ -1,441 +0,0 @@
-/* crc32.h -- tables for rapid CRC calculation
- * Generated automatically by crc32.c
- */
-
-local const z_crc_t FAR crc_table[TBLS][256] =
-{
-  {
-    0x00000000UL, 0x77073096UL, 0xee0e612cUL, 0x990951baUL, 0x076dc419UL,
-    0x706af48fUL, 0xe963a535UL, 0x9e6495a3UL, 0x0edb8832UL, 0x79dcb8a4UL,
-    0xe0d5e91eUL, 0x97d2d988UL, 0x09b64c2bUL, 0x7eb17cbdUL, 0xe7b82d07UL,
-    0x90bf1d91UL, 0x1db71064UL, 0x6ab020f2UL, 0xf3b97148UL, 0x84be41deUL,
-    0x1adad47dUL, 0x6ddde4ebUL, 0xf4d4b551UL, 0x83d385c7UL, 0x136c9856UL,
-    0x646ba8c0UL, 0xfd62f97aUL, 0x8a65c9ecUL, 0x14015c4fUL, 0x63066cd9UL,
-    0xfa0f3d63UL, 0x8d080df5UL, 0x3b6e20c8UL, 0x4c69105eUL, 0xd56041e4UL,
-    0xa2677172UL, 0x3c03e4d1UL, 0x4b04d447UL, 0xd20d85fdUL, 0xa50ab56bUL,
-    0x35b5a8faUL, 0x42b2986cUL, 0xdbbbc9d6UL, 0xacbcf940UL, 0x32d86ce3UL,
-    0x45df5c75UL, 0xdcd60dcfUL, 0xabd13d59UL, 0x26d930acUL, 0x51de003aUL,
-    0xc8d75180UL, 0xbfd06116UL, 0x21b4f4b5UL, 0x56b3c423UL, 0xcfba9599UL,
-    0xb8bda50fUL, 0x2802b89eUL, 0x5f058808UL, 0xc60cd9b2UL, 0xb10be924UL,
-    0x2f6f7c87UL, 0x58684c11UL, 0xc1611dabUL, 0xb6662d3dUL, 0x76dc4190UL,
-    0x01db7106UL, 0x98d220bcUL, 0xefd5102aUL, 0x71b18589UL, 0x06b6b51fUL,
-    0x9fbfe4a5UL, 0xe8b8d433UL, 0x7807c9a2UL, 0x0f00f934UL, 0x9609a88eUL,
-    0xe10e9818UL, 0x7f6a0dbbUL, 0x086d3d2dUL, 0x91646c97UL, 0xe6635c01UL,
-    0x6b6b51f4UL, 0x1c6c6162UL, 0x856530d8UL, 0xf262004eUL, 0x6c0695edUL,
-    0x1b01a57bUL, 0x8208f4c1UL, 0xf50fc457UL, 0x65b0d9c6UL, 0x12b7e950UL,
-    0x8bbeb8eaUL, 0xfcb9887cUL, 0x62dd1ddfUL, 0x15da2d49UL, 0x8cd37cf3UL,
-    0xfbd44c65UL, 0x4db26158UL, 0x3ab551ceUL, 0xa3bc0074UL, 0xd4bb30e2UL,
-    0x4adfa541UL, 0x3dd895d7UL, 0xa4d1c46dUL, 0xd3d6f4fbUL, 0x4369e96aUL,
-    0x346ed9fcUL, 0xad678846UL, 0xda60b8d0UL, 0x44042d73UL, 0x33031de5UL,
-    0xaa0a4c5fUL, 0xdd0d7cc9UL, 0x5005713cUL, 0x270241aaUL, 0xbe0b1010UL,
-    0xc90c2086UL, 0x5768b525UL, 0x206f85b3UL, 0xb966d409UL, 0xce61e49fUL,
-    0x5edef90eUL, 0x29d9c998UL, 0xb0d09822UL, 0xc7d7a8b4UL, 0x59b33d17UL,
-    0x2eb40d81UL, 0xb7bd5c3bUL, 0xc0ba6cadUL, 0xedb88320UL, 0x9abfb3b6UL,
-    0x03b6e20cUL, 0x74b1d29aUL, 0xead54739UL, 0x9dd277afUL, 0x04db2615UL,
-    0x73dc1683UL, 0xe3630b12UL, 0x94643b84UL, 0x0d6d6a3eUL, 0x7a6a5aa8UL,
-    0xe40ecf0bUL, 0x9309ff9dUL, 0x0a00ae27UL, 0x7d079eb1UL, 0xf00f9344UL,
-    0x8708a3d2UL, 0x1e01f268UL, 0x6906c2feUL, 0xf762575dUL, 0x806567cbUL,
-    0x196c3671UL, 0x6e6b06e7UL, 0xfed41b76UL, 0x89d32be0UL, 0x10da7a5aUL,
-    0x67dd4accUL, 0xf9b9df6fUL, 0x8ebeeff9UL, 0x17b7be43UL, 0x60b08ed5UL,
-    0xd6d6a3e8UL, 0xa1d1937eUL, 0x38d8c2c4UL, 0x4fdff252UL, 0xd1bb67f1UL,
-    0xa6bc5767UL, 0x3fb506ddUL, 0x48b2364bUL, 0xd80d2bdaUL, 0xaf0a1b4cUL,
-    0x36034af6UL, 0x41047a60UL, 0xdf60efc3UL, 0xa867df55UL, 0x316e8eefUL,
-    0x4669be79UL, 0xcb61b38cUL, 0xbc66831aUL, 0x256fd2a0UL, 0x5268e236UL,
-    0xcc0c7795UL, 0xbb0b4703UL, 0x220216b9UL, 0x5505262fUL, 0xc5ba3bbeUL,
-    0xb2bd0b28UL, 0x2bb45a92UL, 0x5cb36a04UL, 0xc2d7ffa7UL, 0xb5d0cf31UL,
-    0x2cd99e8bUL, 0x5bdeae1dUL, 0x9b64c2b0UL, 0xec63f226UL, 0x756aa39cUL,
-    0x026d930aUL, 0x9c0906a9UL, 0xeb0e363fUL, 0x72076785UL, 0x05005713UL,
-    0x95bf4a82UL, 0xe2b87a14UL, 0x7bb12baeUL, 0x0cb61b38UL, 0x92d28e9bUL,
-    0xe5d5be0dUL, 0x7cdcefb7UL, 0x0bdbdf21UL, 0x86d3d2d4UL, 0xf1d4e242UL,
-    0x68ddb3f8UL, 0x1fda836eUL, 0x81be16cdUL, 0xf6b9265bUL, 0x6fb077e1UL,
-    0x18b74777UL, 0x88085ae6UL, 0xff0f6a70UL, 0x66063bcaUL, 0x11010b5cUL,
-    0x8f659effUL, 0xf862ae69UL, 0x616bffd3UL, 0x166ccf45UL, 0xa00ae278UL,
-    0xd70dd2eeUL, 0x4e048354UL, 0x3903b3c2UL, 0xa7672661UL, 0xd06016f7UL,
-    0x4969474dUL, 0x3e6e77dbUL, 0xaed16a4aUL, 0xd9d65adcUL, 0x40df0b66UL,
-    0x37d83bf0UL, 0xa9bcae53UL, 0xdebb9ec5UL, 0x47b2cf7fUL, 0x30b5ffe9UL,
-    0xbdbdf21cUL, 0xcabac28aUL, 0x53b39330UL, 0x24b4a3a6UL, 0xbad03605UL,
-    0xcdd70693UL, 0x54de5729UL, 0x23d967bfUL, 0xb3667a2eUL, 0xc4614ab8UL,
-    0x5d681b02UL, 0x2a6f2b94UL, 0xb40bbe37UL, 0xc30c8ea1UL, 0x5a05df1bUL,
-    0x2d02ef8dUL
-#ifdef BYFOUR
-  },
-  {
-    0x00000000UL, 0x191b3141UL, 0x32366282UL, 0x2b2d53c3UL, 0x646cc504UL,
-    0x7d77f445UL, 0x565aa786UL, 0x4f4196c7UL, 0xc8d98a08UL, 0xd1c2bb49UL,
-    0xfaefe88aUL, 0xe3f4d9cbUL, 0xacb54f0cUL, 0xb5ae7e4dUL, 0x9e832d8eUL,
-    0x87981ccfUL, 0x4ac21251UL, 0x53d92310UL, 0x78f470d3UL, 0x61ef4192UL,
-    0x2eaed755UL, 0x37b5e614UL, 0x1c98b5d7UL, 0x05838496UL, 0x821b9859UL,
-    0x9b00a918UL, 0xb02dfadbUL, 0xa936cb9aUL, 0xe6775d5dUL, 0xff6c6c1cUL,
-    0xd4413fdfUL, 0xcd5a0e9eUL, 0x958424a2UL, 0x8c9f15e3UL, 0xa7b24620UL,
-    0xbea97761UL, 0xf1e8e1a6UL, 0xe8f3d0e7UL, 0xc3de8324UL, 0xdac5b265UL,
-    0x5d5daeaaUL, 0x44469febUL, 0x6f6bcc28UL, 0x7670fd69UL, 0x39316baeUL,
-    0x202a5aefUL, 0x0b07092cUL, 0x121c386dUL, 0xdf4636f3UL, 0xc65d07b2UL,
-    0xed705471UL, 0xf46b6530UL, 0xbb2af3f7UL, 0xa231c2b6UL, 0x891c9175UL,
-    0x9007a034UL, 0x179fbcfbUL, 0x0e848dbaUL, 0x25a9de79UL, 0x3cb2ef38UL,
-    0x73f379ffUL, 0x6ae848beUL, 0x41c51b7dUL, 0x58de2a3cUL, 0xf0794f05UL,
-    0xe9627e44UL, 0xc24f2d87UL, 0xdb541cc6UL, 0x94158a01UL, 0x8d0ebb40UL,
-    0xa623e883UL, 0xbf38d9c2UL, 0x38a0c50dUL, 0x21bbf44cUL, 0x0a96a78fUL,
-    0x138d96ceUL, 0x5ccc0009UL, 0x45d73148UL, 0x6efa628bUL, 0x77e153caUL,
-    0xbabb5d54UL, 0xa3a06c15UL, 0x888d3fd6UL, 0x91960e97UL, 0xded79850UL,
-    0xc7cca911UL, 0xece1fad2UL, 0xf5facb93UL, 0x7262d75cUL, 0x6b79e61dUL,
-    0x4054b5deUL, 0x594f849fUL, 0x160e1258UL, 0x0f152319UL, 0x243870daUL,
-    0x3d23419bUL, 0x65fd6ba7UL, 0x7ce65ae6UL, 0x57cb0925UL, 0x4ed03864UL,
-    0x0191aea3UL, 0x188a9fe2UL, 0x33a7cc21UL, 0x2abcfd60UL, 0xad24e1afUL,
-    0xb43fd0eeUL, 0x9f12832dUL, 0x8609b26cUL, 0xc94824abUL, 0xd05315eaUL,
-    0xfb7e4629UL, 0xe2657768UL, 0x2f3f79f6UL, 0x362448b7UL, 0x1d091b74UL,
-    0x04122a35UL, 0x4b53bcf2UL, 0x52488db3UL, 0x7965de70UL, 0x607eef31UL,
-    0xe7e6f3feUL, 0xfefdc2bfUL, 0xd5d0917cUL, 0xcccba03dUL, 0x838a36faUL,
-    0x9a9107bbUL, 0xb1bc5478UL, 0xa8a76539UL, 0x3b83984bUL, 0x2298a90aUL,
-    0x09b5fac9UL, 0x10aecb88UL, 0x5fef5d4fUL, 0x46f46c0eUL, 0x6dd93fcdUL,
-    0x74c20e8cUL, 0xf35a1243UL, 0xea412302UL, 0xc16c70c1UL, 0xd8774180UL,
-    0x9736d747UL, 0x8e2de606UL, 0xa500b5c5UL, 0xbc1b8484UL, 0x71418a1aUL,
-    0x685abb5bUL, 0x4377e898UL, 0x5a6cd9d9UL, 0x152d4f1eUL, 0x0c367e5fUL,
-    0x271b2d9cUL, 0x3e001cddUL, 0xb9980012UL, 0xa0833153UL, 0x8bae6290UL,
-    0x92b553d1UL, 0xddf4c516UL, 0xc4eff457UL, 0xefc2a794UL, 0xf6d996d5UL,
-    0xae07bce9UL, 0xb71c8da8UL, 0x9c31de6bUL, 0x852aef2aUL, 0xca6b79edUL,
-    0xd37048acUL, 0xf85d1b6fUL, 0xe1462a2eUL, 0x66de36e1UL, 0x7fc507a0UL,
-    0x54e85463UL, 0x4df36522UL, 0x02b2f3e5UL, 0x1ba9c2a4UL, 0x30849167UL,
-    0x299fa026UL, 0xe4c5aeb8UL, 0xfdde9ff9UL, 0xd6f3cc3aUL, 0xcfe8fd7bUL,
-    0x80a96bbcUL, 0x99b25afdUL, 0xb29f093eUL, 0xab84387fUL, 0x2c1c24b0UL,
-    0x350715f1UL, 0x1e2a4632UL, 0x07317773UL, 0x4870e1b4UL, 0x516bd0f5UL,
-    0x7a468336UL, 0x635db277UL, 0xcbfad74eUL, 0xd2e1e60fUL, 0xf9ccb5ccUL,
-    0xe0d7848dUL, 0xaf96124aUL, 0xb68d230bUL, 0x9da070c8UL, 0x84bb4189UL,
-    0x03235d46UL, 0x1a386c07UL, 0x31153fc4UL, 0x280e0e85UL, 0x674f9842UL,
-    0x7e54a903UL, 0x5579fac0UL, 0x4c62cb81UL, 0x8138c51fUL, 0x9823f45eUL,
-    0xb30ea79dUL, 0xaa1596dcUL, 0xe554001bUL, 0xfc4f315aUL, 0xd7626299UL,
-    0xce7953d8UL, 0x49e14f17UL, 0x50fa7e56UL, 0x7bd72d95UL, 0x62cc1cd4UL,
-    0x2d8d8a13UL, 0x3496bb52UL, 0x1fbbe891UL, 0x06a0d9d0UL, 0x5e7ef3ecUL,
-    0x4765c2adUL, 0x6c48916eUL, 0x7553a02fUL, 0x3a1236e8UL, 0x230907a9UL,
-    0x0824546aUL, 0x113f652bUL, 0x96a779e4UL, 0x8fbc48a5UL, 0xa4911b66UL,
-    0xbd8a2a27UL, 0xf2cbbce0UL, 0xebd08da1UL, 0xc0fdde62UL, 0xd9e6ef23UL,
-    0x14bce1bdUL, 0x0da7d0fcUL, 0x268a833fUL, 0x3f91b27eUL, 0x70d024b9UL,
-    0x69cb15f8UL, 0x42e6463bUL, 0x5bfd777aUL, 0xdc656bb5UL, 0xc57e5af4UL,
-    0xee530937UL, 0xf7483876UL, 0xb809aeb1UL, 0xa1129ff0UL, 0x8a3fcc33UL,
-    0x9324fd72UL
-  },
-  {
-    0x00000000UL, 0x01c26a37UL, 0x0384d46eUL, 0x0246be59UL, 0x0709a8dcUL,
-    0x06cbc2ebUL, 0x048d7cb2UL, 0x054f1685UL, 0x0e1351b8UL, 0x0fd13b8fUL,
-    0x0d9785d6UL, 0x0c55efe1UL, 0x091af964UL, 0x08d89353UL, 0x0a9e2d0aUL,
-    0x0b5c473dUL, 0x1c26a370UL, 0x1de4c947UL, 0x1fa2771eUL, 0x1e601d29UL,
-    0x1b2f0bacUL, 0x1aed619bUL, 0x18abdfc2UL, 0x1969b5f5UL, 0x1235f2c8UL,
-    0x13f798ffUL, 0x11b126a6UL, 0x10734c91UL, 0x153c5a14UL, 0x14fe3023UL,
-    0x16b88e7aUL, 0x177ae44dUL, 0x384d46e0UL, 0x398f2cd7UL, 0x3bc9928eUL,
-    0x3a0bf8b9UL, 0x3f44ee3cUL, 0x3e86840bUL, 0x3cc03a52UL, 0x3d025065UL,
-    0x365e1758UL, 0x379c7d6fUL, 0x35dac336UL, 0x3418a901UL, 0x3157bf84UL,
-    0x3095d5b3UL, 0x32d36beaUL, 0x331101ddUL, 0x246be590UL, 0x25a98fa7UL,
-    0x27ef31feUL, 0x262d5bc9UL, 0x23624d4cUL, 0x22a0277bUL, 0x20e69922UL,
-    0x2124f315UL, 0x2a78b428UL, 0x2bbade1fUL, 0x29fc6046UL, 0x283e0a71UL,
-    0x2d711cf4UL, 0x2cb376c3UL, 0x2ef5c89aUL, 0x2f37a2adUL, 0x709a8dc0UL,
-    0x7158e7f7UL, 0x731e59aeUL, 0x72dc3399UL, 0x7793251cUL, 0x76514f2bUL,
-    0x7417f172UL, 0x75d59b45UL, 0x7e89dc78UL, 0x7f4bb64fUL, 0x7d0d0816UL,
-    0x7ccf6221UL, 0x798074a4UL, 0x78421e93UL, 0x7a04a0caUL, 0x7bc6cafdUL,
-    0x6cbc2eb0UL, 0x6d7e4487UL, 0x6f38fadeUL, 0x6efa90e9UL, 0x6bb5866cUL,
-    0x6a77ec5bUL, 0x68315202UL, 0x69f33835UL, 0x62af7f08UL, 0x636d153fUL,
-    0x612bab66UL, 0x60e9c151UL, 0x65a6d7d4UL, 0x6464bde3UL, 0x662203baUL,
-    0x67e0698dUL, 0x48d7cb20UL, 0x4915a117UL, 0x4b531f4eUL, 0x4a917579UL,
-    0x4fde63fcUL, 0x4e1c09cbUL, 0x4c5ab792UL, 0x4d98dda5UL, 0x46c49a98UL,
-    0x4706f0afUL, 0x45404ef6UL, 0x448224c1UL, 0x41cd3244UL, 0x400f5873UL,
-    0x4249e62aUL, 0x438b8c1dUL, 0x54f16850UL, 0x55330267UL, 0x5775bc3eUL,
-    0x56b7d609UL, 0x53f8c08cUL, 0x523aaabbUL, 0x507c14e2UL, 0x51be7ed5UL,
-    0x5ae239e8UL, 0x5b2053dfUL, 0x5966ed86UL, 0x58a487b1UL, 0x5deb9134UL,
-    0x5c29fb03UL, 0x5e6f455aUL, 0x5fad2f6dUL, 0xe1351b80UL, 0xe0f771b7UL,
-    0xe2b1cfeeUL, 0xe373a5d9UL, 0xe63cb35cUL, 0xe7fed96bUL, 0xe5b86732UL,
-    0xe47a0d05UL, 0xef264a38UL, 0xeee4200fUL, 0xeca29e56UL, 0xed60f461UL,
-    0xe82fe2e4UL, 0xe9ed88d3UL, 0xebab368aUL, 0xea695cbdUL, 0xfd13b8f0UL,
-    0xfcd1d2c7UL, 0xfe976c9eUL, 0xff5506a9UL, 0xfa1a102cUL, 0xfbd87a1bUL,
-    0xf99ec442UL, 0xf85cae75UL, 0xf300e948UL, 0xf2c2837fUL, 0xf0843d26UL,
-    0xf1465711UL, 0xf4094194UL, 0xf5cb2ba3UL, 0xf78d95faUL, 0xf64fffcdUL,
-    0xd9785d60UL, 0xd8ba3757UL, 0xdafc890eUL, 0xdb3ee339UL, 0xde71f5bcUL,
-    0xdfb39f8bUL, 0xddf521d2UL, 0xdc374be5UL, 0xd76b0cd8UL, 0xd6a966efUL,
-    0xd4efd8b6UL, 0xd52db281UL, 0xd062a404UL, 0xd1a0ce33UL, 0xd3e6706aUL,
-    0xd2241a5dUL, 0xc55efe10UL, 0xc49c9427UL, 0xc6da2a7eUL, 0xc7184049UL,
-    0xc25756ccUL, 0xc3953cfbUL, 0xc1d382a2UL, 0xc011e895UL, 0xcb4dafa8UL,
-    0xca8fc59fUL, 0xc8c97bc6UL, 0xc90b11f1UL, 0xcc440774UL, 0xcd866d43UL,
-    0xcfc0d31aUL, 0xce02b92dUL, 0x91af9640UL, 0x906dfc77UL, 0x922b422eUL,
-    0x93e92819UL, 0x96a63e9cUL, 0x976454abUL, 0x9522eaf2UL, 0x94e080c5UL,
-    0x9fbcc7f8UL, 0x9e7eadcfUL, 0x9c381396UL, 0x9dfa79a1UL, 0x98b56f24UL,
-    0x99770513UL, 0x9b31bb4aUL, 0x9af3d17dUL, 0x8d893530UL, 0x8c4b5f07UL,
-    0x8e0de15eUL, 0x8fcf8b69UL, 0x8a809decUL, 0x8b42f7dbUL, 0x89044982UL,
-    0x88c623b5UL, 0x839a6488UL, 0x82580ebfUL, 0x801eb0e6UL, 0x81dcdad1UL,
-    0x8493cc54UL, 0x8551a663UL, 0x8717183aUL, 0x86d5720dUL, 0xa9e2d0a0UL,
-    0xa820ba97UL, 0xaa6604ceUL, 0xaba46ef9UL, 0xaeeb787cUL, 0xaf29124bUL,
-    0xad6fac12UL, 0xacadc625UL, 0xa7f18118UL, 0xa633eb2fUL, 0xa4755576UL,
-    0xa5b73f41UL, 0xa0f829c4UL, 0xa13a43f3UL, 0xa37cfdaaUL, 0xa2be979dUL,
-    0xb5c473d0UL, 0xb40619e7UL, 0xb640a7beUL, 0xb782cd89UL, 0xb2cddb0cUL,
-    0xb30fb13bUL, 0xb1490f62UL, 0xb08b6555UL, 0xbbd72268UL, 0xba15485fUL,
-    0xb853f606UL, 0xb9919c31UL, 0xbcde8ab4UL, 0xbd1ce083UL, 0xbf5a5edaUL,
-    0xbe9834edUL
-  },
-  {
-    0x00000000UL, 0xb8bc6765UL, 0xaa09c88bUL, 0x12b5afeeUL, 0x8f629757UL,
-    0x37def032UL, 0x256b5fdcUL, 0x9dd738b9UL, 0xc5b428efUL, 0x7d084f8aUL,
-    0x6fbde064UL, 0xd7018701UL, 0x4ad6bfb8UL, 0xf26ad8ddUL, 0xe0df7733UL,
-    0x58631056UL, 0x5019579fUL, 0xe8a530faUL, 0xfa109f14UL, 0x42acf871UL,
-    0xdf7bc0c8UL, 0x67c7a7adUL, 0x75720843UL, 0xcdce6f26UL, 0x95ad7f70UL,
-    0x2d111815UL, 0x3fa4b7fbUL, 0x8718d09eUL, 0x1acfe827UL, 0xa2738f42UL,
-    0xb0c620acUL, 0x087a47c9UL, 0xa032af3eUL, 0x188ec85bUL, 0x0a3b67b5UL,
-    0xb28700d0UL, 0x2f503869UL, 0x97ec5f0cUL, 0x8559f0e2UL, 0x3de59787UL,
-    0x658687d1UL, 0xdd3ae0b4UL, 0xcf8f4f5aUL, 0x7733283fUL, 0xeae41086UL,
-    0x525877e3UL, 0x40edd80dUL, 0xf851bf68UL, 0xf02bf8a1UL, 0x48979fc4UL,
-    0x5a22302aUL, 0xe29e574fUL, 0x7f496ff6UL, 0xc7f50893UL, 0xd540a77dUL,
-    0x6dfcc018UL, 0x359fd04eUL, 0x8d23b72bUL, 0x9f9618c5UL, 0x272a7fa0UL,
-    0xbafd4719UL, 0x0241207cUL, 0x10f48f92UL, 0xa848e8f7UL, 0x9b14583dUL,
-    0x23a83f58UL, 0x311d90b6UL, 0x89a1f7d3UL, 0x1476cf6aUL, 0xaccaa80fUL,
-    0xbe7f07e1UL, 0x06c36084UL, 0x5ea070d2UL, 0xe61c17b7UL, 0xf4a9b859UL,
-    0x4c15df3cUL, 0xd1c2e785UL, 0x697e80e0UL, 0x7bcb2f0eUL, 0xc377486bUL,
-    0xcb0d0fa2UL, 0x73b168c7UL, 0x6104c729UL, 0xd9b8a04cUL, 0x446f98f5UL,
-    0xfcd3ff90UL, 0xee66507eUL, 0x56da371bUL, 0x0eb9274dUL, 0xb6054028UL,
-    0xa4b0efc6UL, 0x1c0c88a3UL, 0x81dbb01aUL, 0x3967d77fUL, 0x2bd27891UL,
-    0x936e1ff4UL, 0x3b26f703UL, 0x839a9066UL, 0x912f3f88UL, 0x299358edUL,
-    0xb4446054UL, 0x0cf80731UL, 0x1e4da8dfUL, 0xa6f1cfbaUL, 0xfe92dfecUL,
-    0x462eb889UL, 0x549b1767UL, 0xec277002UL, 0x71f048bbUL, 0xc94c2fdeUL,
-    0xdbf98030UL, 0x6345e755UL, 0x6b3fa09cUL, 0xd383c7f9UL, 0xc1366817UL,
-    0x798a0f72UL, 0xe45d37cbUL, 0x5ce150aeUL, 0x4e54ff40UL, 0xf6e89825UL,
-    0xae8b8873UL, 0x1637ef16UL, 0x048240f8UL, 0xbc3e279dUL, 0x21e91f24UL,
-    0x99557841UL, 0x8be0d7afUL, 0x335cb0caUL, 0xed59b63bUL, 0x55e5d15eUL,
-    0x47507eb0UL, 0xffec19d5UL, 0x623b216cUL, 0xda874609UL, 0xc832e9e7UL,
-    0x708e8e82UL, 0x28ed9ed4UL, 0x9051f9b1UL, 0x82e4565fUL, 0x3a58313aUL,
-    0xa78f0983UL, 0x1f336ee6UL, 0x0d86c108UL, 0xb53aa66dUL, 0xbd40e1a4UL,
-    0x05fc86c1UL, 0x1749292fUL, 0xaff54e4aUL, 0x322276f3UL, 0x8a9e1196UL,
-    0x982bbe78UL, 0x2097d91dUL, 0x78f4c94bUL, 0xc048ae2eUL, 0xd2fd01c0UL,
-    0x6a4166a5UL, 0xf7965e1cUL, 0x4f2a3979UL, 0x5d9f9697UL, 0xe523f1f2UL,
-    0x4d6b1905UL, 0xf5d77e60UL, 0xe762d18eUL, 0x5fdeb6ebUL, 0xc2098e52UL,
-    0x7ab5e937UL, 0x680046d9UL, 0xd0bc21bcUL, 0x88df31eaUL, 0x3063568fUL,
-    0x22d6f961UL, 0x9a6a9e04UL, 0x07bda6bdUL, 0xbf01c1d8UL, 0xadb46e36UL,
-    0x15080953UL, 0x1d724e9aUL, 0xa5ce29ffUL, 0xb77b8611UL, 0x0fc7e174UL,
-    0x9210d9cdUL, 0x2aacbea8UL, 0x38191146UL, 0x80a57623UL, 0xd8c66675UL,
-    0x607a0110UL, 0x72cfaefeUL, 0xca73c99bUL, 0x57a4f122UL, 0xef189647UL,
-    0xfdad39a9UL, 0x45115eccUL, 0x764dee06UL, 0xcef18963UL, 0xdc44268dUL,
-    0x64f841e8UL, 0xf92f7951UL, 0x41931e34UL, 0x5326b1daUL, 0xeb9ad6bfUL,
-    0xb3f9c6e9UL, 0x0b45a18cUL, 0x19f00e62UL, 0xa14c6907UL, 0x3c9b51beUL,
-    0x842736dbUL, 0x96929935UL, 0x2e2efe50UL, 0x2654b999UL, 0x9ee8defcUL,
-    0x8c5d7112UL, 0x34e11677UL, 0xa9362eceUL, 0x118a49abUL, 0x033fe645UL,
-    0xbb838120UL, 0xe3e09176UL, 0x5b5cf613UL, 0x49e959fdUL, 0xf1553e98UL,
-    0x6c820621UL, 0xd43e6144UL, 0xc68bceaaUL, 0x7e37a9cfUL, 0xd67f4138UL,
-    0x6ec3265dUL, 0x7c7689b3UL, 0xc4caeed6UL, 0x591dd66fUL, 0xe1a1b10aUL,
-    0xf3141ee4UL, 0x4ba87981UL, 0x13cb69d7UL, 0xab770eb2UL, 0xb9c2a15cUL,
-    0x017ec639UL, 0x9ca9fe80UL, 0x241599e5UL, 0x36a0360bUL, 0x8e1c516eUL,
-    0x866616a7UL, 0x3eda71c2UL, 0x2c6fde2cUL, 0x94d3b949UL, 0x090481f0UL,
-    0xb1b8e695UL, 0xa30d497bUL, 0x1bb12e1eUL, 0x43d23e48UL, 0xfb6e592dUL,
-    0xe9dbf6c3UL, 0x516791a6UL, 0xccb0a91fUL, 0x740cce7aUL, 0x66b96194UL,
-    0xde0506f1UL
-  },
-  {
-    0x00000000UL, 0x96300777UL, 0x2c610eeeUL, 0xba510999UL, 0x19c46d07UL,
-    0x8ff46a70UL, 0x35a563e9UL, 0xa395649eUL, 0x3288db0eUL, 0xa4b8dc79UL,
-    0x1ee9d5e0UL, 0x88d9d297UL, 0x2b4cb609UL, 0xbd7cb17eUL, 0x072db8e7UL,
-    0x911dbf90UL, 0x6410b71dUL, 0xf220b06aUL, 0x4871b9f3UL, 0xde41be84UL,
-    0x7dd4da1aUL, 0xebe4dd6dUL, 0x51b5d4f4UL, 0xc785d383UL, 0x56986c13UL,
-    0xc0a86b64UL, 0x7af962fdUL, 0xecc9658aUL, 0x4f5c0114UL, 0xd96c0663UL,
-    0x633d0ffaUL, 0xf50d088dUL, 0xc8206e3bUL, 0x5e10694cUL, 0xe44160d5UL,
-    0x727167a2UL, 0xd1e4033cUL, 0x47d4044bUL, 0xfd850dd2UL, 0x6bb50aa5UL,
-    0xfaa8b535UL, 0x6c98b242UL, 0xd6c9bbdbUL, 0x40f9bcacUL, 0xe36cd832UL,
-    0x755cdf45UL, 0xcf0dd6dcUL, 0x593dd1abUL, 0xac30d926UL, 0x3a00de51UL,
-    0x8051d7c8UL, 0x1661d0bfUL, 0xb5f4b421UL, 0x23c4b356UL, 0x9995bacfUL,
-    0x0fa5bdb8UL, 0x9eb80228UL, 0x0888055fUL, 0xb2d90cc6UL, 0x24e90bb1UL,
-    0x877c6f2fUL, 0x114c6858UL, 0xab1d61c1UL, 0x3d2d66b6UL, 0x9041dc76UL,
-    0x0671db01UL, 0xbc20d298UL, 0x2a10d5efUL, 0x8985b171UL, 0x1fb5b606UL,
-    0xa5e4bf9fUL, 0x33d4b8e8UL, 0xa2c90778UL, 0x34f9000fUL, 0x8ea80996UL,
-    0x18980ee1UL, 0xbb0d6a7fUL, 0x2d3d6d08UL, 0x976c6491UL, 0x015c63e6UL,
-    0xf4516b6bUL, 0x62616c1cUL, 0xd8306585UL, 0x4e0062f2UL, 0xed95066cUL,
-    0x7ba5011bUL, 0xc1f40882UL, 0x57c40ff5UL, 0xc6d9b065UL, 0x50e9b712UL,
-    0xeab8be8bUL, 0x7c88b9fcUL, 0xdf1ddd62UL, 0x492dda15UL, 0xf37cd38cUL,
-    0x654cd4fbUL, 0x5861b24dUL, 0xce51b53aUL, 0x7400bca3UL, 0xe230bbd4UL,
-    0x41a5df4aUL, 0xd795d83dUL, 0x6dc4d1a4UL, 0xfbf4d6d3UL, 0x6ae96943UL,
-    0xfcd96e34UL, 0x468867adUL, 0xd0b860daUL, 0x732d0444UL, 0xe51d0333UL,
-    0x5f4c0aaaUL, 0xc97c0dddUL, 0x3c710550UL, 0xaa410227UL, 0x10100bbeUL,
-    0x86200cc9UL, 0x25b56857UL, 0xb3856f20UL, 0x09d466b9UL, 0x9fe461ceUL,
-    0x0ef9de5eUL, 0x98c9d929UL, 0x2298d0b0UL, 0xb4a8d7c7UL, 0x173db359UL,
-    0x810db42eUL, 0x3b5cbdb7UL, 0xad6cbac0UL, 0x2083b8edUL, 0xb6b3bf9aUL,
-    0x0ce2b603UL, 0x9ad2b174UL, 0x3947d5eaUL, 0xaf77d29dUL, 0x1526db04UL,
-    0x8316dc73UL, 0x120b63e3UL, 0x843b6494UL, 0x3e6a6d0dUL, 0xa85a6a7aUL,
-    0x0bcf0ee4UL, 0x9dff0993UL, 0x27ae000aUL, 0xb19e077dUL, 0x44930ff0UL,
-    0xd2a30887UL, 0x68f2011eUL, 0xfec20669UL, 0x5d5762f7UL, 0xcb676580UL,
-    0x71366c19UL, 0xe7066b6eUL, 0x761bd4feUL, 0xe02bd389UL, 0x5a7ada10UL,
-    0xcc4add67UL, 0x6fdfb9f9UL, 0xf9efbe8eUL, 0x43beb717UL, 0xd58eb060UL,
-    0xe8a3d6d6UL, 0x7e93d1a1UL, 0xc4c2d838UL, 0x52f2df4fUL, 0xf167bbd1UL,
-    0x6757bca6UL, 0xdd06b53fUL, 0x4b36b248UL, 0xda2b0dd8UL, 0x4c1b0aafUL,
-    0xf64a0336UL, 0x607a0441UL, 0xc3ef60dfUL, 0x55df67a8UL, 0xef8e6e31UL,
-    0x79be6946UL, 0x8cb361cbUL, 0x1a8366bcUL, 0xa0d26f25UL, 0x36e26852UL,
-    0x95770cccUL, 0x03470bbbUL, 0xb9160222UL, 0x2f260555UL, 0xbe3bbac5UL,
-    0x280bbdb2UL, 0x925ab42bUL, 0x046ab35cUL, 0xa7ffd7c2UL, 0x31cfd0b5UL,
-    0x8b9ed92cUL, 0x1daede5bUL, 0xb0c2649bUL, 0x26f263ecUL, 0x9ca36a75UL,
-    0x0a936d02UL, 0xa906099cUL, 0x3f360eebUL, 0x85670772UL, 0x13570005UL,
-    0x824abf95UL, 0x147ab8e2UL, 0xae2bb17bUL, 0x381bb60cUL, 0x9b8ed292UL,
-    0x0dbed5e5UL, 0xb7efdc7cUL, 0x21dfdb0bUL, 0xd4d2d386UL, 0x42e2d4f1UL,
-    0xf8b3dd68UL, 0x6e83da1fUL, 0xcd16be81UL, 0x5b26b9f6UL, 0xe177b06fUL,
-    0x7747b718UL, 0xe65a0888UL, 0x706a0fffUL, 0xca3b0666UL, 0x5c0b0111UL,
-    0xff9e658fUL, 0x69ae62f8UL, 0xd3ff6b61UL, 0x45cf6c16UL, 0x78e20aa0UL,
-    0xeed20dd7UL, 0x5483044eUL, 0xc2b30339UL, 0x612667a7UL, 0xf71660d0UL,
-    0x4d476949UL, 0xdb776e3eUL, 0x4a6ad1aeUL, 0xdc5ad6d9UL, 0x660bdf40UL,
-    0xf03bd837UL, 0x53aebca9UL, 0xc59ebbdeUL, 0x7fcfb247UL, 0xe9ffb530UL,
-    0x1cf2bdbdUL, 0x8ac2bacaUL, 0x3093b353UL, 0xa6a3b424UL, 0x0536d0baUL,
-    0x9306d7cdUL, 0x2957de54UL, 0xbf67d923UL, 0x2e7a66b3UL, 0xb84a61c4UL,
-    0x021b685dUL, 0x942b6f2aUL, 0x37be0bb4UL, 0xa18e0cc3UL, 0x1bdf055aUL,
-    0x8def022dUL
-  },
-  {
-    0x00000000UL, 0x41311b19UL, 0x82623632UL, 0xc3532d2bUL, 0x04c56c64UL,
-    0x45f4777dUL, 0x86a75a56UL, 0xc796414fUL, 0x088ad9c8UL, 0x49bbc2d1UL,
-    0x8ae8effaUL, 0xcbd9f4e3UL, 0x0c4fb5acUL, 0x4d7eaeb5UL, 0x8e2d839eUL,
-    0xcf1c9887UL, 0x5112c24aUL, 0x1023d953UL, 0xd370f478UL, 0x9241ef61UL,
-    0x55d7ae2eUL, 0x14e6b537UL, 0xd7b5981cUL, 0x96848305UL, 0x59981b82UL,
-    0x18a9009bUL, 0xdbfa2db0UL, 0x9acb36a9UL, 0x5d5d77e6UL, 0x1c6c6cffUL,
-    0xdf3f41d4UL, 0x9e0e5acdUL, 0xa2248495UL, 0xe3159f8cUL, 0x2046b2a7UL,
-    0x6177a9beUL, 0xa6e1e8f1UL, 0xe7d0f3e8UL, 0x2483dec3UL, 0x65b2c5daUL,
-    0xaaae5d5dUL, 0xeb9f4644UL, 0x28cc6b6fUL, 0x69fd7076UL, 0xae6b3139UL,
-    0xef5a2a20UL, 0x2c09070bUL, 0x6d381c12UL, 0xf33646dfUL, 0xb2075dc6UL,
-    0x715470edUL, 0x30656bf4UL, 0xf7f32abbUL, 0xb6c231a2UL, 0x75911c89UL,
-    0x34a00790UL, 0xfbbc9f17UL, 0xba8d840eUL, 0x79dea925UL, 0x38efb23cUL,
-    0xff79f373UL, 0xbe48e86aUL, 0x7d1bc541UL, 0x3c2ade58UL, 0x054f79f0UL,
-    0x447e62e9UL, 0x872d4fc2UL, 0xc61c54dbUL, 0x018a1594UL, 0x40bb0e8dUL,
-    0x83e823a6UL, 0xc2d938bfUL, 0x0dc5a038UL, 0x4cf4bb21UL, 0x8fa7960aUL,
-    0xce968d13UL, 0x0900cc5cUL, 0x4831d745UL, 0x8b62fa6eUL, 0xca53e177UL,
-    0x545dbbbaUL, 0x156ca0a3UL, 0xd63f8d88UL, 0x970e9691UL, 0x5098d7deUL,
-    0x11a9ccc7UL, 0xd2fae1ecUL, 0x93cbfaf5UL, 0x5cd76272UL, 0x1de6796bUL,
-    0xdeb55440UL, 0x9f844f59UL, 0x58120e16UL, 0x1923150fUL, 0xda703824UL,
-    0x9b41233dUL, 0xa76bfd65UL, 0xe65ae67cUL, 0x2509cb57UL, 0x6438d04eUL,
-    0xa3ae9101UL, 0xe29f8a18UL, 0x21cca733UL, 0x60fdbc2aUL, 0xafe124adUL,
-    0xeed03fb4UL, 0x2d83129fUL, 0x6cb20986UL, 0xab2448c9UL, 0xea1553d0UL,
-    0x29467efbUL, 0x687765e2UL, 0xf6793f2fUL, 0xb7482436UL, 0x741b091dUL,
-    0x352a1204UL, 0xf2bc534bUL, 0xb38d4852UL, 0x70de6579UL, 0x31ef7e60UL,
-    0xfef3e6e7UL, 0xbfc2fdfeUL, 0x7c91d0d5UL, 0x3da0cbccUL, 0xfa368a83UL,
-    0xbb07919aUL, 0x7854bcb1UL, 0x3965a7a8UL, 0x4b98833bUL, 0x0aa99822UL,
-    0xc9fab509UL, 0x88cbae10UL, 0x4f5def5fUL, 0x0e6cf446UL, 0xcd3fd96dUL,
-    0x8c0ec274UL, 0x43125af3UL, 0x022341eaUL, 0xc1706cc1UL, 0x804177d8UL,
-    0x47d73697UL, 0x06e62d8eUL, 0xc5b500a5UL, 0x84841bbcUL, 0x1a8a4171UL,
-    0x5bbb5a68UL, 0x98e87743UL, 0xd9d96c5aUL, 0x1e4f2d15UL, 0x5f7e360cUL,
-    0x9c2d1b27UL, 0xdd1c003eUL, 0x120098b9UL, 0x533183a0UL, 0x9062ae8bUL,
-    0xd153b592UL, 0x16c5f4ddUL, 0x57f4efc4UL, 0x94a7c2efUL, 0xd596d9f6UL,
-    0xe9bc07aeUL, 0xa88d1cb7UL, 0x6bde319cUL, 0x2aef2a85UL, 0xed796bcaUL,
-    0xac4870d3UL, 0x6f1b5df8UL, 0x2e2a46e1UL, 0xe136de66UL, 0xa007c57fUL,
-    0x6354e854UL, 0x2265f34dUL, 0xe5f3b202UL, 0xa4c2a91bUL, 0x67918430UL,
-    0x26a09f29UL, 0xb8aec5e4UL, 0xf99fdefdUL, 0x3accf3d6UL, 0x7bfde8cfUL,
-    0xbc6ba980UL, 0xfd5ab299UL, 0x3e099fb2UL, 0x7f3884abUL, 0xb0241c2cUL,
-    0xf1150735UL, 0x32462a1eUL, 0x73773107UL, 0xb4e17048UL, 0xf5d06b51UL,
-    0x3683467aUL, 0x77b25d63UL, 0x4ed7facbUL, 0x0fe6e1d2UL, 0xccb5ccf9UL,
-    0x8d84d7e0UL, 0x4a1296afUL, 0x0b238db6UL, 0xc870a09dUL, 0x8941bb84UL,
-    0x465d2303UL, 0x076c381aUL, 0xc43f1531UL, 0x850e0e28UL, 0x42984f67UL,
-    0x03a9547eUL, 0xc0fa7955UL, 0x81cb624cUL, 0x1fc53881UL, 0x5ef42398UL,
-    0x9da70eb3UL, 0xdc9615aaUL, 0x1b0054e5UL, 0x5a314ffcUL, 0x996262d7UL,
-    0xd85379ceUL, 0x174fe149UL, 0x567efa50UL, 0x952dd77bUL, 0xd41ccc62UL,
-    0x138a8d2dUL, 0x52bb9634UL, 0x91e8bb1fUL, 0xd0d9a006UL, 0xecf37e5eUL,
-    0xadc26547UL, 0x6e91486cUL, 0x2fa05375UL, 0xe836123aUL, 0xa9070923UL,
-    0x6a542408UL, 0x2b653f11UL, 0xe479a796UL, 0xa548bc8fUL, 0x661b91a4UL,
-    0x272a8abdUL, 0xe0bccbf2UL, 0xa18dd0ebUL, 0x62defdc0UL, 0x23efe6d9UL,
-    0xbde1bc14UL, 0xfcd0a70dUL, 0x3f838a26UL, 0x7eb2913fUL, 0xb924d070UL,
-    0xf815cb69UL, 0x3b46e642UL, 0x7a77fd5bUL, 0xb56b65dcUL, 0xf45a7ec5UL,
-    0x370953eeUL, 0x763848f7UL, 0xb1ae09b8UL, 0xf09f12a1UL, 0x33cc3f8aUL,
-    0x72fd2493UL
-  },
-  {
-    0x00000000UL, 0x376ac201UL, 0x6ed48403UL, 0x59be4602UL, 0xdca80907UL,
-    0xebc2cb06UL, 0xb27c8d04UL, 0x85164f05UL, 0xb851130eUL, 0x8f3bd10fUL,
-    0xd685970dUL, 0xe1ef550cUL, 0x64f91a09UL, 0x5393d808UL, 0x0a2d9e0aUL,
-    0x3d475c0bUL, 0x70a3261cUL, 0x47c9e41dUL, 0x1e77a21fUL, 0x291d601eUL,
-    0xac0b2f1bUL, 0x9b61ed1aUL, 0xc2dfab18UL, 0xf5b56919UL, 0xc8f23512UL,
-    0xff98f713UL, 0xa626b111UL, 0x914c7310UL, 0x145a3c15UL, 0x2330fe14UL,
-    0x7a8eb816UL, 0x4de47a17UL, 0xe0464d38UL, 0xd72c8f39UL, 0x8e92c93bUL,
-    0xb9f80b3aUL, 0x3cee443fUL, 0x0b84863eUL, 0x523ac03cUL, 0x6550023dUL,
-    0x58175e36UL, 0x6f7d9c37UL, 0x36c3da35UL, 0x01a91834UL, 0x84bf5731UL,
-    0xb3d59530UL, 0xea6bd332UL, 0xdd011133UL, 0x90e56b24UL, 0xa78fa925UL,
-    0xfe31ef27UL, 0xc95b2d26UL, 0x4c4d6223UL, 0x7b27a022UL, 0x2299e620UL,
-    0x15f32421UL, 0x28b4782aUL, 0x1fdeba2bUL, 0x4660fc29UL, 0x710a3e28UL,
-    0xf41c712dUL, 0xc376b32cUL, 0x9ac8f52eUL, 0xada2372fUL, 0xc08d9a70UL,
-    0xf7e75871UL, 0xae591e73UL, 0x9933dc72UL, 0x1c259377UL, 0x2b4f5176UL,
-    0x72f11774UL, 0x459bd575UL, 0x78dc897eUL, 0x4fb64b7fUL, 0x16080d7dUL,
-    0x2162cf7cUL, 0xa4748079UL, 0x931e4278UL, 0xcaa0047aUL, 0xfdcac67bUL,
-    0xb02ebc6cUL, 0x87447e6dUL, 0xdefa386fUL, 0xe990fa6eUL, 0x6c86b56bUL,
-    0x5bec776aUL, 0x02523168UL, 0x3538f369UL, 0x087faf62UL, 0x3f156d63UL,
-    0x66ab2b61UL, 0x51c1e960UL, 0xd4d7a665UL, 0xe3bd6464UL, 0xba032266UL,
-    0x8d69e067UL, 0x20cbd748UL, 0x17a11549UL, 0x4e1f534bUL, 0x7975914aUL,
-    0xfc63de4fUL, 0xcb091c4eUL, 0x92b75a4cUL, 0xa5dd984dUL, 0x989ac446UL,
-    0xaff00647UL, 0xf64e4045UL, 0xc1248244UL, 0x4432cd41UL, 0x73580f40UL,
-    0x2ae64942UL, 0x1d8c8b43UL, 0x5068f154UL, 0x67023355UL, 0x3ebc7557UL,
-    0x09d6b756UL, 0x8cc0f853UL, 0xbbaa3a52UL, 0xe2147c50UL, 0xd57ebe51UL,
-    0xe839e25aUL, 0xdf53205bUL, 0x86ed6659UL, 0xb187a458UL, 0x3491eb5dUL,
-    0x03fb295cUL, 0x5a456f5eUL, 0x6d2fad5fUL, 0x801b35e1UL, 0xb771f7e0UL,
-    0xeecfb1e2UL, 0xd9a573e3UL, 0x5cb33ce6UL, 0x6bd9fee7UL, 0x3267b8e5UL,
-    0x050d7ae4UL, 0x384a26efUL, 0x0f20e4eeUL, 0x569ea2ecUL, 0x61f460edUL,
-    0xe4e22fe8UL, 0xd388ede9UL, 0x8a36abebUL, 0xbd5c69eaUL, 0xf0b813fdUL,
-    0xc7d2d1fcUL, 0x9e6c97feUL, 0xa90655ffUL, 0x2c101afaUL, 0x1b7ad8fbUL,
-    0x42c49ef9UL, 0x75ae5cf8UL, 0x48e900f3UL, 0x7f83c2f2UL, 0x263d84f0UL,
-    0x115746f1UL, 0x944109f4UL, 0xa32bcbf5UL, 0xfa958df7UL, 0xcdff4ff6UL,
-    0x605d78d9UL, 0x5737bad8UL, 0x0e89fcdaUL, 0x39e33edbUL, 0xbcf571deUL,
-    0x8b9fb3dfUL, 0xd221f5ddUL, 0xe54b37dcUL, 0xd80c6bd7UL, 0xef66a9d6UL,
-    0xb6d8efd4UL, 0x81b22dd5UL, 0x04a462d0UL, 0x33cea0d1UL, 0x6a70e6d3UL,
-    0x5d1a24d2UL, 0x10fe5ec5UL, 0x27949cc4UL, 0x7e2adac6UL, 0x494018c7UL,
-    0xcc5657c2UL, 0xfb3c95c3UL, 0xa282d3c1UL, 0x95e811c0UL, 0xa8af4dcbUL,
-    0x9fc58fcaUL, 0xc67bc9c8UL, 0xf1110bc9UL, 0x740744ccUL, 0x436d86cdUL,
-    0x1ad3c0cfUL, 0x2db902ceUL, 0x4096af91UL, 0x77fc6d90UL, 0x2e422b92UL,
-    0x1928e993UL, 0x9c3ea696UL, 0xab546497UL, 0xf2ea2295UL, 0xc580e094UL,
-    0xf8c7bc9fUL, 0xcfad7e9eUL, 0x9613389cUL, 0xa179fa9dUL, 0x246fb598UL,
-    0x13057799UL, 0x4abb319bUL, 0x7dd1f39aUL, 0x3035898dUL, 0x075f4b8cUL,
-    0x5ee10d8eUL, 0x698bcf8fUL, 0xec9d808aUL, 0xdbf7428bUL, 0x82490489UL,
-    0xb523c688UL, 0x88649a83UL, 0xbf0e5882UL, 0xe6b01e80UL, 0xd1dadc81UL,
-    0x54cc9384UL, 0x63a65185UL, 0x3a181787UL, 0x0d72d586UL, 0xa0d0e2a9UL,
-    0x97ba20a8UL, 0xce0466aaUL, 0xf96ea4abUL, 0x7c78ebaeUL, 0x4b1229afUL,
-    0x12ac6fadUL, 0x25c6adacUL, 0x1881f1a7UL, 0x2feb33a6UL, 0x765575a4UL,
-    0x413fb7a5UL, 0xc429f8a0UL, 0xf3433aa1UL, 0xaafd7ca3UL, 0x9d97bea2UL,
-    0xd073c4b5UL, 0xe71906b4UL, 0xbea740b6UL, 0x89cd82b7UL, 0x0cdbcdb2UL,
-    0x3bb10fb3UL, 0x620f49b1UL, 0x55658bb0UL, 0x6822d7bbUL, 0x5f4815baUL,
-    0x06f653b8UL, 0x319c91b9UL, 0xb48adebcUL, 0x83e01cbdUL, 0xda5e5abfUL,
-    0xed3498beUL
-  },
-  {
-    0x00000000UL, 0x6567bcb8UL, 0x8bc809aaUL, 0xeeafb512UL, 0x5797628fUL,
-    0x32f0de37UL, 0xdc5f6b25UL, 0xb938d79dUL, 0xef28b4c5UL, 0x8a4f087dUL,
-    0x64e0bd6fUL, 0x018701d7UL, 0xb8bfd64aUL, 0xddd86af2UL, 0x3377dfe0UL,
-    0x56106358UL, 0x9f571950UL, 0xfa30a5e8UL, 0x149f10faUL, 0x71f8ac42UL,
-    0xc8c07bdfUL, 0xada7c767UL, 0x43087275UL, 0x266fcecdUL, 0x707fad95UL,
-    0x1518112dUL, 0xfbb7a43fUL, 0x9ed01887UL, 0x27e8cf1aUL, 0x428f73a2UL,
-    0xac20c6b0UL, 0xc9477a08UL, 0x3eaf32a0UL, 0x5bc88e18UL, 0xb5673b0aUL,
-    0xd00087b2UL, 0x6938502fUL, 0x0c5fec97UL, 0xe2f05985UL, 0x8797e53dUL,
-    0xd1878665UL, 0xb4e03addUL, 0x5a4f8fcfUL, 0x3f283377UL, 0x8610e4eaUL,
-    0xe3775852UL, 0x0dd8ed40UL, 0x68bf51f8UL, 0xa1f82bf0UL, 0xc49f9748UL,
-    0x2a30225aUL, 0x4f579ee2UL, 0xf66f497fUL, 0x9308f5c7UL, 0x7da740d5UL,
-    0x18c0fc6dUL, 0x4ed09f35UL, 0x2bb7238dUL, 0xc518969fUL, 0xa07f2a27UL,
-    0x1947fdbaUL, 0x7c204102UL, 0x928ff410UL, 0xf7e848a8UL, 0x3d58149bUL,
-    0x583fa823UL, 0xb6901d31UL, 0xd3f7a189UL, 0x6acf7614UL, 0x0fa8caacUL,
-    0xe1077fbeUL, 0x8460c306UL, 0xd270a05eUL, 0xb7171ce6UL, 0x59b8a9f4UL,
-    0x3cdf154cUL, 0x85e7c2d1UL, 0xe0807e69UL, 0x0e2fcb7bUL, 0x6b4877c3UL,
-    0xa20f0dcbUL, 0xc768b173UL, 0x29c70461UL, 0x4ca0b8d9UL, 0xf5986f44UL,
-    0x90ffd3fcUL, 0x7e5066eeUL, 0x1b37da56UL, 0x4d27b90eUL, 0x284005b6UL,
-    0xc6efb0a4UL, 0xa3880c1cUL, 0x1ab0db81UL, 0x7fd76739UL, 0x9178d22bUL,
-    0xf41f6e93UL, 0x03f7263bUL, 0x66909a83UL, 0x883f2f91UL, 0xed589329UL,
-    0x546044b4UL, 0x3107f80cUL, 0xdfa84d1eUL, 0xbacff1a6UL, 0xecdf92feUL,
-    0x89b82e46UL, 0x67179b54UL, 0x027027ecUL, 0xbb48f071UL, 0xde2f4cc9UL,
-    0x3080f9dbUL, 0x55e74563UL, 0x9ca03f6bUL, 0xf9c783d3UL, 0x176836c1UL,
-    0x720f8a79UL, 0xcb375de4UL, 0xae50e15cUL, 0x40ff544eUL, 0x2598e8f6UL,
-    0x73888baeUL, 0x16ef3716UL, 0xf8408204UL, 0x9d273ebcUL, 0x241fe921UL,
-    0x41785599UL, 0xafd7e08bUL, 0xcab05c33UL, 0x3bb659edUL, 0x5ed1e555UL,
-    0xb07e5047UL, 0xd519ecffUL, 0x6c213b62UL, 0x094687daUL, 0xe7e932c8UL,
-    0x828e8e70UL, 0xd49eed28UL, 0xb1f95190UL, 0x5f56e482UL, 0x3a31583aUL,
-    0x83098fa7UL, 0xe66e331fUL, 0x08c1860dUL, 0x6da63ab5UL, 0xa4e140bdUL,
-    0xc186fc05UL, 0x2f294917UL, 0x4a4ef5afUL, 0xf3762232UL, 0x96119e8aUL,
-    0x78be2b98UL, 0x1dd99720UL, 0x4bc9f478UL, 0x2eae48c0UL, 0xc001fdd2UL,
-    0xa566416aUL, 0x1c5e96f7UL, 0x79392a4fUL, 0x97969f5dUL, 0xf2f123e5UL,
-    0x05196b4dUL, 0x607ed7f5UL, 0x8ed162e7UL, 0xebb6de5fUL, 0x528e09c2UL,
-    0x37e9b57aUL, 0xd9460068UL, 0xbc21bcd0UL, 0xea31df88UL, 0x8f566330UL,
-    0x61f9d622UL, 0x049e6a9aUL, 0xbda6bd07UL, 0xd8c101bfUL, 0x366eb4adUL,
-    0x53090815UL, 0x9a4e721dUL, 0xff29cea5UL, 0x11867bb7UL, 0x74e1c70fUL,
-    0xcdd91092UL, 0xa8beac2aUL, 0x46111938UL, 0x2376a580UL, 0x7566c6d8UL,
-    0x10017a60UL, 0xfeaecf72UL, 0x9bc973caUL, 0x22f1a457UL, 0x479618efUL,
-    0xa939adfdUL, 0xcc5e1145UL, 0x06ee4d76UL, 0x6389f1ceUL, 0x8d2644dcUL,
-    0xe841f864UL, 0x51792ff9UL, 0x341e9341UL, 0xdab12653UL, 0xbfd69aebUL,
-    0xe9c6f9b3UL, 0x8ca1450bUL, 0x620ef019UL, 0x07694ca1UL, 0xbe519b3cUL,
-    0xdb362784UL, 0x35999296UL, 0x50fe2e2eUL, 0x99b95426UL, 0xfcdee89eUL,
-    0x12715d8cUL, 0x7716e134UL, 0xce2e36a9UL, 0xab498a11UL, 0x45e63f03UL,
-    0x208183bbUL, 0x7691e0e3UL, 0x13f65c5bUL, 0xfd59e949UL, 0x983e55f1UL,
-    0x2106826cUL, 0x44613ed4UL, 0xaace8bc6UL, 0xcfa9377eUL, 0x38417fd6UL,
-    0x5d26c36eUL, 0xb389767cUL, 0xd6eecac4UL, 0x6fd61d59UL, 0x0ab1a1e1UL,
-    0xe41e14f3UL, 0x8179a84bUL, 0xd769cb13UL, 0xb20e77abUL, 0x5ca1c2b9UL,
-    0x39c67e01UL, 0x80fea99cUL, 0xe5991524UL, 0x0b36a036UL, 0x6e511c8eUL,
-    0xa7166686UL, 0xc271da3eUL, 0x2cde6f2cUL, 0x49b9d394UL, 0xf0810409UL,
-    0x95e6b8b1UL, 0x7b490da3UL, 0x1e2eb11bUL, 0x483ed243UL, 0x2d596efbUL,
-    0xc3f6dbe9UL, 0xa6916751UL, 0x1fa9b0ccUL, 0x7ace0c74UL, 0x9461b966UL,
-    0xf10605deUL
-#endif
-  }
-};
diff --git a/src/extra/zlib/deflate.c b/src/extra/zlib/deflate.c
deleted file mode 100644
index 6969577..0000000
--- a/src/extra/zlib/deflate.c
+++ /dev/null
@@ -1,1967 +0,0 @@
-/* deflate.c -- compress data using the deflation algorithm
- * Copyright (C) 1995-2013 Jean-loup Gailly and Mark Adler
- * For conditions of distribution and use, see copyright notice in zlib.h
- */
-
-/*
- *  ALGORITHM
- *
- *      The "deflation" process depends on being able to identify portions
- *      of the input text which are identical to earlier input (within a
- *      sliding window trailing behind the input currently being processed).
- *
- *      The most straightforward technique turns out to be the fastest for
- *      most input files: try all possible matches and select the longest.
- *      The key feature of this algorithm is that insertions into the string
- *      dictionary are very simple and thus fast, and deletions are avoided
- *      completely. Insertions are performed at each input character, whereas
- *      string matches are performed only when the previous match ends. So it
- *      is preferable to spend more time in matches to allow very fast string
- *      insertions and avoid deletions. The matching algorithm for small
- *      strings is inspired from that of Rabin & Karp. A brute force approach
- *      is used to find longer strings when a small match has been found.
- *      A similar algorithm is used in comic (by Jan-Mark Wams) and freeze
- *      (by Leonid Broukhis).
- *         A previous version of this file used a more sophisticated algorithm
- *      (by Fiala and Greene) which is guaranteed to run in linear amortized
- *      time, but has a larger average cost, uses more memory and is patented.
- *      However the F&G algorithm may be faster for some highly redundant
- *      files if the parameter max_chain_length (described below) is too large.
- *
- *  ACKNOWLEDGEMENTS
- *
- *      The idea of lazy evaluation of matches is due to Jan-Mark Wams, and
- *      I found it in 'freeze' written by Leonid Broukhis.
- *      Thanks to many people for bug reports and testing.
- *
- *  REFERENCES
- *
- *      Deutsch, L.P.,"DEFLATE Compressed Data Format Specification".
- *      Available in http://tools.ietf.org/html/rfc1951
- *
- *      A description of the Rabin and Karp algorithm is given in the book
- *         "Algorithms" by R. Sedgewick, Addison-Wesley, p252.
- *
- *      Fiala,E.R., and Greene,D.H.
- *         Data Compression with Finite Windows, Comm.ACM, 32,4 (1989) 490-595
- *
- */
-
-/* @(#) $Id$ */
-
-#include "deflate.h"
-
-const char deflate_copyright[] =
-   " deflate 1.2.8 Copyright 1995-2013 Jean-loup Gailly and Mark Adler ";
-/*
-  If you use the zlib library in a product, an acknowledgment is welcome
-  in the documentation of your product. If for some reason you cannot
-  include such an acknowledgment, I would appreciate that you keep this
-  copyright string in the executable of your product.
- */
-
-/* ===========================================================================
- *  Function prototypes.
- */
-typedef enum {
-    need_more,      /* block not completed, need more input or more output */
-    block_done,     /* block flush performed */
-    finish_started, /* finish started, need only more output at next deflate */
-    finish_done     /* finish done, accept no more input or output */
-} block_state;
-
-typedef block_state (*compress_func) OF((deflate_state *s, int flush));
-/* Compression function. Returns the block state after the call. */
-
-local void fill_window    OF((deflate_state *s));
-local block_state deflate_stored OF((deflate_state *s, int flush));
-local block_state deflate_fast   OF((deflate_state *s, int flush));
-#ifndef FASTEST
-local block_state deflate_slow   OF((deflate_state *s, int flush));
-#endif
-local block_state deflate_rle    OF((deflate_state *s, int flush));
-local block_state deflate_huff   OF((deflate_state *s, int flush));
-local void lm_init        OF((deflate_state *s));
-local void putShortMSB    OF((deflate_state *s, uInt b));
-local void flush_pending  OF((z_streamp strm));
-local int read_buf        OF((z_streamp strm, Bytef *buf, unsigned size));
-#ifdef ASMV
-      void match_init OF((void)); /* asm code initialization */
-      uInt longest_match  OF((deflate_state *s, IPos cur_match));
-#else
-local uInt longest_match  OF((deflate_state *s, IPos cur_match));
-#endif
-
-#ifdef DEBUG
-local  void check_match OF((deflate_state *s, IPos start, IPos match,
-                            int length));
-#endif
-
-/* ===========================================================================
- * Local data
- */
-
-#define NIL 0
-/* Tail of hash chains */
-
-#ifndef TOO_FAR
-#  define TOO_FAR 4096
-#endif
-/* Matches of length 3 are discarded if their distance exceeds TOO_FAR */
-
-/* Values for max_lazy_match, good_match and max_chain_length, depending on
- * the desired pack level (0..9). The values given below have been tuned to
- * exclude worst case performance for pathological files. Better values may be
- * found for specific files.
- */
-typedef struct config_s {
-   ush good_length; /* reduce lazy search above this match length */
-   ush max_lazy;    /* do not perform lazy search above this match length */
-   ush nice_length; /* quit search above this match length */
-   ush max_chain;
-   compress_func func;
-} config;
-
-#ifdef FASTEST
-local const config configuration_table[2] = {
-/*      good lazy nice chain */
-/* 0 */ {0,    0,  0,    0, deflate_stored},  /* store only */
-/* 1 */ {4,    4,  8,    4, deflate_fast}}; /* max speed, no lazy matches */
-#else
-local const config configuration_table[10] = {
-/*      good lazy nice chain */
-/* 0 */ {0,    0,  0,    0, deflate_stored},  /* store only */
-/* 1 */ {4,    4,  8,    4, deflate_fast}, /* max speed, no lazy matches */
-/* 2 */ {4,    5, 16,    8, deflate_fast},
-/* 3 */ {4,    6, 32,   32, deflate_fast},
-
-/* 4 */ {4,    4, 16,   16, deflate_slow},  /* lazy matches */
-/* 5 */ {8,   16, 32,   32, deflate_slow},
-/* 6 */ {8,   16, 128, 128, deflate_slow},
-/* 7 */ {8,   32, 128, 256, deflate_slow},
-/* 8 */ {32, 128, 258, 1024, deflate_slow},
-/* 9 */ {32, 258, 258, 4096, deflate_slow}}; /* max compression */
-#endif
-
-/* Note: the deflate() code requires max_lazy >= MIN_MATCH and max_chain >= 4
- * For deflate_fast() (levels <= 3) good is ignored and lazy has a different
- * meaning.
- */
-
-#define EQUAL 0
-/* result of memcmp for equal strings */
-
-#ifndef NO_DUMMY_DECL
-struct static_tree_desc_s {int dummy;}; /* for buggy compilers */
-#endif
-
-/* rank Z_BLOCK between Z_NO_FLUSH and Z_PARTIAL_FLUSH */
-#define RANK(f) (((f) << 1) - ((f) > 4 ? 9 : 0))
-
-/* ===========================================================================
- * Update a hash value with the given input byte
- * IN  assertion: all calls to to UPDATE_HASH are made with consecutive
- *    input characters, so that a running hash key can be computed from the
- *    previous key instead of complete recalculation each time.
- */
-#define UPDATE_HASH(s,h,c) (h = (((h)<<s->hash_shift) ^ (c)) & s->hash_mask)
-
-
-/* ===========================================================================
- * Insert string str in the dictionary and set match_head to the previous head
- * of the hash chain (the most recent string with same hash key). Return
- * the previous length of the hash chain.
- * If this file is compiled with -DFASTEST, the compression level is forced
- * to 1, and no hash chains are maintained.
- * IN  assertion: all calls to to INSERT_STRING are made with consecutive
- *    input characters and the first MIN_MATCH bytes of str are valid
- *    (except for the last MIN_MATCH-1 bytes of the input file).
- */
-#ifdef FASTEST
-#define INSERT_STRING(s, str, match_head) \
-   (UPDATE_HASH(s, s->ins_h, s->window[(str) + (MIN_MATCH-1)]), \
-    match_head = s->head[s->ins_h], \
-    s->head[s->ins_h] = (Pos)(str))
-#else
-#define INSERT_STRING(s, str, match_head) \
-   (UPDATE_HASH(s, s->ins_h, s->window[(str) + (MIN_MATCH-1)]), \
-    match_head = s->prev[(str) & s->w_mask] = s->head[s->ins_h], \
-    s->head[s->ins_h] = (Pos)(str))
-#endif
-
-/* ===========================================================================
- * Initialize the hash table (avoiding 64K overflow for 16 bit systems).
- * prev[] will be initialized on the fly.
- */
-#define CLEAR_HASH(s) \
-    s->head[s->hash_size-1] = NIL; \
-    zmemzero((Bytef *)s->head, (unsigned)(s->hash_size-1)*sizeof(*s->head));
-
-/* ========================================================================= */
-int ZEXPORT deflateInit_(strm, level, version, stream_size)
-    z_streamp strm;
-    int level;
-    const char *version;
-    int stream_size;
-{
-    return deflateInit2_(strm, level, Z_DEFLATED, MAX_WBITS, DEF_MEM_LEVEL,
-                         Z_DEFAULT_STRATEGY, version, stream_size);
-    /* To do: ignore strm->next_in if we use it as window */
-}
-
-/* ========================================================================= */
-int ZEXPORT deflateInit2_(strm, level, method, windowBits, memLevel, strategy,
-                  version, stream_size)
-    z_streamp strm;
-    int  level;
-    int  method;
-    int  windowBits;
-    int  memLevel;
-    int  strategy;
-    const char *version;
-    int stream_size;
-{
-    deflate_state *s;
-    int wrap = 1;
-    static const char my_version[] = ZLIB_VERSION;
-
-    ushf *overlay;
-    /* We overlay pending_buf and d_buf+l_buf. This works since the average
-     * output size for (length,distance) codes is <= 24 bits.
-     */
-
-    if (version == Z_NULL || version[0] != my_version[0] ||
-        stream_size != sizeof(z_stream)) {
-        return Z_VERSION_ERROR;
-    }
-    if (strm == Z_NULL) return Z_STREAM_ERROR;
-
-    strm->msg = Z_NULL;
-    if (strm->zalloc == (alloc_func)0) {
-#ifdef Z_SOLO
-        return Z_STREAM_ERROR;
-#else
-        strm->zalloc = zcalloc;
-        strm->opaque = (voidpf)0;
-#endif
-    }
-    if (strm->zfree == (free_func)0)
-#ifdef Z_SOLO
-        return Z_STREAM_ERROR;
-#else
-        strm->zfree = zcfree;
-#endif
-
-#ifdef FASTEST
-    if (level != 0) level = 1;
-#else
-    if (level == Z_DEFAULT_COMPRESSION) level = 6;
-#endif
-
-    if (windowBits < 0) { /* suppress zlib wrapper */
-        wrap = 0;
-        windowBits = -windowBits;
-    }
-#ifdef GZIP
-    else if (windowBits > 15) {
-        wrap = 2;       /* write gzip wrapper instead */
-        windowBits -= 16;
-    }
-#endif
-    if (memLevel < 1 || memLevel > MAX_MEM_LEVEL || method != Z_DEFLATED ||
-        windowBits < 8 || windowBits > 15 || level < 0 || level > 9 ||
-        strategy < 0 || strategy > Z_FIXED) {
-        return Z_STREAM_ERROR;
-    }
-    if (windowBits == 8) windowBits = 9;  /* until 256-byte window bug fixed */
-    s = (deflate_state *) ZALLOC(strm, 1, sizeof(deflate_state));
-    if (s == Z_NULL) return Z_MEM_ERROR;
-    strm->state = (struct internal_state FAR *)s;
-    s->strm = strm;
-
-    s->wrap = wrap;
-    s->gzhead = Z_NULL;
-    s->w_bits = windowBits;
-    s->w_size = 1 << s->w_bits;
-    s->w_mask = s->w_size - 1;
-
-    s->hash_bits = memLevel + 7;
-    s->hash_size = 1 << s->hash_bits;
-    s->hash_mask = s->hash_size - 1;
-    s->hash_shift =  ((s->hash_bits+MIN_MATCH-1)/MIN_MATCH);
-
-    s->window = (Bytef *) ZALLOC(strm, s->w_size, 2*sizeof(Byte));
-    s->prev   = (Posf *)  ZALLOC(strm, s->w_size, sizeof(Pos));
-    s->head   = (Posf *)  ZALLOC(strm, s->hash_size, sizeof(Pos));
-
-    s->high_water = 0;      /* nothing written to s->window yet */
-
-    s->lit_bufsize = 1 << (memLevel + 6); /* 16K elements by default */
-
-    overlay = (ushf *) ZALLOC(strm, s->lit_bufsize, sizeof(ush)+2);
-    s->pending_buf = (uchf *) overlay;
-    s->pending_buf_size = (ulg)s->lit_bufsize * (sizeof(ush)+2L);
-
-    if (s->window == Z_NULL || s->prev == Z_NULL || s->head == Z_NULL ||
-        s->pending_buf == Z_NULL) {
-        s->status = FINISH_STATE;
-        strm->msg = ERR_MSG(Z_MEM_ERROR);
-        deflateEnd (strm);
-        return Z_MEM_ERROR;
-    }
-    s->d_buf = overlay + s->lit_bufsize/sizeof(ush);
-    s->l_buf = s->pending_buf + (1+sizeof(ush))*s->lit_bufsize;
-
-    s->level = level;
-    s->strategy = strategy;
-    s->method = (Byte)method;
-
-    return deflateReset(strm);
-}
-
-/* ========================================================================= */
-int ZEXPORT deflateSetDictionary (strm, dictionary, dictLength)
-    z_streamp strm;
-    const Bytef *dictionary;
-    uInt  dictLength;
-{
-    deflate_state *s;
-    uInt str, n;
-    int wrap;
-    unsigned avail;
-    z_const unsigned char *next;
-
-    if (strm == Z_NULL || strm->state == Z_NULL || dictionary == Z_NULL)
-        return Z_STREAM_ERROR;
-    s = strm->state;
-    wrap = s->wrap;
-    if (wrap == 2 || (wrap == 1 && s->status != INIT_STATE) || s->lookahead)
-        return Z_STREAM_ERROR;
-
-    /* when using zlib wrappers, compute Adler-32 for provided dictionary */
-    if (wrap == 1)
-        strm->adler = adler32(strm->adler, dictionary, dictLength);
-    s->wrap = 0;                    /* avoid computing Adler-32 in read_buf */
-
-    /* if dictionary would fill window, just replace the history */
-    if (dictLength >= s->w_size) {
-        if (wrap == 0) {            /* already empty otherwise */
-            CLEAR_HASH(s);
-            s->strstart = 0;
-            s->block_start = 0L;
-            s->insert = 0;
-        }
-        dictionary += dictLength - s->w_size;  /* use the tail */
-        dictLength = s->w_size;
-    }
-
-    /* insert dictionary into window and hash */
-    avail = strm->avail_in;
-    next = strm->next_in;
-    strm->avail_in = dictLength;
-    strm->next_in = (z_const Bytef *)dictionary;
-    fill_window(s);
-    while (s->lookahead >= MIN_MATCH) {
-        str = s->strstart;
-        n = s->lookahead - (MIN_MATCH-1);
-        do {
-            UPDATE_HASH(s, s->ins_h, s->window[str + MIN_MATCH-1]);
-#ifndef FASTEST
-            s->prev[str & s->w_mask] = s->head[s->ins_h];
-#endif
-            s->head[s->ins_h] = (Pos)str;
-            str++;
-        } while (--n);
-        s->strstart = str;
-        s->lookahead = MIN_MATCH-1;
-        fill_window(s);
-    }
-    s->strstart += s->lookahead;
-    s->block_start = (long)s->strstart;
-    s->insert = s->lookahead;
-    s->lookahead = 0;
-    s->match_length = s->prev_length = MIN_MATCH-1;
-    s->match_available = 0;
-    strm->next_in = next;
-    strm->avail_in = avail;
-    s->wrap = wrap;
-    return Z_OK;
-}
-
-/* ========================================================================= */
-int ZEXPORT deflateResetKeep (strm)
-    z_streamp strm;
-{
-    deflate_state *s;
-
-    if (strm == Z_NULL || strm->state == Z_NULL ||
-        strm->zalloc == (alloc_func)0 || strm->zfree == (free_func)0) {
-        return Z_STREAM_ERROR;
-    }
-
-    strm->total_in = strm->total_out = 0;
-    strm->msg = Z_NULL; /* use zfree if we ever allocate msg dynamically */
-    strm->data_type = Z_UNKNOWN;
-
-    s = (deflate_state *)strm->state;
-    s->pending = 0;
-    s->pending_out = s->pending_buf;
-
-    if (s->wrap < 0) {
-        s->wrap = -s->wrap; /* was made negative by deflate(..., Z_FINISH); */
-    }
-    s->status = s->wrap ? INIT_STATE : BUSY_STATE;
-    strm->adler =
-#ifdef GZIP
-        s->wrap == 2 ? crc32(0L, Z_NULL, 0) :
-#endif
-        adler32(0L, Z_NULL, 0);
-    s->last_flush = Z_NO_FLUSH;
-
-    _tr_init(s);
-
-    return Z_OK;
-}
-
-/* ========================================================================= */
-int ZEXPORT deflateReset (strm)
-    z_streamp strm;
-{
-    int ret;
-
-    ret = deflateResetKeep(strm);
-    if (ret == Z_OK)
-        lm_init(strm->state);
-    return ret;
-}
-
-/* ========================================================================= */
-int ZEXPORT deflateSetHeader (strm, head)
-    z_streamp strm;
-    gz_headerp head;
-{
-    if (strm == Z_NULL || strm->state == Z_NULL) return Z_STREAM_ERROR;
-    if (strm->state->wrap != 2) return Z_STREAM_ERROR;
-    strm->state->gzhead = head;
-    return Z_OK;
-}
-
-/* ========================================================================= */
-int ZEXPORT deflatePending (strm, pending, bits)
-    unsigned *pending;
-    int *bits;
-    z_streamp strm;
-{
-    if (strm == Z_NULL || strm->state == Z_NULL) return Z_STREAM_ERROR;
-    if (pending != Z_NULL)
-        *pending = strm->state->pending;
-    if (bits != Z_NULL)
-        *bits = strm->state->bi_valid;
-    return Z_OK;
-}
-
-/* ========================================================================= */
-int ZEXPORT deflatePrime (strm, bits, value)
-    z_streamp strm;
-    int bits;
-    int value;
-{
-    deflate_state *s;
-    int put;
-
-    if (strm == Z_NULL || strm->state == Z_NULL) return Z_STREAM_ERROR;
-    s = strm->state;
-    if ((Bytef *)(s->d_buf) < s->pending_out + ((Buf_size + 7) >> 3))
-        return Z_BUF_ERROR;
-    do {
-        put = Buf_size - s->bi_valid;
-        if (put > bits)
-            put = bits;
-        s->bi_buf |= (ush)((value & ((1 << put) - 1)) << s->bi_valid);
-        s->bi_valid += put;
-        _tr_flush_bits(s);
-        value >>= put;
-        bits -= put;
-    } while (bits);
-    return Z_OK;
-}
-
-/* ========================================================================= */
-int ZEXPORT deflateParams(strm, level, strategy)
-    z_streamp strm;
-    int level;
-    int strategy;
-{
-    deflate_state *s;
-    compress_func func;
-    int err = Z_OK;
-
-    if (strm == Z_NULL || strm->state == Z_NULL) return Z_STREAM_ERROR;
-    s = strm->state;
-
-#ifdef FASTEST
-    if (level != 0) level = 1;
-#else
-    if (level == Z_DEFAULT_COMPRESSION) level = 6;
-#endif
-    if (level < 0 || level > 9 || strategy < 0 || strategy > Z_FIXED) {
-        return Z_STREAM_ERROR;
-    }
-    func = configuration_table[s->level].func;
-
-    if ((strategy != s->strategy || func != configuration_table[level].func) &&
-        strm->total_in != 0) {
-        /* Flush the last buffer: */
-        err = deflate(strm, Z_BLOCK);
-        if (err == Z_BUF_ERROR && s->pending == 0)
-            err = Z_OK;
-    }
-    if (s->level != level) {
-        s->level = level;
-        s->max_lazy_match   = configuration_table[level].max_lazy;
-        s->good_match       = configuration_table[level].good_length;
-        s->nice_match       = configuration_table[level].nice_length;
-        s->max_chain_length = configuration_table[level].max_chain;
-    }
-    s->strategy = strategy;
-    return err;
-}
-
-/* ========================================================================= */
-int ZEXPORT deflateTune(strm, good_length, max_lazy, nice_length, max_chain)
-    z_streamp strm;
-    int good_length;
-    int max_lazy;
-    int nice_length;
-    int max_chain;
-{
-    deflate_state *s;
-
-    if (strm == Z_NULL || strm->state == Z_NULL) return Z_STREAM_ERROR;
-    s = strm->state;
-    s->good_match = good_length;
-    s->max_lazy_match = max_lazy;
-    s->nice_match = nice_length;
-    s->max_chain_length = max_chain;
-    return Z_OK;
-}
-
-/* =========================================================================
- * For the default windowBits of 15 and memLevel of 8, this function returns
- * a close to exact, as well as small, upper bound on the compressed size.
- * They are coded as constants here for a reason--if the #define's are
- * changed, then this function needs to be changed as well.  The return
- * value for 15 and 8 only works for those exact settings.
- *
- * For any setting other than those defaults for windowBits and memLevel,
- * the value returned is a conservative worst case for the maximum expansion
- * resulting from using fixed blocks instead of stored blocks, which deflate
- * can emit on compressed data for some combinations of the parameters.
- *
- * This function could be more sophisticated to provide closer upper bounds for
- * every combination of windowBits and memLevel.  But even the conservative
- * upper bound of about 14% expansion does not seem onerous for output buffer
- * allocation.
- */
-uLong ZEXPORT deflateBound(strm, sourceLen)
-    z_streamp strm;
-    uLong sourceLen;
-{
-    deflate_state *s;
-    uLong complen, wraplen;
-    Bytef *str;
-
-    /* conservative upper bound for compressed data */
-    complen = sourceLen +
-              ((sourceLen + 7) >> 3) + ((sourceLen + 63) >> 6) + 5;
-
-    /* if can't get parameters, return conservative bound plus zlib wrapper */
-    if (strm == Z_NULL || strm->state == Z_NULL)
-        return complen + 6;
-
-    /* compute wrapper length */
-    s = strm->state;
-    switch (s->wrap) {
-    case 0:                                 /* raw deflate */
-        wraplen = 0;
-        break;
-    case 1:                                 /* zlib wrapper */
-        wraplen = 6 + (s->strstart ? 4 : 0);
-        break;
-    case 2:                                 /* gzip wrapper */
-        wraplen = 18;
-        if (s->gzhead != Z_NULL) {          /* user-supplied gzip header */
-            if (s->gzhead->extra != Z_NULL)
-                wraplen += 2 + s->gzhead->extra_len;
-            str = s->gzhead->name;
-            if (str != Z_NULL)
-                do {
-                    wraplen++;
-                } while (*str++);
-            str = s->gzhead->comment;
-            if (str != Z_NULL)
-                do {
-                    wraplen++;
-                } while (*str++);
-            if (s->gzhead->hcrc)
-                wraplen += 2;
-        }
-        break;
-    default:                                /* for compiler happiness */
-        wraplen = 6;
-    }
-
-    /* if not default parameters, return conservative bound */
-    if (s->w_bits != 15 || s->hash_bits != 8 + 7)
-        return complen + wraplen;
-
-    /* default settings: return tight bound for that case */
-    return sourceLen + (sourceLen >> 12) + (sourceLen >> 14) +
-           (sourceLen >> 25) + 13 - 6 + wraplen;
-}
-
-/* =========================================================================
- * Put a short in the pending buffer. The 16-bit value is put in MSB order.
- * IN assertion: the stream state is correct and there is enough room in
- * pending_buf.
- */
-local void putShortMSB (s, b)
-    deflate_state *s;
-    uInt b;
-{
-    put_byte(s, (Byte)(b >> 8));
-    put_byte(s, (Byte)(b & 0xff));
-}
-
-/* =========================================================================
- * Flush as much pending output as possible. All deflate() output goes
- * through this function so some applications may wish to modify it
- * to avoid allocating a large strm->next_out buffer and copying into it.
- * (See also read_buf()).
- */
-local void flush_pending(strm)
-    z_streamp strm;
-{
-    unsigned len;
-    deflate_state *s = strm->state;
-
-    _tr_flush_bits(s);
-    len = s->pending;
-    if (len > strm->avail_out) len = strm->avail_out;
-    if (len == 0) return;
-
-    zmemcpy(strm->next_out, s->pending_out, len);
-    strm->next_out  += len;
-    s->pending_out  += len;
-    strm->total_out += len;
-    strm->avail_out  -= len;
-    s->pending -= len;
-    if (s->pending == 0) {
-        s->pending_out = s->pending_buf;
-    }
-}
-
-/* ========================================================================= */
-int ZEXPORT deflate (strm, flush)
-    z_streamp strm;
-    int flush;
-{
-    int old_flush; /* value of flush param for previous deflate call */
-    deflate_state *s;
-
-    if (strm == Z_NULL || strm->state == Z_NULL ||
-        flush > Z_BLOCK || flush < 0) {
-        return Z_STREAM_ERROR;
-    }
-    s = strm->state;
-
-    if (strm->next_out == Z_NULL ||
-        (strm->next_in == Z_NULL && strm->avail_in != 0) ||
-        (s->status == FINISH_STATE && flush != Z_FINISH)) {
-        ERR_RETURN(strm, Z_STREAM_ERROR);
-    }
-    if (strm->avail_out == 0) ERR_RETURN(strm, Z_BUF_ERROR);
-
-    s->strm = strm; /* just in case */
-    old_flush = s->last_flush;
-    s->last_flush = flush;
-
-    /* Write the header */
-    if (s->status == INIT_STATE) {
-#ifdef GZIP
-        if (s->wrap == 2) {
-            strm->adler = crc32(0L, Z_NULL, 0);
-            put_byte(s, 31);
-            put_byte(s, 139);
-            put_byte(s, 8);
-            if (s->gzhead == Z_NULL) {
-                put_byte(s, 0);
-                put_byte(s, 0);
-                put_byte(s, 0);
-                put_byte(s, 0);
-                put_byte(s, 0);
-                put_byte(s, s->level == 9 ? 2 :
-                            (s->strategy >= Z_HUFFMAN_ONLY || s->level < 2 ?
-                             4 : 0));
-                put_byte(s, OS_CODE);
-                s->status = BUSY_STATE;
-            }
-            else {
-                put_byte(s, (s->gzhead->text ? 1 : 0) +
-                            (s->gzhead->hcrc ? 2 : 0) +
-                            (s->gzhead->extra == Z_NULL ? 0 : 4) +
-                            (s->gzhead->name == Z_NULL ? 0 : 8) +
-                            (s->gzhead->comment == Z_NULL ? 0 : 16)
-                        );
-                put_byte(s, (Byte)(s->gzhead->time & 0xff));
-                put_byte(s, (Byte)((s->gzhead->time >> 8) & 0xff));
-                put_byte(s, (Byte)((s->gzhead->time >> 16) & 0xff));
-                put_byte(s, (Byte)((s->gzhead->time >> 24) & 0xff));
-                put_byte(s, s->level == 9 ? 2 :
-                            (s->strategy >= Z_HUFFMAN_ONLY || s->level < 2 ?
-                             4 : 0));
-                put_byte(s, s->gzhead->os & 0xff);
-                if (s->gzhead->extra != Z_NULL) {
-                    put_byte(s, s->gzhead->extra_len & 0xff);
-                    put_byte(s, (s->gzhead->extra_len >> 8) & 0xff);
-                }
-                if (s->gzhead->hcrc)
-                    strm->adler = crc32(strm->adler, s->pending_buf,
-                                        s->pending);
-                s->gzindex = 0;
-                s->status = EXTRA_STATE;
-            }
-        }
-        else
-#endif
-        {
-            uInt header = (Z_DEFLATED + ((s->w_bits-8)<<4)) << 8;
-            uInt level_flags;
-
-            if (s->strategy >= Z_HUFFMAN_ONLY || s->level < 2)
-                level_flags = 0;
-            else if (s->level < 6)
-                level_flags = 1;
-            else if (s->level == 6)
-                level_flags = 2;
-            else
-                level_flags = 3;
-            header |= (level_flags << 6);
-            if (s->strstart != 0) header |= PRESET_DICT;
-            header += 31 - (header % 31);
-
-            s->status = BUSY_STATE;
-            putShortMSB(s, header);
-
-            /* Save the adler32 of the preset dictionary: */
-            if (s->strstart != 0) {
-                putShortMSB(s, (uInt)(strm->adler >> 16));
-                putShortMSB(s, (uInt)(strm->adler & 0xffff));
-            }
-            strm->adler = adler32(0L, Z_NULL, 0);
-        }
-    }
-#ifdef GZIP
-    if (s->status == EXTRA_STATE) {
-        if (s->gzhead->extra != Z_NULL) {
-            uInt beg = s->pending;  /* start of bytes to update crc */
-
-            while (s->gzindex < (s->gzhead->extra_len & 0xffff)) {
-                if (s->pending == s->pending_buf_size) {
-                    if (s->gzhead->hcrc && s->pending > beg)
-                        strm->adler = crc32(strm->adler, s->pending_buf + beg,
-                                            s->pending - beg);
-                    flush_pending(strm);
-                    beg = s->pending;
-                    if (s->pending == s->pending_buf_size)
-                        break;
-                }
-                put_byte(s, s->gzhead->extra[s->gzindex]);
-                s->gzindex++;
-            }
-            if (s->gzhead->hcrc && s->pending > beg)
-                strm->adler = crc32(strm->adler, s->pending_buf + beg,
-                                    s->pending - beg);
-            if (s->gzindex == s->gzhead->extra_len) {
-                s->gzindex = 0;
-                s->status = NAME_STATE;
-            }
-        }
-        else
-            s->status = NAME_STATE;
-    }
-    if (s->status == NAME_STATE) {
-        if (s->gzhead->name != Z_NULL) {
-            uInt beg = s->pending;  /* start of bytes to update crc */
-            int val;
-
-            do {
-                if (s->pending == s->pending_buf_size) {
-                    if (s->gzhead->hcrc && s->pending > beg)
-                        strm->adler = crc32(strm->adler, s->pending_buf + beg,
-                                            s->pending - beg);
-                    flush_pending(strm);
-                    beg = s->pending;
-                    if (s->pending == s->pending_buf_size) {
-                        val = 1;
-                        break;
-                    }
-                }
-                val = s->gzhead->name[s->gzindex++];
-                put_byte(s, val);
-            } while (val != 0);
-            if (s->gzhead->hcrc && s->pending > beg)
-                strm->adler = crc32(strm->adler, s->pending_buf + beg,
-                                    s->pending - beg);
-            if (val == 0) {
-                s->gzindex = 0;
-                s->status = COMMENT_STATE;
-            }
-        }
-        else
-            s->status = COMMENT_STATE;
-    }
-    if (s->status == COMMENT_STATE) {
-        if (s->gzhead->comment != Z_NULL) {
-            uInt beg = s->pending;  /* start of bytes to update crc */
-            int val;
-
-            do {
-                if (s->pending == s->pending_buf_size) {
-                    if (s->gzhead->hcrc && s->pending > beg)
-                        strm->adler = crc32(strm->adler, s->pending_buf + beg,
-                                            s->pending - beg);
-                    flush_pending(strm);
-                    beg = s->pending;
-                    if (s->pending == s->pending_buf_size) {
-                        val = 1;
-                        break;
-                    }
-                }
-                val = s->gzhead->comment[s->gzindex++];
-                put_byte(s, val);
-            } while (val != 0);
-            if (s->gzhead->hcrc && s->pending > beg)
-                strm->adler = crc32(strm->adler, s->pending_buf + beg,
-                                    s->pending - beg);
-            if (val == 0)
-                s->status = HCRC_STATE;
-        }
-        else
-            s->status = HCRC_STATE;
-    }
-    if (s->status == HCRC_STATE) {
-        if (s->gzhead->hcrc) {
-            if (s->pending + 2 > s->pending_buf_size)
-                flush_pending(strm);
-            if (s->pending + 2 <= s->pending_buf_size) {
-                put_byte(s, (Byte)(strm->adler & 0xff));
-                put_byte(s, (Byte)((strm->adler >> 8) & 0xff));
-                strm->adler = crc32(0L, Z_NULL, 0);
-                s->status = BUSY_STATE;
-            }
-        }
-        else
-            s->status = BUSY_STATE;
-    }
-#endif
-
-    /* Flush as much pending output as possible */
-    if (s->pending != 0) {
-        flush_pending(strm);
-        if (strm->avail_out == 0) {
-            /* Since avail_out is 0, deflate will be called again with
-             * more output space, but possibly with both pending and
-             * avail_in equal to zero. There won't be anything to do,
-             * but this is not an error situation so make sure we
-             * return OK instead of BUF_ERROR at next call of deflate:
-             */
-            s->last_flush = -1;
-            return Z_OK;
-        }
-
-    /* Make sure there is something to do and avoid duplicate consecutive
-     * flushes. For repeated and useless calls with Z_FINISH, we keep
-     * returning Z_STREAM_END instead of Z_BUF_ERROR.
-     */
-    } else if (strm->avail_in == 0 && RANK(flush) <= RANK(old_flush) &&
-               flush != Z_FINISH) {
-        ERR_RETURN(strm, Z_BUF_ERROR);
-    }
-
-    /* User must not provide more input after the first FINISH: */
-    if (s->status == FINISH_STATE && strm->avail_in != 0) {
-        ERR_RETURN(strm, Z_BUF_ERROR);
-    }
-
-    /* Start a new block or continue the current one.
-     */
-    if (strm->avail_in != 0 || s->lookahead != 0 ||
-        (flush != Z_NO_FLUSH && s->status != FINISH_STATE)) {
-        block_state bstate;
-
-        bstate = s->strategy == Z_HUFFMAN_ONLY ? deflate_huff(s, flush) :
-                    (s->strategy == Z_RLE ? deflate_rle(s, flush) :
-                        (*(configuration_table[s->level].func))(s, flush));
-
-        if (bstate == finish_started || bstate == finish_done) {
-            s->status = FINISH_STATE;
-        }
-        if (bstate == need_more || bstate == finish_started) {
-            if (strm->avail_out == 0) {
-                s->last_flush = -1; /* avoid BUF_ERROR next call, see above */
-            }
-            return Z_OK;
-            /* If flush != Z_NO_FLUSH && avail_out == 0, the next call
-             * of deflate should use the same flush parameter to make sure
-             * that the flush is complete. So we don't have to output an
-             * empty block here, this will be done at next call. This also
-             * ensures that for a very small output buffer, we emit at most
-             * one empty block.
-             */
-        }
-        if (bstate == block_done) {
-            if (flush == Z_PARTIAL_FLUSH) {
-                _tr_align(s);
-            } else if (flush != Z_BLOCK) { /* FULL_FLUSH or SYNC_FLUSH */
-                _tr_stored_block(s, (char*)0, 0L, 0);
-                /* For a full flush, this empty block will be recognized
-                 * as a special marker by inflate_sync().
-                 */
-                if (flush == Z_FULL_FLUSH) {
-                    CLEAR_HASH(s);             /* forget history */
-                    if (s->lookahead == 0) {
-                        s->strstart = 0;
-                        s->block_start = 0L;
-                        s->insert = 0;
-                    }
-                }
-            }
-            flush_pending(strm);
-            if (strm->avail_out == 0) {
-              s->last_flush = -1; /* avoid BUF_ERROR at next call, see above */
-              return Z_OK;
-            }
-        }
-    }
-    Assert(strm->avail_out > 0, "bug2");
-
-    if (flush != Z_FINISH) return Z_OK;
-    if (s->wrap <= 0) return Z_STREAM_END;
-
-    /* Write the trailer */
-#ifdef GZIP
-    if (s->wrap == 2) {
-        put_byte(s, (Byte)(strm->adler & 0xff));
-        put_byte(s, (Byte)((strm->adler >> 8) & 0xff));
-        put_byte(s, (Byte)((strm->adler >> 16) & 0xff));
-        put_byte(s, (Byte)((strm->adler >> 24) & 0xff));
-        put_byte(s, (Byte)(strm->total_in & 0xff));
-        put_byte(s, (Byte)((strm->total_in >> 8) & 0xff));
-        put_byte(s, (Byte)((strm->total_in >> 16) & 0xff));
-        put_byte(s, (Byte)((strm->total_in >> 24) & 0xff));
-    }
-    else
-#endif
-    {
-        putShortMSB(s, (uInt)(strm->adler >> 16));
-        putShortMSB(s, (uInt)(strm->adler & 0xffff));
-    }
-    flush_pending(strm);
-    /* If avail_out is zero, the application will call deflate again
-     * to flush the rest.
-     */
-    if (s->wrap > 0) s->wrap = -s->wrap; /* write the trailer only once! */
-    return s->pending != 0 ? Z_OK : Z_STREAM_END;
-}
-
-/* ========================================================================= */
-int ZEXPORT deflateEnd (strm)
-    z_streamp strm;
-{
-    int status;
-
-    if (strm == Z_NULL || strm->state == Z_NULL) return Z_STREAM_ERROR;
-
-    status = strm->state->status;
-    if (status != INIT_STATE &&
-        status != EXTRA_STATE &&
-        status != NAME_STATE &&
-        status != COMMENT_STATE &&
-        status != HCRC_STATE &&
-        status != BUSY_STATE &&
-        status != FINISH_STATE) {
-      return Z_STREAM_ERROR;
-    }
-
-    /* Deallocate in reverse order of allocations: */
-    TRY_FREE(strm, strm->state->pending_buf);
-    TRY_FREE(strm, strm->state->head);
-    TRY_FREE(strm, strm->state->prev);
-    TRY_FREE(strm, strm->state->window);
-
-    ZFREE(strm, strm->state);
-    strm->state = Z_NULL;
-
-    return status == BUSY_STATE ? Z_DATA_ERROR : Z_OK;
-}
-
-/* =========================================================================
- * Copy the source state to the destination state.
- * To simplify the source, this is not supported for 16-bit MSDOS (which
- * doesn't have enough memory anyway to duplicate compression states).
- */
-int ZEXPORT deflateCopy (dest, source)
-    z_streamp dest;
-    z_streamp source;
-{
-#ifdef MAXSEG_64K
-    return Z_STREAM_ERROR;
-#else
-    deflate_state *ds;
-    deflate_state *ss;
-    ushf *overlay;
-
-
-    if (source == Z_NULL || dest == Z_NULL || source->state == Z_NULL) {
-        return Z_STREAM_ERROR;
-    }
-
-    ss = source->state;
-
-    zmemcpy((voidpf)dest, (voidpf)source, sizeof(z_stream));
-
-    ds = (deflate_state *) ZALLOC(dest, 1, sizeof(deflate_state));
-    if (ds == Z_NULL) return Z_MEM_ERROR;
-    dest->state = (struct internal_state FAR *) ds;
-    zmemcpy((voidpf)ds, (voidpf)ss, sizeof(deflate_state));
-    ds->strm = dest;
-
-    ds->window = (Bytef *) ZALLOC(dest, ds->w_size, 2*sizeof(Byte));
-    ds->prev   = (Posf *)  ZALLOC(dest, ds->w_size, sizeof(Pos));
-    ds->head   = (Posf *)  ZALLOC(dest, ds->hash_size, sizeof(Pos));
-    overlay = (ushf *) ZALLOC(dest, ds->lit_bufsize, sizeof(ush)+2);
-    ds->pending_buf = (uchf *) overlay;
-
-    if (ds->window == Z_NULL || ds->prev == Z_NULL || ds->head == Z_NULL ||
-        ds->pending_buf == Z_NULL) {
-        deflateEnd (dest);
-        return Z_MEM_ERROR;
-    }
-    /* following zmemcpy do not work for 16-bit MSDOS */
-    zmemcpy(ds->window, ss->window, ds->w_size * 2 * sizeof(Byte));
-    zmemcpy((voidpf)ds->prev, (voidpf)ss->prev, ds->w_size * sizeof(Pos));
-    zmemcpy((voidpf)ds->head, (voidpf)ss->head, ds->hash_size * sizeof(Pos));
-    zmemcpy(ds->pending_buf, ss->pending_buf, (uInt)ds->pending_buf_size);
-
-    ds->pending_out = ds->pending_buf + (ss->pending_out - ss->pending_buf);
-    ds->d_buf = overlay + ds->lit_bufsize/sizeof(ush);
-    ds->l_buf = ds->pending_buf + (1+sizeof(ush))*ds->lit_bufsize;
-
-    ds->l_desc.dyn_tree = ds->dyn_ltree;
-    ds->d_desc.dyn_tree = ds->dyn_dtree;
-    ds->bl_desc.dyn_tree = ds->bl_tree;
-
-    return Z_OK;
-#endif /* MAXSEG_64K */
-}
-
-/* ===========================================================================
- * Read a new buffer from the current input stream, update the adler32
- * and total number of bytes read.  All deflate() input goes through
- * this function so some applications may wish to modify it to avoid
- * allocating a large strm->next_in buffer and copying from it.
- * (See also flush_pending()).
- */
-local int read_buf(strm, buf, size)
-    z_streamp strm;
-    Bytef *buf;
-    unsigned size;
-{
-    unsigned len = strm->avail_in;
-
-    if (len > size) len = size;
-    if (len == 0) return 0;
-
-    strm->avail_in  -= len;
-
-    zmemcpy(buf, strm->next_in, len);
-    if (strm->state->wrap == 1) {
-        strm->adler = adler32(strm->adler, buf, len);
-    }
-#ifdef GZIP
-    else if (strm->state->wrap == 2) {
-        strm->adler = crc32(strm->adler, buf, len);
-    }
-#endif
-    strm->next_in  += len;
-    strm->total_in += len;
-
-    return (int)len;
-}
-
-/* ===========================================================================
- * Initialize the "longest match" routines for a new zlib stream
- */
-local void lm_init (s)
-    deflate_state *s;
-{
-    s->window_size = (ulg)2L*s->w_size;
-
-    CLEAR_HASH(s);
-
-    /* Set the default configuration parameters:
-     */
-    s->max_lazy_match   = configuration_table[s->level].max_lazy;
-    s->good_match       = configuration_table[s->level].good_length;
-    s->nice_match       = configuration_table[s->level].nice_length;
-    s->max_chain_length = configuration_table[s->level].max_chain;
-
-    s->strstart = 0;
-    s->block_start = 0L;
-    s->lookahead = 0;
-    s->insert = 0;
-    s->match_length = s->prev_length = MIN_MATCH-1;
-    s->match_available = 0;
-    s->ins_h = 0;
-#ifndef FASTEST
-#ifdef ASMV
-    match_init(); /* initialize the asm code */
-#endif
-#endif
-}
-
-#ifndef FASTEST
-/* ===========================================================================
- * Set match_start to the longest match starting at the given string and
- * return its length. Matches shorter or equal to prev_length are discarded,
- * in which case the result is equal to prev_length and match_start is
- * garbage.
- * IN assertions: cur_match is the head of the hash chain for the current
- *   string (strstart) and its distance is <= MAX_DIST, and prev_length >= 1
- * OUT assertion: the match length is not greater than s->lookahead.
- */
-#ifndef ASMV
-/* For 80x86 and 680x0, an optimized version will be provided in match.asm or
- * match.S. The code will be functionally equivalent.
- */
-local uInt longest_match(s, cur_match)
-    deflate_state *s;
-    IPos cur_match;                             /* current match */
-{
-    unsigned chain_length = s->max_chain_length;/* max hash chain length */
-    register Bytef *scan = s->window + s->strstart; /* current string */
-    register Bytef *match;                       /* matched string */
-    register int len;                           /* length of current match */
-    int best_len = s->prev_length;              /* best match length so far */
-    int nice_match = s->nice_match;             /* stop if match long enough */
-    IPos limit = s->strstart > (IPos)MAX_DIST(s) ?
-        s->strstart - (IPos)MAX_DIST(s) : NIL;
-    /* Stop when cur_match becomes <= limit. To simplify the code,
-     * we prevent matches with the string of window index 0.
-     */
-    Posf *prev = s->prev;
-    uInt wmask = s->w_mask;
-
-#ifdef UNALIGNED_OK
-    /* Compare two bytes at a time. Note: this is not always beneficial.
-     * Try with and without -DUNALIGNED_OK to check.
-     */
-    register Bytef *strend = s->window + s->strstart + MAX_MATCH - 1;
-    register ush scan_start = *(ushf*)scan;
-    register ush scan_end   = *(ushf*)(scan+best_len-1);
-#else
-    register Bytef *strend = s->window + s->strstart + MAX_MATCH;
-    register Byte scan_end1  = scan[best_len-1];
-    register Byte scan_end   = scan[best_len];
-#endif
-
-    /* The code is optimized for HASH_BITS >= 8 and MAX_MATCH-2 multiple of 16.
-     * It is easy to get rid of this optimization if necessary.
-     */
-    Assert(s->hash_bits >= 8 && MAX_MATCH == 258, "Code too clever");
-
-    /* Do not waste too much time if we already have a good match: */
-    if (s->prev_length >= s->good_match) {
-        chain_length >>= 2;
-    }
-    /* Do not look for matches beyond the end of the input. This is necessary
-     * to make deflate deterministic.
-     */
-    if ((uInt)nice_match > s->lookahead) nice_match = s->lookahead;
-
-    Assert((ulg)s->strstart <= s->window_size-MIN_LOOKAHEAD, "need lookahead");
-
-    do {
-        Assert(cur_match < s->strstart, "no future");
-        match = s->window + cur_match;
-
-        /* Skip to next match if the match length cannot increase
-         * or if the match length is less than 2.  Note that the checks below
-         * for insufficient lookahead only occur occasionally for performance
-         * reasons.  Therefore uninitialized memory will be accessed, and
-         * conditional jumps will be made that depend on those values.
-         * However the length of the match is limited to the lookahead, so
-         * the output of deflate is not affected by the uninitialized values.
-         */
-#if (defined(UNALIGNED_OK) && MAX_MATCH == 258)
-        /* This code assumes sizeof(unsigned short) == 2. Do not use
-         * UNALIGNED_OK if your compiler uses a different size.
-         */
-        if (*(ushf*)(match+best_len-1) != scan_end ||
-            *(ushf*)match != scan_start) continue;
-
-        /* It is not necessary to compare scan[2] and match[2] since they are
-         * always equal when the other bytes match, given that the hash keys
-         * are equal and that HASH_BITS >= 8. Compare 2 bytes at a time at
-         * strstart+3, +5, ... up to strstart+257. We check for insufficient
-         * lookahead only every 4th comparison; the 128th check will be made
-         * at strstart+257. If MAX_MATCH-2 is not a multiple of 8, it is
-         * necessary to put more guard bytes at the end of the window, or
-         * to check more often for insufficient lookahead.
-         */
-        Assert(scan[2] == match[2], "scan[2]?");
-        scan++, match++;
-        do {
-        } while (*(ushf*)(scan+=2) == *(ushf*)(match+=2) &&
-                 *(ushf*)(scan+=2) == *(ushf*)(match+=2) &&
-                 *(ushf*)(scan+=2) == *(ushf*)(match+=2) &&
-                 *(ushf*)(scan+=2) == *(ushf*)(match+=2) &&
-                 scan < strend);
-        /* The funny "do {}" generates better code on most compilers */
-
-        /* Here, scan <= window+strstart+257 */
-        Assert(scan <= s->window+(unsigned)(s->window_size-1), "wild scan");
-        if (*scan == *match) scan++;
-
-        len = (MAX_MATCH - 1) - (int)(strend-scan);
-        scan = strend - (MAX_MATCH-1);
-
-#else /* UNALIGNED_OK */
-
-        if (match[best_len]   != scan_end  ||
-            match[best_len-1] != scan_end1 ||
-            *match            != *scan     ||
-            *++match          != scan[1])      continue;
-
-        /* The check at best_len-1 can be removed because it will be made
-         * again later. (This heuristic is not always a win.)
-         * It is not necessary to compare scan[2] and match[2] since they
-         * are always equal when the other bytes match, given that
-         * the hash keys are equal and that HASH_BITS >= 8.
-         */
-        scan += 2, match++;
-        Assert(*scan == *match, "match[2]?");
-
-        /* We check for insufficient lookahead only every 8th comparison;
-         * the 256th check will be made at strstart+258.
-         */
-        do {
-        } while (*++scan == *++match && *++scan == *++match &&
-                 *++scan == *++match && *++scan == *++match &&
-                 *++scan == *++match && *++scan == *++match &&
-                 *++scan == *++match && *++scan == *++match &&
-                 scan < strend);
-
-        Assert(scan <= s->window+(unsigned)(s->window_size-1), "wild scan");
-
-        len = MAX_MATCH - (int)(strend - scan);
-        scan = strend - MAX_MATCH;
-
-#endif /* UNALIGNED_OK */
-
-        if (len > best_len) {
-            s->match_start = cur_match;
-            best_len = len;
-            if (len >= nice_match) break;
-#ifdef UNALIGNED_OK
-            scan_end = *(ushf*)(scan+best_len-1);
-#else
-            scan_end1  = scan[best_len-1];
-            scan_end   = scan[best_len];
-#endif
-        }
-    } while ((cur_match = prev[cur_match & wmask]) > limit
-             && --chain_length != 0);
-
-    if ((uInt)best_len <= s->lookahead) return (uInt)best_len;
-    return s->lookahead;
-}
-#endif /* ASMV */
-
-#else /* FASTEST */
-
-/* ---------------------------------------------------------------------------
- * Optimized version for FASTEST only
- */
-local uInt longest_match(s, cur_match)
-    deflate_state *s;
-    IPos cur_match;                             /* current match */
-{
-    register Bytef *scan = s->window + s->strstart; /* current string */
-    register Bytef *match;                       /* matched string */
-    register int len;                           /* length of current match */
-    register Bytef *strend = s->window + s->strstart + MAX_MATCH;
-
-    /* The code is optimized for HASH_BITS >= 8 and MAX_MATCH-2 multiple of 16.
-     * It is easy to get rid of this optimization if necessary.
-     */
-    Assert(s->hash_bits >= 8 && MAX_MATCH == 258, "Code too clever");
-
-    Assert((ulg)s->strstart <= s->window_size-MIN_LOOKAHEAD, "need lookahead");
-
-    Assert(cur_match < s->strstart, "no future");
-
-    match = s->window + cur_match;
-
-    /* Return failure if the match length is less than 2:
-     */
-    if (match[0] != scan[0] || match[1] != scan[1]) return MIN_MATCH-1;
-
-    /* The check at best_len-1 can be removed because it will be made
-     * again later. (This heuristic is not always a win.)
-     * It is not necessary to compare scan[2] and match[2] since they
-     * are always equal when the other bytes match, given that
-     * the hash keys are equal and that HASH_BITS >= 8.
-     */
-    scan += 2, match += 2;
-    Assert(*scan == *match, "match[2]?");
-
-    /* We check for insufficient lookahead only every 8th comparison;
-     * the 256th check will be made at strstart+258.
-     */
-    do {
-    } while (*++scan == *++match && *++scan == *++match &&
-             *++scan == *++match && *++scan == *++match &&
-             *++scan == *++match && *++scan == *++match &&
-             *++scan == *++match && *++scan == *++match &&
-             scan < strend);
-
-    Assert(scan <= s->window+(unsigned)(s->window_size-1), "wild scan");
-
-    len = MAX_MATCH - (int)(strend - scan);
-
-    if (len < MIN_MATCH) return MIN_MATCH - 1;
-
-    s->match_start = cur_match;
-    return (uInt)len <= s->lookahead ? (uInt)len : s->lookahead;
-}
-
-#endif /* FASTEST */
-
-#ifdef DEBUG
-/* ===========================================================================
- * Check that the match at match_start is indeed a match.
- */
-local void check_match(s, start, match, length)
-    deflate_state *s;
-    IPos start, match;
-    int length;
-{
-    /* check that the match is indeed a match */
-    if (zmemcmp(s->window + match,
-                s->window + start, length) != EQUAL) {
-        fprintf(stderr, " start %u, match %u, length %d\n",
-                start, match, length);
-        do {
-            fprintf(stderr, "%c%c", s->window[match++], s->window[start++]);
-        } while (--length != 0);
-        z_error("invalid match");
-    }
-    if (z_verbose > 1) {
-        fprintf(stderr,"\\[%d,%d]", start-match, length);
-        do { putc(s->window[start++], stderr); } while (--length != 0);
-    }
-}
-#else
-#  define check_match(s, start, match, length)
-#endif /* DEBUG */
-
-/* ===========================================================================
- * Fill the window when the lookahead becomes insufficient.
- * Updates strstart and lookahead.
- *
- * IN assertion: lookahead < MIN_LOOKAHEAD
- * OUT assertions: strstart <= window_size-MIN_LOOKAHEAD
- *    At least one byte has been read, or avail_in == 0; reads are
- *    performed for at least two bytes (required for the zip translate_eol
- *    option -- not supported here).
- */
-local void fill_window(s)
-    deflate_state *s;
-{
-    register unsigned n, m;
-    register Posf *p;
-    unsigned more;    /* Amount of free space at the end of the window. */
-    uInt wsize = s->w_size;
-
-    Assert(s->lookahead < MIN_LOOKAHEAD, "already enough lookahead");
-
-    do {
-        more = (unsigned)(s->window_size -(ulg)s->lookahead -(ulg)s->strstart);
-
-        /* Deal with !@#$% 64K limit: */
-        if (sizeof(int) <= 2) {
-            if (more == 0 && s->strstart == 0 && s->lookahead == 0) {
-                more = wsize;
-
-            } else if (more == (unsigned)(-1)) {
-                /* Very unlikely, but possible on 16 bit machine if
-                 * strstart == 0 && lookahead == 1 (input done a byte at time)
-                 */
-                more--;
-            }
-        }
-
-        /* If the window is almost full and there is insufficient lookahead,
-         * move the upper half to the lower one to make room in the upper half.
-         */
-        if (s->strstart >= wsize+MAX_DIST(s)) {
-
-            zmemcpy(s->window, s->window+wsize, (unsigned)wsize);
-            s->match_start -= wsize;
-            s->strstart    -= wsize; /* we now have strstart >= MAX_DIST */
-            s->block_start -= (long) wsize;
-
-            /* Slide the hash table (could be avoided with 32 bit values
-               at the expense of memory usage). We slide even when level == 0
-               to keep the hash table consistent if we switch back to level > 0
-               later. (Using level 0 permanently is not an optimal usage of
-               zlib, so we don't care about this pathological case.)
-             */
-            n = s->hash_size;
-            p = &s->head[n];
-            do {
-                m = *--p;
-                *p = (Pos)(m >= wsize ? m-wsize : NIL);
-            } while (--n);
-
-            n = wsize;
-#ifndef FASTEST
-            p = &s->prev[n];
-            do {
-                m = *--p;
-                *p = (Pos)(m >= wsize ? m-wsize : NIL);
-                /* If n is not on any hash chain, prev[n] is garbage but
-                 * its value will never be used.
-                 */
-            } while (--n);
-#endif
-            more += wsize;
-        }
-        if (s->strm->avail_in == 0) break;
-
-        /* If there was no sliding:
-         *    strstart <= WSIZE+MAX_DIST-1 && lookahead <= MIN_LOOKAHEAD - 1 &&
-         *    more == window_size - lookahead - strstart
-         * => more >= window_size - (MIN_LOOKAHEAD-1 + WSIZE + MAX_DIST-1)
-         * => more >= window_size - 2*WSIZE + 2
-         * In the BIG_MEM or MMAP case (not yet supported),
-         *   window_size == input_size + MIN_LOOKAHEAD  &&
-         *   strstart + s->lookahead <= input_size => more >= MIN_LOOKAHEAD.
-         * Otherwise, window_size == 2*WSIZE so more >= 2.
-         * If there was sliding, more >= WSIZE. So in all cases, more >= 2.
-         */
-        Assert(more >= 2, "more < 2");
-
-        n = read_buf(s->strm, s->window + s->strstart + s->lookahead, more);
-        s->lookahead += n;
-
-        /* Initialize the hash value now that we have some input: */
-        if (s->lookahead + s->insert >= MIN_MATCH) {
-            uInt str = s->strstart - s->insert;
-            s->ins_h = s->window[str];
-            UPDATE_HASH(s, s->ins_h, s->window[str + 1]);
-#if MIN_MATCH != 3
-            Call UPDATE_HASH() MIN_MATCH-3 more times
-#endif
-            while (s->insert) {
-                UPDATE_HASH(s, s->ins_h, s->window[str + MIN_MATCH-1]);
-#ifndef FASTEST
-                s->prev[str & s->w_mask] = s->head[s->ins_h];
-#endif
-                s->head[s->ins_h] = (Pos)str;
-                str++;
-                s->insert--;
-                if (s->lookahead + s->insert < MIN_MATCH)
-                    break;
-            }
-        }
-        /* If the whole input has less than MIN_MATCH bytes, ins_h is garbage,
-         * but this is not important since only literal bytes will be emitted.
-         */
-
-    } while (s->lookahead < MIN_LOOKAHEAD && s->strm->avail_in != 0);
-
-    /* If the WIN_INIT bytes after the end of the current data have never been
-     * written, then zero those bytes in order to avoid memory check reports of
-     * the use of uninitialized (or uninitialised as Julian writes) bytes by
-     * the longest match routines.  Update the high water mark for the next
-     * time through here.  WIN_INIT is set to MAX_MATCH since the longest match
-     * routines allow scanning to strstart + MAX_MATCH, ignoring lookahead.
-     */
-    if (s->high_water < s->window_size) {
-        ulg curr = s->strstart + (ulg)(s->lookahead);
-        ulg init;
-
-        if (s->high_water < curr) {
-            /* Previous high water mark below current data -- zero WIN_INIT
-             * bytes or up to end of window, whichever is less.
-             */
-            init = s->window_size - curr;
-            if (init > WIN_INIT)
-                init = WIN_INIT;
-            zmemzero(s->window + curr, (unsigned)init);
-            s->high_water = curr + init;
-        }
-        else if (s->high_water < (ulg)curr + WIN_INIT) {
-            /* High water mark at or above current data, but below current data
-             * plus WIN_INIT -- zero out to current data plus WIN_INIT, or up
-             * to end of window, whichever is less.
-             */
-            init = (ulg)curr + WIN_INIT - s->high_water;
-            if (init > s->window_size - s->high_water)
-                init = s->window_size - s->high_water;
-            zmemzero(s->window + s->high_water, (unsigned)init);
-            s->high_water += init;
-        }
-    }
-
-    Assert((ulg)s->strstart <= s->window_size - MIN_LOOKAHEAD,
-           "not enough room for search");
-}
-
-/* ===========================================================================
- * Flush the current block, with given end-of-file flag.
- * IN assertion: strstart is set to the end of the current match.
- */
-#define FLUSH_BLOCK_ONLY(s, last) { \
-   _tr_flush_block(s, (s->block_start >= 0L ? \
-                   (charf *)&s->window[(unsigned)s->block_start] : \
-                   (charf *)Z_NULL), \
-                (ulg)((long)s->strstart - s->block_start), \
-                (last)); \
-   s->block_start = s->strstart; \
-   flush_pending(s->strm); \
-   Tracev((stderr,"[FLUSH]")); \
-}
-
-/* Same but force premature exit if necessary. */
-#define FLUSH_BLOCK(s, last) { \
-   FLUSH_BLOCK_ONLY(s, last); \
-   if (s->strm->avail_out == 0) return (last) ? finish_started : need_more; \
-}
-
-/* ===========================================================================
- * Copy without compression as much as possible from the input stream, return
- * the current block state.
- * This function does not insert new strings in the dictionary since
- * uncompressible data is probably not useful. This function is used
- * only for the level=0 compression option.
- * NOTE: this function should be optimized to avoid extra copying from
- * window to pending_buf.
- */
-local block_state deflate_stored(s, flush)
-    deflate_state *s;
-    int flush;
-{
-    /* Stored blocks are limited to 0xffff bytes, pending_buf is limited
-     * to pending_buf_size, and each stored block has a 5 byte header:
-     */
-    ulg max_block_size = 0xffff;
-    ulg max_start;
-
-    if (max_block_size > s->pending_buf_size - 5) {
-        max_block_size = s->pending_buf_size - 5;
-    }
-
-    /* Copy as much as possible from input to output: */
-    for (;;) {
-        /* Fill the window as much as possible: */
-        if (s->lookahead <= 1) {
-
-            Assert(s->strstart < s->w_size+MAX_DIST(s) ||
-                   s->block_start >= (long)s->w_size, "slide too late");
-
-            fill_window(s);
-            if (s->lookahead == 0 && flush == Z_NO_FLUSH) return need_more;
-
-            if (s->lookahead == 0) break; /* flush the current block */
-        }
-        Assert(s->block_start >= 0L, "block gone");
-
-        s->strstart += s->lookahead;
-        s->lookahead = 0;
-
-        /* Emit a stored block if pending_buf will be full: */
-        max_start = s->block_start + max_block_size;
-        if (s->strstart == 0 || (ulg)s->strstart >= max_start) {
-            /* strstart == 0 is possible when wraparound on 16-bit machine */
-            s->lookahead = (uInt)(s->strstart - max_start);
-            s->strstart = (uInt)max_start;
-            FLUSH_BLOCK(s, 0);
-        }
-        /* Flush if we may have to slide, otherwise block_start may become
-         * negative and the data will be gone:
-         */
-        if (s->strstart - (uInt)s->block_start >= MAX_DIST(s)) {
-            FLUSH_BLOCK(s, 0);
-        }
-    }
-    s->insert = 0;
-    if (flush == Z_FINISH) {
-        FLUSH_BLOCK(s, 1);
-        return finish_done;
-    }
-    if ((long)s->strstart > s->block_start)
-        FLUSH_BLOCK(s, 0);
-    return block_done;
-}
-
-/* ===========================================================================
- * Compress as much as possible from the input stream, return the current
- * block state.
- * This function does not perform lazy evaluation of matches and inserts
- * new strings in the dictionary only for unmatched strings or for short
- * matches. It is used only for the fast compression options.
- */
-local block_state deflate_fast(s, flush)
-    deflate_state *s;
-    int flush;
-{
-    IPos hash_head;       /* head of the hash chain */
-    int bflush;           /* set if current block must be flushed */
-
-    for (;;) {
-        /* Make sure that we always have enough lookahead, except
-         * at the end of the input file. We need MAX_MATCH bytes
-         * for the next match, plus MIN_MATCH bytes to insert the
-         * string following the next match.
-         */
-        if (s->lookahead < MIN_LOOKAHEAD) {
-            fill_window(s);
-            if (s->lookahead < MIN_LOOKAHEAD && flush == Z_NO_FLUSH) {
-                return need_more;
-            }
-            if (s->lookahead == 0) break; /* flush the current block */
-        }
-
-        /* Insert the string window[strstart .. strstart+2] in the
-         * dictionary, and set hash_head to the head of the hash chain:
-         */
-        hash_head = NIL;
-        if (s->lookahead >= MIN_MATCH) {
-            INSERT_STRING(s, s->strstart, hash_head);
-        }
-
-        /* Find the longest match, discarding those <= prev_length.
-         * At this point we have always match_length < MIN_MATCH
-         */
-        if (hash_head != NIL && s->strstart - hash_head <= MAX_DIST(s)) {
-            /* To simplify the code, we prevent matches with the string
-             * of window index 0 (in particular we have to avoid a match
-             * of the string with itself at the start of the input file).
-             */
-            s->match_length = longest_match (s, hash_head);
-            /* longest_match() sets match_start */
-        }
-        if (s->match_length >= MIN_MATCH) {
-            check_match(s, s->strstart, s->match_start, s->match_length);
-
-            _tr_tally_dist(s, s->strstart - s->match_start,
-                           s->match_length - MIN_MATCH, bflush);
-
-            s->lookahead -= s->match_length;
-
-            /* Insert new strings in the hash table only if the match length
-             * is not too large. This saves time but degrades compression.
-             */
-#ifndef FASTEST
-            if (s->match_length <= s->max_insert_length &&
-                s->lookahead >= MIN_MATCH) {
-                s->match_length--; /* string at strstart already in table */
-                do {
-                    s->strstart++;
-                    INSERT_STRING(s, s->strstart, hash_head);
-                    /* strstart never exceeds WSIZE-MAX_MATCH, so there are
-                     * always MIN_MATCH bytes ahead.
-                     */
-                } while (--s->match_length != 0);
-                s->strstart++;
-            } else
-#endif
-            {
-                s->strstart += s->match_length;
-                s->match_length = 0;
-                s->ins_h = s->window[s->strstart];
-                UPDATE_HASH(s, s->ins_h, s->window[s->strstart+1]);
-#if MIN_MATCH != 3
-                Call UPDATE_HASH() MIN_MATCH-3 more times
-#endif
-                /* If lookahead < MIN_MATCH, ins_h is garbage, but it does not
-                 * matter since it will be recomputed at next deflate call.
-                 */
-            }
-        } else {
-            /* No match, output a literal byte */
-            Tracevv((stderr,"%c", s->window[s->strstart]));
-            _tr_tally_lit (s, s->window[s->strstart], bflush);
-            s->lookahead--;
-            s->strstart++;
-        }
-        if (bflush) FLUSH_BLOCK(s, 0);
-    }
-    s->insert = s->strstart < MIN_MATCH-1 ? s->strstart : MIN_MATCH-1;
-    if (flush == Z_FINISH) {
-        FLUSH_BLOCK(s, 1);
-        return finish_done;
-    }
-    if (s->last_lit)
-        FLUSH_BLOCK(s, 0);
-    return block_done;
-}
-
-#ifndef FASTEST
-/* ===========================================================================
- * Same as above, but achieves better compression. We use a lazy
- * evaluation for matches: a match is finally adopted only if there is
- * no better match at the next window position.
- */
-local block_state deflate_slow(s, flush)
-    deflate_state *s;
-    int flush;
-{
-    IPos hash_head;          /* head of hash chain */
-    int bflush;              /* set if current block must be flushed */
-
-    /* Process the input block. */
-    for (;;) {
-        /* Make sure that we always have enough lookahead, except
-         * at the end of the input file. We need MAX_MATCH bytes
-         * for the next match, plus MIN_MATCH bytes to insert the
-         * string following the next match.
-         */
-        if (s->lookahead < MIN_LOOKAHEAD) {
-            fill_window(s);
-            if (s->lookahead < MIN_LOOKAHEAD && flush == Z_NO_FLUSH) {
-                return need_more;
-            }
-            if (s->lookahead == 0) break; /* flush the current block */
-        }
-
-        /* Insert the string window[strstart .. strstart+2] in the
-         * dictionary, and set hash_head to the head of the hash chain:
-         */
-        hash_head = NIL;
-        if (s->lookahead >= MIN_MATCH) {
-            INSERT_STRING(s, s->strstart, hash_head);
-        }
-
-        /* Find the longest match, discarding those <= prev_length.
-         */
-        s->prev_length = s->match_length, s->prev_match = s->match_start;
-        s->match_length = MIN_MATCH-1;
-
-        if (hash_head != NIL && s->prev_length < s->max_lazy_match &&
-            s->strstart - hash_head <= MAX_DIST(s)) {
-            /* To simplify the code, we prevent matches with the string
-             * of window index 0 (in particular we have to avoid a match
-             * of the string with itself at the start of the input file).
-             */
-            s->match_length = longest_match (s, hash_head);
-            /* longest_match() sets match_start */
-
-            if (s->match_length <= 5 && (s->strategy == Z_FILTERED
-#if TOO_FAR <= 32767
-                || (s->match_length == MIN_MATCH &&
-                    s->strstart - s->match_start > TOO_FAR)
-#endif
-                )) {
-
-                /* If prev_match is also MIN_MATCH, match_start is garbage
-                 * but we will ignore the current match anyway.
-                 */
-                s->match_length = MIN_MATCH-1;
-            }
-        }
-        /* If there was a match at the previous step and the current
-         * match is not better, output the previous match:
-         */
-        if (s->prev_length >= MIN_MATCH && s->match_length <= s->prev_length) {
-            uInt max_insert = s->strstart + s->lookahead - MIN_MATCH;
-            /* Do not insert strings in hash table beyond this. */
-
-            check_match(s, s->strstart-1, s->prev_match, s->prev_length);
-
-            _tr_tally_dist(s, s->strstart -1 - s->prev_match,
-                           s->prev_length - MIN_MATCH, bflush);
-
-            /* Insert in hash table all strings up to the end of the match.
-             * strstart-1 and strstart are already inserted. If there is not
-             * enough lookahead, the last two strings are not inserted in
-             * the hash table.
-             */
-            s->lookahead -= s->prev_length-1;
-            s->prev_length -= 2;
-            do {
-                if (++s->strstart <= max_insert) {
-                    INSERT_STRING(s, s->strstart, hash_head);
-                }
-            } while (--s->prev_length != 0);
-            s->match_available = 0;
-            s->match_length = MIN_MATCH-1;
-            s->strstart++;
-
-            if (bflush) FLUSH_BLOCK(s, 0);
-
-        } else if (s->match_available) {
-            /* If there was no match at the previous position, output a
-             * single literal. If there was a match but the current match
-             * is longer, truncate the previous match to a single literal.
-             */
-            Tracevv((stderr,"%c", s->window[s->strstart-1]));
-            _tr_tally_lit(s, s->window[s->strstart-1], bflush);
-            if (bflush) {
-                FLUSH_BLOCK_ONLY(s, 0);
-            }
-            s->strstart++;
-            s->lookahead--;
-            if (s->strm->avail_out == 0) return need_more;
-        } else {
-            /* There is no previous match to compare with, wait for
-             * the next step to decide.
-             */
-            s->match_available = 1;
-            s->strstart++;
-            s->lookahead--;
-        }
-    }
-    Assert (flush != Z_NO_FLUSH, "no flush?");
-    if (s->match_available) {
-        Tracevv((stderr,"%c", s->window[s->strstart-1]));
-        _tr_tally_lit(s, s->window[s->strstart-1], bflush);
-        s->match_available = 0;
-    }
-    s->insert = s->strstart < MIN_MATCH-1 ? s->strstart : MIN_MATCH-1;
-    if (flush == Z_FINISH) {
-        FLUSH_BLOCK(s, 1);
-        return finish_done;
-    }
-    if (s->last_lit)
-        FLUSH_BLOCK(s, 0);
-    return block_done;
-}
-#endif /* FASTEST */
-
-/* ===========================================================================
- * For Z_RLE, simply look for runs of bytes, generate matches only of distance
- * one.  Do not maintain a hash table.  (It will be regenerated if this run of
- * deflate switches away from Z_RLE.)
- */
-local block_state deflate_rle(s, flush)
-    deflate_state *s;
-    int flush;
-{
-    int bflush;             /* set if current block must be flushed */
-    uInt prev;              /* byte at distance one to match */
-    Bytef *scan, *strend;   /* scan goes up to strend for length of run */
-
-    for (;;) {
-        /* Make sure that we always have enough lookahead, except
-         * at the end of the input file. We need MAX_MATCH bytes
-         * for the longest run, plus one for the unrolled loop.
-         */
-        if (s->lookahead <= MAX_MATCH) {
-            fill_window(s);
-            if (s->lookahead <= MAX_MATCH && flush == Z_NO_FLUSH) {
-                return need_more;
-            }
-            if (s->lookahead == 0) break; /* flush the current block */
-        }
-
-        /* See how many times the previous byte repeats */
-        s->match_length = 0;
-        if (s->lookahead >= MIN_MATCH && s->strstart > 0) {
-            scan = s->window + s->strstart - 1;
-            prev = *scan;
-            if (prev == *++scan && prev == *++scan && prev == *++scan) {
-                strend = s->window + s->strstart + MAX_MATCH;
-                do {
-                } while (prev == *++scan && prev == *++scan &&
-                         prev == *++scan && prev == *++scan &&
-                         prev == *++scan && prev == *++scan &&
-                         prev == *++scan && prev == *++scan &&
-                         scan < strend);
-                s->match_length = MAX_MATCH - (int)(strend - scan);
-                if (s->match_length > s->lookahead)
-                    s->match_length = s->lookahead;
-            }
-            Assert(scan <= s->window+(uInt)(s->window_size-1), "wild scan");
-        }
-
-        /* Emit match if have run of MIN_MATCH or longer, else emit literal */
-        if (s->match_length >= MIN_MATCH) {
-            check_match(s, s->strstart, s->strstart - 1, s->match_length);
-
-            _tr_tally_dist(s, 1, s->match_length - MIN_MATCH, bflush);
-
-            s->lookahead -= s->match_length;
-            s->strstart += s->match_length;
-            s->match_length = 0;
-        } else {
-            /* No match, output a literal byte */
-            Tracevv((stderr,"%c", s->window[s->strstart]));
-            _tr_tally_lit (s, s->window[s->strstart], bflush);
-            s->lookahead--;
-            s->strstart++;
-        }
-        if (bflush) FLUSH_BLOCK(s, 0);
-    }
-    s->insert = 0;
-    if (flush == Z_FINISH) {
-        FLUSH_BLOCK(s, 1);
-        return finish_done;
-    }
-    if (s->last_lit)
-        FLUSH_BLOCK(s, 0);
-    return block_done;
-}
-
-/* ===========================================================================
- * For Z_HUFFMAN_ONLY, do not look for matches.  Do not maintain a hash table.
- * (It will be regenerated if this run of deflate switches away from Huffman.)
- */
-local block_state deflate_huff(s, flush)
-    deflate_state *s;
-    int flush;
-{
-    int bflush;             /* set if current block must be flushed */
-
-    for (;;) {
-        /* Make sure that we have a literal to write. */
-        if (s->lookahead == 0) {
-            fill_window(s);
-            if (s->lookahead == 0) {
-                if (flush == Z_NO_FLUSH)
-                    return need_more;
-                break;      /* flush the current block */
-            }
-        }
-
-        /* Output a literal byte */
-        s->match_length = 0;
-        Tracevv((stderr,"%c", s->window[s->strstart]));
-        _tr_tally_lit (s, s->window[s->strstart], bflush);
-        s->lookahead--;
-        s->strstart++;
-        if (bflush) FLUSH_BLOCK(s, 0);
-    }
-    s->insert = 0;
-    if (flush == Z_FINISH) {
-        FLUSH_BLOCK(s, 1);
-        return finish_done;
-    }
-    if (s->last_lit)
-        FLUSH_BLOCK(s, 0);
-    return block_done;
-}
diff --git a/src/extra/zlib/deflate.h b/src/extra/zlib/deflate.h
deleted file mode 100644
index ce0299e..0000000
--- a/src/extra/zlib/deflate.h
+++ /dev/null
@@ -1,346 +0,0 @@
-/* deflate.h -- internal compression state
- * Copyright (C) 1995-2012 Jean-loup Gailly
- * For conditions of distribution and use, see copyright notice in zlib.h
- */
-
-/* WARNING: this file should *not* be used by applications. It is
-   part of the implementation of the compression library and is
-   subject to change. Applications should only use zlib.h.
- */
-
-/* @(#) $Id$ */
-
-#ifndef DEFLATE_H
-#define DEFLATE_H
-
-#include "zutil.h"
-
-/* define NO_GZIP when compiling if you want to disable gzip header and
-   trailer creation by deflate().  NO_GZIP would be used to avoid linking in
-   the crc code when it is not needed.  For shared libraries, gzip encoding
-   should be left enabled. */
-#ifndef NO_GZIP
-#  define GZIP
-#endif
-
-/* ===========================================================================
- * Internal compression state.
- */
-
-#define LENGTH_CODES 29
-/* number of length codes, not counting the special END_BLOCK code */
-
-#define LITERALS  256
-/* number of literal bytes 0..255 */
-
-#define L_CODES (LITERALS+1+LENGTH_CODES)
-/* number of Literal or Length codes, including the END_BLOCK code */
-
-#define D_CODES   30
-/* number of distance codes */
-
-#define BL_CODES  19
-/* number of codes used to transfer the bit lengths */
-
-#define HEAP_SIZE (2*L_CODES+1)
-/* maximum heap size */
-
-#define MAX_BITS 15
-/* All codes must not exceed MAX_BITS bits */
-
-#define Buf_size 16
-/* size of bit buffer in bi_buf */
-
-#define INIT_STATE    42
-#define EXTRA_STATE   69
-#define NAME_STATE    73
-#define COMMENT_STATE 91
-#define HCRC_STATE   103
-#define BUSY_STATE   113
-#define FINISH_STATE 666
-/* Stream status */
-
-
-/* Data structure describing a single value and its code string. */
-typedef struct ct_data_s {
-    union {
-        ush  freq;       /* frequency count */
-        ush  code;       /* bit string */
-    } fc;
-    union {
-        ush  dad;        /* father node in Huffman tree */
-        ush  len;        /* length of bit string */
-    } dl;
-} FAR ct_data;
-
-#define Freq fc.freq
-#define Code fc.code
-#define Dad  dl.dad
-#define Len  dl.len
-
-typedef struct static_tree_desc_s  static_tree_desc;
-
-typedef struct tree_desc_s {
-    ct_data *dyn_tree;           /* the dynamic tree */
-    int     max_code;            /* largest code with non zero frequency */
-    static_tree_desc *stat_desc; /* the corresponding static tree */
-} FAR tree_desc;
-
-typedef ush Pos;
-typedef Pos FAR Posf;
-typedef unsigned IPos;
-
-/* A Pos is an index in the character window. We use short instead of int to
- * save space in the various tables. IPos is used only for parameter passing.
- */
-
-typedef struct internal_state {
-    z_streamp strm;      /* pointer back to this zlib stream */
-    int   status;        /* as the name implies */
-    Bytef *pending_buf;  /* output still pending */
-    ulg   pending_buf_size; /* size of pending_buf */
-    Bytef *pending_out;  /* next pending byte to output to the stream */
-    uInt   pending;      /* nb of bytes in the pending buffer */
-    int   wrap;          /* bit 0 true for zlib, bit 1 true for gzip */
-    gz_headerp  gzhead;  /* gzip header information to write */
-    uInt   gzindex;      /* where in extra, name, or comment */
-    Byte  method;        /* can only be DEFLATED */
-    int   last_flush;    /* value of flush param for previous deflate call */
-
-                /* used by deflate.c: */
-
-    uInt  w_size;        /* LZ77 window size (32K by default) */
-    uInt  w_bits;        /* log2(w_size)  (8..16) */
-    uInt  w_mask;        /* w_size - 1 */
-
-    Bytef *window;
-    /* Sliding window. Input bytes are read into the second half of the window,
-     * and move to the first half later to keep a dictionary of at least wSize
-     * bytes. With this organization, matches are limited to a distance of
-     * wSize-MAX_MATCH bytes, but this ensures that IO is always
-     * performed with a length multiple of the block size. Also, it limits
-     * the window size to 64K, which is quite useful on MSDOS.
-     * To do: use the user input buffer as sliding window.
-     */
-
-    ulg window_size;
-    /* Actual size of window: 2*wSize, except when the user input buffer
-     * is directly used as sliding window.
-     */
-
-    Posf *prev;
-    /* Link to older string with same hash index. To limit the size of this
-     * array to 64K, this link is maintained only for the last 32K strings.
-     * An index in this array is thus a window index modulo 32K.
-     */
-
-    Posf *head; /* Heads of the hash chains or NIL. */
-
-    uInt  ins_h;          /* hash index of string to be inserted */
-    uInt  hash_size;      /* number of elements in hash table */
-    uInt  hash_bits;      /* log2(hash_size) */
-    uInt  hash_mask;      /* hash_size-1 */
-
-    uInt  hash_shift;
-    /* Number of bits by which ins_h must be shifted at each input
-     * step. It must be such that after MIN_MATCH steps, the oldest
-     * byte no longer takes part in the hash key, that is:
-     *   hash_shift * MIN_MATCH >= hash_bits
-     */
-
-    long block_start;
-    /* Window position at the beginning of the current output block. Gets
-     * negative when the window is moved backwards.
-     */
-
-    uInt match_length;           /* length of best match */
-    IPos prev_match;             /* previous match */
-    int match_available;         /* set if previous match exists */
-    uInt strstart;               /* start of string to insert */
-    uInt match_start;            /* start of matching string */
-    uInt lookahead;              /* number of valid bytes ahead in window */
-
-    uInt prev_length;
-    /* Length of the best match at previous step. Matches not greater than this
-     * are discarded. This is used in the lazy match evaluation.
-     */
-
-    uInt max_chain_length;
-    /* To speed up deflation, hash chains are never searched beyond this
-     * length.  A higher limit improves compression ratio but degrades the
-     * speed.
-     */
-
-    uInt max_lazy_match;
-    /* Attempt to find a better match only when the current match is strictly
-     * smaller than this value. This mechanism is used only for compression
-     * levels >= 4.
-     */
-#   define max_insert_length  max_lazy_match
-    /* Insert new strings in the hash table only if the match length is not
-     * greater than this length. This saves time but degrades compression.
-     * max_insert_length is used only for compression levels <= 3.
-     */
-
-    int level;    /* compression level (1..9) */
-    int strategy; /* favor or force Huffman coding*/
-
-    uInt good_match;
-    /* Use a faster search when the previous match is longer than this */
-
-    int nice_match; /* Stop searching when current match exceeds this */
-
-                /* used by trees.c: */
-    /* Didn't use ct_data typedef below to suppress compiler warning */
-    struct ct_data_s dyn_ltree[HEAP_SIZE];   /* literal and length tree */
-    struct ct_data_s dyn_dtree[2*D_CODES+1]; /* distance tree */
-    struct ct_data_s bl_tree[2*BL_CODES+1];  /* Huffman tree for bit lengths */
-
-    struct tree_desc_s l_desc;               /* desc. for literal tree */
-    struct tree_desc_s d_desc;               /* desc. for distance tree */
-    struct tree_desc_s bl_desc;              /* desc. for bit length tree */
-
-    ush bl_count[MAX_BITS+1];
-    /* number of codes at each bit length for an optimal tree */
-
-    int heap[2*L_CODES+1];      /* heap used to build the Huffman trees */
-    int heap_len;               /* number of elements in the heap */
-    int heap_max;               /* element of largest frequency */
-    /* The sons of heap[n] are heap[2*n] and heap[2*n+1]. heap[0] is not used.
-     * The same heap array is used to build all trees.
-     */
-
-    uch depth[2*L_CODES+1];
-    /* Depth of each subtree used as tie breaker for trees of equal frequency
-     */
-
-    uchf *l_buf;          /* buffer for literals or lengths */
-
-    uInt  lit_bufsize;
-    /* Size of match buffer for literals/lengths.  There are 4 reasons for
-     * limiting lit_bufsize to 64K:
-     *   - frequencies can be kept in 16 bit counters
-     *   - if compression is not successful for the first block, all input
-     *     data is still in the window so we can still emit a stored block even
-     *     when input comes from standard input.  (This can also be done for
-     *     all blocks if lit_bufsize is not greater than 32K.)
-     *   - if compression is not successful for a file smaller than 64K, we can
-     *     even emit a stored file instead of a stored block (saving 5 bytes).
-     *     This is applicable only for zip (not gzip or zlib).
-     *   - creating new Huffman trees less frequently may not provide fast
-     *     adaptation to changes in the input data statistics. (Take for
-     *     example a binary file with poorly compressible code followed by
-     *     a highly compressible string table.) Smaller buffer sizes give
-     *     fast adaptation but have of course the overhead of transmitting
-     *     trees more frequently.
-     *   - I can't count above 4
-     */
-
-    uInt last_lit;      /* running index in l_buf */
-
-    ushf *d_buf;
-    /* Buffer for distances. To simplify the code, d_buf and l_buf have
-     * the same number of elements. To use different lengths, an extra flag
-     * array would be necessary.
-     */
-
-    ulg opt_len;        /* bit length of current block with optimal trees */
-    ulg static_len;     /* bit length of current block with static trees */
-    uInt matches;       /* number of string matches in current block */
-    uInt insert;        /* bytes at end of window left to insert */
-
-#ifdef DEBUG
-    ulg compressed_len; /* total bit length of compressed file mod 2^32 */
-    ulg bits_sent;      /* bit length of compressed data sent mod 2^32 */
-#endif
-
-    ush bi_buf;
-    /* Output buffer. bits are inserted starting at the bottom (least
-     * significant bits).
-     */
-    int bi_valid;
-    /* Number of valid bits in bi_buf.  All bits above the last valid bit
-     * are always zero.
-     */
-
-    ulg high_water;
-    /* High water mark offset in window for initialized bytes -- bytes above
-     * this are set to zero in order to avoid memory check warnings when
-     * longest match routines access bytes past the input.  This is then
-     * updated to the new high water mark.
-     */
-
-} FAR deflate_state;
-
-/* Output a byte on the stream.
- * IN assertion: there is enough room in pending_buf.
- */
-#define put_byte(s, c) {s->pending_buf[s->pending++] = (c);}
-
-
-#define MIN_LOOKAHEAD (MAX_MATCH+MIN_MATCH+1)
-/* Minimum amount of lookahead, except at the end of the input file.
- * See deflate.c for comments about the MIN_MATCH+1.
- */
-
-#define MAX_DIST(s)  ((s)->w_size-MIN_LOOKAHEAD)
-/* In order to simplify the code, particularly on 16 bit machines, match
- * distances are limited to MAX_DIST instead of WSIZE.
- */
-
-#define WIN_INIT MAX_MATCH
-/* Number of bytes after end of data in window to initialize in order to avoid
-   memory checker errors from longest match routines */
-
-        /* in trees.c */
-void ZLIB_INTERNAL _tr_init OF((deflate_state *s));
-int ZLIB_INTERNAL _tr_tally OF((deflate_state *s, unsigned dist, unsigned lc));
-void ZLIB_INTERNAL _tr_flush_block OF((deflate_state *s, charf *buf,
-                        ulg stored_len, int last));
-void ZLIB_INTERNAL _tr_flush_bits OF((deflate_state *s));
-void ZLIB_INTERNAL _tr_align OF((deflate_state *s));
-void ZLIB_INTERNAL _tr_stored_block OF((deflate_state *s, charf *buf,
-                        ulg stored_len, int last));
-
-#define d_code(dist) \
-   ((dist) < 256 ? _dist_code[dist] : _dist_code[256+((dist)>>7)])
-/* Mapping from a distance to a distance code. dist is the distance - 1 and
- * must not have side effects. _dist_code[256] and _dist_code[257] are never
- * used.
- */
-
-#ifndef DEBUG
-/* Inline versions of _tr_tally for speed: */
-
-#if defined(GEN_TREES_H) || !defined(STDC)
-  extern uch ZLIB_INTERNAL _length_code[];
-  extern uch ZLIB_INTERNAL _dist_code[];
-#else
-  extern const uch ZLIB_INTERNAL _length_code[];
-  extern const uch ZLIB_INTERNAL _dist_code[];
-#endif
-
-# define _tr_tally_lit(s, c, flush) \
-  { uch cc = (c); \
-    s->d_buf[s->last_lit] = 0; \
-    s->l_buf[s->last_lit++] = cc; \
-    s->dyn_ltree[cc].Freq++; \
-    flush = (s->last_lit == s->lit_bufsize-1); \
-   }
-# define _tr_tally_dist(s, distance, length, flush) \
-  { uch len = (length); \
-    ush dist = (distance); \
-    s->d_buf[s->last_lit] = dist; \
-    s->l_buf[s->last_lit++] = len; \
-    dist--; \
-    s->dyn_ltree[_length_code[len]+LITERALS+1].Freq++; \
-    s->dyn_dtree[d_code(dist)].Freq++; \
-    flush = (s->last_lit == s->lit_bufsize-1); \
-  }
-#else
-# define _tr_tally_lit(s, c, flush) flush = _tr_tally(s, 0, c)
-# define _tr_tally_dist(s, distance, length, flush) \
-              flush = _tr_tally(s, distance, length)
-#endif
-
-#endif /* DEFLATE_H */
diff --git a/src/extra/zlib/infback.c b/src/extra/zlib/infback.c
deleted file mode 100644
index f3833c2..0000000
--- a/src/extra/zlib/infback.c
+++ /dev/null
@@ -1,640 +0,0 @@
-/* infback.c -- inflate using a call-back interface
- * Copyright (C) 1995-2011 Mark Adler
- * For conditions of distribution and use, see copyright notice in zlib.h
- */
-
-/*
-   This code is largely copied from inflate.c.  Normally either infback.o or
-   inflate.o would be linked into an application--not both.  The interface
-   with inffast.c is retained so that optimized assembler-coded versions of
-   inflate_fast() can be used with either inflate.c or infback.c.
- */
-
-#include "zutil.h"
-#include "inftrees.h"
-#include "inflate.h"
-#include "inffast.h"
-
-/* function prototypes */
-local void fixedtables OF((struct inflate_state FAR *state));
-
-/*
-   strm provides memory allocation functions in zalloc and zfree, or
-   Z_NULL to use the library memory allocation functions.
-
-   windowBits is in the range 8..15, and window is a user-supplied
-   window and output buffer that is 2**windowBits bytes.
- */
-int ZEXPORT inflateBackInit_(strm, windowBits, window, version, stream_size)
-z_streamp strm;
-int windowBits;
-unsigned char FAR *window;
-const char *version;
-int stream_size;
-{
-    struct inflate_state FAR *state;
-
-    if (version == Z_NULL || version[0] != ZLIB_VERSION[0] ||
-        stream_size != (int)(sizeof(z_stream)))
-        return Z_VERSION_ERROR;
-    if (strm == Z_NULL || window == Z_NULL ||
-        windowBits < 8 || windowBits > 15)
-        return Z_STREAM_ERROR;
-    strm->msg = Z_NULL;                 /* in case we return an error */
-    if (strm->zalloc == (alloc_func)0) {
-#ifdef Z_SOLO
-        return Z_STREAM_ERROR;
-#else
-        strm->zalloc = zcalloc;
-        strm->opaque = (voidpf)0;
-#endif
-    }
-    if (strm->zfree == (free_func)0)
-#ifdef Z_SOLO
-        return Z_STREAM_ERROR;
-#else
-    strm->zfree = zcfree;
-#endif
-    state = (struct inflate_state FAR *)ZALLOC(strm, 1,
-                                               sizeof(struct inflate_state));
-    if (state == Z_NULL) return Z_MEM_ERROR;
-    Tracev((stderr, "inflate: allocated\n"));
-    strm->state = (struct internal_state FAR *)state;
-    state->dmax = 32768U;
-    state->wbits = windowBits;
-    state->wsize = 1U << windowBits;
-    state->window = window;
-    state->wnext = 0;
-    state->whave = 0;
-    return Z_OK;
-}
-
-/*
-   Return state with length and distance decoding tables and index sizes set to
-   fixed code decoding.  Normally this returns fixed tables from inffixed.h.
-   If BUILDFIXED is defined, then instead this routine builds the tables the
-   first time it's called, and returns those tables the first time and
-   thereafter.  This reduces the size of the code by about 2K bytes, in
-   exchange for a little execution time.  However, BUILDFIXED should not be
-   used for threaded applications, since the rewriting of the tables and virgin
-   may not be thread-safe.
- */
-local void fixedtables(state)
-struct inflate_state FAR *state;
-{
-#ifdef BUILDFIXED
-    static int virgin = 1;
-    static code *lenfix, *distfix;
-    static code fixed[544];
-
-    /* build fixed huffman tables if first call (may not be thread safe) */
-    if (virgin) {
-        unsigned sym, bits;
-        static code *next;
-
-        /* literal/length table */
-        sym = 0;
-        while (sym < 144) state->lens[sym++] = 8;
-        while (sym < 256) state->lens[sym++] = 9;
-        while (sym < 280) state->lens[sym++] = 7;
-        while (sym < 288) state->lens[sym++] = 8;
-        next = fixed;
-        lenfix = next;
-        bits = 9;
-        inflate_table(LENS, state->lens, 288, &(next), &(bits), state->work);
-
-        /* distance table */
-        sym = 0;
-        while (sym < 32) state->lens[sym++] = 5;
-        distfix = next;
-        bits = 5;
-        inflate_table(DISTS, state->lens, 32, &(next), &(bits), state->work);
-
-        /* do this just once */
-        virgin = 0;
-    }
-#else /* !BUILDFIXED */
-#   include "inffixed.h"
-#endif /* BUILDFIXED */
-    state->lencode = lenfix;
-    state->lenbits = 9;
-    state->distcode = distfix;
-    state->distbits = 5;
-}
-
-/* Macros for inflateBack(): */
-
-/* Load returned state from inflate_fast() */
-#define LOAD() \
-    do { \
-        put = strm->next_out; \
-        left = strm->avail_out; \
-        next = strm->next_in; \
-        have = strm->avail_in; \
-        hold = state->hold; \
-        bits = state->bits; \
-    } while (0)
-
-/* Set state from registers for inflate_fast() */
-#define RESTORE() \
-    do { \
-        strm->next_out = put; \
-        strm->avail_out = left; \
-        strm->next_in = next; \
-        strm->avail_in = have; \
-        state->hold = hold; \
-        state->bits = bits; \
-    } while (0)
-
-/* Clear the input bit accumulator */
-#define INITBITS() \
-    do { \
-        hold = 0; \
-        bits = 0; \
-    } while (0)
-
-/* Assure that some input is available.  If input is requested, but denied,
-   then return a Z_BUF_ERROR from inflateBack(). */
-#define PULL() \
-    do { \
-        if (have == 0) { \
-            have = in(in_desc, &next); \
-            if (have == 0) { \
-                next = Z_NULL; \
-                ret = Z_BUF_ERROR; \
-                goto inf_leave; \
-            } \
-        } \
-    } while (0)
-
-/* Get a byte of input into the bit accumulator, or return from inflateBack()
-   with an error if there is no input available. */
-#define PULLBYTE() \
-    do { \
-        PULL(); \
-        have--; \
-        hold += (unsigned long)(*next++) << bits; \
-        bits += 8; \
-    } while (0)
-
-/* Assure that there are at least n bits in the bit accumulator.  If there is
-   not enough available input to do that, then return from inflateBack() with
-   an error. */
-#define NEEDBITS(n) \
-    do { \
-        while (bits < (unsigned)(n)) \
-            PULLBYTE(); \
-    } while (0)
-
-/* Return the low n bits of the bit accumulator (n < 16) */
-#define BITS(n) \
-    ((unsigned)hold & ((1U << (n)) - 1))
-
-/* Remove n bits from the bit accumulator */
-#define DROPBITS(n) \
-    do { \
-        hold >>= (n); \
-        bits -= (unsigned)(n); \
-    } while (0)
-
-/* Remove zero to seven bits as needed to go to a byte boundary */
-#define BYTEBITS() \
-    do { \
-        hold >>= bits & 7; \
-        bits -= bits & 7; \
-    } while (0)
-
-/* Assure that some output space is available, by writing out the window
-   if it's full.  If the write fails, return from inflateBack() with a
-   Z_BUF_ERROR. */
-#define ROOM() \
-    do { \
-        if (left == 0) { \
-            put = state->window; \
-            left = state->wsize; \
-            state->whave = left; \
-            if (out(out_desc, put, left)) { \
-                ret = Z_BUF_ERROR; \
-                goto inf_leave; \
-            } \
-        } \
-    } while (0)
-
-/*
-   strm provides the memory allocation functions and window buffer on input,
-   and provides information on the unused input on return.  For Z_DATA_ERROR
-   returns, strm will also provide an error message.
-
-   in() and out() are the call-back input and output functions.  When
-   inflateBack() needs more input, it calls in().  When inflateBack() has
-   filled the window with output, or when it completes with data in the
-   window, it calls out() to write out the data.  The application must not
-   change the provided input until in() is called again or inflateBack()
-   returns.  The application must not change the window/output buffer until
-   inflateBack() returns.
-
-   in() and out() are called with a descriptor parameter provided in the
-   inflateBack() call.  This parameter can be a structure that provides the
-   information required to do the read or write, as well as accumulated
-   information on the input and output such as totals and check values.
-
-   in() should return zero on failure.  out() should return non-zero on
-   failure.  If either in() or out() fails, than inflateBack() returns a
-   Z_BUF_ERROR.  strm->next_in can be checked for Z_NULL to see whether it
-   was in() or out() that caused in the error.  Otherwise,  inflateBack()
-   returns Z_STREAM_END on success, Z_DATA_ERROR for an deflate format
-   error, or Z_MEM_ERROR if it could not allocate memory for the state.
-   inflateBack() can also return Z_STREAM_ERROR if the input parameters
-   are not correct, i.e. strm is Z_NULL or the state was not initialized.
- */
-int ZEXPORT inflateBack(strm, in, in_desc, out, out_desc)
-z_streamp strm;
-in_func in;
-void FAR *in_desc;
-out_func out;
-void FAR *out_desc;
-{
-    struct inflate_state FAR *state;
-    z_const unsigned char FAR *next;    /* next input */
-    unsigned char FAR *put;     /* next output */
-    unsigned have, left;        /* available input and output */
-    unsigned long hold;         /* bit buffer */
-    unsigned bits;              /* bits in bit buffer */
-    unsigned copy;              /* number of stored or match bytes to copy */
-    unsigned char FAR *from;    /* where to copy match bytes from */
-    code here;                  /* current decoding table entry */
-    code last;                  /* parent table entry */
-    unsigned len;               /* length to copy for repeats, bits to drop */
-    int ret;                    /* return code */
-    static const unsigned short order[19] = /* permutation of code lengths */
-        {16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15};
-
-    /* Check that the strm exists and that the state was initialized */
-    if (strm == Z_NULL || strm->state == Z_NULL)
-        return Z_STREAM_ERROR;
-    state = (struct inflate_state FAR *)strm->state;
-
-    /* Reset the state */
-    strm->msg = Z_NULL;
-    state->mode = TYPE;
-    state->last = 0;
-    state->whave = 0;
-    next = strm->next_in;
-    have = next != Z_NULL ? strm->avail_in : 0;
-    hold = 0;
-    bits = 0;
-    put = state->window;
-    left = state->wsize;
-
-    /* Inflate until end of block marked as last */
-    for (;;)
-        switch (state->mode) {
-        case TYPE:
-            /* determine and dispatch block type */
-            if (state->last) {
-                BYTEBITS();
-                state->mode = DONE;
-                break;
-            }
-            NEEDBITS(3);
-            state->last = BITS(1);
-            DROPBITS(1);
-            switch (BITS(2)) {
-            case 0:                             /* stored block */
-                Tracev((stderr, "inflate:     stored block%s\n",
-                        state->last ? " (last)" : ""));
-                state->mode = STORED;
-                break;
-            case 1:                             /* fixed block */
-                fixedtables(state);
-                Tracev((stderr, "inflate:     fixed codes block%s\n",
-                        state->last ? " (last)" : ""));
-                state->mode = LEN;              /* decode codes */
-                break;
-            case 2:                             /* dynamic block */
-                Tracev((stderr, "inflate:     dynamic codes block%s\n",
-                        state->last ? " (last)" : ""));
-                state->mode = TABLE;
-                break;
-            case 3:
-                strm->msg = (char *)"invalid block type";
-                state->mode = BAD;
-            }
-            DROPBITS(2);
-            break;
-
-        case STORED:
-            /* get and verify stored block length */
-            BYTEBITS();                         /* go to byte boundary */
-            NEEDBITS(32);
-            if ((hold & 0xffff) != ((hold >> 16) ^ 0xffff)) {
-                strm->msg = (char *)"invalid stored block lengths";
-                state->mode = BAD;
-                break;
-            }
-            state->length = (unsigned)hold & 0xffff;
-            Tracev((stderr, "inflate:       stored length %u\n",
-                    state->length));
-            INITBITS();
-
-            /* copy stored block from input to output */
-            while (state->length != 0) {
-                copy = state->length;
-                PULL();
-                ROOM();
-                if (copy > have) copy = have;
-                if (copy > left) copy = left;
-                zmemcpy(put, next, copy);
-                have -= copy;
-                next += copy;
-                left -= copy;
-                put += copy;
-                state->length -= copy;
-            }
-            Tracev((stderr, "inflate:       stored end\n"));
-            state->mode = TYPE;
-            break;
-
-        case TABLE:
-            /* get dynamic table entries descriptor */
-            NEEDBITS(14);
-            state->nlen = BITS(5) + 257;
-            DROPBITS(5);
-            state->ndist = BITS(5) + 1;
-            DROPBITS(5);
-            state->ncode = BITS(4) + 4;
-            DROPBITS(4);
-#ifndef PKZIP_BUG_WORKAROUND
-            if (state->nlen > 286 || state->ndist > 30) {
-                strm->msg = (char *)"too many length or distance symbols";
-                state->mode = BAD;
-                break;
-            }
-#endif
-            Tracev((stderr, "inflate:       table sizes ok\n"));
-
-            /* get code length code lengths (not a typo) */
-            state->have = 0;
-            while (state->have < state->ncode) {
-                NEEDBITS(3);
-                state->lens[order[state->have++]] = (unsigned short)BITS(3);
-                DROPBITS(3);
-            }
-            while (state->have < 19)
-                state->lens[order[state->have++]] = 0;
-            state->next = state->codes;
-            state->lencode = (code const FAR *)(state->next);
-            state->lenbits = 7;
-            ret = inflate_table(CODES, state->lens, 19, &(state->next),
-                                &(state->lenbits), state->work);
-            if (ret) {
-                strm->msg = (char *)"invalid code lengths set";
-                state->mode = BAD;
-                break;
-            }
-            Tracev((stderr, "inflate:       code lengths ok\n"));
-
-            /* get length and distance code code lengths */
-            state->have = 0;
-            while (state->have < state->nlen + state->ndist) {
-                for (;;) {
-                    here = state->lencode[BITS(state->lenbits)];
-                    if ((unsigned)(here.bits) <= bits) break;
-                    PULLBYTE();
-                }
-                if (here.val < 16) {
-                    DROPBITS(here.bits);
-                    state->lens[state->have++] = here.val;
-                }
-                else {
-                    if (here.val == 16) {
-                        NEEDBITS(here.bits + 2);
-                        DROPBITS(here.bits);
-                        if (state->have == 0) {
-                            strm->msg = (char *)"invalid bit length repeat";
-                            state->mode = BAD;
-                            break;
-                        }
-                        len = (unsigned)(state->lens[state->have - 1]);
-                        copy = 3 + BITS(2);
-                        DROPBITS(2);
-                    }
-                    else if (here.val == 17) {
-                        NEEDBITS(here.bits + 3);
-                        DROPBITS(here.bits);
-                        len = 0;
-                        copy = 3 + BITS(3);
-                        DROPBITS(3);
-                    }
-                    else {
-                        NEEDBITS(here.bits + 7);
-                        DROPBITS(here.bits);
-                        len = 0;
-                        copy = 11 + BITS(7);
-                        DROPBITS(7);
-                    }
-                    if (state->have + copy > state->nlen + state->ndist) {
-                        strm->msg = (char *)"invalid bit length repeat";
-                        state->mode = BAD;
-                        break;
-                    }
-                    while (copy--)
-                        state->lens[state->have++] = (unsigned short)len;
-                }
-            }
-
-            /* handle error breaks in while */
-            if (state->mode == BAD) break;
-
-            /* check for end-of-block code (better have one) */
-            if (state->lens[256] == 0) {
-                strm->msg = (char *)"invalid code -- missing end-of-block";
-                state->mode = BAD;
-                break;
-            }
-
-            /* build code tables -- note: do not change the lenbits or distbits
-               values here (9 and 6) without reading the comments in inftrees.h
-               concerning the ENOUGH constants, which depend on those values */
-            state->next = state->codes;
-            state->lencode = (code const FAR *)(state->next);
-            state->lenbits = 9;
-            ret = inflate_table(LENS, state->lens, state->nlen, &(state->next),
-                                &(state->lenbits), state->work);
-            if (ret) {
-                strm->msg = (char *)"invalid literal/lengths set";
-                state->mode = BAD;
-                break;
-            }
-            state->distcode = (code const FAR *)(state->next);
-            state->distbits = 6;
-            ret = inflate_table(DISTS, state->lens + state->nlen, state->ndist,
-                            &(state->next), &(state->distbits), state->work);
-            if (ret) {
-                strm->msg = (char *)"invalid distances set";
-                state->mode = BAD;
-                break;
-            }
-            Tracev((stderr, "inflate:       codes ok\n"));
-            state->mode = LEN;
-
-        case LEN:
-            /* use inflate_fast() if we have enough input and output */
-            if (have >= 6 && left >= 258) {
-                RESTORE();
-                if (state->whave < state->wsize)
-                    state->whave = state->wsize - left;
-                inflate_fast(strm, state->wsize);
-                LOAD();
-                break;
-            }
-
-            /* get a literal, length, or end-of-block code */
-            for (;;) {
-                here = state->lencode[BITS(state->lenbits)];
-                if ((unsigned)(here.bits) <= bits) break;
-                PULLBYTE();
-            }
-            if (here.op && (here.op & 0xf0) == 0) {
-                last = here;
-                for (;;) {
-                    here = state->lencode[last.val +
-                            (BITS(last.bits + last.op) >> last.bits)];
-                    if ((unsigned)(last.bits + here.bits) <= bits) break;
-                    PULLBYTE();
-                }
-                DROPBITS(last.bits);
-            }
-            DROPBITS(here.bits);
-            state->length = (unsigned)here.val;
-
-            /* process literal */
-            if (here.op == 0) {
-                Tracevv((stderr, here.val >= 0x20 && here.val < 0x7f ?
-                        "inflate:         literal '%c'\n" :
-                        "inflate:         literal 0x%02x\n", here.val));
-                ROOM();
-                *put++ = (unsigned char)(state->length);
-                left--;
-                state->mode = LEN;
-                break;
-            }
-
-            /* process end of block */
-            if (here.op & 32) {
-                Tracevv((stderr, "inflate:         end of block\n"));
-                state->mode = TYPE;
-                break;
-            }
-
-            /* invalid code */
-            if (here.op & 64) {
-                strm->msg = (char *)"invalid literal/length code";
-                state->mode = BAD;
-                break;
-            }
-
-            /* length code -- get extra bits, if any */
-            state->extra = (unsigned)(here.op) & 15;
-            if (state->extra != 0) {
-                NEEDBITS(state->extra);
-                state->length += BITS(state->extra);
-                DROPBITS(state->extra);
-            }
-            Tracevv((stderr, "inflate:         length %u\n", state->length));
-
-            /* get distance code */
-            for (;;) {
-                here = state->distcode[BITS(state->distbits)];
-                if ((unsigned)(here.bits) <= bits) break;
-                PULLBYTE();
-            }
-            if ((here.op & 0xf0) == 0) {
-                last = here;
-                for (;;) {
-                    here = state->distcode[last.val +
-                            (BITS(last.bits + last.op) >> last.bits)];
-                    if ((unsigned)(last.bits + here.bits) <= bits) break;
-                    PULLBYTE();
-                }
-                DROPBITS(last.bits);
-            }
-            DROPBITS(here.bits);
-            if (here.op & 64) {
-                strm->msg = (char *)"invalid distance code";
-                state->mode = BAD;
-                break;
-            }
-            state->offset = (unsigned)here.val;
-
-            /* get distance extra bits, if any */
-            state->extra = (unsigned)(here.op) & 15;
-            if (state->extra != 0) {
-                NEEDBITS(state->extra);
-                state->offset += BITS(state->extra);
-                DROPBITS(state->extra);
-            }
-            if (state->offset > state->wsize - (state->whave < state->wsize ?
-                                                left : 0)) {
-                strm->msg = (char *)"invalid distance too far back";
-                state->mode = BAD;
-                break;
-            }
-            Tracevv((stderr, "inflate:         distance %u\n", state->offset));
-
-            /* copy match from window to output */
-            do {
-                ROOM();
-                copy = state->wsize - state->offset;
-                if (copy < left) {
-                    from = put + copy;
-                    copy = left - copy;
-                }
-                else {
-                    from = put - state->offset;
-                    copy = left;
-                }
-                if (copy > state->length) copy = state->length;
-                state->length -= copy;
-                left -= copy;
-                do {
-                    *put++ = *from++;
-                } while (--copy);
-            } while (state->length != 0);
-            break;
-
-        case DONE:
-            /* inflate stream terminated properly -- write leftover output */
-            ret = Z_STREAM_END;
-            if (left < state->wsize) {
-                if (out(out_desc, state->window, state->wsize - left))
-                    ret = Z_BUF_ERROR;
-            }
-            goto inf_leave;
-
-        case BAD:
-            ret = Z_DATA_ERROR;
-            goto inf_leave;
-
-        default:                /* can't happen, but makes compilers happy */
-            ret = Z_STREAM_ERROR;
-            goto inf_leave;
-        }
-
-    /* Return unused input */
-  inf_leave:
-    strm->next_in = next;
-    strm->avail_in = have;
-    return ret;
-}
-
-int ZEXPORT inflateBackEnd(strm)
-z_streamp strm;
-{
-    if (strm == Z_NULL || strm->state == Z_NULL || strm->zfree == (free_func)0)
-        return Z_STREAM_ERROR;
-    ZFREE(strm, strm->state);
-    strm->state = Z_NULL;
-    Tracev((stderr, "inflate: end\n"));
-    return Z_OK;
-}
diff --git a/src/extra/zlib/inffast.c b/src/extra/zlib/inffast.c
deleted file mode 100644
index bda59ce..0000000
--- a/src/extra/zlib/inffast.c
+++ /dev/null
@@ -1,340 +0,0 @@
-/* inffast.c -- fast decoding
- * Copyright (C) 1995-2008, 2010, 2013 Mark Adler
- * For conditions of distribution and use, see copyright notice in zlib.h
- */
-
-#include "zutil.h"
-#include "inftrees.h"
-#include "inflate.h"
-#include "inffast.h"
-
-#ifndef ASMINF
-
-/* Allow machine dependent optimization for post-increment or pre-increment.
-   Based on testing to date,
-   Pre-increment preferred for:
-   - PowerPC G3 (Adler)
-   - MIPS R5000 (Randers-Pehrson)
-   Post-increment preferred for:
-   - none
-   No measurable difference:
-   - Pentium III (Anderson)
-   - M68060 (Nikl)
- */
-#ifdef POSTINC
-#  define OFF 0
-#  define PUP(a) *(a)++
-#else
-#  define OFF 1
-#  define PUP(a) *++(a)
-#endif
-
-/*
-   Decode literal, length, and distance codes and write out the resulting
-   literal and match bytes until either not enough input or output is
-   available, an end-of-block is encountered, or a data error is encountered.
-   When large enough input and output buffers are supplied to inflate(), for
-   example, a 16K input buffer and a 64K output buffer, more than 95% of the
-   inflate execution time is spent in this routine.
-
-   Entry assumptions:
-
-        state->mode == LEN
-        strm->avail_in >= 6
-        strm->avail_out >= 258
-        start >= strm->avail_out
-        state->bits < 8
-
-   On return, state->mode is one of:
-
-        LEN -- ran out of enough output space or enough available input
-        TYPE -- reached end of block code, inflate() to interpret next block
-        BAD -- error in block data
-
-   Notes:
-
-    - The maximum input bits used by a length/distance pair is 15 bits for the
-      length code, 5 bits for the length extra, 15 bits for the distance code,
-      and 13 bits for the distance extra.  This totals 48 bits, or six bytes.
-      Therefore if strm->avail_in >= 6, then there is enough input to avoid
-      checking for available input while decoding.
-
-    - The maximum bytes that a single length/distance pair can output is 258
-      bytes, which is the maximum length that can be coded.  inflate_fast()
-      requires strm->avail_out >= 258 for each loop to avoid checking for
-      output space.
- */
-void ZLIB_INTERNAL inflate_fast(strm, start)
-z_streamp strm;
-unsigned start;         /* inflate()'s starting value for strm->avail_out */
-{
-    struct inflate_state FAR *state;
-    z_const unsigned char FAR *in;      /* local strm->next_in */
-    z_const unsigned char FAR *last;    /* have enough input while in < last */
-    unsigned char FAR *out;     /* local strm->next_out */
-    unsigned char FAR *beg;     /* inflate()'s initial strm->next_out */
-    unsigned char FAR *end;     /* while out < end, enough space available */
-#ifdef INFLATE_STRICT
-    unsigned dmax;              /* maximum distance from zlib header */
-#endif
-    unsigned wsize;             /* window size or zero if not using window */
-    unsigned whave;             /* valid bytes in the window */
-    unsigned wnext;             /* window write index */
-    unsigned char FAR *window;  /* allocated sliding window, if wsize != 0 */
-    unsigned long hold;         /* local strm->hold */
-    unsigned bits;              /* local strm->bits */
-    code const FAR *lcode;      /* local strm->lencode */
-    code const FAR *dcode;      /* local strm->distcode */
-    unsigned lmask;             /* mask for first level of length codes */
-    unsigned dmask;             /* mask for first level of distance codes */
-    code here;                  /* retrieved table entry */
-    unsigned op;                /* code bits, operation, extra bits, or */
-                                /*  window position, window bytes to copy */
-    unsigned len;               /* match length, unused bytes */
-    unsigned dist;              /* match distance */
-    unsigned char FAR *from;    /* where to copy match from */
-
-    /* copy state to local variables */
-    state = (struct inflate_state FAR *)strm->state;
-    in = strm->next_in - OFF;
-    last = in + (strm->avail_in - 5);
-    out = strm->next_out - OFF;
-    beg = out - (start - strm->avail_out);
-    end = out + (strm->avail_out - 257);
-#ifdef INFLATE_STRICT
-    dmax = state->dmax;
-#endif
-    wsize = state->wsize;
-    whave = state->whave;
-    wnext = state->wnext;
-    window = state->window;
-    hold = state->hold;
-    bits = state->bits;
-    lcode = state->lencode;
-    dcode = state->distcode;
-    lmask = (1U << state->lenbits) - 1;
-    dmask = (1U << state->distbits) - 1;
-
-    /* decode literals and length/distances until end-of-block or not enough
-       input data or output space */
-    do {
-        if (bits < 15) {
-            hold += (unsigned long)(PUP(in)) << bits;
-            bits += 8;
-            hold += (unsigned long)(PUP(in)) << bits;
-            bits += 8;
-        }
-        here = lcode[hold & lmask];
-      dolen:
-        op = (unsigned)(here.bits);
-        hold >>= op;
-        bits -= op;
-        op = (unsigned)(here.op);
-        if (op == 0) {                          /* literal */
-            Tracevv((stderr, here.val >= 0x20 && here.val < 0x7f ?
-                    "inflate:         literal '%c'\n" :
-                    "inflate:         literal 0x%02x\n", here.val));
-            PUP(out) = (unsigned char)(here.val);
-        }
-        else if (op & 16) {                     /* length base */
-            len = (unsigned)(here.val);
-            op &= 15;                           /* number of extra bits */
-            if (op) {
-                if (bits < op) {
-                    hold += (unsigned long)(PUP(in)) << bits;
-                    bits += 8;
-                }
-                len += (unsigned)hold & ((1U << op) - 1);
-                hold >>= op;
-                bits -= op;
-            }
-            Tracevv((stderr, "inflate:         length %u\n", len));
-            if (bits < 15) {
-                hold += (unsigned long)(PUP(in)) << bits;
-                bits += 8;
-                hold += (unsigned long)(PUP(in)) << bits;
-                bits += 8;
-            }
-            here = dcode[hold & dmask];
-          dodist:
-            op = (unsigned)(here.bits);
-            hold >>= op;
-            bits -= op;
-            op = (unsigned)(here.op);
-            if (op & 16) {                      /* distance base */
-                dist = (unsigned)(here.val);
-                op &= 15;                       /* number of extra bits */
-                if (bits < op) {
-                    hold += (unsigned long)(PUP(in)) << bits;
-                    bits += 8;
-                    if (bits < op) {
-                        hold += (unsigned long)(PUP(in)) << bits;
-                        bits += 8;
-                    }
-                }
-                dist += (unsigned)hold & ((1U << op) - 1);
-#ifdef INFLATE_STRICT
-                if (dist > dmax) {
-                    strm->msg = (char *)"invalid distance too far back";
-                    state->mode = BAD;
-                    break;
-                }
-#endif
-                hold >>= op;
-                bits -= op;
-                Tracevv((stderr, "inflate:         distance %u\n", dist));
-                op = (unsigned)(out - beg);     /* max distance in output */
-                if (dist > op) {                /* see if copy from window */
-                    op = dist - op;             /* distance back in window */
-                    if (op > whave) {
-                        if (state->sane) {
-                            strm->msg =
-                                (char *)"invalid distance too far back";
-                            state->mode = BAD;
-                            break;
-                        }
-#ifdef INFLATE_ALLOW_INVALID_DISTANCE_TOOFAR_ARRR
-                        if (len <= op - whave) {
-                            do {
-                                PUP(out) = 0;
-                            } while (--len);
-                            continue;
-                        }
-                        len -= op - whave;
-                        do {
-                            PUP(out) = 0;
-                        } while (--op > whave);
-                        if (op == 0) {
-                            from = out - dist;
-                            do {
-                                PUP(out) = PUP(from);
-                            } while (--len);
-                            continue;
-                        }
-#endif
-                    }
-                    from = window - OFF;
-                    if (wnext == 0) {           /* very common case */
-                        from += wsize - op;
-                        if (op < len) {         /* some from window */
-                            len -= op;
-                            do {
-                                PUP(out) = PUP(from);
-                            } while (--op);
-                            from = out - dist;  /* rest from output */
-                        }
-                    }
-                    else if (wnext < op) {      /* wrap around window */
-                        from += wsize + wnext - op;
-                        op -= wnext;
-                        if (op < len) {         /* some from end of window */
-                            len -= op;
-                            do {
-                                PUP(out) = PUP(from);
-                            } while (--op);
-                            from = window - OFF;
-                            if (wnext < len) {  /* some from start of window */
-                                op = wnext;
-                                len -= op;
-                                do {
-                                    PUP(out) = PUP(from);
-                                } while (--op);
-                                from = out - dist;      /* rest from output */
-                            }
-                        }
-                    }
-                    else {                      /* contiguous in window */
-                        from += wnext - op;
-                        if (op < len) {         /* some from window */
-                            len -= op;
-                            do {
-                                PUP(out) = PUP(from);
-                            } while (--op);
-                            from = out - dist;  /* rest from output */
-                        }
-                    }
-                    while (len > 2) {
-                        PUP(out) = PUP(from);
-                        PUP(out) = PUP(from);
-                        PUP(out) = PUP(from);
-                        len -= 3;
-                    }
-                    if (len) {
-                        PUP(out) = PUP(from);
-                        if (len > 1)
-                            PUP(out) = PUP(from);
-                    }
-                }
-                else {
-                    from = out - dist;          /* copy direct from output */
-                    do {                        /* minimum length is three */
-                        PUP(out) = PUP(from);
-                        PUP(out) = PUP(from);
-                        PUP(out) = PUP(from);
-                        len -= 3;
-                    } while (len > 2);
-                    if (len) {
-                        PUP(out) = PUP(from);
-                        if (len > 1)
-                            PUP(out) = PUP(from);
-                    }
-                }
-            }
-            else if ((op & 64) == 0) {          /* 2nd level distance code */
-                here = dcode[here.val + (hold & ((1U << op) - 1))];
-                goto dodist;
-            }
-            else {
-                strm->msg = (char *)"invalid distance code";
-                state->mode = BAD;
-                break;
-            }
-        }
-        else if ((op & 64) == 0) {              /* 2nd level length code */
-            here = lcode[here.val + (hold & ((1U << op) - 1))];
-            goto dolen;
-        }
-        else if (op & 32) {                     /* end-of-block */
-            Tracevv((stderr, "inflate:         end of block\n"));
-            state->mode = TYPE;
-            break;
-        }
-        else {
-            strm->msg = (char *)"invalid literal/length code";
-            state->mode = BAD;
-            break;
-        }
-    } while (in < last && out < end);
-
-    /* return unused bytes (on entry, bits < 8, so in won't go too far back) */
-    len = bits >> 3;
-    in -= len;
-    bits -= len << 3;
-    hold &= (1U << bits) - 1;
-
-    /* update state and return */
-    strm->next_in = in + OFF;
-    strm->next_out = out + OFF;
-    strm->avail_in = (unsigned)(in < last ? 5 + (last - in) : 5 - (in - last));
-    strm->avail_out = (unsigned)(out < end ?
-                                 257 + (end - out) : 257 - (out - end));
-    state->hold = hold;
-    state->bits = bits;
-    return;
-}
-
-/*
-   inflate_fast() speedups that turned out slower (on a PowerPC G3 750CXe):
-   - Using bit fields for code structure
-   - Different op definition to avoid & for extra bits (do & for table bits)
-   - Three separate decoding do-loops for direct, window, and wnext == 0
-   - Special case for distance > 1 copies to do overlapped load and store copy
-   - Explicit branch predictions (based on measured branch probabilities)
-   - Deferring match copy and interspersed it with decoding subsequent codes
-   - Swapping literal/length else
-   - Swapping window/direct else
-   - Larger unrolled copy loops (three is about right)
-   - Moving len -= 3 statement into middle of loop
- */
-
-#endif /* !ASMINF */
diff --git a/src/extra/zlib/inffast.h b/src/extra/zlib/inffast.h
deleted file mode 100644
index e5c1aa4..0000000
--- a/src/extra/zlib/inffast.h
+++ /dev/null
@@ -1,11 +0,0 @@
-/* inffast.h -- header to use inffast.c
- * Copyright (C) 1995-2003, 2010 Mark Adler
- * For conditions of distribution and use, see copyright notice in zlib.h
- */
-
-/* WARNING: this file should *not* be used by applications. It is
-   part of the implementation of the compression library and is
-   subject to change. Applications should only use zlib.h.
- */
-
-void ZLIB_INTERNAL inflate_fast OF((z_streamp strm, unsigned start));
diff --git a/src/extra/zlib/inffixed.h b/src/extra/zlib/inffixed.h
deleted file mode 100644
index d628327..0000000
--- a/src/extra/zlib/inffixed.h
+++ /dev/null
@@ -1,94 +0,0 @@
-    /* inffixed.h -- table for decoding fixed codes
-     * Generated automatically by makefixed().
-     */
-
-    /* WARNING: this file should *not* be used by applications.
-       It is part of the implementation of this library and is
-       subject to change. Applications should only use zlib.h.
-     */
-
-    static const code lenfix[512] = {
-        {96,7,0},{0,8,80},{0,8,16},{20,8,115},{18,7,31},{0,8,112},{0,8,48},
-        {0,9,192},{16,7,10},{0,8,96},{0,8,32},{0,9,160},{0,8,0},{0,8,128},
-        {0,8,64},{0,9,224},{16,7,6},{0,8,88},{0,8,24},{0,9,144},{19,7,59},
-        {0,8,120},{0,8,56},{0,9,208},{17,7,17},{0,8,104},{0,8,40},{0,9,176},
-        {0,8,8},{0,8,136},{0,8,72},{0,9,240},{16,7,4},{0,8,84},{0,8,20},
-        {21,8,227},{19,7,43},{0,8,116},{0,8,52},{0,9,200},{17,7,13},{0,8,100},
-        {0,8,36},{0,9,168},{0,8,4},{0,8,132},{0,8,68},{0,9,232},{16,7,8},
-        {0,8,92},{0,8,28},{0,9,152},{20,7,83},{0,8,124},{0,8,60},{0,9,216},
-        {18,7,23},{0,8,108},{0,8,44},{0,9,184},{0,8,12},{0,8,140},{0,8,76},
-        {0,9,248},{16,7,3},{0,8,82},{0,8,18},{21,8,163},{19,7,35},{0,8,114},
-        {0,8,50},{0,9,196},{17,7,11},{0,8,98},{0,8,34},{0,9,164},{0,8,2},
-        {0,8,130},{0,8,66},{0,9,228},{16,7,7},{0,8,90},{0,8,26},{0,9,148},
-        {20,7,67},{0,8,122},{0,8,58},{0,9,212},{18,7,19},{0,8,106},{0,8,42},
-        {0,9,180},{0,8,10},{0,8,138},{0,8,74},{0,9,244},{16,7,5},{0,8,86},
-        {0,8,22},{64,8,0},{19,7,51},{0,8,118},{0,8,54},{0,9,204},{17,7,15},
-        {0,8,102},{0,8,38},{0,9,172},{0,8,6},{0,8,134},{0,8,70},{0,9,236},
-        {16,7,9},{0,8,94},{0,8,30},{0,9,156},{20,7,99},{0,8,126},{0,8,62},
-        {0,9,220},{18,7,27},{0,8,110},{0,8,46},{0,9,188},{0,8,14},{0,8,142},
-        {0,8,78},{0,9,252},{96,7,0},{0,8,81},{0,8,17},{21,8,131},{18,7,31},
-        {0,8,113},{0,8,49},{0,9,194},{16,7,10},{0,8,97},{0,8,33},{0,9,162},
-        {0,8,1},{0,8,129},{0,8,65},{0,9,226},{16,7,6},{0,8,89},{0,8,25},
-        {0,9,146},{19,7,59},{0,8,121},{0,8,57},{0,9,210},{17,7,17},{0,8,105},
-        {0,8,41},{0,9,178},{0,8,9},{0,8,137},{0,8,73},{0,9,242},{16,7,4},
-        {0,8,85},{0,8,21},{16,8,258},{19,7,43},{0,8,117},{0,8,53},{0,9,202},
-        {17,7,13},{0,8,101},{0,8,37},{0,9,170},{0,8,5},{0,8,133},{0,8,69},
-        {0,9,234},{16,7,8},{0,8,93},{0,8,29},{0,9,154},{20,7,83},{0,8,125},
-        {0,8,61},{0,9,218},{18,7,23},{0,8,109},{0,8,45},{0,9,186},{0,8,13},
-        {0,8,141},{0,8,77},{0,9,250},{16,7,3},{0,8,83},{0,8,19},{21,8,195},
-        {19,7,35},{0,8,115},{0,8,51},{0,9,198},{17,7,11},{0,8,99},{0,8,35},
-        {0,9,166},{0,8,3},{0,8,131},{0,8,67},{0,9,230},{16,7,7},{0,8,91},
-        {0,8,27},{0,9,150},{20,7,67},{0,8,123},{0,8,59},{0,9,214},{18,7,19},
-        {0,8,107},{0,8,43},{0,9,182},{0,8,11},{0,8,139},{0,8,75},{0,9,246},
-        {16,7,5},{0,8,87},{0,8,23},{64,8,0},{19,7,51},{0,8,119},{0,8,55},
-        {0,9,206},{17,7,15},{0,8,103},{0,8,39},{0,9,174},{0,8,7},{0,8,135},
-        {0,8,71},{0,9,238},{16,7,9},{0,8,95},{0,8,31},{0,9,158},{20,7,99},
-        {0,8,127},{0,8,63},{0,9,222},{18,7,27},{0,8,111},{0,8,47},{0,9,190},
-        {0,8,15},{0,8,143},{0,8,79},{0,9,254},{96,7,0},{0,8,80},{0,8,16},
-        {20,8,115},{18,7,31},{0,8,112},{0,8,48},{0,9,193},{16,7,10},{0,8,96},
-        {0,8,32},{0,9,161},{0,8,0},{0,8,128},{0,8,64},{0,9,225},{16,7,6},
-        {0,8,88},{0,8,24},{0,9,145},{19,7,59},{0,8,120},{0,8,56},{0,9,209},
-        {17,7,17},{0,8,104},{0,8,40},{0,9,177},{0,8,8},{0,8,136},{0,8,72},
-        {0,9,241},{16,7,4},{0,8,84},{0,8,20},{21,8,227},{19,7,43},{0,8,116},
-        {0,8,52},{0,9,201},{17,7,13},{0,8,100},{0,8,36},{0,9,169},{0,8,4},
-        {0,8,132},{0,8,68},{0,9,233},{16,7,8},{0,8,92},{0,8,28},{0,9,153},
-        {20,7,83},{0,8,124},{0,8,60},{0,9,217},{18,7,23},{0,8,108},{0,8,44},
-        {0,9,185},{0,8,12},{0,8,140},{0,8,76},{0,9,249},{16,7,3},{0,8,82},
-        {0,8,18},{21,8,163},{19,7,35},{0,8,114},{0,8,50},{0,9,197},{17,7,11},
-        {0,8,98},{0,8,34},{0,9,165},{0,8,2},{0,8,130},{0,8,66},{0,9,229},
-        {16,7,7},{0,8,90},{0,8,26},{0,9,149},{20,7,67},{0,8,122},{0,8,58},
-        {0,9,213},{18,7,19},{0,8,106},{0,8,42},{0,9,181},{0,8,10},{0,8,138},
-        {0,8,74},{0,9,245},{16,7,5},{0,8,86},{0,8,22},{64,8,0},{19,7,51},
-        {0,8,118},{0,8,54},{0,9,205},{17,7,15},{0,8,102},{0,8,38},{0,9,173},
-        {0,8,6},{0,8,134},{0,8,70},{0,9,237},{16,7,9},{0,8,94},{0,8,30},
-        {0,9,157},{20,7,99},{0,8,126},{0,8,62},{0,9,221},{18,7,27},{0,8,110},
-        {0,8,46},{0,9,189},{0,8,14},{0,8,142},{0,8,78},{0,9,253},{96,7,0},
-        {0,8,81},{0,8,17},{21,8,131},{18,7,31},{0,8,113},{0,8,49},{0,9,195},
-        {16,7,10},{0,8,97},{0,8,33},{0,9,163},{0,8,1},{0,8,129},{0,8,65},
-        {0,9,227},{16,7,6},{0,8,89},{0,8,25},{0,9,147},{19,7,59},{0,8,121},
-        {0,8,57},{0,9,211},{17,7,17},{0,8,105},{0,8,41},{0,9,179},{0,8,9},
-        {0,8,137},{0,8,73},{0,9,243},{16,7,4},{0,8,85},{0,8,21},{16,8,258},
-        {19,7,43},{0,8,117},{0,8,53},{0,9,203},{17,7,13},{0,8,101},{0,8,37},
-        {0,9,171},{0,8,5},{0,8,133},{0,8,69},{0,9,235},{16,7,8},{0,8,93},
-        {0,8,29},{0,9,155},{20,7,83},{0,8,125},{0,8,61},{0,9,219},{18,7,23},
-        {0,8,109},{0,8,45},{0,9,187},{0,8,13},{0,8,141},{0,8,77},{0,9,251},
-        {16,7,3},{0,8,83},{0,8,19},{21,8,195},{19,7,35},{0,8,115},{0,8,51},
-        {0,9,199},{17,7,11},{0,8,99},{0,8,35},{0,9,167},{0,8,3},{0,8,131},
-        {0,8,67},{0,9,231},{16,7,7},{0,8,91},{0,8,27},{0,9,151},{20,7,67},
-        {0,8,123},{0,8,59},{0,9,215},{18,7,19},{0,8,107},{0,8,43},{0,9,183},
-        {0,8,11},{0,8,139},{0,8,75},{0,9,247},{16,7,5},{0,8,87},{0,8,23},
-        {64,8,0},{19,7,51},{0,8,119},{0,8,55},{0,9,207},{17,7,15},{0,8,103},
-        {0,8,39},{0,9,175},{0,8,7},{0,8,135},{0,8,71},{0,9,239},{16,7,9},
-        {0,8,95},{0,8,31},{0,9,159},{20,7,99},{0,8,127},{0,8,63},{0,9,223},
-        {18,7,27},{0,8,111},{0,8,47},{0,9,191},{0,8,15},{0,8,143},{0,8,79},
-        {0,9,255}
-    };
-
-    static const code distfix[32] = {
-        {16,5,1},{23,5,257},{19,5,17},{27,5,4097},{17,5,5},{25,5,1025},
-        {21,5,65},{29,5,16385},{16,5,3},{24,5,513},{20,5,33},{28,5,8193},
-        {18,5,9},{26,5,2049},{22,5,129},{64,5,0},{16,5,2},{23,5,385},
-        {19,5,25},{27,5,6145},{17,5,7},{25,5,1537},{21,5,97},{29,5,24577},
-        {16,5,4},{24,5,769},{20,5,49},{28,5,12289},{18,5,13},{26,5,3073},
-        {22,5,193},{64,5,0}
-    };
diff --git a/src/extra/zlib/inflate.c b/src/extra/zlib/inflate.c
deleted file mode 100644
index 870f89b..0000000
--- a/src/extra/zlib/inflate.c
+++ /dev/null
@@ -1,1512 +0,0 @@
-/* inflate.c -- zlib decompression
- * Copyright (C) 1995-2012 Mark Adler
- * For conditions of distribution and use, see copyright notice in zlib.h
- */
-
-/*
- * Change history:
- *
- * 1.2.beta0    24 Nov 2002
- * - First version -- complete rewrite of inflate to simplify code, avoid
- *   creation of window when not needed, minimize use of window when it is
- *   needed, make inffast.c even faster, implement gzip decoding, and to
- *   improve code readability and style over the previous zlib inflate code
- *
- * 1.2.beta1    25 Nov 2002
- * - Use pointers for available input and output checking in inffast.c
- * - Remove input and output counters in inffast.c
- * - Change inffast.c entry and loop from avail_in >= 7 to >= 6
- * - Remove unnecessary second byte pull from length extra in inffast.c
- * - Unroll direct copy to three copies per loop in inffast.c
- *
- * 1.2.beta2    4 Dec 2002
- * - Change external routine names to reduce potential conflicts
- * - Correct filename to inffixed.h for fixed tables in inflate.c
- * - Make hbuf[] unsigned char to match parameter type in inflate.c
- * - Change strm->next_out[-state->offset] to *(strm->next_out - state->offset)
- *   to avoid negation problem on Alphas (64 bit) in inflate.c
- *
- * 1.2.beta3    22 Dec 2002
- * - Add comments on state->bits assertion in inffast.c
- * - Add comments on op field in inftrees.h
- * - Fix bug in reuse of allocated window after inflateReset()
- * - Remove bit fields--back to byte structure for speed
- * - Remove distance extra == 0 check in inflate_fast()--only helps for lengths
- * - Change post-increments to pre-increments in inflate_fast(), PPC biased?
- * - Add compile time option, POSTINC, to use post-increments instead (Intel?)
- * - Make MATCH copy in inflate() much faster for when inflate_fast() not used
- * - Use local copies of stream next and avail values, as well as local bit
- *   buffer and bit count in inflate()--for speed when inflate_fast() not used
- *
- * 1.2.beta4    1 Jan 2003
- * - Split ptr - 257 statements in inflate_table() to avoid compiler warnings
- * - Move a comment on output buffer sizes from inffast.c to inflate.c
- * - Add comments in inffast.c to introduce the inflate_fast() routine
- * - Rearrange window copies in inflate_fast() for speed and simplification
- * - Unroll last copy for window match in inflate_fast()
- * - Use local copies of window variables in inflate_fast() for speed
- * - Pull out common wnext == 0 case for speed in inflate_fast()
- * - Make op and len in inflate_fast() unsigned for consistency
- * - Add FAR to lcode and dcode declarations in inflate_fast()
- * - Simplified bad distance check in inflate_fast()
- * - Added inflateBackInit(), inflateBack(), and inflateBackEnd() in new
- *   source file infback.c to provide a call-back interface to inflate for
- *   programs like gzip and unzip -- uses window as output buffer to avoid
- *   window copying
- *
- * 1.2.beta5    1 Jan 2003
- * - Improved inflateBack() interface to allow the caller to provide initial
- *   input in strm.
- * - Fixed stored blocks bug in inflateBack()
- *
- * 1.2.beta6    4 Jan 2003
- * - Added comments in inffast.c on effectiveness of POSTINC
- * - Typecasting all around to reduce compiler warnings
- * - Changed loops from while (1) or do {} while (1) to for (;;), again to
- *   make compilers happy
- * - Changed type of window in inflateBackInit() to unsigned char *
- *
- * 1.2.beta7    27 Jan 2003
- * - Changed many types to unsigned or unsigned short to avoid warnings
- * - Added inflateCopy() function
- *
- * 1.2.0        9 Mar 2003
- * - Changed inflateBack() interface to provide separate opaque descriptors
- *   for the in() and out() functions
- * - Changed inflateBack() argument and in_func typedef to swap the length
- *   and buffer address return values for the input function
- * - Check next_in and next_out for Z_NULL on entry to inflate()
- *
- * The history for versions after 1.2.0 are in ChangeLog in zlib distribution.
- */
-
-#include "zutil.h"
-#include "inftrees.h"
-#include "inflate.h"
-#include "inffast.h"
-
-#ifdef MAKEFIXED
-#  ifndef BUILDFIXED
-#    define BUILDFIXED
-#  endif
-#endif
-
-/* function prototypes */
-local void fixedtables OF((struct inflate_state FAR *state));
-local int updatewindow OF((z_streamp strm, const unsigned char FAR *end,
-                           unsigned copy));
-#ifdef BUILDFIXED
-   void makefixed OF((void));
-#endif
-local unsigned syncsearch OF((unsigned FAR *have, const unsigned char FAR *buf,
-                              unsigned len));
-
-int ZEXPORT inflateResetKeep(strm)
-z_streamp strm;
-{
-    struct inflate_state FAR *state;
-
-    if (strm == Z_NULL || strm->state == Z_NULL) return Z_STREAM_ERROR;
-    state = (struct inflate_state FAR *)strm->state;
-    strm->total_in = strm->total_out = state->total = 0;
-    strm->msg = Z_NULL;
-    if (state->wrap)        /* to support ill-conceived Java test suite */
-        strm->adler = state->wrap & 1;
-    state->mode = HEAD;
-    state->last = 0;
-    state->havedict = 0;
-    state->dmax = 32768U;
-    state->head = Z_NULL;
-    state->hold = 0;
-    state->bits = 0;
-    state->lencode = state->distcode = state->next = state->codes;
-    state->sane = 1;
-    state->back = -1;
-    Tracev((stderr, "inflate: reset\n"));
-    return Z_OK;
-}
-
-int ZEXPORT inflateReset(strm)
-z_streamp strm;
-{
-    struct inflate_state FAR *state;
-
-    if (strm == Z_NULL || strm->state == Z_NULL) return Z_STREAM_ERROR;
-    state = (struct inflate_state FAR *)strm->state;
-    state->wsize = 0;
-    state->whave = 0;
-    state->wnext = 0;
-    return inflateResetKeep(strm);
-}
-
-int ZEXPORT inflateReset2(strm, windowBits)
-z_streamp strm;
-int windowBits;
-{
-    int wrap;
-    struct inflate_state FAR *state;
-
-    /* get the state */
-    if (strm == Z_NULL || strm->state == Z_NULL) return Z_STREAM_ERROR;
-    state = (struct inflate_state FAR *)strm->state;
-
-    /* extract wrap request from windowBits parameter */
-    if (windowBits < 0) {
-        wrap = 0;
-        windowBits = -windowBits;
-    }
-    else {
-        wrap = (windowBits >> 4) + 1;
-#ifdef GUNZIP
-        if (windowBits < 48)
-            windowBits &= 15;
-#endif
-    }
-
-    /* set number of window bits, free window if different */
-    if (windowBits && (windowBits < 8 || windowBits > 15))
-        return Z_STREAM_ERROR;
-    if (state->window != Z_NULL && state->wbits != (unsigned)windowBits) {
-        ZFREE(strm, state->window);
-        state->window = Z_NULL;
-    }
-
-    /* update state and reset the rest of it */
-    state->wrap = wrap;
-    state->wbits = (unsigned)windowBits;
-    return inflateReset(strm);
-}
-
-int ZEXPORT inflateInit2_(strm, windowBits, version, stream_size)
-z_streamp strm;
-int windowBits;
-const char *version;
-int stream_size;
-{
-    int ret;
-    struct inflate_state FAR *state;
-
-    if (version == Z_NULL || version[0] != ZLIB_VERSION[0] ||
-        stream_size != (int)(sizeof(z_stream)))
-        return Z_VERSION_ERROR;
-    if (strm == Z_NULL) return Z_STREAM_ERROR;
-    strm->msg = Z_NULL;                 /* in case we return an error */
-    if (strm->zalloc == (alloc_func)0) {
-#ifdef Z_SOLO
-        return Z_STREAM_ERROR;
-#else
-        strm->zalloc = zcalloc;
-        strm->opaque = (voidpf)0;
-#endif
-    }
-    if (strm->zfree == (free_func)0)
-#ifdef Z_SOLO
-        return Z_STREAM_ERROR;
-#else
-        strm->zfree = zcfree;
-#endif
-    state = (struct inflate_state FAR *)
-            ZALLOC(strm, 1, sizeof(struct inflate_state));
-    if (state == Z_NULL) return Z_MEM_ERROR;
-    Tracev((stderr, "inflate: allocated\n"));
-    strm->state = (struct internal_state FAR *)state;
-    state->window = Z_NULL;
-    ret = inflateReset2(strm, windowBits);
-    if (ret != Z_OK) {
-        ZFREE(strm, state);
-        strm->state = Z_NULL;
-    }
-    return ret;
-}
-
-int ZEXPORT inflateInit_(strm, version, stream_size)
-z_streamp strm;
-const char *version;
-int stream_size;
-{
-    return inflateInit2_(strm, DEF_WBITS, version, stream_size);
-}
-
-int ZEXPORT inflatePrime(strm, bits, value)
-z_streamp strm;
-int bits;
-int value;
-{
-    struct inflate_state FAR *state;
-
-    if (strm == Z_NULL || strm->state == Z_NULL) return Z_STREAM_ERROR;
-    state = (struct inflate_state FAR *)strm->state;
-    if (bits < 0) {
-        state->hold = 0;
-        state->bits = 0;
-        return Z_OK;
-    }
-    if (bits > 16 || state->bits + bits > 32) return Z_STREAM_ERROR;
-    value &= (1L << bits) - 1;
-    state->hold += value << state->bits;
-    state->bits += bits;
-    return Z_OK;
-}
-
-/*
-   Return state with length and distance decoding tables and index sizes set to
-   fixed code decoding.  Normally this returns fixed tables from inffixed.h.
-   If BUILDFIXED is defined, then instead this routine builds the tables the
-   first time it's called, and returns those tables the first time and
-   thereafter.  This reduces the size of the code by about 2K bytes, in
-   exchange for a little execution time.  However, BUILDFIXED should not be
-   used for threaded applications, since the rewriting of the tables and virgin
-   may not be thread-safe.
- */
-local void fixedtables(state)
-struct inflate_state FAR *state;
-{
-#ifdef BUILDFIXED
-    static int virgin = 1;
-    static code *lenfix, *distfix;
-    static code fixed[544];
-
-    /* build fixed huffman tables if first call (may not be thread safe) */
-    if (virgin) {
-        unsigned sym, bits;
-        static code *next;
-
-        /* literal/length table */
-        sym = 0;
-        while (sym < 144) state->lens[sym++] = 8;
-        while (sym < 256) state->lens[sym++] = 9;
-        while (sym < 280) state->lens[sym++] = 7;
-        while (sym < 288) state->lens[sym++] = 8;
-        next = fixed;
-        lenfix = next;
-        bits = 9;
-        inflate_table(LENS, state->lens, 288, &(next), &(bits), state->work);
-
-        /* distance table */
-        sym = 0;
-        while (sym < 32) state->lens[sym++] = 5;
-        distfix = next;
-        bits = 5;
-        inflate_table(DISTS, state->lens, 32, &(next), &(bits), state->work);
-
-        /* do this just once */
-        virgin = 0;
-    }
-#else /* !BUILDFIXED */
-#   include "inffixed.h"
-#endif /* BUILDFIXED */
-    state->lencode = lenfix;
-    state->lenbits = 9;
-    state->distcode = distfix;
-    state->distbits = 5;
-}
-
-#ifdef MAKEFIXED
-#include <stdio.h>
-
-/*
-   Write out the inffixed.h that is #include'd above.  Defining MAKEFIXED also
-   defines BUILDFIXED, so the tables are built on the fly.  makefixed() writes
-   those tables to stdout, which would be piped to inffixed.h.  A small program
-   can simply call makefixed to do this:
-
-    void makefixed(void);
-
-    int main(void)
-    {
-        makefixed();
-        return 0;
-    }
-
-   Then that can be linked with zlib built with MAKEFIXED defined and run:
-
-    a.out > inffixed.h
- */
-void makefixed()
-{
-    unsigned low, size;
-    struct inflate_state state;
-
-    fixedtables(&state);
-    puts("    /* inffixed.h -- table for decoding fixed codes");
-    puts("     * Generated automatically by makefixed().");
-    puts("     */");
-    puts("");
-    puts("    /* WARNING: this file should *not* be used by applications.");
-    puts("       It is part of the implementation of this library and is");
-    puts("       subject to change. Applications should only use zlib.h.");
-    puts("     */");
-    puts("");
-    size = 1U << 9;
-    printf("    static const code lenfix[%u] = {", size);
-    low = 0;
-    for (;;) {
-        if ((low % 7) == 0) printf("\n        ");
-        printf("{%u,%u,%d}", (low & 127) == 99 ? 64 : state.lencode[low].op,
-               state.lencode[low].bits, state.lencode[low].val);
-        if (++low == size) break;
-        putchar(',');
-    }
-    puts("\n    };");
-    size = 1U << 5;
-    printf("\n    static const code distfix[%u] = {", size);
-    low = 0;
-    for (;;) {
-        if ((low % 6) == 0) printf("\n        ");
-        printf("{%u,%u,%d}", state.distcode[low].op, state.distcode[low].bits,
-               state.distcode[low].val);
-        if (++low == size) break;
-        putchar(',');
-    }
-    puts("\n    };");
-}
-#endif /* MAKEFIXED */
-
-/*
-   Update the window with the last wsize (normally 32K) bytes written before
-   returning.  If window does not exist yet, create it.  This is only called
-   when a window is already in use, or when output has been written during this
-   inflate call, but the end of the deflate stream has not been reached yet.
-   It is also called to create a window for dictionary data when a dictionary
-   is loaded.
-
-   Providing output buffers larger than 32K to inflate() should provide a speed
-   advantage, since only the last 32K of output is copied to the sliding window
-   upon return from inflate(), and since all distances after the first 32K of
-   output will fall in the output data, making match copies simpler and faster.
-   The advantage may be dependent on the size of the processor's data caches.
- */
-local int updatewindow(strm, end, copy)
-z_streamp strm;
-const Bytef *end;
-unsigned copy;
-{
-    struct inflate_state FAR *state;
-    unsigned dist;
-
-    state = (struct inflate_state FAR *)strm->state;
-
-    /* if it hasn't been done already, allocate space for the window */
-    if (state->window == Z_NULL) {
-        state->window = (unsigned char FAR *)
-                        ZALLOC(strm, 1U << state->wbits,
-                               sizeof(unsigned char));
-        if (state->window == Z_NULL) return 1;
-    }
-
-    /* if window not in use yet, initialize */
-    if (state->wsize == 0) {
-        state->wsize = 1U << state->wbits;
-        state->wnext = 0;
-        state->whave = 0;
-    }
-
-    /* copy state->wsize or less output bytes into the circular window */
-    if (copy >= state->wsize) {
-        zmemcpy(state->window, end - state->wsize, state->wsize);
-        state->wnext = 0;
-        state->whave = state->wsize;
-    }
-    else {
-        dist = state->wsize - state->wnext;
-        if (dist > copy) dist = copy;
-        zmemcpy(state->window + state->wnext, end - copy, dist);
-        copy -= dist;
-        if (copy) {
-            zmemcpy(state->window, end - copy, copy);
-            state->wnext = copy;
-            state->whave = state->wsize;
-        }
-        else {
-            state->wnext += dist;
-            if (state->wnext == state->wsize) state->wnext = 0;
-            if (state->whave < state->wsize) state->whave += dist;
-        }
-    }
-    return 0;
-}
-
-/* Macros for inflate(): */
-
-/* check function to use adler32() for zlib or crc32() for gzip */
-#ifdef GUNZIP
-#  define UPDATE(check, buf, len) \
-    (state->flags ? crc32(check, buf, len) : adler32(check, buf, len))
-#else
-#  define UPDATE(check, buf, len) adler32(check, buf, len)
-#endif
-
-/* check macros for header crc */
-#ifdef GUNZIP
-#  define CRC2(check, word) \
-    do { \
-        hbuf[0] = (unsigned char)(word); \
-        hbuf[1] = (unsigned char)((word) >> 8); \
-        check = crc32(check, hbuf, 2); \
-    } while (0)
-
-#  define CRC4(check, word) \
-    do { \
-        hbuf[0] = (unsigned char)(word); \
-        hbuf[1] = (unsigned char)((word) >> 8); \
-        hbuf[2] = (unsigned char)((word) >> 16); \
-        hbuf[3] = (unsigned char)((word) >> 24); \
-        check = crc32(check, hbuf, 4); \
-    } while (0)
-#endif
-
-/* Load registers with state in inflate() for speed */
-#define LOAD() \
-    do { \
-        put = strm->next_out; \
-        left = strm->avail_out; \
-        next = strm->next_in; \
-        have = strm->avail_in; \
-        hold = state->hold; \
-        bits = state->bits; \
-    } while (0)
-
-/* Restore state from registers in inflate() */
-#define RESTORE() \
-    do { \
-        strm->next_out = put; \
-        strm->avail_out = left; \
-        strm->next_in = next; \
-        strm->avail_in = have; \
-        state->hold = hold; \
-        state->bits = bits; \
-    } while (0)
-
-/* Clear the input bit accumulator */
-#define INITBITS() \
-    do { \
-        hold = 0; \
-        bits = 0; \
-    } while (0)
-
-/* Get a byte of input into the bit accumulator, or return from inflate()
-   if there is no input available. */
-#define PULLBYTE() \
-    do { \
-        if (have == 0) goto inf_leave; \
-        have--; \
-        hold += (unsigned long)(*next++) << bits; \
-        bits += 8; \
-    } while (0)
-
-/* Assure that there are at least n bits in the bit accumulator.  If there is
-   not enough available input to do that, then return from inflate(). */
-#define NEEDBITS(n) \
-    do { \
-        while (bits < (unsigned)(n)) \
-            PULLBYTE(); \
-    } while (0)
-
-/* Return the low n bits of the bit accumulator (n < 16) */
-#define BITS(n) \
-    ((unsigned)hold & ((1U << (n)) - 1))
-
-/* Remove n bits from the bit accumulator */
-#define DROPBITS(n) \
-    do { \
-        hold >>= (n); \
-        bits -= (unsigned)(n); \
-    } while (0)
-
-/* Remove zero to seven bits as needed to go to a byte boundary */
-#define BYTEBITS() \
-    do { \
-        hold >>= bits & 7; \
-        bits -= bits & 7; \
-    } while (0)
-
-/*
-   inflate() uses a state machine to process as much input data and generate as
-   much output data as possible before returning.  The state machine is
-   structured roughly as follows:
-
-    for (;;) switch (state) {
-    ...
-    case STATEn:
-        if (not enough input data or output space to make progress)
-            return;
-        ... make progress ...
-        state = STATEm;
-        break;
-    ...
-    }
-
-   so when inflate() is called again, the same case is attempted again, and
-   if the appropriate resources are provided, the machine proceeds to the
-   next state.  The NEEDBITS() macro is usually the way the state evaluates
-   whether it can proceed or should return.  NEEDBITS() does the return if
-   the requested bits are not available.  The typical use of the BITS macros
-   is:
-
-        NEEDBITS(n);
-        ... do something with BITS(n) ...
-        DROPBITS(n);
-
-   where NEEDBITS(n) either returns from inflate() if there isn't enough
-   input left to load n bits into the accumulator, or it continues.  BITS(n)
-   gives the low n bits in the accumulator.  When done, DROPBITS(n) drops
-   the low n bits off the accumulator.  INITBITS() clears the accumulator
-   and sets the number of available bits to zero.  BYTEBITS() discards just
-   enough bits to put the accumulator on a byte boundary.  After BYTEBITS()
-   and a NEEDBITS(8), then BITS(8) would return the next byte in the stream.
-
-   NEEDBITS(n) uses PULLBYTE() to get an available byte of input, or to return
-   if there is no input available.  The decoding of variable length codes uses
-   PULLBYTE() directly in order to pull just enough bytes to decode the next
-   code, and no more.
-
-   Some states loop until they get enough input, making sure that enough
-   state information is maintained to continue the loop where it left off
-   if NEEDBITS() returns in the loop.  For example, want, need, and keep
-   would all have to actually be part of the saved state in case NEEDBITS()
-   returns:
-
-    case STATEw:
-        while (want < need) {
-            NEEDBITS(n);
-            keep[want++] = BITS(n);
-            DROPBITS(n);
-        }
-        state = STATEx;
-    case STATEx:
-
-   As shown above, if the next state is also the next case, then the break
-   is omitted.
-
-   A state may also return if there is not enough output space available to
-   complete that state.  Those states are copying stored data, writing a
-   literal byte, and copying a matching string.
-
-   When returning, a "goto inf_leave" is used to update the total counters,
-   update the check value, and determine whether any progress has been made
-   during that inflate() call in order to return the proper return code.
-   Progress is defined as a change in either strm->avail_in or strm->avail_out.
-   When there is a window, goto inf_leave will update the window with the last
-   output written.  If a goto inf_leave occurs in the middle of decompression
-   and there is no window currently, goto inf_leave will create one and copy
-   output to the window for the next call of inflate().
-
-   In this implementation, the flush parameter of inflate() only affects the
-   return code (per zlib.h).  inflate() always writes as much as possible to
-   strm->next_out, given the space available and the provided input--the effect
-   documented in zlib.h of Z_SYNC_FLUSH.  Furthermore, inflate() always defers
-   the allocation of and copying into a sliding window until necessary, which
-   provides the effect documented in zlib.h for Z_FINISH when the entire input
-   stream available.  So the only thing the flush parameter actually does is:
-   when flush is set to Z_FINISH, inflate() cannot return Z_OK.  Instead it
-   will return Z_BUF_ERROR if it has not reached the end of the stream.
- */
-
-int ZEXPORT inflate(strm, flush)
-z_streamp strm;
-int flush;
-{
-    struct inflate_state FAR *state;
-    z_const unsigned char FAR *next;    /* next input */
-    unsigned char FAR *put;     /* next output */
-    unsigned have, left;        /* available input and output */
-    unsigned long hold;         /* bit buffer */
-    unsigned bits;              /* bits in bit buffer */
-    unsigned in, out;           /* save starting available input and output */
-    unsigned copy;              /* number of stored or match bytes to copy */
-    unsigned char FAR *from;    /* where to copy match bytes from */
-    code here;                  /* current decoding table entry */
-    code last;                  /* parent table entry */
-    unsigned len;               /* length to copy for repeats, bits to drop */
-    int ret;                    /* return code */
-#ifdef GUNZIP
-    unsigned char hbuf[4];      /* buffer for gzip header crc calculation */
-#endif
-    static const unsigned short order[19] = /* permutation of code lengths */
-        {16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15};
-
-    if (strm == Z_NULL || strm->state == Z_NULL || strm->next_out == Z_NULL ||
-        (strm->next_in == Z_NULL && strm->avail_in != 0))
-        return Z_STREAM_ERROR;
-
-    state = (struct inflate_state FAR *)strm->state;
-    if (state->mode == TYPE) state->mode = TYPEDO;      /* skip check */
-    LOAD();
-    in = have;
-    out = left;
-    ret = Z_OK;
-    for (;;)
-        switch (state->mode) {
-        case HEAD:
-            if (state->wrap == 0) {
-                state->mode = TYPEDO;
-                break;
-            }
-            NEEDBITS(16);
-#ifdef GUNZIP
-            if ((state->wrap & 2) && hold == 0x8b1f) {  /* gzip header */
-                state->check = crc32(0L, Z_NULL, 0);
-                CRC2(state->check, hold);
-                INITBITS();
-                state->mode = FLAGS;
-                break;
-            }
-            state->flags = 0;           /* expect zlib header */
-            if (state->head != Z_NULL)
-                state->head->done = -1;
-            if (!(state->wrap & 1) ||   /* check if zlib header allowed */
-#else
-            if (
-#endif
-                ((BITS(8) << 8) + (hold >> 8)) % 31) {
-                strm->msg = (char *)"incorrect header check";
-                state->mode = BAD;
-                break;
-            }
-            if (BITS(4) != Z_DEFLATED) {
-                strm->msg = (char *)"unknown compression method";
-                state->mode = BAD;
-                break;
-            }
-            DROPBITS(4);
-            len = BITS(4) + 8;
-            if (state->wbits == 0)
-                state->wbits = len;
-            else if (len > state->wbits) {
-                strm->msg = (char *)"invalid window size";
-                state->mode = BAD;
-                break;
-            }
-            state->dmax = 1U << len;
-            Tracev((stderr, "inflate:   zlib header ok\n"));
-            strm->adler = state->check = adler32(0L, Z_NULL, 0);
-            state->mode = hold & 0x200 ? DICTID : TYPE;
-            INITBITS();
-            break;
-#ifdef GUNZIP
-        case FLAGS:
-            NEEDBITS(16);
-            state->flags = (int)(hold);
-            if ((state->flags & 0xff) != Z_DEFLATED) {
-                strm->msg = (char *)"unknown compression method";
-                state->mode = BAD;
-                break;
-            }
-            if (state->flags & 0xe000) {
-                strm->msg = (char *)"unknown header flags set";
-                state->mode = BAD;
-                break;
-            }
-            if (state->head != Z_NULL)
-                state->head->text = (int)((hold >> 8) & 1);
-            if (state->flags & 0x0200) CRC2(state->check, hold);
-            INITBITS();
-            state->mode = TIME;
-        case TIME:
-            NEEDBITS(32);
-            if (state->head != Z_NULL)
-                state->head->time = hold;
-            if (state->flags & 0x0200) CRC4(state->check, hold);
-            INITBITS();
-            state->mode = OS;
-        case OS:
-            NEEDBITS(16);
-            if (state->head != Z_NULL) {
-                state->head->xflags = (int)(hold & 0xff);
-                state->head->os = (int)(hold >> 8);
-            }
-            if (state->flags & 0x0200) CRC2(state->check, hold);
-            INITBITS();
-            state->mode = EXLEN;
-        case EXLEN:
-            if (state->flags & 0x0400) {
-                NEEDBITS(16);
-                state->length = (unsigned)(hold);
-                if (state->head != Z_NULL)
-                    state->head->extra_len = (unsigned)hold;
-                if (state->flags & 0x0200) CRC2(state->check, hold);
-                INITBITS();
-            }
-            else if (state->head != Z_NULL)
-                state->head->extra = Z_NULL;
-            state->mode = EXTRA;
-        case EXTRA:
-            if (state->flags & 0x0400) {
-                copy = state->length;
-                if (copy > have) copy = have;
-                if (copy) {
-                    if (state->head != Z_NULL &&
-                        state->head->extra != Z_NULL) {
-                        len = state->head->extra_len - state->length;
-                        zmemcpy(state->head->extra + len, next,
-                                len + copy > state->head->extra_max ?
-                                state->head->extra_max - len : copy);
-                    }
-                    if (state->flags & 0x0200)
-                        state->check = crc32(state->check, next, copy);
-                    have -= copy;
-                    next += copy;
-                    state->length -= copy;
-                }
-                if (state->length) goto inf_leave;
-            }
-            state->length = 0;
-            state->mode = NAME;
-        case NAME:
-            if (state->flags & 0x0800) {
-                if (have == 0) goto inf_leave;
-                copy = 0;
-                do {
-                    len = (unsigned)(next[copy++]);
-                    if (state->head != Z_NULL &&
-                            state->head->name != Z_NULL &&
-                            state->length < state->head->name_max)
-                        state->head->name[state->length++] = len;
-                } while (len && copy < have);
-                if (state->flags & 0x0200)
-                    state->check = crc32(state->check, next, copy);
-                have -= copy;
-                next += copy;
-                if (len) goto inf_leave;
-            }
-            else if (state->head != Z_NULL)
-                state->head->name = Z_NULL;
-            state->length = 0;
-            state->mode = COMMENT;
-        case COMMENT:
-            if (state->flags & 0x1000) {
-                if (have == 0) goto inf_leave;
-                copy = 0;
-                do {
-                    len = (unsigned)(next[copy++]);
-                    if (state->head != Z_NULL &&
-                            state->head->comment != Z_NULL &&
-                            state->length < state->head->comm_max)
-                        state->head->comment[state->length++] = len;
-                } while (len && copy < have);
-                if (state->flags & 0x0200)
-                    state->check = crc32(state->check, next, copy);
-                have -= copy;
-                next += copy;
-                if (len) goto inf_leave;
-            }
-            else if (state->head != Z_NULL)
-                state->head->comment = Z_NULL;
-            state->mode = HCRC;
-        case HCRC:
-            if (state->flags & 0x0200) {
-                NEEDBITS(16);
-                if (hold != (state->check & 0xffff)) {
-                    strm->msg = (char *)"header crc mismatch";
-                    state->mode = BAD;
-                    break;
-                }
-                INITBITS();
-            }
-            if (state->head != Z_NULL) {
-                state->head->hcrc = (int)((state->flags >> 9) & 1);
-                state->head->done = 1;
-            }
-            strm->adler = state->check = crc32(0L, Z_NULL, 0);
-            state->mode = TYPE;
-            break;
-#endif
-        case DICTID:
-            NEEDBITS(32);
-            strm->adler = state->check = ZSWAP32(hold);
-            INITBITS();
-            state->mode = DICT;
-        case DICT:
-            if (state->havedict == 0) {
-                RESTORE();
-                return Z_NEED_DICT;
-            }
-            strm->adler = state->check = adler32(0L, Z_NULL, 0);
-            state->mode = TYPE;
-        case TYPE:
-            if (flush == Z_BLOCK || flush == Z_TREES) goto inf_leave;
-        case TYPEDO:
-            if (state->last) {
-                BYTEBITS();
-                state->mode = CHECK;
-                break;
-            }
-            NEEDBITS(3);
-            state->last = BITS(1);
-            DROPBITS(1);
-            switch (BITS(2)) {
-            case 0:                             /* stored block */
-                Tracev((stderr, "inflate:     stored block%s\n",
-                        state->last ? " (last)" : ""));
-                state->mode = STORED;
-                break;
-            case 1:                             /* fixed block */
-                fixedtables(state);
-                Tracev((stderr, "inflate:     fixed codes block%s\n",
-                        state->last ? " (last)" : ""));
-                state->mode = LEN_;             /* decode codes */
-                if (flush == Z_TREES) {
-                    DROPBITS(2);
-                    goto inf_leave;
-                }
-                break;
-            case 2:                             /* dynamic block */
-                Tracev((stderr, "inflate:     dynamic codes block%s\n",
-                        state->last ? " (last)" : ""));
-                state->mode = TABLE;
-                break;
-            case 3:
-                strm->msg = (char *)"invalid block type";
-                state->mode = BAD;
-            }
-            DROPBITS(2);
-            break;
-        case STORED:
-            BYTEBITS();                         /* go to byte boundary */
-            NEEDBITS(32);
-            if ((hold & 0xffff) != ((hold >> 16) ^ 0xffff)) {
-                strm->msg = (char *)"invalid stored block lengths";
-                state->mode = BAD;
-                break;
-            }
-            state->length = (unsigned)hold & 0xffff;
-            Tracev((stderr, "inflate:       stored length %u\n",
-                    state->length));
-            INITBITS();
-            state->mode = COPY_;
-            if (flush == Z_TREES) goto inf_leave;
-        case COPY_:
-            state->mode = COPY;
-        case COPY:
-            copy = state->length;
-            if (copy) {
-                if (copy > have) copy = have;
-                if (copy > left) copy = left;
-                if (copy == 0) goto inf_leave;
-                zmemcpy(put, next, copy);
-                have -= copy;
-                next += copy;
-                left -= copy;
-                put += copy;
-                state->length -= copy;
-                break;
-            }
-            Tracev((stderr, "inflate:       stored end\n"));
-            state->mode = TYPE;
-            break;
-        case TABLE:
-            NEEDBITS(14);
-            state->nlen = BITS(5) + 257;
-            DROPBITS(5);
-            state->ndist = BITS(5) + 1;
-            DROPBITS(5);
-            state->ncode = BITS(4) + 4;
-            DROPBITS(4);
-#ifndef PKZIP_BUG_WORKAROUND
-            if (state->nlen > 286 || state->ndist > 30) {
-                strm->msg = (char *)"too many length or distance symbols";
-                state->mode = BAD;
-                break;
-            }
-#endif
-            Tracev((stderr, "inflate:       table sizes ok\n"));
-            state->have = 0;
-            state->mode = LENLENS;
-        case LENLENS:
-            while (state->have < state->ncode) {
-                NEEDBITS(3);
-                state->lens[order[state->have++]] = (unsigned short)BITS(3);
-                DROPBITS(3);
-            }
-            while (state->have < 19)
-                state->lens[order[state->have++]] = 0;
-            state->next = state->codes;
-            state->lencode = (const code FAR *)(state->next);
-            state->lenbits = 7;
-            ret = inflate_table(CODES, state->lens, 19, &(state->next),
-                                &(state->lenbits), state->work);
-            if (ret) {
-                strm->msg = (char *)"invalid code lengths set";
-                state->mode = BAD;
-                break;
-            }
-            Tracev((stderr, "inflate:       code lengths ok\n"));
-            state->have = 0;
-            state->mode = CODELENS;
-        case CODELENS:
-            while (state->have < state->nlen + state->ndist) {
-                for (;;) {
-                    here = state->lencode[BITS(state->lenbits)];
-                    if ((unsigned)(here.bits) <= bits) break;
-                    PULLBYTE();
-                }
-                if (here.val < 16) {
-                    DROPBITS(here.bits);
-                    state->lens[state->have++] = here.val;
-                }
-                else {
-                    if (here.val == 16) {
-                        NEEDBITS(here.bits + 2);
-                        DROPBITS(here.bits);
-                        if (state->have == 0) {
-                            strm->msg = (char *)"invalid bit length repeat";
-                            state->mode = BAD;
-                            break;
-                        }
-                        len = state->lens[state->have - 1];
-                        copy = 3 + BITS(2);
-                        DROPBITS(2);
-                    }
-                    else if (here.val == 17) {
-                        NEEDBITS(here.bits + 3);
-                        DROPBITS(here.bits);
-                        len = 0;
-                        copy = 3 + BITS(3);
-                        DROPBITS(3);
-                    }
-                    else {
-                        NEEDBITS(here.bits + 7);
-                        DROPBITS(here.bits);
-                        len = 0;
-                        copy = 11 + BITS(7);
-                        DROPBITS(7);
-                    }
-                    if (state->have + copy > state->nlen + state->ndist) {
-                        strm->msg = (char *)"invalid bit length repeat";
-                        state->mode = BAD;
-                        break;
-                    }
-                    while (copy--)
-                        state->lens[state->have++] = (unsigned short)len;
-                }
-            }
-
-            /* handle error breaks in while */
-            if (state->mode == BAD) break;
-
-            /* check for end-of-block code (better have one) */
-            if (state->lens[256] == 0) {
-                strm->msg = (char *)"invalid code -- missing end-of-block";
-                state->mode = BAD;
-                break;
-            }
-
-            /* build code tables -- note: do not change the lenbits or distbits
-               values here (9 and 6) without reading the comments in inftrees.h
-               concerning the ENOUGH constants, which depend on those values */
-            state->next = state->codes;
-            state->lencode = (const code FAR *)(state->next);
-            state->lenbits = 9;
-            ret = inflate_table(LENS, state->lens, state->nlen, &(state->next),
-                                &(state->lenbits), state->work);
-            if (ret) {
-                strm->msg = (char *)"invalid literal/lengths set";
-                state->mode = BAD;
-                break;
-            }
-            state->distcode = (const code FAR *)(state->next);
-            state->distbits = 6;
-            ret = inflate_table(DISTS, state->lens + state->nlen, state->ndist,
-                            &(state->next), &(state->distbits), state->work);
-            if (ret) {
-                strm->msg = (char *)"invalid distances set";
-                state->mode = BAD;
-                break;
-            }
-            Tracev((stderr, "inflate:       codes ok\n"));
-            state->mode = LEN_;
-            if (flush == Z_TREES) goto inf_leave;
-        case LEN_:
-            state->mode = LEN;
-        case LEN:
-            if (have >= 6 && left >= 258) {
-                RESTORE();
-                inflate_fast(strm, out);
-                LOAD();
-                if (state->mode == TYPE)
-                    state->back = -1;
-                break;
-            }
-            state->back = 0;
-            for (;;) {
-                here = state->lencode[BITS(state->lenbits)];
-                if ((unsigned)(here.bits) <= bits) break;
-                PULLBYTE();
-            }
-            if (here.op && (here.op & 0xf0) == 0) {
-                last = here;
-                for (;;) {
-                    here = state->lencode[last.val +
-                            (BITS(last.bits + last.op) >> last.bits)];
-                    if ((unsigned)(last.bits + here.bits) <= bits) break;
-                    PULLBYTE();
-                }
-                DROPBITS(last.bits);
-                state->back += last.bits;
-            }
-            DROPBITS(here.bits);
-            state->back += here.bits;
-            state->length = (unsigned)here.val;
-            if ((int)(here.op) == 0) {
-                Tracevv((stderr, here.val >= 0x20 && here.val < 0x7f ?
-                        "inflate:         literal '%c'\n" :
-                        "inflate:         literal 0x%02x\n", here.val));
-                state->mode = LIT;
-                break;
-            }
-            if (here.op & 32) {
-                Tracevv((stderr, "inflate:         end of block\n"));
-                state->back = -1;
-                state->mode = TYPE;
-                break;
-            }
-            if (here.op & 64) {
-                strm->msg = (char *)"invalid literal/length code";
-                state->mode = BAD;
-                break;
-            }
-            state->extra = (unsigned)(here.op) & 15;
-            state->mode = LENEXT;
-        case LENEXT:
-            if (state->extra) {
-                NEEDBITS(state->extra);
-                state->length += BITS(state->extra);
-                DROPBITS(state->extra);
-                state->back += state->extra;
-            }
-            Tracevv((stderr, "inflate:         length %u\n", state->length));
-            state->was = state->length;
-            state->mode = DIST;
-        case DIST:
-            for (;;) {
-                here = state->distcode[BITS(state->distbits)];
-                if ((unsigned)(here.bits) <= bits) break;
-                PULLBYTE();
-            }
-            if ((here.op & 0xf0) == 0) {
-                last = here;
-                for (;;) {
-                    here = state->distcode[last.val +
-                            (BITS(last.bits + last.op) >> last.bits)];
-                    if ((unsigned)(last.bits + here.bits) <= bits) break;
-                    PULLBYTE();
-                }
-                DROPBITS(last.bits);
-                state->back += last.bits;
-            }
-            DROPBITS(here.bits);
-            state->back += here.bits;
-            if (here.op & 64) {
-                strm->msg = (char *)"invalid distance code";
-                state->mode = BAD;
-                break;
-            }
-            state->offset = (unsigned)here.val;
-            state->extra = (unsigned)(here.op) & 15;
-            state->mode = DISTEXT;
-        case DISTEXT:
-            if (state->extra) {
-                NEEDBITS(state->extra);
-                state->offset += BITS(state->extra);
-                DROPBITS(state->extra);
-                state->back += state->extra;
-            }
-#ifdef INFLATE_STRICT
-            if (state->offset > state->dmax) {
-                strm->msg = (char *)"invalid distance too far back";
-                state->mode = BAD;
-                break;
-            }
-#endif
-            Tracevv((stderr, "inflate:         distance %u\n", state->offset));
-            state->mode = MATCH;
-        case MATCH:
-            if (left == 0) goto inf_leave;
-            copy = out - left;
-            if (state->offset > copy) {         /* copy from window */
-                copy = state->offset - copy;
-                if (copy > state->whave) {
-                    if (state->sane) {
-                        strm->msg = (char *)"invalid distance too far back";
-                        state->mode = BAD;
-                        break;
-                    }
-#ifdef INFLATE_ALLOW_INVALID_DISTANCE_TOOFAR_ARRR
-                    Trace((stderr, "inflate.c too far\n"));
-                    copy -= state->whave;
-                    if (copy > state->length) copy = state->length;
-                    if (copy > left) copy = left;
-                    left -= copy;
-                    state->length -= copy;
-                    do {
-                        *put++ = 0;
-                    } while (--copy);
-                    if (state->length == 0) state->mode = LEN;
-                    break;
-#endif
-                }
-                if (copy > state->wnext) {
-                    copy -= state->wnext;
-                    from = state->window + (state->wsize - copy);
-                }
-                else
-                    from = state->window + (state->wnext - copy);
-                if (copy > state->length) copy = state->length;
-            }
-            else {                              /* copy from output */
-                from = put - state->offset;
-                copy = state->length;
-            }
-            if (copy > left) copy = left;
-            left -= copy;
-            state->length -= copy;
-            do {
-                *put++ = *from++;
-            } while (--copy);
-            if (state->length == 0) state->mode = LEN;
-            break;
-        case LIT:
-            if (left == 0) goto inf_leave;
-            *put++ = (unsigned char)(state->length);
-            left--;
-            state->mode = LEN;
-            break;
-        case CHECK:
-            if (state->wrap) {
-                NEEDBITS(32);
-                out -= left;
-                strm->total_out += out;
-                state->total += out;
-                if (out)
-                    strm->adler = state->check =
-                        UPDATE(state->check, put - out, out);
-                out = left;
-                if ((
-#ifdef GUNZIP
-                     state->flags ? hold :
-#endif
-                     ZSWAP32(hold)) != state->check) {
-                    strm->msg = (char *)"incorrect data check";
-                    state->mode = BAD;
-                    break;
-                }
-                INITBITS();
-                Tracev((stderr, "inflate:   check matches trailer\n"));
-            }
-#ifdef GUNZIP
-            state->mode = LENGTH;
-        case LENGTH:
-            if (state->wrap && state->flags) {
-                NEEDBITS(32);
-                if (hold != (state->total & 0xffffffffUL)) {
-                    strm->msg = (char *)"incorrect length check";
-                    state->mode = BAD;
-                    break;
-                }
-                INITBITS();
-                Tracev((stderr, "inflate:   length matches trailer\n"));
-            }
-#endif
-            state->mode = DONE;
-        case DONE:
-            ret = Z_STREAM_END;
-            goto inf_leave;
-        case BAD:
-            ret = Z_DATA_ERROR;
-            goto inf_leave;
-        case MEM:
-            return Z_MEM_ERROR;
-        case SYNC:
-        default:
-            return Z_STREAM_ERROR;
-        }
-
-    /*
-       Return from inflate(), updating the total counts and the check value.
-       If there was no progress during the inflate() call, return a buffer
-       error.  Call updatewindow() to create and/or update the window state.
-       Note: a memory error from inflate() is non-recoverable.
-     */
-  inf_leave:
-    RESTORE();
-    if (state->wsize || (out != strm->avail_out && state->mode < BAD &&
-            (state->mode < CHECK || flush != Z_FINISH)))
-        if (updatewindow(strm, strm->next_out, out - strm->avail_out)) {
-            state->mode = MEM;
-            return Z_MEM_ERROR;
-        }
-    in -= strm->avail_in;
-    out -= strm->avail_out;
-    strm->total_in += in;
-    strm->total_out += out;
-    state->total += out;
-    if (state->wrap && out)
-        strm->adler = state->check =
-            UPDATE(state->check, strm->next_out - out, out);
-    strm->data_type = state->bits + (state->last ? 64 : 0) +
-                      (state->mode == TYPE ? 128 : 0) +
-                      (state->mode == LEN_ || state->mode == COPY_ ? 256 : 0);
-    if (((in == 0 && out == 0) || flush == Z_FINISH) && ret == Z_OK)
-        ret = Z_BUF_ERROR;
-    return ret;
-}
-
-int ZEXPORT inflateEnd(strm)
-z_streamp strm;
-{
-    struct inflate_state FAR *state;
-    if (strm == Z_NULL || strm->state == Z_NULL || strm->zfree == (free_func)0)
-        return Z_STREAM_ERROR;
-    state = (struct inflate_state FAR *)strm->state;
-    if (state->window != Z_NULL) ZFREE(strm, state->window);
-    ZFREE(strm, strm->state);
-    strm->state = Z_NULL;
-    Tracev((stderr, "inflate: end\n"));
-    return Z_OK;
-}
-
-int ZEXPORT inflateGetDictionary(strm, dictionary, dictLength)
-z_streamp strm;
-Bytef *dictionary;
-uInt *dictLength;
-{
-    struct inflate_state FAR *state;
-
-    /* check state */
-    if (strm == Z_NULL || strm->state == Z_NULL) return Z_STREAM_ERROR;
-    state = (struct inflate_state FAR *)strm->state;
-
-    /* copy dictionary */
-    if (state->whave && dictionary != Z_NULL) {
-        zmemcpy(dictionary, state->window + state->wnext,
-                state->whave - state->wnext);
-        zmemcpy(dictionary + state->whave - state->wnext,
-                state->window, state->wnext);
-    }
-    if (dictLength != Z_NULL)
-        *dictLength = state->whave;
-    return Z_OK;
-}
-
-int ZEXPORT inflateSetDictionary(strm, dictionary, dictLength)
-z_streamp strm;
-const Bytef *dictionary;
-uInt dictLength;
-{
-    struct inflate_state FAR *state;
-    unsigned long dictid;
-    int ret;
-
-    /* check state */
-    if (strm == Z_NULL || strm->state == Z_NULL) return Z_STREAM_ERROR;
-    state = (struct inflate_state FAR *)strm->state;
-    if (state->wrap != 0 && state->mode != DICT)
-        return Z_STREAM_ERROR;
-
-    /* check for correct dictionary identifier */
-    if (state->mode == DICT) {
-        dictid = adler32(0L, Z_NULL, 0);
-        dictid = adler32(dictid, dictionary, dictLength);
-        if (dictid != state->check)
-            return Z_DATA_ERROR;
-    }
-
-    /* copy dictionary to window using updatewindow(), which will amend the
-       existing dictionary if appropriate */
-    ret = updatewindow(strm, dictionary + dictLength, dictLength);
-    if (ret) {
-        state->mode = MEM;
-        return Z_MEM_ERROR;
-    }
-    state->havedict = 1;
-    Tracev((stderr, "inflate:   dictionary set\n"));
-    return Z_OK;
-}
-
-int ZEXPORT inflateGetHeader(strm, head)
-z_streamp strm;
-gz_headerp head;
-{
-    struct inflate_state FAR *state;
-
-    /* check state */
-    if (strm == Z_NULL || strm->state == Z_NULL) return Z_STREAM_ERROR;
-    state = (struct inflate_state FAR *)strm->state;
-    if ((state->wrap & 2) == 0) return Z_STREAM_ERROR;
-
-    /* save header structure */
-    state->head = head;
-    head->done = 0;
-    return Z_OK;
-}
-
-/*
-   Search buf[0..len-1] for the pattern: 0, 0, 0xff, 0xff.  Return when found
-   or when out of input.  When called, *have is the number of pattern bytes
-   found in order so far, in 0..3.  On return *have is updated to the new
-   state.  If on return *have equals four, then the pattern was found and the
-   return value is how many bytes were read including the last byte of the
-   pattern.  If *have is less than four, then the pattern has not been found
-   yet and the return value is len.  In the latter case, syncsearch() can be
-   called again with more data and the *have state.  *have is initialized to
-   zero for the first call.
- */
-local unsigned syncsearch(have, buf, len)
-unsigned FAR *have;
-const unsigned char FAR *buf;
-unsigned len;
-{
-    unsigned got;
-    unsigned next;
-
-    got = *have;
-    next = 0;
-    while (next < len && got < 4) {
-        if ((int)(buf[next]) == (got < 2 ? 0 : 0xff))
-            got++;
-        else if (buf[next])
-            got = 0;
-        else
-            got = 4 - got;
-        next++;
-    }
-    *have = got;
-    return next;
-}
-
-int ZEXPORT inflateSync(strm)
-z_streamp strm;
-{
-    unsigned len;               /* number of bytes to look at or looked at */
-    unsigned long in, out;      /* temporary to save total_in and total_out */
-    unsigned char buf[4];       /* to restore bit buffer to byte string */
-    struct inflate_state FAR *state;
-
-    /* check parameters */
-    if (strm == Z_NULL || strm->state == Z_NULL) return Z_STREAM_ERROR;
-    state = (struct inflate_state FAR *)strm->state;
-    if (strm->avail_in == 0 && state->bits < 8) return Z_BUF_ERROR;
-
-    /* if first time, start search in bit buffer */
-    if (state->mode != SYNC) {
-        state->mode = SYNC;
-        state->hold <<= state->bits & 7;
-        state->bits -= state->bits & 7;
-        len = 0;
-        while (state->bits >= 8) {
-            buf[len++] = (unsigned char)(state->hold);
-            state->hold >>= 8;
-            state->bits -= 8;
-        }
-        state->have = 0;
-        syncsearch(&(state->have), buf, len);
-    }
-
-    /* search available input */
-    len = syncsearch(&(state->have), strm->next_in, strm->avail_in);
-    strm->avail_in -= len;
-    strm->next_in += len;
-    strm->total_in += len;
-
-    /* return no joy or set up to restart inflate() on a new block */
-    if (state->have != 4) return Z_DATA_ERROR;
-    in = strm->total_in;  out = strm->total_out;
-    inflateReset(strm);
-    strm->total_in = in;  strm->total_out = out;
-    state->mode = TYPE;
-    return Z_OK;
-}
-
-/*
-   Returns true if inflate is currently at the end of a block generated by
-   Z_SYNC_FLUSH or Z_FULL_FLUSH. This function is used by one PPP
-   implementation to provide an additional safety check. PPP uses
-   Z_SYNC_FLUSH but removes the length bytes of the resulting empty stored
-   block. When decompressing, PPP checks that at the end of input packet,
-   inflate is waiting for these length bytes.
- */
-int ZEXPORT inflateSyncPoint(strm)
-z_streamp strm;
-{
-    struct inflate_state FAR *state;
-
-    if (strm == Z_NULL || strm->state == Z_NULL) return Z_STREAM_ERROR;
-    state = (struct inflate_state FAR *)strm->state;
-    return state->mode == STORED && state->bits == 0;
-}
-
-int ZEXPORT inflateCopy(dest, source)
-z_streamp dest;
-z_streamp source;
-{
-    struct inflate_state FAR *state;
-    struct inflate_state FAR *copy;
-    unsigned char FAR *window;
-    unsigned wsize;
-
-    /* check input */
-    if (dest == Z_NULL || source == Z_NULL || source->state == Z_NULL ||
-        source->zalloc == (alloc_func)0 || source->zfree == (free_func)0)
-        return Z_STREAM_ERROR;
-    state = (struct inflate_state FAR *)source->state;
-
-    /* allocate space */
-    copy = (struct inflate_state FAR *)
-           ZALLOC(source, 1, sizeof(struct inflate_state));
-    if (copy == Z_NULL) return Z_MEM_ERROR;
-    window = Z_NULL;
-    if (state->window != Z_NULL) {
-        window = (unsigned char FAR *)
-                 ZALLOC(source, 1U << state->wbits, sizeof(unsigned char));
-        if (window == Z_NULL) {
-            ZFREE(source, copy);
-            return Z_MEM_ERROR;
-        }
-    }
-
-    /* copy state */
-    zmemcpy((voidpf)dest, (voidpf)source, sizeof(z_stream));
-    zmemcpy((voidpf)copy, (voidpf)state, sizeof(struct inflate_state));
-    if (state->lencode >= state->codes &&
-        state->lencode <= state->codes + ENOUGH - 1) {
-        copy->lencode = copy->codes + (state->lencode - state->codes);
-        copy->distcode = copy->codes + (state->distcode - state->codes);
-    }
-    copy->next = copy->codes + (state->next - state->codes);
-    if (window != Z_NULL) {
-        wsize = 1U << state->wbits;
-        zmemcpy(window, state->window, wsize);
-    }
-    copy->window = window;
-    dest->state = (struct internal_state FAR *)copy;
-    return Z_OK;
-}
-
-int ZEXPORT inflateUndermine(strm, subvert)
-z_streamp strm;
-int subvert;
-{
-    struct inflate_state FAR *state;
-
-    if (strm == Z_NULL || strm->state == Z_NULL) return Z_STREAM_ERROR;
-    state = (struct inflate_state FAR *)strm->state;
-    state->sane = !subvert;
-#ifdef INFLATE_ALLOW_INVALID_DISTANCE_TOOFAR_ARRR
-    return Z_OK;
-#else
-    state->sane = 1;
-    return Z_DATA_ERROR;
-#endif
-}
-
-long ZEXPORT inflateMark(strm)
-z_streamp strm;
-{
-    struct inflate_state FAR *state;
-
-    if (strm == Z_NULL || strm->state == Z_NULL) return -1L << 16;
-    state = (struct inflate_state FAR *)strm->state;
-    return ((long)(state->back) << 16) +
-        (state->mode == COPY ? state->length :
-            (state->mode == MATCH ? state->was - state->length : 0));
-}
diff --git a/src/extra/zlib/inflate.h b/src/extra/zlib/inflate.h
deleted file mode 100644
index 95f4986..0000000
--- a/src/extra/zlib/inflate.h
+++ /dev/null
@@ -1,122 +0,0 @@
-/* inflate.h -- internal inflate state definition
- * Copyright (C) 1995-2009 Mark Adler
- * For conditions of distribution and use, see copyright notice in zlib.h
- */
-
-/* WARNING: this file should *not* be used by applications. It is
-   part of the implementation of the compression library and is
-   subject to change. Applications should only use zlib.h.
- */
-
-/* define NO_GZIP when compiling if you want to disable gzip header and
-   trailer decoding by inflate().  NO_GZIP would be used to avoid linking in
-   the crc code when it is not needed.  For shared libraries, gzip decoding
-   should be left enabled. */
-#ifndef NO_GZIP
-#  define GUNZIP
-#endif
-
-/* Possible inflate modes between inflate() calls */
-typedef enum {
-    HEAD,       /* i: waiting for magic header */
-    FLAGS,      /* i: waiting for method and flags (gzip) */
-    TIME,       /* i: waiting for modification time (gzip) */
-    OS,         /* i: waiting for extra flags and operating system (gzip) */
-    EXLEN,      /* i: waiting for extra length (gzip) */
-    EXTRA,      /* i: waiting for extra bytes (gzip) */
-    NAME,       /* i: waiting for end of file name (gzip) */
-    COMMENT,    /* i: waiting for end of comment (gzip) */
-    HCRC,       /* i: waiting for header crc (gzip) */
-    DICTID,     /* i: waiting for dictionary check value */
-    DICT,       /* waiting for inflateSetDictionary() call */
-        TYPE,       /* i: waiting for type bits, including last-flag bit */
-        TYPEDO,     /* i: same, but skip check to exit inflate on new block */
-        STORED,     /* i: waiting for stored size (length and complement) */
-        COPY_,      /* i/o: same as COPY below, but only first time in */
-        COPY,       /* i/o: waiting for input or output to copy stored block */
-        TABLE,      /* i: waiting for dynamic block table lengths */
-        LENLENS,    /* i: waiting for code length code lengths */
-        CODELENS,   /* i: waiting for length/lit and distance code lengths */
-            LEN_,       /* i: same as LEN below, but only first time in */
-            LEN,        /* i: waiting for length/lit/eob code */
-            LENEXT,     /* i: waiting for length extra bits */
-            DIST,       /* i: waiting for distance code */
-            DISTEXT,    /* i: waiting for distance extra bits */
-            MATCH,      /* o: waiting for output space to copy string */
-            LIT,        /* o: waiting for output space to write literal */
-    CHECK,      /* i: waiting for 32-bit check value */
-    LENGTH,     /* i: waiting for 32-bit length (gzip) */
-    DONE,       /* finished check, done -- remain here until reset */
-    BAD,        /* got a data error -- remain here until reset */
-    MEM,        /* got an inflate() memory error -- remain here until reset */
-    SYNC        /* looking for synchronization bytes to restart inflate() */
-} inflate_mode;
-
-/*
-    State transitions between above modes -
-
-    (most modes can go to BAD or MEM on error -- not shown for clarity)
-
-    Process header:
-        HEAD -> (gzip) or (zlib) or (raw)
-        (gzip) -> FLAGS -> TIME -> OS -> EXLEN -> EXTRA -> NAME -> COMMENT ->
-                  HCRC -> TYPE
-        (zlib) -> DICTID or TYPE
-        DICTID -> DICT -> TYPE
-        (raw) -> TYPEDO
-    Read deflate blocks:
-            TYPE -> TYPEDO -> STORED or TABLE or LEN_ or CHECK
-            STORED -> COPY_ -> COPY -> TYPE
-            TABLE -> LENLENS -> CODELENS -> LEN_
-            LEN_ -> LEN
-    Read deflate codes in fixed or dynamic block:
-                LEN -> LENEXT or LIT or TYPE
-                LENEXT -> DIST -> DISTEXT -> MATCH -> LEN
-                LIT -> LEN
-    Process trailer:
-        CHECK -> LENGTH -> DONE
- */
-
-/* state maintained between inflate() calls.  Approximately 10K bytes. */
-struct inflate_state {
-    inflate_mode mode;          /* current inflate mode */
-    int last;                   /* true if processing last block */
-    int wrap;                   /* bit 0 true for zlib, bit 1 true for gzip */
-    int havedict;               /* true if dictionary provided */
-    int flags;                  /* gzip header method and flags (0 if zlib) */
-    unsigned dmax;              /* zlib header max distance (INFLATE_STRICT) */
-    unsigned long check;        /* protected copy of check value */
-    unsigned long total;        /* protected copy of output count */
-    gz_headerp head;            /* where to save gzip header information */
-        /* sliding window */
-    unsigned wbits;             /* log base 2 of requested window size */
-    unsigned wsize;             /* window size or zero if not using window */
-    unsigned whave;             /* valid bytes in the window */
-    unsigned wnext;             /* window write index */
-    unsigned char FAR *window;  /* allocated sliding window, if needed */
-        /* bit accumulator */
-    unsigned long hold;         /* input bit accumulator */
-    unsigned bits;              /* number of bits in "in" */
-        /* for string and stored block copying */
-    unsigned length;            /* literal or length of data to copy */
-    unsigned offset;            /* distance back to copy string from */
-        /* for table and code decoding */
-    unsigned extra;             /* extra bits needed */
-        /* fixed and dynamic code tables */
-    code const FAR *lencode;    /* starting table for length/literal codes */
-    code const FAR *distcode;   /* starting table for distance codes */
-    unsigned lenbits;           /* index bits for lencode */
-    unsigned distbits;          /* index bits for distcode */
-        /* dynamic table building */
-    unsigned ncode;             /* number of code length code lengths */
-    unsigned nlen;              /* number of length code lengths */
-    unsigned ndist;             /* number of distance code lengths */
-    unsigned have;              /* number of code lengths in lens[] */
-    code FAR *next;             /* next available space in codes[] */
-    unsigned short lens[320];   /* temporary storage for code lengths */
-    unsigned short work[288];   /* work area for code table building */
-    code codes[ENOUGH];         /* space for code tables */
-    int sane;                   /* if false, allow invalid distance too far */
-    int back;                   /* bits back of last unprocessed length/lit */
-    unsigned was;               /* initial length of match */
-};
diff --git a/src/extra/zlib/inftrees.c b/src/extra/zlib/inftrees.c
deleted file mode 100644
index 44d89cf..0000000
--- a/src/extra/zlib/inftrees.c
+++ /dev/null
@@ -1,306 +0,0 @@
-/* inftrees.c -- generate Huffman trees for efficient decoding
- * Copyright (C) 1995-2013 Mark Adler
- * For conditions of distribution and use, see copyright notice in zlib.h
- */
-
-#include "zutil.h"
-#include "inftrees.h"
-
-#define MAXBITS 15
-
-const char inflate_copyright[] =
-   " inflate 1.2.8 Copyright 1995-2013 Mark Adler ";
-/*
-  If you use the zlib library in a product, an acknowledgment is welcome
-  in the documentation of your product. If for some reason you cannot
-  include such an acknowledgment, I would appreciate that you keep this
-  copyright string in the executable of your product.
- */
-
-/*
-   Build a set of tables to decode the provided canonical Huffman code.
-   The code lengths are lens[0..codes-1].  The result starts at *table,
-   whose indices are 0..2^bits-1.  work is a writable array of at least
-   lens shorts, which is used as a work area.  type is the type of code
-   to be generated, CODES, LENS, or DISTS.  On return, zero is success,
-   -1 is an invalid code, and +1 means that ENOUGH isn't enough.  table
-   on return points to the next available entry's address.  bits is the
-   requested root table index bits, and on return it is the actual root
-   table index bits.  It will differ if the request is greater than the
-   longest code or if it is less than the shortest code.
- */
-int ZLIB_INTERNAL inflate_table(type, lens, codes, table, bits, work)
-codetype type;
-unsigned short FAR *lens;
-unsigned codes;
-code FAR * FAR *table;
-unsigned FAR *bits;
-unsigned short FAR *work;
-{
-    unsigned len;               /* a code's length in bits */
-    unsigned sym;               /* index of code symbols */
-    unsigned min, max;          /* minimum and maximum code lengths */
-    unsigned root;              /* number of index bits for root table */
-    unsigned curr;              /* number of index bits for current table */
-    unsigned drop;              /* code bits to drop for sub-table */
-    int left;                   /* number of prefix codes available */
-    unsigned used;              /* code entries in table used */
-    unsigned huff;              /* Huffman code */
-    unsigned incr;              /* for incrementing code, index */
-    unsigned fill;              /* index for replicating entries */
-    unsigned low;               /* low bits for current root entry */
-    unsigned mask;              /* mask for low root bits */
-    code here;                  /* table entry for duplication */
-    code FAR *next;             /* next available space in table */
-    const unsigned short FAR *base;     /* base value table to use */
-    const unsigned short FAR *extra;    /* extra bits table to use */
-    int end;                    /* use base and extra for symbol > end */
-    unsigned short count[MAXBITS+1];    /* number of codes of each length */
-    unsigned short offs[MAXBITS+1];     /* offsets in table for each length */
-    static const unsigned short lbase[31] = { /* Length codes 257..285 base */
-        3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 15, 17, 19, 23, 27, 31,
-        35, 43, 51, 59, 67, 83, 99, 115, 131, 163, 195, 227, 258, 0, 0};
-    static const unsigned short lext[31] = { /* Length codes 257..285 extra */
-        16, 16, 16, 16, 16, 16, 16, 16, 17, 17, 17, 17, 18, 18, 18, 18,
-        19, 19, 19, 19, 20, 20, 20, 20, 21, 21, 21, 21, 16, 72, 78};
-    static const unsigned short dbase[32] = { /* Distance codes 0..29 base */
-        1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193,
-        257, 385, 513, 769, 1025, 1537, 2049, 3073, 4097, 6145,
-        8193, 12289, 16385, 24577, 0, 0};
-    static const unsigned short dext[32] = { /* Distance codes 0..29 extra */
-        16, 16, 16, 16, 17, 17, 18, 18, 19, 19, 20, 20, 21, 21, 22, 22,
-        23, 23, 24, 24, 25, 25, 26, 26, 27, 27,
-        28, 28, 29, 29, 64, 64};
-
-    /*
-       Process a set of code lengths to create a canonical Huffman code.  The
-       code lengths are lens[0..codes-1].  Each length corresponds to the
-       symbols 0..codes-1.  The Huffman code is generated by first sorting the
-       symbols by length from short to long, and retaining the symbol order
-       for codes with equal lengths.  Then the code starts with all zero bits
-       for the first code of the shortest length, and the codes are integer
-       increments for the same length, and zeros are appended as the length
-       increases.  For the deflate format, these bits are stored backwards
-       from their more natural integer increment ordering, and so when the
-       decoding tables are built in the large loop below, the integer codes
-       are incremented backwards.
-
-       This routine assumes, but does not check, that all of the entries in
-       lens[] are in the range 0..MAXBITS.  The caller must assure this.
-       1..MAXBITS is interpreted as that code length.  zero means that that
-       symbol does not occur in this code.
-
-       The codes are sorted by computing a count of codes for each length,
-       creating from that a table of starting indices for each length in the
-       sorted table, and then entering the symbols in order in the sorted
-       table.  The sorted table is work[], with that space being provided by
-       the caller.
-
-       The length counts are used for other purposes as well, i.e. finding
-       the minimum and maximum length codes, determining if there are any
-       codes at all, checking for a valid set of lengths, and looking ahead
-       at length counts to determine sub-table sizes when building the
-       decoding tables.
-     */
-
-    /* accumulate lengths for codes (assumes lens[] all in 0..MAXBITS) */
-    for (len = 0; len <= MAXBITS; len++)
-        count[len] = 0;
-    for (sym = 0; sym < codes; sym++)
-        count[lens[sym]]++;
-
-    /* bound code lengths, force root to be within code lengths */
-    root = *bits;
-    for (max = MAXBITS; max >= 1; max--)
-        if (count[max] != 0) break;
-    if (root > max) root = max;
-    if (max == 0) {                     /* no symbols to code at all */
-        here.op = (unsigned char)64;    /* invalid code marker */
-        here.bits = (unsigned char)1;
-        here.val = (unsigned short)0;
-        *(*table)++ = here;             /* make a table to force an error */
-        *(*table)++ = here;
-        *bits = 1;
-        return 0;     /* no symbols, but wait for decoding to report error */
-    }
-    for (min = 1; min < max; min++)
-        if (count[min] != 0) break;
-    if (root < min) root = min;
-
-    /* check for an over-subscribed or incomplete set of lengths */
-    left = 1;
-    for (len = 1; len <= MAXBITS; len++) {
-        left <<= 1;
-        left -= count[len];
-        if (left < 0) return -1;        /* over-subscribed */
-    }
-    if (left > 0 && (type == CODES || max != 1))
-        return -1;                      /* incomplete set */
-
-    /* generate offsets into symbol table for each length for sorting */
-    offs[1] = 0;
-    for (len = 1; len < MAXBITS; len++)
-        offs[len + 1] = offs[len] + count[len];
-
-    /* sort symbols by length, by symbol order within each length */
-    for (sym = 0; sym < codes; sym++)
-        if (lens[sym] != 0) work[offs[lens[sym]]++] = (unsigned short)sym;
-
-    /*
-       Create and fill in decoding tables.  In this loop, the table being
-       filled is at next and has curr index bits.  The code being used is huff
-       with length len.  That code is converted to an index by dropping drop
-       bits off of the bottom.  For codes where len is less than drop + curr,
-       those top drop + curr - len bits are incremented through all values to
-       fill the table with replicated entries.
-
-       root is the number of index bits for the root table.  When len exceeds
-       root, sub-tables are created pointed to by the root entry with an index
-       of the low root bits of huff.  This is saved in low to check for when a
-       new sub-table should be started.  drop is zero when the root table is
-       being filled, and drop is root when sub-tables are being filled.
-
-       When a new sub-table is needed, it is necessary to look ahead in the
-       code lengths to determine what size sub-table is needed.  The length
-       counts are used for this, and so count[] is decremented as codes are
-       entered in the tables.
-
-       used keeps track of how many table entries have been allocated from the
-       provided *table space.  It is checked for LENS and DIST tables against
-       the constants ENOUGH_LENS and ENOUGH_DISTS to guard against changes in
-       the initial root table size constants.  See the comments in inftrees.h
-       for more information.
-
-       sym increments through all symbols, and the loop terminates when
-       all codes of length max, i.e. all codes, have been processed.  This
-       routine permits incomplete codes, so another loop after this one fills
-       in the rest of the decoding tables with invalid code markers.
-     */
-
-    /* set up for code type */
-    switch (type) {
-    case CODES:
-        base = extra = work;    /* dummy value--not used */
-        end = 19;
-        break;
-    case LENS:
-        base = lbase;
-        base -= 257;
-        extra = lext;
-        extra -= 257;
-        end = 256;
-        break;
-    default:            /* DISTS */
-        base = dbase;
-        extra = dext;
-        end = -1;
-    }
-
-    /* initialize state for loop */
-    huff = 0;                   /* starting code */
-    sym = 0;                    /* starting code symbol */
-    len = min;                  /* starting code length */
-    next = *table;              /* current table to fill in */
-    curr = root;                /* current table index bits */
-    drop = 0;                   /* current bits to drop from code for index */
-    low = (unsigned)(-1);       /* trigger new sub-table when len > root */
-    used = 1U << root;          /* use root table entries */
-    mask = used - 1;            /* mask for comparing low */
-
-    /* check available table space */
-    if ((type == LENS && used > ENOUGH_LENS) ||
-        (type == DISTS && used > ENOUGH_DISTS))
-        return 1;
-
-    /* process all codes and make table entries */
-    for (;;) {
-        /* create table entry */
-        here.bits = (unsigned char)(len - drop);
-        if ((int)(work[sym]) < end) {
-            here.op = (unsigned char)0;
-            here.val = work[sym];
-        }
-        else if ((int)(work[sym]) > end) {
-            here.op = (unsigned char)(extra[work[sym]]);
-            here.val = base[work[sym]];
-        }
-        else {
-            here.op = (unsigned char)(32 + 64);         /* end of block */
-            here.val = 0;
-        }
-
-        /* replicate for those indices with low len bits equal to huff */
-        incr = 1U << (len - drop);
-        fill = 1U << curr;
-        min = fill;                 /* save offset to next table */
-        do {
-            fill -= incr;
-            next[(huff >> drop) + fill] = here;
-        } while (fill != 0);
-
-        /* backwards increment the len-bit code huff */
-        incr = 1U << (len - 1);
-        while (huff & incr)
-            incr >>= 1;
-        if (incr != 0) {
-            huff &= incr - 1;
-            huff += incr;
-        }
-        else
-            huff = 0;
-
-        /* go to next symbol, update count, len */
-        sym++;
-        if (--(count[len]) == 0) {
-            if (len == max) break;
-            len = lens[work[sym]];
-        }
-
-        /* create new sub-table if needed */
-        if (len > root && (huff & mask) != low) {
-            /* if first time, transition to sub-tables */
-            if (drop == 0)
-                drop = root;
-
-            /* increment past last table */
-            next += min;            /* here min is 1 << curr */
-
-            /* determine length of next table */
-            curr = len - drop;
-            left = (int)(1 << curr);
-            while (curr + drop < max) {
-                left -= count[curr + drop];
-                if (left <= 0) break;
-                curr++;
-                left <<= 1;
-            }
-
-            /* check for enough space */
-            used += 1U << curr;
-            if ((type == LENS && used > ENOUGH_LENS) ||
-                (type == DISTS && used > ENOUGH_DISTS))
-                return 1;
-
-            /* point entry in root table to sub-table */
-            low = huff & mask;
-            (*table)[low].op = (unsigned char)curr;
-            (*table)[low].bits = (unsigned char)root;
-            (*table)[low].val = (unsigned short)(next - *table);
-        }
-    }
-
-    /* fill in remaining table entry if code is incomplete (guaranteed to have
-       at most one remaining entry, since if the code is incomplete, the
-       maximum code length that was allowed to get this far is one bit) */
-    if (huff != 0) {
-        here.op = (unsigned char)64;            /* invalid code marker */
-        here.bits = (unsigned char)(len - drop);
-        here.val = (unsigned short)0;
-        next[huff] = here;
-    }
-
-    /* set return parameters */
-    *table += used;
-    *bits = root;
-    return 0;
-}
diff --git a/src/extra/zlib/inftrees.h b/src/extra/zlib/inftrees.h
deleted file mode 100644
index baa53a0..0000000
--- a/src/extra/zlib/inftrees.h
+++ /dev/null
@@ -1,62 +0,0 @@
-/* inftrees.h -- header to use inftrees.c
- * Copyright (C) 1995-2005, 2010 Mark Adler
- * For conditions of distribution and use, see copyright notice in zlib.h
- */
-
-/* WARNING: this file should *not* be used by applications. It is
-   part of the implementation of the compression library and is
-   subject to change. Applications should only use zlib.h.
- */
-
-/* Structure for decoding tables.  Each entry provides either the
-   information needed to do the operation requested by the code that
-   indexed that table entry, or it provides a pointer to another
-   table that indexes more bits of the code.  op indicates whether
-   the entry is a pointer to another table, a literal, a length or
-   distance, an end-of-block, or an invalid code.  For a table
-   pointer, the low four bits of op is the number of index bits of
-   that table.  For a length or distance, the low four bits of op
-   is the number of extra bits to get after the code.  bits is
-   the number of bits in this code or part of the code to drop off
-   of the bit buffer.  val is the actual byte to output in the case
-   of a literal, the base length or distance, or the offset from
-   the current table to the next table.  Each entry is four bytes. */
-typedef struct {
-    unsigned char op;           /* operation, extra bits, table bits */
-    unsigned char bits;         /* bits in this part of the code */
-    unsigned short val;         /* offset in table or code value */
-} code;
-
-/* op values as set by inflate_table():
-    00000000 - literal
-    0000tttt - table link, tttt != 0 is the number of table index bits
-    0001eeee - length or distance, eeee is the number of extra bits
-    01100000 - end of block
-    01000000 - invalid code
- */
-
-/* Maximum size of the dynamic table.  The maximum number of code structures is
-   1444, which is the sum of 852 for literal/length codes and 592 for distance
-   codes.  These values were found by exhaustive searches using the program
-   examples/enough.c found in the zlib distribtution.  The arguments to that
-   program are the number of symbols, the initial root table size, and the
-   maximum bit length of a code.  "enough 286 9 15" for literal/length codes
-   returns returns 852, and "enough 30 6 15" for distance codes returns 592.
-   The initial root table size (9 or 6) is found in the fifth argument of the
-   inflate_table() calls in inflate.c and infback.c.  If the root table size is
-   changed, then these maximum sizes would be need to be recalculated and
-   updated. */
-#define ENOUGH_LENS 852
-#define ENOUGH_DISTS 592
-#define ENOUGH (ENOUGH_LENS+ENOUGH_DISTS)
-
-/* Type of code to build for inflate_table() */
-typedef enum {
-    CODES,
-    LENS,
-    DISTS
-} codetype;
-
-int ZLIB_INTERNAL inflate_table OF((codetype type, unsigned short FAR *lens,
-                             unsigned codes, code FAR * FAR *table,
-                             unsigned FAR *bits, unsigned short FAR *work));
diff --git a/src/extra/zlib/trees.c b/src/extra/zlib/trees.c
deleted file mode 100644
index 1fd7759..0000000
--- a/src/extra/zlib/trees.c
+++ /dev/null
@@ -1,1226 +0,0 @@
-/* trees.c -- output deflated data using Huffman coding
- * Copyright (C) 1995-2012 Jean-loup Gailly
- * detect_data_type() function provided freely by Cosmin Truta, 2006
- * For conditions of distribution and use, see copyright notice in zlib.h
- */
-
-/*
- *  ALGORITHM
- *
- *      The "deflation" process uses several Huffman trees. The more
- *      common source values are represented by shorter bit sequences.
- *
- *      Each code tree is stored in a compressed form which is itself
- * a Huffman encoding of the lengths of all the code strings (in
- * ascending order by source values).  The actual code strings are
- * reconstructed from the lengths in the inflate process, as described
- * in the deflate specification.
- *
- *  REFERENCES
- *
- *      Deutsch, L.P.,"'Deflate' Compressed Data Format Specification".
- *      Available in ftp.uu.net:/pub/archiving/zip/doc/deflate-1.1.doc
- *
- *      Storer, James A.
- *          Data Compression:  Methods and Theory, pp. 49-50.
- *          Computer Science Press, 1988.  ISBN 0-7167-8156-5.
- *
- *      Sedgewick, R.
- *          Algorithms, p290.
- *          Addison-Wesley, 1983. ISBN 0-201-06672-6.
- */
-
-/* @(#) $Id$ */
-
-/* #define GEN_TREES_H */
-
-#include "deflate.h"
-
-#ifdef DEBUG
-#  include <ctype.h>
-#endif
-
-/* ===========================================================================
- * Constants
- */
-
-#define MAX_BL_BITS 7
-/* Bit length codes must not exceed MAX_BL_BITS bits */
-
-#define END_BLOCK 256
-/* end of block literal code */
-
-#define REP_3_6      16
-/* repeat previous bit length 3-6 times (2 bits of repeat count) */
-
-#define REPZ_3_10    17
-/* repeat a zero length 3-10 times  (3 bits of repeat count) */
-
-#define REPZ_11_138  18
-/* repeat a zero length 11-138 times  (7 bits of repeat count) */
-
-local const int extra_lbits[LENGTH_CODES] /* extra bits for each length code */
-   = {0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0};
-
-local const int extra_dbits[D_CODES] /* extra bits for each distance code */
-   = {0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13};
-
-local const int extra_blbits[BL_CODES]/* extra bits for each bit length code */
-   = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7};
-
-local const uch bl_order[BL_CODES]
-   = {16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15};
-/* The lengths of the bit length codes are sent in order of decreasing
- * probability, to avoid transmitting the lengths for unused bit length codes.
- */
-
-/* ===========================================================================
- * Local data. These are initialized only once.
- */
-
-#define DIST_CODE_LEN  512 /* see definition of array dist_code below */
-
-#if defined(GEN_TREES_H) || !defined(STDC)
-/* non ANSI compilers may not accept trees.h */
-
-local ct_data static_ltree[L_CODES+2];
-/* The static literal tree. Since the bit lengths are imposed, there is no
- * need for the L_CODES extra codes used during heap construction. However
- * The codes 286 and 287 are needed to build a canonical tree (see _tr_init
- * below).
- */
-
-local ct_data static_dtree[D_CODES];
-/* The static distance tree. (Actually a trivial tree since all codes use
- * 5 bits.)
- */
-
-uch _dist_code[DIST_CODE_LEN];
-/* Distance codes. The first 256 values correspond to the distances
- * 3 .. 258, the last 256 values correspond to the top 8 bits of
- * the 15 bit distances.
- */
-
-uch _length_code[MAX_MATCH-MIN_MATCH+1];
-/* length code for each normalized match length (0 == MIN_MATCH) */
-
-local int base_length[LENGTH_CODES];
-/* First normalized length for each code (0 = MIN_MATCH) */
-
-local int base_dist[D_CODES];
-/* First normalized distance for each code (0 = distance of 1) */
-
-#else
-#  include "trees.h"
-#endif /* GEN_TREES_H */
-
-struct static_tree_desc_s {
-    const ct_data *static_tree;  /* static tree or NULL */
-    const intf *extra_bits;      /* extra bits for each code or NULL */
-    int     extra_base;          /* base index for extra_bits */
-    int     elems;               /* max number of elements in the tree */
-    int     max_length;          /* max bit length for the codes */
-};
-
-local static_tree_desc  static_l_desc =
-{static_ltree, extra_lbits, LITERALS+1, L_CODES, MAX_BITS};
-
-local static_tree_desc  static_d_desc =
-{static_dtree, extra_dbits, 0,          D_CODES, MAX_BITS};
-
-local static_tree_desc  static_bl_desc =
-{(const ct_data *)0, extra_blbits, 0,   BL_CODES, MAX_BL_BITS};
-
-/* ===========================================================================
- * Local (static) routines in this file.
- */
-
-local void tr_static_init OF((void));
-local void init_block     OF((deflate_state *s));
-local void pqdownheap     OF((deflate_state *s, ct_data *tree, int k));
-local void gen_bitlen     OF((deflate_state *s, tree_desc *desc));
-local void gen_codes      OF((ct_data *tree, int max_code, ushf *bl_count));
-local void build_tree     OF((deflate_state *s, tree_desc *desc));
-local void scan_tree      OF((deflate_state *s, ct_data *tree, int max_code));
-local void send_tree      OF((deflate_state *s, ct_data *tree, int max_code));
-local int  build_bl_tree  OF((deflate_state *s));
-local void send_all_trees OF((deflate_state *s, int lcodes, int dcodes,
-                              int blcodes));
-local void compress_block OF((deflate_state *s, const ct_data *ltree,
-                              const ct_data *dtree));
-local int  detect_data_type OF((deflate_state *s));
-local unsigned bi_reverse OF((unsigned value, int length));
-local void bi_windup      OF((deflate_state *s));
-local void bi_flush       OF((deflate_state *s));
-local void copy_block     OF((deflate_state *s, charf *buf, unsigned len,
-                              int header));
-
-#ifdef GEN_TREES_H
-local void gen_trees_header OF((void));
-#endif
-
-#ifndef DEBUG
-#  define send_code(s, c, tree) send_bits(s, tree[c].Code, tree[c].Len)
-   /* Send a code of the given tree. c and tree must not have side effects */
-
-#else /* DEBUG */
-#  define send_code(s, c, tree) \
-     { if (z_verbose>2) fprintf(stderr,"\ncd %3d ",(c)); \
-       send_bits(s, tree[c].Code, tree[c].Len); }
-#endif
-
-/* ===========================================================================
- * Output a short LSB first on the stream.
- * IN assertion: there is enough room in pendingBuf.
- */
-#define put_short(s, w) { \
-    put_byte(s, (uch)((w) & 0xff)); \
-    put_byte(s, (uch)((ush)(w) >> 8)); \
-}
-
-/* ===========================================================================
- * Send a value on a given number of bits.
- * IN assertion: length <= 16 and value fits in length bits.
- */
-#ifdef DEBUG
-local void send_bits      OF((deflate_state *s, int value, int length));
-
-local void send_bits(s, value, length)
-    deflate_state *s;
-    int value;  /* value to send */
-    int length; /* number of bits */
-{
-    Tracevv((stderr," l %2d v %4x ", length, value));
-    Assert(length > 0 && length <= 15, "invalid length");
-    s->bits_sent += (ulg)length;
-
-    /* If not enough room in bi_buf, use (valid) bits from bi_buf and
-     * (16 - bi_valid) bits from value, leaving (width - (16-bi_valid))
-     * unused bits in value.
-     */
-    if (s->bi_valid > (int)Buf_size - length) {
-        s->bi_buf |= (ush)value << s->bi_valid;
-        put_short(s, s->bi_buf);
-        s->bi_buf = (ush)value >> (Buf_size - s->bi_valid);
-        s->bi_valid += length - Buf_size;
-    } else {
-        s->bi_buf |= (ush)value << s->bi_valid;
-        s->bi_valid += length;
-    }
-}
-#else /* !DEBUG */
-
-#define send_bits(s, value, length) \
-{ int len = length;\
-  if (s->bi_valid > (int)Buf_size - len) {\
-    int val = value;\
-    s->bi_buf |= (ush)val << s->bi_valid;\
-    put_short(s, s->bi_buf);\
-    s->bi_buf = (ush)val >> (Buf_size - s->bi_valid);\
-    s->bi_valid += len - Buf_size;\
-  } else {\
-    s->bi_buf |= (ush)(value) << s->bi_valid;\
-    s->bi_valid += len;\
-  }\
-}
-#endif /* DEBUG */
-
-
-/* the arguments must not have side effects */
-
-/* ===========================================================================
- * Initialize the various 'constant' tables.
- */
-local void tr_static_init()
-{
-#if defined(GEN_TREES_H) || !defined(STDC)
-    static int static_init_done = 0;
-    int n;        /* iterates over tree elements */
-    int bits;     /* bit counter */
-    int length;   /* length value */
-    int code;     /* code value */
-    int dist;     /* distance index */
-    ush bl_count[MAX_BITS+1];
-    /* number of codes at each bit length for an optimal tree */
-
-    if (static_init_done) return;
-
-    /* For some embedded targets, global variables are not initialized: */
-#ifdef NO_INIT_GLOBAL_POINTERS
-    static_l_desc.static_tree = static_ltree;
-    static_l_desc.extra_bits = extra_lbits;
-    static_d_desc.static_tree = static_dtree;
-    static_d_desc.extra_bits = extra_dbits;
-    static_bl_desc.extra_bits = extra_blbits;
-#endif
-
-    /* Initialize the mapping length (0..255) -> length code (0..28) */
-    length = 0;
-    for (code = 0; code < LENGTH_CODES-1; code++) {
-        base_length[code] = length;
-        for (n = 0; n < (1<<extra_lbits[code]); n++) {
-            _length_code[length++] = (uch)code;
-        }
-    }
-    Assert (length == 256, "tr_static_init: length != 256");
-    /* Note that the length 255 (match length 258) can be represented
-     * in two different ways: code 284 + 5 bits or code 285, so we
-     * overwrite length_code[255] to use the best encoding:
-     */
-    _length_code[length-1] = (uch)code;
-
-    /* Initialize the mapping dist (0..32K) -> dist code (0..29) */
-    dist = 0;
-    for (code = 0 ; code < 16; code++) {
-        base_dist[code] = dist;
-        for (n = 0; n < (1<<extra_dbits[code]); n++) {
-            _dist_code[dist++] = (uch)code;
-        }
-    }
-    Assert (dist == 256, "tr_static_init: dist != 256");
-    dist >>= 7; /* from now on, all distances are divided by 128 */
-    for ( ; code < D_CODES; code++) {
-        base_dist[code] = dist << 7;
-        for (n = 0; n < (1<<(extra_dbits[code]-7)); n++) {
-            _dist_code[256 + dist++] = (uch)code;
-        }
-    }
-    Assert (dist == 256, "tr_static_init: 256+dist != 512");
-
-    /* Construct the codes of the static literal tree */
-    for (bits = 0; bits <= MAX_BITS; bits++) bl_count[bits] = 0;
-    n = 0;
-    while (n <= 143) static_ltree[n++].Len = 8, bl_count[8]++;
-    while (n <= 255) static_ltree[n++].Len = 9, bl_count[9]++;
-    while (n <= 279) static_ltree[n++].Len = 7, bl_count[7]++;
-    while (n <= 287) static_ltree[n++].Len = 8, bl_count[8]++;
-    /* Codes 286 and 287 do not exist, but we must include them in the
-     * tree construction to get a canonical Huffman tree (longest code
-     * all ones)
-     */
-    gen_codes((ct_data *)static_ltree, L_CODES+1, bl_count);
-
-    /* The static distance tree is trivial: */
-    for (n = 0; n < D_CODES; n++) {
-        static_dtree[n].Len = 5;
-        static_dtree[n].Code = bi_reverse((unsigned)n, 5);
-    }
-    static_init_done = 1;
-
-#  ifdef GEN_TREES_H
-    gen_trees_header();
-#  endif
-#endif /* defined(GEN_TREES_H) || !defined(STDC) */
-}
-
-/* ===========================================================================
- * Genererate the file trees.h describing the static trees.
- */
-#ifdef GEN_TREES_H
-#  ifndef DEBUG
-#    include <stdio.h>
-#  endif
-
-#  define SEPARATOR(i, last, width) \
-      ((i) == (last)? "\n};\n\n" :    \
-       ((i) % (width) == (width)-1 ? ",\n" : ", "))
-
-void gen_trees_header()
-{
-    FILE *header = fopen("trees.h", "w");
-    int i;
-
-    Assert (header != NULL, "Can't open trees.h");
-    fprintf(header,
-            "/* header created automatically with -DGEN_TREES_H */\n\n");
-
-    fprintf(header, "local const ct_data static_ltree[L_CODES+2] = {\n");
-    for (i = 0; i < L_CODES+2; i++) {
-        fprintf(header, "{{%3u},{%3u}}%s", static_ltree[i].Code,
-                static_ltree[i].Len, SEPARATOR(i, L_CODES+1, 5));
-    }
-
-    fprintf(header, "local const ct_data static_dtree[D_CODES] = {\n");
-    for (i = 0; i < D_CODES; i++) {
-        fprintf(header, "{{%2u},{%2u}}%s", static_dtree[i].Code,
-                static_dtree[i].Len, SEPARATOR(i, D_CODES-1, 5));
-    }
-
-    fprintf(header, "const uch ZLIB_INTERNAL _dist_code[DIST_CODE_LEN] = {\n");
-    for (i = 0; i < DIST_CODE_LEN; i++) {
-        fprintf(header, "%2u%s", _dist_code[i],
-                SEPARATOR(i, DIST_CODE_LEN-1, 20));
-    }
-
-    fprintf(header,
-        "const uch ZLIB_INTERNAL _length_code[MAX_MATCH-MIN_MATCH+1]= {\n");
-    for (i = 0; i < MAX_MATCH-MIN_MATCH+1; i++) {
-        fprintf(header, "%2u%s", _length_code[i],
-                SEPARATOR(i, MAX_MATCH-MIN_MATCH, 20));
-    }
-
-    fprintf(header, "local const int base_length[LENGTH_CODES] = {\n");
-    for (i = 0; i < LENGTH_CODES; i++) {
-        fprintf(header, "%1u%s", base_length[i],
-                SEPARATOR(i, LENGTH_CODES-1, 20));
-    }
-
-    fprintf(header, "local const int base_dist[D_CODES] = {\n");
-    for (i = 0; i < D_CODES; i++) {
-        fprintf(header, "%5u%s", base_dist[i],
-                SEPARATOR(i, D_CODES-1, 10));
-    }
-
-    fclose(header);
-}
-#endif /* GEN_TREES_H */
-
-/* ===========================================================================
- * Initialize the tree data structures for a new zlib stream.
- */
-void ZLIB_INTERNAL _tr_init(s)
-    deflate_state *s;
-{
-    tr_static_init();
-
-    s->l_desc.dyn_tree = s->dyn_ltree;
-    s->l_desc.stat_desc = &static_l_desc;
-
-    s->d_desc.dyn_tree = s->dyn_dtree;
-    s->d_desc.stat_desc = &static_d_desc;
-
-    s->bl_desc.dyn_tree = s->bl_tree;
-    s->bl_desc.stat_desc = &static_bl_desc;
-
-    s->bi_buf = 0;
-    s->bi_valid = 0;
-#ifdef DEBUG
-    s->compressed_len = 0L;
-    s->bits_sent = 0L;
-#endif
-
-    /* Initialize the first block of the first file: */
-    init_block(s);
-}
-
-/* ===========================================================================
- * Initialize a new block.
- */
-local void init_block(s)
-    deflate_state *s;
-{
-    int n; /* iterates over tree elements */
-
-    /* Initialize the trees. */
-    for (n = 0; n < L_CODES;  n++) s->dyn_ltree[n].Freq = 0;
-    for (n = 0; n < D_CODES;  n++) s->dyn_dtree[n].Freq = 0;
-    for (n = 0; n < BL_CODES; n++) s->bl_tree[n].Freq = 0;
-
-    s->dyn_ltree[END_BLOCK].Freq = 1;
-    s->opt_len = s->static_len = 0L;
-    s->last_lit = s->matches = 0;
-}
-
-#define SMALLEST 1
-/* Index within the heap array of least frequent node in the Huffman tree */
-
-
-/* ===========================================================================
- * Remove the smallest element from the heap and recreate the heap with
- * one less element. Updates heap and heap_len.
- */
-#define pqremove(s, tree, top) \
-{\
-    top = s->heap[SMALLEST]; \
-    s->heap[SMALLEST] = s->heap[s->heap_len--]; \
-    pqdownheap(s, tree, SMALLEST); \
-}
-
-/* ===========================================================================
- * Compares to subtrees, using the tree depth as tie breaker when
- * the subtrees have equal frequency. This minimizes the worst case length.
- */
-#define smaller(tree, n, m, depth) \
-   (tree[n].Freq < tree[m].Freq || \
-   (tree[n].Freq == tree[m].Freq && depth[n] <= depth[m]))
-
-/* ===========================================================================
- * Restore the heap property by moving down the tree starting at node k,
- * exchanging a node with the smallest of its two sons if necessary, stopping
- * when the heap property is re-established (each father smaller than its
- * two sons).
- */
-local void pqdownheap(s, tree, k)
-    deflate_state *s;
-    ct_data *tree;  /* the tree to restore */
-    int k;               /* node to move down */
-{
-    int v = s->heap[k];
-    int j = k << 1;  /* left son of k */
-    while (j <= s->heap_len) {
-        /* Set j to the smallest of the two sons: */
-        if (j < s->heap_len &&
-            smaller(tree, s->heap[j+1], s->heap[j], s->depth)) {
-            j++;
-        }
-        /* Exit if v is smaller than both sons */
-        if (smaller(tree, v, s->heap[j], s->depth)) break;
-
-        /* Exchange v with the smallest son */
-        s->heap[k] = s->heap[j];  k = j;
-
-        /* And continue down the tree, setting j to the left son of k */
-        j <<= 1;
-    }
-    s->heap[k] = v;
-}
-
-/* ===========================================================================
- * Compute the optimal bit lengths for a tree and update the total bit length
- * for the current block.
- * IN assertion: the fields freq and dad are set, heap[heap_max] and
- *    above are the tree nodes sorted by increasing frequency.
- * OUT assertions: the field len is set to the optimal bit length, the
- *     array bl_count contains the frequencies for each bit length.
- *     The length opt_len is updated; static_len is also updated if stree is
- *     not null.
- */
-local void gen_bitlen(s, desc)
-    deflate_state *s;
-    tree_desc *desc;    /* the tree descriptor */
-{
-    ct_data *tree        = desc->dyn_tree;
-    int max_code         = desc->max_code;
-    const ct_data *stree = desc->stat_desc->static_tree;
-    const intf *extra    = desc->stat_desc->extra_bits;
-    int base             = desc->stat_desc->extra_base;
-    int max_length       = desc->stat_desc->max_length;
-    int h;              /* heap index */
-    int n, m;           /* iterate over the tree elements */
-    int bits;           /* bit length */
-    int xbits;          /* extra bits */
-    ush f;              /* frequency */
-    int overflow = 0;   /* number of elements with bit length too large */
-
-    for (bits = 0; bits <= MAX_BITS; bits++) s->bl_count[bits] = 0;
-
-    /* In a first pass, compute the optimal bit lengths (which may
-     * overflow in the case of the bit length tree).
-     */
-    tree[s->heap[s->heap_max]].Len = 0; /* root of the heap */
-
-    for (h = s->heap_max+1; h < HEAP_SIZE; h++) {
-        n = s->heap[h];
-        bits = tree[tree[n].Dad].Len + 1;
-        if (bits > max_length) bits = max_length, overflow++;
-        tree[n].Len = (ush)bits;
-        /* We overwrite tree[n].Dad which is no longer needed */
-
-        if (n > max_code) continue; /* not a leaf node */
-
-        s->bl_count[bits]++;
-        xbits = 0;
-        if (n >= base) xbits = extra[n-base];
-        f = tree[n].Freq;
-        s->opt_len += (ulg)f * (bits + xbits);
-        if (stree) s->static_len += (ulg)f * (stree[n].Len + xbits);
-    }
-    if (overflow == 0) return;
-
-    Trace((stderr,"\nbit length overflow\n"));
-    /* This happens for example on obj2 and pic of the Calgary corpus */
-
-    /* Find the first bit length which could increase: */
-    do {
-        bits = max_length-1;
-        while (s->bl_count[bits] == 0) bits--;
-        s->bl_count[bits]--;      /* move one leaf down the tree */
-        s->bl_count[bits+1] += 2; /* move one overflow item as its brother */
-        s->bl_count[max_length]--;
-        /* The brother of the overflow item also moves one step up,
-         * but this does not affect bl_count[max_length]
-         */
-        overflow -= 2;
-    } while (overflow > 0);
-
-    /* Now recompute all bit lengths, scanning in increasing frequency.
-     * h is still equal to HEAP_SIZE. (It is simpler to reconstruct all
-     * lengths instead of fixing only the wrong ones. This idea is taken
-     * from 'ar' written by Haruhiko Okumura.)
-     */
-    for (bits = max_length; bits != 0; bits--) {
-        n = s->bl_count[bits];
-        while (n != 0) {
-            m = s->heap[--h];
-            if (m > max_code) continue;
-            if ((unsigned) tree[m].Len != (unsigned) bits) {
-                Trace((stderr,"code %d bits %d->%d\n", m, tree[m].Len, bits));
-                s->opt_len += ((long)bits - (long)tree[m].Len)
-                              *(long)tree[m].Freq;
-                tree[m].Len = (ush)bits;
-            }
-            n--;
-        }
-    }
-}
-
-/* ===========================================================================
- * Generate the codes for a given tree and bit counts (which need not be
- * optimal).
- * IN assertion: the array bl_count contains the bit length statistics for
- * the given tree and the field len is set for all tree elements.
- * OUT assertion: the field code is set for all tree elements of non
- *     zero code length.
- */
-local void gen_codes (tree, max_code, bl_count)
-    ct_data *tree;             /* the tree to decorate */
-    int max_code;              /* largest code with non zero frequency */
-    ushf *bl_count;            /* number of codes at each bit length */
-{
-    ush next_code[MAX_BITS+1]; /* next code value for each bit length */
-    ush code = 0;              /* running code value */
-    int bits;                  /* bit index */
-    int n;                     /* code index */
-
-    /* The distribution counts are first used to generate the code values
-     * without bit reversal.
-     */
-    for (bits = 1; bits <= MAX_BITS; bits++) {
-        next_code[bits] = code = (code + bl_count[bits-1]) << 1;
-    }
-    /* Check that the bit counts in bl_count are consistent. The last code
-     * must be all ones.
-     */
-    Assert (code + bl_count[MAX_BITS]-1 == (1<<MAX_BITS)-1,
-            "inconsistent bit counts");
-    Tracev((stderr,"\ngen_codes: max_code %d ", max_code));
-
-    for (n = 0;  n <= max_code; n++) {
-        int len = tree[n].Len;
-        if (len == 0) continue;
-        /* Now reverse the bits */
-        tree[n].Code = bi_reverse(next_code[len]++, len);
-
-        Tracecv(tree != static_ltree, (stderr,"\nn %3d %c l %2d c %4x (%x) ",
-             n, (isgraph(n) ? n : ' '), len, tree[n].Code, next_code[len]-1));
-    }
-}
-
-/* ===========================================================================
- * Construct one Huffman tree and assigns the code bit strings and lengths.
- * Update the total bit length for the current block.
- * IN assertion: the field freq is set for all tree elements.
- * OUT assertions: the fields len and code are set to the optimal bit length
- *     and corresponding code. The length opt_len is updated; static_len is
- *     also updated if stree is not null. The field max_code is set.
- */
-local void build_tree(s, desc)
-    deflate_state *s;
-    tree_desc *desc; /* the tree descriptor */
-{
-    ct_data *tree         = desc->dyn_tree;
-    const ct_data *stree  = desc->stat_desc->static_tree;
-    int elems             = desc->stat_desc->elems;
-    int n, m;          /* iterate over heap elements */
-    int max_code = -1; /* largest code with non zero frequency */
-    int node;          /* new node being created */
-
-    /* Construct the initial heap, with least frequent element in
-     * heap[SMALLEST]. The sons of heap[n] are heap[2*n] and heap[2*n+1].
-     * heap[0] is not used.
-     */
-    s->heap_len = 0, s->heap_max = HEAP_SIZE;
-
-    for (n = 0; n < elems; n++) {
-        if (tree[n].Freq != 0) {
-            s->heap[++(s->heap_len)] = max_code = n;
-            s->depth[n] = 0;
-        } else {
-            tree[n].Len = 0;
-        }
-    }
-
-    /* The pkzip format requires that at least one distance code exists,
-     * and that at least one bit should be sent even if there is only one
-     * possible code. So to avoid special checks later on we force at least
-     * two codes of non zero frequency.
-     */
-    while (s->heap_len < 2) {
-        node = s->heap[++(s->heap_len)] = (max_code < 2 ? ++max_code : 0);
-        tree[node].Freq = 1;
-        s->depth[node] = 0;
-        s->opt_len--; if (stree) s->static_len -= stree[node].Len;
-        /* node is 0 or 1 so it does not have extra bits */
-    }
-    desc->max_code = max_code;
-
-    /* The elements heap[heap_len/2+1 .. heap_len] are leaves of the tree,
-     * establish sub-heaps of increasing lengths:
-     */
-    for (n = s->heap_len/2; n >= 1; n--) pqdownheap(s, tree, n);
-
-    /* Construct the Huffman tree by repeatedly combining the least two
-     * frequent nodes.
-     */
-    node = elems;              /* next internal node of the tree */
-    do {
-        pqremove(s, tree, n);  /* n = node of least frequency */
-        m = s->heap[SMALLEST]; /* m = node of next least frequency */
-
-        s->heap[--(s->heap_max)] = n; /* keep the nodes sorted by frequency */
-        s->heap[--(s->heap_max)] = m;
-
-        /* Create a new node father of n and m */
-        tree[node].Freq = tree[n].Freq + tree[m].Freq;
-        s->depth[node] = (uch)((s->depth[n] >= s->depth[m] ?
-                                s->depth[n] : s->depth[m]) + 1);
-        tree[n].Dad = tree[m].Dad = (ush)node;
-#ifdef DUMP_BL_TREE
-        if (tree == s->bl_tree) {
-            fprintf(stderr,"\nnode %d(%d), sons %d(%d) %d(%d)",
-                    node, tree[node].Freq, n, tree[n].Freq, m, tree[m].Freq);
-        }
-#endif
-        /* and insert the new node in the heap */
-        s->heap[SMALLEST] = node++;
-        pqdownheap(s, tree, SMALLEST);
-
-    } while (s->heap_len >= 2);
-
-    s->heap[--(s->heap_max)] = s->heap[SMALLEST];
-
-    /* At this point, the fields freq and dad are set. We can now
-     * generate the bit lengths.
-     */
-    gen_bitlen(s, (tree_desc *)desc);
-
-    /* The field len is now set, we can generate the bit codes */
-    gen_codes ((ct_data *)tree, max_code, s->bl_count);
-}
-
-/* ===========================================================================
- * Scan a literal or distance tree to determine the frequencies of the codes
- * in the bit length tree.
- */
-local void scan_tree (s, tree, max_code)
-    deflate_state *s;
-    ct_data *tree;   /* the tree to be scanned */
-    int max_code;    /* and its largest code of non zero frequency */
-{
-    int n;                     /* iterates over all tree elements */
-    int prevlen = -1;          /* last emitted length */
-    int curlen;                /* length of current code */
-    int nextlen = tree[0].Len; /* length of next code */
-    int count = 0;             /* repeat count of the current code */
-    int max_count = 7;         /* max repeat count */
-    int min_count = 4;         /* min repeat count */
-
-    if (nextlen == 0) max_count = 138, min_count = 3;
-    tree[max_code+1].Len = (ush)0xffff; /* guard */
-
-    for (n = 0; n <= max_code; n++) {
-        curlen = nextlen; nextlen = tree[n+1].Len;
-        if (++count < max_count && curlen == nextlen) {
-            continue;
-        } else if (count < min_count) {
-            s->bl_tree[curlen].Freq += count;
-        } else if (curlen != 0) {
-            if (curlen != prevlen) s->bl_tree[curlen].Freq++;
-            s->bl_tree[REP_3_6].Freq++;
-        } else if (count <= 10) {
-            s->bl_tree[REPZ_3_10].Freq++;
-        } else {
-            s->bl_tree[REPZ_11_138].Freq++;
-        }
-        count = 0; prevlen = curlen;
-        if (nextlen == 0) {
-            max_count = 138, min_count = 3;
-        } else if (curlen == nextlen) {
-            max_count = 6, min_count = 3;
-        } else {
-            max_count = 7, min_count = 4;
-        }
-    }
-}
-
-/* ===========================================================================
- * Send a literal or distance tree in compressed form, using the codes in
- * bl_tree.
- */
-local void send_tree (s, tree, max_code)
-    deflate_state *s;
-    ct_data *tree; /* the tree to be scanned */
-    int max_code;       /* and its largest code of non zero frequency */
-{
-    int n;                     /* iterates over all tree elements */
-    int prevlen = -1;          /* last emitted length */
-    int curlen;                /* length of current code */
-    int nextlen = tree[0].Len; /* length of next code */
-    int count = 0;             /* repeat count of the current code */
-    int max_count = 7;         /* max repeat count */
-    int min_count = 4;         /* min repeat count */
-
-    /* tree[max_code+1].Len = -1; */  /* guard already set */
-    if (nextlen == 0) max_count = 138, min_count = 3;
-
-    for (n = 0; n <= max_code; n++) {
-        curlen = nextlen; nextlen = tree[n+1].Len;
-        if (++count < max_count && curlen == nextlen) {
-            continue;
-        } else if (count < min_count) {
-            do { send_code(s, curlen, s->bl_tree); } while (--count != 0);
-
-        } else if (curlen != 0) {
-            if (curlen != prevlen) {
-                send_code(s, curlen, s->bl_tree); count--;
-            }
-            Assert(count >= 3 && count <= 6, " 3_6?");
-            send_code(s, REP_3_6, s->bl_tree); send_bits(s, count-3, 2);
-
-        } else if (count <= 10) {
-            send_code(s, REPZ_3_10, s->bl_tree); send_bits(s, count-3, 3);
-
-        } else {
-            send_code(s, REPZ_11_138, s->bl_tree); send_bits(s, count-11, 7);
-        }
-        count = 0; prevlen = curlen;
-        if (nextlen == 0) {
-            max_count = 138, min_count = 3;
-        } else if (curlen == nextlen) {
-            max_count = 6, min_count = 3;
-        } else {
-            max_count = 7, min_count = 4;
-        }
-    }
-}
-
-/* ===========================================================================
- * Construct the Huffman tree for the bit lengths and return the index in
- * bl_order of the last bit length code to send.
- */
-local int build_bl_tree(s)
-    deflate_state *s;
-{
-    int max_blindex;  /* index of last bit length code of non zero freq */
-
-    /* Determine the bit length frequencies for literal and distance trees */
-    scan_tree(s, (ct_data *)s->dyn_ltree, s->l_desc.max_code);
-    scan_tree(s, (ct_data *)s->dyn_dtree, s->d_desc.max_code);
-
-    /* Build the bit length tree: */
-    build_tree(s, (tree_desc *)(&(s->bl_desc)));
-    /* opt_len now includes the length of the tree representations, except
-     * the lengths of the bit lengths codes and the 5+5+4 bits for the counts.
-     */
-
-    /* Determine the number of bit length codes to send. The pkzip format
-     * requires that at least 4 bit length codes be sent. (appnote.txt says
-     * 3 but the actual value used is 4.)
-     */
-    for (max_blindex = BL_CODES-1; max_blindex >= 3; max_blindex--) {
-        if (s->bl_tree[bl_order[max_blindex]].Len != 0) break;
-    }
-    /* Update opt_len to include the bit length tree and counts */
-    s->opt_len += 3*(max_blindex+1) + 5+5+4;
-    Tracev((stderr, "\ndyn trees: dyn %ld, stat %ld",
-            s->opt_len, s->static_len));
-
-    return max_blindex;
-}
-
-/* ===========================================================================
- * Send the header for a block using dynamic Huffman trees: the counts, the
- * lengths of the bit length codes, the literal tree and the distance tree.
- * IN assertion: lcodes >= 257, dcodes >= 1, blcodes >= 4.
- */
-local void send_all_trees(s, lcodes, dcodes, blcodes)
-    deflate_state *s;
-    int lcodes, dcodes, blcodes; /* number of codes for each tree */
-{
-    int rank;                    /* index in bl_order */
-
-    Assert (lcodes >= 257 && dcodes >= 1 && blcodes >= 4, "not enough codes");
-    Assert (lcodes <= L_CODES && dcodes <= D_CODES && blcodes <= BL_CODES,
-            "too many codes");
-    Tracev((stderr, "\nbl counts: "));
-    send_bits(s, lcodes-257, 5); /* not +255 as stated in appnote.txt */
-    send_bits(s, dcodes-1,   5);
-    send_bits(s, blcodes-4,  4); /* not -3 as stated in appnote.txt */
-    for (rank = 0; rank < blcodes; rank++) {
-        Tracev((stderr, "\nbl code %2d ", bl_order[rank]));
-        send_bits(s, s->bl_tree[bl_order[rank]].Len, 3);
-    }
-    Tracev((stderr, "\nbl tree: sent %ld", s->bits_sent));
-
-    send_tree(s, (ct_data *)s->dyn_ltree, lcodes-1); /* literal tree */
-    Tracev((stderr, "\nlit tree: sent %ld", s->bits_sent));
-
-    send_tree(s, (ct_data *)s->dyn_dtree, dcodes-1); /* distance tree */
-    Tracev((stderr, "\ndist tree: sent %ld", s->bits_sent));
-}
-
-/* ===========================================================================
- * Send a stored block
- */
-void ZLIB_INTERNAL _tr_stored_block(s, buf, stored_len, last)
-    deflate_state *s;
-    charf *buf;       /* input block */
-    ulg stored_len;   /* length of input block */
-    int last;         /* one if this is the last block for a file */
-{
-    send_bits(s, (STORED_BLOCK<<1)+last, 3);    /* send block type */
-#ifdef DEBUG
-    s->compressed_len = (s->compressed_len + 3 + 7) & (ulg)~7L;
-    s->compressed_len += (stored_len + 4) << 3;
-#endif
-    copy_block(s, buf, (unsigned)stored_len, 1); /* with header */
-}
-
-/* ===========================================================================
- * Flush the bits in the bit buffer to pending output (leaves at most 7 bits)
- */
-void ZLIB_INTERNAL _tr_flush_bits(s)
-    deflate_state *s;
-{
-    bi_flush(s);
-}
-
-/* ===========================================================================
- * Send one empty static block to give enough lookahead for inflate.
- * This takes 10 bits, of which 7 may remain in the bit buffer.
- */
-void ZLIB_INTERNAL _tr_align(s)
-    deflate_state *s;
-{
-    send_bits(s, STATIC_TREES<<1, 3);
-    send_code(s, END_BLOCK, static_ltree);
-#ifdef DEBUG
-    s->compressed_len += 10L; /* 3 for block type, 7 for EOB */
-#endif
-    bi_flush(s);
-}
-
-/* ===========================================================================
- * Determine the best encoding for the current block: dynamic trees, static
- * trees or store, and output the encoded block to the zip file.
- */
-void ZLIB_INTERNAL _tr_flush_block(s, buf, stored_len, last)
-    deflate_state *s;
-    charf *buf;       /* input block, or NULL if too old */
-    ulg stored_len;   /* length of input block */
-    int last;         /* one if this is the last block for a file */
-{
-    ulg opt_lenb, static_lenb; /* opt_len and static_len in bytes */
-    int max_blindex = 0;  /* index of last bit length code of non zero freq */
-
-    /* Build the Huffman trees unless a stored block is forced */
-    if (s->level > 0) {
-
-        /* Check if the file is binary or text */
-        if (s->strm->data_type == Z_UNKNOWN)
-            s->strm->data_type = detect_data_type(s);
-
-        /* Construct the literal and distance trees */
-        build_tree(s, (tree_desc *)(&(s->l_desc)));
-        Tracev((stderr, "\nlit data: dyn %ld, stat %ld", s->opt_len,
-                s->static_len));
-
-        build_tree(s, (tree_desc *)(&(s->d_desc)));
-        Tracev((stderr, "\ndist data: dyn %ld, stat %ld", s->opt_len,
-                s->static_len));
-        /* At this point, opt_len and static_len are the total bit lengths of
-         * the compressed block data, excluding the tree representations.
-         */
-
-        /* Build the bit length tree for the above two trees, and get the index
-         * in bl_order of the last bit length code to send.
-         */
-        max_blindex = build_bl_tree(s);
-
-        /* Determine the best encoding. Compute the block lengths in bytes. */
-        opt_lenb = (s->opt_len+3+7)>>3;
-        static_lenb = (s->static_len+3+7)>>3;
-
-        Tracev((stderr, "\nopt %lu(%lu) stat %lu(%lu) stored %lu lit %u ",
-                opt_lenb, s->opt_len, static_lenb, s->static_len, stored_len,
-                s->last_lit));
-
-        if (static_lenb <= opt_lenb) opt_lenb = static_lenb;
-
-    } else {
-        Assert(buf != (char*)0, "lost buf");
-        opt_lenb = static_lenb = stored_len + 5; /* force a stored block */
-    }
-
-#ifdef FORCE_STORED
-    if (buf != (char*)0) { /* force stored block */
-#else
-    if (stored_len+4 <= opt_lenb && buf != (char*)0) {
-                       /* 4: two words for the lengths */
-#endif
-        /* The test buf != NULL is only necessary if LIT_BUFSIZE > WSIZE.
-         * Otherwise we can't have processed more than WSIZE input bytes since
-         * the last block flush, because compression would have been
-         * successful. If LIT_BUFSIZE <= WSIZE, it is never too late to
-         * transform a block into a stored block.
-         */
-        _tr_stored_block(s, buf, stored_len, last);
-
-#ifdef FORCE_STATIC
-    } else if (static_lenb >= 0) { /* force static trees */
-#else
-    } else if (s->strategy == Z_FIXED || static_lenb == opt_lenb) {
-#endif
-        send_bits(s, (STATIC_TREES<<1)+last, 3);
-        compress_block(s, (const ct_data *)static_ltree,
-                       (const ct_data *)static_dtree);
-#ifdef DEBUG
-        s->compressed_len += 3 + s->static_len;
-#endif
-    } else {
-        send_bits(s, (DYN_TREES<<1)+last, 3);
-        send_all_trees(s, s->l_desc.max_code+1, s->d_desc.max_code+1,
-                       max_blindex+1);
-        compress_block(s, (const ct_data *)s->dyn_ltree,
-                       (const ct_data *)s->dyn_dtree);
-#ifdef DEBUG
-        s->compressed_len += 3 + s->opt_len;
-#endif
-    }
-    Assert (s->compressed_len == s->bits_sent, "bad compressed size");
-    /* The above check is made mod 2^32, for files larger than 512 MB
-     * and uLong implemented on 32 bits.
-     */
-    init_block(s);
-
-    if (last) {
-        bi_windup(s);
-#ifdef DEBUG
-        s->compressed_len += 7;  /* align on byte boundary */
-#endif
-    }
-    Tracev((stderr,"\ncomprlen %lu(%lu) ", s->compressed_len>>3,
-           s->compressed_len-7*last));
-}
-
-/* ===========================================================================
- * Save the match info and tally the frequency counts. Return true if
- * the current block must be flushed.
- */
-int ZLIB_INTERNAL _tr_tally (s, dist, lc)
-    deflate_state *s;
-    unsigned dist;  /* distance of matched string */
-    unsigned lc;    /* match length-MIN_MATCH or unmatched char (if dist==0) */
-{
-    s->d_buf[s->last_lit] = (ush)dist;
-    s->l_buf[s->last_lit++] = (uch)lc;
-    if (dist == 0) {
-        /* lc is the unmatched char */
-        s->dyn_ltree[lc].Freq++;
-    } else {
-        s->matches++;
-        /* Here, lc is the match length - MIN_MATCH */
-        dist--;             /* dist = match distance - 1 */
-        Assert((ush)dist < (ush)MAX_DIST(s) &&
-               (ush)lc <= (ush)(MAX_MATCH-MIN_MATCH) &&
-               (ush)d_code(dist) < (ush)D_CODES,  "_tr_tally: bad match");
-
-        s->dyn_ltree[_length_code[lc]+LITERALS+1].Freq++;
-        s->dyn_dtree[d_code(dist)].Freq++;
-    }
-
-#ifdef TRUNCATE_BLOCK
-    /* Try to guess if it is profitable to stop the current block here */
-    if ((s->last_lit & 0x1fff) == 0 && s->level > 2) {
-        /* Compute an upper bound for the compressed length */
-        ulg out_length = (ulg)s->last_lit*8L;
-        ulg in_length = (ulg)((long)s->strstart - s->block_start);
-        int dcode;
-        for (dcode = 0; dcode < D_CODES; dcode++) {
-            out_length += (ulg)s->dyn_dtree[dcode].Freq *
-                (5L+extra_dbits[dcode]);
-        }
-        out_length >>= 3;
-        Tracev((stderr,"\nlast_lit %u, in %ld, out ~%ld(%ld%%) ",
-               s->last_lit, in_length, out_length,
-               100L - out_length*100L/in_length));
-        if (s->matches < s->last_lit/2 && out_length < in_length/2) return 1;
-    }
-#endif
-    return (s->last_lit == s->lit_bufsize-1);
-    /* We avoid equality with lit_bufsize because of wraparound at 64K
-     * on 16 bit machines and because stored blocks are restricted to
-     * 64K-1 bytes.
-     */
-}
-
-/* ===========================================================================
- * Send the block data compressed using the given Huffman trees
- */
-local void compress_block(s, ltree, dtree)
-    deflate_state *s;
-    const ct_data *ltree; /* literal tree */
-    const ct_data *dtree; /* distance tree */
-{
-    unsigned dist;      /* distance of matched string */
-    int lc;             /* match length or unmatched char (if dist == 0) */
-    unsigned lx = 0;    /* running index in l_buf */
-    unsigned code;      /* the code to send */
-    int extra;          /* number of extra bits to send */
-
-    if (s->last_lit != 0) do {
-        dist = s->d_buf[lx];
-        lc = s->l_buf[lx++];
-        if (dist == 0) {
-            send_code(s, lc, ltree); /* send a literal byte */
-            Tracecv(isgraph(lc), (stderr," '%c' ", lc));
-        } else {
-            /* Here, lc is the match length - MIN_MATCH */
-            code = _length_code[lc];
-            send_code(s, code+LITERALS+1, ltree); /* send the length code */
-            extra = extra_lbits[code];
-            if (extra != 0) {
-                lc -= base_length[code];
-                send_bits(s, lc, extra);       /* send the extra length bits */
-            }
-            dist--; /* dist is now the match distance - 1 */
-            code = d_code(dist);
-            Assert (code < D_CODES, "bad d_code");
-
-            send_code(s, code, dtree);       /* send the distance code */
-            extra = extra_dbits[code];
-            if (extra != 0) {
-                dist -= base_dist[code];
-                send_bits(s, dist, extra);   /* send the extra distance bits */
-            }
-        } /* literal or match pair ? */
-
-        /* Check that the overlay between pending_buf and d_buf+l_buf is ok: */
-        Assert((uInt)(s->pending) < s->lit_bufsize + 2*lx,
-               "pendingBuf overflow");
-
-    } while (lx < s->last_lit);
-
-    send_code(s, END_BLOCK, ltree);
-}
-
-/* ===========================================================================
- * Check if the data type is TEXT or BINARY, using the following algorithm:
- * - TEXT if the two conditions below are satisfied:
- *    a) There are no non-portable control characters belonging to the
- *       "black list" (0..6, 14..25, 28..31).
- *    b) There is at least one printable character belonging to the
- *       "white list" (9 {TAB}, 10 {LF}, 13 {CR}, 32..255).
- * - BINARY otherwise.
- * - The following partially-portable control characters form a
- *   "gray list" that is ignored in this detection algorithm:
- *   (7 {BEL}, 8 {BS}, 11 {VT}, 12 {FF}, 26 {SUB}, 27 {ESC}).
- * IN assertion: the fields Freq of dyn_ltree are set.
- */
-local int detect_data_type(s)
-    deflate_state *s;
-{
-    /* black_mask is the bit mask of black-listed bytes
-     * set bits 0..6, 14..25, and 28..31
-     * 0xf3ffc07f = binary 11110011111111111100000001111111
-     */
-    unsigned long black_mask = 0xf3ffc07fUL;
-    int n;
-
-    /* Check for non-textual ("black-listed") bytes. */
-    for (n = 0; n <= 31; n++, black_mask >>= 1)
-        if ((black_mask & 1) && (s->dyn_ltree[n].Freq != 0))
-            return Z_BINARY;
-
-    /* Check for textual ("white-listed") bytes. */
-    if (s->dyn_ltree[9].Freq != 0 || s->dyn_ltree[10].Freq != 0
-            || s->dyn_ltree[13].Freq != 0)
-        return Z_TEXT;
-    for (n = 32; n < LITERALS; n++)
-        if (s->dyn_ltree[n].Freq != 0)
-            return Z_TEXT;
-
-    /* There are no "black-listed" or "white-listed" bytes:
-     * this stream either is empty or has tolerated ("gray-listed") bytes only.
-     */
-    return Z_BINARY;
-}
-
-/* ===========================================================================
- * Reverse the first len bits of a code, using straightforward code (a faster
- * method would use a table)
- * IN assertion: 1 <= len <= 15
- */
-local unsigned bi_reverse(code, len)
-    unsigned code; /* the value to invert */
-    int len;       /* its bit length */
-{
-    register unsigned res = 0;
-    do {
-        res |= code & 1;
-        code >>= 1, res <<= 1;
-    } while (--len > 0);
-    return res >> 1;
-}
-
-/* ===========================================================================
- * Flush the bit buffer, keeping at most 7 bits in it.
- */
-local void bi_flush(s)
-    deflate_state *s;
-{
-    if (s->bi_valid == 16) {
-        put_short(s, s->bi_buf);
-        s->bi_buf = 0;
-        s->bi_valid = 0;
-    } else if (s->bi_valid >= 8) {
-        put_byte(s, (Byte)s->bi_buf);
-        s->bi_buf >>= 8;
-        s->bi_valid -= 8;
-    }
-}
-
-/* ===========================================================================
- * Flush the bit buffer and align the output on a byte boundary
- */
-local void bi_windup(s)
-    deflate_state *s;
-{
-    if (s->bi_valid > 8) {
-        put_short(s, s->bi_buf);
-    } else if (s->bi_valid > 0) {
-        put_byte(s, (Byte)s->bi_buf);
-    }
-    s->bi_buf = 0;
-    s->bi_valid = 0;
-#ifdef DEBUG
-    s->bits_sent = (s->bits_sent+7) & ~7;
-#endif
-}
-
-/* ===========================================================================
- * Copy a stored block, storing first the length and its
- * one's complement if requested.
- */
-local void copy_block(s, buf, len, header)
-    deflate_state *s;
-    charf    *buf;    /* the input data */
-    unsigned len;     /* its length */
-    int      header;  /* true if block header must be written */
-{
-    bi_windup(s);        /* align on byte boundary */
-
-    if (header) {
-        put_short(s, (ush)len);
-        put_short(s, (ush)~len);
-#ifdef DEBUG
-        s->bits_sent += 2*16;
-#endif
-    }
-#ifdef DEBUG
-    s->bits_sent += (ulg)len<<3;
-#endif
-    while (len--) {
-        put_byte(s, *buf++);
-    }
-}
diff --git a/src/extra/zlib/trees.h b/src/extra/zlib/trees.h
deleted file mode 100644
index d35639d..0000000
--- a/src/extra/zlib/trees.h
+++ /dev/null
@@ -1,128 +0,0 @@
-/* header created automatically with -DGEN_TREES_H */
-
-local const ct_data static_ltree[L_CODES+2] = {
-{{ 12},{  8}}, {{140},{  8}}, {{ 76},{  8}}, {{204},{  8}}, {{ 44},{  8}},
-{{172},{  8}}, {{108},{  8}}, {{236},{  8}}, {{ 28},{  8}}, {{156},{  8}},
-{{ 92},{  8}}, {{220},{  8}}, {{ 60},{  8}}, {{188},{  8}}, {{124},{  8}},
-{{252},{  8}}, {{  2},{  8}}, {{130},{  8}}, {{ 66},{  8}}, {{194},{  8}},
-{{ 34},{  8}}, {{162},{  8}}, {{ 98},{  8}}, {{226},{  8}}, {{ 18},{  8}},
-{{146},{  8}}, {{ 82},{  8}}, {{210},{  8}}, {{ 50},{  8}}, {{178},{  8}},
-{{114},{  8}}, {{242},{  8}}, {{ 10},{  8}}, {{138},{  8}}, {{ 74},{  8}},
-{{202},{  8}}, {{ 42},{  8}}, {{170},{  8}}, {{106},{  8}}, {{234},{  8}},
-{{ 26},{  8}}, {{154},{  8}}, {{ 90},{  8}}, {{218},{  8}}, {{ 58},{  8}},
-{{186},{  8}}, {{122},{  8}}, {{250},{  8}}, {{  6},{  8}}, {{134},{  8}},
-{{ 70},{  8}}, {{198},{  8}}, {{ 38},{  8}}, {{166},{  8}}, {{102},{  8}},
-{{230},{  8}}, {{ 22},{  8}}, {{150},{  8}}, {{ 86},{  8}}, {{214},{  8}},
-{{ 54},{  8}}, {{182},{  8}}, {{118},{  8}}, {{246},{  8}}, {{ 14},{  8}},
-{{142},{  8}}, {{ 78},{  8}}, {{206},{  8}}, {{ 46},{  8}}, {{174},{  8}},
-{{110},{  8}}, {{238},{  8}}, {{ 30},{  8}}, {{158},{  8}}, {{ 94},{  8}},
-{{222},{  8}}, {{ 62},{  8}}, {{190},{  8}}, {{126},{  8}}, {{254},{  8}},
-{{  1},{  8}}, {{129},{  8}}, {{ 65},{  8}}, {{193},{  8}}, {{ 33},{  8}},
-{{161},{  8}}, {{ 97},{  8}}, {{225},{  8}}, {{ 17},{  8}}, {{145},{  8}},
-{{ 81},{  8}}, {{209},{  8}}, {{ 49},{  8}}, {{177},{  8}}, {{113},{  8}},
-{{241},{  8}}, {{  9},{  8}}, {{137},{  8}}, {{ 73},{  8}}, {{201},{  8}},
-{{ 41},{  8}}, {{169},{  8}}, {{105},{  8}}, {{233},{  8}}, {{ 25},{  8}},
-{{153},{  8}}, {{ 89},{  8}}, {{217},{  8}}, {{ 57},{  8}}, {{185},{  8}},
-{{121},{  8}}, {{249},{  8}}, {{  5},{  8}}, {{133},{  8}}, {{ 69},{  8}},
-{{197},{  8}}, {{ 37},{  8}}, {{165},{  8}}, {{101},{  8}}, {{229},{  8}},
-{{ 21},{  8}}, {{149},{  8}}, {{ 85},{  8}}, {{213},{  8}}, {{ 53},{  8}},
-{{181},{  8}}, {{117},{  8}}, {{245},{  8}}, {{ 13},{  8}}, {{141},{  8}},
-{{ 77},{  8}}, {{205},{  8}}, {{ 45},{  8}}, {{173},{  8}}, {{109},{  8}},
-{{237},{  8}}, {{ 29},{  8}}, {{157},{  8}}, {{ 93},{  8}}, {{221},{  8}},
-{{ 61},{  8}}, {{189},{  8}}, {{125},{  8}}, {{253},{  8}}, {{ 19},{  9}},
-{{275},{  9}}, {{147},{  9}}, {{403},{  9}}, {{ 83},{  9}}, {{339},{  9}},
-{{211},{  9}}, {{467},{  9}}, {{ 51},{  9}}, {{307},{  9}}, {{179},{  9}},
-{{435},{  9}}, {{115},{  9}}, {{371},{  9}}, {{243},{  9}}, {{499},{  9}},
-{{ 11},{  9}}, {{267},{  9}}, {{139},{  9}}, {{395},{  9}}, {{ 75},{  9}},
-{{331},{  9}}, {{203},{  9}}, {{459},{  9}}, {{ 43},{  9}}, {{299},{  9}},
-{{171},{  9}}, {{427},{  9}}, {{107},{  9}}, {{363},{  9}}, {{235},{  9}},
-{{491},{  9}}, {{ 27},{  9}}, {{283},{  9}}, {{155},{  9}}, {{411},{  9}},
-{{ 91},{  9}}, {{347},{  9}}, {{219},{  9}}, {{475},{  9}}, {{ 59},{  9}},
-{{315},{  9}}, {{187},{  9}}, {{443},{  9}}, {{123},{  9}}, {{379},{  9}},
-{{251},{  9}}, {{507},{  9}}, {{  7},{  9}}, {{263},{  9}}, {{135},{  9}},
-{{391},{  9}}, {{ 71},{  9}}, {{327},{  9}}, {{199},{  9}}, {{455},{  9}},
-{{ 39},{  9}}, {{295},{  9}}, {{167},{  9}}, {{423},{  9}}, {{103},{  9}},
-{{359},{  9}}, {{231},{  9}}, {{487},{  9}}, {{ 23},{  9}}, {{279},{  9}},
-{{151},{  9}}, {{407},{  9}}, {{ 87},{  9}}, {{343},{  9}}, {{215},{  9}},
-{{471},{  9}}, {{ 55},{  9}}, {{311},{  9}}, {{183},{  9}}, {{439},{  9}},
-{{119},{  9}}, {{375},{  9}}, {{247},{  9}}, {{503},{  9}}, {{ 15},{  9}},
-{{271},{  9}}, {{143},{  9}}, {{399},{  9}}, {{ 79},{  9}}, {{335},{  9}},
-{{207},{  9}}, {{463},{  9}}, {{ 47},{  9}}, {{303},{  9}}, {{175},{  9}},
-{{431},{  9}}, {{111},{  9}}, {{367},{  9}}, {{239},{  9}}, {{495},{  9}},
-{{ 31},{  9}}, {{287},{  9}}, {{159},{  9}}, {{415},{  9}}, {{ 95},{  9}},
-{{351},{  9}}, {{223},{  9}}, {{479},{  9}}, {{ 63},{  9}}, {{319},{  9}},
-{{191},{  9}}, {{447},{  9}}, {{127},{  9}}, {{383},{  9}}, {{255},{  9}},
-{{511},{  9}}, {{  0},{  7}}, {{ 64},{  7}}, {{ 32},{  7}}, {{ 96},{  7}},
-{{ 16},{  7}}, {{ 80},{  7}}, {{ 48},{  7}}, {{112},{  7}}, {{  8},{  7}},
-{{ 72},{  7}}, {{ 40},{  7}}, {{104},{  7}}, {{ 24},{  7}}, {{ 88},{  7}},
-{{ 56},{  7}}, {{120},{  7}}, {{  4},{  7}}, {{ 68},{  7}}, {{ 36},{  7}},
-{{100},{  7}}, {{ 20},{  7}}, {{ 84},{  7}}, {{ 52},{  7}}, {{116},{  7}},
-{{  3},{  8}}, {{131},{  8}}, {{ 67},{  8}}, {{195},{  8}}, {{ 35},{  8}},
-{{163},{  8}}, {{ 99},{  8}}, {{227},{  8}}
-};
-
-local const ct_data static_dtree[D_CODES] = {
-{{ 0},{ 5}}, {{16},{ 5}}, {{ 8},{ 5}}, {{24},{ 5}}, {{ 4},{ 5}},
-{{20},{ 5}}, {{12},{ 5}}, {{28},{ 5}}, {{ 2},{ 5}}, {{18},{ 5}},
-{{10},{ 5}}, {{26},{ 5}}, {{ 6},{ 5}}, {{22},{ 5}}, {{14},{ 5}},
-{{30},{ 5}}, {{ 1},{ 5}}, {{17},{ 5}}, {{ 9},{ 5}}, {{25},{ 5}},
-{{ 5},{ 5}}, {{21},{ 5}}, {{13},{ 5}}, {{29},{ 5}}, {{ 3},{ 5}},
-{{19},{ 5}}, {{11},{ 5}}, {{27},{ 5}}, {{ 7},{ 5}}, {{23},{ 5}}
-};
-
-const uch ZLIB_INTERNAL _dist_code[DIST_CODE_LEN] = {
- 0,  1,  2,  3,  4,  4,  5,  5,  6,  6,  6,  6,  7,  7,  7,  7,  8,  8,  8,  8,
- 8,  8,  8,  8,  9,  9,  9,  9,  9,  9,  9,  9, 10, 10, 10, 10, 10, 10, 10, 10,
-10, 10, 10, 10, 10, 10, 10, 10, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11,
-11, 11, 11, 11, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12,
-12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 13, 13, 13, 13,
-13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
-13, 13, 13, 13, 13, 13, 13, 13, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14,
-14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14,
-14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14,
-14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 15, 15, 15, 15, 15, 15, 15, 15,
-15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
-15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
-15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,  0,  0, 16, 17,
-18, 18, 19, 19, 20, 20, 20, 20, 21, 21, 21, 21, 22, 22, 22, 22, 22, 22, 22, 22,
-23, 23, 23, 23, 23, 23, 23, 23, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
-24, 24, 24, 24, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
-26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26,
-26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 27, 27, 27, 27, 27, 27, 27, 27,
-27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27,
-27, 27, 27, 27, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28,
-28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28,
-28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28,
-28, 28, 28, 28, 28, 28, 28, 28, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29,
-29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29,
-29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29,
-29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29
-};
-
-const uch ZLIB_INTERNAL _length_code[MAX_MATCH-MIN_MATCH+1]= {
- 0,  1,  2,  3,  4,  5,  6,  7,  8,  8,  9,  9, 10, 10, 11, 11, 12, 12, 12, 12,
-13, 13, 13, 13, 14, 14, 14, 14, 15, 15, 15, 15, 16, 16, 16, 16, 16, 16, 16, 16,
-17, 17, 17, 17, 17, 17, 17, 17, 18, 18, 18, 18, 18, 18, 18, 18, 19, 19, 19, 19,
-19, 19, 19, 19, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
-21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 22, 22, 22, 22,
-22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 23, 23, 23, 23, 23, 23, 23, 23,
-23, 23, 23, 23, 23, 23, 23, 23, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
-24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
-25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
-25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 26, 26, 26, 26, 26, 26, 26, 26,
-26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26,
-26, 26, 26, 26, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27,
-27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 28
-};
-
-local const int base_length[LENGTH_CODES] = {
-0, 1, 2, 3, 4, 5, 6, 7, 8, 10, 12, 14, 16, 20, 24, 28, 32, 40, 48, 56,
-64, 80, 96, 112, 128, 160, 192, 224, 0
-};
-
-local const int base_dist[D_CODES] = {
-    0,     1,     2,     3,     4,     6,     8,    12,    16,    24,
-   32,    48,    64,    96,   128,   192,   256,   384,   512,   768,
- 1024,  1536,  2048,  3072,  4096,  6144,  8192, 12288, 16384, 24576
-};
-
diff --git a/src/extra/zlib/uncompr.c b/src/extra/zlib/uncompr.c
deleted file mode 100644
index 242e949..0000000
--- a/src/extra/zlib/uncompr.c
+++ /dev/null
@@ -1,59 +0,0 @@
-/* uncompr.c -- decompress a memory buffer
- * Copyright (C) 1995-2003, 2010 Jean-loup Gailly.
- * For conditions of distribution and use, see copyright notice in zlib.h
- */
-
-/* @(#) $Id$ */
-
-#define ZLIB_INTERNAL
-#include "zlib.h"
-
-/* ===========================================================================
-     Decompresses the source buffer into the destination buffer.  sourceLen is
-   the byte length of the source buffer. Upon entry, destLen is the total
-   size of the destination buffer, which must be large enough to hold the
-   entire uncompressed data. (The size of the uncompressed data must have
-   been saved previously by the compressor and transmitted to the decompressor
-   by some mechanism outside the scope of this compression library.)
-   Upon exit, destLen is the actual size of the compressed buffer.
-
-     uncompress returns Z_OK if success, Z_MEM_ERROR if there was not
-   enough memory, Z_BUF_ERROR if there was not enough room in the output
-   buffer, or Z_DATA_ERROR if the input data was corrupted.
-*/
-int ZEXPORT uncompress (dest, destLen, source, sourceLen)
-    Bytef *dest;
-    uLongf *destLen;
-    const Bytef *source;
-    uLong sourceLen;
-{
-    z_stream stream;
-    int err;
-
-    stream.next_in = (z_const Bytef *)source;
-    stream.avail_in = (uInt)sourceLen;
-    /* Check for source > 64K on 16-bit machine: */
-    if ((uLong)stream.avail_in != sourceLen) return Z_BUF_ERROR;
-
-    stream.next_out = dest;
-    stream.avail_out = (uInt)*destLen;
-    if ((uLong)stream.avail_out != *destLen) return Z_BUF_ERROR;
-
-    stream.zalloc = (alloc_func)0;
-    stream.zfree = (free_func)0;
-
-    err = inflateInit(&stream);
-    if (err != Z_OK) return err;
-
-    err = inflate(&stream, Z_FINISH);
-    if (err != Z_STREAM_END) {
-        inflateEnd(&stream);
-        if (err == Z_NEED_DICT || (err == Z_BUF_ERROR && stream.avail_in == 0))
-            return Z_DATA_ERROR;
-        return err;
-    }
-    *destLen = stream.total_out;
-
-    err = inflateEnd(&stream);
-    return err;
-}
diff --git a/src/extra/zlib/zconf.h b/src/extra/zlib/zconf.h
deleted file mode 100644
index f4c9794..0000000
--- a/src/extra/zlib/zconf.h
+++ /dev/null
@@ -1,447 +0,0 @@
-/* zconf.h -- configuration of the zlib compression library
- * Copyright (C) 1995-2013 Jean-loup Gailly.
- * For conditions of distribution and use, see copyright notice in zlib.h
- */
-
-/* @(#) $Id$ */
-
-#ifndef ZCONF_H
-#define ZCONF_H
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-/* R change */
-#ifndef WIN32
-#define Z_PREFIX
-#endif
-/*
- * If you *really* need a unique prefix for all types and library functions,
- * compile with -DZ_PREFIX. The "standard" zlib should be compiled without it.
- * Even better than compiling with -DZ_PREFIX would be to use configure to set
- * this permanently in zconf.h using "./configure --zprefix".
- */
-#ifdef Z_PREFIX
-#  define deflateInit_          Rz_deflateInit_
-#  define deflate               Rz_deflate
-#  define deflateEnd            Rz_deflateEnd
-#  define inflateInit_          Rz_inflateInit_
-#  define inflate               Rz_inflate
-#  define inflateEnd            Rz_inflateEnd
-#  define deflateInit2_         Rz_deflateInit2_
-#  define deflateSetDictionary  Rz_deflateSetDictionary
-#  define deflateCopy           Rz_deflateCopy
-#  define deflateReset          Rz_deflateReset
-#  define deflateParams         Rz_deflateParams
-#  define deflateBound          Rz_deflateBound
-#  define deflatePrime          Rz_deflatePrime
-#  define inflateInit2_         Rz_inflateInit2_
-#  define inflateSetDictionary  Rz_inflateSetDictionary
-#  define inflateSync           Rz_inflateSync
-#  define inflateSyncPoint      Rz_inflateSyncPoint
-#  define inflateCopy           Rz_inflateCopy
-#  define inflateReset          Rz_inflateReset
-#  define inflateBack           Rz_inflateBack
-#  define inflateBackEnd        Rz_inflateBackEnd
-#  define compress              Rz_compress
-#  define compress2             Rz_compress2
-#  define compressBound         Rz_compressBound
-#  define uncompress            Rz_uncompress
-#  define adler32               Rz_adler32
-#  define crc32                 Rz_crc32
-#  define get_crc_table         Rz_get_crc_table
-#  define zError                Rz_zError
-
-#  define alloc_func            Rz_alloc_func
-#  define free_func             Rz_free_func
-#  define in_func               Rz_in_func
-#  define out_func              Rz_out_func
-
-# define adler32_combine       	Rz_adler32_combine
-# define adler32_combine64      Rz_adler32_combine64
-# define crc32_combine		Rz_crc32_combine
-# define crc32_combine64	Rz_crc32_combine64
-# define deflateSetHeader      	Rz_deflateSetHeader
-# define deflateTune		Rz_deflateTune
-# define inflateBackInit_      	Rz_inflateBackInit_
-# define inflate_fast		Rz_inflate_fast
-# define inflateGetHeader      	Rz_inflateGetHeader
-# define inflatePrime		Rz_inflatePrime
-# define inflate_table		Rz_inflate_table
-# define inflateMark		Rz_inflateMark
-# define inflateReset2		Rz_inflateReset2
-# define inflateUndermine	Rz_inflateUndermine
-# define _tr_align		Rz__tr_align
-# define _tr_flush_block       	Rz__tr_flush_block
-# define _tr_init		Rz__tr_init
-# define _tr_stored_block      	Rz__tr_stored_block
-# define _tr_tally		Rz__tr_tally
-# define zcalloc		Rz_zcalloc
-# define zcfree			Rz_zcfree
-# define zlibCompileFlags      	Rz_zlibCompileFlags
-# define zlibVersion		Rz_zlibVersion
-# define _dist_code		Rz_dist_code
-# define _length_code		Rz_length_code
-# define z_errmsg		Rz_errmsg
-# define deflate_copyright	Rz_deflate_copyright 
-# define inflate_copyright	Rz_inflate_copyright 
-#endif
-
-#if defined(__MSDOS__) && !defined(MSDOS)
-#  define MSDOS
-#endif
-#if (defined(OS_2) || defined(__OS2__)) && !defined(OS2)
-#  define OS2
-#endif
-#if defined(_WINDOWS) && !defined(WINDOWS)
-#  define WINDOWS
-#endif
-#if defined(_WIN32) || defined(_WIN32_WCE) || defined(__WIN32__)
-#  ifndef WIN32
-#    define WIN32
-#  endif
-#endif
-#if (defined(MSDOS) || defined(OS2) || defined(WINDOWS)) && !defined(WIN32)
-#  if !defined(__GNUC__) && !defined(__FLAT__) && !defined(__386__)
-#    ifndef SYS16BIT
-#      define SYS16BIT
-#    endif
-#  endif
-#endif
-
-/*
- * Compile with -DMAXSEG_64K if the alloc function cannot allocate more
- * than 64k bytes at a time (needed on systems with 16-bit int).
- */
-#ifdef SYS16BIT
-#  define MAXSEG_64K
-#endif
-#ifdef MSDOS
-#  define UNALIGNED_OK
-#endif
-
-#ifdef __STDC_VERSION__
-#  ifndef STDC
-#    define STDC
-#  endif
-#  if __STDC_VERSION__ >= 199901L
-#    ifndef STDC99
-#      define STDC99
-#    endif
-#  endif
-#endif
-#if !defined(STDC) && (defined(__STDC__) || defined(__cplusplus))
-#  define STDC
-#endif
-#if !defined(STDC) && (defined(__GNUC__) || defined(__BORLANDC__))
-#  define STDC
-#endif
-#if !defined(STDC) && (defined(MSDOS) || defined(WINDOWS) || defined(WIN32))
-#  define STDC
-#endif
-#if !defined(STDC) && (defined(OS2) || defined(__HOS_AIX__))
-#  define STDC
-#endif
-
-#if defined(__OS400__) && !defined(STDC)    /* iSeries (formerly AS/400). */
-#  define STDC
-#endif
-
-#ifndef STDC
-#  ifndef const /* cannot use !defined(STDC) && !defined(const) on Mac */
-#    define const       /* note: need a more gentle solution here */
-#  endif
-#endif
-
-#if defined(ZLIB_CONST) && !defined(z_const)
-#  define z_const const
-#else
-#  define z_const
-#endif
-
-/* Some Mac compilers merge all .h files incorrectly: */
-#if defined(__MWERKS__)||defined(applec)||defined(THINK_C)||defined(__SC__)
-#  define NO_DUMMY_DECL
-#endif
-
-/* Maximum value for memLevel in deflateInit2 */
-#ifndef MAX_MEM_LEVEL
-#  ifdef MAXSEG_64K
-#    define MAX_MEM_LEVEL 8
-#  else
-#    define MAX_MEM_LEVEL 9
-#  endif
-#endif
-
-/* Maximum value for windowBits in deflateInit2 and inflateInit2.
- * WARNING: reducing MAX_WBITS makes minigzip unable to extract .gz files
- * created by gzip. (Files created by minigzip can still be extracted by
- * gzip.)
- */
-#ifndef MAX_WBITS
-#  define MAX_WBITS   15 /* 32K LZ77 window */
-#endif
-
-/* The memory requirements for deflate are (in bytes):
-            (1 << (windowBits+2)) +  (1 << (memLevel+9))
- that is: 128K for windowBits=15  +  128K for memLevel = 8  (default values)
- plus a few kilobytes for small objects. For example, if you want to reduce
- the default memory requirements from 256K to 128K, compile with
-     make CFLAGS="-O -DMAX_WBITS=14 -DMAX_MEM_LEVEL=7"
- Of course this will generally degrade compression (there's no free lunch).
-
-   The memory requirements for inflate are (in bytes) 1 << windowBits
- that is, 32K for windowBits=15 (default value) plus a few kilobytes
- for small objects.
-*/
-
-                        /* Type declarations */
-
-#ifndef OF /* function prototypes */
-#  ifdef STDC
-#    define OF(args)  args
-#  else
-#    define OF(args)  ()
-#  endif
-#endif
-
-#ifndef Z_ARG /* function prototypes for stdarg */
-#  if defined(STDC) || defined(Z_HAVE_STDARG_H)
-#    define Z_ARG(args)  args
-#  else
-#    define Z_ARG(args)  ()
-#  endif
-#endif
-
-/* The following definitions for FAR are needed only for MSDOS mixed
- * model programming (small or medium model with some far allocations).
- * This was tested only with MSC; for other MSDOS compilers you may have
- * to define NO_MEMCPY in zutil.h.  If you don't need the mixed model,
- * just define FAR to be empty.
- */
-#ifdef SYS16BIT
-#  if defined(M_I86SM) || defined(M_I86MM)
-     /* MSC small or medium model */
-#    define SMALL_MEDIUM
-#    ifdef _MSC_VER
-#      define FAR _far
-#    else
-#      define FAR far
-#    endif
-#  endif
-#  if (defined(__SMALL__) || defined(__MEDIUM__))
-     /* Turbo C small or medium model */
-#    define SMALL_MEDIUM
-#    ifdef __BORLANDC__
-#      define FAR _far
-#    else
-#      define FAR far
-#    endif
-#  endif
-#endif
-
-#if defined(WINDOWS) || defined(WIN32)
-   /* If building or using zlib as a DLL, define ZLIB_DLL.
-    * This is not mandatory, but it offers a little performance increase.
-    */
-#  ifdef ZLIB_DLL
-#    if defined(WIN32) && (!defined(__BORLANDC__) || (__BORLANDC__ >= 0x500))
-#      ifdef ZLIB_INTERNAL
-#        define ZEXTERN extern __declspec(dllexport)
-#      else
-#        define ZEXTERN extern __declspec(dllimport)
-#      endif
-#    endif
-#  endif  /* ZLIB_DLL */
-   /* If building or using zlib with the WINAPI/WINAPIV calling convention,
-    * define ZLIB_WINAPI.
-    * Caution: the standard ZLIB1.DLL is NOT compiled using ZLIB_WINAPI.
-    */
-#  ifdef ZLIB_WINAPI
-#    ifdef FAR
-#      undef FAR
-#    endif
-#    include <windows.h>
-     /* No need for _export, use ZLIB.DEF instead. */
-     /* For complete Windows compatibility, use WINAPI, not __stdcall. */
-#    define ZEXPORT WINAPI
-#    ifdef WIN32
-#      define ZEXPORTVA WINAPIV
-#    else
-#      define ZEXPORTVA FAR CDECL
-#    endif
-#  endif
-#endif
-
-#if defined (__BEOS__)
-#  ifdef ZLIB_DLL
-#    ifdef ZLIB_INTERNAL
-#      define ZEXPORT   __declspec(dllexport)
-#      define ZEXPORTVA __declspec(dllexport)
-#    else
-#      define ZEXPORT   __declspec(dllimport)
-#      define ZEXPORTVA __declspec(dllimport)
-#    endif
-#  endif
-#endif
-
-#ifndef ZEXTERN
-#  define ZEXTERN extern
-#endif
-#ifndef ZEXPORT
-#  define ZEXPORT
-#endif
-#ifndef ZEXPORTVA
-#  define ZEXPORTVA
-#endif
-
-#ifndef FAR
-#  define FAR
-#endif
-
-#if !defined(__MACTYPES__)
-typedef unsigned char  Byte;  /* 8 bits */
-#endif
-typedef unsigned int   uInt;  /* 16 bits or more */
-typedef unsigned long  uLong; /* 32 bits or more */
-
-#ifdef SMALL_MEDIUM
-   /* Borland C/C++ and some old MSC versions ignore FAR inside typedef */
-#  define Bytef Byte FAR
-#else
-   typedef Byte  FAR Bytef;
-#endif
-typedef char  FAR charf;
-typedef int   FAR intf;
-typedef uInt  FAR uIntf;
-typedef uLong FAR uLongf;
-
-#ifdef STDC
-   typedef void const *voidpc;
-   typedef void FAR   *voidpf;
-   typedef void       *voidp;
-#else
-   typedef Byte const *voidpc;
-   typedef Byte FAR   *voidpf;
-   typedef Byte       *voidp;
-#endif
-
-/* ./configure may #define Z_U4 here */
-
-#if !defined(Z_U4) && !defined(Z_SOLO) && defined(STDC)
-#  include <limits.h>
-#  if (UINT_MAX == 0xffffffffUL)
-#    define Z_U4 unsigned
-#  elif (ULONG_MAX == 0xffffffffUL)
-#    define Z_U4 unsigned long
-#  elif (USHRT_MAX == 0xffffffffUL)
-#    define Z_U4 unsigned short
-#  endif
-#endif
-
-#ifdef Z_U4
-   typedef Z_U4 z_crc_t;
-#else
-   typedef unsigned long z_crc_t;
-#endif
-
-#ifdef HAVE_UNISTD_H    /* may be set to #if 1 by ./configure */
-#  define Z_HAVE_UNISTD_H
-#endif
-
-#ifdef HAVE_STDARG_H    /* may be set to #if 1 by ./configure */
-#  define Z_HAVE_STDARG_H
-#endif
-
-#ifdef STDC
-#  ifndef Z_SOLO
-#    include <sys/types.h>      /* for off_t */
-#  endif
-#endif
-
-#if defined(STDC) || defined(Z_HAVE_STDARG_H)
-#  ifndef Z_SOLO
-#    include <stdarg.h>         /* for va_list */
-#  endif
-#endif
-
-#ifdef _WIN32
-#  include <stddef.h>           /* for wchar_t */
-#endif
-
-/* a little trick to accommodate both "#define _LARGEFILE64_SOURCE" and
- * "#define _LARGEFILE64_SOURCE 1" as requesting 64-bit operations, (even
- * though the former does not conform to the LFS document), but considering
- * both "#undef _LARGEFILE64_SOURCE" and "#define _LARGEFILE64_SOURCE 0" as
- * equivalently requesting no 64-bit operations
- */
-#if defined(_LARGEFILE64_SOURCE) && -_LARGEFILE64_SOURCE - -1 == 1
-#  undef _LARGEFILE64_SOURCE
-#endif
-
-#if defined(__WATCOMC__) && !defined(Z_HAVE_UNISTD_H)
-#  define Z_HAVE_UNISTD_H
-#endif
-#ifndef Z_SOLO
-#  if defined(Z_HAVE_UNISTD_H) || defined(_LARGEFILE64_SOURCE)
-#    include <unistd.h>         /* for SEEK_*, off_t, and _LFS64_LARGEFILE */
-#    ifdef VMS
-#      include <unixio.h>       /* for off_t */
-#    endif
-#    ifndef z_off_t
-#      define z_off_t off_t
-#    endif
-#  endif
-#endif
-
-#if defined(_LFS64_LARGEFILE) && _LFS64_LARGEFILE-0
-#  define Z_LFS64
-#endif
-
-#if defined(_LARGEFILE64_SOURCE) && defined(Z_LFS64)
-#  define Z_LARGE64
-#endif
-
-#if defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS-0 == 64 && defined(Z_LFS64)
-#  define Z_WANT64
-#endif
-
-#if !defined(SEEK_SET) && !defined(Z_SOLO)
-#  define SEEK_SET        0       /* Seek from beginning of file.  */
-#  define SEEK_CUR        1       /* Seek from current position.  */
-#  define SEEK_END        2       /* Set file pointer to EOF plus "offset" */
-#endif
-
-#ifndef z_off_t
-#  define z_off_t long
-#endif
-
-#if !defined(_WIN32) && defined(Z_LARGE64)
-#  define z_off64_t off64_t
-#else
-#  if defined(_WIN32) && !defined(__GNUC__) && !defined(Z_SOLO)
-#    define z_off64_t __int64
-#  else
-#    define z_off64_t z_off_t
-#  endif
-#endif
-
-/* MVS linker does not support external names larger than 8 bytes */
-#if defined(__MVS__)
-  #pragma map(deflateInit_,"DEIN")
-  #pragma map(deflateInit2_,"DEIN2")
-  #pragma map(deflateEnd,"DEEND")
-  #pragma map(deflateBound,"DEBND")
-  #pragma map(inflateInit_,"ININ")
-  #pragma map(inflateInit2_,"ININ2")
-  #pragma map(inflateEnd,"INEND")
-  #pragma map(inflateSync,"INSY")
-  #pragma map(inflateSetDictionary,"INSEDI")
-  #pragma map(compressBound,"CMBND")
-  #pragma map(inflate_table,"INTABL")
-  #pragma map(inflate_fast,"INFA")
-  #pragma map(inflate_copyright,"INCOPY")
-#endif
-
-#endif /* ZCONF_H */
diff --git a/src/extra/zlib/zlib.h b/src/extra/zlib/zlib.h
deleted file mode 100644
index 49dd863..0000000
--- a/src/extra/zlib/zlib.h
+++ /dev/null
@@ -1,1771 +0,0 @@
-/* zlib.h -- interface of the 'zlib' general purpose compression library
-  version 1.2.8, April 28th, 2013
-
-  Copyright (C) 1995-2013 Jean-loup Gailly and Mark Adler
-
-  This software is provided 'as-is', without any express or implied
-  warranty.  In no event will the authors be held liable for any damages
-  arising from the use of this software.
-
-  Permission is granted to anyone to use this software for any purpose,
-  including commercial applications, and to alter it and redistribute it
-  freely, subject to the following restrictions:
-
-  1. The origin of this software must not be misrepresented; you must not
-     claim that you wrote the original software. If you use this software
-     in a product, an acknowledgment in the product documentation would be
-     appreciated but is not required.
-  2. Altered source versions must be plainly marked as such, and must not be
-     misrepresented as being the original software.
-  3. This notice may not be removed or altered from any source distribution.
-
-  Jean-loup Gailly        Mark Adler
-  jloup at gzip.org          madler at alumni.caltech.edu
-
-
-  The data format used by the zlib library is described by RFCs (Request for
-  Comments) 1950 to 1952 in the files http://tools.ietf.org/html/rfc1950
-  (zlib format), rfc1951 (deflate format) and rfc1952 (gzip format).
-*/
-
-#ifndef ZLIB_H
-#define ZLIB_H
-
-#include "zconf.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#define ZLIB_VERSION "1.2.8"
-#define ZLIB_VERNUM 0x1280
-#define ZLIB_VER_MAJOR 1
-#define ZLIB_VER_MINOR 2
-#define ZLIB_VER_REVISION 8
-#define ZLIB_VER_SUBREVISION 0
-
-/*
-    The 'zlib' compression library provides in-memory compression and
-  decompression functions, including integrity checks of the uncompressed data.
-  This version of the library supports only one compression method (deflation)
-  but other algorithms will be added later and will have the same stream
-  interface.
-
-    Compression can be done in a single step if the buffers are large enough,
-  or can be done by repeated calls of the compression function.  In the latter
-  case, the application must provide more input and/or consume the output
-  (providing more output space) before each call.
-
-    The compressed data format used by default by the in-memory functions is
-  the zlib format, which is a zlib wrapper documented in RFC 1950, wrapped
-  around a deflate stream, which is itself documented in RFC 1951.
-
-    The library also supports reading and writing files in gzip (.gz) format
-  with an interface similar to that of stdio using the functions that start
-  with "gz".  The gzip format is different from the zlib format.  gzip is a
-  gzip wrapper, documented in RFC 1952, wrapped around a deflate stream.
-
-    This library can optionally read and write gzip streams in memory as well.
-
-    The zlib format was designed to be compact and fast for use in memory
-  and on communications channels.  The gzip format was designed for single-
-  file compression on file systems, has a larger header than zlib to maintain
-  directory information, and uses a different, slower check method than zlib.
-
-    The library does not install any signal handler.  The decoder checks
-  the consistency of the compressed data, so the library should never crash
-  even in case of corrupted input.
-*/
-
-typedef voidpf (*alloc_func) OF((voidpf opaque, uInt items, uInt size));
-typedef void   (*free_func)  OF((voidpf opaque, voidpf address));
-
-struct internal_state;
-
-typedef struct z_stream_s {
-    z_const Bytef *next_in;     /* next input byte */
-    uInt     avail_in;  /* number of bytes available at next_in */
-    uLong    total_in;  /* total number of input bytes read so far */
-
-    Bytef    *next_out; /* next output byte should be put there */
-    uInt     avail_out; /* remaining free space at next_out */
-    uLong    total_out; /* total number of bytes output so far */
-
-    z_const char *msg;  /* last error message, NULL if no error */
-    struct internal_state FAR *state; /* not visible by applications */
-
-    alloc_func zalloc;  /* used to allocate the internal state */
-    free_func  zfree;   /* used to free the internal state */
-    voidpf     opaque;  /* private data object passed to zalloc and zfree */
-
-    int     data_type;  /* best guess about the data type: binary or text */
-    uLong   adler;      /* adler32 value of the uncompressed data */
-    uLong   reserved;   /* reserved for future use */
-} z_stream;
-
-typedef z_stream FAR *z_streamp;
-
-/*
-     gzip header information passed to and from zlib routines.  See RFC 1952
-  for more details on the meanings of these fields.
-*/
-typedef struct gz_header_s {
-    int     text;       /* true if compressed data believed to be text */
-    uLong   time;       /* modification time */
-    int     xflags;     /* extra flags (not used when writing a gzip file) */
-    int     os;         /* operating system */
-    Bytef   *extra;     /* pointer to extra field or Z_NULL if none */
-    uInt    extra_len;  /* extra field length (valid if extra != Z_NULL) */
-    uInt    extra_max;  /* space at extra (only when reading header) */
-    Bytef   *name;      /* pointer to zero-terminated file name or Z_NULL */
-    uInt    name_max;   /* space at name (only when reading header) */
-    Bytef   *comment;   /* pointer to zero-terminated comment or Z_NULL */
-    uInt    comm_max;   /* space at comment (only when reading header) */
-    int     hcrc;       /* true if there was or will be a header crc */
-    int     done;       /* true when done reading gzip header (not used
-                           when writing a gzip file) */
-} gz_header;
-
-typedef gz_header FAR *gz_headerp;
-
-/*
-     The application must update next_in and avail_in when avail_in has dropped
-   to zero.  It must update next_out and avail_out when avail_out has dropped
-   to zero.  The application must initialize zalloc, zfree and opaque before
-   calling the init function.  All other fields are set by the compression
-   library and must not be updated by the application.
-
-     The opaque value provided by the application will be passed as the first
-   parameter for calls of zalloc and zfree.  This can be useful for custom
-   memory management.  The compression library attaches no meaning to the
-   opaque value.
-
-     zalloc must return Z_NULL if there is not enough memory for the object.
-   If zlib is used in a multi-threaded application, zalloc and zfree must be
-   thread safe.
-
-     On 16-bit systems, the functions zalloc and zfree must be able to allocate
-   exactly 65536 bytes, but will not be required to allocate more than this if
-   the symbol MAXSEG_64K is defined (see zconf.h).  WARNING: On MSDOS, pointers
-   returned by zalloc for objects of exactly 65536 bytes *must* have their
-   offset normalized to zero.  The default allocation function provided by this
-   library ensures this (see zutil.c).  To reduce memory requirements and avoid
-   any allocation of 64K objects, at the expense of compression ratio, compile
-   the library with -DMAX_WBITS=14 (see zconf.h).
-
-     The fields total_in and total_out can be used for statistics or progress
-   reports.  After compression, total_in holds the total size of the
-   uncompressed data and may be saved for use in the decompressor (particularly
-   if the decompressor wants to decompress everything in a single step).
-*/
-
-                        /* constants */
-
-#define Z_NO_FLUSH      0
-#define Z_PARTIAL_FLUSH 1
-#define Z_SYNC_FLUSH    2
-#define Z_FULL_FLUSH    3
-#define Z_FINISH        4
-#define Z_BLOCK         5
-#define Z_TREES         6
-/* Allowed flush values; see deflate() and inflate() below for details */
-
-#define Z_OK            0
-#define Z_STREAM_END    1
-#define Z_NEED_DICT     2
-#define Z_ERRNO        (-1)
-#define Z_STREAM_ERROR (-2)
-#define Z_DATA_ERROR   (-3)
-#define Z_MEM_ERROR    (-4)
-#define Z_BUF_ERROR    (-5)
-#define Z_VERSION_ERROR (-6)
-/* Return codes for the compression/decompression functions. Negative values
- * are errors, positive values are used for special but normal events.
- */
-
-#define Z_NO_COMPRESSION         0
-#define Z_BEST_SPEED             1
-#define Z_BEST_COMPRESSION       9
-#define Z_DEFAULT_COMPRESSION  (-1)
-/* compression levels */
-
-#define Z_FILTERED            1
-#define Z_HUFFMAN_ONLY        2
-#define Z_RLE                 3
-#define Z_FIXED               4
-#define Z_DEFAULT_STRATEGY    0
-/* compression strategy; see deflateInit2() below for details */
-
-#define Z_BINARY   0
-#define Z_TEXT     1
-#define Z_ASCII    Z_TEXT   /* for compatibility with 1.2.2 and earlier */
-#define Z_UNKNOWN  2
-/* Possible values of the data_type field (though see inflate()) */
-
-#define Z_DEFLATED   8
-/* The deflate compression method (the only one supported in this version) */
-
-#define Z_NULL  0  /* for initializing zalloc, zfree, opaque */
-
-#define zlib_version zlibVersion()
-/* for compatibility with versions < 1.0.2 */
-
-
-                        /* basic functions */
-
-ZEXTERN const char * ZEXPORT zlibVersion OF((void));
-/* The application can compare zlibVersion and ZLIB_VERSION for consistency.
-   If the first character differs, the library code actually used is not
-   compatible with the zlib.h header file used by the application.  This check
-   is automatically made by deflateInit and inflateInit.
- */
-
-/*
-ZEXTERN int ZEXPORT deflateInit OF((z_streamp strm, int level));
-
-     Initializes the internal stream state for compression.  The fields
-   zalloc, zfree and opaque must be initialized before by the caller.  If
-   zalloc and zfree are set to Z_NULL, deflateInit updates them to use default
-   allocation functions.
-
-     The compression level must be Z_DEFAULT_COMPRESSION, or between 0 and 9:
-   1 gives best speed, 9 gives best compression, 0 gives no compression at all
-   (the input data is simply copied a block at a time).  Z_DEFAULT_COMPRESSION
-   requests a default compromise between speed and compression (currently
-   equivalent to level 6).
-
-     deflateInit returns Z_OK if success, Z_MEM_ERROR if there was not enough
-   memory, Z_STREAM_ERROR if level is not a valid compression level, or
-   Z_VERSION_ERROR if the zlib library version (zlib_version) is incompatible
-   with the version assumed by the caller (ZLIB_VERSION).  msg is set to null
-   if there is no error message.  deflateInit does not perform any compression:
-   this will be done by deflate().
-*/
-
-
-ZEXTERN int ZEXPORT deflate OF((z_streamp strm, int flush));
-/*
-    deflate compresses as much data as possible, and stops when the input
-  buffer becomes empty or the output buffer becomes full.  It may introduce
-  some output latency (reading input without producing any output) except when
-  forced to flush.
-
-    The detailed semantics are as follows.  deflate performs one or both of the
-  following actions:
-
-  - Compress more input starting at next_in and update next_in and avail_in
-    accordingly.  If not all input can be processed (because there is not
-    enough room in the output buffer), next_in and avail_in are updated and
-    processing will resume at this point for the next call of deflate().
-
-  - Provide more output starting at next_out and update next_out and avail_out
-    accordingly.  This action is forced if the parameter flush is non zero.
-    Forcing flush frequently degrades the compression ratio, so this parameter
-    should be set only when necessary (in interactive applications).  Some
-    output may be provided even if flush is not set.
-
-    Before the call of deflate(), the application should ensure that at least
-  one of the actions is possible, by providing more input and/or consuming more
-  output, and updating avail_in or avail_out accordingly; avail_out should
-  never be zero before the call.  The application can consume the compressed
-  output when it wants, for example when the output buffer is full (avail_out
-  == 0), or after each call of deflate().  If deflate returns Z_OK and with
-  zero avail_out, it must be called again after making room in the output
-  buffer because there might be more output pending.
-
-    Normally the parameter flush is set to Z_NO_FLUSH, which allows deflate to
-  decide how much data to accumulate before producing output, in order to
-  maximize compression.
-
-    If the parameter flush is set to Z_SYNC_FLUSH, all pending output is
-  flushed to the output buffer and the output is aligned on a byte boundary, so
-  that the decompressor can get all input data available so far.  (In
-  particular avail_in is zero after the call if enough output space has been
-  provided before the call.) Flushing may degrade compression for some
-  compression algorithms and so it should be used only when necessary.  This
-  completes the current deflate block and follows it with an empty stored block
-  that is three bits plus filler bits to the next byte, followed by four bytes
-  (00 00 ff ff).
-
-    If flush is set to Z_PARTIAL_FLUSH, all pending output is flushed to the
-  output buffer, but the output is not aligned to a byte boundary.  All of the
-  input data so far will be available to the decompressor, as for Z_SYNC_FLUSH.
-  This completes the current deflate block and follows it with an empty fixed
-  codes block that is 10 bits long.  This assures that enough bytes are output
-  in order for the decompressor to finish the block before the empty fixed code
-  block.
-
-    If flush is set to Z_BLOCK, a deflate block is completed and emitted, as
-  for Z_SYNC_FLUSH, but the output is not aligned on a byte boundary, and up to
-  seven bits of the current block are held to be written as the next byte after
-  the next deflate block is completed.  In this case, the decompressor may not
-  be provided enough bits at this point in order to complete decompression of
-  the data provided so far to the compressor.  It may need to wait for the next
-  block to be emitted.  This is for advanced applications that need to control
-  the emission of deflate blocks.
-
-    If flush is set to Z_FULL_FLUSH, all output is flushed as with
-  Z_SYNC_FLUSH, and the compression state is reset so that decompression can
-  restart from this point if previous compressed data has been damaged or if
-  random access is desired.  Using Z_FULL_FLUSH too often can seriously degrade
-  compression.
-
-    If deflate returns with avail_out == 0, this function must be called again
-  with the same value of the flush parameter and more output space (updated
-  avail_out), until the flush is complete (deflate returns with non-zero
-  avail_out).  In the case of a Z_FULL_FLUSH or Z_SYNC_FLUSH, make sure that
-  avail_out is greater than six to avoid repeated flush markers due to
-  avail_out == 0 on return.
-
-    If the parameter flush is set to Z_FINISH, pending input is processed,
-  pending output is flushed and deflate returns with Z_STREAM_END if there was
-  enough output space; if deflate returns with Z_OK, this function must be
-  called again with Z_FINISH and more output space (updated avail_out) but no
-  more input data, until it returns with Z_STREAM_END or an error.  After
-  deflate has returned Z_STREAM_END, the only possible operations on the stream
-  are deflateReset or deflateEnd.
-
-    Z_FINISH can be used immediately after deflateInit if all the compression
-  is to be done in a single step.  In this case, avail_out must be at least the
-  value returned by deflateBound (see below).  Then deflate is guaranteed to
-  return Z_STREAM_END.  If not enough output space is provided, deflate will
-  not return Z_STREAM_END, and it must be called again as described above.
-
-    deflate() sets strm->adler to the adler32 checksum of all input read
-  so far (that is, total_in bytes).
-
-    deflate() may update strm->data_type if it can make a good guess about
-  the input data type (Z_BINARY or Z_TEXT).  In doubt, the data is considered
-  binary.  This field is only for information purposes and does not affect the
-  compression algorithm in any manner.
-
-    deflate() returns Z_OK if some progress has been made (more input
-  processed or more output produced), Z_STREAM_END if all input has been
-  consumed and all output has been produced (only when flush is set to
-  Z_FINISH), Z_STREAM_ERROR if the stream state was inconsistent (for example
-  if next_in or next_out was Z_NULL), Z_BUF_ERROR if no progress is possible
-  (for example avail_in or avail_out was zero).  Note that Z_BUF_ERROR is not
-  fatal, and deflate() can be called again with more input and more output
-  space to continue compressing.
-*/
-
-
-ZEXTERN int ZEXPORT deflateEnd OF((z_streamp strm));
-/*
-     All dynamically allocated data structures for this stream are freed.
-   This function discards any unprocessed input and does not flush any pending
-   output.
-
-     deflateEnd returns Z_OK if success, Z_STREAM_ERROR if the
-   stream state was inconsistent, Z_DATA_ERROR if the stream was freed
-   prematurely (some input or output was discarded).  In the error case, msg
-   may be set but then points to a static string (which must not be
-   deallocated).
-*/
-
-
-/*
-ZEXTERN int ZEXPORT inflateInit OF((z_streamp strm));
-
-     Initializes the internal stream state for decompression.  The fields
-   next_in, avail_in, zalloc, zfree and opaque must be initialized before by
-   the caller.  If next_in is not Z_NULL and avail_in is large enough (the
-   exact value depends on the compression method), inflateInit determines the
-   compression method from the zlib header and allocates all data structures
-   accordingly; otherwise the allocation will be deferred to the first call of
-   inflate.  If zalloc and zfree are set to Z_NULL, inflateInit updates them to
-   use default allocation functions.
-
-     inflateInit returns Z_OK if success, Z_MEM_ERROR if there was not enough
-   memory, Z_VERSION_ERROR if the zlib library version is incompatible with the
-   version assumed by the caller, or Z_STREAM_ERROR if the parameters are
-   invalid, such as a null pointer to the structure.  msg is set to null if
-   there is no error message.  inflateInit does not perform any decompression
-   apart from possibly reading the zlib header if present: actual decompression
-   will be done by inflate().  (So next_in and avail_in may be modified, but
-   next_out and avail_out are unused and unchanged.) The current implementation
-   of inflateInit() does not process any header information -- that is deferred
-   until inflate() is called.
-*/
-
-
-ZEXTERN int ZEXPORT inflate OF((z_streamp strm, int flush));
-/*
-    inflate decompresses as much data as possible, and stops when the input
-  buffer becomes empty or the output buffer becomes full.  It may introduce
-  some output latency (reading input without producing any output) except when
-  forced to flush.
-
-  The detailed semantics are as follows.  inflate performs one or both of the
-  following actions:
-
-  - Decompress more input starting at next_in and update next_in and avail_in
-    accordingly.  If not all input can be processed (because there is not
-    enough room in the output buffer), next_in is updated and processing will
-    resume at this point for the next call of inflate().
-
-  - Provide more output starting at next_out and update next_out and avail_out
-    accordingly.  inflate() provides as much output as possible, until there is
-    no more input data or no more space in the output buffer (see below about
-    the flush parameter).
-
-    Before the call of inflate(), the application should ensure that at least
-  one of the actions is possible, by providing more input and/or consuming more
-  output, and updating the next_* and avail_* values accordingly.  The
-  application can consume the uncompressed output when it wants, for example
-  when the output buffer is full (avail_out == 0), or after each call of
-  inflate().  If inflate returns Z_OK and with zero avail_out, it must be
-  called again after making room in the output buffer because there might be
-  more output pending.
-
-    The flush parameter of inflate() can be Z_NO_FLUSH, Z_SYNC_FLUSH, Z_FINISH,
-  Z_BLOCK, or Z_TREES.  Z_SYNC_FLUSH requests that inflate() flush as much
-  output as possible to the output buffer.  Z_BLOCK requests that inflate()
-  stop if and when it gets to the next deflate block boundary.  When decoding
-  the zlib or gzip format, this will cause inflate() to return immediately
-  after the header and before the first block.  When doing a raw inflate,
-  inflate() will go ahead and process the first block, and will return when it
-  gets to the end of that block, or when it runs out of data.
-
-    The Z_BLOCK option assists in appending to or combining deflate streams.
-  Also to assist in this, on return inflate() will set strm->data_type to the
-  number of unused bits in the last byte taken from strm->next_in, plus 64 if
-  inflate() is currently decoding the last block in the deflate stream, plus
-  128 if inflate() returned immediately after decoding an end-of-block code or
-  decoding the complete header up to just before the first byte of the deflate
-  stream.  The end-of-block will not be indicated until all of the uncompressed
-  data from that block has been written to strm->next_out.  The number of
-  unused bits may in general be greater than seven, except when bit 7 of
-  data_type is set, in which case the number of unused bits will be less than
-  eight.  data_type is set as noted here every time inflate() returns for all
-  flush options, and so can be used to determine the amount of currently
-  consumed input in bits.
-
-    The Z_TREES option behaves as Z_BLOCK does, but it also returns when the
-  end of each deflate block header is reached, before any actual data in that
-  block is decoded.  This allows the caller to determine the length of the
-  deflate block header for later use in random access within a deflate block.
-  256 is added to the value of strm->data_type when inflate() returns
-  immediately after reaching the end of the deflate block header.
-
-    inflate() should normally be called until it returns Z_STREAM_END or an
-  error.  However if all decompression is to be performed in a single step (a
-  single call of inflate), the parameter flush should be set to Z_FINISH.  In
-  this case all pending input is processed and all pending output is flushed;
-  avail_out must be large enough to hold all of the uncompressed data for the
-  operation to complete.  (The size of the uncompressed data may have been
-  saved by the compressor for this purpose.) The use of Z_FINISH is not
-  required to perform an inflation in one step.  However it may be used to
-  inform inflate that a faster approach can be used for the single inflate()
-  call.  Z_FINISH also informs inflate to not maintain a sliding window if the
-  stream completes, which reduces inflate's memory footprint.  If the stream
-  does not complete, either because not all of the stream is provided or not
-  enough output space is provided, then a sliding window will be allocated and
-  inflate() can be called again to continue the operation as if Z_NO_FLUSH had
-  been used.
-
-     In this implementation, inflate() always flushes as much output as
-  possible to the output buffer, and always uses the faster approach on the
-  first call.  So the effects of the flush parameter in this implementation are
-  on the return value of inflate() as noted below, when inflate() returns early
-  when Z_BLOCK or Z_TREES is used, and when inflate() avoids the allocation of
-  memory for a sliding window when Z_FINISH is used.
-
-     If a preset dictionary is needed after this call (see inflateSetDictionary
-  below), inflate sets strm->adler to the Adler-32 checksum of the dictionary
-  chosen by the compressor and returns Z_NEED_DICT; otherwise it sets
-  strm->adler to the Adler-32 checksum of all output produced so far (that is,
-  total_out bytes) and returns Z_OK, Z_STREAM_END or an error code as described
-  below.  At the end of the stream, inflate() checks that its computed adler32
-  checksum is equal to that saved by the compressor and returns Z_STREAM_END
-  only if the checksum is correct.
-
-    inflate() can decompress and check either zlib-wrapped or gzip-wrapped
-  deflate data.  The header type is detected automatically, if requested when
-  initializing with inflateInit2().  Any information contained in the gzip
-  header is not retained, so applications that need that information should
-  instead use raw inflate, see inflateInit2() below, or inflateBack() and
-  perform their own processing of the gzip header and trailer.  When processing
-  gzip-wrapped deflate data, strm->adler32 is set to the CRC-32 of the output
-  producted so far.  The CRC-32 is checked against the gzip trailer.
-
-    inflate() returns Z_OK if some progress has been made (more input processed
-  or more output produced), Z_STREAM_END if the end of the compressed data has
-  been reached and all uncompressed output has been produced, Z_NEED_DICT if a
-  preset dictionary is needed at this point, Z_DATA_ERROR if the input data was
-  corrupted (input stream not conforming to the zlib format or incorrect check
-  value), Z_STREAM_ERROR if the stream structure was inconsistent (for example
-  next_in or next_out was Z_NULL), Z_MEM_ERROR if there was not enough memory,
-  Z_BUF_ERROR if no progress is possible or if there was not enough room in the
-  output buffer when Z_FINISH is used.  Note that Z_BUF_ERROR is not fatal, and
-  inflate() can be called again with more input and more output space to
-  continue decompressing.  If Z_DATA_ERROR is returned, the application may
-  then call inflateSync() to look for a good compression block if a partial
-  recovery of the data is desired.
-*/
-
-
-ZEXTERN int ZEXPORT inflateEnd OF((z_streamp strm));
-/*
-     All dynamically allocated data structures for this stream are freed.
-   This function discards any unprocessed input and does not flush any pending
-   output.
-
-     inflateEnd returns Z_OK if success, Z_STREAM_ERROR if the stream state
-   was inconsistent.  In the error case, msg may be set but then points to a
-   static string (which must not be deallocated).
-*/
-
-
-                        /* Advanced functions */
-
-/*
-    The following functions are needed only in some special applications.
-*/
-
-/*
-ZEXTERN int ZEXPORT deflateInit2 OF((z_streamp strm,
-                                     int  level,
-                                     int  method,
-                                     int  windowBits,
-                                     int  memLevel,
-                                     int  strategy));
-
-     This is another version of deflateInit with more compression options.  The
-   fields next_in, zalloc, zfree and opaque must be initialized before by the
-   caller.
-
-     The method parameter is the compression method.  It must be Z_DEFLATED in
-   this version of the library.
-
-     The windowBits parameter is the base two logarithm of the window size
-   (the size of the history buffer).  It should be in the range 8..15 for this
-   version of the library.  Larger values of this parameter result in better
-   compression at the expense of memory usage.  The default value is 15 if
-   deflateInit is used instead.
-
-     windowBits can also be -8..-15 for raw deflate.  In this case, -windowBits
-   determines the window size.  deflate() will then generate raw deflate data
-   with no zlib header or trailer, and will not compute an adler32 check value.
-
-     windowBits can also be greater than 15 for optional gzip encoding.  Add
-   16 to windowBits to write a simple gzip header and trailer around the
-   compressed data instead of a zlib wrapper.  The gzip header will have no
-   file name, no extra data, no comment, no modification time (set to zero), no
-   header crc, and the operating system will be set to 255 (unknown).  If a
-   gzip stream is being written, strm->adler is a crc32 instead of an adler32.
-
-     The memLevel parameter specifies how much memory should be allocated
-   for the internal compression state.  memLevel=1 uses minimum memory but is
-   slow and reduces compression ratio; memLevel=9 uses maximum memory for
-   optimal speed.  The default value is 8.  See zconf.h for total memory usage
-   as a function of windowBits and memLevel.
-
-     The strategy parameter is used to tune the compression algorithm.  Use the
-   value Z_DEFAULT_STRATEGY for normal data, Z_FILTERED for data produced by a
-   filter (or predictor), Z_HUFFMAN_ONLY to force Huffman encoding only (no
-   string match), or Z_RLE to limit match distances to one (run-length
-   encoding).  Filtered data consists mostly of small values with a somewhat
-   random distribution.  In this case, the compression algorithm is tuned to
-   compress them better.  The effect of Z_FILTERED is to force more Huffman
-   coding and less string matching; it is somewhat intermediate between
-   Z_DEFAULT_STRATEGY and Z_HUFFMAN_ONLY.  Z_RLE is designed to be almost as
-   fast as Z_HUFFMAN_ONLY, but give better compression for PNG image data.  The
-   strategy parameter only affects the compression ratio but not the
-   correctness of the compressed output even if it is not set appropriately.
-   Z_FIXED prevents the use of dynamic Huffman codes, allowing for a simpler
-   decoder for special applications.
-
-     deflateInit2 returns Z_OK if success, Z_MEM_ERROR if there was not enough
-   memory, Z_STREAM_ERROR if any parameter is invalid (such as an invalid
-   method), or Z_VERSION_ERROR if the zlib library version (zlib_version) is
-   incompatible with the version assumed by the caller (ZLIB_VERSION).  msg is
-   set to null if there is no error message.  deflateInit2 does not perform any
-   compression: this will be done by deflate().
-*/
-
-ZEXTERN int ZEXPORT deflateSetDictionary OF((z_streamp strm,
-                                             const Bytef *dictionary,
-                                             uInt  dictLength));
-/*
-     Initializes the compression dictionary from the given byte sequence
-   without producing any compressed output.  When using the zlib format, this
-   function must be called immediately after deflateInit, deflateInit2 or
-   deflateReset, and before any call of deflate.  When doing raw deflate, this
-   function must be called either before any call of deflate, or immediately
-   after the completion of a deflate block, i.e. after all input has been
-   consumed and all output has been delivered when using any of the flush
-   options Z_BLOCK, Z_PARTIAL_FLUSH, Z_SYNC_FLUSH, or Z_FULL_FLUSH.  The
-   compressor and decompressor must use exactly the same dictionary (see
-   inflateSetDictionary).
-
-     The dictionary should consist of strings (byte sequences) that are likely
-   to be encountered later in the data to be compressed, with the most commonly
-   used strings preferably put towards the end of the dictionary.  Using a
-   dictionary is most useful when the data to be compressed is short and can be
-   predicted with good accuracy; the data can then be compressed better than
-   with the default empty dictionary.
-
-     Depending on the size of the compression data structures selected by
-   deflateInit or deflateInit2, a part of the dictionary may in effect be
-   discarded, for example if the dictionary is larger than the window size
-   provided in deflateInit or deflateInit2.  Thus the strings most likely to be
-   useful should be put at the end of the dictionary, not at the front.  In
-   addition, the current implementation of deflate will use at most the window
-   size minus 262 bytes of the provided dictionary.
-
-     Upon return of this function, strm->adler is set to the adler32 value
-   of the dictionary; the decompressor may later use this value to determine
-   which dictionary has been used by the compressor.  (The adler32 value
-   applies to the whole dictionary even if only a subset of the dictionary is
-   actually used by the compressor.) If a raw deflate was requested, then the
-   adler32 value is not computed and strm->adler is not set.
-
-     deflateSetDictionary returns Z_OK if success, or Z_STREAM_ERROR if a
-   parameter is invalid (e.g.  dictionary being Z_NULL) or the stream state is
-   inconsistent (for example if deflate has already been called for this stream
-   or if not at a block boundary for raw deflate).  deflateSetDictionary does
-   not perform any compression: this will be done by deflate().
-*/
-
-ZEXTERN int ZEXPORT deflateCopy OF((z_streamp dest,
-                                    z_streamp source));
-/*
-     Sets the destination stream as a complete copy of the source stream.
-
-     This function can be useful when several compression strategies will be
-   tried, for example when there are several ways of pre-processing the input
-   data with a filter.  The streams that will be discarded should then be freed
-   by calling deflateEnd.  Note that deflateCopy duplicates the internal
-   compression state which can be quite large, so this strategy is slow and can
-   consume lots of memory.
-
-     deflateCopy returns Z_OK if success, Z_MEM_ERROR if there was not
-   enough memory, Z_STREAM_ERROR if the source stream state was inconsistent
-   (such as zalloc being Z_NULL).  msg is left unchanged in both source and
-   destination.
-*/
-
-ZEXTERN int ZEXPORT deflateReset OF((z_streamp strm));
-/*
-     This function is equivalent to deflateEnd followed by deflateInit,
-   but does not free and reallocate all the internal compression state.  The
-   stream will keep the same compression level and any other attributes that
-   may have been set by deflateInit2.
-
-     deflateReset returns Z_OK if success, or Z_STREAM_ERROR if the source
-   stream state was inconsistent (such as zalloc or state being Z_NULL).
-*/
-
-ZEXTERN int ZEXPORT deflateParams OF((z_streamp strm,
-                                      int level,
-                                      int strategy));
-/*
-     Dynamically update the compression level and compression strategy.  The
-   interpretation of level and strategy is as in deflateInit2.  This can be
-   used to switch between compression and straight copy of the input data, or
-   to switch to a different kind of input data requiring a different strategy.
-   If the compression level is changed, the input available so far is
-   compressed with the old level (and may be flushed); the new level will take
-   effect only at the next call of deflate().
-
-     Before the call of deflateParams, the stream state must be set as for
-   a call of deflate(), since the currently available input may have to be
-   compressed and flushed.  In particular, strm->avail_out must be non-zero.
-
-     deflateParams returns Z_OK if success, Z_STREAM_ERROR if the source
-   stream state was inconsistent or if a parameter was invalid, Z_BUF_ERROR if
-   strm->avail_out was zero.
-*/
-
-ZEXTERN int ZEXPORT deflateTune OF((z_streamp strm,
-                                    int good_length,
-                                    int max_lazy,
-                                    int nice_length,
-                                    int max_chain));
-/*
-     Fine tune deflate's internal compression parameters.  This should only be
-   used by someone who understands the algorithm used by zlib's deflate for
-   searching for the best matching string, and even then only by the most
-   fanatic optimizer trying to squeeze out the last compressed bit for their
-   specific input data.  Read the deflate.c source code for the meaning of the
-   max_lazy, good_length, nice_length, and max_chain parameters.
-
-     deflateTune() can be called after deflateInit() or deflateInit2(), and
-   returns Z_OK on success, or Z_STREAM_ERROR for an invalid deflate stream.
- */
-
-ZEXTERN uLong ZEXPORT deflateBound OF((z_streamp strm,
-                                       uLong sourceLen));
-/*
-     deflateBound() returns an upper bound on the compressed size after
-   deflation of sourceLen bytes.  It must be called after deflateInit() or
-   deflateInit2(), and after deflateSetHeader(), if used.  This would be used
-   to allocate an output buffer for deflation in a single pass, and so would be
-   called before deflate().  If that first deflate() call is provided the
-   sourceLen input bytes, an output buffer allocated to the size returned by
-   deflateBound(), and the flush value Z_FINISH, then deflate() is guaranteed
-   to return Z_STREAM_END.  Note that it is possible for the compressed size to
-   be larger than the value returned by deflateBound() if flush options other
-   than Z_FINISH or Z_NO_FLUSH are used.
-*/
-
-ZEXTERN int ZEXPORT deflatePending OF((z_streamp strm,
-                                       unsigned *pending,
-                                       int *bits));
-/*
-     deflatePending() returns the number of bytes and bits of output that have
-   been generated, but not yet provided in the available output.  The bytes not
-   provided would be due to the available output space having being consumed.
-   The number of bits of output not provided are between 0 and 7, where they
-   await more bits to join them in order to fill out a full byte.  If pending
-   or bits are Z_NULL, then those values are not set.
-
-     deflatePending returns Z_OK if success, or Z_STREAM_ERROR if the source
-   stream state was inconsistent.
- */
-
-ZEXTERN int ZEXPORT deflatePrime OF((z_streamp strm,
-                                     int bits,
-                                     int value));
-/*
-     deflatePrime() inserts bits in the deflate output stream.  The intent
-   is that this function is used to start off the deflate output with the bits
-   leftover from a previous deflate stream when appending to it.  As such, this
-   function can only be used for raw deflate, and must be used before the first
-   deflate() call after a deflateInit2() or deflateReset().  bits must be less
-   than or equal to 16, and that many of the least significant bits of value
-   will be inserted in the output.
-
-     deflatePrime returns Z_OK if success, Z_BUF_ERROR if there was not enough
-   room in the internal buffer to insert the bits, or Z_STREAM_ERROR if the
-   source stream state was inconsistent.
-*/
-
-ZEXTERN int ZEXPORT deflateSetHeader OF((z_streamp strm,
-                                         gz_headerp head));
-/*
-     deflateSetHeader() provides gzip header information for when a gzip
-   stream is requested by deflateInit2().  deflateSetHeader() may be called
-   after deflateInit2() or deflateReset() and before the first call of
-   deflate().  The text, time, os, extra field, name, and comment information
-   in the provided gz_header structure are written to the gzip header (xflag is
-   ignored -- the extra flags are set according to the compression level).  The
-   caller must assure that, if not Z_NULL, name and comment are terminated with
-   a zero byte, and that if extra is not Z_NULL, that extra_len bytes are
-   available there.  If hcrc is true, a gzip header crc is included.  Note that
-   the current versions of the command-line version of gzip (up through version
-   1.3.x) do not support header crc's, and will report that it is a "multi-part
-   gzip file" and give up.
-
-     If deflateSetHeader is not used, the default gzip header has text false,
-   the time set to zero, and os set to 255, with no extra, name, or comment
-   fields.  The gzip header is returned to the default state by deflateReset().
-
-     deflateSetHeader returns Z_OK if success, or Z_STREAM_ERROR if the source
-   stream state was inconsistent.
-*/
-
-/*
-ZEXTERN int ZEXPORT inflateInit2 OF((z_streamp strm,
-                                     int  windowBits));
-
-     This is another version of inflateInit with an extra parameter.  The
-   fields next_in, avail_in, zalloc, zfree and opaque must be initialized
-   before by the caller.
-
-     The windowBits parameter is the base two logarithm of the maximum window
-   size (the size of the history buffer).  It should be in the range 8..15 for
-   this version of the library.  The default value is 15 if inflateInit is used
-   instead.  windowBits must be greater than or equal to the windowBits value
-   provided to deflateInit2() while compressing, or it must be equal to 15 if
-   deflateInit2() was not used.  If a compressed stream with a larger window
-   size is given as input, inflate() will return with the error code
-   Z_DATA_ERROR instead of trying to allocate a larger window.
-
-     windowBits can also be zero to request that inflate use the window size in
-   the zlib header of the compressed stream.
-
-     windowBits can also be -8..-15 for raw inflate.  In this case, -windowBits
-   determines the window size.  inflate() will then process raw deflate data,
-   not looking for a zlib or gzip header, not generating a check value, and not
-   looking for any check values for comparison at the end of the stream.  This
-   is for use with other formats that use the deflate compressed data format
-   such as zip.  Those formats provide their own check values.  If a custom
-   format is developed using the raw deflate format for compressed data, it is
-   recommended that a check value such as an adler32 or a crc32 be applied to
-   the uncompressed data as is done in the zlib, gzip, and zip formats.  For
-   most applications, the zlib format should be used as is.  Note that comments
-   above on the use in deflateInit2() applies to the magnitude of windowBits.
-
-     windowBits can also be greater than 15 for optional gzip decoding.  Add
-   32 to windowBits to enable zlib and gzip decoding with automatic header
-   detection, or add 16 to decode only the gzip format (the zlib format will
-   return a Z_DATA_ERROR).  If a gzip stream is being decoded, strm->adler is a
-   crc32 instead of an adler32.
-
-     inflateInit2 returns Z_OK if success, Z_MEM_ERROR if there was not enough
-   memory, Z_VERSION_ERROR if the zlib library version is incompatible with the
-   version assumed by the caller, or Z_STREAM_ERROR if the parameters are
-   invalid, such as a null pointer to the structure.  msg is set to null if
-   there is no error message.  inflateInit2 does not perform any decompression
-   apart from possibly reading the zlib header if present: actual decompression
-   will be done by inflate().  (So next_in and avail_in may be modified, but
-   next_out and avail_out are unused and unchanged.) The current implementation
-   of inflateInit2() does not process any header information -- that is
-   deferred until inflate() is called.
-*/
-
-ZEXTERN int ZEXPORT inflateSetDictionary OF((z_streamp strm,
-                                             const Bytef *dictionary,
-                                             uInt  dictLength));
-/*
-     Initializes the decompression dictionary from the given uncompressed byte
-   sequence.  This function must be called immediately after a call of inflate,
-   if that call returned Z_NEED_DICT.  The dictionary chosen by the compressor
-   can be determined from the adler32 value returned by that call of inflate.
-   The compressor and decompressor must use exactly the same dictionary (see
-   deflateSetDictionary).  For raw inflate, this function can be called at any
-   time to set the dictionary.  If the provided dictionary is smaller than the
-   window and there is already data in the window, then the provided dictionary
-   will amend what's there.  The application must insure that the dictionary
-   that was used for compression is provided.
-
-     inflateSetDictionary returns Z_OK if success, Z_STREAM_ERROR if a
-   parameter is invalid (e.g.  dictionary being Z_NULL) or the stream state is
-   inconsistent, Z_DATA_ERROR if the given dictionary doesn't match the
-   expected one (incorrect adler32 value).  inflateSetDictionary does not
-   perform any decompression: this will be done by subsequent calls of
-   inflate().
-*/
-
-ZEXTERN int ZEXPORT inflateGetDictionary OF((z_streamp strm,
-                                             Bytef *dictionary,
-                                             uInt  *dictLength));
-/*
-     Returns the sliding dictionary being maintained by inflate.  dictLength is
-   set to the number of bytes in the dictionary, and that many bytes are copied
-   to dictionary.  dictionary must have enough space, where 32768 bytes is
-   always enough.  If inflateGetDictionary() is called with dictionary equal to
-   Z_NULL, then only the dictionary length is returned, and nothing is copied.
-   Similary, if dictLength is Z_NULL, then it is not set.
-
-     inflateGetDictionary returns Z_OK on success, or Z_STREAM_ERROR if the
-   stream state is inconsistent.
-*/
-
-ZEXTERN int ZEXPORT inflateSync OF((z_streamp strm));
-/*
-     Skips invalid compressed data until a possible full flush point (see above
-   for the description of deflate with Z_FULL_FLUSH) can be found, or until all
-   available input is skipped.  No output is provided.
-
-     inflateSync searches for a 00 00 FF FF pattern in the compressed data.
-   All full flush points have this pattern, but not all occurrences of this
-   pattern are full flush points.
-
-     inflateSync returns Z_OK if a possible full flush point has been found,
-   Z_BUF_ERROR if no more input was provided, Z_DATA_ERROR if no flush point
-   has been found, or Z_STREAM_ERROR if the stream structure was inconsistent.
-   In the success case, the application may save the current current value of
-   total_in which indicates where valid compressed data was found.  In the
-   error case, the application may repeatedly call inflateSync, providing more
-   input each time, until success or end of the input data.
-*/
-
-ZEXTERN int ZEXPORT inflateCopy OF((z_streamp dest,
-                                    z_streamp source));
-/*
-     Sets the destination stream as a complete copy of the source stream.
-
-     This function can be useful when randomly accessing a large stream.  The
-   first pass through the stream can periodically record the inflate state,
-   allowing restarting inflate at those points when randomly accessing the
-   stream.
-
-     inflateCopy returns Z_OK if success, Z_MEM_ERROR if there was not
-   enough memory, Z_STREAM_ERROR if the source stream state was inconsistent
-   (such as zalloc being Z_NULL).  msg is left unchanged in both source and
-   destination.
-*/
-
-ZEXTERN int ZEXPORT inflateReset OF((z_streamp strm));
-/*
-     This function is equivalent to inflateEnd followed by inflateInit,
-   but does not free and reallocate all the internal decompression state.  The
-   stream will keep attributes that may have been set by inflateInit2.
-
-     inflateReset returns Z_OK if success, or Z_STREAM_ERROR if the source
-   stream state was inconsistent (such as zalloc or state being Z_NULL).
-*/
-
-ZEXTERN int ZEXPORT inflateReset2 OF((z_streamp strm,
-                                      int windowBits));
-/*
-     This function is the same as inflateReset, but it also permits changing
-   the wrap and window size requests.  The windowBits parameter is interpreted
-   the same as it is for inflateInit2.
-
-     inflateReset2 returns Z_OK if success, or Z_STREAM_ERROR if the source
-   stream state was inconsistent (such as zalloc or state being Z_NULL), or if
-   the windowBits parameter is invalid.
-*/
-
-ZEXTERN int ZEXPORT inflatePrime OF((z_streamp strm,
-                                     int bits,
-                                     int value));
-/*
-     This function inserts bits in the inflate input stream.  The intent is
-   that this function is used to start inflating at a bit position in the
-   middle of a byte.  The provided bits will be used before any bytes are used
-   from next_in.  This function should only be used with raw inflate, and
-   should be used before the first inflate() call after inflateInit2() or
-   inflateReset().  bits must be less than or equal to 16, and that many of the
-   least significant bits of value will be inserted in the input.
-
-     If bits is negative, then the input stream bit buffer is emptied.  Then
-   inflatePrime() can be called again to put bits in the buffer.  This is used
-   to clear out bits leftover after feeding inflate a block description prior
-   to feeding inflate codes.
-
-     inflatePrime returns Z_OK if success, or Z_STREAM_ERROR if the source
-   stream state was inconsistent.
-*/
-
-ZEXTERN long ZEXPORT inflateMark OF((z_streamp strm));
-/*
-     This function returns two values, one in the lower 16 bits of the return
-   value, and the other in the remaining upper bits, obtained by shifting the
-   return value down 16 bits.  If the upper value is -1 and the lower value is
-   zero, then inflate() is currently decoding information outside of a block.
-   If the upper value is -1 and the lower value is non-zero, then inflate is in
-   the middle of a stored block, with the lower value equaling the number of
-   bytes from the input remaining to copy.  If the upper value is not -1, then
-   it is the number of bits back from the current bit position in the input of
-   the code (literal or length/distance pair) currently being processed.  In
-   that case the lower value is the number of bytes already emitted for that
-   code.
-
-     A code is being processed if inflate is waiting for more input to complete
-   decoding of the code, or if it has completed decoding but is waiting for
-   more output space to write the literal or match data.
-
-     inflateMark() is used to mark locations in the input data for random
-   access, which may be at bit positions, and to note those cases where the
-   output of a code may span boundaries of random access blocks.  The current
-   location in the input stream can be determined from avail_in and data_type
-   as noted in the description for the Z_BLOCK flush parameter for inflate.
-
-     inflateMark returns the value noted above or -1 << 16 if the provided
-   source stream state was inconsistent.
-*/
-
-ZEXTERN int ZEXPORT inflateGetHeader OF((z_streamp strm,
-                                         gz_headerp head));
-/*
-     inflateGetHeader() requests that gzip header information be stored in the
-   provided gz_header structure.  inflateGetHeader() may be called after
-   inflateInit2() or inflateReset(), and before the first call of inflate().
-   As inflate() processes the gzip stream, head->done is zero until the header
-   is completed, at which time head->done is set to one.  If a zlib stream is
-   being decoded, then head->done is set to -1 to indicate that there will be
-   no gzip header information forthcoming.  Note that Z_BLOCK or Z_TREES can be
-   used to force inflate() to return immediately after header processing is
-   complete and before any actual data is decompressed.
-
-     The text, time, xflags, and os fields are filled in with the gzip header
-   contents.  hcrc is set to true if there is a header CRC.  (The header CRC
-   was valid if done is set to one.) If extra is not Z_NULL, then extra_max
-   contains the maximum number of bytes to write to extra.  Once done is true,
-   extra_len contains the actual extra field length, and extra contains the
-   extra field, or that field truncated if extra_max is less than extra_len.
-   If name is not Z_NULL, then up to name_max characters are written there,
-   terminated with a zero unless the length is greater than name_max.  If
-   comment is not Z_NULL, then up to comm_max characters are written there,
-   terminated with a zero unless the length is greater than comm_max.  When any
-   of extra, name, or comment are not Z_NULL and the respective field is not
-   present in the header, then that field is set to Z_NULL to signal its
-   absence.  This allows the use of deflateSetHeader() with the returned
-   structure to duplicate the header.  However if those fields are set to
-   allocated memory, then the application will need to save those pointers
-   elsewhere so that they can be eventually freed.
-
-     If inflateGetHeader is not used, then the header information is simply
-   discarded.  The header is always checked for validity, including the header
-   CRC if present.  inflateReset() will reset the process to discard the header
-   information.  The application would need to call inflateGetHeader() again to
-   retrieve the header from the next gzip stream.
-
-     inflateGetHeader returns Z_OK if success, or Z_STREAM_ERROR if the source
-   stream state was inconsistent.
-*/
-
-/*
-ZEXTERN int ZEXPORT inflateBackInit OF((z_streamp strm, int windowBits,
-                                        unsigned char FAR *window));
-
-     Initialize the internal stream state for decompression using inflateBack()
-   calls.  The fields zalloc, zfree and opaque in strm must be initialized
-   before the call.  If zalloc and zfree are Z_NULL, then the default library-
-   derived memory allocation routines are used.  windowBits is the base two
-   logarithm of the window size, in the range 8..15.  window is a caller
-   supplied buffer of that size.  Except for special applications where it is
-   assured that deflate was used with small window sizes, windowBits must be 15
-   and a 32K byte window must be supplied to be able to decompress general
-   deflate streams.
-
-     See inflateBack() for the usage of these routines.
-
-     inflateBackInit will return Z_OK on success, Z_STREAM_ERROR if any of
-   the parameters are invalid, Z_MEM_ERROR if the internal state could not be
-   allocated, or Z_VERSION_ERROR if the version of the library does not match
-   the version of the header file.
-*/
-
-typedef unsigned (*in_func) OF((void FAR *,
-                                z_const unsigned char FAR * FAR *));
-typedef int (*out_func) OF((void FAR *, unsigned char FAR *, unsigned));
-
-ZEXTERN int ZEXPORT inflateBack OF((z_streamp strm,
-                                    in_func in, void FAR *in_desc,
-                                    out_func out, void FAR *out_desc));
-/*
-     inflateBack() does a raw inflate with a single call using a call-back
-   interface for input and output.  This is potentially more efficient than
-   inflate() for file i/o applications, in that it avoids copying between the
-   output and the sliding window by simply making the window itself the output
-   buffer.  inflate() can be faster on modern CPUs when used with large
-   buffers.  inflateBack() trusts the application to not change the output
-   buffer passed by the output function, at least until inflateBack() returns.
-
-     inflateBackInit() must be called first to allocate the internal state
-   and to initialize the state with the user-provided window buffer.
-   inflateBack() may then be used multiple times to inflate a complete, raw
-   deflate stream with each call.  inflateBackEnd() is then called to free the
-   allocated state.
-
-     A raw deflate stream is one with no zlib or gzip header or trailer.
-   This routine would normally be used in a utility that reads zip or gzip
-   files and writes out uncompressed files.  The utility would decode the
-   header and process the trailer on its own, hence this routine expects only
-   the raw deflate stream to decompress.  This is different from the normal
-   behavior of inflate(), which expects either a zlib or gzip header and
-   trailer around the deflate stream.
-
-     inflateBack() uses two subroutines supplied by the caller that are then
-   called by inflateBack() for input and output.  inflateBack() calls those
-   routines until it reads a complete deflate stream and writes out all of the
-   uncompressed data, or until it encounters an error.  The function's
-   parameters and return types are defined above in the in_func and out_func
-   typedefs.  inflateBack() will call in(in_desc, &buf) which should return the
-   number of bytes of provided input, and a pointer to that input in buf.  If
-   there is no input available, in() must return zero--buf is ignored in that
-   case--and inflateBack() will return a buffer error.  inflateBack() will call
-   out(out_desc, buf, len) to write the uncompressed data buf[0..len-1].  out()
-   should return zero on success, or non-zero on failure.  If out() returns
-   non-zero, inflateBack() will return with an error.  Neither in() nor out()
-   are permitted to change the contents of the window provided to
-   inflateBackInit(), which is also the buffer that out() uses to write from.
-   The length written by out() will be at most the window size.  Any non-zero
-   amount of input may be provided by in().
-
-     For convenience, inflateBack() can be provided input on the first call by
-   setting strm->next_in and strm->avail_in.  If that input is exhausted, then
-   in() will be called.  Therefore strm->next_in must be initialized before
-   calling inflateBack().  If strm->next_in is Z_NULL, then in() will be called
-   immediately for input.  If strm->next_in is not Z_NULL, then strm->avail_in
-   must also be initialized, and then if strm->avail_in is not zero, input will
-   initially be taken from strm->next_in[0 ..  strm->avail_in - 1].
-
-     The in_desc and out_desc parameters of inflateBack() is passed as the
-   first parameter of in() and out() respectively when they are called.  These
-   descriptors can be optionally used to pass any information that the caller-
-   supplied in() and out() functions need to do their job.
-
-     On return, inflateBack() will set strm->next_in and strm->avail_in to
-   pass back any unused input that was provided by the last in() call.  The
-   return values of inflateBack() can be Z_STREAM_END on success, Z_BUF_ERROR
-   if in() or out() returned an error, Z_DATA_ERROR if there was a format error
-   in the deflate stream (in which case strm->msg is set to indicate the nature
-   of the error), or Z_STREAM_ERROR if the stream was not properly initialized.
-   In the case of Z_BUF_ERROR, an input or output error can be distinguished
-   using strm->next_in which will be Z_NULL only if in() returned an error.  If
-   strm->next_in is not Z_NULL, then the Z_BUF_ERROR was due to out() returning
-   non-zero.  (in() will always be called before out(), so strm->next_in is
-   assured to be defined if out() returns non-zero.) Note that inflateBack()
-   cannot return Z_OK.
-*/
-
-ZEXTERN int ZEXPORT inflateBackEnd OF((z_streamp strm));
-/*
-     All memory allocated by inflateBackInit() is freed.
-
-     inflateBackEnd() returns Z_OK on success, or Z_STREAM_ERROR if the stream
-   state was inconsistent.
-*/
-
-ZEXTERN uLong ZEXPORT zlibCompileFlags OF((void));
-/* Return flags indicating compile-time options.
-
-    Type sizes, two bits each, 00 = 16 bits, 01 = 32, 10 = 64, 11 = other:
-     1.0: size of uInt
-     3.2: size of uLong
-     5.4: size of voidpf (pointer)
-     7.6: size of z_off_t
-
-    Compiler, assembler, and debug options:
-     8: DEBUG
-     9: ASMV or ASMINF -- use ASM code
-     10: ZLIB_WINAPI -- exported functions use the WINAPI calling convention
-     11: 0 (reserved)
-
-    One-time table building (smaller code, but not thread-safe if true):
-     12: BUILDFIXED -- build static block decoding tables when needed
-     13: DYNAMIC_CRC_TABLE -- build CRC calculation tables when needed
-     14,15: 0 (reserved)
-
-    Library content (indicates missing functionality):
-     16: NO_GZCOMPRESS -- gz* functions cannot compress (to avoid linking
-                          deflate code when not needed)
-     17: NO_GZIP -- deflate can't write gzip streams, and inflate can't detect
-                    and decode gzip streams (to avoid linking crc code)
-     18-19: 0 (reserved)
-
-    Operation variations (changes in library functionality):
-     20: PKZIP_BUG_WORKAROUND -- slightly more permissive inflate
-     21: FASTEST -- deflate algorithm with only one, lowest compression level
-     22,23: 0 (reserved)
-
-    The sprintf variant used by gzprintf (zero is best):
-     24: 0 = vs*, 1 = s* -- 1 means limited to 20 arguments after the format
-     25: 0 = *nprintf, 1 = *printf -- 1 means gzprintf() not secure!
-     26: 0 = returns value, 1 = void -- 1 means inferred string length returned
-
-    Remainder:
-     27-31: 0 (reserved)
- */
-
-#ifndef Z_SOLO
-
-                        /* utility functions */
-
-/*
-     The following utility functions are implemented on top of the basic
-   stream-oriented functions.  To simplify the interface, some default options
-   are assumed (compression level and memory usage, standard memory allocation
-   functions).  The source code of these utility functions can be modified if
-   you need special options.
-*/
-
-ZEXTERN int ZEXPORT compress OF((Bytef *dest,   uLongf *destLen,
-                                 const Bytef *source, uLong sourceLen));
-/*
-     Compresses the source buffer into the destination buffer.  sourceLen is
-   the byte length of the source buffer.  Upon entry, destLen is the total size
-   of the destination buffer, which must be at least the value returned by
-   compressBound(sourceLen).  Upon exit, destLen is the actual size of the
-   compressed buffer.
-
-     compress returns Z_OK if success, Z_MEM_ERROR if there was not
-   enough memory, Z_BUF_ERROR if there was not enough room in the output
-   buffer.
-*/
-
-ZEXTERN int ZEXPORT compress2 OF((Bytef *dest,   uLongf *destLen,
-                                  const Bytef *source, uLong sourceLen,
-                                  int level));
-/*
-     Compresses the source buffer into the destination buffer.  The level
-   parameter has the same meaning as in deflateInit.  sourceLen is the byte
-   length of the source buffer.  Upon entry, destLen is the total size of the
-   destination buffer, which must be at least the value returned by
-   compressBound(sourceLen).  Upon exit, destLen is the actual size of the
-   compressed buffer.
-
-     compress2 returns Z_OK if success, Z_MEM_ERROR if there was not enough
-   memory, Z_BUF_ERROR if there was not enough room in the output buffer,
-   Z_STREAM_ERROR if the level parameter is invalid.
-*/
-
-ZEXTERN uLong ZEXPORT compressBound OF((uLong sourceLen));
-/*
-     compressBound() returns an upper bound on the compressed size after
-   compress() or compress2() on sourceLen bytes.  It would be used before a
-   compress() or compress2() call to allocate the destination buffer.
-*/
-
-ZEXTERN int ZEXPORT uncompress OF((Bytef *dest,   uLongf *destLen,
-                                   const Bytef *source, uLong sourceLen));
-/*
-     Decompresses the source buffer into the destination buffer.  sourceLen is
-   the byte length of the source buffer.  Upon entry, destLen is the total size
-   of the destination buffer, which must be large enough to hold the entire
-   uncompressed data.  (The size of the uncompressed data must have been saved
-   previously by the compressor and transmitted to the decompressor by some
-   mechanism outside the scope of this compression library.) Upon exit, destLen
-   is the actual size of the uncompressed buffer.
-
-     uncompress returns Z_OK if success, Z_MEM_ERROR if there was not
-   enough memory, Z_BUF_ERROR if there was not enough room in the output
-   buffer, or Z_DATA_ERROR if the input data was corrupted or incomplete.  In
-   the case where there is not enough room, uncompress() will fill the output
-   buffer with the uncompressed data up to that point.
-*/
-
-                        /* gzip file access functions */
-
-/*
-     This library supports reading and writing files in gzip (.gz) format with
-   an interface similar to that of stdio, using the functions that start with
-   "gz".  The gzip format is different from the zlib format.  gzip is a gzip
-   wrapper, documented in RFC 1952, wrapped around a deflate stream.
-*/
-
-typedef struct gzFile_s *gzFile;    /* semi-opaque gzip file descriptor */
-
-/*
-ZEXTERN gzFile ZEXPORT gzopen OF((const char *path, const char *mode));
-
-     Opens a gzip (.gz) file for reading or writing.  The mode parameter is as
-   in fopen ("rb" or "wb") but can also include a compression level ("wb9") or
-   a strategy: 'f' for filtered data as in "wb6f", 'h' for Huffman-only
-   compression as in "wb1h", 'R' for run-length encoding as in "wb1R", or 'F'
-   for fixed code compression as in "wb9F".  (See the description of
-   deflateInit2 for more information about the strategy parameter.)  'T' will
-   request transparent writing or appending with no compression and not using
-   the gzip format.
-
-     "a" can be used instead of "w" to request that the gzip stream that will
-   be written be appended to the file.  "+" will result in an error, since
-   reading and writing to the same gzip file is not supported.  The addition of
-   "x" when writing will create the file exclusively, which fails if the file
-   already exists.  On systems that support it, the addition of "e" when
-   reading or writing will set the flag to close the file on an execve() call.
-
-     These functions, as well as gzip, will read and decode a sequence of gzip
-   streams in a file.  The append function of gzopen() can be used to create
-   such a file.  (Also see gzflush() for another way to do this.)  When
-   appending, gzopen does not test whether the file begins with a gzip stream,
-   nor does it look for the end of the gzip streams to begin appending.  gzopen
-   will simply append a gzip stream to the existing file.
-
-     gzopen can be used to read a file which is not in gzip format; in this
-   case gzread will directly read from the file without decompression.  When
-   reading, this will be detected automatically by looking for the magic two-
-   byte gzip header.
-
-     gzopen returns NULL if the file could not be opened, if there was
-   insufficient memory to allocate the gzFile state, or if an invalid mode was
-   specified (an 'r', 'w', or 'a' was not provided, or '+' was provided).
-   errno can be checked to determine if the reason gzopen failed was that the
-   file could not be opened.
-*/
-
-ZEXTERN gzFile ZEXPORT gzdopen OF((int fd, const char *mode));
-/*
-     gzdopen associates a gzFile with the file descriptor fd.  File descriptors
-   are obtained from calls like open, dup, creat, pipe or fileno (if the file
-   has been previously opened with fopen).  The mode parameter is as in gzopen.
-
-     The next call of gzclose on the returned gzFile will also close the file
-   descriptor fd, just like fclose(fdopen(fd, mode)) closes the file descriptor
-   fd.  If you want to keep fd open, use fd = dup(fd_keep); gz = gzdopen(fd,
-   mode);.  The duplicated descriptor should be saved to avoid a leak, since
-   gzdopen does not close fd if it fails.  If you are using fileno() to get the
-   file descriptor from a FILE *, then you will have to use dup() to avoid
-   double-close()ing the file descriptor.  Both gzclose() and fclose() will
-   close the associated file descriptor, so they need to have different file
-   descriptors.
-
-     gzdopen returns NULL if there was insufficient memory to allocate the
-   gzFile state, if an invalid mode was specified (an 'r', 'w', or 'a' was not
-   provided, or '+' was provided), or if fd is -1.  The file descriptor is not
-   used until the next gz* read, write, seek, or close operation, so gzdopen
-   will not detect if fd is invalid (unless fd is -1).
-*/
-
-ZEXTERN int ZEXPORT gzbuffer OF((gzFile file, unsigned size));
-/*
-     Set the internal buffer size used by this library's functions.  The
-   default buffer size is 8192 bytes.  This function must be called after
-   gzopen() or gzdopen(), and before any other calls that read or write the
-   file.  The buffer memory allocation is always deferred to the first read or
-   write.  Two buffers are allocated, either both of the specified size when
-   writing, or one of the specified size and the other twice that size when
-   reading.  A larger buffer size of, for example, 64K or 128K bytes will
-   noticeably increase the speed of decompression (reading).
-
-     The new buffer size also affects the maximum length for gzprintf().
-
-     gzbuffer() returns 0 on success, or -1 on failure, such as being called
-   too late.
-*/
-
-ZEXTERN int ZEXPORT gzsetparams OF((gzFile file, int level, int strategy));
-/*
-     Dynamically update the compression level or strategy.  See the description
-   of deflateInit2 for the meaning of these parameters.
-
-     gzsetparams returns Z_OK if success, or Z_STREAM_ERROR if the file was not
-   opened for writing.
-*/
-
-ZEXTERN int ZEXPORT gzread OF((gzFile file, voidp buf, unsigned len));
-/*
-     Reads the given number of uncompressed bytes from the compressed file.  If
-   the input file is not in gzip format, gzread copies the given number of
-   bytes into the buffer directly from the file.
-
-     After reaching the end of a gzip stream in the input, gzread will continue
-   to read, looking for another gzip stream.  Any number of gzip streams may be
-   concatenated in the input file, and will all be decompressed by gzread().
-   If something other than a gzip stream is encountered after a gzip stream,
-   that remaining trailing garbage is ignored (and no error is returned).
-
-     gzread can be used to read a gzip file that is being concurrently written.
-   Upon reaching the end of the input, gzread will return with the available
-   data.  If the error code returned by gzerror is Z_OK or Z_BUF_ERROR, then
-   gzclearerr can be used to clear the end of file indicator in order to permit
-   gzread to be tried again.  Z_OK indicates that a gzip stream was completed
-   on the last gzread.  Z_BUF_ERROR indicates that the input file ended in the
-   middle of a gzip stream.  Note that gzread does not return -1 in the event
-   of an incomplete gzip stream.  This error is deferred until gzclose(), which
-   will return Z_BUF_ERROR if the last gzread ended in the middle of a gzip
-   stream.  Alternatively, gzerror can be used before gzclose to detect this
-   case.
-
-     gzread returns the number of uncompressed bytes actually read, less than
-   len for end of file, or -1 for error.
-*/
-
-ZEXTERN int ZEXPORT gzwrite OF((gzFile file,
-                                voidpc buf, unsigned len));
-/*
-     Writes the given number of uncompressed bytes into the compressed file.
-   gzwrite returns the number of uncompressed bytes written or 0 in case of
-   error.
-*/
-
-ZEXTERN int ZEXPORTVA gzprintf Z_ARG((gzFile file, const char *format, ...));
-/*
-     Converts, formats, and writes the arguments to the compressed file under
-   control of the format string, as in fprintf.  gzprintf returns the number of
-   uncompressed bytes actually written, or 0 in case of error.  The number of
-   uncompressed bytes written is limited to 8191, or one less than the buffer
-   size given to gzbuffer().  The caller should assure that this limit is not
-   exceeded.  If it is exceeded, then gzprintf() will return an error (0) with
-   nothing written.  In this case, there may also be a buffer overflow with
-   unpredictable consequences, which is possible only if zlib was compiled with
-   the insecure functions sprintf() or vsprintf() because the secure snprintf()
-   or vsnprintf() functions were not available.  This can be determined using
-   zlibCompileFlags().
-*/
-
-ZEXTERN int ZEXPORT gzputs OF((gzFile file, const char *s));
-/*
-     Writes the given null-terminated string to the compressed file, excluding
-   the terminating null character.
-
-     gzputs returns the number of characters written, or -1 in case of error.
-*/
-
-ZEXTERN char * ZEXPORT gzgets OF((gzFile file, char *buf, int len));
-/*
-     Reads bytes from the compressed file until len-1 characters are read, or a
-   newline character is read and transferred to buf, or an end-of-file
-   condition is encountered.  If any characters are read or if len == 1, the
-   string is terminated with a null character.  If no characters are read due
-   to an end-of-file or len < 1, then the buffer is left untouched.
-
-     gzgets returns buf which is a null-terminated string, or it returns NULL
-   for end-of-file or in case of error.  If there was an error, the contents at
-   buf are indeterminate.
-*/
-
-ZEXTERN int ZEXPORT gzputc OF((gzFile file, int c));
-/*
-     Writes c, converted to an unsigned char, into the compressed file.  gzputc
-   returns the value that was written, or -1 in case of error.
-*/
-
-ZEXTERN int ZEXPORT gzgetc OF((gzFile file));
-/*
-     Reads one byte from the compressed file.  gzgetc returns this byte or -1
-   in case of end of file or error.  This is implemented as a macro for speed.
-   As such, it does not do all of the checking the other functions do.  I.e.
-   it does not check to see if file is NULL, nor whether the structure file
-   points to has been clobbered or not.
-*/
-
-ZEXTERN int ZEXPORT gzungetc OF((int c, gzFile file));
-/*
-     Push one character back onto the stream to be read as the first character
-   on the next read.  At least one character of push-back is allowed.
-   gzungetc() returns the character pushed, or -1 on failure.  gzungetc() will
-   fail if c is -1, and may fail if a character has been pushed but not read
-   yet.  If gzungetc is used immediately after gzopen or gzdopen, at least the
-   output buffer size of pushed characters is allowed.  (See gzbuffer above.)
-   The pushed character will be discarded if the stream is repositioned with
-   gzseek() or gzrewind().
-*/
-
-ZEXTERN int ZEXPORT gzflush OF((gzFile file, int flush));
-/*
-     Flushes all pending output into the compressed file.  The parameter flush
-   is as in the deflate() function.  The return value is the zlib error number
-   (see function gzerror below).  gzflush is only permitted when writing.
-
-     If the flush parameter is Z_FINISH, the remaining data is written and the
-   gzip stream is completed in the output.  If gzwrite() is called again, a new
-   gzip stream will be started in the output.  gzread() is able to read such
-   concatented gzip streams.
-
-     gzflush should be called only when strictly necessary because it will
-   degrade compression if called too often.
-*/
-
-/*
-ZEXTERN z_off_t ZEXPORT gzseek OF((gzFile file,
-                                   z_off_t offset, int whence));
-
-     Sets the starting position for the next gzread or gzwrite on the given
-   compressed file.  The offset represents a number of bytes in the
-   uncompressed data stream.  The whence parameter is defined as in lseek(2);
-   the value SEEK_END is not supported.
-
-     If the file is opened for reading, this function is emulated but can be
-   extremely slow.  If the file is opened for writing, only forward seeks are
-   supported; gzseek then compresses a sequence of zeroes up to the new
-   starting position.
-
-     gzseek returns the resulting offset location as measured in bytes from
-   the beginning of the uncompressed stream, or -1 in case of error, in
-   particular if the file is opened for writing and the new starting position
-   would be before the current position.
-*/
-
-ZEXTERN int ZEXPORT    gzrewind OF((gzFile file));
-/*
-     Rewinds the given file. This function is supported only for reading.
-
-     gzrewind(file) is equivalent to (int)gzseek(file, 0L, SEEK_SET)
-*/
-
-/*
-ZEXTERN z_off_t ZEXPORT    gztell OF((gzFile file));
-
-     Returns the starting position for the next gzread or gzwrite on the given
-   compressed file.  This position represents a number of bytes in the
-   uncompressed data stream, and is zero when starting, even if appending or
-   reading a gzip stream from the middle of a file using gzdopen().
-
-     gztell(file) is equivalent to gzseek(file, 0L, SEEK_CUR)
-*/
-
-/*
-ZEXTERN z_off_t ZEXPORT gzoffset OF((gzFile file));
-
-     Returns the current offset in the file being read or written.  This offset
-   includes the count of bytes that precede the gzip stream, for example when
-   appending or when using gzdopen() for reading.  When reading, the offset
-   does not include as yet unused buffered input.  This information can be used
-   for a progress indicator.  On error, gzoffset() returns -1.
-*/
-
-ZEXTERN int ZEXPORT gzeof OF((gzFile file));
-/*
-     Returns true (1) if the end-of-file indicator has been set while reading,
-   false (0) otherwise.  Note that the end-of-file indicator is set only if the
-   read tried to go past the end of the input, but came up short.  Therefore,
-   just like feof(), gzeof() may return false even if there is no more data to
-   read, in the event that the last read request was for the exact number of
-   bytes remaining in the input file.  This will happen if the input file size
-   is an exact multiple of the buffer size.
-
-     If gzeof() returns true, then the read functions will return no more data,
-   unless the end-of-file indicator is reset by gzclearerr() and the input file
-   has grown since the previous end of file was detected.
-*/
-
-ZEXTERN int ZEXPORT gzdirect OF((gzFile file));
-/*
-     Returns true (1) if file is being copied directly while reading, or false
-   (0) if file is a gzip stream being decompressed.
-
-     If the input file is empty, gzdirect() will return true, since the input
-   does not contain a gzip stream.
-
-     If gzdirect() is used immediately after gzopen() or gzdopen() it will
-   cause buffers to be allocated to allow reading the file to determine if it
-   is a gzip file.  Therefore if gzbuffer() is used, it should be called before
-   gzdirect().
-
-     When writing, gzdirect() returns true (1) if transparent writing was
-   requested ("wT" for the gzopen() mode), or false (0) otherwise.  (Note:
-   gzdirect() is not needed when writing.  Transparent writing must be
-   explicitly requested, so the application already knows the answer.  When
-   linking statically, using gzdirect() will include all of the zlib code for
-   gzip file reading and decompression, which may not be desired.)
-*/
-
-ZEXTERN int ZEXPORT    gzclose OF((gzFile file));
-/*
-     Flushes all pending output if necessary, closes the compressed file and
-   deallocates the (de)compression state.  Note that once file is closed, you
-   cannot call gzerror with file, since its structures have been deallocated.
-   gzclose must not be called more than once on the same file, just as free
-   must not be called more than once on the same allocation.
-
-     gzclose will return Z_STREAM_ERROR if file is not valid, Z_ERRNO on a
-   file operation error, Z_MEM_ERROR if out of memory, Z_BUF_ERROR if the
-   last read ended in the middle of a gzip stream, or Z_OK on success.
-*/
-
-ZEXTERN int ZEXPORT gzclose_r OF((gzFile file));
-ZEXTERN int ZEXPORT gzclose_w OF((gzFile file));
-/*
-     Same as gzclose(), but gzclose_r() is only for use when reading, and
-   gzclose_w() is only for use when writing or appending.  The advantage to
-   using these instead of gzclose() is that they avoid linking in zlib
-   compression or decompression code that is not used when only reading or only
-   writing respectively.  If gzclose() is used, then both compression and
-   decompression code will be included the application when linking to a static
-   zlib library.
-*/
-
-ZEXTERN const char * ZEXPORT gzerror OF((gzFile file, int *errnum));
-/*
-     Returns the error message for the last error which occurred on the given
-   compressed file.  errnum is set to zlib error number.  If an error occurred
-   in the file system and not in the compression library, errnum is set to
-   Z_ERRNO and the application may consult errno to get the exact error code.
-
-     The application must not modify the returned string.  Future calls to
-   this function may invalidate the previously returned string.  If file is
-   closed, then the string previously returned by gzerror will no longer be
-   available.
-
-     gzerror() should be used to distinguish errors from end-of-file for those
-   functions above that do not distinguish those cases in their return values.
-*/
-
-ZEXTERN void ZEXPORT gzclearerr OF((gzFile file));
-/*
-     Clears the error and end-of-file flags for file.  This is analogous to the
-   clearerr() function in stdio.  This is useful for continuing to read a gzip
-   file that is being written concurrently.
-*/
-
-#endif /* !Z_SOLO */
-
-                        /* checksum functions */
-
-/*
-     These functions are not related to compression but are exported
-   anyway because they might be useful in applications using the compression
-   library.
-*/
-
-ZEXTERN uLong ZEXPORT adler32 OF((uLong adler, const Bytef *buf, uInt len));
-/*
-     Update a running Adler-32 checksum with the bytes buf[0..len-1] and
-   return the updated checksum.  If buf is Z_NULL, this function returns the
-   required initial value for the checksum.
-
-     An Adler-32 checksum is almost as reliable as a CRC32 but can be computed
-   much faster.
-
-   Usage example:
-
-     uLong adler = adler32(0L, Z_NULL, 0);
-
-     while (read_buffer(buffer, length) != EOF) {
-       adler = adler32(adler, buffer, length);
-     }
-     if (adler != original_adler) error();
-*/
-
-/*
-ZEXTERN uLong ZEXPORT adler32_combine OF((uLong adler1, uLong adler2,
-                                          z_off_t len2));
-
-     Combine two Adler-32 checksums into one.  For two sequences of bytes, seq1
-   and seq2 with lengths len1 and len2, Adler-32 checksums were calculated for
-   each, adler1 and adler2.  adler32_combine() returns the Adler-32 checksum of
-   seq1 and seq2 concatenated, requiring only adler1, adler2, and len2.  Note
-   that the z_off_t type (like off_t) is a signed integer.  If len2 is
-   negative, the result has no meaning or utility.
-*/
-
-ZEXTERN uLong ZEXPORT crc32   OF((uLong crc, const Bytef *buf, uInt len));
-/*
-     Update a running CRC-32 with the bytes buf[0..len-1] and return the
-   updated CRC-32.  If buf is Z_NULL, this function returns the required
-   initial value for the crc.  Pre- and post-conditioning (one's complement) is
-   performed within this function so it shouldn't be done by the application.
-
-   Usage example:
-
-     uLong crc = crc32(0L, Z_NULL, 0);
-
-     while (read_buffer(buffer, length) != EOF) {
-       crc = crc32(crc, buffer, length);
-     }
-     if (crc != original_crc) error();
-*/
-
-/*
-ZEXTERN uLong ZEXPORT crc32_combine OF((uLong crc1, uLong crc2, z_off_t len2));
-
-     Combine two CRC-32 check values into one.  For two sequences of bytes,
-   seq1 and seq2 with lengths len1 and len2, CRC-32 check values were
-   calculated for each, crc1 and crc2.  crc32_combine() returns the CRC-32
-   check value of seq1 and seq2 concatenated, requiring only crc1, crc2, and
-   len2.
-*/
-
-
-                        /* various hacks, don't look :) */
-
-/* deflateInit and inflateInit are macros to allow checking the zlib version
- * and the compiler's view of z_stream:
- */
-ZEXTERN int ZEXPORT deflateInit_ OF((z_streamp strm, int level,
-                                     const char *version, int stream_size));
-ZEXTERN int ZEXPORT inflateInit_ OF((z_streamp strm,
-                                     const char *version, int stream_size));
-ZEXTERN int ZEXPORT deflateInit2_ OF((z_streamp strm, int  level, int  method,
-                                      int windowBits, int memLevel,
-                                      int strategy, const char *version,
-                                      int stream_size));
-ZEXTERN int ZEXPORT inflateInit2_ OF((z_streamp strm, int  windowBits,
-                                      const char *version, int stream_size));
-ZEXTERN int ZEXPORT inflateBackInit_ OF((z_streamp strm, int windowBits,
-                                         unsigned char FAR *window,
-                                         const char *version,
-                                         int stream_size));
-#define deflateInit(strm, level) \
-        deflateInit_((strm), (level), ZLIB_VERSION, (int)sizeof(z_stream))
-#define inflateInit(strm) \
-        inflateInit_((strm), ZLIB_VERSION, (int)sizeof(z_stream))
-#define deflateInit2(strm, level, method, windowBits, memLevel, strategy) \
-        deflateInit2_((strm),(level),(method),(windowBits),(memLevel),\
-                      (strategy), ZLIB_VERSION, (int)sizeof(z_stream))
-#define inflateInit2(strm, windowBits) \
-        inflateInit2_((strm), (windowBits), ZLIB_VERSION, \
-                      (int)sizeof(z_stream))
-#define inflateBackInit(strm, windowBits, window) \
-        inflateBackInit_((strm), (windowBits), (window), \
-                      ZLIB_VERSION, (int)sizeof(z_stream))
-
-#ifndef Z_SOLO
-
-/* gzgetc() macro and its supporting function and exposed data structure.  Note
- * that the real internal state is much larger than the exposed structure.
- * This abbreviated structure exposes just enough for the gzgetc() macro.  The
- * user should not mess with these exposed elements, since their names or
- * behavior could change in the future, perhaps even capriciously.  They can
- * only be used by the gzgetc() macro.  You have been warned.
- */
-struct gzFile_s {
-    unsigned have;
-    unsigned char *next;
-    z_off64_t pos;
-};
-ZEXTERN int ZEXPORT gzgetc_ OF((gzFile file));  /* backward compatibility */
-#ifdef Z_PREFIX_SET
-#  undef z_gzgetc
-#  define z_gzgetc(g) \
-          ((g)->have ? ((g)->have--, (g)->pos++, *((g)->next)++) : gzgetc(g))
-#else
-#  define gzgetc(g) \
-          ((g)->have ? ((g)->have--, (g)->pos++, *((g)->next)++) : gzgetc(g))
-#endif
-
-/* provide 64-bit offset functions if _LARGEFILE64_SOURCE defined, and/or
- * change the regular functions to 64 bits if _FILE_OFFSET_BITS is 64 (if
- * both are true, the application gets the *64 functions, and the regular
- * functions are changed to 64 bits) -- in case these are set on systems
- * without large file support, _LFS64_LARGEFILE must also be true
- */
-#ifdef Z_LARGE64
-   ZEXTERN gzFile ZEXPORT gzopen64 OF((const char *, const char *));
-   ZEXTERN z_off64_t ZEXPORT gzseek64 OF((gzFile, z_off64_t, int));
-   ZEXTERN z_off64_t ZEXPORT gztell64 OF((gzFile));
-   ZEXTERN z_off64_t ZEXPORT gzoffset64 OF((gzFile));
-   ZEXTERN uLong ZEXPORT adler32_combine64 OF((uLong, uLong, z_off64_t));
-   ZEXTERN uLong ZEXPORT crc32_combine64 OF((uLong, uLong, z_off64_t));
-#endif
-
-#if !defined(ZLIB_INTERNAL) && defined(Z_WANT64)
-#  ifdef Z_PREFIX_SET
-#    define z_gzopen z_gzopen64
-#    define z_gzseek z_gzseek64
-#    define z_gztell z_gztell64
-#    define z_gzoffset z_gzoffset64
-#    define z_adler32_combine z_adler32_combine64
-#    define z_crc32_combine z_crc32_combine64
-#  else
-#    define gzopen gzopen64
-#    define gzseek gzseek64
-#    define gztell gztell64
-#    define gzoffset gzoffset64
-/* R change */
-#    undef  adler32_combine
-#    define adler32_combine Rz_adler32_combine64
-#    undef  crc32_combine
-#    define crc32_combine Rz_crc32_combine64
-#  endif
-#  ifndef Z_LARGE64
-     ZEXTERN gzFile ZEXPORT gzopen64 OF((const char *, const char *));
-     ZEXTERN z_off_t ZEXPORT gzseek64 OF((gzFile, z_off_t, int));
-     ZEXTERN z_off_t ZEXPORT gztell64 OF((gzFile));
-     ZEXTERN z_off_t ZEXPORT gzoffset64 OF((gzFile));
-     ZEXTERN uLong ZEXPORT adler32_combine64 OF((uLong, uLong, z_off_t));
-     ZEXTERN uLong ZEXPORT crc32_combine64 OF((uLong, uLong, z_off_t));
-#  endif
-#else
-   ZEXTERN gzFile ZEXPORT gzopen OF((const char *, const char *));
-   ZEXTERN z_off_t ZEXPORT gzseek OF((gzFile, z_off_t, int));
-   ZEXTERN z_off_t ZEXPORT gztell OF((gzFile));
-   ZEXTERN z_off_t ZEXPORT gzoffset OF((gzFile));
-   ZEXTERN uLong ZEXPORT adler32_combine OF((uLong, uLong, z_off_t));
-   ZEXTERN uLong ZEXPORT crc32_combine OF((uLong, uLong, z_off_t));
-#endif
-
-#else /* Z_SOLO */
-
-   ZEXTERN uLong ZEXPORT adler32_combine OF((uLong, uLong, z_off_t));
-   ZEXTERN uLong ZEXPORT crc32_combine OF((uLong, uLong, z_off_t));
-
-#endif /* !Z_SOLO */
-
-/* hack for buggy compilers */
-#if !defined(ZUTIL_H) && !defined(NO_DUMMY_DECL)
-    struct internal_state {int dummy;};
-#endif
-
-/* undocumented functions */
-ZEXTERN const char   * ZEXPORT zError           OF((int));
-ZEXTERN int            ZEXPORT inflateSyncPoint OF((z_streamp));
-ZEXTERN const z_crc_t FAR * ZEXPORT get_crc_table    OF((void));
-ZEXTERN int            ZEXPORT inflateUndermine OF((z_streamp, int));
-ZEXTERN int            ZEXPORT inflateResetKeep OF((z_streamp));
-ZEXTERN int            ZEXPORT deflateResetKeep OF((z_streamp));
-#if defined(_WIN32) && !defined(Z_SOLO)
-ZEXTERN gzFile         ZEXPORT gzopen_w OF((const wchar_t *path,
-                                            const char *mode));
-#endif
-#if defined(STDC) || defined(Z_HAVE_STDARG_H)
-#  ifndef Z_SOLO
-ZEXTERN int            ZEXPORTVA gzvprintf Z_ARG((gzFile file,
-                                                  const char *format,
-                                                  va_list va));
-#  endif
-#endif
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* ZLIB_H */
diff --git a/src/extra/zlib/zutil.c b/src/extra/zlib/zutil.c
deleted file mode 100644
index 3310c14..0000000
--- a/src/extra/zlib/zutil.c
+++ /dev/null
@@ -1,325 +0,0 @@
-/* zutil.c -- target dependent utility functions for the compression library
- * Copyright (C) 1995-2005, 2010, 2011, 2012 Jean-loup Gailly.
- * For conditions of distribution and use, see copyright notice in zlib.h
- */
-
-/* @(#) $Id$ */
-
-#include "zutil.h"
-#ifndef Z_SOLO
-/* R change */
-//#  include "gzguts.h"
-#endif
-
-#ifndef NO_DUMMY_DECL
-struct internal_state      {int dummy;}; /* for buggy compilers */
-#endif
-
-z_const char * const z_errmsg[10] = {
-"need dictionary",     /* Z_NEED_DICT       2  */
-"stream end",          /* Z_STREAM_END      1  */
-"",                    /* Z_OK              0  */
-"file error",          /* Z_ERRNO         (-1) */
-"stream error",        /* Z_STREAM_ERROR  (-2) */
-"data error",          /* Z_DATA_ERROR    (-3) */
-"insufficient memory", /* Z_MEM_ERROR     (-4) */
-"buffer error",        /* Z_BUF_ERROR     (-5) */
-"incompatible version",/* Z_VERSION_ERROR (-6) */
-""};
-
-
-const char * ZEXPORT zlibVersion()
-{
-    return ZLIB_VERSION;
-}
-
-uLong ZEXPORT zlibCompileFlags()
-{
-    uLong flags;
-
-    flags = 0;
-    switch ((int)(sizeof(uInt))) {
-    case 2:     break;
-    case 4:     flags += 1;     break;
-    case 8:     flags += 2;     break;
-    default:    flags += 3;
-    }
-    switch ((int)(sizeof(uLong))) {
-    case 2:     break;
-    case 4:     flags += 1 << 2;        break;
-    case 8:     flags += 2 << 2;        break;
-    default:    flags += 3 << 2;
-    }
-    switch ((int)(sizeof(voidpf))) {
-    case 2:     break;
-    case 4:     flags += 1 << 4;        break;
-    case 8:     flags += 2 << 4;        break;
-    default:    flags += 3 << 4;
-    }
-    switch ((int)(sizeof(z_off_t))) {
-    case 2:     break;
-    case 4:     flags += 1 << 6;        break;
-    case 8:     flags += 2 << 6;        break;
-    default:    flags += 3 << 6;
-    }
-#ifdef DEBUG
-    flags += 1 << 8;
-#endif
-#if defined(ASMV) || defined(ASMINF)
-    flags += 1 << 9;
-#endif
-#ifdef ZLIB_WINAPI
-    flags += 1 << 10;
-#endif
-#ifdef BUILDFIXED
-    flags += 1 << 12;
-#endif
-#ifdef DYNAMIC_CRC_TABLE
-    flags += 1 << 13;
-#endif
-#ifdef NO_GZCOMPRESS
-    flags += 1L << 16;
-#endif
-#ifdef NO_GZIP
-    flags += 1L << 17;
-#endif
-#ifdef PKZIP_BUG_WORKAROUND
-    flags += 1L << 20;
-#endif
-#ifdef FASTEST
-    flags += 1L << 21;
-#endif
-#if defined(STDC) || defined(Z_HAVE_STDARG_H)
-#  ifdef NO_vsnprintf
-    flags += 1L << 25;
-#    ifdef HAS_vsprintf_void
-    flags += 1L << 26;
-#    endif
-#  else
-#    ifdef HAS_vsnprintf_void
-    flags += 1L << 26;
-#    endif
-#  endif
-#else
-    flags += 1L << 24;
-#  ifdef NO_snprintf
-    flags += 1L << 25;
-#    ifdef HAS_sprintf_void
-    flags += 1L << 26;
-#    endif
-#  else
-#    ifdef HAS_snprintf_void
-    flags += 1L << 26;
-#    endif
-#  endif
-#endif
-    return flags;
-}
-
-#ifdef DEBUG
-
-#  ifndef verbose
-#    define verbose 0
-#  endif
-int ZLIB_INTERNAL z_verbose = verbose;
-
-void ZLIB_INTERNAL z_error (m)
-    char *m;
-{
-    fprintf(stderr, "%s\n", m);
-    exit(1);
-}
-#endif
-
-/* exported to allow conversion of error code to string for compress() and
- * uncompress()
- */
-const char * ZEXPORT zError(err)
-    int err;
-{
-    return ERR_MSG(err);
-}
-
-#if defined(_WIN32_WCE)
-    /* The Microsoft C Run-Time Library for Windows CE doesn't have
-     * errno.  We define it as a global variable to simplify porting.
-     * Its value is always 0 and should not be used.
-     */
-    int errno = 0;
-#endif
-
-#ifndef HAVE_MEMCPY
-
-void ZLIB_INTERNAL zmemcpy(dest, source, len)
-    Bytef* dest;
-    const Bytef* source;
-    uInt  len;
-{
-    if (len == 0) return;
-    do {
-        *dest++ = *source++; /* ??? to be unrolled */
-    } while (--len != 0);
-}
-
-int ZLIB_INTERNAL zmemcmp(s1, s2, len)
-    const Bytef* s1;
-    const Bytef* s2;
-    uInt  len;
-{
-    uInt j;
-
-    for (j = 0; j < len; j++) {
-        if (s1[j] != s2[j]) return 2*(s1[j] > s2[j])-1;
-    }
-    return 0;
-}
-
-void ZLIB_INTERNAL zmemzero(dest, len)
-    Bytef* dest;
-    uInt  len;
-{
-    if (len == 0) return;
-    do {
-        *dest++ = 0;  /* ??? to be unrolled */
-    } while (--len != 0);
-}
-#endif
-
-#ifndef Z_SOLO
-
-#ifdef SYS16BIT
-
-#ifdef __TURBOC__
-/* Turbo C in 16-bit mode */
-
-#  define MY_ZCALLOC
-
-/* Turbo C malloc() does not allow dynamic allocation of 64K bytes
- * and farmalloc(64K) returns a pointer with an offset of 8, so we
- * must fix the pointer. Warning: the pointer must be put back to its
- * original form in order to free it, use zcfree().
- */
-
-#define MAX_PTR 10
-/* 10*64K = 640K */
-
-local int next_ptr = 0;
-
-typedef struct ptr_table_s {
-    voidpf org_ptr;
-    voidpf new_ptr;
-} ptr_table;
-
-local ptr_table table[MAX_PTR];
-/* This table is used to remember the original form of pointers
- * to large buffers (64K). Such pointers are normalized with a zero offset.
- * Since MSDOS is not a preemptive multitasking OS, this table is not
- * protected from concurrent access. This hack doesn't work anyway on
- * a protected system like OS/2. Use Microsoft C instead.
- */
-
-voidpf ZLIB_INTERNAL zcalloc (voidpf opaque, unsigned items, unsigned size)
-{
-    voidpf buf = opaque; /* just to make some compilers happy */
-    ulg bsize = (ulg)items*size;
-
-    /* If we allocate less than 65520 bytes, we assume that farmalloc
-     * will return a usable pointer which doesn't have to be normalized.
-     */
-    if (bsize < 65520L) {
-        buf = farmalloc(bsize);
-        if (*(ush*)&buf != 0) return buf;
-    } else {
-        buf = farmalloc(bsize + 16L);
-    }
-    if (buf == NULL || next_ptr >= MAX_PTR) return NULL;
-    table[next_ptr].org_ptr = buf;
-
-    /* Normalize the pointer to seg:0 */
-    *((ush*)&buf+1) += ((ush)((uch*)buf-0) + 15) >> 4;
-    *(ush*)&buf = 0;
-    table[next_ptr++].new_ptr = buf;
-    return buf;
-}
-
-void ZLIB_INTERNAL zcfree (voidpf opaque, voidpf ptr)
-{
-    int n;
-    if (*(ush*)&ptr != 0) { /* object < 64K */
-        farfree(ptr);
-        return;
-    }
-    /* Find the original pointer */
-    for (n = 0; n < next_ptr; n++) {
-        if (ptr != table[n].new_ptr) continue;
-
-        farfree(table[n].org_ptr);
-        while (++n < next_ptr) {
-            table[n-1] = table[n];
-        }
-        next_ptr--;
-        return;
-    }
-    ptr = opaque; /* just to make some compilers happy */
-    Assert(0, "zcfree: ptr not found");
-}
-
-#endif /* __TURBOC__ */
-
-
-#ifdef M_I86
-/* Microsoft C in 16-bit mode */
-
-#  define MY_ZCALLOC
-
-#if (!defined(_MSC_VER) || (_MSC_VER <= 600))
-#  define _halloc  halloc
-#  define _hfree   hfree
-#endif
-
-voidpf ZLIB_INTERNAL zcalloc (voidpf opaque, uInt items, uInt size)
-{
-    if (opaque) opaque = 0; /* to make compiler happy */
-    return _halloc((long)items, size);
-}
-
-void ZLIB_INTERNAL zcfree (voidpf opaque, voidpf ptr)
-{
-    if (opaque) opaque = 0; /* to make compiler happy */
-    _hfree(ptr);
-}
-
-#endif /* M_I86 */
-
-#endif /* SYS16BIT */
-
-
-#ifndef MY_ZCALLOC /* Any system without a special alloc function */
-
-#ifndef STDC
-extern voidp  malloc OF((uInt size));
-extern voidp  calloc OF((uInt items, uInt size));
-extern void   free   OF((voidpf ptr));
-#endif
-
-voidpf ZLIB_INTERNAL zcalloc (opaque, items, size)
-    voidpf opaque;
-    unsigned items;
-    unsigned size;
-{
-    if (opaque) items += size - size; /* make compiler happy */
-    return sizeof(uInt) > 2 ? (voidpf)malloc(items * size) :
-                              (voidpf)calloc(items, size);
-}
-
-void ZLIB_INTERNAL zcfree (opaque, ptr)
-    voidpf opaque;
-    voidpf ptr;
-{
-    free(ptr);
-    if (opaque) return; /* make compiler happy */
-}
-
-#endif /* MY_ZCALLOC */
-
-#endif /* !Z_SOLO */
diff --git a/src/extra/zlib/zutil.h b/src/extra/zlib/zutil.h
deleted file mode 100644
index 24ab06b..0000000
--- a/src/extra/zlib/zutil.h
+++ /dev/null
@@ -1,253 +0,0 @@
-/* zutil.h -- internal interface and configuration of the compression library
- * Copyright (C) 1995-2013 Jean-loup Gailly.
- * For conditions of distribution and use, see copyright notice in zlib.h
- */
-
-/* WARNING: this file should *not* be used by applications. It is
-   part of the implementation of the compression library and is
-   subject to change. Applications should only use zlib.h.
- */
-
-/* @(#) $Id$ */
-
-#ifndef ZUTIL_H
-#define ZUTIL_H
-
-#ifdef HAVE_HIDDEN
-#  define ZLIB_INTERNAL __attribute__((visibility ("hidden")))
-#else
-#  define ZLIB_INTERNAL
-#endif
-
-#include "zlib.h"
-
-#if defined(STDC) && !defined(Z_SOLO)
-#  if !(defined(_WIN32_WCE) && defined(_MSC_VER))
-#    include <stddef.h>
-#  endif
-#  include <string.h>
-#  include <stdlib.h>
-#endif
-
-#ifdef Z_SOLO
-   typedef long ptrdiff_t;  /* guess -- will be caught if guess is wrong */
-#endif
-
-#ifndef local
-#  define local static
-#endif
-/* compile with -Dlocal if your debugger can't find static symbols */
-
-typedef unsigned char  uch;
-typedef uch FAR uchf;
-typedef unsigned short ush;
-typedef ush FAR ushf;
-typedef unsigned long  ulg;
-
-extern z_const char * const z_errmsg[10]; /* indexed by 2-zlib_error */
-/* (size given to avoid silly warnings with Visual C++) */
-
-#define ERR_MSG(err) z_errmsg[Z_NEED_DICT-(err)]
-
-#define ERR_RETURN(strm,err) \
-  return (strm->msg = ERR_MSG(err), (err))
-/* To be used only when the state is known to be valid */
-
-        /* common constants */
-
-#ifndef DEF_WBITS
-#  define DEF_WBITS MAX_WBITS
-#endif
-/* default windowBits for decompression. MAX_WBITS is for compression only */
-
-#if MAX_MEM_LEVEL >= 8
-#  define DEF_MEM_LEVEL 8
-#else
-#  define DEF_MEM_LEVEL  MAX_MEM_LEVEL
-#endif
-/* default memLevel */
-
-#define STORED_BLOCK 0
-#define STATIC_TREES 1
-#define DYN_TREES    2
-/* The three kinds of block type */
-
-#define MIN_MATCH  3
-#define MAX_MATCH  258
-/* The minimum and maximum match lengths */
-
-#define PRESET_DICT 0x20 /* preset dictionary flag in zlib header */
-
-        /* target dependencies */
-
-#if defined(MSDOS) || (defined(WINDOWS) && !defined(WIN32))
-#  define OS_CODE  0x00
-#  ifndef Z_SOLO
-#    if defined(__TURBOC__) || defined(__BORLANDC__)
-#      if (__STDC__ == 1) && (defined(__LARGE__) || defined(__COMPACT__))
-         /* Allow compilation with ANSI keywords only enabled */
-         void _Cdecl farfree( void *block );
-         void *_Cdecl farmalloc( unsigned long nbytes );
-#      else
-#        include <alloc.h>
-#      endif
-#    else /* MSC or DJGPP */
-#      include <malloc.h>
-#    endif
-#  endif
-#endif
-
-#ifdef AMIGA
-#  define OS_CODE  0x01
-#endif
-
-#if defined(VAXC) || defined(VMS)
-#  define OS_CODE  0x02
-#  define F_OPEN(name, mode) \
-     fopen((name), (mode), "mbc=60", "ctx=stm", "rfm=fix", "mrs=512")
-#endif
-
-#if defined(ATARI) || defined(atarist)
-#  define OS_CODE  0x05
-#endif
-
-#ifdef OS2
-#  define OS_CODE  0x06
-#  if defined(M_I86) && !defined(Z_SOLO)
-#    include <malloc.h>
-#  endif
-#endif
-
-#if defined(MACOS) || defined(TARGET_OS_MAC)
-#  define OS_CODE  0x07
-#  ifndef Z_SOLO
-#    if defined(__MWERKS__) && __dest_os != __be_os && __dest_os != __win32_os
-#      include <unix.h> /* for fdopen */
-#    else
-#      ifndef fdopen
-#        define fdopen(fd,mode) NULL /* No fdopen() */
-#      endif
-#    endif
-#  endif
-#endif
-
-#ifdef TOPS20
-#  define OS_CODE  0x0a
-#endif
-
-#ifdef WIN32
-#  ifndef __CYGWIN__  /* Cygwin is Unix, not Win32 */
-#    define OS_CODE  0x0b
-#  endif
-#endif
-
-#ifdef __50SERIES /* Prime/PRIMOS */
-#  define OS_CODE  0x0f
-#endif
-
-#if defined(_BEOS_) || defined(RISCOS)
-#  define fdopen(fd,mode) NULL /* No fdopen() */
-#endif
-
-#if (defined(_MSC_VER) && (_MSC_VER > 600)) && !defined __INTERIX
-#  if defined(_WIN32_WCE)
-#    define fdopen(fd,mode) NULL /* No fdopen() */
-#    ifndef _PTRDIFF_T_DEFINED
-       typedef int ptrdiff_t;
-#      define _PTRDIFF_T_DEFINED
-#    endif
-#  else
-#    define fdopen(fd,type)  _fdopen(fd,type)
-#  endif
-#endif
-
-#if defined(__BORLANDC__) && !defined(MSDOS)
-  #pragma warn -8004
-  #pragma warn -8008
-  #pragma warn -8066
-#endif
-
-/* provide prototypes for these when building zlib without LFS */
-#if !defined(_WIN32) && \
-    (!defined(_LARGEFILE64_SOURCE) || _LFS64_LARGEFILE-0 == 0)
-    ZEXTERN uLong ZEXPORT adler32_combine64 OF((uLong, uLong, z_off_t));
-    ZEXTERN uLong ZEXPORT crc32_combine64 OF((uLong, uLong, z_off_t));
-#endif
-
-        /* common defaults */
-
-#ifndef OS_CODE
-#  define OS_CODE  0x03  /* assume Unix */
-#endif
-
-#ifndef F_OPEN
-#  define F_OPEN(name, mode) fopen((name), (mode))
-#endif
-
-         /* functions */
-
-#if defined(pyr) || defined(Z_SOLO)
-#  define NO_MEMCPY
-#endif
-#if defined(SMALL_MEDIUM) && !defined(_MSC_VER) && !defined(__SC__)
- /* Use our own functions for small and medium model with MSC <= 5.0.
-  * You may have to use the same strategy for Borland C (untested).
-  * The __SC__ check is for Symantec.
-  */
-#  define NO_MEMCPY
-#endif
-#if defined(STDC) && !defined(HAVE_MEMCPY) && !defined(NO_MEMCPY)
-#  define HAVE_MEMCPY
-#endif
-#ifdef HAVE_MEMCPY
-#  ifdef SMALL_MEDIUM /* MSDOS small or medium model */
-#    define zmemcpy _fmemcpy
-#    define zmemcmp _fmemcmp
-#    define zmemzero(dest, len) _fmemset(dest, 0, len)
-#  else
-#    define zmemcpy memcpy
-#    define zmemcmp memcmp
-#    define zmemzero(dest, len) memset(dest, 0, len)
-#  endif
-#else
-   void ZLIB_INTERNAL zmemcpy OF((Bytef* dest, const Bytef* source, uInt len));
-   int ZLIB_INTERNAL zmemcmp OF((const Bytef* s1, const Bytef* s2, uInt len));
-   void ZLIB_INTERNAL zmemzero OF((Bytef* dest, uInt len));
-#endif
-
-/* Diagnostic functions */
-#ifdef DEBUG
-#  include <stdio.h>
-   extern int ZLIB_INTERNAL z_verbose;
-   extern void ZLIB_INTERNAL z_error OF((char *m));
-#  define Assert(cond,msg) {if(!(cond)) z_error(msg);}
-#  define Trace(x) {if (z_verbose>=0) fprintf x ;}
-#  define Tracev(x) {if (z_verbose>0) fprintf x ;}
-#  define Tracevv(x) {if (z_verbose>1) fprintf x ;}
-#  define Tracec(c,x) {if (z_verbose>0 && (c)) fprintf x ;}
-#  define Tracecv(c,x) {if (z_verbose>1 && (c)) fprintf x ;}
-#else
-#  define Assert(cond,msg)
-#  define Trace(x)
-#  define Tracev(x)
-#  define Tracevv(x)
-#  define Tracec(c,x)
-#  define Tracecv(c,x)
-#endif
-
-#ifndef Z_SOLO
-   voidpf ZLIB_INTERNAL zcalloc OF((voidpf opaque, unsigned items,
-                                    unsigned size));
-   void ZLIB_INTERNAL zcfree  OF((voidpf opaque, voidpf ptr));
-#endif
-
-#define ZALLOC(strm, items, size) \
-           (*((strm)->zalloc))((strm)->opaque, (items), (size))
-#define ZFREE(strm, addr)  (*((strm)->zfree))((strm)->opaque, (voidpf)(addr))
-#define TRY_FREE(s, p) {if (p) ZFREE(s, p);}
-
-/* Reverse the bytes in a 32-bit value */
-#define ZSWAP32(q) ((((q) >> 24) & 0xff) + (((q) >> 8) & 0xff00) + \
-                    (((q) & 0xff00) << 8) + (((q) & 0xff) << 24))
-
-#endif /* ZUTIL_H */
diff --git a/src/gnuwin32/CHANGES.Rd b/src/gnuwin32/CHANGES.Rd
index 0877652..047d045 100644
--- a/src/gnuwin32/CHANGES.Rd
+++ b/src/gnuwin32/CHANGES.Rd
@@ -1,7 +1,3 @@
-\newcommand{\PR}{\Sexpr[results=rd]{tools:::Rd_expr_PR(#1)}}
-\newcommand{\CRANpkg}{\href{http://CRAN.R-project.org/package=#1}{\pkg{#1}}}
-\newcommand{\sspace}{\ifelse{latex}{\out{~}}{ }}
-
 \name{CHANGES}
 \title{Windows-specific changes to R}
 \encoding{UTF-8}
diff --git a/src/gnuwin32/COPYRIGHTS.win b/src/gnuwin32/COPYRIGHTS.win
index 5fc0581..320981f 100644
--- a/src/gnuwin32/COPYRIGHTS.win
+++ b/src/gnuwin32/COPYRIGHTS.win
@@ -49,7 +49,7 @@ Based on files which are
 
 R_HOME/Tcl:
 
-Files compiled and installed from Tcl 8.5.8 and Tk 8.5.8.
+Files compiled and installed from Tcl 8.6.4 and Tk 8.6.4.
 see R_HOME/Tcl/license.terms for the license.
 
     This software is copyrighted by the Regents of the University of
@@ -124,9 +124,10 @@ at http://www.murdoch-sutherland.com/Rtools/;
 http://www.murdoch-sutherland.com/Rtools/Rtools.txt lists the current
 contents.
 
-The build of Tcl/Tk contained in the binary installer is taken via
-Rtools from http://www.stats.ox.ac.uk/pub/Rtools/, which hosts the
-sources used and links to the scripts used for the build.
+The build of Tcl/Tk contained in the binary installer was produced
+by Adrian Waddell; see https://github.com/waddella/Tclbuild for 
+instructions.  Sources are available via links on that page, or on
+request from R-windows at r-project.org.
 
 Rbitmap.dll is built against static libraries for libpng, jpeg and
 libtiff: the Makefiles and configuration headers used are in the
@@ -136,10 +137,10 @@ will need to specify which binary installer version).
 
 A binay build may contain compiled sources from cairographics,
 distributed under LGPL 2.1 (our choice) or MPL 1.1.  The binary
-distribution used is that at http://www.rforge.net/Cairo/files/ .
+distribution used is that at https://www.rforge.net/Cairo/files/ .
 
 A binary build may contain compiled components from ICU, whose license
 can be viewed at
-http://source.icu-project.org/repos/icu/icu/trunk/license.html: the
+http://source.icu-project.org/repos/icu/icu/trunk/LICENSE: the
 sources and binary libraries used are available at
 http://www.stats.ox.ac.uk/pub/Rtools/ .
diff --git a/src/gnuwin32/Maintainers.notes b/src/gnuwin32/Maintainers.notes
index 421eb69..4f8301a 100644
--- a/src/gnuwin32/Maintainers.notes
+++ b/src/gnuwin32/Maintainers.notes
@@ -40,7 +40,7 @@ DJM 2003-02-25
 
 3) Making Tcl/Tk.
 
-See the directory R-Tcl-win in the R-packages SVN repository.
+See https://github.com/waddella/Tclbuild.
 
 
 4) Linking to DLLs.
diff --git a/src/gnuwin32/Makefile b/src/gnuwin32/Makefile
index 5641202..d47d5da 100644
--- a/src/gnuwin32/Makefile
+++ b/src/gnuwin32/Makefile
@@ -1,11 +1,12 @@
+R_HOME = ../..
+
 ## first time through MkRules will not exist.
+
 ifeq ($(wildcard MkRules?local),MkRules.local)
 include MkRules.local
-else
-include MkRules.dist
 endif
-include MkRules.rules
 
+include MkRules.rules
 include ../../share/make/vars.mk
 
 MK = $(MAKE) --no-print-directory
@@ -36,62 +37,58 @@ bytecode-base:
 
 
 rpackages:
-	@$(MK) -C ../library -f Makefile.win all WIN=$(WIN)
+	@$(MK) -C ../library -f Makefile.win all WIN=$(WIN) EXT_LIBS="$(EXT_LIBS)"
 	@$(MK) -C ../library -f Makefile.win docs
 
 
-## must come after bitmapdll
 cairodevices:
 ifneq "$(CAIRO_HOME)" ""
-	@$(MK) -C ../library/grDevices/src/cairo -f Makefile.win all WIN=$(WIN) CAIRO_HOME=$(CAIRO_HOME) CAIRO_TYPE=$(CAIRO_TYPE)
+	@$(MK) -C ../library/grDevices/src/cairo -f Makefile.win all \
+	  WIN=$(WIN) CAIRO_HOME=$(CAIRO_HOME)
 endif
 
 ifeq ($(wildcard MkRules?local),MkRules.local)
 MkRules: MkRules.local MkRules.rules
-	cat MkRules.local MkRules.rules > MkRules
+	@cat MkRules.local MkRules.rules > MkRules
 else
-MkRules: MkRules.dist MkRules.rules
-	cat MkRules.dist MkRules.rules > MkRules
+MkRules: MkRules.rules
+	@cat MkRules.rules > MkRules
 endif
 
-CFLAGS=-O3 -Wall -pedantic $(EOPTS)
-FFLAGS=-O3 $(EOPTS)
+CFLAGS = -O3 -Wall -pedantic $(EOPTS)
+FFLAGS = -O3 $(EOPTS)
 ifdef DEBUG
- CFLAGS+=$(G_FLAG)
- FFLAGS+=$(G_FLAG)
- DLLFLAGS=
+ CFLAGS += $(G_FLAG)
+ FFLAGS += $(G_FLAG)
+ DLLFLAGS =
 else
- DLLFLAGS=-s
+ DLLFLAGS = -s
 endif
 
 
-R-DLLFLAGS=-mwindows
+R-DLLFLAGS = -mwindows
+LIBEXTRAS = -L"$(EXT_LIBS)"/lib$(R_ARCH) -lpcre -lz -lbz2 -llzma
 ifdef USE_ICU
-LIBEXTRAS+= -L$(ICU_PATH)/lib$(R_ARCH) $(ICU_LIBS)
+LIBEXTRAS += -L"$(ICU_PATH)"/lib$(R_ARCH) $(ICU_LIBS)
 endif
 
-R-DLLLIBS =$(OPENMP) -L. $(FLIBS) -lRblas -L../../$(IMPDIR) -lRzlib -lRgraphapp -lRiconv -lcomctl32 -lversion $(LIBEXTRAS)
-dllversion-RESFLAGS =-I../include
+dllversion-RESFLAGS = -I../include
 CSOURCES = \
-  console.c dynload.c editor.c embeddedR.c extra.c \
+  console.c dynload.c editor.c embeddedR.c extra.c malloc.c \
   opt.c pager.c preferences.c psignal.c rhome.c rt_complete.c \
   rui.c run.c shext.c sys-win32.c system.c dos_wglob.c
-OBJS = $(CSOURCES:.c=.o)
+OBJS = $(CSOURCES:.c=.o) dllversion.o
 ifeq "$(WIN)" "32"
  OBJS += e_pow.o
 endif
 MAINLIBS = ../main/libmain.a ../appl/libappl.a ../nmath/libnmath.a
 EXTRALIBS = getline/gl.a ../extra/xdr/libxdr.a \
-   ../extra/pcre/libpcre.a ../extra/bzip2/libbz2.a \
    ../extra/intl/libintl.a ../extra/trio/libtrio.a ../extra/tzone/libtz.a \
-   ../extra/tre/libtre.a ../extra/xz/liblzma.a
+   ../extra/tre/libtre.a
+
+R-DLLLIBS = $(OPENMP) -L. $(FLIBS) -lRblas -L../../$(IMPDIR) -lRgraphapp \
+  -lRiconv -lcomctl32 -lversion $(LIBEXTRAS)
 
-# flags to ensure that Doug Lea's malloc is used:
-ifdef LEA_MALLOC
-extra-CFLAGS+=-DLEA_MALLOC
-OBJS-EXTRA=malloc.o
-malloc-DEFS=-DLEA_MALLOC
-endif
 
 .PHONY:  clean veryclean rlibs fixfiles front-ends rmodules
 
@@ -99,6 +96,12 @@ endif
 CPPFLAGS = -I../include -I. -I../extra -DHAVE_CONFIG_H -DR_DLL_BUILD
 extra-CPPFLAGS = -I../library/grDevices/src
 
+Rpwd.exe: front-ends/Rpwd.exe
+	$(CP) $< $@
+
+front-ends/Rpwd.exe:
+	$(MK) -C front-ends Rpwd
+
 ## watch out: R.dll and Rblas.dll depend on each other.
 rbuild:
 	@$(MK) fixfiles
@@ -122,7 +125,7 @@ rlibs:
 	$(MK) -C ../nmath CFLAGS='$(CFLAGS)' FFLAGS='${FFLAGS}' -f Makefile.win
 	$(MK) -C ../main CFLAGS='$(CFLAGS)' FFLAGS='$(FFLAGS)' malloc-DEFS='$(malloc-DEFS)' -f Makefile.win
 	$(MK) -C ./getline CFLAGS='$(CFLAGS)'
-	@for ex in graphapp pcre bzip2 zlib xdr tre trio tzone win_iconv xz; do \
+	@for ex in graphapp xdr tre trio tzone win_iconv ; do \
 	  $(MK) -C ../extra/$${ex} CFLAGS='$(CFLAGS)' -f Makefile.win || exit 1; \
 	done
 
@@ -135,9 +138,14 @@ COPYRIGHTS: ../../doc/COPYRIGHTS COPYRIGHTS.win
 	cat $^ > $@
 
 
-fixfiles: 
+fixfiles: Rpwd.exe
 	@$(MKDIR) -p ../../$(BINDIR)
 	@$(MK) -C ./fixed
+ifdef USE_LIBCURL
+	@if test -f "$(CURL_PATH)/etc/curl-ca-bundle.crt"; then \
+	  $(CP) -p "$(CURL_PATH)/etc/curl-ca-bundle.crt" ../../etc; \
+	fi
+endif
 
 fixed/fixdesc:
 	@sh fixed/GETDESC $(R_PKGS_BASE) translations
@@ -146,7 +154,7 @@ dllversion.o: ../include/Rversion.h
 
 ## Rdll.hide has decoration which 64-bit builds lack
 ifeq "$(WIN)" "64"
-R.dll: $(OBJS) $(OBJS-EXTRA) $(MAINLIBS) $(EXTRALIBS) dllversion.o
+R.dll: $(OBJS) $(MAINLIBS) $(EXTRALIBS)
 	@$(ECHO) EXPORTS > R.def
 	@$(NM) $^ | $(SED) -n  $(SYMPAT) | LC_COLLATE=C $(SORT) | \
 	  uniq $(NM_FILTER) > R0.def
@@ -155,7 +163,7 @@ R.dll: $(OBJS) $(OBJS-EXTRA) $(MAINLIBS) $(EXTRALIBS) dllversion.o
 	$(DLL) -shared $(DLLFLAGS) $($*-DLLFLAGS) -o $@ R.def $^ $($*-DLLLIBS) $(DLLLIBS)
 	@$(RM) R.def R0.def R1.def
 else
-R.dll: $(OBJS) $(OBJS-EXTRA) $(MAINLIBS) $(EXTRALIBS) dllversion.o
+R.dll: $(OBJS) $(MAINLIBS) $(EXTRALIBS)
 	@$(ECHO) EXPORTS > R.def
 	@$(NM) $^ | $(SED) -n  $(SYMPAT) | LC_COLLATE=C $(SORT) | uniq > R0.def
 	@LC_COLLATE=C $(SORT) Rdll.hide > R1.def
@@ -164,7 +172,7 @@ R.dll: $(OBJS) $(OBJS-EXTRA) $(MAINLIBS) $(EXTRALIBS) dllversion.o
 	@$(RM) R.def R0.def R1.def
 endif
 
-R.exp: $(OBJS) $(OBJS-EXTRA) $(MAINLIBS) $(EXTRALIBS) dllversion.o
+R.exp: $(OBJS) $(MAINLIBS) $(EXTRALIBS)
 	@$(ECHO) LIBRARY R.dll > R.exp
 	@$(ECHO) EXPORTS >> R.exp
 	@$(NM) $^ | $(SED) -n $(SYMPAT) | LC_COLLATE=C $(SORT) | \
@@ -202,24 +210,12 @@ libRiconv.dll.a: unicode/iconv.def
 front-ends:
 	$(MK) -C front-ends
 
-../extra/zlib/libz.a:
-	$(MK) -C ../extra/zlib -f Makefile.win
-
-../extra/pcre/libpcre.a:
-	$(MK) -C ../extra/pcre -f Makefile.win
-
 ../extra/tre/libtre.a:
 	$(MK) -C ../extra/tre -f Makefile.win
 
-../extra/bzip2/libbz2.a:
-	$(MK) -C ../extra/bzip2  -f Makefile.win libbz2.a
-
 ../extra/trio/libtrio.a:
 	$(MK) -C ../extra/trio -f Makefile.win
 
-../extra/xz/liblzma.a:
-	$(MK) -C ../extra/xz -f Makefile.win
-
 NEWSdocs:
 	@$(MK) -C ../../doc -f Makefile.win
 
@@ -245,11 +241,11 @@ libRblas.dll.a:  ../extra/blas/Rblas.def
 #                          ===== cleaning ======
 
 ## used in installer/Makefile
-PKGDIR=../library
+PKGDIR = ../library
 pkgclean-%:
 	@(cd $(PKGDIR)/$*/src; rm -f *.d *.o *.dll *_res.rc Makedeps)
 
-EXTRA_DIRS = blas bzip2 graphapp intl pcre tre trio tzone xdr xz win_iconv zlib
+EXTRA_DIRS = blas graphapp intl tre trio tzone xdr win_iconv
 
 clean: cleanwin
 	@$(MAKE) -C ../library -f Makefile.win clean
@@ -262,7 +258,7 @@ clean: cleanwin
 	-$(MK) -C ../modules -f Makefile.win clean
 	-$(MK) -C ../../tests -f Makefile.win clean
 	-$(MK) -C ../library/Recommended -f Makefile.win clean
-	$(RM) -f ../library/methods/all.R
+	$(RM) -f ../library/methods/all.R ../../etc/curl-ca-bundle.crt
 
 distclean: clean
 	@for d in $(EXTRA_DIRS); do \
@@ -272,7 +268,7 @@ distclean: clean
 	$(RM) -R ../../bin ../../include ../../lib ../../library ../../modules
 	$(RM) ../include/config.h ../include/iconv.h ../include/psignal.h \
 	../include/Rconfig.h ../include/Rversion.h ../include/Rmath.h \
-	../include/libintl.h
+	../include/libintl.h ../include/trioremap.h
 	$(RM) ../library/*/src/*.o ../library/*/src/*.a
 	$(RM) ../library/*/src/*.d ../library/*/src/Makedeps
 	$(RM) ../library/*/src/*.dll
@@ -318,7 +314,6 @@ cleanwin: MkRules fixfiles
 	$(MAKE) -C fixed clean
 	$(MAKE) -C getline clean
 	$(MAKE) -C front-ends clean
-	$(MAKE) -C bitmap clean
 	$(MAKE) -C ../library/grDevices/src/cairo -f Makefile.win clean WIN=$(WIN)
 	-$(MAKE) -C installer clean
 
@@ -367,17 +362,25 @@ recommended:
 	@$(ECHO) "--- Making recommended packages"
 	@$(MK) -C ../library/Recommended -f Makefile.win
 
+## Note that R_COMPILER_SUPPRESS_ALL is now on by default
 bytecode-recommended:
 	@$(ECHO) "--- Making and compiling recommended packages"
 	@rm ../library/Recommended/*.ts
 	@R_COMPILE_PKGS=1 R_COMPILER_SUPPRESS_ALL=1 \
 	  $(MK) -C ../library/Recommended -f Makefile.win
 
+RVER-MAJOR-MINOR = $(shell echo `cut -d'.' -f1,2 ../../VERSION`)
+CRANEXT = cran.r-project.org::CRAN/bin/windows/extsoft/$(RVER-MAJOR-MINOR)/
+
+rsync-extsoft:
+	($(MKDIR) -p ../../extsoft; \
+	cd ../../extsoft; \
+	rsync --timeout=60 -rcvp --delete $(CRANEXT) . ) 
+
+
 docfiles:
 	@$(MK) -C ../../doc/manual -f Makefile.win FAQ
 
-bitmapdll:
-	@$(MAKE) -C bitmap
 
 EXTRA_PKGS=
 rinstaller:
@@ -391,7 +394,6 @@ endif
 
 distribution:
 	@$(MK) all
-	@$(MK) bitmapdll
 	@$(MK) cairodevices
 	@$(MK) recommended
 	@$(MK) vignettes
@@ -403,7 +405,6 @@ distribution:
 ## Builds what is needed in a 32-bit build to copy to 64/32-bit installer
 32-bit:
 	@$(MK) all
-	@$(MK) bitmapdll
 	@$(MK) cairodevices
 	@$(MK) recommended
 
@@ -411,7 +412,7 @@ distribution:
 ## ============= End of maintainer targets ========================
 
 # Dependencies: malloc.c doesn't have any
-DEPS=$(CSOURCES:.c=.d)
+DEPS = $(CSOURCES:.c=.d)
 
 makeMakedeps: $(DEPS)
 	@$(RM) Makedeps
diff --git a/src/gnuwin32/MkRules.dist b/src/gnuwin32/MkRules.dist
index 9a99723..2fa4f43 100644
--- a/src/gnuwin32/MkRules.dist
+++ b/src/gnuwin32/MkRules.dist
@@ -3,23 +3,30 @@
 ## This is only used when building R itself but it does customize
 ## etc/*/Makeconf using LOCAL_SOFT, BINPREF[64], IMPLIB and R_ARCH
 
+## Customize by copying to MkRules.local and uncommenting and editing 
+## some of the definitions there.  
+## 
+
 ## =========== configuration macros for building packages ================
 # Absolute path to '/usr/local' software collection.  The versions used
-# on CRAN can be found under http://www.stats.ox.ac.uk/pub/Rtools/goodies
+# on CRAN can be found at https://www.stats.ox.ac.uk/pub/Rtools/libs.html
 # It can be interrogated by 'R CMD config LOCAL_SOFT'
-LOCAL_SOFT =
+# Use 'make rsync-extsoft' to populate the default directory.
+# LOCAL_SOFT = $(R_HOME)/extsoft
 
 ## ============== configuration macros for building R ===================
 
-# an alternative is to use -gstabs here, if the debugger supports only stabs.
-G_FLAG=-gdwarf-2
+# Path of library directory containing zlib, bzlib, liblzma, pcre,
+# libpng, libjpeg, libtiff.
+# Use 'make rsync-extsoft' to populate the default directory.
+# EXT_LIBS = $(LOCAL_SOFT)
 
-# Comment out if the msvcrt.dll malloc/free is required (not tested recently)
-LEA_MALLOC=YES
+# an alternative is to use -gstabs here, if the debugger supports only stabs.
+# G_FLAG = -gdwarf-2
 
 # Set to YES and specify the path if you want to use the ATLAS BLAS.
-USE_ATLAS=NO
-ATLAS_PATH=/R/ATLAS/lib/WinNT_P4SSE2
+# USE_ATLAS = NO
+# ATLAS_PATH =
 
 # Support for the ACML and Goto BLASes has been withdrawn: see R-admin.html
 
@@ -27,110 +34,127 @@ ATLAS_PATH=/R/ATLAS/lib/WinNT_P4SSE2
 # checkout with no modifications).
 # USE_SVNVERSION = YES
 
-# With the recommended toolchain, set this to 32 or 64
-MULTI =
+# With the previously recommended gcc 4.6.3 toolchain, set this to 32 or 64
+# MULTI =
 # If the toolchain's bin directory is not in your path, set this to the path
 # (including the trailing /, and use / not \).
-TOOL_PATH =
+# TOOL_PATH =
 # for other toolchains leave these empty and set the more detailed options below
 
+# With the recommended gcc 4.9.3 toolchain or another toolchain, set 
+# BINPREF and BINPREF64 (below) to the respective bin directories.  
+# Include the trailing /, and use / not \.
+# Do this in the more detailed options below
+# Set this to 32 or 64
+# WIN = 32
+
 
 ### BEGIN more detailed options
 # Some of the toolchains have prefixes for e.g. ar, gcc.
 # This can also be used to give the full path to the compiler, 
-# including a trailing / .
-# prefix for 32-bit: path or i686-w64-mingw32-
-BINPREF =
-# prefix for 64-bit: path or x86_64-w64-mingw32-
-BINPREF64 = x86_64-w64-mingw32-
+# including a trailing / .  
+# BINPREF = c:/Rtools/mingw_32/bin/
+# prefix for 64-bit:
+# BINPREF64 = c:/Rtools/mingw_64/bin/
+# Set this to indicate a non-gcc compiler and version
+# COMPILED_BY = <determined automatically>
 
 # Others use a -m64 or -m32 option to select architectures
-M_ARCH =
+# M_ARCH =
 # and for as (--32 or --64)
-AS_ARCH =
+# AS_ARCH =
 # and for windres (-F pe-i386 or pe-x86-64)
-RC_ARCH =
+# RC_ARCH =
 # and for dlltool ("-m i386 --as-flags --32" vs "-m i386:x86-64 --as-flags --64")
-DT_ARCH =
+# DT_ARCH =
 
 # 32- or 64-bit Windows?
-WIN = 32
+# WIN = 32
+
+# The gcc 4.9.3 64 bit toolchain is set up for the 'medium code' model and needs
+# to remove the .refptr and .weak entries from the exports list; this is the default
+# when WIN = 64, with blank for WIN = 32:
+# NM_FILTER = | $(SED) -e '/[.]refptr[.]/d' -e '/[.]weak[.]/d'
 
 # We normally link directly against DLLs, 
 # but this macro forces the use of import libs
 # Has been needed for some versions of MinGW-w64
 # USE_IMPLIBS = YES
 
-# some toolchains set up for the 'medium code' model need
-# NM_FILTER = | $(SED) -e '/.refptr./d'
 ### END more detailed options
 
 
 # set to use ICU
 # USE_ICU = YES
 # path to parent of ICU headers
-ICU_PATH = /path/to/ICU
-ICU_LIBS = -lsicuin -lsicuuc -lsicudt -lstdc++
-
-# optional overrides for making bitmapdll: names of source directories
-# JPEGDIR = jpeg-9
-# PNGDIR = libpng
-# TIFFDIR = libtiff
+# ICU_PATH =
+# ICU_LIBS = -lsicuin -lsicuuc -lsicudt -lstdc++
+
+# set to use libcurl
+# USE_LIBCURL = YES
+# path to parent of libcurl headers
+# CURL_PATH =
+# libs: for 32-bit
+# CURL_LIBS = -lcurl -lrtmp -lssl -lssh2 -lcrypto -lgdi32 -lcrypt32 -lz -lws2_32 -lgdi32 -lcrypt32 -lwldap32 -lwinmm -lidn
+# libs: for 64-bit
+# CURL_LIBS = -lcurl -lrtmp -lssl -lssh2 -lcrypto -lgdi32 -lcrypt32 -lz -lws2_32 -lgdi32 -lcrypt32 -lwldap32 -lwinmm
 
 # For the cairographics devices
 # Optionally use a static build of cairographics from
-#   http://www.rforge.net/Cairo/files/cairo-current-win.tar.gz
+#   https://www.rforge.net/Cairo/files/cairo-current-win.tar.gz
 # and set CAIRO_HOME to the parent of the win32/win64 directories
 #
 # If CAIRO_HOME is not set the devices are not built.
-CAIRO_HOME =
+# CAIRO_HOME =
 
 # set this to YES to build static HTML help
-BUILD_HTML = NO
+# BUILD_HTML = NO
 
 # unset this if you are *not* using MiKTeX
-MIKTEX = TRUE
+# MIKTEX = TRUE
+# Recent MiKTEX does not provide texi2dvi and needs something like
+# TEXI2DVI = TEXINDEX=/Rtools/bin/texindex.exe texify
 
-# for texinfo < 5.0
-MAKEINFO = makeinfo
-# for texinfo >= 5.0.  Might also need -I/path/to/modules
-# MAKEINFO = /path/to/perl /path/to/texi2any
-# or perhaps something like
+# for texinfo >= 5.1. If the texinfo files are installed at /packages/texinfo,
+# TEXI2ANY = /path/to/perl -I/packages/texinfo /packages/texinfo/texi2any
+# if you do not have texinfo (default),
+# TEXI2ANY = missing
 
 # additional optimization flags (use -mtune=native for a private build)
-EOPTS = -mtune=core2
+# EOPTS = -mtune=core2
 
 # define to -fopenmp if the toolchain has OpenMP support
-OPENMP = -fopenmp
+# OPENMP = -fopenmp
 
 # define to -pthread if the toolchain has pthreads support
-PTHREAD = -pthread
+# PTHREAD = -pthread
 
 ## ====== configuration macros for building installer ===========
 
 # location where Inno Setup 5.[34].x was installed. Spaces allowed.
-ISDIR=C:/packages/Inno
+# ISDIR = C:/packages/Inno
 
 # optional location where qpdf was installed (in $(QPDF)/bin). Spaces allowed.
-QPDF=
+# QPDF =
 
 # home of 32-bit files for combined installer on 64-bit build
-HOME32=
+# HOME32 =
 
 # Full paths of extra DLLs that need to be shipped
 # e.g
 # DLLs32 = c:/R/bin/pthreadGC2-w32.dll
 # DLLs64 = c:/R/bin64/pthreadGC2-w64.dll
-DLLs32 =
-DLLs64 =
+# DLLs32 =
+# DLLs64 =
+
 
 ## ====== configuration macros for building MSI installer ===========
 
 # location where WiX 3.x executables were installed. Spaces allowed.
 # The MSI uses '/bin': other packagings may not
-WIX3DIR=C:/packages/WiX3.5/bin
+# WIX3DIR = C:/packages/WiX3.5/bin
 
 # set to 1 for a non-elevated per-user installer
-WIX_PERSONAL=0
+# WIX_PERSONAL = 0
 
 ## =============== end of user-customizable parts  ===================
diff --git a/src/gnuwin32/MkRules.rules b/src/gnuwin32/MkRules.rules
index bef5998..cbbd3fe 100644
--- a/src/gnuwin32/MkRules.rules
+++ b/src/gnuwin32/MkRules.rules
@@ -1,5 +1,43 @@
 #-*- Makefile -*-
 
+## Defaults for user settings.  See MkRules.dist for descriptions.
+
+LOCAL_SOFT ?= $(R_HOME)/extsoft
+EXT_LIBS ?= $(LOCAL_SOFT)
+G_FLAG ?= -gdwarf-2
+USE_ATLAS ?= NO
+ATLAS_PATH ?= 
+MULTI ?=
+TOOL_PATH ?=
+BINPREF ?= c:/Rtools/mingw_32/bin/
+BINPREF64 ?= c:/Rtools/mingw_64/bin/
+COMPILED_BY ?= gcc-$(shell $(CC) --version | egrep -o "([0-9]{1,}\.){2,}[0-9]{1,}")
+M_ARCH ?=
+AS_ARCH ?=
+RC_ARCH ?=
+DT_ARCH ?=
+WIN ?= 32
+ICU_PATH ?= 
+ICU_LIBS ?= -lsicuin -lsicuuc -lsicudt -lstdc++
+CAIRO_HOME ?=
+BUILD_HTML ?= NO
+MIKTEX ?= TRUE
+TEXI2ANY ?= missing
+TEXI2DVI ?= texi2dvi
+EOPTS ?= -mtune=core2
+OPENMP ?= -fopenmp
+PTHREAD ?= -pthread
+ISDIR ?= C:/packages/Inno
+QPDF ?=
+HOME32 ?=
+DLLs32 ?=
+DLLs64 ?=
+WIX3DIR ?= C:/packages/WiX3.5/bin
+WIX_PERSONAL ?= 0
+
+## =============== end of user setting defaults  ===================
+
+
 ifeq "$(MULTI)" "64"
 WIN = 64
 M_ARCH = -m64
@@ -24,6 +62,7 @@ R_ARCH = /x64
 arch_DEFS = -DR_ARCH='"x64"'
 BINPREF = $(BINPREF64)
 SYMPAT = 's/^.* [BCDRT] / /p'
+NM_FILTER ?= | $(SED) -e '/[.]refptr[.]/d' -e '/[.]weak[.]/d'
 else
 R_ARCH = /i386
 arch_DEFS = -DR_ARCH='"i386"'
@@ -45,7 +84,6 @@ IMPDIR=$(BINDIR)
 endif
 
 AR=$(BINPREF)ar
-# AWK=gawk
 CAT=cat
 CC=$(BINPREF)gcc$(GCC4_SUFF) $(C99FLAG) $(M_ARCH)
 CP=cp
@@ -58,9 +96,10 @@ DLLTOOL=$(BINPREF)dlltool
 DLLTOOLFLAGS=--as $(BINPREF)as $(DT_ARCH) -k
 ECHO=echo
 F77=$(BINPREF)gfortran$(GCC4_SUFF) $(M_ARCH)
-FLIBS=-lgfortran
+FLIBS=-lgfortran -lquadmath
 LINKER=$(MAIN_LD)
 MAIN_LD=$(CC)
+MAKEINFO = $(TEXI2ANY)
 MKDIR=mkdir
 NM=$(BINPREF)nm
 RANLIB=$(BINPREF)ranlib
diff --git a/src/gnuwin32/README b/src/gnuwin32/README
index 2e337b0..a316ca0 100644
--- a/src/gnuwin32/README
+++ b/src/gnuwin32/README
@@ -206,7 +206,7 @@ Using package tcltk
 The package tcltk supports building graphical interfaces with Tcl/Tk.
 "Support Files for Package tcltk" needs to be selected from the
 installer for this to work; alternatively you can use an existing
-installation of Tcl/Tk 8.5.x by following the instructions in the
+installation of Tcl/Tk 8.6.x by following the instructions in the
 rw-FAQ.
 
 
diff --git a/src/gnuwin32/Rdll.hide b/src/gnuwin32/Rdll.hide
index 7556089..a40a8dc 100644
--- a/src/gnuwin32/Rdll.hide
+++ b/src/gnuwin32/Rdll.hide
@@ -1,3 +1,4 @@
+ BASE_SYM_CACHED
  BINDING_IS_LOCKED
  BM_norm_keep
  BZ2_blockSort
@@ -35,7 +36,6 @@
  BZ2_hbMakeCodeLengths
  BZ2_indexIntoF
  BZ2_rNums
- BindDomain
  CPFun
  ConsoleAcceptCmd
  DebugMenuitem
@@ -47,6 +47,7 @@
  IS_ASCII
  IS_BYTES
  IS_LATIN1
+ IS_SPECIAL_SYMBOL
  IS_UTF8
  InitDynload
  InitParser
@@ -56,8 +57,10 @@
  MDIset
  MDIsize
  MainThread
+ NO_SPECIAL_SYMBOLS
  PrintUsage
  ProfileEvent
+ RExitContext
  R_BCNodeStackBase
  R_BCNodeStackEnd
  R_BCNodeStackTop
@@ -68,6 +71,7 @@
  R_ChooseFile
  R_CollectWarnings
  R_Collected
+ R_ColonSymbol
  R_CommentSymbol
  R_ConnIdSymbol
  R_ConsoleIob
@@ -76,17 +80,16 @@
  R_DevicesSymbol
  R_DisableNLinBrowser
  R_DotEnvSymbol
- R_DoubleColonSymbol
  R_ErrorCon
  R_EvalDepth
  R_ExactSymbol
  R_Expressions
  R_Expressions_keep
- R_ExternalPtrAddrFn
  R_FileMtime
  R_FinalizeSrcRefState
  R_FreeSEXP
  R_FreeStringBufferL
+ R_GCEnabled
  R_GE_VStrHeight
  R_GE_VStrWidth
  R_GE_VText
@@ -97,9 +100,11 @@
  R_GetVarLocValue
  R_HandlerStack
  R_HiddenFile
+ R_InitReadItemDepth
  R_InitSrcRefState
  R_InitialData
  R_InsertRestartHandlers
+ R_Interactive
  R_IoBufferFree
  R_IoBufferGetc
  R_IoBufferInit
@@ -125,6 +130,9 @@
  R_OpenSiteFile
  R_OpenSysInitFile
  R_OutputCon
+ R_PCRE_study
+ R_PCRE_use_JIT
+ R_PPStackSize
  R_Parse1Buffer
  R_Parse1File
  R_ParseBuffer
@@ -135,6 +143,7 @@
  R_PendingPromises
  R_Primitive
  R_Quiet
+ R_ReadItemDepth
  R_RecursiveSymbol
  R_RestartStack
  R_RestartToken
@@ -162,7 +171,6 @@
  R_TmpvalSymbol
  R_Toplevel
  R_ToplevelContext
- R_TripleColonSymbol
  R_UTF8fixslash
  R_UseNamesSymbol
  R_VSize
@@ -181,15 +189,16 @@
  R_compress1
  R_compress2
  R_compress3
- R_current_trace_state
  R_data_class2
  R_dec_min_exponent
  R_decompress1
  R_decompress2
  R_decompress3
  R_dlsym
+ R_doDotCall
  R_do_data_class
  R_do_set_class
+ R_dotCallFn
  R_dot_Class
  R_dot_Generic
  R_dot_GenericCallEnv
@@ -223,9 +232,11 @@
  R_max_num_math_threads
  R_mktime
  R_moduleCdynload
+ R_newCurlUrl
  R_newsock
  R_newunz
  R_newurl
+ R_num_math_threads
  R_nwarnings
  R_osDynSymbol
  R_possible_dispatch
@@ -233,8 +244,6 @@
  R_restore_globals
  R_run_onexits
  R_seemsOldStyleS4Object
- R_serialize
- R_serializeb
  R_strftime
  R_subset3_dflt
  R_syscall
@@ -255,6 +264,7 @@
  Rcons_vprintf
  Rconsolesetwidth
  Rf_AdobeSymbol2ucs2
+ Rf_BindDomain
  Rf_CheckFormals
  Rf_CoercionWarning
  Rf_ComplexFromInteger
@@ -267,6 +277,7 @@
  Rf_DispatchOrEval
  Rf_EncodeEnvironment
  Rf_EncodeRaw
+ Rf_EncodeReal2
  Rf_EncodeString
  Rf_EnsureString
  Rf_ErrorMessage
@@ -285,8 +296,10 @@
  Rf_InitMemory
  Rf_InitNames
  Rf_InitOptions
+ Rf_InitS3DefaultTypes
  Rf_InitStringHash
  Rf_InitTempDir
+ Rf_InitTypeTables
  Rf_IntegerFromComplex
  Rf_IntegerFromLogical
  Rf_IntegerFromReal
@@ -315,8 +328,10 @@
  Rf_StringFromInteger
  Rf_StringFromLogical
  Rf_StringFromReal
+ Rf_TimeToSeed
  Rf_VectorIndex
  Rf_WarningMessage
+ Rf_addMissingVarsToNewEnv
  Rf_allocCharsxp
  Rf_asVecSize
  Rf_bd0
@@ -325,6 +340,7 @@
  Rf_check1arg
  Rf_check_stack_balance
  Rf_convertToC
+ Rf_createS3Vars
  Rf_d1mach
  Rf_ddfindVar
  Rf_deparse1s
@@ -341,6 +357,8 @@
  Rf_get1index
  Rf_i1mach
  Rf_initStack
+ Rf_installDDVAL
+ Rf_installS3Signature
  Rf_isValidName
  Rf_lfastchoose
  Rf_lgammacor
@@ -361,6 +379,7 @@
  Rf_onsigusr1
  Rf_onsigusr2
  Rf_osDynSymbol
+ Rf_patchArgsByActuals
  Rf_pbeta_raw
  Rf_printArray
  Rf_printComplexVector
@@ -371,14 +390,17 @@
  Rf_printVector
  Rf_promiseArgs
  Rf_qchisq_appr
+ Rf_readS3VarsFromFrame
  Rf_regcomp
  Rf_regerror
  Rf_regexec
  Rf_regfree
  Rf_setIVector
  Rf_setRVector
+ Rf_sexptype2char
  Rf_ssort
  Rf_stirlerr
+ Rf_stringSuffix
  Rf_strmat2intmat
  Rf_substituteList
  Rf_tsConform
@@ -410,23 +432,29 @@
  Rwin_wrename
  SET_ACTIVE_BINDING_BIT
  SET_ASCII
+ SET_BASE_SYM_CACHED
  SET_BYTES
  SET_CACHED
  SET_CXTAIL
  SET_HASHASH
  SET_LATIN1
+ SET_NO_SPECIAL_SYMBOLS
  SET_PRIMOFFSET
+ SET_SPECIAL_SYMBOL
  SET_UTF8
  Sys_TempDir
- TimeToSeed
- UNLOCK_BINDING
  UNIMPLEMENTED_TYPEt
+ UNLOCK_BINDING
+ UNSET_BASE_SYM_CACHED
+ UNSET_NO_SPECIAL_SYMBOLS
+ UNSET_SPECIAL_SYMBOL
  UTF8in
  UTF8out
- UseInternet2
  WinCheckUTF8
  WinUTF8out
  WrongArgCount
+ _controlify
+ _hershey_font_info
  _nl_explode_name
  _nl_find_domain
  _nl_find_msg
@@ -438,6 +466,8 @@
  _nl_make_l10nflist
  _nl_msg_cat_cntr
  _nl_normalize_codeset
+ _occidental_hershey_glyphs
+ _oriental_hershey_glyphs
  _pcre_OP_lengths
  _pcre_default_tables
  _pcre_find_bracket
@@ -526,7 +556,6 @@
  cpuLimit2
  cpuLimitValue
  csroot_
- dbinom_raw
  dblep0_
  deleditordata
  do_AT
@@ -534,6 +563,7 @@
  do_D2POSIXlt
  do_External
  do_Externalgr
+ do_ICUget
  do_ICUset
  do_Math2
  do_POSIXlt2D
@@ -546,6 +576,7 @@
  do_addRestart
  do_addTryHandlers
  do_addhistory
+ do_address
  do_adist
  do_agrep
  do_allnames
@@ -559,8 +590,8 @@
  do_asPOSIXct
  do_asPOSIXlt
  do_as_environment
+ do_asatomic
  do_ascall
- do_ascharacter
  do_asfunction
  do_assign
  do_asvector
@@ -613,6 +644,9 @@
  do_copyDFattr
  do_crc64
  do_cum
+ do_curlDownload
+ do_curlGetHeaders
+ do_curlVersion
  do_date
  do_debug
  do_delayed
@@ -629,6 +663,7 @@
  do_dimnamesgets
  do_dirchmod
  do_dircreate
+ do_direxists
  do_dirname
  do_disassemble
  do_dllversion
@@ -642,6 +677,8 @@
  do_duplicated
  do_dynload
  do_dynunload
+ do_eSoftVersion
+ do_eSoftVersion
  do_eapply
  do_emptyenv
  do_enablejit
@@ -675,6 +712,7 @@
  do_first_min
  do_flush
  do_for
+ do_forceAndCall
  do_formals
  do_format
  do_formatC
@@ -692,6 +730,8 @@
  do_getIdentification
  do_getNSRegistry
  do_getNumRtoCConverters
+ do_getNumericRounding
+ do_getOption
  do_getRegNS
  do_getRegisteredRoutines
  do_getRestart
@@ -755,6 +795,7 @@
  do_lazyLoadDBinsertValue
  do_length
  do_lengthgets
+ do_lengths
  do_levelsgets
  do_list2env
  do_listdirs
@@ -769,6 +810,7 @@
  do_lockEnv
  do_log
  do_log1arg
+ do_log_builtin
  do_logic
  do_logic2
  do_logic3
@@ -813,7 +855,6 @@
  do_nextn
  do_ngettext
  do_normalizepath
- do_nsl
  do_nzchar
  do_onexit
  do_open
@@ -827,6 +868,7 @@
  do_parse
  do_paste
  do_pathexpand
+ do_pcre_config
  do_pipe
  do_pmatch
  do_pmin
@@ -847,6 +889,7 @@
  do_quit
  do_quote
  do_radixsort
+ do_radixsort2
  do_random1
  do_random2
  do_random3
@@ -870,6 +913,7 @@
  do_readtablehead
  do_recall
  do_recordGraphics
+ do_refcnt
  do_regFinaliz
  do_regNS
  do_regexec
@@ -885,6 +929,7 @@
  do_restart
  do_retracemem
  do_return
+ do_returnValue
  do_rowscols
  do_rowsum
  do_sample
@@ -904,6 +949,7 @@
  do_set
  do_setFileTime
  do_setInternet2
+ do_setNumericRounding
  do_setS4Object
  do_setSessionTimeLimit
  do_setStatusBar
@@ -940,6 +986,7 @@
  do_stopHTTPD
  do_storage_mode
  do_strptime
+ do_strrep
  do_strsplit
  do_strtoi
  do_strtrim
@@ -963,6 +1010,7 @@
  do_sysbrowser
  do_syschmod
  do_sysgetpid
+ do_sysimplementation
  do_sysinfo
  do_syssleep
  do_system
@@ -976,6 +1024,7 @@
  do_textconvalue
  do_tilde
  do_tolower
+ do_topenv
  do_trace
  do_traceOnOff
  do_traceback
@@ -998,6 +1047,8 @@
  do_url
  do_usemethod
  do_utf8ToInt
+ do_validEnc
+ do_validUTF8
  do_vapply
  do_version
  do_warning
@@ -1019,7 +1070,6 @@
  do_xtfrm
  dos_wglob
  dos_wglobfree
- dpois_raw
  drawconsole
  dt_invalidate_locale
  editorchecksave
@@ -1312,6 +1362,7 @@
  pcre_malloc
  pcre_refcount
  pcre_stack_free
+ pcre_stack_guard
  pcre_stack_malloc
  pcre_study
  pcre_version
@@ -1324,6 +1375,7 @@
  process_site_Renviron
  process_system_Renviron
  process_user_Renviron
+ qbeta_raw
  raise
  realp0_
  registerBase
@@ -1433,14 +1485,28 @@
  trio_asprintfv
  trio_fprintf
  trio_fprintfv
+ trio_fscanf
+ trio_fscanfv
  trio_printf
  trio_printfv
+ trio_scanf
+ trio_scanfv
+ trio_snprintf
  trio_snprintfv
+ trio_sprintf
  trio_sprintfv
+ trio_sscanf
+ trio_sscanfv
+ trio_strerror
  trio_vaprintf
  trio_vasprintf
  trio_vfprintf
+ trio_vfscanf
  trio_vprintf
+ trio_vscanf
+ trio_vsnprintf
+ trio_vsprintf
+ trio_vsscanf
  tzname
  tzset
  unregisterBase
@@ -1456,6 +1522,13 @@
  xbufdel
  xbufgrow
  xcalloc_impl
+ xcopyComplexWithRecycle
+ xcopyIntegerWithRecycle
+ xcopyLogicalWithRecycle
+ xcopyRawWithRecycle
+ xcopyRealWithRecycle
+ xcopyStringWithRecycle
+ xcopyVectorWithRecycle
  xdr_bool
  xdr_bytes
  xdr_char
@@ -1475,6 +1548,13 @@
  xdr_void
  xdr_wrapstring
  xdrstdio_create
+ xfillComplexMatrixWithRecycle
+ xfillIntegerMatrixWithRecycle
+ xfillLogicalMatrixWithRecycle
+ xfillRawMatrixWithRecycle
+ xfillRealMatrixWithRecycle
+ xfillStringMatrixWithRecycle
+ xfillVectorMatrixWithRecycle
  xfree_impl
  xmalloc_configure
  xmalloc_current
diff --git a/src/gnuwin32/bitmap/INSTALL b/src/gnuwin32/bitmap/INSTALL
deleted file mode 100644
index 8cf5237..0000000
--- a/src/gnuwin32/bitmap/INSTALL
+++ /dev/null
@@ -1,2 +0,0 @@
-Instructions for building Rbitmap.dll are in the R Installation and
-Administration manual, R-admin.{pdf|html|texi}.
diff --git a/src/gnuwin32/bitmap/Makefile b/src/gnuwin32/bitmap/Makefile
deleted file mode 100644
index deadf9c..0000000
--- a/src/gnuwin32/bitmap/Makefile
+++ /dev/null
@@ -1,57 +0,0 @@
-## These can be overridden in MkRules.dist or MkRules.local
-
-## must be jpeg-7 jpeg-8 jpeg-8a jpeg-8b jpeg-8c jpeg-8d jpeg-9 libjpeg-turbo
-JPEGDIR = jpeg-9
-PNGDIR = libpng
-TIFFDIR = libtiff
-
-include ../MkRules
-
-.PHONY: all DLL buildzlib buildpng buildjpeg buildtiff clean
-
-all:
-	@$(MAKE) --no-print-directory buildzlib buildpng buildjpeg buildtiff rbitmap.o
-	@$(MKDIR) -p ../../../library/grDevices/libs
-	@$(MAKE) --no-print-directory DLL
-
-DLL: ../../../library/grDevices/libs$(R_ARCH)/Rbitmap.dll
-
-buildzlib:
-	@$(MAKE) -C ../../extra/zlib -f Makefile.win
-
-## There is a makefile.mingw in 1.2.x and 1.4.x but not 1.5.x
-## Neither the makefile.{mingw,std} build pnggccrd.c but it is needed if
-## the compiler defines __MMX__ , which the win64 gcc does.
-## So we need to explicitly disable it.
-## prefix=foo shuts up a warning
-buildpng:
-	$(MAKE) CC='$(CC)' AR='$(AR)' AR_RC='$(AR) rcs' \
-	  CFLAGS="-O3 -I../../../extra/zlib -DPNG_NO_MMX_CODE" \
-	  RANLIB=$(RANLIB) ZLIBLIB=../../../extra/zlib -C $(PNGDIR) \
-	  -f scripts/makefile.gcc prefix=foo libpng.a
-
-buildjpeg: $(JPEGDIR)/jconfig.h Makefile.jpeg
-	$(MAKE) CC='$(CC)' AR='$(AR) rc' RANLIB=$(RANLIB) JPEGDIR=$(JPEGDIR) -C $(JPEGDIR) \
-	  -f ../Makefile.jpeg libjpeg.a
-
-$(JPEGDIR)/jconfig.h: jconfig.h 
-	$(CP) jconfig.h $(JPEGDIR)/jconfig.h
-
-## This gives a lot of warnings on Win64, but seems to work
-buildtiff: $(JPEGDIR)/jconfig.h Makefile.tiff
-	$(MAKE) CC='$(CC)' AR='$(AR)' RANLIB=$(RANLIB) -C $(TIFFDIR) -f ../Makefile.tiff JPEGDIR=$(JPEGDIR)
-
-rbitmap-CPPFLAGS=-DHAVE_PNG -DHAVE_JPEG -DHAVE_TIFF -I. -I../../extra/zlib -I./$(PNGDIR) -I$(JPEGDIR) -I./$(TIFFDIR) -I../../include
-CFLAGS=-O3 -Wall -pedantic 
-
-../../../library/grDevices/libs$(R_ARCH)/Rbitmap.dll: rbitmap.o $(TIFFDIR)/libtiff.a $(PNGDIR)/libpng.a $(JPEGDIR)/libjpeg.a
-	$(DLL) -shared -s -o $@ $^ -L../../../$(IMPDIR) -lR -lRzlib
-
-clean:
-	$(RM) *.o *.a *.dll *.def *~ \#*\#
-	-$(MAKE) CC='$(CC)' -C $(PNGDIR) -f scripts/makefile.std clean
-	-$(MAKE) CC='$(CC)' -C $(JPEGDIR) -f ../Makefile.jpeg clean
-	-$(MAKE) CC='$(CC)' -C $(TIFFDIR) -f ../Makefile.tiff clean
-
-
-
diff --git a/src/gnuwin32/bitmap/Makefile.jpeg b/src/gnuwin32/bitmap/Makefile.jpeg
deleted file mode 100644
index 864cd10..0000000
--- a/src/gnuwin32/bitmap/Makefile.jpeg
+++ /dev/null
@@ -1,51 +0,0 @@
-#-*- Makefile -*-
-
-## comment from Guido's original version in the 1990's
-# jconfig.h and Makefile obtained running 'CC="gcc -mno-cygwin" ./configure'
-# under CYGWIN. They are here since the configure script doesn't run 
-# (I suspect) using the reduced set of tools we distribute.
-## 2006-01-15 checked under current tools.
-
-CC= gcc
-CFLAGS= -O3 -I.
-
-# Put here the object file name for the correct system-dependent memory
-# manager file.  For Unix this is usually jmemnobs.o, but you may want
-# to use jmemansi.o or jmemname.o if you have limited swap space.
-SYSDEPMEM= jmemnobs.o
-
-# source files: JPEG library proper
-ifeq ($(strip $(JPEGDIR)),libjpeg-turbo)
-LIBSOURCES= jcapimin.c jcapistd.c \
-	jccoefct.c jccolor.c jcdctmgr.c jchuff.c jcinit.c \
-	jcmainct.c jcmarker.c jcmaster.c jcomapi.c jcparam.c \
-	jcphuff.c jcprepct.c jcsample.c jctrans.c jdapimin.c \
-	jdapistd.c jdatadst.c jdatasrc.c jdcoefct.c jdcolor.c \
-	jddctmgr.c jdhuff.c jdinput.c jdmainct.c jdmarker.c \
-	jdmaster.c jdmerge.c jdphuff.c jdpostct.c jdsample.c \
-	jdtrans.c jerror.c jfdctflt.c jfdctfst.c jfdctint.c \
-	jidctflt.c jidctfst.c jidctint.c jidctred.c jquant1.c \
-	jquant2.c jutils.c jmemmgr.c jmemnobs.c jsimd_none.c
-else
-LIBSOURCES= jaricom.c jcapimin.c jcapistd.c jcarith.c jccoefct.c jccolor.c \
-        jcdctmgr.c jchuff.c jcinit.c jcmainct.c jcmarker.c jcmaster.c \
-        jcomapi.c jcparam.c jcprepct.c jcsample.c jctrans.c jdapimin.c \
-        jdapistd.c jdarith.c jdatadst.c jdatasrc.c jdcoefct.c jdcolor.c \
-        jddctmgr.c jdhuff.c jdinput.c jdmainct.c jdmarker.c jdmaster.c \
-        jdmerge.c jdpostct.c jdsample.c jdtrans.c jerror.c jfdctflt.c \
-        jfdctfst.c jfdctint.c jidctflt.c jidctfst.c jidctint.c jquant1.c \
-        jquant2.c jutils.c jmemmgr.c
-endif
-
-# These objectfiles are included in libjpeg.a
-LIBOBJECTS= $(LIBSOURCES:.c=.o) $(SYSDEPMEM)
-
-all:  libjpeg.a
-
-libjpeg.a:  $(LIBOBJECTS)
-	$(RM) libjpeg.a
-	$(AR) libjpeg.a  $(LIBOBJECTS)
-	$(RANLIB) libjpeg.a
-
-clean:
-	$(RM) -f libjpeg.a  $(LIBOBJECTS)
\ No newline at end of file
diff --git a/src/gnuwin32/bitmap/Makefile.tiff b/src/gnuwin32/bitmap/Makefile.tiff
deleted file mode 100644
index 019bad4..0000000
--- a/src/gnuwin32/bitmap/Makefile.tiff
+++ /dev/null
@@ -1,65 +0,0 @@
-#-*- Makefile -*-
-## may be overridden in MkRules
-JPEGDIR = jpeg-8
-include ../../MkRules
-
-all: makeMakedeps libtiff.a
-
-CPPFLAGS+=$(DEFS) -I.. -I../$(JPEGDIR) -I../../../extra/zlib
-CFLAGS=-O3
-
-SOURCES = \
-	tif_aux.c \
-	tif_close.c \
-	tif_codec.c \
-	tif_color.c \
-	tif_compress.c \
-	tif_dir.c \
-	tif_dirinfo.c \
-	tif_dirread.c \
-	tif_dirwrite.c \
-	tif_dumpmode.c \
-	tif_error.c \
-	tif_extension.c \
-	tif_fax3.c \
-	tif_fax3sm.c \
-	tif_flush.c \
-	tif_getimage.c \
-	tif_jpeg.c \
-	tif_luv.c \
-	tif_lzw.c \
-	tif_next.c \
-	tif_ojpeg.c \
-	tif_open.c \
-	tif_packbits.c \
-	tif_pixarlog.c \
-	tif_predict.c \
-	tif_print.c \
-	tif_read.c \
-	tif_strip.c \
-	tif_swab.c \
-	tif_thunder.c \
-	tif_tile.c \
-	tif_unix.c \
-	tif_version.c \
-	tif_warning.c \
-	tif_write.c \
-	tif_zip.c
-
-OBJECTS=$(SOURCES:.c=.o)
-
-libtiff.a: $(OBJECTS)
-
-clean:
-	$(RM) *.o *~ *.d Makedeps
-distclean: clean
-	@$(RM) libtiff.a
-
-# Dependencies
-DEPS=$(SOURCES:.c=.d)
-
-makeMakedeps: $(DEPS)
-	@$(RM) Makedeps
-	@cat $(DEPS) >> Makedeps
-
--include Makedeps
diff --git a/src/gnuwin32/bitmap/jconfig.h b/src/gnuwin32/bitmap/jconfig.h
deleted file mode 100644
index 22daecd..0000000
--- a/src/gnuwin32/bitmap/jconfig.h
+++ /dev/null
@@ -1,49 +0,0 @@
-/* jconfig.h.  Generated automatically by configure.  */
-/* jconfig.cfg --- source file edited by configure script */
-/* see jconfig.doc for explanations */
-
-#define HAVE_PROTOTYPES 
-#define HAVE_UNSIGNED_CHAR 
-#define HAVE_UNSIGNED_SHORT 
-#undef void
-#undef const
-#undef CHAR_IS_UNSIGNED
-#define HAVE_STDDEF_H 
-#define HAVE_STDLIB_H 
-#undef NEED_BSD_STRINGS
-#undef NEED_SYS_TYPES_H
-#undef NEED_FAR_POINTERS
-#undef NEED_SHORT_EXTERNAL_NAMES
-/* Define this if you get warnings about undefined structures. */
-#undef INCOMPLETE_TYPES_BROKEN
-
-#ifdef JPEG_INTERNALS
-
-#undef RIGHT_SHIFT_IS_UNSIGNED
-#define INLINE __inline__
-/* These are for configuring the JPEG memory manager. */
-#undef DEFAULT_MAX_MEM
-#undef NO_MKTEMP
-
-#endif /* JPEG_INTERNALS */
-
-#ifdef JPEG_CJPEG_DJPEG
-
-#define BMP_SUPPORTED		/* BMP image file format */
-#define GIF_SUPPORTED		/* GIF image file format */
-#define PPM_SUPPORTED		/* PBMPLUS PPM/PGM image file format */
-#undef RLE_SUPPORTED		/* Utah RLE image file format */
-#define TARGA_SUPPORTED		/* Targa image file format */
-
-#undef TWO_FILE_COMMANDLINE
-#undef NEED_SIGNAL_CATCHER
-#undef DONT_USE_B_MODE
-
-/* Define this if you want percent-done progress reports from cjpeg/djpeg. */
-#undef PROGRESS_REPORT
-
-#endif /* JPEG_CJPEG_DJPEG */
-
-
-
-
diff --git a/src/gnuwin32/bitmap/rbitmap.c b/src/gnuwin32/bitmap/rbitmap.c
deleted file mode 100644
index 0ea9f09..0000000
--- a/src/gnuwin32/bitmap/rbitmap.c
+++ /dev/null
@@ -1,659 +0,0 @@
-/*
- *  R : A Computer Language for Statistical Data Analysis
- *  Copyright (C) 1999       Guido Masarotto
- *  Copyright (C) 1999-2014  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
- *  the Free Software Foundation; either version 2 of the License, or
- *  (at your option) any later version.
- *
- *  This program is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU General Public License for more details.
- *
- *  You should have received a copy of the GNU General Public License
- *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
- */
-
-
-/*
- * This file aims to be system independent so it sees the underlying
- * structures only using:
- * void *d : an 'opaque' view of the source of the pixels;
- * int width, height: dimensions in pixels;
- * unsigned int (*gp)(void *d, int x, int y): a function which
- *     returns the colour of the (x,y) pixels stored either as
- *     BGR (R model, see GraphicsDevice.h) or as RGB in the
- *     24 least sig. bits (8 bit for channel).
- *     (0,0) is the left-top corner. (3,2) is the third pixel
- *     in the fourth scanline.
- * int bgr: if != 0, order is BGR else is RGB.
- * int quality: only for jpeg (0-100 measure of how much to compress).
- * FILE * fp is the destination.
- *
- */
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <setjmp.h>
-
-/* 8 bits red, green and blue channel */
-#define DECLARESHIFTS int RSHIFT=(bgr)?0:16, GSHIFT=8, BSHIFT=(bgr)?16:0
-#define GETRED(col)    (((col) >> RSHIFT) & 0xFF)
-#define GETGREEN(col)  (((col) >> GSHIFT) & 0xFF)
-#define GETBLUE(col)   (((col) >> BSHIFT) & 0xFF)
-#define GETALPHA(col)   (((col) >> 24) & 0xFF)
-
-#include <R_ext/Error.h>
-
-#ifdef HAVE_PNG
-
-#include "png.h"
-/*
- * Try to save the content of the device 'd' in 'filename' as png.
- * If numbers of colors is less than 256 we use a 'palette' png.
- * Return 1 on success, 0 on failure
-*/
-
-/*
-    I don't use 'error' since (1) we must free 'scanline' and
-   (2) we can be arrived here from a button or menuitem callback maybe
-   in a different thread from the one where R runs.
-*/
-static void my_png_error(png_structp png_ptr, png_const_charp msg)
-{
-    R_ShowMessage((char *) msg);
-#if PNG_LIBPNG_VER < 10400
-    longjmp(png_ptr->jmpbuf,1);
-#else
-    longjmp(png_jmpbuf(png_ptr),1);
-#endif
-}
-
-static void my_png_warning(png_structp png_ptr, png_const_charp msg)
-{
-    warning("libpng: %s",(char *) msg);
-}
-
-__declspec(dllexport)
-int R_SaveAsPng(void  *d, int width, int height,
-		unsigned int (*gp)(void *, int, int),
-		int bgr, FILE *fp, unsigned int transparent, int res)
-{
-    png_structp png_ptr;
-    png_infop info_ptr;
-    unsigned int  col, palette[256];
-    png_color pngpalette[256];
-    png_bytep pscanline;
-    png_bytep scanline = (png_bytep) calloc((size_t)(4*width),sizeof(png_byte));
-    png_byte trans[256];
-    png_color_16 trans_values[1];
-    int i, j, r, ncols, mid, high, low, withpalette, have_alpha;
-    volatile DECLARESHIFTS;
-
-    /* Have we enough memory?*/
-    if (scanline == NULL)
-	return 0;
-
-    if (fp == NULL) {
-	free(scanline);
-	return 0;
-    }
-
-    /* Create and initialize the png_struct with the desired error handler
-     * functions.  If you want to use the default stderr and longjump method,
-     * you can supply NULL for the last three parameters.  We also check that
-     * the library version is compatible with the one used at compile time,
-     * in case we are using dynamically linked libraries.  REQUIRED.
-     */
-    png_ptr = png_create_write_struct(PNG_LIBPNG_VER_STRING, NULL, NULL, NULL);
-    if (png_ptr == NULL) {
-	free(scanline);
-	return 0;
-    }
-
-    /* Allocate/initialize the image information data.  REQUIRED */
-    info_ptr = png_create_info_struct(png_ptr);
-    if (info_ptr == NULL) {
-	free(scanline);
-	png_destroy_write_struct(&png_ptr,  (png_infopp)NULL);
-	return 0;
-    }
-
-    /* Set error handling.  REQUIRED if you aren't supplying your own
-     * error handling functions in the png_create_write_struct() call.
-     */
-#if PNG_LIBPNG_VER < 10400
-    if (setjmp(png_ptr->jmpbuf))
-#else
-    if (setjmp(png_jmpbuf(png_ptr)))
-#endif
-{
-	/* If we get here, we had a problem writing the file */
-	free(scanline);
-	png_destroy_write_struct(&png_ptr, &info_ptr);
-	return 0;
-    }
-    png_set_error_fn(png_ptr, NULL, my_png_error, my_png_warning);
-
-    /* I/O initialization functions is REQUIRED */
-    png_init_io(png_ptr, fp);
-    /* Have we less than 256 different colors? */
-    ncols = 0;
-    if(transparent) palette[ncols++] = transparent & 0xFFFFFF;
-    mid = ncols;
-    withpalette = 1;
-    have_alpha = 0;
-    for (i = 0; (i < height) && withpalette ; i++) {
-	for (j = 0; (j < width) && withpalette ; j++) {
-	    col = gp(d,i,j);
-	    if (GETALPHA(col) < 255) have_alpha = 1;
-	    /* binary search the palette: */
-	    low = 0;
-	    high = ncols - 1;
-	    while (low <= high) {
-		mid = (low + high)/2;
-		if ( col < palette[mid] ) high = mid - 1;
-		else if ( col > palette[mid] ) low  = mid + 1;
-		else break;
-	    }
-	    if (high < low) {
-		/* didn't find colour in palette, insert it: */
-		if (ncols >= 256) {
-		    withpalette = 0;
-		} else {
-		    for (r = ncols; r > low; r--)
-			palette[r] = palette[r-1] ;
-		    palette[low] = col;
-		    ncols ++;
-		}
-	    }
-	}
-    }
-    col = gp(d,0,0);
-    //have_alpha &= (transparent == 0);
-
-    /* Set the image information here.  Width and height are up to 2^31,
-     * bit_depth is one of 1, 2, 4, 8, or 16, but valid values also depend on
-     * the color_type selected. color_type is one of PNG_COLOR_TYPE_GRAY,
-     * PNG_COLOR_TYPE_GRAY_ALPHA, PNG_COLOR_TYPE_PALETTE, PNG_COLOR_TYPE_RGB,
-     * or PNG_COLOR_TYPE_RGB_ALPHA.  interlace is either PNG_INTERLACE_NONE or
-     * PNG_INTERLACE_ADAM7, and the compression_type and filter_type MUST
-     * currently be PNG_COMPRESSION_TYPE_BASE and PNG_FILTER_TYPE_BASE. REQUIRED
-     */
-    png_set_IHDR(png_ptr, info_ptr, width, height, 8,
-		 withpalette ? PNG_COLOR_TYPE_PALETTE :
-		 (have_alpha ? PNG_COLOR_TYPE_RGB_ALPHA : PNG_COLOR_TYPE_RGB),
-		 PNG_INTERLACE_NONE, PNG_COMPRESSION_TYPE_BASE,
-		 PNG_FILTER_TYPE_BASE);
-
-    if (withpalette) {
-	for (i = 0; i < ncols ; i++) {
-	    col = palette[i];
-	    if(transparent) {
-		trans[i] = (col == transparent) ? 0:255;
-		pngpalette[i].red = GETRED(col);
-		pngpalette[i].green = GETGREEN(col);
-		pngpalette[i].blue = GETBLUE(col);
-	    } else {
-		/* PNG needs NON-premultiplied alpha */
-		int a = GETALPHA(col);
-		trans[i] = a;
-		if(a == 255 || a == 0) {
-		    pngpalette[i].red = GETRED(col);
-		    pngpalette[i].green = GETGREEN(col);
-		    pngpalette[i].blue = GETBLUE(col);
-		} else {
-		    pngpalette[i].red = 0.49 + 255.0*GETRED(col)/a;
-		    pngpalette[i].green = 0.49 + 255.0*GETGREEN(col)/a;
-		    pngpalette[i].blue = 0.49 + 255.0*GETBLUE(col)/a;
-
-		}
-	    }
-	}
-	png_set_PLTE(png_ptr, info_ptr, pngpalette, ncols);
-	if (transparent || have_alpha)
-	    png_set_tRNS(png_ptr, info_ptr, trans, ncols, trans_values);
-    }
-    /* Deal with transparency */
-    if(transparent && !withpalette) {
-	trans_values[0].red = GETRED(transparent);
-	trans_values[0].blue = GETBLUE(transparent);
-	trans_values[0].green = GETGREEN(transparent);
-	png_set_tRNS(png_ptr, info_ptr, trans, ncols, trans_values);
-    }
-
-    if(res > 0)
-	png_set_pHYs(png_ptr, info_ptr, res/0.0254, res/0.0254,
-		     PNG_RESOLUTION_METER);
-
-    /* Write the file header information.  REQUIRED */
-    png_write_info(png_ptr, info_ptr);
-
-    /*
-     * Now, write the pixels
-     */
-    for (i = 0 ; i < height ; i++) {
-	/* Build the scanline */
-	pscanline = scanline;
-	for (j = 0 ; j < width ; j++) {
-	    col = gp(d, i, j);
-	    if (withpalette) {
-		/* binary search the palette (the colour must be there): */
-		low = 0;  high = ncols - 1;
-		while (low <= high) {
-		    mid = (low + high)/2;
-		    if      (col < palette[mid]) high = mid - 1;
-		    else if (col > palette[mid]) low  = mid + 1;
-		    else break;
-		}
-		*pscanline++ = mid;
-	    } else {
-		if(have_alpha) {
-		    /* PNG needs NON-premultiplied alpha */
-		    int a = GETALPHA(col);
-		    if(a == 255 || a == 0) {
-			*pscanline++ = GETRED(col) ;
-			*pscanline++ = GETGREEN(col) ;
-			*pscanline++ = GETBLUE(col) ;
-			*pscanline++ =  a;
-		    } else {
-			*pscanline++ = 0.49 + 255.0*GETRED(col)/a ;
-			*pscanline++ = 0.49 + 255.0*GETGREEN(col)/a ;
-			*pscanline++ = 0.49 + 255.0*GETBLUE(col)/a ;
-			*pscanline++ =  a;
-		    }
-		} else {
-		    *pscanline++ = GETRED(col) ;
-		    *pscanline++ = GETGREEN(col) ;
-		    *pscanline++ = GETBLUE(col) ;
-		}
-	    }
-	}
-	png_write_row(png_ptr, scanline);
-    }
-
-    /* It is REQUIRED to call this to finish writing the rest of the file */
-    png_write_end(png_ptr, info_ptr);
-
-    /* clean up after the write, and free any memory allocated */
-    free(scanline);
-    png_destroy_write_struct(&png_ptr, &info_ptr);
-
-    /* that's it */
-    return 1;
-}
-
-#endif /* HAVE_PNG */
-
-
-#ifdef HAVE_JPEG
-
-/* jconfig.h included by jpeglib.h may define these unconditionally */
-#undef HAVE_STDDEF_H
-#undef HAVE_STDLIB_H
-#include <jpeglib.h>
-
-/* Here's the extended error handler struct */
-
-struct my_error_mgr {
-    struct jpeg_error_mgr pub;	/* "public" fields */
-    jmp_buf setjmp_buffer;	/* for return to caller */
-};
-
-typedef struct my_error_mgr * my_error_ptr;
-
-/*
- * Here's the routine that will replace the standard error_exit method:
-*/
-
-static void my_error_exit (j_common_ptr cinfo)
-{
-    /* cinfo->err really points to a my_error_mgr struct, so coerce pointer */
-    my_error_ptr myerr = (my_error_ptr) cinfo->err;
-
-    /* Always display the message. */
-    (*cinfo->err->output_message) (cinfo);
-
-    /* Return control to the setjmp point */
-    longjmp(myerr->setjmp_buffer, 1);
-}
-
-/* We also replace the output method */
-static void my_output_message (j_common_ptr cinfo)
-{
-    char buffer[JMSG_LENGTH_MAX];
-
-    /* Create the message */
-    (*cinfo->err->format_message) (cinfo, buffer);
-
-    /* and show it */
-    R_ShowMessage(buffer);
-}
-
-
-
-__declspec(dllexport)
-int R_SaveAsJpeg(void  *d, int width, int height,
-		unsigned int (*gp)(void *, int, int),
-		int bgr, int quality, FILE *outfile, int res)
-{
-    struct jpeg_compress_struct cinfo;
-    struct my_error_mgr jerr;
-    /* More stuff */
-    JSAMPLE *pscanline, *scanline = (JSAMPLE *) calloc(3*width,sizeof(JSAMPLE));
-    int i, j;
-    unsigned int col;
-    DECLARESHIFTS;
-
-    /* Have we enough memory?*/
-    if (scanline == NULL)
-	return 0;
-
-    if (outfile == NULL) {
-	free(scanline);
-	return 0;
-    }
-
-    /* Step 1: allocate and initialize JPEG compression object */
-
-    /*
-     * We set up the normal JPEG error routines, then override error_exit
-     * and output_message
-     */
-    cinfo.err = jpeg_std_error(&jerr.pub);
-    jerr.pub.error_exit = my_error_exit ;
-    jerr.pub.output_message = my_output_message ;
-    /* Establish the setjmp return context for my_error_exit to use. */
-    if (setjmp(jerr.setjmp_buffer)) {
-	/* If we get here, the JPEG code has signaled an error.
-	 * We need to clean up the JPEG object, close the input file, and return.
-	 */
-	jpeg_destroy_compress(&cinfo);
-	free(scanline);
-	if (outfile) fclose(outfile);
-	return 0;
-    }
-    /* Now we can initialize the JPEG compression object. */
-    jpeg_create_compress(&cinfo);
-
-    /* Step 2: specify data destination (eg, a file) */
-    jpeg_stdio_dest(&cinfo, outfile);
-
-    /* Step 3: set parameters for compression */
-    /* First we supply a description of the input image.
-     * Four fields of the cinfo struct must be filled in:
-     */
-    cinfo.image_width = width;	/* image width and height, in pixels */
-    cinfo.image_height = height;
-    cinfo.input_components = 3;		/* # of color components per pixel */
-    cinfo.in_color_space = JCS_RGB;	/* colorspace of input image */
-    jpeg_set_defaults(&cinfo);
-    if(res > 0) {
-	cinfo.density_unit = 1;  /* pixels per inch */
-	cinfo.X_density = res;
-	cinfo.Y_density = res;
-    }
-    jpeg_set_quality(&cinfo, quality, TRUE);
-    /* Step 4: Start compressor */
-    jpeg_start_compress(&cinfo, TRUE);
-
-    /* Step 5: while (scan lines remain to be written) */
-    /*           jpeg_write_scanlines(...); */
-    for (i=0 ; i<height ; i++) {
-	/* Build the scanline */
-	pscanline = scanline;
-	for ( j=0 ; j<width ; j++) {
-	    col = gp(d, i, j) & 0xFFFFFF;
-	    *pscanline++ = GETRED(col) ;
-	    *pscanline++ = GETGREEN(col) ;
-	    *pscanline++ = GETBLUE(col) ;
-	}
-	jpeg_write_scanlines(&cinfo, (JSAMPARRAY) &scanline, 1);
-    }
-
-    /* Step 6: Finish compression */
-
-    jpeg_finish_compress(&cinfo);
-
-    /* Step 7: release JPEG compression object */
-
-    /* This is an important step since it will release a good deal of memory. */
-    free(scanline);
-    jpeg_destroy_compress(&cinfo);
-
-
-    /* And we're done! */
-    return 1;
-}
-
-#endif /* HAVE_JPEG */
-
-#ifdef HAVE_TIFF
-#include <tiffio.h>
-
-__declspec(dllexport)
-int R_SaveAsTIFF(void  *d, int width, int height,
-		unsigned int (*gp)(void *, int, int),
-		int bgr, const char *outfile, int res, int compression)
-{
-    TIFF *out;
-    int sampleperpixel;
-    tsize_t linebytes;
-    unsigned char *buf, *pscanline;
-    unsigned int col, i, j;
-    int have_alpha = 0;
-
-    DECLARESHIFTS;
-
-    for (i = 0; i < height; i++)
-	for (j = 0; j < width; j++) {
-	    col = gp(d,i,j);
-	    if (GETALPHA(col) < 255) {
-		have_alpha = 1;
-		break;
-	    }
-	}
-    sampleperpixel = 3 + have_alpha;
-
-    out = TIFFOpen(outfile, "w");
-    if (!out) {
-	warning("unable to open TIFF file '%s'", outfile);
-	return 0;
-    }
-    TIFFSetField(out, TIFFTAG_IMAGEWIDTH, width);
-    TIFFSetField(out, TIFFTAG_IMAGELENGTH, height);
-    TIFFSetField(out, TIFFTAG_SAMPLESPERPIXEL, sampleperpixel);
-    TIFFSetField(out, TIFFTAG_BITSPERSAMPLE, 8);
-    TIFFSetField(out, TIFFTAG_ORIENTATION, ORIENTATION_TOPLEFT);
-    TIFFSetField(out, TIFFTAG_PLANARCONFIG, PLANARCONFIG_CONTIG);
-    TIFFSetField(out, TIFFTAG_PHOTOMETRIC, PHOTOMETRIC_RGB);
-#if 0
-    /* Possible compression values
-       COMPRESSION_NONE = 1;
-       COMPRESSION_CCITTRLE = 2;
-       COMPRESSION_CCITTFAX3 = COMPRESSION_CCITT_T4 = 3;
-       COMPRESSION_CCITTFAX4 = COMPRESSION_CCITT_T6 = 4;
-       COMPRESSION_LZW = 5;
-       COMPRESSION_JPEG = 7;
-       COMPRESSION_DEFLATE = 32946;
-       COMPRESSION_ADOBE_DEFLATE = 8;
-    */
-    TIFFSetField(out, TIFFTAG_COMPRESSION, COMPRESSION_NONE);
-#endif
-    if(compression > 1) {
-	if (compression > 10) {
-	    TIFFSetField(out, TIFFTAG_COMPRESSION, compression - 10);
-	    TIFFSetField(out, TIFFTAG_PREDICTOR, 2);
-	} else 
-	    TIFFSetField(out, TIFFTAG_COMPRESSION, compression);
-    }
-
-    if (res > 0) {
-	TIFFSetField(out, TIFFTAG_RESOLUTIONUNIT, RESUNIT_INCH);
-	TIFFSetField(out, TIFFTAG_XRESOLUTION, (float) res);
-	TIFFSetField(out, TIFFTAG_YRESOLUTION, (float) res);
-    }
-
-    linebytes = sampleperpixel * width;
-    if (TIFFScanlineSize(out))
-	buf =(unsigned char *)_TIFFmalloc(linebytes);
-    else
-	buf = (unsigned char *)_TIFFmalloc(TIFFScanlineSize(out));
-
-    for (i = 0; i < height; i++) {
-	pscanline = buf;
-	for(j = 0; j < width; j++) {
-	    col = gp(d, i, j);
-	    *pscanline++ = GETRED(col) ;
-	    *pscanline++ = GETGREEN(col) ;
-	    *pscanline++ = GETBLUE(col) ;
-	    if(have_alpha) *pscanline++ = GETALPHA(col) ;
-	}
-	TIFFWriteScanline(out, buf, i, 0);
-    }
-    TIFFClose(out);
-    _TIFFfree(buf);
-    return 1;
-}
-#endif  /* HAVE_TIFF */
-
-
-/*
- * Try to save the content of the device 'd' in 'filename' as Windows BMP.
- * If numbers of colors is less than 256 we use a 'palette' BMP.
- * Return 1 on success, 0 on failure
-*/
-
-#define BMPERROR {R_ShowMessage("Problems writing to 'bmp' file");return 0;}
-#define BMPW(a) {wrd=a;if(fwrite(&wrd,sizeof(unsigned short),1,fp)!=1) BMPERROR}
-#define BMPDW(a) {dwrd=a;if(fwrite(&dwrd,sizeof(unsigned int),1,fp)!=1) BMPERROR}
-#define BMPPUTC(a) if(fputc(a,fp)==EOF) BMPERROR;
-#define HEADERSIZE 54
-
-__declspec(dllexport)
-int R_SaveAsBmp(void  *d, int width, int height,
-		unsigned int (*gp)(void *, int, int), int bgr, FILE *fp,
-		int res)
-{
-    unsigned int  col, palette[256];
-    int i, j, r, ncols, mid, high, low, withpalette;
-    int bfOffBits, bfSize, biBitCount, biClrUsed , pad;
-    unsigned short wrd;
-    unsigned int dwrd;
-    int lres;
-    DECLARESHIFTS;
-
-    if (fp == NULL)
-	return 0;
-
-    /* Have we less than 256 different colors? */
-    ncols = mid = 0;
-    withpalette = 1;
-    for (i = 0; i < 256 ; i++) palette[i] = 0;
-    for (i = 0; (i < height) && withpalette ; i++) {
-	for (j = 0; (j < width) && withpalette ; j++) {
-	    col = gp(d,i,j) & 0xFFFFFF ;
-	    /* binary search the palette: */
-	    low = 0;
-	    high = ncols - 1;
-	    while (low <= high) {
-		mid = (low + high)/2;
-		if ( col < palette[mid] ) high = mid - 1;
-		else if ( col > palette[mid] ) low  = mid + 1;
-		else break;
-	    }
-	    if (high < low) {
-		/* didn't find colour in palette, insert it: */
-		if (ncols >= 256) {
-		    withpalette = 0;
-		} else {
-		    for (r = ncols; r > low; r--)
-			palette[r] = palette[r-1] ;
-		    palette[low] = col;
-		    ncols ++;
-		}
-	    }
-	}
-    }
-    /* Compute some part of the header */
-    if (withpalette) {
-	bfOffBits = HEADERSIZE + 4 * 256;
-	bfSize = bfOffBits + width * height ;
-	biBitCount = 8;
-	biClrUsed = 256;
-    } else {
-	bfOffBits = HEADERSIZE + 4;
-	bfSize = bfOffBits + 3 * width * height ;
-	biBitCount = 24;
-	biClrUsed = 0;
-    }
-
-    /* write the header */
-
-    BMPPUTC('B');BMPPUTC('M');
-    BMPDW(bfSize); /*bfSize*/
-    BMPW(0);BMPW(0); /* bfReserved1 and bfReserved2 must be 0*/
-    BMPDW(bfOffBits); /* bfOffBits */
-    BMPDW(40);	/* Windows V3. size 40 bytes */
-    BMPDW(width); /* biWidth */
-    BMPDW(height); /* biHeight */
-    BMPW(1);	/* biPlanes - must be 1 */
-    BMPW(biBitCount); /* biBitCount */
-    BMPDW(0); /* biCompression=BI_RGB */
-    BMPDW(0); /* biSizeImage (with BI_RGB not needed)*/
-    if (res > 0)
-	lres = (int)(0.5 + res/0.0254);
-    else lres = 2835; // 72ppi = 2835 pixels/metre.
-    BMPDW(lres); /* XPels/M */
-    BMPDW(lres); /* XPels/M */
-    BMPDW(biClrUsed); /* biClrUsed */
-    BMPDW(0) ; /* biClrImportant All colours are important */
-
-    /* and now the image */
-    if (withpalette) {
-	/* 8 bit image; write the palette */
-	for (i = 0; i < 256; i++) {
-	    col = palette[i];
-	    BMPPUTC(GETBLUE(col));
-	    BMPPUTC(GETGREEN(col));
-	    BMPPUTC(GETRED(col));
-	    BMPPUTC(0);
-	}
-	/* Rows must be padded to 4-byte boundary */
-	for (pad = 0; ((width+pad) & 3) != 0; pad++);
-	/* and then the pixels */
-	for (i = height-1 ; i >= 0 ; i--) {
-	    for (j = 0 ; j < width ; j++) {
-		col = gp(d, i, j) & 0xFFFFFF;
-		/* binary search the palette (the colour must be there): */
-		low = 0;  high = ncols - 1;
-		while (low <= high) {
-		    mid = (low + high)/2;
-		    if      (col < palette[mid]) high = mid - 1;
-		    else if (col > palette[mid]) low  = mid + 1;
-		    else break;
-		}
-		BMPPUTC(mid);
-	    }
-	    for (j = 0; j < pad; j++) BMPPUTC(0);
-	}
-    } else {
-	/* 24 bits image */
-	BMPDW(0); /* null bmiColors */
-	for (pad = 0; ((3*width+pad) & 3) != 0; pad++); /*padding*/
-	for (i = height-1 ; i>=0 ; i--) {
-	    for (j = 0 ; j < width ; j++) {
-		col = gp(d, i, j) & 0xFFFFFF;
-		BMPPUTC(GETBLUE(col));
-		BMPPUTC(GETGREEN(col));
-		BMPPUTC(GETRED(col));
-	    }
-	    for (j = 0; j < pad; j++) BMPPUTC(0);
-	}
-    }
-    return 1;
-}
diff --git a/src/gnuwin32/bitmap/tif_config.h b/src/gnuwin32/bitmap/tif_config.h
deleted file mode 100644
index e701398..0000000
--- a/src/gnuwin32/bitmap/tif_config.h
+++ /dev/null
@@ -1,359 +0,0 @@
-/* libtiff/tif_config.h.  Generated by configure.  */
-/* libtiff/tif_config.h.in.  Generated from configure.ac by autoheader.  */
-
-/* Support CCITT Group 3 & 4 algorithms */
-#define CCITT_SUPPORT 1
-
-/* Pick up YCbCr subsampling info from the JPEG data stream to support files
-   lacking the tag (default enabled). */
-#define CHECK_JPEG_YCBCR_SUBSAMPLING 1
-
-/* Support C++ stream API (requires C++ compiler) */
-#define CXX_SUPPORT 1
-
-/* Treat extra sample as alpha (default enabled). The RGBA interface will
-   treat a fourth sample with no EXTRASAMPLE_ value as being ASSOCALPHA. Many
-   packages produce RGBA files but don't mark the alpha properly. */
-#define DEFAULT_EXTRASAMPLE_AS_ALPHA 1
-
-/* Use the Apple OpenGL framework. */
-/* #undef HAVE_APPLE_OPENGL_FRAMEWORK */
-
-/* Define to 1 if you have the <assert.h> header file. */
-#define HAVE_ASSERT_H 1
-
-/* Define to 1 if you have the <dlfcn.h> header file. */
-/* #undef HAVE_DLFCN_H */
-
-/* Define to 1 if you have the <fcntl.h> header file. */
-#define HAVE_FCNTL_H 1
-
-/* Define to 1 if you have the `floor' function. */
-#define HAVE_FLOOR 1
-
-/* Define to 1 if you have the `getopt' function. */
-#define HAVE_GETOPT 1
-
-/* Define as 0 or 1 according to the floating point format suported by the
-   machine */
-#define HAVE_IEEEFP 1
-
-/* Define to 1 if the system has the type `int16'. */
-/* #undef HAVE_INT16 */
-
-/* Define to 1 if the system has the type `int32'. */
-/* #undef HAVE_INT32 */
-
-/* Define to 1 if the system has the type `int8'. */
-/* #undef HAVE_INT8 */
-
-/* Define to 1 if you have the <inttypes.h> header file. */
-#define HAVE_INTTYPES_H 1
-
-/* Define to 1 if you have the <io.h> header file. */
-#define HAVE_IO_H 1
-
-/* Define to 1 if you have the `isascii' function. */
-#define HAVE_ISASCII 1
-
-/* Define to 1 if you have the `jbg_newlen' function. */
-#undef HAVE_JBG_NEWLEN
-
-/* Define to 1 if you have the `lfind' function. */
-#define HAVE_LFIND 1
-
-/* Define to 1 if you have the `c' library (-lc). */
-/* #undef HAVE_LIBC */
-
-/* Define to 1 if you have the `m' library (-lm). */
-/* #undef HAVE_LIBM */
-
-/* Define to 1 if you have the <limits.h> header file. */
-#define HAVE_LIMITS_H 1
-
-/* Define to 1 if you have the <malloc.h> header file. */
-#define HAVE_MALLOC_H 1
-
-/* Define to 1 if you have the `memmove' function. */
-#define HAVE_MEMMOVE 1
-
-/* Define to 1 if you have the <memory.h> header file. */
-#define HAVE_MEMORY_H 1
-
-/* Define to 1 if you have the `memset' function. */
-#define HAVE_MEMSET 1
-
-/* Define to 1 if you have the `mmap' function. */
-/* #undef HAVE_MMAP */
-
-/* Define to 1 if you have the `pow' function. */
-#define HAVE_POW 1
-
-/* Define if you have POSIX threads libraries and header files. */
-/* #undef HAVE_PTHREAD */
-
-/* Define to 1 if you have the <search.h> header file. */
-#define HAVE_SEARCH_H 1
-
-/* Define to 1 if you have the `setmode' function. */
-#define HAVE_SETMODE 1
-
-/* Define to 1 if you have the `sqrt' function. */
-#define HAVE_SQRT 1
-
-/* Define to 1 if you have the <stdint.h> header file. */
-#define HAVE_STDINT_H 1
-
-/* Define to 1 if you have the <stdlib.h> header file. */
-#define HAVE_STDLIB_H 1
-
-/* Define to 1 if you have the `strcasecmp' function. */
-#define HAVE_STRCASECMP 1
-
-/* Define to 1 if you have the `strchr' function. */
-#define HAVE_STRCHR 1
-
-/* Define to 1 if you have the <strings.h> header file. */
-#define HAVE_STRINGS_H 1
-
-/* Define to 1 if you have the <string.h> header file. */
-#define HAVE_STRING_H 1
-
-/* Define to 1 if you have the `strrchr' function. */
-#define HAVE_STRRCHR 1
-
-/* Define to 1 if you have the `strstr' function. */
-#define HAVE_STRSTR 1
-
-/* Define to 1 if you have the `strtol' function. */
-#define HAVE_STRTOL 1
-
-/* Define to 1 if you have the `strtoul' function. */
-#define HAVE_STRTOUL 1
-
-/* Define to 1 if you have the `strtoull' function. */
-#undef HAVE_STRTOULL
-
-/* Define to 1 if you have the <sys/stat.h> header file. */
-#define HAVE_SYS_STAT_H 1
-
-/* Define to 1 if you have the <sys/time.h> header file. */
-#define HAVE_SYS_TIME_H 1
-
-/* Define to 1 if you have the <sys/types.h> header file. */
-#define HAVE_SYS_TYPES_H 1
-
-/* Define to 1 if you have the <unistd.h> header file. */
-#define HAVE_UNISTD_H 1
-
-/* Define to 1 if you have the <windows.h> header file. */
-#define HAVE_WINDOWS_H 1
-
-/* Native cpu byte order: 1 if big-endian (Motorola) or 0 if little-endian
-   (Intel) */
-#define HOST_BIGENDIAN 0
-
-/* Set the native cpu bit order (FILLORDER_LSB2MSB or FILLORDER_MSB2LSB) */
-#define HOST_FILLORDER FILLORDER_LSB2MSB
-
-/* Support ISO JBIG compression (requires JBIG-KIT library) */
-/* #undef JBIG_SUPPORT */
-
-/* 8/12 bit libjpeg dual mode enabled */
-#undef JPEG_DUAL_MODE_8_12
-
-/* Support JPEG compression (requires IJG JPEG library) */
-/* #undef JPEG_SUPPORT */
-
-/* 12bit libjpeg primary include file with path */
-#undef LIBJPEG_12_PATH
-
-/* Support LogLuv high dynamic range encoding */
-#define LOGLUV_SUPPORT 1
-
-/* Define to the sub-directory in which libtool stores uninstalled libraries.
-   */
-#define LT_OBJDIR ".libs/"
-
-/* Support LZW algorithm */
-#define LZW_SUPPORT 1
-
-/* Support Microsoft Document Imaging format */
-#define MDI_SUPPORT 1
-
-/* Support NeXT 2-bit RLE algorithm */
-#define NEXT_SUPPORT 1
-
-/* Define to 1 if your C compiler doesn't accept -c and -o together. */
-/* #undef NO_MINUS_C_MINUS_O */
-
-/* Support Old JPEG compresson (read-only) */
-#undef OJPEG_SUPPORT
-
-/* Name of package */
-#define PACKAGE "tiff"
-
-/* Define to the address where bug reports for this package should be sent. */
-#define PACKAGE_BUGREPORT "tiff at lists.maptools.org"
-
-/* Define to the full name of this package. */
-#define PACKAGE_NAME "LibTIFF Software"
-
-/* Define to the full name and version of this package. */
-#define PACKAGE_STRING "LibTIFF Software 3.8.2"
-
-/* Define to the one symbol short name of this package. */
-#define PACKAGE_TARNAME "tiff"
-
-/* Define to the home page for this package. */
-#undef PACKAGE_URL
-
-/* Define to the version of this package. */
-#define PACKAGE_VERSION "3.8.2"
-
-/* Support Macintosh PackBits algorithm */
-#define PACKBITS_SUPPORT 1
-
-/* Support Pixar log-format algorithm (requires Zlib) */
-/* #undef PIXARLOG_SUPPORT */
-
-/* Define to necessary symbol if this constant uses a non-standard name on
-   your system. */
-/* #undef PTHREAD_CREATE_JOINABLE */
-
-/* The size of a `int', as computed by sizeof. */
-#define SIZEOF_INT 4
-
-/* The size of `long', as computed by sizeof. */
-#define SIZEOF_LONG 4
-
-/* The size of `signed int', as computed by sizeof. */
-#define SIZEOF_SIGNED_INT 4
-
-/* The size of `signed long', as computed by sizeof. */
-#define SIZEOF_SIGNED_LONG 4
-
-/* The size of `signed long long', as computed by sizeof. */
-#define SIZEOF_SIGNED_LONG_LONG 8
-
-/* The size of `signed short', as computed by sizeof. */
-#define SIZEOF_SIGNED_SHORT 2
-
-/* The size of `unsigned char *', as computed by sizeof. */
-#define SIZEOF_UNSIGNED_CHAR_P 2
-
-/* The size of `unsigned int', as computed by sizeof. */
-#define SIZEOF_UNSIGNED_INT 4
-
-/* The size of `unsigned long', as computed by sizeof. */
-#define SIZEOF_UNSIGNED_LONG 4
-
-/* The size of `unsigned long long', as computed by sizeof. */
-#define SIZEOF_UNSIGNED_LONG_LONG 8
-
-/* The size of `unsigned short', as computed by sizeof. */
-#define SIZEOF_UNSIGNED_SHORT 2
-
-/* Define to 1 if you have the ANSI C header files. */
-#define STDC_HEADERS 1
-
-/* Support strip chopping (whether or not to convert single-strip uncompressed
-   images to mutiple strips of specified size to reduce memory usage) */
-#define STRIPCHOP_DEFAULT TIFF_STRIPCHOP
-
-/* Default size of the strip in bytes (when strip chopping enabled) */
-#define STRIP_SIZE_DEFAULT 8192
-
-/* Enable SubIFD tag (330) support */
-#define SUBIFD_SUPPORT 1
-
-/* Support ThunderScan 4-bit RLE algorithm */
-#define THUNDER_SUPPORT 1
-
-/* Signed 16-bit type */
-#define TIFF_INT16_T short
-
-/* Signed 32-bit type formatter */
-#define TIFF_INT32_FORMAT "%d"
-
-/* Signed 32-bit type */
-#define TIFF_INT32_T int
-
-/* Signed 64-bit type formatter */
-#define TIFF_INT64_FORMAT "%lld"
-
-/* Signed 64-bit type */
-#define TIFF_INT64_T long long
-
-/* Signed 8-bit type */
-#define TIFF_INT8_T signed char
-
-/* Pointer difference type formatter */
-#define TIFF_PTRDIFF_FORMAT "%d"
-
-/* Pointer difference type */
-#define TIFF_PTRDIFF_T ptrdiff_t
-
-/* Signed size type formatter */
-#define TIFF_SSIZE_FORMAT "%d"
-
-/* Signed size type */
-#define TIFF_SSIZE_T ssize_t
-
-/* Unsigned 8-bit type */
-#define TIFF_UINT8_T unsigned char
-
-/* Unsigned 16-bit type */
-#define TIFF_UINT16_T unsigned short
-
-/* Unsigned 32-bit type formatter */
-#define TIFF_UINT32_FORMAT "%u"
-
-/* Unsigned 32-bit type */
-#define TIFF_UINT32_T unsigned int
-
-/* Unsigned 64-bit type formatter */
-#define TIFF_UINT64_FORMAT "%llu"
-
-/* Unsigned 64-bit type */
-#define TIFF_UINT64_T unsigned long long
-
-/* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */
-#define TIME_WITH_SYS_TIME 1
-
-/* Define to 1 if your <sys/time.h> declares `struct tm'. */
-/* #undef TM_IN_SYS_TIME */
-
-/* Version number of package */
-#define VERSION "3.8.2"
-
-/* Define to 1 if your processor stores words with the most significant byte
-   first (like Motorola and SPARC, unlike Intel and VAX). */
-/* #undef WORDS_BIGENDIAN */
-
-/* Define to 1 if the X Window System is missing or not being used. */
-#define X_DISPLAY_MISSING 1
-
-/* Support Deflate compression */
-/* #undef ZIP_SUPPORT */
-
-/* Number of bits in a file offset, on hosts where this is settable. */
-/* #undef _FILE_OFFSET_BITS */
-
-/* Define for large files, on AIX-style hosts. */
-/* #undef _LARGE_FILES */
-
-/* Define to empty if `const' does not conform to ANSI C. */
-/* #undef const */
-
-/* Define to `__inline__' or `__inline' if that's what the C compiler
-   calls it, or to nothing if 'inline' is not supported under any name.  */
-#ifndef __cplusplus
-/* #undef inline */
-#endif
-
-/* Define to `long int' if <sys/types.h> does not define. */
-/* #undef off_t */
-
-/* Define to `unsigned int' if <sys/types.h> does not define. */
-/* #undef size_t */
diff --git a/src/gnuwin32/bitmap/tiffconf.h b/src/gnuwin32/bitmap/tiffconf.h
deleted file mode 100644
index d6e5a47..0000000
--- a/src/gnuwin32/bitmap/tiffconf.h
+++ /dev/null
@@ -1,133 +0,0 @@
-/* libtiff/tiffconf.h.  Generated by configure.  */
-/*
-  Configuration defines for installed libtiff.
-  This file maintained for backward compatibility. Do not use definitions
-  from this file in your programs.
-*/
-
-#ifndef _TIFFCONF_
-#define _TIFFCONF_
-
-/* Signed 16-bit type */
-#define TIFF_INT16_T short
-
-/* Signed 32-bit type */
-#define TIFF_INT32_T int
-
-/* Signed 64-bit type */
-#define TIFF_INT64_T long long
-
-/* Signed 8-bit type */
-#define TIFF_INT8_T signed char
-
-/* Unsigned 16-bit type */
-#define TIFF_UINT16_T unsigned short
-
-/* Unsigned 32-bit type */
-#define TIFF_UINT32_T unsigned int
-
-/* Unsigned 64-bit type */
-#define TIFF_UINT64_T unsigned long long
-
-/* Unsigned 8-bit type */
-#define TIFF_UINT8_T unsigned char
-
-/* Signed size type */
-#define TIFF_SSIZE_T ssize_t
-
-/* Pointer difference type */
-#define TIFF_PTRDIFF_T ptrdiff_t
-
-
-/* Define to 1 if the system has the type `int16'. */
-/* #undef HAVE_INT16 */
-
-/* Define to 1 if the system has the type `int32'. */
-/* #undef HAVE_INT32 */
-
-/* Define to 1 if the system has the type `int8'. */
-/* #undef HAVE_INT8 */
-
-/* The size of a `int', as computed by sizeof. */
-#define SIZEOF_INT 4
-
-/* The size of a `long', as computed by sizeof. */
-#define SIZEOF_LONG 4
-
-
-/* Compatibility stuff. */
-
-/* Define as 0 or 1 according to the floating point format suported by the
-   machine */
-#define HAVE_IEEEFP 1
-
-/* Set the native cpu bit order (FILLORDER_LSB2MSB or FILLORDER_MSB2LSB) */
-#define HOST_FILLORDER FILLORDER_LSB2MSB
-
-/* Native cpu byte order: 1 if big-endian (Motorola) or 0 if little-endian
-   (Intel) */
-#define HOST_BIGENDIAN 0
-
-/* Support CCITT Group 3 & 4 algorithms */
-#define CCITT_SUPPORT 1
-
-/* Support JPEG compression (requires IJG JPEG library) */
-/* #undef JPEG_SUPPORT */
-
-/* Support LogLuv high dynamic range encoding */
-#define LOGLUV_SUPPORT 1
-
-/* Support LZW algorithm */
-#define LZW_SUPPORT 1
-
-/* Support NeXT 2-bit RLE algorithm */
-#define NEXT_SUPPORT 1
-
-/* Support Old JPEG compresson (read contrib/ojpeg/README first! Compilation
-   fails with unpatched IJG JPEG library) */
-/* #undef OJPEG_SUPPORT */
-
-/* Support Macintosh PackBits algorithm */
-#define PACKBITS_SUPPORT 1
-
-/* Support Pixar log-format algorithm (requires Zlib) */
-/* #undef PIXARLOG_SUPPORT */
-
-/* Support ThunderScan 4-bit RLE algorithm */
-#define THUNDER_SUPPORT 1
-
-/* Support Deflate compression */
-/* #undef ZIP_SUPPORT */
-
-/* Support strip chopping (whether or not to convert single-strip uncompressed
-   images to mutiple strips of ~8Kb to reduce memory usage) */
-#define STRIPCHOP_DEFAULT TIFF_STRIPCHOP
-
-/* Enable SubIFD tag (330) support */
-#define SUBIFD_SUPPORT 1
-
-/* Treat extra sample as alpha (default enabled). The RGBA interface will
-   treat a fourth sample with no EXTRASAMPLE_ value as being ASSOCALPHA. Many
-   packages produce RGBA files but don't mark the alpha properly. */
-#define DEFAULT_EXTRASAMPLE_AS_ALPHA 1
-
-/* Pick up YCbCr subsampling info from the JPEG data stream to support files
-   lacking the tag (default enabled). */
-#define CHECK_JPEG_YCBCR_SUBSAMPLING 1
-
-/* Support MS MDI magic number files as TIFF */
-#define MDI_SUPPORT 1
-
-/*
- * Feature support definitions.
- * XXX: These macros are obsoleted. Don't use them in your apps!
- * Macros stays here for backward compatibility and should be always defined.
- */
-#define COLORIMETRY_SUPPORT
-#define YCBCR_SUPPORT
-#define CMYK_SUPPORT
-#define ICC_SUPPORT
-#define PHOTOSHOP_SUPPORT
-#define IPTC_SUPPORT
-
-#endif /* _TIFFCONF_ */
diff --git a/src/gnuwin32/console.c b/src/gnuwin32/console.c
index 96b3e21..e7476d3 100644
--- a/src/gnuwin32/console.c
+++ b/src/gnuwin32/console.c
@@ -3,7 +3,7 @@
  *  file console.c
  *  Copyright (C) 1998--2003  Guido Masarotto and Brian Ripley
  *  Copyright (C) 2004-8      The R Foundation
- *  Copyright (C) 2004-2013   The R Core Team
+ *  Copyright (C) 2004-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
@@ -17,7 +17,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  */
 
 #ifdef HAVE_CONFIG_H
@@ -48,7 +48,7 @@ extern void R_WaitEvent(void);
 #include "consolestructs.h"
 #include "rui.h"
 #include "getline/wc_history.h"
-#include "Startup.h" /* for UImode */
+#include "Startup.h" /* for CharacterMode */
 #include <Fileio.h>
 
 #include <stdint.h>
@@ -70,8 +70,6 @@ extern void R_WaitEvent(void);
 # define alloca(x) __builtin_alloca((x))
 #endif
 
-extern UImode  CharacterMode;
-
 static void performCompletion(control c);
 
 
@@ -344,7 +342,7 @@ newconsoledata(font f, int rows, int cols, int bufbytes, int buflines,
 	p->lbuf = NULL;
 	p->kbuf = NULL;
     }
-    p->bm = NULL;
+    BM = NULL;
     p->rows = rows;
     p->cols = cols;
     for (int i=0; i<numGuiColors; i++)
@@ -355,10 +353,10 @@ newconsoledata(font f, int rows, int cols, int bufbytes, int buflines,
     WIDTH = (COLS + 1) * FW;
     HEIGHT = (ROWS + 1) * FH + 1; /* +1 avoids size problems in MDI */
     FV = FC = 0;
-    p->newfv = p->newfc = 0;
+    NEWFV = NEWFC = 0;
     p->firstkey = p->numkeys = 0;
     p->clp = NULL;
-    p->r = -1;
+    CURROW = -1;
     p->overwrite = 0;
     p->needredraw = 0;
     p->wipe_completion = 0;
@@ -429,7 +427,7 @@ static void writelineHelper(ConsoleData p, int fch, int lch,
 
     /* This is right, since columns are of fixed size */
     r = rect(BORDERX + fch * FW, BORDERY + j * FH, (lch - fch + 1) * FW, FH);
-    gfillrect(p->bm, bgr, r);
+    gfillrect(BM, bgr, r);
 
     if (len > FC+fch) {
 	/* Some of the string is visible: */
@@ -463,7 +461,7 @@ static void writelineHelper(ConsoleData p, int fch, int lch,
 	    if((len > FC+COLS) && (lch == COLS - 1)) *q++ = L'$';
 	    else *q++ = *P++;
 	    *q = L'\0';
-	    gdrawwcs(p->bm, p->f, fgr, pt(r.x, r.y), buff);
+	    gdrawwcs(BM, p->f, fgr, pt(r.x, r.y), buff);
 	} else {
 	    int last;
 	    wchar_t ch, chf, chl;
@@ -474,7 +472,7 @@ static void writelineHelper(ConsoleData p, int fch, int lch,
 	    } else chl = L'\0';
 	    last = FC + lch + 1;
 	    if (len > last) {ch = s[last]; s[last] = L'\0';} else ch = L'\0';
-	    gdrawwcs(p->bm, p->f, fgr, pt(r.x, r.y), &s[FC+fch]);
+	    gdrawwcs(BM, p->f, fgr, pt(r.x, r.y), &s[FC+fch]);
 	    /* restore the string */
 	    if (ch) s[last] = ch;
 	    if (chl) s[FC+lch] = chl;
@@ -551,7 +549,7 @@ static int writeline(control c, ConsoleData p, int i, int j)
     } else
 	WLHELPER(0, col1, fg, bg);
     /* This is the cursor, and it may need to be variable-width */
-    if ((p->r >= 0) && (CURCOL >= FC) && (CURCOL < FC + COLS) &&
+    if ((CURROW >= 0) && (CURCOL >= FC) && (CURCOL < FC + COLS) &&
 	(i == NUMLINES - 1) && (p->sel == 0 || !intersect_input(p, 0))) {
 	if (!p->overwrite) {
 	    if (p->cursor_blink) {
@@ -562,7 +560,7 @@ static int writeline(control c, ConsoleData p, int i, int j)
 	    
 	    if (p->cursor_blink < 2) {
 	    	r = rect(BORDERX + (CURCOL - FC) * FW, BORDERY + j * FH, FW/4, FH);
-	    	gfillrect(p->bm, highlight, r);
+	    	gfillrect(BM, highlight, r);
 	    }
 	} else if(mbcslocale) { /* determine the width of the current char */
 	    int w0;
@@ -583,8 +581,8 @@ static int writeline(control c, ConsoleData p, int i, int j)
 	    if (p->cursor_blink < 2) {
 	    	r = rect(BORDERX + (CURCOL - FC) * FW, BORDERY + j * FH,
 		         w0 * FW, FH);
-	    	gfillrect(p->bm, highlight, r);
-	    	gdrawwcs(p->bm, p->f, bg, pt(r.x, r.y), nn);
+	    	gfillrect(BM, highlight, r);
+	    	gdrawwcs(BM, p->f, bg, pt(r.x, r.y), nn);
 	    }
 	} else {
 	    if (p->cursor_blink) {
@@ -908,7 +906,7 @@ void set_completion_available(int x)
 static void performCompletion(control c)
 {
     ConsoleData p = getdata(c);
-    int i, alen, alen2, max_show = 10, cursor_position = p->c - prompt_wid;
+    int i, alen, alen2, max_show = 10, cursor_position = CURCOL - prompt_wid;
     wchar_t *partial_line = LINE(NUMLINES - 1) + prompt_wid;
     const char *additional_text;
     SEXP cmdSexp, cmdexpr, ans = R_NilValue;
@@ -947,14 +945,16 @@ static void performCompletion(control c)
 	}
     }
 
-    /* FIXME: need to escape quotes properly */
-    wchar_t *pline = (wchar_t*) R_alloc(wcslen(partial_line) + 1, sizeof(wchar_t));
-    wcscpy(pline, partial_line);
-    /* poor attempt at escaping quotes that sort of works */
-    alen = wcslen(pline);
-    for (i = 0; i < alen; i++)
-	if (pline[i] == '"') pline[i] = L'\'';
-
+    alen = wcslen(partial_line);
+    wchar_t orig[alen + 1], pline[2*alen + 1],
+            *pchar = pline, achar;
+    wcscpy(orig, partial_line);
+    for (i = 0; i < alen; i++) {
+        achar = orig[i];
+	if (achar == '"' || achar == '\\') *pchar++ = '\\';
+	*pchar++ = achar;
+    }
+    *pchar = 0;
     size_t len = wcslen(pline) + 100; 
     char cmd[len];
     snprintf(cmd, len, "utils:::.win32consoleCompletion(\"%ls\", %d)",
@@ -989,19 +989,21 @@ static void performCompletion(control c)
     alen2 = strlen(additional_text);
     if (alen) {
 	/* make a copy of the current string first */
-	wchar_t *p1 = LINE(NUMLINES - 1);
+	wchar_t p1[wcslen(LINE(NUMLINES - 1)) + 1];
+	wcscpy(p1, LINE(NUMLINES - 1));
 	checkpointpos(p->lbuf, 1);
 	size_t len = MB_CUR_MAX * wcslen(p1) + 1; 
-	char buf1[len];
-	snprintf(buf1, len, "%ls\n", p1);
+	char buf1[len+1];
+	snprintf(buf1, len+1, "%ls\n", p1);
 	consolewrites(c, buf1);
 
 	for (i = 0; i < min(alen, max_show); i++) {
+            consolewrites(c, "\n");
 	    consolewrites(c, CHAR(STRING_ELT(VECTOR_ELT(ans, POSSIBLE), i)));
-	    consolewrites(c, "\n");
 	}
 	if (alen > max_show)
-	    consolewrites(c, "\n[...truncated]\n");
+	    consolewrites(c, "\n[...truncated]");
+	consolewrites(c, "\n");
 	p->wipe_completion = 1;
     }
 
@@ -1060,9 +1062,9 @@ void consolecmd(control c, const char *cmd)
     storekey(c, '\n');
 /* if we are editing we save the actual line
    FIXME: not right if Unicode */
-    if (p->r > -1) {
+    if (CURROW > -1) {
 	char buf[2000], *cp; /* maximum 2 bytes/char */
-	wchar_t *wc = &(p->lbuf->s[p->lbuf->ns - 1][prompt_len]);
+	wchar_t *wc = &(LINE(NUMLINES - 1)[prompt_len]);
 	memset(buf, 0, 2000);
 	wcstombs(buf, wc, 1000);
 	for (cp = buf; *cp; cp++) storekey(c, *cp);
@@ -1532,7 +1534,7 @@ int consolewrites(control c, const char *s)
 	/* now zap it */
 	for(i = 0; i < len; i++) xbufaddxc(p->lbuf, L'\b');
 	if (incomplete) {
-	    p->lbuf->ns--;
+	    NUMLINES--;
 	    p->lbuf->free--;
 	    p->lbuf->av++;
 	}
@@ -1549,11 +1551,11 @@ int consolewrites(control c, const char *s)
     if (!p->lazyupdate) {
 	setfirstvisible(c, NUMLINES - ROWS);
 	REDRAW;
-    } else if (p->r >= 0)
+    } else if (CURROW >= 0)
 	setfirstvisible(c, NUMLINES - ROWS);
     else {
-	p->newfv = NUMLINES - ROWS;
-	if (p->newfv < 0) p->newfv = 0;
+	NEWFV = NUMLINES - ROWS;
+	if (NEWFV < 0) NEWFV = 0;
     }
     if(p->input) REDRAW;
     return 0;
@@ -1562,7 +1564,7 @@ int consolewrites(control c, const char *s)
 void freeConsoleData(ConsoleData p)
 {
     if (!p) return;
-    if (p->bm) del(p->bm);
+    if (BM) del(BM);
     if (p->kind == CONSOLE) {
 	if (p->lbuf) xbufdel(p->lbuf);
 	if (p->kbuf) free(p->kbuf);
@@ -1667,8 +1669,8 @@ static void draweditline(control c)
     if (p->needredraw) {
 	REDRAW;
     } else {
-	WRITELINE(NUMLINES - 1, p->r);
-	RSHOW(RLINE(p->r));
+	WRITELINE(NUMLINES - 1, CURROW);
+	RSHOW(RLINE(CURROW));
     }
 }
 
@@ -1719,14 +1721,14 @@ int consolereads(control c, const char *prompt, char *buf, int len,
     USER(NUMLINES - 1) = w0;
     prompt_wid = wcswidth(aLine);
     if (NUMLINES > ROWS) {
-	p->r = ROWS - 1;
-	p->newfv = NUMLINES - ROWS;
+	CURROW = ROWS - 1;
+	NEWFV = NUMLINES - ROWS;
     } else {
-	p->r = NUMLINES - 1;
-	p->newfv = 0;
+	CURROW = NUMLINES - 1;
+	NEWFV = 0;
     }
     CURCOL = prompt_wid;
-    p->fc = 0;
+    FC = 0;
     cur_pos = 0;
     max_pos = 0;
     cur_line = &aLine[prompt_len];
@@ -1744,11 +1746,11 @@ int consolereads(control c, const char *prompt, char *buf, int len,
 	    cur_line = LINE(NUMLINES - 1) + prompt_len;
 	    ns0 = NUMLINES;
 	    if (NUMLINES > ROWS) {
-		p->r = ROWS - 1;
-		p->newfv = NUMLINES - ROWS;
+		CURROW = ROWS - 1;
+		NEWFV = NUMLINES - ROWS;
 	    } else {
-		p->r = NUMLINES - 1;
-		p->newfv = 0;
+		CURROW = NUMLINES - 1;
+		NEWFV = 0;
 	    }
 	    USER(NUMLINES - 1) = prompt_wid;
 	    p->needredraw = 1;
@@ -1843,7 +1845,7 @@ int consolereads(control c, const char *prompt, char *buf, int len,
 		    wcstobuf(buf, len, cur_line);
 		    //sprintf(buf, "%ls", cur_line);
 		    //if(strlen(buf) == 0) strcpy(buf, "invalid input\n");
-		    p->r = -1;
+		    CURROW = -1;
 		    cur_line[max_pos] = L'\0';
 		    if (max_pos && addtohistory) wgl_histadd(cur_line);
 		    xbuffixl(p->lbuf);
@@ -1885,7 +1887,7 @@ int consolecols(console c)
 {
     ConsoleData p = getdata(c);
 
-    return p->cols;
+    return COLS;
 }
 
 void consoleresize(console c, rect r)
@@ -1912,6 +1914,8 @@ void consoleresize(console c, rect r)
     HEIGHT = r.height;
     BORDERX = (WIDTH - COLS*FW) / 2;
     BORDERY = (HEIGHT - ROWS*FH) / 2;
+    NEWFV = NUMLINES - ROWS;
+    if (NEWFV < 0) NEWFV = 0;
     del(BM);
     BM = newbitmap(r.width, r.height, 2);
     if (!BM) {
@@ -1920,11 +1924,11 @@ void consoleresize(console c, rect r)
     }
     if(!p->lbuf) return;;    /* don't implement resize if no content
 				   yet in pager */
-    if (p->r >= 0) {
+    if (CURROW >= 0) {
 	if (NUMLINES > ROWS) {
-	    p->r = ROWS - 1;
+	    CURROW = ROWS - 1;
 	} else
-	    p->r = NUMLINES - 1;
+	    CURROW = NUMLINES - 1;
     }
     clear(c);
     p->needredraw = 1;
@@ -2274,6 +2278,6 @@ void consoleclear(control c)
     xbufshift(l);
     l->shift = oldshift;
     NEWFV = 0;
-    p->r = 0;
+    CURROW = 0;
     REDRAW;
 }
diff --git a/src/gnuwin32/console.h b/src/gnuwin32/console.h
index 2bb35cd..bb0d439 100644
--- a/src/gnuwin32/console.h
+++ b/src/gnuwin32/console.h
@@ -16,7 +16,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  */
 
 typedef window console;
diff --git a/src/gnuwin32/consolestructs.h b/src/gnuwin32/consolestructs.h
index b05097d..cd5deba 100644
--- a/src/gnuwin32/consolestructs.h
+++ b/src/gnuwin32/consolestructs.h
@@ -15,7 +15,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  */
  
 #include "guicolors.h"
diff --git a/src/gnuwin32/cran/index.in b/src/gnuwin32/cran/index.in
index 57f01b0..42d878e 100644
--- a/src/gnuwin32/cran/index.in
+++ b/src/gnuwin32/cran/index.in
@@ -2,7 +2,7 @@
 
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
-<link rel="stylesheet" type="text/css" href="http://cran.r-project.org/R.css">
+<link rel="stylesheet" type="text/css" href="https://cran.r-project.org/R.css">
 <title>Download R- at RVER@ for Windows.  The R-project for statistical computing.</title>
 
 <style>
@@ -37,25 +37,25 @@
 <h1>R- at RVER@ for Windows (32/64 bit)</h1>
 
 <div class="download">
-  <p><a href="@RWVER at -win.exe">Download R @RVER@ for Windows</a> <span>(54 megabytes, 32/64 bit)</span></p>
+  <p><a href="@RWVER at -win.exe">Download R @RVER@ for Windows</a> <span>(62 megabytes, 32/64 bit)</span></p>
   <ul>
     <li><a href="../../windows/base/README. at RWVER@">Installation and other instructions</a></li>
     <li><a href="NEWS. at RWVER@.html">New features in this version</a></li>
   </ul>
 </div>
 
-<p>If you want to double-check that the package you have downloaded exactly matches the package distributed by R, you can compare the <a href="http://en.wikipedia.org/wiki/Md5sum">md5sum</a> of the .exe to the <a href="md5sum.txt">true fingerprint</a>.  You will need a version of md5sum for windows: both <a href="http://www.md5summer.org/">graphical</a> and <a href="http://www.etree.org/md5com.html">command line versions</a> are available.</p>
+<p>If you want to double-check that the package you have downloaded matches the package distributed by CRAN, you can compare the <a href="https://en.wikipedia.org/wiki/Md5sum">md5sum</a> of the .exe to the <a href="https://cran.r-project.org/bin/windows/base/md5sum.txt">fingerprint</a> on the master server.  You will need a version of md5sum for windows: both <a href="http://www.md5summer.org/">graphical</a> and <a href="http://www.etree.org/md5com.html">command line versions</a> are ava [...]
 
 <h2>Frequently asked questions</h2>
 
 <ul>
-  <li><a href="../../windows/base/rw-FAQ.html#Does-R-run-under-Windows-Vista_003f">How do I install R when using Windows Vista?</a></li>
+  <li><a href="../../windows/base/rw-FAQ.html#Does-R-run-under-Windows-Vista_003f">Does R run under my version of Windows?</a></li>
   <li><a href="../../windows/base/rw-FAQ.html#What_0027s-the-best-way-to-upgrade_003f">How do I update packages in my previous version of R?</a></li>
   <li><a href="../../windows/base/rw-FAQ.html#Should-I-run-32_002dbit-or-64_002dbit-R_003f">Should I run 32-bit or 64-bit R?</a></li>
 </ul>
   
 <p>Please see the <a
-href="http://cran.r-project.org/doc/FAQ/R-FAQ.html">R FAQ</a> for
+href="https://cran.r-project.org/doc/FAQ/R-FAQ.html">R FAQ</a> for
 general information about R and the <a href="../../windows/base/rw-FAQ.html">R Windows
 FAQ</a> for Windows-specific information.</p>
 
diff --git a/src/gnuwin32/cran/rdevel.in b/src/gnuwin32/cran/rdevel.in
index bb35646..7b6e218 100644
--- a/src/gnuwin32/cran/rdevel.in
+++ b/src/gnuwin32/cran/rdevel.in
@@ -2,7 +2,7 @@
 
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
-<link rel="stylesheet" type="text/css" href="http://cran.r-project.org/R.css">
+<link rel="stylesheet" type="text/css" href="https://cran.r-project.org/R.css">
 <title>Download the R-Devel build for Windows.  The R-project for statistical computing.</title>
 <style>
 .download {
@@ -36,11 +36,20 @@
 <h1>R-devel build for Windows (32/64 bit)</h1>
 
 <div class="download">
-  <p><a href="@RWVER at -win.exe">Download R-Devel build for Windows</a> <span>(54 megabytes, 32/64 bit)</span></p>
+  <p><a href="@RWVER at -win.exe">Download R-Devel build for Windows</a> <span>(62 megabytes, 32/64 bit)</span></p>
   <ul>
+    <li>This build of R-Devel uses the gcc 4.9.3 toolchain produced
+    by Jeroen Ooms.  For details, see <a href="https://github.com/rwinlib/r-base">the Github page</a>.</li>
     <li><a href="../../windows/base/README. at RWVER@">Installation and other instructions</a></li>
     <li><a href="NEWS. at RWVER@.html">New features in this version</a></li>
   </ul>
+  <p><a href="@RWVER at -463-win.exe">R-Devel build for Windows using older toolchain.</a> </p>
+  <ul>
+      <li>This is a build of R-Devel, using the previous gcc 4.6.3 toolchain.
+      It is not compatible with binary packages that were built with the newer toolchain, 
+      so it defaults
+      to source installs of packages.
+  </ul>
 </div>
 
 
@@ -56,14 +65,14 @@ them on the r-devel mailing list---but only if they persist for a few days.</p>
 <h2>Frequently asked questions</h2>
 
 <ul>
-  <li><a href="../../windows/base/rw-FAQ.html#Does-R-run-under-Windows-Vista_003f">How
-  do I install R when using Windows 7 or Vista?</a></li>
+  <li><a href="../../windows/base/rw-FAQ.html#Does-R-run-under-Windows-Vista_003f">Does
+  R run under my version of Windows?</a></li>
   <li><a href="../../windows/base/rw-FAQ.html#What_0027s-the-best-way-to-upgrade_003f">How do I update packages in my previous version of R?</a></li>
   <li><a href="../../windows/base/rw-FAQ.html#Should-I-run-32_002dbit-or-64_002dbit-R_003f">Should I run 32-bit or 64-bit R?</a></li>
 </ul>
   
 <p>Please see the <a
-href="http://cran.r-project.org/doc/FAQ/R-FAQ.html">R FAQ</a> for
+href="https://cran.r-project.org/doc/FAQ/R-FAQ.html">R FAQ</a> for
 general information about R and the <a href="../../windows/base/rw-FAQ.html">R Windows
 FAQ</a> for Windows-specific information.</p>
 
diff --git a/src/gnuwin32/cran/rpatched.in b/src/gnuwin32/cran/rpatched.in
index c750adc..ea352bd 100644
--- a/src/gnuwin32/cran/rpatched.in
+++ b/src/gnuwin32/cran/rpatched.in
@@ -2,7 +2,7 @@
 
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
-<link rel="stylesheet" type="text/css" href="http://cran.r-project.org/R.css">
+<link rel="stylesheet" type="text/css" href="https://cran.r-project.org/R.css">
 <title>Download the R- at FULLVERSION@ build for Windows.  The R-project for statistical computing.</title>
 <style>
 .download {
@@ -36,7 +36,7 @@
 <h1>R- at FULLVERSION@ build for Windows (32/64 bit)</h1>
 
 <div class="download">
-  <p><a href="@RWVER at -win.exe">Download R- at FULLVERSION@ build for Windows</a> <span>(54 megabytes, 32/64 bit)</span></p>
+  <p><a href="@RWVER at -win.exe">Download R- at FULLVERSION@ build for Windows</a> <span>(62 megabytes, 32/64 bit)</span></p>
   <ul>
     <li><a href="../../windows/base/README. at RWVER@">Installation and other instructions</a></li>
     <li><a href="NEWS. at RWVER@.html">New features in this version</a></li>
@@ -52,14 +52,14 @@ in this version against the official release before reporting them. </p>
 <h2>Frequently asked questions</h2>
 
 <ul>
-  <li><a href="../../windows/base/rw-FAQ.html#Does-R-run-under-Windows-Vista_003f">How
-  do I install R when using Windows 7 or Vista?</a></li>
+  <li><a href="../../windows/base/rw-FAQ.html#Does-R-run-under-Windows-Vista_003f">Does
+  R run under my version of Windows?</a></li>
   <li><a href="../../windows/base/rw-FAQ.html#What_0027s-the-best-way-to-upgrade_003f">How do I update packages in my previous version of R?</a></li>
   <li><a href="../../windows/base/rw-FAQ.html#Should-I-run-32_002dbit-or-64_002dbit-R_003f">Should I run 32-bit or 64-bit R?</a></li>
 </ul>
   
 <p>Please see the <a
-href="http://cran.r-project.org/doc/FAQ/R-FAQ.html">R FAQ</a> for
+href="https://cran.r-project.org/doc/FAQ/R-FAQ.html">R FAQ</a> for
 general information about R and the <a href="../../windows/base/rw-FAQ.html">R Windows
 FAQ</a> for Windows-specific information.</p>
 
diff --git a/src/gnuwin32/cran/rtest.in b/src/gnuwin32/cran/rtest.in
index 58512dc..05ec7ea 100644
--- a/src/gnuwin32/cran/rtest.in
+++ b/src/gnuwin32/cran/rtest.in
@@ -2,7 +2,7 @@
 
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
-<link rel="stylesheet" type="text/css" href="http://cran.r-project.org/R.css">
+<link rel="stylesheet" type="text/css" href="https://cran.r-project.org/R.css">
 <title>Download the R- at FULLVERSION@ build for Windows.  The R-project for statistical computing.</title>
 <style>
 .download {
@@ -36,7 +36,7 @@
 <h1>R- at FULLVERSION@ build for Windows (32/64 bit)</h1>
 
 <div class="download">
-  <p><a href="@RWVER at -win.exe">Download R- at FULLVERSION@ build for Windows</a> <span>(54 megabytes, 32/64 bit)</span></p>
+  <p><a href="@RWVER at -win.exe">Download R- at FULLVERSION@ build for Windows</a> <span>(62 megabytes, 32/64 bit)</span></p>
   <ul>
     <li><a href="../../windows/base/README. at RWVER@">Installation and other instructions</a></li>
     <li><a href="NEWS. at RWVER@.html">New features in this version</a></li>
@@ -52,13 +52,13 @@ in this version on the R-devel mailing list. </p>
 <h2>Frequently asked questions</h2>
 
 <ul>
-  <li><a href="../../windows/base/rw-FAQ.html#Does-R-run-under-Windows-Vista_003f">How do I install R when using Windows Vista?</a></li>
+  <li><a href="../../windows/base/rw-FAQ.html#Does-R-run-under-Windows-Vista_003f">Does R run under my version of Windows?</a></li>
   <li><a href="../../windows/base/rw-FAQ.html#What_0027s-the-best-way-to-upgrade_003f">How do I update packages in my previous version of R?</a></li>
   <li><a href="../../windows/base/rw-FAQ.html#Should-I-run-32_002dbit-or-64_002dbit-R_003f">Should I run 32-bit or 64-bit R?</a></li>
 </ul>
   
 <p>Please see the <a
-href="http://cran.r-project.org/doc/FAQ/R-FAQ.html">R FAQ</a> for
+href="https://cran.r-project.org/doc/FAQ/R-FAQ.html">R FAQ</a> for
 general information about R and the <a href="../../windows/base/rw-FAQ.html">R Windows
 FAQ</a> for Windows-specific information.</p>
 
diff --git a/src/gnuwin32/dllversion.rc b/src/gnuwin32/dllversion.rc
index 46f4415..8d1ab84 100644
--- a/src/gnuwin32/dllversion.rc
+++ b/src/gnuwin32/dllversion.rc
@@ -16,7 +16,7 @@ BEGIN
             VALUE "FileVersion", R_MAJOR "." R_MINOR " " R_STATUS " (" R_YEAR "-" R_MONTH "-" R_DAY ")\0"
             VALUE "LegalCopyright", "R Core Team 1995-" R_YEAR "\0"
             VALUE "R Version", R_MAJOR "." R_MINOR " " R_STATUS " (" R_YEAR "-" R_MONTH "-" R_DAY ")\0"
-            VALUE "Project info", "http://www.r-project.org\0"
+            VALUE "Project info", "https://www.r-project.org\0"
         END
     END
     BLOCK "VarFileInfo"
diff --git a/src/gnuwin32/dynload.c b/src/gnuwin32/dynload.c
index 89d2ece..327410a 100644
--- a/src/gnuwin32/dynload.c
+++ b/src/gnuwin32/dynload.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-2013 The R Core Team
+ *  Copyright (C) 1997-2014 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
@@ -15,7 +15,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  */
 
 /*  Dynamic Loading Support: See ../main/Rdynload.c and ../include/Rdynpriv.h
diff --git a/src/gnuwin32/editor.c b/src/gnuwin32/editor.c
index 3e46599..de2f8a0 100644
--- a/src/gnuwin32/editor.c
+++ b/src/gnuwin32/editor.c
@@ -1,6 +1,6 @@
 /*
  *  R : A Computer Language for Statistical Data Analysis
- *  Copyright (C) 1999-2013  The R Core Team
+ *  Copyright (C) 1999-2014  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
@@ -14,7 +14,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  */
 
 
@@ -31,7 +31,6 @@
 #include <Fileio.h>
 #include <stdio.h>
 #include <Startup.h>
-extern UImode  CharacterMode;
 #include "graphapp/ga.h"
 #include "graphapp/graphapp.h"
 #include "graphapp/stdimg.h"
@@ -739,7 +738,7 @@ static editor neweditor(void)
     MCHECK(m = newmenuitem(G_("Save as..."), 0, menueditorsaveas));
     setdata(m, c);
     MCHECK(m = newmenuitem("-", 0, NULL));
-    MCHECK(m = newmenuitem(G_("Print..."), 0, editorprint));
+    MCHECK(m = newmenuitem(G_("Print..."), 'P', editorprint));
     setdata(m, t);
     MCHECK(m = newmenuitem("-", 0, NULL));
     MCHECK(m = newmenuitem(G_("Close script"), 0, menueditorclose));
diff --git a/src/gnuwin32/editor.h b/src/gnuwin32/editor.h
index a259928..11b07ba 100644
--- a/src/gnuwin32/editor.h
+++ b/src/gnuwin32/editor.h
@@ -15,7 +15,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  */
 
 void menueditornew(control m);
diff --git a/src/gnuwin32/embeddedR.c b/src/gnuwin32/embeddedR.c
index bbe2732..5bbc48b 100644
--- a/src/gnuwin32/embeddedR.c
+++ b/src/gnuwin32/embeddedR.c
@@ -13,7 +13,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  */
 
 #include <config.h>
diff --git a/src/gnuwin32/extra.c b/src/gnuwin32/extra.c
index 1d28f08..c564d65 100644
--- a/src/gnuwin32/extra.c
+++ b/src/gnuwin32/extra.c
@@ -3,7 +3,7 @@
  *  file extra.c
  *  Copyright (C) 1998--2003  Guido Masarotto and Brian Ripley
  *  Copyright (C) 2004	      The R Foundation
- *  Copyright (C) 2005--2013  The R Core Team
+ *  Copyright (C) 2005--2015  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
@@ -17,7 +17,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  */
 
 
@@ -134,7 +134,6 @@ int check_doc_file(const char * file)
 }
 
 #include "Startup.h"
-extern UImode CharacterMode;
 
 void Rwin_fpset(void)
 {
@@ -168,6 +167,7 @@ SEXP in_loadRconsole(SEXP sfile)
 typedef void (WINAPI *PGNSI)(LPSYSTEM_INFO);
 
 /* base::Sys.info */
+// keep in step with src/library/utils/src/windows/util.c
 SEXP do_sysinfo(SEXP call, SEXP op, SEXP args, SEXP rho)
 {
     SEXP ans, ansnames;
@@ -191,13 +191,26 @@ SEXP do_sysinfo(SEXP call, SEXP op, SEXP args, SEXP rho)
     if((int)osvi.dwMajorVersion >= 5) {
 	PGNSI pGNSI;
 	SYSTEM_INFO si;
+	if(osvi.dwMajorVersion == 10 && osvi.dwMinorVersion == 0) {
+	    if(osvi.wProductType == VER_NT_WORKSTATION) strcpy(ver, "10");
+	    else strcpy(ver, "Server");
+	}
 	if(osvi.dwMajorVersion == 6) {
+	    char *desc = "";
 	    if(osvi.wProductType == VER_NT_WORKSTATION) {
-		if(osvi.dwMinorVersion == 0)
-		    strcpy(ver, "Vista");
-		else strcpy(ver, "7");
-	    } else
-		strcpy(ver, "Server 2008");
+		if(osvi.dwMinorVersion == 0) desc = "Vista";
+		else if(osvi.dwMinorVersion == 1) desc = "7";
+		else if(osvi.dwMinorVersion == 2) desc = ">= 8";
+		else if(osvi.dwMinorVersion == 3) desc = "8.1";
+		else desc = "> 8.1";
+	    } else {
+		if(osvi.dwMinorVersion == 0) desc = "Server 2008";
+		else if(osvi.dwMinorVersion == 1) desc = "Server 2008 R2";
+		else if(osvi.dwMinorVersion == 2) desc = "Server >= 2012";
+		else if(osvi.dwMinorVersion == 3) desc = "Server 2012 R2";
+		else desc = "Server > 2012";
+	    }
+	    strcpy(ver, desc);
 	}
 	if(osvi.dwMajorVersion == 5 && osvi.dwMinorVersion == 0)
 	    strcpy(ver, "2000");
@@ -255,27 +268,20 @@ SEXP do_sysinfo(SEXP call, SEXP op, SEXP args, SEXP rho)
     return ans;
 }
 
-SEXP do_syssleep(SEXP call, SEXP op, SEXP args, SEXP rho)
+void Rsleep(double timeint)
 {
+    int ntime = 1000*timeint + 0.5;
     DWORD mtime;
-    int ntime;
-    double time;
-
-    checkArity(op, args);
-    time = asReal(CAR(args));
-    if (ISNAN(time) || time < 0)
-	errorcall(call, _("invalid '%s' value"), "time");
-    ntime = 1000*(time) + 0.5;
     while (ntime > 0) {
 	mtime = min(500, ntime);
 	ntime -= mtime;
 	Sleep(mtime);
 	R_ProcessEvents();
     }
-    return R_NilValue;
+
 }
 
-#ifdef LEA_MALLOC
+
 #define MALLINFO_FIELD_TYPE size_t
 struct mallinfo {
     MALLINFO_FIELD_TYPE arena;    /* non-mmapped space allocated from system */
@@ -292,7 +298,6 @@ struct mallinfo {
 extern R_size_t R_max_memory;
 
 struct mallinfo mallinfo(void);
-#endif 
 
 SEXP in_memsize(SEXP ssize)
 {
@@ -306,7 +311,6 @@ SEXP in_memsize(SEXP ssize)
 	double mem = asReal(ssize);
 	if (!R_FINITE(mem))
 	    error(_("incorrect argument"));
-#ifdef LEA_MALLOC
 #ifndef _WIN64
 	if(mem >= 4096)
 	    error(_("don't be silly!: your machine has a 4Gb address limit"));
@@ -316,12 +320,10 @@ SEXP in_memsize(SEXP ssize)
 	    warning(_("cannot decrease memory limit: ignored"));
 	else
 	    R_max_memory = newmax;
-#endif
     } else
 	error(_("incorrect argument"));
 	
     PROTECT(ans = allocVector(REALSXP, 1));
-#ifdef LEA_MALLOC
     if(maxmem == NA_LOGICAL)
 	REAL(ans)[0] = R_max_memory;
     else if(maxmem)
@@ -329,9 +331,6 @@ SEXP in_memsize(SEXP ssize)
     else
 	REAL(ans)[0] = mallinfo().uordblks;
     REAL(ans)[0] /= 1048576.0;
-#else
-    REAL(ans)[0] = NA_REAL;
-#endif
     UNPROTECT(1);
     return ans;
 }
@@ -556,9 +555,7 @@ SEXP in_shortpath(SEXP paths)
 }
     
 #include "devWindows.h"
-#include <Startup.h>
 #include <R_ext/GraphicsEngine.h> /* GEgetDevice */
-extern UImode CharacterMode;
 
 /* grDevices::bringToTop */
 SEXP bringtotop(SEXP sdev, SEXP sstay)
diff --git a/src/gnuwin32/fixed/Makeconf b/src/gnuwin32/fixed/Makeconf
index e87a47b..e93b934 100644
--- a/src/gnuwin32/fixed/Makeconf
+++ b/src/gnuwin32/fixed/Makeconf
@@ -9,4 +9,4 @@ INSTALL_DATA = cp
 SHELL = sh
 USE_NLS = yes
 
-R_EXE = $(top_builddir)/@BINDIR@/Rterm.exe --vanilla --slave
+R_EXE = R_ENABLE_JIT=0 $(top_builddir)/@BINDIR@/Rterm.exe --vanilla --slave
diff --git a/src/gnuwin32/fixed/Makefile b/src/gnuwin32/fixed/Makefile
index d239ca7..ea1193a 100644
--- a/src/gnuwin32/fixed/Makefile
+++ b/src/gnuwin32/fixed/Makefile
@@ -2,6 +2,9 @@ include ../MkRules
 
 R_HOME = ../../..
 
+# FIXME:  Should find a make where $(abspath ...) works and avoid this...
+LOCAL_SOFT := $(shell ../Rpwd.exe $(LOCAL_SOFT))
+
 all: profiles fixhtml fixetc fixdoc svnonly
 
 profiles: $(R_HOME)/library/base/R/Rprofile
@@ -25,7 +28,8 @@ ifeq "$(WIN)" "64"
 	$(SED) -e 's/WIN = 32/WIN = 64/' \
 	  -e "s/-O3/-O2/" \
 	  -e "s/@EOPTS@/$(EOPTS)/" \
-	  -e "s|BINPREF =|BINPREF = $(BINPREF)|" \
+	  -e "s|BINPREF =|BINPREF ?= $(BINPREF)|" \
+	  -e "s|COMPILED_BY =|COMPILED_BY = $(COMPILED_BY)|" \
 	  -e "s|IMPDIR = bin|IMPDIR = $(IMPDIR)|" \
 	  -e "s|LOCAL_SOFT =|LOCAL_SOFT = $(LOCAL_SOFT)|" \
 	  -e "s|R_ARCH =|R_ARCH = $(R_ARCH)|" \
@@ -36,11 +40,13 @@ ifeq "$(WIN)" "64"
 	  -e "s|(TCL_HOME)/bin|(TCL_HOME)/bin64|" \
 	  -e "s|@OPENMP@|$(OPENMP)|" \
 	  -e "s|@PTHREAD@|$(PTHREAD)|" \
+	  -e "s at NM_FILTER =@NM_FILTER = $(NM_FILTER)@" \
 	  etc/Makeconf > $(R_HOME)/etc$(R_ARCH)/Makeconf
 else
 	$(SED) -e "s|IMPDIR = bin|IMPDIR = $(IMPDIR)|" \
 	  -e "s/@EOPTS@/$(EOPTS)/" \
-	  -e "s|BINPREF =|BINPREF = $(BINPREF)|" \
+	  -e "s|BINPREF =|BINPREF ?= $(BINPREF)|" \
+	  -e "s|COMPILED_BY =|COMPILED_BY = $(COMPILED_BY)|" \
 	  -e "s|LOCAL_SOFT =|LOCAL_SOFT = $(LOCAL_SOFT)|" \
 	  -e "s|R_ARCH =|R_ARCH = $(R_ARCH)|" \
 	  -e "s|DT_ARCH =|DT_ARCH = $(DT_ARCH)|" \
@@ -49,6 +55,7 @@ else
 	  -e "s|@SYMPAT@|$(SYMPAT)|" \
 	  -e "s|@OPENMP@|$(OPENMP)|" \
 	  -e "s|@PTHREAD@|$(PTHREAD)|" \
+	  -e "s at NM_FILTER =@NM_FILTER = $(NM_FILTER)@" \
 	  etc/Makeconf > $(R_HOME)/etc$(R_ARCH)/Makeconf
 endif
 	$(SED) -e "s+ at BINDIR@+$(BINDIR)+" Makeconf > $(R_HOME)/Makeconf
diff --git a/src/gnuwin32/fixed/etc/Makeconf b/src/gnuwin32/fixed/etc/Makeconf
index 4da0a03..79bc1e4 100644
--- a/src/gnuwin32/fixed/etc/Makeconf
+++ b/src/gnuwin32/fixed/etc/Makeconf
@@ -17,6 +17,7 @@ LINKFLAGS+= -static-libgcc
 ## Things which are substituted by fixed/Makefile (and also -O3 -> -O2)
 WIN = 32
 BINPREF =
+COMPILED_BY =
 # SYMPAT = 's/^.* [BCDRT] _/ /p' for 32-bit
 # SYMPAT = 's/^.* [BCDRT] / /p' for 64-bit
 SYMPAT = @SYMPAT@
@@ -28,6 +29,7 @@ RC_ARCH =
 # Used by packages tcltk and tkrplot
 TCL_HOME = $(R_HOME)/Tcl
 LOCAL_SOFT =
+NM_FILTER =
 
 ifneq ($(strip $(LOCAL_SOFT)),)
 LOCAL_CPPFLAGS = -I"$(LOCAL_SOFT)/include"
@@ -56,12 +58,11 @@ SORT = sort
 
 ## For use in packages
 GRAPHAPP_LIB = -lRgraphapp
-TCL_VERSION = 85
-ZLIB_LIBS = -lRzlib
+TCL_VERSION = 86
+# was a reference to Rzlib.dll in R < 3.2.0
+ZLIB_LIBS = -lz
 
 AR = $(BINPREF)ar
-## Used by packages 'maps' and 'mapdata'
-AWK = gawk
 BLAS_LIBS = -L"$(R_HOME)/$(IMPDIR)" -lRblas
 C_VISIBILITY = 
 CC = $(BINPREF)gcc $(M_ARCH)
@@ -71,11 +72,23 @@ CPPFLAGS =
 CXX = $(BINPREF)g++ $(M_ARCH)
 CXXCPP = $(CXX) -E
 CXXFLAGS = -O2 -Wall $(DEBUGFLAG) @EOPTS@
-CXXPICFLAGS = 
-CXX1X = $(BINPREF)g++ $(M_ARCH)
-CXX1XFLAGS = -O2 -Wall $(DEBUGFLAG) @EOPTS@
-CXX1XPICFLAGS =
-CXX1XSTD = -std=c++0x
+CXXPICFLAGS =
+CXX98 = $(BINPREF)g++ $(M_ARCH)
+CXX98FLAGS = -O2 -Wall $(DEBUGFLAG) @EOPTS@
+CXX98PICFLAGS = 
+CXX98STD = -std=gnu++98
+CXX11 = $(BINPREF)g++ $(M_ARCH)
+CXX11FLAGS = -O2 -Wall $(DEBUGFLAG) @EOPTS@
+CXX11PICFLAGS =
+CXX11STD = -std=gnu++11
+CXX14 = 
+CXX14FLAGS = 
+CXX14PICFLAGS =
+CXX14STD = 
+CXX17 = 
+CXX17FLAGS = 
+CXX17PICFLAGS =
+CXX17STD = 
 DYLIB_EXT = .dll
 DYLIB_LD = $(DLL)
 DYLIB_LDFLAGS = -shared
@@ -91,7 +104,7 @@ FCLIBS =
 F77 = $(BINPREF)gfortran $(M_ARCH)
 F77_VISIBILITY = 
 FFLAGS = -O3 $(DEBUGFLAG) @EOPTS@
-FLIBS = -lgfortran
+FLIBS = -lgfortran -lm -lquadmath
 FCPICFLAGS =
 FPICFLAGS = 
 FOUNDATION_CPPFLAGS =
@@ -137,8 +150,14 @@ SHLIB_CXXFLAGS =
 SHLIB_CXXLD = $(CXX)
 ## ideally -shared -static-libstdc++, but not for gcc 4.2.1
 SHLIB_CXXLDFLAGS = -shared
-SHLIB_CXX1XLD = $(CXX1X)
-SHLIB_CXX1XLDFLAGS = -shared
+SHLIB_CXX98LD = $(CXX98)
+SHLIB_CXX98LDFLAGS = -shared
+SHLIB_CXX11LD = $(CXX11)
+SHLIB_CXX11LDFLAGS = -shared
+SHLIB_CXX14LD = $(CXX14)
+SHLIB_CXX14LDFLAGS = -shared
+SHLIB_CXX17LD = $(CXX17)
+SHLIB_CXX17LDFLAGS = -shared
 SHLIB_EXT = .dll
 SHLIB_FCLD = $(FC)
 ## ideally -shared -static-libgfortran, but not for gcc 4.2.1
@@ -158,6 +177,15 @@ STRIP_STATIC_LIBS = $(BINPREF)strip --strip-debug
 TCLTK_CPPFLAGS = -I "$(TCL_HOME)/include" -DWin32
 TCLTK_LIBS = -L"$(TCL_HOME)/bin" -ltcl$(TCL_VERSION) -ltk$(TCL_VERSION)
 
+## legacy
+CXX1X = $(BINPREF)g++ $(M_ARCH)
+CXX1XFLAGS = -O2 -Wall $(DEBUGFLAG) @EOPTS@
+CXX1XPICFLAGS =
+CXX1XSTD = -std=gnu++11
+SHLIB_CXX1XLD = $(CXX11)
+SHLIB_CXX1XLDFLAGS = -shared
+
+
 STATIC_LIBR =
 
 R_XTRA_CFLAGS =
@@ -166,7 +194,7 @@ R_XTRA_CXXFLAGS =
 R_XTRA_FFLAGS = 
 
 ALL_CFLAGS = $(R_XTRA_CFLAGS) $(PKG_CFLAGS) $(CPICFLAGS) $(SHLIB_CFLAGS) $(CFLAGS)
-ALL_CPPFLAGS = $(R_XTRA_CPPFLAGS) $(PKG_CPPFLAGS) $(CPPFLAGS) $($*-CPPFLAGS) $(CLINK_CPPFLAGS) $(LOCAL_CPPFLAGS)
+ALL_CPPFLAGS = $(R_XTRA_CPPFLAGS) $(PKG_CPPFLAGS) $(CLINK_CPPFLAGS) $(CPPFLAGS) $($*-CPPFLAGS) $(LOCAL_CPPFLAGS)
 ALL_CXXFLAGS = $(R_XTRA_CXXFLAGS) $(PKG_CXXFLAGS) $(CXXPICFLAGS) $(SHLIB_CXXFLAGS) $(CXXFLAGS)
 ALL_OBJCFLAGS = $(PKG_OBJCFLAGS) $(CPICFLAGS) $(SHLIB_CFLAGS) $(OBJCFLAGS)
 ALL_OBJCXXFLAGS = $(PKG_OBJCXXFLAGS) $(CXXPICFLAGS) $(SHLIB_CXXFLAGS) $(OBJCXXFLAGS)
diff --git a/src/gnuwin32/fixed/h/Rconfig.h b/src/gnuwin32/fixed/h/Rconfig.h
index e49d4a1..7cd95be 100644
--- a/src/gnuwin32/fixed/h/Rconfig.h
+++ b/src/gnuwin32/fixed/h/Rconfig.h
@@ -15,12 +15,14 @@
 #define SUPPORT_MBCS 1
 #define ENABLE_NLS 1
 /* #undef HAVE_AQUA */
+/* Deprecated: use _OPENMP instead */
 /* #undef SUPPORT_OPENMP */
 #ifdef _WIN64
 #define SIZEOF_SIZE_T 8
 #else
 #define SIZEOF_SIZE_T 4
 #endif
+/* #undef HAVE_ALLOCA_H */
 
 #endif /* not R_CONFIG_H */
 
diff --git a/src/gnuwin32/fixed/h/config.h b/src/gnuwin32/fixed/h/config.h
index 459b79d..2183204 100644
--- a/src/gnuwin32/fixed/h/config.h
+++ b/src/gnuwin32/fixed/h/config.h
@@ -68,9 +68,6 @@
 /* Define to 1 if you have the `atanpi' function. */
 /* #undef HAVE_ATANPI */
 
-/* Define if you have BSD networking headers and libraries. */
-/* #undef HAVE_BSD_NETWORKING */
-
 /* Define to 1 if the compiler understands __builtin_expect. (For intl) */
 #define HAVE_BUILTIN_EXPECT 1
 
@@ -114,8 +111,8 @@
    CoreFoundation framework. (For intl) */
 /* #undef HAVE_CFLOCALECOPYCURRENT */
 
-/* Define to 1 if you have the OS X function CFPreferencesCopyAppValue in
-   the CoreFoundation framework. (For intl) */
+/* Define to 1 if you have the OS X function CFPreferencesCopyAppValue in the
+   CoreFoundation framework. (For intl) */
 /* #undef HAVE_CFPREFERENCESCOPYAPPVALUE */
 
 /* Define to 1 if you have the `chdir' function. */
@@ -154,7 +151,14 @@
 #define HAVE_CTAN 1
 
 /* Define to 1 if you have the `ctanh' function. */
-#define HAVE_CTANH 1
+/* The ctanh function does not work properly, at R level "tanh(356+0i)"
+   returns "1+NaNi", but it should return "1+0i". */
+/* #undef HAVE_CTANH */
+
+/* Define to 1 if you have the <curl/curl.h> header file.
+   Set on the command line where supported.
+*/
+/* #undef HAVE_CURL_CURL_H */
 
 /* Define if the GNU dcgettext() function is already present or preinstalled.
    */
@@ -269,6 +273,9 @@
 /* Define to 1 if you have the `fdopen' function. */
 #define HAVE_FDOPEN 1
 
+/* Define to 1 if you have the <features.h> header file. */
+/* #undef HAVE_FEATURES_H */
+
 /* Define to 1 if you have the <floatingpoint.h> header file. */
 /* #undef HAVE_FLOATINGPOINT_H */
 
@@ -364,9 +371,6 @@
 /* Define to 1 if the system has the type `int64_t'. */
 #define HAVE_INT64_T 1
 
-/* Define if you have support for ftp/http access. */
-#define HAVE_INTERNET 1
-
 /* Define if you have the 'intmax_t' type in <stdint.h> or <inttypes.h>. (For
    intl) */
 #define HAVE_INTMAX_T 1
@@ -417,8 +421,10 @@
 /* Define if your <locale.h> file defines LC_MESSAGES. */
 /* #undef HAVE_LC_MESSAGES */
 
-/* Define to 1 if you have the `cc_dynamic' library (-lcc_dynamic). */
-/* #undef HAVE_LIBCC_DYNAMIC */
+/* Define if your system has libcurl >= 7.28.0 with support for https.
+   Set on the command line where supported.
+ */
+/* #undef HAVE_LIBCURL */
 
 /* Define if __libc_stack_end is visible. */
 /* #undef HAVE_LIBC_STACK_END */
@@ -661,15 +667,15 @@
 /* Define to 1 if you have the `snprintf' function. */
 #define HAVE_SNPRINTF 1
 
-/* Define if you have support for sockets. */
-#define HAVE_SOCKETS 1
-
 /* Define to 1 if the system has the type `stack_t'. */
 /* #undef HAVE_STACK_T */
 
 /* Define to 1 if you have the `stat' function. */
 #define HAVE_STAT 1
 
+/* Define to 1 if you have the <stdalign.h> header file. */
+/* #undef HAVE_STDALIGN_H */
+
 /* Define to 1 if you have the <stdarg.h> header file. */
 #define HAVE_STDARG_H 1
 
@@ -794,6 +800,12 @@
 /* Define to 1 if your 'struct tm' has tm_zone. */
 /* #undef HAVE_TM_ZONE */
 
+/* Define if your system has tre. */
+/* #undef HAVE_TRE */
+
+/* Define to 1 if you have the <tre/tre.h> header file. */
+/* #undef HAVE_TRE_TRE_H */
+
 /* Define to 1 if you have the `tsearch' function. */
 #if defined(__MINGW64_VERSION_MAJOR) && __MINGW64_VERSION_MAJOR >= 2
 #define HAVE_TSEARCH 1
@@ -831,15 +843,15 @@
 /* Define to 1 if you have the <utime.h> header file. */
 /* #undef HAVE_UTIME_H */
 
+/* Define to 1 if you have the <valgrind/memcheck.h> header file. */
+/* #undef HAVE_VALGRIND_MEMCHECK_H */
+
 /* Define to 1 if you have the `vasprintf' function. */
 #define HAVE_VASPRINTF 1
 
 /* Define to 1 if you have the `va_copy' function. */
 #define HAVE_VA_COPY 1
 
-/* Defined if framework vecLib is present */
-/* #undef HAVE_VECLIB_FW */
-
 /* Define to 1 or 0, depending whether the compiler supports simple visibility
    declarations. (For intl) */
 #define HAVE_VISIBILITY 1
@@ -929,8 +941,7 @@
 /* Define if you have 32 bit ints. */
 #define INT_32_BITS 1
 
-/* Define to the sub-directory in which libtool stores uninstalled libraries.
-   */
+/* Define to the sub-directory where libtool stores uninstalled libraries. */
 #define LT_OBJDIR ".libs/"
 
 /* Define if mktime sets errno. */
@@ -967,7 +978,7 @@
 #define PACKAGE_TARNAME "R"
 
 /* Define to the home page for this package. */
-#define PACKAGE_URL "http://www.r-project.org"
+#define PACKAGE_URL "https://www.r-project.org"
 
 /* Define to the version of this package. */
 #define PACKAGE_VERSION "@VERSION@"
@@ -1050,6 +1061,11 @@
 /* The size of `size_t', as computed by sizeof. */
 #define SIZEOF_SIZE_T @ST@
 
+/* Workaround for win64 pow() precision issue in Mingw-w64 V3 and higher
+   See http://sourceforge.net/p/mingw-w64/bugs/466 for discussion. */
+#if defined(_WIN64) && defined(__MINGW64_VERSION_MAJOR) && __MINGW64_VERSION_MAJOR >= 3
+#define USE_POWL_IN_R_POW 1
+#endif
 
 /* Define as the maximum value of type 'size_t', if the system doesn't define
    it. (For intl) */
@@ -1066,9 +1082,6 @@
 /* Define to 1 if you have the ANSI C header files. */
 #define STDC_HEADERS 1
 
-/* Define if you provide support for the libxml ftp/http functions. */
-#define SUPPORT_LIBXML 1
-
 /* Define if you have C/C++/Fortran OpenMP support for package code. */
 /* #undef SUPPORT_OPENMP */
 
diff --git a/src/gnuwin32/fixed/h/trioremap.h b/src/gnuwin32/fixed/h/trioremap.h
new file mode 100644
index 0000000..f9a2e85
--- /dev/null
+++ b/src/gnuwin32/fixed/h/trioremap.h
@@ -0,0 +1,36 @@
+/*
+ *  R : A Computer Language for Statistical Data Analysis
+ *  Copyright (C) 2015 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
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, a copy is available at
+ *  https://www.R-project.org/Licenses/
+ */
+ 
+/* Recent MinGW-w64 releases define snprintf and vsnprintf as macros
+   that can't be redefined; these are necessary to make our substitutions
+   of the trio replacements.  We need the replacements because msvcrt.dll
+   doesn't support hex formatting of floating point numbers, and all (?)
+   versions of the MS run-time use three digits in floating point
+   E formats, e.g. 1.E000. */
+
+#ifndef R_TRIOREMAP_H
+#define R_TRIOREMAP_H
+
+int trio_snprintf(char *buffer, size_t max, const char *format, ...);
+int trio_vsnprintf(char *buffer, size_t bufferSize, const char *format,
+		   va_list args);
+#define snprintf trio_snprintf
+#define vsnprintf trio_vsnprintf
+
+#endif  /* not R_TRIOREMAP_H */
diff --git a/src/gnuwin32/fixed/html/rwin.html b/src/gnuwin32/fixed/html/rwin.html
index b275e83..77d3dfb 100644
--- a/src/gnuwin32/fixed/html/rwin.html
+++ b/src/gnuwin32/fixed/html/rwin.html
@@ -8,7 +8,7 @@
 <body>
 
 <h1>Statistical Data Analysis
-<img class="toplogo" src="logo.jpg" alt="[R logo]"> 
+<img class="toplogo" src="Rlogo.svg" alt="[R logo]"> 
 </h1>
 
 <hr width="100%">
diff --git a/src/gnuwin32/front-ends/Makefile b/src/gnuwin32/front-ends/Makefile
index 2120f40..1286654 100644
--- a/src/gnuwin32/front-ends/Makefile
+++ b/src/gnuwin32/front-ends/Makefile
@@ -1,139 +1,142 @@
-include ../MkRules
-R_HOME = ../../..
-
-CFLAGS=-O3 -Wall -pedantic
-ifdef DEBUG
- CFLAGS+=$(G_FLAG)
- LINKFLAGS=
- DLLFLAGS=
-else
- LINKFLAGS=-s
- DLLFLAGS=-s
-endif
-CPPFLAGS=-I../../include $(arch_DEFS)
-
-ifeq "$(WIN)" "32"
-## Increase stack size to 16Mb
-LARGE_STACK=-Wl,--stack=0x1000000
-## allow 32-bit builds to address over 2Gb
-LARGE_ADDR=-Wl,--large-address-aware
-else
-## Increase stack size to 64Mb
-LARGE_STACK=-Wl,--stack=0x4000000
-endif
-
-rcmdfn-CFLAGS=-DBINDIR='"$(BINDIR)"'
-
-.PHONY : all makeMakedeps
-
-all: makeMakedeps \
-     $(R_HOME)/$(BINDIR)/Rgui.exe $(R_HOME)/$(BINDIR)/Rterm.exe \
-     $(R_HOME)/$(BINDIR)/Rcmd.exe  $(R_HOME)/$(BINDIR)/RSetReg.exe  \
-     $(R_HOME)/$(BINDIR)/R.exe\
-     $(R_HOME)/$(BINDIR)/Rscript.exe $(R_HOME)/$(BINDIR)/open.exe \
-     $(R_HOME)/$(BINDIR)/Rfe.exe \
-     $(R_HOME)/bin/R.exe $(R_HOME)/bin/Rscript.exe 
-
-$(R_HOME)/$(BINDIR)/Rgui.exe: Rgui.exe
-	$(MKDIR) -p $(R_HOME)/$(BINDIR)
-	$(CP) $^ $@
-
-$(R_HOME)/$(BINDIR)/Rterm.exe: Rterm.exe
-	$(MKDIR) -p $(R_HOME)/$(BINDIR)
-	$(CP) $^ $@	
-
-$(R_HOME)/$(BINDIR)/Rcmd.exe: Rcmd.exe
-	$(MKDIR) -p $(R_HOME)/$(BINDIR)
-	$(CP) $^ $@
-
-$(R_HOME)/$(BINDIR)/RSetReg.exe: RSetReg.exe
-	$(MKDIR) -p $(R_HOME)/$(BINDIR)
-	$(CP) $^ $@
-
-$(R_HOME)/$(BINDIR)/R.exe: R.exe
-	$(MKDIR) -p $(R_HOME)/$(BINDIR)
-	$(CP) $^ $@	
-
-$(R_HOME)/$(BINDIR)/Rfe.exe: Rfe.exe
-	$(MKDIR) -p $(R_HOME)/$(BINDIR)
-	$(CP) $^ $@
-	
-$(R_HOME)/bin/R.exe: Rfe.exe
-	$(MKDIR) -p $(R_HOME)/bin
-	$(CP) $^ $@	
-
-$(R_HOME)/bin/Rscript.exe: Rfe.exe
-	$(MKDIR) -p $(R_HOME)/bin
-	$(CP) $^ $@	
-
-$(R_HOME)/$(BINDIR)/Rscript.exe: Rscript.exe
-	$(MKDIR) -p $(R_HOME)/$(BINDIR)
-	$(CP) $^ $@	
-
-$(R_HOME)/$(BINDIR)/open.exe: open.exe
-	$(MKDIR) -p $(R_HOME)/$(BINDIR)
-	$(CP) $^ $@	
-
-rgui-CPPFLAGS=-DWin32
-rterm-CPPFLAGS=-DWin32
-
-## -luser32 -lkernel32 -ladvapi32 -lshell32 are now standard
-Rgui-LIBS=-L../../../$(IMPDIR) -lR -lRgraphapp
-Rscript-LIBS=-L../../../$(IMPDIR) -lR -lRgraphapp
-Rterm-LIBS=-L../../../$(IMPDIR) -lR -lRgraphapp
-
-Rgui-LINKFLAGS=-mwindows $(LARGE_ADDR) $(LARGE_STACK)
-Rterm-LINKFLAGS=$(LARGE_ADDR) $(LARGE_STACK)
-Rscript-LINKFLAGS=$(LARGE_ADDR) $(LARGE_STACK)
-
-Rgui.exe: graphappmain.o rgui.o rgico.o
-Rterm.exe: graphappmain.o rterm.o rtico.o
-
-ifneq "$(WIN)" "64"
-rcico.o: Rcmd.exe.manifest
-rgico.o: Rgui32.manifest
-rtico.o: Rterm32.manifest
-else
-RESFLAGS = -DWN64
-rtico.o: Rterm64.manifest
-rgico.o: Rgui64.manifest
-endif
-
-Rcmd.exe: rcmd.o ../rhome.o ../shext.o rcico.o rcmdfn.o Renviron.o
-
-R.exe: R.o ../rhome.o ../shext.o rcico.o rcmdfn.o Renviron.o
-
-Rfe.exe: Rfe.o ../rhome.o rcico.o
-
-RSetReg.exe: RSetReg.o ../rhome.o rcico.o
-
-Rscript.o: ../../unix/Rscript.c ../../include/Rversion.h
-	$(CC) $(CFLAGS) -DBINDIR='"$(BINDIR)"' -I. -I../../include -DHAVE_CONFIG_H -c $< -o $@
-
-Rscript.exe: Rscript.o rcico.o 
-
-## Not currently used (2.13.0)
-Rpwd:
-	$(MAKE) -C ../../include -f Makefile.win version
-	$(MAKE) Rpwd.exe
-
-Rpwd.exe: rpwd.o rcico.o
-
-rcmd.o R.o rgui.o rterm.o RSetReg.o rgico.o rtico.o rcico.o: ../../include/Rversion.h
-
-open.o: open.c
-open.exe: open.o
-
-clean:
-	$(RM) *.o *.obj *.exe *~ *.exp *.dll *.lib *.a *.d Makedeps
-
-CSOURCES=$(filter-out R.c rcmd.c rpwd.c rtest.c, $(wildcard *.c))
-DEPS=$(CSOURCES:.c=.d)
-
-makeMakedeps: $(DEPS)
-	@$(RM) Makedeps
-ifneq ($(strip $(DEPS)),)
-	@cat $(DEPS) >> Makedeps
-endif
-
--include Makedeps
+include ../MkRules
+R_HOME = ../../..
+
+CFLAGS = -O3 -Wall -pedantic
+ifdef DEBUG
+ CFLAGS += $(G_FLAG)
+ LINKFLAGS =
+ DLLFLAGS =
+else
+ LINKFLAGS = -s
+ DLLFLAGS = -s
+endif
+CPPFLAGS = -I../../include $(arch_DEFS)
+
+ifeq "$(WIN)" "32"
+## Increase stack size to 16Mb
+LARGE_STACK = -Wl,--stack=0x1000000
+## allow 32-bit builds to address over 2Gb
+LARGE_ADDR = -Wl,--large-address-aware
+else
+## Increase stack size to 64Mb
+LARGE_STACK = -Wl,--stack=0x4000000
+endif
+
+rcmdfn-CFLAGS = -DBINDIR='"$(BINDIR)"'
+
+.PHONY : all makeMakedeps
+
+all: makeMakedeps \
+     $(R_HOME)/$(BINDIR)/Rgui.exe $(R_HOME)/$(BINDIR)/Rterm.exe \
+     $(R_HOME)/$(BINDIR)/Rcmd.exe  $(R_HOME)/$(BINDIR)/RSetReg.exe  \
+     $(R_HOME)/$(BINDIR)/R.exe\
+     $(R_HOME)/$(BINDIR)/Rscript.exe $(R_HOME)/$(BINDIR)/open.exe \
+     $(R_HOME)/$(BINDIR)/Rfe.exe \
+     $(R_HOME)/bin/R.exe $(R_HOME)/bin/Rscript.exe 
+
+$(R_HOME)/$(BINDIR)/Rgui.exe: Rgui.exe
+	$(MKDIR) -p $(R_HOME)/$(BINDIR)
+	$(CP) $^ $@
+
+$(R_HOME)/$(BINDIR)/Rterm.exe: Rterm.exe
+	$(MKDIR) -p $(R_HOME)/$(BINDIR)
+	$(CP) $^ $@	
+
+$(R_HOME)/$(BINDIR)/Rcmd.exe: Rcmd.exe
+	$(MKDIR) -p $(R_HOME)/$(BINDIR)
+	$(CP) $^ $@
+
+$(R_HOME)/$(BINDIR)/RSetReg.exe: RSetReg.exe
+	$(MKDIR) -p $(R_HOME)/$(BINDIR)
+	$(CP) $^ $@
+
+$(R_HOME)/$(BINDIR)/R.exe: R.exe
+	$(MKDIR) -p $(R_HOME)/$(BINDIR)
+	$(CP) $^ $@	
+
+$(R_HOME)/$(BINDIR)/Rfe.exe: Rfe.exe
+	$(MKDIR) -p $(R_HOME)/$(BINDIR)
+	$(CP) $^ $@
+
+$(R_HOME)/bin/R.exe: Rfe.exe
+	$(MKDIR) -p $(R_HOME)/bin
+	$(CP) $^ $@	
+
+$(R_HOME)/bin/Rscript.exe: Rfe.exe
+	$(MKDIR) -p $(R_HOME)/bin
+	$(CP) $^ $@	
+
+$(R_HOME)/$(BINDIR)/Rscript.exe: Rscript.exe
+	$(MKDIR) -p $(R_HOME)/$(BINDIR)
+	$(CP) $^ $@	
+
+$(R_HOME)/$(BINDIR)/open.exe: open.exe
+	$(MKDIR) -p $(R_HOME)/$(BINDIR)
+	$(CP) $^ $@	
+
+rgui-CPPFLAGS = -DWin32
+rterm-CPPFLAGS = -DWin32
+
+## -luser32 -lkernel32 -ladvapi32 -lshell32 are now standard
+Rgui-LIBS = -L../../../$(IMPDIR) -lR -lRgraphapp
+Rscript-LIBS = -L../../../$(IMPDIR) -lR -lRgraphapp
+Rterm-LIBS = -L../../../$(IMPDIR) -lR -lRgraphapp
+
+Rgui-LINKFLAGS = -mwindows $(LARGE_ADDR) $(LARGE_STACK)
+Rterm-LINKFLAGS = $(LARGE_ADDR) $(LARGE_STACK)
+Rscript-LINKFLAGS = $(LARGE_ADDR) $(LARGE_STACK)
+
+Rgui.exe: graphappmain.o rgui.o rgico.o
+Rterm.exe: graphappmain.o rterm.o rtico.o
+
+ifneq "$(WIN)" "64"
+rcico.o: Rcmd.exe.manifest
+rgico.o: Rgui32.manifest
+rsico.o: Rscript.exe.manifest
+rtico.o: Rterm32.manifest
+else
+RESFLAGS = -DWN64
+rcico.o: Rcmd64.exe.manifest
+rtico.o: Rterm64.manifest
+rsico.o: Rscript64.exe.manifest
+rgico.o: Rgui64.manifest
+endif
+
+Rcmd.exe: rcmd.o ../rhome.o ../shext.o rcico.o rcmdfn.o Renviron.o
+
+R.exe: R.o ../rhome.o ../shext.o rcico.o rcmdfn.o Renviron.o
+
+Rfe.exe: Rfe.o ../rhome.o rcico.o
+
+RSetReg.exe: RSetReg.o ../rhome.o rcico.o
+
+Rscript.o: ../../unix/Rscript.c ../../include/Rversion.h
+	$(CC) $(CFLAGS) -DBINDIR='"$(BINDIR)"' -I. -I../../include -DHAVE_CONFIG_H -c $< -o $@
+
+Rscript.exe: Rscript.o rsico.o 
+
+## Used only in writing etc/.../Makeconf
+Rpwd:
+	$(MAKE) -C ../../include -f Makefile.win version
+	$(MAKE) Rpwd.exe
+
+Rpwd.exe: rpwd.o rcico.o
+
+rcmd.o R.o rgui.o rterm.o RSetReg.o rgico.o rtico.o rcico.o rsico.c: ../../include/Rversion.h
+
+open.o: open.c
+open.exe: open.o
+
+clean:
+	$(RM) *.o *.obj *.exe *~ *.exp *.dll *.lib *.a *.d Makedeps
+
+CSOURCES = $(filter-out R.c rcmd.c rpwd.c rtest.c, $(wildcard *.c))
+DEPS = $(CSOURCES:.c=.d)
+
+makeMakedeps: $(DEPS)
+	@$(RM) Makedeps
+ifneq ($(strip $(DEPS)),)
+	@cat $(DEPS) >> Makedeps
+endif
+
+-include Makedeps
diff --git a/src/gnuwin32/front-ends/R.c b/src/gnuwin32/front-ends/R.c
index a76b166..3feb85b 100644
--- a/src/gnuwin32/front-ends/R.c
+++ b/src/gnuwin32/front-ends/R.c
@@ -14,7 +14,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not,  a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  */
 
 #include <stdlib.h> /* for exit */
diff --git a/src/gnuwin32/front-ends/R.ico b/src/gnuwin32/front-ends/R.ico
index 85aac1b..8dd6a11 100644
Binary files a/src/gnuwin32/front-ends/R.ico and b/src/gnuwin32/front-ends/R.ico differ
diff --git a/src/gnuwin32/front-ends/RGui32.manifest b/src/gnuwin32/front-ends/RGui32.manifest
index 1827f0f..e2a4b0d 100644
--- a/src/gnuwin32/front-ends/RGui32.manifest
+++ b/src/gnuwin32/front-ends/RGui32.manifest
@@ -28,5 +28,20 @@
       </ms_asmv2:requestedPrivileges>
    </ms_asmv2:security>
 </ms_asmv2:trustInfo>
+<compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1"> 
+  <application> 
+    <!-- Windows 10 --> 
+    <supportedOS Id="{8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}"/>
+    <!-- Windows 8.1 -->
+    <supportedOS Id="{1f676c76-80e1-4239-95bb-83d0f6d0da78}"/>
+    <!-- Windows Vista -->
+    <supportedOS Id="{e2011457-1546-43c5-a5fe-008deee3d3f0}"/> 
+    <!-- Windows 7 -->
+    <supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}"/>
+    <!-- Windows 8 -->
+    <supportedOS Id="{4a2f28e3-53b9-4441-ba9c-d69d4a4a6e38}"/>
+  </application> 
+</compatibility>
+
 </assembly>
 
diff --git a/src/gnuwin32/front-ends/RGui64.manifest b/src/gnuwin32/front-ends/RGui64.manifest
index c8a06ee..b56938b 100644
--- a/src/gnuwin32/front-ends/RGui64.manifest
+++ b/src/gnuwin32/front-ends/RGui64.manifest
@@ -28,5 +28,20 @@
       </ms_asmv2:requestedPrivileges>
    </ms_asmv2:security>
 </ms_asmv2:trustInfo>
+<compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1"> 
+  <application> 
+    <!-- Windows 10 --> 
+    <supportedOS Id="{8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}"/>
+    <!-- Windows 8.1 -->
+    <supportedOS Id="{1f676c76-80e1-4239-95bb-83d0f6d0da78}"/>
+    <!-- Windows Vista -->
+    <supportedOS Id="{e2011457-1546-43c5-a5fe-008deee3d3f0}"/> 
+    <!-- Windows 7 -->
+    <supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}"/>
+    <!-- Windows 8 -->
+    <supportedOS Id="{4a2f28e3-53b9-4441-ba9c-d69d4a4a6e38}"/>
+  </application> 
+</compatibility>
+
 </assembly>
 
diff --git a/src/gnuwin32/front-ends/RSetReg.c b/src/gnuwin32/front-ends/RSetReg.c
index e1911ff..59f4498 100644
--- a/src/gnuwin32/front-ends/RSetReg.c
+++ b/src/gnuwin32/front-ends/RSetReg.c
@@ -14,7 +14,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not,  a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  */
 
 #include <windows.h>
diff --git a/src/gnuwin32/front-ends/Rcmd64.exe.manifest b/src/gnuwin32/front-ends/Rcmd64.exe.manifest
new file mode 100644
index 0000000..a253138
--- /dev/null
+++ b/src/gnuwin32/front-ends/Rcmd64.exe.manifest
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
+<assemblyIdentity
+    version="1.0.0.0"
+    processorArchitecture="amd64"
+    name="Rcmd.exe"
+    type="win32"
+/>
+<description>R utility</description>
+<ms_asmv2:trustInfo xmlns:ms_asmv2="urn:schemas-microsoft-com:asm.v2">
+   <ms_asmv2:security>
+      <ms_asmv2:requestedPrivileges>
+         <!-- alternative "highestAvailable" -->
+	 <ms_asmv2:requestedExecutionLevel level="asInvoker">
+	 </ms_asmv2:requestedExecutionLevel>
+      </ms_asmv2:requestedPrivileges>
+   </ms_asmv2:security>
+</ms_asmv2:trustInfo>
+</assembly>
+
diff --git a/src/gnuwin32/front-ends/Renviron.c b/src/gnuwin32/front-ends/Renviron.c
index 970784a..3edb379 100644
--- a/src/gnuwin32/front-ends/Renviron.c
+++ b/src/gnuwin32/front-ends/Renviron.c
@@ -14,7 +14,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  */
 
 #include <stdlib.h> /* for setenv or putenv */
diff --git a/src/gnuwin32/front-ends/Rfe.c b/src/gnuwin32/front-ends/Rfe.c
index 3378e7c..1e51cb1 100644
--- a/src/gnuwin32/front-ends/Rfe.c
+++ b/src/gnuwin32/front-ends/Rfe.c
@@ -14,7 +14,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not,  a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  */
 
 #include <stdlib.h> /* for exit */
diff --git a/src/gnuwin32/front-ends/Rscript.exe.manifest b/src/gnuwin32/front-ends/Rscript.exe.manifest
new file mode 100644
index 0000000..5d9310d
--- /dev/null
+++ b/src/gnuwin32/front-ends/Rscript.exe.manifest
@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
+<assemblyIdentity
+    version="1.0.0.0"
+    processorArchitecture="X86"
+    name="Rscript.exe"
+    type="win32"
+/>
+<description>R utility</description>
+<dependency>
+    <dependentAssembly>
+        <assemblyIdentity
+            type="win32"
+            name="Microsoft.Windows.Common-Controls"
+            version="6.0.0.0"
+            processorArchitecture="X86"
+            publicKeyToken="6595b64144ccf1df"
+            language="*"
+        />
+    </dependentAssembly>
+</dependency>
+<ms_asmv2:trustInfo xmlns:ms_asmv2="urn:schemas-microsoft-com:asm.v2">
+   <ms_asmv2:security>
+      <ms_asmv2:requestedPrivileges>
+         <!-- alternative "highestAvailable" -->
+	 <ms_asmv2:requestedExecutionLevel level="asInvoker">
+	 </ms_asmv2:requestedExecutionLevel>
+      </ms_asmv2:requestedPrivileges>
+   </ms_asmv2:security>
+</ms_asmv2:trustInfo>
+<compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1"> 
+  <application> 
+    <!-- Windows 10 --> 
+    <supportedOS Id="{8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}"/>
+    <!-- Windows 8.1 -->
+    <supportedOS Id="{1f676c76-80e1-4239-95bb-83d0f6d0da78}"/>
+    <!-- Windows Vista -->
+    <supportedOS Id="{e2011457-1546-43c5-a5fe-008deee3d3f0}"/> 
+    <!-- Windows 7 -->
+    <supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}"/>
+    <!-- Windows 8 -->
+    <supportedOS Id="{4a2f28e3-53b9-4441-ba9c-d69d4a4a6e38}"/>
+  </application> 
+</compatibility>
+
+</assembly>
+
diff --git a/src/gnuwin32/front-ends/Rscript64.exe.manifest b/src/gnuwin32/front-ends/Rscript64.exe.manifest
new file mode 100644
index 0000000..e2a7738
--- /dev/null
+++ b/src/gnuwin32/front-ends/Rscript64.exe.manifest
@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
+<assemblyIdentity
+    version="1.0.0.0"
+    processorArchitecture="amd64"
+    name="Rscript.exe"
+    type="win32"
+/>
+<description>R utility</description>
+<dependency>
+    <dependentAssembly>
+        <assemblyIdentity
+            type="win32"
+            name="Microsoft.Windows.Common-Controls"
+            version="6.0.0.0"
+            processorArchitecture="amd64"
+            publicKeyToken="6595b64144ccf1df"
+            language="*"
+        />
+    </dependentAssembly>
+</dependency>
+<ms_asmv2:trustInfo xmlns:ms_asmv2="urn:schemas-microsoft-com:asm.v2">
+   <ms_asmv2:security>
+      <ms_asmv2:requestedPrivileges>
+         <!-- alternative "highestAvailable" -->
+	 <ms_asmv2:requestedExecutionLevel level="asInvoker">
+	 </ms_asmv2:requestedExecutionLevel>
+      </ms_asmv2:requestedPrivileges>
+   </ms_asmv2:security>
+</ms_asmv2:trustInfo>
+<compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1"> 
+  <application> 
+    <!-- Windows 10 --> 
+    <supportedOS Id="{8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}"/>
+    <!-- Windows 8.1 -->
+    <supportedOS Id="{1f676c76-80e1-4239-95bb-83d0f6d0da78}"/>
+    <!-- Windows Vista -->
+    <supportedOS Id="{e2011457-1546-43c5-a5fe-008deee3d3f0}"/> 
+    <!-- Windows 7 -->
+    <supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}"/>
+    <!-- Windows 8 -->
+    <supportedOS Id="{4a2f28e3-53b9-4441-ba9c-d69d4a4a6e38}"/>
+  </application> 
+</compatibility>
+
+</assembly>
+
diff --git a/src/gnuwin32/front-ends/Rterm32.manifest b/src/gnuwin32/front-ends/Rterm32.manifest
index b9ca738..144810c 100644
--- a/src/gnuwin32/front-ends/Rterm32.manifest
+++ b/src/gnuwin32/front-ends/Rterm32.manifest
@@ -28,5 +28,20 @@
       </ms_asmv2:requestedPrivileges>
    </ms_asmv2:security>
 </ms_asmv2:trustInfo>
+<compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1"> 
+  <application> 
+    <!-- Windows 10 --> 
+    <supportedOS Id="{8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}"/>
+    <!-- Windows 8.1 -->
+    <supportedOS Id="{1f676c76-80e1-4239-95bb-83d0f6d0da78}"/>
+    <!-- Windows Vista -->
+    <supportedOS Id="{e2011457-1546-43c5-a5fe-008deee3d3f0}"/> 
+    <!-- Windows 7 -->
+    <supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}"/>
+    <!-- Windows 8 -->
+    <supportedOS Id="{4a2f28e3-53b9-4441-ba9c-d69d4a4a6e38}"/>
+  </application> 
+</compatibility>
+
 </assembly>
 
diff --git a/src/gnuwin32/front-ends/Rterm64.manifest b/src/gnuwin32/front-ends/Rterm64.manifest
index 76954cf..29e5c5a 100644
--- a/src/gnuwin32/front-ends/Rterm64.manifest
+++ b/src/gnuwin32/front-ends/Rterm64.manifest
@@ -28,5 +28,20 @@
       </ms_asmv2:requestedPrivileges>
    </ms_asmv2:security>
 </ms_asmv2:trustInfo>
+<compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1"> 
+  <application> 
+    <!-- Windows 10 --> 
+    <supportedOS Id="{8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}"/>
+    <!-- Windows 8.1 -->
+    <supportedOS Id="{1f676c76-80e1-4239-95bb-83d0f6d0da78}"/>
+    <!-- Windows Vista -->
+    <supportedOS Id="{e2011457-1546-43c5-a5fe-008deee3d3f0}"/> 
+    <!-- Windows 7 -->
+    <supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}"/>
+    <!-- Windows 8 -->
+    <supportedOS Id="{4a2f28e3-53b9-4441-ba9c-d69d4a4a6e38}"/>
+  </application> 
+</compatibility>
+
 </assembly>
 
diff --git a/src/gnuwin32/front-ends/open.c b/src/gnuwin32/front-ends/open.c
index b3ba735..6898f52 100644
--- a/src/gnuwin32/front-ends/open.c
+++ b/src/gnuwin32/front-ends/open.c
@@ -14,7 +14,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not,  a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  */
 
 #include <windows.h>
diff --git a/src/gnuwin32/front-ends/rcico.rc b/src/gnuwin32/front-ends/rcico.rc
index 7f55bcc..50d8dab 100644
--- a/src/gnuwin32/front-ends/rcico.rc
+++ b/src/gnuwin32/front-ends/rcico.rc
@@ -5,6 +5,8 @@ R  ICON  R.ico
 
 #ifndef WN64
 CREATEPROCESS_MANIFEST_RESOURCE_ID RT_MANIFEST "Rcmd.exe.manifest"
+#else
+CREATEPROCESS_MANIFEST_RESOURCE_ID RT_MANIFEST "Rcmd64.exe.manifest"
 #endif
 
 VS_VERSION_INFO VERSIONINFO
@@ -22,7 +24,7 @@ BEGIN
             VALUE "FileVersion", R_MAJOR "." R_MINOR " " R_STATUS " (" R_YEAR "-" R_MONTH "-" R_DAY ")\0"
             VALUE "LegalCopyright", "R Core Team 1995-" R_YEAR "\0"
             VALUE "R Version", R_MAJOR "." R_MINOR " " R_STATUS " (" R_YEAR "-" R_MONTH "-" R_DAY ")\0"
-            VALUE "Project info", "http://www.r-project.org\0"
+            VALUE "Project info", "https://www.r-project.org\0"
         END
     END
     BLOCK "VarFileInfo"
diff --git a/src/gnuwin32/front-ends/rcmd.c b/src/gnuwin32/front-ends/rcmd.c
index ae0f838..1233049 100644
--- a/src/gnuwin32/front-ends/rcmd.c
+++ b/src/gnuwin32/front-ends/rcmd.c
@@ -14,7 +14,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not,  a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  */
 
 #include <stdlib.h> /* for exit */
diff --git a/src/gnuwin32/front-ends/rcmdfn.c b/src/gnuwin32/front-ends/rcmdfn.c
index bae1046..1d430c3 100644
--- a/src/gnuwin32/front-ends/rcmdfn.c
+++ b/src/gnuwin32/front-ends/rcmdfn.c
@@ -14,7 +14,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not,  a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  */
 
 #define WIN32_LEAN_AND_MEAN 1
@@ -230,7 +230,7 @@ int rcmdfn (int cmdarg, int argc, char **argv)
 "Further arguments starting with a '-' are considered as options as long\n",
 "as '--' was not encountered, and are passed on to the R process, which\n",
 "by default is started with '--restore --save'.\n\n",
-"Report bugs at bugs.r-project.org .");
+"Report bugs at <https://bugs.R-project.org>.");
 		return(0);
 	    }
 	    if (!strcmp(argv[i], "-v") || !strcmp(argv[i], "--version")) {
diff --git a/src/gnuwin32/front-ends/rgico.rc b/src/gnuwin32/front-ends/rgico.rc
index e8a9580..0488b5b 100644
--- a/src/gnuwin32/front-ends/rgico.rc
+++ b/src/gnuwin32/front-ends/rgico.rc
@@ -24,7 +24,7 @@ BEGIN
             VALUE "FileVersion", R_MAJOR "." R_MINOR " " R_STATUS " (" R_YEAR "-" R_MONTH "-" R_DAY ")\0"
             VALUE "LegalCopyright", "R Core Team 1995-" R_YEAR "\0"
             VALUE "R Version", R_MAJOR "." R_MINOR " " R_STATUS " (" R_YEAR "-" R_MONTH "-" R_DAY ")\0"
-            VALUE "Project info", "http://www.r-project.org\0"
+            VALUE "Project info", "https://www.r-project.org\0"
         END
     END
     BLOCK "VarFileInfo"
diff --git a/src/gnuwin32/front-ends/rgui.c b/src/gnuwin32/front-ends/rgui.c
index a0271e5..f19a442 100644
--- a/src/gnuwin32/front-ends/rgui.c
+++ b/src/gnuwin32/front-ends/rgui.c
@@ -14,7 +14,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not,  a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  */
 
 /* For AttachConsole: seems the MinGW headers are wrong and that
diff --git a/src/gnuwin32/front-ends/rpwd.c b/src/gnuwin32/front-ends/rpwd.c
index 686c2e8..ff8a202 100644
--- a/src/gnuwin32/front-ends/rpwd.c
+++ b/src/gnuwin32/front-ends/rpwd.c
@@ -14,7 +14,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not,  a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  */
 
 #include <windows.h>
diff --git a/src/gnuwin32/front-ends/rsico.rc b/src/gnuwin32/front-ends/rsico.rc
new file mode 100644
index 0000000..00ffe11
--- /dev/null
+++ b/src/gnuwin32/front-ends/rsico.rc
@@ -0,0 +1,34 @@
+R  ICON  R.ico
+
+#include <windows.h>
+#include "../../include/Rversion.h"
+
+#ifndef WN64
+CREATEPROCESS_MANIFEST_RESOURCE_ID RT_MANIFEST "Rscript.exe.manifest"
+#else
+CREATEPROCESS_MANIFEST_RESOURCE_ID RT_MANIFEST "Rscript64.exe.manifest"
+#endif
+
+VS_VERSION_INFO VERSIONINFO
+FILEVERSION R_FILEVERSION
+PRODUCTVERSION 3,0,0,0
+FILEFLAGSMASK 0x3L
+FILEOS VOS__WINDOWS32
+FILETYPE VFT_APP
+BEGIN
+    BLOCK "StringFileInfo"
+    BEGIN
+        BLOCK "040904E4"
+        BEGIN
+            VALUE "FileDescription", "R for Windows front-end\0"
+            VALUE "FileVersion", R_MAJOR "." R_MINOR " " R_STATUS " (" R_YEAR "-" R_MONTH "-" R_DAY ")\0"
+            VALUE "LegalCopyright", "R Core Team 1995-" R_YEAR "\0"
+            VALUE "R Version", R_MAJOR "." R_MINOR " " R_STATUS " (" R_YEAR "-" R_MONTH "-" R_DAY ")\0"
+            VALUE "Project info", "https://www.r-project.org\0"
+        END
+    END
+    BLOCK "VarFileInfo"
+    BEGIN
+        VALUE "Translation", 0x409, 1252
+    END
+END
diff --git a/src/gnuwin32/front-ends/rterm.c b/src/gnuwin32/front-ends/rterm.c
index 552cf80..a41842c 100644
--- a/src/gnuwin32/front-ends/rterm.c
+++ b/src/gnuwin32/front-ends/rterm.c
@@ -14,7 +14,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not,  a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  */
 
 #define WIN32_LEAN_AND_MEAN 1
diff --git a/src/gnuwin32/front-ends/rtest.c b/src/gnuwin32/front-ends/rtest.c
index f25b96c..8939449 100644
--- a/src/gnuwin32/front-ends/rtest.c
+++ b/src/gnuwin32/front-ends/rtest.c
@@ -14,7 +14,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not,  a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  */
 
 #define Win32
diff --git a/src/gnuwin32/front-ends/rtico.rc b/src/gnuwin32/front-ends/rtico.rc
index 5af228d..574dd81 100644
--- a/src/gnuwin32/front-ends/rtico.rc
+++ b/src/gnuwin32/front-ends/rtico.rc
@@ -24,7 +24,7 @@ BEGIN
             VALUE "FileVersion", R_MAJOR "." R_MINOR " " R_STATUS " (" R_YEAR "-" R_MONTH "-" R_DAY ")\0"
             VALUE "LegalCopyright", "R Core Team 1995-" R_YEAR "\0"
             VALUE "R Version", R_MAJOR "." R_MINOR " " R_STATUS " (" R_YEAR "-" R_MONTH "-" R_DAY ")\0"
-            VALUE "Project info", "http://www.r-project.org\0"
+            VALUE "Project info", "https://www.r-project.org\0"
         END
     END
     BLOCK "VarFileInfo"
diff --git a/src/gnuwin32/getline/getline.c b/src/gnuwin32/getline/getline.c
index 0805369..f543925 100644
--- a/src/gnuwin32/getline/getline.c
+++ b/src/gnuwin32/getline/getline.c
@@ -147,9 +147,9 @@ gl_getc(void)
       st = r.Event.KeyEvent.dwControlKeyState;
       vk = r.Event.KeyEvent.wVirtualKeyCode;
       if (r.Event.KeyEvent.bKeyDown) {
-	if (vk == VK_MENU && (st & LEFT_ALT_PRESSED)) { /* VK_MENU is
+        AltIsDown = (st & LEFT_ALT_PRESSED);
+	if (vk == VK_MENU && AltIsDown) { /* VK_MENU is
 							   Alt or AltGr */
-	  AltIsDown = 1;
 	  nAlt = 0;
 	  bbb  = 0;
 	} 
diff --git a/src/gnuwin32/guicolors.h b/src/gnuwin32/guicolors.h
index 2ce71fa..da1fbd4 100644
--- a/src/gnuwin32/guicolors.h
+++ b/src/gnuwin32/guicolors.h
@@ -15,7 +15,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  */
 
 
diff --git a/src/gnuwin32/installer/CustomMsg.iss b/src/gnuwin32/installer/CustomMsg.iss
index 57aad89..939ec59 100644
--- a/src/gnuwin32/installer/CustomMsg.iss
+++ b/src/gnuwin32/installer/CustomMsg.iss
@@ -24,11 +24,6 @@ en.HelpStyleq=Which form of help display do you prefer?
 en.HelpStylei=Please specify plain text or HTML help, then click Next.
 en.HelpStyle0=Plain text
 en.HelpStyle1=HTML help
-en.Internett=Internet Access
-en.Internetq=Do you want to use internet2.dll, to make use of Internet Explorer proxy settings?
-en.Interneti=Please specify Standard or Internet2, then click Next.
-en.Internet0=Standard
-en.Internet1=Internet2
 
 br.regentries=Entradas no registro:
 br.associate=&Associar arquivos .RData ao R
@@ -52,11 +47,6 @@ br.HelpStyleq=Que formato de exibição de ajuda você prefere?
 br.HelpStylei=Por favor especifique texto puro, ou ajuda em HTML, e então clique em Avançar.
 br.HelpStyle0=Texto puro
 br.HelpStyle1=Ajuda HTML
-br.Internett=Acesso à Internet
-br.Internetq=Você deseja usar a internet2.dll, para utilizar as configurações de proxy do Internet Explorer?
-br.Interneti=Por favor especifique Padrão ou Internet2, então clique em Avançar.
-br.Internet0=Padrão
-br.Internet1=Internet2
 
 dk.regentries=Indgange i registreringsdatabasen:
 dk.associate=&Associer R med .RData-filer
@@ -80,11 +70,6 @@ dk.HelpStyleq=Hvilken form for visning af hjælp foretrækker du?
 dk.HelpStylei=Angiv venligst klartekst eller HTML-hjælp og klik Næste.
 dk.HelpStyle0=Klartekst
 dk.HelpStyle1=HTML-hjælp
-dk.Internett=Internetadgang
-dk.Internetq=Ønsker du at bruge internet2.dll, for at gøre brug af Internet Explorers proxy-indstillinger?
-dk.Interneti=Angiv venligst Standard eller Internet2 og klik Næste.
-dk.Internet0=Standard
-dk.Internet1=Internet2
 
 es.regentries=Registro de entradas:
 es.associate=&Asociar archivos .RData con R
@@ -108,11 +93,6 @@ es.HelpStyleq=Que forma prefiere?
 es.HelpStylei=Por favor texto simple, o HTML, luego haga clic en Siguiente.
 es.HelpStyle0=Texto simple
 es.HelpStyle1=Ayuda HTML
-es.Internett=Acceso a Internet
-es.Internetq=Desea utilizar internet2.dll para la configuración proxi del Internet Explorer?
-es.Interneti=Por favor especifique Standard o Internet2, luego haga clic en Siguiente.
-es.Internet0=Standard
-es.Internet1=Internet2
 
 fr.regentries=Entrées dans le registre :
 fr.associate=&Associer R avec les fichiers .RData
@@ -136,11 +116,6 @@ fr.HelpStyleq=Quel format de l'aide préférez-vous ?
 fr.HelpStylei=Veuillez spécifier texte ou HTML, puis cliquez sur Suivant.
 fr.HelpStyle0=texte
 fr.HelpStyle1=HTML
-fr.Internett=Accès Internet
-fr.Internetq=Voulez-vous utiliser internet2.dll, afin d'employer les paramètres de proxy d'Internet Explorer ?
-fr.Interneti=Veuillez spécifier Standard ou Internet2, puis cliquez sur Suivant.
-fr.Internet0=Standard
-fr.Internet1=Internet2
 
 de.regentries=Einträge in der Windows-Registrierung:
 de.associate=&Verknüpfe R mit .RData Dateien
@@ -164,11 +139,6 @@ de.HelpStyleq=Welche Art der Hilfe-Anzeige ziehen Sie vor?
 de.HelpStylei=Bitte wählen Sie "reiner Text" oder "HTML Hilfe" und klicken dann "weiter".
 de.HelpStyle0=reiner Text
 de.HelpStyle1=HTML Hilfe
-de.Internett=Internetzugang
-de.Internetq=Möchten Sie die internet2.dll benutzen, um auf die Internet Explorer Proxyeinstellungen zuzugreifen?
-de.Interneti=Bitte wählen Sie "Standard2 oder "Internet2" und klicken dann "weiter".
-de.Internet0=Standard
-de.Internet1=Internet2
 
 it.regentries=Valori registri:
 it.associate=Associa R ai file .RData
@@ -192,11 +162,6 @@ it.HelpStyleq=Quale tipo di formato Aiuti preferisci?
 it.HelpStylei=Specificare testo semplice, aiuti HTML e poi premere Avanti
 it.HelpStyle0=testo semplice
 it.HelpStyle1=aiuti HTML
-it.Internett=Accesso ad Internet
-it.Internetq=Vuoi utilizzare internet2.dll per utilizzare le impostazioni proxy di Internet Explorer?
-it.Interneti=Specificare Stadard o Internet2 e poi premere Avanti
-it.Internet0=Standard
-it.Internet1=Internet2
 
 nl.regentries=Register entries:
 nl.associate=&R associëren met .RData bestanden
@@ -220,11 +185,6 @@ nl.HelpStyleq=Op welke manier verkiest u de hulp weer te geven?
 nl.HelpStylei=Kies tussen gewone tekst, of HTML hulp, en klik op Volgende.
 nl.HelpStyle0=Gewone tekst
 nl.HelpStyle1=HTML hulp
-nl.Internett=Internet-toegang
-nl.Internetq=Wenst u internet2.dll te gebruiken, om zo de Internet Explorer proxy-instellingen te gebruiken ?
-nl.Interneti=Kies Standaard of Internet2, en klik op Volgende.
-nl.Internet0=Standaard
-nl.Internet1=Internet2
 
 no.regentries=Registernøkler:
 no.associate=Knytt R til .RData-filer
@@ -248,11 +208,6 @@ no.HelpStyleq=Hva slags hjelpevisning foretrekker du?
 no.HelpStylei=Velg teksthjelp, eller HTML-hjelp, og klikk Neste.
 no.HelpStyle0=Teksthjelp
 no.HelpStyle1=HTML-hjelp
-no.Internett=Internett-tilgang
-no.Internetq=Ønsker du å bruke internet2.dll, for å benytte proxy-innstillingene til Internet Explorer?
-no.Interneti=Velg enten Standard eller Internet2, og klikk neste.
-no.Internet0=Standard
-no.Internet1=Internet2
 
 
 sl.regentries=Vnosi v registru:
@@ -286,11 +241,6 @@ po.HelpStyleq=Jaki typ pokazania pomocy wolisz?
 po.HelpStylei=Wybierz pomoc tekstową, lub pomoc HTML, i kliknij Dalej.
 po.HelpStyle0=Pomoc tekstowa
 po.HelpStyle1=pomoc HTML
-po.Internett=Dostęp do internetu
-po.Internetq=Czy chcesz używać internet2.dll, by wykorzystać nastawienie proxy z Internet Explorer?
-po.Interneti=Wybierz Standard lub Internet2, i kliknij Dalej.
-po.Internet0=Standard
-po.Internet1=Internet2
 
 
 ja.regentries=レジストリ項目:
@@ -315,11 +265,6 @@ ja.HelpStyleq=ヘルプはどのような表示方法にしますか?
 ja.HelpStylei=テキスト形式, HTMLヘルプのどれかを選び、「次へ」をクリックして下さい
 ja.HelpStyle0=テキスト形式
 ja.HelpStyle1=HTMLヘルプ
-ja.Internett=インターネット接続
-ja.Internetq=internet2.dll を使って、RがInternet Explorer のプロキシ設定を参照するようにしますか?
-ja.Interneti=「標準」か「Internet2」を選択し、「次へ」をクリックして下さい
-ja.Internet0=標準
-ja.Internet1=Internet2
 
 
 chs.regentries=登記冊记录項:
@@ -344,11 +289,6 @@ chs.HelpStyleq=你喜欢哪一种帮助显示?
 chs.HelpStylei=请选纯文本或HTML帮助,然后点击Next.
 chs.HelpStyle0=选纯文本
 chs.HelpStyle1=HTML帮助
-chs.Internett=互联网接入
-chs.Internetq=你想通过internet2.dll来使用Internet Explorer的代理设置吗?
-chs.Interneti=请指定标准或互联网2,然后再点击Next.
-chs.Internet0=标准
-chs.Internet1=互联网2
 
 ko.regentries=레지스트리 항목들:
 ko.associate=R을 .RData 파일들과 연결합니다
@@ -372,11 +312,6 @@ ko.HelpStyleq=어떤 형식의 도움말 기능을 당신은 선호하나요?
 ko.HelpStylei=일반 텍스트 기반의 도움말 혹은 HTML 기반의 도움말을 사용할 것인지 선택하신 뒤, Next 를 눌러주세요
 ko.HelpStyle0=일반 텍스트 기반
 ko.HelpStyle1=HTML 기반의 도움말
-ko.Internett=인터넷 접속
-ko.Internetq=인터넷 익스플로러 프락시 설정을 위해서 internet2.dll 을 사용하길 원하시나요?
-ko.Interneti=표준 혹은 Internet2 중 하나를 선택하신 후 Next 를 눌러주세요
-ko.Internet0=표준
-ko.Internet1=Internet2
 
 cht.regentries=登錄表項目:
 cht.associate=將資料檔副檔名 .R 關聯至 R
@@ -409,8 +344,4 @@ ru.HelpStyleq=Какой тип отображения помощи Вы пре
 ru.HelpStylei=Пожалуйста, укажите "простой текст" или "помощь HTML", затем "Далее".
 ru.HelpStyle0=Простой текст
 ru.HelpStyle1=Помощь HTML (использовать браузер)
-ru.Internett=Доступ в Интернет
-ru.Internetq=Вы хотите использовать "internet2.dll" для того, чтобы были доступны настройки прокси-сервера из Internet Explorer?
-ru.Interneti=Пожалуйста, укажите "Стандартный" либо "Internet2", затем "Далее".
-ru.Internet0=Стандартный
-ru.Internet1=Internet2
+
diff --git a/src/gnuwin32/installer/JRins.R b/src/gnuwin32/installer/JRins.R
index aaa064e..9bcc37e 100644
--- a/src/gnuwin32/installer/JRins.R
+++ b/src/gnuwin32/installer/JRins.R
@@ -1,6 +1,6 @@
 #  File src/gnuwin32/installer/JRins.R
 #
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
 #  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
@@ -13,11 +13,11 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
-### JRins.R Rversion srcdir MDISDI HelpStyle Internet Producer ISDIR
+### JRins.R Rversion srcdir MDISDI HelpStyle Producer ISDIR
 
-.make_R.iss <- function(RW, srcdir, MDISDI=0, HelpStyle=1, Internet=0,
+.make_R.iss <- function(RW, srcdir, MDISDI=0, HelpStyle=1,
                        Producer = "R-core", ISDIR)
 {
     have32bit <- file_test("-d", file.path(srcdir, "bin", "i386"))
@@ -86,7 +86,6 @@
     lines <- readLines("code.iss")
     lines <- gsub("@MDISDI@", MDISDI, lines)
     lines <- gsub("@HelpStyle@", HelpStyle, lines)
-    lines <- gsub("@Internet@", Internet, lines)
     writeLines(lines, con)
 
     writeLines(c("", "", "[Files]"), con)
@@ -110,8 +109,38 @@
 	else "main"
 
         if (component == "x64" && !have64bit) next
+        
+        # Skip the /bin front ends, they are installed below
+        if (grepl("bin/R.exe$", f)) next
+        if (grepl("bin/Rscript.exe$", f)) next
+        
+        f <- gsub("/", "\\", f, fixed = TRUE)   
+        
+        # The /bin front ends are installed according to this rule:
+        #  - If x64 is installed, use that version of Rfe
+        #  - Otherwise, use the i386 version
+        if (grepl("Rfe\\.exe$", f)) {
+            if (component == "i386") 
+                comp <- "i386 and not x64"
+            else 
+            	comp <- component
+            bindir <- gsub("/", "\\", dirname(dir), fixed = TRUE)
+            cat('Source: "', srcdir, '\\', f, '"; ',
+                'DestDir: "{app}', bindir, '"; ',
+                'DestName: "R.exe"; ',
+                'Flags: ignoreversion; ',
+                'Components: ', comp,
+                '\n',
+                file = con, sep = "")   
+            cat('Source: "', srcdir, '\\', f, '"; ',
+                'DestDir: "{app}', bindir, '"; ',
+                'DestName: "Rscript.exe"; ',
+                'Flags: ignoreversion; ',
+                'Components: ', comp,
+                '\n',
+                file = con, sep = "")            
+        }
 
-        f <- gsub("/", "\\", f, fixed = TRUE)
         cat('Source: "', srcdir, '\\', f, '"; ',
             'DestDir: "{app}', dir, '"; ',
             'Flags: ignoreversion; ',
@@ -120,6 +149,9 @@
         if(f %in% c("etc\\Rprofile.site", "etc\\Rconsole"))
             cat("; AfterInstall: EditOptions()", file = con)
         cat("\n", file = con)
+        
+
+        
     }
 
     close(con)
diff --git a/src/gnuwin32/installer/Makefile b/src/gnuwin32/installer/Makefile
index fcc7cb3..9840985 100644
--- a/src/gnuwin32/installer/Makefile
+++ b/src/gnuwin32/installer/Makefile
@@ -17,9 +17,6 @@ MDISDI = 0
 ## Default help style, 0=plain text, 1=HTML
 HelpStyle = 1
 
-## Default internet connection, 0=Standard, 1=Internet2
-Internet = 0
-
 ## Used to set Registry entries
 Producer = R-core
 
@@ -46,7 +43,7 @@ ETC_FILES = Rprofile.site Rconsole Rdevga rgb.txt repositories Rcmd_environ
 
 
 # we don't want share/{Makefile.in,java,sh} installed
-SHARE_DIRS = R dictionaries encodings licenses make texmf zoneinfo
+SHARE_DIRS = R dictionaries encodings licenses make Rd texmf zoneinfo
 
 all: $(RPREFIX)-win.exe
 msi: $(RPREFIX)-$(SUFF).msi
@@ -62,10 +59,14 @@ imagedir:
 	$(RM) $(RPREFIX)/*/Makefile.in
 	$(MKDIR) -p $(RPREFIX)/etc$(R_ARCH)
 	$(CP) -p $(foreach i,$(ETC_FILES),$(R_HOME)/etc/$i) $(RPREFIX)/etc
+	if test -f "$(R_HOME)/etc/curl-ca-bundle.crt"; then \
+	  $(CP) -p "$(R_HOME)/etc/curl-ca-bundle.crt" $(RPREFIX)/etc; \
+	fi
 	$(CP) -p $(R_HOME)/etc$(R_ARCH)/Makeconf $(RPREFIX)/etc$(R_ARCH)
 # copy info and documentation files
 	$(MKDIR) -p $(RPREFIX)/doc
 	$(CP) -p $(R_HOME)/doc/CRAN_mirrors.csv $(RPREFIX)/doc
+	$(CP) -p $(R_HOME)/doc/BioC_mirrors.csv $(RPREFIX)/doc
 	$(MKDIR) -p $(RPREFIX)/doc/manual/images
 	$(CP) -pR $(R_HOME)/doc/html $(RPREFIX)/doc
 	$(CP) -p $(R_HOME)/doc/manual/*.html $(R_HOME)/doc/manual/*.pdf \
@@ -94,14 +95,16 @@ imagedir:
 # files to make source packages
 	$(MKDIR) -p $(RPREFIX)/share \
 	  $(RPREFIX)/src/library $(RPREFIX)/src/gnuwin32
-	$(CP) $(R_HOME)/doc/html/logo.jpg $(RPREFIX)/doc/html
+	$(CP) $(R_HOME)/doc/html/logo.jpg $(R_HOME)/doc/html/Rlogo.svg $(RPREFIX)/doc/html
 	$(CP) $(R_HOME)/doc/KEYWORDS* $(RPREFIX)/doc
 	$(CP) -pR $(R_HOME)/include $(RPREFIX)
 	$(CP) -pR $(foreach i,$(SHARE_DIRS),$(R_HOME)/share/$i) $(RPREFIX)/share
 # This is odd -- better to clean the copy
 	(cd ..; $(MAKE) --no-print-directory PKGDIR=. pkgclean-windlgs)
 	$(CP) -pR ../windlgs $(RPREFIX)/src/library
-#
+# Edit Makeconf
+	$(SED) -e 's!^BINPREF [?]= .*!BINPREF ?= c:/Rtools/mingw_64/bin/!' \
+	  $(R_HOME)/etc/x64/Makeconf > $(RPREFIX)/etc/x64/Makeconf
 # test dir
 	mkdir $(RPREFIX)/tests
 	$(MAKE) --no-print-directory -C ../../../tests -f Makefile.win \
@@ -143,6 +146,9 @@ ifneq ($(strip $(HOME32)),)
              ../../../library/$${f}/DESCRIPTION \
              > $(RPREFIX)/library/$${f}/DESCRIPTION; \
 	done
+# Edit Makeconf file to default Rtools location
+	$(SED) -e 's!^BINPREF [?]= .*!BINPREF ?= c:/Rtools/mingw_32/bin/!' \
+	  $(HOME32)/etc/i386/Makeconf > $(RPREFIX)/etc/i386/Makeconf
 else
 	@echo "------------ not including 32-bit files"
 endif
@@ -163,7 +169,7 @@ R.iss: JRins.R header1.iss types3264.iss types32.iss code.iss \
   ../../../VERSION ../../../SVN-REVISION
 	../../../bin$(R_ARCH)/Rscript JRins.R \
 	  $(RPREFIX) $(RPREFIX) $(MDISDI) \
-	  $(HelpStyle) $(Internet) $(Producer) "$(ISDIR)"
+	  $(HelpStyle) $(Producer) "$(ISDIR)"
 
 $(RPREFIX)-win.exe: R.iss
 	"$(ISDIR)/iscc" R.iss > $(RPREFIX).log 2>&1
@@ -206,5 +212,5 @@ myR:
 	  "$(IMAGEDIR)/$(BINDIR)/Rterm.exe" --vanilla --slave)
 	../../../bin$(R_ARCH)/Rscript JRins.R \
 	  $(RPREFIX) "$(IMAGEDIR)" $(MDISDI) \
-	  $(HelpStyle) $(Internet) $(Producer) "$(ISDIR)"
+	  $(HelpStyle) $(Producer) "$(ISDIR)"
 	"$(ISDIR)/iscc" R.iss > myR.log
diff --git a/src/gnuwin32/installer/R.bmp b/src/gnuwin32/installer/R.bmp
index 94297b7..9931104 100644
Binary files a/src/gnuwin32/installer/R.bmp and b/src/gnuwin32/installer/R.bmp differ
diff --git a/src/gnuwin32/installer/WiXins.R b/src/gnuwin32/installer/WiXins.R
index 40f4228..5d8c266 100644
--- a/src/gnuwin32/installer/WiXins.R
+++ b/src/gnuwin32/installer/WiXins.R
@@ -1,6 +1,6 @@
 #  File src/gnuwin32/installer/WiXins.R
 #
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
 #  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
@@ -13,7 +13,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 ## Collection of notes about WiX usage
 
diff --git a/src/gnuwin32/installer/code.iss b/src/gnuwin32/installer/code.iss
index a82cccb..6c33be6 100644
--- a/src/gnuwin32/installer/code.iss
+++ b/src/gnuwin32/installer/code.iss
@@ -6,7 +6,6 @@ var
   SelectOptionsPage: TInputOptionWizardPage;
   MDISDIPage: TInputOptionWizardPage;
   HelpStylePage: TInputOptionWizardPage;
-  InternetPage: TInputOptionWizardPage;
   INIFilename: String;
   
 function IsAdmin: boolean;
@@ -46,12 +45,6 @@ begin
   HelpStylePage.Add(CustomMessage('HelpStyle0'));
   HelpStylePage.Add(CustomMessage('HelpStyle1'));
    
-  InternetPage := CreateInputOptionPage(HelpStylePage.ID,
-    CustomMessage('Internett'), CustomMessage('Internetq'),
-    CustomMessage('Interneti'), True, False);
-  InternetPage.Add(CustomMessage('Internet0'));
-  InternetPage.Add(CustomMessage('Internet1'));    
-
   INIFilename := ExpandConstant('{param:LOADINF}');
   if INIFilename <> '' then INIFilename := ExpandFilename(INIFilename);
   
@@ -83,17 +76,6 @@ begin
   end;
   HelpStylePage.SelectedValueIndex := index;
   
-  option := GetPreviousData('Internet', '');
-  if INIFilename <> '' then
-    option := GetIniString('R', 'Internet', option, INIFilename);
-  case option of
-    'Standard':  index := 0;
-    'Internet2': index := 1;
-  else
-    index := @Internet@;
-  end;
-  InternetPage.SelectedValueIndex := index;
-    
   { Get the save name now, because the current dir might change }
   INIFilename := ExpandConstant('{param:SAVEINF}');
   if INIFilename <> '' then INIFilename := ExpandFilename(INIFilename);    
@@ -103,10 +85,8 @@ procedure RegisterPreviousData(PreviousDataKey: Integer);
 var
   MDISDI: String;
   HelpStyle: String;
-  Internet: String;
 begin
 
-  
   { Store the settings so we can restore them next time }
   case MDISDIPage.SelectedValueIndex of
     0: MDISDI := 'MDI';
@@ -124,13 +104,6 @@ begin
   if INIFilename <> '' then
     SetIniString('R', 'HelpStyle', HelpStyle, INIFilename);
   
-  case InternetPage.SelectedValueIndex of
-    0: Internet := 'Standard';
-    1: Internet := 'Internet2';
-  end;
-  SetPreviousData(PreviousDataKey, 'Internet', Internet);
-  if INIFilename <> '' then
-    SetIniString('R', 'Internet', Internet, INIFilename);
 end;
 
 function SetCommentMarker(var lines: TArrayOfString; option: String; active: boolean) : boolean;
@@ -173,17 +146,10 @@ begin
     SaveStringsToFile(filename, lines, False);
 end;
 
-function CmdParms(Param:String): String;
-begin
-  Result := '';
-  if InternetPage.SelectedValueIndex = 1 then
-    Result := '--internet2';
-end;
-
 function ShouldSkipPage(PageID: Integer): boolean;
 begin
   if PageID = NoAdminPage.ID then Result := IsAdmin
-  else if (PageID = MDISDIPage.ID) or (PageID = HelpStylePage.ID) or (PageID = InternetPage.ID) then 
+  else if (PageID = MDISDIPage.ID) or (PageID = HelpStylePage.ID) then 
     Result := SelectOptionsPage.SelectedValueIndex = 1
   else Result := false;
 end;
diff --git a/src/gnuwin32/installer/header1.iss b/src/gnuwin32/installer/header1.iss
index 9b7d8e9..4ec4eab 100644
--- a/src/gnuwin32/installer/header1.iss
+++ b/src/gnuwin32/installer/header1.iss
@@ -10,9 +10,9 @@ UsePreviousAppDir=no
 ChangesAssociations=yes
 Compression=lzma/ultra
 SolidCompression=yes
-AppPublisherURL=http://www.r-project.org
-AppSupportURL=http://www.r-project.org
-AppUpdatesURL=http://www.r-project.org
+AppPublisherURL=https://www.r-project.org
+AppSupportURL=https://www.r-project.org
+AppUpdatesURL=https://www.r-project.org
 
 [Languages]
 Name: en; MessagesFile: "compiler:Default.isl"
diff --git a/src/gnuwin32/installer/reg.iss b/src/gnuwin32/installer/reg.iss
index ed64322..b6018f2 100644
--- a/src/gnuwin32/installer/reg.iss
+++ b/src/gnuwin32/installer/reg.iss
@@ -1,7 +1,7 @@
 [Icons]
-Name: "{group}\R @RVER@"; Filename: "{app}\bin\i386\Rgui.exe"; WorkingDir: "{userdocs}"; Parameters: {code:CmdParms}
-Name: "{commondesktop}\R @RVER@"; Filename: "{app}\bin\i386\Rgui.exe"; MinVersion: 0,5.0; Tasks: desktopicon; WorkingDir: "{userdocs}"; Parameters: {code:CmdParms}
-Name: "{userappdata}\Microsoft\Internet Explorer\Quick Launch\R @RVER@"; Filename: "{app}\bin\i386\Rgui.exe"; Tasks: quicklaunchicon; WorkingDir: "{userdocs}"; Parameters: {code:CmdParms}
+Name: "{group}\R @RVER@"; Filename: "{app}\bin\i386\Rgui.exe"; WorkingDir: "{userdocs}"
+Name: "{commondesktop}\R @RVER@"; Filename: "{app}\bin\i386\Rgui.exe"; MinVersion: 0,5.0; Tasks: desktopicon; WorkingDir: "{userdocs}"
+Name: "{userappdata}\Microsoft\Internet Explorer\Quick Launch\R @RVER@"; Filename: "{app}\bin\i386\Rgui.exe"; Tasks: quicklaunchicon; WorkingDir: "{userdocs}"
 
 [Registry] 
 Root: HKLM; Subkey: "Software\@Producer@"; Flags: uninsdeletekeyifempty; Tasks: recordversion; Check: IsAdmin
diff --git a/src/gnuwin32/installer/reg3264.iss b/src/gnuwin32/installer/reg3264.iss
index 3387606..dc60d3d 100644
--- a/src/gnuwin32/installer/reg3264.iss
+++ b/src/gnuwin32/installer/reg3264.iss
@@ -1,12 +1,12 @@
 [Icons]
-Name: "{group}\R i386 @RVER@"; Filename: "{app}\bin\i386\Rgui.exe"; WorkingDir: "{userdocs}"; Parameters: {code:CmdParms}; Check: isComponentSelected('i386')
-Name: "{group}\R x64 @RVER@"; Filename: "{app}\bin\x64\Rgui.exe"; WorkingDir: "{userdocs}"; Parameters: {code:CmdParms}; Check: isComponentSelected('x64') and Is64BitInstallMode
+Name: "{group}\R i386 @RVER@"; Filename: "{app}\bin\i386\Rgui.exe"; WorkingDir: "{userdocs}"; Check: isComponentSelected('i386')
+Name: "{group}\R x64 @RVER@"; Filename: "{app}\bin\x64\Rgui.exe"; WorkingDir: "{userdocs}"; Check: isComponentSelected('x64') and Is64BitInstallMode
 
-Name: "{commondesktop}\R i386 @RVER@"; Filename: "{app}\bin\i386\Rgui.exe"; MinVersion: 0,5.0; Tasks: desktopicon; WorkingDir: "{userdocs}"; Parameters: {code:CmdParms}; Check: isComponentSelected('i386')
-Name: "{commondesktop}\R x64 @RVER@"; Filename: "{app}\bin\x64\Rgui.exe"; MinVersion: 0,5.0; Tasks: desktopicon; WorkingDir: "{userdocs}"; Parameters: {code:CmdParms}; Check: isComponentSelected('x64') and Is64BitInstallMode
+Name: "{commondesktop}\R i386 @RVER@"; Filename: "{app}\bin\i386\Rgui.exe"; MinVersion: 0,5.0; Tasks: desktopicon; WorkingDir: "{userdocs}"; Check: isComponentSelected('i386')
+Name: "{commondesktop}\R x64 @RVER@"; Filename: "{app}\bin\x64\Rgui.exe"; MinVersion: 0,5.0; Tasks: desktopicon; WorkingDir: "{userdocs}"; Check: isComponentSelected('x64') and Is64BitInstallMode
 
-Name: "{userappdata}\Microsoft\Internet Explorer\Quick Launch\R i386 @RVER@"; Filename: "{app}\bin\i386\Rgui.exe"; Tasks: quicklaunchicon; WorkingDir: "{userdocs}"; Parameters: {code:CmdParms}; Check: isComponentSelected('i386')
-Name: "{userappdata}\Microsoft\Internet Explorer\Quick Launch\R x64 @RVER@"; Filename: "{app}\bin\x64\Rgui.exe"; Tasks: quicklaunchicon; WorkingDir: "{userdocs}"; Parameters: {code:CmdParms}; Check: isComponentSelected('x64') and Is64BitInstallMode 
+Name: "{userappdata}\Microsoft\Internet Explorer\Quick Launch\R i386 @RVER@"; Filename: "{app}\bin\i386\Rgui.exe"; Tasks: quicklaunchicon; WorkingDir: "{userdocs}"; Check: isComponentSelected('i386')
+Name: "{userappdata}\Microsoft\Internet Explorer\Quick Launch\R x64 @RVER@"; Filename: "{app}\bin\x64\Rgui.exe"; Tasks: quicklaunchicon; WorkingDir: "{userdocs}"; Check: isComponentSelected('x64') and Is64BitInstallMode 
 
 [Registry] 
 Root: HKLM; Subkey: "Software\@Producer@"; Flags: uninsdeletekeyifempty; Tasks: recordversion; Check: IsAdmin and isComponentSelected('x64') and Is64BitInstallMode
diff --git a/src/gnuwin32/malloc.c b/src/gnuwin32/malloc.c
index a325387..a6c66c1 100644
--- a/src/gnuwin32/malloc.c
+++ b/src/gnuwin32/malloc.c
@@ -649,7 +649,6 @@ extern "C" {
 extern size_t R_max_memory;
 extern int R_Is_Running;
 static size_t R_used = 0;
-void Rf_warning(const char *, ...);
 
 #if !ONLY_MSPACES
 
@@ -1336,9 +1335,6 @@ static void* win32mmap(size_t size) {
   void* ptr;
   /* printf("current %0.1f, asking %0.1f\n", R_used/1048576., size/1048576.);*/
   if (R_used + size > R_max_memory) {
-      if(R_Is_Running) 
-	  Rf_warning("Reached total allocation of %dMb: see help(memory.size)",
-		     R_max_memory/1048576);
       return MFAIL;
   }
   ptr = VirtualAlloc(0, size, MEM_RESERVE|MEM_COMMIT, PAGE_READWRITE);
@@ -1351,9 +1347,6 @@ static void* win32direct_mmap(size_t size) {
   void* ptr;
   /* printf("current %0.1f, asking %0.1f\n", R_used/1048576., size/1048576.);*/
   if (R_used + size > R_max_memory) {
-      if(R_Is_Running) 
-	  Rf_warning("Reached total allocation of %dMb: see help(memory.size)",
-		     R_max_memory/1048576);
       return MFAIL;
   }
   ptr = VirtualAlloc(0, size, MEM_RESERVE|MEM_COMMIT|MEM_TOP_DOWN,
@@ -1598,7 +1591,7 @@ static MLOCK_T magic_init_mutex;
   Each freshly allocated chunk must have both cinuse and pinuse set.
   That is, each allocated chunk borders either a previously allocated
   and still in-use chunk, or the base of its memory arena. This is
-  ensured by making all allocations from the the `lowest' part of any
+  ensured by making all allocations from the `lowest' part of any
   found chunk.  Further, no free chunk physically borders another one,
   so each free chunk is known to be preceded and followed by either
   inuse chunks or the ends of memory.
diff --git a/src/gnuwin32/opt.c b/src/gnuwin32/opt.c
index 52c58f7..46cdcc2 100644
--- a/src/gnuwin32/opt.c
+++ b/src/gnuwin32/opt.c
@@ -14,7 +14,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  */
 
 #ifdef HAVE_CONFIG_H
diff --git a/src/gnuwin32/opt.h b/src/gnuwin32/opt.h
index 19da8c4..9c0bcf9 100644
--- a/src/gnuwin32/opt.h
+++ b/src/gnuwin32/opt.h
@@ -14,7 +14,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  */
 
 int optopenfile(const char *fname);
diff --git a/src/gnuwin32/pager.c b/src/gnuwin32/pager.c
index a5642c1..7cf1ad6 100644
--- a/src/gnuwin32/pager.c
+++ b/src/gnuwin32/pager.c
@@ -2,7 +2,8 @@
  *  R : A Computer Language for Statistical Data Analysis
  *  file pager.c
  *  Copyright (C) 1998--2002  Guido Masarotto and Brian Ripley
- *  Copyright (C) 2004-8      The R Foundation
+ *  Copyright (C) 2004--8     The R Foundation
+ *  Copyright (C) 2004--2014  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
@@ -16,7 +17,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  */
 
 #ifdef HAVE_CONFIG_H
@@ -38,13 +39,11 @@
 #include "console.h"
 #include "consolestructs.h"
 #include "rui.h"
-#include <Startup.h> /* for UImode */
+#include <Startup.h> /* for CharacterMode */
 
 #define CE_UTF8 1
 extern size_t Rf_utf8towcs(wchar_t *wc, const char *s, size_t n);
 
-extern UImode  CharacterMode;
-
 #define PAGERMAXKEPT 12
 #define PAGERMAXTITLE 128
 
@@ -467,9 +466,9 @@ static pager pagercreate(void)
     MCHECK(newmenu(G_("File")));
     MCHECK(m = newmenuitem(G_("New script"), 'N', menueditornew));
     MCHECK(m = newmenuitem(G_("Open script..."), 'O', menueditoropen));
-    MCHECK(m = newmenuitem(G_("Print..."), 0, pagerprint));
+    MCHECK(m = newmenuitem(G_("Print..."), 'P', pagerprint));
     setdata(m, c);
-    MCHECK(m = newmenuitem(G_("Save to File..."), 0, pagersavefile));
+    MCHECK(m = newmenuitem(G_("Save to File..."), 'S', pagersavefile));
     setdata(m, c);
     MCHECK(m = newmenuitem("-", 0, NULL));
     MCHECK(m = newmenuitem(G_("Close"), 0, pagerclose));
diff --git a/src/gnuwin32/preferences.c b/src/gnuwin32/preferences.c
index fb64dca..67bee7c 100644
--- a/src/gnuwin32/preferences.c
+++ b/src/gnuwin32/preferences.c
@@ -2,7 +2,7 @@
  *  R : A Computer Language for Statistical Data Analysis
  *  file preferences.c
  *  Copyright (C) 2000      Guido Masarotto and Brian Ripley
- *                2004-2013 R Core Team
+ *                2004-2014 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
@@ -16,7 +16,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  */
 
 #ifdef HAVE_CONFIG_H
diff --git a/src/gnuwin32/preferences.h b/src/gnuwin32/preferences.h
index c51d5d2..19f6eeb 100644
--- a/src/gnuwin32/preferences.h
+++ b/src/gnuwin32/preferences.h
@@ -16,7 +16,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  */
  
 #include "guicolors.h"
diff --git a/src/gnuwin32/rgui_UTF8.h b/src/gnuwin32/rgui_UTF8.h
index ffca28a..dccdb6a 100644
--- a/src/gnuwin32/rgui_UTF8.h
+++ b/src/gnuwin32/rgui_UTF8.h
@@ -13,7 +13,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  */
 
 /* used on console.c, EncodeString and do_cat */
diff --git a/src/gnuwin32/rhome.c b/src/gnuwin32/rhome.c
index c5f311d..c29b71c 100644
--- a/src/gnuwin32/rhome.c
+++ b/src/gnuwin32/rhome.c
@@ -14,7 +14,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  */
 
 
diff --git a/src/gnuwin32/rt_complete.c b/src/gnuwin32/rt_complete.c
index 50cee77..d7d1596 100644
--- a/src/gnuwin32/rt_complete.c
+++ b/src/gnuwin32/rt_complete.c
@@ -1,7 +1,7 @@
 /*
  *  R : A Computer Language for Statistical Data Analysis
  *  file rt_complete.c
- *  Copyright (C) 2007-13 The R Core Team.
+ *  Copyright (C) 2007-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
@@ -15,7 +15,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  */
 
 
@@ -90,13 +90,16 @@ static int rt_completion(char *buf, int offset, int *loc)
 	}
     }
 
-    /* FIXME: need to escape quotes properly */
-    char pline[strlen(partial_line) + 1];
-    strcpy(pline, partial_line);
-    /* poor attempt at escaping quotes that sort of works */
-    alen = strlen(pline);
-    for (i = 0; i < alen; i++) if (pline[i] == '"') pline[i] = '\'';
-
+    alen = strlen(partial_line);
+    char orig[alen + 1], pline[2*alen + 1],
+            *pchar = pline, achar;
+    strcpy(orig, partial_line);
+    for (i = 0; i < alen; i++) {
+        achar = orig[i];
+	if (achar == '"' || achar == '\\') *pchar++ = '\\';
+	*pchar++ = achar;
+    }
+    *pchar = 0;
     size_t len = strlen(pline) + 100; 
     char cmd[len];
     snprintf(cmd, len,
diff --git a/src/gnuwin32/rui.c b/src/gnuwin32/rui.c
index 7c099e0..1f3a8f4 100644
--- a/src/gnuwin32/rui.c
+++ b/src/gnuwin32/rui.c
@@ -1,7 +1,7 @@
 /*
  *  R : A Computer Langage for Statistical Data Analysis
  *  Copyright (C) 1998--2005  Guido Masarotto and Brian Ripley
- *  Copyright (C) 2004--2013  The R Foundation
+ *  Copyright (C) 2004--2015  The R Foundation
  *
  *  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
@@ -15,7 +15,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  */
 
 #ifdef HAVE_CONFIG_H
@@ -917,7 +917,7 @@ int RguiPackageMenu(PkgMenuItems pmenu)
     MCHECK(pmenu->mpkgu = newmenuitem(G_("Update packages..."), 0,
 			       menupkgupdate));
     MCHECK(newmenuitem("-", 0, NULL));
-    MCHECK(pmenu->mpkgil = newmenuitem(G_("Install package(s) from local zip files..."),
+    MCHECK(pmenu->mpkgil = newmenuitem(G_("Install package(s) from local files..."),
 				0, menupkginstalllocal));
     return 0;
 }
@@ -1126,7 +1126,7 @@ int setupui(void)
     MCHECK(mdisplay = newmenuitem(G_("Display file(s)..."), 0, menudisplay));
     MCHECK(newmenuitem("-", 0, NULL));
     MCHECK(mload = newmenuitem(G_("Load Workspace..."), 0, menuloadimage));
-    MCHECK(msave = newmenuitem(G_("Save Workspace..."), 0, menusaveimage));
+    MCHECK(msave = newmenuitem(G_("Save Workspace..."), 'S', menusaveimage));
     MCHECK(newmenuitem("-", 0, NULL));
     MCHECK(mloadhistory = newmenuitem(G_("Load History..."), 0,
 				      menuloadhistory));
@@ -1135,7 +1135,7 @@ int setupui(void)
     MCHECK(newmenuitem("-", 0, NULL));
     MCHECK(newmenuitem(G_("Change dir..."), 0, menuchangedir));
     MCHECK(newmenuitem("-", 0, NULL));
-    MCHECK(newmenuitem(G_("Print..."), 0, menuprint));
+    MCHECK(newmenuitem(G_("Print..."), 'P', menuprint));
     MCHECK(newmenuitem(G_("Save to File..."), 0, menusavefile));
     MCHECK(newmenuitem("-", 0, NULL));
     MCHECK(newmenuitem(G_("Exit"), 0, menuexit));
@@ -1214,23 +1214,6 @@ int RgetMDIheight(void)
     return RgetMDIsize()->bottom;
 }
 
-#if 0
-extern int  CharacterMode;
-int DialogSelectFile(char *buf, int len)
-{
-    char *fn;
-
-    setuserfilter("All files (*.*)\0*.*\0\0");
-    fn = askfilename(G_("Select file"), "");
-/*    if (!CharacterMode)
-	show(RConsole); */
-    if (fn)
-	strncpy(buf, fn, len);
-    else
-	strcpy(buf, "");
-    return (strlen(buf));
-}
-#endif
 
 static menu *usermenus;
 static char **usermenunames;
diff --git a/src/gnuwin32/rui.h b/src/gnuwin32/rui.h
index c1f184a..4799598 100644
--- a/src/gnuwin32/rui.h
+++ b/src/gnuwin32/rui.h
@@ -15,7 +15,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  */
 
 #define RW_MDI         0x0001
diff --git a/src/gnuwin32/run.c b/src/gnuwin32/run.c
index b2342ff..be3058a 100644
--- a/src/gnuwin32/run.c
+++ b/src/gnuwin32/run.c
@@ -2,7 +2,7 @@
  *  R : A Computer Language for Statistical Data Analysis
  *  file run.c: a simple 'reading' pipe (and a command executor)
  *  Copyright  (C) 1999-2001  Guido Masarotto and Brian Ripley
- *             (C) 2007-2013  The R Core Team
+ *             (C) 2007-2014  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
@@ -16,7 +16,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  */
 
 #ifdef HAVE_CONFIG_H
@@ -36,7 +36,8 @@
 #include "run.h"
 
 #include <Startup.h> /* for CharacterMode and RGui */
-extern UImode  CharacterMode;
+
+#include <trioremap.h>
 
 static char RunError[501] = "";
 
diff --git a/src/gnuwin32/run.h b/src/gnuwin32/run.h
index 9d64adb..9862e0c 100644
--- a/src/gnuwin32/run.h
+++ b/src/gnuwin32/run.h
@@ -15,7 +15,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  */
 
 
diff --git a/src/gnuwin32/shext.c b/src/gnuwin32/shext.c
index 449d4fc..79c38de 100644
--- a/src/gnuwin32/shext.c
+++ b/src/gnuwin32/shext.c
@@ -16,7 +16,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  */
 
 #define WIN32_LEAN_AND_MEAN 1
diff --git a/src/gnuwin32/sys-win32.c b/src/gnuwin32/sys-win32.c
index fe42894..ec4cbca 100644
--- a/src/gnuwin32/sys-win32.c
+++ b/src/gnuwin32/sys-win32.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--2013  The R Core Team
+ *  Copyright (C) 1997--2014  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
@@ -15,7 +15,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  */
 
 	 /* See ../unix/system.txt for a description of functions */
@@ -33,9 +33,6 @@
 
 #include <ctype.h> /* for isalpha */
 
-extern Rboolean LoadInitFile;
-extern UImode  CharacterMode;
-
 /*
  *  4) INITIALIZATION AND TERMINATION ACTIONS
  */
@@ -110,6 +107,7 @@ const char *R_ExpandFileName(const char *s)
 
 SEXP do_machine(SEXP call, SEXP op, SEXP args, SEXP env)
 {
+    checkArity(op, args);
     return mkString("Win32");
 }
 
diff --git a/src/gnuwin32/system.c b/src/gnuwin32/system.c
index b2991ae..ec3488e 100644
--- a/src/gnuwin32/system.c
+++ b/src/gnuwin32/system.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--2013  The R Core Team
+ *  Copyright (C) 1997--2015  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
@@ -15,7 +15,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  */
 
 /* See ../unix/system.txt for a description of functions */
@@ -57,7 +57,6 @@ void editorcleanall(void);                  /* from editor.c */
 int Rwin_graphicsx = -25, Rwin_graphicsy = 0;
 
 R_size_t R_max_memory = INT_MAX;
-Rboolean UseInternet2 = FALSE;
 
 extern SA_TYPE SaveAction; /* from ../main/startup.c */
 Rboolean DebugMenuitem = FALSE;  /* exported for rui.c */
@@ -494,8 +493,16 @@ void R_CleanUp(SA_TYPE saveact, int status, int runLast)
 	PrintWarnings();        /* from device close and (if run) .Last */
     app_cleanup();
     RConsole = NULL;
-    if(ifp) fclose(ifp);        /* input file from -f or --file= */
-    if(ifile[0]) unlink(ifile); /* input file from -e */
+    // Add some protection against calling this more than once:
+    // caused by signals on Unix, so maybe cannot happen here.
+    if(ifp) { 
+	fclose(ifp);    /* input file from -f or --file= */
+	ifp = NULL; 
+    }
+    if(ifile[0]) {
+	unlink(ifile); /* input file from -e */
+	ifile[0] = '\0';
+    }
     exit(status);
 }
 
@@ -715,6 +722,12 @@ void R_SetWin32(Rstart Rp)
 	putenv(UserRHome);
     }    
 
+    
+    /* This is here temporarily while the GCC version is chosen */
+    char gccversion[30];
+    snprintf(gccversion, 30, "R_COMPILED_BY=gcc %d.%d.%d", __GNUC__, __GNUC_MINOR__, __GNUC_PATCHLEVEL__);
+    putenv(gccversion);
+
     /* Rterm and Rgui set CharacterMode during startup, then set Rp->CharacterMode
        from it in cmdlineoptions().  Rproxy never calls cmdlineoptions, so we need the
        line below */
@@ -796,7 +809,7 @@ char *PrintUsage(void)
 	msg2b[] =
 	"  --max-mem-size=N      Set limit for memory to be used by R\n  --max-ppsize=N        Set max size of protect stack to N\n",
 	msg3[] =
-	"  -q, --quiet           Don't print startup message\n  --silent              Same as --quiet\n  --slave               Make R run as quietly as possible\n  --verbose             Print more information about progress\n  --internet2           Use Internet Explorer for proxies etc.\n  --args                Skip the rest of the command line\n",
+	"  -q, --quiet           Don't print startup message\n  --silent              Same as --quiet\n  --slave               Make R run as quietly as possible\n  --verbose             Print more information about progress\n  --args                Skip the rest of the command line\n",
 	msg4[] =
 	"  --ess                 Don't use getline for command-line editing\n                          and assert interactive use\n  -f file               Take input from 'file'\n  --file=file           ditto\n  -e expression         Use 'expression' as input\n\nOne or more -e options can be used, but not together with -f or --file\n",
 	msg5[] = "\nAn argument ending in .RData (in any case) is taken as the path\nto the workspace to be restored (and implies --restore)";
@@ -846,8 +859,6 @@ static int isDir(char *path)
     return isdir;
 }
 
-extern void BindDomain(char *R_Home);
-
 int cmdlineoptions(int ac, char **av)
 {
     int   i, ierr;
@@ -960,9 +971,7 @@ int cmdlineoptions(int ac, char **av)
 
     R_common_command_line(&ac, av, Rp);
 
-    char *q = getenv("R_WIN_INTERNET2");
-    if (q && q[0]) UseInternet2 = TRUE;
-    q = getenv("R_MAX_MEM_SIZE");
+    char *q = getenv("R_MAX_MEM_SIZE");
     if (q && q[0]) {
 	value = R_Decode2Long(q, &ierr);
 	if(ierr || value < 32 * Mega || value > Virtual) {
@@ -987,7 +996,7 @@ int cmdlineoptions(int ac, char **av)
 		InThreadReadConsole = FileReadConsole;
 		setvbuf(stdout, NULL, _IONBF, 0);
 	    } else if (!strcmp(*av, "--internet2")) {
-		UseInternet2 = TRUE;
+/*	        This is now the default */
 	    } else if (!strcmp(*av, "--mdi")) {
 		MDIset = 1;
 	    } else if (!strcmp(*av, "--sdi") || !strcmp(*av, "--no-mdi")) {
@@ -1166,3 +1175,14 @@ void saveConsoleTitle(void)
 {
     GetConsoleTitle(oldtitle, 512);
 }
+
+
+/* On Windows, the number of open files is essentially unlimited.
+ * This function returns 16,777,216 based on
+ * https://blogs.technet.microsoft.com/markrussinovich/2009/09/29/pushing-the-limits-of-windows-handles
+ */
+int R_GetFDLimit()
+{
+    long limit = 16L*1024L*1024L;
+    return (limit > INT_MAX) ? INT_MAX : limit;
+}
diff --git a/src/gnuwin32/win-nls.h b/src/gnuwin32/win-nls.h
index 255bace..37f86c8 100644
--- a/src/gnuwin32/win-nls.h
+++ b/src/gnuwin32/win-nls.h
@@ -15,7 +15,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  */
 
 #ifdef ENABLE_NLS
diff --git a/src/gnuwin32/windlgs/src/ttest.c b/src/gnuwin32/windlgs/src/ttest.c
index 0854856..1c1b912 100644
--- a/src/gnuwin32/windlgs/src/ttest.c
+++ b/src/gnuwin32/windlgs/src/ttest.c
@@ -14,7 +14,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  */
 
 #include <R.h> /* for R_ProcessEvents */
diff --git a/src/include/Defn.h b/src/include/Defn.h
index 6806957..39a3a90 100644
--- a/src/include/Defn.h
+++ b/src/include/Defn.h
@@ -1,7 +1,7 @@
 /*
  *  R : A Computer Language for Statistical Data Analysis
  *  Copyright (C) 1995, 1996  Robert Gentleman and Ross Ihaka
- *  Copyright (C) 1998--2013  The R Core Team.
+ *  Copyright (C) 1998--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
@@ -15,9 +15,11 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  */
 
+/* Internal header, not installed */
+
 #ifndef DEFN_H_
 #define DEFN_H_
 
@@ -56,7 +58,6 @@
 # define extern0 extern
 #endif
 
-
 #define MAXELTSIZE 8192 /* Used as a default for string buffer sizes,
 			   and occasionally as a limit. */
 
@@ -86,12 +87,12 @@ extern0 SEXP	R_RecursiveSymbol;  /* "recursive" */
 extern0 SEXP	R_WholeSrcrefSymbol;   /* "wholeSrcref" */
 extern0 SEXP	R_TmpvalSymbol;     /* "*tmp*" */
 extern0 SEXP	R_UseNamesSymbol;   /* "use.names" */
-extern0 SEXP	R_DoubleColonSymbol;   /* "::" */
-extern0 SEXP	R_TripleColonSymbol;   /* ":::" */
+extern0 SEXP	R_ColonSymbol;         /* ":" */
+//extern0 SEXP	R_DoubleColonSymbol;   /* "::" */
+//extern0 SEXP	R_TripleColonSymbol;   /* ":::" */
 extern0 SEXP    R_ConnIdSymbol;  /* "conn_id" */
 extern0 SEXP    R_DevicesSymbol;  /* ".Devices" */
 
-extern0 SEXP    R_dot_Generic;  /* ".Generic" */
 extern0 SEXP    R_dot_Methods;  /* ".Methods" */
 extern0 SEXP    R_dot_Group;  /* ".Group" */
 extern0 SEXP    R_dot_Class;  /* ".Class" */
@@ -181,7 +182,21 @@ extern void R_WaitEvent(void);
 
 /*  Heap and Pointer Protection Stack Sizes.  */
 
-/* These are all required by C99 */
+/* These headers are all required by C99.
+   However, we use types below such as uintptr_t which are optional in C11.
+   And on some older systems they were in inttypes.h but not stdint.h.
+
+   Up to 2.11.1 (r52035, May 2010) we had
+
+#if !defined(HAVE_INTPTR_T) && !defined(intptr_t)
+ typedef long intptr_t;
+#endif
+#if !defined(HAVE_UINTPTR_T) && !defined(uintptr_t)
+ typedef unsigned long uintptr_t;
+#endif
+    but size_t might be better.
+
+ */
 #ifdef HAVE_INTTYPES_H
 # include <inttypes.h>
 #endif
@@ -325,8 +340,8 @@ typedef enum {
 
 typedef enum {
     PREC_FN	 = 0,
-    PREC_LEFT    = 1,
-    PREC_EQ	 = 2,
+    PREC_EQ	 = 1,
+    PREC_LEFT    = 2,
     PREC_RIGHT	 = 3,
     PREC_TILDE	 = 4,
     PREC_OR	 = 5,
@@ -339,9 +354,9 @@ typedef enum {
     PREC_COLON	 = 12,
     PREC_SIGN	 = 13,
     PREC_POWER	 = 14,
-    PREC_DOLLAR  = 15,
-    PREC_NS	 = 16,
-    PREC_SUBSET	 = 17
+    PREC_SUBSET  = 15,
+    PREC_DOLLAR	 = 16,
+    PREC_NS	 = 17
 } PPprec;
 
 typedef struct {
@@ -465,7 +480,35 @@ Rboolean (NO_SPECIAL_SYMBOLS)(SEXP b);
 
 #endif /* USE_RINTERNALS */
 
+#define TYPED_STACK
+#ifdef TYPED_STACK
+/* The typed stack's entries consist of a tag and a union. An entry
+   can represent a standard SEXP value (tag = 0) or an unboxed scalar
+   value. For now real, integer, and logical values are supported. It
+   would in principle be possible to support complex scalars and short
+   scalar strings, but it isn't clear if this is worth while.
+
+   In addition to unboxed values the typed stack can hold partially
+   evaluated or incomplete allocated values. For now this is only used
+   for holding a short representation of an integer sequence as produce
+   by the colon operator, seq_len, or seq_along, and as consumed by
+   compiled 'for' loops. This could be used more extensively in the
+   future.
+*/
+typedef struct {
+    int tag;
+    union {
+	int ival;
+	double dval;
+	SEXP sxpval;
+    } u;
+} R_bcstack_t;
+# define PARTIALSXP_MASK (~255)
+# define IS_PARTIAL_SXP_TAG(x) ((x) & PARTIALSXP_MASK)
+# define RAWMEM_TAG 254
+#else
 typedef SEXP R_bcstack_t;
+#endif
 #ifdef BC_INT_STACK
 typedef union { void *p; int i; } IStackval;
 #endif
@@ -494,15 +537,23 @@ typedef struct RCNTXT {
     void *cenddata;		/* data for C "on.exit" thunk */
     void *vmax;		        /* top of R_alloc stack */
     int intsusp;                /* interrupts are suspended */
+    int gcenabled;		/* R_GCEnabled value */
+    int bcintactive;            /* R_BCIntActive value */
+    SEXP bcbody;                /* R_BCbody value */
+    void* bcpc;                 /* R_BCpc value */
     SEXP handlerstack;          /* condition handler stack */
     SEXP restartstack;          /* stack of available restarts */
     struct RPRSTACK *prstack;   /* stack of pending promises */
-    SEXP *nodestack;
+    R_bcstack_t *nodestack;
 #ifdef BC_INT_STACK
     IStackval *intstack;
 #endif
     SEXP srcref;	        /* The source line in effect */
-    int browserfinish;     /* should browser finish this context without stopping */
+    int browserfinish;          /* should browser finish this context without
+                                   stopping */
+    SEXP returnValue;           /* only set during on.exit calls */
+    struct RCNTXT *jumptarget;	/* target for a continuing jump */
+    int jumpmask;               /* associated LONGJMP argument */
 } RCNTXT, *context;
 
 /* The Various Context Types.
@@ -571,6 +622,13 @@ typedef enum {
     GTOP
 } RELOP_TYPE;
 
+typedef enum {
+    MATPROD_DEFAULT = 1,
+    MATPROD_INTERNAL,
+    MATPROD_BLAS,
+    MATPROD_DEFAULT_SIMD  /* experimental */
+} MATPROD_TYPE;
+
 /* File Handling */
 /*
 #define R_EOF	65535
@@ -610,6 +668,12 @@ LibExtern char *R_Home;		    /* Root of the R tree */
 /* Memory Management */
 extern0 R_size_t R_NSize  INI_as(R_NSIZE);/* Size of cons cell heap */
 extern0 R_size_t R_VSize  INI_as(R_VSIZE);/* Size of the vector heap */
+extern0 int	R_GCEnabled INI_as(1);
+extern0 int	R_in_gc INI_as(0);
+extern0 int	R_BCIntActive INI_as(0); /* bcEval called more recently than
+                                            eval */
+extern0 void*	R_BCpc INI_as(NULL);/* current byte code instruction */
+extern0 SEXP	R_BCbody INI_as(NULL); /* current byte code object */
 extern0 SEXP	R_NHeap;	    /* Start of the cons cell heap */
 extern0 SEXP	R_FreeSEXP;	    /* Cons cell free list */
 extern0 R_size_t R_Collected;	    /* Number of free cons cells (after gc) */
@@ -629,6 +693,7 @@ extern0 RCNTXT R_Toplevel;	      /* Storage for the toplevel context */
 extern0 RCNTXT* R_ToplevelContext;  /* The toplevel context */
 LibExtern RCNTXT* R_GlobalContext;    /* The global context */
 extern0 RCNTXT* R_SessionContext;   /* The session toplevel context */
+extern0 RCNTXT* R_ExitContext;      /* The active context for on.exit processing */
 #endif
 extern Rboolean R_Visible;	    /* Value visibility flag */
 extern0 int	R_EvalDepth	INI_as(0);	/* Evaluation recursion depth */
@@ -638,9 +703,12 @@ extern0 int	R_Expressions	INI_as(5000);	/* options(expressions) */
 extern0 int	R_Expressions_keep INI_as(5000);	/* options(expressions) */
 extern0 Rboolean R_KeepSource	INI_as(FALSE);	/* options(keep.source) */
 extern0 Rboolean R_CBoundsCheck	INI_as(FALSE);	/* options(CBoundsCheck) */
+extern0 MATPROD_TYPE R_Matprod	INI_as(MATPROD_DEFAULT);  /* options(matprod) */
 extern0 int	R_WarnLength	INI_as(1000);	/* Error/warning max length */
 extern0 int	R_nwarnings	INI_as(50);
 extern uintptr_t R_CStackLimit	INI_as((uintptr_t)-1);	/* C stack limit */
+extern uintptr_t R_OldCStackLimit INI_as((uintptr_t)0); /* Old value while 
+							   handling overflow */
 extern uintptr_t R_CStackStart	INI_as((uintptr_t)-1);	/* Initial stack address */
 extern int	R_CStackDir	INI_as(1);	/* C stack direction */
 
@@ -707,7 +775,7 @@ extern0   Rboolean WinUTF8out  INI_as(FALSE);  /* Use UTF-8 for output */
 extern0   void WinCheckUTF8(void);
 #endif
 
-extern char OutDec	INI_as('.');  /* decimal point used for output */
+extern char* OutDec	INI_as(".");  /* decimal point used for output */
 extern0 Rboolean R_DisableNLinBrowser	INI_as(FALSE);
 extern0 char R_BrowserLastCommand	INI_as('n');
 
@@ -728,17 +796,28 @@ extern0 double elapsedLimitValue       	INI_as(-1.0);
 
 void resetTimeLimits(void);
 
-#define R_BCNODESTACKSIZE 100000
-extern0 SEXP *R_BCNodeStackBase, *R_BCNodeStackTop, *R_BCNodeStackEnd;
+#define R_BCNODESTACKSIZE 200000
+extern0 R_bcstack_t *R_BCNodeStackBase, *R_BCNodeStackTop, *R_BCNodeStackEnd;
 #ifdef BC_INT_STACK
 # define R_BCINTSTACKSIZE 10000
 extern0 IStackval *R_BCIntStackBase, *R_BCIntStackTop, *R_BCIntStackEnd;
 #endif
-extern0 int R_jit_enabled INI_as(0);
+extern0 int R_jit_enabled INI_as(0); /* has to be 0 during R startup */
 extern0 int R_compile_pkgs INI_as(0);
+extern0 int R_check_constants INI_as(0);
+extern0 int R_disable_bytecode INI_as(0);
 extern SEXP R_cmpfun(SEXP);
+extern SEXP R_cmpfun1(SEXP); /* unconditional fresh compilation */
 extern void R_init_jit_enabled(void);
-extern void R_initAsignSymbols(void);
+extern void R_initAssignSymbols(void);
+#ifdef R_USE_SIGNALS
+extern SEXP R_findBCInterpreterSrcref(RCNTXT*);
+#endif
+extern SEXP R_getCurrentSrcref();
+extern SEXP R_getBCInterpreterExpression();
+
+LibExtern SEXP R_CachedScalarReal INI_as(NULL);
+LibExtern SEXP R_CachedScalarInteger INI_as(NULL);
 
 LibExtern int R_num_math_threads INI_as(1);
 LibExtern int R_max_num_math_threads INI_as(1);
@@ -779,6 +858,12 @@ LibExtern SEXP R_TrueValue INI_as(NULL);
 LibExtern SEXP R_FalseValue INI_as(NULL);
 LibExtern SEXP R_LogicalNAValue INI_as(NULL);
 
+/* for PCRE as from R 3.4.0 */
+extern0 Rboolean R_PCRE_use_JIT INI_as(TRUE);
+extern0 int R_PCRE_study INI_as(10);
+extern0 int R_PCRE_limit_recursion;
+
+
 #ifdef __MAIN__
 # undef extern
 # undef extern0
@@ -793,6 +878,7 @@ LibExtern SEXP R_LogicalNAValue INI_as(NULL);
 # define allocCharsxp		Rf_allocCharsxp
 # define asVecSize		Rf_asVecSize
 # define begincontext		Rf_begincontext
+# define BindDomain		Rf_BindDomain
 # define check_stack_balance	Rf_check_stack_balance
 # define check1arg		Rf_check1arg
 # define CheckFormals		Rf_CheckFormals
@@ -803,6 +889,8 @@ LibExtern SEXP R_LogicalNAValue INI_as(NULL);
 # define ComplexFromReal	Rf_ComplexFromReal
 # define ComplexFromString	Rf_ComplexFromString
 # define copyMostAttribNoTs	Rf_copyMostAttribNoTs
+# define createS3Vars		Rf_createS3Vars
+# define currentTime		Rf_currentTime
 # define CustomPrintValue	Rf_CustomPrintValue
 # define DataFrameClass		Rf_DataFrameClass
 # define ddfindVar		Rf_ddfindVar
@@ -814,11 +902,13 @@ LibExtern SEXP R_LogicalNAValue INI_as(NULL);
 # define DispatchOrEval		Rf_DispatchOrEval
 # define DispatchAnyOrEval      Rf_DispatchAnyOrEval
 # define dynamicfindVar		Rf_dynamicfindVar
+# define EncodeChar             Rf_EncodeChar
 # define EncodeRaw              Rf_EncodeRaw
+# define EncodeReal2            Rf_EncodeReal2
 # define EncodeString           Rf_EncodeString
 # define EnsureString 		Rf_EnsureString
 # define endcontext		Rf_endcontext
-# define envlength		Rf_envlength
+# define errorcall_cpy		Rf_errorcall_cpy
 # define ErrorMessage		Rf_ErrorMessage
 # define evalList		Rf_evalList
 # define evalListKeepMissing	Rf_evalListKeepMissing
@@ -843,7 +933,9 @@ LibExtern SEXP R_LogicalNAValue INI_as(NULL);
 # define InitNames		Rf_InitNames
 # define InitOptions		Rf_InitOptions
 # define InitStringHash		Rf_InitStringHash
+# define InitS3DefaultTypes	Rf_InitS3DefaultTypes
 # define InitTempDir		Rf_InitTempDir
+# define InitTypeTables		Rf_InitTypeTables
 # define initStack		Rf_initStack
 # define IntegerFromComplex	Rf_IntegerFromComplex
 # define IntegerFromLogical	Rf_IntegerFromLogical
@@ -870,6 +962,8 @@ LibExtern SEXP R_LogicalNAValue INI_as(NULL);
 # define matchPar		Rf_matchPar
 # define Mbrtowc		Rf_mbrtowc
 # define mbtoucs		Rf_mbtoucs
+# define mbcsToUcs2		Rf_mbcsToUcs2
+# define memtrace_report	Rf_memtrace_report
 # define mkCLOSXP		Rf_mkCLOSXP
 # define mkFalse		Rf_mkFalse
 # define mkPROMISE		Rf_mkPROMISE
@@ -879,9 +973,11 @@ LibExtern SEXP R_LogicalNAValue INI_as(NULL);
 # define NewEnvironment		Rf_NewEnvironment
 # define OneIndex		Rf_OneIndex
 # define onintr			Rf_onintr
+# define onintrNoResume		Rf_onintrNoResume
 # define onsigusr1              Rf_onsigusr1
 # define onsigusr2              Rf_onsigusr2
 # define parse			Rf_parse
+# define patchArgsByActuals	Rf_patchArgsByActuals
 # define PrintDefaults		Rf_PrintDefaults
 # define PrintGreeting		Rf_PrintGreeting
 # define PrintValueEnv		Rf_PrintValueEnv
@@ -896,6 +992,7 @@ LibExtern SEXP R_LogicalNAValue INI_as(NULL);
 # define RealFromLogical	Rf_RealFromLogical
 # define RealFromString		Rf_RealFromString
 # define Seql			Rf_Seql
+# define sexptype2char		Rf_sexptype2char
 # define Scollate		Rf_Scollate
 # define sortVector		Rf_sortVector
 # define SrcrefPrompt		Rf_SrcrefPrompt
@@ -908,6 +1005,7 @@ LibExtern SEXP R_LogicalNAValue INI_as(NULL);
 # define StrToInternal		Rf_StrToInternal
 # define strmat2intmat		Rf_strmat2intmat
 # define substituteList		Rf_substituteList
+# define TimeToSeed		Rf_TimeToSeed
 # define tsConform		Rf_tsConform
 # define tspgets		Rf_tspgets
 # define type2symbol		Rf_type2symbol
@@ -951,9 +1049,11 @@ char	*R_HomeDir(void);
 Rboolean R_FileExists(const char *);
 Rboolean R_HiddenFile(const char *);
 double	R_FileMtime(const char *);
+int	R_GetFDLimit();
 
 /* environment cell access */
-typedef struct R_varloc_st *R_varloc_t;
+typedef struct { SEXP cell; } R_varloc_t; /* use struct to prevent casting */
+#define R_VARLOC_IS_NULL(loc) ((loc).cell == NULL)
 R_varloc_t R_findVarLocInFrame(SEXP, SEXP);
 SEXP R_GetVarLocValue(R_varloc_t);
 SEXP R_GetVarLocSymbol(R_varloc_t);
@@ -970,6 +1070,8 @@ void R_SetVarLocValue(R_varloc_t, SEXP);
 #define DELAYPROMISES 		32
 #define KEEPNA			64
 #define S_COMPAT       		128
+#define HEXNUMERIC             	256
+#define DIGITS16             	512
 /* common combinations of the above */
 #define SIMPLEDEPARSE		0
 #define DEFAULTDEPARSE		65 /* KEEPINTEGER | KEEPNA, used for calls */
@@ -998,7 +1100,9 @@ void R_check_locale(void);
 void check_stack_balance(SEXP op, int save);
 void CleanEd(void);
 void copyMostAttribNoTs(SEXP, SEXP);
+SEXP createS3Vars(SEXP, SEXP, SEXP, SEXP, SEXP, SEXP);
 void CustomPrintValue(SEXP, SEXP);
+double currentTime(void);
 void DataFrameClass(SEXP);
 SEXP ddfindVar(SEXP, SEXP);
 SEXP deparse1(SEXP,Rboolean,int);
@@ -1008,14 +1112,16 @@ SEXP deparse1s(SEXP call);
 int DispatchAnyOrEval(SEXP, SEXP, const char *, SEXP, SEXP, SEXP*, int, int);
 int DispatchOrEval(SEXP, SEXP, const char *, SEXP, SEXP, SEXP*, int, int);
 int DispatchGroup(const char *, SEXP,SEXP,SEXP,SEXP,SEXP*);
+R_xlen_t dispatch_xlength(SEXP, SEXP, SEXP);
+R_len_t dispatch_length(SEXP, SEXP, SEXP);
+SEXP dispatch_subset2(SEXP, R_xlen_t, SEXP, SEXP);
 SEXP duplicated(SEXP, Rboolean);
 R_xlen_t any_duplicated(SEXP, Rboolean);
 R_xlen_t any_duplicated3(SEXP, SEXP, Rboolean);
-int envlength(SEXP);
 SEXP evalList(SEXP, SEXP, SEXP, int);
 SEXP evalListKeepMissing(SEXP, SEXP);
 int factorsConform(SEXP, SEXP);
-void findcontext(int, SEXP, SEXP);
+void NORET findcontext(int, SEXP, SEXP);
 SEXP findVar1(SEXP, SEXP, SEXPTYPE, int);
 void FrameClassFix(SEXP);
 SEXP frameSubscript(int, SEXP, SEXP);
@@ -1030,9 +1136,11 @@ void InitFunctionHashing(void);
 void InitBaseEnv(void);
 void InitGlobalEnv(void);
 Rboolean R_current_trace_state(void);
+Rboolean R_current_debug_state(void);
 Rboolean R_has_methods(SEXP);
 void R_InitialData(void);
 SEXP R_possible_dispatch(SEXP, SEXP, SEXP, SEXP, Rboolean);
+Rboolean inherits2(SEXP, const char *);
 void InitGraphics(void);
 void InitMemory(void);
 void InitNames(void);
@@ -1040,11 +1148,13 @@ void InitOptions(void);
 void InitStringHash(void);
 void Init_R_Variables(SEXP);
 void InitTempDir(void);
+void InitTypeTables(void);
 void initStack(void);
+void InitS3DefaultTypes(void);
 void internalTypeCheck(SEXP, SEXP, SEXPTYPE);
 Rboolean isMethodsDispatchOn(void);
 int isValidName(const char *);
-void jump_to_toplevel(void);
+void NORET jump_to_toplevel(void);
 void KillAllDevices(void);
 SEXP levelsgets(SEXP, SEXP);
 void mainloop(void);
@@ -1067,10 +1177,12 @@ SEXP mkSYMSXP(SEXP, SEXP);
 SEXP mkTrue(void);
 SEXP NewEnvironment(SEXP, SEXP, SEXP);
 void onintr(void);
+void onintrNoResume(void);
 RETSIGTYPE onsigusr1(int);
 RETSIGTYPE onsigusr2(int);
 R_xlen_t OneIndex(SEXP, SEXP, R_xlen_t, int, SEXP*, int, SEXP);
 SEXP parse(FILE*, int);
+SEXP patchArgsByActuals(SEXP, SEXP, SEXP);
 void PrintDefaults(void);
 void PrintGreeting(void);
 void PrintValueEnv(SEXP, SEXP);
@@ -1111,6 +1223,7 @@ void ssort(SEXP*,int);
 int StrToInternal(const char *);
 SEXP strmat2intmat(SEXP, SEXP, SEXP);
 SEXP substituteList(SEXP, SEXP);
+unsigned int TimeToSeed(void);
 Rboolean tsConform(SEXP,SEXP);
 SEXP tspgets(SEXP, SEXP);
 SEXP type2symbol(SEXPTYPE);
@@ -1127,22 +1240,23 @@ void begincontext(RCNTXT*, int, SEXP, SEXP, SEXP, SEXP, SEXP);
 SEXP dynamicfindVar(SEXP, RCNTXT*);
 void endcontext(RCNTXT*);
 int framedepth(RCNTXT*);
-void R_InsertRestartHandlers(RCNTXT *, Rboolean);
-void R_JumpToContext(RCNTXT *, int, SEXP);
+void R_InsertRestartHandlers(RCNTXT *, const char *);
+void NORET R_JumpToContext(RCNTXT *, int, SEXP);
 SEXP R_syscall(int,RCNTXT*);
 int R_sysparent(int,RCNTXT*);
 SEXP R_sysframe(int,RCNTXT*);
 SEXP R_sysfunction(int,RCNTXT*);
 
 void R_run_onexits(RCNTXT *);
-void R_restore_globals(RCNTXT *);
+void NORET R_jumpctxt(RCNTXT *, int, SEXP);
 #endif
 
 /* ../main/bind.c */
 SEXP ItemName(SEXP, R_xlen_t);
 
 /* ../main/errors.c : */
-void ErrorMessage(SEXP, int, ...);
+void NORET errorcall_cpy(SEXP, const char *, ...);
+void NORET ErrorMessage(SEXP, int, ...);
 void WarningMessage(SEXP, R_WARNING, ...);
 SEXP R_GetTraceback(int);
 
@@ -1184,10 +1298,13 @@ SEXP R_subassign3_dflt(SEXP, SEXP, SEXP, SEXP);
 #include <wchar.h>
 
 /* main/util.c */
-void UNIMPLEMENTED_TYPE(const char *s, SEXP x);
-void UNIMPLEMENTED_TYPEt(const char *s, SEXPTYPE t);
+void NORET UNIMPLEMENTED_TYPE(const char *s, SEXP x);
+void NORET UNIMPLEMENTED_TYPEt(const char *s, SEXPTYPE t);
 Rboolean Rf_strIsASCII(const char *str);
 int utf8clen(char c);
+int Rf_AdobeSymbol2ucs2(int n);
+double R_strtod5(const char *str, char **endptr, char dec,
+		 Rboolean NA, int exact);
 
 typedef unsigned short ucs2_t;
 size_t mbcsToUcs2(const char *in, ucs2_t *out, int nout, int enc);
@@ -1212,6 +1329,24 @@ Rboolean utf8Valid(const char *str);
 char *Rf_strchr(const char *s, int c);
 char *Rf_strrchr(const char *s, int c);
 
+SEXP fixup_NaRm(SEXP args); /* summary.c */
+void invalidate_cached_recodings(void);  /* from sysutils.c */
+void resetICUcollator(void); /* from util.c */
+void dt_invalidate_locale(); /* from Rstrptime.h */
+int R_OutputCon; /* from connections.c */
+extern int R_InitReadItemDepth, R_ReadItemDepth; /* from serialize.c */
+void get_current_mem(size_t *,size_t *,size_t *); /* from memory.c */
+unsigned long get_duplicate_counter(void);  /* from duplicate.c */
+void reset_duplicate_counter(void);  /* from duplicate.c */
+void BindDomain(char *); /* from main.c */
+extern Rboolean LoadInitFile;  /* from startup.c */
+
+// Unix and Windows versions
+double R_getClockIncrement(void);
+void R_getProcTime(double *data);
+void InitDynload(void);
+void R_CleanTempDir(void);
+
 #ifdef Win32
 void R_fixslash(char *s);
 void R_fixbackslash(char *s);
@@ -1245,23 +1380,24 @@ extern const char *locale2charset(const char *);
 
 /* Localization */
 
-#ifdef ENABLE_NLS
-#include <libintl.h>
-#ifdef Win32
-#define _(String) libintl_gettext (String)
-#undef gettext /* needed for graphapp */
-#else
-#define _(String) gettext (String)
-#endif
-#define gettext_noop(String) String
-#define N_(String) gettext_noop (String)
-#else /* not NLS */
-#define _(String) (String)
-#define N_(String) String
-#define ngettext(String, StringP, N) (N > 1 ? StringP: String)
+#ifndef NO_NLS
+# ifdef ENABLE_NLS
+#  include <libintl.h>
+#  ifdef Win32
+#   define _(String) libintl_gettext (String)
+#   undef gettext /* needed for graphapp */
+#  else
+#   define _(String) gettext (String)
+#  endif
+#  define gettext_noop(String) String
+#  define N_(String) gettext_noop (String)
+#  else /* not NLS */
+#  define _(String) (String)
+#  define N_(String) String
+#  define ngettext(String, StringP, N) (N > 1 ? StringP: String)
+# endif
 #endif
 
-
 /* Macros for suspending interrupts: also in GraphicsDevice.h */
 #define BEGIN_SUSPEND_INTERRUPTS do { \
     Rboolean __oldsusp__ = R_interrupts_suspended; \
@@ -1272,14 +1408,25 @@ extern const char *locale2charset(const char *);
 } while(0)
 
 
+/* 
+   alloca is neither C99 nor POSIX.
+
+   It might be better to try alloca.h first, see
+   https://www.gnu.org/software/autoconf/manual/autoconf-2.60/html_node/Particular-Functions.html
+*/
 #ifdef __GNUC__
+// This covers GNU, Clang and Intel compilers
+// The undef is needed in case some other header, e.g. malloc.h, already did this
 # undef alloca
 # define alloca(x) __builtin_alloca((x))
 #else
 # ifdef HAVE_ALLOCA_H
+// Needed for native compilers on Solaris and AIX
 #  include <alloca.h>
 # endif
+// it might have been defined via some other standard header, e.g. stdlib.h
 # if !HAVE_DECL_ALLOCA
+#  include <stddef.h> // for size_t
 extern void *alloca(size_t);
 # endif
 #endif
diff --git a/src/include/Errormsg.h b/src/include/Errormsg.h
index 4b8d00a..7d27018 100644
--- a/src/include/Errormsg.h
+++ b/src/include/Errormsg.h
@@ -15,9 +15,11 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  */
 
+/* Internal header, not installed */
+
 #ifndef ERRORMSG_H
 #define ERRORMSG_H
 
diff --git a/src/include/Fileio.h b/src/include/Fileio.h
index a94b17b..c3de159 100644
--- a/src/include/Fileio.h
+++ b/src/include/Fileio.h
@@ -15,9 +15,11 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  */
 
+/* Internal header, not installed */
+
 #ifndef RFILEIO_H_
 
 #define RFILEIO_H_
diff --git a/src/include/Graphics.h b/src/include/Graphics.h
index 769ca11..f7ade5f 100644
--- a/src/include/Graphics.h
+++ b/src/include/Graphics.h
@@ -15,14 +15,14 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  */
 
+/* Internal header, not installed */
+
 #ifndef GRAPHICS_H_
 #define GRAPHICS_H_
 
-/* This is a private header */
-
 #include <R_ext/Boolean.h>
 
 #include <R_ext/GraphicsEngine.h>
@@ -31,8 +31,6 @@
 #define R_GRAPHICS 1
 #include <Rgraphics.h> /* RUnit */
 
-//typedef unsigned int rcolor;
-
 /* base.c, graphics.c, par.c */
 #define MAX_LAYOUT_ROWS 200
 #define MAX_LAYOUT_COLS 200
diff --git a/src/include/GraphicsBase.h b/src/include/GraphicsBase.h
index 6344ab7..954eaff 100644
--- a/src/include/GraphicsBase.h
+++ b/src/include/GraphicsBase.h
@@ -3,8 +3,8 @@
  *  Copyright (C) 2001-8 The R Core Team.
  *
  *  This program is free software; you can redistribute it and/or modify
- *  it under the terms of the GNU Lesser General Public License as published by
- *  the Free Software Foundation; either version 2.1 of the License, or
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
  *  (at your option) any later version.
  *
  *  This program is distributed in the hope that it will be useful,
@@ -12,9 +12,9 @@
  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  *  GNU Lesser General Public License for more details.
  *
- *  You should have received a copy of the GNU Lesser General Public License
+ *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  */
 
 /* Definitions for the base graphics system.
@@ -41,4 +41,6 @@ void unregisterBase(void); /* used in devices.c */
 
 void Rf_setBaseDevice(Rboolean val, pGEDevDesc dd); /* used in graphics.c */
 
+int baseRegisterIndex;
+
 #endif /* R_GRAPHICSBASE_ */
diff --git a/src/include/IOStuff.h b/src/include/IOStuff.h
index 0146b4a..1bc02c8 100644
--- a/src/include/IOStuff.h
+++ b/src/include/IOStuff.h
@@ -15,9 +15,11 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  */
 
+/* Internal header, not installed */
+
 #ifndef R_IOSTUFF_H
 #define R_IOSTUFF_H
 
diff --git a/src/include/Internal.h b/src/include/Internal.h
index 972e083..6b5c518 100644
--- a/src/include/Internal.h
+++ b/src/include/Internal.h
@@ -1,7 +1,7 @@
 /*
  *  R : A Computer Language for Statistical Data Analysis
  *  Copyright (C) 1995, 1996  Robert Gentleman and Ross Ihaka
- *  Copyright (C) 1997--2009  The R Core Team
+ *  Copyright (C) 1997--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
@@ -15,7 +15,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  */
 
 /* Names of  .Internal(.) and .Primitive(.)  R functions
@@ -33,7 +33,6 @@
 #if Win32
 SEXP do_mkjunction(SEXP, SEXP, SEXP, SEXP);
 SEXP do_shellexec(SEXP, SEXP, SEXP, SEXP);
-SEXP do_setInternet2(SEXP, SEXP, SEXP, SEXP);
 SEXP do_syswhich(SEXP, SEXP, SEXP, SEXP);
 SEXP do_tzone_name(SEXP, SEXP, SEXP, SEXP);
 #else
@@ -43,6 +42,7 @@ SEXP do_X11(SEXP, SEXP, SEXP, SEXP);
 SEXP do_abbrev(SEXP, SEXP, SEXP, SEXP);
 SEXP do_abs(SEXP, SEXP, SEXP, SEXP);
 SEXP do_addCondHands(SEXP, SEXP, SEXP, SEXP);
+SEXP do_address(SEXP, SEXP, SEXP, SEXP);
 SEXP do_addRestart(SEXP, SEXP, SEXP, SEXP);
 SEXP do_addTryHandlers(SEXP, SEXP, SEXP, SEXP);
 SEXP do_adist(SEXP, SEXP, SEXP, SEXP);
@@ -58,11 +58,12 @@ SEXP do_asPOSIXct(SEXP, SEXP, SEXP, SEXP);
 SEXP do_asPOSIXlt(SEXP, SEXP, SEXP, SEXP);
 SEXP do_ascall(SEXP, SEXP, SEXP, SEXP);
 SEXP do_as_environment(SEXP, SEXP, SEXP, SEXP);
-SEXP do_ascharacter(SEXP, SEXP, SEXP, SEXP);
+SEXP do_asatomic(SEXP, SEXP, SEXP, SEXP);
 SEXP do_asfunction(SEXP, SEXP, SEXP, SEXP);
 SEXP do_asmatrixdf(SEXP, SEXP, SEXP, SEXP);
 SEXP do_assign(SEXP, SEXP, SEXP, SEXP);
 SEXP do_asvector(SEXP, SEXP, SEXP, SEXP);
+SEXP do_asCharacterFactor(SEXP, SEXP, SEXP, SEXP);
 SEXP do_AT(SEXP call, SEXP op, SEXP args, SEXP env);
 SEXP do_attach(SEXP,SEXP,SEXP,SEXP);
 SEXP do_attr(SEXP, SEXP, SEXP, SEXP);
@@ -72,6 +73,9 @@ SEXP do_attributesgets(SEXP, SEXP, SEXP, SEXP);
 SEXP do_backsolve(SEXP, SEXP, SEXP, SEXP);
 SEXP do_baseenv(SEXP, SEXP, SEXP, SEXP);
 SEXP do_basename(SEXP, SEXP, SEXP, SEXP);
+SEXP do_bcprofcounts(SEXP, SEXP, SEXP, SEXP);
+SEXP do_bcprofstart(SEXP, SEXP, SEXP, SEXP);
+SEXP do_bcprofstop(SEXP, SEXP, SEXP, SEXP);
 SEXP do_begin(SEXP, SEXP, SEXP, SEXP);
 SEXP do_bincode(SEXP, SEXP, SEXP, SEXP);
 SEXP do_bind(SEXP, SEXP, SEXP, SEXP);
@@ -79,7 +83,7 @@ SEXP do_bindtextdomain(SEXP, SEXP, SEXP, SEXP);
 SEXP do_bitwise(SEXP, SEXP, SEXP, SEXP);
 SEXP do_body(SEXP, SEXP, SEXP, SEXP);
 SEXP do_bodyCode(SEXP, SEXP, SEXP, SEXP);
-SEXP do_break(SEXP, SEXP, SEXP, SEXP);
+SEXP NORET do_break(SEXP, SEXP, SEXP, SEXP);
 SEXP do_browser(SEXP, SEXP, SEXP, SEXP);
 SEXP do_builtins(SEXP, SEXP, SEXP, SEXP);
 SEXP do_c(SEXP, SEXP, SEXP, SEXP);
@@ -104,17 +108,16 @@ SEXP do_copyDFattr(SEXP, SEXP, SEXP, SEXP);
 SEXP do_crc64(SEXP, SEXP, SEXP, SEXP);
 SEXP do_Cstack_info(SEXP, SEXP, SEXP, SEXP);
 SEXP do_cum(SEXP, SEXP, SEXP, SEXP);
+SEXP do_curlDownload(SEXP, SEXP, SEXP, SEXP);
+SEXP do_curlGetHeaders(SEXP, SEXP, SEXP, SEXP);
+SEXP do_curlVersion(SEXP, SEXP, SEXP, SEXP);
 SEXP do_D2POSIXlt(SEXP, SEXP, SEXP, SEXP);
-SEXP do_dataentry(SEXP, SEXP, SEXP, SEXP);
-SEXP do_dataframe(SEXP, SEXP, SEXP, SEXP);
-SEXP do_dataviewer(SEXP, SEXP, SEXP, SEXP);
 SEXP do_date(SEXP, SEXP, SEXP, SEXP);
 SEXP do_debug(SEXP, SEXP, SEXP, SEXP);
-SEXP do_devAskNewPage(SEXP, SEXP, SEXP, SEXP);
 SEXP do_delayed(SEXP, SEXP, SEXP, SEXP);
 SEXP do_deparse(SEXP, SEXP, SEXP, SEXP);
 SEXP do_detach(SEXP,SEXP,SEXP,SEXP);
-SEXP do_dfltStop(SEXP, SEXP, SEXP, SEXP);
+SEXP NORET do_dfltStop(SEXP, SEXP, SEXP, SEXP);
 SEXP do_dfltWarn(SEXP, SEXP, SEXP, SEXP);
 SEXP do_diag(SEXP, SEXP, SEXP, SEXP);
 SEXP do_dim(SEXP, SEXP, SEXP, SEXP);
@@ -122,6 +125,7 @@ SEXP do_dimgets(SEXP, SEXP, SEXP, SEXP);
 SEXP do_dimnames(SEXP, SEXP, SEXP, SEXP);
 SEXP do_dimnamesgets(SEXP, SEXP, SEXP, SEXP);
 SEXP do_dircreate(SEXP, SEXP, SEXP, SEXP);
+SEXP do_direxists(SEXP, SEXP, SEXP, SEXP);
 SEXP do_dirname(SEXP, SEXP, SEXP, SEXP);
 SEXP do_docall(SEXP, SEXP, SEXP, SEXP);
 SEXP do_dotcall(SEXP, SEXP, SEXP, SEXP);
@@ -143,6 +147,7 @@ SEXP do_envir(SEXP, SEXP, SEXP, SEXP);
 SEXP do_envirgets(SEXP, SEXP, SEXP, SEXP);
 SEXP do_envirName(SEXP, SEXP, SEXP, SEXP);
 SEXP do_env2list(SEXP, SEXP, SEXP, SEXP);
+SEXP do_eSoftVersion(SEXP, SEXP, SEXP, SEXP);
 SEXP do_External(SEXP, SEXP, SEXP, SEXP);
 SEXP do_Externalgr(SEXP, SEXP, SEXP, SEXP);
 SEXP do_eval(SEXP, SEXP, SEXP, SEXP);
@@ -152,7 +157,6 @@ SEXP do_fileappend(SEXP, SEXP, SEXP, SEXP);
 SEXP do_filechoose(SEXP, SEXP, SEXP, SEXP);
 SEXP do_filecopy(SEXP, SEXP, SEXP, SEXP);
 SEXP do_filecreate(SEXP, SEXP, SEXP, SEXP);
-SEXP do_fileedit(SEXP, SEXP, SEXP, SEXP);
 SEXP do_fileexists(SEXP, SEXP, SEXP, SEXP);
 SEXP do_fileinfo(SEXP, SEXP, SEXP, SEXP);
 SEXP do_filelink(SEXP, SEXP, SEXP, SEXP);
@@ -164,8 +168,8 @@ SEXP do_filesymlink(SEXP, SEXP, SEXP, SEXP);
 SEXP do_findinterval(SEXP, SEXP, SEXP, SEXP);
 SEXP do_first_min(SEXP, SEXP, SEXP, SEXP);
 SEXP do_flush(SEXP, SEXP, SEXP, SEXP);
-SEXP do_flushconsole(SEXP, SEXP, SEXP, SEXP);
 SEXP do_for(SEXP, SEXP, SEXP, SEXP);
+SEXP do_forceAndCall(SEXP, SEXP, SEXP, SEXP);
 SEXP do_format(SEXP, SEXP, SEXP, SEXP);
 SEXP do_formatC(SEXP, SEXP, SEXP, SEXP);
 SEXP do_formatinfo(SEXP, SEXP, SEXP, SEXP);
@@ -185,6 +189,7 @@ SEXP do_geterrmessage(SEXP, SEXP, SEXP, SEXP);
 SEXP do_getGraphicsEvent(SEXP, SEXP, SEXP, SEXP);
 SEXP do_getGraphicsEventEnv(SEXP, SEXP, SEXP, SEXP);
 SEXP do_getlocale(SEXP, SEXP, SEXP, SEXP);
+SEXP do_getOption(SEXP, SEXP, SEXP, SEXP);
 SEXP do_getRegisteredRoutines(SEXP, SEXP, SEXP, SEXP);
 SEXP do_getSymbolInfo(SEXP, SEXP, SEXP, SEXP);
 SEXP do_getRestart(SEXP, SEXP, SEXP, SEXP);
@@ -192,12 +197,9 @@ SEXP do_gettext(SEXP, SEXP, SEXP, SEXP);
 SEXP do_getwd(SEXP, SEXP, SEXP, SEXP);
 SEXP do_glob(SEXP, SEXP, SEXP, SEXP);
 SEXP do_globalenv(SEXP, SEXP, SEXP, SEXP);
-SEXP do_gray(SEXP, SEXP, SEXP, SEXP);
 SEXP do_grep(SEXP, SEXP, SEXP, SEXP);
 SEXP do_grepraw(SEXP, SEXP, SEXP, SEXP);
 SEXP do_gsub(SEXP, SEXP, SEXP, SEXP);
-SEXP do_hsv(SEXP, SEXP, SEXP, SEXP);
-SEXP do_hcl(SEXP, SEXP, SEXP, SEXP);
 SEXP do_iconv(SEXP, SEXP, SEXP, SEXP);
 SEXP do_ICUget(SEXP, SEXP, SEXP, SEXP);
 SEXP do_ICUset(SEXP, SEXP, SEXP, SEXP);
@@ -208,10 +210,11 @@ SEXP do_inspect(SEXP, SEXP, SEXP, SEXP);
 SEXP do_intToUtf8(SEXP, SEXP, SEXP, SEXP);
 SEXP do_interactive(SEXP, SEXP, SEXP, SEXP);
 SEXP do_internal(SEXP, SEXP, SEXP, SEXP);
+SEXP do_internalsID(SEXP, SEXP, SEXP, SEXP);
 SEXP do_interruptsSuspended(SEXP, SEXP, SEXP, SEXP);
 SEXP do_intToBits(SEXP, SEXP, SEXP, SEXP);
 SEXP do_invisible(SEXP, SEXP, SEXP, SEXP);
-SEXP do_invokeRestart(SEXP, SEXP, SEXP, SEXP);
+SEXP NORET do_invokeRestart(SEXP, SEXP, SEXP, SEXP);
 SEXP do_is(SEXP, SEXP, SEXP, SEXP);
 SEXP do_isatty(SEXP, SEXP, SEXP, SEXP);
 SEXP do_isfinite(SEXP, SEXP, SEXP, SEXP);
@@ -229,6 +232,7 @@ SEXP do_lazyLoadDBflush(SEXP, SEXP, SEXP, SEXP);
 SEXP do_lazyLoadDBinsertValue(SEXP call, SEXP op, SEXP args, SEXP env);
 SEXP do_length(SEXP, SEXP, SEXP, SEXP);
 SEXP do_lengthgets(SEXP, SEXP, SEXP, SEXP);
+SEXP do_lengths(SEXP, SEXP, SEXP, SEXP);
 SEXP do_levelsgets(SEXP, SEXP, SEXP, SEXP);
 SEXP do_listdirs(SEXP, SEXP, SEXP, SEXP);
 SEXP do_listfiles(SEXP, SEXP, SEXP, SEXP);
@@ -273,7 +277,6 @@ SEXP do_nzchar(SEXP,SEXP,SEXP,SEXP);
 SEXP do_onexit(SEXP, SEXP, SEXP, SEXP);
 SEXP do_options(SEXP, SEXP, SEXP, SEXP);
 SEXP do_order(SEXP, SEXP, SEXP, SEXP);
-SEXP do_pack(SEXP, SEXP, SEXP, SEXP);
 SEXP do_packBits(SEXP, SEXP, SEXP, SEXP);
 SEXP do_paren(SEXP, SEXP, SEXP, SEXP);
 SEXP do_parentenv(SEXP, SEXP, SEXP, SEXP);
@@ -282,6 +285,7 @@ SEXP do_parentframe(SEXP, SEXP, SEXP, SEXP);
 SEXP do_parse(SEXP, SEXP, SEXP, SEXP);
 SEXP do_paste(SEXP, SEXP, SEXP, SEXP);
 SEXP do_pathexpand(SEXP, SEXP, SEXP, SEXP);
+SEXP do_pcre_config(SEXP, SEXP, SEXP, SEXP);
 SEXP do_pmatch(SEXP, SEXP, SEXP, SEXP);
 SEXP do_pmin(SEXP, SEXP, SEXP, SEXP);
 SEXP do_polyroot(SEXP, SEXP, SEXP, SEXP);
@@ -314,6 +318,7 @@ SEXP do_readlink(SEXP, SEXP, SEXP, SEXP);
 SEXP do_readLines(SEXP, SEXP, SEXP, SEXP);
 SEXP do_readln(SEXP, SEXP, SEXP, SEXP);
 SEXP do_recall(SEXP, SEXP, SEXP, SEXP);
+SEXP do_refcnt(SEXP, SEXP, SEXP, SEXP);
 SEXP do_recordGraphics(SEXP, SEXP, SEXP, SEXP);
 SEXP do_regexec(SEXP, SEXP, SEXP, SEXP);
 SEXP do_regexpr(SEXP, SEXP, SEXP, SEXP);
@@ -326,14 +331,12 @@ SEXP do_rep_int(SEXP, SEXP, SEXP, SEXP);
 SEXP do_rep_len(SEXP, SEXP, SEXP, SEXP);
 SEXP do_repeat(SEXP, SEXP, SEXP, SEXP);
 SEXP do_resetCondHands(SEXP, SEXP, SEXP, SEXP);
-SEXP do_restart(SEXP, SEXP, SEXP, SEXP);
-SEXP do_return(SEXP, SEXP, SEXP, SEXP);
+SEXP NORET do_return(SEXP, SEXP, SEXP, SEXP);
+SEXP do_returnValue(SEXP, SEXP, SEXP, SEXP);
 SEXP do_rgb(SEXP, SEXP, SEXP, SEXP);
-SEXP do_RGB2hsv(SEXP, SEXP, SEXP, SEXP);
 SEXP do_Rhome(SEXP, SEXP, SEXP, SEXP);
 SEXP do_RNGkind(SEXP, SEXP, SEXP, SEXP);
 SEXP do_rowsum(SEXP, SEXP, SEXP, SEXP);
-SEXP do_rownames(SEXP, SEXP, SEXP, SEXP);
 SEXP do_rowscols(SEXP, SEXP, SEXP, SEXP);
 SEXP do_S4on(SEXP, SEXP, SEXP, SEXP);
 SEXP do_sample(SEXP, SEXP, SEXP, SEXP);
@@ -343,7 +346,6 @@ SEXP do_saveToConn(SEXP, SEXP, SEXP, SEXP);
 SEXP do_saveplot(SEXP, SEXP, SEXP, SEXP);
 SEXP do_scan(SEXP, SEXP, SEXP, SEXP);
 SEXP do_search(SEXP, SEXP, SEXP, SEXP);
-SEXP do_selectlist(SEXP, SEXP, SEXP, SEXP);
 SEXP do_seq(SEXP, SEXP, SEXP, SEXP);
 SEXP do_seq_along(SEXP, SEXP, SEXP, SEXP);
 SEXP do_seq_len(SEXP, SEXP, SEXP, SEXP);
@@ -371,8 +373,10 @@ SEXP do_sort(SEXP, SEXP, SEXP, SEXP);
 SEXP do_split(SEXP, SEXP, SEXP, SEXP);
 SEXP do_sprintf(SEXP, SEXP, SEXP, SEXP);
 SEXP do_standardGeneric(SEXP, SEXP, SEXP, SEXP);
-SEXP do_stop(SEXP, SEXP, SEXP, SEXP);
+SEXP do_startsWith(SEXP, SEXP, SEXP, SEXP);
+SEXP NORET do_stop(SEXP, SEXP, SEXP, SEXP);
 SEXP do_storage_mode(SEXP, SEXP, SEXP, SEXP);
+SEXP do_strrep(SEXP, SEXP, SEXP, SEXP);
 SEXP do_strsplit(SEXP,SEXP,SEXP,SEXP);
 SEXP do_strptime(SEXP,SEXP,SEXP,SEXP);
 SEXP do_strtrim(SEXP,SEXP,SEXP,SEXP);
@@ -386,15 +390,11 @@ SEXP do_subassign_dflt(SEXP, SEXP, SEXP, SEXP);
 SEXP do_subassign2(SEXP, SEXP, SEXP, SEXP);
 SEXP do_subassign2_dflt(SEXP, SEXP, SEXP, SEXP);
 SEXP do_subassign3(SEXP, SEXP, SEXP, SEXP);
-SEXP do_subassigndf(SEXP, SEXP, SEXP, SEXP);
-SEXP do_subassigndf2(SEXP, SEXP, SEXP, SEXP);
 SEXP do_subset(SEXP, SEXP, SEXP, SEXP);
 SEXP do_subset_dflt(SEXP, SEXP, SEXP, SEXP);
 SEXP do_subset2(SEXP, SEXP, SEXP, SEXP);
 SEXP do_subset2_dflt(SEXP, SEXP, SEXP, SEXP);
 SEXP do_subset3(SEXP, SEXP, SEXP, SEXP);
-SEXP do_subsetdf(SEXP, SEXP, SEXP, SEXP);
-SEXP do_subsetdf2(SEXP, SEXP, SEXP, SEXP);
 SEXP do_substitute(SEXP, SEXP, SEXP, SEXP);
 SEXP do_substr(SEXP,SEXP,SEXP,SEXP);
 SEXP do_substrgets(SEXP,SEXP,SEXP,SEXP);
@@ -410,20 +410,23 @@ SEXP do_tempdir(SEXP, SEXP, SEXP, SEXP);
 SEXP do_tempfile(SEXP, SEXP, SEXP, SEXP);
 SEXP do_tilde(SEXP, SEXP, SEXP, SEXP);
 SEXP do_tolower(SEXP, SEXP, SEXP, SEXP);
+SEXP do_topenv(SEXP, SEXP, SEXP, SEXP);
 SEXP do_trace(SEXP, SEXP, SEXP, SEXP);
 SEXP do_traceOnOff(SEXP, SEXP, SEXP, SEXP);
 SEXP do_traceback(SEXP, SEXP, SEXP, SEXP);
 SEXP do_transpose(SEXP, SEXP, SEXP, SEXP);
 SEXP do_trunc(SEXP, SEXP, SEXP, SEXP);
+SEXP do_tryCatchHelper(SEXP, SEXP, SEXP, SEXP);
 SEXP do_typeof(SEXP, SEXP, SEXP, SEXP);
 SEXP do_unclass(SEXP, SEXP, SEXP, SEXP);
 SEXP do_unlink(SEXP, SEXP, SEXP, SEXP);
 SEXP do_unlist(SEXP, SEXP, SEXP, SEXP);
 SEXP do_unserializeFromConn(SEXP, SEXP, SEXP, SEXP);
 SEXP do_unsetenv(SEXP, SEXP, SEXP, SEXP);
-SEXP do_unzip(SEXP, SEXP, SEXP, SEXP);
-SEXP do_usemethod(SEXP, SEXP, SEXP, SEXP);
+SEXP NORET do_usemethod(SEXP, SEXP, SEXP, SEXP);
 SEXP do_utf8ToInt(SEXP, SEXP, SEXP, SEXP);
+SEXP do_validEnc(SEXP, SEXP, SEXP, SEXP);
+SEXP do_validUTF8(SEXP, SEXP, SEXP, SEXP);
 SEXP do_vapply(SEXP, SEXP, SEXP, SEXP);
 SEXP do_version(SEXP, SEXP, SEXP, SEXP);
 SEXP do_warning(SEXP, SEXP, SEXP, SEXP);
@@ -457,7 +460,6 @@ SEXP do_compilepkgs(SEXP, SEXP, SEXP, SEXP);
 SEXP do_stdin(SEXP, SEXP, SEXP, SEXP);
 SEXP do_stdout(SEXP, SEXP, SEXP, SEXP);
 SEXP do_stderr(SEXP, SEXP, SEXP, SEXP);
-SEXP do_readlines(SEXP, SEXP, SEXP, SEXP);
 SEXP do_writelines(SEXP, SEXP, SEXP, SEXP);
 SEXP do_readbin(SEXP, SEXP, SEXP, SEXP);
 SEXP do_writebin(SEXP, SEXP, SEXP, SEXP);
@@ -485,7 +487,6 @@ SEXP do_textconvalue(SEXP, SEXP, SEXP, SEXP);
 SEXP do_getconnection(SEXP, SEXP, SEXP, SEXP);
 SEXP do_getallconnections(SEXP, SEXP, SEXP, SEXP);
 SEXP do_sumconnection(SEXP, SEXP, SEXP, SEXP);
-SEXP do_download(SEXP, SEXP, SEXP, SEXP);
 SEXP do_sockconn(SEXP, SEXP, SEXP, SEXP);
 SEXP do_sockselect(SEXP, SEXP, SEXP, SEXP);
 SEXP do_gzcon(SEXP, SEXP, SEXP, SEXP);
diff --git a/src/include/Makefile.in b/src/include/Makefile.in
index 9950e31..734ac9a 100644
--- a/src/include/Makefile.in
+++ b/src/include/Makefile.in
@@ -22,10 +22,10 @@ INT_HEADERS = Defn.h Errormsg.h Fileio.h Graphics.h GraphicsBase.h \
    Rdynpriv.h Rgraphics.h Rinlinedfuns.h Startup.h rlocale.h
 
 DISTFILES = Makefile.in Makefile.win $(INT_HEADERS) $(SRC_HEADERS) \
-  config.h.in stamp-h.in Rmath.h0.in memcheck.h valgrind.h
+  config.h.in stamp-h.in Rmath.h0.in
 
 SUBDIRS = R_ext
-SUBDIRS_WITH_NO_BUILD = Rmodules
+SUBDIRS_WITH_NO_BUILD = Rmodules vg
 
 TIMESTAMPS = $(SRC_HEADERS:.h=.ts) $(OBJ_HEADERS:.h=.tsa)
 
diff --git a/src/include/Makefile.win b/src/include/Makefile.win
index 50d3ecb..96dad0a 100644
--- a/src/include/Makefile.win
+++ b/src/include/Makefile.win
@@ -1,8 +1,10 @@
 #-*- Makefile -*-
 include ../gnuwin32/MkRules
-R_HOME=../..
+R_HOME = ../..
 
-VER=$(shell sed -e 's/\([^ ]*\).*/\1/' ../../VERSION)
+GIT = `if [ -d "$(top_builddir)/.git" ]; then echo "git"; fi`
+
+VER = $(shell sed -e 's/\([^ ]*\).*/\1/' ../../VERSION)
 
 ## keep these in step with ./Makefile.in
 SRC_HEADERS = R.h S.h Rdefines.h Rembedded.h Rinternals.h
@@ -10,11 +12,21 @@ SRC_HEADERS = R.h S.h Rdefines.h Rembedded.h Rinternals.h
 OBJ_HEADERS = Rconfig.h Rmath.h Rversion.h
 GW32_HEADERS = iconv.h psignal.h
 
-all: fixh config.h
+## This omits GetX11Image.h QuartzDevice.h eventloop.h
+R_EXT_HEADERS = \
+  Applic.h Arith.h BLAS.h Boolean.h Callbacks.h Complex.h Connections.h \
+  Constants.h Error.h \
+  GraphicsDevice.h GraphicsEngine.h Itermacros.h \
+  Lapack.h Linpack.h MathThreads.h Memory.h \
+  Parse.h Print.h PrtUtil.h R-ftp-http.h RS.h Rallocators.h Random.h \
+  Rdynload.h Riconv.h RStartup.h Utils.h libextern.h \
+  stats_package.h stats_stubs.h Visibility.h
+
+all: fixh config.h trioremap.h
 	@echo 'installing C headers'
 	@mkdir -p $(R_HOME)/include/R_ext
 	@cp -p $(SRC_HEADERS) $(OBJ_HEADERS) iconv.h $(R_HOME)/include
-	@cp -p R_ext/*.h $(R_HOME)/include/R_ext
+	@(cd R_ext; cp -p $(R_EXT_HEADERS) ../../../include/R_ext)
 	@cp -p ../extra/graphapp/graphapp.h ../extra/graphapp/ga.h \
 	  $(R_HOME)/include
 
@@ -53,6 +65,9 @@ Rmath.h0: Rmath.h0.in $(R_HOME)/VERSION Makefile.win
 Rmath.h: Rmath.h0
 	@sh $(R_HOME)/tools/copy-if-change $< $@
 
+trioremap.h: ../gnuwin32/fixed/h/trioremap.h
+	@cp $< $@
+
 ## If we do not have svn, get the old file from SVN-REVISION.bak (if poss).
 ## This needs to be copy-on-change.
 ## The date from svn info is not in GMT, but we have decided to live
@@ -67,14 +82,14 @@ ifdef USE_SVNVERSION
 	@LC_ALL=C svnversion ../.. | sed -n 's/^/Revision: /p' > svn-tmp || rm -f svn-tmp
 	@grep -v exported svn-tmp > /dev/null || rm -f svn-tmp
 else
-	@(cd ../..; LC_ALL=C svn info || echo "Revision: unknown") 2> /dev/null \
+	@(cd ../..; LC_ALL=C $(GIT) svn info || echo "Revision: unknown") 2> /dev/null \
 	  | sed -n '/^Revision/p' > svn-tmp
 	@if grep unknown svn-tmp > /dev/null ; then \
 	  rm svn-tmp; \
 	fi
 endif
 	@if test -f svn-tmp ; then \
-	  (cd ../..; LC_ALL=C TZ=GMT svn info || echo "Last Changed Date: unknown") 2> /dev/null \
+	  (cd ../..; LC_ALL=C TZ=GMT $(GIT) svn info || echo "Last Changed Date: unknown") 2> /dev/null \
 	    | sed -n '/^Last Changed Date:/p' | sed 's/[0-9][0-9]:.*//' \
 	    >> svn-tmp ; \
 	else \
diff --git a/src/include/Parse.h b/src/include/Parse.h
index 5cd0dfc..a4cf028 100644
--- a/src/include/Parse.h
+++ b/src/include/Parse.h
@@ -14,9 +14,11 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  */
 
+/* Internal header, not installed */
+
 #ifndef R_PARSE_H
 #define R_PARSE_H
 
@@ -70,6 +72,6 @@ SEXP R_ParseConn(Rconnection con, int n, ParseStatus *status, SEXP srcfile);
 
 	/* Report a parse error */
 	
-void parseError(SEXP call, int linenum);
+void NORET parseError(SEXP call, int linenum);
 
 #endif /* not R_PARSE_H */
diff --git a/src/include/Print.h b/src/include/Print.h
index 7576a05..0d4a10e 100644
--- a/src/include/Print.h
+++ b/src/include/Print.h
@@ -1,7 +1,7 @@
 /*
  *  R : A Computer Language for Statistical Data Analysis
  *  Copyright (C) 1995, 1996  Robert Gentleman and Ross Ihaka
- *  Copyright (C) 1997-2003   The R Core Team.
+ *  Copyright (C) 1997-2014   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
@@ -15,9 +15,11 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  */
 
+/* Internal header, not installed */
+
 #ifndef PRINT_H_
 #define PRINT_H_
 
@@ -28,6 +30,7 @@
 #define formatRaw           Rf_formatRaw
 #define formatString        Rf_formatString
 #define EncodeElement       Rf_EncodeElement
+#define EncodeElement0      Rf_EncodeElement0
 #define EncodeEnvironment   Rf_EncodeEnvironment
 #define printArray          Rf_printArray
 #define printMatrix         Rf_printMatrix
@@ -56,9 +59,10 @@ void formatRaw(Rbyte *, R_xlen_t, int *);
 void formatString(SEXP*, R_xlen_t, int*, int);
 
 /* Formating of values */
-const char *EncodeElement(SEXP, int, int, char);
+const char *EncodeElement0(SEXP, int, int, const char *);
 const char *EncodeEnvironment(SEXP);
-
+/* Legacy, for R.app */
+const char *EncodeElement(SEXP, int, int, char);
 
 /* In Rinternals.h (and MUST be there):
    CustomPrintValue,  PrintValue, PrintValueRec */
diff --git a/src/include/R.h b/src/include/R.h
index 499d374..4199374 100644
--- a/src/include/R.h
+++ b/src/include/R.h
@@ -1,12 +1,16 @@
 /*
  *  R : A Computer Language for Statistical Data Analysis
- *  Copyright (C) 2000-2013 The R Core Team.
+ *  Copyright (C) 2000-2016 The R Core Team.
  *
- *  This program is free software; you can redistribute it and/or modify
+ *  This header file is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU Lesser General Public License as published by
  *  the Free Software Foundation; either version 2.1 of the License, or
  *  (at your option) any later version.
  *
+ *  This file is part of R. R is distributed under the terms of the
+ *  GNU General Public License, either Version 2, June 1991 or Version 3,
+ *  June 2007. See doc/COPYRIGHTS for details of the copyright status of R.
+ *  
  *  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
@@ -14,7 +18,7 @@
  *
  *  You should have received a copy of the GNU Lesser General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  */
 
 #ifndef R_R_H
@@ -24,17 +28,54 @@
 # define USING_R
 #endif
 
-#ifndef NO_C_HEADERS
-#include <stdlib.h>
-#include <stdio.h>  /* Used by several packages, remove in due course */
-#include <limits.h> /* for INT_MAX */
-#include <math.h>
-# if defined(__sun)
+/* same as Rmath.h: needed for cospi etc */
+#ifndef __STDC_WANT_IEC_60559_FUNCS_EXT__
+# define __STDC_WANT_IEC_60559_FUNCS_EXT__ 1
+#endif
+/* The C++ headers in Solaris Studio are strict C++98, and 100+ 
+   packages would fail because of not using e.g. std::floor 
+   or using C99 functions such as 
+
+   erf exmp1 floorf fmin fminf fmax lgamma lround loglp round
+   snprintf strcasecmp trunc
+
+   We workaround the first, here and in Rmath.h.
+
+   DO_NOT_USE_CXX_HEADERS is legacy, left as a last resort.
+*/
+#if defined(__cplusplus) && !defined(DO_NOT_USE_CXX_HEADERS)
+# include <cstdlib>
+# include <cstdio>
+# include <climits>
+# include <cmath>
+# ifdef __SUNPRO_CC
+using namespace std;
+# endif
+#else
+# include <stdlib.h> /* Not used by R itself, but widely assumed in packages */
+# include <stdio.h>  /* Used by ca 200 packages, but not in R itself */
+# include <limits.h> /* for INT_MAX */
+# include <math.h>
+#endif 
+/* 
+   math.h is also included by R_ext/Arith.h, except in C++ code
+   stddef.h (or cstddef) is included by R_ext/Memory.h
+   string.h (or cstring) is included by R_ext/RS.h
+*/
+#if defined(__sun)
+/* Solaris' stdlib.h includes a header which defines these (and more) */
+# undef CS
 # undef DO
 # undef DS
+# undef ES
+# undef FS
+# undef GS
 # undef SO
 # undef SS
-# endif
+#endif
+
+#ifdef NO_C_HEADERS
+# warning "use of NO_C_HEADERS is defunct and will be ignored"
 #endif
 
 #include <Rconfig.h>
diff --git a/src/include/R_ext/Applic.h b/src/include/R_ext/Applic.h
index 2c463c6..a8fa975 100644
--- a/src/include/R_ext/Applic.h
+++ b/src/include/R_ext/Applic.h
@@ -1,12 +1,16 @@
 /*
  *  R : A Computer Language for Statistical Data Analysis
- *  Copyright (C) 1998-2013   The R Core Team
+ *  Copyright (C) 1998-2015   The R Core Team
  *
- *  This program is free software; you can redistribute it and/or modify
+ *  This header file is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU Lesser General Public License as published by
  *  the Free Software Foundation; either version 2.1 of the License, or
  *  (at your option) any later version.
  *
+ *  This file is part of R. R is distributed under the terms of the
+ *  GNU General Public License, either Version 2, June 1991 or Version 3,
+ *  June 2007. See doc/COPYRIGHTS for details of the copyright status of R.
+ *
  *  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
@@ -14,7 +18,7 @@
  *
  *  You should have received a copy of the GNU Lesser General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  *
  *
  * Application Routines, typically implemented in  ../appl/
@@ -42,7 +46,7 @@ extern "C" {
 
 /* Entry points in the R API */
 
-/* appl/integrate.c */
+/* ../../appl/integrate.c */
 typedef void integr_fn(double *x, int n, void *ex);
 /* vectorizing function   f(x[1:n], ...) -> x[]  {overwriting x[]}. */
 
@@ -84,6 +88,7 @@ void samin(int n, double *pb, double *yb, optimfn fn, int maxit,
 int findInterval(double *xt, int n, double x,
 		 Rboolean rightmost_closed,  Rboolean all_inside, int ilo,
 		 int *mflag);
+// findInterval2() is only in Utils.h (and hence Rinternals.h)
 
 

 /* ------------------ Entry points NOT in the R API --------------- */
@@ -135,7 +140,7 @@ void optif9(int nr, int n, double *x,
 	    double steptl, double *xpls, double *fpls, double *gpls,
 	    int *itrmcd, double *a, double *wrk, int *itncnt);
 
-/* find qr decomposition, dqrdc2() is basis of R's qr(), 
+/* find qr decomposition, dqrdc2() is basis of R's qr(),
    also used by nlme and many other packages. */
 void F77_NAME(dqrdc2)(double *x, int *ldx, int *n, int *p,
 		      double *tol, int *rank,
diff --git a/src/include/R_ext/Arith.h b/src/include/R_ext/Arith.h
index 1d4f2a7..0a5a852 100644
--- a/src/include/R_ext/Arith.h
+++ b/src/include/R_ext/Arith.h
@@ -1,13 +1,17 @@
 /*
  *  R : A Computer Language for Statistical Data Analysis
  *  Copyright (C) 1995, 1996  Robert Gentleman and Ross Ihaka
- *  Copyright (C) 1998--2007  The R Core Team.
+ *  Copyright (C) 1998--2016  The R Core Team.
  *
- *  This program is free software; you can redistribute it and/or modify
+ *  This header file is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU Lesser General Public License as published by
  *  the Free Software Foundation; either version 2.1 of the License, or
  *  (at your option) any later version.
  *
+ *  This file is part of R. R is distributed under the terms of the
+ *  GNU General Public License, either Version 2, June 1991 or Version 3,
+ *  June 2007. See doc/COPYRIGHTS for details of the copyright status of R.
+ *
  *  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
@@ -15,7 +19,7 @@
  *
  *  You should have received a copy of the GNU Lesser General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  */
 
 /* Included by R.h: API */
@@ -23,16 +27,16 @@
 #ifndef R_ARITH_H_
 #define R_ARITH_H_
 
-/* Only for use where config.h has not already been included */
-#if defined(HAVE_GLIBC2) && !defined(_BSD_SOURCE)
-/* ensure that finite and isnan are declared */
-# define _BSD_SOURCE 1
-#endif
+/* 
+   This used to define _BSD_SOURCE to make declarations of isfinite
+   and isnan visible in glibc.  But that was deprecated in glibc 2.20,
+   and --std=c99 suffices nowadays.
+*/
 
 #include <R_ext/libextern.h>
 #ifdef  __cplusplus
 extern "C" {
-#elif !defined(NO_C_HEADERS)
+#else
 /* needed for isnan and isfinite, neither of which are used under C++ */
 # include <math.h>
 #endif
@@ -62,7 +66,7 @@ int R_finite(double);		/* True if none of NA, NaN, +/-Inf */
 /* ISNAN(): True for *both* NA and NaN.
    NOTE: some systems do not return 1 for TRUE.
    Also note that C++ math headers specifically undefine
-   isnan if it is a macro (it is on OS X and in C99),
+   isnan if it is a macro (it is on macOS and in C99),
    hence the workaround.  This code also appears in Rmath.h
 */
 #ifdef __cplusplus
diff --git a/src/include/R_ext/BLAS.h b/src/include/R_ext/BLAS.h
index 98c192e..d03af0d 100644
--- a/src/include/R_ext/BLAS.h
+++ b/src/include/R_ext/BLAS.h
@@ -1,12 +1,16 @@
 /*
  *  R : A Computer Language for Statistical Data Analysis
- *  Copyright (C) 2003-12 The R Core Team.
+ *  Copyright (C) 2003-2016 The R Core Team.
  *
- *  This program is free software; you can redistribute it and/or modify
+ *  This header file is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU Lesser General Public License as published by
  *  the Free Software Foundation; either version 2.1 of the License, or
  *  (at your option) any later version.
  *
+ *  This file is part of R. R is distributed under the terms of the
+ *  GNU General Public License, either Version 2, June 1991 or Version 3,
+ *  June 2007. See doc/COPYRIGHTS for details of the copyright status of R.
+ *
  *  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
@@ -14,7 +18,7 @@
  *
  *  You should have received a copy of the GNU Lesser General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  */
 
 /*
@@ -22,7 +26,7 @@
 
    Part of the API.
 
-   R packages that use these should have PKG_LIBS in src/Makevars include 
+   R packages that use these should have PKG_LIBS in src/Makevars include
    $(BLAS_LIBS) $(FLIBS)
  */
 
@@ -241,19 +245,19 @@ F77_NAME(dsyr2k)(const char *uplo, const char *trans,
 /* Double complex BLAS routines added for 2.3.0 */
 /* #ifdef HAVE_FORTRAN_DOUBLE_COMPLEX */
     BLAS_extern double
-    F77_NAME(dcabs1)(double *z);
+    F77_NAME(dcabs1)(const double *z);
     BLAS_extern double
-    F77_NAME(dzasum)(int *n, Rcomplex *zx, int *incx);
+    F77_NAME(dzasum)(const int *n, const Rcomplex *zx, const int *incx);
     BLAS_extern double
-    F77_NAME(dznrm2)(int *n, Rcomplex *x, int *incx);
+    F77_NAME(dznrm2)(const int *n, const Rcomplex *x, const int *incx);
     BLAS_extern int
-    F77_NAME(izamax)(int *n, Rcomplex *zx, int *incx);
+    F77_NAME(izamax)(const int *n, const Rcomplex *zx, const int *incx);
     BLAS_extern void
-    F77_NAME(zaxpy)(int *n, Rcomplex *za, Rcomplex *zx,
-		    int *incx, Rcomplex *zy, int *incy);
+    F77_NAME(zaxpy)(const int *n, const Rcomplex *za, const Rcomplex *zx,
+		    const int *incx, const Rcomplex *zy, const int *incy);
     BLAS_extern void
-    F77_NAME(zcopy)(int *n, Rcomplex *zx, int *incx,
-		    Rcomplex *zy, int *incy);
+    F77_NAME(zcopy)(const int *n, const Rcomplex *zx, const int *incx,
+		    const Rcomplex *zy, const int *incy);
 
     /* WARNING!  The next two return a value that may not be
        compatible between C and Fortran, and even if it is, this might
@@ -261,19 +265,24 @@ F77_NAME(dsyr2k)(const char *uplo, const char *trans,
        configure-testing with your compilers.
      */
     BLAS_extern Rcomplex
-    F77_NAME(zdotc)(int *n,
-		    Rcomplex *zx, int *incx, Rcomplex *zy, int *incy);
+    F77_NAME(zdotc)(const int *n,
+		    const Rcomplex *zx, const int *incx, 
+		    const Rcomplex *zy, const int *incy);
     BLAS_extern Rcomplex
-    F77_NAME(zdotu)(int *n,
-		    Rcomplex *zx, int *incx, Rcomplex *zy, int *incy);
+    F77_NAME(zdotu)(const int *n,
+		    const Rcomplex *zx, const int *incx,
+		    const Rcomplex *zy, const int *incy);
 
     BLAS_extern void
-    F77_NAME(zdrot)(int *n, Rcomplex *zx, int *incx, Rcomplex *zy,
-		int *incy, double *c, double *s);
+    F77_NAME(zdrot)(const int *n, 
+		    const Rcomplex *zx, const int *incx, 
+		    Rcomplex *zy, const int *incy, 
+		    const double *c, const double *s);
     BLAS_extern void
-    F77_NAME(zdscal)(int *n, double *da, Rcomplex *zx, int *incx);
+    F77_NAME(zdscal)(const int *n, const double *da, 
+		     Rcomplex *zx, const int *incx);
     BLAS_extern void
-    F77_NAME(zgbmv)(char *trans, int *m, int *n, int *kl,
+    F77_NAME(zgbmv)(const char *trans, int *m, int *n, int *kl,
 		    int *ku, Rcomplex *alpha, Rcomplex *a, int *lda,
 		    Rcomplex *x, int *incx, Rcomplex *beta, Rcomplex *y,
 		    int *incy);
@@ -284,95 +293,118 @@ F77_NAME(dsyr2k)(const char *uplo, const char *trans,
 		    const Rcomplex *b, const int *ldb,
 		    const Rcomplex *beta, Rcomplex *c, const int *ldc);
     BLAS_extern void
-    F77_NAME(zgemv)(char *trans, int *m, int *n, Rcomplex *alpha,
-		    Rcomplex *a, int *lda, Rcomplex *x, int *incx,
-		    Rcomplex *beta, Rcomplex *y, int * incy);
+    F77_NAME(zgemv)(const char *trans, const int *m, const int *n,
+		    const Rcomplex *alpha, const Rcomplex *a, const int *lda,
+		    const Rcomplex *x, const int *incx, const Rcomplex *beta,
+		    Rcomplex *y, const int *incy);
     BLAS_extern void
-    F77_NAME(zgerc)(int *m, int *n, Rcomplex *alpha, Rcomplex *x,
-		    int *incx, Rcomplex *y, int *incy, Rcomplex *a, int *lda);
+    F77_NAME(zgerc)(const int *m, const int *n, const Rcomplex *alpha,
+		    const Rcomplex *x, const int *incx, const Rcomplex *y,
+		    const int *incy, Rcomplex *a, const int *lda);
     BLAS_extern void
-    F77_NAME(zgeru)(int *m, int *n, Rcomplex *alpha, Rcomplex *x,
-		    int *incx, Rcomplex *y, int *incy, Rcomplex *a, int *lda);
+    F77_NAME(zgeru)(const int *m, const int *n, const Rcomplex *alpha,
+		    const Rcomplex *x, const int *incx, const Rcomplex *y,
+		    const int *incy, Rcomplex *a, const int *lda);
     BLAS_extern void
-    F77_NAME(zhbmv)(char *uplo, int *n, int *k, Rcomplex *alpha,
-		    Rcomplex *a, int *lda, Rcomplex *x, int *incx,
-		    Rcomplex *beta, Rcomplex *y, int *incy);
+    F77_NAME(zhbmv)(const char *uplo, const int *n, const int *k,
+		    const Rcomplex *alpha, const Rcomplex *a, const int *lda,
+		    const Rcomplex *x, const int *incx, const Rcomplex *beta,
+		    Rcomplex *y, const int *incy);
     BLAS_extern void
-    F77_NAME(zhemm)(char *side, char *uplo, int *m, int *n,
-		    Rcomplex *alpha, Rcomplex *a, int *lda, Rcomplex *b,
-		    int *ldb, Rcomplex *beta, Rcomplex *c, int *ldc);
+    F77_NAME(zhemm)(const char *side, const char *uplo, const int *m,
+		    const int *n, const Rcomplex *alpha, const Rcomplex *a,
+		    const int *lda, const Rcomplex *b, const int *ldb,
+		    const Rcomplex *beta, Rcomplex *c, const int *ldc);
     BLAS_extern void
-    F77_NAME(zhemv)(char *uplo, int *n, Rcomplex *alpha, Rcomplex *a,
-		    int *lda, Rcomplex *x, int *incx, Rcomplex *beta,
-		    Rcomplex *y, int *incy);
+    F77_NAME(zhemv)(const char *uplo, const int *n, const Rcomplex *alpha,
+		    const Rcomplex *a, const int *lda, const Rcomplex *x,
+		    const int *incx, const Rcomplex *beta,
+		    Rcomplex *y, const int *incy);
     BLAS_extern void
-    F77_NAME(zher)(char *uplo, int *n, double *alpha, Rcomplex *x,
-		   int *incx, Rcomplex *a, int *lda);
+    F77_NAME(zher)(const char *uplo, const int *n, const double *alpha,
+		   const Rcomplex *x, const int *incx, Rcomplex *a,
+		   const int *lda);
     BLAS_extern void
-    F77_NAME(zher2)(char *uplo, int *n, Rcomplex *alpha, Rcomplex *x,
-		    int *incx, Rcomplex *y, int *incy, Rcomplex *a, int *lda);
+    F77_NAME(zher2)(const char *uplo, const int *n, const Rcomplex *alpha,
+		    const Rcomplex *x, const int *incx, const Rcomplex *y,
+		    const int *incy, Rcomplex *a, const int *lda);
     BLAS_extern void
-    F77_NAME(zher2k)(char *uplo, char *trans, int *n, int *k,
-		     Rcomplex *alpha, Rcomplex *a, int *lda, Rcomplex *b,
-		     int *ldb, double *beta, Rcomplex *c, int *ldc);
+    F77_NAME(zher2k)(const char *uplo, const char *trans, const int *n,
+		     const int *k, const Rcomplex *alpha, const Rcomplex *a,
+		     const int *lda, const Rcomplex *b, const  int *ldb,
+		     const double *beta, Rcomplex *c, const int *ldc);
     BLAS_extern void
-    F77_NAME(zherk)(char *uplo, char *trans, int *n, int *k,
-		    double *alpha, Rcomplex *a, int *lda, double *beta,
-		    Rcomplex *c, int *ldc);
+    F77_NAME(zherk)(const char *uplo, const char *trans, const int *n,
+		    const int *k, const double *alpha, const Rcomplex *a,
+		    const int *lda, const double *beta, Rcomplex *c,
+		    const int *ldc);
     BLAS_extern void
-    F77_NAME(zhpmv)(char *uplo, int *n, Rcomplex *alpha, Rcomplex *ap,
-		    Rcomplex *x, int *incx, Rcomplex * beta, Rcomplex *y,
-		    int *incy);
+    F77_NAME(zhpmv)(const char *uplo, const int *n, const Rcomplex *alpha,
+		    const Rcomplex *ap, const Rcomplex *x, const int *incx,
+		    const Rcomplex * beta, Rcomplex *y, const int *incy);
     BLAS_extern void
-    F77_NAME(zhpr)(char *uplo, int *n, double *alpha,
-		   Rcomplex *x, int *incx, Rcomplex *ap);
+    F77_NAME(zhpr)(const char *uplo, const int *n, const double *alpha,
+		   const Rcomplex *x, const int *incx, Rcomplex *ap);
     BLAS_extern void
-    F77_NAME(zhpr2)(char *uplo, int *n, Rcomplex *alpha, Rcomplex *x,
-		    int *incx, Rcomplex *y, int *incy, Rcomplex *ap);
+    F77_NAME(zhpr2)(const char *uplo, const int *n, const Rcomplex *alpha,
+		    const Rcomplex *x, const int *incx, const Rcomplex *y,
+		    const int *incy, Rcomplex *ap);
     BLAS_extern void
-    F77_NAME(zrotg)(Rcomplex *ca, Rcomplex *cb, double *c, Rcomplex *s);
+    F77_NAME(zrotg)(const Rcomplex *ca, const Rcomplex *cb, 
+		    double *c, Rcomplex *s);
     BLAS_extern void
-    F77_NAME(zscal)(int *n, Rcomplex *za, Rcomplex *zx, int *incx);
+    F77_NAME(zscal)(const int *n, const Rcomplex *za, Rcomplex *zx,
+		    const int *incx);
     BLAS_extern void
-    F77_NAME(zswap)(int *n, Rcomplex *zx, int *incx, Rcomplex *zy, int *incy);
+    F77_NAME(zswap)(const int *n, Rcomplex *zx, const int *incx,
+		    Rcomplex *zy, const int *incy);
     BLAS_extern void
-    F77_NAME(zsymm)(char *side, char *uplo, int *m, int *n,
-		    Rcomplex *alpha, Rcomplex *a, int *lda, Rcomplex *b,
-		    int *ldb, Rcomplex *beta, Rcomplex *c, int *ldc);
+    F77_NAME(zsymm)(const char *side, const char *uplo, const int *m,
+		    const int *n, const Rcomplex *alpha, const Rcomplex *a,
+		    const int *lda, const Rcomplex *b, const int *ldb,
+		    const Rcomplex *beta, Rcomplex *c, const int *ldc);
     BLAS_extern void
-    F77_NAME(zsyr2k)(char *uplo, char *trans, int *n, int *k,
+    F77_NAME(zsyr2k)(const char *uplo, const char *trans, int *n, int *k,
 		     Rcomplex *alpha, Rcomplex *a, int *lda, Rcomplex *b,
 		     int *ldb, Rcomplex *beta, Rcomplex *c, int *ldc);
     BLAS_extern void
-    F77_NAME(zsyrk)(char *uplo, char *trans, int *n, int *k,
-		    Rcomplex *alpha, Rcomplex *a, int *lda,
-		    Rcomplex *beta, Rcomplex *c, int *ldc);
+    F77_NAME(zsyrk)(const char *uplo, const char *trans, const  int *n,
+		    const int *k, const Rcomplex *alpha, const Rcomplex *a,
+		    const int *lda, const Rcomplex *beta, Rcomplex *c,
+		    const int *ldc);
     BLAS_extern void
-    F77_NAME(ztbmv)(char *uplo, char *trans, char *diag, int *n, int *k,
-		    Rcomplex *a, int *lda, Rcomplex *x, int *incx);
+    F77_NAME(ztbmv)(const char *uplo, const char *trans, const char *diag,
+		    const int *n, const int *k, const Rcomplex *a,
+		    const int *lda, Rcomplex *x, const int *incx);
     BLAS_extern void
-    F77_NAME(ztbsv)(char *uplo, char *trans, char *diag, int *n, int *k,
-		    Rcomplex *a, int *lda, Rcomplex *x, int *incx);
+    F77_NAME(ztbsv)(const char *uplo, const char *trans, const char *diag,
+		    const int *n, const int *k, const Rcomplex *a,
+		    const int *lda, Rcomplex *x, const int *incx);
     BLAS_extern void
-    F77_NAME(ztpmv)(char *uplo, char *trans, char *diag, int *n,
-		    Rcomplex *ap, Rcomplex *x, int *incx);
+    F77_NAME(ztpmv)(const char *uplo, const char *trans, const char *diag,
+		    const int *n, const Rcomplex *ap, Rcomplex *x,
+		    const int *incx);
     BLAS_extern void
-    F77_NAME(ztpsv)(char *uplo, char *trans, char *diag, int *n,
-		    Rcomplex *ap, Rcomplex *x, int *incx);
+    F77_NAME(ztpsv)(const char *uplo, const char *trans, const char *diag,
+		    const int *n, const Rcomplex *ap, Rcomplex *x,
+		    const int *incx);
     BLAS_extern void
-    F77_NAME(ztrmm)(char *side, char *uplo, char *transa, char *diag,
-		    int *m, int *n, Rcomplex *alpha, Rcomplex *a,
-		    int *lda, Rcomplex *b, int *ldb);
+    F77_NAME(ztrmm)(const char *side, const char *uplo, const char *transa,
+		    const char *diag, const int *m, const int *n,
+		    const Rcomplex *alpha, const Rcomplex *a,
+		    const int *lda, Rcomplex *b, const int *ldb);
     BLAS_extern void
-    F77_NAME(ztrmv)(char *uplo, char *trans, char *diag, int *n,
-		    Rcomplex *a, int *lda, Rcomplex *x, int *incx);
+    F77_NAME(ztrmv)(const char *uplo, const char *trans, const char *diag,
+		    const int *n, const Rcomplex *a, const int *lda,
+		    Rcomplex *x, const int *incx);
     BLAS_extern void
-    F77_NAME(ztrsm)(char *side, char *uplo, char *transa, char *diag,
-		    int *m, int *n, Rcomplex *alpha, Rcomplex *a,
-		    int *lda, Rcomplex *b, int *ldb);
+    F77_NAME(ztrsm)(const char *side, const char *uplo, const char *transa,
+		    const char *diag, int *m, int *n, Rcomplex *alpha,
+		    Rcomplex *a, int *lda, Rcomplex *b, int *ldb);
     BLAS_extern void
-    F77_NAME(ztrsv)(char *uplo, char *trans, char *diag, int *n,
-		    Rcomplex *a, int *lda, Rcomplex *x, int *incx);
+    F77_NAME(ztrsv)(const char *uplo, const char *trans, const char *diag,
+		    const int *n, const Rcomplex *a, const int *lda,
+		    Rcomplex *x, const int *incx);
 /* #endif */
 
 #ifdef  __cplusplus
diff --git a/src/include/R_ext/Boolean.h b/src/include/R_ext/Boolean.h
index ea855a2..56bce4e 100644
--- a/src/include/R_ext/Boolean.h
+++ b/src/include/R_ext/Boolean.h
@@ -2,11 +2,15 @@
  *  R : A Computer Language for Statistical Data Analysis
  *  Copyright (C) 2000, 2001 The R Core Team.
  *
- *  This program is free software; you can redistribute it and/or modify
+ *  This header file is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU Lesser General Public License as published by
  *  the Free Software Foundation; either version 2.1 of the License, or
  *  (at your option) any later version.
  *
+ *  This file is part of R. R is distributed under the terms of the
+ *  GNU General Public License, either Version 2, June 1991 or Version 3,
+ *  June 2007. See doc/COPYRIGHTS for details of the copyright status of R.
+ *
  *  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
@@ -14,7 +18,7 @@
  *
  *  You should have received a copy of the GNU Lesser General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  */
 
 /* Included by R.h: API */
diff --git a/src/include/R_ext/Callbacks.h b/src/include/R_ext/Callbacks.h
index cb1d64c..c442391 100644
--- a/src/include/R_ext/Callbacks.h
+++ b/src/include/R_ext/Callbacks.h
@@ -1,12 +1,16 @@
 /*
  *  R : A Computer Language for Statistical Data Analysis
- *  Copyright (C) 2001-2 The R Core Team.
+ *  Copyright (C) 2001-2016 The R Core Team.
  *
- *  This program is free software; you can redistribute it and/or modify
+ *  This header file is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU Lesser General Public License as published by
  *  the Free Software Foundation; either version 2.1 of the License, or
  *  (at your option) any later version.
  *
+ *  This file is part of R. R is distributed under the terms of the
+ *  GNU General Public License, either Version 2, June 1991 or Version 3,
+ *  June 2007. See doc/COPYRIGHTS for details of the copyright status of R.
+ *
  *  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
@@ -14,7 +18,7 @@
  *
  *  You should have received a copy of the GNU Lesser General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  */
 
 /* 
@@ -72,8 +76,8 @@ R_ToplevelCallbackEl* Rf_addTaskCallback(R_ToplevelCallback cb, void *data, void
   separate package on Omegahat and these declarations allow the package
   to interface to the internal R code.
   
-  See http://developer.r-project.org/RObjectTables.pdf,
-  http://www.omegahat.org/RObjectTables/
+  See https://developer.r-project.org/RObjectTables.pdf,
+  http://www.omegahat.net/RObjectTables/
 */
 
 typedef struct  _R_ObjectTable R_ObjectTable;
diff --git a/src/include/R_ext/Complex.h b/src/include/R_ext/Complex.h
index 06417a7..ecd8cb7 100644
--- a/src/include/R_ext/Complex.h
+++ b/src/include/R_ext/Complex.h
@@ -2,11 +2,15 @@
  *  R : A Computer Language for Statistical Data Analysis
  *  Copyright (C) 1998-2001   The R Core Team
  *
- *  This program is free software; you can redistribute it and/or modify
+ *  This header file is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU Lesser General Public License as published by
  *  the Free Software Foundation; either version 2.1 of the License, or
  *  (at your option) any later version.
  *
+ *  This file is part of R. R is distributed under the terms of the
+ *  GNU General Public License, either Version 2, June 1991 or Version 3,
+ *  June 2007. See doc/COPYRIGHTS for details of the copyright status of R.
+ *
  *  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
@@ -14,7 +18,7 @@
  *
  *  You should have received a copy of the GNU Lesser General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  */
 
 /* Included by R.h: API */
diff --git a/src/include/R_ext/Connections.h b/src/include/R_ext/Connections.h
index e073991..3383d0e 100644
--- a/src/include/R_ext/Connections.h
+++ b/src/include/R_ext/Connections.h
@@ -1,6 +1,6 @@
 /*
  *  R : A Computer Language for Statistical Data Analysis
- *  Copyright (C) 2000-2013   The R Core Team.
+ *  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
@@ -14,7 +14,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  */
 
 #ifndef R_EXT_CONNECTIONS_H_
@@ -22,7 +22,10 @@
 
 #include <R_ext/Boolean.h>
 
-#ifndef NO_C_HEADERS
+#if defined(__cplusplus) && !defined(DO_NOT_USE_CXX_HEADERS)
+# include <cstddef>
+# include <cstdarg>
+#else
 # include <stddef.h> /* for size_t */
 # include <stdarg.h> /* for va_list */
 #endif
@@ -83,6 +86,7 @@ extern "C" {
 SEXP   R_new_custom_connection(const char *description, const char *mode, const char *class_name, Rconnection *ptr);
 size_t R_ReadConnection(Rconnection con, void *buf, size_t n);
 size_t R_WriteConnection(Rconnection con, void *buf, size_t n);
+Rconnection R_GetConnection(SEXP sConn);
 
 #ifdef  __cplusplus
 }
diff --git a/src/include/R_ext/Constants.h b/src/include/R_ext/Constants.h
index 08e3d15..ba61397 100644
--- a/src/include/R_ext/Constants.h
+++ b/src/include/R_ext/Constants.h
@@ -3,11 +3,15 @@
  *  Copyright (C) 1995, 1996  Robert Gentleman and Ross Ihaka
  *  Copyright (C) 1998-2012   The R Core Team.
  *
- *  This program is free software; you can redistribute it and/or modify
+ *  This header file is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU Lesser General Public License as published by
  *  the Free Software Foundation; either version 2.1 of the License, or
  *  (at your option) any later version.
  *
+ *  This file is part of R. R is distributed under the terms of the
+ *  GNU General Public License, either Version 2, June 1991 or Version 3,
+ *  June 2007. See doc/COPYRIGHTS for details of the copyright status of R.
+ *
  *  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
@@ -15,7 +19,7 @@
  *
  *  You should have received a copy of the GNU Lesser General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  */
 
 /* Included by R.h: API */
diff --git a/src/include/R_ext/Error.h b/src/include/R_ext/Error.h
index fbdceec..8d17d37 100644
--- a/src/include/R_ext/Error.h
+++ b/src/include/R_ext/Error.h
@@ -2,11 +2,15 @@
  *  R : A Computer Language for Statistical Data Analysis
  *  Copyright (C) 1998-2005   The R Core Team
  *
- *  This program is free software; you can redistribute it and/or modify
+ *  This header file is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU Lesser General Public License as published by
  *  the Free Software Foundation; either version 2.1 of the License, or
  *  (at your option) any later version.
  *
+ *  This file is part of R. R is distributed under the terms of the
+ *  GNU General Public License, either Version 2, June 1991 or Version 3,
+ *  June 2007. See doc/COPYRIGHTS for details of the copyright status of R.
+ *
  *  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
@@ -14,7 +18,7 @@
  *
  *  You should have received a copy of the GNU Lesser General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  */
 
 /* Included by R.h: API */
@@ -26,19 +30,16 @@
 extern "C" {
 #endif
 
-/* valid from gcc 2.95.3, at least.
-   Suggested by Anton Korobeynikov.
- */
 #if defined(__GNUC__) && __GNUC__ >= 3
-void Rf_error(const char *, ...) __attribute__((noreturn));
-void UNIMPLEMENTED(const char *) __attribute__((noreturn));
-void WrongArgCount(const char *) __attribute__((noreturn));
+#define NORET __attribute__((noreturn))
 #else
-void Rf_error(const char *, ...);
-void UNIMPLEMENTED(const char *);
-void WrongArgCount(const char *);
+#define NORET
 #endif
 
+void NORET Rf_error(const char *, ...);
+void NORET UNIMPLEMENTED(const char *);
+void NORET WrongArgCount(const char *);
+
 void	Rf_warning(const char *, ...);
 void 	R_ShowMessage(const char *s);
     
diff --git a/src/include/R_ext/GetX11Image.h b/src/include/R_ext/GetX11Image.h
index a7181fa..07b4fd1 100644
--- a/src/include/R_ext/GetX11Image.h
+++ b/src/include/R_ext/GetX11Image.h
@@ -1,6 +1,6 @@
 /*
  *  R : A Computer Language for Statistical Data Analysis
- *  Copyright (C) 2003  R Core Team
+ *  Copyright (C) 2003-2016  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
@@ -14,9 +14,11 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  */
 
+/* Unix-only header */
+
 #ifndef GETX11IMAGE_H_
 #define GETX11IMAGE_H_
 
diff --git a/src/include/R_ext/GraphicsDevice.h b/src/include/R_ext/GraphicsDevice.h
index fa4701c..d2604da 100644
--- a/src/include/R_ext/GraphicsDevice.h
+++ b/src/include/R_ext/GraphicsDevice.h
@@ -2,11 +2,15 @@
  *  R : A Computer Language for Statistical Data Analysis
  *  Copyright (C) 2001-11 The R Core Team.
  *
- *  This program is free software; you can redistribute it and/or modify
+ *  This header file is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU Lesser General Public License as published by
  *  the Free Software Foundation; either version 2.1 of the License, or
  *  (at your option) any later version.
  *
+ *  This file is part of R. R is distributed under the terms of the
+ *  GNU General Public License, either Version 2, June 1991 or Version 3,
+ *  June 2007. See doc/COPYRIGHTS for details of the copyright status of R.
+ *
  *  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
@@ -14,7 +18,7 @@
  *
  *  You should have received a copy of the GNU Lesser General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  */
 
 /* Used by third-party graphics devices.
@@ -147,7 +151,8 @@ struct _DevDesc {
     Rboolean canGenMouseMove; /* can the device generate mousemove events */
     Rboolean canGenMouseUp;   /* can the device generate mouseup events */
     Rboolean canGenKeybd;     /* can the device generate keyboard events */
-
+    Rboolean canGenIdle;      /* can the device generate idle events */
+ 
     Rboolean gettingEvent;    /* This is set while getGraphicsEvent
 				 is actively looking for events */
     
@@ -820,12 +825,15 @@ typedef enum {meMouseDown = 0,
 
 #define doKeybd			Rf_doKeybd
 #define doMouseEvent		Rf_doMouseEvent
+#define doIdle			Rf_doIdle
+#define doesIdle		Rf_doesIdle
 
 void doMouseEvent(pDevDesc dd, R_MouseEvent event,
                   int buttons, double x, double y);
 void doKeybd(pDevDesc dd, R_KeyName rkey,
 	     const char *keyname);
-
+void doIdle(pDevDesc dd);
+Rboolean doesIdle(pDevDesc dd);
 
 /* For use in third-party devices when setting up a device:
  * duplicates Defn.h which is used internally.
diff --git a/src/include/R_ext/GraphicsEngine.h b/src/include/R_ext/GraphicsEngine.h
index ad5b0f7..e4b13e3 100644
--- a/src/include/R_ext/GraphicsEngine.h
+++ b/src/include/R_ext/GraphicsEngine.h
@@ -2,11 +2,15 @@
  *  R : A Computer Language for Statistical Data Analysis
  *  Copyright (C) 2001-11 The R Core Team.
  *
- *  This program is free software; you can redistribute it and/or modify
+ *  This header file is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU Lesser General Public License as published by
  *  the Free Software Foundation; either version 2.1 of the License, or
  *  (at your option) any later version.
  *
+ *  This file is part of R. R is distributed under the terms of the
+ *  GNU General Public License, either Version 2, June 1991 or Version 3,
+ *  June 2007. See doc/COPYRIGHTS for details of the copyright status of R.
+ *
  *  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
@@ -14,7 +18,7 @@
  *
  *  You should have received a copy of the GNU Lesser General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  */
 
 /* Used by graphics.c, grid and by third-party graphics devices */
@@ -57,9 +61,18 @@ extern "C" {
  *             haveCapture, haveLocator.  (R 2.14.0)
  * Version 10: For R 3.0.0.  Typedef and use 'rcolor',
  *             Remove name2col (R_GE_str2col does the job).
+ * Version 11: For R 3.3.0.
+ *             Official support for saving/restoring display lists
+ *             across R sessions (via recordPlot() and replayPlot())
+ *             - added grid DL to snapshots (used to be NULL)
+ *             - added this version number to snapshots (as attribute)
+ *             - added R version number to snapshots (as attribute)
+ *             - added pkgName to graphics system state info (as attribute)
+ * Version 12: For R 3.4.0
+ *             Added canGenIndle, doIdle() and doesIdle() to devices.
  */
 
-#define R_GE_version 10
+#define R_GE_version 12
 
 int R_GE_getVersion(void);
 
@@ -268,6 +281,7 @@ int GEdeviceNumber(pGEDevDesc);
 pGEDevDesc GEgetDevice(int);
 void GEaddDevice(pGEDevDesc);
 void GEaddDevice2(pGEDevDesc, const char *);
+void GEaddDevice2f(pGEDevDesc, const char *, const char *);
 void GEkillDevice(pGEDevDesc);
 pGEDevDesc GEcreateDevDesc(pDevDesc dev);
 
diff --git a/src/include/R_ext/Itermacros.h b/src/include/R_ext/Itermacros.h
index d22ba37..1456d66 100644
--- a/src/include/R_ext/Itermacros.h
+++ b/src/include/R_ext/Itermacros.h
@@ -2,11 +2,15 @@
  *  R : A Computer Language for Statistical Data Analysis
  *  Copyright (C) 2001-12  The R Core Team.
  *
- *  This program is free software; you can redistribute it and/or modify
+ *  This header file is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU Lesser General Public License as published by
  *  the Free Software Foundation; either version 2.1 of the License, or
  *  (at your option) any later version.
  *
+ *  This file is part of R. R is distributed under the terms of the
+ *  GNU General Public License, either Version 2, June 1991 or Version 3,
+ *  June 2007. See doc/COPYRIGHTS for details of the copyright status of R.
+ *
  *  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
@@ -14,7 +18,7 @@
  *
  *  You should have received a copy of the GNU Lesser General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  */
 
 /*
@@ -51,7 +55,27 @@
 	LOOP_WITH_INTERRUPT_CHECK(R_ITERATE_CORE, ncheck, n, i, loop_body); \
     } while (0)
 
-#define MOD_ITERATE_CORE(n, n1, n2, i, i1, i2, loop_body) do {	\
+
+#define MOD_ITERATE1_CORE(n, n1, i, i1, loop_body) do {	\
+	for (; i < n;							\
+	     i1 = (++i1 == n1) ? 0 : i1,				\
+		 ++i) {							\
+	    loop_body							\
+		}							\
+    } while (0)
+
+#define MOD_ITERATE1(n, n1, i, i1, loop_body) do {	\
+	i = i1 = 0;					\
+	MOD_ITERATE1_CORE(n, n1, i, i1, loop_body);	\
+    } while (0)
+
+#define MOD_ITERATE1_CHECK(ncheck, n, n1, i, i1, loop_body) do {	\
+	i = i1 = 0;							\
+	LOOP_WITH_INTERRUPT_CHECK(MOD_ITERATE1_CORE, ncheck, n,		\
+				  n1, i, i1, loop_body);		\
+    } while (0)
+
+#define MOD_ITERATE2_CORE(n, n1, n2, i, i1, i2, loop_body) do {	\
 	for (; i < n;							\
 	     i1 = (++i1 == n1) ? 0 : i1,				\
 		 i2 = (++i2 == n2) ? 0 : i2,				\
@@ -60,17 +84,21 @@
 		}							\
     } while (0)
 
-#define MOD_ITERATE(n, n1, n2, i, i1, i2, loop_body) do {	\
+#define MOD_ITERATE2(n, n1, n2, i, i1, i2, loop_body) do {	\
 	i = i1 = i2 = 0;					\
-	MOD_ITERATE_CORE(n, n1, n2, i, i1, i2, loop_body);	\
+	MOD_ITERATE2_CORE(n, n1, n2, i, i1, i2, loop_body);	\
     } while (0)
 
-#define MOD_ITERATE_CHECK(ncheck, n, n1, n2, i, i1, i2, loop_body) do {	\
+#define MOD_ITERATE2_CHECK(ncheck, n, n1, n2, i, i1, i2, loop_body) do {	\
 	i = i1 = i2 = 0;						\
-	LOOP_WITH_INTERRUPT_CHECK(MOD_ITERATE_CORE, ncheck, n,		\
+	LOOP_WITH_INTERRUPT_CHECK(MOD_ITERATE2_CORE, ncheck, n,		\
 				  n1, n2, i, i1, i2, loop_body);	\
     } while (0)
 
+#define MOD_ITERATE MOD_ITERATE2
+#define MOD_ITERATE_CORE MOD_ITERATE2_CORE
+#define MOD_ITERATE_CHECK MOD_ITERATE2_CHECK
+
 #define MOD_ITERATE3_CORE(n, n1, n2, n3, i, i1, i2, i3, loop_body) do {	\
 	for (; i < n;							\
 	     i1 = (++i1 == n1) ? 0 : i1,				\
diff --git a/src/include/R_ext/Lapack.h b/src/include/R_ext/Lapack.h
index eedb62a..06501e9 100644
--- a/src/include/R_ext/Lapack.h
+++ b/src/include/R_ext/Lapack.h
@@ -1,13 +1,17 @@
 /*
  *  R : A Computer Language for Statistical Data Analysis
- *  Copyright (C) 2003-14 The R Core Team.
+ *  Copyright (C) 2003-2016 The R Core Team.
  *  Copyright (C) 2008   The R Foundation
  *
- *  This program is free software; you can redistribute it and/or modify
+ *  This header file is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU Lesser General Public License as published by
  *  the Free Software Foundation; either version 2.1 of the License, or
  *  (at your option) any later version.
  *
+ *  This file is part of R. R is distributed under the terms of the
+ *  GNU General Public License, either Version 2, June 1991 or Version 3,
+ *  June 2007. See doc/COPYRIGHTS for details of the copyright status of R.
+ *
  *  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
@@ -15,7 +19,7 @@
  *
  *  You should have received a copy of the GNU Lesser General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  */
 
 /*
@@ -36,11 +40,6 @@
 #include <R_ext/Complex.h>	/* for Rcomplex */
 #include <R_ext/BLAS.h>
 
-/* The LAPACK version: might change after installation with
-   external LAPACK
-*/
-extern void F77_NAME(ilaver)(int *major, int *minor, int *patch);
-
 
 /*
   LAPACK function names are [dz]<name>(), where d denotes the real
@@ -52,6 +51,11 @@ extern void F77_NAME(ilaver)(int *major, int *minor, int *patch);
 extern "C" {
 #endif
 
+/* The LAPACK version: might change after installation with
+   external LAPACK
+*/
+extern void F77_NAME(ilaver)(int *major, int *minor, int *patch);
+
 // Never defined by R itself.
 #ifndef La_extern
 #define La_extern extern
@@ -244,18 +248,6 @@ F77_NAME(dgeevx)(const char* balanc, const char* jobvl, const char* jobvr,
 		 double* vr, const int* ldvr, int* ilo, int* ihi,
 		 double* scale, double* abnrm, double* rconde, double* rcondv,
 		 double* work, const int* lwork, int* iwork, int* info);
-/* DGEGV - compute for a pair of n-by-n real nonsymmetric */
-/* matrices A and B, the generalized eigenvalues (alphar +/- */
-/* alphai*i, beta);, and optionally, the left and/or right */
-/* generalized eigenvectors (VL and VR); */
-La_extern void
-F77_NAME(dgegv)(const char* jobvl, const char* jobvr,
-		const int* n, double* a, const int* lda,
-		double* b, const int* ldb,
-		double* alphar, double* alphai,
-		const double* beta, double* vl, const int* ldvl,
-		double* vr, const int* ldvr,
-		double* work, const int* lwork, int* info);
 /* DGEHD2 - reduce a real general matrix A to upper Hessenberg */
 /* form H by an orthogonal similarity transformation */
 La_extern void
@@ -315,11 +307,6 @@ La_extern void
 F77_NAME(dgeqp3)(const int* m, const int* n, double* a, const int* lda,
 		 int* jpvt, double* tau, double* work, const int* lwork,
 		 int* info);
-/* DGEQPF - compute a QR factorization with column pivoting of a */
-/* real M-by-N matrix A */
-La_extern void
-F77_NAME(dgeqpf)(const int* m, const int* n, double* a, const int* lda,
-		 int* jpvt, double* tau, double* work, int* info);
 /* DGEQR2 - compute a QR factorization of a real m by n matrix A */
 La_extern void
 F77_NAME(dgeqr2)(const int* m, const int* n, double* a, const int* lda,
@@ -459,20 +446,6 @@ F77_NAME(dggrqf)(const int* m, const int* p, const int* n,
 		 double* a, const int* lda, double* taua,
 		 double* b, const int* ldb, double* taub,
 		 double* work, const int* lwork, int* info);
-/* DGGSVD - compute the generalized singular value decomposition */
-/* (GSVD) of an M-by-N real matrix A and P-by-N real matrix B */
-La_extern void
-F77_NAME(dggsvd)(const char* jobu, const char* jobv, const char* jobq,
-		 const int* m, const int* n, const int* p,
-		 const int* k, const int* l,
-		 double* a, const int* lda,
-		 double* b, const int* ldb,
-		 const double* alpha, const double* beta,
-		 double* u, const int* ldu,
-		 double* v, const int* ldv,
-		 double* q, const int* ldq,
-		 double* work, int* iwork, int* info);
-
 
 //* Double precision General Tridiagonal matrices  -> DGT
 
@@ -1597,14 +1570,6 @@ F77_NAME(dtrtrs)(const char* uplo, const char* trans,
 		 const double* a, const int* lda,
 		 double* b, const int* ldb, int* info);
 
-/* DTZRQF - reduce the M-by-N ( M<=N ); real upper trapezoidal */
-/* matrix A to upper triangular form by means of orthogonal */
-/* transformations  */
-La_extern void
-F77_NAME(dtzrqf)(const int* m, const int* n,
-		 double* a, const int* lda,
-		 double* tau, int* info);
-
 
 
 //* Double precision utilities in Lapack 
@@ -1712,20 +1677,18 @@ F77_NAME(dlaed1)(const int* n, double* d, double* q, const int* ldq,
 La_extern void
 F77_NAME(dlaed2)(const int* k, const int* n, double* d,
 		 double* q, const int* ldq, int* indxq,
-		 double* rho, const int* cutpnt, double* z,
-		 double* dlamda, double* q2, const int *ldq2,
-		 int* indxc, int* w, int* indxp, int* indx,
+		 double* rho, double* z,
+		 double* dlamda, double* w, double* q2,
+		 int* indx, int* indxc, int* indxp,
 		 int* coltyp, int* info);
 /* DLAED3 - find the roots of the secular equation, as defined by */
 /* the values in double* d, W, and RHO, between KSTART and KSTOP */
 La_extern void
-F77_NAME(dlaed3)(const int* k, const int* kstart,
-		 const int *kstop, const int* n,
+F77_NAME(dlaed3)(const int* k, const int* n, const int* n1,
 		 double* d, double* q, const int* ldq,
-		 const double* rho, const int* cutpnt,
-		 double* dlamda, int* q2, const int* ldq2,
-		 int* indxc, int* ctot, double* w,
-		 double* s, const int* lds, int* info);
+		 const double* rho, double* dlamda, double* q2, 
+		 int* indx, int* ctot, double* w,
+		 double* s, int* info);
 /* DLAED4 - subroutine computes the I-th updated eigenvalue of a */
 /* symmetric rank-one modification to a diagonal matrix whose */
 /* elements are given in the array d, and that	 D(i); < D(j); for */
@@ -1870,14 +1833,6 @@ F77_NAME(dlahqr)(const int* wantt, const int* wantz, const int* n,
 		 double* H, const int* ldh, double* wr, double* wi,
 		 const int* iloz, const int* ihiz,
 		 double* z, const int* ldz, int* info);
-/* DLAHRD - reduce the first NB columns of a real general */
-/* n-by-(n-k+1); matrix A so that elements below the k-th */
-/* subdiagonal are zero */
-La_extern void
-F77_NAME(dlahrd)(const int* n, const int* k, const int* nb,
-		 double* a, const int* lda,
-		 double* tau, double* t, const int* ldt,
-		 double* y, const int* ldy);
 /* DLAIC1 - apply one step of incremental condition estimation in */
 /* its simplest version */
 La_extern void
@@ -2240,13 +2195,6 @@ F77_NAME(dlatrs)(const char* uplo, const char* trans,
 		 const char* diag, const char* normin,
 		 const int* n, const double* a, const int* lda,
 		 double* x, double* scale, double* cnorm, int* info);
-/* DLATZM - apply a Householder matrix generated by DTZRQF to a */
-/* matrix */
-La_extern void
-F77_NAME(dlatzm)(const char* side, const int* m, const int* n,
-		 const double* v, const int* incv,
-		 const double* tau, double* c1, double* c2,
-		 const int* ldc, double* work);
 /* DLAUU2 - compute the product U * U' or L' * const int* l, where the */
 /* triangular factor U or L is stored in the upper or lower */
 /* triangular part of the array A */
@@ -2374,30 +2322,17 @@ F77_NAME(zlantr)(const char *norm, const char *uplo, const char *diag,
 */
 
 La_extern void
-F77_NAME(dbdsdc)(char *uplo, char *compq, int *n, double *
-	d, double *e, double *u, int *ldu, double *vt,
+F77_NAME(dbdsdc)(const char *uplo, const char *compq, int *n,
+	double * d, double *e, double *u, int *ldu, double *vt,
 	int *ldvt, double *q, int *iq, double *work, int * iwork, int *info);
 
 La_extern void
-F77_NAME(dgegs)(char *jobvsl, char *jobvsr, int *n,
-	double *a, int *lda, double *b, int *ldb, double *
-	alphar, double *alphai, double *beta, double *vsl,
-	int *ldvsl, double *vsr, int *ldvsr, double *work,
-	int *lwork, int *info);
-
-La_extern void
 F77_NAME(dgelsd)(int *m, int *n, int *nrhs,
 	double *a, int *lda, double *b, int *ldb, double *
 	s, double *rcond, int *rank, double *work, int *lwork,
 	 int *iwork, int *info);
 
 La_extern void
-F77_NAME(dgelsx)(int *m, int *n, int *nrhs,
-	double *a, int *lda, double *b, int *ldb, int *
-	jpvt, double *rcond, int *rank, double *work, int *
-	info);
-
-La_extern void
 F77_NAME(dgesc2)(int *n, double *a, int *lda,
 	double *rhs, int *ipiv, int *jpiv, double *scale);
 
@@ -2445,14 +2380,6 @@ F77_NAME(dggevx)(char *balanc, char *jobvl, char *jobvr, char *
 	bwork, int *info);
 
 La_extern void
-F77_NAME(dggsvp)(char *jobu, char *jobv, char *jobq, int *m,
-	int *p, int *n, double *a, int *lda, double *b,
-	int *ldb, double *tola, double *tolb, int *k, int
-	*l, double *u, int *ldu, double *v, int *ldv,
-	double *q, int *ldq, int *iwork, double *tau,
-	double *work, int *info);
-
-La_extern void
 F77_NAME(dgtts2)(int *itrans, int *n, int *nrhs,
 	double *dl, double *d, double *du, double *du2,
 	int *ipiv, double *b, int *ldb);
@@ -2791,25 +2718,25 @@ F77_NAME(dpstrf)(const char* uplo, const int* n,
 
 
 La_extern int
-F77_NAME(lsame)(char *ca, char *cb);
+F77_NAME(lsame)(const char *ca, const char *cb);
 
 La_extern void
-F77_NAME(zbdsqr)(char *uplo, int *n, int *ncvt, int *
+F77_NAME(zbdsqr)(const char *uplo, int *n, int *ncvt, int *
 	nru, int *ncc, double *d, double *e, Rcomplex *vt,
 	int *ldvt, Rcomplex *u, int *ldu, Rcomplex *c,
 	int *ldc, double *rwork, int *info);
 
 La_extern void
-F77_NAME(zdrot)(int *n, Rcomplex *cx, int *incx,
-	Rcomplex *cy, int *incy, double *c, double *s);
+F77_NAME(zdrot)(const int *n, const Rcomplex *cx, const int *incx,
+	Rcomplex *cy, const int *incy, const double *c, const double *s);
 
 La_extern void
-F77_NAME(zgebak)(char *job, char *side, int *n, int *ilo,
+F77_NAME(zgebak)(const char *job, const char *side, int *n, int *ilo,
 	int *ihi, double *scale, int *m, Rcomplex *v,
 	int *ldv, int *info);
 
 La_extern void
-F77_NAME(zgebal)(char *job, int *n, Rcomplex *a, int
+F77_NAME(zgebal)(const char *job, int *n, Rcomplex *a, int
 	*lda, int *ilo, int *ihi, double *scale, int *info);
 
 La_extern void
@@ -2859,22 +2786,22 @@ F77_NAME(zgetrf)(int *m, int *n, Rcomplex *a,
 	int *lda, int *ipiv, int *info);
 
 La_extern void
-F77_NAME(zgetrs)(char *trans, int *n, int *nrhs,
+F77_NAME(zgetrs)(const char *trans, int *n, int *nrhs,
 	Rcomplex *a, int *lda, int *ipiv, Rcomplex *b,
 	int *ldb, int *info);
 
 
 La_extern void
-F77_NAME(zhetd2)(char *uplo, int *n, Rcomplex *a, int *lda, double *d,
+F77_NAME(zhetd2)(const char *uplo, int *n, Rcomplex *a, int *lda, double *d,
 		 double *e, Rcomplex *tau, int *info);
 
 La_extern void
-F77_NAME(zhetrd)(char *uplo, int *n, Rcomplex *a,
+F77_NAME(zhetrd)(const char *uplo, int *n, Rcomplex *a,
 	int *lda, double *d, double *e, Rcomplex *tau,
 	Rcomplex *work, int *lwork, int *info);
 
 La_extern void
-F77_NAME(zhseqr)(char *job, char *compz, int *n, int *ilo,
+F77_NAME(zhseqr)(const char *job, const char *compz, int *n, int *ilo,
 	 int *ihi, Rcomplex *h, int *ldh, Rcomplex *w,
 	Rcomplex *z, int *ldz, Rcomplex *work, int *lwork,
 	 int *info);
@@ -2889,7 +2816,7 @@ La_extern void
 F77_NAME(zlacgv)(int *n, Rcomplex *x, int *incx);
 
 La_extern void
-F77_NAME(zlacpy)(char *uplo, int *m, int *n,
+F77_NAME(zlacpy)(const char *uplo, int *m, int *n,
 	Rcomplex *a, int *lda, Rcomplex *b, int *ldb);
 
 La_extern void
@@ -2898,21 +2825,16 @@ F77_NAME(zlahqr)(int *wantt, int *wantz, int *n,
 	Rcomplex *w, int *iloz, int *ihiz, Rcomplex *z,
 	int *ldz, int *info);
 
-La_extern void
-F77_NAME(zlahrd)(int *n, int *k, int *nb,
-	Rcomplex *a, int *lda, Rcomplex *tau, Rcomplex *t,
-	int *ldt, Rcomplex *y, int *ldy);
-
 La_extern double
-F77_NAME(zlange)(char *norm, int *m, int *n, Rcomplex *a, int *lda,
+F77_NAME(zlange)(const char *norm, int *m, int *n, Rcomplex *a, int *lda,
 		 double *work);
 
 La_extern double
-F77_NAME(zlanhe)(char *norm,  char *uplo, int *n, Rcomplex *a,
+F77_NAME(zlanhe)(const char *norm,  const char *uplo, int *n, Rcomplex *a,
 		 int *lda, double *work);
 
 La_extern double
-F77_NAME(zlanhs)(char *norm, int *n, Rcomplex *a, int *lda, double *work);
+F77_NAME(zlanhs)(const char *norm, int *n, Rcomplex *a, int *lda, double *work);
 
 
 La_extern void
@@ -2927,14 +2849,15 @@ F77_NAME(zlaqps)(int *m, int *n, int *offset, int
 	auxv, Rcomplex *f, int *ldf);
 
 La_extern void
-F77_NAME(zlarf)(char *side, int *m, int *n, Rcomplex
+F77_NAME(zlarf)(const char *side, int *m, int *n, Rcomplex
 	*v, int *incv, Rcomplex *tau, Rcomplex *c, int *
 	ldc, Rcomplex *work);
 
 La_extern void
-F77_NAME(zlarfb)(char *side, char *trans, char *direct, char *
-	storev, int *m, int *n, int *k, Rcomplex *v, int
-	*ldv, Rcomplex *t, int *ldt, Rcomplex *c, int *
+F77_NAME(zlarfb)(const char *side, const char *trans, 
+	const char *direct, const char * storev,
+        int *m, int *n, int *k, Rcomplex *v, int *ldv,
+	Rcomplex *t, int *ldt, Rcomplex *c, int *
 	ldc, Rcomplex *work, int *ldwork);
 
 La_extern void
@@ -2942,29 +2865,28 @@ F77_NAME(zlarfg)(int *n, Rcomplex *alpha, Rcomplex *
 	x, int *incx, Rcomplex *tau);
 
 La_extern void
-F77_NAME(zlarft)(char *direct, char *storev, int *n, int *
+F77_NAME(zlarft)(const char *direct, const char *storev, int *n, int *
 	k, Rcomplex *v, int *ldv, Rcomplex *tau, Rcomplex *
 	t, int *ldt);
 
 La_extern void
-F77_NAME(zlarfx)(char *side, int *m, int *n,
+F77_NAME(zlarfx)(const char *side, int *m, int *n,
 	Rcomplex *v, Rcomplex *tau, Rcomplex *c, int *
 	ldc, Rcomplex *work);
 
 La_extern void
-F77_NAME(zlascl)(char *type, int *kl, int *ku,
+F77_NAME(zlascl)(const char *type, int *kl, int *ku,
 	double *cfrom, double *cto, int *m, int *n,
 	Rcomplex *a, int *lda, int *info);
 
 La_extern void
-F77_NAME(zlaset)(char *uplo, int *m, int *n,
+F77_NAME(zlaset)(const char *uplo, int *m, int *n,
 	Rcomplex *alpha, Rcomplex *beta, Rcomplex *a, int *
 	lda);
 
 La_extern void
-F77_NAME(zlasr)(char *side, char *pivot, char *direct, int *m,
-	 int *n, double *c, double *s, Rcomplex *a,
-	int *lda);
+F77_NAME(zlasr)(const char *side, const char *pivot, const char *direct,
+        int *m, int *n, double *c, double *s, Rcomplex *a, int *lda);
 
 La_extern void
 F77_NAME(zlassq)(int *n, Rcomplex *x, int *incx,
@@ -2975,17 +2897,18 @@ F77_NAME(zlaswp)(int *n, Rcomplex *a, int *lda,
 	int *k1, int *k2, int *ipiv, int *incx);
 
 La_extern void
-F77_NAME(zlatrd)(char *uplo, int *n, int *nb,
+F77_NAME(zlatrd)(const char *uplo, int *n, int *nb,
 	Rcomplex *a, int *lda, double *e, Rcomplex *tau,
 	Rcomplex *w, int *ldw);
 
 La_extern void
-F77_NAME(zlatrs)(char *uplo, char *trans, char *diag, char *
-	normin, int *n, Rcomplex *a, int *lda, Rcomplex *x,
+F77_NAME(zlatrs)(const char *uplo, const char *trans, 
+	const char *diag, const char * normin,
+	int *n, Rcomplex *a, int *lda, Rcomplex *x,
 	double *scale, double *cnorm, int *info);
 
 La_extern void
-F77_NAME(zsteqr)(char *compz, int *n, double *d,
+F77_NAME(zsteqr)(const char *compz, int *n, double *d,
 	double *e, Rcomplex *z, int *ldz, double *work,
 	int *info);
 
@@ -2998,7 +2921,7 @@ F77_NAME(ztrcon)(const char *norm, const char *uplo, const char *diag,
 		 double *rcond, Rcomplex *work, double *rwork, int *info);
 
 La_extern void
-F77_NAME(ztrevc)(char *side, char *howmny, int *select,
+F77_NAME(ztrevc)(const char *side, const char *howmny, int *select,
 	int *n, Rcomplex *t, int *ldt, Rcomplex *vl,
 	int *ldvl, Rcomplex *vr, int *ldvr, int *mm, int
 	*m, Rcomplex *work, double *rwork, int *info);
@@ -3014,7 +2937,7 @@ F77_NAME(zung2r)(int *m, int *n, int *k,
 	work, int *info);
 
 La_extern void
-F77_NAME(zungbr)(char *vect, int *m, int *n, int *k,
+F77_NAME(zungbr)(const char *vect, int *m, int *n, int *k,
 	Rcomplex *a, int *lda, Rcomplex *tau, Rcomplex *
 	work, int *lwork, int *info);
 
@@ -3054,28 +2977,28 @@ F77_NAME(zungrq)(int *m, int *n, int *k,
 	work, int *lwork, int *info);
 
 La_extern void
-F77_NAME(zungtr)(char *uplo, int *n, Rcomplex *a,
+F77_NAME(zungtr)(const char *uplo, int *n, Rcomplex *a,
 	int *lda, Rcomplex *tau, Rcomplex *work, int *lwork,
 	 int *info);
 
 La_extern void
-F77_NAME(zunm2r)(char *side, char *trans, int *m, int *n,
+F77_NAME(zunm2r)(const char *side, const char *trans, int *m, int *n,
 	int *k, Rcomplex *a, int *lda, Rcomplex *tau,
 	Rcomplex *c, int *ldc, Rcomplex *work, int *info);
 
 La_extern void
-F77_NAME(zunmbr)(char *vect, char *side, char *trans, int *m,
+F77_NAME(zunmbr)(const char *vect, const char *side, const char *trans, int *m,
 	int *n, int *k, Rcomplex *a, int *lda, Rcomplex
 	*tau, Rcomplex *c, int *ldc, Rcomplex *work, int *
 	lwork, int *info);
 
 La_extern void
-F77_NAME(zunml2)(char *side, char *trans, int *m, int *n,
+F77_NAME(zunml2)(const char *side, const char *trans, int *m, int *n,
 	int *k, Rcomplex *a, int *lda, Rcomplex *tau,
 	Rcomplex *c, int *ldc, Rcomplex *work, int *info);
 
 La_extern void
-F77_NAME(zunmlq)(char *side, char *trans, int *m, int *n,
+F77_NAME(zunmlq)(const char *side, const char *trans, int *m, int *n,
 	int *k, Rcomplex *a, int *lda, Rcomplex *tau,
 	Rcomplex *c, int *ldc, Rcomplex *work, int *lwork,
 	 int *info);
@@ -3098,6 +3021,100 @@ F77_NAME(zgelsd)(int *m, int *n, int *nrhs,
         double *rcond, int *rank, 
         Rcomplex *work, int *lwork, double *rwork, int *iwork, int *info);
 
+/* =========================== DEPRECATED ==============================
+
+   Routines below were deprecated in LAPACK 3.6.0, and are not
+   included in a default build of LAPACK.
+
+   Currently dgegv, dgeqpf, dggsvd and dggsvp are included in R, but
+   that may change in future.
+ */
+
+/* DGEGV - compute for a pair of n-by-n real nonsymmetric */
+/* matrices A and B, the generalized eigenvalues (alphar +/- */
+/* alphai*i, beta);, and optionally, the left and/or right */
+/* generalized eigenvectors (VL and VR); */
+La_extern void
+F77_NAME(dgegv)(const char* jobvl, const char* jobvr,
+		const int* n, double* a, const int* lda,
+		double* b, const int* ldb,
+		double* alphar, double* alphai,
+		const double* beta, double* vl, const int* ldvl,
+		double* vr, const int* ldvr,
+		double* work, const int* lwork, int* info);
+
+/* DGEQPF - compute a QR factorization with column pivoting of a */
+/* real M-by-N matrix A */
+La_extern void
+F77_NAME(dgeqpf)(const int* m, const int* n, double* a, const int* lda,
+		 int* jpvt, double* tau, double* work, int* info);
+
+/* DGGSVD - compute the generalized singular value decomposition */
+/* (GSVD) of an M-by-N real matrix A and P-by-N real matrix B */
+La_extern void
+F77_NAME(dggsvd)(const char* jobu, const char* jobv, const char* jobq,
+		 const int* m, const int* n, const int* p,
+		 const int* k, const int* l,
+		 double* a, const int* lda,
+		 double* b, const int* ldb,
+		 const double* alpha, const double* beta,
+		 double* u, const int* ldu,
+		 double* v, const int* ldv,
+		 double* q, const int* ldq,
+		 double* work, int* iwork, int* info);
+
+/* DTZRQF - reduce the M-by-N ( M<=N ); real upper trapezoidal */
+/* matrix A to upper triangular form by means of orthogonal */
+/* transformations  */
+La_extern void
+F77_NAME(dtzrqf)(const int* m, const int* n,
+		 double* a, const int* lda,
+		 double* tau, int* info);
+
+/* DLAHRD - reduce the first NB columns of a real general */
+/* n-by-(n-k+1); matrix A so that elements below the k-th */
+/* subdiagonal are zero */
+La_extern void
+F77_NAME(dlahrd)(const int* n, const int* k, const int* nb,
+		 double* a, const int* lda,
+		 double* tau, double* t, const int* ldt,
+		 double* y, const int* ldy);
+
+/* DLATZM - apply a Householder matrix generated by DTZRQF to a */
+/* matrix */
+La_extern void
+F77_NAME(dlatzm)(const char* side, const int* m, const int* n,
+		 const double* v, const int* incv,
+		 const double* tau, double* c1, double* c2,
+		 const int* ldc, double* work);
+
+La_extern void
+F77_NAME(dgegs)(char *jobvsl, char *jobvsr, int *n,
+	double *a, int *lda, double *b, int *ldb, double *
+	alphar, double *alphai, double *beta, double *vsl,
+	int *ldvsl, double *vsr, int *ldvsr, double *work,
+	int *lwork, int *info);
+
+La_extern void
+F77_NAME(dgelsx)(int *m, int *n, int *nrhs,
+	double *a, int *lda, double *b, int *ldb, int *
+	jpvt, double *rcond, int *rank, double *work, int *
+	info);
+
+La_extern void
+F77_NAME(dggsvp)(char *jobu, char *jobv, char *jobq, int *m,
+	int *p, int *n, double *a, int *lda, double *b,
+	int *ldb, double *tola, double *tolb, int *k, int
+	*l, double *u, int *ldu, double *v, int *ldv,
+	double *q, int *ldq, int *iwork, double *tau,
+	double *work, int *info);
+
+La_extern void
+F77_NAME(zlahrd)(int *n, int *k, int *nb,
+	Rcomplex *a, int *lda, Rcomplex *tau, Rcomplex *t,
+	int *ldt, Rcomplex *y, int *ldy);
+
+
 #ifdef	__cplusplus
 }
 #endif
diff --git a/src/include/R_ext/Linpack.h b/src/include/R_ext/Linpack.h
index f26b325..1a0ef55 100644
--- a/src/include/R_ext/Linpack.h
+++ b/src/include/R_ext/Linpack.h
@@ -1,13 +1,17 @@
 /*
  *  R : A Computer Language for Statistical Data Analysis
  *  Copyright (C) 1997        Robert Gentleman and Ross Ihaka
- *  Copyright (C) 1999-2002   The R Core Team.
+ *  Copyright (C) 1999-2015   The R Core Team.
  *
- *  This program is free software; you can redistribute it and/or modify
+ *  This header file is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU Lesser General Public License as published by
  *  the Free Software Foundation; either version 2.1 of the License, or
  *  (at your option) any later version.
  *
+ *  This file is part of R. R is distributed under the terms of the
+ *  GNU General Public License, either Version 2, June 1991 or Version 3,
+ *  June 2007. See doc/COPYRIGHTS for details of the copyright status of R.
+ *
  *  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
@@ -15,7 +19,7 @@
  *
  *  You should have received a copy of the GNU Lesser General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  */
 
 /* 
@@ -35,7 +39,7 @@
 extern "C" {
 #endif
 
-	/* Double Precision Linpack */
+	/* Double Precision LINPACK */
 
 extern void F77_NAME(dpbfa)(double*, int*, int*, int*, int*);
 extern void F77_NAME(dpbsl)(double*, int*, int*, int*, double*);
diff --git a/src/include/R_ext/MathThreads.h b/src/include/R_ext/MathThreads.h
index c98120d..9aecef8 100644
--- a/src/include/R_ext/MathThreads.h
+++ b/src/include/R_ext/MathThreads.h
@@ -2,11 +2,15 @@
  *  R : A Computer Language for Statistical Data Analysis
  *  Copyright (C) 2000-2014 The R Core Team.
  *
- *  This program is free software; you can redistribute it and/or modify
+ *  This header file is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU Lesser General Public License as published by
  *  the Free Software Foundation; either version 2.1 of the License, or
  *  (at your option) any later version.
  *
+ *  This file is part of R. R is distributed under the terms of the
+ *  GNU General Public License, either Version 2, June 1991 or Version 3,
+ *  June 2007. See doc/COPYRIGHTS for details of the copyright status of R.
+ *
  *  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
@@ -14,7 +18,7 @@
  *
  *  You should have received a copy of the GNU Lesser General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  */
 
 /*
diff --git a/src/include/R_ext/Memory.h b/src/include/R_ext/Memory.h
index 4b3e19e..82dccf6 100644
--- a/src/include/R_ext/Memory.h
+++ b/src/include/R_ext/Memory.h
@@ -1,12 +1,16 @@
 /*
  *  R : A Computer Language for Statistical Data Analysis
- *  Copyright (C) 1998-2007  The R Core Team
+ *  Copyright (C) 1998-2016  The R Core Team
  *
- *  This program is free software; you can redistribute it and/or modify
+ *  This header file is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU Lesser General Public License as published by
  *  the Free Software Foundation; either version 2.1 of the License, or
  *  (at your option) any later version.
  *
+ *  This file is part of R. R is distributed under the terms of the
+ *  GNU General Public License, either Version 2, June 1991 or Version 3,
+ *  June 2007. See doc/COPYRIGHTS for details of the copyright status of R.
+ *
  *  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
@@ -14,7 +18,7 @@
  *
  *  You should have received a copy of the GNU Lesser General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  *
  *
  * Memory Allocation (garbage collected) --- INCLUDING S compatibility ---
@@ -25,8 +29,12 @@
 #ifndef R_EXT_MEMORY_H_
 #define R_EXT_MEMORY_H_
 
-#ifndef NO_C_HEADERS
+#if defined(__cplusplus) && !defined(DO_NOT_USE_CXX_HEADERS)
+# include <cstddef>
+# define R_SIZE_T std::size_t
+#else
 # include <stddef.h> /* for size_t */
+# define R_SIZE_T size_t
 #endif
 
 #ifdef  __cplusplus
@@ -39,7 +47,8 @@ void	vmaxset(const void *);
 void	R_gc(void);
 int	R_gc_running();
 
-char*	R_alloc(size_t, int);
+char*	R_alloc(R_SIZE_T, int);
+long double *R_allocLD(R_SIZE_T nelem);
 char*	S_alloc(long, int);
 char*	S_realloc(char *, long, long, int);
 
diff --git a/src/include/R_ext/Parse.h b/src/include/R_ext/Parse.h
index a1d8cc8..25e6fbe 100644
--- a/src/include/R_ext/Parse.h
+++ b/src/include/R_ext/Parse.h
@@ -14,7 +14,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  */
 
 /* NOTE:
diff --git a/src/include/R_ext/Print.h b/src/include/R_ext/Print.h
index 7beeaf1..4e70c92 100644
--- a/src/include/R_ext/Print.h
+++ b/src/include/R_ext/Print.h
@@ -1,12 +1,16 @@
 /*
  *  R : A Computer Language for Statistical Data Analysis
- *  Copyright (C) 1998-2010    The R Core Team
+ *  Copyright (C) 1998-2016    The R Core Team
  *
- *  This program is free software; you can redistribute it and/or modify
+ *  This header file is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU Lesser General Public License as published by
  *  the Free Software Foundation; either version 2.1 of the License, or
  *  (at your option) any later version.
  *
+ *  This file is part of R. R is distributed under the terms of the
+ *  GNU General Public License, either Version 2, June 1991 or Version 3,
+ *  June 2007. See doc/COPYRIGHTS for details of the copyright status of R.
+ *
  *  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
@@ -14,7 +18,7 @@
  *
  *  You should have received a copy of the GNU Lesser General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  */
 
 /* Included by R.h: API */
@@ -24,23 +28,22 @@
 
 #ifdef  __cplusplus
 /* If the vprintf interface is defined at all in C++ it may only be
-   defined in namespace std. */
+   defined in namespace std.  It is part of the C++11 standard. */
 # ifdef R_USE_C99_IN_CXX
 #  include <cstdarg>
-#  ifdef __SUNPRO_CC
-using _STLP_VENDOR_CSTD::va_list;
-#  endif
+#  define R_VA_LIST std::va_list
 # endif
 extern "C" {
 #else
 # include <stdarg.h>
+# define R_VA_LIST va_list
 #endif
 
 void Rprintf(const char *, ...);
 void REprintf(const char *, ...);
 #if !defined(__cplusplus) || defined R_USE_C99_IN_CXX
-void Rvprintf(const char *, va_list);
-void REvprintf(const char *, va_list);
+void Rvprintf(const char *, R_VA_LIST);
+void REvprintf(const char *, R_VA_LIST);
 #endif
 
 #ifdef  __cplusplus
diff --git a/src/include/R_ext/PrtUtil.h b/src/include/R_ext/PrtUtil.h
index 78dadd5..5aba50b 100644
--- a/src/include/R_ext/PrtUtil.h
+++ b/src/include/R_ext/PrtUtil.h
@@ -1,12 +1,16 @@
 /*
  *  R : A Computer Language for Statistical Data Analysis
- *  Copyright (C) 1998-2012    The R Core Team
+ *  Copyright (C) 1998-2014    The R Core Team
  *
- *  This program is free software; you can redistribute it and/or modify
+ *  This header file is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU Lesser General Public License as published by
  *  the Free Software Foundation; either version 2.1 of the License, or
  *  (at your option) any later version.
  *
+ *  This file is part of R. R is distributed under the terms of the
+ *  GNU General Public License, either Version 2, June 1991 or Version 3,
+ *  June 2007. See doc/COPYRIGHTS for details of the copyright status of R.
+ *
  *  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
@@ -14,7 +18,7 @@
  *
  *  You should have received a copy of the GNU Lesser General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  */
 
 /*
@@ -33,6 +37,7 @@
 #define EncodeLogical      Rf_EncodeLogical
 #define EncodeInteger      Rf_EncodeInteger
 #define EncodeReal         Rf_EncodeReal
+#define EncodeReal0        Rf_EncodeReal0
 #define EncodeComplex      Rf_EncodeComplex
 #define VectorIndex        Rf_VectorIndex
 #define printIntegerVector Rf_printIntegerVector
@@ -52,8 +57,12 @@ void formatComplex(Rcomplex *, R_xlen_t, int *, int *, int *, int *, int *, int
 /* Formating of values */
 const char *EncodeLogical(int, int);
 const char *EncodeInteger(int, int);
+const char *EncodeReal0(double, int, int, int, const char *);
+const char *EncodeComplex(Rcomplex, int, int, int, int, int, int, const char *);
+
+/* Legacy, misused by packages RGtk2 and qtbase */
 const char *EncodeReal(double, int, int, int, char);
-const char *EncodeComplex(Rcomplex, int, int, int, int, int, int, char);
+
 
 /* Printing */
 int	IndexWidth(R_xlen_t);
diff --git a/src/include/R_ext/QuartzDevice.h b/src/include/R_ext/QuartzDevice.h
index e256e2d..c15382d 100644
--- a/src/include/R_ext/QuartzDevice.h
+++ b/src/include/R_ext/QuartzDevice.h
@@ -1,6 +1,6 @@
 /*
  *  R : A Computer Language for Statistical Data Analysis
- *  Copyright (C) 2007-12  The R Core Team
+ *  Copyright (C) 2007-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
@@ -14,14 +14,14 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  *
  *---------------------------------------------------------------------
  *  This header file constitutes the (unofficial) API to the Quartz
  *  device. Being unofficial, the API may change at any point without
  *  warning.
  *
- *  Quartz is a general device-independent way of drawing in Mac OS X,
+ *  Quartz is a general device-independent way of drawing in macOS,
  *  therefore the Quartz device modularizes the actual drawing target
  *  implementation into separate modules (e.g. Carbon and Cocoa for
  *  on-screen display and PDF, Bitmap for off-screen drawing). The API
@@ -84,6 +84,8 @@
  *    fn->Create(dd, &backend), return the result
  */
 
+/* Unix-only header */
+
 #ifndef R_EXT_QUARTZDEVICE_H_
 #define R_EXT_QUARTZDEVICE_H_
 
diff --git a/src/include/R_ext/R-ftp-http.h b/src/include/R_ext/R-ftp-http.h
index 12ec160..06720eb 100644
--- a/src/include/R_ext/R-ftp-http.h
+++ b/src/include/R_ext/R-ftp-http.h
@@ -1,12 +1,16 @@
 /*
  *  R : A Computer Language for Statistical Data Analysis
- *  Copyright (C) 2001-2014 The R Core Team.
+ *  Copyright (C) 2001-2016 The R Core Team.
  *
- *  This program is free software; you can redistribute it and/or modify
+ *  This header file is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU Lesser General Public License as published by
  *  the Free Software Foundation; either version 2.1 of the License, or
  *  (at your option) any later version.
  *
+ *  This file is part of R. R is distributed under the terms of the
+ *  GNU General Public License, either Version 2, June 1991 or Version 3,
+ *  June 2007. See doc/COPYRIGHTS for details of the copyright status of R.
+ *
  *  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
@@ -14,7 +18,7 @@
  *
  *  You should have received a copy of the GNU Lesser General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  */
 
 /* Advertized entry points, for that part of libxml included in
@@ -24,6 +28,18 @@
 #ifndef R_FTP_HTTP_H_
 #define R_FTP_HTTP_H_
 
+/*
+  allow for 'large' files (>= 2GB) on 32-bit systems, where supported.
+*/
+/* required by C99/C11 */
+#ifdef __cplusplus
+# include <cstdint>
+#else
+# include <stdint.h>
+#endif
+
+typedef int_fast64_t DLsize_t; // used for download lengths and sizes
+
 #ifdef __cplusplus
 extern "C" {
 #endif
@@ -41,7 +57,7 @@ int	RxmlNanoHTTPRead(void *ctx, void *dest, int len);
 void	RxmlNanoHTTPClose(void *ctx);
 int 	RxmlNanoHTTPReturnCode(void *ctx);
 char * 	RxmlNanoHTTPStatusMsg(void *ctx);
-ssize_t RxmlNanoHTTPContentLength(void *ctx);
+DLsize_t RxmlNanoHTTPContentLength(void *ctx);
 char *	RxmlNanoHTTPContentType(void *ctx);
 void	RxmlNanoHTTPTimeout(int delay);
 
@@ -49,7 +65,7 @@ void *	RxmlNanoFTPOpen(const char *URL);
 int	RxmlNanoFTPRead(void *ctx, void *dest, int len);
 int	RxmlNanoFTPClose(void *ctx);
 void	RxmlNanoFTPTimeout(int delay);
-ssize_t RxmlNanoFTPContentLength(void *ctx);
+DLsize_t RxmlNanoFTPContentLength(void *ctx);
 
 void    RxmlMessage(int level, const char *format, ...);
 
diff --git a/src/include/R_ext/RS.h b/src/include/R_ext/RS.h
index 9478848..4fc82ff 100644
--- a/src/include/R_ext/RS.h
+++ b/src/include/R_ext/RS.h
@@ -1,11 +1,15 @@
 /*
  *  R : A Computer Language for Statistical Data Analysis
- *  Copyright (C) 1999-2007 The R Core Team.
+ *  Copyright (C) 1999-2016 The R Core Team.
  *
- *  This program is free software; you can redistribute it and/or modify
+ *  This header file is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU Lesser General Public License as published by
  *  the Free Software Foundation; either version 2.1 of the License, or
  *  (at your option) any later version.
+ * 
+ *  This file is part of R. R is distributed under the terms of the
+ *  GNU General Public License, either Version 2, June 1991 or Version 3,
+ *  June 2007. See doc/COPYRIGHTS for details of the copyright status of R.
  *
  *  This program is distributed in the hope that it will be useful,
  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -14,7 +18,7 @@
  *
  *  You should have received a copy of the GNU Lesser General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  */
 
 /* Included by R.h: API */
@@ -22,8 +26,14 @@
 #ifndef R_RS_H
 #define R_RS_H
 
-#ifndef NO_C_HEADERS
+#if defined(__cplusplus) && !defined(DO_NOT_USE_CXX_HEADERS)
+# include <cstring>
+# include <cstddef>
+# define R_SIZE_T std::size_t
+#else
 # include <string.h>		/* for memcpy, memset */
+# include <stddef.h> /* for size_t */
+# define R_SIZE_T size_t
 #endif
 
 #include <Rconfig.h>		/* for F77_APPEND_UNDERSCORE */
@@ -53,26 +63,26 @@ extern "C" {
 
 /* S Like Memory Management */
 
-extern void *R_chk_calloc(size_t, size_t);
-extern void *R_chk_realloc(void *, size_t);
+extern void *R_chk_calloc(R_SIZE_T, R_SIZE_T);
+extern void *R_chk_realloc(void *, R_SIZE_T);
 extern void R_chk_free(void *);
 
 #ifndef STRICT_R_HEADERS
 /* S-PLUS 3.x but not 5.x NULLs the pointer in the following */
-#define Calloc(n, t)   (t *) R_chk_calloc( (size_t) (n), sizeof(t) )
-#define Realloc(p,n,t) (t *) R_chk_realloc( (void *)(p), (size_t)((n) * sizeof(t)) )
+#define Calloc(n, t)   (t *) R_chk_calloc( (R_SIZE_T) (n), sizeof(t) )
+#define Realloc(p,n,t) (t *) R_chk_realloc( (void *)(p), (R_SIZE_T)((n) * sizeof(t)) )
 #define Free(p)        (R_chk_free( (void *)(p) ), (p) = NULL)
 #endif
-#define R_Calloc(n, t)   (t *) R_chk_calloc( (size_t) (n), sizeof(t) )
-#define R_Realloc(p,n,t) (t *) R_chk_realloc( (void *)(p), (size_t)((n) * sizeof(t)) )
+#define R_Calloc(n, t)   (t *) R_chk_calloc( (R_SIZE_T) (n), sizeof(t) )
+#define R_Realloc(p,n,t) (t *) R_chk_realloc( (void *)(p), (R_SIZE_T)((n) * sizeof(t)) )
 #define R_Free(p)      (R_chk_free( (void *)(p) ), (p) = NULL)
 
-#define Memcpy(p,q,n)  memcpy( p, q, (size_t)(n) * sizeof(*p) )
+#define Memcpy(p,q,n)  memcpy( p, q, (R_SIZE_T)(n) * sizeof(*p) )
 
 /* added for 3.0.0 */
-#define Memzero(p,n)  memset(p, 0, (size_t)(n) * sizeof(*p))
+#define Memzero(p,n)  memset(p, 0, (R_SIZE_T)(n) * sizeof(*p))
 
-#define CallocCharBuf(n) (char *) R_chk_calloc((size_t) ((n)+1), sizeof(char))
+#define CallocCharBuf(n) (char *) R_chk_calloc((R_SIZE_T) ((n)+1), sizeof(char))
 
 /* S Like Fortran Interface */
 /* These may not be adequate everywhere. Convex had _ prepending common
diff --git a/src/include/R_ext/RStartup.h b/src/include/R_ext/RStartup.h
index 5b89e7f..d0ac7c0 100644
--- a/src/include/R_ext/RStartup.h
+++ b/src/include/R_ext/RStartup.h
@@ -1,6 +1,6 @@
 /*
  *  R : A Computer Language for Statistical Data Analysis
- *  Copyright (C) 1999-2010  The R Core Team
+ *  Copyright (C) 1999-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
@@ -14,7 +14,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  */
 
 /*
@@ -26,6 +26,14 @@
 #ifndef R_EXT_RSTARTUP_H_
 #define R_EXT_RSTARTUP_H_
 
+#if defined(__cplusplus) && !defined(DO_NOT_USE_CXX_HEADERS)
+# include <cstddef>
+# define R_SIZE_T std::size_t
+#else
+# include <stddef.h> /* for size_t */
+# define R_SIZE_T size_t
+#endif
+
 #include <R_ext/Boolean.h>	/* TRUE/FALSE */
 
 #ifdef __cplusplus
@@ -67,11 +75,11 @@ typedef struct
     Rboolean DebugInitFile;
     SA_TYPE RestoreAction;
     SA_TYPE SaveAction;
-    size_t vsize;
-    size_t nsize;
-    size_t max_vsize;
-    size_t max_nsize;
-    size_t ppsize;
+    R_SIZE_T vsize;
+    R_SIZE_T nsize;
+    R_SIZE_T max_vsize;
+    R_SIZE_T max_nsize;
+    R_SIZE_T ppsize;
     int NoRenviron;
 
 #ifdef Win32
diff --git a/src/include/R_ext/Rallocators.h b/src/include/R_ext/Rallocators.h
index ad1677f..f1742cb 100644
--- a/src/include/R_ext/Rallocators.h
+++ b/src/include/R_ext/Rallocators.h
@@ -1,12 +1,16 @@
 /*
  *  R : A Computer Language for Statistical Data Analysis
- *  Copyright (C) 2014  The R Core Team
+ *  Copyright (C) 2014-2016  The R Core Team
  *
- *  This program is free software; you can redistribute it and/or modify
+ *  This header file is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU Lesser General Public License as published by
  *  the Free Software Foundation; either version 2.1 of the License, or
  *  (at your option) any later version.
  *
+ *  This file is part of R. R is distributed under the terms of the
+ *  GNU General Public License, either Version 2, June 1991 or Version 3,
+ *  June 2007. See doc/COPYRIGHTS for details of the copyright status of R.
+ *
  *  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
@@ -14,7 +18,7 @@
  *
  *  You should have received a copy of the GNU Lesser General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  *
  *
  *  Definition of the R_allocator_t structure for custom allocators
@@ -24,7 +28,9 @@
 #ifndef R_EXT_RALLOCATORS_H_
 #define R_EXT_RALLOCATORS_H_
 
-#ifndef NO_C_HEADERS
+#if defined(__cplusplus) && !defined(DO_NOT_USE_CXX_HEADERS)
+# include <cstddef>
+#else
 # include <stddef.h> /* for size_t */
 #endif
 
diff --git a/src/include/R_ext/Random.h b/src/include/R_ext/Random.h
index 0a264a3..3b9ad46 100644
--- a/src/include/R_ext/Random.h
+++ b/src/include/R_ext/Random.h
@@ -1,12 +1,16 @@
 /*
  *  R : A Computer Language for Statistical Data Analysis
- *  Copyright (C) 1998-2011    The R Core Team
+ *  Copyright (C) 1998-2016    The R Core Team
  *
- *  This program is free software; you can redistribute it and/or modify
+ *  This header file is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU Lesser General Public License as published by
  *  the Free Software Foundation; either version 2.1 of the License, or
  *  (at your option) any later version.
  *
+ *  This file is part of R. R is distributed under the terms of the
+ *  GNU General Public License, either Version 2, June 1991 or Version 3,
+ *  June 2007. See doc/COPYRIGHTS for details of the copyright status of R.
+ *
  *  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
@@ -14,7 +18,7 @@
  *
  *  You should have received a copy of the GNU Lesser General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  */
 
 /* Included by R.h: API */
@@ -22,12 +26,12 @@
 #ifndef R_RANDOM_H
 #define R_RANDOM_H
 
+#include <R_ext/Boolean.h>
+
 #ifdef  __cplusplus
 extern "C" {
 #endif
 
-#include <R_ext/Boolean.h>
-
 typedef enum {
     WICHMANN_HILL,
     MARSAGLIA_MULTICARRY,
@@ -54,6 +58,7 @@ void GetRNGstate(void);
 void PutRNGstate(void);
 
 double unif_rand(void);
+double R_unif_index(double);
 /* These are also defined in Rmath.h */
 double norm_rand(void);
 double exp_rand(void);
@@ -66,8 +71,6 @@ int * user_unif_seedloc(void);
 
 double * user_norm_rand(void);
 
-void FixupProb(double *, int, int, Rboolean);
-
 #ifdef  __cplusplus
 }
 #endif
diff --git a/src/include/R_ext/Rdynload.h b/src/include/R_ext/Rdynload.h
index afcf5a7..d60e0e5 100644
--- a/src/include/R_ext/Rdynload.h
+++ b/src/include/R_ext/Rdynload.h
@@ -1,12 +1,16 @@
 /*
  *  R : A Computer Language for Statistical Data Analysis
- *  Copyright (C) 2001-12  The R Core Team.
+ *  Copyright (C) 2001-2017  The R Core Team.
  *
- *  This program is free software; you can redistribute it and/or modify
+ *  This header file is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU Lesser General Public License as published by
  *  the Free Software Foundation; either version 2.1 of the License, or
  *  (at your option) any later version.
  *
+ *  This file is part of R. R is distributed under the terms of the
+ *  GNU General Public License, either Version 2, June 1991 or Version 3,
+ *  June 2007. See doc/COPYRIGHTS for details of the copyright status of R.
+ *
  *  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
@@ -14,13 +18,15 @@
  *
  *  You should have received a copy of the GNU Lesser General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  */
 
 /*
   C functions used to register compiled code in packages.
 
   Those needed for that purpose are part of the API.
+
+  Cleaned up for R 3.4.0, some changes require recompilation of packages.
  */
 
 #ifndef  R_EXT_DYNLOAD_H_
@@ -33,27 +39,11 @@ typedef void * (*DL_FUNC)();
 
 typedef unsigned int R_NativePrimitiveArgType;
 
-#define SINGLESXP 302 /* Don't have a single type for this. */
-
-/* In the future, we will want to allow people register their own types
-   and then refer to these in other contexts. Something like the Gtk type 
-   system may be appropriate.
-*/
-typedef unsigned int R_NativeObjectArgType;
-
-
-/* In the near future, we may support registering 
-   information about the arguments of native routines 
-   and whether they are used to return information.
-   The hope is that we can minimize copying objects even 
-   further. Not currently in use.
-*/
-typedef enum {R_ARG_IN, R_ARG_OUT, R_ARG_IN_OUT, R_IRRELEVANT} R_NativeArgStyle;
-
+/* For interfaces to objects created with as.single */
+#define SINGLESXP 302
 
-
-/* 
- These are very similar to those in  unix/dynload.c
+/*
+ These are very similar to those in Rdynpriv.h,
  but we maintain them separately to give us more freedom to do
  some computations on the internal versions that are derived from
  these definitions.
@@ -62,48 +52,41 @@ typedef struct {
     const char *name;
     DL_FUNC     fun;
     int         numArgs;
-  
     R_NativePrimitiveArgType *types;
-    R_NativeArgStyle         *styles; 
-    
 } R_CMethodDef;
 
 typedef R_CMethodDef R_FortranMethodDef;
 
 
-
 typedef struct {
     const char *name;
     DL_FUNC     fun;
     int         numArgs;
-/* In the future, we will put types in here for the different arguments.
-   We need a richer type system to do this effectively so that one
-   can specify types for new classes.
-*/
 } R_CallMethodDef;
+
 typedef R_CallMethodDef R_ExternalMethodDef;
 
 
 typedef struct _DllInfo DllInfo;
 
-/* 
+/*
   Currently ignore the graphics routines, accessible via .External.graphics()
   and .Call.graphics().
  */
-#ifdef __cplusplus 
+#ifdef __cplusplus
 extern "C" {
 #endif
 int R_registerRoutines(DllInfo *info, const R_CMethodDef * const croutines,
-		       const R_CallMethodDef * const callRoutines, 
+		       const R_CallMethodDef * const callRoutines,
 		       const R_FortranMethodDef * const fortranRoutines,
-                       const R_ExternalMethodDef * const externalRoutines);
+		       const R_ExternalMethodDef * const externalRoutines);
 
 Rboolean R_useDynamicSymbols(DllInfo *info, Rboolean value);
 Rboolean R_forceSymbols(DllInfo *info, Rboolean value);
 
 DllInfo *R_getDllInfo(const char *name);
 
-/* to be used by applications embedding R to register their symbols
+/* To be used by applications embedding R to register their symbols
    that are not related to any dynamic module */
 DllInfo *R_getEmbeddingDllInfo(void);
 
@@ -111,19 +94,20 @@ typedef struct Rf_RegisteredNativeSymbol R_RegisteredNativeSymbol;
 typedef enum {R_ANY_SYM=0, R_C_SYM, R_CALL_SYM, R_FORTRAN_SYM, R_EXTERNAL_SYM} NativeSymbolType;
 
 
-DL_FUNC R_FindSymbol(char const *, char const *, 
-                       R_RegisteredNativeSymbol *symbol);
+DL_FUNC R_FindSymbol(char const *, char const *,
+		       R_RegisteredNativeSymbol *symbol);
 
 
-/* Experimental interface for exporting and importing functions from
-   one package for use from C code in a package.  The registration
-   part probably ought to be integrated with the other registrations.
-   The naming of these routines may be less than ideal. */
+/* Interface for exporting and importing functions from one package
+   for use from C code in a package.  The registration part probably
+   ought to be integrated with the other registrations.  The naming of
+   these routines may be less than ideal.
+*/
 
 void R_RegisterCCallable(const char *package, const char *name, DL_FUNC fptr);
 DL_FUNC R_GetCCallable(const char *package, const char *name);
 
-#ifdef __cplusplus 
+#ifdef __cplusplus
 }
 #endif
 
diff --git a/src/include/R_ext/Riconv.h b/src/include/R_ext/Riconv.h
index 13864ee..7482536 100644
--- a/src/include/R_ext/Riconv.h
+++ b/src/include/R_ext/Riconv.h
@@ -2,11 +2,15 @@
  *  R : A Computer Language for Statistical Data Analysis
  *  Copyright (C) 2005     the R Core Team
  *
- *  This program is free software; you can redistribute it and/or modify
+ *  This header file is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU Lesser General Public License as published by
  *  the Free Software Foundation; either version 2.1 of the License, or
  *  (at your option) any later version.
  *
+ *  This file is part of R. R is distributed under the terms of the
+ *  GNU General Public License, either Version 2, June 1991 or Version 3,
+ *  June 2007. See doc/COPYRIGHTS for details of the copyright status of R.
+ *
  *  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
@@ -14,7 +18,7 @@
  *
  *  You should have received a copy of the GNU Lesser General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  */
 
 /*
diff --git a/src/include/R_ext/Utils.h b/src/include/R_ext/Utils.h
index 01cd281..792bac3 100644
--- a/src/include/R_ext/Utils.h
+++ b/src/include/R_ext/Utils.h
@@ -1,11 +1,15 @@
 /*
  *  R : A Computer Language for Statistical Data Analysis
- *  Copyright (C) 1998-2012    The R Core Team
+ *  Copyright (C) 1998-2016    The R Core Team
  *
- *  This program is free software; you can redistribute it and/or modify
+ *  This header file is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU Lesser General Public License as published by
  *  the Free Software Foundation; either version 2.1 of the License, or
  *  (at your option) any later version.
+
+ *  This file is part of R. R is distributed under the terms of the
+ *  GNU General Public License, either Version 2, June 1991 or Version 3,
+ *  June 2007. See doc/COPYRIGHTS for details of the copyright status of R.
  *
  *  This program is distributed in the hope that it will be useful,
  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -14,7 +18,7 @@
  *
  *  You should have received a copy of the GNU Lesser General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  *
  *
  * Generally useful  UTILITIES  *NOT* relying on R internals (from Defn.h)
@@ -27,7 +31,14 @@
 
 #include <R_ext/Boolean.h>
 #include <R_ext/Complex.h>
-#include <stddef.h>
+
+#if defined(__cplusplus) && !defined(DO_NOT_USE_CXX_HEADERS)
+# include <cstddef>
+# define R_SIZE_T std::size_t
+#else
+# include <stddef.h>
+# define R_SIZE_T size_t
+#endif
 
 #define revsort       Rf_revsort
 #define iPsort        Rf_iPsort
@@ -56,9 +67,9 @@ void	cPsort(Rcomplex*, int, int);
 
 /* ../../main/qsort.c : */
 /* dummy renamed to II to avoid problems with g++ on Solaris */
-void R_qsort    (double *v,         size_t i, size_t j);
+void R_qsort    (double *v,         R_SIZE_T i, R_SIZE_T j);
 void R_qsort_I  (double *v, int *II, int i, int j);
-void R_qsort_int  (int *iv,         size_t i, size_t j);
+void R_qsort_int  (int *iv,         R_SIZE_T i, R_SIZE_T j);
 void R_qsort_int_I(int *iv, int *II, int i, int j);
 #ifdef R_RS_H
 void F77_NAME(qsort4)(double *v, int *indx, int *ii, int *jj);
@@ -84,13 +95,16 @@ char *R_tmpnam2(const char *prefix, const char *tempdir, const char *fileext);
 
 void R_CheckUserInterrupt(void);
 void R_CheckStack(void);
-void R_CheckStack2(size_t);
+void R_CheckStack2(R_SIZE_T);
 
 
 /* ../../appl/interv.c: also in Applic.h */
 int findInterval(double *xt, int n, double x,
 		 Rboolean rightmost_closed,  Rboolean all_inside, int ilo,
 		 int *mflag);
+int findInterval2(double *xt, int n, double x,
+		  Rboolean rightmost_closed,  Rboolean all_inside, Rboolean left_open,
+		  int ilo, int *mflag);
 #ifdef R_RS_H
 int F77_SUB(interv)(double *xt, int *n, double *x,
 		    Rboolean *rightmost_closed, Rboolean *all_inside,
diff --git a/src/include/R_ext/Visibility.h b/src/include/R_ext/Visibility.h
index aa35e34..9bfaef4 100644
--- a/src/include/R_ext/Visibility.h
+++ b/src/include/R_ext/Visibility.h
@@ -2,11 +2,15 @@
  *  R : A Computer Language for Statistical Data Analysis
  *  Copyright (C) 2008    the R Core Team
  *
- *  This program is free software; you can redistribute it and/or modify
+ *  This header file is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU Lesser General Public License as published by
  *  the Free Software Foundation; either version 2.1 of the License, or
  *  (at your option) any later version.
  *
+ *  This file is part of R. R is distributed under the terms of the
+ *  GNU General Public License, either Version 2, June 1991 or Version 3,
+ *  June 2007. See doc/COPYRIGHTS for details of the copyright status of R.
+ *
  *  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
@@ -14,7 +18,7 @@
  *
  *  You should have received a copy of the GNU Lesser General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  */
 
 /*
diff --git a/src/include/R_ext/eventloop.h b/src/include/R_ext/eventloop.h
index 842cf9b..951b422 100644
--- a/src/include/R_ext/eventloop.h
+++ b/src/include/R_ext/eventloop.h
@@ -1,12 +1,16 @@
 /*
  *  R : A Computer Language for Statistical Data Analysis
- *  Copyright (C) 2000-2007 The R Core Team.
+ *  Copyright (C) 2000-2016 The R Core Team.
  *
- *  This program is free software; you can redistribute it and/or modify
+ *  This header file is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU Lesser General Public License as published by
  *  the Free Software Foundation; either version 2.1 of the License, or
  *  (at your option) any later version.
  *
+ *  This file is part of R. R is distributed under the terms of the
+ *  GNU General Public License, either Version 2, June 1991 or Version 3,
+ *  June 2007. See doc/COPYRIGHTS for details of the copyright status of R.
+ *
  *  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
@@ -14,26 +18,30 @@
  *
  *  You should have received a copy of the GNU Lesser General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  */
 
 /* 
    For use by alternative front-ends and packages which need to share
-   the R event loop (on all platforms).
+   the R event loop (on Unix-alikes).
 
    Not part of the API and subject to change without notice.
+
+   NB: HAVE_SYS_SELECT_H should be checked and defined before this is
+   included.
  */
 
 #ifndef R_EXT_EVENTLOOP_H
 #define R_EXT_EVENTLOOP_H
 
-#ifndef NO_C_HEADERS
 #ifdef HAVE_SYS_SELECT_H
-# include <sys/select.h>	/* for fd_set according to recent POSIX */
+# include <sys/select.h> /* for fd_set, select according to POSIX 2004 */
 #endif
-/* NOTE: Needed at least on FreeBSD so that fd_set is defined. */
-# include <sys/types.h>
+#ifdef HAVE_SYS_TIME_H
+# include <sys/time.h>	 /* ... according to earlier POSIX and perhaps HP-UX */
 #endif
+/* NOTE: At one time needed on FreeBSD so that fd_set is defined. */
+#include <sys/types.h>
 
 #ifdef  __cplusplus
 extern "C" {
diff --git a/src/include/R_ext/libextern.h b/src/include/R_ext/libextern.h
index c8e53bd..fc3716e 100644
--- a/src/include/R_ext/libextern.h
+++ b/src/include/R_ext/libextern.h
@@ -2,11 +2,15 @@
  *  R : A Computer Language for Statistical Data Analysis
  *  Copyright (C) 2001, 2004  The R Core Team.
  *
- *  This program is free software; you can redistribute it and/or modify
+ *  This header file is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU Lesser General Public License as published by
  *  the Free Software Foundation; either version 2.1 of the License, or
  *  (at your option) any later version.
  *
+ *  This file is part of R. R is distributed under the terms of the
+ *  GNU General Public License, either Version 2, June 1991 or Version 3,
+ *  June 2007. See doc/COPYRIGHTS for details of the copyright status of R.
+ *
  *  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
@@ -14,7 +18,7 @@
  *
  *  You should have received a copy of the GNU Lesser General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  */
 
 /* Included by R.h: API on Windows */
diff --git a/src/include/R_ext/stats_package.h b/src/include/R_ext/stats_package.h
index 3717c48..72f4227 100644
--- a/src/include/R_ext/stats_package.h
+++ b/src/include/R_ext/stats_package.h
@@ -2,11 +2,15 @@
  *  R : A Computer Language for Statistical Data Analysis
  *  Copyright (C) 2007  The R Core Team.
  *
- *  This program is free software; you can redistribute it and/or modify
+ *  This header file is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU Lesser General Public License as published by
  *  the Free Software Foundation; either version 2.1 of the License, or
  *  (at your option) any later version.
  *
+ *  This file is part of R. R is distributed under the terms of the
+ *  GNU General Public License, either Version 2, June 1991 or Version 3,
+ *  June 2007. See doc/COPYRIGHTS for details of the copyright status of R.
+ *
  *  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
@@ -14,7 +18,7 @@
  *
  *  You should have received a copy of the GNU Lesser General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  */
 
 #ifndef R_STATS_PACKAGE_H
@@ -56,6 +60,10 @@ S_nlminb_iterate(double b[], double d[], double fx, double g[],
 		 double h[], int iv[], int liv, int lv, int n,
 		 double v[], double x[]);
 
+void attribute_hidden
+S_rcont2(int nrow[], int ncol[], int nrowt[], int ncolt[], 
+         int ntotal[], double fact[], int jwork[], int matrix[]);
+
 static R_INLINE int S_v_length(int alg, int n)
 {
     return (alg - 1) ? (105 + (n * (2 * n + 20))) :
@@ -68,4 +76,3 @@ static R_INLINE int S_iv_length(int alg, int n)
 }
 
 #endif /* R_STATS_PACKAGE_H */
-
diff --git a/src/include/R_ext/stats_stubs.h b/src/include/R_ext/stats_stubs.h
index bc46821..87efa36 100644
--- a/src/include/R_ext/stats_stubs.h
+++ b/src/include/R_ext/stats_stubs.h
@@ -2,11 +2,15 @@
  *  R : A Computer Language for Statistical Data Analysis
  *  Copyright (C) 2007  The R Core Team.
  *
- *  This program is free software; you can redistribute it and/or modify
+ *  This header file is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU Lesser General Public License as published by
  *  the Free Software Foundation; either version 2.1 of the License, or
  *  (at your option) any later version.
  *
+ *  This file is part of R. R is distributed under the terms of the
+ *  GNU General Public License, either Version 2, June 1991 or Version 3,
+ *  June 2007. See doc/COPYRIGHTS for details of the copyright status of R.
+ *
  *  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
@@ -14,7 +18,7 @@
  *
  *  You should have received a copy of the GNU Lesser General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  */
 
 #include <Rconfig.h>
@@ -66,3 +70,15 @@ S_nlsb_iterate(double b[], double d[], double dr[], int iv[], int liv,
     fun(b, d, dr, iv, liv, lv, n, nd, p, r, rd, v, x);
 }
 
+void attribute_hidden
+S_rcont2(int nrow[], int ncol[], int nrowt[], int ncolt[], 
+         int ntotal[], double fact[], int jwork[], int matrix[])
+{
+    static void(*fun)(int[], int[], int[], int[], int[], double[], 
+                      int[], int[]) = NULL;
+    if (fun == NULL)
+	fun = (void(*)(int[], int[], int[], int[], int[], double[], 
+                       int[], int[]))
+	    R_GetCCallable("stats", "rcont2");
+    fun(nrow, ncol, nrowt, ncolt, ntotal, fact, jwork, matrix);
+}
diff --git a/src/include/Rconnections.h b/src/include/Rconnections.h
index 84ea5c1..cac02a9 100644
--- a/src/include/Rconnections.h
+++ b/src/include/Rconnections.h
@@ -1,6 +1,6 @@
 /*
  *  R : A Computer Language for Statistical Data Analysis
- *  Copyright (C) 2000-2013   The R Core Team.
+ *  Copyright (C) 2000-2015   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
@@ -14,9 +14,11 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  */
 
+/* Internal header, not installed */
+
 #ifndef R_CONNECTIONS_H_
 #define R_CONNECTIONS_H_
 
@@ -28,7 +30,7 @@
        A subset can be accessed using R_ext/Connections.h but read
        the warning in that file for details. */
 
-typedef enum {HTTPsh, FTPsh, HTTPSsh} UrlScheme;
+typedef enum {HTTPsh, FTPsh, HTTPSsh, FTPSsh} UrlScheme;
 
 /* used in internet module */
 typedef struct urlconn {
@@ -65,7 +67,7 @@ Rconnection getConnection_no_err(int n);
 Rboolean switch_stdout(int icon, int closeOnExit);
 void init_con(Rconnection new, const char *description, int enc,
 	      const char * const mode);
-Rconnection R_newurl(const char *description, const char * const mode);
+Rconnection R_newurl(const char *description, const char * const mode, int type);
 Rconnection R_newsock(const char *host, int port, int server, const char * const mode, int timeout);
 Rconnection in_R_newsock(const char *host, int port, int server, const char *const mode, int timeout);
 Rconnection R_newunz(const char *description, const char * const mode);
diff --git a/src/include/Rdefines.h b/src/include/Rdefines.h
index 2633f3f..712bcea 100644
--- a/src/include/Rdefines.h
+++ b/src/include/Rdefines.h
@@ -1,12 +1,16 @@
 /*
  *  R : A Computer Language for Statistical Data Analysis
- *  Copyright (C) 1999-2013 The R Core Team.
+ *  Copyright (C) 1999-2016 The R Core Team.
  *
- *  This program is free software; you can redistribute it and/or modify
+ *  This header file is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU Lesser General Public License as published by
  *  the Free Software Foundation; either version 2.1 of the License, or
  *  (at your option) any later version.
  *
+ *  This file is part of R. R is distributed under the terms of the
+ *  GNU General Public License, either Version 2, June 1991 or Version 3,
+ *  June 2007. See doc/COPYRIGHTS for details of the copyright status of R.
+ *
  *  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
@@ -14,9 +18,16 @@
  *
  *  You should have received a copy of the GNU Lesser General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  */
 
+/* From 'Writing R Extensions:
+
+   'these are not kept up to date and are not recommended for new projects.'
+
+   As from R 3.3.0 they have been adjusted to work when R_NO_REMAP is defined.
+*/
+
 #ifndef R_DEFINES_H
 #define R_DEFINES_H
 
@@ -48,34 +59,43 @@
 
 #define NULL_USER_OBJECT	R_NilValue
 
-#define AS_LOGICAL(x)		coerceVector(x,LGLSXP)
-#define AS_INTEGER(x)		coerceVector(x,INTSXP)
-#define AS_NUMERIC(x)		coerceVector(x,REALSXP)
-#define AS_CHARACTER(x)		coerceVector(x,STRSXP)
-#define AS_COMPLEX(x)		coerceVector(x,CPLXSXP)
-#define AS_VECTOR(x)		coerceVector(x,VECSXP)
-#define AS_LIST(x)		coerceVector(x,VECSXP)
-#define AS_RAW(x)		coerceVector(x,RAWSXP)
-
-#define IS_LOGICAL(x)		isLogical(x)
-#define IS_INTEGER(x)		isInteger(x)
-#define IS_NUMERIC(x)		isReal(x)
-#define IS_CHARACTER(x)		isString(x)
-#define IS_COMPLEX(x)		isComplex(x)
-/* NB: is this right? It means atomic or VECSXP or EXPRSXP */
-#define IS_VECTOR(x)		isVector(x)
+#define AS_LOGICAL(x)		Rf_coerceVector(x,LGLSXP)
+#define AS_INTEGER(x)		Rf_coerceVector(x,INTSXP)
+#define AS_NUMERIC(x)		Rf_coerceVector(x,REALSXP)
+#define AS_CHARACTER(x)		Rf_coerceVector(x,STRSXP)
+#define AS_COMPLEX(x)		Rf_coerceVector(x,CPLXSXP)
+#define AS_VECTOR(x)		Rf_coerceVector(x,VECSXP)
+#define AS_LIST(x)		Rf_coerceVector(x,VECSXP)
+#define AS_RAW(x)		Rf_coerceVector(x,RAWSXP)
+
+#ifdef USE_RINTERNALS
+// This is not documented to be supported, and may not be in future
+# define IS_LOGICAL(x)		isLogical(x)
+# define IS_INTEGER(x)		isInteger(x)
+# define IS_NUMERIC(x)		isReal(x)
+# define IS_CHARACTER(x)	isString(x)
+# define IS_COMPLEX(x)		isComplex(x)
+#else
+# define IS_LOGICAL(x)		Rf_isLogical(x)
+# define IS_INTEGER(x)		Rf_isInteger(x)
+# define IS_NUMERIC(x)		Rf_isReal(x)
+# define IS_CHARACTER(x)	Rf_isString(x)
+# define IS_COMPLEX(x)		Rf_isComplex(x)
+#endif
+/* NB: is this right?  It means atomic or VECSXP or EXPRSXP */
+#define IS_VECTOR(x)		Rf_isVector(x)
 /* And this cannot be right: isVectorList(x)? */
 #define IS_LIST(x)		IS_VECTOR(x)
 #define IS_RAW(x)		(TYPEOF(x) == RAWSXP)
 
-#define NEW_LOGICAL(n)		allocVector(LGLSXP,n)
-#define NEW_INTEGER(n)		allocVector(INTSXP,n)
-#define NEW_NUMERIC(n)		allocVector(REALSXP,n)
-#define NEW_CHARACTER(n)	allocVector(STRSXP,n)
-#define NEW_COMPLEX(n)		allocVector(CPLXSXP,n)
-#define NEW_LIST(n)		allocVector(VECSXP,n)
+#define NEW_LOGICAL(n)		Rf_allocVector(LGLSXP,n)
+#define NEW_INTEGER(n)		Rf_allocVector(INTSXP,n)
+#define NEW_NUMERIC(n)		Rf_allocVector(REALSXP,n)
+#define NEW_CHARACTER(n)	Rf_allocVector(STRSXP,n)
+#define NEW_COMPLEX(n)		Rf_allocVector(CPLXSXP,n)
+#define NEW_LIST(n)		Rf_allocVector(VECSXP,n)
 #define NEW_STRING(n)		NEW_CHARACTER(n)
-#define NEW_RAW(n)		allocVector(RAWSXP,n)
+#define NEW_RAW(n)		Rf_allocVector(RAWSXP,n)
 
 #define LOGICAL_POINTER(x)	LOGICAL(x)
 #define INTEGER_POINTER(x)	INTEGER(x)
@@ -109,33 +129,33 @@
 #define RECURSIVE_DATA(x)	(VECTOR_PTR(x))
 #define VECTOR_DATA(x)		(VECTOR_PTR(x))
 
-#define LOGICAL_VALUE(x)	asLogical(x)
-#define INTEGER_VALUE(x)	asInteger(x)
-#define NUMERIC_VALUE(x)	asReal(x)
-#define CHARACTER_VALUE(x)	CHAR(asChar(x))
-#define STRING_VALUE(x)		CHAR(asChar(x))
-#define LIST_VALUE(x)		error("the 'value' of a list object is not defined")
-#define RAW_VALUE(x)		error("the 'value' of a raw object is not defined")
+#define LOGICAL_VALUE(x)	Rf_asLogical(x)
+#define INTEGER_VALUE(x)	Rf_asInteger(x)
+#define NUMERIC_VALUE(x)	Rf_asReal(x)
+#define CHARACTER_VALUE(x)	CHAR(Rf_asChar(x))
+#define STRING_VALUE(x)		CHAR(Rf_asChar(x))
+#define LIST_VALUE(x)		Rf_error("the 'value' of a list object is not defined")
+#define RAW_VALUE(x)		Rf_error("the 'value' of a raw object is not defined")
 
 #define SET_ELEMENT(x, i, val)	SET_VECTOR_ELT(x, i, val)
-#define GET_ATTR(x,what)       	getAttrib(x, what)
-#define GET_CLASS(x)       	getAttrib(x, R_ClassSymbol)
-#define GET_DIM(x)       	getAttrib(x, R_DimSymbol)
-#define GET_DIMNAMES(x)       	getAttrib(x, R_DimNamesSymbol)
-#define GET_COLNAMES(x)       	GetColNames(x)
-#define GET_ROWNAMES(x)       	GetRowNames(x)
-#define GET_LEVELS(x)       	getAttrib(x, R_LevelsSymbol)
-#define GET_TSP(x)       	getAttrib(x, R_TspSymbol)
-#define GET_NAMES(x)		getAttrib(x, R_NamesSymbol)
-#define SET_ATTR(x, what, n)     	setAttrib(x, what, n)
-#define SET_CLASS(x, n)     	setAttrib(x, R_ClassSymbol, n)
-#define SET_DIM(x, n)     	setAttrib(x, R_DimSymbol, n)
-#define SET_DIMNAMES(x, n)     	setAttrib(x, R_DimNamesSymbol, n)
-#define SET_LEVELS(x, l)       	setAttrib(x, R_LevelsSymbol, l)
-#define SET_NAMES(x, n)		setAttrib(x, R_NamesSymbol, n)
+#define GET_ATTR(x,what)       	Rf_getAttrib(x, what)
+#define GET_CLASS(x)       	Rf_getAttrib(x, R_ClassSymbol)
+#define GET_DIM(x)       	Rf_getAttrib(x, R_DimSymbol)
+#define GET_DIMNAMES(x)       	Rf_getAttrib(x, R_DimNamesSymbol)
+#define GET_COLNAMES(x)       	Rf_GetColNames(x)
+#define GET_ROWNAMES(x)       	Rf_GetRowNames(x)
+#define GET_LEVELS(x)       	Rf_getAttrib(x, R_LevelsSymbol)
+#define GET_TSP(x)       	Rf_getAttrib(x, R_TspSymbol)
+#define GET_NAMES(x)		Rf_getAttrib(x, R_NamesSymbol)
+#define SET_ATTR(x, what, n)    Rf_setAttrib(x, what, n)
+#define SET_CLASS(x, n)     	Rf_setAttrib(x, R_ClassSymbol, n)
+#define SET_DIM(x, n)     	Rf_setAttrib(x, R_DimSymbol, n)
+#define SET_DIMNAMES(x, n)     	Rf_setAttrib(x, R_DimNamesSymbol, n)
+#define SET_LEVELS(x, l)       	Rf_setAttrib(x, R_LevelsSymbol, l)
+#define SET_NAMES(x, n)		Rf_setAttrib(x, R_NamesSymbol, n)
 /* These do not support long vectors */
-#define GET_LENGTH(x)		length(x)
-#define SET_LENGTH(x, n)	(x = lengthgets(x, n))
+#define GET_LENGTH(x)		Rf_length(x)
+#define SET_LENGTH(x, n)	(x = Rf_lengthgets(x, n))
 
 #define GET_SLOT(x, what)       R_do_slot(x, what)
 #define SET_SLOT(x, what, value)  R_do_slot_assign(x, what, value)
diff --git a/src/include/Rdynpriv.h b/src/include/Rdynpriv.h
index 971f278..2850296 100644
--- a/src/include/Rdynpriv.h
+++ b/src/include/Rdynpriv.h
@@ -1,6 +1,6 @@
 /*
  *  R : A Computer Language for Statistical Data Analysis
- *  Copyright (C) 2001-12  The R Core Team.
+ *  Copyright (C) 2001-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
@@ -10,11 +10,11 @@
  *  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 Lesser General Public License for more details.
+ *  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, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  */
 
 #ifndef R_DYNPRIV_H
@@ -23,6 +23,7 @@
 /*****************************************************
  These are internal routines and definitions subject
  to unannounced changes. Do not use for packages, etc.
+ (The header is not installed.)
  
  There is a great deal of repetition in the definitions 
  of the user-level method definitions and in the internal
@@ -33,11 +34,6 @@
 *****************************************************/
 
 
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-
 #ifdef Win32
 #include <windows.h>
 #define CACHE_DLL_SYM 1
@@ -63,13 +59,6 @@ typedef struct {
      native routines that can be called by R. They are intended to be 
      instantiated by packages that explicitly register the routines in the
      library.
-
-     More fields will be added to these "real soon now". These may contain
-     information such as 
-        a) whether the routine is thread-safe or not,
-        b) with which other routines it must be sychronized,
-        c) the parameter types,
-        ...
    */
 
 typedef struct {
@@ -77,9 +66,7 @@ typedef struct {
     DL_FUNC     fun;
     int         numArgs;
 
-    R_NativePrimitiveArgType *types;
-    R_NativeArgStyle *styles;
-   
+    R_NativePrimitiveArgType *types;   
 } Rf_DotCSymbol;
 
 typedef Rf_DotCSymbol Rf_DotFortranSymbol;
@@ -89,9 +76,6 @@ typedef struct {
     char       *name;
     DL_FUNC     fun;
     int         numArgs;
-    R_NativeObjectArgType *types;
-
-    R_NativeArgStyle *styles;
 } Rf_DotCallSymbol;
 
 typedef Rf_DotCallSymbol Rf_DotExternalSymbol;
@@ -202,11 +186,11 @@ DL_FUNC Rf_lookupCachedSymbol(const char *name, const char *pkg, int all);
 DL_FUNC R_dlsym(DllInfo *info, char const *name, 
 		R_RegisteredNativeSymbol *symbol);
 
-SEXP R_MakeExternalPtrFn(DL_FUNC p, SEXP tag, SEXP prot);
-DL_FUNC R_ExternalPtrAddrFn(SEXP s);
-
-#ifdef __cplusplus
-}
-#endif
+/* Moved to API in R 3.4.0
+  SEXP R_MakeExternalPtrFn(DL_FUNC p, SEXP tag, SEXP prot);
+  DL_FUNC R_ExternalPtrAddrFn(SEXP s);
+*/
+DL_FUNC R_dotCallFn(SEXP, SEXP, int);
+SEXP R_doDotCall(DL_FUNC, int, SEXP *, SEXP);
 
 #endif /* ifdef R_DYNPRIV_H */
diff --git a/src/include/Rembedded.h b/src/include/Rembedded.h
index 6eda0c8..93fb895 100644
--- a/src/include/Rembedded.h
+++ b/src/include/Rembedded.h
@@ -1,6 +1,6 @@
 /*
  *  R : A Computer Language for Statistical Data Analysis
- *  Copyright (C) 2006-8  The R Core Team.
+ *  Copyright (C) 2006-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
@@ -14,7 +14,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  */
 
 /* A header for use with alternative front-ends. Not formally part of
@@ -23,12 +23,12 @@
 #ifndef REMBEDDED_H_
 #define REMBEDDED_H_
 
+#include <R_ext/Boolean.h>
+
 #ifdef __cplusplus
 extern "C" {
 #endif
 
-#include <R_ext/Boolean.h>
-
 extern int Rf_initEmbeddedR(int argc, char *argv[]);
 extern void Rf_endEmbeddedR(int fatal);
 
@@ -53,12 +53,7 @@ extern void R_CleanTempDir(void);
 LibExtern char *R_TempDir;    
 extern void R_SaveGlobalEnv(void);
 
-
-#ifdef unix
-void fpu_setup(Rboolean start);
-#endif
-
-#ifdef Win32
+#ifdef _WIN32
 extern char *getDLLVersion(void), *getRUser(void), *get_R_HOME(void);
 extern void setup_term_ui(void);
 LibExtern int UserBreak;
@@ -67,6 +62,8 @@ extern void editorcleanall(void);
 extern int GA_initapp(int, char **);
 extern void GA_appcleanup(void);
 extern void readconsolecfg(void);
+#else
+void fpu_setup(Rboolean start);
 #endif
 
 #ifdef __cplusplus
diff --git a/src/include/Rgraphics.h b/src/include/Rgraphics.h
index 0dcd6bb..096ab27 100644
--- a/src/include/Rgraphics.h
+++ b/src/include/Rgraphics.h
@@ -1,11 +1,11 @@
 /*
  *  R : A Computer Language for Statistical Data Analysis
  *  Copyright (C) 1995, 1996  Robert Gentleman and Ross Ihaka
- *  Copyright (C) 1998--2008  R Core Team
+ *  Copyright (C) 1998--2016  R Core Team
  *
  *  This program is free software; you can redistribute it and/or modify
- *  it under the terms of the GNU Lesser General Public License as published by
- *  the Free Software Foundation; either version 2.1 of the License, or
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
  *  (at your option) any later version.
  *
  *  This program is distributed in the hope that it will be useful,
@@ -13,19 +13,15 @@
  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  *  GNU Lesser General Public License for more details.
  *
- *  You should have received a copy of the GNU Lesser General Public License
+ *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  */
 
 #ifndef RGRAPHICS_H_
 #define RGRAPHICS_H_
 
-/* This was a public header in R < 2.8.0, but no longer */
-
-#ifdef  __cplusplus
-extern "C" {
-#endif
+/* Internal header, not installed */
 
 	/* possible coordinate systems (for specifying locations) */
 typedef enum {
@@ -282,8 +278,4 @@ double yDevtoUsr(double, pGEDevDesc);
 double xNPCtoUsr(double, pGEDevDesc);
 double yNPCtoUsr(double, pGEDevDesc);
 
-#ifdef  __cplusplus
-}
-#endif
-
 #endif /* RGRAPHICS_H_ */
diff --git a/src/include/Rinlinedfuns.h b/src/include/Rinlinedfuns.h
index cc1dbb7..c81aa99 100644
--- a/src/include/Rinlinedfuns.h
+++ b/src/include/Rinlinedfuns.h
@@ -1,7 +1,7 @@
 /*
  *  R : A Computer Language for Statistical Data Analysis
  *  Copyright (C) 1995, 1996  Robert Gentleman and Ross Ihaka
- *  Copyright (C) 1999-2012  The R Core Team.
+ *  Copyright (C) 1999-2015  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
@@ -11,13 +11,15 @@
  *  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 Lesser General Public License for more details.
+ *  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, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  */
 
+/* Internal header, not installed */
+
 /* this header is always to be included from others.
    It is only called if COMPILING_R is defined (in util.c) or
    from GNU C systems.
@@ -121,7 +123,6 @@ int Rf_envlength(SEXP rho);
 */
 INLINE_FUN R_len_t length(SEXP s)
 {
-    int i;
     switch (TYPEOF(s)) {
     case NILSXP:
 	return 0;
@@ -138,12 +139,14 @@ INLINE_FUN R_len_t length(SEXP s)
     case LISTSXP:
     case LANGSXP:
     case DOTSXP:
-	i = 0;
+    {
+	int i = 0;
 	while (s != NULL && s != R_NilValue) {
 	    i++;
 	    s = CDR(s);
 	}
 	return i;
+    }
     case ENVSXP:
 	return Rf_envlength(s);
     default:
@@ -151,9 +154,10 @@ INLINE_FUN R_len_t length(SEXP s)
     }
 }
 
+R_xlen_t Rf_envxlength(SEXP rho);
+
 INLINE_FUN R_xlen_t xlength(SEXP s)
 {
-    int i;
     switch (TYPEOF(s)) {
     case NILSXP:
 	return 0;
@@ -170,14 +174,17 @@ INLINE_FUN R_xlen_t xlength(SEXP s)
     case LISTSXP:
     case LANGSXP:
     case DOTSXP:
-	i = 0;
+    {
+	// it is implausible this would be >= 2^31 elements, but allow it
+	R_xlen_t i = 0;
 	while (s != NULL && s != R_NilValue) {
 	    i++;
 	    s = CDR(s);
 	}
 	return i;
+    }
     case ENVSXP:
-	return Rf_envlength(s);
+	return Rf_envxlength(s);
     default:
 	return 1;
     }
@@ -264,6 +271,13 @@ INLINE_FUN SEXP list5(SEXP s, SEXP t, SEXP u, SEXP v, SEXP w)
     return s;
 }
 
+INLINE_FUN SEXP list6(SEXP s, SEXP t, SEXP u, SEXP v, SEXP w, SEXP x)
+{
+    PROTECT(s);
+    s = CONS(s, list5(t, u, v, w, x));
+    UNPROTECT(1);
+    return s;
+}
 
 /* Destructive list append : See also ``append'' */
 
@@ -424,6 +438,7 @@ INLINE_FUN Rboolean isPairList(SEXP s)
     case NILSXP:
     case LISTSXP:
     case LANGSXP:
+    case DOTSXP:
 	return TRUE;
     default:
 	return FALSE;
@@ -684,6 +699,24 @@ INLINE_FUN SEXP mkString(const char *s)
     return t;
 }
 
+/* index of a given C string in (translated) R string vector  */
+INLINE_FUN int
+stringPositionTr(SEXP string, const char *translatedElement) {
+
+    int slen = LENGTH(string);
+    int i;
+
+    const void *vmax = vmaxget();
+    for (i = 0 ; i < slen; i++) {
+	Rboolean found = ! strcmp(translateChar(STRING_ELT(string, i)),
+				  translatedElement);
+	vmaxset(vmax);
+        if (found)
+            return i;
+    }
+    return -1; /* not found */
+}
+
 /* duplicate RHS value of complex assignment if necessary to prevent cycles */
 INLINE_FUN SEXP R_FixupRHS(SEXP x, SEXP y)
 {
diff --git a/src/include/Rinterface.h b/src/include/Rinterface.h
index ca4fbd2..1f0df07 100644
--- a/src/include/Rinterface.h
+++ b/src/include/Rinterface.h
@@ -1,7 +1,7 @@
 /*
  *  R : A Computer Language for Statistical Data Analysis
  *  Copyright (C) 1995, 1996  Robert Gentleman and Ross Ihaka
- *  Copyright (C) 1998--2006  The R Core Team.
+ *  Copyright (C) 1998--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
@@ -15,7 +15,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  */
 
 /* This header file is to provide hooks for alternative front-ends,
@@ -24,20 +24,30 @@
 
    It should not be included by package sources unless they are
    providing such a front-end.
+
+   If CSTACK_DEFNS is defined, also define HAVE_UINTPTR_T (if true)
+   before including this, perhaps by including Rconfig.h from C code
+   (for C++ you need to test the C++ compiler in use).
 */
 
 #ifndef RINTERFACE_H_
 #define RINTERFACE_H_
 
+#include <R_ext/Boolean.h>
+
 #ifdef __cplusplus
-#include <cstdio>
+/* we do not support DO_NOT_USE_CXX_HEADERS in this file */
+# include <cstdio>
 extern "C" {
 #else
-#include <stdio.h>
+# include <stdio.h>
 #endif
 
-#include <R_ext/Boolean.h>
-#include <R_ext/RStartup.h>
+#if defined(__GNUC__) && __GNUC__ >= 3
+# define NORET __attribute__((noreturn))
+#else
+# define NORET
+#endif
 
 /* from Defn.h */
 /* this duplication will be removed in due course */
@@ -64,9 +74,11 @@ extern char *R_Home;		    /* Root of the R tree */
 # define jump_to_toplevel	Rf_jump_to_toplevel
 # define mainloop		Rf_mainloop
 # define onintr			Rf_onintr
-void jump_to_toplevel(void);
+# define onintrNoResume		Rf_onintrNoResume
+void NORET jump_to_toplevel(void);
 void mainloop(void);
 void onintr(void);
+void onintrNoResume(void);
 #ifndef DEFN_H_
 extern void* R_GlobalContext;    /* Need opaque pointer type for export */
 #endif
@@ -75,18 +87,33 @@ void process_site_Renviron(void);
 void process_system_Renviron(void);
 void process_user_Renviron(void);
 
+#ifdef __cplusplus
+extern std::FILE * R_Consolefile;
+extern std::FILE * R_Outputfile;
+#else
 extern FILE * R_Consolefile;
 extern FILE * R_Outputfile;
+#endif
 
-
-/* in sys-unix.c */
+/* in ../unix/sys-unix.c */
 void R_setStartTime(void);
 void fpu_setup(Rboolean);
 
+/* in ../unix/system.c */
+extern int R_running_as_main_program;
+
 #ifdef CSTACK_DEFNS
-/* duplicating Defn.h */
+/* duplicating older Defn.h.
+   Note: this is never used when including Rinterface.h from R itself
+*/
 #if !defined(HAVE_UINTPTR_T) && !defined(uintptr_t)
  typedef unsigned long uintptr_t;
+#else
+# ifndef __cplusplus
+#  include <stdint.h>
+# elif __cplusplus >= 201103L
+#  include <cstdint>
+# endif
 #endif
 
 extern uintptr_t R_CStackLimit;	/* C stack limit */
@@ -96,7 +123,8 @@ extern uintptr_t R_CStackStart;	/* Initial stack address */
 /* formerly in src/unix/devUI.h */
 
 #ifdef R_INTERFACE_PTRS
-#include <Rinternals.h>
+#include <Rinternals.h> // for SEXP
+#include <R_ext/RStartup.h> // for SA_TYPE
 
 #ifdef __SYSTEM__
 # define extern
diff --git a/src/include/Rinternals.h b/src/include/Rinternals.h
index d23e264..27da70d 100644
--- a/src/include/Rinternals.h
+++ b/src/include/Rinternals.h
@@ -1,13 +1,17 @@
 /*
  *  R : A Computer Language for Statistical Data Analysis
  *  Copyright (C) 1995, 1996  Robert Gentleman and Ross Ihaka
- *  Copyright (C) 1999-2014   The R Core Team.
+ *  Copyright (C) 1999-2017   The R Core Team.
  *
- *  This program is free software; you can redistribute it and/or modify
+ *  This header file is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU Lesser General Public License as published by
  *  the Free Software Foundation; either version 2.1 of the License, or
  *  (at your option) any later version.
  *
+ *  This file is part of R. R is distributed under the terms of the
+ *  GNU General Public License, either Version 2, June 1991 or Version 3,
+ *  June 2007. See doc/COPYRIGHTS for details of the copyright status of R.
+ *  
  *  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
@@ -15,7 +19,7 @@
  *
  *  You should have received a copy of the GNU Lesser General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  */
 
 /* This file is installed and available to packages, but only a small
@@ -28,23 +32,23 @@
 
 #ifdef __cplusplus
 # include <cstdio>
-# ifdef __SUNPRO_CC
-using std::FILE;
-# endif
 # include <climits>
+# include <cstddef>
 extern "C" {
 #else
 # include <stdio.h>
 # include <limits.h> /* for INT_MAX */
+# include <stddef.h> /* for ptrdiff_t, which is required by C99 */
 #endif
 
 #include <R_ext/Arith.h>
 #include <R_ext/Boolean.h>
 #include <R_ext/Complex.h>
-#include <R_ext/Error.h>
+#include <R_ext/Error.h>  // includes NORET macro
 #include <R_ext/Memory.h>
 #include <R_ext/Utils.h>
 #include <R_ext/Print.h>
+#include <R_ext/Rdynload.h> // for DL_FUNC
 
 #include <R_ext/libextern.h>
 
@@ -87,6 +91,10 @@ typedef int R_len_t;
  *			--> TypeTable[] in ../main/util.c for  typeof()
  */
 
+/* UUID identifying the internals version -- packages using compiled
+   code should be re-installed when this changes */
+#define R_INTERNALS_UUID "0310d4b8-ccb1-4bb8-ba94-d36a55f60262"
+
 /*  These exact numeric values are seldom used, but they are, e.g., in
  *  ../main/subassign.c, and they are serialized.
 */
@@ -130,7 +138,7 @@ typedef unsigned int SEXPTYPE;
 #define S4SXP       25    /* S4, non-vector */
 
 /* used for detecting PROTECT issues in memory.c */
-#define NEWSXP      30    /* fresh node creaed in new page */
+#define NEWSXP      30    /* fresh node created in new page */
 #define FREESXP     31    /* node released by GC */
 
 #define FUNSXP      99    /* Closure or Builtin or Special */
@@ -171,6 +179,10 @@ typedef enum {
 } SEXPTYPE;
 #endif
 
+/* These are also used with the write barrier on, in attrib.c and util.c */
+#define TYPE_BITS 5
+#define MAX_NUM_SEXPTYPE (1<<TYPE_BITS)
+
 // ======================= USE_RINTERNALS section
 #ifdef USE_RINTERNALS
 /* This is intended for use only within R itself.
@@ -183,7 +195,7 @@ typedef enum {
 
 
 struct sxpinfo_struct {
-    SEXPTYPE type      :  5;/* ==> (FUNSXP == 99) %% 2^5 == 3 == CLOSXP
+    SEXPTYPE type      :  TYPE_BITS;/* ==> (FUNSXP == 99) %% 2^5 == 3 == CLOSXP
 			     * -> warning: `type' is narrower than values
 			     *              of its type
 			     * when SEXPTYPE was an enum */
@@ -320,9 +332,23 @@ typedef union { VECTOR_SEXPREC s; double align; } SEXPREC_ALIGN;
 #define SET_S4_OBJECT(x) (((x)->sxpinfo.gp) |= S4_OBJECT_MASK)
 #define UNSET_S4_OBJECT(x) (((x)->sxpinfo.gp) &= ~S4_OBJECT_MASK)
 
+/* JIT optimization support */
+#define NOJIT_MASK ((unsigned short)(1<<5))
+#define NOJIT(x) ((x)->sxpinfo.gp & NOJIT_MASK)
+#define SET_NOJIT(x) (((x)->sxpinfo.gp) |= NOJIT_MASK)
+#define MAYBEJIT_MASK ((unsigned short)(1<<6))
+#define MAYBEJIT(x) ((x)->sxpinfo.gp & MAYBEJIT_MASK)
+#define SET_MAYBEJIT(x) (((x)->sxpinfo.gp) |= MAYBEJIT_MASK)
+#define UNSET_MAYBEJIT(x) (((x)->sxpinfo.gp) &= ~MAYBEJIT_MASK)
+
+/* Growable vector support */
+#define GROWABLE_MASK ((unsigned short)(1<<5))
+#define GROWABLE_BIT_SET(x) ((x)->sxpinfo.gp & GROWABLE_MASK)
+#define SET_GROWABLE_BIT(x) (((x)->sxpinfo.gp) |= GROWABLE_MASK)
+#define IS_GROWABLE(x) (GROWABLE_BIT_SET(x) && XLENGTH(x) < XTRUELENGTH(x))
+
 /* Vector Access Macros */
 #ifdef LONG_VECTOR_SUPPORT
-    R_len_t R_BadLongVector(SEXP, const char *, int);
 # define IS_LONG_VEC(x) (SHORT_VEC_LENGTH(x) == R_LONG_VEC_TOKEN)
 # define SHORT_VEC_LENGTH(x) (((VECSEXP) (x))->vecsxp.length)
 # define SHORT_VEC_TRUELENGTH(x) (((VECSEXP) (x))->vecsxp.truelength)
@@ -352,6 +378,7 @@ typedef union { VECTOR_SEXPREC s; double align; } SEXPREC_ALIGN;
   } while (0)
 # define IS_SCALAR(x, type) (TYPEOF(x) == (type) && SHORT_VEC_LENGTH(x) == 1)
 #else
+# define SHORT_VEC_LENGTH(x) (((VECSEXP) (x))->vecsxp.length)
 # define LENGTH(x)	(((VECSEXP) (x))->vecsxp.length)
 # define TRUELENGTH(x)	(((VECSEXP) (x))->vecsxp.truelength)
 # define XLENGTH(x) LENGTH(x)
@@ -389,6 +416,7 @@ typedef union { VECTOR_SEXPREC s; double align; } SEXPREC_ALIGN;
 #define CDAR(e)		CDR(CAR(e))
 #define CADR(e)		CAR(CDR(e))
 #define CDDR(e)		CDR(CDR(e))
+#define CDDDR(e)	CDR(CDR(CDR(e)))
 #define CADDR(e)	CAR(CDR(CDR(e)))
 #define CADDDR(e)	CAR(CDR(CDR(CDR(e))))
 #define CAD4R(e)	CAR(CDR(CDR(CDR(CDR(e)))))
@@ -435,7 +463,7 @@ typedef struct SEXPREC *SEXP;
 #define CHAR(x)		R_CHAR(x)
 const char *(R_CHAR)(SEXP x);
 
-/* Various tests with macro versions in the USE_RINTERNALS section */
+/* Various tests with macro versions in the second USE_RINTERNALS section */
 Rboolean (Rf_isNull)(SEXP s);
 Rboolean (Rf_isSymbol)(SEXP s);
 Rboolean (Rf_isLogical)(SEXP s);
@@ -449,6 +477,9 @@ Rboolean (Rf_isObject)(SEXP s);
 # define IS_SCALAR(x, type) (TYPEOF(x) == (type) && XLENGTH(x) == 1)
 #endif /* USE_RINTERNALS */
 
+#define IS_SIMPLE_SCALAR(x, type) \
+    (IS_SCALAR(x, type) && ATTRIB(x) == R_NilValue)
+
 #define NAMEDMAX 2
 #define INCREMENT_NAMED(x) do {				\
 	SEXP __x__ = (x);				\
@@ -494,6 +525,7 @@ Rboolean (Rf_isObject)(SEXP s);
 # define MARK_NOT_MUTABLE(x) SET_NAMED(x, NAMEDMAX)
 #endif
 #define MAYBE_REFERENCED(x) (! NO_REFERENCES(x))
+#define NOT_SHARED(x) (! MAYBE_SHARED(x))
 
 /* Complex assignment support */
 /* temporary definition that will need to be refined to distinguish
@@ -518,12 +550,24 @@ void (SET_TYPEOF)(SEXP x, int v);
 void (SET_NAMED)(SEXP x, int v);
 void SET_ATTRIB(SEXP x, SEXP v);
 void DUPLICATE_ATTRIB(SEXP to, SEXP from);
+void SHALLOW_DUPLICATE_ATTRIB(SEXP to, SEXP from);
 
 /* S4 object testing */
 int (IS_S4_OBJECT)(SEXP x);
 void (SET_S4_OBJECT)(SEXP x);
 void (UNSET_S4_OBJECT)(SEXP x);
 
+/* JIT optimization support */
+int (NOJIT)(SEXP x);
+int (MAYBEJIT)(SEXP x);
+void (SET_NOJIT)(SEXP x);
+void (SET_MAYBEJIT)(SEXP x);
+void (UNSET_MAYBEJIT)(SEXP x);
+
+/* Growable vector support */
+int (IS_GROWABLE)(SEXP x);
+void (SET_GROWABLE_BIT)(SEXP x);
+
 /* Vector Access Functions */
 int  (LENGTH)(SEXP x);
 int  (TRUELENGTH)(SEXP x);
@@ -545,7 +589,11 @@ SEXP (VECTOR_ELT)(SEXP x, R_xlen_t i);
 void SET_STRING_ELT(SEXP x, R_xlen_t i, SEXP v);
 SEXP SET_VECTOR_ELT(SEXP x, R_xlen_t i, SEXP v);
 SEXP *(STRING_PTR)(SEXP x);
-SEXP *(VECTOR_PTR)(SEXP x);
+SEXP * NORET (VECTOR_PTR)(SEXP x);
+
+#ifdef LONG_VECTOR_SUPPORT
+    R_len_t NORET R_BadLongVector(SEXP, const char *, int);
+#endif
 
 /* List Access Functions */
 /* These also work for ... objects */
@@ -558,6 +606,7 @@ SEXP (CAAR)(SEXP e);
 SEXP (CDAR)(SEXP e);
 SEXP (CADR)(SEXP e);
 SEXP (CDDR)(SEXP e);
+SEXP (CDDDR)(SEXP e);
 SEXP (CADDR)(SEXP e);
 SEXP (CADDDR)(SEXP e);
 SEXP (CAD4R)(SEXP e);
@@ -666,6 +715,9 @@ LibExtern SEXP	R_Srcref;           /* Current srcref, for debuggers */
 LibExtern SEXP	R_NilValue;	    /* The nil object */
 LibExtern SEXP	R_UnboundValue;	    /* Unbound marker */
 LibExtern SEXP	R_MissingArg;	    /* Missing argument marker */
+LibExtern SEXP	R_InBCInterpreter;  /* To be found in BC interp. state
+				       (marker) */
+LibExtern SEXP	R_CurrentExpression; /* Use current expression (marker) */
 #ifdef __MAIN__
 attribute_hidden
 #else
@@ -674,37 +726,49 @@ extern
 SEXP	R_RestartToken;     /* Marker for restarted function calls */
 
 /* Symbol Table Shortcuts */
+LibExtern SEXP	R_AsCharacterSymbol;/* "as.character" */
+LibExtern SEXP	R_baseSymbol; // <-- backcompatible version of:
+LibExtern SEXP	R_BaseSymbol;	// "base"
+LibExtern SEXP	R_BraceSymbol;	    /* "{" */
 LibExtern SEXP	R_Bracket2Symbol;   /* "[[" */
 LibExtern SEXP	R_BracketSymbol;    /* "[" */
-LibExtern SEXP	R_BraceSymbol;      /* "{" */
 LibExtern SEXP	R_ClassSymbol;	    /* "class" */
-LibExtern SEXP	R_DeviceSymbol;     /* ".Device" */
+LibExtern SEXP	R_DeviceSymbol;	    /* ".Device" */
 LibExtern SEXP	R_DimNamesSymbol;   /* "dimnames" */
 LibExtern SEXP	R_DimSymbol;	    /* "dim" */
 LibExtern SEXP	R_DollarSymbol;	    /* "$" */
 LibExtern SEXP	R_DotsSymbol;	    /* "..." */
+LibExtern SEXP	R_DoubleColonSymbol;// "::"
 LibExtern SEXP	R_DropSymbol;	    /* "drop" */
 LibExtern SEXP	R_LastvalueSymbol;  /* ".Last.value" */
 LibExtern SEXP	R_LevelsSymbol;	    /* "levels" */
 LibExtern SEXP	R_ModeSymbol;	    /* "mode" */
+LibExtern SEXP	R_NaRmSymbol;	    /* "na.rm" */
 LibExtern SEXP	R_NameSymbol;	    /* "name" */
 LibExtern SEXP	R_NamesSymbol;	    /* "names" */
-LibExtern SEXP	R_NaRmSymbol;	    /* "na.rm" */
-LibExtern SEXP  R_PackageSymbol;    /* "package" */
-LibExtern SEXP  R_QuoteSymbol;	    /* "quote" */
+LibExtern SEXP	R_NamespaceEnvSymbol;// ".__NAMESPACE__."
+LibExtern SEXP	R_PackageSymbol;    /* "package" */
+LibExtern SEXP	R_PreviousSymbol;   /* "previous" */
+LibExtern SEXP	R_QuoteSymbol;	    /* "quote" */
 LibExtern SEXP	R_RowNamesSymbol;   /* "row.names" */
 LibExtern SEXP	R_SeedsSymbol;	    /* ".Random.seed" */
-LibExtern SEXP	R_SourceSymbol;     /* "source" */
+LibExtern SEXP	R_SortListSymbol;   /* "sort.list" */
+LibExtern SEXP	R_SourceSymbol;	    /* "source" */
+LibExtern SEXP	R_SpecSymbol;	// "spec"
+LibExtern SEXP	R_TripleColonSymbol;// ":::"
 LibExtern SEXP	R_TspSymbol;	    /* "tsp" */
 
 LibExtern SEXP  R_dot_defined;      /* ".defined" */
 LibExtern SEXP  R_dot_Method;       /* ".Method" */
+LibExtern SEXP	R_dot_packageName;// ".packageName"
 LibExtern SEXP  R_dot_target;       /* ".target" */
+LibExtern SEXP  R_dot_Generic;      /* ".Generic" */
 
 /* Missing Values - others from Arith.h */
 #define NA_STRING	R_NaString
 LibExtern SEXP	R_NaString;	    /* NA_STRING as a CHARSXP */
 LibExtern SEXP	R_BlankString;	    /* "" as a CHARSXP */
+LibExtern SEXP	R_BlankScalarString;	    /* "" as a STRSXP */
 
 /* srcref related functions */
 SEXP R_GetCurrentSrcref(int);
@@ -733,8 +797,14 @@ typedef struct R_allocator R_allocator_t;
 /* Other Internally Used Functions, excluding those which are inline-able*/
 
 char * Rf_acopy_string(const char *);
+void Rf_addMissingVarsToNewEnv(SEXP, SEXP);
 SEXP Rf_alloc3DArray(SEXPTYPE, int, int, int);
 SEXP Rf_allocArray(SEXPTYPE, SEXP);
+SEXP Rf_allocFormalsList2(SEXP sym1, SEXP sym2);
+SEXP Rf_allocFormalsList3(SEXP sym1, SEXP sym2, SEXP sym3);
+SEXP Rf_allocFormalsList4(SEXP sym1, SEXP sym2, SEXP sym3, SEXP sym4);
+SEXP Rf_allocFormalsList5(SEXP sym1, SEXP sym2, SEXP sym3, SEXP sym4, SEXP sym5);
+SEXP Rf_allocFormalsList6(SEXP sym1, SEXP sym2, SEXP sym3, SEXP sym4, SEXP sym5, SEXP sym6);
 SEXP Rf_allocMatrix(SEXPTYPE, int, int);
 SEXP Rf_allocList(int);
 SEXP Rf_allocS4Object(void);
@@ -747,6 +817,7 @@ SEXP Rf_arraySubscript(int, SEXP, SEXP, SEXP (*)(SEXP,SEXP),
                        SEXP (*)(SEXP, int), SEXP);
 SEXP Rf_classgets(SEXP, SEXP);
 SEXP Rf_cons(SEXP, SEXP);
+SEXP Rf_fixSubset3Args(SEXP, SEXP, SEXP, SEXP*);
 void Rf_copyMatrix(SEXP, SEXP, Rboolean);
 void Rf_copyListMatrix(SEXP, SEXP, Rboolean);
 void Rf_copyMostAttrib(SEXP, SEXP);
@@ -765,6 +836,8 @@ SEXP Rf_duplicated(SEXP, Rboolean);
 Rboolean R_envHasNoSpecialSymbols(SEXP);
 SEXP Rf_eval(SEXP, SEXP);
 SEXP Rf_findFun(SEXP, SEXP);
+SEXP Rf_findFun3(SEXP, SEXP, SEXP);
+void Rf_findFunctionForBody(SEXP);
 SEXP Rf_findVar(SEXP, SEXP);
 SEXP Rf_findVarInFrame(SEXP, SEXP);
 SEXP Rf_findVarInFrame3(SEXP, SEXP, Rboolean);
@@ -779,13 +852,18 @@ int Rf_GetOptionWidth(void);
 SEXP Rf_GetRowNames(SEXP);
 void Rf_gsetVar(SEXP, SEXP, SEXP);
 SEXP Rf_install(const char *);
+SEXP Rf_installChar(SEXP);
+SEXP Rf_installDDVAL(int i);
+SEXP Rf_installS3Signature(const char *, const char *);
 Rboolean Rf_isFree(SEXP);
 Rboolean Rf_isOrdered(SEXP);
+Rboolean Rf_isUnmodifiedSpecSym(SEXP sym, SEXP env);
 Rboolean Rf_isUnordered(SEXP);
 Rboolean Rf_isUnsorted(SEXP, Rboolean);
 SEXP Rf_lengthgets(SEXP, R_len_t);
 SEXP Rf_xlengthgets(SEXP, R_xlen_t);
 SEXP R_lsInternal(SEXP, Rboolean);
+SEXP R_lsInternal3(SEXP, Rboolean, Rboolean);
 SEXP Rf_match(SEXP, SEXP, int);
 SEXP Rf_matchE(SEXP, SEXP, int, SEXP);
 SEXP Rf_namesgets(SEXP, SEXP);
@@ -796,15 +874,23 @@ int Rf_ncols(SEXP);
 int Rf_nrows(SEXP);
 SEXP Rf_nthcdr(SEXP, int);
 
+// ../main/character.c :
+typedef enum {Bytes, Chars, Width} nchar_type;
+int R_nchar(SEXP string, nchar_type type_,
+	    Rboolean allowNA, Rboolean keepNA, const char* msg_name);
+
 Rboolean Rf_pmatch(SEXP, SEXP, Rboolean);
 Rboolean Rf_psmatch(const char *, const char *, Rboolean);
+SEXP R_ParseEvalString(const char *, SEXP);
 void Rf_PrintValue(SEXP);
 #ifndef INLINE_PROTECT
 SEXP Rf_protect(SEXP);
 #endif
+void Rf_readS3VarsFromFrame(SEXP, SEXP*, SEXP*, SEXP*, SEXP*, SEXP*, SEXP*);
 SEXP Rf_setAttrib(SEXP, SEXP, SEXP);
 void Rf_setSVector(SEXP*, int, SEXP);
 void Rf_setVar(SEXP, SEXP, SEXP);
+SEXP Rf_stringSuffix(SEXP, int);
 SEXPTYPE Rf_str2type(const char *);
 Rboolean Rf_StringBlank(SEXP);
 SEXP Rf_substitute(SEXP,SEXP);
@@ -812,15 +898,17 @@ const char * Rf_translateChar(SEXP);
 const char * Rf_translateChar0(SEXP);
 const char * Rf_translateCharUTF8(SEXP);
 const char * Rf_type2char(SEXPTYPE);
+SEXP Rf_type2rstr(SEXPTYPE);
 SEXP Rf_type2str(SEXPTYPE);
+SEXP Rf_type2str_nowarn(SEXPTYPE);
 #ifndef INLINE_PROTECT
 void Rf_unprotect(int);
 #endif
 void Rf_unprotect_ptr(SEXP);
 
-void R_signal_protect_error(void);
-void R_signal_unprotect_error(void);
-void R_signal_reprotect_error(PROTECT_INDEX i);
+void NORET R_signal_protect_error(void);
+void NORET R_signal_unprotect_error(void);
+void NORET R_signal_reprotect_error(PROTECT_INDEX i);
 
 #ifndef INLINE_PROTECT
 void R_ProtectWithIndex(SEXP, PROTECT_INDEX *);
@@ -851,7 +939,7 @@ SEXP Rf_mkCharCE(const char *, cetype_t);
 SEXP Rf_mkCharLenCE(const char *, int, cetype_t);
 const char *Rf_reEnc(const char *x, cetype_t ce_in, cetype_t ce_out, int subst);
 
-				/* return(.) NOT reached : for -Wall */
+				/* match(.) NOT reached : for -Wall */
 #define error_return(msg)	{ Rf_error(msg);	   return R_NilValue; }
 #define errorcall_return(cl,msg){ Rf_errorcall(cl, msg);   return R_NilValue; }
 
@@ -860,6 +948,9 @@ const char *Rf_reEnc(const char *x, cetype_t ce_in, cetype_t ce_out, int subst);
 #undef LibExtern
 #endif
 
+/* Calling a function with arguments evaluated */
+SEXP R_forceAndCall(SEXP e, int n, SEXP rho);
+
 /* External pointer interface */
 SEXP R_MakeExternalPtr(void *p, SEXP tag, SEXP prot);
 void *R_ExternalPtrAddr(SEXP s);
@@ -869,6 +960,9 @@ void R_ClearExternalPtr(SEXP s);
 void R_SetExternalPtrAddr(SEXP s, void *p);
 void R_SetExternalPtrTag(SEXP s, SEXP tag);
 void R_SetExternalPtrProtected(SEXP s, SEXP p);
+// Added in R 3.4.0
+SEXP R_MakeExternalPtrFn(DL_FUNC p, SEXP tag, SEXP prot);
+DL_FUNC R_ExternalPtrAddrFn(SEXP s);
 
 /* Finalization interface */
 typedef void (*R_CFinalizer_t)(SEXP);
@@ -887,9 +981,13 @@ void R_RunWeakRefFinalizer(SEXP w);
 
 SEXP R_PromiseExpr(SEXP);
 SEXP R_ClosureExpr(SEXP);
+SEXP R_BytecodeExpr(SEXP e);
 void R_initialize_bcode(void);
 SEXP R_bcEncode(SEXP);
 SEXP R_bcDecode(SEXP);
+void R_registerBC(SEXP, SEXP);
+Rboolean R_checkConstants(Rboolean);
+Rboolean R_BCVersionOK(SEXP);
 #define PREXPR(e) R_PromiseExpr(e)
 #define BODY_EXPR(e) R_ClosureExpr(e)
 
@@ -897,6 +995,12 @@ SEXP R_bcDecode(SEXP);
 Rboolean R_ToplevelExec(void (*fun)(void *), void *data);
 SEXP R_ExecWithCleanup(SEXP (*fun)(void *), void *data,
 		       void (*cleanfun)(void *), void *cleandata);
+SEXP R_tryCatch(SEXP (*)(void *), void *,       /* body closure*/
+		SEXP,                           /* condition classes (STRSXP) */
+		SEXP (*)(SEXP, void *), void *, /* handler closure */
+		void (*)(void *), void *);      /* finally closure */
+SEXP R_tryCatchError(SEXP (*)(void *), void *,        /* body closure*/
+		     SEXP (*)(SEXP, void *), void *); /* handler closure */
 
 /* Environment and Binding Features */
 void R_RestoreHashCount(SEXP rho);
@@ -941,7 +1045,8 @@ typedef enum {
     R_pstream_any_format,
     R_pstream_ascii_format,
     R_pstream_binary_format,
-    R_pstream_xdr_format
+    R_pstream_xdr_format,
+    R_pstream_asciihex_format
 } R_pstream_format_t;
 
 typedef struct R_outpstream_st *R_outpstream_t;
@@ -976,12 +1081,21 @@ void R_InitOutPStream(R_outpstream_t stream, R_pstream_data_t data,
 		      void (*outbytes)(R_outpstream_t, void *, int),
 		      SEXP (*phook)(SEXP, SEXP), SEXP pdata);
 
+#ifdef __cplusplus
+void R_InitFileInPStream(R_inpstream_t stream, std::FILE *fp,
+			 R_pstream_format_t type,
+			 SEXP (*phook)(SEXP, SEXP), SEXP pdata);
+void R_InitFileOutPStream(R_outpstream_t stream, std::FILE *fp,
+			  R_pstream_format_t type, int version,
+			  SEXP (*phook)(SEXP, SEXP), SEXP pdata);
+#else
 void R_InitFileInPStream(R_inpstream_t stream, FILE *fp,
 			 R_pstream_format_t type,
 			 SEXP (*phook)(SEXP, SEXP), SEXP pdata);
 void R_InitFileOutPStream(R_outpstream_t stream, FILE *fp,
 			  R_pstream_format_t type, int version,
 			  SEXP (*phook)(SEXP, SEXP), SEXP pdata);
+#endif
 
 #ifdef NEED_CONNECTION_PSTREAMS
 /* The connection interface is not available to packages.  To
@@ -1006,10 +1120,16 @@ SEXP R_Unserialize(R_inpstream_t ips);
 SEXP R_do_slot(SEXP obj, SEXP name);
 SEXP R_do_slot_assign(SEXP obj, SEXP name, SEXP value);
 int R_has_slot(SEXP obj, SEXP name);
+/* S3-S4 class (inheritance), attrib.c */
+SEXP R_S4_extends(SEXP klass, SEXP useTable);
 
 /* class definition, new objects (objects.c) */
 SEXP R_do_MAKE_CLASS(const char *what);
 SEXP R_getClassDef  (const char *what);
+SEXP R_getClassDef_R(SEXP what);
+Rboolean R_has_methods_attached(void);
+Rboolean R_isVirtualClass(SEXP class_def, SEXP env);
+Rboolean R_extends  (SEXP class1, SEXP class2, SEXP env);
 SEXP R_do_new_object(SEXP class_def);
 /* supporting  a C-level version of  is(., .) : */
 int R_check_class_and_super(SEXP x, const char **valid, SEXP rho);
@@ -1025,28 +1145,44 @@ void R_RunExitFinalizers(void);	/* in memory.c */
 
 /* Replacements for popen and system */
 #ifdef HAVE_POPEN
+# ifdef __cplusplus
+std::FILE *R_popen(const char *, const char *);
+# else
 FILE *R_popen(const char *, const char *);
+# endif
 #endif
 int R_system(const char *);
 
 /* R_compute_identical:  C version of identical() function
    The third arg to R_compute_identical() consists of bitmapped flags for non-default options:
-   currently all default to TRUE, so the flag is set for FALSE values:
+   currently the first 4 default to TRUE, so the flag is set for FALSE values:
    1 = !NUM_EQ
    2 = !SINGLE_NA
    4 = !ATTR_AS_SET
    8 = !IGNORE_BYTECODE
+  16 = !IGNORE_ENV
+  Default from R's default: 16
 */
 Rboolean R_compute_identical(SEXP, SEXP, int);
 
+SEXP R_body_no_src(SEXP x); // body(x) without "srcref" etc, ../main/utils.c
+
 /* C version of R's  indx <- order(..., na.last, decreasing) :
    e.g.  arglist = Rf_lang2(x,y)  or  Rf_lang3(x,y,z) */
-void R_orderVector(int *indx, int n, SEXP arglist, Rboolean nalast, Rboolean decreasing);
+void R_orderVector (int *indx, int n, SEXP arglist, Rboolean nalast, Rboolean decreasing);
+// C version of R's  indx <- order(x, na.last, decreasing) :
+void R_orderVector1(int *indx, int n, SEXP x,       Rboolean nalast, Rboolean decreasing);
 
 #ifndef R_NO_REMAP
 #define acopy_string		Rf_acopy_string
+#define addMissingVarsToNewEnv	Rf_addMissingVarsToNewEnv
 #define alloc3DArray            Rf_alloc3DArray
 #define allocArray		Rf_allocArray
+#define allocFormalsList2	Rf_allocFormalsList2
+#define allocFormalsList3	Rf_allocFormalsList3
+#define allocFormalsList4	Rf_allocFormalsList4
+#define allocFormalsList5	Rf_allocFormalsList5
+#define allocFormalsList6	Rf_allocFormalsList6
 #define allocList		Rf_allocList
 #define allocMatrix		Rf_allocMatrix
 #define allocS4Object		Rf_allocS4Object
@@ -1068,6 +1204,7 @@ void R_orderVector(int *indx, int n, SEXP arglist, Rboolean nalast, Rboolean dec
 #define coerceVector		Rf_coerceVector
 #define conformable		Rf_conformable
 #define cons			Rf_cons
+#define fixSubset3Args		Rf_fixSubset3Args
 #define copyListMatrix		Rf_copyListMatrix
 #define copyMatrix		Rf_copyMatrix
 #define copyMostAttrib		Rf_copyMostAttrib
@@ -1084,6 +1221,8 @@ void R_orderVector(int *indx, int n, SEXP arglist, Rboolean nalast, Rboolean dec
 #define errorcall		Rf_errorcall
 #define eval			Rf_eval
 #define findFun			Rf_findFun
+#define findFun3		Rf_findFun3
+#define findFunctionForBody	Rf_findFunctionForBody
 #define findVar			Rf_findVar
 #define findVarInFrame		Rf_findVarInFrame
 #define findVarInFrame3		Rf_findVarInFrame3
@@ -1100,6 +1239,9 @@ void R_orderVector(int *indx, int n, SEXP arglist, Rboolean nalast, Rboolean dec
 #define gsetVar			Rf_gsetVar
 #define inherits		Rf_inherits
 #define install			Rf_install
+#define installChar		Rf_installChar
+#define installDDVAL		Rf_installDDVAL
+#define installS3Signature	Rf_installS3Signature
 #define isArray			Rf_isArray
 #define isBasicClass            Rf_isBasicClass
 #define isComplex		Rf_isComplex
@@ -1127,6 +1269,7 @@ void R_orderVector(int *indx, int n, SEXP arglist, Rboolean nalast, Rboolean dec
 #define isS4			Rf_isS4
 #define isString		Rf_isString
 #define isTs			Rf_isTs
+#define isUnmodifiedSpecSym	Rf_isUnmodifiedSpecSym
 #define isUnordered		Rf_isUnordered
 #define isUnsorted		Rf_isUnsorted
 #define isUserBinop		Rf_isUserBinop
@@ -1152,6 +1295,7 @@ void R_orderVector(int *indx, int n, SEXP arglist, Rboolean nalast, Rboolean dec
 #define list3			Rf_list3
 #define list4			Rf_list4
 #define list5			Rf_list5
+#define list6			Rf_list6
 #define listAppend		Rf_listAppend
 #define match			Rf_match
 #define matchE			Rf_matchE
@@ -1172,6 +1316,7 @@ void R_orderVector(int *indx, int n, SEXP arglist, Rboolean nalast, Rboolean dec
 #define psmatch			Rf_psmatch
 #define PrintValue		Rf_PrintValue
 #define protect			Rf_protect
+#define readS3VarsFromFrame	Rf_readS3VarsFromFrame
 #define reEnc			Rf_reEnc
 #define rownamesgets		Rf_rownamesgets
 #define S3Class                 Rf_S3Class
@@ -1186,13 +1331,18 @@ void R_orderVector(int *indx, int n, SEXP arglist, Rboolean nalast, Rboolean dec
 #define setVar			Rf_setVar
 #define shallow_duplicate	Rf_shallow_duplicate
 #define str2type		Rf_str2type
+#define stringSuffix		Rf_stringSuffix
+#define stringPositionTr	Rf_stringPositionTr
 #define StringBlank		Rf_StringBlank
 #define substitute		Rf_substitute
+#define topenv		        Rf_topenv
 #define translateChar		Rf_translateChar
 #define translateChar0		Rf_translateChar0
 #define translateCharUTF8      	Rf_translateCharUTF8
 #define type2char		Rf_type2char
+#define type2rstr		Rf_type2rstr
 #define type2str		Rf_type2str
+#define type2str_nowarn		Rf_type2str_nowarn
 #define unprotect		Rf_unprotect
 #define unprotect_ptr		Rf_unprotect_ptr
 #define VectorToPairList	Rf_VectorToPairList
@@ -1252,10 +1402,12 @@ SEXP	 Rf_list2(SEXP, SEXP);
 SEXP	 Rf_list3(SEXP, SEXP, SEXP);
 SEXP	 Rf_list4(SEXP, SEXP, SEXP, SEXP);
 SEXP	 Rf_list5(SEXP, SEXP, SEXP, SEXP, SEXP);
+SEXP	 Rf_list6(SEXP, SEXP, SEXP, SEXP, SEXP, SEXP);
 SEXP	 Rf_listAppend(SEXP, SEXP);
 SEXP	 Rf_mkNamed(SEXPTYPE, const char **);
 SEXP	 Rf_mkString(const char *);
 int	 Rf_nlevels(SEXP);
+int	 Rf_stringPositionTr(SEXP, const char *);
 SEXP	 Rf_ScalarComplex(Rcomplex);
 SEXP	 Rf_ScalarInteger(int);
 SEXP	 Rf_ScalarLogical(int);
@@ -1296,10 +1448,10 @@ SEXP R_FixupRHS(SEXP x, SEXP y);
 
 /* macro version of R_CheckStack */
 #define R_CheckStack() do {						\
-	void R_SignalCStackOverflow(intptr_t);				\
+	void NORET R_SignalCStackOverflow(intptr_t);				\
 	int dummy;							\
 	intptr_t usage = R_CStackDir * (R_CStackStart - (uintptr_t)&dummy); \
-	if(R_CStackLimit != -1 && usage > ((intptr_t) R_CStackLimit))	\
+	if(R_CStackLimit != (uintptr_t)(-1) && usage > ((intptr_t) R_CStackLimit)) \
 	    R_SignalCStackOverflow(usage);				\
     } while (FALSE)
 #endif
diff --git a/src/include/Rmath.h0.in b/src/include/Rmath.h0.in
index 874a563..3c27938 100644
--- a/src/include/Rmath.h0.in
+++ b/src/include/Rmath.h0.in
@@ -1,6 +1,6 @@
 /* -*- C -*-
  *  Mathlib : A C Library of Special Functions
- *  Copyright (C) 1998-2013  The R Core Team
+ *  Copyright (C) 1998-2016  The R Core Team
  *  Copyright (C) 2004       The R Foundation
  *
  *  This program is free software; you can redistribute it and/or modify
@@ -15,7 +15,7 @@
  *
  *  You should have received a copy of the GNU Lesser General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  *
 
  * Rmath.h  should contain ALL headers from R's C code in `src/nmath'
@@ -31,13 +31,24 @@
 #ifndef RMATH_H
 #define RMATH_H
 
-/* Note that on some systems we need to include math.h before the
-   defines below. */
-#ifndef NO_C_HEADERS
-# define __STDC_WANT_IEC_60559_TYPES_EXT__ 1
+/* needed for cospi etc */
+#ifndef __STDC_WANT_IEC_60559_FUNCS_EXT__
+# define __STDC_WANT_IEC_60559_FUNCS_EXT__ 1
+#endif
+#if defined(__cplusplus) && !defined(DO_NOT_USE_CXX_HEADERS)
+# include <cmath>
+// See comment in R.h
+# ifdef __SUNPRO_CC
+using namespace std;
+# endif
+#else
 # include <math.h>
 #endif
 
+#ifdef NO_C_HEADERS
+# warning "use of NO_C_HEADERS is defunct and will be ignored"
+#endif
+
 /*-- Mathlib as part of R --  define this for standalone : */
 /* #undef MATHLIB_STANDALONE */
 
@@ -218,6 +229,7 @@ double  Rlog1p(double);
 #define choose		Rf_choose
 #define dbeta		Rf_dbeta
 #define dbinom		Rf_dbinom
+#define dbinom_raw	Rf_dbinom_raw
 #define dcauchy		Rf_dcauchy
 #define dchisq		Rf_dchisq
 #define dexp		Rf_dexp
@@ -235,6 +247,7 @@ double  Rlog1p(double);
 #define dnf		Rf_dnf
 #define dnorm4		Rf_dnorm4
 #define dnt		Rf_dnt
+#define dpois_raw	Rf_dpois_raw
 #define dpois		Rf_dpois
 #define dpsifn		Rf_dpsifn
 #define dsignrank	Rf_dsignrank
@@ -257,9 +270,11 @@ double  Rlog1p(double);
 #define lgammafn	Rf_lgammafn
 #define lgammafn_sign	Rf_lgammafn_sign
 #define lgamma1p	Rf_lgamma1p
+#define log1pexp       	Rf_log1pexp
 #define log1pmx		Rf_log1pmx
 #define logspace_add	Rf_logspace_add
 #define logspace_sub	Rf_logspace_sub
+#define logspace_sum	Rf_logspace_sum
 #define pbeta		Rf_pbeta
 #define pbeta_raw	Rf_pbeta_raw
 #define pbinom		Rf_pbinom
@@ -327,8 +342,10 @@ double  Rlog1p(double);
 #define rhyper		Rf_rhyper
 #define rlnorm		Rf_rlnorm
 #define rlogis		Rf_rlogis
+#define rmultinom	Rf_rmultinom
 #define rnbeta		Rf_rnbeta
 #define rnbinom		Rf_rnbinom
+#define rnbinom_mu     	Rf_rnbinom_mu
 #define rnchisq		Rf_rnchisq
 #define rnf		Rf_rnf
 #define rnorm		Rf_rnorm
@@ -394,6 +411,7 @@ double  log1pexp(double); // <-- ../nmath/plogis.c
 double  lgamma1p(double);
 double  logspace_add(double, double);
 double  logspace_sub(double, double);
+double  logspace_sum(const double *, int);
 
 	/* Beta Distribution */
 
@@ -439,6 +457,7 @@ double	rt(double);
 
 	/* Binomial Distribution */
 
+double  dbinom_raw(double x, double n, double p, double q, int give_log);
 double	dbinom(double, double, double, int);
 double	pbinom(double, double, double, int, int);
 double	qbinom(double, double, double, int, int);
@@ -490,6 +509,7 @@ double	rnbinom_mu(double, double);
 
 	/* Poisson Distribution */
 
+double	dpois_raw (double, double, int);
 double	dpois(double, double, int);
 double	ppois(double, double, int, int);
 double	qpois(double, double, int, int);
@@ -603,11 +623,11 @@ double  lgamma1p(double);/* accurate log(gamma(x+1)), small x (0 < x < 0.5) */
 
 /* More accurate cos(pi*x), sin(pi*x), tan(pi*x)
 
-   In future these declarations could clash with system headers if
-   someone had already included math.h with
-   __STDC_WANT_IEC_60559_TYPES_EXT__ defined.
+   These declarations might clash with system headers if someone had
+   already included math.h with __STDC_WANT_IEC_60559_FUNCS_EXT__
+   defined (and we try, above).
    We can add a check for that via the value of
-   __STDC_IEC_60559_FUNCS__ (>= 201ymmL, exact value not yet known).
+   __STDC_IEC_60559_FUNCS__ (>= 201506L).
 */
 double cospi(double);
 double sinpi(double);
@@ -638,7 +658,7 @@ double  logspace_sub(double logx, double logy);
 /* second is defined by nmath.h */
 
 /* If isnan is a macro, as C99 specifies, the C++
-   math header will undefine it. This happens on OS X */
+   math header will undefine it. This happens on macOS */
 # ifdef __cplusplus
   int R_isnancpp(double); /* in mlutils.c */
 #  define ISNAN(x)     R_isnancpp(x)
diff --git a/src/include/Rmodules/RX11.h b/src/include/Rmodules/RX11.h
index 293ce5e..e63c1f5 100644
--- a/src/include/Rmodules/RX11.h
+++ b/src/include/Rmodules/RX11.h
@@ -1,10 +1,10 @@
 /*
  *  R : A Computer Language for Statistical Data Analysis
- *  Copyright (C) 2001-5 The R Core Team.
+ *  Copyright (C) 2001-2014 The R Core Team.
  *
  *  This program is free software; you can redistribute it and/or modify
- *  it under the terms of the GNU Lesser General Public License as published by
- *  the Free Software Foundation; either version 2.1 of the License, or
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
  *  (at your option) any later version.
  *
  *  This program is distributed in the hope that it will be useful,
@@ -12,9 +12,9 @@
  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  *  GNU Lesser General Public License for more details.
  *
- *  You should have received a copy of the GNU Lesser General Public License
+ *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  */
 
 /* Definitions for the X11 module.  Not intended for end-user use */
@@ -34,6 +34,8 @@ typedef int (*R_X11_access)(void);
 
 typedef Rboolean (*R_X11clp)(Rclpconn, char*);
 
+typedef const char * (*R_version_t)(void);
+
 
 typedef struct {
     R_do_X11 X11;
@@ -41,6 +43,7 @@ typedef struct {
     R_GetX11ImageRoutine  image;
     R_X11_access access;
     R_X11clp readclp;
+    R_version_t R_pngVersion, R_jpegVersion, R_tiffVersion;
 } R_X11Routines;
 
 typedef struct {
diff --git a/src/include/Rmodules/Rinternet.h b/src/include/Rmodules/Rinternet.h
index 580dee3..619992e 100644
--- a/src/include/Rmodules/Rinternet.h
+++ b/src/include/Rmodules/Rinternet.h
@@ -1,3 +1,22 @@
+/*
+ *  R : A Computer Language for Statistical Data Analysis
+ *  Copyright (C) 2004-2015 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
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, a copy is available at
+ *  https://www.R-project.org/Licenses/
+ */
+
 #ifndef R_INTERNET_MODULE_H
 #define R_INTERNET_MODULE_H
 
@@ -6,7 +25,7 @@
 
 
 typedef SEXP (*R_DownloadRoutine)(SEXP args);
-typedef Rconnection (*R_NewUrlRoutine)(const char *description, const char * const mode);
+typedef Rconnection (*R_NewUrlRoutine)(const char *description, const char * const mode, int method);
 typedef Rconnection (*R_NewSockRoutine)(const char *host, int port, int server, const char *const mode, int timeout); 
 
 typedef void * (*R_HTTPOpenRoutine)(const char *url, const char *headers, const int cacheOK);
@@ -29,6 +48,8 @@ typedef int    (*R_SockSelectRoutine)(int nsock, int *insockfd, int *ready, int
 typedef int    (*R_HTTPDCreateRoutine)(const char *ip, int port);
 typedef void   (*R_HTTPDStopRoutine)();
 
+typedef SEXP (*R_CurlRoutine)(SEXP call, SEXP op, SEXP args, SEXP rho);
+
 typedef struct {
     R_DownloadRoutine download;
     R_NewUrlRoutine   newurl;
@@ -53,6 +74,11 @@ typedef struct {
 
     R_HTTPDCreateRoutine  HTTPDCreate;
     R_HTTPDStopRoutine    HTTPDStop;
+
+    R_CurlRoutine curlVersion;
+    R_CurlRoutine curlGetHeaders;
+    R_CurlRoutine curlDownload;
+    R_NewUrlRoutine   newcurlurl;
 } R_InternetRoutines;
 
 R_InternetRoutines *R_setInternetRoutines(R_InternetRoutines *routines);
diff --git a/src/include/Rmodules/Rlapack.h b/src/include/Rmodules/Rlapack.h
index cfc9af7..e192d27 100644
--- a/src/include/Rmodules/Rlapack.h
+++ b/src/include/Rmodules/Rlapack.h
@@ -3,18 +3,18 @@
  *  Copyright (C) 2001-2010 The R Core Team.
  *
  *  This program is free software; you can redistribute it and/or modify
- *  it under the terms of the GNU Lesser General Public License as published by
- *  the Free Software Foundation; either version 2.1 of the License, or
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
  *  (at your option) any later version.
- *
+ * 
  *  This program is distributed in the hope that it will be useful,
  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  *  GNU Lesser General Public License for more details.
  *
- *  You should have received a copy of the GNU Lesser General Public License
+ *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  */
 
 /* Definitions for the Lapack module.  Not intended for end-user use */
diff --git a/src/include/Rmodules/Rvfonts.h b/src/include/Rmodules/Rvfonts.h
deleted file mode 100644
index 179c5b2..0000000
--- a/src/include/Rmodules/Rvfonts.h
+++ /dev/null
@@ -1,26 +0,0 @@
-#ifndef R_VFONTS_MODULE_H
-#define R_VFONTS_MODULE_H
-
-typedef void (*R_GE_VTextRoutine)(double x, double y, const char * const s, 
-				  double x_justify, double y_justify, 
-				  double rotation,
-				  const pGEcontext gc, pGEDevDesc dd);
-
-typedef double (*R_GE_VStrWidthRoutine)(const char *s, 
-					const pGEcontext gc, pGEDevDesc dd);
-
-typedef double (*R_GE_VStrHeightRoutine)(const char *s, 
-					 const pGEcontext gc, pGEDevDesc dd);
-
-typedef struct {
-    R_GE_VTextRoutine GEVText;
-    R_GE_VStrWidthRoutine GEVStrWidth;
-    R_GE_VStrHeightRoutine GEVStrHeight;
-} VfontRoutines;
-
-void R_GE_setVFontRoutines(R_GE_VStrWidthRoutine vwidth, 
-			   R_GE_VStrHeightRoutine vheight, 
-			   R_GE_VTextRoutine vtext);
-
-
-#endif /* ifndef R_VFONTS_MODULE_H */
diff --git a/src/include/S.h b/src/include/S.h
index 40b9783..0341471 100644
--- a/src/include/S.h
+++ b/src/include/S.h
@@ -1,13 +1,17 @@
 /*
  *  R : A Computer Language for Statistical Data Analysis
  *  Copyright (C) 1995, 1996  Robert Gentleman and Ross Ihaka
- *  Copyright (C) 1997--2003 The R Core Team.
+ *  Copyright (C) 1997--2016 The R Core Team.
  *
- *  This program is free software; you can redistribute it and/or modify
+ *  This header file is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU Lesser General Public License as published by
  *  the Free Software Foundation; either version 2.1 of the License, or
  *  (at your option) any later version.
  *
+ *  This file is part of R. R is distributed under the terms of the
+ *  GNU General Public License, either Version 2, June 1991 or Version 3,
+ *  June 2007. See doc/COPYRIGHTS for details of the copyright status of R.
+ *
  *  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
@@ -15,11 +19,19 @@
  *
  *  You should have received a copy of the GNU Lesser General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  *
  *  Much of this is from Doug Bates.
  */
 
+/* 
+   This is a legacy header and no longer documented.
+   Code using it should be converted to use R.h
+*/
+
+/* This header includes C headers and so is not safe for inclusion
+   from C++: use R.h instead. */
+
 #ifndef R_S_H
 #define R_S_H
 
@@ -30,7 +42,7 @@
 #endif
 
 #ifdef __cplusplus
-extern "C" {
+# error S.h can not be used from C++ code: use R.h instead
 #endif
 
 #include <stddef.h>
@@ -38,7 +50,7 @@ extern "C" {
 #include <stdio.h>
 #include <limits.h>
 #include <float.h>
-# include <math.h>
+#include <math.h>
 
 #include <Rconfig.h>
 #include <R_ext/Constants.h>
@@ -75,9 +87,4 @@ typedef struct {
 #define call_S call_R
 #endif
 
-
-#ifdef __cplusplus
-}
-#endif
-
 #endif /* !R_S_H */
diff --git a/src/include/Startup.h b/src/include/Startup.h
index 8f7203e..cea3900 100644
--- a/src/include/Startup.h
+++ b/src/include/Startup.h
@@ -1,6 +1,6 @@
 /*
  *  R : A Computer Language for Statistical Data Analysis
- *  Copyright (C) 1999-2004  The R Core Team
+ *  Copyright (C) 1999-2014  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
@@ -14,13 +14,19 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  */
 
+/* Internal header, not installed */
+
 #ifndef STARTUP_H_
 #define STARTUP_H_
 
 #include <R_ext/RStartup.h>	/* The meat here */
+#ifdef _WIN32
+extern UImode  CharacterMode;
+#endif
+
 
 /* originally from Defn.h : */
 
diff --git a/src/include/config.h.in b/src/include/config.h.in
index afc7fc9..faa043a 100644
--- a/src/include/config.h.in
+++ b/src/include/config.h.in
@@ -29,9 +29,6 @@
 /* Define if F77 and FC dummy `main' functions are identical. */
 #undef FC_DUMMY_MAIN_EQ_F77
 
-/* Defined if framework Accelerate is present */
-#undef HAVE_ACCELERATE_FW
-
 /* Define to 1 if you have the `access' function. */
 #undef HAVE_ACCESS
 
@@ -70,9 +67,6 @@
 /* Define to 1 if you have the `atanpi' function. */
 #undef HAVE_ATANPI
 
-/* Define if you have BSD networking headers and libraries. */
-#undef HAVE_BSD_NETWORKING
-
 /* Define to 1 if the compiler understands __builtin_expect. (For intl) */
 #undef HAVE_BUILTIN_EXPECT
 
@@ -156,8 +150,8 @@
 /* Define to 1 if you have the `ctanh' function. */
 #undef HAVE_CTANH
 
-/* define if the compiler supports basic C++11 syntax */
-#undef HAVE_CXX11
+/* Define to 1 if you have the <curl/curl.h> header file. */
+#undef HAVE_CURL_CURL_H
 
 /* Define if the GNU dcgettext() function is already present or preinstalled.
    */
@@ -167,6 +161,14 @@
    */
 #undef HAVE_DECL_ALLOCA
 
+/* Define to 1 if you have the declaration of `dladdr', and to 0 if you don't.
+   */
+#undef HAVE_DECL_DLADDR
+
+/* Define to 1 if you have the declaration of `dlsym', and to 0 if you don't.
+   */
+#undef HAVE_DECL_DLSYM
+
 /* Define to 1 if you have the declaration of `feof_unlocked', and to 0 if you
    don't. (For intl) */
 #undef HAVE_DECL_FEOF_UNLOCKED
@@ -199,6 +201,14 @@
    don't. */
 #undef HAVE_DECL_REALPATH
 
+/* Define to 1 if you have the declaration of `RTLD_DEFAULT', and to 0 if you
+   don't. */
+#undef HAVE_DECL_RTLD_DEFAULT
+
+/* Define to 1 if you have the declaration of `RTLD_NEXT', and to 0 if you
+   don't. */
+#undef HAVE_DECL_RTLD_NEXT
+
 /* Define to 1 if you have the declaration of `siglongjmp', and to 0 if you
    don't. */
 #undef HAVE_DECL_SIGLONGJMP
@@ -235,9 +245,15 @@
    */
 #undef HAVE_DIRENT_H
 
+/* Define to 1 if you have the `dladdr' function. */
+#undef HAVE_DLADDR
+
 /* Define to 1 if you have the <dlfcn.h> header file. */
 #undef HAVE_DLFCN_H
 
+/* Define to 1 if you have the `dlsym' function. */
+#undef HAVE_DLSYM
+
 /* Define to 1 if you have the <dl.h> header file. */
 #undef HAVE_DL_H
 
@@ -272,6 +288,9 @@
 /* Define to 1 if you have the `fdopen' function. */
 #undef HAVE_FDOPEN
 
+/* Define to 1 if you have the <features.h> header file. */
+#undef HAVE_FEATURES_H
+
 /* Define to 1 if you have the <floatingpoint.h> header file. */
 #undef HAVE_FLOATINGPOINT_H
 
@@ -279,9 +298,6 @@
    can do arithmetic on the latter. */
 #undef HAVE_FORTRAN_DOUBLE_COMPLEX
 
-/* Define to 1 if you have the <fpu_control.h> header file. */
-#undef HAVE_FPU_CONTROL_H
-
 /* Define to 1 if fseeko (and presumably ftello) exists and is declared. */
 #undef HAVE_FSEEKO
 
@@ -309,6 +325,9 @@
 /* Define to 1 if you have the `getgrgid' function. */
 #undef HAVE_GETGRGID
 
+/* Define to 1 if you have the `getline' function. */
+#undef HAVE_GETLINE
+
 /* Define to 1 if you have the `getpagesize' function. */
 #undef HAVE_GETPAGESIZE
 
@@ -367,9 +386,6 @@
 /* Define to 1 if the system has the type `int64_t'. */
 #undef HAVE_INT64_T
 
-/* Define if you have support for ftp/http access. */
-#undef HAVE_INTERNET
-
 /* Define if you have the 'intmax_t' type in <stdint.h> or <inttypes.h>. (For
    intl) */
 #undef HAVE_INTMAX_T
@@ -420,8 +436,8 @@
 /* Define if your <locale.h> file defines LC_MESSAGES. */
 #undef HAVE_LC_MESSAGES
 
-/* Define to 1 if you have the `cc_dynamic' library (-lcc_dynamic). */
-#undef HAVE_LIBCC_DYNAMIC
+/* Define if your system has libcurl >= 7.22.0 with support for https. */
+#undef HAVE_LIBCURL
 
 /* Define if __libc_stack_end is visible. */
 #undef HAVE_LIBC_STACK_END
@@ -554,6 +570,9 @@
 /* Define if you have C OpenMP support. */
 #undef HAVE_OPENMP
 
+/* Define if your OpenMP 4 implementation fully supports SIMD reduction */
+#undef HAVE_OPENMP_SIMDRED
+
 /* Define to 1 if you have pangocairo. */
 #undef HAVE_PANGOCAIRO
 
@@ -623,9 +642,18 @@
 /* Define to 1 if you have the `rintl' function. */
 #undef HAVE_RINTL
 
+/* Define to 1 if you have the `rl_callback_sigcleanup' function. */
+#undef HAVE_RL_CALLBACK_SIGCLEANUP
+
 /* Define to 1 if you have the `rl_completion_matches' function. */
 #undef HAVE_RL_COMPLETION_MATCHES
 
+/* Define to 1 if you have the `rl_resize_terminal' function. */
+#undef HAVE_RL_RESIZE_TERMINAL
+
+/* Define to 1 if you have the `rl_sort_completion_matches' function. */
+#undef HAVE_RL_SORT_COMPLETION_MATCHES
+
 /* Define to 1 if you have the `sched_getaffinity' function. */
 #undef HAVE_SCHED_GETAFFINITY
 
@@ -635,6 +663,9 @@
 /* Define to 1 if you have the `sched_setaffinity' function. */
 #undef HAVE_SCHED_SETAFFINITY
 
+/* Define to 1 if you have the `select' function. */
+#undef HAVE_SELECT
+
 /* Define to 1 if you have the `setenv' function. */
 #undef HAVE_SETENV
 
@@ -659,15 +690,15 @@
 /* Define to 1 if you have the `snprintf' function. */
 #undef HAVE_SNPRINTF
 
-/* Define if you have support for sockets. */
-#undef HAVE_SOCKETS
-
 /* Define to 1 if the system has the type `stack_t'. */
 #undef HAVE_STACK_T
 
 /* Define to 1 if you have the `stat' function. */
 #undef HAVE_STAT
 
+/* Define to 1 if you have the <stdalign.h> header file. */
+#undef HAVE_STDALIGN_H
+
 /* Define to 1 if you have the <stdarg.h> header file. */
 #undef HAVE_STDARG_H
 
@@ -827,12 +858,18 @@
 /* Define to 1 if you have the `utime' function. */
 #undef HAVE_UTIME
 
+/* Define to 1 if you have the `utimensat' function. */
+#undef HAVE_UTIMENSAT
+
 /* Define to 1 if you have the `utimes' function. */
 #undef HAVE_UTIMES
 
 /* Define to 1 if you have the <utime.h> header file. */
 #undef HAVE_UTIME_H
 
+/* Define to 1 if you have the <valgrind/memcheck.h> header file. */
+#undef HAVE_VALGRIND_MEMCHECK_H
+
 /* Define to 1 if you have the `vasprintf' function. */
 #undef HAVE_VASPRINTF
 
@@ -913,9 +950,18 @@
 /* Define if you have the X11/Xmu headers and libraries. */
 #undef HAVE_X11_Xmu
 
+/* Define to 1 if you have the `__cospi' function. */
+#undef HAVE___COSPI
+
 /* Define to 1 if you have the `__fsetlocking' function. */
 #undef HAVE___FSETLOCKING
 
+/* Define to 1 if you have the `__sinpi' function. */
+#undef HAVE___SINPI
+
+/* Define to 1 if you have the `__tanpi' function. */
+#undef HAVE___TANPI
+
 /* Define as const if the declaration of iconv() needs const. */
 #undef ICONV_CONST
 
@@ -928,19 +974,12 @@
 /* Define if you have 32 bit ints. */
 #undef INT_32_BITS
 
-/* Define to the sub-directory in which libtool stores uninstalled libraries.
-   */
+/* Define to the sub-directory where libtool stores uninstalled libraries. */
 #undef LT_OBJDIR
 
 /* Define if mktime sets errno. */
 #undef MKTIME_SETS_ERRNO
 
-/* Define if your system needs __setfpucw() to control FPU rounding. This was
-   used to control floating point precision, rounding and floating point
-   exceptions on older Linux systems. As of GLIBC 2.1 this function is not
-   used anymore. */
-#undef NEED___SETFPUCW
-
 /* Define to disable Valgrind instrumentation */
 #undef NVALGRIND
 
@@ -1048,9 +1087,6 @@
 /* Define to 1 if you have the ANSI C header files. */
 #undef STDC_HEADERS
 
-/* Define if you provide support for the libxml ftp/http functions. */
-#undef SUPPORT_LIBXML
-
 /* Define if you have C/C++/Fortran OpenMP support for package code. */
 #undef SUPPORT_OPENMP
 
diff --git a/src/include/memcheck.h b/src/include/memcheck.h
deleted file mode 100644
index faff792..0000000
--- a/src/include/memcheck.h
+++ /dev/null
@@ -1,278 +0,0 @@
-
-/*
-   ----------------------------------------------------------------
-
-   Notice that the following BSD-style license applies to this one
-   file (memcheck.h) only.  The entire rest of Valgrind is licensed
-   under the terms of the GNU General Public License, version 2.  See
-   the COPYING file in the source distribution for details.
-
-   ----------------------------------------------------------------
-
-   This file is part of MemCheck, a heavyweight Valgrind tool for
-   detecting memory errors.
-
-   Copyright (C) 2000-2005 Julian Seward.  All rights reserved.
-
-   Redistribution and use in source and binary forms, with or without
-   modification, are permitted provided that the following conditions
-   are met:
-
-   1. Redistributions of source code must retain the above copyright
-      notice, this list of conditions and the following disclaimer.
-
-   2. The origin of this software must not be misrepresented; you must 
-      not claim that you wrote the original software.  If you use this 
-      software in a product, an acknowledgment in the product 
-      documentation would be appreciated but is not required.
-
-   3. Altered source versions must be plainly marked as such, and must
-      not be misrepresented as being the original software.
-
-   4. The name of the author may not be used to endorse or promote 
-      products derived from this software without specific prior written 
-      permission.
-
-   THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
-   OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-   ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
-   DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-   DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
-   GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-   INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
-   WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-   NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-   ----------------------------------------------------------------
-
-   Notice that the above BSD-style license applies to this one file
-   (memcheck.h) only.  The entire rest of Valgrind is licensed under
-   the terms of the GNU General Public License, version 2.  See the
-   COPYING file in the source distribution for details.
-
-   ---------------------------------------------------------------- 
-*/
-
-
-#ifndef __MEMCHECK_H
-#define __MEMCHECK_H
-
-
-/* This file is for inclusion into client (your!) code.
-
-   You can use these macros to manipulate and query memory permissions
-   inside your own programs.
-
-   See comment near the top of valgrind.h on how to use them.
-*/
-
-#include "valgrind.h"
-
-typedef
-   enum { 
-      VG_USERREQ__MAKE_NOACCESS = VG_USERREQ_TOOL_BASE('M','C'),
-      VG_USERREQ__MAKE_WRITABLE,
-      VG_USERREQ__MAKE_READABLE,
-      VG_USERREQ__DISCARD,
-      VG_USERREQ__CHECK_WRITABLE,
-      VG_USERREQ__CHECK_READABLE,
-      VG_USERREQ__DO_LEAK_CHECK,
-      VG_USERREQ__COUNT_LEAKS,
-
-      /* These two have been moved into core, because they are useful for
-         any tool that tracks heap blocks.  Hence the suffix.  But they're
-         still here for backwards compatibility, although Valgrind will
-         abort with an explanatory message if you use them. */
-      VG_USERREQ__MALLOCLIKE_BLOCK__OLD_DO_NOT_USE,
-      VG_USERREQ__FREELIKE_BLOCK__OLD_DO_NOT_USE,
-
-      VG_USERREQ__GET_VBITS,
-      VG_USERREQ__SET_VBITS,
-
-      VG_USERREQ__CREATE_BLOCK,
-
-      /* This is just for memcheck's internal use - don't use it */
-      _VG_USERREQ__MEMCHECK_RECORD_OVERLAP_ERROR 
-         = VG_USERREQ_TOOL_BASE('M','C') + 256
-   } Vg_MemCheckClientRequest;
-
-
-
-/* Client-code macros to manipulate the state of memory. */
-
-/* Mark memory at _qzz_addr as unaddressible and undefined for
-   _qzz_len bytes.   */
-#define VALGRIND_MAKE_NOACCESS(_qzz_addr,_qzz_len)               \
-   (__extension__({unsigned int _qzz_res;                        \
-    VALGRIND_MAGIC_SEQUENCE(_qzz_res, 0 /* default return */,    \
-                            VG_USERREQ__MAKE_NOACCESS,           \
-                            _qzz_addr, _qzz_len, 0, 0);          \
-    _qzz_res;                                                    \
-   }))
-      
-/* Similarly, mark memory at _qzz_addr as addressible but undefined
-   for _qzz_len bytes. */
-#define VALGRIND_MAKE_WRITABLE(_qzz_addr,_qzz_len)               \
-   (__extension__({unsigned int _qzz_res;                        \
-    VALGRIND_MAGIC_SEQUENCE(_qzz_res, 0 /* default return */,    \
-                            VG_USERREQ__MAKE_WRITABLE,           \
-                            _qzz_addr, _qzz_len, 0, 0);          \
-    _qzz_res;                                                    \
-   }))
-
-/* Similarly, mark memory at _qzz_addr as addressible and defined
-   for _qzz_len bytes. */
-#define VALGRIND_MAKE_READABLE(_qzz_addr,_qzz_len)               \
-   (__extension__({unsigned int _qzz_res;                        \
-    VALGRIND_MAGIC_SEQUENCE(_qzz_res, 0 /* default return */,    \
-                            VG_USERREQ__MAKE_READABLE,           \
-                            _qzz_addr, _qzz_len, 0, 0);          \
-    _qzz_res;                                                    \
-   }))
-
-/* Create a block-description handle.  The description is an ascii
-   string which is included in any messages pertaining to addresses
-   within the specified memory range.  Has no other effect on the
-   properties of the memory range. */
-#define VALGRIND_CREATE_BLOCK(_qzz_addr,_qzz_len, _qzz_desc)	\
-	(__extension__({unsigned int _qzz_res;			\
-    VALGRIND_MAGIC_SEQUENCE(_qzz_res, 0 /* default return */,	\
-                            VG_USERREQ__CREATE_BLOCK,           \
-                            _qzz_addr, _qzz_len, _qzz_desc, 0);	\
-    _qzz_res;							\
-   }))
-
-/* Discard a block-description-handle. Returns 1 for an
-   invalid handle, 0 for a valid handle. */
-#define VALGRIND_DISCARD(_qzz_blkindex)                          \
-   (__extension__ ({unsigned int _qzz_res;                       \
-    VALGRIND_MAGIC_SEQUENCE(_qzz_res, 0 /* default return */,    \
-                            VG_USERREQ__DISCARD,                 \
-                            0, _qzz_blkindex, 0, 0);             \
-    _qzz_res;                                                    \
-   }))
-
-
-/* Client-code macros to check the state of memory. */
-
-/* Check that memory at _qzz_addr is addressible for _qzz_len bytes.
-   If suitable addressibility is not established, Valgrind prints an
-   error message and returns the address of the first offending byte.
-   Otherwise it returns zero. */
-#define VALGRIND_CHECK_WRITABLE(_qzz_addr,_qzz_len)                \
-   (__extension__({unsigned int _qzz_res;                          \
-    VALGRIND_MAGIC_SEQUENCE(_qzz_res, 0,                           \
-                            VG_USERREQ__CHECK_WRITABLE,            \
-                            _qzz_addr, _qzz_len, 0, 0);            \
-    _qzz_res;                                                      \
-   }))
-
-/* Check that memory at _qzz_addr is addressible and defined for
-   _qzz_len bytes.  If suitable addressibility and definedness are not
-   established, Valgrind prints an error message and returns the
-   address of the first offending byte.  Otherwise it returns zero. */
-#define VALGRIND_CHECK_READABLE(_qzz_addr,_qzz_len)                \
-   (__extension__({unsigned int _qzz_res;                          \
-    VALGRIND_MAGIC_SEQUENCE(_qzz_res, 0,                           \
-                            VG_USERREQ__CHECK_READABLE,            \
-                            _qzz_addr, _qzz_len, 0, 0);            \
-    _qzz_res;                                                      \
-   }))
-
-/* Use this macro to force the definedness and addressibility of a
-   value to be checked.  If suitable addressibility and definedness
-   are not established, Valgrind prints an error message and returns
-   the address of the first offending byte.  Otherwise it returns
-   zero. */
-#define VALGRIND_CHECK_DEFINED(__lvalue)                           \
-   VALGRIND_CHECK_READABLE(                                        \
-      (volatile unsigned char *)&(__lvalue),                       \
-                      (unsigned int)(sizeof (__lvalue)))
-
-/* Do a memory leak check mid-execution.  */
-#define VALGRIND_DO_LEAK_CHECK                                     \
-   {unsigned int _qzz_res;                                         \
-    VALGRIND_MAGIC_SEQUENCE(_qzz_res, 0,                           \
-                            VG_USERREQ__DO_LEAK_CHECK,             \
-                            0, 0, 0, 0);                           \
-   }
-
-/* Just display summaries of leaked memory, rather than all the
-   details */
-#define VALGRIND_DO_QUICK_LEAK_CHECK				   \
-   {unsigned int _qzz_res;                                         \
-    VALGRIND_MAGIC_SEQUENCE(_qzz_res, 0,                           \
-                            VG_USERREQ__DO_LEAK_CHECK,             \
-                            1, 0, 0, 0);                           \
-   }
-
-/* Return number of leaked, dubious, reachable and suppressed bytes found by
-   all previous leak checks.  They must be lvalues. */
-#define VALGRIND_COUNT_LEAKS(leaked, dubious, reachable, suppressed)    \
-   {unsigned int _qzz_res;                                              \
-    VALGRIND_MAGIC_SEQUENCE(_qzz_res, 0,                                \
-                            VG_USERREQ__COUNT_LEAKS,                    \
-                            &leaked, &dubious, &reachable, &suppressed);\
-   }
-
-
-/* These two have been moved to valgrind.h;  still here so that a warning can
-   be printed out for any programs using the old ones. */
-#define VALGRIND_MALLOCLIKE_BLOCK__OLD_DO_NOT_USE(addr, sizeB, rzB, is_zeroed)\
-   {unsigned int _qzz_res;                                         \
-    VALGRIND_MAGIC_SEQUENCE(_qzz_res, 0,                           \
-                            VG_USERREQ__MALLOCLIKE_BLOCK,          \
-                            addr, sizeB, rzB, is_zeroed);          \
-   }
-#define VALGRIND_FREELIKE_BLOCK__OLD_DO_NOT_USE(addr, rzB)         \
-   {unsigned int _qzz_res;                                         \
-    VALGRIND_MAGIC_SEQUENCE(_qzz_res, 0,                           \
-                            VG_USERREQ__FREELIKE_BLOCK,            \
-                            addr, rzB, 0, 0);                      \
-   }
-
-
-/* Get in zzvbits the validity data for the zznbytes starting at
-   zzsrc.  Return values:
-      0   if not running on valgrind
-      1   success
-      2   if zzsrc/zzvbits arrays are not aligned 0 % 4, or
-          zznbytes is not 0 % 4.
-      3   if any parts of zzsrc/zzvbits are not addressible.
-   The metadata is not copied in cases 0, 2 or 3 so it should be
-   impossible to segfault your system by using this call.
-*/
-#define VALGRIND_GET_VBITS(zzsrc,zzvbits,zznbytes)               \
-   (__extension__({unsigned int _qzz_res;                        \
-    char* czzsrc   = (char*)zzsrc;                               \
-    char* czzvbits = (char*)zzvbits;                             \
-    VALGRIND_MAGIC_SEQUENCE(_qzz_res, 0,                         \
-                            VG_USERREQ__GET_VBITS,               \
-                            czzsrc, czzvbits, zznbytes,0 );      \
-    _qzz_res;                                                    \
-   }))
-
-/* Apply the validity data in zzvbits to the zznbytes starting at
-   zzdst.  Return values:
-      0   if not running on valgrind
-      1   success
-      2   if zzdst/zzvbits arrays are not aligned 0 % 4, or
-          zznbytes is not 0 % 4.
-      3   if any parts of zzdst/zzvbits are not addressible.
-   The metadata is not copied in cases 0, 2 or 3 so it should be
-   impossible to segfault your system by using this call.
-*/
-#define VALGRIND_SET_VBITS(zzdst,zzvbits,zznbytes)               \
-   (__extension__({unsigned int _qzz_res;                        \
-    char* czzdst   = (char*)zzdst;                               \
-    char* czzvbits = (char*)zzvbits;                             \
-    VALGRIND_MAGIC_SEQUENCE(_qzz_res, 0,                         \
-                            VG_USERREQ__SET_VBITS,               \
-                            czzdst, czzvbits, zznbytes,0 );      \
-    _qzz_res;                                                    \
-   }))
-
-#endif
-
diff --git a/src/include/rlocale.h b/src/include/rlocale.h
index fcb2284..bf51921 100644
--- a/src/include/rlocale.h
+++ b/src/include/rlocale.h
@@ -1,6 +1,6 @@
 /*
  *  R : A Computer Language for Statistical Data Analysis
- *  Copyright (C) 2005-12   The R Core Team
+ *  Copyright (C) 2005-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
@@ -14,32 +14,29 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  */
 
+/* Internal header, not installed */
 
 /*  This file was contributed by Ei-ji Nakama.
- *  See also the comments in src/main/rlocale.c.
+ *  See also the comments in  ../main/rlocale.c.
 
  *  It does 2 things:
  * (a) supplies wrapper/substitute wc[s]width functions for use in 
  *    character.c, errors.c, printutils.c, devPS.c, RGui console.
- * (b) Defines a replacment for iswctype to be used on Windows, OS X and AIX.
+ * (b) Defines a replacment for iswctype to be used on Windows, maxOS and AIX.
  * in gram.c 
+ *
+ * It is not an installed header.
  */
 
 #ifndef R_LOCALE_H
 #define R_LOCALE_H
 
-#ifndef NO_C_HEADERS
 #include <wchar.h>
 #include <ctype.h>
 #include <wctype.h>
-#endif
-
-#ifdef  __cplusplus
-extern "C" {
-#endif
 
 /*
  * Windows CJK
@@ -58,19 +55,22 @@ extern "C" {
  *  The display widths of characters are not prescribed in Unicode.
  *  Double-width characters are used in the CJK area: their width can
  *  be font-specific, with different fonts in use in different parts
- *  of the CJK area.  The tables supplied in many OSes and by Marcus
+ *  of the CJK area.  The tables supplied in many OSes and by Markus
  *  Kuhn are not do not take the exact locale into account.  The
  *  tables supplied in rlocale_data.h allow different widths for
  *  different parts of the CJK area, and also where needed different
  *  widths on Windows.  (The Windows differences are in zh_CN, and
  *  apply to European characters.)
  *
+ * The differences are mainly (but not exclusively) in the
+ * Unicode 'East Asian Ambiguous' class.
+ *
  */
 extern int Ri18n_wcwidth(wchar_t);
 extern int Ri18n_wcswidth (const wchar_t *, size_t);
 
-/* Mac OSX CJK and WindowXP(Japanese)
- * iswctypes of MacOSX calls isctypes. no i18n.
+/* macOS CJK and WindowXP(Japanese)
+ * iswctypes of macOS calls isctypes. no i18n.
  * For example, iswprint of Windows does not accept a macron of
  * Japanese "a-ru" of R as a letter. 
  * Therefore Japanese "Buraian.Ripuri-" of "Brian Ripley" is
@@ -114,7 +114,4 @@ extern int      Ri18n_iswctype(wint_t, wctype_t);
 #define iswctype(__x,__y) Ri18n_iswctype(__x,__y)
 #endif
 
-#ifdef  __cplusplus
-}
-#endif
 #endif /* R_LOCALE_H */
diff --git a/src/include/valgrind.h b/src/include/valgrind.h
deleted file mode 100644
index 0fceb9f..0000000
--- a/src/include/valgrind.h
+++ /dev/null
@@ -1,469 +0,0 @@
-/* -*- c -*-
-   ----------------------------------------------------------------
-
-   Notice that the following BSD-style license applies to this one
-   file (valgrind.h) only.  The entire rest of Valgrind is licensed
-   under the terms of the GNU General Public License, version 2.  See
-   the COPYING file in the source distribution for details.
-
-   ----------------------------------------------------------------
-
-   This file is part of Valgrind, a dynamic binary instrumentation
-   framework.
-
-   Copyright (C) 2000-2005 Julian Seward.  All rights reserved.
-
-   Redistribution and use in source and binary forms, with or without
-   modification, are permitted provided that the following conditions
-   are met:
-
-   1. Redistributions of source code must retain the above copyright
-      notice, this list of conditions and the following disclaimer.
-
-   2. The origin of this software must not be misrepresented; you must 
-      not claim that you wrote the original software.  If you use this 
-      software in a product, an acknowledgment in the product 
-      documentation would be appreciated but is not required.
-
-   3. Altered source versions must be plainly marked as such, and must
-      not be misrepresented as being the original software.
-
-   4. The name of the author may not be used to endorse or promote 
-      products derived from this software without specific prior written 
-      permission.
-
-   THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
-   OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-   ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
-   DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-   DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
-   GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-   INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
-   WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-   NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-   ----------------------------------------------------------------
-
-   Notice that the above BSD-style license applies to this one file
-   (valgrind.h) only.  The entire rest of Valgrind is licensed under
-   the terms of the GNU General Public License, version 2.  See the
-   COPYING file in the source distribution for details.
-
-   ---------------------------------------------------------------- 
-*/
-
-
-/* This file is for inclusion into client (your!) code.
-
-   You can use these macros to manipulate and query Valgrind's 
-   execution inside your own programs.
-
-   The resulting executables will still run without Valgrind, just a
-   little bit more slowly than they otherwise would, but otherwise
-   unchanged.  When not running on valgrind, each client request
-   consumes very few (eg. < 10) instructions, so the resulting performance
-   loss is negligible unless you plan to execute client requests
-   millions of times per second.  Nevertheless, if that is still a
-   problem, you can compile with the NVALGRIND symbol defined (gcc
-   -DNVALGRIND) so that client requests are not even compiled in.  */
-
-#ifndef __VALGRIND_H
-#define __VALGRIND_H
-
-#include <stdarg.h>
-
-/* Nb: this file might be included in a file compiled with -ansi.  So
-   we can't use C++ style "//" comments nor the "asm" keyword (instead
-   use "__asm__"). */
-
-/* If we're not compiling for our target architecture, don't generate
-   any inline asms.  Note that in this file we're using the compiler's
-   CPP symbols for identifying architectures, which are different to
-   the ones we use within the rest of Valgrind. */
-#if !defined(__i386__) && !defined(__x86_64__) && !defined(__powerpc__)
-#  ifndef NVALGRIND
-#    define NVALGRIND	1
-#  endif  /* NVALGRIND */
-#endif
-
-/* ------------------------------------------------------------------ */
-/* The architecture-specific part                                     */
-/* ------------------------------------------------------------------ */
-
-#ifdef NVALGRIND
-
-/* Define NVALGRIND to completely remove the Valgrind magic sequence
-   from the compiled code (analogous to NDEBUG's effects on assert()) */
-#define VALGRIND_MAGIC_SEQUENCE(					\
-        _zzq_rlval, _zzq_default, _zzq_request,                         \
-        _zzq_arg1, _zzq_arg2, _zzq_arg3, _zzq_arg4)                     \
-   {									\
-      (_zzq_rlval) = (_zzq_default);					\
-   }
-
-#else  /* NVALGRIND */
-
-/* The following defines the magic code sequences which the JITter spots and
-   handles magically.  Don't look too closely at them; they will rot
-   your brain.  We must ensure that the default value gets put in the return
-   slot, so that everything works when this is executed not under Valgrind.
-   Args are passed in a memory block, and so there's no intrinsic limit to
-   the number that could be passed, but it's currently four.
-   
-   The macro args are: 
-      _zzq_rlval    result lvalue
-      _zzq_default  default value (result returned when running on real CPU)
-      _zzq_request  request code
-      _zzq_arg1..4  request params
-
-   Nb: we put the assembly code sequences for all architectures in this one
-   file.  This is because this file must be stand-alone, and we don't want
-   to have multiple files.
-*/
-
-#ifdef __x86_64__
-#define VALGRIND_MAGIC_SEQUENCE(                                \
-        _zzq_rlval, _zzq_default, _zzq_request,                 \
-        _zzq_arg1, _zzq_arg2, _zzq_arg3, _zzq_arg4)             \
-                                                                \
-  { volatile unsigned long long _zzq_args[5];                   \
-    _zzq_args[0] = (volatile unsigned long long)(_zzq_request); \
-    _zzq_args[1] = (volatile unsigned long long)(_zzq_arg1);    \
-    _zzq_args[2] = (volatile unsigned long long)(_zzq_arg2);    \
-    _zzq_args[3] = (volatile unsigned long long)(_zzq_arg3);    \
-    _zzq_args[4] = (volatile unsigned long long)(_zzq_arg4);    \
-    __asm__ volatile("roll $29, %%eax ; roll $3, %%eax\n\t"	\
-                     "rorl $27, %%eax ; rorl $5, %%eax\n\t"	\
-                     "roll $13, %%eax ; roll $19, %%eax"		\
-                     : "=d" (_zzq_rlval)				\
-                     : "a" (&_zzq_args[0]), "0" (_zzq_default)	\
-                     : "cc", "memory"				\
-                    );						\
-  }
-#endif  /* __x86_64__ */
-
-#ifdef __i386__
-#define VALGRIND_MAGIC_SEQUENCE(				\
-        _zzq_rlval, _zzq_default, _zzq_request,			\
-        _zzq_arg1, _zzq_arg2, _zzq_arg3, _zzq_arg4)		\
-								\
-  { unsigned int _zzq_args[5];					\
-    _zzq_args[0] = (unsigned int)(_zzq_request);		\
-    _zzq_args[1] = (unsigned int)(_zzq_arg1);			\
-    _zzq_args[2] = (unsigned int)(_zzq_arg2);			\
-    _zzq_args[3] = (unsigned int)(_zzq_arg3);			\
-    _zzq_args[4] = (unsigned int)(_zzq_arg4);			\
-    __asm__ volatile("roll $29, %%eax ; roll $3, %%eax\n\t"	\
-                     "rorl $27, %%eax ; rorl $5, %%eax\n\t"	\
-                     "roll $13, %%eax ; roll $19, %%eax"	\
-                     : "=d" (_zzq_rlval)			\
-                     : "a" (&_zzq_args[0]), "0" (_zzq_default)	\
-                     : "cc", "memory"				\
-                    );						\
-  }
-#endif  /* __i386__ */
-
-#ifdef __powerpc__
-#define VALGRIND_MAGIC_SEQUENCE(                                        \
-        _zzq_rlval, _zzq_default, _zzq_request,                         \
-        _zzq_arg1, _zzq_arg2, _zzq_arg3, _zzq_arg4)                     \
-                                                                        \
-  { volatile unsigned int _zzq_args[5];                                 \
-    register unsigned int _zzq_tmp __asm__("r3");                       \
-    register volatile unsigned int *_zzq_ptr __asm__("r4");             \
-    _zzq_args[0] = (volatile unsigned int)(_zzq_request);               \
-    _zzq_args[1] = (volatile unsigned int)(_zzq_arg1);                  \
-    _zzq_args[2] = (volatile unsigned int)(_zzq_arg2);                  \
-    _zzq_args[3] = (volatile unsigned int)(_zzq_arg3);                  \
-    _zzq_args[4] = (volatile unsigned int)(_zzq_arg4);                  \
-    _zzq_ptr = _zzq_args;                                               \
-    __asm__ volatile("tw 0,3,27\n\t"                                    \
-                     "rlwinm 0,0,29,0,0\n\t"                            \
-                     "rlwinm 0,0,3,0,0\n\t"                             \
-                     "rlwinm 0,0,13,0,0\n\t"                            \
-                     "rlwinm 0,0,19,0,0\n\t"                            \
-                     "nop\n\t"                                          \
-                     : "=r" (_zzq_tmp)                                  \
-                     : "0" (_zzq_default), "r" (_zzq_ptr)               \
-                     : "memory");                                       \
-    _zzq_rlval = (__typeof__(_zzq_rlval)) _zzq_tmp;                     \
-  }
-#endif   /* __powerpc__ */
-
-/* Insert assembly code for other architectures here... */
-
-#endif /* NVALGRIND */
-
-
-/* ------------------------------------------------------------------ */
-/* The architecture-independent part                                  */
-/* ------------------------------------------------------------------ */
-
-/* Some request codes.  There are many more of these, but most are not
-   exposed to end-user view.  These are the public ones, all of the
-   form 0x1000 + small_number.
-
-   Core ones are in the range 0x00000000--0x0000ffff.  The non-public ones
-   start at 0x2000.
-*/
-
-/* These macros are used by tools -- they must be public, but don't embed them
- * into other programs. */
-#define VG_USERREQ_TOOL_BASE(a,b) \
-   ((unsigned int)(((a)&0xff) << 24 | ((b)&0xff) << 16))
-#define VG_IS_TOOL_USERREQ(a, b, v) \
-   (VG_USERREQ_TOOL_BASE(a,b) == ((v) & 0xffff0000))
-
-typedef
-   enum { VG_USERREQ__RUNNING_ON_VALGRIND  = 0x1001,
-          VG_USERREQ__DISCARD_TRANSLATIONS = 0x1002,
-
-          /* These allow any function to be called from the
-             simulated CPU but run on the real CPU.
-             Nb: the first arg passed to the function is always the ThreadId of
-             the running thread!  So CLIENT_CALL0 actually requires a 1 arg
-             function, etc. */
-          VG_USERREQ__CLIENT_CALL0 = 0x1101,
-          VG_USERREQ__CLIENT_CALL1 = 0x1102,
-          VG_USERREQ__CLIENT_CALL2 = 0x1103,
-          VG_USERREQ__CLIENT_CALL3 = 0x1104,
-
-          /* Can be useful in regression testing suites -- eg. can send
-             Valgrind's output to /dev/null and still count errors. */
-          VG_USERREQ__COUNT_ERRORS = 0x1201,
-
-          /* These are useful and can be interpreted by any tool that tracks
-             malloc() et al, by using vg_replace_malloc.c. */
-          VG_USERREQ__MALLOCLIKE_BLOCK = 0x1301,
-          VG_USERREQ__FREELIKE_BLOCK   = 0x1302,
-          /* Memory pool support. */
-          VG_USERREQ__CREATE_MEMPOOL   = 0x1303,
-          VG_USERREQ__DESTROY_MEMPOOL  = 0x1304,
-          VG_USERREQ__MEMPOOL_ALLOC    = 0x1305,
-          VG_USERREQ__MEMPOOL_FREE     = 0x1306,
-
-          /* Allow printfs to valgrind log. */
-          VG_USERREQ__PRINTF           = 0x1401,
-          VG_USERREQ__PRINTF_BACKTRACE = 0x1402,
-
-          /* Stack support. */
-          VG_USERREQ__STACK_REGISTER   = 0x1501,
-          VG_USERREQ__STACK_DEREGISTER = 0x1502,
-          VG_USERREQ__STACK_CHANGE     = 0x1503  /* removed incorrect comma */
-   } Vg_ClientRequest;
-
-#ifndef __GNUC__
-#define __extension__
-#endif
-
-/* Returns the number of Valgrinds this code is running under.  That is,
-   0 if running natively, 1 if running under Valgrind, 2 if running under
-   Valgrind which is running under another Valgrind, etc. */
-#define RUNNING_ON_VALGRIND  __extension__                         \
-   ({unsigned int _qzz_res;                                        \
-    VALGRIND_MAGIC_SEQUENCE(_qzz_res, 0 /* returned if not */,     \
-                            VG_USERREQ__RUNNING_ON_VALGRIND,       \
-                            0, 0, 0, 0);                           \
-    _qzz_res;                                                      \
-   })
-
-
-/* Discard translation of code in the range [_qzz_addr .. _qzz_addr +
-   _qzz_len - 1].  Useful if you are debugging a JITter or some such,
-   since it provides a way to make sure valgrind will retranslate the
-   invalidated area.  Returns no value. */
-#define VALGRIND_DISCARD_TRANSLATIONS(_qzz_addr,_qzz_len)          \
-   {unsigned int _qzz_res;                                         \
-    VALGRIND_MAGIC_SEQUENCE(_qzz_res, 0,                           \
-                            VG_USERREQ__DISCARD_TRANSLATIONS,      \
-                            _qzz_addr, _qzz_len, 0, 0);            \
-   }
-
-#ifdef NVALGRIND
-
-#define VALGRIND_PRINTF(...)
-#define VALGRIND_PRINTF_BACKTRACE(...)
-
-#else /* NVALGRIND */
-
-int VALGRIND_PRINTF(const char *format, ...)
-   __attribute__((format(__printf__, 1, 2)));
-__attribute__((weak))
-int
-VALGRIND_PRINTF(const char *format, ...)
-{
-   unsigned long _qzz_res;
-   va_list vargs;
-   va_start(vargs, format);
-   VALGRIND_MAGIC_SEQUENCE(_qzz_res, 0, VG_USERREQ__PRINTF,
-                           (unsigned long)format, (unsigned long)vargs, 0, 0);
-   va_end(vargs);
-   return (int)_qzz_res;
-}
-
-int VALGRIND_PRINTF_BACKTRACE(const char *format, ...)
-   __attribute__((format(__printf__, 1, 2)));
-__attribute__((weak))
-int
-VALGRIND_PRINTF_BACKTRACE(const char *format, ...)
-{
-   unsigned long _qzz_res;
-   va_list vargs;
-   va_start(vargs, format);
-   VALGRIND_MAGIC_SEQUENCE(_qzz_res, 0, VG_USERREQ__PRINTF_BACKTRACE,
-                           (unsigned long)format, (unsigned long)vargs, 0, 0);
-   va_end(vargs);
-   return (int)_qzz_res;
-}
-
-#endif /* NVALGRIND */
-
-/* These requests allow control to move from the simulated CPU to the
-   real CPU, calling an arbitary function */
-#define VALGRIND_NON_SIMD_CALL0(_qyy_fn)                       \
-   ({unsigned long _qyy_res;                                   \
-    VALGRIND_MAGIC_SEQUENCE(_qyy_res, 0 /* default return */,  \
-                            VG_USERREQ__CLIENT_CALL0,          \
-                            _qyy_fn,                           \
-                            0, 0, 0);                          \
-    _qyy_res;                                                  \
-   })
-
-#define VALGRIND_NON_SIMD_CALL1(_qyy_fn, _qyy_arg1)            \
-   ({unsigned long _qyy_res;                                   \
-    VALGRIND_MAGIC_SEQUENCE(_qyy_res, 0 /* default return */,  \
-                            VG_USERREQ__CLIENT_CALL1,          \
-                            _qyy_fn,                           \
-                            _qyy_arg1, 0, 0);                  \
-    _qyy_res;                                                  \
-   })
-
-#define VALGRIND_NON_SIMD_CALL2(_qyy_fn, _qyy_arg1, _qyy_arg2) \
-   ({unsigned long _qyy_res;                                   \
-    VALGRIND_MAGIC_SEQUENCE(_qyy_res, 0 /* default return */,  \
-                            VG_USERREQ__CLIENT_CALL2,          \
-                            _qyy_fn,                           \
-                            _qyy_arg1, _qyy_arg2, 0);          \
-    _qyy_res;                                                  \
-   })
-
-#define VALGRIND_NON_SIMD_CALL3(_qyy_fn, _qyy_arg1, _qyy_arg2, _qyy_arg3)  \
-   ({unsigned long _qyy_res;                                         \
-    VALGRIND_MAGIC_SEQUENCE(_qyy_res, 0 /* default return */,        \
-                            VG_USERREQ__CLIENT_CALL3,                \
-                            _qyy_fn,                                 \
-                            _qyy_arg1, _qyy_arg2, _qyy_arg3);        \
-    _qyy_res;                                                        \
-   })
-
-
-/* Counts the number of errors that have been recorded by a tool.  Nb:
-   the tool must record the errors with VG_(maybe_record_error)() or
-   VG_(unique_error)() for them to be counted. */
-#define VALGRIND_COUNT_ERRORS                                           \
-   ({unsigned int _qyy_res;                                             \
-    VALGRIND_MAGIC_SEQUENCE(_qyy_res, 0 /* default return */,           \
-                            VG_USERREQ__COUNT_ERRORS,                   \
-                            0, 0, 0, 0);                                \
-    _qyy_res;                                                           \
-   })
-
-/* Mark a block of memory as having been allocated by a malloc()-like
-   function.  `addr' is the start of the usable block (ie. after any
-   redzone) `rzB' is redzone size if the allocator can apply redzones;
-   use '0' if not.  Adding redzones makes it more likely Valgrind will spot
-   block overruns.  `is_zeroed' indicates if the memory is zeroed, as it is
-   for calloc().  Put it immediately after the point where a block is
-   allocated. 
-   
-   If you're allocating memory via superblocks, and then handing out small
-   chunks of each superblock, if you don't have redzones on your small
-   blocks, it's worth marking the superblock with VALGRIND_MAKE_NOACCESS
-   when it's created, so that block overruns are detected.  But if you can
-   put redzones on, it's probably better to not do this, so that messages
-   for small overruns are described in terms of the small block rather than
-   the superblock (but if you have a big overrun that skips over a redzone,
-   you could miss an error this way).  See memcheck/tests/custom_alloc.c
-   for an example.
-
-   Nb: block must be freed via a free()-like function specified
-   with VALGRIND_FREELIKE_BLOCK or mismatch errors will occur. */
-#define VALGRIND_MALLOCLIKE_BLOCK(addr, sizeB, rzB, is_zeroed)     \
-   {unsigned int _qzz_res;                                         \
-    VALGRIND_MAGIC_SEQUENCE(_qzz_res, 0,                           \
-                            VG_USERREQ__MALLOCLIKE_BLOCK,          \
-                            addr, sizeB, rzB, is_zeroed);          \
-   }
-
-/* Mark a block of memory as having been freed by a free()-like function.
-   `rzB' is redzone size;  it must match that given to
-   VALGRIND_MALLOCLIKE_BLOCK.  Memory not freed will be detected by the leak
-   checker.  Put it immediately after the point where the block is freed. */
-#define VALGRIND_FREELIKE_BLOCK(addr, rzB)                         \
-   {unsigned int _qzz_res;                                         \
-    VALGRIND_MAGIC_SEQUENCE(_qzz_res, 0,                           \
-                            VG_USERREQ__FREELIKE_BLOCK,            \
-                            addr, rzB, 0, 0);                      \
-   }
-
-/* Create a memory pool. */
-#define VALGRIND_CREATE_MEMPOOL(pool, rzB, is_zeroed)              \
-   {unsigned int _qzz_res;                                         \
-    VALGRIND_MAGIC_SEQUENCE(_qzz_res, 0,                           \
-                            VG_USERREQ__CREATE_MEMPOOL,            \
-                            pool, rzB, is_zeroed, 0);              \
-   }
-
-/* Destroy a memory pool. */
-#define VALGRIND_DESTROY_MEMPOOL(pool)                             \
-   {unsigned int _qzz_res;                                         \
-    VALGRIND_MAGIC_SEQUENCE(_qzz_res, 0,                           \
-                            VG_USERREQ__DESTROY_MEMPOOL,           \
-                            pool, 0, 0, 0);                        \
-   }
-
-/* Associate a piece of memory with a memory pool. */
-#define VALGRIND_MEMPOOL_ALLOC(pool, addr, size)                   \
-   {unsigned int _qzz_res;                                         \
-    VALGRIND_MAGIC_SEQUENCE(_qzz_res, 0,                           \
-                            VG_USERREQ__MEMPOOL_ALLOC,             \
-                            pool, addr, size, 0);                  \
-   }
-
-/* Disassociate a piece of memory from a memory pool. */
-#define VALGRIND_MEMPOOL_FREE(pool, addr)                          \
-   {unsigned int _qzz_res;                                         \
-    VALGRIND_MAGIC_SEQUENCE(_qzz_res, 0,                           \
-                            VG_USERREQ__MEMPOOL_FREE,              \
-                            pool, addr, 0, 0);                     \
-   }
-
-/* Mark a piece of memory as being a stack. Returns a stack id. */
-#define VALGRIND_STACK_REGISTER(start, end)                        \
-   ({unsigned int _qzz_res;                                        \
-    VALGRIND_MAGIC_SEQUENCE(_qzz_res, 0,                           \
-                            VG_USERREQ__STACK_REGISTER,            \
-                            start, end, 0, 0);                     \
-    _qzz_res;                                                      \
-   })
-
-/* Unmark the piece of memory associated with a stack id as being a
-   stack. */
-#define VALGRIND_STACK_DEREGISTER(id)                              \
-   {unsigned int _qzz_res;                                         \
-    VALGRIND_MAGIC_SEQUENCE(_qzz_res, 0,                           \
-                            VG_USERREQ__STACK_DEREGISTER,          \
-                            id, 0, 0, 0);                          \
-   }
-
-/* Change the start and end address of the stack id. */
-#define VALGRIND_STACK_CHANGE(id, start, end)                      \
-   {unsigned int _qzz_res;                                         \
-    VALGRIND_MAGIC_SEQUENCE(_qzz_res, 0,                           \
-                            VG_USERREQ__STACK_CHANGE,              \
-                            id, start, end, 0);                    \
-   }
-
-#endif   /* __VALGRIND_H */
diff --git a/src/include/vg/memcheck.h b/src/include/vg/memcheck.h
new file mode 100644
index 0000000..356ae23
--- /dev/null
+++ b/src/include/vg/memcheck.h
@@ -0,0 +1,303 @@
+
+/*
+   ----------------------------------------------------------------
+
+   Notice that the following BSD-style license applies to this one
+   file (memcheck.h) only.  The rest of Valgrind is licensed under the
+   terms of the GNU General Public License, version 2, unless
+   otherwise indicated.  See the COPYING file in the source
+   distribution for details.
+
+   ----------------------------------------------------------------
+
+   This file is part of MemCheck, a heavyweight Valgrind tool for
+   detecting memory errors.
+
+   Copyright (C) 2000-2013 Julian Seward.  All rights reserved.
+
+   Redistribution and use in source and binary forms, with or without
+   modification, are permitted provided that the following conditions
+   are met:
+
+   1. Redistributions of source code must retain the above copyright
+      notice, this list of conditions and the following disclaimer.
+
+   2. The origin of this software must not be misrepresented; you must 
+      not claim that you wrote the original software.  If you use this 
+      software in a product, an acknowledgment in the product 
+      documentation would be appreciated but is not required.
+
+   3. Altered source versions must be plainly marked as such, and must
+      not be misrepresented as being the original software.
+
+   4. The name of the author may not be used to endorse or promote 
+      products derived from this software without specific prior written 
+      permission.
+
+   THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
+   OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+   ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
+   DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+   DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
+   GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+   INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+   WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+   NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+   ----------------------------------------------------------------
+
+   Notice that the above BSD-style license applies to this one file
+   (memcheck.h) only.  The entire rest of Valgrind is licensed under
+   the terms of the GNU General Public License, version 2.  See the
+   COPYING file in the source distribution for details.
+
+   ---------------------------------------------------------------- 
+*/
+
+
+#ifndef __MEMCHECK_H
+#define __MEMCHECK_H
+
+
+/* This file is for inclusion into client (your!) code.
+
+   You can use these macros to manipulate and query memory permissions
+   inside your own programs.
+
+   See comment near the top of valgrind.h on how to use them.
+*/
+
+/* R change to ensure that our copy of the header is used */
+#include "vg/valgrind.h"
+
+/* !! ABIWARNING !! ABIWARNING !! ABIWARNING !! ABIWARNING !! 
+   This enum comprises an ABI exported by Valgrind to programs
+   which use client requests.  DO NOT CHANGE THE ORDER OF THESE
+   ENTRIES, NOR DELETE ANY -- add new ones at the end. */
+typedef
+   enum { 
+      VG_USERREQ__MAKE_MEM_NOACCESS = VG_USERREQ_TOOL_BASE('M','C'),
+      VG_USERREQ__MAKE_MEM_UNDEFINED,
+      VG_USERREQ__MAKE_MEM_DEFINED,
+      VG_USERREQ__DISCARD,
+      VG_USERREQ__CHECK_MEM_IS_ADDRESSABLE,
+      VG_USERREQ__CHECK_MEM_IS_DEFINED,
+      VG_USERREQ__DO_LEAK_CHECK,
+      VG_USERREQ__COUNT_LEAKS,
+
+      VG_USERREQ__GET_VBITS,
+      VG_USERREQ__SET_VBITS,
+
+      VG_USERREQ__CREATE_BLOCK,
+
+      VG_USERREQ__MAKE_MEM_DEFINED_IF_ADDRESSABLE,
+
+      /* Not next to VG_USERREQ__COUNT_LEAKS because it was added later. */
+      VG_USERREQ__COUNT_LEAK_BLOCKS,
+
+      VG_USERREQ__ENABLE_ADDR_ERROR_REPORTING_IN_RANGE,
+      VG_USERREQ__DISABLE_ADDR_ERROR_REPORTING_IN_RANGE,
+
+      /* This is just for memcheck's internal use - don't use it */
+      _VG_USERREQ__MEMCHECK_RECORD_OVERLAP_ERROR 
+         = VG_USERREQ_TOOL_BASE('M','C') + 256
+   } Vg_MemCheckClientRequest;
+
+
+
+/* Client-code macros to manipulate the state of memory. */
+
+/* Mark memory at _qzz_addr as unaddressable for _qzz_len bytes. */
+#define VALGRIND_MAKE_MEM_NOACCESS(_qzz_addr,_qzz_len)           \
+    VALGRIND_DO_CLIENT_REQUEST_EXPR(0 /* default return */,      \
+                            VG_USERREQ__MAKE_MEM_NOACCESS,       \
+                            (_qzz_addr), (_qzz_len), 0, 0, 0)
+      
+/* Similarly, mark memory at _qzz_addr as addressable but undefined
+   for _qzz_len bytes. */
+#define VALGRIND_MAKE_MEM_UNDEFINED(_qzz_addr,_qzz_len)          \
+    VALGRIND_DO_CLIENT_REQUEST_EXPR(0 /* default return */,      \
+                            VG_USERREQ__MAKE_MEM_UNDEFINED,      \
+                            (_qzz_addr), (_qzz_len), 0, 0, 0)
+
+/* Similarly, mark memory at _qzz_addr as addressable and defined
+   for _qzz_len bytes. */
+#define VALGRIND_MAKE_MEM_DEFINED(_qzz_addr,_qzz_len)            \
+    VALGRIND_DO_CLIENT_REQUEST_EXPR(0 /* default return */,      \
+                            VG_USERREQ__MAKE_MEM_DEFINED,        \
+                            (_qzz_addr), (_qzz_len), 0, 0, 0)
+
+/* Similar to VALGRIND_MAKE_MEM_DEFINED except that addressability is
+   not altered: bytes which are addressable are marked as defined,
+   but those which are not addressable are left unchanged. */
+#define VALGRIND_MAKE_MEM_DEFINED_IF_ADDRESSABLE(_qzz_addr,_qzz_len)     \
+    VALGRIND_DO_CLIENT_REQUEST_EXPR(0 /* default return */,              \
+                            VG_USERREQ__MAKE_MEM_DEFINED_IF_ADDRESSABLE, \
+                            (_qzz_addr), (_qzz_len), 0, 0, 0)
+
+/* Create a block-description handle.  The description is an ascii
+   string which is included in any messages pertaining to addresses
+   within the specified memory range.  Has no other effect on the
+   properties of the memory range. */
+#define VALGRIND_CREATE_BLOCK(_qzz_addr,_qzz_len, _qzz_desc)	   \
+    VALGRIND_DO_CLIENT_REQUEST_EXPR(0 /* default return */,        \
+                            VG_USERREQ__CREATE_BLOCK,              \
+                            (_qzz_addr), (_qzz_len), (_qzz_desc),  \
+                            0, 0)
+
+/* Discard a block-description-handle. Returns 1 for an
+   invalid handle, 0 for a valid handle. */
+#define VALGRIND_DISCARD(_qzz_blkindex)                          \
+    VALGRIND_DO_CLIENT_REQUEST_EXPR(0 /* default return */,      \
+                            VG_USERREQ__DISCARD,                 \
+                            0, (_qzz_blkindex), 0, 0, 0)
+
+
+/* Client-code macros to check the state of memory. */
+
+/* Check that memory at _qzz_addr is addressable for _qzz_len bytes.
+   If suitable addressibility is not established, Valgrind prints an
+   error message and returns the address of the first offending byte.
+   Otherwise it returns zero. */
+#define VALGRIND_CHECK_MEM_IS_ADDRESSABLE(_qzz_addr,_qzz_len)      \
+    VALGRIND_DO_CLIENT_REQUEST_EXPR(0,                             \
+                            VG_USERREQ__CHECK_MEM_IS_ADDRESSABLE,  \
+                            (_qzz_addr), (_qzz_len), 0, 0, 0)
+
+/* Check that memory at _qzz_addr is addressable and defined for
+   _qzz_len bytes.  If suitable addressibility and definedness are not
+   established, Valgrind prints an error message and returns the
+   address of the first offending byte.  Otherwise it returns zero. */
+#define VALGRIND_CHECK_MEM_IS_DEFINED(_qzz_addr,_qzz_len)        \
+    VALGRIND_DO_CLIENT_REQUEST_EXPR(0,                           \
+                            VG_USERREQ__CHECK_MEM_IS_DEFINED,    \
+                            (_qzz_addr), (_qzz_len), 0, 0, 0)
+
+/* Use this macro to force the definedness and addressibility of an
+   lvalue to be checked.  If suitable addressibility and definedness
+   are not established, Valgrind prints an error message and returns
+   the address of the first offending byte.  Otherwise it returns
+   zero. */
+#define VALGRIND_CHECK_VALUE_IS_DEFINED(__lvalue)                \
+   VALGRIND_CHECK_MEM_IS_DEFINED(                                \
+      (volatile unsigned char *)&(__lvalue),                     \
+                      (unsigned long)(sizeof (__lvalue)))
+
+
+/* Do a full memory leak check (like --leak-check=full) mid-execution. */
+#define VALGRIND_DO_LEAK_CHECK                                   \
+    VALGRIND_DO_CLIENT_REQUEST_STMT(VG_USERREQ__DO_LEAK_CHECK,   \
+                                    0, 0, 0, 0, 0)
+
+/* Same as VALGRIND_DO_LEAK_CHECK but only showing the entries for
+   which there was an increase in leaked bytes or leaked nr of blocks
+   since the previous leak search. */
+#define VALGRIND_DO_ADDED_LEAK_CHECK                            \
+    VALGRIND_DO_CLIENT_REQUEST_STMT(VG_USERREQ__DO_LEAK_CHECK,  \
+                                    0, 1, 0, 0, 0)
+
+/* Same as VALGRIND_DO_ADDED_LEAK_CHECK but showing entries with
+   increased or decreased leaked bytes/blocks since previous leak
+   search. */
+#define VALGRIND_DO_CHANGED_LEAK_CHECK                          \
+    VALGRIND_DO_CLIENT_REQUEST_STMT(VG_USERREQ__DO_LEAK_CHECK,  \
+                                    0, 2, 0, 0, 0)
+
+/* Do a summary memory leak check (like --leak-check=summary) mid-execution. */
+#define VALGRIND_DO_QUICK_LEAK_CHECK                             \
+    VALGRIND_DO_CLIENT_REQUEST_STMT(VG_USERREQ__DO_LEAK_CHECK,   \
+                                    1, 0, 0, 0, 0)
+
+/* Return number of leaked, dubious, reachable and suppressed bytes found by
+   all previous leak checks.  They must be lvalues.  */
+#define VALGRIND_COUNT_LEAKS(leaked, dubious, reachable, suppressed)     \
+   /* For safety on 64-bit platforms we assign the results to private
+      unsigned long variables, then assign these to the lvalues the user
+      specified, which works no matter what type 'leaked', 'dubious', etc
+      are.  We also initialise '_qzz_leaked', etc because
+      VG_USERREQ__COUNT_LEAKS doesn't mark the values returned as
+      defined. */                                                        \
+   {                                                                     \
+    unsigned long _qzz_leaked    = 0, _qzz_dubious    = 0;               \
+    unsigned long _qzz_reachable = 0, _qzz_suppressed = 0;               \
+    VALGRIND_DO_CLIENT_REQUEST_STMT(                                     \
+                               VG_USERREQ__COUNT_LEAKS,                  \
+                               &_qzz_leaked, &_qzz_dubious,              \
+                               &_qzz_reachable, &_qzz_suppressed, 0);    \
+    leaked     = _qzz_leaked;                                            \
+    dubious    = _qzz_dubious;                                           \
+    reachable  = _qzz_reachable;                                         \
+    suppressed = _qzz_suppressed;                                        \
+   }
+
+/* Return number of leaked, dubious, reachable and suppressed bytes found by
+   all previous leak checks.  They must be lvalues.  */
+#define VALGRIND_COUNT_LEAK_BLOCKS(leaked, dubious, reachable, suppressed) \
+   /* For safety on 64-bit platforms we assign the results to private
+      unsigned long variables, then assign these to the lvalues the user
+      specified, which works no matter what type 'leaked', 'dubious', etc
+      are.  We also initialise '_qzz_leaked', etc because
+      VG_USERREQ__COUNT_LEAKS doesn't mark the values returned as
+      defined. */                                                        \
+   {                                                                     \
+    unsigned long _qzz_leaked    = 0, _qzz_dubious    = 0;               \
+    unsigned long _qzz_reachable = 0, _qzz_suppressed = 0;               \
+    VALGRIND_DO_CLIENT_REQUEST_STMT(                                     \
+                               VG_USERREQ__COUNT_LEAK_BLOCKS,            \
+                               &_qzz_leaked, &_qzz_dubious,              \
+                               &_qzz_reachable, &_qzz_suppressed, 0);    \
+    leaked     = _qzz_leaked;                                            \
+    dubious    = _qzz_dubious;                                           \
+    reachable  = _qzz_reachable;                                         \
+    suppressed = _qzz_suppressed;                                        \
+   }
+
+
+/* Get the validity data for addresses [zza..zza+zznbytes-1] and copy it
+   into the provided zzvbits array.  Return values:
+      0   if not running on valgrind
+      1   success
+      2   [previously indicated unaligned arrays;  these are now allowed]
+      3   if any parts of zzsrc/zzvbits are not addressable.
+   The metadata is not copied in cases 0, 2 or 3 so it should be
+   impossible to segfault your system by using this call.
+*/
+#define VALGRIND_GET_VBITS(zza,zzvbits,zznbytes)                \
+    (unsigned)VALGRIND_DO_CLIENT_REQUEST_EXPR(0,                \
+                                    VG_USERREQ__GET_VBITS,      \
+                                    (const char*)(zza),         \
+                                    (char*)(zzvbits),           \
+                                    (zznbytes), 0, 0)
+
+/* Set the validity data for addresses [zza..zza+zznbytes-1], copying it
+   from the provided zzvbits array.  Return values:
+      0   if not running on valgrind
+      1   success
+      2   [previously indicated unaligned arrays;  these are now allowed]
+      3   if any parts of zza/zzvbits are not addressable.
+   The metadata is not copied in cases 0, 2 or 3 so it should be
+   impossible to segfault your system by using this call.
+*/
+#define VALGRIND_SET_VBITS(zza,zzvbits,zznbytes)                \
+    (unsigned)VALGRIND_DO_CLIENT_REQUEST_EXPR(0,                \
+                                    VG_USERREQ__SET_VBITS,      \
+                                    (const char*)(zza),         \
+                                    (const char*)(zzvbits),     \
+                                    (zznbytes), 0, 0 )
+
+/* Disable and re-enable reporting of addressing errors in the
+   specified address range. */
+#define VALGRIND_DISABLE_ADDR_ERROR_REPORTING_IN_RANGE(_qzz_addr,_qzz_len) \
+    VALGRIND_DO_CLIENT_REQUEST_EXPR(0 /* default return */,    \
+       VG_USERREQ__DISABLE_ADDR_ERROR_REPORTING_IN_RANGE,      \
+       (_qzz_addr), (_qzz_len), 0, 0, 0)
+
+#define VALGRIND_ENABLE_ADDR_ERROR_REPORTING_IN_RANGE(_qzz_addr,_qzz_len) \
+    VALGRIND_DO_CLIENT_REQUEST_EXPR(0 /* default return */,    \
+       VG_USERREQ__ENABLE_ADDR_ERROR_REPORTING_IN_RANGE,       \
+       (_qzz_addr), (_qzz_len), 0, 0, 0)
+
+#endif
+
diff --git a/src/include/vg/valgrind.h b/src/include/vg/valgrind.h
new file mode 100644
index 0000000..6954d75
--- /dev/null
+++ b/src/include/vg/valgrind.h
@@ -0,0 +1,6587 @@
+/* -*- c -*-
+   ----------------------------------------------------------------
+
+   Notice that the following BSD-style license applies to this one
+   file (valgrind.h) only.  The rest of Valgrind is licensed under the
+   terms of the GNU General Public License, version 2, unless
+   otherwise indicated.  See the COPYING file in the source
+   distribution for details.
+
+   ----------------------------------------------------------------
+
+   This file is part of Valgrind, a dynamic binary instrumentation
+   framework.
+
+   Copyright (C) 2000-2013 Julian Seward.  All rights reserved.
+
+   Redistribution and use in source and binary forms, with or without
+   modification, are permitted provided that the following conditions
+   are met:
+
+   1. Redistributions of source code must retain the above copyright
+      notice, this list of conditions and the following disclaimer.
+
+   2. The origin of this software must not be misrepresented; you must 
+      not claim that you wrote the original software.  If you use this 
+      software in a product, an acknowledgment in the product 
+      documentation would be appreciated but is not required.
+
+   3. Altered source versions must be plainly marked as such, and must
+      not be misrepresented as being the original software.
+
+   4. The name of the author may not be used to endorse or promote 
+      products derived from this software without specific prior written 
+      permission.
+
+   THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
+   OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+   ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
+   DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+   DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
+   GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+   INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+   WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+   NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+   ----------------------------------------------------------------
+
+   Notice that the above BSD-style license applies to this one file
+   (valgrind.h) only.  The entire rest of Valgrind is licensed under
+   the terms of the GNU General Public License, version 2.  See the
+   COPYING file in the source distribution for details.
+
+   ---------------------------------------------------------------- 
+*/
+
+
+/* This file is for inclusion into client (your!) code.
+
+   You can use these macros to manipulate and query Valgrind's 
+   execution inside your own programs.
+
+   The resulting executables will still run without Valgrind, just a
+   little bit more slowly than they otherwise would, but otherwise
+   unchanged.  When not running on valgrind, each client request
+   consumes very few (eg. 7) instructions, so the resulting performance
+   loss is negligible unless you plan to execute client requests
+   millions of times per second.  Nevertheless, if that is still a
+   problem, you can compile with the NVALGRIND symbol defined (gcc
+   -DNVALGRIND) so that client requests are not even compiled in.  */
+
+#ifndef __VALGRIND_H
+#define __VALGRIND_H
+
+
+/* ------------------------------------------------------------------ */
+/* VERSION NUMBER OF VALGRIND                                         */
+/* ------------------------------------------------------------------ */
+
+/* Specify Valgrind's version number, so that user code can
+   conditionally compile based on our version number.  Note that these
+   were introduced at version 3.6 and so do not exist in version 3.5
+   or earlier.  The recommended way to use them to check for "version
+   X.Y or later" is (eg)
+
+#if defined(__VALGRIND_MAJOR__) && defined(__VALGRIND_MINOR__)   \
+    && (__VALGRIND_MAJOR__ > 3                                   \
+        || (__VALGRIND_MAJOR__ == 3 && __VALGRIND_MINOR__ >= 6))
+*/
+#define __VALGRIND_MAJOR__    3
+#define __VALGRIND_MINOR__    10
+
+
+#include <stdarg.h>
+
+/* Nb: this file might be included in a file compiled with -ansi.  So
+   we can't use C++ style "//" comments nor the "asm" keyword (instead
+   use "__asm__"). */
+
+/* Derive some tags indicating what the target platform is.  Note
+   that in this file we're using the compiler's CPP symbols for
+   identifying architectures, which are different to the ones we use
+   within the rest of Valgrind.  Note, __powerpc__ is active for both
+   32 and 64-bit PPC, whereas __powerpc64__ is only active for the
+   latter (on Linux, that is).
+
+   Misc note: how to find out what's predefined in gcc by default:
+   gcc -Wp,-dM somefile.c
+*/
+#undef PLAT_x86_darwin
+#undef PLAT_amd64_darwin
+#undef PLAT_x86_win32
+#undef PLAT_amd64_win64
+#undef PLAT_x86_linux
+#undef PLAT_amd64_linux
+#undef PLAT_ppc32_linux
+#undef PLAT_ppc64be_linux
+#undef PLAT_ppc64le_linux
+#undef PLAT_arm_linux
+#undef PLAT_arm64_linux
+#undef PLAT_s390x_linux
+#undef PLAT_mips32_linux
+#undef PLAT_mips64_linux
+
+
+#if defined(__APPLE__) && defined(__i386__)
+#  define PLAT_x86_darwin 1
+#elif defined(__APPLE__) && defined(__x86_64__)
+#  define PLAT_amd64_darwin 1
+#elif (defined(__MINGW32__) && !defined(__MINGW64__)) \
+      || defined(__CYGWIN32__) \
+      || (defined(_WIN32) && defined(_M_IX86))
+#  define PLAT_x86_win32 1
+#elif defined(__MINGW64__) \
+      || (defined(_WIN64) && defined(_M_X64))
+#  define PLAT_amd64_win64 1
+#elif defined(__linux__) && defined(__i386__)
+#  define PLAT_x86_linux 1
+#elif defined(__linux__) && defined(__x86_64__)
+#  define PLAT_amd64_linux 1
+#elif defined(__linux__) && defined(__powerpc__) && !defined(__powerpc64__)
+#  define PLAT_ppc32_linux 1
+#elif defined(__linux__) && defined(__powerpc__) && defined(__powerpc64__) && _CALL_ELF != 2
+/* Big Endian uses ELF version 1 */
+#  define PLAT_ppc64be_linux 1
+#elif defined(__linux__) && defined(__powerpc__) && defined(__powerpc64__) && _CALL_ELF == 2
+/* Little Endian uses ELF version 2 */
+#  define PLAT_ppc64le_linux 1
+#elif defined(__linux__) && defined(__arm__) && !defined(__aarch64__)
+#  define PLAT_arm_linux 1
+#elif defined(__linux__) && defined(__aarch64__) && !defined(__arm__)
+#  define PLAT_arm64_linux 1
+#elif defined(__linux__) && defined(__s390__) && defined(__s390x__)
+#  define PLAT_s390x_linux 1
+#elif defined(__linux__) && defined(__mips__) && (__mips==64)
+#  define PLAT_mips64_linux 1
+#elif defined(__linux__) && defined(__mips__) && (__mips!=64)
+#  define PLAT_mips32_linux 1
+#else
+/* If we're not compiling for our target platform, don't generate
+   any inline asms.  */
+#  if !defined(NVALGRIND)
+#    define NVALGRIND 1
+#  endif
+#endif
+
+
+/* ------------------------------------------------------------------ */
+/* ARCHITECTURE SPECIFICS for SPECIAL INSTRUCTIONS.  There is nothing */
+/* in here of use to end-users -- skip to the next section.           */
+/* ------------------------------------------------------------------ */
+
+/*
+ * VALGRIND_DO_CLIENT_REQUEST(): a statement that invokes a Valgrind client
+ * request. Accepts both pointers and integers as arguments.
+ *
+ * VALGRIND_DO_CLIENT_REQUEST_STMT(): a statement that invokes a Valgrind
+ * client request that does not return a value.
+
+ * VALGRIND_DO_CLIENT_REQUEST_EXPR(): a C expression that invokes a Valgrind
+ * client request and whose value equals the client request result.  Accepts
+ * both pointers and integers as arguments.  Note that such calls are not
+ * necessarily pure functions -- they may have side effects.
+ */
+
+#define VALGRIND_DO_CLIENT_REQUEST(_zzq_rlval, _zzq_default,            \
+                                   _zzq_request, _zzq_arg1, _zzq_arg2,  \
+                                   _zzq_arg3, _zzq_arg4, _zzq_arg5)     \
+  do { (_zzq_rlval) = VALGRIND_DO_CLIENT_REQUEST_EXPR((_zzq_default),   \
+                        (_zzq_request), (_zzq_arg1), (_zzq_arg2),       \
+                        (_zzq_arg3), (_zzq_arg4), (_zzq_arg5)); } while (0)
+
+#define VALGRIND_DO_CLIENT_REQUEST_STMT(_zzq_request, _zzq_arg1,        \
+                           _zzq_arg2,  _zzq_arg3, _zzq_arg4, _zzq_arg5) \
+  do { (void) VALGRIND_DO_CLIENT_REQUEST_EXPR(0,                        \
+                    (_zzq_request), (_zzq_arg1), (_zzq_arg2),           \
+                    (_zzq_arg3), (_zzq_arg4), (_zzq_arg5)); } while (0)
+
+#if defined(NVALGRIND)
+
+/* Define NVALGRIND to completely remove the Valgrind magic sequence
+   from the compiled code (analogous to NDEBUG's effects on
+   assert()) */
+#define VALGRIND_DO_CLIENT_REQUEST_EXPR(                          \
+        _zzq_default, _zzq_request,                               \
+        _zzq_arg1, _zzq_arg2, _zzq_arg3, _zzq_arg4, _zzq_arg5)    \
+      (_zzq_default)
+
+#else  /* ! NVALGRIND */
+
+/* The following defines the magic code sequences which the JITter
+   spots and handles magically.  Don't look too closely at them as
+   they will rot your brain.
+
+   The assembly code sequences for all architectures is in this one
+   file.  This is because this file must be stand-alone, and we don't
+   want to have multiple files.
+
+   For VALGRIND_DO_CLIENT_REQUEST, we must ensure that the default
+   value gets put in the return slot, so that everything works when
+   this is executed not under Valgrind.  Args are passed in a memory
+   block, and so there's no intrinsic limit to the number that could
+   be passed, but it's currently five.
+   
+   The macro args are: 
+      _zzq_rlval    result lvalue
+      _zzq_default  default value (result returned when running on real CPU)
+      _zzq_request  request code
+      _zzq_arg1..5  request params
+
+   The other two macros are used to support function wrapping, and are
+   a lot simpler.  VALGRIND_GET_NR_CONTEXT returns the value of the
+   guest's NRADDR pseudo-register and whatever other information is
+   needed to safely run the call original from the wrapper: on
+   ppc64-linux, the R2 value at the divert point is also needed.  This
+   information is abstracted into a user-visible type, OrigFn.
+
+   VALGRIND_CALL_NOREDIR_* behaves the same as the following on the
+   guest, but guarantees that the branch instruction will not be
+   redirected: x86: call *%eax, amd64: call *%rax, ppc32/ppc64:
+   branch-and-link-to-r11.  VALGRIND_CALL_NOREDIR is just text, not a
+   complete inline asm, since it needs to be combined with more magic
+   inline asm stuff to be useful.
+*/
+
+/* ------------------------- x86-{linux,darwin} ---------------- */
+
+#if defined(PLAT_x86_linux)  ||  defined(PLAT_x86_darwin)  \
+    ||  (defined(PLAT_x86_win32) && defined(__GNUC__))
+
+typedef
+   struct { 
+      unsigned int nraddr; /* where's the code? */
+   }
+   OrigFn;
+
+#define __SPECIAL_INSTRUCTION_PREAMBLE                            \
+                     "roll $3,  %%edi ; roll $13, %%edi\n\t"      \
+                     "roll $29, %%edi ; roll $19, %%edi\n\t"
+
+#define VALGRIND_DO_CLIENT_REQUEST_EXPR(                          \
+        _zzq_default, _zzq_request,                               \
+        _zzq_arg1, _zzq_arg2, _zzq_arg3, _zzq_arg4, _zzq_arg5)    \
+  __extension__                                                   \
+  ({volatile unsigned int _zzq_args[6];                           \
+    volatile unsigned int _zzq_result;                            \
+    _zzq_args[0] = (unsigned int)(_zzq_request);                  \
+    _zzq_args[1] = (unsigned int)(_zzq_arg1);                     \
+    _zzq_args[2] = (unsigned int)(_zzq_arg2);                     \
+    _zzq_args[3] = (unsigned int)(_zzq_arg3);                     \
+    _zzq_args[4] = (unsigned int)(_zzq_arg4);                     \
+    _zzq_args[5] = (unsigned int)(_zzq_arg5);                     \
+    __asm__ volatile(__SPECIAL_INSTRUCTION_PREAMBLE               \
+                     /* %EDX = client_request ( %EAX ) */         \
+                     "xchgl %%ebx,%%ebx"                          \
+                     : "=d" (_zzq_result)                         \
+                     : "a" (&_zzq_args[0]), "0" (_zzq_default)    \
+                     : "cc", "memory"                             \
+                    );                                            \
+    _zzq_result;                                                  \
+  })
+
+#define VALGRIND_GET_NR_CONTEXT(_zzq_rlval)                       \
+  { volatile OrigFn* _zzq_orig = &(_zzq_rlval);                   \
+    volatile unsigned int __addr;                                 \
+    __asm__ volatile(__SPECIAL_INSTRUCTION_PREAMBLE               \
+                     /* %EAX = guest_NRADDR */                    \
+                     "xchgl %%ecx,%%ecx"                          \
+                     : "=a" (__addr)                              \
+                     :                                            \
+                     : "cc", "memory"                             \
+                    );                                            \
+    _zzq_orig->nraddr = __addr;                                   \
+  }
+
+#define VALGRIND_CALL_NOREDIR_EAX                                 \
+                     __SPECIAL_INSTRUCTION_PREAMBLE               \
+                     /* call-noredir *%EAX */                     \
+                     "xchgl %%edx,%%edx\n\t"
+
+#define VALGRIND_VEX_INJECT_IR()                                 \
+ do {                                                            \
+    __asm__ volatile(__SPECIAL_INSTRUCTION_PREAMBLE              \
+                     "xchgl %%edi,%%edi\n\t"                     \
+                     : : : "cc", "memory"                        \
+                    );                                           \
+ } while (0)
+
+#endif /* PLAT_x86_linux || PLAT_x86_darwin || (PLAT_x86_win32 && __GNUC__) */
+
+/* ------------------------- x86-Win32 ------------------------- */
+
+#if defined(PLAT_x86_win32) && !defined(__GNUC__)
+
+typedef
+   struct { 
+      unsigned int nraddr; /* where's the code? */
+   }
+   OrigFn;
+
+#if defined(_MSC_VER)
+
+#define __SPECIAL_INSTRUCTION_PREAMBLE                            \
+                     __asm rol edi, 3  __asm rol edi, 13          \
+                     __asm rol edi, 29 __asm rol edi, 19
+
+#define VALGRIND_DO_CLIENT_REQUEST_EXPR(                          \
+        _zzq_default, _zzq_request,                               \
+        _zzq_arg1, _zzq_arg2, _zzq_arg3, _zzq_arg4, _zzq_arg5)    \
+    valgrind_do_client_request_expr((uintptr_t)(_zzq_default),    \
+        (uintptr_t)(_zzq_request), (uintptr_t)(_zzq_arg1),        \
+        (uintptr_t)(_zzq_arg2), (uintptr_t)(_zzq_arg3),           \
+        (uintptr_t)(_zzq_arg4), (uintptr_t)(_zzq_arg5))
+
+static __inline uintptr_t
+valgrind_do_client_request_expr(uintptr_t _zzq_default, uintptr_t _zzq_request,
+                                uintptr_t _zzq_arg1, uintptr_t _zzq_arg2,
+                                uintptr_t _zzq_arg3, uintptr_t _zzq_arg4,
+                                uintptr_t _zzq_arg5)
+{
+    volatile uintptr_t _zzq_args[6];
+    volatile unsigned int _zzq_result;
+    _zzq_args[0] = (uintptr_t)(_zzq_request);
+    _zzq_args[1] = (uintptr_t)(_zzq_arg1);
+    _zzq_args[2] = (uintptr_t)(_zzq_arg2);
+    _zzq_args[3] = (uintptr_t)(_zzq_arg3);
+    _zzq_args[4] = (uintptr_t)(_zzq_arg4);
+    _zzq_args[5] = (uintptr_t)(_zzq_arg5);
+    __asm { __asm lea eax, _zzq_args __asm mov edx, _zzq_default
+            __SPECIAL_INSTRUCTION_PREAMBLE
+            /* %EDX = client_request ( %EAX ) */
+            __asm xchg ebx,ebx
+            __asm mov _zzq_result, edx
+    }
+    return _zzq_result;
+}
+
+#define VALGRIND_GET_NR_CONTEXT(_zzq_rlval)                       \
+  { volatile OrigFn* _zzq_orig = &(_zzq_rlval);                   \
+    volatile unsigned int __addr;                                 \
+    __asm { __SPECIAL_INSTRUCTION_PREAMBLE                        \
+            /* %EAX = guest_NRADDR */                             \
+            __asm xchg ecx,ecx                                    \
+            __asm mov __addr, eax                                 \
+    }                                                             \
+    _zzq_orig->nraddr = __addr;                                   \
+  }
+
+#define VALGRIND_CALL_NOREDIR_EAX ERROR
+
+#define VALGRIND_VEX_INJECT_IR()                                 \
+ do {                                                            \
+    __asm { __SPECIAL_INSTRUCTION_PREAMBLE                       \
+            __asm xchg edi,edi                                   \
+    }                                                            \
+ } while (0)
+
+#else
+#error Unsupported compiler.
+#endif
+
+#endif /* PLAT_x86_win32 */
+
+/* ------------------------ amd64-{linux,darwin} --------------- */
+
+#if defined(PLAT_amd64_linux)  ||  defined(PLAT_amd64_darwin) \
+    ||  (defined(PLAT_amd64_win64) && defined(__GNUC__))
+
+typedef
+   struct { 
+      unsigned long long int nraddr; /* where's the code? */
+   }
+   OrigFn;
+
+#define __SPECIAL_INSTRUCTION_PREAMBLE                            \
+                     "rolq $3,  %%rdi ; rolq $13, %%rdi\n\t"      \
+                     "rolq $61, %%rdi ; rolq $51, %%rdi\n\t"
+
+#define VALGRIND_DO_CLIENT_REQUEST_EXPR(                          \
+        _zzq_default, _zzq_request,                               \
+        _zzq_arg1, _zzq_arg2, _zzq_arg3, _zzq_arg4, _zzq_arg5)    \
+    __extension__                                                 \
+    ({ volatile unsigned long long int _zzq_args[6];              \
+    volatile unsigned long long int _zzq_result;                  \
+    _zzq_args[0] = (unsigned long long int)(_zzq_request);        \
+    _zzq_args[1] = (unsigned long long int)(_zzq_arg1);           \
+    _zzq_args[2] = (unsigned long long int)(_zzq_arg2);           \
+    _zzq_args[3] = (unsigned long long int)(_zzq_arg3);           \
+    _zzq_args[4] = (unsigned long long int)(_zzq_arg4);           \
+    _zzq_args[5] = (unsigned long long int)(_zzq_arg5);           \
+    __asm__ volatile(__SPECIAL_INSTRUCTION_PREAMBLE               \
+                     /* %RDX = client_request ( %RAX ) */         \
+                     "xchgq %%rbx,%%rbx"                          \
+                     : "=d" (_zzq_result)                         \
+                     : "a" (&_zzq_args[0]), "0" (_zzq_default)    \
+                     : "cc", "memory"                             \
+                    );                                            \
+    _zzq_result;                                                  \
+    })
+
+#define VALGRIND_GET_NR_CONTEXT(_zzq_rlval)                       \
+  { volatile OrigFn* _zzq_orig = &(_zzq_rlval);                   \
+    volatile unsigned long long int __addr;                       \
+    __asm__ volatile(__SPECIAL_INSTRUCTION_PREAMBLE               \
+                     /* %RAX = guest_NRADDR */                    \
+                     "xchgq %%rcx,%%rcx"                          \
+                     : "=a" (__addr)                              \
+                     :                                            \
+                     : "cc", "memory"                             \
+                    );                                            \
+    _zzq_orig->nraddr = __addr;                                   \
+  }
+
+#define VALGRIND_CALL_NOREDIR_RAX                                 \
+                     __SPECIAL_INSTRUCTION_PREAMBLE               \
+                     /* call-noredir *%RAX */                     \
+                     "xchgq %%rdx,%%rdx\n\t"
+
+#define VALGRIND_VEX_INJECT_IR()                                 \
+ do {                                                            \
+    __asm__ volatile(__SPECIAL_INSTRUCTION_PREAMBLE              \
+                     "xchgq %%rdi,%%rdi\n\t"                     \
+                     : : : "cc", "memory"                        \
+                    );                                           \
+ } while (0)
+
+#endif /* PLAT_amd64_linux || PLAT_amd64_darwin */
+
+/* ------------------------- amd64-Win64 ------------------------- */
+
+#if defined(PLAT_amd64_win64) && !defined(__GNUC__)
+
+#error Unsupported compiler.
+
+#endif /* PLAT_amd64_win64 */
+
+/* ------------------------ ppc32-linux ------------------------ */
+
+#if defined(PLAT_ppc32_linux)
+
+typedef
+   struct { 
+      unsigned int nraddr; /* where's the code? */
+   }
+   OrigFn;
+
+#define __SPECIAL_INSTRUCTION_PREAMBLE                            \
+                    "rlwinm 0,0,3,0,31  ; rlwinm 0,0,13,0,31\n\t" \
+                    "rlwinm 0,0,29,0,31 ; rlwinm 0,0,19,0,31\n\t"
+
+#define VALGRIND_DO_CLIENT_REQUEST_EXPR(                          \
+        _zzq_default, _zzq_request,                               \
+        _zzq_arg1, _zzq_arg2, _zzq_arg3, _zzq_arg4, _zzq_arg5)    \
+                                                                  \
+    __extension__                                                 \
+  ({         unsigned int  _zzq_args[6];                          \
+             unsigned int  _zzq_result;                           \
+             unsigned int* _zzq_ptr;                              \
+    _zzq_args[0] = (unsigned int)(_zzq_request);                  \
+    _zzq_args[1] = (unsigned int)(_zzq_arg1);                     \
+    _zzq_args[2] = (unsigned int)(_zzq_arg2);                     \
+    _zzq_args[3] = (unsigned int)(_zzq_arg3);                     \
+    _zzq_args[4] = (unsigned int)(_zzq_arg4);                     \
+    _zzq_args[5] = (unsigned int)(_zzq_arg5);                     \
+    _zzq_ptr = _zzq_args;                                         \
+    __asm__ volatile("mr 3,%1\n\t" /*default*/                    \
+                     "mr 4,%2\n\t" /*ptr*/                        \
+                     __SPECIAL_INSTRUCTION_PREAMBLE               \
+                     /* %R3 = client_request ( %R4 ) */           \
+                     "or 1,1,1\n\t"                               \
+                     "mr %0,3"     /*result*/                     \
+                     : "=b" (_zzq_result)                         \
+                     : "b" (_zzq_default), "b" (_zzq_ptr)         \
+                     : "cc", "memory", "r3", "r4");               \
+    _zzq_result;                                                  \
+    })
+
+#define VALGRIND_GET_NR_CONTEXT(_zzq_rlval)                       \
+  { volatile OrigFn* _zzq_orig = &(_zzq_rlval);                   \
+    unsigned int __addr;                                          \
+    __asm__ volatile(__SPECIAL_INSTRUCTION_PREAMBLE               \
+                     /* %R3 = guest_NRADDR */                     \
+                     "or 2,2,2\n\t"                               \
+                     "mr %0,3"                                    \
+                     : "=b" (__addr)                              \
+                     :                                            \
+                     : "cc", "memory", "r3"                       \
+                    );                                            \
+    _zzq_orig->nraddr = __addr;                                   \
+  }
+
+#define VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_R11                   \
+                     __SPECIAL_INSTRUCTION_PREAMBLE               \
+                     /* branch-and-link-to-noredir *%R11 */       \
+                     "or 3,3,3\n\t"
+
+#define VALGRIND_VEX_INJECT_IR()                                 \
+ do {                                                            \
+    __asm__ volatile(__SPECIAL_INSTRUCTION_PREAMBLE              \
+                     "or 5,5,5\n\t"                              \
+                    );                                           \
+ } while (0)
+
+#endif /* PLAT_ppc32_linux */
+
+/* ------------------------ ppc64-linux ------------------------ */
+
+#if defined(PLAT_ppc64be_linux)
+
+typedef
+   struct { 
+      unsigned long long int nraddr; /* where's the code? */
+      unsigned long long int r2;  /* what tocptr do we need? */
+   }
+   OrigFn;
+
+#define __SPECIAL_INSTRUCTION_PREAMBLE                            \
+                     "rotldi 0,0,3  ; rotldi 0,0,13\n\t"          \
+                     "rotldi 0,0,61 ; rotldi 0,0,51\n\t"
+
+#define VALGRIND_DO_CLIENT_REQUEST_EXPR(                          \
+        _zzq_default, _zzq_request,                               \
+        _zzq_arg1, _zzq_arg2, _zzq_arg3, _zzq_arg4, _zzq_arg5)    \
+                                                                  \
+  __extension__                                                   \
+  ({         unsigned long long int  _zzq_args[6];                \
+             unsigned long long int  _zzq_result;                 \
+             unsigned long long int* _zzq_ptr;                    \
+    _zzq_args[0] = (unsigned long long int)(_zzq_request);        \
+    _zzq_args[1] = (unsigned long long int)(_zzq_arg1);           \
+    _zzq_args[2] = (unsigned long long int)(_zzq_arg2);           \
+    _zzq_args[3] = (unsigned long long int)(_zzq_arg3);           \
+    _zzq_args[4] = (unsigned long long int)(_zzq_arg4);           \
+    _zzq_args[5] = (unsigned long long int)(_zzq_arg5);           \
+    _zzq_ptr = _zzq_args;                                         \
+    __asm__ volatile("mr 3,%1\n\t" /*default*/                    \
+                     "mr 4,%2\n\t" /*ptr*/                        \
+                     __SPECIAL_INSTRUCTION_PREAMBLE               \
+                     /* %R3 = client_request ( %R4 ) */           \
+                     "or 1,1,1\n\t"                               \
+                     "mr %0,3"     /*result*/                     \
+                     : "=b" (_zzq_result)                         \
+                     : "b" (_zzq_default), "b" (_zzq_ptr)         \
+                     : "cc", "memory", "r3", "r4");               \
+    _zzq_result;                                                  \
+  })
+
+#define VALGRIND_GET_NR_CONTEXT(_zzq_rlval)                       \
+  { volatile OrigFn* _zzq_orig = &(_zzq_rlval);                   \
+    unsigned long long int __addr;                                \
+    __asm__ volatile(__SPECIAL_INSTRUCTION_PREAMBLE               \
+                     /* %R3 = guest_NRADDR */                     \
+                     "or 2,2,2\n\t"                               \
+                     "mr %0,3"                                    \
+                     : "=b" (__addr)                              \
+                     :                                            \
+                     : "cc", "memory", "r3"                       \
+                    );                                            \
+    _zzq_orig->nraddr = __addr;                                   \
+    __asm__ volatile(__SPECIAL_INSTRUCTION_PREAMBLE               \
+                     /* %R3 = guest_NRADDR_GPR2 */                \
+                     "or 4,4,4\n\t"                               \
+                     "mr %0,3"                                    \
+                     : "=b" (__addr)                              \
+                     :                                            \
+                     : "cc", "memory", "r3"                       \
+                    );                                            \
+    _zzq_orig->r2 = __addr;                                       \
+  }
+
+#define VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_R11                   \
+                     __SPECIAL_INSTRUCTION_PREAMBLE               \
+                     /* branch-and-link-to-noredir *%R11 */       \
+                     "or 3,3,3\n\t"
+
+#define VALGRIND_VEX_INJECT_IR()                                 \
+ do {                                                            \
+    __asm__ volatile(__SPECIAL_INSTRUCTION_PREAMBLE              \
+                     "or 5,5,5\n\t"                              \
+                    );                                           \
+ } while (0)
+
+#endif /* PLAT_ppc64be_linux */
+
+#if defined(PLAT_ppc64le_linux)
+
+typedef
+   struct {
+      unsigned long long int nraddr; /* where's the code? */
+      unsigned long long int r2;     /* what tocptr do we need? */
+   }
+   OrigFn;
+
+#define __SPECIAL_INSTRUCTION_PREAMBLE                            \
+                     "rotldi 0,0,3  ; rotldi 0,0,13\n\t"          \
+                     "rotldi 0,0,61 ; rotldi 0,0,51\n\t"
+
+#define VALGRIND_DO_CLIENT_REQUEST_EXPR(                          \
+        _zzq_default, _zzq_request,                               \
+        _zzq_arg1, _zzq_arg2, _zzq_arg3, _zzq_arg4, _zzq_arg5)    \
+                                                                  \
+  __extension__                                                   \
+  ({         unsigned long long int  _zzq_args[6];                \
+             unsigned long long int  _zzq_result;                 \
+             unsigned long long int* _zzq_ptr;                    \
+    _zzq_args[0] = (unsigned long long int)(_zzq_request);        \
+    _zzq_args[1] = (unsigned long long int)(_zzq_arg1);           \
+    _zzq_args[2] = (unsigned long long int)(_zzq_arg2);           \
+    _zzq_args[3] = (unsigned long long int)(_zzq_arg3);           \
+    _zzq_args[4] = (unsigned long long int)(_zzq_arg4);           \
+    _zzq_args[5] = (unsigned long long int)(_zzq_arg5);           \
+    _zzq_ptr = _zzq_args;                                         \
+    __asm__ volatile("mr 3,%1\n\t" /*default*/                    \
+                     "mr 4,%2\n\t" /*ptr*/                        \
+                     __SPECIAL_INSTRUCTION_PREAMBLE               \
+                     /* %R3 = client_request ( %R4 ) */           \
+                     "or 1,1,1\n\t"                               \
+                     "mr %0,3"     /*result*/                     \
+                     : "=b" (_zzq_result)                         \
+                     : "b" (_zzq_default), "b" (_zzq_ptr)         \
+                     : "cc", "memory", "r3", "r4");               \
+    _zzq_result;                                                  \
+  })
+
+#define VALGRIND_GET_NR_CONTEXT(_zzq_rlval)                       \
+  { volatile OrigFn* _zzq_orig = &(_zzq_rlval);                   \
+    unsigned long long int __addr;                                \
+    __asm__ volatile(__SPECIAL_INSTRUCTION_PREAMBLE               \
+                     /* %R3 = guest_NRADDR */                     \
+                     "or 2,2,2\n\t"                               \
+                     "mr %0,3"                                    \
+                     : "=b" (__addr)                              \
+                     :                                            \
+                     : "cc", "memory", "r3"                       \
+                    );                                            \
+    _zzq_orig->nraddr = __addr;                                   \
+    __asm__ volatile(__SPECIAL_INSTRUCTION_PREAMBLE               \
+                     /* %R3 = guest_NRADDR_GPR2 */                \
+                     "or 4,4,4\n\t"                               \
+                     "mr %0,3"                                    \
+                     : "=b" (__addr)                              \
+                     :                                            \
+                     : "cc", "memory", "r3"                       \
+                    );                                            \
+    _zzq_orig->r2 = __addr;                                       \
+  }
+
+#define VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_R12                   \
+                     __SPECIAL_INSTRUCTION_PREAMBLE               \
+                     /* branch-and-link-to-noredir *%R12 */       \
+                     "or 3,3,3\n\t"
+
+#define VALGRIND_VEX_INJECT_IR()                                 \
+ do {                                                            \
+    __asm__ volatile(__SPECIAL_INSTRUCTION_PREAMBLE              \
+                     "or 5,5,5\n\t"                              \
+                    );                                           \
+ } while (0)
+
+#endif /* PLAT_ppc64le_linux */
+
+/* ------------------------- arm-linux ------------------------- */
+
+#if defined(PLAT_arm_linux)
+
+typedef
+   struct { 
+      unsigned int nraddr; /* where's the code? */
+   }
+   OrigFn;
+
+#define __SPECIAL_INSTRUCTION_PREAMBLE                            \
+            "mov r12, r12, ror #3  ; mov r12, r12, ror #13 \n\t"  \
+            "mov r12, r12, ror #29 ; mov r12, r12, ror #19 \n\t"
+
+#define VALGRIND_DO_CLIENT_REQUEST_EXPR(                          \
+        _zzq_default, _zzq_request,                               \
+        _zzq_arg1, _zzq_arg2, _zzq_arg3, _zzq_arg4, _zzq_arg5)    \
+                                                                  \
+  __extension__                                                   \
+  ({volatile unsigned int  _zzq_args[6];                          \
+    volatile unsigned int  _zzq_result;                           \
+    _zzq_args[0] = (unsigned int)(_zzq_request);                  \
+    _zzq_args[1] = (unsigned int)(_zzq_arg1);                     \
+    _zzq_args[2] = (unsigned int)(_zzq_arg2);                     \
+    _zzq_args[3] = (unsigned int)(_zzq_arg3);                     \
+    _zzq_args[4] = (unsigned int)(_zzq_arg4);                     \
+    _zzq_args[5] = (unsigned int)(_zzq_arg5);                     \
+    __asm__ volatile("mov r3, %1\n\t" /*default*/                 \
+                     "mov r4, %2\n\t" /*ptr*/                     \
+                     __SPECIAL_INSTRUCTION_PREAMBLE               \
+                     /* R3 = client_request ( R4 ) */             \
+                     "orr r10, r10, r10\n\t"                      \
+                     "mov %0, r3"     /*result*/                  \
+                     : "=r" (_zzq_result)                         \
+                     : "r" (_zzq_default), "r" (&_zzq_args[0])    \
+                     : "cc","memory", "r3", "r4");                \
+    _zzq_result;                                                  \
+  })
+
+#define VALGRIND_GET_NR_CONTEXT(_zzq_rlval)                       \
+  { volatile OrigFn* _zzq_orig = &(_zzq_rlval);                   \
+    unsigned int __addr;                                          \
+    __asm__ volatile(__SPECIAL_INSTRUCTION_PREAMBLE               \
+                     /* R3 = guest_NRADDR */                      \
+                     "orr r11, r11, r11\n\t"                      \
+                     "mov %0, r3"                                 \
+                     : "=r" (__addr)                              \
+                     :                                            \
+                     : "cc", "memory", "r3"                       \
+                    );                                            \
+    _zzq_orig->nraddr = __addr;                                   \
+  }
+
+#define VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_R4                    \
+                     __SPECIAL_INSTRUCTION_PREAMBLE               \
+                     /* branch-and-link-to-noredir *%R4 */        \
+                     "orr r12, r12, r12\n\t"
+
+#define VALGRIND_VEX_INJECT_IR()                                 \
+ do {                                                            \
+    __asm__ volatile(__SPECIAL_INSTRUCTION_PREAMBLE              \
+                     "orr r9, r9, r9\n\t"                        \
+                     : : : "cc", "memory"                        \
+                    );                                           \
+ } while (0)
+
+#endif /* PLAT_arm_linux */
+
+/* ------------------------ arm64-linux ------------------------- */
+
+#if defined(PLAT_arm64_linux)
+
+typedef
+   struct { 
+      unsigned long long int nraddr; /* where's the code? */
+   }
+   OrigFn;
+
+#define __SPECIAL_INSTRUCTION_PREAMBLE                            \
+            "ror x12, x12, #3  ;  ror x12, x12, #13 \n\t"         \
+            "ror x12, x12, #51 ;  ror x12, x12, #61 \n\t"
+
+#define VALGRIND_DO_CLIENT_REQUEST_EXPR(                          \
+        _zzq_default, _zzq_request,                               \
+        _zzq_arg1, _zzq_arg2, _zzq_arg3, _zzq_arg4, _zzq_arg5)    \
+                                                                  \
+  __extension__                                                   \
+  ({volatile unsigned long long int  _zzq_args[6];                \
+    volatile unsigned long long int  _zzq_result;                 \
+    _zzq_args[0] = (unsigned long long int)(_zzq_request);        \
+    _zzq_args[1] = (unsigned long long int)(_zzq_arg1);           \
+    _zzq_args[2] = (unsigned long long int)(_zzq_arg2);           \
+    _zzq_args[3] = (unsigned long long int)(_zzq_arg3);           \
+    _zzq_args[4] = (unsigned long long int)(_zzq_arg4);           \
+    _zzq_args[5] = (unsigned long long int)(_zzq_arg5);           \
+    __asm__ volatile("mov x3, %1\n\t" /*default*/                 \
+                     "mov x4, %2\n\t" /*ptr*/                     \
+                     __SPECIAL_INSTRUCTION_PREAMBLE               \
+                     /* X3 = client_request ( X4 ) */             \
+                     "orr x10, x10, x10\n\t"                      \
+                     "mov %0, x3"     /*result*/                  \
+                     : "=r" (_zzq_result)                         \
+                     : "r" (_zzq_default), "r" (&_zzq_args[0])    \
+                     : "cc","memory", "x3", "x4");                \
+    _zzq_result;                                                  \
+  })
+
+#define VALGRIND_GET_NR_CONTEXT(_zzq_rlval)                       \
+  { volatile OrigFn* _zzq_orig = &(_zzq_rlval);                   \
+    unsigned long long int __addr;                                \
+    __asm__ volatile(__SPECIAL_INSTRUCTION_PREAMBLE               \
+                     /* X3 = guest_NRADDR */                      \
+                     "orr x11, x11, x11\n\t"                      \
+                     "mov %0, x3"                                 \
+                     : "=r" (__addr)                              \
+                     :                                            \
+                     : "cc", "memory", "x3"                       \
+                    );                                            \
+    _zzq_orig->nraddr = __addr;                                   \
+  }
+
+#define VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_X8                    \
+                     __SPECIAL_INSTRUCTION_PREAMBLE               \
+                     /* branch-and-link-to-noredir X8 */          \
+                     "orr x12, x12, x12\n\t"
+
+#define VALGRIND_VEX_INJECT_IR()                                 \
+ do {                                                            \
+    __asm__ volatile(__SPECIAL_INSTRUCTION_PREAMBLE              \
+                     "orr x9, x9, x9\n\t"                        \
+                     : : : "cc", "memory"                        \
+                    );                                           \
+ } while (0)
+
+#endif /* PLAT_arm64_linux */
+
+/* ------------------------ s390x-linux ------------------------ */
+
+#if defined(PLAT_s390x_linux)
+
+typedef
+  struct {
+     unsigned long long int nraddr; /* where's the code? */
+  }
+  OrigFn;
+
+/* __SPECIAL_INSTRUCTION_PREAMBLE will be used to identify Valgrind specific
+ * code. This detection is implemented in platform specific toIR.c
+ * (e.g. VEX/priv/guest_s390_decoder.c).
+ */
+#define __SPECIAL_INSTRUCTION_PREAMBLE                           \
+                     "lr 15,15\n\t"                              \
+                     "lr 1,1\n\t"                                \
+                     "lr 2,2\n\t"                                \
+                     "lr 3,3\n\t"
+
+#define __CLIENT_REQUEST_CODE "lr 2,2\n\t"
+#define __GET_NR_CONTEXT_CODE "lr 3,3\n\t"
+#define __CALL_NO_REDIR_CODE  "lr 4,4\n\t"
+#define __VEX_INJECT_IR_CODE  "lr 5,5\n\t"
+
+#define VALGRIND_DO_CLIENT_REQUEST_EXPR(                         \
+       _zzq_default, _zzq_request,                               \
+       _zzq_arg1, _zzq_arg2, _zzq_arg3, _zzq_arg4, _zzq_arg5)    \
+  __extension__                                                  \
+ ({volatile unsigned long long int _zzq_args[6];                 \
+   volatile unsigned long long int _zzq_result;                  \
+   _zzq_args[0] = (unsigned long long int)(_zzq_request);        \
+   _zzq_args[1] = (unsigned long long int)(_zzq_arg1);           \
+   _zzq_args[2] = (unsigned long long int)(_zzq_arg2);           \
+   _zzq_args[3] = (unsigned long long int)(_zzq_arg3);           \
+   _zzq_args[4] = (unsigned long long int)(_zzq_arg4);           \
+   _zzq_args[5] = (unsigned long long int)(_zzq_arg5);           \
+   __asm__ volatile(/* r2 = args */                              \
+                    "lgr 2,%1\n\t"                               \
+                    /* r3 = default */                           \
+                    "lgr 3,%2\n\t"                               \
+                    __SPECIAL_INSTRUCTION_PREAMBLE               \
+                    __CLIENT_REQUEST_CODE                        \
+                    /* results = r3 */                           \
+                    "lgr %0, 3\n\t"                              \
+                    : "=d" (_zzq_result)                         \
+                    : "a" (&_zzq_args[0]), "0" (_zzq_default)    \
+                    : "cc", "2", "3", "memory"                   \
+                   );                                            \
+   _zzq_result;                                                  \
+ })
+
+#define VALGRIND_GET_NR_CONTEXT(_zzq_rlval)                      \
+ { volatile OrigFn* _zzq_orig = &(_zzq_rlval);                   \
+   volatile unsigned long long int __addr;                       \
+   __asm__ volatile(__SPECIAL_INSTRUCTION_PREAMBLE               \
+                    __GET_NR_CONTEXT_CODE                        \
+                    "lgr %0, 3\n\t"                              \
+                    : "=a" (__addr)                              \
+                    :                                            \
+                    : "cc", "3", "memory"                        \
+                   );                                            \
+   _zzq_orig->nraddr = __addr;                                   \
+ }
+
+#define VALGRIND_CALL_NOREDIR_R1                                 \
+                    __SPECIAL_INSTRUCTION_PREAMBLE               \
+                    __CALL_NO_REDIR_CODE
+
+#define VALGRIND_VEX_INJECT_IR()                                 \
+ do {                                                            \
+    __asm__ volatile(__SPECIAL_INSTRUCTION_PREAMBLE              \
+                     __VEX_INJECT_IR_CODE);                      \
+ } while (0)
+
+#endif /* PLAT_s390x_linux */
+
+/* ------------------------- mips32-linux ---------------- */
+
+#if defined(PLAT_mips32_linux)
+
+typedef
+   struct { 
+      unsigned int nraddr; /* where's the code? */
+   }
+   OrigFn;
+
+/* .word  0x342
+ * .word  0x742
+ * .word  0xC2
+ * .word  0x4C2*/
+#define __SPECIAL_INSTRUCTION_PREAMBLE          \
+                     "srl $0, $0, 13\n\t"       \
+                     "srl $0, $0, 29\n\t"       \
+                     "srl $0, $0, 3\n\t"        \
+                     "srl $0, $0, 19\n\t"
+                    
+#define VALGRIND_DO_CLIENT_REQUEST_EXPR(                          \
+       _zzq_default, _zzq_request,                                \
+       _zzq_arg1, _zzq_arg2, _zzq_arg3, _zzq_arg4, _zzq_arg5)     \
+  __extension__                                                   \
+  ({ volatile unsigned int _zzq_args[6];                          \
+    volatile unsigned int _zzq_result;                            \
+    _zzq_args[0] = (unsigned int)(_zzq_request);                  \
+    _zzq_args[1] = (unsigned int)(_zzq_arg1);                     \
+    _zzq_args[2] = (unsigned int)(_zzq_arg2);                     \
+    _zzq_args[3] = (unsigned int)(_zzq_arg3);                     \
+    _zzq_args[4] = (unsigned int)(_zzq_arg4);                     \
+    _zzq_args[5] = (unsigned int)(_zzq_arg5);                     \
+        __asm__ volatile("move $11, %1\n\t" /*default*/           \
+                     "move $12, %2\n\t" /*ptr*/                   \
+                     __SPECIAL_INSTRUCTION_PREAMBLE               \
+                     /* T3 = client_request ( T4 ) */             \
+                     "or $13, $13, $13\n\t"                       \
+                     "move %0, $11\n\t"     /*result*/            \
+                     : "=r" (_zzq_result)                         \
+                     : "r" (_zzq_default), "r" (&_zzq_args[0])    \
+                     : "$11", "$12");                             \
+    _zzq_result;                                                  \
+  })
+
+#define VALGRIND_GET_NR_CONTEXT(_zzq_rlval)                       \
+  { volatile OrigFn* _zzq_orig = &(_zzq_rlval);                   \
+    volatile unsigned int __addr;                                 \
+    __asm__ volatile(__SPECIAL_INSTRUCTION_PREAMBLE               \
+                     /* %t9 = guest_NRADDR */                     \
+                     "or $14, $14, $14\n\t"                       \
+                     "move %0, $11"     /*result*/                \
+                     : "=r" (__addr)                              \
+                     :                                            \
+                     : "$11"                                      \
+                    );                                            \
+    _zzq_orig->nraddr = __addr;                                   \
+  }
+
+#define VALGRIND_CALL_NOREDIR_T9                                 \
+                     __SPECIAL_INSTRUCTION_PREAMBLE              \
+                     /* call-noredir *%t9 */                     \
+                     "or $15, $15, $15\n\t"
+
+#define VALGRIND_VEX_INJECT_IR()                                 \
+ do {                                                            \
+    __asm__ volatile(__SPECIAL_INSTRUCTION_PREAMBLE              \
+                     "or $11, $11, $11\n\t"                      \
+                    );                                           \
+ } while (0)
+
+
+#endif /* PLAT_mips32_linux */
+
+/* ------------------------- mips64-linux ---------------- */
+
+#if defined(PLAT_mips64_linux)
+
+typedef
+   struct {
+      unsigned long long nraddr; /* where's the code? */
+   }
+   OrigFn;
+
+/* dsll $0,$0, 3
+ * dsll $0,$0, 13
+ * dsll $0,$0, 29
+ * dsll $0,$0, 19*/
+#define __SPECIAL_INSTRUCTION_PREAMBLE                              \
+                     "dsll $0,$0, 3 ; dsll $0,$0,13\n\t"            \
+                     "dsll $0,$0,29 ; dsll $0,$0,19\n\t"
+
+#define VALGRIND_DO_CLIENT_REQUEST_EXPR(                            \
+       _zzq_default, _zzq_request,                                  \
+       _zzq_arg1, _zzq_arg2, _zzq_arg3, _zzq_arg4, _zzq_arg5)       \
+  __extension__                                                     \
+  ({ volatile unsigned long long int _zzq_args[6];                  \
+    volatile unsigned long long int _zzq_result;                    \
+    _zzq_args[0] = (unsigned long long int)(_zzq_request);          \
+    _zzq_args[1] = (unsigned long long int)(_zzq_arg1);             \
+    _zzq_args[2] = (unsigned long long int)(_zzq_arg2);             \
+    _zzq_args[3] = (unsigned long long int)(_zzq_arg3);             \
+    _zzq_args[4] = (unsigned long long int)(_zzq_arg4);             \
+    _zzq_args[5] = (unsigned long long int)(_zzq_arg5);             \
+        __asm__ volatile("move $11, %1\n\t" /*default*/             \
+                         "move $12, %2\n\t" /*ptr*/                 \
+                         __SPECIAL_INSTRUCTION_PREAMBLE             \
+                         /* $11 = client_request ( $12 ) */         \
+                         "or $13, $13, $13\n\t"                     \
+                         "move %0, $11\n\t"     /*result*/          \
+                         : "=r" (_zzq_result)                       \
+                         : "r" (_zzq_default), "r" (&_zzq_args[0])  \
+                         : "$11", "$12");                           \
+    _zzq_result;                                                    \
+  })
+
+#define VALGRIND_GET_NR_CONTEXT(_zzq_rlval)                         \
+  { volatile OrigFn* _zzq_orig = &(_zzq_rlval);                     \
+    volatile unsigned long long int __addr;                         \
+    __asm__ volatile(__SPECIAL_INSTRUCTION_PREAMBLE                 \
+                     /* $11 = guest_NRADDR */                       \
+                     "or $14, $14, $14\n\t"                         \
+                     "move %0, $11"     /*result*/                  \
+                     : "=r" (__addr)                                \
+                     :                                              \
+                     : "$11");                                      \
+    _zzq_orig->nraddr = __addr;                                     \
+  }
+
+#define VALGRIND_CALL_NOREDIR_T9                                    \
+                     __SPECIAL_INSTRUCTION_PREAMBLE                 \
+                     /* call-noredir $25 */                         \
+                     "or $15, $15, $15\n\t"
+
+#define VALGRIND_VEX_INJECT_IR()                                    \
+ do {                                                               \
+    __asm__ volatile(__SPECIAL_INSTRUCTION_PREAMBLE                 \
+                     "or $11, $11, $11\n\t"                         \
+                    );                                              \
+ } while (0)
+
+#endif /* PLAT_mips64_linux */
+
+/* Insert assembly code for other platforms here... */
+
+#endif /* NVALGRIND */
+
+
+/* ------------------------------------------------------------------ */
+/* PLATFORM SPECIFICS for FUNCTION WRAPPING.  This is all very        */
+/* ugly.  It's the least-worst tradeoff I can think of.               */
+/* ------------------------------------------------------------------ */
+
+/* This section defines magic (a.k.a appalling-hack) macros for doing
+   guaranteed-no-redirection macros, so as to get from function
+   wrappers to the functions they are wrapping.  The whole point is to
+   construct standard call sequences, but to do the call itself with a
+   special no-redirect call pseudo-instruction that the JIT
+   understands and handles specially.  This section is long and
+   repetitious, and I can't see a way to make it shorter.
+
+   The naming scheme is as follows:
+
+      CALL_FN_{W,v}_{v,W,WW,WWW,WWWW,5W,6W,7W,etc}
+
+   'W' stands for "word" and 'v' for "void".  Hence there are
+   different macros for calling arity 0, 1, 2, 3, 4, etc, functions,
+   and for each, the possibility of returning a word-typed result, or
+   no result.
+*/
+
+/* Use these to write the name of your wrapper.  NOTE: duplicates
+   VG_WRAP_FUNCTION_Z{U,Z} in pub_tool_redir.h.  NOTE also: inserts
+   the default behaviour equivalance class tag "0000" into the name.
+   See pub_tool_redir.h for details -- normally you don't need to
+   think about this, though. */
+
+/* Use an extra level of macroisation so as to ensure the soname/fnname
+   args are fully macro-expanded before pasting them together. */
+#define VG_CONCAT4(_aa,_bb,_cc,_dd) _aa##_bb##_cc##_dd
+
+#define I_WRAP_SONAME_FNNAME_ZU(soname,fnname)                    \
+   VG_CONCAT4(_vgw00000ZU_,soname,_,fnname)
+
+#define I_WRAP_SONAME_FNNAME_ZZ(soname,fnname)                    \
+   VG_CONCAT4(_vgw00000ZZ_,soname,_,fnname)
+
+/* Use this macro from within a wrapper function to collect the
+   context (address and possibly other info) of the original function.
+   Once you have that you can then use it in one of the CALL_FN_
+   macros.  The type of the argument _lval is OrigFn. */
+#define VALGRIND_GET_ORIG_FN(_lval)  VALGRIND_GET_NR_CONTEXT(_lval)
+
+/* Also provide end-user facilities for function replacement, rather
+   than wrapping.  A replacement function differs from a wrapper in
+   that it has no way to get hold of the original function being
+   called, and hence no way to call onwards to it.  In a replacement
+   function, VALGRIND_GET_ORIG_FN always returns zero. */
+
+#define I_REPLACE_SONAME_FNNAME_ZU(soname,fnname)                 \
+   VG_CONCAT4(_vgr00000ZU_,soname,_,fnname)
+
+#define I_REPLACE_SONAME_FNNAME_ZZ(soname,fnname)                 \
+   VG_CONCAT4(_vgr00000ZZ_,soname,_,fnname)
+
+/* Derivatives of the main macros below, for calling functions
+   returning void. */
+
+#define CALL_FN_v_v(fnptr)                                        \
+   do { volatile unsigned long _junk;                             \
+        CALL_FN_W_v(_junk,fnptr); } while (0)
+
+#define CALL_FN_v_W(fnptr, arg1)                                  \
+   do { volatile unsigned long _junk;                             \
+        CALL_FN_W_W(_junk,fnptr,arg1); } while (0)
+
+#define CALL_FN_v_WW(fnptr, arg1,arg2)                            \
+   do { volatile unsigned long _junk;                             \
+        CALL_FN_W_WW(_junk,fnptr,arg1,arg2); } while (0)
+
+#define CALL_FN_v_WWW(fnptr, arg1,arg2,arg3)                      \
+   do { volatile unsigned long _junk;                             \
+        CALL_FN_W_WWW(_junk,fnptr,arg1,arg2,arg3); } while (0)
+
+#define CALL_FN_v_WWWW(fnptr, arg1,arg2,arg3,arg4)                \
+   do { volatile unsigned long _junk;                             \
+        CALL_FN_W_WWWW(_junk,fnptr,arg1,arg2,arg3,arg4); } while (0)
+
+#define CALL_FN_v_5W(fnptr, arg1,arg2,arg3,arg4,arg5)             \
+   do { volatile unsigned long _junk;                             \
+        CALL_FN_W_5W(_junk,fnptr,arg1,arg2,arg3,arg4,arg5); } while (0)
+
+#define CALL_FN_v_6W(fnptr, arg1,arg2,arg3,arg4,arg5,arg6)        \
+   do { volatile unsigned long _junk;                             \
+        CALL_FN_W_6W(_junk,fnptr,arg1,arg2,arg3,arg4,arg5,arg6); } while (0)
+
+#define CALL_FN_v_7W(fnptr, arg1,arg2,arg3,arg4,arg5,arg6,arg7)   \
+   do { volatile unsigned long _junk;                             \
+        CALL_FN_W_7W(_junk,fnptr,arg1,arg2,arg3,arg4,arg5,arg6,arg7); } while (0)
+
+/* ------------------------- x86-{linux,darwin} ---------------- */
+
+#if defined(PLAT_x86_linux)  ||  defined(PLAT_x86_darwin)
+
+/* These regs are trashed by the hidden call.  No need to mention eax
+   as gcc can already see that, plus causes gcc to bomb. */
+#define __CALLER_SAVED_REGS /*"eax"*/ "ecx", "edx"
+
+/* Macros to save and align the stack before making a function
+   call and restore it afterwards as gcc may not keep the stack
+   pointer aligned if it doesn't realise calls are being made
+   to other functions. */
+
+#define VALGRIND_ALIGN_STACK               \
+      "movl %%esp,%%edi\n\t"               \
+      "andl $0xfffffff0,%%esp\n\t"
+#define VALGRIND_RESTORE_STACK             \
+      "movl %%edi,%%esp\n\t"
+
+/* These CALL_FN_ macros assume that on x86-linux, sizeof(unsigned
+   long) == 4. */
+
+#define CALL_FN_W_v(lval, orig)                                   \
+   do {                                                           \
+      volatile OrigFn        _orig = (orig);                      \
+      volatile unsigned long _argvec[1];                          \
+      volatile unsigned long _res;                                \
+      _argvec[0] = (unsigned long)_orig.nraddr;                   \
+      __asm__ volatile(                                           \
+         VALGRIND_ALIGN_STACK                                     \
+         "movl (%%eax), %%eax\n\t"  /* target->%eax */            \
+         VALGRIND_CALL_NOREDIR_EAX                                \
+         VALGRIND_RESTORE_STACK                                   \
+         : /*out*/   "=a" (_res)                                  \
+         : /*in*/    "a" (&_argvec[0])                            \
+         : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS, "edi"   \
+      );                                                          \
+      lval = (__typeof__(lval)) _res;                             \
+   } while (0)
+
+#define CALL_FN_W_W(lval, orig, arg1)                             \
+   do {                                                           \
+      volatile OrigFn        _orig = (orig);                      \
+      volatile unsigned long _argvec[2];                          \
+      volatile unsigned long _res;                                \
+      _argvec[0] = (unsigned long)_orig.nraddr;                   \
+      _argvec[1] = (unsigned long)(arg1);                         \
+      __asm__ volatile(                                           \
+         VALGRIND_ALIGN_STACK                                     \
+         "subl $12, %%esp\n\t"                                    \
+         "pushl 4(%%eax)\n\t"                                     \
+         "movl (%%eax), %%eax\n\t"  /* target->%eax */            \
+         VALGRIND_CALL_NOREDIR_EAX                                \
+         VALGRIND_RESTORE_STACK                                   \
+         : /*out*/   "=a" (_res)                                  \
+         : /*in*/    "a" (&_argvec[0])                            \
+         : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS, "edi"   \
+      );                                                          \
+      lval = (__typeof__(lval)) _res;                             \
+   } while (0)
+
+#define CALL_FN_W_WW(lval, orig, arg1,arg2)                       \
+   do {                                                           \
+      volatile OrigFn        _orig = (orig);                      \
+      volatile unsigned long _argvec[3];                          \
+      volatile unsigned long _res;                                \
+      _argvec[0] = (unsigned long)_orig.nraddr;                   \
+      _argvec[1] = (unsigned long)(arg1);                         \
+      _argvec[2] = (unsigned long)(arg2);                         \
+      __asm__ volatile(                                           \
+         VALGRIND_ALIGN_STACK                                     \
+         "subl $8, %%esp\n\t"                                     \
+         "pushl 8(%%eax)\n\t"                                     \
+         "pushl 4(%%eax)\n\t"                                     \
+         "movl (%%eax), %%eax\n\t"  /* target->%eax */            \
+         VALGRIND_CALL_NOREDIR_EAX                                \
+         VALGRIND_RESTORE_STACK                                   \
+         : /*out*/   "=a" (_res)                                  \
+         : /*in*/    "a" (&_argvec[0])                            \
+         : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS, "edi"   \
+      );                                                          \
+      lval = (__typeof__(lval)) _res;                             \
+   } while (0)
+
+#define CALL_FN_W_WWW(lval, orig, arg1,arg2,arg3)                 \
+   do {                                                           \
+      volatile OrigFn        _orig = (orig);                      \
+      volatile unsigned long _argvec[4];                          \
+      volatile unsigned long _res;                                \
+      _argvec[0] = (unsigned long)_orig.nraddr;                   \
+      _argvec[1] = (unsigned long)(arg1);                         \
+      _argvec[2] = (unsigned long)(arg2);                         \
+      _argvec[3] = (unsigned long)(arg3);                         \
+      __asm__ volatile(                                           \
+         VALGRIND_ALIGN_STACK                                     \
+         "subl $4, %%esp\n\t"                                     \
+         "pushl 12(%%eax)\n\t"                                    \
+         "pushl 8(%%eax)\n\t"                                     \
+         "pushl 4(%%eax)\n\t"                                     \
+         "movl (%%eax), %%eax\n\t"  /* target->%eax */            \
+         VALGRIND_CALL_NOREDIR_EAX                                \
+         VALGRIND_RESTORE_STACK                                   \
+         : /*out*/   "=a" (_res)                                  \
+         : /*in*/    "a" (&_argvec[0])                            \
+         : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS, "edi"   \
+      );                                                          \
+      lval = (__typeof__(lval)) _res;                             \
+   } while (0)
+
+#define CALL_FN_W_WWWW(lval, orig, arg1,arg2,arg3,arg4)           \
+   do {                                                           \
+      volatile OrigFn        _orig = (orig);                      \
+      volatile unsigned long _argvec[5];                          \
+      volatile unsigned long _res;                                \
+      _argvec[0] = (unsigned long)_orig.nraddr;                   \
+      _argvec[1] = (unsigned long)(arg1);                         \
+      _argvec[2] = (unsigned long)(arg2);                         \
+      _argvec[3] = (unsigned long)(arg3);                         \
+      _argvec[4] = (unsigned long)(arg4);                         \
+      __asm__ volatile(                                           \
+         VALGRIND_ALIGN_STACK                                     \
+         "pushl 16(%%eax)\n\t"                                    \
+         "pushl 12(%%eax)\n\t"                                    \
+         "pushl 8(%%eax)\n\t"                                     \
+         "pushl 4(%%eax)\n\t"                                     \
+         "movl (%%eax), %%eax\n\t"  /* target->%eax */            \
+         VALGRIND_CALL_NOREDIR_EAX                                \
+         VALGRIND_RESTORE_STACK                                   \
+         : /*out*/   "=a" (_res)                                  \
+         : /*in*/    "a" (&_argvec[0])                            \
+         : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS, "edi"   \
+      );                                                          \
+      lval = (__typeof__(lval)) _res;                             \
+   } while (0)
+
+#define CALL_FN_W_5W(lval, orig, arg1,arg2,arg3,arg4,arg5)        \
+   do {                                                           \
+      volatile OrigFn        _orig = (orig);                      \
+      volatile unsigned long _argvec[6];                          \
+      volatile unsigned long _res;                                \
+      _argvec[0] = (unsigned long)_orig.nraddr;                   \
+      _argvec[1] = (unsigned long)(arg1);                         \
+      _argvec[2] = (unsigned long)(arg2);                         \
+      _argvec[3] = (unsigned long)(arg3);                         \
+      _argvec[4] = (unsigned long)(arg4);                         \
+      _argvec[5] = (unsigned long)(arg5);                         \
+      __asm__ volatile(                                           \
+         VALGRIND_ALIGN_STACK                                     \
+         "subl $12, %%esp\n\t"                                    \
+         "pushl 20(%%eax)\n\t"                                    \
+         "pushl 16(%%eax)\n\t"                                    \
+         "pushl 12(%%eax)\n\t"                                    \
+         "pushl 8(%%eax)\n\t"                                     \
+         "pushl 4(%%eax)\n\t"                                     \
+         "movl (%%eax), %%eax\n\t"  /* target->%eax */            \
+         VALGRIND_CALL_NOREDIR_EAX                                \
+         VALGRIND_RESTORE_STACK                                   \
+         : /*out*/   "=a" (_res)                                  \
+         : /*in*/    "a" (&_argvec[0])                            \
+         : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS, "edi"   \
+      );                                                          \
+      lval = (__typeof__(lval)) _res;                             \
+   } while (0)
+
+#define CALL_FN_W_6W(lval, orig, arg1,arg2,arg3,arg4,arg5,arg6)   \
+   do {                                                           \
+      volatile OrigFn        _orig = (orig);                      \
+      volatile unsigned long _argvec[7];                          \
+      volatile unsigned long _res;                                \
+      _argvec[0] = (unsigned long)_orig.nraddr;                   \
+      _argvec[1] = (unsigned long)(arg1);                         \
+      _argvec[2] = (unsigned long)(arg2);                         \
+      _argvec[3] = (unsigned long)(arg3);                         \
+      _argvec[4] = (unsigned long)(arg4);                         \
+      _argvec[5] = (unsigned long)(arg5);                         \
+      _argvec[6] = (unsigned long)(arg6);                         \
+      __asm__ volatile(                                           \
+         VALGRIND_ALIGN_STACK                                     \
+         "subl $8, %%esp\n\t"                                     \
+         "pushl 24(%%eax)\n\t"                                    \
+         "pushl 20(%%eax)\n\t"                                    \
+         "pushl 16(%%eax)\n\t"                                    \
+         "pushl 12(%%eax)\n\t"                                    \
+         "pushl 8(%%eax)\n\t"                                     \
+         "pushl 4(%%eax)\n\t"                                     \
+         "movl (%%eax), %%eax\n\t"  /* target->%eax */            \
+         VALGRIND_CALL_NOREDIR_EAX                                \
+         VALGRIND_RESTORE_STACK                                   \
+         : /*out*/   "=a" (_res)                                  \
+         : /*in*/    "a" (&_argvec[0])                            \
+         : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS, "edi"   \
+      );                                                          \
+      lval = (__typeof__(lval)) _res;                             \
+   } while (0)
+
+#define CALL_FN_W_7W(lval, orig, arg1,arg2,arg3,arg4,arg5,arg6,   \
+                                 arg7)                            \
+   do {                                                           \
+      volatile OrigFn        _orig = (orig);                      \
+      volatile unsigned long _argvec[8];                          \
+      volatile unsigned long _res;                                \
+      _argvec[0] = (unsigned long)_orig.nraddr;                   \
+      _argvec[1] = (unsigned long)(arg1);                         \
+      _argvec[2] = (unsigned long)(arg2);                         \
+      _argvec[3] = (unsigned long)(arg3);                         \
+      _argvec[4] = (unsigned long)(arg4);                         \
+      _argvec[5] = (unsigned long)(arg5);                         \
+      _argvec[6] = (unsigned long)(arg6);                         \
+      _argvec[7] = (unsigned long)(arg7);                         \
+      __asm__ volatile(                                           \
+         VALGRIND_ALIGN_STACK                                     \
+         "subl $4, %%esp\n\t"                                     \
+         "pushl 28(%%eax)\n\t"                                    \
+         "pushl 24(%%eax)\n\t"                                    \
+         "pushl 20(%%eax)\n\t"                                    \
+         "pushl 16(%%eax)\n\t"                                    \
+         "pushl 12(%%eax)\n\t"                                    \
+         "pushl 8(%%eax)\n\t"                                     \
+         "pushl 4(%%eax)\n\t"                                     \
+         "movl (%%eax), %%eax\n\t"  /* target->%eax */            \
+         VALGRIND_CALL_NOREDIR_EAX                                \
+         VALGRIND_RESTORE_STACK                                   \
+         : /*out*/   "=a" (_res)                                  \
+         : /*in*/    "a" (&_argvec[0])                            \
+         : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS, "edi"   \
+      );                                                          \
+      lval = (__typeof__(lval)) _res;                             \
+   } while (0)
+
+#define CALL_FN_W_8W(lval, orig, arg1,arg2,arg3,arg4,arg5,arg6,   \
+                                 arg7,arg8)                       \
+   do {                                                           \
+      volatile OrigFn        _orig = (orig);                      \
+      volatile unsigned long _argvec[9];                          \
+      volatile unsigned long _res;                                \
+      _argvec[0] = (unsigned long)_orig.nraddr;                   \
+      _argvec[1] = (unsigned long)(arg1);                         \
+      _argvec[2] = (unsigned long)(arg2);                         \
+      _argvec[3] = (unsigned long)(arg3);                         \
+      _argvec[4] = (unsigned long)(arg4);                         \
+      _argvec[5] = (unsigned long)(arg5);                         \
+      _argvec[6] = (unsigned long)(arg6);                         \
+      _argvec[7] = (unsigned long)(arg7);                         \
+      _argvec[8] = (unsigned long)(arg8);                         \
+      __asm__ volatile(                                           \
+         VALGRIND_ALIGN_STACK                                     \
+         "pushl 32(%%eax)\n\t"                                    \
+         "pushl 28(%%eax)\n\t"                                    \
+         "pushl 24(%%eax)\n\t"                                    \
+         "pushl 20(%%eax)\n\t"                                    \
+         "pushl 16(%%eax)\n\t"                                    \
+         "pushl 12(%%eax)\n\t"                                    \
+         "pushl 8(%%eax)\n\t"                                     \
+         "pushl 4(%%eax)\n\t"                                     \
+         "movl (%%eax), %%eax\n\t"  /* target->%eax */            \
+         VALGRIND_CALL_NOREDIR_EAX                                \
+         VALGRIND_RESTORE_STACK                                   \
+         : /*out*/   "=a" (_res)                                  \
+         : /*in*/    "a" (&_argvec[0])                            \
+         : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS, "edi"   \
+      );                                                          \
+      lval = (__typeof__(lval)) _res;                             \
+   } while (0)
+
+#define CALL_FN_W_9W(lval, orig, arg1,arg2,arg3,arg4,arg5,arg6,   \
+                                 arg7,arg8,arg9)                  \
+   do {                                                           \
+      volatile OrigFn        _orig = (orig);                      \
+      volatile unsigned long _argvec[10];                         \
+      volatile unsigned long _res;                                \
+      _argvec[0] = (unsigned long)_orig.nraddr;                   \
+      _argvec[1] = (unsigned long)(arg1);                         \
+      _argvec[2] = (unsigned long)(arg2);                         \
+      _argvec[3] = (unsigned long)(arg3);                         \
+      _argvec[4] = (unsigned long)(arg4);                         \
+      _argvec[5] = (unsigned long)(arg5);                         \
+      _argvec[6] = (unsigned long)(arg6);                         \
+      _argvec[7] = (unsigned long)(arg7);                         \
+      _argvec[8] = (unsigned long)(arg8);                         \
+      _argvec[9] = (unsigned long)(arg9);                         \
+      __asm__ volatile(                                           \
+         VALGRIND_ALIGN_STACK                                     \
+         "subl $12, %%esp\n\t"                                    \
+         "pushl 36(%%eax)\n\t"                                    \
+         "pushl 32(%%eax)\n\t"                                    \
+         "pushl 28(%%eax)\n\t"                                    \
+         "pushl 24(%%eax)\n\t"                                    \
+         "pushl 20(%%eax)\n\t"                                    \
+         "pushl 16(%%eax)\n\t"                                    \
+         "pushl 12(%%eax)\n\t"                                    \
+         "pushl 8(%%eax)\n\t"                                     \
+         "pushl 4(%%eax)\n\t"                                     \
+         "movl (%%eax), %%eax\n\t"  /* target->%eax */            \
+         VALGRIND_CALL_NOREDIR_EAX                                \
+         VALGRIND_RESTORE_STACK                                   \
+         : /*out*/   "=a" (_res)                                  \
+         : /*in*/    "a" (&_argvec[0])                            \
+         : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS, "edi"   \
+      );                                                          \
+      lval = (__typeof__(lval)) _res;                             \
+   } while (0)
+
+#define CALL_FN_W_10W(lval, orig, arg1,arg2,arg3,arg4,arg5,arg6,  \
+                                  arg7,arg8,arg9,arg10)           \
+   do {                                                           \
+      volatile OrigFn        _orig = (orig);                      \
+      volatile unsigned long _argvec[11];                         \
+      volatile unsigned long _res;                                \
+      _argvec[0] = (unsigned long)_orig.nraddr;                   \
+      _argvec[1] = (unsigned long)(arg1);                         \
+      _argvec[2] = (unsigned long)(arg2);                         \
+      _argvec[3] = (unsigned long)(arg3);                         \
+      _argvec[4] = (unsigned long)(arg4);                         \
+      _argvec[5] = (unsigned long)(arg5);                         \
+      _argvec[6] = (unsigned long)(arg6);                         \
+      _argvec[7] = (unsigned long)(arg7);                         \
+      _argvec[8] = (unsigned long)(arg8);                         \
+      _argvec[9] = (unsigned long)(arg9);                         \
+      _argvec[10] = (unsigned long)(arg10);                       \
+      __asm__ volatile(                                           \
+         VALGRIND_ALIGN_STACK                                     \
+         "subl $8, %%esp\n\t"                                     \
+         "pushl 40(%%eax)\n\t"                                    \
+         "pushl 36(%%eax)\n\t"                                    \
+         "pushl 32(%%eax)\n\t"                                    \
+         "pushl 28(%%eax)\n\t"                                    \
+         "pushl 24(%%eax)\n\t"                                    \
+         "pushl 20(%%eax)\n\t"                                    \
+         "pushl 16(%%eax)\n\t"                                    \
+         "pushl 12(%%eax)\n\t"                                    \
+         "pushl 8(%%eax)\n\t"                                     \
+         "pushl 4(%%eax)\n\t"                                     \
+         "movl (%%eax), %%eax\n\t"  /* target->%eax */            \
+         VALGRIND_CALL_NOREDIR_EAX                                \
+         VALGRIND_RESTORE_STACK                                   \
+         : /*out*/   "=a" (_res)                                  \
+         : /*in*/    "a" (&_argvec[0])                            \
+         : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS, "edi"   \
+      );                                                          \
+      lval = (__typeof__(lval)) _res;                             \
+   } while (0)
+
+#define CALL_FN_W_11W(lval, orig, arg1,arg2,arg3,arg4,arg5,       \
+                                  arg6,arg7,arg8,arg9,arg10,      \
+                                  arg11)                          \
+   do {                                                           \
+      volatile OrigFn        _orig = (orig);                      \
+      volatile unsigned long _argvec[12];                         \
+      volatile unsigned long _res;                                \
+      _argvec[0] = (unsigned long)_orig.nraddr;                   \
+      _argvec[1] = (unsigned long)(arg1);                         \
+      _argvec[2] = (unsigned long)(arg2);                         \
+      _argvec[3] = (unsigned long)(arg3);                         \
+      _argvec[4] = (unsigned long)(arg4);                         \
+      _argvec[5] = (unsigned long)(arg5);                         \
+      _argvec[6] = (unsigned long)(arg6);                         \
+      _argvec[7] = (unsigned long)(arg7);                         \
+      _argvec[8] = (unsigned long)(arg8);                         \
+      _argvec[9] = (unsigned long)(arg9);                         \
+      _argvec[10] = (unsigned long)(arg10);                       \
+      _argvec[11] = (unsigned long)(arg11);                       \
+      __asm__ volatile(                                           \
+         VALGRIND_ALIGN_STACK                                     \
+         "subl $4, %%esp\n\t"                                     \
+         "pushl 44(%%eax)\n\t"                                    \
+         "pushl 40(%%eax)\n\t"                                    \
+         "pushl 36(%%eax)\n\t"                                    \
+         "pushl 32(%%eax)\n\t"                                    \
+         "pushl 28(%%eax)\n\t"                                    \
+         "pushl 24(%%eax)\n\t"                                    \
+         "pushl 20(%%eax)\n\t"                                    \
+         "pushl 16(%%eax)\n\t"                                    \
+         "pushl 12(%%eax)\n\t"                                    \
+         "pushl 8(%%eax)\n\t"                                     \
+         "pushl 4(%%eax)\n\t"                                     \
+         "movl (%%eax), %%eax\n\t"  /* target->%eax */            \
+         VALGRIND_CALL_NOREDIR_EAX                                \
+         VALGRIND_RESTORE_STACK                                   \
+         : /*out*/   "=a" (_res)                                  \
+         : /*in*/    "a" (&_argvec[0])                            \
+         : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS, "edi"   \
+      );                                                          \
+      lval = (__typeof__(lval)) _res;                             \
+   } while (0)
+
+#define CALL_FN_W_12W(lval, orig, arg1,arg2,arg3,arg4,arg5,       \
+                                  arg6,arg7,arg8,arg9,arg10,      \
+                                  arg11,arg12)                    \
+   do {                                                           \
+      volatile OrigFn        _orig = (orig);                      \
+      volatile unsigned long _argvec[13];                         \
+      volatile unsigned long _res;                                \
+      _argvec[0] = (unsigned long)_orig.nraddr;                   \
+      _argvec[1] = (unsigned long)(arg1);                         \
+      _argvec[2] = (unsigned long)(arg2);                         \
+      _argvec[3] = (unsigned long)(arg3);                         \
+      _argvec[4] = (unsigned long)(arg4);                         \
+      _argvec[5] = (unsigned long)(arg5);                         \
+      _argvec[6] = (unsigned long)(arg6);                         \
+      _argvec[7] = (unsigned long)(arg7);                         \
+      _argvec[8] = (unsigned long)(arg8);                         \
+      _argvec[9] = (unsigned long)(arg9);                         \
+      _argvec[10] = (unsigned long)(arg10);                       \
+      _argvec[11] = (unsigned long)(arg11);                       \
+      _argvec[12] = (unsigned long)(arg12);                       \
+      __asm__ volatile(                                           \
+         VALGRIND_ALIGN_STACK                                     \
+         "pushl 48(%%eax)\n\t"                                    \
+         "pushl 44(%%eax)\n\t"                                    \
+         "pushl 40(%%eax)\n\t"                                    \
+         "pushl 36(%%eax)\n\t"                                    \
+         "pushl 32(%%eax)\n\t"                                    \
+         "pushl 28(%%eax)\n\t"                                    \
+         "pushl 24(%%eax)\n\t"                                    \
+         "pushl 20(%%eax)\n\t"                                    \
+         "pushl 16(%%eax)\n\t"                                    \
+         "pushl 12(%%eax)\n\t"                                    \
+         "pushl 8(%%eax)\n\t"                                     \
+         "pushl 4(%%eax)\n\t"                                     \
+         "movl (%%eax), %%eax\n\t"  /* target->%eax */            \
+         VALGRIND_CALL_NOREDIR_EAX                                \
+         VALGRIND_RESTORE_STACK                                   \
+         : /*out*/   "=a" (_res)                                  \
+         : /*in*/    "a" (&_argvec[0])                            \
+         : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS, "edi"   \
+      );                                                          \
+      lval = (__typeof__(lval)) _res;                             \
+   } while (0)
+
+#endif /* PLAT_x86_linux || PLAT_x86_darwin */
+
+/* ------------------------ amd64-{linux,darwin} --------------- */
+
+#if defined(PLAT_amd64_linux)  ||  defined(PLAT_amd64_darwin)
+
+/* ARGREGS: rdi rsi rdx rcx r8 r9 (the rest on stack in R-to-L order) */
+
+/* These regs are trashed by the hidden call. */
+#define __CALLER_SAVED_REGS /*"rax",*/ "rcx", "rdx", "rsi",       \
+                            "rdi", "r8", "r9", "r10", "r11"
+
+/* This is all pretty complex.  It's so as to make stack unwinding
+   work reliably.  See bug 243270.  The basic problem is the sub and
+   add of 128 of %rsp in all of the following macros.  If gcc believes
+   the CFA is in %rsp, then unwinding may fail, because what's at the
+   CFA is not what gcc "expected" when it constructs the CFIs for the
+   places where the macros are instantiated.
+
+   But we can't just add a CFI annotation to increase the CFA offset
+   by 128, to match the sub of 128 from %rsp, because we don't know
+   whether gcc has chosen %rsp as the CFA at that point, or whether it
+   has chosen some other register (eg, %rbp).  In the latter case,
+   adding a CFI annotation to change the CFA offset is simply wrong.
+
+   So the solution is to get hold of the CFA using
+   __builtin_dwarf_cfa(), put it in a known register, and add a
+   CFI annotation to say what the register is.  We choose %rbp for
+   this (perhaps perversely), because:
+
+   (1) %rbp is already subject to unwinding.  If a new register was
+       chosen then the unwinder would have to unwind it in all stack
+       traces, which is expensive, and
+
+   (2) %rbp is already subject to precise exception updates in the
+       JIT.  If a new register was chosen, we'd have to have precise
+       exceptions for it too, which reduces performance of the
+       generated code.
+
+   However .. one extra complication.  We can't just whack the result
+   of __builtin_dwarf_cfa() into %rbp and then add %rbp to the
+   list of trashed registers at the end of the inline assembly
+   fragments; gcc won't allow %rbp to appear in that list.  Hence
+   instead we need to stash %rbp in %r15 for the duration of the asm,
+   and say that %r15 is trashed instead.  gcc seems happy to go with
+   that.
+
+   Oh .. and this all needs to be conditionalised so that it is
+   unchanged from before this commit, when compiled with older gccs
+   that don't support __builtin_dwarf_cfa.  Furthermore, since
+   this header file is freestanding, it has to be independent of
+   config.h, and so the following conditionalisation cannot depend on
+   configure time checks.
+
+   Although it's not clear from
+   'defined(__GNUC__) && defined(__GCC_HAVE_DWARF2_CFI_ASM)',
+   this expression excludes Darwin.
+   .cfi directives in Darwin assembly appear to be completely
+   different and I haven't investigated how they work.
+
+   For even more entertainment value, note we have to use the
+   completely undocumented __builtin_dwarf_cfa(), which appears to
+   really compute the CFA, whereas __builtin_frame_address(0) claims
+   to but actually doesn't.  See
+   https://bugs.kde.org/show_bug.cgi?id=243270#c47
+*/
+#if defined(__GNUC__) && defined(__GCC_HAVE_DWARF2_CFI_ASM)
+#  define __FRAME_POINTER                                         \
+      ,"r"(__builtin_dwarf_cfa())
+#  define VALGRIND_CFI_PROLOGUE                                   \
+      "movq %%rbp, %%r15\n\t"                                     \
+      "movq %2, %%rbp\n\t"                                        \
+      ".cfi_remember_state\n\t"                                   \
+      ".cfi_def_cfa rbp, 0\n\t"
+#  define VALGRIND_CFI_EPILOGUE                                   \
+      "movq %%r15, %%rbp\n\t"                                     \
+      ".cfi_restore_state\n\t"
+#else
+#  define __FRAME_POINTER
+#  define VALGRIND_CFI_PROLOGUE
+#  define VALGRIND_CFI_EPILOGUE
+#endif
+
+/* Macros to save and align the stack before making a function
+   call and restore it afterwards as gcc may not keep the stack
+   pointer aligned if it doesn't realise calls are being made
+   to other functions. */
+
+#define VALGRIND_ALIGN_STACK               \
+      "movq %%rsp,%%r14\n\t"               \
+      "andq $0xfffffffffffffff0,%%rsp\n\t"
+#define VALGRIND_RESTORE_STACK             \
+      "movq %%r14,%%rsp\n\t"
+
+/* These CALL_FN_ macros assume that on amd64-linux, sizeof(unsigned
+   long) == 8. */
+
+/* NB 9 Sept 07.  There is a nasty kludge here in all these CALL_FN_
+   macros.  In order not to trash the stack redzone, we need to drop
+   %rsp by 128 before the hidden call, and restore afterwards.  The
+   nastyness is that it is only by luck that the stack still appears
+   to be unwindable during the hidden call - since then the behaviour
+   of any routine using this macro does not match what the CFI data
+   says.  Sigh.
+
+   Why is this important?  Imagine that a wrapper has a stack
+   allocated local, and passes to the hidden call, a pointer to it.
+   Because gcc does not know about the hidden call, it may allocate
+   that local in the redzone.  Unfortunately the hidden call may then
+   trash it before it comes to use it.  So we must step clear of the
+   redzone, for the duration of the hidden call, to make it safe.
+
+   Probably the same problem afflicts the other redzone-style ABIs too
+   (ppc64-linux); but for those, the stack is
+   self describing (none of this CFI nonsense) so at least messing
+   with the stack pointer doesn't give a danger of non-unwindable
+   stack. */
+
+#define CALL_FN_W_v(lval, orig)                                        \
+   do {                                                                \
+      volatile OrigFn        _orig = (orig);                           \
+      volatile unsigned long _argvec[1];                               \
+      volatile unsigned long _res;                                     \
+      _argvec[0] = (unsigned long)_orig.nraddr;                        \
+      __asm__ volatile(                                                \
+         VALGRIND_CFI_PROLOGUE                                         \
+         VALGRIND_ALIGN_STACK                                          \
+         "subq $128,%%rsp\n\t"                                         \
+         "movq (%%rax), %%rax\n\t"  /* target->%rax */                 \
+         VALGRIND_CALL_NOREDIR_RAX                                     \
+         VALGRIND_RESTORE_STACK                                        \
+         VALGRIND_CFI_EPILOGUE                                         \
+         : /*out*/   "=a" (_res)                                       \
+         : /*in*/    "a" (&_argvec[0]) __FRAME_POINTER                 \
+         : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS, "r14", "r15" \
+      );                                                               \
+      lval = (__typeof__(lval)) _res;                                  \
+   } while (0)
+
+#define CALL_FN_W_W(lval, orig, arg1)                                  \
+   do {                                                                \
+      volatile OrigFn        _orig = (orig);                           \
+      volatile unsigned long _argvec[2];                               \
+      volatile unsigned long _res;                                     \
+      _argvec[0] = (unsigned long)_orig.nraddr;                        \
+      _argvec[1] = (unsigned long)(arg1);                              \
+      __asm__ volatile(                                                \
+         VALGRIND_CFI_PROLOGUE                                         \
+         VALGRIND_ALIGN_STACK                                          \
+         "subq $128,%%rsp\n\t"                                         \
+         "movq 8(%%rax), %%rdi\n\t"                                    \
+         "movq (%%rax), %%rax\n\t"  /* target->%rax */                 \
+         VALGRIND_CALL_NOREDIR_RAX                                     \
+         VALGRIND_RESTORE_STACK                                        \
+         VALGRIND_CFI_EPILOGUE                                         \
+         : /*out*/   "=a" (_res)                                       \
+         : /*in*/    "a" (&_argvec[0]) __FRAME_POINTER                 \
+         : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS, "r14", "r15" \
+      );                                                               \
+      lval = (__typeof__(lval)) _res;                                  \
+   } while (0)
+
+#define CALL_FN_W_WW(lval, orig, arg1,arg2)                            \
+   do {                                                                \
+      volatile OrigFn        _orig = (orig);                           \
+      volatile unsigned long _argvec[3];                               \
+      volatile unsigned long _res;                                     \
+      _argvec[0] = (unsigned long)_orig.nraddr;                        \
+      _argvec[1] = (unsigned long)(arg1);                              \
+      _argvec[2] = (unsigned long)(arg2);                              \
+      __asm__ volatile(                                                \
+         VALGRIND_CFI_PROLOGUE                                         \
+         VALGRIND_ALIGN_STACK                                          \
+         "subq $128,%%rsp\n\t"                                         \
+         "movq 16(%%rax), %%rsi\n\t"                                   \
+         "movq 8(%%rax), %%rdi\n\t"                                    \
+         "movq (%%rax), %%rax\n\t"  /* target->%rax */                 \
+         VALGRIND_CALL_NOREDIR_RAX                                     \
+         VALGRIND_RESTORE_STACK                                        \
+         VALGRIND_CFI_EPILOGUE                                         \
+         : /*out*/   "=a" (_res)                                       \
+         : /*in*/    "a" (&_argvec[0]) __FRAME_POINTER                 \
+         : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS, "r14", "r15" \
+      );                                                               \
+      lval = (__typeof__(lval)) _res;                                  \
+   } while (0)
+
+#define CALL_FN_W_WWW(lval, orig, arg1,arg2,arg3)                      \
+   do {                                                                \
+      volatile OrigFn        _orig = (orig);                           \
+      volatile unsigned long _argvec[4];                               \
+      volatile unsigned long _res;                                     \
+      _argvec[0] = (unsigned long)_orig.nraddr;                        \
+      _argvec[1] = (unsigned long)(arg1);                              \
+      _argvec[2] = (unsigned long)(arg2);                              \
+      _argvec[3] = (unsigned long)(arg3);                              \
+      __asm__ volatile(                                                \
+         VALGRIND_CFI_PROLOGUE                                         \
+         VALGRIND_ALIGN_STACK                                          \
+         "subq $128,%%rsp\n\t"                                         \
+         "movq 24(%%rax), %%rdx\n\t"                                   \
+         "movq 16(%%rax), %%rsi\n\t"                                   \
+         "movq 8(%%rax), %%rdi\n\t"                                    \
+         "movq (%%rax), %%rax\n\t"  /* target->%rax */                 \
+         VALGRIND_CALL_NOREDIR_RAX                                     \
+         VALGRIND_RESTORE_STACK                                        \
+         VALGRIND_CFI_EPILOGUE                                         \
+         : /*out*/   "=a" (_res)                                       \
+         : /*in*/    "a" (&_argvec[0]) __FRAME_POINTER                 \
+         : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS, "r14", "r15" \
+      );                                                               \
+      lval = (__typeof__(lval)) _res;                                  \
+   } while (0)
+
+#define CALL_FN_W_WWWW(lval, orig, arg1,arg2,arg3,arg4)                \
+   do {                                                                \
+      volatile OrigFn        _orig = (orig);                           \
+      volatile unsigned long _argvec[5];                               \
+      volatile unsigned long _res;                                     \
+      _argvec[0] = (unsigned long)_orig.nraddr;                        \
+      _argvec[1] = (unsigned long)(arg1);                              \
+      _argvec[2] = (unsigned long)(arg2);                              \
+      _argvec[3] = (unsigned long)(arg3);                              \
+      _argvec[4] = (unsigned long)(arg4);                              \
+      __asm__ volatile(                                                \
+         VALGRIND_CFI_PROLOGUE                                         \
+         VALGRIND_ALIGN_STACK                                          \
+         "subq $128,%%rsp\n\t"                                         \
+         "movq 32(%%rax), %%rcx\n\t"                                   \
+         "movq 24(%%rax), %%rdx\n\t"                                   \
+         "movq 16(%%rax), %%rsi\n\t"                                   \
+         "movq 8(%%rax), %%rdi\n\t"                                    \
+         "movq (%%rax), %%rax\n\t"  /* target->%rax */                 \
+         VALGRIND_CALL_NOREDIR_RAX                                     \
+         VALGRIND_RESTORE_STACK                                        \
+         VALGRIND_CFI_EPILOGUE                                         \
+         : /*out*/   "=a" (_res)                                       \
+         : /*in*/    "a" (&_argvec[0]) __FRAME_POINTER                 \
+         : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS, "r14", "r15" \
+      );                                                               \
+      lval = (__typeof__(lval)) _res;                                  \
+   } while (0)
+
+#define CALL_FN_W_5W(lval, orig, arg1,arg2,arg3,arg4,arg5)             \
+   do {                                                                \
+      volatile OrigFn        _orig = (orig);                           \
+      volatile unsigned long _argvec[6];                               \
+      volatile unsigned long _res;                                     \
+      _argvec[0] = (unsigned long)_orig.nraddr;                        \
+      _argvec[1] = (unsigned long)(arg1);                              \
+      _argvec[2] = (unsigned long)(arg2);                              \
+      _argvec[3] = (unsigned long)(arg3);                              \
+      _argvec[4] = (unsigned long)(arg4);                              \
+      _argvec[5] = (unsigned long)(arg5);                              \
+      __asm__ volatile(                                                \
+         VALGRIND_CFI_PROLOGUE                                         \
+         VALGRIND_ALIGN_STACK                                          \
+         "subq $128,%%rsp\n\t"                                         \
+         "movq 40(%%rax), %%r8\n\t"                                    \
+         "movq 32(%%rax), %%rcx\n\t"                                   \
+         "movq 24(%%rax), %%rdx\n\t"                                   \
+         "movq 16(%%rax), %%rsi\n\t"                                   \
+         "movq 8(%%rax), %%rdi\n\t"                                    \
+         "movq (%%rax), %%rax\n\t"  /* target->%rax */                 \
+         VALGRIND_CALL_NOREDIR_RAX                                     \
+         VALGRIND_RESTORE_STACK                                        \
+         VALGRIND_CFI_EPILOGUE                                         \
+         : /*out*/   "=a" (_res)                                       \
+         : /*in*/    "a" (&_argvec[0]) __FRAME_POINTER                 \
+         : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS, "r14", "r15" \
+      );                                                               \
+      lval = (__typeof__(lval)) _res;                                  \
+   } while (0)
+
+#define CALL_FN_W_6W(lval, orig, arg1,arg2,arg3,arg4,arg5,arg6)        \
+   do {                                                                \
+      volatile OrigFn        _orig = (orig);                           \
+      volatile unsigned long _argvec[7];                               \
+      volatile unsigned long _res;                                     \
+      _argvec[0] = (unsigned long)_orig.nraddr;                        \
+      _argvec[1] = (unsigned long)(arg1);                              \
+      _argvec[2] = (unsigned long)(arg2);                              \
+      _argvec[3] = (unsigned long)(arg3);                              \
+      _argvec[4] = (unsigned long)(arg4);                              \
+      _argvec[5] = (unsigned long)(arg5);                              \
+      _argvec[6] = (unsigned long)(arg6);                              \
+      __asm__ volatile(                                                \
+         VALGRIND_CFI_PROLOGUE                                         \
+         VALGRIND_ALIGN_STACK                                          \
+         "subq $128,%%rsp\n\t"                                         \
+         "movq 48(%%rax), %%r9\n\t"                                    \
+         "movq 40(%%rax), %%r8\n\t"                                    \
+         "movq 32(%%rax), %%rcx\n\t"                                   \
+         "movq 24(%%rax), %%rdx\n\t"                                   \
+         "movq 16(%%rax), %%rsi\n\t"                                   \
+         "movq 8(%%rax), %%rdi\n\t"                                    \
+         "movq (%%rax), %%rax\n\t"  /* target->%rax */                 \
+         VALGRIND_CALL_NOREDIR_RAX                                     \
+         VALGRIND_RESTORE_STACK                                        \
+         VALGRIND_CFI_EPILOGUE                                         \
+         : /*out*/   "=a" (_res)                                       \
+         : /*in*/    "a" (&_argvec[0]) __FRAME_POINTER                 \
+         : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS, "r14", "r15" \
+      );                                                               \
+      lval = (__typeof__(lval)) _res;                                  \
+   } while (0)
+
+#define CALL_FN_W_7W(lval, orig, arg1,arg2,arg3,arg4,arg5,arg6,        \
+                                 arg7)                                 \
+   do {                                                                \
+      volatile OrigFn        _orig = (orig);                           \
+      volatile unsigned long _argvec[8];                               \
+      volatile unsigned long _res;                                     \
+      _argvec[0] = (unsigned long)_orig.nraddr;                        \
+      _argvec[1] = (unsigned long)(arg1);                              \
+      _argvec[2] = (unsigned long)(arg2);                              \
+      _argvec[3] = (unsigned long)(arg3);                              \
+      _argvec[4] = (unsigned long)(arg4);                              \
+      _argvec[5] = (unsigned long)(arg5);                              \
+      _argvec[6] = (unsigned long)(arg6);                              \
+      _argvec[7] = (unsigned long)(arg7);                              \
+      __asm__ volatile(                                                \
+         VALGRIND_CFI_PROLOGUE                                         \
+         VALGRIND_ALIGN_STACK                                          \
+         "subq $136,%%rsp\n\t"                                         \
+         "pushq 56(%%rax)\n\t"                                         \
+         "movq 48(%%rax), %%r9\n\t"                                    \
+         "movq 40(%%rax), %%r8\n\t"                                    \
+         "movq 32(%%rax), %%rcx\n\t"                                   \
+         "movq 24(%%rax), %%rdx\n\t"                                   \
+         "movq 16(%%rax), %%rsi\n\t"                                   \
+         "movq 8(%%rax), %%rdi\n\t"                                    \
+         "movq (%%rax), %%rax\n\t"  /* target->%rax */                 \
+         VALGRIND_CALL_NOREDIR_RAX                                     \
+         VALGRIND_RESTORE_STACK                                        \
+         VALGRIND_CFI_EPILOGUE                                         \
+         : /*out*/   "=a" (_res)                                       \
+         : /*in*/    "a" (&_argvec[0]) __FRAME_POINTER                 \
+         : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS, "r14", "r15" \
+      );                                                               \
+      lval = (__typeof__(lval)) _res;                                  \
+   } while (0)
+
+#define CALL_FN_W_8W(lval, orig, arg1,arg2,arg3,arg4,arg5,arg6,        \
+                                 arg7,arg8)                            \
+   do {                                                                \
+      volatile OrigFn        _orig = (orig);                           \
+      volatile unsigned long _argvec[9];                               \
+      volatile unsigned long _res;                                     \
+      _argvec[0] = (unsigned long)_orig.nraddr;                        \
+      _argvec[1] = (unsigned long)(arg1);                              \
+      _argvec[2] = (unsigned long)(arg2);                              \
+      _argvec[3] = (unsigned long)(arg3);                              \
+      _argvec[4] = (unsigned long)(arg4);                              \
+      _argvec[5] = (unsigned long)(arg5);                              \
+      _argvec[6] = (unsigned long)(arg6);                              \
+      _argvec[7] = (unsigned long)(arg7);                              \
+      _argvec[8] = (unsigned long)(arg8);                              \
+      __asm__ volatile(                                                \
+         VALGRIND_CFI_PROLOGUE                                         \
+         VALGRIND_ALIGN_STACK                                          \
+         "subq $128,%%rsp\n\t"                                         \
+         "pushq 64(%%rax)\n\t"                                         \
+         "pushq 56(%%rax)\n\t"                                         \
+         "movq 48(%%rax), %%r9\n\t"                                    \
+         "movq 40(%%rax), %%r8\n\t"                                    \
+         "movq 32(%%rax), %%rcx\n\t"                                   \
+         "movq 24(%%rax), %%rdx\n\t"                                   \
+         "movq 16(%%rax), %%rsi\n\t"                                   \
+         "movq 8(%%rax), %%rdi\n\t"                                    \
+         "movq (%%rax), %%rax\n\t"  /* target->%rax */                 \
+         VALGRIND_CALL_NOREDIR_RAX                                     \
+         VALGRIND_RESTORE_STACK                                        \
+         VALGRIND_CFI_EPILOGUE                                         \
+         : /*out*/   "=a" (_res)                                       \
+         : /*in*/    "a" (&_argvec[0]) __FRAME_POINTER                 \
+         : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS, "r14", "r15" \
+      );                                                               \
+      lval = (__typeof__(lval)) _res;                                  \
+   } while (0)
+
+#define CALL_FN_W_9W(lval, orig, arg1,arg2,arg3,arg4,arg5,arg6,        \
+                                 arg7,arg8,arg9)                       \
+   do {                                                                \
+      volatile OrigFn        _orig = (orig);                           \
+      volatile unsigned long _argvec[10];                              \
+      volatile unsigned long _res;                                     \
+      _argvec[0] = (unsigned long)_orig.nraddr;                        \
+      _argvec[1] = (unsigned long)(arg1);                              \
+      _argvec[2] = (unsigned long)(arg2);                              \
+      _argvec[3] = (unsigned long)(arg3);                              \
+      _argvec[4] = (unsigned long)(arg4);                              \
+      _argvec[5] = (unsigned long)(arg5);                              \
+      _argvec[6] = (unsigned long)(arg6);                              \
+      _argvec[7] = (unsigned long)(arg7);                              \
+      _argvec[8] = (unsigned long)(arg8);                              \
+      _argvec[9] = (unsigned long)(arg9);                              \
+      __asm__ volatile(                                                \
+         VALGRIND_CFI_PROLOGUE                                         \
+         VALGRIND_ALIGN_STACK                                          \
+         "subq $136,%%rsp\n\t"                                         \
+         "pushq 72(%%rax)\n\t"                                         \
+         "pushq 64(%%rax)\n\t"                                         \
+         "pushq 56(%%rax)\n\t"                                         \
+         "movq 48(%%rax), %%r9\n\t"                                    \
+         "movq 40(%%rax), %%r8\n\t"                                    \
+         "movq 32(%%rax), %%rcx\n\t"                                   \
+         "movq 24(%%rax), %%rdx\n\t"                                   \
+         "movq 16(%%rax), %%rsi\n\t"                                   \
+         "movq 8(%%rax), %%rdi\n\t"                                    \
+         "movq (%%rax), %%rax\n\t"  /* target->%rax */                 \
+         VALGRIND_CALL_NOREDIR_RAX                                     \
+         VALGRIND_RESTORE_STACK                                        \
+         VALGRIND_CFI_EPILOGUE                                         \
+         : /*out*/   "=a" (_res)                                       \
+         : /*in*/    "a" (&_argvec[0]) __FRAME_POINTER                 \
+         : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS, "r14", "r15" \
+      );                                                               \
+      lval = (__typeof__(lval)) _res;                                  \
+   } while (0)
+
+#define CALL_FN_W_10W(lval, orig, arg1,arg2,arg3,arg4,arg5,arg6,       \
+                                  arg7,arg8,arg9,arg10)                \
+   do {                                                                \
+      volatile OrigFn        _orig = (orig);                           \
+      volatile unsigned long _argvec[11];                              \
+      volatile unsigned long _res;                                     \
+      _argvec[0] = (unsigned long)_orig.nraddr;                        \
+      _argvec[1] = (unsigned long)(arg1);                              \
+      _argvec[2] = (unsigned long)(arg2);                              \
+      _argvec[3] = (unsigned long)(arg3);                              \
+      _argvec[4] = (unsigned long)(arg4);                              \
+      _argvec[5] = (unsigned long)(arg5);                              \
+      _argvec[6] = (unsigned long)(arg6);                              \
+      _argvec[7] = (unsigned long)(arg7);                              \
+      _argvec[8] = (unsigned long)(arg8);                              \
+      _argvec[9] = (unsigned long)(arg9);                              \
+      _argvec[10] = (unsigned long)(arg10);                            \
+      __asm__ volatile(                                                \
+         VALGRIND_CFI_PROLOGUE                                         \
+         VALGRIND_ALIGN_STACK                                          \
+         "subq $128,%%rsp\n\t"                                         \
+         "pushq 80(%%rax)\n\t"                                         \
+         "pushq 72(%%rax)\n\t"                                         \
+         "pushq 64(%%rax)\n\t"                                         \
+         "pushq 56(%%rax)\n\t"                                         \
+         "movq 48(%%rax), %%r9\n\t"                                    \
+         "movq 40(%%rax), %%r8\n\t"                                    \
+         "movq 32(%%rax), %%rcx\n\t"                                   \
+         "movq 24(%%rax), %%rdx\n\t"                                   \
+         "movq 16(%%rax), %%rsi\n\t"                                   \
+         "movq 8(%%rax), %%rdi\n\t"                                    \
+         "movq (%%rax), %%rax\n\t"  /* target->%rax */                 \
+         VALGRIND_CALL_NOREDIR_RAX                                     \
+         VALGRIND_RESTORE_STACK                                        \
+         VALGRIND_CFI_EPILOGUE                                         \
+         : /*out*/   "=a" (_res)                                       \
+         : /*in*/    "a" (&_argvec[0]) __FRAME_POINTER                 \
+         : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS, "r14", "r15" \
+      );                                                               \
+      lval = (__typeof__(lval)) _res;                                  \
+   } while (0)
+
+#define CALL_FN_W_11W(lval, orig, arg1,arg2,arg3,arg4,arg5,arg6,       \
+                                  arg7,arg8,arg9,arg10,arg11)          \
+   do {                                                                \
+      volatile OrigFn        _orig = (orig);                           \
+      volatile unsigned long _argvec[12];                              \
+      volatile unsigned long _res;                                     \
+      _argvec[0] = (unsigned long)_orig.nraddr;                        \
+      _argvec[1] = (unsigned long)(arg1);                              \
+      _argvec[2] = (unsigned long)(arg2);                              \
+      _argvec[3] = (unsigned long)(arg3);                              \
+      _argvec[4] = (unsigned long)(arg4);                              \
+      _argvec[5] = (unsigned long)(arg5);                              \
+      _argvec[6] = (unsigned long)(arg6);                              \
+      _argvec[7] = (unsigned long)(arg7);                              \
+      _argvec[8] = (unsigned long)(arg8);                              \
+      _argvec[9] = (unsigned long)(arg9);                              \
+      _argvec[10] = (unsigned long)(arg10);                            \
+      _argvec[11] = (unsigned long)(arg11);                            \
+      __asm__ volatile(                                                \
+         VALGRIND_CFI_PROLOGUE                                         \
+         VALGRIND_ALIGN_STACK                                          \
+         "subq $136,%%rsp\n\t"                                         \
+         "pushq 88(%%rax)\n\t"                                         \
+         "pushq 80(%%rax)\n\t"                                         \
+         "pushq 72(%%rax)\n\t"                                         \
+         "pushq 64(%%rax)\n\t"                                         \
+         "pushq 56(%%rax)\n\t"                                         \
+         "movq 48(%%rax), %%r9\n\t"                                    \
+         "movq 40(%%rax), %%r8\n\t"                                    \
+         "movq 32(%%rax), %%rcx\n\t"                                   \
+         "movq 24(%%rax), %%rdx\n\t"                                   \
+         "movq 16(%%rax), %%rsi\n\t"                                   \
+         "movq 8(%%rax), %%rdi\n\t"                                    \
+         "movq (%%rax), %%rax\n\t"  /* target->%rax */                 \
+         VALGRIND_CALL_NOREDIR_RAX                                     \
+         VALGRIND_RESTORE_STACK                                        \
+         VALGRIND_CFI_EPILOGUE                                         \
+         : /*out*/   "=a" (_res)                                       \
+         : /*in*/    "a" (&_argvec[0]) __FRAME_POINTER                 \
+         : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS, "r14", "r15" \
+      );                                                               \
+      lval = (__typeof__(lval)) _res;                                  \
+   } while (0)
+
+#define CALL_FN_W_12W(lval, orig, arg1,arg2,arg3,arg4,arg5,arg6,       \
+                                arg7,arg8,arg9,arg10,arg11,arg12)      \
+   do {                                                                \
+      volatile OrigFn        _orig = (orig);                           \
+      volatile unsigned long _argvec[13];                              \
+      volatile unsigned long _res;                                     \
+      _argvec[0] = (unsigned long)_orig.nraddr;                        \
+      _argvec[1] = (unsigned long)(arg1);                              \
+      _argvec[2] = (unsigned long)(arg2);                              \
+      _argvec[3] = (unsigned long)(arg3);                              \
+      _argvec[4] = (unsigned long)(arg4);                              \
+      _argvec[5] = (unsigned long)(arg5);                              \
+      _argvec[6] = (unsigned long)(arg6);                              \
+      _argvec[7] = (unsigned long)(arg7);                              \
+      _argvec[8] = (unsigned long)(arg8);                              \
+      _argvec[9] = (unsigned long)(arg9);                              \
+      _argvec[10] = (unsigned long)(arg10);                            \
+      _argvec[11] = (unsigned long)(arg11);                            \
+      _argvec[12] = (unsigned long)(arg12);                            \
+      __asm__ volatile(                                                \
+         VALGRIND_CFI_PROLOGUE                                         \
+         VALGRIND_ALIGN_STACK                                          \
+         "subq $128,%%rsp\n\t"                                         \
+         "pushq 96(%%rax)\n\t"                                         \
+         "pushq 88(%%rax)\n\t"                                         \
+         "pushq 80(%%rax)\n\t"                                         \
+         "pushq 72(%%rax)\n\t"                                         \
+         "pushq 64(%%rax)\n\t"                                         \
+         "pushq 56(%%rax)\n\t"                                         \
+         "movq 48(%%rax), %%r9\n\t"                                    \
+         "movq 40(%%rax), %%r8\n\t"                                    \
+         "movq 32(%%rax), %%rcx\n\t"                                   \
+         "movq 24(%%rax), %%rdx\n\t"                                   \
+         "movq 16(%%rax), %%rsi\n\t"                                   \
+         "movq 8(%%rax), %%rdi\n\t"                                    \
+         "movq (%%rax), %%rax\n\t"  /* target->%rax */                 \
+         VALGRIND_CALL_NOREDIR_RAX                                     \
+         VALGRIND_RESTORE_STACK                                        \
+         VALGRIND_CFI_EPILOGUE                                         \
+         : /*out*/   "=a" (_res)                                       \
+         : /*in*/    "a" (&_argvec[0]) __FRAME_POINTER                 \
+         : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS, "r14", "r15" \
+      );                                                               \
+      lval = (__typeof__(lval)) _res;                                  \
+   } while (0)
+
+#endif /* PLAT_amd64_linux || PLAT_amd64_darwin */
+
+/* ------------------------ ppc32-linux ------------------------ */
+
+#if defined(PLAT_ppc32_linux)
+
+/* This is useful for finding out about the on-stack stuff:
+
+   extern int f9  ( int,int,int,int,int,int,int,int,int );
+   extern int f10 ( int,int,int,int,int,int,int,int,int,int );
+   extern int f11 ( int,int,int,int,int,int,int,int,int,int,int );
+   extern int f12 ( int,int,int,int,int,int,int,int,int,int,int,int );
+
+   int g9 ( void ) {
+      return f9(11,22,33,44,55,66,77,88,99);
+   }
+   int g10 ( void ) {
+      return f10(11,22,33,44,55,66,77,88,99,110);
+   }
+   int g11 ( void ) {
+      return f11(11,22,33,44,55,66,77,88,99,110,121);
+   }
+   int g12 ( void ) {
+      return f12(11,22,33,44,55,66,77,88,99,110,121,132);
+   }
+*/
+
+/* ARGREGS: r3 r4 r5 r6 r7 r8 r9 r10 (the rest on stack somewhere) */
+
+/* These regs are trashed by the hidden call. */
+#define __CALLER_SAVED_REGS                                       \
+   "lr", "ctr", "xer",                                            \
+   "cr0", "cr1", "cr2", "cr3", "cr4", "cr5", "cr6", "cr7",        \
+   "r0", "r2", "r3", "r4", "r5", "r6", "r7", "r8", "r9", "r10",   \
+   "r11", "r12", "r13"
+
+/* Macros to save and align the stack before making a function
+   call and restore it afterwards as gcc may not keep the stack
+   pointer aligned if it doesn't realise calls are being made
+   to other functions. */
+
+#define VALGRIND_ALIGN_STACK               \
+      "mr 28,1\n\t"                        \
+      "rlwinm 1,1,0,0,27\n\t"
+#define VALGRIND_RESTORE_STACK             \
+      "mr 1,28\n\t"
+
+/* These CALL_FN_ macros assume that on ppc32-linux, 
+   sizeof(unsigned long) == 4. */
+
+#define CALL_FN_W_v(lval, orig)                                   \
+   do {                                                           \
+      volatile OrigFn        _orig = (orig);                      \
+      volatile unsigned long _argvec[1];                          \
+      volatile unsigned long _res;                                \
+      _argvec[0] = (unsigned long)_orig.nraddr;                   \
+      __asm__ volatile(                                           \
+         VALGRIND_ALIGN_STACK                                     \
+         "mr 11,%1\n\t"                                           \
+         "lwz 11,0(11)\n\t"  /* target->r11 */                    \
+         VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_R11                  \
+         VALGRIND_RESTORE_STACK                                   \
+         "mr %0,3"                                                \
+         : /*out*/   "=r" (_res)                                  \
+         : /*in*/    "r" (&_argvec[0])                            \
+         : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS, "r28"   \
+      );                                                          \
+      lval = (__typeof__(lval)) _res;                             \
+   } while (0)
+
+#define CALL_FN_W_W(lval, orig, arg1)                             \
+   do {                                                           \
+      volatile OrigFn        _orig = (orig);                      \
+      volatile unsigned long _argvec[2];                          \
+      volatile unsigned long _res;                                \
+      _argvec[0] = (unsigned long)_orig.nraddr;                   \
+      _argvec[1] = (unsigned long)arg1;                           \
+      __asm__ volatile(                                           \
+         VALGRIND_ALIGN_STACK                                     \
+         "mr 11,%1\n\t"                                           \
+         "lwz 3,4(11)\n\t"   /* arg1->r3 */                       \
+         "lwz 11,0(11)\n\t"  /* target->r11 */                    \
+         VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_R11                  \
+         VALGRIND_RESTORE_STACK                                   \
+         "mr %0,3"                                                \
+         : /*out*/   "=r" (_res)                                  \
+         : /*in*/    "r" (&_argvec[0])                            \
+         : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS, "r28"   \
+      );                                                          \
+      lval = (__typeof__(lval)) _res;                             \
+   } while (0)
+
+#define CALL_FN_W_WW(lval, orig, arg1,arg2)                       \
+   do {                                                           \
+      volatile OrigFn        _orig = (orig);                      \
+      volatile unsigned long _argvec[3];                          \
+      volatile unsigned long _res;                                \
+      _argvec[0] = (unsigned long)_orig.nraddr;                   \
+      _argvec[1] = (unsigned long)arg1;                           \
+      _argvec[2] = (unsigned long)arg2;                           \
+      __asm__ volatile(                                           \
+         VALGRIND_ALIGN_STACK                                     \
+         "mr 11,%1\n\t"                                           \
+         "lwz 3,4(11)\n\t"   /* arg1->r3 */                       \
+         "lwz 4,8(11)\n\t"                                        \
+         "lwz 11,0(11)\n\t"  /* target->r11 */                    \
+         VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_R11                  \
+         VALGRIND_RESTORE_STACK                                   \
+         "mr %0,3"                                                \
+         : /*out*/   "=r" (_res)                                  \
+         : /*in*/    "r" (&_argvec[0])                            \
+         : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS, "r28"   \
+      );                                                          \
+      lval = (__typeof__(lval)) _res;                             \
+   } while (0)
+
+#define CALL_FN_W_WWW(lval, orig, arg1,arg2,arg3)                 \
+   do {                                                           \
+      volatile OrigFn        _orig = (orig);                      \
+      volatile unsigned long _argvec[4];                          \
+      volatile unsigned long _res;                                \
+      _argvec[0] = (unsigned long)_orig.nraddr;                   \
+      _argvec[1] = (unsigned long)arg1;                           \
+      _argvec[2] = (unsigned long)arg2;                           \
+      _argvec[3] = (unsigned long)arg3;                           \
+      __asm__ volatile(                                           \
+         VALGRIND_ALIGN_STACK                                     \
+         "mr 11,%1\n\t"                                           \
+         "lwz 3,4(11)\n\t"   /* arg1->r3 */                       \
+         "lwz 4,8(11)\n\t"                                        \
+         "lwz 5,12(11)\n\t"                                       \
+         "lwz 11,0(11)\n\t"  /* target->r11 */                    \
+         VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_R11                  \
+         VALGRIND_RESTORE_STACK                                   \
+         "mr %0,3"                                                \
+         : /*out*/   "=r" (_res)                                  \
+         : /*in*/    "r" (&_argvec[0])                            \
+         : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS, "r28"   \
+      );                                                          \
+      lval = (__typeof__(lval)) _res;                             \
+   } while (0)
+
+#define CALL_FN_W_WWWW(lval, orig, arg1,arg2,arg3,arg4)           \
+   do {                                                           \
+      volatile OrigFn        _orig = (orig);                      \
+      volatile unsigned long _argvec[5];                          \
+      volatile unsigned long _res;                                \
+      _argvec[0] = (unsigned long)_orig.nraddr;                   \
+      _argvec[1] = (unsigned long)arg1;                           \
+      _argvec[2] = (unsigned long)arg2;                           \
+      _argvec[3] = (unsigned long)arg3;                           \
+      _argvec[4] = (unsigned long)arg4;                           \
+      __asm__ volatile(                                           \
+         VALGRIND_ALIGN_STACK                                     \
+         "mr 11,%1\n\t"                                           \
+         "lwz 3,4(11)\n\t"   /* arg1->r3 */                       \
+         "lwz 4,8(11)\n\t"                                        \
+         "lwz 5,12(11)\n\t"                                       \
+         "lwz 6,16(11)\n\t"  /* arg4->r6 */                       \
+         "lwz 11,0(11)\n\t"  /* target->r11 */                    \
+         VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_R11                  \
+         VALGRIND_RESTORE_STACK                                   \
+         "mr %0,3"                                                \
+         : /*out*/   "=r" (_res)                                  \
+         : /*in*/    "r" (&_argvec[0])                            \
+         : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS, "r28"   \
+      );                                                          \
+      lval = (__typeof__(lval)) _res;                             \
+   } while (0)
+
+#define CALL_FN_W_5W(lval, orig, arg1,arg2,arg3,arg4,arg5)        \
+   do {                                                           \
+      volatile OrigFn        _orig = (orig);                      \
+      volatile unsigned long _argvec[6];                          \
+      volatile unsigned long _res;                                \
+      _argvec[0] = (unsigned long)_orig.nraddr;                   \
+      _argvec[1] = (unsigned long)arg1;                           \
+      _argvec[2] = (unsigned long)arg2;                           \
+      _argvec[3] = (unsigned long)arg3;                           \
+      _argvec[4] = (unsigned long)arg4;                           \
+      _argvec[5] = (unsigned long)arg5;                           \
+      __asm__ volatile(                                           \
+         VALGRIND_ALIGN_STACK                                     \
+         "mr 11,%1\n\t"                                           \
+         "lwz 3,4(11)\n\t"   /* arg1->r3 */                       \
+         "lwz 4,8(11)\n\t"                                        \
+         "lwz 5,12(11)\n\t"                                       \
+         "lwz 6,16(11)\n\t"  /* arg4->r6 */                       \
+         "lwz 7,20(11)\n\t"                                       \
+         "lwz 11,0(11)\n\t"  /* target->r11 */                    \
+         VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_R11                  \
+         VALGRIND_RESTORE_STACK                                   \
+         "mr %0,3"                                                \
+         : /*out*/   "=r" (_res)                                  \
+         : /*in*/    "r" (&_argvec[0])                            \
+         : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS, "r28"   \
+      );                                                          \
+      lval = (__typeof__(lval)) _res;                             \
+   } while (0)
+
+#define CALL_FN_W_6W(lval, orig, arg1,arg2,arg3,arg4,arg5,arg6)   \
+   do {                                                           \
+      volatile OrigFn        _orig = (orig);                      \
+      volatile unsigned long _argvec[7];                          \
+      volatile unsigned long _res;                                \
+      _argvec[0] = (unsigned long)_orig.nraddr;                   \
+      _argvec[1] = (unsigned long)arg1;                           \
+      _argvec[2] = (unsigned long)arg2;                           \
+      _argvec[3] = (unsigned long)arg3;                           \
+      _argvec[4] = (unsigned long)arg4;                           \
+      _argvec[5] = (unsigned long)arg5;                           \
+      _argvec[6] = (unsigned long)arg6;                           \
+      __asm__ volatile(                                           \
+         VALGRIND_ALIGN_STACK                                     \
+         "mr 11,%1\n\t"                                           \
+         "lwz 3,4(11)\n\t"   /* arg1->r3 */                       \
+         "lwz 4,8(11)\n\t"                                        \
+         "lwz 5,12(11)\n\t"                                       \
+         "lwz 6,16(11)\n\t"  /* arg4->r6 */                       \
+         "lwz 7,20(11)\n\t"                                       \
+         "lwz 8,24(11)\n\t"                                       \
+         "lwz 11,0(11)\n\t"  /* target->r11 */                    \
+         VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_R11                  \
+         VALGRIND_RESTORE_STACK                                   \
+         "mr %0,3"                                                \
+         : /*out*/   "=r" (_res)                                  \
+         : /*in*/    "r" (&_argvec[0])                            \
+         : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS, "r28"   \
+      );                                                          \
+      lval = (__typeof__(lval)) _res;                             \
+   } while (0)
+
+#define CALL_FN_W_7W(lval, orig, arg1,arg2,arg3,arg4,arg5,arg6,   \
+                                 arg7)                            \
+   do {                                                           \
+      volatile OrigFn        _orig = (orig);                      \
+      volatile unsigned long _argvec[8];                          \
+      volatile unsigned long _res;                                \
+      _argvec[0] = (unsigned long)_orig.nraddr;                   \
+      _argvec[1] = (unsigned long)arg1;                           \
+      _argvec[2] = (unsigned long)arg2;                           \
+      _argvec[3] = (unsigned long)arg3;                           \
+      _argvec[4] = (unsigned long)arg4;                           \
+      _argvec[5] = (unsigned long)arg5;                           \
+      _argvec[6] = (unsigned long)arg6;                           \
+      _argvec[7] = (unsigned long)arg7;                           \
+      __asm__ volatile(                                           \
+         VALGRIND_ALIGN_STACK                                     \
+         "mr 11,%1\n\t"                                           \
+         "lwz 3,4(11)\n\t"   /* arg1->r3 */                       \
+         "lwz 4,8(11)\n\t"                                        \
+         "lwz 5,12(11)\n\t"                                       \
+         "lwz 6,16(11)\n\t"  /* arg4->r6 */                       \
+         "lwz 7,20(11)\n\t"                                       \
+         "lwz 8,24(11)\n\t"                                       \
+         "lwz 9,28(11)\n\t"                                       \
+         "lwz 11,0(11)\n\t"  /* target->r11 */                    \
+         VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_R11                  \
+         VALGRIND_RESTORE_STACK                                   \
+         "mr %0,3"                                                \
+         : /*out*/   "=r" (_res)                                  \
+         : /*in*/    "r" (&_argvec[0])                            \
+         : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS, "r28"   \
+      );                                                          \
+      lval = (__typeof__(lval)) _res;                             \
+   } while (0)
+
+#define CALL_FN_W_8W(lval, orig, arg1,arg2,arg3,arg4,arg5,arg6,   \
+                                 arg7,arg8)                       \
+   do {                                                           \
+      volatile OrigFn        _orig = (orig);                      \
+      volatile unsigned long _argvec[9];                          \
+      volatile unsigned long _res;                                \
+      _argvec[0] = (unsigned long)_orig.nraddr;                   \
+      _argvec[1] = (unsigned long)arg1;                           \
+      _argvec[2] = (unsigned long)arg2;                           \
+      _argvec[3] = (unsigned long)arg3;                           \
+      _argvec[4] = (unsigned long)arg4;                           \
+      _argvec[5] = (unsigned long)arg5;                           \
+      _argvec[6] = (unsigned long)arg6;                           \
+      _argvec[7] = (unsigned long)arg7;                           \
+      _argvec[8] = (unsigned long)arg8;                           \
+      __asm__ volatile(                                           \
+         VALGRIND_ALIGN_STACK                                     \
+         "mr 11,%1\n\t"                                           \
+         "lwz 3,4(11)\n\t"   /* arg1->r3 */                       \
+         "lwz 4,8(11)\n\t"                                        \
+         "lwz 5,12(11)\n\t"                                       \
+         "lwz 6,16(11)\n\t"  /* arg4->r6 */                       \
+         "lwz 7,20(11)\n\t"                                       \
+         "lwz 8,24(11)\n\t"                                       \
+         "lwz 9,28(11)\n\t"                                       \
+         "lwz 10,32(11)\n\t" /* arg8->r10 */                      \
+         "lwz 11,0(11)\n\t"  /* target->r11 */                    \
+         VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_R11                  \
+         VALGRIND_RESTORE_STACK                                   \
+         "mr %0,3"                                                \
+         : /*out*/   "=r" (_res)                                  \
+         : /*in*/    "r" (&_argvec[0])                            \
+         : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS, "r28"   \
+      );                                                          \
+      lval = (__typeof__(lval)) _res;                             \
+   } while (0)
+
+#define CALL_FN_W_9W(lval, orig, arg1,arg2,arg3,arg4,arg5,arg6,   \
+                                 arg7,arg8,arg9)                  \
+   do {                                                           \
+      volatile OrigFn        _orig = (orig);                      \
+      volatile unsigned long _argvec[10];                         \
+      volatile unsigned long _res;                                \
+      _argvec[0] = (unsigned long)_orig.nraddr;                   \
+      _argvec[1] = (unsigned long)arg1;                           \
+      _argvec[2] = (unsigned long)arg2;                           \
+      _argvec[3] = (unsigned long)arg3;                           \
+      _argvec[4] = (unsigned long)arg4;                           \
+      _argvec[5] = (unsigned long)arg5;                           \
+      _argvec[6] = (unsigned long)arg6;                           \
+      _argvec[7] = (unsigned long)arg7;                           \
+      _argvec[8] = (unsigned long)arg8;                           \
+      _argvec[9] = (unsigned long)arg9;                           \
+      __asm__ volatile(                                           \
+         VALGRIND_ALIGN_STACK                                     \
+         "mr 11,%1\n\t"                                           \
+         "addi 1,1,-16\n\t"                                       \
+         /* arg9 */                                               \
+         "lwz 3,36(11)\n\t"                                       \
+         "stw 3,8(1)\n\t"                                         \
+         /* args1-8 */                                            \
+         "lwz 3,4(11)\n\t"   /* arg1->r3 */                       \
+         "lwz 4,8(11)\n\t"                                        \
+         "lwz 5,12(11)\n\t"                                       \
+         "lwz 6,16(11)\n\t"  /* arg4->r6 */                       \
+         "lwz 7,20(11)\n\t"                                       \
+         "lwz 8,24(11)\n\t"                                       \
+         "lwz 9,28(11)\n\t"                                       \
+         "lwz 10,32(11)\n\t" /* arg8->r10 */                      \
+         "lwz 11,0(11)\n\t"  /* target->r11 */                    \
+         VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_R11                  \
+         VALGRIND_RESTORE_STACK                                   \
+         "mr %0,3"                                                \
+         : /*out*/   "=r" (_res)                                  \
+         : /*in*/    "r" (&_argvec[0])                            \
+         : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS, "r28"   \
+      );                                                          \
+      lval = (__typeof__(lval)) _res;                             \
+   } while (0)
+
+#define CALL_FN_W_10W(lval, orig, arg1,arg2,arg3,arg4,arg5,arg6,  \
+                                  arg7,arg8,arg9,arg10)           \
+   do {                                                           \
+      volatile OrigFn        _orig = (orig);                      \
+      volatile unsigned long _argvec[11];                         \
+      volatile unsigned long _res;                                \
+      _argvec[0] = (unsigned long)_orig.nraddr;                   \
+      _argvec[1] = (unsigned long)arg1;                           \
+      _argvec[2] = (unsigned long)arg2;                           \
+      _argvec[3] = (unsigned long)arg3;                           \
+      _argvec[4] = (unsigned long)arg4;                           \
+      _argvec[5] = (unsigned long)arg5;                           \
+      _argvec[6] = (unsigned long)arg6;                           \
+      _argvec[7] = (unsigned long)arg7;                           \
+      _argvec[8] = (unsigned long)arg8;                           \
+      _argvec[9] = (unsigned long)arg9;                           \
+      _argvec[10] = (unsigned long)arg10;                         \
+      __asm__ volatile(                                           \
+         VALGRIND_ALIGN_STACK                                     \
+         "mr 11,%1\n\t"                                           \
+         "addi 1,1,-16\n\t"                                       \
+         /* arg10 */                                              \
+         "lwz 3,40(11)\n\t"                                       \
+         "stw 3,12(1)\n\t"                                        \
+         /* arg9 */                                               \
+         "lwz 3,36(11)\n\t"                                       \
+         "stw 3,8(1)\n\t"                                         \
+         /* args1-8 */                                            \
+         "lwz 3,4(11)\n\t"   /* arg1->r3 */                       \
+         "lwz 4,8(11)\n\t"                                        \
+         "lwz 5,12(11)\n\t"                                       \
+         "lwz 6,16(11)\n\t"  /* arg4->r6 */                       \
+         "lwz 7,20(11)\n\t"                                       \
+         "lwz 8,24(11)\n\t"                                       \
+         "lwz 9,28(11)\n\t"                                       \
+         "lwz 10,32(11)\n\t" /* arg8->r10 */                      \
+         "lwz 11,0(11)\n\t"  /* target->r11 */                    \
+         VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_R11                  \
+         VALGRIND_RESTORE_STACK                                   \
+         "mr %0,3"                                                \
+         : /*out*/   "=r" (_res)                                  \
+         : /*in*/    "r" (&_argvec[0])                            \
+         : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS, "r28"   \
+      );                                                          \
+      lval = (__typeof__(lval)) _res;                             \
+   } while (0)
+
+#define CALL_FN_W_11W(lval, orig, arg1,arg2,arg3,arg4,arg5,arg6,  \
+                                  arg7,arg8,arg9,arg10,arg11)     \
+   do {                                                           \
+      volatile OrigFn        _orig = (orig);                      \
+      volatile unsigned long _argvec[12];                         \
+      volatile unsigned long _res;                                \
+      _argvec[0] = (unsigned long)_orig.nraddr;                   \
+      _argvec[1] = (unsigned long)arg1;                           \
+      _argvec[2] = (unsigned long)arg2;                           \
+      _argvec[3] = (unsigned long)arg3;                           \
+      _argvec[4] = (unsigned long)arg4;                           \
+      _argvec[5] = (unsigned long)arg5;                           \
+      _argvec[6] = (unsigned long)arg6;                           \
+      _argvec[7] = (unsigned long)arg7;                           \
+      _argvec[8] = (unsigned long)arg8;                           \
+      _argvec[9] = (unsigned long)arg9;                           \
+      _argvec[10] = (unsigned long)arg10;                         \
+      _argvec[11] = (unsigned long)arg11;                         \
+      __asm__ volatile(                                           \
+         VALGRIND_ALIGN_STACK                                     \
+         "mr 11,%1\n\t"                                           \
+         "addi 1,1,-32\n\t"                                       \
+         /* arg11 */                                              \
+         "lwz 3,44(11)\n\t"                                       \
+         "stw 3,16(1)\n\t"                                        \
+         /* arg10 */                                              \
+         "lwz 3,40(11)\n\t"                                       \
+         "stw 3,12(1)\n\t"                                        \
+         /* arg9 */                                               \
+         "lwz 3,36(11)\n\t"                                       \
+         "stw 3,8(1)\n\t"                                         \
+         /* args1-8 */                                            \
+         "lwz 3,4(11)\n\t"   /* arg1->r3 */                       \
+         "lwz 4,8(11)\n\t"                                        \
+         "lwz 5,12(11)\n\t"                                       \
+         "lwz 6,16(11)\n\t"  /* arg4->r6 */                       \
+         "lwz 7,20(11)\n\t"                                       \
+         "lwz 8,24(11)\n\t"                                       \
+         "lwz 9,28(11)\n\t"                                       \
+         "lwz 10,32(11)\n\t" /* arg8->r10 */                      \
+         "lwz 11,0(11)\n\t"  /* target->r11 */                    \
+         VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_R11                  \
+         VALGRIND_RESTORE_STACK                                   \
+         "mr %0,3"                                                \
+         : /*out*/   "=r" (_res)                                  \
+         : /*in*/    "r" (&_argvec[0])                            \
+         : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS, "r28"   \
+      );                                                          \
+      lval = (__typeof__(lval)) _res;                             \
+   } while (0)
+
+#define CALL_FN_W_12W(lval, orig, arg1,arg2,arg3,arg4,arg5,arg6,  \
+                                arg7,arg8,arg9,arg10,arg11,arg12) \
+   do {                                                           \
+      volatile OrigFn        _orig = (orig);                      \
+      volatile unsigned long _argvec[13];                         \
+      volatile unsigned long _res;                                \
+      _argvec[0] = (unsigned long)_orig.nraddr;                   \
+      _argvec[1] = (unsigned long)arg1;                           \
+      _argvec[2] = (unsigned long)arg2;                           \
+      _argvec[3] = (unsigned long)arg3;                           \
+      _argvec[4] = (unsigned long)arg4;                           \
+      _argvec[5] = (unsigned long)arg5;                           \
+      _argvec[6] = (unsigned long)arg6;                           \
+      _argvec[7] = (unsigned long)arg7;                           \
+      _argvec[8] = (unsigned long)arg8;                           \
+      _argvec[9] = (unsigned long)arg9;                           \
+      _argvec[10] = (unsigned long)arg10;                         \
+      _argvec[11] = (unsigned long)arg11;                         \
+      _argvec[12] = (unsigned long)arg12;                         \
+      __asm__ volatile(                                           \
+         VALGRIND_ALIGN_STACK                                     \
+         "mr 11,%1\n\t"                                           \
+         "addi 1,1,-32\n\t"                                       \
+         /* arg12 */                                              \
+         "lwz 3,48(11)\n\t"                                       \
+         "stw 3,20(1)\n\t"                                        \
+         /* arg11 */                                              \
+         "lwz 3,44(11)\n\t"                                       \
+         "stw 3,16(1)\n\t"                                        \
+         /* arg10 */                                              \
+         "lwz 3,40(11)\n\t"                                       \
+         "stw 3,12(1)\n\t"                                        \
+         /* arg9 */                                               \
+         "lwz 3,36(11)\n\t"                                       \
+         "stw 3,8(1)\n\t"                                         \
+         /* args1-8 */                                            \
+         "lwz 3,4(11)\n\t"   /* arg1->r3 */                       \
+         "lwz 4,8(11)\n\t"                                        \
+         "lwz 5,12(11)\n\t"                                       \
+         "lwz 6,16(11)\n\t"  /* arg4->r6 */                       \
+         "lwz 7,20(11)\n\t"                                       \
+         "lwz 8,24(11)\n\t"                                       \
+         "lwz 9,28(11)\n\t"                                       \
+         "lwz 10,32(11)\n\t" /* arg8->r10 */                      \
+         "lwz 11,0(11)\n\t"  /* target->r11 */                    \
+         VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_R11                  \
+         VALGRIND_RESTORE_STACK                                   \
+         "mr %0,3"                                                \
+         : /*out*/   "=r" (_res)                                  \
+         : /*in*/    "r" (&_argvec[0])                            \
+         : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS, "r28"   \
+      );                                                          \
+      lval = (__typeof__(lval)) _res;                             \
+   } while (0)
+
+#endif /* PLAT_ppc32_linux */
+
+/* ------------------------ ppc64-linux ------------------------ */
+
+#if defined(PLAT_ppc64be_linux)
+
+/* ARGREGS: r3 r4 r5 r6 r7 r8 r9 r10 (the rest on stack somewhere) */
+
+/* These regs are trashed by the hidden call. */
+#define __CALLER_SAVED_REGS                                       \
+   "lr", "ctr", "xer",                                            \
+   "cr0", "cr1", "cr2", "cr3", "cr4", "cr5", "cr6", "cr7",        \
+   "r0", "r2", "r3", "r4", "r5", "r6", "r7", "r8", "r9", "r10",   \
+   "r11", "r12", "r13"
+
+/* Macros to save and align the stack before making a function
+   call and restore it afterwards as gcc may not keep the stack
+   pointer aligned if it doesn't realise calls are being made
+   to other functions. */
+
+#define VALGRIND_ALIGN_STACK               \
+      "mr 28,1\n\t"                        \
+      "rldicr 1,1,0,59\n\t"
+#define VALGRIND_RESTORE_STACK             \
+      "mr 1,28\n\t"
+
+/* These CALL_FN_ macros assume that on ppc64-linux, sizeof(unsigned
+   long) == 8. */
+
+#define CALL_FN_W_v(lval, orig)                                   \
+   do {                                                           \
+      volatile OrigFn        _orig = (orig);                      \
+      volatile unsigned long _argvec[3+0];                        \
+      volatile unsigned long _res;                                \
+      /* _argvec[0] holds current r2 across the call */           \
+      _argvec[1] = (unsigned long)_orig.r2;                       \
+      _argvec[2] = (unsigned long)_orig.nraddr;                   \
+      __asm__ volatile(                                           \
+         VALGRIND_ALIGN_STACK                                     \
+         "mr 11,%1\n\t"                                           \
+         "std 2,-16(11)\n\t"  /* save tocptr */                   \
+         "ld   2,-8(11)\n\t"  /* use nraddr's tocptr */           \
+         "ld  11, 0(11)\n\t"  /* target->r11 */                   \
+         VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_R11                  \
+         "mr 11,%1\n\t"                                           \
+         "mr %0,3\n\t"                                            \
+         "ld 2,-16(11)\n\t" /* restore tocptr */                  \
+         VALGRIND_RESTORE_STACK                                   \
+         : /*out*/   "=r" (_res)                                  \
+         : /*in*/    "r" (&_argvec[2])                            \
+         : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS, "r28"   \
+      );                                                          \
+      lval = (__typeof__(lval)) _res;                             \
+   } while (0)
+
+#define CALL_FN_W_W(lval, orig, arg1)                             \
+   do {                                                           \
+      volatile OrigFn        _orig = (orig);                      \
+      volatile unsigned long _argvec[3+1];                        \
+      volatile unsigned long _res;                                \
+      /* _argvec[0] holds current r2 across the call */           \
+      _argvec[1]   = (unsigned long)_orig.r2;                     \
+      _argvec[2]   = (unsigned long)_orig.nraddr;                 \
+      _argvec[2+1] = (unsigned long)arg1;                         \
+      __asm__ volatile(                                           \
+         VALGRIND_ALIGN_STACK                                     \
+         "mr 11,%1\n\t"                                           \
+         "std 2,-16(11)\n\t"  /* save tocptr */                   \
+         "ld   2,-8(11)\n\t"  /* use nraddr's tocptr */           \
+         "ld   3, 8(11)\n\t"  /* arg1->r3 */                      \
+         "ld  11, 0(11)\n\t"  /* target->r11 */                   \
+         VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_R11                  \
+         "mr 11,%1\n\t"                                           \
+         "mr %0,3\n\t"                                            \
+         "ld 2,-16(11)\n\t" /* restore tocptr */                  \
+         VALGRIND_RESTORE_STACK                                   \
+         : /*out*/   "=r" (_res)                                  \
+         : /*in*/    "r" (&_argvec[2])                            \
+         : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS, "r28"   \
+      );                                                          \
+      lval = (__typeof__(lval)) _res;                             \
+   } while (0)
+
+#define CALL_FN_W_WW(lval, orig, arg1,arg2)                       \
+   do {                                                           \
+      volatile OrigFn        _orig = (orig);                      \
+      volatile unsigned long _argvec[3+2];                        \
+      volatile unsigned long _res;                                \
+      /* _argvec[0] holds current r2 across the call */           \
+      _argvec[1]   = (unsigned long)_orig.r2;                     \
+      _argvec[2]   = (unsigned long)_orig.nraddr;                 \
+      _argvec[2+1] = (unsigned long)arg1;                         \
+      _argvec[2+2] = (unsigned long)arg2;                         \
+      __asm__ volatile(                                           \
+         VALGRIND_ALIGN_STACK                                     \
+         "mr 11,%1\n\t"                                           \
+         "std 2,-16(11)\n\t"  /* save tocptr */                   \
+         "ld   2,-8(11)\n\t"  /* use nraddr's tocptr */           \
+         "ld   3, 8(11)\n\t"  /* arg1->r3 */                      \
+         "ld   4, 16(11)\n\t" /* arg2->r4 */                      \
+         "ld  11, 0(11)\n\t"  /* target->r11 */                   \
+         VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_R11                  \
+         "mr 11,%1\n\t"                                           \
+         "mr %0,3\n\t"                                            \
+         "ld 2,-16(11)\n\t" /* restore tocptr */                  \
+         VALGRIND_RESTORE_STACK                                   \
+         : /*out*/   "=r" (_res)                                  \
+         : /*in*/    "r" (&_argvec[2])                            \
+         : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS, "r28"   \
+      );                                                          \
+      lval = (__typeof__(lval)) _res;                             \
+   } while (0)
+
+#define CALL_FN_W_WWW(lval, orig, arg1,arg2,arg3)                 \
+   do {                                                           \
+      volatile OrigFn        _orig = (orig);                      \
+      volatile unsigned long _argvec[3+3];                        \
+      volatile unsigned long _res;                                \
+      /* _argvec[0] holds current r2 across the call */           \
+      _argvec[1]   = (unsigned long)_orig.r2;                     \
+      _argvec[2]   = (unsigned long)_orig.nraddr;                 \
+      _argvec[2+1] = (unsigned long)arg1;                         \
+      _argvec[2+2] = (unsigned long)arg2;                         \
+      _argvec[2+3] = (unsigned long)arg3;                         \
+      __asm__ volatile(                                           \
+         VALGRIND_ALIGN_STACK                                     \
+         "mr 11,%1\n\t"                                           \
+         "std 2,-16(11)\n\t"  /* save tocptr */                   \
+         "ld   2,-8(11)\n\t"  /* use nraddr's tocptr */           \
+         "ld   3, 8(11)\n\t"  /* arg1->r3 */                      \
+         "ld   4, 16(11)\n\t" /* arg2->r4 */                      \
+         "ld   5, 24(11)\n\t" /* arg3->r5 */                      \
+         "ld  11, 0(11)\n\t"  /* target->r11 */                   \
+         VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_R11                  \
+         "mr 11,%1\n\t"                                           \
+         "mr %0,3\n\t"                                            \
+         "ld 2,-16(11)\n\t" /* restore tocptr */                  \
+         VALGRIND_RESTORE_STACK                                   \
+         : /*out*/   "=r" (_res)                                  \
+         : /*in*/    "r" (&_argvec[2])                            \
+         : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS, "r28"   \
+      );                                                          \
+      lval = (__typeof__(lval)) _res;                             \
+   } while (0)
+
+#define CALL_FN_W_WWWW(lval, orig, arg1,arg2,arg3,arg4)           \
+   do {                                                           \
+      volatile OrigFn        _orig = (orig);                      \
+      volatile unsigned long _argvec[3+4];                        \
+      volatile unsigned long _res;                                \
+      /* _argvec[0] holds current r2 across the call */           \
+      _argvec[1]   = (unsigned long)_orig.r2;                     \
+      _argvec[2]   = (unsigned long)_orig.nraddr;                 \
+      _argvec[2+1] = (unsigned long)arg1;                         \
+      _argvec[2+2] = (unsigned long)arg2;                         \
+      _argvec[2+3] = (unsigned long)arg3;                         \
+      _argvec[2+4] = (unsigned long)arg4;                         \
+      __asm__ volatile(                                           \
+         VALGRIND_ALIGN_STACK                                     \
+         "mr 11,%1\n\t"                                           \
+         "std 2,-16(11)\n\t"  /* save tocptr */                   \
+         "ld   2,-8(11)\n\t"  /* use nraddr's tocptr */           \
+         "ld   3, 8(11)\n\t"  /* arg1->r3 */                      \
+         "ld   4, 16(11)\n\t" /* arg2->r4 */                      \
+         "ld   5, 24(11)\n\t" /* arg3->r5 */                      \
+         "ld   6, 32(11)\n\t" /* arg4->r6 */                      \
+         "ld  11, 0(11)\n\t"  /* target->r11 */                   \
+         VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_R11                  \
+         "mr 11,%1\n\t"                                           \
+         "mr %0,3\n\t"                                            \
+         "ld 2,-16(11)\n\t" /* restore tocptr */                  \
+         VALGRIND_RESTORE_STACK                                   \
+         : /*out*/   "=r" (_res)                                  \
+         : /*in*/    "r" (&_argvec[2])                            \
+         : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS, "r28"   \
+      );                                                          \
+      lval = (__typeof__(lval)) _res;                             \
+   } while (0)
+
+#define CALL_FN_W_5W(lval, orig, arg1,arg2,arg3,arg4,arg5)        \
+   do {                                                           \
+      volatile OrigFn        _orig = (orig);                      \
+      volatile unsigned long _argvec[3+5];                        \
+      volatile unsigned long _res;                                \
+      /* _argvec[0] holds current r2 across the call */           \
+      _argvec[1]   = (unsigned long)_orig.r2;                     \
+      _argvec[2]   = (unsigned long)_orig.nraddr;                 \
+      _argvec[2+1] = (unsigned long)arg1;                         \
+      _argvec[2+2] = (unsigned long)arg2;                         \
+      _argvec[2+3] = (unsigned long)arg3;                         \
+      _argvec[2+4] = (unsigned long)arg4;                         \
+      _argvec[2+5] = (unsigned long)arg5;                         \
+      __asm__ volatile(                                           \
+         VALGRIND_ALIGN_STACK                                     \
+         "mr 11,%1\n\t"                                           \
+         "std 2,-16(11)\n\t"  /* save tocptr */                   \
+         "ld   2,-8(11)\n\t"  /* use nraddr's tocptr */           \
+         "ld   3, 8(11)\n\t"  /* arg1->r3 */                      \
+         "ld   4, 16(11)\n\t" /* arg2->r4 */                      \
+         "ld   5, 24(11)\n\t" /* arg3->r5 */                      \
+         "ld   6, 32(11)\n\t" /* arg4->r6 */                      \
+         "ld   7, 40(11)\n\t" /* arg5->r7 */                      \
+         "ld  11, 0(11)\n\t"  /* target->r11 */                   \
+         VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_R11                  \
+         "mr 11,%1\n\t"                                           \
+         "mr %0,3\n\t"                                            \
+         "ld 2,-16(11)\n\t" /* restore tocptr */                  \
+         VALGRIND_RESTORE_STACK                                   \
+         : /*out*/   "=r" (_res)                                  \
+         : /*in*/    "r" (&_argvec[2])                            \
+         : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS, "r28"   \
+      );                                                          \
+      lval = (__typeof__(lval)) _res;                             \
+   } while (0)
+
+#define CALL_FN_W_6W(lval, orig, arg1,arg2,arg3,arg4,arg5,arg6)   \
+   do {                                                           \
+      volatile OrigFn        _orig = (orig);                      \
+      volatile unsigned long _argvec[3+6];                        \
+      volatile unsigned long _res;                                \
+      /* _argvec[0] holds current r2 across the call */           \
+      _argvec[1]   = (unsigned long)_orig.r2;                     \
+      _argvec[2]   = (unsigned long)_orig.nraddr;                 \
+      _argvec[2+1] = (unsigned long)arg1;                         \
+      _argvec[2+2] = (unsigned long)arg2;                         \
+      _argvec[2+3] = (unsigned long)arg3;                         \
+      _argvec[2+4] = (unsigned long)arg4;                         \
+      _argvec[2+5] = (unsigned long)arg5;                         \
+      _argvec[2+6] = (unsigned long)arg6;                         \
+      __asm__ volatile(                                           \
+         VALGRIND_ALIGN_STACK                                     \
+         "mr 11,%1\n\t"                                           \
+         "std 2,-16(11)\n\t"  /* save tocptr */                   \
+         "ld   2,-8(11)\n\t"  /* use nraddr's tocptr */           \
+         "ld   3, 8(11)\n\t"  /* arg1->r3 */                      \
+         "ld   4, 16(11)\n\t" /* arg2->r4 */                      \
+         "ld   5, 24(11)\n\t" /* arg3->r5 */                      \
+         "ld   6, 32(11)\n\t" /* arg4->r6 */                      \
+         "ld   7, 40(11)\n\t" /* arg5->r7 */                      \
+         "ld   8, 48(11)\n\t" /* arg6->r8 */                      \
+         "ld  11, 0(11)\n\t"  /* target->r11 */                   \
+         VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_R11                  \
+         "mr 11,%1\n\t"                                           \
+         "mr %0,3\n\t"                                            \
+         "ld 2,-16(11)\n\t" /* restore tocptr */                  \
+         VALGRIND_RESTORE_STACK                                   \
+         : /*out*/   "=r" (_res)                                  \
+         : /*in*/    "r" (&_argvec[2])                            \
+         : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS, "r28"   \
+      );                                                          \
+      lval = (__typeof__(lval)) _res;                             \
+   } while (0)
+
+#define CALL_FN_W_7W(lval, orig, arg1,arg2,arg3,arg4,arg5,arg6,   \
+                                 arg7)                            \
+   do {                                                           \
+      volatile OrigFn        _orig = (orig);                      \
+      volatile unsigned long _argvec[3+7];                        \
+      volatile unsigned long _res;                                \
+      /* _argvec[0] holds current r2 across the call */           \
+      _argvec[1]   = (unsigned long)_orig.r2;                     \
+      _argvec[2]   = (unsigned long)_orig.nraddr;                 \
+      _argvec[2+1] = (unsigned long)arg1;                         \
+      _argvec[2+2] = (unsigned long)arg2;                         \
+      _argvec[2+3] = (unsigned long)arg3;                         \
+      _argvec[2+4] = (unsigned long)arg4;                         \
+      _argvec[2+5] = (unsigned long)arg5;                         \
+      _argvec[2+6] = (unsigned long)arg6;                         \
+      _argvec[2+7] = (unsigned long)arg7;                         \
+      __asm__ volatile(                                           \
+         VALGRIND_ALIGN_STACK                                     \
+         "mr 11,%1\n\t"                                           \
+         "std 2,-16(11)\n\t"  /* save tocptr */                   \
+         "ld   2,-8(11)\n\t"  /* use nraddr's tocptr */           \
+         "ld   3, 8(11)\n\t"  /* arg1->r3 */                      \
+         "ld   4, 16(11)\n\t" /* arg2->r4 */                      \
+         "ld   5, 24(11)\n\t" /* arg3->r5 */                      \
+         "ld   6, 32(11)\n\t" /* arg4->r6 */                      \
+         "ld   7, 40(11)\n\t" /* arg5->r7 */                      \
+         "ld   8, 48(11)\n\t" /* arg6->r8 */                      \
+         "ld   9, 56(11)\n\t" /* arg7->r9 */                      \
+         "ld  11, 0(11)\n\t"  /* target->r11 */                   \
+         VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_R11                  \
+         "mr 11,%1\n\t"                                           \
+         "mr %0,3\n\t"                                            \
+         "ld 2,-16(11)\n\t" /* restore tocptr */                  \
+         VALGRIND_RESTORE_STACK                                   \
+         : /*out*/   "=r" (_res)                                  \
+         : /*in*/    "r" (&_argvec[2])                            \
+         : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS, "r28"   \
+      );                                                          \
+      lval = (__typeof__(lval)) _res;                             \
+   } while (0)
+
+#define CALL_FN_W_8W(lval, orig, arg1,arg2,arg3,arg4,arg5,arg6,   \
+                                 arg7,arg8)                       \
+   do {                                                           \
+      volatile OrigFn        _orig = (orig);                      \
+      volatile unsigned long _argvec[3+8];                        \
+      volatile unsigned long _res;                                \
+      /* _argvec[0] holds current r2 across the call */           \
+      _argvec[1]   = (unsigned long)_orig.r2;                     \
+      _argvec[2]   = (unsigned long)_orig.nraddr;                 \
+      _argvec[2+1] = (unsigned long)arg1;                         \
+      _argvec[2+2] = (unsigned long)arg2;                         \
+      _argvec[2+3] = (unsigned long)arg3;                         \
+      _argvec[2+4] = (unsigned long)arg4;                         \
+      _argvec[2+5] = (unsigned long)arg5;                         \
+      _argvec[2+6] = (unsigned long)arg6;                         \
+      _argvec[2+7] = (unsigned long)arg7;                         \
+      _argvec[2+8] = (unsigned long)arg8;                         \
+      __asm__ volatile(                                           \
+         VALGRIND_ALIGN_STACK                                     \
+         "mr 11,%1\n\t"                                           \
+         "std 2,-16(11)\n\t"  /* save tocptr */                   \
+         "ld   2,-8(11)\n\t"  /* use nraddr's tocptr */           \
+         "ld   3, 8(11)\n\t"  /* arg1->r3 */                      \
+         "ld   4, 16(11)\n\t" /* arg2->r4 */                      \
+         "ld   5, 24(11)\n\t" /* arg3->r5 */                      \
+         "ld   6, 32(11)\n\t" /* arg4->r6 */                      \
+         "ld   7, 40(11)\n\t" /* arg5->r7 */                      \
+         "ld   8, 48(11)\n\t" /* arg6->r8 */                      \
+         "ld   9, 56(11)\n\t" /* arg7->r9 */                      \
+         "ld  10, 64(11)\n\t" /* arg8->r10 */                     \
+         "ld  11, 0(11)\n\t"  /* target->r11 */                   \
+         VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_R11                  \
+         "mr 11,%1\n\t"                                           \
+         "mr %0,3\n\t"                                            \
+         "ld 2,-16(11)\n\t" /* restore tocptr */                  \
+         VALGRIND_RESTORE_STACK                                   \
+         : /*out*/   "=r" (_res)                                  \
+         : /*in*/    "r" (&_argvec[2])                            \
+         : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS, "r28"   \
+      );                                                          \
+      lval = (__typeof__(lval)) _res;                             \
+   } while (0)
+
+#define CALL_FN_W_9W(lval, orig, arg1,arg2,arg3,arg4,arg5,arg6,   \
+                                 arg7,arg8,arg9)                  \
+   do {                                                           \
+      volatile OrigFn        _orig = (orig);                      \
+      volatile unsigned long _argvec[3+9];                        \
+      volatile unsigned long _res;                                \
+      /* _argvec[0] holds current r2 across the call */           \
+      _argvec[1]   = (unsigned long)_orig.r2;                     \
+      _argvec[2]   = (unsigned long)_orig.nraddr;                 \
+      _argvec[2+1] = (unsigned long)arg1;                         \
+      _argvec[2+2] = (unsigned long)arg2;                         \
+      _argvec[2+3] = (unsigned long)arg3;                         \
+      _argvec[2+4] = (unsigned long)arg4;                         \
+      _argvec[2+5] = (unsigned long)arg5;                         \
+      _argvec[2+6] = (unsigned long)arg6;                         \
+      _argvec[2+7] = (unsigned long)arg7;                         \
+      _argvec[2+8] = (unsigned long)arg8;                         \
+      _argvec[2+9] = (unsigned long)arg9;                         \
+      __asm__ volatile(                                           \
+         VALGRIND_ALIGN_STACK                                     \
+         "mr 11,%1\n\t"                                           \
+         "std 2,-16(11)\n\t"  /* save tocptr */                   \
+         "ld   2,-8(11)\n\t"  /* use nraddr's tocptr */           \
+         "addi 1,1,-128\n\t"  /* expand stack frame */            \
+         /* arg9 */                                               \
+         "ld  3,72(11)\n\t"                                       \
+         "std 3,112(1)\n\t"                                       \
+         /* args1-8 */                                            \
+         "ld   3, 8(11)\n\t"  /* arg1->r3 */                      \
+         "ld   4, 16(11)\n\t" /* arg2->r4 */                      \
+         "ld   5, 24(11)\n\t" /* arg3->r5 */                      \
+         "ld   6, 32(11)\n\t" /* arg4->r6 */                      \
+         "ld   7, 40(11)\n\t" /* arg5->r7 */                      \
+         "ld   8, 48(11)\n\t" /* arg6->r8 */                      \
+         "ld   9, 56(11)\n\t" /* arg7->r9 */                      \
+         "ld  10, 64(11)\n\t" /* arg8->r10 */                     \
+         "ld  11, 0(11)\n\t"  /* target->r11 */                   \
+         VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_R11                  \
+         "mr 11,%1\n\t"                                           \
+         "mr %0,3\n\t"                                            \
+         "ld 2,-16(11)\n\t" /* restore tocptr */                  \
+         VALGRIND_RESTORE_STACK                                   \
+         : /*out*/   "=r" (_res)                                  \
+         : /*in*/    "r" (&_argvec[2])                            \
+         : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS, "r28"   \
+      );                                                          \
+      lval = (__typeof__(lval)) _res;                             \
+   } while (0)
+
+#define CALL_FN_W_10W(lval, orig, arg1,arg2,arg3,arg4,arg5,arg6,  \
+                                  arg7,arg8,arg9,arg10)           \
+   do {                                                           \
+      volatile OrigFn        _orig = (orig);                      \
+      volatile unsigned long _argvec[3+10];                       \
+      volatile unsigned long _res;                                \
+      /* _argvec[0] holds current r2 across the call */           \
+      _argvec[1]   = (unsigned long)_orig.r2;                     \
+      _argvec[2]   = (unsigned long)_orig.nraddr;                 \
+      _argvec[2+1] = (unsigned long)arg1;                         \
+      _argvec[2+2] = (unsigned long)arg2;                         \
+      _argvec[2+3] = (unsigned long)arg3;                         \
+      _argvec[2+4] = (unsigned long)arg4;                         \
+      _argvec[2+5] = (unsigned long)arg5;                         \
+      _argvec[2+6] = (unsigned long)arg6;                         \
+      _argvec[2+7] = (unsigned long)arg7;                         \
+      _argvec[2+8] = (unsigned long)arg8;                         \
+      _argvec[2+9] = (unsigned long)arg9;                         \
+      _argvec[2+10] = (unsigned long)arg10;                       \
+      __asm__ volatile(                                           \
+         VALGRIND_ALIGN_STACK                                     \
+         "mr 11,%1\n\t"                                           \
+         "std 2,-16(11)\n\t"  /* save tocptr */                   \
+         "ld   2,-8(11)\n\t"  /* use nraddr's tocptr */           \
+         "addi 1,1,-128\n\t"  /* expand stack frame */            \
+         /* arg10 */                                              \
+         "ld  3,80(11)\n\t"                                       \
+         "std 3,120(1)\n\t"                                       \
+         /* arg9 */                                               \
+         "ld  3,72(11)\n\t"                                       \
+         "std 3,112(1)\n\t"                                       \
+         /* args1-8 */                                            \
+         "ld   3, 8(11)\n\t"  /* arg1->r3 */                      \
+         "ld   4, 16(11)\n\t" /* arg2->r4 */                      \
+         "ld   5, 24(11)\n\t" /* arg3->r5 */                      \
+         "ld   6, 32(11)\n\t" /* arg4->r6 */                      \
+         "ld   7, 40(11)\n\t" /* arg5->r7 */                      \
+         "ld   8, 48(11)\n\t" /* arg6->r8 */                      \
+         "ld   9, 56(11)\n\t" /* arg7->r9 */                      \
+         "ld  10, 64(11)\n\t" /* arg8->r10 */                     \
+         "ld  11, 0(11)\n\t"  /* target->r11 */                   \
+         VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_R11                  \
+         "mr 11,%1\n\t"                                           \
+         "mr %0,3\n\t"                                            \
+         "ld 2,-16(11)\n\t" /* restore tocptr */                  \
+         VALGRIND_RESTORE_STACK                                   \
+         : /*out*/   "=r" (_res)                                  \
+         : /*in*/    "r" (&_argvec[2])                            \
+         : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS, "r28"   \
+      );                                                          \
+      lval = (__typeof__(lval)) _res;                             \
+   } while (0)
+
+#define CALL_FN_W_11W(lval, orig, arg1,arg2,arg3,arg4,arg5,arg6,  \
+                                  arg7,arg8,arg9,arg10,arg11)     \
+   do {                                                           \
+      volatile OrigFn        _orig = (orig);                      \
+      volatile unsigned long _argvec[3+11];                       \
+      volatile unsigned long _res;                                \
+      /* _argvec[0] holds current r2 across the call */           \
+      _argvec[1]   = (unsigned long)_orig.r2;                     \
+      _argvec[2]   = (unsigned long)_orig.nraddr;                 \
+      _argvec[2+1] = (unsigned long)arg1;                         \
+      _argvec[2+2] = (unsigned long)arg2;                         \
+      _argvec[2+3] = (unsigned long)arg3;                         \
+      _argvec[2+4] = (unsigned long)arg4;                         \
+      _argvec[2+5] = (unsigned long)arg5;                         \
+      _argvec[2+6] = (unsigned long)arg6;                         \
+      _argvec[2+7] = (unsigned long)arg7;                         \
+      _argvec[2+8] = (unsigned long)arg8;                         \
+      _argvec[2+9] = (unsigned long)arg9;                         \
+      _argvec[2+10] = (unsigned long)arg10;                       \
+      _argvec[2+11] = (unsigned long)arg11;                       \
+      __asm__ volatile(                                           \
+         VALGRIND_ALIGN_STACK                                     \
+         "mr 11,%1\n\t"                                           \
+         "std 2,-16(11)\n\t"  /* save tocptr */                   \
+         "ld   2,-8(11)\n\t"  /* use nraddr's tocptr */           \
+         "addi 1,1,-144\n\t"  /* expand stack frame */            \
+         /* arg11 */                                              \
+         "ld  3,88(11)\n\t"                                       \
+         "std 3,128(1)\n\t"                                       \
+         /* arg10 */                                              \
+         "ld  3,80(11)\n\t"                                       \
+         "std 3,120(1)\n\t"                                       \
+         /* arg9 */                                               \
+         "ld  3,72(11)\n\t"                                       \
+         "std 3,112(1)\n\t"                                       \
+         /* args1-8 */                                            \
+         "ld   3, 8(11)\n\t"  /* arg1->r3 */                      \
+         "ld   4, 16(11)\n\t" /* arg2->r4 */                      \
+         "ld   5, 24(11)\n\t" /* arg3->r5 */                      \
+         "ld   6, 32(11)\n\t" /* arg4->r6 */                      \
+         "ld   7, 40(11)\n\t" /* arg5->r7 */                      \
+         "ld   8, 48(11)\n\t" /* arg6->r8 */                      \
+         "ld   9, 56(11)\n\t" /* arg7->r9 */                      \
+         "ld  10, 64(11)\n\t" /* arg8->r10 */                     \
+         "ld  11, 0(11)\n\t"  /* target->r11 */                   \
+         VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_R11                  \
+         "mr 11,%1\n\t"                                           \
+         "mr %0,3\n\t"                                            \
+         "ld 2,-16(11)\n\t" /* restore tocptr */                  \
+         VALGRIND_RESTORE_STACK                                   \
+         : /*out*/   "=r" (_res)                                  \
+         : /*in*/    "r" (&_argvec[2])                            \
+         : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS, "r28"   \
+      );                                                          \
+      lval = (__typeof__(lval)) _res;                             \
+   } while (0)
+
+#define CALL_FN_W_12W(lval, orig, arg1,arg2,arg3,arg4,arg5,arg6,  \
+                                arg7,arg8,arg9,arg10,arg11,arg12) \
+   do {                                                           \
+      volatile OrigFn        _orig = (orig);                      \
+      volatile unsigned long _argvec[3+12];                       \
+      volatile unsigned long _res;                                \
+      /* _argvec[0] holds current r2 across the call */           \
+      _argvec[1]   = (unsigned long)_orig.r2;                     \
+      _argvec[2]   = (unsigned long)_orig.nraddr;                 \
+      _argvec[2+1] = (unsigned long)arg1;                         \
+      _argvec[2+2] = (unsigned long)arg2;                         \
+      _argvec[2+3] = (unsigned long)arg3;                         \
+      _argvec[2+4] = (unsigned long)arg4;                         \
+      _argvec[2+5] = (unsigned long)arg5;                         \
+      _argvec[2+6] = (unsigned long)arg6;                         \
+      _argvec[2+7] = (unsigned long)arg7;                         \
+      _argvec[2+8] = (unsigned long)arg8;                         \
+      _argvec[2+9] = (unsigned long)arg9;                         \
+      _argvec[2+10] = (unsigned long)arg10;                       \
+      _argvec[2+11] = (unsigned long)arg11;                       \
+      _argvec[2+12] = (unsigned long)arg12;                       \
+      __asm__ volatile(                                           \
+         VALGRIND_ALIGN_STACK                                     \
+         "mr 11,%1\n\t"                                           \
+         "std 2,-16(11)\n\t"  /* save tocptr */                   \
+         "ld   2,-8(11)\n\t"  /* use nraddr's tocptr */           \
+         "addi 1,1,-144\n\t"  /* expand stack frame */            \
+         /* arg12 */                                              \
+         "ld  3,96(11)\n\t"                                       \
+         "std 3,136(1)\n\t"                                       \
+         /* arg11 */                                              \
+         "ld  3,88(11)\n\t"                                       \
+         "std 3,128(1)\n\t"                                       \
+         /* arg10 */                                              \
+         "ld  3,80(11)\n\t"                                       \
+         "std 3,120(1)\n\t"                                       \
+         /* arg9 */                                               \
+         "ld  3,72(11)\n\t"                                       \
+         "std 3,112(1)\n\t"                                       \
+         /* args1-8 */                                            \
+         "ld   3, 8(11)\n\t"  /* arg1->r3 */                      \
+         "ld   4, 16(11)\n\t" /* arg2->r4 */                      \
+         "ld   5, 24(11)\n\t" /* arg3->r5 */                      \
+         "ld   6, 32(11)\n\t" /* arg4->r6 */                      \
+         "ld   7, 40(11)\n\t" /* arg5->r7 */                      \
+         "ld   8, 48(11)\n\t" /* arg6->r8 */                      \
+         "ld   9, 56(11)\n\t" /* arg7->r9 */                      \
+         "ld  10, 64(11)\n\t" /* arg8->r10 */                     \
+         "ld  11, 0(11)\n\t"  /* target->r11 */                   \
+         VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_R11                  \
+         "mr 11,%1\n\t"                                           \
+         "mr %0,3\n\t"                                            \
+         "ld 2,-16(11)\n\t" /* restore tocptr */                  \
+         VALGRIND_RESTORE_STACK                                   \
+         : /*out*/   "=r" (_res)                                  \
+         : /*in*/    "r" (&_argvec[2])                            \
+         : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS, "r28"   \
+      );                                                          \
+      lval = (__typeof__(lval)) _res;                             \
+   } while (0)
+
+#endif /* PLAT_ppc64be_linux */
+
+/* ------------------------- ppc64le-linux ----------------------- */
+#if defined(PLAT_ppc64le_linux)
+
+/* ARGREGS: r3 r4 r5 r6 r7 r8 r9 r10 (the rest on stack somewhere) */
+
+/* These regs are trashed by the hidden call. */
+#define __CALLER_SAVED_REGS                                       \
+   "lr", "ctr", "xer",                                            \
+   "cr0", "cr1", "cr2", "cr3", "cr4", "cr5", "cr6", "cr7",        \
+   "r0", "r2", "r3", "r4", "r5", "r6", "r7", "r8", "r9", "r10",   \
+   "r11", "r12", "r13"
+
+/* Macros to save and align the stack before making a function
+   call and restore it afterwards as gcc may not keep the stack
+   pointer aligned if it doesn't realise calls are being made
+   to other functions. */
+
+#define VALGRIND_ALIGN_STACK               \
+      "mr 28,1\n\t"                        \
+      "rldicr 1,1,0,59\n\t"
+#define VALGRIND_RESTORE_STACK             \
+      "mr 1,28\n\t"
+
+/* These CALL_FN_ macros assume that on ppc64-linux, sizeof(unsigned
+   long) == 8. */
+
+#define CALL_FN_W_v(lval, orig)                                   \
+   do {                                                           \
+      volatile OrigFn        _orig = (orig);                      \
+      volatile unsigned long _argvec[3+0];                        \
+      volatile unsigned long _res;                                \
+      /* _argvec[0] holds current r2 across the call */           \
+      _argvec[1] = (unsigned long)_orig.r2;                       \
+      _argvec[2] = (unsigned long)_orig.nraddr;                   \
+      __asm__ volatile(                                           \
+         VALGRIND_ALIGN_STACK                                     \
+         "mr 12,%1\n\t"                                           \
+         "std 2,-16(12)\n\t"  /* save tocptr */                   \
+         "ld   2,-8(12)\n\t"  /* use nraddr's tocptr */           \
+         "ld  12, 0(12)\n\t"  /* target->r12 */                   \
+         VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_R12                  \
+         "mr 12,%1\n\t"                                           \
+         "mr %0,3\n\t"                                            \
+         "ld 2,-16(12)\n\t" /* restore tocptr */                  \
+         VALGRIND_RESTORE_STACK                                   \
+         : /*out*/   "=r" (_res)                                  \
+         : /*in*/    "r" (&_argvec[2])                            \
+         : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS, "r28"   \
+      );                                                          \
+      lval = (__typeof__(lval)) _res;                             \
+   } while (0)
+
+#define CALL_FN_W_W(lval, orig, arg1)                             \
+   do {                                                           \
+      volatile OrigFn        _orig = (orig);                      \
+      volatile unsigned long _argvec[3+1];                        \
+      volatile unsigned long _res;                                \
+      /* _argvec[0] holds current r2 across the call */           \
+      _argvec[1]   = (unsigned long)_orig.r2;                     \
+      _argvec[2]   = (unsigned long)_orig.nraddr;                 \
+      _argvec[2+1] = (unsigned long)arg1;                         \
+      __asm__ volatile(                                           \
+         VALGRIND_ALIGN_STACK                                     \
+         "mr 12,%1\n\t"                                           \
+         "std 2,-16(12)\n\t"  /* save tocptr */                   \
+         "ld   2,-8(12)\n\t"  /* use nraddr's tocptr */           \
+         "ld   3, 8(12)\n\t"  /* arg1->r3 */                      \
+         "ld  12, 0(12)\n\t"  /* target->r12 */                   \
+         VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_R12                  \
+         "mr 12,%1\n\t"                                           \
+         "mr %0,3\n\t"                                            \
+         "ld 2,-16(12)\n\t" /* restore tocptr */                  \
+         VALGRIND_RESTORE_STACK                                   \
+         : /*out*/   "=r" (_res)                                  \
+         : /*in*/    "r" (&_argvec[2])                            \
+         : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS, "r28"   \
+      );                                                          \
+      lval = (__typeof__(lval)) _res;                             \
+   } while (0)
+
+#define CALL_FN_W_WW(lval, orig, arg1,arg2)                       \
+   do {                                                           \
+      volatile OrigFn        _orig = (orig);                      \
+      volatile unsigned long _argvec[3+2];                        \
+      volatile unsigned long _res;                                \
+      /* _argvec[0] holds current r2 across the call */           \
+      _argvec[1]   = (unsigned long)_orig.r2;                     \
+      _argvec[2]   = (unsigned long)_orig.nraddr;                 \
+      _argvec[2+1] = (unsigned long)arg1;                         \
+      _argvec[2+2] = (unsigned long)arg2;                         \
+      __asm__ volatile(                                           \
+         VALGRIND_ALIGN_STACK                                     \
+         "mr 12,%1\n\t"                                           \
+         "std 2,-16(12)\n\t"  /* save tocptr */                   \
+         "ld   2,-8(12)\n\t"  /* use nraddr's tocptr */           \
+         "ld   3, 8(12)\n\t"  /* arg1->r3 */                      \
+         "ld   4, 16(12)\n\t" /* arg2->r4 */                      \
+         "ld  12, 0(12)\n\t"  /* target->r12 */                   \
+         VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_R12                  \
+         "mr 12,%1\n\t"                                           \
+         "mr %0,3\n\t"                                            \
+         "ld 2,-16(12)\n\t" /* restore tocptr */                  \
+         VALGRIND_RESTORE_STACK                                   \
+         : /*out*/   "=r" (_res)                                  \
+         : /*in*/    "r" (&_argvec[2])                            \
+         : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS, "r28"   \
+      );                                                          \
+      lval = (__typeof__(lval)) _res;                             \
+   } while (0)
+
+#define CALL_FN_W_WWW(lval, orig, arg1,arg2,arg3)                 \
+   do {                                                           \
+      volatile OrigFn        _orig = (orig);                      \
+      volatile unsigned long _argvec[3+3];                        \
+      volatile unsigned long _res;                                \
+      /* _argvec[0] holds current r2 across the call */           \
+      _argvec[1]   = (unsigned long)_orig.r2;                     \
+      _argvec[2]   = (unsigned long)_orig.nraddr;                 \
+      _argvec[2+1] = (unsigned long)arg1;                         \
+      _argvec[2+2] = (unsigned long)arg2;                         \
+      _argvec[2+3] = (unsigned long)arg3;                         \
+      __asm__ volatile(                                           \
+         VALGRIND_ALIGN_STACK                                     \
+         "mr 12,%1\n\t"                                           \
+         "std 2,-16(12)\n\t"  /* save tocptr */                   \
+         "ld   2,-8(12)\n\t"  /* use nraddr's tocptr */           \
+         "ld   3, 8(12)\n\t"  /* arg1->r3 */                      \
+         "ld   4, 16(12)\n\t" /* arg2->r4 */                      \
+         "ld   5, 24(12)\n\t" /* arg3->r5 */                      \
+         "ld  12, 0(12)\n\t"  /* target->r12 */                   \
+         VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_R12                  \
+         "mr 12,%1\n\t"                                           \
+         "mr %0,3\n\t"                                            \
+         "ld 2,-16(12)\n\t" /* restore tocptr */                  \
+         VALGRIND_RESTORE_STACK                                   \
+         : /*out*/   "=r" (_res)                                  \
+         : /*in*/    "r" (&_argvec[2])                            \
+         : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS, "r28"   \
+      );                                                          \
+      lval = (__typeof__(lval)) _res;                             \
+   } while (0)
+
+#define CALL_FN_W_WWWW(lval, orig, arg1,arg2,arg3,arg4)           \
+   do {                                                           \
+      volatile OrigFn        _orig = (orig);                      \
+      volatile unsigned long _argvec[3+4];                        \
+      volatile unsigned long _res;                                \
+      /* _argvec[0] holds current r2 across the call */           \
+      _argvec[1]   = (unsigned long)_orig.r2;                     \
+      _argvec[2]   = (unsigned long)_orig.nraddr;                 \
+      _argvec[2+1] = (unsigned long)arg1;                         \
+      _argvec[2+2] = (unsigned long)arg2;                         \
+      _argvec[2+3] = (unsigned long)arg3;                         \
+      _argvec[2+4] = (unsigned long)arg4;                         \
+      __asm__ volatile(                                           \
+         VALGRIND_ALIGN_STACK                                     \
+         "mr 12,%1\n\t"                                           \
+         "std 2,-16(12)\n\t"  /* save tocptr */                   \
+         "ld   2,-8(12)\n\t"  /* use nraddr's tocptr */           \
+         "ld   3, 8(12)\n\t"  /* arg1->r3 */                      \
+         "ld   4, 16(12)\n\t" /* arg2->r4 */                      \
+         "ld   5, 24(12)\n\t" /* arg3->r5 */                      \
+         "ld   6, 32(12)\n\t" /* arg4->r6 */                      \
+         "ld  12, 0(12)\n\t"  /* target->r12 */                   \
+         VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_R12                  \
+         "mr 12,%1\n\t"                                           \
+         "mr %0,3\n\t"                                            \
+         "ld 2,-16(12)\n\t" /* restore tocptr */                  \
+         VALGRIND_RESTORE_STACK                                   \
+         : /*out*/   "=r" (_res)                                  \
+         : /*in*/    "r" (&_argvec[2])                            \
+         : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS, "r28"   \
+      );                                                          \
+      lval = (__typeof__(lval)) _res;                             \
+   } while (0)
+
+#define CALL_FN_W_5W(lval, orig, arg1,arg2,arg3,arg4,arg5)        \
+   do {                                                           \
+      volatile OrigFn        _orig = (orig);                      \
+      volatile unsigned long _argvec[3+5];                        \
+      volatile unsigned long _res;                                \
+      /* _argvec[0] holds current r2 across the call */           \
+      _argvec[1]   = (unsigned long)_orig.r2;                     \
+      _argvec[2]   = (unsigned long)_orig.nraddr;                 \
+      _argvec[2+1] = (unsigned long)arg1;                         \
+      _argvec[2+2] = (unsigned long)arg2;                         \
+      _argvec[2+3] = (unsigned long)arg3;                         \
+      _argvec[2+4] = (unsigned long)arg4;                         \
+      _argvec[2+5] = (unsigned long)arg5;                         \
+      __asm__ volatile(                                           \
+         VALGRIND_ALIGN_STACK                                     \
+         "mr 12,%1\n\t"                                           \
+         "std 2,-16(12)\n\t"  /* save tocptr */                   \
+         "ld   2,-8(12)\n\t"  /* use nraddr's tocptr */           \
+         "ld   3, 8(12)\n\t"  /* arg1->r3 */                      \
+         "ld   4, 16(12)\n\t" /* arg2->r4 */                      \
+         "ld   5, 24(12)\n\t" /* arg3->r5 */                      \
+         "ld   6, 32(12)\n\t" /* arg4->r6 */                      \
+         "ld   7, 40(12)\n\t" /* arg5->r7 */                      \
+         "ld  12, 0(12)\n\t"  /* target->r12 */                   \
+         VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_R12                  \
+         "mr 12,%1\n\t"                                           \
+         "mr %0,3\n\t"                                            \
+         "ld 2,-16(12)\n\t" /* restore tocptr */                  \
+         VALGRIND_RESTORE_STACK                                   \
+         : /*out*/   "=r" (_res)                                  \
+         : /*in*/    "r" (&_argvec[2])                            \
+         : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS, "r28"   \
+      );                                                          \
+      lval = (__typeof__(lval)) _res;                             \
+   } while (0)
+
+#define CALL_FN_W_6W(lval, orig, arg1,arg2,arg3,arg4,arg5,arg6)   \
+   do {                                                           \
+      volatile OrigFn        _orig = (orig);                      \
+      volatile unsigned long _argvec[3+6];                        \
+      volatile unsigned long _res;                                \
+      /* _argvec[0] holds current r2 across the call */           \
+      _argvec[1]   = (unsigned long)_orig.r2;                     \
+      _argvec[2]   = (unsigned long)_orig.nraddr;                 \
+      _argvec[2+1] = (unsigned long)arg1;                         \
+      _argvec[2+2] = (unsigned long)arg2;                         \
+      _argvec[2+3] = (unsigned long)arg3;                         \
+      _argvec[2+4] = (unsigned long)arg4;                         \
+      _argvec[2+5] = (unsigned long)arg5;                         \
+      _argvec[2+6] = (unsigned long)arg6;                         \
+      __asm__ volatile(                                           \
+         VALGRIND_ALIGN_STACK                                     \
+         "mr 12,%1\n\t"                                           \
+         "std 2,-16(12)\n\t"  /* save tocptr */                   \
+         "ld   2,-8(12)\n\t"  /* use nraddr's tocptr */           \
+         "ld   3, 8(12)\n\t"  /* arg1->r3 */                      \
+         "ld   4, 16(12)\n\t" /* arg2->r4 */                      \
+         "ld   5, 24(12)\n\t" /* arg3->r5 */                      \
+         "ld   6, 32(12)\n\t" /* arg4->r6 */                      \
+         "ld   7, 40(12)\n\t" /* arg5->r7 */                      \
+         "ld   8, 48(12)\n\t" /* arg6->r8 */                      \
+         "ld  12, 0(12)\n\t"  /* target->r12 */                   \
+         VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_R12                  \
+         "mr 12,%1\n\t"                                           \
+         "mr %0,3\n\t"                                            \
+         "ld 2,-16(12)\n\t" /* restore tocptr */                  \
+         VALGRIND_RESTORE_STACK                                   \
+         : /*out*/   "=r" (_res)                                  \
+         : /*in*/    "r" (&_argvec[2])                            \
+         : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS, "r28"   \
+      );                                                          \
+      lval = (__typeof__(lval)) _res;                             \
+   } while (0)
+
+#define CALL_FN_W_7W(lval, orig, arg1,arg2,arg3,arg4,arg5,arg6,   \
+                                 arg7)                            \
+   do {                                                           \
+      volatile OrigFn        _orig = (orig);                      \
+      volatile unsigned long _argvec[3+7];                        \
+      volatile unsigned long _res;                                \
+      /* _argvec[0] holds current r2 across the call */           \
+      _argvec[1]   = (unsigned long)_orig.r2;                     \
+      _argvec[2]   = (unsigned long)_orig.nraddr;                 \
+      _argvec[2+1] = (unsigned long)arg1;                         \
+      _argvec[2+2] = (unsigned long)arg2;                         \
+      _argvec[2+3] = (unsigned long)arg3;                         \
+      _argvec[2+4] = (unsigned long)arg4;                         \
+      _argvec[2+5] = (unsigned long)arg5;                         \
+      _argvec[2+6] = (unsigned long)arg6;                         \
+      _argvec[2+7] = (unsigned long)arg7;                         \
+      __asm__ volatile(                                           \
+         VALGRIND_ALIGN_STACK                                     \
+         "mr 12,%1\n\t"                                           \
+         "std 2,-16(12)\n\t"  /* save tocptr */                   \
+         "ld   2,-8(12)\n\t"  /* use nraddr's tocptr */           \
+         "ld   3, 8(12)\n\t"  /* arg1->r3 */                      \
+         "ld   4, 16(12)\n\t" /* arg2->r4 */                      \
+         "ld   5, 24(12)\n\t" /* arg3->r5 */                      \
+         "ld   6, 32(12)\n\t" /* arg4->r6 */                      \
+         "ld   7, 40(12)\n\t" /* arg5->r7 */                      \
+         "ld   8, 48(12)\n\t" /* arg6->r8 */                      \
+         "ld   9, 56(12)\n\t" /* arg7->r9 */                      \
+         "ld  12, 0(12)\n\t"  /* target->r12 */                   \
+         VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_R12                  \
+         "mr 12,%1\n\t"                                           \
+         "mr %0,3\n\t"                                            \
+         "ld 2,-16(12)\n\t" /* restore tocptr */                  \
+         VALGRIND_RESTORE_STACK                                   \
+         : /*out*/   "=r" (_res)                                  \
+         : /*in*/    "r" (&_argvec[2])                            \
+         : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS, "r28"   \
+      );                                                          \
+      lval = (__typeof__(lval)) _res;                             \
+   } while (0)
+
+#define CALL_FN_W_8W(lval, orig, arg1,arg2,arg3,arg4,arg5,arg6,   \
+                                 arg7,arg8)                       \
+   do {                                                           \
+      volatile OrigFn        _orig = (orig);                      \
+      volatile unsigned long _argvec[3+8];                        \
+      volatile unsigned long _res;                                \
+      /* _argvec[0] holds current r2 across the call */           \
+      _argvec[1]   = (unsigned long)_orig.r2;                     \
+      _argvec[2]   = (unsigned long)_orig.nraddr;                 \
+      _argvec[2+1] = (unsigned long)arg1;                         \
+      _argvec[2+2] = (unsigned long)arg2;                         \
+      _argvec[2+3] = (unsigned long)arg3;                         \
+      _argvec[2+4] = (unsigned long)arg4;                         \
+      _argvec[2+5] = (unsigned long)arg5;                         \
+      _argvec[2+6] = (unsigned long)arg6;                         \
+      _argvec[2+7] = (unsigned long)arg7;                         \
+      _argvec[2+8] = (unsigned long)arg8;                         \
+      __asm__ volatile(                                           \
+         VALGRIND_ALIGN_STACK                                     \
+         "mr 12,%1\n\t"                                           \
+         "std 2,-16(12)\n\t"  /* save tocptr */                   \
+         "ld   2,-8(12)\n\t"  /* use nraddr's tocptr */           \
+         "ld   3, 8(12)\n\t"  /* arg1->r3 */                      \
+         "ld   4, 16(12)\n\t" /* arg2->r4 */                      \
+         "ld   5, 24(12)\n\t" /* arg3->r5 */                      \
+         "ld   6, 32(12)\n\t" /* arg4->r6 */                      \
+         "ld   7, 40(12)\n\t" /* arg5->r7 */                      \
+         "ld   8, 48(12)\n\t" /* arg6->r8 */                      \
+         "ld   9, 56(12)\n\t" /* arg7->r9 */                      \
+         "ld  10, 64(12)\n\t" /* arg8->r10 */                     \
+         "ld  12, 0(12)\n\t"  /* target->r12 */                   \
+         VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_R12                  \
+         "mr 12,%1\n\t"                                           \
+         "mr %0,3\n\t"                                            \
+         "ld 2,-16(12)\n\t" /* restore tocptr */                  \
+         VALGRIND_RESTORE_STACK                                   \
+         : /*out*/   "=r" (_res)                                  \
+         : /*in*/    "r" (&_argvec[2])                            \
+         : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS, "r28"   \
+      );                                                          \
+      lval = (__typeof__(lval)) _res;                             \
+   } while (0)
+
+#define CALL_FN_W_9W(lval, orig, arg1,arg2,arg3,arg4,arg5,arg6,   \
+                                 arg7,arg8,arg9)                  \
+   do {                                                           \
+      volatile OrigFn        _orig = (orig);                      \
+      volatile unsigned long _argvec[3+9];                        \
+      volatile unsigned long _res;                                \
+      /* _argvec[0] holds current r2 across the call */           \
+      _argvec[1]   = (unsigned long)_orig.r2;                     \
+      _argvec[2]   = (unsigned long)_orig.nraddr;                 \
+      _argvec[2+1] = (unsigned long)arg1;                         \
+      _argvec[2+2] = (unsigned long)arg2;                         \
+      _argvec[2+3] = (unsigned long)arg3;                         \
+      _argvec[2+4] = (unsigned long)arg4;                         \
+      _argvec[2+5] = (unsigned long)arg5;                         \
+      _argvec[2+6] = (unsigned long)arg6;                         \
+      _argvec[2+7] = (unsigned long)arg7;                         \
+      _argvec[2+8] = (unsigned long)arg8;                         \
+      _argvec[2+9] = (unsigned long)arg9;                         \
+      __asm__ volatile(                                           \
+         VALGRIND_ALIGN_STACK                                     \
+         "mr 12,%1\n\t"                                           \
+         "std 2,-16(12)\n\t"  /* save tocptr */                   \
+         "ld   2,-8(12)\n\t"  /* use nraddr's tocptr */           \
+         "addi 1,1,-128\n\t"  /* expand stack frame */            \
+         /* arg9 */                                               \
+         "ld  3,72(12)\n\t"                                       \
+         "std 3,96(1)\n\t"                                        \
+         /* args1-8 */                                            \
+         "ld   3, 8(12)\n\t"  /* arg1->r3 */                      \
+         "ld   4, 16(12)\n\t" /* arg2->r4 */                      \
+         "ld   5, 24(12)\n\t" /* arg3->r5 */                      \
+         "ld   6, 32(12)\n\t" /* arg4->r6 */                      \
+         "ld   7, 40(12)\n\t" /* arg5->r7 */                      \
+         "ld   8, 48(12)\n\t" /* arg6->r8 */                      \
+         "ld   9, 56(12)\n\t" /* arg7->r9 */                      \
+         "ld  10, 64(12)\n\t" /* arg8->r10 */                     \
+         "ld  12, 0(12)\n\t"  /* target->r12 */                   \
+         VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_R12                  \
+         "mr 12,%1\n\t"                                           \
+         "mr %0,3\n\t"                                            \
+         "ld 2,-16(12)\n\t" /* restore tocptr */                  \
+         VALGRIND_RESTORE_STACK                                   \
+         : /*out*/   "=r" (_res)                                  \
+         : /*in*/    "r" (&_argvec[2])                            \
+         : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS, "r28"   \
+      );                                                          \
+      lval = (__typeof__(lval)) _res;                             \
+   } while (0)
+
+#define CALL_FN_W_10W(lval, orig, arg1,arg2,arg3,arg4,arg5,arg6,  \
+                                  arg7,arg8,arg9,arg10)           \
+   do {                                                           \
+      volatile OrigFn        _orig = (orig);                      \
+      volatile unsigned long _argvec[3+10];                       \
+      volatile unsigned long _res;                                \
+      /* _argvec[0] holds current r2 across the call */           \
+      _argvec[1]   = (unsigned long)_orig.r2;                     \
+      _argvec[2]   = (unsigned long)_orig.nraddr;                 \
+      _argvec[2+1] = (unsigned long)arg1;                         \
+      _argvec[2+2] = (unsigned long)arg2;                         \
+      _argvec[2+3] = (unsigned long)arg3;                         \
+      _argvec[2+4] = (unsigned long)arg4;                         \
+      _argvec[2+5] = (unsigned long)arg5;                         \
+      _argvec[2+6] = (unsigned long)arg6;                         \
+      _argvec[2+7] = (unsigned long)arg7;                         \
+      _argvec[2+8] = (unsigned long)arg8;                         \
+      _argvec[2+9] = (unsigned long)arg9;                         \
+      _argvec[2+10] = (unsigned long)arg10;                       \
+      __asm__ volatile(                                           \
+         VALGRIND_ALIGN_STACK                                     \
+         "mr 12,%1\n\t"                                           \
+         "std 2,-16(12)\n\t"  /* save tocptr */                   \
+         "ld   2,-8(12)\n\t"  /* use nraddr's tocptr */           \
+         "addi 1,1,-128\n\t"  /* expand stack frame */            \
+         /* arg10 */                                              \
+         "ld  3,80(12)\n\t"                                       \
+         "std 3,104(1)\n\t"                                       \
+         /* arg9 */                                               \
+         "ld  3,72(12)\n\t"                                       \
+         "std 3,96(1)\n\t"                                        \
+         /* args1-8 */                                            \
+         "ld   3, 8(12)\n\t"  /* arg1->r3 */                      \
+         "ld   4, 16(12)\n\t" /* arg2->r4 */                      \
+         "ld   5, 24(12)\n\t" /* arg3->r5 */                      \
+         "ld   6, 32(12)\n\t" /* arg4->r6 */                      \
+         "ld   7, 40(12)\n\t" /* arg5->r7 */                      \
+         "ld   8, 48(12)\n\t" /* arg6->r8 */                      \
+         "ld   9, 56(12)\n\t" /* arg7->r9 */                      \
+         "ld  10, 64(12)\n\t" /* arg8->r10 */                     \
+         "ld  12, 0(12)\n\t"  /* target->r12 */                   \
+         VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_R12                  \
+         "mr 12,%1\n\t"                                           \
+         "mr %0,3\n\t"                                            \
+         "ld 2,-16(12)\n\t" /* restore tocptr */                  \
+         VALGRIND_RESTORE_STACK                                   \
+         : /*out*/   "=r" (_res)                                  \
+         : /*in*/    "r" (&_argvec[2])                            \
+         : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS, "r28"   \
+      );                                                          \
+      lval = (__typeof__(lval)) _res;                             \
+   } while (0)
+
+#define CALL_FN_W_11W(lval, orig, arg1,arg2,arg3,arg4,arg5,arg6,  \
+                                  arg7,arg8,arg9,arg10,arg11)     \
+   do {                                                           \
+      volatile OrigFn        _orig = (orig);                      \
+      volatile unsigned long _argvec[3+11];                       \
+      volatile unsigned long _res;                                \
+      /* _argvec[0] holds current r2 across the call */           \
+      _argvec[1]   = (unsigned long)_orig.r2;                     \
+      _argvec[2]   = (unsigned long)_orig.nraddr;                 \
+      _argvec[2+1] = (unsigned long)arg1;                         \
+      _argvec[2+2] = (unsigned long)arg2;                         \
+      _argvec[2+3] = (unsigned long)arg3;                         \
+      _argvec[2+4] = (unsigned long)arg4;                         \
+      _argvec[2+5] = (unsigned long)arg5;                         \
+      _argvec[2+6] = (unsigned long)arg6;                         \
+      _argvec[2+7] = (unsigned long)arg7;                         \
+      _argvec[2+8] = (unsigned long)arg8;                         \
+      _argvec[2+9] = (unsigned long)arg9;                         \
+      _argvec[2+10] = (unsigned long)arg10;                       \
+      _argvec[2+11] = (unsigned long)arg11;                       \
+      __asm__ volatile(                                           \
+         VALGRIND_ALIGN_STACK                                     \
+         "mr 12,%1\n\t"                                           \
+         "std 2,-16(12)\n\t"  /* save tocptr */                   \
+         "ld   2,-8(12)\n\t"  /* use nraddr's tocptr */           \
+         "addi 1,1,-144\n\t"  /* expand stack frame */            \
+         /* arg11 */                                              \
+         "ld  3,88(12)\n\t"                                       \
+         "std 3,112(1)\n\t"                                       \
+         /* arg10 */                                              \
+         "ld  3,80(12)\n\t"                                       \
+         "std 3,104(1)\n\t"                                       \
+         /* arg9 */                                               \
+         "ld  3,72(12)\n\t"                                       \
+         "std 3,96(1)\n\t"                                        \
+         /* args1-8 */                                            \
+         "ld   3, 8(12)\n\t"  /* arg1->r3 */                      \
+         "ld   4, 16(12)\n\t" /* arg2->r4 */                      \
+         "ld   5, 24(12)\n\t" /* arg3->r5 */                      \
+         "ld   6, 32(12)\n\t" /* arg4->r6 */                      \
+         "ld   7, 40(12)\n\t" /* arg5->r7 */                      \
+         "ld   8, 48(12)\n\t" /* arg6->r8 */                      \
+         "ld   9, 56(12)\n\t" /* arg7->r9 */                      \
+         "ld  10, 64(12)\n\t" /* arg8->r10 */                     \
+         "ld  12, 0(12)\n\t"  /* target->r12 */                   \
+         VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_R12                  \
+         "mr 12,%1\n\t"                                           \
+         "mr %0,3\n\t"                                            \
+         "ld 2,-16(12)\n\t" /* restore tocptr */                  \
+         VALGRIND_RESTORE_STACK                                   \
+         : /*out*/   "=r" (_res)                                  \
+         : /*in*/    "r" (&_argvec[2])                            \
+         : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS, "r28"   \
+      );                                                          \
+      lval = (__typeof__(lval)) _res;                             \
+   } while (0)
+
+#define CALL_FN_W_12W(lval, orig, arg1,arg2,arg3,arg4,arg5,arg6,  \
+                                arg7,arg8,arg9,arg10,arg11,arg12) \
+   do {                                                           \
+      volatile OrigFn        _orig = (orig);                      \
+      volatile unsigned long _argvec[3+12];                       \
+      volatile unsigned long _res;                                \
+      /* _argvec[0] holds current r2 across the call */           \
+      _argvec[1]   = (unsigned long)_orig.r2;                     \
+      _argvec[2]   = (unsigned long)_orig.nraddr;                 \
+      _argvec[2+1] = (unsigned long)arg1;                         \
+      _argvec[2+2] = (unsigned long)arg2;                         \
+      _argvec[2+3] = (unsigned long)arg3;                         \
+      _argvec[2+4] = (unsigned long)arg4;                         \
+      _argvec[2+5] = (unsigned long)arg5;                         \
+      _argvec[2+6] = (unsigned long)arg6;                         \
+      _argvec[2+7] = (unsigned long)arg7;                         \
+      _argvec[2+8] = (unsigned long)arg8;                         \
+      _argvec[2+9] = (unsigned long)arg9;                         \
+      _argvec[2+10] = (unsigned long)arg10;                       \
+      _argvec[2+11] = (unsigned long)arg11;                       \
+      _argvec[2+12] = (unsigned long)arg12;                       \
+      __asm__ volatile(                                           \
+         VALGRIND_ALIGN_STACK                                     \
+         "mr 12,%1\n\t"                                           \
+         "std 2,-16(12)\n\t"  /* save tocptr */                   \
+         "ld   2,-8(12)\n\t"  /* use nraddr's tocptr */           \
+         "addi 1,1,-144\n\t"  /* expand stack frame */            \
+         /* arg12 */                                              \
+         "ld  3,96(12)\n\t"                                       \
+         "std 3,120(1)\n\t"                                       \
+         /* arg11 */                                              \
+         "ld  3,88(12)\n\t"                                       \
+         "std 3,112(1)\n\t"                                       \
+         /* arg10 */                                              \
+         "ld  3,80(12)\n\t"                                       \
+         "std 3,104(1)\n\t"                                       \
+         /* arg9 */                                               \
+         "ld  3,72(12)\n\t"                                       \
+         "std 3,96(1)\n\t"                                        \
+         /* args1-8 */                                            \
+         "ld   3, 8(12)\n\t"  /* arg1->r3 */                      \
+         "ld   4, 16(12)\n\t" /* arg2->r4 */                      \
+         "ld   5, 24(12)\n\t" /* arg3->r5 */                      \
+         "ld   6, 32(12)\n\t" /* arg4->r6 */                      \
+         "ld   7, 40(12)\n\t" /* arg5->r7 */                      \
+         "ld   8, 48(12)\n\t" /* arg6->r8 */                      \
+         "ld   9, 56(12)\n\t" /* arg7->r9 */                      \
+         "ld  10, 64(12)\n\t" /* arg8->r10 */                     \
+         "ld  12, 0(12)\n\t"  /* target->r12 */                   \
+         VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_R12                  \
+         "mr 12,%1\n\t"                                           \
+         "mr %0,3\n\t"                                            \
+         "ld 2,-16(12)\n\t" /* restore tocptr */                  \
+         VALGRIND_RESTORE_STACK                                   \
+         : /*out*/   "=r" (_res)                                  \
+         : /*in*/    "r" (&_argvec[2])                            \
+         : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS, "r28"   \
+      );                                                          \
+      lval = (__typeof__(lval)) _res;                             \
+   } while (0)
+
+#endif /* PLAT_ppc64le_linux */
+
+/* ------------------------- arm-linux ------------------------- */
+
+#if defined(PLAT_arm_linux)
+
+/* These regs are trashed by the hidden call. */
+#define __CALLER_SAVED_REGS "r0", "r1", "r2", "r3","r4","r14"
+
+/* Macros to save and align the stack before making a function
+   call and restore it afterwards as gcc may not keep the stack
+   pointer aligned if it doesn't realise calls are being made
+   to other functions. */
+
+/* This is a bit tricky.  We store the original stack pointer in r10
+   as it is callee-saves.  gcc doesn't allow the use of r11 for some
+   reason.  Also, we can't directly "bic" the stack pointer in thumb
+   mode since r13 isn't an allowed register number in that context.
+   So use r4 as a temporary, since that is about to get trashed
+   anyway, just after each use of this macro.  Side effect is we need
+   to be very careful about any future changes, since
+   VALGRIND_ALIGN_STACK simply assumes r4 is usable. */
+#define VALGRIND_ALIGN_STACK               \
+      "mov r10, sp\n\t"                    \
+      "mov r4,  sp\n\t"                    \
+      "bic r4,  r4, #7\n\t"                \
+      "mov sp,  r4\n\t"
+#define VALGRIND_RESTORE_STACK             \
+      "mov sp,  r10\n\t"
+
+/* These CALL_FN_ macros assume that on arm-linux, sizeof(unsigned
+   long) == 4. */
+
+#define CALL_FN_W_v(lval, orig)                                   \
+   do {                                                           \
+      volatile OrigFn        _orig = (orig);                      \
+      volatile unsigned long _argvec[1];                          \
+      volatile unsigned long _res;                                \
+      _argvec[0] = (unsigned long)_orig.nraddr;                   \
+      __asm__ volatile(                                           \
+         VALGRIND_ALIGN_STACK                                     \
+         "ldr r4, [%1] \n\t"  /* target->r4 */                    \
+         VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_R4                   \
+         VALGRIND_RESTORE_STACK                                   \
+         "mov %0, r0\n"                                           \
+         : /*out*/   "=r" (_res)                                  \
+         : /*in*/    "0" (&_argvec[0])                            \
+         : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS, "r10"   \
+      );                                                          \
+      lval = (__typeof__(lval)) _res;                             \
+   } while (0)
+
+#define CALL_FN_W_W(lval, orig, arg1)                             \
+   do {                                                           \
+      volatile OrigFn        _orig = (orig);                      \
+      volatile unsigned long _argvec[2];                          \
+      volatile unsigned long _res;                                \
+      _argvec[0] = (unsigned long)_orig.nraddr;                   \
+      _argvec[1] = (unsigned long)(arg1);                         \
+      __asm__ volatile(                                           \
+         VALGRIND_ALIGN_STACK                                     \
+         "ldr r0, [%1, #4] \n\t"                                  \
+         "ldr r4, [%1] \n\t"  /* target->r4 */                    \
+         VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_R4                   \
+         VALGRIND_RESTORE_STACK                                   \
+         "mov %0, r0\n"                                           \
+         : /*out*/   "=r" (_res)                                  \
+         : /*in*/    "0" (&_argvec[0])                            \
+         : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS, "r10"   \
+      );                                                          \
+      lval = (__typeof__(lval)) _res;                             \
+   } while (0)
+
+#define CALL_FN_W_WW(lval, orig, arg1,arg2)                       \
+   do {                                                           \
+      volatile OrigFn        _orig = (orig);                      \
+      volatile unsigned long _argvec[3];                          \
+      volatile unsigned long _res;                                \
+      _argvec[0] = (unsigned long)_orig.nraddr;                   \
+      _argvec[1] = (unsigned long)(arg1);                         \
+      _argvec[2] = (unsigned long)(arg2);                         \
+      __asm__ volatile(                                           \
+         VALGRIND_ALIGN_STACK                                     \
+         "ldr r0, [%1, #4] \n\t"                                  \
+         "ldr r1, [%1, #8] \n\t"                                  \
+         "ldr r4, [%1] \n\t"  /* target->r4 */                    \
+         VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_R4                   \
+         VALGRIND_RESTORE_STACK                                   \
+         "mov %0, r0\n"                                           \
+         : /*out*/   "=r" (_res)                                  \
+         : /*in*/    "0" (&_argvec[0])                            \
+         : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS, "r10"   \
+      );                                                          \
+      lval = (__typeof__(lval)) _res;                             \
+   } while (0)
+
+#define CALL_FN_W_WWW(lval, orig, arg1,arg2,arg3)                 \
+   do {                                                           \
+      volatile OrigFn        _orig = (orig);                      \
+      volatile unsigned long _argvec[4];                          \
+      volatile unsigned long _res;                                \
+      _argvec[0] = (unsigned long)_orig.nraddr;                   \
+      _argvec[1] = (unsigned long)(arg1);                         \
+      _argvec[2] = (unsigned long)(arg2);                         \
+      _argvec[3] = (unsigned long)(arg3);                         \
+      __asm__ volatile(                                           \
+         VALGRIND_ALIGN_STACK                                     \
+         "ldr r0, [%1, #4] \n\t"                                  \
+         "ldr r1, [%1, #8] \n\t"                                  \
+         "ldr r2, [%1, #12] \n\t"                                 \
+         "ldr r4, [%1] \n\t"  /* target->r4 */                    \
+         VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_R4                   \
+         VALGRIND_RESTORE_STACK                                   \
+         "mov %0, r0\n"                                           \
+         : /*out*/   "=r" (_res)                                  \
+         : /*in*/    "0" (&_argvec[0])                            \
+         : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS, "r10"   \
+      );                                                          \
+      lval = (__typeof__(lval)) _res;                             \
+   } while (0)
+
+#define CALL_FN_W_WWWW(lval, orig, arg1,arg2,arg3,arg4)           \
+   do {                                                           \
+      volatile OrigFn        _orig = (orig);                      \
+      volatile unsigned long _argvec[5];                          \
+      volatile unsigned long _res;                                \
+      _argvec[0] = (unsigned long)_orig.nraddr;                   \
+      _argvec[1] = (unsigned long)(arg1);                         \
+      _argvec[2] = (unsigned long)(arg2);                         \
+      _argvec[3] = (unsigned long)(arg3);                         \
+      _argvec[4] = (unsigned long)(arg4);                         \
+      __asm__ volatile(                                           \
+         VALGRIND_ALIGN_STACK                                     \
+         "ldr r0, [%1, #4] \n\t"                                  \
+         "ldr r1, [%1, #8] \n\t"                                  \
+         "ldr r2, [%1, #12] \n\t"                                 \
+         "ldr r3, [%1, #16] \n\t"                                 \
+         "ldr r4, [%1] \n\t"  /* target->r4 */                    \
+         VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_R4                   \
+         VALGRIND_RESTORE_STACK                                   \
+         "mov %0, r0"                                             \
+         : /*out*/   "=r" (_res)                                  \
+         : /*in*/    "0" (&_argvec[0])                            \
+         : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS, "r10"   \
+      );                                                          \
+      lval = (__typeof__(lval)) _res;                             \
+   } while (0)
+
+#define CALL_FN_W_5W(lval, orig, arg1,arg2,arg3,arg4,arg5)        \
+   do {                                                           \
+      volatile OrigFn        _orig = (orig);                      \
+      volatile unsigned long _argvec[6];                          \
+      volatile unsigned long _res;                                \
+      _argvec[0] = (unsigned long)_orig.nraddr;                   \
+      _argvec[1] = (unsigned long)(arg1);                         \
+      _argvec[2] = (unsigned long)(arg2);                         \
+      _argvec[3] = (unsigned long)(arg3);                         \
+      _argvec[4] = (unsigned long)(arg4);                         \
+      _argvec[5] = (unsigned long)(arg5);                         \
+      __asm__ volatile(                                           \
+         VALGRIND_ALIGN_STACK                                     \
+         "sub sp, sp, #4 \n\t"                                    \
+         "ldr r0, [%1, #20] \n\t"                                 \
+         "push {r0} \n\t"                                         \
+         "ldr r0, [%1, #4] \n\t"                                  \
+         "ldr r1, [%1, #8] \n\t"                                  \
+         "ldr r2, [%1, #12] \n\t"                                 \
+         "ldr r3, [%1, #16] \n\t"                                 \
+         "ldr r4, [%1] \n\t"  /* target->r4 */                    \
+         VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_R4                   \
+         VALGRIND_RESTORE_STACK                                   \
+         "mov %0, r0"                                             \
+         : /*out*/   "=r" (_res)                                  \
+         : /*in*/    "0" (&_argvec[0])                            \
+         : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS, "r10"   \
+      );                                                          \
+      lval = (__typeof__(lval)) _res;                             \
+   } while (0)
+
+#define CALL_FN_W_6W(lval, orig, arg1,arg2,arg3,arg4,arg5,arg6)   \
+   do {                                                           \
+      volatile OrigFn        _orig = (orig);                      \
+      volatile unsigned long _argvec[7];                          \
+      volatile unsigned long _res;                                \
+      _argvec[0] = (unsigned long)_orig.nraddr;                   \
+      _argvec[1] = (unsigned long)(arg1);                         \
+      _argvec[2] = (unsigned long)(arg2);                         \
+      _argvec[3] = (unsigned long)(arg3);                         \
+      _argvec[4] = (unsigned long)(arg4);                         \
+      _argvec[5] = (unsigned long)(arg5);                         \
+      _argvec[6] = (unsigned long)(arg6);                         \
+      __asm__ volatile(                                           \
+         VALGRIND_ALIGN_STACK                                     \
+         "ldr r0, [%1, #20] \n\t"                                 \
+         "ldr r1, [%1, #24] \n\t"                                 \
+         "push {r0, r1} \n\t"                                     \
+         "ldr r0, [%1, #4] \n\t"                                  \
+         "ldr r1, [%1, #8] \n\t"                                  \
+         "ldr r2, [%1, #12] \n\t"                                 \
+         "ldr r3, [%1, #16] \n\t"                                 \
+         "ldr r4, [%1] \n\t"  /* target->r4 */                    \
+         VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_R4                   \
+         VALGRIND_RESTORE_STACK                                   \
+         "mov %0, r0"                                             \
+         : /*out*/   "=r" (_res)                                  \
+         : /*in*/    "0" (&_argvec[0])                            \
+         : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS, "r10"   \
+      );                                                          \
+      lval = (__typeof__(lval)) _res;                             \
+   } while (0)
+
+#define CALL_FN_W_7W(lval, orig, arg1,arg2,arg3,arg4,arg5,arg6,   \
+                                 arg7)                            \
+   do {                                                           \
+      volatile OrigFn        _orig = (orig);                      \
+      volatile unsigned long _argvec[8];                          \
+      volatile unsigned long _res;                                \
+      _argvec[0] = (unsigned long)_orig.nraddr;                   \
+      _argvec[1] = (unsigned long)(arg1);                         \
+      _argvec[2] = (unsigned long)(arg2);                         \
+      _argvec[3] = (unsigned long)(arg3);                         \
+      _argvec[4] = (unsigned long)(arg4);                         \
+      _argvec[5] = (unsigned long)(arg5);                         \
+      _argvec[6] = (unsigned long)(arg6);                         \
+      _argvec[7] = (unsigned long)(arg7);                         \
+      __asm__ volatile(                                           \
+         VALGRIND_ALIGN_STACK                                     \
+         "sub sp, sp, #4 \n\t"                                    \
+         "ldr r0, [%1, #20] \n\t"                                 \
+         "ldr r1, [%1, #24] \n\t"                                 \
+         "ldr r2, [%1, #28] \n\t"                                 \
+         "push {r0, r1, r2} \n\t"                                 \
+         "ldr r0, [%1, #4] \n\t"                                  \
+         "ldr r1, [%1, #8] \n\t"                                  \
+         "ldr r2, [%1, #12] \n\t"                                 \
+         "ldr r3, [%1, #16] \n\t"                                 \
+         "ldr r4, [%1] \n\t"  /* target->r4 */                    \
+         VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_R4                   \
+         VALGRIND_RESTORE_STACK                                   \
+         "mov %0, r0"                                             \
+         : /*out*/   "=r" (_res)                                  \
+         : /*in*/    "0" (&_argvec[0])                            \
+         : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS, "r10"   \
+      );                                                          \
+      lval = (__typeof__(lval)) _res;                             \
+   } while (0)
+
+#define CALL_FN_W_8W(lval, orig, arg1,arg2,arg3,arg4,arg5,arg6,   \
+                                 arg7,arg8)                       \
+   do {                                                           \
+      volatile OrigFn        _orig = (orig);                      \
+      volatile unsigned long _argvec[9];                          \
+      volatile unsigned long _res;                                \
+      _argvec[0] = (unsigned long)_orig.nraddr;                   \
+      _argvec[1] = (unsigned long)(arg1);                         \
+      _argvec[2] = (unsigned long)(arg2);                         \
+      _argvec[3] = (unsigned long)(arg3);                         \
+      _argvec[4] = (unsigned long)(arg4);                         \
+      _argvec[5] = (unsigned long)(arg5);                         \
+      _argvec[6] = (unsigned long)(arg6);                         \
+      _argvec[7] = (unsigned long)(arg7);                         \
+      _argvec[8] = (unsigned long)(arg8);                         \
+      __asm__ volatile(                                           \
+         VALGRIND_ALIGN_STACK                                     \
+         "ldr r0, [%1, #20] \n\t"                                 \
+         "ldr r1, [%1, #24] \n\t"                                 \
+         "ldr r2, [%1, #28] \n\t"                                 \
+         "ldr r3, [%1, #32] \n\t"                                 \
+         "push {r0, r1, r2, r3} \n\t"                             \
+         "ldr r0, [%1, #4] \n\t"                                  \
+         "ldr r1, [%1, #8] \n\t"                                  \
+         "ldr r2, [%1, #12] \n\t"                                 \
+         "ldr r3, [%1, #16] \n\t"                                 \
+         "ldr r4, [%1] \n\t"  /* target->r4 */                    \
+         VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_R4                   \
+         VALGRIND_RESTORE_STACK                                   \
+         "mov %0, r0"                                             \
+         : /*out*/   "=r" (_res)                                  \
+         : /*in*/    "0" (&_argvec[0])                            \
+         : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS, "r10"   \
+      );                                                          \
+      lval = (__typeof__(lval)) _res;                             \
+   } while (0)
+
+#define CALL_FN_W_9W(lval, orig, arg1,arg2,arg3,arg4,arg5,arg6,   \
+                                 arg7,arg8,arg9)                  \
+   do {                                                           \
+      volatile OrigFn        _orig = (orig);                      \
+      volatile unsigned long _argvec[10];                         \
+      volatile unsigned long _res;                                \
+      _argvec[0] = (unsigned long)_orig.nraddr;                   \
+      _argvec[1] = (unsigned long)(arg1);                         \
+      _argvec[2] = (unsigned long)(arg2);                         \
+      _argvec[3] = (unsigned long)(arg3);                         \
+      _argvec[4] = (unsigned long)(arg4);                         \
+      _argvec[5] = (unsigned long)(arg5);                         \
+      _argvec[6] = (unsigned long)(arg6);                         \
+      _argvec[7] = (unsigned long)(arg7);                         \
+      _argvec[8] = (unsigned long)(arg8);                         \
+      _argvec[9] = (unsigned long)(arg9);                         \
+      __asm__ volatile(                                           \
+         VALGRIND_ALIGN_STACK                                     \
+         "sub sp, sp, #4 \n\t"                                    \
+         "ldr r0, [%1, #20] \n\t"                                 \
+         "ldr r1, [%1, #24] \n\t"                                 \
+         "ldr r2, [%1, #28] \n\t"                                 \
+         "ldr r3, [%1, #32] \n\t"                                 \
+         "ldr r4, [%1, #36] \n\t"                                 \
+         "push {r0, r1, r2, r3, r4} \n\t"                         \
+         "ldr r0, [%1, #4] \n\t"                                  \
+         "ldr r1, [%1, #8] \n\t"                                  \
+         "ldr r2, [%1, #12] \n\t"                                 \
+         "ldr r3, [%1, #16] \n\t"                                 \
+         "ldr r4, [%1] \n\t"  /* target->r4 */                    \
+         VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_R4                   \
+         VALGRIND_RESTORE_STACK                                   \
+         "mov %0, r0"                                             \
+         : /*out*/   "=r" (_res)                                  \
+         : /*in*/    "0" (&_argvec[0])                            \
+         : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS, "r10"   \
+      );                                                          \
+      lval = (__typeof__(lval)) _res;                             \
+   } while (0)
+
+#define CALL_FN_W_10W(lval, orig, arg1,arg2,arg3,arg4,arg5,arg6,  \
+                                  arg7,arg8,arg9,arg10)           \
+   do {                                                           \
+      volatile OrigFn        _orig = (orig);                      \
+      volatile unsigned long _argvec[11];                         \
+      volatile unsigned long _res;                                \
+      _argvec[0] = (unsigned long)_orig.nraddr;                   \
+      _argvec[1] = (unsigned long)(arg1);                         \
+      _argvec[2] = (unsigned long)(arg2);                         \
+      _argvec[3] = (unsigned long)(arg3);                         \
+      _argvec[4] = (unsigned long)(arg4);                         \
+      _argvec[5] = (unsigned long)(arg5);                         \
+      _argvec[6] = (unsigned long)(arg6);                         \
+      _argvec[7] = (unsigned long)(arg7);                         \
+      _argvec[8] = (unsigned long)(arg8);                         \
+      _argvec[9] = (unsigned long)(arg9);                         \
+      _argvec[10] = (unsigned long)(arg10);                       \
+      __asm__ volatile(                                           \
+         VALGRIND_ALIGN_STACK                                     \
+         "ldr r0, [%1, #40] \n\t"                                 \
+         "push {r0} \n\t"                                         \
+         "ldr r0, [%1, #20] \n\t"                                 \
+         "ldr r1, [%1, #24] \n\t"                                 \
+         "ldr r2, [%1, #28] \n\t"                                 \
+         "ldr r3, [%1, #32] \n\t"                                 \
+         "ldr r4, [%1, #36] \n\t"                                 \
+         "push {r0, r1, r2, r3, r4} \n\t"                         \
+         "ldr r0, [%1, #4] \n\t"                                  \
+         "ldr r1, [%1, #8] \n\t"                                  \
+         "ldr r2, [%1, #12] \n\t"                                 \
+         "ldr r3, [%1, #16] \n\t"                                 \
+         "ldr r4, [%1] \n\t"  /* target->r4 */                    \
+         VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_R4                   \
+         VALGRIND_RESTORE_STACK                                   \
+         "mov %0, r0"                                             \
+         : /*out*/   "=r" (_res)                                  \
+         : /*in*/    "0" (&_argvec[0])                            \
+         : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS, "r10"   \
+      );                                                          \
+      lval = (__typeof__(lval)) _res;                             \
+   } while (0)
+
+#define CALL_FN_W_11W(lval, orig, arg1,arg2,arg3,arg4,arg5,       \
+                                  arg6,arg7,arg8,arg9,arg10,      \
+                                  arg11)                          \
+   do {                                                           \
+      volatile OrigFn        _orig = (orig);                      \
+      volatile unsigned long _argvec[12];                         \
+      volatile unsigned long _res;                                \
+      _argvec[0] = (unsigned long)_orig.nraddr;                   \
+      _argvec[1] = (unsigned long)(arg1);                         \
+      _argvec[2] = (unsigned long)(arg2);                         \
+      _argvec[3] = (unsigned long)(arg3);                         \
+      _argvec[4] = (unsigned long)(arg4);                         \
+      _argvec[5] = (unsigned long)(arg5);                         \
+      _argvec[6] = (unsigned long)(arg6);                         \
+      _argvec[7] = (unsigned long)(arg7);                         \
+      _argvec[8] = (unsigned long)(arg8);                         \
+      _argvec[9] = (unsigned long)(arg9);                         \
+      _argvec[10] = (unsigned long)(arg10);                       \
+      _argvec[11] = (unsigned long)(arg11);                       \
+      __asm__ volatile(                                           \
+         VALGRIND_ALIGN_STACK                                     \
+         "sub sp, sp, #4 \n\t"                                    \
+         "ldr r0, [%1, #40] \n\t"                                 \
+         "ldr r1, [%1, #44] \n\t"                                 \
+         "push {r0, r1} \n\t"                                     \
+         "ldr r0, [%1, #20] \n\t"                                 \
+         "ldr r1, [%1, #24] \n\t"                                 \
+         "ldr r2, [%1, #28] \n\t"                                 \
+         "ldr r3, [%1, #32] \n\t"                                 \
+         "ldr r4, [%1, #36] \n\t"                                 \
+         "push {r0, r1, r2, r3, r4} \n\t"                         \
+         "ldr r0, [%1, #4] \n\t"                                  \
+         "ldr r1, [%1, #8] \n\t"                                  \
+         "ldr r2, [%1, #12] \n\t"                                 \
+         "ldr r3, [%1, #16] \n\t"                                 \
+         "ldr r4, [%1] \n\t"  /* target->r4 */                    \
+         VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_R4                   \
+         VALGRIND_RESTORE_STACK                                   \
+         "mov %0, r0"                                             \
+         : /*out*/   "=r" (_res)                                  \
+         : /*in*/    "0" (&_argvec[0])                            \
+         : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS, "r10"   \
+      );                                                          \
+      lval = (__typeof__(lval)) _res;                             \
+   } while (0)
+
+#define CALL_FN_W_12W(lval, orig, arg1,arg2,arg3,arg4,arg5,       \
+                                  arg6,arg7,arg8,arg9,arg10,      \
+                                  arg11,arg12)                    \
+   do {                                                           \
+      volatile OrigFn        _orig = (orig);                      \
+      volatile unsigned long _argvec[13];                         \
+      volatile unsigned long _res;                                \
+      _argvec[0] = (unsigned long)_orig.nraddr;                   \
+      _argvec[1] = (unsigned long)(arg1);                         \
+      _argvec[2] = (unsigned long)(arg2);                         \
+      _argvec[3] = (unsigned long)(arg3);                         \
+      _argvec[4] = (unsigned long)(arg4);                         \
+      _argvec[5] = (unsigned long)(arg5);                         \
+      _argvec[6] = (unsigned long)(arg6);                         \
+      _argvec[7] = (unsigned long)(arg7);                         \
+      _argvec[8] = (unsigned long)(arg8);                         \
+      _argvec[9] = (unsigned long)(arg9);                         \
+      _argvec[10] = (unsigned long)(arg10);                       \
+      _argvec[11] = (unsigned long)(arg11);                       \
+      _argvec[12] = (unsigned long)(arg12);                       \
+      __asm__ volatile(                                           \
+         VALGRIND_ALIGN_STACK                                     \
+         "ldr r0, [%1, #40] \n\t"                                 \
+         "ldr r1, [%1, #44] \n\t"                                 \
+         "ldr r2, [%1, #48] \n\t"                                 \
+         "push {r0, r1, r2} \n\t"                                 \
+         "ldr r0, [%1, #20] \n\t"                                 \
+         "ldr r1, [%1, #24] \n\t"                                 \
+         "ldr r2, [%1, #28] \n\t"                                 \
+         "ldr r3, [%1, #32] \n\t"                                 \
+         "ldr r4, [%1, #36] \n\t"                                 \
+         "push {r0, r1, r2, r3, r4} \n\t"                         \
+         "ldr r0, [%1, #4] \n\t"                                  \
+         "ldr r1, [%1, #8] \n\t"                                  \
+         "ldr r2, [%1, #12] \n\t"                                 \
+         "ldr r3, [%1, #16] \n\t"                                 \
+         "ldr r4, [%1] \n\t"  /* target->r4 */                    \
+         VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_R4                   \
+         VALGRIND_RESTORE_STACK                                   \
+         "mov %0, r0"                                             \
+         : /*out*/   "=r" (_res)                                  \
+         : /*in*/    "0" (&_argvec[0])                            \
+         : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS, "r10"   \
+      );                                                          \
+      lval = (__typeof__(lval)) _res;                             \
+   } while (0)
+
+#endif /* PLAT_arm_linux */
+
+/* ------------------------ arm64-linux ------------------------ */
+
+#if defined(PLAT_arm64_linux)
+
+/* These regs are trashed by the hidden call. */
+#define __CALLER_SAVED_REGS \
+     "x0", "x1", "x2", "x3","x4", "x5", "x6", "x7", "x8", "x9",   \
+     "x10", "x11", "x12", "x13", "x14", "x15", "x16", "x17",      \
+     "x18", "x19", "x20", "x30",                                  \
+     "v0", "v1", "v2", "v3", "v4", "v5", "v6", "v7", "v8", "v9",  \
+     "v10", "v11", "v12", "v13", "v14", "v15", "v16", "v17",      \
+     "v18", "v19", "v20", "v21", "v22", "v23", "v24", "v25",      \
+     "v26", "v27", "v28", "v29", "v30", "v31"
+
+/* x21 is callee-saved, so we can use it to save and restore SP around
+   the hidden call. */
+#define VALGRIND_ALIGN_STACK               \
+      "mov x21, sp\n\t"                    \
+      "bic sp, x21, #15\n\t"
+#define VALGRIND_RESTORE_STACK             \
+      "mov sp,  x21\n\t"
+
+/* These CALL_FN_ macros assume that on arm64-linux,
+   sizeof(unsigned long) == 8. */
+
+#define CALL_FN_W_v(lval, orig)                                   \
+   do {                                                           \
+      volatile OrigFn        _orig = (orig);                      \
+      volatile unsigned long _argvec[1];                          \
+      volatile unsigned long _res;                                \
+      _argvec[0] = (unsigned long)_orig.nraddr;                   \
+      __asm__ volatile(                                           \
+         VALGRIND_ALIGN_STACK                                     \
+         "ldr x8, [%1] \n\t"  /* target->x8 */                    \
+         VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_X8                   \
+         VALGRIND_RESTORE_STACK                                   \
+         "mov %0, x0\n"                                           \
+         : /*out*/   "=r" (_res)                                  \
+         : /*in*/    "0" (&_argvec[0])                            \
+         : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS, "x21"   \
+      );                                                          \
+      lval = (__typeof__(lval)) _res;                             \
+   } while (0)
+
+#define CALL_FN_W_W(lval, orig, arg1)                             \
+   do {                                                           \
+      volatile OrigFn        _orig = (orig);                      \
+      volatile unsigned long _argvec[2];                          \
+      volatile unsigned long _res;                                \
+      _argvec[0] = (unsigned long)_orig.nraddr;                   \
+      _argvec[1] = (unsigned long)(arg1);                         \
+      __asm__ volatile(                                           \
+         VALGRIND_ALIGN_STACK                                     \
+         "ldr x0, [%1, #8] \n\t"                                  \
+         "ldr x8, [%1] \n\t"  /* target->x8 */                    \
+         VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_X8                   \
+         VALGRIND_RESTORE_STACK                                   \
+         "mov %0, x0\n"                                           \
+         : /*out*/   "=r" (_res)                                  \
+         : /*in*/    "0" (&_argvec[0])                            \
+         : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS, "x21"   \
+      );                                                          \
+      lval = (__typeof__(lval)) _res;                             \
+   } while (0)
+
+#define CALL_FN_W_WW(lval, orig, arg1,arg2)                       \
+   do {                                                           \
+      volatile OrigFn        _orig = (orig);                      \
+      volatile unsigned long _argvec[3];                          \
+      volatile unsigned long _res;                                \
+      _argvec[0] = (unsigned long)_orig.nraddr;                   \
+      _argvec[1] = (unsigned long)(arg1);                         \
+      _argvec[2] = (unsigned long)(arg2);                         \
+      __asm__ volatile(                                           \
+         VALGRIND_ALIGN_STACK                                     \
+         "ldr x0, [%1, #8] \n\t"                                  \
+         "ldr x1, [%1, #16] \n\t"                                 \
+         "ldr x8, [%1] \n\t"  /* target->x8 */                    \
+         VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_X8                   \
+         VALGRIND_RESTORE_STACK                                   \
+         "mov %0, x0\n"                                           \
+         : /*out*/   "=r" (_res)                                  \
+         : /*in*/    "0" (&_argvec[0])                            \
+         : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS, "x21"   \
+      );                                                          \
+      lval = (__typeof__(lval)) _res;                             \
+   } while (0)
+
+#define CALL_FN_W_WWW(lval, orig, arg1,arg2,arg3)                 \
+   do {                                                           \
+      volatile OrigFn        _orig = (orig);                      \
+      volatile unsigned long _argvec[4];                          \
+      volatile unsigned long _res;                                \
+      _argvec[0] = (unsigned long)_orig.nraddr;                   \
+      _argvec[1] = (unsigned long)(arg1);                         \
+      _argvec[2] = (unsigned long)(arg2);                         \
+      _argvec[3] = (unsigned long)(arg3);                         \
+      __asm__ volatile(                                           \
+         VALGRIND_ALIGN_STACK                                     \
+         "ldr x0, [%1, #8] \n\t"                                  \
+         "ldr x1, [%1, #16] \n\t"                                 \
+         "ldr x2, [%1, #24] \n\t"                                 \
+         "ldr x8, [%1] \n\t"  /* target->x8 */                    \
+         VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_X8                   \
+         VALGRIND_RESTORE_STACK                                   \
+         "mov %0, x0\n"                                           \
+         : /*out*/   "=r" (_res)                                  \
+         : /*in*/    "0" (&_argvec[0])                            \
+         : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS, "x21"   \
+      );                                                          \
+      lval = (__typeof__(lval)) _res;                             \
+   } while (0)
+
+#define CALL_FN_W_WWWW(lval, orig, arg1,arg2,arg3,arg4)           \
+   do {                                                           \
+      volatile OrigFn        _orig = (orig);                      \
+      volatile unsigned long _argvec[5];                          \
+      volatile unsigned long _res;                                \
+      _argvec[0] = (unsigned long)_orig.nraddr;                   \
+      _argvec[1] = (unsigned long)(arg1);                         \
+      _argvec[2] = (unsigned long)(arg2);                         \
+      _argvec[3] = (unsigned long)(arg3);                         \
+      _argvec[4] = (unsigned long)(arg4);                         \
+      __asm__ volatile(                                           \
+         VALGRIND_ALIGN_STACK                                     \
+         "ldr x0, [%1, #8] \n\t"                                  \
+         "ldr x1, [%1, #16] \n\t"                                 \
+         "ldr x2, [%1, #24] \n\t"                                 \
+         "ldr x3, [%1, #32] \n\t"                                 \
+         "ldr x8, [%1] \n\t"  /* target->x8 */                    \
+         VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_X8                   \
+         VALGRIND_RESTORE_STACK                                   \
+         "mov %0, x0"                                             \
+         : /*out*/   "=r" (_res)                                  \
+         : /*in*/    "0" (&_argvec[0])                            \
+         : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS, "x21"   \
+      );                                                          \
+      lval = (__typeof__(lval)) _res;                             \
+   } while (0)
+
+#define CALL_FN_W_5W(lval, orig, arg1,arg2,arg3,arg4,arg5)        \
+   do {                                                           \
+      volatile OrigFn        _orig = (orig);                      \
+      volatile unsigned long _argvec[6];                          \
+      volatile unsigned long _res;                                \
+      _argvec[0] = (unsigned long)_orig.nraddr;                   \
+      _argvec[1] = (unsigned long)(arg1);                         \
+      _argvec[2] = (unsigned long)(arg2);                         \
+      _argvec[3] = (unsigned long)(arg3);                         \
+      _argvec[4] = (unsigned long)(arg4);                         \
+      _argvec[5] = (unsigned long)(arg5);                         \
+      __asm__ volatile(                                           \
+         VALGRIND_ALIGN_STACK                                     \
+         "ldr x0, [%1, #8] \n\t"                                  \
+         "ldr x1, [%1, #16] \n\t"                                 \
+         "ldr x2, [%1, #24] \n\t"                                 \
+         "ldr x3, [%1, #32] \n\t"                                 \
+         "ldr x4, [%1, #40] \n\t"                                 \
+         "ldr x8, [%1] \n\t"  /* target->x8 */                    \
+         VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_X8                   \
+         VALGRIND_RESTORE_STACK                                   \
+         "mov %0, x0"                                             \
+         : /*out*/   "=r" (_res)                                  \
+         : /*in*/    "0" (&_argvec[0])                            \
+         : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS, "x21"   \
+      );                                                          \
+      lval = (__typeof__(lval)) _res;                             \
+   } while (0)
+
+#define CALL_FN_W_6W(lval, orig, arg1,arg2,arg3,arg4,arg5,arg6)   \
+   do {                                                           \
+      volatile OrigFn        _orig = (orig);                      \
+      volatile unsigned long _argvec[7];                          \
+      volatile unsigned long _res;                                \
+      _argvec[0] = (unsigned long)_orig.nraddr;                   \
+      _argvec[1] = (unsigned long)(arg1);                         \
+      _argvec[2] = (unsigned long)(arg2);                         \
+      _argvec[3] = (unsigned long)(arg3);                         \
+      _argvec[4] = (unsigned long)(arg4);                         \
+      _argvec[5] = (unsigned long)(arg5);                         \
+      _argvec[6] = (unsigned long)(arg6);                         \
+      __asm__ volatile(                                           \
+         VALGRIND_ALIGN_STACK                                     \
+         "ldr x0, [%1, #8] \n\t"                                  \
+         "ldr x1, [%1, #16] \n\t"                                 \
+         "ldr x2, [%1, #24] \n\t"                                 \
+         "ldr x3, [%1, #32] \n\t"                                 \
+         "ldr x4, [%1, #40] \n\t"                                 \
+         "ldr x5, [%1, #48] \n\t"                                 \
+         "ldr x8, [%1] \n\t"  /* target->x8 */                    \
+         VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_X8                   \
+         VALGRIND_RESTORE_STACK                                   \
+         "mov %0, x0"                                             \
+         : /*out*/   "=r" (_res)                                  \
+         : /*in*/    "0" (&_argvec[0])                            \
+         : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS, "x21"   \
+      );                                                          \
+      lval = (__typeof__(lval)) _res;                             \
+   } while (0)
+
+#define CALL_FN_W_7W(lval, orig, arg1,arg2,arg3,arg4,arg5,arg6,   \
+                                 arg7)                            \
+   do {                                                           \
+      volatile OrigFn        _orig = (orig);                      \
+      volatile unsigned long _argvec[8];                          \
+      volatile unsigned long _res;                                \
+      _argvec[0] = (unsigned long)_orig.nraddr;                   \
+      _argvec[1] = (unsigned long)(arg1);                         \
+      _argvec[2] = (unsigned long)(arg2);                         \
+      _argvec[3] = (unsigned long)(arg3);                         \
+      _argvec[4] = (unsigned long)(arg4);                         \
+      _argvec[5] = (unsigned long)(arg5);                         \
+      _argvec[6] = (unsigned long)(arg6);                         \
+      _argvec[7] = (unsigned long)(arg7);                         \
+      __asm__ volatile(                                           \
+         VALGRIND_ALIGN_STACK                                     \
+         "ldr x0, [%1, #8] \n\t"                                  \
+         "ldr x1, [%1, #16] \n\t"                                 \
+         "ldr x2, [%1, #24] \n\t"                                 \
+         "ldr x3, [%1, #32] \n\t"                                 \
+         "ldr x4, [%1, #40] \n\t"                                 \
+         "ldr x5, [%1, #48] \n\t"                                 \
+         "ldr x6, [%1, #56] \n\t"                                 \
+         "ldr x8, [%1] \n\t"  /* target->x8 */                    \
+         VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_X8                   \
+         VALGRIND_RESTORE_STACK                                   \
+         "mov %0, x0"                                             \
+         : /*out*/   "=r" (_res)                                  \
+         : /*in*/    "0" (&_argvec[0])                            \
+         : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS, "x21"   \
+      );                                                          \
+      lval = (__typeof__(lval)) _res;                             \
+   } while (0)
+
+#define CALL_FN_W_8W(lval, orig, arg1,arg2,arg3,arg4,arg5,arg6,   \
+                                 arg7,arg8)                       \
+   do {                                                           \
+      volatile OrigFn        _orig = (orig);                      \
+      volatile unsigned long _argvec[9];                          \
+      volatile unsigned long _res;                                \
+      _argvec[0] = (unsigned long)_orig.nraddr;                   \
+      _argvec[1] = (unsigned long)(arg1);                         \
+      _argvec[2] = (unsigned long)(arg2);                         \
+      _argvec[3] = (unsigned long)(arg3);                         \
+      _argvec[4] = (unsigned long)(arg4);                         \
+      _argvec[5] = (unsigned long)(arg5);                         \
+      _argvec[6] = (unsigned long)(arg6);                         \
+      _argvec[7] = (unsigned long)(arg7);                         \
+      _argvec[8] = (unsigned long)(arg8);                         \
+      __asm__ volatile(                                           \
+         VALGRIND_ALIGN_STACK                                     \
+         "ldr x0, [%1, #8] \n\t"                                  \
+         "ldr x1, [%1, #16] \n\t"                                 \
+         "ldr x2, [%1, #24] \n\t"                                 \
+         "ldr x3, [%1, #32] \n\t"                                 \
+         "ldr x4, [%1, #40] \n\t"                                 \
+         "ldr x5, [%1, #48] \n\t"                                 \
+         "ldr x6, [%1, #56] \n\t"                                 \
+         "ldr x7, [%1, #64] \n\t"                                 \
+         "ldr x8, [%1] \n\t"  /* target->x8 */                    \
+         VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_X8                   \
+         VALGRIND_RESTORE_STACK                                   \
+         "mov %0, x0"                                             \
+         : /*out*/   "=r" (_res)                                  \
+         : /*in*/    "0" (&_argvec[0])                            \
+         : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS, "x21"   \
+      );                                                          \
+      lval = (__typeof__(lval)) _res;                             \
+   } while (0)
+
+#define CALL_FN_W_9W(lval, orig, arg1,arg2,arg3,arg4,arg5,arg6,   \
+                                 arg7,arg8,arg9)                  \
+   do {                                                           \
+      volatile OrigFn        _orig = (orig);                      \
+      volatile unsigned long _argvec[10];                         \
+      volatile unsigned long _res;                                \
+      _argvec[0] = (unsigned long)_orig.nraddr;                   \
+      _argvec[1] = (unsigned long)(arg1);                         \
+      _argvec[2] = (unsigned long)(arg2);                         \
+      _argvec[3] = (unsigned long)(arg3);                         \
+      _argvec[4] = (unsigned long)(arg4);                         \
+      _argvec[5] = (unsigned long)(arg5);                         \
+      _argvec[6] = (unsigned long)(arg6);                         \
+      _argvec[7] = (unsigned long)(arg7);                         \
+      _argvec[8] = (unsigned long)(arg8);                         \
+      _argvec[9] = (unsigned long)(arg9);                         \
+      __asm__ volatile(                                           \
+         VALGRIND_ALIGN_STACK                                     \
+         "sub sp, sp, #0x20 \n\t"                                 \
+         "ldr x0, [%1, #8] \n\t"                                  \
+         "ldr x1, [%1, #16] \n\t"                                 \
+         "ldr x2, [%1, #24] \n\t"                                 \
+         "ldr x3, [%1, #32] \n\t"                                 \
+         "ldr x4, [%1, #40] \n\t"                                 \
+         "ldr x5, [%1, #48] \n\t"                                 \
+         "ldr x6, [%1, #56] \n\t"                                 \
+         "ldr x7, [%1, #64] \n\t"                                 \
+         "ldr x8, [%1, #72] \n\t"                                 \
+         "str x8, [sp, #0]  \n\t"                                 \
+         "ldr x8, [%1] \n\t"  /* target->x8 */                    \
+         VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_X8                   \
+         VALGRIND_RESTORE_STACK                                   \
+         "mov %0, x0"                                             \
+         : /*out*/   "=r" (_res)                                  \
+         : /*in*/    "0" (&_argvec[0])                            \
+         : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS, "x21"   \
+      );                                                          \
+      lval = (__typeof__(lval)) _res;                             \
+   } while (0)
+
+#define CALL_FN_W_10W(lval, orig, arg1,arg2,arg3,arg4,arg5,arg6,  \
+                                  arg7,arg8,arg9,arg10)           \
+   do {                                                           \
+      volatile OrigFn        _orig = (orig);                      \
+      volatile unsigned long _argvec[11];                         \
+      volatile unsigned long _res;                                \
+      _argvec[0] = (unsigned long)_orig.nraddr;                   \
+      _argvec[1] = (unsigned long)(arg1);                         \
+      _argvec[2] = (unsigned long)(arg2);                         \
+      _argvec[3] = (unsigned long)(arg3);                         \
+      _argvec[4] = (unsigned long)(arg4);                         \
+      _argvec[5] = (unsigned long)(arg5);                         \
+      _argvec[6] = (unsigned long)(arg6);                         \
+      _argvec[7] = (unsigned long)(arg7);                         \
+      _argvec[8] = (unsigned long)(arg8);                         \
+      _argvec[9] = (unsigned long)(arg9);                         \
+      _argvec[10] = (unsigned long)(arg10);                       \
+      __asm__ volatile(                                           \
+         VALGRIND_ALIGN_STACK                                     \
+         "sub sp, sp, #0x20 \n\t"                                 \
+         "ldr x0, [%1, #8] \n\t"                                  \
+         "ldr x1, [%1, #16] \n\t"                                 \
+         "ldr x2, [%1, #24] \n\t"                                 \
+         "ldr x3, [%1, #32] \n\t"                                 \
+         "ldr x4, [%1, #40] \n\t"                                 \
+         "ldr x5, [%1, #48] \n\t"                                 \
+         "ldr x6, [%1, #56] \n\t"                                 \
+         "ldr x7, [%1, #64] \n\t"                                 \
+         "ldr x8, [%1, #72] \n\t"                                 \
+         "str x8, [sp, #0]  \n\t"                                 \
+         "ldr x8, [%1, #80] \n\t"                                 \
+         "str x8, [sp, #8]  \n\t"                                 \
+         "ldr x8, [%1] \n\t"  /* target->x8 */                    \
+         VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_X8                   \
+         VALGRIND_RESTORE_STACK                                   \
+         "mov %0, x0"                                             \
+         : /*out*/   "=r" (_res)                                  \
+         : /*in*/    "0" (&_argvec[0])                            \
+         : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS, "x21"   \
+      );                                                          \
+      lval = (__typeof__(lval)) _res;                             \
+   } while (0)
+
+#define CALL_FN_W_11W(lval, orig, arg1,arg2,arg3,arg4,arg5,arg6,  \
+                                  arg7,arg8,arg9,arg10,arg11)     \
+   do {                                                           \
+      volatile OrigFn        _orig = (orig);                      \
+      volatile unsigned long _argvec[12];                         \
+      volatile unsigned long _res;                                \
+      _argvec[0] = (unsigned long)_orig.nraddr;                   \
+      _argvec[1] = (unsigned long)(arg1);                         \
+      _argvec[2] = (unsigned long)(arg2);                         \
+      _argvec[3] = (unsigned long)(arg3);                         \
+      _argvec[4] = (unsigned long)(arg4);                         \
+      _argvec[5] = (unsigned long)(arg5);                         \
+      _argvec[6] = (unsigned long)(arg6);                         \
+      _argvec[7] = (unsigned long)(arg7);                         \
+      _argvec[8] = (unsigned long)(arg8);                         \
+      _argvec[9] = (unsigned long)(arg9);                         \
+      _argvec[10] = (unsigned long)(arg10);                       \
+      _argvec[11] = (unsigned long)(arg11);                       \
+      __asm__ volatile(                                           \
+         VALGRIND_ALIGN_STACK                                     \
+         "sub sp, sp, #0x30 \n\t"                                 \
+         "ldr x0, [%1, #8] \n\t"                                  \
+         "ldr x1, [%1, #16] \n\t"                                 \
+         "ldr x2, [%1, #24] \n\t"                                 \
+         "ldr x3, [%1, #32] \n\t"                                 \
+         "ldr x4, [%1, #40] \n\t"                                 \
+         "ldr x5, [%1, #48] \n\t"                                 \
+         "ldr x6, [%1, #56] \n\t"                                 \
+         "ldr x7, [%1, #64] \n\t"                                 \
+         "ldr x8, [%1, #72] \n\t"                                 \
+         "str x8, [sp, #0]  \n\t"                                 \
+         "ldr x8, [%1, #80] \n\t"                                 \
+         "str x8, [sp, #8]  \n\t"                                 \
+         "ldr x8, [%1, #88] \n\t"                                 \
+         "str x8, [sp, #16] \n\t"                                 \
+         "ldr x8, [%1] \n\t"  /* target->x8 */                    \
+         VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_X8                   \
+         VALGRIND_RESTORE_STACK                                   \
+         "mov %0, x0"                                             \
+         : /*out*/   "=r" (_res)                                  \
+         : /*in*/    "0" (&_argvec[0])                            \
+         : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS, "x21"   \
+      );                                                          \
+      lval = (__typeof__(lval)) _res;                             \
+   } while (0)
+
+#define CALL_FN_W_12W(lval, orig, arg1,arg2,arg3,arg4,arg5,arg6,  \
+                                  arg7,arg8,arg9,arg10,arg11,     \
+                                  arg12)                          \
+   do {                                                           \
+      volatile OrigFn        _orig = (orig);                      \
+      volatile unsigned long _argvec[13];                         \
+      volatile unsigned long _res;                                \
+      _argvec[0] = (unsigned long)_orig.nraddr;                   \
+      _argvec[1] = (unsigned long)(arg1);                         \
+      _argvec[2] = (unsigned long)(arg2);                         \
+      _argvec[3] = (unsigned long)(arg3);                         \
+      _argvec[4] = (unsigned long)(arg4);                         \
+      _argvec[5] = (unsigned long)(arg5);                         \
+      _argvec[6] = (unsigned long)(arg6);                         \
+      _argvec[7] = (unsigned long)(arg7);                         \
+      _argvec[8] = (unsigned long)(arg8);                         \
+      _argvec[9] = (unsigned long)(arg9);                         \
+      _argvec[10] = (unsigned long)(arg10);                       \
+      _argvec[11] = (unsigned long)(arg11);                       \
+      _argvec[12] = (unsigned long)(arg12);                       \
+      __asm__ volatile(                                           \
+         VALGRIND_ALIGN_STACK                                     \
+         "sub sp, sp, #0x30 \n\t"                                 \
+         "ldr x0, [%1, #8] \n\t"                                  \
+         "ldr x1, [%1, #16] \n\t"                                 \
+         "ldr x2, [%1, #24] \n\t"                                 \
+         "ldr x3, [%1, #32] \n\t"                                 \
+         "ldr x4, [%1, #40] \n\t"                                 \
+         "ldr x5, [%1, #48] \n\t"                                 \
+         "ldr x6, [%1, #56] \n\t"                                 \
+         "ldr x7, [%1, #64] \n\t"                                 \
+         "ldr x8, [%1, #72] \n\t"                                 \
+         "str x8, [sp, #0]  \n\t"                                 \
+         "ldr x8, [%1, #80] \n\t"                                 \
+         "str x8, [sp, #8]  \n\t"                                 \
+         "ldr x8, [%1, #88] \n\t"                                 \
+         "str x8, [sp, #16] \n\t"                                 \
+         "ldr x8, [%1, #96] \n\t"                                 \
+         "str x8, [sp, #24] \n\t"                                 \
+         "ldr x8, [%1] \n\t"  /* target->x8 */                    \
+         VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_X8                   \
+         VALGRIND_RESTORE_STACK                                   \
+         "mov %0, x0"                                             \
+         : /*out*/   "=r" (_res)                                  \
+         : /*in*/    "0" (&_argvec[0])                            \
+         : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS, "x21"   \
+      );                                                          \
+      lval = (__typeof__(lval)) _res;                             \
+   } while (0)
+
+#endif /* PLAT_arm64_linux */
+
+/* ------------------------- s390x-linux ------------------------- */
+
+#if defined(PLAT_s390x_linux)
+
+/* Similar workaround as amd64 (see above), but we use r11 as frame
+   pointer and save the old r11 in r7. r11 might be used for
+   argvec, therefore we copy argvec in r1 since r1 is clobbered
+   after the call anyway.  */
+#if defined(__GNUC__) && defined(__GCC_HAVE_DWARF2_CFI_ASM)
+#  define __FRAME_POINTER                                         \
+      ,"d"(__builtin_dwarf_cfa())
+#  define VALGRIND_CFI_PROLOGUE                                   \
+      ".cfi_remember_state\n\t"                                   \
+      "lgr 1,%1\n\t" /* copy the argvec pointer in r1 */          \
+      "lgr 7,11\n\t"                                              \
+      "lgr 11,%2\n\t"                                             \
+      ".cfi_def_cfa r11, 0\n\t"
+#  define VALGRIND_CFI_EPILOGUE                                   \
+      "lgr 11, 7\n\t"                                             \
+      ".cfi_restore_state\n\t"
+#else
+#  define __FRAME_POINTER
+#  define VALGRIND_CFI_PROLOGUE                                   \
+      "lgr 1,%1\n\t"
+#  define VALGRIND_CFI_EPILOGUE
+#endif
+
+/* Nb: On s390 the stack pointer is properly aligned *at all times*
+   according to the s390 GCC maintainer. (The ABI specification is not
+   precise in this regard.) Therefore, VALGRIND_ALIGN_STACK and
+   VALGRIND_RESTORE_STACK are not defined here. */
+
+/* These regs are trashed by the hidden call. Note that we overwrite
+   r14 in s390_irgen_noredir (VEX/priv/guest_s390_irgen.c) to give the
+   function a proper return address. All others are ABI defined call
+   clobbers. */
+#define __CALLER_SAVED_REGS "0","1","2","3","4","5","14", \
+                           "f0","f1","f2","f3","f4","f5","f6","f7"
+
+/* Nb: Although r11 is modified in the asm snippets below (inside 
+   VALGRIND_CFI_PROLOGUE) it is not listed in the clobber section, for
+   two reasons:
+   (1) r11 is restored in VALGRIND_CFI_EPILOGUE, so effectively it is not
+       modified
+   (2) GCC will complain that r11 cannot appear inside a clobber section,
+       when compiled with -O -fno-omit-frame-pointer
+ */
+
+#define CALL_FN_W_v(lval, orig)                                  \
+   do {                                                          \
+      volatile OrigFn        _orig = (orig);                     \
+      volatile unsigned long  _argvec[1];                        \
+      volatile unsigned long _res;                               \
+      _argvec[0] = (unsigned long)_orig.nraddr;                  \
+      __asm__ volatile(                                          \
+         VALGRIND_CFI_PROLOGUE                                   \
+         "aghi 15,-160\n\t"                                      \
+         "lg 1, 0(1)\n\t"  /* target->r1 */                      \
+         VALGRIND_CALL_NOREDIR_R1                                \
+         "lgr %0, 2\n\t"                                         \
+         "aghi 15,160\n\t"                                       \
+         VALGRIND_CFI_EPILOGUE                                   \
+         : /*out*/   "=d" (_res)                                 \
+         : /*in*/    "d" (&_argvec[0]) __FRAME_POINTER           \
+         : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS,"7"     \
+      );                                                         \
+      lval = (__typeof__(lval)) _res;                            \
+   } while (0)
+
+/* The call abi has the arguments in r2-r6 and stack */
+#define CALL_FN_W_W(lval, orig, arg1)                            \
+   do {                                                          \
+      volatile OrigFn        _orig = (orig);                     \
+      volatile unsigned long _argvec[2];                         \
+      volatile unsigned long _res;                               \
+      _argvec[0] = (unsigned long)_orig.nraddr;                  \
+      _argvec[1] = (unsigned long)arg1;                          \
+      __asm__ volatile(                                          \
+         VALGRIND_CFI_PROLOGUE                                   \
+         "aghi 15,-160\n\t"                                      \
+         "lg 2, 8(1)\n\t"                                        \
+         "lg 1, 0(1)\n\t"                                        \
+         VALGRIND_CALL_NOREDIR_R1                                \
+         "lgr %0, 2\n\t"                                         \
+         "aghi 15,160\n\t"                                       \
+         VALGRIND_CFI_EPILOGUE                                   \
+         : /*out*/   "=d" (_res)                                 \
+         : /*in*/    "a" (&_argvec[0]) __FRAME_POINTER           \
+         : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS,"7"     \
+      );                                                         \
+      lval = (__typeof__(lval)) _res;                            \
+   } while (0)
+
+#define CALL_FN_W_WW(lval, orig, arg1, arg2)                     \
+   do {                                                          \
+      volatile OrigFn        _orig = (orig);                     \
+      volatile unsigned long _argvec[3];                         \
+      volatile unsigned long _res;                               \
+      _argvec[0] = (unsigned long)_orig.nraddr;                  \
+      _argvec[1] = (unsigned long)arg1;                          \
+      _argvec[2] = (unsigned long)arg2;                          \
+      __asm__ volatile(                                          \
+         VALGRIND_CFI_PROLOGUE                                   \
+         "aghi 15,-160\n\t"                                      \
+         "lg 2, 8(1)\n\t"                                        \
+         "lg 3,16(1)\n\t"                                        \
+         "lg 1, 0(1)\n\t"                                        \
+         VALGRIND_CALL_NOREDIR_R1                                \
+         "lgr %0, 2\n\t"                                         \
+         "aghi 15,160\n\t"                                       \
+         VALGRIND_CFI_EPILOGUE                                   \
+         : /*out*/   "=d" (_res)                                 \
+         : /*in*/    "a" (&_argvec[0]) __FRAME_POINTER           \
+         : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS,"7"     \
+      );                                                         \
+      lval = (__typeof__(lval)) _res;                            \
+   } while (0)
+
+#define CALL_FN_W_WWW(lval, orig, arg1, arg2, arg3)              \
+   do {                                                          \
+      volatile OrigFn        _orig = (orig);                     \
+      volatile unsigned long _argvec[4];                         \
+      volatile unsigned long _res;                               \
+      _argvec[0] = (unsigned long)_orig.nraddr;                  \
+      _argvec[1] = (unsigned long)arg1;                          \
+      _argvec[2] = (unsigned long)arg2;                          \
+      _argvec[3] = (unsigned long)arg3;                          \
+      __asm__ volatile(                                          \
+         VALGRIND_CFI_PROLOGUE                                   \
+         "aghi 15,-160\n\t"                                      \
+         "lg 2, 8(1)\n\t"                                        \
+         "lg 3,16(1)\n\t"                                        \
+         "lg 4,24(1)\n\t"                                        \
+         "lg 1, 0(1)\n\t"                                        \
+         VALGRIND_CALL_NOREDIR_R1                                \
+         "lgr %0, 2\n\t"                                         \
+         "aghi 15,160\n\t"                                       \
+         VALGRIND_CFI_EPILOGUE                                   \
+         : /*out*/   "=d" (_res)                                 \
+         : /*in*/    "a" (&_argvec[0]) __FRAME_POINTER           \
+         : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS,"7"     \
+      );                                                         \
+      lval = (__typeof__(lval)) _res;                            \
+   } while (0)
+
+#define CALL_FN_W_WWWW(lval, orig, arg1, arg2, arg3, arg4)       \
+   do {                                                          \
+      volatile OrigFn        _orig = (orig);                     \
+      volatile unsigned long _argvec[5];                         \
+      volatile unsigned long _res;                               \
+      _argvec[0] = (unsigned long)_orig.nraddr;                  \
+      _argvec[1] = (unsigned long)arg1;                          \
+      _argvec[2] = (unsigned long)arg2;                          \
+      _argvec[3] = (unsigned long)arg3;                          \
+      _argvec[4] = (unsigned long)arg4;                          \
+      __asm__ volatile(                                          \
+         VALGRIND_CFI_PROLOGUE                                   \
+         "aghi 15,-160\n\t"                                      \
+         "lg 2, 8(1)\n\t"                                        \
+         "lg 3,16(1)\n\t"                                        \
+         "lg 4,24(1)\n\t"                                        \
+         "lg 5,32(1)\n\t"                                        \
+         "lg 1, 0(1)\n\t"                                        \
+         VALGRIND_CALL_NOREDIR_R1                                \
+         "lgr %0, 2\n\t"                                         \
+         "aghi 15,160\n\t"                                       \
+         VALGRIND_CFI_EPILOGUE                                   \
+         : /*out*/   "=d" (_res)                                 \
+         : /*in*/    "a" (&_argvec[0]) __FRAME_POINTER           \
+         : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS,"7"     \
+      );                                                         \
+      lval = (__typeof__(lval)) _res;                            \
+   } while (0)
+
+#define CALL_FN_W_5W(lval, orig, arg1, arg2, arg3, arg4, arg5)   \
+   do {                                                          \
+      volatile OrigFn        _orig = (orig);                     \
+      volatile unsigned long _argvec[6];                         \
+      volatile unsigned long _res;                               \
+      _argvec[0] = (unsigned long)_orig.nraddr;                  \
+      _argvec[1] = (unsigned long)arg1;                          \
+      _argvec[2] = (unsigned long)arg2;                          \
+      _argvec[3] = (unsigned long)arg3;                          \
+      _argvec[4] = (unsigned long)arg4;                          \
+      _argvec[5] = (unsigned long)arg5;                          \
+      __asm__ volatile(                                          \
+         VALGRIND_CFI_PROLOGUE                                   \
+         "aghi 15,-160\n\t"                                      \
+         "lg 2, 8(1)\n\t"                                        \
+         "lg 3,16(1)\n\t"                                        \
+         "lg 4,24(1)\n\t"                                        \
+         "lg 5,32(1)\n\t"                                        \
+         "lg 6,40(1)\n\t"                                        \
+         "lg 1, 0(1)\n\t"                                        \
+         VALGRIND_CALL_NOREDIR_R1                                \
+         "lgr %0, 2\n\t"                                         \
+         "aghi 15,160\n\t"                                       \
+         VALGRIND_CFI_EPILOGUE                                   \
+         : /*out*/   "=d" (_res)                                 \
+         : /*in*/    "a" (&_argvec[0]) __FRAME_POINTER           \
+         : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS,"6","7" \
+      );                                                         \
+      lval = (__typeof__(lval)) _res;                            \
+   } while (0)
+
+#define CALL_FN_W_6W(lval, orig, arg1, arg2, arg3, arg4, arg5,   \
+                     arg6)                                       \
+   do {                                                          \
+      volatile OrigFn        _orig = (orig);                     \
+      volatile unsigned long _argvec[7];                         \
+      volatile unsigned long _res;                               \
+      _argvec[0] = (unsigned long)_orig.nraddr;                  \
+      _argvec[1] = (unsigned long)arg1;                          \
+      _argvec[2] = (unsigned long)arg2;                          \
+      _argvec[3] = (unsigned long)arg3;                          \
+      _argvec[4] = (unsigned long)arg4;                          \
+      _argvec[5] = (unsigned long)arg5;                          \
+      _argvec[6] = (unsigned long)arg6;                          \
+      __asm__ volatile(                                          \
+         VALGRIND_CFI_PROLOGUE                                   \
+         "aghi 15,-168\n\t"                                      \
+         "lg 2, 8(1)\n\t"                                        \
+         "lg 3,16(1)\n\t"                                        \
+         "lg 4,24(1)\n\t"                                        \
+         "lg 5,32(1)\n\t"                                        \
+         "lg 6,40(1)\n\t"                                        \
+         "mvc 160(8,15), 48(1)\n\t"                              \
+         "lg 1, 0(1)\n\t"                                        \
+         VALGRIND_CALL_NOREDIR_R1                                \
+         "lgr %0, 2\n\t"                                         \
+         "aghi 15,168\n\t"                                       \
+         VALGRIND_CFI_EPILOGUE                                   \
+         : /*out*/   "=d" (_res)                                 \
+         : /*in*/    "a" (&_argvec[0]) __FRAME_POINTER           \
+         : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS,"6","7" \
+      );                                                         \
+      lval = (__typeof__(lval)) _res;                            \
+   } while (0)
+
+#define CALL_FN_W_7W(lval, orig, arg1, arg2, arg3, arg4, arg5,   \
+                     arg6, arg7)                                 \
+   do {                                                          \
+      volatile OrigFn        _orig = (orig);                     \
+      volatile unsigned long _argvec[8];                         \
+      volatile unsigned long _res;                               \
+      _argvec[0] = (unsigned long)_orig.nraddr;                  \
+      _argvec[1] = (unsigned long)arg1;                          \
+      _argvec[2] = (unsigned long)arg2;                          \
+      _argvec[3] = (unsigned long)arg3;                          \
+      _argvec[4] = (unsigned long)arg4;                          \
+      _argvec[5] = (unsigned long)arg5;                          \
+      _argvec[6] = (unsigned long)arg6;                          \
+      _argvec[7] = (unsigned long)arg7;                          \
+      __asm__ volatile(                                          \
+         VALGRIND_CFI_PROLOGUE                                   \
+         "aghi 15,-176\n\t"                                      \
+         "lg 2, 8(1)\n\t"                                        \
+         "lg 3,16(1)\n\t"                                        \
+         "lg 4,24(1)\n\t"                                        \
+         "lg 5,32(1)\n\t"                                        \
+         "lg 6,40(1)\n\t"                                        \
+         "mvc 160(8,15), 48(1)\n\t"                              \
+         "mvc 168(8,15), 56(1)\n\t"                              \
+         "lg 1, 0(1)\n\t"                                        \
+         VALGRIND_CALL_NOREDIR_R1                                \
+         "lgr %0, 2\n\t"                                         \
+         "aghi 15,176\n\t"                                       \
+         VALGRIND_CFI_EPILOGUE                                   \
+         : /*out*/   "=d" (_res)                                 \
+         : /*in*/    "a" (&_argvec[0]) __FRAME_POINTER           \
+         : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS,"6","7" \
+      );                                                         \
+      lval = (__typeof__(lval)) _res;                            \
+   } while (0)
+
+#define CALL_FN_W_8W(lval, orig, arg1, arg2, arg3, arg4, arg5,   \
+                     arg6, arg7 ,arg8)                           \
+   do {                                                          \
+      volatile OrigFn        _orig = (orig);                     \
+      volatile unsigned long _argvec[9];                         \
+      volatile unsigned long _res;                               \
+      _argvec[0] = (unsigned long)_orig.nraddr;                  \
+      _argvec[1] = (unsigned long)arg1;                          \
+      _argvec[2] = (unsigned long)arg2;                          \
+      _argvec[3] = (unsigned long)arg3;                          \
+      _argvec[4] = (unsigned long)arg4;                          \
+      _argvec[5] = (unsigned long)arg5;                          \
+      _argvec[6] = (unsigned long)arg6;                          \
+      _argvec[7] = (unsigned long)arg7;                          \
+      _argvec[8] = (unsigned long)arg8;                          \
+      __asm__ volatile(                                          \
+         VALGRIND_CFI_PROLOGUE                                   \
+         "aghi 15,-184\n\t"                                      \
+         "lg 2, 8(1)\n\t"                                        \
+         "lg 3,16(1)\n\t"                                        \
+         "lg 4,24(1)\n\t"                                        \
+         "lg 5,32(1)\n\t"                                        \
+         "lg 6,40(1)\n\t"                                        \
+         "mvc 160(8,15), 48(1)\n\t"                              \
+         "mvc 168(8,15), 56(1)\n\t"                              \
+         "mvc 176(8,15), 64(1)\n\t"                              \
+         "lg 1, 0(1)\n\t"                                        \
+         VALGRIND_CALL_NOREDIR_R1                                \
+         "lgr %0, 2\n\t"                                         \
+         "aghi 15,184\n\t"                                       \
+         VALGRIND_CFI_EPILOGUE                                   \
+         : /*out*/   "=d" (_res)                                 \
+         : /*in*/    "a" (&_argvec[0]) __FRAME_POINTER           \
+         : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS,"6","7" \
+      );                                                         \
+      lval = (__typeof__(lval)) _res;                            \
+   } while (0)
+
+#define CALL_FN_W_9W(lval, orig, arg1, arg2, arg3, arg4, arg5,   \
+                     arg6, arg7 ,arg8, arg9)                     \
+   do {                                                          \
+      volatile OrigFn        _orig = (orig);                     \
+      volatile unsigned long _argvec[10];                        \
+      volatile unsigned long _res;                               \
+      _argvec[0] = (unsigned long)_orig.nraddr;                  \
+      _argvec[1] = (unsigned long)arg1;                          \
+      _argvec[2] = (unsigned long)arg2;                          \
+      _argvec[3] = (unsigned long)arg3;                          \
+      _argvec[4] = (unsigned long)arg4;                          \
+      _argvec[5] = (unsigned long)arg5;                          \
+      _argvec[6] = (unsigned long)arg6;                          \
+      _argvec[7] = (unsigned long)arg7;                          \
+      _argvec[8] = (unsigned long)arg8;                          \
+      _argvec[9] = (unsigned long)arg9;                          \
+      __asm__ volatile(                                          \
+         VALGRIND_CFI_PROLOGUE                                   \
+         "aghi 15,-192\n\t"                                      \
+         "lg 2, 8(1)\n\t"                                        \
+         "lg 3,16(1)\n\t"                                        \
+         "lg 4,24(1)\n\t"                                        \
+         "lg 5,32(1)\n\t"                                        \
+         "lg 6,40(1)\n\t"                                        \
+         "mvc 160(8,15), 48(1)\n\t"                              \
+         "mvc 168(8,15), 56(1)\n\t"                              \
+         "mvc 176(8,15), 64(1)\n\t"                              \
+         "mvc 184(8,15), 72(1)\n\t"                              \
+         "lg 1, 0(1)\n\t"                                        \
+         VALGRIND_CALL_NOREDIR_R1                                \
+         "lgr %0, 2\n\t"                                         \
+         "aghi 15,192\n\t"                                       \
+         VALGRIND_CFI_EPILOGUE                                   \
+         : /*out*/   "=d" (_res)                                 \
+         : /*in*/    "a" (&_argvec[0]) __FRAME_POINTER           \
+         : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS,"6","7" \
+      );                                                         \
+      lval = (__typeof__(lval)) _res;                            \
+   } while (0)
+
+#define CALL_FN_W_10W(lval, orig, arg1, arg2, arg3, arg4, arg5,  \
+                     arg6, arg7 ,arg8, arg9, arg10)              \
+   do {                                                          \
+      volatile OrigFn        _orig = (orig);                     \
+      volatile unsigned long _argvec[11];                        \
+      volatile unsigned long _res;                               \
+      _argvec[0] = (unsigned long)_orig.nraddr;                  \
+      _argvec[1] = (unsigned long)arg1;                          \
+      _argvec[2] = (unsigned long)arg2;                          \
+      _argvec[3] = (unsigned long)arg3;                          \
+      _argvec[4] = (unsigned long)arg4;                          \
+      _argvec[5] = (unsigned long)arg5;                          \
+      _argvec[6] = (unsigned long)arg6;                          \
+      _argvec[7] = (unsigned long)arg7;                          \
+      _argvec[8] = (unsigned long)arg8;                          \
+      _argvec[9] = (unsigned long)arg9;                          \
+      _argvec[10] = (unsigned long)arg10;                        \
+      __asm__ volatile(                                          \
+         VALGRIND_CFI_PROLOGUE                                   \
+         "aghi 15,-200\n\t"                                      \
+         "lg 2, 8(1)\n\t"                                        \
+         "lg 3,16(1)\n\t"                                        \
+         "lg 4,24(1)\n\t"                                        \
+         "lg 5,32(1)\n\t"                                        \
+         "lg 6,40(1)\n\t"                                        \
+         "mvc 160(8,15), 48(1)\n\t"                              \
+         "mvc 168(8,15), 56(1)\n\t"                              \
+         "mvc 176(8,15), 64(1)\n\t"                              \
+         "mvc 184(8,15), 72(1)\n\t"                              \
+         "mvc 192(8,15), 80(1)\n\t"                              \
+         "lg 1, 0(1)\n\t"                                        \
+         VALGRIND_CALL_NOREDIR_R1                                \
+         "lgr %0, 2\n\t"                                         \
+         "aghi 15,200\n\t"                                       \
+         VALGRIND_CFI_EPILOGUE                                   \
+         : /*out*/   "=d" (_res)                                 \
+         : /*in*/    "a" (&_argvec[0]) __FRAME_POINTER           \
+         : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS,"6","7" \
+      );                                                         \
+      lval = (__typeof__(lval)) _res;                            \
+   } while (0)
+
+#define CALL_FN_W_11W(lval, orig, arg1, arg2, arg3, arg4, arg5,  \
+                     arg6, arg7 ,arg8, arg9, arg10, arg11)       \
+   do {                                                          \
+      volatile OrigFn        _orig = (orig);                     \
+      volatile unsigned long _argvec[12];                        \
+      volatile unsigned long _res;                               \
+      _argvec[0] = (unsigned long)_orig.nraddr;                  \
+      _argvec[1] = (unsigned long)arg1;                          \
+      _argvec[2] = (unsigned long)arg2;                          \
+      _argvec[3] = (unsigned long)arg3;                          \
+      _argvec[4] = (unsigned long)arg4;                          \
+      _argvec[5] = (unsigned long)arg5;                          \
+      _argvec[6] = (unsigned long)arg6;                          \
+      _argvec[7] = (unsigned long)arg7;                          \
+      _argvec[8] = (unsigned long)arg8;                          \
+      _argvec[9] = (unsigned long)arg9;                          \
+      _argvec[10] = (unsigned long)arg10;                        \
+      _argvec[11] = (unsigned long)arg11;                        \
+      __asm__ volatile(                                          \
+         VALGRIND_CFI_PROLOGUE                                   \
+         "aghi 15,-208\n\t"                                      \
+         "lg 2, 8(1)\n\t"                                        \
+         "lg 3,16(1)\n\t"                                        \
+         "lg 4,24(1)\n\t"                                        \
+         "lg 5,32(1)\n\t"                                        \
+         "lg 6,40(1)\n\t"                                        \
+         "mvc 160(8,15), 48(1)\n\t"                              \
+         "mvc 168(8,15), 56(1)\n\t"                              \
+         "mvc 176(8,15), 64(1)\n\t"                              \
+         "mvc 184(8,15), 72(1)\n\t"                              \
+         "mvc 192(8,15), 80(1)\n\t"                              \
+         "mvc 200(8,15), 88(1)\n\t"                              \
+         "lg 1, 0(1)\n\t"                                        \
+         VALGRIND_CALL_NOREDIR_R1                                \
+         "lgr %0, 2\n\t"                                         \
+         "aghi 15,208\n\t"                                       \
+         VALGRIND_CFI_EPILOGUE                                   \
+         : /*out*/   "=d" (_res)                                 \
+         : /*in*/    "a" (&_argvec[0]) __FRAME_POINTER           \
+         : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS,"6","7" \
+      );                                                         \
+      lval = (__typeof__(lval)) _res;                            \
+   } while (0)
+
+#define CALL_FN_W_12W(lval, orig, arg1, arg2, arg3, arg4, arg5,  \
+                     arg6, arg7 ,arg8, arg9, arg10, arg11, arg12)\
+   do {                                                          \
+      volatile OrigFn        _orig = (orig);                     \
+      volatile unsigned long _argvec[13];                        \
+      volatile unsigned long _res;                               \
+      _argvec[0] = (unsigned long)_orig.nraddr;                  \
+      _argvec[1] = (unsigned long)arg1;                          \
+      _argvec[2] = (unsigned long)arg2;                          \
+      _argvec[3] = (unsigned long)arg3;                          \
+      _argvec[4] = (unsigned long)arg4;                          \
+      _argvec[5] = (unsigned long)arg5;                          \
+      _argvec[6] = (unsigned long)arg6;                          \
+      _argvec[7] = (unsigned long)arg7;                          \
+      _argvec[8] = (unsigned long)arg8;                          \
+      _argvec[9] = (unsigned long)arg9;                          \
+      _argvec[10] = (unsigned long)arg10;                        \
+      _argvec[11] = (unsigned long)arg11;                        \
+      _argvec[12] = (unsigned long)arg12;                        \
+      __asm__ volatile(                                          \
+         VALGRIND_CFI_PROLOGUE                                   \
+         "aghi 15,-216\n\t"                                      \
+         "lg 2, 8(1)\n\t"                                        \
+         "lg 3,16(1)\n\t"                                        \
+         "lg 4,24(1)\n\t"                                        \
+         "lg 5,32(1)\n\t"                                        \
+         "lg 6,40(1)\n\t"                                        \
+         "mvc 160(8,15), 48(1)\n\t"                              \
+         "mvc 168(8,15), 56(1)\n\t"                              \
+         "mvc 176(8,15), 64(1)\n\t"                              \
+         "mvc 184(8,15), 72(1)\n\t"                              \
+         "mvc 192(8,15), 80(1)\n\t"                              \
+         "mvc 200(8,15), 88(1)\n\t"                              \
+         "mvc 208(8,15), 96(1)\n\t"                              \
+         "lg 1, 0(1)\n\t"                                        \
+         VALGRIND_CALL_NOREDIR_R1                                \
+         "lgr %0, 2\n\t"                                         \
+         "aghi 15,216\n\t"                                       \
+         VALGRIND_CFI_EPILOGUE                                   \
+         : /*out*/   "=d" (_res)                                 \
+         : /*in*/    "a" (&_argvec[0]) __FRAME_POINTER           \
+         : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS,"6","7" \
+      );                                                         \
+      lval = (__typeof__(lval)) _res;                            \
+   } while (0)
+
+
+#endif /* PLAT_s390x_linux */
+
+/* ------------------------- mips32-linux ----------------------- */
+ 
+#if defined(PLAT_mips32_linux)
+
+/* These regs are trashed by the hidden call. */
+#define __CALLER_SAVED_REGS "$2", "$3", "$4", "$5", "$6",       \
+"$7", "$8", "$9", "$10", "$11", "$12", "$13", "$14", "$15", "$24", \
+"$25", "$31"
+
+/* These CALL_FN_ macros assume that on mips-linux, sizeof(unsigned
+   long) == 4. */
+
+#define CALL_FN_W_v(lval, orig)                                   \
+   do {                                                           \
+      volatile OrigFn        _orig = (orig);                      \
+      volatile unsigned long _argvec[1];                          \
+      volatile unsigned long _res;                                \
+      _argvec[0] = (unsigned long)_orig.nraddr;                   \
+      __asm__ volatile(                                           \
+         "subu $29, $29, 8 \n\t"                                  \
+         "sw $28, 0($29) \n\t"                                    \
+         "sw $31, 4($29) \n\t"                                    \
+         "subu $29, $29, 16 \n\t"                                 \
+         "lw $25, 0(%1) \n\t"  /* target->t9 */                   \
+         VALGRIND_CALL_NOREDIR_T9                                 \
+         "addu $29, $29, 16\n\t"                                  \
+         "lw $28, 0($29) \n\t"                                    \
+         "lw $31, 4($29) \n\t"                                    \
+         "addu $29, $29, 8 \n\t"                                  \
+         "move %0, $2\n"                                          \
+         : /*out*/   "=r" (_res)                                  \
+         : /*in*/    "0" (&_argvec[0])                            \
+         : /*trash*/ "memory", __CALLER_SAVED_REGS                \
+      );                                                          \
+      lval = (__typeof__(lval)) _res;                             \
+   } while (0)
+
+#define CALL_FN_W_W(lval, orig, arg1)                             \
+   do {                                                           \
+      volatile OrigFn        _orig = (orig);                      \
+     volatile unsigned long _argvec[2];                           \
+      volatile unsigned long _res;                                \
+      _argvec[0] = (unsigned long)_orig.nraddr;                   \
+      _argvec[1] = (unsigned long)(arg1);                         \
+      __asm__ volatile(                                           \
+         "subu $29, $29, 8 \n\t"                                  \
+         "sw $28, 0($29) \n\t"                                    \
+         "sw $31, 4($29) \n\t"                                    \
+         "subu $29, $29, 16 \n\t"                                 \
+         "lw $4, 4(%1) \n\t"   /* arg1*/                          \
+         "lw $25, 0(%1) \n\t"  /* target->t9 */                   \
+         VALGRIND_CALL_NOREDIR_T9                                 \
+         "addu $29, $29, 16 \n\t"                                 \
+         "lw $28, 0($29) \n\t"                                    \
+         "lw $31, 4($29) \n\t"                                    \
+         "addu $29, $29, 8 \n\t"                                  \
+         "move %0, $2\n"                                          \
+         : /*out*/   "=r" (_res)                                  \
+         : /*in*/    "0" (&_argvec[0])                            \
+         : /*trash*/ "memory",  __CALLER_SAVED_REGS               \
+      );                                                          \
+      lval = (__typeof__(lval)) _res;                             \
+   } while (0)
+
+#define CALL_FN_W_WW(lval, orig, arg1,arg2)                       \
+   do {                                                           \
+      volatile OrigFn        _orig = (orig);                      \
+      volatile unsigned long _argvec[3];                          \
+      volatile unsigned long _res;                                \
+      _argvec[0] = (unsigned long)_orig.nraddr;                   \
+      _argvec[1] = (unsigned long)(arg1);                         \
+      _argvec[2] = (unsigned long)(arg2);                         \
+      __asm__ volatile(                                           \
+         "subu $29, $29, 8 \n\t"                                  \
+         "sw $28, 0($29) \n\t"                                    \
+         "sw $31, 4($29) \n\t"                                    \
+         "subu $29, $29, 16 \n\t"                                 \
+         "lw $4, 4(%1) \n\t"                                      \
+         "lw $5, 8(%1) \n\t"                                      \
+         "lw $25, 0(%1) \n\t"  /* target->t9 */                   \
+         VALGRIND_CALL_NOREDIR_T9                                 \
+         "addu $29, $29, 16 \n\t"                                 \
+         "lw $28, 0($29) \n\t"                                    \
+         "lw $31, 4($29) \n\t"                                    \
+         "addu $29, $29, 8 \n\t"                                  \
+         "move %0, $2\n"                                          \
+         : /*out*/   "=r" (_res)                                  \
+         : /*in*/    "0" (&_argvec[0])                            \
+         : /*trash*/ "memory", __CALLER_SAVED_REGS                \
+      );                                                          \
+      lval = (__typeof__(lval)) _res;                             \
+   } while (0)
+
+#define CALL_FN_W_WWW(lval, orig, arg1,arg2,arg3)                 \
+   do {                                                           \
+      volatile OrigFn        _orig = (orig);                      \
+      volatile unsigned long _argvec[4];                          \
+      volatile unsigned long _res;                                \
+      _argvec[0] = (unsigned long)_orig.nraddr;                   \
+      _argvec[1] = (unsigned long)(arg1);                         \
+      _argvec[2] = (unsigned long)(arg2);                         \
+      _argvec[3] = (unsigned long)(arg3);                         \
+      __asm__ volatile(                                           \
+         "subu $29, $29, 8 \n\t"                                  \
+         "sw $28, 0($29) \n\t"                                    \
+         "sw $31, 4($29) \n\t"                                    \
+         "subu $29, $29, 16 \n\t"                                 \
+         "lw $4, 4(%1) \n\t"                                      \
+         "lw $5, 8(%1) \n\t"                                      \
+         "lw $6, 12(%1) \n\t"                                     \
+         "lw $25, 0(%1) \n\t"  /* target->t9 */                   \
+         VALGRIND_CALL_NOREDIR_T9                                 \
+         "addu $29, $29, 16 \n\t"                                 \
+         "lw $28, 0($29) \n\t"                                    \
+         "lw $31, 4($29) \n\t"                                    \
+         "addu $29, $29, 8 \n\t"                                  \
+         "move %0, $2\n"                                          \
+         : /*out*/   "=r" (_res)                                  \
+         : /*in*/    "0" (&_argvec[0])                            \
+         : /*trash*/ "memory", __CALLER_SAVED_REGS                \
+      );                                                          \
+      lval = (__typeof__(lval)) _res;                             \
+   } while (0)
+
+#define CALL_FN_W_WWWW(lval, orig, arg1,arg2,arg3,arg4)           \
+   do {                                                           \
+      volatile OrigFn        _orig = (orig);                      \
+      volatile unsigned long _argvec[5];                          \
+      volatile unsigned long _res;                                \
+      _argvec[0] = (unsigned long)_orig.nraddr;                   \
+      _argvec[1] = (unsigned long)(arg1);                         \
+      _argvec[2] = (unsigned long)(arg2);                         \
+      _argvec[3] = (unsigned long)(arg3);                         \
+      _argvec[4] = (unsigned long)(arg4);                         \
+      __asm__ volatile(                                           \
+         "subu $29, $29, 8 \n\t"                                  \
+         "sw $28, 0($29) \n\t"                                    \
+         "sw $31, 4($29) \n\t"                                    \
+         "subu $29, $29, 16 \n\t"                                 \
+         "lw $4, 4(%1) \n\t"                                      \
+         "lw $5, 8(%1) \n\t"                                      \
+         "lw $6, 12(%1) \n\t"                                     \
+         "lw $7, 16(%1) \n\t"                                     \
+         "lw $25, 0(%1) \n\t"  /* target->t9 */                   \
+         VALGRIND_CALL_NOREDIR_T9                                 \
+         "addu $29, $29, 16 \n\t"                                 \
+         "lw $28, 0($29) \n\t"                                    \
+         "lw $31, 4($29) \n\t"                                    \
+         "addu $29, $29, 8 \n\t"                                  \
+         "move %0, $2\n"                                          \
+         : /*out*/   "=r" (_res)                                  \
+         : /*in*/    "0" (&_argvec[0])                            \
+         : /*trash*/ "memory", __CALLER_SAVED_REGS                \
+      );                                                          \
+      lval = (__typeof__(lval)) _res;                             \
+   } while (0)
+
+#define CALL_FN_W_5W(lval, orig, arg1,arg2,arg3,arg4,arg5)        \
+   do {                                                           \
+      volatile OrigFn        _orig = (orig);                      \
+      volatile unsigned long _argvec[6];                          \
+      volatile unsigned long _res;                                \
+      _argvec[0] = (unsigned long)_orig.nraddr;                   \
+      _argvec[1] = (unsigned long)(arg1);                         \
+      _argvec[2] = (unsigned long)(arg2);                         \
+      _argvec[3] = (unsigned long)(arg3);                         \
+      _argvec[4] = (unsigned long)(arg4);                         \
+      _argvec[5] = (unsigned long)(arg5);                         \
+      __asm__ volatile(                                           \
+         "subu $29, $29, 8 \n\t"                                  \
+         "sw $28, 0($29) \n\t"                                    \
+         "sw $31, 4($29) \n\t"                                    \
+         "lw $4, 20(%1) \n\t"                                     \
+         "subu $29, $29, 24\n\t"                                  \
+         "sw $4, 16($29) \n\t"                                    \
+         "lw $4, 4(%1) \n\t"                                      \
+         "lw $5, 8(%1) \n\t"                                      \
+         "lw $6, 12(%1) \n\t"                                     \
+         "lw $7, 16(%1) \n\t"                                     \
+         "lw $25, 0(%1) \n\t"  /* target->t9 */                   \
+         VALGRIND_CALL_NOREDIR_T9                                 \
+         "addu $29, $29, 24 \n\t"                                 \
+         "lw $28, 0($29) \n\t"                                    \
+         "lw $31, 4($29) \n\t"                                    \
+         "addu $29, $29, 8 \n\t"                                  \
+         "move %0, $2\n"                                          \
+         : /*out*/   "=r" (_res)                                  \
+         : /*in*/    "0" (&_argvec[0])                            \
+         : /*trash*/ "memory", __CALLER_SAVED_REGS                \
+      );                                                          \
+      lval = (__typeof__(lval)) _res;                             \
+   } while (0)
+#define CALL_FN_W_6W(lval, orig, arg1,arg2,arg3,arg4,arg5,arg6)   \
+   do {                                                           \
+      volatile OrigFn        _orig = (orig);                      \
+      volatile unsigned long _argvec[7];                          \
+      volatile unsigned long _res;                                \
+      _argvec[0] = (unsigned long)_orig.nraddr;                   \
+      _argvec[1] = (unsigned long)(arg1);                         \
+      _argvec[2] = (unsigned long)(arg2);                         \
+      _argvec[3] = (unsigned long)(arg3);                         \
+      _argvec[4] = (unsigned long)(arg4);                         \
+      _argvec[5] = (unsigned long)(arg5);                         \
+      _argvec[6] = (unsigned long)(arg6);                         \
+      __asm__ volatile(                                           \
+         "subu $29, $29, 8 \n\t"                                  \
+         "sw $28, 0($29) \n\t"                                    \
+         "sw $31, 4($29) \n\t"                                    \
+         "lw $4, 20(%1) \n\t"                                     \
+         "subu $29, $29, 32\n\t"                                  \
+         "sw $4, 16($29) \n\t"                                    \
+         "lw $4, 24(%1) \n\t"                                     \
+         "nop\n\t"                                                \
+         "sw $4, 20($29) \n\t"                                    \
+         "lw $4, 4(%1) \n\t"                                      \
+         "lw $5, 8(%1) \n\t"                                      \
+         "lw $6, 12(%1) \n\t"                                     \
+         "lw $7, 16(%1) \n\t"                                     \
+         "lw $25, 0(%1) \n\t"  /* target->t9 */                   \
+         VALGRIND_CALL_NOREDIR_T9                                 \
+         "addu $29, $29, 32 \n\t"                                 \
+         "lw $28, 0($29) \n\t"                                    \
+         "lw $31, 4($29) \n\t"                                    \
+         "addu $29, $29, 8 \n\t"                                  \
+         "move %0, $2\n"                                          \
+         : /*out*/   "=r" (_res)                                  \
+         : /*in*/    "0" (&_argvec[0])                            \
+         : /*trash*/ "memory", __CALLER_SAVED_REGS                \
+      );                                                          \
+      lval = (__typeof__(lval)) _res;                             \
+   } while (0)
+
+#define CALL_FN_W_7W(lval, orig, arg1,arg2,arg3,arg4,arg5,arg6,   \
+                                 arg7)                            \
+   do {                                                           \
+      volatile OrigFn        _orig = (orig);                      \
+      volatile unsigned long _argvec[8];                          \
+      volatile unsigned long _res;                                \
+      _argvec[0] = (unsigned long)_orig.nraddr;                   \
+      _argvec[1] = (unsigned long)(arg1);                         \
+      _argvec[2] = (unsigned long)(arg2);                         \
+      _argvec[3] = (unsigned long)(arg3);                         \
+      _argvec[4] = (unsigned long)(arg4);                         \
+      _argvec[5] = (unsigned long)(arg5);                         \
+      _argvec[6] = (unsigned long)(arg6);                         \
+      _argvec[7] = (unsigned long)(arg7);                         \
+      __asm__ volatile(                                           \
+         "subu $29, $29, 8 \n\t"                                  \
+         "sw $28, 0($29) \n\t"                                    \
+         "sw $31, 4($29) \n\t"                                    \
+         "lw $4, 20(%1) \n\t"                                     \
+         "subu $29, $29, 32\n\t"                                  \
+         "sw $4, 16($29) \n\t"                                    \
+         "lw $4, 24(%1) \n\t"                                     \
+         "sw $4, 20($29) \n\t"                                    \
+         "lw $4, 28(%1) \n\t"                                     \
+         "sw $4, 24($29) \n\t"                                    \
+         "lw $4, 4(%1) \n\t"                                      \
+         "lw $5, 8(%1) \n\t"                                      \
+         "lw $6, 12(%1) \n\t"                                     \
+         "lw $7, 16(%1) \n\t"                                     \
+         "lw $25, 0(%1) \n\t"  /* target->t9 */                   \
+         VALGRIND_CALL_NOREDIR_T9                                 \
+         "addu $29, $29, 32 \n\t"                                 \
+         "lw $28, 0($29) \n\t"                                    \
+         "lw $31, 4($29) \n\t"                                    \
+         "addu $29, $29, 8 \n\t"                                  \
+         "move %0, $2\n"                                          \
+         : /*out*/   "=r" (_res)                                  \
+         : /*in*/    "0" (&_argvec[0])                            \
+         : /*trash*/ "memory", __CALLER_SAVED_REGS                \
+      );                                                          \
+      lval = (__typeof__(lval)) _res;                             \
+   } while (0)
+
+#define CALL_FN_W_8W(lval, orig, arg1,arg2,arg3,arg4,arg5,arg6,   \
+                                 arg7,arg8)                       \
+   do {                                                           \
+      volatile OrigFn        _orig = (orig);                      \
+      volatile unsigned long _argvec[9];                          \
+      volatile unsigned long _res;                                \
+      _argvec[0] = (unsigned long)_orig.nraddr;                   \
+      _argvec[1] = (unsigned long)(arg1);                         \
+      _argvec[2] = (unsigned long)(arg2);                         \
+      _argvec[3] = (unsigned long)(arg3);                         \
+      _argvec[4] = (unsigned long)(arg4);                         \
+      _argvec[5] = (unsigned long)(arg5);                         \
+      _argvec[6] = (unsigned long)(arg6);                         \
+      _argvec[7] = (unsigned long)(arg7);                         \
+      _argvec[8] = (unsigned long)(arg8);                         \
+      __asm__ volatile(                                           \
+         "subu $29, $29, 8 \n\t"                                  \
+         "sw $28, 0($29) \n\t"                                    \
+         "sw $31, 4($29) \n\t"                                    \
+         "lw $4, 20(%1) \n\t"                                     \
+         "subu $29, $29, 40\n\t"                                  \
+         "sw $4, 16($29) \n\t"                                    \
+         "lw $4, 24(%1) \n\t"                                     \
+         "sw $4, 20($29) \n\t"                                    \
+         "lw $4, 28(%1) \n\t"                                     \
+         "sw $4, 24($29) \n\t"                                    \
+         "lw $4, 32(%1) \n\t"                                     \
+         "sw $4, 28($29) \n\t"                                    \
+         "lw $4, 4(%1) \n\t"                                      \
+         "lw $5, 8(%1) \n\t"                                      \
+         "lw $6, 12(%1) \n\t"                                     \
+         "lw $7, 16(%1) \n\t"                                     \
+         "lw $25, 0(%1) \n\t"  /* target->t9 */                   \
+         VALGRIND_CALL_NOREDIR_T9                                 \
+         "addu $29, $29, 40 \n\t"                                 \
+         "lw $28, 0($29) \n\t"                                    \
+         "lw $31, 4($29) \n\t"                                    \
+         "addu $29, $29, 8 \n\t"                                  \
+         "move %0, $2\n"                                          \
+         : /*out*/   "=r" (_res)                                  \
+         : /*in*/    "0" (&_argvec[0])                            \
+         : /*trash*/ "memory", __CALLER_SAVED_REGS                \
+      );                                                          \
+      lval = (__typeof__(lval)) _res;                             \
+   } while (0)
+
+#define CALL_FN_W_9W(lval, orig, arg1,arg2,arg3,arg4,arg5,arg6,   \
+                                 arg7,arg8,arg9)                  \
+   do {                                                           \
+      volatile OrigFn        _orig = (orig);                      \
+      volatile unsigned long _argvec[10];                         \
+      volatile unsigned long _res;                                \
+      _argvec[0] = (unsigned long)_orig.nraddr;                   \
+      _argvec[1] = (unsigned long)(arg1);                         \
+      _argvec[2] = (unsigned long)(arg2);                         \
+      _argvec[3] = (unsigned long)(arg3);                         \
+      _argvec[4] = (unsigned long)(arg4);                         \
+      _argvec[5] = (unsigned long)(arg5);                         \
+      _argvec[6] = (unsigned long)(arg6);                         \
+      _argvec[7] = (unsigned long)(arg7);                         \
+      _argvec[8] = (unsigned long)(arg8);                         \
+      _argvec[9] = (unsigned long)(arg9);                         \
+      __asm__ volatile(                                           \
+         "subu $29, $29, 8 \n\t"                                  \
+         "sw $28, 0($29) \n\t"                                    \
+         "sw $31, 4($29) \n\t"                                    \
+         "lw $4, 20(%1) \n\t"                                     \
+         "subu $29, $29, 40\n\t"                                  \
+         "sw $4, 16($29) \n\t"                                    \
+         "lw $4, 24(%1) \n\t"                                     \
+         "sw $4, 20($29) \n\t"                                    \
+         "lw $4, 28(%1) \n\t"                                     \
+         "sw $4, 24($29) \n\t"                                    \
+         "lw $4, 32(%1) \n\t"                                     \
+         "sw $4, 28($29) \n\t"                                    \
+         "lw $4, 36(%1) \n\t"                                     \
+         "sw $4, 32($29) \n\t"                                    \
+         "lw $4, 4(%1) \n\t"                                      \
+         "lw $5, 8(%1) \n\t"                                      \
+         "lw $6, 12(%1) \n\t"                                     \
+         "lw $7, 16(%1) \n\t"                                     \
+         "lw $25, 0(%1) \n\t"  /* target->t9 */                   \
+         VALGRIND_CALL_NOREDIR_T9                                 \
+         "addu $29, $29, 40 \n\t"                                 \
+         "lw $28, 0($29) \n\t"                                    \
+         "lw $31, 4($29) \n\t"                                    \
+         "addu $29, $29, 8 \n\t"                                  \
+         "move %0, $2\n"                                          \
+         : /*out*/   "=r" (_res)                                  \
+         : /*in*/    "0" (&_argvec[0])                            \
+         : /*trash*/ "memory", __CALLER_SAVED_REGS                \
+      );                                                          \
+      lval = (__typeof__(lval)) _res;                             \
+   } while (0)
+
+#define CALL_FN_W_10W(lval, orig, arg1,arg2,arg3,arg4,arg5,arg6,  \
+                                  arg7,arg8,arg9,arg10)           \
+   do {                                                           \
+      volatile OrigFn        _orig = (orig);                      \
+      volatile unsigned long _argvec[11];                         \
+      volatile unsigned long _res;                                \
+      _argvec[0] = (unsigned long)_orig.nraddr;                   \
+      _argvec[1] = (unsigned long)(arg1);                         \
+      _argvec[2] = (unsigned long)(arg2);                         \
+      _argvec[3] = (unsigned long)(arg3);                         \
+      _argvec[4] = (unsigned long)(arg4);                         \
+      _argvec[5] = (unsigned long)(arg5);                         \
+      _argvec[6] = (unsigned long)(arg6);                         \
+      _argvec[7] = (unsigned long)(arg7);                         \
+      _argvec[8] = (unsigned long)(arg8);                         \
+      _argvec[9] = (unsigned long)(arg9);                         \
+      _argvec[10] = (unsigned long)(arg10);                       \
+      __asm__ volatile(                                           \
+         "subu $29, $29, 8 \n\t"                                  \
+         "sw $28, 0($29) \n\t"                                    \
+         "sw $31, 4($29) \n\t"                                    \
+         "lw $4, 20(%1) \n\t"                                     \
+         "subu $29, $29, 48\n\t"                                  \
+         "sw $4, 16($29) \n\t"                                    \
+         "lw $4, 24(%1) \n\t"                                     \
+         "sw $4, 20($29) \n\t"                                    \
+         "lw $4, 28(%1) \n\t"                                     \
+         "sw $4, 24($29) \n\t"                                    \
+         "lw $4, 32(%1) \n\t"                                     \
+         "sw $4, 28($29) \n\t"                                    \
+         "lw $4, 36(%1) \n\t"                                     \
+         "sw $4, 32($29) \n\t"                                    \
+         "lw $4, 40(%1) \n\t"                                     \
+         "sw $4, 36($29) \n\t"                                    \
+         "lw $4, 4(%1) \n\t"                                      \
+         "lw $5, 8(%1) \n\t"                                      \
+         "lw $6, 12(%1) \n\t"                                     \
+         "lw $7, 16(%1) \n\t"                                     \
+         "lw $25, 0(%1) \n\t"  /* target->t9 */                   \
+         VALGRIND_CALL_NOREDIR_T9                                 \
+         "addu $29, $29, 48 \n\t"                                 \
+         "lw $28, 0($29) \n\t"                                    \
+         "lw $31, 4($29) \n\t"                                    \
+         "addu $29, $29, 8 \n\t"                                  \
+         "move %0, $2\n"                                          \
+         : /*out*/   "=r" (_res)                                  \
+         : /*in*/    "0" (&_argvec[0])                            \
+         : /*trash*/ "memory", __CALLER_SAVED_REGS                \
+      );                                                          \
+      lval = (__typeof__(lval)) _res;                             \
+   } while (0)
+
+#define CALL_FN_W_11W(lval, orig, arg1,arg2,arg3,arg4,arg5,       \
+                                  arg6,arg7,arg8,arg9,arg10,      \
+                                  arg11)                          \
+   do {                                                           \
+      volatile OrigFn        _orig = (orig);                      \
+      volatile unsigned long _argvec[12];                         \
+      volatile unsigned long _res;                                \
+      _argvec[0] = (unsigned long)_orig.nraddr;                   \
+      _argvec[1] = (unsigned long)(arg1);                         \
+      _argvec[2] = (unsigned long)(arg2);                         \
+      _argvec[3] = (unsigned long)(arg3);                         \
+      _argvec[4] = (unsigned long)(arg4);                         \
+      _argvec[5] = (unsigned long)(arg5);                         \
+      _argvec[6] = (unsigned long)(arg6);                         \
+      _argvec[7] = (unsigned long)(arg7);                         \
+      _argvec[8] = (unsigned long)(arg8);                         \
+      _argvec[9] = (unsigned long)(arg9);                         \
+      _argvec[10] = (unsigned long)(arg10);                       \
+      _argvec[11] = (unsigned long)(arg11);                       \
+      __asm__ volatile(                                           \
+         "subu $29, $29, 8 \n\t"                                  \
+         "sw $28, 0($29) \n\t"                                    \
+         "sw $31, 4($29) \n\t"                                    \
+         "lw $4, 20(%1) \n\t"                                     \
+         "subu $29, $29, 48\n\t"                                  \
+         "sw $4, 16($29) \n\t"                                    \
+         "lw $4, 24(%1) \n\t"                                     \
+         "sw $4, 20($29) \n\t"                                    \
+         "lw $4, 28(%1) \n\t"                                     \
+         "sw $4, 24($29) \n\t"                                    \
+         "lw $4, 32(%1) \n\t"                                     \
+         "sw $4, 28($29) \n\t"                                    \
+         "lw $4, 36(%1) \n\t"                                     \
+         "sw $4, 32($29) \n\t"                                    \
+         "lw $4, 40(%1) \n\t"                                     \
+         "sw $4, 36($29) \n\t"                                    \
+         "lw $4, 44(%1) \n\t"                                     \
+         "sw $4, 40($29) \n\t"                                    \
+         "lw $4, 4(%1) \n\t"                                      \
+         "lw $5, 8(%1) \n\t"                                      \
+         "lw $6, 12(%1) \n\t"                                     \
+         "lw $7, 16(%1) \n\t"                                     \
+         "lw $25, 0(%1) \n\t"  /* target->t9 */                   \
+         VALGRIND_CALL_NOREDIR_T9                                 \
+         "addu $29, $29, 48 \n\t"                                 \
+         "lw $28, 0($29) \n\t"                                    \
+         "lw $31, 4($29) \n\t"                                    \
+         "addu $29, $29, 8 \n\t"                                  \
+         "move %0, $2\n"                                          \
+         : /*out*/   "=r" (_res)                                  \
+         : /*in*/    "0" (&_argvec[0])                            \
+         : /*trash*/ "memory", __CALLER_SAVED_REGS                \
+      );                                                          \
+      lval = (__typeof__(lval)) _res;                             \
+   } while (0)
+
+#define CALL_FN_W_12W(lval, orig, arg1,arg2,arg3,arg4,arg5,       \
+                                  arg6,arg7,arg8,arg9,arg10,      \
+                                  arg11,arg12)                    \
+   do {                                                           \
+      volatile OrigFn        _orig = (orig);                      \
+      volatile unsigned long _argvec[13];                         \
+      volatile unsigned long _res;                                \
+      _argvec[0] = (unsigned long)_orig.nraddr;                   \
+      _argvec[1] = (unsigned long)(arg1);                         \
+      _argvec[2] = (unsigned long)(arg2);                         \
+      _argvec[3] = (unsigned long)(arg3);                         \
+      _argvec[4] = (unsigned long)(arg4);                         \
+      _argvec[5] = (unsigned long)(arg5);                         \
+      _argvec[6] = (unsigned long)(arg6);                         \
+      _argvec[7] = (unsigned long)(arg7);                         \
+      _argvec[8] = (unsigned long)(arg8);                         \
+      _argvec[9] = (unsigned long)(arg9);                         \
+      _argvec[10] = (unsigned long)(arg10);                       \
+      _argvec[11] = (unsigned long)(arg11);                       \
+      _argvec[12] = (unsigned long)(arg12);                       \
+      __asm__ volatile(                                           \
+         "subu $29, $29, 8 \n\t"                                  \
+         "sw $28, 0($29) \n\t"                                    \
+         "sw $31, 4($29) \n\t"                                    \
+         "lw $4, 20(%1) \n\t"                                     \
+         "subu $29, $29, 56\n\t"                                  \
+         "sw $4, 16($29) \n\t"                                    \
+         "lw $4, 24(%1) \n\t"                                     \
+         "sw $4, 20($29) \n\t"                                    \
+         "lw $4, 28(%1) \n\t"                                     \
+         "sw $4, 24($29) \n\t"                                    \
+         "lw $4, 32(%1) \n\t"                                     \
+         "sw $4, 28($29) \n\t"                                    \
+         "lw $4, 36(%1) \n\t"                                     \
+         "sw $4, 32($29) \n\t"                                    \
+         "lw $4, 40(%1) \n\t"                                     \
+         "sw $4, 36($29) \n\t"                                    \
+         "lw $4, 44(%1) \n\t"                                     \
+         "sw $4, 40($29) \n\t"                                    \
+         "lw $4, 48(%1) \n\t"                                     \
+         "sw $4, 44($29) \n\t"                                    \
+         "lw $4, 4(%1) \n\t"                                      \
+         "lw $5, 8(%1) \n\t"                                      \
+         "lw $6, 12(%1) \n\t"                                     \
+         "lw $7, 16(%1) \n\t"                                     \
+         "lw $25, 0(%1) \n\t"  /* target->t9 */                   \
+         VALGRIND_CALL_NOREDIR_T9                                 \
+         "addu $29, $29, 56 \n\t"                                 \
+         "lw $28, 0($29) \n\t"                                    \
+         "lw $31, 4($29) \n\t"                                    \
+         "addu $29, $29, 8 \n\t"                                  \
+         "move %0, $2\n"                                          \
+         : /*out*/   "=r" (_res)                                  \
+         : /*in*/    "r" (&_argvec[0])                            \
+         : /*trash*/ "memory", __CALLER_SAVED_REGS                \
+      );                                                          \
+      lval = (__typeof__(lval)) _res;                             \
+   } while (0)
+
+#endif /* PLAT_mips32_linux */
+
+/* ------------------------- mips64-linux ------------------------- */
+
+#if defined(PLAT_mips64_linux)
+
+/* These regs are trashed by the hidden call. */
+#define __CALLER_SAVED_REGS "$2", "$3", "$4", "$5", "$6",       \
+"$7", "$8", "$9", "$10", "$11", "$12", "$13", "$14", "$15", "$24", \
+"$25", "$31"
+
+/* These CALL_FN_ macros assume that on mips-linux, sizeof(unsigned
+   long) == 4. */
+
+#define CALL_FN_W_v(lval, orig)                                   \
+   do {                                                           \
+      volatile OrigFn        _orig = (orig);                      \
+      volatile unsigned long _argvec[1];                          \
+      volatile unsigned long _res;                                \
+      _argvec[0] = (unsigned long)_orig.nraddr;                   \
+      __asm__ volatile(                                           \
+         "ld $25, 0(%1)\n\t"  /* target->t9 */                    \
+         VALGRIND_CALL_NOREDIR_T9                                 \
+         "move %0, $2\n"                                          \
+         : /*out*/   "=r" (_res)                                  \
+         : /*in*/    "0" (&_argvec[0])                            \
+         : /*trash*/ "memory", __CALLER_SAVED_REGS                \
+      );                                                          \
+      lval = (__typeof__(lval)) _res;                             \
+   } while (0)
+
+#define CALL_FN_W_W(lval, orig, arg1)                             \
+   do {                                                           \
+      volatile OrigFn        _orig = (orig);                      \
+      volatile unsigned long _argvec[2];                          \
+      volatile unsigned long _res;                                \
+      _argvec[0] = (unsigned long)_orig.nraddr;                   \
+      _argvec[1] = (unsigned long)(arg1);                         \
+      __asm__ volatile(                                           \
+         "ld $4, 8(%1)\n\t"   /* arg1*/                           \
+         "ld $25, 0(%1)\n\t"  /* target->t9 */                    \
+         VALGRIND_CALL_NOREDIR_T9                                 \
+         "move %0, $2\n"                                          \
+         : /*out*/   "=r" (_res)                                  \
+         : /*in*/    "r" (&_argvec[0])                            \
+         : /*trash*/ "memory", __CALLER_SAVED_REGS                \
+      );                                                          \
+      lval = (__typeof__(lval)) _res;                             \
+   } while (0)
+
+#define CALL_FN_W_WW(lval, orig, arg1,arg2)                       \
+   do {                                                           \
+      volatile OrigFn        _orig = (orig);                      \
+      volatile unsigned long _argvec[3];                          \
+      volatile unsigned long _res;                                \
+      _argvec[0] = (unsigned long)_orig.nraddr;                   \
+      _argvec[1] = (unsigned long)(arg1);                         \
+      _argvec[2] = (unsigned long)(arg2);                         \
+      __asm__ volatile(                                           \
+         "ld $4, 8(%1)\n\t"                                       \
+         "ld $5, 16(%1)\n\t"                                      \
+         "ld $25, 0(%1)\n\t"  /* target->t9 */                    \
+         VALGRIND_CALL_NOREDIR_T9                                 \
+         "move %0, $2\n"                                          \
+         : /*out*/   "=r" (_res)                                  \
+         : /*in*/    "r" (&_argvec[0])                            \
+         : /*trash*/ "memory", __CALLER_SAVED_REGS                \
+      );                                                          \
+      lval = (__typeof__(lval)) _res;                             \
+   } while (0)
+
+#define CALL_FN_W_WWW(lval, orig, arg1,arg2,arg3)                 \
+   do {                                                           \
+      volatile OrigFn        _orig = (orig);                      \
+      volatile unsigned long _argvec[4];                          \
+      volatile unsigned long _res;                                \
+      _argvec[0] = (unsigned long)_orig.nraddr;                   \
+      _argvec[1] = (unsigned long)(arg1);                         \
+      _argvec[2] = (unsigned long)(arg2);                         \
+      _argvec[3] = (unsigned long)(arg3);                         \
+      __asm__ volatile(                                           \
+         "ld $4, 8(%1)\n\t"                                       \
+         "ld $5, 16(%1)\n\t"                                      \
+         "ld $6, 24(%1)\n\t"                                      \
+         "ld $25, 0(%1)\n\t"  /* target->t9 */                    \
+         VALGRIND_CALL_NOREDIR_T9                                 \
+         "move %0, $2\n"                                          \
+         : /*out*/   "=r" (_res)                                  \
+         : /*in*/    "r" (&_argvec[0])                            \
+         : /*trash*/ "memory", __CALLER_SAVED_REGS                \
+      );                                                          \
+      lval = (__typeof__(lval)) _res;                             \
+   } while (0)
+
+#define CALL_FN_W_WWWW(lval, orig, arg1,arg2,arg3,arg4)           \
+   do {                                                           \
+      volatile OrigFn        _orig = (orig);                      \
+      volatile unsigned long _argvec[5];                          \
+      volatile unsigned long _res;                                \
+      _argvec[0] = (unsigned long)_orig.nraddr;                   \
+      _argvec[1] = (unsigned long)(arg1);                         \
+      _argvec[2] = (unsigned long)(arg2);                         \
+      _argvec[3] = (unsigned long)(arg3);                         \
+      _argvec[4] = (unsigned long)(arg4);                         \
+      __asm__ volatile(                                           \
+         "ld $4, 8(%1)\n\t"                                       \
+         "ld $5, 16(%1)\n\t"                                      \
+         "ld $6, 24(%1)\n\t"                                      \
+         "ld $7, 32(%1)\n\t"                                      \
+         "ld $25, 0(%1)\n\t"  /* target->t9 */                    \
+         VALGRIND_CALL_NOREDIR_T9                                 \
+         "move %0, $2\n"                                          \
+         : /*out*/   "=r" (_res)                                  \
+         : /*in*/    "r" (&_argvec[0])                            \
+         : /*trash*/ "memory", __CALLER_SAVED_REGS                \
+      );                                                          \
+      lval = (__typeof__(lval)) _res;                             \
+   } while (0)
+
+#define CALL_FN_W_5W(lval, orig, arg1,arg2,arg3,arg4,arg5)        \
+   do {                                                           \
+      volatile OrigFn        _orig = (orig);                      \
+      volatile unsigned long _argvec[6];                          \
+      volatile unsigned long _res;                                \
+      _argvec[0] = (unsigned long)_orig.nraddr;                   \
+      _argvec[1] = (unsigned long)(arg1);                         \
+      _argvec[2] = (unsigned long)(arg2);                         \
+      _argvec[3] = (unsigned long)(arg3);                         \
+      _argvec[4] = (unsigned long)(arg4);                         \
+      _argvec[5] = (unsigned long)(arg5);                         \
+      __asm__ volatile(                                           \
+         "ld $4, 8(%1)\n\t"                                       \
+         "ld $5, 16(%1)\n\t"                                      \
+         "ld $6, 24(%1)\n\t"                                      \
+         "ld $7, 32(%1)\n\t"                                      \
+         "ld $8, 40(%1)\n\t"                                      \
+         "ld $25, 0(%1)\n\t"  /* target->t9 */                    \
+         VALGRIND_CALL_NOREDIR_T9                                 \
+         "move %0, $2\n"                                          \
+         : /*out*/   "=r" (_res)                                  \
+         : /*in*/    "r" (&_argvec[0])                            \
+         : /*trash*/ "memory", __CALLER_SAVED_REGS                \
+      );                                                          \
+      lval = (__typeof__(lval)) _res;                             \
+   } while (0)
+
+#define CALL_FN_W_6W(lval, orig, arg1,arg2,arg3,arg4,arg5,arg6)   \
+   do {                                                           \
+      volatile OrigFn        _orig = (orig);                      \
+      volatile unsigned long _argvec[7];                          \
+      volatile unsigned long _res;                                \
+      _argvec[0] = (unsigned long)_orig.nraddr;                   \
+      _argvec[1] = (unsigned long)(arg1);                         \
+      _argvec[2] = (unsigned long)(arg2);                         \
+      _argvec[3] = (unsigned long)(arg3);                         \
+      _argvec[4] = (unsigned long)(arg4);                         \
+      _argvec[5] = (unsigned long)(arg5);                         \
+      _argvec[6] = (unsigned long)(arg6);                         \
+      __asm__ volatile(                                           \
+         "ld $4, 8(%1)\n\t"                                       \
+         "ld $5, 16(%1)\n\t"                                      \
+         "ld $6, 24(%1)\n\t"                                      \
+         "ld $7, 32(%1)\n\t"                                      \
+         "ld $8, 40(%1)\n\t"                                      \
+         "ld $9, 48(%1)\n\t"                                      \
+         "ld $25, 0(%1)\n\t"  /* target->t9 */                    \
+         VALGRIND_CALL_NOREDIR_T9                                 \
+         "move %0, $2\n"                                          \
+         : /*out*/   "=r" (_res)                                  \
+         : /*in*/    "r" (&_argvec[0])                            \
+         : /*trash*/ "memory", __CALLER_SAVED_REGS                \
+      );                                                          \
+      lval = (__typeof__(lval)) _res;                             \
+   } while (0)
+
+#define CALL_FN_W_7W(lval, orig, arg1,arg2,arg3,arg4,arg5,arg6,   \
+                                 arg7)                            \
+   do {                                                           \
+      volatile OrigFn        _orig = (orig);                      \
+      volatile unsigned long _argvec[8];                          \
+      volatile unsigned long _res;                                \
+      _argvec[0] = (unsigned long)_orig.nraddr;                   \
+      _argvec[1] = (unsigned long)(arg1);                         \
+      _argvec[2] = (unsigned long)(arg2);                         \
+      _argvec[3] = (unsigned long)(arg3);                         \
+      _argvec[4] = (unsigned long)(arg4);                         \
+      _argvec[5] = (unsigned long)(arg5);                         \
+      _argvec[6] = (unsigned long)(arg6);                         \
+      _argvec[7] = (unsigned long)(arg7);                         \
+      __asm__ volatile(                                           \
+         "ld $4, 8(%1)\n\t"                                       \
+         "ld $5, 16(%1)\n\t"                                      \
+         "ld $6, 24(%1)\n\t"                                      \
+         "ld $7, 32(%1)\n\t"                                      \
+         "ld $8, 40(%1)\n\t"                                      \
+         "ld $9, 48(%1)\n\t"                                      \
+         "ld $10, 56(%1)\n\t"                                     \
+         "ld $25, 0(%1) \n\t"  /* target->t9 */                   \
+         VALGRIND_CALL_NOREDIR_T9                                 \
+         "move %0, $2\n"                                          \
+         : /*out*/   "=r" (_res)                                  \
+         : /*in*/    "r" (&_argvec[0])                            \
+         : /*trash*/ "memory", __CALLER_SAVED_REGS                \
+      );                                                          \
+      lval = (__typeof__(lval)) _res;                             \
+   } while (0)
+
+#define CALL_FN_W_8W(lval, orig, arg1,arg2,arg3,arg4,arg5,arg6,   \
+                                 arg7,arg8)                       \
+   do {                                                           \
+      volatile OrigFn        _orig = (orig);                      \
+      volatile unsigned long _argvec[9];                          \
+      volatile unsigned long _res;                                \
+      _argvec[0] = (unsigned long)_orig.nraddr;                   \
+      _argvec[1] = (unsigned long)(arg1);                         \
+      _argvec[2] = (unsigned long)(arg2);                         \
+      _argvec[3] = (unsigned long)(arg3);                         \
+      _argvec[4] = (unsigned long)(arg4);                         \
+      _argvec[5] = (unsigned long)(arg5);                         \
+      _argvec[6] = (unsigned long)(arg6);                         \
+      _argvec[7] = (unsigned long)(arg7);                         \
+      _argvec[8] = (unsigned long)(arg8);                         \
+      __asm__ volatile(                                           \
+         "ld $4, 8(%1)\n\t"                                       \
+         "ld $5, 16(%1)\n\t"                                      \
+         "ld $6, 24(%1)\n\t"                                      \
+         "ld $7, 32(%1)\n\t"                                      \
+         "ld $8, 40(%1)\n\t"                                      \
+         "ld $9, 48(%1)\n\t"                                      \
+         "ld $10, 56(%1)\n\t"                                     \
+         "ld $11, 64(%1)\n\t"                                     \
+         "ld $25, 0(%1) \n\t"  /* target->t9 */                   \
+         VALGRIND_CALL_NOREDIR_T9                                 \
+         "move %0, $2\n"                                          \
+         : /*out*/   "=r" (_res)                                  \
+         : /*in*/    "r" (&_argvec[0])                            \
+         : /*trash*/ "memory", __CALLER_SAVED_REGS                \
+      );                                                          \
+      lval = (__typeof__(lval)) _res;                             \
+   } while (0)
+
+#define CALL_FN_W_9W(lval, orig, arg1,arg2,arg3,arg4,arg5,arg6,   \
+                                 arg7,arg8,arg9)                  \
+   do {                                                           \
+      volatile OrigFn        _orig = (orig);                      \
+      volatile unsigned long _argvec[10];                         \
+      volatile unsigned long _res;                                \
+      _argvec[0] = (unsigned long)_orig.nraddr;                   \
+      _argvec[1] = (unsigned long)(arg1);                         \
+      _argvec[2] = (unsigned long)(arg2);                         \
+      _argvec[3] = (unsigned long)(arg3);                         \
+      _argvec[4] = (unsigned long)(arg4);                         \
+      _argvec[5] = (unsigned long)(arg5);                         \
+      _argvec[6] = (unsigned long)(arg6);                         \
+      _argvec[7] = (unsigned long)(arg7);                         \
+      _argvec[8] = (unsigned long)(arg8);                         \
+      _argvec[9] = (unsigned long)(arg9);                         \
+      __asm__ volatile(                                           \
+         "dsubu $29, $29, 8\n\t"                                  \
+         "ld $4, 72(%1)\n\t"                                      \
+         "sd $4, 0($29)\n\t"                                      \
+         "ld $4, 8(%1)\n\t"                                       \
+         "ld $5, 16(%1)\n\t"                                      \
+         "ld $6, 24(%1)\n\t"                                      \
+         "ld $7, 32(%1)\n\t"                                      \
+         "ld $8, 40(%1)\n\t"                                      \
+         "ld $9, 48(%1)\n\t"                                      \
+         "ld $10, 56(%1)\n\t"                                     \
+         "ld $11, 64(%1)\n\t"                                     \
+         "ld $25, 0(%1)\n\t"  /* target->t9 */                    \
+         VALGRIND_CALL_NOREDIR_T9                                 \
+         "daddu $29, $29, 8\n\t"                                  \
+         "move %0, $2\n"                                          \
+         : /*out*/   "=r" (_res)                                  \
+         : /*in*/    "r" (&_argvec[0])                            \
+         : /*trash*/ "memory", __CALLER_SAVED_REGS                \
+      );                                                          \
+      lval = (__typeof__(lval)) _res;                             \
+   } while (0)
+
+#define CALL_FN_W_10W(lval, orig, arg1,arg2,arg3,arg4,arg5,arg6,  \
+                                  arg7,arg8,arg9,arg10)           \
+   do {                                                           \
+      volatile OrigFn        _orig = (orig);                      \
+      volatile unsigned long _argvec[11];                         \
+      volatile unsigned long _res;                                \
+      _argvec[0] = (unsigned long)_orig.nraddr;                   \
+      _argvec[1] = (unsigned long)(arg1);                         \
+      _argvec[2] = (unsigned long)(arg2);                         \
+      _argvec[3] = (unsigned long)(arg3);                         \
+      _argvec[4] = (unsigned long)(arg4);                         \
+      _argvec[5] = (unsigned long)(arg5);                         \
+      _argvec[6] = (unsigned long)(arg6);                         \
+      _argvec[7] = (unsigned long)(arg7);                         \
+      _argvec[8] = (unsigned long)(arg8);                         \
+      _argvec[9] = (unsigned long)(arg9);                         \
+      _argvec[10] = (unsigned long)(arg10);                       \
+      __asm__ volatile(                                           \
+         "dsubu $29, $29, 16\n\t"                                 \
+         "ld $4, 72(%1)\n\t"                                      \
+         "sd $4, 0($29)\n\t"                                      \
+         "ld $4, 80(%1)\n\t"                                      \
+         "sd $4, 8($29)\n\t"                                      \
+         "ld $4, 8(%1)\n\t"                                       \
+         "ld $5, 16(%1)\n\t"                                      \
+         "ld $6, 24(%1)\n\t"                                      \
+         "ld $7, 32(%1)\n\t"                                      \
+         "ld $8, 40(%1)\n\t"                                      \
+         "ld $9, 48(%1)\n\t"                                      \
+         "ld $10, 56(%1)\n\t"                                     \
+         "ld $11, 64(%1)\n\t"                                     \
+         "ld $25, 0(%1)\n\t"  /* target->t9 */                    \
+         VALGRIND_CALL_NOREDIR_T9                                 \
+         "daddu $29, $29, 16\n\t"                                 \
+         "move %0, $2\n"                                          \
+         : /*out*/   "=r" (_res)                                  \
+         : /*in*/    "r" (&_argvec[0])                            \
+         : /*trash*/ "memory", __CALLER_SAVED_REGS                \
+      );                                                          \
+      lval = (__typeof__(lval)) _res;                             \
+   } while (0)
+
+#define CALL_FN_W_11W(lval, orig, arg1,arg2,arg3,arg4,arg5,       \
+                                  arg6,arg7,arg8,arg9,arg10,      \
+                                  arg11)                          \
+   do {                                                           \
+      volatile OrigFn        _orig = (orig);                      \
+      volatile unsigned long _argvec[12];                         \
+      volatile unsigned long _res;                                \
+      _argvec[0] = (unsigned long)_orig.nraddr;                   \
+      _argvec[1] = (unsigned long)(arg1);                         \
+      _argvec[2] = (unsigned long)(arg2);                         \
+      _argvec[3] = (unsigned long)(arg3);                         \
+      _argvec[4] = (unsigned long)(arg4);                         \
+      _argvec[5] = (unsigned long)(arg5);                         \
+      _argvec[6] = (unsigned long)(arg6);                         \
+      _argvec[7] = (unsigned long)(arg7);                         \
+      _argvec[8] = (unsigned long)(arg8);                         \
+      _argvec[9] = (unsigned long)(arg9);                         \
+      _argvec[10] = (unsigned long)(arg10);                       \
+      _argvec[11] = (unsigned long)(arg11);                       \
+      __asm__ volatile(                                           \
+         "dsubu $29, $29, 24\n\t"                                 \
+         "ld $4, 72(%1)\n\t"                                      \
+         "sd $4, 0($29)\n\t"                                      \
+         "ld $4, 80(%1)\n\t"                                      \
+         "sd $4, 8($29)\n\t"                                      \
+         "ld $4, 88(%1)\n\t"                                      \
+         "sd $4, 16($29)\n\t"                                     \
+         "ld $4, 8(%1)\n\t"                                       \
+         "ld $5, 16(%1)\n\t"                                      \
+         "ld $6, 24(%1)\n\t"                                      \
+         "ld $7, 32(%1)\n\t"                                      \
+         "ld $8, 40(%1)\n\t"                                      \
+         "ld $9, 48(%1)\n\t"                                      \
+         "ld $10, 56(%1)\n\t"                                     \
+         "ld $11, 64(%1)\n\t"                                     \
+         "ld $25, 0(%1)\n\t"  /* target->t9 */                    \
+         VALGRIND_CALL_NOREDIR_T9                                 \
+         "daddu $29, $29, 24\n\t"                                 \
+         "move %0, $2\n"                                          \
+         : /*out*/   "=r" (_res)                                  \
+         : /*in*/    "r" (&_argvec[0])                            \
+         : /*trash*/ "memory", __CALLER_SAVED_REGS                \
+      );                                                          \
+      lval = (__typeof__(lval)) _res;                             \
+   } while (0)
+
+#define CALL_FN_W_12W(lval, orig, arg1,arg2,arg3,arg4,arg5,       \
+                                  arg6,arg7,arg8,arg9,arg10,      \
+                                  arg11,arg12)                    \
+   do {                                                           \
+      volatile OrigFn        _orig = (orig);                      \
+      volatile unsigned long _argvec[13];                         \
+      volatile unsigned long _res;                                \
+      _argvec[0] = (unsigned long)_orig.nraddr;                   \
+      _argvec[1] = (unsigned long)(arg1);                         \
+      _argvec[2] = (unsigned long)(arg2);                         \
+      _argvec[3] = (unsigned long)(arg3);                         \
+      _argvec[4] = (unsigned long)(arg4);                         \
+      _argvec[5] = (unsigned long)(arg5);                         \
+      _argvec[6] = (unsigned long)(arg6);                         \
+      _argvec[7] = (unsigned long)(arg7);                         \
+      _argvec[8] = (unsigned long)(arg8);                         \
+      _argvec[9] = (unsigned long)(arg9);                         \
+      _argvec[10] = (unsigned long)(arg10);                       \
+      _argvec[11] = (unsigned long)(arg11);                       \
+      _argvec[12] = (unsigned long)(arg12);                       \
+      __asm__ volatile(                                           \
+         "dsubu $29, $29, 32\n\t"                                 \
+         "ld $4, 72(%1)\n\t"                                      \
+         "sd $4, 0($29)\n\t"                                      \
+         "ld $4, 80(%1)\n\t"                                      \
+         "sd $4, 8($29)\n\t"                                      \
+         "ld $4, 88(%1)\n\t"                                      \
+         "sd $4, 16($29)\n\t"                                     \
+         "ld $4, 96(%1)\n\t"                                      \
+         "sd $4, 24($29)\n\t"                                     \
+         "ld $4, 8(%1)\n\t"                                       \
+         "ld $5, 16(%1)\n\t"                                      \
+         "ld $6, 24(%1)\n\t"                                      \
+         "ld $7, 32(%1)\n\t"                                      \
+         "ld $8, 40(%1)\n\t"                                      \
+         "ld $9, 48(%1)\n\t"                                      \
+         "ld $10, 56(%1)\n\t"                                     \
+         "ld $11, 64(%1)\n\t"                                     \
+         "ld $25, 0(%1)\n\t"  /* target->t9 */                    \
+         VALGRIND_CALL_NOREDIR_T9                                 \
+         "daddu $29, $29, 32\n\t"                                 \
+         "move %0, $2\n"                                          \
+         : /*out*/   "=r" (_res)                                  \
+         : /*in*/    "r" (&_argvec[0])                            \
+         : /*trash*/ "memory", __CALLER_SAVED_REGS                \
+      );                                                          \
+      lval = (__typeof__(lval)) _res;                             \
+   } while (0)
+
+#endif /* PLAT_mips64_linux */
+
+
+/* ------------------------------------------------------------------ */
+/* ARCHITECTURE INDEPENDENT MACROS for CLIENT REQUESTS.               */
+/*                                                                    */
+/* ------------------------------------------------------------------ */
+
+/* Some request codes.  There are many more of these, but most are not
+   exposed to end-user view.  These are the public ones, all of the
+   form 0x1000 + small_number.
+
+   Core ones are in the range 0x00000000--0x0000ffff.  The non-public
+   ones start at 0x2000.
+*/
+
+/* These macros are used by tools -- they must be public, but don't
+   embed them into other programs. */
+#define VG_USERREQ_TOOL_BASE(a,b) \
+   ((unsigned int)(((a)&0xff) << 24 | ((b)&0xff) << 16))
+#define VG_IS_TOOL_USERREQ(a, b, v) \
+   (VG_USERREQ_TOOL_BASE(a,b) == ((v) & 0xffff0000))
+
+/* !! ABIWARNING !! ABIWARNING !! ABIWARNING !! ABIWARNING !! 
+   This enum comprises an ABI exported by Valgrind to programs
+   which use client requests.  DO NOT CHANGE THE ORDER OF THESE
+   ENTRIES, NOR DELETE ANY -- add new ones at the end. */
+typedef
+   enum { VG_USERREQ__RUNNING_ON_VALGRIND  = 0x1001,
+          VG_USERREQ__DISCARD_TRANSLATIONS = 0x1002,
+
+          /* These allow any function to be called from the simulated
+             CPU but run on the real CPU.  Nb: the first arg passed to
+             the function is always the ThreadId of the running
+             thread!  So CLIENT_CALL0 actually requires a 1 arg
+             function, etc. */
+          VG_USERREQ__CLIENT_CALL0 = 0x1101,
+          VG_USERREQ__CLIENT_CALL1 = 0x1102,
+          VG_USERREQ__CLIENT_CALL2 = 0x1103,
+          VG_USERREQ__CLIENT_CALL3 = 0x1104,
+
+          /* Can be useful in regression testing suites -- eg. can
+             send Valgrind's output to /dev/null and still count
+             errors. */
+          VG_USERREQ__COUNT_ERRORS = 0x1201,
+
+          /* Allows the client program and/or gdbserver to execute a monitor
+             command. */
+          VG_USERREQ__GDB_MONITOR_COMMAND = 0x1202,
+
+          /* These are useful and can be interpreted by any tool that
+             tracks malloc() et al, by using vg_replace_malloc.c. */
+          VG_USERREQ__MALLOCLIKE_BLOCK = 0x1301,
+          VG_USERREQ__RESIZEINPLACE_BLOCK = 0x130b,
+          VG_USERREQ__FREELIKE_BLOCK   = 0x1302,
+          /* Memory pool support. */
+          VG_USERREQ__CREATE_MEMPOOL   = 0x1303,
+          VG_USERREQ__DESTROY_MEMPOOL  = 0x1304,
+          VG_USERREQ__MEMPOOL_ALLOC    = 0x1305,
+          VG_USERREQ__MEMPOOL_FREE     = 0x1306,
+          VG_USERREQ__MEMPOOL_TRIM     = 0x1307,
+          VG_USERREQ__MOVE_MEMPOOL     = 0x1308,
+          VG_USERREQ__MEMPOOL_CHANGE   = 0x1309,
+          VG_USERREQ__MEMPOOL_EXISTS   = 0x130a,
+
+          /* Allow printfs to valgrind log. */
+          /* The first two pass the va_list argument by value, which
+             assumes it is the same size as or smaller than a UWord,
+             which generally isn't the case.  Hence are deprecated.
+             The second two pass the vargs by reference and so are
+             immune to this problem. */
+          /* both :: char* fmt, va_list vargs (DEPRECATED) */
+          VG_USERREQ__PRINTF           = 0x1401,
+          VG_USERREQ__PRINTF_BACKTRACE = 0x1402,
+          /* both :: char* fmt, va_list* vargs */
+          VG_USERREQ__PRINTF_VALIST_BY_REF = 0x1403,
+          VG_USERREQ__PRINTF_BACKTRACE_VALIST_BY_REF = 0x1404,
+
+          /* Stack support. */
+          VG_USERREQ__STACK_REGISTER   = 0x1501,
+          VG_USERREQ__STACK_DEREGISTER = 0x1502,
+          VG_USERREQ__STACK_CHANGE     = 0x1503,
+
+          /* Wine support */
+          VG_USERREQ__LOAD_PDB_DEBUGINFO = 0x1601,
+
+          /* Querying of debug info. */
+          VG_USERREQ__MAP_IP_TO_SRCLOC = 0x1701,
+
+          /* Disable/enable error reporting level.  Takes a single
+             Word arg which is the delta to this thread's error
+             disablement indicator.  Hence 1 disables or further
+             disables errors, and -1 moves back towards enablement.
+             Other values are not allowed. */
+          VG_USERREQ__CHANGE_ERR_DISABLEMENT = 0x1801,
+
+          /* Initialise IR injection */
+          VG_USERREQ__VEX_INIT_FOR_IRI = 0x1901
+   } Vg_ClientRequest;
+
+#if !defined(__GNUC__)
+#  define __extension__ /* */
+#endif
+
+
+/* Returns the number of Valgrinds this code is running under.  That
+   is, 0 if running natively, 1 if running under Valgrind, 2 if
+   running under Valgrind which is running under another Valgrind,
+   etc. */
+#define RUNNING_ON_VALGRIND                                           \
+    (unsigned)VALGRIND_DO_CLIENT_REQUEST_EXPR(0 /* if not */,         \
+                                    VG_USERREQ__RUNNING_ON_VALGRIND,  \
+                                    0, 0, 0, 0, 0)                    \
+
+
+/* Discard translation of code in the range [_qzz_addr .. _qzz_addr +
+   _qzz_len - 1].  Useful if you are debugging a JITter or some such,
+   since it provides a way to make sure valgrind will retranslate the
+   invalidated area.  Returns no value. */
+#define VALGRIND_DISCARD_TRANSLATIONS(_qzz_addr,_qzz_len)              \
+    VALGRIND_DO_CLIENT_REQUEST_STMT(VG_USERREQ__DISCARD_TRANSLATIONS,  \
+                                    _qzz_addr, _qzz_len, 0, 0, 0)
+
+
+/* These requests are for getting Valgrind itself to print something.
+   Possibly with a backtrace.  This is a really ugly hack.  The return value
+   is the number of characters printed, excluding the "**<pid>** " part at the
+   start and the backtrace (if present). */
+
+#if defined(__GNUC__) || defined(__INTEL_COMPILER) && !defined(_MSC_VER)
+/* Modern GCC will optimize the static routine out if unused,
+   and unused attribute will shut down warnings about it.  */
+static int VALGRIND_PRINTF(const char *format, ...)
+   __attribute__((format(__printf__, 1, 2), __unused__));
+#endif
+static int
+#if defined(_MSC_VER)
+__inline
+#endif
+VALGRIND_PRINTF(const char *format, ...)
+{
+#if defined(NVALGRIND)
+   return 0;
+#else /* NVALGRIND */
+#if defined(_MSC_VER) || defined(__MINGW64__)
+   uintptr_t _qzz_res;
+#else
+   unsigned long _qzz_res;
+#endif
+   va_list vargs;
+   va_start(vargs, format);
+#if defined(_MSC_VER) || defined(__MINGW64__)
+   _qzz_res = VALGRIND_DO_CLIENT_REQUEST_EXPR(0,
+                              VG_USERREQ__PRINTF_VALIST_BY_REF,
+                              (uintptr_t)format,
+                              (uintptr_t)&vargs,
+                              0, 0, 0);
+#else
+   _qzz_res = VALGRIND_DO_CLIENT_REQUEST_EXPR(0,
+                              VG_USERREQ__PRINTF_VALIST_BY_REF,
+                              (unsigned long)format,
+                              (unsigned long)&vargs, 
+                              0, 0, 0);
+#endif
+   va_end(vargs);
+   return (int)_qzz_res;
+#endif /* NVALGRIND */
+}
+
+#if defined(__GNUC__) || defined(__INTEL_COMPILER) && !defined(_MSC_VER)
+static int VALGRIND_PRINTF_BACKTRACE(const char *format, ...)
+   __attribute__((format(__printf__, 1, 2), __unused__));
+#endif
+static int
+#if defined(_MSC_VER)
+__inline
+#endif
+VALGRIND_PRINTF_BACKTRACE(const char *format, ...)
+{
+#if defined(NVALGRIND)
+   return 0;
+#else /* NVALGRIND */
+#if defined(_MSC_VER) || defined(__MINGW64__)
+   uintptr_t _qzz_res;
+#else
+   unsigned long _qzz_res;
+#endif
+   va_list vargs;
+   va_start(vargs, format);
+#if defined(_MSC_VER) || defined(__MINGW64__)
+   _qzz_res = VALGRIND_DO_CLIENT_REQUEST_EXPR(0,
+                              VG_USERREQ__PRINTF_BACKTRACE_VALIST_BY_REF,
+                              (uintptr_t)format,
+                              (uintptr_t)&vargs,
+                              0, 0, 0);
+#else
+   _qzz_res = VALGRIND_DO_CLIENT_REQUEST_EXPR(0,
+                              VG_USERREQ__PRINTF_BACKTRACE_VALIST_BY_REF,
+                              (unsigned long)format,
+                              (unsigned long)&vargs, 
+                              0, 0, 0);
+#endif
+   va_end(vargs);
+   return (int)_qzz_res;
+#endif /* NVALGRIND */
+}
+
+
+/* These requests allow control to move from the simulated CPU to the
+   real CPU, calling an arbitary function.
+   
+   Note that the current ThreadId is inserted as the first argument.
+   So this call:
+
+     VALGRIND_NON_SIMD_CALL2(f, arg1, arg2)
+
+   requires f to have this signature:
+
+     Word f(Word tid, Word arg1, Word arg2)
+
+   where "Word" is a word-sized type.
+
+   Note that these client requests are not entirely reliable.  For example,
+   if you call a function with them that subsequently calls printf(),
+   there's a high chance Valgrind will crash.  Generally, your prospects of
+   these working are made higher if the called function does not refer to
+   any global variables, and does not refer to any libc or other functions
+   (printf et al).  Any kind of entanglement with libc or dynamic linking is
+   likely to have a bad outcome, for tricky reasons which we've grappled
+   with a lot in the past.
+*/
+#define VALGRIND_NON_SIMD_CALL0(_qyy_fn)                          \
+    VALGRIND_DO_CLIENT_REQUEST_EXPR(0 /* default return */,       \
+                                    VG_USERREQ__CLIENT_CALL0,     \
+                                    _qyy_fn,                      \
+                                    0, 0, 0, 0)
+
+#define VALGRIND_NON_SIMD_CALL1(_qyy_fn, _qyy_arg1)                    \
+    VALGRIND_DO_CLIENT_REQUEST_EXPR(0 /* default return */,            \
+                                    VG_USERREQ__CLIENT_CALL1,          \
+                                    _qyy_fn,                           \
+                                    _qyy_arg1, 0, 0, 0)
+
+#define VALGRIND_NON_SIMD_CALL2(_qyy_fn, _qyy_arg1, _qyy_arg2)         \
+    VALGRIND_DO_CLIENT_REQUEST_EXPR(0 /* default return */,            \
+                                    VG_USERREQ__CLIENT_CALL2,          \
+                                    _qyy_fn,                           \
+                                    _qyy_arg1, _qyy_arg2, 0, 0)
+
+#define VALGRIND_NON_SIMD_CALL3(_qyy_fn, _qyy_arg1, _qyy_arg2, _qyy_arg3) \
+    VALGRIND_DO_CLIENT_REQUEST_EXPR(0 /* default return */,             \
+                                    VG_USERREQ__CLIENT_CALL3,           \
+                                    _qyy_fn,                            \
+                                    _qyy_arg1, _qyy_arg2,               \
+                                    _qyy_arg3, 0)
+
+
+/* Counts the number of errors that have been recorded by a tool.  Nb:
+   the tool must record the errors with VG_(maybe_record_error)() or
+   VG_(unique_error)() for them to be counted. */
+#define VALGRIND_COUNT_ERRORS                                     \
+    (unsigned)VALGRIND_DO_CLIENT_REQUEST_EXPR(                    \
+                               0 /* default return */,            \
+                               VG_USERREQ__COUNT_ERRORS,          \
+                               0, 0, 0, 0, 0)
+
+/* Several Valgrind tools (Memcheck, Massif, Helgrind, DRD) rely on knowing
+   when heap blocks are allocated in order to give accurate results.  This
+   happens automatically for the standard allocator functions such as
+   malloc(), calloc(), realloc(), memalign(), new, new[], free(), delete,
+   delete[], etc.
+
+   But if your program uses a custom allocator, this doesn't automatically
+   happen, and Valgrind will not do as well.  For example, if you allocate
+   superblocks with mmap() and then allocates chunks of the superblocks, all
+   Valgrind's observations will be at the mmap() level and it won't know that
+   the chunks should be considered separate entities.  In Memcheck's case,
+   that means you probably won't get heap block overrun detection (because
+   there won't be redzones marked as unaddressable) and you definitely won't
+   get any leak detection.
+
+   The following client requests allow a custom allocator to be annotated so
+   that it can be handled accurately by Valgrind.
+
+   VALGRIND_MALLOCLIKE_BLOCK marks a region of memory as having been allocated
+   by a malloc()-like function.  For Memcheck (an illustrative case), this
+   does two things:
+
+   - It records that the block has been allocated.  This means any addresses
+     within the block mentioned in error messages will be
+     identified as belonging to the block.  It also means that if the block
+     isn't freed it will be detected by the leak checker.
+
+   - It marks the block as being addressable and undefined (if 'is_zeroed' is
+     not set), or addressable and defined (if 'is_zeroed' is set).  This
+     controls how accesses to the block by the program are handled.
+   
+   'addr' is the start of the usable block (ie. after any
+   redzone), 'sizeB' is its size.  'rzB' is the redzone size if the allocator
+   can apply redzones -- these are blocks of padding at the start and end of
+   each block.  Adding redzones is recommended as it makes it much more likely
+   Valgrind will spot block overruns.  `is_zeroed' indicates if the memory is
+   zeroed (or filled with another predictable value), as is the case for
+   calloc().
+   
+   VALGRIND_MALLOCLIKE_BLOCK should be put immediately after the point where a
+   heap block -- that will be used by the client program -- is allocated.
+   It's best to put it at the outermost level of the allocator if possible;
+   for example, if you have a function my_alloc() which calls
+   internal_alloc(), and the client request is put inside internal_alloc(),
+   stack traces relating to the heap block will contain entries for both
+   my_alloc() and internal_alloc(), which is probably not what you want.
+
+   For Memcheck users: if you use VALGRIND_MALLOCLIKE_BLOCK to carve out
+   custom blocks from within a heap block, B, that has been allocated with
+   malloc/calloc/new/etc, then block B will be *ignored* during leak-checking
+   -- the custom blocks will take precedence.
+
+   VALGRIND_FREELIKE_BLOCK is the partner to VALGRIND_MALLOCLIKE_BLOCK.  For
+   Memcheck, it does two things:
+
+   - It records that the block has been deallocated.  This assumes that the
+     block was annotated as having been allocated via
+     VALGRIND_MALLOCLIKE_BLOCK.  Otherwise, an error will be issued.
+
+   - It marks the block as being unaddressable.
+
+   VALGRIND_FREELIKE_BLOCK should be put immediately after the point where a
+   heap block is deallocated.
+
+   VALGRIND_RESIZEINPLACE_BLOCK informs a tool about reallocation. For
+   Memcheck, it does four things:
+
+   - It records that the size of a block has been changed.  This assumes that
+     the block was annotated as having been allocated via
+     VALGRIND_MALLOCLIKE_BLOCK.  Otherwise, an error will be issued.
+
+   - If the block shrunk, it marks the freed memory as being unaddressable.
+
+   - If the block grew, it marks the new area as undefined and defines a red
+     zone past the end of the new block.
+
+   - The V-bits of the overlap between the old and the new block are preserved.
+
+   VALGRIND_RESIZEINPLACE_BLOCK should be put after allocation of the new block
+   and before deallocation of the old block.
+
+   In many cases, these three client requests will not be enough to get your
+   allocator working well with Memcheck.  More specifically, if your allocator
+   writes to freed blocks in any way then a VALGRIND_MAKE_MEM_UNDEFINED call
+   will be necessary to mark the memory as addressable just before the zeroing
+   occurs, otherwise you'll get a lot of invalid write errors.  For example,
+   you'll need to do this if your allocator recycles freed blocks, but it
+   zeroes them before handing them back out (via VALGRIND_MALLOCLIKE_BLOCK).
+   Alternatively, if your allocator reuses freed blocks for allocator-internal
+   data structures, VALGRIND_MAKE_MEM_UNDEFINED calls will also be necessary.
+
+   Really, what's happening is a blurring of the lines between the client
+   program and the allocator... after VALGRIND_FREELIKE_BLOCK is called, the
+   memory should be considered unaddressable to the client program, but the
+   allocator knows more than the rest of the client program and so may be able
+   to safely access it.  Extra client requests are necessary for Valgrind to
+   understand the distinction between the allocator and the rest of the
+   program.
+
+   Ignored if addr == 0.
+*/
+#define VALGRIND_MALLOCLIKE_BLOCK(addr, sizeB, rzB, is_zeroed)          \
+    VALGRIND_DO_CLIENT_REQUEST_STMT(VG_USERREQ__MALLOCLIKE_BLOCK,       \
+                                    addr, sizeB, rzB, is_zeroed, 0)
+
+/* See the comment for VALGRIND_MALLOCLIKE_BLOCK for details.
+   Ignored if addr == 0.
+*/
+#define VALGRIND_RESIZEINPLACE_BLOCK(addr, oldSizeB, newSizeB, rzB)     \
+    VALGRIND_DO_CLIENT_REQUEST_STMT(VG_USERREQ__RESIZEINPLACE_BLOCK,    \
+                                    addr, oldSizeB, newSizeB, rzB, 0)
+
+/* See the comment for VALGRIND_MALLOCLIKE_BLOCK for details.
+   Ignored if addr == 0.
+*/
+#define VALGRIND_FREELIKE_BLOCK(addr, rzB)                              \
+    VALGRIND_DO_CLIENT_REQUEST_STMT(VG_USERREQ__FREELIKE_BLOCK,         \
+                                    addr, rzB, 0, 0, 0)
+
+/* Create a memory pool. */
+#define VALGRIND_CREATE_MEMPOOL(pool, rzB, is_zeroed)             \
+    VALGRIND_DO_CLIENT_REQUEST_STMT(VG_USERREQ__CREATE_MEMPOOL,   \
+                                    pool, rzB, is_zeroed, 0, 0)
+
+/* Destroy a memory pool. */
+#define VALGRIND_DESTROY_MEMPOOL(pool)                            \
+    VALGRIND_DO_CLIENT_REQUEST_STMT(VG_USERREQ__DESTROY_MEMPOOL,  \
+                                    pool, 0, 0, 0, 0)
+
+/* Associate a piece of memory with a memory pool. */
+#define VALGRIND_MEMPOOL_ALLOC(pool, addr, size)                  \
+    VALGRIND_DO_CLIENT_REQUEST_STMT(VG_USERREQ__MEMPOOL_ALLOC,    \
+                                    pool, addr, size, 0, 0)
+
+/* Disassociate a piece of memory from a memory pool. */
+#define VALGRIND_MEMPOOL_FREE(pool, addr)                         \
+    VALGRIND_DO_CLIENT_REQUEST_STMT(VG_USERREQ__MEMPOOL_FREE,     \
+                                    pool, addr, 0, 0, 0)
+
+/* Disassociate any pieces outside a particular range. */
+#define VALGRIND_MEMPOOL_TRIM(pool, addr, size)                   \
+    VALGRIND_DO_CLIENT_REQUEST_STMT(VG_USERREQ__MEMPOOL_TRIM,     \
+                                    pool, addr, size, 0, 0)
+
+/* Resize and/or move a piece associated with a memory pool. */
+#define VALGRIND_MOVE_MEMPOOL(poolA, poolB)                       \
+    VALGRIND_DO_CLIENT_REQUEST_STMT(VG_USERREQ__MOVE_MEMPOOL,     \
+                                    poolA, poolB, 0, 0, 0)
+
+/* Resize and/or move a piece associated with a memory pool. */
+#define VALGRIND_MEMPOOL_CHANGE(pool, addrA, addrB, size)         \
+    VALGRIND_DO_CLIENT_REQUEST_STMT(VG_USERREQ__MEMPOOL_CHANGE,   \
+                                    pool, addrA, addrB, size, 0)
+
+/* Return 1 if a mempool exists, else 0. */
+#define VALGRIND_MEMPOOL_EXISTS(pool)                             \
+    (unsigned)VALGRIND_DO_CLIENT_REQUEST_EXPR(0,                  \
+                               VG_USERREQ__MEMPOOL_EXISTS,        \
+                               pool, 0, 0, 0, 0)
+
+/* Mark a piece of memory as being a stack. Returns a stack id.
+   start is the lowest addressable stack byte, end is the highest
+   addressable stack byte. */
+#define VALGRIND_STACK_REGISTER(start, end)                       \
+    (unsigned)VALGRIND_DO_CLIENT_REQUEST_EXPR(0,                  \
+                               VG_USERREQ__STACK_REGISTER,        \
+                               start, end, 0, 0, 0)
+
+/* Unmark the piece of memory associated with a stack id as being a
+   stack. */
+#define VALGRIND_STACK_DEREGISTER(id)                             \
+    VALGRIND_DO_CLIENT_REQUEST_STMT(VG_USERREQ__STACK_DEREGISTER, \
+                                    id, 0, 0, 0, 0)
+
+/* Change the start and end address of the stack id.
+   start is the new lowest addressable stack byte, end is the new highest
+   addressable stack byte. */
+#define VALGRIND_STACK_CHANGE(id, start, end)                     \
+    VALGRIND_DO_CLIENT_REQUEST_STMT(VG_USERREQ__STACK_CHANGE,     \
+                                    id, start, end, 0, 0)
+
+/* Load PDB debug info for Wine PE image_map. */
+#define VALGRIND_LOAD_PDB_DEBUGINFO(fd, ptr, total_size, delta)     \
+    VALGRIND_DO_CLIENT_REQUEST_STMT(VG_USERREQ__LOAD_PDB_DEBUGINFO, \
+                                    fd, ptr, total_size, delta, 0)
+
+/* Map a code address to a source file name and line number.  buf64
+   must point to a 64-byte buffer in the caller's address space.  The
+   result will be dumped in there and is guaranteed to be zero
+   terminated.  If no info is found, the first byte is set to zero. */
+#define VALGRIND_MAP_IP_TO_SRCLOC(addr, buf64)                    \
+    (unsigned)VALGRIND_DO_CLIENT_REQUEST_EXPR(0,                  \
+                               VG_USERREQ__MAP_IP_TO_SRCLOC,      \
+                               addr, buf64, 0, 0, 0)
+
+/* Disable error reporting for this thread.  Behaves in a stack like
+   way, so you can safely call this multiple times provided that
+   VALGRIND_ENABLE_ERROR_REPORTING is called the same number of times
+   to re-enable reporting.  The first call of this macro disables
+   reporting.  Subsequent calls have no effect except to increase the
+   number of VALGRIND_ENABLE_ERROR_REPORTING calls needed to re-enable
+   reporting.  Child threads do not inherit this setting from their
+   parents -- they are always created with reporting enabled. */
+#define VALGRIND_DISABLE_ERROR_REPORTING                                \
+    VALGRIND_DO_CLIENT_REQUEST_STMT(VG_USERREQ__CHANGE_ERR_DISABLEMENT, \
+                                    1, 0, 0, 0, 0)
+
+/* Re-enable error reporting, as per comments on
+   VALGRIND_DISABLE_ERROR_REPORTING. */
+#define VALGRIND_ENABLE_ERROR_REPORTING                                 \
+    VALGRIND_DO_CLIENT_REQUEST_STMT(VG_USERREQ__CHANGE_ERR_DISABLEMENT, \
+                                    -1, 0, 0, 0, 0)
+
+/* Execute a monitor command from the client program.
+   If a connection is opened with GDB, the output will be sent
+   according to the output mode set for vgdb.
+   If no connection is opened, output will go to the log output.
+   Returns 1 if command not recognised, 0 otherwise. */
+#define VALGRIND_MONITOR_COMMAND(command)                               \
+   VALGRIND_DO_CLIENT_REQUEST_EXPR(0, VG_USERREQ__GDB_MONITOR_COMMAND, \
+                                   command, 0, 0, 0, 0)
+
+
+#undef PLAT_x86_darwin
+#undef PLAT_amd64_darwin
+#undef PLAT_x86_win32
+#undef PLAT_amd64_win64
+#undef PLAT_x86_linux
+#undef PLAT_amd64_linux
+#undef PLAT_ppc32_linux
+#undef PLAT_ppc64be_linux
+#undef PLAT_ppc64le_linux
+#undef PLAT_arm_linux
+#undef PLAT_s390x_linux
+#undef PLAT_mips32_linux
+#undef PLAT_mips64_linux
+
+#endif   /* __VALGRIND_H */
diff --git a/src/library/Makefile.win b/src/library/Makefile.win
index 077611a..adc2cbb 100644
--- a/src/library/Makefile.win
+++ b/src/library/Makefile.win
@@ -43,7 +43,8 @@ R:
 	  done; \
 	fi
 	@for pkg in $(R_PKGS_BASE1); do \
-	  $(MAKE) -C $${pkg} -f Makefile.win R_ARCH=$(R_ARCH) \
+	  $(MAKE) -C $${pkg} -f Makefile.win \
+             R_ARCH=$(R_ARCH) EXT_LIBS="$(EXT_LIBS)" \
 	     all install-tests || exit 1; \
 	done
 	@$(MAKE) -C translations -f Makefile.win
diff --git a/src/library/Recommended/KernSmooth.tgz b/src/library/Recommended/KernSmooth.tgz
index ad38d55..5f9bd84 120000
--- a/src/library/Recommended/KernSmooth.tgz
+++ b/src/library/Recommended/KernSmooth.tgz
@@ -1 +1 @@
-KernSmooth_2.23-13.tar.gz
\ No newline at end of file
+KernSmooth_2.23-15.tar.gz
\ No newline at end of file
diff --git a/src/library/Recommended/KernSmooth_2.23-13.tar.gz b/src/library/Recommended/KernSmooth_2.23-13.tar.gz
deleted file mode 100644
index 4025af1..0000000
Binary files a/src/library/Recommended/KernSmooth_2.23-13.tar.gz and /dev/null differ
diff --git a/src/library/Recommended/KernSmooth_2.23-15.tar.gz b/src/library/Recommended/KernSmooth_2.23-15.tar.gz
new file mode 100644
index 0000000..e87c7aa
Binary files /dev/null and b/src/library/Recommended/KernSmooth_2.23-15.tar.gz differ
diff --git a/src/library/Recommended/MASS.tgz b/src/library/Recommended/MASS.tgz
index c02f342..b7bd225 120000
--- a/src/library/Recommended/MASS.tgz
+++ b/src/library/Recommended/MASS.tgz
@@ -1 +1 @@
-MASS_7.3-35.tar.gz
\ No newline at end of file
+MASS_7.3-47.tar.gz
\ No newline at end of file
diff --git a/src/library/Recommended/MASS_7.3-35.tar.gz b/src/library/Recommended/MASS_7.3-35.tar.gz
deleted file mode 100644
index 008cc22..0000000
Binary files a/src/library/Recommended/MASS_7.3-35.tar.gz and /dev/null differ
diff --git a/src/library/Recommended/MASS_7.3-47.tar.gz b/src/library/Recommended/MASS_7.3-47.tar.gz
new file mode 100644
index 0000000..0981d2f
Binary files /dev/null and b/src/library/Recommended/MASS_7.3-47.tar.gz differ
diff --git a/src/library/Recommended/Makefile.in b/src/library/Recommended/Makefile.in
index ae4042c..4b29695 100644
--- a/src/library/Recommended/Makefile.in
+++ b/src/library/Recommended/Makefile.in
@@ -42,7 +42,7 @@ stamp-recommended: $(OBJECTS)
 
 ## need to allow parallel installs
 INSTALL_OPTS = --pkglock --data-compress=xz
-INSTALL_OPTS2 =@BYTE_COMPILE_PACKAGES_TRUE@ --byte-compile
+ at BYTE_COMPILE_PACKAGES_FALSE@R_NO_BASE_COMPILE = true
 
 ## On e.g. Solaris/FreeBSD if the top-level make is GNU make it will
 ## pass flags such as -j and -w down: so need to ensure that INSTALL
@@ -58,7 +58,7 @@ INSTALL_OPTS2 =@BYTE_COMPILE_PACKAGES_TRUE@ --byte-compile
 	else \
 	  MAKE="$(MAKE)" R_LIBS_USER= R_LIBS_SITE= \
 	  _R_CHECK_INSTALL_DEPENDS_=no \
-	  $(R) CMD INSTALL $(INSTALL_OPTS) $(INSTALL_OPTS2) -l "$(top_builddir)/library" $< > $@.out 2>&1 || (cat $@.out && exit 1); \
+	  $(R) CMD INSTALL $(INSTALL_OPTS) --byte-compile -l "$(top_builddir)/library" $< > $@.out 2>&1 || (cat $@.out && exit 1); \
 	fi
 	@cat $@.out; rm $@.out
 	@touch $@
@@ -116,6 +116,7 @@ Matrix.ts: lattice.ts
 mgcv.ts: nlme.ts MASS.ts Matrix.ts
 nlme.ts: lattice.ts
 class.ts: MASS.ts
+survival.ts: Matrix.ts
 ## and for static html links
 boot.ts: MASS.ts survival.ts
 cluster.ts: MASS.ts
diff --git a/src/library/Recommended/Makefile.win b/src/library/Recommended/Makefile.win
index dc4ffbb..32e6d70 100644
--- a/src/library/Recommended/Makefile.win
+++ b/src/library/Recommended/Makefile.win
@@ -58,6 +58,7 @@ Matrix.ts: lattice.ts
 mgcv.ts: nlme.ts MASS.ts Matrix.ts
 nlme.ts: lattice.ts
 class.ts: MASS.ts
+survival.ts: Matrix.ts
 ## and for static html links
 boot.ts: MASS.ts survival.ts
 cluster.ts: MASS.ts
diff --git a/src/library/Recommended/Matrix.tgz b/src/library/Recommended/Matrix.tgz
index acb8a47..b3c04bd 120000
--- a/src/library/Recommended/Matrix.tgz
+++ b/src/library/Recommended/Matrix.tgz
@@ -1 +1 @@
-Matrix_1.1-4.tar.gz
\ No newline at end of file
+Matrix_1.2-9.tar.gz
\ No newline at end of file
diff --git a/src/library/Recommended/Matrix_1.1-4.tar.gz b/src/library/Recommended/Matrix_1.1-4.tar.gz
deleted file mode 100644
index f66f824..0000000
Binary files a/src/library/Recommended/Matrix_1.1-4.tar.gz and /dev/null differ
diff --git a/src/library/Recommended/Matrix_1.2-9.tar.gz b/src/library/Recommended/Matrix_1.2-9.tar.gz
new file mode 100644
index 0000000..2894279
Binary files /dev/null and b/src/library/Recommended/Matrix_1.2-9.tar.gz differ
diff --git a/src/library/Recommended/boot.tgz b/src/library/Recommended/boot.tgz
index 20bc9d8..499c47a 120000
--- a/src/library/Recommended/boot.tgz
+++ b/src/library/Recommended/boot.tgz
@@ -1 +1 @@
-boot_1.3-13.tar.gz
\ No newline at end of file
+boot_1.3-19.tar.gz
\ No newline at end of file
diff --git a/src/library/Recommended/boot_1.3-13.tar.gz b/src/library/Recommended/boot_1.3-13.tar.gz
deleted file mode 100644
index 6258c2e..0000000
Binary files a/src/library/Recommended/boot_1.3-13.tar.gz and /dev/null differ
diff --git a/src/library/Recommended/boot_1.3-19.tar.gz b/src/library/Recommended/boot_1.3-19.tar.gz
new file mode 100644
index 0000000..fc2142b
Binary files /dev/null and b/src/library/Recommended/boot_1.3-19.tar.gz differ
diff --git a/src/library/Recommended/class.tgz b/src/library/Recommended/class.tgz
index e91337c..1da0715 120000
--- a/src/library/Recommended/class.tgz
+++ b/src/library/Recommended/class.tgz
@@ -1 +1 @@
-class_7.3-11.tar.gz
\ No newline at end of file
+class_7.3-14.tar.gz
\ No newline at end of file
diff --git a/src/library/Recommended/class_7.3-11.tar.gz b/src/library/Recommended/class_7.3-11.tar.gz
deleted file mode 100644
index 239b0eb..0000000
Binary files a/src/library/Recommended/class_7.3-11.tar.gz and /dev/null differ
diff --git a/src/library/Recommended/class_7.3-14.tar.gz b/src/library/Recommended/class_7.3-14.tar.gz
new file mode 100644
index 0000000..28b10ca
Binary files /dev/null and b/src/library/Recommended/class_7.3-14.tar.gz differ
diff --git a/src/library/Recommended/cluster.tgz b/src/library/Recommended/cluster.tgz
index 4b7e789..b2f78d0 120000
--- a/src/library/Recommended/cluster.tgz
+++ b/src/library/Recommended/cluster.tgz
@@ -1 +1 @@
-cluster_1.15.3.tar.gz
\ No newline at end of file
+cluster_2.0.6.tar.gz
\ No newline at end of file
diff --git a/src/library/Recommended/cluster_1.15.3.tar.gz b/src/library/Recommended/cluster_1.15.3.tar.gz
deleted file mode 100644
index d27904e..0000000
Binary files a/src/library/Recommended/cluster_1.15.3.tar.gz and /dev/null differ
diff --git a/src/library/Recommended/cluster_2.0.6.tar.gz b/src/library/Recommended/cluster_2.0.6.tar.gz
new file mode 100644
index 0000000..50c3490
Binary files /dev/null and b/src/library/Recommended/cluster_2.0.6.tar.gz differ
diff --git a/src/library/Recommended/codetools.tgz b/src/library/Recommended/codetools.tgz
index 60acc4f..6e5dec5 120000
--- a/src/library/Recommended/codetools.tgz
+++ b/src/library/Recommended/codetools.tgz
@@ -1 +1 @@
-codetools_0.2-9.tar.gz
\ No newline at end of file
+codetools_0.2-15.tar.gz
\ No newline at end of file
diff --git a/src/library/Recommended/codetools_0.2-15.tar.gz b/src/library/Recommended/codetools_0.2-15.tar.gz
new file mode 100644
index 0000000..31a478b
Binary files /dev/null and b/src/library/Recommended/codetools_0.2-15.tar.gz differ
diff --git a/src/library/Recommended/codetools_0.2-9.tar.gz b/src/library/Recommended/codetools_0.2-9.tar.gz
deleted file mode 100644
index 2bc3920..0000000
Binary files a/src/library/Recommended/codetools_0.2-9.tar.gz and /dev/null differ
diff --git a/src/library/Recommended/foreign.tgz b/src/library/Recommended/foreign.tgz
index c3a09b7..acf6eec 120000
--- a/src/library/Recommended/foreign.tgz
+++ b/src/library/Recommended/foreign.tgz
@@ -1 +1 @@
-foreign_0.8-61.tar.gz
\ No newline at end of file
+foreign_0.8-67.tar.gz
\ No newline at end of file
diff --git a/src/library/Recommended/foreign_0.8-61.tar.gz b/src/library/Recommended/foreign_0.8-61.tar.gz
deleted file mode 100644
index ac2ab8b..0000000
Binary files a/src/library/Recommended/foreign_0.8-61.tar.gz and /dev/null differ
diff --git a/src/library/Recommended/foreign_0.8-67.tar.gz b/src/library/Recommended/foreign_0.8-67.tar.gz
new file mode 100644
index 0000000..4ab06b3
Binary files /dev/null and b/src/library/Recommended/foreign_0.8-67.tar.gz differ
diff --git a/src/library/Recommended/lattice.tgz b/src/library/Recommended/lattice.tgz
index 9915314..cd561f1 120000
--- a/src/library/Recommended/lattice.tgz
+++ b/src/library/Recommended/lattice.tgz
@@ -1 +1 @@
-lattice_0.20-29.tar.gz
\ No newline at end of file
+lattice_0.20-35.tar.gz
\ No newline at end of file
diff --git a/src/library/Recommended/lattice_0.20-29.tar.gz b/src/library/Recommended/lattice_0.20-29.tar.gz
deleted file mode 100644
index 87fecbb..0000000
Binary files a/src/library/Recommended/lattice_0.20-29.tar.gz and /dev/null differ
diff --git a/src/library/Recommended/lattice_0.20-35.tar.gz b/src/library/Recommended/lattice_0.20-35.tar.gz
new file mode 100644
index 0000000..9bdc9b9
Binary files /dev/null and b/src/library/Recommended/lattice_0.20-35.tar.gz differ
diff --git a/src/library/Recommended/mgcv.tgz b/src/library/Recommended/mgcv.tgz
index 7a76512..dc4c77d 120000
--- a/src/library/Recommended/mgcv.tgz
+++ b/src/library/Recommended/mgcv.tgz
@@ -1 +1 @@
-mgcv_1.8-3.tar.gz
\ No newline at end of file
+mgcv_1.8-17.tar.gz
\ No newline at end of file
diff --git a/src/library/Recommended/mgcv_1.8-17.tar.gz b/src/library/Recommended/mgcv_1.8-17.tar.gz
new file mode 100644
index 0000000..00bf1ef
Binary files /dev/null and b/src/library/Recommended/mgcv_1.8-17.tar.gz differ
diff --git a/src/library/Recommended/mgcv_1.8-3.tar.gz b/src/library/Recommended/mgcv_1.8-3.tar.gz
deleted file mode 100644
index ca7f60c..0000000
Binary files a/src/library/Recommended/mgcv_1.8-3.tar.gz and /dev/null differ
diff --git a/src/library/Recommended/nlme.tgz b/src/library/Recommended/nlme.tgz
index 777ec95..8174020 120000
--- a/src/library/Recommended/nlme.tgz
+++ b/src/library/Recommended/nlme.tgz
@@ -1 +1 @@
-nlme_3.1-118.tar.gz
\ No newline at end of file
+nlme_3.1-131.tar.gz
\ No newline at end of file
diff --git a/src/library/Recommended/nlme_3.1-118.tar.gz b/src/library/Recommended/nlme_3.1-118.tar.gz
deleted file mode 100644
index df16e56..0000000
Binary files a/src/library/Recommended/nlme_3.1-118.tar.gz and /dev/null differ
diff --git a/src/library/Recommended/nlme_3.1-131.tar.gz b/src/library/Recommended/nlme_3.1-131.tar.gz
new file mode 100644
index 0000000..7574f42
Binary files /dev/null and b/src/library/Recommended/nlme_3.1-131.tar.gz differ
diff --git a/src/library/Recommended/nnet.tgz b/src/library/Recommended/nnet.tgz
index 65d56f8..53861aa 120000
--- a/src/library/Recommended/nnet.tgz
+++ b/src/library/Recommended/nnet.tgz
@@ -1 +1 @@
-nnet_7.3-8.tar.gz
\ No newline at end of file
+nnet_7.3-12.tar.gz
\ No newline at end of file
diff --git a/src/library/Recommended/nnet_7.3-12.tar.gz b/src/library/Recommended/nnet_7.3-12.tar.gz
new file mode 100644
index 0000000..a88561e
Binary files /dev/null and b/src/library/Recommended/nnet_7.3-12.tar.gz differ
diff --git a/src/library/Recommended/nnet_7.3-8.tar.gz b/src/library/Recommended/nnet_7.3-8.tar.gz
deleted file mode 100644
index b23ec66..0000000
Binary files a/src/library/Recommended/nnet_7.3-8.tar.gz and /dev/null differ
diff --git a/src/library/Recommended/rpart.tgz b/src/library/Recommended/rpart.tgz
index 0c4c96c..7c05567 120000
--- a/src/library/Recommended/rpart.tgz
+++ b/src/library/Recommended/rpart.tgz
@@ -1 +1 @@
-rpart_4.1-8.tar.gz
\ No newline at end of file
+rpart_4.1-11.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
new file mode 100644
index 0000000..3682410
Binary files /dev/null and b/src/library/Recommended/rpart_4.1-11.tar.gz differ
diff --git a/src/library/Recommended/rpart_4.1-8.tar.gz b/src/library/Recommended/rpart_4.1-8.tar.gz
deleted file mode 100644
index eaa9518..0000000
Binary files a/src/library/Recommended/rpart_4.1-8.tar.gz and /dev/null differ
diff --git a/src/library/Recommended/spatial.tgz b/src/library/Recommended/spatial.tgz
index 13b6a2a..d3cec5b 120000
--- a/src/library/Recommended/spatial.tgz
+++ b/src/library/Recommended/spatial.tgz
@@ -1 +1 @@
-spatial_7.3-8.tar.gz
\ No newline at end of file
+spatial_7.3-11.tar.gz
\ No newline at end of file
diff --git a/src/library/Recommended/spatial_7.3-11.tar.gz b/src/library/Recommended/spatial_7.3-11.tar.gz
new file mode 100644
index 0000000..575fb46
Binary files /dev/null and b/src/library/Recommended/spatial_7.3-11.tar.gz differ
diff --git a/src/library/Recommended/spatial_7.3-8.tar.gz b/src/library/Recommended/spatial_7.3-8.tar.gz
deleted file mode 100644
index bf5d5c5..0000000
Binary files a/src/library/Recommended/spatial_7.3-8.tar.gz and /dev/null differ
diff --git a/src/library/Recommended/survival.tgz b/src/library/Recommended/survival.tgz
index c56e48d..c0f8a8d 120000
--- a/src/library/Recommended/survival.tgz
+++ b/src/library/Recommended/survival.tgz
@@ -1 +1 @@
-survival_2.37-7.tar.gz
\ No newline at end of file
+survival_2.41-3.tar.gz
\ No newline at end of file
diff --git a/src/library/Recommended/survival_2.37-7.tar.gz b/src/library/Recommended/survival_2.37-7.tar.gz
deleted file mode 100644
index 4a02d3d..0000000
Binary files a/src/library/Recommended/survival_2.37-7.tar.gz and /dev/null differ
diff --git a/src/library/Recommended/survival_2.41-3.tar.gz b/src/library/Recommended/survival_2.41-3.tar.gz
new file mode 100644
index 0000000..ac5107c
Binary files /dev/null and b/src/library/Recommended/survival_2.41-3.tar.gz differ
diff --git a/src/library/base/DESCRIPTION.in b/src/library/base/DESCRIPTION.in
index 76159cb..579a0a7 100644
--- a/src/library/base/DESCRIPTION.in
+++ b/src/library/base/DESCRIPTION.in
@@ -4,5 +4,6 @@ Priority: base
 Title: The R Base Package
 Author: R Core Team and contributors worldwide
 Maintainer: R Core Team <R-core at r-project.org>
-Description: Base R functions
+Description: Base R functions.
 License: Part of R @VERSION@
+Suggests: methods
diff --git a/src/library/base/Makefile.in b/src/library/base/Makefile.in
index 87e706f..eb1637f 100644
--- a/src/library/base/Makefile.in
+++ b/src/library/base/Makefile.in
@@ -32,10 +32,11 @@ all: Makefile DESCRIPTION
 
 include $(top_srcdir)/share/make/basepkg.mk
 
+## Note that R_COMPILER_SUPPRESS_ALL is now on by default
 $(top_builddir)/library/$(pkg)/R/$(pkg).rdb: all.R
 	@$(ECHO) "byte-compiling package '$(pkg)'"
 	@cat $(srcdir)/makebasedb.R | \
-	  R_COMPILE_PKGS=1 R_COMPILER_SUPPRESS_ALL=1 \
+	  _R_COMPILE_PKGS_=1 R_COMPILER_SUPPRESS_ALL=1 \
 	  R_DEFAULT_PACKAGES=NULL LC_ALL=C $(R_EXE) > /dev/null
 	@$(INSTALL_DATA) $(srcdir)/baseloader.R \
 	  $(top_builddir)/library/$(pkg)/R/$(pkg)
diff --git a/src/library/base/Makefile.win b/src/library/base/Makefile.win
index 39733e0..73da805 100644
--- a/src/library/base/Makefile.win
+++ b/src/library/base/Makefile.win
@@ -26,10 +26,11 @@ all:
 
 include $(top_srcdir)/share/make/basepkg.mk
 
+## Note that R_COMPILER_SUPPRESS_ALL is now on by default
 $(top_builddir)/library/$(pkg)/R/$(pkg).rdb: all.R
 	@$(ECHO) "byte-compiling package '$(pkg)'"
 	@cat $(srcdir)/makebasedb.R | \
-	  R_COMPILE_PKGS=1 R_COMPILER_SUPPRESS_ALL=1 \
+	  _R_COMPILE_PKGS_=1 R_COMPILER_SUPPRESS_ALL=1 \
 	  R_DEFAULT_PACKAGES=NULL LC_ALL=C $(R_EXE) > /dev/null
 	@$(INSTALL_DATA) $(srcdir)/baseloader.R \
 	  $(top_builddir)/library/$(pkg)/R/$(pkg)
diff --git a/src/library/base/R/Bessel.R b/src/library/base/R/Bessel.R
index bdfee64..9a81864 100644
--- a/src/library/base/R/Bessel.R
+++ b/src/library/base/R/Bessel.R
@@ -1,5 +1,5 @@
 #  File src/library/base/R/Bessel.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
 #  Copyright (C) 1995-2012 The R Core Team
 #
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 besselI <- function(x, nu, expon.scaled = FALSE)
 {
diff --git a/src/library/base/R/Defunct.R b/src/library/base/R/Defunct.R
index 598b77f..9208621 100644
--- a/src/library/base/R/Defunct.R
+++ b/src/library/base/R/Defunct.R
@@ -1,7 +1,7 @@
 #  File src/library/base/R/Defunct.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
-#  Copyright (C) 1995-2013 The R Core Team
+#  Copyright (C) 1995-2014 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
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 .Defunct <- function(new, package=NULL, msg) {
     if (missing(msg)) {
diff --git a/src/library/base/R/Deprecated.R b/src/library/base/R/Deprecated.R
index 9297b45..680993a 100644
--- a/src/library/base/R/Deprecated.R
+++ b/src/library/base/R/Deprecated.R
@@ -1,5 +1,5 @@
 #  File src/library/base/R/Deprecated.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
 #  Copyright (C) 1995-2012 The R Core Team
 #
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 ###----- NOTE:	../man/base-deprecated.Rd   must be synchronized with this file!
 ###		-------------------------
diff --git a/src/library/base/R/LAPACK.R b/src/library/base/R/LAPACK.R
index 3dbf5a1..b11241d 100644
--- a/src/library/base/R/LAPACK.R
+++ b/src/library/base/R/LAPACK.R
@@ -1,7 +1,7 @@
 #  File src/library/base/R/LAPACK.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
-#  Copyright (C) 1995-2013 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
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 La.svd <- function(x, nu = min(n, p), nv = min(n, p))
 {
@@ -58,3 +58,5 @@ La.svd <- function(x, nu = min(n, p), nv = min(n, p))
 }
 
 La_version <- function() .Internal(La_version())
+La_library <- function() .Internal(La_library())
+
diff --git a/src/library/base/R/New-Internal.R b/src/library/base/R/New-Internal.R
index acf6872..a7e9597 100644
--- a/src/library/base/R/New-Internal.R
+++ b/src/library/base/R/New-Internal.R
@@ -1,7 +1,7 @@
 #  File src/library/base/R/New-Internal.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
-#  Copyright (C) 1995-2013 The R Core Team
+#  Copyright (C) 1995-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
@@ -14,11 +14,12 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 geterrmessage <- function() .Internal(geterrmessage())
 
-try <- function(expr, silent = FALSE) {
+try <- function(expr, silent = FALSE,
+                outFile = getOption("try.outFile", default = stderr())) {
     tryCatch(expr, error = function(e) {
         call <- conditionCall(e)
         if (! is.null(call)) {
@@ -46,7 +47,7 @@ try <- function(expr, silent = FALSE) {
         ## geterrmessage().
         .Internal(seterrmessage(msg[1L]))
         if (! silent && identical(getOption("show.error.messages"), TRUE)) {
-            cat(msg, file = stderr())
+            cat(msg, file = outFile)
             .Internal(printDeferredWarnings())
         }
         invisible(structure(msg, class = "try-error", condition = e))
@@ -104,7 +105,7 @@ rbind <- function(..., deparse.level = 1)
                    c("all",
                      "keepInteger", "quoteExpressions", "showAttributes",
                      "useSource", "warnIncomplete", "delayPromises",
-                     "keepNA", "S_compatible"))
+                     "keepNA", "S_compatible", "hexNumeric", "digits17"))
     if (anyNA(opts))
         stop(sprintf(ngettext(as.integer(sum(is.na(opts))),
                               "deparse option %s is not recognized",
@@ -112,7 +113,9 @@ rbind <- function(..., deparse.level = 1)
                      paste(sQuote(control[is.na(opts)]), collapse=", ")),
              call. = FALSE, domain = NA)
     if (any(opts == 1L))
-        opts <- unique(c(opts[opts != 1L], 2L,3L,4L,5L,6L,8L)) # not (7,9)
+        opts <- unique(c(opts[opts != 1L], 2L,3L,4L,5L,6L,8L)) # not (7,9:11)
+    if(10L %in% opts && 11L %in% opts)
+        stop('"hexNumeric" and "digits17" are mutually exclusive')
     return(sum(2^(opts-2)))
 }
 
@@ -163,8 +166,8 @@ is.unsorted <- function(x, na.rm = FALSE, strictly = FALSE)
     .Internal(is.unsorted(x, strictly))
 }
 
-nchar <- function(x, type = "chars", allowNA = FALSE)
-    .Internal(nchar(x, type, allowNA))
+nchar <- function(x, type = "chars", allowNA = FALSE, keepNA = NA)
+    .Internal(nchar(x, type, allowNA, keepNA))
 
 polyroot <- function(z) .Internal(polyroot(z))
 
@@ -282,5 +285,16 @@ icuGetCollate <- function(type = c("actual", "valid")) {
     .Internal(icuGetCollate(match(type, c("actual", "valid"))))
 }
 
+extSoftVersion <- function() .Internal(eSoftVersion())
+
+libcurlVersion <- function() .Internal(curlVersion())
+
+curlGetHeaders <- function(url, redirect = TRUE, verify = TRUE)
+    .Internal(curlGetHeaders(url, redirect, verify))
+
+
+lengths <- function(x, use.names=TRUE) .Internal(lengths(x, use.names))
+
+
 ## base has no S4 generics
 .noGenerics <- TRUE
diff --git a/src/library/base/R/RNG.R b/src/library/base/R/RNG.R
index 152ad0c..c8081ce 100644
--- a/src/library/base/R/RNG.R
+++ b/src/library/base/R/RNG.R
@@ -1,7 +1,7 @@
 #  File src/library/base/R/RNG.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
-#  Copyright (C) 1995-2013 The R Core Team
+#  Copyright (C) 1995-2014 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
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 ## Random Number Generator
 
diff --git a/src/library/base/R/Scripts.R b/src/library/base/R/Scripts.R
index 3b06051..9981e25 100644
--- a/src/library/base/R/Scripts.R
+++ b/src/library/base/R/Scripts.R
@@ -1,5 +1,5 @@
 #  File src/library/base/R/Scripts.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
 #  Copyright (C) 1995-2012 The R Core Team
 #
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 .Script <-
 function(interpreter, script, args, ...)
diff --git a/src/library/base/R/TAOCP.R b/src/library/base/R/TAOCP.R
index 80c49a2..05174f9 100644
--- a/src/library/base/R/TAOCP.R
+++ b/src/library/base/R/TAOCP.R
@@ -1,5 +1,5 @@
 #  File src/library/base/R/files.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
 #  Copyright (C) 2007 R Core Team
 #
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 .TAOCP1997init <- function(seed)
 {
diff --git a/src/library/base/R/all.equal.R b/src/library/base/R/all.equal.R
index 674fbab..624cfb9 100644
--- a/src/library/base/R/all.equal.R
+++ b/src/library/base/R/all.equal.R
@@ -1,7 +1,7 @@
 #  File src/library/base/R/all.equal.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
-#  Copyright (C) 1995-2014 The R Core Team
+#  Copyright (C) 1995-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
@@ -14,17 +14,18 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 all.equal <- function(target, current, ...) UseMethod("all.equal")
 
-all.equal.default <-
-    function(target, current, ...)
+all.equal.default <- function(target, current, ...)
 {
     ## Really a dispatcher given mode() of args :
     ## use data.class as unlike class it does not give "integer"
-    if(is.language(target) || is.function(target) || is.environment(target))
+    if(is.language(target) || is.function(target))
 	return(all.equal.language(target, current, ...))
+    if(is.environment(target) || is.environment(current))# both: unclass() fails on env.
+	return(all.equal.environment(target, current, ...))
     if(is.recursive(target))
 	return(all.equal.list(target, current, ...))
     msg <- switch (mode(target),
@@ -44,7 +45,7 @@ all.equal.default <-
 }
 
 all.equal.numeric <-
-    function(target, current, tolerance = .Machine$double.eps ^ .5,
+    function(target, current, tolerance = sqrt(.Machine$double.eps),
              scale = NULL, ..., check.attributes = TRUE)
 {
     if (!is.numeric(tolerance))
@@ -83,12 +84,12 @@ all.equal.numeric <-
 	return(msg)
     }
     out <- out | target == current
-    if(all(out)) { if (is.null(msg)) return(TRUE) else return(msg) }
+    if(all(out)) return(if(is.null(msg)) TRUE else msg)
 
     target <- target[!out]
     current <- current[!out]
     if(is.integer(target) && is.integer(current)) target <- as.double(target)
-    xy <- mean((if(cplx) Mod else abs)(target - current))
+    xy <- mean(abs(target - current)) ## abs(z) == Mod(z) for complex
     what <-
 	if(is.null(scale)) {
 	    xn <- mean(abs(target))
@@ -144,7 +145,81 @@ all.equal.character <-
     else msg
 }
 
-## visible, so need to test both args
+## In 'base' these are all visible, so need to test both args:
+
+all.equal.envRefClass <- function (target, current, ...) {
+    if(!methods::is(target, "envRefClass")) return("'target' is not an envRefClass")
+    if(!methods::is(current, "envRefClass")) return("'current' is not an envRefClass")
+    if(!isTRUE(ae <- all.equal(class(target), class(current), ...)))
+	return(sprintf("Classes differ: %s", paste(ae, collapse=" ")))
+    getCl <- function(x) { cl <- tryCatch(x$getClass(), error=function(e) NULL)
+			   if(is.null(cl)) class(x) else cl }
+    if(!identical(cld <- getCl(target), c2 <- getCl(current))) {
+	hasCA <- any("check.attributes" == names(list(...)))
+	ae <-
+	    if(hasCA) all.equal(cld, c2, ...)
+	    else all.equal(cld, c2, check.attributes=FALSE, ...)
+        if(isTRUE(ae) && !hasCA) ae <- all.equal(cld, c2, ...)
+	return(sprintf("Class definitions are not identical%s",
+		       if(isTRUE(ae)) "" else paste(":", ae, collapse=" ")))
+    }
+    if(!isS4(cld)) ## prototype / incomplete
+	return(if(identical(target, current)) TRUE
+	       else "different prototypical 'envRefClass' objects")
+    flds <- names(cld at fieldClasses) ## else NULL
+    asL <- function(O) sapply(flds, function(ch) O[[ch]], simplify = FALSE)
+    ## ## ?setRefClass explicitly says users should not use ".<foo>" fields:
+    ## if(is.na(all.names)) all.names <- FALSE
+    ## ## try preventing infinite recursion by not looking at  .self :
+    ## T <- function(ls) ls[is.na(match(names(ls), c(".self", methods:::envRefMethodNames)))]
+    ## asL <- function(E) T(as.list(as.environment(E), all.names=all.names, sorted=TRUE))
+    n <- all.equal.list(asL(target), asL(current), ...)
+    ## Can have slots (apart from '.xData'), though not recommended; check these:
+    sns <- names(cld at slots); sns <- sns[sns != ".xData"]
+    msg <- if(length(sns)) {
+	L <- lapply(sns, function(sn)
+	    all.equal(methods::slot(target, sn),
+                      methods::slot(current, sn), ...))
+	unlist(L[vapply(L, is.character, NA)])
+    }
+    if(is.character(n)) msg <- c(msg, n)
+    if(is.null(msg)) TRUE else msg
+}
+
+all.equal.environment <- function (target, current, all.names=TRUE, ...) {
+    if(!is.environment (target)) return( "'target' is not an environment")
+    if(!is.environment(current)) return("'current' is not an environment")
+    ae.run <- dynGet("__all.eq.E__", NULL)
+    if(is.null(ae.run))
+	"__all.eq.E__" <- environment() # -> 5 visible + 6 ".<..>" objects
+    else { ## ae.run contains previous target, current, ..
+
+	## If we exactly match one of these, we return TRUE here,
+	## otherwise, divert to all.equal(as.list(.), ...) below
+
+	## needs recursive function -- a loop with  em <- em$mm	 destroys the env!
+	do1 <- function(em) {
+	    if(identical(target, em$target) && identical(current, em$current))
+		TRUE
+	    else if(!is.null(em$ mm)) ## recurse
+		do1(em$ mm)
+	    else {
+		## add the new (target, current) pair, and return FALSE
+		e <- new.env(parent = emptyenv())
+		e$target  <- target
+		e$current <- current
+		em$ mm <- e
+		FALSE
+	    }
+	}
+
+	if(do1(ae.run)) return(TRUE)
+	## else, continue:
+    }
+    all.equal.list(as.list.environment(target , all.names=all.names, sorted=TRUE),
+		   as.list.environment(current, all.names=all.names, sorted=TRUE), ...)
+}
+
 all.equal.factor <- function(target, current, ..., check.attributes = TRUE)
 {
     if(!inherits(target, "factor"))
diff --git a/src/library/base/R/allnames.R b/src/library/base/R/allnames.R
index f092f78..a0b4b62 100644
--- a/src/library/base/R/allnames.R
+++ b/src/library/base/R/allnames.R
@@ -1,5 +1,5 @@
 #  File src/library/base/R/allnames.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
 #  Copyright (C) 1995-2012 The R Core Team
 #
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 all.names <- function(expr, functions = TRUE, max.names = -1L, unique = FALSE)
     .Internal(all.names(expr, functions, max.names, unique))
diff --git a/src/library/base/R/aperm.R b/src/library/base/R/aperm.R
index cb2d1f7..183cc13 100644
--- a/src/library/base/R/aperm.R
+++ b/src/library/base/R/aperm.R
@@ -1,5 +1,5 @@
 #  File src/library/base/R/aperm.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
 #  Copyright (C) 1995-2012 The R Core Team
 #
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 aperm <- function(a, perm, ...) UseMethod("aperm")
 
diff --git a/src/library/base/R/append.R b/src/library/base/R/append.R
index f98793f..c27d1ea 100644
--- a/src/library/base/R/append.R
+++ b/src/library/base/R/append.R
@@ -1,5 +1,5 @@
 #  File src/library/base/R/append.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
 #  Copyright (C) 1995-2012 The R Core Team
 #
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 append <- function (x, values, after = length(x))
 {
diff --git a/src/library/base/R/apply.R b/src/library/base/R/apply.R
index 0772fd6..a2f33c2 100644
--- a/src/library/base/R/apply.R
+++ b/src/library/base/R/apply.R
@@ -1,7 +1,7 @@
 #  File src/library/base/R/apply.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
-#  Copyright (C) 1995-2013 The R Core Team
+#  Copyright (C) 1995-2013, 2015 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
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 apply <- function(X, MARGIN, FUN, ...)
 {
@@ -56,7 +56,7 @@ apply <- function(X, MARGIN, FUN, ...)
         ## to use proper mode and dimension:
         ## The following is still a bit `hackish': use non-empty X
         newX <- array(vector(typeof(X), 1L), dim = c(prod(d.call), 1L))
-        ans <- FUN(if(length(d.call) < 2L) newX[,1] else
+        ans <- forceAndCall(1, FUN, if(length(d.call) < 2L) newX[,1] else
                    array(newX[, 1L], d.call, dn.call), ...)
         return(if(is.null(ans)) ans else if(length(d.ans) < 2L) ans[1L][-1L]
                else array(ans, d.ans, dn.ans))
@@ -68,12 +68,12 @@ apply <- function(X, MARGIN, FUN, ...)
     if(length(d.call) < 2L) {# vector
         if (length(dn.call)) dimnames(newX) <- c(dn.call, list(NULL))
         for(i in 1L:d2) {
-            tmp <- FUN(newX[,i], ...)
+            tmp <- forceAndCall(1, FUN, newX[,i], ...)
             if(!is.null(tmp)) ans[[i]] <- tmp
         }
     } else
        for(i in 1L:d2) {
-           tmp <- FUN(array(newX[,i], d.call, dn.call), ...)
+           tmp <- forceAndCall(1, FUN, array(newX[,i], d.call, dn.call), ...)
            if(!is.null(tmp)) ans[[i]] <- tmp
         }
 
@@ -84,7 +84,7 @@ apply <- function(X, MARGIN, FUN, ...)
 
     ans.names <- names(ans[[1L]])
     if(!ans.list)
-	ans.list <- any(unlist(lapply(ans, length)) != l.ans)
+	ans.list <- any(lengths(ans) != l.ans)
     if(!ans.list && length(ans.names)) {
         all.same <- vapply(ans, function(x) identical(names(x), ans.names), NA)
         if (!all(all.same)) ans.names <- NULL
@@ -92,15 +92,20 @@ apply <- function(X, MARGIN, FUN, ...)
     len.a <- if(ans.list) d2 else length(ans <- unlist(ans, recursive = FALSE))
     if(length(MARGIN) == 1L && len.a == d2) {
 	names(ans) <- if(length(dn.ans[[1L]])) dn.ans[[1L]] # else NULL
-	return(ans)
+	ans
     }
-    if(len.a == d2)
-	return(array(ans, d.ans, dn.ans))
-    if(len.a && len.a %% d2 == 0L) {
+    else if(len.a == d2)
+	array(ans, d.ans, dn.ans)
+    else if(len.a && len.a %% d2 == 0L) {
         if(is.null(dn.ans)) dn.ans <- vector(mode="list", length(d.ans))
-        dn.ans <- c(list(ans.names), dn.ans)
-	return(array(ans, c(len.a %/% d2, d.ans),
-		     if(!all(vapply(dn.ans, is.null, NA))) dn.ans))
-    }
-    return(ans)
+	dn1 <- list(ans.names)
+	if(length(dn.call) && !is.null(n1 <- names(dn <- dn.call[1])) &&
+	   nzchar(n1) && length(ans.names) == length(dn[[1]]))
+	    names(dn1) <- n1
+	dn.ans <- c(dn1, dn.ans)
+	array(ans, c(len.a %/% d2, d.ans),
+	      if(!is.null(names(dn.ans)) || !all(vapply(dn.ans, is.null, NA)))
+		  dn.ans)
+    } else
+	ans
 }
diff --git a/src/library/base/R/array.R b/src/library/base/R/array.R
index 8f8ba35..475d4ec 100644
--- a/src/library/base/R/array.R
+++ b/src/library/base/R/array.R
@@ -1,7 +1,7 @@
 #  File src/library/base/R/array.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
-#  Copyright (C) 1995-2013 The R Core Team
+#  Copyright (C) 1995-2015 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
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 array <-
 function(data = NA, dim = length(data), dimnames = NULL)
@@ -60,18 +60,19 @@ function(x, MARGIN)
     y
 }
 
-provideDimnames <- function(x, sep = "", base = list(LETTERS))
+provideDimnames <- function(x, sep = "", base = list(LETTERS), unique = TRUE)
 {
     ## provide dimnames where missing - not copying x unnecessarily
     dx <- dim(x)
     dnx <- dimnames(x)
     if(new <- is.null(dnx))
 	dnx <- vector("list", length(dx))
-    k <- length(M <- vapply(base, length, 1L))
+    k <- length(M <- lengths(base))
     for(i in which(vapply(dnx, is.null, NA))) {
 	ii <- 1L+(i-1L) %% k # recycling
         ss <- seq_len(dx[i]) - 1L # dim could be zero
-	dnx[[i]] <- make.unique(base[[ii]][1L+ (ss %% M[ii])], sep = sep)
+	bi <- base[[ii]][1L+ (ss %% M[ii])]
+	dnx[[i]] <- if(unique) make.unique(bi, sep = sep) else bi
 	new <- TRUE
     }
     if(new) dimnames(x) <- dnx
diff --git a/src/library/base/R/as.R b/src/library/base/R/as.R
index 8897eee..b20cb11 100644
--- a/src/library/base/R/as.R
+++ b/src/library/base/R/as.R
@@ -1,7 +1,7 @@
 #  File src/library/base/R/as.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
-#  Copyright (C) 1995-2012 The R Core Team
+#  Copyright (C) 1995-2014 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
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 as.single <- function(x,...) UseMethod("as.single")
 as.single.default <- function(x,...)
@@ -24,6 +24,7 @@ as.single.default <- function(x,...)
 # preserve the semantics that for a call with an object argument
 # dispatching is done first on as.character and then on as.vector.
 as.character.default <- function(x,...) .Internal(as.vector(x, "character"))
+### FIXME: why are we not doing this for all atomic vector types?
 
 as.expression <- function(x,...) UseMethod("as.expression")
 as.expression.default <- function(x,...) .Internal(as.vector(x, "expression"))
@@ -35,15 +36,15 @@ as.list.default <- function (x, ...)
 
 as.list.function <- function (x, ...) c(formals(x), list(body(x)))
 
-## FIXME:  Really the above  as.vector(x, "list")  should work for data.frames!
+## FIXME: as.vector(., "list")  should work for data.frames!
 as.list.data.frame <- function(x,...) {
     x <- unclass(x)
     attr(x,"row.names") <- NULL
     x
 }
 
-as.list.environment <- function(x, all.names=FALSE, ...)
-    .Internal(env2list(x, all.names))
+as.list.environment <- function(x, all.names=FALSE, sorted=FALSE, ...)
+    .Internal(env2list(x, all.names, sorted))
 
 ## NB: as.vector is used for several other as.xxxx, including
 ## as.expression, as.list, as.pairlist, as.single, as.symbol.
diff --git a/src/library/base/R/assign.R b/src/library/base/R/assign.R
index dfd1fea..83088b4 100644
--- a/src/library/base/R/assign.R
+++ b/src/library/base/R/assign.R
@@ -1,5 +1,5 @@
 #  File src/library/base/R/assign.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
 #  Copyright (C) 1995-2012 The R Core Team
 #
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 assign <-
     function (x, value, pos = -1, envir = as.environment(pos),
diff --git a/src/library/base/R/attach.R b/src/library/base/R/attach.R
index 7a8c968..0b2955f 100644
--- a/src/library/base/R/attach.R
+++ b/src/library/base/R/attach.R
@@ -1,7 +1,7 @@
 #  File src/library/base/R/attach.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
-#  Copyright (C) 1995-2013 The R Core Team
+#  Copyright (C) 1995-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
@@ -14,7 +14,11 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
+
+## Abstraction for "The fastest way" to do this [no if(), no substr(), ...],
+## to be used in many places:
+.rmpkg <- function(pkg) sub("package:", "", pkg, fixed=TRUE)
 
 ## also used by library() :
 .maskedMsg <- function(same, pkg, by) {
@@ -48,9 +52,9 @@ attach <- function(what, pos = 2L, name = deparse(substitute(what)),
                 break
             }
         }
-        ob <- objects(db.pos, all.names = TRUE)
+        ob <- names(as.environment(db.pos))
         if(.isMethodsDispatchOn()) { ## {see note in library() about this}
-            these <- ob[substr(ob, 1L, 6L) == ".__T__"]
+            these <- ob[startsWith(ob,".__T__")]
             gen  <- gsub(".__T__(.*):([^:]+)", "\\1", these)
             from <- gsub(".__T__(.*):([^:]+)", "\\2", these)
             gen <- gen[from != ".GlobalEnv"]
@@ -58,11 +62,11 @@ attach <- function(what, pos = 2L, name = deparse(substitute(what)),
         }
         ipos <- seq_along(sp)[-c(db.pos, match(c("Autoloads", "CheckExEnv"), sp, 0L))]
         for (i in ipos) {
-            obj.same <- match(objects(i, all.names = TRUE), ob, nomatch = 0L)
+            obj.same <- match(names(as.environment(i)), ob, nomatch = 0L)
             if (any(obj.same > 0L)) {
                 same <- ob[obj.same]
                 same <- same[!(same %in% dont.mind)]
-                Classobjs <- grep("^\\.__", same)
+                Classobjs <- which(startsWith(same,".__"))
                 if(length(Classobjs)) same <- same[-Classobjs]
                 ## report only objects which are both functions or
                 ## both non-functions.
@@ -73,7 +77,8 @@ attach <- function(what, pos = 2L, name = deparse(substitute(what)),
                 if(length(same)) {
 		    pkg <- if (sum(sp == sp[i]) > 1L) # 'pos = *' needs no translation
 			sprintf("%s (pos = %d)", sp[i], i) else sp[i]
-		    message(.maskedMsg(same, pkg, by = i < db.pos), domain=NA)
+		    message(.maskedMsg(sort(same), pkg, by = i < db.pos),
+                            domain = NA)
 		}
             }
         }
@@ -97,8 +102,8 @@ attach <- function(what, pos = 2L, name = deparse(substitute(what)),
        !exists(".conflicts.OK", envir = value, inherits = FALSE)) {
         checkConflicts(value)
     }
-    if( length(ls(envir = value, all.names = TRUE)) && .isMethodsDispatchOn() )
-        methods:::cacheMetaData(value, TRUE)
+    if (length(names(value)) && .isMethodsDispatchOn() )
+        methods::cacheMetaData(value, TRUE)
     invisible(value)
 }
 
@@ -120,22 +125,22 @@ detach <- function(name, pos = 2L, unload = FALSE, character.only = FALSE,
 
     ## we need to treat packages differently from other objects, so get those
     ## out of the way now
-    if (! grepl("^package:", packageName) )
+    if (!startsWith(packageName, "package:"))
         return(invisible(.Internal(detach(pos))))
 
     ## From here down we are detaching a package.
-    pkgname <- sub("^package:", "", packageName)
+    pkgname <- .rmpkg(packageName)
     for(pkg in search()[-1L]) {
-        if(grepl("^package:", pkg) &&
+	if(startsWith(pkg, "package:") &&
            exists(".Depends", pkg, inherits = FALSE) &&
            pkgname %in% get(".Depends", pkg, inherits = FALSE))
             if(force)
                 warning(gettextf("package %s is required by %s, which may no longer work correctly",
-                                 sQuote(pkgname), sQuote(sub("^package:", "", pkg))),
+				 sQuote(pkgname), sQuote(.rmpkg(pkg))),
                      call. = FALSE, domain = NA)
             else
                 stop(gettextf("package %s is required by %s so will not be detached",
-                              sQuote(pkgname), sQuote(sub("^package:", "", pkg))),
+			      sQuote(pkgname), sQuote(.rmpkg(pkg))),
                      call. = FALSE, domain = NA)
     }
     env <- as.environment(pos)
@@ -175,7 +180,7 @@ detach <- function(name, pos = 2L, unload = FALSE, character.only = FALSE,
     }
     .Internal(detach(pos))
 
-    if(pkgname %in% loadedNamespaces()) {
+    if(isNamespaceLoaded(pkgname)) {
         ## the lazyload DB is flushed when the namespace is unloaded
         if(unload) {
             tryCatch(unloadNamespace(pkgname),
@@ -187,7 +192,7 @@ detach <- function(name, pos = 2L, unload = FALSE, character.only = FALSE,
         }
     } else {
         if(.isMethodsDispatchOn() && methods:::.hasS4MetaData(env))
-            methods:::cacheMetaData(env, FALSE)
+            methods::cacheMetaData(env, FALSE)
         .Internal(lazyLoadDBflush(paste0(libpath, "/R/", pkgname, ".rdb")))
     }
     invisible()
@@ -197,7 +202,7 @@ detach <- function(name, pos = 2L, unload = FALSE, character.only = FALSE,
 
 ls <- objects <-
     function (name, pos = -1L, envir = as.environment(pos), all.names = FALSE,
-              pattern)
+              pattern, sorted = TRUE)
 {
     if (!missing(name)) {
         pos <- tryCatch(name, error = function(e)e)
@@ -210,10 +215,10 @@ ls <- objects <-
             pos <- name
         }
     }
-    all.names <- .Internal(ls(envir, all.names))
+    all.names <- .Internal(ls(envir, all.names, sorted))
     if (!missing(pattern)) {
         if ((ll <- length(grep("[", pattern, fixed = TRUE))) &&
-            ll != length(grep("]", pattern, fixed = TRUE))) {
+             ll != length(grep("]", pattern, fixed = TRUE))) {
             if (pattern == "[") {
                 pattern <- "\\["
                 warning("replaced regular expression pattern '[' by  '\\\\['")
diff --git a/src/library/base/R/attr.R b/src/library/base/R/attr.R
index d83200a..445a77e 100644
--- a/src/library/base/R/attr.R
+++ b/src/library/base/R/attr.R
@@ -1,7 +1,7 @@
 #  File src/library/base/R/attr.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
-#  Copyright (C) 1995-2012 The R Core Team
+#  Copyright (C) 1995-2015 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
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 `mostattributes<-` <- function(obj, value)
 {
@@ -33,7 +33,7 @@
         ## Be careful to set dim before dimnames.
 	if(h.dim && L == prod(d1)) attr(obj, "dim") <- dm <- d1
 	if(h.dmn && !is.null(dm)) {
-            ddn <- sapply(dn1, length)
+            ddn <- vapply(dn1, length, 1, USE.NAMES=FALSE)
             if( all((dm == ddn)[ddn > 0]) ) attr(obj, "dimnames") <- dn1
         }
         ## don't set if it has 'dim' now
diff --git a/src/library/base/R/autoload.R b/src/library/base/R/autoload.R
index b828c8b..30bed37 100644
--- a/src/library/base/R/autoload.R
+++ b/src/library/base/R/autoload.R
@@ -1,5 +1,5 @@
 #  File src/library/base/R/autoload.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
 #  Copyright (C) 1995-2012 The R Core Team
 #
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 autoload <- function(name, package, reset=FALSE, ...)
 {
@@ -44,7 +44,7 @@ autoloader <- function (name, package, ...)
     ## reset the autoloader
     autoload(name, package, reset = TRUE, ...)
     ## reevaluate the object
-    where <- match(paste("package", package, sep = ":"), search())
+    where <- match(paste0("package:", package), search())
     if (exists(name, where = where, inherits = FALSE))
 	eval(as.name(name), as.environment(where))
     else
diff --git a/src/library/base/R/backquote.R b/src/library/base/R/backquote.R
index 615ffff..da6d9e5 100644
--- a/src/library/base/R/backquote.R
+++ b/src/library/base/R/backquote.R
@@ -1,5 +1,5 @@
 #  File src/library/base/R/backquote.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
 #  Copyright (C) 1995-2012 The R Core Team
 #
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 ## quote() is .Primitive
 
diff --git a/src/library/base/R/backsolve.R b/src/library/base/R/backsolve.R
index 343bc49..369c45d 100644
--- a/src/library/base/R/backsolve.R
+++ b/src/library/base/R/backsolve.R
@@ -1,5 +1,5 @@
 #  File src/library/base/R/backsolve.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
 #  Copyright (C) 1995-2012 The R Core Team
 #
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 forwardsolve <-
     function(l, x, k = ncol(l), upper.tri = FALSE, transpose = FALSE)
diff --git a/src/library/base/R/bindenv.R b/src/library/base/R/bindenv.R
index 6fe615a..6b59562 100644
--- a/src/library/base/R/bindenv.R
+++ b/src/library/base/R/bindenv.R
@@ -1,5 +1,5 @@
 #  File src/library/base/R/bindenv.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
 #  Copyright (C) 1995-2012 The R Core Team
 #
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 lockEnvironment <- function(env, bindings = FALSE)
     .Internal(lockEnvironment(env, bindings))
diff --git a/src/library/base/R/bitwise.R b/src/library/base/R/bitwise.R
index e009718..5b341a4 100644
--- a/src/library/base/R/bitwise.R
+++ b/src/library/base/R/bitwise.R
@@ -1,5 +1,5 @@
 #  File src/library/base/R/octhex.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
 #  Copyright (C) 2012 The R Core Team
 #
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 bitwNot <- function(a) .Internal(bitwiseNot(a))
 
diff --git a/src/library/base/R/builtins.R b/src/library/base/R/builtins.R
index c5dbd59..dec5551 100644
--- a/src/library/base/R/builtins.R
+++ b/src/library/base/R/builtins.R
@@ -1,5 +1,5 @@
 #  File src/library/base/R/builtins.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
 #  Copyright (C) 1995-2012 The R Core Team
 #
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 builtins <- function(internal=FALSE)
     .Internal(builtins(internal))
diff --git a/src/library/base/R/by.R b/src/library/base/R/by.R
index 519fc0d..f64adef 100644
--- a/src/library/base/R/by.R
+++ b/src/library/base/R/by.R
@@ -1,5 +1,5 @@
 #  File src/library/base/R/by.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
 #  Copyright (C) 1995-2013 The R Core Team
 #
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 by <- function(data, INDICES, FUN, ..., simplify = TRUE) UseMethod("by")
 
@@ -61,7 +61,7 @@ print.by <- function(x, ..., vsep)
     dn <- dimnames(x)
     dnn <- names(dn)
     if(missing(vsep))
-        vsep <- paste(rep.int("-", 0.75*getOption("width")), collapse = "")
+        vsep <- strrep("-", 0.75 * getOption("width"))
     lapply(X = seq_along(x), FUN = function(i, x, vsep, ...) {
         if(i != 1L && !is.null(vsep)) cat(vsep, "\n")
         ii <- i - 1L
diff --git a/src/library/base/R/callCC.R b/src/library/base/R/callCC.R
index f647b3a..8a0761f 100644
--- a/src/library/base/R/callCC.R
+++ b/src/library/base/R/callCC.R
@@ -1,5 +1,5 @@
 #  File src/library/base/R/callCC.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
 #  Copyright (C) 1995-2012 The R Core Team
 #
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 callCC <- function(fun) {
     value <- NULL
diff --git a/src/library/base/R/cat.R b/src/library/base/R/cat.R
index b55cdc3..5a841e2 100644
--- a/src/library/base/R/cat.R
+++ b/src/library/base/R/cat.R
@@ -1,5 +1,5 @@
 #  File src/library/base/R/cat.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
 #  Copyright (C) 1995-2012 The R Core Team
 #
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 cat <- function(..., file = "", sep = " ", fill = FALSE,
                 labels = NULL, append = FALSE)
diff --git a/src/library/base/R/character.R b/src/library/base/R/character.R
index 87b52c5..1a30f05 100644
--- a/src/library/base/R/character.R
+++ b/src/library/base/R/character.R
@@ -1,7 +1,7 @@
 #  File src/library/base/R/character.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
-#  Copyright (C) 1995-2013 The R Core Team
+#  Copyright (C) 1995-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
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 substr <- function(x, start, stop)
 {
@@ -30,6 +30,9 @@ substring <- function(text, first, last=1000000L)
     .Internal(substr(text, as.integer(first), as.integer(last)))
 }
 
+startsWith <- function(x, prefix) .Internal(startsWith(x, prefix))
+endsWith   <- function(x, suffix) .Internal(endsWith  (x, suffix))
+
 `substr<-` <- function(x, start, stop, value)
     .Internal(`substr<-`(x, as.integer(start), as.integer(stop), value))
 
@@ -38,21 +41,22 @@ substring <- function(text, first, last=1000000L)
 
 abbreviate <-
     function(names.arg, minlength = 4L, use.classes = TRUE, dot = FALSE,
-             strict = FALSE, method = c("left.kept", "both.sides"))
+             strict = FALSE, method = c("left.kept", "both.sides"),
+             named = TRUE)
 {
-    ## we just ignore use.classes
-    if(minlength <= 0L)
-	return(rep.int("", length(names.arg)))
+    if(minlength <= 0L) {
+        x <- rep.int("", length(names.arg))
+        if(named) names(x) <- names.arg
+        return(x)
+    }
     ## need to remove leading/trailing spaces before we check for dups
-    ## This is inefficient but easier than modifying do_abbrev (=> FIXME !)
     names.arg <- sub("^ +", "", sub(" +$", "", as.character(names.arg)))
     dups <- duplicated(names.arg)
     old <- names.arg
-    if(any(dups))
-	names.arg <- names.arg[!dups]
+    if(any(dups)) names.arg <- names.arg[!dups]
     x <- names.arg
     if(strict) {
-	x[] <- .Internal(abbreviate(x, minlength, use.classes))
+        x[] <- .Internal(abbreviate(x, minlength, use.classes))
     } else {
 	method <- match.arg(method)
 	if(method == "both.sides")
@@ -77,12 +81,12 @@ abbreviate <-
 	}
     }
     if(any(dups))
-	x <- x[match(old,names.arg)]
+	x <- x[match(old, names.arg)]
     if(dot) {			    # add "." where we did abbreviate:
 	chgd <- x != old
 	x[chgd] <- paste0(x[chgd],".")
     }
-    names(x) <- old
+    if(named) names(x) <- old
     x
 }
 
@@ -191,3 +195,10 @@ dQuote <- function(x)
 strtoi <-
 function(x, base = 0L)
     .Internal(strtoi(as.character(x), as.integer(base)))
+
+strrep <-
+function(x, times)
+{
+    if(!is.character(x)) x <- as.character(x)
+    .Internal(strrep(x, as.integer(times)))
+}
diff --git a/src/library/base/R/chol.R b/src/library/base/R/chol.R
index e363146..f4d0395 100644
--- a/src/library/base/R/chol.R
+++ b/src/library/base/R/chol.R
@@ -1,5 +1,5 @@
 #  File src/library/base/R/chol.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
 #  Copyright (C) 1995-2013 The R Core Team
 #
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 chol <- function(x, ...) UseMethod("chol")
 
diff --git a/src/library/base/R/colSums.R b/src/library/base/R/colSums.R
index c180d5a..778dc9c 100644
--- a/src/library/base/R/colSums.R
+++ b/src/library/base/R/colSums.R
@@ -1,7 +1,7 @@
 #  File src/library/base/R/colSums.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
-#  Copyright (C) 1995-2012 The R Core Team
+#  Copyright (C) 1995-2015 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
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 
 ## NB: we now have  implicitGeneric() on these,
@@ -27,16 +27,16 @@ colSums <- function(x, na.rm = FALSE, dims = 1L)
         stop("'x' must be an array of at least two dimensions")
     if(dims < 1L || dims > length(dn) - 1L)
         stop("invalid 'dims'")
-    n <- prod(dn[1L:dims])
-    dn <- dn[-(1L:dims)]
+    n <- prod(dn[id <- seq_len(dims)])
+    dn <- dn[-id]
     z <- if(is.complex(x))
         .Internal(colSums(Re(x), n, prod(dn), na.rm)) +
             1i * .Internal(colSums(Im(x), n, prod(dn), na.rm))
     else .Internal(colSums(x, n, prod(dn), na.rm))
     if(length(dn) > 1L) {
         dim(z) <- dn
-        dimnames(z) <- dimnames(x)[-(1L:dims)]
-    } else names(z) <- dimnames(x)[[dims+1]]
+        dimnames(z) <- dimnames(x)[-id]
+    } else names(z) <- dimnames(x)[[dims+1L]]
     z
 }
 
@@ -47,16 +47,16 @@ colMeans <- function(x, na.rm = FALSE, dims = 1L)
         stop("'x' must be an array of at least two dimensions")
     if(dims < 1L || dims > length(dn) - 1L)
         stop("invalid 'dims'")
-    n <- prod(dn[1L:dims])
-    dn <- dn[-(1L:dims)]
+    n <- prod(dn[id <- seq_len(dims)])
+    dn <- dn[-id]
     z <- if(is.complex(x))
         .Internal(colMeans(Re(x), n, prod(dn), na.rm)) +
             1i * .Internal(colMeans(Im(x), n, prod(dn), na.rm))
     else .Internal(colMeans(x, n, prod(dn), na.rm))
     if(length(dn) > 1L) {
         dim(z) <- dn
-        dimnames(z) <- dimnames(x)[-(1L:dims)]
-    } else names(z) <- dimnames(x)[[dims+1]]
+        dimnames(z) <- dimnames(x)[-id]
+    } else names(z) <- dimnames(x)[[dims+1L]]
     z
 }
 
@@ -67,16 +67,16 @@ rowSums <- function(x, na.rm = FALSE, dims = 1L)
         stop("'x' must be an array of at least two dimensions")
     if(dims < 1L || dims > length(dn) - 1L)
         stop("invalid 'dims'")
-    p <- prod(dn[-(1L:dims)])
-    dn <- dn[1L:dims]
+    p <- prod(dn[-(id <- seq_len(dims))])
+    dn <- dn[id]
     z <- if(is.complex(x))
         .Internal(rowSums(Re(x), prod(dn), p, na.rm)) +
             1i * .Internal(rowSums(Im(x), prod(dn), p, na.rm))
     else .Internal(rowSums(x, prod(dn), p, na.rm))
     if(length(dn) > 1L) {
         dim(z) <- dn
-        dimnames(z) <- dimnames(x)[1L:dims]
-    } else  names(z) <- dimnames(x)[[1L]]
+        dimnames(z) <- dimnames(x)[id]
+    } else names(z) <- dimnames(x)[[1L]]
     z
 }
 
@@ -87,25 +87,25 @@ rowMeans <- function(x, na.rm = FALSE, dims = 1L)
         stop("'x' must be an array of at least two dimensions")
     if(dims < 1L || dims > length(dn) - 1L)
         stop("invalid 'dims'")
-    p <- prod(dn[-(1L:dims)])
-    dn <- dn[1L:dims]
+    p <- prod(dn[-(id <- seq_len(dims))])
+    dn <- dn[id]
     z <- if(is.complex(x))
         .Internal(rowMeans(Re(x), prod(dn), p, na.rm)) +
             1i * .Internal(rowMeans(Im(x), prod(dn), p, na.rm))
     else .Internal(rowMeans(x, prod(dn), p, na.rm))
     if(length(dn) > 1L) {
         dim(z) <- dn
-        dimnames(z) <- dimnames(x)[1L:dims]
-    } else  names(z) <- dimnames(x)[[1L]]
+        dimnames(z) <- dimnames(x)[id]
+    } else names(z) <- dimnames(x)[[1L]]
     z
 }
 
-.colSums <- function(X, m, n, na.rm = FALSE)
-    .Internal(colSums(X, m, n, na.rm))
-.colMeans <- function(X, m, n, na.rm = FALSE)
-    .Internal(colMeans(X, m, n, na.rm))
+.colSums <- function(x, m, n, na.rm = FALSE)
+    .Internal(colSums(x, m, n, na.rm))
+.colMeans <- function(x, m, n, na.rm = FALSE)
+    .Internal(colMeans(x, m, n, na.rm))
 
-.rowSums <- function(X, m, n, na.rm = FALSE)
-    .Internal(rowSums(X, m, n, na.rm))
-.rowMeans <- function(X, m, n, na.rm = FALSE)
-    .Internal(rowMeans(X, m, n, na.rm))
+.rowSums <- function(x, m, n, na.rm = FALSE)
+    .Internal(rowSums(x, m, n, na.rm))
+.rowMeans <- function(x, m, n, na.rm = FALSE)
+    .Internal(rowMeans(x, m, n, na.rm))
diff --git a/src/library/base/R/conditions.R b/src/library/base/R/conditions.R
index a380ac4..cca254b 100644
--- a/src/library/base/R/conditions.R
+++ b/src/library/base/R/conditions.R
@@ -1,5 +1,5 @@
 #  File src/library/base/R/conditions.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
 #  Copyright (C) 1995-2012 The R Core Team
 #
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 ##
 ## Handling Conditions
@@ -309,3 +309,9 @@ withRestarts <- function(expr, ...) {
 
 .handleSimpleError <- function(h, msg, call)
     h(simpleError(msg, call))
+
+.tryResumeInterrupt <- function() {
+    r <- findRestart("resume")
+    if (! is.null(r))
+        invokeRestart(r)
+}
diff --git a/src/library/base/R/conflicts.R b/src/library/base/R/conflicts.R
index 0b86074..915f8a3 100644
--- a/src/library/base/R/conflicts.R
+++ b/src/library/base/R/conflicts.R
@@ -1,5 +1,5 @@
 #  File src/library/base/R/conflicts.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
 #  Copyright (C) 1998 B. D. Ripley
 #  Copyright (C) 2005-2011 The R Core Team
@@ -15,7 +15,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 conflicts <- function(where = search(), detail = FALSE)
 {
diff --git a/src/library/base/R/connections.R b/src/library/base/R/connections.R
index 1e77870..4b55fee 100644
--- a/src/library/base/R/connections.R
+++ b/src/library/base/R/connections.R
@@ -1,7 +1,7 @@
 #  File src/library/base/R/connections.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
-#  Copyright (C) 1995-2014 The R Core Team
+#  Copyright (C) 1995-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
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 stdin <- function() .Internal(stdin())
 stdout <- function() .Internal(stdout())
@@ -75,9 +75,10 @@ flush.connection <- function (con)
     .Internal(flush(con))
 
 file <- function(description = "", open = "", blocking = TRUE,
-                 encoding = getOption("encoding"), raw = FALSE)
-    .Internal(file(description, open, blocking, encoding, raw))
-
+                 encoding = getOption("encoding"), raw = FALSE,
+                 method = getOption("url.method", "default")) {
+    .Internal(file(description, open, blocking, encoding, method, raw))
+}
 pipe <- function(description, open = "", encoding = getOption("encoding"))
     .Internal(pipe(description, open, encoding))
 
@@ -86,8 +87,12 @@ fifo <- function(description, open = "", blocking = FALSE,
     .Internal(fifo(description, open, blocking, encoding))
 
 url <- function(description, open = "", blocking = TRUE,
-                encoding = getOption("encoding"))
-    .Internal(url(description, open, blocking, encoding))
+                encoding = getOption("encoding"),
+                method = getOption("url.method", "default"))
+{
+    method <- match.arg(method, c("default", "internal", "libcurl", "wininet"))
+    .Internal(url(description, open, blocking, encoding, method))
+}
 
 gzfile <- function(description, open = "",
                    encoding = getOption("encoding"), compression = 6)
@@ -152,10 +157,12 @@ truncate.connection <- function(con, ...)
     .Internal(truncate(con))
 }
 
-pushBack <- function(data, connection, newLine = TRUE, encoding = c("", "bytes", "UTF-8")) {
-    # match.arg doesn't work on "" default
-    if (length(encoding) > 1) encoding <- encoding[1]
-    if (nchar(encoding)) encoding <- match.arg(encoding)
+pushBack <- function(data, connection, newLine = TRUE,
+                     encoding = c("", "bytes", "UTF-8"))
+{
+    # match.arg doesn't work on "" default
+    if (length(encoding) > 1L) encoding <- encoding[1]
+    if (nzchar(encoding)) encoding <- match.arg(encoding)
     type <- match(encoding, c("", "bytes", "UTF-8"))
     .Internal(pushBack(data, connection, newLine, type))
 }
@@ -168,7 +175,18 @@ clearPushBack <- function(connection)
 
 print.connection <- function(x, ...)
 {
-    print(unlist(summary(x)))
+    usumm <- tryCatch(unlist(summary(x)), error = function(e) {})
+    ## could also show  as.numeric(x) {as str() currently does}
+    if(is.null(usumm)) {
+	cl <- oldClass(x); cl <- cl[cl != "connection"]
+	cat("A connection, ",
+	    if(length(cl)) paste0("specifically, ",
+				  paste(sQuote(cl), collapse=", "), ", "),
+	    "but invalid.\n", sep = "")
+    } else {
+	cat("A connection with") # {newline from print() below}
+	print(cbind(` ` = usumm), ...)
+    }
     invisible(x)
 }
 
@@ -260,8 +278,8 @@ writeChar <- function(object, con, nchars = nchar(object, type="chars"),
     .Internal(writeChar(object, con, as.integer(nchars), eos, useBytes))
 }
 
-gzcon <- function(con, level = 6, allowNonCompressed = TRUE)
-    .Internal(gzcon(con, level, allowNonCompressed))
+gzcon <- function(con, level = 6, allowNonCompressed = TRUE, text = FALSE)
+    .Internal(gzcon(con, level, allowNonCompressed, text))
 
 socketSelect <- function(socklist, write = FALSE, timeout = NULL) {
     if (is.null(timeout))
diff --git a/src/library/base/R/constants.R b/src/library/base/R/constants.R
index 546c39e..dd88315 100644
--- a/src/library/base/R/constants.R
+++ b/src/library/base/R/constants.R
@@ -1,5 +1,5 @@
 #  File src/library/base/R/constants.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
 #  Copyright (C) 1995-2012 The R Core Team
 #
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 pi <- 4*atan(1)
 
diff --git a/src/library/base/R/contributors.R b/src/library/base/R/contributors.R
index 539d4d5..260ec3d 100644
--- a/src/library/base/R/contributors.R
+++ b/src/library/base/R/contributors.R
@@ -1,5 +1,5 @@
 #  File src/library/base/R/contributors.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
 #  Copyright (C) 1995-2012 The R Core Team
 #
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 contributors <- function()
 {
diff --git a/src/library/base/R/cut.R b/src/library/base/R/cut.R
index 7a78e7b..1ac5c52 100644
--- a/src/library/base/R/cut.R
+++ b/src/library/base/R/cut.R
@@ -1,5 +1,5 @@
 #  File src/library/base/R/cut.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
 #  Copyright (C) 1995-2014 The R Core Team
 #
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 cut <- function(x, ...) UseMethod("cut")
 
@@ -49,7 +49,7 @@ cut.default <-
 	    if(ok) paste0(if(right)"(" else "[",
                           ch.br[-nb], ",", ch.br[-1L],
                           if(right)"]" else ")")
-	    else paste("Range", seq_len(nb - 1L), sep="_")
+	    else paste0("Range_", seq_len(nb - 1L))
         if (ok && include.lowest) {
             if (right)
                 substr(labels[1L], 1L, 1L) <- "[" # was "("
diff --git a/src/library/base/R/data.matrix.R b/src/library/base/R/data.matrix.R
index e9ca88d..70f6834 100644
--- a/src/library/base/R/data.matrix.R
+++ b/src/library/base/R/data.matrix.R
@@ -1,5 +1,5 @@
 #  File src/library/base/R/data.matrix.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
 #  Copyright (C) 1995-2012 The R Core Team
 #
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 data.matrix <- function(frame, rownames.force = NA)
 {
diff --git a/src/library/base/R/dataframe.R b/src/library/base/R/dataframe.R
index 4d804ac..95cda26 100644
--- a/src/library/base/R/dataframe.R
+++ b/src/library/base/R/dataframe.R
@@ -1,5 +1,5 @@
 #  File src/library/base/R/dataframe.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
 #  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
@@ -12,10 +12,10 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 # Statlib code by John Chambers, Bell Labs, 1994
-# Changes Copyright (C) 1998-2013 The R Core Team
+# Changes Copyright (C) 1998-2016 The R Core Team
 
 
 ## As from R 2.4.0, row.names can be either character or integer.
@@ -170,50 +170,60 @@ as.data.frame.data.frame <- function(x, row.names = NULL, ...)
 ## prior to 1.8.0 this coerced names - PR#3280
 as.data.frame.list <-
     function(x, row.names = NULL, optional = FALSE, ...,
+	     cut.names = FALSE, col.names = names(x), fix.empty.names = TRUE,
              stringsAsFactors = default.stringsAsFactors())
 {
     ## need to protect names in x.
-    cn <- names(x)
-    m <- match(c("row.names", "check.rows", "check.names", "stringsAsFactors"),
-               cn, 0L)
-    if(any(m)) {
-        cn[m] <- paste0("..adfl.", cn[m])
-        names(x) <- cn
-    }
-    x <- eval(as.call(c(expression(data.frame), x, check.names = !optional,
-                        stringsAsFactors = stringsAsFactors)))
-    if(any(m)) names(x) <- sub("^\\.\\.adfl\\.", "", names(x))
-    if(!is.null(row.names)) {
-	# row.names <- as.character(row.names)
-	if(length(row.names) != dim(x)[[1L]])
-            stop(sprintf(ngettext(length(row.names),
-                                  "supplied %d row name for %d rows",
-                                  "supplied %d row names for %d rows"),
-                         length(row.names), dim(x)[[1L]]), domain = NA)
-	attr(x, "row.names") <- row.names
+    ## truncate any of more than 256 (or cut.names) bytes:
+    new.nms <- !missing(col.names)
+    if(cut.names) {
+	maxL <- if(is.logical(cut.names)) 256L else as.integer(cut.names)
+	if(any(long <- nchar(col.names, "bytes", keepNA = FALSE) > maxL))
+	    col.names[long] <- paste(substr(col.names[long], 1L, maxL - 6L), "...")
+	else cut.names <- FALSE
     }
+    m <- match(names(formals(data.frame))[-1L],
+	       ## c("row.names", "check.rows", ...., "stringsAsFactors"),
+	       col.names, 0L)
+    if(any.m <- any(m)) col.names[m] <- paste0("..adfl.", col.names[m])
+    if(new.nms || any.m || cut.names) names(x) <- col.names
+    if(is.null(check.n <- list(...)$check.names)) check.n <- !optional
+    ## data.frame() is picky with its 'row.names':
+    alis <- c(list(check.names = check.n, fix.empty.names = fix.empty.names,
+		   stringsAsFactors = stringsAsFactors),
+	      if(!is.null(row.names)) list(row.names = row.names))
+    x <- do.call(data.frame, c(x, alis))
+    if(any.m) names(x) <- sub("^\\.\\.adfl\\.", "", names(x))
     x
 }
 
 as.data.frame.vector <- function(x, row.names = NULL, optional = FALSE, ...,
-                                 nm = paste(deparse(substitute(x),
-                                 width.cutoff = 500L), collapse=" ")  )
+				 nm = paste(deparse(substitute(x),
+						    width.cutoff = 500L),
+					    collapse = " "))
 {
     force(nm)
     nrows <- length(x)
+    ## ## row.names -- for now warn about and "forget" illegal row.names
+    ## ##           -- can simplify much (move this *after* the is.null(.) case) once we stop() !
+    if(!(is.null(row.names) || (is.character(row.names) && length(row.names) == nrows))) {
+	warning(gettextf(
+	    "'row.names' is not a character vector of length %d -- omitting it. Will be an error!",
+	    nrows), domain = NA)
+	row.names <- NULL
+    }
     if(is.null(row.names)) {
 	if (nrows == 0L)
 	    row.names <- character()
-	else if(length(row.names <- names(x)) == nrows &&
-		!anyDuplicated(row.names)) {}
-	else row.names <- .set_row_names(nrows)
+	else if(length(row.names <- names(x)) != nrows || anyDuplicated(row.names))
+	    row.names <- .set_row_names(nrows)
     }
+    ## else if(length(row.names) != nrows) # same behavior as the 'matrix' method
+    ##     row.names <- .set_row_names(nrows)
     if(!is.null(names(x))) names(x) <- NULL # remove names as from 2.0.0
     value <- list(x)
     if(!optional) names(value) <- nm
-    attr(value, "row.names") <- row.names
-    class(value) <- "data.frame"
-    value
+    structure(value, row.names = row.names, class = "data.frame")
 }
 
 as.data.frame.ts <- function(x, ...)
@@ -257,13 +267,15 @@ as.data.frame.matrix <- function(x, row.names = NULL, optional = FALSE, ...,
                                  stringsAsFactors = default.stringsAsFactors())
 {
     d <- dim(x)
-    nrows <- d[1L]; ir <- seq_len(nrows)
-    ncols <- d[2L]; ic <- seq_len(ncols)
+    nrows <- d[1L]
+    ncols <- d[2L]
+    ic <- seq_len(ncols)
     dn <- dimnames(x)
     ## surely it cannot be right to override the supplied row.names?
     ## changed in 1.8.0
     if(is.null(row.names)) row.names <- dn[[1L]]
     collabs <- dn[[2L]]
+    ## These might be NA
     if(any(empty <- !nzchar(collabs)))
 	collabs[empty] <- paste0("V", ic)[empty]
     value <- vector("list", ncols)
@@ -338,7 +350,6 @@ as.data.frame.array <- function(x, row.names = NULL, optional = FALSE, ...)
 
 as.data.frame.AsIs <- function(x, row.names = NULL, optional = FALSE, ...)
 {
-    ## why not remove class and NextMethod here?
     if(length(dim(x)) == 2L)
 	as.data.frame.model.matrix(x, row.names, optional)
     else { # as.data.frame.vector without removing names
@@ -365,6 +376,7 @@ as.data.frame.AsIs <- function(x, row.names = NULL, optional = FALSE, ...)
 
 data.frame <-
     function(..., row.names = NULL, check.rows = FALSE, check.names = TRUE,
+	     fix.empty.names = TRUE,
              stringsAsFactors = default.stringsAsFactors())
 {
     data.row.names <-
@@ -378,14 +390,17 @@ data.frame <-
 		    return(new)
 		if(all(current == new) || all(current == ""))
 		    return(new)
-		stop(gettextf("mismatch of row names in arguments of 'data.frame\', item %d", i), domain = NA)
+		stop(gettextf(
+		    "mismatch of row names in arguments of 'data.frame\', item %d", i),
+		    domain = NA)
 	    }
 	else function(current, new, i) {
 	    if(is.null(current)) {
 		if(anyDuplicated(new)) {
-		    warning(gettextf("some row.names duplicated: %s --> row.names NOT used",
-                                     paste(which(duplicated(new)), collapse=",")),
-                            domain = NA)
+		    warning(gettextf(
+                        "some row.names duplicated: %s --> row.names NOT used",
+                        paste(which(duplicated(new)), collapse=",")),
+                        domain = NA)
 		    current
 		} else new
 	    } else current
@@ -420,36 +435,32 @@ data.frame <-
     for(i in seq_len(n)) {
         ## do it this way until all as.data.frame methods have been updated
 	xi <- if(is.character(x[[i]]) || is.list(x[[i]]))
-                 as.data.frame(x[[i]], optional = TRUE,
-                               stringsAsFactors = stringsAsFactors)
-        else as.data.frame(x[[i]], optional = TRUE)
+		  as.data.frame(x[[i]], optional = TRUE,
+				stringsAsFactors = stringsAsFactors)
+	      else as.data.frame(x[[i]], optional = TRUE)
 
         nrows[i] <- .row_names_info(xi) # signed for now
 	ncols[i] <- length(xi)
 	namesi <- names(xi)
 	if(ncols[i] > 1L) {
 	    if(length(namesi) == 0L) namesi <- seq_len(ncols[i])
-	    if(no.vn[i]) vnames[[i]] <- namesi
-	    else vnames[[i]] <- paste(vnames[[i]], namesi, sep=".")
-	}
-	else {
-            if(length(namesi)) vnames[[i]] <- namesi
-            else if (no.vn[[i]]) {
-                tmpname <- deparse(object[[i]])[1L]
-                if( substr(tmpname, 1L, 2L) == "I(" ) {
-                    ntmpn <- nchar(tmpname, "c")
-                    if(substr(tmpname, ntmpn, ntmpn) == ")")
-                        tmpname <- substr(tmpname, 3L, ntmpn - 1L)
-                }
-                vnames[[i]] <- tmpname
-            }
-        } # end of ncols[i] <= 1
+	    vnames[[i]] <- if(no.vn[i]) namesi
+			   else paste(vnames[[i]], namesi, sep=".")
+	} else if(length(namesi)) {
+	    vnames[[i]] <- namesi
+	} else if (fix.empty.names && no.vn[[i]]) {
+	    tmpname <- deparse(object[[i]], nlines = 1L)[1L]
+	    if(substr(tmpname, 1L, 2L) == "I(") { ## from 'I(*)', only keep '*':
+		ntmpn <- nchar(tmpname, "c")
+		if(substr(tmpname, ntmpn, ntmpn) == ")")
+		    tmpname <- substr(tmpname, 3L, ntmpn - 1L)
+	    }
+	    vnames[[i]] <- tmpname
+	} ## else vnames[[i]] are not changed
 	if(mirn && nrows[i] > 0L) {
             rowsi <- attr(xi, "row.names")
             ## Avoid all-blank names
-            nc <- nchar(rowsi, allowNA = FALSE)
-            nc <- nc[!is.na(nc)]
-            if(length(nc) && any(nc))
+            if(any(nzchar(rowsi)))
                 row.names <- data.row.names(row.names, rowsi, i)
         }
         nrows[i] <- abs(nrows[i])
@@ -488,11 +499,16 @@ data.frame <-
     value <- unlist(vlist, recursive=FALSE, use.names=FALSE)
     ## unlist() drops i-th component if it has 0 columns
     vnames <- unlist(vnames[ncols > 0L])
-    noname <- !nzchar(vnames)
-    if(any(noname))
-	vnames[noname] <- paste("Var", seq_along(vnames), sep = ".")[noname]
-    if(check.names)
-	vnames <- make.names(vnames, unique=TRUE)
+    if(fix.empty.names && any(noname <- !nzchar(vnames)))
+	vnames[noname] <- paste0("Var.", seq_along(vnames))[noname]
+    if(check.names) {
+	if(fix.empty.names)
+	    vnames <- make.names(vnames, unique=TRUE)
+	else { ## do not fix ""
+	    nz <- nzchar(vnames)
+	    vnames[nz] <- make.names(vnames[nz], unique=TRUE)
+	}
+    }
     names(value) <- vnames
     if(!mrn) { # non-null row.names arg was supplied
         if(length(row.names) == 1L && nr != 1L) {  # one of the variables
@@ -864,6 +880,9 @@ data.frame <-
     n <- length(iseq)
     if(n == 0L) n <- nrows
     p <- length(jseq)
+    if (is.null(value)) {
+        value <- list(NULL)
+    }
     m <- length(value)
     if(!is.list(value)) {
         if(p == 1L) {
@@ -890,7 +909,8 @@ data.frame <-
                                       "replacement has %d items, need %d"),
                              m, n*p), domain = NA)
             value <- matrix(value, n, p)  ## will recycle
-            value <- split(value, col(value))
+            ## <FIXME split.matrix>
+            value <- split(c(value), col(value))
         }
 	dimv <- c(n, p)
     } else { # a list
@@ -941,7 +961,7 @@ data.frame <-
     ncolv <- dimv[2L]
     jvseq <- seq_len(p)
     if(ncolv < p) jvseq <- rep_len(seq_len(ncolv), p)
-    else if(ncolv > p) {
+    else if(p != 0L && ncolv > p) {
         warning(sprintf(ngettext(ncolv,
                                  "provided %d variable to replace %d variables",
                                  "provided %d variables to replace %d variables"),
@@ -1178,7 +1198,9 @@ xpdrows.data.frame <- function(x, old.rows, new.rows)
 	    x[[i]] <- y
 	}
     }
-    attr(x, "row.names") <- c(old.rows, new.rows)
+    nm <- c(old.rows, new.rows)
+    if (any(duplicated(nm))) nm <- make.unique(as.character(nm))
+    attr(x, "row.names") <- nm
     x
 }
 
@@ -1188,7 +1210,8 @@ xpdrows.data.frame <- function(x, old.rows, new.rows)
 cbind.data.frame <- function(..., deparse.level = 1)
     data.frame(..., check.names = FALSE)
 
-rbind.data.frame <- function(..., deparse.level = 1)
+rbind.data.frame <- function(..., deparse.level = 1, make.row.names = TRUE,
+                             stringsAsFactors = default.stringsAsFactors())
 {
     match.names <- function(clabs, nmi)
     {
@@ -1201,25 +1224,15 @@ rbind.data.frame <- function(..., deparse.level = 1)
             m
 	} else stop("names do not match previous names")
     }
-    Make.row.names <- function(nmi, ri, ni, nrow)
-    {
-	if(nzchar(nmi)) {
-            if(ni == 0L) character()  # PR8506
-	    else if(ni > 1L) paste(nmi, ri, sep = ".")
-	    else nmi
-	}
-	else if(nrow > 0L && identical(ri, seq_len(ni)))
-	    as.integer(seq.int(from = nrow + 1L, length.out = ni))
-	else ri
-    }
     allargs <- list(...)
-    allargs <- allargs[vapply(allargs, length, 1L) > 0L]
+    allargs <- allargs[lengths(allargs) > 0L]
     if(length(allargs)) {
-    ## drop any zero-row data frames, as they may not have proper column
-    ## types (e.g. NULL).
+        ## drop any zero-row data frames, as they may not have proper column
+        ## types (e.g. NULL).
         nr <- vapply(allargs, function(x)
                      if(is.data.frame(x)) .row_names_info(x, 2L)
-                     else if(is.list(x)) length(x[[1L]]) # mismatched lists are checked later
+                     else if(is.list(x)) length(x[[1L]])
+					# mismatched lists are checked later
                      else length(x), 1L)
         if(any(nr > 0L)) allargs <- allargs[nr > 0L]
         else return(allargs[[1L]]) # pretty arbitrary
@@ -1233,7 +1246,27 @@ rbind.data.frame <- function(..., deparse.level = 1)
     if(is.null(nms))
 	nms <- character(n)
     cl <- NULL
-    perm <- rows <- rlabs <- vector("list", n)
+    perm <- rows <- vector("list", n)
+    if(make.row.names) {
+	rlabs <- rows
+	autoRnms <- TRUE # result with 1:nrow(.) row names? [efficiency!]
+	Make.row.names <- function(nmi, ri, ni, nrow)
+	{
+	    if(nzchar(nmi)) {
+		if(autoRnms) autoRnms <<- FALSE
+		if(ni == 0L) character()  # PR8506
+		else if(ni > 1L) paste(nmi, ri, sep = ".")
+		else nmi
+	    }
+	    else if(autoRnms && nrow > 0L && identical(ri, seq_len(ni)))
+		as.integer(seq.int(from = nrow + 1L, length.out = ni))
+	    else {
+		if(autoRnms && (nrow > 0L || !identical(ri, seq_len(ni))))
+		    autoRnms <<- FALSE
+		ri
+	    }
+	}
+    }
     nrow <- 0L
     value <- clabs <- NULL
     all.levs <- list()
@@ -1242,13 +1275,14 @@ rbind.data.frame <- function(..., deparse.level = 1)
 	xi <- allargs[[i]]
 	nmi <- nms[i]
         ## coerce matrix to data frame
-        if(is.matrix(xi)) allargs[[i]] <- xi <- as.data.frame(xi)
+        if(is.matrix(xi)) allargs[[i]] <- xi <-
+            as.data.frame(xi, stringsAsFactors = stringsAsFactors)
 	if(inherits(xi, "data.frame")) {
 	    if(is.null(cl))
 		cl <- oldClass(xi)
 	    ri <- attr(xi, "row.names")
 	    ni <- length(ri)
-	    if(is.null(clabs))
+	    if(is.null(clabs)) ## first time
 		clabs <- names(xi)
 	    else {
                 if(length(xi) != length(clabs))
@@ -1257,21 +1291,21 @@ rbind.data.frame <- function(..., deparse.level = 1)
 		if( !is.null(pi) ) perm[[i]] <- pi
 	    }
 	    rows[[i]] <- seq.int(from = nrow + 1L, length.out = ni)
-	    rlabs[[i]] <- Make.row.names(nmi, ri, ni, nrow)
+	    if(make.row.names) rlabs[[i]] <- Make.row.names(nmi, ri, ni, nrow)
 	    nrow <- nrow + ni
-	    if(is.null(value)) {
+	    if(is.null(value)) { ## first time ==> setup once:
 		value <- unclass(xi)
 		nvar <- length(value)
 		all.levs <- vector("list", nvar)
-		has.dim <- logical(nvar)
-                facCol <- logical(nvar)
-                ordCol <- logical(nvar)
+		has.dim <- facCol <- ordCol <- logical(nvar)
 		for(j in seq_len(nvar)) {
 		    xj <- value[[j]]
-		    if( !is.null(levels(xj)) ) {
-			all.levs[[j]] <- levels(xj)
-                        facCol[j] <- TRUE # turn categories into factors
-                    } else facCol[j] <- is.factor(xj)
+                    facCol[j] <-
+                        if(!is.null(levels(xj))) {
+                            all.levs[[j]] <- levels(xj)
+                            TRUE # turn categories into factors
+                        } else
+                            is.factor(xj)
                     ordCol[j] <- is.ordered(xj)
 		    has.dim[j] <- length(dim(xj)) == 2L
 		}
@@ -1289,14 +1323,14 @@ rbind.data.frame <- function(..., deparse.level = 1)
             }
 	}
 	else if(is.list(xi)) {
-	    ni <- range(vapply(xi, length, 1L))
+	    ni <- range(lengths(xi))
 	    if(ni[1L] == ni[2L])
 		ni <- ni[1L]
 	    else stop("invalid list argument: all variables should have the same length")
 	    rows[[i]] <- ri <-
                 as.integer(seq.int(from = nrow + 1L, length.out = ni))
 	    nrow <- nrow + ni
-	    rlabs[[i]] <- Make.row.names(nmi, ri, ni, nrow)
+	    if(make.row.names) rlabs[[i]] <- Make.row.names(nmi, ri, ni, nrow)
 	    if(length(nmi <- names(xi)) > 0L) {
 		if(is.null(clabs))
 		    clabs <- nmi
@@ -1308,14 +1342,15 @@ rbind.data.frame <- function(..., deparse.level = 1)
 		}
 	    }
 	}
-	else if(length(xi)) {
+	else if(length(xi)) { # 1 new row
 	    rows[[i]] <- nrow <- nrow + 1L
-	    rlabs[[i]] <- if(nzchar(nmi)) nmi else as.integer(nrow)
+            if(make.row.names)
+		rlabs[[i]] <- if(nzchar(nmi)) nmi else as.integer(nrow)
 	}
     }
     nvar <- length(clabs)
     if(nvar == 0L)
-	nvar <- max(vapply(allargs, length, 1L)) # only vector args
+	nvar <- max(lengths(allargs)) # only vector args
     if(nvar == 0L)
 	return(structure(list(), class = "data.frame",
 			 row.names = integer()))
@@ -1324,9 +1359,7 @@ rbind.data.frame <- function(..., deparse.level = 1)
 	value <- list()
 	value[pseq] <- list(logical(nrow)) # OK for coercion except to raw.
         all.levs <- vector("list", nvar)
-        has.dim <- logical(nvar)
-        facCol <- logical(nvar)
-        ordCol <- logical(nvar)
+	has.dim <- facCol <- ordCol <- logical(nvar)
     }
     names(value) <- clabs
     for(j in pseq)
@@ -1369,15 +1402,19 @@ rbind.data.frame <- function(..., deparse.level = 1)
             }
 	}
     }
-    rlabs <- unlist(rlabs)
-    if(anyDuplicated(rlabs))
-        rlabs <- make.unique(as.character(unlist(rlabs)), sep = "")
+    rlabs <- if(make.row.names && !autoRnms) {
+		 rlabs <- unlist(rlabs)
+		 if(anyDuplicated(rlabs))
+		     make.unique(as.character(rlabs), sep = "")
+		 else
+		     rlabs
+	     } # else NULL
     if(is.null(cl)) {
-	as.data.frame(value, row.names = rlabs)
+	as.data.frame(value, row.names = rlabs, fix.empty.names = TRUE,
+		      stringsAsFactors = stringsAsFactors)
     } else {
-	class(value) <- cl
-	attr(value, "row.names") <- rlabs
-	value
+	structure(value, class = cl,
+		  row.names = if(is.null(rlabs)) .set_row_names(nrow) else rlabs)
     }
 }
 
@@ -1390,9 +1427,9 @@ print.data.frame <-
 {
     n <- length(row.names(x))
     if(length(x) == 0L) {
-        cat(sprintf(ngettext(n, "data frame with 0 columns and %d row",
-                             "data frame with 0 columns and %d rows",
-                             domain = "R-base"), n), "\n", sep = "")
+	cat(sprintf(ngettext(n, "data frame with 0 columns and %d row",
+			     "data frame with 0 columns and %d rows"),
+		    n), "\n", sep = "")
     } else if(n == 0L) {
         ## FIXME: header format is inconsistent here
 	print.default(names(x), quote = FALSE)
@@ -1412,8 +1449,9 @@ as.matrix.data.frame <- function (x, rownames.force = NA, ...)
 {
     dm <- dim(x)
     rn <- if(rownames.force %in% FALSE) NULL
-    else if(rownames.force %in% TRUE) row.names(x)
-    else {if(.row_names_info(x) <= 0L) NULL else row.names(x)}
+	  else if(rownames.force %in% TRUE) row.names(x)
+	  else if(.row_names_info(x) <= 0L) NULL
+	  else row.names(x)
     dn <- list(rn, names(x))
     if(any(dm == 0L))
 	return(array(NA, dim = dm, dimnames = dn))
@@ -1435,7 +1473,7 @@ as.matrix.data.frame <- function (x, rownames.force = NA, ...)
 	   || (!is.null(cl <- attr(xj, "class")) && # numeric classed objects to format:
 	       any(cl %in% c("Date", "POSIXct", "POSIXlt"))))
 	    non.numeric <- TRUE
-	if(!is.atomic(xj))
+	if(!is.atomic(xj) && !inherits(xj, "POSIXlt"))
 	    non.atomic <- TRUE
     }
     if(non.atomic) {
@@ -1501,6 +1539,8 @@ Ops.data.frame <- function(e1, e2 = NULL)
     value <- list()
     rn <- NULL
     ## set up call as op(left, right)
+    ## These are used, despite
+    ## _R_CHECK_CODETOOLS_PROFILE_="suppressLocalUnused=FALSE"
     FUN <- get(.Generic, envir = parent.frame(), mode = "function")
     f <- if (unary) quote(FUN(left)) else quote(FUN(left, right))
     lscalar <- rscalar <- FALSE
@@ -1509,7 +1549,8 @@ Ops.data.frame <- function(e1, e2 = NULL)
 	if(.row_names_info(e1) > 0L) rn <- attr(e1, "row.names")
 	cn <- names(e1)
 	if(any(dim(e2) != dim(e1)))
-	    stop(sQuote(.Generic), " only defined for equally-sized data frames")
+	    stop(gettextf("%s only defined for equally-sized data frames",
+                          sQuote(.Generic)), domain = NA)
     } else if(lclass) {
 	## e2 is not a data frame, but e1 is.
         nr <- .row_names_info(e1, 2L)
diff --git a/src/library/base/R/dates.R b/src/library/base/R/dates.R
index b8a2441..abb16cf 100644
--- a/src/library/base/R/dates.R
+++ b/src/library/base/R/dates.R
@@ -1,7 +1,7 @@
 #  File src/library/base/R/dates.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
-#  Copyright (C) 1995-2014 The R Core Team
+#  Copyright (C) 1995-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
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 ## First shot at adding a "Date" class to base R.
 ## Representation is the number of whole days since 1970-01-01.
@@ -107,7 +107,7 @@ format.Date <- function(x, ...)
     xx
 }
 
-## could handle arrays for max.print
+## could handle arrays for max.print; cf print.POSIX?t() in ./datetime.R
 print.Date <- function(x, max = NULL, ...)
 {
     if(is.null(max)) max <- getOption("max.print", 9999L)
@@ -115,7 +115,8 @@ print.Date <- function(x, max = NULL, ...)
 	print(format(x[seq_len(max)]), max=max, ...)
 	cat(' [ reached getOption("max.print") -- omitted',
 	    length(x) - max, 'entries ]\n')
-    } else print(format(x), max=max, ...)
+    } else print(if(length(x)) format(x) else paste(class(x)[1L], "of length 0"),
+		 max = max, ...)
     invisible(x)
 }
 
@@ -356,7 +357,7 @@ cut.Date <-
 	    start$mday <- 1L
             start$isdst <- -1L
 	    end <- as.POSIXlt(max(x, na.rm = TRUE))
-	    step <- ifelse(length(by2) == 2L, as.integer(by2[1L]), 1L)
+	    step <- if(length(by2) == 2L) as.integer(by2[1L]) else 1L
 	    end <- as.POSIXlt(end + (31 * step * 86400))
 	    end$mday <- 1L
             end$isdst <- -1L
@@ -366,7 +367,7 @@ cut.Date <-
 	    start$mday <- 1L
             start$isdst <- -1L
 	    end <- as.POSIXlt(max(x, na.rm = TRUE))
-	    step <- ifelse(length(by2) == 2L, as.integer(by2[1L]), 1L)
+	    step <- if(length(by2) == 2L) as.integer(by2[1L]) else 1L
 	    end <- as.POSIXlt(end + (366 * step * 86400))
 	    end$mon <- 0L
 	    end$mday <- 1L
@@ -379,7 +380,7 @@ cut.Date <-
             start$isdst <- -1L
 	    maxx <- max(x, na.rm = TRUE)
 	    end <- as.POSIXlt(maxx)
-	    step <- ifelse(length(by2) == 2L, as.integer(by2[1L]), 1L)
+	    step <- if(length(by2) == 2L) as.integer(by2[1L]) else 1L
 	    end <- as.POSIXlt(end + (93 * step * 86400))
 	    end$mon <- qtr[end$mon + 1L]
 	    end$mday <- 1L
@@ -467,11 +468,11 @@ is.numeric.Date <- function(x) FALSE
 
 ## ---- additions in 2.8.0 -----
 
-split.Date <-
-function(x, f, drop = FALSE, ...)
+split.Date <- function(x, f, drop = FALSE, ...)
 {
-    y <- split.default(as.integer(x), f, drop = drop)
-    for(i in seq_along(y)) class(y[[i]]) <- "Date"
+    oclass <- class(x)
+    y <- split.default(unclass(x), f, drop = drop, ...)
+    for(i in seq_along(y)) class(y[[i]]) <- oclass
     y
 }
 
diff --git a/src/library/base/R/datetime.R b/src/library/base/R/datetime.R
index dfdd7a8..6815478 100644
--- a/src/library/base/R/datetime.R
+++ b/src/library/base/R/datetime.R
@@ -1,7 +1,7 @@
 #  File src/library/base/R/datetime.R
-#  Part of the R package, http://www.R-project.org
+#  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
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 Sys.time <- function() .POSIXct(.Internal(Sys.time()))
 
@@ -23,8 +23,27 @@ 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") # Linux, OS X, ...
+    lt <- normalizePath("/etc/localtime") # Linux, macOS, ...
     if (grepl(pat <- "^/usr/share/zoneinfo/", lt)) sub(pat, "", 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_
 }
 
@@ -162,21 +181,22 @@ length.POSIXlt <- function(x) length(x[[1L]])
 format.POSIXlt <- function(x, format = "", usetz = FALSE, ...)
 {
     if(!inherits(x, "POSIXlt")) stop("wrong class")
-    if(format == "") {
+    if(any(f0 <- format == "")) {
         ## need list [ method here.
-        times <- unlist(unclass(x)[1L:3L])
-        secs <- x$sec; secs <- secs[!is.na(secs)]
+	times <- unlist(unclass(x)[1L:3L])[f0]
+	secs <- x$sec[f0]; secs <- secs[!is.na(secs)]
         np <- getOption("digits.secs")
-        if(is.null(np)) np <- 0L else np <- min(6L, np)
+        np <- if(is.null(np)) 0L else min(6L, np)
         if(np >= 1L)
             for (i in seq_len(np)- 1L)
                 if(all( abs(secs - round(secs, i)) < 1e-6 )) {
                     np <- i
                     break
                 }
-        format <- if(all(times[!is.na(times)] == 0)) "%Y-%m-%d"
-        else if(np == 0L) "%Y-%m-%d %H:%M:%S"
-        else paste0("%Y-%m-%d %H:%M:%OS", np)
+	format[f0] <-
+	    if(all(times[!is.na(times)] == 0)) "%Y-%m-%d"
+	    else if(np == 0L) "%Y-%m-%d %H:%M:%S"
+	    else paste0("%Y-%m-%d %H:%M:%OS", np)
     }
     ## <FIXME>
     ## Move names handling to C code eventually ...
@@ -205,33 +225,28 @@ strptime <- function(x, format, tz = "")
 format.POSIXct <- function(x, format = "", tz = "", usetz = FALSE, ...)
 {
     if(!inherits(x, "POSIXct")) stop("wrong class")
+    ## NB identical(tz, "") is *NOT* the same as missing(tz)
     if(missing(tz) && !is.null(tzone <- attr(x, "tzone"))) tz <- tzone
     structure(format.POSIXlt(as.POSIXlt(x, tz), format, usetz, ...),
               names = names(x))
 }
 
-## could handle arrays for max.print
-print.POSIXct <- function(x, ...)
+## could handle arrays for max.print \\ keep in sync with  print.Date() in ./dates.R
+print.POSIXct <-
+print.POSIXlt <- function(x, tz = "", usetz = TRUE, ...)
 {
     max.print <- getOption("max.print", 9999L)
+    FORM <- if(missing(tz)) function(z) format(x, usetz = usetz)
+	    else function(z) format(x, tz = tz, usetz = usetz)
     if(max.print < length(x)) {
-        print(format(x[seq_len(max.print)], usetz = TRUE), ...)
+	print(FORM(x[seq_len(max.print)]), ...)
         cat(' [ reached getOption("max.print") -- omitted',
             length(x) - max.print, 'entries ]\n')
-    } else print(format(x, usetz = TRUE), ...)
+    } else
+	print(if(length(x)) FORM(x) else paste(class(x)[1L], "of length 0"), ...)
     invisible(x)
 }
 
-print.POSIXlt <- function(x, ...)
-{
-    max.print <- getOption("max.print", 9999L)
-    if(max.print < length(x)) {
-        print(format(x[seq_len(max.print)], usetz = TRUE), ...)
-        cat(' [ reached getOption("max.print") -- omitted',
-            length(x) - max.print, 'entries ]\n')
-   } else print(format(x, usetz = TRUE), ...)
-    invisible(x)
-}
 
 summary.POSIXct <- function(object, digits = 15L, ...)
 {
@@ -315,7 +330,7 @@ check_tzones <- function(...)
         y <- attr(x, "tzone")
         if(is.null(y)) "" else y[1L]
     }))
-    tzs <- tzs[tzs != ""]
+    tzs <- tzs[nzchar(tzs)]
     if(length(tzs) > 1L)
         warning("'tzone' attributes are inconsistent")
     if(length(tzs)) tzs[1L] else NULL
@@ -352,7 +367,7 @@ Summary.POSIXlt <- function (..., na.rm)
 function(x, ..., drop = TRUE)
 {
     cl <- oldClass(x)
-    class(x) <- NULL
+    ## class(x) <- NULL
     val <- NextMethod("[")
     class(val) <- cl
     attr(val, "tzone") <- attr(x, "tzone")
@@ -363,7 +378,7 @@ function(x, ..., drop = TRUE)
 function(x, ..., drop = TRUE)
 {
     cl <- oldClass(x)
-    class(x) <- NULL
+    ## class(x) <- NULL
     val <- NextMethod("[[")
     class(val) <- cl
     attr(val, "tzone") <- attr(x, "tzone")
@@ -397,7 +412,7 @@ as.list.POSIXct <- function(x, ...)
 }
 
 is.na.POSIXlt <- function(x) is.na(as.POSIXct(x))
-anyNA.POSIXlt <- function(x) anyNA(as.POSIXct(x))
+anyNA.POSIXlt <- function(x, recursive = FALSE) anyNA(as.POSIXct(x))
 
 ## <FIXME> check the argument validity
 ## This is documented to remove the timezone
@@ -412,7 +427,7 @@ c.POSIXlt <- function(..., recursive = FALSE)
 
 ISOdatetime <- function(year, month, day, hour, min, sec, tz = "")
 {
-    if(min(sapply(list(year, month, day, hour, min, sec), length)) == 0L)
+    if(min(vapply(list(year, month, day, hour, min, sec), length, 1, USE.NAMES=FALSE)) == 0L)
         .POSIXct(numeric(), tz = tz)
     else {
         x <- paste(year, month, day, hour, min, sec, sep = "-")
@@ -451,16 +466,16 @@ difftime <-
     z <- unclass(time1) - unclass(time2)
     attr(z, "tzone") <- NULL # it may get copied from args of `-`
     units <- match.arg(units)
-    if(units == "auto") {
-        if(all(is.na(z))) units <- "secs"
-        else {
-            zz <- min(abs(z),na.rm = TRUE)
-            if(is.na(zz) || zz < 60) units <- "secs"
-            else if(zz < 3600) units <- "mins"
-            else if(zz < 86400) units <- "hours"
-            else units <- "days"
-        }
-    }
+    if(units == "auto")
+	units <-
+	    if(all(is.na(z))) "secs"
+	    else {
+		zz <- min(abs(z), na.rm = TRUE)
+		if(!is.finite(zz) || zz < 60) "secs"
+		else if(zz < 3600) "mins"
+		else if(zz < 86400) "hours"
+		else "days"
+	    }
     switch(units,
            "secs" = .difftime(z, units = "secs"),
            "mins" = .difftime(z/60, units = "mins"),
@@ -476,9 +491,9 @@ difftime <-
 as.difftime <- function(tim, format = "%X", units = "auto")
 {
     if (inherits(tim, "difftime")) return(tim)
-    if (is.character(tim)){
+    if (is.character(tim)) {
         difftime(strptime(tim, format = format),
-             strptime("0:0:0", format = "%X"), units = units)
+                 strptime("0:0:0", format = "%X"), units = units)
     } else {
         if (!is.numeric(tim)) stop("'tim' is not character or numeric")
 	if (units == "auto") stop("need explicit units for numeric conversion")
@@ -523,7 +538,7 @@ print.difftime <- function(x, digits = getOption("digits"), ...)
     if(is.array(x) || length(x) > 1L) {
         cat("Time differences in ", attr(x, "units"), "\n", sep = "")
         y <- unclass(x); attr(y, "units") <- NULL
-        print(y)
+	print(y, digits=digits, ...)
     }
     else
         cat("Time difference of ", format(unclass(x), digits = digits), " ",
@@ -542,6 +557,11 @@ print.difftime <- function(x, digits = getOption("digits"), ...)
     val
 }
 
+diff.difftime <- function(x, ...)
+    ## assume class is preserved (it is in diff.default):
+    structure(NextMethod("diff"), units = attr(x, "units"))
+
+
 Ops.difftime <- function(e1, e2)
 {
     coerceTimeUnit <- function(x)
@@ -641,7 +661,7 @@ Summary.difftime <- function (..., na.rm)
     if(Nargs == 0) {
         .difftime(do.call(.Generic), "secs")
     } else {
-        units <- sapply(x, function(x) attr(x, "units"))
+        units <- sapply(x, attr, "units")
         if(all(units == units[1L])) {
             args <- c(lapply(x, as.vector), na.rm = na.rm)
         } else {
@@ -652,6 +672,32 @@ Summary.difftime <- function (..., na.rm)
     }
 }
 
+c.difftime <-
+function(..., recursive = FALSE)
+{
+    coerceTimeUnit <- function(x) {
+        switch(attr(x, "units"),
+               secs = x, mins = 60*x, hours = 60*60*x,
+               days = 60*60*24*x, weeks = 60*60*24*7*x)
+    }
+    args <- list(...)
+    if(!length(args)) return(.difftime(double(), "secs"))
+    ind <- sapply(args, inherits, "difftime")
+    pos <- which(!ind)
+    units <- sapply(args[ind], attr, "units")
+    if(all(units == (un1 <- units[1L]))) {
+        if(length(pos))
+            args[pos] <-
+                lapply(args[pos], as.difftime, units = un1)
+        .difftime(unlist(args), un1)
+    } else {
+        if(length(pos))
+            args[pos] <-
+                lapply(args[pos], as.difftime, units = "secs")
+        args[ind] <- lapply(args[ind], coerceTimeUnit)
+        .difftime(unlist(args), "secs")
+    }
+}
 
 ## ----- convenience functions -----
 
@@ -792,7 +838,7 @@ cut.POSIXt <-
         if(valid == 6L) {               # months
             start$mday <- 1L
             end <- as.POSIXlt(max(x, na.rm = TRUE))
-            step <- ifelse(length(by2) == 2L, as.integer(by2[1L]), 1L)
+            step <- if(length(by2) == 2L) as.integer(by2[1L]) else 1L
             end <- as.POSIXlt(end + (31 * step * 86400))
             end$mday <- 1L
             end$isdst <- -1L
@@ -801,7 +847,7 @@ cut.POSIXt <-
             start$mon <- 0L
             start$mday <- 1L
             end <- as.POSIXlt(max(x, na.rm = TRUE))
-            step <- ifelse(length(by2) == 2L, as.integer(by2[1L]), 1L)
+            step <- if(length(by2) == 2L) as.integer(by2[1L]) else 1L
             end <- as.POSIXlt(end + (366 * step* 86400))
             end$mon <- 0L
             end$mday <- 1L
@@ -813,7 +859,7 @@ cut.POSIXt <-
             start$mday <- 1L
             maxx <- max(x, na.rm = TRUE)
             end <- as.POSIXlt(maxx)
-            step <- ifelse(length(by2) == 2L, as.integer(by2[1L]), 1L)
+            step <- if(length(by2) == 2L) as.integer(by2[1L]) else 1L
             end <- as.POSIXlt(end + (93 * step * 86400))
             end$mon <- qtr[end$mon + 1L]
             end$mday <- 1L
@@ -849,6 +895,8 @@ julian.POSIXt <- function(x, origin = as.POSIXct("1970-01-01", tz = "GMT"), ...)
     structure(res, "origin" = origin)
 }
 
+## Note that  'abbreviate' works *vectorized* here :
+
 weekdays <- function(x, abbreviate) UseMethod("weekdays")
 weekdays.POSIXt <- function(x, abbreviate = FALSE)
 {
@@ -885,13 +933,12 @@ trunc.POSIXt <- function(x, units = c("secs", "mins", "hours", "days"), ...)
 
 round.POSIXt <- function(x, units = c("secs", "mins", "hours", "days"))
 {
-    ## this gets the default from the generic, as that has two args.
-    if(is.numeric(units) && units == 0.0) units <-"secs"
-    units <- match.arg(units)
-    x <- as.POSIXct(x)
-    x <- x + switch(units,
-                    "secs" = 0.5, "mins" = 30, "hours" = 1800, "days" = 43200)
-    trunc.POSIXt(x, units = units)
+    ## this gets the default from the generic's 2nd arg 'digits = 0' :
+    units <- if(is.numeric(units) && units == 0.) "secs" else match.arg(units)
+    trunc.POSIXt(as.POSIXct(x) +
+		 switch(units,
+			"secs" = 0.5, "mins" = 30, "hours" = 1800, "days" = 43200),
+		 units = units)
 }
 
 ## ---- additions in 1.5.0 -----
@@ -978,7 +1025,7 @@ is.numeric.POSIXt <- function(x) FALSE
 
 split.POSIXct <-
 function(x, f, drop = FALSE, ...)
-    lapply(split.default(as.double(x), f, drop = drop), .POSIXct,
+    lapply(split.default(as.double(x), f, drop = drop, ...), .POSIXct,
            tz = attr(x, "tzone"))
 
 xtfrm.POSIXct <- function(x) as.numeric(x)
@@ -1019,7 +1066,7 @@ OlsonNames <- function()
     else {
         tzdirs <- c(Sys.getenv("TZDIR"),
                     file.path(R.home("share"), "zoneinfo"),
-                    "/usr/share/zoneinfo", # Linux, OS X, FreeBSD
+                    "/usr/share/zoneinfo", # Linux, macOS, FreeBSD
                     "/usr/share/lib/zoneinfo", # Solaris, AIX
                     "/usr/lib/zoneinfo",   # early glibc
                     "/usr/local/etc/zoneinfo", # tzcode default
diff --git a/src/library/base/R/dcf.R b/src/library/base/R/dcf.R
index 1a13181..d4bc034 100644
--- a/src/library/base/R/dcf.R
+++ b/src/library/base/R/dcf.R
@@ -1,7 +1,7 @@
 #  File src/library/base/R/dcf.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
-#  Copyright (C) 1995-2014 The R Core Team
+#  Copyright (C) 1995-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
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 read.dcf <-
 function(file, fields = NULL, all = FALSE, keep.white = NULL)
@@ -34,7 +34,7 @@ function(file, fields = NULL, all = FALSE, keep.white = NULL)
     ##           lapply(out,
     ##                  function(s)
     ##                  if(is.atomic(s)) s
-    ##                  else mapply("[[", s, sapply(s, length))))
+    ##                  else mapply("[[", s, lengths(s))))
     if(!all) return(.Internal(readDCF(file, fields, keep.white)))
 
     .assemble_things_into_a_data_frame <- function(tags, vals, nums) {
@@ -114,13 +114,15 @@ function(file, fields = NULL, all = FALSE, keep.white = NULL)
     tags <- sub(":.*", "", lines[line_has_tag])
     lines[line_has_tag] <-
         sub("[^:]*:[[:space:]]*", "", lines[line_has_tag])
-    foldable <- rep.int(is.na(match(tags, keep.white)), lengths)
+    fold <- is.na(match(tags, keep.white))
+    foldable <- rep.int(fold, lengths)
     lines[foldable] <- sub("^[[:space:]]*", "", lines[foldable])
     lines[foldable] <- sub("[[:space:]]*$", "", lines[foldable])
 
     vals <- mapply(function(from, to) paste(lines[from:to],
                                             collapse = "\n"),
                    c(1L, pos[-length(pos)] + 1L), pos)
+    vals[fold] <- trimws(vals[fold])
 
     out <- .assemble_things_into_a_data_frame(tags, vals, nums[pos])
 
@@ -139,7 +141,7 @@ function(x, file = "", append = FALSE,
     if(file == "")
         file <- stdout()
     else if(is.character(file)) {
-        file <- file(file, ifelse(append, "a", "w"))
+        file <- file(file, if(append) "a" else "w")
         on.exit(close(file))
     }
     if(!inherits(file, "connection"))
@@ -195,12 +197,12 @@ function(x, file = "", append = FALSE,
         }
     }
     out <- t(out)
-    is_not_empty <- c(out != "")
+    is_not_empty <- nzchar(out)
     eor <- character(sum(is_not_empty))
     if(length(eor)) {
         ## Newline for end of record.
         ## Note that we do not write a trailing blank line.
-        eor[ diff(c(col(out))[is_not_empty]) >= 1L ] <- "\n"
+        eor[ which(diff(c(col(out))[is_not_empty]) >= 1L) ] <- "\n"
     }
     writeLines(paste0(c(out[is_not_empty]), eor), file)
 }
diff --git a/src/library/base/R/debug.R b/src/library/base/R/debug.R
index 14f5a3f..2ffc5ab 100644
--- a/src/library/base/R/debug.R
+++ b/src/library/base/R/debug.R
@@ -1,7 +1,7 @@
 #  File src/library/base/R/debug.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
-#  Copyright (C) 1995-2012 The R Core Team
+#  Copyright (C) 1995-2014 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
@@ -14,15 +14,42 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
-debug <- function(fun, text="", condition=NULL)
-    .Internal(debug(fun, text, condition))
-debugonce <- function(fun, text="", condition=NULL)
-    .Internal(debugonce(fun, text, condition))
-undebug <- function(fun) .Internal(undebug(fun))
-isdebugged <- function(fun) .Internal(isdebugged(fun))
+debug <- function(fun, text = "", condition = NULL, signature = NULL) {
+    if(is.null(signature))
+        .Internal(debug(fun, text, condition))
+    else if(requireNamespace("methods"))
+        methods::.debugMethod(fun, text, condition, signature, once = FALSE)
+    else stop("failed to load the methods package for debugging by signature")
+}
+
+debugonce <- function(fun, text = "", condition = NULL, signature = NULL) {
+    if(is.null(signature))
+        .Internal(debugonce(fun, text, condition))
+    else if(requireNamespace("methods"))
+        methods::.debugMethod(fun, text, condition, signature, once = TRUE)
+    else stop("failed to load the methods package for debugging by signature")
+}
+
+undebug <- function(fun, signature = NULL) {
+    if(is.null(signature))
+        .Internal(undebug(fun))
+    else if(requireNamespace("methods"))
+        methods::.undebugMethod(fun, signature = signature)
+    else stop("failed to load methods package for undebugging by signature")
+}
+
+isdebugged <- function(fun, signature = NULL) {
+    if(is.null(signature))
+        .Internal(isdebugged(fun))
+    else if(requireNamespace("methods"))
+        methods::.isMethodDebugged(fun, signature)
+    else stop("failed to load methods package for handling signature")
+}
 
 browserText <- function(n=1L) .Internal(browserText(n))
 browserCondition <- function(n=1L) .Internal(browserCondition(n))
 browserSetDebug <- function(n=1L) .Internal(browserSetDebug(n))
+
+debuggingState <- function(on = NULL) .Internal(debugOnOff(on))
diff --git a/src/library/base/R/delay.R b/src/library/base/R/delay.R
index 70462e7..17c0051 100644
--- a/src/library/base/R/delay.R
+++ b/src/library/base/R/delay.R
@@ -1,5 +1,5 @@
 #  File src/library/base/R/delay.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
 #  Copyright (C) 1995-2012 The R Core Team
 #
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 delayedAssign <-
     function(x, value, eval.env=parent.frame(1), assign.env=parent.frame(1))
diff --git a/src/library/base/R/det.R b/src/library/base/R/det.R
index bf7f9dc..72f73c4 100644
--- a/src/library/base/R/det.R
+++ b/src/library/base/R/det.R
@@ -1,5 +1,5 @@
 #  File src/library/base/R/det.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
 #  Copyright (C) 1995-2012 The R Core Team
 #
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 ## det now uses Lapack and an LU decomposition.  The method argument is
 ##     no longer used.
diff --git a/src/library/base/R/diag.R b/src/library/base/R/diag.R
index d29847e..e6b5602 100644
--- a/src/library/base/R/diag.R
+++ b/src/library/base/R/diag.R
@@ -1,5 +1,5 @@
 #  File src/library/base/R/diag.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
 #  Copyright (C) 1995-2012 The R Core Team
 #
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 diag <- function(x = 1, nrow, ncol)
 {
@@ -24,7 +24,7 @@ diag <- function(x = 1, nrow, ncol)
 
         if((m <- min(dim(x))) == 0L) return(vector(typeof(x), 0L))
         ## NB: need double index to avoid overflows.
-        y <- c(x)[1 + 0L:(m - 1L) * (dim(x)[1L] + 1)]
+        y <- x[1 + 0L:(m - 1L) * (dim(x)[1L] + 1)]
         nms <- dimnames(x)
         if (is.list(nms) && !any(sapply(nms, is.null)) &&
             identical((nm <- nms[[1L]][seq_len(m)]), nms[[2L]][seq_len(m)]))
diff --git a/src/library/base/R/diff.R b/src/library/base/R/diff.R
index f81a5ed..0337f8f 100644
--- a/src/library/base/R/diff.R
+++ b/src/library/base/R/diff.R
@@ -1,5 +1,5 @@
 #  File src/library/base/R/diff.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
 #  Copyright (C) 1995-2013 The R Core Team
 #
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 diff <- function(x, ...) UseMethod("diff")
 
diff --git a/src/library/base/R/dput.R b/src/library/base/R/dput.R
index 4411df7..ccd8b04 100644
--- a/src/library/base/R/dput.R
+++ b/src/library/base/R/dput.R
@@ -1,7 +1,7 @@
 #  File src/library/base/R/dput.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
-#  Copyright (C) 1995-2012 The R Core Team
+#  Copyright (C) 1995-2015 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
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 dput <-
     function(x, file = "",
@@ -30,11 +30,11 @@ dput <-
     ##        but we are missing a C-level slotNames()
     ## Fails e.g. if an S3 list-like object has S4 components
     if(isS4(x)) {
-        clx <- class(x)
+	clx <- class(x)
 	cat('new("', clx,'"\n', file = file, sep = "")
-	for(n in .slotNames(clx)) {
+	for(n in methods::.slotNames(clx)) {
 	    cat("    ,", n, "= ", file = file)
-	    dput(slot(x, n), file = file, control = control)
+	    dput(methods::slot(x, n), file = file, control = control)
 	}
 	cat(")\n", file = file)
 	invisible()
@@ -42,5 +42,5 @@ dput <-
     else .Internal(dput(x, file, opts))
 }
 
-dget <- function(file)
-    eval(parse(file = file))
+dget <- function(file, keep.source = FALSE)
+    eval(parse(file = file, keep.source = keep.source))
diff --git a/src/library/base/R/dump.R b/src/library/base/R/dump.R
index 358a9bc..9c3ee7f 100644
--- a/src/library/base/R/dump.R
+++ b/src/library/base/R/dump.R
@@ -1,7 +1,7 @@
 #  File src/library/base/R/dump.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
-#  Copyright (C) 1995-2012 The R Core Team
+#  Copyright (C) 1995-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
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 dump <- function (list, file = "dumpdata.R", append = FALSE,
 		  control = "all", envir = parent.frame(),
@@ -25,7 +25,7 @@ dump <- function (list, file = "dumpdata.R", append = FALSE,
 	ex <- sapply(list, exists, envir=envir)
 	if(!any(ex)) return(invisible(character()))
 	if(nzchar(file)) {
-	    file <- file(file, ifelse(append, "a", "w"))
+	    file <- file(file, if(append) "a" else "w")
 	    on.exit(close(file), add = TRUE)
 	} else file <- stdout()
     }
diff --git a/src/library/base/R/duplicated.R b/src/library/base/R/duplicated.R
index bbc0f20..c3d0ef8 100644
--- a/src/library/base/R/duplicated.R
+++ b/src/library/base/R/duplicated.R
@@ -1,7 +1,7 @@
 #  File src/library/base/R/duplicated.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
-#  Copyright (C) 1995-2012 The R Core Team
+#  Copyright (C) 1995-2014 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
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 duplicated <- function(x, incomparables = FALSE, ...) UseMethod("duplicated")
 
diff --git a/src/library/base/R/dynload.R b/src/library/base/R/dynload.R
index 831f744..1ea1f05 100644
--- a/src/library/base/R/dynload.R
+++ b/src/library/base/R/dynload.R
@@ -1,7 +1,7 @@
 #  File src/library/base/R/dynload.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
-#  Copyright (C) 1995-2013 The R Core Team
+#  Copyright (C) 1995-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
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 if(.Platform$OS.type == "windows") {
     dyn.load <- function(x, local = TRUE, now = TRUE, ...) {
@@ -91,7 +91,8 @@ getDLLRegisteredRoutines.character <- function(dll, addNames = TRUE)
     dll <- which.max(w)
     if(sum(w) > 1L)
         warning(gettextf("multiple DLLs match '%s'. Using '%s'",
-                         dll, dll[["path"]]), domain = NA)
+			 names(dll), dlls[[dll]][["path"]]),
+		domain = NA)
 
     getDLLRegisteredRoutines(dlls[[dll]], addNames)
 }
@@ -141,7 +142,7 @@ function(x, ...)
     ## of routines in any category. Then fill the column with ""
     ## and then the actual entries.
 
-    n <- vapply(x, length, 1L)
+    n <- lengths(x)
     x <- x[n > 0]
     n <- max(n)
     d <- list()
@@ -162,10 +163,8 @@ function(x, ...)
 getCallingDLLe <- function(e)
 {
     if (is.null(env <- e$".__NAMESPACE__.")) env <- baseenv()
-    if(exists("DLLs", envir = env) &&
-       length(env$DLLs))
-        return(env$DLLs[[1L]])
-    NULL
+    if(!is.null(Ds <- get0("DLLs", envir = env)) && length(Ds))
+	Ds[[1L]] ## else NULL
 }
 
 getCallingDLL <-
@@ -180,17 +179,10 @@ function(f = sys.function(-1), doStop = FALSE)
             return(NULL)
     }
 
-    ## Please feel free to replace with a more encapsulated way to do this.
-    if (is.null(env <- e$".__NAMESPACE__.")) env <- baseenv()
-    if(exists("DLLs", envir = env) && length(env$DLLs))
-        return(env$DLLs[[1L]])
-    else {
-        if(doStop)
-            stop("looking for DLL for native routine call, but no DLLs in namespace of call")
-        else
-            NULL
-    }
-    NULL
+    if(is.null(r <- getCallingDLLe(e)) && doStop)
+	stop("looking for DLL for native routine call, but no DLLs in namespace of call")
+    ## else
+    r
 }
 
 print.DLLInfo <- function(x, ...)
diff --git a/src/library/base/R/eapply.R b/src/library/base/R/eapply.R
index d808d1b..06b08c5 100644
--- a/src/library/base/R/eapply.R
+++ b/src/library/base/R/eapply.R
@@ -1,5 +1,5 @@
 #  File src/library/base/R/eapply.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
 #  Copyright (C) 1995-2012 The R Core Team
 #
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 eapply <- function (env, FUN, ..., all.names = FALSE, USE.NAMES = TRUE)
 {
diff --git a/src/library/base/R/eigen.R b/src/library/base/R/eigen.R
index cd08ada..8ddf706 100644
--- a/src/library/base/R/eigen.R
+++ b/src/library/base/R/eigen.R
@@ -1,7 +1,7 @@
 #  File src/library/base/R/eigen.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
-#  Copyright (C) 1995-2013 The R Core Team
+#  Copyright (C) 1995-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
@@ -14,19 +14,29 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 
 isSymmetric <- function(object, ...) UseMethod("isSymmetric")
 
-isSymmetric.matrix <- function(object, tol = 100*.Machine$double.eps, ...)
+isSymmetric.matrix <- function(object, tol = 100*.Machine$double.eps, tol1 = 8*tol, ...)
 {
     if(!is.matrix(object)) return(FALSE) ## we test for  symmetric *matrix*
     ## cheap pretest: is it square?
     d <- dim(object)
-    if(d[1L] != d[2L]) return(FALSE)
+    if((n <- d[1L]) != d[2L]) return(FALSE)
+    if(n <= 1L) return(TRUE)
+    ## else: square (n x n) matrix, n >= 2 :
+    iCplx <- is.complex(object)
+    if(length(tol1)) {
+	## initial pre-tests, fast for large non-symmetric:
+	Cj <- if(iCplx) Conj else identity
+	for(i in unique(c(1L, 2L, n-1L, n)))
+	    if(is.character(all.equal(object[i, ], Cj(object[, i]), tolerance = tol1, ...)))
+		return(FALSE)
+    }
     test <-
-        if(is.complex(object))
+        if(iCplx)
             all.equal.numeric(object, Conj(t(object)), tolerance = tol, ...)
         else # numeric, character, ..
             all.equal(object, t(object), tolerance = tol, ...)
@@ -35,7 +45,7 @@ isSymmetric.matrix <- function(object, tol = 100*.Machine$double.eps, ...)
 
 eigen <- function(x, symmetric, only.values = FALSE, EISPACK = FALSE)
 {
-    x <- as.matrix(x)
+    x <- unname(as.matrix(x))
     n <- nrow(x)
     if (!n) stop("0 x 0 matrix")
     if (n != ncol(x)) stop("non-square matrix in 'eigen'")
@@ -56,6 +66,16 @@ eigen <- function(x, symmetric, only.values = FALSE, EISPACK = FALSE)
         else .Internal(La_rg_cmplx(x, only.values))
         ord <- sort.list(Mod(z$values), decreasing = TRUE)
     }
-    return(list(values = z$values[ord],
-                vectors = if (!only.values) z$vectors[, ord, drop = FALSE]))
+    if(only.values)
+	list(values = z$values[ord], vectors = NULL)
+    else
+	structure(class = "eigen",
+		  list(values = z$values[ord],
+		       vectors = z$vectors[, ord, drop = FALSE]))
+}
+
+print.eigen <- function (x, ...) {
+    cat("eigen() decomposition\n")
+    print(unclass(x), ...)
+    invisible(x)
 }
diff --git a/src/library/base/R/environment.R b/src/library/base/R/environment.R
index 662b6f6..1268cb0 100644
--- a/src/library/base/R/environment.R
+++ b/src/library/base/R/environment.R
@@ -1,5 +1,5 @@
 #  File src/library/base/R/environment.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
 #  Copyright (C) 1995-2012 The R Core Team
 #
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 environment <- function(fun=NULL) .Internal(environment(fun))
 
diff --git a/src/library/base/R/eval.R b/src/library/base/R/eval.R
index 600635f..c7a06fc 100644
--- a/src/library/base/R/eval.R
+++ b/src/library/base/R/eval.R
@@ -1,7 +1,7 @@
 #  File src/library/base/R/eval.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
-#  Copyright (C) 1995-2012 The R Core Team
+#  Copyright (C) 1995-2015 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
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 .GlobalEnv <- environment()
 parent.frame <- function(n = 1) .Internal(parent.frame(n))
@@ -61,8 +61,8 @@ within.data.frame <- function(data, expr, ...)
     parent <- parent.frame()
     e <- evalq(environment(), data, parent)
     eval(substitute(expr), e)
-    l <- as.list(e)
-    l <- l[!sapply(l, is.null)]
+    l <- as.list(e, all.names=TRUE)
+    l <- l[!vapply(l, is.null, NA, USE.NAMES=FALSE)]
     ## del: variables to *del*ete from data[]
     nD <- length(del <- setdiff(names(data), (nl <- names(l))))
     data[nl] <- l
diff --git a/src/library/base/R/exists.R b/src/library/base/R/exists.R
deleted file mode 100644
index 51a36c4..0000000
--- a/src/library/base/R/exists.R
+++ /dev/null
@@ -1,23 +0,0 @@
-#  File src/library/base/R/exists.R
-#  Part of the R package, http://www.R-project.org
-#
-#  Copyright (C) 1995-2012 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
-#  the Free Software Foundation; either version 2 of the License, or
-#  (at your option) any later version.
-#
-#  This program is distributed in the hope that it will be useful,
-#  but WITHOUT ANY WARRANTY; without even the implied warranty of
-#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-#  GNU General Public License for more details.
-#
-#  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
-
-exists <-
-    function (x, where = -1,
-              envir = if(missing(frame)) as.environment(where) else sys.frame(frame),
-              frame, mode = "any", inherits = TRUE)
-    .Internal(exists(x, envir, mode, inherits))
diff --git a/src/library/base/R/expand.grid.R b/src/library/base/R/expand.grid.R
index 09092f4..2750080 100644
--- a/src/library/base/R/expand.grid.R
+++ b/src/library/base/R/expand.grid.R
@@ -1,7 +1,7 @@
 #  File src/library/base/R/expand.grid.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
-#  Copyright (C) 1995-2012 The R Core Team
+#  Copyright (C) 1995-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
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 expand.grid <- function(..., KEEP.OUT.ATTRS = TRUE, stringsAsFactors = TRUE)
 {
@@ -35,7 +35,7 @@ expand.grid <- function(..., KEEP.OUT.ATTRS = TRUE, stringsAsFactors = TRUE)
 	nmc[ng0] <- nm[ng0]
     names(cargs) <- nmc
     rep.fac <- 1L
-    d <- sapply(args, length)
+    d <- lengths(args)
     if(KEEP.OUT.ATTRS) {
 	dn <- vector("list", nargs)
 	names(dn) <- nmc
@@ -54,7 +54,7 @@ expand.grid <- function(..., KEEP.OUT.ATTRS = TRUE, stringsAsFactors = TRUE)
             x <- x[rep.int(rep.int(seq_len(nx),
                                    rep.int(rep.fac, nx)), orep)]
 	    ## avoid sorting the levels of character variates
-	    if(stringsAsFactors && !is.factor(x) && is.character(x))
+	    if(stringsAsFactors && is.character(x) && !is.factor(x))
 		x <- factor(x, levels = unique(x))
             cargs[[i]] <- x
             rep.fac <- rep.fac * nx
diff --git a/src/library/base/R/factor.R b/src/library/base/R/factor.R
index e68249b..d810b68 100644
--- a/src/library/base/R/factor.R
+++ b/src/library/base/R/factor.R
@@ -1,7 +1,7 @@
 #  File src/library/base/R/factor.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
-#  Copyright (C) 1995-2014 The R Core Team
+#  Copyright (C) 1995-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
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 factor <- function(x = character(), levels, labels = levels,
                    exclude = NA, ordered = is.ordered(x), nmax = NA)
@@ -24,12 +24,11 @@ factor <- function(x = character(), levels, labels = levels,
     if (missing(levels)) {
 	y <- unique(x, nmax = nmax)
 	ind <- sort.list(y) # or possibly order(x) which is more (too ?) tolerant
-	y <- as.character(y)
-	levels <- unique(y[ind])
+	levels <- unique(as.character(y)[ind])
     }
     force(ordered) # check if original x is an ordered factor
-    exclude <- as.vector(exclude, typeof(x)) # may result in NA
-    x <- as.character(x)
+    if(!is.character(x))
+	x <- as.character(x)
     ## levels could be a long vectors, but match will not handle that.
     levels <- levels[is.na(match(levels, exclude))]
     f <- match(x, levels)
@@ -47,6 +46,18 @@ factor <- function(x = character(), levels, labels = levels,
     f
 }
 
+
+## Also used for methods::validObject(<factor>) :
+.valid.factor <- function(object) {
+    levs <- levels(object)
+    if (!is.character(levs))
+        return("factor levels must be \"character\"")
+    if (d <- anyDuplicated(levs))
+	return(sprintf("duplicated level [%d] in factor", d))
+    ## 'else'	ok :
+    TRUE
+}
+
 is.factor <- function(x) inherits(x, "factor")
 
 as.factor <- function(x) {
@@ -56,6 +67,7 @@ as.factor <- function(x) {
         levels <- sort(unique.default(x)) # avoid array methods
         f <- match(x, levels)
         levels(f) <- as.character(levels)
+	if(!is.null(nx <- names(x))) names(f) <- nx
         class(f) <- "factor"
         f
     } else factor(x)
@@ -90,12 +102,17 @@ nlevels <- function(x) length(levels(x))
 }
 
 droplevels <- function(x, ...) UseMethod("droplevels")
-droplevels.factor <- function(x, ...) factor(x)
-droplevels.data.frame <- function(x, except = NULL, ...)
+## default 'exclude' matches `[.factor` (drop=TRUE)
+droplevels.factor <- function(x, exclude = if(anyNA(levels(x))) NULL else NA, ...)
+    factor(x, exclude = exclude)
+
+droplevels.data.frame <- function(x, except = NULL, exclude, ...)
   {
     ix <- vapply(x, is.factor, NA)
     if (!is.null(except)) ix[except] <- FALSE
-    x[ix] <- lapply(x[ix], factor)
+    x[ix] <- if(missing(exclude))
+		  lapply(x[ix], droplevels)
+	     else lapply(x[ix], droplevels, exclude=exclude)
     x
   }
 
@@ -108,7 +125,7 @@ as.vector.factor <- function(x, mode="any")
 	as.vector(unclass(x), mode)
 }
 
-as.character.factor <- function(x,...) levels(x)[x]
+as.character.factor <- function(x,...) .Internal(asCharacterFactor(x))
 
 as.logical.factor <- function(x,...) as.logical(levels(x))[x]
 
@@ -127,12 +144,10 @@ print.factor <- function (x, quote = FALSE, max.levels = NULL,
     if (length(x) == 0L)
         cat(if(ord)"ordered" else "factor", "(0)\n", sep = "")
     else {
-        ## The idea here is to preserve all relevant attributes such as
-        ## names and dims
-        xx <- x
-        class(xx) <- NULL
-        levels(xx) <- NULL
+        xx <- character(length(x))
         xx[] <- as.character(x)
+        keepAttrs <- setdiff(names(attributes(x)), c("levels", "class"))
+        attributes(xx)[keepAttrs] <- attributes(x)[keepAttrs]
         print(xx, quote = quote, ...)
     }
     maxl <- if(is.null(max.levels)) TRUE else max.levels
@@ -154,22 +169,24 @@ print.factor <- function (x, quote = FALSE, max.levels = NULL,
                       else lev, collapse = colsep),
             "\n", sep = "")
     }
+    if(!isTRUE(val <- .valid.factor(x)))
+	warning(val) # stop() in the future
     invisible(x)
 }
 
 
 Math.factor <- function(x, ...)
-    stop(sQuote(.Generic), " not meaningful for factors")
+    stop(gettextf("%s not meaningful for factors", sQuote(.Generic)))
 
 ## The next two have an .ordered method:
 Summary.factor <- function(..., na.rm)
-    stop(sQuote(.Generic), " not meaningful for factors")
+    stop(gettextf("%s not meaningful for factors", sQuote(.Generic)))
 
 Ops.factor <- function(e1, e2)
 {
     ok <- switch(.Generic, "=="=, "!="=TRUE, FALSE)
     if(!ok) {
-	warning(sQuote(.Generic), " not meaningful for factors")
+	warning(gettextf("%s not meaningful for factors", sQuote(.Generic)))
 	return(rep.int(NA, max(length(e1), if(!missing(e2)) length(e2))))
     }
     nas <- is.na(e1) | is.na(e2)
@@ -207,7 +224,6 @@ Ops.factor <- function(e1, e2)
     attr(y,"contrasts") <- attr(x,"contrasts")
     attr(y,"levels") <- attr(x,"levels")
     class(y) <- oldClass(x)
-    lev <- levels(x)
     if (drop)
         factor(y, exclude = if(anyNA(levels(x))) NULL else NA ) else y
 }
@@ -314,7 +330,7 @@ Summary.ordered <- function(..., na.rm)
     levl <- lapply(args, levels)
     levset <- levl[[1]]
     if (!all(vapply(args, is.ordered, NA)) ||
-	!all(sapply(levl, identical, levset)))
+	!all(vapply(levl, identical, NA, levset)))
 	stop(gettextf("'%s' is only meaningful for ordered factors if all arguments have the same level sets",
 		      .Generic))
     codes <- lapply(args, as.integer)
@@ -342,8 +358,9 @@ Summary.ordered <- function(..., na.rm)
 addNA <- function(x, ifany=FALSE)
 {
     if (!is.factor(x)) x <- factor(x)
-    if (ifany & !anyNA(x)) return(x)
+    if (ifany && !anyNA(x)) return(x)
     ll <- levels(x)
     if (!anyNA(ll)) ll <- c(ll, NA)
+    else if (!ifany && !anyNA(x)) return(x)
     factor(x, levels=ll, exclude=NULL)
 }
diff --git a/src/library/base/R/files.R b/src/library/base/R/files.R
index 8b6282c..c9bdef4 100644
--- a/src/library/base/R/files.R
+++ b/src/library/base/R/files.R
@@ -1,7 +1,7 @@
 #  File src/library/base/R/files.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
-#  Copyright (C) 1995-2014 The R Core Team
+#  Copyright (C) 1995-2015 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
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 R.home <- function(component="home")
 {
@@ -46,7 +46,7 @@ file.show <-
     ## avoid re-encoding files to the current encoding.
     if(l10n_info()[["UTF-8"]] && encoding == "UTF-8") encoding <- ""
     if(l10n_info()[["Latin-1"]] && encoding == "latin1") encoding <- ""
-    if(!is.na(encoding) && encoding != "") {
+    if(!is.na(encoding) && nzchar(encoding)) {
         for(i in seq_along(files)) {
             f <- files[i]
             tf <- tempfile()
@@ -106,7 +106,7 @@ file.copy <- function(from, to,
     if (!(nf <- length(from))) return(logical())
     if (!(nt <- length(to)))   stop("no files to copy to")
     ## we don't use file_test as that is in utils.
-    if (nt == 1 && isTRUE(file.info(to)$isdir)) {
+    if (nt == 1 && dir.exists(to)) {
         if (recursive && to %in% from)
             stop("attempt to copy a directory to itself")
         ## on Windows we need \ for the compiled code (e.g. mkdir).
@@ -129,7 +129,7 @@ file.copy <- function(from, to,
     	if(any(okay)) {
             okay[okay] <- file.append(to[okay], from[okay])
             if(copy.mode || copy.date) { # file.info call can be slow
-                fi <- file.info(from[okay])
+                fi <- file.info(from[okay], extra_cols = FALSE)
                 if(copy.mode) Sys.chmod(to[okay], fi$mode, TRUE)
                 if(copy.date) Sys.setFileTime(to[okay], fi$mtime)
             }
@@ -141,20 +141,20 @@ file.copy <- function(from, to,
 file.symlink <- function(from, to) {
     if (!(length(from))) stop("no files to link from")
     if (!(nt <- length(to)))   stop("no files/directory to link to")
-    if (nt == 1 && file.exists(to) && file.info(to)$isdir)
+    if (nt == 1 && file.exists(to) && file.info(to, extra_cols = FALSE)$isdir)
         to <- file.path(to, basename(from))
     .Internal(file.symlink(from, to))
 }
 
 file.link <- function(from, to) {
     if (!(length(from))) stop("no files to link from")
-    if (!(nt <- length(to)))   stop("no files to link to")
+    if (!length(to))     stop("no files to link to")
     .Internal(file.link(from, to))
 }
 
-file.info <- function(...)
+file.info <- function(..., extra_cols = TRUE)
 {
-    res <- .Internal(file.info(fn <- c(...)))
+    res <- .Internal(file.info(fn <- c(...), extra_cols))
     res$mtime <- .POSIXct(res$mtime)
     res$ctime <- .POSIXct(res$ctime)
     res$atime <- .POSIXct(res$atime)
@@ -162,6 +162,11 @@ file.info <- function(...)
     attr(res, "row.names") <- fn # not row.names<- as that does a length check
     res
 }
+## wrappers introduced in R 3.2.0
+file.mode <- function(...) file.info(..., extra_cols = FALSE)$mode
+file.mtime <- function(...) file.info(..., extra_cols = FALSE)$mtime
+file.size <- function(...) file.info(..., extra_cols = FALSE)$size
+
 
 file.access <- function(names, mode = 0)
 {
@@ -170,6 +175,8 @@ file.access <- function(names, mode = 0)
     res
 }
 
+dir.exists <- function(paths) .Internal(dir.exists(paths))
+
 dir.create <- function(path, showWarnings = TRUE, recursive = FALSE,
                        mode = "0777")
     .Internal(dir.create(path, showWarnings, recursive, as.octmode(mode)))
diff --git a/src/library/base/R/findInt.R b/src/library/base/R/findInt.R
index ff77b11..ff6b7ac 100644
--- a/src/library/base/R/findInt.R
+++ b/src/library/base/R/findInt.R
@@ -1,7 +1,7 @@
 #  File src/library/base/R/findInt.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
-#  Copyright (C) 1995-2013 The R Core Team
+#  Copyright (C) 1995-2015 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
@@ -14,19 +14,17 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 ### This is a `variant' of  approx( method = "constant" ) :
-findInterval <- function(x, vec, rightmost.closed = FALSE, all.inside = FALSE)
+findInterval <- function(x, vec, rightmost.closed = FALSE, all.inside = FALSE,
+                         left.open = FALSE)
 {
     ## Purpose: returns the indices of  x in vec;  vec[] sorted
     ## ---------------------------------------------------------
-    ## Author: Martin Maechler, Date:  4 Jan 2002, 10:16 (of very different .C version)
-
-    if(anyNA(vec))
-	stop("'vec' contains NAs")
-    if(is.unsorted(vec))
-	stop("'vec' must be sorted non-decreasingly")
+    ## Author: Martin Maechler, Date: 4 Jan 2002 (of very different .C version)
+    if(!identical(FALSE, is.unsorted(vec)))
+	stop("'vec' must be sorted non-decreasingly and not contain NAs")
     .Internal(findInterval(as.double(vec), as.double(x),
-                           rightmost.closed, all.inside))
+                           rightmost.closed, all.inside, left.open))
 }
diff --git a/src/library/base/R/formals.R b/src/library/base/R/formals.R
index 3c988ed..3733227 100644
--- a/src/library/base/R/formals.R
+++ b/src/library/base/R/formals.R
@@ -1,7 +1,7 @@
 #  File src/library/base/R/formals.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
-#  Copyright (C) 1995-2012 The R Core Team
+#  Copyright (C) 1995-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
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 formals <- function(fun = sys.function(sys.parent())) {
     if(is.character(fun))
@@ -31,6 +31,7 @@ body <- function(fun = sys.function(sys.parent())) {
 alist <- function (...) as.list(sys.call())[-1L]
 
 `body<-` <- function (fun, envir = environment(fun), value) {
+    if(!is.function(fun)) warning("'fun' is not a function") # TODO[2017]: stop()
     if (is.expression(value)) {
         if (length(value) > 1L)
             warning("using the first element of 'value' of type \"expression\"")
@@ -41,6 +42,7 @@ alist <- function (...) as.list(sys.call())[-1L]
 
 `formals<-` <- function (fun, envir = environment(fun), value)
 {
+    if(!is.function(fun)) warning("'fun' is not a function") # TODO[2017]: stop()
     bd <- body(fun)
     as.function(c(value,
                   if(is.null(bd) || is.list(bd)) list(bd) else bd),
diff --git a/src/library/base/R/format.R b/src/library/base/R/format.R
index 75279dd..968babc 100644
--- a/src/library/base/R/format.R
+++ b/src/library/base/R/format.R
@@ -1,7 +1,7 @@
 #  File src/library/base/R/format.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
-#  Copyright (C) 1995-2013 The R Core Team
+#  Copyright (C) 1995-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
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 format <- function(x, ...) UseMethod("format")
 
@@ -23,7 +23,8 @@ format.default <-
 	     justify = c("left", "right", "centre", "none"),
 	     width = NULL, na.encode = TRUE, scientific = NA,
 	     big.mark = "", big.interval = 3L,
-	     small.mark = "", small.interval = 5L, decimal.mark = ".",
+	     small.mark = "", small.interval = 5L,
+	     decimal.mark = getOption("OutDec"),
 	     zero.print = NULL, drop0trailing = FALSE, ...)
 {
     justify <- match.arg(justify)
@@ -41,22 +42,22 @@ format.default <-
 		      small.mark = small.mark, small.interval = small.interval,
 		      decimal.mark = decimal.mark, zero.print = zero.print,
 		      drop0trailing = drop0trailing, ...)
-	sapply(res, paste, collapse = ", ")
+	vapply(res, paste, "", collapse = ", ")
     } else {
 	switch(mode(x),
 	       NULL = "NULL",
-	       character = .Internal(format(x, trim, digits, nsmall, width,
-					    adj, na.encode, scientific)),
+	       character = .Internal(format(x, trim, digits, nsmall, width, adj,
+					    na.encode, scientific, NA_character_)),
 	       call =, expression =, "function" =, "("  = deparse(x),
 	       raw = as.character(x),
            {
 	       ## else: logical, numeric, complex, .. :
-	       prettyNum(.Internal(format(x, trim, digits, nsmall, width,
-					  3L, na.encode, scientific)),
+	       prettyNum(.Internal(format(x, trim, digits, nsmall, width, 3L,
+					  na.encode, scientific, decimal.mark)),
 			 big.mark = big.mark, big.interval = big.interval,
 			 small.mark = small.mark,
 			 small.interval = small.interval,
-			 decimal.mark = decimal.mark,
+			 decimal.mark = decimal.mark, input.d.mark = decimal.mark,
 			 zero.print = zero.print, drop0trailing = drop0trailing,
 			 is.cmplx = is.complex(x),
 			 preserve.width = if (trim) "individual" else "common")
@@ -101,18 +102,26 @@ format.pval <- function(pv, digits = max(1L, getOption("digits") - 2L),
 }
 
 ## Martin Maechler <maechler at stat.math.ethz.ch> , 1994-1998,
-## many corrections by R-core.
+## many corrections by R-core (incl MM).
 formatC <- function (x, digits = NULL, width = NULL,
 		     format = NULL, flag = "", mode = NULL,
 		     big.mark = "", big.interval = 3L,
 		     small.mark = "", small.interval = 5L,
-		     decimal.mark = ".", preserve.width = "individual",
-                     zero.print = NULL, drop0trailing = FALSE)
+                     decimal.mark = getOption("OutDec"),
+                     preserve.width = "individual", zero.print = NULL,
+                     drop0trailing = FALSE)
 {
     if(is.object(x)) {
+	if(!(is.atomic(x) || inherits(x, "vector")))
+	    warning("class of 'x' was discarded")
         x <- unclass(x)
-        warning("class of 'x' was discarded")
     }
+    ## sanity check for flags added 2.1.0
+    flag <- as.character(flag)
+    if(length(flag) != 1) stop("'flag' must be a string, i.e., of length 1")
+    nf <- strsplit(flag, "")[[1L]]
+    if(!all(nf %in% c("0", "+", "-", " ", "#", "'", "I")))
+	stop("'flag' should contain only characters from [0+- #'I]")
 
     format.char <- function (x, width, flag)
     {
@@ -121,17 +130,16 @@ formatC <- function (x, digits = NULL, width = NULL,
 	format.default(x, width=width,
 		       justify = if(flag=="-") "left" else "right")
     }
-     blank.chars <- function(no)
- 	vapply(no+1L, function(n) paste(character(n), collapse=" "), "")
 
     if (!(n <- length(x))) return("")
     if (is.null(mode))	  mode <- storage.mode(x)
     else if (any(mode == c("double", "real", "integer")))  {
       ## for .C call later on
-	if(mode=="real") mode <- "double"
+	if(mode == "real") mode <- "double"
 	storage.mode(x) <- mode
     }
-    else if (mode != "character") stop("'mode' must be \"double\" (\"real\"), \"integer\" or \"character\"")
+    else if (mode != "character")
+        stop("'mode' must be \"double\" (\"real\"), \"integer\" or \"character\"")
     if (mode == "character" || (!is.null(format) && format == "s")) {
 	if (mode != "character") {
 	    warning('coercing argument to "character" for format="s"')
@@ -163,10 +171,10 @@ formatC <- function (x, digits = NULL, width = NULL,
     else if(digits < 0L)
 	digits <- 6L
     else {
-	maxDigits <- if(format != "f") 50L else ceiling(-(.Machine$double.neg.ulp.digits + .Machine$double.min.exp) / log2(10))
+	maxDigits <- if(format != "f") 50L else
+	    ceiling(-(.Machine$double.neg.ulp.digits + .Machine$double.min.exp) / log2(10))
 	if (digits > maxDigits) {
-            warning(gettextf("'digits' reduced to %d", maxDigits),
-                    domain = NA)
+            warning(gettextf("'digits' reduced to %d", maxDigits), domain = NA)
 	    digits <- maxDigits
 	}
     }
@@ -175,38 +183,32 @@ formatC <- function (x, digits = NULL, width = NULL,
     i.strlen <-
 	pmax(abs(as.integer(width)),
 	     if(format == "fg" || format == "f") {
-		 xEx <- as.integer(floor(log10(abs(x+ifelse(x==0,1,0)))))
+		 xEx <- as.integer(floor(log10(abs(x + (x==0)))))
 		 as.integer(x < 0 | flag!="") + digits +
 		     if(format == "f") {
 			 2L + pmax(xEx, 0L)
 		     } else {# format == "fg"
-			 pmax(xEx, digits, digits + (-xEx) + 1L) +
-			     ifelse(flag != "", nchar(flag, "b"), 0L) + 1L
+			 1L + pmax(xEx, digits, digits + (-xEx) + 1L) +
+			     length(nf) # == nchar(flag, "b")
 		     }
 	     } else # format == "g" or "e":
-	     rep.int(digits + 8L, n)
+		 rep.int(digits + 8L, n)
 	     )
-    ## sanity check for flags added 2.1.0
-    flag <- as.character(flag)
-    nf <- strsplit(flag, "")[[1L]]
-    if(!all(nf %in% c("0", "+", "-", " ", "#")))
-	stop("'flag' can contain only '0+- #'")
     if(digits > 0 && any(nf == "#"))
 	digits <- -digits # C-code will notice "do not drop trailing zeros"
 
     attr(x, "Csingle") <- NULL	# avoid interpreting as.single
     r <- .Internal(formatC(x, as.character(mode), width, digits,
-                           as.character(format), as.character(flag),
-                           i.strlen))
+			   as.character(format), flag, i.strlen))
     if (some.special) r[!Ok] <- format.char(rQ, width = width, flag = flag)
 
-    if(big.mark != "" || small.mark != "" || decimal.mark != "." ||
+    if(nzchar(big.mark) || nzchar(small.mark) || decimal.mark != "." ||
        !is.null(zero.print) || drop0trailing)
 	r <- prettyNum(r, big.mark = big.mark, big.interval = big.interval,
 		       small.mark = small.mark, small.interval = small.interval,
-		       decimal.mark = decimal.mark, preserve.width = preserve.width,
-		       zero.print = zero.print, drop0trailing = drop0trailing,
-		       is.cmplx = FALSE)
+		       decimal.mark = decimal.mark, input.d.mark = ".",
+		       preserve.width = preserve.width, zero.print = zero.print,
+		       drop0trailing = drop0trailing, is.cmplx = FALSE)
 
     if (!is.null(x.atr <- attributes(x)))
 	attributes(r) <- x.atr
@@ -220,12 +222,13 @@ format.factor <- function (x, ...)
 
 format.data.frame <- function(x, ..., justify = "none")
 {
-    nr <- .row_names_info(x, 2L)
     nc <- length(x)
+    if(!nc) return(x) # 0 columns: evade problems, notably for nrow() > 0
+    nr <- .row_names_info(x, 2L)
     rval <- vector("list", nc)
     for(i in seq_len(nc))
 	rval[[i]] <- format(x[[i]], ..., justify = justify)
-    lens <- sapply(rval, NROW)
+    lens <- vapply(rval, NROW, 1)
     if(any(lens != nr)) { # corrupt data frame, must have at least one column
 	warning("corrupt data frame: columns will be truncated or padded with NAs")
 	for(i in seq_len(nc)) {
@@ -245,122 +248,130 @@ format.data.frame <- function(x, ..., justify = "none")
 	if(is.character(rval[[i]]) && inherits(rval[[i]], "character"))
 	    oldClass(rval[[i]]) <- "AsIs"
     }
-    cn <- names(x)
-    m <- match(c("row.names", "check.rows", "check.names", ""), cn, 0L)
-    if(any(m)) cn[m] <- paste0("..dfd.", cn[m])
-    ## This requires valid symbols for the columns, so we need to
-    ## truncate any of more than 256 bytes.
-    long <- nchar(cn, "bytes") > 256L
-    cn[long] <- paste(substr(cn[long], 1L, 250L), "...")
-    names(rval) <- cn
-    rval$check.names <- FALSE
-    rval$row.names <- row.names(x)
-    x <- do.call("data.frame", rval)
-    ## x will have more cols than rval if there are matrix/data.frame cols
-    if(any(m)) names(x) <- sub("^..dfd.", "", names(x))
-    x
+    as.data.frame.list(rval, row.names = row.names(x), col.names = names(x),
+		       optional = TRUE, # <=> check.names = FALSE
+		       fix.empty.names = FALSE, cut.names = TRUE)
 }
 
 format.AsIs <- function(x, width = 12, ...)
 {
-    if(is.character(x)) return(format.default(x, ...))
-    if(is.null(width)) width = 12L
-    n <- length(x)
-    rvec <- rep.int(NA_character_, n)
-    for(i in seq_len(n)) {
-        y <- x[[i]]
+    if(is.character(x) || (is.atomic(x) && is.matrix(x)))
+	return(format.default(x, ...))
+    if(is.null(width)) width <- 12L
+    rvec <- vapply(x, function(y) {
         ## need to remove class AsIs to avoid an infinite loop.
         cl <- oldClass(y)
         if(m <- match("AsIs", cl, 0L)) oldClass(y) <- cl[-m]
-        rvec[i] <- toString(y, width = width, ...)
-    }
+        toString(y, width = width, ...)
+    }, "")
     ## AsIs might be around a matrix, which is not a class.
     dim(rvec) <- dim(x)
     dimnames(rvec) <- dimnames(x)
     format.default(rvec, justify = "right")
 }
 
+.format.zeros <- function(x, zero.print, nx = suppressWarnings(as.numeric(x))) {
+    if (!is.null(zero.print) && any(i0 <- nx == 0 & !is.na(nx))) {
+	## print zeros according to 'zero.print' (logical or string):
+	if(length(zero.print) > 1L) stop("'zero.print' has length > 1")
+	if(is.logical(zero.print))
+	    zero.print <- if(zero.print) "0" else " "
+	if(!is.character(zero.print))
+	    stop("'zero.print' must be character, logical or NULL")
+	nz <- nchar(zero.print, "c")
+	nc <- nchar(x[i0], "c")
+	ind0 <- regexpr("0", x[i0], fixed = TRUE)# first '0' in string
+	substr(x[i0], ind0, (i1 <- ind0+nz-1L)) <- zero.print
+	substr(x[i0], ind0+nz, nc) <- strrep(" ", nc - i1)
+    }
+    x
+}
+
 prettyNum <-
     function(x,
 	     big.mark = "", big.interval = 3L,
 	     small.mark = "", small.interval = 5L,
-	     decimal.mark = ".",
+             decimal.mark = getOption("OutDec"), input.d.mark = decimal.mark,
 	     preserve.width = c("common", "individual", "none"),
 	     zero.print = NULL, drop0trailing = FALSE, is.cmplx = NA, ...)
 {
-    if(!is.character(x)) {
-        is.cmplx <- is.complex(x)
-	x <- sapply(X = x, FUN = format, ...)
+    if(notChar <- !is.character(x)) {
+	is.cmplx <- is.complex(x)
+	x <- vapply(x, format, "",
+		    big.mark=big.mark, big.interval=big.interval,
+		    small.mark=small.mark, small.interval=small.interval,
+		    decimal.mark=decimal.mark, zero.print=zero.print,
+		    drop0trailing=drop0trailing, ...)
     }
-    ## be fast in trivial case (when all options have their default):
-    nMark <- big.mark== "" && small.mark== "" && decimal.mark== "."
+    ## be fast in trivial case, when all options have their default, or "match"
+    nMark <- big.mark == "" && small.mark == "" && (notChar || decimal.mark == input.d.mark)
+
+    if (identical(big.mark, decimal.mark))
+        warning(gettextf("'big.mark' and 'decimal.mark' are both '%s', which could be confusing",
+                         big.mark), domain = NA)
+
     nZero <- is.null(zero.print) && !drop0trailing
     if(nMark && nZero)
 	return(x)
 
     ## else
-    if (!is.null(zero.print) && any(i0 <- {nx <- suppressWarnings(as.numeric(x))
-					   nx == 0 & !is.na(nx)})) {
-	## print zeros according to 'zero.print' (logical or string):
-	if(length(zero.print) > 1L) stop("'zero.print' has length > 1")
-	if(is.logical(zero.print))
-	    zero.print <- if(zero.print) "0" else " "
-	if(!is.character(zero.print))
-	    stop("'zero.print' must be character, logical or NULL")
-	blank.chars <- function(no) # as in formatC()
-	    vapply(no+1L, function(n) paste(character(n), collapse=" "), "")
-	nz <- nchar(zero.print, "c")
-	nc <- nchar(x[i0], "c")
-	ind0 <- regexpr("0", x[i0], fixed = TRUE)# first '0' in string
-	substr(x[i0],ind0, (i1 <- ind0+nz-1L)) <- zero.print
-	substr(x[i0],ind0+nz, nc) <- blank.chars(nc - i1)
-    }
     if(nMark && !drop0trailing)# zero.print was only non-default
-	return(x)
+	return(.format.zeros(x, zero.print))
 
     ## else
     if(is.na(is.cmplx)) { ## find if 'x' is format from a *complex*
 	ina <- is.na(x) | x == "NA"
 	is.cmplx <-
 	    if(all(ina)) FALSE
-	    else length(grep("[0-9].*[-+][0-9].*i$", x)) > 0
+	    else any(grepl("[0-9].*[-+][0-9].*i$", x))
     }
+    preserve.width <- match.arg(preserve.width)
     if(is.cmplx) {
 	## should be rare .. taking an easy route
+        x <- .format.zeros(x, zero.print) # FIXME - or only at return(.) time ??
 	z.sp <- strsplit(sub("([0-9] *)([-+])( *[0-9])",
 			     "\\1::\\2::\\3", x), "::", fixed=TRUE)
 	## be careful, if x had an  "	NA":
-	i3 <- vapply(z.sp, length, 0L) == 3L # those are re + im *i
+	i3 <- lengths(z.sp) == 3L # those are re + im *i
 	if(any(i3)) {
 	    z.sp <- z.sp[i3]
-	    z.im <- sapply(z.sp, `[[`, 3L)
+	    z.im <- vapply(z.sp, `[[`, "", 3L)
 	    ## drop ending 'i' (and later re-add it)
 	    has.i <- grep("i$", z.im)
 	    z.im[has.i] <- sub("i$", '', z.im[has.i])
-	    r <- lapply(list(sapply(z.sp, `[[`, 1L), z.im),
+	    r <- lapply(list(vapply(z.sp, `[[`, "", 1L), z.im),
 			function(.)
 			prettyNum(.,
 				  big.mark=big.mark, big.interval=big.interval,
 				  small.mark=small.mark, small.interval=small.interval,
-				  decimal.mark=decimal.mark, preserve.width=preserve.width,
+				  decimal.mark=decimal.mark, input.d.mark=input.d.mark,
+				  preserve.width=preserve.width,
 				  zero.print=zero.print, drop0trailing=drop0trailing,
 				  is.cmplx=FALSE, ...))
 	    r[[2]][has.i] <- paste0(r[[2]][has.i], "i")
-	    x[i3] <- paste0(r[[1]], sapply(z.sp, `[[`, 2L), r[[2]])
+	    x[i3] <- paste0(r[[1]], vapply(z.sp, `[[`, "", 2L), r[[2]])
 	}
 	return(x)
     }
-    preserve.width <- match.arg(preserve.width)
-    x.sp <- strsplit(x, ".", fixed=TRUE)
-    revStr <- function(cc)
-	sapply(lapply(strsplit(cc,NULL), rev), paste, collapse="")
-    B. <- sapply(x.sp, `[`, 1L)	    # Before "."
-    A. <- sapply(x.sp, `[`, 2)	    # After  "." ; empty == NA
+    if(nchar(input.d.mark) == 0)
+        stop("'input.d.mark' has no characters")
+    x.sp <- strsplit(x, input.d.mark, fixed=TRUE)
+    ## can have "1.005.987" here, if all *.mark == "."
+    if(any(lengths(x.sp) > 2)) { # partly more than two parts
+	x.sp <- lapply(x.sp, function(xs) {
+	    lx <- length(xs)
+	    if(lx <= 2) xs else c(paste(xs[-lx], collapse=input.d.mark), xs[lx])
+	})
+    }
+    B. <- vapply(x.sp, `[`, "", 1L)	# Before input.d.mark (".")
+    A. <- vapply(x.sp, `[`, "", 2L)	# After  "." ; empty == NA
     if(any(iN <- is.na(A.))) A.[iN] <- ""
 
     if(nzchar(big.mark) &&
        length(i.big <- grep(paste0("[0-9]{", big.interval + 1L,",}"), B.))
        ) { ## add 'big.mark' in decimals before "." :
+        revStr <- function(cc)
+            vapply(lapply(strsplit(cc,NULL), rev), paste, "", collapse="")
 	B.[i.big] <-
 	    revStr(gsub(paste0("([0-9]{",big.interval,"})\\B"),
 			paste0("\\1",revStr(big.mark)), revStr(B.[i.big])))
@@ -382,7 +393,8 @@ prettyNum <-
 	iN <- !nzchar(A.)
     }
     ## extraneous trailing dec.marks: paste(B., A., sep = decimal.mark)
-    A. <- paste0(B., c(decimal.mark, "")[iN+ 1L], A.)
+    A. <- .format.zeros(paste0(B., c(decimal.mark, "")[iN+ 1L], A.),
+			zero.print)
     if(preserve.width != "none") {
 	nnc <- nchar(A., "c")
 	d.len <- nnc - nchar(x, "c") # extra space added by 'marks' above
@@ -391,9 +403,9 @@ prettyNum <-
 		   "individual" = {
 		       ## drop initial blanks preserving original width
 		       ## where possible:
-		       A.[ii] <- sapply(which(ii), function(i)
+		       A.[ii] <- vapply(which(ii), function(i)
 					sub(sprintf("^ {1,%d}", d.len[i]), "",
-					    A.[i]))
+					    A.[i]), "")
 		   },
 		   "common" = {
 		       A. <- format(A., justify = "right")
diff --git a/src/library/base/R/frametools.R b/src/library/base/R/frametools.R
index cce00c2..068cb4a 100644
--- a/src/library/base/R/frametools.R
+++ b/src/library/base/R/frametools.R
@@ -1,5 +1,5 @@
 #  File src/library/base/R/frametools.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
 #  Copyright (C) 1995-2014 The R Core Team
 #
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 subset.data.frame <- function (x, subset, select, drop = FALSE, ...)
 {
diff --git a/src/library/base/R/funprog.R b/src/library/base/R/funprog.R
index b524eec..3314d43 100644
--- a/src/library/base/R/funprog.R
+++ b/src/library/base/R/funprog.R
@@ -1,7 +1,7 @@
 #  File src/library/base/R/funprog.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
-#  Copyright (C) 1995-2013 The R Core Team
+#  Copyright (C) 1995-2014 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
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 Reduce <-
 function(f, x, init, right = FALSE, accumulate = FALSE)
@@ -49,11 +49,11 @@ function(f, x, init, right = FALSE, accumulate = FALSE)
     if(!accumulate) {
         if(right) {
             for(i in rev(ind))
-                init <- f(x[[i]], init)
+                init <- forceAndCall(2, f, x[[i]], init)
         }
         else {
             for(i in ind)
-                init <- f(init, x[[i]])
+                init <- forceAndCall(2, f, init, x[[i]])
         }
         init
     }
@@ -66,13 +66,13 @@ function(f, x, init, right = FALSE, accumulate = FALSE)
             if(right) {
                 out[[len]] <- init
                 for(i in rev(ind)) {
-                    init <- f(x[[i]], init)
+                    init <- forceAndCall(2, f, x[[i]], init)
                     out[[i]] <- init
                 }
             } else {
                 out[[1L]] <- init
                 for(i in ind) {
-                    init <- f(init, x[[i]])
+                    init <- forceAndCall(2, f, init, x[[i]])
                     out[[i]] <- init
                 }
             }
@@ -80,14 +80,14 @@ function(f, x, init, right = FALSE, accumulate = FALSE)
             if(right) {
                 out[[len]] <- init
                 for(i in rev(ind)) {
-                    init <- f(x[[i]], init)
+                    init <- forceAndCall(2, f, x[[i]], init)
                     out[[i]] <- init
                 }
             }
             else {
                 for(i in ind) {
                     out[[i]] <- init
-                    init <- f(init, x[[i]])
+                    init <- forceAndCall(2, f, init, x[[i]])
                 }
                 out[[len]] <- init
             }
@@ -95,7 +95,7 @@ function(f, x, init, right = FALSE, accumulate = FALSE)
         ## If all results have length one, we can simplify.
         ## (Note that we do not simplify to arrays in case all results
         ## have a common length > 1.)
-	if(all(vapply(out, length, 1.) == 1L))
+	if(all(lengths(out) == 1L))
             out <- unlist(out, recursive = FALSE)
         out
     }
@@ -105,7 +105,7 @@ Filter <-
 function(f, x)
 {
     ind <- as.logical(unlist(lapply(x, f)))
-    x[!is.na(ind) & ind]
+    x[which(ind)]
 }
 
 
diff --git a/src/library/base/R/get.R b/src/library/base/R/get.R
index f8ee84f..db75d34 100644
--- a/src/library/base/R/get.R
+++ b/src/library/base/R/get.R
@@ -1,7 +1,7 @@
 #  File src/library/base/R/get.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
-#  Copyright (C) 1995-2013 The R Core Team
+#  Copyright (C) 1995-2015 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
@@ -14,21 +14,33 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
+
+exists <-
+    function (x, where = -1,
+              envir = if(missing(frame)) as.environment(where) else sys.frame(frame),
+              frame, mode = "any", inherits = TRUE)
+    .Internal(exists(x, envir, mode, inherits))
 
 get <-
     function (x, pos = -1L, envir = as.environment(pos), mode = "any",
               inherits = TRUE)
     .Internal(get(x, envir, mode, inherits))
 
+get0 <- function (x, envir = pos.to.env(-1L), mode = "any", inherits = TRUE,
+                  ifnotfound = NULL)
+    .Internal(get0(x, envir, mode, inherits, ifnotfound))
+
 mget <- function(x, envir = as.environment(-1L), mode = "any",
                  ifnotfound, inherits = FALSE)
     .Internal(mget(x, envir, mode,
                    if(missing(ifnotfound))
-                   list(function(x) stop(gettextf("value for %s not found", sQuote(x)), call. = FALSE)) else ifnotfound,
+                       list(function(x) stop(gettextf("value for %s not found", sQuote(x)),
+                                             call. = FALSE))
+                   else ifnotfound,
                    inherits))
 
 ## DB's proposed name "getSlotOrComponent" is more precise but harder to type
 getElement <- function(object, name) {
-    if(isS4(object)) slot(object, name) else object[[name, exact=TRUE]]
+    if(isS4(object)) methods::slot(object, name) else object[[name, exact=TRUE]]
 }
diff --git a/src/library/base/R/getenv.R b/src/library/base/R/getenv.R
index 2f21cb9..41e95d0 100644
--- a/src/library/base/R/getenv.R
+++ b/src/library/base/R/getenv.R
@@ -1,7 +1,7 @@
 #  File src/library/base/R/getenv.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
-#  Copyright (C) 1995-2012 The R Core Team
+#  Copyright (C) 1995-2014 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
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 Sys.getenv <- function(x = NULL, unset = "", names = NA)
 {
@@ -27,8 +27,13 @@ Sys.getenv <- function(x = NULL, unset = "", names = NA)
 	    n[i] <- x[[i]][1L]
 	    v[i] <- paste(x[[i]][-1L], collapse = "=")
 	}
-        if (!identical(names, FALSE)) v <- structure(v, names = n)
-	v[sort.list(n)]
+	if (identical(names, FALSE))
+	    v[sort.list(n)]
+	else { # with names
+	    v <- structure(v, names = n)
+	    structure(class = "Dlist", # with nice print method
+		      v[sort.list(n)])
+	}
     } else {
         v <- .Internal(Sys.getenv(as.character(x), as.character(unset)))
 	if (isTRUE(names) || (length(x) > 1L && !identical(names, FALSE)))
diff --git a/src/library/base/R/gl.R b/src/library/base/R/gl.R
index cc2075c..a0eba2e 100644
--- a/src/library/base/R/gl.R
+++ b/src/library/base/R/gl.R
@@ -1,5 +1,5 @@
 #  File src/library/base/R/gl.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
 #  Copyright (C) 1995-2013 The R Core Team
 #
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 ## gl function of GLIM
 
diff --git a/src/library/base/R/grep.R b/src/library/base/R/grep.R
index 814234b..6cfd643 100644
--- a/src/library/base/R/grep.R
+++ b/src/library/base/R/grep.R
@@ -1,7 +1,7 @@
 #  File src/library/base/R/grep.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
-#  Copyright (C) 1995-2014 The R Core Team
+#  Copyright (C) 1995-2015 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
@@ -14,7 +14,12 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
+
+
+## Q: Why are we using   as.character(.)   all over the place instead of doing that in C ?
+## A: These must work for objects which have their own as.character(.) methods *and*
+##    as.character() is fast [Primitive]
 
 strsplit <-
 function(x, split, fixed = FALSE, perl = FALSE, useBytes = FALSE)
@@ -85,9 +90,44 @@ function(pattern, x, offset = 1L, ignore.case = FALSE, value = FALSE,
 }
 
 regexec <-
-function(pattern, text, ignore.case = FALSE,
+function(pattern, text, ignore.case = FALSE, perl = FALSE,
          fixed = FALSE, useBytes = FALSE)
-    .Internal(regexec(pattern, text, ignore.case, fixed, useBytes))
+{
+    if(!perl || fixed)
+        return(.Internal(regexec(pattern, text, ignore.case, fixed,
+                                 useBytes)))
+
+    ## For perl = TRUE, re-use regexpr(perl = TRUE) which always
+    ## captures subexpressions.
+
+    match_data_from_pos_and_len <- function(pos, len) {
+        attr(pos, "match.length") <- len
+        pos
+    }
+
+    m <- regexpr(pattern, text,
+                 ignore.case = ignore.case, useBytes = useBytes,
+                 perl = TRUE)
+    y <- vector("list", length(text))
+    ind <- (m == -1L)
+    if(any(ind)) {
+        y[ind] <- rep.int(list(match_data_from_pos_and_len(-1L, -1L)),
+                          sum(ind))
+    }
+    ind <- !ind
+    if(any(ind)) {
+        pos <- cbind(m[ind],
+                     attr(m, "capture.start")[ind, , drop = FALSE])
+        len <- cbind(attr(m, "match.length")[ind],
+                     attr(m, "capture.length")[ind, , drop = FALSE])
+        y[ind] <- Map(match_data_from_pos_and_len,
+                      split(pos, row(pos)),
+                      split(len, row(len)))
+    }
+    if(identical(attr(m, "useBytes"), TRUE))
+        y <- lapply(y, `attr<-`, "useBytes", TRUE)
+    y
+}
 
 agrep <-
 function(pattern, x, max.distance = 0.1, costs = NULL,
@@ -238,50 +278,76 @@ function(x, m, invert = FALSE)
     ## direct matches give nothing and inverse matches give NA (as
     ## nothing was matched).
 
-    if(!ili && !invert) {
+    if(!ili && identical(invert, FALSE)) {
         so <- m[ind <- (!is.na(m) & (m > -1L))]
         eo <- so + attr(m, "match.length")[ind] - 1L
         return(substring(x[ind], so, eo))
     }
 
-    y <- if(invert) {
+    y <- if(is.na(invert)) {
         Map(function(u, so, ml) {
-            if((n <- length(so)) == 1L) {
-                if(is.na(so) )
-                    return(NA_character_) # Or u ...
-                else if(so == -1L)
-                    return(u)
-            }
-            beg <- if(n > 1L) {
-                ## regexec() could give overlapping matches.
-                ## Matches are non-overlapping iff
-                ##   eo[i] < so[i + 1], i = 1, ..., n - 1.
+                if((n <- length(so)) == 1L) {
+                    if(is.na(so) )
+                        return(NA_character_) # Or u ...
+                    else if(so == -1L)
+                        return(u)
+                }
                 eo <- so + ml - 1L
-                if(any(eo[-n] >= so[-1L]))
-                    stop(gettextf("need non-overlapping matches for %s",
-                                  sQuote("invert = TRUE")),
-                         domain = NA)
-                c(1L, eo + 1L)
-            } else {
-                c(1L, so + ml)
-            }
-            end <- c(so - 1L, nchar(u))
-            substring(u, beg, end)
-        },
+                if(n > 1L) {
+                    ## regexec() could give overlapping matches.
+                    ## Matches are non-overlapping iff
+                    ##   eo[i] < so[i + 1], i = 1, ..., n - 1.
+                    if(any(eo[-n] >= so[-1L]))
+                        stop(gettextf("need non-overlapping matches for %s",
+                                      sQuote("invert = NA")),
+                             domain = NA)
+                }
+                beg <- c(1L, c(rbind(so, eo + 1L)))
+                end <- c(c(rbind(so - 1L, eo)), nchar(u))
+                substring(u, beg, end)
+            },
+            x, m,
+            if(ili)
+                lapply(m, attr, "match.length")
+            else
+                attr(m, "match.length"),
+            USE.NAMES = FALSE)
+    } else if(invert) {
+        Map(function(u, so, ml) {
+                if((n <- length(so)) == 1L) {
+                    if(is.na(so) )
+                        return(NA_character_) # Or u ...
+                    else if(so == -1L)
+                        return(u)
+                }
+                beg <- if(n > 1L) {
+                    ## See above.
+                    eo <- so + ml - 1L
+                    if(any(eo[-n] >= so[-1L]))
+                        stop(gettextf("need non-overlapping matches for %s",
+                                      sQuote("invert = TRUE")),
+                             domain = NA)
+                    c(1L, eo + 1L)
+                } else {
+                    c(1L, so + ml)
+                }
+                end <- c(so - 1L, nchar(u))
+                substring(u, beg, end)
+            },
             x, m,
             if(ili)
-            lapply(m, attr, "match.length")
+                lapply(m, attr, "match.length")
             else
-            attr(m, "match.length"),
+                attr(m, "match.length"),
             USE.NAMES = FALSE)
     } else {
         Map(function(u, so, ml) {
-            if(length(so) == 1L) {
-                if(is.na(so) || (so == -1L))
-                    return(character())
-            }
-            substring(u, so, so + ml - 1L)
-        },
+                if(length(so) == 1L) {
+                    if(is.na(so) || (so == -1L))
+                        return(character())
+                }
+                substring(u, so, so + ml - 1L)
+            },
             x, m,
             lapply(m, attr, "match.length"),
             USE.NAMES = FALSE)
@@ -297,7 +363,7 @@ function(x, m, invert = FALSE)
 ## respectively, and n0 and/or nk can be empty.
 ## (regexec() can give overlapping matches, in which case extracting
 ## inverted matches or replacing cannot work.)
-## For list match data, k can be any non-negative integer. 
+## For list match data, k can be any non-negative integer.
 ## Extraction and replacement straightforwardly work on the m or n
 ## sequences, depending on whether invert is FALSE or TRUE.
 ## For vector match data from regexpr(), k can be 0 or 1.
@@ -342,7 +408,7 @@ function(x, m, invert = FALSE, value)
         if(anyNA(value))
             stop("missing replacement values are not allowed")
         ## Entries for matched elements have length 2.
-        pos <- which(sapply(y, length) == 2L)
+        pos <- which(lengths(y) == 2L)
         np <- length(pos)
         nv <- length(value)
         if(np != nv) {
@@ -401,3 +467,5 @@ function(x, m, invert = FALSE, value)
 
     y
 }
+
+pcre_config <- function() .Internal(pcre_config())
diff --git a/src/library/base/R/identical.R b/src/library/base/R/identical.R
index 10b959a..0cb0f83 100644
--- a/src/library/base/R/identical.R
+++ b/src/library/base/R/identical.R
@@ -1,7 +1,7 @@
 #  File src/library/base/R/identical.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
-#  Copyright (C) 1995-2012 The R Core Team
+#  Copyright (C) 1995-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
@@ -14,12 +14,12 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 identical <- function(x, y, num.eq = TRUE, single.NA = TRUE,
                       attrib.as.set = TRUE, ignore.bytecode = TRUE,
-                      ignore.environment = FALSE)
+                      ignore.environment = FALSE, ignore.srcref = TRUE)
     .Internal(identical(x,y, num.eq, single.NA, attrib.as.set,
-                        ignore.bytecode, ignore.environment))
+                        ignore.bytecode, ignore.environment, ignore.srcref))
 
 isTRUE <- function(x) identical(TRUE, x)
diff --git a/src/library/base/R/ifelse.R b/src/library/base/R/ifelse.R
index bcadbc6..753ca00 100644
--- a/src/library/base/R/ifelse.R
+++ b/src/library/base/R/ifelse.R
@@ -1,7 +1,7 @@
 #  File src/library/base/R/ifelse.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
-#  Copyright (C) 1995-2013 The R Core Team
+#  Copyright (C) 1995-2014 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
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 ifelse <- function (test, yes, no)
 {
@@ -26,15 +26,23 @@ ifelse <- function (test, yes, no)
         if (length(test) == 1 && is.null(attributes(test))) {
             if (is.na(test)) return(NA)
             else if (test) {
-                if (length(yes) == 1 && is.null(attributes(yes)))
-                    return(yes)
+                if (length(yes) == 1) {
+                    yat <- attributes(yes)
+                    if (is.null(yat) || (is.function(yes) &&
+                                         identical(names(yat), "srcref")))
+                        return(yes)
+                }
+            }
+            else if (length(no) == 1) {
+                nat <- attributes(no)
+                if (is.null(nat) || (is.function(no) &&
+                                     identical(names(nat), "srcref")))
+                    return(no)
             }
-            else if (length(no) == 1 && is.null(attributes(no)))
-                return(no)
         }
     }
     else ## typically a "class"; storage.mode<-() typically fails
-	test <- if(isS4(test)) as(test, "logical") else as.logical(test)
+	test <- if(isS4(test)) methods::as(test, "logical") else as.logical(test)
     ans <- test
     ok <- !(nas <- is.na(test))
     if (any(test[ok]))
diff --git a/src/library/base/R/interaction.R b/src/library/base/R/interaction.R
index 9b75843..37c8338 100644
--- a/src/library/base/R/interaction.R
+++ b/src/library/base/R/interaction.R
@@ -1,5 +1,5 @@
 #  File src/library/base/R/interaction.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
 #  Copyright (C) 1995-2013 The R Core Team
 #
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 ### This is almost like the Primitive ":" for factors
 ### but with drop=TRUE, used in reshape
diff --git a/src/library/base/R/is.R b/src/library/base/R/is.R
index 13b0fb6..5979516 100644
--- a/src/library/base/R/is.R
+++ b/src/library/base/R/is.R
@@ -1,5 +1,5 @@
 #  File src/library/base/R/is.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
 #  Copyright (C) 1995-2012 The R Core Team
 #
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 is.vector <- function(x, mode="any") .Internal(is.vector(x,mode))
 
diff --git a/src/library/base/R/jitter.R b/src/library/base/R/jitter.R
index e2ddbee..ba9246f 100644
--- a/src/library/base/R/jitter.R
+++ b/src/library/base/R/jitter.R
@@ -1,5 +1,5 @@
 #  File src/library/base/R/jitter.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
 #  Copyright (C) 1995-2012 The R Core Team
 #
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 ### Unimplemented Idea {for amount = NULL ?}
 ### Really "optimal" (e.g. for rug()), use a non-constant amount,
diff --git a/src/library/base/R/kappa.R b/src/library/base/R/kappa.R
index 72ab8a2..fc37f15 100644
--- a/src/library/base/R/kappa.R
+++ b/src/library/base/R/kappa.R
@@ -1,5 +1,5 @@
 #  File src/library/base/R/kappa.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
 #  Copyright (C) 1998 B. D. Ripley
 #  Copyright (C) 1998-2012 The R Core Team
@@ -15,7 +15,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 norm <- function(x, type = c("O", "I", "F", "M", "2")) {
     if(identical("2", type)) {
diff --git a/src/library/base/R/kronecker.R b/src/library/base/R/kronecker.R
index eebbb9c..60acb80 100644
--- a/src/library/base/R/kronecker.R
+++ b/src/library/base/R/kronecker.R
@@ -1,5 +1,5 @@
 #  File src/library/base/R/kronecker.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
 #  Copyright (C) 1995-2012 The R Core Team
 #
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 kronecker <- function (X, Y, FUN = "*", make.dimnames = FALSE, ...)
 {
diff --git a/src/library/base/R/labels.R b/src/library/base/R/labels.R
index be8c57b..fed31e6 100644
--- a/src/library/base/R/labels.R
+++ b/src/library/base/R/labels.R
@@ -1,5 +1,5 @@
 #  File src/library/base/R/labels.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
 #  Copyright (C) 1998 B. D. Ripley
 #  Copyright (C) 1998-2012 The R Core Team
@@ -15,7 +15,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 labels <- function(object, ...) UseMethod("labels")
 
diff --git a/src/library/base/R/lapply.R b/src/library/base/R/lapply.R
index 2b48bba..67ab95f 100644
--- a/src/library/base/R/lapply.R
+++ b/src/library/base/R/lapply.R
@@ -1,5 +1,5 @@
 #  File src/library/base/R/lapply.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
 #  Copyright (C) 1995-2012 The R Core Team
 #
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 lapply <- function (X, FUN, ...)
 {
diff --git a/src/library/base/R/lazyload.R b/src/library/base/R/lazyload.R
index 915cb87..0357404 100644
--- a/src/library/base/R/lazyload.R
+++ b/src/library/base/R/lazyload.R
@@ -1,7 +1,7 @@
 #  File src/library/base/R/lazyload.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
-#  Copyright (C) 1995-2012 The R Core Team
+#  Copyright (C) 1995-2015 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
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 ## This code should be kept in step with code in ../baseloader.R
 ##
@@ -44,8 +44,8 @@ lazyLoadDBexec <- function(filebase, fun, filter)
     `parent.env<-` <-
         function (env, value) .Internal(`parent.env<-`(env, value))
     existsInFrame <- function (x, env) .Internal(exists(x, env, "any", FALSE))
-    getFromFrame <- function (x, env) .Internal(get(x, env, "any", FALSE))
-    set <- function (x, value, env) .Internal(assign(x, value, env, FALSE))
+    ## getFromFrame <- function (x,  env) .Internal(get(x,  env,  "any",  FALSE))
+    ## set <- function (x,  value,  env) .Internal(assign(x,  value,  env,  FALSE))
     environment <- function () .Internal(environment(NULL))
     mkenv <- function() .Internal(new.env(TRUE, baseenv(), 29L))
 
@@ -57,18 +57,16 @@ lazyLoadDBexec <- function(filebase, fun, filter)
     env <- mkenv()
     map <- readRDS(mapfile)
     vars <- names(map$variables)
-    rvars <- names(map$references)
     compressed <- map$compressed
-    for (i in seq_along(rvars))
-        set(rvars[i], map$references[[i]], env)
+    list2env(map$references, env)
     envenv <- mkenv()
     envhook <- function(n) {
         if (existsInFrame(n, envenv))
-            getFromFrame(n, envenv)
+            envenv[[n]]
         else {
             e <- mkenv()
-            set(n, e, envenv)           # MUST do this immediately
-            key <- getFromFrame(n, env)
+            envenv[[n]] <- e           # MUST do this immediately
+            key <- env[[n]]
             data <- lazyLoadDBfetch(key, datafile, compressed, envhook)
             ## comment from r41494
             ## modified the loading of old environments, so that those
@@ -76,13 +74,8 @@ lazyLoadDBexec <- function(filebase, fun, filter)
             ## parent.env=emptyenv(); and yes an alternative would have been
             ## baseenv(), but that was seldom the intention of folks that
             ## set the environment to NULL.
-            if (is.null(data$enclos))
-                parent.env(e) <- emptyenv()
-            else
-                parent.env(e) <- data$enclos
-            vars <- names(data$bindings)
-            for (i in seq_along(vars))
-                set(vars[i], data$bindings[[i]], e)
+            parent.env(e) <- if(!is.null(data$enclos)) data$enclos else emptyenv()
+            list2env(data$bindings, e)
             if (! is.null(data$attributes))
                 attributes(e) <- data$attributes
             if (! is.null(data$isS4) && data$isS4)
@@ -100,6 +93,7 @@ lazyLoadDBexec <- function(filebase, fun, filter)
     } else
         vals <-  map$variables
 
+    ## This may use vals.
     res <- fun(environment())
 
     ## reduce memory use
diff --git a/src/library/base/R/library.R b/src/library/base/R/library.R
index 7b87c81..25e1753 100644
--- a/src/library/base/R/library.R
+++ b/src/library/base/R/library.R
@@ -1,7 +1,7 @@
 #  File src/library/base/R/library.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
-#  Copyright (C) 1995-2013 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
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 testPlatformEquivalence <-
 function(built, run)
@@ -23,8 +23,8 @@ function(built, run)
     ## remove vendor field
     built <- gsub("([^-]*)-([^-]*)-(.*)", "\\1-\\3", built)
     run <- gsub("([^-]*)-([^-]*)-(.*)", "\\1-\\3", run)
-    ## Mac OS X supports multiple CPUs by using 'universal' binaries
-    if (grepl("^universal-darwin", built) && nzchar(.Platform$r_arch))
+    ## macOS supports multiple CPUs by using 'universal' binaries
+    if (startsWith(built, "universal-darwin") && nzchar(.Platform$r_arch))
         built <- sub("^universal", R.version$arch, built)
     ## allow for small mismatches, e.g. OS version number and i686 vs i586.
     length(agrep(built, run)) > 0
@@ -82,7 +82,7 @@ function(package, help, pos = 2, lib.loc = NULL, character.only = FALSE,
             ## allow mismatches if r_arch is in use, e.g.
             ## i386-gnu-linux vs x86-gnu-linux depending on
             ## build system.
-            if(!nzchar(r_arch) && length(grep("\\w", platform)) &&
+            if(!nzchar(r_arch) && grepl("\\w", platform) &&
                !testPlatformEquivalence(platform, R.version$platform))
                 stop(gettextf("package %s was built for %s",
                               sQuote(pkgname), platform),
@@ -105,44 +105,28 @@ function(package, help, pos = 2, lib.loc = NULL, character.only = FALSE,
                  call. = FALSE, domain = NA)
     }
 
-    checkLicense <- function(pkg, pkgInfo, pkgPath)
+    testFeatures <- function(features, pkgInfo, pkgname, pkgpath)
     {
-        L <- tools:::analyze_license(pkgInfo$DESCRIPTION["License"])
-        if(!L$is_empty && !L$is_verified) {
-            site_file <- path.expand(file.path(R.home("etc"), "licensed.site"))
-            if(file.exists(site_file) &&
-               pkg %in% readLines(site_file)) return()
-            personal_file <- path.expand("~/.R/licensed")
-            if(file.exists(personal_file)) {
-                agreed <- readLines(personal_file)
-                if(pkg %in% agreed) return()
-            } else agreed <- character()
-            if(!interactive())
-                stop(gettextf("package %s has a license that you need to accept in an interactive session", sQuote(pkg)), domain = NA)
-            lfiles <- file.path(pkgpath, c("LICENSE", "LICENCE"))
-            lfiles <- lfiles[file.exists(lfiles)]
-            if(length(lfiles)) {
-                message(gettextf("package %s has a license that you need to accept after viewing", sQuote(pkg)), domain = NA)
-                readline("press RETURN to view license")
-                encoding <- pkgInfo$DESCRIPTION["Encoding"]
-                if(is.na(encoding)) encoding <- ""
-                ## difR and EVER have a Windows' 'smart quote' LICEN[CS]E file
-                if(encoding == "latin1") encoding <- "cp1252"
-                file.show(lfiles[1L], encoding = encoding)
-            } else {
-                message(gettextf("package %s has a license that you need to accept:\naccording to the DESCRIPTION file it is", sQuote(pkg)), domain = NA)
-                message(pkgInfo$DESCRIPTION["License"], domain = NA)
-            }
-            choice <- menu(c("accept", "decline"),
-                           title = paste("License for", sQuote(pkg)))
-            if(choice != 1)
-                stop(gettextf("license for package %s not accepted",
-                              sQuote(package)), domain = NA, call. = FALSE)
-            dir.create(dirname(personal_file), showWarnings=FALSE)
-            writeLines(c(agreed, pkg), personal_file)
+        ## Check that the internals version used to build this package
+        ## matches the version of current R. Failure in this test
+        ## should only occur if the R version is an unreleased devel
+        ## version or the package was build with an unrelease devel
+        ## version.  Other mismatches should be caught earlier by the
+        ## version checks.
+        needsComp <- as.character(pkgInfo$DESCRIPTION["NeedsCompilation"])
+        if (identical(needsComp, "yes")) {
+            internalsID <- features$internalsID
+            if (is.null(internalsID))
+                ## the initial internalsID for packages installed
+                ## prior to introducing features.rds in the meta data
+                internalsID <- "0310d4b8-ccb1-4bb8-ba94-d36a55f60262"
+            if (internalsID != .Internal(internalsID()))
+                stop(gettextf("package %s was installed by an R version with different internals; it needs to be reinstalled for use with this R version",
+                              sQuote(pkgname)), call. = FALSE, domain = NA)
         }
     }
 
+
     checkNoGenerics <- function(env, pkg)
     {
         nenv <- env
@@ -153,7 +137,7 @@ function(package, help, pos = 2, lib.loc = NULL, character.only = FALSE,
         else {
             ## A package will have created a generic
             ## only if it has created a formal method.
-            length(objects(env, pattern="^\\.__T", all.names=TRUE)) == 0L
+	    !any(startsWith(names(env), ".__T"))
         }
     }
 
@@ -165,15 +149,15 @@ function(package, help, pos = 2, lib.loc = NULL, character.only = FALSE,
                        ".packageName", ".noGenerics", ".required",
                        ".no_S3_generics", ".Depends", ".requireCachedGenerics")
         sp <- search()
-        lib.pos <- match(pkgname, sp)
+        lib.pos <- which(sp == pkgname)
         ## ignore generics not defined for the package
-        ob <- objects(lib.pos, all.names = TRUE)
+        ob <- names(as.environment(lib.pos))
         if(!nogenerics) {
             ##  Exclude generics that are consistent with implicit generic
             ## from another package.  A better test would be to move this
             ## down into the loop and test against specific other package name
             ## but subtle conflicts like that are likely to be found elsewhere
-	    these <- ob[substr(ob, 1L, 6L) == ".__T__"]
+	    these <- ob[startsWith(ob,".__T__")]
             gen  <- gsub(".__T__(.*):([^:]+)", "\\1", these)
             from <- gsub(".__T__(.*):([^:]+)", "\\2", these)
             gen <- gen[from != package]
@@ -183,11 +167,11 @@ function(package, help, pos = 2, lib.loc = NULL, character.only = FALSE,
 	ipos <- seq_along(sp)[-c(lib.pos,
 				 match(c("Autoloads", "CheckExEnv"), sp, 0L))]
         for (i in ipos) {
-            obj.same <- match(objects(i, all.names = TRUE), ob, nomatch = 0L)
+            obj.same <- match(names(as.environment(i)), ob, nomatch = 0L)
             if (any(obj.same > 0)) {
                 same <- ob[obj.same]
                 same <- same[!(same %in% dont.mind)]
-                Classobjs <- grep("^\\.__", same)
+                Classobjs <- which(startsWith(same,".__"))
                 if(length(Classobjs)) same <- same[-Classobjs]
                 ## report only objects which are both functions or
                 ## both non-functions.
@@ -213,7 +197,8 @@ function(package, help, pos = 2, lib.loc = NULL, character.only = FALSE,
                                                        sQuote(package)),
                                               domain = NA)
                     }
-		    msg <- .maskedMsg(same, pkg = sQuote(sp[i]), by = i < lib.pos)
+		    msg <- .maskedMsg(sort(same), pkg = sQuote(sp[i]),
+                                      by = i < lib.pos)
 		    packageStartupMessage(msg, domain = NA)
                 }
             }
@@ -225,7 +210,7 @@ function(package, help, pos = 2, lib.loc = NULL, character.only = FALSE,
     if(!missing(package)) {
         if (is.null(lib.loc)) lib.loc <- .libPaths()
         ## remove any non-existent directories
-        lib.loc <- lib.loc[file.info(lib.loc)$isdir %in% TRUE]
+        lib.loc <- lib.loc[dir.exists(lib.loc)]
 
 	if(!character.only)
 	    package <- as.character(substitute(package))
@@ -234,7 +219,7 @@ function(package, help, pos = 2, lib.loc = NULL, character.only = FALSE,
         if(is.na(package) || (package == ""))
             stop("invalid package name")
 
-	pkgname <- paste("package", package, sep = ":")
+	pkgname <- paste0("package:", package)
 	newpackage <- is.na(match(pkgname, search()))
 	if(newpackage) {
             ## Check for the methods package before attaching this
@@ -243,7 +228,10 @@ function(package, help, pos = 2, lib.loc = NULL, character.only = FALSE,
             ## The methods package caches all other pkgs when it is
             ## attached.
 
-            pkgpath <- find.package(package, lib.loc, quiet = TRUE,
+            ## Too extreme (unfortunately; warning too often):
+	    ## pkgpath <- find.package(package, lib.loc, quiet = TRUE, verbose = !quietly)
+	    ##   'verbose' here means to warn about packages found more than once
+	    pkgpath <- find.package(package, lib.loc, quiet = TRUE,
                                     verbose = verbose)
             if(length(pkgpath) == 0L) {
                 txt <- if(length(lib.loc))
@@ -263,19 +251,19 @@ function(package, help, pos = 2, lib.loc = NULL, character.only = FALSE,
                               sQuote(package)), domain = NA)
             pkgInfo <- readRDS(pfile)
             testRversion(pkgInfo, package, pkgpath)
-            ## avoid any bootstrapping issues by these exemptions
-            if(!package %in% c("datasets", "grDevices", "graphics", "methods",
-                               "splines", "stats", "stats4", "tcltk", "tools",
-                               "utils") &&
-               isTRUE(getOption("checkPackageLicense", FALSE)))
-                checkLicense(package, pkgInfo, pkgpath)
+            ffile <- system.file("Meta", "features.rds", package = package,
+                                 lib.loc = which.lib.loc)
+            features <- if (file.exists(ffile)) readRDS(ffile) else NULL
+            testFeatures(features, pkgInfo, package, pkgpath)
 
+            ## The licence check is now in loadNamespace
             ## The check for inconsistent naming is now in find.package
 
             if(is.character(pos)) {
                 npos <- match(pos, search())
                 if(is.na(npos)) {
-                    warning(gettextf("%s not found on search path, using pos = 2", sQuote(pos)), domain = NA)
+                    warning(gettextf("%s not found on search path, using pos = 2",
+                                     sQuote(pos)), domain = NA)
                     pos <- 2
                 } else pos <- npos
             }
@@ -286,17 +274,41 @@ function(package, help, pos = 2, lib.loc = NULL, character.only = FALSE,
             ## has a namespace, then the namespace loading mechanism
             ## takes over.
             if (packageHasNamespace(package, which.lib.loc)) {
-                tt <- try({
-                    ns <- loadNamespace(package, c(which.lib.loc, lib.loc))
+		if (isNamespaceLoaded(package)) {
+                    ## Already loaded.  Does the version match?
+                    newversion <- as.numeric_version(pkgInfo$DESCRIPTION["Version"])
+                    oldversion <- as.numeric_version(getNamespaceVersion(package))
+                    if (newversion != oldversion) {
+                    	## No, so try to unload the previous one
+                    	res <- tryCatch(unloadNamespace(package),
+					error = function(e) {
+					    P <- if(!is.null(cc <- conditionCall(e)))
+						     paste("Error in", deparse(cc)[1L], ": ")
+						 else "Error : "
+					    stop(gettextf("Package %s version %s cannot be unloaded:\n %s",
+							  sQuote(package), oldversion,
+							  paste0(P, conditionMessage(e),"\n")),
+						 domain=NA)})
+                    }
+                }
+		tt <- tryCatch({
+                    attr(package, "LibPath") <- which.lib.loc
+                    ns <- loadNamespace(package, lib.loc)
                     env <- attachNamespace(ns, pos = pos, deps)
-                })
-                if (inherits(tt, "try-error"))
-                    if (logical.return)
-                        return(FALSE)
-                    else stop(gettextf("package or namespace load failed for %s",
-                                       sQuote(package)),
-                              call. = FALSE, domain = NA)
-                else {
+		}, error = function(e) {
+		    P <- if(!is.null(cc <- conditionCall(e)))
+			     paste(" in", deparse(cc)[1L]) else ""
+		    msg <- gettextf("package or namespace load failed for %s%s:\n %s",
+				    sQuote(package), P, conditionMessage(e))
+		    if(logical.return)
+			message(paste("Error:", msg), domain = NA) # returns NULL
+		    else stop(msg, call. = FALSE, domain = NA)
+		})
+		if(logical.return && is.null(tt))
+		    return(FALSE)
+
+                attr(package, "LibPath") <- NULL
+                {
                     on.exit(detach(pos = pos))
                     ## If there are S4 generics then the package should
                     ## depend on methods
@@ -313,8 +325,8 @@ function(package, help, pos = 2, lib.loc = NULL, character.only = FALSE,
                         return(invisible(.packages()))
                 }
             } else
-            stop(gettextf("package %s does not have a namespace and should be re-installed",
-                          sQuote(package)), domain = NA)
+		stop(gettextf("package %s does not have a namespace and should be re-installed",
+			      sQuote(package)), domain = NA)
 	}
 	if (verbose && !newpackage)
             warning(gettextf("package %s already present in search()",
@@ -341,10 +353,12 @@ function(package, help, pos = 2, lib.loc = NULL, character.only = FALSE,
                     if(!inherits(tmp, "try-error"))
                         txt <- tmp
                     else
-                        warning("'DESCRIPTION' has an 'Encoding' field and re-encoding is not possible", call.=FALSE)
+                        warning("'DESCRIPTION' has an 'Encoding' field and re-encoding is not possible",
+                                call. = FALSE)
                 }
                 nm <- paste0(names(txt), ":")
-                formatDL(nm, txt, indent = max(nchar(nm, "w")) + 3)
+                ## indent might be excessive for long field names.
+                formatDL(nm, txt, indent = max(nchar(nm, "w")) + 3L)
             } else if(basename(f) %in% "vignette.rds") {
                 txt <- readRDS(f)
                 ## New-style vignette indices are data frames with more
@@ -358,7 +372,7 @@ function(package, help, pos = 2, lib.loc = NULL, character.only = FALSE,
                                         txt$File)),
                           paste(txt$Title,
                                 paste0(rep.int("(source", NROW(txt)),
-                                       ifelse(txt$PDF != "",
+                                       ifelse(nzchar(txt$PDF),
                                               ", pdf",
                                               ""),
                                        ")")))
@@ -386,7 +400,7 @@ function(package, help, pos = 2, lib.loc = NULL, character.only = FALSE,
                 ## 'package.rds' but we have not checked.
                 file <- system.file("Meta", "package.rds", package = i,
                                     lib.loc = lib)
-                title <- if(file != "") {
+                title <- if(nzchar(file)) {
                     txt <- readRDS(file)
                     if(is.list(txt)) txt <- txt$DESCRIPTION
                     ## we may need to re-encode here.
@@ -425,7 +439,7 @@ function(package, help, pos = 2, lib.loc = NULL, character.only = FALSE,
     if (logical.return)
 	TRUE
     else invisible(.packages())
-}
+} ## {library}
 
 format.libraryIQR <-
 function(x, ...)
@@ -532,7 +546,7 @@ function(chname, libpath, verbose = getOption("verbose"),
 {
     dll_list <- .dynLibs()
 
-    if(missing(chname) || (nc_chname <- nchar(chname, "c")) == 0L)
+    if(missing(chname) || nchar(chname, "c") == 0L)
         if(.Platform$OS.type == "windows")
             stop("no DLL was specified")
         else
@@ -574,7 +588,7 @@ function(package, lib.loc = NULL, quietly = FALSE, warn.conflicts = TRUE,
 {
     if(!character.only)
         package <- as.character(substitute(package)) # allowing "require(eda)"
-    loaded <- paste("package", package, sep = ":") %in% search()
+    loaded <- paste0("package:", package) %in% search()
 
     if (!loaded) {
 	if (!quietly)
@@ -615,7 +629,7 @@ function(all.available = FALSE, lib.loc = NULL)
         return(unique(ans))
     } ## else
     s <- search()
-    return(invisible(substring(s[substr(s, 1L, 8L) == "package:"], 9)))
+    invisible(.rmpkg(s[substr(s, 1L, 8L) == "package:"]))
 }
 
 path.package <-
@@ -627,7 +641,7 @@ function(package = NULL, quiet = FALSE)
     searchpaths <-
         lapply(seq_along(s), function(i) attr(as.environment(i), "path"))
     searchpaths[[length(s)]] <- system.file()
-    pkgs <- paste("package", package, sep = ":")
+    pkgs <- paste0("package:", package)
     pos <- match(pkgs, s)
     if(any(m <- is.na(pos))) {
         if(!quiet) {
@@ -661,37 +675,23 @@ function(package = NULL, lib.loc = NULL, quiet = FALSE,
     if(length(package) == 1L  &&
        package %in% c("base", "tools", "utils", "grDevices", "graphics",
                       "stats", "datasets", "methods", "grid", "parallel",
-                      "splines", "stats4", "tcltk"))
+                      "splines", "stats4", "tcltk", "compiler"))
         return(file.path(.Library, package))
 
-    use_loaded <- FALSE
     if(is.null(package)) package <- .packages()
-    if(is.null(lib.loc)) {
-        use_loaded <- TRUE
-        lib.loc <- .libPaths()
-    }
-
     if(!length(package)) return(character())
+    if(use_loaded <- is.null(lib.loc))
+	lib.loc <- .libPaths()
 
     bad <- character()
     out <- character()
 
     for(pkg in package) {
-        paths <- character()
-        for(lib in lib.loc) {
-            dirs <- list.files(lib,
-                               pattern = paste0("^", pkg, "$"),
-                               full.names = TRUE)
-            ## Note that we cannot use tools::file_test() here, as
-            ## cyclic namespace dependencies are not supported.  Argh.
-            paths <- c(paths,
-                       dirs[file.info(dirs)$isdir &
-                            file.exists(file.path(dirs,
-                                                  "DESCRIPTION"))])
-        }
-        if(use_loaded && pkg %in% loadedNamespaces()) {
-            dir <- if (pkg == "base") system.file()
-            else getNamespaceInfo(pkg, "path")
+	paths <- file.path(lib.loc, pkg)
+	paths <- paths[ file.exists(file.path(paths, "DESCRIPTION")) ]
+	if(use_loaded && isNamespaceLoaded(pkg)) {
+	    dir <- if (pkg == "base") system.file()
+		   else .getNamespaceInfo(asNamespace(pkg), "path")
             paths <- c(dir, paths)
         }
         ## trapdoor for tools:::setRlibs
@@ -737,7 +737,7 @@ function(package = NULL, lib.loc = NULL, quiet = FALSE,
         if(length(paths) > 1L) {
             ## If a package was found more than once ...
             paths <- paths[1L]
-            if(verbose)
+	    if(verbose)
                 warning(gettextf("package %s found more than once,\nusing the one found in %s",
                                  sQuote(pkg), sQuote(paths)), domain = NA)
         }
@@ -812,61 +812,61 @@ function(file="DESCRIPTION", lib.loc = NULL, quietly = FALSE, useImports = FALSE
 .getRequiredPackages2 <-
 function(pkgInfo, quietly = FALSE, lib.loc = NULL, useImports = FALSE)
 {
+### FIXME: utils::packageVersion() should be pushed up here instead
+    .findVersion <- function(pkg, lib.loc = NULL) {
+        pfile <- system.file("Meta", "package.rds",
+                             package = pkg, lib.loc = lib.loc)
+        if (nzchar(pfile))
+            as.numeric_version(readRDS(pfile)$DESCRIPTION["Version"])
+        ## else NULL
+    }
     pkgs <- unique(names(pkgInfo$Depends))
-    if (length(pkgs)) {
-        pkgname <- pkgInfo$DESCRIPTION["Package"]
-        for(pkg in pkgs) {
-            ## several packages 'Depends' on base!
-            if (pkg == "base") next
-            ## allow for multiple occurrences
-            zs <- pkgInfo$Depends[names(pkgInfo$Depends) == pkg]
-            have_vers <- any(vapply(zs, length, 1L) > 1L)
-            if ( !paste("package", pkg, sep = ":") %in% search() ) {
-                if (have_vers) {
-                    pfile <- system.file("Meta", "package.rds",
-                                         package = pkg, lib.loc = lib.loc)
-                    if(!nzchar(pfile))
-                        stop(gettextf("package %s required by %s could not be found",
-                                      sQuote(pkg), sQuote(pkgname)),
-                             call. = FALSE, domain = NA)
-                    current <- readRDS(pfile)$DESCRIPTION["Version"]
-                    for(z in zs)
-                        if(length(z) > 1L) {
-                            target <- as.numeric_version(z$version)
-                            if (!do.call(z$op, list(as.numeric_version(current), target)))
-##                            if (!eval(parse(text=paste("current", z$op, "target"))))
-                                stop(gettextf("package %s %s was found, but %s %s is required by %s",
-                                              sQuote(pkg), current, z$op,
-                                              target, sQuote(pkgname)),
-                                     call. = FALSE, domain = NA)
-                        }
+    pkgname <- pkgInfo$DESCRIPTION["Package"]
+    for(pkg in setdiff(pkgs, "base")) {
+        ## allow for multiple occurrences
+        depends <- pkgInfo$Depends[names(pkgInfo$Depends) == pkg]
+        attached <- paste0("package:", pkg) %in% search()
+        current <- .findVersion(pkg, lib.loc)
+        if(is.null(current))
+            stop(gettextf("package %s required by %s could not be found",
+                          sQuote(pkg), sQuote(pkgname)),
+                 call. = FALSE, domain = NA)
+        have_vers <- lengths(depends) > 1L
+        for(dep in depends[have_vers]) {
+            target <- as.numeric_version(dep$version)
+            sufficient <- do.call(dep$op, list(current, target))
+            if (!sufficient) {
+                if (is.null(lib.loc))
+                    lib.loc <- .libPaths()
+		allV <- lapply(lib.loc, .findVersion, pkg=pkg)
+		versions <- do.call(c, allV[iV <- which(!vapply(allV, is.null, NA))])
+                sufficient <- vapply(versions, dep$op, logical(1L), target)
+                if (any(sufficient)) {
+                    warning(gettextf("version %s of %s masked by %s in %s",
+                                     versions[which(sufficient)[1L]],
+                                     sQuote(pkg),
+                                     current,
+				     lib.loc[iV[!sufficient][1L]]),
+                            call. = FALSE, domain = NA)
                 }
+		msg <- if (attached)
+			   "package %s %s is loaded, but %s %s is required by %s"
+		       else
+			   "package %s %s was found, but %s %s is required by %s"
+                stop(gettextf(msg, sQuote(pkg), current, dep$op,
+                              target, sQuote(pkgname)),
+                     call. = FALSE, domain = NA)
+            }
+        }
 
-                if (!quietly)
-                    packageStartupMessage(gettextf("Loading required package: %s",
-                                     pkg), domain = NA)
-                library(pkg, character.only = TRUE, logical.return = TRUE,
-                        lib.loc = lib.loc) ||
+        if (!attached) {
+            if (!quietly)
+                packageStartupMessage(gettextf("Loading required package: %s",
+                                               pkg), domain = NA)
+            library(pkg, character.only = TRUE, logical.return = TRUE,
+                    lib.loc = lib.loc, quietly = quietly) ||
                 stop(gettextf("package %s could not be loaded", sQuote(pkg)),
                      call. = FALSE, domain = NA)
-            } else {
-                ## check the required version number, if any
-                if (have_vers) {
-                    pfile <- system.file("Meta", "package.rds",
-                                         package = pkg, lib.loc = lib.loc)
-                    current <- readRDS(pfile)$DESCRIPTION["Version"]
-                    for(z in zs)
-                        if (length(z) > 1L) {
-                            target <- as.numeric_version(z$version)
-                            if (!do.call(z$op, list(as.numeric_version(current), target)))
-##                            if (!eval(parse(text=paste("current", z$op, "target"))))
-                                stop(gettextf("package %s %s is loaded, but %s %s is required by %s",
-                                              sQuote(pkg), current, z$op,
-                                              target, sQuote(pkgname)),
-                                     call. = FALSE, domain = NA)
-                        }
-                }
-            }
         }
     }
     if(useImports) {
diff --git a/src/library/base/R/license.R b/src/library/base/R/license.R
index 6b2fd9c..6d4b41a 100644
--- a/src/library/base/R/license.R
+++ b/src/library/base/R/license.R
@@ -1,7 +1,7 @@
 #  File src/library/base/R/license.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
-#  Copyright (C) 1995-2012 The R Core Team
+#  Copyright (C) 1995-2015 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
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 licence <- license <- function() {
     cat("\nThis software is distributed under the terms of the GNU General\n")
@@ -24,7 +24,7 @@ licence <- license <- function() {
     cat("Version 3 of the license can be displayed by RShowDoc(\"GPL-3\").\n")
     cat("\n")
     cat("Copies of both versions 2 and 3 of the license can be found\n")
-    cat("at http://www.R-project.org/Licenses/.\n")
+    cat("at https://www.R-project.org/Licenses/.\n")
     cat("\n")
     cat("A small number of files (the API header files listed in\n")
     cat("R_DOC_DIR/COPYRIGHTS) are distributed under the\n")
diff --git a/src/library/base/R/load.R b/src/library/base/R/load.R
index 63689be..f68ce75 100644
--- a/src/library/base/R/load.R
+++ b/src/library/base/R/load.R
@@ -1,7 +1,7 @@
 #  File src/library/base/R/load.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
-#  Copyright (C) 1995-2013 The R Core Team
+#  Copyright (C) 1995-2015 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
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 load <- function (file, envir = parent.frame(), verbose = FALSE)
 {
@@ -54,7 +54,7 @@ load <- function (file, envir = parent.frame(), verbose = FALSE)
 save <- function(..., list = character(),
                  file = stop("'file' must be specified"),
                  ascii = FALSE, version = NULL, envir = parent.frame(),
-                 compress = !ascii, compression_level,
+                 compress = isTRUE(!ascii), compression_level,
                  eval.promises = TRUE, precheck = TRUE)
 {
     opts <- getOption("save.defaults")
@@ -69,16 +69,16 @@ save <- function(..., list = character(),
         warning("Use of save versions prior to 2 is deprecated", domain = NA)
 
     names <- as.character(substitute(list(...)))[-1L]
-     if(missing(list) && !length(names))
+    if(missing(list) && !length(names))
 	warning("nothing specified to be save()d")
-   list <- c(list, names)
+    list <- c(list, names)
     if (!is.null(version) && version == 1)
         .Internal(save(list, file, ascii, version, envir, eval.promises))
     else {
         if (precheck) {
             ## check for existence of objects before opening connection
             ## (and e.g. clobering file)
-            ok <- unlist(lapply(list, exists, envir=envir))
+	    ok <- vapply(list, exists, NA, envir=envir)
             if(!all(ok)) {
                 n <- sum(!ok)
                 stop(sprintf(ngettext(n,
@@ -119,7 +119,7 @@ save <- function(..., list = character(),
 	else if (inherits(file, "connection"))
 	    con <- file
 	else stop("bad file argument")
-	if(isOpen(con) && summary(con)$text != "binary")
+	if(isOpen(con) && !ascii && summary(con)$text != "binary")
 	    stop("can only save to a binary connection")
 	.Internal(saveToConn(list, con, ascii, version, envir, eval.promises))
     }
@@ -155,7 +155,7 @@ save.image <- function (file = ".RData", version = NULL, ascii = FALSE,
     else outfile <- file
 
     on.exit(file.remove(outfile))
-    save(list = ls(envir = .GlobalEnv, all.names = TRUE), file = outfile,
+    save(list = names(.GlobalEnv), file = outfile,
          version = version, ascii = ascii, compress = compress,
          envir = .GlobalEnv, precheck = FALSE)
     if (safe)
@@ -189,8 +189,7 @@ findPackageEnv <- function(info)
     if(info %in% search()) return(as.environment(info))
     message(gettextf("Attempting to load the environment %s", sQuote(info)),
             domain = NA)
-    pkg <- substr(info, 9L, 1000L)
-    if(require(pkg, character.only=TRUE, quietly = TRUE))
+    if(require(substr(info, 9L, 1000L), character.only = TRUE, quietly = TRUE))
         return(as.environment(info))
     message("Specified environment not found: using '.GlobalEnv' instead")
     .GlobalEnv
diff --git a/src/library/base/R/locales.R b/src/library/base/R/locales.R
index 0006a84..dc2932a 100644
--- a/src/library/base/R/locales.R
+++ b/src/library/base/R/locales.R
@@ -1,5 +1,5 @@
 #  File src/library/base/R/locales.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
 #  Copyright (C) 1995-2012 The R Core Team
 #
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 Sys.getlocale <- function(category = "LC_ALL")
 {
diff --git a/src/library/base/R/lower.tri.R b/src/library/base/R/lower.tri.R
index 658eaf3..d223956 100644
--- a/src/library/base/R/lower.tri.R
+++ b/src/library/base/R/lower.tri.R
@@ -1,5 +1,5 @@
 #  File src/library/base/R/lower.tri.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
 #  Copyright (C) 1995-2012 The R Core Team
 #
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 lower.tri <- function(x, diag = FALSE)
 {
diff --git a/src/library/base/R/mapply.R b/src/library/base/R/mapply.R
index 873129b..e9a1075 100644
--- a/src/library/base/R/mapply.R
+++ b/src/library/base/R/mapply.R
@@ -1,7 +1,7 @@
 #  File src/library/base/R/mapply.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
-#  Copyright (C) 1995-2012 The R Core Team
+#  Copyright (C) 1995-2015 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
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 mapply <- function(FUN,..., MoreArgs = NULL, SIMPLIFY = TRUE, USE.NAMES = TRUE)
 {
@@ -50,7 +50,13 @@ Vectorize <- function(FUN, vectorize.args = arg.names, SIMPLIFY = TRUE,
 
     if (!all(vectorize.args %in% arg.names))
     	stop("must specify names of formal arguments for 'vectorize'")
-
+    	
+    collisions <- arg.names %in% c("FUN", "SIMPLIFY", "USE.NAMES", 
+                                   "vectorize.args")
+    if (any(collisions))
+	stop(sQuote("FUN"), " may not have argument(s) named ", 
+	     paste(sQuote(arg.names[collisions]), collapse = ", "))
+	     
     FUNV <- function() { ## will set the formals below
         args <- lapply(as.list(match.call())[-1L], eval, parent.frame())
         names <- if(is.null(names(args))) character(length(args))
diff --git a/src/library/base/R/match.R b/src/library/base/R/match.R
index 3f90133..09fafdf 100644
--- a/src/library/base/R/match.R
+++ b/src/library/base/R/match.R
@@ -1,7 +1,7 @@
 #  File src/library/base/R/match.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
-#  Copyright (C) 1995-2013 The R Core Team
+#  Copyright (C) 1995-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
@@ -14,26 +14,35 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 match <- function(x, table, nomatch = NA_integer_, incomparables = NULL)
     .Internal(match(x, table, nomatch, incomparables))
 
 match.call <-
-    function(definition=NULL, call=sys.call(sys.parent()), expand.dots=TRUE)
-    .Internal(match.call(definition,call,expand.dots))
+    function(definition=sys.function(sys.parent()),
+             call=sys.call(sys.parent()), expand.dots=TRUE,
+             envir=parent.frame(2L))
+{
+    if (!missing(definition) && is.null(definition)) {
+        definition <- sys.function(sys.parent())
+    }
+    .Internal(match.call(definition,call,expand.dots,envir))
+}
 
 pmatch <- function(x, table, nomatch = NA_integer_, duplicates.ok = FALSE)
     .Internal(pmatch(as.character(x), as.character(table), nomatch,
                      duplicates.ok))
 
+# "utils::hasName(x, name)" is defined to be the same as "name %in% names(x)",
+# so change it if this changes.
 `%in%`  <- function(x, table) match(x, table, nomatch = 0L) > 0L
 
 match.arg <- function (arg, choices, several.ok = FALSE)
 {
     if (missing(choices)) {
 	formal.args <- formals(sys.function(sys.parent()))
-	choices <- eval(formal.args[[deparse(substitute(arg))]])
+	choices <- eval(formal.args[[as.character(substitute(arg))]])
     }
     if (is.null(arg)) return(choices[1L])
     else if(!is.character(arg))
diff --git a/src/library/base/R/match.fun.R b/src/library/base/R/match.fun.R
index 3f22f18..795bdf7 100644
--- a/src/library/base/R/match.fun.R
+++ b/src/library/base/R/match.fun.R
@@ -1,5 +1,5 @@
 #  File src/library/base/R/match.fun.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
 #  Copyright (C) 1995-2012 The R Core Team
 #
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 ### clean up FUN arguments to *apply, outer, sweep, etc.
 ### note that this grabs two levels back and is not designed
diff --git a/src/library/base/R/matrix.R b/src/library/base/R/matrix.R
index 794bc3e..241af90 100644
--- a/src/library/base/R/matrix.R
+++ b/src/library/base/R/matrix.R
@@ -1,5 +1,5 @@
 #  File src/library/base/R/matrix.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
 #  Copyright (C) 1995-2012 The R Core Team
 #
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 matrix <- function(data=NA, nrow=1, ncol=1, byrow=FALSE, dimnames=NULL)
 {
diff --git a/src/library/base/R/max.col.R b/src/library/base/R/max.col.R
index 80ecb67..f0e59ac 100644
--- a/src/library/base/R/max.col.R
+++ b/src/library/base/R/max.col.R
@@ -1,5 +1,5 @@
 #  File src/library/base/R/max.col.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
 #  Copyright (C) 1995-2012 The R Core Team
 #
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 max.col <- function(m, ties.method = c("random", "first", "last"))
 {
diff --git a/src/library/base/R/mean.R b/src/library/base/R/mean.R
index 7b048b0..bc21ede 100644
--- a/src/library/base/R/mean.R
+++ b/src/library/base/R/mean.R
@@ -1,5 +1,5 @@
 #  File src/library/base/R/mean.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
 #  Copyright (C) 1995-2013 The R Core Team
 #
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 mean <- function(x, ...) UseMethod("mean")
 
diff --git a/src/library/base/R/merge.R b/src/library/base/R/merge.R
index a6671eb..5845d81 100644
--- a/src/library/base/R/merge.R
+++ b/src/library/base/R/merge.R
@@ -1,7 +1,7 @@
 #  File src/library/base/R/merge.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
-#  Copyright (C) 1995-2012 The R Core Team
+#  Copyright (C) 1995-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
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 merge <- function(x, y, ...) UseMethod("merge")
 
@@ -169,9 +169,11 @@ merge.data.frame <-
         res <- cbind(x, y)
 
         if (sort)
-            res <- res[if(all.x || all.y) ## does NOT work
-                       do.call("order", x[, seq_len(l.b), drop = FALSE])
-            else sort.list(bx[m$xi]),, drop = FALSE]
+	    res <- res[if(all.x || all.y) {
+			   x <- x[, seq_len(l.b), drop = FALSE]
+			   attributes(x) <- NULL
+			   do.call("order", x)
+		       } else sort.list(bx[m$xi]),, drop = FALSE]
     }
     attr(res, "row.names") <- .set_row_names(nrow(res))
     res
diff --git a/src/library/base/R/message.R b/src/library/base/R/message.R
index f89d236..0971eb4 100644
--- a/src/library/base/R/message.R
+++ b/src/library/base/R/message.R
@@ -1,5 +1,5 @@
 #  File src/library/base/R/message.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
 #  Copyright (C) 1995-2012 The R Core Team
 #
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 simpleMessage <-
 function(message, call = NULL)
diff --git a/src/library/base/R/methodsSupport.R b/src/library/base/R/methodsSupport.R
index 3bf73a6..3a6de7b 100644
--- a/src/library/base/R/methodsSupport.R
+++ b/src/library/base/R/methodsSupport.R
@@ -1,7 +1,7 @@
 #  File src/library/base/R/methodsSupport.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
-#  Copyright (C) 1995-2012 The R Core Team
+#  Copyright (C) 1995-2015 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
@@ -14,16 +14,16 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
-trace <- function(what, tracer, exit, at, print, signature, where = topenv(parent.frame()), edit = FALSE)
+trace <- function(what, tracer, exit, at, print, signature,
+                  where = topenv(parent.frame()), edit = FALSE)
 {
-    needsAttach <- nargs() > 1L && !.isMethodsDispatchOn()
-    if(needsAttach) {
+    if(nargs() > 1L && !.isMethodsDispatchOn()) {
         ns <- try(loadNamespace("methods"))
         if(isNamespace(ns))
             message("(loaded the methods namespace)", domain = NA)
-        else
+        else ## (should not be possible)
             stop("tracing functions requires the 'methods' package, but unable to load the 'methods' namespace")
     }
     else if(nargs() == 1L)
@@ -35,32 +35,22 @@ trace <- function(what, tracer, exit, at, print, signature, where = topenv(paren
     call <- sys.call()
     call[[1L]] <- quote(methods::.TraceWithMethods)
     call$where <- where
-    value <- eval.parent(call)
-    on.exit() ## no error
-    tracingState(tState)
-    value
+    eval.parent(call)
 }
 
 untrace <- function(what, signature = NULL, where = topenv(parent.frame())) {
-    ## NOTE: following test is TRUE after loadNamespace("methods") (even if not in search())
-    MethodsDispatchOn <- .isMethodsDispatchOn()
-    if(MethodsDispatchOn) {
-        tState <- tracingState(FALSE)
-        on.exit(tracingState(tState))
-    }
-    if(!MethodsDispatchOn)
-        return(.primUntrace(what)) ## can't have called trace except in primitive form
+    if(!.isMethodsDispatchOn()) ## can't have called trace except in primitive form
+        return(.primUntrace(what))
     ## at this point we can believe that the methods namespace was successfully loaded
+    tState <- tracingState(FALSE)
+    on.exit(tracingState(tState))
     ## now call the version in the methods package, to ensure we get
     ## the correct namespace (e.g., correct version of class())
     call <- sys.call()
     call[[1L]] <- quote(methods::.TraceWithMethods)
     call$where <- where
     call$untrace <- TRUE
-    value <- eval.parent(call)
-    on.exit() ## no error
-    tracingState(tState)
-    invisible(value)
+    invisible(eval.parent(call))
 }
 
 
@@ -89,3 +79,5 @@ asS3 <- function(object, flag = TRUE, complete = TRUE)
     }
     NULL
 }
+
+returnValue <- function(default = NULL) .Internal(returnValue(default))
diff --git a/src/library/base/R/mode.R b/src/library/base/R/mode.R
index b4b0f5e..faa817d 100644
--- a/src/library/base/R/mode.R
+++ b/src/library/base/R/mode.R
@@ -1,7 +1,7 @@
 #  File src/library/base/R/mode.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
-#  Copyright (C) 1995-2012 The R Core Team
+#  Copyright (C) 1995-2015 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
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 mode <- function(x) {
     if(is.expression(x)) return("expression")
@@ -35,11 +35,11 @@ mode <- function(x) {
 {
     if (storage.mode(x) == value) return(x)
     if(is.factor(x)) stop("invalid to change the storage mode of a factor")
-    mde <- paste0("as.",value)
     atr <- attributes(x)
     isSingle <- !is.null(attr(x, "Csingle"))
     setSingle <- value == "single"
-    x <- eval(call(mde,x), parent.frame())
+    mde <- get(paste0("as.",value), mode = "function", envir = parent.frame())
+    x <- mde(x)
     attributes(x) <- atr
     ## this avoids one copy
     if(setSingle != isSingle)
diff --git a/src/library/base/R/namespace.R b/src/library/base/R/namespace.R
index d9a6e6b..7f4731b 100644
--- a/src/library/base/R/namespace.R
+++ b/src/library/base/R/namespace.R
@@ -1,7 +1,7 @@
 #  File src/library/base/R/namespace.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
-#  Copyright (C) 1995-2014 The R Core Team
+#  Copyright (C) 1995-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
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 ## give the base namespace a table for registered methods
 `.__S3MethodsTable__.` <- new.env(hash = TRUE, parent = baseenv())
@@ -24,16 +24,16 @@
 ##  2) We use  ':::' instead of '::' inside the code below, for efficiency only
 
 getNamespace <- function(name) {
-    ns <- .Internal(getRegisteredNamespace(as.name(name)))
+    ns <- .Internal(getRegisteredNamespace(name))
     if (! is.null(ns)) ns
     else tryCatch(loadNamespace(name), error = function(e) stop(e))
 }
 
-.getNamespace <- function(name) .Internal(getRegisteredNamespace(as.name(name)))
+.getNamespace <- function(name) .Internal(getRegisteredNamespace(name))
 
 ..getNamespace <- function(name, where) {
-    ns <- .Internal(getRegisteredNamespace(as.name(name)))
-    if (! is.null(ns)) ns
+    ns <- .Internal(getRegisteredNamespace(name))
+    if (!is.null(ns)) ns
     else tryCatch(loadNamespace(name),
                   error = function(e) {
                       warning(gettextf("namespace %s is not available and has been replaced\nby .GlobalEnv when processing object %s",
@@ -43,32 +43,33 @@ getNamespace <- function(name) {
                   })
 }
 
-loadedNamespaces <- function()
-    ls(.Internal(getNamespaceRegistry()), all.names = TRUE)
+loadedNamespaces <- function() names(.Internal(getNamespaceRegistry()))
+
+isNamespaceLoaded <- function(name) .Internal(isRegisteredNamespace(name))
 
 getNamespaceName <- function(ns) {
     ns <- asNamespace(ns)
     if (isBaseNamespace(ns)) "base"
-    else getNamespaceInfo(ns, "spec")["name"]
+    else .getNamespaceInfo(ns, "spec")["name"]
 }
 
 getNamespaceVersion <- function(ns) {
     ns <- asNamespace(ns)
     if (isBaseNamespace(ns))
         c(version = paste(R.version$major, R.version$minor, sep = "."))
-    else getNamespaceInfo(ns, "spec")["version"]
+    else .getNamespaceInfo(ns, "spec")["version"]
 }
 
 getNamespaceExports <- function(ns) {
     ns <- asNamespace(ns)
-    if (isBaseNamespace(ns)) ls(.BaseNamespaceEnv, all.names = TRUE)
-    else ls(getNamespaceInfo(ns, "exports"), all.names = TRUE)
+    names(if(isBaseNamespace(ns)) .BaseNamespaceEnv
+          else .getNamespaceInfo(ns, "exports"))
 }
 
 getNamespaceImports <- function(ns) {
     ns <- asNamespace(ns)
     if (isBaseNamespace(ns)) NULL
-    else getNamespaceInfo(ns, "imports")
+    else .getNamespaceInfo(ns, "imports")
 }
 
 getNamespaceUsers <- function(ns) {
@@ -83,31 +84,37 @@ getNamespaceUsers <- function(ns) {
 }
 
 getExportedValue <- function(ns, name) {
-    getInternalExportName <- function(name, ns) {
-        exports <- getNamespaceInfo(ns, "exports")
-        if (exists(name, envir = exports, inherits = FALSE))
-            get(get(name, envir = exports, inherits = FALSE), envir = ns)
-        else {
-            ld <- getNamespaceInfo(ns, "lazydata")
-            if (exists(name, envir = ld, inherits = FALSE))
-                get(name, envir = ld, inherits = FALSE)
-            else
-                stop(gettextf("'%s' is not an exported object from 'namespace:%s'",
-                              name, getNamespaceName(ns)),
-                     call. = FALSE, domain = NA)
-        }
-    }
     ns <- asNamespace(ns)
-    if (isBaseNamespace(ns)) get(name, envir = ns, inherits = FALSE)
-    else getInternalExportName(name, ns)
+    if (isBaseNamespace(ns))
+	get(name, envir = ns, inherits = FALSE) # incl. error
+    else {
+	if (!is.null(oNam <- .getNamespaceInfo(ns, "exports")[[name]])) {
+	    get0(oNam, envir = ns)
+	} else { ##  <pkg> :: <dataset>  for lazydata :
+	    ld <- .getNamespaceInfo(ns, "lazydata")
+	    if (!is.null(obj <- ld[[name]]))
+		obj
+	    else { ## if there's a lazydata object with value NULL:
+		if(exists(name, envir = ld, inherits = FALSE))
+		    NULL
+		else
+		    stop(gettextf("'%s' is not an exported object from 'namespace:%s'",
+				  name, getNamespaceName(ns)),
+			 call. = FALSE, domain = NA)
+	    }
+	}
+    }
 }
 
+
 `::` <- function(pkg, name) {
     pkg <- as.character(substitute(pkg))
     name <- as.character(substitute(name))
     getExportedValue(pkg, name)
 }
 
+## NOTE: Both "::" and ":::" must signal an error for non existing objects
+
 `:::` <- function(pkg, name) {
     pkg <- as.character(substitute(pkg))
     name <- as.character(substitute(name))
@@ -119,8 +126,7 @@ attachNamespace <- function(ns, pos = 2L, depends = NULL)
 {
     ## only used to run .onAttach
     runHook <- function(hookname, env, libname, pkgname) {
-        if (exists(hookname, envir = env, inherits = FALSE)) {
-            fun <- get(hookname, envir = env, inherits = FALSE)
+        if (!is.null(fun <- env[[hookname]])) {
             res <- tryCatch(fun(libname, pkgname), error = identity)
             if (inherits(res, "error")) {
                 stop(gettextf("%s failed in %s() for '%s', details:\n  call: %s\n  error: %s",
@@ -142,8 +148,8 @@ attachNamespace <- function(ns, pos = 2L, depends = NULL)
 
     ns <- asNamespace(ns, base.OK = FALSE)
     nsname <- getNamespaceName(ns)
-    nspath <- getNamespaceInfo(ns, "path")
-    attname <- paste("package", nsname, sep = ":")
+    nspath <- .getNamespaceInfo(ns, "path")
+    attname <- paste0("package:", nsname)
     if (attname %in% search())
         stop("namespace is already attached")
     env <- attach(NULL, pos = pos, name = attname)
@@ -153,10 +159,10 @@ attachNamespace <- function(ns, pos = 2L, depends = NULL)
     exports <- getNamespaceExports(ns)
     importIntoEnv(env, exports, ns, exports)
     ## always exists, might be empty
-    dimpenv <- getNamespaceInfo(ns, "lazydata")
-    dnames <- ls(dimpenv, all.names = TRUE)
+    dimpenv <- .getNamespaceInfo(ns, "lazydata")
+    dnames <- names(dimpenv)
     .Internal(importIntoEnv(env, dnames, dimpenv, dnames))
-    if(length(depends)) assign(".Depends", depends, env)
+    if(length(depends) > 0L) env$.Depends <- depends
     Sys.setenv("_R_NS_LOAD_" = nsname)
     on.exit(Sys.unsetenv("_R_NS_LOAD_"), add = TRUE)
     runHook(".onAttach", ns, dirname(nspath), nsname)
@@ -167,26 +173,30 @@ attachNamespace <- function(ns, pos = 2L, depends = NULL)
     invisible(env)
 }
 
+## *inside* another function, useful to check for cycles
+dynGet <- function(x, ifnotfound = stop(gettextf("%s not found",
+			     sQuote(x)), domain = NA),
+		   minframe = 1L, inherits = FALSE)
+{
+    n <- sys.nframe()
+    myObj <- structure(list(.b = as.raw(7)), foo = 47L)# "very improbable" object
+    while (n > minframe) {
+	n <- n - 1L
+	env <- sys.frame(n)
+	r <- get0(x, envir = env, inherits=inherits, ifnotfound = myObj)
+	if(!identical(r, myObj))
+	    return(r)
+    }
+    ifnotfound
+}
+
 loadNamespace <- function (package, lib.loc = NULL,
                            keep.source = getOption("keep.source.pkgs"),
                            partial = FALSE, versionCheck = NULL)
 {
+    libpath <- attr(package, "LibPath")
     package <- as.character(package)[[1L]]
 
-    ## check for cycles
-    dynGet <- function(name,
-                       notFound = stop(gettextf("%s not found", name),
-                       domain = NA))
-    {
-        n <- sys.nframe()
-        while (n > 1) {
-            n <- n - 1
-            env <- sys.frame(n)
-            if (exists(name, envir = env, inherits = FALSE))
-                return(get(name, envir = env, inherits = FALSE))
-        }
-        notFound
-    }
     loading <- dynGet("__NameSpacesLoading__", NULL)
     if (match(package, loading, 0L))
         stop("cyclic namespace dependency detected when loading ",
@@ -195,21 +205,21 @@ loadNamespace <- function (package, lib.loc = NULL,
              domain = NA)
     "__NameSpacesLoading__" <- c(package, loading)
 
-    ns <- .Internal(getRegisteredNamespace(as.name(package)))
+    ns <- .Internal(getRegisteredNamespace(package))
     if (! is.null(ns)) {
-        if(length(z <- versionCheck) == 3L) {
+        if(!is.null(zop <- versionCheck[["op"]]) &&
+           !is.null(zversion <- versionCheck[["version"]])) {
             current <- getNamespaceVersion(ns)
-            if(!do.call(z$op, list(as.numeric_version(current), z$version)))
+            if(!do.call(zop, list(as.numeric_version(current), zversion)))
                 stop(gettextf("namespace %s %s is already loaded, but %s %s is required",
-                              sQuote(package), current, z$op, z$version),
+                              sQuote(package), current, zop, zversion),
                      domain = NA)
         }
         ns
     } else {
         ## only used here for .onLoad
         runHook <- function(hookname, env, libname, pkgname) {
-            if (exists(hookname, envir = env, inherits = FALSE)) {
-                fun <- get(hookname, envir = env, inherits = FALSE)
+	    if (!is.null(fun <- env[[hookname]])) {
                 res <- tryCatch(fun(libname, pkgname), error = identity)
                 if (inherits(res, "error")) {
                     stop(gettextf("%s failed in %s() for '%s', details:\n  call: %s\n  error: %s",
@@ -226,16 +236,16 @@ loadNamespace <- function (package, lib.loc = NULL,
         }
         makeNamespace <- function(name, version = NULL, lib = NULL) {
             impenv <- new.env(parent = .BaseNamespaceEnv, hash = TRUE)
-            attr(impenv, "name") <- paste("imports", name, sep = ":")
+            attr(impenv, "name") <- paste0("imports:", name)
             env <- new.env(parent = impenv, hash = TRUE)
             name <- as.character(as.name(name))
             version <- as.character(version)
             info <- new.env(hash = TRUE, parent = baseenv())
-            assign(".__NAMESPACE__.", info, envir = env)
-            assign("spec", c(name = name, version = version), envir = info)
+            env$.__NAMESPACE__. <- info
+            info$spec <- c(name = name, version = version)
             setNamespaceInfo(env, "exports", new.env(hash = TRUE, parent = baseenv()))
             dimpenv <- new.env(parent = baseenv(), hash = TRUE)
-            attr(dimpenv, "name") <- paste("lazydata", name, sep = ":")
+            attr(dimpenv, "name") <- paste0("lazydata:", name)
             setNamespaceInfo(env, "lazydata", dimpenv)
             setNamespaceInfo(env, "imports", list("base" = TRUE))
             ## this should be an absolute path
@@ -243,9 +253,8 @@ loadNamespace <- function (package, lib.loc = NULL,
                              normalizePath(file.path(lib, name), "/", TRUE))
             setNamespaceInfo(env, "dynlibs", NULL)
             setNamespaceInfo(env, "S3methods", matrix(NA_character_, 0L, 3L))
-            assign(".__S3MethodsTable__.",
-                   new.env(hash = TRUE, parent = baseenv()),
-                   envir = env)
+            env$.__S3MethodsTable__. <-
+                new.env(hash = TRUE, parent = baseenv())
             .Internal(registerNamespace(name, env))
             env
         }
@@ -261,7 +270,7 @@ loadNamespace <- function (package, lib.loc = NULL,
             lockEnvironment(parent.env(ns), TRUE)
         }
         addNamespaceDynLibs <- function(ns, newlibs) {
-            dynlibs <- getNamespaceInfo(ns, "dynlibs")
+            dynlibs <- .getNamespaceInfo(ns, "dynlibs")
             setNamespaceInfo(ns, "dynlibs", c(dynlibs, newlibs))
         }
 
@@ -274,7 +283,7 @@ loadNamespace <- function (package, lib.loc = NULL,
             popath <- if (pkgname %in% std) .popath else file.path(pkgpath, "po")
             if(!file.exists(popath)) return()
             bindtextdomain(pkgname, popath)
-            bindtextdomain(paste("R", pkgname, sep = "-"), popath)
+            bindtextdomain(paste0("R-", pkgname), popath)
         }
 
         assignNativeRoutines <- function(dll, lib, env, nativeRoutines) {
@@ -289,12 +298,12 @@ loadNamespace <- function (package, lib.loc = NULL,
                            lapply(type,
                                   function(sym) {
                                       varName <- paste0(fixes[1L], sym$name, fixes[2L])
-                                      if(exists(varName, envir = env))
+                                      if(exists(varName, envir = env, inherits = FALSE))
                                           warning(gettextf("failed to assign RegisteredNativeSymbol for %s to %s since %s is already defined in the %s namespace",
                                                            sym$name, varName, varName, sQuote(package)),
-                                                  domain = NA)
+                                                  domain = NA, call. = FALSE)
                                       else
-                                          assign(varName, sym, envir = env)
+                                          env[[varName]] <- sym
                                   })
                        })
 
@@ -312,15 +321,15 @@ loadNamespace <- function (package, lib.loc = NULL,
                        ## maintain the original names.
                        varName <- names(symNames)[i]
                        origVarName <- symNames[i]
-                       if(exists(varName, envir = env))
+                       if(exists(varName, envir = env, inherits = FALSE))
                            if(origVarName != varName)
                                warning(gettextf("failed to assign NativeSymbolInfo for %s to %s since %s is already defined in the %s namespace",
                                                 origVarName, varName, varName, sQuote(package)),
-                                       domain = NA)
+                                       domain = NA, call. = FALSE)
                            else
                                warning(gettextf("failed to assign NativeSymbolInfo for %s since %s is already defined in the %s namespace",
                                                 origVarName, varName, sQuote(package)),
-                                       domain = NA)
+                                       domain = NA, call. = FALSE)
                        else
                            assign(varName, symbols[[origVarName]], envir = env)
 
@@ -329,7 +338,7 @@ loadNamespace <- function (package, lib.loc = NULL,
         }
 
         ## find package and check it has a namespace
-        pkgpath <- find.package(package, lib.loc, quiet = TRUE)
+        pkgpath <- find.package(package, c(libpath, lib.loc), quiet = TRUE)
         if (length(pkgpath) == 0L)
             stop(gettextf("there is no package called %s", sQuote(package)),
                  domain = NA)
@@ -377,12 +386,67 @@ loadNamespace <- function (package, lib.loc = NULL,
             ## will require it, or the exports will be incomplete.
             dependsMethods <- "methods" %in% names(pkgInfo$Depends)
             if(dependsMethods) loadNamespace("methods")
-            if(length(z <- versionCheck) == 3L &&
-               !do.call(z$op, list(as.numeric_version(version), z$version)))
+            if(!is.null(zop <- versionCheck[["op"]]) &&
+               !is.null(zversion <- versionCheck[["version"]]) &&
+               !do.call(zop, list(as.numeric_version(version), zversion)))
                 stop(gettextf("namespace %s %s is being loaded, but %s %s is required",
-                              sQuote(package), version, z$op, z$version),
+                              sQuote(package), version, zop, zversion),
                      domain = NA)
         }
+
+        ## moved from library in R 3.4.0
+        checkLicense <- function(pkg, pkgInfo, pkgPath)
+        {
+            L <- tools:::analyze_license(pkgInfo$DESCRIPTION["License"])
+            if(!L$is_empty && !L$is_verified) {
+                site_file <-
+                    path.expand(file.path(R.home("etc"), "licensed.site"))
+                if(file.exists(site_file) &&
+                   pkg %in% readLines(site_file)) return()
+                personal_file <- path.expand("~/.R/licensed")
+                if(file.exists(personal_file)) {
+                    agreed <- readLines(personal_file)
+                    if(pkg %in% agreed) return()
+                } else agreed <- character()
+                if(!interactive())
+                    stop(gettextf(
+                        "package %s has a license that you need to accept in an interactive session",
+                        sQuote(pkg)), domain = NA)
+                lfiles <- file.path(pkgpath, c("LICENSE", "LICENCE"))
+                lfiles <- lfiles[file.exists(lfiles)]
+                if(length(lfiles)) {
+                    message(gettextf(
+                        "package %s has a license that you need to accept after viewing",
+                        sQuote(pkg)), domain = NA)
+                    readline("press RETURN to view license")
+                    encoding <- pkgInfo$DESCRIPTION["Encoding"]
+                    if(is.na(encoding)) encoding <- ""
+                    ## difR and EVER have a Windows' 'smart quote' LICEN[CS]E file
+                    if(encoding == "latin1") encoding <- "cp1252"
+                    file.show(lfiles[1L], encoding = encoding)
+                } else {
+                    message(gettextf(paste("package %s has a license that you need to accept:",
+                                           "according to the DESCRIPTION file it is",
+                                           "%s", sep="\n"),
+                                     sQuote(pkg),
+                                     pkgInfo$DESCRIPTION["License"]), domain = NA)
+                }
+                choice <- utils::menu(c("accept", "decline"),
+                                      title = paste("License for", sQuote(pkg)))
+                if(choice != 1)
+                    stop(gettextf("license for package %s not accepted",
+                                  sQuote(package)), domain = NA, call. = FALSE)
+                dir.create(dirname(personal_file), showWarnings=FALSE)
+                writeLines(c(agreed, pkg), personal_file)
+            }
+        }
+
+        ## avoid any bootstrapping issues by these exemptions
+        if(!package %in% c("datasets", "grDevices", "graphics", "methods",
+                           "stats", "tools", "utils") &&
+           isTRUE(getOption("checkPackageLicense", FALSE)))
+            checkLicense(package, pkgInfo, pkgpath)
+
         ns <- makeNamespace(package, version = version, lib = package.lib)
         on.exit(.Internal(unregisterNamespace(package)))
 
@@ -393,6 +457,13 @@ loadNamespace <- function (package, lib.loc = NULL,
                                 loadNamespace(i, c(lib.loc, .libPaths()),
                                               versionCheck = vI[[i]]),
                                 from = package)
+            else if (!is.null(i$except))
+                namespaceImport(ns,
+                                loadNamespace(j <- i[[1L]],
+                                              c(lib.loc, .libPaths()),
+                                              versionCheck = vI[[j]]),
+                                from = package,
+                                except = i$except)
             else
                 namespaceImportFrom(ns,
                                     loadNamespace(j <- i[[1L]],
@@ -417,13 +488,16 @@ loadNamespace <- function (package, lib.loc = NULL,
 
         env <- asNamespace(ns)
         ## save the package name in the environment
-        assign(".packageName", package, envir = env)
+        env$.packageName <- package
 
         ## load the code
         codename <- strsplit(package, "_", fixed = TRUE)[[1L]][1L]
         codeFile <- file.path(pkgpath, "R", codename)
         if (file.exists(codeFile)) {
+	    # The code file has been converted to the native encoding
+	    save.enc <- options(encoding = "native.enc")
             res <- try(sys.source(codeFile, env, keep.source = keep.source))
+	    options(save.enc)
             if(inherits(res, "try-error"))
                 stop(gettextf("unable to load R code in package %s",
                               sQuote(package)), call. = FALSE, domain = NA)
@@ -443,7 +517,7 @@ loadNamespace <- function (package, lib.loc = NULL,
         ## load any lazydata into a separate environment
         dbbase <- file.path(pkgpath, "data", "Rdata")
         if(file.exists(paste0(dbbase, ".rdb")))
-            lazyLoad(dbbase, getNamespaceInfo(ns, "lazydata"))
+            lazyLoad(dbbase, .getNamespaceInfo(env, "lazydata"))
 
         ## register any S3 methods
         registerS3methods(nsInfo$S3methods, package, env)
@@ -463,8 +537,8 @@ loadNamespace <- function (package, lib.loc = NULL,
             ## file was created before the names were added to the
             ## dynlibs vector.
             if(!is.null(names(nsInfo$dynlibs))
-               && names(nsInfo$dynlibs)[i] != "")
-                assign(names(nsInfo$dynlibs)[i], dlls[[lib]], envir = env)
+               && nzchar(names(nsInfo$dynlibs)[i]))
+                env[[names(nsInfo$dynlibs)[i]]] <- dlls[[lib]]
             setNamespaceInfo(env, "DLLs", dlls)
         }
         addNamespaceDynLibs(env, nsInfo$dynlibs)
@@ -486,7 +560,7 @@ loadNamespace <- function (package, lib.loc = NULL,
            !identical(package, "methods") ) {
             ## cache generics, classes in this namespace (but not methods itself,
             ## which pre-cached at install time
-            methods:::cacheMetaData(ns, TRUE, ns)
+            methods::cacheMetaData(ns, TRUE, ns)
             ## This also ran .doLoadActions
             ## load actions may have added objects matching patterns
             for (p in nsInfo$exportPatterns) {
@@ -499,17 +573,15 @@ loadNamespace <- function (package, lib.loc = NULL,
             expClasses <- nsInfo$exportClasses
             ##we take any pattern, but check to see if the matches are classes
             pClasses <- character()
-            aClasses <- methods:::getClasses(ns)
+            aClasses <- methods::getClasses(ns)
             classPatterns <- nsInfo$exportClassPatterns
             ## defaults to exportPatterns
             if(!length(classPatterns))
                 classPatterns <- nsInfo$exportPatterns
-            for (p in classPatterns) {
-                pClasses <- c(aClasses[grep(p, aClasses)], pClasses)
-            }
-            pClasses <- unique(pClasses)
+            pClasses <- unique(unlist(lapply(classPatterns, grep, aClasses,
+                                             value=TRUE)))
             if( length(pClasses) ) {
-                good <- vapply(pClasses, methods:::isClass, NA, where = ns)
+                good <- vapply(pClasses, methods::isClass, NA, where = ns)
                 if( !any(good) && length(nsInfo$exportClassPatterns))
                     warning(gettextf("'exportClassPattern' specified in 'NAMESPACE' but no matching classes in package %s", sQuote(package)),
                             call. = FALSE, domain = NA)
@@ -517,14 +589,14 @@ loadNamespace <- function (package, lib.loc = NULL,
             }
             if(length(expClasses)) {
                 missingClasses <-
-                    !vapply(expClasses, methods:::isClass, NA, where = ns)
+                    !vapply(expClasses, methods::isClass, NA, where = ns)
                 if(any(missingClasses))
                     stop(gettextf("in package %s classes %s were specified for export but not defined",
                                   sQuote(package),
                                   paste(expClasses[missingClasses],
                                         collapse = ", ")),
                          domain = NA)
-                expClasses <- paste0(methods:::classMetaName(""), expClasses)
+                expClasses <- paste0(methods::classMetaName(""), expClasses)
             }
             ## process methods metadata explicitly exported or
             ## implied by exporting the generic function.
@@ -534,7 +606,8 @@ loadNamespace <- function (package, lib.loc = NULL,
             ## check for generic functions corresponding to exported methods
             addGenerics <- expMethods[is.na(match(expMethods, exports))]
             if(length(addGenerics)) {
-                nowhere <- sapply(addGenerics, function(what) !exists(what, mode = "function", envir = ns))
+                nowhere <- vapply(addGenerics, function(what) !exists(what, mode = "function", envir = ns),
+                                  NA, USE.NAMES=FALSE)
                 if(any(nowhere)) {
                     warning(gettextf("no function found corresponding to methods exports from %s for: %s",
                                      sQuote(package),
@@ -544,16 +617,17 @@ loadNamespace <- function (package, lib.loc = NULL,
                 }
                 if(length(addGenerics)) {
                     ## skip primitives
-                    addGenerics <- addGenerics[sapply(addGenerics, function(what) ! is.primitive(get(what, mode = "function", envir = ns)))]
+                    addGenerics <- addGenerics[vapply(addGenerics, function(what)
+                        !is.primitive(get(what, mode = "function", envir = ns)), NA)]
                     ## the rest must be generic functions, implicit or local
                     ## or have been cached via a DEPENDS package
-                    ok <- sapply(addGenerics, methods:::.findsGeneric, ns)
+		    ok <- vapply(addGenerics, methods:::.findsGeneric, 1L, ns)
                     if(!all(ok)) {
                         bad <- sort(unique(addGenerics[!ok]))
                         msg <-
                             ngettext(length(bad),
                                      "Function found when exporting methods from the namespace %s which is not S4 generic: %s",
-                                     "Functions found when exporting methods from the namespace %s which are not S4 generic: %s", domain = "R-base")
+                                     "Functions found when exporting methods from the namespace %s which are not S4 generic: %s")
                         stop(sprintf(msg, sQuote(package),
                                      paste(sQuote(bad), collapse = ", ")),
                              domain = NA, call. = FALSE)
@@ -598,11 +672,11 @@ loadNamespace <- function (package, lib.loc = NULL,
                 ## the internal table.
                 pm <- allGenerics[!(allGenerics %in% expMethods)]
                 if(length(pm)) {
-                    prim <- logical(length(pm))
-                    for(i in seq_along(prim)) {
-                        f <- methods:::getFunction(pm[[i]], FALSE, FALSE, ns)
-                        prim[[i]] <- is.primitive(f)
-                    }
+                    prim <- vapply(pm, function(pmi) {
+                                       f <- methods::getFunction(pmi, FALSE,
+                                                                 FALSE, ns)
+                                       is.primitive(f)
+                                   }, logical(1L))
                     expMethods <- c(expMethods, pm[prim])
                 }
                 for(i in seq_along(expMethods)) {
@@ -654,7 +728,7 @@ loadNamespace <- function (package, lib.loc = NULL,
 requireNamespace <- function (package, ..., quietly = FALSE)
 {
     package <- as.character(package)[[1L]] # like loadNamespace
-    ns <- .Internal(getRegisteredNamespace(as.name(package)))
+    ns <- .Internal(getRegisteredNamespace(package))
     res <- TRUE
     if (is.null(ns)) {
         if(!quietly)
@@ -675,74 +749,51 @@ requireNamespace <- function (package, ..., quietly = FALSE)
 }
 
 loadingNamespaceInfo <- function() {
-    dynGet <- function(name,
-                       notFound = stop(gettextf("%s not found", sQuote(name)),
-                       domain = NA))
-    {
-        n <- sys.nframe()
-        while (n > 1) {
-            n <- n - 1
-            env <- sys.frame(n)
-            if (exists(name, envir = env, inherits = FALSE))
-                return(get(name, envir = env, inherits = FALSE))
-        }
-        notFound
-    }
     dynGet("__LoadingNamespaceInfo__", stop("not loading a namespace"))
 }
 
 topenv <- function(envir = parent.frame(),
                    matchThisEnv = getOption("topLevelEnvironment")) {
-    while (! identical(envir, emptyenv())) {
-        nm <- attributes(envir)[["names", exact = TRUE]]
-        if ((is.character(nm) && length(grep("^package:" , nm))) ||
-	    ## matchThisEnv is used in sys.source
-            identical(envir, matchThisEnv) ||
-            identical(envir, .GlobalEnv) ||
-            identical(envir, baseenv()) ||
-            .Internal(isNamespaceEnv(envir)) ||
-	    ## packages except base and those with a separate namespace have .packageName
-            exists(".packageName", envir = envir, inherits = FALSE))
-            return(envir)
-        else envir <- parent.env(envir)
-    }
-    return(.GlobalEnv)
+    .Internal(topenv(envir, matchThisEnv))
 }
 
 unloadNamespace <- function(ns)
 {
-    ## only used to run .onUnload
-    runHook <- function(hookname, env, ...) {
-        if (exists(hookname, envir = env, inherits = FALSE)) {
-            fun <- get(hookname, envir = env, inherits = FALSE)
-            res <- tryCatch(fun(...), error=identity)
-            if (inherits(res, "error")) {
-                warning(gettextf("%s failed in %s() for '%s', details:\n  call: %s\n  error: %s",
-                                 hookname, "unloadNamespace", nsname,
-                                 deparse(conditionCall(res))[1L],
-                                 conditionMessage(res)),
-                        call. = FALSE, domain = NA)
-            }
-        }
+    ## check, so we do not load & unload:
+    if ((is.character(ns) && any(ns == loadedNamespaces())) ||
+        (is.environment(ns) && any(getNamespaceName(ns) == loadedNamespaces()))) {
+	## only used to run .onUnload
+	runHook <- function(hookname, env, ...) {
+	    if (!is.null(fun <- env[[hookname]])) {
+		res <- tryCatch(fun(...), error=identity)
+		if (inherits(res, "error")) {
+		    warning(gettextf("%s failed in %s() for '%s', details:\n  call: %s\n  error: %s",
+				     hookname, "unloadNamespace", nsname,
+				     deparse(conditionCall(res))[1L],
+				     conditionMessage(res)),
+			    call. = FALSE, domain = NA)
+		}
+	    }
+	}
+	ns <- asNamespace(ns, base.OK = FALSE)
+	nsname <- getNamespaceName(ns)
+	pos <- match(paste0("package:", nsname), search())
+	if (! is.na(pos)) detach(pos = pos)
+	users <- getNamespaceUsers(ns)
+	if (length(users))
+	    stop(gettextf("namespace %s is imported by %s so cannot be unloaded",
+			  sQuote(getNamespaceName(ns)),
+			  paste(sQuote(users), collapse = ", ")),
+		 domain = NA)
+	nspath <- .getNamespaceInfo(ns, "path")
+	hook <- getHook(packageEvent(nsname, "onUnload")) # might be list()
+	for(fun in rev(hook)) try(fun(nsname, nspath))
+	runHook(".onUnload", ns, nspath)
+	.Internal(unregisterNamespace(nsname))
+	if(.isMethodsDispatchOn() && methods:::.hasS4MetaData(ns))
+	    methods::cacheMetaData(ns, FALSE, ns)
+	.Internal(lazyLoadDBflush(paste0(nspath, "/R/", nsname, ".rdb")))
     }
-    ns <- asNamespace(ns, base.OK = FALSE)
-    nsname <- getNamespaceName(ns)
-    pos <- match(paste("package", nsname, sep = ":"), search())
-    if (! is.na(pos)) detach(pos = pos)
-    users <- getNamespaceUsers(ns)
-    if (length(users))
-        stop(gettextf("namespace %s is imported by %s so cannot be unloaded",
-                      sQuote(getNamespaceName(ns)),
-                      paste(sQuote(users), collapse = ", ")),
-             domain = NA)
-    nspath <- getNamespaceInfo(ns, "path")
-    hook <- getHook(packageEvent(nsname, "onUnload")) # might be list()
-    for(fun in rev(hook)) try(fun(nsname, nspath))
-    runHook(".onUnload", ns, nspath)
-    .Internal(unregisterNamespace(nsname))
-    if(.isMethodsDispatchOn() && methods:::.hasS4MetaData(ns))
-        methods:::cacheMetaData(ns, FALSE, ns)
-    .Internal(lazyLoadDBflush(paste0(nspath, "/R/", nsname, ".rdb")))
     invisible()
 }
 
@@ -752,14 +803,17 @@ isBaseNamespace <- function(ns) identical(ns, .BaseNamespaceEnv)
 
 getNamespaceInfo <- function(ns, which) {
     ns <- asNamespace(ns, base.OK = FALSE)
-    info <- get(".__NAMESPACE__.", envir = ns, inherits = FALSE)
-    get(which, envir = info, inherits = FALSE)
+    get(which, envir = ns[[".__NAMESPACE__."]])
+}
+
+.getNamespaceInfo <- function(ns, which) {
+    ns[[".__NAMESPACE__."]][[which]]
 }
 
 setNamespaceInfo <- function(ns, which, val) {
     ns <- asNamespace(ns, base.OK = FALSE)
-    info <- get(".__NAMESPACE__.", envir = ns, inherits = FALSE)
-    assign(which, val, envir = info)
+    info <- ns[[".__NAMESPACE__."]]
+    info[[which]] <- val
 }
 
 asNamespace <- function(ns, base.OK = TRUE) {
@@ -772,11 +826,14 @@ asNamespace <- function(ns, base.OK = TRUE) {
     else ns
 }
 
-namespaceImport <- function(self, ..., from = NULL)
+namespaceImport <- function(self, ..., from = NULL, except = character(0L))
     for (ns in list(...))
-        namespaceImportFrom(self, asNamespace(ns), from = from)
+        namespaceImportFrom(self, asNamespace(ns), from = from,
+                            except = except)
 
-namespaceImportFrom <- function(self, ns, vars, generics, packages, from = "non-package environment")
+namespaceImportFrom <- function(self, ns, vars, generics, packages,
+                                from = "non-package environment",
+                                except = character(0L))
 {
     addImports <- function(ns, from, what) {
         imp <- structure(list(what), names = getNamespaceName(from))
@@ -799,8 +856,7 @@ namespaceImportFrom <- function(self, ns, vars, generics, packages, from = "non-
     whichMethodMetaNames <- function(impvars) {
         if(!.isMethodsDispatchOn())
             return(numeric())
-        mm <- ".__T__"
-        seq_along(impvars)[substr(impvars, 1L, nchar(mm, type = "c")) == mm]
+	seq_along(impvars)[startsWith(impvars, ".__T__")]
     }
     genericPackage <- function(f) {
         if(methods::is(f, "genericFunction")) f at package
@@ -821,6 +877,7 @@ namespaceImportFrom <- function(self, ns, vars, generics, packages, from = "non-
         vars <- getNamespaceExports(ns)
         vars <- vars[! vars %in% stoplist]
     } else vars
+    impvars <- impvars[! impvars %in% except]
     impvars <- makeImportExportNames(impvars)
     impnames <- names(impvars)
     if (anyDuplicated(impnames)) {
@@ -828,17 +885,19 @@ namespaceImportFrom <- function(self, ns, vars, generics, packages, from = "non-
                       paste(sQuote(impnames[duplicated(impnames)]),
                             collapse = ", ")), domain = NA)
     }
-    if (isNamespace(self) && isBaseNamespace(self)) {
-        impenv <- self
-        msg <- gettext("replacing local value with import %s when loading %s")
-        register <- FALSE
-    }
-    else if (isNamespace(self)) {
-        if (namespaceIsSealed(self))
-            stop("cannot import into a sealed namespace")
-        impenv <- parent.env(self)
-        msg <- gettext("replacing previous import by %s when loading %s")
-        register <- TRUE
+    if (isNamespace(self)) {
+        if(isBaseNamespace(self)) {
+            impenv <- self
+            msg <- gettext("replacing local value with import %s when loading %s")
+            register <- FALSE
+        }
+        else {
+            if (namespaceIsSealed(self))
+                stop("cannot import into a sealed namespace")
+            impenv <- parent.env(self)
+            msg <- gettext("replacing previous import by %s when loading %s")
+            register <- TRUE
+        }
     }
     else if (is.environment(self)) {
         impenv <- self
@@ -860,9 +919,9 @@ namespaceImportFrom <- function(self, ns, vars, generics, packages, from = "non-
 		    genName <- generics[[i]]
                     ## if(i > length(generics) || !nzchar(genName))
                     ##   {warning("got invalid index for importing ",mlname); next}
-		    fdef <- methods:::getGeneric(genName,
-                                                 where = impenv,
-                                                 package = packages[[i]])
+		    fdef <- methods::getGeneric(genName,
+                                                where = impenv,
+                                                package = packages[[i]])
 		    if(is.null(fdef))
 			warning(gettextf("found methods to import for function %s but not the generic itself",
 					 sQuote(genName)),
@@ -878,26 +937,47 @@ namespaceImportFrom <- function(self, ns, vars, generics, packages, from = "non-
 	}
     }
     for (n in impnames)
-	if (exists(n, envir = impenv, inherits = FALSE)) {
-	    if (.isMethodsDispatchOn() && methods:::isGeneric(n, ns)) {
+	if (!is.null(genImp <- impenv[[n]])) {
+	    if (.isMethodsDispatchOn() && methods::isGeneric(n, ns)) {
 		## warn only if generic overwrites a function which
 		## it was not derived from
 		genNs <- genericPackage(get(n, envir = ns))
-                genImp <- get(n, envir = impenv)
                 if(identical(genNs, genericPackage(genImp))) next # same generic
 		genImpenv <- environmentName(environment(genImp))
                 ## May call environment() on a non-function--an undocumented
                 ## "feature" of environment() is that it returns a special
                 ## attribute for non-functions, usually NULL
 		if (!identical(genNs, genImpenv) ||
-                    methods:::isGeneric(n, impenv)) {}
+                    methods::isGeneric(n, impenv)) {}
                 else next
 	    }
-            ## this is always called from another function, so reporting call
-            ## is unhelpful
-            warning(sprintf(msg, sQuote(paste(nsname, n, sep = "::")),
-                            sQuote(from)),
-                    call. = FALSE, domain = NA)
+            if (identical(genImp, get(n, ns))) next
+            if (isNamespace(self) && !isBaseNamespace(self)) {
+                ## Now try to figure out where we imported from
+                ## The 'imports' list is named by where-from
+                ## and is in order of adding.
+                current <- getNamespaceInfo(self, "imports")
+                poss <- lapply(rev(current), "[", n)
+                poss <- poss[!sapply(poss, is.na)]
+                if(length(poss) >= 1L) {
+                    msg <- gettext("replacing previous import %s by %s when loading %s")
+                    prev <- names(poss)[1L]
+                    warning(sprintf(msg,
+                                    sQuote(paste(prev, n, sep = "::")),
+                                    sQuote(paste(nsname, n, sep = "::")),
+                                    sQuote(from)),
+                            call. = FALSE, domain = NA)
+                } else
+                    warning(sprintf(msg, sQuote(paste(nsname, n, sep = "::")),
+                                    sQuote(from)),
+                            call. = FALSE, domain = NA)
+            } else {
+                ## this is always called from another function,
+                ## so reporting call is unhelpful
+                warning(sprintf(msg, sQuote(paste(nsname, n, sep = "::")),
+                                sQuote(from)),
+                        call. = FALSE, domain = NA)
+            }
 	}
     importIntoEnv(impenv, impnames, ns, impvars)
     if (register)
@@ -907,7 +987,7 @@ namespaceImportFrom <- function(self, ns, vars, generics, packages, from = "non-
 namespaceImportClasses <- function(self, ns, vars, from = NULL)
 {
     for(i in seq_along(vars))
-        vars[[i]] <- methods:::classMetaName(vars[[i]])
+        vars[[i]] <- methods::classMetaName(vars[[i]])
     namespaceImportFrom(self, asNamespace(ns), vars, from = from)
 }
 
@@ -918,15 +998,13 @@ namespaceImportMethods <- function(self, ns, vars, from = NULL)
     packages <- character()
     allFuns <- methods:::.getGenerics(ns) # all the methods tables in ns
     allPackages <- attr(allFuns, "package")
-    pkg <- methods:::getPackageName(ns)
+    pkg <- methods::getPackageName(ns)
     if(!all(vars %in% allFuns)) {
         message(gettextf("No methods found in \"%s\" for requests: %s",
                          pkg, paste(vars[is.na(match(vars, allFuns))], collapse = ", ")),
                 domain = NA)
         vars <- vars[vars %in% allFuns]
     }
-    tPrefix <- methods:::.TableMetaPrefix()
-    allMethodTables <- methods:::.getGenerics(ns, tPrefix)
     if(any(is.na(match(vars, allFuns))))
         stop(gettextf("requested methods not found in environment/package %s: %s",
                       sQuote(pkg),
@@ -947,19 +1025,19 @@ namespaceImportMethods <- function(self, ns, vars, from = NULL)
             }
         }
         if(g %in% vars && !exists(g, envir = self, inherits = FALSE)) {
-            if(exists(g, envir = ns) &&
-               methods:::is(get(g, envir = ns), "genericFunction")) {
+	    if(!is.null(f <- get0(g, envir = ns)) && methods::is(f, "genericFunction")) {
                 allVars <- c(allVars, g)
                 generics <- c(generics, g)
                 packages <- c(packages, p)
-            }
-            else { # should be primitive
+            } else if (g %in% c("as.vector", "is.unsorted", "unlist")) {
+                ## implicit generics
+            } else { # should be primitive
                 fun <- methods::getFunction(g, mustFind = FALSE, where = self)
                 if(is.primitive(fun) || methods::is(fun, "genericFunction")) {}
                 else
-                    warning(gettextf("No generic function found corresponding to requested imported methods for \"%s\" from package \"%s\" (malformed exports?)",
-                                 g, pkg),
-                        domain = NA)
+                    warning(gettextf("No generic function %s found corresponding to requested imported methods from package %s when loading %s (malformed exports?)",
+                                 sQuote(g), sQuote(pkg), sQuote(from)),
+                        domain = NA, call. = FALSE)
             }
         }
     }
@@ -969,12 +1047,12 @@ namespaceImportMethods <- function(self, ns, vars, from = NULL)
 
 importIntoEnv <- function(impenv, impnames, expenv, expnames) {
     exports <- getNamespaceInfo(expenv, "exports")
-    ex <- .Internal(ls(exports, TRUE))
-    if(!all(expnames %in% ex)) {
-        miss <- expnames[! expnames %in% ex]
+    ex <- names(exports)
+    if(!all(eie <- expnames %in% ex)) {
+        miss <- expnames[!eie]
         ## if called (indirectly) for namespaceImportClasses
         ## these are all classes
-        if(all(grepl("^\\.__C__", miss))) {
+        if(all(startsWith(miss, ".__C__"))) {
             miss <- sub("^\\.__C__", "", miss)
             stop(sprintf(ngettext(length(miss),
                                   "class %s is not exported by 'namespace:%s'",
@@ -991,7 +1069,7 @@ importIntoEnv <- function(impenv, impnames, expenv, expnames) {
                  call. = FALSE, domain = NA)
         }
     }
-    expnames <- unlist(lapply(expnames, get, envir = exports, inherits = FALSE))
+    expnames <- unlist(mget(expnames, envir = exports, inherits = FALSE), recursive=FALSE)
     if (is.null(impnames)) impnames <- character()
     if (is.null(expnames)) expnames <- character()
     .Internal(importIntoEnv(impenv, impnames, expenv, expnames))
@@ -1005,10 +1083,9 @@ namespaceExport <- function(ns, vars) {
     ns <- asNamespace(ns, base.OK = FALSE)
     if (length(vars)) {
         addExports <- function(ns, new) {
-            exports <- getNamespaceInfo(ns, "exports")
+            exports <- .getNamespaceInfo(ns, "exports")
             expnames <- names(new)
-            intnames <- new
-            objs <- .Internal(ls(exports, TRUE))
+            objs <- names(exports)
             ex <- expnames %in% objs
             if(any(ex))
                 warning(sprintf(ngettext(sum(ex),
@@ -1016,8 +1093,7 @@ namespaceExport <- function(ns, vars) {
                                          "previous exports '%s' are being replaced"),
                                 paste(sQuote(expnames[ex]), collapse = ", ")),
                         call. = FALSE, domain = NA)
-            for (i in seq_along(new))
-                assign(expnames[i], intnames[i], envir = exports)
+            list2env(as.list(new), exports)
         }
         makeImportExportNames <- function(spec) {
             old <- as.character(spec)
@@ -1032,7 +1108,7 @@ namespaceExport <- function(ns, vars) {
         }
         new <- makeImportExportNames(unique(vars))
         ## calling exists each time is too slow, so do two phases
-        undef <- new[! new %in% .Internal(ls(ns, TRUE))]
+        undef <- new[! new %in% names(ns)]
         undef <- undef[! vapply(undef, exists, NA, envir = ns)]
         if (length(undef)) {
             undef <- do.call("paste", as.list(c(undef, sep = ", ")))
@@ -1043,27 +1119,22 @@ namespaceExport <- function(ns, vars) {
     }
 }
 
-.mergeExportMethods <- function(new, ns) {
-##    if(!.isMethodsDispatchOn()) return(FALSE)
-    mm <- methods:::methodsPackageMetaName("M","")
-    newMethods <- new[substr(new, 1L, nchar(mm, type = "c")) == mm]
+.mergeExportMethods <- function(new, ns)
+{
+    ## avoid bootstrapping issues when using methods:::methodsPackageMetaName("M","")
+    ## instead of  ".__M__" :
+    newMethods <- new[startsWith(new, ".__M__")]
     nsimports <- parent.env(ns)
     for(what in newMethods) {
-        if(exists(what, envir = nsimports, inherits = FALSE)) {
-            m1 <- get(what, envir = nsimports)
+	if(!is.null(m1 <- nsimports[[what]])) {
             m2 <- get(what, envir = ns)
-            assign(what, envir = ns, methods:::mergeMethods(m1, m2))
+            ns[[what]] <- methods::mergeMethods(m1, m2)
         }
     }
 }
 
-
-## NB this needs a decorated name, foo_ver, if appropriate
-packageHasNamespace <- function(package, package.lib) {
-    namespaceFilePath <- function(package, package.lib)
-        file.path(package.lib, package, "NAMESPACE")
-    file.exists(namespaceFilePath(package, package.lib))
-}
+packageHasNamespace <- function(package, package.lib)
+    file.exists(file.path(package.lib, package, "NAMESPACE"))
 
 parseNamespaceFile <- function(package, package.lib, mustExist = TRUE)
 {
@@ -1109,8 +1180,8 @@ parseNamespaceFile <- function(package, package.lib, mustExist = TRUE)
                           ! Sys.getlocale("LC_CTYPE") %in% c("C", "POSIX")) {
 	    con <- file(nsFile, encoding=enc)
             on.exit(close(con))
-	    parse(con, srcfile=NULL)
-        } else parse(nsFile, srcfile=NULL)
+	    parse(con, keep.source = FALSE, srcfile = NULL)
+        } else parse(nsFile, keep.source = FALSE, srcfile = NULL)
     else if (mustExist)
         stop(gettextf("package %s has no 'NAMESPACE' file", sQuote(package)),
              domain = NA)
@@ -1138,6 +1209,12 @@ parseNamespaceFile <- function(package, package.lib, mustExist = TRUE)
 		     domain = NA)
 	    r
 	}
+        evalToChar <- function(cc) {
+            vars <- all.vars(cc)
+            names(vars) <- vars
+            as.character(eval(eval(call("substitute", cc, as.list(vars))),
+                              .GlobalEnv))
+        }
         switch(as.character(e[[1L]]),
                "if" = if (eval(e[[2L]], .GlobalEnv))
                parseDirective(e[[3L]])
@@ -1169,7 +1246,15 @@ parseNamespaceFile <- function(package, package.lib, mustExist = TRUE)
                exportMethods = {
                    exportMethods <<- c(asChar(e[-1L]), exportMethods)
                },
-               import = imports <<- c(imports, as.list(asChar(e[-1L]))),
+               import = {
+                   except <- e$except
+                   e$except <- NULL
+                   pkgs <- as.list(asChar(e[-1L]))
+                   if (!is.null(except)) {
+                       pkgs <- lapply(pkgs, list, except=evalToChar(except))
+                   }
+                   imports <<- c(imports, pkgs)
+               },
                importFrom = {
                    imp <- e[-1L]
                    ivars <- imp[-1L]
@@ -1207,7 +1292,7 @@ parseNamespaceFile <- function(package, package.lib, mustExist = TRUE)
                        structure(c(dynlibs, dyl),
                                  names = c(names(dynlibs),
                                  ifelse(!is.null(names(e)) &&
-                                        names(e)[2L] != "", names(e)[2L], "" )))
+                                        nzchar(names(e)[2L]), names(e)[2L], "" )))
                    if (length(e) > 2L) {
                        ## Author has specified some mappings for the symbols
 
@@ -1238,7 +1323,7 @@ parseNamespaceFile <- function(package, package.lib, mustExist = TRUE)
                            warning(gettextf("duplicate symbol names %s in useDynLib(\"%s\")",
                                             paste(sQuote(names(symNames)[dup]),
                                                   collapse = ", "), dyl),
-                                   domain = NA)
+                                   domain = NA, call. = FALSE)
 
                        symNames <- symNames[!dup]
 
@@ -1249,10 +1334,12 @@ parseNamespaceFile <- function(package, package.lib, mustExist = TRUE)
                            ## Take .fixes and treat it as a call,
                            ## e.g. c("pre", "post") or a regular name
                            ## as the prefix.
-                           if(symNames[idx] != "") {
-                               e <- parse(text = symNames[idx], srcfile = NULL)[[1L]]
+                           if(nzchar(symNames[idx])) {
+                               e <- parse(text = symNames[idx],
+                                          keep.source = FALSE,
+                                          srcfile = NULL)[[1L]]
                                if(is.call(e))
-                                   val <- eval(e)
+                                   val <- eval(e, .GlobalEnv)
                                else
                                    val <- as.character(e)
                                if(length(val))
@@ -1320,25 +1407,27 @@ parseNamespaceFile <- function(package, package.lib, mustExist = TRUE)
          S3methods = unique(S3methods[seq_len(nS3), , drop = FALSE]) )
 } ## end{parseNamespaceFile}
 
+## unused
 registerS3method <- function(genname, class, method, envir = parent.frame()) {
     addNamespaceS3method <- function(ns, generic, class, method) {
-        regs <- getNamespaceInfo(ns, "S3methods")
-        regs <- rbind(regs, c(generic, class, method))
+	regs <- rbind(.getNamespaceInfo(ns, "S3methods"),
+		      c(generic, class, method))
         setNamespaceInfo(ns, "S3methods", regs)
     }
     groupGenerics <- c("Math", "Ops",  "Summary", "Complex")
     defenv <- if(genname %in% groupGenerics) .BaseNamespaceEnv
     else {
         genfun <- get(genname, envir = envir)
-        if(.isMethodsDispatchOn() && methods:::is(genfun, "genericFunction"))
-            genfun <- methods:::finalDefaultMethod(genfun at default)
+        if(.isMethodsDispatchOn() && methods::is(genfun, "genericFunction"))
+            genfun <- methods::finalDefaultMethod(genfun at default)
         if (typeof(genfun) == "closure") environment(genfun)
 	else .BaseNamespaceEnv
     }
-    if (! exists(".__S3MethodsTable__.", envir = defenv, inherits = FALSE))
-        assign(".__S3MethodsTable__.", new.env(hash = TRUE, parent = baseenv()),
-               envir = defenv)
-    table <- get(".__S3MethodsTable__.", envir = defenv, inherits = FALSE)
+    if (is.null(table <- defenv[[".__S3MethodsTable__."]])) {
+	table <- new.env(hash = TRUE, parent = baseenv())
+	defenv[[".__S3MethodsTable__."]] <- table
+    }
+
     if (is.character(method)) {
         assignWrapped <- function(x, method, home, envir) {
             method <- method            # force evaluation
@@ -1372,6 +1461,7 @@ registerS3methods <- function(info, package, env)
 	home <- home                # force evaluation
 	delayedAssign(x, get(method, envir = home), assign.env = envir)
     }
+    overwrite <- matrix(NA_character_, 0, 2)
     .registerS3method <- function(genname, class, method, nm, envir)
     {
         ## S3 generics should either be imported explicitly or be in
@@ -1383,19 +1473,22 @@ registerS3methods <- function(info, package, env)
         ## group generics).
         defenv <- if(!is.na(w <- .knownS3Generics[genname])) asNamespace(w)
         else {
-            if(!exists(genname, envir = parent.env(envir)))
-                stop(gettextf("object '%s' not found whilst loading namespace '%s'",
-                              genname, package), call. = FALSE, domain = NA)
-            genfun <- get(genname, envir = parent.env(envir))
-            if(.isMethodsDispatchOn() && methods:::is(genfun, "genericFunction"))
+	    if(is.null(genfun <- get0(genname, envir = parent.env(envir))))
+		stop(gettextf("object '%s' not found whilst loading namespace '%s'",
+			      genname, package), call. = FALSE, domain = NA)
+            if(.isMethodsDispatchOn() && methods::is(genfun, "genericFunction"))
 		genfun <- genfun at default  # nearly always, the S3 generic
             if (typeof(genfun) == "closure") environment(genfun)
             else .BaseNamespaceEnv
         }
-        if (! exists(".__S3MethodsTable__.", envir = defenv, inherits = FALSE))
-            assign(".__S3MethodsTable__.", new.env(hash = TRUE, parent = baseenv()),
-                   envir = defenv)
-        table <- get(".__S3MethodsTable__.", envir = defenv, inherits = FALSE)
+	if (is.null(table <- defenv[[".__S3MethodsTable__."]])) {
+	    table <- new.env(hash = TRUE, parent = baseenv())
+	    defenv[[".__S3MethodsTable__."]] <- table
+	}
+        if(!is.null(e <- table[[nm]])) {
+            current <- environmentName(environment(e))
+            overwrite <<- rbind(overwrite, c(as.vector(nm), current))
+        }
 	assignWrapped(nm, method, home = envir, envir = table)
     }
 
@@ -1403,7 +1496,7 @@ registerS3methods <- function(info, package, env)
     z <- is.na(info[,3])
     info[z,3] <- methname[z]
     Info <- cbind(info, methname)
-    loc <- .Internal(ls(env, TRUE))
+    loc <- names(env)
     notex <- !(info[,3] %in% loc)
     if(any(notex))
         warning(sprintf(ngettext(sum(notex),
@@ -1421,15 +1514,14 @@ registerS3methods <- function(info, package, env)
     if(.isMethodsDispatchOn())
         for(i in which(localGeneric)) {
             genfun <- get(Info[i, 1], envir = env)
-            if(methods:::is(genfun, "genericFunction")) {
+            if(methods::is(genfun, "genericFunction")) {
                 localGeneric[i] <- FALSE
                 registerS3method(Info[i, 1], Info[i, 2], Info[i, 3], env)
             }
         }
     if(any(localGeneric)) {
         lin <- Info[localGeneric, , drop = FALSE]
-        S3MethodsTable <-
-            get(".__S3MethodsTable__.", envir = env, inherits = FALSE)
+        S3MethodsTable <- env[[".__S3MethodsTable__."]]
         ## we needed to move this to C for speed.
         ## for(i in seq_len(nrow(lin)))
         ##    assign(lin[i,4], get(lin[i,3], envir = env),
@@ -1441,6 +1533,22 @@ registerS3methods <- function(info, package, env)
     fin <- Info[!l2, , drop = FALSE]
     for(i in seq_len(nrow(fin)))
         .registerS3method(fin[i, 1], fin[i, 2], fin[i, 3], fin[i, 4], env)
+    if(package != "MASS" && ## MASS is providing methods for stubs in stats
+       nrow(overwrite) &&
+       Sys.getenv("_R_LOAD_CHECK_OVERWRITE_S3_METHODS_")
+          %in% c(package, "all")) {
+        std <- unlist(tools:::.get_standard_package_names(), use.names=FALSE)
+        overwrite <- overwrite[overwrite[, 2L] %in% std, , drop = FALSE]
+       if(nr <- nrow(overwrite)) {
+           msg <- ngettext(nr,
+                           "Registered S3 method from a standard package overwritten by '%s':",
+                           "Registered S3 methods from standard package(s) overwritten by '%s':",
+                           domain = NA)
+           message(sprintf(msg, package))
+           colnames(overwrite) <- c("method", "from")
+           print(as.data.frame(overwrite), row.names = FALSE, right = FALSE)
+       }
+    }
 
     setNamespaceInfo(env, "S3methods",
                      rbind(info, getNamespaceInfo(env, "S3methods")))
@@ -1448,13 +1556,11 @@ registerS3methods <- function(info, package, env)
 
 .mergeImportMethods <- function(impenv, expenv, metaname)
 {
-    expMethods <- get(metaname, envir = expenv)
-    if(exists(metaname, envir = impenv, inherits = FALSE)) {
-        impMethods <- get(metaname, envir = impenv)
-        assign(metaname,
-               methods:::.mergeMethodsTable2(impMethods,
-                                             expMethods, expenv, metaname),
-               envir = impenv)
-        impMethods
-    } else NULL
+    impMethods <- impenv[[metaname]]
+    if(!is.null(impMethods))
+	impenv[[metaname]] <-
+	    methods:::.mergeMethodsTable2(impMethods,
+					  newtable = expenv[[metaname]], # known to exist by caller
+					  expenv, metaname)
+    impMethods # possibly NULL
 }
diff --git a/src/library/base/R/notyet.R b/src/library/base/R/notyet.R
index 860253b..fc5e310 100644
--- a/src/library/base/R/notyet.R
+++ b/src/library/base/R/notyet.R
@@ -1,5 +1,5 @@
 #  File src/library/base/R/notyet.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
 #  Copyright (C) 1995-2012 The R Core Team
 #
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 .NotYetImplemented <- function ()
     stop(gettextf("'%s' is not implemented yet",
diff --git a/src/library/base/R/octhex.R b/src/library/base/R/octhex.R
index a52a1f8..1326f88 100644
--- a/src/library/base/R/octhex.R
+++ b/src/library/base/R/octhex.R
@@ -1,7 +1,7 @@
 #  File src/library/base/R/octhex.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
-#  Copyright (C) 1995-2012 The R Core Team
+#  Copyright (C) 1995-2014 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
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 format.octmode <- function(x, width = NULL, ...)
 {
diff --git a/src/library/base/R/options.R b/src/library/base/R/options.R
index dc90ac2..9e375ee 100644
--- a/src/library/base/R/options.R
+++ b/src/library/base/R/options.R
@@ -1,7 +1,7 @@
 #  File src/library/base/R/options.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
-#  Copyright (C) 1995-2012 The R Core Team
+#  Copyright (C) 1995-2015 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
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 options <- function(...)
     .Internal(options(...))
@@ -23,7 +23,9 @@ getOption <- function(x, default = NULL)
 {
     ## To avoid always performing the %in%,
     ## we use the original code if default is not specified.
-    if(missing(default)) return(options(x)[[1L]])
-
-    if(x %in% names(options())) options(x)[[1L]] else default
+    ## if(missing(default)) return(options(x)[[1L]])
+    if(missing(default) || x %in% names(options()))
+	.Internal(getOption(x))
+    else
+	default
 }
diff --git a/src/library/base/R/outer.R b/src/library/base/R/outer.R
index a377ade..28eb31b 100644
--- a/src/library/base/R/outer.R
+++ b/src/library/base/R/outer.R
@@ -1,7 +1,7 @@
 #  File src/library/base/R/outer.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
-#  Copyright (C) 1995-2013 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
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 outer <- function (X, Y, FUN = "*", ...)
 {
@@ -36,22 +36,22 @@ outer <- function (X, Y, FUN = "*", ...)
         no.ny <- is.null(names(Y))
         if(!no.ny) ny <- list(names(Y))
     }
-    if (is.character(FUN) && FUN=="*") {
-        if(!missing(...)) stop('using ... with FUN = "*" is an error')
-        # this is for numeric vectors, so dropping attributes is OK
-        robj <- as.vector(X) %*% t(as.vector(Y))
-        dim(robj) <- c(dX, dY)
-    } else {
-        FUN <- match.fun(FUN)
-        ## Y may have a class, so don't use rep.int
-        Y <- rep(Y, rep.int(length(X), length(Y)))
-        ##  length.out is not an argument of the generic rep()
-        ##  X <- rep(X, length.out = length(Y))
-        if(length(X))
-            X <- rep(X, times = ceiling(length(Y)/length(X)))
-        robj <- FUN(X, Y, ...)
-        dim(robj) <- c(dX, dY) # careful not to lose class here
-    }
+    robj <-
+        if (is.character(FUN) && FUN=="*") {
+            if(!missing(...)) stop('using ... with FUN = "*" is an error')
+            ## this is for numeric vectors, so dropping attributes is OK
+            as.vector(X) %*% t(as.vector(Y))
+        } else {
+            FUN <- match.fun(FUN)
+            ## Y may have a class, so don't use rep.int
+            Y <- rep(Y, rep.int(length(X), length(Y)))
+            ##  length.out is not an argument of the generic rep()
+            ##  X <- rep(X, length.out = length(Y))
+            if(length(X))
+                X <- rep(X, times = ceiling(length(Y)/length(X)))
+            FUN(X, Y, ...)
+        }
+    dim(robj) <- c(dX, dY) # careful not to lose class here
     ## no dimnames if both don't have ..
     if(!(no.nx && no.ny)) {
 	if(no.nx) nx <- vector("list", length(dX)) else
diff --git a/src/library/base/R/pairlist.R b/src/library/base/R/pairlist.R
index f09cd37..5a8ae9a 100644
--- a/src/library/base/R/pairlist.R
+++ b/src/library/base/R/pairlist.R
@@ -1,5 +1,5 @@
 #  File src/library/base/R/pairlist.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
 #  Copyright (C) 1995-2012 The R Core Team
 #
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 as.pairlist <- function(x) .Internal(as.vector(x, "pairlist"))
 pairlist <- function(...) as.pairlist(list(...))
diff --git a/src/library/base/R/parse.R b/src/library/base/R/parse.R
index 907acd3..ca7ac87 100644
--- a/src/library/base/R/parse.R
+++ b/src/library/base/R/parse.R
@@ -1,7 +1,7 @@
 #  File src/library/base/R/parse.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
-#  Copyright (C) 1995-2013 The R Core Team
+#  Copyright (C) 1995-2014 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
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 parse <- function(file = "", n = NULL, text = NULL, prompt = "?",
 		  keep.source = getOption("keep.source"),
@@ -45,8 +45,9 @@ parse <- function(file = "", n = NULL, text = NULL, prompt = "?",
 		    if (!length(text)) text <- ""
             	    close(file)
             	    file <- stdin()
-        	    srcfile <- srcfilecopy(filename, text, file.info(filename)[1,"mtime"],
-        	                       isFile = TRUE)
+        	    srcfile <-
+                        srcfilecopy(filename, text, file.mtime(filename),
+                                    isFile = TRUE)
                 } else
 		    on.exit(close(file))
 	    }
diff --git a/src/library/base/R/paste.R b/src/library/base/R/paste.R
index 2b62ce0..83e8b10 100644
--- a/src/library/base/R/paste.R
+++ b/src/library/base/R/paste.R
@@ -1,5 +1,5 @@
 #  File src/library/base/R/paste.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
 #  Copyright (C) 1995-2012 The R Core Team
 #
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 paste <- function (..., sep = " ", collapse = NULL)
     .Internal(paste(list(...), sep, collapse))
diff --git a/src/library/base/R/pmax.R b/src/library/base/R/pmax.R
index 796f479..e50a8ec 100644
--- a/src/library/base/R/pmax.R
+++ b/src/library/base/R/pmax.R
@@ -1,7 +1,7 @@
 #  File src/library/base/R/pmax.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
-#  Copyright (C) 1995-2012 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
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 pmin.int <- function(..., na.rm = FALSE) .Internal(pmin(na.rm, ...))
 pmax.int <- function(..., na.rm = FALSE) .Internal(pmax(na.rm, ...))
@@ -23,37 +23,41 @@ pmax <- function (..., na.rm = FALSE)
 {
     elts <- list(...)
     if(length(elts) == 0L) stop("no arguments")
-    if(all(vapply(elts, function(x) is.atomic(x) && !is.object(x), NA))) {
-        ## NB: NULL passes is.atomic
-        mmm <- .Internal(pmax(na.rm, ...))
+    if(all(vapply(elts, function(x) is.atomic(x) && !is.object(x), NA))) { # incl. NULL
+	mmm <- .Internal(pmax(na.rm, ...))
+	mostattributes(mmm) <- attributes(elts[[1L]])
     } else {
-        mmm <- elts[[1L]]
-        attr(mmm, "dim") <- NULL  # dim<- would drop names
-        has.na <- FALSE
-        for (each in elts[-1L]) {
-            attr(each, "dim") <- NULL
-            l1 <- length(each); l2 <- length(mmm)
-            if(l2 < l1) {
-                if (l2 && l1 %% l2)
-                    warning("an argument will be fractionally recycled")
-                mmm <- rep(mmm, length.out = l1)
-            } else if(l1 && l1 < l2) {
-                if (l2 %% l1)
-                    warning("an argument will be fractionally recycled")
-                each <- rep(each, length.out = l2)
-            }
-            nas <- cbind(is.na(mmm), is.na(each))
-            if(has.na || (has.na <- any(nas))) {
-                mmm[nas[, 1L]] <- each[nas[, 1L]]
-                each[nas[, 2L]] <- mmm[nas[, 2L]]
-            }
-            change <- mmm < each
-            change <- change & !is.na(change)
-            mmm[change] <- each[change]
-            if (has.na && !na.rm) mmm[nas[, 1L] | nas[, 2L]] <- NA
-        }
+	mmm <- elts[[1L]] ## attr(mmm, "dim") <- NULL  # dim<- would drop names
+	has.na <- FALSE
+        as <- methods::as
+        asL <- function(x) if(isS4(x)) as(x, "logical") else x
+	for (each in elts[-1L]) {
+	    ## attr(each, "dim") <- NULL ## FIXME: deal with d.fr.s !
+	    l1 <- length(each); l2 <- length(mmm)
+	    if(l2 && (l2 < l1 || !l1)) {
+		if (l1 %% l2)
+		    warning("an argument will be fractionally recycled")
+		mmm <- rep(mmm, length.out = l1)
+	    } else if(l1 && (l1 < l2 || !l2)) {
+		if (l2 %% l1)
+		    warning("an argument will be fractionally recycled")
+		each <- rep(each, length.out = l2)
+	    }
+	    na.m <- is.na(mmm)
+	    na.e <- is.na(each)
+	    if(has.na || (has.na <- any(na.m) || any(na.e))) {
+		if(any(na.m <- asL(na.m))) mmm [na.m] <- each[na.m]
+		if(any(na.e <- asL(na.e))) each[na.e] <- mmm [na.e]
+	    }
+	    nS4 <- !isS4(mmm)
+	    if(isS4(change <- mmm < each) && (nS4 || !isS4(each))) # e.g., keep sparse 'each'
+		change <- as(change, "logical")# not as.vector(): kills the d.fr. case
+	    change <- change & !is.na(change)
+	    mmm[change] <- each[change]
+	    if (has.na && !na.rm) mmm[na.m | na.e] <- NA
+	    if(nS4) mostattributes(mmm) <- attributes(elts[[1L]])
+	}
     }
-    mostattributes(mmm) <- attributes(elts[[1L]])
     mmm
 }
 
@@ -61,35 +65,40 @@ pmin <- function (..., na.rm = FALSE)
 {
     elts <- list(...)
     if(length(elts) == 0L) stop("no arguments")
-    if(all(vapply(elts, function(x) is.atomic(x) && !is.object(x), NA))) {
-        mmm <- .Internal(pmin(na.rm, ...))
+    if(all(vapply(elts, function(x) is.atomic(x) && !is.object(x), NA))) { # incl. NULL
+	mmm <- .Internal(pmin(na.rm, ...))
+	mostattributes(mmm) <- attributes(elts[[1L]])
     } else {
-        mmm <- elts[[1L]]
-        attr(mmm, "dim") <- NULL  # dim<- would drop names
-        has.na <- FALSE
-        for (each in elts[-1L]) {
-            attr(each, "dim") <- NULL
-            l1 <- length(each); l2 <- length(mmm)
-            if(l2 < l1) {
-                if (l2 && l1 %% l2)
-                    warning("an argument will be fractionally recycled")
-                mmm <- rep(mmm, length.out = l1)
-            } else if(l1 && l1 < l2) {
-                if (l2 %% l1)
-                    warning("an argument will be fractionally recycled")
-                each <- rep(each, length.out = l2)
-            }
-            nas <- cbind(is.na(mmm), is.na(each))
-            if(has.na || (has.na <- any(nas))) {
-                mmm[nas[, 1L]] <- each[nas[, 1L]]
-                each[nas[, 2L]] <- mmm[nas[, 2L]]
-            }
-            change <- mmm > each
-            change <- change & !is.na(change)
-            mmm[change] <- each[change]
-            if (has.na && !na.rm) mmm[nas[, 1L] | nas[, 2L]] <- NA
-        }
+	mmm <- elts[[1L]] ## attr(mmm, "dim") <- NULL  # dim<- would drop names
+	has.na <- FALSE
+        as <- methods::as
+        asL <- function(x) if(isS4(x)) as(x, "logical") else x
+	for (each in elts[-1L]) {
+	    ## attr(each, "dim") <- NULL ## FIXME: deal with d.fr.s !
+	    l1 <- length(each); l2 <- length(mmm)
+	    if(l2 && (l2 < l1 || !l1)) {
+		if (l1 %% l2)
+		    warning("an argument will be fractionally recycled")
+		mmm <- rep(mmm, length.out = l1)
+	    } else if(l1 && (l1 < l2 || !l2)) {
+		if (l2 %% l1)
+		    warning("an argument will be fractionally recycled")
+		each <- rep(each, length.out = l2)
+	    }
+	    na.m <- is.na(mmm)
+	    na.e <- is.na(each)
+	    if(has.na || (has.na <- any(na.m) || any(na.e))) {
+		if(any(na.m <- asL(na.m))) mmm [na.m] <- each[na.m]
+		if(any(na.e <- asL(na.e))) each[na.e] <- mmm [na.e]
+	    }
+	    nS4 <- !isS4(mmm)
+	    if(isS4(change <- mmm > each) && (nS4 || !isS4(each))) # e.g., keep sparse 'each'
+		change <- as(change, "logical")# not as.vector(): kills the d.fr. case
+	    change <- change & !is.na(change)
+	    mmm[change] <- each[change]
+	    if (has.na && !na.rm) mmm[na.m | na.e] <- NA
+	    if(nS4) mostattributes(mmm) <- attributes(elts[[1L]])
+	}
     }
-    mostattributes(mmm) <- attributes(elts[[1L]])
     mmm
 }
diff --git a/src/library/base/R/pretty.R b/src/library/base/R/pretty.R
index a150c0b..aa0fca1 100644
--- a/src/library/base/R/pretty.R
+++ b/src/library/base/R/pretty.R
@@ -1,5 +1,5 @@
 #  File src/library/base/R/pretty.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
 #  Copyright (C) 1995-2012 The R Core Team
 #
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 pretty <- function(x, ...) UseMethod("pretty")
 
diff --git a/src/library/base/R/print.R b/src/library/base/R/print.R
index eeacb6b..a0994e8 100644
--- a/src/library/base/R/print.R
+++ b/src/library/base/R/print.R
@@ -1,7 +1,7 @@
 #  File src/library/base/R/print.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
-#  Copyright (C) 1995-2012 The R Core Team
+#  Copyright (C) 1995-2014 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
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 print <- function(x, ...) UseMethod("print")
 
@@ -47,6 +47,9 @@ noquote <- function(obj) {
 }
 
 as.matrix.noquote <- function(x, ...) noquote(NextMethod("as.matrix", x))
+
+as.data.frame.noquote <- as.data.frame.vector
+
 c.noquote <- function(..., recursive = FALSE)
     structure(NextMethod("c"), class = "noquote")
 
@@ -68,7 +71,7 @@ print.noquote <- function(x, ...) {
     print(x, quote = FALSE, ...)
 }
 
-## for alias:
+## for alias.lm, aov
 print.listof <- function(x, ...)
 {
     nn <- names(x)
@@ -82,12 +85,20 @@ print.listof <- function(x, ...)
 
 ## formerly same as [.AsIs
 `[.listof` <- function(x, i, ...) structure(NextMethod("["), class = class(x))
+`[.Dlist` <- `[.simple.list` <- `[.listof`
 
 ## used for version:
 print.simple.list <- function(x, ...)
     print(noquote(cbind("_"=unlist(x))), ...)
 
-`[.simple.list` <- `[.listof`
-
 print.function <- function(x, useSource = TRUE, ...)
     .Internal(print.function(x, useSource, ...))
+
+## used for getenv()
+print.Dlist <- function(x, ...)
+{
+    if(!is.list(x) && !is.matrix(x) && is.null(names(x))) ## messed up Dlist
+	return(NextMethod())
+    cat(formatDL(x, ...), sep="\n")
+    invisible(x)
+}
diff --git a/src/library/base/R/qr.R b/src/library/base/R/qr.R
index 5e465fe..46fba07 100644
--- a/src/library/base/R/qr.R
+++ b/src/library/base/R/qr.R
@@ -1,7 +1,7 @@
 #  File src/library/base/R/qr.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
-#  Copyright (C) 1995-2012 The R Core Team
+#  Copyright (C) 1995-2015 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
@@ -14,9 +14,10 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
-is.qr <- function(x) inherits(x, "qr")
+## be fast rather than "complete":
+is.qr <- function(x) is.list(x) && inherits(x, "qr")
 
 qr <- function(x, ...) UseMethod("qr")
 
@@ -217,15 +218,9 @@ qr.Q <- function (qr, complete = FALSE, Dvec)
     qr.qy(qr, D)
 }
 
-qr.R <- function (qr, complete = FALSE, ...)
+qr.R <- function (qr, complete = FALSE)
 {
     if(!is.qr(qr)) stop("argument is not a QR decomposition")
-    if(!missing(...))
-	warning(sprintf(ngettext(length(list(...)),
-				 "extra argument %s will be disregarded",
-				 "extra arguments %s will be disregarded"),
-			 paste(sQuote(names(list(...))), collapse = ", ")),
-		domain = NA)
     R <- qr$qr
     if (!complete)
 	R <- R[seq.int(min(dim(R))), , drop = FALSE]
diff --git a/src/library/base/R/quit.R b/src/library/base/R/quit.R
index 5b4597d..d3d0f26 100644
--- a/src/library/base/R/quit.R
+++ b/src/library/base/R/quit.R
@@ -1,5 +1,5 @@
 #  File src/library/base/R/quit.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
 #  Copyright (C) 1995-2012 The R Core Team
 #
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 quit <- function(save = "default", status=0, runLast=TRUE)
     .Internal(quit(save, status, runLast))
diff --git a/src/library/base/R/range.R b/src/library/base/R/range.R
index bb9b6d6..982730b 100644
--- a/src/library/base/R/range.R
+++ b/src/library/base/R/range.R
@@ -1,5 +1,5 @@
 #  File src/library/base/R/range.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
 #  Copyright (C) 1995-2012 The R Core Team
 #
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 range.default <- function(..., na.rm = FALSE, finite = FALSE)
 {
diff --git a/src/library/base/R/rank.R b/src/library/base/R/rank.R
index 9597e46..a734a69 100644
--- a/src/library/base/R/rank.R
+++ b/src/library/base/R/rank.R
@@ -1,7 +1,7 @@
 #  File src/library/base/R/rank.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
-#  Copyright (C) 1995-2012 The R Core Team
+#  Copyright (C) 1995-2015 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
@@ -14,27 +14,27 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 rank <- function(x, na.last = TRUE,
-		 ties.method = c("average", "first", "random", "max", "min"))
+		 ties.method = c("average", "first", "last", "random", "max", "min"))
 {
     nas <- is.na(x)
     nm <- names(x)
     ties.method <- match.arg(ties.method)
     ## To preserve past behaviour
     if(is.factor(x)) x <- as.integer(x)
-    xx <- x[!nas]
-    ## we pass length(xx) to allow
+    x <- x[!nas]
+    ## we pass length(x) to allow
     y <- switch(ties.method,
 		"average" = , "min" = , "max" =
-		.Internal(rank(xx, length(xx), ties.method)),
-		"first" = sort.list(sort.list(xx)),
-		"random" = sort.list(order(xx, stats::runif(sum(!nas)))))
+		.Internal(rank(x, length(x), ties.method)),
+		"first" = sort.list(sort.list(x)),
+		"last"  = ## == rev(sort.list(sort.list(rev(x)))) :
+		    sort.list(rev.default(sort.list(x, decreasing=TRUE))),
+		"random" = sort.list(order(x, stats::runif(sum(!nas)))))
+    ## the internal code has ranks in [1, length(y)]
     if(!is.na(na.last) && any(nas)) {
-	## the internal code has ranks in [1, length(y)]
-	yy <- integer(length(x))
-	storage.mode(yy) <- storage.mode(y) # integer or double
 	yy <- NA
 	NAkeep <- (na.last == "keep")
 	if(NAkeep || na.last) {
@@ -43,7 +43,7 @@ rank <- function(x, na.last = TRUE,
 	} else {
 	    len <- sum(nas)
 	    yy[!nas] <- y + len
-	    yy[nas] <- 1L : len
+	    yy[nas] <- seq_len(len)
 	}
 	y <- yy
 	names(y) <- nm
diff --git a/src/library/base/R/raw.R b/src/library/base/R/raw.R
index aaa6ce7..90f42dd 100644
--- a/src/library/base/R/raw.R
+++ b/src/library/base/R/raw.R
@@ -1,7 +1,7 @@
 #  File src/library/base/R/raw.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
-#  Copyright (C) 1995-2012 The R Core Team
+#  Copyright (C) 1995-2015 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
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 raw <- function(length = 0L) .Internal(vector("raw", length))
 
@@ -36,3 +36,6 @@ packBits <- function(x, type=c("raw", "integer"))
 
 utf8ToInt <- function(x) .Internal(utf8ToInt(x))
 intToUtf8 <- function(x, multiple=FALSE) .Internal(intToUtf8(x, multiple))
+
+validUTF8 <- function(x) .Internal(validUTF8(x))
+validEnc <- function(x) .Internal(validEnc(x))
diff --git a/src/library/base/R/rep.R b/src/library/base/R/rep.R
index 74b14e8..c88fe1f 100644
--- a/src/library/base/R/rep.R
+++ b/src/library/base/R/rep.R
@@ -1,5 +1,5 @@
 #  File src/library/base/R/rep.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
 #  Copyright (C) 1995-2012 The R Core Team
 #
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 rep.int <- function(x, times) .Internal(rep.int(x, times))
 
diff --git a/src/library/base/R/replace.R b/src/library/base/R/replace.R
index 848cc02..48a41b3 100644
--- a/src/library/base/R/replace.R
+++ b/src/library/base/R/replace.R
@@ -1,5 +1,5 @@
 #  File src/library/base/R/replace.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
 #  Copyright (C) 1995-2012 The R Core Team
 #
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 replace <-
     function (x, list, values)
diff --git a/src/library/base/R/replicate.R b/src/library/base/R/replicate.R
index 9377211..88fcfd0 100644
--- a/src/library/base/R/replicate.R
+++ b/src/library/base/R/replicate.R
@@ -1,5 +1,5 @@
 #  File src/library/base/R/replicate.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
 #  Copyright (C) 1995-2012 The R Core Team
 #
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 replicate <- function(n, expr, simplify = "array")
         sapply(integer(n),
diff --git a/src/library/base/R/rev.R b/src/library/base/R/rev.R
index 1b05a81..a057c66 100644
--- a/src/library/base/R/rev.R
+++ b/src/library/base/R/rev.R
@@ -1,5 +1,5 @@
 #  File src/library/base/R/rev.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
 #  Copyright (C) 1995-2012 The R Core Team
 #
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 rev <- function(x) UseMethod("rev")
 
diff --git a/src/library/base/R/rle.R b/src/library/base/R/rle.R
index 646502d..27eab14 100644
--- a/src/library/base/R/rle.R
+++ b/src/library/base/R/rle.R
@@ -1,5 +1,5 @@
 #  File src/library/base/R/rle.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
 #  Copyright (C) 1995-2014 The R Core Team
 #
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 rle <- function(x)
 {
diff --git a/src/library/base/R/rm.R b/src/library/base/R/rm.R
index a02edfc..e68424e 100644
--- a/src/library/base/R/rm.R
+++ b/src/library/base/R/rm.R
@@ -1,7 +1,7 @@
 #  File src/library/base/R/rm.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
-#  Copyright (C) 1995-2012 The R Core Team
+#  Copyright (C) 1995-2015 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
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 rm <-
     function (..., list = character(), pos = -1, envir = as.environment(pos),
@@ -22,9 +22,9 @@ rm <-
 {
     dots <- match.call(expand.dots=FALSE)$...
     if(length(dots) &&
-       !all(sapply(dots, function(x) is.symbol(x) || is.character(x))))
+       !all(vapply(dots, function(x) is.symbol(x) || is.character(x), NA, USE.NAMES=FALSE)))
        stop("... must contain names or character strings")
-    names <- sapply(dots, as.character)
+    names <- vapply(dots, as.character, "")
     if (length(names) == 0L) names <- character()
     list <- .Primitive("c")(list, names)
     .Internal(remove(list, envir, inherits))
diff --git a/src/library/base/R/rowsum.R b/src/library/base/R/rowsum.R
index daed606..3c4697c 100644
--- a/src/library/base/R/rowsum.R
+++ b/src/library/base/R/rowsum.R
@@ -1,7 +1,7 @@
 #  File src/library/base/R/rowsum.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
-#  Copyright (C) 1995-2013 The R Core Team
+#  Copyright (C) 1995-2014 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
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 rowsum <- function(x, group, reorder = TRUE, ...) UseMethod("rowsum")
 
diff --git a/src/library/base/R/sample.R b/src/library/base/R/sample.R
index e8ae3b8..6820cde 100644
--- a/src/library/base/R/sample.R
+++ b/src/library/base/R/sample.R
@@ -1,7 +1,7 @@
 #  File src/library/base/R/sample.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
-#  Copyright (C) 1995-2012 The R Core Team
+#  Copyright (C) 1995-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
@@ -14,11 +14,11 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 sample <- function(x, size, replace = FALSE, prob = NULL)
 {
-    if(length(x) == 1L && is.numeric(x) && x >= 1) {
+    if(length(x) == 1L && is.numeric(x) && is.finite(x) && x >= 1) {
 	if(missing(size)) size <- x
 	sample.int(x, size, replace, prob)
     } else {
@@ -27,9 +27,10 @@ sample <- function(x, size, replace = FALSE, prob = NULL)
     }
 }
 
-sample.int  <- function(n, size = n, replace = FALSE, prob = NULL)
+sample.int  <- function(n, size = n, replace = FALSE, prob = NULL,
+                        useHash = (!replace && is.null(prob) && size <= n/2 && n > 1e7))
 {
-    if (!replace && is.null(prob) && n > 1e7 && size <= n/2)
+    if (useHash)
         .Internal(sample2(n, size))
     else .Internal(sample(n, size, replace, prob))
 }
diff --git a/src/library/base/R/sapply.R b/src/library/base/R/sapply.R
index 2d15f0a..c70ce78 100644
--- a/src/library/base/R/sapply.R
+++ b/src/library/base/R/sapply.R
@@ -1,7 +1,7 @@
 #  File src/library/base/R/sapply.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
-#  Copyright (C) 1995-2012 The R Core Team
+#  Copyright (C) 1995-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
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 ##' "Simplify" a list of commonly structured components into an array.
 ##'
@@ -26,14 +26,14 @@
 ##' @return x itself, or an array if the simplification "is sensible"
 simplify2array <- function(x, higher = TRUE)
 {
-    if(length(common.len <- unique(unlist(lapply(x, length)))) > 1L)
+    if(length(common.len <- unique(lengths(x))) > 1L)
         return(x)
     if(common.len == 1L)
         unlist(x, recursive = FALSE)
     else if(common.len > 1L) {
         n <- length(x)
         ## make sure that array(*) will not call rep() {e.g. for 'call's}:
-        r <- as.vector(unlist(x, recursive = FALSE))
+	r <- unlist(x, recursive = FALSE, use.names = FALSE)
         if(higher && length(c.dim <- unique(lapply(x, dim))) == 1 &&
            is.numeric(c.dim <- c.dim[[1L]]) &&
            prod(d <- c(c.dim, n)) == length(r)) {
diff --git a/src/library/base/R/scale.R b/src/library/base/R/scale.R
index cc09c33..8558e45 100644
--- a/src/library/base/R/scale.R
+++ b/src/library/base/R/scale.R
@@ -1,5 +1,5 @@
 #  File src/library/base/R/scale.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
 #  Copyright (C) 1995-2012 The R Core Team
 #
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 scale <- function(x, center = TRUE, scale = TRUE) UseMethod("scale")
 
diff --git a/src/library/base/R/scan.R b/src/library/base/R/scan.R
index 9cb2c2f..0fd075d 100644
--- a/src/library/base/R/scan.R
+++ b/src/library/base/R/scan.R
@@ -1,5 +1,5 @@
 #  File src/library/base/R/scan.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
 #  Copyright (C) 1995-2014 The R Core Team
 #
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 scan <-
 function(file = "", what = double(), nmax = -1L, n = -1L, sep = "",
diff --git a/src/library/base/R/seq.R b/src/library/base/R/seq.R
index 117f347..44ef2bd 100644
--- a/src/library/base/R/seq.R
+++ b/src/library/base/R/seq.R
@@ -1,7 +1,7 @@
 #  File src/library/base/R/seq.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
-#  Copyright (C) 1995-2013 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
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 seq <- function(...) UseMethod("seq")
 
@@ -25,7 +25,7 @@ seq.default <-
     if((One <- nargs() == 1L) && !missing(from)) {
 	lf <- length(from)
 	return(if(mode(from) == "numeric" && lf == 1L) {
-            if(!is.finite(from)) stop("'from' cannot be NA, NaN or infinite")
+	    if(!is.finite(from)) stop("'from' must be a finite number")
             1L:from
         } else if(lf) 1L:lf else integer())
     }
@@ -40,31 +40,29 @@ seq.default <-
             warning("first element used of 'length.out' argument")
             length.out <- length.out[1L]
         }
-	length.out <- ceiling(length.out)
+	if(!is.integer(length.out)) length.out <- ceiling(length.out)
     }
-    if(!missing(...))
-        warning(sprintf(ngettext(length(list(...)),
-                                 "extra argument %s will be disregarded",
-                                 "extra arguments %s will be disregarded"),
-			 paste(sQuote(names(list(...))), collapse = ", ")),
-		domain = NA)
+    chkDots(...)
     if (!missing(from) && length(from) != 1L) stop("'from' must be of length 1")
     if (!missing(to) && length(to) != 1L) stop("'to' must be of length 1")
-    if (!missing(from) && !is.finite(from))
-        stop("'from' cannot be NA, NaN or infinite")
-    if (!missing(to) && !is.finite(to))
-        stop("'to' cannot be NA, NaN or infinite")
+    if (!missing(from) && # For seq("2","5") but not breaking seq(to=1, from=as.Date(.)):
+        !is.finite(if(is.character(from)) from <- as.numeric(from) else from))
+	stop("'from' must be a finite number")
+    if (!missing(to) &&
+        !is.finite(if(is.character(to)) to <- as.numeric(to) else to))
+	stop("'to' must be a finite number")
     if(is.null(length.out))
 	if(missing(by))
 	    from:to
 	else { # dealing with 'by'
 	    del <- to - from
 	    if(del == 0 && to == 0) return(to)
-	    n <- del/by
-	    if(!(length(n) && is.finite(n))) {
-		if(length(by) && by == 0 && length(del) && del == 0)
+            if (length(by) != 1L) stop("'by' must be of length 1")
+	    n <- del/by # of length 1, as {from, to, by} are
+	    if(!is.finite(n)) {
+		if(by == 0 && del == 0)
 		    return(from)
-		stop("invalid (to - from)/by in seq(.)")
+		stop("invalid '(to - from)/by'")
 	    }
 	    if(n < 0L)
 		stop("wrong sign in 'by' argument")
@@ -84,7 +82,7 @@ seq.default <-
             }
 	}
     else if(!is.finite(length.out) || length.out < 0L)
-	stop("length must be non-negative number")
+	stop("'length.out' must be a non-negative number")
     else if(length.out == 0L) integer()
     else if (One) seq_len(length.out)
     else if(missing(by)) {
@@ -95,7 +93,12 @@ seq.default <-
 	    from <- to - length.out + 1L
 	if(length.out > 2L) # not clear why these have as.vector, and not others
 	    if(from == to) rep.int(from, length.out)
-	    else as.vector(c(from, from + seq_len(length.out - 2L) * by, to))
+	    else { # *only* place we could (and did) use 'by's formal default
+		by <- # integer if "easy"
+		    if(is.integer(del <- to - from) & is.integer(n1 <- length.out - 1L)
+		       && del %% n1 == 0L) del %/% n1 else del / n1
+		as.vector(c(from, from + seq_len(length.out - 2L) * by, to))
+	    }
 	else as.vector(c(from, to))[seq_len(length.out)]
     }
     else if(missing(to))
diff --git a/src/library/base/R/serialize.R b/src/library/base/R/serialize.R
index c2ea374..4aeb338 100644
--- a/src/library/base/R/serialize.R
+++ b/src/library/base/R/serialize.R
@@ -1,7 +1,7 @@
 #  File src/library/base/R/serialize.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
-#  Copyright (C) 1995-2012 The R Core Team
+#  Copyright (C) 1995-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
@@ -14,18 +14,23 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 saveRDS <-
     function(object, file = "", ascii = FALSE, version = NULL,
              compress = TRUE, refhook = NULL)
 {
     if(is.character(file)) {
-        if(file == "") stop("'file' must be non-empty string")
-        mode <- if(ascii) "w" else "wb"
-        con <- if (identical(compress, "bzip2")) bzfile(file, mode)
-            else if (identical(compress, "xz")) xzfile(file, mode)
-            else if(compress) gzfile(file, mode) else file(file, mode)
+	if(file == "") stop("'file' must be non-empty string")
+	mode <- if(ascii %in% FALSE) "wb" else "w"
+	con <- if (is.logical(compress))
+		   if(compress) gzfile(file, mode) else file(file, mode)
+	       else
+		   switch(compress,
+			  "bzip2" = bzfile(file, mode),
+			  "xz"    = xzfile(file, mode),
+			  "gzip"  = gzfile(file, mode),
+			  stop("invalid 'compress' argument: ", compress))
         on.exit(close(con))
     }
     else if(inherits(file, "connection")) {
@@ -61,8 +66,8 @@ serialize <-
     if (!ascii && inherits(connection, "sockconn"))
         .Internal(serializeb(object, connection, xdr, version, refhook))
     else {
-        if (!isTRUE(ascii) && !xdr) ascii <- NA
-        .Internal(serialize(object, connection, ascii, version, refhook))
+	type <- if(is.na(ascii)) 2L else if(ascii) 1L else if(!xdr) 3L else 0L
+        .Internal(serialize(object, connection, type, version, refhook))
     }
 }
 
diff --git a/src/library/base/R/sets.R b/src/library/base/R/sets.R
index 63b11b7..dbd131a 100644
--- a/src/library/base/R/sets.R
+++ b/src/library/base/R/sets.R
@@ -1,7 +1,7 @@
 #  File src/library/base/R/sets.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
-#  Copyright (C) 1995-2012 The R Core Team
+#  Copyright (C) 1995-2015 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
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 ## See the help for why as.vector is used:
 ## it includes coercing factors.
@@ -32,12 +32,13 @@ setdiff <- function(x, y)
     y <- as.vector(y)
     unique(if(length(x) || length(y)) x[match(x, y, 0L) == 0L] else x)
 }
-## Faster versions, see R-devel, Jan.4-6, 2000;  optimize later...
+
+## speed optimization etc: R-devel, Jan.4-6, 2000; then again 15 yrs later
 setequal <- function(x, y)
 {
     x <- as.vector(x)
     y <- as.vector(y)
-    all(c(match(x, y, 0L) > 0L, match(y, x, 0L) > 0L))
+    !( anyNA(match(x, y)) || anyNA(match(y, x)) )
 }
 
 ##  same as %in% ( ./match.R ) but different arg names:
diff --git a/src/library/base/R/sink.R b/src/library/base/R/sink.R
index 60a0133..887893a 100644
--- a/src/library/base/R/sink.R
+++ b/src/library/base/R/sink.R
@@ -1,7 +1,7 @@
 #  File src/library/base/R/sink.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
-#  Copyright (C) 1995-2012 The R Core Team
+#  Copyright (C) 1995-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
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 sink <- function(file=NULL, append = FALSE, type = c("output", "message"),
                  split=FALSE)
@@ -30,7 +30,7 @@ sink <- function(file=NULL, append = FALSE, type = c("output", "message"),
         closeOnExit <- FALSE
         if(is.null(file)) file <- -1L
         else if(is.character(file)) {
-            file <- file(file, ifelse(append, "a", "w"))
+            file <- file(file, if(append) "a" else "w")
             closeOnExit <- TRUE
         } else if(!inherits(file, "connection"))
             stop("'file' must be NULL, a connection or a character string")
diff --git a/src/library/base/R/solve.R b/src/library/base/R/solve.R
index c0ed001..82dec39 100644
--- a/src/library/base/R/solve.R
+++ b/src/library/base/R/solve.R
@@ -1,7 +1,7 @@
 #  File src/library/base/R/solve.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
-#  Copyright (C) 1995-2013 The R Core Team
+#  Copyright (C) 1995-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
@@ -14,15 +14,14 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 solve.qr <- function(a, b, ...)
 {
-    if( !is.qr(a) )
+    if(!inherits(a, "qr"))
 	stop("this is the \"qr\" method for the generic function solve()")
     nc <- ncol(a$qr); nr <- nrow(a$qr)
     if( a$rank != min(nc, nr) )
-    if( a$rank != nc )
 	stop("singular matrix 'a' in 'solve'")
     if( missing(b) ) {
 	if( nc != nr )
@@ -46,7 +45,7 @@ solve.default <-
         return(.Internal(La_solve_cmplx(a, b)))
     }
 
-    if(is.qr(a)) {
+    if(inherits(a, "qr")) {
 	warning("solve.default called with a \"qr\" object: use 'qr.solve'")
 	return(solve.qr(a, b, tol))
     }
@@ -63,7 +62,7 @@ solve <- function(a, b, ...) UseMethod("solve")
 
 qr.solve <- function(a, b, tol = 1e-7)
 {
-    if( !is.qr(a) )
+    if(!inherits(a, "qr"))
 	a <- qr(a, tol = tol)
     nc <- ncol(a$qr); nr <- nrow(a$qr)
     if( a$rank != min(nc, nr) )
diff --git a/src/library/base/R/sort.R b/src/library/base/R/sort.R
index d3557b5..fde8d2e 100644
--- a/src/library/base/R/sort.R
+++ b/src/library/base/R/sort.R
@@ -1,7 +1,7 @@
 #  File src/library/base/R/sort.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
-#  Copyright (C) 1995-2012 The R Core Team
+#  Copyright (C) 1995-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
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 sort <- function(x, decreasing = FALSE, ...)
 {
@@ -32,8 +32,30 @@ sort.default <- function(x, decreasing = FALSE, na.last = NA, ...)
 
 sort.int <-
     function(x, partial = NULL, na.last = NA, decreasing = FALSE,
-             method = c("shell", "quick"), index.return = FALSE)
+             method = c("auto", "shell", "quick", "radix"),
+             index.return = FALSE)
 {
+    method <- match.arg(method)
+    if (method == "auto" && is.null(partial) &&
+        (is.numeric(x) || is.factor(x) || is.logical(x)) &&
+        is.integer(length(x)))
+        method <- "radix"
+    if (method == "radix") {
+        if (!is.null(partial)) {
+            stop("'partial' sorting not supported by radix method")
+        }
+        if (index.return && is.na(na.last)) {
+            x <- x[!is.na(x)]
+            na.last <- TRUE
+        }
+        o <- order(x, na.last = na.last, decreasing = decreasing,
+                   method = "radix")
+        y <- x[o]
+        return(if (index.return) list(x = y, ix = o) else y)
+    }
+    else if (method == "auto" || !is.numeric(x))
+          method <- "shell" # explicitly prevent 'quick' for non-numeric data
+
     if(isfact <- is.factor(x)) {
         if(index.return) stop("'index.return' only for non-factors")
 	lev <- levels(x)
@@ -50,7 +72,7 @@ sort.int <-
     if(index.return && !is.na(na.last))
         stop("'index.return' only for 'na.last = NA'")
     if(!is.null(partial)) {
-        if(index.return || decreasing || isfact || !missing(method))
+        if(index.return || decreasing || isfact || method != "shell")
 	    stop("unsupported options for partial sorting")
         if(!all(is.finite(partial))) stop("non-finite 'partial'")
         y <- if(length(partial) <= 10L) {
@@ -58,13 +80,9 @@ sort.int <-
             .Internal(psort(x, partial))
         } else if (is.double(x)) .Internal(qsort(x, FALSE))
         else .Internal(sort(x, FALSE))
-    } else if(isfact && missing(method) && nlev < 100000) {
-        o <- sort.list(x, decreasing = decreasing, method = "radix")
-        y <- x[o]
     } else {
         nms <- names(x)
-        method <- if(is.numeric(x)) match.arg(method) else "shell"
-        switch(method,
+	switch(method,
                "quick" = {
                    if(!is.null(nms)) {
                        if(decreasing) x <- -x
@@ -96,37 +114,53 @@ sort.int <-
     y
 }
 
-order <- function(..., na.last = TRUE, decreasing = FALSE)
+order <- function(..., na.last = TRUE, decreasing = FALSE,
+                  method = c("auto", "shell", "radix"))
 {
     z <- list(...)
+
+    method <- match.arg(method)
+    if (method == "auto") {
+        useRadix <- all(vapply(z, function(x) {
+            (is.numeric(x) || is.factor(x) || is.logical(x)) &&
+                is.integer(length(x))
+        }, logical(1L)))
+        method <- if (useRadix) "radix" else "shell"
+    }
+
     if(any(unlist(lapply(z, is.object)))) {
-        z <- lapply(z, function(x) if(is.object(x)) xtfrm(x) else x)
-        if(!is.na(na.last))
+        z <- lapply(z, function(x) if(is.object(x)) as.vector(xtfrm(x)) else x)
+        if(method == "radix" || !is.na(na.last))
             return(do.call("order", c(z, na.last = na.last,
-                                      decreasing = decreasing)))
-    } else if(!is.na(na.last)) {
-        if (length(z) == 1L && is.factor(zz <- z[[1L]]) && nlevels(zz) < 100000)
-            return(.Internal(radixsort(zz, na.last, decreasing)))
-        else return(.Internal(order(na.last, decreasing, ...)))
+                                      decreasing = decreasing,
+                                      method = method)))
+    } else if(method != "radix" && !is.na(na.last)) {
+        return(.Internal(order(na.last, decreasing, ...)))
+    }
+
+    if (method == "radix") {
+        decreasing <- rep_len(as.logical(decreasing), length(z))
+        return(.Internal(radixsort(na.last, decreasing, FALSE, TRUE, ...)))
     }
 
     ## na.last = NA case: remove nas
-    if(any(diff(l.z <- vapply(z, length, 1L)) != 0L))
+    if(any(diff((l.z <- lengths(z)) != 0L)))
         stop("argument lengths differ")
-    ans <- vapply(z, is.na, rep.int(NA, l.z[1L]))
-    ok <- if(is.matrix(ans)) !apply(ans, 1, any) else !any(ans)
+    na <- vapply(z, is.na, rep.int(NA, l.z[1L]))
+    ok <- if(is.matrix(na)) rowSums(na) == 0L else !any(na)
     if(all(!ok)) return(integer())
     z[[1L]][!ok] <- NA
     ans <- do.call("order", c(z, decreasing = decreasing))
-    keep <- seq_along(ok)[ok]
-    ans[ans %in% keep]
+    ans[ok[ans]]
 }
 
 sort.list <- function(x, partial = NULL, na.last = TRUE, decreasing = FALSE,
-                      method = c("shell", "quick", "radix"))
+                      method = c("auto", "shell", "quick", "radix"))
 {
-    if (missing(method) && is.factor(x) && nlevels(x) < 100000) method <-"radix"
     method <- match.arg(method)
+    if (method == "auto" && (is.numeric(x) || is.factor(x) || is.logical(x)) &&
+        is.integer(length(x)))
+        method <- "radix"
     if(!is.atomic(x))
         stop("'x' must be atomic for 'sort.list'\nHave you called 'sort' on a list?")
     if(!is.null(partial))
@@ -138,27 +172,26 @@ sort.list <- function(x, partial = NULL, na.last = TRUE, decreasing = FALSE,
                         method = "quick", index.return = TRUE)$ix)
         else stop("method = \"quick\" is only for numeric 'x'")
     }
+    if (is.na(na.last)) {
+        x <- x[!is.na(x)]
+        na.last <- TRUE
+    }
     if(method == "radix") {
-        if(!typeof(x) == "integer") # we do want to allow factors here
-            stop("method = \"radix\" is only for integer 'x'")
-        if(is.na(na.last))
-            return(.Internal(radixsort(x[!is.na(x)], TRUE, decreasing)))
-        else
-            return(.Internal(radixsort(x, na.last, decreasing)))
+        return(order(x, na.last=na.last, decreasing=decreasing, method="radix"))
     }
     ## method == "shell"
-    if(is.na(na.last)) .Internal(order(TRUE, decreasing, x[!is.na(x)]))
-    else .Internal(order(na.last, decreasing, x))
+    .Internal(order(na.last, decreasing, x))
 }
 
 
 ## xtfrm is now primitive
 ## xtfrm <- function(x) UseMethod("xtfrm")
 xtfrm.default <- function(x)
-    if(is.numeric(x)) unclass(x) else as.vector(rank(x, ties.method="min", na.last="keep"))
+    if(is.numeric(x)) unclass(x) else as.vector(rank(x, ties.method = "min",
+                                                     na.last = "keep"))
 xtfrm.factor <- function(x) as.integer(x) # primitive, so needs a wrapper
 xtfrm.Surv <- function(x)
-    if(ncol(x) == 2L) order(x[,1L], x[,2L]) else order(x[,1L], x[,2L], x[,3L]) # needed by 'party'
+    order(if(ncol(x) == 2L) order(x[,1L], x[,2L]) else order(x[,1L], x[,2L], x[,3L])) # needed by 'party'
 xtfrm.AsIs <- function(x)
 {
     if(length(cl <- class(x)) > 1) oldClass(x) <- cl[-1L]
@@ -178,3 +211,16 @@ xtfrm.AsIs <- function(x)
     n <- length(x)
     if(strictly) !all(x[-1L] > x[-n]) else !all(x[-1L] >= x[-n])
 }
+
+grouping <- function(...) {
+    z <- list(...)
+    if(any(vapply(z, is.object, logical(1L)))) {
+        z <- lapply(z, function(x) if(is.object(x)) as.vector(xtfrm(x)) else x)
+        return(do.call("grouping", z))
+    }
+    nalast <- TRUE
+    decreasing <- rep_len(FALSE, length(z))
+    group <- TRUE
+    sortStr <- FALSE
+    return(.Internal(radixsort(nalast, decreasing, group, sortStr, ...)))
+}
diff --git a/src/library/base/R/source.R b/src/library/base/R/source.R
index 51c770c..44c506b 100644
--- a/src/library/base/R/source.R
+++ b/src/library/base/R/source.R
@@ -1,7 +1,7 @@
 #  File src/library/base/R/source.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
-#  Copyright (C) 1995-2013 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
@@ -14,25 +14,24 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 source <-
 function(file, local = FALSE, echo = verbose, print.eval = echo,
+         exprs, spaced = use_file,
 	 verbose = getOption("verbose"),
 	 prompt.echo = getOption("prompt"),
-	 max.deparse.length = 150, chdir = FALSE,
+	 max.deparse.length = 150, width.cutoff = 60L,
+         deparseCtrl = "showAttributes", ## rather?  c("keepInteger", "showAttributes", "keepNA"),
+         chdir = FALSE,
          encoding = getOption("encoding"),
          continue.echo = getOption("continue"),
          skip.echo = 0, keep.source = getOption("keep.source"))
 {
-    envir <- if (isTRUE(local)) {
-        parent.frame()
-    } else if(identical(local, FALSE)) {
-        .GlobalEnv
-    } else if (is.environment(local)) {
-        local
-    } else stop("'local' must be TRUE, FALSE or an environment")
-    have_encoding <- !missing(encoding) && encoding != "unknown"
+    envir <- if (isTRUE(local)) parent.frame()
+	     else if(identical(local, FALSE)) .GlobalEnv
+	     else if (is.environment(local)) local
+	     else stop("'local' must be TRUE, FALSE or an environment")
     if (!missing(echo)) {
 	if (!is.logical(echo))
 	    stop("'echo' must be logical")
@@ -45,17 +44,21 @@ function(file, local = FALSE, echo = verbose, print.eval = echo,
 	cat("'envir' chosen:")
 	print(envir)
     }
+
+    if(use_file <- missing(exprs)) {
+
     ofile <- file # for use with chdir = TRUE
-    from_file <- FALSE
+    from_file <- FALSE # true, if not stdin() nor from srcref
     srcfile <- NULL
     if(is.character(file)) {
+        have_encoding <- !missing(encoding) && encoding != "unknown"
         if(identical(encoding, "unknown")) {
             enc <- utils::localeToCharset()
             encoding <- enc[length(enc)]
         } else enc <- encoding
         if(length(enc) > 1L) {
             encoding <- NA
-            owarn <- options("warn"); options(warn = 2)
+	    owarn <- options(warn = 2)
             for(e in enc) {
                 if(is.na(e)) next
                 zz <- file(file, encoding = e)
@@ -80,7 +83,7 @@ function(file, local = FALSE, echo = verbose, print.eval = echo,
 	    	lines <- readLines(file, warn = FALSE)
 	    	on.exit()
 	    	close(file)
-            	srcfile <- srcfilecopy(filename, lines, file.info(filename)[1,"mtime"],
+            	srcfile <- srcfilecopy(filename, lines, file.mtime(filename)[1],
             			       isFile = TRUE)
 	    } else {
             	from_file <- TRUE
@@ -100,10 +103,11 @@ function(file, local = FALSE, echo = verbose, print.eval = echo,
 	}
     } else {
     	lines <- readLines(file, warn = FALSE)
-    	if (isTRUE(keep.source))
-    	    srcfile <- srcfilecopy(deparse(substitute(file)), lines)
-    	else
-    	    srcfile <- deparse(substitute(file))
+        srcfile <-
+            if (isTRUE(keep.source))
+                srcfilecopy(deparse(substitute(file)), lines)
+            else
+                deparse(substitute(file))
     }
 
     exprs <- if (!from_file) {
@@ -116,16 +120,14 @@ function(file, local = FALSE, echo = verbose, print.eval = echo,
     on.exit()
     if (from_file) close(file)
 
-    Ne <- length(exprs)
     if (verbose)
-	cat("--> parsed", Ne, "expressions; now eval(.)ing them:\n")
+	cat("--> parsed", length(exprs), "expressions; now eval(.)ing them:\n")
 
     if (chdir){
         if(is.character(ofile)) {
-            isURL <- length(grep("^(ftp|http|file)://", ofile)) > 0L
-            if(isURL)
+	    if(grepl("^(ftp|http|file)://", ofile)) ## is URL
                 warning("'chdir = TRUE' makes no sense for a URL")
-            if(!isURL && (path <- dirname(ofile)) != ".") {
+	    else if((path <- dirname(ofile)) != ".") {
                 owd <- getwd()
                 if(is.null(owd))
                     stop("cannot 'chdir' as current directory is unknown")
@@ -137,6 +139,13 @@ function(file, local = FALSE, echo = verbose, print.eval = echo,
         }
     }
 
+    } else { # 'exprs' specified: !use_file
+	if(!missing(file)) stop("specify either 'file' or 'exprs' but not both")
+	if(!is.expression(exprs))
+	    exprs <- as.expression(exprs)
+    }
+
+    Ne <- length(exprs)
     if (echo) {
 	## Reg.exps for string delimiter/ NO-string-del /
 	## odd-number-of-str.del needed, when truncating below
@@ -146,14 +155,15 @@ function(file, local = FALSE, echo = verbose, print.eval = echo,
         ## A helper function for echoing source.  This is simpler than the
         ## same-named one in Sweave
 	trySrcLines <- function(srcfile, showfrom, showto) {
-	    lines <- tryCatch(suppressWarnings(getSrcLines(srcfile, showfrom, showto)),
-			      error = function(e)e)
-	    if (inherits(lines, "error")) character() else lines
+	    tryCatch(suppressWarnings(getSrcLines(srcfile, showfrom, showto)),
+		     error = function(e) character())
 	}
     }
     yy <- NULL
     lastshown <- 0
     srcrefs <- attr(exprs, "srcref")
+    if(verbose && !is.null(srcrefs)) {
+        cat("has srcrefs:\n"); utils::str(srcrefs) }
     for (i in seq_len(Ne+echo)) {
     	tail <- i > Ne
         if (!tail) {
@@ -173,7 +183,7 @@ function(file, local = FALSE, echo = verbose, print.eval = echo,
 	    	    if (length(dep)) {
 			leading <- if(tail) length(dep) else srcref[1L]-lastshown
 			lastshown <- srcref[3L]
-			while (length(dep) && length(grep("^[[:blank:]]*$", dep[1L]))) {
+			while (length(dep) && grepl("^[[:blank:]]*$", dep[1L])) {
 			    dep <- dep[-1L]
 			    leading <- leading - 1L
 			}
@@ -188,19 +198,20 @@ function(file, local = FALSE, echo = verbose, print.eval = echo,
 	    if (is.null(srcref)) {
 	    	if (!tail) {
 		    # Deparse.  Must drop "expression(...)"
-		    dep <- substr(paste(deparse(ei, control = "showAttributes"),
+		    dep <- substr(paste(deparse(ei, width.cutoff = width.cutoff,
+						control = deparseCtrl),
 					collapse = "\n"), 12L, 1e+06L)
-		    ## We really do want chars here as \n\t may be embedded.
 		    dep <- paste0(prompt.echo,
 				  gsub("\n", paste0("\n", continue.echo), dep))
+		    ## We really do want chars here as \n\t may be embedded.
 		    nd <- nchar(dep, "c") - 1L
 		}
 	    }
 	    if (nd) {
 		do.trunc <- nd > max.deparse.length
 		dep <- substr(dep, 1L, if (do.trunc) max.deparse.length else nd)
-		cat("\n", dep, if (do.trunc)
-		    paste(if (length(grep(sd, dep)) && length(grep(oddsd, dep)))
+		cat(if (spaced) "\n", dep, if (do.trunc)
+		    paste(if (grepl(sd, dep) && grepl(oddsd, dep))
 			  " ...\" ..." else " ....", "[TRUNCATED] "),
 		    "\n", sep = "")
 	    }
@@ -227,8 +238,9 @@ function(file, local = FALSE, echo = verbose, print.eval = echo,
 		    print(yy$value)
 	    }
 	    if (verbose)
-		cat(" .. after ", sQuote(deparse(ei,
-		    control = c("showAttributes","useSource"))), "\n", sep = "")
+		cat(" .. after ", sQuote(deparse(ei, control =
+					  unique(c(deparseCtrl, "useSource")))),
+		    "\n", sep = "")
  	}
     }
     invisible(yy)
@@ -236,17 +248,18 @@ function(file, local = FALSE, echo = verbose, print.eval = echo,
 
 sys.source <-
 function(file, envir = baseenv(), chdir = FALSE,
-	 keep.source = getOption("keep.source.pkgs"))
+	 keep.source = getOption("keep.source.pkgs"),
+	 toplevel.env = as.environment(envir))
 {
     if(!(is.character(file) && file.exists(file)))
 	stop(gettextf("'%s' is not an existing file", file))
     keep.source <- as.logical(keep.source)
     oop <- options(keep.source = keep.source,
-		   topLevelEnvironment = as.environment(envir))
+		   topLevelEnvironment = toplevel.env)
     on.exit(options(oop))
     if (keep.source) {
     	lines <- readLines(file, warn = FALSE)
-    	srcfile <- srcfilecopy(file, lines, file.info(file)[1,"mtime"], isFile = TRUE)
+    	srcfile <- srcfilecopy(file, lines, file.mtime(file), isFile = TRUE)
     	exprs <- parse(text = lines, srcfile = srcfile, keep.source = TRUE)
     } else
     	exprs <- parse(n = -1, file = file, srcfile = NULL, keep.source = FALSE)
@@ -262,3 +275,22 @@ function(file, envir = baseenv(), chdir = FALSE,
     for (i in seq_along(exprs)) eval(exprs[i], envir)
     invisible()
 }
+
+withAutoprint <- function(exprs, evaluated = FALSE, local = parent.frame(),
+                          print. = TRUE, echo = TRUE, max.deparse.length = Inf,
+                          width.cutoff = max(20, getOption("width")),
+                          deparseCtrl = c("keepInteger", "showAttributes", "keepNA"),
+                          ...)
+{
+    if(!evaluated) {
+	exprs <- substitute(exprs)
+	if(is.call(exprs)) {
+	    if(exprs[[1]] == quote(`{`))
+		exprs <- as.list(exprs[-1])
+	    ## else: use that call
+	} ## else can be 'symbol' or e.g. numeric constant
+    }
+    source(exprs = exprs, local = local, print.eval = print., echo = echo,
+           max.deparse.length = max.deparse.length, width.cutoff = width.cutoff,
+	   deparseCtrl = deparseCtrl, ...)
+}
diff --git a/src/library/base/R/split.R b/src/library/base/R/split.R
index 1f9d6e5..920ad6f 100644
--- a/src/library/base/R/split.R
+++ b/src/library/base/R/split.R
@@ -1,7 +1,7 @@
 #  File src/library/base/R/split.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
-#  Copyright (C) 1995-2013 The R Core Team
+#  Copyright (C) 1995-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
@@ -14,15 +14,16 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 split <- function(x, f, drop = FALSE, ...) UseMethod("split")
 
-split.default <- function(x, f, drop = FALSE, sep = ".", ...)
+split.default <- function(x, f, drop = FALSE, sep = ".", lex.order = FALSE, ...)
 {
     if(!missing(...)) .NotYetUsed(deparse(...), error = FALSE)
 
-    if (is.list(f)) f <- interaction(f, drop = drop, sep = sep)
+    if (is.list(f))
+	f <- interaction(f, drop = drop, sep = sep, lex.order = lex.order)
     else if (!is.factor(f)) f <- as.factor(f) # docs say as.factor
     else if (drop) f <- factor(f) # drop extraneous levels
     storage.mode(f) <- "integer"  # some factors have had double in the past
diff --git a/src/library/base/R/srcfile.R b/src/library/base/R/srcfile.R
index 22ce143..a628c3b 100644
--- a/src/library/base/R/srcfile.R
+++ b/src/library/base/R/srcfile.R
@@ -1,7 +1,7 @@
 #  File src/library/base/R/srcfile.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
-#  Copyright (C) 1995-2012 The R Core Team
+#  Copyright (C) 1995-2014 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
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 # a srcfile is a file with a timestamp
 
@@ -29,7 +29,7 @@ srcfile <- function(filename, encoding = getOption("encoding"), Enc = "unknown")
     e$filename <- filename
 
     # If filename is a URL, this will return NA
-    e$timestamp <- file.info(filename)[1,"mtime"]
+    e$timestamp <- file.mtime(filename)
 
     if (identical(encoding, "unknown")) encoding <- "native.enc"
     e$encoding <- encoding
@@ -71,11 +71,12 @@ open.srcfile <- function(con, line, ...) {
 	    olddir <- setwd(srcfile$wd)
 	    on.exit(setwd(olddir))
 	}
-	timestamp <- file.info(srcfile$filename)[1,"mtime"]
+	timestamp <- file.mtime(srcfile$filename)
 	if (!is.null(srcfile$timestamp)
 	    && !is.na(srcfile$timestamp)
 	    && ( is.na(timestamp) || timestamp != srcfile$timestamp) )
-            warning(gettextf("Timestamp of %s has changed", sQuote(srcfile$filename)),
+            warning(gettextf("Timestamp of %s has changed",
+                             sQuote(srcfile$filename)),
                     call. = FALSE, domain = NA)
 	if (is.null(srcfile$encoding)) encoding <- getOption("encoding")
 	else encoding <- srcfile$encoding
@@ -213,14 +214,20 @@ srcref <- function(srcfile, lloc) {
     structure(as.integer(lloc), srcfile=srcfile, class="srcref")
 }
 
-as.character.srcref <- function(x, useSource = TRUE, ...)
+as.character.srcref <- function(x, useSource = TRUE, to = x, ...)
 {
     srcfile <- attr(x, "srcfile")
+    if (!missing(to)) {
+        if (!identical(srcfile, attr(to, "srcfile")))
+    	    stop("'x' and 'to' must refer to same file")
+    	x[c(3L, 4L, 6L, 8L)] <- to[c(3L, 4L, 6L, 8L)]
+    }	
     if (!is.null(srcfile) && !inherits(srcfile, "srcfile")) {
-       cat("forcing class on") ## debug
-	print(str(srcfile))
-       class(srcfile) <- c("srcfilealias", "srcfile")
+        cat("forcing class on") ## debug
+        print(utils::str(srcfile))
+        class(srcfile) <- c("srcfilealias", "srcfile")
     }
+    
     if (useSource) {
     	if (inherits(srcfile, "srcfilecopy") || inherits(srcfile, "srcfilealias"))
     	    lines <- try(getSrcLines(srcfile, x[7L], x[8L]), TRUE)
diff --git a/src/library/base/R/stop.R b/src/library/base/R/stop.R
index e1cf890..3619342 100644
--- a/src/library/base/R/stop.R
+++ b/src/library/base/R/stop.R
@@ -1,7 +1,7 @@
 #  File src/library/base/R/stop.R
-#  Part of the R package, http://www.R-project.org
+#  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
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 stop <- function(..., call. = TRUE, domain = NULL)
 {
@@ -36,15 +36,33 @@ stopifnot <- function(...)
     n <- length(ll <- list(...))
     if(n == 0L)
 	return(invisible())
+    Dparse <- function(call, cutoff = 60L) {
+	ch <- deparse(call, width.cutoff = cutoff)
+	if(length(ch) > 1L) paste(ch[1L], "....") else ch
+    }
+    head <- function(x, n = 6L) ## basically utils:::head.default()
+	x[seq_len(if(n < 0L) max(length(x) + n, 0L) else min(n, length(x)))]
+    abbrev <- function(ae, n = 3L)
+	paste(c(head(ae, n), if(length(ae) > n) "...."), collapse="\n  ")
     mc <- match.call()
     for(i in 1L:n)
 	if(!(is.logical(r <- ll[[i]]) && !anyNA(r) && all(r))) {
-	    ch <- deparse(mc[[i+1]], width.cutoff = 60L)
-	    if(length(ch) > 1L) ch <- paste(ch[1L], "....")
-            stop(sprintf(ngettext(length(r),
-                                  "%s is not TRUE",
-                                  "%s are not all TRUE"),
-                         ch), call. = FALSE, domain = NA)
+	    cl.i <- mc[[i+1L]]
+	    msg <- ## special case for decently written 'all.equal(*)':
+		if(is.call(cl.i) && identical(cl.i[[1]], quote(all.equal)) &&
+		   (is.null(ni <- names(cl.i)) || length(cl.i) == 3L ||
+		    length(cl.i <- cl.i[!nzchar(ni)]) == 3L))
+
+		    sprintf(gettext("%s and %s are not equal:\n  %s"),
+			    Dparse(cl.i[[2]]),
+			    Dparse(cl.i[[3]]), abbrev(r))
+		else
+		    sprintf(ngettext(length(r),
+				     "%s is not TRUE",
+				     "%s are not all TRUE"),
+			    Dparse(cl.i))
+
+	    stop(msg, call. = FALSE, domain = NA)
 	}
     invisible()
 }
diff --git a/src/library/base/R/structure.R b/src/library/base/R/structure.R
index f484f56..d1e9931 100644
--- a/src/library/base/R/structure.R
+++ b/src/library/base/R/structure.R
@@ -1,7 +1,7 @@
 #  File src/library/base/R/structure.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
-#  Copyright (C) 1995-2012 The R Core Team
+#  Copyright (C) 1995-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
@@ -14,12 +14,15 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 ## This remaps special names as they are used by deparsing, but why are they?
 ##
 structure <- function (.Data, ...)
 {
+    if(is.null(.Data))
+        warning("Calling 'structure(NULL, *)' is deprecated, as NULL cannot have attributes.\n  Consider 'structure(list(), *)' instead.")
+        ## to become: stop("attempt to set an attribute on NULL")
     attrib <- list(...)
     if(length(attrib)) {
         specials <- c(".Dim", ".Dimnames", ".Names", ".Tsp", ".Label")
@@ -30,8 +33,8 @@ structure <- function (.Data, ...)
         ## prior to 2.5.0 factors would deparse to double codes
 	if("factor" %in% attrib[["class", exact = TRUE]]
            && typeof(.Data) == "double")
-	   storage.mode(.Data) <- "integer"
+            storage.mode(.Data) <- "integer"
 	attributes(.Data) <- c(attributes(.Data), attrib)
     }
-    return(.Data)
+    .Data
 }
diff --git a/src/library/base/R/strwrap.R b/src/library/base/R/strwrap.R
index 0b3a2c9..9fd1856 100644
--- a/src/library/base/R/strwrap.R
+++ b/src/library/base/R/strwrap.R
@@ -1,7 +1,7 @@
 #  File src/library/base/R/strwrap.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
-#  Copyright (C) 1995-2013 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
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 strtrim <- function(x, width)
 {
@@ -27,22 +27,25 @@ function(x, width = 0.9 * getOption("width"), indent = 0, exdent = 0,
          prefix = "", simplify = TRUE, initial = prefix)
 {
     if(!is.character(x)) x <- as.character(x)
+
     ## Useful variables.
-    indentString <- paste(rep.int(" ", indent), collapse = "")
-    exdentString <- paste(rep.int(" ", exdent), collapse = "")
+    indentString <- strrep(" ", indent)
+    exdentString <- strrep(" ", exdent)
     y <- list()                         # return value
-    UB <- TRUE
-    ## input need not be valid in this locale, e.g. from write.dcf
-    ## but if x has UTF-8 encoding we want to preserve it, so
-    if(all(Encoding(x) == "UTF-8")) UB <- FALSE
-    else {
-        ## Let's convert anything else with a marked encoding
-        ## to the current locale
-        enc <- Encoding(x) %in% c("latin1", "UTF-8")
-        if(length(enc)) x[enc] <- enc2native(x[enc])
-    }
-    z <- lapply(strsplit(x, "\n[ \t\n]*\n", perl = TRUE, useBytes = UB),
-                strsplit, "[ \t\n]", perl = TRUE, useBytes = UB)
+
+    ## We use strsplit() to tokenize input into paras and words, and
+    ## hence need to tweak how it handles/transforms encodings.  To
+    ## preserve encodings, it seems "best" to canonicalize to UTF-8
+    ## (ensuring valid UTF-8), and at the end convert back to latin1
+    ## where we originally had latin1.
+    enc <- Encoding(x)
+    x <- enc2utf8(x)
+    if(any(ind <- !validEnc(x)))
+        x[ind] <- iconv(x[ind], "UTF-8", "UTF-8", sub = "byte")
+
+    z <- lapply(strsplit(x, "\n[ \t\n]*\n", perl = TRUE),
+                strsplit, "[ \t\n]", perl = TRUE)
+
     ## Now z[[i]][[j]] is a character vector of all "words" in
     ## paragraph j of x[i].
 
@@ -136,6 +139,18 @@ function(x, width = 0.9 * getOption("width"), indent = 0, exdent = 0,
             c(y, "")
     }
 
+    if(length(pos <- which(enc == "latin1"))) {
+        y[pos] <-
+            lapply(y[pos],
+                   function(s) {
+                       e <- Encoding(s)
+                       if(length(p <- which(e == "UTF-8")))
+                           s[p] <- iconv(s[p], "UTF-8", "latin1",
+                                         sub = "byte")
+                       s
+                   })
+    }
+
     if(simplify) y <- as.character(unlist(y))
     y
 }
@@ -145,7 +160,7 @@ function(x, y, style = c("table", "list"),
          width = 0.9 * getOption("width"), indent = NULL)
 {
     if(is.list(x)) {
-        if(length(x) == 2L && diff(vapply(x, length, 1L)) == 0L) {
+        if(length(x) == 2L && diff(lengths(x)) == 0L) {
             y <- x[[2L]]; x <- x[[1L]]
         }
         else
@@ -172,10 +187,13 @@ function(x, y, style = c("table", "list"),
 
     if(is.null(indent))
         indent <- switch(style, table = width / 3, list = width / 9)
-    if(indent > 0.5 * width)
-        stop("incorrect values of 'indent' and 'width'")
+    ## change 2017-03-12 suggeested by Bill Dunlap
+    ## https://stat.ethz.ch/pipermail/r-devel/2017-March/073873.html
+    ## if(indent > 0.5 * width)
+    ##    warning("'indent' is too large for 'width' and will be reduced")
+    indent <- min(indent, 0.5*width)
 
-    indentString <- paste(rep.int(" ", indent), collapse = "")
+    indentString <- strrep(" ", indent)
 
     if(style == "table") {
         i <- (nchar(x, type="w") > indent - 3L)
@@ -197,3 +215,15 @@ function(x, y, style = c("table", "list"),
     }
     r
 }
+
+trimws <-
+function(x, which = c("both", "left", "right"))
+{
+    which <- match.arg(which)
+    mysub <- function(re, x) sub(re, "", x, perl = TRUE)
+    if(which == "left")
+        return(mysub("^[ \t\r\n]+", x))
+    if(which == "right")
+        return(mysub("[ \t\r\n]+$", x))
+    mysub("[ \t\r\n]+$", mysub("^[ \t\r\n]+", x))
+}
diff --git a/src/library/base/R/summary.R b/src/library/base/R/summary.R
index 2a5bf14..1e138e5 100644
--- a/src/library/base/R/summary.R
+++ b/src/library/base/R/summary.R
@@ -1,7 +1,7 @@
 #  File src/library/base/R/summary.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
-#  Copyright (C) 1995-2013 The R Core Team
+#  Copyright (C) 1995-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
@@ -14,21 +14,24 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 summary <- function (object, ...) UseMethod("summary")
 
-summary.default <-
-    function(object, ..., digits = max(3L, getOption("digits") - 3L))
+summary.default <- function(object, ..., digits)
 {
     if(is.factor(object))
 	return(summary.factor(object, ...))
-    else if(is.matrix(object))
-	return(summary.matrix(object, digits = digits, ...))
+    else if(is.matrix(object)) {
+	if(missing(digits))
+            return(summary.matrix(object, ...))
+        else
+            return(summary.matrix(object, digits = digits, ...))
+    }
 
     value <- if(is.logical(object)) # scalar or array!
 	c(Mode = "logical",
-          {tb <- table(object, exclude = NULL) # incl. NA s
+          {tb <- table(object, exclude = NULL, useNA = "ifany") # incl. NA s
            if(!is.null(n <- dimnames(tb)[[1L]]) && any(iN <- is.na(n)))
                dimnames(tb)[[1L]][iN] <- "NA's"
            tb
@@ -37,7 +40,8 @@ summary.default <-
 	nas <- is.na(object)
 	object <- object[!nas]
 	qq <- stats::quantile(object)
-	qq <- signif(c(qq[1L:3L], mean(object), qq[4L:5L]), digits)
+        qq <- c(qq[1L:3L], mean(object), qq[4L:5L])
+	if(!missing(digits)) qq <- signif(qq, digits)
 	names(qq) <- c("Min.", "1st Qu.", "Median", "Mean", "3rd Qu.", "Max.")
 	if(any(nas))
 	    c(qq, "NA's" = sum(nas))
@@ -62,42 +66,50 @@ summary.default <-
     value
 }
 
-format.summaryDefault <- function(x, ...)
+format.summaryDefault <- function(x, digits = max(3L, getOption("digits") - 3L), ...)
 {
-    xx <- if(is.numeric(x) || is.complex(x)) zapsmall(x) else x
+    xx <- x
+    if(is.numeric(x) || is.complex(x)) {
+      finite <- is.finite(x)
+      xx[finite] <- zapsmall(x[finite])
+    }
     class(xx) <- class(x)[-1]
     m <- match("NA's", names(x), 0)
     if(inherits(x, "Date") || inherits(x, "POSIXct")) {
         if(length(a <- attr(x, "NAs")))
-            c(format(xx, ...), "NA's" = as.character(a))
-        else format(xx)
+            c(format(xx, digits=digits, ...), "NA's" = as.character(a))
+        else format(xx, digits=digits)
     } else if(m && !is.character(x))
-        xx <- c(format(xx[-m], ...), "NA's" = as.character(xx[m]))
-    else format(xx, ...)
+        xx <- c(format(xx[-m], digits=digits, ...), "NA's" = as.character(xx[m]))
+    else format(xx, digits=digits, ...)
 }
 
-print.summaryDefault <- function(x, ...)
+print.summaryDefault <- function(x, digits = max(3L, getOption("digits") - 3L), ...)
 {
-    xx <- if(is.numeric(x) || is.complex(x)) zapsmall(x) else x
+    xx <- x
+    if(is.numeric(x) || is.complex(x)) {
+      finite <- is.finite(x)
+      xx[finite] <- zapsmall(x[finite])
+    }
     class(xx) <- class(x)[-1] # for format
     m <- match("NA's", names(xx), 0)
     if(inherits(x, "Date") || inherits(x, "POSIXct")) {
         xx <- if(length(a <- attr(x, "NAs")))
-            c(format(xx), "NA's" = as.character(a))
-        else format(xx)
-        print(xx, ...)
+            c(format(xx, digits=digits), "NA's" = as.character(a))
+        else format(xx, digits=digits)
+        print(xx, digits=digits, ...)
         return(invisible(x))
     } else if(m && !is.character(x))
-        xx <- c(format(xx[-m]), "NA's" = as.character(xx[m]))
-    print.table(xx, ...)
+        xx <- c(format(xx[-m], digits=digits), "NA's" = as.character(xx[m]))
+    print.table(xx, digits=digits, ...)
     invisible(x)
 }
 
-summary.factor <- function(object, maxsum = 100, ...)
+summary.factor <- function(object, maxsum = 100L, ...)
 {
     nas <- is.na(object)
     ll <- levels(object)
-    if(any(nas)) maxsum <- maxsum - 1
+    if(ana <- any(nas)) maxsum <- maxsum - 1L
     tbl <- table(object)
     tt <- c(tbl) # names dropped ...
     names(tt) <- dimnames(tbl)[[1L]]
@@ -106,11 +118,11 @@ summary.factor <- function(object, maxsum = 100, ...)
 	o <- sort.list(tt, decreasing = TRUE)
 	tt <- c(tt[o[ - drop]], "(Other)" = sum(tt[o[drop]]))
     }
-    if(any(nas)) c(tt, "NA's" = sum(nas)) else tt
+    if(ana) c(tt, "NA's" = sum(nas)) else tt
 }
 
 summary.matrix <- function(object, ...) {
-    ## we do want this changed into separate columns, so use matrix method
+    ## we do want this changed into separate columns, so use data.frame method
     summary.data.frame(as.data.frame.matrix(object), ...)
 }
 
@@ -131,7 +143,9 @@ summary.data.frame <-
     nv <- length(object)
     nm <- names(object)
     lw <- numeric(nv)
-    nr <- if (nv) max(unlist(lapply(z, NROW))) else 0
+    nr <- if (nv)
+	      max(vapply(z, function(x) NROW(x) + !is.null(attr(x, "NAs")), integer(1)))
+	  else 0
     for(i in seq_len(nv)) {
         sms <- z[[i]]
         if(is.matrix(sms)) {
@@ -139,7 +153,7 @@ summary.data.frame <-
             ## across rows
             cn <- paste(nm[i], gsub("^ +", "", colnames(sms), useBytes = TRUE),
                         sep=".")
-            tmp <- format(sms)
+	    tmp <- format(sms)# <- digits = ??  --currently take getOption("digits") !!!
             if(nrow(sms) < nr)
                 tmp <- rbind(tmp, matrix("", nr - nrow(sms), ncol(sms)))
             sms <- apply(tmp, 1L, function(x) paste(x, collapse="  "))
@@ -152,15 +166,14 @@ summary.data.frame <-
             cn <- paste0(substring(blanks, 1L, pad0), cn,
                          substring(blanks, 1L, pad1))
             nm[i] <- paste(cn, collapse="  ")
-            z[[i]] <- sms
         } else {
             sms <- format(sms, digits = digits) # may add NAs row
             lbs <- format(names(sms))
             sms <- paste0(lbs, ":", sms, "  ")
             lw[i] <- ncw(lbs[1L])
             length(sms) <- nr
-            z[[i]] <- sms
         }
+	z[[i]] <- sms
     }
     if (nv) {
 	z <- unlist(z, use.names=TRUE)
diff --git a/src/library/base/R/svd.R b/src/library/base/R/svd.R
index db91a7a..92fb9c3 100644
--- a/src/library/base/R/svd.R
+++ b/src/library/base/R/svd.R
@@ -1,5 +1,5 @@
 #  File src/library/base/R/svd.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
 #  Copyright (C) 1995-2013 The R Core Team
 #
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 svd <- function(x, nu = min(n,p), nv = min(n,p), LINPACK = FALSE)
 {
diff --git a/src/library/base/R/sweep.R b/src/library/base/R/sweep.R
index fbfb592..45ac5c4 100644
--- a/src/library/base/R/sweep.R
+++ b/src/library/base/R/sweep.R
@@ -1,5 +1,5 @@
 #  File src/library/base/R/sweep.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
 #  Copyright (C) 1995-2012 The R Core Team
 #
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 sweep <- function(x, MARGIN, STATS, FUN = "-", check.margin = TRUE, ...)
 {
diff --git a/src/library/base/R/sys.R b/src/library/base/R/sys.R
index d6457dd..a6c6a43 100644
--- a/src/library/base/R/sys.R
+++ b/src/library/base/R/sys.R
@@ -1,5 +1,5 @@
 #  File src/library/base/R/sys.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
 #  Copyright (C) 1995-2012 The R Core Team
 #
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 sys.call <- function(which = 0L)
     .Internal(sys.call(which))
diff --git a/src/library/base/R/table.R b/src/library/base/R/table.R
index 119bd3d..f659de3 100644
--- a/src/library/base/R/table.R
+++ b/src/library/base/R/table.R
@@ -1,7 +1,7 @@
 #  File src/library/base/R/table.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
-#  Copyright (C) 1995-2013 The R Core Team
+#  Copyright (C) 1995-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
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 table <- function (..., exclude = if (useNA=="no") c(NA, NaN),
                    useNA = c("no", "ifany", "always"),
@@ -38,20 +38,23 @@ table <- function (..., exclude = if (useNA=="no") c(NA, NaN),
 	    nm
 	}
     }
-    if (!missing(exclude) && is.null(exclude))
-        useNA <- "always"
-
-    useNA <- match.arg(useNA)
+    miss.use <- missing(useNA)
+    miss.exc <- missing(exclude)
+    ## useNA <- if (!miss.exc && is.null(exclude)) "always" (2.8.0 <= R <= 3.3.1)
+    useNA <- if (miss.use && !miss.exc &&
+		 !match(NA, exclude, nomatch=0L)) "ifany"
+	     else match.arg(useNA)
+    doNA <- useNA != "no"
+    if(!miss.use && !miss.exc && doNA && match(NA, exclude, nomatch=0L))
+	warning("'exclude' containing NA and 'useNA' != \"no\"' are a bit contradicting")
     args <- list(...)
     if (!length(args))
 	stop("nothing to tabulate")
-    if (length(args) == 1L && is.list(args[[1L]])) {
+    if (length(args) == 1L && is.list(args[[1L]])) { ## e.g. a data.frame
 	args <- args[[1L]]
 	if (length(dnn) != length(args))
-	    dnn <- if (!is.null(argn <- names(args)))
-		 argn
-	    else
-		 paste(dnn[1L], seq_along(args), sep = ".")
+	    dnn <- if (!is.null(argn <- names(args))) argn
+		   else paste(dnn[1L], seq_along(args), sep = ".")
     }
     # 0L, 1L, etc: keep 'bin' and 'pd' integer - as long as tabulate() requires it
     bin <- 0L
@@ -63,45 +66,74 @@ table <- function (..., exclude = if (useNA=="no") c(NA, NaN),
 	if (is.null(lens)) lens <- length(a)
 	else if (length(a) != lens)
 	    stop("all arguments must have the same length")
-        cat <-
-            if (is.factor(a)) {
-                if (any(is.na(levels(a)))) # Don't touch this!
-                    a
-                else {
-                    ## The logic here is tricky because it tries to do
-                    ## something sensible if both 'exclude' and
-                    ## 'useNA' are set.
-                    ##
-                    ## A non-null setting of 'exclude' sets the
-                    ## excluded levels to missing, which is different
-                    ## from the <NA> factor level. Excluded levels are
-                    ## NOT tabulated, even if 'useNA' is set.
-                    if (is.null(exclude) && useNA != "no")
-                        addNA(a, ifany = (useNA == "ifany"))
-                    else {
-                        if (useNA != "no")
-                            a <- addNA(a, ifany = (useNA == "ifany"))
-                        ll <- levels(a)
-                        a <- factor(a, levels = ll[!(ll %in% exclude)],
-                               exclude = if (useNA == "no") NA)
-                    }
-                }
-            }
-            else { # NB: this excludes first, unlike the case above.
-                a <- factor(a, exclude = exclude)
-                if (useNA != "no")
-                    addNA(a, ifany = (useNA == "ifany"))
-                else
-                    a
-            }
+        fact.a <- is.factor(a)
+        ## The logic here is tricky in order to be sensible if
+        ## both 'exclude' and 'useNA' are set.
+        ##
+	if(doNA) aNA <- anyNA(a) # *before* the following
+        if(!fact.a) { ## factor(*, exclude=*) may generate NA levels where there were none!
+            a0 <- a
+            ## A non-null setting of 'exclude' sets the
+            ## excluded levels to missing, which is different
+            ## from the <NA> factor level, but these
+            ## excluded levels must NOT EVER be tabulated.
+            a <- # NB: this excludes first, unlike the is.factor() case
+                factor(a, exclude = exclude)
+        }
+
+	## if(doNA)
+        ##     a <- addNA(a, ifany = (useNA == "ifany"))
+        ## Instead, do the addNA() manually and remember *if* we did :
+        add.na <- doNA
+        if(add.na) {
+	    ifany <- (useNA == "ifany") # FALSE when "always"
+	    anNAc <- anyNA(a) # sometimes, but not always == aNA above
+	    add.na <- if (!ifany || anNAc) {
+			  ll <- levels(a)
+			  if(add.ll <- !anyNA(ll)) {
+			      ll <- c(ll, NA)
+			      ## FIXME? can we call  a <- factor(a, ...)
+			      ##        only here,and be done?
+			      TRUE
+			  }
+			  else if (!ifany && !anNAc)
+			      FALSE
+			  else
+			      TRUE
+		      }
+		      else
+			  FALSE
+        } # else remains FALSE
+	if(add.na) ## complete the "manual" addNA():
+	    a <- factor(a, levels = ll, exclude = NULL)
+	else
+	    ll <- levels(a)
+        a <- as.integer(a)
+        if (fact.a && !miss.exc) { ## remove excluded levels
+	    ll <- ll[keep <- which(match(ll, exclude, nomatch=0L) == 0L)]
+	    a <- match(a, keep)
+	} else if(!fact.a && add.na) {
+	    ## remove NA level if it was added only for excluded in factor(a, exclude=.)
+	    ## set those a[] to NA which correspond to excluded values,
+	    ## but not those which correspond to NA-levels:
+	    ## if(doNA) they must be counted,  possibly as 0,  e.g.,
+	    ## for	table(1:3, exclude = 1) #-> useNA = "ifany"
+	    ## or	table(1:3, exclude = 1, useNA = "always")
+	    if(ifany && !aNA && add.ll) { # rm the NA-level again (why did we add it?)
+		ll <- ll[!is.na(ll)]
+		is.na(a) <- match(a0, c(exclude,NA), nomatch=0L) > 0L
+	    } else { # e.g. !ifany :  useNA == "always"
+		is.na(a) <- match(a0,   exclude,     nomatch=0L) > 0L
+	    }
+        }
 
-	nl <- length(ll <- levels(cat))
+	nl <- length(ll)
 	dims <- c(dims, nl)
         if (prod(dims) > .Machine$integer.max)
             stop("attempt to make a table with >= 2^31 elements")
 	dn <- c(dn, list(ll))
-	## requiring   all(unique(as.integer(cat)) == 1L:nlevels(cat))  :
-	bin <- bin + pd * (as.integer(cat) - 1L)
+	## requiring   all(unique(a) == 1:nl)  :
+	bin <- bin + pd * (a - 1L)
 	pd <- pd * nl
     }
     names(dn) <- dnn
@@ -163,7 +195,7 @@ summary.table <- function(object, ...)
 	    m[[k]] <- apply(relFreqs, k, sum)
 	expected <- apply(do.call("expand.grid", m), 1L, prod) * n.cases
 	statistic <- sum((c(object) - expected)^2 / expected)
-	lm <- vapply(m, length, 1L)
+	lm <- lengths(m)
 	parameter <- prod(lm) - 1L - sum(lm - 1L)
 	y <- c(y, list(statistic = statistic,
 		       parameter = parameter,
@@ -221,7 +253,6 @@ as.table.default <- function(x, ...)
     if(is.table(x)) return(x)
     else if(is.array(x) || is.numeric(x)) {
 	x <- as.array(x)
-	if(any(dim(x) == 0L)) stop("cannot coerce to a table")
 	structure(class = c("table", oldClass(x)), provideDimnames(x))
     } else stop("cannot coerce to a table")
 }
@@ -246,3 +277,13 @@ margin.table <- function(x, margin = NULL)
     class(z) <- oldClass(x) # avoid adding "matrix"
     z
 }
+
+`[.table` <-
+function(x, i, j, ..., drop = TRUE)
+{
+    ret <- NextMethod()
+    ldr <- length(dim(ret))
+    if((ldr > 1L) || (ldr == length(dim(x))))
+        class(ret) <- "table"
+    ret
+}
diff --git a/src/library/base/R/tabulate.R b/src/library/base/R/tabulate.R
index f20c879..9d7f284 100644
--- a/src/library/base/R/tabulate.R
+++ b/src/library/base/R/tabulate.R
@@ -1,7 +1,7 @@
 #  File src/library/base/R/tabulate.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
-#  Copyright (C) 1995-2012 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
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 tabulate <- function(bin, nbins = max(1L, bin, na.rm = TRUE))
 {
@@ -25,6 +25,6 @@ tabulate <- function(bin, nbins = max(1L, bin, na.rm = TRUE))
     if (nbins > .Machine$integer.max)
         stop("attempt to make a table with >= 2^31 elements")
     nbins <- as.integer(nbins)
-    if (is.na(nbins)) stop("invalid value of 'nbins'")
+    if (is.na(nbins)) stop(gettextf("invalid value of %s", "'nbins'"), domain=NA)
     .Internal(tabulate(bin, nbins))
 }
diff --git a/src/library/base/R/tapply.R b/src/library/base/R/tapply.R
index a60fa80..6ce5682 100644
--- a/src/library/base/R/tapply.R
+++ b/src/library/base/R/tapply.R
@@ -1,7 +1,7 @@
 #  File src/library/base/R/tapply.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
-#  Copyright (C) 1995-2012 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
@@ -14,48 +14,44 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
-tapply <- function (X, INDEX, FUN = NULL, ..., simplify = TRUE)
+tapply <- function (X, INDEX, FUN = NULL, ..., default = NA, simplify = TRUE)
 {
     FUN <- if (!is.null(FUN)) match.fun(FUN)
     if (!is.list(INDEX)) INDEX <- list(INDEX)
-    nI <- length(INDEX)
+    INDEX <- lapply(INDEX, as.factor)
+    nI <- length(INDEX)  # now, 'INDEX' is not classed
     if (!nI) stop("'INDEX' is of length zero")
-    namelist <- vector("list", nI)
-    names(namelist) <- names(INDEX)
-    extent <- integer(nI)
-    nx <- length(X)
-    one <- 1L
-    group <- rep.int(one, nx) #- to contain the splitting vector
-    ngroup <- one
-    for (i in seq_along(INDEX)) {
-	index <- as.factor(INDEX[[i]])
-	if (length(index) != nx)
-	    stop("arguments must have same length")
-	namelist[[i]] <- levels(index)#- all of them, yes !
-	extent[i] <- nlevels(index)
-	group <- group + ngroup * (as.integer(index) - one)
-	ngroup <- ngroup * nlevels(index)
-    }
+    if (!all(lengths(INDEX) == length(X)))
+        stop("arguments must have same length")
+    namelist <- lapply(INDEX, levels)#- all of them, yes !
+    extent <- lengths(namelist, use.names = FALSE)
+    cumextent <- cumprod(extent)
+    if (cumextent[nI] > .Machine$integer.max)
+        stop("total number of levels >= 2^31")
+    storage.mode(cumextent) <- "integer"
+    ngroup <- cumextent[nI]
+    group <- as.integer(INDEX[[1L]]) #- to contain the splitting vector
+    if (nI > 1L)
+        for (i in 2L:nI)
+           group <- group + cumextent[i - 1L] * (as.integer(INDEX[[i]]) - 1L)
     if (is.null(FUN)) return(group)
-    ans <- lapply(X = split(X, group), FUN = FUN, ...)
-    index <- as.integer(names(ans))
-    if (simplify && all(unlist(lapply(ans, length)) == 1L)) {
-	ansmat <- array(dim = extent, dimnames = namelist)
-	ans <- unlist(ans, recursive = FALSE)
-    } else {
-	ansmat <- array(vector("list", prod(extent)),
-			dim = extent, dimnames = namelist)
-    }
-    if(length(index)) {
-        names(ans) <- NULL
-        ansmat[index] <- ans
+    levels(group) <- as.character(seq_len(ngroup))
+    class(group) <- "factor"
+    ans <- split(X, group) # use generic, e.g. for 'Date'
+    names(ans) <- NULL
+    index <- as.logical(lengths(ans))  # equivalently, lengths(ans) > 0L
+    ans <- lapply(X = ans[index], FUN = FUN, ...)
+    ansmat <- array(
+	if (simplify && all(lengths(ans) == 1L)) {
+	    ans <- unlist(ans, recursive = FALSE, use.names = FALSE)
+	    if(!is.null(ans) && is.na(default) && is.atomic(ans)) vector(typeof(ans))
+	    else default
+	} else vector("list", prod(extent)),
+	dim = extent, dimnames = namelist)
+    if(length(ans)) {
+	ansmat[index] <- ans
     }
     ansmat
 }
-
-
-
-
-
diff --git a/src/library/base/R/taskCallback.R b/src/library/base/R/taskCallback.R
index d6befc2..27bf0a2 100644
--- a/src/library/base/R/taskCallback.R
+++ b/src/library/base/R/taskCallback.R
@@ -1,5 +1,5 @@
 #  File src/library/base/R/taskCallback.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
 #  Copyright (C) 1995-2012 The R Core Team
 #
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 addTaskCallback <- function(f, data = NULL, name = character())
 {
diff --git a/src/library/base/R/temp.R b/src/library/base/R/temp.R
index 1aa2758..4910afe 100644
--- a/src/library/base/R/temp.R
+++ b/src/library/base/R/temp.R
@@ -1,5 +1,5 @@
 #  File src/library/base/R/temp.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
 #  Copyright (C) 1995-2012 The R Core Team
 #
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 tempfile <- function(pattern = "file", tmpdir = tempdir(), fileext = "")
     .Internal(tempfile(pattern, tmpdir, fileext))
diff --git a/src/library/base/R/time.R b/src/library/base/R/time.R
index 6fdbbef..0aa83f9 100644
--- a/src/library/base/R/time.R
+++ b/src/library/base/R/time.R
@@ -1,7 +1,7 @@
 #  File src/library/base/R/time.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
-#  Copyright (C) 1995-2013 The R Core Team
+#  Copyright (C) 1995-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
@@ -14,32 +14,34 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 system.time <- function(expr, gcFirst = TRUE)
 {
     ppt <- function(y) {
         if(!is.na(y[4L])) y[1L] <- y[1L] + y[4L]
         if(!is.na(y[5L])) y[2L] <- y[2L] + y[5L]
-        y[1L:3L]
+        paste(formatC(y[1L:3L]), collapse = " ")
     }
     if(!exists("proc.time")) return(rep(NA_real_, 5L))
     if(gcFirst)  gc(FALSE)
     time <- proc.time()
     ## need on.exit after 'time' has been set:
     ## on some systems proc.time throws an error.
-    on.exit(cat("Timing stopped at:", ppt(proc.time() - time), "\n"))
+    on.exit(message("Timing stopped at: ", ppt(proc.time() - time)))
     expr # evaluated here because of lazy evaluation
     new.time <- proc.time()
     on.exit()
     structure(new.time - time, class="proc_time")
 }
-unix.time <- system.time
+unix.time <- function(...) {
+    .Deprecated("system.time")
+    system.time(...)
+}
 
 date <- function() .Internal(date())
 
-summary.proc_time <-
-function(object, ...)
+summary.proc_time <- function(object, ...)
 {
     if(!is.na(object[4L]))
         object[1L] <- object[1L] + object[4L]
@@ -51,8 +53,7 @@ function(object, ...)
     object
 }
 
-print.proc_time <-
-function(x, ...)
+print.proc_time <- function(x, ...)
 {
     print(summary(x, ...))
     invisible(x)
diff --git a/src/library/base/R/toString.R b/src/library/base/R/toString.R
index bcb6bee..9f6b1dc 100644
--- a/src/library/base/R/toString.R
+++ b/src/library/base/R/toString.R
@@ -1,5 +1,5 @@
 #  File src/library/base/R/toString.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
 #  Copyright (C) 1995-2012 The R Core Team
 #
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 #functions to convert their first argument to strings
 toString <- function(x, ...) UseMethod("toString")
diff --git a/src/library/base/R/traceback.R b/src/library/base/R/traceback.R
index 45b219d..012d6e1 100644
--- a/src/library/base/R/traceback.R
+++ b/src/library/base/R/traceback.R
@@ -1,7 +1,7 @@
 #  File src/library/base/R/traceback.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
-#  Copyright (C) 1995-2012 The R Core Team
+#  Copyright (C) 1995-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
@@ -14,37 +14,44 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
-traceback <-
-function(x = NULL, max.lines = getOption("deparse.max.lines"))
-{
-    if(is.null(x) && (exists(".Traceback", envir = baseenv())))
-	x <- get(".Traceback", envir = baseenv())
+.traceback <- function(x = NULL) {
+    if(is.null(x) && !is.null(x <- get0(".Traceback", envir = baseenv())))
+	{}
     else if (is.numeric(x))
     	x <- .Internal(traceback(x))
-    n <- length(x)
+    x
+}
+
+traceback <- function(x = NULL, max.lines = getOption("deparse.max.lines"))
+{
+    n <- length(x <- .traceback(x))
     if(n == 0L)
         cat(gettext("No traceback available"), "\n")
     else {
         for(i in 1L:n) {
+            xi <- x[[i]]
             label <- paste0(n-i+1L, ": ")
-            m <- length(x[[i]])
-            if (!is.null(srcref <- attr(x[[i]], "srcref"))) {
-            	srcfile <- attr(srcref, "srcfile")
-            	x[[i]][m] <- paste0(x[[i]][m], " at ",
-				    basename(srcfile$filename), "#", srcref[1L])
+            m <- length(xi)
+            ## Find source location (NULL if not available)
+            srcloc <- if (!is.null(srcref <- attr(xi, "srcref"))) {
+                srcfile <- attr(srcref, "srcfile")
+                paste0(" at ", basename(srcfile$filename), "#", srcref[1L])
+            }
+            ## Truncate deparsed code (destroys attributes of xi)
+            if(is.numeric(max.lines) && max.lines > 0L && max.lines < m) {
+                xi <- c(xi[seq_len(max.lines)], " ...")
+                m <- length(xi)
+            }
+            if (!is.null(srcloc)) {
+                xi[m] <- paste0(xi[m], srcloc)
             }
             if(m > 1)
                 label <- c(label, rep(substr("          ", 1L,
                                              nchar(label, type="w")),
                                       m - 1L))
-            if(is.numeric(max.lines) && max.lines > 0L && max.lines < m) {
-                cat(paste0(label[1L:max.lines], x[[i]][1L:max.lines]),
-                    sep = "\n")
-                cat(label[max.lines+1L], " ...\n")
-            } else
-            	cat(paste0(label, x[[i]]), sep="\n")
+            cat(paste0(label, xi), sep="\n")
         }
     }
     invisible(x)
diff --git a/src/library/base/R/unix/system.unix.R b/src/library/base/R/unix/system.unix.R
index 350be84..9c34e1d 100644
--- a/src/library/base/R/unix/system.unix.R
+++ b/src/library/base/R/unix/system.unix.R
@@ -1,7 +1,7 @@
 #  File src/library/base/R/unix/system.unix.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
-#  Copyright (C) 1995-2013 The R Core Team
+#  Copyright (C) 1995-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
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 system <- function(command, intern = FALSE,
                    ignore.stdout = FALSE, ignore.stderr = FALSE,
@@ -43,8 +43,9 @@ system <- function(command, intern = FALSE,
         f <- tempfile()
         on.exit(unlink(f))
         writeLines(input, f)
-        # cat(input, file=f, sep="\n")
-        command <- paste(command, "<", shQuote(f))
+##        command <- paste(command, "<", shQuote(f))
+        ## change to use shell-execution-environment redirection, PR#15508
+        command <- paste("<", shQuote(f), command)
     }
     if(!wait && !intern) command <- paste(command, "&")
     .Internal(system(command, intern))
@@ -64,9 +65,9 @@ system2 <- function(command, args = character(),
     command <- paste(c(env, shQuote(command), args), collapse = " ")
 
     if(is.null(stdout)) stdout <- FALSE
-    if(is.null(stderr)) stderr <- FALSE
-
-    if (isTRUE(stderr)) {
+    if(is.null(stderr))
+	stderr <- FALSE
+    else if (isTRUE(stderr)) {
         if (!isTRUE(stdout)) warning("setting stdout = TRUE")
         stdout <- TRUE
     }
@@ -78,8 +79,8 @@ system2 <- function(command, args = character(),
         if(length(stdout) != 1L) stop("'stdout' must be of length 1")
         if(nzchar(stdout)) {
             command <- if (identical(stdout, stderr))
-                paste(command, ">", shQuote(stdout), "2>&1")
-            else command <- paste(command, ">", shQuote(stdout))
+		paste (command, ">", shQuote(stdout), "2>&1")
+	    else paste(command, ">", shQuote(stdout))
         }
     }
     if (identical(stderr, FALSE))
@@ -97,7 +98,7 @@ system2 <- function(command, args = character(),
         f <- tempfile()
         on.exit(unlink(f))
         writeLines(input, f)
-        # cat(input, file=f, sep="\n")
+        ## here 'command' is a single command, unlike system()
         command <- paste(command, "<", shQuote(f))
     } else if (nzchar(stdin)) command <- paste(command, "<", stdin)
     if(!wait && !intern) command <- paste(command, "&")
diff --git a/src/library/base/R/unlist.R b/src/library/base/R/unlist.R
index ec8a5dc..e243e73 100644
--- a/src/library/base/R/unlist.R
+++ b/src/library/base/R/unlist.R
@@ -1,5 +1,5 @@
 #  File src/library/base/R/unlist.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
 #  Copyright (C) 1995-2012 The R Core Team
 #
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 unlist <- function(x, recursive=TRUE, use.names=TRUE)
 {
diff --git a/src/library/base/R/unname.R b/src/library/base/R/unname.R
index c878c4e..4aaa839 100644
--- a/src/library/base/R/unname.R
+++ b/src/library/base/R/unname.R
@@ -1,5 +1,5 @@
 #  File src/library/base/R/unname.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
 #  Copyright (C) 1995-2012 The R Core Team
 #
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 unname <- function (obj, force = FALSE)
 {
diff --git a/src/library/base/R/upper.tri.R b/src/library/base/R/upper.tri.R
index 090afa9..66fbb21 100644
--- a/src/library/base/R/upper.tri.R
+++ b/src/library/base/R/upper.tri.R
@@ -1,5 +1,5 @@
 #  File src/library/base/R/upper.tri.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
 #  Copyright (C) 1995-2012 The R Core Team
 #
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 upper.tri <- function(x, diag = FALSE)
 {
diff --git a/src/library/base/R/userhooks.R b/src/library/base/R/userhooks.R
index 53c4afc..76fb4a3 100644
--- a/src/library/base/R/userhooks.R
+++ b/src/library/base/R/userhooks.R
@@ -1,7 +1,7 @@
 #  File src/library/base/R/userhooks.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
-#  Copyright (C) 1995-2013 The R Core Team
+#  Copyright (C) 1995-2015 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
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 ## presumed small
 .userHooksEnv <- new.env(hash = FALSE, parent = baseenv())
@@ -28,11 +28,7 @@ packageEvent <-
 }
 
 getHook <- function(hookName)
-{
-    if (exists(hookName, envir = .userHooksEnv, inherits = FALSE))
-        get(hookName, envir = .userHooksEnv, inherits = FALSE)
-    else list()
-}
+    get0(hookName, envir = .userHooksEnv, inherits = FALSE, ifnotfound = list())
 
 setHook <- function(hookName, value,
                     action = c("append", "prepend", "replace"))
diff --git a/src/library/base/R/utilities.R b/src/library/base/R/utilities.R
index c51dd56..f9ffb52 100644
--- a/src/library/base/R/utilities.R
+++ b/src/library/base/R/utilities.R
@@ -1,5 +1,5 @@
 #  File src/library/base/R/utilities.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
 #  Copyright (C) 1995-2012 The R Core Team
 #
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 mat.or.vec <- function(nr,nc)
     if(nc == 1L) numeric(nr) else matrix(0, nr, nc)
diff --git a/src/library/base/R/utils.R b/src/library/base/R/utils.R
index 440d458..b01aae8 100644
--- a/src/library/base/R/utils.R
+++ b/src/library/base/R/utils.R
@@ -1,7 +1,7 @@
 #  File src/library/base/R/utils.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
-#  Copyright (C) 1995-2012 The R Core Team
+#  Copyright (C) 1995-2015 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
@@ -14,9 +14,9 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
-shQuote <- function(string, type = c("sh", "csh", "cmd"))
+shQuote <- function(string, type = c("sh", "csh", "cmd", "cmd2"))
 {
     cshquote <- function(x) {
         xx <- strsplit(x, "'", fixed = TRUE)[[1L]]
@@ -24,21 +24,20 @@ shQuote <- function(string, type = c("sh", "csh", "cmd"))
     }
     if(missing(type) && .Platform$OS.type == "windows") type <- "cmd"
     type <- match.arg(type)
-    if(type == "cmd") {
-        paste0('"', gsub('"', '\\\\"', string), '"')
-    } else {
-        if(!length(string)) return("")
-        has_single_quote <- grep("'", string)
-        if(!length(has_single_quote))
-            return(paste0("'", string, "'"))
-        if(type == "sh")
-            paste0('"', gsub('(["$`\\])', "\\\\\\1", string), '"')
-        else {
-            if(!length(grep("([$`])", string))) {
-                paste0('"', gsub('(["!\\])', "\\\\\\1", string), '"')
-            } else vapply(string, cshquote, "")
-        }
-    }
+    if(type == "cmd")
+	paste0('"', gsub('"', '\\\\"', string), '"')
+    else if (type == "cmd2")
+        gsub('([()%!^"<>&|])', "^\\1", string)
+    else if(!length(string))
+	""
+    else if(!any(grepl("'", string))) # has single quote
+	paste0("'", string, "'")
+    else if(type == "sh")
+	paste0('"', gsub('(["$`\\])', "\\\\\\1", string), '"')
+    else if(!any(grepl("([$`])", string)))
+	paste0('"', gsub('(["!\\])' , "\\\\\\1", string), '"')
+    else
+	vapply(string, cshquote, "")
 }
 
 .standard_regexps <-
diff --git a/src/library/base/R/vector.R b/src/library/base/R/vector.R
index feb1494..0982b01 100644
--- a/src/library/base/R/vector.R
+++ b/src/library/base/R/vector.R
@@ -1,5 +1,5 @@
 #  File src/library/base/R/vector.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
 #  Copyright (C) 1995-2013 The R Core Team
 #
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 vector <- function(mode = "logical", length = 0L) .Internal(vector(mode, length))
 logical <- function(length = 0L) .Internal(vector("logical", length))
diff --git a/src/library/base/R/version.R b/src/library/base/R/version.R
index bfc70f6..e3696a2 100644
--- a/src/library/base/R/version.R
+++ b/src/library/base/R/version.R
@@ -1,7 +1,7 @@
 #  File src/library/base/R/version.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
-#  Copyright (C) 1995-2013 The R Core Team
+#  Copyright (C) 1995-2015 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
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 ## A simple S3 class for numeric versions (including package versions),
 ## and associated methods.
@@ -78,6 +78,16 @@ function(x)
         ## Simplify eventually ...
         structure(x, class = c(class(x), "numeric_version"))
     }
+    else if(is.list(x) && all(vapply(x, is.integer, NA))) {
+        bad <- vapply(x,
+                      function(e) anyNA(e) || any(e < 0L),
+                      NA)
+        if(any(bad)) {
+            x[bad] <- rep.int(list(integer()), sum(bad))
+        }
+        class(x) <- "numeric_version"
+        x
+    }
     else numeric_version(x)
 }
 
@@ -98,9 +108,12 @@ function(x, strict = TRUE)
                           "package_version")
 }
 
-is.package_version <- function(x) inherits(x, "package_version")
+is.package_version <-
+function(x)
+    inherits(x, "package_version")
 
-as.package_version <- function(x)
+as.package_version <-
+function(x)
     if(is.package_version(x)) x else package_version(x)
 
 ## R system versions must have exactly three integers.
@@ -118,52 +131,52 @@ function()
 
 ## Workhorses.
 
-## <NOTE>
-## Could use this for or as as.double.numeric_version() ...
-## </NOTE>
-
 .encode_numeric_version <-
-function(x, base = NULL)
+function(x)
 {
+    strlpad <- function(x, char, width)
+        paste0(strrep(char, width - nchar(x)), x)
+
+    strrpad <- function(x, char, width)
+        paste0(x, strrep(char, width - nchar(x)))
+
     if(!is.numeric_version(x)) stop("wrong class")
-    if(is.null(base)) base <- max(unlist(x), 0, na.rm = TRUE) + 1
+
     classes <- class(x)
     nms <- names(x)
     x <- unclass(x)
-    lens <- vapply(x, length, 1L)
-    ## We store the lengths so that we know when to stop when decoding.
-    ## Alternatively, we need to be smart about trailing zeroes.  One
-    ## approach is to increment all numbers in the version specs and
-    ## base by 1, and when decoding only retain the non-zero entries and
-    ## decrement by 1 one again.
-    x <- vapply(x, function(t)
-		sum(t / base^seq.int(0, length.out = length(t))), 1.)
-    structure(ifelse(lens > 0L, x, NA_real_),
-              base = base, lens = lens, .classes = classes, names = nms)
+    lens <- vapply(x, length, 0L)
+    y <- lapply(x, function(e) sprintf("%o", e))
+    ## Maximal number of octal digits needed.
+    width <- max(nchar(unlist(y)), 0L)
+    ## Left-pad octals with zeros to common width, collapse, and
+    ## right-pad with zeros to total common width.
+    y <- vapply(y,
+                function(e)
+                paste(strlpad(e, "0", width), collapse = ""),
+                "")
+    y <- strrpad(y, "0", max(nchar(y), 0L))
+    structure(ifelse(lens > 0L, y, NA_character_),
+              width = width, lens = lens, .classes = classes, names = nms)
 }
 
 ## <NOTE>
 ## Currently unused.
-## Is there any point in having a 'base' argument?
 ## </NOTE>
+
 .decode_numeric_version <-
-function(x, base = NULL)
+function(x)
 {
-    if(is.null(base)) base <- attr(x, "base")
-    if(!is.numeric(base)) stop("wrong argument")
-    lens <- attr(x, "lens")
-    y <- vector("list", length = length(x))
-    for(i in seq_along(x)) {
-        n <- lens[i]
-        encoded <- x[i]
-        decoded <- integer(n)
-        for(k in seq_len(n)) {
-            decoded[k] <- encoded %/% 1
-            encoded <- base * (encoded %% 1)
-        }
-        y[[i]] <- as.integer(decoded)
-    }
-    class(y) <- unique(c(attr(x, ".classes"), "numeric_version"))
+    width <- attr(x, "width")
+    y <- Map(function(elt, len) {
+        if(is.na(elt)) return(integer())
+        first <- seq(from = 1L, length.out = len, by = width)
+        last <- seq(from = width, length.out = len, by = width)
+        strtoi(substring(elt, first, last), 8L)
+    },
+             x, attr(x, "lens"))
+    names(y) <- names(x)
+    class(y) <-  unique(c(attr(x, ".classes"), "numeric_version"))
     y
 }
 
@@ -184,6 +197,28 @@ function(x, i, j)
     y
 }
 
+`[<-.numeric_version` <-
+function(x, i, j, value)
+{
+    y <- unclass(x)
+    if(missing(j))
+        y[i] <- unclass(as.numeric_version(value))
+    else {
+        ## Listify value as needed and validate.
+        if(!is.list(value)) value <- list(value)
+        value <- lapply(value, as.integer)
+        if(any(vapply(value,
+                      function(e) anyNA(e) || any(e < 0L),
+                      NA)))
+            stop("invalid 'value'")
+        ## Listify j as needed.
+        if(!is.list(j)) j <- list(j)
+        y[i] <- Map(`[<-`, y[i], j, value)
+    }
+    class(y) <- class(x)
+    y
+}
+
 `[[.numeric_version` <-
 function(x, ..., exact = NA)
 {
@@ -218,7 +253,6 @@ function(x, ..., value)
    structure(z, class = oldClass(x))
 }
 
-
 Ops.numeric_version <-
 function(e1, e2)
 {
@@ -232,9 +266,13 @@ function(e1, e2)
                       .Generic), domain = NA)
     if(!is.numeric_version(e1)) e1 <- as.numeric_version(e1)
     if(!is.numeric_version(e2)) e2 <- as.numeric_version(e2)
-    base <- max(unlist(e1), unlist(e2), 0) + 1
-    e1 <- .encode_numeric_version(e1, base = base)
-    e2 <- .encode_numeric_version(e2, base = base)
+    n1 <- length(e1)
+    n2 <- length(e2)
+    if(!n1 || !n2) return(logical())
+    e <- split(.encode_numeric_version(c(e1, e2)),
+               rep.int(c(1L, 2L), c(n1, n2)))
+    e1 <- e[[1L]]
+    e2 <- e[[2L]]
     NextMethod(.Generic)
 }
 
@@ -246,7 +284,7 @@ function(..., na.rm)
         stop(gettextf("%s not defined for \"numeric_version\" objects",
                       .Generic), domain = NA)
     x <- do.call("c", lapply(list(...), as.numeric_version))
-    v <- .encode_numeric_version(x)
+    v <- xtfrm(x)
     if(!na.rm && length(pos <- which(is.na(v)))) {
         y <- x[pos[1L]]
         if(as.character(.Generic) == "range")
@@ -304,13 +342,31 @@ function(x, ...)
     x <- unclass(x)
     y <- rep.int(NA_character_, length(x))
     names(y) <- names(x)
-    ind <- vapply(x, length, 1L) > 0L
+    ind <- lengths(x) > 0L
     y[ind] <- unlist(lapply(x[ind], paste, collapse = "."))
     y
 }
 
-is.na.numeric_version <- function(x) is.na(.encode_numeric_version(x))
-anyNA.numeric_version <- function(x) anyNA(.encode_numeric_version(x))
+is.na.numeric_version <-
+function(x)
+    is.na(.encode_numeric_version(x))
+
+`is.na<-.numeric_version` <-
+function(x, value)
+{
+    x[value] <- rep.int(list(integer()), length(value))
+    x
+}
+
+anyNA.numeric_version <-
+function(x, recursive = FALSE)
+{
+    ## <NOTE>
+    ## Assuming *valid* numeric_version objects, we could simply do:
+    ##   any(vapply(unclass(x), length, 0L) == 0L)
+    ## </NOTE>
+    anyNA(.encode_numeric_version(x))
+}
 
 print.numeric_version <-
 function(x, ...)
@@ -333,7 +389,10 @@ function(x, incomparables = FALSE, ...)
 
 xtfrm.numeric_version <-
 function(x)
-    .encode_numeric_version(x)
+{
+    x <- .encode_numeric_version(x)
+    NextMethod("xtfrm")
+}
 
 ## <NOTE>
 ## Versions of R prior to 2.6.0 had only a package_version class.
diff --git a/src/library/base/R/warnings.R b/src/library/base/R/warnings.R
index f116310..a0e4961 100644
--- a/src/library/base/R/warnings.R
+++ b/src/library/base/R/warnings.R
@@ -1,7 +1,7 @@
 #  File src/library/base/R/warnings.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
-#  Copyright (C) 1995-2013 The R Core Team
+#  Copyright (C) 1995-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
@@ -14,21 +14,24 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 warnings <- function(...)
 {
     if(!exists("last.warning", envir=baseenv())) return()
-    last.warning <- get("last.warning", envir=baseenv())
-    if(!(n <- length(last.warning))) return()
-    structure(last.warning, dots=list(...), class="warnings")
+    last.warning <- get("last.warning", envir = baseenv())
+    if(!(length(last.warning))) return()
+    structure(last.warning, dots = list(...), class = "warnings")
 }
 
 `[.warnings` <- function(x, ...)
-    structure(NextMethod("["), class="warnings")
+    structure(NextMethod("["), class = "warnings")
+
 c.warnings <- function (..., recursive = FALSE)
     structure(NextMethod("c"), class = "warnings")
 
+duplicated.warnings <- function(x, incomparables = FALSE, ...)
+    duplicated(paste(names(x), as.character(x)), incomparables, ...)
 unique.warnings <- function(x, incomparables = FALSE, ...)
     x[!duplicated(x, incomparables, ...)]
 
@@ -56,3 +59,21 @@ print.warnings <- function(x, ...)
     }
     invisible(x)
 }
+
+##' @title Warn about extraneous arguments in the "..."	 (of its caller).
+##' @author Martin Maechler, June 2012, May 2014
+##' @param ...
+##' @param which.call passed to sys.call().  A caller may use -2 if the message should
+##' mention *its* caller
+##' @param allowed not yet implemented: character vector of *named* elements in '...'
+##' which are \dQuote{allowed} and hence not warned about
+chkDots <- function(..., which.call = -1, allowed = character(0)) {
+    if(nx <- length(list(...))) ## <- or  if(missing(...)) ?
+	warning(sprintf(ngettext(nx,
+				 "In %s :\n extra argument %s will be disregarded",
+				 "In %s :\n extra arguments %s will be disregarded"),
+			paste(deparse(sys.call(which.call), control=c()), collapse="\n"),
+			## sub(")$", '', sub("^list\\(", '', deparse(list(...), control=c())))
+			paste(sQuote(names(list(...))), collapse = ", ")),
+		call. = FALSE, domain=NA)
+}
diff --git a/src/library/base/R/which.R b/src/library/base/R/which.R
index 01f6d0e..2195720 100644
--- a/src/library/base/R/which.R
+++ b/src/library/base/R/which.R
@@ -1,5 +1,5 @@
 #  File src/library/base/R/which.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
 #  Copyright (C) 1995-2013 The R Core Team
 #
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 which <- function(x, arr.ind = FALSE, useNames = TRUE)
 {
diff --git a/src/library/base/R/windows/junctions.R b/src/library/base/R/windows/junctions.R
index 1c02e29..8c56b78 100644
--- a/src/library/base/R/windows/junctions.R
+++ b/src/library/base/R/windows/junctions.R
@@ -1,7 +1,7 @@
 #  File src/library/base/R/windows/junctions.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
-#  Copyright (C) 1995-2012 The R Core Team
+#  Copyright (C) 1995-2014 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
@@ -14,14 +14,13 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 Sys.junction <- function(from, to)
 {
     if (!(nf <- length(from))) return(logical())
     if (!(nt <- length(to)))   stop("no files to link to")
-    if (nt == 1 && isTRUE(file.info(to)$isdir))
-        to <- file.path(to, basename(from))
+    if (nt == 1 && dir.exists(to)) to <- file.path(to, basename(from))
     else if (nf > nt) stop("more 'from' files than 'to' files")
     else if (nf < nt) stop("fewer 'from' files than 'to' files")
 
diff --git a/src/library/base/R/windows/system.R b/src/library/base/R/windows/system.R
index a687143..869e480 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, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
-#  Copyright (C) 1995-2013 The R Core Team
+#  Copyright (C) 1995-2014 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
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 system <- function(command, intern = FALSE,
                    ignore.stdout = FALSE, ignore.stderr = FALSE,
@@ -74,7 +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))
@@ -94,7 +97,6 @@ shell <- function(cmd, shell, flag = "/c", intern = FALSE,
 {
     if(missing(shell)) {
         shell <- Sys.getenv("R_SHELL")
-        if(!nzchar(shell)) shell <- Sys.getenv("SHELL")
         if(!nzchar(shell)) shell <- Sys.getenv("COMSPEC")
     }
     if(missing(flag) &&
diff --git a/src/library/base/R/withVisible.R b/src/library/base/R/withVisible.R
index 85a4561..1613ce6 100644
--- a/src/library/base/R/withVisible.R
+++ b/src/library/base/R/withVisible.R
@@ -1,5 +1,5 @@
 #  File src/library/utils/R/withVisible.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
 #  Copyright (C) 1995-2012 The R Core Team
 #
@@ -14,6 +14,6 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 withVisible <- function(x) .Internal(withVisible(x))
diff --git a/src/library/base/R/write.R b/src/library/base/R/write.R
index a0534f2..3648e1f 100644
--- a/src/library/base/R/write.R
+++ b/src/library/base/R/write.R
@@ -1,5 +1,5 @@
 #  File src/library/base/R/write.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
 #  Copyright (C) 1995-2012 The R Core Team
 #
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 write <- function(x, file = "data", ncolumns = if(is.character(x)) 1 else 5,
                   append = FALSE, sep = " ")
diff --git a/src/library/base/R/xor.R b/src/library/base/R/xor.R
index 8c15104..d52d099 100644
--- a/src/library/base/R/xor.R
+++ b/src/library/base/R/xor.R
@@ -1,5 +1,5 @@
 #  File src/library/base/R/xor.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
 #  Copyright (C) 1995-2012 The R Core Team
 #
@@ -14,6 +14,6 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 xor <- function(x, y) { (x | y) & !(x & y) }
diff --git a/src/library/base/R/zapsmall.R b/src/library/base/R/zapsmall.R
index 3b9e0e0..4622431 100644
--- a/src/library/base/R/zapsmall.R
+++ b/src/library/base/R/zapsmall.R
@@ -1,5 +1,5 @@
 #  File src/library/base/R/zapsmall.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
 #  Copyright (C) 1995-2012 The R Core Team
 #
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 zapsmall <- function(x, digits = getOption("digits"))
 {
diff --git a/src/library/base/R/zdatetime.R b/src/library/base/R/zdatetime.R
index 444a586..a874c8c 100644
--- a/src/library/base/R/zdatetime.R
+++ b/src/library/base/R/zdatetime.R
@@ -1,7 +1,7 @@
 #  File src/library/base/R/zdatetime.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
-#  Copyright (C) 1995-2012 The R Core Team
+#  Copyright (C) 1995-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
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 ## needs to run after paste()
 .leap.seconds <- local({
@@ -24,7 +24,8 @@
           "1979-12-31", "1981-6-30", "1982-6-30", "1983-6-30",
           "1985-6-30", "1987-12-31", "1989-12-31", "1990-12-31",
           "1992-6-30", "1993-6-30", "1994-6-30","1995-12-31",
-          "1997-6-30", "1998-12-31", "2005-12-31", "2008-12-31", "2012-6-30")
+          "1997-6-30", "1998-12-31", "2005-12-31", "2008-12-31", 
+          "2012-6-30", "2015-6-30", "2016-12-31")
     .leap.seconds <- strptime(paste(.leap.seconds , "23:59:60"),
                               "%Y-%m-%d %H:%M:%S")
     c(as.POSIXct(.leap.seconds, "GMT")) # lose the timezone
diff --git a/src/library/base/R/zdynvars.R b/src/library/base/R/zdynvars.R
index 2198c13..8817122 100644
--- a/src/library/base/R/zdynvars.R
+++ b/src/library/base/R/zdynvars.R
@@ -1,7 +1,7 @@
 #  File src/library/base/R/zdynvars.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
-#  Copyright (C) 1995-2012 The R Core Team
+#  Copyright (C) 1995-2014 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
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 ## Need to ensure this comes late enough ...
 ## Perhaps even merge it into the common profile?
@@ -43,10 +43,11 @@
         if(!missing(new)) {
             ## paths don't really need to be unique, but searching
             ## large library trees repeatedly would be inefficient.
-            ## Use normalizePath for display: but also does path.expand
+            ## Use normalizePath for display
             new <- Sys.glob(path.expand(new))
-            paths <- unique(normalizePath(c(new, .Library.site, .Library), '/'))
-            .lib.loc <<- paths[file.info(paths)$isdir %in% TRUE]
+            paths <- c(new, .Library.site, .Library)
+            paths <- paths[dir.exists(paths)]
+            .lib.loc <<- unique(normalizePath(paths, "/"))
         }
         else
             .lib.loc
diff --git a/src/library/base/R/zzz.R b/src/library/base/R/zzz.R
index f75a22f..c77fc7c 100644
--- a/src/library/base/R/zzz.R
+++ b/src/library/base/R/zzz.R
@@ -1,7 +1,7 @@
 #  File src/library/base/R/zzz.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
-#  Copyright (C) 1995-2013 The R Core Team
+#  Copyright (C) 1995-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
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 ## top-level assignments that need to be copied to baseloader.R
 as.numeric <- as.double
@@ -35,7 +35,7 @@ is.name <- is.symbol
     graphicsGenerics <- c("contour", "hist", "identify", "image",
         "lines", "pairs", "plot", "points", "text")
 
-    statsGenerics <- c( "add1", "AIC", "anova", "biplot", "coef",
+    statsGenerics <- c("add1", "AIC", "anova", "biplot", "coef",
         "confint", "deviance", "df.residual", "drop1", "extractAIC",
         "fitted", "formula", "logLik", "model.frame", "model.matrix",
         "predict", "profile", "qqnorm", "residuals", "se.contrast",
@@ -49,6 +49,10 @@ is.name <- is.symbol
     tmp
 })
 
+###--- Arguments (for printing and QC analysis) for the .Primitive functions ----
+
+## 1) .ArgsEnv : The non-generics .Primitives :
+
 .ArgsEnv <- new.env(hash = TRUE, parent = emptyenv())
 
 assign("%*%", function(x, y) NULL, envir = .ArgsEnv)
@@ -66,7 +70,7 @@ assign(".External.graphics", function(.NAME, ..., PACKAGE) NULL,
        envir = .ArgsEnv)
 assign(".Internal", function(call) NULL, envir = .ArgsEnv)
 assign(".Primitive", function(name) NULL, envir = .ArgsEnv)
-assign(".isMethodsDispatchOn", function(x, onOff = NULL) NULL, envir = .ArgsEnv)
+assign(".isMethodsDispatchOn", function(onOff = NULL) NULL, envir = .ArgsEnv)
 assign(".primTrace", function(obj) NULL, envir = .ArgsEnv)
 assign(".primUntrace", function(obj) NULL, envir = .ArgsEnv)
 assign(".subset", function(x, ...) NULL, envir = .ArgsEnv)
@@ -90,6 +94,7 @@ assign("enc2native", function(x) NULL, envir = .ArgsEnv)
 assign("enc2utf8", function(x) NULL, envir = .ArgsEnv)
 assign("environment<-", function(fun, value) NULL, envir = .ArgsEnv)
 assign("expression", function(...) NULL, envir = .ArgsEnv)
+assign("forceAndCall", function(n, FUN, ...) NULL, envir = .ArgsEnv)
 assign("gc.time", function(on = TRUE) NULL, envir = .ArgsEnv)
 assign("globalenv", function() NULL, envir = .ArgsEnv)
 assign("interactive", function() NULL, envir = .ArgsEnv)
@@ -120,7 +125,7 @@ assign("lazyLoadDBfetch", function(key, file, compressed, hook) NULL,
        envir = .ArgsEnv)
 assign("missing", function(x) NULL, envir = .ArgsEnv)
 assign("nargs", function() NULL, envir = .ArgsEnv)
-assign("nzchar", function(x) NULL, envir = .ArgsEnv)
+assign("nzchar", function(x, keepNA=FALSE) NULL, envir = .ArgsEnv)
 assign("oldClass", function(x) NULL, envir = .ArgsEnv)
 assign("oldClass<-", function(x, value) NULL, envir = .ArgsEnv)
 assign("on.exit", function(expr = NULL, add = FALSE) NULL, envir = .ArgsEnv)
@@ -139,6 +144,8 @@ assign("unclass", function(x) NULL, envir = .ArgsEnv)
 assign("untracemem", function(x) NULL, envir = .ArgsEnv)
 
 
+## 2) .GenericArgsEnv : The generic .Primitives :
+
 .S3PrimitiveGenerics <-
   c("anyNA", "as.character", "as.complex", "as.double", "as.environment",
     "as.integer", "as.logical", "as.numeric", "as.raw",
@@ -150,7 +157,7 @@ assign("untracemem", function(x) NULL, envir = .ArgsEnv)
 
 .GenericArgsEnv <- local({
     env <- new.env(hash = TRUE, parent = emptyenv())
-    ## those with different arglists are overridden below.
+    ## those with different arglists are overridden below
     for(f in .S3PrimitiveGenerics) {
         fx <- function(x) {}
         body(fx) <- substitute(UseMethod(ff), list(ff=f))
@@ -194,6 +201,9 @@ assign("untracemem", function(x) NULL, envir = .ArgsEnv)
         environment(fx) <- .BaseNamespaceEnv
         assign(f, fx, envir = env)
     }
+    fx <- function(x, recursive = FALSE) UseMethod("anyNA")
+    environment(fx) <- .BaseNamespaceEnv
+    assign("anyNA", fx, envir = env)
     env
 })
 ### do these outside to get the base namespace as the environment.
@@ -209,7 +219,9 @@ assign("as.integer", function(x, ...) UseMethod("as.integer"),
 assign("as.logical", function(x, ...) UseMethod("as.logical"),
        envir = .GenericArgsEnv)
 #assign("as.raw", function(x) UseMethod("as.raw"), envir = .GenericArgsEnv)
-assign("c", function(..., recursive = FALSE) UseMethod("c"),
+## Conceptually, this is the argument list of  *default* method, not the generic :
+## assign("c", function(..., recursive = FALSE, use.names = TRUE) UseMethod("c"),
+assign("c", function(...) UseMethod("c"),
        envir = .GenericArgsEnv)
 #assign("dimnames", function(x) UseMethod("dimnames"), envir = .GenericArgsEnv)
 assign("dim<-", function(x, value) UseMethod("dim<-"), envir = .GenericArgsEnv)
diff --git a/src/library/base/baseloader.R b/src/library/base/baseloader.R
index 4cab9a4..ae0b687 100644
--- a/src/library/base/baseloader.R
+++ b/src/library/base/baseloader.R
@@ -1,5 +1,5 @@
 #  File src/library/base/baseloader.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
 #  Copyright (C) 1995-2013 The R Core Team
 #
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 
 ## this should be kept in step with code in R/lazyload.R
@@ -120,3 +120,15 @@ local({
         lapply(routines[[i]],
                function(sym) assign(paste0(".C_", sym$name), sym, envir = .BaseNamespaceEnv))
 })
+
+## make sure these two promises are forced to avoid recursive invocation
+## of "args" and consequent "promise already under evaluation" error
+
+invisible(force(.ArgsEnv))
+invisible(force(.GenericArgsEnv))
+
+## also force these condition system callback promises to avoid
+## recursive invocation in some rare situations at start-up
+invisible(force(.signalSimpleWarning))
+invisible(force(.handleSimpleError))
+invisible(force(.tryResumeInterrupt))
diff --git a/src/library/base/inst/CITATION b/src/library/base/inst/CITATION
index 954b9dc..0757914 100644
--- a/src/library/base/inst/CITATION
+++ b/src/library/base/inst/CITATION
@@ -4,13 +4,13 @@ bibentry("Manual",
          organization = "R Foundation for Statistical Computing",
          address      = "Vienna, Austria",
          year         = version$year,
-         url          = "http://www.R-project.org/",
+         url          = "https://www.R-project.org/",
          
          textVersion = 
          paste("R Core Team (", version$year, "). ", 
                "R: A language and environment for statistical computing. ",
                "R Foundation for Statistical Computing, Vienna, Austria. ",
-               "URL http://www.R-project.org/.",
+               "URL https://www.R-project.org/.",
                sep=""),
 	       
          mheader = "To cite R in publications use:",
diff --git a/src/library/base/makebasedb.R b/src/library/base/makebasedb.R
index 0c3dca4..893397c 100644
--- a/src/library/base/makebasedb.R
+++ b/src/library/base/makebasedb.R
@@ -1,5 +1,5 @@
 #  File src/library/base/makebasedb.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
 #  Copyright (C) 1995-2012 The R Core Team
 #
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 local({
     makeLazyLoadDB <- function(from, filebase, compress = TRUE, ascii = FALSE,
diff --git a/src/library/base/man/Arithmetic.Rd b/src/library/base/man/Arithmetic.Rd
index ed692f7..67bc222 100644
--- a/src/library/base/man/Arithmetic.Rd
+++ b/src/library/base/man/Arithmetic.Rd
@@ -1,10 +1,8 @@
 % File src/library/base/man/Arithmetic.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2014 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2016 R Core Team
 % Distributed under GPL 2 or later
 
-\newcommand{\sspace}{\ifelse{latex}{\out{~}}{ }}
-
 \name{Arithmetic}
 \title{Arithmetic Operators}
 \usage{
@@ -45,9 +43,10 @@ x \%/\% y
   All attributes (including class) are preserved if there is no
   coercion: logical \code{x} is coerced to integer and names, dims and
   dimnames are preserved.
-  
+
   The binary operators return vectors containing the result of the element
-  by element operations.  The elements of shorter vectors are recycled
+  by element operations.  If involving a zero-length vector the result
+  has length zero.  Otherwise, the elements of shorter vectors are recycled
   as necessary (with a \code{\link{warning}} when they are recycled only
   \emph{fractionally}).  The operators are \code{+} for addition,
   \code{-} for subtraction, \code{*} for multiplication, \code{/} for
@@ -58,7 +57,7 @@ x \%/\% y
   x \%/\% y )} (up to rounding error) unless \code{y == 0} where the
   result of \code{\%\%} is \code{\link{NA_integer_}} or
   \code{\link{NaN}} (depending on the \code{\link{typeof}} of the
-  arguments).
+  arguments), and for non-\link{finite} arguments.
 
   If either argument is complex the result will be complex, otherwise if
   one or both arguments are numeric, the result will be numeric.  If
@@ -80,7 +79,7 @@ x \%/\% y
   if both are) are used.  For arrays (and an array result) the
   dimensions and dimnames are taken from first argument if it is an
   array, otherwise the second.
-  
+
 }
 \details{
   The unary and binary arithmetic operators are generic functions:
@@ -96,7 +95,8 @@ x \%/\% y
 
   \code{1 ^ y} and \code{y ^ 0} are \code{1}, \emph{always}.
   \code{x ^ y} should also give the proper limit result when
-  either argument is infinite (i.e., \code{+- \link{Inf}}).
+  either (numeric) argument is \link{infinite} (one of \code{Inf} or
+  \code{-Inf}).
 
   Objects such as arrays or time-series can be operated on this
   way provided they are conformable.
@@ -146,12 +146,16 @@ x \%/\% y
   Windows whether it does so or not depends on the version of Windows).
   One place in \R where the difference might be seen is in division by
   zero: \code{1/x} is \code{Inf} or \code{-Inf} depending on the sign of
-  zero \code{x}.
+  zero \code{x}.  Another place is
+  \code{\link{identical}(0, -0, num.eq = FALSE)}.
 }
 \note{
-  The binary operators are sometimes called as functions as e.g.
-  \code{`&`(x, y)}: see the description of how argument-matching is done
-  in \code{\link[base]{Ops}}.
+  All logical operations involving a zero-length vector have a
+  zero-length result.
+
+  The binary operators are sometimes called as functions as
+  e.g.\sspace{}\code{`&`(x, y)}: see the description of how
+  argument-matching is done in \code{\link[base]{Ops}}.
 
   \code{**} is translated in the parser to \code{^}, but this was
   undocumented for many years.  It appears as an index entry in Becker
diff --git a/src/library/base/man/AsIs.Rd b/src/library/base/man/AsIs.Rd
index ca5791e..1635f17 100644
--- a/src/library/base/man/AsIs.Rd
+++ b/src/library/base/man/AsIs.Rd
@@ -1,6 +1,6 @@
 % File src/library/base/man/AsIs.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2007 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2014 R Core Team
 % Distributed under GPL 2 or later
 
 \name{AsIs}
diff --git a/src/library/base/man/Bessel.Rd b/src/library/base/man/Bessel.Rd
index b0551f3..7a6ab1e 100644
--- a/src/library/base/man/Bessel.Rd
+++ b/src/library/base/man/Bessel.Rd
@@ -1,6 +1,6 @@
 % File src/library/base/man/Bessel.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2013 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2015 R Core Team
 % Distributed under GPL 2 or later
 
 \name{Bessel}
@@ -37,7 +37,7 @@ besselY(x, nu)
 \value{
   Numeric vector with the (scaled, if \code{expon.scaled = TRUE})
   values of the corresponding Bessel function.
-  
+
   The length of the result is the maximum of the lengths of the
   parameters.  All parameters are recycled to that length.
 }
@@ -48,15 +48,55 @@ besselY(x, nu)
   For \eqn{\nu < 0}{nu < 0}, formulae 9.1.2 and 9.6.2 from Abramowitz &
   Stegun  are applied (which is probably suboptimal), except for
   \code{besselK} which is symmetric in \code{nu}.
+
+  The current algorithms will give warnings about accuracy loss for
+  large arguments.  In some cases, these warnings are exaggerated, and
+  the precision is perfect.  For large \code{nu}, say in the order of
+  millions, the current algorithms are rarely useful.
 }
 \source{
   The C code is a translation of Fortran routines from
   \url{http://www.netlib.org/specfun/ribesl}, \samp{../rjbesl}, etc.
+  The four source code files for bessel[IJKY] each contain a paragraph
+  \dQuote{Acknowledgement} and \dQuote{References}, a short summary of
+  which is
+  \describe{
+    \item{besselI}{based on (code) by David J. Sookne, see Sookne (1973)\dots
+      Modifications\dots An earlier version was published in Cody (1983).}
+    \item{besselJ}{as \code{besselI}}
+    \item{besselK}{based on (code) by J. B. Campbell (1980)\dots Modifications\dots}
+    \item{besselY}{draws heavily on Temme's Algol program for
+      \eqn{Y}\dots and on Campbell's programs for \eqn{Y_\nu(x)}
+      \dots. \dots heavily modified.}
+  }
 }
 \references{
   Abramowitz, M. and Stegun, I. A. (1972)
   \emph{Handbook of Mathematical Functions.} Dover, New York;
   Chapter 9: Bessel Functions of Integer Order.
+
+  In order of \dQuote{Source} citation above:
+
+  Sockne, David J. (1973)
+  Bessel Functions of Real Argument and Integer Order.
+  \emph{NBS Jour. of Res. B.} \bold{77B}, 125--132.
+
+  Cody, William J. (1983)
+  Algorithm 597: Sequence of modified Bessel functions of the first kind.
+  \emph{ACM Transactions on Mathematical Software} \bold{9}(2), 242--245.% TOMS
+
+  Campbell, J.B. (1980)
+  On Temme's algorithm for the modified Bessel function of the third kind.
+  \emph{ACM Transactions on Mathematical Software} \bold{6}(4), 581--586.
+
+  Campbell, J.B. (1979)
+  Bessel functions J_nu(x) and Y_nu(x) of float order and float argument.
+  \emph{Comp. Phy. Comm.} \bold{18}, 133--142.
+
+  Temme, Nico M. (1976)
+  On the numerical evaluation of the ordinary Bessel function of the second kind.
+  \emph{J. Comput. Phys.} \bold{21}, 343--350.
+
 }
 \seealso{
   Other special mathematical functions, such as
@@ -66,7 +106,7 @@ besselY(x, nu)
 \author{
   Original Fortran code:
   W. J. Cody, Argonne National Laboratory \cr
-  Translation to C and adaption to \R:
+  Translation to C and adaptation to \R:
   Martin Maechler \email{maechler at stat.math.ethz.ch}.
 }
 \examples{
diff --git a/src/library/base/man/CallExternal.Rd b/src/library/base/man/CallExternal.Rd
index 0410bd3..62da94c 100644
--- a/src/library/base/man/CallExternal.Rd
+++ b/src/library/base/man/CallExternal.Rd
@@ -1,5 +1,5 @@
 % File src/library/base/man/Foreign.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2013 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/base/man/Colon.Rd b/src/library/base/man/Colon.Rd
index 6c71a45..a7ec309 100644
--- a/src/library/base/man/Colon.Rd
+++ b/src/library/base/man/Colon.Rd
@@ -1,5 +1,5 @@
 % File src/library/base/man/Colon.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2008 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/base/man/Comparison.Rd b/src/library/base/man/Comparison.Rd
index 640f46f..da1fabc 100644
--- a/src/library/base/man/Comparison.Rd
+++ b/src/library/base/man/Comparison.Rd
@@ -1,10 +1,8 @@
 % File src/library/base/man/Comparison.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2014 R Core Team
 % Distributed under GPL 2 or later
 
-\newcommand{\sspace}{\ifelse{latex}{\out{~}}{ }}
-
 \name{Comparison}
 \alias{<}
 \alias{<=}
@@ -98,9 +96,9 @@ x != y
   always preferable.  See the examples.  (This also applies to the other
   comparison operators.)
   
-  These operators are sometimes called as functions as e.g.
-  \code{`<`(x, y)}: see the description of how argument-matching is done
-  in \code{\link[base]{Ops}}.
+  These operators are sometimes called as functions as
+  e.g.\sspace{}\code{`<`(x, y)}: see the description of how
+  argument-matching is done in \code{\link[base]{Ops}}.
 }
 \section{S4 methods}{
   These operators are members of the S4 \code{\link{Compare}} group generic,
@@ -115,19 +113,21 @@ x != y
 
   Collation of character strings is a complex topic.  For an
   introduction see
-  \url{http://en.wikipedia.org/wiki/Collating_sequence}.  The
+  \url{https://en.wikipedia.org/wiki/Collating_sequence}.  The
   \emph{Unicode Collation Algorithm}
   (\url{http://unicode.org/reports/tr10/}) is likely to be increasingly
-  influential.  Where available \R makes use of ICU
-  (\url{http://site.icu-project.org/} for collation.
+  influential.  Where available \R by default makes use of ICU
+  (\url{http://site.icu-project.org/}) for collation (except in a C
+  locale).
 }
 \seealso{
   \code{\link{factor}} for the behaviour with factor arguments.
 
   \code{\link{Syntax}} for operator precedence.
 
+  \code{\link{capabilities}} for whether ICU is available, and
   \code{\link{icuSetCollate}} to tune the string collation algorithm
-  when ICU is in use.
+  when it is.
 }
 \examples{
 x <- stats::rnorm(20)
@@ -144,7 +144,7 @@ identical(all.equal(x1, x2), TRUE) # TRUE everywhere
 z <- c(32:126, 160:255)
 x <- if(l10n_info()$MBCS) {
     intToUtf8(z, multiple = TRUE)
-} else rawToChar(as.raw(z), multiple= TRUE)
+} else rawToChar(as.raw(z), multiple = TRUE)
 ## by number
 writeLines(strwrap(paste(x, collapse=" "), width = 60))
 ## by locale collation
diff --git a/src/library/base/man/Constants.Rd b/src/library/base/man/Constants.Rd
index cfad927..a4e2954 100644
--- a/src/library/base/man/Constants.Rd
+++ b/src/library/base/man/Constants.Rd
@@ -1,5 +1,5 @@
 % File src/library/base/man/Constants.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2011 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/base/man/Control.Rd b/src/library/base/man/Control.Rd
index ee635d0..2cb22df 100644
--- a/src/library/base/man/Control.Rd
+++ b/src/library/base/man/Control.Rd
@@ -1,6 +1,6 @@
 % File src/library/base/man/Control.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2011 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2017 R Core Team
 % Distributed under GPL 2 or later
 
 \name{Control}
@@ -31,8 +31,10 @@ next
 }
 \arguments{
   \item{cond}{A length-one logical vector that is not \code{NA}.
-    Conditions of length greater than one are accepted with a warning, but
-    only the first element is used.  Other types are coerced to logical
+    Conditions of length greater than one are currently accepted with a
+    warning, but only the first element is used.  An error is signalled
+    instead when the environment variable \env{_R_CHECK_LENGTH_1_CONDITION_}
+    is set to true.  Other types are coerced to logical
     if possible, ignoring any class.
   }
   \item{var}{A syntactical name for a variable.}
diff --git a/src/library/base/man/Cstack_info.Rd b/src/library/base/man/Cstack_info.Rd
index 1419187..fa669a3 100644
--- a/src/library/base/man/Cstack_info.Rd
+++ b/src/library/base/man/Cstack_info.Rd
@@ -1,6 +1,6 @@
 % File src/library/base/man/Cstack_info.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2013 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2016 R Core Team
 % Distributed under GPL 2 or later
 
 \name{Cstack_info}
@@ -18,12 +18,13 @@ Cstack_info()
   unavailable, the \code{size} will be returned as \code{NA}, and
   stack-checking is not performed.
 
+  %% Reports in Feb 2016 that this is broken by 'musl' on Linux.
   The information on the stack base address is thought to be accurate on
-  Windows, Linux, OS X and FreeBSD but a heuristic is used on other
-  platforms.  Because this might be slightly inaccurate, the current
-  usage could be estimated as negative.  (The heuristic is not used on
-  embedded uses of \R on platforms where the stack base is not thought
-  to be accurate.)
+  Windows, Linux (using \code{glibc}), macOS and FreeBSD but a heuristic
+  is used on other platforms.  Because this might be slightly
+  inaccurate, the current usage could be estimated as negative.  (The
+  heuristic is not used on embedded uses of \R on platforms where the
+  stack base information is not thought to be accurate.)
 
   The \sQuote{evaluation depth} is the number of nested \R expressions
   currently under evaluation: this has a limit controlled by
diff --git a/src/library/base/man/DateTimeClasses.Rd b/src/library/base/man/DateTimeClasses.Rd
index fe15469..f209dac 100644
--- a/src/library/base/man/DateTimeClasses.Rd
+++ b/src/library/base/man/DateTimeClasses.Rd
@@ -1,6 +1,6 @@
 % File src/library/base/man/DateTimeClasses.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2014 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2016 R Core Team
 % Distributed under GPL 2 or later
 
 \name{DateTimeClasses}
@@ -53,7 +53,7 @@
   representing calendar dates and times.
 }
 \usage{
-\method{print}{POSIXct}(x, \dots)
+\method{print}{POSIXct}(x, tz = "", usetz = TRUE, \dots)
 
 \method{summary}{POSIXct}(object, digits = 15, \dots)
 
@@ -63,17 +63,18 @@
 \special{time1 lop time2}
 }
 \arguments{
-  \item{x, object}{An object to be printed or summarized from one of the
+  \item{x, object}{an object to be printed or summarized from one of the
     date-time classes.}
-  \item{digits}{Number of significant digits for the computations:
+  \item{tz, usetz}{for timezone formatting, passed to \code{\link{format.POSIXct}}.}
+  \item{digits}{number of significant digits for the computations:
     should be high enough to represent the least important time unit
     exactly.}
-  \item{\dots}{Further arguments to be passed from or to other methods.}
+  \item{\dots}{further arguments to be passed from or to other methods.}
   \item{time}{date-time objects}
   \item{time1, time2}{date-time objects or character vectors.  (Character
     vectors are converted by \code{\link{as.POSIXct}}.)}
   \item{z}{a numeric vector (in seconds)}
-  \item{lop}{One of \code{==}, \code{!=}, \code{<}, \code{<=}, \code{>}
+  \item{lop}{one of \code{==}, \code{!=}, \code{<}, \code{<=}, \code{>}
     or \code{>=}.}
 }
 \details{
@@ -101,7 +102,7 @@
   }
   (The last two components are not present for times in UTC and are
   platform-dependent: they are supported on platforms based on BSD or
-  \code{glibc} (including Linux and OS X) and those using the
+  \code{glibc} (including Linux and macOS) and those using the
   \code{tzcode} implementation shipped with \R (including Windows). But
   they are not necessarily set.).  Note that the internal list structure
   is somewhat hidden, as many methods (including
@@ -151,14 +152,16 @@
   attribute (e.g., by \code{c(x)}).
 
   Unfortunately, the conversion is complicated by the operation of time
-  zones and leap seconds (25 days have been 86401 seconds long so far:
-  the times of the extra seconds are in the object
-  \code{.leap.seconds}).  The details of this are entrusted to the OS
-  services where possible.  It seems that some rare systems used to use
-  leap seconds, but all known current platforms ignore them (as required
-  by POSIX).  This is detected and corrected for at build time, so
-  \code{"POSIXct"} times used by \R do not include leap seconds on any
-  platform.
+  zones and leap seconds (according to this version of \R's data,
+  \Sexpr{length(.leap.seconds)} days have been 86401 seconds long so
+  far, the last being on (actually, immediately before)
+  \Sexpr{format(as.Date(utils::tail(.leap.seconds, 1)))}: the times of the
+  extra seconds are in the object \code{.leap.seconds}).  The details of
+  this are entrusted to the OS services where possible.  It seems that
+  some rare systems used to use leap seconds, but all known current
+  platforms ignore them (as required by POSIX).  This is detected and
+  corrected for at build time, so \code{"POSIXct"} times used by \R do
+  not include leap seconds on any platform.
 
   Using \code{\link{c}} on \code{"POSIXlt"} objects converts them to the
   current time zone, and on \code{"POSIXct"} objects drops any
@@ -193,7 +196,7 @@
   to billions of years), but such times can only be interpreted with
   reference to a time zone.
 
-  % http://www.timeanddate.com/calendar/julian-gregorian-switch.html
+  % https://www.timeanddate.com/calendar/julian-gregorian-switch.html
   The concept of time zones was first adopted in the nineteenth century,
   and the Gregorian calendar was introduced in 1582 but not universally
   adopted until 1927.  OS services almost invariably assume the
@@ -203,7 +206,7 @@
   OSes assume the previous use of \sQuote{local time} based on the
   longitude of a location within the time zone.
   % from the Olson files.
-  
+
   Most operating systems represent \code{POSIXct} times as C type
   \code{long}. This means that on 32-bit OSes this covers the period
   1902 to 2037.  On all known 64-bit platforms and for the code we use
@@ -228,7 +231,7 @@
   There is no reason to suppose that the DST rules will remain the same
   in the future, and indeed the US legislated in 2005 to change its
   rules as from 2007, with a possible future reversion.  So conversions
-  for times more than a year or two ahead are speculative.  
+  for times more than a year or two ahead are speculative.
 }
 \seealso{
   \link{Dates} for dates without times.
@@ -252,7 +255,7 @@
 \references{
   Ripley, B. D. and Hornik, K. (2001) Date-time classes. \emph{R News},
   \bold{1/2}, 8--11.
-  \url{http://www.r-project.org/doc/Rnews/Rnews_2001-2.pdf}
+  \url{https://www.r-project.org/doc/Rnews/Rnews_2001-2.pdf}
 }
 
 \section{Warnings}{
@@ -266,6 +269,10 @@
   Not only are components and attributes optional; several components
   may have values meaning \sQuote{not yet determined} and the same time
   represented in different time zones will look quite different.
+
+  Currently the \emph{order} of the list components of \code{"POSIXlt"}
+  objects must not be changed, as several C-based conversion methods
+  rely on the order for efficiency.
 }
 \examples{\donttest{% <-->  may fail on platforms wrongly set up
 (z <- Sys.time())             # the current date, as class "POSIXct"
diff --git a/src/library/base/man/Dates.Rd b/src/library/base/man/Dates.Rd
index 0fb97c2..a8908be 100644
--- a/src/library/base/man/Dates.Rd
+++ b/src/library/base/man/Dates.Rd
@@ -1,6 +1,6 @@
 % File src/library/base/man/Dates.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2007 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2014 R Core Team
 % Distributed under GPL 2 or later
 
 \name{Dates}
diff --git a/src/library/base/man/Defunct.Rd b/src/library/base/man/Defunct.Rd
index 55a2a52..721b83c 100644
--- a/src/library/base/man/Defunct.Rd
+++ b/src/library/base/man/Defunct.Rd
@@ -1,5 +1,5 @@
 % File src/library/base/man/Defunct.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2007 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/base/man/Deprecated.Rd b/src/library/base/man/Deprecated.Rd
index 5296f12..1bb7d61 100644
--- a/src/library/base/man/Deprecated.Rd
+++ b/src/library/base/man/Deprecated.Rd
@@ -1,5 +1,5 @@
 % File src/library/base/man/Deprecated.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2012 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/base/man/Encoding.Rd b/src/library/base/man/Encoding.Rd
index a274023..c604929 100644
--- a/src/library/base/man/Encoding.Rd
+++ b/src/library/base/man/Encoding.Rd
@@ -1,6 +1,6 @@
 % File src/library/base/man/Encoding.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2014 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2015 R Core Team
 % Distributed under GPL 2 or later
 
 \name{Encoding}
@@ -36,7 +36,8 @@ enc2utf8(x)
   encoding, since their representation is the same in all supported
   encodings.  Strings marked as \code{"bytes"} are intended to be
   non-ASCII strings which should be manipulated as bytes, and never
-  converted to a character encoding.
+  converted to a character encoding (so writing them to a text file is
+  not supported). % non-bug report PR#16327
 
   \code{enc2native} and \code{enc2utf8} convert elements of character
   vectors to the native encoding or UTF-8 respectively, taking any
diff --git a/src/library/base/man/EnvVar.Rd b/src/library/base/man/EnvVar.Rd
index c2b64f3..8aeb844 100644
--- a/src/library/base/man/EnvVar.Rd
+++ b/src/library/base/man/EnvVar.Rd
@@ -1,10 +1,8 @@
 % File src/library/base/man/EnvVar.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 2007-2014 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 2007-2017 R Core Team
 % Distributed under GPL 2 or later
 
-\newcommand{\sspace}{\ifelse{latex}{\out{~}}{ }}
-
 \name{EnvVar}
 \alias{environment variables}
 \alias{HOME}
@@ -19,6 +17,7 @@
 \alias{R_INCLUDE_DIR}
 \alias{MAKEINDEX}
 \alias{R_PAPERSIZE}
+\alias{R_PCRE_JIT_STACK_MAXSIZE}
 \alias{R_PDFVIEWER}
 \alias{R_PLATFORM}
 \alias{R_RD4PDF}
@@ -73,7 +72,7 @@
     \item{\env{R_BROWSER}:}{The path to the default browser.  Used to
       set the default value of \code{\link{options}("browser")}.}
     \item{\env{R_COMPLETION}:}{Optional.  If set to \code{FALSE},
-      command-line completion is not used.  (Not used by OS X GUI.)}
+      command-line completion is not used.  (Not used by the macOS GUI.)}
     \item{\env{R_DEFAULT_PACKAGES}:}{A comma-separated list of packages
       which are to be attached in every session.  See \code{\link{options}}.}
     \item{\env{R_DOC_DIR}:}{The location of the \R \file{doc}
@@ -115,6 +114,8 @@
     \item{\env{R_PAPERSIZE}:}{Optional.  Used to set the default for
       \code{\link{options}("papersize")}, e.g.\sspace{}used by
       \code{\link{pdf}} and \code{\link{postscript}}.}
+    \item{\env{R_PCRE_JIT_STACK_MAXSIZE}:}{Optional.  Consulted when
+      PCRE's JIT pattern compiler is first used.  See \code{\link{grep}}.}
     \item{\env{R_PDFVIEWER}:}{The path to the default PDF viewer.  Used
       by \command{R CMD Rd2pdf}.}
     \item{\env{R_PLATFORM}:}{The platform -- a string of the form
diff --git a/src/library/base/man/Extract.Rd b/src/library/base/man/Extract.Rd
index b469efe..37eec7d 100644
--- a/src/library/base/man/Extract.Rd
+++ b/src/library/base/man/Extract.Rd
@@ -1,11 +1,9 @@
 % File src/library/base/man/Extract.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2014 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2016 R Core Team
 % Copyright 2002-2012 The R Foundation
 % Distributed under GPL 2 or later
 
-\newcommand{\sspace}{\ifelse{latex}{\out{~}}{ }}
-
 \name{Extract}
 \title{Extract or Replace Parts of an Object}
 \alias{Extract}
@@ -13,6 +11,7 @@
 \alias{[}
 \alias{[.listof}
 \alias{[.simple.list}
+\alias{[.Dlist}
 \alias{[[}
 \alias{$}
 \alias{getElement}
@@ -37,7 +36,7 @@ getElement(object, name)
 x[i] <- value
 x[i, j, \dots] <- value
 x[[i]] <- value
-x$i <- value
+x$name <- value
 }
 
 \arguments{
@@ -311,7 +310,7 @@ x$i <- 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{http://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/Extract.data.frame.Rd b/src/library/base/man/Extract.data.frame.Rd
index c5ff024..6e0371a 100644
--- a/src/library/base/man/Extract.data.frame.Rd
+++ b/src/library/base/man/Extract.data.frame.Rd
@@ -1,6 +1,6 @@
 % File src/library/base/man/Extract.data.frame.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2013 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2016 R Core Team
 % Distributed under GPL 2 or later
 
 \name{Extract.data.frame}
@@ -177,9 +177,10 @@ try(sw[, "Ferti"]) # column names must match exactly
 stopifnot(identical(sw[, 1], sw[[1]]),
           identical(sw[, 1][1], 80.2),
           identical(sw[, 1, drop = FALSE], sw[1]),
-          is.data.frame(sw[1]), dim(sw[1] ) == c(5,1),
-          is.data.frame(sw[1,]), dim(sw[1,]) == c(1,4),
+          is.data.frame(sw[1 ]), dim(sw[1 ]) == c(5, 1),
+          is.data.frame(sw[1,]), dim(sw[1,]) == c(1, 4),
           is.list(s1 <- sw[1, , drop = TRUE]), identical(s1$Fertility, 80.2))
+tools::assertError(sw[, "Ferti"])
 }
 swiss[ c(1, 1:2), ]   # duplicate row, unique row names are created
 
@@ -199,15 +200,19 @@ sw[6:8] <- list(letters[10:14], NULL, aa = 1:5)
 sw
 
 ## matrices in a data frame
-A <- data.frame(x = 1:3, y = I(matrix(4:6)), z = I(matrix(letters[1:9], 3, 3)))
+A <- data.frame(x = 1:3, y = I(matrix(4:9, 3, 2)),
+                         z = I(matrix(letters[1:9], 3, 3)))
 A[1:3, "y"] # a matrix
 A[1:3, "z"] # a matrix
 A[, "y"]    # a matrix
+stopifnot(identical(colnames(A), c("x", "y", "z")), ncol(A) == 3L,
+          identical(A[,"y"], A[1:3, "y"]),
+          inherits (A[,"y"], "AsIs"))
 
 ## keeping special attributes: use a class with a
-## "as.data.frame" and "[" method:
-% "avector" := vector that keeps attributes and we could provide a constructor
-%  avector <- function(x) { class(x) <- c("avector", class(x)); x }
+## "as.data.frame" and "[" method;
+## "avector" := vector that keeps attributes.   Could provide a constructor
+##  avector <- function(x) { class(x) <- c("avector", class(x)); x }
 as.data.frame.avector <- as.data.frame.vector
 
 `[.avector` <- function(x,i,...) {
diff --git a/src/library/base/man/Extract.factor.Rd b/src/library/base/man/Extract.factor.Rd
index c89650a..aaf77a3 100644
--- a/src/library/base/man/Extract.factor.Rd
+++ b/src/library/base/man/Extract.factor.Rd
@@ -1,5 +1,5 @@
 % File src/library/base/man/Extract.factor.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2010 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/base/man/Extremes.Rd b/src/library/base/man/Extremes.Rd
index 466e22f..63d01b1 100644
--- a/src/library/base/man/Extremes.Rd
+++ b/src/library/base/man/Extremes.Rd
@@ -1,18 +1,24 @@
 % File src/library/base/man/Extremes.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2013 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2016 R Core Team
 % Distributed under GPL 2 or later
 
 \name{Extremes}
+\title{Maxima and Minima}
 \alias{max}
 \alias{min}
 \alias{pmax}
 \alias{pmin}
 \alias{pmax.int}
 \alias{pmin.int}
-\title{Maxima and Minima}
 \description{
-  Returns the (parallel) maxima and minima of the input values.
+  Returns the (regular or \bold{p}arallel) maxima and minima of the
+  input values.
+
+  \code{pmax*()} and \code{pmin*()} take one or more vectors as
+  arguments, recycle them to common length and return a single vector
+  giving the \emph{\sQuote{parallel}} maxima (or minima) of the argument
+  vectors.
 }
 \usage{
 max(\dots, na.rm = FALSE)
@@ -56,7 +62,8 @@ pmin.int(\dots, na.rm = FALSE)
   elements of all the arguments and so on.  Shorter inputs (of non-zero
   length) are recycled if necessary.  Attributes (see
   \code{\link{attributes}}: such as \code{\link{names}} or
-  \code{\link{dim}}) are copied from the first argument (if applicable).
+  \code{\link{dim}}) are copied from the first argument (if applicable,
+  e.g., \emph{not} for an \code{S4} object).
 
   \code{pmax.int} and \code{pmin.int} are faster internal versions only
   used when all arguments are atomic vectors and there are no classes:
@@ -110,9 +117,9 @@ pmin.int(\dots, na.rm = FALSE)
   and logical (coerced to integer).  For historical reasons, \code{NULL}
   is accepted as equivalent to \code{integer(0)}.% PR#1283
 
-  \code{pmax} and \code{pmin} will also work on classed objects with
-  appropriate methods for comparison, \code{is.na} and \code{rep} (if
-  recycling of arguments is needed).
+  \code{pmax} and \code{pmin} will also work on classed S3 or S4 objects
+  with appropriate methods for comparison, \code{is.na} and \code{rep}
+  (if recycling of arguments is needed).
 }
 \seealso{
   \code{\link{range}} (\emph{both} min and max) and
diff --git a/src/library/base/man/Foreign-internal.Rd b/src/library/base/man/Foreign-internal.Rd
index c5ee22d..0931683 100644
--- a/src/library/base/man/Foreign-internal.Rd
+++ b/src/library/base/man/Foreign-internal.Rd
@@ -1,5 +1,5 @@
 % File src/library/base/man/Foreign-internal.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2012 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/base/man/Foreign.Rd b/src/library/base/man/Foreign.Rd
index f0f58b1..df3916b 100644
--- a/src/library/base/man/Foreign.Rd
+++ b/src/library/base/man/Foreign.Rd
@@ -1,5 +1,5 @@
 % File src/library/base/man/Foreign.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2014 R Core Team
 % Distributed under GPL 2 or later
 
@@ -25,8 +25,6 @@
     \code{\link{NaN}} or \code{\link{Inf}} values in the arguments are
     passed on to the foreign function.  If \code{FALSE}, the presence of
     \code{NA} or \code{NaN} or \code{Inf} values is regarded as an error.}
-  \item{DUP}{if \code{TRUE} then arguments are duplicated if necessary
-    before their addresses are passed to C or Fortran.}
   \item{PACKAGE}{if supplied, confine the search for a character string
     \code{.NAME} to the DLL given by this argument (plus the
     conventional extension, \file{.so}, \file{.dll}, \dots).
@@ -35,7 +33,7 @@
     using this argument that no other package can override their external
     symbols, and also speeds up the search (see \sQuote{Note}).}
 
-  \item{ENCODING}{For back-compatibility, accepted but ignored.}
+  \item{DUP, ENCODING}{For back-compatibility, accepted but ignored.}
 }
 
 \details{
@@ -119,40 +117,6 @@
   environments are now deprecated.
 }
 
-\section{Warning}{
-  \code{DUP = FALSE} \emph{is dangerous}.  It was deprecated in \R 3.1.0
-  and will be disabled in \R 3.2.0.
-
-  People concerned about performance and especially memory usage are
-  strongly recommended to use the \code{\link{.Call}} interface instead
-  of these interfaces.
-
-  If you pass a local variable to \code{.C}/\code{.Fortran} with
-  \code{DUP = FALSE}, your compiled code can alter the local variable and
-  not just the copy in the return list.  Worse, if you pass a local
-  variable that is a formal parameter of the calling function, you may
-  be able to change not only the local variable but the variable one
-  level up.  This will be very hard to trace.
-
-  With \code{DUP = FALSE}, character vectors cannot be used, and single
-  precision values will not be returned.
-
-  It is safe to set \code{DUP = FALSE} provided you do not change any of
-  the variables that might be affected, e.g.,
-
-  \code{.C("Cfunction", input = x, output = numeric(10))}.
-
-  In this case the \code{output} variable did not exist before the call
-  so is not copied (even with \code{DUP = TRUE}).  \emph{If} the
-  \code{input} variable is not changed in the C code of \code{Cfunction}
-  you would be safe.  Unfortunately, there is no automated check that
-  the C function does not change its argument, and authors have
-  frequently done so without realizing it.
-
-  In recent versions of \R most unnecessary copying is avoided: on the
-  other hand using \code{DUP = FALSE} can omit \emph{necessary} copying.
-}
-
 \section{Fortran symbol names}{
   All Fortran compilers known to be usable to compile \R map symbol names
   to lower case, and so does \code{.Fortran}.
@@ -174,9 +138,9 @@
 
 \section{Copying of arguments}{
   Character vectors are copied before calling the compiled code and to
-  collect the results.  For \code{DUP = TRUE} and other atomic vectors,
-  the argument is copied before calling the compiled code if it is
-  otherwise used in the calling code.
+  collect the results.  For other atomic vectors the argument is copied
+  before calling the compiled code if it is otherwise used in the
+  calling code.
 
   Non-atomic-vector objects are read-only to the C code and are never
   copied.
diff --git a/src/library/base/man/Hyperbolic.Rd b/src/library/base/man/Hyperbolic.Rd
index 8caeb5c..a5e1645 100644
--- a/src/library/base/man/Hyperbolic.Rd
+++ b/src/library/base/man/Hyperbolic.Rd
@@ -1,5 +1,5 @@
 % File src/library/base/man/Hyperbolic.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2011 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/base/man/ISOdatetime.Rd b/src/library/base/man/ISOdatetime.Rd
index d77786d..eefaa3d 100644
--- a/src/library/base/man/ISOdatetime.Rd
+++ b/src/library/base/man/ISOdatetime.Rd
@@ -1,5 +1,5 @@
 % File src/library/base/man/ISOdatetime.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2014 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/base/man/Internal.Rd b/src/library/base/man/Internal.Rd
index 0bcf729..8c0e32d 100644
--- a/src/library/base/man/Internal.Rd
+++ b/src/library/base/man/Internal.Rd
@@ -1,5 +1,5 @@
 % File src/library/base/man/Internal.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2007 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/base/man/InternalMethods.Rd b/src/library/base/man/InternalMethods.Rd
index 6c610c2..75211e4 100644
--- a/src/library/base/man/InternalMethods.Rd
+++ b/src/library/base/man/InternalMethods.Rd
@@ -1,6 +1,6 @@
 % File src/library/base/man/zMethods.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2007 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2015 R Core Team
 % Distributed under GPL 2 or later
 
 \name{InternalMethods}
@@ -59,8 +59,11 @@
   (which dispatches methods for \code{"seq"})%       [seq.c]
   and \code{\link{xtfrm}}%                           [sort.c]
 
-  In addition, \code{is.name} is a synonym for \code{is.symbol} and
-  dispatches methods for the latter.
+  In addition, \code{is.name} is a synonym for \code{\link{is.symbol}} and
+  dispatches methods for the latter.  Similarly, \code{\link{as.numeric}}
+  is a synonym for \code{as.double} and dispatches methods for the
+  latter, i.e., S3 methods are for \code{as.double}, whereas S4 methods
+  are to be written for \code{as.numeric}.
 
   Note that all of the \link{group generic} functions are also
   internal/primitive and allow methods to be written for them.
diff --git a/src/library/base/man/La_library.Rd b/src/library/base/man/La_library.Rd
new file mode 100644
index 0000000..816664c
--- /dev/null
+++ b/src/library/base/man/La_library.Rd
@@ -0,0 +1,38 @@
+% File src/library/base/man/La_library.Rd
+% Part of the R package, https://www.R-project.org
+% Copyright 2013-2017 R Core Team
+% Distributed under GPL 2 or later
+
+\name{La_library}
+\alias{La_library}
+\title{
+  LAPACK Library
+}
+\description{
+  Report the name of the shared object file with \code{LAPACK} implementation
+  in use.
+}
+\usage{
+La_library()
+}
+\value{
+  A character vector of length one (\code{""} when the name is not known).
+  The value can be used as an indication of which \code{LAPACK}
+  implementation is in use.  Typically, the \R version of \code{LAPACK} will
+  appear as \code{libRlapack.so} (\code{libRlapack.dylib}), depending on how
+  R was built.  Note that \code{libRlapack.so} (\code{libRlapack.dylib}) may
+  also be shown for an external \code{LAPACK} implementation that had been
+  copied, hard-linked or renamed by the system administrator.  Otherwise,
+  the shared object file will be given and its path/name may indicate
+  the vendor/version.  The detection does not work on Windows.
+}
+\seealso{
+  \code{\link{extSoftVersion}} for versions of other third-party software
+  including \code{BLAS}.
+
+  \code{\link{La_version}} for the version of LAPACK in use.
+}
+\examples{
+La_library()
+}
+\keyword{utilities}
diff --git a/src/library/base/man/La_version.Rd b/src/library/base/man/La_version.Rd
index ac77932..877613d 100644
--- a/src/library/base/man/La_version.Rd
+++ b/src/library/base/man/La_version.Rd
@@ -1,12 +1,12 @@
 % File src/library/base/man/La_version.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 2013 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 2013-2014 R Core Team
 % Distributed under GPL 2 or later
 
 \name{La_version}
 \alias{La_version}
 \title{
-  LAPACK version
+  LAPACK Version
 }
 \description{
   Report the version of LAPACK in use.
@@ -17,6 +17,11 @@ La_version()
 \value{
   A character vector of length one.
 }
+\seealso{
+  \code{\link{extSoftVersion}} for versions of other third-party software.
+
+  \code{\link{La_library}} for binary/executable file with LAPACK in use.
+}
 \examples{
 La_version()
 }
diff --git a/src/library/base/man/Last.value.Rd b/src/library/base/man/Last.value.Rd
index 7903d22..cd9edec 100644
--- a/src/library/base/man/Last.value.Rd
+++ b/src/library/base/man/Last.value.Rd
@@ -1,5 +1,5 @@
 % File src/library/base/man/Last.value.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2007 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/base/man/Log.Rd b/src/library/base/man/Log.Rd
index ad3c1b4..184ec3d 100644
--- a/src/library/base/man/Log.Rd
+++ b/src/library/base/man/Log.Rd
@@ -1,5 +1,5 @@
 % File src/library/base/man/Log.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2013 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/base/man/Logic.Rd b/src/library/base/man/Logic.Rd
index 90f36f3..bb18f2f 100644
--- a/src/library/base/man/Logic.Rd
+++ b/src/library/base/man/Logic.Rd
@@ -1,5 +1,5 @@
 % File src/library/base/man/Logic.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2014 R Core Team
 % Distributed under GPL 2 or later
 
@@ -78,8 +78,9 @@ isTRUE(x)
   length as \code{x}: names, dims and dimnames are copied from \code{x},
   and all other attributes (including class) if no coercion is done.
 
-  For \code{|}, \code{&} and \code{xor} a logical or raw vector. The
-  elements of shorter vectors are recycled as necessary (with a
+  For \code{|}, \code{&} and \code{xor} a logical or raw vector.  If
+  involving a zero-length vector the result has length zero.  Otherwise,
+  the elements of shorter vectors are recycled as necessary (with a
   \code{\link{warning}} when they are recycled only \emph{fractionally}).
   The rules for determining the attributes of the result are rather
   complicated.  Most attributes are taken from the longer argument, the
@@ -99,9 +100,9 @@ isTRUE(x)
   hence methods need argument names \code{e1, e2}).
 }
 \note{
-  The elementwise operators are sometimes called as functions as e.g.
-  \code{`&`(x, y)}: see the description of how argument-matching is done
-  in \code{\link[base]{Ops}}.
+  The elementwise operators are sometimes called as functions as
+  e.g.\sspace{}\code{`&`(x, y)}: see the description of how
+  argument-matching is done in \code{\link[base]{Ops}}.
 }
 \references{
   Becker, R. A., Chambers, J. M. and Wilks, A. R. (1988)
diff --git a/src/library/base/man/LongVectors.Rd b/src/library/base/man/LongVectors.Rd
index 72881ea..4586b46 100644
--- a/src/library/base/man/LongVectors.Rd
+++ b/src/library/base/man/LongVectors.Rd
@@ -1,10 +1,8 @@
 % File src/library/base/man/Constants.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 2012 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 2012-2014 R Core Team
 % Distributed under GPL 2 or later
 
-\newcommand{\sspace}{\ifelse{latex}{\out{~}}{ }}
-
 \name{LongVectors}
 \alias{long vector}
 \alias{long vectors}
diff --git a/src/library/base/man/MathFun.Rd b/src/library/base/man/MathFun.Rd
index e50e3c9..93d2606 100644
--- a/src/library/base/man/MathFun.Rd
+++ b/src/library/base/man/MathFun.Rd
@@ -1,5 +1,5 @@
 % File src/library/base/man/Math.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2012 R Core Team
 % Copyright 2002-2012 The R Foundation
 % Distributed under GPL 2 or later
diff --git a/src/library/base/man/Memory-limits.Rd b/src/library/base/man/Memory-limits.Rd
index b11c847..c6c9df1 100644
--- a/src/library/base/man/Memory-limits.Rd
+++ b/src/library/base/man/Memory-limits.Rd
@@ -1,6 +1,6 @@
 % File src/library/base/man/Memory-limits.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2013 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2014 R Core Team
 % Distributed under GPL 2 or later
 
 \name{Memory-limits}
@@ -15,7 +15,7 @@
 }
 \details{
   Currently \R runs on 32- and 64-bit operating systems, and most 64-bit
-  OSes (including Linux, Solaris, Windows and OS X) can run either
+  OSes (including Linux, Solaris, Windows and macOS) can run either
   32- or 64-bit builds of \R.  The memory limits depends mainly on the
   build, but for a 32-bit build of \R on Windows they also depend on the
   underlying OS version.
@@ -69,9 +69,9 @@ limit vmemoryuse 4096m
 \section{Windows}{
   The address-space limit is 2Gb under 32-bit Windows unless the OS's
   default has been changed to allow more (up to 3Gb).  See
-  \url{http://www.microsoft.com/whdc/system/platform/server/PAE/PAEmem.mspx}
+  \url{https://www.microsoft.com/whdc/system/platform/server/PAE/PAEmem.mspx}
   and
-  \url{http://msdn.microsoft.com/en-us/library/bb613473(VS.85).aspx}.
+  \url{https://msdn.microsoft.com/en-us/library/bb613473(VS.85).aspx}.
   Under most 64-bit versions of Windows the limit for a 32-bit build
   of \R is 4Gb: for the oldest ones it is 2Gb.  The limit for a 64-bit
   build of \R (imposed by the OS) is 8Tb.
diff --git a/src/library/base/man/Memory.Rd b/src/library/base/man/Memory.Rd
index 82502d9..824e93b 100644
--- a/src/library/base/man/Memory.Rd
+++ b/src/library/base/man/Memory.Rd
@@ -1,6 +1,6 @@
 % File src/library/base/man/Memory.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2013 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2015 R Core Team
 % Distributed under GPL 2 or later
 
 \name{Memory}
@@ -31,12 +31,12 @@
   bytes on a 64-bit build.
 
   The default values are (currently) an initial setting of 350k cons
-  cell sand 6Mb of vector heap.  Note that the areas are not actually
+  cells and 6Mb of vector heap.  Note that the areas are not actually
   allocated initially: rather these values are the sizes for triggering
   garbage collection.  These values can be set by the command line
   options \option{--min-nsize} and \option{--min-vsize} (or if they are
   not used, the environment variables \env{R_NSIZE} and \env{R_VSIZE})
-  when \R is started. Thereafter \R will grow or shrink the areas
+  when \R is started.  Thereafter \R will grow or shrink the areas
   depending on usage, never decreasing below the initial values.
 
   How much time \R spends in the garbage collector will depend on these
diff --git a/src/library/base/man/NA.Rd b/src/library/base/man/NA.Rd
index bf7340e..eec2b94 100644
--- a/src/library/base/man/NA.Rd
+++ b/src/library/base/man/NA.Rd
@@ -1,6 +1,6 @@
 % File src/library/base/man/NA.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2014 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2017 R Core Team
 % Distributed under GPL 2 or later
 
 \name{NA}
@@ -34,7 +34,7 @@
 \usage{
 NA
 is.na(x)
-anyNA(x)
+anyNA(x, recursive = FALSE)
 
 \method{is.na}{data.frame}(x)
 
@@ -44,6 +44,8 @@ is.na(x) <- value
   \item{x}{an \R object to be tested: the default method for
     \code{is.na} handles atomic vectors, lists and pairlists: that for
     \code{anyNA} also handles \code{NULL}.}
+  \item{recursive}{logical: should \code{anyNA} be applied recursively
+    to lists and pairlists?}
   \item{value}{a suitable index vector for use with \code{x}.}
 }
 
@@ -60,15 +62,16 @@ is.na(x) <- value
   Function \code{is.na<-} may provide a safer way to set missingness.
   It behaves differently for factors, for example.
 
-  Numerical computations using \code{NA} will normally result in \code{NA}: a
-  possible exception is where \code{\link{NaN}} is also involved, in
-  which case either might result.  Logical computations treat \code{NA}
-  as a missing \code{TRUE/FALSE} value, and so may return \code{TRUE} or 
-  \code{FALSE} if the expression does not depend on the \code{NA} operand.
+  Numerical computations using \code{NA} will normally result in
+  \code{NA}: a possible exception is where \code{\link{NaN}} is also
+  involved, in which case either might result (which may depend on
+  the \R platform).  Logical computations treat \code{NA} as a missing
+  \code{TRUE/FALSE} value, and so may return \code{TRUE} or \code{FALSE}
+  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
-  classes and on lists and pairlists.
+  classes and for \code{recursive = FALSE}, on lists and pairlists.
 }
 \value{
   The default method for \code{is.na} applied to an atomic vector
@@ -85,7 +88,9 @@ is.na(x) <- value
   is a length-one atomic vector and the single element of that vector is
   regarded as \code{NA} or \code{NaN} (note that any \code{is.na}
   method for the class of the element is ignored).\cr
-  For these types \code{anyNA} calls \code{is.na}.
+  \code{anyNA(recursive = FALSE)} works the same way as \code{is.na};
+  \code{anyNA(recursive = TRUE)} applies \code{anyNA} (with method
+  dispatch) to each element.
 
   The data frame method for \code{is.na} returns a logical matrix
   with the same dimensions as the data frame, and with dimnames taken
@@ -136,6 +141,12 @@ if(require("microbenchmark")) { # does not work reliably on all platforms
 }
 }
 
+## anyNA() can work recursively with list()s:
+LL <- list(1:5, c(NA, 5:8), c("A","NA"), c("a", NA_character_))
+L2 <- LL[c(1,3)]
+sapply(LL, anyNA); c(anyNA(LL), anyNA(LL, TRUE))
+sapply(L2, anyNA); c(anyNA(L2), anyNA(L2, TRUE))
+
 ## ... lists, and hence data frames, too:
 dN <- dd <- USJudgeRatings; dN[3,6] <- NA
 anyNA(dd) # FALSE
diff --git a/src/library/base/man/NULL.Rd b/src/library/base/man/NULL.Rd
index de9badb..b2090f3 100644
--- a/src/library/base/man/NULL.Rd
+++ b/src/library/base/man/NULL.Rd
@@ -1,6 +1,6 @@
 % File src/library/base/man/NULL.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2012 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2017 R Core Team
 % Distributed under GPL 2 or later
 
 \name{NULL}
@@ -18,11 +18,6 @@ is.null(x)
   \code{NULL} represents the null object in \R: it is a \link{reserved}
   word.  \code{NULL} is often returned by expressions and functions
   whose value is undefined.
-
-  \code{as.null} ignores its argument and returns the value \code{NULL}.
-
-  \code{is.null} returns \code{TRUE} if its argument
-  is \code{NULL} and \code{FALSE} otherwise.
 }
 \arguments{
   \item{x}{an object to be tested or coerced.}
@@ -30,12 +25,19 @@ is.null(x)
 }
 \details{
   \code{NULL} can be indexed (see \link{Extract}) in just about any
-  syntactically legal way: whether is makes sense or not, the result is
+  syntactically legal way: whether it makes sense or not, the result is
   always \code{NULL}.  Objects with value \code{NULL} can be changed by
   replacement operators and will be coerced to the type of the
   right-hand side.
 
-  \code{NULL} is also used as the empty \link{pairlist}.
+  \code{NULL} is also used as the empty \link{pairlist}: see the
+  examples. Because pairlists are often promoted to lists, you may
+  encounter \code{NULL} being promoted to an empty list.
+
+  Objects with value \code{NULL} cannot have attributes as there is only
+  one null object: attempts to assign them are either an error
+  (\code{\link{attr}}) or promote the object to an empty list with
+  attribute(s) (\code{\link{attributes}} and \code{\link{structure}}).
 }
 \note{
   \code{is.null} is a \link{primitive} function.
@@ -45,8 +47,15 @@ is.null(x)
   \emph{The New S Language}.
   Wadsworth & Brooks/Cole.
 }
+\value{
+  \code{as.null} ignores its argument and returns \code{NULL}.
+
+  \code{is.null} returns \code{TRUE} if its argument's value
+  is \code{NULL} and \code{FALSE} otherwise.
+}
 \examples{
 is.null(list())     # FALSE (on purpose!)
+is.null(pairlist()) # TRUE
 is.null(integer(0)) # FALSE
 is.null(logical(0)) # FALSE
 as.null(list(a = 1, b = "c"))
diff --git a/src/library/base/man/NumericConstants.Rd b/src/library/base/man/NumericConstants.Rd
index 5c7467c..ad891e0 100644
--- a/src/library/base/man/NumericConstants.Rd
+++ b/src/library/base/man/NumericConstants.Rd
@@ -1,6 +1,6 @@
 % File src/library/base/man/NumericConstants.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2012 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2015 R Core Team
 % Distributed under GPL 2 or later
 
 \name{NumericConstants}
@@ -67,14 +67,40 @@
   effect can be expected to be the same on all platforms implementing
   full IEC 600559 arithmetic (the most likely area of difference being
   the handling of numbers less than \code{\link{.Machine}$double.xmin}).
-  The same code is used by \code{\link{scan}}.  } \seealso{
+  The same code is used by \code{\link{scan}}.
+}
+\seealso{
   \code{\link{Syntax}}.
-
+  For complex numbers, see \code{\link{complex}}.
   \code{\link{Quotes}} for the parsing of character constants,
+  \code{\link{Reserved}} for the \dQuote{reserved words} in \R{}.
 }
 \examples{
+## You can create numbers using fixed or scientific formatting.
 2.1
+2.1e10
+-2.1E-10
+
+## The resulting objects have class numeric and type double.
+class(2.1)
+typeof(2.1)
+
+## This holds even if what you typed looked like an integer.
+class(2)
 typeof(2)
+
+## If you actually wanted integers, use an "L" suffix.
+class(2L)
+typeof(2L)
+
+## These are equal but not identical
+2 == 2L
+identical(2, 2L)
+
+## You can write numbers between 0 and 1 without a leading "0"
+## (but typically this makes code harder to read)
+.1234
+
 sqrt(1i) # remember elementary math?
 utils::str(0xA0)
 identical(1L, as.integer(1))
diff --git a/src/library/base/man/Ops.Date.Rd b/src/library/base/man/Ops.Date.Rd
index 86fe93e..f8a4b9f 100644
--- a/src/library/base/man/Ops.Date.Rd
+++ b/src/library/base/man/Ops.Date.Rd
@@ -1,5 +1,5 @@
 % File src/library/base/man/Ops.Date.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2009 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/base/man/Paren.Rd b/src/library/base/man/Paren.Rd
index 7bfeef7..c95242f 100644
--- a/src/library/base/man/Paren.Rd
+++ b/src/library/base/man/Paren.Rd
@@ -1,5 +1,5 @@
 % File src/library/base/man/Paren.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2008 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/base/man/Platform.Rd b/src/library/base/man/Platform.Rd
index a249fbf..eaa495d 100644
--- a/src/library/base/man/Platform.Rd
+++ b/src/library/base/man/Platform.Rd
@@ -1,10 +1,8 @@
 % File src/library/base/man/Platform.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2014 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2017 R Core Team
 % Distributed under GPL 2 or later
 
-\newcommand{\sspace}{\ifelse{latex}{\out{~}}{ }}
-
 \name{.Platform}
 \title{Platform Specific Variables}
 \usage{
@@ -32,28 +30,29 @@
     character string, giving the file name \bold{ext}ension of
     \bold{dyn}amically loadable \bold{lib}raries, e.g., \code{".dll"} on
     Windows and \code{".so"} or \code{".sl"} on Unix-alikes.  (Note for
-    OS X users: these are shared objects as loaded by
+    macOS users: these are shared objects as loaded by
     \code{\link{dyn.load}} and not dylibs: see \code{\link{dyn.load}}.)
   }
   \item{GUI}{
     character string, giving the type of GUI in use, or \code{"unknown"}
     if no GUI can be assumed.  Possible values are for Unix-alikes the
     values given via the \option{-g} command-line flag (\code{"X11"},
-    \code{"Tk"}), \code{"AQUA"} (running under \code{R.app} on OS X),
+    \code{"Tk"}), \code{"AQUA"} (running under \code{R.app} on macOS),
     \code{"Rgui"} and \code{"RTerm"} (Windows) and perhaps others under
     alternative front-ends or embedded \R.
   }
   \item{endian}{
     character string, \code{"big"} or \code{"little"}, giving the
-    endianness of the processor in use.  This is relevant when it is
-    necessary to know the order to read/write bytes of e.g.\sspace{}an integer or
-    double from/to a \link{connection}: see \code{\link{readBin}}.
+    \sQuote{endianness} of the processor in use.  This is relevant when it is
+    necessary to know the order to read/write bytes of e.g.\sspace{}an
+    integer or double from/to a \link{connection}: see
+    \code{\link{readBin}}.
   }
   \item{pkgType}{
     character string, the preferred setting for
     \code{\link{options}("pkgType")}.  Values \code{"source"},
-    \code{"mac.binary"}, \code{"mac.binary.mavericks"} and
-    \code{"win.binary"} are currently in use.
+    \code{"mac.binary.el-capitan"} and \code{"win.binary"} are currently
+    in use.
 
     This should \strong{not} be used to identify the OS.
   }
@@ -70,16 +69,19 @@
 }
 
 \section{AQUA}{
-  \code{.Platform$GUI} is set to \code{"AQUA"} under the OS X GUI,
+  \code{.Platform$GUI} is set to \code{"AQUA"} under the macOS GUI,
   \code{R.app}. This has a number of consequences:
   \itemize{
-    \item the \env{DISPLAY} environment variable is set to \code{":0"} if unset.
-    \item appends \file{/usr/local/bin} to the \env{PATH} environment variable.
+%%     \item the \env{DISPLAY} environment variable is set to \code{":0"}
+%%     if unset. (However, it will be set on a machine which has
+%%     XQuartz installed.)
+    \item \file{/usr/local/bin} is \emph{appended} to the \env{PATH}
+    environment variable.
     \item the default graphics device is set to \code{quartz}.
     \item selects native (rather than Tk) widgets for the \code{graphics
       = TRUE} options of \code{\link{menu}} and \code{\link{select.list}}.
     \item HTML help is displayed in the internal browser.
-    \item The spreadsheet-like data editor/viewer uses a Quartz version
+    \item the spreadsheet-like data editor/viewer uses a Quartz version
     rather than the X11 one.
   }
 }
@@ -90,12 +92,14 @@
 
   \code{\link{.Machine}} for details of the arithmetic used, and
   \code{\link{system}} for invoking platform-specific system commands.
+
+  \code{\link{capabilities}} and \code{\link{extSoftVersion}} (and links
+  there) for availability of capabilities partly \emph{external} to \R
+  but used from \R functions.
 }
 
 \examples{
-## Note: this can be done in a system-independent way
-##   by file.info()$isdir: see utils::file_test,
-##   and there is a built-in dir.exists() as from R 3.2.0.
+## Note: this can be done in a system-independent way by dir.exists()
 if(.Platform$OS.type == "unix") {
    system.test <- function(...) system(paste("test", ...)) == 0L
    dir.exists2 <- function(dir)
diff --git a/src/library/base/man/Primitive.Rd b/src/library/base/man/Primitive.Rd
index 35f5282..95ecea5 100644
--- a/src/library/base/man/Primitive.Rd
+++ b/src/library/base/man/Primitive.Rd
@@ -1,10 +1,8 @@
 % File src/library/base/man/Primitive.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2012 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2014 R Core Team
 % Distributed under GPL 2 or later
 
-\newcommand{\sspace}{\ifelse{latex}{\out{~}}{ }}
-
 \name{Primitive}
 \alias{.Primitive}
 \alias{primitive}
diff --git a/src/library/base/man/Quotes.Rd b/src/library/base/man/Quotes.Rd
index 37d58a2..887c579 100644
--- a/src/library/base/man/Quotes.Rd
+++ b/src/library/base/man/Quotes.Rd
@@ -1,6 +1,6 @@
 % File src/library/base/man/Quotes.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2014 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2015 R Core Team
 % Distributed under GPL 2 or later
 
 \name{Quotes}
@@ -97,4 +97,79 @@
 
   The  \sQuote{R Language Definition} manual.
 }
+\examples{%% NOTE: Quote the \ even  "once more" !
+'single quotes can be used more-or-less interchangeably'
+"with double quotes to create character vectors"
+
+## Single quotes inside single-quoted strings need backslash-escaping.
+## Ditto double quotes inside double-quoted strings.
+##
+identical('"It\'s alive!", he screamed.',
+          "\"It's alive!\", he screamed.") # same
+
+## Backslashes need doubling, or they have a special meaning.
+x <- "In ALGOL, you could do logical AND with /\\\\."
+print(x)      # shows it as above ("input-like")
+writeLines(x) # shows it as you like it ;-)
+
+## Single backslashes followed by a letter are used to denote
+## special characters like tab(ulator)s and newlines:
+x <- "long\tlines can be\nbroken with newlines"
+writeLines(x) # see also ?strwrap
+
+## Backticks are used for non-standard variable names.
+## (See make.names and ?Reserved for what counts as
+## non-standard.)
+`x y` <- 1:5
+`x y`
+d <- data.frame(`1st column` = rchisq(5, 2), check.names = FALSE)
+d$`1st column`
+
+## Backslashes followed by up to three numbers are interpreted as
+## octal notation for ASCII characters.
+"\110\145\154\154\157\40\127\157\162\154\144\41"
+
+## \x followed by up to two numbers is interpreted as
+## hexadecimal notation for ASCII characters.
+(hw1 <- "\x48\x65\x6c\x6c\x6f\x20\x57\x6f\x72\x6c\x64\x21")
+
+## Mixing octal and hexadecimal in the same string is OK
+(hw2 <- "\110\x65\154\x6c\157\x20\127\x6f\162\x6c\144\x21")
+
+## \u is also hexadecimal, but supported up to 4 numbers,
+## using Unicode specification.  In the previous example,
+## you can simply replace \x with \u.
+(hw3 <- "\u48\u65\u6c\u6c\u6f\u20\u57\u6f\u72\u6c\u64\u21")
+
+## The last three are all identical to
+hw <- "Hello World!"
+stopifnot(identical(hw, hw1), identical(hw1, hw2), identical(hw2, hw3))
+
+## Using Unicode makes more sense for non-latin characters.
+(nn <- "\u0126\u0119\u1114\u022d\u2001\u03e2\u0954\u0f3f\u13d3\u147b\u203c")
+
+## Mixing \x and \u throws a _parse_ error (which is not catchable!)
+\dontrun{
+  "\x48\u65\x6c\u6c\x6f\u20\x57\u6f\x72\u6c\x64\u21"
+}
+##   -->   Error: mixing Unicode and octal/hex escapes .....
+
+## \U works like \u, but supports up to eight numbers.
+## So we can replace \u with \U in the previous example.
+n2 <- "\U0126\U0119\U1114\U022d\U2001\U03e2\U0954\U0f3f\U13d3\U147b\U203c"
+stopifnot(identical(nn, n2))
+
+## Under systems supporting multi-byte locales (and not Windows),
+## \U also supports the rarer characters outside the usual 16^4 range.
+## See the R language manual,
+## https://cran.r-project.org/doc/manuals/r-release/R-lang.html#Literal-constants
+## and bug 16098 https://bugs.r-project.org/bugzilla3/show_bug.cgi?id=16098
+"\U1d4d7" # On Windows this gives the incorrect value of "\Ud4d7"
+
+## nul characters (for terminating strings in C) are not allowed (parse errors)
+\dontrun{% as above, these errors cannot be caught via try*(..)
+  "foo\0bar"     # Error: nul character not allowed (line 1)
+  "foo\u0000bar" # same error
+}
+}
 \keyword{documentation}
diff --git a/src/library/base/man/Random-user.Rd b/src/library/base/man/Random-user.Rd
index da974e9..618bc30 100644
--- a/src/library/base/man/Random-user.Rd
+++ b/src/library/base/man/Random-user.Rd
@@ -1,5 +1,5 @@
 % File src/library/base/man/Random-user.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2009 R Core Team
 % Distributed under GPL 2 or later
 
@@ -16,7 +16,7 @@
   dynamically-loaded compiled code.  The user must supply the entry point
   \code{user_unif_rand}, which takes no arguments and returns a
   \emph{pointer to} a double. The example below will show the general
-  pattern.
+  pattern. The generator should have at least 25 bits of precision.
 
   Optionally, the user can supply the entry point \code{user_unif_init},
   which is called with an \code{unsigned int} argument when
diff --git a/src/library/base/man/Random.Rd b/src/library/base/man/Random.Rd
index 5936b63..4b001d5 100644
--- a/src/library/base/man/Random.Rd
+++ b/src/library/base/man/Random.Rd
@@ -1,6 +1,6 @@
 % File src/library/base/man/Random.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2013 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2015 R Core Team
 % Distributed under GPL 2 or later
 
 \name{Random}
@@ -239,8 +239,7 @@ set.seed(seed, kind = NULL, normal.kind = NULL)
 
   Knuth, D. E. (2002)
   \emph{The Art of Computer Programming.} Volume 2, third edition, ninth
-  printing.\cr
-  See \url{http://Sunburn.Stanford.EDU/~knuth/news02.html}.
+  printing.
 
   L'Ecuyer, P. (1999) Good parameters and implementations for combined
   multiple recursive random number generators. \emph{Operations
@@ -259,8 +258,9 @@ set.seed(seed, kind = NULL, normal.kind = NULL)
   pseudo-random number generator,
   \emph{ACM Transactions on Modeling and Computer Simulation},
   \bold{8}, 3--30.\cr
-  Source code at \url{http://www.math.keio.ac.jp/~matumoto/emt.html}.
-
+  Source code formerly at \code{http://www.math.keio.ac.jp/~matumoto/emt.html}.\cr
+  Now see \url{http://www.math.sci.hiroshima-u.ac.jp/~m-mat/MT/VERSIONS/C-LANG/c-lang.html}.
+  
   Reeds, J., Hubert, S. and Abrahams, M. (1982--4) C implementation of
   SuperDuper, University of California at Berkeley.  (Personal
   communication from Jim Reeds to Ross Ihaka.)
diff --git a/src/library/base/man/RdUtils.Rd b/src/library/base/man/RdUtils.Rd
index 958505a..fac7b5c 100644
--- a/src/library/base/man/RdUtils.Rd
+++ b/src/library/base/man/RdUtils.Rd
@@ -1,6 +1,6 @@
 % File src/library/base/man/RdUtils.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2011 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2016 R Core Team
 % Distributed under GPL 2 or later
 
 \name{RdUtils}
@@ -45,7 +45,12 @@
   \env{RD2PDF_INPUTENC} can be set to \code{inputenx} to make use of the
   LaTeX package of that name rather than \code{inputenc}: this might be
   needed for better support of the UTF-8 encoding.
-
+  
+  \command{R CMD Rd2pdf} calls \code{tools::\link{texi2pdf}} to produce
+  its PDF file: see its help for the possibilities for the
+  \command{texi2dvi} command which that function uses (and which can be
+  overridden by setting environment variable \env{R_TEXI2DVICMD}).
+  
   Use \command{R CMD \var{foo} --help} to obtain usage information on utility
   \code{\var{foo}}.
 }
diff --git a/src/library/base/man/Recall.Rd b/src/library/base/man/Recall.Rd
index 897c7f1..91ba840 100644
--- a/src/library/base/man/Recall.Rd
+++ b/src/library/base/man/Recall.Rd
@@ -1,10 +1,8 @@
 % File src/library/base/man/Recall.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2007 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2014 R Core Team
 % Distributed under GPL 2 or later
 
-\newcommand{\sspace}{\ifelse{latex}{\out{~}}{ }}
-
 \name{Recall}
 \alias{Recall}
 \title{Recursive Calling}
diff --git a/src/library/base/man/Reserved.Rd b/src/library/base/man/Reserved.Rd
index 0b2d5dc..2191a7a 100644
--- a/src/library/base/man/Reserved.Rd
+++ b/src/library/base/man/Reserved.Rd
@@ -1,10 +1,8 @@
 % File src/library/base/man/Reserved.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2013 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2014 R Core Team
 % Distributed under GPL 2 or later
 
-\newcommand{\sspace}{\ifelse{latex}{\out{~}}{ }}
-
 \name{Reserved}
 \alias{Reserved}
 \alias{reserved}
diff --git a/src/library/base/man/Rhome.Rd b/src/library/base/man/Rhome.Rd
index dc32408..10dc428 100644
--- a/src/library/base/man/Rhome.Rd
+++ b/src/library/base/man/Rhome.Rd
@@ -1,6 +1,6 @@
 % File src/library/base/man/Rhome.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2011 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2016 R Core Team
 % Distributed under GPL 2 or later
 
 \name{Rhome}
@@ -8,7 +8,8 @@
 \alias{R_HOME}
 \title{Return the R Home Directory}
 \description{
-  Return the \R home directory.
+  Return the \R home directory, or the full path to a component of the
+  \R installation.
 }
 \usage{
 R.home(component = "home")
@@ -16,8 +17,8 @@ R.home(component = "home")
 \arguments{
   \item{component}{As well as \code{"home"} which gives the \R home
     directory, other known values are \code{"bin"}, \code{"doc"},
-    \code{"etc"}, \code{"modules"} and \code{"share"} giving the paths to the
-    corresponding parts of an \R installation.}
+    \code{"etc"}, \code{"include"}, \code{"modules"} and \code{"share"}
+    giving the paths to the corresponding parts of an \R installation.}
 }
 \details{
   The \R home directory is the top-level directory of the \R
@@ -26,27 +27,27 @@ R.home(component = "home")
   The \R home directory is often referred to as \var{R_HOME},
   and is the value of an environment variable of that name in an \R
   session.
-#ifdef unix
   It can be found outside an \R session by \code{R \link{RHOME}}.
-#endif
 }
 \value{
   A character string giving the \R home directory or path to a
   particular component.  Normally the components are all subdirectories
-  of the \R home directory, but this may not be the case in a Unix-like
+  of the \R home directory, but this need not be the case in a Unix-like
   installation.
 
-  The return value for \code{"modules"} and on Windows \code{"bin"} is
-  to a sub-architecture-specific location.
+  The value for \code{"modules"} and on Windows \code{"bin"} is a
+  sub-architecture-specific location.
 
-  The function \code{R.home()} bases the constructed paths on the
-  current value of the environment variable \env{R_HOME} which is
-  normally set on startup.
+  On a Unix-alike, the constructed paths are based on the current
+  values of the environment variables \env{R_HOME} and where set
+  \env{R_SHARE_DIR}, \env{R_DOC_DIR} and \env{R_INCLUDE_DIR} (these are
+  set on startup and should not be altered).
 
   On Windows the values of \code{R.home()} and \env{R_HOME} are
-  guaranteed not to contain spaces, switching to the 8.3 short form of
-  path elements if required.  The value of \env{R_HOME}
-  is set on startup to use forward slashes (since many package
-  maintainers pass it unquoted to shells, for example in \file{Makefile}s).
+  switched to the 8.3 short form of path elements if required and if
+  the Windows service to do that is enabled.  The value of
+  \env{R_HOME} is set to use forward slashes (since many package
+  maintainers pass it unquoted to shells, for example in
+  \file{Makefile}s).  
 }
 \keyword{utilities}
diff --git a/src/library/base/man/Round.Rd b/src/library/base/man/Round.Rd
index fa263d2..d880b83 100644
--- a/src/library/base/man/Round.Rd
+++ b/src/library/base/man/Round.Rd
@@ -1,10 +1,8 @@
 % File src/library/base/man/Round.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2009 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2014 R Core Team
 % Distributed under GPL 2 or later
 
-\newcommand{\sspace}{\ifelse{latex}{\out{~}}{ }}
-
 \name{Round}
 \alias{ceiling}
 \alias{floor}
diff --git a/src/library/base/man/Special.Rd b/src/library/base/man/Special.Rd
index b6b9da5..e3fa151 100644
--- a/src/library/base/man/Special.Rd
+++ b/src/library/base/man/Special.Rd
@@ -1,10 +1,8 @@
 % File src/library/base/man/Special.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2010 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2014 R Core Team
 % Distributed under GPL 2 or later
 
-\newcommand{\sspace}{\ifelse{latex}{\out{~}}{ }}
-
 \name{Special}
 \title{Special Functions of Mathematics}
 \alias{Special}
@@ -120,7 +118,7 @@ lfactorial(x)
 
   Abramowitz, M. and Stegun, I. A. (1972)
   \emph{Handbook of Mathematical Functions}. New York: Dover.
-  \url{http://en.wikipedia.org/wiki/Abramowitz_and_Stegun} provides
+  \url{https://en.wikipedia.org/wiki/Abramowitz_and_Stegun} provides
   links to the full text which is in public domain.\cr
   Chapter 6: Gamma and Related Functions.
 }
diff --git a/src/library/base/man/Startup.Rd b/src/library/base/man/Startup.Rd
index 78b11f4..8b4f690 100644
--- a/src/library/base/man/Startup.Rd
+++ b/src/library/base/man/Startup.Rd
@@ -1,10 +1,8 @@
 % File src/library/base/man/Startup.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2013 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2017 R Core Team
 % Distributed under GPL 2 or later
 
-\newcommand{\sspace}{\ifelse{latex}{\out{~}}{ }}
-
 \name{Startup}
 \alias{Startup}
 \alias{Rprofile}
@@ -139,8 +137,7 @@
 }
 \note{
   It is not intended that there be interaction with the user during
-  startup code.  Attempting to do so can crash the \R process,
-  especially so prior to \R 3.0.2.
+  startup code.  Attempting to do so can crash the \R process.
   
 #ifdef unix
   On Unix versions of \R here is also a  file
@@ -152,7 +149,7 @@
   distinct from \file{\var{\link{R_HOME}}/etc/Renviron.site}.
 
   Command-line options may well not apply to alternative front-ends:
-  they do not apply to \command{R.app} on OS X.
+  they do not apply to \command{R.app} on macOS.
 #endif
 #ifdef windows
   The startup options are for \command{Rgui}, \command{Rterm} and
diff --git a/src/library/base/man/Syntax.Rd b/src/library/base/man/Syntax.Rd
index 32dea25..d396cec 100644
--- a/src/library/base/man/Syntax.Rd
+++ b/src/library/base/man/Syntax.Rd
@@ -1,6 +1,6 @@
 % File src/library/base/man/Syntax.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2013 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2015 R Core Team
 % Distributed under GPL 2 or later
 
 % = is treated specially in the parser: see PR#14595
@@ -63,5 +63,23 @@
 
   The \sQuote{R Language Definition} manual.
 }
+\examples{
+## Logical AND ("&&") has higher precedence than OR ("||"):
+TRUE || TRUE && FALSE   # is the same as
+TRUE || (TRUE && FALSE) # and different from
+(TRUE || TRUE) && FALSE
+
+## Special operators have higher precedence than "!" (logical NOT).
+## You can use this for \%in\% :
+! 1:10 \%in\% c(2, 3, 5, 7) # same as !(1:10 \%in\% c(2, 3, 5, 7))
+## but we strongly advise to use the "!( ... )" form in this case!
+
+
+## '=' has lower precedence than '<-' ... so you should not mix them
+##     (and '<-' is considered better style anyway):
+\donttest{## Consequently, this gives a ("non-catchable") error
+ x <- y = 5  #->  Error in (x <- y) = 5 : ....
+}
+}
 \keyword{documentation}
 \keyword{programming}
diff --git a/src/library/base/man/Sys.getenv.Rd b/src/library/base/man/Sys.getenv.Rd
index e0ee69e..1380ffb 100644
--- a/src/library/base/man/Sys.getenv.Rd
+++ b/src/library/base/man/Sys.getenv.Rd
@@ -1,6 +1,6 @@
 % File src/library/base/man/Sys.getenv.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2011 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2014 R Core Team
 % Distributed under GPL 2 or later
 
 \name{Sys.getenv}
@@ -39,6 +39,10 @@ Sys.getenv(x = NULL, unset = "", names = NA)
   some platforms allow but POSIX does not.  (Windows is such a platform:
   there names including \code{=} are truncated just before the first
   \code{=}.)
+
+  When \code{x} is missing and \code{names} is not false, the result is
+  of class \code{"Dlist"} in order to get a nice
+  \code{\link{print}} method.
 }
 \seealso{
   \code{\link{Sys.setenv}},
@@ -53,6 +57,7 @@ Sys.getenv(x = NULL, unset = "", names = NA)
 Sys.getenv(c("R_HOME", "R_PAPERSIZE", "R_PRINTCMD", "HOST"))
 
 names(s <- Sys.getenv()) # all settings (the values could be very long)
+head(s, 12)# using the Dlist print() method
 
 ## Language and Locale settings -- but rather use Sys.getlocale()
 s[grep("^L(C|ANG)", names(s))]
diff --git a/src/library/base/man/Sys.getpid.Rd b/src/library/base/man/Sys.getpid.Rd
index 389751b..f063677 100644
--- a/src/library/base/man/Sys.getpid.Rd
+++ b/src/library/base/man/Sys.getpid.Rd
@@ -1,6 +1,6 @@
 % File src/library/base/man/Sys.getpid.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2014 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2017 R Core Team
 % Distributed under GPL 2 or later
 
 \name{Sys.getpid}
@@ -18,10 +18,14 @@ Sys.getpid()
 }
 \value{
   An integer, often between 1 and 32767 under Unix-alikes (but for
-  example FreeBSD and OS X use IDs up to 99999) and a
+  example FreeBSD and macOS use IDs up to 99999) and a
   positive integer (up to 32767) under Windows.
 }
 \examples{\donttest{
 Sys.getpid()
+
+## Show files opened from this R process
+if(.Platform$OS.type == "unix") ## on Unix-alikes such Linux, macOS, FreeBSD:
+   system(paste("lsof -p", Sys.getpid()))
 }}
 \keyword{utilities}
diff --git a/src/library/base/man/Sys.glob.Rd b/src/library/base/man/Sys.glob.Rd
index 325d661..030506a 100644
--- a/src/library/base/man/Sys.glob.Rd
+++ b/src/library/base/man/Sys.glob.Rd
@@ -1,10 +1,8 @@
 % File src/library/base/man/Sys.glob.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2013 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2014 R Core Team
 % Distributed under GPL 2 or later
 
-\newcommand{\sspace}{\ifelse{latex}{\out{~}}{ }}
-
 \name{Sys.glob}
 \alias{Sys.glob}
 \title{Wildcard Expansion on File Paths}
diff --git a/src/library/base/man/Sys.info.Rd b/src/library/base/man/Sys.info.Rd
index cce60e0..c1574e3 100644
--- a/src/library/base/man/Sys.info.Rd
+++ b/src/library/base/man/Sys.info.Rd
@@ -1,6 +1,6 @@
 % File src/library/base/man/Sys.info.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2011 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2015 R Core Team
 % Copyright      2008 The R Foundation
 % Distributed under GPL 2 or later
 
@@ -29,43 +29,57 @@ Sys.info()
     \code{"unknown"} if it
     cannot be ascertained.  This may differ from the real user in
     \sQuote{set-user-ID} processes.}
-#ifdef unix
 
+#ifdef unix
   The first five fields come from the \code{uname(2)} system call.  The
   login name comes from \code{getlogin(2)}, and the user names from
   \code{getpwuid(getuid())} and \code{getpwuid(geteuid())}
 #endif
+#ifdef windows
+  The last three fields give the same value on Windows.
+#endif  
 }
 \details{
-  This function is not implemented on all \R platforms, and returns
-  \code{NULL} when not available.  Where possible it is based on POSIX
-  system calls.  (Under Windows, it is obtained by Windows system
-  calls and the last three values are the same.)
+  This uses POSIX or Windows system calls.  Note that OS names might not
+  be what you expect: for example macOS identifies itself as
+  \samp{Darwin} and Solaris as \samp{SunOS}.
 
   \code{Sys.info()} returns details of the platform \R is running on,
   whereas \code{\link{R.version}} gives details of the platform \R was
   built on: the \code{release} and \code{version} may well be different.
-
-  Note that OS names might not be what you expect: for example OS X
-  identifies itself as \samp{Darwin} and Solaris as \samp{SunOS}.
 }
 \note{
-  The meaning of OS \sQuote{release} and \sQuote{version} is
-  system-dependent and there is no guarantee that the node or
-  login or user names will be what you might reasonably expect.
-  (In particular on some Linux distributions the login name is unknown
-  from sessions with re-directed inputs.)
+  The meaning of \code{release} and \code{version} is system-dependent:
+  on a Unix-alike they normally refer to the kernel.  There, usually
+  \code{release} contains a numeric version and \code{version} gives
+  additional information.  Examples for \code{release}:
+\preformatted{
+  "4.1.3-100.fc21.x86_64"   # Linux (Fedora)
+  "3.2.0-4-amd64"           # Linux (Debian)
+  "14.5.0"                  # macOS 10.10.5
+  "5.11"                    # Solaris
+}
+  
+  There is no guarantee that the node or login or user names will be
+  what you might reasonably expect.  (In particular on some Linux
+  distributions the login name is unknown from sessions with re-directed
+  inputs.)
 
   The use of alternatives such as \code{system("whoami")} is not
   portable: the POSIX command \code{system("id")} is much more portable
   on Unix-alikes, provided only the POSIX options are used (and not the
   many BSD and GNU extensions).
+#ifdef windows
+
+  Windows may report unexpected versions: see the help for
+  \code{\link{win.version}}.
+#endif
 }
 
 \seealso{
   \code{\link{.Platform}}, and \code{\link{R.version}}.
   \code{\link{sessionInfo}()} gives a synopsis of both your system and
-  the \R session.
+  the \R session (and gives the OS version in a human-readable form).
 }
 
 \examples{
diff --git a/src/library/base/man/Sys.localeconv.Rd b/src/library/base/man/Sys.localeconv.Rd
index 22528e8..3d8d29f 100644
--- a/src/library/base/man/Sys.localeconv.Rd
+++ b/src/library/base/man/Sys.localeconv.Rd
@@ -1,6 +1,6 @@
 % File src/library/base/man/Sys.localeconv.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2011 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2014 R Core Team
 % Distributed under GPL 2 or later
 
 \name{Sys.localeconv}
diff --git a/src/library/base/man/Sys.readlink.Rd b/src/library/base/man/Sys.readlink.Rd
index 711d362..e2b75c4 100644
--- a/src/library/base/man/Sys.readlink.Rd
+++ b/src/library/base/man/Sys.readlink.Rd
@@ -1,6 +1,6 @@
 % File src/library/base/man/file.info.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 2009-2013 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 2009-2015 R Core Team
 % Distributed under GPL 2 or later
 
 \name{Sys.readlink}
@@ -23,7 +23,7 @@ Sys.readlink(paths)
     see \code{\link{path.expand}}.}
 }
 \value{
-  A character vector of the the same length as \code{paths}.  The
+  A character vector of the same length as \code{paths}.  The
   entries are the path of the file linked to, \code{""} if the path is
   not a symbolic link, and \code{NA} if there is an error (e.g., the
   path does not exist).
diff --git a/src/library/base/man/Sys.setFileTime.Rd b/src/library/base/man/Sys.setFileTime.Rd
index 89897d9..7cb5a96 100644
--- a/src/library/base/man/Sys.setFileTime.Rd
+++ b/src/library/base/man/Sys.setFileTime.Rd
@@ -1,6 +1,6 @@
 % File src/library/base/man/Sys.info.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 2011 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 2011-2016 R Core Team
 % Distributed under GPL 2 or later
 
 \name{Sys.setFileTime}
@@ -21,15 +21,17 @@ Sys.setFileTime(path, time)
   }
   \item{time}{
     A date-time of class \code{"\link{POSIXct}"} or an object which can
-    be coerced to one.  Fractions of a second are ignored.
+    be coerced to one.  Fractions of a second may be ignored.
   }
 }
 \details{
   This attempts sets the file time to the value specified.
 
-  On a Unix-alike it uses the system call \code{utimes} if that is
-  available, otherwise \code{utimes}.  On a POSIX file system it sets
-  both the last-access and modification times.
+  On a Unix-alike it uses the system call \code{utimensat} if that is
+  available, otherwise \code{utimes} or \code{utime}.  On a POSIX file
+  system it sets both the last-access and modification times.
+  Fractional seconds will set as from \R 3.4.0 on OSes with the
+  requisite system calls and suitable filesystems.
 
   On Windows it uses the system call \code{SetFileTime} to set the
   \sQuote{last write time}.  Some Windows file systems only record the
diff --git a/src/library/base/man/Sys.setenv.Rd b/src/library/base/man/Sys.setenv.Rd
index e7fb3f5..68daecf 100644
--- a/src/library/base/man/Sys.setenv.Rd
+++ b/src/library/base/man/Sys.setenv.Rd
@@ -1,5 +1,5 @@
 % File src/library/base/man/Sys.setenv.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2011 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/base/man/Sys.sleep.Rd b/src/library/base/man/Sys.sleep.Rd
index 4de5f45..b7e9af6 100644
--- a/src/library/base/man/Sys.sleep.Rd
+++ b/src/library/base/man/Sys.sleep.Rd
@@ -1,13 +1,13 @@
 % File src/library/base/man/Sys.sleep.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2007 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2015 R Core Team
 % Distributed under GPL 2 or later
 
 \name{Sys.sleep}
 \alias{Sys.sleep}
 \title{Suspend Execution for a Time Interval}
 \description{
-  Suspend execution of \R expressions for a given number of seconds
+  Suspend execution of \R expressions for a specified time interval.
 }
 \usage{
 Sys.sleep(time)
@@ -16,27 +16,33 @@ Sys.sleep(time)
   \item{time}{The time interval to suspend execution for, in seconds.}
 }
 \details{
-  Using this function allows \R to be given very low priority and hence
-  not to interfere with more important foreground tasks.  A typical use
-  is to allow a process launched from \R to set itself up and read its
-  input files before \R execution is resumed.
+  Using this function allows \R to temporarily be given very low
+  priority and hence not to interfere with more important foreground
+  tasks.  A typical use is to allow a process launched from \R to set
+  itself up and read its input files before \R execution is resumed.
 
   The intention is that this function suspends execution of \R
   expressions but wakes the process up often enough to respond to GUI
-  events, typically every 0.5 seconds.
+  events, typically every half second.  It can be interrupted
+  (e.g.\sspace{}by \samp{Ctrl-C} or \samp{Esc} at the \R console).
 
   There is no guarantee that the process will sleep for the whole of the
-  specified interval, and it may well take slightly longer in real time
-  to resume execution.  The resolution of the time interval is
-  system-dependent, but will normally be down to 0.02 secs or better.
+  specified interval (sleep might be interrupted), and it may well take
+  slightly longer in real time to resume execution.
+
+  \code{time} must be non-negative (and not \code{NA} nor \code{NaN}):
+  \code{Inf} is allowed (and might be appropriate if the intention is to
+  wait indefinitely for an interrupt).  The resolution of the time
+  interval is system-dependent, but will normally be 20ms or better.
   (On modern Unix-alikes it will be better than 1ms.)
 }
 \value{
   Invisible \code{NULL}.
 }
 \note{
-  This function may not be implemented on all systems.  Where it is not
-  implemented calling it given an error.
+  Despite its name, this is not currently implemented using the
+  \code{sleep} system call (although on Windows it does make use of
+  \code{Sleep}).
 }
 
 \examples{\donttest{
diff --git a/src/library/base/man/Sys.time.Rd b/src/library/base/man/Sys.time.Rd
index 30f38c2..eeff5ef 100644
--- a/src/library/base/man/Sys.time.Rd
+++ b/src/library/base/man/Sys.time.Rd
@@ -1,6 +1,6 @@
 % File src/library/base/man/Sys.time.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2013 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2014 R Core Team
 % Distributed under GPL 2 or later
 
 \name{Sys.time}
diff --git a/src/library/base/man/Sys.which.Rd b/src/library/base/man/Sys.which.Rd
index 8f9fc3f..96e1dc0 100644
--- a/src/library/base/man/Sys.which.Rd
+++ b/src/library/base/man/Sys.which.Rd
@@ -1,10 +1,8 @@
 % File src/library/base/man/Sys.which.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 2007-12 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 2007-2017 R Core Team
 % Distributed under GPL 2 or later
 
-\newcommand{\sspace}{\ifelse{latex}{\out{~}}{ }}
-
 \name{Sys.which}
 \alias{Sys.which}
 \title{Find Full Paths to Executables}
@@ -37,7 +35,7 @@ Sys.which(names)
   executable  or some indication that no executable of that name was
   found.  Typically the indication is \code{""}, but this does depend on
   the OS (and the known exceptions are changed to \code{""}).  Missing
-  values in \code{names} have missing return values (as from \R 3.0.0).
+  values in \code{names} have missing return values.
 
   On Windows the paths will be short paths (8+3 components, no spaces)
   with \code{\\} as the path delimiter.
@@ -47,10 +45,6 @@ Sys.which(names)
   that is not part of e.g.\sspace{}the POSIX standards, exactly what it does is
   OS-dependent.  It will usually do tilde-expansion and it may make use
   of \command{csh} aliases.
-
-  In \R 2.x.y, arguments containing spaces or other metacharacters
-  needed to be escaped as they would be for a shell: for example Windows
-  paths containing spaces needed to be enclosed in double quotes.
 }
 \examples{
 ## the first two are likely to exist everywhere
diff --git a/src/library/base/man/Trig.Rd b/src/library/base/man/Trig.Rd
index b7d0e15..1083b0b 100644
--- a/src/library/base/man/Trig.Rd
+++ b/src/library/base/man/Trig.Rd
@@ -1,6 +1,6 @@
 % File src/library/base/man/Trig.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2014 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2016 R Core Team
 % Distributed under GPL 2 or later
 
 \name{Trig}
@@ -9,9 +9,9 @@
 \alias{cos}
 \alias{sin}
 \alias{tan}
-\alias{acos}
-\alias{asin}
-\alias{atan}
+\alias{acos}\alias{arccos}
+\alias{asin}\alias{arcsin}
+\alias{atan}\alias{arctan}
 \alias{atan2}
 \alias{cospi}
 \alias{sinpi}
@@ -49,13 +49,20 @@ tanpi(x)
   Angles are in radians, not degrees, for the standard versions (i.e., a
   right angle is \eqn{\pi/2}), and in \sQuote{half-rotations} for
   \code{cospi} etc.
-  
+
   \code{cospi(x)}, \code{sinpi(x)}, and \code{tanpi(x)} are accurate
-  for \code{x} which are multiples of a half.
-   
+  for \code{x} values which are multiples of a half.
+
   All except \code{atan2} are \link{internal generic} \link{primitive}
   functions: methods can be defined for them individually or via the
   \code{\link[=S3groupGeneric]{Math}} group generic.
+  
+  These are all wrappers to system calls of the same name (with prefix
+  \code{c} for complex arguments) where available.  (\code{cospi},
+  \code{sinpi}, and \code{tanpi} are part of a C11 extension
+  and provided by e.g.\sspace{}macOS and Solaris: where not yet
+  available call to \code{cos} \emph{etc} are used, with special cases
+  for  multiples of a half.)
 }
 
 \value{
@@ -80,8 +87,10 @@ tanpi(x)
    direction.
 
    Complex arguments for  \code{cospi}, \code{sinpi}, and \code{tanpi}
-   are not yet implemented.% but patches are welcome
+   are not yet implemented, and they are a \sQuote{future direction} of
+   ISO/IEC TS 18661-4.% but patches are welcome
 }
+
 \section{S4 methods}{
   All except \code{atan2} are S4 generic functions: methods can be defined
   for them individually or via the
@@ -97,9 +106,10 @@ tanpi(x)
   Chapter 4. Elementary Transcendental Functions: Logarithmic,
   Exponential, Circular and Hyperbolic Functions
 
-  For \code{cospi}, \code{sinpi}, and \code{tanpi} the draft C11
-  extension ISO/IEC TS 18661
-  (\url{http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1785.pdf}).
+  For \code{cospi}, \code{sinpi}, and \code{tanpi} the C11 extension
+  ISO/IEC TS 18661-4:2015 (draft at
+  \url{http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1950.pdf}).
+  
 }
 \examples{
 x <- seq(-3, 7, by = 1/8)
diff --git a/src/library/base/man/UseMethod.Rd b/src/library/base/man/UseMethod.Rd
index 73e46ac..d3b6531 100644
--- a/src/library/base/man/UseMethod.Rd
+++ b/src/library/base/man/UseMethod.Rd
@@ -1,10 +1,8 @@
 % File src/library/base/man/UseMethod.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2010 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2014 R Core Team
 % Distributed under GPL 2 or later
 
-\newcommand{\sspace}{\ifelse{latex}{\out{~}}{ }}
-
 \name{UseMethod}
 \title{Class Methods}
 \alias{UseMethod}
diff --git a/src/library/base/man/Vectorize.Rd b/src/library/base/man/Vectorize.Rd
index 2ecd9c7..1ecb042 100644
--- a/src/library/base/man/Vectorize.Rd
+++ b/src/library/base/man/Vectorize.Rd
@@ -1,6 +1,6 @@
 % File src/library/base/man/Vectorize.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2011 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2015 R Core Team
 % Copyright 2002-2010 The R Foundation
 % Distributed under GPL 2 or later
 
@@ -34,6 +34,11 @@ Vectorize(FUN, vectorize.args = arg.names, SIMPLIFY = TRUE,
 
   \code{Vectorize} cannot be used with primitive functions as they do
   not have a value for \code{\link{formals}}.
+  
+  It also cannot be used with functions that have arguments named
+  \code{FUN}, \code{vectorize.args}, \code{SIMPLIFY} or
+  \code{USE.NAMES}, as they will interfere with the \code{Vectorize}
+  arguments.  See the \code{combn} example below for a workaround.  
 }
 \value{
   A function with the same arguments as \code{FUN}, wrapping a call to
@@ -68,6 +73,12 @@ Vm <- seq(140, 310, length.out = 50)
 K <- seq(0, 0.15, length.out = 40)
 SSvals <- outer(Vm, K, vSS, Treated$rate, Treated$conc)
 contour(Vm, K, SSvals, levels = (1:10)^2, xlab = "Vm", ylab = "K")
+
+# combn() has an argument named FUN
+combnV <- Vectorize(function(x, m, FUNV = NULL) combn(x, m, FUN = FUNV),
+                    vectorize.args = c("x", "m"))
+combnV(4, 1:4)
+combnV(4, 1:4, sum)
 }
 \keyword{manip}
 \keyword{utilities}
diff --git a/src/library/base/man/Version.Rd b/src/library/base/man/Version.Rd
index 9c7325b..46a8773 100644
--- a/src/library/base/man/Version.Rd
+++ b/src/library/base/man/Version.Rd
@@ -1,6 +1,6 @@
 % File src/library/base/man/Version.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2007 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2015 R Core Team
 % Distributed under GPL 2 or later
 
 \name{R.Version}
@@ -31,7 +31,7 @@ version
   \item{arch}{the architecture (CPU) \R was built on/for.}
   \item{os}{the underlying operating system.}
   \item{system}{CPU and OS, separated by a comma.}
-  \item{status}{the status of the version (e.g., \code{"Alpha"})}
+  \item{status}{the status of the version (e.g., \code{"alpha"})}
   \item{major}{the major version number}
   \item{minor}{the minor version number, including the patchlevel}
   \item{year}{the year the version was released}
@@ -63,8 +63,8 @@ version
   This gives details of the OS under which \R was built, not the one
   under which it is currently running (for which see
   \code{\link{Sys.info}}).
-  
-  Note that OS names might not be what you expect: for example OS X
+
+  Note that OS names might not be what you expect: for example macOS
   Mavericks 10.9.4 identifies itself as \samp{darwin13.3.0}, Linux
   usually as \samp{linux-gnu} and Solaris 10 as \samp{solaris2.10}.
 }
@@ -80,8 +80,8 @@ R.version$os # to check how lucky you are ...
 plot(0) # any plot
 mtext(R.version.string, side = 1, line = 4, adj = 1) # a useful bottom-right note
 
-## a good way to detect OS X:
-if(grepl("^darwin", R.version$os)) message("running on OS X")
+## a good way to detect macOS:
+if(grepl("^darwin", R.version$os)) message("running on macOS")
 }
 \keyword{environment}
 \keyword{sysdata}
diff --git a/src/library/base/man/abbreviate.Rd b/src/library/base/man/abbreviate.Rd
index 9d8d54e..b9f7838 100644
--- a/src/library/base/man/abbreviate.Rd
+++ b/src/library/base/man/abbreviate.Rd
@@ -1,7 +1,7 @@
 % File src/library/base/man/abbreviate.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2013 R Core Team
-% Copyright 2008      The R Foundation
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2016 R Core Team
+% Copyright 2008-2016 The R Foundation
 % Distributed under GPL 2 or later
 
 \name{abbreviate}
@@ -9,20 +9,22 @@
 \usage{
 abbreviate(names.arg, minlength = 4, use.classes = TRUE,
            dot = FALSE, strict = FALSE,
-           method = c("left.kept", "both.sides"))
+           method = c("left.kept", "both.sides"), named = TRUE)
 }
 \alias{abbreviate}
 \arguments{
   \item{names.arg}{a character vector of names to be abbreviated, or an
     object to be coerced to a character vector by \code{\link{as.character}}.}
   \item{minlength}{the minimum length of the abbreviations.}
-  \item{use.classes}{logical (currently ignored by \R).}
+  \item{use.classes}{logical: should lowercase characters be removed first?}
   \item{dot}{logical: should a dot (\code{"."}) be appended?}
   \item{strict}{logical: should \code{minlength} be observed strictly?
     Note that setting \code{strict = TRUE} may return \emph{non}-unique
     strings.}
-  \item{method}{a string specifying the method used with default
-    \code{"left.kept"}, see \sQuote{Details} below.}
+  \item{method}{a character string specifying the method used with default
+    \code{"left.kept"}, see \sQuote{Details} below.  Partial matches
+    allowed.}
+  \item{named}{logical: should \code{names} (with original vector) be returned.}
 }
 \description{
   Abbreviate strings to at least \code{minlength} characters,
@@ -32,28 +34,27 @@ abbreviate(names.arg, minlength = 4, use.classes = TRUE,
 \details{
   The default algorithm (\code{method = "left.kept"}) used is similar
   to that of S.  For a single string it works as follows.
-  First all spaces at the beginning of the string are stripped.
+  First spaces at the ends of the string are stripped.
   Then (if necessary) any other spaces are stripped.
-  Next, lower case vowels are removed (starting at the right)
-  followed by lower case consonants.
+  Next, lower case vowels are removed followed by lower case consonants.
   Finally if the abbreviation is still longer than \code{minlength}
-  upper case letters are stripped.
+  upper case letters and symbols are stripped.
 
-  Characters are always stripped from the end of the word first.
-  If an element of \code{names.arg} contains more than one word (words
-  are separated by space) then at least one letter from each word will be
+  Characters are always stripped from the end of the strings first.  If
+  an element of \code{names.arg} contains more than one word (words are
+  separated by spaces) then at least one letter from each word will be
   retained.
 
   Missing (\code{NA}) values are unaltered.
 
   If \code{use.classes} is \code{FALSE} then the only distinction is to
-  be between letters and space.  This has NOT been implemented.
+  be between letters and space.
 }
 \value{
-  A character vector containing abbreviations for the strings in its
-  first argument.  Duplicates in the original \code{names.arg} will be
-  given identical abbreviations.  If any non-duplicated elements have
-  the same \code{minlength} abbreviations then, if \code{method =
+  A character vector containing abbreviations for the character strings
+  in its first argument.  Duplicates in the original \code{names.arg}
+  will be given identical abbreviations.  If any non-duplicated elements
+  have the same \code{minlength} abbreviations then, if \code{method =
   "both.sides"} the basic internal \code{abbreviate()} algorithm is
   applied to the characterwise \emph{reversed} strings; if there are
   still duplicated abbreviations and if \code{strict = FALSE} as by
@@ -61,13 +62,24 @@ abbreviate(names.arg, minlength = 4, use.classes = TRUE,
   are found for those elements only.  This process is repeated until all
   unique elements of \code{names.arg} have unique abbreviations.
 
-  The character version of \code{names.arg} is attached to the returned
-  value as a names argument: no other attributes are retained.
+  If \code{names} is true, the character version of \code{names.arg} is
+  attached to the returned value as a \code{\link{names}} attribute: no
+  other attributes are retained.
+
+  If a input element contains non-ASCII characters, the corresponding
+  value will be in UTF-8 and marked as such (see \code{\link{Encoding}}).
 }
 \section{Warning}{
-  This is really only suitable for English, and does not work correctly with
-  non-ASCII characters in multibyte locales.  It will warn if used with
-  non-ASCII characters (and required to reduce the length).
+  If \code{use.classes} is true (the default), this is really only
+  suitable for English, and prior to \R 3.3.0 did not work correctly
+  with non-ASCII characters in multibyte locales.  It will warn if used
+  with non-ASCII characters (and required to reduce the length).
+
+  As from \R 3.3.0 the concept of \sQuote{vowel} is extended from
+  English vowels by including characters which are accented versions of
+  lower-case English vowels (including \sQuote{o with stroke}).  Of
+  course, there are languages (even Western European languages such as
+  Welsh) with other vowels.
 }
 \seealso{
   \code{\link{substr}}.
@@ -78,12 +90,18 @@ abbreviate(x, 2)
 abbreviate(x, 2, strict = TRUE) # >> 1st and 3rd are == "ab"
 
 (st.abb <- abbreviate(state.name, 2))
+stopifnot(identical(unname(st.abb),
+           abbreviate(state.name, 2, named=FALSE)))
 table(nchar(st.abb)) # out of 50, 3 need 4 letters :
 as <- abbreviate(state.name, 3, strict = TRUE)
 as[which(as == "Mss")]
 \dontshow{stopifnot(which(as == "Mss") == c(21,24,25))
 }
-## method="both.sides" helps:  no 4-letters, and only 4 3-letters:
+## and without distinguishing vowels:
+st.abb2 <- abbreviate(state.name, 2, FALSE)
+cbind(st.abb, st.abb2)[st.abb2 != st.abb, ]
+
+## method = "both.sides" helps:  no 4-letters, and only 4 3-letters:
 st.ab2 <- abbreviate(state.name, 2, method = "both")
 table(nchar(st.ab2))
 ## Compare the two methods:
diff --git a/src/library/base/man/agrep.Rd b/src/library/base/man/agrep.Rd
index 926c65d..748f87a 100644
--- a/src/library/base/man/agrep.Rd
+++ b/src/library/base/man/agrep.Rd
@@ -1,6 +1,6 @@
 % File src/library/base/man/agrep.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2014 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2015 R Core Team
 % Distributed under GPL 2 or later
 
 \name{agrep}
@@ -76,7 +76,7 @@ agrepl(pattern, x, max.distance = 0.1, costs = NULL,
   another.
 
   This uses \code{tre} by Ville Laurikari
-  (\url{http://http://laurikari.net/tre/}), which supports MBCS
+  (\url{http://laurikari.net/tre/}), which supports MBCS
   character matching.
 
   The main effect of \code{useBytes} is to avoid errors/warnings about
diff --git a/src/library/base/man/all.Rd b/src/library/base/man/all.Rd
index dc37106..9c09554 100644
--- a/src/library/base/man/all.Rd
+++ b/src/library/base/man/all.Rd
@@ -1,5 +1,5 @@
 % File src/library/base/man/all.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2010 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/base/man/all.equal.Rd b/src/library/base/man/all.equal.Rd
index acc6138..fb8b4db 100644
--- a/src/library/base/man/all.equal.Rd
+++ b/src/library/base/man/all.equal.Rd
@@ -1,16 +1,16 @@
 % File src/library/base/man/all.equal.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2014 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2017 R Core Team
 % Distributed under GPL 2 or later
 
-\newcommand{\sspace}{\ifelse{latex}{\out{~}}{ }}
-
 \name{all.equal}
 \title{Test if Two Objects are (Nearly) Equal}
 \alias{all.equal}
 \alias{all.equal.default}
 \alias{all.equal.numeric}
 \alias{all.equal.character}
+\alias{all.equal.environment}
+\alias{all.equal.envRefClass}
 \alias{all.equal.factor}
 \alias{all.equal.formula}
 \alias{all.equal.list}
@@ -25,12 +25,14 @@
 all.equal(target, current, \dots)
 
 \method{all.equal}{numeric}(target, current,
-          tolerance = .Machine$double.eps ^ 0.5, scale = NULL,
+          tolerance = sqrt(.Machine$double.eps), scale = NULL,
           \dots, check.attributes = TRUE)
 
 \method{all.equal}{list}(target, current, \dots,
           check.attributes = TRUE, use.names = TRUE)
 
+\method{all.equal}{environment}(target, current, all.names=TRUE, \dots)
+
 \method{all.equal}{POSIXt}(target, current, \dots, tolerance = 1e-3, scale)
 
 
@@ -53,6 +55,8 @@ attr.all.equal(target, current, \dots,
     should report differing components by name (if matching) instead of
     integer index.  Note that this comes after \code{\dots} and so must
     be specified by its full name.}
+  \item{all.names}{logical passed to \code{\link{ls}} indicating if
+    \dQuote{hidden} objects should also be considered in the environments.}
   \item{check.names}{logical indicating if the \code{\link{names}(.)}
     of \code{target} and \code{current} should be compared.}
 }
@@ -70,17 +74,21 @@ attr.all.equal(target, current, \dots,
   \code{\link{methods}("all.equal")}, but note that the default method
   also does some dispatching, e.g.\sspace{}using the raw method for logical
   targets.
-  
+
   Remember that arguments which follow \code{\dots} must be specified by
-  (unabbreviated) name: some of them were before \code{\dots} prior to
-  \R 3.1.0.  It is inadvisable to pass unnamed arguments in \code{\dots}
-  as these will match different arguments in different methods.
-  
-  Numerical comparisons for \code{scale = NULL} (the default) are done
-  by first computing the mean absolute difference of the two numerical
-  vectors.  If this is smaller than \code{tolerance} or not finite,
-  absolute differences are used, otherwise relative differences scaled
-  by the mean absolute difference.
+  (unabbreviated) name.  It is inadvisable to pass unnamed arguments in
+  \code{\dots} as these will match different arguments in different
+  methods.
+
+  Numerical comparisons for \code{scale = NULL} (the default) are
+  typically on \emph{relative difference} scale unless the target values
+  are close to zero:  First, the mean absolute difference of the two
+  numerical vectors is computed.  If this is smaller than
+  \code{tolerance} or not finite, absolute differences are used,
+  otherwise relative differences scaled by the mean absolute
+  \code{target} value.
+  (Note that these comparisons are computed only for those vector elements
+  where \code{target} is not \code{\link{NA}} and differs from \code{current}.)
 
   If \code{scale} is positive, absolute comparisons are made after
   scaling (dividing) by \code{scale}.
@@ -94,6 +102,10 @@ attr.all.equal(target, current, \dots,
   arguments, as long as both are \dQuote{list-like}, i.e., fulfill
   either \code{\link{is.vector}} or \code{\link{is.list}}.
 
+  The \code{\link{environment}} method works via the \code{list} method,
+  and is also used for reference classes (unless a specific
+  \code{all.equal} method is defined).
+
   The methods for the date-time classes by default allow a tolerance of
   \code{tolerance = 0.001} seconds, and ignore \code{scale}.
 
@@ -123,6 +135,13 @@ stopifnot(
 all.equal(tan(d45), rep(1, 10)))          # TRUE, but
 all      (tan(d45) == rep(1, 10))         # FALSE, since not exactly
 all.equal(tan(d45), rep(1, 10), tolerance = 0)  # to see difference
+
+## advanced: equality of environments
+ae <- all.equal(as.environment("package:stats"),
+                asNamespace("stats"))
+stopifnot(is.character(ae), length(ae) > 10,
+          ## were incorrectly "considered equal" in R <= 3.1.1
+          all.equal(asNamespace("stats"), asNamespace("stats")))
 }
 \keyword{programming}% is.*
 \keyword{utilities}
diff --git a/src/library/base/man/allnames.Rd b/src/library/base/man/allnames.Rd
index 0eefffe..4007cd3 100644
--- a/src/library/base/man/allnames.Rd
+++ b/src/library/base/man/allnames.Rd
@@ -1,5 +1,5 @@
 % File src/library/base/man/allnames.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2011 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/base/man/any.Rd b/src/library/base/man/any.Rd
index 462d385..87e4c2e 100644
--- a/src/library/base/man/any.Rd
+++ b/src/library/base/man/any.Rd
@@ -1,5 +1,5 @@
 % File src/library/base/man/any.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2010 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/base/man/aperm.Rd b/src/library/base/man/aperm.Rd
index 74c831a..2c190cc 100644
--- a/src/library/base/man/aperm.Rd
+++ b/src/library/base/man/aperm.Rd
@@ -1,5 +1,5 @@
 % File src/library/base/man/aperm.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2010 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/base/man/append.Rd b/src/library/base/man/append.Rd
index 4045274..48a5fc1 100644
--- a/src/library/base/man/append.Rd
+++ b/src/library/base/man/append.Rd
@@ -1,5 +1,5 @@
 % File src/library/base/man/append.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2012 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/base/man/apply.Rd b/src/library/base/man/apply.Rd
index dcb974b..da46739 100644
--- a/src/library/base/man/apply.Rd
+++ b/src/library/base/man/apply.Rd
@@ -1,6 +1,6 @@
 % File src/library/base/man/apply.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2011 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright (C) 1995-2015 R Core Team
 % Distributed under GPL 2 or later
 
 \name{apply}
@@ -86,6 +86,29 @@ stopifnot( apply(x, 2, is.vector))
 ## Sort the columns of a matrix
 apply(x, 2, sort)
 
+## keeping named dimnames
+names(dimnames(x)) <- c("row", "col")
+x3 <- array(x, dim = c(dim(x),3),
+	    dimnames = c(dimnames(x), list(C = paste0("cop.",1:3))))
+identical(x,  apply( x,  2,  identity))
+identical(x3, apply(x3, 2:3, identity))
+\dontshow{
+xN <- x; dimnames(xN) <- list(row=NULL, col=NULL)
+x2 <- x; names(dimnames(x2)) <- NULL
+fXY <- function(u) c(X=u[1], Y=u[2])
+ax1 <- apply(x, 1, fXY)
+ax2 <- apply(x2,1, fXY)
+stopifnot(identical(dimnames(ax1), list(col=c("X.x1", "Y.x2"), row=letters[1:8])),
+          identical(dimnames(ax2), unname(dimnames(ax1))),
+          identical( x, apply( x, 2, identity)),
+          identical(xN, apply(xN, 2, identity)),
+	  identical(dimnames(x),
+		    dimnames(apply(x, 2, format))),
+          identical(x3, apply(x3, 2:3, identity)),
+	  identical(dimnames(apply(x3, 2:1, identity)),
+		    dimnames(x3)[3:1]))
+rm(xN, x2, fXY, ax1, ax2)
+}
 ##- function with extra args:
 cave <- function(x, c1, c2) c(mean(x[c1]), mean(x[c2]))
 apply(x, 1, cave,  c1 = "x1", c2 = c("x1","x2"))
diff --git a/src/library/base/man/args.Rd b/src/library/base/man/args.Rd
index be6cf5e..1fb6f78 100644
--- a/src/library/base/man/args.Rd
+++ b/src/library/base/man/args.Rd
@@ -1,6 +1,6 @@
 % File src/library/base/man/args.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2007 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2007, 2015 R Core Team
 % Distributed under GPL 2 or later
 
 \name{args}
@@ -39,11 +39,28 @@ args(name)
   Wadsworth & Brooks/Cole.
 }
 \seealso{
-  \code{\link{formals}},
-  \code{\link{help}}.
+  \code{\link{formals}}, \code{\link{help}};
+  \code{\link{str}} also prints the argument list of a function.
 }
 \examples{
-args(c)
+## "regular" (non-primitive) functions "print their arguments"
+## (by returning another function with NULL body which you also see):
+args(ls)
 args(graphics::plot.default)
+utils::str(ls) # (just "prints": does not show a NULL)
+
+## You can also pass a string naming a function.
+args("scan")
+## ...but :: package specification doesn't work in this case.
+tryCatch(args("graphics::plot.default"), error = print)
+
+## As explained above, args() gives a function with empty body:
+list(is.f = is.function(args(scan)), body = body(args(scan)))
+
+## Primitive functions mostly behave like non-primitive functions.
+args(c)
+args(`+`)
+## primitive functions without well-defined argument list return NULL:
+args(`if`)
 }
 \keyword{documentation}
diff --git a/src/library/base/man/array.Rd b/src/library/base/man/array.Rd
index 781324f..3cbadf8 100644
--- a/src/library/base/man/array.Rd
+++ b/src/library/base/man/array.Rd
@@ -1,6 +1,6 @@
 % File src/library/base/man/array.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2013 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2017 R Core Team
 % Distributed under GPL 2 or later
 
 \name{array}
@@ -86,9 +86,6 @@ is.array(x)
 }
 \note{
   \code{is.array} is a \link{primitive} function.
-
-  \R 2.x.y allowed (although documented not to) a zero-length \code{dim}
-  argument, and returned a vector of length one.
 }
 \references{
   Becker, R. A., Chambers, J. M. and Wilks, A. R. (1988)
diff --git a/src/library/base/man/as.Date.Rd b/src/library/base/man/as.Date.Rd
index 830580c..784bac5 100644
--- a/src/library/base/man/as.Date.Rd
+++ b/src/library/base/man/as.Date.Rd
@@ -1,6 +1,6 @@
 % File src/library/base/man/as.Date.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2013 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2015 R Core Team
 % Distributed under GPL 2 or later
 
 \name{as.Date}
@@ -115,9 +115,7 @@ as.Date(x, \dots)
   \emph{ISO 8601. Data elements and interchange formats --
     Information interchange -- Representation of dates and times.}
   For links to versions available on-line see (at the time of writing)
-  \url{http://www.qsl.net/g1smd/isopdf.htm}; for information on the
-  current official version, see
-  \url{http://www.iso.org/iso/en/prods-services/popstds/datesandtime.html}.
+  \url{http://www.qsl.net/g1smd/isopdf.htm}.
 }
 \seealso{
   \link{Date} for details of the date class;
diff --git a/src/library/base/man/as.POSIXlt.Rd b/src/library/base/man/as.POSIXlt.Rd
index 63d0cb0..057e367 100644
--- a/src/library/base/man/as.POSIXlt.Rd
+++ b/src/library/base/man/as.POSIXlt.Rd
@@ -1,5 +1,5 @@
 % File src/library/base/man/as.POSIXlt.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2014 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/base/man/as.data.frame.Rd b/src/library/base/man/as.data.frame.Rd
index f1f0424..d75cbda 100644
--- a/src/library/base/man/as.data.frame.Rd
+++ b/src/library/base/man/as.data.frame.Rd
@@ -1,9 +1,10 @@
 % File src/library/base/man/as.data.frame.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2007 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2016 R Core Team
 % Distributed under GPL 2 or later
 
 \name{as.data.frame}
+\title{Coerce to a Data Frame}
 \alias{as.data.frame}
 \alias{is.data.frame}
 \alias{as.data.frame.AsIs}
@@ -18,6 +19,7 @@
 \alias{as.data.frame.raw}
 \alias{as.data.frame.matrix}
 \alias{as.data.frame.model.matrix}
+\alias{as.data.frame.noquote}
 \alias{as.data.frame.numeric}
 \alias{as.data.frame.ordered}
 \alias{as.data.frame.ts}
@@ -25,9 +27,6 @@
 \alias{as.data.frame.array}
 \alias{as.data.frame.difftime}
 
-\title{
-  Coerce to a Data Frame
-}
 \description{
   Functions to check if an object is a data frame, or coerce it if possible.
 }
@@ -37,6 +36,10 @@ as.data.frame(x, row.names = NULL, optional = FALSE, \dots)
 \method{as.data.frame}{character}(x, \dots,
               stringsAsFactors = default.stringsAsFactors())
 
+\method{as.data.frame}{list}(x, row.names = NULL, optional = FALSE, \dots,
+              cut.names = FALSE, col.names = names(x), fix.empty.names = TRUE,
+              stringsAsFactors = default.stringsAsFactors())
+
 \method{as.data.frame}{matrix}(x, row.names = NULL, optional = FALSE, \dots,
               stringsAsFactors = default.stringsAsFactors())
 
@@ -48,10 +51,20 @@ is.data.frame(x)
     names for the data frame.  Missing values are not allowed.}
   \item{optional}{logical. If \code{TRUE}, setting row names and
     converting column names (to syntactic names: see
-    \code{\link{make.names}}) is optional.}
+    \code{\link{make.names}}) is optional.  Note that all of \R's
+    \pkg{base} package \code{as.data.frame()} methods use
+    \code{optional} only for column names treatment, basically with the
+    meaning of \code{\link{data.frame}(*, check.names = !optional)}.}
   \item{\dots}{additional arguments to be passed to or from methods.}
   \item{stringsAsFactors}{logical: should the character vector be converted
     to a factor?}
+  %% list method:
+  \item{cut.names}{logical or integer; indicating if column names with
+    more than 256 (or \code{cut.names} if that is numeric) characters
+    should be shortened (and the last 6 characters replaced by \code{" ..."}).}
+  \item{col.names}{(optional) character vector of column names.}
+  \item{fix.empty.names}{logical indicating if empty column names, i.e.,
+    \code{""} should be fixed up (in \code{\link{data.frame}}) or not.}
 }
 \value{
   \code{as.data.frame} returns a data frame, normally with all row names
@@ -63,7 +76,9 @@ is.data.frame(x)
 }
 \details{
   \code{as.data.frame} is a generic function with many methods, and
-  users and packages can supply further methods.
+  users and packages can supply further methods.  For classes that act
+  as vectors, often a copy of \code{as.data.frame.vector} will work
+  as the method.
 
   If a list is supplied, each element is converted to a column in the
   data frame.  Similarly, each column of a matrix is converted separately.
diff --git a/src/library/base/man/as.environment.Rd b/src/library/base/man/as.environment.Rd
index 00b997a..9fe415d 100644
--- a/src/library/base/man/as.environment.Rd
+++ b/src/library/base/man/as.environment.Rd
@@ -1,5 +1,5 @@
 % File src/library/base/man/as.environment.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2013 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/base/man/as.function.Rd b/src/library/base/man/as.function.Rd
index 20055f8..9aa5d2e 100644
--- a/src/library/base/man/as.function.Rd
+++ b/src/library/base/man/as.function.Rd
@@ -1,5 +1,5 @@
 % File src/library/base/man/as.function.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2007 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/base/man/assign.Rd b/src/library/base/man/assign.Rd
index d5b1bd9..b62f422 100644
--- a/src/library/base/man/assign.Rd
+++ b/src/library/base/man/assign.Rd
@@ -1,6 +1,6 @@
 % File src/library/base/man/assign.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2013 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2016 R Core Team
 % Distributed under GPL 2 or later
 
 \name{assign}
@@ -72,7 +72,7 @@ assign(x, value, pos = -1, envir = as.environment(pos),
 
 \seealso{
   \code{\link{<-}},
-  \code{\link{get}},
+  \code{\link{get}}, the inverse of \code{assign()},
   \code{\link{exists}},
   \code{\link{environment}}.
 }
diff --git a/src/library/base/man/assignOps.Rd b/src/library/base/man/assignOps.Rd
index 6e21f04..babcef6 100644
--- a/src/library/base/man/assignOps.Rd
+++ b/src/library/base/man/assignOps.Rd
@@ -1,6 +1,6 @@
 % File src/library/base/man/assignOps.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2007 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2017 R Core Team
 % Distributed under GPL 2 or later
 
 \name{assignOps}
@@ -37,7 +37,7 @@
   or as one of the subexpressions in a braced list of expressions.
 
   The operators \code{<<-} and \code{->>} are normally only used in
-  functions, and cause a search to made through parent environments
+  functions, and cause a search to be made through parent environments
   for an existing definition of the variable being assigned.  If such
   a variable is found (and its binding is not locked) then its value
   is redefined, otherwise assignment takes place in the global
@@ -62,14 +62,15 @@
   \emph{The New S Language}.
   Wadsworth & Brooks/Cole.
 
-  Chamber, J. M. (1998)
+  Chambers, J. M. (1998)
   \emph{Programming with Data.  A Guide to the S Language}.
   Springer (for \code{=}).
 }
 
 \seealso{
-  \code{\link{assign}}, for \dQuote{subassignment} such
-  as \code{x[i] <- v}, \code{\link{[<-}}; % ./Extract.Rd
-  \code{\link{environment}}.
+  \code{\link{assign}} (and its inverse \code{\link{get}}),
+  for \dQuote{subassignment} such as \code{x[i] <- v},
+  see \code{\link{[<-}}; % ./Extract.Rd
+  further, \code{\link{environment}}.
 }
 \keyword{data}
diff --git a/src/library/base/man/attach.Rd b/src/library/base/man/attach.Rd
index 66fd0b4..7676121 100644
--- a/src/library/base/man/attach.Rd
+++ b/src/library/base/man/attach.Rd
@@ -1,6 +1,6 @@
 % File src/library/base/man/attach.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2013 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2016 R Core Team
 % Distributed under GPL 2 or later
 
 \name{attach}
@@ -73,7 +73,7 @@ attach(what, pos = 2L, name = deparse(substitute(what)),
 
   There are hooks to attach user-defined table objects of class
   \code{"UserDefinedDatabase"}, supported by the Omegahat package
-  \pkg{RObjectTables}.  See \url{http://www.omegahat.org/RObjectTables/}.
+  \pkg{RObjectTables}.  See \url{http://www.omegahat.net/RObjectTables/}.
 }
 
 \value{
@@ -87,7 +87,9 @@ attach(what, pos = 2L, name = deparse(substitute(what)),
   People do often forget to \code{\link{detach}} databases.
 
   In interactive use, \code{\link{with}} is usually preferable to the
-  use of \code{attach}/\code{detach}.
+  use of \code{attach}/\code{detach}, unless \code{what} is a
+  \code{\link{save}()}-produced file in which case
+  \code{attach()} is a (safety) wrapper for \code{\link{load}()}.
 
   In programming, functions should not change the search path unless
   that is their purpose.  Often \code{\link{with}} can be used within a
diff --git a/src/library/base/man/attr.Rd b/src/library/base/man/attr.Rd
index c53bbc8..8815e52 100644
--- a/src/library/base/man/attr.Rd
+++ b/src/library/base/man/attr.Rd
@@ -1,6 +1,6 @@
 % File src/library/base/man/attr.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2010 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2017 R Core Team
 % Distributed under GPL 2 or later
 
 \name{attr}
@@ -46,6 +46,9 @@ attr(x, which) <- value
   The extractor function allows (and does not match) empty and missing
   values of \code{which}: the replacement function does not.
 
+  \code{\link{NULL}} objects cannot have attributes and attempting to
+  assign one by \code{attr} gives an error.
+
   Both are \link{primitive} functions.
 }
 \value{
diff --git a/src/library/base/man/attributes.Rd b/src/library/base/man/attributes.Rd
index 68dfee2..1a1db95 100644
--- a/src/library/base/man/attributes.Rd
+++ b/src/library/base/man/attributes.Rd
@@ -1,6 +1,6 @@
 % File src/library/base/man/attributes.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2011 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2017 R Core Team
 % Distributed under GPL 2 or later
 
 \name{attributes}
@@ -55,6 +55,9 @@ mostattributes(obj) <- value
   The names of a pairlist are not stored as attributes, but are reported
   as if they were (and can be set by the replacement form of
   \code{attributes}).
+  
+  \code{\link{NULL}} objects cannot have attributes and attempts to
+  assign them will promote the object to an empty list.
 
   Both assignment and replacement forms of \code{attributes} are
   \link{primitive} functions.
@@ -64,7 +67,8 @@ mostattributes(obj) <- value
   \emph{The New S Language}.
   Wadsworth & Brooks/Cole.
 }
-\seealso{\code{\link{attr}}.
+\seealso{
+  \code{\link{attr}},  \code{\link{structure}}.
 }
 \examples{
 x <- cbind(a = 1:3, pi = pi) # simple matrix with dimnames
diff --git a/src/library/base/man/autoload.Rd b/src/library/base/man/autoload.Rd
index ed57210..7037fcd 100644
--- a/src/library/base/man/autoload.Rd
+++ b/src/library/base/man/autoload.Rd
@@ -1,5 +1,5 @@
 % File src/library/base/man/autoload.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2007 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/base/man/backsolve.Rd b/src/library/base/man/backsolve.Rd
index ba4a3e7..528d548 100644
--- a/src/library/base/man/backsolve.Rd
+++ b/src/library/base/man/backsolve.Rd
@@ -1,6 +1,6 @@
 % File src/library/base/man/backsolve.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2013 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2014 R Core Team
 % Distributed under GPL 2 or later
 
 \name{backsolve}
diff --git a/src/library/base/man/base-defunct.Rd b/src/library/base/man/base-defunct.Rd
index 2840623..3d7d9be 100644
--- a/src/library/base/man/base-defunct.Rd
+++ b/src/library/base/man/base-defunct.Rd
@@ -1,6 +1,6 @@
 % File src/library/base/man/base-defunct.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2013 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2016 R Core Team
 % Distributed under GPL 2 or later
 
 \name{base-defunct}
@@ -189,7 +189,7 @@ is.real(x)
   references to the same object.  There is no direct replacement.  Where
   multiple references to a single object are required for semantic
   reasons consider using environments or external pointers.  There are
-  some notes on \url{http://developer.r-project.org}.
+  some notes on \url{https://developer.r-project.org}.
 
   \code{.Dyn.libs} and \code{.lib.loc} were internal variables used for
   storing and manipulating the information about packages with DLLs, and
diff --git a/src/library/base/man/base-deprecated.Rd b/src/library/base/man/base-deprecated.Rd
index 4882491..aef891f 100644
--- a/src/library/base/man/base-deprecated.Rd
+++ b/src/library/base/man/base-deprecated.Rd
@@ -1,5 +1,5 @@
 % File src/library/base/man/base-deprecated.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2013 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/base/man/base-internal.Rd b/src/library/base/man/base-internal.Rd
index 50dcd6d..7eac0b4 100644
--- a/src/library/base/man/base-internal.Rd
+++ b/src/library/base/man/base-internal.Rd
@@ -1,6 +1,6 @@
 % File src/library/base/man/base-internal.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2014 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2016 R Core Team
 % Distributed under GPL 2 or later
 
 \name{base-internal}
@@ -52,8 +52,8 @@
 \alias{.C_R_stopbcprof}
 
 \title{Internal Objects in Package \pkg{base}}
-\description{
-  Internal objects in the base package which are only user-visible
+\description{% 'most': see e.g., .mapply
+  Internal objects in the base package most of which are only user-visible
   because of the special nature of the base namespace.
 }
 \usage{
@@ -213,7 +213,7 @@ lazyLoadDBfetch(key, file, compressed, hook)
   respectively.
 
   \code{.POSIXct}, \code{.POSIXlt} and \code{.difftime} are class
-  generators added in \R 2.11.0.
+  generators.
 
   \code{.cache_class} caches the inheritance of an S4 class for use in
   S3 method dispatch.  With \code{NULL} second argument it returns the
diff --git a/src/library/base/man/base-package.Rd b/src/library/base/man/base-package.Rd
index f94c90b..7a1915c 100644
--- a/src/library/base/man/base-package.Rd
+++ b/src/library/base/man/base-package.Rd
@@ -1,5 +1,5 @@
 % File src/library/base/man/base-package.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2007 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/base/man/basename.Rd b/src/library/base/man/basename.Rd
index 9eeeb1c..6b6d852 100644
--- a/src/library/base/man/basename.Rd
+++ b/src/library/base/man/basename.Rd
@@ -1,5 +1,5 @@
 % File src/library/base/man/basename.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2013 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/base/man/bincode.Rd b/src/library/base/man/bincode.Rd
index c9020db..2b2b6f8 100644
--- a/src/library/base/man/bincode.Rd
+++ b/src/library/base/man/bincode.Rd
@@ -1,5 +1,5 @@
 % File src/library/base/man/bincode.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2012 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/base/man/bindenv.Rd b/src/library/base/man/bindenv.Rd
index d45c2b7..4453b49 100644
--- a/src/library/base/man/bindenv.Rd
+++ b/src/library/base/man/bindenv.Rd
@@ -1,6 +1,6 @@
 % File src/library/base/man/bindenv.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2014 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2016 R Core Team
 % Distributed under GPL 2 or later
 
 \name{bindenv}
@@ -30,7 +30,7 @@ bindingIsActive(sym, env)
   \item{fun}{a function taking zero or one arguments.}
 }
 \description{
-  These functions represent an experimental interface for adjustments
+  These functions represent an interface for adjustments
   to environments and bindings within environments.  They allow for
   locking environments as well as individual bindings, and for linking
   a variable to a function.
diff --git a/src/library/base/man/bitwise.Rd b/src/library/base/man/bitwise.Rd
index b69818b..fa27fff 100644
--- a/src/library/base/man/bitwise.Rd
+++ b/src/library/base/man/bitwise.Rd
@@ -1,6 +1,6 @@
 % File src/library/base/man/octmode.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 2012 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 2016-2017 R Core Team
 % Distributed under GPL 2 or later
 
 \name{bitwise}
@@ -45,20 +45,29 @@ bitwShiftR(a, n)
 \seealso{
   The logical operators, \code{\link{!}},  \code{\link{&}},
   \code{\link{|}}, \code{\link{xor}}.
+  Notably these \emph{do} work bitwise for \code{\link{raw}} arguments.
 
-  The classes \code{"octmode"} and \code{"hexmnode"} whose
+  The classes \code{"\link{octmode}"} and \code{"\link{hexmode}"} whose
   implementation of the standard logical operators is based on these
   functions.
 
-  Package \pkg{bitOps} has similar functions for numeric vectors which
+  Package \CRANpkg{bitops} has similar functions for numeric vectors which
   differ in the way they treat integers \eqn{2^{31}}{2^31} or larger.
 }
 
 \examples{
-bitwAnd(15L, 7L)
-bitwOr(15L, 7L)
-bitwXor(15L, 7L)
-bitwXor(-1L, 1L)
+bitwNot(0:12) # -1 -2  ... -13
+bitwAnd(15L, 7L) #  7
+bitwOr (15L, 7L) # 15
+bitwXor(15L, 7L) #  8
+bitwXor(-1L, 1L) # -2
+
+## The "same" for 'raw' instead of integer :
+rr12 <- as.raw(0:12) ; rbind(rr12, !rr12)
+c(r15 <- as.raw(15), r7 <- as.raw(7)) #  0f 07
+r15 & r7    # 07
+r15 | r7    # 0f
+xor(r15, r7)# 08
 
 bitwShiftR(-1, 1:31) # shifts of 2^32-1 = 4294967295
 }
diff --git a/src/library/base/man/body.Rd b/src/library/base/man/body.Rd
index 4e90d4c..eafa008 100644
--- a/src/library/base/man/body.Rd
+++ b/src/library/base/man/body.Rd
@@ -1,6 +1,6 @@
 % File src/library/base/man/body.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2014 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2016 R Core Team
 % Distributed under GPL 2 or later
 
 \name{body}
@@ -60,5 +60,8 @@ e <- expression(y <- x^2, return(y)) # or a list
 body(f) <- as.call(c(as.name("{"), e))
 f
 f(8)
+%% Rd parser bug? : need to backslash-escape the "{" below:
+## Using substitute() may be simpler than 'as.call(c(as.name("\{",..)))':
+stopifnot(identical(body(f), substitute({ y <- x^2; return(y) })))
 }
 \keyword{programming}
diff --git a/src/library/base/man/bquote.Rd b/src/library/base/man/bquote.Rd
index 5646a72..2f8b755 100644
--- a/src/library/base/man/bquote.Rd
+++ b/src/library/base/man/bquote.Rd
@@ -1,5 +1,5 @@
 % File src/library/base/man/bquote.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2014 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/base/man/browser.Rd b/src/library/base/man/browser.Rd
index 303bae4..9defaaf 100644
--- a/src/library/base/man/browser.Rd
+++ b/src/library/base/man/browser.Rd
@@ -1,5 +1,5 @@
 % File src/library/base/man/browser.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2014 R Core Team
 % Distributed under GPL 2 or later
 
@@ -62,6 +62,10 @@ browser(text = "", condition = NULL, expr = TRUE, skipCalls = 0L)
       function calls.  Again, byte compiled functions make
       \code{s} equivalent to \code{c}.}
     \item{\code{where}}{print a stack trace of all active function calls.}
+    \item{\code{r}}{invoke a \code{"resume"} restart if one is
+      available; interpreted as an \R expression otherwise. Typically
+      \code{"resume"} restarts are established for continuing from user
+      interrupts.}
     \item{\code{Q}}{exit the browser and the current evaluation and
       return to the top-level prompt.}
   }
diff --git a/src/library/base/man/browserText.Rd b/src/library/base/man/browserText.Rd
index e88304e..591cf24 100644
--- a/src/library/base/man/browserText.Rd
+++ b/src/library/base/man/browserText.Rd
@@ -1,5 +1,5 @@
 % File src/library/base/man/browserText.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2011 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/base/man/builtins.Rd b/src/library/base/man/builtins.Rd
index a0a417d..9f56a85 100644
--- a/src/library/base/man/builtins.Rd
+++ b/src/library/base/man/builtins.Rd
@@ -1,5 +1,5 @@
 % File src/library/base/man/builtins.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2007 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/base/man/by.Rd b/src/library/base/man/by.Rd
index 6e7329b..901cfb1 100644
--- a/src/library/base/man/by.Rd
+++ b/src/library/base/man/by.Rd
@@ -1,5 +1,5 @@
 % File src/library/base/man/by.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2014 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/base/man/c.Rd b/src/library/base/man/c.Rd
index 3a02273..c7773c9 100644
--- a/src/library/base/man/c.Rd
+++ b/src/library/base/man/c.Rd
@@ -1,14 +1,17 @@
 % File src/library/base/man/c.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2013 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2017 R Core Team
 % Distributed under GPL 2 or later
-
 \name{c}
 \title{Combine Values into a Vector or List}
+\alias{c}
+\alias{c.default}% existing "conceptually", see ../../tools/R/QC.R
 \usage{
-c(\dots, recursive = FALSE)
+## S3 Generic function
+c(\dots)
+
+\S3method{c}{default}(\dots, recursive = FALSE, use.names = TRUE)
 }
-\alias{c}
 \description{
   This is a generic function which combines its arguments.
 
@@ -21,18 +24,26 @@ c(\dots, recursive = FALSE)
   \item{recursive}{logical.  If \code{recursive = TRUE}, the function
     recursively descends through lists (and pairlists) combining all
     their elements into a vector.}
+  \item{use.names}{logical indicating if \code{\link{names}} should be
+    preserved.}
 }
 \details{
   The output type is determined from the highest type of the components
   in the hierarchy NULL < raw < logical < integer < double < complex < character
-  < list < expression.  Pairlists are treated as lists, but non-vector
+  < list < expression.  Pairlists are treated as lists, whereas non-vector
   components (such names and calls) are treated as one-element lists
   which cannot be unlisted even if \code{recursive = TRUE}.
 
+  %% Should we say "(currently)" ?
+  Note that \code{\link{factor}}s are treated only via their
+  internal \code{\link{integer}} codes; one proposal has been to use
+\preformatted{   c.factor <- function(..., recursive=TRUE) unlist(list(...), recursive=recursive)}
+  if factor concatenation by \code{c()} should give a \code{\link{factor}}.
+
   \code{c} is sometimes used for its side effect of removing attributes
   except names, for example to turn an array into a vector.
   \code{as.vector} is a more intuitive way to do this, but also drops
-  names.  Note too that methods other than the default are not required
+  names.  Note that methods other than the default are not required
   to do this (and they will almost certainly preserve a class attribute).
 
   This is a \link{primitive} function.
@@ -43,7 +54,7 @@ c(\dots, recursive = FALSE)
 }
 \section{S4 methods}{
   This function is S4 generic, but with argument list
-  \code{(x, ..., recursive = FALSE)}.
+  \code{(x, ...)}.
 }
 \references{
   Becker, R. A., Chambers, J. M. and Wilks, A. R. (1988)
diff --git a/src/library/base/man/call.Rd b/src/library/base/man/call.Rd
index e9fdafb..d0926d4 100644
--- a/src/library/base/man/call.Rd
+++ b/src/library/base/man/call.Rd
@@ -1,5 +1,5 @@
 % File src/library/base/man/call.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2013 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/base/man/callCC.Rd b/src/library/base/man/callCC.Rd
index 4b9d9d2..8022aaa 100644
--- a/src/library/base/man/callCC.Rd
+++ b/src/library/base/man/callCC.Rd
@@ -1,5 +1,5 @@
 % File src/library/base/man/callCC.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2007 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/base/man/capabilities.Rd b/src/library/base/man/capabilities.Rd
index 79573c2..fb3805b 100644
--- a/src/library/base/man/capabilities.Rd
+++ b/src/library/base/man/capabilities.Rd
@@ -1,6 +1,6 @@
 % File src/library/base/man/capabilities.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2014 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2015 R Core Team
 % Distributed under GPL 2 or later
 
 \name{capabilities}
@@ -18,7 +18,7 @@ capabilities(what = NULL)
     required components.  \code{NULL} implies that all are required.}
 }
 #ifdef unix
-\section{Note to OS X users}{
+\section{Note to macOS users}{
   Capabilities \code{"jpeg"}, \code{"png"} and \code{"tiff"} refer to
   the X11-based versions of these devices.  If
   \code{capabilities("aqua")} is true, then these devices with
@@ -30,69 +30,91 @@ capabilities(what = NULL)
 #endif
 \value{
   A named logical vector.  Current components are
-    \item{jpeg}{is the \code{\link{jpeg}} function operational?}
-    \item{png}{is the \code{\link{png}} function operational?}
-    \item{tiff}{is the \code{\link{tiff}} function operational?}
-    \item{tcltk}{is the \pkg{tcltk} package operational?
+  \item{jpeg}{is the \code{\link{jpeg}} function operational?}
+  \item{png}{is the \code{\link{png}} function operational?}
+  \item{tiff}{is the \code{\link{tiff}} function operational?}
+  \item{tcltk}{is the \pkg{tcltk} package operational?
 #ifdef unix
-      Note that to make use of Tk you will almost always need to check
-      that \code{"X11"} is also available.
+    Note that to make use of Tk you will almost always need to check
+    that \code{"X11"} is also available.
 #endif
-    }
+  }
 #ifdef unix
-    \item{X11}{Are the \code{\link{X11}} graphics device and the
-      X11-based data editor available?  This loads the X11 module if not
-      already loaded, and checks that the default display can be
-      contacted unless a \code{X11} device has already been used.}
-    \item{aqua}{Are the \code{R.app} GUI components and the
-      \code{\link{quartz}} function operational?  Only on some OS X
-      builds.  Note that this is distinct from
-      \code{.Platform$GUI == "AQUA"}, which is true when using the Mac
-      \code{R.app} GUI console.}
+  \item{X11}{are the \code{\link{X11}} graphics device and the
+    X11-based data editor available?  This loads the X11 module if not
+    already loaded, and checks that the default display can be
+    contacted unless a \code{X11} device has already been used.}
+
+  \item{aqua}{is the \code{\link{quartz}} function operational?
+    Only on some macOS builds, including \acronym{CRAN} binary
+    distributions of \R.
+
+    Note that this is distinct from \code{.Platform$GUI == "AQUA"},
+    which is true only when using the Mac \code{R.app} GUI console.}
 #endif
 #ifdef windows
-    \item{X11}{always \code{FALSE} on Windows.}
-    \item{aqua}{\code{FALSE} except on OS X.}
+  \item{X11}{always \code{FALSE} on Windows.}
+  \item{aqua}{\code{FALSE} except on macOS.}
 #endif
-    \item{http/ftp}{Are \code{\link{url}} and the internal method for
-      \code{\link{download.file}} available?}
-    \item{sockets}{Are \code{\link{make.socket}} and related functions
-      available?}
-    \item{libxml}{is there support for integrating \code{libxml} with
-      the \R event loop?}
-    \item{fifo}{are FIFO \link{connections} supported?}
-    \item{cledit}{is command-line editing available in the current \R
-      session?  This is false in non-interactive sessions.
+  \item{http/ftp}{does the internal method for \code{\link{url}} and
+    \code{\link{download.file}} support \samp{http://} and \samp{ftp://}
+    URLs?  Always \code{TRUE} as from \R 3.3.0.}
+  \item{sockets}{are  \code{\link{make.socket}} and related functions
+    available?  Always \code{TRUE} as from \R 3.3.0.}
+  \item{libxml}{is there support for integrating \code{libxml} with
+    the \R event loop?  Always \code{TRUE} as from \R 3.3.0.}
+  \item{fifo}{are FIFO \link{connections} supported?}
+  \item{cledit}{is command-line editing available in the current \R
+    session?  This is false in non-interactive sessions.
 #ifdef unix
-      It will be true for the command-line interface if \code{readline}
-      support has been compiled in and \option{--no-readline} was
-      \emph{not} used when \R was invoked.  (If \option{--interactive}
-      was used, command-line editing will not actually be available.)
+    It will be true for the command-line interface if \code{readline}
+    support has been compiled in and \option{--no-readline} was
+    \emph{not} used when \R was invoked.  (If \option{--interactive}
+    was used, command-line editing will not actually be available.)
 #endif
-      }
-    \item{iconv}{is internationalization conversion via
-      \code{\link{iconv}} supported?  Always true in current \R.}
-    \item{NLS}{is there Natural Language Support (for message translations)?}
-    \item{profmem}{is there support for memory profiling?  See
-      \code{\link{tracemem}}.}
-    \item{cairo}{is there support the \code{\link{svg}},
-      \code{\link{cairo_pdf}} and \code{\link{cairo_ps}} devices, and
-      for \code{type = "cairo"} in the
+  }
+  \item{iconv}{is internationalization conversion via
+    \code{\link{iconv}} supported?  Always true in current \R.}
+  \item{NLS}{is there Natural Language Support (for message translations)?}
+  \item{profmem}{is there support for memory profiling?  See
+    \code{\link{tracemem}}.}
+  \item{cairo}{is there support for the \code{\link{svg}},
+    \code{\link{cairo_pdf}} and \code{\link{cairo_ps}} devices, and
+    for \code{type = "cairo"} in the
 #ifdef unix
-      \code{\link{X11}},
+    \code{\link{X11}},
 #endif
-      \code{\link{bmp}}, \code{\link{jpeg}}, \code{\link{png}},
-      and \code{\link{tiff}} devices?}
-    \item{ICU}{is ICU used for collation?  See \link{Comparison} and
-      \code{\link{icuSetCollate}}.},
-}
-\seealso{\code{\link{.Platform}}}
+    \code{\link{bmp}}, \code{\link{jpeg}}, \code{\link{png}},
+    and \code{\link{tiff}} devices?}
+
+  \item{ICU}{is ICU available for collation?  See the help on
+    \link{Comparison} and \code{\link{icuSetCollate}}: it is never
+    used for a C locale.}
 
+  \item{long.double}{does this build use a \code{C} \code{long double}
+    type which is longer than \code{double}?  Some platforms do not
+    have such a type, and on others its use can be suppressed by the
+    configure option \option{--disable-long-double}.
+
+    Although not guaranteed, it is a reasonable assumption that if
+    present long doubles will have at least as much range and accuracy
+    as the ISO/IEC 60559 80-bit \sQuote{extended precision} format.
+  }
+
+  \item{libcurl}{is \code{libcurl} available in this build?  Used by
+    function \code{\link{curlGetHeaders}} and optionally by
+    \code{\link{download.file}} and \code{\link{url}}.   As from \R
+    3.3.0 always true for Unix-alikes, and true for CRAN Windows builds.}
+}
+\seealso{\code{\link{.Platform}} and \code{\link{extSoftVersion}} (and
+    links there) for availability capabilities \emph{external} to \R but
+    used from \R functions.
+  }
 \examples{
 capabilities()
 
-if(!capabilities("http/ftp"))
-   warning("internal download.file() is not available")
+if(!capabilities("ICU"))
+   warning("ICU is not available")
 
 ## See also the examples for 'connections'.
 }
diff --git a/src/library/base/man/cat.Rd b/src/library/base/man/cat.Rd
index 29b9161..a431675 100644
--- a/src/library/base/man/cat.Rd
+++ b/src/library/base/man/cat.Rd
@@ -1,6 +1,6 @@
 % File src/library/base/man/cat.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2012 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2014 R Core Team
 % Distributed under GPL 2 or later
 
 \name{cat}
diff --git a/src/library/base/man/cbind.Rd b/src/library/base/man/cbind.Rd
index c7dd77b..f1e1e7b 100644
--- a/src/library/base/man/cbind.Rd
+++ b/src/library/base/man/cbind.Rd
@@ -1,6 +1,6 @@
 % File src/library/base/man/cbind.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2013 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2016 R Core Team
 % Distributed under GPL 2 or later
 
 \name{cbind}
@@ -13,25 +13,34 @@
 \concept{insert}
 \title{Combine R Objects by Rows or Columns}
 \description{
-  Take a sequence of vector, matrix or data frames arguments and combine
+  Take a sequence of vector, matrix or data-frame arguments and combine
   by \emph{c}olumns or \emph{r}ows, respectively.  These are generic
   functions with methods for other \R classes.
 }
 \usage{
 cbind(\dots, deparse.level = 1)
 rbind(\dots, deparse.level = 1)
+\method{rbind}{data.frame}(\dots, deparse.level = 1, make.row.names = TRUE,
+      stringsAsFactors = default.stringsAsFactors())
 }
 \arguments{
-  \item{\dots}{vectors or matrices.  These can be given as named
-    arguments.  Other \R objects will be coerced as appropriate: see
-    sections \sQuote{Details} and \sQuote{Value}.  (For the
-    \code{"data.frame"} method of \code{cbind} these can be further
-    arguments to \code{\link{data.frame}} such as \code{stringsAsFactors}.)}
+  \item{\dots}{(generalized) vectors or matrices.  These can be given as named
+    arguments.  Other \R objects may be coerced as appropriate, or S4
+    methods may be used: see sections \sQuote{Details} and
+    \sQuote{Value}.  (For the \code{"data.frame"} method of \code{cbind}
+    these can be further arguments to \code{\link{data.frame}} such as
+    \code{stringsAsFactors}.)}
   \item{deparse.level}{integer controlling the construction of labels in
     the case of non-matrix-like arguments (for the default method):\cr
     \code{deparse.level = 0} constructs no labels; the default,\cr
     \code{deparse.level = 1 or 2} constructs labels from the argument
     names, see the \sQuote{Value} section below.}
+  \item{make.row.names}{(only for data frame method:) logical
+    indicating if unique and valid \code{\link{row.names}} should be
+    constructed from the arguments.}
+  \item{stringsAsFactors}{logical, passed to \code{\link{as.data.frame}};
+    only has an effect when the \code{\dots} arguments contain a
+    (non-\code{data.frame}) \code{\link{character}}.}
 }
 \details{
   The functions \code{cbind} and \code{rbind} are S3 generic, with
@@ -39,7 +48,12 @@ rbind(\dots, deparse.level = 1)
   least one argument is a data frame and the rest are vectors or
   matrices.  There can be other methods; in particular, there is one for
   time series objects.  See the section on \sQuote{Dispatch} for how
-  the method to be used is selected.
+  the method to be used is selected.  If some of the arguments are of an
+  S4 class, i.e., \code{\link{isS4}(.)} is true, S4 methods are sought
+  also, and the hidden \code{cbind} / \code{rbind} functions
+  from package \pkg{methods} maybe called, which in turn build on
+  \code{\link{cbind2}} or \code{\link{rbind2}}, respectively.  In that
+  case, \code{deparse.level} is obeyed, similarly to the default method.
 
   In the default method, all the vectors/matrices must be atomic (see
   \code{\link{vector}}) or lists.  Expressions are not allowed.
@@ -66,6 +80,11 @@ rbind(\dots, deparse.level = 1)
   \code{NULL}) are ignored unless the result would have zero rows
   (columns), for S compatibility.
   (Zero-extent matrices do not occur in S3 and are not ignored in \R.)
+
+  Matrices are restricted to less than \eqn{2^{31}}{2^31} rows and
+  columns even on 64-bit systems.  So input vectors have the same length
+  restriction: as from \R 3.2.0 input matrices with more elements (but
+  meeting the row and column restrictions) are allowed.
 }
 \section{Data frame methods}{
   The \code{cbind} data frame method is just a wrapper for
@@ -165,6 +184,26 @@ dd <- 10
 rbind(1:4, c = 2, "a++" = 10, dd, deparse.level = 0) # middle 2 rownames
 rbind(1:4, c = 2, "a++" = 10, dd, deparse.level = 1) # 3 rownames (default)
 rbind(1:4, c = 2, "a++" = 10, dd, deparse.level = 2) # 4 rownames
+
+## cheap row names:
+b0 <- gl(3,4, labels=letters[1:3])
+bf <- setNames(b0, paste0("o", seq_along(b0)))
+df  <- data.frame(a = 1, B = b0, f = gl(4,3))
+df. <- data.frame(a = 1, B = bf, f = gl(4,3))
+new <- data.frame(a = 8, B ="B", f = "1")
+(df1  <- rbind(df , new))
+(df.1 <- rbind(df., new))
+stopifnot(identical(df1, rbind(df,  new, make.row.names=FALSE)),
+          identical(df1, rbind(df., new, make.row.names=FALSE)))
+\dontshow{
+## Testing a semi-official use:
+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"))
+row.names(d2) <- attr(d3, "row.names")# = 1:13
+stopifnot(identical(d2, d3))
+}
 }
 \keyword{array}
 \keyword{manip}
diff --git a/src/library/base/man/char.expand.Rd b/src/library/base/man/char.expand.Rd
index f43776d..06a07a1 100644
--- a/src/library/base/man/char.expand.Rd
+++ b/src/library/base/man/char.expand.Rd
@@ -1,5 +1,5 @@
 % File src/library/base/man/char.expand.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2008 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/base/man/character.Rd b/src/library/base/man/character.Rd
index 06d4477..d99c0e3 100644
--- a/src/library/base/man/character.Rd
+++ b/src/library/base/man/character.Rd
@@ -1,6 +1,6 @@
 % File src/library/base/man/character.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2014 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2015 R Core Team
 % Distributed under GPL 2 or later
 
 \name{character}
@@ -61,6 +61,9 @@ is.character(x)
   truncated.
 }
 \seealso{
+  \code{\link{options}}: option \code{scipen} affects the conversion of
+  numbers.
+  
   \code{\link{paste}}, \code{\link{substr}} and \code{\link{strsplit}}
   for character concatenation and splitting,
   \code{\link{chartr}} for character translation and casefolding (e.g.,
diff --git a/src/library/base/man/charmatch.Rd b/src/library/base/man/charmatch.Rd
index 87e186e..9e5c0fb 100644
--- a/src/library/base/man/charmatch.Rd
+++ b/src/library/base/man/charmatch.Rd
@@ -1,6 +1,6 @@
 % File src/library/base/man/charmatch.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2012 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2016 R Core Team
 % Distributed under GPL 2 or later
 
 \name{charmatch}
@@ -43,6 +43,7 @@ charmatch(x, table, nomatch = NA_integer_)
 \seealso{
   \code{\link{pmatch}}, \code{\link{match}}.
 
+  \code{\link{startsWith}} for another matching of initial parts of strings;
   \code{\link{grep}} or \code{\link{regexpr}} for more general (regexp)
   matching of strings.
 }
diff --git a/src/library/base/man/chartr.Rd b/src/library/base/man/chartr.Rd
index 9b4e1ae..8a711d5 100644
--- a/src/library/base/man/chartr.Rd
+++ b/src/library/base/man/chartr.Rd
@@ -1,5 +1,5 @@
 % File src/library/base/man/chartr.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2009 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/base/man/chkDots.Rd b/src/library/base/man/chkDots.Rd
new file mode 100644
index 0000000..7558c7c
--- /dev/null
+++ b/src/library/base/man/chkDots.Rd
@@ -0,0 +1,35 @@
+\name{chkDots}
+\alias{chkDots}
+\title{Warn About Extraneous Arguments in the "..." of Its Caller}
+\description{
+  Warn about extraneous arguments in the \code{...} of its caller.  A
+  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()}.
+}
+\usage{
+chkDots(..., which.call = -1, allowed = character(0))
+}
+\arguments{
+  \item{...}{\dQuote{the dots}, as passed from the caller.}
+  \item{which.call}{passed to \code{\link{sys.call}()}.  A caller may
+    use -2 if the message should mention \emph{its} caller.}
+  \item{allowed}{not yet implemented: character vector of \emph{named}
+    elements in \code{...} which are \dQuote{allowed} and hence not
+    warned about.}
+}
+\author{Martin Maechler, first version outside base, June 2012.}
+\seealso{
+  \code{\link{warning}},  \code{\link{...}}.
+}
+\examples{
+seq.default ## <- you will see  ' chkDots(...) '
+
+seq(1,5, foo = "bar") # gives warning via chkDots()
+
+## warning with more than one ...-entry:
+density.f <- function(x, ...) NextMethod("density")
+x <- density(structure(rnorm(10), class="f"), bar=TRUE, baz=TRUE)
+}
+\keyword{utilities}
diff --git a/src/library/base/man/chol.Rd b/src/library/base/man/chol.Rd
index 06b1140..4375737 100644
--- a/src/library/base/man/chol.Rd
+++ b/src/library/base/man/chol.Rd
@@ -1,6 +1,6 @@
 % File src/library/base/man/chol.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2013 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2015 R Core Team
 % Distributed under GPL 2 or later
 
 \name{chol}
@@ -52,12 +52,14 @@ chol(x, \dots)
   or, alternatively, \code{t(Q) \%*\% Q} equals \code{x[pivot,
     pivot]}.  See the examples.
   
-  Pivoting with LAPACK requires LAPACK >= 3.2 and was added in \R 2.15.2
-  (it was previously available using LINPACK).  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 the pivot is less than
-  \code{tol}.
+  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
+  the pivot is less than \code{tol}.
+
+  Unsuccessful results from the underlying LAPACK code will result in an
+  error giving a positive error code: these can only be interpreted by
+  detailed study of the FORTRAN code.
 }
 
 \section{Warning}{
diff --git a/src/library/base/man/chol2inv.Rd b/src/library/base/man/chol2inv.Rd
index 8d24346..e8e9a96 100644
--- a/src/library/base/man/chol2inv.Rd
+++ b/src/library/base/man/chol2inv.Rd
@@ -1,6 +1,6 @@
 % File src/library/base/man/chol2inv.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2013 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2015 R Core Team
 % Distributed under GPL 2 or later
 
 \name{chol2inv}
@@ -24,6 +24,10 @@ chol2inv(x, size = NCOL(x), LINPACK = FALSE)
 }
 \value{
   The inverse of the matrix whose Choleski decomposition was given.
+
+  Unsuccessful results from the underlying LAPACK code will result in an
+  error giving a positive error code: these can only be interpreted by
+  detailed study of the FORTRAN code.
 }
 \source{
   This is an interface to the LAPACK routine \code{DPOTRI}.
diff --git a/src/library/base/man/class.Rd b/src/library/base/man/class.Rd
index 81d3284..a269641 100644
--- a/src/library/base/man/class.Rd
+++ b/src/library/base/man/class.Rd
@@ -1,6 +1,6 @@
 % File src/library/base/man/class.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2010 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2017 R Core Team
 % Distributed under GPL 2 or later
 
 \name{class}
@@ -45,6 +45,9 @@ oldClass(x) <- value
   \code{oldClass<-} get and set the attribute, which can also be done
   directly.)
 
+  Note that \code{\link{NULL}} objects cannot have attributes (hence not
+  classes) and attempting to assign a class is an error.
+
   When a generic function \code{fun} is applied to an object with class
   attribute \code{c("first", "second")}, the system searches for a
   function called \code{fun.first} and, if it finds it, applies it to
@@ -84,9 +87,9 @@ oldClass(x) <- value
   on the \code{oldClass} for efficiency, and \link{internal generic}s
   only dispatch on objects for which \code{\link{is.object}} is true.
 
-  In some versions of \R, assigning a zero-length vector with
-  \code{class} removes the class: in others it is an error (whereas it
-  works for \code{oldClass}.  It is clearer to always assign \code{NULL}
+  In older versions of \R, assigning a zero-length vector with
+  \code{class} removed the class: it is now an error (whereas it
+  still works for \code{oldClass}).  It is clearer to always assign \code{NULL}
   to remove the class.
 }
 
@@ -99,8 +102,9 @@ oldClass(x) <- value
   only the first.  However, S3 method selection attempts to treat objects
   from an S4 class as if they had the appropriate S3 class attribute, as
   does \code{inherits}.  Therefore, S3 methods can be defined for S4
-  classes.  See the \sQuote{\link{Classes}} and \sQuote{\link{Methods}}
-  help pages for details.
+  classes.  See the \sQuote{\link[methods]{Introduction}} and \sQuote{\link{Methods_for_S3}}
+  help pages for basic information on S4 methods and for the relation
+  between these and S3 methods.
 
   The replacement version of the function sets the class to the value
   provided.  For classes that have a formal definition, directly
diff --git a/src/library/base/man/col.Rd b/src/library/base/man/col.Rd
index 1ef5ec1..e976e7e 100644
--- a/src/library/base/man/col.Rd
+++ b/src/library/base/man/col.Rd
@@ -1,5 +1,5 @@
 % File src/library/base/man/col.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2007 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/base/man/colSums.Rd b/src/library/base/man/colSums.Rd
index 5da81b3..1f921b9 100644
--- a/src/library/base/man/colSums.Rd
+++ b/src/library/base/man/colSums.Rd
@@ -1,6 +1,6 @@
 % File src/library/base/man/colSums.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2012 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2015 R Core Team
 % Distributed under GPL 2 or later
 
 \name{colSums}
@@ -14,7 +14,7 @@
 \alias{.rowMeans}
 \title{Form Row and Column Sums and Means}
 \description{
-  Form row and column sums and means for numeric arrays.
+  Form row and column sums and means for numeric arrays (or data frames).
 }
 \usage{
 colSums (x, na.rm = FALSE, dims = 1)
@@ -22,22 +22,24 @@ rowSums (x, na.rm = FALSE, dims = 1)
 colMeans(x, na.rm = FALSE, dims = 1)
 rowMeans(x, na.rm = FALSE, dims = 1)
 
-.colSums(X, m, n, na.rm = FALSE)
-.rowSums(X, m, n, na.rm = FALSE)
-.colMeans(X, m, n, na.rm = FALSE)
-.rowMeans(X, m, n, na.rm = FALSE)
+.colSums(x, m, n, na.rm = FALSE)
+.rowSums(x, m, n, na.rm = FALSE)
+.colMeans(x, m, n, na.rm = FALSE)
+.rowMeans(x, m, n, na.rm = FALSE)
 }
 \arguments{
   \item{x}{an array of two or more dimensions, containing numeric,
-    complex, integer or logical values, or a numeric data frame.}
+    complex, integer or logical values, or a numeric data frame.  For
+    \code{.colSums()} etc, a numeric, integer or logical matrix (or
+    vector of length \code{m * n}).}
   \item{na.rm}{logical.  Should missing values (including \code{NaN})
     be omitted from the calculations?}
   \item{dims}{integer: Which dimensions are regarded as \sQuote{rows} or
     \sQuote{columns} to sum over.  For \code{row*}, the sum or mean is
     over dimensions \code{dims+1, \dots}; for \code{col*} it is over
     dimensions \code{1:dims}.}
-  \item{X}{a numeric matrix.}
-  \item{m, n}{the dimensions of X.}
+  \item{m, n}{the dimensions of the matrix \code{x} for
+    \code{.colSums()} etc.}
 }
 \details{
   These functions are equivalent to use of \code{\link{apply}} with
@@ -54,9 +56,9 @@ rowMeans(x, na.rm = FALSE, dims = 1)
   them with \code{\link{na.omit}} or \code{\link{complete.cases}}
   (possibly on the transpose of \code{x}).
 
-  The versions with an initial dot in the name are \sQuote{bare-bones}
-  versions for use in programming: they apply only to numeric matrices
-  and do not name the result.
+  The versions with an initial dot in the name (\code{.colSums()} etc)
+  are \sQuote{bare-bones} versions for use in programming: they apply
+  only to numeric (like) matrices and do not name the result.
 }
 \value{
   A numeric or complex array of suitable size, or a vector if the result
diff --git a/src/library/base/man/colnames.Rd b/src/library/base/man/colnames.Rd
index 3609927..1f8a50d 100644
--- a/src/library/base/man/colnames.Rd
+++ b/src/library/base/man/colnames.Rd
@@ -1,5 +1,5 @@
 % File src/library/base/man/colnames.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2013 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/base/man/commandArgs.Rd b/src/library/base/man/commandArgs.Rd
index da2299f..06db669 100644
--- a/src/library/base/man/commandArgs.Rd
+++ b/src/library/base/man/commandArgs.Rd
@@ -1,5 +1,5 @@
 % File src/library/base/man/commandArgs.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2007 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/base/man/comment.Rd b/src/library/base/man/comment.Rd
index 52a6043..e10d709 100644
--- a/src/library/base/man/comment.Rd
+++ b/src/library/base/man/comment.Rd
@@ -1,5 +1,5 @@
 % File src/library/base/man/comment.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2011 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/base/man/complex.Rd b/src/library/base/man/complex.Rd
index 75d8bb1..33c08ef 100644
--- a/src/library/base/man/complex.Rd
+++ b/src/library/base/man/complex.Rd
@@ -1,10 +1,10 @@
 % File src/library/base/man/complex.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2010 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2015 R Core Team
 % Distributed under GPL 2 or later
 
 \name{complex}
-\title{Complex Vectors}
+\title{Complex Numbers and Basic Functionality}
 \alias{complex}
 \alias{as.complex}
 \alias{is.complex}
@@ -14,7 +14,8 @@
 \alias{Arg}
 \alias{Conj}
 \description{
-  Basic functions which support complex arithmetic in R.
+  Basic functions which support complex arithmetic in \R, in addition to
+  the arithmetic operators \code{+}, \code{-}, \code{*}, \code{/}, and \code{^}.
 }
 \usage{
 complex(length.out = 0, real = numeric(), imaginary = numeric(),
@@ -48,8 +49,15 @@ Conj(z)
 
   \code{as.complex} attempts to coerce its argument to be of complex
   type: like \code{\link{as.vector}} it strips attributes including
-  names.  All forms of \code{NA} and \code{NaN} are coerced to a complex
-  \code{NA}, for which both the real and imaginary parts are \code{NA}.
+  names.  Up to \R versions 3.2.x, all forms of \code{NA} and \code{NaN}
+  were coerced to a complex \code{NA}, i.e., the \code{\link{NA_complex_}}
+  constant, for which both the real and imaginary parts are \code{NA}.
+  Since \R 3.3.0, typically only objects which are \code{NA} in parts
+  are coerced to complex \code{NA}, but others with \code{NaN} parts,
+  are \emph{not}.  As a consequence, complex arithmetic where only
+  \code{NaN}'s (but no \code{NA}'s) are involved typically will
+  \emph{not} give complex \code{NA} but complex numbers with real or
+  imaginary parts of \code{NaN}.
 
   Note that \code{is.complex} and \code{is.numeric} are never both
   \code{TRUE}.
@@ -67,14 +75,36 @@ Conj(z)
   individually or \emph{via} the \code{\link[=S3groupGeneric]{Complex}}
   group generic.
 
-  In addition, the elementary trigonometric, logarithmic, exponential,
-  square root and hyperbolic functions are implemented for complex
-  values.
+  In addition to the arithmetic operators (see \link{Arithmetic})
+  \code{+}, \code{-}, \code{*}, \code{/}, and \code{^}, the elementary
+  trigonometric, logarithmic, exponential, square root and hyperbolic
+  functions are implemented for complex values.
+
+  Matrix multiplications (\code{\link{\%*\%}}, \code{\link{crossprod}},
+  \code{\link{tcrossprod}}) are also defined for complex matrices
+  (\code{\link{matrix}}), and so are \code{\link{solve}},
+  \code{\link{eigen}} or \code{\link{svd}}.
 
   Internally, complex numbers are stored as a pair of \link{double}
-  precision numbers, either or both of which can be \code{\link{NaN}} or
+  precision numbers, either or both of which can be \code{\link{NaN}}
+  (including \code{NA}, see \code{\link{NA_complex_}} and above) or
   plus or minus infinity.
 }
+\note{
+  Operations and functions involving complex \code{\link{NaN}} mostly
+  rely on the C library's handling of \samp{double complex} arithmetic,
+  which typically returns \code{complex(re=NaN, im=NaN)} (but we have
+  not seen a guarantee for that).
+  For \code{+} and \code{-}, \R's own handling works strictly
+  \dQuote{coordinate wise}.
+
+  Operations involving complex \code{NA}, i.e., \code{\link{NA_complex_}}, return
+  \code{\link{NA_complex_}}.
+}
+\seealso{
+  \code{\link{Arithmetic}}; \code{\link{polyroot}} finds all \eqn{n}
+  complex roots of a polynomial of degree \eqn{n}.
+}
 \section{S4 methods}{
   \code{as.complex} is primitive and can have S4 methods set.
 
@@ -108,5 +138,15 @@ plot(zz, xlim = c(-1,1), ylim = c(-1,1), col = "red", asp = 1,
      main = expression(paste("Rotation by "," ", pi == 180^o)))
 abline(h = 0, v = 0, col = "blue", lty = 3)
 points(zz.shift, col = "orange")
+
+showC <- function(z) noquote(sprintf("(R = \%g, I = \%g)", Re(z), Im(z)))
+
+## The exact result of this *depends* on the platform, compiler, math-library:
+(NpNA <- NaN + NA_complex_) ; str(NpNA) # *behaves* as 'cplx NA' ..
+stopifnot(is.na(NpNA), is.na(NA_complex_), is.na(Re(NA_complex_)), is.na(Im(NA_complex_)))
+showC(NpNA)# but not always is {shows  '(R = NaN, I = NA)' on some platforms}
+## and this is not TRUE everywhere:
+identical(NpNA, NA_complex_)
+showC(NA_complex_) # always == (R = NA, I = NA)
 }
 \keyword{complex}
diff --git a/src/library/base/man/conditions.Rd b/src/library/base/man/conditions.Rd
index ee5e9d3..1774eb8 100644
--- a/src/library/base/man/conditions.Rd
+++ b/src/library/base/man/conditions.Rd
@@ -1,5 +1,5 @@
 % File src/library/base/man/conditions.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2013 R Core Team
 % Distributed under GPL 2 or later
 
@@ -26,6 +26,7 @@
 
 \alias{.signalSimpleWarning}
 \alias{.handleSimpleError}
+\alias{.tryResumeInterrupt}
 
 \alias{as.character.condition}
 \alias{as.character.error}
@@ -74,6 +75,7 @@ restartFormals(r)
 
 .signalSimpleWarning(msg, call)
 .handleSimpleError(h, msg, call)
+.tryResumeInterrupt()
 }
 
 \arguments{
@@ -192,8 +194,9 @@ restartFormals(r)
    \code{interactive} method queries the user for values for the
    formal arguments of the handler function.
 
-   \code{.signalSimpleWarning} and \code{.handleSimpleError}
-   are used internally and should not be called directly.
+   \code{.signalSimpleWarning}, \code{.handleSimpleError}, and
+   \code{.tryResumeInterrupt} are used internally and should not be
+   called directly.
 }
 
 \references{The \code{tryCatch} mechanism is similar to Java
diff --git a/src/library/base/man/conflicts.Rd b/src/library/base/man/conflicts.Rd
index efa1f6e..b0d1476 100644
--- a/src/library/base/man/conflicts.Rd
+++ b/src/library/base/man/conflicts.Rd
@@ -1,5 +1,5 @@
 % File src/library/base/man/conflicts.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2007 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/base/man/connections.Rd b/src/library/base/man/connections.Rd
index dc11a11..fdbbb90 100644
--- a/src/library/base/man/connections.Rd
+++ b/src/library/base/man/connections.Rd
@@ -1,12 +1,10 @@
 % File src/library/base/man/connections.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2014 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2017 R Core Team
 % Distributed under GPL 2 or later
 
-\newcommand{\CRANpkg}{\href{http://CRAN.R-project.org/package=#1}{\pkg{#1}}}
-\newcommand{\sspace}{\ifelse{latex}{\out{~}}{ }}
-
 \name{connections}
+\title{Functions to Manipulate Connections (Files, URLs, ...)}
 \alias{connections}
 \alias{connection}
 \alias{file}
@@ -36,16 +34,19 @@
 \concept{gzip}
 \concept{bzip2}
 \concept{lzma}
-\title{Functions to Manipulate Connections}
 \description{
-  Functions to create, open and close connections.
+  Functions to create, open and close connections, i.e.,
+  \dQuote{generalized files}, such as possibly compressed files, URLs,
+  pipes, etc.
 }
 \usage{
 file(description = "", open = "", blocking = TRUE,
-     encoding = getOption("encoding"), raw = FALSE)
+     encoding = getOption("encoding"), raw = FALSE,
+     method = getOption("url.method", "default"))
 
 url(description, open = "", blocking = TRUE,
-    encoding = getOption("encoding"))
+    encoding = getOption("encoding"),
+    method = getOption("url.method", "default"))
 
 gzfile(description, open = "", encoding = getOption("encoding"),
        compression = 6)
@@ -56,8 +57,7 @@ bzfile(description, open = "", encoding = getOption("encoding"),
 xzfile(description, open = "", encoding = getOption("encoding"),
        compression = 6)
 
-unz(description, filename, open = "",
-    encoding = getOption("encoding"))
+unz(description, filename, open = "", encoding = getOption("encoding"))
 
 pipe(description, open = "", encoding = getOption("encoding"))
 
@@ -94,6 +94,10 @@ isIncomplete(con)
     e.g.\sspace{}character devices.  This suppresses the check for a compressed
     file when opening for text-mode reading, and asserts that the
     \sQuote{file} may not be seekable.}
+  \item{method}{character string, partially matched to
+    \code{c("default", "internal", "wininet", "libcurl")}:
+%% FIXME:  Consider  "auto", as in download.file()
+    see \sQuote{Details}.}
   \item{compression}{integer in 0--9.  The amount of compression to be
     applied when writing, from none to maximal available.  For
     \code{xzfile} can also be negative: see the \sQuote{Compression}
@@ -114,7 +118,7 @@ isIncomplete(con)
 }
 \details{
   The first nine functions create connections.  By default the
-  connection is not opened (except for \code{socketConnection}), but may
+  connection is not opened (except for a \code{socketConnection}), but may
   be opened by setting a non-empty value of argument \code{open}.
 
   For \code{file} the description is a path to the file to be opened or
@@ -126,10 +130,19 @@ isIncomplete(con)
   not in \code{RGui} on Windows).  See also \code{\link{stdin}()} for
   the subtly different R-level concept of \code{stdin}.
 
-  For \code{url} the description is a complete URL, including scheme
-  (such as \samp{http://}, \samp{ftp://} or \samp{file://}).  Proxies
-  can be specified for HTTP and FTP \code{url} connections: see
-  \code{\link{download.file}}.
+  For \code{url} the description is a complete URL including scheme
+  (such as \samp{http://}, \samp{https://}, \samp{ftp://} or
+  \samp{file://}).  Method \code{"internal"} is that available since
+  connections were introduced, method \code{"wininet"} is only available
+  on Windows (it uses the WinINet functions of that OS) and method
+  \code{"libcurl"} (using the library of that name:
+  \url{http://curl.haxx.se/libcurl/}) is required on a Unix-alike but
+  optional on Windows.  Method \code{"default"} uses method
+  \code{"internal"} for \samp{file:} URLs and \code{"libcurl"} for
+  \code{ftps:} URLs.  On a Unix-alike it uses \code{"libcurl"} for
+  \samp{http:}, \samp{https:} and \samp{ftp:} URLs; on Windows
+  \code{"wininet"} for \samp{http:}, \samp{ftp:} and \samp{https:} URLs.
+  Proxies can be specified: see \code{\link{download.file}}.
 
   For \code{gzfile} the description is the path to a file compressed by
   \command{gzip}: it can also open for reading uncompressed files and
@@ -139,8 +152,8 @@ isIncomplete(con)
   \command{bzip2}.
 
   For \code{xzfile} the description is the path to a file compressed by
-  \command{xz} (\url{http://en.wikipedia.org/wiki/Xz}) or (for reading
-  only) \command{lzma} (\url{http://en.wikipedia.org/wiki/LZMA}).
+  \command{xz} (\url{https://en.wikipedia.org/wiki/Xz}) or (for reading
+  only) \command{lzma} (\url{https://en.wikipedia.org/wiki/LZMA}).
 
   \code{unz} reads (only) single files within zip files, in binary mode.
   The description is the full path to the zip file, with \file{.zip}
@@ -150,17 +163,13 @@ isIncomplete(con)
   from.  This is run in a shell, on Windows that specified by the
   \env{COMSPEC} environment variable.
 
-  For \code{fifo} the description is the path of the fifo.
-
-  All platforms support \code{file}, \code{pipe}, \code{gzfile},
-  \code{bzfile}, \code{xzfile}, \code{unz} and \code{url("file://")}
-  connections.  The other connections may be partially implemented or
-  not implemented at all.  (They do work on most Unix platforms, and all
-  on Windows.)
+  For \code{fifo} the description is the path of the fifo.  (Support for
+  \code{fifo} connections is optional but they are available on most
+  Unix platforms and on Windows.)
 
   The intention is that \code{file} and \code{gzfile} can be used
-  generally for text input (from files and URLs) and binary input
-  respectively.
+  generally for text input (from files, \samp{http://} and
+  \samp{https://} URLs) and binary input respectively.
 
   \code{open}, \code{close} and \code{seek} are generic functions: the
   following applies to the methods relevant to connections.
@@ -190,8 +199,17 @@ isIncomplete(con)
 }
 
 \section{URLs}{
-  \code{url} and \code{file} support URL schemes \samp{http://},
-  \samp{ftp://} and \samp{file://}.
+  \code{url} and \code{file} support URL schemes \samp{file://},
+  \samp{http://}, \samp{https://} and \samp{ftp://}.
+
+  \code{method = "libcurl"} allows more schemes: exactly which schemes
+  is platform-dependent (see \code{\link{libcurlVersion}}), but all
+  Unix-alike platforms will support \samp{https://} and most platforms
+  will support \samp{ftps://}.
+
+  Most methods do not percent-encode special characters such as spaces
+  in \samp{http://} URLs (see \code{\link{URLencode}}), but it seems the
+  \code{"wininet"} method does.
 
   A note on \samp{file://} URLs.  The most general form (from RFC1738) is
   \samp{file://host/path/to/file}, but \R only accepts the form with an
@@ -210,22 +228,14 @@ isIncomplete(con)
   plus \code{path_to_file}.  Also, backslashes are accepted within the
   path even though RFC1738 does not allow them.
 
-  No attempt is made to decode an encoded URL: call
+  No attempt is made to decode a percent-encoded \samp{file:} URL: call
   \code{\link{URLdecode}} if necessary.
-
-  Note that the \samp{https://} URL scheme is not supported except on
-  Windows.  There it is only supported if \option{--internet2} or
-#ifdef unix
-  \code{setInternet2(TRUE)}
-#endif
-#ifdef windows
-  \code{\link{setInternet2}(TRUE)}
-#endif
-  was used (to make use of Internet Explorer internals), and then only
-  if the certificate is considered to be valid.  With that option only,
-  the \samp{http://user:pass@site} notation for sites requiring
-  authentication is also accepted.
   
+  All the methods attempt to follow redirected HTTP URLs, but the
+  \code{"internal"} method is unable to follow redirections to HTTPS URLs.
+
+  Server-side cached data is always accepted.
+
   Function \code{\link{download.file}} and contributed package
   \CRANpkg{RCurl} provide more comprehensive facilities to download
   from URLs.
@@ -236,14 +246,14 @@ isIncomplete(con)
   \code{bzfile}, \code{xzfile}, \code{unz} and \code{socketConnection}
   return a connection object which inherits from class
   \code{"connection"} and has a first more specific class.
-  
+
   \code{open} and \code{flush} return \code{NULL}, invisibly.
 
   \code{close} returns either \code{NULL} or an integer status,
   invisibly. The status is from when the connection was last closed and
   is available only for some types of connections (e.g., pipes, files and
   fifos): typically zero values indicate success.
-  
+
   \code{isOpen} returns a logical value, whether the connection is
   currently open.
 
@@ -306,10 +316,9 @@ isIncomplete(con)
 }
 
 \section{Compression}{
-  \R has for a long time supported \command{gzip} and \command{bzip2}
-  compression, and support for \command{xz} compression (and read-only
-  support for its precursor \code{lzma} compression) was added in \R
-  2.10.0.
+  \R supports \command{gzip}, \command{bzip2} and \command{xz}
+  compression (also read-only support for its precursor, \code{lzma}
+  compression).
 
   For reading, the type of compression (if any) can be determined from
   the first few bytes of the file.  Thus for \code{file(raw = FALSE)}
@@ -375,22 +384,27 @@ 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{http://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).
 
+  One caveat:  \R's implementation of \code{"UCS-2LE"} and similar for
+  output does not currently work on Windows, and on Unix it will default
+  to Unix-style line endings.  We recommend use of \code{UTF-8} instead.
+
   As from \R 3.0.0 the encoding \code{"UTF-8-BOM"} is accepted for
   reading and will remove a Byte Order Mark if present (which it often
-  is for files and webpages generated by Microsoft applications).  If it
-  is required (it is not recommended) when writing it should be written
-  explicitly, e.g.\sspace{}by \code{writeChar("\ufeff", con, eos = NULL)} or
-  \code{writeBin(as.raw(c(0xef, 0xbb, 0xbf)), binary_con)}
+  is for files and webpages generated by Microsoft applications).  If a
+  BOM is required (it is not recommended) when writing it should be
+  written explicitly, e.g.\sspace{}by \code{writeChar("\ufeff", con, eos
+  = NULL)} or \code{writeBin(as.raw(c(0xef, 0xbb, 0xbf)), binary_con)}
 
   Encoding names \code{"utf8"}, \code{"mac"} and \code{"macroman"} are
   not portable, and not supported on all current \R platforms.
   \code{"UTF-8"} is portable and \code{"macintosh"} is the official
-  (and most widely supported) name for \sQuote{Mac Roman}.
+  (and most widely supported) name for \sQuote{Mac Roman}.  (As from \R
+  3.4.0, \R maps \code{"utf8"} to \code{"UTF-8"} internally.)
 
   Requesting a conversion that is not supported is an error, reported
   when the connection is opened.  Exactly what happens when the
@@ -467,12 +481,13 @@ isIncomplete(con)
   not work as one might expect.
 #endif
 #ifdef unix
-  Unix users wishing to \emph{write} to one of the selections may be
-  able to do so via \code{xclip}
-  (\url{http://sourceforge.net/projects/xclip/}), for example by
+  Unix users wishing to \emph{write} to one of the X11 selections may be
+  able to do so via \command{xclip}
+  (\url{http://sourceforge.net/projects/xclip/}) or \command{xsel}
+  (\url{http://www.vergenet.net/~conrad/software/xsel/}), for example by
   \code{pipe("xclip -i", "w")} for the primary selection.
 
-  OS X users can use \code{pipe("pbpaste")} and
+  macOS users can use \code{pipe("pbpaste")} and
   \code{pipe("pbcopy", "w")} to read from and write to that system's
   clipboard.
 #endif
@@ -481,14 +496,13 @@ isIncomplete(con)
   \R's connections are modelled on those in S version 4 (see Chambers,
   1998).  However \R goes well beyond the S model, for example in output
   text connections and URL, compressed and socket connections.
-
   The default open mode in \R is \code{"r"} except for socket connections.
   This differs from S, where it is the equivalent of \code{"r+"},
   known as \code{"*"}.
 
-  On (rare) platforms where \code{vsnprintf} does not return the needed length
-  of output there is a 100,000 byte output limit on the length of
-  line for text output on \code{fifo}, \code{gzfile}, \code{bzfile} and
+  On (rare) platforms where \code{vsnprintf} does not return the needed
+  length of output there is a 100,000 byte output limit on the length of
+  a line for text output on \code{fifo}, \code{gzfile}, \code{bzfile} and
   \code{xzfile} connections: longer lines will be truncated with a
   warning.
 }
@@ -497,7 +511,7 @@ isIncomplete(con)
   \emph{Programming with Data.  A Guide to the S Language.} Springer.
 
   Ripley, B. D. (2001) Connections. \emph{R News}, \bold{1/1}, 16--7.
-  \url{http://www.r-project.org/doc/Rnews/Rnews_2001-1.pdf}
+  \url{https://www.r-project.org/doc/Rnews/Rnews_2001-1.pdf}
 }
 
 \seealso{
@@ -512,12 +526,15 @@ isIncomplete(con)
   \code{\link{writeBin}}, \code{\link{writeChar}}, \code{\link{load}}
   and \code{\link{save}}.
 
-  \code{\link{capabilities}} to see if HTTP/FTP \code{url},
-  \code{fifo} and \code{socketConnection} are supported by this build of \R.
+  \code{\link{capabilities}} to see if \code{fifo} connections are
+  supported by this build of \R.
 
   \code{\link{gzcon}} to wrap \command{gzip} (de)compression around a
   connection.
 
+  \code{\link{options}} \code{HTTPUserAgent}, \code{internet.info} and
+  \code{timeout} are used by some of the methods for URL connections.
+
   \code{\link{memCompress}} for more ways to (de)compress and references
   on data compression.
 #ifdef windows
@@ -540,10 +557,12 @@ close(zz)
 readLines(zz <- gzfile("ex.gz"))
 close(zz)
 unlink("ex.gz")
+zz # an invalid connection
 
 zz <- bzfile("ex.bz2", "w")  # bzip2-ed file
 cat("TITLE extra line", "2 3 5 7", "", "11 13 17", file = zz, sep = "\n")
 close(zz)
+zz # print() method: invalid connection
 print(readLines(zz <- bzfile("ex.bz2")))
 close(zz)
 unlink("ex.bz2")
@@ -557,7 +576,9 @@ seek(Tfile, 0, rw = "r") # reset to beginning
 readLines(Tfile)
 cat("ghi\n", file = Tfile)
 readLines(Tfile)
+Tfile # -> print() :  "valid" connection
 close(Tfile)
+Tfile # -> print() :  "invalid" connection
 unlink("test1")
 
 ## We can do the same thing with an anonymous file.
diff --git a/src/library/base/man/contributors.Rd b/src/library/base/man/contributors.Rd
index bcb7adf..369e662 100644
--- a/src/library/base/man/contributors.Rd
+++ b/src/library/base/man/contributors.Rd
@@ -1,5 +1,5 @@
 % File src/library/base/man/contributors.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2007 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/base/man/copyright.Rd b/src/library/base/man/copyright.Rd
index 46b3310..acb03e9 100644
--- a/src/library/base/man/copyright.Rd
+++ b/src/library/base/man/copyright.Rd
@@ -1,5 +1,5 @@
 % File src/library/base/man/copyright.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2007 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/base/man/crossprod.Rd b/src/library/base/man/crossprod.Rd
index f1082e3..73ab7e1 100644
--- a/src/library/base/man/crossprod.Rd
+++ b/src/library/base/man/crossprod.Rd
@@ -1,6 +1,6 @@
 % File src/library/base/man/crossprod.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2008 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2014 R Core Team
 % Distributed under GPL 2 or later
 
 \name{crossprod}
@@ -19,8 +19,8 @@ crossprod(x, y = NULL)
 tcrossprod(x, y = NULL)
 }
 \arguments{
-  \item{x, y}{numeric or complex matrices: \code{y = NULL} is taken to
-    be the same matrix as \code{x}.  Vectors are promoted to
+  \item{x, y}{numeric or complex matrices (or vectors): \code{y = NULL}
+    is taken to be the same matrix as \code{x}.  Vectors are promoted to
     single-column or single-row matrices, depending on the context.}
 }
 \value{
@@ -32,6 +32,13 @@ tcrossprod(x, y = NULL)
   row matrices, but their \code{\link{names}} are usually \bold{not}
   promoted to \code{\link{dimnames}}.  Hence, currently, the last
   example has empty dimnames.
+
+  In the same situation, these matrix products (also \code{\link{\%*\%}})
+  are more flexible in promotion of vectors to row or column matrices, such
+  that more cases are allowed, since \R 3.2.0.
+
+  The propagation of NaN/Inf values, precision, and performance of matrix
+  products can be controlled by \code{\link{options}("matprod")}.
 }
 %% Consider using a new optional argument, say 'make.names = NA'
 %% {as in kronecker} with possible values  FALSE / NA / TRUE  where
diff --git a/src/library/base/man/cumsum.Rd b/src/library/base/man/cumsum.Rd
index b2c5110..8edeb8d 100644
--- a/src/library/base/man/cumsum.Rd
+++ b/src/library/base/man/cumsum.Rd
@@ -1,5 +1,5 @@
 % File src/library/base/man/cumsum.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2009 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/base/man/curlGetHeaders.Rd b/src/library/base/man/curlGetHeaders.Rd
new file mode 100644
index 0000000..17a3804
--- /dev/null
+++ b/src/library/base/man/curlGetHeaders.Rd
@@ -0,0 +1,79 @@
+% File src/library/base/man/curlGetHeaders.Rd
+% Part of the R package, https://www.R-project.org
+% Copyright 2015 R Core Team
+% Distributed under GPL 2 or later
+
+\name{curlGetHeaders}
+\alias{curlGetHeaders}
+\title{
+  Retrieve Headers from URLs
+}
+\description{
+  Retrieve the headers for a URL for a supported protocol such as
+  \code{http://}, \code{ftp://}, \code{https://} and \code{ftps://}.
+  An optional function not supported on all platforms.
+}
+\usage{
+curlGetHeaders(url, redirect = TRUE, verify = TRUE)
+}
+
+\arguments{
+  \item{url}{character string specifying the URL.}
+  \item{redirect}{logical: should redirections be followed?}
+  \item{verify}{logical: should certificates be verified as valid
+    and applying to that host?}
+}
+
+\details{
+  This reports what \command{curl -I -L} or \command{curl -I} would
+  report.  For a \code{ftp://} URL the \sQuote{headers} are a record of
+  the conversation between client and server before data transfer.
+
+  Only 500 header lines will be reported: there is a limit of 20
+  redirections so this should suffice (and even 20 would indicate
+  problems).
+
+  It uses \code{\link{getOption}("timeout")} for the connection
+  timeout: that defaults to 60 seconds.  As this cannot be interrupted
+  you may want to consider a shorter value.
+
+  To see all the details of the interaction with the server(s) set
+  \code{\link{options}(internet.info = 1)}.
+  
+  HTTP[S] servers are allowed to refuse requests to read the headers and
+  some do: this will result in a \code{status} of \code{405}.
+  
+  For possible issues with secure URLs (especially on Windows) see
+  \code{\link{download.file}}.
+
+  There is a security risk in not verifying certificates, but as only
+  the headers are captured it is slight.  Usually looking at the URL in
+  a browser will reveal what the problem is (and it may well be
+  machine-specific).
+}
+\value{
+  A character vector with integer attribute \code{"status"} (the
+  last-received \sQuote{status} code).  If redirection occurs this will include
+  the headers for all the URLs visited.
+
+  For the interpretation of \sQuote{status} codes see
+  \url{https://en.wikipedia.org/wiki/List_of_HTTP_status_codes} and
+  \url{https://en.wikipedia.org/wiki/List_of_FTP_server_return_codes}.
+  A successful FTP connection will usually have status 250 or 350.  
+}
+
+\seealso{
+  \code{\link{capabilities}("libcurl")} to see if this is supported.
+
+  \code{\link{options}} \code{HTTPUserAgent} and \code{timeout} are used.
+}
+
+% http://forum.rebex.net/questions/1343/open-ftps-and-sftp-servers-for-testing-our-code-and-connectivity
+\examples{\donttest{## needs Internet access, results vary
+curlGetHeaders("http://bugs.r-project.org")   ## this redirects to https://
+curlGetHeaders("https://httpbin.org/status/404")  ## returns status
+curlGetHeaders("ftp://cran.r-project.org")
+}
+\dontrun{ ## a not-always-available site:
+curlGetHeaders("ftps://test.rebex.net/readme.txt")
+}}
diff --git a/src/library/base/man/cut.POSIXt.Rd b/src/library/base/man/cut.POSIXt.Rd
index e62eb6a..13b0c49 100644
--- a/src/library/base/man/cut.POSIXt.Rd
+++ b/src/library/base/man/cut.POSIXt.Rd
@@ -1,5 +1,5 @@
 % File src/library/base/man/cut.POSIXt.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2014 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/base/man/cut.Rd b/src/library/base/man/cut.Rd
index 20f4310..8acb37b 100644
--- a/src/library/base/man/cut.Rd
+++ b/src/library/base/man/cut.Rd
@@ -1,5 +1,5 @@
 % File src/library/base/man/cut.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2014 R Core Team
 % Distributed under GPL 2 or later
 
@@ -62,6 +62,9 @@ cut(x, \dots)
   The default method will sort a numeric vector of \code{breaks}, but
   other methods are not required to and \code{labels} will correspond to
   the intervals after sorting.
+  
+  As from \R 3.2.0, \code{getOption("OutDec")} is consulted when labels
+  are constructed for \code{labels = NULL}.
 }
 \value{
   A \code{\link{factor}} is returned, unless \code{labels = FALSE} which
diff --git a/src/library/base/man/data.class.Rd b/src/library/base/man/data.class.Rd
index 45c9344..ef016f4 100644
--- a/src/library/base/man/data.class.Rd
+++ b/src/library/base/man/data.class.Rd
@@ -1,5 +1,5 @@
 % File src/library/base/man/data.class.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2007 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/base/man/data.frame.Rd b/src/library/base/man/data.frame.Rd
index 6927dab..248db4d 100644
--- a/src/library/base/man/data.frame.Rd
+++ b/src/library/base/man/data.frame.Rd
@@ -1,6 +1,6 @@
 % File src/library/base/man/data.frame.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2013 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2016 R Core Team
 % Distributed under GPL 2 or later
 
 \name{data.frame}
@@ -8,14 +8,14 @@
 \alias{data.frame}
 \alias{default.stringsAsFactors}
 \description{
-  This function creates data frames, tightly coupled
+  The function \code{data.frame()} creates data frames, tightly coupled
   collections of variables which share many of the properties of
   matrices and of lists, used as the fundamental data structure by most
   of \R's modeling software.
 }
 \usage{
 data.frame(\dots, row.names = NULL, check.rows = FALSE,
-           check.names = TRUE,
+           check.names = TRUE, fix.empty.names = TRUE,
            stringsAsFactors = default.stringsAsFactors())
 
 default.stringsAsFactors()
@@ -34,6 +34,11 @@ default.stringsAsFactors()
     syntactically valid variable names and are not duplicated.
     If necessary they are adjusted (by \code{\link{make.names}})
     so that they are.}
+  \item{fix.empty.names}{logical indicating if arguments which are
+    \dQuote{unnamed} (in the sense of not being formally called as
+    \code{someName = arg}) get an automatically constructed name or
+    rather name \code{""}.  Needs to be set to \code{FALSE} even when
+    \code{check.names} is false if \code{""} names should be kept.}
   \item{stringsAsFactors}{logical: should character vectors be converted
     to factors?  The \sQuote{factory-fresh} default is \code{TRUE}, but
     this can be changed by setting \code{\link{options}(stringsAsFactors
@@ -79,8 +84,7 @@ default.stringsAsFactors()
   \code{stringsAsFactors} is false.  If a list or data
   frame or matrix is passed to \code{data.frame} it is as if each
   component or column had been passed as a separate argument (except for
-  matrices of class \code{"\link{model.matrix}"} and those protected by
-  \code{\link{I}}).
+  matrices protected by \code{\link{I}}).
 
   Objects passed to \code{data.frame} should have the same number of
   rows, but atomic vectors (see \code{\link{is.vector}}), factors and
@@ -124,7 +128,8 @@ default.stringsAsFactors()
   \code{\link{plot.data.frame}},
   \code{\link{print.data.frame}},
   \code{\link{row.names}}, \code{\link{names}} (for the column names),
-  \code{\link{[.data.frame}} for subsetting methods,% ./Extract.data.frame.Rd
+  \code{\link{[.data.frame}} for subsetting methods % ./Extract.data.frame.Rd
+  and \code{I(matrix(..))} examples;
   \code{\link{Math.data.frame}} etc, about
   \emph{Group} methods for \code{data.frame}s;
   \code{\link{read.table}},
diff --git a/src/library/base/man/data.matrix.Rd b/src/library/base/man/data.matrix.Rd
index 995dfc9..2c9bef2 100644
--- a/src/library/base/man/data.matrix.Rd
+++ b/src/library/base/man/data.matrix.Rd
@@ -1,5 +1,5 @@
 % File src/library/base/man/data.matrix.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2008 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/base/man/dataframeHelpers.Rd b/src/library/base/man/dataframeHelpers.Rd
index 7d77e07..22258bc 100644
--- a/src/library/base/man/dataframeHelpers.Rd
+++ b/src/library/base/man/dataframeHelpers.Rd
@@ -1,5 +1,5 @@
 % File src/library/base/man/dataframeHelpers.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2009 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/base/man/date.Rd b/src/library/base/man/date.Rd
index ee628aa..7106d0a 100644
--- a/src/library/base/man/date.Rd
+++ b/src/library/base/man/date.Rd
@@ -1,5 +1,5 @@
 % File src/library/base/man/date.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2007 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/base/man/dcf.Rd b/src/library/base/man/dcf.Rd
index bc4ffe2..e7e8c45 100644
--- a/src/library/base/man/dcf.Rd
+++ b/src/library/base/man/dcf.Rd
@@ -1,6 +1,6 @@
 % File src/library/base/man/dcf.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2014 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2017 R Core Team
 % Distributed under GPL 2 or later
 
 \name{dcf}
@@ -101,12 +101,16 @@ write.dcf(x, file = "", append = FALSE,
 }
 
 \references{
-  \url{http://www.debian.org/doc/debian-policy/ch-controlfields.html}.
+  \url{https://www.debian.org/doc/debian-policy/ch-controlfields.html}.
   
   Note that \R does not require encoding in UTF-8, which is a recent
   Debian requirement.  Nor does it use the Debian-specific sub-format
   which allows comment lines starting with \samp{#}.
 }
+
+\note{
+  As from \R{} 3.4.0, \sQuote{whitespace} in all cases includes newlines.
+}
 \seealso{
   \code{\link{write.table}}.
 
diff --git a/src/library/base/man/debug.Rd b/src/library/base/man/debug.Rd
index 69633b8..e99ab1c 100644
--- a/src/library/base/man/debug.Rd
+++ b/src/library/base/man/debug.Rd
@@ -1,25 +1,36 @@
-
 % File src/library/base/man/debug.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2013 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2014 R Core Team
 % Distributed under GPL 2 or later
 
 \name{debug}
 \title{Debug a Function}
-\usage{
-debug(fun, text = "", condition = NULL)
-debugonce(fun, text = "", condition = NULL)
-undebug(fun)
-isdebugged(fun)
-}
 \alias{debug}
 \alias{debugonce}
 \alias{undebug}
 \alias{isdebugged}
+\alias{debuggingState}
+\usage{
+debug(fun, text = "", condition = NULL, signature = NULL)
+debugonce(fun, text = "", condition = NULL, signature = NULL)
+undebug(fun, signature = NULL)
+isdebugged(fun, signature = NULL)
+debuggingState(on = NULL)
+}
 \arguments{
-\item{fun}{any interpreted \R function.}
-\item{text}{a text string that can be retrieved when the browser is entered.}
-\item{condition}{a condition that can be retrieved when the browser is entered.}
+  \item{fun}{any interpreted \R function.}
+  \item{text}{a text string that can be retrieved when the browser is entered.}
+  \item{condition}{a condition that can be retrieved when the browser is
+    entered.}
+  \item{signature}{an optional method signature. If specified, the
+    method is debugged, rather than its generic.}
+  \item{on}{logical; a call to the support function
+    \code{debuggingState} returns \code{TRUE} if debugging is globally
+    turned on, \code{FALSE} otherwise.  An argument of one or the other
+    of those values sets the state.  If the debugging state is
+    \code{FALSE}, none of the debugging actions will occur (but explicit
+    \code{\link{browser}} calls in functions will continue to work).}
+  %% can we describe what happens when it is turned off *inside* debugging ??
 }
 \description{
   Set, unset or query the debugging flag on a function.
@@ -50,12 +61,23 @@ isdebugged(fun)
   function is removed and replaced the debug state is not preserved).
   Use \code{debugonce} to enter the debugger only the next time the
   function is invoked.
-
-  In order to debug S4 methods (see \code{\link{Methods}}), you
-  need to use \code{\link{trace}}, typically calling \code{\link{browser}},
-  e.g., as \cr
-  \code{trace("plot", browser, exit = browser, signature = c("track", "missing"))}
-
+  
+  To debug an S4 method by explicit signature, use
+  \code{signature}. When specified, signature indicates the method of
+  \code{fun} to be debugged. Note that debugging is implemented slightly
+  differently for this case, as it uses the trace machinery, rather than
+  the debugging bit. As such, \code{text} and \code{condition} cannot be
+  specified in combination with a non-null \code{signature}. For methods
+  which implement the \code{.local} rematching mechanism, the
+  \code{.local} closure itself is the one that will be ultimately
+  debugged (see \code{\link[methods]{isRematched}}).
+  
+  \code{isdebugged} returns \code{TRUE} if a) \code{signature} is \code{NULL}
+  and the closure \code{fun} has been debugged, or b) \code{signature} is not
+  \code{NULL}, \code{fun} is an S4 generic, and the method of \code{fun}
+  for that signature has been debugged. In all other cases, it returns
+  \code{FALSE}.
+  
   The number of lines printed for the deparsed call when a function is
   entered for debugging can be limited by setting
   \code{\link{options}(deparse.max.lines)}.
@@ -64,10 +86,30 @@ isdebugged(fun)
   interpreted version of the function will be used until debugging is
   disabled.
 }
+\value{
+  \code{debug} and \code{undebug} invisibly return \code{NULL}.
+
+  \code{isdebugged} returns \code{TRUE} if the function or method is
+  marked for debugging, and \code{FALSE} otherwise.
+}
 \seealso{
+  \code{\link{debugcall}} for conveniently debugging methods,
   \code{\link{browser}}, \code{\link{trace}};
   \code{\link{traceback}} to see the stack after an \code{Error: \dots}
   message; \code{\link{recover}} for another debugging approach.
 }
+
+\examples{
+\dontrun{
+debug(library)
+library(methods)
+}
+\dontrun{
+debugonce(sample)
+## only the first call will be debugged
+sampe(10, 1)
+sample(10, 1)
+}
+}
 \keyword{programming}
 \keyword{environment}
diff --git a/src/library/base/man/delayedAssign.Rd b/src/library/base/man/delayedAssign.Rd
index 733beab..fec4f11 100644
--- a/src/library/base/man/delayedAssign.Rd
+++ b/src/library/base/man/delayedAssign.Rd
@@ -1,6 +1,6 @@
 % File src/library/base/man/delayedAssign.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2007 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2015 R Core Team
 % Distributed under GPL 2 or later
 
 \name{delayedAssign}
@@ -9,10 +9,10 @@
 \alias{promises}
 \title{Delay Evaluation}
 \description{
-\code{delayedAssign} creates a \emph{promise} to evaluate the given
-expression if its value is requested.  This provides direct access
-to the \emph{lazy evaluation} mechanism used by \R for the evaluation
-of (interpreted) functions.
+  \code{delayedAssign} creates a \emph{promise} to evaluate the given
+  expression if its value is requested.  This provides direct access
+  to the \emph{lazy evaluation} mechanism used by \R for the evaluation
+  of (interpreted) functions.
 }
 \usage{
 delayedAssign(x, value, eval.env = parent.frame(1),
@@ -42,14 +42,15 @@ delayedAssign(x, value, eval.env = parent.frame(1),
   not be evaluated again.
 }
 \seealso{
-\code{\link{substitute}}, to see the expression associated with a promise.
+  \code{\link{substitute}}, to see the expression associated with a
+  promise, if \code{assign.env} is not the \code{\link{.GlobalEnv}}.
 }
 \examples{
 msg <- "old"
 delayedAssign("x", msg)
+substitute(x) # shows only 'x', as it is in the global env.
 msg <- "new!"
-x #- new!
-substitute(x) #- x (was 'msg' ?)
+x # new!
 
 delayedAssign("x", {
     for(i in 1:3)
@@ -60,9 +61,25 @@ delayedAssign("x", {
 x^2 #- yippee
 x^2 #- simple number
 
-e <- (function(x, y = 1, z) environment())(1+2, "y", {cat(" HO! "); pi+2})
-(le <- as.list(e)) # evaluates the promises
+ne <- new.env()
+delayedAssign("x", pi + 2, assign.env = ne)
+## See the promise {without "forcing" (i.e. evaluating) it}:
+substitute(x, ne) #  'pi + 2'
+\dontshow{stopifnot(identical(substitute(x,ne), quote(pi + 2)))}
 
+### Promises in an environment [for advanced users]:  ---------------------
+
+e <- (function(x, y = 1, z) environment())(cos, "y", {cat(" HO!\n"); pi+2})
+## How can we look at all promises in an env (w/o forcing them)?
+gete <- function(e_)
+   lapply(lapply(ls(e_), as.name),
+          function(n) eval(substitute(substitute(X, e_), list(X=n))))
+
+(exps <- gete(e))
+sapply(exps, typeof)
+
+(le <- as.list(e)) # evaluates ("force"s) the promises
+stopifnot(identical(unname(le), lapply(exps, eval))) # and another "Ho!"
 }
 \keyword{programming}
 \keyword{data}
diff --git a/src/library/base/man/deparse.Rd b/src/library/base/man/deparse.Rd
index 4f49b39..2aceed0 100644
--- a/src/library/base/man/deparse.Rd
+++ b/src/library/base/man/deparse.Rd
@@ -1,10 +1,8 @@
 % File src/library/base/man/deparse.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2012 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2014 R Core Team
 % Distributed under GPL 2 or later
 
-\newcommand{\sspace}{\ifelse{latex}{\out{~}}{ }}
-
 \name{deparse}
 \alias{deparse}
 \title{Expression Deparsing}
diff --git a/src/library/base/man/deparseOpts.Rd b/src/library/base/man/deparseOpts.Rd
index a2eab89..090f675 100644
--- a/src/library/base/man/deparseOpts.Rd
+++ b/src/library/base/man/deparseOpts.Rd
@@ -1,10 +1,8 @@
 % File src/library/base/man/deparseOpts.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2014 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2016 R Core Team
 % Distributed under GPL 2 or later
 
-\newcommand{\sspace}{\ifelse{latex}{\out{~}}{ }}
-
 \name{deparseOpts}
 \alias{.deparseOpts}
 \title{Options for Expression Deparsing}
@@ -77,19 +75,40 @@
       For compatibility with S, integer values of double vectors are
       deparsed with a trailing decimal point.  Backticks are not used.
     }
+    \item{\code{hexNumeric}}{
+      Real and finite complex numbers are output in \samp{"\%a"} format as
+      binary fractions (coded as hexadecimal: see \code{\link{sprintf}})
+      with maximal opportunity to be recorded exactly to full precision.
+      Complex numbers with one or both non-finite components are
+      output as if this option were not set.
+
+      (This relies on that format being correctly supported: known
+      problems on Windows are worked around as from \R 3.1.2.)
+    }
+    \item{\code{digits17}}{
+      Real and finite complex numbers are output using format
+      \samp{"\%.17g"} which may give more precision than the default
+      (but the output will depend on the platform and there may be loss
+      of precision when read back).  Complex numbers with one or both
+      non-finite components are output as if this option were not set.
+    }
   }
   For the most readable (but perhaps incomplete) display, use
-  \code{control = NULL}. This displays the object's value, but not its
+  \code{control = NULL}.  This displays the object's value, but not its
   attributes.  The default in \code{\link{deparse}} is to display the
   attributes as well, but not to use any of the other options to make
   the result parseable.  (\code{\link{dput}} and \code{\link{dump}} do
   use more default options, and printing of functions without sources
   uses \code{c("keepInteger", "keepNA")}.)
 
-  Using \code{control = "all"} comes closest to making \code{deparse()}
-  an inverse of \code{parse()}.  However, not all objects are
-  deparse-able even with this option.  A warning will be issued if the
-  function recognizes that it is being asked to do the impossible.
+  Using \code{control = c("all", "hexNumeric")} comes closest to making
+  \code{deparse()} an inverse of \code{parse()}.  However, not all
+  objects are deparse-able even with this option.  A warning will be
+  issued if the function recognizes that it is being asked to do the
+  impossible.  Also, representing double and complex numbers as decimals
+  may well not be exact.
+
+  Only one of \code{"hexNumeric"} and \code{"digits17"} can be specified.
 }
 \value{
   A numerical value corresponding to the options selected.
diff --git a/src/library/base/man/det.Rd b/src/library/base/man/det.Rd
index 604b86c..038e613 100644
--- a/src/library/base/man/det.Rd
+++ b/src/library/base/man/det.Rd
@@ -1,5 +1,5 @@
 % File src/library/base/man/det.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2007 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/base/man/detach.Rd b/src/library/base/man/detach.Rd
index b2dc629..4f917fd 100644
--- a/src/library/base/man/detach.Rd
+++ b/src/library/base/man/detach.Rd
@@ -1,10 +1,8 @@
 % File src/library/base/man/detach.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2013 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2014 R Core Team
 % Distributed under GPL 2 or later
 
-\newcommand{\sspace}{\ifelse{latex}{\out{~}}{ }}
-
 \name{detach}
 \alias{detach}
 \title{Detach Objects from the Search Path}
diff --git a/src/library/base/man/dev.Rd b/src/library/base/man/dev.Rd
index a815530..47f2cd9 100644
--- a/src/library/base/man/dev.Rd
+++ b/src/library/base/man/dev.Rd
@@ -1,6 +1,6 @@
 % File src/library/base/man/dev.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2007 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2014 R Core Team
 % Distributed under GPL 2 or later
 
 \name{.Device}
@@ -23,5 +23,9 @@
   entries as the maximal number of graphics devices which have been
   simultaneously active.  If a device has been removed, its entry will be
   \code{""} until the device number is reused.
+
+  Devices may add attributes to the character vector: for example
+  devices which write to a file may record its path in attribute
+  \code{"filepath"}.
 }
 \keyword{device}
diff --git a/src/library/base/man/diag.Rd b/src/library/base/man/diag.Rd
index 059fbba..37a0b0c 100644
--- a/src/library/base/man/diag.Rd
+++ b/src/library/base/man/diag.Rd
@@ -1,6 +1,6 @@
 % File src/library/base/man/diag.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2012 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2016 R Core Team
 % Distributed under GPL 2 or later
 
 \name{diag}
@@ -16,8 +16,8 @@ diag(x) <- value
   or construct a diagonal matrix.
 }
 \arguments{
-  \item{x}{a matrix, vector or 1D array, or missing.}
-  \item{nrow, ncol}{Optional dimensions for the result when \code{x} is
+  \item{x}{a matrix, vector or 1D \code{\link{array}}, or missing.}
+  \item{nrow, ncol}{optional dimensions for the result when \code{x} is
     not a matrix.}
   \item{value}{either a single value or a vector of length equal to that
     of the current diagonal.  Should be of a mode which can be coerced
@@ -31,7 +31,9 @@ diag(x) <- value
     an identity matrix.
     \item \code{x} is a scalar (length-one vector) and the only
     argument, it returns a square identity matrix of size given by the scalar.
-    \item \code{x} is a numeric vector, either of length at least 2 or there
+    \item \code{x} is a \sQuote{numeric} (\code{\link{complex}},
+    \code{numeric}, \code{integer}, \code{\link{logical}}, or
+    \code{\link{raw}}) vector, either of length at least 2 or there
     were further arguments.  This returns a matrix with the given
     diagonal and zero off-diagonal entries.
   }
@@ -72,14 +74,20 @@ diag(x) <- value
 \code{\link{upper.tri}}, \code{\link{lower.tri}}, \code{\link{matrix}}.
 }
 \examples{
-require(stats)
 dim(diag(3))
 diag(10, 3, 4) # guess what?
 all(diag(1:3) == {m <- matrix(0,3,3); diag(m) <- 1:3; m})
 
-diag(var(M <- cbind(X = 1:5, Y = stats::rnorm(5))))
-#-> vector with names "X" and "Y"
+## other "numeric"-like diagonal matrices :
+diag(c(1i,2i))    # complex
+diag(TRUE, 3)     # logical
+diag(as.raw(1:3)) # raw
+(D2 <- diag(2:1, 4)); typeof(D2) # "integer"
 
+require(stats)
+## diag(<var-cov-matrix>) = variances
+diag(var(M <- cbind(X = 1:5, Y = rnorm(5))))
+#-> vector with names "X" and "Y"
 rownames(M) <- c(colnames(M), rep("", 3));
 M; diag(M) #  named as well
 }
diff --git a/src/library/base/man/diff.Rd b/src/library/base/man/diff.Rd
index 6fb9e02..398c27a 100644
--- a/src/library/base/man/diff.Rd
+++ b/src/library/base/man/diff.Rd
@@ -1,5 +1,5 @@
 % File src/library/base/man/diff.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2011 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/base/man/difftime.Rd b/src/library/base/man/difftime.Rd
index a8d7e33..e087837 100644
--- a/src/library/base/man/difftime.Rd
+++ b/src/library/base/man/difftime.Rd
@@ -1,9 +1,10 @@
 % File src/library/base/man/difftime.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2014 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2016 R Core Team
 % Distributed under GPL 2 or later
 
 \name{difftime}
+\title{Time Intervals / Differences}
 \alias{difftime}
 \alias{as.difftime}
 \alias{as.double.difftime}
@@ -19,12 +20,14 @@
 \alias{Summary.difftime}
 \alias{[.difftime}
 \alias{mean.difftime}
+\alias{diff.difftime}
+\alias{c.difftime}
 \alias{units}
 \alias{units<-}
 \alias{time interval} % used by mean.Rd
-\title{Time Intervals}
 \description{
-  Time intervals creation, printing, and some arithmetic.
+  Time intervals creation, printing, and some arithmetic.  The
+  \code{\link{print}()} method calls these \dQuote{time differences}.
 }
 \usage{
 \special{time1 - time2}
@@ -87,7 +90,9 @@ as.difftime(tim, format = "\%X", units = "auto")
   \code{"difftime"} object with the same units as the \code{"difftime"}
   object.  There are methods for \code{\link{mean}} and
   \code{\link{sum}} (via the \code{\link[=S3groupGeneric]{Summary}}
-  group generic).
+  group generic), and \code{\link{diff}} via \code{\link{diff.default}}
+  building on the \code{"difftime"} method for arithmetic, notably
+  \code{-}.
 
   The units of a \code{"difftime"} object can be extracted by the
   \code{units} function, which also has a replacement form.  If the
diff --git a/src/library/base/man/dim.Rd b/src/library/base/man/dim.Rd
index 920b594..75b8c35 100644
--- a/src/library/base/man/dim.Rd
+++ b/src/library/base/man/dim.Rd
@@ -1,5 +1,5 @@
 % File src/library/base/man/dim.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2010 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/base/man/dimnames.Rd b/src/library/base/man/dimnames.Rd
index 96c2419..93f9ea7 100644
--- a/src/library/base/man/dimnames.Rd
+++ b/src/library/base/man/dimnames.Rd
@@ -1,10 +1,8 @@
 % File src/library/base/man/dimnames.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2013 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2015 R Core Team
 % Distributed under GPL 2 or later
 
-\newcommand{\sspace}{\ifelse{latex}{\out{~}}{ }}
-
 \name{dimnames}
 \title{Dimnames of an Object}
 \alias{dimnames}
@@ -19,7 +17,7 @@
 dimnames(x)
 dimnames(x) <- value
 
-provideDimnames(x, sep = "", base = list(LETTERS))
+provideDimnames(x, sep = "", base = list(LETTERS), unique = TRUE)
 }
 \arguments{
   \item{x}{an \R object, for example a matrix, array or data frame.}
@@ -31,6 +29,8 @@ provideDimnames(x, sep = "", base = list(LETTERS))
     list components are used in turn (and recycled when needed) to
     construct replacements for empty dimnames components.  See also the
     examples.}
+  \item{unique}{logical indicating that the dimnames constructed are
+    unique within each dimension in the sense of \code{\link{make.unique}}.}
 }
 \details{
   The functions \code{dimnames} and \code{dimnames<-} are generic.
@@ -60,7 +60,9 @@ provideDimnames(x, sep = "", base = list(LETTERS))
 
   \code{provideDimnames(x)} provides \code{dimnames} where
   \dQuote{missing}, such that its result has \code{\link{character}}
-  dimnames for each component.
+  dimnames for each component.  If \code{unique} is true as by default,
+  they are unique within each component via \code{\link{make.unique}(*,
+    sep=sep)}.
 }
 \value{
   The dimnames of a matrix or array can be \code{NULL} (which is not
@@ -107,6 +109,8 @@ strd <- function(x) utils::str(dimnames(x))
 strd(provideDimnames(A, base= list(letters[-(1:9)], tail(LETTERS))))
 strd(provideDimnames(N, base= list(letters[-(1:9)], tail(LETTERS)))) # recycling
 strd(provideDimnames(A, base= list(c("AA","BB")))) # recycling on both levels
+## set "empty dimnames":
+provideDimnames(rbind(1, 2:3), base = list(""), unique=FALSE)
 }
 \keyword{array}
 \keyword{manip}
diff --git a/src/library/base/man/do.call.Rd b/src/library/base/man/do.call.Rd
index 9a44ffe..e4d22c9 100644
--- a/src/library/base/man/do.call.Rd
+++ b/src/library/base/man/do.call.Rd
@@ -1,6 +1,6 @@
 % File src/library/base/man/do.call.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2012 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2014 R Core Team
 % Distributed under GPL 2 or later
 
 \name{do.call}
diff --git a/src/library/base/man/dontCheck.Rd b/src/library/base/man/dontCheck.Rd
index 28678f7..5abb4c6 100644
--- a/src/library/base/man/dontCheck.Rd
+++ b/src/library/base/man/dontCheck.Rd
@@ -1,5 +1,5 @@
 % File src/library/base/man/identity.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 2013 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/base/man/double.Rd b/src/library/base/man/double.Rd
index 859d202..e490be5 100644
--- a/src/library/base/man/double.Rd
+++ b/src/library/base/man/double.Rd
@@ -1,5 +1,5 @@
 % File src/library/base/man/double.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2013 R Core Team
 % Distributed under GPL 2 or later
 
@@ -107,10 +107,10 @@ as.single(x, \dots)
   \emph{The New S Language}.
   Wadsworth & Brooks/Cole.
 
-  \url{http://en.wikipedia.org/wiki/IEEE_754-1985},
-  \url{http://en.wikipedia.org/wiki/IEEE_754-2008},
-  \url{http://en.wikipedia.org/wiki/Double_precision},
-  \url{http://en.wikipedia.org/wiki/Denormal_number}.
+  \url{https://en.wikipedia.org/wiki/IEEE_754-1985},
+  \url{https://en.wikipedia.org/wiki/IEEE_754-2008},
+  \url{https://en.wikipedia.org/wiki/Double_precision},
+  \url{https://en.wikipedia.org/wiki/Denormal_number}.
 
   \url{http://grouper.ieee.org/groups/754/} for links to information
   on the standards.
diff --git a/src/library/base/man/dput.Rd b/src/library/base/man/dput.Rd
index 6c457c1..97542e2 100644
--- a/src/library/base/man/dput.Rd
+++ b/src/library/base/man/dput.Rd
@@ -1,6 +1,6 @@
 % File src/library/base/man/dput.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2011 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2014 R Core Team
 % Distributed under GPL 2 or later
 
 \name{dput}
@@ -15,7 +15,7 @@
 dput(x, file = "",
      control = c("keepNA", "keepInteger", "showAttributes"))
 
-dget(file)
+dget(file, keep.source = FALSE)
 }
 \arguments{
   \item{x}{an object.}
@@ -23,6 +23,8 @@ dget(file)
     \link{connection}. \code{""} indicates output to the console.}
   \item{control}{character vector indicating deparsing options.
     See \code{\link{.deparseOpts}} for their description.}
+  \item{keep.source}{logical: should the source formatting be retained when
+    parsing functions, if possible?}
 }
 \details{
   \code{dput} opens \code{file} and deparses the object \code{x} into
@@ -72,11 +74,10 @@ dget(file)
   \code{\link{deparse}}, \code{\link{dump}}, \code{\link{write}}.
 }
 \examples{
-## Write an ASCII version of mean to the file "foo"
+## Write an ASCII version of function mean to the file "foo"
 dput(mean, "foo")
 ## And read it back into 'bar'
 bar <- dget("foo")
-unlink("foo")
 ## Create a function with comments
 baz <- function(x) {
   # Subtract from one
@@ -86,6 +87,17 @@ baz <- function(x) {
 dput(baz)
 ## and now display the saved source
 dput(baz, control = "useSource")
+
+## Numeric values:
+xx <- pi^(1:3)
+dput(xx)
+dput(xx, control = "digits17")
+dput(xx, control = "hexNumeric")
+dput(xx, "foo"); dget("foo") - xx # slight rounding on all platforms
+dput(xx, "foo", control = "digits17")
+dget("foo") - xx # slight rounding on some platforms
+dput(xx, "foo", control = "hexNumeric"); dget("foo") - xx
+unlink("foo")
 }
 \keyword{file}
 \keyword{programming}
diff --git a/src/library/base/man/drop.Rd b/src/library/base/man/drop.Rd
index 099f0d7..a0a2a0b 100644
--- a/src/library/base/man/drop.Rd
+++ b/src/library/base/man/drop.Rd
@@ -1,5 +1,5 @@
 % File src/library/base/man/drop.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2008 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/base/man/droplevels.Rd b/src/library/base/man/droplevels.Rd
index 40796b6..11bfec0 100644
--- a/src/library/base/man/droplevels.Rd
+++ b/src/library/base/man/droplevels.Rd
@@ -1,10 +1,10 @@
 % File src/library/base/man/factor.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2009 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2016 R Core Team
 % Distributed under GPL 2 or later
 
 \name{droplevels}
-\title{droplevels}
+\title{Drop Unused Levels from Factors}
 \alias{droplevels}
 \alias{droplevels.factor}
 \alias{droplevels.data.frame}
@@ -12,26 +12,36 @@
 \concept{enumerated type}
 \concept{category}
 \description{
-  The function \code{droplevels} is used to drop unused levels from a factor or, more commonly, from factors in a data frame.
+  The function \code{droplevels} is used to drop unused levels from a
+  \code{\link{factor}} or, more commonly, from factors in a data frame.
 }
 \usage{
-\S3method{droplevels}{factor}(x, \dots)
-\S3method{droplevels}{data.frame}(x, except, \dots)
+\S3method{droplevels}{factor}(x, exclude = if(anyNA(levels(x))) NULL else NA, \dots)
+\S3method{droplevels}{data.frame}(x, except, exclude, \dots)
 }
 \arguments{
   \item{x}{an object from which to drop unused factor levels.}
+  \item{exclude}{passed to \code{\link{factor}()}; factor levels which
+    should be excluded from the result even if present.  Note that this
+    was \emph{implicitly} \code{NA} in \R <= 3.3.1 which did drop
+    \code{NA} levels even when present in \code{x}, contrary to the
+    documentation.  The current default is compatible with \code{x[ , drop=TRUE]}.}
   \item{\dots}{further arguments passed to methods}
   \item{except}{indices of columns from which \emph{not} to drop levels}
 }
 \value{
   \code{droplevels} returns an object of the same class as \code{x}}
 \details{
-  The method for class \code{"factor"} is essentially equivalent to \code{factor(x)}.
+  The method for class \code{"factor"} is currently equivalent to
+  \code{factor(x, exclude=exclude)}.  For the data frame method, you
+  should rarely specify \code{exclude} \dQuote{globally} for all factor
+  columns; rather the default uses the same factor-specific
+  \code{exclude} as the factor method itself.
 
   The \code{except} argument follow the usual indexing rules.
 }
 
-\note{ This function was introduced in R 2.12.0. It is primarily
+\note{ This function was introduced in R 2.12.0.  It is primarily
   intended for cases where one or more factors in a data frame
   contains only elements from a reduced level set after
   subsetting.  (Notice that subsetting does \emph{not} in general drop
@@ -50,7 +60,7 @@
 \examples{
 aq <- transform(airquality, Month = factor(Month, labels = month.abb[5:9]))
 aq <- subset(aq, Month != "Jul")
-table(aq$Month)
+table(           aq $Month)
 table(droplevels(aq)$Month)
 }
 \keyword{category}
diff --git a/src/library/base/man/dump.Rd b/src/library/base/man/dump.Rd
index ebfba6c..dc33bce 100644
--- a/src/library/base/man/dump.Rd
+++ b/src/library/base/man/dump.Rd
@@ -1,5 +1,5 @@
 % File src/library/base/man/dump.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2014 R Core Team
 % Distributed under GPL 2 or later
 
@@ -14,10 +14,10 @@ dump(list, file = "dumpdata.R", append = FALSE,
   This function takes a vector of names of \R objects and produces
   text representations of the objects on a file or connection.
   A \code{dump} file can usually be \code{\link{source}}d into another
-  \R (or S) session.
+  \R session.
 }
 \arguments{
-  \item{list}{character.  The names of one or more \R objects to be dumped.}
+  \item{list}{character vector.  The names of one or more \R objects to be dumped.}
 
   \item{file}{either a character string naming a file or a
     \link{connection}.  \code{""} indicates output to the console.}
@@ -49,7 +49,8 @@ dump(list, file = "dumpdata.R", append = FALSE,
   A \code{dump} file can be \code{\link{source}}d into another \R (or
   perhaps S) session, but the function \code{\link{save}} is designed to
   be used for transporting \R data, and will work with \R objects that
-  \code{dump} does not handle.
+  \code{dump} does not handle.  For maximal reproducibility use
+  \code{control = c("all", "hexNumeric")}.
 
   To produce a more readable representation of an object, use
   \code{control = NULL}.  This will skip attributes, and will make other
@@ -61,7 +62,7 @@ dump(list, file = "dumpdata.R", append = FALSE,
     "warnIncomplete", "keepNA")}.  This will lose all formatting and
   comments, but may be useful in those cases where the saved source is
   no longer correct.
-
+  
   Promises will normally only be encountered by users as a result of
   lazy-loading (when the default \code{evaluate = TRUE} is essential)
   and after the use of \code{\link{delayedAssign}},
diff --git a/src/library/base/man/duplicated.Rd b/src/library/base/man/duplicated.Rd
index 235312e..e5fe8be 100644
--- a/src/library/base/man/duplicated.Rd
+++ b/src/library/base/man/duplicated.Rd
@@ -1,6 +1,6 @@
 % File src/library/base/man/duplicated.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2014 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2016 R Core Team
 % Distributed under GPL 2 or later
 
 \name{duplicated}
@@ -16,7 +16,8 @@
 \alias{anyDuplicated.matrix}
 \alias{anyDuplicated.data.frame}
 \description{
-  \code{duplicated()} determines which elements of a vector or data frame are duplicates
+  \code{duplicated()} determines which elements of a vector or data
+  frame are duplicates
   of elements with smaller subscripts, and returns a logical vector
   indicating which elements (rows) are duplicates.
 
@@ -82,8 +83,10 @@ anyDuplicated(x, incomparables = FALSE, \dots)
   Note that \code{MARGIN = 0} returns an array of the same
   dimensionality attributes as \code{x}.
 
-  Missing values are regarded as equal, but \code{NaN} is not equal to
-  \code{NA_real_}.
+  Missing values (\code{"\link{NA}"}) are regarded as equal, numeric and
+  complex ones differing from \code{NaN}; character strings will be compared in a
+  \dQuote{common encoding}; for details, see \code{\link{match}} (and
+  \code{\link{unique}}) which use the same concept.
 
   Values in \code{incomparables} will never be marked as duplicated.
   This is intended to be used for a fairly small set of values and will
@@ -95,9 +98,6 @@ anyDuplicated(x, incomparables = FALSE, \dots)
   catch people who unwisely rely on exact equality of floating-point
   numbers!
 
-  Character strings will be compared as byte sequences if any input is
-  marked as \code{"bytes"} (see \code{\link{Encoding}}).
-
   Except for factors, logical and raw vectors the default \code{nmax = NA} is
   equivalent to \code{nmax = length(x)}.  Since a hash table of size
   \code{8*nmax} bytes is allocated, setting \code{nmax} suitably can
diff --git a/src/library/base/man/dynload.Rd b/src/library/base/man/dynload.Rd
index 977d235..5c546c2 100644
--- a/src/library/base/man/dynload.Rd
+++ b/src/library/base/man/dynload.Rd
@@ -1,10 +1,8 @@
 % File src/library/base/man/dynload.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2013 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2017 R Core Team
 % Distributed under GPL 2 or later
 
-\newcommand{\sspace}{\ifelse{latex}{\out{~}}{ }}
-
 \name{dyn.load}
 \alias{dyn.load}
 \alias{dyn.unload}
@@ -64,7 +62,7 @@ is.loaded(symbol, PACKAGE = "", type = "")
   
   The objects \code{dyn.load} loads are called \sQuote{dynamically
     loadable libraries} (abbreviated to \sQuote{DLL}) on all platforms
-  except OS X, which uses the term for a different sort
+  except macOS, which uses the term for a different sort
   of object.  On Unix-alikes they are also called \sQuote{dynamic
     shared objects} (\sQuote{DSO}), or \sQuote{shared objects} for
   short.  (The POSIX standards use \sQuote{executable object file},
@@ -118,7 +116,7 @@ is.loaded(symbol, PACKAGE = "", type = "")
 
   There is a short discussion of these additional arguments with some
   example code available at
-  \url{http://cm.bell-labs.com/stat/duncan/R/dynload}.
+  \url{http://www.stat.ucdavis.edu/~duncan/R/dynload/}.
 #endif
 #ifdef windows
 
@@ -163,6 +161,18 @@ is.loaded(symbol, PACKAGE = "", type = "")
   and \strong{not} (as in S) that remapped by the defunct functions
   \code{symbol.C} or \code{symbol.For}.
 
+  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.
+
   The creation of DLLs and the runtime linking of them into executing
   programs is very platform dependent.  In recent years there has been
   some simplification in the process because the C subroutine call
diff --git a/src/library/base/man/eapply.Rd b/src/library/base/man/eapply.Rd
index 7bd32f6..43b1b9c 100644
--- a/src/library/base/man/eapply.Rd
+++ b/src/library/base/man/eapply.Rd
@@ -1,5 +1,5 @@
 % File src/library/base/man/eapply.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2011 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/base/man/eigen.Rd b/src/library/base/man/eigen.Rd
index 2bb333a..6e43252 100644
--- a/src/library/base/man/eigen.Rd
+++ b/src/library/base/man/eigen.Rd
@@ -1,10 +1,11 @@
 % File src/library/base/man/eigen.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2013 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2016 R Core Team
 % Distributed under GPL 2 or later
 
 \name{eigen}
 \alias{eigen}
+\alias{print.eigen}
 \concept{eigen vector}
 \concept{eigen value}
 \title{Spectral Decomposition of a Matrix}
@@ -20,17 +21,18 @@ eigen(x, symmetric, only.values = FALSE, EISPACK = FALSE)
     be computed.  Logical matrices are coerced to numeric.}
   \item{symmetric}{if \code{TRUE}, the matrix is assumed to be symmetric
     (or Hermitian if complex) and only its lower triangle (diagonal
-    included) is used.  If \code{symmetric} is not specified, the matrix
-    is inspected for symmetry.}
+    included) is used.  If \code{symmetric} is not specified,
+    \code{\link{isSymmetric}(x)} is used.}
   \item{only.values}{if \code{TRUE}, only the eigenvalues are computed
     and returned, otherwise both eigenvalues and eigenvectors are
     returned.}
   \item{EISPACK}{logical. Defunct and ignored.}
 }
 \details{
-  If \code{symmetric} is unspecified, the code attempts to
-  determine if the matrix is symmetric up to plausible numerical
-  inaccuracies.  It is faster and surer to set the value yourself.
+  If \code{symmetric} is unspecified, \code{\link{isSymmetric}(x)}
+  determines if the matrix is symmetric up to plausible numerical
+  inaccuracies.  It is surer and typically much faster to set the value
+  yourself.
 
   Computing the eigenvectors is the slow part for large matrices.
 
@@ -41,10 +43,13 @@ eigen(x, symmetric, only.values = FALSE, EISPACK = FALSE)
   algebraic solution with repeated real eigenvalues, the computed
   solution may be of a similar matrix with complex conjugate pairs of
   eigenvalues.
+
+  Unsuccessful results from the underlying LAPACK code will result in an
+  error giving a positive error code (most often \code{1}): these can
+  only be interpreted by detailed study of the FORTRAN code.
 }
 \value{
-  The spectral decomposition of \code{x} is returned as components of a
-  list with components
+  The spectral decomposition of \code{x} is returned as a list with components
 
   \item{values}{a vector containing the \eqn{p} eigenvalues of \code{x},
     sorted in \emph{decreasing} order, according to \code{Mod(values)}
@@ -62,13 +67,16 @@ eigen(x, symmetric, only.values = FALSE, EISPACK = FALSE)
     scalar of modulus one (the sign for real matrices).
   }
 
+  When \code{only.values} is not true, as by default, the result is of
+  S3 class \code{"eigen"}.
+
   If \code{r <- eigen(A)}, and \code{V <- r$vectors; lam <- r$values},
   then \deqn{A = V \Lambda V^{-1}}{A = V Lmbd V^(-1)} (up to numerical
   fuzz), where \eqn{\Lambda =}{Lmbd =}\code{diag(lam)}.
 }
 \source{
-  By default \code{eigen} uses the LAPACK routines \code{DSYEVR},
-  \code{DGEEV}, \code{ZHEEV} and \code{ZGEEV} whereas
+  \code{eigen} uses the LAPACK routines \code{DSYEVR}, \code{DGEEV},
+  \code{ZHEEV} and \code{ZGEEV}.
 
   LAPACK is from \url{http://www.netlib.org/lapack} and its guide is listed
   in the references.
@@ -82,7 +90,6 @@ eigen(x, symmetric, only.values = FALSE, EISPACK = FALSE)
   Becker, R. A., Chambers, J. M. and Wilks, A. R. (1988)
   \emph{The New S Language}.
   Wadsworth & Brooks/Cole.
-  Springer-Verlag Lecture Notes in Computer Science \bold{6}.
 
   Wilkinson, J. H. (1965) \emph{The Algebraic Eigenvalue Problem.}
   Clarendon Press, Oxford.
diff --git a/src/library/base/man/encodeString.Rd b/src/library/base/man/encodeString.Rd
index a6e1ae8..55530a1 100644
--- a/src/library/base/man/encodeString.Rd
+++ b/src/library/base/man/encodeString.Rd
@@ -1,6 +1,6 @@
 % File src/library/base/man/encodeString.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2008 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2017 R Core Team
 % Distributed under GPL 2 or later
 
 \name{encodeString}
@@ -58,7 +58,7 @@ encodeString(x, width = 0, quote = "", na.encode = TRUE,
   A character vector of the same length as \code{x}, with the same
   attributes (including names and dimensions) but with no class set.
 
-  As from \R 3.0.0, marked UTF-8 encodings are preserved.
+  Marked UTF-8 encodings are preserved.
 }
 \seealso{
   \code{\link{print.default}}
@@ -72,10 +72,11 @@ cat(encodeString(x), "\n", sep = "") # similar to print()
 factor(x) # makes use of this to print the levels
 
 x <- c("a", "ab", "abcde")
+encodeString(x) # width = 0: use as little as possible
+encodeString(x, 2) # use two or more (left justified)
 encodeString(x, width = NA) # left justification
 encodeString(x, width = NA, justify = "c")
 encodeString(x, width = NA, justify = "r")
 encodeString(x, width = NA, quote = "'", justify = "r")
 }
 \keyword{ utilities }
-
diff --git a/src/library/base/man/environment.Rd b/src/library/base/man/environment.Rd
index 9c66f3e..6bffe93 100644
--- a/src/library/base/man/environment.Rd
+++ b/src/library/base/man/environment.Rd
@@ -1,5 +1,5 @@
 % File src/library/base/man/environment.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2012 R Core Team
 % Distributed under GPL 2 or later
 
@@ -138,7 +138,7 @@ env.profile(env)
 }
 \seealso{
   For the performance implications of hashing or not, see
-  \url{http://en.wikipedia.org/wiki/Hash_table}.
+  \url{https://en.wikipedia.org/wiki/Hash_table}.
 
   The \code{envir} argument of \code{\link{eval}}, \code{\link{get}},
   and \code{\link{exists}}.
diff --git a/src/library/base/man/eval.Rd b/src/library/base/man/eval.Rd
index 02d81df..44f5462 100644
--- a/src/library/base/man/eval.Rd
+++ b/src/library/base/man/eval.Rd
@@ -1,5 +1,5 @@
 % File src/library/base/man/eval.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2011 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/base/man/exists.Rd b/src/library/base/man/exists.Rd
index db0096f..e78d0f2 100644
--- a/src/library/base/man/exists.Rd
+++ b/src/library/base/man/exists.Rd
@@ -1,17 +1,21 @@
 % File src/library/base/man/exists.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2011 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2016 R Core Team
 % Distributed under GPL 2 or later
 
 \name{exists}
-\alias{exists}
 \title{Is an Object Defined?}
+\alias{exists}
+\alias{get0}
 \description{
-  Look for an \R object of the given name.
+  Look for an \R object of the given name and possibly return it
 }
 \usage{
 exists(x, where = -1, envir = , frame, mode = "any",
        inherits = TRUE)
+
+get0(x, envir = pos.to.env(-1L), mode = "any", inherits = TRUE,
+     ifnotfound = NULL)
 }
 \arguments{
   \item{x}{a variable name (given as a character string).}
@@ -26,6 +30,8 @@ exists(x, where = -1, envir = , frame, mode = "any",
     \sQuote{Details} section.}
   \item{inherits}{should the enclosing frames of the environment be
     searched?}
+  \item{ifnotfound}{the return value of \code{get0(x, *)} when
+    \code{x} does not exist.}
 }
 \details{
   The \code{where} argument can specify the environment in which to look
@@ -54,9 +60,26 @@ exists(x, where = -1, envir = , frame, mode = "any",
   collection is specified, so for example \code{mode = "special"} will
   seek any type of function.)
 }
+\note{
+  With \code{get0()}, instead of the easy to read but somewhat
+  inefficient \preformatted{
+  if (exists(myVarName, envir = myEnvir)) {
+    r <- get(myVarName, envir = myEnvir)
+    ## ... deal with r ...
+  }
+}
+  you now can use the more efficient (and slightly harder to read) \preformatted{
+  if (!is.null(r <- get0(myVarName, envir = myEnvir))) {
+    ## ... deal with r ...
+  }
+}
+}
 \value{
-  Logical, true if and only if an object of the correct name and mode is
-  found.
+  \code{exists():} Logical, true if and only if an object of the correct
+  name and mode is found.
+
+  \code{get0():} The object---as from \code{\link{get}(x, *)}---
+  if \code{exists(x, *)} is true, otherwise \code{ifnotfound}.
 }
 \references{
   Becker, R. A., Chambers, J. M. and Wilks, A. R. (1988)
@@ -64,7 +87,8 @@ exists(x, where = -1, envir = , frame, mode = "any",
   Wadsworth & Brooks/Cole.
 }
 \seealso{
-  \code{\link{get}}.  For quite a different kind of \dQuote{existence}
+  \code{\link{get}} and \code{\link{hasName}}.  For quite a different 
+  kind of \dQuote{existence}
   checking, namely if function arguments were specified,
   \code{\link{missing}};
   and for yet a different kind, namely if a file exists,
@@ -77,5 +101,13 @@ if(!exists("some.fun", mode = "function"))
 search()
 exists("ls", 2) # true even though ls is in pos = 3
 exists("ls", 2, inherits = FALSE) # false
+
+## These are true (in most circumstances):
+identical(ls,   get0("ls"))
+identical(NULL, get0(".foo.bar.")) # default ifnotfound = NULL (!)
+\dontshow{
+stopifnot(identical(ls, get0("ls")),
+          is.null(get0(".foo.bar.")))
+}
 }
 \keyword{data}
diff --git a/src/library/base/man/expand.grid.Rd b/src/library/base/man/expand.grid.Rd
index 2c261a0..0e65c26 100644
--- a/src/library/base/man/expand.grid.Rd
+++ b/src/library/base/man/expand.grid.Rd
@@ -1,14 +1,16 @@
 % File src/library/base/man/expand.grid.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2010 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2015 R Core Team
 % Distributed under GPL 2 or later
 
 \name{expand.grid}
-\title{Create a Data Frame from All Combinations of Factors}
+\title{Create a Data Frame from All Combinations of Factor Variables}
+\alias{expand.grid}
+\concept{variable combinations}
+\concept{variable permutations}
 \usage{
 expand.grid(\dots, KEEP.OUT.ATTRS = TRUE, stringsAsFactors = TRUE)
 }
-\alias{expand.grid}
 \arguments{
   \item{\dots}{vectors, factors or a list containing these.}
   \item{KEEP.OUT.ATTRS}{a logical indicating the \code{"out.attrs"}
diff --git a/src/library/base/man/expression.Rd b/src/library/base/man/expression.Rd
index 2c06171..d49b2fc 100644
--- a/src/library/base/man/expression.Rd
+++ b/src/library/base/man/expression.Rd
@@ -1,5 +1,5 @@
 % File src/library/base/man/expression.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2010 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/base/man/extSoftVersion.Rd b/src/library/base/man/extSoftVersion.Rd
new file mode 100644
index 0000000..061bcba
--- /dev/null
+++ b/src/library/base/man/extSoftVersion.Rd
@@ -0,0 +1,76 @@
+% File src/library/base/man/extSoftVersion.Rd
+% Part of the R package, https://www.R-project.org
+% Copyright 2014-2017 R Core Team
+% Distributed under GPL 2 or later
+
+\name{extSoftVersion}
+\alias{extSoftVersion}
+\title{
+  Report Versions of Third-Party Software
+}
+\description{
+  Report versions of (external) third-party software used.
+}
+\usage{
+extSoftVersion()
+}
+\details{
+  The reports the versions of third-party software libraries in use.
+  These are often external but might have been compiled into \R when it
+  was installed.
+
+  With dynamic linking, these are the versions of the libraries linked
+  to in this session: with static linking, of those compiled in.
+}
+\value{
+  A named character vector, currently with components
+  \item{zlib}{The version of \code{zlib} in use.}
+  \item{bzlib}{The version of \code{bzlib} (from \command{bzip2}) in use.}
+  \item{xz}{The version of \code{liblzma} (from \command{xz}) in use.}
+  \item{PCRE}{The version of \code{PCRE} in use.}
+  \item{ICU}{The version of \code{ICU} in use (if any, otherwise \code{""}).}
+  \item{TRE}{The version of \code{libtre} in use.}
+  \item{iconv}{The implementation and version of the \code{iconv}
+  library in use (if known).}
+  \item{readline}{The version of \code{readline} in use (if any,
+  otherwise \code{""}).}
+  \item{BLAS}{Name of the binary/executable file with the implementation of
+  \code{BLAS} in use (if known, otherwise \code{""}).}
+
+  Note that the values for \code{bzlib} and \code{pcre} normally contain
+  a date as well as the version number, and that for \code{tre} includes
+  several items separated by spaces, the version number being the
+  second.
+
+  For \code{iconv} this will give the implementation as well as the
+  version, for example \code{"GNU libiconv 1.14"}, \code{"glibc
+  2.18"} or \code{"win_iconv"} (which has no version number).
+
+  The name of the binary/executable file for \code{BLAS} can be used as an
+  indication of which implementation is in use.  Typically, the R version of
+  BLAS will appear as \code{libR.so} (\code{libR.dylib}), \code{R} or
+  \code{libRblas.so} (\code{libRblas.dylib}), depending on how R was built.
+  Note that \code{libRblas.so} (\code{libRblas.dylib}) may also be shown for
+  an external BLAS implementation that had been copied, hard-linked or
+  renamed by the system administrator.  For an external BLAS, a shared
+  object file will be given and its path/name may indicate the
+  vendor/version. The detection does not work on Windows.
+}
+\seealso{
+  \code{\link{libcurlVersion}} for the version of \code{libCurl}.
+  
+  \code{\link{La_version}} for the version of LAPACK in use.
+
+  \code{\link{La_library}} for binary/executable file with LAPACK in use.
+
+  \code{\link{grSoftVersion}} for third-party graphics software.
+
+  \code{\link{tclVersion}} for the version of Tcl/Tk.
+  
+  \code{\link{pcre_config}} for PCRE configuration options.
+}
+\examples{
+extSoftVersion()
+## the PCRE version
+sub(" .*", "", extSoftVersion()["PCRE"])
+}
diff --git a/src/library/base/man/factor.Rd b/src/library/base/man/factor.Rd
index f3f4003..71cd20c 100644
--- a/src/library/base/man/factor.Rd
+++ b/src/library/base/man/factor.Rd
@@ -1,6 +1,6 @@
 % File src/library/base/man/factor.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2013 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2016 R Core Team
 % Distributed under GPL 2 or later
 
 \name{factor}
@@ -18,6 +18,7 @@
 \alias{Ops.ordered}
 \alias{Summary.ordered}
 \alias{addNA}
+\alias{.valid.factor}
 \concept{categorical variable}
 \concept{enumerated type}
 \concept{category}
@@ -53,12 +54,13 @@ addNA(x, ifany = FALSE)
     values taken by \code{\link{as.character}(x)}, sorted into
     increasing order \emph{of \code{x}}.  Note that this set can be
     specified as smaller than \code{sort(unique(x))}.}
-  \item{labels}{\emph{either} an optional character vector of labels for the
-    levels (in the same order as \code{levels} after removing those in
-    \code{exclude}), \emph{or} a character string of length 1.}
+  \item{labels}{\emph{either} an optional character vector of (unique)
+    labels for the levels (in the same order as \code{levels} after
+    removing those in \code{exclude}), \emph{or} a character string of
+    length 1.}
   \item{exclude}{a vector of values to be excluded when forming the
-    set of levels.  This should be of the same type as \code{x}, and
-    will be coerced if necessary.}
+    set of levels.  This may be factor with the same level set as \code{x}
+    or should be a \code{character}.}
   \item{ordered}{logical flag to determine if the levels should be regarded
     as ordered (in the order given).}
   \item{nmax}{an upper bound on the number of levels; see \sQuote{Details}.}
@@ -85,13 +87,18 @@ addNA(x, ifany = FALSE)
   factor and \code{FALSE} otherwise.
 
   \code{as.factor} coerces its argument to a factor.
-  It is an abbreviated form of \code{factor}.
+  It is an abbreviated (sometimes faster) form of \code{factor}.
 
   \code{as.ordered(x)} returns \code{x} if this is ordered, and
   \code{ordered(x)} otherwise.
 
   \code{addNA} modifies a factor by turning \code{NA} into an extra
   level (so that \code{NA} values are counted in tables, for instance).
+
+  \code{.valid.factor(object)} checks the validity of a factor,
+  currently only \code{levels(object)}, and returns \code{TRUE} if it is
+  valid, otherwise a string describing the validity problem.  This
+  function is used for \code{\link{validObject}(<factor>)}.
 }
 \details{
   The type of the vector \code{x} is not restricted; it only must have
@@ -115,11 +122,15 @@ addNA(x, ifany = FALSE)
   which case the levels are that character string with a sequence
   number appended.
 
-  \code{factor(x, exclude = NULL)} applied to a factor is a no-operation
-  unless there are unused levels: in that case, a factor with the
-  reduced level set is returned.  If \code{exclude} is used it should
-  also be a factor with the same level set as \code{x} or a set of codes
-  for the levels to be excluded.
+  \code{factor(x, exclude = NULL)} applied to a factor without
+  \code{\link{NA}}s is a no-operation unless there are unused levels: in
+  that case, a factor with the reduced level set is returned.  If
+  \code{exclude} is used, since \R version 3.4.0, excluding non-existing
+  character levels is equivalent to excluding nothing, and when
+  \code{exclude} is a \code{\link{character}} vector, that \emph{is}
+  applied to the levels of \code{x}.
+  Alternatively, \code{exclude} can be factor with the same level set as
+  \code{x} and will exclude the levels present in \code{exclude}.
 
   The codes of a factor may contain \code{\link{NA}}.  For a numeric
   \code{x}, set \code{exclude = NULL} to make \code{\link{NA}} an extra
@@ -226,6 +237,14 @@ x  # [1] 1    <NA> <NA>
 is.na(x)
 # [1] FALSE  TRUE FALSE
 
+## More rational, since R 3.4.0 :
+factor(c(1:2, NA), exclude =  "" ) # keeps <NA> , as
+factor(c(1:2, NA), exclude = NULL) # always did
+## exclude = <character>
+z # ordered levels 'A < B < C'
+factor(z, exclude = "C") # does exclude
+factor(z, exclude = "B") # ditto
+
 ## Using addNA()
 Month <- airquality$Month
 table(addNA(Month))
diff --git a/src/library/base/man/file.access.Rd b/src/library/base/man/file.access.Rd
index 245edb1..94d1e2c 100644
--- a/src/library/base/man/file.access.Rd
+++ b/src/library/base/man/file.access.Rd
@@ -1,5 +1,5 @@
 % File src/library/base/man/file.access.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2007 R Core Team
 % Distributed under GPL 2 or later
 
@@ -31,7 +31,7 @@ file.access(names, mode = 0)
   than the effective IDs).
 #endif
 #ifdef windows
-  This function does uses the C function \code{_access} in
+  This function uses the C function \code{_access} in
   \file{msvcrt.dll}, but was written using Win32 API functions.
 
   Windows does not have the concept of an \sQuote{executable file}, so
diff --git a/src/library/base/man/file.choose.Rd b/src/library/base/man/file.choose.Rd
index 637e15c..e2a01f3 100644
--- a/src/library/base/man/file.choose.Rd
+++ b/src/library/base/man/file.choose.Rd
@@ -1,5 +1,5 @@
 % File src/library/base/man/file.choose.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2008 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/base/man/file.info.Rd b/src/library/base/man/file.info.Rd
index e8278f7..aac3b37 100644
--- a/src/library/base/man/file.info.Rd
+++ b/src/library/base/man/file.info.Rd
@@ -1,21 +1,30 @@
 % File src/library/base/man/file.info.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2012 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2015 R Core Team
 % Distributed under GPL 2 or later
 
 \name{file.info}
 \alias{file.info}
+\alias{file.mode}
+\alias{file.mtime}
+\alias{file.size}
 \title{Extract File Information}
 \description{
   Utility function to extract information about files on the user's
   file systems.
 }
 \usage{
-file.info(\dots)
+file.info(\dots, extra_cols = TRUE)
+
+file.mode(\dots)
+file.mtime(\dots)
+file.size(\dots)
 }
 \arguments{
   \item{\dots}{character vectors containing file paths.  Tilde-expansion
     is done: see \code{\link{path.expand}}.}
+  \item{extra_cols}{Logical: return all cols rather than just the
+    first six.}
 }
 \details{
   What constitutes a \sQuote{file} is OS-dependent but includes
@@ -48,7 +57,7 @@ file.info(\dots)
 #endif
 }
 \value{
-  A data frame with row names the file names and columns
+  For \code{file.info}, data frame with row names the file names and columns
   \item{size}{double: File size in bytes.}
   \item{isdir}{logical: Is the file a directory?}
   \item{mode}{integer of class \code{"octmode"}.  The file permissions,
@@ -70,6 +79,11 @@ file.info(\dots)
     bits but not executable in this sense.}
 #endif
 
+  If \code{extra_cols} is false, only the first six columns are
+  returned: as these can all be found from a single C system call this
+  can be faster.  (However, properly configured systems will use a
+  \sQuote{name service cache daemon} to speed up the name lookups.)
+  
   Entries for non-existent or non-readable files will be \code{NA}.
 #ifdef unix
   The \code{uid}, \code{gid}, \code{uname} and \code{grname} columns
@@ -87,6 +101,9 @@ file.info(\dots)
   some systems.  However, many file systems only record times in
   seconds, and some (e.g., modification time on FAT systems) are recorded
   in increments of 2 or more seconds.
+  
+  \code{file.mode}, \code{file.mtime} and \code{file.size} are
+  convenience wrappers returning just one of the columns.
 }
 #ifdef unix
 \note{
@@ -107,8 +124,9 @@ file.info(\dots)
 }
 \examples{
 ncol(finf <- file.info(dir()))  # at least six
-\dontrun{finf # the whole list}
+\donttest{finf # the whole list}
 ## Those that are more than 100 days old :
+finf <- file.info(dir(), extra_cols = FALSE)
 finf[difftime(Sys.time(), finf[,"mtime"], units = "days") > 100 , 1:4]
 
 file.info("no-such-file-exists")
diff --git a/src/library/base/man/file.path.Rd b/src/library/base/man/file.path.Rd
index 1dada8f..dc0abdf 100644
--- a/src/library/base/man/file.path.Rd
+++ b/src/library/base/man/file.path.Rd
@@ -1,6 +1,6 @@
 % File src/library/base/man/file.path.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2014 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2017 R Core Team
 % Distributed under GPL 2 or later
 
 \name{file.path}
@@ -26,8 +26,7 @@ file.path(\dots, fsep = .Platform$file.sep)
 
   Trailing path separators are invalid for Windows file paths apart from
   \file{/} and \file{d:/} (although some functions/utilities do accept
-  them), so as from \R 3.1.0 a trailing \code{/} or \code{\\} is
-  removed.
+  them), so a trailing \code{/} or \code{\\} is removed.
 }
 \value{
   A character vector of the arguments concatenated term-by-term and
diff --git a/src/library/base/man/file.show.Rd b/src/library/base/man/file.show.Rd
index 8744a46..75604ce 100644
--- a/src/library/base/man/file.show.Rd
+++ b/src/library/base/man/file.show.Rd
@@ -1,12 +1,14 @@
 % File src/library/base/man/file.show.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2013 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2015 R Core Team
 % Distributed under GPL 2 or later
 
 \name{file.show}
 \alias{file.show}
-\title{Display One or More Files}
-\description{Display one or more files.}
+\title{Display One or More Text Files}
+\description{Display one or more (plain) text files, in a platform
+  specific way, typically via a \sQuote{pager}.
+}
 \usage{
 file.show(\dots, header = rep("", nfiles),
           title = "R Information",
@@ -54,7 +56,7 @@ file.show(\dots, header = rep("", nfiles),
     title, delete.file)} corresponding to the first four arguments of
   \code{file.show} and take care of interfacing to the GUI.
 
-  The \command{R.app} GUI on OS X uses its internal pager irrespective
+  The \command{R.app} GUI on macOS uses its internal pager irrespective
   of the setting of \code{pager}.
 
   Not all implementations will honour \code{delete.file}.  In
@@ -64,9 +66,11 @@ file.show(\dots, header = rep("", nfiles),
 }
 \author{Ross Ihaka, Brian Ripley.}
 \seealso{
-  \code{\link{files}},
-  \code{\link{list.files}},
-  \code{\link{help}}.
+  \code{\link{files}}, \code{\link{list.files}},
+  \code{\link{help}};
+  \code{\link{RShowDoc}} call \code{file.show()} for \code{type =
+  "text"}.  Consider \code{\link{getOption}("pdfviewer")} and
+  e.g., \code{\link{system}} for displaying pdf files.
 
   \code{\link{file.edit}}.
 }
diff --git a/src/library/base/man/files.Rd b/src/library/base/man/files.Rd
index 98c3b67..4d7a238 100644
--- a/src/library/base/man/files.Rd
+++ b/src/library/base/man/files.Rd
@@ -1,6 +1,6 @@
 % File src/library/base/man/files.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2013 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2017 R Core Team
 % Distributed under GPL 2 or later
 
 \name{files}
@@ -112,12 +112,14 @@ Sys.junction(from, to)
   applies only to files.) Other security attributes such as ACLs are not
   copied.  On a POSIX filesystem the targets of symbolic links will be
   copied rather than the links themselves, and hard links are copied
-  separately.
+  separately.  Using \code{copy.date = TRUE} may or may not copy the
+  timestamp exactly (for example, fractional seconds may be omitted),
+  but is more likely to do so as from \R 3.4.0.
 
   \code{file.symlink} and \code{file.link} make symbolic and hard links
   on those file systems which support them.  For \code{file.symlink} the
   \code{to} argument can specify a single existing directory.  (Unix and
-  OS X native filesystems support both.  Windows has hard links to
+  macOS native filesystems support both.  Windows has hard links to
   files on NTFS file systems and concepts related to symbolic links on
   recent versions: see the section below on the Windows version of this
   help page.  What happens on a FAT or SMB-mounted file system is OS-specific.)
@@ -133,7 +135,7 @@ Sys.junction(from, to)
 }
 
 \section{Case-insensitive file systems}{
-  Case-insensitive file systems are the norm on Windows and OS X,
+  Case-insensitive file systems are the norm on Windows and macOS,
   but can be found on all OSes (for example a FAT-formatted USB drive is
   probably case-insensitive).
 
@@ -160,40 +162,43 @@ Sys.junction(from, to)
   POSIX file systems do not exist on Windows: however, NTFS file systems
   support two similar concepts.
 
-  Windows 2000 and later have \sQuote{junctions} (or
-  \sQuote{junction points}), unfortunately without a public API.  They
-  are a Windows version of the Unix concept of mounting one directory on
-  another.  One way to create, list and delete junctions is \emph{via}
+  Windows 2000 and later have \sQuote{junctions} (or \sQuote{junction
+  points}), unfortunately without a public API.  They are a Windows
+  version of the Unix concept of mounting one directory on another.  One
+  way to create, list and delete junctions is \emph{via}
   \file{junction.exe} from
-  \url{http://download.sysinternals.com/Files/Junction.zip} (see
-  \url{http://technet.microsoft.com/en-us/sysinternals/bb896768}).  On
+  \url{https://download.sysinternals.com/files/Junction.zip} (see
+  \url{https://technet.microsoft.com/en-us/sysinternals/bb896768}).  On
   recent enough versions of Windows \command{mklink /J} can also be
-  used.  Function \code{Sys.junction} (added in \R 2.15.0) creates one
-  or more junctions: \code{to} should either specify a single existing
-  directory or a set of non-existent file paths of the same length as
-  \code{from}.
+  used.  Function \code{Sys.junction} creates one or more junctions:
+  \code{to} should either specify a single existing directory or a set
+  of non-existent file paths of the same length as \code{from}.
 
   A version of symbolic linking to files/directories was implemented
   starting with Vista, and \code{file.symlink} makes use of that
-  interface since \R 2.15.0.  However, it has restrictions (apart from
-  the OS version restriction) which are crippling.  First, the user
-  needs permission to make symbolic links, and that permission is not
-  normally granted except to Administrator accounts (note: not users
-  with Administrator rights): further many users report that whereas the
-  Policy Editor appears to be able to grant such rights, the API still
-  reports insufficient permissions.  Second, the interface needs to know
-  if \code{from} is a file or a directory (and it need not yet exist):
-  we have implemented this to allow linking from a directory only if it
-  currently exists.  Prior to \R 3.0.3 the paths had to use backslashes
-  (an undocumented restriction of the Windows system call).
+  interface.  However, it has restrictions (apart from the OS version
+  restriction) which are crippling.  First, the user needs permission to
+  make symbolic links, and that permission is not normally granted
+  except to Administrator accounts (note: not users with Administrator
+  rights): further many users report that whereas the Policy Editor
+  appears to be able to grant such rights, the API still reports
+  insufficient permissions.  Second, the interface needs to know if
+  \code{from} is a file or a directory (and it need not yet exist): we
+  have implemented this to allow linking from a directory only if it
+  currently exists.
 
   Care is needed with removing a junction (and most likely also a
-  symbolic link): many tools will remove the target and its contents
-  (including Windows Explorer in XP, and \code{unlink} in \R prior to
-  2.15.0).
+  symbolic link): many tools will remove the target and its contents.
 }
 #endif
 
+\section{Warning}{
+  Always check the return value of these functions when used in package
+  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).
+}
 \author{
   Ross Ihaka, Brian Ripley
 }
@@ -207,10 +212,10 @@ Sys.junction(from, to)
 
   \code{\link{Sys.glob}} to expand wildcards in file specifications.
 
-  \code{\link{file_test}}, \code{\link{Sys.readlink}}.
+  \code{\link{file_test}}, \code{\link{Sys.readlink}} (for \sQuote{symlink}s).
 
-  \url{http://en.wikipedia.org/wiki/Hard_link} and
-  \url{http://en.wikipedia.org/wiki/Symbolic_link} for the concepts of
+  \url{https://en.wikipedia.org/wiki/Hard_link} and
+  \url{https://en.wikipedia.org/wiki/Symbolic_link} for the concepts of
   links and their limitations.
 }
 
diff --git a/src/library/base/man/files2.Rd b/src/library/base/man/files2.Rd
index 11782e0..75c96ea 100644
--- a/src/library/base/man/files2.Rd
+++ b/src/library/base/man/files2.Rd
@@ -1,12 +1,11 @@
 % File src/library/base/man/files.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2011 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2014 R Core Team
 % Distributed under GPL 2 or later
 
-\newcommand{\sspace}{\ifelse{latex}{\out{~}}{ }}
-
 \name{files2}
 \alias{dir.create}
+\alias{dir.exists}
 \alias{Sys.chmod}
 \alias{Sys.umask}
 \concept{directory}
@@ -18,6 +17,7 @@
   file system.
 }
 \usage{
+dir.exists(paths)
 dir.create(path, showWarnings = TRUE, recursive = FALSE, mode = "0777")
 Sys.chmod(paths, mode = "0777", use_umask = TRUE)
 Sys.umask(mode = NA)
@@ -104,6 +104,9 @@ Sys.umask(mode = NA)
   FAT/FAT32 or network-mounted file system.
 }
 \value{
+  \code{dir.exists} returns a logical vector of \code{TRUE} or
+  \code{FALSE} values (without names).
+  
   \code{dir.create} and \code{Sys.chmod} return invisibly a logical vector
   indicating if the operation succeeded for each of the files attempted.
   Using a missing value for a path name will always be regarded as a
diff --git a/src/library/base/man/find.package.Rd b/src/library/base/man/find.package.Rd
index 7bd3940..0ee9547 100644
--- a/src/library/base/man/find.package.Rd
+++ b/src/library/base/man/find.package.Rd
@@ -1,6 +1,6 @@
 % File src/library/base/man/find.package.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2013 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2015 R Core Team
 % Distributed under GPL 2 or later
 
 \name{find.package}
@@ -54,6 +54,10 @@ path.package(package, quiet = FALSE)
   Unless \code{quiet = TRUE} it will warn if some of the packages named
   are not attached, and given an error if none are.
 }
+\seealso{
+  \code{\link{path.expand}} and \code{\link{normalizePath}} for path
+  standardization.
+}
 \value{
   A character vector of paths of package directories.
 }
diff --git a/src/library/base/man/findInterval.Rd b/src/library/base/man/findInterval.Rd
index 513f867..e175cc2 100644
--- a/src/library/base/man/findInterval.Rd
+++ b/src/library/base/man/findInterval.Rd
@@ -1,13 +1,14 @@
 % File src/library/base/man/findInterval.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2009 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2015 R Core Team
 % Distributed under GPL 2 or later
 
 \name{findInterval}
 \alias{findInterval}
 \title{Find Interval Numbers or Indices}
 \usage{
-findInterval(x, vec, rightmost.closed = FALSE, all.inside = FALSE)
+findInterval(x, vec, rightmost.closed = FALSE, all.inside = FALSE,
+             left.open = FALSE)
 }
 \arguments{
   \item{x}{numeric.}
@@ -18,6 +19,11 @@ findInterval(x, vec, rightmost.closed = FALSE, all.inside = FALSE)
   \item{all.inside}{logical; if true, the returned indices are coerced
     into \code{1,\dots,N-1}, i.e., \code{0} is mapped to \code{1}
     and \code{N} to \code{N-1}.}
+  \item{left.open}{logical; if true all the intervals are open at left
+    and closed at right; in the formulas below, \eqn{\le} should be
+    swapped with \eqn{<} (and \eqn{>} with \eqn{\ge}), and
+    \code{rightmost.closed} means \sQuote{leftmost is closed}.  This may
+    be useful, e.g., in survival analysis computations.}
 }
 \description{
   Given a vector of non-decreasing breakpoints in \code{vec}, find the
@@ -47,6 +53,15 @@ findInterval(x, vec, rightmost.closed = FALSE, all.inside = FALSE)
   When \code{rightmost.closed = TRUE}, the result for \code{x[j] = vec[N]}
   (\eqn{ = \max vec}{ = max(vec)}), is \code{N - 1} as for all other
   values in the last interval.
+
+  \code{left.open = TRUE} is occasionally useful, e.g., for survival data.
+  For (anti-)symmetry reasons, it is equivalent to using
+  \dQuote{mirrored} data, i.e., the following is always true: \preformatted{
+    identical(
+          findInterval( x,  v,      left.open= TRUE, ...) ,
+      N - findInterval(-x, -v[N:1], left.open=FALSE, ...) )
+    }
+    where \code{N <- length(vec)} as above.
 }
 \value{
   vector of length \code{length(x)} with values in \code{0:N} (and
@@ -72,6 +87,12 @@ X <- sort(round(stats::rt(N, df = 2), 2))
 tt <- c(-100, seq(-2, 2, len = 201), +100)
 it <- findInterval(tt, X)
 tt[it < 1 | it >= N] # only first and last are outside range(X)
+
+##  'left.open = TRUE' means  "mirroring" :
+N <- length(v)
+stopifnot(identical(
+                  findInterval( x,  v,  left.open=TRUE) ,
+              N - findInterval(-x, -v[N:1])))
 }
 \keyword{arith}
 \keyword{utilities}
diff --git a/src/library/base/man/force.Rd b/src/library/base/man/force.Rd
index fea9590..fe0dec6 100644
--- a/src/library/base/man/force.Rd
+++ b/src/library/base/man/force.Rd
@@ -1,5 +1,5 @@
 % File src/library/base/man/force.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2007 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/base/man/forceAndCall.Rd b/src/library/base/man/forceAndCall.Rd
new file mode 100644
index 0000000..7351313
--- /dev/null
+++ b/src/library/base/man/forceAndCall.Rd
@@ -0,0 +1,37 @@
+% File src/library/base/man/forceAndCall.Rd
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2015 R Core Team
+% Distributed under GPL 2 or later
+
+\name{forceAndCall}
+\alias{forceAndCall}
+\title{Call a function with Some Arguments Forced}
+\description{
+  Call a function with a specified number of leading arguments forced
+  before the call if the function is a closure.
+}
+\usage{
+forceAndCall(n, FUN, ...)
+}
+\arguments{
+  \item{n}{number of leading arguments to force.}
+  \item{FUN}{function to call.}
+  \item{\dots}{arguments to \code{FUN}.}
+}
+\details{
+  \code{forceAndCall} calls the function \code{FUN} with arguments
+  specified in \code{\dots}.  If the value of \code{FUN} is a closure
+  then the first \code{n} arguments to the function are evaluated
+  (i.e. their delayed evaluation promises are forced) before executing
+  the function body.  If the value of \code{FUN} is a primitive then
+  the call \code{FUN(\dots)} is evaluated in the usual way.
+
+  \code{forceAndCall} is intended to help defining higher order
+  functions like \code{\link{apply}} to behave more reasonably when the
+  result returned by the function applied is a closure that captured its
+  arguments.
+}
+\seealso{
+  \code{\link{force}}, \code{\link{promise}}, \code{\link{closure}}.
+}
+\keyword{programming}
diff --git a/src/library/base/man/formals.Rd b/src/library/base/man/formals.Rd
index da1539b..a71ed45 100644
--- a/src/library/base/man/formals.Rd
+++ b/src/library/base/man/formals.Rd
@@ -1,26 +1,25 @@
 % File src/library/base/man/formals.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2011 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2015 R Core Team
 % Distributed under GPL 2 or later
 
 \name{formals}
+\title{Access to and Manipulation of the Formal Arguments}
 \alias{formals}
 \alias{formals<-}
-\title{Access to and Manipulation of the Formal Arguments}
 \description{
-  Get or set the formal arguments of a function.
+  Get or set the formal arguments of a \code{\link{function}}.
 }
 \usage{
 formals(fun = sys.function(sys.parent()))
 formals(fun, envir = environment(fun)) <- value
 }
 \arguments{
-  \item{fun}{a function object, or see \sQuote{Details}.}
-  \item{envir}{environment in which the function should be defined.}
-  \item{value}{a list (or pairlist) of \R expressions.}
+  \item{fun}{a \code{\link{function}}, or see \sQuote{Details}.}
+  \item{envir}{\code{\link{environment}} in which the function should be defined.}
+  \item{value}{a \code{\link{list}} (or \code{\link{pairlist}}) of \R expressions.}
 }
 \details{
-
   For the first form, \code{fun} can also be a character string naming
   the function to be manipulated, which is searched for from the parent
   frame.  If it is not specified, the function calling \code{formals} is
@@ -38,18 +37,34 @@ formals(fun, envir = environment(fun)) <- value
   environment of the function.
 }
 \seealso{
+  \code{\link{formalArgs}} (from \pkg{methods}), a shortcut for \code{names(formals(.))}.
   \code{\link{args}} for a human-readable version,
   \code{\link{alist}},
   \code{\link{body}},
   \code{\link{function}}.
 }
 \examples{
-require(stats); require(graphics)
-length(formals(lm))      # the number of formal arguments
-names(formals(boxplot))  # formal arguments names
+require(stats)
+formals(lm)
+
+## If you just want the names of the arguments, use formalArgs instead.
+names(formals(lm))
+methods:: formalArgs(lm)     # same
+
+## formals returns a pairlist. Arguments with no default have type symbol (aka name).
+str(formals(lm))
+
+## formals returns NULL for primitive functions.  Use it in combination with
+## args for this case.
+is.primitive(`+`)
+formals(`+`)
+formals(args(`+`))
 
-f <- function(x) a+b
-formals(f) <- alist(a = , b = 3) # function(a, b = 3) a+b
+## You can overwrite the formal arguments of a function (though this is
+## advanced, dangerous coding).
+f <- function(x) a + b
+formals(f) <- alist(a = , b = 3)
+f    # function(a, b = 3) a + b
 f(2) # result = 5
 }
 \keyword{programming}
diff --git a/src/library/base/man/format.Rd b/src/library/base/man/format.Rd
index 26db1b9..bd5ae09 100644
--- a/src/library/base/man/format.Rd
+++ b/src/library/base/man/format.Rd
@@ -1,7 +1,7 @@
 % File src/library/base/man/format.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2014 R Core Team
-% Copyright 2003-2013 The R Foundation
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2016 R Core Team
+% Copyright 2003-2016 The R Foundation
 % Distributed under GPL 2 or later
 
 \name{format}
@@ -20,10 +20,10 @@ format(x, \dots)
 \method{format}{default}(x, trim = FALSE, digits = NULL, nsmall = 0L,
        justify = c("left", "right", "centre", "none"),
        width = NULL, na.encode = TRUE, scientific = NA,
-       big.mark = "",   big.interval = 3L,
+       big.mark   = "",   big.interval = 3L,
        small.mark = "", small.interval = 5L,
-       decimal.mark = ".", zero.print = NULL,
-       drop0trailing = FALSE, \dots)
+       decimal.mark = getOption("OutDec"),
+       zero.print = NULL, drop0trailing = FALSE, \dots)
 
 \method{format}{data.frame}(x, \dots, justify = "none")
 
@@ -33,42 +33,42 @@ format(x, \dots)
 }
 \arguments{
   \item{x}{any \R object (conceptually); typically numeric.}
-  
+
   \item{trim}{logical; if \code{FALSE}, logical, numeric and complex
     values are right-justified to a common width: if \code{TRUE} the
     leading blanks for justification are suppressed.}
-  
+
   \item{digits}{how many significant digits are to be used for
     numeric and complex \code{x}.  The default, \code{NULL}, uses
     \code{\link{getOption}("digits")}.  This is a suggestion: enough decimal
     places will be used so that the smallest (in magnitude) number has
     this many significant digits, and also to satisfy \code{nsmall}.
     (For the interpretation for complex numbers see \code{\link{signif}}.)}
-  
+
   \item{nsmall}{the minimum number of digits to the right of the decimal
     point in formatting real/complex numbers in non-scientific formats.
     Allowed values are \code{0 <= nsmall <= 20}.}
-  
+
   \item{justify}{should a \emph{character} vector be left-justified (the
-    default), right-justified, centred or left alone.}
-  
+    default), right-justified, centred or left alone.  Can be abbreviated.}
+
   \item{width}{\code{default} method: the \emph{minimum} field width or
     \code{NULL} or \code{0} for no restriction.
 
     \code{AsIs} method: the \emph{maximum} field width for non-character
     objects.  \code{NULL} corresponds to the default \code{12}.
   }
-  
+
   \item{na.encode}{logical: should \code{NA} strings be encoded?  Note
     this only applies to elements of character vectors, not to numerical,
     complex nor logical \code{NA}s, which are always encoded as \code{"NA"}.}
   % because Mr Gorjanc won't read, PR#12318
-  
+
   \item{scientific}{Either a logical specifying whether
     elements of a real or complex vector should be encoded in scientific
     format, or an integer penalty (see \code{\link{options}("scipen")}).
     Missing values correspond to the current default penalty.}
-  
+
   \item{\dots}{further arguments passed to or from other methods.}
 
   \item{big.mark, big.interval, small.mark,
@@ -93,8 +93,9 @@ format(x, \dots)
   then calls the default method (and so \code{justify} applies).
 
   \code{format.AsIs} deals with columns of complicated objects that
-  have been extracted from a data frame.  Character objects are passed
-  to the default method (and so \code{width} does not apply).
+  have been extracted from a data frame.  Character objects and (atomic)
+  matrices are passed to the default method (and so \code{width} does
+  not apply).
   Otherwise it calls \code{\link{toString}} to convert the object
   to character (if a vector or list, element by element) and then
   right-justifies the result.
@@ -113,7 +114,7 @@ format(x, \dots)
   Numeric vectors are encoded with the minimum number of decimal places
   needed to display all the elements to at least the \code{digits}
   significant digits.  However, if all the elements then have trailing
-  zeroes, the number of decimal places is reduced until 
+  zeroes, the number of decimal places is reduced until
   \code{nsmall} is reached or at least one
   element has a non-zero final digit; see also the argument
   documentation for \code{big.*}, \code{small.*} etc, above.  See the
@@ -121,7 +122,7 @@ format(x, \dots)
 
   Raw vectors are converted to their 2-digit hexadecimal representation
   by \code{\link{as.character}}.
-  
+
   The internal code respects the option
   \code{\link{getOption}("OutDec")} for the \sQuote{decimal mark}, so if
   this is set to something other than \code{"."} then it takes precedence
diff --git a/src/library/base/man/format.info.Rd b/src/library/base/man/format.info.Rd
index 7e508dc..eebb584 100644
--- a/src/library/base/man/format.info.Rd
+++ b/src/library/base/man/format.info.Rd
@@ -1,5 +1,5 @@
 % File src/library/base/man/format.info.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2011 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/base/man/format.pval.Rd b/src/library/base/man/format.pval.Rd
index a1329bb..fe4f5fe 100644
--- a/src/library/base/man/format.pval.Rd
+++ b/src/library/base/man/format.pval.Rd
@@ -1,5 +1,5 @@
 % File src/library/base/man/format.pval.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2010 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/base/man/formatDL.Rd b/src/library/base/man/formatDL.Rd
index bb63184..2d6b96f 100644
--- a/src/library/base/man/formatDL.Rd
+++ b/src/library/base/man/formatDL.Rd
@@ -1,6 +1,6 @@
 % File src/library/base/man/formatDL.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2007 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2014 R Core Team
 % Distributed under GPL 2 or later
 
 \name{formatDL}
@@ -21,9 +21,10 @@ formatDL(x, y, style = c("table", "list"),
     corresponding descriptions.  Only used if \code{x} does not already
     give the descriptions.}
   \item{style}{a character string specifying the rendering style of the
-    description information.  If \code{"table"}, a two-column table with
+    description information.  Can be abbreviated.
+    If \code{"table"}, a two-column table with
     items and descriptions as columns is produced (similar to Texinfo's
-    \verb{@table} environment.  If \code{"list"}, a LaTeX-style tagged
+    \verb{@table} environment).  If \code{"list"}, a LaTeX-style tagged
     description list is obtained.}
   \item{width}{a positive integer giving the target column for wrapping
     lines in the output.}
diff --git a/src/library/base/man/formatc.Rd b/src/library/base/man/formatc.Rd
index cae7bdc..be0cb59 100644
--- a/src/library/base/man/formatc.Rd
+++ b/src/library/base/man/formatc.Rd
@@ -1,30 +1,40 @@
 % File src/library/base/man/formatc.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2014 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2017 R Core Team
 % Distributed under GPL 2 or later
 
 \name{formatC}
+\title{Formatting Using C-style Formats}
 \alias{formatC}
 \alias{prettyNum}
+\alias{.format.zeros}
 \description{
-    Formatting numbers individually and flexibly, using \code{C} style
-    format specifications.
+  Formatting numbers individually and flexibly, \code{formatC()} using
+  \code{C} style format specifications.
+
+  \code{prettyNum()} is used for \dQuote{prettifying} (possibly
+  formatted) numbers, also in \code{\link{format.default}}.
+
+  \code{.format.zeros()}, an auxiliary function of \code{prettyNum()}
+  re-formats the zeros in a vector \code{x} of formatted numbers.
 }
-\title{Formatting Using C-style Formats}
 \usage{
 formatC(x, digits = NULL, width = NULL,
         format = NULL, flag = "", mode = NULL,
         big.mark = "", big.interval = 3L,
         small.mark = "", small.interval = 5L,
-        decimal.mark = ".", preserve.width = "individual",
-        zero.print = NULL, drop0trailing = FALSE)
+        decimal.mark = getOption("OutDec"),
+        preserve.width = "individual", zero.print = NULL,
+        drop0trailing = FALSE)
 
 prettyNum(x, big.mark = "",   big.interval = 3L,
-          small.mark = "", small.interval = 5L,
-          decimal.mark = ".",
+          small.mark  = "", small.interval = 5L,
+          decimal.mark = getOption("OutDec"), input.d.mark = decimal.mark,
           preserve.width = c("common", "individual", "none"),
           zero.print = NULL, drop0trailing = FALSE, is.cmplx = NA,
           \dots)
+
+.format.zeros(x, zero.print, nx = suppressWarnings(as.numeric(x)))
 }
 \arguments{
   \item{x}{an atomic numerical or character object, possibly
@@ -71,11 +81,19 @@ prettyNum(x, big.mark = "",   big.interval = 3L,
     \emph{dropped} in this format, unless \code{flag} contains
     \code{"#"}.}
 
-  \item{flag}{For \code{formatC}, a character string giving a
-    format modifier as in Kernighan and Ritchie (1988, page 243).
-    \code{"0"}  pads leading zeros; \code{"-"} does left adjustment,
-    others are \code{"+"}, \code{" "}, and \code{"#"}.  There can be
-    more than one of these, in any order.
+  \item{flag}{for \code{formatC}, a character string giving a
+    format modifier as in Kernighan and Ritchie (1988, page 243) or the
+    C+99 standard.
+    \code{"0"} pads leading zeros; \code{"-"} does left adjustment,
+    others are \code{"+"}, \code{" "}, and \code{"#"}; on some
+    platform--locale combination, \code{"'"} activates
+    \dQuote{thousands' grouping} for decimal conversion, and versions of
+    \file{glibc} allow \code{"I"} for integer conversion to use the locale's
+    alternative output digits, if any.
+
+    There can be more than one of these, in any order.  Other characters
+    used to have no effect for \code{character} formatting, but signal
+    an error since \R 3.4.0.
   }
 
   \item{mode}{\code{"double"} (or \code{"real"}), \code{"integer"} or
@@ -92,12 +110,15 @@ prettyNum(x, big.mark = "",   big.interval = 3L,
   \item{small.interval}{see \code{small.mark} above; defaults to 5.}
   \item{decimal.mark}{the character to be used to indicate the numeric
     decimal point.}
+  \item{input.d.mark}{if \code{x} is \code{\link{character}}, the
+    character known to have been used as the numeric decimal point in
+    \code{x}.}
   \item{preserve.width}{string specifying if the string widths should
     be preserved where possible in those cases where marks
     (\code{big.mark} or \code{small.mark}) are added.  \code{"common"},
     the default, corresponds to \code{\link{format}}-like behavior
     whereas \code{"individual"} is the default in
-    \code{formatC()}.}
+    \code{formatC()}. Value can be abbreviated.}
   \item{zero.print}{logical, character string or \code{NULL} specifying
     if and how \emph{zeros} should be formatted specially.  Useful for
     pretty printing \sQuote{sparse} objects.}
@@ -109,11 +130,14 @@ prettyNum(x, big.mark = "",   big.interval = 3L,
     \code{\link{complex}} vector or not.  By default (\code{NA}),
     \code{x} is checked to \sQuote{look like} complex.}
   \item{\dots}{arguments passed to \code{format}.}
+
+  \item{nx}{numeric vector of the same length as \code{x}, typically the
+    numbers of which the character vector \code{x} is the pre-format.}
 }
 \value{
   A character object of same size and attributes as \code{x} (after
   discarding any class), in the current locale's encoding.
-  
+
   Unlike \code{\link{format}}, each number is formatted individually.
   Looping over each element of \code{x}, the C function
   \code{sprintf(\dots)} is called for numeric inputs (inside the C
@@ -138,10 +162,10 @@ prettyNum(x, big.mark = "",   big.interval = 3L,
   \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.  Note that \code{prettyNum(x)} may behave
-  unexpectedly if \code{x} is a \code{character} vector not resulting from
-  something like \code{format(<number>)}: in particular it assumes that
-  a period is a decimal mark.
+  are at their defaults.  Use the \code{input.d.mark} argument for
+  \code{prettyNum(x)} when \code{x} is a \code{character} vector not
+  resulting from something like \code{format(<number>)} with a period as
+  decimal mark.
 
   Because \code{\link{gsub}} is used to insert the \code{big.mark}
   and \code{small.mark}, special characters need escaping.  In particular,
@@ -149,14 +173,15 @@ prettyNum(x, big.mark = "",   big.interval = 3L,
 
   The C doubles used for \R numerical vectors have signed zeros, which
   \code{formatC} may output as \code{-0}, \code{-0.000} \dots.
+
+  There is a warning if \code{big.mark} and \code{decimal.mark} are the
+  same: that would be confusing to those reading the output.
 }
 \note{
-  Prior to \R 3.0.2 this copied the class of \code{x} to the return
-  value and could easily create invalid objects.
-  
-  The default for \code{decimal.mark} is not appropriate for use within
-  \code{\link{print}} methods: use \code{decimal.mark =
-    getOption("OutDec")} there.
+  The default for \code{decimal.mark} in \code{formatC()} was changed in
+  \R 3.2.0: for use within \code{\link{print}} methods in packages which might
+  be used with earlier versions: use \code{decimal.mark = getOption("OutDec")}
+  explicitly.
 }
 \author{
   \code{formatC} was originally written by Bill Dunlap for S-PLUS, later
@@ -164,6 +189,9 @@ prettyNum(x, big.mark = "",   big.interval = 3L,
 
   It was first adapted for \R by Friedrich Leisch and since much
   improved by the R Core team.
+
+  %% The utilities \code{prettyNum()} and \code{.format.zeros()} are by
+  %% Martin Maechler
 }
 \references{
   Kernighan, B. W. and Ritchie, D. M. (1988)
@@ -172,7 +200,7 @@ prettyNum(x, big.mark = "",   big.interval = 3L,
 \seealso{
   \code{\link{format}}.
 
-  \code{\link{sprintf}} for more general C like formatting.
+  \code{\link{sprintf}} for more general C-like formatting.
 }
 \examples{
 xx  <- pi * 10^(-5:4)
@@ -214,6 +242,10 @@ cbind(ff <- format(1.2345 + 10^(0:5), width = 11, big.mark = "'"))
 ## individual formatting to common width:
 fc <- formatC(1.234 + 10^(0:8), format = "fg", width = 11, big.mark = "'")
 cbind(fc)
+## Powers of two, stored exactly, formatted individually:
+pow.2 <- formatC(2^-(1:32), digits = 24, width = 1, format = "fg")
+## nicely printed (the last line showing 5^32 exactly):
+noquote(cbind(pow.2))
 
 ## complex numbers:
 r <- 10.0000001; rv <- (r/10)^(1:10)
@@ -228,6 +260,15 @@ head(fv <- format(zv), 3)
 prettyNum(fv)
 prettyNum(fv, drop0trailing = TRUE) # a bit nicer
 options(op)
+
+## The  '  flag :
+doLC <- FALSE # R warns, so change to TRUE manually if you want see the effect
+if(doLC)
+  oldLC <- Sys.setlocale("LC_NUMERIC", "de_CH.UTF-8")
+formatC(1.234 + 10^(0:4), format = "fg", width = 11, flag = "'")
+## -->  .....  "      1'001" "     10'001"   on supported platforms
+if(doLC) ## revert, typically to  "C"  :
+  Sys.setlocale("LC_NUMERIC", oldLC)
 }
 \keyword{character}
 \keyword{print}
diff --git a/src/library/base/man/function.Rd b/src/library/base/man/function.Rd
index 9c722bb..99663b9 100644
--- a/src/library/base/man/function.Rd
+++ b/src/library/base/man/function.Rd
@@ -1,5 +1,5 @@
 % File src/library/base/man/function.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2012 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/base/man/funprog.Rd b/src/library/base/man/funprog.Rd
index 3b3a1da..746625b 100644
--- a/src/library/base/man/funprog.Rd
+++ b/src/library/base/man/funprog.Rd
@@ -1,6 +1,6 @@
 % File src/library/base/man/funprog.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2008 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2016 R Core Team
 % Distributed under GPL 2 or later
 \name{funprog}
 \alias{Filter}
@@ -144,10 +144,10 @@ asqrt(2, 30)(-1) # Starting from a negative value => -sqrt(2)
 ## A list of all functions in the base environment:
 funs <- Filter(is.function, sapply(ls(baseenv()), get, baseenv()))
 ## Functions in base with more than 10 arguments:
-names(Filter(function(f) length(formals(args(f))) > 10, funs))
+names(Filter(function(f) length(formals(f)) > 10, funs))
 ## Number of functions in base with a '...' argument:
 length(Filter(function(f)
-              any(names(formals(args(f))) \%in\% "..."),
+              any(names(formals(f)) \%in\% "..."),
               funs))
 \donttest{
 ## Find all objects in the base environment which are *not* functions:
diff --git a/src/library/base/man/gc.Rd b/src/library/base/man/gc.Rd
index b0161ab..a155d0e 100644
--- a/src/library/base/man/gc.Rd
+++ b/src/library/base/man/gc.Rd
@@ -1,5 +1,5 @@
 % File src/library/base/man/gc.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2007 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/base/man/gc.time.Rd b/src/library/base/man/gc.time.Rd
index 77046de..5f03d5a 100644
--- a/src/library/base/man/gc.time.Rd
+++ b/src/library/base/man/gc.time.Rd
@@ -1,5 +1,5 @@
 % File src/library/base/man/gc.time.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2013 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/base/man/gctorture.Rd b/src/library/base/man/gctorture.Rd
index 7ff4cef..f7e5074 100644
--- a/src/library/base/man/gctorture.Rd
+++ b/src/library/base/man/gctorture.Rd
@@ -1,5 +1,5 @@
 % File src/library/base/man/gctorture.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2014 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/base/man/get.Rd b/src/library/base/man/get.Rd
index b563f4a..f4148e9 100644
--- a/src/library/base/man/get.Rd
+++ b/src/library/base/man/get.Rd
@@ -1,12 +1,13 @@
 % File src/library/base/man/get.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2013 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2015 R Core Team
 % Distributed under GPL 2 or later
 
 \name{get}
+\title{Return the Value of a Named Object}
 \alias{get}
 \alias{mget}
-\title{Return the Value of a Named Object}
+\alias{dynGet}
 \description{
   Search by name for an object (\code{get}) or zero or more objects
   (\code{mget}).
@@ -17,6 +18,8 @@ get(x, pos = -1, envir = as.environment(pos), mode = "any",
 
 mget(x, envir = as.environment(-1), mode = "any", ifnotfound,
      inherits = FALSE)
+
+dynGet(x, ifnotfound = , minframe = 1L, inherits = FALSE)
 }
 \arguments{
   \item{x}{For \code{get}, an object name (given as a character
@@ -30,8 +33,13 @@ mget(x, envir = as.environment(-1), mode = "any", ifnotfound,
     \sQuote{Details} section.}
   \item{inherits}{should the enclosing frames of the environment be
     searched?}
-  \item{ifnotfound}{A \code{\link{list}} of values to be used if the item is
-    not found: it will be coerced to a list if necessary.}
+  \item{ifnotfound}{For \code{mget}, a \code{\link{list}} of values to
+    be used if the item is not found: it will be coerced to a list if
+    necessary.\cr
+    For \code{dynGet} any \R object, e.g., a call to
+    \code{\link{stop}()}.}
+  \item{minframe}{integer specifying the minimal frame number to look
+    into.}
 }
 \details{
   The \code{pos} argument can specify the environment in which to look
@@ -66,6 +74,10 @@ mget(x, envir = as.environment(-1), mode = "any", ifnotfound,
   the requested item is not found or a function of one argument which
   will be called if the item is not found, with argument the name of the
   item being requested.
+
+  \code{dynGet()} is somewhat experimental and to be used \emph{inside}
+  another function.  It looks for an object in the callers, i.e.,
+  the \code{\link{sys.frame}()}s of the function.  Use with caution.
 }
 \value{
   For \code{get}, the object found.  If no object is found an error results.
@@ -74,8 +86,9 @@ mget(x, envir = as.environment(-1), mode = "any", ifnotfound,
   \code{ifnotfound}).
 }
 \note{
-  The reverse of \code{a <- get(nam)} is \code{\link{assign}(nam, a)}.
-  
+  The reverse (or \dQuote{inverse}) of \code{a <- get(nam)} is
+  \code{\link{assign}(nam, a)}, assigning \code{a} to name \code{nam}.
+
   \code{inherits = TRUE} is the default for \code{get} in \R
   but not for S where it had a different meaning.
 }
@@ -85,7 +98,16 @@ mget(x, envir = as.environment(-1), mode = "any", ifnotfound,
   Wadsworth & Brooks/Cole.
 }
 \seealso{
-  \code{\link{exists}}, \code{\link{assign}}.
+  \code{\link{exists}} for checking whether an object exists;
+  \code{\link{get0}} for an efficient way of both checking existence and
+  getting an object.
+
+  \code{\link{assign}}, the inverse of \code{get()}, see above.
+
+  Use \code{\link[utils]{getAnywhere}} for searching for an object
+  anywhere, including in other namespaces, and
+  \code{\link[utils]{getFromNamespace}} to find an object in a specific
+  namespace.
 }
 \examples{
 get("\%o\%")
diff --git a/src/library/base/man/getCallingDLL.Rd b/src/library/base/man/getCallingDLL.Rd
index 62a27cb..ebc2fd4 100644
--- a/src/library/base/man/getCallingDLL.Rd
+++ b/src/library/base/man/getCallingDLL.Rd
@@ -1,5 +1,5 @@
 % File src/library/base/man/getCallingDLL.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2008 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/base/man/getDLLRegisteredRoutines.Rd b/src/library/base/man/getDLLRegisteredRoutines.Rd
index 1f6c822..77b7c5e 100644
--- a/src/library/base/man/getDLLRegisteredRoutines.Rd
+++ b/src/library/base/man/getDLLRegisteredRoutines.Rd
@@ -1,10 +1,8 @@
 % File src/library/base/man/getDLLRegisteredRoutines.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2012 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2014 R Core Team
 % Distributed under GPL 2 or later
 
-\newcommand{\sspace}{\ifelse{latex}{\out{~}}{ }}
-
 \name{getDLLRegisteredRoutines}
 \alias{getDLLRegisteredRoutines}
 \alias{getDLLRegisteredRoutines.character}
diff --git a/src/library/base/man/getLoadedDLLs.Rd b/src/library/base/man/getLoadedDLLs.Rd
index a8f4cc7..b69c9fe 100644
--- a/src/library/base/man/getLoadedDLLs.Rd
+++ b/src/library/base/man/getLoadedDLLs.Rd
@@ -1,10 +1,8 @@
 % File src/library/base/man/getLoadedDLLs.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2010 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2014 R Core Team
 % Distributed under GPL 2 or later
 
-\newcommand{\sspace}{\ifelse{latex}{\out{~}}{ }}
-
 \name{getLoadedDLLs}
 \alias{getLoadedDLLs}
 \alias{print.DLLInfo}
diff --git a/src/library/base/man/getNativeSymbolInfo.Rd b/src/library/base/man/getNativeSymbolInfo.Rd
index 0180cd6..cfa26c7 100644
--- a/src/library/base/man/getNativeSymbolInfo.Rd
+++ b/src/library/base/man/getNativeSymbolInfo.Rd
@@ -1,5 +1,5 @@
 % File src/library/base/man/getNativeSymbolInfo.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2012 R Core Team
 % Distributed under GPL 2 or later
 
@@ -111,7 +111,7 @@ getNativeSymbolInfo(name, PACKAGE, unlist = TRUE,
   For information about registering native routines,
   see \dQuote{In Search of C/C++ & FORTRAN Routines},
   R-News, volume 1, number 3, 2001, p20--23
-  (\url{http://cran.r-project.org/doc/Rnews/Rnews_2001-3.pdf}).
+  (\url{https://www.r-project.org/doc/Rnews/Rnews_2001-3.pdf}).
 }
 \author{Duncan Temple Lang}
 \note{
diff --git a/src/library/base/man/gettext.Rd b/src/library/base/man/gettext.Rd
index ca89a2b..c098099 100644
--- a/src/library/base/man/gettext.Rd
+++ b/src/library/base/man/gettext.Rd
@@ -1,5 +1,5 @@
 % File src/library/base/man/gettext.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2014 R Core Team
 % Distributed under GPL 2 or later
 
@@ -29,10 +29,10 @@ bindtextdomain(domain, dirname = NULL)
     catalogs for the domain.}
 }
 \details{
-  If \code{domain} is \code{NULL} or \code{""}, and \code{gettext} is
-  called from a function in the namespace of package \pkg{pkg} the
-  domain is set to \code{"R-pkg"}.  Otherwise there is no default
-  domain.
+  If \code{domain} is \code{NULL} or \code{""}, and \code{gettext}
+  or \code{ngettext}  is called from a function in the namespace of 
+  package \pkg{pkg} the domain is set to \code{"R-pkg"}.  Otherwise 
+  there is no default domain.
 
   If a suitable domain is found, each character string is offered for
   translation, and replaced by its translation into the current language
diff --git a/src/library/base/man/getwd.Rd b/src/library/base/man/getwd.Rd
index 187cb1b..9229d1e 100644
--- a/src/library/base/man/getwd.Rd
+++ b/src/library/base/man/getwd.Rd
@@ -1,5 +1,5 @@
 % File src/library/base/man/getwd.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2011 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/base/man/gl.Rd b/src/library/base/man/gl.Rd
index 0bd0d7b..c0fc0f9 100644
--- a/src/library/base/man/gl.Rd
+++ b/src/library/base/man/gl.Rd
@@ -1,5 +1,5 @@
 % File src/library/base/man/gl.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2013 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/base/man/grep.Rd b/src/library/base/man/grep.Rd
index 788bef3..eeedad3 100644
--- a/src/library/base/man/grep.Rd
+++ b/src/library/base/man/grep.Rd
@@ -1,6 +1,6 @@
 % File src/library/base/man/grep.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2014 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2017 R Core Team
 % Distributed under GPL 2 or later
 
 \name{grep}
@@ -13,10 +13,10 @@
 \alias{gregexpr}
 \alias{regexec}
 \description{
-  \code{grep}, \code{grepl}, \code{regexpr} and \code{gregexpr} search
-  for matches to argument \code{pattern} within each element of a
-  character vector: they differ in the format of and amount of detail in
-  the results.
+  \code{grep}, \code{grepl}, \code{regexpr}, \code{gregexpr} and
+  \code{regexec} search for matches to argument \code{pattern} within
+  each element of a character vector: they differ in the format of and
+  amount of detail in the results.
 
   \code{sub} and \code{gsub} perform replacement of the first and all
   matches respectively.
@@ -40,7 +40,7 @@ regexpr(pattern, text, ignore.case = FALSE, perl = FALSE,
 gregexpr(pattern, text, ignore.case = FALSE, perl = FALSE,
          fixed = FALSE, useBytes = FALSE)
 
-regexec(pattern, text, ignore.case = FALSE,
+regexec(pattern, text, ignore.case = FALSE, perl = FALSE,
         fixed = FALSE, useBytes = FALSE)
 }
 \arguments{
@@ -56,7 +56,7 @@ regexec(pattern, text, ignore.case = FALSE,
     vector.  \link{Long vectors} are supported.}
   \item{ignore.case}{if \code{FALSE}, the pattern matching is \emph{case
       sensitive} and if \code{TRUE}, case is ignored during matching.}
-  \item{perl}{logical.  Should perl-compatible regexps be used?}
+  \item{perl}{logical.  Should Perl-compatible regexps be used?}
   \item{value}{if \code{FALSE}, a vector containing the (\code{integer})
     indices of the matches determined by \code{grep} is returned, and if
     \code{TRUE}, a vector containing the matching elements themselves is
@@ -84,9 +84,7 @@ regexec(pattern, text, ignore.case = FALSE,
   Arguments which should be character strings or character vectors are
   coerced to character if possible.
 
-  Each of these functions (apart from \code{regexec}, which currently
-  does not support Perl-style regular expressions) operates in one of
-  three modes:
+  Each of these functions operates in one of three modes:
   \enumerate{
     \item \code{fixed = TRUE}: use exact matching.
     \item \code{perl = TRUE}: use Perl-style regular expressions.
@@ -118,9 +116,13 @@ regexec(pattern, text, ignore.case = FALSE,
   \code{useBytes = TRUE}.
 
   \code{regexpr} and \code{gregexpr} with \code{perl = TRUE} allow
-  Python-style named captures, but not for \emph{long vector} inputs.  
-    
+  Python-style named captures, but not for \emph{long vector} inputs.
+
   Invalid inputs in the current locale are warned about up to 5 times.
+
+  Caseless matching with \code{perl = TRUE} for non-ASCII characters
+  depends on the PCRE library being compiled with \sQuote{Unicode
+  property support}: an external library might not be.
 }
 
 \value{
@@ -165,6 +167,9 @@ regexec(pattern, text, ignore.case = FALSE,
   substrings corresponding to parenthesized subexpressions of
   \code{pattern}, with attribute \code{"match.length"} a vector
   giving the lengths of the matches (or \eqn{-1} for no match).
+
+  Where matching failed because of resource limits (especially for PCRE)
+  this is regarded as a non-match, usually with a warning.
 }
 
 \section{Warning}{
@@ -192,15 +197,29 @@ regexec(pattern, text, ignore.case = FALSE,
   checked before matching, and the actual matching will be faster.
   Often byte-based matching suffices in a UTF-8 locale since byte
   patterns of one character never match part of another.
+
+  PCRE-based matching by default puts additional effort into
+  \sQuote{studying} the compiled pattern when \code{x}/\code{text} has
+  length at least 10.  As from \R 3.4.0 that study may use the PCRE JIT
+  compiler on platforms where it is available (see
+  \code{\link{pcre_config}}).  The details are controlled by
+  \code{\link{options}} \code{PCRE_study} and \code{PCRE_use_JIT}.
+  (Some timing comparisons can be seen by running file
+  \file{tests/PCRE.R} in the \R sources (and perhaps installed).)
+  People working with PCRE and very long strings can adjust the maximum
+  size of the JIT stack by setting environment variable
+  \env{R_PCRE_JIT_STACK_MAXSIZE} before JIT is used to a value between
+  \code{1} and \code{1000} in MB: the default is \code{64}.  (Then would
+  usually be wise to set the \link{option} \code{PCRE_limit_recursion}.)
 }
 
 \source{
   The C code for POSIX-style regular expression matching has changed
-  over the years.  As from \R 2.10.0 the TRE library of Ville Laurikari
-  (\url{http://laurikari.net/tre/}) is used.  The POSIX standard does
-  give some room for interpretation, especially in the handling of
-  invalid regular expressions and the collation of character ranges, so
-  the results will have changed slightly over the years.
+  over the years.  As from \R 2.10.0 (Oct 2009) the TRE library of Ville
+  Laurikari (\url{http://laurikari.net/tre/}) is used.  The POSIX
+  standard does give some room for interpretation, especially in the
+  handling of invalid regular expressions and the collation of character
+  ranges, so the results will have changed slightly over the years.
 
   For Perl-style matching PCRE (\url{http://www.pcre.org}) is used.
 }
@@ -224,7 +243,8 @@ regexec(pattern, text, ignore.case = FALSE,
   \code{\link{agrep}} for approximate matching.
 
   \code{\link{charmatch}}, \code{\link{pmatch}} for partial matching,
-  \code{\link{match}} for matching to whole strings.
+  \code{\link{match}} for matching to whole strings,
+  \code{\link{startsWith}} for matching of initial parts of strings.
 
   \code{\link{tolower}}, \code{\link{toupper}} and \code{\link{chartr}}
   for character translations.
@@ -232,6 +252,8 @@ regexec(pattern, text, ignore.case = FALSE,
   \code{\link{apropos}} uses regexps and has more examples.
 
   \code{\link{grepRaw}} for matching raw vectors.
+  
+  Options \code{PCRE_study} and \code{PCRE_use_JIT}.
 }
 \examples{
 grep("[a-z]", letters)
@@ -248,11 +270,11 @@ gsub("([ab])", "\\\\1_\\\\1_", "abc and ABC")
 txt <- c("The", "licenses", "for", "most", "software", "are",
   "designed", "to", "take", "away", "your", "freedom",
   "to", "share", "and", "change", "it.",
-   "", "By", "contrast,", "the", "GNU", "General", "Public", "License",
-   "is", "intended", "to", "guarantee", "your", "freedom", "to",
-   "share", "and", "change", "free", "software", "--",
-   "to", "make", "sure", "the", "software", "is",
-   "free", "for", "all", "its", "users")
+  "", "By", "contrast,", "the", "GNU", "General", "Public", "License",
+  "is", "intended", "to", "guarantee", "your", "freedom", "to",
+  "share", "and", "change", "free", "software", "--",
+  "to", "make", "sure", "the", "software", "is",
+  "free", "for", "all", "its", "users")
 ( i <- grep("[gu]", txt) ) # indices
 stopifnot( txt[i] == grep("[gu]", txt, value = TRUE) )
 
@@ -283,8 +305,10 @@ findArgs("package:base", "warn")
 ## trim trailing white space
 str <- "Now is the time      "
 sub(" +$", "", str)  ## spaces only
+## what is considered 'white space' depends on the locale.
 sub("[[:space:]]+$", "", str) ## white space, POSIX-style
-sub("\\\\s+$", "", str, perl = TRUE) ## Perl-style white space
+## what PCRE considered white space changed in version 8.34: see ?regex
+sub("\\\\s+$", "", str, perl = TRUE) ## PCRE-style white space
 
 ## capitalizing
 txt <- "a test of capitalizing"
@@ -330,6 +354,13 @@ URL_parts <- function(x) {
     parts
 }
 URL_parts(x)
+
+## There is no gregexec() yet, but one can emulate it by running
+## regexec() on the regmatches obtained via gregexpr().  E.g.:
+pattern <- "([[:alpha:]]+)([[:digit:]]+)"
+s <- "Test: A1 BC23 DEF456"
+lapply(regmatches(s, gregexpr(pattern, s)),
+       function(e) regmatches(e, regexec(pattern, e)))
 }
 \keyword{character}
 \keyword{utilities}
diff --git a/src/library/base/man/grepRaw.Rd b/src/library/base/man/grepRaw.Rd
index 3a63be6..f38cc0e 100644
--- a/src/library/base/man/grepRaw.Rd
+++ b/src/library/base/man/grepRaw.Rd
@@ -1,6 +1,6 @@
 % File src/library/base/man/grepRaw.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2011 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2016 R Core Team
 % Distributed under GPL 2 or later
 
 \name{grepRaw}
@@ -80,4 +80,10 @@ grepRaw(pattern, x, offset = 1L, ignore.case = FALSE,
 
   \code{\link{grep}} for matching character vectors.
 }
+\examples{
+grepRaw("no match", "textText")  # integer(0): no match
+grepRaw("adf", "adadfadfdfadadf") # 3 - the first match
+grepRaw("adf", "adadfadfdfadadf", all=TRUE, fixed=TRUE)
+## [1]  3  6 13 -- three matches
+}
 \keyword{utilities}
diff --git a/src/library/base/man/groupGeneric.Rd b/src/library/base/man/groupGeneric.Rd
index ec7ec51..b9c8279 100644
--- a/src/library/base/man/groupGeneric.Rd
+++ b/src/library/base/man/groupGeneric.Rd
@@ -1,5 +1,5 @@
 % File src/library/base/man/groupGeneric.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2013 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/base/man/grouping.Rd b/src/library/base/man/grouping.Rd
new file mode 100644
index 0000000..2185ba3
--- /dev/null
+++ b/src/library/base/man/grouping.Rd
@@ -0,0 +1,57 @@
+% File src/library/base/man/grouping.Rd
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2016 R Core Team
+% Distributed under GPL 2 or later
+
+\name{grouping}
+\title{Grouping Permutation}
+\alias{grouping}
+\concept{aggregation}
+\description{
+  \code{grouping} returns a permutation which rearranges its first
+  argument such that identical values are adjacent to each other.  Also
+  returned as attributes are the group-wise partitioning and the maximum
+  group size.
+}
+\usage{
+grouping(\dots)
+}
+\arguments{
+  \item{\dots}{a sequence of numeric, character or logical
+    vectors, all of the same length, or a classed \R object.}
+}
+\details{
+  The function partially sorts the elements so that identical values are
+  adjacent. \code{NA} values come last.  This is guaranteed to be
+  stable, so ties are preserved, and if the data are already
+  grouped/sorted, the grouping is unchanged.  This is useful for
+  aggregation and is particularly fast for character vectors.
+
+  Under the covers, the \code{"radix"} method of \code{\link{order}} is
+  used, and the same caveats apply, including restrictions on character
+  encodings and lack of support for long vectors (those with
+  \eqn{2^{31}}{2^31} or more elements). Real-valued numbers are slightly
+  rounded to account for numerical imprecision.
+  
+  Like \code{order}, for a classed \R object the grouping is based on
+  the result of \code{\link{xtfrm}}.
+}
+
+\value{
+  An object of class \code{"grouping"}, the representation of which
+  should be considered experimental and subject to change.  It is an
+  integer vector with two attributes:
+  \item{ends}{subscripts in the result corresponding to the last
+    member of each group}
+  \item{maxgrpn}{the maximum group size}
+}
+
+\seealso{
+  \code{\link{order}}, \code{\link{xtfrm}}.
+}
+\examples{
+(ii <- grouping(x <- c(1, 1, 3:1, 1:4, 3), y <- c(9, 9:1), z <- c(2, 1:9)))
+## 6  5  2  1  7  4 10  8  3  9
+rbind(x, y, z)[, ii]
+}
+\keyword{manip}
diff --git a/src/library/base/man/gzcon.Rd b/src/library/base/man/gzcon.Rd
index a37c5b4..a5d9387 100644
--- a/src/library/base/man/gzcon.Rd
+++ b/src/library/base/man/gzcon.Rd
@@ -1,5 +1,5 @@
 % File src/library/base/man/gzcon.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2010 R Core Team
 % Distributed under GPL 2 or later
 
@@ -14,13 +14,17 @@
   connection.  Standard \code{gzip} headers are assumed.
 }
 \usage{
-gzcon(con, level = 6, allowNonCompressed = TRUE)
+gzcon(con, level = 6, allowNonCompressed = TRUE, text = FALSE)
 }
 \arguments{
   \item{con}{a connection.}
   \item{level}{integer between 0 and 9, the compression level when writing.}
   \item{allowNonCompressed}{logical.  When reading, should
     non-compressed input be allowed?}
+  \item{text}{logical. Should the connection be text-oriented? This is
+    distinct from the mode of the connection (must always be binary).
+    If \code{TRUE}, \code{\link{pushBack}} works on the connection,
+    otherwise \code{\link{readBin}} and friends apply.}
 }
 \details{
   If \code{con} is open then the modified connection is opened.  Closing
diff --git a/src/library/base/man/hexmode.Rd b/src/library/base/man/hexmode.Rd
index 5079555..f2438d7 100644
--- a/src/library/base/man/hexmode.Rd
+++ b/src/library/base/man/hexmode.Rd
@@ -1,6 +1,6 @@
 % File src/library/base/man/hexmode.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2011 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2014 R Core Team
 % Distributed under GPL 2 or later
 
 \name{hexmode}
diff --git a/src/library/base/man/iconv.Rd b/src/library/base/man/iconv.Rd
index 5752f0d..308ab20 100644
--- a/src/library/base/man/iconv.Rd
+++ b/src/library/base/man/iconv.Rd
@@ -1,10 +1,8 @@
 % File src/library/base/man/iconv.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2014 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2017 R Core Team
 % Distributed under GPL 2 or later
 
-\newcommand{\sspace}{\ifelse{latex}{\out{~}}{ }}
-
 \name{iconv}
 \alias{iconv}
 \alias{iconvlist}
@@ -60,13 +58,19 @@ iconvlist()
 
   Any encoding bits (see \code{\link{Encoding}}) on elements of \code{x}
   are ignored: they will always be translated as if from encoding
-  \code{from} even if declared otherwise.
+  \code{from} even if declared otherwise.  \code{\link{enc2native}} and
+  \code{\link{enc2utf8}} provide alternatives which do take declared
+  encodings into account.
+
+  Note that implementations of \code{iconv} typically do not do much
+  validity checking and will often mis-convert inputs which are invalid
+  in encoding \code{from}.
 }
 
 \section{Implementation Details}{
   There are three main implementations of \code{iconv} in use.
   Linux's C runtime \samp{glibc} contains one.  Several platforms
-  supply GNU \samp{libiconv}, including OS X, FreeBSD and Cygwin, in
+  supply GNU \samp{libiconv}, including macOS, FreeBSD and Cygwin, in
   some cases with additional encodings.  On Windows we use a version of
   Yukihiro Nakadaira's \samp{win_iconv}, which is based on Windows'
   codepages.  (We have added many encoding names for compatibility
@@ -80,7 +84,7 @@ iconvlist()
   the \dQuote{R Installation and Administration Manual} recommends
   installing GNU \samp{libiconv} on Solaris and AIX, for example.
 
-  There are other implementations, e.g\sspace{} NetBSD has used one from the
+  There are other implementations, e.g.\sspace{} NetBSD has used one from the
   Citrus project (which does not support \samp{//TRANSLIT}) and there is
   an older FreeBSD port (\samp{libiconv} is usually used there): it has
   not been reported whether or not these work with \R.
@@ -125,12 +129,12 @@ iconvlist()
   or if \code{to = ""} and the current locale's encoding is detected as
   Latin-1 (or its superset CP1252 on Windows) or UTF-8.
 
-  If \code{toRaw = TRUE}, the value is a vector of the same length and
+  If \code{toRaw = TRUE}, the value is a list of the same length and
   the same attributes as \code{x} whose elements are either \code{NULL}
   (if conversion fails) or a raw vector.
 
   For \code{iconvlist()}, a character vector (typically of a few hundred
-  elements).
+  elements) of known encoding names.
 }
 \note{
   The only reasonably portable name for the ISO 8859-15 encoding,
@@ -139,11 +143,10 @@ iconvlist()
   
   Encoding names \code{"utf8"}, \code{"mac"} and \code{"macroman"} are
   not portable.  \code{"utf8"} is converted to \code{"UTF-8"} for
-  \code{from} (as from \R 2.8.0) and \code{to} (as from \R 3.0.3) by
-  \code{iconv}, but not for e.g.\sspace{}\code{fileEncoding} arguments.
-  \code{"macintosh"} is the official (and most widely supported) name
-  for \sQuote{Mac Roman}
-  (\url{http://en.wikipedia.org/wiki/Mac_OS_Roman}).
+  \code{from} and \code{to} by \code{iconv}, but not
+  for e.g.\sspace{}\code{fileEncoding} arguments.  \code{"macintosh"} is
+  the official (and most widely supported) name for \sQuote{Mac Roman}
+  (\url{https://en.wikipedia.org/wiki/Mac_OS_Roman}).
 }
 
 \seealso{
diff --git a/src/library/base/man/icuSetCollate.Rd b/src/library/base/man/icuSetCollate.Rd
index 50e09d2..95e4db7 100644
--- a/src/library/base/man/icuSetCollate.Rd
+++ b/src/library/base/man/icuSetCollate.Rd
@@ -1,10 +1,8 @@
 % File src/library/base/man/icuSetCollate.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 2008-2014 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 2008-2017 R Core Team
 % Distributed under GPL 2 or later
 
-\newcommand{\sspace}{\ifelse{latex}{\out{~}}{ }}
-
 \name{icuSetCollate}
 \alias{icuSetCollate}
 \alias{icuGetCollate}
@@ -22,8 +20,8 @@ icuGetCollate(type = c("actual", "valid"))
 }
 \arguments{
   \item{\dots}{Named arguments, see \sQuote{Details}.}
-  \item{type}{either the actual locale in use for collation or the most
-    specific locale which would be valid.}
+  \item{type}{character string: can be abbreviated.  Either the actual locale
+    in use for collation or the most specific locale which would be valid.}
 }
 \details{
   Optionally, \R can be built to collate character strings by ICU
@@ -66,7 +64,10 @@ icuGetCollate(type = c("actual", "valid"))
   Some special values are accepted for \code{locale}:
   \describe{
     \item{\code{"none"}:}{ICU is not used for collation: the OS's
-      collation services are used instead.  (As from \R 3.1.2.)}
+      collation services are used instead.}
+    \item{\code{"ASCII"}:}{ICU is not used for collation: the C function
+      \code{strcmp} is used instead, which should sort byte-by-byte in
+      (unsigned) numerical order.}
     \item{\code{"default"}:}{
       obtains the locale from the OS as is done at the start of the
       session.  If environment variable \env{R_ICU_LOCALE} is set to a
@@ -84,7 +85,7 @@ icuGetCollate(type = c("actual", "valid"))
   \code{icuGetCollate("actual")}, often \code{"root"}).  Most English
   locales fall back to \code{"root"} as although e.g.\sspace{}\code{"en_GB"} is
   a valid locale (at least on some platforms), it contains no special
-  rules for collation.
+  rules for collation.  Note that \code{"C"} is not a supported ICU locale.
   
   Some examples are \code{case_level = "on", strength = "primary"} to ignore
   accent differences and \code{alternate_handling = "shifted"} to ignore
@@ -107,19 +108,23 @@ icuGetCollate(type = c("actual", "valid"))
   likely to report \code{"root"}.
 }
 \note{
-  ICU is used by default wherever it is available: this include OS X,
+  ICU is used by default wherever it is available: this include macOS,
   Solaris and many Linux installations.  As it works internally in
   UTF-8, it will be most efficient in UTF-8 locales.
 
   It is optional on Windows: if \R has been built against ICU, it will
   only be used if environment variable \env{R_ICU_LOCALE} is set or once
   \code{icuSetCollate} is called to select the locale (as ICU and
-  Windows, at least pre-Vista, differ in their idea of locale names).
+  Windows differ in their idea of locale names).  Note that
+  \code{icuSetCollate(locale = "default")} should work reasonably well
+  for \R >= 3.2.0 and Windows Vista/Server 2008 and later (but finds the
+  system default ignoring environment variables such as \env{LC_COLLATE}).
 }
 \seealso{
   \link{Comparison}, \code{\link{sort}}.
 
-  \code{\link{capabilities}} for whether ICU is in use.
+  \code{\link{capabilities}} for whether ICU is available;
+  \code{\link{extSoftVersion}} for its version.
 
   The ICU user guide chapter on collation
   (\url{http://userguide.icu-project.org/collation}).
@@ -139,7 +144,7 @@ if(capabilities("ICU")) {
     icuSetCollate(locale = "da_DK", case_first = "default"); print(sort(x)) 
     ## Estonian collates Z between S and T
     icuSetCollate(locale = "et_EE"); print(sort(x))
-    icuSetCollate(locale = "default")
+    icuSetCollate(locale = "default"); print(icuGetCollate("valid"))
 }
 }}
 \keyword{ utilities }
diff --git a/src/library/base/man/identical.Rd b/src/library/base/man/identical.Rd
index e514f12..7201255 100644
--- a/src/library/base/man/identical.Rd
+++ b/src/library/base/man/identical.Rd
@@ -1,6 +1,6 @@
 % File src/library/base/man/identical.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 2001-2013 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 2001-2016 R Core Team
 % Distributed under GPL 2 or later
 
 \name{identical}
@@ -13,7 +13,8 @@
 }
 \usage{
 identical(x, y, num.eq = TRUE, single.NA = TRUE, attrib.as.set = TRUE,
-          ignore.bytecode = TRUE, ignore.environment = FALSE)
+          ignore.bytecode = TRUE, ignore.environment = FALSE,
+          ignore.srcref = TRUE)
 }
 \arguments{
   \item{x, y}{any \R objects.}
@@ -34,6 +35,8 @@ identical(x, y, num.eq = TRUE, single.NA = TRUE, attrib.as.set = TRUE,
     ignored when comparing \link{closure}s.}
   \item{ignore.environment}{logical indicating if their environments
     should be ignored when comparing \link{closure}s.}
+  \item{ignore.srcref}{logical indicating if their \code{"srcref"}
+    attributes should be ignored when comparing \link{closure}s.}
 }
 \details{
   A call to \code{identical} is the way to test exact equality in
@@ -130,13 +133,29 @@ identical(0., -0., num.eq = FALSE)
 ## similar:
 identical(NaN, -NaN) # TRUE
 identical(NaN, -NaN, single.NA = FALSE) # differ on bit-level
-## for functions:
+
+### For functions ("closure"s): ----------------------------------------------
+###     ~~~~~~~~~
 f <- function(x) x
 f
 g <- compiler::cmpfun(f)
 g
-identical(f, g)
-identical(f, g, ignore.bytecode = FALSE)
+identical(f, g)                        # TRUE, as bytecode is ignored by default
+identical(f, g, ignore.bytecode=FALSE) # FALSE: bytecode differs
+
+## GLM families contain several functions, some of which share an environment:
+p1 <- poisson() ; p2 <- poisson()
+identical(p1, p2)                          # FALSE
+identical(p1, p2, ignore.environment=TRUE) # TRUE
+
+## in interactive use, the 'keep.source' option is typically true:
+op <- options(keep.source = TRUE) # and so, these have differing "srcref" :
+f1 <- function() {}
+f2 <- function() {}
+identical(f1,f2)# ignore.srcref= TRUE : TRUE
+identical(f1,f2,  ignore.srcref=FALSE)# FALSE
+options(op) # revert to previous state
+
 \dontshow{
 m0 <- m <- structure(cbind(I = 1, a = 1:3), foo = "bar", class = "matrix")
 attributes(m0) <- rev(attributes(m))
diff --git a/src/library/base/man/identity.Rd b/src/library/base/man/identity.Rd
index bd323ca..09efaef 100644
--- a/src/library/base/man/identity.Rd
+++ b/src/library/base/man/identity.Rd
@@ -1,6 +1,6 @@
 % File src/library/base/man/identity.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2008 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2015 R Core Team
 % Distributed under GPL 2 or later
 
 \name{identity}
@@ -12,6 +12,9 @@
 \usage{
 identity(x)
 }
+\seealso{
+  \code{\link{diag}} creates diagonal matrices, including identity ones.
+}
 \arguments{
   \item{x}{an \R object.}
 }
diff --git a/src/library/base/man/ifelse.Rd b/src/library/base/man/ifelse.Rd
index 7818c1c..81d5cb1 100644
--- a/src/library/base/man/ifelse.Rd
+++ b/src/library/base/man/ifelse.Rd
@@ -1,6 +1,6 @@
 % File src/library/base/man/ifelse.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2007 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2015 R Core Team
 % Distributed under GPL 2 or later
 
 \name{ifelse}
@@ -10,11 +10,11 @@ ifelse(test, yes, no)
 }
 \alias{ifelse}
 \description{
-\code{ifelse} returns a value with the same shape as
-\code{test} which is filled with elements selected
-from either \code{yes} or \code{no}
-depending on whether the element of \code{test}
-is \code{TRUE} or \code{FALSE}.
+  \code{ifelse} returns a value with the same shape as
+  \code{test} which is filled with elements selected
+  from either \code{yes} or \code{no}
+  depending on whether the element of \code{test}
+  is \code{TRUE} or \code{FALSE}.
 }
 \arguments{
   \item{test}{an object which can be coerced to logical mode.}
@@ -44,6 +44,19 @@ is \code{TRUE} or \code{FALSE}.
   Sometimes it is better to use a construction such as
 \preformatted{  (tmp <- yes; tmp[!test] <- no[!test]; tmp)
 }, possibly extended to handle missing values in \code{test}.
+
+  Further note that \code{if(test) yes else no}  is much more efficient
+  and often much preferable to \code{ifelse(test, yes, no)} whenever
+  \code{test} is a simple true/false result, i.e., when
+  \code{length(test) == 1}.
+
+  The \code{srcref} attribute of functions is handled specially: if
+  \code{test} is a simple true result and \code{yes} evaluates to a function
+  with \code{srcref} attribute, \code{ifelse} returns \code{yes} including
+  its attribute (the same applies to a false \code{test} and \code{no}
+  argument).  This functionality is only for backwards compatibility, the
+  form \code{if(test) yes else no} should be used whenever \code{yes} and
+  \code{no} are functions.
 }
 \references{
   Becker, R. A., Chambers, J. M. and Wilks, A. R. (1988)
@@ -61,11 +74,27 @@ sqrt(ifelse(x >= 0, x, NA))  # no warning
 ## Note: the following also gives the warning !
 ifelse(x >= 0, sqrt(x), NA)
 
+
+## ifelse() strips attributes
+## This is important when working with Dates and factors
+x <- seq(as.Date("2000-02-29"), as.Date("2004-10-04"), by = "1 month")
+## has many "yyyy-mm-29", but a few "yyyy-03-01" in the non-leap years
+y <- ifelse(as.POSIXlt(x)$mday == 29, x, NA)
+head(y) # not what you expected ... ==> need restore the class attribute:
+class(y) <- class(x)
+y
+## ==> Again a case where it is better *not* to use ifelse(), but
+## both more efficient and clear:
+y2 <- x
+y2[as.POSIXlt(x)$mday != 29] <- NA
+stopifnot(identical(y2, y))
+
+
 ## example of different return modes:
 yes <- 1:3
 no <- pi^(0:3)
-typeof(ifelse(NA, yes, no))    # logical
-typeof(ifelse(TRUE, yes, no))  # integer
+typeof(ifelse(NA,    yes, no)) # logical
+typeof(ifelse(TRUE,  yes, no)) # integer
 typeof(ifelse(FALSE, yes, no)) # double
 }
 \keyword{logic}
diff --git a/src/library/base/man/integer.Rd b/src/library/base/man/integer.Rd
index b4ac867..272813d 100644
--- a/src/library/base/man/integer.Rd
+++ b/src/library/base/man/integer.Rd
@@ -1,5 +1,5 @@
 % File src/library/base/man/integer.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2010 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/base/man/interaction.Rd b/src/library/base/man/interaction.Rd
index 6e951b6..8223073 100644
--- a/src/library/base/man/interaction.Rd
+++ b/src/library/base/man/interaction.Rd
@@ -1,5 +1,5 @@
 % File src/library/base/man/interaction.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2007 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/base/man/interactive.Rd b/src/library/base/man/interactive.Rd
index f43fc9c..bbd9fab 100644
--- a/src/library/base/man/interactive.Rd
+++ b/src/library/base/man/interactive.Rd
@@ -1,10 +1,8 @@
 % File src/library/base/man/interactive.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2009 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2014 R Core Team
 % Distributed under GPL 2 or later
 
-\newcommand{\sspace}{\ifelse{latex}{\out{~}}{ }}
-
 \name{interactive}
 \alias{interactive}
 \title{Is R Running Interactively?}
diff --git a/src/library/base/man/invisible.Rd b/src/library/base/man/invisible.Rd
index 199f5e5..a649df4 100644
--- a/src/library/base/man/invisible.Rd
+++ b/src/library/base/man/invisible.Rd
@@ -1,5 +1,5 @@
 % File src/library/base/man/invisible.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2007 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/base/man/is.finite.Rd b/src/library/base/man/is.finite.Rd
index ddaaf4b..063aa88 100644
--- a/src/library/base/man/is.finite.Rd
+++ b/src/library/base/man/is.finite.Rd
@@ -1,6 +1,6 @@
 % File src/library/base/man/is.finite.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2013 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2015 R Core Team
 % Distributed under GPL 2 or later
 
 \name{is.finite}
@@ -11,6 +11,7 @@
 \alias{NaN}
 \alias{is.nan}
 \alias{finite} % for when people ask what 'finite' means.
+\alias{infinite}
 \description{
   \code{is.finite} and \code{is.infinite} return a vector of the same
   length as \code{x}, indicating which elements are finite (not infinite
@@ -93,7 +94,7 @@ NaN
   The IEC 60559 standard, also known as the
   ANSI/IEEE 754 Floating-Point Standard.
 
-  \url{http://en.wikipedia.org/wiki/NaN}.
+  \url{https://en.wikipedia.org/wiki/NaN}.
 
   D. Goldberg (1991) \emph{What Every Computer Scientist Should Know
     about Floating-Point Arithmetic}  ACM Computing Surveys, \bold{23(1)}.\cr
@@ -101,7 +102,7 @@ NaN
   \url{http://www.validlab.com/goldberg/paper.ps}
   Extended PDF version at \url{http://www.validlab.com/goldberg/paper.pdf}
 
-  The C99 function \code{isfinite} is used for \code{is.finite} if available.
+  The C99 function \code{isfinite} is used for \code{is.finite}.
 }
 \examples{
 pi / 0 ## = Inf a non-zero number divided by zero creates infinity
diff --git a/src/library/base/man/is.function.Rd b/src/library/base/man/is.function.Rd
index 2ac7584..e43246c 100644
--- a/src/library/base/man/is.function.Rd
+++ b/src/library/base/man/is.function.Rd
@@ -1,5 +1,5 @@
 % File src/library/base/man/is.function.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2007 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/base/man/is.language.Rd b/src/library/base/man/is.language.Rd
index 5df6c3d..22fa76e 100644
--- a/src/library/base/man/is.language.Rd
+++ b/src/library/base/man/is.language.Rd
@@ -1,6 +1,6 @@
 % File src/library/base/man/is.language.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2014 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2015 R Core Team
 % Distributed under GPL 2 or later
 
 \name{is.language}
@@ -20,6 +20,9 @@ is.language(x)
   \item{x}{object to be tested.}
 }
 \note{
+  A \code{name} is also known as \sQuote{symbol}, from its type
+  (\code{\link{typeof}}), see \code{\link{is.symbol}}.
+
   This is a \link{primitive} function.
 }
 \references{
diff --git a/src/library/base/man/is.object.Rd b/src/library/base/man/is.object.Rd
index f16904c..eed7792 100644
--- a/src/library/base/man/is.object.Rd
+++ b/src/library/base/man/is.object.Rd
@@ -1,5 +1,5 @@
 % File src/library/base/man/is.object.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2011 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/base/man/is.recursive.Rd b/src/library/base/man/is.recursive.Rd
index b19dc34..5a3bf42 100644
--- a/src/library/base/man/is.recursive.Rd
+++ b/src/library/base/man/is.recursive.Rd
@@ -1,6 +1,6 @@
 % File src/library/base/man/is.recursive.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2014 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2015 R Core Team
 % Distributed under GPL 2 or later
 
 \name{is.recursive}
@@ -22,13 +22,15 @@ is.recursive(x)
   \item{x}{object to be tested.}
 }
 \details{
-  \code{is.atomic} is true for the atomic types
+  \code{is.atomic} is true for the \link{atomic} types
   (\code{"logical"}, \code{"integer"}, \code{"numeric"},
   \code{"complex"}, \code{"character"} and \code{"raw"}) and \code{NULL}.
 
-  Most types of objects are regarded as recursive, except for the atomic
-  types, \code{NULL} and symbols (as given by \code{\link{as.name}}).
-  
+  Most types of objects are regarded as recursive.  Exceptions are the atomic
+  types, \code{NULL}, symbols (as given by \code{\link{as.name}}),
+  \code{S4} objects with slots, external pointers, and---rarely visible
+  from \R---weak references and byte code, see \code{\link{typeof}}.
+
   It is common to call the atomic types \sQuote{atomic vectors}, but
   note that \code{\link{is.vector}} imposes further restrictions: an
   object can be atomic but not a vector (in that sense).
@@ -55,7 +57,8 @@ is.a.r(list())          # FALSE TRUE - a list is a list
 is.a.r(list(2))         # FALSE TRUE
 is.a.r(lm)              # FALSE TRUE
 is.a.r(y ~ x)           # FALSE TRUE
-is.a.r(expression(x+1)) # FALSE TRUE (nowadays)
+is.a.r(expression(x+1)) # FALSE TRUE
+is.a.r(quote(exp))      # FALSE FALSE
 }
 \keyword{programming}
 \keyword{classes}
diff --git a/src/library/base/man/is.single.Rd b/src/library/base/man/is.single.Rd
index f0a1730..a0eea2b 100644
--- a/src/library/base/man/is.single.Rd
+++ b/src/library/base/man/is.single.Rd
@@ -1,5 +1,5 @@
 % File src/library/base/man/is.single.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2007 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/base/man/is.unsorted.Rd b/src/library/base/man/is.unsorted.Rd
index ac7d127..4eb915b 100644
--- a/src/library/base/man/is.unsorted.Rd
+++ b/src/library/base/man/is.unsorted.Rd
@@ -1,6 +1,6 @@
 % File src/library/base/man/sort.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2014 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2017 R Core Team
 % Distributed under GPL 2 or later
 
 \name{is.unsorted}
@@ -33,8 +33,6 @@ is.unsorted(x, na.rm = FALSE, strictly = FALSE)
   This function is designed for objects with one-dimensional indices, as
   described above.  Data frames, matrices and other arrays may give
   surprising results.
-  
-  Support for raw vectors was added in \R 3.1.0.
 }
 \seealso{\code{\link{sort}}, \code{\link{order}}.}
 
diff --git a/src/library/base/man/isR.Rd b/src/library/base/man/isR.Rd
index ce59527..c413810 100644
--- a/src/library/base/man/isR.Rd
+++ b/src/library/base/man/isR.Rd
@@ -1,5 +1,5 @@
 % File src/library/base/man/isR.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2007 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/base/man/isS4.Rd b/src/library/base/man/isS4.Rd
index ad1c4ec..e9d2778 100644
--- a/src/library/base/man/isS4.Rd
+++ b/src/library/base/man/isS4.Rd
@@ -1,5 +1,5 @@
 % File src/library/base/man/isS4.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2012 R Core Team
 % Distributed under GPL 2 or later
 
@@ -61,8 +61,9 @@ asS3(object, flag = TRUE, complete = TRUE)
 }
 
 \seealso{
-  \code{\link{is.object}} for a more general test; \link{Methods}
-  for general information on S4.
+  \code{\link{is.object}} for a more general test; \link[methods]{Introduction}
+  for general information on S4; \link[methods]{Classes_Details} for more on S4
+  class definitions.
 }
 
 \examples{
diff --git a/src/library/base/man/isSymmetric.Rd b/src/library/base/man/isSymmetric.Rd
index ff7b110..c27cefa 100644
--- a/src/library/base/man/isSymmetric.Rd
+++ b/src/library/base/man/isSymmetric.Rd
@@ -1,24 +1,31 @@
 % File src/library/base/man/isSymmetric.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2009 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2016 R Core Team
 % Distributed under GPL 2 or later
 
 \name{isSymmetric}
 \alias{isSymmetric}
 \alias{isSymmetric.matrix}
-\title{Test if a Matrix or other Object is Symmetric}
+\title{Test if a Matrix or other Object is Symmetric (Hermitian)}
 \description{
   Generic function to test if \code{object} is symmetric or not.
-  Currently only a matrix method is implemented.
+  Currently only a matrix method is implemented, where a
+  \code{\link{complex}} matrix \code{Z} must be \dQuote{Hermitian} for
+  \code{isSymmetric(Z)} to be true.
 }
 \usage{
 isSymmetric(object, \dots)
-\method{isSymmetric}{matrix}(object, tol = 100 * .Machine$double.eps, \dots)
+\method{isSymmetric}{matrix}(object, tol = 100 * .Machine$double.eps,
+            tol1 = 8 * tol, \dots)
 }
 \arguments{
   \item{object}{any \R object; a \code{\link{matrix}} for the matrix method.}
   \item{tol}{numeric scalar >= 0.  Smaller differences are not
     considered, see \code{\link{all.equal.numeric}}.}
+  \item{tol1}{numeric scalar >= 0.  \code{isSymmetric.matrix()}
+    \sQuote{pre-tests} the first and last few rows for fast detection of
+    \sQuote{obviously} asymmetric cases with this tolerance.  Setting it
+    to length zero will skip the pre-tests.}
   \item{\dots}{further arguments passed to methods; the matrix method
     passes these to \code{\link{all.equal}}.}
 }
@@ -31,8 +38,8 @@ isSymmetric(object, \dots)
   \code{\link{all.equal}}.  It might not be appropriate in all
   situations.
 
-  Note that a matrix is only symmetric if its \code{rownames} and
-  \code{colnames} are identical.
+  Note that a matrix \code{m} is only symmetric if its \code{rownames} and
+  \code{colnames} are identical.  Consider using \code{\link{unname}(m)}.
 }
 \seealso{\code{\link{eigen}} which calls \code{isSymmetric} when its
   \code{symmetric} argument is missing.
@@ -44,6 +51,13 @@ D3[2, 1] <- 1e-100
 D3
 isSymmetric(D3) # TRUE
 isSymmetric(D3, tol = 0) # FALSE for zero-tolerance
+
+## Complex Matrices - Hermitian or not
+Z <- sqrt(matrix(-1:2 + 0i, 2)); Z <- t(Conj(Z)) \%*\% Z
+Z
+isSymmetric(Z)      # TRUE
+isSymmetric(Z + 1)  # TRUE
+isSymmetric(Z + 1i) # FALSE -- a Hermitian matrix has a *real* diagonal
 }
 \keyword{array}
 \keyword{utilities}
diff --git a/src/library/base/man/jitter.Rd b/src/library/base/man/jitter.Rd
index 9dfd028..f18ca63 100644
--- a/src/library/base/man/jitter.Rd
+++ b/src/library/base/man/jitter.Rd
@@ -1,5 +1,5 @@
 % File src/library/base/man/jitter.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2011 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/base/man/kappa.Rd b/src/library/base/man/kappa.Rd
index 1e17425..5e31bb0 100644
--- a/src/library/base/man/kappa.Rd
+++ b/src/library/base/man/kappa.Rd
@@ -1,6 +1,6 @@
 % File src/library/base/man/kappa.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2012 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2015 R Core Team
 % Copyright 2008-2010 The R Foundation
 % Distributed under GPL 2 or later
 
@@ -33,13 +33,13 @@ rcond(x, norm = c("O","I","1"), triangular = FALSE, \dots)
     \code{\link{norm}}.  For \code{rcond}, the default is \code{"O"},
     meaning the \bold{O}ne- or 1-norm.  The (currently only) other
     possible value is \code{"I"} for the infinity norm.}
-  \item{method}{character string, specifying the method to be used;
-    \code{"qr"} is default for back-compatibility, mainly.}
+  \item{method}{a partially matched character string specifying the method to be used;
+    \code{"qr"} is the default for back-compatibility, mainly.}
   \item{triangular}{logical.  If true, the matrix used is just the lower
     triangular part of \code{z}.}
   \item{LINPACK}{logical.  If true and \code{z} is not complex, the
-    Linpack routine \code{dtrco()} is called; otherwise the relevant
-    Lapack routine is.}
+    LINPACK routine \code{dtrco()} is called; otherwise the relevant
+    LAPACK routine is.}
   \item{\dots}{further arguments passed to or from other methods;
     for \code{kappa.*()}, notably \code{LINPACK} when \code{norm} is not
     \code{"2"}.}
@@ -74,6 +74,10 @@ rcond(x, norm = c("O","I","1"), triangular = FALSE, \dots)
 
   \code{.kappa_tri} is an internal function called by \code{kappa.qr} and
   \code{kappa.default}.
+
+  Unsuccessful results from the underlying LAPACK code will result in an
+  error giving a positive error code: these can only be interpreted by
+  detailed study of the FORTRAN code.
 }
 \value{
   The condition number, \eqn{kappa}, or an approximation if
diff --git a/src/library/base/man/kronecker.Rd b/src/library/base/man/kronecker.Rd
index 1f0f047..e8f1c91 100644
--- a/src/library/base/man/kronecker.Rd
+++ b/src/library/base/man/kronecker.Rd
@@ -1,5 +1,5 @@
 % File src/library/base/man/kronecker.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2011 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/base/man/l10n_info.Rd b/src/library/base/man/l10n_info.Rd
index faee09a..f9c2735 100644
--- a/src/library/base/man/l10n_info.Rd
+++ b/src/library/base/man/l10n_info.Rd
@@ -1,5 +1,5 @@
 % File src/library/base/man/l10n_info.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2007 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/base/man/labels.Rd b/src/library/base/man/labels.Rd
index 777bbc6..30cdfe6 100644
--- a/src/library/base/man/labels.Rd
+++ b/src/library/base/man/labels.Rd
@@ -1,5 +1,5 @@
 % File src/library/base/man/labels.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2007 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/base/man/lapply.Rd b/src/library/base/man/lapply.Rd
index adfb3c6..eac5bd3 100644
--- a/src/library/base/man/lapply.Rd
+++ b/src/library/base/man/lapply.Rd
@@ -1,10 +1,8 @@
 % File src/library/base/man/lapply.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2014 R Core Team
 % Distributed under GPL 2 or later
 
-\newcommand{\sspace}{\ifelse{latex}{\out{~}}{ }}
-
 \name{lapply}
 \title{Apply a Function over a List or Vector}
 \alias{lapply}
diff --git a/src/library/base/man/lazyload.Rd b/src/library/base/man/lazyload.Rd
index 766a77a..64f30e0 100644
--- a/src/library/base/man/lazyload.Rd
+++ b/src/library/base/man/lazyload.Rd
@@ -1,5 +1,5 @@
 % File src/library/base/man/lazyload.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2011 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/base/man/length.Rd b/src/library/base/man/length.Rd
index 7934a9b..25102f0 100644
--- a/src/library/base/man/length.Rd
+++ b/src/library/base/man/length.Rd
@@ -1,10 +1,8 @@
 % File src/library/base/man/length.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2014 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2017 R Core Team
 % Distributed under GPL 2 or later
 
-\newcommand{\CRANpkg}{\href{http://CRAN.R-project.org/package=#1}{\pkg{#1}}}
-
 \name{length}
 \alias{length}
 \alias{length<-}
@@ -58,12 +56,11 @@ length(x) <- value
   (earlier versions of \CRANpkg{sets}). Where a single double value is
   returned that can be represented as an integer it is returned as a
   length-one integer vector.
-
-  As from \R 3.0.0, lengths can be returned as double in base \R.
 }
 
-\seealso{\code{nchar} for counting the number of characters in
-  character vectors.
+\seealso{\code{nchar} for counting the number of characters in character
+  vectors, \code{\link{lengths}} for getting the length of every element
+  in a list.
 }
 \references{
   Becker, R. A., Chambers, J. M. and Wilks, A. R. (1988)
diff --git a/src/library/base/man/lengths.Rd b/src/library/base/man/lengths.Rd
new file mode 100644
index 0000000..efc0988
--- /dev/null
+++ b/src/library/base/man/lengths.Rd
@@ -0,0 +1,72 @@
+% File src/library/base/man/lengths.Rd
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2015 R Core Team
+% Distributed under GPL 2 or later
+
+\name{lengths}
+\alias{lengths}
+\title{Lengths of List or Vector Elements}
+\encoding{UTF-8}
+\description{
+  Get the length of each element of a \code{\link{list}} or atomic
+  vector (\code{\link{is.atomic}}) as an integer or numeric vector.
+}
+\usage{
+lengths(x, use.names = TRUE)
+}
+\arguments{
+  \item{x}{a \code{\link{list}}, list-like such as an
+    \code{\link{expression}} or an atomic vector (for which the result
+    is trivial).}
+  \item{use.names}{logical indicating if the result should inherit the
+    \code{\link{names}} from \code{x}.}
+}
+\details{
+  This function loops over \code{x} and returns a compatible vector
+  containing the length of each element in \code{x}.  Effectively,
+  \code{length(x[[i]])} is called for all \code{i}, so any methods on
+  \code{length} are considered.
+}
+\note{
+  One raison d'\enc{être}{etre} of \code{lengths(x)} is its use as a
+  more efficient version of \code{sapply(x, length)} and similar
+  \code{*apply} calls to \code{\link{length}}.  This is the reason why
+  \code{x} may be an atomic vector, even though \code{lengths(x)} is
+  trivial in that case.
+}
+\value{
+  A non-negative \code{\link{integer}} of length \code{length(x)},
+  except when any element has a length of more than
+  \eqn{2^{31}-1}{2^31 - 1} elements, when it returns a double vector.
+  When \code{use.names} is true, the names are taken from the names on
+  \code{x}, if any.
+}
+\seealso{
+  \code{\link{length}} for getting the length of any \R object.
+}
+\examples{
+require(stats)
+## summarize by month
+l <- split(airquality$Ozone, airquality$Month)
+avgOz <- lapply(l, mean, na.rm=TRUE)
+## merge result
+airquality$avgOz <- rep(unlist(avgOz, use.names=FALSE), lengths(l))
+## but this is safer and cleaner, but can be slower
+airquality$avgOz <- unsplit(avgOz, airquality$Month)
+
+## should always be true, except when a length does not fit in 32 bits
+stopifnot(identical(lengths(l), vapply(l, length, integer(1L))))
+
+## empty lists are not a problem
+x <- list()
+stopifnot(identical(lengths(x), integer()))
+
+## nor are "list-like" expressions:
+lengths(expression(u, v, 1+ 0:9))
+
+## and we should dispatch to length methods
+f <- c(rep(1, 3), rep(2, 6), 3)
+dates <- split(as.POSIXlt(Sys.time() + 1:10), f)
+stopifnot(identical(lengths(dates), vapply(dates, length, integer(1L))))
+}
+\keyword{attribute}
diff --git a/src/library/base/man/levels.Rd b/src/library/base/man/levels.Rd
index 7611c5e..29b7f1c 100644
--- a/src/library/base/man/levels.Rd
+++ b/src/library/base/man/levels.Rd
@@ -1,6 +1,6 @@
 % File src/library/base/man/levels.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2010 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2015 R Core Team
 % Distributed under GPL 2 or later
 
 \name{levels}
@@ -62,13 +62,16 @@ levels(y) <- c("low", "high")
 y
 
 ## combine some levels
-z <- gl(3, 2, 12)
-levels(z) <- c("A", "B", "A")
+z <- gl(3, 2, 12, labels = c("apple", "salad", "orange"))
+z
+levels(z) <- c("fruit", "veg", "fruit")
 z
 
 ## same, using a named list
-z <- gl(3, 2, 12)
-levels(z) <- list(A = c(1,3), B = 2)
+z <- gl(3, 2, 12, labels = c("apple", "salad", "orange"))
+z
+levels(z) <- list("fruit" = c("apple","orange"),
+                  "veg"   = "salad")
 z
 
 ## we can add levels this way:
diff --git a/src/library/base/man/libPaths.Rd b/src/library/base/man/libPaths.Rd
index b162635..8692c22 100644
--- a/src/library/base/man/libPaths.Rd
+++ b/src/library/base/man/libPaths.Rd
@@ -1,5 +1,5 @@
 % File src/library/base/man/libPaths.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2013 R Core Team
 % Distributed under GPL 2 or later
 
@@ -59,7 +59,7 @@
   By default \env{R_LIBS} is unset, and \env{R_LIBS_USER} is set to
   directory \file{R/\var{R.version$platform}-library/\var{x.y}}
   of the home directory (or \file{Library/R/\var{x.y}/library} for
-  CRAN OS X builds), for \R \var{x.y.z}.
+  CRAN macOS builds), for \R \var{x.y.z}.
 
   \code{.Library.site} can be set via the environment variable
   \env{R_LIBS_SITE} (as a non-empty colon-separated list of library trees).
diff --git a/src/library/base/man/libcurlVersion.Rd b/src/library/base/man/libcurlVersion.Rd
new file mode 100644
index 0000000..2ac6db3
--- /dev/null
+++ b/src/library/base/man/libcurlVersion.Rd
@@ -0,0 +1,51 @@
+% File src/library/base/man/curlVersion.Rd
+% Part of the R package, https://www.R-project.org
+% Copyright 2015 R Core Team
+% Distributed under GPL 2 or later
+
+\name{libcurlVersion}
+\alias{libcurlVersion}
+\title{
+  Report Version of libcurl
+}
+\description{
+  Report version of \code{libcurl} in use.
+}
+\usage{
+libcurlVersion()
+}
+\value{
+  A character string, with value the \code{libcurl} version in use or
+  \code{""} if none is.  If \code{libcurl} is available, has attributes
+
+  \item{ssl_version}{A character string naming the SSL implementation
+    and version, possibly \code{"none"}.  It is intended for the version
+    of OpenSSL used, but not all implementations of \code{libcurl} use
+    OpenSSL --- for example macOS reports \code{"SecureTranspart"}, its
+    wrapper for SSL/TLS.}
+
+  \item{libssh_version}{A character string naming the \code{libssh} version,
+    which may or may not be available (it is used for
+    e.g.\sspace{}\code{scp} and \code{sftp} protocols). Where present,
+    something like \code{"libssh2/1.5.0"}.}
+
+  \item{protocols}{A character vector of the names of supported
+    protocols, also known as \sQuote{schemes} when part of a URL.}
+}
+\seealso{
+  \code{\link{extSoftVersion}} for versions of other third-party
+  software.
+
+  \code{\link{curlGetHeaders}}, \code{\link{download.file}} and
+  \code{\link{url}} for functions which (optionally) use \code{libcurl}.
+
+  \url{http://curl.haxx.se/docs/sslcerts.html} and
+  \url{http://curl.haxx.se/docs/ssl-compared.html} for more details on
+  SSL versions.  Normally \code{libcurl} used with \R uses
+  SecureTransport on macOS, OpenSSL on Windows and GnuTLS, NSS or OpenSSL
+  on Unix-alikes.  (At the time of writing Debian-based Linuxen use
+  GnuTLS, RedHat-based ones use NSS.)
+}
+\examples{
+libcurlVersion()
+}
diff --git a/src/library/base/man/library.Rd b/src/library/base/man/library.Rd
index 4e18113..e3506ff 100644
--- a/src/library/base/man/library.Rd
+++ b/src/library/base/man/library.Rd
@@ -1,5 +1,5 @@
 % File src/library/base/man/library.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2014 R Core Team
 % Distributed under GPL 2 or later
 
@@ -104,12 +104,15 @@ require(package, lib.loc = NULL, quietly = FALSE,
   user is asked to view and accept the license: a list of accepted
   licenses is stored in file \file{~/.R/licensed}.  In a non-interactive
   session it is an error to use such a package whose license has not
-  already been accepted.
+  already been recorded as accepted.
 
-  Free or Open Source Software (FOSS, e.g.,
-  \url{http://en.wikipedia.org/wiki/FOSS}) packages are determined by
-  the same filters used by \code{\link{available.packages}} but applied
-  to just the current package, not its dependencies.
+  As from \R 3.4.0 the license check is done when the namespace is loaded.
+
+  Free or Open Source Software (FOSS,
+  e.g.\sspace{}\url{https://en.wikipedia.org/wiki/FOSS}) packages are
+  determined by the same filters used by
+  \code{\link{available.packages}} but applied to just the current
+  package, not its dependencies.
 
   There can also be a site-wide file \file{R_HOME/etc/licensed.site} of
   packages (one per line).
@@ -139,14 +142,14 @@ require(package, lib.loc = NULL, quietly = FALSE,
   compiled code can be shared between Unix-alikes, but not to other OSes
   because of potential problems with line endings and OS-specific help
   files.  If sub-architectures are used, the OS similarity is not
-  checked since the OS used to build may differ (e.g.
-  \code{i386-pc-linux-gnu} code can be built on an
+  checked since the OS used to build may differ
+  (e.g.\sspace{}\code{i386-pc-linux-gnu} code can be built on an
   \code{x86_64-unknown-linux-gnu} OS).
 
   The package name given to \code{library} and \code{require} must match
   the name given in the package's \file{DESCRIPTION} file exactly, even
   on case-insensitive file systems such as are common on Windows and
-  OS X.
+  macOS.
 }
 \seealso{
   \code{\link{.libPaths}}, \code{\link{.packages}}.
diff --git a/src/library/base/man/library.dynam.Rd b/src/library/base/man/library.dynam.Rd
index 5e28912..fd5596c 100644
--- a/src/library/base/man/library.dynam.Rd
+++ b/src/library/base/man/library.dynam.Rd
@@ -1,5 +1,5 @@
 % File src/library/base/man/library.dynam.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2013 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/base/man/license.Rd b/src/library/base/man/license.Rd
index e7b2497..ac8bae3 100644
--- a/src/library/base/man/license.Rd
+++ b/src/library/base/man/license.Rd
@@ -1,5 +1,5 @@
 % File src/library/base/man/license.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2013 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/base/man/list.Rd b/src/library/base/man/list.Rd
index 17b3bbb..148f8ee 100644
--- a/src/library/base/man/list.Rd
+++ b/src/library/base/man/list.Rd
@@ -1,6 +1,6 @@
 % File src/library/base/man/list.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2012 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2014 R Core Team
 % Distributed under GPL 2 or later
 
 \name{list}
@@ -25,7 +25,7 @@ list(\dots)
 pairlist(\dots)
 
 as.list(x, \dots)
-\method{as.list}{environment}(x, all.names = FALSE, \dots)
+\method{as.list}{environment}(x, all.names = FALSE, sorted = FALSE, \dots)
 as.pairlist(x)
 
 is.list(x)
@@ -38,6 +38,9 @@ alist(\dots)
   \item{x}{object to be coerced or tested.}
   \item{all.names}{a logical indicating whether to copy all values or
     (default) only those whose names do not begin with a dot.}
+  \item{sorted}{a logical indicating whether the \code{\link{names}} of
+    the resulting list should be sorted (increasingly).  Note that this
+    is somewhat costly, but may be useful for comparison of environments.}
 }
 \details{
   Almost all lists in \R internally are \emph{Generic Vectors}, whereas
@@ -74,7 +77,8 @@ alist(\dots)
   The \code{"\link{environment}"} method for \code{as.list} copies the
   name-value pairs (for names not beginning with a dot) from an
   environment to a named list.  The user can request that all named
-  objects are copied.  The list is in no particular order (the order
+  objects are copied.  Unless \code{sorted = TRUE}, the list is in no
+  particular order (the order
   depends on the order of creation of objects and whether the
   environment is hashed).  No enclosing environments are searched.
   (Objects copied are duplicated so this can be an expensive operation.)
@@ -82,7 +86,8 @@ alist(\dots)
   \code{\link{as.environment}()} method for list objects.
 
   An empty pairlist, \code{pairlist()} is the same as
-  \code{\link{NULL}}.  This is different from \code{list()}.
+  \code{\link{NULL}}.  This is different from \code{list()}: some but
+  not all operations will promote an empty pairlist to an empty list.
 
   \code{as.pairlist} is implemented as \code{\link{as.vector}(x,
   "pairlist")}, and hence will dispatch methods for the generic function
diff --git a/src/library/base/man/list.files.Rd b/src/library/base/man/list.files.Rd
index a0393b1..6c3ec13 100644
--- a/src/library/base/man/list.files.Rd
+++ b/src/library/base/man/list.files.Rd
@@ -1,6 +1,6 @@
 % File src/library/base/man/list.files.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2012 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2014 R Core Team
 % Distributed under GPL 2 or later
 
 \name{list.files}
@@ -68,7 +68,8 @@ list.dirs(path = ".", full.names = TRUE, recursive = TRUE)
 #ifdef windows
 
   \code{path} must specify paths which can be represented in the current
-  codepage.
+  codepage, and files/directories below \code{path} whose names cannot
+  be represented in that codepage will most likely not be found.
 #endif
 }
 \seealso{\code{\link{file.info}}, \code{\link{file.access}}
diff --git a/src/library/base/man/list2env.Rd b/src/library/base/man/list2env.Rd
index 80324f9..e08d9b8 100644
--- a/src/library/base/man/list2env.Rd
+++ b/src/library/base/man/list2env.Rd
@@ -1,5 +1,5 @@
 % File src/library/base/man/list2env.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 2010 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/base/man/load.Rd b/src/library/base/man/load.Rd
index b08462a..73c638c 100644
--- a/src/library/base/man/load.Rd
+++ b/src/library/base/man/load.Rd
@@ -1,6 +1,6 @@
 % File src/library/base/man/load.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2014 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2017 R Core Team
 % Distributed under GPL 2 or later
 
 \name{load}
@@ -51,11 +51,10 @@ load(file, envir = parent.frame(), verbose = FALSE)
   Larger values will print names to a greater depth.
 
   Objects can be saved with references to namespaces, usually as part of
-  the environment of a function or formula.  As from \R 3.1.0 such
-  objects can be loaded even if the namespace is not available: it is
-  replaced by a reference to the global environment with a warning.  The
-  warning identifies the first object with such a reference (but there
-  may be more than one).
+  the environment of a function or formula.  Such objects can be loaded
+  even if the namespace is not available: it is replaced by a reference
+  to the global environment with a warning.  The warning identifies the
+  first object with such a reference (but there may be more than one).
 }
 \value{
   A character vector of the names of objects created, invisibly.
@@ -67,8 +66,8 @@ load(file, envir = parent.frame(), verbose = FALSE)
   conversion and gives an informative error message.
 
   \code{load(<file>)} replaces all existing objects with the same names
-  in the current environment (typically your workspace),
-  and hence potentially overwrites important data.
+  in the current environment (typically your workspace,
+  \code{\link{.GlobalEnv}}) and hence potentially overwrites important data.
   It is considerably safer to use \code{envir = } to load into a
   different environment, or to \code{\link{attach}(file)} which
   \code{load()}s into a new entry in the \code{\link{search}} path.
@@ -80,7 +79,8 @@ load(file, envir = parent.frame(), verbose = FALSE)
 }
 #endif
 \seealso{
-  \code{\link{save}}, \code{\link{download.file}}.
+  \code{\link{save}}, \code{\link{download.file}}; further
+  \code{\link{attach}} as wrapper for \code{load()}.
 
   For other interfaces to the underlying serialization format, see
   \code{\link{unserialize}} and \code{\link{readRDS}}.
@@ -96,9 +96,20 @@ local({
    load("all.RData")
    ls()
 })
+
+xx <- exp(1:3)
 ## restore the saved values to the user's workspace
-load("all.RData", .GlobalEnv)
+load("all.RData") ## which is here *equivalent* to
+## load("all.RData", .GlobalEnv)
+## This however annihilates all objects in .GlobalEnv with the same names !
+xx # no longer exp(1:3)
+rm(xx)
+attach("all.RData") # safer and will warn about masked objects w/ same name in .GlobalEnv
+ls(pos = 2)
+##  also typically need to cleanup the search path:
+detach("file:all.RData")
 
+## clean up (the example):
 unlink("all.RData")
 
 \dontrun{
diff --git a/src/library/base/man/locales.Rd b/src/library/base/man/locales.Rd
index 4f22d79..c15aa30 100644
--- a/src/library/base/man/locales.Rd
+++ b/src/library/base/man/locales.Rd
@@ -1,6 +1,6 @@
 % File src/library/base/man/locales.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2014 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2016 R Core Team
 % Distributed under GPL 2 or later
 
 \name{locales}
@@ -64,14 +64,14 @@ Sys.setlocale(category = "LC_ALL", locale = "")
   be a warning, depending on the OS.
 
   Attempts to change the character set (by
-  \code{Sys.setlocale("LC_TYPE", )}, if that implies a different
+  \code{Sys.setlocale("LC_CTYPE", )}, if that implies a different
   character set) during a session may not work and are likely to lead to
   some confusion.
 
   Note that the \env{LANGUAGE} environment variable has precedence over
   \code{"LC_MESSAGES"} in selecting the language for message translation
   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
   Windows, the initial setting is taken from the \code{"LC_COLLATE"}
@@ -86,7 +86,7 @@ Sys.setlocale(category = "LC_ALL", locale = "")
 
   For \code{category = "LC_ALL"} the details of the string are
   system-specific: it might be a single locale name or a set of locale
-  names separated by \code{"/"} (Solaris, OS X) or \code{";"}
+  names separated by \code{"/"} (Solaris, macOS) or \code{";"}
   (Windows, Linux).  For portability, it is best to query categories
   individually: it is not necessarily the case that the result of
   \code{foo <- Sys.getlocale()} can be used in
@@ -133,7 +133,7 @@ Sys.getlocale("LC_TIME")
 Sys.setlocale("LC_TIME", "de")     # Solaris: details are OS-dependent
 Sys.setlocale("LC_TIME", "de_DE.utf8")   # Modern Linux etc.
 Sys.setlocale("LC_TIME", "de_DE.UTF-8")  # ditto
-Sys.setlocale("LC_TIME", "de_DE")  # OS X, in UTF-8
+Sys.setlocale("LC_TIME", "de_DE")  # macOS, in UTF-8
 Sys.setlocale("LC_TIME", "German") # Windows
 }
 Sys.getlocale("LC_PAPER")          # may or may not be set
diff --git a/src/library/base/man/logical.Rd b/src/library/base/man/logical.Rd
index be44b55..e2333da 100644
--- a/src/library/base/man/logical.Rd
+++ b/src/library/base/man/logical.Rd
@@ -1,5 +1,5 @@
 % File src/library/base/man/logical.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2011 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/base/man/lower.tri.Rd b/src/library/base/man/lower.tri.Rd
index 93cde77..c870fd9 100644
--- a/src/library/base/man/lower.tri.Rd
+++ b/src/library/base/man/lower.tri.Rd
@@ -1,5 +1,5 @@
 % File src/library/base/man/lower.tri.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2007 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/base/man/ls.Rd b/src/library/base/man/ls.Rd
index d6f402c..8fbde78 100644
--- a/src/library/base/man/ls.Rd
+++ b/src/library/base/man/ls.Rd
@@ -1,6 +1,6 @@
 % File src/library/base/man/ls.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2012 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2014 R Core Team
 % Distributed under GPL 2 or later
 
 \name{ls}
@@ -9,9 +9,9 @@
 \title{List Objects}
 \usage{
 ls(name, pos = -1L, envir = as.environment(pos),
-   all.names = FALSE, pattern)
+   all.names = FALSE, pattern, sorted = TRUE)
 objects(name, pos= -1L, envir = as.environment(pos),
-        all.names = FALSE, pattern)
+        all.names = FALSE, pattern, sorted = TRUE)
 }
 \arguments{
   \item{name}{which environment to use in listing the available objects.
@@ -29,6 +29,9 @@ objects(name, pos= -1L, envir = as.environment(pos),
   \item{pattern}{an optional \link{regular expression}.  Only names
     matching \code{pattern} are returned.  \code{\link{glob2rx}} can be
     used to convert wildcard patterns to regular expressions.}
+  \item{sorted}{logical indicating if the resulting
+    \code{\link{character}} should be sorted alphabetically.  Note that
+    this is part of \code{ls()} may take most of the time.}
 }
 \description{
   \code{ls} and \code{objects} return a vector of character strings
@@ -51,8 +54,10 @@ objects(name, pos= -1L, envir = as.environment(pos),
   way to specify an environment, but are primarily there for back
   compatibility.
 
-  Note that the \emph{order} of the resulting strings is locale
-  dependent, see \code{\link{Sys.getlocale}}.
+  Note that the \emph{order} of strings for \code{sorted = TRUE} is
+  locale dependent, see \code{\link{Sys.getlocale}}.  If \code{sorted =
+    FALSE} the order is arbitrary, depending if the environment is
+  hashed, the order of insertion of objects, \dots.
 }
 \references{
   Becker, R. A., Chambers, J. M. and Wilks, A. R. (1988)
diff --git a/src/library/base/man/make.names.Rd b/src/library/base/man/make.names.Rd
index 2dd67e5..91e0e09 100644
--- a/src/library/base/man/make.names.Rd
+++ b/src/library/base/man/make.names.Rd
@@ -1,5 +1,5 @@
 % File src/library/base/man/make.names.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2013 R Core Team
 % Distributed under GPL 2 or later
 
@@ -43,7 +43,7 @@ make.names(names, unique = FALSE, allow_ = TRUE)
   Some OSes, notably FreeBSD, report extremely incorrect information about
   which characters are alphabetic in some locales (typically, all
   multi-byte locales including UTF-8 locales).  However, \R provides
-  substitutes on Windows, OS X and AIX.
+  substitutes on Windows, macOS and AIX.
 }
 \note{
   Prior to \R version 1.9.0, underscores were not valid in variable names,
diff --git a/src/library/base/man/make.unique.Rd b/src/library/base/man/make.unique.Rd
index ce1b9d6..c9cbcc6 100644
--- a/src/library/base/man/make.unique.Rd
+++ b/src/library/base/man/make.unique.Rd
@@ -1,5 +1,5 @@
 % File src/library/base/man/make.unique.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2008 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/base/man/mapply.Rd b/src/library/base/man/mapply.Rd
index 265b664..ae30890 100644
--- a/src/library/base/man/mapply.Rd
+++ b/src/library/base/man/mapply.Rd
@@ -1,5 +1,5 @@
 % File src/library/base/man/mapply.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2013 R Core Team
 % Copyright 2002-2010 The R Foundation
 % Distributed under GPL 2 or later
diff --git a/src/library/base/man/margin.table.Rd b/src/library/base/man/margin.table.Rd
index 46b0970..3c0df96 100644
--- a/src/library/base/man/margin.table.Rd
+++ b/src/library/base/man/margin.table.Rd
@@ -1,5 +1,5 @@
 % File src/library/base/man/margin.table.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2007 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/base/man/mat.or.vec.Rd b/src/library/base/man/mat.or.vec.Rd
index 0712573..ad91702 100644
--- a/src/library/base/man/mat.or.vec.Rd
+++ b/src/library/base/man/mat.or.vec.Rd
@@ -1,5 +1,5 @@
 % File src/library/base/man/mat.or.vec.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2007 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/base/man/match.Rd b/src/library/base/man/match.Rd
index 8662ae8..4ff71c6 100644
--- a/src/library/base/man/match.Rd
+++ b/src/library/base/man/match.Rd
@@ -1,6 +1,6 @@
 % File src/library/base/man/match.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2014 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2017 R Core Team
 % Distributed under GPL 2 or later
 
 \name{match}
@@ -63,13 +63,17 @@ x \%in\% table
   Exactly what matches what is to some extent a matter of definition.
   For all types, \code{NA} matches \code{NA} and no other value.
   For real and complex values, \code{NaN} values are regarded
-  as matching any other \code{NaN} value, but not matching \code{NA}.
+  as matching any other \code{NaN} value, but not matching \code{NA},
+  where for complex \code{x}, real and imaginary parts must match both
+  (unless containing at least one \code{NA}).
+
+  Character strings will be compared as byte sequences if any input is
+  marked as \code{"bytes"}, and otherwise are regarded as equal if they are
+  in different encodings but would agree when translated to UTF-8 (see
+  \code{\link{Encoding}}).
 
   That \code{\%in\%} never returns \code{NA} makes it particularly
   useful in \code{if} conditions.
-
-  Character strings will be compared as byte sequences if any input is
-  marked as \code{"bytes"} (see \code{\link{Encoding}}).
 }
 \references{
   Becker, R. A., Chambers, J. M. and Wilks, A. R. (1988)
@@ -84,12 +88,18 @@ x \%in\% table
   finds numbers within intervals, rather than exact matches.
 
   \code{\link{is.element}} for an S-compatible equivalent of \code{\%in\%}.
+
+  \code{\link{unique}} (and \code{\link{duplicated}}) are using the same
+  definitions of \dQuote{match} or \dQuote{equality} as \code{match()},
+  and these are less strict than \code{\link{==}}, e.g., for
+  \code{\link{NA}} and \code{\link{NaN}} in numeric or complex vectors,
+  or for strings with different encodings, see also above.
 }
 \examples{
 ## The intersection of two sets can be defined via match():
 ## Simple version:
 ## intersect <- function(x, y) y[match(x, y, nomatch = 0)]
-intersect # the R function in base, slightly more careful
+intersect # the R function in base is slightly more careful
 intersect(1:10, 7:20)
 
 1:10 \%in\% c(1,3,5,9)
@@ -98,9 +108,30 @@ sstr[sstr \%in\% c(letters, LETTERS)]
 
 "\%w/o\%" <- function(x, y) x[!x \%in\% y] #--  x without y
 (1:10) \%w/o\% c(3,7,12)
-## Note that setdiff() is very similar and typically makes more sense: 
+## Note that setdiff() is very similar and typically makes more sense:
         c(1:6,7:2) \%w/o\% c(3,7,12)  # -> keeps duplicates
-setdiff(c(1:6,7:2),        c(3,7,12)) # -> unique values
+setdiff(c(1:6,7:2),      c(3,7,12)) # -> unique values
+
+## Illuminating example about NA matching
+r <- c(1, NA, NaN)
+zN <- c(complex(real = NA , imaginary =  r ), complex(real =  r , imaginary = NA ),
+        complex(real =  r , imaginary = NaN), complex(real = NaN, imaginary =  r ))
+zM <- cbind(Re=Re(zN), Im=Im(zN), match = match(zN, zN))
+rownames(zM) <- format(zN)
+zM ##--> many "NA's" (= 1) and the four non-NA's (3 different ones, at 7,9,10)
+
+length(zN) # 12
+unique(zN) # the "NA" and the 3 different non-NA NaN's
+stopifnot(identical(unique(zN), zN[c(1, 7,9,10)]))
+
+## very strict equality would have 4 duplicates (of 12):
+symnum(outer(zN, zN, Vectorize(identical,c("x","y")),
+                     FALSE,FALSE,FALSE,FALSE))
+## removing "(very strictly) duplicates",
+i <- c(5,8,11,12)  # we get 8 pairwise non-identicals :
+Ixy <- outer(zN[-i], zN[-i], Vectorize(identical,c("x","y")),
+                     FALSE,FALSE,FALSE,FALSE)
+stopifnot(identical(Ixy, diag(8) == 1))
 }
 \keyword{manip}
 \keyword{logic}
diff --git a/src/library/base/man/match.arg.Rd b/src/library/base/man/match.arg.Rd
index 4bbd776..e37c903 100644
--- a/src/library/base/man/match.arg.Rd
+++ b/src/library/base/man/match.arg.Rd
@@ -1,5 +1,5 @@
 % File src/library/base/man/match.arg.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2007 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/base/man/match.call.Rd b/src/library/base/man/match.call.Rd
index 4c66acf..f507b87 100644
--- a/src/library/base/man/match.call.Rd
+++ b/src/library/base/man/match.call.Rd
@@ -1,13 +1,15 @@
 % File src/library/base/man/match.call.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2009 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2015 R Core Team
 % Distributed under GPL 2 or later
 
 \name{match.call}
 \title{Argument Matching}
 \usage{
-match.call(definition = NULL, call = sys.call(sys.parent()),
-           expand.dots = TRUE)
+match.call(definition = sys.function(sys.parent()),
+           call = sys.call(sys.parent()),
+           expand.dots = TRUE,
+           envir = parent.frame(2L))
 }
 \alias{match.call}
 \arguments{
@@ -17,6 +19,8 @@ match.call(definition = NULL, call = sys.call(sys.parent()),
     \code{definition}, as generated by \code{\link{call}}.}
   \item{expand.dots}{logical.  Should arguments matching \code{\dots}
     in the call be included or left as a \code{\dots} argument?}
+  \item{envir}{an environment, from which the \code{\dots} in \code{call}
+    are retrieved, if any.}
 }
 \description{
   \code{match.call} returns a call in which all of the specified arguments are
diff --git a/src/library/base/man/match.fun.Rd b/src/library/base/man/match.fun.Rd
index 177f88c..e0f4fac 100644
--- a/src/library/base/man/match.fun.Rd
+++ b/src/library/base/man/match.fun.Rd
@@ -1,6 +1,6 @@
 % File src/library/base/man/match.fun.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2011 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2014 R Core Team
 % Distributed under GPL 2 or later
 
 \name{match.fun}
diff --git a/src/library/base/man/matmult.Rd b/src/library/base/man/matmult.Rd
index 48a3279..9b13380 100644
--- a/src/library/base/man/matmult.Rd
+++ b/src/library/base/man/matmult.Rd
@@ -1,6 +1,6 @@
 % File src/library/base/man/matmult.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2008 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2017 R Core Team
 % Distributed under GPL 2 or later
 
 \name{matmult}
@@ -8,10 +8,10 @@
 \alias{matmult}
 \title{Matrix Multiplication}
 \description{
-  Multiplies two matrices, if they are conformable.
-  If one argument is a vector, it will be promoted to either a row or
-  column matrix to make the two arguments conformable.
-  If both are vectors it will return the inner product (as a matrix).
+  Multiplies two matrices, if they are conformable.  If one argument is
+  a vector, it will be promoted to either a row or column matrix to make
+  the two arguments conformable.  If both are vectors of the same
+  length, it will return the inner product (as a matrix).
 }
 \usage{
 x \%*\% y
@@ -23,6 +23,10 @@ x \%*\% y
   When a vector is promoted to a matrix, its names are not
   promoted to row or column names, unlike \code{\link{as.matrix}}.
 
+  Promotion of a vector to a 1-row or 1-column matrix happens when one
+  of the two choices allows \code{x} and \code{y} to get conformable
+  dimensions.
+  
   This operator is S4 generic but not S3 generic.  S4 methods need to be
   written for a function of two arguments named \code{x} and \code{y}.
 }
@@ -30,15 +34,19 @@ x \%*\% y
   A double or complex matrix product.  Use \code{\link{drop}} to remove
   dimensions which have only one level.
 }
+\note{
+  The propagation of NaN/Inf values, precision, and performance of matrix
+  products can be controlled by \code{\link{options}("matprod")}.
+}
 \references{
   Becker, R. A., Chambers, J. M. and Wilks, A. R. (1988)
   \emph{The New S Language}.
   Wadsworth & Brooks/Cole.
 }
 \seealso{
-  \code{\link{matrix}},
-  \code{\link{Arithmetic}},
-  \code{\link{diag}}.
+  For matrix \emph{cross}products, \code{\link{crossprod}()} and
+  \code{tcrossprod()} are typically preferable.
+  \code{\link{matrix}}, \code{\link{Arithmetic}}, \code{\link{diag}}.
 }
 \examples{
 x <- 1:4
diff --git a/src/library/base/man/matrix.Rd b/src/library/base/man/matrix.Rd
index 323d63d..baf105e 100644
--- a/src/library/base/man/matrix.Rd
+++ b/src/library/base/man/matrix.Rd
@@ -1,10 +1,8 @@
 % File src/library/base/man/matrix.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2013 R Core Team
 % Distributed under GPL 2 or later
 
-\newcommand{\sspace}{\ifelse{latex}{\out{~}}{ }}
-
 \name{matrix}
 \alias{matrix}
 \alias{as.matrix}
diff --git a/src/library/base/man/maxCol.Rd b/src/library/base/man/maxCol.Rd
index 32d3ae7..bc69b0e 100644
--- a/src/library/base/man/maxCol.Rd
+++ b/src/library/base/man/maxCol.Rd
@@ -1,6 +1,6 @@
 % File src/library/base/man/maxCol.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2007 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2014 R Core Team
 % Distributed under GPL 2 or later
 
 \name{maxCol}
diff --git a/src/library/base/man/mean.Rd b/src/library/base/man/mean.Rd
index acfe592..c8fdd8d 100644
--- a/src/library/base/man/mean.Rd
+++ b/src/library/base/man/mean.Rd
@@ -1,5 +1,5 @@
 % File src/library/base/man/mean.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2013 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/base/man/memCompress.Rd b/src/library/base/man/memCompress.Rd
index cd08ef4..68c0bf2 100644
--- a/src/library/base/man/memCompress.Rd
+++ b/src/library/base/man/memCompress.Rd
@@ -1,5 +1,5 @@
 % File src/library/base/man/memCompress.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 2009-11 R Core Team
 % Distributed under GPL 2 or later
 
@@ -65,11 +65,11 @@ memDecompress(from,
 \seealso{
   \link{connections}.
 
-  \url{http://en.wikipedia.org/wiki/Data_compression} for background on
+  \url{https://en.wikipedia.org/wiki/Data_compression} for background on
   data compression, \url{http://zlib.net/},
-  \url{http://en.wikipedia.org/wiki/Gzip}, \url{http://www.bzip.org/},
-  \url{http://en.wikipedia.org/wiki/Bzip2}, \url{http://tukaani.org/xz/}
-  and \url{http://en.wikipedia.org/wiki/Xz} for references about the
+  \url{https://en.wikipedia.org/wiki/Gzip}, \url{http://www.bzip.org/},
+  \url{https://en.wikipedia.org/wiki/Bzip2}, \url{http://tukaani.org/xz/}
+  and \url{https://en.wikipedia.org/wiki/Xz} for references about the
   particular schemes used.
 }
 
diff --git a/src/library/base/man/memory.profile.Rd b/src/library/base/man/memory.profile.Rd
index 99f5dbd..a711264 100644
--- a/src/library/base/man/memory.profile.Rd
+++ b/src/library/base/man/memory.profile.Rd
@@ -1,5 +1,5 @@
 % File src/library/base/man/memory.profile.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2007 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/base/man/merge.Rd b/src/library/base/man/merge.Rd
index 592b763..515fbed 100644
--- a/src/library/base/man/merge.Rd
+++ b/src/library/base/man/merge.Rd
@@ -1,7 +1,7 @@
 % File src/library/base/man/merge.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2014 R Core Team
-% Copyright 2002-2011 The R Foundation
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2017 R Core Team
+% Copyright 2002-2016 The R Foundation
 % Distributed under GPL 2 or later
 
 \name{merge}
@@ -42,7 +42,7 @@ merge(x, y, \dots)
     columns?}
   \item{suffixes}{a character vector of length 2 specifying the suffixes
     to be used for making unique the names of columns in the result
-    which not used for merging (appearing in \code{by} etc).}
+    which are not used for merging (appearing in \code{by} etc).}
   \item{incomparables}{values which cannot be matched.  See
     \code{\link{match}}.  This is intended to be used for merging on one
     column, so these are incomparable values of that column.}
@@ -83,7 +83,7 @@ merge(x, y, \dots)
   The complexity of the algorithm used is proportional to the length of
   the answer.
 
-  % Terminology follows http://en.wikipedia.org/wiki/Join_(SQL)
+  % Terminology follows https://en.wikipedia.org/wiki/Join_(SQL)
   In SQL database terminology, the default value of \code{all = FALSE}
   gives a \emph{natural join}, a special case of an \emph{inner
   join}. Specifying \code{all.x = TRUE} gives a \emph{left (outer)
@@ -95,10 +95,10 @@ merge(x, y, \dots)
 \note{
   This is intended to work with data frames with vector-like columns:
   some aspects work with data frames containing matrices, but not all.
-  
+
   Currently long vectors are not accepted for inputs, which are thus
-  restricted to less than 2^31 rows, and that restriction
-  also applies to the result.
+  restricted to less than 2^31 rows. That restriction also applies to
+  the result for 32-bit platforms.
 }
 
 \value{
diff --git a/src/library/base/man/message.Rd b/src/library/base/man/message.Rd
index f8b74c5..1c8026b 100644
--- a/src/library/base/man/message.Rd
+++ b/src/library/base/man/message.Rd
@@ -1,5 +1,5 @@
 % File src/library/base/man/message.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2011 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/base/man/missing.Rd b/src/library/base/man/missing.Rd
index e7f1371..66e395b 100644
--- a/src/library/base/man/missing.Rd
+++ b/src/library/base/man/missing.Rd
@@ -1,5 +1,5 @@
 % File src/library/base/man/missing.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2009 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/base/man/mode.Rd b/src/library/base/man/mode.Rd
index dfdec4a..2a9803e 100644
--- a/src/library/base/man/mode.Rd
+++ b/src/library/base/man/mode.Rd
@@ -1,5 +1,5 @@
 % File src/library/base/man/mode.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2007 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/base/man/name.Rd b/src/library/base/man/name.Rd
index b677346..cff343e 100644
--- a/src/library/base/man/name.Rd
+++ b/src/library/base/man/name.Rd
@@ -1,11 +1,11 @@
 % File src/library/base/man/name.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2007 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2015 R Core Team
 % Distributed under GPL 2 or later
 
 \name{name}
 \alias{name}
-%\alias{symbol} use for plotmath as from R 2.6.0
+\concept{symbol}%\alias{symbol} use for plotmath as from R 2.6.0
 \alias{is.symbol}
 \alias{as.symbol}
 \alias{as.name}
diff --git a/src/library/base/man/names.Rd b/src/library/base/man/names.Rd
index ae74cc2..96cfde2 100644
--- a/src/library/base/man/names.Rd
+++ b/src/library/base/man/names.Rd
@@ -1,6 +1,6 @@
 % File src/library/base/man/names.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2010 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2015 R Core Team
 % Distributed under GPL 2 or later
 
 \name{names}
@@ -21,21 +21,32 @@ names(x) <- value
   \item{value}{a character vector of up to the same length as \code{x}, or
     \code{NULL}.}
 }
+
 \value{
   For \code{names}, \code{NULL} or a character vector of the same length
   as \code{x}.  (\code{NULL} is given if the object has no names,
-  including for objects of types which cannot have names.)
+  including for objects of types which cannot have names.)  For an
+  environment, the length is the number of objects in the environment
+  but the order of the names is arbitrary.
 
   For \code{names<-}, the updated object.  (Note that the value of
   \code{names(x) <- value} is that of the assignment, \code{value}, not
   the return value from the left-hand side.)
 }
+
 \details{
   \code{names} is a generic accessor function, and \code{names<-} is a
   generic replacement function.  The default methods get and set
   the \code{"names"} attribute of a vector (including a list) or
   pairlist.
 
+  For an \code{\link{environment}} \code{env}, \code{names(env)} gives
+  the names of the corresponding list, i.e.,
+  \code{names(as.list(env, all.names = TRUE))} which are also given by
+  \code{\link{ls}(env, all.names = TRUE, sorted = FALSE)}.  If the
+  environment is used as a hash table, \code{names(env)} are its
+  \dQuote{keys}.
+
   If \code{value} is shorter than \code{x}, it is extended by character
   \code{NA}s to the length of \code{x}.
 
@@ -92,5 +103,11 @@ names(z)
 ## assign just one name
 names(z)[2] <- "b"
 z
+
+\dontshow{## "show" the equivalence claimed above:
+  for(e in c(baseenv(), globalenv()))
+  stopifnot(identical(names(e), ls(e, all.names=TRUE, sorted=FALSE)),
+            identical(names(e), names(as.list(e, all.names=TRUE))))
+}
 }
 \keyword{attribute}
diff --git a/src/library/base/man/nargs.Rd b/src/library/base/man/nargs.Rd
index 12bd0c3..c344b78 100644
--- a/src/library/base/man/nargs.Rd
+++ b/src/library/base/man/nargs.Rd
@@ -1,5 +1,5 @@
 % File src/library/base/man/nargs.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2007 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/base/man/nchar.Rd b/src/library/base/man/nchar.Rd
index 7216235..b05dc9e 100644
--- a/src/library/base/man/nchar.Rd
+++ b/src/library/base/man/nchar.Rd
@@ -1,18 +1,16 @@
 % File src/library/base/man/nchar.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2014 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2016 R Core Team
 % Distributed under GPL 2 or later
 
-\newcommand{\sspace}{\ifelse{latex}{\out{~}}{ }}
-
 \name{nchar}
 \alias{nchar}
 \alias{nzchar}
 \title{Count the Number of Characters (or Bytes or Width)}
 \usage{
-nchar(x, type = "chars", allowNA = FALSE)
+nchar(x, type = "chars", allowNA = FALSE, keepNA = NA)
 
-nzchar(x)
+nzchar(x, keepNA = FALSE)
 }
 \description{
   \code{nchar} takes a character vector as an argument and
@@ -30,20 +28,28 @@ nzchar(x)
   \item{allowNA}{logical: should \code{NA} be returned for invalid
     multibyte strings or \code{"bytes"}-encoded strings (rather than
     throwing an error)?}
+  \item{keepNA}{logical: should \code{NA} be returned where ever
+  \code{x} is \code{\link{NA}}?  If false, \code{nchar()} returns
+  \code{2}, as that is the number of printing characters used when
+  strings are written to output, and \code{nzchar()} is \code{TRUE}.  The
+  default for \code{nchar()}, \code{NA}, means to use \code{keepNA = TRUE}
+  unless \code{type} is \code{"width"}.  Used to be (implicitly) hard
+  coded to \code{FALSE} in \R versions \eqn{\le}{<=} 3.2.0.}
 }
 \details{
   The \sQuote{size} of a character string can be measured in one of
-  three ways
+  three ways (corresponding to the \code{type} argument):
   \describe{
     \item{\code{bytes}}{The number of bytes needed to store the string
       (plus in C a final terminator which is not counted).}
     \item{\code{chars}}{The number of human-readable characters.}
-    \item{\code{width}}{The number of columns \code{cat} will use to
+    \item{\code{width}}{The number of columns \code{\link{cat}} will use to
       print the string in a monospaced font.  The same as \code{chars}
       if this cannot be calculated.}
   }
   These will often be the same, and almost always will be in single-byte
-  locales.  There will be differences between the first two with
+  locales (but note how \code{type} determines the default for
+  \code{keepNA}).  There will be differences between the first two with
   multibyte character sequences, e.g.\sspace{}in UTF-8 locales.
 
   The internal equivalent of the default method of
@@ -52,14 +58,20 @@ nzchar(x)
   passing them through \code{\link{deparse}} first will be required.
 }
 \value{
-  For \code{nchar}, an integer vector giving the sizes of each element,
-  currently always \code{2} for missing values (for \code{NA}).
+  For \code{nchar}, an integer vector giving the sizes of each element.
+  For missing values (i.e., \code{NA}, i.e., \code{\link{NA_character_}}),
+  \code{nchar()} returns \code{\link{NA_integer_}} if \code{keepNA} is
+  true, and \code{2}, the number of printing characters, if false.
+
+  \code{type = "width"} gives (an approximation to) the number of
+  columns used in printing each element in a terminal font, taking into
+  account double-width, zero-width and \sQuote{composing} characters.
 
-  If \code{allowNA = TRUE} and an element is invalid in a multi-byte
-  character set such as UTF-8, its number of characters and the width
-  will be \code{NA}.  Otherwise the number of characters will be
-  non-negative, so \code{!is.na(nchar(x, "chars", TRUE))} is a test of
-  validity.
+  If \code{allowNA = TRUE} and an element is detected as invalid in a
+  multi-byte character set such as UTF-8, its number of characters and
+  the width will be \code{NA}.  Otherwise the number of characters will
+  be non-negative, so \code{!is.na(nchar(x, "chars", TRUE))} is a test
+  of validity.
 
   A character string marked with \code{"bytes"} encoding (see
   \code{\link{Encoding}}) has a number of bytes, but neither a known
@@ -69,13 +81,14 @@ nzchar(x)
   Names, dims and dimnames are copied from the input.
 
   For \code{nzchar}, a logical vector of the same length as \code{x},
-  true if and only if the element has non-zero length.
+  true if and only if the element has non-zero length; if the element is
+  \code{NA}, \code{nzchar()} is true when \code{keepNA} is false, as by
+  default, and \code{NA} otherwise.
 }
 \note{
   This does \strong{not} by default give the number of characters that
   will be used to \code{print()} the string.  Use
-  \code{\link{encodeString}} to find the characters used to print the
-  string.
+  \code{\link{encodeString}} to find that.
 #ifdef windows
   This is particularly important on Windows when \samp{\\uxxxx}
   sequences have been used to enter Unicode characters not representable
@@ -89,11 +102,39 @@ nzchar(x)
   characters and widths will be computed in UTF-8, even though printing
   may use escapes such as \samp{<U+2642>} in a non-UTF-8 locale.
 #endif
+
+  The concept of \sQuote{width} is a slippery one even in a monospaced
+  font. Some human languages have the concept of \emph{combining}
+  characters, in which two or more characters are rendered together: an
+  example would be \code{"y\u306"}, which is two characters of width
+  one: combining characters are given width zero, and there are other
+  zero-width characters such as the zero-width space \code{"\u200b"}.
+
+  Some East Asian languages have \sQuote{wide} characters, ideographs
+  which are conventionally printed across two columns when mixed with
+  ASCII and other \sQuote{narrow} characters in those languages.  The
+  problem is that whether a computer prints wide characters over two or
+  one columns depends on the font, with it not being uncommon to use two
+  columns in a font intended for East Asian users and a single column in
+  a \sQuote{Western} font.  Unicode has encodings for \sQuote{fullwidth}
+  versions of ASCII characters and \sQuote{halfwidth} versions of
+  Katakana (Japanese) and Hangul (Korean) characters.  Then there is the
+  \sQuote{East Asian Ambiguous class} (Greek, Cyrillic, signs, some
+  accented Latin chars, etc), for which the historical practice was to
+  use two columns in East Asia and one elsewhere.  The width quoted by
+  \code{nchar} for characters in that class (and some others) depends on
+  the locale, being one except in some East Asian locales on some OSes
+  (notably Windows).
+
+  Control characters are given width zero.
 }
 \references{
   Becker, R. A., Chambers, J. M. and Wilks, A. R. (1988)
   \emph{The New S Language}.
   Wadsworth & Brooks/Cole.
+
+  Unicode Standard Annex #11: \emph{East Asian Width.}
+  \url{http://www.unicode.org/reports/tr11/}
 }
 \seealso{
   \code{\link{strwidth}} giving width of strings for plotting;
@@ -105,6 +146,29 @@ nchar(x)
 # 5  6  6  1 15
 
 nchar(deparse(mean))
-# 18 17
+# 18 17  <-- unless mean differs from base::mean
+
+x[3] <- NA; x
+nchar(x, keepNA= TRUE) #  5  6 NA  1 15
+nchar(x, keepNA=FALSE) #  5  6  2  1 15
+stopifnot(identical(nchar(x     ), nchar(x, keepNA= TRUE)),
+          identical(nchar(x, "w"), nchar(x, keepNA=FALSE)),
+          identical(is.na(x), is.na(nchar(x))))
+
+##' nchar() for all three types :
+nchars <- function(x, ...)
+   vapply(c("chars", "bytes", "width"),
+          function(tp) nchar(x, tp, ...), integer(length(x)))
+
+nchars("\\u200b") # in R versions (>= 2015-09-xx):
+## chars bytes width
+##     1     3     0
+
+data.frame(x, nchars(x)) ## all three types : same unless for NA
+## force the same by forcing 'keepNA':
+(ncT <- nchars(x, keepNA = TRUE)) ## .... NA NA NA ....
+(ncF <- nchars(x, keepNA = FALSE))## ....  2  2  2 ....
+stopifnot(apply(ncT, 1, function(.) length(unique(.))) == 1,
+          apply(ncF, 1, function(.) length(unique(.))) == 1)
 }
 \keyword{character}
diff --git a/src/library/base/man/nlevels.Rd b/src/library/base/man/nlevels.Rd
index 7df8c5a..4f6455e 100644
--- a/src/library/base/man/nlevels.Rd
+++ b/src/library/base/man/nlevels.Rd
@@ -1,5 +1,5 @@
 % File src/library/base/man/nlevels.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2007 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/base/man/noquote.Rd b/src/library/base/man/noquote.Rd
index ec63475..0a8b988 100644
--- a/src/library/base/man/noquote.Rd
+++ b/src/library/base/man/noquote.Rd
@@ -1,5 +1,5 @@
 % File src/library/base/man/noquote.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2011 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/base/man/norm.Rd b/src/library/base/man/norm.Rd
index b6ed223..e60db56 100644
--- a/src/library/base/man/norm.Rd
+++ b/src/library/base/man/norm.Rd
@@ -1,16 +1,14 @@
 % File src/library/base/man/norm.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 2010--2012 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 2010--2015 R Core Team
 % Copyright 2010--2012 The R Foundation
 % Distributed under GPL 2 or later
 
-\newcommand{\CRANpkg}{\href{http://CRAN.R-project.org/package=#1}{\pkg{#1}}}
-
 \name{norm}
 \alias{norm}
 \title{Compute the Norm of a Matrix}
 \description{
-  Computes a matrix norm of \code{x} using Lapack.  The norm can be
+  Computes a matrix norm of \code{x} using LAPACK.  The norm can be
   the one (\code{"O"}) norm, the infinity (\code{"I"}) norm, the
   Frobenius (\code{"F"}) norm, the maximum modulus (\code{"M"}) among
   elements of a matrix, or the \dQuote{spectral} or \code{"2"}-norm, as
@@ -46,6 +44,10 @@ norm(x, type = c("O", "I", "F", "M", "2"))
 
   Note that the 1-, Inf- and \code{"M"} norm is faster to calculate than
   the Frobenius one.
+
+  Unsuccessful results from the underlying LAPACK code will result in an
+  error giving a positive error code: these can only be interpreted by
+  detailed study of the FORTRAN code.
 }
 \value{
   The matrix norm, a non-negative number.
diff --git a/src/library/base/man/normalizePath.Rd b/src/library/base/man/normalizePath.Rd
index 93dd627..cea46bb 100644
--- a/src/library/base/man/normalizePath.Rd
+++ b/src/library/base/man/normalizePath.Rd
@@ -1,6 +1,6 @@
 % File src/library/utils/man/normalizePath.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2014 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2016 R Core Team
 % Distributed under GPL 2 or later
 
 \name{normalizePath}
@@ -44,6 +44,12 @@ normalizePath(path, winslash = "\\\\", mustWork = NA)
   messages.
 }
 
+\note{
+  The canonical form of paths may not be what you expect.  For example,
+  on macOS absolute paths such as \file{/tmp} and \file{/var} are
+  symbolic links.
+}
+
 \value{
   A character vector.
 
@@ -73,7 +79,7 @@ normalizePath(path, winslash = "\\\\", mustWork = NA)
 }
 #endif
 
-\examples{\donttest{ # random tempdir
+\examples{\donttest{# random tempdir
 cat(normalizePath(c(R.home(), tempdir())), sep = "\n")
 }}
 \keyword{ utilities }
diff --git a/src/library/base/man/notyet.Rd b/src/library/base/man/notyet.Rd
index aaa3253..514f965 100644
--- a/src/library/base/man/notyet.Rd
+++ b/src/library/base/man/notyet.Rd
@@ -1,5 +1,5 @@
 % File src/library/base/man/notyet.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2013 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/base/man/nrow.Rd b/src/library/base/man/nrow.Rd
index 7a911ff..d2e4bb9 100644
--- a/src/library/base/man/nrow.Rd
+++ b/src/library/base/man/nrow.Rd
@@ -1,5 +1,5 @@
 % File src/library/base/man/nrow.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2007 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/base/man/ns-dblcolon.Rd b/src/library/base/man/ns-dblcolon.Rd
index 60b81b2..0738575 100644
--- a/src/library/base/man/ns-dblcolon.Rd
+++ b/src/library/base/man/ns-dblcolon.Rd
@@ -1,6 +1,6 @@
 % File src/library/base/man/ns-dblcolon.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2013 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2015 R Core Team
 % Distributed under GPL 2 or later
 
 \name{ns-dblcolon}
@@ -8,7 +8,8 @@
 \alias{::}
 \alias{:::}
 \description{
-  Accessing exported and internal variables in a namespace.
+  Accessing exported and internal variables, i.e.\sspace{}\R objects
+  (including lazy loaded data sets) in a namespace.
 }
 \usage{
 pkg::name
@@ -19,11 +20,11 @@ pkg:::name
   \item{name}{variable name: symbol or literal character string.}
 }
 \details{
-  For a package \pkg{pkg}, \code{pkg::name} returns the value of
-  the exported variable \code{name} in namespace \code{pkg}, whereas
+  For a package \pkg{pkg}, \code{pkg::name} returns the value of the
+  exported variable \code{name} in namespace \code{pkg}, whereas
   \code{pkg:::name} returns the value of the internal variable
-  \code{name}. The namespace will be loaded if it was not loaded
-  before the call, but the package will not be attached to the
+  \code{name}.  The package namespace will be loaded if it was not
+  loaded before the call, but the package will not be attached to the
   search path.
 
   Specifying a variable or package that does not exist is an error.
@@ -39,11 +40,13 @@ pkg:::name
   It is typically a design mistake to use \code{:::}
   in your code since the corresponding object has probably been kept
   internal for a good reason.  Consider contacting the package
-  maintainer if you feel the need to access the object for anything but
-  mere inspection.
+  \code{\link{maintainer}} if you feel the need to access the object for
+  anything but mere inspection.
 }
 \seealso{
   \code{\link{get}} to access an object masked by another of the same name.
+  \code{\link{loadNamespace}}, \code{\link{asNamespace}} for more about
+  namespaces.
 }
 \examples{
 base::log
diff --git a/src/library/base/man/ns-hooks.Rd b/src/library/base/man/ns-hooks.Rd
index 2b45ed2..fc568c6 100644
--- a/src/library/base/man/ns-hooks.Rd
+++ b/src/library/base/man/ns-hooks.Rd
@@ -1,6 +1,6 @@
 % File src/library/base/man/ns-hooks.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2013 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2017 R Core Team
 % Distributed under GPL 2 or later
 
 \name{ns-hooks}
@@ -38,9 +38,9 @@
   looked for and if found is called (with two unnamed arguments) before
   the package environment is sealed.
 
-  If a function \code{.onDetach} (as from \R 3.0.0) is in the namespace
-  or \code{.Last.lib} is exported from the package, it will be called
-  (with a single argument) when the package is detached.  Beware that it
+  If a function \code{.onDetach} is in the namespace or \code{.Last.lib}
+  is exported from the package, it will be called (with a single
+  argument) when the package is \code{\link{detach}}ed.  Beware that it
   might be called if \code{.onAttach} has failed, so it should be
   written defensively.  (It is called within \code{\link{tryCatch}}, so
   errors will not stop the package being detached.)
@@ -54,7 +54,7 @@
   Objects in the current package will be visible (unless this is
   circumvented), but objects from other packages should be imported or
   the double colon operator should be used.
-  
+
   \code{.onLoad}, \code{.onUnload}, \code{.onAttach} and
   \code{.onDetach} are looked for as internal objects in the namespace
   and should not be exported (whereas \code{.Last.lib} should be).
@@ -105,11 +105,12 @@
   \code{\link{library.dynam.unload}}) in \code{.Last.lib} nor
   \code{.onDetach}, only in \code{.onUnload}.
 }
-
 \seealso{
   \code{\link{setHook}} shows how users can set hooks on the same events, and
   lists the sequence of events involving all of the hooks.
 
   \code{\link{reg.finalizer}} for hooks to be run at the end of a session.
+
+  \code{\link{loadNamespace}} for more about namespaces.
 }
 \keyword{utilities}
diff --git a/src/library/base/man/ns-internal.Rd b/src/library/base/man/ns-internal.Rd
index 94c97e9..d09f770 100644
--- a/src/library/base/man/ns-internal.Rd
+++ b/src/library/base/man/ns-internal.Rd
@@ -1,6 +1,6 @@
 % File src/library/base/man/ns-internal.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2013 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2015 R Core Team
 % Distributed under GPL 2 or later
 
 \name{ns-internals}
@@ -8,6 +8,7 @@
 
 \alias{asNamespace}
 \alias{getNamespaceInfo}
+\alias{.getNamespaceInfo}
 \alias{importIntoEnv}
 \alias{isBaseNamespace}
 \alias{isNamespace}
@@ -27,17 +28,20 @@
 \alias{.knownS3Generics}
 \alias{loadingNamespaceInfo}
 \alias{.getNamespace}
+\alias{.getNamespaceInfo}
 \alias{..getNamespace}
 \usage{
 asNamespace(ns, base.OK = TRUE)
-getNamespaceInfo(ns, which)
+getNamespaceInfo (ns, which)
+.getNamespaceInfo(ns, which)
 importIntoEnv(impenv, impnames, expenv, expnames)
 isBaseNamespace(ns)
 isNamespace(ns)
 namespaceExport(ns, vars)
-namespaceImport(self, \dots, from = NULL)
+namespaceImport(self, \dots, from = NULL, except = character(0L))
 namespaceImportFrom(self, ns, vars, generics, packages,
-                    from = "non-package environment")
+                    from = "non-package environment",
+                    except = character(0L))
 namespaceImportClasses(self, ns, vars, from = NULL)
 namespaceImportMethods(self, ns, vars, from = NULL)
 packageHasNamespace(package, package.lib)
@@ -74,16 +78,48 @@ loadingNamespaceInfo()
   \item{\dots}{character arguments.}
   \item{metaname}{the methods table name.}
   \item{name}{symbol: name of namespace}
+  \item{except}{character vector naming symbols to exclude from the
+    import, particularly useful when \code{vars} is missing.
+  }
 }
 \description{
-  Internal namespace support functions.  Not intended to be called directly.
+  Internal namespace support functions.  Not intended to be called
+  directly, and only visible because of the special nature of the
+  \pkg{base} namespace.
 }
 \details{
   \code{packageHasNamespace} does not indicate if the package has a
-  namespace, rather if it has a \file{NAMESPACE} file, which \code{base}
-  and many older packages do not.  But then you are not intended to be
-  using it \dots.
+  namespace (all now do), rather if it has a \file{NAMESPACE} file,
+  which \pkg{base} and some legacy packages do not.  But then you are
+  not intended to be using it \dots.
 }
+\seealso{
+  \code{\link{loadNamespace}} or \code{\link{getNamespace}} are somewhat
+  higher level namespace related functions.
+}
+\author{
+  Luke Tierney and other members of the R Core Team.
+}
+\examples{
+nsName <- "stats"
+(ns <- asNamespace(nsName)) # <environment: namespace:stats>
+
+## Inverse function of asNamespace() :
+environmentName(asNamespace("stats")) # "stats"
+environmentName(asNamespace("base"))  # "base"
+getNamespaceInfo(ns, "spec")[["name"]] ## -> "stats"
+\dontshow{stopifnot(identical(nsName,
+                      getNamespaceInfo(ns, "spec")[["name"]]))}
+
+## Only for for the daring ones, trying to get into the bowels :
 
+lsNamespaceInfo <- function(ns, ...) {
+    ns <- asNamespace(ns, base.OK = FALSE)
+    ls(..., envir = get(".__NAMESPACE__.", envir = ns, inherits = FALSE))
+}
+allinfoNS <- function(ns) sapply(lsNamespaceInfo(ns), getNamespaceInfo, ns=ns)
+
+utils::str(allinfoNS("stats"))
+utils::str(allinfoNS("stats4"))
+}
 \keyword{internal}
-\author{Luke Tierney}
diff --git a/src/library/base/man/ns-load.Rd b/src/library/base/man/ns-load.Rd
index 32bb589..32516ec 100644
--- a/src/library/base/man/ns-load.Rd
+++ b/src/library/base/man/ns-load.Rd
@@ -1,16 +1,18 @@
 % File src/library/base/man/ns-load.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2012 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2017 R Core Team
 % Distributed under GPL 2 or later
 
 \name{ns-load}
 \title{Loading and Unloading Name Spaces}
-
+%% Currently considered "main" help page on namespaces
+%%                       --------------- -> \references{}, \seealso{}
 \alias{attachNamespace}
 \alias{loadNamespace}
 \alias{requireNamespace}
 \alias{loadedNamespaces}
 \alias{unloadNamespace}
+\alias{isNamespaceLoaded}
 
 \description{
   Functions to load and unload name spaces.
@@ -23,6 +25,7 @@ loadNamespace(package, lib.loc = NULL,
 requireNamespace(package, ..., quietly = FALSE)
 loadedNamespaces()
 unloadNamespace(ns)
+isNamespaceLoaded(name)
 }
 \arguments{
   \item{ns}{string or name space object.}
@@ -38,11 +41,13 @@ unloadNamespace(ns)
   \item{versionCheck}{\code{NULL} or a version specification (a list
     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"}.}
   \item{\dots}{further arguments to be passed to \code{loadNamespace}.}
 }
 \details{
   The functions \code{loadNamespace} and \code{attachNamespace} are
-  usually called implicitly when \code{library} is used to load a name
+  usually called implicitly when \code{\link{library}} is used to load a name
   space and any imports needed.  However it may be useful at times to
   call these functions directly.
 
@@ -56,6 +61,9 @@ unloadNamespace(ns)
   the name space (it should not be exported).  Partial loading is used
   to support installation with lazy-loading.
 
+  Optionally the package licence is checked during loading: see section
+  \sQuote{Licenses} in the help for \code{\link{library}}.
+
   \code{loadNamespace} does not attach the name space it loads to the
   search path.  \code{attachNamespace} can be used to attach a frame
   containing the exported values of a name space to the search path (but
@@ -69,6 +77,9 @@ unloadNamespace(ns)
   \code{loadedNamespaces} returns a character vector of the names of
   the loaded name spaces.
 
+  \code{isNamespaceLoaded(pkg)} is equivalent to but more efficient than
+  \code{pkg \%in\% loadedNamespaces()}.
+
   \code{unloadNamespace} can be used to attempt to force a name space to
   be unloaded.  If the name space is attached, it is first
   \code{\link{detach}}ed, thereby running a \code{\link{.onDetach}} or
@@ -91,10 +102,35 @@ unloadNamespace(ns)
   \code{requireNamespace} returns \code{TRUE} if it succeeds or
   \code{FALSE}.
 
-  \code{loadedNamespaces} returns a character vector.
+  \code{loadedNamespaces} returns a \code{\link{character}} vector.
 
   \code{unloadNamespace} returns \code{NULL}, invisibly.
 }
+\seealso{
+  \code{\link{getNamespace}}, \code{\link{asNamespace}},
+  \code{\link{topenv}}, \code{\link{.onLoad}} (etc);
+  further \code{\link{environment}}.
+}
+\references{
+  The \sQuote{Writing R Extensions} manual, section \dQuote{Package namespaces}.
+}
+\author{Luke Tierney and R-core}
+\examples{
+ (lns <- loadedNamespaces())
+ statL <- isNamespaceLoaded("stats")% checks work also when it is *not* loaded
+ stopifnot( identical(statL, "stats" \%in\% lns) )
+
+ ## The string "foo" and the symbol 'foo' can be used interchangably here:
+ stopifnot( identical(isNamespaceLoaded(  "foo"   ), FALSE),
+            identical(isNamespaceLoaded(quote(foo)), FALSE),
+            identical(isNamespaceLoaded(quote(stats)), statL))
+
+hasS <- isNamespaceLoaded("splines") # (to restore if needed)
+Sns <- asNamespace("splines") # loads it if not already
+stopifnot(   isNamespaceLoaded("splines"))
+unloadNamespace(Sns) # unloading the NS 'object'
+stopifnot( ! isNamespaceLoaded("splines"))
+if (hasS) loadNamespace("splines") # (restoring previous state)
+}
 \keyword{data}
 \keyword{utilities}
-\author{Luke Tierney and R-core}
diff --git a/src/library/base/man/ns-reflect.Rd b/src/library/base/man/ns-reflect.Rd
index f0d8293..9c29718 100644
--- a/src/library/base/man/ns-reflect.Rd
+++ b/src/library/base/man/ns-reflect.Rd
@@ -1,6 +1,6 @@
 % File src/library/base/man/ns-reflect.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2007 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2007, 2015 R Core Team
 % Distributed under GPL 2 or later
 
 \name{ns-reflect.Rd}
@@ -28,7 +28,10 @@ getNamespaceVersion(ns)
   \item{name}{string or name.}
 }
 \description{
-  Functions to support reflection on namespace objects.
+  Internal functions to support reflection on namespace objects.
+}
+\seealso{
+  \code{\link{loadNamespace}} for more about namespaces.
 }
 \details{
   \code{getExportedValue} returns the value of the exported variable
diff --git a/src/library/base/man/ns-topenv.Rd b/src/library/base/man/ns-topenv.Rd
index 17bd7a1..b76fb84 100644
--- a/src/library/base/man/ns-topenv.Rd
+++ b/src/library/base/man/ns-topenv.Rd
@@ -1,13 +1,14 @@
 % File src/library/base/man/ns-topenv.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2011 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2015 R Core Team
 % Distributed under GPL 2 or later
 
 \name{ns-topenv}
 \title{Top Level Environment}
 \alias{topenv}
 \description{
-  Finding the top level environment.
+  Finding the top level \code{\link{environment}} from an environment
+  \code{envir} and its enclosing environments.
 }
 \usage{
 topenv(envir = parent.frame(),
@@ -23,13 +24,29 @@ topenv(envir = parent.frame(),
       Supplying the argument as \code{NULL} means it will never match.}
 }
 \details{
-  \code{topenv} returns the first top level environment found when
-  searching \code{envir} and its enclosing environments.  An environment is
-  considered top level if it is the internal environment of a namespace,
-  a package environment in the search path, or \code{.GlobalEnv}.
+  \code{topenv} returns the first top level \code{\link{environment}}
+  found when searching \code{envir} and its enclosing environments.  An
+  environment is considered top level if it is the internal environment
+  of a namespace, a package environment in the \code{\link{search}}
+  path, or \code{\link{.GlobalEnv}} .
+}
+\seealso{
+  \code{\link{environment}}, notably \code{parent.env()} on
+  \dQuote{enclosing environments};
+  \code{\link{loadNamespace}} for more on namespaces.
 }
 \examples{
 topenv(.GlobalEnv)
-topenv(new.env())
+topenv(new.env()) # also global env
+topenv(environment(ls))# namespace:base
+topenv(environment(lm))# namespace:stats
+\dontshow{
+stopifnot(identical(.GlobalEnv,        topenv(new.env())),
+          identical(.GlobalEnv,        topenv(.GlobalEnv)),
+          identical(baseenv(),         topenv(baseenv())),
+          identical(.BaseNamespaceEnv, topenv(.BaseNamespaceEnv)),
+          identical(topenv(environment(ls)), asNamespace("base")),
+          identical(topenv(environment(lm)), asNamespace("stats")))
+}
 }
 \keyword{programming}
diff --git a/src/library/base/man/numeric.Rd b/src/library/base/man/numeric.Rd
index 3ae8936..4e5f336 100644
--- a/src/library/base/man/numeric.Rd
+++ b/src/library/base/man/numeric.Rd
@@ -1,6 +1,6 @@
 % File src/library/base/man/numeric.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2013 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2016 R Core Team
 % Distributed under GPL 2 or later
 
 \name{numeric}
@@ -57,6 +57,13 @@ is.numeric(x)
   \code{is.integer(x) || is.double(x)}, or
   \code{(mode(x) == "numeric") && !is.factor(x)}.
 }
+\section{Warning}{
+  If \code{x} is a \code{\link{factor}}, \code{as.numeric} will return
+  the underlying numeric (integer) representation, which is often
+  meaningless as it may not correspond to the \code{factor}
+  \code{\link{levels}}, see the \sQuote{Warning} section in
+  \code{\link{factor}} (and the 2nd example below).
+}
 \section{S4 methods}{
   \code{as.numeric} and \code{is.numeric} are internally S4 generic and
   so methods can be set for them \emph{via} \code{setMethod}.
@@ -90,7 +97,13 @@ is.numeric(x)
 }
 \examples{
 as.numeric(c("-.1"," 2.7 ","B")) # (-0.1, 2.7, NA)  +  warning
-as.numeric(factor(5:10))
+
+as.numeric(factor(5:10)) # not what you'd expect
+f <- factor(1:5)
+## what you typically meant and want:
+as.numeric(as.character(f))
+## the same, considerably (for long factors) more efficient:
+as.numeric(levels(f))[f]
 }
 \keyword{classes}
 \keyword{attribute}
diff --git a/src/library/base/man/numeric_version.Rd b/src/library/base/man/numeric_version.Rd
index 4a511c9..1f97c02 100644
--- a/src/library/base/man/numeric_version.Rd
+++ b/src/library/base/man/numeric_version.Rd
@@ -1,6 +1,6 @@
 % File src/library/base/man/numeric_version.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2013 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2014 R Core Team
 % Distributed under GPL 2 or later
 
 \name{numeric_version}
@@ -15,6 +15,7 @@
 \alias{getRversion}
 % Methods.
 \alias{[.numeric_version}
+\alias{[<-.numeric_version}
 \alias{[[.numeric_version}
 \alias{[[<-.numeric_version}
 \alias{Ops.numeric_version}
@@ -27,6 +28,7 @@
 \alias{duplicated.numeric_version}
 \alias{format.numeric_version}
 \alias{is.na.numeric_version}
+\alias{is.na<-.numeric_version}
 \alias{print.numeric_version}
 \alias{rep.numeric_version}
 %\alias{sort.numeric_version}
diff --git a/src/library/base/man/octmode.Rd b/src/library/base/man/octmode.Rd
index 8779c94..cec8a1f 100644
--- a/src/library/base/man/octmode.Rd
+++ b/src/library/base/man/octmode.Rd
@@ -1,5 +1,5 @@
 % File src/library/base/man/octmode.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2011 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/base/man/on.exit.Rd b/src/library/base/man/on.exit.Rd
index dff4521..d3efe68 100644
--- a/src/library/base/man/on.exit.Rd
+++ b/src/library/base/man/on.exit.Rd
@@ -1,5 +1,5 @@
 % File src/library/base/man/on.exit.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2014 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/base/man/options.Rd b/src/library/base/man/options.Rd
index 42ff613..1564e3d 100644
--- a/src/library/base/man/options.Rd
+++ b/src/library/base/man/options.Rd
@@ -1,10 +1,8 @@
 % File src/library/base/man/options.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2014 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2017 R Core Team
 % Distributed under GPL 2 or later
 
-\newcommand{\sspace}{\ifelse{latex}{\out{~}}{ }}
-
 \name{options}
 \alias{options}
 \alias{.Options}
@@ -34,12 +32,12 @@ getOption(x, default = NULL)
 \arguments{
   \item{\dots}{any options can be defined, using \code{name = value}.
     However, only the ones below are used in base \R.
-    
+
     Options can also be passed by giving a single unnamed argument which
     is a named list.
   }
   \item{x}{a character string holding an option name.}
-  
+
   \item{default}{if the specified option is not set in the options list,
     this value is returned.  This facilitates retrieving an option and
     checking whether it is set and setting it separately if not.}
@@ -76,11 +74,11 @@ getOption(x, default = NULL)
       used by \code{\link{plot.lm}}.}
 
     \item{\code{browserNLdisabled}:}{logical: whether newline is
-      disabled as a synonym for \code{"n"} is the browser.}
+      disabled as a synonym for \code{"n"} in the browser.}
 
     \item{\code{checkPackageLicense}:}{logical, not set by default.  If
-      true, \code{\link{library}} asks a user to accept any non-standard
-      license at first use.
+      true, \code{\link{loadNamespace}} asks a user to accept any
+      non-standard license at first load of the package.
     }
 
     \item{\code{check.bounds}:}{logical, defaulting to \code{FALSE}.  If
@@ -104,10 +102,9 @@ getOption(x, default = NULL)
       environment variable \env{R_DEFAULT_PACKAGES}, or if that is unset
       to \code{c("datasets", "utils", "grDevices", "graphics", "stats",
         "methods")}.  (Set \env{R_DEFAULT_PACKAGES} to \code{NULL} or
-      a comma-separated list of package names.)   A call to
-      \code{options} should be in your \file{.Rprofile} file to ensure
-      that the change takes effect before the base package is
-      initialized (see \code{\link{Startup}}).}
+      a comma-separated list of package names.)  It will not work to set
+      this in a \file{.Rprofile} file, as its value is consulted before
+      that file is read.}
 
     \item{\code{deparse.cutoff}:}{integer value controlling the
       printing of language constructs which are \code{\link{deparse}}d.
@@ -119,9 +116,9 @@ getOption(x, default = NULL)
       and upon entry to a function whose debugging flag is set.
       Initially unset, and only used if set to a positive integer.}
 
-    \item{\code{digits}:}{controls the number of digits to print when
-      printing numeric values.  It is a suggestion only.  Valid values
-      are 1\dots{}22 with default 7.  See the note in
+    \item{\code{digits}:}{controls the number of significant digits to
+      print when printing numeric values.  It is a suggestion only.
+      Valid values are 1\dots{}22 with default 7.  See the note in
       \code{\link{print.default}} about values greater than 15.}
 
     \item{\code{digits.secs}:}{controls the maximum number of digits to
@@ -133,8 +130,9 @@ getOption(x, default = NULL)
 
     \item{\code{download.file.method}:}{Method to be used for
       \code{download.file}.  Currently download methods
-      \code{"internal"}, \code{"wget"} and \code{"lynx"} are available.
-      There is no default for this option, when \code{method = "auto"}
+      \code{"internal"}, \code{"wininet"} (Windows only),
+      \code{"libcurl"}, \code{"wget"} and \code{"curl"} are available.
+      If not set, \code{method = "auto"}
       is chosen: see \code{\link{download.file}}.}
 
     \item{\code{echo}:}{logical.  Only used in non-interactive mode,
@@ -153,9 +151,9 @@ getOption(x, default = NULL)
       value is \code{NULL}: see \code{\link{stop}} for the behaviour in
       that case.  The functions \code{\link{dump.frames}} and
       \code{\link{recover}} provide alternatives that allow post-mortem
-      debugging.  Note that these need to specified as e.g.
-      \code{options(error = utils::recover)} in startup files such as
-      \file{\link{.Rprofile}}.}
+      debugging.  Note that these need to specified as
+      e.g.\sspace{}\code{options(error = utils::recover)} in startup
+      files such as \file{\link{.Rprofile}}.}
 
     \item{\code{expressions}:}{sets a limit on the number of nested
       expressions that will be evaluated.  Valid values are
@@ -167,6 +165,10 @@ getOption(x, default = NULL)
       limit is reached an error is thrown.  The current number under
       evaluation can be found by calling \code{\link{Cstack_info}}.}
 
+    \item{\code{interrupt}:}{a function taking no arguments to be called
+      on a user interrupt if the interrupt condition is not otherwise
+      handled.}
+
     \item{\code{keep.source}:}{When \code{TRUE}, the source code for
       functions (newly defined or loaded) is stored internally
       allowing comments to be kept in the right places.  Retrieve the
@@ -178,8 +180,42 @@ getOption(x, default = NULL)
 
     %% used by tools::makeLazyLoading
     \item{\code{keep.source.pkgs}:}{As for \code{keep.source}, used only
-    when packages are installed.  Defaults to \code{FALSE} unless the
-    environment variable \env{R_KEEP_PKG_SOURCE} is set to \code{yes}.}
+      when packages are installed.  Defaults to \code{FALSE} unless the
+      environment variable \env{R_KEEP_PKG_SOURCE} is set to \code{yes}.}
+
+    \item{\code{matprod}:}{a string selecting the implementation of
+      the matrix products \code{\link{\%*\%}}, \code{\link{crossprod}}, and
+      \code{\link{tcrossprod}} for double and complex vectors:
+      \describe{
+	\item{\code{"internal"}}{uses an unoptimized 3-loop algorithm
+	  which correctly propagates \code{\link{NaN}} and
+	  \code{\link{Inf}} values and is consistent in precision with
+	  other summation algorithms inside \R like \code{\link{sum}} or
+	  \code{\link{colSums}} (which now means that it uses a \code{long
+	    double} accumulator for summation if available and enabled,
+	  see \code{\link{capabilities}}).}
+	\item{\code{"default"}}{uses BLAS to speed up computation, but
+	  to ensure correct propagation of \code{NaN} and \code{Inf}
+	  values it uses an unoptimized 3-loop algorithm for inputs that may
+	  contain \code{NaN} or \code{Inf} values.  When deemed
+	  beneficial for performance, \code{"default"} may call the
+	  3-loop algorithm unconditionally, i.e., without checking the
+	  input for NaN/Inf values.  The 3-loop algorithm uses (only) a
+	  \code{double} accumulator for summation, which is consistent
+	  with the reference BLAS implementation.}
+	\item{\code{"blas"}}{uses BLAS unconditionally without any
+	  checks and should be used with extreme caution.  BLAS
+	  libraries do not propagate \code{\link{NaN}} or
+	  \code{\link{Inf}} values correctly and for inputs with
+	  \code{NaN}/\code{Inf} values the results may be undefined.}
+	\item{\code{"default.simd"}}{is experimental and will likely be
+	  removed in future versions of \R.  It provides the same behavior
+	  as \code{"default"}, but the check whether the input contains
+	  NaN/Inf values is faster on some SIMD hardware.  On older
+	  systems it will run correctly, but may be much slower than
+	  \code{"default"}.}
+      }
+    }
 
     \item{\code{max.print}:}{integer, defaulting to \code{99999}.
       \code{\link{print}} or \code{\link{show}} methods can make use of
@@ -187,12 +223,13 @@ getOption(x, default = NULL)
       to something in the order of (and typically slightly less than)
       \code{max.print} \emph{entries}.}
 
-    \item{\code{OutDec}:}{character string containing a single-byte
+    \item{\code{OutDec}:}{character string containing a single
       character.  The preferred character to be used as the decimal
       point in output conversions, that is in printing, plotting,
       \code{\link{format}} and \code{\link{as.character}} but not when
       deparsing nor by \code{\link{sprintf}} nor \code{\link{formatC}}
-      (which are sometimes used prior to printing.}
+      (which are sometimes used prior to printing.)
+    }
 
     \item{\code{pager}:}{the command used for displaying text files by
       \code{\link{file.show}}.
@@ -224,7 +261,30 @@ getOption(x, default = NULL)
       \code{"a4"}, or \code{"letter"} in US and Canadian locales.
 #endif
     }
-
+    
+    \item{\code{PCRE_limit_recursion}:}{Logical: should
+      \code{\link{grep}(perl = TRUE)} and similar limit the maximal
+      recursion allowed when matching?  PCRE can be built not to use a
+      recursion stack (see \code{\link{pcre_config}}, but it is by
+      default with a recursion limit of 10000000 which potentially needs
+      a very large C stack: see the discussion at
+      \url{http://www.pcre.org/original/doc/html/pcrestack.html}.  If
+      true, the limit is reduced using \R's estimate of the C stack size
+      available (if known), otherwise 10000.  If \code{NA}, the limit is
+      imposed only if any input string has 1000 or more bytes.}
+       
+     \item{\code{PCRE_study}:}{Logical or integer: should
+      \code{\link{grep}(perl = TRUE)} and similar \sQuote{study} the
+      patterns?  Either logical or a numerical threshold for the minimum
+      number of strings to be matched for the pattern to be studied (the
+      default is \code{10})).  Missing values and negative numbers are
+      treated as false.}
+
+    \item{\code{PCRE_use_JIT}:}{Logical: should \code{\link{grep}(perl =
+	TRUE)}, \code{\link{strsplit}(perl = TRUE)} and similar make use
+      of PCRE's Just-In-Time compiler for studied patterns, if
+      available?  Missing values are treated as false.}
+      
     \item{\code{pdfviewer}:}{default PDF viewer.
       The default is set from the environment variable \env{R_PDFVIEWER},
 #ifdef unix
@@ -249,7 +309,7 @@ getOption(x, default = NULL)
 #ifdef unix
     \item{\code{rl_word_breaks}:}{Used for the readline-based terminal
       interface.  Default value \code{" \\t\\n\\"\\\\'`><=\%;,|&{()}"}.%"
-	
+
       This is the set of characters use to break the input line into
       tokens for object- and file-name completion.  Those who do not use
       spaces around operators may prefer\cr
@@ -297,7 +357,11 @@ getOption(x, default = NULL)
     \item{\code{texi2dvi}:}{used by functions
       \code{\link{texi2dvi}} and \code{\link{texi2pdf}} in package \pkg{tools}.
 #ifdef unix
-      Set at startup from the environment variable \env{R_TEXI2DVICMD}.
+      Set at startup from the environment variable \env{R_TEXI2DVICMD},
+      which defaults first to the value of environment variable
+      \env{TEXI2DVI}, and then to a value set when \R was installed (the
+      full path to a \command{texi2dvi} script if one was found).  If
+      necessary, that environment variable can be set to \code{"emulation"}.
 #endif
     }
 
@@ -308,6 +372,10 @@ getOption(x, default = NULL)
     \item{\code{topLevelEnvironment}:}{see \code{\link{topenv}} and
       \code{\link{sys.source}}.}
 
+    \item{\code{url.method}:}{character string: the default method for
+      \code{\link{url}}.  Normally unset, which is equivalent to
+      \code{"default"}, which is \code{"internal"} except on Windows.}
+
     \item{\code{useFancyQuotes}:}{controls the use of
       directional quotes in \code{\link{sQuote}}, \code{dQuote} and in
       rendering text help (see \code{\link{Rd2txt}} in package
@@ -350,13 +418,17 @@ getOption(x, default = NULL)
 
     \item{\code{nwarnings}:}{the limit for the number of warnings kept
       when \code{warn = 0}, default 50.  This will discard messages if
-      called whilst they are being collected.}
+      called whilst they are being collected.  If you increase this
+      limit, be aware that the current implementation pre-allocates
+      the equivalent of a named list for them, i.e., do not increase it to
+      more than say a million.}
 
     \item{\code{width}:}{controls the maximum number of columns on a
       line used in printing vectors, matrices and arrays, and when
       filling by \code{\link{cat}}.
 
-      Columns are normally the same as characters except in CJK languages.
+      Columns are normally the same as characters except in East Asian
+      languages.
 
       You may want to change this if you re-size the window that \R is
       running in.  Valid values are 10\dots10000 with default normally
@@ -402,7 +474,7 @@ getOption(x, default = NULL)
     \item{\code{bitmapType}:}{(Unix-only) character.  The default type for the
       bitmap devices such as \code{\link{png}}.  Defaults to
       \code{"cairo"} on systems where that is available, or to
-      \code{"quartz"} on OS X where that is available.}
+      \code{"quartz"} on macOS where that is available.}
 #endif
 
     \item{\code{device}:}{a character string giving
@@ -420,6 +492,12 @@ getOption(x, default = NULL)
       configurable via environment variables
       \env{R_INTERACTIVE_DEVICE} and \env{R_DEFAULT_DEVICE}
       respectively.
+
+      The search logic for \sQuote{the normal screen device} is that
+      this is \code{windows} on Windows, and \code{quartz} if available
+      on macOS (running at the console, and compiled into the build).
+      Otherwise \code{X11} is used if environment variable \env{DISPLAY}
+      is set.
     }
 
     \item{\code{device.ask.default}:}{logical.  The default for
@@ -460,7 +538,8 @@ getOption(x, default = NULL)
       \code{c("unordered", "ordered")}, but the names are unused.}
 
     \item{\code{na.action}:}{the name of a function for treating missing
-      values (\code{\link{NA}}'s) for certain situations.}
+      values (\code{\link{NA}}'s) for certain situations, see
+      \code{\link{na.action}} and \code{\link{na.pass}}.}
 
     \item{\code{show.coef.Pvalues}:}{logical, affecting whether P
       values are printed in summary tables of coefficients.  See
@@ -486,15 +565,16 @@ getOption(x, default = NULL)
   \describe{
     \item{\code{BioC_mirror}:}{The URL of a Bioconductor mirror
       for use by \code{\link{setRepositories}},
-      e.g.\sspace{}the default \samp{"http://www.bioconductor.org"}
+      e.g.\sspace{}the default \samp{"https://bioconductor.org"}
       or the European mirror
-      \samp{"http://bioconductor.statistik.tu-dortmund.de"}.  Can be set
+      \samp{"https://bioconductor.statistik.tu-dortmund.de"}.  Can be set
       by \code{\link{chooseBioCmirror}}.}
 
-    \item{\code{browser}:}{default HTML browser used by
-      \code{\link{help.start}()} and \code{\link{browseURL}} on UNIX, or
-      a non-default browser on Windows.  Alternatively, an \R function that
-      is called with a URL as its argument.}
+    \item{\code{browser}:}{The HTML browser to be used by
+      \code{\link{browseURL}}.  This sets the default browser on UNIX or
+      a non-default browser on Windows.  Alternatively, an \R function
+      that is called with a URL as its argument.  See
+      \code{\link{browseURL}} for further details.}
 
     \item{\code{ccaddress}:}{default Cc: address used by
       \code{\link{create.post}} (and hence\code{\link{bug.report}} and
@@ -532,21 +612,43 @@ getOption(x, default = NULL)
     \item{\code{help_type}:}{default for an argument of
     \code{\link{help}}, used also as the help type by \code{\link{?}}.}
 
-    \item{\code{HTTPUserAgent}:}{string used as the user agent in HTTP
-      requests.  If \code{NULL}, HTTP requests will be made without a
-      user agent header.  The default is \code{R (<version> <platform>
-	<arch> <os>)}}
+    \item{\code{HTTPUserAgent}:}{string used as the user agent in HTTP(S)
+      requests.  If \code{NULL}, requests will be made without a
+      user agent header.
+      The default is \code{R (<version> <platform> <arch> <os>)} .}
 
     \item{\code{install.lock}:}{logical: should per-directory package
       locking be used by \code{\link{install.packages}}?  Most useful
-      for binary installs on OS X and Windows, but can be used in a
+      for binary installs on macOS and Windows, but can be used in a
       startup file for source installs \emph{via}
       \command{R CMD \link{INSTALL}}.  For binary installs, can also be
       the character string \code{"pkgloack"}.}
 
     \item{\code{internet.info}:}{The minimum level of information to be
-      printed on URL downloads etc.  Default is 2, for failure causes.
-      Set to 1 or 0 to get more information.}
+      printed on URL downloads etc, using the \code{"internal"} and
+      \code{"libcurl"} methods.
+      Default is 2, for failure causes.  Set to 1 or 0 to get more
+      detailed information (for the \code{"internal"} method 0 provides
+      more information than 1).
+    }
+
+    \item{\code{install.packages.check.source}:}{Used by
+      \code{\link{install.packages}} (and indirectly
+      \code{\link{update.packages}}) on platforms which support binary
+      packages.  Possible values \code{"yes"} and \code{"no"}, with
+      unset being equivalent to \code{"yes"}.}
+
+    \item{\code{install.packages.compile.from.source}:}{Used by
+      \code{\link{install.packages}(type = "both")} (and indirectly
+      \code{\link{update.packages}}) on platforms which
+      support binary packages.  Possible values are \code{"never"},
+      \code{"interactive"} (which means ask in interactive use and
+      \code{"never"} in batch use) and \code{"always"}.  The default is
+      taken from environment variable
+      \env{R_COMPILE_AND_INSTALL_PACKAGES}, with default
+      \code{"interactive"} if unset.  However, \code{install.packages}
+      uses \code{"never"} unless a \command{make} program is found,
+      consulting the environment variable \env{MAKE}.}
 
     \item{\code{mailer}:}{default emailing method used by
       \code{\link{create.post}} and hence \code{\link{bug.report}} and
@@ -561,17 +663,22 @@ getOption(x, default = NULL)
     \item{\code{pkgType}:}{The default type of packages to be downloaded
       and installed -- see \code{\link{install.packages}}.
 #ifdef windows
-      Possible values are \code{"win.binary"} (the default) and
-      \code{"source"}.  Some OS X builds use \code{"mac.binary"} and
-      \code{"mac.binary.mavericks"}
+      Possible values are \code{"win.binary"}, \code{"source"} and
+      \code{"both"} (the default).  Some macOS builds use
+      \code{"mac.binary.el-capitan"}.
 #endif
 #ifdef unix
-      Possible values are \code{"source"} (the default except under the
-      CRAN OS X build), \code{"mac.binary."} and
-      \code{"mac.binary.mavericks"}.  Windows uses  \code{"win.binary"}.
-      (\code{"mac.binary.leopard"} and \code{"mac.binary.universal"} are
-      no longer in use.)
+      Possible values are \code{"source"} (the default except under a
+      CRAN macOS build), \code{"mac.binary.el-capitan"} and
+      \code{"both"} (the default for CRAN macOS builds).  Windows uses
+      \code{"win.binary"}. (\code{"mac.binary.mavericks"},
+      \code{"mac.binary.leopard"}, \code{"mac.binary.universal"} are no
+      longer in use.)
 #endif
+      Value \code{"binary"} is a synonym for the native binary type (if
+      there is one); \code{"both"} is used by
+      \code{\link{install.packages}} to choose between source and binary
+      installs.
     }
 
     \item{\code{repos}:}{URLs of the repositories for use by
@@ -582,14 +689,16 @@ getOption(x, default = NULL)
       \code{local({r <- getOption("repos"); r["CRAN"] <- "http://my.local.cran";
                    options(repos = r)})}.
 
-      Note that you can add more repositories (Bioconductor and
-      Omegahat, R-Forge, Rforge.net \dots)
+      Note that you can add more repositories (Bioconductor,
+      R-Forge, Rforge.net \dots)
       using \code{\link{setRepositories}}.
     }
-    \item{\code{SweaveHooks}, \code{SweaveSyntax}:}{see \code{\link{Sweave}}.}
+    \item{\code{SweaveHooks}, \code{SweaveSyntax}:}{
+      see \code{\link{Sweave}}.
+    }
 
-    \item{\code{unzip}:}{a character string, the path of the command
-      used for unzipping help files, or \code{"internal"}.
+    \item{\code{unzip}:}{a character string used by \code{\link{unzip}}:
+      the path of the external program \command{unzip} or \code{"internal"}.
 #ifdef unix
       Defaults to the value of \env{R_UNZIPCMD}, which is set in
       \file{etc/Renviron} if an \code{unzip} command was found during
@@ -600,6 +709,9 @@ getOption(x, default = NULL)
       used.
 #endif
     }
+
+    \item{\code{useHTTPS}:}{logical.  Used by \code{\link{chooseCRANmirror}}:
+      are secure mirrors preferred?  If not set, \code{TRUE} is assumed.}
   }
 }
 \section{Options set in package parallel}{
diff --git a/src/library/base/man/order.Rd b/src/library/base/man/order.Rd
index a9ceda3..c281b87 100644
--- a/src/library/base/man/order.Rd
+++ b/src/library/base/man/order.Rd
@@ -1,6 +1,6 @@
 % File src/library/base/man/order.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2014 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2017 R Core Team
 % Distributed under GPL 2 or later
 
 \name{order}
@@ -16,10 +16,11 @@
   etc.
 }
 \usage{
-order(\dots, na.last = TRUE, decreasing = FALSE)
+order(\dots, na.last = TRUE, decreasing = FALSE,
+      method = c("auto", "shell", "radix"))
 
 sort.list(x, partial = NULL, na.last = TRUE, decreasing = FALSE,
-          method = c("shell", "quick", "radix"))
+          method = c("auto", "shell", "quick", "radix"))
 }
 \arguments{
   \item{\dots}{a sequence of numeric, complex, character or logical
@@ -28,14 +29,20 @@ sort.list(x, partial = NULL, na.last = TRUE, decreasing = FALSE,
   \item{partial}{vector of indices for partial sorting.
     (Non-\code{NULL} values are not implemented.)}
   \item{decreasing}{logical.  Should the sort order be increasing or
-    decreasing?}
+    decreasing? For the \code{"radix"} method, this can be a vector of
+    length equal to the number of arguments in \code{\dots}. For the
+    other methods, it must be length one.}
   \item{na.last}{for controlling the treatment of \code{NA}s.
     If \code{TRUE}, missing values in the data are put last; if
     \code{FALSE}, they are put first; if \code{NA}, they are removed
     (see \sQuote{Note}.)}
   \item{method}{the method to be used: partial matches are allowed.  The
-    default is \code{"shell"} except for some special cases: see
-    \sQuote{Details}.}
+    default (\code{"auto"}) implies \code{"radix"} for short numeric vectors,
+    integer vectors, logical vectors and factors.
+    Otherwise, it implies \code{"shell"}.
+    For details of methods \code{"shell"}, 
+    \code{"quick"}, and \code{"radix"},
+    see the help for \code{\link{sort}}.}
 }
 \details{
   In the case of ties in the first vector, values in the second are used
@@ -47,19 +54,20 @@ sort.list(x, partial = NULL, na.last = TRUE, decreasing = FALSE,
   Complex values are sorted first by the real part, then the imaginary
   part.
 
-  The sort order for character vectors will depend on the collating
-  sequence of the locale in use: see \code{\link{Comparison}}.
-
-  The default method for \code{sort.list} is a good compromise.  Method
-  \code{"quick"} is only supported for numeric \code{x} with
-  \code{na.last = NA}, and is not stable, but will be substantially
-  faster for long vectors.  Method \code{"radix"} is only implemented
-  for integer \code{x} with a range of less than 100,000.  For such
-  \code{x} it is very fast (and stable), and hence is ideal for sorting
-  factors---as from \R 3.0.0 it is the default method for factors with
-  less than 100,000 levels.  (This is also known as \emph{counting
-  sorting}.)
-
+  Except for method \code{"radix"}, the sort order for character vectors
+  will depend on the collating sequence of the locale in use: see
+  \code{\link{Comparison}}.
+
+  The \code{"shell"} method is generally the safest bet and is the
+  default method, except for short factors, numeric vectors,
+  integer vectors and logical vectors, where \code{"radix"} is assumed.
+  Method \code{"radix"} stably sorts logical,
+  numeric and character vectors in linear time. It outperforms the other
+  methods, although there are caveats (see \code{\link{sort}}).  Method
+  \code{"quick"} for \code{sort.list} is only supported for numeric
+  \code{x} with \code{na.last = NA}, is not stable, and is slower than
+  \code{"radix"}. 
+  
   \code{partial = NULL} is supported for compatibility with other
   implementations of S, but no other values are accepted and ordering is
   always complete.
@@ -76,9 +84,18 @@ sort.list(x, partial = NULL, na.last = TRUE, decreasing = FALSE,
   more elements, when it is a double vector.
 }
 
+\section{Warning}{
+  In programmatic use it is unsafe to name the \code{\dots} arguments,
+  as the names could match current or future control
+  arguments such as \code{decreasing}.  A sometimes-encountered unsafe
+  practice is to call \code{do.call('order', df_obj)} where
+  \code{df_obj} might be a data frame: copy \code{df_obj} and
+  remove any names, for example using \code{\link{unname}}.
+}
+
 \note{
   \code{sort.list} can get called by mistake as a method for
-  \code{\link{sort}} with a list argument, and gives a suitable error
+  \code{\link{sort}} with a list argument: it gives a suitable error
   message for list \code{x}.
 
   There is a historical difference in behaviour for \code{na.last = NA}:
@@ -90,14 +107,18 @@ sort.list(x, partial = NULL, na.last = TRUE, decreasing = FALSE,
 }
   both sort the non-\code{NA} values of \code{x}.
 
-  Prior to \R 3.1.0 \code{method = "radix"} was only supported for
-  non-negative integers.
+  Prior to \R 3.3.0 \code{method = "radix"} was only supported for
+  integers of range less than 100,000.
 }
 
 \references{
   Becker, R. A., Chambers, J. M. and Wilks, A. R. (1988)
   \emph{The New S Language}.
   Wadsworth & Brooks/Cole.
+
+  Knuth, D. E. (1998)
+  \emph{The Art of Computer Programming, Volume 3: Sorting and
+    Searching.} 2nd ed. Addison-Wesley.
 }
 \seealso{
   \code{\link{sort}}, \code{\link{rank}}, \code{\link{xtfrm}}.
@@ -115,6 +136,9 @@ rbind(x, y, z)[, order(x, -y, z)]
 ## More generally we can make use of xtfrm
 cy <- as.character(y)
 rbind(x, y, z)[, order(x, -xtfrm(cy), z)]
+## The radix sort supports multiple 'decreasing' values:
+rbind(x, y, z)[, order(x, cy, z, decreasing = c(FALSE, TRUE, FALSE),
+                       method="radix")]
 
 ## Sorting data frames:
 dd <- transform(data.frame(x, y, z),
@@ -147,19 +171,26 @@ z <- cbind(a, b)
 (o <- order(a, b, na.last = NA)); z[o, ]
 
 \donttest{
-##  speed examples for long vectors:
-x <- factor(sample(letters, 1e6, replace = TRUE))
-system.time(o <- sort.list(x)) ## 0.4 secs
-stopifnot(!is.unsorted(x[o]))
+##  speed examples on an average laptop for long vectors:
+##  factor/small-valued integers:
+x <- factor(sample(letters, 1e7, replace = TRUE))
 system.time(o <- sort.list(x, method = "quick", na.last = NA)) # 0.1 sec
 stopifnot(!is.unsorted(x[o]))
-system.time(o <- sort.list(x, method = "radix")) # 0.01 sec
+system.time(o <- sort.list(x, method = "radix")) # 0.05 sec, 2X faster
 stopifnot(!is.unsorted(x[o]))
-xx <- sample(1:26, 1e7, replace = TRUE)
-system.time(o <- sort.list(xx, method = "radix")) # 0.1 sec
-xx <- sample(1:100000, 1e7, replace = TRUE)
-system.time(o <- sort.list(xx, method = "radix")) # 0.5 sec
-system.time(o <- sort.list(xx, method = "quick", na.last = NA)) # 1.3 sec
+##  large-valued integers:
+xx <- sample(1:200000, 1e7, replace = TRUE)
+system.time(o <- sort.list(xx, method = "quick", na.last = NA)) # 0.3 sec
+system.time(o <- sort.list(xx, method = "radix")) # 0.2 sec
+##  character vectors:
+xx <- sample(state.name, 1e6, replace = TRUE)
+system.time(o <- sort.list(xx, method = "shell")) # 2 sec
+system.time(o <- sort.list(xx, method = "radix")) # 0.007 sec, 300X faster
+##  double vectors:
+xx <- rnorm(1e6)
+system.time(o <- sort.list(xx, method = "shell")) # 0.4 sec
+system.time(o <- sort.list(xx, method = "quick", na.last = NA)) # 0.1 sec
+system.time(o <- sort.list(xx, method = "radix")) # 0.05 sec, 2X faster
 }}
 \keyword{univar}
 \keyword{manip}
diff --git a/src/library/base/man/outer.Rd b/src/library/base/man/outer.Rd
index 1e6b18b..bce1f9e 100644
--- a/src/library/base/man/outer.Rd
+++ b/src/library/base/man/outer.Rd
@@ -1,5 +1,5 @@
 % File src/library/base/man/outer.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2014 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/base/man/parse.Rd b/src/library/base/man/parse.Rd
index 6d965fe..49bef92 100644
--- a/src/library/base/man/parse.Rd
+++ b/src/library/base/man/parse.Rd
@@ -1,6 +1,6 @@
 % File src/library/base/man/parse.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2013 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2014 R Core Team
 % Distributed under GPL 2 or later
 
 \name{parse}
@@ -46,18 +46,18 @@ parse(file = "", n = NULL, text = NULL, prompt = "?",
   Wadsworth & Brooks/Cole.
   
   Murdoch, D. (2010).  
-  \href{http://journal.r-project.org/archive/2010-2/RJournal_2010-2_Murdoch.pdf}{Source 
+  \href{https://journal.r-project.org/archive/2010-2/RJournal_2010-2_Murdoch.pdf}{Source 
   References}.  \emph{The R Journal} 2/2, 16-19.
 }
 \seealso{
   \code{\link{scan}}, \code{\link{source}}, \code{\link{eval}},
   \code{\link{deparse}}.
 
-  The source reference information can be used for debugging (see e.g.
-  \code{\link{setBreakpoint}}) and profiling (see
+  The source reference information can be used for debugging (see
+  e.g.\sspace{}\code{\link{setBreakpoint}}) and profiling (see
   \code{\link{Rprof}}). It can be examined by \code{\link{getSrcref}}
   and related functions.  More detailed information is available through
-  \code{\link{getParseData}}.  
+  \code{\link{getParseData}}.
 }
 \details{
   If \code{text} has length greater than zero (after coercion) it is used in
diff --git a/src/library/base/man/paste.Rd b/src/library/base/man/paste.Rd
index 9343ec5..72aac0c 100644
--- a/src/library/base/man/paste.Rd
+++ b/src/library/base/man/paste.Rd
@@ -1,10 +1,8 @@
 % File src/library/base/man/paste.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2014 R Core Team
 % Distributed under GPL 2 or later
 
-\newcommand{\sspace}{\ifelse{latex}{\out{~}}{ }}
-
 \name{paste}
 \title{Concatenate Strings}
 \concept{combine strings}
@@ -70,6 +68,7 @@ paste0(\dots, collapse = NULL)
   Wadsworth & Brooks/Cole.
 }
 \seealso{
+  \code{\link{toString}} typically calls \code{paste(*, collapse=", ")}.
   String manipulation with
   \code{\link{as.character}}, \code{\link{substr}}, \code{\link{nchar}},
   \code{\link{strsplit}}; further, \code{\link{cat}} which concatenates and
@@ -79,10 +78,39 @@ paste0(\dots, collapse = NULL)
   \sQuote{\link{plotmath}} for the use of \code{paste} in plot annotation.
 }
 \examples{
-paste(1:12) # same as as.character(1:12)
-paste("A", 1:6, sep = "")
-stopifnot(identical(paste ("A", 1:6, sep = ""),
-		    paste0("A", 1:6)))
-\donttest{paste("Today is", date())}
+## When passing a single vector, paste0 and paste work like as.character.
+paste0(1:12)
+paste(1:12)        # same
+as.character(1:12) # same
+
+## If you pass several vectors to paste0, they are concatenated in a
+## vectorized way.
+(nth <- paste0(1:12, c("st", "nd", "rd", rep("th", 9))))
+
+## paste works the same, but separates each input with a space.
+## Notice that the recycling rules make every input as long as the longest input.
+paste(month.abb, "is the", nth, "month of the year.")
+paste(month.abb, letters)
+
+## You can change the separator by passing a sep argument
+## which can be multiple characters.
+paste(month.abb, "is the", nth, "month of the year.", sep = "_*_")
+
+## To collapse the output into a single string, pass a collapse argument.
+paste0(nth, collapse = ", ")
+
+## For inputs of length 1, use the sep argument rather than collapse
+paste("1st", "2nd", "3rd", collapse = ", ") # probably not what you wanted
+paste("1st", "2nd", "3rd", sep = ", ")
+
+## You can combine the sep and collapse arguments together.
+paste(month.abb, nth, sep = ": ", collapse = "; ")
+
+## Using paste() in combination with strwrap() can be useful
+## for dealing with long strings.
+(title <- paste(strwrap(
+    "Stopping distance of cars (ft) vs. speed (mph) from Ezekiel (1930)",
+    width = 30), collapse = "\n"))
+plot(dist ~ speed, cars, main = title)
 }
 \keyword{character}
diff --git a/src/library/base/man/path.expand.Rd b/src/library/base/man/path.expand.Rd
index 892e715..eb81280 100644
--- a/src/library/base/man/path.expand.Rd
+++ b/src/library/base/man/path.expand.Rd
@@ -1,5 +1,5 @@
 % File src/library/base/man/path.expand.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2011 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/base/man/pcre_config.Rd b/src/library/base/man/pcre_config.Rd
new file mode 100644
index 0000000..b113762
--- /dev/null
+++ b/src/library/base/man/pcre_config.Rd
@@ -0,0 +1,41 @@
+% File src/library/base/man/pcre_config.Rd
+% Part of the R package, https://www.R-project.org
+% Copyright 2015-2017 R Core Team
+% Distributed under GPL 2 or later
+
+\name{pcre_config}
+\alias{pcre_config}
+\title{
+  Report Configuration Options for PCRE
+}
+\description{
+  Report some of the configuration options of the version of PCRE in use
+  in this \R session.
+}
+\usage{
+pcre_config()
+}
+\value{
+  A named logical vector, currently with elements
+  \item{UTF-8}{Support for UTF-8 inputs.  Required.}
+  \item{Unicode properties}{Support for \samp{\p{xx}} and \samp{\P{xx}}
+    in regular expressions.  Desirable and used by some CRAN packages.}
+  \item{JIT}{Support for just-in-time compilation.  Desirable for speed
+    (but only available as compile-time option on certain architectures
+    as from PCRE 8.20).}
+  \item{stack}{Does match recursion use a stack (\code{TRUE}, the PCRE
+    default) or a heap?  See the discussion at
+    \url{http://www.pcre.org/original/doc/html/pcrestack.html}.  (Added
+    in \R 3.4.0.)} 
+}
+\details{
+  Detection of JIT requires \R to have been compiled against the headers
+  of PCRE 8.20 or later: it then checks at runtime the capabilities of
+  the running PCRE library (which could conceivably be earlier).
+}
+\seealso{
+  \code{\link{extSoftVersion}} for the PCRE version.
+}
+\examples{
+pcre_config()
+}
diff --git a/src/library/base/man/pmatch.Rd b/src/library/base/man/pmatch.Rd
index 1da5033..55c95df 100644
--- a/src/library/base/man/pmatch.Rd
+++ b/src/library/base/man/pmatch.Rd
@@ -1,6 +1,6 @@
 % File src/library/base/man/pmatch.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2012 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2016 R Core Team
 % Distributed under GPL 2 or later
 
 \name{pmatch}
@@ -68,6 +68,7 @@ pmatch(x, table, nomatch = NA_integer_, duplicates.ok = FALSE)
   \code{\link{match}}, \code{\link{charmatch}} and
   \code{\link{match.arg}}, \code{\link{match.fun}},
   \code{\link{match.call}}, for function argument matching etc.,
+  \code{\link{startsWith}} for particular checking of initial matches;
   \code{\link{grep}} etc for more general (regexp) matching of strings.
 }
 \examples{
diff --git a/src/library/base/man/polyroot.Rd b/src/library/base/man/polyroot.Rd
index 57d1fd9..ffc1fe6 100644
--- a/src/library/base/man/polyroot.Rd
+++ b/src/library/base/man/polyroot.Rd
@@ -1,5 +1,5 @@
 % File src/library/base/man/polyroot.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2012 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/base/man/pos.to.env.Rd b/src/library/base/man/pos.to.env.Rd
index 87a4025..3093d1d 100644
--- a/src/library/base/man/pos.to.env.Rd
+++ b/src/library/base/man/pos.to.env.Rd
@@ -1,5 +1,5 @@
 % File src/library/base/man/pos.to.env.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2013 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/base/man/pretty.Rd b/src/library/base/man/pretty.Rd
index 95259c2..55b58f4 100644
--- a/src/library/base/man/pretty.Rd
+++ b/src/library/base/man/pretty.Rd
@@ -1,5 +1,5 @@
 % File src/library/base/man/pretty.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2007 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/base/man/print.Rd b/src/library/base/man/print.Rd
index 78d589e..29a4b70 100644
--- a/src/library/base/man/print.Rd
+++ b/src/library/base/man/print.Rd
@@ -1,10 +1,8 @@
 % File src/library/base/man/print.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2013 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2015 R Core Team
 % Distributed under GPL 2 or later
 
-\newcommand{\CRANpkg}{\href{http://CRAN.R-project.org/package=#1}{\pkg{#1}}}
-
 \name{print}
 \title{Print Values}
 \usage{
@@ -21,9 +19,9 @@ print(x, \dots)
 \alias{print}
 \alias{print.factor}
 \alias{print.function}
-\alias{print.htest}
 \alias{print.listof}
 \alias{print.simple.list}
+\alias{print.Dlist}
 \alias{print.table}
 \description{
   \code{print} prints its argument and returns it \emph{invisibly} (via
@@ -63,7 +61,7 @@ print(x, \dots)
   \code{\link{ordered}} factors as well.
 
   \code{print.table} for printing \code{\link{table}}s allows other
-  customization. As of R 3.0.0, it only prints a description in case of a table 
+  customization. As of R 3.0.0, it only prints a description in case of a table
   with 0-extents (this can happen if a classifier has no valid data).
 
   See \code{\link{noquote}} as an example of a class whose main
diff --git a/src/library/base/man/print.dataframe.Rd b/src/library/base/man/print.dataframe.Rd
index d1421e2..1ffbed2 100644
--- a/src/library/base/man/print.dataframe.Rd
+++ b/src/library/base/man/print.dataframe.Rd
@@ -1,5 +1,5 @@
 % File src/library/base/man/print.dataframe.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2008 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/base/man/print.default.Rd b/src/library/base/man/print.default.Rd
index 0e4e8fd..c4286e0 100644
--- a/src/library/base/man/print.default.Rd
+++ b/src/library/base/man/print.default.Rd
@@ -1,5 +1,5 @@
 % File src/library/base/man/print.default.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2014 R Core Team
 % Distributed under GPL 2 or later
 
@@ -102,7 +102,7 @@
   issued.  The only known exceptions are certain Japanese ISO 2022
   locales on commercial Unixes, which use a concatenation of the bytes:
   it is unlikely that \R compiles on such a system.
-% http://www.cl.cam.ac.uk/~mgk25/ucs/iso2022-wc.html
+% https://www.cl.cam.ac.uk/~mgk25/ucs/iso2022-wc.html
 
   It is possible to have a character string in a character vector that
   is not valid in the current locale.  If a byte is encountered that is
diff --git a/src/library/base/man/prmatrix.Rd b/src/library/base/man/prmatrix.Rd
index 0ba96a9..2040f72 100644
--- a/src/library/base/man/prmatrix.Rd
+++ b/src/library/base/man/prmatrix.Rd
@@ -1,5 +1,5 @@
 % File src/library/base/man/prmatrix.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2007 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/base/man/proc.time.Rd b/src/library/base/man/proc.time.Rd
index daa760e..f63ba4c 100644
--- a/src/library/base/man/proc.time.Rd
+++ b/src/library/base/man/proc.time.Rd
@@ -1,6 +1,6 @@
 % File src/library/base/man/proc.time.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2013 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2014 R Core Team
 % Distributed under GPL 2 or later
 
 \name{proc.time}
diff --git a/src/library/base/man/prod.Rd b/src/library/base/man/prod.Rd
index ff69bad..070bb2d 100644
--- a/src/library/base/man/prod.Rd
+++ b/src/library/base/man/prod.Rd
@@ -1,5 +1,5 @@
 % File src/library/base/man/prod.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2007 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/base/man/prop.table.Rd b/src/library/base/man/prop.table.Rd
index 343887c..7ccd073 100644
--- a/src/library/base/man/prop.table.Rd
+++ b/src/library/base/man/prop.table.Rd
@@ -1,5 +1,5 @@
 % File src/library/base/man/prop.table.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2007 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/base/man/pushBack.Rd b/src/library/base/man/pushBack.Rd
index 8ba0be0..9bdce0f 100644
--- a/src/library/base/man/pushBack.Rd
+++ b/src/library/base/man/pushBack.Rd
@@ -1,5 +1,5 @@
 % File src/library/base/man/pushBack.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2014 R Core Team
 % Distributed under GPL 2 or later
 
@@ -23,7 +23,7 @@ clearPushBack(connection)
   \item{connection}{A \link{connection}.}
   \item{newLine}{logical.  If true, a newline is appended to each string
     pushed back.}
-  \item{encoding}{character.  See details.}
+  \item{encoding}{character string, partially matched.  See details.}
 }
 \details{
   Several character strings can be pushed back on one or more occasions.
diff --git a/src/library/base/man/qr.Rd b/src/library/base/man/qr.Rd
index 7aa8ee9..67c2830 100644
--- a/src/library/base/man/qr.Rd
+++ b/src/library/base/man/qr.Rd
@@ -1,6 +1,6 @@
 % File src/library/base/man/qr.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2012 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2016 R Core Team
 % Distributed under GPL 2 or later
 
 \name{qr}
@@ -73,8 +73,7 @@ as.qr(x)
   systems, providing a least-squares fit if appropriate.
 
   \code{is.qr} returns \code{TRUE} if \code{x} is a \code{\link{list}}
-  with components named \code{qr}, \code{rank} and \code{qraux} and
-  \code{FALSE} otherwise.
+  and \code{\link{inherits}} from \code{"qr"}.% not more checks, for speed.
 
   It is not possible to coerce objects to mode \code{"qr"}.  Objects
   either are QR decompositions or they are not.
@@ -83,11 +82,24 @@ as.qr(x)
   than \eqn{2^{31}}{2^31} elements.
 
   \code{qr.fitted} and \code{qr.resid} only support the LINPACK interface.
+
+  Unsuccessful results from the underlying LAPACK code will result in an
+  error giving a positive error code: these can only be interpreted by
+  detailed study of the FORTRAN code.
+}
+\section{\code{*)}\sspace{} \code{dqrdc2} instead of LINPACK's DQRDC}{
+  In the (default) LINPACK case (\code{LAPACK = FALSE}), \code{qr()}
+  uses a \emph{modified} version of LINPACK's DQRDC, called
+  \sQuote{\code{dqrdc2}}.  It differs by using the tolerance \code{tol}
+  for a pivoting strategy which moves columns with near-zero 2-norm to
+  the right-hand edge of the x matrix.  This strategy means that
+  sequential one degree-of-freedom effects can be computed in a natural
+  way.
 }
 \value{
-  The QR decomposition of the matrix as computed by LINPACK or LAPACK.
+  The QR decomposition of the matrix as computed by LINPACK(*) or LAPACK.
   The components in the returned value correspond directly
-  to the values returned by DQRDC/DGEQP3/ZGEQP3.
+  to the values returned by DQRDC(2)/DGEQP3/ZGEQP3.
   \item{qr}{a matrix with the same dimensions as \code{x}.
     The upper triangle contains the \eqn{\bold{R}} of the decomposition
     and the lower triangle contains information on the \eqn{\bold{Q}} of
@@ -95,7 +107,7 @@ as.qr(x)
     used by DQRDC and DGEQP3 differs.}
   \item{qraux}{a vector of length \code{ncol(x)} which contains
     additional information on \eqn{\bold{Q}}.}
-  \item{rank}{the rank of \code{x} as computed by the decomposition:
+  \item{rank}{the rank of \code{x} as computed by the decomposition(*):
     always full rank in the LAPACK case.}
   \item{pivot}{information on the pivoting strategy used during
     the decomposition.}
@@ -112,7 +124,8 @@ as.qr(x)
   does not attempt to detect rank-deficient matrices.
 }
 \source{
-  For \code{qr}, the LINPACK routine \code{DQRDC} and the LAPACK
+  For \code{qr}, the LINPACK routine \code{DQRDC} (but modified to
+  \code{dqrdc2}(*)) and the LAPACK
   routines \code{DGEQP3} and \code{ZGEQP3}.  Further LINPACK and LAPACK
   routines are used for \code{qr.coef}, \code{qr.qy} and \code{qr.aty}.
 
diff --git a/src/library/base/man/qraux.Rd b/src/library/base/man/qraux.Rd
index fbc0b16..16901a5 100644
--- a/src/library/base/man/qraux.Rd
+++ b/src/library/base/man/qraux.Rd
@@ -1,7 +1,7 @@
 % File src/library/base/man/qraux.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2011 R Core Team
-% Copyright 2002-2012 The R Foundation
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2015 R Core Team
+% Copyright 2002-2015 The R Foundation
 % Distributed under GPL 2 or later
 
 \name{QR.Auxiliaries}
@@ -9,7 +9,7 @@
 \usage{
 qr.X(qr, complete = FALSE, ncol =)
 qr.Q(qr, complete = FALSE, Dvec =)
-qr.R(qr, complete = FALSE, \dots)
+qr.R(qr, complete = FALSE)
 }
 \alias{qr.X}
 \alias{qr.Q}
@@ -35,8 +35,6 @@ qr.R(qr, complete = FALSE, \dots)
   \item{Dvec}{vector (not matrix) of diagonal values.  Each column of
     the returned \eqn{\bold{Q}} will be multiplied by the corresponding
     diagonal value.  Defaults to all \code{1}s.}
-  \item{\dots}{potentially further arguments, passed potentially to
-    non-default methods.}
 }
 \description{
   Returns the original matrix from which the object was constructed or
diff --git a/src/library/base/man/quit.Rd b/src/library/base/man/quit.Rd
index e4928ee..4705687 100644
--- a/src/library/base/man/quit.Rd
+++ b/src/library/base/man/quit.Rd
@@ -1,10 +1,8 @@
 % File src/library/base/man/quit.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2014 R Core Team
 % Distributed under GPL 2 or later
 
-\newcommand{\sspace}{\ifelse{latex}{\out{~}}{ }}
-
 \name{quit}
 \alias{quit}
 \alias{q}
@@ -89,7 +87,7 @@ quit(save = "default", status = 0, runLast = TRUE)
   \code{\link{reg.finalizer}}.
 }
 \note{
-  The \code{R.app} GUI on OS X has its own version of these functions
+  The \code{R.app} GUI on macOS has its own version of these functions
   with slightly different behaviour for the \code{save} argument (the
   GUI's \sQuote{Startup} preferences for this action are taken into account).
 }
diff --git a/src/library/base/man/range.Rd b/src/library/base/man/range.Rd
index d475f8a..b848ce4 100644
--- a/src/library/base/man/range.Rd
+++ b/src/library/base/man/range.Rd
@@ -1,5 +1,5 @@
 % File src/library/base/man/range.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2007 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/base/man/rank.Rd b/src/library/base/man/rank.Rd
index 10ab6f8..75d9810 100644
--- a/src/library/base/man/rank.Rd
+++ b/src/library/base/man/rank.Rd
@@ -1,6 +1,6 @@
 % File src/library/base/man/rank.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2012 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2015 R Core Team
 % Distributed under GPL 2 or later
 
 \name{rank}
@@ -12,7 +12,7 @@
 }
 \usage{
 rank(x, na.last = TRUE,
-     ties.method = c("average", "first", "random", "max", "min"))
+     ties.method = c("average", "first", "last", "random", "max", "min"))
 }
 \arguments{
   \item{x}{a numeric, complex, character or logical vector.}
@@ -30,11 +30,12 @@ rank(x, na.last = TRUE,
 }
 \details{
   If all components are different (and no \code{NA}s), the ranks are
-  well defined, with values in \code{seq_len(x)}.  With some values equal
+  well defined, with values in \code{seq_along(x)}.  With some values equal
   (called \sQuote{ties}), the argument \code{ties.method} determines the
   result at the corresponding indices.  The \code{"first"} method results
-  in a permutation with increasing values at each index set of ties.
-  The \code{"random"} method puts these in random order whereas the
+  in a permutation with increasing values at each index set of ties, and
+  analogously \code{"first"} with decreasing values.  The
+  \code{"random"} method puts these in random order whereas the
   default, \code{"average"}, replaces them by their mean, and
   \code{"max"} and \code{"min"} replaces them by their maximum and
   minimum respectively, the latter being the typical sports
@@ -58,7 +59,8 @@ rank(x, na.last = TRUE,
   (whether or not there are any ties).
 }
 \seealso{
-  \code{\link{order}} and \code{\link{sort}}.
+  \code{\link{order}} and \code{\link{sort}};
+  \code{\link{xtfrm}}, see above.
 }
 \examples{
 (r1 <- rank(x1 <- c(3, 1, 4, 15, 92)))
@@ -71,6 +73,7 @@ stopifnot(rank(r1) == r1, rank(r2) == r2)
 
 ## ranks without averaging
 rank(x2, ties.method= "first")  # first occurrence wins
+rank(x2, ties.method= "last")   #  last occurrence wins
 rank(x2, ties.method= "random") # ties broken at random
 rank(x2, ties.method= "random") # and again
 
@@ -78,5 +81,14 @@ rank(x2, ties.method= "random") # and again
 (rma <- rank(x2, ties.method= "max"))  # as used classically
 (rmi <- rank(x2, ties.method= "min"))  # as in Sports
 stopifnot(rma + rmi == round(r2 + r2))
+
+## Comparing all tie.methods:
+tMeth <- eval(formals(rank)$ties.method)
+rx2 <- sapply(tMeth, function(M) rank(x2, ties.method=M))
+cbind(x2, rx2)
+## ties.method's does not matter w/o ties:
+x <- sample(47)
+rx <- sapply(tMeth, function(MM) rank(x, ties.method=MM))
+stopifnot(all(rx[,1] == rx))
 }
 \keyword{univar}
diff --git a/src/library/base/man/rapply.Rd b/src/library/base/man/rapply.Rd
index cb8b9d6..7cf861b 100644
--- a/src/library/base/man/rapply.Rd
+++ b/src/library/base/man/rapply.Rd
@@ -1,5 +1,5 @@
 % File src/library/base/man/rapply.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2007 R Core Team
 % Distributed under GPL 2 or later
 
@@ -19,7 +19,7 @@ rapply(object, f, classes = "ANY", deflt = NULL,
   \item{classes}{A character vector of \code{\link{class}} names, or
     \code{"ANY"} to match any class.}
   \item{deflt}{The default result (not used if \code{how = "replace"}).}
-  \item{how}{A character string matching the three possibilities given:
+  \item{how}{A character string partially matching the three possibilities given:
     see \sQuote{Details}.}
   \item{\dots}{additional arguments passed to the call to \code{f}.}
 }
diff --git a/src/library/base/man/raw.Rd b/src/library/base/man/raw.Rd
index 81bfa0d..7c921a9 100644
--- a/src/library/base/man/raw.Rd
+++ b/src/library/base/man/raw.Rd
@@ -1,6 +1,6 @@
 % File src/library/base/man/raw.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 2004-2013 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 2004-2016 R Core Team
 % Distributed under GPL 2 or later
 
 \name{raw}
@@ -59,7 +59,9 @@ is.raw(x)
 xx <- raw(2)
 xx[1] <- as.raw(40)     # NB, not just 40.
 xx[2] <- charToRaw("A")
-xx
+xx       ## 28 41   -- raw prints hexadecimals
+dput(xx) ## as.raw(c(0x28, 0x41))
+as.integer(xx) ## 40 65
 
 x <- "A test string"
 (y <- charToRaw(x))
@@ -67,9 +69,10 @@ is.vector(y) # TRUE
 rawToChar(y)
 is.raw(x)
 is.raw(y)
+stopifnot( charToRaw("\xa3") == as.raw(0xa3) )
 
 isASCII <-  function(txt) all(charToRaw(txt) <= as.raw(127))
 isASCII(x)  # true
-isASCII("\x9c25.63") # false (in Latin-1, this is an amount in UK pounds)
+isASCII("\xa325.63") # false (in Latin-1, this is an amount in UK pounds)
 }
 \keyword{classes}
diff --git a/src/library/base/man/rawConnection.Rd b/src/library/base/man/rawConnection.Rd
index a1f5921..9bb2471 100644
--- a/src/library/base/man/rawConnection.Rd
+++ b/src/library/base/man/rawConnection.Rd
@@ -1,5 +1,5 @@
 % File src/library/base/man/rawConnection.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2008 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/base/man/rawConversion.Rd b/src/library/base/man/rawConversion.Rd
index d906eb9..ddfe9a5 100644
--- a/src/library/base/man/rawConversion.Rd
+++ b/src/library/base/man/rawConversion.Rd
@@ -1,10 +1,8 @@
 % File src/library/base/man/rawConversion.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 2004-2012 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 2004-2014 R Core Team
 % Distributed under GPL 2 or later
 
-\newcommand{\sspace}{\ifelse{latex}{\out{~}}{ }}
-
 \name{rawConversion}
 \alias{charToRaw}
 \alias{rawToChar}
@@ -32,7 +30,7 @@ packBits(x, type = c("raw", "integer"))
     character string or multiple individual characters?}
   \item{n}{the number of bits to shift.  Positive numbers shift right
     and negative numbers shift left: allowed values are \code{-8 ... 8}.}
-  \item{type}{the result type.}
+  \item{type}{the result type, partially matched.}
 }
 \value{
   \code{charToRaw} converts a length-one character string to raw bytes.
diff --git a/src/library/base/man/readBin.Rd b/src/library/base/man/readBin.Rd
index fe61d7b..0767263 100644
--- a/src/library/base/man/readBin.Rd
+++ b/src/library/base/man/readBin.Rd
@@ -1,6 +1,6 @@
 % File src/library/base/man/readBin.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2013 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2015 R Core Team
 % Distributed under GPL 2 or later
 
 \name{readBin}
@@ -8,7 +8,7 @@
 \alias{writeBin}
 \title{Transfer Binary Data To and From Connections}
 \description{
-  Read binary data from a connection, or write binary data to a connection.
+  Read binary data from or write binary data to a connection or raw vector.
 }
 \usage{
 readBin(con, what, n = 1L, size = NA_integer_, signed = TRUE,
@@ -69,13 +69,18 @@ writeBin(object, con, size = NA_integer_,
   zero-terminated character strings.  Input strings are limited to 10000
   characters.  \code{\link{readChar}} and \code{\link{writeChar}} can
   be used to read and write fixed-length strings.  No check is made that
-  the string is valid in the current locale.
+  the string is valid in the current locale's encoding.
 
   Handling \R's missing and special (\code{Inf}, \code{-Inf} and
   \code{NaN}) values is discussed in the \sQuote{R Data Import/Export} manual.
 
   Only \eqn{2^{31}-1}{2^31 - 1} bytes can be written in a single
-  call (and that is the maximum capacity of a raw vector).
+  call (and that is the maximum capacity of a raw vector on 32-bit
+  platforms).
+
+  \sQuote{Endian-ness} is relevant for \code{size > 1}, and should
+  always be set for portable code (the default is only appropriate when
+  writing and then reading files on the same platform).
 }
 
 \note{
diff --git a/src/library/base/man/readChar.Rd b/src/library/base/man/readChar.Rd
index cd0144f..27469aa 100644
--- a/src/library/base/man/readChar.Rd
+++ b/src/library/base/man/readChar.Rd
@@ -1,5 +1,5 @@
 % File src/library/base/man/readChar.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2013 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/base/man/readLines.Rd b/src/library/base/man/readLines.Rd
index 1af9dd3..77429f0 100644
--- a/src/library/base/man/readLines.Rd
+++ b/src/library/base/man/readLines.Rd
@@ -1,5 +1,5 @@
 % File src/library/base/man/readLines.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2014 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/base/man/readRDS.Rd b/src/library/base/man/readRDS.Rd
index 590a1fd..2e00d9f 100644
--- a/src/library/base/man/readRDS.Rd
+++ b/src/library/base/man/readRDS.Rd
@@ -1,10 +1,8 @@
 % File src/library/base/man/serialize.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2014 R Core Team
 % Distributed under GPL 2 or later
 
-\newcommand{\sspace}{\ifelse{latex}{\out{~}}{ }}
-
 \name{readRDS}
 \alias{readRDS}
 \alias{saveRDS}
@@ -22,9 +20,9 @@ readRDS(file, refhook = NULL)
   \item{object}{\R object to serialize.}
   \item{file}{a \link{connection} or the name of the file where the \R object
     is saved to or read from.}
-  \item{ascii}{a logical.  If \code{TRUE}, an ASCII representation is
-    written; otherwise a binary one is used.  See the comments in the
-    help for \code{\link{save}}.}
+  \item{ascii}{a logical.  If \code{TRUE} or \code{NA}, an ASCII
+    representation is written; otherwise (default), a binary one is used.
+    See the comments in the help for \code{\link{save}}.}
   \item{version}{the workspace format version to use.  \code{NULL}
     specifies the current default version (2).  Versions prior to 2 are not
     supported, so this will only be relevant when there are later versions.}
@@ -63,8 +61,8 @@ readRDS(file, refhook = NULL)
 
   If a connection is supplied it will be opened (in binary mode) for the
   duration of the function if not already open: if it is already open it
-  must be in binary mode for \code{saveRDS(ascii = FALSE)} (the
-  default).
+  must be in binary mode for \code{saveRDS(ascii = FALSE)} or to read
+  non-ASCII saves.
 }
 
 \value{
@@ -110,7 +108,7 @@ serialize(women, con) # binary, bzip2-compressed
 close(con)
 identical(women, readRDS("women2"))
 
-\testonly{unlink(c("women.rds", "women2", "women3"))}
+\dontshow{unlink(c("women.rds", "women2", "women3"))}
 }
 
 \keyword{file}
diff --git a/src/library/base/man/readRenviron.Rd b/src/library/base/man/readRenviron.Rd
index 4a6d01d..e11fd52 100644
--- a/src/library/base/man/readRenviron.Rd
+++ b/src/library/base/man/readRenviron.Rd
@@ -1,5 +1,5 @@
 % File src/library/base/man/serialize.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 2010 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/base/man/readline.Rd b/src/library/base/man/readline.Rd
index f61641d..875f804 100644
--- a/src/library/base/man/readline.Rd
+++ b/src/library/base/man/readline.Rd
@@ -1,5 +1,5 @@
 % File src/library/base/man/readline.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2009 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/base/man/reg.finalizer.Rd b/src/library/base/man/reg.finalizer.Rd
index b3eb721..8fffb16 100644
--- a/src/library/base/man/reg.finalizer.Rd
+++ b/src/library/base/man/reg.finalizer.Rd
@@ -1,6 +1,6 @@
 % File src/library/base/man/reg.finalizer.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2014 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2017 R Core Team
 % Distributed under GPL 2 or later
 
 \name{reg.finalizer}
@@ -42,7 +42,7 @@
   \R's interpreter is not re-entrant and the finalizer could be run in
   the middle of a computation.  So there are many functions which it is
   potentially unsafe to call from \code{f}: one example which caused
-  trouble is \code{\link{options}}.  As from \R 3.0.3 finalizers are
+  trouble is \code{\link{options}}.  Finalizers are
   scheduled at garbage collection but only run at a relatively safe time
   thereafter.
 }
diff --git a/src/library/base/man/regex.Rd b/src/library/base/man/regex.Rd
index cb5845f..839e1e6 100644
--- a/src/library/base/man/regex.Rd
+++ b/src/library/base/man/regex.Rd
@@ -1,10 +1,8 @@
 % File src/library/base/man/regex.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2013 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2017 R Core Team
 % Distributed under GPL 2 or later
 
-\newcommand{\sspace}{\ifelse{latex}{\out{~}}{ }}
-
 \name{regex}
 \alias{regex}
 \alias{regexp}
@@ -34,15 +32,17 @@
   (\emph{do remember that backslashes need to be doubled when entering \R
     character strings}, e.g.\sspace{}from the keyboard).
 
-  Do not assume that long regular expressions will be accepted: the
-  POSIX standard only requires up to 256 \emph{bytes}.
+  Long regular expression patterns may or may not be accepted: the POSIX
+  standard only requires up to 256 \emph{bytes}.
 }
 \section{Extended Regular Expressions}{
   This section covers the regular expressions allowed in the default
-  mode of \code{grep}, \code{regexpr}, \code{gregexpr}, \code{sub},
-  \code{gsub} 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 used by \R.
+  mode of \code{grep}, \code{grep}, \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
+  used by \R.  The implementation supports some extensions to the
+  standard.
 
   Regular expressions are constructed analogously to arithmetic
   expressions, by using various operators to combine smaller
@@ -53,9 +53,9 @@
   a single character.  Most characters, including all letters and
   digits, are regular expressions that match themselves.  Any
   metacharacter with special meaning may be quoted by preceding it with
-  a backslash.  The metacharacters in EREs are \samp{. \\
-  | ( ) [ \{ ^ $ * + ?}, but note that whether these have a special
-  meaning depends on the context.
+  a backslash.  The metacharacters in extended regular expressions are
+  \samp{. \\ | ( ) [ \{ ^ $ * + ?}, but note that whether these have a
+  special meaning depends on the context.
 
   Escaping non-metacharacters with a backslash is
   implementation-dependent.  The current implementation interprets
@@ -72,11 +72,11 @@
   \samp{[^abc]} matches anything except the characters \samp{a},
   \samp{b} or \samp{c}.  A range of characters may be specified by
   giving the first and last characters, separated by a hyphen.  (Because
-  their interpretation is locale- and implementation-dependent, they are
-  best avoided.)  The only portable way to specify all ASCII letters is
-  to list them all as the character class\cr
-  \samp{[ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz]}.\cr
-  (The current implementation uses numerical order of the encoding.)
+  their interpretation is locale- and implementation-dependent,
+  character ranges are best avoided.)  The only portable way to specify
+  all ASCII letters is to list them all as the character class\cr
+  \samp{[ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz]}.\cr (The
+  current implementation uses numerical order of the encoding.)
 
   Certain named classes of characters are predefined.  Their
   interpretation depends on the \emph{locale} (see \link{locales}); the
@@ -136,9 +136,10 @@
 
   The period \samp{.} matches any single character.  The symbol
   \samp{\\w} matches a \sQuote{word} character (a synonym for
-  \samp{[[:alnum:]_]}) and \samp{\\W} is its negation.  Symbols
-  \samp{\\d}, \samp{\\s}, \samp{\\D} and \samp{\\S} denote the digit and
-  space classes and their negations.
+  \samp{[[:alnum:]_]}, an extension) and \samp{\\W} is its negation
+  (\samp{[^[:alnum:]_]}).  Symbols \samp{\\d}, \samp{\\s}, \samp{\\D}
+  and \samp{\\S} denote the digit and space classes and their negations
+  (these are all extensions).
 
   The caret \samp{^} and the dollar sign \samp{$} are metacharacters
   that respectively match the empty string at the beginning and end of a
@@ -147,7 +148,7 @@
   empty string at either edge of a word, and \samp{\\B} matches the
   empty string provided it is not at an edge of a word.  (The
   interpretation of \sQuote{word} depends on the locale and
-  implementation.)
+  implementation: these are all extensions.)
 
   A regular expression may be followed by one of several repetition
   quantifiers:
@@ -200,13 +201,17 @@
   The \code{perl = TRUE} argument to \code{grep}, \code{regexpr},
   \code{gregexpr}, \code{sub}, \code{gsub} and \code{strsplit} switches
   to the PCRE library that implements regular expression pattern
-  matching using the same syntax and semantics as Perl 5.10,
+  matching using the same syntax and semantics as Perl 5.x,
   with just a few differences.
 
-  For complete details please consult the man pages for PCRE, especially
-  \command{man pcrepattern} and \command{man pcreapi}), on your system or from
-  the sources at \url{http://www.pcre.org}. If PCRE support was compiled
-  from the sources within \R, the PCRE version is 8.12 as described here.
+  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
+  \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
+  for some time (essentially 2012), the man pages at
+  \url{http://www.pcre.org/original/doc/html/} should be a good match.)
 
   Perl regular expressions can be computed byte-by-byte or
   (UTF-8) character-by-character: the latter is used in all multibyte
@@ -258,8 +263,8 @@
   any decimal digit, space character and \sQuote{word} character
   (letter, digit or underscore in the current locale: in UTF-8 mode only
   ASCII letters and digits are considered) respectively, and their
-  upper-case versions represent their negation.  Vertical tab is not
-  regarded as a space character before PCRE 8.34 (included in \R 3.0.3).
+  upper-case versions represent their negation.  Vertical tab was not
+  regarded as a space character in a \code{C} locale before PCRE 8.34.
   Sequences \samp{\\h}, \samp{\\v}, \samp{\\H} and \samp{\\V} match
   horizontal and vertical space or the negation.  (In UTF-8 mode, these
   do match non-ASCII Unicode code points.)
@@ -284,12 +289,14 @@
   and \samp{\\X} matches any number of Unicode characters that form an
   extended Unicode sequence.
 
-  In UTF-8 mode, some Unicode properties are supported via
-  \samp{\\p\{xx\}} and \samp{\\P\{xx\}} which match
-  characters with and without property \samp{xx} respectively.
-  For a list of supported properties see the PCRE documentation, but for
-  example \samp{Lu} is \sQuote{upper case letter} and \samp{Sc} is
-  \sQuote{currency symbol}.
+  In UTF-8 mode, some Unicode properties may be supported via
+  \samp{\p{xx}} and \samp{\P{xx}} which match characters with and
+  without property \samp{xx} respectively.  For a list of supported
+  properties see the PCRE documentation, but for example \samp{Lu} is
+  \sQuote{upper case letter} and \samp{Sc} is \sQuote{currency symbol}.
+  (This support depends on the PCRE library being compiled with
+  \sQuote{Unicode property support} which can be checked \emph{via}
+  \code{\link{pcre_config}}.)
 
   The sequence \samp{(?#} marks the start of a comment which continues
   up to the next closing parenthesis.  Nested parentheses are not
@@ -320,9 +327,8 @@
   and recursive patterns are not covered here.
 }
 \author{
-  This help page is based on the documentation of GNU grep 2.4.2, the
-  TRE documentation and the POSIX standard, and the \code{pcrepattern}
-  man page from PCRE 8.0.
+  This help page is based on the TRE documentation and the POSIX
+  standard, and the \code{pcrepattern} man page from PCRE 8.36.
 }
 \seealso{
   \code{\link{grep}}, \code{\link{apropos}}, \code{\link{browseEnv}},
@@ -333,10 +339,10 @@
   \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#tag_09}
+  \url{http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap09.html}
 
-  The \code{pcrepattern} can be found as part of
-  \url{http://www.pcre.org/pcre.txt}, and details of Perl's own
+  The \code{pcrepattern} \command{man} page (found as part of
+  \url{http://www.pcre.org/original/pcre.txt}), and details of Perl's own
   implementation at \url{http://perldoc.perl.org/perlre.html}.
 }
 \keyword{character}
diff --git a/src/library/base/man/regmatches.Rd b/src/library/base/man/regmatches.Rd
index 239e699..14ac26f 100644
--- a/src/library/base/man/regmatches.Rd
+++ b/src/library/base/man/regmatches.Rd
@@ -1,3 +1,8 @@
+% File src/library/base/man/regmatches.Rd
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2014 R Core Team
+% Distributed under GPL 2 or later
+
 \name{regmatches}
 \alias{regmatches}
 \alias{regmatches<-}
@@ -31,6 +36,11 @@ regmatches(x, m, invert = FALSE) <- value
   matches similar to \code{\link{strsplit}} (for vector match data, at
   most a single split is performed).
 
+  If \code{invert} is \code{NA}, \code{regmatches} extracts both
+  non-matched and matched substrings, always starting and ending with a
+  non-match (empty if the match occurred at the beginning or the end,
+  respectively).
+
   Note that the match data can be obtained from regular expression
   matching on a modified version of \code{x} with the same numbers of
   characters.
@@ -47,7 +57,7 @@ regmatches(x, m, invert = FALSE) <- value
 \value{
   For \code{regmatches}, a character vector with the matched substrings
   if \code{m} is a vector and \code{invert} is \code{FALSE}.  Otherwise,
-  a list with the matched or non-matched substrings.
+  a list with the matched or/and non-matched substrings.
 
   For \code{regmatches<-}, the updated character vector.
 }
@@ -74,10 +84,7 @@ x <- "John (fishing, hunting), Paul (hiking, biking)"
 m <- gregexpr("\\\\([^)]*\\\\)", x)
 ## Write a little utility for creating blank strings with given numbers
 ## of characters.
-blanks <- function(n) {
-     vapply(Map(rep.int, rep.int(" ", length(n)), n, USE.NAMES = FALSE),
-           paste, "", collapse = "")
-}
+blanks <- function(n) strrep(" ", n)
 ## Create a copy of x with the parenthesized parts blanked out.
 s <- x
 regmatches(s, m) <- Map(blanks, lapply(regmatches(s, m), nchar))
diff --git a/src/library/base/man/rep.Rd b/src/library/base/man/rep.Rd
index b2eade8..0d3c3e2 100644
--- a/src/library/base/man/rep.Rd
+++ b/src/library/base/man/rep.Rd
@@ -1,6 +1,6 @@
 % File src/library/base/man/rep.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2014 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2015, 2017 R Core Team
 % Distributed under GPL 2 or later
 
 \name{rep}
@@ -28,28 +28,28 @@ rep.int(x, times)
 rep_len(x, length.out)
 }
 \arguments{
-  \item{x}{a vector (of any mode including a list) or a factor or (for
+  \item{x}{a vector (of any mode including a \code{\link{list}}) or a factor or (for
     \code{rep} only) a \code{POSIXct} or \code{POSIXlt} or \code{Date}
     object; or an S4 object containing such an object.}
   \item{\dots}{further arguments to be passed to or from other methods.
     For the internal default method these can include:
     \describe{
-      \item{\code{times}}{A integer vector giving the (non-negative) number of
-        times to repeat each element if of length \code{length(x)}, or to
-        repeat the whole vector if of length 1.  Negative or \code{NA}
-	values are an error.}
+      \item{\code{times}}{an integer-valued vector giving the
+	(non-negative) number of times to repeat each element if of
+	length \code{length(x)}, or to repeat the whole vector if of
+	length 1.  Negative or \code{NA} values are an error.  A
+	\code{double} vector is accepted, other inputs being coerced to
+	an integer or double vector.}
       \item{\code{length.out}}{non-negative integer.  The desired length of the
-        output vector.  Other inputs will be coerced to an integer
+        output vector.  Other inputs will be coerced to a double
 	vector and the first element taken.  Ignored if \code{NA} or invalid.}
       \item{\code{each}}{non-negative integer.  Each element of \code{x}
 	is repeated \code{each} times.  Other inputs will be coerced to
-	an integer vector and the first element taken.  Treated as
+	an integer or double vector and the first element taken.  Treated as
 	\code{1} if \code{NA} or invalid.}
     }
   }
-  \item{times}{see \code{\dots}.}
-  \item{length.out}{non-negative integer: the desired length of the
-    output vector.}
+  \item{times, length.out}{see \code{\dots} above.}
 }
 
 \details{
@@ -107,9 +107,7 @@ rep_len(x, length.out)
   result is always \code{NULL} even when \code{length.out} is positive.
 
   Although it has never been documented, these functions have always
-  worked on \link{expression} vectors.  \R 2.x.y accepted pairlists and
-  some other objects (although the results were rarely what their users
-  intended).
+  worked on \link{expression} vectors.
 }
 \references{
   Becker, R. A., Chambers, J. M. and Wilks, A. R. (1988)
diff --git a/src/library/base/man/replace.Rd b/src/library/base/man/replace.Rd
index bff5e99..f8cce95 100644
--- a/src/library/base/man/replace.Rd
+++ b/src/library/base/man/replace.Rd
@@ -1,5 +1,5 @@
 % File src/library/base/man/replace.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2007 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/base/man/rev.Rd b/src/library/base/man/rev.Rd
index b6a7bab..ab55b9b 100644
--- a/src/library/base/man/rev.Rd
+++ b/src/library/base/man/rev.Rd
@@ -1,6 +1,6 @@
 % File src/library/base/man/rev.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2007 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2014 R Core Team
 % Distributed under GPL 2 or later
 
 \name{rev}
diff --git a/src/library/base/man/rle.Rd b/src/library/base/man/rle.Rd
index f49617a..1ef35c1 100644
--- a/src/library/base/man/rle.Rd
+++ b/src/library/base/man/rle.Rd
@@ -1,5 +1,5 @@
 % File src/library/base/man/rle.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2014 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/base/man/rm.Rd b/src/library/base/man/rm.Rd
index e74f7bd..c59bad7 100644
--- a/src/library/base/man/rm.Rd
+++ b/src/library/base/man/rm.Rd
@@ -1,5 +1,5 @@
 % File src/library/base/man/rm.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2010 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/base/man/round.POSIXt.Rd b/src/library/base/man/round.POSIXt.Rd
index 8ca6be5..28b6da1 100644
--- a/src/library/base/man/round.POSIXt.Rd
+++ b/src/library/base/man/round.POSIXt.Rd
@@ -1,5 +1,5 @@
 % File src/library/base/man/round.POSIXt.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2013 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/base/man/row.Rd b/src/library/base/man/row.Rd
index 5e327dd..b55ae68 100644
--- a/src/library/base/man/row.Rd
+++ b/src/library/base/man/row.Rd
@@ -1,5 +1,5 @@
 % File src/library/base/man/row.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2008 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/base/man/row.names.Rd b/src/library/base/man/row.names.Rd
index e1aa1ba..0a00b30 100644
--- a/src/library/base/man/row.names.Rd
+++ b/src/library/base/man/row.names.Rd
@@ -1,5 +1,5 @@
 % File src/library/base/man/row.names.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2010 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/base/man/rowsum.Rd b/src/library/base/man/rowsum.Rd
index b018434..831a22a 100644
--- a/src/library/base/man/rowsum.Rd
+++ b/src/library/base/man/rowsum.Rd
@@ -1,5 +1,5 @@
 % File src/library/base/man/rowsum.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2011 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/base/man/sQuote.Rd b/src/library/base/man/sQuote.Rd
index 04aa2ce..30302f0 100644
--- a/src/library/base/man/sQuote.Rd
+++ b/src/library/base/man/sQuote.Rd
@@ -1,10 +1,8 @@
 % File src/library/base/man/sQuote.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2013 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2014 R Core Team
 % Distributed under GPL 2 or later
 
-\newcommand{\sspace}{\ifelse{latex}{\out{~}}{ }}
-
 \name{sQuote}
 \alias{sQuote}
 \alias{dQuote}
@@ -74,7 +72,7 @@ dQuote(x)
   To work around this, the default for \code{options("useFancyQuotes")}
   is \code{FALSE} on Windows except for the \code{Rgui} console.  There
   fancy quotes work with the default Courier New font and more elegantly with
-  Lucida Console and standard the CJK fonts, but directional double
+  Lucida Console and default East Asian fonts, but directional double
   quotes are missing in raster fonts such as Courier and FixedSys.
 #endif
 }
@@ -89,7 +87,7 @@ dQuote(x)
 }
 \references{
   Markus Kuhn, \dQuote{ASCII and Unicode quotation marks}.
-  \url{http://www.cl.cam.ac.uk/~mgk25/ucs/quotes.html}
+  \url{https://www.cl.cam.ac.uk/~mgk25/ucs/quotes.html}
 }
 % these char strings have to be readable in any locale,
 % so cannot use \uxxxx (fails in Japanese).
diff --git a/src/library/base/man/sample.Rd b/src/library/base/man/sample.Rd
index a211aea..d99d6aa 100644
--- a/src/library/base/man/sample.Rd
+++ b/src/library/base/man/sample.Rd
@@ -1,10 +1,8 @@
 % File src/library/base/man/sample.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2013 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2017 R Core Team
 % Distributed under GPL 2 or later
 
-\newcommand{\CRANpkg}{\href{http://CRAN.R-project.org/package=#1}{\pkg{#1}}}
-
 \name{sample}
 \alias{sample}
 \alias{sample.int}
@@ -16,17 +14,23 @@
 \usage{
 sample(x, size, replace = FALSE, prob = NULL)
 
-sample.int(n, size = n, replace = FALSE, prob = NULL)
+sample.int(n, size = n, replace = FALSE, prob = NULL,
+           useHash = (!replace && is.null(prob) && size <= n/2 && n > 1e7))
 }
 \arguments{
-  \item{x}{Either a vector of one or more elements from which to choose,
+  \item{x}{either a vector of one or more elements from which to choose,
     or a positive integer.  See \sQuote{Details.}}
   \item{n}{a positive number, the number of items to choose from.  See
     \sQuote{Details.}}
   \item{size}{a non-negative integer giving the number of items to choose.}
-  \item{replace}{Should sampling be with replacement?}
-  \item{prob}{A vector of probability weights for obtaining the elements
+  \item{replace}{should sampling be with replacement?}
+  \item{prob}{a vector of probability weights for obtaining the elements
     of the vector being sampled.}
+  \item{useHash}{\code{\link{logical}} indicating if the hash-version of
+    the algorithm should be used.  Can only be used for \code{replace =
+      FALSE}, \code{prob = NULL}, and \code{size <= n/2}, and really
+    should be used for large \code{n}, as \code{useHash=FALSE} will use
+    memory proportional to \code{n}.}
 }
 \details{
   If \code{x} has length 1, is numeric (in the sense of
@@ -66,7 +70,7 @@ sample.int(n, size = n, replace = FALSE, prob = NULL)
   \code{sample.int} is a bare interface in which both \code{n} and
   \code{size} must be supplied as integers.
 
-  As from \R 3.0.0, \code{n} can be larger than the largest integer of
+  Argument \code{n} can be larger than the largest integer of
   type \code{integer}, up to the largest representable integer in type
   \code{double}.  Only uniform sampling is supported.  Two
   random numbers are used to ensure uniform sampling of large integers.
@@ -113,6 +117,7 @@ x <- 1:10
     sample(x[x >  9]) # oops -- length 10!
     sample(x[x > 10]) # length 0
 
+## safer version:
 resample <- function(x, ...) x[sample.int(length(x), ...)]
 resample(x[x >  8]) # length 2
 resample(x[x >  9]) # length 1
diff --git a/src/library/base/man/save.Rd b/src/library/base/man/save.Rd
index 098be15..726c0a5 100644
--- a/src/library/base/man/save.Rd
+++ b/src/library/base/man/save.Rd
@@ -1,6 +1,6 @@
 % File src/library/base/man/save.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2014 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2015 R Core Team
 % Distributed under GPL 2 or later
 
 \name{save}
@@ -14,14 +14,15 @@
   (or \code{\link{data}} in some cases).
 
   \code{save.image()} is just a short-cut for \sQuote{save my current
-    workspace}, i.e., \code{save(list = ls(all = TRUE), file =
-    ".RData")}.  It is also what happens with \code{\link{q}("yes")}.
+    workspace}, i.e., \code{save(list = ls(all.names = TRUE), file =
+    ".RData", envir = .GlobalEnv)}.
+  It is also what happens with \code{\link{q}("yes")}.
 }
 \usage{
 save(\dots, list = character(),
      file = stop("'file' must be specified"),
      ascii = FALSE, version = NULL, envir = parent.frame(),
-     compress = !ascii, compression_level,
+     compress = isTRUE(!ascii), compression_level,
      eval.promises = TRUE, precheck = TRUE)
 
 save.image(file = ".RData", version = NULL, ascii = FALSE,
@@ -38,7 +39,9 @@ save.image(file = ".RData", version = NULL, ascii = FALSE,
     \code{version = 1}.}
   \item{ascii}{if \code{TRUE}, an ASCII representation of the data is
     written.  The default value of \code{ascii} is \code{FALSE} which
-    leads to a binary file being written.}
+    leads to a binary file being written.  If \code{NA} and
+    \code{version >= 2}, a different ASCII representation is used which
+    writes double/complex numbers as binary fractions.}
   \item{version}{the workspace format version to use.  \code{NULL}
     specifies the current default format.  The version used from \R
     0.99.0 to \R 1.3.1 was version 1.  The default format as from \R
@@ -80,9 +83,9 @@ save.image(file = ".RData", version = NULL, ascii = FALSE,
   are now mainly of historical interest.  They can be more compact than
   binary saves where compression is not used, but are almost always
   slower to both read and write: binary saves compress much better than
-  ASCII ones.  Further, ASCII saves may not restore double/complex
-  values exactly, and what value is restored may depend on the \R
-  platform.
+  ASCII ones.  Further, decimal ASCII saves may not restore
+  double/complex values exactly, and what value is restored may depend
+  on the \R platform.
 
   Default values for the \code{ascii}, \code{compress}, \code{safe} and
   \code{version} arguments can be modified with the
@@ -116,6 +119,26 @@ save.image(file = ".RData", version = NULL, ascii = FALSE,
   (and see \code{\link{resaveRdaFiles}} for a way to do so from within \R).
 }
 
+\section{Parallel compression}{
+  That \code{file} can be a connection can be exploited to make use of
+  an external parallel compression utility such as \command{pigz}
+  (\url{http://zlib.net/pigz/}) or \command{pbzip2}
+  (\url{http://compression.ca/pbzip2/}) \emph{via} a \code{\link{pipe}}
+  connection.  For example, using 8 threads,
+\preformatted{    con <- pipe("pigz -p8 > fname.gz", "wb")
+    save(myObj, file = con); close(con)
+
+    con <- pipe("pbzip2 -p8 -9 > fname.bz2", "wb")
+    save(myObj, file = con); close(con)
+
+    con <- pipe("xz -T8 -6 -e > fname.xz", "wb")
+    save(myObj, file = con); close(con)
+}
+  where the last requires \command{xz} 5.1.1 or later built with support
+  for multiple threads (and parallel compression is only effective for
+  large objects: at level 6 it will compress in serialized chunks of 12MB).
+}
+
 \note{
   The most common reason for failure is lack of write permission in the
   current directory.  For \code{save.image} and for saving at the end of
@@ -152,6 +175,11 @@ save.image(file = ".RData", version = NULL, ascii = FALSE,
 
   One such \sQuote{later addition} was long vectors, introduced in \R
   3.0.0 and loadable only on 64-bit platforms.
+
+  Loading files saved with \code{ASCII = NA} requires a C99-compliant C
+  function \code{sscanf}: this is a problem on Windows, first worked
+  around in \R 3.1.2: they should be readable in earlier versions of \R
+  on all other platforms.
 }
 \seealso{
   \code{\link{dput}}, \code{\link{dump}}, \code{\link{load}},
diff --git a/src/library/base/man/scale.Rd b/src/library/base/man/scale.Rd
index 1b41cea..5899b5c 100644
--- a/src/library/base/man/scale.Rd
+++ b/src/library/base/man/scale.Rd
@@ -1,6 +1,6 @@
 % File src/library/base/man/scale.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2009 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2014 R Core Team
 % Distributed under GPL 2 or later
 
 \name{scale}
diff --git a/src/library/base/man/scan.Rd b/src/library/base/man/scan.Rd
index b423aeb..30f7360 100644
--- a/src/library/base/man/scan.Rd
+++ b/src/library/base/man/scan.Rd
@@ -1,6 +1,6 @@
 % File src/library/base/man/scan.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2014 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2016 R Core Team
 % Distributed under GPL 2 or later
 
 \name{scan}
@@ -51,14 +51,15 @@ scan(file = "", what = double(), nmax = -1, n = -1, sep = "",
     (or \code{scan}'s \code{fileEncoding} argument).
   }
 
-  \item{what}{the type of \code{what} gives the type of data to be read.
-    The supported types are \code{logical}, \code{integer}, \code{numeric},
-    \code{complex}, \code{character}, \code{raw} and \code{\link{list}}.
-    If \code{what} is a list, it is assumed that the lines of the data file
-    are records each containing \code{length(what)} items
-    (\sQuote{fields}) and the list components should have elements which
-    are one of the first six types listed or \code{NULL}, see section
-    \sQuote{Details} below.}
+  \item{what}{the \link{type} of \code{what} gives the type of data to
+    be read.  (Here \sQuote{type} is used in the sense of
+    \code{\link{typeof}}.)  The supported types are \code{logical},
+    \code{integer}, \code{numeric}, \code{complex}, \code{character},
+    \code{raw} and \code{\link{list}}.  If \code{what} is a list, it is
+    assumed that the lines of the data file are records each containing
+    \code{length(what)} items (\sQuote{fields}) and the list components
+    should have elements which are one of the first six (\link{atomic})
+    types listed or \code{NULL}, see section \sQuote{Details} below.}
 
   \item{nmax}{integer: the maximum number of data values to be read, or if
     \code{what} is a list, the maximum number of records to be read.  If
@@ -96,7 +97,9 @@ scan(file = "", what = double(), nmax = -1, n = -1, sep = "",
   \item{na.strings}{character vector.  Elements of this vector are to be
     interpreted as missing (\code{\link{NA}}) values.  Blank fields are
     also considered to be missing values in logical, integer, numeric
-    and complex fields.}
+    and complex fields.  Note that the test happens \emph{after} 
+    white space is stripped from the input, so \code{na.strings} values 
+    may need their own white space stripped in advance.}
 
   \item{flush}{logical: if \code{TRUE}, \code{scan} will flush to the
     end of the line after reading the last of the fields requested.
@@ -183,8 +186,8 @@ scan(file = "", what = double(), nmax = -1, n = -1, sep = "",
   \sQuote{White space} is defined for the purposes of this function as
   one or more contiguous characters from the set space, horizontal tab,
   carriage return and line feed.  It does not include form feed nor
-  vertical tab, but in Latin-1 and Windows 8-bit locales 'space'
-  includes non-breaking space.
+  vertical tab, but in Latin-1 and Windows 8-bit locales (but not UTF-8)
+  'space' includes the non-breaking space \samp{"\xa0"}.
 
   Empty numeric fields are always regarded as missing values.
   Empty character fields are scanned as empty character vectors, unless
diff --git a/src/library/base/man/search.Rd b/src/library/base/man/search.Rd
index d88024a..0dc63a5 100644
--- a/src/library/base/man/search.Rd
+++ b/src/library/base/man/search.Rd
@@ -1,16 +1,17 @@
 % File src/library/base/man/search.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2007 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2015 R Core Team
 % Distributed under GPL 2 or later
 
 \name{search}
 \title{Give Search Path for R Objects}
+\alias{search}
+\alias{searchpaths}
+\alias{.rmpkg}% not yet: to get pkg name from search()
 \usage{
 search()
 searchpaths()
 }
-\alias{search}
-\alias{searchpaths}
 \description{
   Gives a list of \code{\link{attach}}ed \emph{packages}
   (see \code{\link{library}}), and \R objects, usually
diff --git a/src/library/base/man/seek.Rd b/src/library/base/man/seek.Rd
index 49a5fe5..156a868 100644
--- a/src/library/base/man/seek.Rd
+++ b/src/library/base/man/seek.Rd
@@ -1,6 +1,6 @@
 % File src/library/base/man/seek.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2011 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2015 R Core Team
 % Distributed under GPL 2 or later
 
 \name{seek}
@@ -25,9 +25,9 @@ truncate(con, \dots)
   \item{con}{a \link{connection}.}
   \item{where}{numeric.  A file position (relative to the origin
     specified by \code{origin}), or \code{NA}.}
-  \item{rw}{character.  Empty or \code{"read"} or \code{"write"},
+  \item{rw}{character string.  Empty or \code{"read"} or \code{"write"},
     partial matches allowed.}
-  \item{origin}{character.  One of \code{"start"}, \code{"current"},
+  \item{origin}{character string.  One of \code{"start"}, \code{"current"},
     \code{"end"}: see \sQuote{Details}.}
   \item{\dots}{further arguments passed to or from other methods.}
 }
diff --git a/src/library/base/man/seq.Date.Rd b/src/library/base/man/seq.Date.Rd
index a0443c6..303746c 100644
--- a/src/library/base/man/seq.Date.Rd
+++ b/src/library/base/man/seq.Date.Rd
@@ -1,6 +1,6 @@
 % File src/library/base/man/seq.Date.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2014 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2017 R Core Team
 % Distributed under GPL 2 or later
 
 \name{seq.Date}
@@ -37,10 +37,6 @@
 \value{
   A vector of class \code{"Date"}.
 }
-\note{
-  Quarterly increments were specified by \code{by = "3 months"} prior to
-  \R 3.1.0.
-}
 \seealso{\code{\link{Date}}}
 
 \examples{
diff --git a/src/library/base/man/seq.POSIXt.Rd b/src/library/base/man/seq.POSIXt.Rd
index 0279ed7..c69f23e 100644
--- a/src/library/base/man/seq.POSIXt.Rd
+++ b/src/library/base/man/seq.POSIXt.Rd
@@ -1,6 +1,6 @@
 % File src/library/base/man/seq.POSIXt.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2014 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2017 R Core Team
 % Distributed under GPL 2 or later
 
 \name{seq.POSIXt}
@@ -48,10 +48,6 @@
 \value{
   A vector of class \code{"POSIXct"}.
 }
-\note{
-  Quarterly increments were specified by \code{by = "3 months"} prior to
-  \R 3.1.0.
-}
 
 \seealso{\code{\link{DateTimeClasses}}}
 
diff --git a/src/library/base/man/seq.Rd b/src/library/base/man/seq.Rd
index 52c7297..a5a64e6 100644
--- a/src/library/base/man/seq.Rd
+++ b/src/library/base/man/seq.Rd
@@ -1,5 +1,5 @@
 % File src/library/base/man/seq.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2013 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/base/man/sequence.Rd b/src/library/base/man/sequence.Rd
index f3492c8..1c6537a 100644
--- a/src/library/base/man/sequence.Rd
+++ b/src/library/base/man/sequence.Rd
@@ -1,5 +1,5 @@
 % File src/library/base/man/sequence.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2007 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/base/man/serialize.Rd b/src/library/base/man/serialize.Rd
index 5a5b30d..d5dfbed 100644
--- a/src/library/base/man/serialize.Rd
+++ b/src/library/base/man/serialize.Rd
@@ -1,6 +1,6 @@
 % File src/library/base/man/serialize.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2012 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2017 R Core Team
 % Distributed under GPL 2 or later
 
 \name{serialize}
@@ -21,9 +21,8 @@ unserialize(connection, refhook = NULL)
   \item{connection}{an open \link{connection} or (for \code{serialize})
     \code{NULL} or (for \code{unserialize}) a raw vector
     (see \sQuote{Details}).}
-  \item{ascii}{a logical.  If \code{TRUE}, an ASCII representation is
-    written; otherwise binary one.  The default is \code{TRUE} for a
-    text-mode connection and \code{FALSE} otherwise.
+  \item{ascii}{a logical.  If \code{TRUE} or \code{NA}, an ASCII
+    representation is written; otherwise (default) a binary one.
     See also the comments in the help for \code{\link{save}}.}
   \item{xdr}{a logical: if a binary representation is used, should a
     big-endian one (XDR) be used?}
@@ -63,11 +62,12 @@ unserialize(connection, refhook = NULL)
   and \code{A} for ASCII serialization, followed by a new line.  (The
   format used is identical to that used by \code{\link{readRDS}}.)
 
-  The option of \code{xdr = FALSE} was introduced in \R 2.15.0.  As
-  almost all systems in current use are little-endian, this can be used
-  to avoid byte-shuffling at both ends when transferring data from one
-  little-endian machine to another.  Depending on the system, this can
-  speed up serialization and unserialization by a factor of up to 3x.
+  As almost all systems in current use are little-endian, \code{xdr =
+  FALSE} can be used to avoid byte-shuffling at both ends when
+  transferring data from one little-endian machine to another (or
+  between processes on the same machine).  Depending on the system, this
+  can speed up serialization and unserialization by a factor of up to
+  3x.
 }
 \section{Warning}{
   These functions have provided a stable interface since \R 2.4.0 (when
diff --git a/src/library/base/man/setTimeLimit.Rd b/src/library/base/man/setTimeLimit.Rd
index f519e0a..5ef1493 100644
--- a/src/library/base/man/setTimeLimit.Rd
+++ b/src/library/base/man/setTimeLimit.Rd
@@ -1,6 +1,6 @@
 % File src/library/base/man/setTimeLimit.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2011 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2016 R Core Team
 % Distributed under GPL 2 or later
 
 \name{setTimeLimit}
@@ -17,8 +17,8 @@ setTimeLimit(cpu = Inf, elapsed = Inf, transient = FALSE)
 setSessionTimeLimit(cpu = Inf, elapsed = Inf)
 }
 \arguments{
-  \item{cpu}{double.  Limit on total cpu time.}
-  \item{elapsed}{double.  Limit on elapsed time.}
+  \item{cpu, elapsed}{double (of length one).  Set a limit on
+    the total or elapsed cpu time in seconds, respectively.}
   \item{transient}{logical.  If \code{TRUE}, the limits apply only to
     the rest of the current computation.}
 }
diff --git a/src/library/base/man/sets.Rd b/src/library/base/man/sets.Rd
index cca73b3..47e2333 100644
--- a/src/library/base/man/sets.Rd
+++ b/src/library/base/man/sets.Rd
@@ -1,5 +1,5 @@
 % File src/library/base/man/sets.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2011 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/base/man/shQuote.Rd b/src/library/base/man/shQuote.Rd
index 48e154d..7a64e5f 100644
--- a/src/library/base/man/shQuote.Rd
+++ b/src/library/base/man/shQuote.Rd
@@ -1,6 +1,6 @@
 % File src/library/base/man/shQuote.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2007 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2015 R Core Team
 % Distributed under GPL 2 or later
 
 \name{shQuote}
@@ -10,13 +10,13 @@
   Quote a string to be passed to an operating system shell.
 }
 \usage{
-shQuote(string, type = c("sh", "csh", "cmd"))
+shQuote(string, type = c("sh", "csh", "cmd", "cmd2"))
 }
 \arguments{
   \item{string}{a character vector, usually of length one.}
-  \item{type}{character: the type of shell.  Partial matching is
-    supported.  \code{"cmd"} refers to the Windows NT shell, and is the
-    default under Windows.}
+  \item{type}{character: the type of shell quoting.  Partial matching is
+    supported.  \code{"cmd"} and \code{"cmd2"} refer to the Windows shell.
+    \code{"cmd"} is the default under Windows.} 
 }
 \details{
   The default type of quoting supported under Unix-alikes is that for
@@ -36,31 +36,34 @@ shQuote(string, type = c("sh", "csh", "cmd"))
   exclamation mark and double quote).  As a last resort, we need to
   split the string into pieces not containing single quotes and surround
   each with single quotes, and the single quotes with double quotes.
-
-#ifdef windows
-  The Windows shell supports only double quoting.  All this
-  implementation does is to surround the string by double quotes and
-  escape internal double quotes by a backslash.  As Windows path names
-  cannot contain double quotes, this makes \code{shQuote} safe for use
-  with file paths in \code{\link{system}}, and with \code{\link{shell}}
-  if the default shell is used.
-
-  It will usually be safe to use \code{shQuote} to quote arguments of a
-  command, but because \code{\link{system}} does not use a shell,
-  interpretation of quoted arguments is done by the run-time code of the
-  executable.  This may depend on the compiler used: Microsoft's rules
-  for the C run-time are given at
-  \url{http://msdn2.microsoft.com/en-us/library/ms880421.aspx}.
-#endif
+  
+  In Windows, command line interpretation is done by the application
+  as well as the shell.  It may depend on the compiler used:
+  Microsoft's rules for the C run-time are given at 
+  \url{https://msdn.microsoft.com/library/ms880421}. It may depend on
+  the whim of the programmer of the application: check its
+  documentation.  The \code{type = "cmd"} quoting surrounds the string
+  by double quotes and escapes internal double quotes by a backslash.
+  As Windows path names cannot contain double quotes, this makes
+  \code{shQuote} safe for use with many applications when used with
+  \code{\link{system}} or \code{\link{system2}}.  The Windows
+  \command{cmd.exe} shell (used by default with \code{\link{shell}})
+  uses \code{type = "cmd2"} quoting:  special characters are prefixed
+  with \code{"^"}.  In some cases, two types of quoting should be
+  used:  first for the application, and then \code{type = "cmd2"} 
+  for \command{cmd.exe}.  See the examples below.  
 }
-\references{
-  Loukides, M. \emph{et al} (2002)
-  \emph{Unix Power Tools} Third Edition.  O'Reilly.  Section 27.12.
+  
+\references{ Loukides, M. \emph{et al} (2002) \emph{Unix Power Tools}
+  Third Edition. O'Reilly.  Section 27.12.
+  
+  Discussion in \PR{16636}.
 
-  \url{http://www.mhuffman.com/notes/dos/bash_cmd.htm}
+% gone in Jan 2015  
+% \url{http://www.mhuffman.com/Notes/dos/bash_cmd.htm}
 }
 \seealso{
-  \code{Quotes} for quoting \R code.
+  \link{Quotes} for quoting \R code.
 
   \code{\link{sQuote}} for quoting English text.
 }
@@ -76,8 +79,12 @@ cat(shQuote(tryit), "\n")
 \dontrun{system(paste("echo", shQuote(tryit)))}
 cat(shQuote(tryit, type = "csh"), "\n")
 
-## Windows-only example.
-perlcmd <- 'print "Hello World\\n";'
-\dontrun{shell(paste("perl -e", shQuote(perlcmd, type = "cmd")))}
+## Windows-only example, assuming cmd.exe:
+perlcmd <- 'print "Hello World\\\\n";'
+\dontrun{
+shell(shQuote(paste("perl -e", 
+                    shQuote(perlcmd, type = "cmd")),
+              type = "cmd2"))
+}
 }
 \keyword{utilities}
diff --git a/src/library/base/man/showConnections.Rd b/src/library/base/man/showConnections.Rd
index ea20004..969df18 100644
--- a/src/library/base/man/showConnections.Rd
+++ b/src/library/base/man/showConnections.Rd
@@ -1,5 +1,5 @@
 % File src/library/base/man/showConnections.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2011 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/base/man/sign.Rd b/src/library/base/man/sign.Rd
index 464944d..7552a22 100644
--- a/src/library/base/man/sign.Rd
+++ b/src/library/base/man/sign.Rd
@@ -1,5 +1,5 @@
 % File src/library/base/man/sign.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2010 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/base/man/sink.Rd b/src/library/base/man/sink.Rd
index dec8548..40f9ed9 100644
--- a/src/library/base/man/sink.Rd
+++ b/src/library/base/man/sink.Rd
@@ -1,6 +1,6 @@
 % File src/library/base/man/sink.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2011 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2016 R Core Team
 % Distributed under GPL 2 or later
 
 \name{sink}
@@ -20,13 +20,13 @@ sink.number(type = c("output", "message"))
   \item{append}{logical.  If \code{TRUE}, output will be appended to
     \code{file}; otherwise, it will overwrite the contents of
     \code{file}.}
-  \item{type}{character.  Either the output stream or the messages
-    stream.}
+  \item{type}{character string.  Either the output stream or the messages
+    stream.  The name will be partially matched so can be abbreviated.}
   \item{split}{logical: if \code{TRUE}, output will be sent to the new
     sink and to the current output stream, like the Unix program \code{tee}.}
 }
 \description{
-  \code{sink} diverts \R output to a connection.
+  \code{sink} diverts \R output to a connection (and stops such diversions).
 
   \code{sink.number()} reports how many diversions are in use.
 
@@ -34,7 +34,8 @@ sink.number(type = c("output", "message"))
   connection currently being used for error messages.
 }
 \details{
-  \code{sink} diverts \R output to a connection.  If \code{file} is a
+  \code{sink} diverts \R output to a connection (and must be used again
+  to finish such a diversion, see below!).  If \code{file} is a
   character string, a file connection with that name will be established
   for the duration of the diversion.
 
@@ -99,14 +100,14 @@ sink("sink-examp.txt")
 i <- 1:10
 outer(i, i, "*")
 sink()
-unlink("sink-examp.txt")
+\dontshow{unlink("sink-examp.txt")}% don't show what confuses newbies
 \donttest{
 ## capture all the output to a file.
 zz <- file("all.Rout", open = "wt")
 sink(zz)
 sink(zz, type = "message")
 try(log("a"))
-## back to the console
+## revert output back to the console -- only then access the file!
 sink(type = "message")
 sink()
 file.show("all.Rout")
diff --git a/src/library/base/man/slice.index.Rd b/src/library/base/man/slice.index.Rd
index 312342d..61b12bd 100644
--- a/src/library/base/man/slice.index.Rd
+++ b/src/library/base/man/slice.index.Rd
@@ -1,5 +1,5 @@
 % File src/library/base/man/slice.index.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2007 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/base/man/slotOp.Rd b/src/library/base/man/slotOp.Rd
index d372821..5a2f8fb 100644
--- a/src/library/base/man/slotOp.Rd
+++ b/src/library/base/man/slotOp.Rd
@@ -1,6 +1,6 @@
 % File src/library/base/man/slotOp.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2013 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2017 R Core Team
 % Distributed under GPL 2 or later
 
 \name{slotOp}
@@ -37,9 +37,6 @@ object at name <- value
   already exists on the object (which it should if the object is really
   from the class it claims to be).
 
-  Prior to \R 3.0.0 the replacement operator was in package
-  \pkg{methods} and had a different test for validity of \code{name}.
-
   These are internal generic operators: see \link{InternalMethods}.
 }
 \value{
diff --git a/src/library/base/man/socketSelect.Rd b/src/library/base/man/socketSelect.Rd
index 71e9404..87b8cc4 100644
--- a/src/library/base/man/socketSelect.Rd
+++ b/src/library/base/man/socketSelect.Rd
@@ -1,5 +1,5 @@
 % File src/library/base/man/socketSelect.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2007 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/base/man/solve.Rd b/src/library/base/man/solve.Rd
index a478c95..d3778c3 100644
--- a/src/library/base/man/solve.Rd
+++ b/src/library/base/man/solve.Rd
@@ -1,6 +1,6 @@
 % File src/library/base/man/solve.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2014 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2015 R Core Team
 % Distributed under GPL 2 or later
 
 \name{solve}
@@ -30,8 +30,7 @@ solve(a, b, \dots)
 }
 \details{
   \code{a} or \code{b} can be complex, but this uses double complex
-  arithmetic which might not be available on all platforms and LAPACK
-  will always be used.
+  arithmetic which might not be available on all platforms.
 
   The row and column names of the result are taken from the column names
   of \code{a} and of \code{b} respectively.  If \code{b} is missing the
@@ -42,6 +41,10 @@ solve(a, b, \dots)
   For back-compatibility \code{a} can be a (real) QR decomposition,
   although \code{\link{qr.solve}} should be called in that case.
   \code{\link{qr.solve}} can handle non-square systems.
+
+  Unsuccessful results from the underlying LAPACK code will result in an
+  error giving a positive error code: these can only be interpreted by
+  detailed study of the FORTRAN code.
 }
 \source{
   The default method is an interface to the LAPACK routines \code{DGESV}
diff --git a/src/library/base/man/sort.Rd b/src/library/base/man/sort.Rd
index 20ddc5c..120e66b 100644
--- a/src/library/base/man/sort.Rd
+++ b/src/library/base/man/sort.Rd
@@ -1,6 +1,6 @@
 % File src/library/base/man/sort.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2013 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2014 R Core Team
 % Distributed under GPL 2 or later
 
 \name{sort}
@@ -20,14 +20,16 @@ sort(x, decreasing = FALSE, \dots)
 \method{sort}{default}(x, decreasing = FALSE, na.last = NA, \dots)
 
 sort.int(x, partial = NULL, na.last = NA, decreasing = FALSE,
-         method = c("shell", "quick"), index.return = FALSE)
+         method = c("auto", "shell", "quick", "radix"), index.return = FALSE)
 }
 \arguments{
   \item{x}{for \code{sort} an \R object with a class or a numeric,
     complex, character or logical vector.  For \code{sort.int}, a
     numeric, complex, character or logical vector, or a factor.}
   \item{decreasing}{logical.  Should the sort be increasing or decreasing?
-     Not available for partial sorting.}
+    For the \code{"radix"} method, this can be a vector of
+    length equal to the number of arguments in \code{\dots}. For the
+    other methods, it must be length one. Not available for partial sorting.}
   \item{\dots}{arguments to be passed to or from methods or (for the
     default methods and objects without a class) to \code{sort.int}.}
   \item{na.last}{for controlling the treatment of \code{NA}s.
@@ -35,10 +37,11 @@ sort.int(x, partial = NULL, na.last = NA, decreasing = FALSE,
     \code{FALSE}, they are put first; if \code{NA}, they are removed.}
   \item{partial}{\code{NULL} or a  vector of indices for partial sorting.}
   \item{method}{character string specifying the algorithm used.  Not
-    available for partial sorting.}
+    available for partial sorting.  Can be abbreviated.}
   \item{index.return}{logical indicating if the ordering index vector should
-    be returned as well; this is only available for a few cases, the default
-    \code{na.last = NA} and full sorting of non-factors.}
+    be returned as well. Supported by \code{method == "radix"} for any
+    \code{na.last} mode and data type, and the other methods when
+    \code{na.last = NA} (the default) and fully sorting non-factors.}
 }
 \details{
   \code{sort} is a generic function for which methods can be written,
@@ -53,7 +56,12 @@ sort.int(x, partial = NULL, na.last = NA, decreasing = FALSE,
   Complex values are sorted first by the real part, then the imaginary
   part.
 
-  The sort order for character vectors will depend on the collating
+  The \code{"auto"} method selects \code{"radix"} for short (less than
+  \eqn{2^{31}}{2^31} elements) numeric vectors, integer vectors, logical
+  vectors and factors; otherwise, \code{"shell"}.
+  
+  Except for method \code{"radix"},
+  the sort order for character vectors will depend on the collating
   sequence of the locale in use: see \code{\link{Comparison}}.
   The sort order for factors is the order of their levels (which is
   particularly appropriate for ordered factors).
@@ -85,9 +93,38 @@ sort.int(x, partial = NULL, na.last = NA, decreasing = FALSE,
   performance in the rare worst case.  (Peto's modification using a
   pseudo-random midpoint is used to make the worst case rarer.)  This is
   not a stable sort, and ties may be reordered.
-
-  Factors with less than 100,000 levels are sorted by radix sorting when
-  \code{method} is not supplied: see \code{\link{sort.list}}.
+  
+  Method \code{"radix"} relies on simple hashing to scale time linearly
+  with the input size, i.e., its asymptotic time complexity is O(n). The
+  specific variant and its implementation originated from the data.table
+  package and are due to Matt Dowle and Arun Srinivasan.  For small
+  inputs (< 200), the implementation uses an insertion sort (O(n^2))
+  that operates in-place to avoid the allocation overhead of the radix
+  sort. For integer vectors of range less than 100,000, it switches to a
+  simpler and faster linear time counting sort. In all cases, the sort
+  is stable; the order of ties is preserved. It is the default method
+  for integer vectors and factors.
+
+  The \code{"radix"} method generally outperforms the other methods,
+  especially for character vectors and small integers. Compared to quick
+  sort, it is slightly faster for vectors with large integer or real
+  values (but unlike quick sort, radix is stable and supports all
+  \code{na.last} options). The implementation is orders of magnitude
+  faster than shell sort for character vectors, in part thanks to clever
+  use of the internal \code{CHARSXP} table.
+
+  However, there are some caveats with the radix sort:
+  \itemize{
+    \item{
+      If \code{x} is a \code{character} vector, all elements must share
+      the same encoding. Only UTF-8 (including ASCII) and Latin-1
+      encodings are supported. Collation always follows the "C" locale.
+    }
+    \item{
+      Long vectors (with more than 2^32 elements) and \code{complex}
+      vectors are not supported yet.
+    }
+  }
 }
 
 \value{
@@ -97,14 +134,17 @@ sort.int(x, partial = NULL, na.last = NA, decreasing = FALSE,
   specific method the default method will be used and is equivalent to
   \code{x[order(x, ...)]}: this depends on the class having a suitable
   method for \code{[} (and also that \code{\link{order}} will work,
-  which is not the case for a class based on a list).
+  which requires a \code{\link{xtfrm}} method).
 
   For \code{sort.int} the value is the sorted vector unless
   \code{index.return} is true, when the result is a list with components
   named \code{x} and \code{ix} containing the sorted numbers and the
   ordering index vector.  In the latter case, if \code{method ==
     "quick"} ties may be reversed in the ordering (unlike
-  \code{sort.list}) as quicksort is not stable.  NB: the index vector
+  \code{sort.list}) as quicksort is not stable.  For \code{method ==
+  "radix"}, \code{index.return} is supported for all \code{na.last}
+  modes. The other methods only support \code{index.return}
+  when \code{na.last} is \code{NA}. The index vector
   refers to element numbers \emph{after removal of \code{NA}s}: see
   \code{\link{order}} if you want the original element numbers.
 
@@ -121,6 +161,10 @@ sort.int(x, partial = NULL, na.last = NA, decreasing = FALSE,
   \emph{The New S Language}.
   Wadsworth & Brooks/Cole.
 
+  Knuth, D. E. (1998)
+  \emph{The Art of Computer Programming, Volume 3: Sorting and
+    Searching.} 2nd ed. Addison-Wesley.
+  
   Sedgewick, R. (1986)
   A new upper bound for Shell sort.
   \emph{J. Algorithms} \bold{7}, 159--173.
@@ -143,10 +187,10 @@ x <- swiss$Education[1:25]
 x; sort(x); sort(x, partial = c(10, 15))
 
 ## illustrate 'stable' sorting (of ties):
-sort(c(10:3, 2:12), method = "sh", index.return = TRUE) # is stable
+sort(c(10:3, 2:12), method = "shell", index.return = TRUE) # is stable
 ## $x : 2  3  3  4  4  5  5  6  6  7  7  8  8  9  9 10 10 11 12
 ## $ix: 9  8 10  7 11  6 12  5 13  4 14  3 15  2 16  1 17 18 19
-sort(c(10:3, 2:12), method = "qu", index.return = TRUE) # is not
+sort(c(10:3, 2:12), method = "quick", index.return = TRUE) # is not
 ## $x : 2  3  3  4  4  5  5  6  6  7  7  8  8  9  9 10 10 11 12
 ## $ix: 9 10  8  7 11  6 12  5 13  4 14  3 15 16  2 17  1 18 19
 
@@ -164,7 +208,7 @@ for(is in seq_len(Sim)){
   x <- rnorm(N)
   c1[is] <- system.time(for(i in 1:rep) sort(x, method = "shell"))[1]
   c2[is] <- system.time(for(i in 1:rep) sort(x, method = "quick"))[1]
-  stopifnot(sort(x, method = "s") == sort(x, method = "q"))
+  stopifnot(sort(x, method = "shell") == sort(x, method = "quick"))
 }
 rbind(ShellSort = c1, QuickSort = c2)
 cat("Speedup factor of quick sort():\n")
@@ -174,7 +218,9 @@ summary({qq <- c1 / c2; qq[is.finite(qq)]})
 x <- rnorm(1e7)
 system.time(x1 <- sort(x, method = "shell"))
 system.time(x2 <- sort(x, method = "quick"))
+system.time(x3 <- sort(x, method = "radix"))
 stopifnot(identical(x1, x2))
+stopifnot(identical(x1, x3))
 }}
 \keyword{univar}
 \keyword{manip}
diff --git a/src/library/base/man/source.Rd b/src/library/base/man/source.Rd
index 1be975f..f3fb812 100644
--- a/src/library/base/man/source.Rd
+++ b/src/library/base/man/source.Rd
@@ -1,33 +1,46 @@
 % File src/library/base/man/source.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2012 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2017 R Core Team
 % Distributed under GPL 2 or later
 
-\newcommand{\CRANpkg}{\href{http://CRAN.R-project.org/package=#1}{\pkg{#1}}}
-\newcommand{\sspace}{\ifelse{latex}{\out{~}}{ }}
-
 \name{source}
-\title{Read R Code from a File or a Connection}
+\title{Read R Code from a File, a Connection or Expressions}
+\alias{source}
+\alias{withAutoprint}
 \description{
   \code{source} causes \R to accept its input from the named file or URL
-  or connection.  Input is read and \code{\link{parse}}d from that file
+  or connection or expressions directly.  Input is read and
+  \code{\link{parse}}d from that file
   until the end of the file is reached, then the parsed expressions are
   evaluated sequentially in the chosen environment.
+
+  \code{withAutoprint(exprs)} is a wrapper for \code{source(exprs =
+  exprs, ..)} with different defaults.  Its main purpose is to evaluate
+  and auto-print expressions as if in a toplevel context, e.g, as in the
+  \R console.
 }
 \usage{
 source(file, local = FALSE, echo = verbose, print.eval = echo,
+       exprs, spaced = use_file,
        verbose = getOption("verbose"),
        prompt.echo = getOption("prompt"),
-       max.deparse.length = 150, chdir = FALSE,
+       max.deparse.length = 150, width.cutoff = 60L,
+       deparseCtrl = "showAttributes",
+       chdir = FALSE,
        encoding = getOption("encoding"),
        continue.echo = getOption("continue"),
        skip.echo = 0, keep.source = getOption("keep.source"))
+
+withAutoprint(exprs, evaluated = FALSE, local = parent.frame(),
+              print. = TRUE, echo = TRUE, max.deparse.length = Inf,
+              width.cutoff = max(20, getOption("width")),
+              deparseCtrl = c("keepInteger", "showAttributes", "keepNA"),
+              \dots)
 }
-\alias{source}
 \arguments{
-  \item{file}{a \link{connection} or a character string giving the pathname
-    of the file or URL to read from.  \code{""} indicates the connection
-    \code{\link{stdin}()}.}
+  \item{file}{a \link{connection} or a character string giving the
+    pathname of the file or URL to read from.  \code{""} indicates the
+    connection \code{\link{stdin}()}.}
   \item{local}{\code{TRUE}, \code{FALSE} or an environment, determining
     where the parsed expressions are evaluated.  \code{FALSE} (the
     default) corresponds to the user's workspace (the global
@@ -35,9 +48,22 @@ source(file, local = FALSE, echo = verbose, print.eval = echo,
     \code{source} is called.}
   \item{echo}{logical; if \code{TRUE}, each expression is printed
     after parsing, before evaluation.}
-  \item{print.eval}{logical; if \code{TRUE}, the result of
+  \item{print.eval, print.}{logical; if \code{TRUE}, the result of
     \code{eval(i)} is printed for each expression \code{i}; defaults
     to the value of \code{echo}.}
+  \item{exprs}{for \code{source()} and \code{withAutoprint(*, evaluated=TRUE)}:
+    \emph{instead} of specifying \code{file}, an
+    \code{\link{expression}}, \code{\link{call}}, or \code{\link{list}}
+    of \code{\link{call}}'s, but \emph{not} an unevaluated \dQuote{expression}.
+
+    for \code{withAutoprint()} (with default \code{evaluated=FALSE}):
+    one or more unevaluated \dQuote{expressions}.
+  }
+  \item{evaluated}{logical indicating that \code{exprs} is passed to
+    \code{source(exprs= *)} and hence must be evaluated, i.e., a formal
+    \code{expression}, \code{call} or \code{list} of calls.}
+  \item{spaced}{logical indicating if newline (hence empty line) should
+    be printed before each expression (when \code{echo = TRUE}).}
   \item{verbose}{if \code{TRUE}, more diagnostics (than just
     \code{echo = TRUE}) are printed during parsing and evaluation of
     input, including extra info for \bold{each} expression.}
@@ -46,6 +72,14 @@ source(file, local = FALSE, echo = verbose, print.eval = echo,
   \item{max.deparse.length}{integer; is used only if \code{echo} is
     \code{TRUE} and gives the maximal number of characters output for
     the deparse of a single expression.}
+  \item{width.cutoff}{integer, passed to \code{\link{deparse}()} which
+    is used (only) when there are no source references.}
+  \item{deparseCtrl}{\code{\link{character}} vector, passed as
+    \code{control} to \code{\link{deparse}()}, see also
+    \code{\link{.deparseOpts}}.  In \R version <= 3.3.x, this was
+    hardcoded to \code{"showAttributes"}, which is the default
+    currently; \code{deparseCtrl = "all"} may be preferable, when strict
+    back compatibility is not of importance.}
   \item{chdir}{logical; if \code{TRUE} and \code{file} is a pathname,
     the \R working directory is temporarily changed to the directory
     containing \code{file} for evaluating.}
@@ -59,6 +93,8 @@ source(file, local = FALSE, echo = verbose, print.eval = echo,
     file to skip if \code{echo = TRUE}.}
   \item{keep.source}{logical: should the source formatting be retained
     when echoing expressions, if possible?}
+  \item{\dots}{(for \code{withAutoprint()}:) further (non-file related)
+    arguments to be passed to \code{source(.)}.}
 }
 \details{
   Note that running code via \code{source} differs in a few respects
@@ -140,6 +176,17 @@ source(file, local = FALSE, echo = verbose, print.eval = echo,
   directives.
 }
 \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:
+if(someCond) withAutoprint({
+   x <- 1:12
+   x-1
+   (y <- (x-5)^2)
+   z <- y
+   z - 10
+})
+
 ## If you want to source() a bunch of files, something like
 ## the following may be useful:
  sourceDir <- function(path, trace = TRUE, ...) {
@@ -149,6 +196,15 @@ source(file, local = FALSE, echo = verbose, print.eval = echo,
        if(trace) cat("\n")
     }
  }
+
+suppressWarnings( rm(x,y) ) # remove 'x' or 'y' from global env
+withAutoprint({ x <- 1:2; cat("x=",x,"\n"); y <- x^2 })
+## x and y now exist:
+stopifnot(identical(x, 1:2), identical(y, x^2))
+
+withAutoprint({ formals(sourceDir); body(sourceDir) },
+              max.dep = 20, verbose = TRUE)
+%% --> tests in  ../../../../tests/eval-etc.R
 }
 \keyword{file}
 \keyword{programming}
diff --git a/src/library/base/man/split.Rd b/src/library/base/man/split.Rd
index f09096d..68b8897 100644
--- a/src/library/base/man/split.Rd
+++ b/src/library/base/man/split.Rd
@@ -1,6 +1,6 @@
 % File src/library/base/man/split.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2012 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2016 R Core Team
 % Distributed under GPL 2 or later
 
 \name{split}
@@ -19,8 +19,10 @@
   \code{split}.
 }
 \usage{
-split(x, f, drop = FALSE, ...)
-split(x, f, drop = FALSE, ...) <- value
+split(x, f, drop = FALSE, \dots)
+\method{split}{default}(x, f, drop = FALSE, sep = ".", lex.order = FALSE, \dots)
+
+split(x, f, drop = FALSE, \dots) <- value
 unsplit(value, f, drop = FALSE)
 }
 \arguments{
@@ -32,6 +34,10 @@ unsplit(value, f, drop = FALSE)
     (if \code{f} is a \code{factor} or a list).}
   \item{value}{a list of vectors or data frames compatible with a
     splitting of \code{x}. Recycling applies if the lengths do not match.}
+  \item{sep}{character string, passed to \code{\link{interaction}} in the
+    case where \code{f} is a \code{\link{list}}.}
+  \item{lex.order}{logical, passed to \code{\link{interaction}} when
+    \code{f} is a list.}
   \item{\dots}{further potential arguments passed to methods.}
 }
 \details{
@@ -41,8 +47,8 @@ unsplit(value, f, drop = FALSE)
   likewise, provided they are invoked explicitly.
 
   \code{unsplit} works with lists of vectors or data frames (assumed to
-  have compatible structure, as if created by \code{split}). It puts
-  elements or rows back in the positions given by \code{f}. In the data
+  have compatible structure, as if created by \code{split}).  It puts
+  elements or rows back in the positions given by \code{f}.  In the data
   frame case, row names are obtained by unsplitting the row name
   vectors from the elements of \code{value}.
 
@@ -52,9 +58,10 @@ unsplit(value, f, drop = FALSE)
   Any missing values in \code{f} are dropped together with the
   corresponding values of \code{x}.
 
-  The default method calls \code{\link{interaction}}.  If the levels of
-  the factors contain \samp{.} they may not be split as expected, so
-  the method has argument \code{sep} which is use to join the levels.
+  The default method calls \code{\link{interaction}} when \code{f} is a
+  \code{\link{list}}.  If the levels of the factors contain \samp{.}
+  the factors may not be split as expected, unless \code{sep} is set to
+  string not present in the factor \code{\link{levels}}.
 }
 \value{
   The value returned from \code{split} is a list of vectors containing
diff --git a/src/library/base/man/sprintf.Rd b/src/library/base/man/sprintf.Rd
index 49590e5..e900b04 100644
--- a/src/library/base/man/sprintf.Rd
+++ b/src/library/base/man/sprintf.Rd
@@ -1,6 +1,6 @@
 % File src/library/base/man/sprintf.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2014 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2016 R Core Team
 % Distributed under GPL 2 or later
 
 \name{sprintf}
@@ -19,7 +19,7 @@ gettextf(fmt, \dots, domain = NULL)
   \item{fmt}{a character vector of format strings, each of up to 8192 bytes.}
   \item{\dots}{values to be passed into \code{fmt}.  Only logical,
     integer, real and character vectors are supported, but some coercion
-    will be done: see the \sQuote{Details} section.}
+    will be done: see the \sQuote{Details} section. Up to 100.}
   \item{domain}{see \code{\link{gettext}}.}
 }
 \details{
@@ -133,7 +133,7 @@ gettextf(fmt, \dots, domain = NULL)
     }
   }
   Further, immediately after \code{\%} may come \code{1$} to \code{99$}
-  to refer to numbered argument: this allows arguments to be
+  to refer to a numbered argument: this allows arguments to be
   referenced out of order and is mainly intended for translators of
   error messages.  If this is done it is best if all formats are
   numbered: if not the unnumbered ones process the arguments in order.
@@ -186,7 +186,7 @@ gettextf(fmt, \dots, domain = NULL)
   Describes the format options in table B-1 in the Appendix.
 
   The C Standards, especially ISO/IEC 9899:1999 for \sQuote{C99}.  Links
-  can be found at \url{http://developer.r-project.org/Portability.html}.
+  can be found at \url{https://developer.r-project.org/Portability.html}.
 
   \command{man sprintf} on a Unix-alike system.
 }
diff --git a/src/library/base/man/srcfile.Rd b/src/library/base/man/srcfile.Rd
index 431144d..945bdb8 100644
--- a/src/library/base/man/srcfile.Rd
+++ b/src/library/base/man/srcfile.Rd
@@ -1,9 +1,10 @@
 % File src/library/base/man/srcfile.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2011 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2016 R Core Team
 % Distributed under GPL 2 or later
 
 \name{srcfile}
+\title{References to Source Files and Code}
 \alias{srcfile}
 \alias{srcfilecopy}
 \alias{getSrcLines}
@@ -25,9 +26,12 @@
 \alias{open.srcfilealias}
 \alias{close.srcfilealias}
 
-\title{References to source files}
 \description{
-These functions are for working with source files.
+  These functions are for working with source files and more generally
+  with \dQuote{source references} (\code{"srcref"}), i.e., references to
+  source code.  The resulting data is used for printing and source level
+  debugging, and is typically available in interactive \R sessions,
+  namely when \code{\link{options}(keep.source = TRUE)}.
 }
 \usage{
 srcfile(filename, encoding = getOption("encoding"), Enc = "unknown")
@@ -41,7 +45,7 @@ srcref(srcfile, lloc)
 \method{close}{srcfile}(con, \dots)
 \method{print}{srcref}(x, useSource = TRUE, \dots)
 \method{summary}{srcref}(object, useSource = FALSE, \dots)
-\method{as.character}{srcref}(x, useSource = TRUE, \dots)
+\method{as.character}{srcref}(x, useSource = TRUE, to = x, \dots)
 .isOpen(srcfile)
 }
 \arguments{
@@ -60,6 +64,8 @@ srcref(srcfile, lloc)
   \item{x, object, con}{ An object of the appropriate class. }
   \item{useSource}{ Whether to read the \code{srcfile} to obtain the
     text of a \code{srcref}. }
+  \item{to}{ An optional second \code{srcref} object to mark the end
+    of the character range. }
   \item{\dots}{ Additional arguments to the methods; these will be ignored. }
 }
 \details{
@@ -87,11 +93,13 @@ srcref(srcfile, lloc)
   \code{srcfile}.
 
   The \code{srcref} function produces an object of class
-  \code{srcref}, which describes a range of characters in a \code{
-    srcfile}.  The \code{lloc} value gives the following values:
+  \code{srcref}, which describes a range of characters in a
+  \code{srcfile}.
+  The \code{lloc} value gives the following values:
 \preformatted{c(first_line, first_byte, last_line, last_byte, first_column,
   last_column, first_parsed, last_parsed)
-}. Bytes (elements 2, 4) and
+}
+  Bytes (elements 2, 4) and
   columns (elements 5, 6) may be different due to multibyte
   characters.  If only four values are given, the columns and bytes
   are assumed to match.  Lines (elements 1, 3) and parsed lines (
@@ -109,10 +117,13 @@ srcref(srcfile, lloc)
   Methods are defined for \code{print}, \code{summary} and
   \code{as.character} for class \code{srcref}.  The \code{as.character}
   method will read the associated source file to obtain the text
-  corresponding to the reference.  The exact behaviour depends on the
+  corresponding to the reference.  If the \code{to} argument is given,
+  it should be a second \code{srcref} that follows the first, in the
+  same file; they will be treated as one reference to the whole
+  range.  The exact behaviour depends on the
   class of the source file.  If the source file inherits from
-  class \code{"srcfilecopy"}, the lines are taken from the saved copy
-  using the "parsed" line counts.  If not, an attempt
+  class \code{srcfilecopy}, the lines are taken from the saved copy
+  using the \dQuote{parsed} line counts.  If not, an attempt
   is made to read the file, and the original line numbers of the
   \code{srcref} record (i.e., elements 1 and 3) are used.  If an error
   occurs (e.g., the file no longer exists), text like
@@ -143,7 +154,9 @@ srcref(srcfile, lloc)
 \code{srcref} returns a \code{srcref} object.
 }
 \seealso{
-\code{\link{getSrcFilename}} for extracting information from a source reference.
+  \code{\link{getSrcFilename}} for extracting information from a source
+  reference, or \code{\link{removeSource}} to remove it from a
+  (non-primitive) function (aka \sQuote{closure}).
 }
 \author{Duncan Murdoch}
 \examples{\donttest{ # has timestamp
diff --git a/src/library/base/man/standardGeneric.Rd b/src/library/base/man/standardGeneric.Rd
index d9f329a..547eb49 100644
--- a/src/library/base/man/standardGeneric.Rd
+++ b/src/library/base/man/standardGeneric.Rd
@@ -1,23 +1,29 @@
 % File src/library/base/man/standardGeneric.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2007 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2016 R Core Team
 % Distributed under GPL 2 or later
 
 \name{standardGeneric}
 \alias{standardGeneric}
 \title{Formal Method System -- Dispatching S4 Methods}
-% and other Placeholders
 \description{
   The function \code{standardGeneric} initiates dispatch of S4
   methods: see the references and the documentation of the
   \pkg{methods} package.  Usually, calls to this function are
   generated automatically and not explicitly by the programmer.
 }
-  % was "and do not need to be called directly in any case."
-  % but standardGeneric() should be "called directly" , right?
 \usage{
 standardGeneric(f, fdef)
 }
+\arguments{
+  \item{f}{
+    The name of the generic.
+  }
+  \item{fdef}{
+    The generic function definition. Never passed when
+    defining a new generic.
+  }
+}
 \details{
   \code{standardGeneric} dispatches the method defined for a generic
   function named \code{f}, using the actual arguments in the frame from which
@@ -43,4 +49,3 @@ function definition will cause certain failure.
  Springer (For the original S4 version.)
 }
 \keyword{programming}
-\keyword{internal}
diff --git a/src/library/base/man/startsWith.Rd b/src/library/base/man/startsWith.Rd
new file mode 100644
index 0000000..0983fad
--- /dev/null
+++ b/src/library/base/man/startsWith.Rd
@@ -0,0 +1,57 @@
+\name{startsWith}
+\title{Does String Start or End With Another String?}
+\alias{endsWith}
+\alias{startsWith}
+\description{
+  Determines if entries of \code{x} start or end with string (entries of)
+  \code{prefix} or \code{suffix} respectively, where strings are
+  recycled to common lengths.
+
+  \code{startsWith()} is equivalent to but much faster than
+  \preformatted{substring(x, 1, nchar(prefix)) == prefix}
+  or also \preformatted{grepl("^<prefix>", x)} where \code{prefix} is
+  not to contain special regular expression characters.
+}
+\usage{
+startsWith(x, prefix)
+  endsWith(x, suffix)
+}
+\arguments{
+  \item{x}{vector of \code{\link{character}} string whose \dQuote{starts}
+    are considered.}
+  \item{prefix, suffix}{\code{\link{character}} vector (often of length one).}
+}
+\details{
+  The code has an optimized branch for the most common usage in which
+  \code{prefix} or \code{suffix} is of length one, and is further
+  optimized in a UTF-8 or 8-byte locale if that is an ASCII string.
+}
+\value{
+  A \code{\link{logical}} vector, of \dQuote{common length} of \code{x}
+  and \code{prefix} (or \code{suffix}), i.e., of the longer of the two
+  lengths unless one of them is zero when the result is
+  also of zero length.  A shorter input is recycled to the output length.
+}
+%\author{Martin Maechler}
+\seealso{
+  \code{\link{grepl}}, \code{\link{substring}}; the partial string
+  matching functions \code{\link{charmatch}} and \code{\link{pmatch}}
+  solve a different task.
+}
+\encoding{UTF-8}
+\examples{
+startsWith(search(), "package:") # typically at least two FALSE, nowadays often three
+
+x1 <- c("Foobar", "bla bla", "something", "another", "blu", "brown",
+        "blau blüht der Enzian")# non-ASCII
+x2 <- cbind(
+      startsWith(x1, "b"),
+      startsWith(x1, "bl"),
+      startsWith(x1, "bla"),
+        endsWith(x1, "n"),
+        endsWith(x1, "an"))
+rownames(x2) <- x1; colnames(x2) <- c("b", "b1", "bla", "n", "an")
+x2
+}
+\keyword{character}
+\keyword{utilities}
diff --git a/src/library/base/man/stop.Rd b/src/library/base/man/stop.Rd
index 7ebbc3c..5f00bbb 100644
--- a/src/library/base/man/stop.Rd
+++ b/src/library/base/man/stop.Rd
@@ -1,6 +1,6 @@
 % File src/library/base/man/stop.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2012 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2015 R Core Team
 % Distributed under GPL 2 or later
 
 \name{stop}
@@ -71,19 +71,14 @@ geterrmessage()
   of messages.
 }
 \examples{
-options(error = expression(NULL))
-# don't stop on stop(.)  << Use with CARE! >>
-
 iter <- 12
-if(iter > 10) stop("too many iterations")
+try(if(iter > 10) stop("too many iterations"))
 
 tst1 <- function(...) stop("dummy error")
-tst1(1:10, long, calling, expression)
+try(tst1(1:10, long, calling, expression))
 
 tst2 <- function(...) stop("dummy error", call. = FALSE)
-tst2(1:10, longcalling, expression, but.not.seen.in.Error)
-
-options(error = NULL)  # restore to default
+try(tst2(1:10, longcalling, expression, but.not.seen.in.Error))
 }
 \keyword{environment}
 \keyword{programming}
diff --git a/src/library/base/man/stopifnot.Rd b/src/library/base/man/stopifnot.Rd
index 85fb7b7..c1e20bf 100644
--- a/src/library/base/man/stopifnot.Rd
+++ b/src/library/base/man/stopifnot.Rd
@@ -1,6 +1,6 @@
 % File src/library/base/man/stopifnot.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2013 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2017 R Core Team
 % Distributed under GPL 2 or later
 
 \name{stopifnot}
@@ -25,9 +25,13 @@ stopifnot(\dots)
   checking of functions, in particular to make them easier to read.
 
   \code{stopifnot(A, B)} is conceptually equivalent to
-\preformatted{\{   if(any(is.na(A)) || !all(A)) stop(...) ;
-      if(any(is.na(B)) || !all(B)) stop(...) \}
-}
+\preformatted{ \{ if(any(is.na(A)) || !all(A)) stop(...);
+   if(any(is.na(B)) || !all(B)) stop(...) \}}
+
+  Since \R version 3.4.0, when an expression (from \code{\dots}) is not
+  true \emph{and} is a call to \code{\link{all.equal}}, the error
+  message will report the (first part of the) differences reported by
+  \code{\link{all.equal}(*)}.
 }
 \value{
   (\code{\link{NULL}} if all statements in \code{\dots} are \code{TRUE}.)
@@ -43,11 +47,14 @@ m <- matrix(c(1,3,3,1), 2, 2)
 stopifnot(m == t(m), diag(m) == rep(1, 2)) # all(.) |=>  TRUE
 
 op <- options(error = expression(NULL))
-# "disable stop(.)"  << Use with CARE! >>
+# "disabling stop(.)"  << Use with CARE! >>
 
 stopifnot(all.equal(pi, 3.141593),  2 < 2, all(1:10 < 12), "a" < "b")
 stopifnot(all.equal(pi, 3.1415927), 2 < 2, all(1:10 < 12), "a" < "b")
 
+# long all.equal() error messages are abbreviated:
+stopifnot(all.equal(rep(list(pi),4), list(3.1, 3.14, 3.141, 3.1415)))
+
 options(op)  # revert to previous error handler
 }
 \keyword{environment}
diff --git a/src/library/base/man/strptime.Rd b/src/library/base/man/strptime.Rd
index d2090f6..4475f38 100644
--- a/src/library/base/man/strptime.Rd
+++ b/src/library/base/man/strptime.Rd
@@ -1,10 +1,8 @@
 % File src/library/base/man/strptime.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2014 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2017 R Core Team
 % Distributed under GPL 2 or later
 
-\newcommand{\sspace}{\ifelse{latex}{\out{~}}{ }}
-
 \name{strptime}
 \alias{format.POSIXct}
 \alias{format.POSIXlt}
@@ -42,9 +40,9 @@ strptime(x, format, tz = "")
     otherwise.  If \code{\link{options}("digits.secs")} is set, up to
     the specified number of digits will be printed for seconds.}
   \item{\dots}{Further arguments to be passed from or to other methods.}
-  \item{usetz}{logical.  Should the time zone be appended to the output?
-    This is used in printing times, and more reliable than using
-    \code{"\%Z"}.}
+  \item{usetz}{logical.  Should the time zone abbreviation be appended
+    to the output?  This is used in printing times, and more reliable
+    than using \code{"\%Z"}.}
 }
 \details{
   The \code{format} and \code{as.character} methods and \code{strftime}
@@ -73,10 +71,10 @@ strptime(x, format, tz = "")
   \code{\link{LC_TIME}} locale category.  The \sQuote{current locale} of
   the descriptions might mean the locale in use at the start of the \R
   session or when these functions are first used.
-  
+
   % strftime is C99: strptime is POSIX.
   The details of the formats are platform-specific, but the following are
-  defined by the POSIX standard and are likely to be widely available.
+  likely to be widely available: most are defined by the POSIX standard.
   A \emph{conversion specification} is introduced by \code{\%}, usually
   followed by a single letter or \code{O} or \code{E} and then a single
   letter.  Any character in the format string not part of a conversion
@@ -84,11 +82,13 @@ strptime(x, format, tz = "")
   \code{\%}).  Widely implemented conversion specifications include
   \describe{
     \item{\code{\%a}}{Abbreviated weekday name in the current
-      locale.  (Also matches full name on input.)}
+      locale on this platform.  (Also matches full name on input:
+      in some locales there are no abbreviations of names.)}
     \item{\code{\%A}}{Full weekday name in the current locale.  (Also
       matches abbreviated name on input.)}
-    \item{\code{\%b}}{Abbreviated month name in the current
-      locale.  (Also matches full name on input.)}
+    \item{\code{\%b}}{Abbreviated month name in the current locale on
+      this platform.  (Also matches full name on input: in
+      some locales there are no abbreviations of names.)}
     \item{\code{\%B}}{Full month name in the current locale.  (Also
       matches abbreviated name on input.)}
     \item{\code{\%c}}{Date and time.   Locale-specific on output,
@@ -96,8 +96,9 @@ strptime(x, format, tz = "")
     \item{\code{\%C}}{Century (00--99): the integer part of the year
       divided by 100.}
     \item{\code{\%d}}{Day of the month as decimal number (01--31).}
-    \item{\code{\%D}}{Date format such as \code{\%m/\%d/\%y}: ISO C99
-      says it should be that exact format.}
+    \item{\code{\%D}}{Date format such as \code{\%m/\%d/\%y}: the C99
+      standard says it should be that exact format (but not all OSes
+      comply).}
     \item{\code{\%e}}{Day of the month as decimal number (1--31), with
       a leading space for a single-digit number.}
     \item{\code{\%F}}{Equivalent to \%Y-\%m-\%d (the ISO 8601 date
@@ -125,17 +126,17 @@ strptime(x, format, tz = "")
     \item{\code{\%r}}{The 12-hour clock time (using the locale's AM or
       PM).  Only defined in some locales.}
     \item{\code{\%R}}{Equivalent to \code{\%H:\%M}.}
-    \item{\code{\%S}}{Second as decimal number (00--61), allowing for
+    \item{\code{\%S}}{Second as integer (00--61), allowing for
       up to two leap-seconds (but POSIX-compliant implementations
       will ignore leap seconds).}
     \item{\code{\%t}}{Tab on output, arbitrary whitespace on input.}
     \item{\code{\%T}}{Equivalent to \code{\%H:\%M:\%S}.}
     \item{\code{\%u}}{Weekday as a decimal number (1--7, Monday is 1).}
-    % see http://en.wikipedia.org/wiki/Week_number#Week_number
+    % see https://en.wikipedia.org/wiki/Week_number#Week_number
     \item{\code{\%U}}{Week of the year as decimal number (00--53) using
       Sunday as the first day 1 of the week (and typically with the
       first Sunday of the year as day 1 of week 1).  The US convention.}
-    \item{\code{\%V}}{Week of the year as decimal number (00--53) as
+    \item{\code{\%V}}{Week of the year as decimal number (01--53) as
       defined in ISO 8601.
       If the week (starting on Monday) containing 1 January has four or
       more days in the new year, then it is considered week 1.  Otherwise, it
@@ -157,15 +158,14 @@ strptime(x, format, tz = "")
     \item{\code{\%Y}}{Year with century.  Note that whereas there was no
       zero in the original Gregorian calendar, ISO 8601:2004 defines it
       to be valid (interpreted as 1BC): see
-      \url{http://en.wikipedia.org/wiki/0_(year)}.  Note that the standards
+      \url{https://en.wikipedia.org/wiki/0_(year)}.  Note that the standards
       also say that years before 1582 in its calendar should only be used
       with agreement of the parties involved.
   
       For input, only years \code{0:9999} are accepted.}
     \item{\code{\%z}}{Signed offset in hours and minutes
       from UTC, so \code{-0800} is 8 hours behind UTC. Values up to
-      \code{+1400} are accepted as from \R 3.1.1: previous versions only
-      accepted up to \code{+1200}.} 
+      \code{+1400} are accepted.  (Standard only for output.)} 
     \item{\code{\%Z}}{(Output only.)  Time zone abbreviation as a
       character string (empty if not available).  This may not be reliable
       when a time zone has changed abbreviations over the years.}
@@ -176,9 +176,12 @@ strptime(x, format, tz = "")
   locale.  Note that abbreviated names are platform-specific (although
   the standards specify that in the \samp{C} locale they must be the
   first three letters of the capitalized English name: this convention
-  is widely used in English-language locales but for example French
-  month abbreviations are not the same on any of Linux, OS X, Solaris
-  and Windows).
+  is widely used in English-language locales but for example the French
+  month abbreviations are not the same on any two of Linux, macOS, Solaris
+  and Windows). Knowing what the abbreviations are is essential
+  if you wish to use \code{\%a}, \code{\%b} or \code{\%h} as part of an
+  input format: see the examples for how to check.
+% Unlike Dominic Comtois in non-bug PR#16301
 
   When \code{\%z} or \code{\%Z} is used for output with an
   object with an assigned time zone an attempt is made to use the values
@@ -206,9 +209,9 @@ strptime(x, format, tz = "")
   truncated to \code{0 <= n <= 6} decimal places (and if \code{\%OS} is
   not followed by a digit, it uses the setting of
   \code{\link{getOption}("digits.secs")}, or if that is unset, \code{n =
-  3}).  Further, for \code{strptime} \code{\%OS} will input seconds
-  including fractional seconds.  Note that \code{\%S} ignores (and not
-  rounds) fractional parts on output.
+  0}).  Further, for \code{strptime} \code{\%OS} will input seconds
+  including fractional seconds.  Note that \code{\%S} does not read
+  fractional parts on output. 
 
   The behaviour of other conversion specifications (and even if other
   character sequences commencing with \code{\%} \emph{are} conversion
@@ -218,12 +221,16 @@ strptime(x, format, tz = "")
 }
 \value{
   The \code{format} methods and \code{strftime} return character vectors
-  representing the time.  \code{NA} times are returned as \code{NA_character_}.
+  representing the time.  \code{NA} times are returned as
+  \code{NA_character_}.  The elements are restricted to 256 bytes, plus
+  a time zone abbreviation if \code{usetz} is true.  (On known platforms
+  longer strings are truncated at 255 or 256 bytes, but this is not
+  guaranteed by the C99 standard.)
 
   \code{strptime} turns character representations into an object of
   class \code{"\link{POSIXlt}"}.  The time zone is used to set the
   \code{isdst} component and to set the \code{"tzone"} attribute if
-  \code{tz != ""}. If the specified time is invalid (for example
+  \code{tz != ""}.  If the specified time is invalid (for example
   \samp{"2010-02-30 08:00"}) all the components of the result are
   \code{NA}.  (NB: this does means exactly what it says -- if it is an
   invalid time, not just a time that does not exist in some time zone.)
@@ -238,7 +245,7 @@ strptime(x, format, tz = "")
   
   OS facilities will probably not print years before 1 CE (aka 1 AD)
   \sQuote{correctly} (they tend to assume the existence of a year 0: see
-  \url{http://en.wikipedia.org/wiki/0_(year)}, and some OSes get them
+  \url{https://en.wikipedia.org/wiki/0_(year)}, and some OSes get them
   completely wrong).  Common formats are \code{-45} and \code{-045}.
 
   Years after 9999 and before -999 are normally printed with five or
@@ -247,7 +254,7 @@ strptime(x, format, tz = "")
   Some platforms support modifiers from POSIX 2008 (and others).  On
   Linux the format \code{"\%04Y"} assures a minimum of four characters
   and zero-padding.  The internal code (as used on Windows and by
-  default on OS X) uses zero-padding by default, and formats
+  default on macOS) uses zero-padding by default, and formats
   \code{\%_4Y} and \code{\%_Y} can be used for space padding and no
   padding.
 }
@@ -281,8 +288,11 @@ strptime(x, format, tz = "")
   For \code{strptime} the input string need not specify the date
   completely: it is assumed that unspecified seconds, minutes or hours
   are zero, and an unspecified year, month or day is the current one.
-  Some components may be returned as \code{NA} (but an unknown
-  \code{tzone} component is represented by an empty string).
+  (However, if a month is specified, the day of that month has to be
+  specified by \code{\%d} or \code{\%e} since the current day of the
+  month need not be valid for the specified month.)  Some components may
+  be returned as \code{NA} (but an unknown \code{tzone} component is
+  represented by an empty string).
 
   If the time zone specified is invalid on your system, what happens is
   system-specific but it will probably be ignored.
@@ -295,19 +305,10 @@ strptime(x, format, tz = "")
   \code{strftime} and formatting/printing uses OS facilities and may
   return nonsensical results for non-existent times at DST transitions.
   
-  Much less comprehensive support for output specifications was provided
-  on Windows before \R 3.1.0.
-  
   In a C locale \code{\%c} is required to be
   \code{"\%a \%b \%e \%H:\%M:\%S \%Y"}.  As Windows does not comply (and
   uses a date format not understood outside N. America), that format is
   used by \R on Windows in all locales.
-  
-  That \code{\%A \%a \%B \%b} on input match both full and abbreviated names
-  caused problems in some locales prior to \R 3.0.3: e.g.\sspace{}in French on
-  OS X \samp{juillet} was matched by \code{jui}, the abbreviation for
-  June.
-  
 }
 
 \references{
@@ -365,6 +366,11 @@ attr(x, "tzone")
 
 ## An RFC 822 header (Eastern Canada, during DST)
 strptime("Tue, 23 Mar 2010 14:36:38 -0400",  "\%a, \%d \%b \%Y \%H:\%M:\%S \%z")
+
+## Make sure you know what the abbreviated names are for you if you wish
+## to use them for input (they are matched case-insensitively):
+format(seq.Date(as.Date('1978-01-01'), by = 'day', len = 7), "\%a")
+format(seq.Date(as.Date('2000-01-01'), by = 'month', len = 12), "\%b")
 }}
 \keyword{utilities}
 \keyword{chron}
diff --git a/src/library/base/man/strrep.Rd b/src/library/base/man/strrep.Rd
new file mode 100644
index 0000000..faf382e
--- /dev/null
+++ b/src/library/base/man/strrep.Rd
@@ -0,0 +1,39 @@
+% File src/library/base/man/strrep.Rd
+% Part of the R package, https://www.R-project.org
+% Copyright 2015 R Core Team
+% Distributed under GPL 2 or later
+
+\name{strrep}
+\alias{strrep}
+\title{Repeat the Elements of a Character Vector}
+\description{
+  Repeat the character strings in a character vector a given number of
+  times (i.e., concatenate the respective numbers of copies of the
+  strings).
+}
+\usage{
+strrep(x, times)
+}
+\arguments{
+  \item{x}{a character vector, or an object which can be coerced to a
+    character vector using \code{as.character}.}
+  \item{times}{an integer vector giving the (non-negative) numbers of
+    times to repeat the respective elements of \code{x}.}
+}
+\details{
+  The elements of \code{x} and \code{times} will be recycled as
+  necessary (if one has no elements, and empty character vector is
+  returned).  Missing elements in \code{x} or \code{times} result in
+  missing elements of the return value.
+}
+\value{
+  A character vector with the elements of the given character vector
+  repeated the given numbers of times.
+}
+\examples{
+strrep("ABC", 2)
+strrep(c("A", "B", "C"), 1 : 3)
+## Create vectors with the given numbers of spaces:
+strrep(" ", 1 : 5)
+}
+\keyword{character}
diff --git a/src/library/base/man/strsplit.Rd b/src/library/base/man/strsplit.Rd
index f4edee3..3729aa2 100644
--- a/src/library/base/man/strsplit.Rd
+++ b/src/library/base/man/strsplit.Rd
@@ -1,6 +1,6 @@
 % File src/library/base/man/strsplit.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2014 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2017 R Core Team
 % Distributed under GPL 2 or later
 
 \name{strsplit}
@@ -82,12 +82,6 @@ strsplit(x, split, fixed = FALSE, perl = FALSE, useBytes = FALSE)
   multibyte locale are translated to UTF-8.
 }
 
-\note{
-  Prior to \R 2.11.0 there was an argument \code{extended} which could
-  be used to select \sQuote{basic} regular expressions: this was often
-  used when \code{fixed = TRUE} would be preferable.
-}
-
 \seealso{
   \code{\link{paste}} for the reverse,
   \code{\link{grep}} and \code{\link{sub}} for string search and
@@ -95,6 +89,8 @@ strsplit(x, split, fixed = FALSE, perl = FALSE, useBytes = FALSE)
 
   \sQuote{\link{regular expression}} for the details of the pattern
   specification.
+  
+  Option \code{PCRE_use_JIT} controls the details when \code{perl = TRUE}.
 }
 \examples{
 noquote(strsplit("A text I want to display with spaces", NULL)[[1]])
diff --git a/src/library/base/man/strtoi.Rd b/src/library/base/man/strtoi.Rd
index 638f5a8..dab7134 100644
--- a/src/library/base/man/strtoi.Rd
+++ b/src/library/base/man/strtoi.Rd
@@ -1,5 +1,5 @@
 % File src/library/base/man/strtoi.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 2009-10 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/base/man/strtrim.Rd b/src/library/base/man/strtrim.Rd
index 724e34f..4319491 100644
--- a/src/library/base/man/strtrim.Rd
+++ b/src/library/base/man/strtrim.Rd
@@ -1,6 +1,6 @@
 % File src/library/base/man/strtrim.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2013 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2014 R Core Team
 % Distributed under GPL 2 or later
 
 \name{strtrim}
diff --git a/src/library/base/man/structure.Rd b/src/library/base/man/structure.Rd
index ea2774e..c6fb4a2 100644
--- a/src/library/base/man/structure.Rd
+++ b/src/library/base/man/structure.Rd
@@ -1,5 +1,5 @@
 % File src/library/base/man/structure.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2007 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/base/man/strwrap.Rd b/src/library/base/man/strwrap.Rd
index c680db6..ae10b8e 100644
--- a/src/library/base/man/strwrap.Rd
+++ b/src/library/base/man/strwrap.Rd
@@ -1,5 +1,5 @@
 % File src/library/base/man/strwrap.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2009 R Core Team
 % Distributed under GPL 2 or later
 
@@ -46,8 +46,8 @@ strwrap(x, width = 0.9 * getOption("width"), indent = 0,
   string.
 }
 \value{
-  A character vector in the current locale's encoding (if
-  \code{simplify} is \code{TRUE}), or a list of such character vectors.
+  A character vector (if \code{simplify} is \code{TRUE}), or a list of
+  such character vectors, with declared input encodings preserved.
 }
 \examples{
 ## Read in file 'THANKS'.
diff --git a/src/library/base/man/subset.Rd b/src/library/base/man/subset.Rd
index d7b7828..b654d8b 100644
--- a/src/library/base/man/subset.Rd
+++ b/src/library/base/man/subset.Rd
@@ -1,5 +1,5 @@
 % File src/library/base/man/subset.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2010 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/base/man/substitute.Rd b/src/library/base/man/substitute.Rd
index fc623b0..2b978e2 100644
--- a/src/library/base/man/substitute.Rd
+++ b/src/library/base/man/substitute.Rd
@@ -1,5 +1,5 @@
 % File src/library/base/man/substitute.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2011 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/base/man/substr.Rd b/src/library/base/man/substr.Rd
index a34664a..180d632 100644
--- a/src/library/base/man/substr.Rd
+++ b/src/library/base/man/substr.Rd
@@ -1,5 +1,5 @@
 % File src/library/base/man/substr.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2014 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/base/man/sum.Rd b/src/library/base/man/sum.Rd
index 97d730a..462a35a 100644
--- a/src/library/base/man/sum.Rd
+++ b/src/library/base/man/sum.Rd
@@ -1,6 +1,6 @@
 % File src/library/base/man/sum.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2013 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2015 R Core Team
 % Distributed under GPL 2 or later
 
 \name{sum}
@@ -61,4 +61,19 @@ sum(\dots, na.rm = FALSE)
   \emph{The New S Language}.
   Wadsworth & Brooks/Cole.
 }
+\examples{% for beginners
+## Pass a vector to sum, and it will add the elements together.
+sum(1:5)
+
+## Pass several numbers to sum, and it also adds the elements.
+sum(1, 2, 3, 4, 5)
+
+## In fact, you can pass vectors into several arguments, and everything gets added.
+sum(1:2, 3:5)
+
+## If there are missing values, the sum is unknown, i.e., also missing, ....
+sum(1:5, NA)
+## ... unless  we exclude missing values explicitly:
+sum(1:5, NA, na.rm = TRUE)
+}
 \keyword{arith}
diff --git a/src/library/base/man/summary.Rd b/src/library/base/man/summary.Rd
index 51b9cdd..03b8a8e 100644
--- a/src/library/base/man/summary.Rd
+++ b/src/library/base/man/summary.Rd
@@ -1,9 +1,10 @@
 % File src/library/base/man/summary.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2011 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2016 R Core Team
 % Distributed under GPL 2 or later
 
 \name{summary}
+\title{Object Summaries}
 \alias{summary}
 \alias{summary.default}
 \alias{summary.data.frame}
@@ -11,7 +12,6 @@
 \alias{summary.matrix}
 \alias{format.summaryDefault}
 \alias{print.summaryDefault}
-\title{Object Summaries}
 \description{
   \code{summary} is a generic function used to produce result summaries
   of the results of various model fitting functions.  The function
@@ -21,21 +21,29 @@
 \usage{
 summary(object, \dots)
 
-\method{summary}{default}(object, \dots, digits = max(3, getOption("digits")-3))
+\method{summary}{default}(object, \dots, digits)
 \method{summary}{data.frame}(object, maxsum = 7,
        digits = max(3, getOption("digits")-3), \dots)
 
 \method{summary}{factor}(object, maxsum = 100, \dots)
 
 \method{summary}{matrix}(object, \dots)
+
+\method{format}{summaryDefault}(x, digits = max(3L, getOption("digits") - 3L), \dots)
+ \method{print}{summaryDefault}(x, digits = max(3L, getOption("digits") - 3L), \dots)
 }
 \arguments{
   \item{object}{an object for which a summary is desired.}
+  \item{x}{a result of the \emph{default} method of \code{summary()}.}
   \item{maxsum}{integer, indicating how many levels should be shown for
     \code{\link{factor}}s.}
   \item{digits}{integer, used for number formatting with
     \code{\link{signif}()} (for \code{summary.default}) or
-    \code{\link{format}()} (for \code{summary.data.frame}).}
+    \code{\link{format}()} (for \code{summary.data.frame}).  In
+    \code{summary.default}, if not specified (i.e.,
+    \code{\link{missing}(.)}), \code{signif()} will \emph{not} be called
+    anymore (since \R >= 3.4.0, where the default has been changed to
+    only round in the \code{print} and \code{format} methods).}% for "summaryDefault"
   \item{\dots}{additional arguments affecting the summary produced.}
 }
 \details{
@@ -54,9 +62,9 @@ summary(object, \dots)
     methods for details of what is produced by that method.
 
     The default method returns an object of class
-    \code{c("summaryDefault", "\link{table}")} which has a specialized
-    \code{print} method.  The \code{\link{factor}} method returns an
-    integer vector.
+    \code{c("summaryDefault", "\link{table}")} which has specialized
+    \code{\link{format}} and \code{\link{print}} methods.  The
+    \code{\link{factor}} method returns an integer vector.
 
     The matrix and data frame methods return a matrix of class
     \code{"\link{table}"}, obtained by applying \code{summary} to each
diff --git a/src/library/base/man/svd.Rd b/src/library/base/man/svd.Rd
index f9f8049..8340662 100644
--- a/src/library/base/man/svd.Rd
+++ b/src/library/base/man/svd.Rd
@@ -1,6 +1,6 @@
 % File src/library/base/man/svd.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2013 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2014 R Core Team
 % Distributed under GPL 2 or later
 
 \name{svd}
@@ -54,6 +54,11 @@ La.svd(x, nu = min(n, p), nv = min(n, p))
   \item{v}{a matrix whose columns contain the right singular vectors of
     \code{x}, present if \code{nv > 0}.  Dimension \code{c(p, nv)}.}
 
+  Recall that the singular vectors are only defined up to sign (a
+  constant of modulus one in the complex case).  If a left singular
+  vector has its sign changed, changing the sign of the corresponding
+  right vector gives an equivalent decomposition.
+
   For \code{La.svd} the return value replaces \code{v} by \code{vt}, the
   (conjugated if complex) transpose of \code{v}.
 }
diff --git a/src/library/base/man/sweep.Rd b/src/library/base/man/sweep.Rd
index 4f1f561..dc3ff2d 100644
--- a/src/library/base/man/sweep.Rd
+++ b/src/library/base/man/sweep.Rd
@@ -1,5 +1,5 @@
 % File src/library/base/man/sweep.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2010 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/base/man/switch.Rd b/src/library/base/man/switch.Rd
index a1b20fb..c25f0bd 100644
--- a/src/library/base/man/switch.Rd
+++ b/src/library/base/man/switch.Rd
@@ -1,6 +1,6 @@
 % File src/library/base/man/switch.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2013 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2016 R Core Team
 % Distributed under GPL 2 or later
 
 \name{switch}
@@ -41,11 +41,14 @@ switch(EXPR, \dots)
   \code{2}.  If there is more than one match, the first matching element
   is used.  In the case of no match, if there is a unnamed element of
   \code{\dots} its value is returned.  (If there is more than one such
-  argument an error is returned.)
+  argument an error is signaled.)
 
   The first argument is always taken to be \code{EXPR}: if it is named
   its name must (partially) match.
 
+  A warning is signaled if no alternatives are provides, as this is
+  usually a coding error.
+  
   This is implemented as a \link{primitive} function that only evaluates
   its first argument and one other if one is selected.
 }
@@ -93,7 +96,7 @@ for(ch in ccc)
 ff <- gl(3,1, labels=LETTERS[3:1])
 ff[1] # C
 ## so one might expect " is C" here, but
-switch(ff[1], A = "I am A", B="Bb..", C=" is C")# -> "A"
+switch(ff[1], A = "I am A", B="Bb..", C=" is C")# -> "I am A"
 ## so we give a warning
 
 ## Numeric EXPR does not allow a default value to be specified
diff --git a/src/library/base/man/sys.parent.Rd b/src/library/base/man/sys.parent.Rd
index c3e8b54..d42be76 100644
--- a/src/library/base/man/sys.parent.Rd
+++ b/src/library/base/man/sys.parent.Rd
@@ -1,5 +1,5 @@
 % File src/library/base/man/sys.parent.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2011 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/base/man/sys.source.Rd b/src/library/base/man/sys.source.Rd
index 1a84f5b..42e7d39 100644
--- a/src/library/base/man/sys.source.Rd
+++ b/src/library/base/man/sys.source.Rd
@@ -1,5 +1,5 @@
 % File src/library/base/man/sys.source.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2007 R Core Team
 % Distributed under GPL 2 or later
 
@@ -12,7 +12,8 @@
 }
 \usage{
 sys.source(file, envir = baseenv(), chdir = FALSE,
-           keep.source = getOption("keep.source.pkgs"))
+           keep.source = getOption("keep.source.pkgs"),
+           toplevel.env = as.environment(envir))
 }
 \arguments{
   \item{file}{a character string naming the file to be read from}
@@ -26,6 +27,9 @@ sys.source(file, envir = baseenv(), chdir = FALSE,
   \item{keep.source}{logical.  If \code{TRUE}, functions keep
     their source including comments, see
     \code{\link{options}(keep.source = *)} for more details.}
+  \item{toplevel.env}{an \R environment to be used as top level while
+    evaluating the expressions.  This argument is useful for frameworks
+    running package tests; the default should be used in other cases}
 }
 \details{
   For large files, \code{keep.source = FALSE} may save quite a bit of
diff --git a/src/library/base/man/system.Rd b/src/library/base/man/system.Rd
index 9797eed..b687112 100644
--- a/src/library/base/man/system.Rd
+++ b/src/library/base/man/system.Rd
@@ -1,10 +1,8 @@
 % File src/library/base/man/system.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2014 R Core Team
 % Distributed under GPL 2 or later
 
-\newcommand{\sspace}{\ifelse{latex}{\out{~}}{ }}
-
 \name{system}
 \alias{system}
 #ifdef unix
@@ -147,7 +145,7 @@ system(command, intern = FALSE,
   For GUIs, what happens to output sent to \file{stdout} or
   \file{stderr} if \code{intern = FALSE} is interface-specific, and it
   is unsafe to assume that such messages will appear on a GUI console
-  (they do on the OS X GUI's console, but not on some others).
+  (they do on the macOS GUI's console, but not on some others).
 }
 #endif
 
diff --git a/src/library/base/man/system.file.Rd b/src/library/base/man/system.file.Rd
index 34aa7fe..b7b36bf 100644
--- a/src/library/base/man/system.file.Rd
+++ b/src/library/base/man/system.file.Rd
@@ -1,10 +1,8 @@
 % File src/library/base/man/system.file.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2013 R Core Team
 % Distributed under GPL 2 or later
 
-\newcommand{\sspace}{\ifelse{latex}{\out{~}}{ }}
-
 \name{system.file}
 \title{Find Names of R System Files}
 \usage{
diff --git a/src/library/base/man/system.time.Rd b/src/library/base/man/system.time.Rd
index 6219894..8fd90be 100644
--- a/src/library/base/man/system.time.Rd
+++ b/src/library/base/man/system.time.Rd
@@ -1,13 +1,13 @@
 % File src/library/base/man/system.time.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2011 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2016 R Core Team
 % Distributed under GPL 2 or later
 
 \name{system.time}
 \title{CPU Time Used}
 \usage{
 system.time(expr, gcFirst = TRUE)
-unix.time(expr, gcFirst = TRUE)
+%Deprecated unix.time(expr, gcFirst = TRUE)
 }
 \alias{system.time}
 \alias{unix.time}
@@ -23,8 +23,8 @@ unix.time(expr, gcFirst = TRUE)
   evaluates \code{expr}, and then calls \code{proc.time} once more,
   returning the difference between the two \code{proc.time} calls.
 
-  \code{unix.time} is an alias of \code{system.time}, for
-  compatibility with S.
+  \code{unix.time} has been an alias of \code{system.time}, for
+  compatibility with S, and has finally been deprecated in 2016.
 
   Timings of evaluations of the same expression can vary considerably
   depending on whether the evaluation triggers a garbage collection.  When
@@ -38,7 +38,7 @@ unix.time(expr, gcFirst = TRUE)
 }
 \seealso{
   \code{\link{proc.time}}, \code{\link{time}} which is for time series.
-  
+
   \code{\link{Sys.time}} to get the current date & time.
 }
 \examples{
diff --git a/src/library/base/man/system2.Rd b/src/library/base/man/system2.Rd
index d927afd..934075d 100644
--- a/src/library/base/man/system2.Rd
+++ b/src/library/base/man/system2.Rd
@@ -1,6 +1,6 @@
 % File src/library/base/man/system.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2014 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2017 R Core Team
 % Distributed under GPL 2 or later
 
 \name{system2}
@@ -90,12 +90,12 @@ system2(command, args = character(),
 
 \note{
   \code{system2} is a more portable and flexible interface than
-  \code{\link{system}}, introduced in \R 2.12.0.  It allows redirection
-  of output without needing to invoke a shell on Windows, a portable way
-  to set environment variables for the execution of \code{command}, and
-  finer control over the redirection of \code{stdout} and \code{stderr}.
-  Conversely, \code{system} (and \code{shell} on Windows) allows the
-  invocation of arbitrary command lines.
+  \code{\link{system}}.  It allows redirection of output without needing
+  to invoke a shell on Windows, a portable way to set environment
+  variables for the execution of \code{command}, and finer control over
+  the redirection of \code{stdout} and \code{stderr}.  Conversely,
+  \code{system} (and \code{shell} on Windows) allows the invocation of
+  arbitrary command lines.
 
   There is no guarantee that if \code{stdout} and \code{stderr} are both
   \code{TRUE} or the same file that the two streams will be interleaved
diff --git a/src/library/base/man/t.Rd b/src/library/base/man/t.Rd
index ac60830..246ba1e 100644
--- a/src/library/base/man/t.Rd
+++ b/src/library/base/man/t.Rd
@@ -1,5 +1,5 @@
 % File src/library/base/man/t.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2007 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/base/man/table.Rd b/src/library/base/man/table.Rd
index abf35bf..129141a 100644
--- a/src/library/base/man/table.Rd
+++ b/src/library/base/man/table.Rd
@@ -1,6 +1,6 @@
 % File src/library/base/man/table.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2013 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2016 R Core Team
 % Distributed under GPL 2 or later
 
 \name{table}
@@ -12,6 +12,7 @@
 \alias{as.table}
 \alias{as.table.default}
 \alias{is.table}
+\alias{[.table}
 
 \concept{counts}
 \concept{frequencies}
@@ -23,8 +24,10 @@
   table of the counts at each combination of factor levels.
 }
 \usage{
-table(\dots, exclude = if (useNA == "no") c(NA, NaN), useNA = c("no",
-    "ifany", "always"), dnn = list.names(\dots), deparse.level = 1)
+table(\dots,
+      exclude = if (useNA == "no") c(NA, NaN),
+      useNA = c("no", "ifany", "always"),
+      dnn = list.names(\dots), deparse.level = 1)
 
 as.table(x, \dots)
 is.table(x)
@@ -38,11 +41,12 @@ is.table(x)
     (including character strings), or a list (or data frame) whose
     components can be so interpreted.  (For \code{as.table}, arguments
     passed to specific methods; for \code{as.data.frame}, unused.)}
-  \item{exclude}{levels to remove for all factors in \code{\dots}.
-    If set to \code{NULL}, it implies \code{useNA = "always"}.  See
+  \item{exclude}{levels to remove for all factors in \code{\dots}.  If
+    it does not contain \code{\link{NA}} and \code{useNA} is not
+    specified, it implies \code{useNA = "ifany"}.  See
     \sQuote{Details} for its interpretation for non-factor arguments.}
   \item{useNA}{whether to include \code{NA} values in the table.
-    See \sQuote{Details}.}
+    See \sQuote{Details}.  Can be abbreviated.}
   \item{dnn}{the names to be given to the dimensions in the result (the
     \emph{dimnames names}).}
   \item{deparse.level}{controls how the default \code{dnn} is
@@ -67,25 +71,27 @@ is.table(x)
   \code{deparse.level = 1} uses the supplied argument if it is a symbol,
   and \code{deparse.level = 2} will deparse the argument.
 
-  Only when \code{exclude} is specified and non-NULL (i.e., not by
-  default), will \code{table} potentially drop levels of factor
+  Only when \code{exclude} is specified (i.e., not by default) and
+  non-empty, will \code{table} potentially drop levels of factor
   arguments.
 
   \code{useNA} controls if the table includes counts of \code{NA}
-  values: the allowed values correspond to never, only if the count is
-  positive and even for zero counts.  This is overridden by specifying
-  \code{exclude = NULL}.  Note that levels specified in \code{exclude}
-  are mapped to \code{NA} and so included in \code{NA} counts.
-
-  Both \code{exclude} and \code{useNA} operate on an "all or none"
+  values: the allowed values correspond to never (\code{"no"}), only if the count is
+  positive (\code{"ifany"}) and even for zero counts (\code{"always"}).
+  Note the somewhat \dQuote{pathological} case of two different kinds of
+  \code{NA}s which are treated differently, depending on both
+  \code{useNA} and \code{exclude}, see \code{d.patho} in the
+  \sQuote{Examples:} below.
+
+  Both \code{exclude} and \code{useNA} operate on an \dQuote{all or none}
   basis.  If you want to control the dimensions of a multiway table
   separately, modify each argument using \code{\link{factor}} or
   \code{\link{addNA}}.
 
-  It is best to supply factors rather than rely on coercion.  In
-  particular, \code{exclude} will be used in coercion to a factor, and
-  so values (not levels) which appear in \code{exclude} before coercion
-  will be mapped to \code{NA} rather than be discarded.
+  Non-factor arguments \code{a} are coerced via \code{factor(a,
+    exclude=exclude)}.  Since \R 3.4.0, care is taken \emph{not} to
+  count the excluded values (where they were included in the \code{NA}
+  count, previously).
 
   The \code{summary} method for class \code{"table"} (used for objects
   created by \code{table} or \code{\link{xtabs}}) which gives basic
@@ -96,8 +102,8 @@ is.table(x)
 \value{
   \code{table()} returns a \emph{contingency table}, an object of
   class \code{"table"}, an array of integer values.
-  Note that unlike S the result is always an array, a 1D array if one
-  factor is given.
+  Note that unlike S the result is always an \code{\link{array}}, a 1D
+  array if one factor is given.
 
   \code{as.table} and \code{is.table} coerce to and test for contingency
   table, respectively.
@@ -116,6 +122,9 @@ is.table(x)
   multidimensional tables.  \code{\link{margin.table}},
   \code{\link{prop.table}}, \code{\link{addmargins}}.
 
+  \code{\link{addNA}} for constructing factors with \code{\link{NA}} as
+  a level.
+
   \code{\link{xtabs}} for cross tabulation of data frames with a
   formula interface.
 }
@@ -149,8 +158,8 @@ all(tab == UCBAdmissions)
 all.equal(dimnames(tab), dimnames(UCBAdmissions))
 
 a <- rep(c(NA, 1/0:3), 10)
-table(a)
-table(a, exclude = NULL)
+table(a)                 # does not report NA's
+table(a, exclude = NULL) # reports NA's
 b <- factor(rep(c("A","B","C"), 10))
 table(b)
 table(b, exclude = "B")
@@ -166,6 +175,18 @@ table(d.) # ", exclude = NULL" is not needed
 ## i.e., if you want to count the NA's of 'd', use
 table(d, useNA = "ifany")
 
+## "pathological" case:
+d.patho <- addNA(c(1,NA,1:2,1:3))[-7]; is.na(d.patho) <- 3:4
+d.patho
+## just 3 consecutive NA's ? --- well, have *two* kinds of NAs here :
+as.integer(d.patho) # 1 4 NA NA 1 2
+##
+## In R >= 3.4.0, table() allows to differentiate:
+table(d.patho)                   # counts the "unusual" NA
+table(d.patho, useNA = "ifany")  # counts all three
+table(d.patho, exclude = NULL)   #  (ditto)
+table(d.patho, exclude = NA)     # counts none
+
 ## Two-way tables with NA counts. The 3rd variant is absurd, but shows
 ## something that cannot be done using exclude or useNA.
 with(airquality,
diff --git a/src/library/base/man/tabulate.Rd b/src/library/base/man/tabulate.Rd
index b53c97e..1fdb1c3 100644
--- a/src/library/base/man/tabulate.Rd
+++ b/src/library/base/man/tabulate.Rd
@@ -1,6 +1,6 @@
 % File src/library/base/man/tabulate.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2012 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2016 R Core Team
 % Distributed under GPL 2 or later
 
 \name{tabulate}
@@ -19,7 +19,7 @@ tabulate(bin, nbins = max(1, bin, na.rm = TRUE))
     \item{nbins}{the number of bins to be used.}
 }
 \details{
-   \code{tabulate} is the workhorse for the \code{\link{table}} function.
+  \code{tabulate} is the workhorse for the \code{\link{table}} function.
 
   If \code{bin} is a factor, its internal integer representation
   is tabulated.
@@ -28,13 +28,15 @@ tabulate(bin, nbins = max(1, bin, na.rm = TRUE))
   they are truncated by \code{\link{as.integer}}.
 }
 \value{
-  An integer vector (without names).  There is a bin for each of the
-  values \code{1, \dots, nbins}; values outside that range and \code{NA}s
-  are (silently) ignored.
+  An integer valued \code{\link{integer}} or \code{\link{double}} vector
+  (without names).  There is a bin for each of the values \code{1,
+  \dots, nbins}; values outside that range and \code{NA}s are (silently)
+  ignored.
 
   On 64-bit platforms \code{bin} can have \eqn{2^{31}}{2^31} or more
-  elements and hence a count could exceed the maximum integer: this is
-  currently an error.
+  elements (i.e., \code{length(bin) > .Machine$integer.max}), and hence
+  a count could exceed the maximum integer.  For this reason, the return
+  value is of type double for such long \code{bin} vectors.
 }
 \seealso{
   \code{\link{table}}, \code{\link{factor}}.
diff --git a/src/library/base/man/tapply.Rd b/src/library/base/man/tapply.Rd
index 4528bae..d4ddbf1 100644
--- a/src/library/base/man/tapply.Rd
+++ b/src/library/base/man/tapply.Rd
@@ -1,6 +1,6 @@
 % File src/library/base/man/tapply.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2012 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2017 R Core Team
 % Distributed under GPL 2 or later
 
 \name{tapply}
@@ -12,20 +12,31 @@
   levels of certain factors.
 }
 \usage{
-tapply(X, INDEX, FUN = NULL, \dots, simplify = TRUE)
+tapply(X, INDEX, FUN = NULL, \dots, default = NA, simplify = TRUE)
 }
 \arguments{
   \item{X}{an atomic object, typically a vector.}
-  \item{INDEX}{list of one or more factors, each of same length as
-    \code{X}.  The elements are coerced to factors by \code{\link{as.factor}}.}
+  \item{INDEX}{a \code{\link{list}} of one or more \code{\link{factor}}s,
+    each of same length as \code{X}.  The elements are coerced to
+    factors by \code{\link{as.factor}}.}
   \item{FUN}{the function to be applied, or \code{NULL}.  In the case of
     functions like \code{+}, \code{\%*\%}, etc., the function name must
     be backquoted or quoted.  If \code{FUN} is \code{NULL}, tapply
     returns a vector which can be used to subscript the multi-way array
     \code{tapply} normally produces.}
   \item{\dots}{optional arguments to \code{FUN}: the Note section.}
-  \item{simplify}{If \code{FALSE}, \code{tapply} always returns an array
-    of mode \code{"list"}.  If \code{TRUE} (the default), then if
+  \item{default}{(only in the case of simplification to an array) the
+    value with which the array is initialized as
+    \code{\link{array}(default, dim = ..)}.  Before \R 3.4.0, this
+    was hard coded to \code{\link{array}()}'s default \code{NA}.  If it
+    is \code{NA} (the default), the missing value of the answer type,
+    e.g. \code{\link{NA_real_}}, is chosen (\code{\link{as.raw}(0)} for
+    \code{"raw"}).  In a numerical case, it may be set, e.g., to
+    \code{FUN(integer(0))}, e.g., in the case of \code{FUN = sum} to
+    \code{0} or \code{0L}.}
+  \item{simplify}{logical; if \code{FALSE}, \code{tapply} always returns
+    an array of mode \code{"list"}; in other words, a \code{\link{list}}
+    with a \code{\link{dim}} attribute.  If \code{TRUE} (the default), then if
     \code{FUN} always returns a scalar, \code{tapply} returns an array
     with the mode of the scalar.}
 }
@@ -88,13 +99,18 @@ table(groups)
 tapply(warpbreaks$breaks, warpbreaks[,-1], sum)
 tapply(warpbreaks$breaks, warpbreaks[, 3, drop = FALSE], sum)
 
-n <- 17; fac <- factor(rep(1:3, length = n), levels = 1:5)
+n <- 17; fac <- factor(rep_len(1:3, n), levels = 1:5)
 table(fac)
 tapply(1:n, fac, sum)
+tapply(1:n, fac, sum, default = 0) # maybe more desirable
 tapply(1:n, fac, sum, simplify = FALSE)
 tapply(1:n, fac, range)
 tapply(1:n, fac, quantile)
-
+tapply(1:n, fac, length) ## NA's
+tapply(1:n, fac, length, default = 0) # == table(fac)
+\dontshow{stopifnot(all.equal(
+  unname(unclass(table(fac))),
+  unname(        tapply(1:n, fac, length, default = 0))))}
 ## example of ... argument: find quarterly means
 tapply(presidents, cycle(presidents), mean, na.rm = TRUE)
 
@@ -102,6 +118,17 @@ ind <- list(c(1, 2, 2), c("A", "A", "B"))
 table(ind)
 tapply(1:3, ind) #-> the split vector
 tapply(1:3, ind, sum)
+
+## Some assertions (not held by all patch propsals):
+nq <- names(quantile(1:5))
+stopifnot(
+  identical(tapply(1:3, ind), c(1L, 2L, 4L)),
+  identical(tapply(1:3, ind, sum),
+            matrix(c(1L, 2L, NA, 3L), 2, dimnames = list(c("1", "2"), c("A", "B")))),
+  identical(tapply(1:n, fac, quantile)[-1],
+            array(list(`2` = structure(c(2, 5.75, 9.5, 13.25, 17), .Names = nq),
+                 `3` = structure(c(3, 6, 9, 12, 15), .Names = nq),
+                 `4` = NULL, `5` = NULL), dim=4, dimnames=list(as.character(2:5)))))
 }
 \keyword{iteration}
 \keyword{category}
diff --git a/src/library/base/man/taskCallback.Rd b/src/library/base/man/taskCallback.Rd
index 79beb44..bb48ec5 100644
--- a/src/library/base/man/taskCallback.Rd
+++ b/src/library/base/man/taskCallback.Rd
@@ -1,6 +1,6 @@
 % File src/library/base/man/taskCallback.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2011 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2016 R Core Team
 % Distributed under GPL 2 or later
 
 \name{taskCallback}
@@ -84,39 +84,37 @@ will be called on the completion of the next top-level task.
 \seealso{
   \code{\link{getTaskCallbackNames}}
   \code{\link{taskCallbackManager}}
-  \url{http://developer.r-project.org/TaskHandlers.pdf}
+  \url{https://developer.r-project.org/TaskHandlers.pdf}
 }
 \examples{
 times <- function(total = 3, str = "Task a") {
-   ctr <- 0
-
-   function(expr, value, ok, visible) {
+  ctr <- 0
+  function(expr, value, ok, visible) {
     ctr <<- ctr + 1
     cat(str, ctr, "\n")
-    if(ctr == total) {
+    keep.me <- (ctr < total)
+    if (!keep.me)
       cat("handler removing itself\n")
-    }
-    return(ctr < total)
-   }
- }
 
- # add the callback that will work for
- # 4 top-level tasks and then remove itself.
- n <- addTaskCallback(times(4))
+    # return
+    keep.me
+  }
+}
+
+# add the callback that will work for
+# 4 top-level tasks and then remove itself.
+n <- addTaskCallback(times(4))
 
- # now remove it, assuming it is still first in the list.
- removeTaskCallback(n)
+# now remove it, assuming it is still first in the list.
+removeTaskCallback(n)
 
-\dontrun{
-# There is no point in running this
-# as
- addTaskCallback(times(4))
+## See how the handler is called every time till "self destruction":
 
- sum(1:10)
- sum(1:10)
- sum(1:10)
- sum(1:10)
- sum(1:10)
-}
+addTaskCallback(times(4)) # counts as once already
+
+sum(1:10) ; mean(1:3) # two more
+sinpi(1)              # 4th - and "done"
+cospi(1)
+tanpi(1)
 }
 \keyword{environment}
diff --git a/src/library/base/man/taskCallbackManager.Rd b/src/library/base/man/taskCallbackManager.Rd
index 227ceae..c1237ef 100644
--- a/src/library/base/man/taskCallbackManager.Rd
+++ b/src/library/base/man/taskCallbackManager.Rd
@@ -1,6 +1,6 @@
 % File src/library/base/man/taskCallbackManager.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2011 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2016 R Core Team
 % Distributed under GPL 2 or later
 
 \name{taskCallbackManager}
@@ -76,7 +76,7 @@ taskCallbackManager(handlers = list(), registered = FALSE,
   \code{\link{addTaskCallback}},
   \code{\link{removeTaskCallback}},
   \code{\link{getTaskCallbackNames}}\\
-  \url{http://developer.r-project.org/TaskHandlers.pdf}
+  \url{https://developer.r-project.org/TaskHandlers.pdf}
 }
 \examples{
 # create the manager
diff --git a/src/library/base/man/taskCallbackNames.Rd b/src/library/base/man/taskCallbackNames.Rd
index fe99192..a3a6446 100644
--- a/src/library/base/man/taskCallbackNames.Rd
+++ b/src/library/base/man/taskCallbackNames.Rd
@@ -1,6 +1,6 @@
 % File src/library/base/man/taskCallbackNames.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2007 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2016 R Core Team
 % Distributed under GPL 2 or later
 
 \name{taskCallbackNames}
@@ -34,7 +34,7 @@ getTaskCallbackNames()
   \code{\link{addTaskCallback}},
   \code{\link{removeTaskCallback}},
   \code{\link{taskCallbackManager}}\\
-  \url{http://developer.r-project.org/TaskHandlers.pdf}
+  \url{https://developer.r-project.org/TaskHandlers.pdf}
 }
 \examples{
  n <- addTaskCallback(function(expr, value, ok, visible) {
diff --git a/src/library/base/man/tempfile.Rd b/src/library/base/man/tempfile.Rd
index 6405da0..de22590 100644
--- a/src/library/base/man/tempfile.Rd
+++ b/src/library/base/man/tempfile.Rd
@@ -1,10 +1,8 @@
 % File src/library/base/man/tempfile.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2013 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2016 R Core Team
 % Distributed under GPL 2 or later
 
-\newcommand{\CRANpkg}{\href{http://CRAN.R-project.org/package=#1}{\pkg{#1}}}
-
 \name{tempfile}
 \alias{tempfile}
 \alias{tempdir}
@@ -32,6 +30,12 @@ tempdir()
 
   Both will use backslash as the path separator.
 #endif
+#ifdef unix
+  
+  The value will be an absolute path (unless \code{tmpdir} is set to a
+  relative path), but it need not be canonical (see
+  \code{\link{normalizePath}}) and on macOS usually is not.
+#endif
 }
 \details{
   The length of the result is the maximum of the lengths of the three
@@ -65,14 +69,29 @@ tempdir()
   has no effect on \code{tempdir()}: the per-session temporary directory
   is created before the interpreter is started.
 }
+
 \section{Note on parallel}{
-  \R processes forked by functions such as \code{\link{mclapply}} in
-  package \pkg{parallel} (or \CRANpkg{multicore}) share a per-session
-  temporary directory.  Further, the \sQuote{guaranteed not to be
-    currently in use} applies only at the time of asking, and two
-  children could ask simultaneously.  This is circumvented
-  by ensuring that \code{tempfile} calls in different children try
-  different names.
+  \R processes forked by functions such as \code{\link{mclapply}} and
+  \code{\link{makeForkCluster}} in package \pkg{parallel} share a
+  per-session temporary directory.  Further, the \sQuote{guaranteed not
+    to be currently in use} applies only at the time of asking, and two
+  children could ask simultaneously.  This is circumvented by ensuring
+  that \code{tempfile} calls in different children try different names.
+}
+
+\source{
+  The final component of \code{tempdir()} is created by the POSIX system
+  call \code{mkdtmp}, or if this is not available (e.g.\sspace{}on
+  Windows) a version derived from the source code of GNU \code{glibc}.
+  % The substitute was once used on Solaris 10: this nowadays has the
+  % call but no man page for it. It has used \code{.}
+  
+  It will be of the form \file{RtmpXXXXXX} where the last 6 characters
+  are replaced in a platform-specific way.  POSIX only requires that the
+  replacements be ASCII, which allows \code{.} (so the value may appear
+  to have a file extension) and \link{regexp} metacharacters such as
+  \code{+}.  Most commonly the replacements are from the \link{regexp}
+  pattern \code{[A-Za-z0-9]}, but \code{.} \emph{has} been seen.
 }
 
 \references{
diff --git a/src/library/base/man/textconnections.Rd b/src/library/base/man/textconnections.Rd
index 0b22057..01e45bd 100644
--- a/src/library/base/man/textconnections.Rd
+++ b/src/library/base/man/textconnections.Rd
@@ -1,6 +1,6 @@
 % File src/library/base/man/textconnections.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2011 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2015 R Core Team
 % Distributed under GPL 2 or later
 
 \name{textConnection}
@@ -22,13 +22,13 @@ textConnectionValue(con)
     connection the name for the \R character vector to receive the
     output, or \code{NULL} (for none).
   }
-  \item{open}{character.  Either \code{"r"} (or equivalently \code{""})
+  \item{open}{character string.  Either \code{"r"} (or equivalently \code{""})
     for an input connection or \code{"w"} or \code{"a"} for an output
     connection.}
   \item{local}{logical.  Used only for output connections.  If \code{TRUE},
     output is assigned to a variable in the calling environment.  Otherwise
     the global environment is used.}
-  \item{encoding}{character.  Used only for input connections.  How
+  \item{encoding}{character string, partially matched.  Used only for input connections.  How
     marked strings in \code{object} should be handled: converted to the
     current locale, used byte-by-byte or translated to UTF-8.}
   \item{con}{An output text connection.}
diff --git a/src/library/base/man/tilde.Rd b/src/library/base/man/tilde.Rd
index 926ffa4..69ab294 100644
--- a/src/library/base/man/tilde.Rd
+++ b/src/library/base/man/tilde.Rd
@@ -1,5 +1,5 @@
 % File src/library/base/man/tilde.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2013 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/base/man/timezones.Rd b/src/library/base/man/timezones.Rd
index d11394c..20abaeb 100644
--- a/src/library/base/man/timezones.Rd
+++ b/src/library/base/man/timezones.Rd
@@ -1,10 +1,8 @@
 % File src/library/base/man/timezones.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2014 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2016 R Core Team
 % Distributed under GPL 2 or later
 
-\newcommand{\sspace}{\ifelse{latex}{\out{~}}{ }}
-
 \name{timezones}
 \alias{Sys.timezone}
 \alias{OlsonNames}
@@ -35,11 +33,11 @@ OlsonNames()
 
 \details{
   Time zones are a system-specific topic, but these days almost all \R
-  platforms use similar underlying code, used by Linux, OS X, Solaris,
+  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 OS X and
+  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
@@ -53,8 +51,8 @@ OlsonNames()
 
   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{http://en.wikipedia.org/wiki/Coordinated_Universal_Time}).  (Some
-  but not all platforms will give a warning for invalid timezones.)
+  \url{https://en.wikipedia.org/wiki/Coordinated_Universal_Time}).  (Some
+  but not all platforms will give a warning for invalid time zones.)
 
   Time zones did not come into use until the second half of the
   nineteenth century and were not widely adopted until the twentieth,
@@ -64,15 +62,16 @@ OlsonNames()
   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.
   
-  The most common system implementation of \code{POSIXct} is as signed
+  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
   as they were in 1902.  Most of the world had not adopted time zones by
-  1902 (so used local \sQuote{mean time} based on longitude) but for
-  some places there had been time-zone changes before then.  64-bit
+  1902 (so used local \sQuote{mean time} based on longitude) but for a
+  few places there had been time-zone changes before then.  64-bit
   representations are becoming common; unfortunately on some 64-bit OSes
-  (notably OS X) the database information is only available for the
-  range 1901--2038, and incompletely for the end years.
+  (notably macOS) the database information is 32-bit and so only
+  available for the range 1901--2038, and incompletely for the end
+  years.
 }
 
 \value{
@@ -87,6 +86,9 @@ OlsonNames()
 }
 
 \section{Time zone names}{
+  Names \code{"UTC"} and its synonym \code{"GMT"} are accepted on all
+  platforms.
+
   Where OSes describe their valid time zones can be obscure.  The help
   for the C function \code{tzset} can be helpful, but it can also be
   inaccurate.  There is a cumbersome POSIX specification (listed under
@@ -116,48 +118,35 @@ OlsonNames()
   The abbreviations used have changed over the years: for example France
   used \samp{PMT} (\sQuote{Paris Mean Time}) from 1891 to 1911 then
   \samp{WET/WEST} up to 1940 and \samp{CET/CEST} from 1946.  (In almost
-  all time zones they 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: more so in versions of
-  \R prior to 3.1.0.
+  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.
   
   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, OS X, FreeBSD), \file{/usr/share/lib/zoneinfo} (Solaris, AIX),
+  (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
-  \url{http://en.wikipedia.org/wiki/Zone.tab}.
-#ifdef unix
+  \url{https://en.wikipedia.org/wiki/Zone.tab}.
 
   Where \R was configured with option \option{--with-internal-tzcode}
-  (the default on OS X: recommended on Solaris), the database at
+  (the default on macOS and Windows: recommended on Solaris), the database at
   \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 some OSes,
-  e.g.\sspace{}Linux).
-#endif
+  \file{zoneinfo} directory: this is also supported by the native
+  services on some OSes, e.g.\sspace{}Linux).
 #ifdef windows
 
-  Under Windows the current version of the database is stated in
-  file \file{\var{\link{R_HOME}}\\share\\zoneinfo\\VERSION}.
-  Environment variable \env{TZDIR} can be used to point to a different
-  \file{zoneinfo} directory.
-
   An attempt is made (once only per session) to map Windows' idea of the
-  current time zone to a location, following an earlier version of
+  current time zone to a location, following a version of
   \url{http://unicode.org/repos/cldr/trunk/common/supplemental/windowsZones.xml}
+  with additional values deduced from the Windows Registry and documentation.
   It can be overridden by setting the \env{TZ} environment variable
   before any date-times are used in the session.
-
-  Windows documents a specification of the form \code{GST-1GDT}: this is
-  interpreted as POSIX-like and hence the \sQuote{US rules} for changing
-  to/from DST are applied (and are incorrect for Germany).  This is
-  accepted for backwards compatibility but is unreliable and gives a
-  warning.
 #endif
 
   Most platforms support time zones of the form \samp{GMT+n} and
@@ -166,25 +155,45 @@ OlsonNames()
   \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, people used
-  time based on their longitude, known as \sQuote{Local Mean Time} and
-  abbreviated as \samp{LMT} in the databases.  Often this was codified
-  by a name such as \sQuote{Copenhagen Mean Time} for a period before
-  the switch to standard time zones (such as \samp{GMT+5}).  For
-  example, Paris codified its LMT as \sQuote{Paris Mean Time} in 1891,
-  switched to \samp{GMT+0} in 1911 and to \samp{GMT-1} in 1945.
+  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
+  databases: in many countries that was codified with a specific name
+  before the switch to a standard time.  For example, Paris codified its
+  LMT as \sQuote{Paris Mean Time} in 1891 (to be used throughout
+  mainland France) and switched to \samp{GMT+0} in 1911.
+
+  %% 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.
+}
+
+\section{Warning}{
+%% glibc and macOS have _POSIX_TZNAME_MAX and define it as 6.
+%% Earlier versions of R's code assumed 10, and it was discovered
+%% that some implemntations did not abbreviate unusual names, thereby
+%% exceeding this.
+%% Olson's tzcode has a limit of 255 and does not check: this has been
+%% corrected in R's copy.
+%% sysconf(_SC_TZNAME_MAX) might allow it to be checked:
+%% that gives 27 on macOS.  However, seems it is dynamic on glibc.
+  There is a system-specific upper limit on the number of bytes in
+  (abbreviated) time-zone names which can be as low as 6 (as required by
+  POSIX).  Some OSes allow the setting of time zones with names which
+  exceed their limit, and that can crash the \R session.
 }
 
 \note{
   Since 2007 there has been considerable disruption over changes to the
   timings of the DST transitions, aimed at energy conservation.  These
   often have short notice and time-zone databases may not be up to date.
-  (Chile has in the recent past announced changes at \emph{5 days}
-  notice, and in 2014 Turkey gave only a month's notice.)
+  (Morocco in 2013 announced a change to the end of DST at \emph{a days}
+  notice, and in 2015 North Korea gave imprecise information about a
+  change a week in advance.)
 
   On platforms with case-insensitive file systems, time zone names will be
   case-insensitive.  They may or may not be on other platforms and so,
-  for example,  \code{"gmt"} is valid on some platforms and not on others.
+  for example, \code{"gmt"} is valid on some platforms and not on others.
 
   Note that except where replaced, the operation of time zones is an OS
   service, and even where replaced a third-party database is used and
@@ -197,7 +206,7 @@ OlsonNames()
 \seealso{
   \code{\link{Sys.time}}, \code{\link{as.POSIXlt}}.
 
-  \url{http://en.wikipedia.org/wiki/Time_zone} and
+  \url{https://en.wikipedia.org/wiki/Time_zone} and
   \url{http://www.twinsun.com/tz/tz-link.htm} for extensive sets of links.
 }
 
diff --git a/src/library/base/man/toString.Rd b/src/library/base/man/toString.Rd
index d2ccb64..6a9512a 100644
--- a/src/library/base/man/toString.Rd
+++ b/src/library/base/man/toString.Rd
@@ -1,5 +1,5 @@
 % File src/library/base/man/toString.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2007 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/base/man/trace.Rd b/src/library/base/man/trace.Rd
index 17e197e..546dd2c 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, http://www.R-project.org
-% Copyright 1995-2010 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright (C) 1995-2015 R Core Team
 % Distributed under GPL 2 or later
 
 \name{trace}
@@ -9,13 +9,15 @@
 \alias{untrace}
 \alias{tracingState}
 \alias{.doTrace}
+\alias{returnValue}
 \description{
   A call to \code{trace} allows you to insert debugging code (e.g., a
   call to \code{\link{browser}} or \code{\link{recover}}) at chosen
   places in any function.  A call to \code{untrace} cancels the tracing.
   Specified methods can be traced the same way, without tracing all
-  calls to the function.  Trace code can be any \R expression.  Tracing
-  can be temporarily turned on or off globally by calling \code{tracingState}.
+  calls to the generic function.  Trace code (\code{tracer}) can be any
+  \R expression.  Tracing can be temporarily turned on or off globally
+  by calling \code{tracingState}.
 }
 \usage{
 trace(what, tracer, exit, at, print, signature,
@@ -24,18 +26,19 @@ untrace(what, signature = NULL, where = topenv(parent.frame()))
 
 tracingState(on = NULL)
 .doTrace(expr, msg)
+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{tracer}{Either a function or an unevaluated expression.  The
+  \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
     specified by the argument \code{at}.
     See the details section.}
-  \item{exit}{ Either a function or an unevaluated expression.  The
+  \item{exit}{either a \code{\link{function}} or an unevaluated expression.  The
     function will be called or the expression will be evaluated on
     exiting the function.
     See the details section.}
@@ -73,7 +76,7 @@ tracingState(on = NULL)
   (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}
+  \item{on}{logical; a call to the support function \code{tracingState} returns \code{TRUE}
     if tracing is globally turned on, \code{FALSE} otherwise.  An
     argument of one or the other of those values sets the state.  If the
     tracing state is \code{FALSE}, none of the trace actions will
@@ -85,6 +88,10 @@ tracingState(on = NULL)
     \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.
+    a function exited because of an error, not a normal exit), it
+    will return \code{default} instead.
+  }
 }
 \details{
   The \code{trace} function operates by constructing a revised version
@@ -133,9 +140,16 @@ tracingState(on = NULL)
   Using \code{\link{setBreakpoint}} (from package \pkg{utils}) may be an
   alternative, calling \code{trace(...., at, ...)}.
 
+  The \code{exit} argument is called during \code{\link{on.exit}}
+  processing.  In an \code{on.exit} expression, the experimental \code{returnValue()}
+  function may be called to obtain the value about to be returned by
+  the function. Calling this function in other circumstances will give
+  undefined results.
+
   An intrinsic limitation in the \code{exit} argument is that it won't
-  work if the function itself uses \code{on.exit}, since the existing
-  calls will override the one supplied by \code{trace}.
+  work if the function itself uses \code{on.exit} with \code{add=
+  FALSE} (the default), since the existing calls will override the one
+  supplied by \code{trace}.
 
   Tracing does not nest.  Any call to \code{trace} replaces previously
   traced versions of that function or method (except for edited
@@ -187,19 +201,35 @@ tracingState(on = NULL)
   include a \sQuote{destructive} browser for \R.)
 }
 \note{
+  Using \code{trace()} is conceptually a generalization of
+  \code{\link{debug}}, implemented differently.  Namely by calling
+  \code{\link{browser}} via its \code{tracer} or \code{exit} argument.
+  %% On the other hand, it sometimes triggers less consistently
+  %% ?? lacks features of debug()- (which ??)
+
   The version of function tracing that includes any of the arguments
   except for the function name requires the \pkg{methods} package
   (because it uses special classes of objects to store and restore
   versions of the traced functions).
 
   If methods dispatch is not currently on, \code{trace} will load the
-  methods namespace, but will not put the methods package on the search
-  list.
+  methods namespace, but will not put the methods package on the
+  \code{\link{search}} list.
 }
 \value{
-  In the simple version (just the first argument), invisible \code{NULL}.
+  In the simple version (just the first argument), \code{trace} returns
+  an invisible \code{NULL}.
   Otherwise, the traced function(s) name(s).  The relevant consequence is the
   assignment that takes place.
+
+  \code{untrace} returns the function name invisibly.
+
+  \code{tracingState} returns the current global tracing state, and possibly
+  changes it.
+
+  When called during \code{on.exit} processing, \code{returnValue} returns
+  the value about to be returned by the exiting function.  Behaviour in
+  other circumstances is undefined.
 }
 \references{
   Becker, R. A., Chambers, J. M. and Wilks, A. R. (1988)
@@ -213,15 +243,23 @@ tracingState(on = NULL)
   constructing general expressions.
 }
 \examples{
-require(graphics)
+require(stats)
 
 ##  Very simple use
 trace(sum)
-hist(stats::rnorm(100)) # shows about 3-4 calls to sum()
+hist(rnorm(100)) # shows about 3-4 calls to sum()
 untrace(sum)
 
-if(.isMethodsDispatchOn()) { # non-simple use needs 'methods' package
+## Show how pt() is called from inside power.t.test():
+if(FALSE)
+  trace(pt) ## would show ~20 calls, but we want to see more:
+trace(pt, tracer = quote(cat(sprintf("tracing pt(*, ncp = \%.15g)\n", ncp))),
+      print = FALSE) # <- not showing typical extra
+power.t.test(20, 1, power=0.8, sd=NULL)  ##--> showing the ncp root finding:
+untrace(pt)
 
+%% methods is loaded when needed
+%% if(.isMethodsDispatchOn()) { # non-simple use needs 'methods' package
 f <- function(x, y) {
     y <- pmax(y, 0.001)
     if (x > 0) x ^ y else stop("x must be positive")
@@ -254,6 +292,7 @@ trace("f", quote(browser(skipCalls = 4)), at = list(c(3,4)))
 
 trace("as.matrix", recover)
 
+
 ## turn off the tracing
 
 untrace(c("f", "as.matrix"))
@@ -265,9 +304,9 @@ untrace(c("f", "as.matrix"))
 ## has a namespace, so the where= argument must be used
 ## to get the right version of lm)
 
-trace(lm, exit = recover, where = nlme)
-}
+trace(lm, exit = recover, where = asNamespace("nlme"))
 }
+%%}% only if 'methods'
 }
 \keyword{programming}
 \keyword{debugging}
diff --git a/src/library/base/man/traceback.Rd b/src/library/base/man/traceback.Rd
index 6e2da5b..68ec1b9 100644
--- a/src/library/base/man/traceback.Rd
+++ b/src/library/base/man/traceback.Rd
@@ -1,21 +1,27 @@
 % File src/library/base/man/traceback.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2007 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2016 R Core Team
 % Distributed under GPL 2 or later
 
 \name{traceback}
+\title{Get and Print Call Stacks}
 \alias{traceback}
+\alias{.traceback}
 \alias{.Traceback}
-\title{Print Call Stacks}
 \description{
   By default \code{traceback()} prints the call stack of the last
   uncaught error, i.e., the sequence of calls that lead to the error.
   This is useful when an error occurs with an unidentifiable error
   message.  It can also be used to print the current stack or
   arbitrary lists of deparsed calls.
+
+  \code{.traceback()} now \emph{returns} the above call stack (and
+  \code{traceback(x, *)} can be regarded as convenience function for
+  printing the result of \code{.traceback(x)}).
 }
 \usage{
 traceback(x = NULL, max.lines = getOption("deparse.max.lines"))
+.traceback(x = NULL)
 }
 \arguments{
   \item{x}{\code{NULL} (default, meaning \code{.Traceback}), or an
@@ -68,7 +74,7 @@ foo <- function(x) { print(1); bar(2) }
 bar <- function(x) { x + a.variable.which.does.not.exist }
 \dontrun{
 foo(2) # gives a strange error
-traceback()}
+traceback()}%dont
 ## 2: bar(2)
 ## 1: foo(2)
 bar
diff --git a/src/library/base/man/tracemem.Rd b/src/library/base/man/tracemem.Rd
index d56fd4f..d756f8e 100644
--- a/src/library/base/man/tracemem.Rd
+++ b/src/library/base/man/tracemem.Rd
@@ -1,6 +1,6 @@
 % File src/library/base/man/tracemem.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2013 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2016 R Core Team
 % Distributed under GPL 2 or later
 
 \name{tracemem}
@@ -29,7 +29,7 @@ retracemem(x, previous = NULL)
   compiled with memory profiling; \code{retracemem} does not (so it can be
   left in code during development).
 
-  It is enabled in the CRAN OS X and Windows builds of \R.
+  It is enabled in the CRAN macOS and Windows builds of \R.
 
   When an object is traced any copying of the object by the C function
   \code{duplicate} produces a message to standard output, as does type
@@ -62,7 +62,7 @@ retracemem(x, previous = NULL)
 
   \code{\link{trace}}, \code{\link{Rprofmem}}
 
-  \url{http://developer.r-project.org/memory-profiling.html}
+  \url{https://developer.r-project.org/memory-profiling.html}
 }
 \examples{\dontrun{
 a <- 1:10
diff --git a/src/library/base/man/transform.Rd b/src/library/base/man/transform.Rd
index 0b36ff6..eff2a74 100644
--- a/src/library/base/man/transform.Rd
+++ b/src/library/base/man/transform.Rd
@@ -1,5 +1,5 @@
 % File src/library/base/man/transform.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2013 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/base/man/trimws.Rd b/src/library/base/man/trimws.Rd
new file mode 100644
index 0000000..28be3b6
--- /dev/null
+++ b/src/library/base/man/trimws.Rd
@@ -0,0 +1,27 @@
+\name{trimws}
+\alias{trimws}
+\title{Remove Leading/Trailing Whitespace}
+\description{
+  Remove leading and/or trailing whitespace from character strings.
+}
+\usage{
+trimws(x, which = c("both", "left", "right"))
+}
+\arguments{
+  \item{x}{a character vector}
+  \item{which}{a character string specifying whether to remove both
+    leading and trailing whitespace (default), or only leading
+    (\code{"left"}) or trailing (\code{"right"}).  Can be abbreviated.}
+}
+\details{
+  For portability, \sQuote{whitespace} is taken as the character class
+  \code{[ \\t\\r\\n]} (space, horizontal tab, line feed, carriage return).
+}
+\examples{
+x <- "  Some text. "
+x
+trimws(x)
+trimws(x, "l")
+trimws(x, "r")
+}
+\keyword{character}
diff --git a/src/library/base/man/try.Rd b/src/library/base/man/try.Rd
index f4011be..ff1136e 100644
--- a/src/library/base/man/try.Rd
+++ b/src/library/base/man/try.Rd
@@ -1,6 +1,6 @@
 % File src/library/base/man/try.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2013 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2016 R Core Team
 % Distributed under GPL 2 or later
 
 \name{try}
@@ -11,11 +11,16 @@
   the user's code to handle error-recovery.
 }
 \usage{
-try(expr, silent = FALSE)
+try(expr, silent = FALSE,
+    outFile = getOption("try.outFile", default = stderr()))
 }
 \arguments{
   \item{expr}{an \R expression to try.}
-  \item{silent}{logical: should the report of error messages be suppressed?}
+  \item{silent}{logical: should the report of error messages be
+     suppressed?}
+  \item{outFile}{a \link{connection}, or a character string naming the
+    file to print to (via \code{\link{cat}(*, file = outFile)});
+    used only if \code{silent} is false, as by default.}
 }
 \details{
   \code{try} evaluates an expression and traps any errors that occur
@@ -31,6 +36,12 @@ try(expr, silent = FALSE)
   programming, instead of \code{try(expr, silent = TRUE)}, something like
   \code{tryCatch(expr, error = function(e) e)} (or other simple
   error handler functions) may be more efficient and flexible.
+
+  It may be useful to set the default for \code{outFile} to
+  \code{\link{stdout}()}, i.e., \preformatted{  options(try.outFile = stdout()) }
+  instead of the default \code{\link{stderr}()},
+  notably when \code{try()} is used inside a \code{\link{Sweave}} code
+  chunk and the error message should appear in the resulting document.
 }
 \value{
   The value of the expression if \code{expr} is evaluated without error,
diff --git a/src/library/base/man/typeof.Rd b/src/library/base/man/typeof.Rd
index 3676b53..2c0485f 100644
--- a/src/library/base/man/typeof.Rd
+++ b/src/library/base/man/typeof.Rd
@@ -1,5 +1,5 @@
 % File src/library/base/man/typeof.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2007 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/base/man/unique.Rd b/src/library/base/man/unique.Rd
index 2fe9c7e..0eaf91d 100644
--- a/src/library/base/man/unique.Rd
+++ b/src/library/base/man/unique.Rd
@@ -1,6 +1,6 @@
 % File src/library/base/man/unique.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2014 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2016 R Core Team
 % Distributed under GPL 2 or later
 
 \name{unique}
@@ -58,9 +58,10 @@ unique(x, incomparables = FALSE, \dots)
   not just if it is equal the immediately previous one.  (For the
   latter, see \code{\link{rle}}).
 
-  Missing values are regarded as equal, but \code{NaN} is not equal to
-  \code{NA_real_}.  Character strings are regarded as equal if they are
-  in different encodings but would agree when translated to UTF-8.
+  Missing values (\code{"\link{NA}"}) are regarded as equal, numeric and
+  complex ones differing from \code{NaN}; character strings will be compared in a
+  \dQuote{common encoding}; for details, see \code{\link{match}} (and
+  \code{\link{duplicated}}) which use the same concept.
 
   Values in \code{incomparables} will never be marked as duplicated.
   This is intended to be used for a fairly small set of values and will
@@ -71,9 +72,6 @@ unique(x, incomparables = FALSE, \dots)
   tests for identity of character representations.  This will
   catch people who unwisely rely on exact equality of floating-point
   numbers!
-
-  Character strings will be compared as byte sequences if any input is
-  marked as \code{"bytes"} (see \code{\link{Encoding}}).
 }
 \value{
   For a vector, an object of the same type of \code{x}, but with only
diff --git a/src/library/base/man/unix/Signals.Rd b/src/library/base/man/unix/Signals.Rd
index 2dc2b70..effad92 100644
--- a/src/library/base/man/unix/Signals.Rd
+++ b/src/library/base/man/unix/Signals.Rd
@@ -1,5 +1,5 @@
 % File src/library/base/man/unix/Signals.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2013 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/base/man/unlink.Rd b/src/library/base/man/unlink.Rd
index 858406d..5c95dc1 100644
--- a/src/library/base/man/unlink.Rd
+++ b/src/library/base/man/unlink.Rd
@@ -1,6 +1,6 @@
 % File src/library/base/man/unlink.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2011 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2017 R Core Team
 % Distributed under GPL 2 or later
 
 \name{unlink}
@@ -26,10 +26,8 @@
 
 #ifdef unix
   On most platforms \sQuote{file} includes symbolic links, fifos and
-  sockets.  Prior to \R 2.15.0 \code{unlink(x, recursive = TRUE)} would
-  delete the contents of a directory target of a symbolic link: it now
-  only deletes the symbolic link (as \code{unlink(x, recursive = FALSE)}
-  always has).
+  sockets.  \code{unlink(x, recursive = TRUE)}
+  deletes the just symbolic link if the target of such a link is a directory.
 
 #endif
   Wildcard expansion is done by the internal code of
diff --git a/src/library/base/man/unlist.Rd b/src/library/base/man/unlist.Rd
index f6c34f5..da73b90 100644
--- a/src/library/base/man/unlist.Rd
+++ b/src/library/base/man/unlist.Rd
@@ -1,5 +1,5 @@
 % File src/library/base/man/unlist.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2013 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/base/man/unname.Rd b/src/library/base/man/unname.Rd
index 6ce4682..a2e9037 100644
--- a/src/library/base/man/unname.Rd
+++ b/src/library/base/man/unname.Rd
@@ -1,5 +1,5 @@
 % File src/library/base/man/unname.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2011 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/base/man/userhooks.Rd b/src/library/base/man/userhooks.Rd
index c3d98be..c76ab8b 100644
--- a/src/library/base/man/userhooks.Rd
+++ b/src/library/base/man/userhooks.Rd
@@ -1,6 +1,6 @@
 % File src/library/base/man/userhooks.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2014 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2015 R Core Team
 % Distributed under GPL 2 or later
 
 \name{userhooks}
@@ -24,9 +24,9 @@ packageEvent(pkgname,
 \arguments{
   \item{hookName}{character string: the hook name}
   \item{pkgname}{character string: the package/namespace name}
-  \item{event}{character string: an event for the package}
+  \item{event}{character string: an event for the package.  Can be abbreviated.}
   \item{value}{A function or a list of functions, or for \code{action = "replace"}, \code{NULL} }
-  \item{action}{The action to be taken.  The names can be abbreviated.}
+  \item{action}{The action to be taken.  Can be abbreviated.}
 }
 
 \details{
@@ -90,11 +90,21 @@ packageEvent(pkgname,
   The hooks are stored in the environment \code{.userHooksEnv} in the
   base package, with \sQuote{mangled} names.
 }
+
 \value{
   For \code{getHook} function, a list of functions (possibly empty).
   For \code{setHook} function, no return value.
   For \code{packageEvent}, the derived hook name (a character string).
 }
+
+\note{
+  Hooks need to be set before the event they modify: for standard
+  packages this can be problematic as \pkg{methods} is loaded and
+  attached early in the startup sequence.   The usual place to set hooks
+  such as the example below is in the \file{.Rprofile} file, but that
+  will not work for \pkg{methods}.
+}
+
 \seealso{
   \code{\link{library}}, \code{\link{detach}}, \code{\link{loadNamespace}}.
 
diff --git a/src/library/base/man/utf8Conversion.Rd b/src/library/base/man/utf8Conversion.Rd
index 3385c41..0d67cbb 100644
--- a/src/library/base/man/utf8Conversion.Rd
+++ b/src/library/base/man/utf8Conversion.Rd
@@ -1,6 +1,6 @@
 % File src/library/base/man/utf8Conversion.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2014 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2017 R Core Team
 % Distributed under GPL 2 or later
 
 \name{utf8Conversion}
@@ -8,7 +8,7 @@
 \alias{intToUtf8}
 \alias{Unicode}
 \alias{code point}
-\title{Convert to or from UTF-8-encoded Character Vectors}
+\title{Convert Integer Vectors to or from UTF-8-encoded Character Vectors}
 \description{
   Conversion of UTF-8 encoded character vectors to and from integer vectors.
 }
@@ -31,7 +31,8 @@ intToUtf8(x, multiple = FALSE)
   \code{0} to \code{0x10FFFF}.
   
   \code{utf8ToInt} converts a length-one character string encoded in
-  UTF-8 to an integer vector of Unicode code points.
+  UTF-8 to an integer vector of Unicode code points.  It checks validity
+  of the input and returns \code{NA} if it is invalid.
 
   \code{intToUtf8} converts a numeric vector of Unicode code points
   either to a single character string or a character vector of single
@@ -45,6 +46,9 @@ intToUtf8(x, multiple = FALSE)
 \examples{\donttest{
 ## will only display in some locales and fonts
 intToUtf8(0x03B2L) # Greek beta
-}}
+}
+utf8ToInt("bi\u00dfchen")
+utf8ToInt("\xfa\xb4\xbf\xbf\x9f")
+}
 \keyword{character}
 \keyword{utilities}
diff --git a/src/library/base/man/validUTF8.Rd b/src/library/base/man/validUTF8.Rd
new file mode 100644
index 0000000..3bd347e
--- /dev/null
+++ b/src/library/base/man/validUTF8.Rd
@@ -0,0 +1,66 @@
+% File src/library/base/man/validUTF8.Rd
+% Part of the R package, https://www.R-project.org
+% Copyright 2015 R Core Team
+% Distributed under GPL 2 or later
+
+\name{validUTF8}
+\alias{validUTF8}
+\alias{validEnc}
+\title{
+  Check if a Character Vector is Validly Encoded
+}
+
+\description{
+  Check if each element of a character vector is valid in its implied
+  encoding.
+}
+
+\usage{
+validUTF8(x)
+
+validEnc(x)
+}
+
+\arguments{
+  \item{x}{A character vector.}
+}
+
+\details{
+  These use similar checks to those used by functions such as
+  \code{\link{grep}}.
+
+  \code{validUTF8} ignores any marked encoding (see
+  \code{\link{Encoding}}) and so looks directly if the bytes in each
+  string are valid UTF-8.
+
+  \code{validEnc} regards character strings as validly encoded unless
+  their encodings are marked as UTF-8 or they are unmarked and the \R
+  session is in a UTF-8 or other multi-byte locale.  (The checks in
+  other multi-byte locales depend on the OS and as with
+  \code{\link{iconv}} not all invalid inputs may be detected.)
+}
+
+\note{
+  It would be possible to check for the validity of character strings in
+  a Latin-1 encoding, but extensions such as CP1252 are widely accepted
+  as \sQuote{Latin-1} and 8-bit encodings rarely need to be checked for
+  validity.
+}
+
+\value{
+  A logical vector of the same length as \code{x}.   \code{NA} elements
+  are regarded as validly encoded.
+}
+
+\examples{
+x <-
+  ## from example(text)
+c("Jetz", "no", "chli", "z\xc3\xbcrit\xc3\xbc\xc3\xbctsch:",
+  "(noch", "ein", "bi\xc3\x9fchen", "Z\xc3\xbc", "deutsch)",
+   ## from a CRAN check log
+   "\xfa\xb4\xbf\xbf\x9f")
+validUTF8(x)
+validEnc(x) # depends on the locale
+Encoding(x) <-"UTF-8"
+validEnc(x)
+}
diff --git a/src/library/base/man/vector.Rd b/src/library/base/man/vector.Rd
index adda466..c5bd65b 100644
--- a/src/library/base/man/vector.Rd
+++ b/src/library/base/man/vector.Rd
@@ -1,6 +1,6 @@
 % File src/library/base/man/vector.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2013 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2015 R Core Team
 % Distributed under GPL 2 or later
 
 \name{vector}
@@ -18,15 +18,16 @@ is.vector(x, mode = "any")
 \arguments{
   \item{mode}{character string naming an atomic mode or
     \code{"list"} or \code{"expression"} or (except for \code{vector})
-    \code{"any"}.}
+    \code{"any"}.  Currently, \code{is.vector()} allows any type (see
+    \code{\link{typeof}}) for \code{mode}, and when mode is not
+    \code{"any"}, \code{is.vector(x, mode)} is almost the same as
+    \code{typeof(x) == mode}.}% differences: for mode = NA, or mode = "numeric"
   \item{length}{a non-negative integer specifying the desired length.
     For a long vector, i.e., \code{length > .Machine$integer.max}, it
     has to be of type \code{"double"}.  Supplying an argument of length
     other than one is an error.}
   \item{x}{an \R object.}
 }
-%% The implementation of is.vector allows any _type_ to be named,
-%% and MM uses "symbol" and "language" in str.default()
 \description{
   \code{vector} produces a vector of the given length and mode.
 
diff --git a/src/library/base/man/warning.Rd b/src/library/base/man/warning.Rd
index ee51efb..e988ce8 100644
--- a/src/library/base/man/warning.Rd
+++ b/src/library/base/man/warning.Rd
@@ -1,5 +1,5 @@
 % File src/library/base/man/warning.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2014 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/base/man/warnings.Rd b/src/library/base/man/warnings.Rd
index 37a1700..f8652e4 100644
--- a/src/library/base/man/warnings.Rd
+++ b/src/library/base/man/warnings.Rd
@@ -1,6 +1,6 @@
 % File src/library/base/man/warnings.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2014 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2016 R Core Team
 % Distributed under GPL 2 or later
 
 \name{warnings}
@@ -10,6 +10,7 @@
 \alias{print.warnings}
 \alias{[.warnings}
 \alias{c.warnings}
+\alias{duplicated.warnings}
 \alias{unique.warnings}
 \description{
   \code{warnings} and its \code{print} method print the
@@ -32,6 +33,11 @@ warnings(\dots)
   \code{warnings()} is used.  In essence this is if \code{options(warn =
     0)} and \code{warning} has been called at least once.
 
+  Note that the \code{\link{length}(last.warning)} is maximally
+  \code{\link{getOption}("nwarnings")} (at the time the warnings are
+  generated) which is \code{50} by default.  To increase, use something
+  like \preformatted{  options(nwarnings = 10000)  }
+
   It is possible that \code{last.warning} refers to the last recorded
   warning and not to the last warning, for example if \code{options(warn)} has
   been changed or if a catastrophic error occurred.
diff --git a/src/library/base/man/weekday.POSIXt.Rd b/src/library/base/man/weekday.POSIXt.Rd
index b897009..02602a5 100644
--- a/src/library/base/man/weekday.POSIXt.Rd
+++ b/src/library/base/man/weekday.POSIXt.Rd
@@ -1,6 +1,6 @@
 % File src/library/base/man/weekday.POSIXt.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2009 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2016 R Core Team
 % Distributed under GPL 2 or later
 
 \name{weekdays}
@@ -41,7 +41,8 @@ julian(x, \dots)
 }
 \arguments{
   \item{x}{an object inheriting from class \code{"POSIXt"} or \code{"Date"}.}
-  \item{abbreviate}{logical.  Should the names be abbreviated?}
+  \item{abbreviate}{logical vector (possibly recycled).  Should the names be
+    abbreviated?}
   \item{origin}{an length-one object inheriting from class
     \code{"POSIXt"} or \code{"Date"}.}
   \item{\dots}{arguments for other methods.}
@@ -73,11 +74,11 @@ weekdays(.leap.seconds)
 months(.leap.seconds)
 quarters(.leap.seconds)
 
-## Julian Day Number (JDN, http://en.wikipedia.org/wiki/Julian_day)
+## Julian Day Number (JDN, https://en.wikipedia.org/wiki/Julian_day)
 ## is the number of days since noon UTC on the first day of 4317 BC.
 ## in the proleptic Julian calendar.  To more recently, in
 ## 'Terrestrial Time' which differs from UTC by a few seconds
-## See http://en.wikipedia.org/wiki/Terrestrial_Time
+## See https://en.wikipedia.org/wiki/Terrestrial_Time
 julian(Sys.Date(), -2440588) # from a day
 floor(as.numeric(julian(Sys.time())) + 2440587.5) # from a date-time
 }}
diff --git a/src/library/base/man/which.Rd b/src/library/base/man/which.Rd
index e61e0be..19c7fad 100644
--- a/src/library/base/man/which.Rd
+++ b/src/library/base/man/which.Rd
@@ -1,5 +1,5 @@
 % File src/library/base/man/which.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2014 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/base/man/which.min.Rd b/src/library/base/man/which.min.Rd
index d028945..9734785 100644
--- a/src/library/base/man/which.min.Rd
+++ b/src/library/base/man/which.min.Rd
@@ -1,10 +1,8 @@
 % File src/library/base/man/which.min.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2013 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2016 R Core Team
 % Distributed under GPL 2 or later
 
-\newcommand{\CRANpkg}{\href{http://CRAN.R-project.org/package=#1}{\pkg{#1}}}
-
 \name{which.min}
 \alias{which.min}
 \alias{which.max}
@@ -18,28 +16,36 @@
 \description{
   Determines the location, i.e., index of the (first) minimum or maximum
   of a numeric (or logical) vector.
-
-  For a logical vector \code{x}, \code{which.min(x)} and \code{which.max(x)}
-  return the index of the first \code{FALSE} or \code{TRUE}, respectively.
 }
 \usage{
 which.min(x)
 which.max(x)
 }
 \arguments{
-  \item{x}{numeric (integer or double) vector, whose
+  \item{x}{numeric (logical, integer or double) vector or an \R object
+    for which the internal coercion to \code{\link{double}} works whose
     \code{\link{min}} or \code{\link{max}} is searched for.}
 }
+\section{Logical \code{x} -- First \code{TRUE} or \code{FALSE}}{
+  For a \code{\link{logical}} vector \code{x} with both \code{FALSE} and
+  \code{TRUE} values, \code{which.min(x)} and \code{which.max(x)} return
+  the index of the first \code{FALSE} or \code{TRUE}, respectively, as
+  \code{FALSE < TRUE}.  However, \code{match(FALSE, x)} or
+  \code{match(TRUE, x)} are typically \emph{preferred}, as they do
+  indicate mismatches.
+}
 \value{
   Missing and \code{NaN} values are discarded.
 
-  an \code{\link{integer}} of length 1 or 0 (iff \code{x} has no
+  an \code{\link{integer}} or on 64-bit platforms, if
+  \code{\link{length}(x) =: n}\eqn{\ge 2^{31}}{>= 2^31} an integer
+  valued \code{\link{double}} of length 1 or 0 (iff \code{x} has no
   non-\code{NA}s), giving the index of the \emph{first} minimum or
   maximum respectively of \code{x}.
 
   If this extremum is unique (or empty), the results are the same as
-  (but more efficient than) \code{which(x == min(x))} or
-  \code{which(x == max(x))} respectively.
+  (but more efficient than) \code{which(x == min(x, na.rm = TRUE))} or
+  \code{which(x == max(x, na.rm = TRUE))} respectively.
 }
 \author{Martin Maechler}
 \seealso{
@@ -63,9 +69,13 @@ range(presidents, na.rm = TRUE)
 which.min(presidents) # 28
 which.max(presidents) #  2
 
-## Find the first occurrence, i.e. the first TRUE:
+## Find the first occurrence, i.e. the first TRUE, if there is at least one:
 x <- rpois(10000, lambda = 10); x[sample.int(50, 20)] <- NA
 ## where is the first value >= 20 ?
 which.max(x >= 20)
+
+## Also works for lists (which can be coerced to numeric vectors):
+which.min(list(A = 7, pi = pi)) ##  ->  c(pi = 2L)
+\dontshow{stopifnot(identical(which.min(list(A = 7, pi = pi)), c(pi = 2L)))}
 }
 \keyword{utilities}
diff --git a/src/library/base/man/windows/shell.Rd b/src/library/base/man/windows/shell.Rd
index 7a904ab..956b80c 100644
--- a/src/library/base/man/windows/shell.Rd
+++ b/src/library/base/man/windows/shell.Rd
@@ -1,9 +1,10 @@
 % File src/library/base/man/windows/shell.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2014 R Core Team
 % Distributed under GPL 2 or later
 
 \name{shell}
+\Rdversion{1.1}
 \alias{shell}
 \title{Invoke a System Command, using a Shell}
 
@@ -18,8 +19,8 @@ shell(cmd, shell, flag = "/c", intern = FALSE, wait = TRUE,
     \code{NULL} (no shell).  If missing, a suitable shell is chosen:
     see \sQuote{Details}.}
   \item{flag}{the switch to run a command under the shell.  If the shell
-  is identified as \code{bash} or \code{tcsh} or \code{sh} the default
-  is changed to \code{"-c"}.}
+  is \code{bash} or \code{tcsh} or \code{sh} the default is changed to
+  \code{"-c"}.}
   \item{intern}{a logical, indicates whether to make the output of the
     command an \R object.}
   \item{wait}{should the \R interpreter wait for the command to finish?
@@ -57,15 +58,11 @@ shell(cmd, shell, flag = "/c", intern = FALSE, wait = TRUE,
 
 \details{
   If no \code{shell} is specified, the environment variables
-  \env{R_SHELL}, \env{SHELL} and \env{COMSPEC} are tried in turn:
-  \env{COMSPEC} should always succeed. Note that future versions of \R
-  will not consult \env{SHELL}, so set \env{R_SHELL} if you want to
-  override \env{COMSPEC}.
-
-  Using \code{shell = NULL} invokes the command \code{cmd} directly, in
-  which case an extension of \file{.exe} is assumed.  It is possible to
-  use batch files directly if their extension is given: Windows (rather
-  than \R) then chooses a shell.
+  \env{R_SHELL} and \env{COMSPEC} are tried in turn: \env{COMSPEC}
+  should always succeed.  Using \code{shell = NULL} invokes the command
+  \code{cmd} directly, in which case an extension of \file{.exe} is
+  assumed.  It is possible to use batch files directly if their
+  extension is given: Windows (rather than \R) then chooses a shell.
 
   See \code{\link{system}} for fuller details: \code{shell} is a more
   user-friendly wrapper for \code{system}.  To make use of Windows
diff --git a/src/library/base/man/windows/shell.exec.Rd b/src/library/base/man/windows/shell.exec.Rd
index 2b6ef09..33c8a8d 100644
--- a/src/library/base/man/windows/shell.exec.Rd
+++ b/src/library/base/man/windows/shell.exec.Rd
@@ -1,5 +1,5 @@
 % File src/library/base/man/windows/shell.exec.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2008 R Core Team
 % Distributed under GPL 2 or later
 
@@ -23,9 +23,8 @@ shell.exec(file)
   \R versions 2.13.0 and earlier interpreted \code{file} relative to
   the \R home directory, so a complete path was usually needed.
 
-  Encoded \samp{file://} URLs should be in the Windows standard form, e.g.
-  \code{"file:///c:/path/to/file.txt"}.
-
+  Encoded \samp{file://} URLs should be in the Windows standard form,
+  e.g.\sspace{}\code{"file:///c:/path/to/file.txt"}.
 }
 \value{
   No value, but informative error messages will be given if the
diff --git a/src/library/base/man/with.Rd b/src/library/base/man/with.Rd
index 8cd3143..f7327c4 100644
--- a/src/library/base/man/with.Rd
+++ b/src/library/base/man/with.Rd
@@ -1,6 +1,6 @@
 % File src/library/base/man/with.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2008 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2017 R Core Team
 % Distributed under GPL 2 or later
 
 \name{with}
@@ -43,6 +43,18 @@ within(data, expr, \dots)
   frame), and returns it.  \code{within} can be used as an alternative
   to \code{transform}.
 }
+\note{
+  For \emph{interactive} use this is very effective and nice to read.  For
+  \emph{programming} however, i.e., in one's functions, more care is
+  needed, and typically one should refrain from using \code{with()}, as,
+  e.g., variables in \code{data} may accidentally override local
+  variables, see the reference.
+
+  Further, when using modeling or graphics functions with an explicit
+  \code{data} argument (and typically using \code{\link{formula}}s),
+  it is typically preferred to use the \code{data} argument of that
+  function rather than to use \code{with(data, ...)}.
+}
 \value{
   For \code{with}, the value of the evaluated \code{expr}.  For
   \code{within}, the modified object.
@@ -51,18 +63,23 @@ within(data, expr, \dots)
   \code{\link{evalq}}, \code{\link{attach}}, \code{\link{assign}},
   \code{\link{transform}}.
 }
+\references{
+  Thomas Lumley (2003)  \emph{Standard nonstandard evaluation rules}.
+  \url{http://developer.r-project.org/nonstandard-eval.pdf}
+}
 \examples{
+with(mtcars, mpg[cyl == 8  &  disp > 350])
+    # is the same as, but nicer than
+mtcars$mpg[mtcars$cyl == 8  &  mtcars$disp > 350]
+
 require(stats); require(graphics)
-#examples from glm:
-\donttest{
-library(MASS)
-with(anorexia, {
-    anorex.1 <- glm(Postwt ~ Prewt + Treat + offset(Prewt),
-                    family = gaussian)
-    summary(anorex.1)
-})
-}
 
+# examples from glm:
+with(data.frame(u = c(5,10,15,20,30,40,60,80,100),
+                lot1 = c(118,58,42,35,27,25,21,19,18),
+                lot2 = c(69,35,26,21,18,16,13,12,12)),
+    list(summary(glm(lot1 ~ log(u), family = Gamma)),
+         summary(glm(lot2 ~ log(u), family = Gamma))))
 
 aq <- within(airquality, {     # Notice that multiple vars can be changed
     lOzone <- log(Ozone)
@@ -73,12 +90,6 @@ aq <- within(airquality, {     # Notice that multiple vars can be changed
 })
 head(aq)
 
-with(data.frame(u = c(5,10,15,20,30,40,60,80,100),
-                lot1 = c(118,58,42,35,27,25,21,19,18),
-                lot2 = c(69,35,26,21,18,16,13,12,12)),
-    list(summary(glm(lot1 ~ log(u), family = Gamma)),
-         summary(glm(lot2 ~ log(u), family = Gamma))))
-
 # example from boxplot:
 with(ToothGrowth, {
     boxplot(len ~ dose, boxwex = 0.25, at = 1:3 - 0.2,
diff --git a/src/library/base/man/withVisible.Rd b/src/library/base/man/withVisible.Rd
index 60085bd..f3edf7f 100644
--- a/src/library/base/man/withVisible.Rd
+++ b/src/library/base/man/withVisible.Rd
@@ -1,11 +1,11 @@
 % File src/library/utils/man/withVisible.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2010 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2016 R Core Team
 % Distributed under GPL 2 or later
 
 \name{withVisible}
 \alias{withVisible}
-\title{Return both a value and its visibility}
+\title{Return both a Value and its Visibility}
 \description{
 This function evaluates an expression, returning it in a two element list
 containing its value and a flag showing whether it would automatically print.
@@ -14,10 +14,12 @@ containing its value and a flag showing whether it would automatically print.
 withVisible(x)
 }
 \arguments{
-  \item{x}{ An expression to be evaluated. }
+  \item{x}{an expression to be evaluated.}
 }
 \details{
-  The argument is evaluated in the caller's context.
+  The argument, \emph{not} an \code{\link{expression}} object, rather
+  an (unevaluated function) \code{\link{call}}, is evaluated in the
+  caller's context.
 
   This is a \link{primitive} function.
 }
@@ -25,12 +27,16 @@ withVisible(x)
   \item{value }{The value of \code{x} after evaluation.}
   \item{visible }{logical; whether the value would auto-print.}
 }
-\seealso{\code{\link{invisible}}, \code{\link{eval}}}
+\seealso{\code{\link{invisible}}, \code{\link{eval}};
+  \code{\link{withAutoprint}()} calls \code{\link{source}()} which
+  itself uses \code{withVisible()} in order to correctly
+  \dQuote{auto print}.
+}
 \examples{
 x <- 1
-withVisible(x <- 1)
+withVisible(x <- 1) # *$visible is FALSE
 x
-withVisible(x)
+withVisible(x)      # *$visible is TRUE
 
 # Wrap the call in evalq() for special handling
 
diff --git a/src/library/base/man/write.Rd b/src/library/base/man/write.Rd
index fa0d922..8f664a0 100644
--- a/src/library/base/man/write.Rd
+++ b/src/library/base/man/write.Rd
@@ -1,5 +1,5 @@
 % File src/library/base/man/write.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2012 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/base/man/writeLines.Rd b/src/library/base/man/writeLines.Rd
index 5201cb8..8f87815 100644
--- a/src/library/base/man/writeLines.Rd
+++ b/src/library/base/man/writeLines.Rd
@@ -1,10 +1,8 @@
 % File src/library/base/man/writeLines.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2011 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2015 R Core Team
 % Distributed under GPL 2 or later
 
-\newcommand{\sspace}{\ifelse{latex}{\out{~}}{ }}
-
 \name{writeLines}
 \alias{writeLines}
 \title{Write Lines to a Connection}
@@ -17,8 +15,8 @@ writeLines(text, con = stdout(), sep = "\n", useBytes = FALSE)
 \arguments{
   \item{text}{A character vector}
   \item{con}{A \link{connection} object or a character string.}
-  \item{sep}{character.  A string to be written to the connection after
-    each line of text.}
+  \item{sep}{character string.  A string to be written to the connection
+    after each line of text.}
   \item{useBytes}{logical.  See \sQuote{Details}.}
 }
 \details{
diff --git a/src/library/base/man/xtfrm.Rd b/src/library/base/man/xtfrm.Rd
index ab6b321..fff8b08 100644
--- a/src/library/base/man/xtfrm.Rd
+++ b/src/library/base/man/xtfrm.Rd
@@ -1,6 +1,6 @@
 % File src/library/base/man/xtfrm.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 2008-10 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 2008-2015 R Core Team
 % Distributed under GPL 2 or later
 
 \name{xtfrm}
@@ -33,7 +33,9 @@ xtfrm(x)
 
   The \code{\link{factor}} method extracts the codes.  The
   \code{\link[survival]{Surv}} method sorts first on times and then on
-  status code(s).
+  status code(s), finally on \code{timme2} if present.  Note that with
+  the conventional status codes this sorts individuals still alive before
+  deaths.
 
   The default method will unclass the object if
   \code{\link{is.numeric}(x)} is true but otherwise make use of
diff --git a/src/library/base/man/zMachine.Rd b/src/library/base/man/zMachine.Rd
index c726b7f..b6b1481 100644
--- a/src/library/base/man/zMachine.Rd
+++ b/src/library/base/man/zMachine.Rd
@@ -1,10 +1,8 @@
 % File src/library/base/man/zMachine.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2012 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2014 R Core Team
 % Distributed under GPL 2 or later
 
-\newcommand{\sspace}{\ifelse{latex}{\out{~}}{ }}
-
 \name{.Machine}
 \alias{.Machine}
 \concept{long double}
diff --git a/src/library/base/man/zScript.Rd b/src/library/base/man/zScript.Rd
index 70d39ea..8a81e27 100644
--- a/src/library/base/man/zScript.Rd
+++ b/src/library/base/man/zScript.Rd
@@ -1,5 +1,5 @@
 % File src/library/base/man/zScript.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2009 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/base/man/zapsmall.Rd b/src/library/base/man/zapsmall.Rd
index 84d0171..7451c24 100644
--- a/src/library/base/man/zapsmall.Rd
+++ b/src/library/base/man/zapsmall.Rd
@@ -1,5 +1,5 @@
 % File src/library/base/man/zapsmall.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2009 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/base/man/zpackages.Rd b/src/library/base/man/zpackages.Rd
index b8dcdbc..1bd5532 100644
--- a/src/library/base/man/zpackages.Rd
+++ b/src/library/base/man/zpackages.Rd
@@ -1,5 +1,5 @@
 % File src/library/base/man/zpackages.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2012 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/base/man/zutils.Rd b/src/library/base/man/zutils.Rd
index e65c47d..a51ca3c 100644
--- a/src/library/base/man/zutils.Rd
+++ b/src/library/base/man/zutils.Rd
@@ -1,5 +1,5 @@
 % File src/library/base/man/zutils.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2007 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/base/po/R-base.pot b/src/library/base/po/R-base.pot
index e4e4aa6..06a5b65 100644
--- a/src/library/base/po/R-base.pot
+++ b/src/library/base/po/R-base.pot
@@ -1,8 +1,7 @@
 msgid ""
 msgstr ""
-"Project-Id-Version: R 3.1.0\n"
-"Report-Msgid-Bugs-To: bugs.r-project.org\n"
-"POT-Creation-Date: 2014-02-13 14:10\n"
+"Project-Id-Version: base 3.4.0\n"
+"POT-Creation-Date: 2016-04-01 09:50\n"
 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
 "Last-Translator: FULL NAME <EMAIL at ADDRESS>\n"
 "Language-Team: LANGUAGE <LL at li.org>\n"
@@ -41,6 +40,9 @@ msgstr ""
 msgid "a dimension is zero"
 msgstr ""
 
+msgid "\"hexNumeric\" and \"digits17\" are mutually exclusive"
+msgstr ""
+
 msgid "second argument must be a list"
 msgstr ""
 
@@ -206,6 +208,9 @@ msgstr ""
 msgid "cannot coerce class \"%s\" to a data.frame"
 msgstr ""
 
+msgid "'row.names' is not a character vector of length %d -- omitting it. Will be an error!"
+msgstr ""
+
 msgid "options(\"stringsAsFactors\") not set to TRUE or FALSE"
 msgstr ""
 
@@ -284,7 +289,7 @@ msgstr ""
 msgid "only a single element should be replaced"
 msgstr ""
 
-msgid "Name partially matched in data frame"
+msgid "Partial match of '%s' to '%s' in data frame"
 msgstr ""
 
 msgid "names do not match previous names"
@@ -296,16 +301,13 @@ msgstr ""
 msgid "invalid list argument: all variables should have the same length"
 msgstr ""
 
-msgid "data frame with 0 columns and %d rows"
-msgstr ""
-
 msgid "<0 rows> (or 0-length row.names)"
 msgstr ""
 
 msgid "non-numeric variable in data frame:"
 msgstr ""
 
-msgid "only defined for equally-sized data frames"
+msgid "%s only defined for equally-sized data frames"
 msgstr ""
 
 msgid "list of length %d not meaningful"
@@ -458,6 +460,15 @@ msgstr ""
 msgid "Invalid DCF format.\nContinuation lines must not start a record.\nOffending lines start with:\n%s"
 msgstr ""
 
+msgid "failed to load the methods package for debugging by signature"
+msgstr ""
+
+msgid "failed to load methods package for undebugging by signature"
+msgstr ""
+
+msgid "failed to load methods package for handling signature"
+msgstr ""
+
 msgid "'x' must be a square matrix"
 msgstr ""
 
@@ -512,7 +523,7 @@ msgstr ""
 msgid "number of levels differs"
 msgstr ""
 
-msgid "not meaningful for factors"
+msgid "%s not meaningful for factors"
 msgstr ""
 
 msgid "level sets of factors are different"
@@ -566,10 +577,10 @@ msgstr ""
 msgid "invalid 'time' argument"
 msgstr ""
 
-msgid "'vec' contains NAs"
+msgid "'vec' must be sorted non-decreasingly and not contain NAs"
 msgstr ""
 
-msgid "'vec' must be sorted non-decreasingly"
+msgid "'fun' is not a function"
 msgstr ""
 
 msgid "using the first element of 'value' of type \"expression\""
@@ -602,6 +613,12 @@ msgstr ""
 msgid "'zero.print' must be character, logical or NULL"
 msgstr ""
 
+msgid "'big.mark' and 'decimal.mark' are both '%s', which could be confusing"
+msgstr ""
+
+msgid "'input.d.mark' has no characters"
+msgstr ""
+
 msgid "'subset' must be logical"
 msgstr ""
 
@@ -680,7 +697,13 @@ msgstr ""
 msgid "package %s has a license that you need to accept after viewing"
 msgstr ""
 
-msgid "package %s has a license that you need to accept:\naccording to the DESCRIPTION file it is"
+msgid "package %s has a license that you need to accept:"
+msgstr ""
+
+msgid "according to the DESCRIPTION file it is"
+msgstr ""
+
+msgid "%s"
 msgstr ""
 
 msgid "license for package %s not accepted"
@@ -707,6 +730,9 @@ msgstr ""
 msgid "%s not found on search path, using pos = 2"
 msgstr ""
 
+msgid "Package %s version %s cannot be unloaded"
+msgstr ""
+
 msgid "package or namespace load failed for %s"
 msgstr ""
 
@@ -791,15 +817,12 @@ msgstr ""
 msgid "package %s required by %s could not be found"
 msgstr ""
 
-msgid "package %s %s was found, but %s %s is required by %s"
+msgid "version %s of %s masked by %s in %s"
 msgstr ""
 
 msgid "package %s could not be loaded"
 msgstr ""
 
-msgid "package %s %s is loaded, but %s %s is required by %s"
-msgstr ""
-
 msgid "empty (zero-byte) input file"
 msgstr ""
 
@@ -848,6 +871,15 @@ msgstr ""
 msgid "must specify names of formal arguments for 'vectorize'"
 msgstr ""
 
+msgid "FUN"
+msgstr ""
+
+msgid "may not have argument(s) named"
+msgstr ""
+
+msgid ","
+msgstr ""
+
 msgid "'arg' must be NULL or a character vector"
 msgstr ""
 
@@ -902,9 +934,15 @@ msgstr ""
 msgid "'by' must specify one or more columns as numbers, names or logical"
 msgstr ""
 
+msgid "long vectors are not supported"
+msgstr ""
+
 msgid "'by.x' and 'by.y' specify different numbers of columns"
 msgstr ""
 
+msgid "'incomparables' is supported only for merging on a single column"
+msgstr ""
+
 msgid "additional arguments ignored in message()"
 msgstr ""
 
@@ -1004,13 +1042,16 @@ msgstr ""
 msgid "found methods to import for function %s but not the generic itself"
 msgstr ""
 
+msgid "replacing previous import %s by %s when loading %s"
+msgstr ""
+
 msgid "No methods found in \"%s\" for requests: %s"
 msgstr ""
 
 msgid "requested methods not found in environment/package %s: %s"
 msgstr ""
 
-msgid "No generic function found corresponding to requested imported methods for \"%s\" from package \"%s\" (malformed exports?)"
+msgid "No generic function %s found corresponding to requested imported methods from package %s when loading %s (malformed exports?)"
 msgstr ""
 
 msgid "cannot add to exports of a sealed namespace"
@@ -1166,6 +1207,9 @@ msgstr ""
 msgid "too many arguments"
 msgstr ""
 
+msgid "invalid 'compress' argument:"
+msgstr ""
+
 msgid "'compress' is ignored unless 'file' is a file name"
 msgstr ""
 
@@ -1199,6 +1243,9 @@ msgstr ""
 msgid "'decreasing' must be a length-1 logical vector.\nDid you intend to set 'partial'?"
 msgstr ""
 
+msgid "'partial' sorting not supported by radix method"
+msgstr ""
+
 msgid "'index.return' only for non-factors"
 msgstr ""
 
@@ -1223,9 +1270,6 @@ msgstr ""
 msgid "method = \"quick\" is only for numeric 'x'"
 msgstr ""
 
-msgid "method = \"radix\" is only for integer 'x'"
-msgstr ""
-
 msgid "'local' must be TRUE, FALSE or an environment"
 msgstr ""
 
@@ -1256,6 +1300,9 @@ msgstr ""
 msgid "Timestamp of %s has changed"
 msgstr ""
 
+msgid "'x' and 'to' must refer to same file"
+msgstr ""
+
 msgid "additional arguments ignored in stop()"
 msgstr ""
 
@@ -1274,9 +1321,6 @@ msgstr ""
 msgid "probably wrong encoding in names(.) of column"
 msgstr ""
 
-msgid ","
-msgstr ""
-
 msgid "STATS is longer than the extent of 'dim(x)[MARGIN]'"
 msgstr ""
 
@@ -1319,6 +1363,9 @@ msgstr ""
 msgid "arguments must have same length"
 msgstr ""
 
+msgid "total number of levels >= 2^31"
+msgstr ""
+
 msgid "handler must be a function"
 msgstr ""
 
@@ -1349,9 +1396,6 @@ msgstr ""
 msgid "invalid version specification %s"
 msgstr ""
 
-msgid "wrong argument"
-msgstr ""
-
 msgid "invalid 'value'"
 msgstr ""
 
@@ -1447,8 +1491,13 @@ msgid_plural "deparse options %s are not recognized"
 msgstr[0]    ""
 msgstr[1]    ""
 
-msgid        "The following object is masked %s %s:\n\n%s\n"
-msgid_plural "The following objects are masked %s %s:\n\n%s\n"
+msgid        "The following object is masked _by_ %s:\n\n%s\n"
+msgid_plural "The following objects are masked _by_ %s:\n\n%s\n"
+msgstr[0]    ""
+msgstr[1]    ""
+
+msgid        "The following object is masked from %s:\n\n%s\n"
+msgid_plural "The following objects are masked from %s:\n\n%s\n"
 msgstr[0]    ""
 msgstr[1]    ""
 
@@ -1502,6 +1551,11 @@ msgid_plural "provided %d variables to replace %d variables"
 msgstr[0]    ""
 msgstr[1]    ""
 
+msgid        "data frame with 0 columns and %d row"
+msgid_plural "data frame with 0 columns and %d rows"
+msgstr[0]    ""
+msgstr[1]    ""
+
 msgid        "library %s contains no packages"
 msgid_plural "libraries %s contain no packages"
 msgstr[0]    ""
@@ -1552,11 +1606,6 @@ msgid_plural "S3 methods %s were declared in NAMESPACE but not found"
 msgstr[0]    ""
 msgstr[1]    ""
 
-msgid        "extra argument %s will be disregarded"
-msgid_plural "extra arguments %s will be disregarded"
-msgstr[0]    ""
-msgstr[1]    ""
-
 msgid        "%s is not TRUE"
 msgid_plural "%s are not all TRUE"
 msgstr[0]    ""
@@ -1566,3 +1615,8 @@ msgid        "Warning message:\n"
 msgid_plural "Warning messages:\n"
 msgstr[0]    ""
 msgstr[1]    ""
+
+msgid        "In %s :\n extra argument %s will be disregarded"
+msgid_plural "In %s :\n extra arguments %s will be disregarded"
+msgstr[0]    ""
+msgstr[1]    ""
diff --git a/src/library/base/po/R-da.po b/src/library/base/po/R-da.po
index 3f5e5cf..54bcf07 100644
--- a/src/library/base/po/R-da.po
+++ b/src/library/base/po/R-da.po
@@ -1,18 +1,21 @@
 # Danish translation R.
-# Copyright (c) 2014 R & nedenstående oversættere.
+# Copyright (c) 2015 R & nedenstående oversættere.
 # This file is distributed under the same license as the R package.
-# Joe Hansen <joedalton2 at yahoo.dk>, 2011, 2013, 2014.
+# Joe Hansen <joedalton2 at yahoo.dk>, 2011, 2013, 2014, 2015.
 #
+# '' -> ''
+# \" -> ""
 # coercing -> tvinger
+# sink -> datakanal
 # unary -> unær
 # strenge mellem '' og med store bogstaver er ikke oversat.
 #
 msgid ""
 msgstr ""
-"Project-Id-Version: R 3.1.0\n"
+"Project-Id-Version: R 3.2.0\n"
 "Report-Msgid-Bugs-To: bugs.r-project.org\n"
-"POT-Creation-Date: 2014-02-13 14:10\n"
-"PO-Revision-Date: 2014-03-17 14:20+0200\n"
+"POT-Creation-Date: 2016-04-01 09:50\n"
+"PO-Revision-Date: 2015-03-25 14:20+0200\n"
 "Last-Translator: Joe Hansen <joedalton2 at yahoo.dk>\n"
 "Language-Team: Danish <debian-l10n-danish at lists.debian.org>\n"
 "Language: da\n"
@@ -51,6 +54,10 @@ msgstr "uendelig eller manglende værdier i 'x'"
 msgid "a dimension is zero"
 msgstr "en dimension er nul"
 
+#, fuzzy
+msgid "\"hexNumeric\" and \"digits17\" are mutually exclusive"
+msgstr "\"hexNumeric\" og \"digits17\" udelukker hinanden"
+
 msgid "second argument must be a list"
 msgstr "andet argument skal være en liste"
 
@@ -222,6 +229,11 @@ msgstr "ugyldige 'dimnames' angivet for dataramme"
 msgid "cannot coerce class \"%s\" to a data.frame"
 msgstr "kan ikke tvinge klasse »%s« ind i en data.frame"
 
+msgid ""
+"'row.names' is not a character vector of length %d -- omitting it. Will be "
+"an error!"
+msgstr ""
+
 msgid "options(\"stringsAsFactors\") not set to TRUE or FALSE"
 msgstr "options(\"stringsAsFactors\") ikke angivet til TRUE eller FALSE"
 
@@ -302,8 +314,8 @@ msgstr "erstatter element i ikkeeksisterende kolonne: %s"
 msgid "only a single element should be replaced"
 msgstr "kun et enkelt element skal erstattes"
 
-msgid "Name partially matched in data frame"
-msgstr "Navn delvist matchet i dataramme"
+msgid "Partial match of '%s' to '%s' in data frame"
+msgstr "Delvis match for '%s' til '%s' i dataramme"
 
 msgid "names do not match previous names"
 msgstr "navne matcher ikke tidligere navne"
@@ -314,17 +326,14 @@ msgstr "antal argumentkolonner svarer ikke overens"
 msgid "invalid list argument: all variables should have the same length"
 msgstr "ugyldigt listeargument: alle variabler skal have den samme længde"
 
-msgid "data frame with 0 columns and %d rows"
-msgstr "dataramme med 0 kolonner og %d rækker"
-
 msgid "<0 rows> (or 0-length row.names)"
 msgstr "<0 rækker> (eller 0-længde row.names)"
 
 msgid "non-numeric variable in data frame:"
 msgstr "variabel der ikke er numerisk i dataramme:"
 
-msgid "only defined for equally-sized data frames"
-msgstr "kun defineret for lige store datarammer"
+msgid "%s only defined for equally-sized data frames"
+msgstr "%s kun defineret for lige store datarammer"
 
 msgid "list of length %d not meaningful"
 msgstr "liste på længde %d er ikke meningsfuld"
@@ -494,6 +503,15 @@ msgstr ""
 "Overtrædende linjer starter med:\n"
 "%s"
 
+msgid "failed to load the methods package for debugging by signature"
+msgstr ""
+
+msgid "failed to load methods package for undebugging by signature"
+msgstr ""
+
+msgid "failed to load methods package for handling signature"
+msgstr ""
+
 msgid "'x' must be a square matrix"
 msgstr "'x' skal være en kvadratisk matrix"
 
@@ -550,8 +568,8 @@ msgstr "ugyldige 'labels'; længde %d skal være 1 eller %d"
 msgid "number of levels differs"
 msgstr "niveauantal er forskelligt"
 
-msgid "not meaningful for factors"
-msgstr "ikke meningsfuldt for faktorer"
+msgid "%s not meaningful for factors"
+msgstr "%s er ikke meningsfuld for faktorer"
 
 msgid "level sets of factors are different"
 msgstr "niveausæt for faktorer er forskellige"
@@ -609,12 +627,14 @@ msgstr "ugyldigt 'path'-argument"
 msgid "invalid 'time' argument"
 msgstr "ugyldigt 'time'-argument"
 
-msgid "'vec' contains NAs"
-msgstr "'vec' indeholder NA'er"
-
-msgid "'vec' must be sorted non-decreasingly"
+#, fuzzy
+msgid "'vec' must be sorted non-decreasingly and not contain NAs"
 msgstr "'vec' skal sorteres ikkefaldende"
 
+#, fuzzy
+msgid "'fun' is not a function"
+msgstr "håndtag skal være en funktion"
+
 msgid "using the first element of 'value' of type \"expression\""
 msgstr "bruger det første element for 'value' for type »expression«"
 
@@ -647,6 +667,14 @@ msgstr "'zero.print' har længde > 1"
 msgid "'zero.print' must be character, logical or NULL"
 msgstr "'zero.print' skal være tegn, logisk eller NULL"
 
+msgid "'big.mark' and 'decimal.mark' are both '%s', which could be confusing"
+msgstr ""
+"'big.mark' og 'decimal.mark' er begge '%s', hvilket kan være forvirrende"
+
+#, fuzzy
+msgid "'input.d.mark' has no characters"
+msgstr "'input' og 'target' skal være tegnvektorer"
+
 msgid "'subset' must be logical"
 msgstr "'subset' skal være logisk"
 
@@ -726,13 +754,19 @@ msgstr "pakke %s har en licens, som du skal acceptere i en alternativ session"
 msgid "package %s has a license that you need to accept after viewing"
 msgstr "pakke %s har en licens, som du skal acceptere efter visning"
 
-msgid ""
-"package %s has a license that you need to accept:\n"
-"according to the DESCRIPTION file it is"
+#, fuzzy
+msgid "package %s has a license that you need to accept:"
+msgstr "pakke %s har en licens, som du skal acceptere efter visning"
+
+#, fuzzy
+msgid "according to the DESCRIPTION file it is"
 msgstr ""
 "pakke %s har en licens, som du skal acceptere:\n"
 "ifølge DESCRIPTION-filen er det"
 
+msgid "%s"
+msgstr ""
+
 msgid "license for package %s not accepted"
 msgstr "licens for pakke %s er ikke accepteret"
 
@@ -757,6 +791,9 @@ msgstr "%s er ikke en gyldig installeret pakke"
 msgid "%s not found on search path, using pos = 2"
 msgstr "%s ikke fundet på søgesti, bruger pos = 2"
 
+msgid "Package %s version %s cannot be unloaded"
+msgstr "Pakke %s version %s er ikke læst ud"
+
 msgid "package or namespace load failed for %s"
 msgstr "indlæsning af pakke eller navnerum fejlede for %s"
 
@@ -847,15 +884,12 @@ msgstr "Dokumentation for pakke %s"
 msgid "package %s required by %s could not be found"
 msgstr "pakke %s krævet af %s kunne ikke findes"
 
-msgid "package %s %s was found, but %s %s is required by %s"
-msgstr "pakke %s %s blev fundet, men %s %s er krævet af %s"
+msgid "version %s of %s masked by %s in %s"
+msgstr "version %s for %s maskeret af %s i %s"
 
 msgid "package %s could not be loaded"
 msgstr "pakke %s kunne ikke indlæses"
 
-msgid "package %s %s is loaded, but %s %s is required by %s"
-msgstr "pakke %s %s er indlæst, men %s %s er krævet af %s"
-
 msgid "empty (zero-byte) input file"
 msgstr "tom (zerobyte) inddatafil"
 
@@ -904,6 +938,15 @@ msgstr "ugyldigt 'category'-argument"
 msgid "must specify names of formal arguments for 'vectorize'"
 msgstr "skal angive navne på formelle argumenter for 'vectorize'"
 
+msgid "FUN"
+msgstr ""
+
+msgid "may not have argument(s) named"
+msgstr ""
+
+msgid ","
+msgstr ","
+
 msgid "'arg' must be NULL or a character vector"
 msgstr "'arg' skal være NULL eller en tegnvektor"
 
@@ -959,9 +1002,16 @@ msgstr "'by' skal matche antal af kolonner"
 msgid "'by' must specify one or more columns as numbers, names or logical"
 msgstr "'by' skal angive en eller flere kolonner som tal, navne eller logiske"
 
+msgid "long vectors are not supported"
+msgstr "lange vektorer er ikke understøttet"
+
 msgid "'by.x' and 'by.y' specify different numbers of columns"
 msgstr "'by.x' og 'by.y' angiver forskellige antal kolonner"
 
+msgid "'incomparables' is supported only for merging on a single column"
+msgstr ""
+"'incomparables' er kun understøttet for sammenføjning af en enkel kolonne"
+
 msgid "additional arguments ignored in message()"
 msgstr "yderligere argumenter ignoreres i message()"
 
@@ -1086,15 +1136,20 @@ msgid "found methods to import for function %s but not the generic itself"
 msgstr ""
 "fandt metoder at importere for funktion %s men ikke selve den generiske"
 
+#, fuzzy
+msgid "replacing previous import %s by %s when loading %s"
+msgstr "erstatter tidligere import af %s når %s indlæses"
+
 msgid "No methods found in \"%s\" for requests: %s"
 msgstr "Ingen metoder fundet i »%s« for forespørgsler: %s"
 
 msgid "requested methods not found in environment/package %s: %s"
 msgstr "forespurgte metoder blev ikke fundet i miljø/pakke %s: %s"
 
+#, fuzzy
 msgid ""
-"No generic function found corresponding to requested imported methods for "
-"\"%s\" from package \"%s\" (malformed exports?)"
+"No generic function %s found corresponding to requested imported methods "
+"from package %s when loading %s (malformed exports?)"
 msgstr ""
 "Ingen generisk funktion fundet, der svarer til forespurgte importerede "
 "metoder for »%s« fra pakke »%s« (forkert udformet eksport?)"
@@ -1252,6 +1307,10 @@ msgstr "længde skal være et ikkenegativt tal"
 msgid "too many arguments"
 msgstr "for mange argumenter"
 
+#, fuzzy
+msgid "invalid 'compress' argument:"
+msgstr "ugyldigt 'name'-argument"
+
 msgid "'compress' is ignored unless 'file' is a file name"
 msgstr "'compress' ignoreres med mindre at 'file' er et filnavn"
 
@@ -1289,6 +1348,9 @@ msgstr ""
 "'decreasing' skal være en længde-1 logisk vektor.\n"
 "Ønskede du at angive den 'partial'?"
 
+msgid "'partial' sorting not supported by radix method"
+msgstr ""
+
 msgid "'index.return' only for non-factors"
 msgstr "'index.return' kun for ikke-faktorer"
 
@@ -1317,9 +1379,6 @@ msgstr ""
 msgid "method = \"quick\" is only for numeric 'x'"
 msgstr "metode = »quick« er kun for numerisk 'x'"
 
-msgid "method = \"radix\" is only for integer 'x'"
-msgstr "metode = »radix« er kun for heltal 'x'"
-
 msgid "'local' must be TRUE, FALSE or an environment"
 msgstr "'local' skal være TRUE, FALSE eller et miljø"
 
@@ -1350,6 +1409,10 @@ msgstr "'%s' er ikke en eksisterende fil"
 msgid "Timestamp of %s has changed"
 msgstr "Tidsstempel for %s har ændret sig"
 
+#, fuzzy
+msgid "'x' and 'to' must refer to same file"
+msgstr "'x' og 'y' skal have samme længde"
+
 msgid "additional arguments ignored in stop()"
 msgstr "yderligere argumenter ignoreret i stop()"
 
@@ -1368,9 +1431,6 @@ msgstr "ej korrekte værdier for 'indent' og 'width'"
 msgid "probably wrong encoding in names(.) of column"
 msgstr "sandsynligvis forkert kodning i names(.) for kolonne"
 
-msgid ","
-msgstr ","
-
 msgid "STATS is longer than the extent of 'dim(x)[MARGIN]'"
 msgstr "STATS er længere end omfanget af 'dim(x)[MARGIN]'"
 
@@ -1413,6 +1473,10 @@ msgstr "'INDEX' har længden nul"
 msgid "arguments must have same length"
 msgstr "argumenter skal have samme længde"
 
+#, fuzzy
+msgid "total number of levels >= 2^31"
+msgstr "niveauantal er forskelligt"
+
 msgid "handler must be a function"
 msgstr "håndtag skal være en funktion"
 
@@ -1443,9 +1507,6 @@ msgstr "Ingen tilbagesporing tilgængelig"
 msgid "invalid version specification %s"
 msgstr "ugyldig versionspecifikation %s"
 
-msgid "wrong argument"
-msgstr "forkert argument"
-
 msgid "invalid 'value'"
 msgstr "ugyldig 'value'"
 
@@ -1546,19 +1607,36 @@ msgstr[0] "deparse-tilvalg %s genkendes ikke"
 msgstr[1] "deparse-tilvalg %s genkendes ikke"
 
 msgid ""
-"The following object is masked %s %s:\n"
+"The following object is masked _by_ %s:\n"
 "\n"
 "%s\n"
 msgid_plural ""
-"The following objects are masked %s %s:\n"
+"The following objects are masked _by_ %s:\n"
 "\n"
 "%s\n"
 msgstr[0] ""
-"Det følgende objekt er maskeret %s %s:\n"
+"Det følgende objekt er maskeret _af_ %s:\n"
 "\n"
 "%s\n"
 msgstr[1] ""
-"De følgende objekter er maskerede %s %s:\n"
+"De følgende objekter er maskerede _af_ %s:\n"
+"\n"
+"%s\n"
+
+msgid ""
+"The following object is masked from %s:\n"
+"\n"
+"%s\n"
+msgid_plural ""
+"The following objects are masked from %s:\n"
+"\n"
+"%s\n"
+msgstr[0] ""
+"Det følgende objekt er maskeret fra %s:\n"
+"\n"
+"%s\n"
+msgstr[1] ""
+"De følgende objekter er maskerede fra %s:\n"
 "\n"
 "%s\n"
 
@@ -1615,6 +1693,11 @@ msgid_plural "provided %d variables to replace %d variables"
 msgstr[0] "leverede %d variabel til at erstatte %d variabler"
 msgstr[1] "leverede %d variabler til at erstatte %d variabler"
 
+msgid "data frame with 0 columns and %d row"
+msgid_plural "data frame with 0 columns and %d rows"
+msgstr[0] "dataramme med 0 kolonner og %d række"
+msgstr[1] "dataramme med 0 kolonner og %d rækker"
+
 msgid "library %s contains no packages"
 msgid_plural "libraries %s contain no packages"
 msgstr[0] "bibliotek %s indeholder ingen pakker"
@@ -1673,11 +1756,6 @@ msgid_plural "S3 methods %s were declared in NAMESPACE but not found"
 msgstr[0] "S3-metode %s blev deklareret i NAMESPACE men ikke fundet"
 msgstr[1] "S3-metoder %s blev deklareret i NAMESPACE men ikke fundet"
 
-msgid "extra argument %s will be disregarded"
-msgid_plural "extra arguments %s will be disregarded"
-msgstr[0] "ekstra argument %s vil blive ignoreret"
-msgstr[1] "ekstra argumentet %s vil blive ignoreret"
-
 msgid "%s is not TRUE"
 msgid_plural "%s are not all TRUE"
 msgstr[0] "%s er ikke TRUE"
@@ -1688,5 +1766,18 @@ msgid_plural "Warning messages:\n"
 msgstr[0] "Advarselsbesked:\n"
 msgstr[1] "Advarselsbeskeder:\n"
 
+#, fuzzy
+msgid ""
+"In %s :\n"
+" extra argument %s will be disregarded"
+msgid_plural ""
+"In %s :\n"
+" extra arguments %s will be disregarded"
+msgstr[0] "ekstra argument %s vil blive ignoreret"
+msgstr[1] "ekstra argumentet %s vil blive ignoreret"
 
+#~ msgid "'vec' contains NAs"
+#~ msgstr "'vec' indeholder NA'er"
 
+#~ msgid "method = \"radix\" is only for integer 'x'"
+#~ msgstr "metode = »radix« er kun for heltal 'x'"
diff --git a/src/library/base/po/R-de.po b/src/library/base/po/R-de.po
index 5ec5078..d80170b 100644
--- a/src/library/base/po/R-de.po
+++ b/src/library/base/po/R-de.po
@@ -5,13 +5,13 @@
 #
 msgid ""
 msgstr ""
-"Project-Id-Version: R 3.1.0\n"
+"Project-Id-Version: R 3.3.0\n"
 "Report-Msgid-Bugs-To: bugs.r-project.org\n"
-"POT-Creation-Date: 2014-02-13 14:10\n"
-"PO-Revision-Date: 2013-03-13 12:45+0100\n"
+"POT-Creation-Date: 2015-03-24 11:51\n"
+"PO-Revision-Date: 2016-04-07 11:21+0200\n"
 "Last-Translator: Detlef Steuer <steuer at hsu-hh.de>\n"
 "Language-Team: R-core <r-core at r-project.org>\n"
-"Language: \n"
+"Language: de\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
@@ -47,6 +47,9 @@ msgstr "unendliche oder fehlende Werte in 'x'"
 msgid "a dimension is zero"
 msgstr "eine Dimension ist 0"
 
+msgid "\"hexNumeric\"and \"digits17\" are mutually exclusive"
+msgstr "\"hexNumeric\" und \"digits15\" schliessen sich gegenseitig aus"
+
 msgid "second argument must be a list"
 msgstr "das zweite Argument muss eine Liste sein"
 
@@ -72,7 +75,7 @@ msgid "target is %s, current is %s"
 msgstr "Ziel ist %s, aktuell ist %s"
 
 msgid "'tolerance' should be numeric"
-msgstr "'tolernce' sollte  numerisch sein"
+msgstr "'tolerance' sollte  numerisch sein"
 
 msgid "'scale' should be numeric or NULL"
 msgstr "'scale' sollte numerisch oder NULL sein"
@@ -108,11 +111,11 @@ msgid "file '%s' not found"
 msgstr "Datei '%s' nicht gefunden"
 
 msgid "invalid 'name' argument"
-msgstr "ungültiges 'name'Argument"
+msgstr "ungültiges 'name' Argument"
 
 msgid "package %s is required by %s, which may no longer work correctly"
 msgstr ""
-"Paket '%s' wird von %s benötigt, welches evtl nicht mehr korrekt arbeitet"
+"Paket '%s' wird von %s benötigt, welches evtl. nicht mehr korrekt arbeitet"
 
 msgid "package %s is required by %s so will not be detached"
 msgstr "Paket %s wird von %s benötigt, wird deshalb nicht detached"
@@ -181,10 +184,10 @@ msgid "can only truncate an open connection"
 msgstr "kann nur eine geöffnete Verbindung abschneiden"
 
 msgid "can only write vector objects"
-msgstr "kann nur Vektorobjekte schreiben"
+msgstr "kann nur Vektor-Objekte schreiben"
 
 msgid "can only write character objects"
-msgstr "kann nur Zeichenobjekte schreiben"
+msgstr "kann nur Zeichenketten-Objekte schreiben"
 
 msgid "'timeout' must be NULL or a non-negative number"
 msgstr "'timeout' muss NULL oder eine nicht-negative Zahl sein"
@@ -271,14 +274,14 @@ msgid "'value' is the wrong length"
 msgstr "'value' hat falsche Länge"
 
 msgid "unsupported matrix index in replacement"
-msgstr "nicht unterstützter Matrixindes in der Ersetzung"
+msgstr "nicht unterstützter Matrix-Index in der Ersetzung"
 
 msgid "need 0, 1, or 2 subscripts"
 msgstr "brauche 0, 1, oder 2 Indizes"
 
 msgid ""
 "missing values are not allowed in subscripted assignments of data frames"
-msgstr "Fehlende Werte sind in Teilzuweisungen von data frames nicht erlaubt"
+msgstr "fehlende Werte sind in Teilzuweisungen von Dataframes nicht erlaubt"
 
 msgid "non-existent rows not allowed"
 msgstr "nicht existierende Zeilen sind nicht erlaubt"
@@ -302,8 +305,8 @@ msgstr "ersetze Element in nicht existierender Spalte: %s"
 msgid "only a single element should be replaced"
 msgstr "nur ein einzelnes Element sollte ersetzt werden"
 
-msgid "Name partially matched in data frame"
-msgstr "Name mit partieller Übereinstimmung in data frame:"
+msgid "Partial match of '%s' to '%s' in data frame"
+msgstr "Partielle Übereinstimmung von '%s' mit '%s' in Dataframe"
 
 msgid "names do not match previous names"
 msgstr "Namen passen nicht zu den vorhergehenden Namen"
@@ -314,23 +317,20 @@ msgstr "Anzahl der Spalten der Argumente unterschiedlich"
 msgid "invalid list argument: all variables should have the same length"
 msgstr "ungültiges list Argument: alle Variablen sollten dieselbe Länge haben"
 
-msgid "data frame with 0 columns and %d rows"
-msgstr "Dataframe mit 0 Spalten und %d Zeilen"
-
 msgid "<0 rows> (or 0-length row.names)"
 msgstr "<0 Zeilen> (oder row.names mit Länge 0)"
 
 msgid "non-numeric variable in data frame:"
-msgstr "nicht numerische Variable in data frame:"
+msgstr "nicht numerische Variable in Dataframe:"
 
-msgid "only defined for equally-sized data frames"
-msgstr "nur definiert für gleich große data frames"
+msgid "%s only defined for equally-sized data frames"
+msgstr "%s ist nur für Dataframes gleicher Größe definiert"
 
 msgid "list of length %d not meaningful"
 msgstr "Liste der Länge %d nicht sinnvoll"
 
 msgid "only defined on a data frame with all numeric variables"
-msgstr "nur für einen data frame definiert, mit nur nummerischen Variablen"
+msgstr "nur für einen Dataframe mit nur numerischen Variablen definiert"
 
 msgid "character string is not in a standard unambiguous format"
 msgstr "Zeichenkette ist nicht in einem eindeutigen Standardformat"
@@ -441,10 +441,10 @@ msgid "'tzone' attributes are inconsistent"
 msgstr "'tzone' Attribute sind inkonsistent"
 
 msgid "'tim' is not character or numeric"
-msgstr "'tim' ist nicht Character oder nummerisch"
+msgstr "'tim' ist weder Zeichenkette noch numerisch"
 
 msgid "need explicit units for numeric conversion"
-msgstr "benötige explizite Einheiten für nummerische Konversion"
+msgstr "benötige explizite Einheiten für numerische Konversion"
 
 msgid "invalid units specified"
 msgstr "ungültige Einheiten spezifiziert"
@@ -554,8 +554,8 @@ msgstr "ungültige 'labels'; Länge %d sollte 1 oder %d sein"
 msgid "number of levels differs"
 msgstr "Anzahl von Leveln unterschiedlich"
 
-msgid "not meaningful for factors"
-msgstr "nicht sinnvoll für Faktoren"
+msgid "%s not meaningful for factors"
+msgstr "%s ist nicht sinnvoll für Faktoren"
 
 msgid "level sets of factors are different"
 msgstr "Levelmengen für Faktoren unterscheiden sich"
@@ -580,14 +580,14 @@ msgid "no files to copy to"
 msgstr "keine Dateien, um dorthin zu kopieren"
 
 msgid "attempt to copy a directory to itself"
-msgstr "Versuch ein Verzeichnis rekrusiv in sich selbst zu kopieren"
+msgstr "Versuch ein Verzeichnis rekursiv in sich selbst zu kopieren"
 
 msgid "more 'from' files than 'to' files"
 msgstr "mehr 'from' Dateien als 'to' Dateien"
 
 msgid "'recursive' will be ignored as 'to' is not a single existing directory"
 msgstr ""
-"'recursive' wird ignoriert, da 'to' keine einzelnes, existierendes\n"
+"'recursive' wird ignoriert, da 'to' kein einzelnes, existierendes\n"
 "Verzeichnis ist"
 
 msgid "file can not be copied both 'from' and 'to'"
@@ -609,7 +609,7 @@ msgid "no file found"
 msgstr "keine Datei gefunden"
 
 msgid "invalid 'path' argument"
-msgstr "ungültiges 'path'Argument"
+msgstr "ungültiges 'path' Argument"
 
 msgid "invalid 'time' argument"
 msgstr "ungültiges 'time' Argument"
@@ -630,7 +630,7 @@ msgid "'mode' must be \"double\" (\"real\"), \"integer\" or \"character\""
 msgstr "'mode' muss \"double\" (\"real\"), \"integer\" oder \"character\" sein"
 
 msgid "coercing argument to \"character\" for format=\"s\""
-msgstr "wandle Argument in \"character\" für das Format=\"s\""
+msgstr "wandle Argument um in \"character\" für das Format=\"s\""
 
 msgid "'format' must be one of {\"f\",\"e\",\"E\",\"g\",\"G\", \"fg\", \"s\"}"
 msgstr ""
@@ -644,13 +644,17 @@ msgstr "'flag' kann nur '0+- #' enthalten"
 
 msgid "corrupt data frame: columns will be truncated or padded with NAs"
 msgstr ""
-"Korrupter Data Frame: Spalten werden abgeschnitten oder mit NAs aufgefüllt"
+"Beschädigter Dataframe: Spalten werden abgeschnitten oder mit NAs aufgefüllt"
+
+msgid "'big.mark' and 'decimal.mark' are both '%s', which could be confusing"
+msgstr ""
+"'big.mark' und 'decimal.mark' sind beide '%s', was verwirrend sein könnte"
 
 msgid "'zero.print' has length > 1"
 msgstr "'zero.print' muss Länge > 1 haben"
 
 msgid "'zero.print' must be character, logical or NULL"
-msgstr "'zero.print' muss Charakter, logisch oder NULL sein"
+msgstr "'zero.print' muss Zeichenkette, boolesch oder NULL sein"
 
 msgid "'subset' must be logical"
 msgstr "'subset' muss boolesch sein"
@@ -762,11 +766,14 @@ msgid "no library trees found in 'lib.loc'"
 msgstr "keine Bibliotheken in 'lib.loc' gefunden"
 
 msgid "%s is not a valid installed package"
-msgstr "%s ist keine gültiges installiertes Paket"
+msgstr "%s ist kein gültiges, installiertes Paket"
 
 msgid "%s not found on search path, using pos = 2"
 msgstr "%s nicht im Suchpfad gefunden, nutze pos = 2"
 
+msgid "Package %s version %s cannot be unloaded"
+msgstr "Paket %s Version %s kann nicht entladen"
+
 msgid "package or namespace load failed for %s"
 msgstr "Laden von Paket oder Namensraum für %s fehlgeschlagen"
 
@@ -859,20 +866,17 @@ msgstr "Dokumentation für Paket %s"
 msgid "package %s required by %s could not be found"
 msgstr "Paket %s benötigt von %s nicht gefunden"
 
-msgid "package %s %s was found, but %s %s is required by %s"
-msgstr "Paket %s %s gefunden, aber %s %s wird von %s benötigt"
+msgid "version %s of %s masked by %s in %s"
+msgstr "Version %s von %s sind maskiert von %s in %s"
 
 msgid "package %s could not be loaded"
 msgstr "Paket %s konnte nicht geladen werden"
 
-msgid "package %s %s is loaded, but %s %s is required by %s"
-msgstr "Paket %s %s ist geladen, aber %s %s wird von %s benötigt"
-
 msgid "empty (zero-byte) input file"
 msgstr "leere (Null Bytes) Eingabedatei"
 
 msgid "input has been corrupted, with LF replaced by CR"
-msgstr "Eingabe wurde korrumpiert, LF wurde ersetzt durch CR"
+msgstr "Eingabe wurde beschädigt, LF wurde ersetzt durch CR"
 
 msgid "bad 'file' argument"
 msgstr "unbrauchbares 'file' Argument"
@@ -909,7 +913,7 @@ msgstr "Versuch die Umgebung %s zu laden"
 
 msgid "Specified environment not found: using '.GlobalEnv' instead"
 msgstr ""
-"spezifizierte Umgebung nicht gefunden: benutze '.globalEnv' statt dessen"
+"spezifizierte Umgebung nicht gefunden: benutze stattdessen '.globalEnv'"
 
 msgid "invalid 'category' argument"
 msgstr "ungültiges Argument für 'category'"
@@ -918,7 +922,7 @@ msgid "must specify names of formal arguments for 'vectorize'"
 msgstr "für 'vectorize' müssen Namen für formale Argumente angegeben werden"
 
 msgid "'arg' must be NULL or a character vector"
-msgstr "'arg' muss NULL sein oder ein Charakter-Vektor."
+msgstr "'arg' muss NULL oder ein Zeichenkettenvektor sein"
 
 msgid "'arg' must be of length 1"
 msgstr "'arg' muss Länge 1 haben"
@@ -927,7 +931,7 @@ msgid "'arg' must be of length >= 1"
 msgstr "'arg' muss Länge >=1 haben"
 
 msgid "'arg' should be one of %s"
-msgstr "'arg' sollte eines  von '%s' sein"
+msgstr "'arg' sollte eines von '%s' sein"
 
 msgid "there is more than one match in 'match.arg'"
 msgstr "mehr als ein Treffer in 'match.arg'"
@@ -959,7 +963,7 @@ msgid "argument is not numeric or logical: returning NA"
 msgstr "Argument ist weder numerisch noch boolesch: gebe NA zurück"
 
 msgid "'trim' must be numeric of length one"
-msgstr "'trim' muss nummerisch sein und Länge 1 haben"
+msgstr "'trim' muss numerisch sein und Länge 1 haben"
 
 msgid "trimmed means are not defined for complex data"
 msgstr "getrimmte Mittelwerte sind für komplexe Daten nicht definiert"
@@ -975,9 +979,15 @@ msgstr ""
 "'by' muss eine oder mehrere Spalten als Zahlen, Namen oder logische Werte "
 "spezifizieren"
 
+msgid "long vectors are not supported"
+msgstr "lange Vektoren sind nicht unterstützt"
+
 msgid "'by.x' and 'by.y' specify different numbers of columns"
 msgstr "'by.x' und 'by.y' geben unterschiedliche Zahlen von Spalten an"
 
+msgid "'incomparables' is supported only for merging on a single column"
+msgstr "'incomparables' ist nur für eine einzelne Spalte unterstützt"
+
 msgid "additional arguments ignored in message()"
 msgstr "zusätzliche Argumente ignoriert in message()"
 
@@ -994,8 +1004,9 @@ msgstr "unzulässig den Speichermodus eines Faktors zu ändern"
 msgid ""
 "namespace %s is not available and has been replaced\n"
 "by .GlobalEnv when processing object %s"
-msgstr "Namensraum %s ist nicht verfügar und ist durch"
-".GlobalEnv ersetzt worden während Objekt %s verarbeitet wurde"
+msgstr ""
+"Namensraum %s ist nicht verfügar und ist durch.GlobalEnv ersetzt worden "
+"während Objekt %s verarbeitet wurde"
 
 msgid "'%s' is not an exported object from 'namespace:%s'"
 msgstr "'%s' ist kein von 'namespace:%s' exportiertes Objekt"
@@ -1016,22 +1027,20 @@ msgid ""
 "failed to assign RegisteredNativeSymbol for %s to %s since %s is already "
 "defined in the %s namespace"
 msgstr ""
-"Zuweisung von RegisteredNativeSymbol gescheitert für %s zu %s\n"
+"Zuweisung von RegisteredNativeSymbol für %s zu %s\n"
 "fehlgeschlagen, da %s bereits im %s Namensraum definiert"
 
 msgid ""
 "failed to assign NativeSymbolInfo for %s to %s since %s is already defined "
 "in the %s namespace"
 msgstr ""
-"konnte kein NativeSymbolInfo für %s zu %s hinzufügen, da %s bereits im\n"
+"konnte kein NativeSymbolInfo für %s zu %s hinzufügen, da %s bereits im "
 "%s Namensraum definiert"
 
 msgid ""
 "failed to assign NativeSymbolInfo for %s since %s is already defined in the "
 "%s namespace"
-msgstr ""
-"\"konnte kein NativeSymbolInfo für %s hinzufügen, da %s bereits im\\n\"\n"
-"\"%s Namensraum definiert\""
+msgstr "konnte kein NativeSymbolInfo für %s hinzufügen, da %s bereits im %s Namensraum definiert"
 
 msgid "package %s does not have a namespace"
 msgstr "Paket %s hat keinen Namensraum"
@@ -1130,7 +1139,7 @@ msgid "package %s has no 'NAMESPACE' file"
 msgstr "Paket %s hat keine 'NAMESPACE' Datei"
 
 msgid "empty name in directive '%s' in 'NAMESPACE' file"
-msgstr "leerer Name in der Direktive  '%s' in der 'NAMESPACE' Datei"
+msgstr "leerer Name in der Direktive '%s' in der 'NAMESPACE' Datei"
 
 msgid "duplicate symbol names %s in useDynLib(\"%s\")"
 msgstr "doppelte Symbolnamen %s in useDynLib(\"%s\")"
@@ -1235,7 +1244,7 @@ msgid "missing values for 'group'"
 msgstr "fehlende Werte für 'group'"
 
 msgid "not a data frame"
-msgstr "kein Data Frame"
+msgstr "kein Dataframe"
 
 msgid "length of 'center' must equal the number of columns of 'x'"
 msgstr "Länge von 'center' muss mit der Spaltenanzahl von 'x' übereinstimmen"
@@ -1399,13 +1408,13 @@ msgid "STATS does not recycle exactly across MARGIN"
 msgstr "STATS recycelt nicht exakt über MARGIN"
 
 msgid "length(STATS) or dim(STATS) do not match dim(x)[MARGIN]"
-msgstr "length(STATS) oder dim(STATS) passen nciiht zu dim(x)[MARGIN]"
+msgstr "length(STATS) oder dim(STATS) passen nicht zu dim(x)[MARGIN]"
 
 msgid "nothing to tabulate"
 msgstr "nichts zu tabellarisieren"
 
 msgid "all arguments must have the same length"
-msgstr "alle Argumente müssen die selbe Länge haben"
+msgstr "alle Argumente müssen dieselbe Länge haben"
 
 msgid "attempt to make a table with >= 2^31 elements"
 msgstr "Versuch eine Tabelle mit mehr als 2^31 Elementen zu erstellen"
@@ -1429,7 +1438,7 @@ msgid "invalid value of 'nbins'"
 msgstr "ungültiger Wert für 'nbins'"
 
 msgid "'INDEX' is of length zero"
-msgstr "'INDEX' hat  Länge 0"
+msgstr "'INDEX' hat Länge 0"
 
 msgid "arguments must have same length"
 msgstr "Argumente müssen die selbe Länge haben"
@@ -1464,9 +1473,6 @@ msgstr "Kein traceback vefügbar"
 msgid "invalid version specification %s"
 msgstr "ungültige Versionsspezifikation %s"
 
-msgid "wrong argument"
-msgstr "falsches Argument"
-
 msgid "invalid 'value'"
 msgstr "ungültiger 'value'"
 
@@ -1526,7 +1532,7 @@ msgid "fewer 'from' files than 'to' files"
 msgstr "weniger 'from' Dateien als 'to' Dateien"
 
 msgid "link '%s' already exists"
-msgstr "link '%s' exisitiert bereits"
+msgstr "link '%s' existiert bereits"
 
 msgid "failed to create directory for link '%s"
 msgstr "konnte Verzeichnis für link %s nicht anlegen"
@@ -1567,26 +1573,43 @@ msgstr[0] "Deparseoption %s nicht erkannt"
 msgstr[1] "Deparseoptionen %s nicht erkannt"
 
 msgid ""
-"The following object is masked %s %s:\n"
+"The following object is masked _by_ %s:\n"
 "\n"
 "%s\n"
 msgid_plural ""
-"The following objects are masked %s %s:\n"
+"The following objects are masked _by_ %s:\n"
 "\n"
 "%s\n"
 msgstr[0] ""
-"Das folgende Objekt ist maskiert %s %s:\n"
+"Das folgende Objekt ist maskiert durch %s:\n"
 "\n"
 "%s\n"
 msgstr[1] ""
-"Die folgenden Objekte sind maskiert %s %s:\n"
+"Die folgenden Objekte sind maskiert durch %s:\n"
+"\n"
+"%s\n"
+
+msgid ""
+"The following object is masked from %s:\n"
+"\n"
+"%s\n"
+msgid_plural ""
+"The following objects are masked from %s:\n"
+"\n"
+"%s\n"
+msgstr[0] ""
+"Das folgende Objekt ist maskiert %s:\n"
+"\n"
+"%s\n"
+msgstr[1] ""
+"Die folgenden Objekte sind maskiert von %s:\n"
 "\n"
 "%s\n"
 
 msgid "invalid 'row.names', length %d for a data frame with %d row"
 msgid_plural "invalid 'row.names', length %d for a data frame with %d rows"
-msgstr[0] "ungültige 'row.names', Länge %d für data frame mit %d Zeile"
-msgstr[1] "ungültige 'row.names', Länge %d für data frame mit %d Zeilen"
+msgstr[0] "ungültige 'row.names', Länge %d für Dataframe mit %d Zeile"
+msgstr[1] "ungültige 'row.names', Länge %d für Dataframe mit %d Zeilen"
 
 msgid "supplied %d row name for %d rows"
 msgid_plural "supplied %d row names for %d rows"
@@ -1606,12 +1629,8 @@ msgstr[1] "Ersetzung hat %d Elemente, benötige %d"
 msgid "replacement element %d is a matrix/data frame of %d row, need %d"
 msgid_plural ""
 "replacement element %d is a matrix/data frame of %d rows, need %d"
-msgstr[0] ""
-"Ersetzungselement %d ist eine Matrix/data frame mit %d Zeile, benötigt "
-"werden %d"
-msgstr[1] ""
-"Ersetzungselement %d ist eine Matrix/data frame mit %d Zeilen, benötigt "
-"werden %d"
+msgstr[0] "Ersetzungselement %d ist Matrix/Dataframe mit %d Zeile, benötigt werden %d"
+msgstr[1] "Ersetzungselement %d ist Matrix/Dataframe mit %d Zeilen, benötigt werden %d"
 
 msgid "replacement element %d has %d row, need %d"
 msgid_plural "replacement element %d has %d rows, need %d"
@@ -1638,6 +1657,11 @@ msgid_plural "provided %d variables to replace %d variables"
 msgstr[0] "%d Variable angegeben, um %d Variablen zu ersetzen"
 msgstr[1] "%d Variablen angegeben, um %d Variablen zu ersetzen"
 
+msgid "data frame with 0 columns and %d row"
+msgid_plural "data frame with 0 columns and %d rows"
+msgstr[0] "Dataframe mit 0 Spalten und %d Zeile"
+msgstr[1] "Dataframe mit 0 Spalten und %d Zeilen"
+
 msgid "library %s contains no packages"
 msgid_plural "libraries %s contain no packages"
 msgstr[0] "Library %s enthält keine Pakete"
@@ -1713,6 +1737,38 @@ msgid_plural "Warning messages:\n"
 msgstr[0] "Warnmeldung:\n"
 msgstr[1] "Warnmeldungen:\n"
 
+#~ msgid "cannot be unloaded."
+#~ msgstr "kann nicht entladen werden."
+
+#~ msgid "re-exports %s not exported by %s"
+#~ msgstr "Re-Exporte %s sind nicht von %s exportiert"
+
+#~ msgid "package %s %s was found, but %s %s is required by %s"
+#~ msgstr "Paket %s %s gefunden, aber %s %s wird von %s benötigt"
+
+#~ msgid "package %s %s is loaded, but %s %s is required by %s"
+#~ msgstr "Paket %s %s ist geladen, aber %s %s wird von %s benötigt"
+
+#~ msgid "wrong argument"
+#~ msgstr "falsches Argument"
+
+#~ msgid ""
+#~ "The following object is masked %s %s:\n"
+#~ "\n"
+#~ "%s\n"
+#~ msgid_plural ""
+#~ "The following objects are masked %s %s:\n"
+#~ "\n"
+#~ "%s\n"
+#~ msgstr[0] ""
+#~ "Das folgende Objekt ist maskiert %s %s:\n"
+#~ "\n"
+#~ "%s\n"
+#~ msgstr[1] ""
+#~ "Die folgenden Objekte sind maskiert %s %s:\n"
+#~ "\n"
+#~ "%s\n"
+
 #~ msgid "'nu' must be 0, nrow(x) or ncol(x)"
 #~ msgstr "'nu' muss entweder 0, nrow(x) oder ncol(x) sein"
 
@@ -1950,3 +2006,6 @@ msgstr[1] "Warnmeldungen:\n"
 #, fuzzy
 #~ msgid "invalid value of length(bin)"
 #~ msgstr "ungültiger Wert"
+
+#~ msgid "version"
+#~ msgstr "Version"
diff --git a/src/library/base/po/R-fa.po b/src/library/base/po/R-fa.po
index 76562b5..81c2ff5 100644
--- a/src/library/base/po/R-fa.po
+++ b/src/library/base/po/R-fa.po
@@ -7,7 +7,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: R 2.15.1\n"
 "Report-Msgid-Bugs-To: bugs.r-project.org\n"
-"POT-Creation-Date: 2014-02-13 14:10\n"
+"POT-Creation-Date: 2016-04-01 09:50\n"
 "PO-Revision-Date: 2012-11-27 01:11+0330\n"
 "Last-Translator: Seyed Mahmood Taghavi Shahri <taghavi_m at razi.tums.ac.ir>\n"
 "Language-Team: Persian\n"
@@ -46,6 +46,9 @@ msgstr ""
 msgid "a dimension is zero"
 msgstr ""
 
+msgid "\"hexNumeric\" and \"digits17\" are mutually exclusive"
+msgstr ""
+
 msgid "second argument must be a list"
 msgstr ""
 
@@ -214,6 +217,11 @@ msgstr ""
 msgid "cannot coerce class \"%s\" to a data.frame"
 msgstr ""
 
+msgid ""
+"'row.names' is not a character vector of length %d -- omitting it. Will be "
+"an error!"
+msgstr ""
+
 msgid "options(\"stringsAsFactors\") not set to TRUE or FALSE"
 msgstr ""
 
@@ -293,7 +301,7 @@ msgstr ""
 msgid "only a single element should be replaced"
 msgstr ""
 
-msgid "Name partially matched in data frame"
+msgid "Partial match of '%s' to '%s' in data frame"
 msgstr ""
 
 msgid "names do not match previous names"
@@ -305,16 +313,13 @@ msgstr ""
 msgid "invalid list argument: all variables should have the same length"
 msgstr ""
 
-msgid "data frame with 0 columns and %d rows"
-msgstr ""
-
 msgid "<0 rows> (or 0-length row.names)"
 msgstr ""
 
 msgid "non-numeric variable in data frame:"
 msgstr ""
 
-msgid "only defined for equally-sized data frames"
+msgid "%s only defined for equally-sized data frames"
 msgstr ""
 
 msgid "list of length %d not meaningful"
@@ -476,6 +481,15 @@ msgid ""
 "%s"
 msgstr ""
 
+msgid "failed to load the methods package for debugging by signature"
+msgstr ""
+
+msgid "failed to load methods package for undebugging by signature"
+msgstr ""
+
+msgid "failed to load methods package for handling signature"
+msgstr ""
+
 msgid "'x' must be a square matrix"
 msgstr ""
 
@@ -531,7 +545,7 @@ msgstr ""
 msgid "number of levels differs"
 msgstr ""
 
-msgid "not meaningful for factors"
+msgid "%s not meaningful for factors"
 msgstr ""
 
 msgid "level sets of factors are different"
@@ -587,10 +601,10 @@ msgstr ""
 msgid "invalid 'time' argument"
 msgstr ""
 
-msgid "'vec' contains NAs"
+msgid "'vec' must be sorted non-decreasingly and not contain NAs"
 msgstr ""
 
-msgid "'vec' must be sorted non-decreasingly"
+msgid "'fun' is not a function"
 msgstr ""
 
 msgid "using the first element of 'value' of type \"expression\""
@@ -623,6 +637,12 @@ msgstr ""
 msgid "'zero.print' must be character, logical or NULL"
 msgstr ""
 
+msgid "'big.mark' and 'decimal.mark' are both '%s', which could be confusing"
+msgstr ""
+
+msgid "'input.d.mark' has no characters"
+msgstr ""
+
 msgid "'subset' must be logical"
 msgstr ""
 
@@ -702,9 +722,13 @@ msgstr ""
 msgid "package %s has a license that you need to accept after viewing"
 msgstr ""
 
-msgid ""
-"package %s has a license that you need to accept:\n"
-"according to the DESCRIPTION file it is"
+msgid "package %s has a license that you need to accept:"
+msgstr ""
+
+msgid "according to the DESCRIPTION file it is"
+msgstr ""
+
+msgid "%s"
 msgstr ""
 
 msgid "license for package %s not accepted"
@@ -731,6 +755,9 @@ msgstr ""
 msgid "%s not found on search path, using pos = 2"
 msgstr ""
 
+msgid "Package %s version %s cannot be unloaded"
+msgstr ""
+
 msgid "package or namespace load failed for %s"
 msgstr ""
 
@@ -818,15 +845,12 @@ msgstr ""
 msgid "package %s required by %s could not be found"
 msgstr ""
 
-msgid "package %s %s was found, but %s %s is required by %s"
+msgid "version %s of %s masked by %s in %s"
 msgstr ""
 
 msgid "package %s could not be loaded"
 msgstr ""
 
-msgid "package %s %s is loaded, but %s %s is required by %s"
-msgstr ""
-
 msgid "empty (zero-byte) input file"
 msgstr ""
 
@@ -875,6 +899,15 @@ msgstr ""
 msgid "must specify names of formal arguments for 'vectorize'"
 msgstr ""
 
+msgid "FUN"
+msgstr ""
+
+msgid "may not have argument(s) named"
+msgstr ""
+
+msgid ","
+msgstr ""
+
 msgid "'arg' must be NULL or a character vector"
 msgstr ""
 
@@ -929,9 +962,15 @@ msgstr ""
 msgid "'by' must specify one or more columns as numbers, names or logical"
 msgstr ""
 
+msgid "long vectors are not supported"
+msgstr ""
+
 msgid "'by.x' and 'by.y' specify different numbers of columns"
 msgstr ""
 
+msgid "'incomparables' is supported only for merging on a single column"
+msgstr ""
+
 msgid "additional arguments ignored in message()"
 msgstr ""
 
@@ -1043,6 +1082,9 @@ msgstr ""
 msgid "found methods to import for function %s but not the generic itself"
 msgstr ""
 
+msgid "replacing previous import %s by %s when loading %s"
+msgstr ""
+
 msgid "No methods found in \"%s\" for requests: %s"
 msgstr ""
 
@@ -1050,8 +1092,8 @@ msgid "requested methods not found in environment/package %s: %s"
 msgstr ""
 
 msgid ""
-"No generic function found corresponding to requested imported methods for "
-"\"%s\" from package \"%s\" (malformed exports?)"
+"No generic function %s found corresponding to requested imported methods "
+"from package %s when loading %s (malformed exports?)"
 msgstr ""
 
 msgid "cannot add to exports of a sealed namespace"
@@ -1207,6 +1249,9 @@ msgstr ""
 msgid "too many arguments"
 msgstr ""
 
+msgid "invalid 'compress' argument:"
+msgstr ""
+
 msgid "'compress' is ignored unless 'file' is a file name"
 msgstr ""
 
@@ -1242,6 +1287,9 @@ msgid ""
 "Did you intend to set 'partial'?"
 msgstr ""
 
+msgid "'partial' sorting not supported by radix method"
+msgstr ""
+
 msgid "'index.return' only for non-factors"
 msgstr ""
 
@@ -1268,9 +1316,6 @@ msgstr ""
 msgid "method = \"quick\" is only for numeric 'x'"
 msgstr ""
 
-msgid "method = \"radix\" is only for integer 'x'"
-msgstr ""
-
 msgid "'local' must be TRUE, FALSE or an environment"
 msgstr ""
 
@@ -1301,6 +1346,9 @@ msgstr ""
 msgid "Timestamp of %s has changed"
 msgstr ""
 
+msgid "'x' and 'to' must refer to same file"
+msgstr ""
+
 msgid "additional arguments ignored in stop()"
 msgstr ""
 
@@ -1319,9 +1367,6 @@ msgstr ""
 msgid "probably wrong encoding in names(.) of column"
 msgstr ""
 
-msgid ","
-msgstr ""
-
 msgid "STATS is longer than the extent of 'dim(x)[MARGIN]'"
 msgstr ""
 
@@ -1364,6 +1409,9 @@ msgstr ""
 msgid "arguments must have same length"
 msgstr ""
 
+msgid "total number of levels >= 2^31"
+msgstr ""
+
 msgid "handler must be a function"
 msgstr ""
 
@@ -1394,9 +1442,6 @@ msgstr ""
 msgid "invalid version specification %s"
 msgstr ""
 
-msgid "wrong argument"
-msgstr ""
-
 msgid "invalid 'value'"
 msgstr ""
 
@@ -1495,11 +1540,22 @@ msgstr[0] ""
 msgstr[1] ""
 
 msgid ""
-"The following object is masked %s %s:\n"
+"The following object is masked _by_ %s:\n"
 "\n"
 "%s\n"
 msgid_plural ""
-"The following objects are masked %s %s:\n"
+"The following objects are masked _by_ %s:\n"
+"\n"
+"%s\n"
+msgstr[0] ""
+msgstr[1] ""
+
+msgid ""
+"The following object is masked from %s:\n"
+"\n"
+"%s\n"
+msgid_plural ""
+"The following objects are masked from %s:\n"
 "\n"
 "%s\n"
 msgstr[0] ""
@@ -1556,6 +1612,11 @@ msgid_plural "provided %d variables to replace %d variables"
 msgstr[0] ""
 msgstr[1] ""
 
+msgid "data frame with 0 columns and %d row"
+msgid_plural "data frame with 0 columns and %d rows"
+msgstr[0] ""
+msgstr[1] ""
+
 msgid "library %s contains no packages"
 msgid_plural "libraries %s contain no packages"
 msgstr[0] ""
@@ -1610,11 +1671,6 @@ msgid_plural "S3 methods %s were declared in NAMESPACE but not found"
 msgstr[0] ""
 msgstr[1] ""
 
-msgid "extra argument %s will be disregarded"
-msgid_plural "extra arguments %s will be disregarded"
-msgstr[0] ""
-msgstr[1] ""
-
 msgid "%s is not TRUE"
 msgid_plural "%s are not all TRUE"
 msgstr[0] ""
@@ -1624,3 +1680,12 @@ msgid "Warning message:\n"
 msgid_plural "Warning messages:\n"
 msgstr[0] ""
 msgstr[1] ""
+
+msgid ""
+"In %s :\n"
+" extra argument %s will be disregarded"
+msgid_plural ""
+"In %s :\n"
+" extra arguments %s will be disregarded"
+msgstr[0] ""
+msgstr[1] ""
diff --git a/src/library/base/po/R-fr.po b/src/library/base/po/R-fr.po
index 81cc8ac..1b73d9a 100644
--- a/src/library/base/po/R-fr.po
+++ b/src/library/base/po/R-fr.po
@@ -7,7 +7,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: R 2.12.0\n"
 "Report-Msgid-Bugs-To: bugs.r-project.org\n"
-"POT-Creation-Date: 2014-02-13 14:10\n"
+"POT-Creation-Date: 2016-04-01 09:50\n"
 "PO-Revision-Date: 2014-03-17 10:41+0100\n"
 "Last-Translator: Philippe Grosjean <phgrosjean at sciviews.org>\n"
 "Language-Team: French <R-core at r-project.org>\n"
@@ -48,6 +48,9 @@ msgstr "valeurs infinies ou manquantes dans 'x'"
 msgid "a dimension is zero"
 msgstr "une dimension est nulle"
 
+msgid "\"hexNumeric\" and \"digits17\" are mutually exclusive"
+msgstr ""
+
 msgid "second argument must be a list"
 msgstr "le second argument doit �tre une liste"
 
@@ -228,6 +231,11 @@ msgstr ""
 "impossible de convertir automatiquement la classe  \"%s\" en un tableau de "
 "donn�es (data.frame)"
 
+msgid ""
+"'row.names' is not a character vector of length %d -- omitting it. Will be "
+"an error!"
+msgstr ""
+
 msgid "options(\"stringsAsFactors\") not set to TRUE or FALSE"
 msgstr "options(\"stringsAsFactors\") n'est pas TRUE ou FALSE"
 
@@ -315,7 +323,8 @@ msgstr "remplacement d'
 msgid "only a single element should be replaced"
 msgstr "seulement un �lement devrait �tre remplac�"
 
-msgid "Name partially matched in data frame"
+#, fuzzy
+msgid "Partial match of '%s' to '%s' in data frame"
 msgstr "Nom s�lectionn� avec correspondance partielle dans le data frame"
 
 msgid "names do not match previous names"
@@ -329,16 +338,14 @@ msgstr ""
 "liste d'arguments incorrecte : toutes les variables doivent avoir la m�me "
 "longueur"
 
-msgid "data frame with 0 columns and %d rows"
-msgstr "tableau de donn�es (data frame) avec 0 colonnes et %d lignes"
-
 msgid "<0 rows> (or 0-length row.names)"
 msgstr "<0 lignes> (ou 'row.names' de longueur nulle)"
 
 msgid "non-numeric variable in data frame:"
 msgstr "variable non num�rique dans le tableau de donn�es :"
 
-msgid "only defined for equally-sized data frames"
+#, fuzzy
+msgid "%s only defined for equally-sized data frames"
 msgstr "seulement d�fini pour des tableaux de donn�es de m�me taille"
 
 msgid "list of length %d not meaningful"
@@ -517,6 +524,15 @@ msgstr ""
 "Les lignes litigieuses commencent par:\n"
 "%s"
 
+msgid "failed to load the methods package for debugging by signature"
+msgstr ""
+
+msgid "failed to load methods package for undebugging by signature"
+msgstr ""
+
+msgid "failed to load methods package for handling signature"
+msgstr ""
+
 msgid "'x' must be a square matrix"
 msgstr "'x' doit �tre une matrice carr�e"
 
@@ -577,7 +593,8 @@ msgstr "'labels' incorrect ; la longueur %d doit 
 msgid "number of levels differs"
 msgstr "le nombre de niveaux diff�re"
 
-msgid "not meaningful for factors"
+#, fuzzy
+msgid "%s not meaningful for factors"
 msgstr "ceci n'est pas pertinent pour des variables facteurs"
 
 msgid "level sets of factors are different"
@@ -636,12 +653,14 @@ msgstr "argument 'path' incorrect"
 msgid "invalid 'time' argument"
 msgstr "argument 'time' incorrect"
 
-msgid "'vec' contains NAs"
-msgstr "'vec' contient des valeurs manquantes (NAs)"
-
-msgid "'vec' must be sorted non-decreasingly"
+#, fuzzy
+msgid "'vec' must be sorted non-decreasingly and not contain NAs"
 msgstr "'vec' doit �tre tri� par ordre croissant"
 
+#, fuzzy
+msgid "'fun' is not a function"
+msgstr "le manipulateur de donn�es (handler) doit �tre une fonction"
+
 msgid "using the first element of 'value' of type \"expression\""
 msgstr "utilisation du premier �l�ment de 'value' de type \"expression\""
 
@@ -678,6 +697,13 @@ msgid "'zero.print' must be character, logical or NULL"
 msgstr ""
 "'zero.print' doit �tre une cha�ne de caract�res, une valeur logique ou NULL"
 
+msgid "'big.mark' and 'decimal.mark' are both '%s', which could be confusing"
+msgstr ""
+
+#, fuzzy
+msgid "'input.d.mark' has no characters"
+msgstr "'input' et 'target' doivent �tre des vecteurs caract�res"
+
 msgid "'subset' must be logical"
 msgstr "'subset' doit �tre une valeur logique"
 
@@ -762,13 +788,19 @@ msgstr ""
 msgid "package %s has a license that you need to accept after viewing"
 msgstr "Le package %s a une licence que vous devez accepter apr�s l'avoir lue"
 
-msgid ""
-"package %s has a license that you need to accept:\n"
-"according to the DESCRIPTION file it is"
+#, fuzzy
+msgid "package %s has a license that you need to accept:"
+msgstr "Le package %s a une licence que vous devez accepter apr�s l'avoir lue"
+
+#, fuzzy
+msgid "according to the DESCRIPTION file it is"
 msgstr ""
 "Le package %s a une licence que vous devez accepter :\n"
 "d'apr�s le fichier DESCRIPTION, il s'agit de"
 
+msgid "%s"
+msgstr ""
+
 msgid "license for package %s not accepted"
 msgstr "La licence du package %s n'est pas accept�e"
 
@@ -796,6 +828,10 @@ msgid "%s not found on search path, using pos = 2"
 msgstr ""
 "%s n'est pas trouv� dans le chemin de recherche, utilisation de pos = 2"
 
+#, fuzzy
+msgid "Package %s version %s cannot be unloaded"
+msgstr "la package %s n'est pas charg�"
+
 msgid "package or namespace load failed for %s"
 msgstr "le chargement du package ou de l'espace de noms a �chou� pour %s"
 
@@ -890,15 +926,12 @@ msgstr "Documentation pour le package %s"
 msgid "package %s required by %s could not be found"
 msgstr "le package %s n�cessaire pour %s, mais est introuvable"
 
-msgid "package %s %s was found, but %s %s is required by %s"
-msgstr "le package %s %s est trouv�, mais %s %s est r�quis par %s"
+msgid "version %s of %s masked by %s in %s"
+msgstr ""
 
 msgid "package %s could not be loaded"
 msgstr "le package %s ne peut �tre charg�"
 
-msgid "package %s %s is loaded, but %s %s is required by %s"
-msgstr "le package %s %s est charg�, mais %s %s est requis par %s"
-
 msgid "empty (zero-byte) input file"
 msgstr "fichier d'entr�e vide (0 octets)"
 
@@ -949,6 +982,15 @@ msgstr "argument 'category' incorrect"
 msgid "must specify names of formal arguments for 'vectorize'"
 msgstr "les noms d'arguments formels doivent �tre sp�cifi�s pour 'vectorize'"
 
+msgid "FUN"
+msgstr ""
+
+msgid "may not have argument(s) named"
+msgstr ""
+
+msgid ","
+msgstr ","
+
 msgid "'arg' must be NULL or a character vector"
 msgstr "'arg' doit �tre NULL ou une cha�ne de caract�res"
 
@@ -1007,9 +1049,15 @@ msgstr ""
 "'by' doit sp�cifier lune ou plusieurs colonnes comme des entiers, des noms "
 "ou des valeurs logiques"
 
+msgid "long vectors are not supported"
+msgstr ""
+
 msgid "'by.x' and 'by.y' specify different numbers of columns"
 msgstr "'by.x' et 'by.y' sp�cifient des nombres diff�rents de colonnes"
 
+msgid "'incomparables' is supported only for merging on a single column"
+msgstr ""
+
 msgid "additional arguments ignored in message()"
 msgstr "arguments suppl�mentaires ignor�s dans message()"
 
@@ -1142,6 +1190,11 @@ msgstr ""
 "des m�thodes sont disponibles � l'importation pour la fonction %s mais pas "
 "pour la fonction g�n�rique elle-m�me"
 
+#, fuzzy
+msgid "replacing previous import %s by %s when loading %s"
+msgstr ""
+"remplacement de l'importation pr�c�dente par %s lors du chargement de %s"
+
 msgid "No methods found in \"%s\" for requests: %s"
 msgstr "Pas de m�thodes trouv�es das \"%s\" pour les requ�tes : %s"
 
@@ -1150,9 +1203,10 @@ msgstr ""
 "des m�thodes demand�es sont introuvables dans l'environnement / le package "
 "%s : %s"
 
+#, fuzzy
 msgid ""
-"No generic function found corresponding to requested imported methods for "
-"\"%s\" from package \"%s\" (malformed exports?)"
+"No generic function %s found corresponding to requested imported methods "
+"from package %s when loading %s (malformed exports?)"
 msgstr ""
 "Pas de fonction g�n�rique trouv�e pour les m�thodes import�es requises pour "
 "\"%s\" du package \"%s\" (exports incorrect ?)"
@@ -1313,6 +1367,10 @@ msgstr "'length' doit 
 msgid "too many arguments"
 msgstr "trop d'arguments"
 
+#, fuzzy
+msgid "invalid 'compress' argument:"
+msgstr "argument 'name' incorrect"
+
 msgid "'compress' is ignored unless 'file' is a file name"
 msgstr "'compress' est ignor� � moins que 'file' ne soit le nom d'un fichier"
 
@@ -1350,6 +1408,9 @@ msgstr ""
 "'decreasing' doit �tre un vecteur logique unitaire.\n"
 "Aviez-vous l'intention de d�finir 'partial'?"
 
+msgid "'partial' sorting not supported by radix method"
+msgstr ""
+
 msgid "'index.return' only for non-factors"
 msgstr "'index.return' seulement pour des variables autres que des facteurs"
 
@@ -1378,9 +1439,6 @@ msgstr ""
 msgid "method = \"quick\" is only for numeric 'x'"
 msgstr "method=\"quick\" est utilisable seulement pour des 'x' num�riques"
 
-msgid "method = \"radix\" is only for integer 'x'"
-msgstr "method=\"radix\" est seulement utilisable pour des 'x' entiers"
-
 msgid "'local' must be TRUE, FALSE or an environment"
 msgstr "'local' doit �tre TRUE, FALSE ou un environnement"
 
@@ -1412,6 +1470,10 @@ msgstr "'%s' n'est pas un fichier existant"
 msgid "Timestamp of %s has changed"
 msgstr "La date d'enregistrement de %s a chang�"
 
+#, fuzzy
+msgid "'x' and 'to' must refer to same file"
+msgstr "'x' et 'y' doivent avoir la m�me longueur"
+
 msgid "additional arguments ignored in stop()"
 msgstr "arguments suppl�mentaires ignor�s dans stop()"
 
@@ -1430,9 +1492,6 @@ msgstr "valeurs incorrectes de 'indent' et 'width'"
 msgid "probably wrong encoding in names(.) of column"
 msgstr "encodage probablement erron� dans les noms de colonnes 'names(.)'"
 
-msgid ","
-msgstr ","
-
 msgid "STATS is longer than the extent of 'dim(x)[MARGIN]'"
 msgstr "STATS est plus long que l'�tendue de 'dim(x)[MARGIN]'"
 
@@ -1477,6 +1536,10 @@ msgstr "'INDEX' est de longueur nulle"
 msgid "arguments must have same length"
 msgstr "les arguments doivent avoir m�me longueur"
 
+#, fuzzy
+msgid "total number of levels >= 2^31"
+msgstr "le nombre de niveaux diff�re"
+
 msgid "handler must be a function"
 msgstr "le manipulateur de donn�es (handler) doit �tre une fonction"
 
@@ -1507,9 +1570,6 @@ msgstr "Pas d'historique des fonctions appel
 msgid "invalid version specification %s"
 msgstr "sp�cification de version incorrecte %s"
 
-msgid "wrong argument"
-msgstr "mauvais argument"
-
 msgid "invalid 'value'"
 msgstr "'value' incorrecte"
 
@@ -1610,12 +1670,31 @@ msgstr[0] "l'option de reconstruction de code (deparse) %s n'est pas reconnue"
 msgstr[1] ""
 "les options de reconstruction de code (deparse) %s ne sont pas reconnues"
 
+#, fuzzy
 msgid ""
-"The following object is masked %s %s:\n"
+"The following object is masked _by_ %s:\n"
 "\n"
 "%s\n"
 msgid_plural ""
-"The following objects are masked %s %s:\n"
+"The following objects are masked _by_ %s:\n"
+"\n"
+"%s\n"
+msgstr[0] ""
+"L'objet suivant est masqu� %s %s:\n"
+"\n"
+"%s\n"
+msgstr[1] ""
+"Les objets suivants sont masqu�s %s %s:\n"
+"\n"
+"%s\n"
+
+#, fuzzy
+msgid ""
+"The following object is masked from %s:\n"
+"\n"
+"%s\n"
+msgid_plural ""
+"The following objects are masked from %s:\n"
 "\n"
 "%s\n"
 msgstr[0] ""
@@ -1684,6 +1763,12 @@ msgid_plural "provided %d variables to replace %d variables"
 msgstr[0] "%d variables sont fournies pour remplacer %d variables"
 msgstr[1] "%d variables sont fournies pour remplacer %d variables"
 
+#, fuzzy
+msgid "data frame with 0 columns and %d row"
+msgid_plural "data frame with 0 columns and %d rows"
+msgstr[0] "tableau de donn�es (data frame) avec 0 colonnes et %d lignes"
+msgstr[1] "tableau de donn�es (data frame) avec 0 colonnes et %d lignes"
+
 msgid "library %s contains no packages"
 msgid_plural "libraries %s contain no packages"
 msgstr[0] "la biblioth�que %s ne contient aucun package"
@@ -1743,11 +1828,6 @@ msgstr[0] "la m
 msgstr[1] ""
 "les m�thodes S3 %s sont d�clar�es dans NAMESPACE mais sont introuvables"
 
-msgid "extra argument %s will be disregarded"
-msgid_plural "extra arguments %s will be disregarded"
-msgstr[0] "l'argument suppl�mentaire %s sera ignor�"
-msgstr[1] "l'argument suppl�mentaire %s sera ignor�"
-
 msgid "%s is not TRUE"
 msgid_plural "%s are not all TRUE"
 msgstr[0] "%s n'est pas TRUE"
@@ -1758,6 +1838,56 @@ msgid_plural "Warning messages:\n"
 msgstr[0] "Message d'avis :\n"
 msgstr[1] "Messages d'avis :\n"
 
+#, fuzzy
+msgid ""
+"In %s :\n"
+" extra argument %s will be disregarded"
+msgid_plural ""
+"In %s :\n"
+" extra arguments %s will be disregarded"
+msgstr[0] "l'argument suppl�mentaire %s sera ignor�"
+msgstr[1] "l'argument suppl�mentaire %s sera ignor�"
+
+#~ msgid "'vec' contains NAs"
+#~ msgstr "'vec' contient des valeurs manquantes (NAs)"
+
+#~ msgid "method = \"radix\" is only for integer 'x'"
+#~ msgstr "method=\"radix\" est seulement utilisable pour des 'x' entiers"
+
+#, fuzzy
+#~ msgid "re-exports %s not exported by %s"
+#~ msgstr "l'objet %s n'est pas export� par 'namespace:%s'"
+
+#, fuzzy
+#~ msgid "cannot be unloaded."
+#~ msgstr "l'espace de noms %s ne peut �tre d�charg� :"
+
+#~ msgid "package %s %s was found, but %s %s is required by %s"
+#~ msgstr "le package %s %s est trouv�, mais %s %s est r�quis par %s"
+
+#~ msgid "package %s %s is loaded, but %s %s is required by %s"
+#~ msgstr "le package %s %s est charg�, mais %s %s est requis par %s"
+
+#~ msgid "wrong argument"
+#~ msgstr "mauvais argument"
+
+#~ msgid ""
+#~ "The following object is masked %s %s:\n"
+#~ "\n"
+#~ "%s\n"
+#~ msgid_plural ""
+#~ "The following objects are masked %s %s:\n"
+#~ "\n"
+#~ "%s\n"
+#~ msgstr[0] ""
+#~ "L'objet suivant est masqu� %s %s:\n"
+#~ "\n"
+#~ "%s\n"
+#~ msgstr[1] ""
+#~ "Les objets suivants sont masqu�s %s %s:\n"
+#~ "\n"
+#~ "%s\n"
+
 #~ msgid "'nu' must be 0, nrow(x) or ncol(x)"
 #~ msgstr "'nu' doit �tre 0, nrow(x) ou ncol(x)"
 
diff --git a/src/library/base/po/R-it.po b/src/library/base/po/R-it.po
index 5e01461..33bcfef 100644
--- a/src/library/base/po/R-it.po
+++ b/src/library/base/po/R-it.po
@@ -7,11 +7,11 @@ msgid ""
 msgstr ""
 "Project-Id-Version: R 2.3.0\n"
 "Report-Msgid-Bugs-To: bugs.r-project.org\n"
-"POT-Creation-Date: 2014-02-13 14:10\n"
+"POT-Creation-Date: 2016-04-01 09:50\n"
 "PO-Revision-Date: 2005-02-16 08:34\n"
 "Last-Translator: Stefano M. Iacus <Stefano.Iacus at R-project.org>\n"
 "Language-Team: Italian\n"
-"Language: \n"
+"Language: it\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
@@ -47,6 +47,9 @@ msgstr "valori infiniti o mancanti in 'x'"
 msgid "a dimension is zero"
 msgstr ""
 
+msgid "\"hexNumeric\" and \"digits17\" are mutually exclusive"
+msgstr ""
+
 msgid "second argument must be a list"
 msgstr "il secondo argomento deve essere di tipo list"
 
@@ -235,6 +238,11 @@ msgstr "'dimnames' fornita per i ldata frame non valida"
 msgid "cannot coerce class \"%s\" to a data.frame"
 msgstr "non posso trasformare un oggetto di classe \"%s\" in un data.frame"
 
+msgid ""
+"'row.names' is not a character vector of length %d -- omitting it. Will be "
+"an error!"
+msgstr ""
+
 msgid "options(\"stringsAsFactors\") not set to TRUE or FALSE"
 msgstr ""
 
@@ -331,7 +339,7 @@ msgid "only a single element should be replaced"
 msgstr "si può sostituire un solo elemento alla volta"
 
 #, fuzzy
-msgid "Name partially matched in data frame"
+msgid "Partial match of '%s' to '%s' in data frame"
 msgstr "variabile non numerica nel data frame:"
 
 #, fuzzy
@@ -346,16 +354,14 @@ msgstr ""
 "argomento list non valido: tutte le variabili devono avere la stessa "
 "lunghezza"
 
-msgid "data frame with 0 columns and %d rows"
-msgstr ""
-
 msgid "<0 rows> (or 0-length row.names)"
 msgstr ""
 
 msgid "non-numeric variable in data frame:"
 msgstr "variabile non numerica nel data frame:"
 
-msgid "only defined for equally-sized data frames"
+#, fuzzy
+msgid "%s only defined for equally-sized data frames"
 msgstr "è definita solo per data frame della stessa ampiezza"
 
 msgid "list of length %d not meaningful"
@@ -543,6 +549,15 @@ msgid ""
 "%s"
 msgstr ""
 
+msgid "failed to load the methods package for debugging by signature"
+msgstr ""
+
+msgid "failed to load methods package for undebugging by signature"
+msgstr ""
+
+msgid "failed to load methods package for handling signature"
+msgstr ""
+
 msgid "'x' must be a square matrix"
 msgstr "'x' deve essere una matrice quadrata"
 
@@ -613,7 +628,8 @@ msgstr "'labels' non valide; lunghezza %d dovrebbe essere 1 o %d"
 msgid "number of levels differs"
 msgstr "il numero dei livelli è differente"
 
-msgid "not meaningful for factors"
+#, fuzzy
+msgid "%s not meaningful for factors"
 msgstr "senza senso per variabili factor"
 
 msgid "level sets of factors are different"
@@ -678,12 +694,14 @@ msgstr "argomento 'category' non valido"
 msgid "invalid 'time' argument"
 msgstr "argomento 'category' non valido"
 
-msgid "'vec' contains NAs"
-msgstr "'vec' contiene NA"
-
-msgid "'vec' must be sorted non-decreasingly"
+#, fuzzy
+msgid "'vec' must be sorted non-decreasingly and not contain NAs"
 msgstr "'vec' deve essere ordinato in ordine non decrescente"
 
+#, fuzzy
+msgid "'fun' is not a function"
+msgstr "handler deve essere una funzione"
+
 msgid "using the first element of 'value' of type \"expression\""
 msgstr ""
 
@@ -715,6 +733,13 @@ msgstr "'zero.print' deve avere lunghezza > 1"
 msgid "'zero.print' must be character, logical or NULL"
 msgstr ""
 
+msgid "'big.mark' and 'decimal.mark' are both '%s', which could be confusing"
+msgstr ""
+
+#, fuzzy
+msgid "'input.d.mark' has no characters"
+msgstr "'input' e 'target' devono essere vettori di caratteri"
+
 msgid "'subset' must be logical"
 msgstr "'subset' deve essere di tipo logico"
 
@@ -811,9 +836,13 @@ msgstr ""
 msgid "package %s has a license that you need to accept after viewing"
 msgstr ""
 
-msgid ""
-"package %s has a license that you need to accept:\n"
-"according to the DESCRIPTION file it is"
+msgid "package %s has a license that you need to accept:"
+msgstr ""
+
+msgid "according to the DESCRIPTION file it is"
+msgstr ""
+
+msgid "%s"
 msgstr ""
 
 #, fuzzy
@@ -847,6 +876,10 @@ msgid "%s not found on search path, using pos = 2"
 msgstr "'%s' non trovato nel percorso di ricerca, uso pos = 2"
 
 #, fuzzy
+msgid "Package %s version %s cannot be unloaded"
+msgstr "pacchetto %s non caricato"
+
+#, fuzzy
 msgid "package or namespace load failed for %s"
 msgstr "caricamento pacchetto/namespace fallito per '%s'"
 
@@ -955,18 +988,13 @@ msgstr "Carico il pacchetto richiesto: '%s'"
 msgid "package %s required by %s could not be found"
 msgstr "pacchetto '%s' richiesto da '%s' ma non trovato"
 
-#, fuzzy
-msgid "package %s %s was found, but %s %s is required by %s"
-msgstr "pacchetto '%s' non trovato, ma %s %s è richiesto da '%s'"
+msgid "version %s of %s masked by %s in %s"
+msgstr ""
 
 #, fuzzy
 msgid "package %s could not be loaded"
 msgstr "pacchetto '%s' non caricato"
 
-#, fuzzy
-msgid "package %s %s is loaded, but %s %s is required by %s"
-msgstr "pacchetto '%s' %s caricato, ma %s %s richiesto da '%s'"
-
 msgid "empty (zero-byte) input file"
 msgstr ""
 
@@ -1017,6 +1045,15 @@ msgstr "argomento 'category' non valido"
 msgid "must specify names of formal arguments for 'vectorize'"
 msgstr ""
 
+msgid "FUN"
+msgstr ""
+
+msgid "may not have argument(s) named"
+msgstr ""
+
+msgid ","
+msgstr ","
+
 #, fuzzy
 msgid "'arg' must be NULL or a character vector"
 msgstr "'normal.kind' deve essere una stringa di caratteri di lunghezza 1"
@@ -1080,9 +1117,15 @@ msgstr "'by' deve essere compatibile col numero di colonne"
 msgid "'by' must specify one or more columns as numbers, names or logical"
 msgstr "'by' deve specificare la colonna(e)"
 
+msgid "long vectors are not supported"
+msgstr ""
+
 msgid "'by.x' and 'by.y' specify different numbers of columns"
 msgstr "'by.x' e 'by.y' specificano numeri di colonne differenti"
 
+msgid "'incomparables' is supported only for merging on a single column"
+msgstr ""
+
 msgid "additional arguments ignored in message()"
 msgstr ""
 
@@ -1213,6 +1256,9 @@ msgstr "destinazione per importazione non valida"
 msgid "found methods to import for function %s but not the generic itself"
 msgstr ""
 
+msgid "replacing previous import %s by %s when loading %s"
+msgstr ""
+
 msgid "No methods found in \"%s\" for requests: %s"
 msgstr ""
 
@@ -1222,8 +1268,8 @@ msgstr ""
 "oggetti  'methods' richiesti non trovati nel environment/pacchetto '%s': %s"
 
 msgid ""
-"No generic function found corresponding to requested imported methods for "
-"\"%s\" from package \"%s\" (malformed exports?)"
+"No generic function %s found corresponding to requested imported methods "
+"from package %s when loading %s (malformed exports?)"
 msgstr ""
 
 #, fuzzy
@@ -1398,6 +1444,10 @@ msgstr "la lunghezza deve essere un numero non negativo"
 msgid "too many arguments"
 msgstr "troppi argomenti"
 
+#, fuzzy
+msgid "invalid 'compress' argument:"
+msgstr "argomento 'category' non valido"
+
 msgid "'compress' is ignored unless 'file' is a file name"
 msgstr ""
 
@@ -1433,6 +1483,9 @@ msgid ""
 "Did you intend to set 'partial'?"
 msgstr ""
 
+msgid "'partial' sorting not supported by radix method"
+msgstr ""
+
 msgid "'index.return' only for non-factors"
 msgstr "'index.return' solo per oggetti non factor"
 
@@ -1460,10 +1513,6 @@ msgstr ""
 msgid "method = \"quick\" is only for numeric 'x'"
 msgstr "method=\"quick\" è solo per 'x' di tipo numeric"
 
-#, fuzzy
-msgid "method = \"radix\" is only for integer 'x'"
-msgstr "method=\"radix\" è solo per 'x' interi"
-
 msgid "'local' must be TRUE, FALSE or an environment"
 msgstr ""
 
@@ -1494,6 +1543,10 @@ msgstr "'%s' non è un file esistente"
 msgid "Timestamp of %s has changed"
 msgstr ""
 
+#, fuzzy
+msgid "'x' and 'to' must refer to same file"
+msgstr "'x' e 'y' devono avere la stessa lunghezza"
+
 msgid "additional arguments ignored in stop()"
 msgstr ""
 
@@ -1512,9 +1565,6 @@ msgstr "valori non corretti per 'indent' e 'width'"
 msgid "probably wrong encoding in names(.) of column"
 msgstr ""
 
-msgid ","
-msgstr ","
-
 msgid "STATS is longer than the extent of 'dim(x)[MARGIN]'"
 msgstr ""
 
@@ -1562,6 +1612,10 @@ msgstr "'to' deve avere  lunghezza 1"
 msgid "arguments must have same length"
 msgstr "gli argomenti devono avere la stessa lunghezza"
 
+#, fuzzy
+msgid "total number of levels >= 2^31"
+msgstr "il numero dei livelli è differente"
+
 msgid "handler must be a function"
 msgstr "handler deve essere una funzione"
 
@@ -1595,9 +1649,6 @@ msgstr "Nessun traceback disponibile"
 msgid "invalid version specification %s"
 msgstr "versione specificata non valida"
 
-msgid "wrong argument"
-msgstr "argomento sbagliato"
-
 #, fuzzy
 msgid "invalid 'value'"
 msgstr "valore 'n' non valido"
@@ -1708,11 +1759,22 @@ msgstr[0] "opzione di deparse %s non riconosciuta"
 msgstr[1] "opzioni di deparse %s non riconosciute"
 
 msgid ""
-"The following object is masked %s %s:\n"
+"The following object is masked _by_ %s:\n"
+"\n"
+"%s\n"
+msgid_plural ""
+"The following objects are masked _by_ %s:\n"
+"\n"
+"%s\n"
+msgstr[0] ""
+msgstr[1] ""
+
+msgid ""
+"The following object is masked from %s:\n"
 "\n"
 "%s\n"
 msgid_plural ""
-"The following objects are masked %s %s:\n"
+"The following objects are masked from %s:\n"
 "\n"
 "%s\n"
 msgstr[0] ""
@@ -1781,6 +1843,11 @@ msgid_plural "provided %d variables to replace %d variables"
 msgstr[0] "specificate %d variabili per sostituire %d variabili"
 msgstr[1] "specificate %d variabili per sostituire %d variabili"
 
+msgid "data frame with 0 columns and %d row"
+msgid_plural "data frame with 0 columns and %d rows"
+msgstr[0] ""
+msgstr[1] ""
+
 msgid "library %s contains no packages"
 msgid_plural "libraries %s contain no packages"
 msgstr[0] "la libreria %s non contiene pacchetti"
@@ -1842,12 +1909,6 @@ msgstr[0] "metodo S3 %s dichiarato in NAMESPACE ma non trovato"
 msgstr[1] "metodi S3 %s dichiarati in NAMESPACE ma non trovati"
 
 #, fuzzy
-msgid "extra argument %s will be disregarded"
-msgid_plural "extra arguments %s will be disregarded"
-msgstr[0] "l'argomento drop verrà ignorato"
-msgstr[1] "l'argomento drop verrà ignorato"
-
-#, fuzzy
 msgid "%s is not TRUE"
 msgid_plural "%s are not all TRUE"
 msgstr[0] "non è"
@@ -1858,6 +1919,42 @@ msgid_plural "Warning messages:\n"
 msgstr[0] "Messaggio di avvertimento:\n"
 msgstr[1] "Messaggi di avvertimento:\n"
 
+#, fuzzy
+msgid ""
+"In %s :\n"
+" extra argument %s will be disregarded"
+msgid_plural ""
+"In %s :\n"
+" extra arguments %s will be disregarded"
+msgstr[0] "l'argomento drop verrà ignorato"
+msgstr[1] "l'argomento drop verrà ignorato"
+
+#~ msgid "'vec' contains NAs"
+#~ msgstr "'vec' contiene NA"
+
+#, fuzzy
+#~ msgid "method = \"radix\" is only for integer 'x'"
+#~ msgstr "method=\"radix\" è solo per 'x' interi"
+
+#, fuzzy
+#~ msgid "re-exports %s not exported by %s"
+#~ msgstr "l'oggetto %s non è esportato da 'namespace:%s'"
+
+#, fuzzy
+#~ msgid "cannot be unloaded."
+#~ msgstr "namespace '%s' caricato"
+
+#, fuzzy
+#~ msgid "package %s %s was found, but %s %s is required by %s"
+#~ msgstr "pacchetto '%s' non trovato, ma %s %s è richiesto da '%s'"
+
+#, fuzzy
+#~ msgid "package %s %s is loaded, but %s %s is required by %s"
+#~ msgstr "pacchetto '%s' %s caricato, ma %s %s richiesto da '%s'"
+
+#~ msgid "wrong argument"
+#~ msgstr "argomento sbagliato"
+
 #~ msgid "'nu' must be 0, nrow(x) or ncol(x)"
 #~ msgstr "'nu' deve essere 0, nrow(x) o ncol(x)"
 
diff --git a/src/library/base/po/R-ja.po b/src/library/base/po/R-ja.po
index a780dd4..411e877 100644
--- a/src/library/base/po/R-ja.po
+++ b/src/library/base/po/R-ja.po
@@ -2,8 +2,8 @@ msgid ""
 msgstr ""
 "Project-Id-Version: R 2.4.0 \n"
 "Report-Msgid-Bugs-To: bugs.r-project.org\n"
-"POT-Creation-Date: 2014-02-13 14:10\n"
-"PO-Revision-Date: 2014-03-26 13:57+0200 \n"
+"POT-Creation-Date: 2016-04-01 09:50\n"
+"PO-Revision-Date: 2015-03-27 14:42+0900 \n"
 "Last-Translator: Masafumi  \n"
 "Language-Team: RjpWiki Message Translation Team <mokada at md.tsukuba.ac.jp> \n"
 "Language: ja \n"
@@ -11,7 +11,8 @@ msgstr ""
 "Content-Type: text/plain; charset=UTF-8 \n"
 "Content-Transfer-Encoding: 8bit \n"
 "Plural-Forms: nplurals=1; plural=0; \n"
-"X-Generator: Pootle 2.0.5 \n"
+"X-Generator: Pootle 2.5.1.1 \n"
+"X-POOTLE-MTIME: 1427434951.000000 \n"
 
 msgid "'%s' is defunct."
 msgstr " '%s' は廃止されました。 "
@@ -43,6 +44,9 @@ msgstr " 'x' に無限値か欠測値があります "
 msgid "a dimension is zero"
 msgstr " 次元が 0 です "
 
+msgid "\"hexNumeric\" and \"digits17\" are mutually exclusive"
+msgstr " \"hexNumeric\" と \"digits17\" は矛盾します "
+
 msgid "second argument must be a list"
 msgstr " 第二引数はリストでなければなりません "
 
@@ -217,6 +221,11 @@ msgstr " データフレームに無効な 'dimnames' が与えられました "
 msgid "cannot coerce class \"%s\" to a data.frame"
 msgstr " クラス \"%s\" はデータフレームに強制変換できません "
 
+msgid ""
+"'row.names' is not a character vector of length %d -- omitting it. Will be "
+"an error!"
+msgstr ""
+
 msgid "options(\"stringsAsFactors\") not set to TRUE or FALSE"
 msgstr ""
 " options(\"stringsAsFactors\") が TRUE にも FALSE にも設定されていません "
@@ -298,8 +307,8 @@ msgstr " 存在しない列中の要素の置き換えです: %s "
 msgid "only a single element should be replaced"
 msgstr " ただ一つの要素しか置き換えられるべきではありません "
 
-msgid "Name partially matched in data frame"
-msgstr " データフレーム中の名前は部分的にマッチしました "
+msgid "Partial match of '%s' to '%s' in data frame"
+msgstr " データフレーム中の名前 '%s' は '%s'と部分的にマッチしました "
 
 msgid "names do not match previous names"
 msgstr " 名前が以前の名前と一致しません "
@@ -310,17 +319,14 @@ msgstr " 引数の列の数が一致しません "
 msgid "invalid list argument: all variables should have the same length"
 msgstr " 無効なリストの引数です。全ての変数は同じ長さを持つべきです "
 
-msgid "data frame with 0 columns and %d rows"
-msgstr " 0 列 %d 行のデータフレーム "
-
 msgid "<0 rows> (or 0-length row.names)"
 msgstr " <0 行> (または長さ 0 の row.names) "
 
 msgid "non-numeric variable in data frame:"
 msgstr " 以下のデータフレーム中に数値でない変数があります: "
 
-msgid "only defined for equally-sized data frames"
-msgstr " 同じ大きさのデータフレームに対してだけ定義されています "
+msgid "%s only defined for equally-sized data frames"
+msgstr " %s は同じ大きさのデータフレームに対してだけ定義されています "
 
 msgid "list of length %d not meaningful"
 msgstr " 長さ %d のリストは意味がありません "
@@ -494,6 +500,15 @@ msgstr ""
 " 不正な行は次の場所で始まっています: \n"
 " %s "
 
+msgid "failed to load the methods package for debugging by signature"
+msgstr ""
+
+msgid "failed to load methods package for undebugging by signature"
+msgstr ""
+
+msgid "failed to load methods package for handling signature"
+msgstr ""
+
 msgid "'x' must be a square matrix"
 msgstr " 'x' は正方行列でなければなりません "
 
@@ -553,8 +568,8 @@ msgstr " 無効な 'labels' です; 長さ %d は 1 または %d であるべき
 msgid "number of levels differs"
 msgstr " 水準の数が異なります "
 
-msgid "not meaningful for factors"
-msgstr " 因子に対しては無意味です "
+msgid "%s not meaningful for factors"
+msgstr " %s は因子に対しては無意味です "
 
 msgid "level sets of factors are different"
 msgstr " 因子の水準セットが異なっています "
@@ -613,12 +628,14 @@ msgstr " 無効な 'path' 引数です "
 msgid "invalid 'time' argument"
 msgstr " 無効な 'time' 引数です "
 
-msgid "'vec' contains NAs"
-msgstr " 'vec' は NA 値を含んでいます "
-
-msgid "'vec' must be sorted non-decreasingly"
+#, fuzzy
+msgid "'vec' must be sorted non-decreasingly and not contain NAs"
 msgstr " 'vec' は非減少順にソートされていなければいけません "
 
+#, fuzzy
+msgid "'fun' is not a function"
+msgstr " ハンドラーは関数でなければなりません "
+
 msgid "using the first element of 'value' of type \"expression\""
 msgstr " タイプ \"expression\" の 'value' の最初の要素だけを使います "
 
@@ -654,6 +671,14 @@ msgstr " 'zero.print' は長さ > 1 を持ちます "
 msgid "'zero.print' must be character, logical or NULL"
 msgstr " 'zero.print' は文字、論理値、または NULL でなければなりません "
 
+msgid "'big.mark' and 'decimal.mark' are both '%s', which could be confusing"
+msgstr ""
+" 'big.mark' と 'decimal.mark' が両方とも '%s' ですが,これは混乱を招きます "
+
+#, fuzzy
+msgid "'input.d.mark' has no characters"
+msgstr " 'input' そして 'target' は文字ベクトルでなければなりません "
+
 msgid "'subset' must be logical"
 msgstr " 'subset' は論理値でなければなりません "
 
@@ -736,13 +761,19 @@ msgstr ""
 msgid "package %s has a license that you need to accept after viewing"
 msgstr " パッケージ %s を使うにはライセンスを確認して受諾する必要があります "
 
-msgid ""
-"package %s has a license that you need to accept:\n"
-"according to the DESCRIPTION file it is"
+#, fuzzy
+msgid "package %s has a license that you need to accept:"
+msgstr " パッケージ %s を使うにはライセンスを確認して受諾する必要があります "
+
+#, fuzzy
+msgid "according to the DESCRIPTION file it is"
 msgstr ""
 " パッケージ %s を使うにはライセンスを受諾する必要があります。以下をご確認くだ"
 "さい。: "
 
+msgid "%s"
+msgstr ""
+
 msgid "license for package %s not accepted"
 msgstr " パッケージ %s のライセンスは受諾されていません "
 
@@ -767,6 +798,9 @@ msgstr " %s は有効なインストール済みパッケージではありま
 msgid "%s not found on search path, using pos = 2"
 msgstr " %s は検索パス上には見つかりませんでした。pos = 2 を使用します "
 
+msgid "Package %s version %s cannot be unloaded"
+msgstr " パッケージ %s のバージョン %s はアンロードできません "
+
 msgid "package or namespace load failed for %s"
 msgstr " %s に対するパッケージもしくは名前空間のロードが失敗しました "
 
@@ -862,17 +896,12 @@ msgstr " パッケージ %s のドキュメント "
 msgid "package %s required by %s could not be found"
 msgstr " パッケージ %s が %s によって要求されましたが、見つけられませんでした "
 
-msgid "package %s %s was found, but %s %s is required by %s"
-msgstr ""
-" パッケージ %s %s はありましたが、%s %s が %s によって要求されています "
+msgid "version %s of %s masked by %s in %s"
+msgstr " %2$s の バージョン %1$s は,%4$s 中の %3$s によってマスクされます "
 
 msgid "package %s could not be loaded"
 msgstr " パッケージ %s をロードできませんでした "
 
-msgid "package %s %s is loaded, but %s %s is required by %s"
-msgstr ""
-" パッケージ %s %s はロードされましたが、%s %s が %s によって要求されています "
-
 msgid "empty (zero-byte) input file"
 msgstr " 空の (0 バイトの) 入力ファイルです "
 
@@ -923,6 +952,15 @@ msgstr " 無効な 'category' 引数です "
 msgid "must specify names of formal arguments for 'vectorize'"
 msgstr " 'vectorize.args' には仮引数名しか指定出来ません "
 
+msgid "FUN"
+msgstr ""
+
+msgid "may not have argument(s) named"
+msgstr ""
+
+msgid ","
+msgstr " , "
+
 msgid "'arg' must be NULL or a character vector"
 msgstr " 'arg' は、NULL かひとつの文字ベクトルでなければなりません "
 
@@ -977,9 +1015,15 @@ msgstr " 'by' は列数にマッチしなければなりません "
 msgid "'by' must specify one or more columns as numbers, names or logical"
 msgstr " 'by' は列を数値、名前ラベルもしくは論理値で特定しなければなりません "
 
+msgid "long vectors are not supported"
+msgstr " long vectorはサポートされていません "
+
 msgid "'by.x' and 'by.y' specify different numbers of columns"
 msgstr " 'by.x' そして 'by.y' は異なった列数を指定しています "
 
+msgid "'incomparables' is supported only for merging on a single column"
+msgstr " 'incomparables' は単一列上でのマージの際にのみサポートされます "
+
 msgid "additional arguments ignored in message()"
 msgstr " message() で追加引数は無視されました "
 
@@ -1110,6 +1154,10 @@ msgid "found methods to import for function %s but not the generic itself"
 msgstr ""
 " 関数 %s に対するインポートメソッドをみつけましたが、総称的ではありません "
 
+#, fuzzy
+msgid "replacing previous import %s by %s when loading %s"
+msgstr " %2$s のロード中に、以前のインポート %1$s を置き換えています "
+
 msgid "No methods found in \"%s\" for requests: %s"
 msgstr " \"%s\" 中には要求に対するメソッドが見つかりません: %s "
 
@@ -1118,9 +1166,10 @@ msgstr ""
 " 要求された methods オブジェクトは環境もしくはパッケージ %s 中に見付かりませ"
 "ん: %s "
 
+#, fuzzy
 msgid ""
-"No generic function found corresponding to requested imported methods for "
-"\"%s\" from package \"%s\" (malformed exports?)"
+"No generic function %s found corresponding to requested imported methods "
+"from package %s when loading %s (malformed exports?)"
 msgstr ""
 " \"%s\" に対して要求されたインポートされたメソッド (パッケージ \"%s\" から"
 "の) に対応する総称的関数がありません (不正確なエクスポート?) "
@@ -1280,6 +1329,10 @@ msgstr " 長さは非負の数値でなければなりません "
 msgid "too many arguments"
 msgstr " 引数の数が多すぎます "
 
+#, fuzzy
+msgid "invalid 'compress' argument:"
+msgstr " 無効な 'name' 引数です "
+
 msgid "'compress' is ignored unless 'file' is a file name"
 msgstr " 'file' がファイル名でない限り、'compress' は無視されます "
 
@@ -1319,6 +1372,9 @@ msgstr ""
 " 'decreasing' は長さ length-1 の論理値ベクトルでなければなりません。 \n"
 " 'partial' を設定するつもりですか? "
 
+msgid "'partial' sorting not supported by radix method"
+msgstr ""
+
 msgid "'index.return' only for non-factors"
 msgstr " 'index.return' は非因子専用です "
 
@@ -1347,9 +1403,6 @@ msgstr ""
 msgid "method = \"quick\" is only for numeric 'x'"
 msgstr " method = \"quick\" は実数の 'x' にしか利用できません "
 
-msgid "method = \"radix\" is only for integer 'x'"
-msgstr " method = \"radix\" は整数の 'x' にしか利用できません "
-
 msgid "'local' must be TRUE, FALSE or an environment"
 msgstr " 'local' は TRUE か FALSE 、または環境でなければなりません "
 
@@ -1381,6 +1434,10 @@ msgstr " '%s' は既存のファイルではありません "
 msgid "Timestamp of %s has changed"
 msgstr " %s のタイムスタンプを変更しました "
 
+#, fuzzy
+msgid "'x' and 'to' must refer to same file"
+msgstr " 'x' と 'y' は同じ長さを持たなければなりません "
+
 msgid "additional arguments ignored in stop()"
 msgstr " stop() により追加の引数は無視されました "
 
@@ -1399,9 +1456,6 @@ msgstr " 'indent' と 'width' に対する値が不正です "
 msgid "probably wrong encoding in names(.) of column"
 msgstr " おそらく列の names(.) 中に間違ったエンコーディングがあります "
 
-msgid ","
-msgstr " , "
-
 msgid "STATS is longer than the extent of 'dim(x)[MARGIN]'"
 msgstr " STATS は 'dim(x)[MARGIN]' の大きさより長いです "
 
@@ -1444,6 +1498,10 @@ msgstr " 'INDEX' の長さが 0 です "
 msgid "arguments must have same length"
 msgstr " 引数は同じ長さでなければなりません "
 
+#, fuzzy
+msgid "total number of levels >= 2^31"
+msgstr " 水準の数が異なります "
+
 msgid "handler must be a function"
 msgstr " ハンドラーは関数でなければなりません "
 
@@ -1474,9 +1532,6 @@ msgstr " 利用できる traceback がありません "
 msgid "invalid version specification %s"
 msgstr " 無効なバージョンの指定 %s です "
 
-msgid "wrong argument"
-msgstr " 間違った引数です "
-
 msgid "invalid 'value'"
 msgstr " 無効な 'value' です "
 
@@ -1577,15 +1632,28 @@ msgid_plural "deparse options %s are not recognized"
 msgstr[0] " 逆構文解析オプション %s は認識できません "
 
 msgid ""
-"The following object is masked %s %s:\n"
+"The following object is masked _by_ %s:\n"
+"\n"
+"%s\n"
+msgid_plural ""
+"The following objects are masked _by_ %s:\n"
+"\n"
+"%s\n"
+msgstr[0] ""
+" 以下のオブジェクトは %s によってマスクされています: \n"
+"\n"
+" %s \n"
+
+msgid ""
+"The following object is masked from %s:\n"
 "\n"
 "%s\n"
 msgid_plural ""
-"The following objects are masked %s %s:\n"
+"The following objects are masked from %s:\n"
 "\n"
 "%s\n"
 msgstr[0] ""
-" 以下のオブジェクトはマスクされています (%s %s) : \n"
+" 以下のオブジェクトは %s からマスクされています: \n"
 "\n"
 " %s \n"
 
@@ -1632,6 +1700,10 @@ msgid "provided %d variable to replace %d variables"
 msgid_plural "provided %d variables to replace %d variables"
 msgstr[0] " %d 個の変数を与えて、%d 個の変数を置換しようとしています "
 
+msgid "data frame with 0 columns and %d row"
+msgid_plural "data frame with 0 columns and %d rows"
+msgstr[0] " 0 列 %d 行のデータフレーム "
+
 msgid "library %s contains no packages"
 msgid_plural "libraries %s contain no packages"
 msgstr[0] " ライブラリ %s はパッケージを含んでいません "
@@ -1680,10 +1752,6 @@ msgid_plural "S3 methods %s were declared in NAMESPACE but not found"
 msgstr[0] ""
 " S3 メソッド %s は NAMESPACE で宣言されましたが、見つかりませんでした "
 
-msgid "extra argument %s will be disregarded"
-msgid_plural "extra arguments %s will be disregarded"
-msgstr[0] " 余分な引数 %s は無視されます "
-
 msgid "%s is not TRUE"
 msgid_plural "%s are not all TRUE"
 msgstr[0] " %s は TRUE ではありません "
@@ -1692,6 +1760,55 @@ msgid "Warning message:\n"
 msgid_plural "Warning messages:\n"
 msgstr[0] " 警告メッセージ: \n"
 
+#, fuzzy
+msgid ""
+"In %s :\n"
+" extra argument %s will be disregarded"
+msgid_plural ""
+"In %s :\n"
+" extra arguments %s will be disregarded"
+msgstr[0] " 余分な引数 %s は無視されます "
+
+#~ msgid "'vec' contains NAs"
+#~ msgstr " 'vec' は NA 値を含んでいます "
+
+#~ msgid "method = \"radix\" is only for integer 'x'"
+#~ msgstr " method = \"radix\" は整数の 'x' にしか利用できません "
+
+#, fuzzy
+#~ msgid "re-exports %s not exported by %s"
+#~ msgstr ""
+#~ " オブジェクト %s は 'namespace:%s' によってエクスポートされていません "
+
+#~ msgid "cannot be unloaded."
+#~ msgstr " アンロード出来ません "
+
+#~ msgid "package %s %s was found, but %s %s is required by %s"
+#~ msgstr ""
+#~ " パッケージ %s %s はありましたが、%s %s が %s によって要求されています "
+
+#~ msgid "package %s %s is loaded, but %s %s is required by %s"
+#~ msgstr ""
+#~ " パッケージ %s %s はロードされましたが、%s %s が %s によって要求されていま"
+#~ "す "
+
+#~ msgid "wrong argument"
+#~ msgstr " 間違った引数です "
+
+#, fuzzy
+#~ msgid ""
+#~ "The following object is masked %s %s:\n"
+#~ "\n"
+#~ "%s\n"
+#~ msgid_plural ""
+#~ "The following objects are masked %s %s:\n"
+#~ "\n"
+#~ "%s\n"
+#~ msgstr[0] ""
+#~ " 以下のオブジェクトは %s によってマスクされています: \n"
+#~ "\n"
+#~ " %s \n"
+
 #~ msgid "'nu' must be 0, nrow(x) or ncol(x)"
 #~ msgstr " 'nu' は 0、または nrow(x) または ncol(x) でなければなりません "
 
@@ -1929,3 +2046,6 @@ msgstr[0] " 警告メッセージ: \n"
 #, fuzzy
 #~ msgid "invalid value of length(bin)"
 #~ msgstr " 無効な値です "
+
+#~ msgid "version"
+#~ msgstr " バージョン "
diff --git a/src/library/base/po/R-ko.po b/src/library/base/po/R-ko.po
index 045d413..3b4808d 100644
--- a/src/library/base/po/R-ko.po
+++ b/src/library/base/po/R-ko.po
@@ -1,81 +1,89 @@
 # Korean translation for R base package
-# src/library/base/po/R-ko.po
-# Copyright (C) 1995-2014 The R Core Team
+# ./base/po/R-ko.po
+#
+# Copyright (C) 1995-2016 The R Core Team
+#
 # This file is distributed under the same license as the R base package.
-# Chel Hee Lee <chl948 at mail.usask.ca>, 2008-2014.
+# Maintained by Chel Hee Lee <chl948 at mail.usask.ca>, 2008-2016.
+# Contact: Chel Hee Lee <gnustats at gmail.com>
+#
+# Notes:
+# Under development (unstable) starting from 11-APR-2016 for R-3.3.1 - QC: in progress
+# Freezed on 10-APR-2016 for R-3.3.0 - QC: PASS
+# Freezed on 30-MAR-2015 for R-3.2.0 - QC: PASS
+# Freezed on 06-FEB-2015 for R-3.1.3 - QC: PASS
 #
 msgid ""
 msgstr ""
-"Project-Id-Version: R 3.1.0\n"
+"Project-Id-Version: R-3.3.0\n"
 "Report-Msgid-Bugs-To: bugs.r-project.org\n"
-"POT-Creation-Date: 2014-02-13 14:10\n"
-"PO-Revision-Date: 2014-03-27 08:58-0600\n"
+"POT-Creation-Date: 2016-04-01 09:50\n"
+"PO-Revision-Date: 2016-04-11 13:08-0600\n"
 "Last-Translator: Chel Hee Lee <chl948 at mail.usask.ca>\n"
-"Language-Team:  <chl948 at mail.usask.ca>\n"
+"Language-Team: Chel Hee Lee <chl948 at mail.usask.ca>\n"
 "Language: ko\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
 "Plural-Forms: nplurals=1; plural=0;\n"
-"X-Poedit-SourceCharset: UTF-8\n"
-"X-Generator: Poedit 1.5.4\n"
 
 msgid "'%s' is defunct."
-msgstr "'%s'는 더 이상 지원되지 않습니다."
+msgstr "'%s'는 더 이상 사용되지 않습니다."
 
 msgid "Use '%s' instead."
-msgstr "대신 '%s'를 사용하세요."
+msgstr "대신 '%s'를 사용하길 바랍니다."
 
 msgid "See help(\"Defunct\") and help(\"%s-defunct\")."
-msgstr ""
-"help(\"Defunct\")와 help(\"%s-defunct\")을 입력하여 관련도움말을 확인해주세"
-"요."
+msgstr "help(\"Defunct\")와 help(\"%s-defunct\")를 읽어보시길 바랍니다."
 
 msgid "See help(\"Defunct\")"
-msgstr "help(\"Defunct\")을 입력하여 관련도움말을 확인해주세요."
+msgstr "help(\"Defunct\")를 읽어보시길 바랍니다."
 
 msgid "'%s' is deprecated."
-msgstr "'%s'은 제거되었습니다."
+msgstr "'%s'은 제거될 예정입니다."
 
 msgid "See help(\"Deprecated\") and help(\"%s-deprecated\")."
-msgstr ""
-"help(\"Deprecated\")와 help(\"%s-deprecated\")를 입력하여 관련 도움말을 확인"
-"해주세요."
+msgstr "help(\"Deprecated\")와 help(\"%s-deprecated\")를 읽어보시길 바랍니다."
 
 msgid "See help(\"Deprecated\")"
-msgstr "help(\"Deprecated\")을 입력하여 관련 도움말을 확인해주세요."
+msgstr "help(\"Deprecated\")를 읽어보시길 바랍니다."
 
 msgid "argument to 'La.svd' must be numeric or complex"
-msgstr "'La.svd'의 입력인수는 반드시 수치형 혹은 복소수형이어야 합니다"
+msgstr ""
+"'La.svd'에 전달되는 인자는 반드시 수치형(numeric) 또는 복소수형(complex)이어"
+"야 합니다."
 
 msgid "infinite or missing values in 'x'"
-msgstr "'x'에 무한한 값이 있거나 결측치가 있습니다"
+msgstr "'x'에 무한(infinite) 또는 결측(missing)값이 존재합니다."
 
 msgid "a dimension is zero"
-msgstr "차원이 0입니다"
+msgstr "차원이 영(zero)입니다."
+
+msgid "\"hexNumeric\" and \"digits17\" are mutually exclusive"
+msgstr "\"hexNumeric\"과 \"digits17\"은 상호 배탁적입니다."
 
 msgid "second argument must be a list"
-msgstr "두번째 인수는 반드시 리스트이어야 합니다"
+msgstr "두번째 인자는 반드시 리스트(list)이어야 합니다."
 
 msgid "'iconvlist' is not available on this system"
-msgstr "이 시스템에서 'iconvlist'는 사용가능하지 않습니다"
+msgstr "이 시스템에서는 'iconvlist'을 사용할 수 없습니다."
 
 msgid "'kind' must be a character string of length 1 (RNG to be used)."
 msgstr ""
-"'kind'는 반드시 길이가 1인 문자열이어야 합니다 (난수생성방법 지정에 이용됩니"
-"다)."
+"'kind'는 반드시 길이가 1인 문자열(character string)이어야 합니다. 이는 RNG(난"
+"수생성기)에 사용됩니다."
 
 msgid "'%s' is not a valid abbreviation of an RNG"
-msgstr "'%s'는 올바른 난수생성방법의 약자가 아닙니다"
+msgstr "'%s'는 올바른 RNG(난수생성기)의 약자가 아닙니다."
 
 msgid "'normal.kind' must be a character string of length 1"
-msgstr "'normal.kind'는 반드시 길이가 1인 문자열이어야 합니다"
+msgstr "'normal.kind'는 반드시 길이가 1인 문자열이어야 합니다."
 
 msgid "'%s' is not a valid choice"
 msgstr "'%s'는 유효한 선택이 아닙니다"
 
 msgid "malformed version string"
-msgstr ""
+msgstr "잘못된 버전 "
 
 msgid "target is %s, current is %s"
 msgstr "타겟은 %s이지만, 현재는 %s 입니다"
@@ -96,7 +104,7 @@ msgid "'X' must have named dimnames"
 msgstr "'X'는 반드시 named dimnames를 가져야 합니다"
 
 msgid "not all elements of 'MARGIN' are names of dimensions"
-msgstr ""
+msgstr "'MARGIN'에 있는 모든 요소들이 차원의 이름은 아닙니다."
 
 msgid "'dims' cannot be of length 0"
 msgstr "'dims'의 길이는 0이 될 수 없습니다"
@@ -179,10 +187,10 @@ msgid "not a valid restart specification"
 msgstr "유효한 재시작 지정이 아닙니다"
 
 msgid "argument 'where' of length 0"
-msgstr "인자 'where'의 길이가 0입니다"
+msgstr "인자 'where'의 길이는 영(0)입니다."
 
 msgid "argument 'object' must deparse to a single character string"
-msgstr ""
+msgstr "'object'인자는 반드시 하나의 문자열로 만들어져야 합니다."
 
 msgid "'origin' must be one of 'start', 'current' or 'end'"
 msgstr "'origin'은 반드시 'start', 'current' 또는 'end' 중 하나이어야 합니다"
@@ -229,12 +237,19 @@ msgstr "데이터프레임에 잘못된 'dimnames'이 주어졌습니다"
 msgid "cannot coerce class \"%s\" to a data.frame"
 msgstr "클래스  \"%s\"를 data.frame으로 강제형변환 할 수 없습니다"
 
+msgid ""
+"'row.names' is not a character vector of length %d -- omitting it. Will be "
+"an error!"
+msgstr ""
+"'row.names'은 길이가 %d인 문자형 벡터가 아니므로 삭제합니다.   따라서, 에러"
+"가 발생될 것입니다!"
+
 msgid "options(\"stringsAsFactors\") not set to TRUE or FALSE"
 msgstr ""
 "options(\"stringsAsFactors\")의 값이 TRUE 또는 FALSE로 지정되어 있지 않습니다"
 
 msgid "mismatch of row names in arguments of 'data.frame', item %d"
-msgstr ""
+msgstr "데이터 프레임 인자의 행이름과 일치하지 않습니다. item %d"
 
 msgid "some row.names duplicated: %s --> row.names NOT used"
 msgstr "일부 row.names가 중복됩니다: %s --> row.names 는 사용되지 않았습니다"
@@ -255,7 +270,7 @@ msgid "row names supplied are of the wrong length"
 msgstr "제공된 행의 이름들의 길이가 잘못되었습니다"
 
 msgid "row names were found from a short variable and have been discarded"
-msgstr ""
+msgstr "행 이름이 짧은  변수에서 발견되어 제거되었습니다."
 
 msgid "named arguments other than 'drop' are discouraged"
 msgstr ""
@@ -309,11 +324,11 @@ msgstr ""
 msgid "only a single element should be replaced"
 msgstr "한개의 구성요소만이 교체되어져야 합니다"
 
-msgid "Name partially matched in data frame"
-msgstr "데이터 프레임내에 부분적으로 일치하는 이름이 있습니다"
+msgid "Partial match of '%s' to '%s' in data frame"
+msgstr ""
 
 msgid "names do not match previous names"
-msgstr ""
+msgstr "이전에 사용된 이름들과 일치하지 않습니다."
 
 msgid "numbers of columns of arguments do not match"
 msgstr ""
@@ -322,17 +337,14 @@ msgid "invalid list argument: all variables should have the same length"
 msgstr ""
 "유효하지 않은 리스트 인자입니다:  모든 변수들이 같은 길이를 가지고 있습니다"
 
-msgid "data frame with 0 columns and %d rows"
-msgstr "행의 개수가 %d이고 열의 개수가 0인 데이터 프레임입니다"
-
 msgid "<0 rows> (or 0-length row.names)"
 msgstr "<0 행> <또는 row.names의 길이가 0입니다>"
 
 msgid "non-numeric variable in data frame:"
 msgstr "데이터 프레임에 수치형이 아닌 변수가 있습니다"
 
-msgid "only defined for equally-sized data frames"
-msgstr "동일한 사이즈의 데이터 프레임들에 대해서만 정의되어집니다"
+msgid "%s only defined for equally-sized data frames"
+msgstr "동일한 사이즈의 데이터 프레임들의 경우에만 정의된 %s입니다."
 
 msgid "list of length %d not meaningful"
 msgstr "의미가 없는 길이 %d인 리스트입니다"
@@ -455,19 +467,19 @@ msgid "need explicit units for numeric conversion"
 msgstr ""
 
 msgid "invalid units specified"
-msgstr ""
+msgstr "주어진 단위정보가 올바르지 않습니다."
 
 msgid "unary '%s' not defined for \"difftime\" objects"
-msgstr ""
+msgstr "단항연산자 '%s'는 \"difftime\" 객체에 사용할 수 없습니다."
 
 msgid "'%s' not defined for \"difftime\" objects"
-msgstr ""
+msgstr "'%s'는  \"difftime\" 객체에 사용할 수 없습니다."
 
 msgid "both arguments of * cannot be \"difftime\" objects"
-msgstr ""
+msgstr "두개의 인자 모두가 \"difftime\" 객체 일 수는 없습니다."
 
 msgid "second argument of / cannot be a \"difftime\" object"
-msgstr ""
+msgstr "/ 의 두번째 인자가 \"difftime\" 객체이서는 안됩니다."
 
 msgid "'from' must be a \"POSIXt\" object"
 msgstr "'from'은 반드시 \"POSIXt\" 객체이어야 합니다"
@@ -495,11 +507,21 @@ msgid ""
 "%s"
 msgstr ""
 
+msgid "failed to load the methods package for debugging by signature"
+msgstr ""
+
+msgid "failed to load methods package for undebugging by signature"
+msgstr ""
+
+msgid "failed to load methods package for handling signature"
+msgstr ""
+
 msgid "'x' must be a square matrix"
 msgstr "'x'는 반드시 정방행렬이어야 합니다"
 
 msgid "'determinant' not currently defined for complex matrices"
 msgstr ""
+"아직은 복소수 행렬에 사용할 수 있는 'determinant'는 정의되지 않았습니다."
 
 msgid "'nrow' or 'ncol' cannot be specified when 'x' is a matrix"
 msgstr "'nrow' 또는 'ncol'는 'x'가 행렬일때 지정될 수 없습니다"
@@ -511,10 +533,10 @@ msgid "only matrix diagonals can be replaced"
 msgstr "오로지 행렬의 대각요소들만이 변경할 수 있습니다"
 
 msgid "replacement diagonal has wrong length"
-msgstr ""
+msgstr "대체하고자 하는 대각원소의 길이가 올바르지 않습니다."
 
 msgid "MARGIN = %d is invalid for dim = %d"
-msgstr ""
+msgstr "dim = %d인데 MARGIN = %d입니다."
 
 msgid "must pass a package name, %s or %s object"
 msgstr "반드시 패키지명, %s 또는 %s 객체를 넘겨주어야 합니다"
@@ -541,7 +563,7 @@ msgid "0 x 0 matrix"
 msgstr "0 행 0 열 행렬입니다"
 
 msgid "non-square matrix in 'eigen'"
-msgstr ""
+msgstr "'eigen'에 비정방행렬이 존재합니다."
 
 msgid "invalid nrow(x)"
 msgstr "유효하지 않은 nrow(x)입니다"
@@ -551,19 +573,19 @@ msgstr ""
 "유효하지 않은 'labels'입니다; 길이 %d는 반드시 1 이거나 %d이어야 합니다"
 
 msgid "number of levels differs"
-msgstr "레벨의 개수가 다릅니다"
+msgstr "레벨의 개수가 다릅니다."
 
-msgid "not meaningful for factors"
-msgstr ""
+msgid "%s not meaningful for factors"
+msgstr "요인(factors)에 대하여 의미있는 %s가 아닙니다."
 
 msgid "level sets of factors are different"
 msgstr ""
 
 msgid "invalid factor level, NA generated"
-msgstr ""
+msgstr "요인의 수준(factor level)이 올바르지 않아 NA가 생성되었습니다."
 
 msgid "'%s' is not meaningful for ordered factors"
-msgstr ""
+msgstr "순서형 요인(ordered factors)에 대하여 의미가 있는 '%s'가 아닙니다."
 
 msgid "'%s' not defined for ordered factors"
 msgstr "순서형 요인들에 정의되지 않은 '%s'입니다"
@@ -572,6 +594,8 @@ msgid ""
 "'%s' is only meaningful for ordered factors if all arguments have the same "
 "level sets"
 msgstr ""
+"만약 모든 인자들이 같은 수준들을 가지고 있다면 '%s'는 오로지 순위형 요인들에 "
+"대해서만 의미가 있습니다."
 
 msgid "no files to copy to"
 msgstr "다음에 복사할 파일들이 없습니다"
@@ -609,17 +633,17 @@ msgstr "유효하지 않은 'path' 인자입니다"
 msgid "invalid 'time' argument"
 msgstr "유효하지 않은 'time' 인자입니다"
 
-msgid "'vec' contains NAs"
-msgstr "'vec'는 NA 값들을 포함합니다"
+msgid "'vec' must be sorted non-decreasingly and not contain NAs"
+msgstr "'vec'는 오름차순으로 정렬되어야 하고 NA를 포함하지 않아야 합니다. "
 
-msgid "'vec' must be sorted non-decreasingly"
-msgstr ""
+msgid "'fun' is not a function"
+msgstr "'fun'은 함수가 아닙니다."
 
 msgid "using the first element of 'value' of type \"expression\""
 msgstr "타입 \"expression\"을 가지는 'value'의 첫번째 요소를 사용합니다"
 
 msgid "class of 'x' was discarded"
-msgstr ""
+msgstr "클래스 'x'는 사용되지 않습니다."
 
 msgid "'mode' must be \"double\" (\"real\"), \"integer\" or \"character\""
 msgstr ""
@@ -650,6 +674,12 @@ msgstr "'zero.print'는 길이가 1 보다 커야합니다"
 msgid "'zero.print' must be character, logical or NULL"
 msgstr "'zero.print'는 반드시 문자, 논리값, 또는 NULL이어야 합니다"
 
+msgid "'big.mark' and 'decimal.mark' are both '%s', which could be confusing"
+msgstr "'big.mark'와 'decimal.mark' 모두 '%s'인데 이는 혼란스러울 수 있습니다."
+
+msgid "'input.d.mark' has no characters"
+msgstr "'input.d.mark'는 어떠한 문자도 가지고 있습니다."
+
 msgid "'subset' must be logical"
 msgstr "'subset'은 반드시 논리적이어야 합니다"
 
@@ -669,7 +699,7 @@ msgid "unknown cost components ignored"
 msgstr ""
 
 msgid "cost components must be non-negative"
-msgstr ""
+msgstr "cost component는 음의 값을 가질 수 없습니다."
 
 msgid "%s and %s must have the same length"
 msgstr "%s와 %s는 반드시 같은 길이를 가져야 합니다"
@@ -687,16 +717,16 @@ msgid "value does not provide any replacement values"
 msgstr ""
 
 msgid "must have replacements for non-matches"
-msgstr ""
+msgstr "일치하지 않는 항목들에 대하여 대체할 값들이 필요합니다."
 
 msgid "must have replacements for matches"
-msgstr ""
+msgstr "일치하는 항목들에 대하여 대체할 값들이 필요합니다."
 
 msgid "No factors specified"
 msgstr "지정된 요인들이 없습니다"
 
 msgid "norm '%s' currently always uses exact = FALSE"
-msgstr ""
+msgstr "'%s'는 현재로서는 항상 exact = FALSE를 사용합니다."
 
 msgid "triangular matrix should be square"
 msgstr "triangular matrix는 반드시 정방이어야 합니다"
@@ -730,12 +760,16 @@ msgstr ""
 msgid "package %s has a license that you need to accept after viewing"
 msgstr "패키지 %s는 당신이 보고 확인을 해야할 라이센스를 가지고 있습니다"
 
-msgid ""
-"package %s has a license that you need to accept:\n"
-"according to the DESCRIPTION file it is"
+msgid "package %s has a license that you need to accept:"
 msgstr ""
-"패키지 %s는 DESCRIPTION 파일에 따르면, \n"
-"당신이 수용을 해야만 하는 라이센스를 가지고 있습니다"
+"패키지 %s는 당신이 수락해야만 하는 다음과 같은 종류의 라이센스를 가지고 있습"
+"니다:"
+
+msgid "according to the DESCRIPTION file it is"
+msgstr ""
+
+msgid "%s"
+msgstr "%s"
 
 msgid "license for package %s not accepted"
 msgstr "패키지 %s에 대해서 수락되지 않은 라이센스입니다"
@@ -745,6 +779,8 @@ msgstr "다음의 패키지를 부착합니다: %s"
 
 msgid "'verbose' and 'quietly' are both true; being verbose then .."
 msgstr ""
+"'verbose'와 'quitely' 모두 참으로 설정되어 있는데, verbose에 주어진 값을 이용"
+"합니다. "
 
 msgid "invalid package name"
 msgstr "유효하지 않은 패키지명입니다"
@@ -761,6 +797,9 @@ msgstr "%s는 유효하게 설치된 패키지가 아닙니다"
 msgid "%s not found on search path, using pos = 2"
 msgstr "%s를 탐색경로에서 찾을 수 없어 pos = 2 를 사용합니다"
 
+msgid "Package %s version %s cannot be unloaded"
+msgstr "패키지 %s 버전 %s를 로드 할 수 없습니다."
+
 msgid "package or namespace load failed for %s"
 msgstr ""
 
@@ -830,10 +869,14 @@ msgid ""
 "package %s found more than once,\n"
 "using the one found in %s"
 msgstr ""
+"패키지 %s가 한 곳 이상에서 발견되었습니다.\n"
+"다음의 위치에서 발견된 패키지를 사용합니다: %s"
 
 msgid ""
 "Further information is available in the following vignettes in directory %s:"
 msgstr ""
+"디렉토리 %s에 존재하는 다음과 같은 비그네트로부터 더 많은 내용을 찾을 수 있습"
+"니다:"
 
 msgid "Description:"
 msgstr "설명:"
@@ -850,17 +893,14 @@ msgstr "패키지 %s에 대한 문서"
 msgid "package %s required by %s could not be found"
 msgstr "%s에 의해 요구된 패키지 %s를 찾을 수 없습니다"
 
-msgid "package %s %s was found, but %s %s is required by %s"
-msgstr "패키지 %s %s를 찾았으나, %s %s는 %s에 의해서 요구되어 집니다"
+msgid "version %s of %s masked by %s in %s"
+msgstr ""
 
 msgid "package %s could not be loaded"
 msgstr "패키지 %s는 로드되어질 수 없습니다"
 
-msgid "package %s %s is loaded, but %s %s is required by %s"
-msgstr "패키지 %s %s가 로드되었으나 %s %s는 %s에 의하여 요구되어 집니다"
-
 msgid "empty (zero-byte) input file"
-msgstr ""
+msgstr "입력파일의 내용이 비어있습니다."
 
 msgid "input has been corrupted, with LF replaced by CR"
 msgstr ""
@@ -907,6 +947,15 @@ msgstr "유효하지 않은 'category' 인자입니다"
 msgid "must specify names of formal arguments for 'vectorize'"
 msgstr ""
 
+msgid "FUN"
+msgstr "FUN"
+
+msgid "may not have argument(s) named"
+msgstr "아마도 이름이 주어진 인자를 가지고 있지 않은 것 같습니다."
+
+msgid ","
+msgstr ","
+
 msgid "'arg' must be NULL or a character vector"
 msgstr "'arg'는 반드시 NULL 또는 문자형 벡터이어야 합니다"
 
@@ -951,6 +1000,8 @@ msgstr "'trim'은 반드시 길이가 1인 수치형이어야 합니다"
 
 msgid "trimmed means are not defined for complex data"
 msgstr ""
+"복소수형 데이터에 사용할 수 있는 절삭평균(trimmed means)는 정의되지 않았습니"
+"다."
 
 msgid "'by' must match numbers of columns"
 msgstr "'by'는 반드시 열의 개수와 일치해야 합니다"
@@ -960,10 +1011,18 @@ msgstr "by'는 반드시 열의 개수와 일치해야 합니다"
 
 msgid "'by' must specify one or more columns as numbers, names or logical"
 msgstr ""
+"'by'는 반드시 숫자, 이름, 또는 논리값을 이용하여 하나 이상의 열들을 지정해야 "
+"합니다."
+
+msgid "long vectors are not supported"
+msgstr ""
 
 msgid "'by.x' and 'by.y' specify different numbers of columns"
 msgstr "'by.x'와 'by.y'는 열의 개수를 다르게 지정해야 합니다"
 
+msgid "'incomparables' is supported only for merging on a single column"
+msgstr ""
+
 msgid "additional arguments ignored in message()"
 msgstr "message()내에서 무시된 추가적인 인자들입니다"
 
@@ -981,12 +1040,14 @@ msgid ""
 "namespace %s is not available and has been replaced\n"
 "by .GlobalEnv when processing object %s"
 msgstr ""
+"네임스페이스 %s를 사용할 수 없으며\n"
+"객체 %s를 프로세싱할 때 .GlobalEnv에 의하여 대체되었습니다."
 
 msgid "'%s' is not an exported object from 'namespace:%s'"
 msgstr "'%s'는 'namespace:%s'로부터 내보내어진 객체가 아닙니다"
 
 msgid "namespace is already attached"
-msgstr ""
+msgstr "네임스페이스가 이미 연결되어 있습니다."
 
 msgid "%s not found"
 msgstr "%s를 찾을 수 없습니다"
@@ -1089,6 +1150,9 @@ msgstr ""
 msgid "found methods to import for function %s but not the generic itself"
 msgstr ""
 
+msgid "replacing previous import %s by %s when loading %s"
+msgstr ""
+
 msgid "No methods found in \"%s\" for requests: %s"
 msgstr ""
 
@@ -1096,8 +1160,8 @@ msgid "requested methods not found in environment/package %s: %s"
 msgstr "요청된 메소드를 environment/패키지 %s에서 찾을 수 없습니다: %s"
 
 msgid ""
-"No generic function found corresponding to requested imported methods for "
-"\"%s\" from package \"%s\" (malformed exports?)"
+"No generic function %s found corresponding to requested imported methods "
+"from package %s when loading %s (malformed exports?)"
 msgstr ""
 
 msgid "cannot add to exports of a sealed namespace"
@@ -1149,7 +1213,7 @@ msgid "no arguments"
 msgstr "인자들이 없습니다"
 
 msgid "an argument will be fractionally recycled"
-msgstr ""
+msgstr "인자가 부분적으로 재활용될 것입니다."
 
 msgid "invalid ncol(x)"
 msgstr "유효하지 않은 ncol(x)입니다"
@@ -1158,7 +1222,7 @@ msgid "too large a matrix for LINPACK"
 msgstr "LINPACK에 너무 큰 행렬입니다"
 
 msgid "first argument must be a QR decomposition"
-msgstr ""
+msgstr "첫번째 인자는 반드시 QR 분해이어야 합니다. "
 
 msgid "invalid nrow(qr$qr)"
 msgstr "유효하지 않은 nrow(qr$qr)입니다"
@@ -1227,7 +1291,7 @@ msgid "either specify 'nmax' or 'n', but not both."
 msgstr "'nmax' 또는 'n' 중 하나는 지정되어야 하지만 모두는 아닙니다"
 
 msgid "'from' cannot be NA, NaN or infinite"
-msgstr ""
+msgstr "'from'은 NA, NaN 또는 infinite이어서는 안됩니다."
 
 msgid "argument 'length.out' must be of length 1"
 msgstr "인자 'length.out'은 반드시 길이가 1이어야 합니다"
@@ -1236,7 +1300,7 @@ msgid "first element used of 'length.out' argument"
 msgstr "'length.out' 인자에 사용된 첫번째 요소입니다"
 
 msgid "'to' cannot be NA, NaN or infinite"
-msgstr ""
+msgstr "'to'는 NA, NaN 또는 infinite이어서는 안됩니다."
 
 msgid "invalid (to - from)/by in seq(.)"
 msgstr "seq(.)내에 유효하지 않은 (to - from)/by 입니다"
@@ -1253,6 +1317,9 @@ msgstr "길이는 반드시 음의 값을 가지는 숫자가 아니어야 합
 msgid "too many arguments"
 msgstr "너무 많은 인자들이 있습니다"
 
+msgid "invalid 'compress' argument:"
+msgstr "올바른 'compress' 인자가 아닙니다:"
+
 msgid "'compress' is ignored unless 'file' is a file name"
 msgstr "만약 'file'이 파일명이 아니라면 'compress'는 무시되어 집니다"
 
@@ -1287,15 +1354,20 @@ msgid ""
 "'decreasing' must be a length-1 logical vector.\n"
 "Did you intend to set 'partial'?"
 msgstr ""
+"'decreasing'은 반드시 길이가 1인 논리형 벡터이어야 합니다.\n"
+"의도적으로 'partial'로 설정하고자 하나요?"
+
+msgid "'partial' sorting not supported by radix method"
+msgstr "radix 방법에 의하여 지원되는 'partial' 정렬이 아닙니다."
 
 msgid "'index.return' only for non-factors"
-msgstr ""
+msgstr "'index.return'은 오로지 요인이 아닌 경우에만 사용할 수 있습니다."
 
 msgid "'x' must be atomic"
 msgstr "'x'는 반드시 atomic이어야 합니다"
 
 msgid "'index.return' only for 'na.last = NA'"
-msgstr ""
+msgstr "'index.return'은 오로지 'na.last = NA'인 경우에만 사용할 수 있습니다. "
 
 msgid "unsupported options for partial sorting"
 msgstr "부분정렬에 지원되지 않는 옵션입니다"
@@ -1313,9 +1385,7 @@ msgstr ""
 
 msgid "method = \"quick\" is only for numeric 'x'"
 msgstr ""
-
-msgid "method = \"radix\" is only for integer 'x'"
-msgstr ""
+"method = \"quick\" 는 오로지 수치형 'x'인 경우에만 사용할 수 있습니다. "
 
 msgid "'local' must be TRUE, FALSE or an environment"
 msgstr "'local'은 반드시 TRUE, FALSE 또는 environment 이어야 합니다"
@@ -1335,10 +1405,10 @@ msgid "encoding = \"%s\" chosen"
 msgstr "encoding = \"%s\"로 선택되었습니다"
 
 msgid "'chdir = TRUE' makes no sense for a URL"
-msgstr ""
+msgstr "'chdir = TRUE'는 URL인 경우에는 사용할 수 없습니다. "
 
 msgid "cannot 'chdir' as current directory is unknown"
-msgstr ""
+msgstr "현재의 디렉토리를 알 수 없으므로 'chdir'를 사용할 수 없습니다."
 
 msgid "'chdir = TRUE' makes no sense for a connection"
 msgstr ""
@@ -1349,6 +1419,9 @@ msgstr "'%s'는 존재하는 파일이 아닙니다"
 msgid "Timestamp of %s has changed"
 msgstr "%s의 타임스탬프가 변경되었습니다"
 
+msgid "'x' and 'to' must refer to same file"
+msgstr "'x'와 'to'는 반드시 같은 파일을 참조해야 합니다."
+
 msgid "additional arguments ignored in stop()"
 msgstr "stop()에서 무시된 추가적인 인자들입니다"
 
@@ -1367,9 +1440,6 @@ msgstr "'indent'와 'width'의 값이 잘못되었습니다"
 msgid "probably wrong encoding in names(.) of column"
 msgstr ""
 
-msgid ","
-msgstr ","
-
 msgid "STATS is longer than the extent of 'dim(x)[MARGIN]'"
 msgstr ""
 
@@ -1380,13 +1450,13 @@ msgid "length(STATS) or dim(STATS) do not match dim(x)[MARGIN]"
 msgstr "length(STATS) 또는 dim(STATS)가 dim(x)[MARGIN]와 일치하지 않습니다"
 
 msgid "nothing to tabulate"
-msgstr ""
+msgstr "테이블로 보여줘야 할 것이 아무것도 없습니다. "
 
 msgid "all arguments must have the same length"
 msgstr "모든 인자들은 반드시 같은 길이를 가져야 합니다"
 
 msgid "attempt to make a table with >= 2^31 elements"
-msgstr ""
+msgstr "2^31개가 넘는 요소들로 구성된 테이블을 생성하고자 하였습니다."
 
 msgid "'object' must inherit from class %s"
 msgstr "'object'는 반드시 클래스 %s로부터 생성되어야 합니다"
@@ -1412,6 +1482,9 @@ msgstr "'INDEX'의 길이가 0입니다"
 msgid "arguments must have same length"
 msgstr "인자들은 반드시 같은 길이를 가져야 합니다"
 
+msgid "total number of levels >= 2^31"
+msgstr "수준의 총 개수가 2^31 이상입니다."
+
 msgid "handler must be a function"
 msgstr "핸들러는 반드시 함수이어야 합니다"
 
@@ -1442,9 +1515,6 @@ msgstr ""
 msgid "invalid version specification %s"
 msgstr "유효하지 않은 버전지정 %s입니다"
 
-msgid "wrong argument"
-msgstr "잘못된 인자입니다"
-
 msgid "invalid 'value'"
 msgstr "유효하지 않은 'value'입니다"
 
@@ -1544,11 +1614,21 @@ msgid_plural "deparse options %s are not recognized"
 msgstr[0] ""
 
 msgid ""
-"The following object is masked %s %s:\n"
+"The following object is masked _by_ %s:\n"
 "\n"
 "%s\n"
 msgid_plural ""
-"The following objects are masked %s %s:\n"
+"The following objects are masked _by_ %s:\n"
+"\n"
+"%s\n"
+msgstr[0] ""
+
+msgid ""
+"The following object is masked from %s:\n"
+"\n"
+"%s\n"
+msgid_plural ""
+"The following objects are masked from %s:\n"
 "\n"
 "%s\n"
 msgstr[0] ""
@@ -1594,6 +1674,10 @@ msgid "provided %d variable to replace %d variables"
 msgid_plural "provided %d variables to replace %d variables"
 msgstr[0] ""
 
+msgid "data frame with 0 columns and %d row"
+msgid_plural "data frame with 0 columns and %d rows"
+msgstr[0] "열의 개수가 0이고 행의 개수가 %d인 데이터 프레임입니다."
+
 msgid "library %s contains no packages"
 msgid_plural "libraries %s contain no packages"
 msgstr[0] "라이브러리 %s는 아무런 패키지도 포함하지 않습니다"
@@ -1604,7 +1688,7 @@ msgstr[0] "패키지 %s는 로드되지 않았습니다"
 
 msgid "there is no package called"
 msgid_plural "there are no packages called"
-msgstr[0] "호출된 패키지들이 없습니다"
+msgstr[0] "호출된 패키지(들)가 없습니다"
 
 msgid "object %s not found"
 msgid_plural "objects %s not found"
@@ -1638,10 +1722,6 @@ msgid "S3 method %s was declared in NAMESPACE but not found"
 msgid_plural "S3 methods %s were declared in NAMESPACE but not found"
 msgstr[0] "S3 메소드 %s는 NAMESPACE 내에 선언되었으나 찾을 수 없습니다"
 
-msgid "extra argument %s will be disregarded"
-msgid_plural "extra arguments %s will be disregarded"
-msgstr[0] "추가적인 인자 %s는 고려되지 않을 것입니다"
-
 msgid "%s is not TRUE"
 msgid_plural "%s are not all TRUE"
 msgstr[0] "%s는 TRUE가 아닙니다"
@@ -1650,6 +1730,44 @@ msgid "Warning message:\n"
 msgid_plural "Warning messages:\n"
 msgstr[0] "경고 메시지:\n"
 
+msgid ""
+"In %s :\n"
+" extra argument %s will be disregarded"
+msgid_plural ""
+"In %s :\n"
+" extra arguments %s will be disregarded"
+msgstr[0] ""
+
+#~ msgid "'vec' contains NAs"
+#~ msgstr "'vec'는 NA 값들을 포함합니다"
+
+#~ msgid ""
+#~ "package %s has a license that you need to accept:\n"
+#~ "according to the DESCRIPTION file it is"
+#~ msgstr ""
+#~ "패키지 %s는 DESCRIPTION 파일에 따르면, \n"
+#~ "당신이 수용을 해야만 하는 라이센스를 가지고 있습니다"
+
+#~ msgid "\"hexNumeric\"and \"digits17\" are mutually exclusive"
+#~ msgstr ""
+#~ "\"hexNumeric\"와 \"digits17\"는 상호배타적(mutually exclusive)입니다."
+
+#~ msgid "extra argument %s will be disregarded"
+#~ msgid_plural "extra arguments %s will be disregarded"
+#~ msgstr[0] "추가적인 인자 %s는 고려되지 않을 것입니다"
+
+#~ msgid "cannot be unloaded."
+#~ msgstr "%s 네임스페이스는 언로드 될 수 없습니다:"
+
+#~ msgid "package %s %s was found, but %s %s is required by %s"
+#~ msgstr "패키지 %s %s를 찾았으나, %s %s는 %s에 의해서 요구되어 집니다"
+
+#~ msgid "package %s %s is loaded, but %s %s is required by %s"
+#~ msgstr "패키지 %s %s가 로드되었으나 %s %s는 %s에 의하여 요구되어 집니다"
+
+#~ msgid "wrong argument"
+#~ msgstr "잘못된 인자입니다"
+
 #~ msgid "'nu' must be 0, nrow(x) or ncol(x)"
 #~ msgstr "'nu'는 반드시 0, nrow(x) 또는 ncol(x)이어야 합니다. "
 
diff --git a/src/library/base/po/R-nn.po b/src/library/base/po/R-nn.po
index d97ae30..69bc65d 100644
--- a/src/library/base/po/R-nn.po
+++ b/src/library/base/po/R-nn.po
@@ -3,7 +3,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: R 2.15.1\n"
 "Report-Msgid-Bugs-To: bugs.r-project.org\n"
-"POT-Creation-Date: 2014-02-13 14:10\n"
+"POT-Creation-Date: 2016-04-01 09:50\n"
 "PO-Revision-Date: 2012-09-28 22:18+0200\n"
 "Last-Translator: Karl Ove Hufthammer <karl at huftis.org>\n"
 "Language-Team: Norwegian Nynorsk <i18n-nn at lister.ping.uio.no>\n"
@@ -44,6 +44,9 @@ msgstr "uendelege eller manglande verdiar i «x»"
 msgid "a dimension is zero"
 msgstr ""
 
+msgid "\"hexNumeric\" and \"digits17\" are mutually exclusive"
+msgstr ""
+
 msgid "second argument must be a list"
 msgstr "det andre argumentet må vera ei liste"
 
@@ -227,6 +230,11 @@ msgstr "ugyldig «dimnames» oppgjeve for dataramme"
 msgid "cannot coerce class \"%s\" to a data.frame"
 msgstr "kan ikkje gjera klassen «%s» om til ei dataramme"
 
+msgid ""
+"'row.names' is not a character vector of length %d -- omitting it. Will be "
+"an error!"
+msgstr ""
+
 msgid "options(\"stringsAsFactors\") not set to TRUE or FALSE"
 msgstr "options(\"stringsAsFactors\") ikkje sett til TRUE eller FALSE"
 
@@ -315,7 +323,7 @@ msgid "only a single element should be replaced"
 msgstr "berre eit enkeltelement skal erstattast"
 
 #, fuzzy
-msgid "Name partially matched in data frame"
+msgid "Partial match of '%s' to '%s' in data frame"
 msgstr "ikkje numerisk variabel i dataramme:"
 
 msgid "names do not match previous names"
@@ -327,16 +335,14 @@ msgstr "talet på argumentkolonnar er ikkje like"
 msgid "invalid list argument: all variables should have the same length"
 msgstr "ugyldig listeargument: alle variablar må vera like lange"
 
-msgid "data frame with 0 columns and %d rows"
-msgstr "dataramme med 0 kolonnar og %d rader"
-
 msgid "<0 rows> (or 0-length row.names)"
 msgstr "<0 rader> (eller row.names av lengd null)"
 
 msgid "non-numeric variable in data frame:"
 msgstr "ikkje numerisk variabel i dataramme:"
 
-msgid "only defined for equally-sized data frames"
+#, fuzzy
+msgid "%s only defined for equally-sized data frames"
 msgstr "berre definert for datarammer av lik storleik"
 
 msgid "list of length %d not meaningful"
@@ -520,6 +526,15 @@ msgstr ""
 "Ugyldige linjer begynner med:\n"
 "%s"
 
+msgid "failed to load the methods package for debugging by signature"
+msgstr ""
+
+msgid "failed to load methods package for undebugging by signature"
+msgstr ""
+
+msgid "failed to load methods package for handling signature"
+msgstr ""
+
 msgid "'x' must be a square matrix"
 msgstr "«x» må vera ei kvadratisk matrise"
 
@@ -585,7 +600,8 @@ msgstr "ugyldige merkelappar – lengd %d må vera 1 eller %d"
 msgid "number of levels differs"
 msgstr "talet på nivå er forskjellig"
 
-msgid "not meaningful for factors"
+#, fuzzy
+msgid "%s not meaningful for factors"
 msgstr "gjev ikkje meining for faktorar"
 
 msgid "level sets of factors are different"
@@ -644,13 +660,15 @@ msgstr "ugyldig «path»-argument"
 msgid "invalid 'time' argument"
 msgstr "ugyldig «time»-argument"
 
-msgid "'vec' contains NAs"
-msgstr "«vec» inneheld NA-verdiar"
-
-msgid "'vec' must be sorted non-decreasingly"
+#, fuzzy
+msgid "'vec' must be sorted non-decreasingly and not contain NAs"
 msgstr "«vec» må vera sortert aukande rekkjefølgja"
 
 #, fuzzy
+msgid "'fun' is not a function"
+msgstr "handsamaren må vera ein funksjon"
+
+#, fuzzy
 msgid "using the first element of 'value' of type \"expression\""
 msgstr "brukar første element av «value» i uttrykket"
 
@@ -682,6 +700,13 @@ msgstr "«zero.print» har lengd > 1"
 msgid "'zero.print' must be character, logical or NULL"
 msgstr "«zero.print» må vera ein teiknstreng, ein boolsk verdi eller NULL"
 
+msgid "'big.mark' and 'decimal.mark' are both '%s', which could be confusing"
+msgstr ""
+
+#, fuzzy
+msgid "'input.d.mark' has no characters"
+msgstr "«input» og «target» må vera teiknvektorar"
+
 msgid "'subset' must be logical"
 msgstr "«subset» må vera ein logisk vektor"
 
@@ -767,13 +792,18 @@ msgid "package %s has a license that you need to accept after viewing"
 msgstr "Pakken %s har lisensvilkår som du må godta etter at du har lese"
 
 #, fuzzy
-msgid ""
-"package %s has a license that you need to accept:\n"
-"according to the DESCRIPTION file it is"
+msgid "package %s has a license that you need to accept:"
+msgstr "Pakken %s har lisensvilkår som du må godta etter at du har lese"
+
+#, fuzzy
+msgid "according to the DESCRIPTION file it is"
 msgstr ""
 "Pakken %s har lisensvilkår som du må godta:\n"
 "Ifølgje DESCRIPTION-fila er vilkåra"
 
+msgid "%s"
+msgstr ""
+
 #, fuzzy
 msgid "license for package %s not accepted"
 msgstr "Lisensvilkåra for pakken %s ikkje godtekne"
@@ -800,6 +830,10 @@ msgid "%s not found on search path, using pos = 2"
 msgstr "fann ikkje «%s» i søkjestigen – brukar «pos = 2»"
 
 #, fuzzy
+msgid "Package %s version %s cannot be unloaded"
+msgstr "pakken «%s» er ikkje lasta"
+
+#, fuzzy
 msgid "package or namespace load failed for %s"
 msgstr "feil ved lasting av pakke/namnerom for «%s»"
 
@@ -892,15 +926,12 @@ msgstr "Dokumentasjon for pakken «%s»"
 msgid "package %s required by %s could not be found"
 msgstr "fann ikkje pakken «%s» som «%s» treng"
 
-msgid "package %s %s was found, but %s %s is required by %s"
-msgstr "fann pakken «%s %s», men «%s %s» trengst av «%s»"
+msgid "version %s of %s masked by %s in %s"
+msgstr ""
 
 msgid "package %s could not be loaded"
 msgstr "klarte ikkje lasta pakken «%s»"
 
-msgid "package %s %s is loaded, but %s %s is required by %s"
-msgstr "pakken «%s %s» er lasta, men «%s %s» trengst av «%s»"
-
 msgid "empty (zero-byte) input file"
 msgstr "tom innfil (0 byte)"
 
@@ -952,6 +983,15 @@ msgstr "ugyldig «category»-argument"
 msgid "must specify names of formal arguments for 'vectorize'"
 msgstr "må oppgje namn på formelle argument til «vectorize»"
 
+msgid "FUN"
+msgstr ""
+
+msgid "may not have argument(s) named"
+msgstr ""
+
+msgid ","
+msgstr ","
+
 msgid "'arg' must be NULL or a character vector"
 msgstr "«arg» må vera NULL eller ein teiknvektor"
 
@@ -1009,9 +1049,15 @@ msgstr "«by» må vera i samsvar med talet på kolonnar"
 msgid "'by' must specify one or more columns as numbers, names or logical"
 msgstr "«by» må definera kolonnar som tal, namn eller boolske verdiar"
 
+msgid "long vectors are not supported"
+msgstr ""
+
 msgid "'by.x' and 'by.y' specify different numbers of columns"
 msgstr "«by.x» og «by.y» må definera forskjellige tal på kolonnar"
 
+msgid "'incomparables' is supported only for merging on a single column"
+msgstr ""
+
 msgid "additional arguments ignored in message()"
 msgstr "ignorerte ekstraargument i message()"
 
@@ -1142,15 +1188,20 @@ msgstr ""
 "fann metodar for import for funksjonen «%s», men ikkje for den generiske "
 "funksjonen sjølv"
 
+#, fuzzy
+msgid "replacing previous import %s by %s when loading %s"
+msgstr "byt ut førre import «%s» ved lasting av «%s»"
+
 msgid "No methods found in \"%s\" for requests: %s"
 msgstr "Fann ingen metodar i «%s» for førespurnader: %s"
 
 msgid "requested methods not found in environment/package %s: %s"
 msgstr "fann ikkje førespurde metodar i omgjevnaden/pakken «%s»: %s"
 
+#, fuzzy
 msgid ""
-"No generic function found corresponding to requested imported methods for "
-"\"%s\" from package \"%s\" (malformed exports?)"
+"No generic function %s found corresponding to requested imported methods "
+"from package %s when loading %s (malformed exports?)"
 msgstr ""
 "Fann ingen generisk funksjon som svarar til førespurde importerte metodar "
 "for «%s» frå pakken «%s» (feilformaterte eksportar?)"
@@ -1315,6 +1366,10 @@ msgstr "lengda må vera eit ikkje-negativt tal"
 msgid "too many arguments"
 msgstr "for mange argument"
 
+#, fuzzy
+msgid "invalid 'compress' argument:"
+msgstr "ugyldig «name»-argument"
+
 msgid "'compress' is ignored unless 'file' is a file name"
 msgstr "«compress» vert ignorert med mindre «file» er eit filnamn"
 
@@ -1352,6 +1407,9 @@ msgstr ""
 "«decreasing» må vera ein boolske vektor med eitt element.\n"
 "Meinte du å bruka «partial»-argumentet?"
 
+msgid "'partial' sorting not supported by radix method"
+msgstr ""
+
 msgid "'index.return' only for non-factors"
 msgstr "«index.return» berre for ikkje-faktorar"
 
@@ -1381,10 +1439,6 @@ msgstr ""
 msgid "method = \"quick\" is only for numeric 'x'"
 msgstr "«method=\"quick\"» er berre for numerisk «x»"
 
-#, fuzzy
-msgid "method = \"radix\" is only for integer 'x'"
-msgstr "«method=\"radix\"» er berre for numerisk «x»"
-
 msgid "'local' must be TRUE, FALSE or an environment"
 msgstr "«local» må vera TRUE, FALSE eller ein omgjevnad"
 
@@ -1416,6 +1470,10 @@ msgstr "«%s» er ikkje ei fil som finst"
 msgid "Timestamp of %s has changed"
 msgstr "Endringstidspunkt til «"
 
+#, fuzzy
+msgid "'x' and 'to' must refer to same file"
+msgstr "«x» og «y» må ha same lengd"
+
 msgid "additional arguments ignored in stop()"
 msgstr "fleire argument ignorerte i stop()"
 
@@ -1434,9 +1492,6 @@ msgstr "ugyldige verdiar til «indent» og «width»"
 msgid "probably wrong encoding in names(.) of column"
 msgstr "truleg feil teiknkoding for names(.) til kolonne"
 
-msgid ","
-msgstr ","
-
 msgid "STATS is longer than the extent of 'dim(x)[MARGIN]'"
 msgstr "STATS er lengre enn storleiken til «dim(x)[MARGIN]»"
 
@@ -1483,6 +1538,10 @@ msgstr "«INDEX» har lengd 0"
 msgid "arguments must have same length"
 msgstr "argumenta må vera like lange"
 
+#, fuzzy
+msgid "total number of levels >= 2^31"
+msgstr "talet på nivå er forskjellig"
+
 msgid "handler must be a function"
 msgstr "handsamaren må vera ein funksjon"
 
@@ -1516,9 +1575,6 @@ msgstr "Tilbakesporing finst ikkje"
 msgid "invalid version specification %s"
 msgstr "ugyldig versjonsspesifikasjon"
 
-msgid "wrong argument"
-msgstr "feil argument"
-
 #, fuzzy
 msgid "invalid 'value'"
 msgstr "ugyldig verdi"
@@ -1621,11 +1677,22 @@ msgstr[0] "kjenner ikkje deparse-valet «%s»"
 msgstr[1] "kjenner ikkje deparse-vala «%s»"
 
 msgid ""
-"The following object is masked %s %s:\n"
+"The following object is masked _by_ %s:\n"
 "\n"
 "%s\n"
 msgid_plural ""
-"The following objects are masked %s %s:\n"
+"The following objects are masked _by_ %s:\n"
+"\n"
+"%s\n"
+msgstr[0] ""
+msgstr[1] ""
+
+msgid ""
+"The following object is masked from %s:\n"
+"\n"
+"%s\n"
+msgid_plural ""
+"The following objects are masked from %s:\n"
 "\n"
 "%s\n"
 msgstr[0] ""
@@ -1694,6 +1761,12 @@ msgid_plural "provided %d variables to replace %d variables"
 msgstr[0] "oppgav %d variablar for å erstatta %d variablar"
 msgstr[1] "oppgav %d variablar for å erstatta %d variablar"
 
+#, fuzzy
+msgid "data frame with 0 columns and %d row"
+msgid_plural "data frame with 0 columns and %d rows"
+msgstr[0] "dataramme med 0 kolonnar og %d rader"
+msgstr[1] "dataramme med 0 kolonnar og %d rader"
+
 msgid "library %s contains no packages"
 msgid_plural "libraries %s contain no packages"
 msgstr[0] "biblioteket «%s» inneheld ikkje nokon pakkar"
@@ -1754,12 +1827,6 @@ msgstr[0] "S3-metoden «%s» er deklarert i NAMESPACE, men vart ikkje funnen"
 msgstr[1] "S3-metodane «%s» er deklarerte i NAMESPACE, men vart ikkje funnen"
 
 #, fuzzy
-msgid "extra argument %s will be disregarded"
-msgid_plural "extra arguments %s will be disregarded"
-msgstr[0] "ekstraargument(a) «%s» vert ikkje brukt(e)"
-msgstr[1] "ekstraargument(a) «%s» vert ikkje brukt(e)"
-
-#, fuzzy
 msgid "%s is not TRUE"
 msgid_plural "%s are not all TRUE"
 msgstr[0] "T brukt i staden for TRUE"
@@ -1770,6 +1837,40 @@ msgid_plural "Warning messages:\n"
 msgstr[0] "Åtvaring:\n"
 msgstr[1] "Åtvaringar:\n"
 
+#, fuzzy
+msgid ""
+"In %s :\n"
+" extra argument %s will be disregarded"
+msgid_plural ""
+"In %s :\n"
+" extra arguments %s will be disregarded"
+msgstr[0] "ekstraargument(a) «%s» vert ikkje brukt(e)"
+msgstr[1] "ekstraargument(a) «%s» vert ikkje brukt(e)"
+
+#~ msgid "'vec' contains NAs"
+#~ msgstr "«vec» inneheld NA-verdiar"
+
+#, fuzzy
+#~ msgid "method = \"radix\" is only for integer 'x'"
+#~ msgstr "«method=\"radix\"» er berre for numerisk «x»"
+
+#, fuzzy
+#~ msgid "re-exports %s not exported by %s"
+#~ msgstr "objektet «%s» er ikkje eksportert av «namespace:%s»"
+
+#, fuzzy
+#~ msgid "cannot be unloaded."
+#~ msgstr "namnerom kan ikkje lastast ut:"
+
+#~ msgid "package %s %s was found, but %s %s is required by %s"
+#~ msgstr "fann pakken «%s %s», men «%s %s» trengst av «%s»"
+
+#~ msgid "package %s %s is loaded, but %s %s is required by %s"
+#~ msgstr "pakken «%s %s» er lasta, men «%s %s» trengst av «%s»"
+
+#~ msgid "wrong argument"
+#~ msgstr "feil argument"
+
 #~ msgid "'nu' must be 0, nrow(x) or ncol(x)"
 #~ msgstr "«nu» må vera 0, nrow(x) eller ncol(x)"
 
diff --git a/src/library/base/po/R-pl.po b/src/library/base/po/R-pl.po
index 42deca7..25ed627 100644
--- a/src/library/base/po/R-pl.po
+++ b/src/library/base/po/R-pl.po
@@ -1,8 +1,8 @@
 msgid ""
 msgstr ""
-"Project-Id-Version: R 3.1.0\n"
+"Project-Id-Version: R 3.4.0\n"
 "Report-Msgid-Bugs-To: bugs.r-project.org\n"
-"POT-Creation-Date: 2014-03-16 19:28\n"
+"POT-Creation-Date: 2016-04-04 19:01\n"
 "PO-Revision-Date: \n"
 "Last-Translator: Łukasz Daniel <lukasz.daniel at gmail.com>\n"
 "Language-Team: Łukasz Daniel <lukasz.daniel at gmail.com>\n"
@@ -13,4592 +13,3097 @@ msgstr ""
 "na-Revision-Date: 2012-05-29 07:55+0100\n"
 "Plural-Forms: nplurals=3; plural=(n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 "
 "|| n%100>=20) ? 1 : 2);\n"
-"X-Poedit-SourceCharset: iso-8859-1\n"
-"X-Generator: Poedit 1.5.4\n"
+"X-Poedit-SourceCharset: UTF-8\n"
+"X-Generator: Poedit 1.8.7.1\n"
 
-# src/library/base/R/Defunct.R: 21
-# gettextf("'%s' is defunct.\n",
-# 			as.character(sys.call(sys.parent())[[1L]]))
-msgid "'%s' is defunct."
-msgstr "Funkcja '%s' została zlikwidowana."
+#. R/New-Internal.R: stop("\"hexNumeric\" and \"digits17\" are mutually exclusive")
+#: R/New-Internal.R:0
+msgid "\"hexNumeric\" and \"digits17\" are mutually exclusive"
+msgstr "argumenty \"hexNumeric\" oraz \"digits17\" wzajemnie się wykluczają"
 
-# src/library/base/R/Defunct.R: 24
-# gettextf("Use '%s' instead.\n", new)
-# src/library/base/R/Deprecated.R: 27
-# gettextf("Use '%s' instead.\n", new)
-msgid "Use '%s' instead."
-msgstr "Użyj w zamian '%s'."
+#. R/grep.R: gettextf("%s and %s must have the same length", sQuote("x"),     sQuote("m"))
+#: R/grep.R:0
+msgid "%s and %s must have the same length"
+msgstr "argumenty %s oraz %s muszą mieć tę samą długość"
 
-# src/library/base/R/Defunct.R: 27
-# gettextf("See help(\"Defunct\") and help(\"%s-defunct\").",
-# 			  package)
-msgid "See help(\"Defunct\") and help(\"%s-defunct\")."
-msgstr "Zobacz help(\"Defunct\") oraz help(\"%s-defunct\")."
+#. R/attach.R: gettextf("%s converted to character string", sQuote(name))
+#: R/attach.R:0
+msgid "%s converted to character string"
+msgstr "wartość %s została zamieniona na tekst"
 
-# src/library/base/R/Defunct.R: 29
-# gettext("See help(\"Defunct\")")
-msgid "See help(\"Defunct\")"
-msgstr "Zobacz help(\"Defunct\")"
+#. R/attach.R: gettextf("%s failed in %s() for '%s', details:\n  call: %s\n  error: %s",     ".onDetach", "detach", pkgname, deparse(conditionCall(res))[1L],     conditionMessage(res))
+#. R/attach.R: gettextf("%s failed in %s() for '%s', details:\n  call: %s\n  error: %s",     ".Last.lib", "detach", pkgname, deparse(conditionCall(res))[1L],     conditionMessage(res))
+#. R/namespace.R: gettextf("%s failed in %s() for '%s', details:\n  call: %s\n  error: %s",     hookname, "attachNamespace", nsname, deparse(conditionCall(res))[1L],     conditionMessage(res))
+#. R/namespace.R: gettextf("%s failed in %s() for '%s', details:\n  call: %s\n  error: %s",     hookname, "loadNamespace", pkgname, deparse(conditionCall(res))[1L],     conditionMessage(res))
+#. R/namespace.R: gettextf("%s failed in %s() for '%s', details:\n  call: %s\n  error: %s",     hookname, "unloadNamespace", nsname, deparse(conditionCall(res))[1L],     conditionMessage(res))
+#: R/attach.R:0 R/namespace.R:0
+msgid ""
+"%s failed in %s() for '%s', details:\n"
+"  call: %s\n"
+"  error: %s"
+msgstr ""
+"%s nie powiodło się w funkcji '%s()' dla pakietu '%s', szczegóły:\n"
+"  wywołanie: %s\n"
+"  błąd:  %s"
 
-# src/library/base/R/Deprecated.R: 25
-# gettextf("'%s' is deprecated.\n", old)
-msgid "'%s' is deprecated."
-msgstr "Funkcja '%s' jest przestarzała."
+#. R/library.R: gettextf("%s is not a valid installed package", sQuote(package))
+#: R/library.R:0
+msgid "%s is not a valid installed package"
+msgstr "%s nie jest poprawnie zainstalowanym pakietem"
 
-# src/library/base/R/Deprecated.R: 30
-# gettextf("See help(\"Deprecated\") and help(\"%s-deprecated\").",
-# 		   package)
-msgid "See help(\"Deprecated\") and help(\"%s-deprecated\")."
-msgstr "Zobacz help(\"Deprecated\") oraz help(\"%s-deprecated\")."
+#. R/mapply.R: gettextf("%s may not have argument(s) named %s", sQuote("FUN"),     paste(sQuote(arg.names[collisions]), collapse = ", "))
+#: R/mapply.R:0
+msgid "%s may not have argument(s) named %s"
+msgstr "%s nie może mieć argumentów o nazwach %s"
 
-# src/library/base/R/Deprecated.R: 32
-# gettext("See help(\"Deprecated\")")
-msgid "See help(\"Deprecated\")"
-msgstr "Zobacz help(\"Deprecated\")"
+#. R/attach.R: gettextf("%s namespace cannot be unloaded:\n  ", sQuote(pkgname))
+#: R/attach.R:0
+msgid "%s namespace cannot be unloaded:"
+msgstr "przestrzeń nazw %s pakietu nie może zostać zwolniona:"
 
-# src/library/base/R/LAPACK.R: 22
-# stop("argument to 'La.svd' must be numeric or complex")
-msgid "argument to 'La.svd' must be numeric or complex"
-msgstr ""
-"argument przekazywany do 'La.svd()' musi być wartością logiczną, liczbą lub "
-"liczbą zespoloną"
+#. R/dates.R: gettextf("%s not defined for \"Date\" objects", .Generic)
+#. R/dates.R: gettextf("%s not defined for \"Date\" objects", .Generic)
+#. R/dates.R: gettextf("%s not defined for \"Date\" objects", .Generic)
+#: R/dates.R:0
+msgid "%s not defined for \"Date\" objects"
+msgstr "'%s' nie jest określone dla obiektów klasy \"Date\""
 
-# src/library/base/R/eigen.R: 46
-# stop("infinite or missing values in 'x'")
-# src/library/base/R/LAPACK.R: 23
-# stop("infinite or missing values in 'x'")
-# src/library/base/R/svd.R: 22
-# stop("infinite or missing values in 'x'")
-msgid "infinite or missing values in 'x'"
-msgstr "wartość nieskończona lub brakuje wartości w 'x'"
+#. R/version.R: gettextf("%s not defined for \"numeric_version\" objects", .Generic)
+#: R/version.R:0
+msgid "%s not defined for \"numeric_version\" objects"
+msgstr "'%s' nie jest określone dla obiektów klasy \"numeric_version\""
 
-# src/library/base/R/LAPACK.R: 27
-# stop("a dimension is zero")
-# src/library/base/R/svd.R: 26
-# stop("a dimension is zero")
-msgid "a dimension is zero"
-msgstr "wymiar wynosi zero"
+#. R/namespace.R: gettextf("%s not found", sQuote(x))
+#: R/namespace.R:0
+msgid "%s not found"
+msgstr "wartość %s nie została znaleziona"
 
-# src/library/base/R/New-Internal.R: 130
-# stop("second argument must be a list")
-msgid "second argument must be a list"
-msgstr "drugi argument musi być listą"
+#. R/library.R: gettextf("%s not found on search path, using pos = 2", sQuote(pos))
+#: R/library.R:0
+msgid "%s not found on search path, using pos = 2"
+msgstr "%s nie zostało znalezione w ścieżce wyszukiwania, używanie 'pos = 2'"
 
-# src/library/base/R/New-Internal.R: 253
-# stop("'iconvlist' is not available on this system")
-# src/library/base/R/New-Internal.R: 255
-# stop("'iconvlist' is not available on this system")
-msgid "'iconvlist' is not available on this system"
-msgstr "'iconvlist' nie jest dostępne w tym systemie"
+#. R/factor.R: gettextf("%s not meaningful for factors", sQuote(.Generic))
+#. R/factor.R: gettextf("%s not meaningful for factors", sQuote(.Generic))
+#. R/factor.R: gettextf("%s not meaningful for factors", sQuote(.Generic))
+#: R/factor.R:0
+msgid "%s not meaningful for factors"
+msgstr "%s nie ma sensu dla czynników"
 
-# src/library/base/R/RNG.R: 35
-# stop("'kind' must be a character string of length 1 (RNG to be used).")
-# src/library/base/R/RNG.R: 69
-# stop("'kind' must be a character string of length 1 (RNG to be used).")
-msgid "'kind' must be a character string of length 1 (RNG to be used)."
-msgstr ""
-"'kind' musi być łańcuchem tekstowym o długości 1 (zostanie użyty 'RNG')."
+#. R/dataframe.R: gettextf("%s only defined for equally-sized data frames", sQuote(.Generic))
+#: R/dataframe.R:0
+msgid "%s only defined for equally-sized data frames"
+msgstr "%s jest zdefiniowane jedynie dla ramek danych o równych rozmiarach"
+
+#. R/library.R: gettextf("%sPackages in library %s:\n", sep, sQuote(lib))
+#: R/library.R:0
+msgid "%sPackages in library %s:"
+msgstr "%sPakiety w bibliotece %s:"
+
+#. R/windows/system.R: gettextf("'%s' could not be run", cmd0)
+#. R/windows/system.R: gettextf("'%s' could not be run", cmd0)
+#: R/windows/system.R:0
+msgid "'%s' could not be run"
+msgstr "'%s' nie mogło zostać uruchomione"
+
+#. R/windows/system.R: gettextf("'%s' execution failed with error code %d", cmd0, res)
+#. R/windows/system.R: gettextf("'%s' execution failed with error code %d", cmd0, res)
+#: R/windows/system.R:0
+msgid "'%s' execution failed with error code %d"
+msgstr "wykonywanie '%s' nie powiodło się zwracając kod błędu %d"
+
+#. R/Defunct.R: gettextf("'%s' is defunct.\n", as.character(sys.call(sys.parent())[[1L]]))
+#: R/Defunct.R:0
+msgid "'%s' is defunct."
+msgstr "Funkcja '%s' została zlikwidowana."
+
+#. R/Deprecated.R: gettextf("'%s' is deprecated.\n", old)
+#: R/Deprecated.R:0
+msgid "'%s' is deprecated."
+msgstr "Funkcja '%s' jest przestarzała."
+
+#. R/dates.R: gettextf("'%s' is not a \"date\" object", deparse(substitute(x)))
+#. R/datetime.R: gettextf("'%s' is not a \"date\" object", deparse(substitute(x)))
+#: R/dates.R:0 R/datetime.R:0
+msgid "'%s' is not a \"date\" object"
+msgstr "argument '%s' nie jest obiektem klasy \"date\""
+
+#. R/dates.R: gettextf("'%s' is not a \"dates\" object", deparse(substitute(x)))
+#. R/datetime.R: gettextf("'%s' is not a \"dates\" object", deparse(substitute(x)))
+#: R/dates.R:0 R/datetime.R:0
+msgid "'%s' is not a \"dates\" object"
+msgstr "argument '%s' nie jest obiektem klasy \"dates\""
+
+#. R/match.fun.R: gettextf("'%s' is not a function, character or symbol", deparse(FUN))
+#: R/match.fun.R:0
+msgid "'%s' is not a function, character or symbol"
+msgstr "'%s' nie jest funkcją, tekstem ani symbolem"
 
-# src/library/base/R/RNG.R: 37
-# stop(gettextf("'%s' is not a valid abbreviation of an RNG", kind),
-#                  domain = NA)
-# src/library/base/R/RNG.R: 71
-# stop(gettextf("'%s' is not a valid abbreviation of an RNG", kind),
-#                  domain = NA)
+#. R/RNG.R: gettextf("'%s' is not a valid abbreviation of an RNG", kind)
+#. R/RNG.R: gettextf("'%s' is not a valid abbreviation of an RNG", kind)
+#: R/RNG.R:0
 msgid "'%s' is not a valid abbreviation of an RNG"
 msgstr "'%s' nie jest poprawnym skrótem dla 'RNG'"
 
-# src/library/base/R/RNG.R: 44
-# stop("'normal.kind' must be a character string of length 1")
-# src/library/base/R/RNG.R: 78
-# stop("'normal.kind' must be a character string of length 1")
-msgid "'normal.kind' must be a character string of length 1"
-msgstr "'normal.kind' musi być łańcuchem tekstowym o długości 1"
-
-# src/library/base/R/RNG.R: 47
-# stop(gettextf("'%s' is not a valid choice", normal.kind),
-#                  domain = NA)
-# src/library/base/R/RNG.R: 81
-# stop(gettextf("'%s' is not a valid choice", normal.kind),
-#                  domain = NA)
+#. R/RNG.R: gettextf("'%s' is not a valid choice", normal.kind)
+#. R/RNG.R: gettextf("'%s' is not a valid choice", normal.kind)
+#: R/RNG.R:0
 msgid "'%s' is not a valid choice"
 msgstr "'%s' nie jest poprawnym wyborem"
 
-# src/library/base/R/RNG.R: 97
-# stop("malformed version string")
-msgid "malformed version string"
-msgstr "zniekształcony łańcuch tekstowy wersji"
+#. R/source.R: gettextf("'%s' is not an existing file", file)
+#: R/source.R:0
+msgid "'%s' is not an existing file"
+msgstr "'%s' nie jest istniejącym plikiem"
 
-# src/library/base/R/all.equal.R: 40
-# gettextf("target is %s, current is %s",
-#                                 data.class(target), data.class(current))
-msgid "target is %s, current is %s"
-msgstr "cel: %s, bieżące: %s"
+#. R/namespace.R: gettextf("'%s' is not an exported object from 'namespace:%s'",     name, getNamespaceName(ns))
+#: R/namespace.R:0
+msgid "'%s' is not an exported object from 'namespace:%s'"
+msgstr "'%s' nie jest eksportowanym obiektem z 'namespace:%s'"
 
-# src/library/base/R/all.equal.R: 51
-# stop("'tolerance' should be numeric")
-msgid "'tolerance' should be numeric"
-msgstr "argument 'tolerance' musi być liczbą"
+#. R/notyet.R: gettextf("'%s' is not implemented yet", as.character(sys.call(sys.parent())[[1L]]))
+#: R/notyet.R:0
+msgid "'%s' is not implemented yet"
+msgstr "'%s' nie jest jeszcze zaimplementowane"
 
-# src/library/base/R/all.equal.R: 53
-# stop("'scale' should be numeric or NULL")
-msgid "'scale' should be numeric or NULL"
-msgstr "argument 'scale' powininen być liczbą lub wartością NULL"
+#. R/factor.R: sprintf("'%s' is not meaningful for ordered factors", .Generic)
+#: R/factor.R:0
+msgid "'%s' is not meaningful for ordered factors"
+msgstr "'%s' nie ma sensu dla uporządkowanych czynników"
+
+#. R/factor.R: gettextf("'%s' is only meaningful for ordered factors if all arguments have the same level sets",     .Generic)
+#: R/factor.R:0
+msgid ""
+"'%s' is only meaningful for ordered factors if all arguments have the same "
+"level sets"
+msgstr ""
+"'%s' ma sens tylko dla uporządkowanych czynników jeśli wszystkie argumenty "
+"mają ten sam zbiór poziomów"
 
-# src/library/base/R/all.equal.R: 55
-# stop(gettextf("'%s' must be logical", "check.attributes"), domain = NA)
-# src/library/base/R/all.equal.R: 115
-# stop(gettextf("'%s' must be logical", "check.attributes"), domain = NA)
-# src/library/base/R/all.equal.R: 205
-# stop(gettextf("'%s' must be logical", "check.attributes"),
-#              domain = NA)
-# src/library/base/R/all.equal.R: 208
-# stop(gettextf("'%s' must be logical", "use.names"), domain = NA)
-# src/library/base/R/all.equal.R: 244
-# stop(gettextf("'%s' must be logical", "check.attributes"), domain = NA)
-# src/library/base/R/all.equal.R: 284
-# stop(gettextf("'%s' must be logical", "check.attributes"), domain = NA)
-# src/library/base/R/all.equal.R: 286
-# stop(gettextf("'%s' must be logical", "check.names"), domain = NA)
+#. R/all.equal.R: gettextf("'%s' must be logical", "check.attributes")
+#. R/all.equal.R: gettextf("'%s' must be logical", "check.attributes")
+#. R/all.equal.R: gettextf("'%s' must be logical", "check.attributes")
+#. R/all.equal.R: gettextf("'%s' must be logical", "use.names")
+#. R/all.equal.R: gettextf("'%s' must be logical", "check.attributes")
+#. R/all.equal.R: gettextf("'%s' must be logical", "check.attributes")
+#. R/all.equal.R: gettextf("'%s' must be logical", "check.names")
+#: R/all.equal.R:0
 msgid "'%s' must be logical"
 msgstr "argumen '%s' musi być zmienną logiczną"
 
-# src/library/parallel/R/clusterApply.R: 236
-# stop("dim(X) must have a positive length")
-# src/library/base/R/apply.R: 25
-# stop("dim(X) must have a positive length")
-msgid "dim(X) must have a positive length"
-msgstr "'dim(X)' musi mieć dodatnią długość"
-
-# src/library/parallel/R/clusterApply.R: 249
-# stop("'X' must have named dimnames")
-# src/library/base/R/apply.R: 38
-# stop("'X' must have named dimnames")
-msgid "'X' must have named dimnames"
-msgstr "'X' musi mieć nazwane wymiary"
+#. R/datetime.R: gettextf("'%s' not defined for \"POSIXt\" objects", .Generic)
+#. R/datetime.R: gettextf("'%s' not defined for \"POSIXt\" objects", .Generic)
+#. R/datetime.R: gettextf("'%s' not defined for \"POSIXt\" objects", .Generic)
+#. R/datetime.R: gettextf("'%s' not defined for \"POSIXt\" objects", .Generic)
+#: R/datetime.R:0
+msgid "'%s' not defined for \"POSIXt\" objects"
+msgstr "'%s' nie jest określone dla obiektów klasy \"POSIXt\""
 
-# src/library/parallel/R/clusterApply.R: 252
-# stop("not all elements of 'MARGIN' are names of dimensions")
-# src/library/base/R/apply.R: 41
-# stop("not all elements of 'MARGIN' are names of dimensions")
-msgid "not all elements of 'MARGIN' are names of dimensions"
-msgstr "nie wszystkie elementy 'MARGIN' są nazwami wymiarów"
+#. R/datetime.R: gettextf("'%s' not defined for \"difftime\" objects", .Generic)
+#. R/datetime.R: gettextf("'%s' not defined for \"difftime\" objects", .Generic)
+#. R/datetime.R: gettextf("'%s' not defined for \"difftime\" objects", .Generic)
+#: R/datetime.R:0
+msgid "'%s' not defined for \"difftime\" objects"
+msgstr "'%s' nie jest określone dla obiektów klasy \"difftime\""
 
-# src/library/base/R/array.R: 29
-# stop("'dims' cannot be of length 0")
-# src/main/array.c: 1449
-# error(_("'dims' cannot be of length 0"))
-msgid "'dims' cannot be of length 0"
-msgstr "'dims' nie mogą posiadać długości 0"
+#. R/version.R: gettextf("'%s' not defined for \"numeric_version\" objects",     .Generic)
+#: R/version.R:0
+msgid "'%s' not defined for \"numeric_version\" objects"
+msgstr "'%s' nie jest określone dla obiektów klasy \"numeric_version\""
 
-# src/library/base/R/array.R: 34
-# stop("'dim' specifies too large an array")
-# src/main/array.c: 1410
-# stop("'dim' specifies too large an array")
-msgid "'dim' specifies too large an array"
-msgstr "'dim' określa zbyć dużą tablicę"
+#. R/factor.R: gettextf("'%s' not defined for ordered factors", .Generic)
+#: R/factor.R:0
+msgid "'%s' not defined for ordered factors"
+msgstr "'%s' nie jest określone dla uporządkowanych czynników"
 
-# src/library/base/R/array.R: 52
-# stop("incorrect value for 'MARGIN'")
-msgid "incorrect value for 'MARGIN'"
-msgstr "niepoprawna wartość dla argumentu 'MARGIN'"
+#. R/library.R: warning("'DESCRIPTION' has an 'Encoding' field and re-encoding is not possible",     call. = FALSE)
+#. R/library.R: warning("'DESCRIPTION' has an 'Encoding' field and re-encoding is not possible",     call. = FALSE)
+#: R/library.R:0
+msgid "'DESCRIPTION' has an 'Encoding' field and re-encoding is not possible"
+msgstr ""
+"plik 'DESCRIPTION' posiada pole 'Encoding' i ponowne kodowanie nie jest "
+"możliwe"
 
-# src/library/base/R/attach.R: 83
-# warning("*** 'pos=1' is not possible; setting 'pos=2' for now.\n",
-#                 "*** Note that 'pos=1' will give an error in the future")
-msgid "*** 'pos=1' is not possible; setting 'pos=2' for now."
-msgstr "*** 'pos=1' nie jest możliwe; na chwilę obecną ustawianie 'pos=2'."
+#. R/tapply.R: stop("'INDEX' is of length zero")
+#: R/tapply.R:0
+msgid "'INDEX' is of length zero"
+msgstr "argument 'INDEX' ma zerową długość"
 
-# src/library/base/R/attach.R: 83
-# warning("*** 'pos=1' is not possible; setting 'pos=2' for now.\n",
-#                 "*** Note that 'pos=1' will give an error in the future")
-msgid "*** Note that 'pos=1' will give an error in the future"
-msgstr "*** Zwróć uwagę, że 'pos=1' będzie zwracało błąd w przyszłości"
+#. R/apply.R: stop("'X' must have named dimnames")
+#: R/apply.R:0
+msgid "'X' must have named dimnames"
+msgstr "'X' musi mieć nazwane wymiary"
 
-# src/library/tools/R/Vignettes.R: 602
-# stop(gettextf("file '%s' not found", file), domain = NA)
-# src/library/tools/R/Vignettes.R: 945
-# stop(gettextf("file '%s' not found", vignette), domain = NA)
-# src/library/base/R/attach.R: 89
-# stop(gettextf("file '%s' not found", what), domain = NA)
-# src/library/utils/R/tar.R: 393
-# warning(gettextf("file '%s' not found", f), domain = NA)
-msgid "file '%s' not found"
-msgstr "plik '%s' nie został znaleziony"
+#. R/match.R: stop("'arg' must be NULL or a character vector")
+#: R/match.R:0
+msgid "'arg' must be NULL or a character vector"
+msgstr "argument 'arg' musi być wartością NULL lub wektorem tekstowym"
 
-# src/library/base/R/attach.R: 116
-# stop("invalid 'name' argument")
-msgid "invalid 'name' argument"
-msgstr "niepoprawny argument 'name'"
+#. R/match.R: stop("'arg' must be of length 1")
+#: R/match.R:0
+msgid "'arg' must be of length 1"
+msgstr "argument 'arg' musi mieć długość 1"
 
-# src/library/base/R/attach.R: 133
-# warning(gettextf("package %s is required by %s, which may no longer work correctly",
-#                                  sQuote(pkgname), sQuote(sub("^package:", "", pkg))),
-#                      call. = FALSE, domain = NA)
-msgid "package %s is required by %s, which may no longer work correctly"
-msgstr ""
-"pakiet %s jest wymagany przez %s, który z kolei może nie działać poprawnie"
+#. R/match.R: stop("'arg' must be of length >= 1")
+#: R/match.R:0
+msgid "'arg' must be of length >= 1"
+msgstr "argument 'arg' musi mieć długość >= 1"
 
-# src/library/base/R/attach.R: 137
-# stop(gettextf("package %s is required by %s so will not be detached",
-#                               sQuote(pkgname), sQuote(sub("^package:", "", pkg))),
-#                      call. = FALSE, domain = NA)
-msgid "package %s is required by %s so will not be detached"
-msgstr "pakiet %s jest wymagany przez %s tak więc nie zostanie odłączony"
+#. R/match.R: gettextf("'arg' should be one of %s", paste(dQuote(choices),     collapse = ", "))
+#: R/match.R:0
+msgid "'arg' should be one of %s"
+msgstr "argument 'arg' powininen być jednym z %s"
 
-# src/library/base/R/namespace.R: 126
-# stop(gettextf("%s failed in %s() for '%s', details:\n  call: %s\n  error: %s",
-#                               hookname, "attachNamespace", nsname,
-#                               deparse(conditionCall(res))[1L],
-#                               conditionMessage(res)),
-#                      call. = FALSE, domain = NA)
-# src/library/base/R/namespace.R: 215
-# stop(gettextf("%s failed in %s() for '%s', details:\n  call: %s\n  error: %s",
-#                                   hookname, "loadNamespace", pkgname,
-#                                   deparse(conditionCall(res))[1L],
-#                                   conditionMessage(res)),
-#                          call. = FALSE, domain = NA)
-# src/library/base/R/namespace.R: 719
-# warning(gettextf("%s failed in %s() for '%s', details:\n  call: %s\n  error: %s",
-#                                  hookname, "unloadNamespace", nsname,
-#                                  deparse(conditionCall(res))[1L],
-#                                  conditionMessage(res)),
-#                         call. = FALSE, domain = NA)
-# src/library/base/R/attach.R: 154
-# warning(gettextf("%s failed in %s() for '%s', details:\n  call: %s\n  error: %s",
-#                                  ".onDetach", "detach", pkgname,
-#                                  deparse(conditionCall(res))[1L],
-#                                  conditionMessage(res)),
-#                         call. = FALSE, domain = NA)
-# src/library/base/R/attach.R: 168
-# warning(gettextf("%s failed in %s() for '%s', details:\n  call: %s\n  error: %s",
-#                                  ".Last.lib", "detach", pkgname,
-#                                  deparse(conditionCall(res))[1L],
-#                                  conditionMessage(res)),
-#                         call. = FALSE, domain = NA)
-msgid "%s failed in %s() for '%s', details:\n  call: %s\n  error: %s"
+#. R/format.R: gettextf("'big.mark' and 'decimal.mark' are both '%s', which could be confusing",     big.mark)
+#: R/format.R:0
+msgid "'big.mark' and 'decimal.mark' are both '%s', which could be confusing"
 msgstr ""
-"%s nie powiodło się w funkcji '%s()' dla pakietu '%s', szczegóły:\n"
-"  wywołanie: %s\n"
-"  błąd:  %s"
+"oba argumenty 'big.mark' oraz 'decimal.mark' są ustawione na '%s', co może "
+"być mylące"
 
-# src/library/base/R/attach.R: 183
-# warning(gettextf("%s namespace cannot be unloaded:\n  ",
-#                                       sQuote(pkgname)),
-#                              conditionMessage(e),
-#                              call. = FALSE, domain = NA)
-msgid "%s namespace cannot be unloaded:"
-msgstr "przestrzeń nazw %s pakietu nie może zostać zwolniona:"
+#. R/tabulate.R: stop("'bin' must be numeric or a factor")
+#: R/tabulate.R:0
+msgid "'bin' must be numeric or a factor"
+msgstr "argument 'bin' musi być liczbą lub czynnikiem"
 
-# src/library/base/R/attach.R: 208
-# warning(gettextf("%s converted to character string", sQuote(name)),
-#                     domain = NA)
-msgid "%s converted to character string"
-msgstr "wartość %s została zamieniona na tekst"
+#. R/cut.R: stop("'breaks' are not unique")
+#: R/cut.R:0
+msgid "'breaks' are not unique"
+msgstr "wartosci w argumencie 'breaks' nie są unikalne"
 
-# src/library/base/R/attach.R: 221
-# warning("replaced regular expression pattern '[' by  '\\\\['")
-msgid "replaced regular expression pattern '[' by  '\\\\['"
-msgstr "zastąpiono wzór wyrażenia regularnego '[' przez '\\\\['"
+#. R/seq.R: stop("'by' argument is much too small")
+#: R/seq.R:0
+msgid "'by' argument is much too small"
+msgstr "wartość w argumencie 'by' jest znacznie za mała"
 
-# src/library/base/R/attach.R: 225
-# warning("replaced '[<-' by '\\\\[<-' in regular expression pattern")
-msgid "replaced '[<-' by '\\\\[<-' in regular expression pattern"
-msgstr "zastąpiono '[<-' przez '\\\\[<-' we wzorcu wyrażenia regularnego"
+#. R/dates.R: stop("'by' is NA")
+#. R/datetime.R: stop("'by' is NA")
+#: R/dates.R:0 R/datetime.R:0
+msgid "'by' is NA"
+msgstr "'by' posiada wartość NA"
 
-# src/library/base/R/attr.R: 22
-# stop("'value' must be a list")
-msgid "'value' must be a list"
-msgstr "argument 'value' musi być listą"
+#. R/dates.R: stop("'by' must be of length 1")
+#. R/datetime.R: stop("'by' must be of length 1")
+#: R/dates.R:0 R/datetime.R:0
+msgid "'by' must be of length 1"
+msgstr "argument 'by' musi mieć długość 1"
 
-# src/library/base/R/autoload.R: 22
-# stop("an object with that name already exists")
-msgid "an object with that name already exists"
-msgstr "obiekt o tej nazwie już istnieje"
+#. R/merge.R: stop("'by' must match number of columns")
+#: R/merge.R:0
+msgid "'by' must match number of columns"
+msgstr "argument 'by' musi zgadzać się z liczbą kolumn"
 
-# src/library/base/R/autoload.R: 51
-# stop(gettextf("autoloader did not find '%s' in '%s'", name, package),
-#              domain = NA)
-msgid "autoloader did not find '%s' in '%s'"
-msgstr "automat ładujący nie znalazł '%s' w pakiecie '%s'"
+#. R/merge.R: stop("'by' must match numbers of columns")
+#: R/merge.R:0
+msgid "'by' must match numbers of columns"
+msgstr "argument 'by' musi zgadzać się z liczbą kolumn"
 
-# src/library/base/R/chol.R: 24
-# stop("complex matrices not permitted at present")
-msgid "complex matrices not permitted at present"
-msgstr "macierze zespolone na chwilę obecną nie są dozwolone"
+#. R/merge.R: stop("'by' must specify one or more columns as numbers, names or logical")
+#: R/merge.R:0
+msgid "'by' must specify one or more columns as numbers, names or logical"
+msgstr ""
+"argument 'by' musi określać jedną lub więcej kolumn jako liczby, nazwy lub "
+"warunki logiczne"
 
-# src/library/base/R/colSums.R: 27
-# stop("'x' must be an array of at least two dimensions")
-# src/library/base/R/colSums.R: 47
-# stop("'x' must be an array of at least two dimensions")
-# src/library/base/R/colSums.R: 67
-# stop("'x' must be an array of at least two dimensions")
-# src/library/base/R/colSums.R: 87
-# stop("'x' must be an array of at least two dimensions")
-msgid "'x' must be an array of at least two dimensions"
-msgstr "argument 'x' musi być tablicą o co najmniej dwóch wymiarach"
+#. R/merge.R: stop("'by.x' and 'by.y' specify different numbers of columns")
+#: R/merge.R:0
+msgid "'by.x' and 'by.y' specify different numbers of columns"
+msgstr "argumenty 'by.x' oraz 'by.y' określają różne liczby kolumn"
 
-# src/library/base/R/colSums.R: 29
-# stop("invalid 'dims'")
-# src/library/base/R/colSums.R: 49
-# stop("invalid 'dims'")
-# src/library/base/R/colSums.R: 69
-# stop("invalid 'dims'")
-# src/library/base/R/colSums.R: 89
-# stop("invalid 'dims'")
-msgid "invalid 'dims'"
-msgstr "niepoprawny argument 'dims'"
+#. R/source.R: warning("'chdir = TRUE' makes no sense for a URL")
+#: R/source.R:0
+msgid "'chdir = TRUE' makes no sense for a URL"
+msgstr "'chdir = TRUE' nie ma sensu dla adresu URL"
 
-# src/library/base/R/conditions.R: 64
-# stop("bad handler specification")
-# src/library/base/R/conditions.R: 73
-# stop("bad handler specification")
-msgid "bad handler specification"
-msgstr "niepoprawne określenie obsługi"
+#. R/source.R: warning("'chdir = TRUE' makes no sense for a connection")
+#: R/source.R:0
+msgid "'chdir = TRUE' makes no sense for a connection"
+msgstr "'chdir = TRUE' nie ma sensu dla połączenia"
 
-# src/library/base/R/conditions.R: 195
-# stop(gettextf("no 'restart' '%s' found", as.character(r)),
-#                  domain = NA)
-# src/library/base/R/conditions.R: 208
-# stop(gettextf("no 'restart' '%s' found", as.character(r)),
-#                  domain = NA)
-msgid "no 'restart' '%s' found"
-msgstr "nie znaleziono 'restart' '%s'"
+#. R/load.R: gettextf("'compress = \"%s\"' is invalid", compress)
+#: R/load.R:0
+msgid "'compress = \"%s\"' is invalid"
+msgstr "'compress = \"%s\"' jest niepoprawne"
 
-# src/library/base/R/conditions.R: 204
-# stop("not an interactive session")
-msgid "not an interactive session"
-msgstr "nieinteraktywna sesja"
+#. R/serialize.R: warning("'compress' is ignored unless 'file' is a file name")
+#: R/serialize.R:0
+msgid "'compress' is ignored unless 'file' is a file name"
+msgstr ""
+"argument 'compress' zostanie zignorowany o ile argument 'file' nie jest "
+"nazwą pliku"
 
-# src/library/base/R/conditions.R: 264
-# stop("not a valid restart specification")
-msgid "not a valid restart specification"
-msgstr "niepoprawne określenie restartu"
+#. R/load.R: stop("'compress' must be logical or character")
+#: R/load.R:0
+msgid "'compress' must be logical or character"
+msgstr "argument 'compress' musi być typem logicznym lub tekstem"
 
-# src/library/base/R/conflicts.R: 22
-# stop("argument 'where' of length 0")
-msgid "argument 'where' of length 0"
-msgstr "argument 'where' ma długość 0"
+#. R/serialize.R: stop("'connection' must be a connection")
+#. R/serialize.R: stop("'connection' must be a connection")
+#: R/serialize.R:0
+msgid "'connection' must be a connection"
+msgstr "argument 'connection' musi być połączeniem"
 
-# src/library/base/R/connections.R: 128
-# stop("argument 'object' must deparse to a single character string")
-msgid "argument 'object' must deparse to a single character string"
+#. R/sort.R: stop("'decreasing' must be a length-1 logical vector.\nDid you intend to set 'partial'?")
+#: R/sort.R:0
+msgid ""
+"'decreasing' must be a length-1 logical vector.\n"
+"Did you intend to set 'partial'?"
 msgstr ""
-"argument 'object' musi być konwertowalny do pojedynczego łańcucha tekstowego"
-
-# src/library/base/R/connections.R: 142
-# stop("'origin' must be one of 'start', 'current' or 'end'")
-msgid "'origin' must be one of 'start', 'current' or 'end'"
-msgstr "argument 'origin' musi być jednym ze 'start', 'current' lub 'end'"
+"'decreasing' musi być wektorem logicznym o długości 1.\n"
+"Czy chciałeś ustawić 'partial'?"
 
-# src/library/base/R/connections.R: 151
-# stop("can only truncate an open connection")
-msgid "can only truncate an open connection"
+#. R/det.R: stop("'determinant' not currently defined for complex matrices")
+#: R/det.R:0
+msgid "'determinant' not currently defined for complex matrices"
 msgstr ""
-"funkcja 'truncate.connection()' może przycinać jedynie otwarte połączenie"
+"funkcja 'determinant()' nie jest aktualnie zdefiniowana dla macierzy "
+"zespolonych"
 
-# src/library/base/R/connections.R: 234
-# stop("can only write vector objects")
-msgid "can only write vector objects"
-msgstr "można zapisać jedynie obiekty wektorowe"
+#. R/format.R: gettextf("'digits' reduced to %d", maxDigits)
+#: R/format.R:0
+msgid "'digits' reduced to %d"
+msgstr "'digits' zredukowano do %d"
 
-# src/library/base/R/connections.R: 255
-# stop("can only write character objects")
-msgid "can only write character objects"
-msgstr "można zapisać jedynie obiekty wektorowe"
+#. R/array.R: stop("'dim' specifies too large an array")
+#: R/array.R:0
+msgid "'dim' specifies too large an array"
+msgstr "'dim' określa zbyć dużą tablicę"
 
-# src/library/base/R/connections.R: 270
-# stop("'timeout' must be NULL or a non-negative number")
-msgid "'timeout' must be NULL or a non-negative number"
-msgstr "argument 'timeout' musi być wartością NULL lub nieujemną liczbą"
+#. R/array.R: stop("'dims' cannot be of length 0")
+#: R/array.R:0
+msgid "'dims' cannot be of length 0"
+msgstr "'dims' nie mogą posiadać długości 0"
 
-# src/library/base/R/connections.R: 281
-# stop("'from' must be raw or character")
-# src/main/connections.c: 5813
-# error("'from' must be raw or character")
-# src/main/connections.c: 5893
-# error("'from' must be raw or character")
-msgid "'from' must be raw or character"
-msgstr "argument 'from' musi być typem pustym lub tekstem"
+#. R/dataframe.R: warning("'drop' argument will be ignored")
+#: R/dataframe.R:0
+msgid "'drop' argument will be ignored"
+msgstr "argument 'drop' zostanie zignorowany"
 
-# src/library/graphics/R/stem.R: 21
-# stop("'x' must be numeric")
-# src/library/graphics/R/hist.R: 33
-# stop("'x' must be numeric")
-# src/library/stats/R/wilcox.test.R: 37
-# stop("'x' must be numeric")
-# src/library/stats/R/StructTS.R: 85
-# stop("'x' must be numeric")
-# src/library/stats/R/ar.R: 53
-# stop("'x' must be numeric")
-# src/library/stats/R/ar.R: 266
-# stop("'x' must be numeric")
-# src/library/stats/R/ar.R: 344
-# stop("'x' must be numeric")
-# src/library/stats/R/cor.R: 35
-# stop("'x' must be numeric")
-# src/library/stats/R/arma0.R: 63
-# stop("'x' must be numeric")
-# src/library/stats/R/arima.R: 112
-# stop("'x' must be numeric")
-# src/library/stats/R/acf.R: 36
-# stop("'x' must be numeric")
-# src/library/stats/R/acf.R: 68
-# stop("'x' must be numeric")
-# src/library/base/R/cut.R: 25
-# stop("'x' must be numeric")
-# src/library/base/R/rowsum.R: 23
-# stop("'x' must be numeric")
-# src/library/base/R/jitter.R: 28
-# stop("'x' must be numeric")
-# src/main/array.c: 1275
-# error(_("'x' must be numeric"))
-msgid "'x' must be numeric"
-msgstr "argument 'x' musi być liczbą"
+#. R/source.R: stop("'echo' must be logical")
+#: R/source.R:0
+msgid "'echo' must be logical"
+msgstr "'echo' musi być zmienną logiczną"
 
-# src/library/base/R/cut.R: 28
-# stop("invalid number of intervals")
-msgid "invalid number of intervals"
-msgstr "niepoprawna liczba interwałów"
+#. R/namespace.R: gettextf("'exportClassPattern' specified in 'NAMESPACE' but no matching classes in package %s",     sQuote(package))
+#: R/namespace.R:0
+msgid ""
+"'exportClassPattern' specified in 'NAMESPACE' but no matching classes in "
+"package %s"
+msgstr ""
+"'exportClassPattern' określono w pliku 'NAMESPACE', ale brak pasujących klas "
+"w pakiecie %s"
 
-# src/library/base/R/cut.R: 40
-# stop("'breaks' are not unique")
-msgid "'breaks' are not unique"
-msgstr "wartosci w argumencie 'breaks' nie są unikalne"
-
-# src/library/base/R/cut.R: 62
-# stop("lengths of 'breaks' and 'labels' differ")
-msgid "lengths of 'breaks' and 'labels' differ"
-msgstr "długości argumentów 'breaks' oraz 'labels' różnią się"
-
-# src/library/base/R/dataframe.R: 63
-# stop("invalid 'row.names' length")
-# src/library/base/R/dataframe.R: 66
-# stop("invalid 'row.names' length")
-# src/library/utils/R/read.DIF.R: 259
-# stop("invalid 'row.names' length")
-# src/library/utils/R/readtable.R: 253
-# stop("invalid 'row.names' length")
-msgid "invalid 'row.names' length"
-msgstr "niepoprawna długość 'row.names'"
-
-# src/library/base/R/dataframe.R: 75
-# stop("duplicate 'row.names' are not allowed")
-# src/library/utils/R/read.DIF.R: 261
-# stop("duplicate 'row.names' are not allowed")
-# src/library/utils/R/readtable.R: 255
-# stop("duplicate 'row.names' are not allowed")
-msgid "duplicate 'row.names' are not allowed"
-msgstr "powtórzone wartości w 'row.names' nie są dozwolone"
+#. R/sink.R: stop("'file' must be NULL or an already open connection")
+#: R/sink.R:0
+msgid "'file' must be NULL or an already open connection"
+msgstr "'file' musi być wartością NULL lub już otwartym połączeniem"
 
-# src/library/base/R/dataframe.R: 78
-# stop("missing values in 'row.names' are not allowed")
-# src/library/utils/R/read.DIF.R: 263
-# stop("missing values in 'row.names' are not allowed")
-# src/library/utils/R/readtable.R: 257
-# stop("missing values in 'row.names' are not allowed")
-msgid "missing values in 'row.names' are not allowed"
-msgstr "brakujące wartości w 'row.names' nie są dozwolone"
+#. R/sink.R: stop("'file' must be NULL, a connection or a character string")
+#: R/sink.R:0
+msgid "'file' must be NULL, a connection or a character string"
+msgstr "'file' musi być wartością NULL, połączeniem lub łańcuchem tekstowym"
 
-# src/library/base/R/dataframe.R: 125
-# stop("invalid 'dimnames' given for data frame")
-# src/library/base/R/dataframe.R: 130
-# stop("invalid 'dimnames' given for data frame")
-msgid "invalid 'dimnames' given for data frame"
-msgstr "niepoprawne 'dimnames' dla podanej ramki danych"
+#. R/dcf.R: stop("'file' must be a character string or connection")
+#. R/dcf.R: stop("'file' must be a character string or connection")
+#. R/scan.R: stop("'file' must be a character string or connection")
+#: R/dcf.R:0 R/scan.R:0
+msgid "'file' must be a character string or connection"
+msgstr "argument 'file' musi być łańcuchem tekstowym lub połączeniem"
 
-# src/library/base/R/dataframe.R: 144
-# stop(gettextf("cannot coerce class \"%s\" to a data.frame",
-#                   deparse(class(x))),
-#          domain = NA)
-msgid "cannot coerce class \"%s\" to a data.frame"
-msgstr "nie można przekształcić klasy \"%s\" w klasę \"data.frame\""
+#. R/load.R: stop("'file' must be non-empty string")
+#. R/load.R: stop("'file' must be non-empty string")
+#. R/serialize.R: stop("'file' must be non-empty string")
+#: R/load.R:0 R/serialize.R:0
+msgid "'file' must be non-empty string"
+msgstr "argument 'file' musi być niepustym łańcuchem tekstowym"
 
-# src/library/base/R/dataframe.R: 239
-# stop('options("stringsAsFactors") not set to TRUE or FALSE')
-msgid "options(\"stringsAsFactors\") not set to TRUE or FALSE"
-msgstr ""
-"'options(\"stringsAsFactors\")' nie zostało ustawione na 'TRUE' lub 'FALSE'"
+#. R/load.R: stop("'file' must be specified")
+#: R/load.R:0
+msgid "'file' must be specified"
+msgstr "argument 'file' musi być określony"
 
-# src/library/base/R/dataframe.R: 381
-# stop(gettextf("mismatch of row names in arguments of 'data.frame\', item %d", i), domain = NA)
-msgid "mismatch of row names in arguments of 'data.frame', item %d"
-msgstr "niedopasowanie nazw wierszy w argumentach 'data.frame()', pozycja %d"
+#. R/format.R: stop("'flag' can contain only '0+- #'")
+#: R/format.R:0
+msgid "'flag' can contain only '0+- #'"
+msgstr "'flag' może zawierać jedynie znaki '0+- #'"
 
-# src/library/base/R/dataframe.R: 386
-# warning(gettextf("some row.names duplicated: %s --> row.names NOT used",
-#                                      paste(which(duplicated(new)), collapse=",")),
-#                             domain = NA)
-msgid "some row.names duplicated: %s --> row.names NOT used"
+#. R/format.R: stop("'format' must be one of {\"f\",\"e\",\"E\",\"g\",\"G\", \"fg\", \"s\"}")
+#: R/format.R:0
+msgid "'format' must be one of {\"f\",\"e\",\"E\",\"g\",\"G\", \"fg\", \"s\"}"
 msgstr ""
-"niektóre wartości 'row.names' są powtórzone: %s --> nazwy wierszy nie "
-"zostały użyte"
-
-# src/library/base/R/dataframe.R: 403
-# stop("row names contain missing values")
-# src/library/base/R/dataframe.R: 519
-# stop("row names contain missing values")
-msgid "row names contain missing values"
-msgstr "nazwy wierszy zawierają brakujące wartości"
+"argument 'format' musi być jednym z {\"f\",\"e\",\"E\",\"g\",\"G\", \"fg\", "
+"\"s\"}"
 
-# src/library/base/R/dataframe.R: 405
-# stop(gettextf("duplicate row.names: %s",
-#                               paste(unique(row.names[duplicated(row.names)]),
-#                                     collapse = ", ")),
-#                      domain = NA)
-# src/library/base/R/dataframe.R: 521
-# stop(gettextf("duplicate row.names: %s",
-#                           paste(unique(row.names[duplicated(row.names)]),
-#                                 collapse = ", ")),
-#                  domain = NA)
-msgid "duplicate row.names: %s"
-msgstr "powtórzone wartości 'row.names': %s"
+#. R/seq.R: stop("'from' cannot be NA, NaN or infinite")
+#. R/seq.R: stop("'from' cannot be NA, NaN or infinite")
+#: R/seq.R:0
+msgid "'from' cannot be NA, NaN or infinite"
+msgstr "argument 'from' nie może mieć wartości NA, NaN lub nieskończoność"
 
-# src/library/base/R/dataframe.R: 484
-# stop(gettextf("arguments imply differing number of rows: %s",
-#                       paste(unique(nrows), collapse = ", ")),
-#              domain = NA)
-msgid "arguments imply differing number of rows: %s"
-msgstr "argumenty sugerują różną liczbę wierszy: %s"
+#. R/dates.R: stop("'from' must be a \"Date\" object")
+#: R/dates.R:0
+msgid "'from' must be a \"Date\" object"
+msgstr "argument 'from' musi być obiektem klasy \"Date\""
 
-# src/library/base/R/dataframe.R: 503
-# stop("'row.names' should specify one of the variables")
-msgid "'row.names' should specify one of the variables"
-msgstr "argument 'row.names' powinien określać jedną ze zmiennych"
+#. R/datetime.R: stop("'from' must be a \"POSIXt\" object")
+#: R/datetime.R:0
+msgid "'from' must be a \"POSIXt\" object"
+msgstr "argument 'from' musi być obiektem klasy \"POSIXt\""
 
-# src/library/base/R/dataframe.R: 508
-# stop("row names supplied are of the wrong length")
-msgid "row names supplied are of the wrong length"
-msgstr "dostarczone nazwy wierszy mają niepoprawną długość"
+#. R/dates.R: stop("'from' must be of length 1")
+#. R/datetime.R: stop("'from' must be of length 1")
+#. R/seq.R: stop("'from' must be of length 1")
+#: R/dates.R:0 R/datetime.R:0 R/seq.R:0
+msgid "'from' must be of length 1"
+msgstr "argument 'from' musi mieć długość 1"
 
-# src/library/base/R/dataframe.R: 510
-# warning("row names were found from a short variable and have been discarded")
-msgid "row names were found from a short variable and have been discarded"
-msgstr ""
-"nazwy wierszy zostały znalezione z krótkiej zmiennej i zostały odrzucone"
+#. R/connections.R: stop("'from' must be raw or character")
+#: R/connections.R:0
+msgid "'from' must be raw or character"
+msgstr "argument 'from' musi być typem pustym lub tekstem"
 
-# src/library/base/R/dataframe.R: 543
-# warning("named arguments other than 'drop' are discouraged")
-msgid "named arguments other than 'drop' are discouraged"
-msgstr "nazwane argumenty inne niż 'drop' są odrzucane"
+#. R/dates.R: stop("'from' must be specified")
+#. R/datetime.R: stop("'from' must be specified")
+#: R/dates.R:0 R/datetime.R:0
+msgid "'from' must be specified"
+msgstr "argument 'from' musi być określony"
 
-# src/library/base/R/dataframe.R: 546
-# warning("'drop' argument will be ignored")
-msgid "'drop' argument will be ignored"
-msgstr "argument 'drop' zostanie zignorowany"
+#. R/formals.R: warning("'fun' is not a function")
+#. R/formals.R: warning("'fun' is not a function")
+#: R/formals.R:0
+msgid "'fun' is not a function"
+msgstr "argument 'fun' nie jest funkcją"
 
-# src/library/base/R/dataframe.R: 558
-# stop("undefined columns selected")
-# src/library/base/R/dataframe.R: 564
-# stop("undefined columns selected")
-# src/library/base/R/dataframe.R: 584
-# stop("undefined columns selected")
-# src/library/base/R/dataframe.R: 589
-# stop("undefined columns selected")
-# src/library/base/R/dataframe.R: 632
-# stop("undefined columns selected")
-msgid "undefined columns selected"
-msgstr "nie wybrano kolumn"
+#. R/New-Internal.R: stop("'iconvlist' is not available on this system")
+#. R/New-Internal.R: stop("'iconvlist' is not available on this system")
+#: R/New-Internal.R:0
+msgid "'iconvlist' is not available on this system"
+msgstr "'iconvlist' nie jest dostępne w tym systemie"
 
-# src/library/base/R/dataframe.R: 692
-# warning("named arguments other than 'exact' are discouraged")
-msgid "named arguments other than 'exact' are discouraged"
-msgstr "nazwane argumenty inne niż 'exact' są odrzucane"
+#. R/unix/system.unix.R: stop("'ignore.stderr' must be TRUE or FALSE")
+#. R/windows/system.R: stop("'ignore.stderr' must be TRUE or FALSE")
+#: R/unix/system.unix.R:0 R/windows/system.R:0
+msgid "'ignore.stderr' must be TRUE or FALSE"
+msgstr "argument 'ignore.stderr' musi mieć wartość TRUE lub FALSE"
 
-# src/library/base/R/dataframe.R: 712
-# warning("named arguments are discouraged")
-# src/library/base/R/dataframe.R: 1010
-# warning("named arguments are discouraged")
-msgid "named arguments are discouraged"
-msgstr "nazwane argumenty są odrzucane"
+#. R/unix/system.unix.R: stop("'ignore.stdout' must be TRUE or FALSE")
+#. R/windows/system.R: stop("'ignore.stdout' must be TRUE or FALSE")
+#: R/unix/system.unix.R:0 R/windows/system.R:0
+msgid "'ignore.stdout' must be TRUE or FALSE"
+msgstr "argument 'ignore.stdout' musi mieć wartość TRUE lub FALSE"
 
-# src/library/base/R/dataframe.R: 741
-# warning("number of items to replace is not a multiple of replacement length")
-# src/main/subassign.c: 522
-# warning(_("number of items to replace is not a multiple of replacement length"))
-# src/main/subassign.c: 798
-# error(_("number of items to replace is not a multiple of replacement length"))
-# src/main/subassign.c: 1070
-# error(_("number of items to replace is not a multiple of replacement length"))
-msgid "number of items to replace is not a multiple of replacement length"
+#. R/merge.R: stop("'incomparables' is supported only for merging on a single column")
+#: R/merge.R:0
+msgid "'incomparables' is supported only for merging on a single column"
 msgstr ""
-"liczba pozycji do zastąpienia nie jest wielokrotnością długości zamiany"
+"'incomparables' jest wspierany w sytuacji łączeń na pojedynczej kolumnie"
 
-# src/library/base/R/dataframe.R: 755
-# stop("'value' is the wrong length")
-msgid "'value' is the wrong length"
-msgstr "argument 'value' posiada niepoprawną długość"
+#. R/sort.R: stop("'index.return' only for 'na.last = NA'")
+#: R/sort.R:0
+msgid "'index.return' only for 'na.last = NA'"
+msgstr "'index.return' dostępne jest jedynie dla 'na.last = NA'"
 
-# src/library/base/R/dataframe.R: 772
-# stop("unsupported matrix index in replacement")
-msgid "unsupported matrix index in replacement"
-msgstr "niedozwolony indeks macierzy w zamianie"
+#. R/sort.R: stop("'index.return' only for non-factors")
+#: R/sort.R:0
+msgid "'index.return' only for non-factors"
+msgstr "argument 'index.return' jest poprawny jedynie dla nie-czynników"
 
-# src/library/base/R/dataframe.R: 780
-# stop("need 0, 1, or 2 subscripts")
-msgid "need 0, 1, or 2 subscripts"
-msgstr "wymagane jest 0, 1, lub 2 indeksy"
+#. R/match.R: stop("'input' and 'target' must be character vectors")
+#: R/match.R:0
+msgid "'input' and 'target' must be character vectors"
+msgstr "argumenty 'input' oraz 'target' muszą być wektorami tekstowymi"
 
-# src/library/base/R/dataframe.R: 794
-# stop("missing values are not allowed in subscripted assignments of data frames")
-# src/library/base/R/dataframe.R: 829
-# stop("missing values are not allowed in subscripted assignments of data frames")
-msgid "missing values are not allowed in subscripted assignments of data frames"
-msgstr ""
-"brakujące wartości nie są dozwolone w indeksowanych przypisaniach ramek "
-"danych"
+#. R/unix/system.unix.R: stop("'input' must be a character vector or 'NULL'")
+#. R/unix/system.unix.R: stop("'input' must be a character vector or 'NULL'")
+#: R/unix/system.unix.R:0
+msgid "'input' must be a character vector or 'NULL'"
+msgstr "argument 'input' musi być wektorem tekstowym lub wartością 'NULL'"
 
-# src/library/base/R/dataframe.R: 823
-# stop("non-existent rows not allowed")
-# src/library/base/R/dataframe.R: 1080
-# stop("non-existent rows not allowed")
-msgid "non-existent rows not allowed"
-msgstr "nieistniejące wiersze nie są dozwolone"
+#. R/match.R: stop("'input' must have length 1")
+#: R/match.R:0
+msgid "'input' must have length 1"
+msgstr "argument 'input' musi mieć długość 1"
 
-# src/library/base/R/dataframe.R: 831
-# stop("column name \"\" cannot match any column")
-# src/library/base/R/dataframe.R: 1083
-# stop("column name \"\" cannot match any column")
-msgid "column name \"\" cannot match any column"
-msgstr "kolumny o nazwie \"\" nie można dopasować do żadnej kolumny"
+#. R/format.R: stop("'input.d.mark' has no characters")
+#: R/format.R:0
+msgid "'input.d.mark' has no characters"
+msgstr "argument 'input.d.mark' nie zawiera znaków"
 
-# src/library/base/R/dataframe.R: 849
-# stop("new columns would leave holes after existing columns")
-msgid "new columns would leave holes after existing columns"
-msgstr "nowe kolumny zostawiłyby dziury po istniejących kolumnach"
+#. R/unix/system.unix.R: stop("'intern' must be TRUE or FALSE")
+#. R/windows/system.R: stop("'intern' must be TRUE or FALSE")
+#: R/unix/system.unix.R:0 R/windows/system.R:0
+msgid "'intern' must be TRUE or FALSE"
+msgstr "argument 'intern' musi mieć wartość TRUE lub FALSE"
 
-# src/library/base/R/dataframe.R: 863
-# stop("duplicate subscripts for columns")
-msgid "duplicate subscripts for columns"
-msgstr "powtórzone indeksy dla kolumn"
+#. R/windows/system.R: stop("'invisible' must be TRUE or FALSE")
+#. R/windows/system.R: stop("'invisible' must be TRUE or FALSE")
+#: R/windows/system.R:0
+msgid "'invisible' must be TRUE or FALSE"
+msgstr "argument 'invisible' musi mieć wartość TRUE lub FALSE"
 
-# src/library/base/R/dataframe.R: 1048
-# stop("only valid calls are x[[j]] <- value or x[[i,j]] <- value")
-msgid "only valid calls are x[[j]] <- value or x[[i,j]] <- value"
-msgstr ""
-"jedynymi poprawnymi przywołaniami są x[[j]] <- wartość lub x[[i,j]] <- "
-"wartość"
+#. R/qr.R: stop("'k' is too large")
+#: R/qr.R:0
+msgid "'k' is too large"
+msgstr "argument 'k' jest zbyt duży"
 
-# src/library/base/R/dataframe.R: 1086
-# stop(gettextf("replacing element in non-existent column: %s",
-#                           j[is.na(jseq)]), domain = NA)
-# src/library/base/R/dataframe.R: 1094
-# stop(gettextf("replacing element in non-existent column: %s",
-#                           jseq[jseq > nvars]), domain = NA)
-msgid "replacing element in non-existent column: %s"
-msgstr "zastępowanie elementu w nieistniejącej kolumnie: %s"
+#. R/RNG.R: stop("'kind' must be a character string of length 1 (RNG to be used).")
+#. R/RNG.R: stop("'kind' must be a character string of length 1 (RNG to be used).")
+#: R/RNG.R:0
+msgid "'kind' must be a character string of length 1 (RNG to be used)."
+msgstr ""
+"'kind' musi być łańcuchem tekstowym o długości 1 (zostanie użyty 'RNG')."
 
-# src/library/base/R/dataframe.R: 1098
-# stop("only a single element should be replaced")
-msgid "only a single element should be replaced"
-msgstr "tylko pojedynczy element powinień być zamieniany"
+#. R/dates.R: stop("'lag' and 'differences' must be integers >= 1")
+#. R/datetime.R: stop("'lag' and 'differences' must be integers >= 1")
+#. R/diff.R: stop("'lag' and 'differences' must be integers >= 1")
+#: R/dates.R:0 R/datetime.R:0 R/diff.R:0
+msgid "'lag' and 'differences' must be integers >= 1"
+msgstr "argumenty 'lag' oraz 'differences' muszą być liczbami całkowitymi >= 1"
 
-# src/library/base/R/dataframe.R: 1142
-# warning("Name partially matched in data frame")
-msgid "Name partially matched in data frame"
-msgstr "Nazwa częściowo dopasowana w ramce danych"
+#. R/dates.R: stop("'length.out' must be of length 1")
+#. R/datetime.R: stop("'length.out' must be of length 1")
+#: R/dates.R:0 R/datetime.R:0
+msgid "'length.out' must be of length 1"
+msgstr "argument 'length.out' musi mieć długość 1"
 
-# src/library/base/R/dataframe.R: 1196
-# stop("names do not match previous names")
-# src/library/base/R/dataframe.R: 1198
-# stop("names do not match previous names")
-msgid "names do not match previous names"
-msgstr "nazwy nie zgadzają się z poprzednimi nazwami"
+#. R/source.R: stop("'local' must be TRUE, FALSE or an environment")
+#: R/source.R:0
+msgid "'local' must be TRUE, FALSE or an environment"
+msgstr "argument 'local' musi być TRUE, FALSE lub musi być środowiskiem"
 
-# src/library/base/R/dataframe.R: 1251
-# stop("numbers of columns of arguments do not match")
-# src/library/base/R/dataframe.R: 1301
-# stop("numbers of columns of arguments do not match")
-msgid "numbers of columns of arguments do not match"
-msgstr "liczba kolumn argumentów nie zgadza się"
+#. R/windows/system.R: stop("'minimized' must be TRUE or FALSE")
+#. R/windows/system.R: stop("'minimized' must be TRUE or FALSE")
+#: R/windows/system.R:0
+msgid "'minimized' must be TRUE or FALSE"
+msgstr "argument 'minimized' musi mieć wartość TRUE lub FALSE"
 
-# src/library/base/R/dataframe.R: 1291
-# stop("invalid list argument: all variables should have the same length")
-msgid "invalid list argument: all variables should have the same length"
-msgstr ""
-"niepoprawny argument listy: wszystkie zmienne powinny mieć tę samą długość"
+#. R/format.R: stop("'mode' must be \"double\" (\"real\"), \"integer\" or \"character\"")
+#: R/format.R:0
+msgid "'mode' must be \"double\" (\"real\"), \"integer\" or \"character\""
+msgstr "'mode' musi być \"double\" (\"real\"), \"integer\" lub \"character\""
 
-# src/library/base/R/dataframe.R: 1389
-# gettextf("data frame with 0 columns and %d rows\n", n)
-msgid "data frame with 0 columns and %d rows"
-msgstr "ramka danych z zerową liczbą kolumn oraz %d wierszami"
+#. R/RNG.R: stop("'normal.kind' must be a character string of length 1")
+#. R/RNG.R: stop("'normal.kind' must be a character string of length 1")
+#: R/RNG.R:0
+msgid "'normal.kind' must be a character string of length 1"
+msgstr "'normal.kind' musi być łańcuchem tekstowym o długości 1"
 
-# src/library/base/R/dataframe.R: 1393
-# gettext("<0 rows> (or 0-length row.names)\n")
-msgid "<0 rows> (or 0-length row.names)"
-msgstr "<0 wierszy> (lub 'row.names' o zerowej długości)"
+#. R/diag.R: stop("'nrow' or 'ncol' cannot be specified when 'x' is a matrix")
+#: R/diag.R:0
+msgid "'nrow' or 'ncol' cannot be specified when 'x' is a matrix"
+msgstr "'nrow' ani 'ncol' nie mogą być określone kiedy 'x' jest macierzą"
 
-# src/library/base/R/dataframe.R: 1485
-# stop("non-numeric variable in data frame: ", vnames[!mode.ok])
-msgid "non-numeric variable in data frame:"
-msgstr "zmienna nieliczbowa w ramce danych:"
+#. R/lapply.R: stop("'object' must be a list")
+#: R/lapply.R:0
+msgid "'object' must be a list"
+msgstr "argument 'object' musi być listą"
 
-# src/library/base/R/dataframe.R: 1506
-# stop(.Generic, " only defined for equally-sized data frames")
-msgid "only defined for equally-sized data frames"
-msgstr "zdefiniowane jedynie dla ramek danych o równych rozmiarach"
-
-# src/library/base/R/dataframe.R: 1516
-# stop(gettextf("list of length %d not meaningful", length(e2)),
-#                      domain = NA)
-# src/library/base/R/dataframe.R: 1533
-# stop(gettextf("list of length %d not meaningful", length(e1)),
-#                      domain = NA)
-msgid "list of length %d not meaningful"
-msgstr "lista o długości %d nie ma sensu"
+#. R/table.R: gettextf("'object' must inherit from class %s", dQuote("table"))
+#: R/table.R:0
+msgid "'object' must inherit from class %s"
+msgstr "argument 'object' musi dziedziczyć z klasy %s"
 
-# src/library/base/R/dataframe.R: 1562
-# stop("only defined on a data frame with all numeric variables")
-msgid "only defined on a data frame with all numeric variables"
-msgstr ""
-"funkcja 'summary()' zdefiniowana jest jedynie na ramce danych ze wszystkimi "
-"zmiennymi będącymi liczbami"
+#. R/dates.R: stop("'origin' must be of length one")
+#. R/datetime.R: stop("'origin' must be of length one")
+#: R/dates.R:0 R/datetime.R:0
+msgid "'origin' must be of length one"
+msgstr "argument 'origin' musi mieć długość 1"
 
-# src/library/base/R/datetime.R: 76
-# stop("character string is not in a standard unambiguous format")
-# src/library/base/R/dates.R: 57
-# stop("character string is not in a standard unambiguous format")
-msgid "character string is not in a standard unambiguous format"
-msgstr "łańcuch tekstowy nie jest w standardowym jednoznacznym formacie"
+#. R/connections.R: stop("'origin' must be one of 'start', 'current' or 'end'")
+#: R/connections.R:0
+msgid "'origin' must be one of 'start', 'current' or 'end'"
+msgstr "argument 'origin' musi być jednym ze 'start', 'current' lub 'end'"
 
-# src/library/base/R/datetime.R: 81
-# stop("'origin' must be supplied")
-# src/library/base/R/datetime.R: 139
-# stop("'origin' must be supplied")
-# src/library/base/R/dates.R: 65
-# stop("'origin' must be supplied")
+#. R/dates.R: stop("'origin' must be supplied")
+#. R/datetime.R: stop("'origin' must be supplied")
+#. R/datetime.R: stop("'origin' must be supplied")
+#: R/dates.R:0 R/datetime.R:0
 msgid "'origin' must be supplied"
 msgstr "argument 'origin' musi zostać dostarczony"
 
-# src/library/base/R/datetime.R: 91
-# stop(gettextf("do not know how to convert '%s' to class %s",
-#                   deparse(substitute(x)),
-#                   dQuote("POSIXlt")),
-#          domain = NA)
-# src/library/base/R/datetime.R: 150
-# stop(gettextf("do not know how to convert '%s' to class %s",
-#                   deparse(substitute(x)),
-#                   dQuote("POSIXct")),
-#          domain = NA)
-# src/library/base/R/dates.R: 74
-# stop(gettextf("do not know how to convert '%s' to class %s",
-#                   deparse(substitute(x)),
-#                   dQuote("Date")),
-#          domain = NA)
-msgid "do not know how to convert '%s' to class %s"
-msgstr "nie wiem jak przekonwertować '%s' na klasę %s"
+#. R/files.R: stop("'package' must be of length 1")
+#. R/library.R: stop("'package' must be of length 1")
+#: R/files.R:0 R/library.R:0
+msgid "'package' must be of length 1"
+msgstr "argument 'package' musi mieć długość 1"
 
-# src/library/base/R/datetime.R: 108
-# stop(gettextf("'%s' is not a \"date\" object",
-#                          deparse(substitute(x)) ))
-# src/library/base/R/dates.R: 86
-# stop(gettextf("'%s' is not a \"date\" object",
-#                          deparse(substitute(x)) ))
-msgid "'%s' is not a \"date\" object"
-msgstr "argument '%s' nie jest obiektem klasy \"date\""
+#. R/sort.R: stop("'partial' sorting not supported by radix method")
+#: R/sort.R:0
+msgid "'partial' sorting not supported by radix method"
+msgstr "sortowanie 'partial' nie jest wspierane przez metodę 'radix'"
+
+#. R/qr.R: stop("'qr' and 'y' must have the same number of rows")
+#. R/qr.R: stop("'qr' and 'y' must have the same number of rows")
+#. R/qr.R: stop("'qr' and 'y' must have the same number of rows")
+#. R/qr.R: stop("'qr' and 'y' must have the same number of rows")
+#. R/qr.R: stop("'qr' and 'y' must have the same number of rows")
+#: R/qr.R:0
+msgid "'qr' and 'y' must have the same number of rows"
+msgstr "argumenty 'qr' oraz 'y' muszą mieć tę samą liczbę wierszy"
 
-# src/library/base/R/datetime.R: 121
-# stop(gettextf("'%s' is not a \"dates\" object",
-#                          deparse(substitute(x)) ))
-# src/library/base/R/dates.R: 99
-# stop(gettextf("'%s' is not a \"dates\" object",
-#                          deparse(substitute(x)) ))
-msgid "'%s' is not a \"dates\" object"
-msgstr "argument '%s' nie jest obiektem klasy \"dates\""
+#. R/files.R: warning("'recursive' will be ignored as 'to' is not a single existing directory")
+#: R/files.R:0
+msgid "'recursive' will be ignored as 'to' is not a single existing directory"
+msgstr ""
+"argument 'recursive' zostanie zignorowany ponieważ argument 'to' nie jest "
+"pojedynczym istniejącym katalogiem"
 
-# src/library/base/R/dates.R: 145
-# stop("binary + is not defined for \"Date\" objects")
-msgid "binary + is not defined for \"Date\" objects"
+#. R/dataframe.R: gettextf("'row.names' is not a character vector of length %d -- omitting it. Will be an error!",     nrows)
+#: R/dataframe.R:0
+msgid ""
+"'row.names' is not a character vector of length %d -- omitting it. Will be "
+"an error!"
 msgstr ""
-"dwuargumentowy operator '+' nie jest określony dla obiektów klasy \"Date\""
+"argument 'row.names' nie jest wektorem tekstowym o długości %d -- pomijanie "
+"go. Będzie błąd!"
 
-# src/library/base/R/dates.R: 158
-# stop("can only subtract from \"Date\" objects")
-msgid "can only subtract from \"Date\" objects"
-msgstr "można odejmować jedynie od obiektów klasy \"Date\""
+#. R/dataframe.R: stop("'row.names' should specify one of the variables")
+#: R/dataframe.R:0
+msgid "'row.names' should specify one of the variables"
+msgstr "argument 'row.names' powinien określać jedną ze zmiennych"
 
-# src/library/base/R/dates.R: 159
-# stop("unary - is not defined for \"Date\" objects")
-msgid "unary - is not defined for \"Date\" objects"
-msgstr ""
-"jednoargumentowy operator '-' nie jest określony dla obiektów klasy \"Date\""
+#. R/all.equal.R: stop("'scale' should be numeric or NULL")
+#: R/all.equal.R:0
+msgid "'scale' should be numeric or NULL"
+msgstr "argument 'scale' powininen być liczbą lub wartością NULL"
 
-# src/library/base/R/dates.R: 163
-# stop("can only subtract numbers from \"Date\" objects")
-msgid "can only subtract numbers from \"Date\" objects"
-msgstr "można odejmować jedynie liczby od obiektów klasy \"Date\""
+#. R/windows/system.R: stop("'show.output.on.console' must be TRUE or FALSE")
+#: R/windows/system.R:0
+msgid "'show.output.on.console' must be TRUE or FALSE"
+msgstr "argument 'show.output.on.console' musi mieć wartość TRUE lub FALSE"
 
-# src/library/base/R/dates.R: 170
-# stop(gettextf("unary %s not defined for \"Date\" objects", .Generic),
-#              domain = NA)
-msgid "unary %s not defined for \"Date\" objects"
-msgstr ""
-"jednoargumentowy operator '%s' nie jest określony dla obiektów klasy \"Date\""
+#. R/unix/system.unix.R: stop("'stderr' must be of length 1")
+#: R/unix/system.unix.R:0
+msgid "'stderr' must be of length 1"
+msgstr "'stderr' musi mieć długość 1"
 
-# src/library/base/R/dates.R: 176
-# stop(gettextf("%s not defined for \"Date\" objects", .Generic),
-#              domain = NA)
-# src/library/base/R/dates.R: 185
-# stop(gettextf("%s not defined for \"Date\" objects", .Generic),
-#          domain = NA)
-# src/library/base/R/dates.R: 191
-# stop(gettextf("%s not defined for \"Date\" objects", .Generic),
-#                   domain = NA)
-msgid "%s not defined for \"Date\" objects"
-msgstr "'%s' nie jest określone dla obiektów klasy \"Date\""
+#. R/unix/system.unix.R: stop("'stdout' must be of length 1")
+#: R/unix/system.unix.R:0
+msgid "'stdout' must be of length 1"
+msgstr "'stdout' musi mieć długość 1"
 
-# src/library/base/R/datetime.R: 661
-# stop("'from' must be specified")
-# src/library/base/R/dates.R: 242
-# stop("'from' must be specified")
-msgid "'from' must be specified"
-msgstr "argument 'from' musi być określony"
+#. R/frametools.R: stop("'subset' must be logical")
+#. R/frametools.R: stop("'subset' must be logical")
+#. R/frametools.R: stop("'subset' must be logical")
+#: R/frametools.R:0
+msgid "'subset' must be logical"
+msgstr "'subset' musi być zmienną logiczną"
 
-# src/library/base/R/dates.R: 243
-# stop("'from' must be a \"Date\" object")
-msgid "'from' must be a \"Date\" object"
-msgstr "argument 'from' musi być obiektem klasy \"Date\""
+#. R/datetime.R: stop("'tim' is not character or numeric")
+#: R/datetime.R:0
+msgid "'tim' is not character or numeric"
+msgstr "argument 'tim' nie jest tekstem ani liczbą"
 
-# src/library/base/R/datetime.R: 664
-# stop("'from' must be of length 1")
-# src/library/base/R/dates.R: 244
-# stop("'from' must be of length 1")
-# src/library/base/R/seq.R: 51
-# stop("'from' must be of length 1")
-# src/main/seq.c: 776
-# error("'from' must be of length 1")
-msgid "'from' must be of length 1"
-msgstr "argument 'from' musi mieć długość 1"
+#. R/connections.R: stop("'timeout' must be NULL or a non-negative number")
+#: R/connections.R:0
+msgid "'timeout' must be NULL or a non-negative number"
+msgstr "argument 'timeout' musi być wartością NULL lub nieujemną liczbą"
+
+#. R/seq.R: stop("'to' cannot be NA, NaN or infinite")
+#: R/seq.R:0
+msgid "'to' cannot be NA, NaN or infinite"
+msgstr "argument 'to' nie może mieć wartości NA, NaN lub nieskończoność"
 
-# src/library/base/R/dates.R: 246
-# stop("'to' must be a \"Date\" object")
+#. R/dates.R: stop("'to' must be a \"Date\" object")
+#: R/dates.R:0
 msgid "'to' must be a \"Date\" object"
 msgstr "argument 'to' musi być obiektem klasy \"Date\""
 
-# src/library/base/R/datetime.R: 668
-# stop("'to' must be of length 1")
-# src/library/base/R/dates.R: 247
-# stop("'to' must be of length 1")
-# src/library/base/R/seq.R: 52
-# stop("'to' must be of length 1")
-# src/main/seq.c: 778
-# error("'to' must be of length 1")
+#. R/datetime.R: stop("'to' must be a \"POSIXt\" object")
+#: R/datetime.R:0
+msgid "'to' must be a \"POSIXt\" object"
+msgstr "argument 'to' musi być obiektem klasy \"POSIXt\""
+
+#. R/dates.R: stop("'to' must be of length 1")
+#. R/datetime.R: stop("'to' must be of length 1")
+#. R/seq.R: stop("'to' must be of length 1")
+#: R/dates.R:0 R/datetime.R:0 R/seq.R:0
 msgid "'to' must be of length 1"
 msgstr "argument 'to' musi mieć długość 1"
 
-# src/library/base/R/datetime.R: 673
-# stop("'length.out' must be of length 1")
-# src/library/base/R/dates.R: 252
-# stop("'length.out' must be of length 1")
-msgid "'length.out' must be of length 1"
-msgstr "argument 'length.out' musi mieć długość 1"
+#. R/all.equal.R: stop("'tolerance' should be numeric")
+#: R/all.equal.R:0
+msgid "'tolerance' should be numeric"
+msgstr "argument 'tolerance' musi być liczbą"
 
-# src/library/base/R/datetime.R: 678
-# stop("exactly two of 'to', 'by' and 'length.out' / 'along.with' must be specified")
-# src/library/base/R/dates.R: 257
-# stop("exactly two of 'to', 'by' and 'length.out' / 'along.with' must be specified")
-msgid "exactly two of 'to', 'by' and 'length.out' / 'along.with' must be specified"
-msgstr ""
-"dokładnie dwa z 'to', 'by' oraz 'length.out' / 'along.with' muszą być "
-"określone"
+#. R/mean.R: stop("'trim' must be numeric of length one")
+#: R/mean.R:0
+msgid "'trim' must be numeric of length one"
+msgstr "argument 'trim' musi być liczbą o długości 1"
 
-# src/library/base/R/datetime.R: 689
-# stop("'by' must be of length 1")
-# src/library/base/R/dates.R: 265
-# stop("'by' must be of length 1")
-# src/main/seq.c: 786
-# error("'by' must be of length 1")
-msgid "'by' must be of length 1"
-msgstr "argument 'by' musi mieć długość 1"
+#. R/datetime.R: warning("'tzone' attributes are inconsistent")
+#: R/datetime.R:0
+msgid "'tzone' attributes are inconsistent"
+msgstr "atrybuty 'tzone' są niespójne"
 
-# src/library/base/R/datetime.R: 697
-# stop("invalid 'by' string")
-# src/library/base/R/dates.R: 273
-# stop("invalid 'by' string")
-msgid "invalid 'by' string"
-msgstr "błędny łańcuch 'by'"
+#. R/dataframe.R: stop("'value' is the wrong length")
+#: R/dataframe.R:0
+msgid "'value' is the wrong length"
+msgstr "argument 'value' posiada niepoprawną długość"
 
-# src/library/base/R/datetime.R: 701
-# stop("invalid string for 'by'")
-# src/library/base/R/dates.R: 276
-# stop("invalid string for 'by'")
-msgid "invalid string for 'by'"
-msgstr "błędny łańcuch dla argumentu 'by'"
+#. R/attr.R: stop("'value' must be a list")
+#: R/attr.R:0
+msgid "'value' must be a list"
+msgstr "argument 'value' musi być listą"
 
-# src/library/base/R/datetime.R: 707
-# stop("invalid mode for 'by'")
-# src/library/base/R/dates.R: 282
-# stop("invalid mode for 'by'")
-msgid "invalid mode for 'by'"
-msgstr "błędny tryb dla argumentu 'by'"
+#. R/findInt.R: stop("'vec' must be sorted non-decreasingly and not contain NAs")
+#: R/findInt.R:0
+msgid "'vec' must be sorted non-decreasingly and not contain NAs"
+msgstr ""
+"argument 'vec' musi być posortowany w sposób niemalejący oraz nie mogą "
+"zawierać wartości NA"
 
-# src/library/base/R/datetime.R: 708
-# stop("'by' is NA")
-# src/library/base/R/dates.R: 283
-# stop("'by' is NA")
-msgid "'by' is NA"
-msgstr "'by' posiada wartość NA"
+#. R/library.R: message("'verbose' and 'quietly' are both true; being verbose then ..")
+#: R/library.R:0
+msgid "'verbose' and 'quietly' are both true; being verbose then .."
+msgstr ""
+"oba argumenty 'verbose' oraz 'quietly' są ustawione na tak; przyjmuję w "
+"takim razie tryb 'verbose' .."
 
-# src/library/base/R/datetime.R: 763
-# stop("'x' must be a date-time object")
-# src/library/base/R/dates.R: 331
-# stop("'x' must be a date-time object")
-msgid "'x' must be a date-time object"
-msgstr "argument 'x' musi być obiektem typu data-czas"
+#. R/source.R: warning("'verbose' is TRUE, 'echo' not; ... coercing 'echo <- TRUE'")
+#: R/source.R:0
+msgid "'verbose' is TRUE, 'echo' not; ... coercing 'echo <- TRUE'"
+msgstr ""
+"argument 'verbose' jest TRUE, argument 'echo' nie; ... przekształcanie 'echo "
+"<- TRUE'"
 
-# src/library/graphics/R/datetime.R: 116
-# stop("invalid specification of 'breaks'")
-# src/library/graphics/R/datetime.R: 169
-# stop("invalid specification of 'breaks'")
-# src/library/graphics/R/datetime.R: 271
-# stop("invalid specification of 'breaks'")
-# src/library/graphics/R/datetime.R: 314
-# stop("invalid specification of 'breaks'")
-# src/library/base/R/datetime.R: 773
-# stop("invalid specification of 'breaks'")
-# src/library/base/R/datetime.R: 778
-# stop("invalid specification of 'breaks'")
-# src/library/base/R/datetime.R: 831
-# stop("invalid specification of 'breaks'")
-# src/library/base/R/dates.R: 341
-# stop("invalid specification of 'breaks'")
-# src/library/base/R/dates.R: 345
-# stop("invalid specification of 'breaks'")
-# src/library/base/R/dates.R: 398
-# stop("invalid specification of 'breaks'")
-msgid "invalid specification of 'breaks'"
-msgstr "niepoprawne określenie dla 'breaks'"
+#. R/unix/system.unix.R: stop("'wait' must be TRUE or FALSE")
+#. R/unix/system.unix.R: stop("'wait' must be TRUE or FALSE")
+#. R/windows/system.R: stop("'wait' must be TRUE or FALSE")
+#. R/windows/system.R: stop("'wait' must be TRUE or FALSE")
+#: R/unix/system.unix.R:0 R/windows/system.R:0
+msgid "'wait' must be TRUE or FALSE"
+msgstr "argument 'wait' musi mieć wartość TRUE lub FALSE"
 
-# src/library/base/R/datetime.R: 847
-# stop("'origin' must be of length one")
-# src/library/base/R/dates.R: 411
-# stop("'origin' must be of length one")
-msgid "'origin' must be of length one"
-msgstr "argument 'origin' musi mieć długość 1"
+#. R/unix/system.unix.R: warning("'which' was not found on this platform")
+#: R/unix/system.unix.R:0
+msgid "'which' was not found on this platform"
+msgstr "'which' nie zostało znalezione na tej platformie"
 
-# src/library/base/R/diff.R: 27
-# stop("'lag' and 'differences' must be integers >= 1")
-# src/library/base/R/datetime.R: 946
-# stop("'lag' and 'differences' must be integers >= 1")
-# src/library/base/R/dates.R: 451
-# stop("'lag' and 'differences' must be integers >= 1")
-msgid "'lag' and 'differences' must be integers >= 1"
-msgstr "argumenty 'lag' oraz 'differences' muszą być liczbami całkowitymi >= 1"
+#. R/toString.R: stop("'width' must be positive")
+#: R/toString.R:0
+msgid "'width' must be positive"
+msgstr "argument 'width' musi być dodatni"
 
-# src/library/tools/R/pdftools.R: 347
-# stop("wrong class")
-# src/library/tools/R/pdftools.R: 362
-# stop("wrong class")
-# src/library/tools/R/pdftools.R: 1167
-# stop("wrong class")
-# src/library/tools/R/pdftools.R: 1259
-# stop("wrong class")
-# src/library/tools/R/pdftools.R: 1371
-# stop("wrong class")
-# src/library/tools/R/pdftools.R: 1412
-# stop("wrong class")
-# src/library/tools/R/pdftools.R: 1460
-# stop("wrong class")
-# src/library/tools/R/pdftools.R: 1491
-# stop("wrong class")
-# src/library/base/R/version.R: 128
-# stop("wrong class")
-# src/library/base/R/datetime.R: 164
-# stop("wrong class")
-# src/library/base/R/datetime.R: 207
-# stop("wrong class")
-# src/library/base/R/library.R: 777
-# stop("wrong class")
-msgid "wrong class"
-msgstr "błędna klasa"
+#. R/srcfile.R: stop("'x' and 'to' must refer to same file")
+#: R/srcfile.R:0
+msgid "'x' and 'to' must refer to same file"
+msgstr "argumenty 'X' oraz 'to' muszą odnosić się do tego samego pliku"
 
-# src/library/base/R/datetime.R: 264
-# stop("binary '+' is not defined for \"POSIXt\" objects")
-msgid "binary '+' is not defined for \"POSIXt\" objects"
-msgstr ""
-"dwuargumentowy operator '+' nie jest określony dla obiektów klasy \"POSIXt\""
+#. R/strwrap.R: stop("'x' and 'y' must have the same length")
+#: R/strwrap.R:0
+msgid "'x' and 'y' must have the same length"
+msgstr "'x' oraz 'y' muszą mieć tę samą długość"
 
-# src/library/base/R/datetime.R: 280
-# stop("can only subtract from \"POSIXt\" objects")
-msgid "can only subtract from \"POSIXt\" objects"
-msgstr "można odejmować jedynie od obiektów klasy \"POSIXt\""
+#. R/octhex.R: stop("'x' cannot be coerced to class \"hexmode\"")
+#: R/octhex.R:0
+msgid "'x' cannot be coerced to class \"hexmode\""
+msgstr "argument 'x' nie może zostać przekształcony na klasę \"hexmode\""
 
-# src/library/base/R/datetime.R: 281
-# stop("unary '-' is not defined for \"POSIXt\" objects")
-msgid "unary '-' is not defined for \"POSIXt\" objects"
-msgstr ""
-"jednoargumentowy operator '-' nie jest określony dla obiektów klasy \"POSIXt"
-"\""
+#. R/octhex.R: stop("'x' cannot be coerced to class \"octmode\"")
+#: R/octhex.R:0
+msgid "'x' cannot be coerced to class \"octmode\""
+msgstr "argument 'x' nie może zostać przekształcony na klasę \"octmode\""
 
-# src/library/base/R/datetime.R: 285
-# stop("can only subtract numbers from \"POSIXt\" objects")
-msgid "can only subtract numbers from \"POSIXt\" objects"
-msgstr "można odejmować jedynie liczby od obiektów klasy \"POSIXt\""
+#. R/diag.R: stop("'x' is an array, but not one-dimensional.")
+#: R/diag.R:0
+msgid "'x' is an array, but not one-dimensional."
+msgstr "argument 'x' jest tablicą, ale nie jednowymiarową."
 
-# src/library/base/R/datetime.R: 293
-# stop(gettextf("unary '%s' not defined for \"POSIXt\" objects",
-#                       .Generic), domain = NA)
-msgid "unary '%s' not defined for \"POSIXt\" objects"
-msgstr ""
-"jednoargumentowy operator '%s' nie jest określony dla obiektów klasy \"POSIXt"
-"\""
+#. R/table.R: stop("'x' is not an array")
+#: R/table.R:0
+msgid "'x' is not an array"
+msgstr "argument 'x' nie jest tablicą"
 
-# src/library/base/R/datetime.R: 298
-# stop(gettextf("'%s' not defined for \"POSIXt\" objects", .Generic),
-#              domain = NA)
-# src/library/base/R/datetime.R: 308
-# stop(gettextf("'%s' not defined for \"POSIXt\" objects", .Generic),
-#          domain = NA)
-# src/library/base/R/datetime.R: 328
-# stop(gettextf("'%s' not defined for \"POSIXt\" objects", .Generic),
-#              domain = NA)
-# src/library/base/R/datetime.R: 342
-# stop(gettextf("'%s' not defined for \"POSIXt\" objects", .Generic),
-#              domain = NA)
-msgid "'%s' not defined for \"POSIXt\" objects"
-msgstr "'%s' nie jest określone dla obiektów klasy \"POSIXt\""
+#. R/dates.R: stop("'x' must be a date-time object")
+#. R/datetime.R: stop("'x' must be a date-time object")
+#: R/dates.R:0 R/datetime.R:0
+msgid "'x' must be a date-time object"
+msgstr "argument 'x' musi być obiektem typu data-czas"
 
-# src/library/base/R/datetime.R: 320
-# warning("'tzone' attributes are inconsistent")
-msgid "'tzone' attributes are inconsistent"
-msgstr "atrybuty 'tzone' są niespójne"
+#. R/det.R: stop("'x' must be a square matrix")
+#: R/det.R:0
+msgid "'x' must be a square matrix"
+msgstr "argument 'x' musi być macierzą kwadratową"
 
-# src/library/base/R/datetime.R: 483
-# stop("'tim' is not character or numeric")
-msgid "'tim' is not character or numeric"
-msgstr "argument 'tim' nie jest tekstem ani liczbą"
+#. R/rle.R: stop("'x' must be a vector of an atomic type")
+#: R/rle.R:0
+msgid "'x' must be a vector of an atomic type"
+msgstr "'x' musi być wektorem o typie atomowym"
 
-# src/library/base/R/datetime.R: 484
-# stop("need explicit units for numeric conversion")
-msgid "need explicit units for numeric conversion"
+#. R/colSums.R: stop("'x' must be an array of at least two dimensions")
+#. R/colSums.R: stop("'x' must be an array of at least two dimensions")
+#. R/colSums.R: stop("'x' must be an array of at least two dimensions")
+#. R/colSums.R: stop("'x' must be an array of at least two dimensions")
+#: R/colSums.R:0
+msgid "'x' must be an array of at least two dimensions"
+msgstr "argument 'x' musi być tablicą o co najmniej dwóch wymiarach"
+
+#. R/sort.R: stop("'x' must be atomic")
+#: R/sort.R:0
+msgid "'x' must be atomic"
+msgstr "argument 'x' musi być atomowy"
+
+#. R/sort.R: stop("'x' must be atomic for 'sort.list'\nHave you called 'sort' on a list?")
+#: R/sort.R:0
+msgid ""
+"'x' must be atomic for 'sort.list'\n"
+"Have you called 'sort' on a list?"
 msgstr ""
-"'as.difftime()' potrzebuje sprecyzowanego argumentu 'units' dla konwersji "
-"liczbowej"
+"'x' musi być typem atomowym dla 'sort.list'\n"
+"Czy wywołano 'sort' na liście?"
 
-# src/library/base/R/datetime.R: 486
-# stop("invalid units specified")
-# src/library/base/R/datetime.R: 503
-# stop("invalid units specified")
-msgid "invalid units specified"
-msgstr "niepoprawne określenie 'units'"
+#. R/cut.R: stop("'x' must be numeric")
+#. R/jitter.R: stop("'x' must be numeric")
+#. R/rowsum.R: stop("'x' must be numeric")
+#: R/cut.R:0 R/jitter.R:0 R/rowsum.R:0
+msgid "'x' must be numeric"
+msgstr "argument 'x' musi być liczbą"
 
-# src/library/base/R/datetime.R: 555
-# stop(gettextf("unary '%s' not defined for \"difftime\" objects",
-#                              .Generic), domain = NA, call. = FALSE)
-msgid "unary '%s' not defined for \"difftime\" objects"
+#. R/table.R: gettextf("'x' must inherit from class %s", dQuote("summary.table"))
+#: R/table.R:0
+msgid "'x' must inherit from class %s"
+msgstr "argument 'x' musi dziedziczyć z klasy %s"
+
+#. R/format.R: stop("'zero.print' has length > 1")
+#: R/format.R:0
+msgid "'zero.print' has length > 1"
+msgstr "'zero.print' ma długość > 1"
+
+#. R/format.R: stop("'zero.print' must be character, logical or NULL")
+#: R/format.R:0
+msgid "'zero.print' must be character, logical or NULL"
+msgstr "'zero.print' musi być tekstem, wartością logiczną lub NULL"
+
+#. R/attach.R: warning("*** 'pos=1' is not possible; setting 'pos=2' for now.\n",     "*** Note that 'pos=1' will give an error in the future")
+#: R/attach.R:0
+msgid "*** 'pos=1' is not possible; setting 'pos=2' for now."
+msgstr "*** 'pos=1' nie jest możliwe; na chwilę obecną ustawianie 'pos=2'."
+
+#. R/attach.R: warning("*** 'pos=1' is not possible; setting 'pos=2' for now.\n",     "*** Note that 'pos=1' will give an error in the future")
+#: R/attach.R:0
+msgid "*** Note that 'pos=1' will give an error in the future"
+msgstr "*** Zwróć uwagę, że 'pos=1' będzie zwracało błąd w przyszłości"
+
+#. R/../../../../share/R/REMOVE.R: stop("-l option without value", call. = FALSE)
+#: R/../../../../share/R/REMOVE.R:0
+msgid "-l option without value"
+msgstr "opcja -l bez wartości"
+
+#. R/rm.R: stop("... must contain names or character strings")
+#: R/rm.R:0
+msgid "... must contain names or character strings"
+msgstr "'...' musi zawierać nazwy lub łańcuchy tekstowe"
+
+#. R/eigen.R: stop("0 x 0 matrix")
+#: R/eigen.R:0
+msgid "0 x 0 matrix"
+msgstr "macierz ma rozmiar 0 x 0"
+
+#. R/version.R: gettext("<0 elements>")
+#: R/version.R:0
+msgid "<0 elements>"
+msgstr "<0 elementów>"
+
+#. R/dataframe.R: gettext("<0 rows> (or 0-length row.names)\n")
+#: R/dataframe.R:0
+msgid "<0 rows> (or 0-length row.names)"
+msgstr "<0 wierszy> (lub 'row.names' o zerowej długości)"
+
+#. R/library.R: gettextf("\nAttaching package: %s\n", sQuote(package))
+#: R/library.R:0
+msgid "Attaching package: %s"
+msgstr "Dołączanie pakietu: %s"
+
+#. R/load.R: gettextf("Attempting to load the environment %s", sQuote(info))
+#: R/load.R:0
+msgid "Attempting to load the environment %s"
+msgstr "Próba załadowania środowiska %s"
+
+#. R/library.R: gettextf("DLL %s already loaded", sQuote(chname1))
+#: R/library.R:0
+msgid "DLL %s already loaded"
+msgstr "plik DLL %s jest już załadowany"
+
+#. R/library.R: gettextf("DLL %s not found", sQuote(chname1))
+#: R/library.R:0
+msgid "DLL %s not found"
+msgstr "plik DLL %s nie został znaleziony"
+
+#. R/library.R: gettextf("DLL %s not found: maybe not installed for this architecture?",     sQuote(chname))
+#: R/library.R:0
+msgid "DLL %s not found: maybe not installed for this architecture?"
 msgstr ""
-"jednoargumentowy operator '%s' nie jest określony dla obiektów klasy "
-"\"difftime\""
+"plik DLL %s nie został znaleziony: być może nie został zainstalowany dla tej "
+"architektury?"
 
-# src/library/base/R/datetime.R: 586
-# stop(gettextf("'%s' not defined for \"difftime\" objects", .Generic),
-#              domain = NA)
-# src/library/base/R/datetime.R: 618
-# stop(gettextf("'%s' not defined for \"difftime\" objects", .Generic),
-#                 domain = NA)
-# src/library/base/R/datetime.R: 637
-# stop(gettextf("'%s' not defined for \"difftime\" objects", .Generic),
-#              domain = NA)
-msgid "'%s' not defined for \"difftime\" objects"
-msgstr "'%s' nie jest określone dla obiektów klasy \"difftime\""
+#. R/library.R: gettextf("DLL %s was not loaded", sQuote(chname1))
+#: R/library.R:0
+msgid "DLL %s was not loaded"
+msgstr "plik DLL %s nie został załadowany"
 
-# src/library/base/R/datetime.R: 595
-# stop("both arguments of * cannot be \"difftime\" objects")
-msgid "both arguments of * cannot be \"difftime\" objects"
-msgstr "oba argumenty operatora '*' nie mogą być obiektami klasy \"difftime\""
+#. R/library.R: gettext("Description:")
+#: R/library.R:0
+msgid "Description:"
+msgstr "Opis:"
 
-# src/library/base/R/datetime.R: 604
-# stop("second argument of / cannot be a \"difftime\" object")
-msgid "second argument of / cannot be a \"difftime\" object"
-msgstr "drugi argument operatora '/' nie może być obiektem klasy \"difftime\""
+#. R/library.R: gettextf("Documentation for package %s", sQuote(x$name))
+#: R/library.R:0
+msgid "Documentation for package %s"
+msgstr "Dokumentacja dla pakietu %s"
 
-# src/library/base/R/datetime.R: 662
-# stop("'from' must be a \"POSIXt\" object")
-msgid "'from' must be a \"POSIXt\" object"
-msgstr "argument 'from' musi być obiektem klasy \"POSIXt\""
+#. R/../../../../share/R/REMOVE.R: stop("ERROR: cannot cd to directory ", sQuote(lib), call. = FALSE)
+#: R/../../../../share/R/REMOVE.R:0
+msgid "ERROR: cannot cd to directory"
+msgstr "BŁĄD: nie można wejść do katalogu"
 
-# src/library/base/R/datetime.R: 667
-# stop("'to' must be a \"POSIXt\" object")
-msgid "'to' must be a \"POSIXt\" object"
-msgstr "argument 'to' musi być obiektem klasy \"POSIXt\""
+#. R/../../../../share/R/REMOVE.R: stop("ERROR: no packages specified", call. = FALSE)
+#: R/../../../../share/R/REMOVE.R:0
+msgid "ERROR: no packages specified"
+msgstr "BŁĄD: nie określono pakietów"
 
-# src/library/base/R/datetime.R: 1029
-# warning("no Olson database found")
-msgid "no Olson database found"
-msgstr "nie znaleziono bazy Olsona"
+#. R/../../../../share/R/REMOVE.R: stop("ERROR: no permission to remove from directory ", sQuote(lib),     call. = FALSE)
+#: R/../../../../share/R/REMOVE.R:0
+msgid "ERROR: no permission to remove from directory"
+msgstr "BŁĄD: brak uprawnień aby usunąć z katalogu"
 
-# src/library/stats/R/ftable.R: 281
-# stop("'file' must be a character string or connection")
-# src/library/base/R/dcf.R: 27
-# stop("'file' must be a character string or connection")
-# src/library/base/R/dcf.R: 143
-# stop("'file' must be a character string or connection")
-# src/library/base/R/scan.R: 49
-# stop("'file' must be a character string or connection")
-# src/library/utils/R/readtable.R: 28
-# stop("'file' must be a character string or connection")
-# src/library/utils/R/readtable.R: 61
-# stop("'file' must be a character string or connection")
-# src/library/utils/R/write.table.R: 113
-# stop("'file' must be a character string or connection")
-msgid "'file' must be a character string or connection"
-msgstr "argument 'file' musi być łańcuchem tekstowym lub połączeniem"
+#. R/library.R: gettextf("Further information is available in the following vignettes in directory %s:",     sQuote(file.path(x$path, "doc")))
+#: R/library.R:0
+msgid ""
+"Further information is available in the following vignettes in directory %s:"
+msgstr ""
+"Dalsza informacja jest dostępna w następujących ilustracjach w katalogu %s:"
+
+#. R/library.R: gettext("Index:")
+#: R/library.R:0
+msgid "Index:"
+msgstr "Indeks:"
+
+#. R/library.R: gettextf("\n\t\tInformation on package %s", sQuote(x$name))
+#: R/library.R:0
+msgid "Information on package %s"
+msgstr "Informacja dotycząca pakietu %s"
 
-# src/library/base/R/dcf.R: 78
-# stop(gettextf("Invalid DCF format.\nRegular lines must have a tag.\nOffending lines start with:\n%s",
-#                       paste0("  ", lines, collapse = "\n")),
-#              domain = NA)
-msgid "Invalid DCF format.\nRegular lines must have a tag.\nOffending lines start with:\n%s"
+#. R/dcf.R: gettextf("Invalid DCF format.\nContinuation lines must not start a record.\nOffending lines start with:\n%s",     paste0("  ", lines, collapse = "\n"))
+#: R/dcf.R:0
+msgid ""
+"Invalid DCF format.\n"
+"Continuation lines must not start a record.\n"
+"Offending lines start with:\n"
+"%s"
 msgstr ""
 "Niepoprawny format DCF.\n"
-"Regularne linie muszą mieć znacznik.\n"
+"Linie uzupełniające nie mogą rozpoczynać rekordu.\n"
 "Przeszkadzające linie rozpoczynają się od:\n"
 "%s"
 
-# src/library/base/R/dcf.R: 102
-# stop(gettextf("Invalid DCF format.\nContinuation lines must not start a record.\nOffending lines start with:\n%s",
-#                       paste0("  ", lines, collapse = "\n")),
-#              domain = NA)
-msgid "Invalid DCF format.\nContinuation lines must not start a record.\nOffending lines start with:\n%s"
+#. R/dcf.R: gettextf("Invalid DCF format.\nRegular lines must have a tag.\nOffending lines start with:\n%s",     paste0("  ", lines, collapse = "\n"))
+#: R/dcf.R:0
+msgid ""
+"Invalid DCF format.\n"
+"Regular lines must have a tag.\n"
+"Offending lines start with:\n"
+"%s"
 msgstr ""
 "Niepoprawny format DCF.\n"
-"Linie uzupełniające nie mogą rozpoczynać rekordu.\n"
+"Regularne linie muszą mieć znacznik.\n"
 "Przeszkadzające linie rozpoczynają się od:\n"
 "%s"
 
-# src/library/base/R/det.R: 36
-# stop("'x' must be a square matrix")
-msgid "'x' must be a square matrix"
-msgstr "argument 'x' musi być macierzą kwadratową"
-
-# src/library/base/R/det.R: 44
-# stop("'determinant' not currently defined for complex matrices")
-msgid "'determinant' not currently defined for complex matrices"
-msgstr ""
-"funkcja 'determinant()' nie jest aktualnie zdefiniowana dla macierzy "
-"zespolonych"
-
-# src/library/base/R/diag.R: 23
-# stop("'nrow' or 'ncol' cannot be specified when 'x' is a matrix")
-msgid "'nrow' or 'ncol' cannot be specified when 'x' is a matrix"
-msgstr "'nrow' ani 'ncol' nie mogą być określone kiedy 'x' jest macierzą"
-
-# src/library/base/R/diag.R: 35
-# stop("'x' is an array, but not one-dimensional.")
-msgid "'x' is an array, but not one-dimensional."
-msgstr "argument 'x' jest tablicą, ale nie jednowymiarową."
-
-# src/library/base/R/diag.R: 53
-# stop("only matrix diagonals can be replaced")
-msgid "only matrix diagonals can be replaced"
-msgstr "tylko elementy diagonalne macierzy mogą zostać zastąpione"
+#. R/namespace.R: gettextf("Loading required namespace: %s", package)
+#: R/namespace.R:0
+msgid "Loading required namespace: %s"
+msgstr "Ładowanie wymaganej przestrzeni nazw: %s"
 
-# src/library/base/R/diag.R: 57
-# stop("replacement diagonal has wrong length")
-msgid "replacement diagonal has wrong length"
-msgstr "zamiana elementów diagonalnych ma niepoprawną długość"
+#. R/library.R: gettextf("Loading required package: %s", package)
+#. R/library.R: gettextf("Loading required package: %s", pkg)
+#: R/library.R:0
+msgid "Loading required package: %s"
+msgstr "Ładowanie wymaganego pakietu: %s"
 
-# src/library/base/R/duplicated.R: 44
-# stop(gettextf("MARGIN = %d is invalid for dim = %d", MARGIN, dx),
-#              domain = NA)
-# src/library/base/R/duplicated.R: 78
-# stop(gettextf("MARGIN = %d is invalid for dim = %d", MARGIN, dx),
-#              domain = NA)
-# src/library/base/R/duplicated.R: 122
-# stop(gettextf("MARGIN = %d is invalid for dim = %d", MARGIN, dx),
-#              domain = NA)
+#. R/duplicated.R: gettextf("MARGIN = %d is invalid for dim = %d", MARGIN, dx)
+#. R/duplicated.R: gettextf("MARGIN = %d is invalid for dim = %d", MARGIN, dx)
+#. R/duplicated.R: gettextf("MARGIN = %d is invalid for dim = %d", MARGIN, dx)
+#: R/duplicated.R:0
 msgid "MARGIN = %d is invalid for dim = %d"
 msgstr "MARGIN = %d jest niepoprawny dla dim =%d"
 
-# src/library/base/R/dynload.R: 49
-# stop(gettextf("must pass a package name, %s or %s object",
-#                       dQuote("DLLInfo"),
-#                       dQuote("DllInfoReference")),
-#              domain = NA)
-msgid "must pass a package name, %s or %s object"
-msgstr "wymagane jest przekazanie nazwy pakietu %s lub obiekt %s"
-
-# src/library/base/R/dynload.R: 88
-# stop(gettextf("No DLL currently loaded with name or path %s", sQuote(dll)),
-#              domain = NA)
+#. R/dynload.R: gettextf("No DLL currently loaded with name or path %s", sQuote(dll))
+#: R/dynload.R:0
 msgid "No DLL currently loaded with name or path %s"
 msgstr "Brak biblioteki DLL aktualnie załadowanej o nazwie lub ścieżce %s"
 
-# src/library/base/R/dynload.R: 93
-# warning(gettextf("multiple DLLs match '%s'. Using '%s'",
-#                          dll, dll[["path"]]), domain = NA)
-msgid "multiple DLLs match '%s'. Using '%s'"
-msgstr "wielokrotna zgodność plików DLL z '%s'. Używanie '%s'"
+#. R/interaction.R: stop("No factors specified")
+#: R/interaction.R:0
+msgid "No factors specified"
+msgstr "Nie określono czynników"
 
-# src/library/base/R/dynload.R: 104
-# stop(gettextf("must specify DLL via a %s object. See getLoadedDLLs()",
-#                       dQuote("DLLInfo")),
-#              domain = NA)
-msgid "must specify DLL via a %s object. See getLoadedDLLs()"
+#. R/namespace.R: gettextf("No generic function %s found corresponding to requested imported methods from package %s when loading %s (malformed exports?)",     sQuote(g), sQuote(pkg), sQuote(from))
+#: R/namespace.R:0
+msgid ""
+"No generic function %s found corresponding to requested imported methods "
+"from package %s when loading %s (malformed exports?)"
 msgstr ""
-"wymagane jest określenie DLL przez obiekt klasy %s. Zobacz 'getLoadedDLLs()'"
+"Nie znaleziono ogólnej funkcji %s odpowiadającej zażądanym zaimportowanym "
+"metodom z pakietu '%s' podczas ładowania %s (uszkodzone eksporty?)"
 
-# src/library/base/R/dynload.R: 178
-# stop("function is not in a namespace, so cannot locate associated DLL")
-msgid "function is not in a namespace, so cannot locate associated DLL"
-msgstr ""
-"funkcja nie jest w przestrzeni nazw tak więc nie można zlokalizować "
-"powiązanego pliku DLL"
+#. R/namespace.R: gettextf("No methods found in \"%s\" for requests: %s", pkg,     paste(vars[is.na(match(vars, allFuns))], collapse = ", "))
+#: R/namespace.R:0
+msgid "No methods found in \"%s\" for requests: %s"
+msgstr "Nie znaleziono metod w pakiecie '%s' dla żądań: %s"
 
-# src/library/base/R/dynload.R: 189
-# stop("looking for DLL for native routine call, but no DLLs in namespace of call")
-msgid "looking for DLL for native routine call, but no DLLs in namespace of call"
-msgstr ""
-"poszukiwanie pliku DLL dla wywołania rodzimej procedury, ale brak plików DLL "
-"w przestrzeni nazw wywołania"
+#. R/traceback.R: gettext("No traceback available")
+#: R/traceback.R:0
+msgid "No traceback available"
+msgstr "Śledzenie nie jest dostepne"
 
-# src/library/base/R/eigen.R: 40
-# stop("0 x 0 matrix")
-msgid "0 x 0 matrix"
-msgstr "macierz ma rozmiar 0 x 0"
+#. R/library.R: gettextf("Package %s version %s cannot be unloaded", sQuote(package),     oldversion)
+#: R/library.R:0
+msgid "Package %s version %s cannot be unloaded"
+msgstr "Pakiet %s w wersji %s nie może być zwolniony"
 
-# src/library/base/R/eigen.R: 41
-# stop("non-square matrix in 'eigen'")
-msgid "non-square matrix in 'eigen'"
-msgstr "macierz w funkcji 'eigen()' nie jest kwadratowa"
+#. R/dataframe.R: gettextf("Partial match of '%s' to '%s' in data frame", name,     names[pmatch(name, names)])
+#: R/dataframe.R:0
+msgid "Partial match of '%s' to '%s' in data frame"
+msgstr "Częściowe dopasowanie '%s' do '%s' w ramce danych"
 
-# src/library/stats/R/kmeans.R: 84
-# stop("invalid nrow(x)")
-# src/library/base/R/kappa.R: 88
-# stop("invalid nrow(x)")
-# src/library/base/R/eigen.R: 43
-# stop("invalid nrow(x)")
-# src/library/base/R/qr.R: 35
-# stop("invalid nrow(x)")
-msgid "invalid nrow(x)"
-msgstr "niepoprawna wartość 'nrow(x)'"
+#. R/library.R: gettext("R packages available")
+#: R/library.R:0
+msgid "R packages available"
+msgstr "Dostępne pakiety R"
 
-# src/library/base/R/factor.R: 41
-# stop(gettextf("invalid 'labels'; length %d should be 1 or %d", nl, nL),
-# 	     domain = NA)
-msgid "invalid 'labels'; length %d should be 1 or %d"
-msgstr "nieprawidłowe 'labels'; długość %d powinna wynosić 1 lub %d"
+#. R/taskCallback.R: gettext("Registering 'evaluate' as low-level callback\n")
+#: R/taskCallback.R:0
+msgid "Registering 'evaluate' as low-level callback"
+msgstr "Rejestrowanie 'evaluate' jako wywołania zwrotnego niskiego poziomu"
 
-# src/library/base/R/factor.R: 78
-# stop("number of levels differs")
-msgid "number of levels differs"
-msgstr "liczba poziomów różni się"
+#. R/taskCallback.R: gettextf("Removing %s", paste(discard, collapse = ", "))
+#: R/taskCallback.R:0
+msgid "Removing %s"
+msgstr "Usuwanie %s"
 
-# src/library/base/R/factor.R: 162
-# stop(.Generic, " not meaningful for factors")
-# src/library/base/R/factor.R: 166
-# stop(.Generic, " not meaningful for factors")
-# src/library/base/R/factor.R: 171
-# warning(.Generic, " not meaningful for factors")
-msgid "not meaningful for factors"
-msgstr "nie ma sensu dla czynników"
-
-# src/library/base/R/factor.R: 195
-# stop("level sets of factors are different")
-# src/library/base/R/factor.R: 287
-# stop("level sets of factors are different")
-msgid "level sets of factors are different"
-msgstr "poziomy czynników są różne"
+#. R/../../../../share/R/REMOVE.R: message("Removing from library ", sQuote(lib))
+#: R/../../../../share/R/REMOVE.R:0
+msgid "Removing from library"
+msgstr "Usuwanie z biblioteki"
 
-# src/library/base/R/factor.R: 221
-# warning("invalid factor level, NA generated")
-# src/library/base/R/factor.R: 246
-# warning("invalid factor level, NA generated")
-msgid "invalid factor level, NA generated"
-msgstr "niepoprawny poziom czynnika, wygenerowano wartość NA"
+#. R/namespace.R: gettextf("S3 method %s was declared but not found", sQuote(method))
+#: R/namespace.R:0
+msgid "S3 method %s was declared but not found"
+msgstr "metoda S3 %s została zadeklarowana, ale nie została znaleziona"
 
-# src/library/base/R/factor.R: 268
-# warning(sprintf("'%s' is not meaningful for ordered factors",
-#                         .Generic))
-msgid "'%s' is not meaningful for ordered factors"
-msgstr "'%s' nie ma sensu dla uporządkowanych czynników"
+#. R/sweep.R: warning("STATS does not recycle exactly across MARGIN")
+#: R/sweep.R:0
+msgid "STATS does not recycle exactly across MARGIN"
+msgstr "STATS nie powtarza się dokładnie zgodnie z MARGIN"
 
-# src/library/base/R/factor.R: 310
-# stop(gettextf("'%s' not defined for ordered factors", .Generic),
-# 	     domain = NA)
-msgid "'%s' not defined for ordered factors"
-msgstr "'%s' nie jest określone dla uporządkowanych czynników"
+#. R/sweep.R: warning("STATS is longer than the extent of 'dim(x)[MARGIN]'")
+#: R/sweep.R:0
+msgid "STATS is longer than the extent of 'dim(x)[MARGIN]'"
+msgstr "STATS jest dłuższe niż rozmiar 'dim(x)[MARGIN]'"
 
-# src/library/base/R/factor.R: 317
-# stop(gettextf("'%s' is only meaningful for ordered factors if all arguments have the same level sets",
-# 		      .Generic))
-msgid "'%s' is only meaningful for ordered factors if all arguments have the same level sets"
-msgstr ""
-"'%s' ma sens tylko dla uporządkowanych czynników jeśli wszystkie argumenty "
-"mają ten sam zbiór poziomów"
+#. R/Defunct.R: gettext("See help(\"Defunct\")")
+#: R/Defunct.R:0
+msgid "See help(\"Defunct\")"
+msgstr "Zobacz help(\"Defunct\")"
 
-# src/library/base/R/files.R: 107
-# stop("no files to copy to")
-msgid "no files to copy to"
-msgstr "brak plików do skopiowania"
+#. R/Defunct.R: gettextf("See help(\"Defunct\") and help(\"%s-defunct\").", package)
+#: R/Defunct.R:0
+msgid "See help(\"Defunct\") and help(\"%s-defunct\")."
+msgstr "Zobacz help(\"Defunct\") oraz help(\"%s-defunct\")."
 
-# src/library/base/R/files.R: 111
-# stop("attempt to copy a directory to itself")
-msgid "attempt to copy a directory to itself"
-msgstr "próba skopiowania katalogu do samego siebie"
+#. R/Deprecated.R: gettext("See help(\"Deprecated\")")
+#: R/Deprecated.R:0
+msgid "See help(\"Deprecated\")"
+msgstr "Zobacz help(\"Deprecated\")"
 
-# src/library/base/R/files.R: 119
-# stop("more 'from' files than 'to' files")
-# src/library/base/R/windows/junctions.R: 25
-# stop("more 'from' files than 'to' files")
-msgid "more 'from' files than 'to' files"
-msgstr "więcej plików 'from' niż plików 'to'"
+#. R/Deprecated.R: gettextf("See help(\"Deprecated\") and help(\"%s-deprecated\").",     package)
+#: R/Deprecated.R:0
+msgid "See help(\"Deprecated\") and help(\"%s-deprecated\")."
+msgstr "Zobacz help(\"Deprecated\") oraz help(\"%s-deprecated\")."
 
-# src/library/base/R/files.R: 121
-# warning("'recursive' will be ignored as 'to' is not a single existing directory")
-msgid "'recursive' will be ignored as 'to' is not a single existing directory"
+#. R/load.R: message("Specified environment not found: using '.GlobalEnv' instead")
+#: R/load.R:0
+msgid "Specified environment not found: using '.GlobalEnv' instead"
 msgstr ""
-"argument 'recursive' zostanie zignorowany ponieważ argument 'to' nie jest "
-"pojedynczym istniejącym katalogiem"
+"Nie znaleziono określonego środowiska: zamiast tego używanie '.GlobalEnv'"
 
-# src/library/base/R/files.R: 126
-# stop("file can not be copied both 'from' and 'to'")
-msgid "file can not be copied both 'from' and 'to'"
-msgstr "plik nie może być skopiowany jednocześnie z 'from' oraz 'to'"
+#. R/library.R: gettextf("This is R %s, package %s needs %s %s", current, sQuote(pkgname),     dep$op, target)
+#: R/library.R:0
+msgid "This is R %s, package %s needs %s %s"
+msgstr "To jest R %s, pakiet %s potrzebuje %s %s"
 
-# src/library/base/R/files.R: 141
-# stop("no files to link from")
-# src/library/base/R/files.R: 149
-# stop("no files to link from")
-msgid "no files to link from"
-msgstr "brak plików z których można łączyć"
+#. R/srcfile.R: gettextf("Timestamp of %s has changed", sQuote(srcfile$filename))
+#: R/srcfile.R:0
+msgid "Timestamp of %s has changed"
+msgstr "Sygnatura czasu dla %s zmieniła się"
 
-# src/library/base/R/files.R: 142
-# stop("no files/directory to link to")
-msgid "no files/directory to link to"
-msgstr "brak plików/katalogu do których można łączyć"
+#. R/Defunct.R: gettextf("Use '%s' instead.\n", new)
+#. R/Deprecated.R: gettextf("Use '%s' instead.\n", new)
+#: R/Defunct.R:0 R/Deprecated.R:0
+msgid "Use '%s' instead."
+msgstr "Użyj w zamian '%s'."
 
-# src/library/base/R/files.R: 150
-# stop("no files to link to")
-# src/library/base/R/windows/junctions.R: 22
-# stop("no files to link to")
-msgid "no files to link to"
-msgstr "brak plików do których można łączyć"
+#. R/load.R: message("[Previously saved workspace restored]", "\n")
+#: R/load.R:0
+msgid "[Previously saved workspace restored]"
+msgstr "[Poprzednio zapisany obszar roboczy został przywrócony]"
 
-# src/library/base/R/files.R: 181
-# stop("'package' must be of length 1")
-# src/library/base/R/library.R: 239
-# stop("'package' must be of length 1")
-msgid "'package' must be of length 1"
-msgstr "argument 'package' musi mieć długość 1"
+#. R/LAPACK.R: stop("a dimension is zero")
+#. R/svd.R: stop("a dimension is zero")
+#: R/LAPACK.R:0 R/svd.R:0
+msgid "a dimension is zero"
+msgstr "wymiar wynosi zero"
 
-# src/library/base/R/files.R: 188
-# stop("no file found")
-msgid "no file found"
-msgstr "nie znaleziono pliku"
+#. R/message.R: warning("additional arguments ignored in message()")
+#: R/message.R:0
+msgid "additional arguments ignored in message()"
+msgstr "dodatkowe argumenty zostały zignorowane w 'message()'"
 
-# src/library/base/R/files.R: 234
-# stop("invalid 'path' argument")
-msgid "invalid 'path' argument"
-msgstr "niepoprawny argument 'path'"
+#. R/stop.R: warning("additional arguments ignored in stop()")
+#: R/stop.R:0
+msgid "additional arguments ignored in stop()"
+msgstr "dodatkowe argumenty zostały zignorowane w 'stop()'"
 
-# src/library/base/R/files.R: 236
-# stop("invalid 'time' argument")
-msgid "invalid 'time' argument"
-msgstr "niepoprawny argument 'time'"
+#. R/stop.R: gettext("additional arguments ignored in warning()")
+#: R/stop.R:0
+msgid "additional arguments ignored in warning()"
+msgstr "dodatkowe argumenty zostały zignorowane w 'warning()'"
 
-# src/library/base/R/findInt.R: 27
-# stop("'vec' contains NAs")
-msgid "'vec' contains NAs"
-msgstr "argument 'vec' zawiera wartości NA"
+#. R/getenv.R: stop("all arguments must be named")
+#: R/getenv.R:0
+msgid "all arguments must be named"
+msgstr "wszystkie argumenty muszą być nazwane"
 
-# src/library/base/R/findInt.R: 29
-# stop("'vec' must be sorted non-decreasingly")
-msgid "'vec' must be sorted non-decreasingly"
-msgstr "argument 'vec' musi być posortowany w sposób niemalejący"
+#. R/table.R: stop("all arguments must have the same length")
+#: R/table.R:0
+msgid "all arguments must have the same length"
+msgstr "wszystkie argumenty muszą mieć tę samą długość"
 
-# src/library/base/R/formals.R: 36
-# warning("using the first element of 'value' of type \"expression\"")
-msgid "using the first element of 'value' of type \"expression\""
-msgstr "używanie pierwszego elementu 'value' typu \"expression\""
+#. R/pmax.R: warning("an argument will be fractionally recycled")
+#. R/pmax.R: warning("an argument will be fractionally recycled")
+#. R/pmax.R: warning("an argument will be fractionally recycled")
+#. R/pmax.R: warning("an argument will be fractionally recycled")
+#: R/pmax.R:0
+msgid "an argument will be fractionally recycled"
+msgstr "argument zostanie częściowo powtórzony"
 
-# src/library/base/R/format.R: 114
-# warning("class of 'x' was discarded")
-msgid "class of 'x' was discarded"
-msgstr "klasa argumentu 'x' została odrzucona"
+#. R/autoload.R: stop("an object with that name already exists")
+#: R/autoload.R:0
+msgid "an object with that name already exists"
+msgstr "obiekt o tej nazwie już istnieje"
 
-# src/library/base/R/format.R: 134
-# stop("'mode' must be \"double\" (\"real\"), \"integer\" or \"character\"")
-msgid "'mode' must be \"double\" (\"real\"), \"integer\" or \"character\""
-msgstr "'mode' musi być \"double\" (\"real\"), \"integer\" lub \"character\""
+#. R/notyet.R: gettextf("argument '%s' is not used (yet)", arg)
+#: R/notyet.R:0
+msgid "argument '%s' is not used (yet)"
+msgstr "argument %s nie został (jeszcze) użyty"
 
-# src/library/base/R/format.R: 137
-# warning('coercing argument to "character" for format="s"')
-msgid "coercing argument to \"character\" for format=\"s\""
-msgstr "przekształcanie argumentu w \"character\" dla 'format=\"s\"'"
+#. R/seq.R: stop("argument 'length.out' must be of length 1")
+#: R/seq.R:0
+msgid "argument 'length.out' must be of length 1"
+msgstr "argument 'length.out' musi mieć długość 1"
 
-# src/library/base/R/format.R: 151
-# stop('\'format\' must be one of {"f","e","E","g","G", "fg", "s"}')
-msgid "'format' must be one of {\"f\",\"e\",\"E\",\"g\",\"G\", \"fg\", \"s\"}"
+#. R/connections.R: stop("argument 'object' must deparse to a single character string")
+#: R/connections.R:0
+msgid "argument 'object' must deparse to a single character string"
 msgstr ""
-"argument 'format' musi być jednym z {\"f\",\"e\",\"E\",\"g\",\"G\", \"fg\", "
-"\"s\"}"
+"argument 'object' musi być konwertowalny do pojedynczego łańcucha tekstowego"
 
-# src/library/base/R/format.R: 168
-# warning(gettextf("'digits' reduced to %d", maxDigits),
-#                     domain = NA)
-msgid "'digits' reduced to %d"
-msgstr "'digits' zredukowano do %d"
+#. R/conflicts.R: stop("argument 'where' of length 0")
+#: R/conflicts.R:0
+msgid "argument 'where' of length 0"
+msgstr "argument 'where' ma długość 0"
 
-# src/library/base/R/format.R: 193
-# stop("'flag' can contain only '0+- #'")
-msgid "'flag' can contain only '0+- #'"
-msgstr "'flag' może zawierać jedynie znaki '0+- #'"
+#. R/qr.R: stop("argument is not a QR decomposition")
+#. R/qr.R: stop("argument is not a QR decomposition")
+#. R/qr.R: stop("argument is not a QR decomposition")
+#. R/qr.R: stop("argument is not a QR decomposition")
+#. R/qr.R: stop("argument is not a QR decomposition")
+#. R/qr.R: stop("argument is not a QR decomposition")
+#. R/qr.R: stop("argument is not a QR decomposition")
+#: R/qr.R:0
+msgid "argument is not a QR decomposition"
+msgstr "argument nie jest dekompozycją QR"
 
-# src/library/base/R/format.R: 230
-# warning("corrupt data frame: columns will be truncated or padded with NAs")
-msgid "corrupt data frame: columns will be truncated or padded with NAs"
+#. R/mean.R: warning("argument is not numeric or logical: returning NA")
+#: R/mean.R:0
+msgid "argument is not numeric or logical: returning NA"
 msgstr ""
-"uszkodzona ramka danych: kolumny będą obcięte lub uzupełnione wartościami "
-"'NA'"
-
-# src/library/base/R/format.R: 304
-# stop("'zero.print' has length > 1")
-msgid "'zero.print' has length > 1"
-msgstr "'zero.print' ma długość > 1"
-
-# src/library/base/R/format.R: 308
-# stop("'zero.print' must be character, logical or NULL")
-msgid "'zero.print' must be character, logical or NULL"
-msgstr "'zero.print' musi być tekstem, wartością logiczną lub NULL"
+"argument nie jest wartością liczbową ani logiczną: zwracanie wartości NA"
 
-# src/library/base/R/frametools.R: 26
-# stop("'subset' must be logical")
-# src/library/base/R/frametools.R: 42
-# stop("'subset' must be logical")
-# src/library/base/R/frametools.R: 56
-# stop("'subset' must be logical")
-msgid "'subset' must be logical"
-msgstr "'subset' musi być zmienną logiczną"
+#. R/sort.R: stop("argument lengths differ")
+#: R/sort.R:0
+msgid "argument lengths differ"
+msgstr "długości argumentów różnią się"
 
-# src/library/base/R/get.R: 28
-# stop(gettextf("value for %s not found", sQuote(x)), call. = FALSE)
-msgid "value for %s not found"
-msgstr "wartość dla %s nie została znaleziona"
+#. R/LAPACK.R: stop("argument to 'La.svd' must be numeric or complex")
+#: R/LAPACK.R:0
+msgid "argument to 'La.svd' must be numeric or complex"
+msgstr ""
+"argument przekazywany do 'La.svd()' musi być wartością logiczną, liczbą lub "
+"liczbą zespoloną"
 
-# src/library/base/R/getenv.R: 45
-# stop("all arguments must be named")
-# src/main/util.c: 1815
-# error(_("all arguments must be named"))
-msgid "all arguments must be named"
-msgstr "wszystkie argumenty muszą być nazwane"
+#. R/unix/system.unix.R: message("arguments 'minimized' and 'invisible' are for Windows only")
+#: R/unix/system.unix.R:0
+msgid "arguments 'minimized' and 'invisible' are for Windows only"
+msgstr "argumenty 'minimized' oraz 'invisible' są tylko dla systemu Windows"
 
-# src/library/base/R/grep.R: 153
-# stop("match distance components must be non-negative")
-# src/library/base/R/grep.R: 168
-# stop("match distance components must be non-negative")
-msgid "match distance components must be non-negative"
-msgstr "komponenty o dopasowanej odległości muszą być nieujemne"
+#. R/unix/system.unix.R: message("arguments 'show.output.on.console', 'minimized' and 'invisible' are for Windows only")
+#: R/unix/system.unix.R:0
+msgid ""
+"arguments 'show.output.on.console', 'minimized' and 'invisible' are for "
+"Windows only"
+msgstr ""
+"argumenty 'show.output.on.console', 'minimized' oraz 'invisible' są tylko "
+"dla systemu Windows"
 
-# src/library/base/R/grep.R: 161
-# warning("unknown match distance components ignored")
-msgid "unknown match distance components ignored"
-msgstr "nieznane komponenty o dopasowanej odległości zostały zignorowane"
+#. R/dataframe.R: gettextf("arguments imply differing number of rows: %s", paste(unique(nrows),     collapse = ", "))
+#: R/dataframe.R:0
+msgid "arguments imply differing number of rows: %s"
+msgstr "argumenty sugerują różną liczbę wierszy: %s"
 
-# src/library/base/R/grep.R: 196
-# warning("unknown cost components ignored")
-msgid "unknown cost components ignored"
-msgstr "nieznane komponenty kosztowe zostały zignorowane"
+#. R/tapply.R: stop("arguments must have same length")
+#: R/tapply.R:0
+msgid "arguments must have same length"
+msgstr "argumenty muszą mieć tę samą długość"
 
-# src/library/base/R/grep.R: 202
-# stop("cost components must be non-negative")
-msgid "cost components must be non-negative"
-msgstr "komponenty kosztowe muszą być nieujemne"
+#. R/files.R: stop("attempt to copy a directory to itself")
+#: R/files.R:0
+msgid "attempt to copy a directory to itself"
+msgstr "próba skopiowania katalogu do samego siebie"
 
-# src/library/base/R/grep.R: 213
-# stop(gettextf("%s and %s must have the same length",
-#                       sQuote("x"), sQuote("m")),
-#              domain = NA)
-msgid "%s and %s must have the same length"
-msgstr "argumenty %s oraz %s muszą mieć tę samą długość"
+#. R/table.R: stop("attempt to make a table with >= 2^31 elements")
+#. R/tabulate.R: stop("attempt to make a table with >= 2^31 elements")
+#: R/table.R:0 R/tabulate.R:0
+msgid "attempt to make a table with >= 2^31 elements"
+msgstr "próba utworzenia tabeli z >= 2^31 elementami"
 
-# src/library/base/R/grep.R: 261
-# stop(gettextf("need non-overlapping matches for %s",
-#                                   sQuote("invert = TRUE")),
-#                          domain = NA)
-msgid "need non-overlapping matches for %s"
-msgstr "wymagane są niepokrywające się dopasowania dla %s"
+#. R/matrix.R: stop("attempt to set 'colnames' on an object with less than two dimensions")
+#. R/matrix.R: stop("attempt to set 'colnames' on an object with less than two dimensions")
+#: R/matrix.R:0
+msgid "attempt to set 'colnames' on an object with less than two dimensions"
+msgstr "próba ustawienia 'colnames' dla obiektu z mniej niż dwoma wymiarami"
 
-# src/library/base/R/grep.R: 309
-# stop("missing replacement values are not allowed")
-# src/library/base/R/grep.R: 328
-# stop("missing replacement values are not allowed")
-msgid "missing replacement values are not allowed"
-msgstr "brakujące wartości dla zamiany nie są dozwolone"
+#. R/matrix.R: stop("attempt to set 'rownames' on an object with no dimensions")
+#. R/matrix.R: stop("attempt to set 'rownames' on an object with no dimensions")
+#: R/matrix.R:0
+msgid "attempt to set 'rownames' on an object with no dimensions"
+msgstr "próba ustawienia 'rownames' dla obiektu bez wymiarów"
 
-# src/library/base/R/grep.R: 316
-# stop("must have replacement values for matches")
-msgid "must have replacement values for matches"
-msgstr "wymagane są wartości zamian dla dopasowań"
+#. R/autoload.R: gettextf("autoloader did not find '%s' in '%s'", name, package)
+#: R/autoload.R:0
+msgid "autoloader did not find '%s' in '%s'"
+msgstr "automat ładujący nie znalazł '%s' w pakiecie '%s'"
 
-# src/library/base/R/grep.R: 330
-# stop("value does not provide any replacement values")
-msgid "value does not provide any replacement values"
-msgstr "wartości nie dostarczają żadnych wartości zamian"
+#. R/namespace.R: gettextf("bad 'S3method' directive: %s", deparse(e))
+#: R/namespace.R:0
+msgid "bad 'S3method' directive: %s"
+msgstr "niepoprawna dyrektywa 'S3method': %s"
 
-# src/library/base/R/grep.R: 342
-# stop("must have replacements for non-matches")
-msgid "must have replacements for non-matches"
-msgstr "wymagane są zamiany dla niedopasowań"
+#. R/load.R: stop("bad 'file' argument")
+#. R/serialize.R: stop("bad 'file' argument")
+#. R/serialize.R: stop("bad 'file' argument")
+#: R/load.R:0 R/serialize.R:0
+msgid "bad 'file' argument"
+msgstr "niepoprawny argument 'file'"
 
-# src/library/base/R/grep.R: 357
-# stop("must have replacements for matches")
-msgid "must have replacements for matches"
-msgstr "wymagane są zamiany dla dopasowań"
+#. R/load.R: stop("bad file argument")
+#: R/load.R:0
+msgid "bad file argument"
+msgstr "niepoprawny argument 'file'"
 
-# src/library/base/R/interaction.R: 26
-# stop("No factors specified")
-msgid "No factors specified"
-msgstr "Nie określono czynników"
+#. R/conditions.R: stop("bad handler specification")
+#. R/conditions.R: stop("bad handler specification")
+#: R/conditions.R:0
+msgid "bad handler specification"
+msgstr "niepoprawne określenie obsługi"
 
-# src/library/base/R/kappa.R: 60
-# warning(gettextf("norm '%s' currently always uses exact = FALSE",
-# 			     norm))
-msgid "norm '%s' currently always uses exact = FALSE"
-msgstr "norma '%s' aktualnie zawsze używa dokładnej wartości = FALSE"
+#. R/namespace.R: stop("bad method")
+#: R/namespace.R:0
+msgid "bad method"
+msgstr "błędna metoda"
 
-# src/library/base/R/kappa.R: 89
-# stop("triangular matrix should be square")
-msgid "triangular matrix should be square"
-msgstr "macierz trójkątna powinna mieć równą liczbę wierszy i kolumn"
+#. R/datetime.R: stop("binary '+' is not defined for \"POSIXt\" objects")
+#: R/datetime.R:0
+msgid "binary '+' is not defined for \"POSIXt\" objects"
+msgstr ""
+"dwuargumentowy operator '+' nie jest określony dla obiektów klasy \"POSIXt\""
 
-# src/library/base/R/lapply.R: 36
-# stop("'object' must be a list")
-msgid "'object' must be a list"
-msgstr "argument 'object' musi być listą"
+#. R/dates.R: stop("binary + is not defined for \"Date\" objects")
+#: R/dates.R:0
+msgid "binary + is not defined for \"Date\" objects"
+msgstr ""
+"dwuargumentowy operator '+' nie jest określony dla obiektów klasy \"Date\""
 
-# src/library/base/R/namespace.R: 368
-# stop(gettextf("package %s has not been installed properly\n",
-#                               sQuote(basename(pkgpath))),
-#                      call. = FALSE, domain = NA)
-# src/library/base/R/library.R: 41
-# stop(gettextf("package %s has not been installed properly\n",
-#                           sQuote(pkgname)),
-#                  call. = FALSE, domain = NA)
-msgid "package %s has not been installed properly"
-msgstr "pakiet %s nie został zainstalowany poprawnie"
+#. R/datetime.R: stop("both arguments of * cannot be \"difftime\" objects")
+#: R/datetime.R:0
+msgid "both arguments of * cannot be \"difftime\" objects"
+msgstr "oba argumenty operatora '*' nie mogą być obiektami klasy \"difftime\""
 
-# src/library/base/R/namespace.R: 373
-# stop(gettextf("package %s was built before R 3.0.0: please re-install it",
-#                              sQuote(basename(pkgpath))),
-#                      call. = FALSE, domain = NA)
-# src/library/base/R/library.R: 48
-# stop(gettextf("package %s was built before R 3.0.0: please re-install it",
-#                           sQuote(pkgname)), call. = FALSE, domain = NA)
-msgid "package %s was built before R 3.0.0: please re-install it"
-msgstr "pakiet %s został zbudowany przed R 3.0.0: proszę go przeinstalować"
+#. R/load.R: stop("can only save to a binary connection")
+#: R/load.R:0
+msgid "can only save to a binary connection"
+msgstr "można zapisać tylko do połączenia binarnego"
 
-# src/library/base/R/library.R: 69
-# stop(gettextf("This is R %s, package %s needs %s %s",
-#                                       current, sQuote(pkgname), dep$op, target),
-#                              call. = FALSE, domain = NA)
-msgid "This is R %s, package %s needs %s %s"
-msgstr "To jest R %s, pakiet %s potrzebuje %s %s"
+#. R/dates.R: stop("can only subtract from \"Date\" objects")
+#: R/dates.R:0
+msgid "can only subtract from \"Date\" objects"
+msgstr "można odejmować jedynie od obiektów klasy \"Date\""
 
-# src/library/base/R/library.R: 76
-# warning(gettextf("package %s was built under R version %s",
-#                              sQuote(pkgname), as.character(built$R)),
-#                     call. = FALSE, domain = NA)
-msgid "package %s was built under R version %s"
-msgstr "pakiet %s został zbudowany w wersji R %s"
+#. R/datetime.R: stop("can only subtract from \"POSIXt\" objects")
+#: R/datetime.R:0
+msgid "can only subtract from \"POSIXt\" objects"
+msgstr "można odejmować jedynie od obiektów klasy \"POSIXt\""
 
-# src/library/base/R/library.R: 87
-# stop(gettextf("package %s was built for %s",
-#                               sQuote(pkgname), platform),
-#                      call. = FALSE, domain = NA)
-# src/library/base/R/library.R: 95
-# stop(gettextf("package %s was built for %s",
-#                               sQuote(pkgname), platform),
-#                      call. = FALSE, domain = NA)
-msgid "package %s was built for %s"
-msgstr "pakiet %s został zbudowany dla platformy %s"
+#. R/dates.R: stop("can only subtract numbers from \"Date\" objects")
+#: R/dates.R:0
+msgid "can only subtract numbers from \"Date\" objects"
+msgstr "można odejmować jedynie liczby od obiektów klasy \"Date\""
 
-# src/library/base/R/library.R: 103
-# stop(gettextf("package %s is not installed for 'arch = %s'",
-#                           sQuote(pkgname), r_arch),
-#                  call. = FALSE, domain = NA)
-msgid "package %s is not installed for 'arch = %s'"
-msgstr "pakiet %s nie jest zainstalowany dla 'arch=%s'"
+#. R/datetime.R: stop("can only subtract numbers from \"POSIXt\" objects")
+#: R/datetime.R:0
+msgid "can only subtract numbers from \"POSIXt\" objects"
+msgstr "można odejmować jedynie liczby od obiektów klasy \"POSIXt\""
 
-# src/library/base/R/library.R: 121
-# stop(gettextf("package %s has a license that you need to accept in an interactive session", sQuote(pkg)), domain = NA)
-msgid "package %s has a license that you need to accept in an interactive session"
+#. R/connections.R: stop("can only truncate an open connection")
+#: R/connections.R:0
+msgid "can only truncate an open connection"
 msgstr ""
-"Pakiet %s posiada licencję, którą musisz zaakceptować w interaktywnej sesji"
+"funkcja 'truncate.connection()' może przycinać jedynie otwarte połączenie"
 
-# src/library/base/R/library.R: 125
-# message(gettextf("package %s has a license that you need to accept after viewing", sQuote(pkg)), domain = NA)
-msgid "package %s has a license that you need to accept after viewing"
-msgstr ""
-"pakiet %s posiada licencję, którą musisz zaakceptować po przeglądnięciu"
+#. R/connections.R: stop("can only write character objects")
+#: R/connections.R:0
+msgid "can only write character objects"
+msgstr "można zapisać jedynie obiekty wektorowe"
 
-# src/library/base/R/library.R: 133
-# message(gettextf("package %s has a license that you need to accept:\naccording to the DESCRIPTION file it is", sQuote(pkg)), domain = NA)
-msgid "package %s has a license that you need to accept:\naccording to the DESCRIPTION file it is"
-msgstr ""
-"pakiet %s posiada licencję, którą musisz zaakceptować:\n"
-"zgodnie z opisem w pliku DESCRIPTION jest to"
+#. R/connections.R: stop("can only write vector objects")
+#: R/connections.R:0
+msgid "can only write vector objects"
+msgstr "można zapisać jedynie obiekty wektorowe"
 
-# src/library/base/R/library.R: 139
-# stop(gettextf("license for package %s not accepted",
-#                               sQuote(package)), domain = NA, call. = FALSE)
-msgid "license for package %s not accepted"
-msgstr "licencja dla pakietu %s nie została zaakceptowana"
+#. R/source.R: stop("cannot 'chdir' as current directory is unknown")
+#. R/source.R: stop("cannot 'chdir' as current directory is unknown")
+#: R/source.R:0
+msgid "cannot 'chdir' as current directory is unknown"
+msgstr "nie można wykonać 'chdir' ponieważ bieżący katalog nie jest znany"
 
-msgid "Attaching package: %s"
-msgstr "Dołączanie pakietu: %s"
+#. R/namespace.R: stop("cannot add to exports of a sealed namespace")
+#: R/namespace.R:0
+msgid "cannot add to exports of a sealed namespace"
+msgstr "nie można dodać do eksportów zamkniętej przestrzeni nazw"
 
-# src/library/base/R/library.R: 230
-# message("'verbose' and 'quietly' are both true; being verbose then ..")
-msgid "'verbose' and 'quietly' are both true; being verbose then .."
-msgstr ""
-"oba argumenty 'verbose' oraz 'quietly' są ustawione na tak; przyjmuję w "
-"takim razie tryb 'verbose' .."
+#. R/dataframe.R: gettextf("cannot coerce class \"%s\" to a data.frame", deparse(class(x)))
+#: R/dataframe.R:0
+msgid "cannot coerce class \"%s\" to a data.frame"
+msgstr "nie można przekształcić klasy \"%s\" w klasę \"data.frame\""
 
-# src/library/base/R/library.R: 241
-# stop("invalid package name")
-msgid "invalid package name"
-msgstr "niepoprawna nazwa pakietu"
+#. R/table.R: stop("cannot coerce to a table")
+#: R/table.R:0
+msgid "cannot coerce to a table"
+msgstr "nie można przekształcić w tabelę"
 
-# src/library/base/R/namespace.R: 334
-# stop(gettextf("there is no package called %s", sQuote(package)),
-#                  domain = NA)
-# src/library/base/R/library.R: 256
-# gettextf("there is no package called %s", sQuote(package))
-# src/library/base/R/library.R: 756
-# stop(gettextf("there is no package called %s", sQuote(pkg)),
-#                      domain = NA)
-# src/library/base/R/library.R: 767
-# warning(gettextf("there is no package called %s", sQuote(pkg)),
-#                     domain = NA)
-msgid "there is no package called %s"
-msgstr "nie ma pakietu o nazwie %s"
+#. R/namespace.R: stop("cannot import into a sealed namespace")
+#: R/namespace.R:0
+msgid "cannot import into a sealed namespace"
+msgstr "nie można zaimportować do zamkniętej przestrzeni nazw"
 
-# src/library/base/R/library.R: 258
-# gettext("no library trees found in 'lib.loc'")
-msgid "no library trees found in 'lib.loc'"
-msgstr "nie znaleziono drzew bibliotek w 'lib.loc'"
+#. R/sink.R: stop("cannot split the message connection")
+#: R/sink.R:0
+msgid "cannot split the message connection"
+msgstr "nie można rozdzielić komunikatu wiadomości"
 
-# src/library/base/R/library.R: 268
-# stop(gettextf("%s is not a valid installed package",
-#                               sQuote(package)), domain = NA)
-msgid "%s is not a valid installed package"
-msgstr "%s nie jest poprawnie zainstalowanym pakietem"
+#. R/dates.R: stop("character string is not in a standard unambiguous format")
+#. R/datetime.R: stop("character string is not in a standard unambiguous format")
+#: R/dates.R:0 R/datetime.R:0
+msgid "character string is not in a standard unambiguous format"
+msgstr "łańcuch tekstowy nie jest w standardowym jednoznacznym formacie"
 
-# src/library/base/R/library.R: 284
-# warning(gettextf("%s not found on search path, using pos = 2", sQuote(pos)), domain = NA)
-msgid "%s not found on search path, using pos = 2"
-msgstr "%s nie zostało znalezione w ścieżce wyszukiwania, używanie 'pos = 2'"
+#. R/format.R: warning("class of 'x' was discarded")
+#: R/format.R:0
+msgid "class of 'x' was discarded"
+msgstr "klasa argumentu 'x' została odrzucona"
 
-# src/library/base/R/library.R: 302
-# stop(gettextf("package or namespace load failed for %s",
-#                                        sQuote(package)),
-#                               call. = FALSE, domain = NA)
-msgid "package or namespace load failed for %s"
-msgstr "ładowanie pakietu lub przestrzeni nazw nie powiodło się dla pakietu %s"
+#. R/format.R: warning("coercing argument to \"character\" for format=\"s\"")
+#: R/format.R:0
+msgid "coercing argument to \"character\" for format=\"s\""
+msgstr "przekształcanie argumentu w \"character\" dla 'format=\"s\"'"
 
-# src/library/base/R/library.R: 322
-# stop(gettextf("package %s does not have a namespace and should be re-installed",
-#                           sQuote(package)), domain = NA)
-msgid "package %s does not have a namespace and should be re-installed"
-msgstr ""
-"pakiet %s nie posiada przestrzeni nazw i powinien zostać zainstalowany "
-"ponownie"
+#. R/dataframe.R: stop("column name \"\" cannot match any column")
+#. R/dataframe.R: stop("column name \"\" cannot match any column")
+#: R/dataframe.R:0
+msgid "column name \"\" cannot match any column"
+msgstr "kolumny o nazwie \"\" nie można dopasować do żadnej kolumny"
 
-# src/library/base/R/library.R: 326
-# warning(gettextf("package %s already present in search()",
-#                              sQuote(package)), domain = NA)
-msgid "package %s already present in search()"
-msgstr "pakiet %s jest już obecny w 'search()'"
+#. R/chol.R: stop("complex matrices not permitted at present")
+#: R/chol.R:0
+msgid "complex matrices not permitted at present"
+msgstr "macierze zespolone na chwilę obecną nie są dozwolone"
 
-# src/library/base/R/library.R: 350
-# warning("'DESCRIPTION' has an 'Encoding' field and re-encoding is not possible", call.=FALSE)
-# src/library/base/R/library.R: 405
-# warning("'DESCRIPTION' has an 'Encoding' field and re-encoding is not possible", call.=FALSE)
-msgid "'DESCRIPTION' has an 'Encoding' field and re-encoding is not possible"
+#. R/format.R: warning("corrupt data frame: columns will be truncated or padded with NAs")
+#: R/format.R:0
+msgid "corrupt data frame: columns will be truncated or padded with NAs"
 msgstr ""
-"plik 'DESCRIPTION' posiada pole 'Encoding' i ponowne kodowanie nie jest "
-"możliwe"
+"uszkodzona ramka danych: kolumny będą obcięte lub uzupełnione wartościami "
+"'NA'"
 
-# src/library/base/R/library.R: 448
-# gettextf("%sPackages in library %s:\n", sep, sQuote(lib))
-msgid "%sPackages in library %s:"
-msgstr "%sPakiety w bibliotece %s:"
+#. R/grep.R: stop("cost components must be non-negative")
+#: R/grep.R:0
+msgid "cost components must be non-negative"
+msgstr "komponenty kosztowe muszą być nieujemne"
 
-# src/library/base/R/library.R: 462
-# message("no packages found")
-msgid "no packages found"
-msgstr "nie znaleziono pakietów"
+#. R/apply.R: stop("dim(X) must have a positive length")
+#: R/apply.R:0
+msgid "dim(X) must have a positive length"
+msgstr "'dim(X)' musi mieć dodatnią długość"
 
-# src/library/base/R/library.R: 467
-# gettext("R packages available")
-msgid "R packages available"
-msgstr "Dostępne pakiety R"
-
-# src/library/base/R/library.R: 496
-# stop(gettextf("DLL %s not found: maybe not installed for this architecture?", sQuote(chname)), domain = NA)
-msgid "DLL %s not found: maybe not installed for this architecture?"
-msgstr ""
-"plik DLL %s nie został znaleziony: być może nie został zainstalowany dla tej "
-"architektury?"
-
-# src/library/base/R/library.R: 498
-# stop(gettextf("shared object %s not found", sQuote(chname1)),
-#                  domain = NA)
-msgid "shared object %s not found"
-msgstr "współdzielony obiekt %s nie został znaleziony"
-
-# src/library/base/R/library.R: 506
-# message(gettextf("DLL %s already loaded", sQuote(chname1)),
-#                         domain = NA)
-msgid "DLL %s already loaded"
-msgstr "plik DLL %s jest już załadowany"
+#. R/dates.R: gettextf("do not know how to convert '%s' to class %s", deparse(substitute(x)),     dQuote("Date"))
+#. R/datetime.R: gettextf("do not know how to convert '%s' to class %s", deparse(substitute(x)),     dQuote("POSIXlt"))
+#. R/datetime.R: gettextf("do not know how to convert '%s' to class %s", deparse(substitute(x)),     dQuote("POSIXct"))
+#: R/dates.R:0 R/datetime.R:0
+msgid "do not know how to convert '%s' to class %s"
+msgstr "nie wiem jak przekonwertować '%s' na klasę %s"
 
-# src/library/base/R/library.R: 509
-# message(gettextf("shared object '%s' already loaded",
-#                                  sQuote(chname1)), domain = NA)
-msgid "shared object '%s' already loaded"
-msgstr "współdzielony obiekt '%s' jest już załadowany"
+#. R/dataframe.R: stop("duplicate 'row.names' are not allowed")
+#: R/dataframe.R:0
+msgid "duplicate 'row.names' are not allowed"
+msgstr "powtórzone wartości w 'row.names' nie są dozwolone"
 
-# src/library/base/R/library.R: 528
-# message(gettextf("now dyn.load(\"%s\") ...", file), domain = NA)
-msgid "now dyn.load(\"%s\") ..."
-msgstr "teraz 'dyn.load(\"%s\")' ..."
+#. R/namespace.R: gettextf("duplicate import names %s", paste(sQuote(impnames[duplicated(impnames)]),     collapse = ", "))
+#: R/namespace.R:0
+msgid "duplicate import names %s"
+msgstr "powtórzone nazwy %s importu"
 
-# src/library/base/R/library.R: 543
-# stop("no DLL was specified")
-msgid "no DLL was specified"
-msgstr "nie określono pliku DLL"
+#. R/dataframe.R: gettextf("duplicate row.names: %s", paste(unique(row.names[duplicated(row.names)]),     collapse = ", "))
+#. R/dataframe.R: gettextf("duplicate row.names: %s", paste(unique(row.names[duplicated(row.names)]),     collapse = ", "))
+#: R/dataframe.R:0
+msgid "duplicate row.names: %s"
+msgstr "powtórzone wartości 'row.names': %s"
 
-# src/library/base/R/library.R: 545
-# stop("no shared object was specified")
-msgid "no shared object was specified"
-msgstr "nie określono współdzielonego obiektu"
+#. R/dataframe.R: stop("duplicate subscripts for columns")
+#: R/dataframe.R:0
+msgid "duplicate subscripts for columns"
+msgstr "powtórzone indeksy dla kolumn"
 
-# src/library/base/R/library.R: 558
-# stop(gettextf("DLL %s was not loaded", sQuote(chname1)),
-#                  domain = NA)
-msgid "DLL %s was not loaded"
-msgstr "plik DLL %s nie został załadowany"
+#. R/namespace.R: gettextf("duplicate symbol names %s in useDynLib(\"%s\")", paste(sQuote(names(symNames)[dup]),     collapse = ", "), dyl)
+#: R/namespace.R:0
+msgid "duplicate symbol names %s in useDynLib(\"%s\")"
+msgstr "powtórzone nazwy symboli %s w 'useDynlib(\"%s\")'"
 
-# src/library/base/R/library.R: 561
-# stop(gettextf("shared object %s was not loaded", sQuote(chname1)),
-#                  domain = NA)
-msgid "shared object %s was not loaded"
-msgstr "współdzielony obiekt %s nie został załadowany"
+#. R/scan.R: stop("either specify 'nmax' or 'n', but not both.")
+#: R/scan.R:0
+msgid "either specify 'nmax' or 'n', but not both."
+msgstr "określ albo 'nmax' albo 'n', ale nie oba naraz"
 
-# src/library/base/R/library.R: 566
-# stop(gettextf("DLL %s not found", sQuote(chname1)), domain = NA)
-msgid "DLL %s not found"
-msgstr "plik DLL %s nie został znaleziony"
+#. R/time.R: gettext("elapsed")
+#: R/time.R:0
+msgid "elapsed"
+msgstr "upłynęło"
 
-# src/library/base/R/library.R: 568
-# stop(gettextf("shared object '%s' not found", sQuote(chname1)),
-#                  domain = NA)
-msgid "shared object '%s' not found"
-msgstr "współdzielony obiekt '%s' nie został znaleziony"
+#. R/load.R: stop("empty (zero-byte) input file")
+#: R/load.R:0
+msgid "empty (zero-byte) input file"
+msgstr "pusty (zero bajtów) plik wejściowy"
 
-# src/library/base/R/library.R: 571
-# message(gettextf("now dyn.unload(\"%s\") ...", file), domain = NA)
-msgid "now dyn.unload(\"%s\") ..."
-msgstr "teraz 'dyn.load(\"%s\")' ..."
+#. R/namespace.R: gettextf("empty name in directive '%s' in 'NAMESPACE' file",     as.character(e[[1L]]))
+#: R/namespace.R:0
+msgid "empty name in directive '%s' in 'NAMESPACE' file"
+msgstr "pusta nazwa w dyrektywie %s w pliku 'NAMESPACE'"
 
-# src/library/base/R/library.R: 587
-# gettextf("Loading required package: %s",
-#                                            package)
-# src/library/base/R/library.R: 852
-# gettextf("Loading required package: %s",
-#                                      pkg)
-msgid "Loading required package: %s"
-msgstr "Ładowanie wymaganego pakietu: %s"
+#. R/source.R: gettextf("encoding = \"%s\" chosen", encoding)
+#: R/source.R:0
+msgid "encoding = \"%s\" chosen"
+msgstr "wybrano 'encoding = \"%s\"'"
 
-# src/library/base/R/library.R: 641
-# stop("none of the packages are loaded")
-msgid "none of the packages are loaded"
-msgstr "żaden z tych pakietów nie został załadowany"
+#. R/qr.R: stop("exact singularity in 'qr.coef'")
+#: R/qr.R:0
+msgid "exact singularity in 'qr.coef'"
+msgstr "ścisła osobliwość w funkcji 'qr.coef()'"
 
-# src/library/base/R/library.R: 747
-# warning(gettextf("package %s found more than once,\nusing the one found in %s",
-#                                  sQuote(pkg), sQuote(paths)), domain = NA)
-msgid "package %s found more than once,\nusing the one found in %s"
+#. R/dates.R: stop("exactly two of 'to', 'by' and 'length.out' / 'along.with' must be specified")
+#. R/datetime.R: stop("exactly two of 'to', 'by' and 'length.out' / 'along.with' must be specified")
+#: R/dates.R:0 R/datetime.R:0
+msgid ""
+"exactly two of 'to', 'by' and 'length.out' / 'along.with' must be specified"
 msgstr ""
-"pakiet %s został znaleziony więcej niż raz. Używanie tego znalezionego w %s"
+"dokładnie dwa z 'to', 'by' oraz 'length.out' / 'along.with' muszą być "
+"określone"
 
-# src/library/base/R/library.R: 779
-# gettextf("Further information is available in the following vignettes in directory %s:",
-#                  sQuote(file.path(x$path, "doc")))
-msgid "Further information is available in the following vignettes in directory %s:"
+#. R/namespace.R: gettextf("failed to assign NativeSymbolInfo for %s since %s is already defined in the %s namespace",     origVarName, varName, sQuote(package))
+#: R/namespace.R:0
+msgid ""
+"failed to assign NativeSymbolInfo for %s since %s is already defined in the "
+"%s namespace"
 msgstr ""
-"Dalsza informacja jest dostępna w następujących ilustracjach w katalogu %s:"
+"nie udało się przypisać NativeSymbolInfo dla %s ponieważ %s jest już "
+"zdefiniowane w przestrzeni nazw %s"
 
-# src/library/base/R/library.R: 781
-# sprintf("\n%s\n",
-#                        c(gettext("Description:"),
-#                          gettext("Index:"),
-#                          paste(strwrap(vignetteMsg), collapse = "\n")))
-msgid "Description:"
-msgstr "Opis:"
+#. R/namespace.R: gettextf("failed to assign NativeSymbolInfo for %s to %s since %s is already defined in the %s namespace",     origVarName, varName, varName, sQuote(package))
+#: R/namespace.R:0
+msgid ""
+"failed to assign NativeSymbolInfo for %s to %s since %s is already defined "
+"in the %s namespace"
+msgstr ""
+"nie udało się przypisać NativeSymbolInfo dla %s do %s ponieważ %s jest już "
+"zdefiniowane w przestrzeni nazw %s"
 
-# src/library/base/R/library.R: 781
-# sprintf("\n%s\n",
-#                        c(gettext("Description:"),
-#                          gettext("Index:"),
-#                          paste(strwrap(vignetteMsg), collapse = "\n")))
-msgid "Index:"
-msgstr "Indeks:"
+#. R/namespace.R: gettextf("failed to assign RegisteredNativeSymbol for %s to %s since %s is already defined in the %s namespace",     sym$name, varName, varName, sQuote(package))
+#: R/namespace.R:0
+msgid ""
+"failed to assign RegisteredNativeSymbol for %s to %s since %s is already "
+"defined in the %s namespace"
+msgstr ""
+"nie udało się przypisać RegisteredNativeSymbol dla %s do %s ponieważ %s jest "
+"już zdefiniowane w przestrzeni nazw %s"
 
-msgid "Information on package %s"
-msgstr "Informacja dotycząca pakietu %s"
+#. R/windows/junctions.R: gettextf("failed to create directory for link '%s", link)
+#: R/windows/junctions.R:0
+msgid "failed to create directory for link '%s"
+msgstr "nie udało się utworzyć katalogu dla łącza '%s"
 
-# src/library/base/R/library.R: 805
-# gettextf("Documentation for package %s", sQuote(x$name))
-msgid "Documentation for package %s"
-msgstr "Dokumentacja dla pakietu %s"
+#. R/namespace.R: gettextf("failed to find metadata object for %s", sQuote(mi))
+#: R/namespace.R:0
+msgid "failed to find metadata object for %s"
+msgstr "nie udało się znaleźć obiektu metadanych dla  %s"
 
-# src/library/base/R/library.R: 835
-# stop(gettextf("package %s required by %s could not be found",
-#                                       sQuote(pkg), sQuote(pkgname)),
-#                              call. = FALSE, domain = NA)
-msgid "package %s required by %s could not be found"
-msgstr "pakiet %s wymagany przez pakiet %s nie mógł zostać znaleziony"
+#. R/debug.R: stop("failed to load methods package for handling signature")
+#: R/debug.R:0
+msgid "failed to load methods package for handling signature"
+msgstr "nie udało się załadować pakietu 'methods' dla obsługi sygnatury"
 
-# src/library/base/R/library.R: 844
-# stop(gettextf("package %s %s was found, but %s %s is required by %s",
-#                                               sQuote(pkg), current, z$op,
-#                                               target, sQuote(pkgname)),
-#                                      call. = FALSE, domain = NA)
-msgid "package %s %s was found, but %s %s is required by %s"
+#. R/debug.R: stop("failed to load methods package for undebugging by signature")
+#: R/debug.R:0
+msgid "failed to load methods package for undebugging by signature"
 msgstr ""
-"pakiet %s %s został znaleziony, ale %s %s jest wymagane przez pakiet %s"
+"nie udało się załadować pakietu 'methods' dla wyłączenia debugowania przez "
+"sygnaturę"
 
-# src/library/base/R/library.R: 856
-# stop(gettextf("package %s could not be loaded", sQuote(pkg)),
-#                      call. = FALSE, domain = NA)
-msgid "package %s could not be loaded"
-msgstr "pakiet %s nie mógł zostać załadowany"
-
-# src/library/base/R/library.R: 869
-# stop(gettextf("package %s %s is loaded, but %s %s is required by %s",
-#                                               sQuote(pkg), current, z$op,
-#                                               target, sQuote(pkgname)),
-#                                      call. = FALSE, domain = NA)
-msgid "package %s %s is loaded, but %s %s is required by %s"
-msgstr "pakiet %s %s jest załadowany, ale %s %s jest wymagane przez pakiet %s"
-
-# src/library/base/R/load.R: 29
-# stop("empty (zero-byte) input file")
-msgid "empty (zero-byte) input file"
-msgstr "pusty (zero bajtów) plik wejściowy"
+#. R/debug.R: stop("failed to load the methods package for debugging by signature")
+#. R/debug.R: stop("failed to load the methods package for debugging by signature")
+#: R/debug.R:0
+msgid "failed to load the methods package for debugging by signature"
+msgstr ""
+"nie udało się załadować pakietu 'methods' dla włączenia debugowania przez "
+"sygnaturę"
 
-# src/library/base/R/load.R: 33
-# stop("input has been corrupted, with LF replaced by CR")
-msgid "input has been corrupted, with LF replaced by CR"
-msgstr "wejście zostało uszkodzone z LF zastąpionym przez CR"
+#. R/windows/junctions.R: stop("fewer 'from' files than 'to' files")
+#: R/windows/junctions.R:0
+msgid "fewer 'from' files than 'to' files"
+msgstr "mniej plików 'from' niż plików 'to'"
 
-# src/library/base/R/load.R: 46
-# stop("bad 'file' argument")
-# src/library/base/R/serialize.R: 37
-# stop("bad 'file' argument")
-# src/library/base/R/serialize.R: 48
-# stop("bad 'file' argument")
-msgid "bad 'file' argument"
-msgstr "niepoprawny argument 'file'"
+#. R/attach.R: gettextf("file '%s' not found", what)
+#: R/attach.R:0
+msgid "file '%s' not found"
+msgstr "plik '%s' nie został znaleziony"
 
-# src/library/base/man/save.Rd: 21
-# stop("'file' must be specified")
-# src/library/base/R/load.R: 55
-# stop("'file' must be specified")
-msgid "'file' must be specified"
-msgstr "argument 'file' musi być określony"
+#. R/files.R: stop("file can not be copied both 'from' and 'to'")
+#: R/files.R:0
+msgid "file can not be copied both 'from' and 'to'"
+msgstr "plik nie może być skopiowany jednocześnie z 'from' oraz 'to'"
 
-# src/library/base/R/load.R: 72
-# warning("nothing specified to be save()d")
-msgid "nothing specified to be save()d"
-msgstr "nic nie zostało określone do zapisu"
+#. R/qr.R: stop("first argument must be a QR decomposition")
+#: R/qr.R:0
+msgid "first argument must be a QR decomposition"
+msgstr "pierwszy argument musi być dekompozycją QR"
 
-# src/library/base/R/load.R: 93
-# stop("'file' must be non-empty string")
-# src/library/base/R/load.R: 132
-# stop("'file' must be non-empty string")
-# src/library/base/R/serialize.R: 24
-# stop("'file' must be non-empty string")
-# src/main/saveload.c: 1942
-# error(_("'file' must be non-empty string"))
-# src/main/eval.c: 5419
-#  _("'file' must be non-empty string")
-msgid "'file' must be non-empty string"
-msgstr "argument 'file' musi być niepustym łańcuchem tekstowym"
+#. R/seq.R: warning("first element used of 'length.out' argument")
+#: R/seq.R:0
+msgid "first element used of 'length.out' argument"
+msgstr "użyto pierwszego elementu argumentu 'length.out'"
 
-# src/library/base/R/load.R: 96
-# stop("'compress' must be logical or character")
-msgid "'compress' must be logical or character"
-msgstr "argument 'compress' musi być typem logicznym lub tekstem"
+#. R/namespace.R: gettextf("found methods to import for function %s but not the generic itself",     sQuote(genName))
+#: R/namespace.R:0
+msgid "found methods to import for function %s but not the generic itself"
+msgstr ""
+"znaleziono metody do importu dla funkcji %s ale nie znaleziono samej funkcji "
+"ogólnej"
 
-# src/library/base/R/load.R: 116
-# stop(gettextf("'compress = \"%s\"' is invalid", compress))
-msgid "'compress = \"%s\"' is invalid"
-msgstr "'compress = \"%s\"' jest niepoprawne"
+#. R/match.fun.R: gettextf("found non-function '%s'", FUN)
+#: R/match.fun.R:0
+msgid "found non-function '%s'"
+msgstr "znaleziono nie-funkcję '%s'"
 
-# src/library/base/R/load.R: 121
-# stop("bad file argument")
-msgid "bad file argument"
-msgstr "niepoprawny argument 'file'"
+#. R/dynload.R: stop("function is not in a namespace, so cannot locate associated DLL")
+#: R/dynload.R:0
+msgid "function is not in a namespace, so cannot locate associated DLL"
+msgstr ""
+"funkcja nie jest w przestrzeni nazw tak więc nie można zlokalizować "
+"powiązanego pliku DLL"
 
-# src/library/base/R/load.R: 123
-# stop("can only save to a binary connection")
-msgid "can only save to a binary connection"
-msgstr "można zapisać tylko do połączenia binarnego"
+#. R/taskCallback.R: stop("handler must be a function")
+#: R/taskCallback.R:0
+msgid "handler must be a function"
+msgstr "przewodnik musi być funkcją"
 
-# src/library/base/R/load.R: 164
-# stop(gettextf("image could not be renamed and is left in %s",
-#                           outfile), domain = NA)
+#. R/load.R: gettextf("image could not be renamed and is left in %s", outfile)
+#: R/load.R:0
 msgid "image could not be renamed and is left in %s"
 msgstr "nazwa obrazu nie mogła zostać zmieniona; obraz pozostał w pliku %s"
 
-# src/library/base/R/load.R: 175
-# message("[Previously saved workspace restored]", "\n")
-msgid "[Previously saved workspace restored]"
-msgstr "[Poprzednio zapisany obszar roboczy został przywrócony]"
+#. R/namespace.R: gettextf("in %s methods for export not found: %s", sQuote(package),     paste(expMethods[missingMethods], collapse = ", "))
+#: R/namespace.R:0
+msgid "in %s methods for export not found: %s"
+msgstr "w pakiecie %s metody do eksportu nie zostały znalezione: %s"
 
-# src/library/base/R/load.R: 190
-# message(gettextf("Attempting to load the environment %s", sQuote(info)),
-#             domain = NA)
-msgid "Attempting to load the environment %s"
-msgstr "Próba załadowania środowiska %s"
+#. R/namespace.R: gettextf("in package %s classes %s were specified for export but not defined",     sQuote(package), paste(expClasses[missingClasses], collapse = ", "))
+#: R/namespace.R:0
+msgid "in package %s classes %s were specified for export but not defined"
+msgstr ""
+"w pakiecie %s klasy %s zostały określone do eksportu, ale nie zostały "
+"zdefiniowane"
 
-# src/library/base/R/load.R: 195
-# message("Specified environment not found: using '.GlobalEnv' instead")
-msgid "Specified environment not found: using '.GlobalEnv' instead"
+#. R/namespace.R: gettextf("in package %s methods %s were specified for export but not defined",     sQuote(package), paste(expMethods, collapse = ", "))
+#: R/namespace.R:0
+msgid "in package %s methods %s were specified for export but not defined"
 msgstr ""
-"Nie znaleziono określonego środowiska: zamiast tego używanie '.GlobalEnv'"
+"w pakiecie %s metody %s zostały określone do eksportu, ale nie zostały "
+"zdefiniowane"
 
-# src/library/base/R/locales.R: 24
-# stop("invalid 'category' argument")
-# src/library/base/R/locales.R: 33
-# stop("invalid 'category' argument")
-msgid "invalid 'category' argument"
-msgstr "niepoprawny argument 'category'"
+#. R/rowsum.R: stop("incorrect length for 'group'")
+#. R/rowsum.R: stop("incorrect length for 'group'")
+#: R/rowsum.R:0
+msgid "incorrect length for 'group'"
+msgstr "niepoprawna długość argumentu 'group'"
 
-# src/library/base/R/mapply.R: 52
-# stop("must specify names of formal arguments for 'vectorize'")
-msgid "must specify names of formal arguments for 'vectorize'"
-msgstr "wymagane jest określenie nazwy formalnych argumentów dla 'vectorize'"
+#. R/array.R: stop("incorrect value for 'MARGIN'")
+#: R/array.R:0
+msgid "incorrect value for 'MARGIN'"
+msgstr "niepoprawna wartość dla argumentu 'MARGIN'"
 
-# src/library/base/R/match.R: 40
-# stop("'arg' must be NULL or a character vector")
-msgid "'arg' must be NULL or a character vector"
-msgstr "argument 'arg' musi być wartością NULL lub wektorem tekstowym"
+#. R/strwrap.R: stop("incorrect value for 'x'")
+#. R/strwrap.R: stop("incorrect value for 'x'")
+#: R/strwrap.R:0
+msgid "incorrect value for 'x'"
+msgstr "niepoprawna wartość dla argumentu 'x'"
 
-# src/library/base/R/match.R: 44
-# stop("'arg' must be of length 1")
-msgid "'arg' must be of length 1"
-msgstr "argument 'arg' musi mieć długość 1"
+#. R/strwrap.R: stop("incorrect values of 'indent' and 'width'")
+#: R/strwrap.R:0
+msgid "incorrect values of 'indent' and 'width'"
+msgstr "niepoprawne wartości 'indent' oraz 'width'"
 
-# src/library/base/R/match.R: 45
-# stop("'arg' must be of length >= 1")
-msgid "'arg' must be of length >= 1"
-msgstr "argument 'arg' musi mieć długość >= 1"
+#. R/LAPACK.R: stop("infinite or missing values in 'x'")
+#. R/eigen.R: stop("infinite or missing values in 'x'")
+#. R/svd.R: stop("infinite or missing values in 'x'")
+#: R/LAPACK.R:0 R/eigen.R:0 R/svd.R:0
+msgid "infinite or missing values in 'x'"
+msgstr "wartość nieskończona lub brakuje wartości w 'x'"
 
-# src/library/base/R/match.R: 50
-# stop(gettextf("'arg' should be one of %s",
-#                       paste(dQuote(choices), collapse = ", ")),
-#              domain = NA)
-msgid "'arg' should be one of %s"
-msgstr "argument 'arg' powininen być jednym z %s"
+#. R/load.R: stop("input has been corrupted, with LF replaced by CR")
+#: R/load.R:0
+msgid "input has been corrupted, with LF replaced by CR"
+msgstr "wejście zostało uszkodzone z LF zastąpionym przez CR"
 
-# src/library/base/R/match.R: 55
-# stop("there is more than one match in 'match.arg'")
-msgid "there is more than one match in 'match.arg'"
-msgstr "jest więcej niż jedno dopasowanie w funkcji 'match.arg()'"
+#. R/dates.R: stop("invalid 'by' string")
+#. R/datetime.R: stop("invalid 'by' string")
+#: R/dates.R:0 R/datetime.R:0
+msgid "invalid 'by' string"
+msgstr "błędny łańcuch 'by'"
 
-# src/library/base/man/char.expand.Rd: 9
-# stop("no match")
-# src/library/base/R/match.R: 62
-# stop("no match")
-msgid "no match"
-msgstr "brak dopasowania"
+#. R/locales.R: stop("invalid 'category' argument")
+#. R/locales.R: stop("invalid 'category' argument")
+#: R/locales.R:0
+msgid "invalid 'category' argument"
+msgstr "niepoprawny argument 'category'"
 
-# src/library/base/R/match.R: 65
-# stop("'input' must have length 1")
-msgid "'input' must have length 1"
-msgstr "argument 'input' musi mieć długość 1"
+#. R/serialize.R: stop("invalid 'compress' argument: ", compress)
+#: R/serialize.R:0
+msgid "invalid 'compress' argument:"
+msgstr "niepoprawny argument 'compress':"
 
-# src/library/base/R/match.R: 67
-# stop("'input' and 'target' must be character vectors")
-msgid "'input' and 'target' must be character vectors"
-msgstr "argumenty 'input' oraz 'target' muszą być wektorami tekstowymi"
+#. R/zapsmall.R: stop("invalid 'digits'")
+#: R/zapsmall.R:0
+msgid "invalid 'digits'"
+msgstr "niepoprawna wartość 'digits'"
 
-# src/library/base/R/match.fun.R: 30
-# stop(gettextf("'%s' is not a function, character or symbol",
-#                           deparse(FUN)), domain = NA)
-msgid "'%s' is not a function, character or symbol"
-msgstr "'%s' nie jest funkcją, tekstem ani symbolem"
+#. R/dataframe.R: stop("invalid 'dimnames' given for data frame")
+#. R/dataframe.R: stop("invalid 'dimnames' given for data frame")
+#: R/dataframe.R:0
+msgid "invalid 'dimnames' given for data frame"
+msgstr "niepoprawne 'dimnames' dla podanej ramki danych"
 
-# src/library/base/R/match.fun.R: 39
-# stop(gettextf("found non-function '%s'", FUN), domain = NA)
-msgid "found non-function '%s'"
-msgstr "znaleziono nie-funkcję '%s'"
+#. R/colSums.R: stop("invalid 'dims'")
+#. R/colSums.R: stop("invalid 'dims'")
+#. R/colSums.R: stop("invalid 'dims'")
+#. R/colSums.R: stop("invalid 'dims'")
+#: R/colSums.R:0
+msgid "invalid 'dims'"
+msgstr "niepoprawny argument 'dims'"
 
-# src/library/base/R/matrix.R: 57
-# stop("attempt to set 'rownames' on an object with no dimensions")
-# src/library/base/R/matrix.R: 61
-# stop("attempt to set 'rownames' on an object with no dimensions")
-msgid "attempt to set 'rownames' on an object with no dimensions"
-msgstr "próba ustawienia 'rownames' dla obiektu bez wymiarów"
+#. R/factor.R: gettextf("invalid 'labels'; length %d should be 1 or %d", nl,     nL)
+#: R/factor.R:0
+msgid "invalid 'labels'; length %d should be 1 or %d"
+msgstr "nieprawidłowe 'labels'; długość %d powinna wynosić 1 lub %d"
 
-# src/library/base/R/matrix.R: 92
-# stop("attempt to set 'colnames' on an object with less than two dimensions")
-# src/library/base/R/matrix.R: 96
-# stop("attempt to set 'colnames' on an object with less than two dimensions")
-msgid "attempt to set 'colnames' on an object with less than two dimensions"
-msgstr "próba ustawienia 'colnames' dla obiektu z mniej niż dwoma wymiarami"
+#. R/attach.R: stop("invalid 'name' argument")
+#: R/attach.R:0
+msgid "invalid 'name' argument"
+msgstr "niepoprawny argument 'name'"
 
-# src/library/base/R/mean.R: 24
-# warning("argument is not numeric or logical: returning NA")
-msgid "argument is not numeric or logical: returning NA"
-msgstr ""
-"argument nie jest wartością liczbową ani logiczną: zwracanie wartości NA"
+#. R/files.R: stop("invalid 'path' argument")
+#: R/files.R:0
+msgid "invalid 'path' argument"
+msgstr "niepoprawny argument 'path'"
 
-# src/library/base/R/mean.R: 30
-# stop("'trim' must be numeric of length one")
-msgid "'trim' must be numeric of length one"
-msgstr "argument 'trim' musi być liczbą o długości 1"
+#. R/rle.R: stop("invalid 'rle' structure")
+#: R/rle.R:0
+msgid "invalid 'rle' structure"
+msgstr "niepoprawna struktura 'rle'"
 
-# src/library/base/R/mean.R: 34
-# stop("trimmed means are not defined for complex data")
-msgid "trimmed means are not defined for complex data"
-msgstr "przycięte średnie nie są zdefiniowane dla danych złożonych"
+#. R/dataframe.R: stop("invalid 'row.names' length")
+#. R/dataframe.R: stop("invalid 'row.names' length")
+#: R/dataframe.R:0
+msgid "invalid 'row.names' length"
+msgstr "niepoprawna długość 'row.names'"
 
-# src/library/base/R/merge.R: 47
-# stop("'by' must match numbers of columns")
-msgid "'by' must match numbers of columns"
-msgstr "argument 'by' musi zgadzać się z liczbą kolumn"
+#. R/files.R: stop("invalid 'time' argument")
+#: R/files.R:0
+msgid "invalid 'time' argument"
+msgstr "niepoprawny argument 'time'"
 
-# src/library/base/R/merge.R: 49
-# stop("'by' must match number of columns")
-msgid "'by' must match number of columns"
-msgstr "argument 'by' musi zgadzać się z liczbą kolumn"
+#. R/version.R: stop("invalid 'value'")
+#. R/version.R: stop("invalid 'value'")
+#. R/version.R: stop("invalid 'value'")
+#. R/version.R: stop("invalid 'value'")
+#: R/version.R:0
+msgid "invalid 'value'"
+msgstr "niepoprawna wartość 'value'"
 
-# src/library/base/R/merge.R: 51
-# stop("'by' must specify one or more columns as numbers, names or logical")
-msgid "'by' must specify one or more columns as numbers, names or logical"
-msgstr ""
-"argument 'by' musi określać jedną lub więcej kolumn jako liczby, nazwy lub "
-"warunki logiczne"
+#. R/seq.R: stop("invalid (to - from)/by in seq(.)")
+#: R/seq.R:0
+msgid "invalid (to - from)/by in seq(.)"
+msgstr "niepoprawne '(to - from)/by' w 'seq(.)'"
 
-# src/library/base/R/merge.R: 64
-# stop("'by.x' and 'by.y' specify different numbers of columns")
-msgid "'by.x' and 'by.y' specify different numbers of columns"
-msgstr "argumenty 'by.x' oraz 'by.y' określają różne liczby kolumn"
+#. R/qr.R: stop("invalid NCOL(R)")
+#: R/qr.R:0
+msgid "invalid NCOL(R)"
+msgstr "niepoprawna wartość 'ncol(R)'"
 
-# src/library/base/R/message.R: 36
-# warning("additional arguments ignored in message()")
-msgid "additional arguments ignored in message()"
-msgstr "dodatkowe argumenty zostały zignorowane w 'message()'"
+#. R/qr.R: stop("invalid NCOL(y)")
+#. R/qr.R: stop("invalid NCOL(y)")
+#. R/qr.R: stop("invalid NCOL(y)")
+#. R/qr.R: stop("invalid NCOL(y)")
+#: R/qr.R:0
+msgid "invalid NCOL(y)"
+msgstr "niepoprawna wartość 'ncol(y)'"
 
-# src/library/base/R/methodsSupport.R: 27
-# stop("tracing functions requires the 'methods' package, but unable to load the 'methods' namespace")
-msgid "tracing functions requires the 'methods' package, but unable to load the 'methods' namespace"
-msgstr ""
-"funkcjonalność śledzenia funkcji wymaga pakietu 'methods', ale nie można "
-"załadować przestrzeni nazw 'methods'"
+#. R/factor.R: warning("invalid factor level, NA generated")
+#. R/factor.R: warning("invalid factor level, NA generated")
+#: R/factor.R:0
+msgid "invalid factor level, NA generated"
+msgstr "niepoprawny poziom czynnika, wygenerowano wartość NA"
 
-# src/library/base/R/mode.R: 37
-# stop("invalid to change the storage mode of a factor")
-# src/main/coerce.c: 2776
-# error(_("invalid to change the storage mode of a factor"))
-msgid "invalid to change the storage mode of a factor"
-msgstr "nie można zmienić trybu przechowywania czynnika"
+#. R/namespace.R: stop("invalid import target")
+#: R/namespace.R:0
+msgid "invalid import target"
+msgstr "niepoprawny cel importu"
 
-# src/library/base/R/namespace.R: 39
-# warning(gettextf("namespace %s is not available and has been replaced\nby .GlobalEnv when processing object %s",
-#                                        sQuote(name)[1L], sQuote(where)),
-#                               domain = NA, call. = FALSE, immediate. = TRUE)
-msgid "namespace %s is not available and has been replaced\nby .GlobalEnv when processing object %s"
+#. R/dataframe.R: stop("invalid list argument: all variables should have the same length")
+#: R/dataframe.R:0
+msgid "invalid list argument: all variables should have the same length"
 msgstr ""
-"przestrzeń nazw %s nie jest dostępna, więc została zastąpiona przez '."
-"GlobalEnv' podczas przetwarzania obiektu %s"
+"niepoprawny argument listy: wszystkie zmienne powinny mieć tę samą długość"
 
-# src/library/base/R/namespace.R: 95
-# stop(gettextf("'%s' is not an exported object from 'namespace:%s'",
-#                               name, getNamespaceName(ns)),
-#                      call. = FALSE, domain = NA)
-msgid "'%s' is not an exported object from 'namespace:%s'"
-msgstr "'%s' nie jest eksportowanym obiektem z 'namespace:%s'"
+#. R/dates.R: stop("invalid mode for 'by'")
+#. R/datetime.R: stop("invalid mode for 'by'")
+#: R/dates.R:0 R/datetime.R:0
+msgid "invalid mode for 'by'"
+msgstr "błędny tryb dla argumentu 'by'"
 
-# src/library/base/R/namespace.R: 148
-# stop("namespace is already attached")
-msgid "namespace is already attached"
-msgstr "przestrzeń nazw jest już dołączona"
-
-# src/library/base/R/namespace.R: 178
-# stop(gettextf("%s not found", name),
-#                        domain = NA)
-# src/library/base/R/namespace.R: 678
-# stop(gettextf("%s not found", sQuote(name)),
-#                        domain = NA)
-msgid "%s not found"
-msgstr "wartość %s nie została znaleziona"
+#. R/qr.R: stop("invalid ncol(qr$qr)")
+#: R/qr.R:0
+msgid "invalid ncol(qr$qr)"
+msgstr "niepoprawna wartość 'ncol(qr$qr)'"
 
-# src/library/base/R/namespace.R: 203
-# stop(gettextf("namespace %s %s is already loaded, but %s %s is required",
-#                               sQuote(package), current, z$op, z$version),
-#                      domain = NA)
-msgid "namespace %s %s is already loaded, but %s %s is required"
-msgstr "przestrzeń nazw %s %s jest już załadowana, ale %s %s jest wymagana"
+#. R/qr.R: stop("invalid ncol(qr$rank)")
+#: R/qr.R:0
+msgid "invalid ncol(qr$rank)"
+msgstr "niepoprawna wartość 'ncol(qr$rank)'"
 
-# src/library/base/R/namespace.R: 257
-# stop(gettextf("namespace %s is already sealed in 'loadNamespace'",
-#                               sQuote(getNamespaceName(ns))),
-#                      call. = FALSE, domain = NA)
-msgid "namespace %s is already sealed in 'loadNamespace'"
-msgstr "przestrzeń nazw %s jest już zamknięta w 'loadNamespace()'"
+#. R/qr.R: stop("invalid ncol(x)")
+#: R/qr.R:0
+msgid "invalid ncol(x)"
+msgstr "niepoprawna wartość 'ncol(x)'"
 
-# src/library/base/R/namespace.R: 293
-# warning(gettextf("failed to assign RegisteredNativeSymbol for %s to %s since %s is already defined in the %s namespace",
-#                                                            sym$name, varName, varName, sQuote(package)),
-#                                                   domain = NA)
-msgid "failed to assign RegisteredNativeSymbol for %s to %s since %s is already defined in the %s namespace"
-msgstr ""
-"nie udało się przypisać RegisteredNativeSymbol dla %s do %s ponieważ %s jest "
-"już zdefiniowane w przestrzeni nazw %s"
+#. R/qr.R: stop("invalid ncol(y)")
+#: R/qr.R:0
+msgid "invalid ncol(y)"
+msgstr "niepoprawna wartość 'ncol(y)'"
 
-# src/library/base/R/namespace.R: 317
-# warning(gettextf("failed to assign NativeSymbolInfo for %s to %s since %s is already defined in the %s namespace",
-#                                                 origVarName, varName, varName, sQuote(package)),
-#                                        domain = NA)
-msgid "failed to assign NativeSymbolInfo for %s to %s since %s is already defined in the %s namespace"
-msgstr ""
-"nie udało się przypisać NativeSymbolInfo dla %s do %s ponieważ %s jest już "
-"zdefiniowane w przestrzeni nazw %s"
+#. R/qr.R: stop("invalid nrow(qr$qr)")
+#. R/qr.R: stop("invalid nrow(qr$qr)")
+#. R/qr.R: stop("invalid nrow(qr$qr)")
+#. R/qr.R: stop("invalid nrow(qr$qr)")
+#. R/qr.R: stop("invalid nrow(qr$qr)")
+#: R/qr.R:0
+msgid "invalid nrow(qr$qr)"
+msgstr "niepoprawna wartość 'nrow(qr$qr)'"
 
-# src/library/base/R/namespace.R: 321
-# warning(gettextf("failed to assign NativeSymbolInfo for %s since %s is already defined in the %s namespace",
-#                                                 origVarName, varName, sQuote(package)),
-#                                        domain = NA)
-msgid "failed to assign NativeSymbolInfo for %s since %s is already defined in the %s namespace"
-msgstr ""
-"nie udało się przypisać NativeSymbolInfo dla %s ponieważ %s jest już "
-"zdefiniowane w przestrzeni nazw %s"
+#. R/eigen.R: stop("invalid nrow(x)")
+#. R/kappa.R: stop("invalid nrow(x)")
+#. R/qr.R: stop("invalid nrow(x)")
+#: R/eigen.R:0 R/kappa.R:0 R/qr.R:0
+msgid "invalid nrow(x)"
+msgstr "niepoprawna wartość 'nrow(x)'"
 
-# src/library/base/R/namespace.R: 343
-# gettextf("package %s does not have a namespace",
-#                                 sQuote(package))
-msgid "package %s does not have a namespace"
-msgstr "pakiet %s nie zawiera przestrzeni nazw"
+#. R/cut.R: stop("invalid number of intervals")
+#: R/cut.R:0
+msgid "invalid number of intervals"
+msgstr "niepoprawna liczba interwałów"
 
-# src/library/base/R/namespace.R: 382
-# stop(gettextf("namespace %s %s is being loaded, but %s %s is required",
-#                               sQuote(package), version, z$op, z$version),
-#                      domain = NA)
-msgid "namespace %s %s is being loaded, but %s %s is required"
-msgstr "przestrzeń nazw %s %s jest ładowana, ale %s %s jest wymagana"
+#. R/library.R: stop("invalid package name")
+#: R/library.R:0
+msgid "invalid package name"
+msgstr "niepoprawna nazwa pakietu"
 
-# src/library/base/R/namespace.R: 428
-# stop(gettextf("unable to load R code in package %s",
-#                               sQuote(package)), call. = FALSE, domain = NA)
-msgid "unable to load R code in package %s"
-msgstr "nie można załadować kodu R w pakiecie %s"
+#. R/dates.R: stop("invalid specification of 'breaks'")
+#. R/dates.R: stop("invalid specification of 'breaks'")
+#. R/dates.R: stop("invalid specification of 'breaks'")
+#. R/datetime.R: stop("invalid specification of 'breaks'")
+#. R/datetime.R: stop("invalid specification of 'breaks'")
+#. R/datetime.R: stop("invalid specification of 'breaks'")
+#: R/dates.R:0 R/datetime.R:0
+msgid "invalid specification of 'breaks'"
+msgstr "niepoprawne określenie dla 'breaks'"
 
-# src/library/base/R/namespace.R: 513
-# warning(gettextf("'exportClassPattern' specified in 'NAMESPACE' but no matching classes in package %s", sQuote(package)),
-#                             call. = FALSE, domain = NA)
-msgid "'exportClassPattern' specified in 'NAMESPACE' but no matching classes in package %s"
-msgstr ""
-"'exportClassPattern' określono w pliku 'NAMESPACE', ale brak pasujących klas "
-"w pakiecie %s"
+#. R/dates.R: stop("invalid string for 'by'")
+#. R/datetime.R: stop("invalid string for 'by'")
+#: R/dates.R:0 R/datetime.R:0
+msgid "invalid string for 'by'"
+msgstr "błędny łańcuch dla argumentu 'by'"
 
-# src/library/base/R/namespace.R: 521
-# stop(gettextf("in package %s classes %s were specified for export but not defined",
-#                                   sQuote(package),
-#                                   paste(expClasses[missingClasses],
-#                                         collapse = ", ")),
-#                          domain = NA)
-msgid "in package %s classes %s were specified for export but not defined"
-msgstr ""
-"w pakiecie %s klasy %s zostały określone do eksportu, ale nie zostały "
-"zdefiniowane"
+#. R/mode.R: stop("invalid to change the storage mode of a factor")
+#: R/mode.R:0
+msgid "invalid to change the storage mode of a factor"
+msgstr "nie można zmienić trybu przechowywania czynnika"
 
-# src/library/base/R/namespace.R: 538
-# warning(gettextf("no function found corresponding to methods exports from %s for: %s",
-#                                      sQuote(package),
-#                                      paste(sQuote(sort(unique(addGenerics[nowhere]))), collapse = ", ")),
-#                          domain = NA, call. = FALSE)
-msgid "no function found corresponding to methods exports from %s for: %s"
-msgstr ""
-"nie znaleziono funkcji odpowiadającej eksportom funkcji z przestrzeni nazw "
-"%s dla: %s"
+#. R/datetime.R: stop("invalid units specified")
+#. R/datetime.R: stop("invalid units specified")
+#: R/datetime.R:0
+msgid "invalid units specified"
+msgstr "niepoprawne określenie 'units'"
 
-# src/library/base/R/namespace.R: 581
-# stop(gettextf("in %s methods for export not found: %s",
-#                                   sQuote(package),
-#                                   paste(expMethods[missingMethods],
-#                                         collapse = ", ")),
-#                          domain = NA)
-msgid "in %s methods for export not found: %s"
-msgstr "w pakiecie %s metody do eksportu nie zostały znalezione: %s"
+#. R/tabulate.R: stop("invalid value of 'nbins'")
+#: R/tabulate.R:0
+msgid "invalid value of 'nbins'"
+msgstr "niepoprawna wartość 'nbins'"
 
-# src/library/base/R/namespace.R: 617
-# warning(gettextf("multiple methods tables found for %s",
-# 				    sQuote(mi)), call. = FALSE, domain = NA)
-msgid "multiple methods tables found for %s"
-msgstr "wiele tablic metod znaleziono dla %s"
+#. R/version.R: gettextf("invalid version specification %s", paste(sQuote(unique(x[!ok])),     collapse = ", "))
+#: R/version.R:0
+msgid "invalid version specification %s"
+msgstr "niepoprawne określenie wersji %s"
 
-# src/library/base/R/namespace.R: 624
-# warning(gettextf("failed to find metadata object for %s",
-#                                        sQuote(mi)), call. = FALSE, domain = NA)
-msgid "failed to find metadata object for %s"
-msgstr "nie udało się znaleźć obiektu metadanych dla  %s"
+#. R/seq.R: stop("length must be non-negative number")
+#: R/seq.R:0
+msgid "length must be non-negative number"
+msgstr "długość musi być liczbą nieujemną"
 
-# src/library/base/R/namespace.R: 630
-# stop(gettextf("in package %s methods %s were specified for export but not defined",
-#                               sQuote(package),
-#                               paste(expMethods, collapse = ", ")),
-#                      domain = NA)
-msgid "in package %s methods %s were specified for export but not defined"
+#. R/scale.R: stop("length of 'center' must equal the number of columns of 'x'")
+#: R/scale.R:0
+msgid "length of 'center' must equal the number of columns of 'x'"
 msgstr ""
-"w pakiecie %s metody %s zostały określone do eksportu, ale nie zostały "
-"zdefiniowane"
+"długość argumentu 'center' musi równać się liczbie kolumn argumentu 'x'"
 
-# src/library/base/R/namespace.R: 660
-# gettextf("Loading required namespace: %s",
-#                                            package)
-msgid "Loading required namespace: %s"
-msgstr "Ładowanie wymaganej przestrzeni nazw: %s"
+#. R/scale.R: stop("length of 'scale' must equal the number of columns of 'x'")
+#: R/scale.R:0
+msgid "length of 'scale' must equal the number of columns of 'x'"
+msgstr "długość argumentu 'scale' musi równać się liczbie kolumn argumentu 'x'"
 
-# src/library/base/R/namespace.R: 690
-# stop("not loading a namespace")
-msgid "not loading a namespace"
-msgstr "nie ładuję przestrzeni nazw"
+#. R/sweep.R: warning("length(STATS) or dim(STATS) do not match dim(x)[MARGIN]")
+#: R/sweep.R:0
+msgid "length(STATS) or dim(STATS) do not match dim(x)[MARGIN]"
+msgstr "'length(STATS)' lub 'dim(STATS)' nie zgadza się z 'dim(x)[MARGIN]'"
 
-# src/library/base/R/namespace.R: 733
-# stop(gettextf("namespace %s is imported by %s so cannot be unloaded",
-#                       sQuote(getNamespaceName(ns)),
-#                       paste(sQuote(users), collapse = ", ")),
-#              domain = NA)
-msgid "namespace %s is imported by %s so cannot be unloaded"
-msgstr ""
-"przestrzeń nazw %s jest zaimportowana przez %s nie może być więc usunięta"
+#. R/cut.R: stop("lengths of 'breaks' and 'labels' differ")
+#: R/cut.R:0
+msgid "lengths of 'breaks' and 'labels' differ"
+msgstr "długości argumentów 'breaks' oraz 'labels' różnią się"
 
-# src/library/base/R/namespace.R: 768
-# stop("not a namespace")
-msgid "not a namespace"
-msgstr "argument nie jest przestrzenią nazw"
+#. R/factor.R: stop("level sets of factors are different")
+#. R/factor.R: stop("level sets of factors are different")
+#: R/factor.R:0
+msgid "level sets of factors are different"
+msgstr "poziomy czynników są różne"
 
-# src/library/base/R/namespace.R: 770
-# stop("operation not allowed on base namespace")
-msgid "operation not allowed on base namespace"
-msgstr "operacja niedozwolona na bazowej przestrzeni nazw"
+#. R/library.R: gettextf("license for package %s not accepted", sQuote(package))
+#: R/library.R:0
+msgid "license for package %s not accepted"
+msgstr "licencja dla pakietu %s nie została zaakceptowana"
 
-# src/library/base/R/namespace.R: 826
-# stop(gettextf("duplicate import names %s",
-#                       paste(sQuote(impnames[duplicated(impnames)]),
-#                             collapse = ", ")), domain = NA)
-msgid "duplicate import names %s"
-msgstr "powtórzone nazwy %s importu"
+#. R/windows/junctions.R: gettextf("link '%s' already exists", link)
+#: R/windows/junctions.R:0
+msgid "link '%s' already exists"
+msgstr "połączenie '%s' już istnieje"
 
-# src/library/base/R/namespace.R: 832
-# gettext("replacing local value with import %s when loading %s")
-# src/library/base/R/namespace.R: 844
-# gettext("replacing local value with import %s when loading %s")
-msgid "replacing local value with import %s when loading %s"
-msgstr ""
-"zastępowanie lokalnej wartości z importu %s podczas ładowania przestrzeni "
-"nazw %s"
+#. R/dataframe.R: gettextf("list of length %d not meaningful", length(e2))
+#. R/dataframe.R: gettextf("list of length %d not meaningful", length(e1))
+#: R/dataframe.R:0
+msgid "list of length %d not meaningful"
+msgstr "lista o długości %d nie ma sensu"
 
-# src/library/base/R/namespace.R: 837
-# stop("cannot import into a sealed namespace")
-msgid "cannot import into a sealed namespace"
-msgstr "nie można zaimportować do zamkniętej przestrzeni nazw"
+#. R/merge.R: stop("long vectors are not supported")
+#: R/merge.R:0
+msgid "long vectors are not supported"
+msgstr "długie wektory nie są wspierane"
 
-# src/library/base/R/namespace.R: 839
-# gettext("replacing previous import by %s when loading %s")
-msgid "replacing previous import by %s when loading %s"
+#. R/dynload.R: stop("looking for DLL for native routine call, but no DLLs in namespace of call")
+#: R/dynload.R:0
+msgid ""
+"looking for DLL for native routine call, but no DLLs in namespace of call"
 msgstr ""
-"zastępowanie poprzedniego importu przez %s podczas ładowanie przestrzeni "
-"nazw %s"
+"poszukiwanie pliku DLL dla wywołania rodzimej procedury, ale brak plików DLL "
+"w przestrzeni nazw wywołania"
 
-# src/library/base/R/namespace.R: 847
-# stop("invalid import target")
-msgid "invalid import target"
-msgstr "niepoprawny cel importu"
+#. R/RNG.R: stop("malformed version string")
+#: R/RNG.R:0
+msgid "malformed version string"
+msgstr "zniekształcony łańcuch tekstowy wersji"
 
-# src/library/base/R/namespace.R: 866
-# warning(gettextf("found methods to import for function %s but not the generic itself",
-# 					 sQuote(genName)),
-#                                 call. = FALSE, domain = NA)
-msgid "found methods to import for function %s but not the generic itself"
-msgstr ""
-"znaleziono metody do importu dla funkcji %s ale nie znaleziono samej funkcji "
-"ogólnej"
+#. R/grep.R: stop("match distance components must be non-negative")
+#. R/grep.R: stop("match distance components must be non-negative")
+#: R/grep.R:0
+msgid "match distance components must be non-negative"
+msgstr "komponenty o dopasowanej odległości muszą być nieujemne"
 
-# src/library/base/R/namespace.R: 922
-# message(gettextf("No methods found in \"%s\" for requests: %s",
-#                          pkg, paste(vars[is.na(match(vars, allFuns))], collapse = ", ")),
-#                 domain = NA)
-msgid "No methods found in \"%s\" for requests: %s"
-msgstr "Nie znaleziono metod w pakiecie '%s' dla żądań: %s"
+#. R/sort.R: stop("method = \"quick\" is only for numeric 'x'")
+#: R/sort.R:0
+msgid "method = \"quick\" is only for numeric 'x'"
+msgstr "'method=\"quick\"' jest tylko dla liczbowych 'x'"
 
-# src/library/base/R/namespace.R: 930
-# stop(gettextf("requested methods not found in environment/package %s: %s",
-#                       sQuote(pkg),
-#                       paste(vars[is.na(match(vars, allFuns))],
-#                             collapse = ", ")), call. = FALSE, domain = NA)
-msgid "requested methods not found in environment/package %s: %s"
-msgstr "zażądane metody nie zostały znalezione w środowisku/pakiecie %s: %s"
+#. R/dataframe.R: gettextf("mismatch of row names in arguments of 'data.frame', item %d",     i)
+#: R/dataframe.R:0
+msgid "mismatch of row names in arguments of 'data.frame', item %d"
+msgstr "niedopasowanie nazw wierszy w argumentach 'data.frame()', pozycja %d"
 
-# src/library/base/R/namespace.R: 959
-# warning(gettextf("No generic function found corresponding to requested imported methods for \"%s\" from package \"%s\" (malformed exports?)",
-#                                  g, pkg),
-#                         domain = NA)
-msgid "No generic function found corresponding to requested imported methods for \"%s\" from package \"%s\" (malformed exports?)"
-msgstr ""
-"Nie znaleziono ogólnej funkcji odpowiadającej zażądanym zaimportowanym "
-"metodom dla funkcji '%s' z pakietu '%s' (uszkodzone eksporty?)"
+#. R/grep.R: stop("missing replacement values are not allowed")
+#. R/grep.R: stop("missing replacement values are not allowed")
+#: R/grep.R:0
+msgid "missing replacement values are not allowed"
+msgstr "brakujące wartości dla zamiany nie są dozwolone"
 
-# src/library/base/R/namespace.R: 1003
-# stop("cannot add to exports of a sealed namespace")
-msgid "cannot add to exports of a sealed namespace"
-msgstr "nie można dodać do eksportów zamkniętej przestrzeni nazw"
+#. R/dataframe.R: stop("missing values are not allowed in subscripted assignments of data frames")
+#. R/dataframe.R: stop("missing values are not allowed in subscripted assignments of data frames")
+#: R/dataframe.R:0
+msgid ""
+"missing values are not allowed in subscripted assignments of data frames"
+msgstr ""
+"brakujące wartości nie są dozwolone w indeksowanych przypisaniach ramek "
+"danych"
 
-# src/library/base/R/namespace.R: 1038
-# stop(gettextf("undefined exports: %s", undef), domain = NA)
-msgid "undefined exports: %s"
-msgstr "niezdefiniowane eksporty: %s"
+#. R/rowsum.R: warning("missing values for 'group'")
+#. R/rowsum.R: warning("missing values for 'group'")
+#: R/rowsum.R:0
+msgid "missing values for 'group'"
+msgstr "brakujące wartości w argumencie 'group'"
 
-# src/library/base/R/namespace.R: 1114
-# stop(gettextf("package %s has no 'NAMESPACE' file", sQuote(package)),
-#              domain = NA)
-msgid "package %s has no 'NAMESPACE' file"
-msgstr "pakiet %s nie posiada pliku 'NAMESPACE'"
+#. R/dataframe.R: stop("missing values in 'row.names' are not allowed")
+#: R/dataframe.R:0
+msgid "missing values in 'row.names' are not allowed"
+msgstr "brakujące wartości w 'row.names' nie są dozwolone"
 
-# src/library/base/R/namespace.R: 1135
-# stop(gettextf("empty name in directive '%s' in 'NAMESPACE' file",
-# 			      as.character(e[[1L]])),
-# 		     domain = NA)
-msgid "empty name in directive '%s' in 'NAMESPACE' file"
-msgstr "pusta nazwa w dyrektywie %s w pliku 'NAMESPACE'"
+#. R/files.R: stop("more 'from' files than 'to' files")
+#. R/windows/junctions.R: stop("more 'from' files than 'to' files")
+#: R/files.R:0 R/windows/junctions.R:0
+msgid "more 'from' files than 'to' files"
+msgstr "więcej plików 'from' niż plików 'to'"
 
-# src/library/base/R/namespace.R: 1237
-# warning(gettextf("duplicate symbol names %s in useDynLib(\"%s\")",
-#                                             paste(sQuote(names(symNames)[dup]),
-#                                                   collapse = ", "), dyl),
-#                                    domain = NA)
-msgid "duplicate symbol names %s in useDynLib(\"%s\")"
-msgstr "powtórzone nazwy symboli %s w 'useDynlib(\"%s\")'"
+#. R/dynload.R: gettextf("multiple DLLs match '%s'. Using '%s'", dll, dll[["path"]])
+#: R/dynload.R:0
+msgid "multiple DLLs match '%s'. Using '%s'"
+msgstr "wielokrotna zgodność plików DLL z '%s'. Używanie '%s'"
 
-# src/library/base/R/namespace.R: 1287
-# stop(gettextf("bad 'S3method' directive: %s",
-#                                      deparse(e)),
-#                             call. = FALSE, domain = NA)
-msgid "bad 'S3method' directive: %s"
-msgstr "niepoprawna dyrektywa 'S3method': %s"
+#. R/namespace.R: gettextf("multiple methods tables found for %s", sQuote(mi))
+#: R/namespace.R:0
+msgid "multiple methods tables found for %s"
+msgstr "wiele tablic metod znaleziono dla %s"
 
-# src/library/base/R/namespace.R: 1303
-# stop(gettextf("unknown namespace directive: %s", deparse(e, nlines=1L)),
-#                     call. = FALSE, domain = NA)
-msgid "unknown namespace directive: %s"
-msgstr "nieznana dyrektywa przestrzeni nazw: %s"
+#. R/grep.R: stop("must have replacement values for matches")
+#: R/grep.R:0
+msgid "must have replacement values for matches"
+msgstr "wymagane są wartości zamian dla dopasowań"
 
-# src/library/base/R/namespace.R: 1349
-# warning(gettextf("S3 method %s was declared but not found",
-#                              sQuote(method)), call. = FALSE)
-msgid "S3 method %s was declared but not found"
-msgstr "metoda S3 %s została zadeklarowana, ale nie została znaleziona"
+#. R/grep.R: stop("must have replacements for matches")
+#: R/grep.R:0
+msgid "must have replacements for matches"
+msgstr "wymagane są zamiany dla dopasowań"
 
-# src/library/base/R/namespace.R: 1358
-# stop("bad method")
-msgid "bad method"
-msgstr "błędna metoda"
+#. R/grep.R: stop("must have replacements for non-matches")
+#: R/grep.R:0
+msgid "must have replacements for non-matches"
+msgstr "wymagane są zamiany dla niedopasowań"
 
-# src/library/base/R/namespace.R: 1386
-# stop(gettextf("object '%s' not found whilst loading namespace '%s'",
-#                               genname, package), call. = FALSE, domain = NA)
-msgid "object '%s' not found whilst loading namespace '%s'"
-msgstr "nie znaleziono obiektu '%s' podczas ładowania przestrzeni nazw '%s'"
+#. R/dynload.R: gettextf("must pass a package name, %s or %s object", dQuote("DLLInfo"),     dQuote("DllInfoReference"))
+#: R/dynload.R:0
+msgid "must pass a package name, %s or %s object"
+msgstr "wymagane jest przekazanie nazwy pakietu %s lub obiekt %s"
 
-# src/library/base/R/notyet.R: 20
-# stop(gettextf("'%s' is not implemented yet",
-#                   as.character(sys.call(sys.parent())[[1L]])), call. = FALSE)
-msgid "'%s' is not implemented yet"
-msgstr "'%s' nie jest jeszcze zaimplementowane"
+#. R/dynload.R: gettextf("must specify DLL via a %s object. See getLoadedDLLs()",     dQuote("DLLInfo"))
+#: R/dynload.R:0
+msgid "must specify DLL via a %s object. See getLoadedDLLs()"
+msgstr ""
+"wymagane jest określenie DLL przez obiekt klasy %s. Zobacz 'getLoadedDLLs()'"
 
-# src/library/base/R/notyet.R: 24
-# gettextf("argument '%s' is not used (yet)", arg)
-msgid "argument '%s' is not used (yet)"
-msgstr "argument %s nie został (jeszcze) użyty"
+#. R/mapply.R: stop("must specify names of formal arguments for 'vectorize'")
+#: R/mapply.R:0
+msgid "must specify names of formal arguments for 'vectorize'"
+msgstr "wymagane jest określenie nazwy formalnych argumentów dla 'vectorize'"
 
-# src/library/base/R/octhex.R: 63
-# stop("'x' cannot be coerced to class \"octmode\"")
-msgid "'x' cannot be coerced to class \"octmode\""
-msgstr "argument 'x' nie może zostać przekształcony na klasę \"octmode\""
+#. R/dataframe.R: warning("named arguments are discouraged")
+#. R/dataframe.R: warning("named arguments are discouraged")
+#: R/dataframe.R:0
+msgid "named arguments are discouraged"
+msgstr "nazwane argumenty są odrzucane"
 
-# src/library/base/R/octhex.R: 113
-# stop("'x' cannot be coerced to class \"hexmode\"")
-msgid "'x' cannot be coerced to class \"hexmode\""
-msgstr "argument 'x' nie może zostać przekształcony na klasę \"hexmode\""
+#. R/dataframe.R: warning("named arguments other than 'drop' are discouraged")
+#: R/dataframe.R:0
+msgid "named arguments other than 'drop' are discouraged"
+msgstr "nazwane argumenty inne niż 'drop' są odrzucane"
 
-# src/library/base/R/outer.R: 40
-# stop('using ... with FUN = "*" is an error')
-msgid "using ... with FUN = \"*\" is an error"
-msgstr "używanie '...' z FUN = \"*\" jest błędem"
+#. R/dataframe.R: warning("named arguments other than 'exact' are discouraged")
+#: R/dataframe.R:0
+msgid "named arguments other than 'exact' are discouraged"
+msgstr "nazwane argumenty inne niż 'exact' są odrzucane"
 
-# src/library/base/R/pmax.R: 25
-# stop("no arguments")
-# src/library/base/R/pmax.R: 63
-# stop("no arguments")
-# src/main/summary.c: 889
-# error(_("no arguments"))
-msgid "no arguments"
-msgstr "brak argumentów"
+#. R/dataframe.R: stop("names do not match previous names")
+#. R/dataframe.R: stop("names do not match previous names")
+#: R/dataframe.R:0
+msgid "names do not match previous names"
+msgstr "nazwy nie zgadzają się z poprzednimi nazwami"
 
-# src/library/base/R/pmax.R: 38
-# warning("an argument will be fractionally recycled")
-# src/library/base/R/pmax.R: 42
-# warning("an argument will be fractionally recycled")
-# src/library/base/R/pmax.R: 75
-# warning("an argument will be fractionally recycled")
-# src/library/base/R/pmax.R: 79
-# warning("an argument will be fractionally recycled")
-# src/main/summary.c: 934
-# warning(_("an argument will be fractionally recycled"))
-msgid "an argument will be fractionally recycled"
-msgstr "argument zostanie częściowo powtórzony"
+#. R/namespace.R: gettextf("namespace %s %s is already loaded, but %s %s is required",     sQuote(package), current, zop, zversion)
+#: R/namespace.R:0
+msgid "namespace %s %s is already loaded, but %s %s is required"
+msgstr "przestrzeń nazw %s %s jest już załadowana, ale %s %s jest wymagana"
 
-# src/library/stats/R/kmeans.R: 86
-# stop("invalid ncol(x)")
-# src/library/base/R/qr.R: 33
-# stop("invalid ncol(x)")
-msgid "invalid ncol(x)"
-msgstr "niepoprawna wartość 'ncol(x)'"
+#. R/namespace.R: gettextf("namespace %s %s is being loaded, but %s %s is required",     sQuote(package), version, zop, zversion)
+#: R/namespace.R:0
+msgid "namespace %s %s is being loaded, but %s %s is required"
+msgstr "przestrzeń nazw %s %s jest ładowana, ale %s %s jest wymagana"
 
-# src/library/base/R/qr.R: 36
-# stop("too large a matrix for LINPACK")
-msgid "too large a matrix for LINPACK"
-msgstr "macierz jest zbyt duża dla LINPACK"
+#. R/namespace.R: gettextf("namespace %s is already sealed in 'loadNamespace'",     sQuote(getNamespaceName(ns)))
+#: R/namespace.R:0
+msgid "namespace %s is already sealed in 'loadNamespace'"
+msgstr "przestrzeń nazw %s jest już zamknięta w 'loadNamespace()'"
 
-# src/library/base/R/qr.R: 59
-# stop("first argument must be a QR decomposition")
-msgid "first argument must be a QR decomposition"
-msgstr "pierwszy argument musi być dekompozycją QR"
+#. R/namespace.R: gettextf("namespace %s is imported by %s so cannot be unloaded",     sQuote(getNamespaceName(ns)), paste(sQuote(users), collapse = ", "))
+#: R/namespace.R:0
+msgid "namespace %s is imported by %s so cannot be unloaded"
+msgstr ""
+"przestrzeń nazw %s jest zaimportowana przez %s nie może być więc usunięta"
 
-# src/library/base/R/qr.R: 60
-# stop("invalid nrow(qr$qr)")
-# src/library/base/R/qr.R: 120
-# stop("invalid nrow(qr$qr)")
-# src/library/base/R/qr.R: 146
-# stop("invalid nrow(qr$qr)")
-# src/library/base/R/qr.R: 171
-# stop("invalid nrow(qr$qr)")
-# src/library/base/R/qr.R: 187
-# stop("invalid nrow(qr$qr)")
-msgid "invalid nrow(qr$qr)"
-msgstr "niepoprawna wartość 'nrow(qr$qr)'"
+#. R/namespace.R: gettextf("namespace %s is not available and has been replaced\nby .GlobalEnv when processing object %s",     sQuote(name)[1L], sQuote(where))
+#: R/namespace.R:0
+msgid ""
+"namespace %s is not available and has been replaced\n"
+"by .GlobalEnv when processing object %s"
+msgstr ""
+"przestrzeń nazw %s nie jest dostępna, więc została zastąpiona przez '."
+"GlobalEnv' podczas przetwarzania obiektu %s"
 
-# src/library/base/R/qr.R: 61
-# stop("invalid ncol(qr$qr)")
-msgid "invalid ncol(qr$qr)"
-msgstr "niepoprawna wartość 'ncol(qr$qr)'"
+#. R/namespace.R: stop("namespace is already attached")
+#: R/namespace.R:0
+msgid "namespace is already attached"
+msgstr "przestrzeń nazw jest już dołączona"
 
-# src/library/base/R/qr.R: 62
-# stop("invalid ncol(qr$rank)")
-msgid "invalid ncol(qr$rank)"
-msgstr "niepoprawna wartość 'ncol(qr$rank)'"
+#. R/dataframe.R: stop("need 0, 1, or 2 subscripts")
+#: R/dataframe.R:0
+msgid "need 0, 1, or 2 subscripts"
+msgstr "wymagane jest 0, 1, lub 2 indeksy"
 
-# src/library/base/R/qr.R: 66
-# stop("invalid ncol(y)")
-msgid "invalid ncol(y)"
-msgstr "niepoprawna wartość 'ncol(y)'"
+#. R/datetime.R: stop("need explicit units for numeric conversion")
+#: R/datetime.R:0
+msgid "need explicit units for numeric conversion"
+msgstr ""
+"'as.difftime()' potrzebuje sprecyzowanego argumentu 'units' dla konwersji "
+"liczbowej"
 
-# src/library/base/R/qr.R: 84
-# stop("'qr' and 'y' must have the same number of rows")
-# src/library/base/R/qr.R: 126
-# stop("'qr' and 'y' must have the same number of rows")
-# src/library/base/R/qr.R: 151
-# stop("'qr' and 'y' must have the same number of rows")
-# src/library/base/R/qr.R: 175
-# stop("'qr' and 'y' must have the same number of rows")
-# src/library/base/R/qr.R: 193
-# stop("'qr' and 'y' must have the same number of rows")
-msgid "'qr' and 'y' must have the same number of rows"
-msgstr "argumenty 'qr' oraz 'y' muszą mieć tę samą liczbę wierszy"
+#. R/qr.R: stop("need larger value of 'ncol' as pivoting occurred")
+#: R/qr.R:0
+msgid "need larger value of 'ncol' as pivoting occurred"
+msgstr "wymagana jest większa wartość argumentu 'ncol' ponieważ nastąpił obrót"
 
-# src/library/base/R/qr.R: 94
-# stop("exact singularity in 'qr.coef'")
-msgid "exact singularity in 'qr.coef'"
-msgstr "ścisła osobliwość w funkcji 'qr.coef()'"
+#. R/grep.R: gettextf("need non-overlapping matches for %s", sQuote("invert = NA"))
+#. R/grep.R: gettextf("need non-overlapping matches for %s", sQuote("invert = TRUE"))
+#: R/grep.R:0
+msgid "need non-overlapping matches for %s"
+msgstr "wymagane są niepokrywające się dopasowania dla %s"
 
-# src/library/base/R/qr.R: 113
-# stop("argument is not a QR decomposition")
-# src/library/base/R/qr.R: 139
-# stop("argument is not a QR decomposition")
-# src/library/base/R/qr.R: 165
-# stop("argument is not a QR decomposition")
-# src/library/base/R/qr.R: 183
-# stop("argument is not a QR decomposition")
-# src/library/base/R/qr.R: 204
-# stop("argument is not a QR decomposition")
-# src/library/base/R/qr.R: 222
-# stop("argument is not a QR decomposition")
-# src/library/base/R/qr.R: 239
-# stop("argument is not a QR decomposition")
-msgid "argument is not a QR decomposition"
-msgstr "argument nie jest dekompozycją QR"
+#. R/dataframe.R: stop("new columns would leave holes after existing columns")
+#: R/dataframe.R:0
+msgid "new columns would leave holes after existing columns"
+msgstr "nowe kolumny zostawiłyby dziury po istniejących kolumnach"
 
-# src/library/base/R/qr.R: 123
-# stop("invalid NCOL(y)")
-# src/library/base/R/qr.R: 149
-# stop("invalid NCOL(y)")
-# src/library/base/R/qr.R: 173
-# stop("invalid NCOL(y)")
-# src/library/base/R/qr.R: 191
-# stop("invalid NCOL(y)")
-msgid "invalid NCOL(y)"
-msgstr "niepoprawna wartość 'ncol(y)'"
+#. R/conditions.R: gettextf("no 'restart' '%s' found", as.character(r))
+#. R/conditions.R: gettextf("no 'restart' '%s' found", as.character(r))
+#: R/conditions.R:0
+msgid "no 'restart' '%s' found"
+msgstr "nie znaleziono 'restart' '%s'"
 
-# src/library/base/R/qr.R: 166
-# stop("not implemented for complex 'qr'")
-# src/library/base/R/qr.R: 184
-# stop("not implemented for complex 'qr'")
-msgid "not implemented for complex 'qr'"
+#. R/library.R: stop("no DLL was specified")
+#: R/library.R:0
+msgid "no DLL was specified"
+msgstr "nie określono pliku DLL"
+
+#. R/datetime.R: warning("no Olson database found")
+#: R/datetime.R:0
+msgid "no Olson database found"
+msgstr "nie znaleziono bazy Olsona"
+
+#. R/pmax.R: stop("no arguments")
+#. R/pmax.R: stop("no arguments")
+#: R/pmax.R:0
+msgid "no arguments"
+msgstr "brak argumentów"
+
+#. R/files.R: stop("no file found")
+#: R/files.R:0
+msgid "no file found"
+msgstr "nie znaleziono pliku"
+
+#. R/files.R: stop("no files to copy to")
+#: R/files.R:0
+msgid "no files to copy to"
+msgstr "brak plików do skopiowania"
+
+#. R/files.R: stop("no files to link from")
+#. R/files.R: stop("no files to link from")
+#: R/files.R:0
+msgid "no files to link from"
+msgstr "brak plików z których można łączyć"
+
+#. R/files.R: stop("no files to link to")
+#. R/windows/junctions.R: stop("no files to link to")
+#: R/files.R:0 R/windows/junctions.R:0
+msgid "no files to link to"
+msgstr "brak plików do których można łączyć"
+
+#. R/files.R: stop("no files/directory to link to")
+#: R/files.R:0
+msgid "no files/directory to link to"
+msgstr "brak plików/katalogu do których można łączyć"
+
+#. R/namespace.R: gettextf("no function found corresponding to methods exports from %s for: %s",     sQuote(package), paste(sQuote(sort(unique(addGenerics[nowhere]))),         collapse = ", "))
+#: R/namespace.R:0
+msgid "no function found corresponding to methods exports from %s for: %s"
 msgstr ""
-"funkcja 'qr()' nie jest zaimplementowana dla zespolonego argumentu 'qr'"
+"nie znaleziono funkcji odpowiadającej eksportom funkcji z przestrzeni nazw "
+"%s dla: %s"
 
-# src/library/base/R/qr.R: 167
-# stop("not supported for LAPACK QR")
-# src/library/base/R/qr.R: 185
-# stop("not supported for LAPACK QR")
-msgid "not supported for LAPACK QR"
-msgstr "funkcja 'qr()' nie jest wspierana przez 'LAPACK QR'"
+#. R/library.R: gettext("no library trees found in 'lib.loc'")
+#: R/library.R:0
+msgid "no library trees found in 'lib.loc'"
+msgstr "nie znaleziono drzew bibliotek w 'lib.loc'"
 
-# src/library/base/R/qr.R: 189
-# stop("'k' is too large")
-msgid "'k' is too large"
-msgstr "argument 'k' jest zbyt duży"
+#. R/match.R: stop("no match")
+#: R/match.R:0
+msgid "no match"
+msgstr "brak dopasowania"
 
-# src/library/base/R/qr.R: 243
-# stop("need larger value of 'ncol' as pivoting occurred")
-msgid "need larger value of 'ncol' as pivoting occurred"
-msgstr "wymagana jest większa wartość argumentu 'ncol' ponieważ nastąpił obrót"
+#. R/library.R: message("no packages found")
+#: R/library.R:0
+msgid "no packages found"
+msgstr "nie znaleziono pakietów"
 
-# src/library/base/R/qr.R: 246
-# stop("invalid NCOL(R)")
-msgid "invalid NCOL(R)"
-msgstr "niepoprawna wartość 'ncol(R)'"
+#. R/library.R: stop("no shared object was specified")
+#: R/library.R:0
+msgid "no shared object was specified"
+msgstr "nie określono współdzielonego obiektu"
 
-# src/library/base/R/rle.R: 22
-# stop("'x' must be a vector of an atomic type")
-msgid "'x' must be a vector of an atomic type"
-msgstr "'x' musi być wektorem o typie atomowym"
+#. R/taskCallback.R: gettextf("no such element '%s'", which)
+#: R/taskCallback.R:0
+msgid "no such element '%s'"
+msgstr "nie ma elementu '%s'"
 
-# src/library/base/R/rle.R: 47
-# stop("invalid 'rle' structure")
-msgid "invalid 'rle' structure"
-msgstr "niepoprawna struktura 'rle'"
+#. R/dataframe.R: stop("non-existent rows not allowed")
+#. R/dataframe.R: stop("non-existent rows not allowed")
+#: R/dataframe.R:0
+msgid "non-existent rows not allowed"
+msgstr "nieistniejące wiersze nie są dozwolone"
 
-# src/library/base/R/rm.R: 26
-# stop("... must contain names or character strings")
-msgid "... must contain names or character strings"
-msgstr "'...' musi zawierać nazwy lub łańcuchy tekstowe"
+#. R/sort.R: stop("non-finite 'partial'")
+#: R/sort.R:0
+msgid "non-finite 'partial'"
+msgstr "nieskończona wartość 'partial'"
 
-# src/library/base/R/rowsum.R: 24
-# stop("incorrect length for 'group'")
-# src/library/base/R/rowsum.R: 35
-# stop("incorrect length for 'group'")
-msgid "incorrect length for 'group'"
-msgstr "niepoprawna długość argumentu 'group'"
+#. R/dataframe.R: stop("non-numeric variable in data frame: ", vnames[!mode.ok])
+#: R/dataframe.R:0
+msgid "non-numeric variable in data frame:"
+msgstr "zmienna nieliczbowa w ramce danych:"
 
-# src/library/base/R/rowsum.R: 25
-# warning("missing values for 'group'")
-# src/library/base/R/rowsum.R: 36
-# warning("missing values for 'group'")
-msgid "missing values for 'group'"
-msgstr "brakujące wartości w argumencie 'group'"
+#. R/eigen.R: stop("non-square matrix in 'eigen'")
+#: R/eigen.R:0
+msgid "non-square matrix in 'eigen'"
+msgstr "macierz w funkcji 'eigen()' nie jest kwadratowa"
+
+#. R/library.R: stop("none of the packages are loaded")
+#: R/library.R:0
+msgid "none of the packages are loaded"
+msgstr "żaden z tych pakietów nie został załadowany"
 
-# src/library/base/R/rowsum.R: 34
-# stop("not a data frame")
+#. R/kappa.R: gettextf("norm '%s' currently always uses exact = FALSE", norm)
+#: R/kappa.R:0
+msgid "norm '%s' currently always uses exact = FALSE"
+msgstr "norma '%s' aktualnie zawsze używa dokładnej wartości = FALSE"
+
+#. R/rowsum.R: stop("not a data frame")
+#: R/rowsum.R:0
 msgid "not a data frame"
 msgstr "argument nie jest ramką danych"
 
-# src/library/base/R/scale.R: 34
-# stop("length of 'center' must equal the number of columns of 'x'")
-msgid "length of 'center' must equal the number of columns of 'x'"
-msgstr ""
-"długość argumentu 'center' musi równać się liczbie kolumn argumentu 'x'"
-
-# src/library/base/R/scale.R: 48
-# stop("length of 'scale' must equal the number of columns of 'x'")
-msgid "length of 'scale' must equal the number of columns of 'x'"
-msgstr "długość argumentu 'scale' musi równać się liczbie kolumn argumentu 'x'"
+#. R/namespace.R: stop("not a namespace")
+#: R/namespace.R:0
+msgid "not a namespace"
+msgstr "argument nie jest przestrzenią nazw"
 
-# src/library/base/R/scan.R: 33
-# stop("either specify 'nmax' or 'n', but not both.")
-msgid "either specify 'nmax' or 'n', but not both."
-msgstr "określ albo 'nmax' albo 'n', ale nie oba naraz"
+#. R/conditions.R: stop("not a valid restart specification")
+#: R/conditions.R:0
+msgid "not a valid restart specification"
+msgstr "niepoprawne określenie restartu"
 
-# src/library/base/R/seq.R: 28
-# stop("'from' cannot be NA, NaN or infinite")
-# src/library/base/R/seq.R: 54
-# stop("'from' cannot be NA, NaN or infinite")
-msgid "'from' cannot be NA, NaN or infinite"
-msgstr "argument 'from' nie może mieć wartości NA, NaN lub nieskończoność"
+#. R/apply.R: stop("not all elements of 'MARGIN' are names of dimensions")
+#: R/apply.R:0
+msgid "not all elements of 'MARGIN' are names of dimensions"
+msgstr "nie wszystkie elementy 'MARGIN' są nazwami wymiarów"
 
-# src/library/base/R/seq.R: 38
-# stop("argument 'length.out' must be of length 1")
-msgid "argument 'length.out' must be of length 1"
-msgstr "argument 'length.out' musi mieć długość 1"
+#. R/conditions.R: stop("not an interactive session")
+#: R/conditions.R:0
+msgid "not an interactive session"
+msgstr "nieinteraktywna sesja"
 
-# src/library/base/R/seq.R: 40
-# warning("first element used of 'length.out' argument")
-msgid "first element used of 'length.out' argument"
-msgstr "użyto pierwszego elementu argumentu 'length.out'"
+#. R/qr.R: stop("not implemented for complex 'qr'")
+#. R/qr.R: stop("not implemented for complex 'qr'")
+#: R/qr.R:0
+msgid "not implemented for complex 'qr'"
+msgstr ""
+"funkcja 'qr()' nie jest zaimplementowana dla zespolonego argumentu 'qr'"
 
-# src/library/base/R/seq.R: 56
-# stop("'to' cannot be NA, NaN or infinite")
-msgid "'to' cannot be NA, NaN or infinite"
-msgstr "argument 'to' nie może mieć wartości NA, NaN lub nieskończoność"
+#. R/namespace.R: stop("not loading a namespace")
+#: R/namespace.R:0
+msgid "not loading a namespace"
+msgstr "nie ładuję przestrzeni nazw"
 
-# src/library/base/R/seq.R: 67
-# stop("invalid (to - from)/by in seq(.)")
-msgid "invalid (to - from)/by in seq(.)"
-msgstr "niepoprawne '(to - from)/by' w 'seq(.)'"
+#. R/qr.R: stop("not supported for LAPACK QR")
+#. R/qr.R: stop("not supported for LAPACK QR")
+#: R/qr.R:0
+msgid "not supported for LAPACK QR"
+msgstr "funkcja 'qr()' nie jest wspierana przez 'LAPACK QR'"
 
-# src/library/base/R/seq.R: 70
-# stop("wrong sign in 'by' argument")
-# src/main/seq.c: 818
-#  _("wrong sign in 'by' argument")
-msgid "wrong sign in 'by' argument"
-msgstr "błędny znak w argumencie 'by'"
+#. R/load.R: warning("nothing specified to be save()d")
+#: R/load.R:0
+msgid "nothing specified to be save()d"
+msgstr "nic nie zostało określone do zapisu"
 
-# src/library/base/R/seq.R: 72
-# stop("'by' argument is much too small")
-# src/main/seq.c: 816
-#  _("'by' argument is much too small")
-msgid "'by' argument is much too small"
-msgstr "wartość w argumencie 'by' jest znacznie za mała"
+#. R/table.R: stop("nothing to tabulate")
+#: R/table.R:0
+msgid "nothing to tabulate"
+msgstr "nic do tabulacji"
 
-# src/library/base/R/seq.R: 87
-# stop("length must be non-negative number")
-msgid "length must be non-negative number"
-msgstr "długość musi być liczbą nieujemną"
+#. R/library.R: gettextf("now dyn.load(\"%s\") ...", file)
+#: R/library.R:0
+msgid "now dyn.load(\"%s\") ..."
+msgstr "teraz 'dyn.load(\"%s\")' ..."
 
-# src/library/base/R/seq.R: 105
-# stop("too many arguments")
-# src/main/dotcode.c: 475
-# error(_("too many arguments"))
-# src/main/seq.c: 913
-#  _("too many arguments")
-msgid "too many arguments"
-msgstr "zbyć dużo argumentów"
+#. R/library.R: gettextf("now dyn.unload(\"%s\") ...", file)
+#: R/library.R:0
+msgid "now dyn.unload(\"%s\") ..."
+msgstr "teraz 'dyn.load(\"%s\")' ..."
 
-# src/library/base/R/serialize.R: 33
-# warning("'compress' is ignored unless 'file' is a file name")
-msgid "'compress' is ignored unless 'file' is a file name"
+#. R/dataframe.R: warning("number of items to replace is not a multiple of replacement length")
+#: R/dataframe.R:0
+msgid "number of items to replace is not a multiple of replacement length"
 msgstr ""
-"argument 'compress' zostanie zignorowany o ile argument 'file' nie jest "
-"nazwą pliku"
+"liczba pozycji do zastąpienia nie jest wielokrotnością długości zamiany"
 
-# src/library/base/R/serialize.R: 58
-# stop("'connection' must be a connection")
-# src/library/base/R/serialize.R: 74
-# stop("'connection' must be a connection")
-msgid "'connection' must be a connection"
-msgstr "argument 'connection' musi być połączeniem"
+#. R/factor.R: stop("number of levels differs")
+#: R/factor.R:0
+msgid "number of levels differs"
+msgstr "liczba poziomów różni się"
 
-# src/library/base/R/sink.R: 26
-# stop("'file' must be NULL or an already open connection")
-msgid "'file' must be NULL or an already open connection"
-msgstr "'file' musi być wartością NULL lub już otwartym połączeniem"
+#. R/dataframe.R: stop("numbers of columns of arguments do not match")
+#. R/dataframe.R: stop("numbers of columns of arguments do not match")
+#: R/dataframe.R:0
+msgid "numbers of columns of arguments do not match"
+msgstr "liczba kolumn argumentów nie zgadza się"
 
-# src/library/base/R/sink.R: 27
-# stop("cannot split the message connection")
-msgid "cannot split the message connection"
-msgstr "nie można rozdzielić komunikatu wiadomości"
+#. R/namespace.R: gettextf("object '%s' not found whilst loading namespace '%s'",     genname, package)
+#: R/namespace.R:0
+msgid "object '%s' not found whilst loading namespace '%s'"
+msgstr "nie znaleziono obiektu '%s' podczas ładowania przestrzeni nazw '%s'"
 
-# src/library/base/R/sink.R: 36
-# stop("'file' must be NULL, a connection or a character string")
-msgid "'file' must be NULL, a connection or a character string"
-msgstr "'file' musi być wartością NULL, połączeniem lub łańcuchem tekstowym"
+#. R/dataframe.R: stop("only a single element should be replaced")
+#: R/dataframe.R:0
+msgid "only a single element should be replaced"
+msgstr "tylko pojedynczy element powinień być zamieniany"
 
-# src/library/base/R/solve.R: 22
-# stop("this is the \"qr\" method for the generic function solve()")
-msgid "this is the \"qr\" method for the generic function solve()"
-msgstr "to jest metoda \"qr\" dla ogólnej funkcji 'solve()'"
+#. R/dataframe.R: stop("only defined on a data frame with all numeric variables")
+#: R/dataframe.R:0
+msgid "only defined on a data frame with all numeric variables"
+msgstr ""
+"funkcja 'summary()' zdefiniowana jest jedynie na ramce danych ze wszystkimi "
+"zmiennymi będącymi liczbami"
 
-# src/library/base/R/solve.R: 26
-# stop("singular matrix 'a' in 'solve'")
-msgid "singular matrix 'a' in 'solve'"
-msgstr "osobliwa macierz 'a' w 'solve()'"
+#. R/diag.R: stop("only matrix diagonals can be replaced")
+#: R/diag.R:0
+msgid "only matrix diagonals can be replaced"
+msgstr "tylko elementy diagonalne macierzy mogą zostać zastąpione"
 
-# src/library/base/R/solve.R: 29
-# stop("only square matrices can be inverted")
-# src/library/base/R/solve.R: 73
-# stop("only square matrices can be inverted")
+#. R/solve.R: stop("only square matrices can be inverted")
+#. R/solve.R: stop("only square matrices can be inverted")
+#: R/solve.R:0
 msgid "only square matrices can be inverted"
 msgstr "jedynie kwadratowe macierze mogą zostać odwrócone"
 
-# src/library/base/R/solve.R: 50
-# warning("solve.default called with a \"qr\" object: use 'qr.solve'")
-msgid "solve.default called with a \"qr\" object: use 'qr.solve'"
+#. R/dataframe.R: stop("only valid calls are x[[j]] <- value or x[[i,j]] <- value")
+#: R/dataframe.R:0
+msgid "only valid calls are x[[j]] <- value or x[[i,j]] <- value"
 msgstr ""
-"'solve.default' zostało wywołane z obiektem \"qr\": używanie 'qr.solve'"
+"jedynymi poprawnymi przywołaniami są x[[j]] <- wartość lub x[[i,j]] <- "
+"wartość"
 
-# src/library/base/R/solve.R: 70
-# stop("singular matrix 'a' in solve")
-msgid "singular matrix 'a' in solve"
-msgstr "osobliwa macierz 'a' w 'solve()'"
+#. R/namespace.R: stop("operation not allowed on base namespace")
+#: R/namespace.R:0
+msgid "operation not allowed on base namespace"
+msgstr "operacja niedozwolona na bazowej przestrzeni nazw"
 
-# src/library/base/R/sort.R: 22
-# stop("'decreasing' must be a length-1 logical vector.\nDid you intend to set 'partial'?")
-msgid "'decreasing' must be a length-1 logical vector.\nDid you intend to set 'partial'?"
+#. R/dataframe.R: stop("options(\"stringsAsFactors\") not set to TRUE or FALSE")
+#: R/dataframe.R:0
+msgid "options(\"stringsAsFactors\") not set to TRUE or FALSE"
 msgstr ""
-"'decreasing' musi być wektorem logicznym o długości 1.\n"
-"Czy chciałeś ustawić 'partial'?"
+"'options(\"stringsAsFactors\")' nie zostało ustawione na 'TRUE' lub 'FALSE'"
 
-# src/library/base/R/sort.R: 38
-# stop("'index.return' only for non-factors")
-msgid "'index.return' only for non-factors"
-msgstr "argument 'index.return' jest poprawny jedynie dla nie-czynników"
+#. R/library.R: gettextf("package %s already present in search()", sQuote(package))
+#: R/library.R:0
+msgid "package %s already present in search()"
+msgstr "pakiet %s jest już obecny w 'search()'"
 
-# src/library/base/R/sort.R: 44
-# stop("'x' must be atomic")
-msgid "'x' must be atomic"
-msgstr "argument 'x' musi być atomowy"
+#. R/library.R: gettextf("package %s could not be loaded", sQuote(pkg))
+#: R/library.R:0
+msgid "package %s could not be loaded"
+msgstr "pakiet %s nie mógł zostać załadowany"
 
-# src/library/base/R/sort.R: 51
-# stop("'index.return' only for 'na.last = NA'")
-msgid "'index.return' only for 'na.last = NA'"
-msgstr "'index.return' dostępne jest jedynie dla 'na.last = NA'"
+#. R/namespace.R: gettextf("package %s does not have a namespace", sQuote(package))
+#: R/namespace.R:0
+msgid "package %s does not have a namespace"
+msgstr "pakiet %s nie zawiera przestrzeni nazw"
 
-# src/library/base/R/sort.R: 54
-# stop("unsupported options for partial sorting")
-msgid "unsupported options for partial sorting"
-msgstr "niewspierane opcje dla częściowego sortowania"
+#. R/library.R: gettextf("package %s does not have a namespace and should be re-installed",     sQuote(package))
+#: R/library.R:0
+msgid "package %s does not have a namespace and should be re-installed"
+msgstr ""
+"pakiet %s nie posiada przestrzeni nazw i powinien zostać zainstalowany "
+"ponownie"
 
-# src/library/base/R/sort.R: 55
-# stop("non-finite 'partial'")
-msgid "non-finite 'partial'"
-msgstr "nieskończona wartość 'partial'"
+#. R/library.R: gettextf("package %s found more than once,\nusing the one found in %s",     sQuote(pkg), sQuote(paths))
+#: R/library.R:0
+msgid ""
+"package %s found more than once,\n"
+"using the one found in %s"
+msgstr ""
+"pakiet %s został znaleziony więcej niż raz. Używanie tego znalezionego w %s"
 
-# src/library/base/R/sort.R: 115
-# stop("argument lengths differ")
-# src/main/sort.c: 1239
-# error(_("argument lengths differ"))
-msgid "argument lengths differ"
-msgstr "długości argumentów różnią się"
+#. R/library.R: gettextf("package %s has a license that you need to accept after viewing",     sQuote(pkg))
+#: R/library.R:0
+msgid "package %s has a license that you need to accept after viewing"
+msgstr ""
+"pakiet %s posiada licencję, którą musisz zaakceptować po przeglądnięciu"
 
-# src/library/base/R/sort.R: 131
-# stop("'x' must be atomic for 'sort.list'\nHave you called 'sort' on a list?")
-msgid "'x' must be atomic for 'sort.list'\nHave you called 'sort' on a list?"
+#. R/library.R: gettextf("package %s has a license that you need to accept in an interactive session",     sQuote(pkg))
+#: R/library.R:0
+msgid ""
+"package %s has a license that you need to accept in an interactive session"
 msgstr ""
-"'x' musi być typem atomowym dla 'sort.list'\n"
-"Czy wywołano 'sort' na liście?"
+"Pakiet %s posiada licencję, którą musisz zaakceptować w interaktywnej sesji"
 
-# src/library/base/R/sort.R: 139
-# stop("method = \"quick\" is only for numeric 'x'")
-msgid "method = \"quick\" is only for numeric 'x'"
-msgstr "'method=\"quick\"' jest tylko dla liczbowych 'x'"
+#. R/library.R: gettextf("package %s has a license that you need to accept:\naccording to the DESCRIPTION file it is\n%s",     sQuote(pkg), pkgInfo$DESCRIPTION["License"])
+#: R/library.R:0
+msgid ""
+"package %s has a license that you need to accept:\n"
+"according to the DESCRIPTION file it is\n"
+"%s"
+msgstr ""
+"pakiet %s posiada licencję, którą musisz zaakceptować:\n"
+"według pliku 'DESCRIPTION' jest to\n"
+"%s"
 
-# src/library/base/R/sort.R: 143
-# stop("method = \"radix\" is only for integer 'x'")
-msgid "method = \"radix\" is only for integer 'x'"
-msgstr "'method=\"radix\"' jest tylko dla liczb całkowitych 'x'"
+#. R/namespace.R: gettextf("package %s has no 'NAMESPACE' file", sQuote(package))
+#: R/namespace.R:0
+msgid "package %s has no 'NAMESPACE' file"
+msgstr "pakiet %s nie posiada pliku 'NAMESPACE'"
 
-# src/library/base/R/source.R: 34
-# stop("'local' must be TRUE, FALSE or an environment")
-msgid "'local' must be TRUE, FALSE or an environment"
-msgstr "argument 'local' musi być TRUE, FALSE lub musi być środowiskiem"
+#. R/library.R: gettextf("package %s has not been installed properly\n", sQuote(pkgname))
+#. R/namespace.R: gettextf("package %s has not been installed properly\n", sQuote(basename(pkgpath)))
+#: R/library.R:0 R/namespace.R:0
+msgid "package %s has not been installed properly"
+msgstr "pakiet %s nie został zainstalowany poprawnie"
 
-# src/library/base/R/source.R: 38
-# stop("'echo' must be logical")
-msgid "'echo' must be logical"
-msgstr "'echo' musi być zmienną logiczną"
+#. R/library.R: gettextf("package %s is not installed for 'arch = %s'", sQuote(pkgname),     r_arch)
+#: R/library.R:0
+msgid "package %s is not installed for 'arch = %s'"
+msgstr "pakiet %s nie jest zainstalowany dla 'arch=%s'"
 
-# src/library/base/R/source.R: 40
-# warning("'verbose' is TRUE, 'echo' not; ... coercing 'echo <- TRUE'")
-msgid "'verbose' is TRUE, 'echo' not; ... coercing 'echo <- TRUE'"
+#. R/attach.R: gettextf("package %s is required by %s so will not be detached",     sQuote(pkgname), sQuote(.rmpkg(pkg)))
+#: R/attach.R:0
+msgid "package %s is required by %s so will not be detached"
+msgstr "pakiet %s jest wymagany przez %s tak więc nie zostanie odłączony"
+
+#. R/attach.R: gettextf("package %s is required by %s, which may no longer work correctly",     sQuote(pkgname), sQuote(.rmpkg(pkg)))
+#: R/attach.R:0
+msgid "package %s is required by %s, which may no longer work correctly"
 msgstr ""
-"argument 'verbose' jest TRUE, argument 'echo' nie; ... przekształcanie 'echo "
-"<- TRUE'"
+"pakiet %s jest wymagany przez %s, który z kolei może nie działać poprawnie"
 
-# src/library/base/R/source.R: 69
-# stop("unable to find a plausible encoding")
-msgid "unable to find a plausible encoding"
-msgstr "nie można znaleźć wiarygodnego kodowania"
+#. R/library.R: gettextf("package %s required by %s could not be found", sQuote(pkg),     sQuote(pkgname))
+#: R/library.R:0
+msgid "package %s required by %s could not be found"
+msgstr "pakiet %s wymagany przez pakiet %s nie mógł zostać znaleziony"
 
-# src/library/base/R/source.R: 71
-# gettextf('encoding = "%s" chosen', encoding)
-msgid "encoding = \"%s\" chosen"
-msgstr "wybrano 'encoding = \"%s\"'"
+#. R/library.R: gettextf("package %s was built before R 3.0.0: please re-install it",     sQuote(pkgname))
+#. R/namespace.R: gettextf("package %s was built before R 3.0.0: please re-install it",     sQuote(basename(pkgpath)))
+#: R/library.R:0 R/namespace.R:0
+msgid "package %s was built before R 3.0.0: please re-install it"
+msgstr "pakiet %s został zbudowany przed R 3.0.0: proszę go przeinstalować"
 
-# src/library/base/R/source.R: 127
-# warning("'chdir = TRUE' makes no sense for a URL")
-msgid "'chdir = TRUE' makes no sense for a URL"
-msgstr "'chdir = TRUE' nie ma sensu dla adresu URL"
+#. R/library.R: gettextf("package %s was built for %s", sQuote(pkgname), platform)
+#. R/library.R: gettextf("package %s was built for %s", sQuote(pkgname), platform)
+#: R/library.R:0
+msgid "package %s was built for %s"
+msgstr "pakiet %s został zbudowany dla platformy %s"
 
-# src/library/base/R/source.R: 131
-# stop("cannot 'chdir' as current directory is unknown")
-# src/library/base/R/source.R: 258
-# stop("cannot 'chdir' as current directory is unknown")
-msgid "cannot 'chdir' as current directory is unknown"
-msgstr "nie można wykonać 'chdir' ponieważ bieżący katalog nie jest znany"
+#. R/library.R: gettextf("package %s was built under R version %s", sQuote(pkgname),     as.character(built$R))
+#: R/library.R:0
+msgid "package %s was built under R version %s"
+msgstr "pakiet %s został zbudowany w wersji R %s"
 
-# src/library/base/R/source.R: 136
-# warning("'chdir = TRUE' makes no sense for a connection")
-msgid "'chdir = TRUE' makes no sense for a connection"
-msgstr "'chdir = TRUE' nie ma sensu dla połączenia"
+#. R/library.R: gettextf("package or namespace load failed for %s", sQuote(package))
+#: R/library.R:0
+msgid "package or namespace load failed for %s"
+msgstr "ładowanie pakietu lub przestrzeni nazw nie powiodło się dla pakietu %s"
 
-# src/library/base/R/source.R: 242
-# stop(gettextf("'%s' is not an existing file", file))
-msgid "'%s' is not an existing file"
-msgstr "'%s' nie jest istniejącym plikiem"
+#. R/summary.R: gettextf("probably wrong encoding in names(.) of column %s",     paste(which(is.na(lw)), collapse = ", "))
+#: R/summary.R:0
+msgid "probably wrong encoding in names(.) of column %s"
+msgstr "prawdopodobnie błędne kodowanie w 'names(.)' kolumny %s"
 
-# src/library/base/R/srcfile.R: 78
-# warning(gettextf("Timestamp of %s has changed", sQuote(srcfile$filename)),
-#                     call. = FALSE, domain = NA)
-msgid "Timestamp of %s has changed"
-msgstr "Sygnatura czasu dla %s zmieniła się"
+#. R/attach.R: warning("replaced '[<-' by '\\\\[<-' in regular expression pattern")
+#: R/attach.R:0
+msgid "replaced '[<-' by '\\\\[<-' in regular expression pattern"
+msgstr "zastąpiono '[<-' przez '\\\\[<-' we wzorcu wyrażenia regularnego"
 
-# src/library/base/R/stop.R: 25
-# warning("additional arguments ignored in stop()")
-msgid "additional arguments ignored in stop()"
-msgstr "dodatkowe argumenty zostały zignorowane w 'stop()'"
+#. R/attach.R: warning("replaced regular expression pattern '[' by  '\\\\['")
+#: R/attach.R:0
+msgid "replaced regular expression pattern '[' by  '\\\\['"
+msgstr "zastąpiono wzór wyrażenia regularnego '[' przez '\\\\['"
 
-msgid "additional arguments ignored in warning()"
-msgstr "dodatkowe argumenty zostały zignorowane w 'warning()'"
+#. R/diag.R: stop("replacement diagonal has wrong length")
+#: R/diag.R:0
+msgid "replacement diagonal has wrong length"
+msgstr "zamiana elementów diagonalnych ma niepoprawną długość"
 
-# src/library/base/R/strwrap.R: 152
-# stop("incorrect value for 'x'")
-# src/library/base/R/strwrap.R: 159
-# stop("incorrect value for 'x'")
-msgid "incorrect value for 'x'"
-msgstr "niepoprawna wartość dla argumentu 'x'"
-
-# src/library/stats/R/wilcox.test.R: 44
-# stop("'x' and 'y' must have the same length")
-# src/library/stats/R/chisq.test.R: 32
-# stop("'x' and 'y' must have the same length")
-# src/library/stats/R/mcnemar.test.R: 33
-# stop("'x' and 'y' must have the same length")
-# src/library/stats/R/fisher.test.R: 49
-# stop("'x' and 'y' must have the same length")
-# src/library/stats/R/cor.test.R: 31
-# stop("'x' and 'y' must have the same length")
-# src/library/base/R/strwrap.R: 166
-# stop("'x' and 'y' must have the same length")
-msgid "'x' and 'y' must have the same length"
-msgstr "'x' oraz 'y' muszą mieć tę samą długość"
-
-# src/library/base/R/strwrap.R: 176
-# stop("incorrect values of 'indent' and 'width'")
-msgid "incorrect values of 'indent' and 'width'"
-msgstr "niepoprawne wartości 'indent' oraz 'width'"
-
-# src/library/base/R/summary.R: 169
-# warning("probably wrong encoding in names(.) of column ",
-# 		paste(which(is.na(lw)), collapse = ", "))
-msgid "probably wrong encoding in names(.) of column"
-msgstr "prawdopodobnie błędne kodowanie w 'names(.)' kolumny"
-
-# src/library/methods/man/setMethod.Rd: 383
-# stop(paste("!identical(", deparseText(substitute(e1)),
-#                    ", ", deparseText(substitute(e2)), ")", sep=""))
-# src/library/methods/R/MethodsList.R: 62
-# stop(gettextf("duplicate element names in 'MethodsList' at level %d: %s",
-#              level, paste("\"", unique(mnames[duplicated(mnames)]), "\"",
-#                           collapse=", ")), domain = NA)
-# src/library/methods/R/MethodsList.R: 514
-# sprintf(ngettext(length(unknown),
-# 				 "no definition for class %s",
-# 				 "no definition for classes %s"),
-# 			paste(dQuote(unknown), collapse = ", "))
-# src/library/methods/R/MethodsList.R: 556
-# stop(sprintf(ngettext(sum(is.na(which)),
-#                               "in the method signature for function %s invalid argument name in the signature: %s",
-#                               "in the method signature for function %s invalid argument names in the signature: %s"),
-#                      sQuote(fun at generic),
-#                      paste(snames[is.na(which)], collapse = ", ")),
-#              domain = NA)
-# src/library/methods/R/MethodsList.R: 692
-# sprintf("\\code{signature(%s)}",
-#                     paste(sprintf("%s = \"%s\"", args, escape(sigi)),
-#                           collapse = ", "))
-# src/library/methods/R/MethodsList.R: 778
-# warning(gettextf("skipping methods list element %s of unexpected class %s\n\n",
-#                                  paste(cnames[i], collapse = ", "),
-#                                  dQuote(.class1(mi))),
-#                         domain = NA)
-# src/library/methods/R/ClassUnion.R: 40
-# stop(gettextf("the member classes must be defined: not true of %s",
-#                           paste(.dQ(as(members[!membersDefined], "character")), collapse=", ")), domain = NA)
-# src/library/methods/R/ClassUnion.R: 65
-# stop(gettextf("unable to create union class:  could not set members %s",
-#                       paste(.dQ(failed), collapse=", ")), domain = NA)
-# src/library/methods/R/RMethodUtils.R: 85
-# stop(sprintf(ngettext(sum(is.na(match(signature, args))),
-#                               "non-argument found in the signature: %s",
-#                               "non-arguments found in the signature: %s"),
-#                      paste(signature[is.na(match(signature, args))], collapse = ", ")),
-#              domain = NA)
-# src/library/methods/R/RMethodUtils.R: 106
-# stop(sprintf(ngettext(length(fdef),
-#                                   "the formal argument of the generic function for %s (%s) differs from that of the non-generic to be used as the default (%s)",
-#                                   "the formal arguments of the generic function for %s (%s) differ from those of the non-generic to be used as the default (%s)"),
-#                           paste(formalArgs(fdef), collapse = ", "),
-#                           paste(formalArgs(fdefault), collapse = ", ")),
-#                  domain = NA)
-# src/library/methods/R/RMethodUtils.R: 164
-# stop(sprintf(ngettext(sum(is.na(match(signature, args))),
-#                               "non-argument found in the signature: %s",
-#                               "non-arguments found in the signature: %s"),
-#                      paste(signature[is.na(match(signature, args))], collapse = ", ")),
-#              domain = NA)
-# src/library/methods/R/RMethodUtils.R: 338
-# warning(gettextf("%s function arguments omitted from method arguments, (%s), were found in method definition",
-#     ##                       label, paste(missingFnames[foundNames], collapse = ", ")),
-#     ##              domain = NA)
-# src/library/methods/R/RMethodUtils.R: 352
-# message("Note: ", .renderSignature(f, sig0),
-#                  gettextf("expanding the signature to include omitted arguments in definition: %s",
-#                           paste(sigNames[omittedSig], "= \"missing\"",collapse = ", ")))
-# src/library/methods/R/RMethodUtils.R: 407
-# stop(gettextf("arguments (%s) after '...' in the generic must appear in the method, in the same place at the end of the argument list",
-# 			  paste(trailingArgs, collapse=", ")),
-#                  call. = TRUE, domain = NA)
-# src/library/methods/R/RMethodUtils.R: 963
-# warning(message,
-#                 sprintf(" found on: %s; using the first one",
-#                         paste(sQuote(where), collapse = ", ")),
-#                 domain = NA)
-# src/library/methods/R/RMethodUtils.R: 1270
-# stop(gettextf("trying to change the formal arguments in %s, but the number of existing arguments is less than the number of new arguments: (%s) vs (%s)",
-#                       msg, paste0("\"", old, "\"", collapse=", "),
-#                       paste0("\"", new, "\"", collapse=", ")),
-#              domain = NA)
-# src/library/methods/R/RMethodUtils.R: 1275
-# warning(gettextf("trying to change the formal arguments in %s, but the number of existing arguments is greater than the number of new arguments (the extra arguments won't be used): (%s) vs (%s)",
-#                          msg, paste0("\"", old, "\"", collapse=", "),
-#                          paste0("\"", new, "\"", collapse=", ")),
-#                 domain = NA)
-# src/library/methods/R/RMethodUtils.R: 1290
-# stop(gettextf("in changing formal arguments in %s, some of the old names are not in fact arguments: %s",
-# 		      msg, paste0("\"", old[is.na(match(old, names(dlist)))], "\"", collapse=", ")),
-# 	     domain = NA)
-# src/library/methods/R/RMethodUtils.R: 1747
-# gettextf("multiple definitions exist for class %s, but the supplied package (%s) is not one of them (%s)",
-#                                    dQuote(classi), sQuote(pkgi),
-#                                    paste(dQuote(get(classi, envir = .classTable)), collapse = ", "))
-# src/library/methods/R/RMethodUtils.R: 1754
-# gettextf("multiple definitions exist for class %s; should specify one of them (%s), e.g. by className()",
-#                                    dQuote(classi),
-#                                    paste(dQuote(get(classi, envir = .classTable)), collapse = ", "))
-# src/library/methods/R/RMethodUtils.R: 1910
-# warning(gettextf("some actions are missing: %s",
-#                              paste(actions[!allExists], collapse =", ")),
-#                     domain = NA)
-# src/library/methods/R/MethodsListClass.R: 164
-# stop(gettextf("'initialize' method returned an object of class %s instead of the required class %s",
-#                                   paste(dQuote(class(value)), collapse=", "),
-#                                   dQuote(class(.Object))),
-#                          domain = NA)
-# src/library/methods/R/MethodsListClass.R: 242
-# gettextf(
-#                                    '%d: target "%s": chose "%s" (others: %s)',
-#                                    i,target[[i]], selected[[i]], paste0('"', these, '"', collapse =", "))
-# src/library/methods/R/MethodsListClass.R: 418
-# stop(gettextf("the names in signature for method (%s) do not match %s's arguments (%s)",
-#                             paste(sigArgs, collapse = ", "),
-#                             if(is(fdef, "genericFunction")) fdef at generic else "function",
-#                             paste(formalNames, collapse = ", ")),
-#                    domain = NA)
-# src/library/methods/R/as.R: 238
-# stop(gettextf("'as' method should have one argument, or match the arguments of coerce(): got  (%s)",
-#                            paste(formalArgs(def), collapse = ", ")),
-#                   domain = NA)
-# src/library/methods/R/refClass.R: 114
-# warning(gettextf("methods declared in usingMethods() but not found: %s",
-#                 paste0(declared[! declared %in% allMethods], collapse = ", ")))
-# src/library/methods/R/refClass.R: 783
-# stop(gettextf("no definition found for inherited class: %s",
-#                           paste0('"',contains[missingDefs], '"', collapse = ", ")),
-#                  domain = NA)
-# src/library/methods/R/RClassUtils.R: 168
-# warning(gettextf("in constructing the prototype for class %s, slots in prototype and not in class: %s",
-#                          dQuote(className),
-#                          paste(extra, collapse=", ")),
-#                 domain = NA)
-# src/library/methods/R/RClassUtils.R: 190
-# stop(gettextf("in making the prototype for class %s elements of the prototype failed to match the corresponding slot class: %s",
-#                       dQuote(className),
-#                       paste(pnames[check],
-#                             "(class",
-#                             .dQ(slotDefs[match(pnames[check], slotNames)]),
-#                             ")",
-#                             collapse = ", ")),
-#              domain = NA)
-# src/library/methods/R/RClassUtils.R: 248
-# warning(gettextf("potential cycle in class inheritance: %s has duplicates in superclasses and subclasses (%s)",
-#                          dQuote(Class),
-#                          paste(bad, collapse = ", ")),
-#                 domain = NA)
-# src/library/methods/R/RClassUtils.R: 285
-# warning("Inconsistent data part classes inherited (",
-# #                                 paste(dataPartClasses, collapse = ", "),
-# #                                 "): coercion to some may fail")
-# src/library/methods/R/RClassUtils.R: 296
-# stop(paste("Duplicate slot names: slots ",
-# #                                paste(dupNames, collapse =", "), "; see classes ",
-# #                                paste0(c(Class, ext)[dupClasses], collapse = ", ")))
-# src/library/methods/R/RClassUtils.R: 320
-# warning(gettextf("undefined slot classes in definition of %s: %s",
-#                              .dQ(ClassDef at className),
-#                              paste(names(properties)[undefClasses], "(class ",
-#                                    .dQ(unlist(properties, recursive = FALSE)[undefClasses]),
-#                                    ")", collapse = ", ", sep = "")),
-#                     call. = FALSE, domain = NA)
-# src/library/methods/R/RClassUtils.R: 818
-# stop(sprintf(ngettext(sum(is.na(match(pnames, slots))),
-#                                     "named elements of prototype do not correspond to slot name: %s",
-#                                     "named elements of prototype do not correspond to slot names: %s"),
-#                            paste(.dQ(pnames[is.na(match(pnames, slots))]),
-#                                  collapse =", ")),
-#                    domain = NA)
-# src/library/methods/R/RClassUtils.R: 1186
-# warning(gettextf("class %s is inheriting an inconsistent superclass structure from class %s, inconsistent with %s",
-#                                  .dQ(className), .dQ(by),
-#                                  paste(.dQ(coni), collapse = ", ")),
-#                         call. = FALSE, domain = NA)
-# src/library/methods/R/RClassUtils.R: 1196
-# warning(gettextf("unable to find a consistent ordering of superclasses for class %s: order chosen is inconsistent with the superclasses of %s",
-#                            .dQ(className),
-#                            paste(.dQ(setdiff(newconflicts, conflicts)),
-#                                  collapse = ", ")),
-#                   call. = FALSE, domain = NA)
-# src/library/methods/R/RClassUtils.R: 1505
-# message("Extends: ",from, ": ", paste(what, collapse = ", "))
-# src/library/methods/R/RClassUtils.R: 1518
-# message("Subclasses: ",by, ": ", paste(what, collapse = ", "))
-# src/library/methods/R/RClassUtils.R: 1703
-# stop(sprintf("trying to change the argument list of %s with %d arguments to have arguments (%s)",
-#                          functionName, n, paste(newArgs, collapse = ", ")),
-#                  domain = NA)
-# src/library/methods/R/RClassUtils.R: 1711
-# stop(sprintf("get rid of variables in definition %s (%s); they conflict with the needed change to argument names (%s)",
-#                          functionName,
-#                          paste(checkFor[!is.na(match(checkFor, locals))], collapse = ", "),
-#                          paste(newArgs, collapse = ", ")), domain = NA)
-# src/library/methods/R/RClassUtils.R: 1724
-# sprintf("NOTE: arguments in definition %s changed from (%s) to (%s)",
-#                         functionName,
-#                         paste(args, collapse = ", "),
-#                         paste(newArgs, collapse = ", "))
-# src/library/methods/R/RClassUtils.R: 2427
-# warning("S3 methods written for S4 classes will fail inheritance!\nPackage ", pkg, " apparently has ",
-# ##             length(methods), " such methods  for the functions ", paste(attr(methods, "functions"), collapse = ", "), "\n\n",
-# ##         "Possible dangerous methods: ", paste(methods, collapse =", "),
-# ##                 "\n\n(Warnings generated once per package per session)")
-# src/library/methods/R/methodsTable.R: 397
-# stop("package slot missing from signature for generic ",
-#              sQuote(method at generic), "\n",
-#              "and classes ", paste(sig, collapse = ", "), "\n",
-#              "cannot use with duplicate class names (the package may need to be re-installed)",
-#              call. = FALSE, domain = NA)
-# src/library/methods/R/methodsTable.R: 670
-# message(gettextf("Note: method with signature %s chosen for function %s,\n target signature %s.\n %s would also be valid",
-#                      sQuote(selected),
-#                      sQuote(attr(cond, "generic")),
-#                      sQuote(attr(cond, "target")),
-# 		     paste0('"', possible[is.na(match(possible, selected))], '"',
-# 			    collapse=", ")),
-#             domain = NA)
-# src/library/methods/R/methodsTable.R: 1204
-# warning(gettextf("trying to check signature length of generic '%s', but it is not a generic function: i = %d, funs = %s, gnames = %s",
-#                        what,  i, paste(unlist(funs), collapse = ", "),
-#                        paste(as.character(gnames), collapse = ", ")),
-#               domain = NA)
-# src/library/methods/R/methodsTable.R: 1436
-# warning("something weird:  inconsistent number of args in methods table strings:", paste(nargs,collapse = ", ")," (using the largest value)",
-#                 domain = NA)
-# src/library/methods/R/methodsTable.R: 1581
-# warning(gettextf("undefined classes (%s) will be ignored for argument '%s'",
-#                          paste0('"',unique(.undefClasses),'"', collapse=", "),
-#                          colnames(sigs)[[j]]), domain = NA)
-# src/library/methods/R/Methods.R: 649
-# warning(gettextf("no method found for function %s and signature %s",
-#                          sQuote(fdef at generic),
-#                          paste(.dQ(signature), collapse =", ")),
-#                 domain = NA)
-# src/library/methods/R/Methods.R: 744
-# stop(gettextf("no method found for function '%s' and signature %s",
-# 			  f, paste(signature, collapse = ", ")))
-# src/library/methods/R/Methods.R: 900
-# stop(gettextf("no method found for signature %s",
-# 			       paste(signature, collapse=", ")))
-# src/library/methods/R/Methods.R: 1457
-# gettextf("formal arguments differ: (%s), (%s)",
-# 			    paste(a1, collapse = ", "),
-# 			    paste(a2, collapse = ", "))
-# src/library/methods/R/Methods.R: 1468
-# gettextf("signatures differ:  (%s), (%s)",
-#                         paste(f1 at signature, collapse = ", "),
-#                         paste(f2 at signature, collapse = ", "))
-# src/library/methods/R/oldClass.R: 189
-# stop(
-#                gettextf("invalid S4 class corresponding to S3 class: slots in  S4 version must extend corresponding slots in S3 version: fails for %s",
-#                         paste0('"', bad, '"',  collapse = ", ")),
-#                domain = NA)
-# src/library/methods/R/oldClass.R: 207
-# stop(gettextf("explicit coercion of old-style class (%s) is not defined", paste(class(from), collapse = ", ")), domain = NA)
-# src/library/methods/R/promptClass.R: 107
-# stop(sprintf(ngettext(length(whereClass),
-#                                           "no definition of class %s in the specified position, %s, definition on : %s",
-#                                           "no definition of class %s in the specified position, %s, definitions on : %s"),
-#                                  dQuote(clName), where,
-#                                  paste(whereClass, collapse = ", ")),
-#                          domain = NA)
-# src/library/methods/R/SClasses.R: 136
-# stop(gettextf("duplicate class names among superclasses: %s",
-#                       paste(.dQ(includes[duplicated(includes)]),
-#                             collapse = ", ")),
-#              domain = NA)
-# src/library/methods/R/SClasses.R: 684
-# stop(gettextf("duplicated slot names: %s",
-#                               paste(sQuote(snames[duplicated(snames)]),
-#                                     collapse = ", ")), domain = NA)
-# src/library/methods/R/SClasses.R: 689
-# stop(sprintf(ngettext(sum(is.na(which)),
-#                                       "invalid name for slot of class %s: %s",
-#                                       "invalid names for slots of class %s: %s"),
-#                               dQuote(Class),
-#                               paste(snames[is.na(which)], collapse=", ")),
-#                      domain = NA)
-# src/library/methods/R/SClasses.R: 777
-# warning(sprintf(ngettext(length(pkgs),
-#                                          "multiple definition of class %s visible (%s); using the definition\n   in package %s for %s",
-#                                          "multiple definitions of class %s visible (%s); using the definition\n   in package %s for %s"),
-#                                 dQuote(Class),
-#                                 paste(sQuote(pkgs), collapse = ", "),
-#                                 sQuote(pkgs[[1L]]),
-#                                 unique),
-#                         domain = NA)
-# src/library/methods/R/SClasses.R: 829
-# stop(gettextf("class definition cannot extend more than one of these data types: %s",
-# 		  paste0('"',type, '"', collapse = ", ")),
-#          domain = NA)
-# src/library/methods/R/SClasses.R: 923
-# warning(gettextf("multiple class definitions for %s from packages: %s; picking the first",
-#                                  dQuote(className),
-#                                  paste(sQuote(pkgs), collapse = ", ")),
-#                         domain = NA)
-# src/library/methods/R/SClasses.R: 984
-# stop(gettextf("All %s names must be nonempty in:\n(%s)", what,
-#                           paste(sQuote(propNames), collapse = ", ")),
-#                  domain = NA, call. = FALSE)
-# src/library/methods/R/SClasses.R: 988
-# stop(gettextf("All %s names must be distinct in:\n(%s)", what,
-#                           paste(sQuote(propNames), collapse = ", ")),
-#                  domain = NA, call. = FALSE)
-# src/library/methods/R/trace.R: 165
-# warning(gettextf("cannot untrace method for %s; no method defined for this signature: %s",
-#                              sQuote(what),
-#                              paste(signature, collapse = ", ")),
-#                     domain = NA)
-# src/library/methods/R/trace.R: 631
-# warning(gettextf("objects found in multiple packages: using %s and ignoring %s",
-#                              sQuote(names(possible[[1L]])),
-#                              paste(sQuote(names(possible[-1L])),
-#                                    collapse = ", ")),
-#                     domain = NA)
-# src/library/methods/R/trace.R: 744
-# warning(gettextf("cannot insert these (not found in source): %s",
-#                     paste('"',functions[notThere],'"',
-#                           sep = "", collapse = ", ")),
-#                     domain = NA)
-# src/library/methods/R/trace.R: 756
-# warning(gettextf("cannot insert methods for these functions (methods table not found in source): %s",
-#                     paste('"',methods[notThere],'"',
-#                           sep = "", collapse = ", ")),
-#                     domain = NA)
-# src/library/methods/R/trace.R: 777
-# warning(gettextf("Can't insert these classes (class definition not found in source): %s",
-#     ##                 paste('"',classes[notThere],'"',
-#     ##                       sep = "", collapse = ", ")),
-#     ##                 domain = NA)
-# src/library/methods/R/trace.R: 814
-# message(gettextf("Non-function objects are not currently inserted (not traceable): %s",
-#                          paste(notTraceable, collapse = ", ")), domain = NA)
-# src/library/methods/R/trace.R: 817
-# message(gettextf("New functions are not currently inserted (not untraceable): %s",
-#                          paste(newObjects, collapse = ", ")), domain = NA)
-# src/library/methods/R/trace.R: 820
-# message(gettextf("Modified functions inserted through trace(): %s",
-#                          paste(objectsDone, collapse = ", ")), domain = NA)
-# src/library/methods/R/trace.R: 866
-# message(gettextf("Methods inserted for function %s(): %s",
-#                   f, paste(methodsInserted, collapse =", ")),
-#                   domain = NA)
-# src/library/methods/R/is.R: 235
-# sprintf(ngettext(sum(is.na(match(n2, n1))),
-#                                           "class %s is missing slot from class %s (%s), and no coerce method was supplied",
-#                                           "class %s is missing slots from class %s (%s), and no coerce method was supplied"),
-#                                  dQuote(class1),
-#                                  dQuote(class2),
-#                                  paste(n2[is.na(match(n2, n1))], collapse = ", "))
-# src/library/methods/R/is.R: 247
-# sprintf(ngettext(length(bad),
-#                                           "slot in class %s must extend corresponding slot in class %s: fails for %s",
-#                                           "slots in class %s must extend corresponding slots in class %s: fails for %s"),
-#                                  dQuote(class1),
-#                                  dQuote(class2),
-#                                  paste(bad, collapse = ", "))
-# src/library/tools/R/Vignettes.R: 29
-# stop(gettextf("Vignette product %s does not have a known filename extension (%s)",
-#                       sQuote(file), paste(sQuote(names(type)), collapse=", ")),
-#              domain = NA)
-# src/library/tools/R/Vignettes.R: 78
-# stop(gettextf("Failed to locate the %s output file (by engine %s) for vignette with name %s. The following files exist in directory %s: %s",
-#                           sQuote(by),
-#                           sQuote(sprintf("%s::%s", engine$package, engine$name)),
-#                           sQuote(name), sQuote(dir),
-#                           paste(sQuote(output0), collapse=", ")),
-#                  domain = NA)
-# src/library/tools/R/Vignettes.R: 85
-# stop(gettextf("Located more than one %s output file (by engine %s) for vignette with name %s: %s", sQuote(by),
-#                           sQuote(sprintf("%s::%s", engine$package, engine$name)),
-#                           sQuote(name), paste(sQuote(output), collapse=", ")),
-#                  domain  = NA)
-# src/library/tools/R/Vignettes.R: 102
-# stop(gettextf("Failed to locate the %s output file (by engine %s) for vignette with name %s. The following files exist in directory %s: %s",
-#                           sQuote(by),
-#                           sQuote(sprintf("%s::%s", engine$package, engine$name)),
-#                           sQuote(name), sQuote(dir),
-#                           paste(sQuote(output0), collapse=", ")),
-#                  domain = NA)
-# src/library/tools/R/Vignettes.R: 109
-# stop(gettextf("Located more than one %s output file (by engine %s) for vignette with name %s: %s",
-#                           sQuote(by),
-#                           sQuote(sprintf("%s::%s", engine$package, engine$name)),
-#                           sQuote(name), paste(sQuote(output), collapse=", ")),
-#                  domain = NA)
-# src/library/tools/R/Vignettes.R: 219
-# stop(gettextf("Vignette %s overwrites the following %s output by vignette %s: %s",
-#                                    sQuote(basename(names(resultsT)[j])),
-#                                    sQuote(name),
-#                                    sQuote(basename(names(resultsT)[i])),
-#                                    paste(basename(bad), collapse=", ")),
-#                           domain = NA)
-# src/library/tools/R/Vignettes.R: 478
-# stop(gettextf("Detected vignette source files (%s) with shared names (%s) and therefore risking overwriting each others output files",
-#                       paste(sQuote(docs), collapse=", "),
-#                       paste(sQuote(names), collapse=", ")),
-#              domain = NA)
-# src/library/tools/R/Vignettes.R: 1057
-# stop(gettextf("None of packages %s have registered vignette engines",
-#                                  paste(sQuote(package), collapse = ", ")),
-#                         domain = NA)
-# src/library/tools/R/Vignettes.R: 1091
-# stop(gettextf("Vignette engine %s is not registered by any of the packages %s",
-#                                   sQuote(name),
-#                                   paste(sQuote(package), collapse = ", ")),
-#                          domain = NA)
-# src/library/tools/R/Vignettes.R: 1098
-# stop(gettextf("Vignette engine %s is not registered by any of the packages %s",
-#                               sQuote(name),
-#                               paste(sQuote(package), collapse = ", ")),
-#                      domain = NA)
-# src/library/tools/R/makeLazyLoad.R: 132
-# warning(sprintf(ngettext(sum(dup),
-#                                          "object %s is created by more than one data call",
-#                                          "objects %s are created by more than one data call"),
-#                                 paste(sQuote(loaded[dup]), collapse=", ")),
-#                         call. = FALSE, domain = NA)
-# src/library/tools/R/checktools.R: 208
-# message(paste(strwrap(sprintf("installing dependencies %s",
-#                                       paste(sQuote(depends),
-#                                             collapse = ", ")),
-#                               exdent = 2L),
-#                       collapse = "\n"))
-# src/library/tools/R/QC.R: 4030
-# message(sprintf(ngettext(sum(obsolete),
-#                                  "Obsolete package %s in Rd xrefs",
-#                                  "Obsolete packages %s in Rd xrefs"),
-#                         paste(sQuote(unknown[obsolete]), collapse = ", ")),
-#                 domain = NA)
-# src/library/tools/R/QC.R: 4046
-# message(sprintf(ngettext(sum(miss),
-#                                      "Package unavailable to check Rd xrefs: %s",
-#                                      "Packages unavailable to check Rd xrefs: %s"),
-#                              paste(sQuote(unknown[miss]), collapse = ", ")),
-#                     domain = NA)
-# src/library/tools/R/QC.R: 4052
-# message(sprintf(ngettext(sum(!miss),
-#                                      "Unknown package %s in Rd xrefs",
-#                                      "Unknown packages %s in Rd xrefs"),
-#                              paste(sQuote(unknown[!miss]), collapse = ", ")),
-#                     domain = NA)
-# src/library/tools/R/QC.R: 4695
-# gettextf("  %s has wrong argument list %s",
-#                          f, sQuote(paste(bad, collapse = ", ")))
-# src/library/tools/R/QC.R: 4841
-# gettextf("  %s has wrong argument list %s",
-#                          f, sQuote(paste(bad, collapse = ", ")))
-# src/library/tools/R/QC.R: 6033
-# sprintf("entry %d (%s): missing required field(s) %s",
-#                                    pos,
-#                                    db$Entry[pos],
-#                                    sapply(bad[pos],
-#                                           function(s)
-#                                           paste(sQuote(s),
-#                                                 collapse = ", ")))
-# src/library/tools/R/QC.R: 6678
-# sprintf("  %s (%s)",
-#                     names(s),
-#                     lapply(s, paste, collapse = ", "))
-# src/library/tools/R/QC.R: 7166
-# warning(gettextf("Generics 'g' in 'env' %s where '%s' errors: %s\nMay need something like\n\n%s\nin NAMESPACE.",
-#                              format(env),
-#                              "hasMethods(g, env)",
-#                              paste(sQuote(rErr), collapse = ", "),
-#                              paste0("  importFrom(",
-#                                     paste(dq(pkgs), dq(rErr), sep =", "),
-#                                     ")\n")
-#                              ),
-#                     domain = NA)
-# src/library/tools/R/QC.R: 7180
-# message(sprintf(ngettext(sum(!ok),
-#                                      "Generic without any methods in %s: %s",
-#                                      "Generics without any methods in %s: %s"),
-#                             format(env),
-#                             paste(sQuote(r[!ok]), collapse = ", ")),
-#                     domain = NA)
-# src/library/tools/R/admin.R: 305
-# warning(sprintf(ngettext(length(bad),
-#                                          "unable to re-encode %s line %s",
-#                                          "unable to re-encode %s lines %s"),
-#                                 sQuote(basename(f)),
-#                                 paste(bad, collapse = ", ")),
-#                         domain = NA, call. = FALSE)
-# src/library/tools/R/sotools.R: 387
-# gettextf("Found %s, possibly from %s",
-#                                     sQuote(v),
-#                                     paste(sprintf("%s (%s)",
-#                                                   sQuote(u[, "ssname"]),
-#                                                   u[, "language"]),
-#                                           collapse = ", "))
-# src/library/tools/R/sotools.R: 395
-# sprintf("Objects: %s",
-#                                        paste(sQuote(w), collapse =
-#                                              ", "))
-# src/library/tools/R/pdftools.R: 998
-# sprintf("PDF_Dictionary(<<%s>>)",
-#             paste(names(x), collapse = ","))
-# src/library/tools/R/pdftools.R: 1005
-# sprintf("PDF_Stream(<<%s>>)",
-#             paste(names(x), collapse = ","))
-# src/library/tools/R/assertCondition.R: 51
-# message(sprintf("assertCondition: caught %s",
-#                                     paste(dQuote(found), collapse =", ")))
-# src/library/tools/R/check.R: 4492
-# sprintf("Current CRAN status: %s",
-#                         paste(sprintf("%s: %s", names(tab), tab),
-#                               collapse = ", "))
-# src/library/tools/R/check.R: 4533
-# sprintf("See: %s",
-#                                  paste(sprintf("<http://www.r-project.org/nosvn/R.check/%s/%s-00check.html>",
-#                                                flavors,
-#                                                p),
-#                                        collapse = ",\n     "))
-# src/library/tools/R/check.R: 4552
-# sprintf("See: %s",
-#                         paste(sprintf("<http://www.stats.ox.ac.uk/pub/bdr/memtests/%s/%s>",
-#                                       tests,
-#                                       paths),
-#                               collapse = ",\n     "))
-# src/library/graphics/R/boxplot.R: 175
-# warning(sprintf(ngettext(length(unique(out[inf])),
-# 				 "Outlier (%s) in boxplot %d is not drawn",
-# 				 "Outliers (%s) in boxplot %d are not drawn"),
-# 				paste(unique(out[inf]), collapse=", "), i),
-# 			domain = NA)
-# src/library/graphics/R/hist.R: 152
-# warning(sprintf(ngettext(sum(not.miss),
-# 					 "argument %s is not made use of",
-# 					 "arguments %s are not made use of"),
-# 				paste(sQuote(nf[not.miss]), collapse=", ")),
-# 			domain = NA)
-# src/library/graphics/R/mosaicplot.R: 184
-# warning(sprintf(ngettext(length(list(...)),
-#                                  "extra argument %s will be disregarded",
-#                                  "extra arguments %s will be disregarded"),
-#                          paste(sQuote(names(list(...))), collapse = ", ")),
-#                 domain = NA)
-# src/library/graphics/R/coplot.R: 351
-# gettextf("Missing rows: %s",
-#                            paste0(missingrows, collapse = ", "))
-# src/library/grDevices/R/postscript.R: 50
-# stop(sprintf(ngettext(as.integer(sum(is.na(matches))),
-#                                  "invalid argument name %s in '%s'",
-#                                  "invalid argument names %s in '%s'"),
-#                          paste(sQuote(newnames[is.na(matches)]),
-#                                collapse=", "),
-#                          deparse(sys.call(sys.parent()))),
-#                  domain = NA)
-# src/library/stats/R/plot.lm.R: 35
-# warning(gettextf("not plotting observations with leverage one:\n  %s",
-#                              paste(which(isInf), collapse=", ")),
-#                     call. = FALSE, domain = NA)
-# src/library/stats/R/nlminb.R: 85
-# warning(sprintf(ngettext(length(nap),
-#                                      "unrecognized control element named %s ignored",
-#                                      "unrecognized control elements named %s ignored"),
-#                             paste(sQuote(nms[nap]), collapse = ", ")),
-#                     domain = NA)
-# src/library/stats/R/model.tables.R: 324
-# warning(gettextf("non-factors ignored: %s",
-#                              paste(names(nn), collapse = ", ")),
-#                     domain = NA)
-# src/library/stats/R/nls.R: 405
-# warning(sprintf(ngettext(length(nap),
-#                                      "unrecognized control element named %s ignored",
-#                                      "unrecognized control elements named %s ignored"),
-#                             paste(nms[nap], collapse = ", ")),
-#                     domain = NA)
-# src/library/stats/R/nls.R: 509
-# warning("No starting values specified for some parameters.\n",
-#                         "Initializing ", paste(sQuote(nnn), collapse=", "),
-#                         " to '1.'.\n",
-#                         "Consider specifying 'start' or using a selfStart model", domain = NA)
-# src/library/stats/R/nls.R: 518
-# stop(gettextf("parameters without starting value in 'data': %s",
-#                               paste(nnn, collapse=", ")), domain = NA)
-# src/library/stats/R/nls.R: 525
-# message(sprintf(ngettext(sum(np == -1),
-#                                      "fitting parameter %s without any variables",
-#                                      "fitting parameters %s without any variables"),
-#                             paste(sQuote(pnames[np == -1]), collapse=", ")),
-#                     domain = NA)
-# src/library/stats/R/family.R: 150
-# stop(gettextf('link "%s" not available for poisson family; available links are %s',
-# 			  linktemp, paste(sQuote(okLinks), collapse =", ")),
-# 		 domain = NA)
-# src/library/stats/R/family.R: 211
-# stop(gettextf('link "%s" not available for quasipoisson family; available links are %s',
-# 			  linktemp, paste(sQuote(okLinks), collapse =", ")),
-# 		 domain = NA)
-# src/library/stats/R/family.R: 262
-# stop(gettextf('link "%s" not available for gaussian family; available links are %s',
-# 			  linktemp, paste(sQuote(okLinks), collapse =", ")),
-# 		 domain = NA)
-# src/library/stats/R/family.R: 309
-# stop(gettextf('link "%s" not available for binomial family; available links are %s',
-# 			  linktemp, paste(sQuote(okLinks), collapse =", ")),
-# 	     domain = NA)
-# src/library/stats/R/family.R: 407
-# stop(gettextf('link "%s" not available for quasibinomial family; available links are %s',
-# 			  linktemp, paste(sQuote(okLinks), collapse =", ")),
-# 	     domain = NA)
-# src/library/stats/R/family.R: 460
-# stop(gettextf('link "%s" not available for gamma family; available links are %s',
-# 			  linktemp, paste(sQuote(okLinks), collapse =", ")),
-# 	     domain = NA)
-# src/library/stats/R/family.R: 518
-# stop(gettextf('link "%s" not available for inverse.gaussian family; available links are %s',
-# 			  linktemp, paste(sQuote(okLinks), collapse =", ")),
-#                  domain = NA)
-# src/library/stats/R/add.R: 640
-# stop(sprintf(ngettext(sum(where==0),
-#                                       "lower scope has term %s not included in model",
-#                                       "lower scope has terms %s not included in model"),
-#                              paste(sQuote(nmdrop[where==0]), collapse=", ")),
-#                      domain = NA)
-# src/library/stats/R/add.R: 670
-# stop(sprintf(ngettext(sum(where==0),
-#                                       "upper scope has term %s not included in model",
-#                                       "upper scope has terms %s not included in model"),
-#                              paste(sQuote(nmdrop[where==0]), collapse=", ")),
-#                      domain = NA)
-# src/library/stats/R/lm.R: 114
-# warning("extra arguments ", paste(sQuote(names(dots)), sep=", "),
-#                 " are disregarded.", domain = NA)
-# src/library/stats/R/lm.R: 173
-# warning("extra arguments ", paste(sQuote(names(dots)), sep=", "),
-#                 " are disregarded.", domain = NA)
-# src/library/stats/R/aov.R: 319
-# stop(sprintf(ngettext(na,
-#                                       "unknown name %s in the 'split' list",
-#                                       "unknown names %s in the 'split' list"),
-#                              paste(sQuote(ns[na]), collapse = ", ")),
-#                      domain = NA)
-# src/library/stats/R/optim.R: 52
-# warning("unknown names in control: ", paste(noNms,collapse=", "))
-# src/library/stats/R/lsfit.R: 62
-# stop(sprintf(paste0(ngettext(nrx,
-#                        "'X' matrix has %d case (row)",
-#                        "'X' matrix has %d cases (rows)"),
-#               ", ",
-#               ngettext(nry,
-#                        "'Y' has %d case (row)",
-#                        "'Y' has %d cases (rows)")),
-#                        nrx, nry),
-#                        domain = NA)
-# src/library/stats/R/lsfit.R: 72
-# stop(sprintf(paste0(ngettext(nry,
-#                               "only %d case",
-#                               "only %d cases"),
-#                      ", ",
-#                      ngettext(ncx,
-#                               "but %d variable",
-#                               "but %d variables")),
-#                      nry, ncx),
-#              domain = NA)
-# src/library/stats/R/acf.R: 176
-# message("Page [",I,",",J,"]: i =",
-#                     paste(iind,collapse=","),"; j =",
-#                     paste(jind,collapse=","), domain = NA)
-# src/library/stats/R/diffinv.R: 81
-# warning(sprintf(ngettext(na,
-#                                  "extra argument %s will be disregarded",
-#                                  "extra arguments %s will be disregarded"),
-#                         paste(sQuote(names(list(...))), collapse = ", ")),
-# 		domain = NA)
-# src/library/stats/R/models.R: 307
-# stop(gettextf(
-#     "variables %s were specified with different types from the fit",
-#                  paste(sQuote(names(old)[wrong]), collapse=", ")),
-#                  call. = FALSE, domain = NA)
-# src/library/stats/R/models.R: 445
-# stop(sprintf(ngettext(length(m),
-#                                               "factor %s has new level %s",
-#                                               "factor %s has new levels %s"),
-#                                      nm, paste(nxl[m], collapse=", ")),
-#                              domain = NA)
-# src/library/stats/R/glm.R: 204
-# stop(gettextf("length of 'start' should equal %d and correspond to initial coefs for %s", nvars, paste(deparse(xnames), collapse=", ")),
-#                          domain = NA)
-# src/library/stats/R/glm.R: 415
-# warning("the following arguments to 'anova.glm' are invalid and dropped: ",
-# 		paste(deparse(dotargs[named]), collapse=", "))
-# src/library/stats/R/dendrogram.R: 640
-# stop(sprintf(msg, paste(nms, collapse=", "), "dendrogram"),
-#                  domain = NA)
-# src/library/stats/R/reshape.R: 177
-# warning(gettextf("some constant variables (%s) are really varying",
-#                                  paste(names(rval)[!really.constant],collapse = ",")), domain = NA)
-# src/library/stats/R/aggregate.R: 141
-# sprintf("cbind(%s)",
-#         ##              paste(setdiff(names(data), rhs), collapse = ","))
-# src/library/stats/R/selfStart.R: 45
-# stop(sprintf(ngettext(sum(msng),
-#                        "parameter %s does not occur in the model formula",
-#                        "parameters %s do not occur in the model formula"),
-#                          paste(sQuote(parameters[msng]), collapse=", ")),
-#                  domain = NA)
-# src/library/compiler/noweb/compiler.nw: 1671
-# warning(msg, paste(vals[rdsf], collapse = ", "),
-#                         domain = NA)
-# src/library/compiler/R/cmp.R: 272
-# warning(msg, paste(vals[rdsf], collapse = ", "),
-#                         domain = NA)
-# src/library/parallel/R/unix/mclapply.R: 175
-# warning(sprintf(ngettext(has.errors,
-#                                      "scheduled core %s encountered error in user code, all values of the job will be affected",
-#                                      "scheduled cores %s encountered errors in user code, all values of the jobs will be affected"),
-#                             paste(has.errors, collapse = ", ")),
-#                     domain = NA)
-# src/library/parallel/R/snowSOCK.R: 131
-# sprintf(ngettext(length(hosts),
-#                             "socket cluster with %d nodes on host %s",
-#                             "socket cluster with %d nodes on hosts %s"),
-#                    nc, paste(sQuote(hosts), collapse = ", "))
-# src/library/base/man/gettext.Rd: 100
-# sprintf(ngettext(length(miss),
-#                      "variable \%s contains missing values\n",
-#                      "variables \%s contain missing values\n"),
-#             paste(sQuote(miss), collapse = ", "))
-# src/library/base/R/load.R: 84
-# stop(sprintf(ngettext(n,
-#                                       "object %s not found",
-#                                       "objects %s not found"
-#                                       ),
-#                              paste(sQuote(list[!ok]), collapse = ", ")
-#                              ), domain = NA)
-# src/library/base/R/version.R: 51
-# stop(gettextf("invalid version specification %s",
-#                           paste(sQuote(unique(x[!ok])), collapse = ", ")),
-#                  call. = FALSE, domain = NA)
-# src/library/base/R/namespace.R: 192
-# stop("cyclic namespace dependency detected when loading ",
-#              sQuote(package), ", already loading ",
-#              paste(sQuote(loading), collapse = ", "),
-#              domain = NA)
-# src/library/base/R/namespace.R: 521
-# stop(gettextf("in package %s classes %s were specified for export but not defined",
-#                                   sQuote(package),
-#                                   paste(expClasses[missingClasses],
-#                                         collapse = ", ")),
-#                          domain = NA)
-# src/library/base/R/namespace.R: 538
-# warning(gettextf("no function found corresponding to methods exports from %s for: %s",
-#                                      sQuote(package),
-#                                      paste(sQuote(sort(unique(addGenerics[nowhere]))), collapse = ", ")),
-#                          domain = NA, call. = FALSE)
-# src/library/base/R/namespace.R: 556
-# stop(sprintf(msg, sQuote(package),
-#                                      paste(sQuote(bad), collapse = ", ")),
-#                              domain = NA, call. = FALSE)
-# src/library/base/R/namespace.R: 569
-# message(gettextf("export(%s) from package %s generated by exportMethods()",
-#                 ##        paste(addGenerics[local], collapse = ", ")),
-#                 ##             domain = NA)
-# src/library/base/R/namespace.R: 581
-# stop(gettextf("in %s methods for export not found: %s",
-#                                   sQuote(package),
-#                                   paste(expMethods[missingMethods],
-#                                         collapse = ", ")),
-#                          domain = NA)
-# src/library/base/R/namespace.R: 630
-# stop(gettextf("in package %s methods %s were specified for export but not defined",
-#                               sQuote(package),
-#                               paste(expMethods, collapse = ", ")),
-#                      domain = NA)
-# src/library/base/R/namespace.R: 733
-# stop(gettextf("namespace %s is imported by %s so cannot be unloaded",
-#                       sQuote(getNamespaceName(ns)),
-#                       paste(sQuote(users), collapse = ", ")),
-#              domain = NA)
-# src/library/base/R/namespace.R: 826
-# stop(gettextf("duplicate import names %s",
-#                       paste(sQuote(impnames[duplicated(impnames)]),
-#                             collapse = ", ")), domain = NA)
-# src/library/base/R/namespace.R: 922
-# message(gettextf("No methods found in \"%s\" for requests: %s",
-#                          pkg, paste(vars[is.na(match(vars, allFuns))], collapse = ", ")),
-#                 domain = NA)
-# src/library/base/R/namespace.R: 930
-# stop(gettextf("requested methods not found in environment/package %s: %s",
-#                       sQuote(pkg),
-#                       paste(vars[is.na(match(vars, allFuns))],
-#                             collapse = ", ")), call. = FALSE, domain = NA)
-# src/library/base/R/namespace.R: 978
-# stop(sprintf(ngettext(length(miss),
-#                                   "class %s is not exported by 'namespace:%s'",
-#                                   "classes %s are not exported by 'namespace:%s'"),
-#                          paste(paste0('"', miss, '"'), collapse = ", "),
-#                          getNamespaceName(expenv)),
-#                  call. = FALSE, domain = NA)
-# src/library/base/R/namespace.R: 985
-# stop(sprintf(ngettext(length(miss),
-#                                   "object %s is not exported by 'namespace:%s'",
-#                                   "objects %s are not exported by 'namespace:%s'"),
-#                          paste(sQuote(miss), collapse = ", "),
-#                          getNamespaceName(expenv)),
-#                  call. = FALSE, domain = NA)
-# src/library/base/R/namespace.R: 1013
-# warning(sprintf(ngettext(sum(ex),
-#                                          "previous export '%s' is being replaced",
-#                                          "previous exports '%s' are being replaced"),
-#                                 paste(sQuote(expnames[ex]), collapse = ", ")),
-#                         call. = FALSE, domain = NA)
-# src/library/base/R/namespace.R: 1237
-# warning(gettextf("duplicate symbol names %s in useDynLib(\"%s\")",
-#                                             paste(sQuote(names(symNames)[dup]),
-#                                                   collapse = ", "), dyl),
-#                                    domain = NA)
-# src/library/base/R/namespace.R: 1408
-# warning(sprintf(ngettext(sum(notex),
-#                                  "S3 method %s was declared in NAMESPACE but not found",
-#                                  "S3 methods %s were declared in NAMESPACE but not found"),
-#                         paste(sQuote(info[notex, 3]), collapse = ", ")),
-#                 call. = FALSE, domain = NA)
-# src/library/base/R/match.R: 50
-# stop(gettextf("'arg' should be one of %s",
-#                       paste(dQuote(choices), collapse = ", ")),
-#              domain = NA)
-# src/library/base/R/New-Internal.R: 109
-# stop(sprintf(ngettext(as.integer(sum(is.na(opts))),
-#                               "deparse option %s is not recognized",
-#                               "deparse options %s are not recognized"),
-#                      paste(sQuote(control[is.na(opts)]), collapse=", ")),
-#              call. = FALSE, domain = NA)
-# src/library/base/R/dataframe.R: 69
-# warning(ngettext(length(nonuniq),
-#                          sprintf("non-unique value when setting 'row.names': %s",
-#                                  sQuote(nonuniq[1L])),
-#                          sprintf("non-unique values when setting 'row.names': %s",
-#                                  paste(sQuote(nonuniq), collapse = ", "))),
-#                 domain = NA, call. = FALSE)
-# src/library/base/R/dataframe.R: 386
-# warning(gettextf("some row.names duplicated: %s --> row.names NOT used",
-#                                      paste(which(duplicated(new)), collapse=",")),
-#                             domain = NA)
-# src/library/base/R/dataframe.R: 405
-# stop(gettextf("duplicate row.names: %s",
-#                               paste(unique(row.names[duplicated(row.names)]),
-#                                     collapse = ", ")),
-#                      domain = NA)
-# src/library/base/R/dataframe.R: 484
-# stop(gettextf("arguments imply differing number of rows: %s",
-#                       paste(unique(nrows), collapse = ", ")),
-#              domain = NA)
-# src/library/base/R/dataframe.R: 521
-# stop(gettextf("duplicate row.names: %s",
-#                           paste(unique(row.names[duplicated(row.names)]),
-#                                 collapse = ", ")),
-#                  domain = NA)
-# src/library/base/R/library.R: 643
-# warning(sprintf(ngettext(as.integer(sum(m)),
-#                                          "package %s is not loaded",
-#                                          "packages %s are not loaded"),
-#                                 paste(package[m], collapse=", ")),
-#                         domain = NA)
-# src/library/base/R/library.R: 759
-# stop(ngettext(length(bad),
-#                               "there is no package called",
-#                               "there are no packages called"), " ",
-#                      paste(sQuote(bad), collapse = ", "), domain = NA)
-# src/library/base/R/merge.R: 160
-# warning("column names ",
-#                         paste(sQuote(nm[d]), collapse = ", "),
-#                         " are duplicated in the result", domain = NA)
-# src/library/base/R/seq.R: 46
-# warning(sprintf(ngettext(length(list(...)),
-#                                  "extra argument %s will be disregarded",
-#                                  "extra arguments %s will be disregarded"),
-# 			 paste(sQuote(names(list(...))), collapse = ", ")),
-# 		domain = NA)
-# src/library/base/R/qr.R: 224
-# warning(sprintf(ngettext(length(list(...)),
-# 				 "extra argument %s will be disregarded",
-# 				 "extra arguments %s will be disregarded"),
-# 			 paste(sQuote(names(list(...))), collapse = ", ")),
-# 		domain = NA)
-# src/library/base/R/summary.R: 169
-# warning("probably wrong encoding in names(.) of column ",
-# 		paste(which(is.na(lw)), collapse = ", "))
-# src/library/base/R/taskCallback.R: 139
-# gettextf("Removing %s", paste(discard, collapse=", "))
-# src/library/utils/R/package.skeleton.R: 71
-# warning(sprintf(ngettext(sum(!have),
-#                                  "object '%s' not found",
-#                                  "objects '%s' not found"),
-#                         paste(sQuote(list[!have]), collapse=", ")),
-#                 domain = NA)
-# src/library/utils/R/package.skeleton.R: 179
-# warning("Invalid file name(s) for R code in ", code_dir,":\n",
-# 		    strwrap(paste(sQuote(wrong), collapse = ", "), indent=2),
-# 		    "\n are now renamed to 'z<name>.R'", domain = NA)
-# src/library/utils/R/packages2.R: 49
-# warning(sprintf(ngettext(sum(miss),
-# 				 "package %s is not available (for %s)",
-# 				 "packages %s are not available (for %s)"),
-# 			paste(sQuote(p0[miss]), collapse=", "),
-# 			sub(" *\\(.*","", R.version.string)),
-#                 domain = NA, call. = FALSE)
-# src/library/utils/R/packages2.R: 90
-# warning(sprintf(ngettext(length(not_avail),
-#                                      "dependency %s is not available",
-#                                      "dependencies %s are not available"),
-#                             paste(sQuote(not_avail), collapse=", ")),
-#                     domain = NA, call. = FALSE, immediate. = TRUE)
-# src/library/utils/R/packages2.R: 102
-# message(sprintf(ngettext(length(added),
-#                                      "also installing the dependency %s",
-#                                      "also installing the dependencies %s"),
-#                             paste(sQuote(added), collapse=", ")),
-#                     "\n", domain = NA)
-# src/library/utils/R/packages2.R: 234
-# stop(sprintf(ngettext(sum(!ok),
-#                               "'lib' element %s is not a writable directory",
-#                               "'lib' elements %s are not writable directories"),
-#                      paste(sQuote(lib[!ok]), collapse=", ")), domain = NA)
-# src/library/utils/R/packages2.R: 386
-# message(sprintf(ngettext(length(pkgs),
-#                                      "installing the source package %s",
-#                                      "installing the source packages %s"),
-#                         paste(sQuote(pkgs), collapse=", ")),
-#                 "\n", domain = NA)
-# src/library/utils/R/packages2.R: 418
-# sprintf(ngettext(length(na),
-#                                          "package %s is available as a source package but not as a binary",
-#                                          "packages %s are available as source packages but not as binaries"),
-#                                 paste(sQuote(na), collapse = ", "))
-# src/library/utils/R/packages2.R: 601
-# message(gettextf("foundpkgs: %s",
-#                                      paste(foundpkgs, collapse=", ")),
-#                             domain = NA)
-# src/library/utils/R/packages2.R: 682
-# warning(gettextf("installation of one or more packages failed,\n  probably %s",
-#                                  paste(sQuote(failed), collapse = ", ")),
-#                         domain = NA)
-# src/library/utils/R/str.R: 113
-# warning(gettextf("invalid components in options(\"str\"): %s",
-#                              paste(setdiff(names(strO), oDefs), collapse = ", ")),
-#                     domain = NA)
-# src/library/utils/R/windows/install.packages.R: 73
-# warning(gettextf("failed to create %s",
-#                                      paste(sQuote(mos[!res]), collapse=",")),
-#                             domain = NA)
-# src/library/utils/R/windows/install.packages.R: 94
-# warning(gettextf("failed to create %s",
-#                                          paste(sQuote(mos[!res]), collapse=",")),
-#                                 domain = NA)
-# src/library/utils/R/windows/install.packages.R: 220
-# warning(sprintf(ngettext(sum(inuse),
-#                 "package %s is in use and will not be installed",
-#                 "packages %s are in use and will not be installed"),
-#                         paste(sQuote(pkgnames[inuse]), collapse=", ")),
-#                 call. = FALSE, domain = NA, immediate. = TRUE)
-# src/library/utils/R/data.R: 127
-# message(sprintf("name=%s:\t NOT found in names() of Rdata.rds, i.e.,\n\t%s\n",
-# 				    name, paste(names(rds), collapse=",")),
-# 				domain=NA)
-# src/library/utils/R/packages.R: 1012
-# warning(gettextf("packages %s are mutually dependent",
-#                              paste(sQuote(names(DL)), collapse = ", ")),
-#                     domain = NA)
-# src/library/utils/R/citation.R: 36
-# warning(gettextf("Not all arguments are of the same length, the following need to be recycled: %s",
-#                          paste(names(args)[!args_length_ok],
-#                                collapse = ", ")),
-#                 domain = NA)
-# src/library/utils/R/citation.R: 96
-# warning(sprintf(ngettext(length(role),
-#                                          "Invalid role specification: %s.",
-#                                          "Invalid role specifications: %s."),
-#                                 paste(sQuote(role), collapse = ", ")),
-#                         domain = NA)
-# src/library/utils/R/citation.R: 153
-# warning(sprintf(ngettext(length(pos[ind]),
-#                                      "Invalid role specification: %s.",
-#                                      "Invalid role specifications: %s."),
-#                             paste(sQuote(role[pos[ind]]), collapse = ", ")),
-#                     domain = NA)
-# src/library/utils/R/citation.R: 438
-# warning(gettextf("Not all arguments are of the same length, the following need to be recycled: %s",
-#                          paste(names(args)[!args_length_ok],
-#                                collapse = ", ")),
-#                 domain = NA)
-# src/library/utils/R/citation.R: 446
-# warning(gettextf("Not all arguments are of the same length, the following need to be recycled: %s",
-#                          paste(names(other)[!other_length_ok],
-#                                collapse = ", ")),
-#                 domain = NA)
-# src/library/utils/R/citation.R: 460
-# stop(gettextf("%s has to be one of %s",
-#                           sQuote("bibtype"),
-#                           paste(BibTeX_names, collapse = ", ")),
-#                  domain = NA)
-# src/library/utils/R/citation.R: 526
-# stop(sprintf(ngettext(sum(!ok),
-#                                   "A bibentry of bibtype %s has to specify the field: %s",
-#                                   "A bibentry of bibtype %s has to specify the fields: %s"),
-#                           sQuote(bibtype), paste(rfields[!ok], collapse = ", ")),
-#                  domain = NA)
-# src/library/utils/R/citation.R: 585
-# stop(gettextf("%s should be one of %s",
-#                       sQuote("style"),
-#                       paste(dQuote(bibentry_format_styles),
-#                             collapse = ", ")),
-#              domain = NA)
-# src/library/utils/R/citation.R: 898
-# stop(gettextf("%s has to be one of %s",
-#                           sQuote("bibtype"),
-#                           paste(BibTeX_names, collapse = ", ")),
-#                  domain = NA)
-# src/library/utils/R/citation.R: 1249
-# sprintf("%s [%s]", out, paste(role, collapse = ", "))
-# src/library/utils/R/edit.R: 98
-# warning(sprintf(ngettext(sum(has_class),
-#                                     "class discarded from column %s",
-#                                     "classes discarded from columns %s"),
-#                             paste(sQuote(names(name)[has_class]),
-#                                   collapse=", ")),
-#                     domain = NA, call. = FALSE, immediate. = TRUE)
-msgid ","
-msgstr ","
-
-# src/library/base/R/sweep.R: 28
-# warning("STATS is longer than the extent of 'dim(x)[MARGIN]'")
-msgid "STATS is longer than the extent of 'dim(x)[MARGIN]'"
-msgstr "STATS jest dłuższe niż rozmiar 'dim(x)[MARGIN]'"
+#. R/dataframe.R: gettextf("replacing element in non-existent column: %s", j[is.na(jseq)])
+#. R/dataframe.R: gettextf("replacing element in non-existent column: %s", jseq[jseq >     nvars])
+#: R/dataframe.R:0
+msgid "replacing element in non-existent column: %s"
+msgstr "zastępowanie elementu w nieistniejącej kolumnie: %s"
 
-# src/library/base/R/sweep.R: 34
-# warning("STATS does not recycle exactly across MARGIN")
-msgid "STATS does not recycle exactly across MARGIN"
-msgstr "STATS nie powtarza się dokładnie zgodnie z MARGIN"
+#. R/namespace.R: gettext("replacing local value with import %s when loading %s")
+#. R/namespace.R: gettext("replacing local value with import %s when loading %s")
+#: R/namespace.R:0
+msgid "replacing local value with import %s when loading %s"
+msgstr ""
+"zastępowanie lokalnej wartości z importu %s podczas ładowania przestrzeni "
+"nazw %s"
 
-# src/library/base/R/sweep.R: 40
-# warning("length(STATS) or dim(STATS) do not match dim(x)[MARGIN]")
-msgid "length(STATS) or dim(STATS) do not match dim(x)[MARGIN]"
-msgstr "'length(STATS)' lub 'dim(STATS)' nie zgadza się z 'dim(x)[MARGIN]'"
+#. R/namespace.R: gettext("replacing previous import %s by %s when loading %s")
+#: R/namespace.R:0
+msgid "replacing previous import %s by %s when loading %s"
+msgstr ""
+"zastępowanie poprzedniego importu %s przez %s podczas ładowanie przestrzeni "
+"nazw %s"
 
-# src/library/stats/R/ftable.R: 25
-# stop("nothing to tabulate")
-# src/library/base/R/table.R: 47
-# stop("nothing to tabulate")
-msgid "nothing to tabulate"
-msgstr "nic do tabulacji"
+#. R/namespace.R: gettext("replacing previous import by %s when loading %s")
+#: R/namespace.R:0
+msgid "replacing previous import by %s when loading %s"
+msgstr ""
+"zastępowanie poprzedniego importu przez %s podczas ładowanie przestrzeni "
+"nazw %s"
 
-# src/library/base/R/table.R: 65
-# stop("all arguments must have the same length")
-msgid "all arguments must have the same length"
-msgstr "wszystkie argumenty muszą mieć tę samą długość"
+#. R/namespace.R: gettextf("requested methods not found in environment/package %s: %s",     sQuote(pkg), paste(vars[is.na(match(vars, allFuns))], collapse = ", "))
+#: R/namespace.R:0
+msgid "requested methods not found in environment/package %s: %s"
+msgstr "zażądane metody nie zostały znalezione w środowisku/pakiecie %s: %s"
 
-# src/library/base/R/table.R: 101
-# stop("attempt to make a table with >= 2^31 elements")
-# src/library/base/R/tabulate.R: 26
-# stop("attempt to make a table with >= 2^31 elements")
-msgid "attempt to make a table with >= 2^31 elements"
-msgstr "próba utworzenia tabeli z >= 2^31 elementami"
+#. R/dataframe.R: stop("row names contain missing values")
+#. R/dataframe.R: stop("row names contain missing values")
+#: R/dataframe.R:0
+msgid "row names contain missing values"
+msgstr "nazwy wierszy zawierają brakujące wartości"
 
-# src/library/base/R/table.R: 152
-# stop(gettextf("'object' must inherit from class %s",
-#                       dQuote("table")),
-#              domain = NA)
-msgid "'object' must inherit from class %s"
-msgstr "argument 'object' musi dziedziczyć z klasy %s"
+#. R/dataframe.R: stop("row names supplied are of the wrong length")
+#: R/dataframe.R:0
+msgid "row names supplied are of the wrong length"
+msgstr "dostarczone nazwy wierszy mają niepoprawną długość"
 
-# src/library/base/R/table.R: 182
-# stop(gettextf("'x' must inherit from class %s",
-#                       dQuote("summary.table")),
-#              domain = NA)
-msgid "'x' must inherit from class %s"
-msgstr "argument 'x' musi dziedziczyć z klasy %s"
+#. R/dataframe.R: warning("row names were found from a short variable and have been discarded")
+#: R/dataframe.R:0
+msgid "row names were found from a short variable and have been discarded"
+msgstr ""
+"nazwy wierszy zostały znalezione z krótkiej zmiennej i zostały odrzucone"
 
-# src/library/base/R/table.R: 224
-# stop("cannot coerce to a table")
-# src/library/base/R/table.R: 226
-# stop("cannot coerce to a table")
-msgid "cannot coerce to a table"
-msgstr "nie można przekształcić w tabelę"
+#. R/New-Internal.R: stop("second argument must be a list")
+#: R/New-Internal.R:0
+msgid "second argument must be a list"
+msgstr "drugi argument musi być listą"
 
-# src/library/base/R/table.R: 239
-# stop("'x' is not an array")
-msgid "'x' is not an array"
-msgstr "argument 'x' nie jest tablicą"
+#. R/datetime.R: stop("second argument of / cannot be a \"difftime\" object")
+#: R/datetime.R:0
+msgid "second argument of / cannot be a \"difftime\" object"
+msgstr "drugi argument operatora '/' nie może być obiektem klasy \"difftime\""
 
-# src/library/base/R/tabulate.R: 22
-# stop("'bin' must be numeric or a factor")
-msgid "'bin' must be numeric or a factor"
-msgstr "argument 'bin' musi być liczbą lub czynnikiem"
+#. R/unix/system.unix.R: warning("setting stdout = TRUE")
+#: R/unix/system.unix.R:0
+msgid "setting stdout = TRUE"
+msgstr "ustawianie 'stdout = TRUE'"
 
-# src/library/base/R/tabulate.R: 28
-# stop("invalid value of 'nbins'")
-msgid "invalid value of 'nbins'"
-msgstr "niepoprawna wartość 'nbins'"
+#. R/library.R: gettextf("shared object %s not found", sQuote(chname1))
+#: R/library.R:0
+msgid "shared object %s not found"
+msgstr "współdzielony obiekt %s nie został znaleziony"
 
-# src/library/base/R/tapply.R: 24
-# stop("'INDEX' is of length zero")
-msgid "'INDEX' is of length zero"
-msgstr "argument 'INDEX' ma zerową długość"
+#. R/library.R: gettextf("shared object %s was not loaded", sQuote(chname1))
+#: R/library.R:0
+msgid "shared object %s was not loaded"
+msgstr "współdzielony obiekt %s nie został załadowany"
 
-# src/library/stats/R/aggregate.R: 57
-# stop("arguments must have same length")
-# src/library/base/R/tapply.R: 35
-# stop("arguments must have same length")
-msgid "arguments must have same length"
-msgstr "argumenty muszą mieć tę samą długość"
+#. R/library.R: gettextf("shared object '%s' already loaded", sQuote(chname1))
+#: R/library.R:0
+msgid "shared object '%s' already loaded"
+msgstr "współdzielony obiekt '%s' jest już załadowany"
 
-# src/library/base/R/taskCallback.R: 22
-# stop("handler must be a function")
-msgid "handler must be a function"
-msgstr "przewodnik musi być funkcją"
+#. R/library.R: gettextf("shared object '%s' not found", sQuote(chname1))
+#: R/library.R:0
+msgid "shared object '%s' not found"
+msgstr "współdzielony obiekt '%s' nie został znaleziony"
 
-# src/library/base/R/taskCallback.R: 99
-# stop(gettextf("no such element '%s'", which), domain = NA)
-msgid "no such element '%s'"
-msgstr "nie ma elementu '%s'"
+#. R/solve.R: stop("singular matrix 'a' in 'solve'")
+#: R/solve.R:0
+msgid "singular matrix 'a' in 'solve'"
+msgstr "osobliwa macierz 'a' w 'solve()'"
 
-# src/library/base/R/taskCallback.R: 139
-# gettextf("Removing %s", paste(discard, collapse=", "))
-msgid "Removing %s"
-msgstr "Usuwanie %s"
+#. R/solve.R: stop("singular matrix 'a' in solve")
+#: R/solve.R:0
+msgid "singular matrix 'a' in solve"
+msgstr "osobliwa macierz 'a' w 'solve()'"
 
-# src/library/base/R/taskCallback.R: 158
-# gettext("Registering 'evaluate' as low-level callback\n")
-msgid "Registering 'evaluate' as low-level callback"
-msgstr "Rejestrowanie 'evaluate' jako wywołania zwrotnego niskiego poziomu"
+#. R/solve.R: warning("solve.default called with a \"qr\" object: use 'qr.solve'")
+#: R/solve.R:0
+msgid "solve.default called with a \"qr\" object: use 'qr.solve'"
+msgstr ""
+"'solve.default' zostało wywołane z obiektem \"qr\": używanie 'qr.solve'"
 
-# src/library/base/R/time.R: 50
-# gettext("user")
-msgid "user"
-msgstr "użytkownik"
+#. R/dataframe.R: gettextf("some row.names duplicated: %s --> row.names NOT used",     paste(which(duplicated(new)), collapse = ","))
+#: R/dataframe.R:0
+msgid "some row.names duplicated: %s --> row.names NOT used"
+msgstr ""
+"niektóre wartości 'row.names' są powtórzone: %s --> nazwy wierszy nie "
+"zostały użyte"
 
+#. R/time.R: gettext("system")
+#: R/time.R:0
 msgid "system"
 msgstr "system"
 
-msgid "elapsed"
-msgstr "upłynęło"
+#. R/all.equal.R: gettextf("target is %s, current is %s", data.class(target), data.class(current))
+#: R/all.equal.R:0
+msgid "target is %s, current is %s"
+msgstr "cel: %s, bieżące: %s"
 
-# src/library/base/R/toString.R: 26
-# stop("'width' must be positive")
-msgid "'width' must be positive"
-msgstr "argument 'width' musi być dodatni"
+#. R/match.R: stop("there is more than one match in 'match.arg'")
+#: R/match.R:0
+msgid "there is more than one match in 'match.arg'"
+msgstr "jest więcej niż jedno dopasowanie w funkcji 'match.arg()'"
 
-# src/library/base/R/traceback.R: 28
-# gettext("No traceback available")
-msgid "No traceback available"
-msgstr "Śledzenie nie jest dostepne"
+#. R/library.R: gettextf("there is no package called %s", sQuote(package))
+#. R/library.R: gettextf("there is no package called %s", sQuote(pkg))
+#. R/library.R: gettextf("there is no package called %s", sQuote(pkg))
+#. R/namespace.R: gettextf("there is no package called %s", sQuote(package))
+#: R/library.R:0 R/namespace.R:0
+msgid "there is no package called %s"
+msgstr "nie ma pakietu o nazwie %s"
 
-# src/library/base/R/version.R: 51
-# stop(gettextf("invalid version specification %s",
-#                           paste(sQuote(unique(x[!ok])), collapse = ", ")),
-#                  call. = FALSE, domain = NA)
-msgid "invalid version specification %s"
-msgstr "niepoprawne określenie wersji %s"
+#. R/solve.R: stop("this is the \"qr\" method for the generic function solve()")
+#: R/solve.R:0
+msgid "this is the \"qr\" method for the generic function solve()"
+msgstr "to jest metoda \"qr\" dla ogólnej funkcji 'solve()'"
 
-# src/library/base/R/version.R: 153
-# stop("wrong argument")
-msgid "wrong argument"
-msgstr "błędny argument"
-
-# src/library/base/R/version.R: 207
-# stop("invalid 'value'")
-# src/library/base/R/version.R: 210
-# stop("invalid 'value'")
-# src/library/base/R/version.R: 215
-# stop("invalid 'value'")
-msgid "invalid 'value'"
-msgstr "niepoprawna wartość 'value'"
+#. R/qr.R: stop("too large a matrix for LINPACK")
+#: R/qr.R:0
+msgid "too large a matrix for LINPACK"
+msgstr "macierz jest zbyt duża dla LINPACK"
 
-# src/library/base/R/version.R: 226
-# stop(gettextf("unary '%s' not defined for \"numeric_version\" objects",
-#                       .Generic), domain = NA)
-msgid "unary '%s' not defined for \"numeric_version\" objects"
+#. R/seq.R: stop("too many arguments")
+#: R/seq.R:0
+msgid "too many arguments"
+msgstr "zbyć dużo argumentów"
+
+#. R/tapply.R: stop("total number of levels >= 2^31")
+#: R/tapply.R:0
+msgid "total number of levels >= 2^31"
+msgstr "całkowita liczba poziomów jest >= 2^31"
+
+#. R/methodsSupport.R: stop("tracing functions requires the 'methods' package, but unable to load the 'methods' namespace")
+#: R/methodsSupport.R:0
+msgid ""
+"tracing functions requires the 'methods' package, but unable to load the "
+"'methods' namespace"
 msgstr ""
-"jednoargumentowy operator '%s' nie jest określony dla obiektów klasy "
-"\"numeric_version\""
+"funkcjonalność śledzenia funkcji wymaga pakietu 'methods', ale nie można "
+"załadować przestrzeni nazw 'methods'"
 
-# src/library/base/R/version.R: 231
-# stop(gettextf("'%s' not defined for \"numeric_version\" objects",
-#                       .Generic), domain = NA)
-msgid "'%s' not defined for \"numeric_version\" objects"
-msgstr "'%s' nie jest określone dla obiektów klasy \"numeric_version\""
+#. R/kappa.R: stop("triangular matrix should be square")
+#: R/kappa.R:0
+msgid "triangular matrix should be square"
+msgstr "macierz trójkątna powinna mieć równą liczbę wierszy i kolumn"
 
-# src/library/base/R/version.R: 246
-# stop(gettextf("%s not defined for \"numeric_version\" objects",
-#                       .Generic), domain = NA)
-msgid "%s not defined for \"numeric_version\" objects"
-msgstr "'%s' nie jest określone dla obiektów klasy \"numeric_version\""
+#. R/mean.R: stop("trimmed means are not defined for complex data")
+#: R/mean.R:0
+msgid "trimmed means are not defined for complex data"
+msgstr "przycięte średnie nie są zdefiniowane dla danych złożonych"
 
-# src/library/base/R/version.R: 320
-# gettext("<0 elements>")
-msgid "<0 elements>"
-msgstr "<0 elementów>"
+#. R/source.R: stop("unable to find a plausible encoding")
+#: R/source.R:0
+msgid "unable to find a plausible encoding"
+msgstr "nie można znaleźć wiarygodnego kodowania"
 
-msgid "invalid 'digits'"
-msgstr "niepoprawna wartość 'digits'"
+#. R/namespace.R: gettextf("unable to load R code in package %s", sQuote(package))
+#: R/namespace.R:0
+msgid "unable to load R code in package %s"
+msgstr "nie można załadować kodu R w pakiecie %s"
 
-# src/library/base/R/unix/system.unix.R: 27
-# message("arguments 'show.output.on.console', 'minimized' and 'invisible' are for Windows only")
-msgid "arguments 'show.output.on.console', 'minimized' and 'invisible' are for Windows only"
+#. R/dates.R: gettextf("unary %s not defined for \"Date\" objects", .Generic)
+#: R/dates.R:0
+msgid "unary %s not defined for \"Date\" objects"
 msgstr ""
-"argumenty 'show.output.on.console', 'minimized' oraz 'invisible' są tylko "
-"dla systemu Windows"
+"jednoargumentowy operator '%s' nie jest określony dla obiektów klasy \"Date\""
 
-# src/library/base/R/unix/system.unix.R: 30
-# stop("'intern' must be TRUE or FALSE")
-# src/library/base/R/windows/system.R: 26
-# stop("'intern' must be TRUE or FALSE")
-msgid "'intern' must be TRUE or FALSE"
-msgstr "argument 'intern' musi mieć wartość TRUE lub FALSE"
+#. R/datetime.R: gettextf("unary '%s' not defined for \"POSIXt\" objects", .Generic)
+#: R/datetime.R:0
+msgid "unary '%s' not defined for \"POSIXt\" objects"
+msgstr ""
+"jednoargumentowy operator '%s' nie jest określony dla obiektów klasy \"POSIXt"
+"\""
 
-# src/library/base/R/unix/system.unix.R: 32
-# stop("'ignore.stdout' must be TRUE or FALSE")
-# src/library/base/R/windows/system.R: 28
-# stop("'ignore.stdout' must be TRUE or FALSE")
-msgid "'ignore.stdout' must be TRUE or FALSE"
-msgstr "argument 'ignore.stdout' musi mieć wartość TRUE lub FALSE"
+#. R/datetime.R: gettextf("unary '%s' not defined for \"difftime\" objects", .Generic)
+#: R/datetime.R:0
+msgid "unary '%s' not defined for \"difftime\" objects"
+msgstr ""
+"jednoargumentowy operator '%s' nie jest określony dla obiektów klasy "
+"\"difftime\""
 
-# src/library/base/R/unix/system.unix.R: 34
-# stop("'ignore.stderr' must be TRUE or FALSE")
-# src/library/base/R/windows/system.R: 30
-# stop("'ignore.stderr' must be TRUE or FALSE")
-msgid "'ignore.stderr' must be TRUE or FALSE"
-msgstr "argument 'ignore.stderr' musi mieć wartość TRUE lub FALSE"
+#. R/version.R: gettextf("unary '%s' not defined for \"numeric_version\" objects",     .Generic)
+#: R/version.R:0
+msgid "unary '%s' not defined for \"numeric_version\" objects"
+msgstr ""
+"jednoargumentowy operator '%s' nie jest określony dla obiektów klasy "
+"\"numeric_version\""
 
-# src/library/base/R/unix/system.unix.R: 36
-# stop("'wait' must be TRUE or FALSE")
-# src/library/base/R/unix/system.unix.R: 61
-# stop("'wait' must be TRUE or FALSE")
-# src/library/base/R/windows/system.R: 32
-# stop("'wait' must be TRUE or FALSE")
-# src/library/base/R/windows/system.R: 68
-# stop("'wait' must be TRUE or FALSE")
-msgid "'wait' must be TRUE or FALSE"
-msgstr "argument 'wait' musi mieć wartość TRUE lub FALSE"
+#. R/datetime.R: stop("unary '-' is not defined for \"POSIXt\" objects")
+#: R/datetime.R:0
+msgid "unary '-' is not defined for \"POSIXt\" objects"
+msgstr ""
+"jednoargumentowy operator '-' nie jest określony dla obiektów klasy \"POSIXt"
+"\""
 
-# src/library/base/R/unix/system.unix.R: 42
-# stop("'input' must be a character vector or 'NULL'")
-# src/library/base/R/unix/system.unix.R: 96
-# stop("'input' must be a character vector or 'NULL'")
-msgid "'input' must be a character vector or 'NULL'"
-msgstr "argument 'input' musi być wektorem tekstowym lub wartością 'NULL'"
+#. R/dates.R: stop("unary - is not defined for \"Date\" objects")
+#: R/dates.R:0
+msgid "unary - is not defined for \"Date\" objects"
+msgstr ""
+"jednoargumentowy operator '-' nie jest określony dla obiektów klasy \"Date\""
 
-# src/library/base/R/unix/system.unix.R: 59
-# message("arguments 'minimized' and 'invisible' are for Windows only")
-msgid "arguments 'minimized' and 'invisible' are for Windows only"
-msgstr "argumenty 'minimized' oraz 'invisible' są tylko dla systemu Windows"
+#. R/dataframe.R: stop("undefined columns selected")
+#. R/dataframe.R: stop("undefined columns selected")
+#. R/dataframe.R: stop("undefined columns selected")
+#. R/dataframe.R: stop("undefined columns selected")
+#. R/dataframe.R: stop("undefined columns selected")
+#: R/dataframe.R:0
+msgid "undefined columns selected"
+msgstr "nie wybrano kolumn"
 
-# src/library/base/R/unix/system.unix.R: 70
-# warning("setting stdout = TRUE")
-msgid "setting stdout = TRUE"
-msgstr "ustawianie 'stdout = TRUE'"
+#. R/namespace.R: gettextf("undefined exports: %s", undef)
+#: R/namespace.R:0
+msgid "undefined exports: %s"
+msgstr "niezdefiniowane eksporty: %s"
 
-# src/library/base/R/unix/system.unix.R: 78
-# stop("'stdout' must be of length 1")
-msgid "'stdout' must be of length 1"
-msgstr "'stdout' musi mieć długość 1"
+#. R/grep.R: warning("unknown cost components ignored")
+#: R/grep.R:0
+msgid "unknown cost components ignored"
+msgstr "nieznane komponenty kosztowe zostały zignorowane"
 
-# src/library/base/R/unix/system.unix.R: 90
-# stop("'stderr' must be of length 1")
-msgid "'stderr' must be of length 1"
-msgstr "'stderr' musi mieć długość 1"
+#. R/grep.R: warning("unknown match distance components ignored")
+#: R/grep.R:0
+msgid "unknown match distance components ignored"
+msgstr "nieznane komponenty o dopasowanej odległości zostały zignorowane"
 
-# src/library/base/R/unix/system.unix.R: 114
-# warning("'which' was not found on this platform")
-msgid "'which' was not found on this platform"
-msgstr "'which' nie zostało znalezione na tej platformie"
+#. R/namespace.R: gettextf("unknown namespace directive: %s", deparse(e, nlines = 1L))
+#: R/namespace.R:0
+msgid "unknown namespace directive: %s"
+msgstr "nieznana dyrektywa przestrzeni nazw: %s"
 
-# src/library/base/R/windows/junctions.R: 26
-# stop("fewer 'from' files than 'to' files")
-msgid "fewer 'from' files than 'to' files"
-msgstr "mniej plików 'from' niż plików 'to'"
+#. R/dataframe.R: stop("unsupported matrix index in replacement")
+#: R/dataframe.R:0
+msgid "unsupported matrix index in replacement"
+msgstr "niedozwolony indeks macierzy w zamianie"
 
-# src/library/base/R/windows/junctions.R: 33
-# warning(gettextf("link '%s' already exists", link), domain = NA)
-msgid "link '%s' already exists"
-msgstr "połączenie '%s' już istnieje"
+#. R/sort.R: stop("unsupported options for partial sorting")
+#: R/sort.R:0
+msgid "unsupported options for partial sorting"
+msgstr "niewspierane opcje dla częściowego sortowania"
 
-# src/library/base/R/windows/junctions.R: 37
-# warning(gettextf("failed to create directory for link '%s", link),
-#                     domain = NA)
-msgid "failed to create directory for link '%s"
-msgstr "nie udało się utworzyć katalogu dla łącza '%s"
+#. R/time.R: gettext("user")
+#: R/time.R:0
+msgid "user"
+msgstr "użytkownik"
 
-# src/library/base/R/windows/system.R: 34
-# stop("'show.output.on.console' must be TRUE or FALSE")
-msgid "'show.output.on.console' must be TRUE or FALSE"
-msgstr "argument 'show.output.on.console' musi mieć wartość TRUE lub FALSE"
+#. R/outer.R: stop("using ... with FUN = \"*\" is an error")
+#: R/outer.R:0
+msgid "using ... with FUN = \"*\" is an error"
+msgstr "używanie '...' z FUN = \"*\" jest błędem"
 
-# src/library/base/R/windows/system.R: 36
-# stop("'minimized' must be TRUE or FALSE")
-# src/library/base/R/windows/system.R: 70
-# stop("'minimized' must be TRUE or FALSE")
-msgid "'minimized' must be TRUE or FALSE"
-msgstr "argument 'minimized' musi mieć wartość TRUE lub FALSE"
+#. R/formals.R: warning("using the first element of 'value' of type \"expression\"")
+#: R/formals.R:0
+msgid "using the first element of 'value' of type \"expression\""
+msgstr "używanie pierwszego elementu 'value' typu \"expression\""
 
-# src/library/base/R/windows/system.R: 38
-# stop("'invisible' must be TRUE or FALSE")
-# src/library/base/R/windows/system.R: 72
-# stop("'invisible' must be TRUE or FALSE")
-msgid "'invisible' must be TRUE or FALSE"
-msgstr "argument 'invisible' musi mieć wartość TRUE lub FALSE"
+#. R/grep.R: stop("value does not provide any replacement values")
+#: R/grep.R:0
+msgid "value does not provide any replacement values"
+msgstr "wartości nie dostarczają żadnych wartości zamian"
 
-# src/library/base/R/windows/system.R: 111
-# stop(gettextf("'%s' could not be run", cmd0), domain = NA)
-# src/library/base/R/windows/system.R: 116
-# warning(gettextf("'%s' could not be run", cmd0), domain = NA)
-msgid "'%s' could not be run"
-msgstr "'%s' nie mogło zostać uruchomione"
+#. R/get.R: gettextf("value for %s not found", sQuote(x))
+#: R/get.R:0
+msgid "value for %s not found"
+msgstr "wartość dla %s nie została znaleziona"
 
-# src/library/base/R/windows/system.R: 112
-# stop(gettextf("'%s' execution failed with error code %d",
-#                                cmd0, res), domain = NA)
-# src/library/base/R/windows/system.R: 117
-# warning(gettextf("'%s' execution failed with error code %d",
-#                                   cmd0, res), domain = NA)
-msgid "'%s' execution failed with error code %d"
-msgstr "wykonywanie '%s' nie powiodło się zwracając kod błędu %d"
+#. R/library.R: gettextf("version %s of %s masked by %s in %s", versions[which(sufficient)[1L]],     sQuote(pkg), current, lib.loc[iV[!sufficient][1L]])
+#: R/library.R:0
+msgid "version %s of %s masked by %s in %s"
+msgstr "wersja %s pakietu %s zakryta przez wersję %s w %s"
 
-# src/library/tools/R/check.R: 3871
-# stop("-l option without value", call. = FALSE)
-msgid "-l option without value"
-msgstr "opcja -l bez wartości"
+#. R/datetime.R: stop("wrong class")
+#. R/datetime.R: stop("wrong class")
+#. R/library.R: stop("wrong class")
+#. R/version.R: stop("wrong class")
+#: R/datetime.R:0 R/library.R:0 R/version.R:0
+msgid "wrong class"
+msgstr "błędna klasa"
 
-msgid "ERROR: no packages specified"
-msgstr "BŁĄD: nie określono pakietów"
+#. R/seq.R: stop("wrong sign in 'by' argument")
+#: R/seq.R:0
+msgid "wrong sign in 'by' argument"
+msgstr "błędny znak w argumencie 'by'"
 
-msgid "Removing from library"
-msgstr "Usuwanie z biblioteki"
+#. R/dataframe.R: ngettext(nrowv, "%d row in value to replace %d rows", "%d rows in value to replace %d rows")
+#: R/dataframe.R:0
+msgid "%d row in value to replace %d rows"
+msgid_plural "%d rows in value to replace %d rows"
+msgstr[0] "%d wiersz w wartości do zastąpienia %d wierszy"
+msgstr[1] "%d wiersze w wartości do zastąpienia %d wierszy"
+msgstr[2] "%d wierszy w wartości do zastąpienia %d wierszy"
 
-msgid "ERROR: cannot cd to directory"
-msgstr "BŁĄD: nie można wejść do katalogu"
+#. R/stop.R: ngettext(length(r), "%s is not TRUE", "%s are not all TRUE")
+#: R/stop.R:0
+msgid "%s is not TRUE"
+msgid_plural "%s are not all TRUE"
+msgstr[0] "zmienna %s nie ma wartości TRUE"
+msgstr[1] "nie wszystkie zmienne %s mają wartość TRUE"
+msgstr[2] "nie wszystkie zmienne %s mają wartość TRUE"
 
-msgid "ERROR: no permission to remove from directory"
-msgstr "BŁĄD: brak uprawnień aby usunąć z katalogu"
+#. R/merge.R: ngettext(sum(bad), "'by' must specify a uniquely valid column",     "'by' must specify uniquely valid columns")
+#. R/merge.R: ngettext(sum(bad), "'by' must specify a uniquely valid column",     "'by' must specify uniquely valid columns")
+#: R/merge.R:0
+msgid "'by' must specify a uniquely valid column"
+msgid_plural "'by' must specify uniquely valid columns"
+msgstr[0] "argument 'by' musi jednoznacznie określać poprawną kolumnę"
+msgstr[1] "argument 'by' musi jednoznacznie określać poprawne kolumny"
+msgstr[2] "argument 'by' musi jednoznacznie określać poprawne kolumny"
 
-# src/library/base/R/New-Internal.R: 109
-# stop(sprintf(ngettext(as.integer(sum(is.na(opts))),
-#                               "deparse option %s is not recognized",
-#                               "deparse options %s are not recognized"),
-#                      paste(sQuote(control[is.na(opts)]), collapse=", ")),
-#              call. = FALSE, domain = NA)
-msgid "deparse option %s is not recognized"
-msgid_plural "deparse options %s are not recognized"
-msgstr[0] "opcja odwrotnego parsowania %s nie jest rozpoznana"
-msgstr[1] "opcje odwrotnego parsowania %s nie są rozpoznane"
-msgstr[2] "opcje odwrotnego parsowania %s nie są rozpoznane"
+#. R/namespace.R: ngettext(length(bad), "Function found when exporting methods from the namespace %s which is not S4 generic: %s",     "Functions found when exporting methods from the namespace %s which are not S4 generic: %s")
+#: R/namespace.R:0
+msgid ""
+"Function found when exporting methods from the namespace %s which is not S4 "
+"generic: %s"
+msgid_plural ""
+"Functions found when exporting methods from the namespace %s which are not "
+"S4 generic: %s"
+msgstr[0] ""
+"Funkcja została znaleziona podczas eksportowania metod z przestrzeni nazw %s "
+"która nie jest ogólną S4: %s"
+msgstr[1] ""
+"Funkcje zostały znalezione podczas eksportowania metod z przestrzeni nazw %s "
+"która nie są ogólnymi S4: %s"
+msgstr[2] ""
+"Funkcje zostały znalezione podczas eksportowania metod z przestrzeni nazw %s "
+"która nie są ogólnymi S4: %s"
 
-# src/library/base/R/library.R: 218
-# sprintf(ngettext(length(same),
-#                                             "The following object is masked %s %s:\n\n%s\n",
-#                                             "The following objects are masked %s %s:\n\n%s\n"),
-#                                    if (i < lib.pos) "_by_" else "from",
-#                                    sQuote(sp[i]), paste(objs, collapse="\n"))
-# src/library/base/R/attach.R: 71
-# sprintf(ngettext(length(same),
-#                                             "The following object is masked %s %s:\n\n%s\n",
-#                                             "The following objects are masked %s %s:\n\n%s\n"),
-#                                    if (i < db.pos) "_by_" else "from",
-#                                    pkg, paste(objs, collapse="\n"))
-msgid "The following object is masked %s %s:\n\n%s\n"
+#. R/warnings.R: ngettext(nx, "In %s :\n extra argument %s will be disregarded",     "In %s :\n extra arguments %s will be disregarded")
+#: R/warnings.R:0
+msgid ""
+"In %s :\n"
+" extra argument %s will be disregarded"
 msgid_plural ""
-"The following objects are masked %s %s:\n"
+"In %s :\n"
+" extra arguments %s will be disregarded"
+msgstr[0] ""
+"W poleceniu '%s':\n"
+" dodatkowy argument %s zostanie odrzucony"
+msgstr[1] ""
+"W poleceniu '%s':\n"
+" dodatkowe argumenty %s zostaną odrzucone"
+msgstr[2] ""
+"W poleceniu '%s':\n"
+" dodatkowe argumenty %s zostaną odrzucone"
+
+#. R/namespace.R: ngettext(sum(notex), "S3 method %s was declared in NAMESPACE but not found",     "S3 methods %s were declared in NAMESPACE but not found")
+#: R/namespace.R:0
+msgid "S3 method %s was declared in NAMESPACE but not found"
+msgid_plural "S3 methods %s were declared in NAMESPACE but not found"
+msgstr[0] ""
+"Metoda S3 %s została zadeklarowana w pliku 'NAMESPACE', ale nie została "
+"znaleziona"
+msgstr[1] ""
+"Metody S3 %s zostały zadeklarowane w pliku 'NAMESPACE', ale nie zostały "
+"znalezione"
+msgstr[2] ""
+"Metody S3 %s zostały zadeklarowane w pliku 'NAMESPACE', ale nie zostały "
+"znalezione"
+
+#. R/attach.R: ngettext(length(same), "The following object is masked _by_ %s:\n\n%s\n",     "The following objects are masked _by_ %s:\n\n%s\n")
+#: R/attach.R:0
+msgid ""
+"The following object is masked _by_ %s:\n"
+"\n"
+"%s\n"
+msgid_plural ""
+"The following objects are masked _by_ %s:\n"
 "\n"
 "%s\n"
 msgstr[0] ""
-"Następujący obiekt został zakryty %s %s:\n"
+"Następujący obiekt został zakryty _przez_ %s:\n"
 "\n"
 "%s\n"
 msgstr[1] ""
-"Następujące obiekty zostały zakryte %s %s:\n"
+"Następujące obiekty zostały zakryte _przez_ %s:\n"
 "\n"
 "%s\n"
 msgstr[2] ""
-"Następujące obiekty zostały zakryte %s %s:\n"
+"Następujące obiekty zostały zakryte _przez_ %s:\n"
 "\n"
 "%s\n"
 
-# src/library/base/R/dataframe.R: 162
-# stop(sprintf(ngettext(nr,
-#                                   "invalid 'row.names', length %d for a data frame with %d row",
-#                                   "invalid 'row.names', length %d for a data frame with %d rows"),
-#                          length(row.names), nr), domain = NA)
-msgid "invalid 'row.names', length %d for a data frame with %d row"
-msgid_plural "invalid 'row.names', length %d for a data frame with %d rows"
-msgstr[0] "niepoprawny 'row.names', długość %d dla ramki danych z %d wierszem"
-msgstr[1] "niepoprawny 'row.names', długość %d dla ramki danych z %d wierszami"
-msgstr[2] "niepoprawny 'row.names', długość %d dla ramki danych z %d wierszami"
-
-# src/library/base/R/dataframe.R: 189
-# stop(sprintf(ngettext(length(row.names),
-#                                   "supplied %d row name for %d rows",
-#                                   "supplied %d row names for %d rows"),
-#                          length(row.names), dim(x)[[1L]]), domain = NA)
-# src/library/base/R/dataframe.R: 300
-# stop(sprintf(ngettext(length(row.names),
-#                                   "supplied %d row name for %d rows",
-#                                   "supplied %d row names for %d rows"),
-#                           length(row.names), nrows), domain = NA)
-msgid "supplied %d row name for %d rows"
-msgid_plural "supplied %d row names for %d rows"
-msgstr[0] "dostarczono %d nazwę wierszy dla %d wierszy"
-msgstr[1] "dostarczono %d nazwy wierszy dla %d wierszy"
-msgstr[2] "dostarczono %d nazw wierszy dla %d wierszy"
-
-# src/library/base/R/dataframe.R: 872
-# stop(sprintf(ngettext(N,
-#                                       "replacement has %d row, data has %d",
-#                                       "replacement has %d rows, data has %d"),
-#                              N, n), domain = NA)
-# src/library/base/R/dataframe.R: 880
-# stop(sprintf(ngettext(N,
-#                                           "replacement has %d row, data has %d",
-#                                           "replacement has %d rows, data has %d"),
-#                                  N, nrows), domain = NA)
-# src/library/base/R/dataframe.R: 1024
-# stop(sprintf(ngettext(N,
-#                                       "replacement has %d row, data has %d",
-#                                       "replacement has %d rows, data has %d"),
-#                              N, nrows), domain = NA)
-# src/library/base/R/dataframe.R: 1032
-# stop(sprintf(ngettext(N,
-#                                           "replacement has %d row, data has %d",
-#                                           "replacement has %d rows, data has %d"),
-#                                  N, nrows), domain = NA)
-# src/library/base/R/dataframe.R: 1117
-# stop(sprintf(ngettext(N,
-#                                   "replacement has %d row, data has %d",
-#                                   "replacement has %d rows, data has %d"),
-#                          N, nrows), domain = NA)
-# src/library/base/R/dataframe.R: 1125
-# stop(sprintf(ngettext(N,
-#                                       "replacement has %d row, data has %d",
-#                                       "replacement has %d rows, data has %d"),
-#                              N, nrows), domain = NA)
-msgid "replacement has %d row, data has %d"
-msgid_plural "replacement has %d rows, data has %d"
-msgstr[0] "zamiana ma %d wiersz, dane mają %d"
-msgstr[1] "zamiana ma %d wiersze, dane mają %d"
-msgstr[2] "zamiana ma %d wierszy, dane mają %d"
-
-# src/library/base/R/dataframe.R: 888
-# stop(sprintf(ngettext(m,
-#                                       "replacement has %d item, need %d",
-#                                       "replacement has %d items, need %d"),
-#                              m, n*p), domain = NA)
-msgid "replacement has %d item, need %d"
-msgid_plural "replacement has %d items, need %d"
-msgstr[0] "zamiana ma %d pozycję, potrzeba %d"
-msgstr[1] "zamiana ma %d pozycje, potrzeba %d"
-msgstr[2] "zamiana ma %d pozycji, potrzeba %d"
-
-# src/library/base/R/dataframe.R: 904
-# stop(sprintf(ngettext(N,
-#                                       "replacement element %d is a matrix/data frame of %d row, need %d",
-#                                       "replacement element %d is a matrix/data frame of %d rows, need %d"),
-#                              k, N, n),
-#                      domain = NA)
-msgid "replacement element %d is a matrix/data frame of %d row, need %d"
+#. R/attach.R: ngettext(length(same), "The following object is masked from %s:\n\n%s\n",     "The following objects are masked from %s:\n\n%s\n")
+#: R/attach.R:0
+msgid ""
+"The following object is masked from %s:\n"
+"\n"
+"%s\n"
 msgid_plural ""
-"replacement element %d is a matrix/data frame of %d rows, need %d"
+"The following objects are masked from %s:\n"
+"\n"
+"%s\n"
 msgstr[0] ""
-"element zamiany %d jest macierzą/ramką danych o %d wierszu, potrzeba %d"
+"Następujący obiekt został zakryty z %s:\n"
+"\n"
+"%s\n"
 msgstr[1] ""
-"element zamiany %d jest macierzą/ramką danych o %d wierszach, potrzeba %d"
+"Następujące obiekty zostały zakryte z %s:\n"
+"\n"
+"%s\n"
 msgstr[2] ""
-"element zamiany %d jest macierzą/ramką danych o %d wierszach, potrzeba %d"
+"Następujące obiekty zostały zakryte z %s:\n"
+"\n"
+"%s\n"
 
-# src/library/base/R/dataframe.R: 910
-# stop(sprintf(ngettext(N,
-#                                       "replacement element %d has %d row, need %d",
-#                                       "replacement element %d has %d rows, need %d"),
-#                              k, N, n), domain = NA)
-msgid "replacement element %d has %d row, need %d"
-msgid_plural "replacement element %d has %d rows, need %d"
-msgstr[0] "element zamiany %d posiada %d wiersz, potrzeba %d"
-msgstr[1] "element zamiany %d posiada %d wiersze, potrzeba %d"
-msgstr[2] "element zamiany %d posiada %d wierszy, potrzeba %d"
+#. R/warnings.R: ngettext(n, "Warning message:\n", "Warning messages:\n")
+#: R/warnings.R:0
+msgid "Warning message:\n"
+msgid_plural "Warning messages:\n"
+msgstr[0] "Komunikat ostrzegawczy:\n"
+msgstr[1] "Komunikaty ostrzegawcze:\n"
+msgstr[2] "Komunikaty ostrzegawcze:\n"
 
-# src/library/base/R/dataframe.R: 917
-# warning(sprintf(ngettext(N,
-#                                          "replacement element %d has %d row to replace %d rows",
-#                                          "replacement element %d has %d rows to replace %d rows"),
-#                                 k, N, n), domain = NA)
-msgid "replacement element %d has %d row to replace %d rows"
-msgid_plural "replacement element %d has %d rows to replace %d rows"
-msgstr[0] "element zamiany %d posiada %d wiersz do zastąpienia %d wierszy"
-msgstr[1] "element zamiany %d posiada %d wiersze do zastąpienia %d wierszy"
-msgstr[2] "element zamiany %d posiada %d wierszy do zastąpienia %d wierszy"
+#. R/namespace.R: ngettext(length(miss), "class %s is not exported by 'namespace:%s'",     "classes %s are not exported by 'namespace:%s'")
+#: R/namespace.R:0
+msgid "class %s is not exported by 'namespace:%s'"
+msgid_plural "classes %s are not exported by 'namespace:%s'"
+msgstr[0] "klasa %s nie jest wyeksportowana przez 'namespace:%s'"
+msgstr[1] "klasy %s nie są wyeksportowane przez 'namespace:%s'"
+msgstr[2] "klasy %s nie są wyeksportowane przez 'namespace:%s'"
 
-# src/library/base/R/dataframe.R: 931
-# stop(sprintf(ngettext(nrowv,
-#                                   "%d row in value to replace %d rows",
-#                                   "%d rows in value to replace %d rows"),
-#                          nrowv, n), domain = NA)
-msgid "%d row in value to replace %d rows"
-msgid_plural "%d rows in value to replace %d rows"
-msgstr[0] "%d wiersz w wartości do zastąpienia %d wierszy"
-msgstr[1] "%d wiersze w wartości do zastąpienia %d wierszy"
-msgstr[2] "%d wierszy w wartości do zastąpienia %d wierszy"
+#. R/dataframe.R: ngettext(n, "data frame with 0 columns and %d row", "data frame with 0 columns and %d rows")
+#: R/dataframe.R:0
+msgid "data frame with 0 columns and %d row"
+msgid_plural "data frame with 0 columns and %d rows"
+msgstr[0] "ramka danych z zerową liczbą kolumn oraz %d wierszem"
+msgstr[1] "ramka danych z zerową liczbą kolumn oraz %d wierszami"
+msgstr[2] "ramka danych z zerową liczbą kolumn oraz %d wierszami"
 
-# src/library/base/R/dataframe.R: 937
-# warning(sprintf(ngettext(nrowv,
-#                                  "replacement data has %d row to replace %d rows",
-#                                  "replacement data has %d rows to replace %d rows"),
-#                         nrowv, n), domain = NA)
-msgid "replacement data has %d row to replace %d rows"
-msgid_plural "replacement data has %d rows to replace %d rows"
-msgstr[0] "zamienne dane posiadają %d wiersz do zastąpienia %d wierszy"
-msgstr[1] "zamienne dane posiadają %d wiersze do zastąpienia %d wierszy"
-msgstr[2] "zamienne dane posiadają %d wierszy do zastąpienia %d wierszy"
+#. R/New-Internal.R: ngettext(as.integer(sum(is.na(opts))), "deparse option %s is not recognized",     "deparse options %s are not recognized")
+#: R/New-Internal.R:0
+msgid "deparse option %s is not recognized"
+msgid_plural "deparse options %s are not recognized"
+msgstr[0] "opcja odwrotnego parsowania %s nie jest rozpoznana"
+msgstr[1] "opcje odwrotnego parsowania %s nie są rozpoznane"
+msgstr[2] "opcje odwrotnego parsowania %s nie są rozpoznane"
 
-# src/library/base/R/dataframe.R: 945
-# warning(sprintf(ngettext(ncolv,
-#                                  "provided %d variable to replace %d variables",
-#                                  "provided %d variables to replace %d variables"),
-#                         ncolv, p), domain = NA)
-msgid "provided %d variable to replace %d variables"
-msgid_plural "provided %d variables to replace %d variables"
-msgstr[0] "dostarczono %d zmienną do zastąpienia %d zmiennych"
-msgstr[1] "dostarczono %d zmienne do zastąpienia %d zmiennych"
-msgstr[2] "dostarczono %d zmiennych do zastąpienia %d zmiennych"
+#. R/dataframe.R: ngettext(nr, "invalid 'row.names', length %d for a data frame with %d row",     "invalid 'row.names', length %d for a data frame with %d rows")
+#: R/dataframe.R:0
+msgid "invalid 'row.names', length %d for a data frame with %d row"
+msgid_plural "invalid 'row.names', length %d for a data frame with %d rows"
+msgstr[0] "niepoprawny 'row.names', długość %d dla ramki danych z %d wierszem"
+msgstr[1] "niepoprawny 'row.names', długość %d dla ramki danych z %d wierszami"
+msgstr[2] "niepoprawny 'row.names', długość %d dla ramki danych z %d wierszami"
 
-# src/library/base/R/library.R: 419
-# sprintf(ngettext(length(nopkgs),
-#                                     "library %s contains no packages",
-#                                     "libraries %s contain no packages"),
-#                            pkglist)
+#. R/library.R: ngettext(length(nopkgs), "library %s contains no packages", "libraries %s contain no packages")
+#: R/library.R:0
 msgid "library %s contains no packages"
 msgid_plural "libraries %s contain no packages"
 msgstr[0] "biblioteka %s nie zawiera pakietów"
 msgstr[1] "biblioteki %s nie zawierają pakietów"
 msgstr[2] "biblioteki %s nie zawierają pakietów"
 
-# src/library/base/R/library.R: 643
-# warning(sprintf(ngettext(as.integer(sum(m)),
-#                                          "package %s is not loaded",
-#                                          "packages %s are not loaded"),
-#                                 paste(package[m], collapse=", ")),
-#                         domain = NA)
+#. R/namespace.R: ngettext(length(miss), "object %s is not exported by 'namespace:%s'",     "objects %s are not exported by 'namespace:%s'")
+#: R/namespace.R:0
+msgid "object %s is not exported by 'namespace:%s'"
+msgid_plural "objects %s are not exported by 'namespace:%s'"
+msgstr[0] "obiekt %s nie jest eksportowany przez 'namespace:%s'"
+msgstr[1] "obiekty %s nie są eksportowane przez 'namespace:%s'"
+msgstr[2] "obiekty %s nie są eksportowane przez 'namespace:%s'"
+
+#. R/load.R: ngettext(n, "object %s not found", "objects %s not found")
+#: R/load.R:0
+msgid "object %s not found"
+msgid_plural "objects %s not found"
+msgstr[0] "nie znaleziono obiektu %s"
+msgstr[1] "nie znaleziono obiektów %s"
+msgstr[2] "nie znaleziono obiektów %s"
+
+#. R/library.R: ngettext(as.integer(sum(m)), "package %s is not loaded", "packages %s are not loaded")
+#: R/library.R:0
 msgid "package %s is not loaded"
 msgid_plural "packages %s are not loaded"
 msgstr[0] "pakiet %s nie jest załadowany"
 msgstr[1] "pakiety %s nie są załadowane"
 msgstr[2] "pakiety %s nie są załadowane"
 
-# src/library/base/R/library.R: 759
-# stop(ngettext(length(bad),
-#                               "there is no package called",
-#                               "there are no packages called"), " ",
-#                      paste(sQuote(bad), collapse = ", "), domain = NA)
+#. R/namespace.R: ngettext(sum(ex), "previous export '%s' is being replaced", "previous exports '%s' are being replaced")
+#: R/namespace.R:0
+msgid "previous export '%s' is being replaced"
+msgid_plural "previous exports '%s' are being replaced"
+msgstr[0] "poprzedni eksport '%s' jest zastępowany"
+msgstr[1] "poprzednie eksporty '%s' są zastępowane"
+msgstr[2] "poprzednie eksporty '%s' są zastępowane"
+
+#. R/dataframe.R: ngettext(ncolv, "provided %d variable to replace %d variables",     "provided %d variables to replace %d variables")
+#: R/dataframe.R:0
+msgid "provided %d variable to replace %d variables"
+msgid_plural "provided %d variables to replace %d variables"
+msgstr[0] "dostarczono %d zmienną do zastąpienia %d zmiennych"
+msgstr[1] "dostarczono %d zmienne do zastąpienia %d zmiennych"
+msgstr[2] "dostarczono %d zmiennych do zastąpienia %d zmiennych"
+
+#. R/dataframe.R: ngettext(nrowv, "replacement data has %d row to replace %d rows",     "replacement data has %d rows to replace %d rows")
+#: R/dataframe.R:0
+msgid "replacement data has %d row to replace %d rows"
+msgid_plural "replacement data has %d rows to replace %d rows"
+msgstr[0] "zamienne dane posiadają %d wiersz do zastąpienia %d wierszy"
+msgstr[1] "zamienne dane posiadają %d wiersze do zastąpienia %d wierszy"
+msgstr[2] "zamienne dane posiadają %d wierszy do zastąpienia %d wierszy"
+
+#. R/dataframe.R: ngettext(N, "replacement element %d has %d row to replace %d rows",     "replacement element %d has %d rows to replace %d rows")
+#: R/dataframe.R:0
+msgid "replacement element %d has %d row to replace %d rows"
+msgid_plural "replacement element %d has %d rows to replace %d rows"
+msgstr[0] "element zamiany %d posiada %d wiersz do zastąpienia %d wierszy"
+msgstr[1] "element zamiany %d posiada %d wiersze do zastąpienia %d wierszy"
+msgstr[2] "element zamiany %d posiada %d wierszy do zastąpienia %d wierszy"
+
+#. R/dataframe.R: ngettext(N, "replacement element %d has %d row, need %d", "replacement element %d has %d rows, need %d")
+#: R/dataframe.R:0
+msgid "replacement element %d has %d row, need %d"
+msgid_plural "replacement element %d has %d rows, need %d"
+msgstr[0] "element zamiany %d posiada %d wiersz, potrzeba %d"
+msgstr[1] "element zamiany %d posiada %d wiersze, potrzeba %d"
+msgstr[2] "element zamiany %d posiada %d wierszy, potrzeba %d"
+
+#. R/dataframe.R: ngettext(N, "replacement element %d is a matrix/data frame of %d row, need %d",     "replacement element %d is a matrix/data frame of %d rows, need %d")
+#: R/dataframe.R:0
+msgid "replacement element %d is a matrix/data frame of %d row, need %d"
+msgid_plural ""
+"replacement element %d is a matrix/data frame of %d rows, need %d"
+msgstr[0] ""
+"element zamiany %d jest macierzą/ramką danych o %d wierszu, potrzeba %d"
+msgstr[1] ""
+"element zamiany %d jest macierzą/ramką danych o %d wierszach, potrzeba %d"
+msgstr[2] ""
+"element zamiany %d jest macierzą/ramką danych o %d wierszach, potrzeba %d"
+
+#. R/dataframe.R: ngettext(m, "replacement has %d item, need %d", "replacement has %d items, need %d")
+#: R/dataframe.R:0
+msgid "replacement has %d item, need %d"
+msgid_plural "replacement has %d items, need %d"
+msgstr[0] "zamiana ma %d pozycję, potrzeba %d"
+msgstr[1] "zamiana ma %d pozycje, potrzeba %d"
+msgstr[2] "zamiana ma %d pozycji, potrzeba %d"
+
+#. R/dataframe.R: ngettext(N, "replacement has %d row, data has %d", "replacement has %d rows, data has %d")
+#. R/dataframe.R: ngettext(N, "replacement has %d row, data has %d", "replacement has %d rows, data has %d")
+#. R/dataframe.R: ngettext(N, "replacement has %d row, data has %d", "replacement has %d rows, data has %d")
+#. R/dataframe.R: ngettext(N, "replacement has %d row, data has %d", "replacement has %d rows, data has %d")
+#. R/dataframe.R: ngettext(N, "replacement has %d row, data has %d", "replacement has %d rows, data has %d")
+#. R/dataframe.R: ngettext(N, "replacement has %d row, data has %d", "replacement has %d rows, data has %d")
+#: R/dataframe.R:0
+msgid "replacement has %d row, data has %d"
+msgid_plural "replacement has %d rows, data has %d"
+msgstr[0] "zamiana ma %d wiersz, dane mają %d"
+msgstr[1] "zamiana ma %d wiersze, dane mają %d"
+msgstr[2] "zamiana ma %d wierszy, dane mają %d"
+
+#. R/dataframe.R: ngettext(length(row.names), "supplied %d row name for %d rows",     "supplied %d row names for %d rows")
+#: R/dataframe.R:0
+msgid "supplied %d row name for %d rows"
+msgid_plural "supplied %d row names for %d rows"
+msgstr[0] "dostarczono %d nazwę wierszy dla %d wierszy"
+msgstr[1] "dostarczono %d nazwy wierszy dla %d wierszy"
+msgstr[2] "dostarczono %d nazw wierszy dla %d wierszy"
+
+#. R/library.R: ngettext(length(bad), "there is no package called", "there are no packages called")
+#: R/library.R:0
 msgid "there is no package called"
 msgid_plural "there are no packages called"
 msgstr[0] "nie ma pakietu o nazwie"
 msgstr[1] "nie ma pakietów o nazwach"
 msgstr[2] "nie ma pakietów o nazwach"
 
-# src/library/methods/R/fixPrevious.R: 32
-# warning(gettextf("object %s not found",
-#                              sQuote(what)),
-#                     domain = NA)
-# src/library/base/R/load.R: 84
-# stop(sprintf(ngettext(n,
-#                                       "object %s not found",
-#                                       "objects %s not found"
-#                                       ),
-#                              paste(sQuote(list[!ok]), collapse = ", ")
-#                              ), domain = NA)
-msgid "object %s not found"
-msgid_plural "objects %s not found"
-msgstr[0] "nie znaleziono obiektu %s"
-msgstr[1] "nie znaleziono obiektów %s"
-msgstr[2] "nie znaleziono obiektów %s"
+#~ msgid "%s"
+#~ msgstr "%s"
 
-# src/library/base/R/merge.R: 40
-# stop(ngettext(sum(bad),
-#                               "'by' must specify a uniquely valid column",
-#                               "'by' must specify uniquely valid columns"),
-#                      domain = NA)
-# src/library/base/R/merge.R: 53
-# stop(ngettext(sum(bad),
-#                           "'by' must specify a uniquely valid column",
-#                           "'by' must specify uniquely valid columns"),
-#                  domain = NA)
-msgid "'by' must specify a uniquely valid column"
-msgid_plural "'by' must specify uniquely valid columns"
-msgstr[0] "argument 'by' musi jednoznacznie określać poprawną kolumnę"
-msgstr[1] "argument 'by' musi jednoznacznie określać poprawne kolumny"
-msgstr[2] "argument 'by' musi jednoznacznie określać poprawne kolumny"
+#~ msgid ","
+#~ msgstr ","
 
-# src/library/base/R/namespace.R: 553
-# ngettext(length(bad),
-#                                      "Function found when exporting methods from the namespace %s which is not S4 generic: %s",
-#                                      "Functions found when exporting methods from the namespace %s which are not S4 generic: %s", domain = "R-base")
-msgid "Function found when exporting methods from the namespace %s which is not S4 generic: %s"
-msgid_plural ""
-"Functions found when exporting methods from the namespace %s which are not "
-"S4 generic: %s"
-msgstr[0] ""
-"Funkcja została znaleziona podczas eksportowania metod z przestrzeni nazw %s "
-"która nie jest ogólną S4: %s"
-msgstr[1] ""
-"Funkcje zostały znalezione podczas eksportowania metod z przestrzeni nazw %s "
-"która nie są ogólnymi S4: %s"
-msgstr[2] ""
-"Funkcje zostały znalezione podczas eksportowania metod z przestrzeni nazw %s "
-"która nie są ogólnymi S4: %s"
+#~ msgid "FUN"
+#~ msgstr "FUN"
 
-# src/library/base/R/namespace.R: 978
-# stop(sprintf(ngettext(length(miss),
-#                                   "class %s is not exported by 'namespace:%s'",
-#                                   "classes %s are not exported by 'namespace:%s'"),
-#                          paste(paste0('"', miss, '"'), collapse = ", "),
-#                          getNamespaceName(expenv)),
-#                  call. = FALSE, domain = NA)
-msgid "class %s is not exported by 'namespace:%s'"
-msgid_plural "classes %s are not exported by 'namespace:%s'"
-msgstr[0] "klasa %s nie jest wyeksportowana przez 'namespace:%s'"
-msgstr[1] "klasy %s nie są wyeksportowane przez 'namespace:%s'"
-msgstr[2] "klasy %s nie są wyeksportowane przez 'namespace:%s'"
+#~ msgid "according to the DESCRIPTION file it is"
+#~ msgstr "zgodnie z opisem w pliku 'DESCRIPTION' jest to"
 
-# src/library/base/R/namespace.R: 985
-# stop(sprintf(ngettext(length(miss),
-#                                   "object %s is not exported by 'namespace:%s'",
-#                                   "objects %s are not exported by 'namespace:%s'"),
-#                          paste(sQuote(miss), collapse = ", "),
-#                          getNamespaceName(expenv)),
-#                  call. = FALSE, domain = NA)
-msgid "object %s is not exported by 'namespace:%s'"
-msgid_plural "objects %s are not exported by 'namespace:%s'"
-msgstr[0] "obiekt %s nie jest eksportowany przez 'namespace:%s'"
-msgstr[1] "obiekty %s nie są eksportowane przez 'namespace:%s'"
-msgstr[2] "obiekty %s nie są eksportowane przez 'namespace:%s'"
+#~ msgid "package %s has a license that you need to accept:"
+#~ msgstr "pakiet %s posiada licencję, którą musisz zaakceptować:"
 
-# src/library/base/R/namespace.R: 1013
-# warning(sprintf(ngettext(sum(ex),
-#                                          "previous export '%s' is being replaced",
-#                                          "previous exports '%s' are being replaced"),
-#                                 paste(sQuote(expnames[ex]), collapse = ", ")),
-#                         call. = FALSE, domain = NA)
-msgid "previous export '%s' is being replaced"
-msgid_plural "previous exports '%s' are being replaced"
-msgstr[0] "poprzedni eksport '%s' jest zastępowany"
-msgstr[1] "poprzednie eksporty '%s' są zastępowane"
-msgstr[2] "poprzednie eksporty '%s' są zastępowane"
+#~ msgid "'vec' contains NAs"
+#~ msgstr "argument 'vec' zawiera wartości NA"
 
-# src/library/base/R/namespace.R: 1408
-# warning(sprintf(ngettext(sum(notex),
-#                                  "S3 method %s was declared in NAMESPACE but not found",
-#                                  "S3 methods %s were declared in NAMESPACE but not found"),
-#                         paste(sQuote(info[notex, 3]), collapse = ", ")),
-#                 call. = FALSE, domain = NA)
-msgid "S3 method %s was declared in NAMESPACE but not found"
-msgid_plural "S3 methods %s were declared in NAMESPACE but not found"
-msgstr[0] ""
-"Metoda S3 %s została zadeklarowana w pliku 'NAMESPACE', ale nie została "
-"znaleziona"
-msgstr[1] ""
-"Metody S3 %s zostały zadeklarowane w pliku 'NAMESPACE', ale nie zostały "
-"znalezione"
-msgstr[2] ""
-"Metody S3 %s zostały zadeklarowane w pliku 'NAMESPACE', ale nie zostały "
-"znalezione"
+#~ msgid "method = \"radix\" is only for integer 'x'"
+#~ msgstr "'method=\"radix\"' jest tylko dla liczb całkowitych 'x'"
 
-# src/library/graphics/R/mosaicplot.R: 184
-# warning(sprintf(ngettext(length(list(...)),
-#                                  "extra argument %s will be disregarded",
-#                                  "extra arguments %s will be disregarded"),
-#                          paste(sQuote(names(list(...))), collapse = ", ")),
-#                 domain = NA)
-# src/library/stats/R/diffinv.R: 81
-# warning(sprintf(ngettext(na,
-#                                  "extra argument %s will be disregarded",
-#                                  "extra arguments %s will be disregarded"),
-#                         paste(sQuote(names(list(...))), collapse = ", ")),
-# 		domain = NA)
-# src/library/base/R/seq.R: 46
-# warning(sprintf(ngettext(length(list(...)),
-#                                  "extra argument %s will be disregarded",
-#                                  "extra arguments %s will be disregarded"),
-# 			 paste(sQuote(names(list(...))), collapse = ", ")),
-# 		domain = NA)
-# src/library/base/R/qr.R: 224
-# warning(sprintf(ngettext(length(list(...)),
-# 				 "extra argument %s will be disregarded",
-# 				 "extra arguments %s will be disregarded"),
-# 			 paste(sQuote(names(list(...))), collapse = ", ")),
-# 		domain = NA)
-msgid "extra argument %s will be disregarded"
-msgid_plural "extra arguments %s will be disregarded"
-msgstr[0] "dodatkowy argument %s zostanie odrzucony"
-msgstr[1] "dodatkowe argumenty %s zostaną odrzucone"
-msgstr[2] "dodatkowe argumenty %s zostaną odrzucone"
-
-# src/library/base/R/stop.R: 44
-# stop(sprintf(ngettext(length(r),
-#                                   "%s is not TRUE",
-#                                   "%s are not all TRUE"),
-#                          ch), call. = FALSE, domain = NA)
-msgid "%s is not TRUE"
-msgid_plural "%s are not all TRUE"
-msgstr[0] "zmienna %s nie ma wartości TRUE"
-msgstr[1] "nie wszystkie zmienne %s mają wartość TRUE"
-msgstr[2] "nie wszystkie zmienne %s mają wartość TRUE"
+#~ msgid "cannot be unloaded."
+#~ msgstr "nie może być zwolniony"
 
-msgid "Warning message:\n"
-msgid_plural "Warning messages:\n"
-msgstr[0] "Komunikat ostrzegawczy:\n"
-msgstr[1] "Komunikaty ostrzegawcze:\n"
-msgstr[2] "Komunikaty ostrzegawcze:\n"
+#~ msgid "version"
+#~ msgstr "wersja"
diff --git a/src/library/base/po/R-pt_BR.po b/src/library/base/po/R-pt_BR.po
index cd656f1..463d35a 100644
--- a/src/library/base/po/R-pt_BR.po
+++ b/src/library/base/po/R-pt_BR.po
@@ -6,7 +6,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: R 2.3.0\n"
 "Report-Msgid-Bugs-To: bugs.r-project.org\n"
-"POT-Creation-Date: 2014-02-13 14:10\n"
+"POT-Creation-Date: 2016-04-01 09:50\n"
 "PO-Revision-Date: 2011-03-26 08:54-0300\n"
 "Last-Translator: Fernando Henrique <pessoal at fernandohrosa.com.br>\n"
 "Language-Team: http://www.feferraz.net/br/P/Projeto_Traducao_R_Portugues\n"
@@ -47,6 +47,9 @@ msgstr "valores infinitos ou faltantes em 'x'"
 msgid "a dimension is zero"
 msgstr ""
 
+msgid "\"hexNumeric\" and \"digits17\" are mutually exclusive"
+msgstr ""
+
 msgid "second argument must be a list"
 msgstr "segundo argumento deve ser uma lista"
 
@@ -229,6 +232,11 @@ msgstr "'dimnames' inválidos para um data frame"
 msgid "cannot coerce class \"%s\" to a data.frame"
 msgstr "não é possível fazer coerção de classe \"%s\" para um data.frame"
 
+msgid ""
+"'row.names' is not a character vector of length %d -- omitting it. Will be "
+"an error!"
+msgstr ""
+
 #, fuzzy
 msgid "options(\"stringsAsFactors\") not set to TRUE or FALSE"
 msgstr "options('stringsAsFactors') não definido como TRUE ou FALSE"
@@ -322,7 +330,7 @@ msgid "only a single element should be replaced"
 msgstr "somente um único elemento deve ser substituido"
 
 #, fuzzy
-msgid "Name partially matched in data frame"
+msgid "Partial match of '%s' to '%s' in data frame"
 msgstr "variável não numérica no data frame:"
 
 msgid "names do not match previous names"
@@ -335,16 +343,14 @@ msgid "invalid list argument: all variables should have the same length"
 msgstr ""
 "argumento lista inválido: todas as variáveis devem ter o mesmo comprimento"
 
-msgid "data frame with 0 columns and %d rows"
-msgstr "data frame com 0 colunas e %d  linhas"
-
 msgid "<0 rows> (or 0-length row.names)"
 msgstr "<0 linhas> (ou row.names de comprimento 0)"
 
 msgid "non-numeric variable in data frame:"
 msgstr "variável não numérica no data frame:"
 
-msgid "only defined for equally-sized data frames"
+#, fuzzy
+msgid "%s only defined for equally-sized data frames"
 msgstr "definido somente para data frames com tamanhos iguais"
 
 msgid "list of length %d not meaningful"
@@ -532,6 +538,15 @@ msgstr ""
 "As linhas que não estão no padrão começam com:\n"
 "%s"
 
+msgid "failed to load the methods package for debugging by signature"
+msgstr ""
+
+msgid "failed to load methods package for undebugging by signature"
+msgstr ""
+
+msgid "failed to load methods package for handling signature"
+msgstr ""
+
 msgid "'x' must be a square matrix"
 msgstr "'x' deve ser uma matriz quadrada"
 
@@ -599,7 +614,8 @@ msgstr "rótulos inválidos; comprimento %d deve ser 1 ou %d"
 msgid "number of levels differs"
 msgstr "número de níveis difere"
 
-msgid "not meaningful for factors"
+#, fuzzy
+msgid "%s not meaningful for factors"
 msgstr "não faz sentido para fatores"
 
 msgid "level sets of factors are different"
@@ -658,13 +674,15 @@ msgstr "argumento 'name' inválido"
 msgid "invalid 'time' argument"
 msgstr "argumento 'name' inválido"
 
-msgid "'vec' contains NAs"
-msgstr "'vec' contem NAs"
-
-msgid "'vec' must be sorted non-decreasingly"
+#, fuzzy
+msgid "'vec' must be sorted non-decreasingly and not contain NAs"
 msgstr "'vec' deve ser ordenado de forma não-decrescente"
 
 #, fuzzy
+msgid "'fun' is not a function"
+msgstr "manipulador deve ser uma função"
+
+#, fuzzy
 msgid "using the first element of 'value' of type \"expression\""
 msgstr "usando o primeiro elemento de 'value' da expressão de tipo"
 
@@ -697,6 +715,13 @@ msgstr "'zero.print' tem comprimento > 1"
 msgid "'zero.print' must be character, logical or NULL"
 msgstr "'zero.print' deve ser caractere, lógico ou NULL"
 
+msgid "'big.mark' and 'decimal.mark' are both '%s', which could be confusing"
+msgstr ""
+
+#, fuzzy
+msgid "'input.d.mark' has no characters"
+msgstr "'input' e 'target' devem ser vetores de caracteres"
+
 msgid "'subset' must be logical"
 msgstr "'subset' deve ser lógico"
 
@@ -795,13 +820,19 @@ msgstr ""
 "Pacote '%s' tem uma licença que você precisa aceitar depois de visualizá-la"
 
 #, fuzzy
-msgid ""
-"package %s has a license that you need to accept:\n"
-"according to the DESCRIPTION file it is"
+msgid "package %s has a license that you need to accept:"
+msgstr ""
+"Pacote '%s' tem uma licença que você precisa aceitar depois de visualizá-la"
+
+#, fuzzy
+msgid "according to the DESCRIPTION file it is"
 msgstr ""
 "Pacote '%s' tem uma licença que você precisa aceitar:\n"
 "de acordo com o arquivo DESCRIPTION"
 
+msgid "%s"
+msgstr ""
+
 #, fuzzy
 msgid "license for package %s not accepted"
 msgstr "Licença para o pacote '%s' não foi aceita"
@@ -832,6 +863,10 @@ msgid "%s not found on search path, using pos = 2"
 msgstr "'%s' não encontrado no caminho de procura, usando pos = 2"
 
 #, fuzzy
+msgid "Package %s version %s cannot be unloaded"
+msgstr "pacote %s não está carregado"
+
+#, fuzzy
 msgid "package or namespace load failed for %s"
 msgstr "carregamento do pacote/espaço de nomes falhou para '%s'"
 
@@ -937,18 +972,13 @@ msgstr "Documentação para o pacote '%s'"
 msgid "package %s required by %s could not be found"
 msgstr "pacote '%s' exigido por '%s' não pôde ser encontrado"
 
-#, fuzzy
-msgid "package %s %s was found, but %s %s is required by %s"
-msgstr "pacote '%s' %s foi encontrado, mas %s %s é exigido por '%s'"
+msgid "version %s of %s masked by %s in %s"
+msgstr ""
 
 #, fuzzy
 msgid "package %s could not be loaded"
 msgstr "pacote '%s' não pôde ser carregado"
 
-#, fuzzy
-msgid "package %s %s is loaded, but %s %s is required by %s"
-msgstr "pacote '%s' %s está carregado, mas %s %s é exigido por '%s'"
-
 msgid "empty (zero-byte) input file"
 msgstr ""
 
@@ -1002,6 +1032,15 @@ msgstr "argumento 'category' inválido"
 msgid "must specify names of formal arguments for 'vectorize'"
 msgstr "nomes de argumentos formais devem ser especificados para vetorizar"
 
+msgid "FUN"
+msgstr ""
+
+msgid "may not have argument(s) named"
+msgstr ""
+
+msgid ","
+msgstr ","
+
 msgid "'arg' must be NULL or a character vector"
 msgstr "'arg' deve ser NULL ou um vetor caractere"
 
@@ -1061,9 +1100,15 @@ msgstr "'by' deve ser compatível com o número de colunas"
 msgid "'by' must specify one or more columns as numbers, names or logical"
 msgstr "'by' deve especificar coluna(s) como números, nomes ou lógico"
 
+msgid "long vectors are not supported"
+msgstr ""
+
 msgid "'by.x' and 'by.y' specify different numbers of columns"
 msgstr "'by.x' e 'by.y' especificam números de colunas diferentes"
 
+msgid "'incomparables' is supported only for merging on a single column"
+msgstr ""
+
 msgid "additional arguments ignored in message()"
 msgstr "argumentos adicionais ignorados em message()"
 
@@ -1202,6 +1247,10 @@ msgid "found methods to import for function %s but not the generic itself"
 msgstr ""
 "métodos encontrados para importar para função %s mas não o genérico em si"
 
+#, fuzzy
+msgid "replacing previous import %s by %s when loading %s"
+msgstr "substituindo importação %s quando carregando %s"
+
 msgid "No methods found in \"%s\" for requests: %s"
 msgstr ""
 
@@ -1209,8 +1258,8 @@ msgid "requested methods not found in environment/package %s: %s"
 msgstr "métodos requeridos não encontrados no ambiente/pacote %s: %s"
 
 msgid ""
-"No generic function found corresponding to requested imported methods for "
-"\"%s\" from package \"%s\" (malformed exports?)"
+"No generic function %s found corresponding to requested imported methods "
+"from package %s when loading %s (malformed exports?)"
 msgstr ""
 
 #, fuzzy
@@ -1378,6 +1427,10 @@ msgstr "'length' deve ser um número não negativo"
 msgid "too many arguments"
 msgstr "muitos argumentos"
 
+#, fuzzy
+msgid "invalid 'compress' argument:"
+msgstr "argumento 'name' inválido"
+
 msgid "'compress' is ignored unless 'file' is a file name"
 msgstr ""
 
@@ -1415,6 +1468,9 @@ msgstr ""
 "'decreasing' deve ser um vetor lógico de comprimento 1.\n"
 "Sua intenção era definir 'partial'?"
 
+msgid "'partial' sorting not supported by radix method"
+msgstr ""
+
 msgid "'index.return' only for non-factors"
 msgstr "'index.return' somente para não fatores"
 
@@ -1445,10 +1501,6 @@ msgid "method = \"quick\" is only for numeric 'x'"
 msgstr "method=\"quick\" somente para 'x' numérico"
 
 #, fuzzy
-msgid "method = \"radix\" is only for integer 'x'"
-msgstr "method=\"radix\" somente para 'x' inteiro"
-
-#, fuzzy
 msgid "'local' must be TRUE, FALSE or an environment"
 msgstr "'wait' deve ser TRUE ou FALSE"
 
@@ -1480,6 +1532,10 @@ msgstr "'%s' não é um arquivo existente"
 msgid "Timestamp of %s has changed"
 msgstr "Carimbo de hora '"
 
+#, fuzzy
+msgid "'x' and 'to' must refer to same file"
+msgstr "'x' e 'y' devem ter o mesmo comprimento"
+
 msgid "additional arguments ignored in stop()"
 msgstr "argumentos adicionais ignorados em stop()"
 
@@ -1498,9 +1554,6 @@ msgstr "valores incorretos de 'indent' e 'width'"
 msgid "probably wrong encoding in names(.) of column"
 msgstr "provavelmente codificação errada no names(.) da coluna"
 
-msgid ","
-msgstr ","
-
 msgid "STATS is longer than the extent of 'dim(x)[MARGIN]'"
 msgstr "STATS é maior que o comprimento de 'dim(x)[MARGIN]'"
 
@@ -1548,6 +1601,10 @@ msgstr "'to' deve ter comprimento 1"
 msgid "arguments must have same length"
 msgstr "argumentos devem ter o mesmo comprimento"
 
+#, fuzzy
+msgid "total number of levels >= 2^31"
+msgstr "número de níveis difere"
+
 msgid "handler must be a function"
 msgstr "manipulador deve ser uma função"
 
@@ -1581,9 +1638,6 @@ msgstr "Nenhum rastreamento disponível"
 msgid "invalid version specification %s"
 msgstr "especificação de versão inválida"
 
-msgid "wrong argument"
-msgstr "argumento errado"
-
 #, fuzzy
 msgid "invalid 'value'"
 msgstr "valor inválido"
@@ -1688,11 +1742,22 @@ msgstr[0] "opção de deparse %s não é reconhecida"
 msgstr[1] "opções de deparse %s não são reconhecidas"
 
 msgid ""
-"The following object is masked %s %s:\n"
+"The following object is masked _by_ %s:\n"
 "\n"
 "%s\n"
 msgid_plural ""
-"The following objects are masked %s %s:\n"
+"The following objects are masked _by_ %s:\n"
+"\n"
+"%s\n"
+msgstr[0] ""
+msgstr[1] ""
+
+msgid ""
+"The following object is masked from %s:\n"
+"\n"
+"%s\n"
+msgid_plural ""
+"The following objects are masked from %s:\n"
 "\n"
 "%s\n"
 msgstr[0] ""
@@ -1765,6 +1830,12 @@ msgid_plural "provided %d variables to replace %d variables"
 msgstr[0] "especificadas %d variáveis para substituir %d variáveis"
 msgstr[1] "especificadas %d variáveis para substituir %d variáveis"
 
+#, fuzzy
+msgid "data frame with 0 columns and %d row"
+msgid_plural "data frame with 0 columns and %d rows"
+msgstr[0] "data frame com 0 colunas e %d  linhas"
+msgstr[1] "data frame com 0 colunas e %d  linhas"
+
 msgid "library %s contains no packages"
 msgid_plural "libraries %s contain no packages"
 msgstr[0] "biblioteca %s não contem pacotes"
@@ -1821,12 +1892,6 @@ msgstr[0] "método S3 %s foi declarado no NAMESPACE mas não encontrado"
 msgstr[1] "métodos S3 %s foram declarados no NAMESPACE mas não encontrados"
 
 #, fuzzy
-msgid "extra argument %s will be disregarded"
-msgid_plural "extra arguments %s will be disregarded"
-msgstr[0] "argumento 'drop' será ignorado"
-msgstr[1] "argumento 'drop' será ignorado"
-
-#, fuzzy
 msgid "%s is not TRUE"
 msgid_plural "%s are not all TRUE"
 msgstr[0] "T usado ao invés de TRUE"
@@ -1837,6 +1902,42 @@ msgid_plural "Warning messages:\n"
 msgstr[0] "Mensagem de aviso:\n"
 msgstr[1] "Mensagens de aviso:\n"
 
+#, fuzzy
+msgid ""
+"In %s :\n"
+" extra argument %s will be disregarded"
+msgid_plural ""
+"In %s :\n"
+" extra arguments %s will be disregarded"
+msgstr[0] "argumento 'drop' será ignorado"
+msgstr[1] "argumento 'drop' será ignorado"
+
+#~ msgid "'vec' contains NAs"
+#~ msgstr "'vec' contem NAs"
+
+#, fuzzy
+#~ msgid "method = \"radix\" is only for integer 'x'"
+#~ msgstr "method=\"radix\" somente para 'x' inteiro"
+
+#, fuzzy
+#~ msgid "re-exports %s not exported by %s"
+#~ msgstr "objeto %s não foi exportado por 'namespace:%s'"
+
+#, fuzzy
+#~ msgid "cannot be unloaded."
+#~ msgstr "espaço de nomes não pode ser descarregado"
+
+#, fuzzy
+#~ msgid "package %s %s was found, but %s %s is required by %s"
+#~ msgstr "pacote '%s' %s foi encontrado, mas %s %s é exigido por '%s'"
+
+#, fuzzy
+#~ msgid "package %s %s is loaded, but %s %s is required by %s"
+#~ msgstr "pacote '%s' %s está carregado, mas %s %s é exigido por '%s'"
+
+#~ msgid "wrong argument"
+#~ msgstr "argumento errado"
+
 #~ msgid "'nu' must be 0, nrow(x) or ncol(x)"
 #~ msgstr "'nu' deve ser 0, nrow(x) ou ncol(x)"
 
diff --git a/src/library/base/po/R-ru.po b/src/library/base/po/R-ru.po
index 65bdaa2..aa7c9bb 100644
--- a/src/library/base/po/R-ru.po
+++ b/src/library/base/po/R-ru.po
@@ -9,17 +9,16 @@ msgid ""
 msgstr ""
 "Project-Id-Version: R 2.11.0\n"
 "Report-Msgid-Bugs-To: bugs.r-project.org\n"
-"POT-Creation-Date: 2014-02-13 14:10\n"
-"PO-Revision-Date: 2014-03-11 10:24-0600\n"
+"POT-Creation-Date: 2015-06-06 13:51\n"
+"PO-Revision-Date: 2016-04-05 18:17-0600\n"
 "Last-Translator: Alexey Shipunov <dactylorhiza at gmail.com>\n"
 "Language-Team: Russian\n"
-"Language: \n"
+"Language: ru\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=koi8-r\n"
 "Content-Transfer-Encoding: 8bit\n"
 "X-Poedit-Language: Russian\n"
-"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n"
-"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
+"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
 
 msgid "'%s' is defunct."
 msgstr "'%s' ������ �� ����������."
@@ -51,6 +50,9 @@ msgstr "
 msgid "a dimension is zero"
 msgstr "������� ���������"
 
+msgid "\"hexNumeric\" and \"digits17\" are mutually exclusive"
+msgstr "\"hexNumeric\" � \"digits17\" ������������"
+
 msgid "second argument must be a list"
 msgstr "������ �������� ������ ���� �������"
 
@@ -75,17 +77,14 @@ msgstr "
 msgid "target is %s, current is %s"
 msgstr "���� %s, ������� %s"
 
-#, fuzzy
 msgid "'tolerance' should be numeric"
-msgstr "'x' ������ ���� ������"
+msgstr "'tolerance' ������ ���� ������"
 
-#, fuzzy
 msgid "'scale' should be numeric or NULL"
-msgstr "'arg' ������ ���� ����� �� %s"
+msgstr "'scale' ������ ���� ������ ��� NULL"
 
-#, fuzzy
 msgid "'%s' must be logical"
-msgstr "'subset' ������ ���� ����������"
+msgstr "'%s' ������ ���� ����������"
 
 msgid "dim(X) must have a positive length"
 msgstr "dim(X) ������ ����� ������������� �����"
@@ -279,10 +278,8 @@ msgstr "
 msgid "need 0, 1, or 2 subscripts"
 msgstr "����� 0, 1, ��� 2 �������"
 
-msgid ""
-"missing values are not allowed in subscripted assignments of data frames"
-msgstr ""
-"����������� �������� �� ��������� � ��������������� ����������� ������ ������"
+msgid "missing values are not allowed in subscripted assignments of data frames"
+msgstr "����������� �������� �� ��������� � ��������������� ����������� ������ ������"
 
 msgid "non-existent rows not allowed"
 msgstr "�������������� ������ �� ���������"
@@ -297,8 +294,7 @@ msgid "duplicate subscripts for columns"
 msgstr "���������� ������� �������"
 
 msgid "only valid calls are x[[j]] <- value or x[[i,j]] <- value"
-msgstr ""
-"��������� ���� ����� ������: x[[j]] <- �������� ��� x[[i,j]] <- ��������"
+msgstr "��������� ���� ����� ������: x[[j]] <- �������� ��� x[[i,j]] <- ��������"
 
 msgid "replacing element in non-existent column: %s"
 msgstr "������ �������� � �������������� �������: %s"
@@ -306,9 +302,8 @@ msgstr "
 msgid "only a single element should be replaced"
 msgstr "������ ��������� ������� ����� ��������"
 
-#, fuzzy
-msgid "Name partially matched in data frame"
-msgstr "���������� ���������� ���������� � ������� ������:"
+msgid "Partial match of '%s' to '%s' in data frame"
+msgstr "��������� ������������ '%s' � '%s' � ������� ������"
 
 msgid "names do not match previous names"
 msgstr "����� �� ������������� ������� ������"
@@ -319,17 +314,14 @@ msgstr "
 msgid "invalid list argument: all variables should have the same length"
 msgstr "������������ �������� ������: ����� ���� ���������� ������ ���� �����"
 
-msgid "data frame with 0 columns and %d rows"
-msgstr "������� ������ � 0 ������� � %d �����"
-
 msgid "<0 rows> (or 0-length row.names)"
 msgstr "<0 �����> (��� 'row.names' ������� �����)"
 
 msgid "non-numeric variable in data frame:"
 msgstr "���������� ���������� ���������� � ������� ������:"
 
-msgid "only defined for equally-sized data frames"
-msgstr "���������� ������ ��� ������ ������ ���������� ��������"
+msgid "%s only defined for equally-sized data frames"
+msgstr "%s ���������� ������ ��� ������ ������ ���������� ��������"
 
 msgid "list of length %d not meaningful"
 msgstr "������ ����� %d �� ������"
@@ -388,10 +380,8 @@ msgstr "'to' 
 msgid "'length.out' must be of length 1"
 msgstr "'length.out' ������ ���� ������ 1"
 
-msgid ""
-"exactly two of 'to', 'by' and 'length.out' / 'along.with' must be specified"
-msgstr ""
-"����� ������� � �������� ��� ��: 'to', 'by' � 'length.out' / 'along.with'"
+msgid "exactly two of 'to', 'by' and 'length.out' / 'along.with' must be specified"
+msgstr "����� ������� � �������� ��� ��: 'to', 'by' � 'length.out' / 'along.with'"
 
 msgid "'by' must be of length 1"
 msgstr "'by' ������ ���� ������ 1"
@@ -471,9 +461,8 @@ msgstr "'from' 
 msgid "'to' must be a \"POSIXt\" object"
 msgstr "'to' ������ ���� �������� \"POSIXt\""
 
-#, fuzzy
 msgid "no Olson database found"
-msgstr "���� �� ������"
+msgstr "���� ������ Olson �� �������"
 
 msgid "'file' must be a character string or connection"
 msgstr "'file' ������ ���� ��������� ������� ��� �����������"
@@ -536,10 +525,8 @@ msgstr "
 msgid "function is not in a namespace, so cannot locate associated DLL"
 msgstr "������� �� � ������������ ����, ������� �� ���� ����� ��������� DLL"
 
-msgid ""
-"looking for DLL for native routine call, but no DLLs in namespace of call"
-msgstr ""
-"��� DLL ��� ������� ����������� ������, �� � ������������ ���� ������ ��� ���"
+msgid "looking for DLL for native routine call, but no DLLs in namespace of call"
+msgstr "��� DLL ��� ������� ����������� ������, �� � ������������ ���� ������ ��� ���"
 
 msgid "0 x 0 matrix"
 msgstr "0 x 0 �������"
@@ -556,8 +543,8 @@ msgstr "
 msgid "number of levels differs"
 msgstr "����� ������� �����������"
 
-msgid "not meaningful for factors"
-msgstr "�� ������� ��� ��������"
+msgid "%s not meaningful for factors"
+msgstr "%s �� ������� ��� ��������"
 
 msgid "level sets of factors are different"
 msgstr "��������� ������� ��� �������� ��������"
@@ -571,12 +558,8 @@ msgstr "'%s' 
 msgid "'%s' not defined for ordered factors"
 msgstr "'%s' �� ��������� ��� ������������� ��������"
 
-msgid ""
-"'%s' is only meaningful for ordered factors if all arguments have the same "
-"level sets"
-msgstr ""
-"'%s' ����� ����� ������ ��� ������������� �������� ���� ��� ��������� ����� "
-"���������� ������ ��������"
+msgid "'%s' is only meaningful for ordered factors if all arguments have the same level sets"
+msgstr "'%s' ����� ����� ������ ��� ������������� �������� ���� ��� ��������� ����� ���������� ������ ��������"
 
 msgid "no files to copy to"
 msgstr "��� ������, ����� ����������� ��"
@@ -588,9 +571,7 @@ msgid "more 'from' files than 'to' files"
 msgstr "������ ������ 'from', ��� 'to'"
 
 msgid "'recursive' will be ignored as 'to' is not a single existing directory"
-msgstr ""
-"'recursive' ����� ��������������, ��� ��� 'to' �� �������� ��������� "
-"���������"
+msgstr "'recursive' ����� ��������������, ��� ��� 'to' �� �������� ��������� ���������"
 
 msgid "file can not be copied both 'from' and 'to'"
 msgstr "���� �� ����� ���� ���������� ������������ 'from' � 'to'"
@@ -626,18 +607,16 @@ msgid "using the first element of 'value' of type \"expression\""
 msgstr "��������� ������ ������� 'value' ���� \"expression\""
 
 msgid "class of 'x' was discarded"
-msgstr ""
+msgstr "����� 'x' ������"
 
 msgid "'mode' must be \"double\" (\"real\"), \"integer\" or \"character\""
-msgstr ""
-"'mode' ������ ���� \"double\" (\"real\"), \"integer\" ��� \"character\""
+msgstr "'mode' ������ ���� \"double\" (\"real\"), \"integer\" ��� \"character\""
 
 msgid "coercing argument to \"character\" for format=\"s\""
 msgstr "���������� �������� � \"character\" ��� format=\"s\""
 
 msgid "'format' must be one of {\"f\",\"e\",\"E\",\"g\",\"G\", \"fg\", \"s\"}"
-msgstr ""
-"'format' ������ ���� ����� �� {\"f\",\"e\",\"E\",\"g\",\"G\", \"fg\", \"s\"}"
+msgstr "'format' ������ ���� ����� �� {\"f\",\"e\",\"E\",\"g\",\"G\", \"fg\", \"s\"}"
 
 msgid "'digits' reduced to %d"
 msgstr "'digits' ��������� �� %d"
@@ -648,6 +627,9 @@ msgstr "'flag' 
 msgid "corrupt data frame: columns will be truncated or padded with NAs"
 msgstr "������������ ������� ������: ������� ����� �������� ��� ��������� NA"
 
+msgid "'big.mark' and 'decimal.mark' are both '%s', which could be confusing"
+msgstr "'big.mark' � 'decimal.mark' ��� '%s', ��� ����� ���� �����������"
+
 msgid "'zero.print' has length > 1"
 msgstr "'zero.print' ����� ����� > 1"
 
@@ -696,9 +678,8 @@ msgstr "
 msgid "must have replacements for matches"
 msgstr "����� ������ ��� ������������"
 
-#, fuzzy
 msgid "No factors specified"
-msgstr "�� ���������� DLL"
+msgstr "�� ���������� �������"
 
 msgid "norm '%s' currently always uses exact = FALSE"
 msgstr "norm '%s' ������ ������ ���������� exact = FALSE"
@@ -727,10 +708,8 @@ msgstr "
 msgid "package %s is not installed for 'arch = %s'"
 msgstr "����� %s �� ���������� ��� 'arch=%s'"
 
-msgid ""
-"package %s has a license that you need to accept in an interactive session"
-msgstr ""
-"� ������ %s ���� ��������, ������� ��� ����� ������� � ������������ ������"
+msgid "package %s has a license that you need to accept in an interactive session"
+msgstr "� ������ %s ���� ��������, ������� ��� ����� ������� � ������������ ������"
 
 msgid "package %s has a license that you need to accept after viewing"
 msgstr "����� %s ����� ��������, ������� ��� ����� ������� ����� ���������"
@@ -766,6 +745,9 @@ msgstr "%s 
 msgid "%s not found on search path, using pos = 2"
 msgstr "%s �� ������ � ���� ������, ��������� pos = 2"
 
+msgid "Package %s version %s cannot be unloaded"
+msgstr "����� %s ������ %s �� ����� ���� ��������"
+
 msgid "package or namespace load failed for %s"
 msgstr "�� ������� �������� ������ ��� ������������ ���� ��� %s"
 
@@ -836,8 +818,7 @@ msgstr ""
 "����� %s ������ ������ ������ ����,\n"
 "��������� ���, ������� ������ � %s"
 
-msgid ""
-"Further information is available in the following vignettes in directory %s:"
+msgid "Further information is available in the following vignettes in directory %s:"
 msgstr "���������� ���������� �������� � ��������� ���������� �� ����� %s:"
 
 msgid "Description:"
@@ -855,15 +836,12 @@ msgstr "
 msgid "package %s required by %s could not be found"
 msgstr "����� %s, ��������� ��� %s, �� ������"
 
-msgid "package %s %s was found, but %s %s is required by %s"
-msgstr "����� %s %s ������, �� %s %s ��������� ��� %s"
+msgid "version %s of %s masked by %s in %s"
+msgstr "������ %s %s ������������� %s �� %s"
 
 msgid "package %s could not be loaded"
 msgstr "����� %s ������ ���������"
 
-msgid "package %s %s is loaded, but %s %s is required by %s"
-msgstr "����� %s %s ��������, �� %s %s ��������� ��� %s"
-
 msgid "empty (zero-byte) input file"
 msgstr "������ (���� ���) ������� ����"
 
@@ -946,8 +924,7 @@ msgid "attempt to set 'rownames' on an object with no dimensions"
 msgstr "������� ���������� ����� ����� ��� ������� ��� ���������"
 
 msgid "attempt to set 'colnames' on an object with less than two dimensions"
-msgstr ""
-"������� ���������� ����� ������� ��� ������� � ����� ��� ����� �����������"
+msgstr "������� ���������� ����� ������� ��� ������� � ����� ��� ����� �����������"
 
 msgid "argument is not numeric or logical: returning NA"
 msgstr "�������� �� �������� �������� ��� ����������: ��������� NA"
@@ -965,22 +942,22 @@ msgid "'by' must match number of columns"
 msgstr "'by' ������ ��������������� ����� �������"
 
 msgid "'by' must specify one or more columns as numbers, names or logical"
-msgstr ""
-"'by' ������ ���������� ���� ��� ����� ������� ��� �����, ����� ��� "
-"���������� ������"
+msgstr "'by' ������ ���������� ���� ��� ����� ������� ��� �����, ����� ��� ���������� ������"
+
+msgid "long vectors are not supported"
+msgstr "������� ������� �� ��������������"
 
 msgid "'by.x' and 'by.y' specify different numbers of columns"
 msgstr "'by.x' � 'by.y' ���������� ������ ������ �������"
 
+msgid "'incomparables' is supported only for merging on a single column"
+msgstr "'incomparables' �������������� ��� merge � ���� �������"
+
 msgid "additional arguments ignored in message()"
 msgstr "�������������� ��������� ��������� � message()"
 
-msgid ""
-"tracing functions requires the 'methods' package, but unable to load the "
-"'methods' namespace"
-msgstr ""
-"����������� ������� ������� ������ 'methods', �� � �� ���� ��������� ��� "
-"������������ ����"
+msgid "tracing functions requires the 'methods' package, but unable to load the 'methods' namespace"
+msgstr "����������� ������� ������� ������ 'methods', �� � �� ���� ��������� ��� ������������ ����"
 
 msgid "invalid to change the storage mode of a factor"
 msgstr "����������� ������ ��� �������� �������"
@@ -1007,26 +984,14 @@ msgstr "
 msgid "namespace %s is already sealed in 'loadNamespace'"
 msgstr "������������ ���� %s ��� ���������� � 'loadNamespace'"
 
-msgid ""
-"failed to assign RegisteredNativeSymbol for %s to %s since %s is already "
-"defined in the %s namespace"
-msgstr ""
-"�� ������� ��������� RegisteredNativeSymbol ��� %s � %s ��������� %s ��� "
-"���������� � ������������ ���� %s"
+msgid "failed to assign RegisteredNativeSymbol for %s to %s since %s is already defined in the %s namespace"
+msgstr "�� ������� ��������� RegisteredNativeSymbol ��� %s � %s ��������� %s ��� ���������� � ������������ ���� %s"
 
-msgid ""
-"failed to assign NativeSymbolInfo for %s to %s since %s is already defined "
-"in the %s namespace"
-msgstr ""
-"�� ���������� ��������� NativeSymbolInfo �� %s � %s ��������� %s ��� "
-"��������� � ������������ ���� %s"
+msgid "failed to assign NativeSymbolInfo for %s to %s since %s is already defined in the %s namespace"
+msgstr "�� ���������� ��������� NativeSymbolInfo �� %s � %s ��������� %s ��� ��������� � ������������ ���� %s"
 
-msgid ""
-"failed to assign NativeSymbolInfo for %s since %s is already defined in the "
-"%s namespace"
-msgstr ""
-"�� ���������� ��������� NativeSymbolInfo ��� %s ��������� %s ��� ��������� � "
-"������������ ���� %s"
+msgid "failed to assign NativeSymbolInfo for %s since %s is already defined in the %s namespace"
+msgstr "�� ���������� ��������� NativeSymbolInfo ��� %s ��������� %s ��� ��������� � ������������ ���� %s"
 
 msgid "package %s does not have a namespace"
 msgstr "����� %s �� ����� ������������ ����"
@@ -1037,12 +1002,8 @@ msgstr "
 msgid "unable to load R code in package %s"
 msgstr "�� ���� ��������� ��� R ������ %s"
 
-msgid ""
-"'exportClassPattern' specified in 'NAMESPACE' but no matching classes in "
-"package %s"
-msgstr ""
-"� NAMESPACE ������ 'exportClassPattern', �� ����������� ��������������� "
-"������ � ������ %s"
+msgid "'exportClassPattern' specified in 'NAMESPACE' but no matching classes in package %s"
+msgstr "� NAMESPACE ������ 'exportClassPattern', �� ����������� ��������������� ������ � ������ %s"
 
 msgid "in package %s classes %s were specified for export but not defined"
 msgstr "� ������ '%s' ������ %s ������� ��� ��������, �� �� ����������"
@@ -1086,7 +1047,6 @@ msgstr "
 msgid "cannot import into a sealed namespace"
 msgstr "�� ���� ������������� � ������������ ������������ ����"
 
-#, fuzzy
 msgid "replacing previous import by %s when loading %s"
 msgstr "������� ���������� ������ %s �� ����� �������� %s"
 
@@ -1102,12 +1062,8 @@ msgstr "
 msgid "requested methods not found in environment/package %s: %s"
 msgstr "����������� ������ �� ������� � ���������/������ %s: %s"
 
-msgid ""
-"No generic function found corresponding to requested imported methods for "
-"\"%s\" from package \"%s\" (malformed exports?)"
-msgstr ""
-"�� ������� ����� �������, ��������������� ����������� ������� ������� ��� "
-"\"%s\" �� ������ \"%s\" (�������� �����?)"
+msgid "No generic function found corresponding to requested imported methods for \"%s\" from package \"%s\" (malformed exports?)"
+msgstr "�� ������� ����� �������, ��������������� ����������� ������� ������� ��� \"%s\" �� ������ \"%s\" (�������� �����?)"
 
 msgid "cannot add to exports of a sealed namespace"
 msgstr "�� ���� �������� � �������� �� ������������� ������������ ����"
@@ -1121,9 +1077,8 @@ msgstr "
 msgid "empty name in directive '%s' in 'NAMESPACE' file"
 msgstr "������ ��� � ��������� '%s' �� ����� 'NAMESPACE'"
 
-#, fuzzy
 msgid "duplicate symbol names %s in useDynLib(\"%s\")"
-msgstr "������������� ����� �������� %s � useDynlib(\"%s\")"
+msgstr "������������� ����� �������� %s � useDynLib(\"%s\")"
 
 msgid "bad 'S3method' directive: %s"
 msgstr "������������ ��������� 'S3method': %s"
@@ -1204,13 +1159,11 @@ msgid "'k' is too large"
 msgstr "'k' ������� �����"
 
 msgid "need larger value of 'ncol' as pivoting occurred"
-msgstr ""
-"����� ������� �������� 'ncol', ��� ��� ���������� ����� �������� ��������"
+msgstr "����� ������� �������� 'ncol', ��� ��� ���������� ����� �������� ��������"
 
 msgid "invalid NCOL(R)"
 msgstr "������������ NCOL(R)"
 
-#, fuzzy
 msgid "'x' must be a vector of an atomic type"
 msgstr "'x' ������ ���� ��������� ��������"
 
@@ -1239,7 +1192,7 @@ msgid "either specify 'nmax' or 'n', but not both."
 msgstr "������� ���� 'nmax', ���� 'n', �� �� ���."
 
 msgid "'from' cannot be NA, NaN or infinite"
-msgstr ""
+msgstr "'from' �� ����� ���� NA, NaN ��� infinite"
 
 msgid "argument 'length.out' must be of length 1"
 msgstr "�������� 'length.out' ������ ���� ������ 1"
@@ -1248,7 +1201,7 @@ msgid "first element used of 'length.out' argument"
 msgstr "������ ������ ������� ��������� 'length.out' �����������"
 
 msgid "'to' cannot be NA, NaN or infinite"
-msgstr ""
+msgstr "'to' �� ����� ���� NA, NaN ��� infinite"
 
 msgid "invalid (to - from)/by in seq(.)"
 msgstr "������������ (to - from)/by � seq(.)"
@@ -1340,8 +1293,7 @@ msgid "'echo' must be logical"
 msgstr "'echo' ������ ���� ����������"
 
 msgid "'verbose' is TRUE, 'echo' not; ... coercing 'echo <- TRUE'"
-msgstr ""
-"'verbose' �������� TRUE, � 'echo' -- ���; ... ���������� 'echo <- TRUE'"
+msgstr "'verbose' �������� TRUE, � 'echo' -- ���; ... ���������� 'echo <- TRUE'"
 
 msgid "unable to find a plausible encoding"
 msgstr "�� ���� ����� �������������� ���������"
@@ -1364,6 +1316,9 @@ msgstr "'%s' 
 msgid "Timestamp of %s has changed"
 msgstr "��������� ����� %s ����������"
 
+msgid "'x' and 'to' must refer to same file"
+msgstr "'x' � 'y' ������ ��������� �� ���� � ��� �� ����"
+
 msgid "additional arguments ignored in stop()"
 msgstr "�������������� ��������� ��������� � stop()"
 
@@ -1457,9 +1412,6 @@ msgstr "
 msgid "invalid version specification %s"
 msgstr "������������ �������� ������ %s"
 
-msgid "wrong argument"
-msgstr "������������ ��������"
-
 msgid "invalid 'value'"
 msgstr "������������ 'value'"
 
@@ -1478,12 +1430,8 @@ msgstr "<0 
 msgid "invalid 'digits'"
 msgstr "������������ 'digits'"
 
-msgid ""
-"arguments 'show.output.on.console', 'minimized' and 'invisible' are for "
-"Windows only"
-msgstr ""
-"��������� � 'show.output.on.console', 'minimized' � 'invisible' ������ ��� "
-"Windows"
+msgid "arguments 'show.output.on.console', 'minimized' and 'invisible' are for Windows only"
+msgstr "��������� � 'show.output.on.console', 'minimized' � 'invisible' ������ ��� Windows"
 
 msgid "'intern' must be TRUE or FALSE"
 msgstr "'intern' ������ ���� TRUE ��� FALSE"
@@ -1561,34 +1509,52 @@ msgstr[1] "
 msgstr[2] "����� ������� %s �� ����������"
 
 msgid ""
-"The following object is masked %s %s:\n"
+"The following object is masked _by_ %s:\n"
 "\n"
 "%s\n"
 msgid_plural ""
-"The following objects are masked %s %s:\n"
+"The following objects are masked _by_ %s:\n"
 "\n"
 "%s\n"
 msgstr[0] ""
-"��������� ������ ����� %s %s:\n"
+"��������� ������ ����� %s:\n"
 "\n"
 "%s\n"
 msgstr[1] ""
-"��������� ������� ������ %s %s:\n"
+"��������� ������� ������ %s:\n"
 "\n"
 "%s\n"
 msgstr[2] ""
-"��������� ������� ������ %s %s:\n"
+"��������� ������� ������ %s:\n"
 "\n"
 "%s\n"
 
-msgid "invalid 'row.names', length %d for a data frame with %d row"
-msgid_plural "invalid 'row.names', length %d for a data frame with %d rows"
+msgid ""
+"The following object is masked from %s:\n"
+"\n"
+"%s\n"
+msgid_plural ""
+"The following objects are masked from %s:\n"
+"\n"
+"%s\n"
 msgstr[0] ""
-"������������ 'row.names', ������ %d ��� ������� ������ � %d ��������"
+"��������� ������ ����� �� %s:\n"
+"\n"
+"%s\n"
 msgstr[1] ""
-"������������ 'row.names', ������ %d ��� ������� ������ � %d ��������"
+"��������� ������� ������ �� %s:\n"
+"\n"
+"%s\n"
 msgstr[2] ""
-"������������ 'row.names', ������ %d ��� ������� ������ � %d ��������"
+"��������� ������� ������ �� %s:\n"
+"\n"
+"%s\n"
+
+msgid "invalid 'row.names', length %d for a data frame with %d row"
+msgid_plural "invalid 'row.names', length %d for a data frame with %d rows"
+msgstr[0] "������������ 'row.names', ������ %d ��� ������� ������ � %d ��������"
+msgstr[1] "������������ 'row.names', ������ %d ��� ������� ������ � %d ��������"
+msgstr[2] "������������ 'row.names', ������ %d ��� ������� ������ � %d ��������"
 
 msgid "supplied %d row name for %d rows"
 msgid_plural "supplied %d row names for %d rows"
@@ -1609,8 +1575,7 @@ msgstr[1] "
 msgstr[2] "� ������ %d ���������, � ���� %d"
 
 msgid "replacement element %d is a matrix/data frame of %d row, need %d"
-msgid_plural ""
-"replacement element %d is a matrix/data frame of %d rows, need %d"
+msgid_plural "replacement element %d is a matrix/data frame of %d rows, need %d"
 msgstr[0] "������� ������ %d -- �������/������� ������ �� %d �����, � ���� %d"
 msgstr[1] "������� ������ %d -- �������/������� ������ �� %d �����, � ���� %d"
 msgstr[2] "������� ������ %d -- �������/������� ������ �� %d �����, � ���� %d"
@@ -1645,6 +1610,12 @@ msgstr[0] "
 msgstr[1] "���������� %d ���������� ��� ������ %d ����������"
 msgstr[2] "���������� %d ���������� ��� ������ %d ����������"
 
+msgid "data frame with 0 columns and %d row"
+msgid_plural "data frame with 0 columns and %d rows"
+msgstr[0] "������� ������ � 0 ������� � %d �����"
+msgstr[1] "������� ������ � 0 ������� � %d ��������"
+msgstr[2] "������� ������ � 0 ������� � %d ��������"
+
 msgid "library %s contains no packages"
 msgid_plural "libraries %s contain no packages"
 msgstr[0] "���������� %s �� �������� �������"
@@ -1675,18 +1646,11 @@ msgstr[0] "'by' 
 msgstr[1] "'by' ������ ���������� ���������� �������"
 msgstr[2] "'by' ������ ���������� ���������� �������"
 
-msgid ""
-"Function found when exporting methods from the namespace %s which is not S4 "
-"generic: %s"
-msgid_plural ""
-"Functions found when exporting methods from the namespace %s which are not "
-"S4 generic: %s"
-msgstr[0] ""
-"�� ����� �������� �� ������������ ���� %s ������� �� S4-����� �������: %s"
-msgstr[1] ""
-"�� ����� �������� �� ������������ ���� %s ������� �� S4-����� �������: %s"
-msgstr[2] ""
-"�� ����� �������� �� ������������ ���� %s ������� �� S4-����� �������: %s"
+msgid "Function found when exporting methods from the namespace %s which is not S4 generic: %s"
+msgid_plural "Functions found when exporting methods from the namespace %s which are not S4 generic: %s"
+msgstr[0] "�� ����� �������� �� ������������ ���� %s ������� �� S4-����� �������: %s"
+msgstr[1] "�� ����� �������� �� ������������ ���� %s ������� �� S4-����� �������: %s"
+msgstr[2] "�� ����� �������� �� ������������ ���� %s ������� �� S4-����� �������: %s"
 
 msgid "class %s is not exported by 'namespace:%s'"
 msgid_plural "classes %s are not exported by 'namespace:%s'"
@@ -1712,12 +1676,6 @@ msgstr[0] "S3 
 msgstr[1] "S3 ������ %s ��������� � NAMESPACE �� �� �������"
 msgstr[2] "S3 ������ %s ��������� � NAMESPACE �� �� �������"
 
-msgid "extra argument %s will be disregarded"
-msgid_plural "extra arguments %s will be disregarded"
-msgstr[0] "�������������� �������� %s �� ����� �����"
-msgstr[1] "�������������� ��������� %s �� ����� ������"
-msgstr[2] "�������������� ��������� %s �� ����� ������"
-
 msgid "%s is not TRUE"
 msgid_plural "%s are not all TRUE"
 msgstr[0] "%s �� TRUE"
@@ -1730,219 +1688,205 @@ msgstr[0] "
 msgstr[1] "��������������:\n"
 msgstr[2] "��������������:\n"
 
+msgid ""
+"In %s :\n"
+" extra argument %s will be disregarded"
+msgid_plural ""
+"In %s :\n"
+" extra arguments %s will be disregarded"
+msgstr[0] ""
+"� %s :\n"
+" �������������� �������� %s �� ����� �����"
+msgstr[1] ""
+"� %s :\n"
+" �������������� ��������� %s �� ����� ������"
+msgstr[2] ""
+"� %s :\n"
+" �������������� ��������� %s �� ����� ������"
+
+#, fuzzy
+#~ msgid "cannot be unloaded."
+#~ msgstr "%s ������������ ���� ������ ���������:"
+
+#, fuzzy
+#~ msgid "re-exports %s not exported by %s"
+#~ msgstr "������ %s �� ������������� �� 'namespace:%s'"
+#~ msgid "package %s %s was found, but %s %s is required by %s"
+#~ msgstr "����� %s %s ������, �� %s %s ��������� ��� %s"
+#~ msgid "package %s %s is loaded, but %s %s is required by %s"
+#~ msgstr "����� %s %s ��������, �� %s %s ��������� ��� %s"
+#~ msgid "wrong argument"
+#~ msgstr "������������ ��������"
+#~ msgid ""
+#~ "The following object is masked %s %s:\n"
+#~ "\n"
+#~ "%s\n"
+#~ msgid_plural ""
+#~ "The following objects are masked %s %s:\n"
+#~ "\n"
+#~ "%s\n"
+#~ msgstr[0] ""
+#~ "��������� ������ ����� %s %s:\n"
+#~ "\n"
+#~ "%s\n"
+#~ msgstr[1] ""
+#~ "��������� ������� ������ %s %s:\n"
+#~ "\n"
+#~ "%s\n"
+#~ msgstr[2] ""
+#~ "��������� ������� ������ %s %s:\n"
+#~ "\n"
+#~ "%s\n"
 #~ msgid "'nu' must be 0, nrow(x) or ncol(x)"
 #~ msgstr "'nu' ������ ���� 0, nrow(x) ��� ncol(x)"
-
 #~ msgid "'nv' must be 0, nrow(x) or ncol(x)"
 #~ msgstr "'nv' ������ ���� 0, nrow(x) ��� ncol(x)"
-
 #~ msgid "non-square matrix in 'chol'"
 #~ msgstr "�� ���������� ������� � 'chol'"
-
 #~ msgid "non-matrix argument to 'chol'"
 #~ msgstr "����������� �������� ��� 'chol'"
-
 #~ msgid "matrix not positive definite"
 #~ msgstr "������� �� �������� ������������ ������������"
-
 #~ msgid "too many 'S3method' directives"
 #~ msgstr "������� ����� �������� 'S3method'"
-
 #~ msgid "'keep.source' is deprecated and will be ignored"
 #~ msgstr "'keep.source' ������� � ����� ��������"
-
 #~ msgid "non-positive definite matrix in 'chol'"
 #~ msgstr "�� ������������ ������������ ������� � 'chol'"
-
 #~ msgid "non-numeric argument to 'chol2inv'"
 #~ msgstr "���������� �������� ��� 'chol2inv'"
-
 #~ msgid "invalid 'size' argument in 'chol2inv'"
 #~ msgstr "������������ �������� 'size' � 'chol2inv'"
-
 #~ msgid "singular matrix in 'chol2inv'"
 #~ msgstr "����������� ������� � 'chol2inv'"
 
 #, fuzzy
 #~ msgid "'%s' returned code %d in 'eigen'"
 #~ msgstr "'rs' ��������� ��� %d � 'eigen'"
-
 #~ msgid "'nv' must be 0 or ncol(x)"
 #~ msgstr "'nv' ������ ���� 0 ��� ncol(x)"
 
 #, fuzzy
 #~ msgid "error %d in LINPACK subroutine 'dsvdc'"
 #~ msgstr "������ %d � 'dsvdc'"
-
 #~ msgid "found an S4 version of %s so it has not been imported correctly"
 #~ msgstr "������� S4-������ %s � ������� ��� �� ��������� ���������"
-
 #~ msgid "Use of save versions prior to 2 is deprecated"
 #~ msgstr "������������� ����������� ������, ����� ������ ��� 2, �� ����������"
-
 #~ msgid "T used instead of TRUE"
 #~ msgstr "T ������������ ������ TRUE"
-
 #~ msgid "F used instead of FALSE"
 #~ msgstr "F ������������ ������ FALSE"
-
 #~ msgid "cannot find namespace environment"
 #~ msgstr "�� ���� ����� ��������� ������������ ����"
-
 #~ msgid "items"
 #~ msgstr "��������"
-
 #~ msgid "have been removed from the search path"
 #~ msgstr "������ �� ���� ������"
-
 #~ msgid "0 extent dimensions"
 #~ msgstr "������� ������������� ���������"
-
 #~ msgid "Buggy version of Kinderman-Ramage generator used"
 #~ msgstr "������������ ��������� ������ ���������� Kinderman-Ramage"
-
 #~ msgid "Buggy version of Kinderman-Ramage generator is not allowed"
 #~ msgstr "��������� ������ ���������� Kinderman-Ramage �� ���������"
-
 #~ msgid "you cannot be serious"
 #~ msgstr "�� ������"
-
 #~ msgid "RHS must be list"
 #~ msgstr "������ ������� ������������ ������ ���� �������"
-
 #~ msgid "labels/breaks length conflict"
 #~ msgstr "����� labels/breaks �����������"
-
 #~ msgid "--> row.names NOT used"
 #~ msgstr "--> 'row.names' �� ������������"
-
 #~ msgid "'ch' returned code %d in 'eigen'"
 #~ msgstr "'ch' ��������� ��� %d � 'eigen'"
-
 #~ msgid "'cg' returned code %d in 'eigen'"
 #~ msgstr "'cg' ��������� ��� %d � 'eigen'"
-
 #~ msgid "'rg' returned code %d in 'eigen'"
 #~ msgstr "'rg' ��������� ��� %d � 'eigen'"
-
 #~ msgid "invalid factor level, NAs generated"
 #~ msgstr "������������ ������� �������, ���������� NA"
-
 #~ msgid "'subset' must evaluate to logical"
 #~ msgstr "���������� 'subset' ������ ��������� � �������� ��������"
-
 #~ msgid "License"
 #~ msgstr "��������"
-
 #~ msgid ""
 #~ "file %s has magic number '%s'\n"
 #~ "   Use of save versions prior to 2 is deprecated"
 #~ msgstr ""
 #~ "���� %s ����� ���������� ����� '%s'\n"
 #~ "   ������������� ����������� ������, ����� ������ ��� 2, �� ����������"
-
 #~ msgid "(loaded the methods namespace)"
 #~ msgstr "(��������� ������������ ���� �������)"
-
 #~ msgid "doc"
 #~ msgstr "��������"
-
 #~ msgid "'by' must specify valid column(s)"
 #~ msgstr "'by' ������ ���������� ���������� ������(�)"
 
 #, fuzzy
 #~ msgid "%s not defined for numeric_version objects"
 #~ msgstr "�� ���������� ��� �������� numeric_version"
-
 #~ msgid "unary"
 #~ msgstr "�������"
-
 #~ msgid "MARGIN ="
 #~ msgstr "MARGIN ="
-
 #~ msgid "value for '"
 #~ msgstr "�������� ��� '"
-
 #~ msgid "' not found"
 #~ msgstr "' �� �������"
-
 #~ msgid "to"
 #~ msgstr "�"
-
 #~ msgid "since"
 #~ msgstr "��� ���"
-
 #~ msgid "is already defined in the"
 #~ msgstr "��� ���������� �"
-
 #~ msgid "namespace"
 #~ msgstr "������������ ����"
-
 #~ msgid "failed to assign NativeSymbolInfo for"
 #~ msgstr "�� ������� ��������� NativeSymbolInfo ���"
-
 #~ msgid "not found"
 #~ msgstr "�� ������"
-
 #~ msgid "' has changed"
 #~ msgstr "' ���������"
-
 #~ msgid "is not"
 #~ msgstr "�� ��������"
-
 #~ msgid "all"
 #~ msgstr "���"
-
 #~ msgid "TRUE"
 #~ msgstr "TRUE"
-
 #~ msgid "non-numeric argument to 'chol'"
 #~ msgstr "���������� �������� ��� 'chol'"
-
 #~ msgid "do not know how to convert '%s' to class \"POSIXlt\""
 #~ msgstr "�� ���� ��� �������������� '%s' � ����� \"POSIXlt\""
-
 #~ msgid "do not know how to convert '%s' to class \"POSIXct\""
 #~ msgstr "�� ���� ��� �������������� '%s' � ����� \"POSIXct\""
-
 #~ msgid "invalid 'n' value"
 #~ msgstr "������������ �������� 'n'"
-
 #~ msgid "'shrink.sml' must be numeric > 0"
 #~ msgstr "'shrink.sml' ������ ���� ������ > 0"
-
 #~ msgid "'min.n' must be non-negative integer <= n"
 #~ msgstr "'min.n' ������ ���� ��������������� ����� <= n"
-
 #~ msgid "'high.u.bias' must be non-negative numeric"
 #~ msgstr "'high.u.bias' ������ ���� ��������������� ������"
-
 #~ msgid "'u5.bias' must be non-negative numeric"
 #~ msgstr "'u5.bias' ������ ���� ��������������� ������"
-
 #~ msgid "'eps.correct' must be 0, 1, or 2"
 #~ msgstr "'eps.correct' ������ ���� 0, 1, ��� 2"
-
 #~ msgid "'b' must be compatible with 'a'"
 #~ msgstr "'b' ������ ���� ��������� � 'a'"
-
 #~ msgid "invalid argument values in 'backsolve'"
 #~ msgstr "������������ �������� ��������� � 'backsolve'"
 
 #, fuzzy
 #~ msgid "invalid value of ncol(x)"
 #~ msgstr "������������ ��������"
-
 #~ msgid "singular matrix in 'backsolve'. First zero in diagonal [%d]"
 #~ msgstr "����������� ������� � 'backsolve'. ������ ���� �� ��������� [%d]"
 
 #, fuzzy
 #~ msgid "invalid value of nrow(x)"
 #~ msgstr "������������ ��������"
-
 #~ msgid "Expected a single logical value for the S4 state flag"
 #~ msgstr "��������� ������� ���������� �������� ��� ����� ��������� S4"
-
 #~ msgid "Expected a single logical value for the S3 state flag"
 #~ msgstr "��������� ������� ���������� �������� ��� ����� ��������� S3"
 
@@ -1965,3 +1909,4 @@ msgstr[2] "
 #, fuzzy
 #~ msgid "invalid value of length(bin)"
 #~ msgstr "������������ ��������"
+
diff --git a/src/library/base/po/R-tr.po b/src/library/base/po/R-tr.po
index ebe1fed..4909753 100644
--- a/src/library/base/po/R-tr.po
+++ b/src/library/base/po/R-tr.po
@@ -9,7 +9,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: R 2.13.0\n"
 "Report-Msgid-Bugs-To: bugs.r-project.org\n"
-"POT-Creation-Date: 2014-02-13 14:10\n"
+"POT-Creation-Date: 2016-04-01 09:50\n"
 "PO-Revision-Date: 2011-04-01 04:29+0200\n"
 "Last-Translator: Murat Alkan <muratalk at gmail.com>\n"
 "Language-Team: Turkish <muratalk at gmail.com>\n"
@@ -50,6 +50,9 @@ msgstr ""
 msgid "a dimension is zero"
 msgstr ""
 
+msgid "\"hexNumeric\" and \"digits17\" are mutually exclusive"
+msgstr ""
+
 msgid "second argument must be a list"
 msgstr ""
 
@@ -218,6 +221,11 @@ msgstr ""
 msgid "cannot coerce class \"%s\" to a data.frame"
 msgstr ""
 
+msgid ""
+"'row.names' is not a character vector of length %d -- omitting it. Will be "
+"an error!"
+msgstr ""
+
 msgid "options(\"stringsAsFactors\") not set to TRUE or FALSE"
 msgstr ""
 
@@ -297,7 +305,7 @@ msgstr ""
 msgid "only a single element should be replaced"
 msgstr ""
 
-msgid "Name partially matched in data frame"
+msgid "Partial match of '%s' to '%s' in data frame"
 msgstr ""
 
 msgid "names do not match previous names"
@@ -309,16 +317,13 @@ msgstr ""
 msgid "invalid list argument: all variables should have the same length"
 msgstr ""
 
-msgid "data frame with 0 columns and %d rows"
-msgstr ""
-
 msgid "<0 rows> (or 0-length row.names)"
 msgstr ""
 
 msgid "non-numeric variable in data frame:"
 msgstr ""
 
-msgid "only defined for equally-sized data frames"
+msgid "%s only defined for equally-sized data frames"
 msgstr ""
 
 msgid "list of length %d not meaningful"
@@ -480,6 +485,15 @@ msgid ""
 "%s"
 msgstr ""
 
+msgid "failed to load the methods package for debugging by signature"
+msgstr ""
+
+msgid "failed to load methods package for undebugging by signature"
+msgstr ""
+
+msgid "failed to load methods package for handling signature"
+msgstr ""
+
 msgid "'x' must be a square matrix"
 msgstr ""
 
@@ -535,7 +549,7 @@ msgstr ""
 msgid "number of levels differs"
 msgstr ""
 
-msgid "not meaningful for factors"
+msgid "%s not meaningful for factors"
 msgstr ""
 
 msgid "level sets of factors are different"
@@ -593,10 +607,10 @@ msgstr "geçersiz paket ismi"
 msgid "invalid 'time' argument"
 msgstr "geçersiz paket ismi"
 
-msgid "'vec' contains NAs"
+msgid "'vec' must be sorted non-decreasingly and not contain NAs"
 msgstr ""
 
-msgid "'vec' must be sorted non-decreasingly"
+msgid "'fun' is not a function"
 msgstr ""
 
 msgid "using the first element of 'value' of type \"expression\""
@@ -629,6 +643,12 @@ msgstr ""
 msgid "'zero.print' must be character, logical or NULL"
 msgstr ""
 
+msgid "'big.mark' and 'decimal.mark' are both '%s', which could be confusing"
+msgstr ""
+
+msgid "'input.d.mark' has no characters"
+msgstr ""
+
 msgid "'subset' must be logical"
 msgstr ""
 
@@ -709,9 +729,13 @@ msgstr ""
 msgid "package %s has a license that you need to accept after viewing"
 msgstr ""
 
-msgid ""
-"package %s has a license that you need to accept:\n"
-"according to the DESCRIPTION file it is"
+msgid "package %s has a license that you need to accept:"
+msgstr ""
+
+msgid "according to the DESCRIPTION file it is"
+msgstr ""
+
+msgid "%s"
 msgstr ""
 
 msgid "license for package %s not accepted"
@@ -740,6 +764,9 @@ msgstr ""
 msgid "%s not found on search path, using pos = 2"
 msgstr ""
 
+msgid "Package %s version %s cannot be unloaded"
+msgstr ""
+
 msgid "package or namespace load failed for %s"
 msgstr ""
 
@@ -830,15 +857,12 @@ msgstr "Zorunlu paket yükleniyor: %s"
 msgid "package %s required by %s could not be found"
 msgstr ""
 
-msgid "package %s %s was found, but %s %s is required by %s"
+msgid "version %s of %s masked by %s in %s"
 msgstr ""
 
 msgid "package %s could not be loaded"
 msgstr ""
 
-msgid "package %s %s is loaded, but %s %s is required by %s"
-msgstr ""
-
 msgid "empty (zero-byte) input file"
 msgstr ""
 
@@ -887,6 +911,15 @@ msgstr ""
 msgid "must specify names of formal arguments for 'vectorize'"
 msgstr ""
 
+msgid "FUN"
+msgstr ""
+
+msgid "may not have argument(s) named"
+msgstr ""
+
+msgid ","
+msgstr ""
+
 msgid "'arg' must be NULL or a character vector"
 msgstr ""
 
@@ -941,9 +974,15 @@ msgstr ""
 msgid "'by' must specify one or more columns as numbers, names or logical"
 msgstr ""
 
+msgid "long vectors are not supported"
+msgstr ""
+
 msgid "'by.x' and 'by.y' specify different numbers of columns"
 msgstr ""
 
+msgid "'incomparables' is supported only for merging on a single column"
+msgstr ""
+
 msgid "additional arguments ignored in message()"
 msgstr ""
 
@@ -1057,6 +1096,9 @@ msgstr ""
 msgid "found methods to import for function %s but not the generic itself"
 msgstr ""
 
+msgid "replacing previous import %s by %s when loading %s"
+msgstr ""
+
 msgid "No methods found in \"%s\" for requests: %s"
 msgstr ""
 
@@ -1064,8 +1106,8 @@ msgid "requested methods not found in environment/package %s: %s"
 msgstr ""
 
 msgid ""
-"No generic function found corresponding to requested imported methods for "
-"\"%s\" from package \"%s\" (malformed exports?)"
+"No generic function %s found corresponding to requested imported methods "
+"from package %s when loading %s (malformed exports?)"
 msgstr ""
 
 msgid "cannot add to exports of a sealed namespace"
@@ -1221,6 +1263,10 @@ msgstr ""
 msgid "too many arguments"
 msgstr ""
 
+#, fuzzy
+msgid "invalid 'compress' argument:"
+msgstr "geçersiz paket ismi"
+
 msgid "'compress' is ignored unless 'file' is a file name"
 msgstr ""
 
@@ -1256,6 +1302,9 @@ msgid ""
 "Did you intend to set 'partial'?"
 msgstr ""
 
+msgid "'partial' sorting not supported by radix method"
+msgstr ""
+
 msgid "'index.return' only for non-factors"
 msgstr ""
 
@@ -1282,9 +1331,6 @@ msgstr ""
 msgid "method = \"quick\" is only for numeric 'x'"
 msgstr ""
 
-msgid "method = \"radix\" is only for integer 'x'"
-msgstr ""
-
 msgid "'local' must be TRUE, FALSE or an environment"
 msgstr ""
 
@@ -1315,6 +1361,9 @@ msgstr ""
 msgid "Timestamp of %s has changed"
 msgstr ""
 
+msgid "'x' and 'to' must refer to same file"
+msgstr ""
+
 msgid "additional arguments ignored in stop()"
 msgstr ""
 
@@ -1333,9 +1382,6 @@ msgstr ""
 msgid "probably wrong encoding in names(.) of column"
 msgstr ""
 
-msgid ","
-msgstr ""
-
 msgid "STATS is longer than the extent of 'dim(x)[MARGIN]'"
 msgstr ""
 
@@ -1378,6 +1424,9 @@ msgstr ""
 msgid "arguments must have same length"
 msgstr ""
 
+msgid "total number of levels >= 2^31"
+msgstr ""
+
 msgid "handler must be a function"
 msgstr ""
 
@@ -1408,9 +1457,6 @@ msgstr ""
 msgid "invalid version specification %s"
 msgstr ""
 
-msgid "wrong argument"
-msgstr ""
-
 #, fuzzy
 msgid "invalid 'value'"
 msgstr "geçersiz paket ismi"
@@ -1510,11 +1556,21 @@ msgstr[0] ""
 msgstr[1] ""
 
 msgid ""
-"The following object is masked %s %s:\n"
+"The following object is masked _by_ %s:\n"
+"\n"
+"%s\n"
+msgid_plural ""
+"The following objects are masked _by_ %s:\n"
+"\n"
+"%s\n"
+msgstr[0] ""
+
+msgid ""
+"The following object is masked from %s:\n"
 "\n"
 "%s\n"
 msgid_plural ""
-"The following objects are masked %s %s:\n"
+"The following objects are masked from %s:\n"
 "\n"
 "%s\n"
 msgstr[0] ""
@@ -1560,6 +1616,10 @@ msgid "provided %d variable to replace %d variables"
 msgid_plural "provided %d variables to replace %d variables"
 msgstr[0] ""
 
+msgid "data frame with 0 columns and %d row"
+msgid_plural "data frame with 0 columns and %d rows"
+msgstr[0] ""
+
 msgid "library %s contains no packages"
 msgid_plural "libraries %s contain no packages"
 msgstr[0] ""
@@ -1612,10 +1672,6 @@ msgid_plural "S3 methods %s were declared in NAMESPACE but not found"
 msgstr[0] ""
 msgstr[1] ""
 
-msgid "extra argument %s will be disregarded"
-msgid_plural "extra arguments %s will be disregarded"
-msgstr[0] ""
-
 msgid "%s is not TRUE"
 msgid_plural "%s are not all TRUE"
 msgstr[0] ""
@@ -1625,6 +1681,14 @@ msgid_plural "Warning messages:\n"
 msgstr[0] ""
 msgstr[1] ""
 
+msgid ""
+"In %s :\n"
+" extra argument %s will be disregarded"
+msgid_plural ""
+"In %s :\n"
+" extra arguments %s will be disregarded"
+msgstr[0] ""
+
 #~ msgid "namespace"
 #~ msgstr "isim alanı"
 
diff --git a/src/library/base/po/R-zh_CN.po b/src/library/base/po/R-zh_CN.po
index 37d7f14..60f14ea 100644
--- a/src/library/base/po/R-zh_CN.po
+++ b/src/library/base/po/R-zh_CN.po
@@ -7,11 +7,11 @@ msgid ""
 msgstr ""
 "Project-Id-Version: R 2.3.0\n"
 "Report-Msgid-Bugs-To: bugs.r-project.org\n"
-"POT-Creation-Date: 2014-02-13 14:10\n"
+"POT-Creation-Date: 2016-04-01 09:50\n"
 "PO-Revision-Date: 2005-02-04 08:37+0000\n"
 "Last-Translator: 陈斐 <feic at normipaiva.com>\n"
 "Language-Team: Chinese\n"
-"Language: \n"
+"Language: zh_CN\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
@@ -47,6 +47,9 @@ msgstr "'x'里有无穷值或遗漏值"
 msgid "a dimension is zero"
 msgstr "维度为零"
 
+msgid "\"hexNumeric\" and \"digits17\" are mutually exclusive"
+msgstr ""
+
 msgid "second argument must be a list"
 msgstr "第二个参数必需为串列"
 
@@ -221,6 +224,11 @@ msgstr "数据框的'dimnames'给得不对"
 msgid "cannot coerce class \"%s\" to a data.frame"
 msgstr "不能把\"%s\"类别强迫变成数据框"
 
+msgid ""
+"'row.names' is not a character vector of length %d -- omitting it. Will be "
+"an error!"
+msgstr ""
+
 msgid "options(\"stringsAsFactors\") not set to TRUE or FALSE"
 msgstr "options(\"stringsAsFactors\")只能取TRUE或FALSE值"
 
@@ -301,7 +309,7 @@ msgid "only a single element should be replaced"
 msgstr "只能替换一个单元"
 
 #, fuzzy
-msgid "Name partially matched in data frame"
+msgid "Partial match of '%s' to '%s' in data frame"
 msgstr "数据框里有非数值的参数"
 
 msgid "names do not match previous names"
@@ -313,16 +321,14 @@ msgstr "变量的列数不对"
 msgid "invalid list argument: all variables should have the same length"
 msgstr "串列参数有错:所有变数的长度都应该是一样的"
 
-msgid "data frame with 0 columns and %d rows"
-msgstr "数据框没有列但有%d行"
-
 msgid "<0 rows> (or 0-length row.names)"
 msgstr "<0 行> (或0-长度的row.names)"
 
 msgid "non-numeric variable in data frame:"
 msgstr "数据框里有非数值的参数"
 
-msgid "only defined for equally-sized data frames"
+#, fuzzy
+msgid "%s only defined for equally-sized data frames"
 msgstr "只适用于大小相同的数据框"
 
 msgid "list of length %d not meaningful"
@@ -493,6 +499,15 @@ msgstr ""
 "不对行的开头为:\n"
 "%s"
 
+msgid "failed to load the methods package for debugging by signature"
+msgstr ""
+
+msgid "failed to load methods package for undebugging by signature"
+msgstr ""
+
+msgid "failed to load methods package for handling signature"
+msgstr ""
+
 msgid "'x' must be a square matrix"
 msgstr "'x'必需是正方形矩阵"
 
@@ -548,7 +563,8 @@ msgstr "'labels'不对;长度%d应该是一或%d"
 msgid "number of levels differs"
 msgstr "层次数目不同"
 
-msgid "not meaningful for factors"
+#, fuzzy
+msgid "%s not meaningful for factors"
 msgstr "对因子没有意义"
 
 msgid "level sets of factors are different"
@@ -604,12 +620,14 @@ msgstr "'path'参数不对"
 msgid "invalid 'time' argument"
 msgstr "'time'参数不对"
 
-msgid "'vec' contains NAs"
-msgstr "'vec'内有NA值"
-
-msgid "'vec' must be sorted non-decreasingly"
+#, fuzzy
+msgid "'vec' must be sorted non-decreasingly and not contain NAs"
 msgstr "'vec'的顺序一定得从小到大"
 
+#, fuzzy
+msgid "'fun' is not a function"
+msgstr "處置程式必需是函数"
+
 msgid "using the first element of 'value' of type \"expression\""
 msgstr "用种类为\"expression\"的'value'的第一个元素"
 
@@ -642,6 +660,13 @@ msgstr "'zero.print'的长度一定得大于一"
 msgid "'zero.print' must be character, logical or NULL"
 msgstr "'zero.print'只能取字符,逻辑或NULL值"
 
+msgid "'big.mark' and 'decimal.mark' are both '%s', which could be confusing"
+msgstr ""
+
+#, fuzzy
+msgid "'input.d.mark' has no characters"
+msgstr "'input'和'target'一定都得是字符串"
+
 msgid "'subset' must be logical"
 msgstr "'subset'必需是逻辑值"
 
@@ -722,13 +747,19 @@ msgstr "程辑包%s的使用许可要求你先通过交互式会话时接受它"
 msgid "package %s has a license that you need to accept after viewing"
 msgstr "程辑包%s的使用许可证要求你在看完后接受它"
 
-msgid ""
-"package %s has a license that you need to accept:\n"
-"according to the DESCRIPTION file it is"
+#, fuzzy
+msgid "package %s has a license that you need to accept:"
+msgstr "程辑包%s的使用许可证要求你在看完后接受它"
+
+#, fuzzy
+msgid "according to the DESCRIPTION file it is"
 msgstr ""
 "程辑包%s的使用许可证要求你接受它:\n"
 "按照DESCRIPTION文件它是"
 
+msgid "%s"
+msgstr ""
+
 msgid "license for package %s not accepted"
 msgstr "程辑包%s的使用许可证没有被接受"
 
@@ -753,6 +784,10 @@ msgstr "%s不是有效的已经安装了的程序包"
 msgid "%s not found on search path, using pos = 2"
 msgstr "在搜索路径上找不到%s,用pos=2"
 
+#, fuzzy
+msgid "Package %s version %s cannot be unloaded"
+msgstr "没有载入程辑包%s"
+
 msgid "package or namespace load failed for %s"
 msgstr "%s程辑包或名字空间载入失败,"
 
@@ -842,15 +877,12 @@ msgstr "关于这个程辑包%s的说明书"
 msgid "package %s required by %s could not be found"
 msgstr "找不到%2$s所需要的程辑包%1$s"
 
-msgid "package %s %s was found, but %s %s is required by %s"
-msgstr "找到了程辑包%1$s %2$s,但%5$s需要%3$s %4$s"
+msgid "version %s of %s masked by %s in %s"
+msgstr ""
 
 msgid "package %s could not be loaded"
 msgstr "无法载入程辑包%s"
 
-msgid "package %s %s is loaded, but %s %s is required by %s"
-msgstr "载入了程辑包%1$s %2$s,但%5$s需要%3$s %4$s "
-
 msgid "empty (zero-byte) input file"
 msgstr "空的(零字节)输入文件"
 
@@ -899,6 +931,15 @@ msgstr "'category'参数有错"
 msgid "must specify names of formal arguments for 'vectorize'"
 msgstr "用'vectorize'时必需设定正式参数"
 
+msgid "FUN"
+msgstr ""
+
+msgid "may not have argument(s) named"
+msgstr ""
+
+msgid ","
+msgstr ","
+
 msgid "'arg' must be NULL or a character vector"
 msgstr "'arg'要么是NULL,要么是字符矢量。"
 
@@ -953,9 +994,15 @@ msgstr "'by'的长度一定得和列的长度相同"
 msgid "'by' must specify one or more columns as numbers, names or logical"
 msgstr "'by'一定得用数字,名字或逻辑值来指定一个或多个列"
 
+msgid "long vectors are not supported"
+msgstr ""
+
 msgid "'by.x' and 'by.y' specify different numbers of columns"
 msgstr "'by.x'和'by.y'设定了不同数目的列"
 
+msgid "'incomparables' is supported only for merging on a single column"
+msgstr ""
+
 msgid "additional arguments ignored in message()"
 msgstr "message()里附加参数略过不用"
 
@@ -1070,15 +1117,20 @@ msgstr "进口目标有错"
 msgid "found methods to import for function %s but not the generic itself"
 msgstr "%s函数有可进口的方法,但找不到它的同属方法"
 
+#, fuzzy
+msgid "replacing previous import %s by %s when loading %s"
+msgstr "输入%2$s将代替前次引进%1$s"
+
 msgid "No methods found in \"%s\" for requests: %s"
 msgstr "在\"%s\"找不到%s需要的索取"
 
 msgid "requested methods not found in environment/package %s: %s"
 msgstr "环境/程辑包%s里找不到所要求的方法:%s"
 
+#, fuzzy
 msgid ""
-"No generic function found corresponding to requested imported methods for "
-"\"%s\" from package \"%s\" (malformed exports?)"
+"No generic function %s found corresponding to requested imported methods "
+"from package %s when loading %s (malformed exports?)"
 msgstr ""
 "程序包\"%2$s\"里没有相应于为\"%1$s\"所要求的进口方法的泛型函数(是不是出口的"
 "格式不对?)"
@@ -1238,6 +1290,10 @@ msgstr "长度必需为非负数"
 msgid "too many arguments"
 msgstr "太多参数"
 
+#, fuzzy
+msgid "invalid 'compress' argument:"
+msgstr "'name'参数不对"
+
 msgid "'compress' is ignored unless 'file' is a file name"
 msgstr "除非'file'是文件名,'compress'将被略过不用"
 
@@ -1273,6 +1329,9 @@ msgid ""
 "Did you intend to set 'partial'?"
 msgstr "'decreasing'必需是长度为一的矢量,你是不是想设'partial'的值?"
 
+msgid "'partial' sorting not supported by radix method"
+msgstr ""
+
 msgid "'index.return' only for non-factors"
 msgstr "'index.return'只能适用于非因子"
 
@@ -1301,9 +1360,6 @@ msgstr ""
 msgid "method = \"quick\" is only for numeric 'x'"
 msgstr "method=\"quick\"只适用于数值的'x'"
 
-msgid "method = \"radix\" is only for integer 'x'"
-msgstr "method=\"radix\"只适用于整数的'x'"
-
 msgid "'local' must be TRUE, FALSE or an environment"
 msgstr "'local'的值必需是'TRUE',或是'FALSE',或是环境"
 
@@ -1334,6 +1390,10 @@ msgstr "'%s'不存在"
 msgid "Timestamp of %s has changed"
 msgstr "时间戳%s变了"
 
+#, fuzzy
+msgid "'x' and 'to' must refer to same file"
+msgstr "'x'和'y'的长度必需一致"
+
 msgid "additional arguments ignored in stop()"
 msgstr "stop()里的附加参数略过不用"
 
@@ -1352,9 +1412,6 @@ msgstr "'indent'和'width'的值有错"
 msgid "probably wrong encoding in names(.) of column"
 msgstr "列名称的编码可能不对"
 
-msgid ","
-msgstr ","
-
 msgid "STATS is longer than the extent of 'dim(x)[MARGIN]'"
 msgstr "STATS大于'dim(x)[MARGIN]'的范围"
 
@@ -1397,6 +1454,10 @@ msgstr "'INDEX'的长度必需为一"
 msgid "arguments must have same length"
 msgstr "参数的长度必需相同"
 
+#, fuzzy
+msgid "total number of levels >= 2^31"
+msgstr "层次数目不同"
+
 msgid "handler must be a function"
 msgstr "處置程式必需是函数"
 
@@ -1427,9 +1488,6 @@ msgstr "无traceback"
 msgid "invalid version specification %s"
 msgstr "版本设定不对%s"
 
-msgid "wrong argument"
-msgstr "参数不对"
-
 msgid "invalid 'value'"
 msgstr "'value'无效"
 
@@ -1527,12 +1585,27 @@ msgid "deparse option %s is not recognized"
 msgid_plural "deparse options %s are not recognized"
 msgstr[0] "没有%s反向分析这个选项"
 
+#, fuzzy
 msgid ""
-"The following object is masked %s %s:\n"
+"The following object is masked _by_ %s:\n"
 "\n"
 "%s\n"
 msgid_plural ""
-"The following objects are masked %s %s:\n"
+"The following objects are masked _by_ %s:\n"
+"\n"
+"%s\n"
+msgstr[0] ""
+"下列对象被屏蔽了%s %s:\n"
+"\n"
+"%s\n"
+
+#, fuzzy
+msgid ""
+"The following object is masked from %s:\n"
+"\n"
+"%s\n"
+msgid_plural ""
+"The following objects are masked from %s:\n"
 "\n"
 "%s\n"
 msgstr[0] ""
@@ -1581,6 +1654,11 @@ msgid "provided %d variable to replace %d variables"
 msgid_plural "provided %d variables to replace %d variables"
 msgstr[0] "提供了%d变数用来替换%d变数"
 
+#, fuzzy
+msgid "data frame with 0 columns and %d row"
+msgid_plural "data frame with 0 columns and %d rows"
+msgstr[0] "数据框没有列但有%d行"
+
 msgid "library %s contains no packages"
 msgid_plural "libraries %s contain no packages"
 msgstr[0] "图书馆%s里没有程辑包"
@@ -1625,10 +1703,6 @@ msgid "S3 method %s was declared in NAMESPACE but not found"
 msgid_plural "S3 methods %s were declared in NAMESPACE but not found"
 msgstr[0] "S3方法%s在NAMESPACE里有声明但不存在"
 
-msgid "extra argument %s will be disregarded"
-msgid_plural "extra arguments %s will be disregarded"
-msgstr[0] "额外参数%s忽略不用"
-
 msgid "%s is not TRUE"
 msgid_plural "%s are not all TRUE"
 msgstr[0] "不是所有的%s都是TRUE"
@@ -1637,6 +1711,51 @@ msgid "Warning message:\n"
 msgid_plural "Warning messages:\n"
 msgstr[0] "警告信息:\n"
 
+#, fuzzy
+msgid ""
+"In %s :\n"
+" extra argument %s will be disregarded"
+msgid_plural ""
+"In %s :\n"
+" extra arguments %s will be disregarded"
+msgstr[0] "额外参数%s忽略不用"
+
+#~ msgid "'vec' contains NAs"
+#~ msgstr "'vec'内有NA值"
+
+#~ msgid "method = \"radix\" is only for integer 'x'"
+#~ msgstr "method=\"radix\"只适用于整数的'x'"
+
+#, fuzzy
+#~ msgid "re-exports %s not exported by %s"
+#~ msgstr "'namespace:%2$s'没有出口%1$s这个对象"
+
+#, fuzzy
+#~ msgid "cannot be unloaded."
+#~ msgstr "无法卸下%s这个名字空间:"
+
+#~ msgid "package %s %s was found, but %s %s is required by %s"
+#~ msgstr "找到了程辑包%1$s %2$s,但%5$s需要%3$s %4$s"
+
+#~ msgid "package %s %s is loaded, but %s %s is required by %s"
+#~ msgstr "载入了程辑包%1$s %2$s,但%5$s需要%3$s %4$s "
+
+#~ msgid "wrong argument"
+#~ msgstr "参数不对"
+
+#~ msgid ""
+#~ "The following object is masked %s %s:\n"
+#~ "\n"
+#~ "%s\n"
+#~ msgid_plural ""
+#~ "The following objects are masked %s %s:\n"
+#~ "\n"
+#~ "%s\n"
+#~ msgstr[0] ""
+#~ "下列对象被屏蔽了%s %s:\n"
+#~ "\n"
+#~ "%s\n"
+
 #~ msgid "'nu' must be 0, nrow(x) or ncol(x)"
 #~ msgstr "'nu'的值必需是零,nrow(x) 或ncol(x)"
 
diff --git a/src/library/base/po/R.pot b/src/library/base/po/R.pot
index 1bc9b01..c0b5735 100644
--- a/src/library/base/po/R.pot
+++ b/src/library/base/po/R.pot
@@ -1,14 +1,14 @@
 # SOME DESCRIPTIVE TITLE.
-# Copyright (C) YEAR The R Core Team
+# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
 # This file is distributed under the same license as the PACKAGE package.
 # FIRST AUTHOR <EMAIL at ADDRESS>, YEAR.
 #
 #, fuzzy
 msgid ""
 msgstr ""
-"Project-Id-Version: R 3.1.0\n"
-"Report-Msgid-Bugs-To: bugs.r-project.org\n"
-"POT-Creation-Date: 2014-03-27 07:46+0000\n"
+"Project-Id-Version: base 3.4.0\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2016-04-01 10:28-0700\n"
 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
 "Last-Translator: FULL NAME <EMAIL at ADDRESS>\n"
 "Language-Team: LANGUAGE <LL at li.org>\n"
@@ -51,15 +51,15 @@ msgstr ""
 msgid "unknown type in \"CG\" method of 'optim'"
 msgstr ""
 
-#: src/appl/optim.c:665
+#: src/appl/optim.c:662
 msgid "REPORT must be > 0 (method = \"L-BFGS-B\")"
 msgstr ""
 
-#: src/appl/optim.c:688
+#: src/appl/optim.c:685
 msgid "L-BFGS-B needs finite values of 'fn'"
 msgstr ""
 
-#: src/appl/optim.c:744
+#: src/appl/optim.c:741
 msgid "trace, REPORT must be >= 0 (method = \"SANN\")"
 msgstr ""
 
@@ -124,122 +124,127 @@ msgstr ""
 msgid "problem in displaying '%ls'"
 msgstr ""
 
-#: src/gnuwin32/extra.c:116 src/gnuwin32/extra.c:159 src/gnuwin32/extra.c:349
-#: src/gnuwin32/extra.c:577 src/gnuwin32/extra.c:602 src/main/agrep.c:131
-#: src/main/agrep.c:135 src/main/agrep.c:775 src/main/agrep.c:780
-#: src/main/apply.c:293 src/main/apply.c:295 src/main/apply.c:298
-#: src/main/array.c:87 src/main/array.c:1137 src/main/array.c:1263
-#: src/main/array.c:1265 src/main/array.c:1266 src/main/array.c:1592
-#: src/main/array.c:1594 src/main/array.c:1596 src/main/attrib.c:196
+#: src/gnuwin32/extra.c:116 src/gnuwin32/extra.c:158 src/gnuwin32/extra.c:348
+#: src/gnuwin32/extra.c:574 src/gnuwin32/extra.c:599 src/main/agrep.c:131
+#: src/main/agrep.c:135 src/main/agrep.c:776 src/main/agrep.c:781
+#: src/main/apply.c:330 src/main/apply.c:332 src/main/apply.c:335
+#: src/main/array.c:90 src/main/array.c:1272 src/main/array.c:1411
+#: src/main/array.c:1413 src/main/array.c:1414 src/main/array.c:1758
+#: src/main/array.c:1760 src/main/array.c:1762 src/main/attrib.c:190
 #: src/main/builtin.c:88 src/main/builtin.c:97 src/main/builtin.c:116
-#: src/main/builtin.c:118 src/main/builtin.c:147 src/main/builtin.c:534
-#: src/main/builtin.c:550 src/main/builtin.c:739 src/main/builtin.c:741
-#: src/main/builtin.c:743 src/main/character.c:139 src/main/character.c:142
-#: src/main/character.c:203 src/main/character.c:1037
-#: src/main/character.c:1041 src/main/character.c:1276
-#: src/main/character.c:1280 src/main/character.c:1341
-#: src/main/character.c:1344 src/main/connections.c:1217
-#: src/main/connections.c:1223 src/main/connections.c:1226
-#: src/main/connections.c:1230 src/main/connections.c:1375
-#: src/main/connections.c:1391 src/main/connections.c:1396
-#: src/main/connections.c:1996 src/main/connections.c:2002
-#: src/main/connections.c:2006 src/main/connections.c:2010
-#: src/main/connections.c:2015 src/main/connections.c:2665
-#: src/main/connections.c:2670 src/main/connections.c:2673
-#: src/main/connections.c:2676 src/main/connections.c:3057
-#: src/main/connections.c:3062 src/main/connections.c:3068
-#: src/main/connections.c:3071 src/main/connections.c:3075
-#: src/main/connections.c:3090 src/main/connections.c:3140
-#: src/main/connections.c:3145 src/main/connections.c:3149
-#: src/main/connections.c:3153 src/main/connections.c:3157
-#: src/main/connections.c:3163 src/main/connections.c:3210
-#: src/main/connections.c:3216 src/main/connections.c:3220
-#: src/main/connections.c:3270 src/main/connections.c:3273
-#: src/main/connections.c:3547 src/main/connections.c:3550
-#: src/main/connections.c:3553 src/main/connections.c:3559
-#: src/main/connections.c:3666 src/main/connections.c:3672
-#: src/main/connections.c:3675 src/main/connections.c:3826
-#: src/main/connections.c:3829 src/main/connections.c:3833
-#: src/main/connections.c:3836 src/main/connections.c:3956
-#: src/main/connections.c:4074 src/main/connections.c:4077
-#: src/main/connections.c:4414 src/main/connections.c:4439
-#: src/main/connections.c:4474 src/main/connections.c:4489
-#: src/main/connections.c:4497 src/main/connections.c:4523
-#: src/main/connections.c:4669 src/main/connections.c:4673
-#: src/main/connections.c:4801 src/main/connections.c:4803
-#: src/main/connections.c:4805 src/main/connections.c:4833
-#: src/main/connections.c:4965 src/main/connections.c:4991
-#: src/main/connections.c:4995 src/main/connections.c:4999
-#: src/main/connections.c:5003 src/main/context.c:596 src/main/context.c:605
-#: src/main/context.c:609 src/main/datetime.c:775 src/main/datetime.c:865
-#: src/main/datetime.c:867 src/main/datetime.c:871 src/main/datetime.c:1026
-#: src/main/datetime.c:1028 src/main/datetime.c:1232 src/main/debug.c:228
-#: src/main/deparse.c:397 src/main/dotcode.c:478 src/main/dotcode.c:482
-#: src/main/dotcode.c:487 src/main/dounzip.c:322 src/main/dounzip.c:329
-#: src/main/dounzip.c:339 src/main/dounzip.c:344 src/main/dounzip.c:348
-#: src/main/dounzip.c:352 src/main/envir.c:1618 src/main/envir.c:1621
-#: src/main/envir.c:1742 src/main/envir.c:1747 src/main/envir.c:1813
-#: src/main/envir.c:1829 src/main/envir.c:1835 src/main/envir.c:1932
-#: src/main/envir.c:1940 src/main/envir.c:1947 src/main/envir.c:1958
-#: src/main/envir.c:2172 src/main/envir.c:2293 src/main/envir.c:2552
-#: src/main/envir.c:2762 src/main/envir.c:2776 src/main/envir.c:2783
-#: src/main/envir.c:2799 src/main/envir.c:3367 src/main/errors.c:1030
-#: src/main/eval.c:397 src/main/eval.c:406 src/main/eval.c:409
-#: src/main/grep.c:767 src/main/grep.c:772 src/main/grep.c:1061
-#: src/main/grep.c:1063 src/main/grep.c:1065 src/main/grep.c:1510
-#: src/main/grep.c:1514 src/main/grep.c:1519 src/main/grep.c:2323
-#: src/main/grep.c:2328 src/main/grep.c:2621 src/main/grep.c:2626
-#: src/main/memory.c:3736 src/main/paste.c:96 src/main/paste.c:395
-#: src/main/paste.c:402 src/main/paste.c:409 src/main/paste.c:414
-#: src/main/paste.c:419 src/main/paste.c:424 src/main/paste.c:427
-#: src/main/paste.c:435 src/main/paste.c:601 src/main/paste.c:606
+#: src/main/builtin.c:118 src/main/builtin.c:149 src/main/builtin.c:569
+#: src/main/builtin.c:585 src/main/builtin.c:773 src/main/builtin.c:775
+#: src/main/builtin.c:777 src/main/character.c:239 src/main/character.c:242
+#: src/main/character.c:247 src/main/character.c:788 src/main/character.c:791
+#: src/main/character.c:1289 src/main/character.c:1293
+#: src/main/character.c:1528 src/main/character.c:1532
+#: src/main/character.c:1593 src/main/character.c:1596
+#: src/main/connections.c:1208 src/main/connections.c:1214
+#: src/main/connections.c:1217 src/main/connections.c:1221
+#: src/main/connections.c:1367 src/main/connections.c:1383
+#: src/main/connections.c:1388 src/main/connections.c:1989
+#: src/main/connections.c:1995 src/main/connections.c:1999
+#: src/main/connections.c:2003 src/main/connections.c:2008
+#: src/main/connections.c:2659 src/main/connections.c:2664
+#: src/main/connections.c:2667 src/main/connections.c:2670
+#: src/main/connections.c:3053 src/main/connections.c:3058
+#: src/main/connections.c:3064 src/main/connections.c:3067
+#: src/main/connections.c:3071 src/main/connections.c:3086
+#: src/main/connections.c:3135 src/main/connections.c:3140
+#: src/main/connections.c:3144 src/main/connections.c:3148
+#: src/main/connections.c:3152 src/main/connections.c:3158
+#: src/main/connections.c:3203 src/main/connections.c:3209
+#: src/main/connections.c:3213 src/main/connections.c:3264
+#: src/main/connections.c:3267 src/main/connections.c:3543
+#: src/main/connections.c:3546 src/main/connections.c:3549
+#: src/main/connections.c:3555 src/main/connections.c:3662
+#: src/main/connections.c:3668 src/main/connections.c:3671
+#: src/main/connections.c:3823 src/main/connections.c:3826
+#: src/main/connections.c:3830 src/main/connections.c:3833
+#: src/main/connections.c:3954 src/main/connections.c:4085
+#: src/main/connections.c:4088 src/main/connections.c:4425
+#: src/main/connections.c:4450 src/main/connections.c:4485
+#: src/main/connections.c:4500 src/main/connections.c:4508
+#: src/main/connections.c:4534 src/main/connections.c:4680
+#: src/main/connections.c:4684 src/main/connections.c:4814
+#: src/main/connections.c:4816 src/main/connections.c:4818
+#: src/main/connections.c:4846 src/main/connections.c:4980
+#: src/main/connections.c:5019 src/main/connections.c:5024
+#: src/main/connections.c:5029 src/main/connections.c:5050
+#: src/main/context.c:607 src/main/context.c:616 src/main/context.c:620
+#: src/main/datetime.c:781 src/main/datetime.c:869 src/main/datetime.c:872
+#: src/main/datetime.c:876 src/main/datetime.c:1043 src/main/datetime.c:1045
+#: src/main/datetime.c:1250 src/main/debug.c:245 src/main/deparse.c:408
+#: src/main/dotcode.c:496 src/main/dotcode.c:500 src/main/dotcode.c:505
+#: src/main/dounzip.c:323 src/main/dounzip.c:330 src/main/dounzip.c:340
+#: src/main/dounzip.c:345 src/main/dounzip.c:349 src/main/dounzip.c:353
+#: src/main/envir.c:1752 src/main/envir.c:1755 src/main/envir.c:1876
+#: src/main/envir.c:1881 src/main/envir.c:1945 src/main/envir.c:1961
+#: src/main/envir.c:1967 src/main/envir.c:2079 src/main/envir.c:2087
+#: src/main/envir.c:2094 src/main/envir.c:2105 src/main/envir.c:2337
+#: src/main/envir.c:2458 src/main/envir.c:2755 src/main/envir.c:3022
+#: src/main/envir.c:3036 src/main/envir.c:3043 src/main/envir.c:3059
+#: src/main/envir.c:3642 src/main/errors.c:1011 src/main/eval.c:454
+#: src/main/eval.c:463 src/main/eval.c:466 src/main/grep.c:780
+#: src/main/grep.c:785 src/main/grep.c:1079 src/main/grep.c:1081
+#: src/main/grep.c:1083 src/main/grep.c:1528 src/main/grep.c:1532
+#: src/main/grep.c:1537 src/main/grep.c:2345 src/main/grep.c:2350
+#: src/main/grep.c:2652 src/main/grep.c:2657 src/main/memory.c:3823
+#: src/main/paste.c:96 src/main/paste.c:392 src/main/paste.c:399
+#: src/main/paste.c:406 src/main/paste.c:411 src/main/paste.c:416
+#: src/main/paste.c:421 src/main/paste.c:424 src/main/paste.c:432
+#: src/main/paste.c:437 src/main/paste.c:619 src/main/paste.c:624
 #: src/main/platform.c:306 src/main/platform.c:308 src/main/platform.c:310
 #: src/main/platform.c:326 src/main/platform.c:337 src/main/platform.c:390
-#: src/main/platform.c:392 src/main/platform.c:705 src/main/platform.c:707
-#: src/main/platform.c:1064 src/main/platform.c:1070 src/main/platform.c:1073
-#: src/main/platform.c:1076 src/main/platform.c:1079 src/main/platform.c:1082
-#: src/main/platform.c:1085 src/main/platform.c:1088 src/main/platform.c:1185
-#: src/main/platform.c:1188 src/main/platform.c:1191 src/main/platform.c:1229
-#: src/main/platform.c:1286 src/main/platform.c:1289 src/main/platform.c:1498
-#: src/main/platform.c:1501 src/main/platform.c:1504 src/main/platform.c:1540
-#: src/main/platform.c:1543 src/main/platform.c:1546 src/main/platform.c:1629
-#: src/main/platform.c:1645 src/main/platform.c:1684 src/main/platform.c:1686
-#: src/main/platform.c:1757 src/main/platform.c:1841 src/main/platform.c:2116
-#: src/main/platform.c:2176 src/main/platform.c:2353 src/main/platform.c:2356
-#: src/main/platform.c:2359 src/main/platform.c:2362 src/main/platform.c:2365
-#: src/main/platform.c:2368 src/main/platform.c:2568 src/main/platform.c:2571
-#: src/main/platform.c:2574 src/main/platform.c:2577 src/main/platform.c:2580
-#: src/main/platform.c:2583 src/main/platform.c:2657 src/main/platform.c:2665
-#: src/main/platform.c:2701 src/main/platform.c:2751 src/main/print.c:242
-#: src/main/print.c:248 src/main/print.c:270 src/main/print.c:276
-#: src/main/print.c:283 src/main/random.c:478 src/main/random.c:482
-#: src/main/random.c:489 src/main/random.c:517 src/main/saveload.c:1950
-#: src/main/saveload.c:1953 src/main/saveload.c:1956 src/main/saveload.c:2072
-#: src/main/saveload.c:2252 src/main/saveload.c:2257 src/main/saveload.c:2260
+#: src/main/platform.c:392 src/main/platform.c:708 src/main/platform.c:710
+#: src/main/platform.c:800 src/main/platform.c:1138 src/main/platform.c:1144
+#: src/main/platform.c:1147 src/main/platform.c:1150 src/main/platform.c:1153
+#: src/main/platform.c:1156 src/main/platform.c:1159 src/main/platform.c:1162
+#: src/main/platform.c:1259 src/main/platform.c:1262 src/main/platform.c:1265
+#: src/main/platform.c:1303 src/main/platform.c:1361 src/main/platform.c:1364
+#: src/main/platform.c:1573 src/main/platform.c:1576 src/main/platform.c:1579
+#: src/main/platform.c:1615 src/main/platform.c:1618 src/main/platform.c:1621
+#: src/main/platform.c:1657 src/main/platform.c:1690 src/main/platform.c:1692
+#: src/main/platform.c:1763 src/main/platform.c:1848 src/main/platform.c:2089
+#: src/main/platform.c:2149 src/main/platform.c:2334 src/main/platform.c:2337
+#: src/main/platform.c:2340 src/main/platform.c:2343 src/main/platform.c:2346
+#: src/main/platform.c:2349 src/main/platform.c:2555 src/main/platform.c:2558
+#: src/main/platform.c:2561 src/main/platform.c:2564 src/main/platform.c:2567
+#: src/main/platform.c:2570 src/main/platform.c:2648 src/main/platform.c:2656
+#: src/main/platform.c:2692 src/main/platform.c:2742 src/main/print.c:235
+#: src/main/print.c:241 src/main/print.c:263 src/main/print.c:269
+#: src/main/print.c:276 src/main/random.c:470 src/main/random.c:474
+#: src/main/random.c:481 src/main/random.c:509 src/main/saveload.c:1952
+#: src/main/saveload.c:1955 src/main/saveload.c:1958 src/main/saveload.c:2074
+#: src/main/saveload.c:2254 src/main/saveload.c:2259 src/main/saveload.c:2262
 #: src/main/saveload.c:2366 src/main/scan.c:684 src/main/scan.c:853
 #: src/main/scan.c:867 src/main/scan.c:871 src/main/scan.c:873
 #: src/main/scan.c:884 src/main/scan.c:911 src/main/scan.c:914
-#: src/main/scan.c:917 src/main/scan.c:972 src/main/seq.c:618
-#: src/main/seq.c:623 src/main/seq.c:631 src/main/seq.c:662 src/main/seq.c:666
-#: src/main/seq.c:672 src/main/seq.c:680 src/main/sort.c:175
-#: src/main/sysutils.c:585 src/main/sysutils.c:589 src/main/sysutils.c:593
-#: src/main/sysutils.c:599 src/main/sysutils.c:603 src/main/sysutils.c:1831
-#: src/main/sysutils.c:1835 src/main/unique.c:966 src/main/unique.c:1289
-#: src/main/unique.c:1349 src/main/unique.c:1356 src/main/unique.c:1750
-#: src/main/util.c:581 src/main/util.c:584 src/main/util.c:1825
-#: src/main/util.c:1994 src/main/util.c:1995 src/main/util.c:1996
-#: src/main/util.c:2013 src/main/util.c:2037 src/main/util.c:2041
-#: src/main/util.c:2043 src/main/util.c:2068 src/main/util.c:2070
-#: src/main/util.c:2072 src/main/util.c:2075 src/main/util.c:2078
-#: src/main/util.c:2082 src/main/util.c:2084 src/modules/X11/devX11.c:3241
-#: src/modules/X11/devX11.c:3244 src/modules/X11/devX11.c:3247
-#: src/modules/X11/devX11.c:3271 src/modules/internet/internet.c:284
-#: src/modules/internet/internet.c:290 src/modules/internet/internet.c:296
-#: src/modules/internet/internet.c:299 src/modules/internet/internet.c:303
+#: src/main/scan.c:917 src/main/scan.c:972 src/main/seq.c:622
+#: src/main/seq.c:627 src/main/seq.c:635 src/main/seq.c:666 src/main/seq.c:670
+#: src/main/seq.c:676 src/main/seq.c:684 src/main/sort.c:175
+#: src/main/sysutils.c:597 src/main/sysutils.c:601 src/main/sysutils.c:605
+#: src/main/sysutils.c:611 src/main/sysutils.c:615 src/main/sysutils.c:1787
+#: src/main/sysutils.c:1791 src/main/unique.c:1029 src/main/unique.c:1337
+#: src/main/unique.c:1341 src/main/unique.c:1351 src/main/unique.c:1747
+#: src/main/util.c:636 src/main/util.c:639 src/main/util.c:1379
+#: src/main/util.c:1393 src/main/util.c:1975 src/main/util.c:2198
+#: src/main/util.c:2199 src/main/util.c:2200 src/main/util.c:2217
+#: src/main/util.c:2245 src/main/util.c:2249 src/main/util.c:2251
+#: src/main/util.c:2277 src/main/util.c:2279 src/main/util.c:2281
+#: src/main/util.c:2284 src/main/util.c:2287 src/main/util.c:2291
+#: src/main/util.c:2293 src/modules/X11/devX11.c:3247
+#: src/modules/X11/devX11.c:3250 src/modules/X11/devX11.c:3253
+#: src/modules/X11/devX11.c:3277 src/modules/internet/internet.c:453
+#: src/modules/internet/internet.c:459 src/modules/internet/internet.c:465
+#: src/modules/internet/internet.c:468 src/modules/internet/internet.c:472
+#: src/modules/internet/internet.c:477 src/modules/internet/libcurl.c:414
+#: src/modules/internet/libcurl.c:418 src/modules/internet/libcurl.c:423
+#: src/modules/internet/libcurl.c:426 src/modules/internet/libcurl.c:430
 #: src/modules/lapack/Lapack.c:155 src/modules/lapack/Lapack.c:261
 #: src/modules/lapack/Lapack.c:709 src/modules/lapack/Lapack.c:818
-#: src/modules/lapack/Lapack.c:880 src/modules/lapack/Lapack.c:1214
-#: src/unix/sys-std.c:1217 src/unix/sys-std.c:1240
+#: src/modules/lapack/Lapack.c:880 src/modules/lapack/Lapack.c:1215
+#: src/unix/sys-std.c:1223 src/unix/sys-std.c:1246
 #, c-format
 msgid "invalid '%s' argument"
 msgstr ""
@@ -248,358 +253,335 @@ msgstr ""
 msgid "unsupported version of Windows"
 msgstr ""
 
-#: src/gnuwin32/extra.c:267 src/main/apply.c:105 src/main/character.c:595
-#: src/main/connections.c:3555 src/main/context.c:642 src/main/context.c:661
-#: src/main/datetime.c:675 src/main/datetime.c:777 src/main/datetime.c:1030
-#: src/main/dotcode.c:199 src/main/errors.c:929 src/main/errors.c:962
-#: src/main/errors.c:1065 src/main/errors.c:1090 src/main/errors.c:1095
-#: src/main/errors.c:1368 src/main/identical.c:66 src/main/identical.c:67
-#: src/main/identical.c:68 src/main/identical.c:69 src/main/identical.c:70
-#: src/main/seq.c:185 src/main/seq.c:341 src/main/seq.c:346 src/main/seq.c:350
-#: src/main/seq.c:391 src/main/seq.c:395 src/main/seq.c:399
-#: src/main/sort.c:1224 src/main/sort.c:1307 src/main/sort.c:1311
-#: src/main/sort.c:1318 src/main/sort.c:1393 src/main/source.c:220
-#: src/main/summary.c:886 src/main/sysutils.c:251 src/main/util.c:986
-#: src/main/util.c:991 src/main/util.c:998 src/main/util.c:1001
-#: src/modules/X11/devX11.c:3142 src/modules/X11/devX11.c:3169
-#: src/modules/X11/devX11.c:3174 src/modules/X11/devX11.c:3179
-#: src/modules/X11/devX11.c:3189 src/modules/X11/devX11.c:3194
-#: src/modules/X11/devX11.c:3198 src/modules/X11/devX11.c:3202
-#: src/unix/sys-std.c:1291
-#, c-format
-msgid "invalid '%s' value"
-msgstr ""
-
-#: src/gnuwin32/extra.c:308 src/gnuwin32/extra.c:321
+#: src/gnuwin32/extra.c:313 src/gnuwin32/extra.c:324
 msgid "incorrect argument"
 msgstr ""
 
-#: src/gnuwin32/extra.c:312
+#: src/gnuwin32/extra.c:316
 msgid "don't be silly!: your machine has a 4Gb address limit"
 msgstr ""
 
-#: src/gnuwin32/extra.c:316
+#: src/gnuwin32/extra.c:320
 msgid "cannot decrease memory limit: ignored"
 msgstr ""
 
-#: src/gnuwin32/extra.c:428 src/gnuwin32/extra.c:529 src/main/util.c:897
+#: src/gnuwin32/extra.c:427 src/gnuwin32/extra.c:528 src/main/util.c:962
 msgid "'path' must be a character vector"
 msgstr ""
 
-#: src/gnuwin32/extra.c:579 src/gnuwin32/extra.c:581 src/gnuwin32/extra.c:604
-#: src/gnuwin32/extra.c:606 src/gnuwin32/extra.c:641 src/main/gevents.c:61
+#: src/gnuwin32/extra.c:576 src/gnuwin32/extra.c:578 src/gnuwin32/extra.c:601
+#: src/gnuwin32/extra.c:603 src/gnuwin32/extra.c:638 src/main/gevents.c:61
 #: src/main/gevents.c:98
 msgid "invalid device"
 msgstr ""
 
-#: src/gnuwin32/extra.c:582
+#: src/gnuwin32/extra.c:579
 msgid "requires SDI mode"
 msgstr ""
 
-#: src/gnuwin32/extra.c:635 src/main/gevents.c:58 src/main/gevents.c:95
+#: src/gnuwin32/extra.c:632 src/main/gevents.c:58 src/main/gevents.c:95
 msgid "invalid graphical device number"
 msgstr ""
 
-#: src/gnuwin32/extra.c:645
+#: src/gnuwin32/extra.c:642
 msgid "bad device"
 msgstr ""
 
-#: src/gnuwin32/extra.c:799 src/gnuwin32/extra.c:807
+#: src/gnuwin32/extra.c:796 src/gnuwin32/extra.c:804
 msgid "invalid input in 'Rmbstowcs'"
 msgstr ""
 
-#: src/gnuwin32/extra.c:830 src/main/platform.c:1261
+#: src/gnuwin32/extra.c:827 src/main/platform.c:1336
 msgid "file choice cancelled"
 msgstr ""
 
-#: src/gnuwin32/run.c:242
+#: src/gnuwin32/run.c:244
 #, c-format
 msgid "'CreateProcess' failed to run '%s'"
 msgstr ""
 
-#: src/gnuwin32/run.c:344
+#: src/gnuwin32/run.c:346
 msgid "Child process not responding.  R will terminate it."
 msgstr ""
 
-#: src/gnuwin32/run.c:402
+#: src/gnuwin32/run.c:404
 #, c-format
 msgid "Exit code was %d"
 msgstr ""
 
-#: src/gnuwin32/run.c:434
+#: src/gnuwin32/run.c:436
 msgid "Insufficient memory (rpipeOpen)"
 msgstr ""
 
-#: src/gnuwin32/run.c:648 src/main/dounzip.c:482
+#: src/gnuwin32/run.c:650 src/main/dounzip.c:481
 msgid "seek not enabled for this connection"
 msgstr ""
 
-#: src/gnuwin32/run.c:654
+#: src/gnuwin32/run.c:656
 msgid "truncate not enabled for this connection"
 msgstr ""
 
-#: src/gnuwin32/run.c:729 src/gnuwin32/run.c:733 src/gnuwin32/run.c:746
-#: src/gnuwin32/run.c:774 src/main/connections.c:1330
-#: src/main/connections.c:1334 src/main/connections.c:1340
-#: src/main/connections.c:1354
+#: src/gnuwin32/run.c:731 src/gnuwin32/run.c:735 src/gnuwin32/run.c:748
+#: src/gnuwin32/run.c:776 src/main/connections.c:1322
+#: src/main/connections.c:1326 src/main/connections.c:1332
+#: src/main/connections.c:1346
 msgid "allocation of pipe connection failed"
 msgstr ""
 
-#: src/gnuwin32/run.c:788
+#: src/gnuwin32/run.c:790
 msgid "'names' is not a character vector"
 msgstr ""
 
-#: src/gnuwin32/sys-win32.c:182
+#: src/gnuwin32/sys-win32.c:180
 msgid "character string expected as first argument"
 msgstr ""
 
-#: src/gnuwin32/sys-win32.c:191
+#: src/gnuwin32/sys-win32.c:189
 msgid "character string expected as third argument"
 msgstr ""
 
-#: src/gnuwin32/sys-win32.c:257 src/unix/sys-unix.c:299
+#: src/gnuwin32/sys-win32.c:255 src/unix/sys-unix.c:312
 #, c-format
 msgid "running command '%s' had status %d"
 msgstr ""
 
-#: src/gnuwin32/system.c:122 src/unix/sys-unix.c:427
+#: src/gnuwin32/system.c:121 src/unix/sys-unix.c:440
 msgid "reached session elapsed time limit"
 msgstr ""
 
-#: src/gnuwin32/system.c:124 src/unix/sys-unix.c:429
+#: src/gnuwin32/system.c:123 src/unix/sys-unix.c:442
 msgid "reached elapsed time limit"
 msgstr ""
 
-#: src/gnuwin32/system.c:130 src/unix/sys-unix.c:435
+#: src/gnuwin32/system.c:129 src/unix/sys-unix.c:448
 msgid "reached session CPU time limit"
 msgstr ""
 
-#: src/gnuwin32/system.c:132 src/unix/sys-unix.c:437
+#: src/gnuwin32/system.c:131 src/unix/sys-unix.c:450
 msgid "reached CPU time limit"
 msgstr ""
 
-#: src/gnuwin32/system.c:157
+#: src/gnuwin32/system.c:156
 #, c-format
 msgid "Fatal error: %s\n"
 msgstr ""
 
-#: src/gnuwin32/system.c:335 src/unix/sys-std.c:863
+#: src/gnuwin32/system.c:334 src/unix/sys-std.c:866
 #, c-format
 msgid "encoding '%s' is not recognised"
 msgstr ""
 
-#: src/gnuwin32/system.c:341 src/unix/sys-std.c:869
+#: src/gnuwin32/system.c:340 src/unix/sys-std.c:872
 #, c-format
 msgid "<ERROR: re-encoding failure from encoding '%s'>\n"
 msgstr ""
 
-#: src/gnuwin32/system.c:555 src/gnuwin32/system.c:1049
-#: src/gnuwin32/system.c:1061 src/main/connections.c:590
-#: src/main/connections.c:595 src/main/dounzip.c:177 src/main/saveload.c:1961
-#: src/main/serialize.c:2552 src/main/serialize.c:2557
-#: src/main/serialize.c:2642 src/main/serialize.c:2687 src/unix/system.c:323
-#: src/unix/system.c:343
+#: src/gnuwin32/system.c:562 src/gnuwin32/system.c:1058
+#: src/gnuwin32/system.c:1070 src/main/connections.c:581
+#: src/main/connections.c:586 src/main/dounzip.c:178 src/main/saveload.c:1963
+#: src/main/serialize.c:2598 src/main/serialize.c:2603
+#: src/main/serialize.c:2688 src/main/serialize.c:2733 src/unix/system.c:328
 #, c-format
 msgid "cannot open file '%s': %s"
 msgstr ""
 
-#: src/gnuwin32/system.c:569
+#: src/gnuwin32/system.c:576
 #, c-format
 msgid "file.show(): file '%s' does not exist\n"
 msgstr ""
 
-#: src/gnuwin32/system.c:970
+#: src/gnuwin32/system.c:979
 #, c-format
 msgid "WARNING: R_MAX_MEM_SIZE value is invalid: ignored\n"
 msgstr ""
 
-#: src/gnuwin32/system.c:1002
+#: src/gnuwin32/system.c:1011
 msgid "WARNING: no max-mem-size given\n"
 msgstr ""
 
-#: src/gnuwin32/system.c:1009
+#: src/gnuwin32/system.c:1018
 #, c-format
 msgid "WARNING: --max-mem-size value is invalid: ignored\n"
 msgstr ""
 
-#: src/gnuwin32/system.c:1012
+#: src/gnuwin32/system.c:1021
 #, c-format
 msgid "WARNING: --max-mem-size=%lu%c: too large and ignored\n"
 msgstr ""
 
-#: src/gnuwin32/system.c:1018
+#: src/gnuwin32/system.c:1027
 #, c-format
 msgid "WARNING: --max-mem-size=%4.1fM: too small and ignored\n"
 msgstr ""
 
-#: src/gnuwin32/system.c:1023
+#: src/gnuwin32/system.c:1032
 #, c-format
 msgid "WARNING: --max-mem-size=%4.0fM: too large and taken as %uM\n"
 msgstr ""
 
-#: src/gnuwin32/system.c:1039
+#: src/gnuwin32/system.c:1048
 #, c-format
 msgid "option '%s' requires an argument"
 msgstr ""
 
-#: src/gnuwin32/system.c:1070
+#: src/gnuwin32/system.c:1079
 #, c-format
 msgid "option '%s' requires a non-empty argument"
 msgstr ""
 
-#: src/gnuwin32/system.c:1078 src/unix/system.c:362
+#: src/gnuwin32/system.c:1087 src/unix/system.c:347
 #, c-format
 msgid "WARNING: '-e %s' omitted as input is too long\n"
 msgstr ""
 
-#: src/gnuwin32/system.c:1082 src/unix/system.c:375
+#: src/gnuwin32/system.c:1091 src/unix/system.c:360
 #, c-format
 msgid "WARNING: unknown option '%s'\n"
 msgstr ""
 
-#: src/gnuwin32/system.c:1104 src/unix/system.c:379
+#: src/gnuwin32/system.c:1113 src/unix/system.c:364
 #, c-format
 msgid "ARGUMENT '%s' __ignored__\n"
 msgstr ""
 
-#: src/gnuwin32/system.c:1110 src/unix/system.c:386
+#: src/gnuwin32/system.c:1119 src/unix/system.c:371
 msgid "cannot use -e with -f or --file"
 msgstr ""
 
-#: src/gnuwin32/system.c:1128
+#: src/gnuwin32/system.c:1137
 msgid "creation of tmpfile failed -- set TMPDIR suitably?"
 msgstr ""
 
-#: src/gnuwin32/system.c:1147 src/unix/system.c:437
+#: src/gnuwin32/system.c:1156 src/unix/system.c:422
 msgid "you must specify '--save', '--no-save' or '--vanilla'"
 msgstr ""
 
-#: src/gnuwin32/system.c:1152
+#: src/gnuwin32/system.c:1161
 msgid ""
 "impossible to create 'reader thread'; you must free some system resources"
 msgstr ""
 
-#: src/include/Errormsg.h:25 src/main/subscript.c:375 src/main/subscript.c:393
-#: src/main/subscript.c:417 src/main/subscript.c:456 src/main/subscript.c:584
-#: src/main/subscript.c:623 src/main/subscript.c:766
+#: src/include/Errormsg.h:27 src/main/subscript.c:383 src/main/subscript.c:401
+#: src/main/subscript.c:425 src/main/subscript.c:464 src/main/subscript.c:662
+#: src/main/subscript.c:701 src/main/subscript.c:844
 msgid "subscript out of bounds"
 msgstr ""
 
-#: src/include/Errormsg.h:26
+#: src/include/Errormsg.h:28
 #, c-format
 msgid "object of type '%s' is not subsettable"
 msgstr ""
 
-#: src/main/CommandLineArgs.c:170
+#: src/main/CommandLineArgs.c:171
 msgid "WARNING: no value given for --encoding"
 msgstr ""
 
-#: src/main/CommandLineArgs.c:195
+#: src/main/CommandLineArgs.c:196
 #, c-format
 msgid "WARNING: option '%s' no longer supported"
 msgstr ""
 
-#: src/main/CommandLineArgs.c:206
+#: src/main/CommandLineArgs.c:207
 #, c-format
 msgid "WARNING: no value given for '%s'"
 msgstr ""
 
-#: src/main/CommandLineArgs.c:216
+#: src/main/CommandLineArgs.c:217
 #, c-format
 msgid "WARNING: '%s' value is invalid: ignored"
 msgstr ""
 
-#: src/main/CommandLineArgs.c:220
+#: src/main/CommandLineArgs.c:221
 #, c-format
 msgid "WARNING: %s: too large and ignored"
 msgstr ""
 
-#: src/main/CommandLineArgs.c:234
+#: src/main/CommandLineArgs.c:235
 msgid "WARNING: no value given for '--max-ppsize'"
 msgstr ""
 
-#: src/main/CommandLineArgs.c:239
+#: src/main/CommandLineArgs.c:240
 msgid "WARNING: '--max-ppsize' value is negative: ignored"
 msgstr ""
 
-#: src/main/CommandLineArgs.c:241
+#: src/main/CommandLineArgs.c:242
 msgid "WARNING: '--max-ppsize' value is too small: ignored"
 msgstr ""
 
-#: src/main/CommandLineArgs.c:244
+#: src/main/CommandLineArgs.c:245
 msgid "WARNING: '--max-ppsize' value is too large: ignored"
 msgstr ""
 
-#: src/main/RNG.c:175
+#: src/main/RNG.c:176
 #, c-format
 msgid "unif_rand: unimplemented RNG kind %d"
 msgstr ""
 
-#: src/main/RNG.c:260
+#: src/main/RNG.c:261
 #, c-format
 msgid "FixupSeeds: unimplemented RNG kind %d"
 msgstr ""
 
-#: src/main/RNG.c:302
+#: src/main/RNG.c:301
 msgid "'user_unif_rand' not in load table"
 msgstr ""
 
-#: src/main/RNG.c:310
+#: src/main/RNG.c:309
 msgid "cannot read seeds unless 'user_unif_nseed' is supplied"
 msgstr ""
 
-#: src/main/RNG.c:315
+#: src/main/RNG.c:314
 msgid "seed length must be in 0...625; ignored"
 msgstr ""
 
-#: src/main/RNG.c:323
+#: src/main/RNG.c:322
 #, c-format
 msgid "RNG_Init: unimplemented RNG kind %d"
 msgstr ""
 
-#: src/main/RNG.c:354
+#: src/main/RNG.c:351
 msgid "'.Random.seed' is a missing argument with no default"
 msgstr ""
 
-#: src/main/RNG.c:355
+#: src/main/RNG.c:352
 #, c-format
 msgid "'.Random.seed' is not an integer vector but of type '%s', so ignored"
 msgstr ""
 
-#: src/main/RNG.c:363
+#: src/main/RNG.c:360
 msgid "'.Random.seed[1]' is not a valid integer, so ignored"
 msgstr ""
 
-#: src/main/RNG.c:369
+#: src/main/RNG.c:366
 msgid "'.Random.seed[1]' is not a valid Normal type, so ignored"
 msgstr ""
 
-#: src/main/RNG.c:383
+#: src/main/RNG.c:380
 msgid "'.Random.seed[1] = 5' but no user-supplied generator, so ignored"
 msgstr ""
 
-#: src/main/RNG.c:388
+#: src/main/RNG.c:385
 msgid "'.Random.seed[1]' is not a valid RNG kind so ignored"
 msgstr ""
 
-#: src/main/RNG.c:415
+#: src/main/RNG.c:412
 msgid "'.Random.seed' has wrong length"
 msgstr ""
 
-#: src/main/RNG.c:468
+#: src/main/RNG.c:465
 #, c-format
 msgid "RNGkind: unimplemented RNG kind %d"
 msgstr ""
 
-#: src/main/RNG.c:488
+#: src/main/RNG.c:485
 msgid "invalid Normal type in 'RNGkind'"
 msgstr ""
 
-#: src/main/RNG.c:491
+#: src/main/RNG.c:488
 msgid "'user_norm_rand' not in load table"
 msgstr ""
 
-#: src/main/RNG.c:535
+#: src/main/RNG.c:532
 msgid "supplied seed is not a valid integer"
 msgstr ""
 
@@ -624,7 +606,7 @@ msgstr ""
 msgid "could not allocate space for 'name'"
 msgstr ""
 
-#: src/main/Rdynload.c:881 src/main/Rdynload.c:897 src/main/util.c:698
+#: src/main/Rdynload.c:881 src/main/Rdynload.c:897 src/main/util.c:762
 msgid "character argument expected"
 msgstr ""
 
@@ -642,32 +624,34 @@ msgstr ""
 
 #: src/main/Rdynload.c:979
 #, c-format
-msgid "cannot allocate memory for registered native symbol (%d bytes)"
-msgstr ""
+msgid "cannot allocate memory for registered native symbol (%d byte)"
+msgid_plural "cannot allocate memory for registered native symbol (%d bytes)"
+msgstr[0] ""
+msgstr[1] ""
 
-#: src/main/Rdynload.c:1100 src/main/Rdynload.c:1321
+#: src/main/Rdynload.c:1102 src/main/Rdynload.c:1323
 msgid "must pass package name or DllInfo reference"
 msgstr ""
 
-#: src/main/Rdynload.c:1197
+#: src/main/Rdynload.c:1199
 #, c-format
 msgid "unimplemented type %d in 'createRSymbolObject'"
 msgstr ""
 
-#: src/main/Rdynload.c:1279 src/main/Rdynload.c:1373
+#: src/main/Rdynload.c:1281 src/main/Rdynload.c:1375
 msgid "R_getRegisteredRoutines() expects a DllInfo reference"
 msgstr ""
 
-#: src/main/Rdynload.c:1282 src/main/Rdynload.c:1376
+#: src/main/Rdynload.c:1284 src/main/Rdynload.c:1378
 msgid "NULL value passed for DllInfo"
 msgstr ""
 
-#: src/main/Rdynload.c:1436
+#: src/main/Rdynload.c:1441
 #, c-format
 msgid "function '%s' not provided by package '%s'"
 msgstr ""
 
-#: src/main/Rdynload.c:1438
+#: src/main/Rdynload.c:1443
 msgid "table entry must be an external pointer"
 msgstr ""
 
@@ -676,8 +660,9 @@ msgstr ""
 msgid "problem in setting variable '%s' in Renviron"
 msgstr ""
 
-#: src/main/Renviron.c:311
-msgid "argument 'x' must be a character string"
+#: src/main/Renviron.c:311 src/main/objects.c:1174 src/main/raw.c:155
+#, c-format
+msgid "argument '%s' must be a character string"
 msgstr ""
 
 #: src/main/Renviron.c:315
@@ -685,116 +670,138 @@ msgstr ""
 msgid "file '%s' cannot be opened for reading"
 msgstr ""
 
-#: src/main/Rstrptime.h:517 src/main/Rstrptime.h:984
+#: src/main/Rstrptime.h:524 src/main/Rstrptime.h:991
 #, c-format
 msgid "use of %s for input is not supported"
 msgstr ""
 
-#: src/main/Rstrptime.h:1242
+#: src/main/Rstrptime.h:1263
 msgid "input string is too long"
 msgstr ""
 
-#: src/main/Rstrptime.h:1244
+#: src/main/Rstrptime.h:1265
 msgid "invalid multibyte input string"
 msgstr ""
 
-#: src/main/Rstrptime.h:1247
+#: src/main/Rstrptime.h:1268
 msgid "format string is too long"
 msgstr ""
 
-#: src/main/Rstrptime.h:1249
+#: src/main/Rstrptime.h:1270
 msgid "invalid multibyte format string"
 msgstr ""
 
-#: src/main/agrep.c:133 src/main/agrep.c:777 src/main/character.c:1039
-#: src/main/character.c:1043 src/main/grep.c:769 src/main/grep.c:1512
-#: src/main/grep.c:1516 src/main/grep.c:2325 src/main/grep.c:2623
+#: src/main/agrep.c:133 src/main/agrep.c:778 src/main/character.c:1291
+#: src/main/character.c:1295 src/main/grep.c:782 src/main/grep.c:1530
+#: src/main/grep.c:1534 src/main/grep.c:2347 src/main/grep.c:2654
 #, c-format
 msgid "argument '%s' has length > 1 and only the first element will be used"
 msgstr ""
 
-#: src/main/agrep.c:189 src/main/agrep.c:818
+#: src/main/agrep.c:190 src/main/agrep.c:820
 msgid "'pattern' must be a non-empty character string"
 msgstr ""
 
-#: src/main/agrep.c:200 src/main/agrep.c:827 src/main/grep.c:838
-#: src/main/grep.c:2381 src/main/grep.c:2662
+#: src/main/agrep.c:201 src/main/agrep.c:829 src/main/grep.c:853
+#: src/main/grep.c:2405 src/main/grep.c:2707
 msgid "regular expression is invalid in this locale"
 msgstr ""
 
-#: src/main/agrep.c:206 src/main/agrep.c:623
+#: src/main/agrep.c:207 src/main/agrep.c:624
 #, c-format
 msgid "regcomp error:  '%s'"
 msgstr ""
 
-#: src/main/agrep.c:238 src/main/agrep.c:871 src/main/grep.c:227
-#: src/main/grep.c:315 src/main/grep.c:423 src/main/grep.c:578
-#: src/main/grep.c:889 src/main/grep.c:2480 src/main/grep.c:2548
-#: src/main/grep.c:2698
+#: src/main/agrep.c:239 src/main/agrep.c:874 src/main/grep.c:233
+#: src/main/grep.c:323 src/main/grep.c:434 src/main/grep.c:590
+#: src/main/grep.c:907 src/main/grep.c:2510 src/main/grep.c:2579
+#: src/main/grep.c:2744
 #, c-format
 msgid "input string %d is invalid in this locale"
 msgstr ""
 
-#: src/main/agrep.c:525 src/main/agrep.c:765 src/main/grep.c:155
-#: src/main/grep.c:760 src/main/grep.c:762 src/main/grep.c:1047
-#: src/main/grep.c:1055 src/main/grep.c:1503 src/main/grep.c:1505
-#: src/main/grep.c:2315 src/main/grep.c:2317 src/main/grep.c:2611
+#: src/main/agrep.c:526 src/main/agrep.c:766 src/main/grep.c:159
+#: src/main/grep.c:773 src/main/grep.c:775 src/main/grep.c:1065
+#: src/main/grep.c:1073 src/main/grep.c:1521 src/main/grep.c:1523
+#: src/main/grep.c:2337 src/main/grep.c:2339 src/main/grep.c:2642
 #, c-format
 msgid "argument '%s' will be ignored"
 msgstr ""
 
-#: src/main/agrep.c:614
+#: src/main/agrep.c:615
 #, c-format
 msgid "input string x[%d] is invalid in this locale"
 msgstr ""
 
-#: src/main/agrep.c:660
+#: src/main/agrep.c:661
 #, c-format
 msgid "input string y[%d] is invalid in this locale"
 msgstr ""
 
-#: src/main/agrep.c:833 src/main/grep.c:2668
+#: src/main/agrep.c:835 src/main/grep.c:2713
 #, c-format
 msgid "regcomp error: '%s'"
 msgstr ""
 
-#: src/main/apply.c:103
+#: src/main/apply.c:98
 msgid "'FUN.VALUE' must be a vector"
 msgstr ""
 
-#: src/main/apply.c:108 src/main/complex.c:758
+#: src/main/apply.c:100 src/main/array.c:506 src/main/character.c:847
+#: src/main/character.c:1655 src/main/connections.c:3551
+#: src/main/context.c:653 src/main/context.c:672 src/main/datetime.c:681
+#: src/main/datetime.c:783 src/main/datetime.c:1047 src/main/dotcode.c:222
+#: src/main/errors.c:910 src/main/errors.c:943 src/main/errors.c:1049
+#: src/main/errors.c:1074 src/main/errors.c:1079 src/main/errors.c:1349
+#: src/main/identical.c:66 src/main/identical.c:67 src/main/identical.c:68
+#: src/main/identical.c:69 src/main/identical.c:70 src/main/platform.c:2982
+#: src/main/seq.c:192 src/main/seq.c:343 src/main/seq.c:348 src/main/seq.c:352
+#: src/main/seq.c:397 src/main/seq.c:401 src/main/seq.c:405
+#: src/main/sort.c:1244 src/main/sort.c:1327 src/main/sort.c:1331
+#: src/main/sort.c:1338 src/main/source.c:225 src/main/summary.c:954
+#: src/main/sysutils.c:250 src/main/util.c:1051 src/main/util.c:1056
+#: src/main/util.c:1063 src/main/util.c:1066 src/main/util.c:2035
+#: src/modules/X11/devX11.c:3148 src/modules/X11/devX11.c:3175
+#: src/modules/X11/devX11.c:3180 src/modules/X11/devX11.c:3185
+#: src/modules/X11/devX11.c:3195 src/modules/X11/devX11.c:3200
+#: src/modules/X11/devX11.c:3204 src/modules/X11/devX11.c:3208
+#, c-format
+msgid "invalid '%s' value"
+msgstr ""
+
+#: src/main/apply.c:103 src/main/complex.c:753
 msgid "invalid length"
 msgstr ""
 
-#: src/main/apply.c:113
+#: src/main/apply.c:108
 msgid "long vectors are not supported for matrix/array results"
 msgstr ""
 
-#: src/main/apply.c:162
+#: src/main/apply.c:115
+#, c-format
+msgid "type '%s' is not supported"
+msgstr ""
+
+#: src/main/apply.c:163
 #, c-format
 msgid ""
 "values must be length %d,\n"
 " but FUN(X[[%d]]) result is length %d"
 msgstr ""
 
-#: src/main/apply.c:174
+#: src/main/apply.c:175
 #, c-format
 msgid ""
 "values must be type '%s',\n"
 " but FUN(X[[%d]]) result is type '%s'"
 msgstr ""
 
-#: src/main/apply.c:193
-#, c-format
-msgid "type '%s' is not supported"
-msgstr ""
-
-#: src/main/apply.c:225
+#: src/main/apply.c:252
 #, c-format
 msgid "dimnames(<value>) is neither NULL nor list of length %d"
 msgstr ""
 
-#: src/main/arithmetic.c:42
+#: src/main/arithmetic.c:42 src/main/eval.c:3633
 msgid "NaNs produced"
 msgstr ""
 
@@ -802,463 +809,475 @@ msgstr ""
 msgid "non-numeric argument to mathematical function"
 msgstr ""
 
-#: src/main/arithmetic.c:187
+#: src/main/arithmetic.c:186
 msgid "probable complete loss of accuracy in modulus"
 msgstr ""
 
-#: src/main/arithmetic.c:337
+#: src/main/arithmetic.c:298
 msgid "NAs produced by integer overflow"
 msgstr ""
 
-#: src/main/arithmetic.c:538
+#: src/main/arithmetic.c:499
 msgid "operator needs one or two arguments"
 msgstr ""
 
-#: src/main/arithmetic.c:554
+#: src/main/arithmetic.c:515
 msgid "non-numeric argument to binary operator"
 msgstr ""
 
-#: src/main/arithmetic.c:615 src/main/relop.c:227
+#: src/main/arithmetic.c:576 src/main/relop.c:221
 msgid "non-conformable arrays"
 msgstr ""
 
-#: src/main/arithmetic.c:658
+#: src/main/arithmetic.c:619
 msgid "non-conformable time-series"
 msgstr ""
 
-#: src/main/arithmetic.c:680 src/main/logic.c:143 src/main/relop.c:166
-#: src/main/relop.c:265
+#: src/main/arithmetic.c:641 src/main/logic.c:135 src/main/relop.c:160
+#: src/main/relop.c:259
 msgid "longer object length is not a multiple of shorter object length"
 msgstr ""
 
-#: src/main/arithmetic.c:751
+#: src/main/arithmetic.c:712
 msgid "invalid argument to unary operator"
 msgstr ""
 
-#: src/main/arithmetic.c:780 src/main/arithmetic.c:805
-#: src/main/arithmetic.c:824
+#: src/main/arithmetic.c:741 src/main/arithmetic.c:766
+#: src/main/arithmetic.c:785
 msgid "invalid unary operator"
 msgstr ""
 
-#: src/main/arithmetic.c:1241
+#: src/main/arithmetic.c:1191
 msgid "unimplemented real function of 1 argument"
 msgstr ""
 
-#: src/main/arithmetic.c:1255 src/main/complex.c:648 src/main/complex.c:718
+#: src/main/arithmetic.c:1205 src/main/complex.c:638 src/main/complex.c:708
 msgid "unimplemented complex function"
 msgstr ""
 
-#: src/main/arithmetic.c:1526 src/main/arithmetic.c:1877
-#: src/main/arithmetic.c:2056 src/main/arithmetic.c:2168
+#: src/main/arithmetic.c:1484 src/main/arithmetic.c:1877
+#: src/main/arithmetic.c:2049 src/main/arithmetic.c:2152
 #, c-format
 msgid "unimplemented real function of %d numeric arguments"
 msgstr ""
 
-#: src/main/arithmetic.c:1552
+#: src/main/arithmetic.c:1511
 #, c-format
-msgid "%d arguments passed to '%s' which requires 1 or 2"
-msgstr ""
+msgid "%d argument passed to '%s' which requires 1 or 2 arguments"
+msgid_plural "%d arguments passed to '%s'which requires 1 or 2 arguments"
+msgstr[0] ""
+msgstr[1] ""
 
-#: src/main/arithmetic.c:1570
+#: src/main/arithmetic.c:1530
 msgid "invalid second argument of length 0"
 msgstr ""
 
-#: src/main/arithmetic.c:1639
-msgid "invalid argument 'base' of length 0"
+#: src/main/arithmetic.c:1625 src/main/arithmetic.c:1643 src/main/envir.c:1464
+#: src/main/envir.c:1972 src/main/eval.c:630 src/main/eval.c:4237
+#, c-format
+msgid "argument \"%s\" is missing, with no default"
 msgstr ""
 
-#: src/main/arithmetic.c:1647
-#, c-format
-msgid "%d arguments passed to 'log' which requires 1 or 2"
+#: src/main/arithmetic.c:1649
+msgid "invalid argument 'base' of length 0"
 msgstr ""
 
-#: src/main/array.c:79 src/main/array.c:1441
+#: src/main/array.c:82 src/main/array.c:1591
 #, c-format
 msgid "'data' must be of a vector type, was '%s'"
 msgstr ""
 
-#: src/main/array.c:94 src/main/array.c:102
+#: src/main/array.c:97 src/main/array.c:105
 msgid "non-numeric matrix extent"
 msgstr ""
 
-#: src/main/array.c:97 src/main/array.c:1535
+#: src/main/array.c:100 src/main/array.c:1695
 msgid "invalid 'nrow' value (too large or NA)"
 msgstr ""
 
-#: src/main/array.c:99 src/main/array.c:1537
+#: src/main/array.c:102 src/main/array.c:1697
 msgid "invalid 'nrow' value (< 0)"
 msgstr ""
 
-#: src/main/array.c:105 src/main/array.c:1540
+#: src/main/array.c:108 src/main/array.c:1700
 msgid "invalid 'ncol' value (too large or NA)"
 msgstr ""
 
-#: src/main/array.c:107 src/main/array.c:1542
+#: src/main/array.c:110 src/main/array.c:1702
 msgid "invalid 'ncol' value (< 0)"
 msgstr ""
 
-#: src/main/array.c:116
+#: src/main/array.c:119
 msgid "nc = 0 for non-null data"
 msgstr ""
 
-#: src/main/array.c:124
+#: src/main/array.c:127
 msgid "nr = 0 for non-null data"
 msgstr ""
 
-#: src/main/array.c:135
+#: src/main/array.c:138
 #, c-format
 msgid ""
 "data length [%d] is not a sub-multiple or multiple of the number of rows [%d]"
 msgstr ""
 
-#: src/main/array.c:138
+#: src/main/array.c:141
 #, c-format
 msgid ""
 "data length [%d] is not a sub-multiple or multiple of the number of columns "
 "[%d]"
 msgstr ""
 
-#: src/main/array.c:141
+#: src/main/array.c:144
 msgid "data length exceeds size of matrix"
 msgstr ""
 
-#: src/main/array.c:147 src/main/array.c:1453 src/main/array.c:1549
+#: src/main/array.c:150 src/main/array.c:1603 src/main/array.c:1709
 msgid "too many elements specified"
 msgstr ""
 
-#: src/main/array.c:205
+#: src/main/array.c:208
 msgid "negative extents to matrix"
 msgstr ""
 
-#: src/main/array.c:208
+#: src/main/array.c:211
 msgid "allocMatrix: too many elements specified"
 msgstr ""
 
-#: src/main/array.c:236
+#: src/main/array.c:239
 msgid "negative extents to 3D array"
 msgstr ""
 
-#: src/main/array.c:239
+#: src/main/array.c:242
 msgid "'alloc3Darray': too many elements specified"
 msgstr ""
 
-#: src/main/array.c:264
+#: src/main/array.c:267
 msgid "'allocArray': too many elements specified by 'dims'"
 msgstr ""
 
-#: src/main/array.c:448
+#: src/main/array.c:523
+#, c-format
+msgid "'%s' must be a list or atomic vector"
+msgstr ""
+
+#: src/main/array.c:561
 #, c-format
 msgid "a matrix-like object is required as argument to '%s'"
 msgstr ""
 
-#: src/main/array.c:662
+#: src/main/array.c:776
 msgid "requires numeric/complex matrix/vector arguments"
 msgstr ""
 
-#: src/main/array.c:752 src/main/array.c:756 src/main/array.c:760
+#: src/main/array.c:886 src/main/array.c:890 src/main/array.c:894
 msgid "non-conformable arguments"
 msgstr ""
 
-#: src/main/array.c:1058
+#: src/main/array.c:1193
 msgid "argument is not a matrix"
 msgstr ""
 
-#: src/main/array.c:1093
+#: src/main/array.c:1228
 msgid "invalid first argument, must be an array"
 msgstr ""
 
-#: src/main/array.c:1107
+#: src/main/array.c:1242
 #, c-format
 msgid "'perm' is of wrong length %d (!= %d)"
 msgstr ""
 
-#: src/main/array.c:1112 src/main/array.c:1115
+#: src/main/array.c:1247 src/main/array.c:1250
 msgid "'a' does not have named dimnames"
 msgstr ""
 
-#: src/main/array.c:1122
+#: src/main/array.c:1257
 #, c-format
 msgid "'perm[%d]' does not match a dimension name"
 msgstr ""
 
-#: src/main/array.c:1135
+#: src/main/array.c:1270
 msgid "value out of range in 'perm'"
 msgstr ""
 
-#: src/main/array.c:1217
+#: src/main/array.c:1352
 msgid "'resize' must be TRUE or FALSE"
 msgstr ""
 
-#: src/main/array.c:1275
+#: src/main/array.c:1422
 msgid "'x' must be numeric"
 msgstr ""
 
-#: src/main/array.c:1449
+#: src/main/array.c:1425
+msgid "'x' is too short"
+msgstr ""
+
+#: src/main/array.c:1599
 msgid "'dims' cannot be of length 0"
 msgstr ""
 
-#: src/main/array.c:1545
+#: src/main/array.c:1705
 msgid "'x' must have positive length"
 msgstr ""
 
-#: src/main/array.c:1605
+#: src/main/array.c:1771
 #, c-format
 msgid "singular matrix in 'backsolve'. First zero in diagonal [%d]"
 msgstr ""
 
-#: src/main/attrib.c:40 src/main/attrib.c:235 src/main/attrib.c:269
-#: src/main/attrib.c:291 src/main/attrib.c:405 src/main/attrib.c:452
-#: src/main/attrib.c:502
+#: src/main/attrib.c:40 src/main/attrib.c:231 src/main/attrib.c:265
+#: src/main/attrib.c:287 src/main/attrib.c:403 src/main/attrib.c:450
+#: src/main/attrib.c:501
 msgid "attempt to set an attribute on NULL"
 msgstr ""
 
-#: src/main/attrib.c:72
+#: src/main/attrib.c:77
 #, c-format
 msgid "row names must be 'character' or 'integer', not '%s'"
 msgstr ""
 
-#: src/main/attrib.c:124
+#: src/main/attrib.c:130
 #, c-format
 msgid "getAttrib: invalid type (%s) for TAG"
 msgstr ""
 
-#: src/main/attrib.c:379
+#: src/main/attrib.c:377
 #, c-format
 msgid "invalid type (%s) for 'names': must be vector"
 msgstr ""
 
-#: src/main/attrib.c:382
+#: src/main/attrib.c:380
 #, c-format
 msgid "'names' attribute [%d] must be the same length as the vector [%d]"
 msgstr ""
 
-#: src/main/attrib.c:387
+#: src/main/attrib.c:385
 msgid "names() applied to a non-vector"
 msgstr ""
 
-#: src/main/attrib.c:395
+#: src/main/attrib.c:393
 msgid "invalid time series parameters specified"
 msgstr ""
 
-#: src/main/attrib.c:409
+#: src/main/attrib.c:407
 msgid "'tsp' attribute must be numeric"
 msgstr ""
 
-#: src/main/attrib.c:415
+#: src/main/attrib.c:413
 msgid "'tsp' attribute must be numeric of length three"
 msgstr ""
 
-#: src/main/attrib.c:432
+#: src/main/attrib.c:430
 msgid "cannot assign 'tsp' to zero-length vector"
 msgstr ""
 
-#: src/main/attrib.c:463
+#: src/main/attrib.c:461
 msgid "attempt to set invalid 'comment' attribute"
 msgstr ""
 
-#: src/main/attrib.c:511
+#: src/main/attrib.c:510
 msgid "adding class \"factor\" to an invalid object"
 msgstr ""
 
-#: src/main/attrib.c:519
+#: src/main/attrib.c:541
 msgid "attempt to set invalid 'class' attribute"
 msgstr ""
 
-#: src/main/attrib.c:777
+#: src/main/attrib.c:872
 #, c-format
 msgid "class '%s' has no 'names' slot"
 msgstr ""
 
-#: src/main/attrib.c:779
+#: src/main/attrib.c:874
 #, c-format
 msgid ""
 "class '%s' has no 'names' slot; assigning a names attribute will create an "
 "invalid object"
 msgstr ""
 
-#: src/main/attrib.c:782
+#: src/main/attrib.c:877
 #, c-format
 msgid ""
 "invalid to use names()<- to set the 'names' slot in a non-vector class ('%s')"
 msgstr ""
 
-#: src/main/attrib.c:812
+#: src/main/attrib.c:907
 msgid "incompatible 'names' argument"
 msgstr ""
 
-#: src/main/attrib.c:867
+#: src/main/attrib.c:962
 #, c-format
 msgid "invalid type (%s) to set 'names' attribute"
 msgstr ""
 
-#: src/main/attrib.c:938
+#: src/main/attrib.c:1035
 msgid "'dimnames' applied to non-array"
 msgstr ""
 
-#: src/main/attrib.c:943
-msgid "'dimnames' must be a list"
+#: src/main/attrib.c:1040 src/main/coerce.c:2471
+#, c-format
+msgid "'%s' must be a list"
 msgstr ""
 
-#: src/main/attrib.c:946 src/main/attrib.c:974
+#: src/main/attrib.c:1043 src/main/attrib.c:1071
 #, c-format
 msgid "length of 'dimnames' [%d] must match that of 'dims' [%d]"
 msgstr ""
 
-#: src/main/attrib.c:980
+#: src/main/attrib.c:1077
 #, c-format
 msgid "invalid type (%s) for 'dimnames' (must be a vector)"
 msgstr ""
 
-#: src/main/attrib.c:983
+#: src/main/attrib.c:1080
 #, c-format
 msgid "length of 'dimnames' [%d] not equal to array extent"
 msgstr ""
 
-#: src/main/attrib.c:1055 src/main/builtin.c:75 src/main/builtin.c:112
-#: src/main/envir.c:1606 src/main/envir.c:1734 src/main/envir.c:1796
-#: src/main/envir.c:1918 src/main/paste.c:74 src/main/paste.c:293
-#: src/main/random.c:487 src/main/random.c:516 src/main/unique.c:1749
+#: src/main/attrib.c:1152 src/main/builtin.c:75 src/main/builtin.c:112
+#: src/main/envir.c:1740 src/main/envir.c:1868 src/main/envir.c:1928
+#: src/main/envir.c:2065 src/main/paste.c:74 src/main/paste.c:293
+#: src/main/random.c:479 src/main/random.c:508 src/main/unique.c:1746
 msgid "invalid first argument"
 msgstr ""
 
-#: src/main/attrib.c:1058
+#: src/main/attrib.c:1155
 msgid "invalid second argument"
 msgstr ""
 
-#: src/main/attrib.c:1066
+#: src/main/attrib.c:1163
 msgid "length-0 dimension vector is invalid"
 msgstr ""
 
-#: src/main/attrib.c:1071
+#: src/main/attrib.c:1168
 msgid "the dims contain missing values"
 msgstr ""
 
-#: src/main/attrib.c:1073
+#: src/main/attrib.c:1170
 msgid "the dims contain negative values"
 msgstr ""
 
-#: src/main/attrib.c:1078
+#: src/main/attrib.c:1175
 msgid "dims do not match the length of object"
 msgstr ""
 
-#: src/main/attrib.c:1080
+#: src/main/attrib.c:1177
 #, c-format
 msgid "dims [product %d] do not match the length of object [%d]"
 msgstr ""
 
-#: src/main/attrib.c:1177
+#: src/main/attrib.c:1284
 msgid "attributes must be a list or NULL"
 msgstr ""
 
-#: src/main/attrib.c:1182
+#: src/main/attrib.c:1289
 msgid "attributes must be named"
 msgstr ""
 
-#: src/main/attrib.c:1186
+#: src/main/attrib.c:1293
 #, c-format
 msgid "all attributes must have names [%d does not]"
 msgstr ""
 
-#: src/main/attrib.c:1285
+#: src/main/attrib.c:1393
 msgid "'which' must be of mode character"
 msgstr ""
 
-#: src/main/attrib.c:1287
+#: src/main/attrib.c:1395
 msgid "exactly one attribute 'which' must be given"
 msgstr ""
 
-#: src/main/attrib.c:1345 src/main/attrib.c:1368 src/main/subscript.c:240
-#: src/main/subscript.c:244 src/main/subset.c:1188 src/main/subset.c:1239
+#: src/main/attrib.c:1456 src/main/attrib.c:1479 src/main/subscript.c:245
+#: src/main/subscript.c:249 src/main/subset.c:1257 src/main/subset.c:1311
 #, c-format
 msgid "partial match of '%s' to '%s'"
 msgstr ""
 
-#: src/main/attrib.c:1406
+#: src/main/attrib.c:1525
 #, c-format
 msgid "invalid type '%s' for slot name"
 msgstr ""
 
-#: src/main/attrib.c:1444
+#: src/main/attrib.c:1563
 msgid "'name' must be non-null character string"
 msgstr ""
 
-#: src/main/attrib.c:1568 src/main/attrib.c:1639 src/main/attrib.c:1676
+#: src/main/attrib.c:1688 src/main/attrib.c:1759 src/main/attrib.c:1797
 msgid "invalid type or length for slot name"
 msgstr ""
 
-#: src/main/attrib.c:1602
+#: src/main/attrib.c:1722
 #, c-format
 msgid "cannot get a slot (\"%s\") from an object of type \"%s\""
 msgstr ""
 
-#: src/main/attrib.c:1613
+#: src/main/attrib.c:1733
 #, c-format
 msgid "no slot of name \"%s\" for this object of class \"%s\""
 msgstr ""
 
-#: src/main/attrib.c:1630
+#: src/main/attrib.c:1750
 msgid "attempt to set slot on NULL object"
 msgstr ""
 
-#: src/main/attrib.c:1671
+#: src/main/attrib.c:1792
 msgid "formal classes cannot be used without the 'methods' package"
 msgstr ""
 
-#: src/main/attrib.c:1683
+#: src/main/attrib.c:1804
 #, c-format
 msgid ""
 "trying to get slot \"%s\" from an object of a basic class (\"%s\") with no "
 "slots"
 msgstr ""
 
-#: src/main/attrib.c:1687
+#: src/main/attrib.c:1808
 #, c-format
 msgid ""
 "trying to get slot \"%s\" from an object (class \"%s\") that is not an S4 "
 "object "
 msgstr ""
 
-#: src/main/bind.c:161
+#: src/main/bind.c:164
 #, c-format
 msgid "resulting vector exceeds vector length limit in '%s'"
 msgstr ""
 
-#: src/main/bind.c:291 src/main/bind.c:327 src/main/bind.c:376
-#: src/main/bind.c:449 src/main/bind.c:477
+#: src/main/bind.c:294 src/main/bind.c:330 src/main/bind.c:379
+#: src/main/bind.c:452 src/main/bind.c:480
 #, c-format
 msgid "type '%s' is unimplemented in '%s'"
 msgstr ""
 
-#: src/main/bind.c:685
+#: src/main/bind.c:688
 msgid "repeated formal argument 'recursive'"
 msgstr ""
 
-#: src/main/bind.c:696
+#: src/main/bind.c:699
 msgid "repeated formal argument 'use.names'"
 msgstr ""
 
-#: src/main/bind.c:894
+#: src/main/bind.c:900
 msgid "argument not a list"
 msgstr ""
 
-#: src/main/bind.c:1038 src/main/eval.c:2691 src/main/eval.c:2700
-#: src/main/objects.c:318 src/main/objects.c:354 src/main/objects.c:729
-#: src/main/objects.c:746 src/main/objects.c:753
+#: src/main/bind.c:1044 src/main/names.c:1273 src/main/names.c:1278
+#: src/main/names.c:1283 src/main/names.c:1288
 #, c-format
 msgid "class name too long in '%s'"
 msgstr ""
 
-#: src/main/bind.c:1114
+#: src/main/bind.c:1128
 #, c-format
 msgid "cannot create a matrix from type '%s'"
 msgstr ""
 
-#: src/main/bind.c:1185
+#: src/main/bind.c:1198
 #, c-format
 msgid "number of rows of matrices must match (see arg %d)"
 msgstr ""
 
-#: src/main/bind.c:1430
+#: src/main/bind.c:1455
 #, c-format
 msgid "number of columns of matrices must match (see arg %d)"
 msgstr ""
@@ -1267,212 +1286,243 @@ msgstr ""
 msgid "vector size cannot be NA"
 msgstr ""
 
-#: src/main/builtin.c:49 src/main/builtin.c:57 src/main/sort.c:1303
+#: src/main/builtin.c:49 src/main/builtin.c:57 src/main/sort.c:1323
 msgid "vector size cannot be NA/NaN"
 msgstr ""
 
-#: src/main/builtin.c:50 src/main/builtin.c:58 src/main/sort.c:1304
+#: src/main/builtin.c:50 src/main/builtin.c:58 src/main/sort.c:1324
 msgid "vector size cannot be infinite"
 msgstr ""
 
-#: src/main/builtin.c:51 src/main/builtin.c:59 src/main/builtin.c:916
-#: src/main/sort.c:1305
+#: src/main/builtin.c:51 src/main/builtin.c:59 src/main/builtin.c:950
+#: src/main/sort.c:1325
 msgid "vector size specified is too large"
 msgstr ""
 
-#: src/main/builtin.c:84 src/main/builtin.c:93 src/main/builtin.c:293
-#: src/main/builtin.c:326 src/main/builtin.c:365 src/main/builtin.c:375
-#: src/main/coerce.c:1537 src/main/connections.c:3066 src/main/engine.c:2967
-#: src/main/envir.c:993 src/main/envir.c:1046 src/main/envir.c:1136
-#: src/main/envir.c:1615 src/main/envir.c:1739 src/main/envir.c:1807
-#: src/main/envir.c:1925 src/main/envir.c:2582 src/main/envir.c:2642
-#: src/main/envir.c:2922 src/main/envir.c:2951 src/main/envir.c:2972
-#: src/main/envir.c:2995 src/main/envir.c:3030 src/main/envir.c:3051
-#: src/main/envir.c:3357 src/main/envir.c:3362 src/main/eval.c:5318
-#: src/main/objects.c:197 src/main/objects.c:203 src/main/saveload.c:2070
-#: src/main/saveload.c:2364 src/main/serialize.c:2709
+#: src/main/builtin.c:84 src/main/builtin.c:93 src/main/builtin.c:304
+#: src/main/builtin.c:337 src/main/builtin.c:394 src/main/builtin.c:408
+#: src/main/coerce.c:1536 src/main/connections.c:3062 src/main/engine.c:2987
+#: src/main/envir.c:1001 src/main/envir.c:1054 src/main/envir.c:1210
+#: src/main/envir.c:1749 src/main/envir.c:1873 src/main/envir.c:1939
+#: src/main/envir.c:2072 src/main/envir.c:2791 src/main/envir.c:2877
+#: src/main/envir.c:3182 src/main/envir.c:3211 src/main/envir.c:3232
+#: src/main/envir.c:3255 src/main/envir.c:3290 src/main/envir.c:3311
+#: src/main/envir.c:3632 src/main/envir.c:3637 src/main/eval.c:6251
+#: src/main/objects.c:191 src/main/objects.c:199 src/main/saveload.c:2072
+#: src/main/saveload.c:2364 src/main/serialize.c:2755
 msgid "use of NULL environment is defunct"
 msgstr ""
 
-#: src/main/builtin.c:306
+#: src/main/builtin.c:250 src/main/builtin.c:263
+msgid "argument is not a function"
+msgstr ""
+
+#: src/main/builtin.c:317
 msgid "replacement object is not an environment"
 msgstr ""
 
-#: src/main/builtin.c:331
+#: src/main/builtin.c:342
 msgid "'enclos' must be an environment"
 msgstr ""
 
-#: src/main/builtin.c:352 src/main/builtin.c:370
+#: src/main/builtin.c:363 src/main/builtin.c:399
 msgid "argument is not an environment"
 msgstr ""
 
-#: src/main/builtin.c:354
+#: src/main/builtin.c:365
 msgid "the empty environment has no parent"
 msgstr ""
 
-#: src/main/builtin.c:372
+#: src/main/builtin.c:401
 msgid "can not set parent of the empty environment"
 msgstr ""
 
-#: src/main/builtin.c:380
+#: src/main/builtin.c:403
+msgid "can not set the parent environment of a namespace"
+msgstr ""
+
+#: src/main/builtin.c:405
+msgid "can not set the parent environment of package imports"
+msgstr ""
+
+#: src/main/builtin.c:413
 msgid "'parent' is not an environment"
 msgstr ""
 
-#: src/main/builtin.c:521 src/main/connections.c:3691
-#: src/main/connections.c:4068 src/main/connections.c:4102
-#: src/main/connections.c:4480 src/main/connections.c:4550
-#: src/main/connections.c:4759 src/main/connections.c:4763
-#: src/main/connections.c:5124 src/main/deparse.c:360 src/main/deparse.c:446
-#: src/main/serialize.c:2006
+#: src/main/builtin.c:556 src/main/connections.c:3687
+#: src/main/connections.c:4079 src/main/connections.c:4113
+#: src/main/connections.c:4491 src/main/connections.c:4561
+#: src/main/connections.c:4772 src/main/connections.c:4776
+#: src/main/connections.c:5199 src/main/deparse.c:369 src/main/deparse.c:458
+#: src/main/serialize.c:2045
 msgid "cannot write to this connection"
 msgstr ""
 
-#: src/main/builtin.c:526 src/main/builtin.c:556
+#: src/main/builtin.c:561 src/main/builtin.c:591
 #, c-format
 msgid "invalid '%s' specification"
 msgstr ""
 
-#: src/main/builtin.c:543
+#: src/main/builtin.c:578
 msgid "non-positive 'fill' argument will be ignored"
 msgstr ""
 
-#: src/main/builtin.c:618
+#: src/main/builtin.c:653
 #, c-format
 msgid "argument %d (type '%s') cannot be handled by 'cat'"
 msgstr ""
 
-#: src/main/builtin.c:763
+#: src/main/builtin.c:797
 #, c-format
 msgid "vector: cannot make a vector of mode '%s'."
 msgstr ""
 
-#: src/main/builtin.c:789
+#: src/main/builtin.c:823
 msgid "cannot set length of non-vector"
 msgstr ""
 
-#: src/main/builtin.c:897 src/main/builtin.c:907 src/main/options.c:637
+#: src/main/builtin.c:931 src/main/builtin.c:941 src/main/options.c:659
 msgid "invalid argument"
 msgstr ""
 
-#: src/main/builtin.c:899 src/main/builtin.c:909 src/main/builtin.c:911
-#: src/main/character.c:366 src/main/coerce.c:2765
+#: src/main/builtin.c:933 src/main/builtin.c:943 src/main/builtin.c:945
+#: src/main/character.c:525 src/main/coerce.c:2832
 msgid "invalid value"
 msgstr ""
 
-#: src/main/builtin.c:942 src/main/coerce.c:2478 src/main/coerce.c:2519
-#: src/main/eval.c:563 src/main/eval.c:683 src/main/eval.c:2099
-#: src/main/eval.c:2176 src/main/eval.c:2236 src/main/eval.c:2569
-#: src/main/eval.c:4694 src/main/eval.c:4814
+#: src/main/builtin.c:976 src/main/coerce.c:2541 src/main/coerce.c:2584
+#: src/main/eval.c:620 src/main/eval.c:740 src/main/eval.c:2266
+#: src/main/eval.c:2346 src/main/eval.c:2407 src/main/eval.c:2745
+#: src/main/eval.c:5584 src/main/eval.c:5701
 msgid "'...' used in an incorrect context"
 msgstr ""
 
-#: src/main/builtin.c:963
+#: src/main/builtin.c:998
 #, c-format
 msgid "duplicate 'switch' defaults: '%s' and '%s'"
 msgstr ""
 
-#: src/main/builtin.c:996
+#: src/main/builtin.c:1031
 msgid "'EXPR' is missing"
 msgstr ""
 
-#: src/main/builtin.c:1000 src/main/eval.c:5155
+#: src/main/builtin.c:1035 src/main/eval.c:6056
 msgid "EXPR must be a length 1 vector"
 msgstr ""
 
-#: src/main/builtin.c:1003
+#: src/main/builtin.c:1038 src/main/eval.c:6059
 #, c-format
 msgid ""
 "EXPR is a \"factor\", treated as integer.\n"
 " Consider using '%s' instead."
 msgstr ""
 
-#: src/main/character.c:105 src/main/character.c:108 src/main/character.c:132
-#: src/main/character.c:135
+#: src/main/builtin.c:1095 src/main/eval.c:6069 src/main/eval.c:6098
+msgid "'switch' with no alternatives"
+msgstr ""
+
+#: src/main/character.c:103 src/main/character.c:224
+#, c-format
+msgid "%d argument passed to '%s' which requires %d to %d"
+msgid_plural "%d arguments passed to '%s' which requires %d to %d"
+msgstr[0] ""
+msgstr[1] ""
+
+#: src/main/character.c:110 src/main/character.c:113 src/main/character.c:232
+#: src/main/character.c:235
 #, c-format
 msgid "'%s' requires a character vector"
 msgstr ""
 
-#: src/main/character.c:164
+#: src/main/character.c:150 src/main/character.c:165 src/main/character.c:175
+#: src/main/character.c:203
 #, c-format
-msgid ""
-"number of characters is not computable for element %d in \"bytes\" encoding"
+msgid "invalid multibyte string, %s"
 msgstr ""
 
-#: src/main/character.c:169 src/main/character.c:197 src/main/character.c:653
-#: src/main/character.c:750
+#: src/main/character.c:159
 #, c-format
-msgid "invalid multibyte string %d"
+msgid "number of characters is not computable in \"bytes\" encoding, %s"
 msgstr ""
 
-#: src/main/character.c:185
+#: src/main/character.c:188
 #, c-format
-msgid "width is not computable for element %d in \"bytes\" encoding"
+msgid "width is not computable for %s in \"bytes\" encoding"
 msgstr ""
 
-#: src/main/character.c:263
+#: src/main/character.c:311
 msgid "extracting substrings from a non-character object"
 msgstr ""
 
-#: src/main/character.c:268 src/main/character.c:363
+#: src/main/character.c:321 src/main/character.c:522
 msgid "invalid substring arguments"
 msgstr ""
 
-#: src/main/character.c:358
+#: src/main/character.c:361
+msgid "non-character object(s)"
+msgstr ""
+
+#: src/main/character.c:517
 msgid "replacing substrings in a non-character object"
 msgstr ""
 
-#: src/main/character.c:551
+#: src/main/character.c:785
 msgid "the first argument must be a character vector"
 msgstr ""
 
-#: src/main/character.c:570
+#: src/main/character.c:822
 msgid "abbreviate used with non-ASCII chars"
 msgstr ""
 
-#: src/main/character.c:591
+#: src/main/character.c:843
 msgid "non-character names"
 msgstr ""
 
-#: src/main/character.c:696 src/main/grep.c:159
+#: src/main/character.c:905 src/main/character.c:1002
+#, c-format
+msgid "invalid multibyte string %d"
+msgstr ""
+
+#: src/main/character.c:948 src/main/grep.c:163
 msgid "non-character argument"
 msgstr ""
 
-#: src/main/character.c:805
+#: src/main/character.c:1057
 #, c-format
 msgid "decreasing range specification ('%lc-%lc')"
 msgstr ""
 
-#: src/main/character.c:891
+#: src/main/character.c:1143
 #, c-format
 msgid "decreasing range specification ('%c-%c')"
 msgstr ""
 
-#: src/main/character.c:1079
+#: src/main/character.c:1331
 msgid "invalid UTF-8 string 'old'"
 msgstr ""
 
-#: src/main/character.c:1085
+#: src/main/character.c:1337
 msgid "invalid multibyte string 'old'"
 msgstr ""
 
-#: src/main/character.c:1098
+#: src/main/character.c:1350
 msgid "invalid UTF-8 string 'new'"
 msgstr ""
 
-#: src/main/character.c:1104
+#: src/main/character.c:1356
 msgid "invalid multibyte string 'new'"
 msgstr ""
 
-#: src/main/character.c:1132 src/main/character.c:1221
+#: src/main/character.c:1384 src/main/character.c:1473
 msgid "'old' is longer than 'new'"
 msgstr ""
 
-#: src/main/character.c:1164
+#: src/main/character.c:1416
 #, c-format
 msgid "invalid input multibyte string %d"
 msgstr ""
 
-#: src/main/character.c:1271
+#: src/main/character.c:1523
 msgid "strtrim() requires a character vector"
 msgstr ""
 
@@ -1484,15 +1534,15 @@ msgstr ""
 msgid "applies only to lists and vectors"
 msgstr ""
 
-#: src/main/coerce.c:77 src/main/errors.c:1208
+#: src/main/coerce.c:77 src/main/errors.c:1194
 msgid "NAs introduced by coercion"
 msgstr ""
 
-#: src/main/coerce.c:79 src/main/errors.c:1209
-msgid "inaccurate integer conversion in coercion"
+#: src/main/coerce.c:79
+msgid "NAs introduced by coercion to integer range"
 msgstr ""
 
-#: src/main/coerce.c:81 src/main/errors.c:1210
+#: src/main/coerce.c:81 src/main/errors.c:1196
 msgid "imaginary parts discarded in coercion"
 msgstr ""
 
@@ -1500,59 +1550,63 @@ msgstr ""
 msgid "out-of-range values treated as 0 in coercion to raw"
 msgstr ""
 
-#: src/main/coerce.c:414
+#: src/main/coerce.c:399
 #, c-format
 msgid "invalid data of mode '%s' (too short)"
 msgstr ""
 
-#: src/main/coerce.c:1016
+#: src/main/coerce.c:1002
 #, c-format
 msgid "'pairlist' object cannot be coerced to type '%s'"
 msgstr ""
 
-#: src/main/coerce.c:1134
+#: src/main/coerce.c:1120
 #, c-format
 msgid "(list) object cannot be coerced to type '%s'"
 msgstr ""
 
-#: src/main/coerce.c:1157
+#: src/main/coerce.c:1143
 #, c-format
 msgid "(symbol) object cannot be coerced to type '%s'"
 msgstr ""
 
-#: src/main/coerce.c:1173 src/main/coerce.c:1485
+#: src/main/coerce.c:1159 src/main/coerce.c:1484
 msgid "no method for coercing this S4 class to a vector"
 msgstr ""
 
-#: src/main/coerce.c:1232
+#: src/main/coerce.c:1222
 msgid "environments cannot be coerced to other types"
 msgstr ""
 
-#: src/main/coerce.c:1379
+#: src/main/coerce.c:1374
 msgid "attempting to coerce non-factor"
 msgstr ""
 
-#: src/main/coerce.c:1533
+#: src/main/coerce.c:1379 src/main/coerce.c:1389
+msgid "malformed factor"
+msgstr ""
+
+#: src/main/coerce.c:1532
 msgid "list argument expected"
 msgstr ""
 
-#: src/main/coerce.c:1541 src/main/eval.c:5322
+#: src/main/coerce.c:1540 src/main/eval.c:6255
 msgid "invalid environment"
 msgstr ""
 
-#: src/main/coerce.c:1545
+#: src/main/coerce.c:1544
 msgid "argument must have length at least 1"
 msgstr ""
 
-#: src/main/coerce.c:1567
+#: src/main/coerce.c:1566
 msgid "invalid body for function"
 msgstr ""
 
-#: src/main/coerce.c:1590
+#: src/main/coerce.c:1589
 msgid "invalid length 0 argument"
 msgstr ""
 
-#: src/main/coerce.c:1605
+#: src/main/coerce.c:1604
 msgid "invalid argument list"
 msgstr ""
 
@@ -1564,772 +1618,766 @@ msgstr ""
 msgid "unimplemented predicate"
 msgstr ""
 
-#: src/main/coerce.c:2069
+#: src/main/coerce.c:2070
 #, c-format
 msgid "%s() applied to non-(list or vector) of type '%s'"
 msgstr ""
 
-#: src/main/coerce.c:2212 src/main/coerce.c:2275 src/main/coerce.c:2343
+#: src/main/coerce.c:2267 src/main/coerce.c:2331 src/main/coerce.c:2403
 #, c-format
 msgid "default method not implemented for type '%s'"
 msgstr ""
 
-#: src/main/coerce.c:2361
+#: src/main/coerce.c:2425
 msgid "'name' is missing"
 msgstr ""
 
-#: src/main/coerce.c:2368
+#: src/main/coerce.c:2432
 msgid "first argument must be a character string"
 msgstr ""
 
-#: src/main/coerce.c:2401
-msgid "'what' must be a character string or a function"
+#: src/main/coerce.c:2464
+msgid "'what' must be a function or character string"
 msgstr ""
 
-#: src/main/coerce.c:2405
+#: src/main/coerce.c:2468
 msgid "'args' must be a list or expression"
 msgstr ""
 
-#: src/main/coerce.c:2408
-msgid "'args' must be a list"
-msgstr ""
-
-#: src/main/coerce.c:2412
+#: src/main/coerce.c:2475 src/main/unique.c:1345
 msgid "'envir' must be an environment"
 msgstr ""
 
-#: src/main/coerce.c:2567
+#: src/main/coerce.c:2634
 msgid "invalid environment specified"
 msgstr ""
 
-#: src/main/coerce.c:2633
+#: src/main/coerce.c:2700
 msgid "Setting class(x) to NULL;   result will no longer be an S4 object"
 msgstr ""
 
-#: src/main/coerce.c:2636
+#: src/main/coerce.c:2703
 #, c-format
 msgid ""
 "Setting class(x) to multiple strings (\"%s\", \"%s\", ...); result will no "
 "longer be an S4 object"
 msgstr ""
 
-#: src/main/coerce.c:2640
+#: src/main/coerce.c:2707
 #, c-format
 msgid ""
 "Setting class(x) to \"%s\" sets attribute to NULL; result will no longer be "
 "an S4 object"
 msgstr ""
 
-#: src/main/coerce.c:2673
+#: src/main/coerce.c:2740
 msgid "invalid replacement object to be a class string"
 msgstr ""
 
-#: src/main/coerce.c:2694
+#: src/main/coerce.c:2761
 #, c-format
 msgid ""
 "\"%s\" can only be set as the class if the object has this type; found \"%s\""
 msgstr ""
 
-#: src/main/coerce.c:2712
+#: src/main/coerce.c:2779
 #, c-format
 msgid ""
 "invalid to set the class to matrix unless the dimension attribute is of "
 "length 2 (was %d)"
 msgstr ""
 
-#: src/main/coerce.c:2720
+#: src/main/coerce.c:2787
 msgid ""
 "cannot set class to \"array\" unless the dimension attribute has length > 0"
 msgstr ""
 
-#: src/main/coerce.c:2756
+#: src/main/coerce.c:2823
 msgid "'value' must be non-null character string"
 msgstr ""
 
-#: src/main/coerce.c:2769
+#: src/main/coerce.c:2836
 msgid "invalid to change the storage mode of a factor"
 msgstr ""
 
-#: src/main/complex.c:126
+#: src/main/complex.c:123
 msgid "invalid complex unary operator"
 msgstr ""
 
-#: src/main/complex.c:261
+#: src/main/complex.c:251
 msgid "unimplemented complex operation"
 msgstr ""
 
-#: src/main/complex.c:363
+#: src/main/complex.c:353
 msgid "non-numeric argument to function"
 msgstr ""
 
-#: src/main/complex.c:827
+#: src/main/complex.c:822
 msgid "invalid polynomial coefficient"
 msgstr ""
 
-#: src/main/complex.c:832
+#: src/main/complex.c:827
 msgid "root finding code failed"
 msgstr ""
 
-#: src/main/connections.c:153
+#: src/main/connections.c:150
 msgid "all connections are in use"
 msgstr ""
 
-#: src/main/connections.c:164
+#: src/main/connections.c:161
 msgid "connection not found"
 msgstr ""
 
-#: src/main/connections.c:175
+#: src/main/connections.c:172 src/main/connections.c:5213
 msgid "invalid connection"
 msgstr ""
 
-#: src/main/connections.c:207
+#: src/main/connections.c:204
 #, c-format
 msgid "closing unused connection %d (%s)\n"
 msgstr ""
 
-#: src/main/connections.c:232 src/main/sysutils.c:619 src/main/sysutils.c:806
-#: src/main/sysutils.c:821 src/main/sysutils.c:912 src/main/sysutils.c:927
-#: src/main/sysutils.c:1023 src/main/sysutils.c:1096 src/main/sysutils.c:1106
-#: src/main/sysutils.c:1119 src/main/sysutils.c:1516
+#: src/main/connections.c:229 src/main/sysutils.c:631 src/main/sysutils.c:834
+#: src/main/sysutils.c:849 src/main/sysutils.c:978 src/main/sysutils.c:1051
+#: src/main/sysutils.c:1061 src/main/sysutils.c:1074 src/main/sysutils.c:1472
 #, c-format
 msgid "unsupported conversion from '%s' to '%s'"
 msgstr ""
 
-#: src/main/connections.c:288 src/main/connections.c:304
-#: src/main/connections.c:456 src/main/connections.c:462
-#: src/main/connections.c:468 src/main/connections.c:479
-#: src/main/connections.c:486
+#: src/main/connections.c:285 src/main/connections.c:300
+#: src/main/connections.c:451 src/main/connections.c:456
+#: src/main/connections.c:461 src/main/connections.c:472
+#: src/main/connections.c:478
 #, c-format
 msgid "%s not enabled for this connection"
 msgstr ""
 
-#: src/main/connections.c:335 src/main/connections.c:352
-#: src/main/connections.c:2916
+#: src/main/connections.c:330 src/main/connections.c:347
+#: src/main/connections.c:2910
 msgid "printing of extremely long output is truncated"
 msgstr ""
 
-#: src/main/connections.c:375
+#: src/main/connections.c:370
 msgid "invalid char string in output conversion"
 msgstr ""
 
-#: src/main/connections.c:439
+#: src/main/connections.c:434
 #, c-format
 msgid "invalid input found on input connection '%s'"
 msgstr ""
 
-#: src/main/connections.c:580
+#: src/main/connections.c:571
 #, c-format
 msgid "cannot open file '%ls': %s"
 msgstr ""
 
-#: src/main/connections.c:691
+#: src/main/connections.c:683
 msgid "connection is not open for reading"
 msgstr ""
 
-#: src/main/connections.c:696
+#: src/main/connections.c:688
 msgid "connection is not open for writing"
 msgstr ""
 
-#: src/main/connections.c:734 src/main/connections.c:2229
+#: src/main/connections.c:726 src/main/connections.c:2223
 msgid "can only truncate connections open for writing"
 msgstr ""
 
-#: src/main/connections.c:738 src/main/connections.c:740
+#: src/main/connections.c:730 src/main/connections.c:732
 msgid "file truncation failed"
 msgstr ""
 
-#: src/main/connections.c:742
+#: src/main/connections.c:734
 msgid "file truncation unavailable on this platform"
 msgstr ""
 
-#: src/main/connections.c:788 src/main/connections.c:792
-#: src/main/connections.c:798 src/main/connections.c:815
+#: src/main/connections.c:780 src/main/connections.c:784
+#: src/main/connections.c:790 src/main/connections.c:807
 msgid "allocation of file connection failed"
 msgstr ""
 
-#: src/main/connections.c:866 src/main/connections.c:1044
+#: src/main/connections.c:858 src/main/connections.c:1035
 #, c-format
 msgid "cannot create fifo '%s', reason '%s'"
 msgstr ""
 
-#: src/main/connections.c:872
+#: src/main/connections.c:864
 #, c-format
 msgid "'%s' exists but is not a fifo"
 msgstr ""
 
-#: src/main/connections.c:886
+#: src/main/connections.c:878
 #, c-format
 msgid "fifo '%s' is not ready"
 msgstr ""
 
-#: src/main/connections.c:887
+#: src/main/connections.c:879
 #, c-format
 msgid "cannot open fifo '%s'"
 msgstr ""
 
-#: src/main/connections.c:928 src/main/connections.c:939
-#: src/main/connections.c:1104 src/main/connections.c:1123
-#: src/main/connections.c:1531 src/main/connections.c:1541
-#: src/main/connections.c:1660 src/main/connections.c:1720
-#: src/main/connections.c:2246 src/main/connections.c:2263
-#: src/main/connections.c:2572 src/main/connections.c:5305
-#: src/main/connections.c:5369
+#: src/main/connections.c:920 src/main/connections.c:931
+#: src/main/connections.c:1095 src/main/connections.c:1114
+#: src/main/connections.c:1524 src/main/connections.c:1534
+#: src/main/connections.c:1653 src/main/connections.c:1713
+#: src/main/connections.c:2240 src/main/connections.c:2257
+#: src/main/connections.c:2566 src/main/connections.c:5385
+#: src/main/connections.c:5449
 msgid "too large a block specified"
 msgstr ""
 
-#: src/main/connections.c:998 src/main/connections.c:1004
+#: src/main/connections.c:989 src/main/connections.c:995
 msgid "allocation of fifo name failed"
 msgstr ""
 
-#: src/main/connections.c:1066
+#: src/main/connections.c:1057
 #, c-format
 msgid "cannot open fifo '%s', reason '%s'"
 msgstr ""
 
-#: src/main/connections.c:1107 src/main/connections.c:1131
+#: src/main/connections.c:1098 src/main/connections.c:1122
 msgid "allocation of fifo buffer failed"
 msgstr ""
 
-#: src/main/connections.c:1139
+#: src/main/connections.c:1130
 #, c-format
 msgid "cannot write FIFO '%s'"
 msgstr ""
 
-#: src/main/connections.c:1175 src/main/connections.c:1179
-#: src/main/connections.c:1185 src/main/connections.c:1201
+#: src/main/connections.c:1166 src/main/connections.c:1170
+#: src/main/connections.c:1176 src/main/connections.c:1192
 msgid "allocation of fifo connection failed"
 msgstr ""
 
-#: src/main/connections.c:1219 src/main/connections.c:1377
-#: src/main/connections.c:1998 src/main/connections.c:3212
-#: src/main/connections.c:4967
+#: src/main/connections.c:1210 src/main/connections.c:1369
+#: src/main/connections.c:1991 src/main/connections.c:3205
+#: src/main/connections.c:4982
 msgid "only first element of 'description' argument used"
 msgstr ""
 
-#: src/main/connections.c:1236
+#: src/main/connections.c:1227
 msgid ""
 "fifo(\"\") only supports open = \"w+\" and open = \"w+b\": using the former"
 msgstr ""
 
-#: src/main/connections.c:1250 src/main/connections.c:1414
-#: src/main/connections.c:2064 src/main/connections.c:3179
-#: src/main/connections.c:3232 src/main/connections.c:3280
-#: src/main/connections.c:3567 src/main/connections.c:3683
-#: src/main/connections.c:3844 src/main/connections.c:4095
-#: src/main/connections.c:4423 src/main/connections.c:4543
-#: src/main/connections.c:4755 src/main/connections.c:5105 src/main/dcf.c:94
-#: src/main/deparse.c:352 src/main/deparse.c:438 src/main/saveload.c:2267
-#: src/main/saveload.c:2350 src/main/scan.c:933 src/main/serialize.c:2175
-#: src/main/serialize.c:2226 src/main/source.c:265
+#: src/main/connections.c:1242 src/main/connections.c:1407
+#: src/main/connections.c:2058 src/main/connections.c:3175
+#: src/main/connections.c:3226 src/main/connections.c:3274
+#: src/main/connections.c:3563 src/main/connections.c:3679
+#: src/main/connections.c:3841 src/main/connections.c:4106
+#: src/main/connections.c:4434 src/main/connections.c:4554
+#: src/main/connections.c:4768 src/main/connections.c:5180 src/main/dcf.c:93
+#: src/main/deparse.c:361 src/main/deparse.c:450 src/main/saveload.c:2269
+#: src/main/saveload.c:2350 src/main/scan.c:933 src/main/serialize.c:2216
+#: src/main/serialize.c:2267 src/main/source.c:270
 msgid "cannot open the connection"
 msgstr ""
 
-#: src/main/connections.c:1265
+#: src/main/connections.c:1257
 msgid "fifo connections are not available on this system"
 msgstr ""
 
-#: src/main/connections.c:1295
+#: src/main/connections.c:1287
 #, c-format
 msgid "cannot pipe() cmd '%ls': %s"
 msgstr ""
 
-#: src/main/connections.c:1302
+#: src/main/connections.c:1294
 #, c-format
 msgid "cannot open pipe() cmd '%s': %s"
 msgstr ""
 
-#: src/main/connections.c:1471 src/main/connections.c:1791
+#: src/main/connections.c:1464 src/main/connections.c:1784
 #, c-format
 msgid "cannot open compressed file '%s', probable reason '%s'"
 msgstr ""
 
-#: src/main/connections.c:1511
+#: src/main/connections.c:1504
 msgid "whence = \"end\" is not implemented for gzfile connections"
 msgstr ""
 
-#: src/main/connections.c:1516
+#: src/main/connections.c:1509
 msgid "seek on a gzfile connection returned an internal error"
 msgstr ""
 
-#: src/main/connections.c:1550 src/main/connections.c:1554
-#: src/main/connections.c:1560 src/main/connections.c:1577
+#: src/main/connections.c:1543 src/main/connections.c:1547
+#: src/main/connections.c:1553 src/main/connections.c:1570
 msgid "allocation of gzfile connection failed"
 msgstr ""
 
-#: src/main/connections.c:1606
+#: src/main/connections.c:1599
 #, c-format
 msgid "cannot open bzip2-ed file '%s', probable reason '%s'"
 msgstr ""
 
-#: src/main/connections.c:1615
+#: src/main/connections.c:1608
 #, c-format
 msgid "file '%s' appears not to be compressed by bzip2"
 msgstr ""
 
-#: src/main/connections.c:1624
+#: src/main/connections.c:1617
 #, c-format
 msgid "initializing bzip2 compression for file '%s' failed"
 msgstr ""
 
-#: src/main/connections.c:1678
+#: src/main/connections.c:1671
 msgid "allocation of overflow buffer for bzfile failed"
 msgstr ""
 
-#: src/main/connections.c:1685
+#: src/main/connections.c:1678
 #, c-format
 msgid ""
 "file '%s' has trailing content that appears not to be compressed by bzip2"
 msgstr ""
 
-#: src/main/connections.c:1731 src/main/connections.c:1735
-#: src/main/connections.c:1741 src/main/connections.c:1758
+#: src/main/connections.c:1724 src/main/connections.c:1728
+#: src/main/connections.c:1734 src/main/connections.c:1751
 msgid "allocation of bzfile connection failed"
 msgstr ""
 
-#: src/main/connections.c:1804 src/main/connections.c:5961
+#: src/main/connections.c:1797 src/main/connections.c:6046
 #, c-format
 msgid "cannot initialize lzma decoder, error %d"
 msgstr ""
 
-#: src/main/connections.c:1820
+#: src/main/connections.c:1813
 #, c-format
 msgid "cannot initialize lzma encoder, error %d"
 msgstr ""
 
-#: src/main/connections.c:1948 src/main/connections.c:1952
-#: src/main/connections.c:1958 src/main/connections.c:1976
+#: src/main/connections.c:1941 src/main/connections.c:1945
+#: src/main/connections.c:1951 src/main/connections.c:1969
 msgid "allocation of xzfile connection failed"
 msgstr ""
 
-#: src/main/connections.c:2035
+#: src/main/connections.c:2028
 #, c-format
 msgid "this is a %s-compressed file which this build of R does not support"
 msgstr ""
 
-#: src/main/connections.c:2130 src/modules/X11/devX11.c:3375
+#: src/main/connections.c:2124 src/modules/X11/devX11.c:3381
 msgid "memory allocation to copy clipboard failed"
 msgstr ""
 
-#: src/main/connections.c:2135 src/modules/X11/devX11.c:3354
-#: src/modules/X11/devX11.c:3359
+#: src/main/connections.c:2129 src/modules/X11/devX11.c:3360
+#: src/modules/X11/devX11.c:3365
 msgid "clipboard cannot be opened or contains no text"
 msgstr ""
 
-#: src/main/connections.c:2146
+#: src/main/connections.c:2140
 msgid "memory allocation to open clipboard failed"
 msgstr ""
 
-#: src/main/connections.c:2174
+#: src/main/connections.c:2168
 msgid "unable to open the clipboard"
 msgstr ""
 
-#: src/main/connections.c:2178
+#: src/main/connections.c:2172
 msgid "unable to write to the clipboard"
 msgstr ""
 
-#: src/main/connections.c:2218
+#: src/main/connections.c:2212
 msgid "attempt to seek outside the range of the clipboard"
 msgstr ""
 
-#: src/main/connections.c:2261
+#: src/main/connections.c:2255
 msgid "clipboard connection is open for reading only"
 msgstr ""
 
-#: src/main/connections.c:2281
+#: src/main/connections.c:2275
 msgid "clipboard buffer is full and output lost"
 msgstr ""
 
-#: src/main/connections.c:2302
+#: src/main/connections.c:2296
 msgid "'mode' for the clipboard must be 'r' or 'w'"
 msgstr ""
 
-#: src/main/connections.c:2305
+#: src/main/connections.c:2299
 msgid "'mode' for the clipboard must be 'r' on Unix"
 msgstr ""
 
-#: src/main/connections.c:2308 src/main/connections.c:2314
-#: src/main/connections.c:2320 src/main/connections.c:2337
+#: src/main/connections.c:2302 src/main/connections.c:2308
+#: src/main/connections.c:2314 src/main/connections.c:2331
 msgid "allocation of clipboard connection failed"
 msgstr ""
 
-#: src/main/connections.c:2406 src/main/connections.c:2410
-#: src/main/connections.c:2416
+#: src/main/connections.c:2400 src/main/connections.c:2404
+#: src/main/connections.c:2410
 msgid "allocation of terminal connection failed"
 msgstr ""
 
-#: src/main/connections.c:2549
+#: src/main/connections.c:2543
 msgid "attempting to add too many elements to raw vector"
 msgstr ""
 
-#: src/main/connections.c:2601
+#: src/main/connections.c:2595
 msgid "attempt to seek outside the range of the raw connection"
 msgstr ""
 
-#: src/main/connections.c:2612 src/main/connections.c:2616
-#: src/main/connections.c:2622 src/main/connections.c:2648
+#: src/main/connections.c:2606 src/main/connections.c:2610
+#: src/main/connections.c:2616 src/main/connections.c:2642
 msgid "allocation of raw connection failed"
 msgstr ""
 
-#: src/main/connections.c:2701
+#: src/main/connections.c:2695
 msgid "'con' is not a rawConnection"
 msgstr ""
 
-#: src/main/connections.c:2704
+#: src/main/connections.c:2698
 msgid "'con' is not an output rawConnection"
 msgstr ""
 
-#: src/main/connections.c:2742
+#: src/main/connections.c:2736
 msgid "too many characters for text connection"
 msgstr ""
 
-#: src/main/connections.c:2747
+#: src/main/connections.c:2741
 msgid "cannot allocate memory for text connection"
 msgstr ""
 
-#: src/main/connections.c:2796
+#: src/main/connections.c:2790
 msgid "seek is not relevant for text connection"
 msgstr ""
 
-#: src/main/connections.c:2804 src/main/connections.c:2808
-#: src/main/connections.c:2814 src/main/connections.c:2827
-#: src/main/connections.c:3012 src/main/connections.c:3016
-#: src/main/connections.c:3022 src/main/connections.c:3035
-#: src/main/connections.c:3041
+#: src/main/connections.c:2798 src/main/connections.c:2802
+#: src/main/connections.c:2808 src/main/connections.c:2821
+#: src/main/connections.c:3008 src/main/connections.c:3012
+#: src/main/connections.c:3018 src/main/connections.c:3031
+#: src/main/connections.c:3037
 msgid "allocation of text connection failed"
 msgstr ""
 
-#: src/main/connections.c:2989
+#: src/main/connections.c:2983
 msgid "text connection: appending to a non-existent char vector"
 msgstr ""
 
-#: src/main/connections.c:3093
+#: src/main/connections.c:3089
 msgid "unsupported mode"
 msgstr ""
 
-#: src/main/connections.c:3115
+#: src/main/connections.c:3111
 msgid "'con' is not a textConnection"
 msgstr ""
 
-#: src/main/connections.c:3118
+#: src/main/connections.c:3114
 msgid "'con' is not an output textConnection"
 msgstr ""
 
-#: src/main/connections.c:3192
-msgid "sockets are not available on this system"
-msgstr ""
-
-#: src/main/connections.c:3260 src/main/connections.c:3309
-#: src/main/connections.c:3320 src/main/connections.c:3367
-#: src/main/connections.c:3392 src/main/connections.c:3415
-#: src/main/connections.c:3427 src/main/connections.c:3543
-#: src/main/connections.c:3668 src/main/connections.c:5408
+#: src/main/connections.c:3254 src/main/connections.c:3303
+#: src/main/connections.c:3314 src/main/connections.c:3361
+#: src/main/connections.c:3388 src/main/connections.c:3411
+#: src/main/connections.c:3423 src/main/connections.c:3539
+#: src/main/connections.c:3664 src/main/connections.c:5489
 msgid "'con' is not a connection"
 msgstr ""
 
-#: src/main/connections.c:3263
+#: src/main/connections.c:3257
 msgid "cannot open standard connections"
 msgstr ""
 
-#: src/main/connections.c:3265
+#: src/main/connections.c:3259
 msgid "connection is already open"
 msgstr ""
 
-#: src/main/connections.c:3298
+#: src/main/connections.c:3292
 msgid "unknown 'rw' value"
 msgstr ""
 
-#: src/main/connections.c:3369
+#: src/main/connections.c:3363
 msgid "cannot close standard connections"
 msgstr ""
 
-#: src/main/connections.c:3372
+#: src/main/connections.c:3366
 msgid "cannot close 'output' sink connection"
 msgstr ""
 
-#: src/main/connections.c:3374
+#: src/main/connections.c:3368
 msgid "cannot close 'message' sink connection"
 msgstr ""
 
-#: src/main/connections.c:3394 src/main/connections.c:5123
-#: src/main/connections.c:5131 src/main/serialize.c:1996
-#: src/main/serialize.c:2004
+#: src/main/connections.c:3390 src/main/connections.c:5198
+#: src/main/connections.c:5206 src/main/serialize.c:2035
+#: src/main/serialize.c:2043
 msgid "connection is not open"
 msgstr ""
 
-#: src/main/connections.c:3490 src/main/connections.c:3502
+#: src/main/connections.c:3486 src/main/connections.c:3498
 msgid "line longer than buffer size"
 msgstr ""
 
-#: src/main/connections.c:3574 src/main/connections.c:3576
-#: src/main/connections.c:3852 src/main/connections.c:4406
-#: src/main/connections.c:4431 src/main/connections.c:5132 src/main/dcf.c:101
-#: src/main/scan.c:936 src/main/scan.c:940 src/main/serialize.c:1998
-#: src/main/source.c:272
+#: src/main/connections.c:3570 src/main/connections.c:3572
+#: src/main/connections.c:3849 src/main/connections.c:4417
+#: src/main/connections.c:4442 src/main/connections.c:5207 src/main/dcf.c:100
+#: src/main/scan.c:936 src/main/scan.c:940 src/main/serialize.c:2037
+#: src/main/source.c:277
 msgid "cannot read from this connection"
 msgstr ""
 
-#: src/main/connections.c:3588 src/main/connections.c:3610
+#: src/main/connections.c:3584 src/main/connections.c:3606
 msgid "cannot allocate buffer in readLines"
 msgstr ""
 
-#: src/main/connections.c:3623
+#: src/main/connections.c:3619
 #, c-format
 msgid "line %d appears to contain an embedded nul"
 msgstr ""
 
-#: src/main/connections.c:3640
+#: src/main/connections.c:3636
 #, c-format
 msgid "incomplete final line found on '%s'"
 msgstr ""
 
-#: src/main/connections.c:3646
+#: src/main/connections.c:3642
 msgid "too few lines read in readLines"
 msgstr ""
 
-#: src/main/connections.c:3749
+#: src/main/connections.c:3746
 msgid "incomplete string at end of file has been discarded"
 msgstr ""
 
-#: src/main/connections.c:3755
+#: src/main/connections.c:3752
 msgid "null terminator not found: breaking string at 10000 bytes"
 msgstr ""
 
-#: src/main/connections.c:3820
+#: src/main/connections.c:3817
 msgid "can only read from a binary connection"
 msgstr ""
 
-#: src/main/connections.c:3869 src/main/connections.c:4176
+#: src/main/connections.c:3866 src/main/connections.c:4187
 msgid "size changing is not supported for complex vectors"
 msgstr ""
 
-#: src/main/connections.c:3907 src/main/connections.c:3925
-#: src/main/connections.c:3951 src/main/connections.c:4010
-#: src/main/connections.c:4030 src/main/connections.c:4157
-#: src/main/connections.c:4170 src/main/connections.c:4229
-#: src/main/connections.c:4261
+#: src/main/connections.c:3905 src/main/connections.c:3923
+#: src/main/connections.c:3949 src/main/connections.c:3993
+#: src/main/connections.c:4024 src/main/connections.c:4044
+#: src/main/connections.c:4168 src/main/connections.c:4181
+#: src/main/connections.c:4240 src/main/connections.c:4272
 #, c-format
 msgid "size %d is unknown on this machine"
 msgstr ""
 
-#: src/main/connections.c:3936
+#: src/main/connections.c:3934
 msgid "raw is always of size 1"
 msgstr ""
 
-#: src/main/connections.c:3959
+#: src/main/connections.c:3957
 msgid "'signed = FALSE' is only valid for integers of sizes 1 and 2"
 msgstr ""
 
-#: src/main/connections.c:4060
+#: src/main/connections.c:4071
 msgid "'x' is not an atomic vector type"
 msgstr ""
 
-#: src/main/connections.c:4066
+#: src/main/connections.c:4077
 msgid "can only write to a binary connection"
 msgstr ""
 
-#: src/main/connections.c:4085
+#: src/main/connections.c:4096
 msgid "only 2^31-1 bytes can be written to a raw vector"
 msgstr ""
 
-#: src/main/connections.c:4087
+#: src/main/connections.c:4098
 msgid "only 2^31-1 bytes can be written in a single writeBin() call"
 msgstr ""
 
-#: src/main/connections.c:4136 src/main/connections.c:4289
-#: src/main/connections.c:4570 src/main/connections.c:4610
+#: src/main/connections.c:4147 src/main/connections.c:4300
+#: src/main/connections.c:4581 src/main/connections.c:4621
 msgid "problem writing to connection"
 msgstr ""
 
-#: src/main/connections.c:4181
+#: src/main/connections.c:4192
 msgid "size changing is not supported for raw vectors"
 msgstr ""
 
-#: src/main/connections.c:4324 src/main/connections.c:4328
-#: src/main/connections.c:4367
+#: src/main/connections.c:4335 src/main/connections.c:4339
+#: src/main/connections.c:4378
 msgid "invalid UTF-8 input in readChar()"
 msgstr ""
 
-#: src/main/connections.c:4434
+#: src/main/connections.c:4445
 msgid "can only read in bytes in a non-UTF-8 MBCS locale"
 msgstr ""
 
-#: src/main/connections.c:4506
+#: src/main/connections.c:4517
 msgid "'object' is too short"
 msgstr ""
 
-#: src/main/connections.c:4559
+#: src/main/connections.c:4570
 msgid "writeChar: more bytes requested than are in the string - will zero-pad"
 msgstr ""
 
-#: src/main/connections.c:4584
+#: src/main/connections.c:4595
 msgid ""
 "writeChar: more characters requested than are in the string - will zero-pad"
 msgstr ""
 
-#: src/main/connections.c:4638
+#: src/main/connections.c:4649
 msgid "maximum number of pushback lines exceeded"
 msgstr ""
 
-#: src/main/connections.c:4644 src/main/connections.c:4648
-#: src/main/connections.c:4685 src/main/connections.c:4693
+#: src/main/connections.c:4655 src/main/connections.c:4659
+#: src/main/connections.c:4696 src/main/connections.c:4704
 msgid "could not allocate space for pushback"
 msgstr ""
 
-#: src/main/connections.c:4676
+#: src/main/connections.c:4687
 msgid "can only push back on open readable connections"
 msgstr ""
 
-#: src/main/connections.c:4678
+#: src/main/connections.c:4689
 msgid "can only push back on text-mode connections"
 msgstr ""
 
-#: src/main/connections.c:4740 src/main/connections.c:4810
+#: src/main/connections.c:4753 src/main/connections.c:4823
 msgid "sink stack is full"
 msgstr ""
 
-#: src/main/connections.c:4743
+#: src/main/connections.c:4756
 msgid "cannot switch output to stdin"
 msgstr ""
 
-#: src/main/connections.c:4770
+#: src/main/connections.c:4783
 msgid "no sink to remove"
 msgstr ""
 
-#: src/main/connections.c:4892
+#: src/main/connections.c:4903
 msgid "there is no connection NA"
 msgstr ""
 
-#: src/main/connections.c:4894
+#: src/main/connections.c:4905
 #, c-format
 msgid "there is no connection %d"
 msgstr ""
 
-#: src/main/connections.c:5029
+#: src/main/connections.c:5039
+msgid "method = \"wininet\" is only supported on Windows"
+msgstr ""
+
+#: src/main/connections.c:5103
 msgid ""
 "file(\"\") only supports open = \"w+\" and open = \"w+b\": using the former"
 msgstr ""
 
-#: src/main/connections.c:5083 src/modules/internet/internet.c:115
-#: src/modules/internet/internet.c:569
-msgid "unsupported URL scheme"
+#: src/main/connections.c:5157
+msgid "URL scheme unsupported by this method"
 msgstr ""
 
-#: src/main/connections.c:5173
+#: src/main/connections.c:5253
 msgid "file stream does not have gzip magic number"
 msgstr ""
 
-#: src/main/connections.c:5184
+#: src/main/connections.c:5264
 msgid "file stream does not have valid gzip header"
 msgstr ""
 
-#: src/main/connections.c:5249
+#: src/main/connections.c:5329
 msgid "writing error whilst flushing 'gzcon' connection"
 msgstr ""
 
-#: src/main/connections.c:5351
+#: src/main/connections.c:5431
 #, c-format
 msgid "crc error %x %x\n"
 msgstr ""
 
-#: src/main/connections.c:5378
+#: src/main/connections.c:5458
 msgid "write error on 'gzcon' connection"
 msgstr ""
 
-#: src/main/connections.c:5412
+#: src/main/connections.c:5493
 msgid "'level' must be one of 0 ... 9"
 msgstr ""
 
-#: src/main/connections.c:5415
+#: src/main/connections.c:5496
 msgid "'allowNonCompression' must be TRUE or FALSE"
 msgstr ""
 
-#: src/main/connections.c:5418
+#: src/main/connections.c:5499
+msgid "'text' must be TRUE or FALSE"
+msgstr ""
+
+#: src/main/connections.c:5502
 msgid "this is already a 'gzcon' connection"
 msgstr ""
 
-#: src/main/connections.c:5424
+#: src/main/connections.c:5508
 msgid "can only use read- or write- binary connections"
 msgstr ""
 
-#: src/main/connections.c:5427
+#: src/main/connections.c:5511
 msgid "using a text-mode 'file' connection may not work correctly"
 msgstr ""
 
-#: src/main/connections.c:5430
+#: src/main/connections.c:5514
 msgid ""
 "cannot create a 'gzcon' connection from a writable textConnection; maybe use "
 "rawConnection"
 msgstr ""
 
-#: src/main/connections.c:5433 src/main/connections.c:5437
-#: src/main/connections.c:5444 src/main/connections.c:5458
+#: src/main/connections.c:5517 src/main/connections.c:5521
+#: src/main/connections.c:5528 src/main/connections.c:5542
 msgid "allocation of 'gzcon' connection failed"
 msgstr ""
 
-#: src/main/connections.c:5644
+#: src/main/connections.c:5729
 msgid "not a list of sockets"
 msgstr ""
 
-#: src/main/connections.c:5649
+#: src/main/connections.c:5734
 msgid "bad write indicators"
 msgstr ""
 
-#: src/main/connections.c:5660
+#: src/main/connections.c:5745
 msgid "not a socket connection"
 msgstr ""
 
-#: src/main/connections.c:5905
+#: src/main/connections.c:5990
 msgid "unknown compression, assuming none"
 msgstr ""
 
-#: src/main/connections.c:6023 src/main/connections.c:6027
-#: src/main/connections.c:6033
+#: src/main/connections.c:6108 src/main/connections.c:6112
+#: src/main/connections.c:6118
 #, c-format
 msgid "allocation of %s connection failed"
 msgstr ""
 
-#: src/main/context.c:282
+#: src/main/context.c:316
 msgid "no loop for break/next, jumping to top level"
 msgstr ""
 
-#: src/main/context.c:290
+#: src/main/context.c:324
 msgid "no function to return from, jumping to top level"
 msgstr ""
 
-#: src/main/context.c:302
+#: src/main/context.c:339
 msgid "target context is not on the stack"
 msgstr ""
 
-#: src/main/context.c:324 src/main/context.c:340 src/main/context.c:407
-#: src/main/context.c:428 src/main/context.c:440 src/main/context.c:452
+#: src/main/context.c:361 src/main/context.c:377 src/main/context.c:444
+#: src/main/context.c:465 src/main/context.c:477 src/main/context.c:489
 msgid "not that many frames on the stack"
 msgstr ""
 
-#: src/main/context.c:357
+#: src/main/context.c:394
 msgid "only positive values of 'n' are allowed"
 msgstr ""
 
-#: src/main/context.c:478
-msgid "no function to restart"
-msgstr ""
-
-#: src/main/context.c:515
+#: src/main/context.c:526
 msgid "number of contexts must be positive"
 msgstr ""
 
-#: src/main/context.c:528
+#: src/main/context.c:539
 msgid "no browser context to query"
 msgstr ""
 
-#: src/main/context.c:546
+#: src/main/context.c:557
 msgid "not that many calls to browser are active"
 msgstr ""
 
-#: src/main/context.c:560
+#: src/main/context.c:571
 msgid "not that many functions on the call stack"
 msgstr ""
 
-#: src/main/context.c:645
+#: src/main/context.c:656
 msgid "internal error in 'do_sys'"
 msgstr ""
 
@@ -2337,37 +2385,37 @@ msgstr ""
 msgid "integer overflow in 'cumsum'; use 'cumsum(as.numeric(.))'"
 msgstr ""
 
-#: src/main/cum.c:178
-msgid "'cummin' not defined for complex numbers"
+#: src/main/cum.c:179
+msgid "'cummax' not defined for complex numbers"
 msgstr ""
 
-#: src/main/cum.c:181
-msgid "'cummax' not defined for complex numbers"
+#: src/main/cum.c:182
+msgid "'cummin' not defined for complex numbers"
 msgstr ""
 
-#: src/main/cum.c:206 src/main/cum.c:230
+#: src/main/cum.c:209 src/main/cum.c:236
 msgid "unknown cumxxx function"
 msgstr ""
 
-#: src/main/datetime.c:548 src/main/datetime.c:556 src/main/datetime.c:570
-#: src/main/datetime.c:575
+#: src/main/datetime.c:554 src/main/datetime.c:562 src/main/datetime.c:576
+#: src/main/datetime.c:581
 msgid "problem with setting timezone"
 msgstr ""
 
-#: src/main/datetime.c:560
+#: src/main/datetime.c:566
 msgid "cannot set timezones on this system"
 msgstr ""
 
-#: src/main/datetime.c:582 src/main/datetime.c:584
+#: src/main/datetime.c:588 src/main/datetime.c:590
 msgid "problem with unsetting timezone"
 msgstr ""
 
-#: src/main/datetime.c:804 src/main/datetime.c:806 src/main/datetime.c:901
-#: src/main/datetime.c:1240 src/main/datetime.c:1242
+#: src/main/datetime.c:810 src/main/datetime.c:812 src/main/datetime.c:908
+#: src/main/datetime.c:1258 src/main/datetime.c:1260
 msgid "zero-length component in non-empty \"POSIXlt\" structure"
 msgstr ""
 
-#: src/main/dcf.c:113 src/main/dcf.c:181 src/main/dcf.c:253
+#: src/main/dcf.c:112 src/main/dcf.c:181 src/main/dcf.c:253
 msgid "could not allocate memory for 'read.dcf'"
 msgstr ""
 
@@ -2381,78 +2429,83 @@ msgstr ""
 msgid "Line starting '%s ...' is malformed!"
 msgstr ""
 
-#: src/main/debug.c:45
-msgid "argument must be a closure"
+#: src/main/debug.c:46 src/main/debug.c:76
+msgid "argument must be a function"
 msgstr ""
 
-#: src/main/debug.c:76
-msgid "argument must be a function"
+#: src/main/debug.c:111
+#, c-format
+msgid "Value for '%s' must be TRUE or FALSE"
 msgstr ""
 
-#: src/main/debug.c:132 src/main/debug.c:166 src/main/debug.c:224
+#: src/main/debug.c:139 src/main/debug.c:167 src/main/debug.c:241
 msgid "argument must not be a function"
 msgstr ""
 
-#: src/main/debug.c:135
+#: src/main/debug.c:142
 msgid "cannot trace NULL"
 msgstr ""
 
-#: src/main/debug.c:139
+#: src/main/debug.c:146
 msgid "'tracemem' is not useful for promise and environment objects"
 msgstr ""
 
-#: src/main/debug.c:142
+#: src/main/debug.c:149
 msgid "'tracemem' is not useful for weak reference or external pointer objects"
 msgstr ""
 
-#: src/main/debug.c:148 src/main/debug.c:171
+#: src/main/debug.c:180 src/main/debug.c:187
 msgid "R was not compiled with support for memory profiling"
 msgstr ""
 
-#: src/main/deparse.c:152 src/main/sprintf.c:213 src/main/sprintf.c:245
+#: src/main/deparse.c:156 src/main/sprintf.c:216 src/main/sprintf.c:248
 msgid "too few arguments"
 msgstr ""
 
-#: src/main/deparse.c:159
+#: src/main/deparse.c:163
 msgid "invalid 'cutoff' value for 'deparse', using default"
 msgstr ""
 
-#: src/main/deparse.c:247
+#: src/main/deparse.c:254
 msgid "deparse of an S4 object will not be source()able"
 msgstr ""
 
-#: src/main/deparse.c:249
+#: src/main/deparse.c:256
 msgid "deparse may be incomplete"
 msgstr ""
 
-#: src/main/deparse.c:251
+#: src/main/deparse.c:258
 msgid "deparse may be not be source()able in R < 2.7.0"
 msgstr ""
 
-#: src/main/deparse.c:369 src/main/deparse.c:461 src/main/deparse.c:467
+#: src/main/deparse.c:350 src/main/deparse.c:400 src/main/source.c:206
+msgid "'file' must be a character string or connection"
+msgstr ""
+
+#: src/main/deparse.c:378 src/main/deparse.c:473 src/main/deparse.c:479
 msgid "wrote too few characters"
 msgstr ""
 
-#: src/main/deparse.c:391
+#: src/main/deparse.c:402
 msgid "character arguments expected"
 msgstr ""
 
-#: src/main/deparse.c:394
+#: src/main/deparse.c:405
 msgid "zero-length argument"
 msgstr ""
 
-#: src/main/deparse.c:401
+#: src/main/deparse.c:412
 msgid "'opts' should be small non-negative integer"
 msgstr ""
 
-#: src/main/deparse.c:411 src/main/envir.c:1764 src/main/envir.c:1846
-#: src/main/eval.c:569 src/main/eval.c:1251 src/main/eval.c:3627
-#: src/main/saveload.c:1978 src/main/saveload.c:2309 src/main/serialize.c:2727
+#: src/main/deparse.c:422 src/main/envir.c:1898 src/main/envir.c:1983
+#: src/main/eval.c:626 src/main/eval.c:1423 src/main/eval.c:4246
+#: src/main/saveload.c:1980 src/main/saveload.c:2312 src/main/serialize.c:2773
 #, c-format
 msgid "object '%s' not found"
 msgstr ""
 
-#: src/main/deparse.c:1519
+#: src/main/deparse.c:1592
 msgid "badly formed function expression"
 msgstr ""
 
@@ -2460,246 +2513,231 @@ msgstr ""
 msgid "the base graphics system is not registered"
 msgstr ""
 
-#: src/main/devices.c:165 src/main/devices.c:172
+#: src/main/devices.c:166 src/main/devices.c:174
 msgid "no active or default device"
 msgstr ""
 
-#: src/main/devices.c:385 src/main/devices.c:447
+#: src/main/devices.c:388 src/main/devices.c:450
 msgid "too many open devices"
 msgstr ""
 
-#: src/main/devices.c:474
+#: src/main/devices.c:491
 msgid "not enough memory to allocate device (in GEcreateDevDesc)"
 msgstr ""
 
-#: src/main/devices.c:515
+#: src/main/devices.c:532
 msgid "Hit <Return> to see next plot: "
 msgstr ""
 
-#: src/main/dotcode.c:112 src/main/dotcode.c:142
+#: src/main/dotcode.c:127 src/main/dotcode.c:157
 msgid "NULL value passed as symbol address"
 msgstr ""
 
-#: src/main/dotcode.c:133
+#: src/main/dotcode.c:148
 #, c-format
 msgid "Unimplemented type %d in createRSymbolObject"
 msgstr ""
 
-#: src/main/dotcode.c:147 src/main/dotcode.c:237
+#: src/main/dotcode.c:162 src/main/dotcode.c:260
 #, c-format
 msgid "symbol '%s' is too long"
 msgstr ""
 
-#: src/main/dotcode.c:159
+#: src/main/dotcode.c:174
 msgid ""
 "first argument must be a string (of length 1) or native symbol reference"
 msgstr ""
 
-#: src/main/dotcode.c:201 src/main/dotcode.c:563
+#: src/main/dotcode.c:224 src/main/dotcode.c:1240
 msgid "too many arguments in foreign function call"
 msgstr ""
 
-#: src/main/dotcode.c:213
+#: src/main/dotcode.c:236
 msgid "PACKAGE = \"\" is invalid"
 msgstr ""
 
-#: src/main/dotcode.c:269 src/main/dotcode.c:274 src/main/dotcode.c:279
-#: src/main/dotcode.c:284
+#: src/main/dotcode.c:292 src/main/dotcode.c:297 src/main/dotcode.c:302
+#: src/main/dotcode.c:307
 #, c-format
 msgid "\"%s\" not available for %s() for package \"%s\""
 msgstr ""
 
-#: src/main/dotcode.c:289
+#: src/main/dotcode.c:312
 #, c-format
 msgid "%s symbol name \"%s\" not in DLL for package \"%s\""
 msgstr ""
 
-#: src/main/dotcode.c:294
+#: src/main/dotcode.c:317
 #, c-format
 msgid "%s symbol name \"%s\" not in load table"
 msgstr ""
 
-#: src/main/dotcode.c:348 src/main/dotcode.c:352 src/main/dotcode.c:362
-#: src/main/dotcode.c:427 src/main/dotcode.c:434
+#: src/main/dotcode.c:368 src/main/dotcode.c:370 src/main/dotcode.c:380
+#: src/main/dotcode.c:445 src/main/dotcode.c:452
 #, c-format
 msgid "'%s' used more than once"
 msgstr ""
 
-#: src/main/dotcode.c:358
+#: src/main/dotcode.c:376
 msgid "DLL name is too long"
 msgstr ""
 
-#: src/main/dotcode.c:403
+#: src/main/dotcode.c:421
 msgid "PACKAGE argument must be a single character string"
 msgstr ""
 
-#: src/main/dotcode.c:409
+#: src/main/dotcode.c:427
 msgid "PACKAGE argument is too long"
 msgstr ""
 
-#: src/main/dotcode.c:474
+#: src/main/dotcode.c:492
 msgid "no arguments supplied"
 msgstr ""
 
-#: src/main/dotcode.c:475 src/main/seq.c:913
+#: src/main/dotcode.c:493 src/main/seq.c:911
 msgid "too many arguments"
 msgstr ""
 
-#: src/main/dotcode.c:512 src/main/dotcode.c:554 src/main/dotcode.c:1397
+#: src/main/dotcode.c:530 src/main/dotcode.c:1232 src/main/dotcode.c:1420
 msgid "'.NAME' is missing"
 msgstr ""
 
-#: src/main/dotcode.c:521 src/main/dotcode.c:570 src/main/dotcode.c:1418
+#: src/main/dotcode.c:539 src/main/dotcode.c:1247 src/main/dotcode.c:1441
 #, c-format
 msgid "Incorrect number of arguments (%d), expecting %d for '%s'"
 msgstr ""
 
-#: src/main/dotcode.c:1227 src/main/dotcode.c:2276
+#: src/main/dotcode.c:1216 src/main/dotcode.c:2290
 msgid "too many arguments, sorry"
 msgstr ""
 
-#: src/main/dotcode.c:1261 src/main/dotcode.c:1278 src/main/engine.c:2993
+#: src/main/dotcode.c:1284 src/main/dotcode.c:1301 src/main/engine.c:3013
 msgid "invalid graphics state"
 msgstr ""
 
-#: src/main/dotcode.c:1357
+#: src/main/dotcode.c:1380
 msgid "NULL value for DLLInfoReference when looking for DLL"
 msgstr ""
 
-#: src/main/dotcode.c:1458
+#: src/main/dotcode.c:1481
 #, c-format
 msgid "wrong type for argument %d in call to %s"
 msgstr ""
 
-#: src/main/dotcode.c:1470
-#, c-format
-msgid ""
-"explicit request not to duplicate arguments in call to '%s', but argument %d "
-"is of the wrong type (%d != %d)"
-msgstr ""
-
-#: src/main/dotcode.c:1493
+#: src/main/dotcode.c:1510
 #, c-format
 msgid "long vectors (argument %d) are not supported in %s"
 msgstr ""
 
-#: src/main/dotcode.c:1524
+#: src/main/dotcode.c:1541
 #, c-format
 msgid "NAs in foreign function call (arg %d)"
 msgstr ""
 
-#: src/main/dotcode.c:1547
+#: src/main/dotcode.c:1564
 #, c-format
 msgid "NA/NaN/Inf in foreign function call (arg %d)"
 msgstr ""
 
-#: src/main/dotcode.c:1552
-msgid "single values not returned if not duplicated"
-msgstr ""
-
-#: src/main/dotcode.c:1578
+#: src/main/dotcode.c:1594
 #, c-format
 msgid "complex NA/NaN/Inf in foreign function call (arg %d)"
 msgstr ""
 
-#: src/main/dotcode.c:1597
-msgid "character variables must be duplicated in .C/.Fortran"
-msgstr ""
-
-#: src/main/dotcode.c:1602
+#: src/main/dotcode.c:1616
 msgid "only first string in char vector used in .Fortran"
 msgstr ""
 
-#: src/main/dotcode.c:1645 src/main/dotcode.c:1661 src/main/dotcode.c:1672
+#: src/main/dotcode.c:1659 src/main/dotcode.c:1675 src/main/dotcode.c:1686
 #, c-format
 msgid "invalid mode (%s) to pass to Fortran (arg %d)"
 msgstr ""
 
-#: src/main/dotcode.c:1666
+#: src/main/dotcode.c:1680
 #, c-format
 msgid "invalid mode (%s) to pass to C or Fortran (arg %d)"
 msgstr ""
 
-#: src/main/dotcode.c:1677
+#: src/main/dotcode.c:1691
 msgid "pairlists are passed as SEXP as from R 2.15.0"
 msgstr ""
 
-#: src/main/dotcode.c:2499
+#: src/main/dotcode.c:2510
 #, c-format
 msgid "type \"%s\" not supported in interlanguage calls"
 msgstr ""
 
-#: src/main/dotcode.c:2604
+#: src/main/dotcode.c:2615
 #, c-format
 msgid "mode '%s' is not supported in call_R"
 msgstr ""
 
-#: src/main/dounzip.c:171
+#: src/main/dounzip.c:172
 #, c-format
 msgid " not overwriting file '%s"
 msgstr ""
 
-#: src/main/dounzip.c:256
+#: src/main/dounzip.c:257
 #, c-format
 msgid "zip file '%s' cannot be opened"
 msgstr ""
 
-#: src/main/dounzip.c:312
+#: src/main/dounzip.c:313
 msgid "invalid zip name argument"
 msgstr ""
 
-#: src/main/dounzip.c:315 src/main/dounzip.c:409
+#: src/main/dounzip.c:316 src/main/dounzip.c:410
 msgid "zip path is too long"
 msgstr ""
 
-#: src/main/dounzip.c:332
+#: src/main/dounzip.c:333
 msgid "'exdir' is too long"
 msgstr ""
 
-#: src/main/dounzip.c:335
+#: src/main/dounzip.c:336
 msgid "'exdir' does not exist"
 msgstr ""
 
-#: src/main/dounzip.c:363
+#: src/main/dounzip.c:364
 msgid "requested file not found in the zip file"
 msgstr ""
 
-#: src/main/dounzip.c:366
+#: src/main/dounzip.c:367
 msgid "zip file is corrupt"
 msgstr ""
 
-#: src/main/dounzip.c:369
+#: src/main/dounzip.c:370
 msgid "CRC error in zip file"
 msgstr ""
 
-#: src/main/dounzip.c:376
+#: src/main/dounzip.c:377
 msgid "write error in extracting from zip file"
 msgstr ""
 
-#: src/main/dounzip.c:379
+#: src/main/dounzip.c:380
 #, c-format
 msgid "error %d in extracting from zip file"
 msgstr ""
 
-#: src/main/dounzip.c:404
+#: src/main/dounzip.c:405
 msgid "unz connections can only be opened for reading"
 msgstr ""
 
-#: src/main/dounzip.c:415
+#: src/main/dounzip.c:416
 msgid "invalid description of 'unz' connection"
 msgstr ""
 
-#: src/main/dounzip.c:421
+#: src/main/dounzip.c:422
 #, c-format
 msgid "cannot open zip file '%s'"
 msgstr ""
 
-#: src/main/dounzip.c:425
+#: src/main/dounzip.c:426
 #, c-format
 msgid "cannot locate file '%s' in zip file '%s'"
 msgstr ""
 
-#: src/main/dounzip.c:469
+#: src/main/dounzip.c:470
 msgid "printing not enabled for this connection"
 msgstr ""
 
@@ -2707,8 +2745,8 @@ msgstr ""
 msgid "write not enabled for this connection"
 msgstr ""
 
-#: src/main/dounzip.c:496 src/main/dounzip.c:500 src/main/dounzip.c:506
-#: src/main/dounzip.c:523
+#: src/main/dounzip.c:494 src/main/dounzip.c:498 src/main/dounzip.c:504
+#: src/main/dounzip.c:521
 msgid "allocation of 'unz' connection failed"
 msgstr ""
 
@@ -2724,7 +2762,7 @@ msgstr ""
 msgid "invalid argument to edit()"
 msgstr ""
 
-#: src/main/edit.c:121 src/main/saveload.c:2076
+#: src/main/edit.c:121 src/main/saveload.c:2078
 msgid "unable to open file"
 msgstr ""
 
@@ -2784,12 +2822,12 @@ msgid "no graphics system to unregister"
 msgstr ""
 
 #: src/main/engine.c:443 src/main/engine.c:448 src/main/engine.c:456
-#: src/main/engine.c:463 src/main/engine.c:477 src/modules/X11/devX11.c:1157
+#: src/main/engine.c:463 src/main/engine.c:477 src/modules/X11/devX11.c:1159
 msgid "invalid line end"
 msgstr ""
 
 #: src/main/engine.c:508 src/main/engine.c:513 src/main/engine.c:521
-#: src/main/engine.c:528 src/main/engine.c:542 src/modules/X11/devX11.c:1175
+#: src/main/engine.c:528 src/main/engine.c:542 src/modules/X11/devX11.c:1177
 msgid "invalid line join"
 msgstr ""
 
@@ -2818,82 +2856,96 @@ msgstr ""
 msgid "raster capture is not available for this device"
 msgstr ""
 
-#: src/main/engine.c:1656
+#: src/main/engine.c:1662
 #, c-format
 msgid "font face %d not supported for font family '%s'"
 msgstr ""
 
-#: src/main/engine.c:1972
+#: src/main/engine.c:1978
 msgid "no graphics device is active"
 msgstr ""
 
-#: src/main/engine.c:2049
+#: src/main/engine.c:2055
 #, c-format
 msgid "pch value '%d' is invalid in this locale"
 msgstr ""
 
-#: src/main/engine.c:2307
+#: src/main/engine.c:2313
 #, c-format
 msgid "unimplemented pch value '%d'"
 msgstr ""
 
-#: src/main/engine.c:2330
+#: src/main/engine.c:2336
 #, c-format
 msgid "invalid axis extents [GEPretty(.,.,n=%d)"
 msgstr ""
 
-#: src/main/engine.c:2334
+#: src/main/engine.c:2340
 #, c-format
 msgid "infinite axis extents [GEPretty(%g,%g,%d)]"
 msgstr ""
 
-#: src/main/engine.c:2371
+#: src/main/engine.c:2377
 #, c-format
 msgid " .. GEPretty(.): new *lo = %g < %g = x1"
 msgstr ""
 
-#: src/main/engine.c:2373
+#: src/main/engine.c:2379
 #, c-format
 msgid " .. GEPretty(.): new *up = %g > %g = x2"
 msgstr ""
 
-#: src/main/engine.c:2773
+#: src/main/engine.c:2784
 msgid "display list redraw incomplete"
 msgstr ""
 
-#: src/main/engine.c:2777
+#: src/main/engine.c:2788
 msgid "invalid display list"
 msgstr ""
 
-#: src/main/engine.c:2963
+#: src/main/engine.c:2900
+#, c-format
+msgid ""
+"snapshot recorded with different graphics engine version (pre 11 - this is "
+"version %d)"
+msgstr ""
+
+#: src/main/engine.c:2904
+#, c-format
+msgid ""
+"snapshot recorded with different graphics engine version (%d - this is "
+"version %d)"
+msgstr ""
+
+#: src/main/engine.c:2983
 msgid "'expr' argument must be an expression"
 msgstr ""
 
-#: src/main/engine.c:2965
+#: src/main/engine.c:2985
 msgid "'list' argument must be a list"
 msgstr ""
 
-#: src/main/engine.c:2971
+#: src/main/engine.c:2991
 msgid "'env' argument must be an environment"
 msgstr ""
 
-#: src/main/engine.c:3051 src/main/engine.c:3059
+#: src/main/engine.c:3071 src/main/engine.c:3079
 msgid "invalid multibyte char in pch=\"c\""
 msgstr ""
 
-#: src/main/engine.c:3106
+#: src/main/engine.c:3126
 msgid "invalid hex digit in 'color' or 'lty'"
 msgstr ""
 
-#: src/main/engine.c:3129
+#: src/main/engine.c:3149
 msgid "invalid line type: must be length 2, 4, 6 or 8"
 msgstr ""
 
-#: src/main/engine.c:3133
+#: src/main/engine.c:3153
 msgid "invalid line type: zeroes are not allowed"
 msgstr ""
 
-#: src/main/engine.c:3142 src/main/engine.c:3150 src/main/engine.c:3157
+#: src/main/engine.c:3162 src/main/engine.c:3170 src/main/engine.c:3177
 msgid "invalid line type"
 msgstr ""
 
@@ -2902,698 +2954,704 @@ msgstr ""
 msgid "cannot change value of locked binding for '%s'"
 msgstr ""
 
-#: src/main/envir.c:251 src/main/envir.c:1454
+#: src/main/envir.c:251 src/main/envir.c:1530
 msgid "cannot add bindings to a locked environment"
 msgstr ""
 
-#: src/main/envir.c:772
+#: src/main/envir.c:775
 msgid "invalid cached value in R_GetGlobalCache"
 msgstr ""
 
-#: src/main/envir.c:830
+#: src/main/envir.c:836
 msgid "cannot unbind in the base namespace"
 msgstr ""
 
-#: src/main/envir.c:832
+#: src/main/envir.c:838
 msgid "unbind in the base environment is unimplemented"
 msgstr ""
 
-#: src/main/envir.c:834 src/main/envir.c:1684
+#: src/main/envir.c:840 src/main/envir.c:1818
 msgid "cannot remove bindings from a locked environment"
 msgstr ""
 
-#: src/main/envir.c:1139
+#: src/main/envir.c:1213
 #, c-format
 msgid "argument to '%s' is not an environment"
 msgstr ""
 
-#: src/main/envir.c:1300
+#: src/main/envir.c:1374
 #, c-format
 msgid "the ... list does not contain %d elements"
 msgstr ""
 
-#: src/main/envir.c:1302
+#: src/main/envir.c:1376
 #, c-format
 msgid "..%d used in an incorrect context, no ... to look in"
 msgstr ""
 
-#: src/main/envir.c:1390 src/main/envir.c:1842 src/main/eval.c:573
-#: src/main/eval.c:3618
-#, c-format
-msgid "argument \"%s\" is missing, with no default"
-msgstr ""
-
-#: src/main/envir.c:1395
+#: src/main/envir.c:1469
 #, c-format
 msgid "could not find function \"%s\""
 msgstr ""
 
-#: src/main/envir.c:1418
+#: src/main/envir.c:1492
 msgid "cannot assign values in the empty environment"
 msgstr ""
 
-#: src/main/envir.c:1424 src/main/envir.c:1497
+#: src/main/envir.c:1498 src/main/envir.c:1628
 msgid "cannot assign variables to this database"
 msgstr ""
 
-#: src/main/envir.c:1580
+#: src/main/envir.c:1714
 #, c-format
 msgid "cannot add binding of '%s' to the base environment"
 msgstr ""
 
-#: src/main/envir.c:1609
+#: src/main/envir.c:1743
 msgid "only the first element is used as variable name"
 msgstr ""
 
-#: src/main/envir.c:1641
+#: src/main/envir.c:1775
 msgid "first argument must be a named list"
 msgstr ""
 
-#: src/main/envir.c:1646
+#: src/main/envir.c:1780
 msgid "names(x) must be a character vector of the same length as x"
 msgstr ""
 
-#: src/main/envir.c:1649
+#: src/main/envir.c:1783
 msgid "'envir' argument must be an environment"
 msgstr ""
 
-#: src/main/envir.c:1678
+#: src/main/envir.c:1812
 msgid "cannot remove variables from base namespace"
 msgstr ""
 
-#: src/main/envir.c:1680
+#: src/main/envir.c:1814
 msgid "cannot remove variables from the base environment"
 msgstr ""
 
-#: src/main/envir.c:1682
+#: src/main/envir.c:1816
 msgid "cannot remove variables from the empty environment"
 msgstr ""
 
-#: src/main/envir.c:1690
+#: src/main/envir.c:1824
 msgid "cannot remove variables from this database"
 msgstr ""
 
-#: src/main/envir.c:1849
+#: src/main/envir.c:1985
 #, c-format
 msgid "object '%s' of mode '%s' was not found"
 msgstr ""
 
-#: src/main/envir.c:1921
+#: src/main/envir.c:2068
 #, c-format
 msgid "invalid name in position %d"
 msgstr ""
 
-#: src/main/envir.c:1927
+#: src/main/envir.c:2074
 msgid "second argument must be an environment"
 msgstr ""
 
-#: src/main/envir.c:1935 src/main/envir.c:1943
+#: src/main/envir.c:2082 src/main/envir.c:2090
 #, c-format
 msgid "wrong length for '%s' argument"
 msgstr ""
 
-#: src/main/envir.c:2062
+#: src/main/envir.c:2221
 msgid "invalid use of 'missing'"
 msgstr ""
 
-#: src/main/envir.c:2087
+#: src/main/envir.c:2247
 msgid "'missing' can only be used for arguments"
 msgstr ""
 
-#: src/main/envir.c:2168
+#: src/main/envir.c:2333
 msgid "'pos' must be an integer"
 msgstr ""
 
-#: src/main/envir.c:2182
+#: src/main/envir.c:2347
 msgid "all elements of a list must be named"
 msgstr ""
 
-#: src/main/envir.c:2205
+#: src/main/envir.c:2370
 msgid "'attach' only works for lists, data frames and environments"
 msgstr ""
 
-#: src/main/envir.c:2288
+#: src/main/envir.c:2453
 msgid "detaching \"package:base\" is not allowed"
 msgstr ""
 
-#: src/main/envir.c:2589 src/main/envir.c:2644
+#: src/main/envir.c:2798 src/main/envir.c:2879
 msgid "argument must be an environment"
 msgstr ""
 
-#: src/main/envir.c:2648
+#: src/main/envir.c:2883
 msgid "arguments must be symbolic"
 msgstr ""
 
-#: src/main/envir.c:2772
+#: src/main/envir.c:3032
 msgid "no enclosing environment"
 msgstr ""
 
-#: src/main/envir.c:2825
+#: src/main/envir.c:3085
 #, c-format
 msgid "no item called \"%s\" on the search list"
 msgstr ""
 
-#: src/main/envir.c:2850
+#: src/main/envir.c:3110
 msgid "using 'as.environment(NULL)' is defunct"
 msgstr ""
 
-#: src/main/envir.c:2856
+#: src/main/envir.c:3116
 msgid "S4 object does not extend class \"environment\""
 msgstr ""
 
-#: src/main/envir.c:2871
+#: src/main/envir.c:3131
 msgid "invalid object for 'as.environment'"
 msgstr ""
 
-#: src/main/envir.c:2897 src/main/envir.c:2925 src/main/envir.c:2954
-#: src/main/envir.c:2975 src/main/envir.c:2998 src/main/envir.c:3033
-#: src/main/envir.c:3054
+#: src/main/envir.c:3157 src/main/envir.c:3185 src/main/envir.c:3214
+#: src/main/envir.c:3235 src/main/envir.c:3258 src/main/envir.c:3293
+#: src/main/envir.c:3314
 msgid "not an environment"
 msgstr ""
 
-#: src/main/envir.c:2949 src/main/envir.c:2970 src/main/envir.c:2991
-#: src/main/envir.c:3028 src/main/envir.c:3049 src/main/envir.c:3148
+#: src/main/envir.c:3209 src/main/envir.c:3230 src/main/envir.c:3251
+#: src/main/envir.c:3288 src/main/envir.c:3309 src/main/envir.c:3408
 msgid "not a symbol"
 msgstr ""
 
-#: src/main/envir.c:2962 src/main/envir.c:2983 src/main/envir.c:3041
-#: src/main/envir.c:3062
+#: src/main/envir.c:3222 src/main/envir.c:3243 src/main/envir.c:3301
+#: src/main/envir.c:3322
 #, c-format
 msgid "no binding for \"%s\""
 msgstr ""
 
-#: src/main/envir.c:2993
+#: src/main/envir.c:3253
 msgid "not a function"
 msgstr ""
 
-#: src/main/envir.c:3001 src/main/envir.c:3017
+#: src/main/envir.c:3261 src/main/envir.c:3277
 msgid "symbol already has a regular binding"
 msgstr ""
 
-#: src/main/envir.c:3003 src/main/envir.c:3019
+#: src/main/envir.c:3263 src/main/envir.c:3279
 msgid "cannot change active binding if binding is locked"
 msgstr ""
 
-#: src/main/envir.c:3107
+#: src/main/envir.c:3367 src/main/envir.c:3604
 msgid "unknown op"
 msgstr ""
 
-#: src/main/envir.c:3152
+#: src/main/envir.c:3412
 msgid "cannot unbind a locked binding"
 msgstr ""
 
-#: src/main/envir.c:3154
+#: src/main/envir.c:3414
 msgid "cannot unbind an active binding"
 msgstr ""
 
-#: src/main/envir.c:3289
+#: src/main/envir.c:3555
 msgid "bad namespace name"
 msgstr ""
 
-#: src/main/envir.c:3301
+#: src/main/envir.c:3567
 msgid "namespace already registered"
 msgstr ""
 
-#: src/main/envir.c:3313
+#: src/main/envir.c:3579
 msgid "namespace not registered"
 msgstr ""
 
-#: src/main/envir.c:3360
+#: src/main/envir.c:3635
 msgid "bad import environment argument"
 msgstr ""
 
-#: src/main/envir.c:3365
+#: src/main/envir.c:3640
 msgid "bad export environment argument"
 msgstr ""
 
-#: src/main/envir.c:3369
+#: src/main/envir.c:3644
 msgid "length of import and export names must match"
 msgstr ""
 
-#: src/main/envir.c:3392
+#: src/main/envir.c:3667
 #, c-format
 msgid "exported symbol '%s' has no value"
 msgstr ""
 
-#: src/main/envir.c:3557
+#: src/main/envir.c:3833
 #, c-format
 msgid "unknown encoding: %d"
 msgstr ""
 
-#: src/main/envir.c:3577
+#: src/main/envir.c:3853
 #, c-format
 msgid "embedded nul in string: '%s'"
 msgstr ""
 
-#: src/main/errors.c:178 src/main/errors.c:215
+#: src/main/errors.c:163 src/main/errors.c:200
 msgid "interrupts suspended; signal ignored"
 msgstr ""
 
-#: src/main/errors.c:318
+#: src/main/errors.c:250
+msgid "[... truncated]"
+msgstr ""
+
+#: src/main/errors.c:310
 msgid "invalid option \"warning.expression\""
 msgstr ""
 
-#: src/main/errors.c:348
+#: src/main/errors.c:339
 #, c-format
 msgid "(converted from warning) %s"
 msgstr ""
 
-#: src/main/errors.c:359
-#, c-format
-msgid "Warning: %s\n"
+#: src/main/errors.c:349
+msgid "Warning:"
 msgstr ""
 
-#: src/main/errors.c:363
+#: src/main/errors.c:351
 #, c-format
-msgid "Warning in %s : %s\n"
+msgid "Warning in %s :"
 msgstr ""
 
-#: src/main/errors.c:365
-#, c-format
-msgid ""
-"Warning in %s :\n"
-"  %s\n"
+#: src/main/errors.c:360 src/main/errors.c:374 src/main/errors.c:687
+msgid "Calls:"
 msgstr ""
 
-#: src/main/errors.c:428 src/main/errors.c:447 src/main/errors.c:596
+#: src/main/errors.c:421 src/main/errors.c:440 src/main/errors.c:602
 msgid "Lost warning messages\n"
 msgstr ""
 
-#: src/main/errors.c:459
-msgid "Warning message:\n"
-msgid_plural "Warning messages:\n"
+#: src/main/errors.c:452
+msgid "Warning message:"
+msgid_plural "Warning messages:"
 msgstr[0] ""
 msgstr[1] ""
 
-#: src/main/errors.c:514
+#: src/main/errors.c:462 src/main/errors.c:490
 #, c-format
-msgid "There were %d warnings (use warnings() to see them)\n"
+msgid "In %s :"
 msgstr ""
 
-#: src/main/errors.c:517
+#: src/main/errors.c:515
 #, c-format
-msgid "There were %d or more warnings (use warnings() to see the first %d)\n"
+msgid "There was %d warning (use warnings() to see it)"
+msgid_plural "There were %d warnings (use warnings() to see them)"
+msgstr[0] ""
+msgstr[1] ""
+
+#: src/main/errors.c:520
+#, c-format
+msgid "There were %d or more warnings (use warnings() to see the first %d)"
 msgstr ""
 
-#: src/main/errors.c:587
+#: src/main/errors.c:593
 msgid "Error during wrapup: "
 msgstr ""
 
-#: src/main/errors.c:612
+#: src/main/errors.c:618
 msgid "Error in "
 msgstr ""
 
-#: src/main/errors.c:613
+#: src/main/errors.c:640 src/main/errors.c:647
 #, c-format
-msgid " (from %s) : "
+msgid "Error in %s (from %s) : "
 msgstr ""
 
-#: src/main/errors.c:664 src/main/errors.c:670
+#: src/main/errors.c:649
+#, c-format
+msgid "Error in %s : "
+msgstr ""
+
+#: src/main/errors.c:669 src/main/errors.c:675
 #, c-format
 msgid "Error: "
 msgstr ""
 
-#: src/main/errors.c:690 src/main/errors.c:1319
+#: src/main/errors.c:696 src/main/errors.c:1300
 msgid "In addition: "
 msgstr ""
 
-#: src/main/errors.c:811
+#: src/main/errors.c:818
 msgid "invalid option \"error\"\n"
 msgstr ""
 
-#: src/main/errors.c:893
-msgid "Execution halted\n"
-msgstr ""
-
-#: src/main/errors.c:1032
-msgid "'msg1' must be a character string"
-msgstr ""
-
-#: src/main/errors.c:1034
-msgid "'msg2' must be a character string"
+#: src/main/errors.c:1013 src/main/errors.c:1015 src/main/options.c:339
+#: src/main/unique.c:1638
+#, c-format
+msgid "'%s' must be a character string"
 msgstr ""
 
-#: src/main/errors.c:1131
+#: src/main/errors.c:1116
 msgid " [invalid string in stop(.)]"
 msgstr ""
 
-#: src/main/errors.c:1162
+#: src/main/errors.c:1148
 msgid " [invalid string in warning(.)]"
 msgstr ""
 
-#: src/main/errors.c:1178
+#: src/main/errors.c:1164
 #, c-format
 msgid "incorrect number of arguments to \"%s\""
 msgstr ""
 
-#: src/main/errors.c:1184 src/main/errors.c:1199
+#: src/main/errors.c:1170 src/main/errors.c:1185
 #, c-format
 msgid "unimplemented feature in %s"
 msgstr ""
 
-#: src/main/errors.c:1193
+#: src/main/errors.c:1179
 msgid "invalid number of arguments"
 msgstr ""
 
-#: src/main/errors.c:1194 src/main/logic.c:189
+#: src/main/errors.c:1180 src/main/logic.c:181
 msgid "invalid argument type"
 msgstr ""
 
-#: src/main/errors.c:1196
+#: src/main/errors.c:1182
 msgid "time-series/vector length mismatch"
 msgstr ""
 
-#: src/main/errors.c:1197
+#: src/main/errors.c:1183
 msgid "incompatible arguments"
 msgstr ""
 
-#: src/main/errors.c:1200
+#: src/main/errors.c:1186
 msgid "unknown error (report this!)"
 msgstr ""
 
-#: src/main/errors.c:1212
+#: src/main/errors.c:1195
+msgid "inaccurate integer conversion in coercion"
+msgstr ""
+
+#: src/main/errors.c:1198
 msgid "unknown warning (report this!)"
 msgstr ""
 
-#: src/main/errors.c:1283
+#: src/main/errors.c:1269
 msgid "No function to return from, jumping to top level"
 msgstr ""
 
-#: src/main/errors.c:1299
+#: src/main/errors.c:1285
 msgid "top level inconsistency?"
 msgstr ""
 
-#: src/main/errors.c:1478
+#: src/main/errors.c:1459
 msgid "bad handler data"
 msgstr ""
 
-#: src/main/errors.c:1628
+#: src/main/errors.c:1613
 msgid "error message not a string"
 msgstr ""
 
-#: src/main/errors.c:1703
+#: src/main/errors.c:1688
 msgid "handler or restart stack mismatch in old restart"
 msgstr ""
 
-#: src/main/errors.c:1729 src/main/errors.c:1745
+#: src/main/errors.c:1714 src/main/errors.c:1730
 msgid "bad error message"
 msgstr ""
 
-#: src/main/errors.c:1787
+#: src/main/errors.c:1771
 msgid "bad restart"
 msgstr ""
 
-#: src/main/errors.c:1819
+#: src/main/errors.c:1803
 msgid "restart not on stack"
 msgstr ""
 
-#: src/main/errors.c:1836
+#: src/main/errors.c:1819
 msgid "not in a try context"
 msgstr ""
 
-#: src/main/errors.c:1849
+#: src/main/errors.c:1832
 msgid "error message must be a character string"
 msgstr ""
 
-#: src/main/eval.c:308
+#: src/main/eval.c:365
 #, c-format
 msgid "source files skipped by Rprof; please increase '%s'"
 msgstr ""
 
-#: src/main/eval.c:328
+#: src/main/eval.c:385
 #, c-format
 msgid "Rprof: cannot open profile file '%s'"
 msgstr ""
 
-#: src/main/eval.c:422
+#: src/main/eval.c:479
 msgid "R profiling is not available on this system"
 msgstr ""
 
-#: src/main/eval.c:446
+#: src/main/eval.c:503
 msgid ""
 "promise already under evaluation: recursive default argument reference or "
 "earlier problems?"
 msgstr ""
 
-#: src/main/eval.c:448
+#: src/main/eval.c:505
 msgid "restarting interrupted promise evaluation"
 msgstr ""
 
-#: src/main/eval.c:544
+#: src/main/eval.c:601
 msgid ""
 "evaluation nested too deeply: infinite recursion / options(expressions=)?"
 msgstr ""
 
-#: src/main/eval.c:575 src/main/eval.c:3619
+#: src/main/eval.c:632 src/main/eval.c:4238
 msgid "argument is missing, with no default"
 msgstr ""
 
-#: src/main/eval.c:679 src/main/eval.c:4642
+#: src/main/eval.c:736 src/main/eval.c:1306 src/main/eval.c:5533
 msgid "attempt to apply non-function"
 msgstr ""
 
-#: src/main/eval.c:702
+#: src/main/eval.c:759
 #, c-format
 msgid "%s at %s#%d: "
 msgstr ""
 
-#: src/main/eval.c:1178
+#: src/main/eval.c:1298 src/main/eval.c:2271
+#, c-format
+msgid "argument %d is empty"
+msgstr ""
+
+#: src/main/eval.c:1350
 #, c-format
 msgid "could not find symbol \"%s\" in environment of the generic function"
 msgstr ""
 
-#: src/main/eval.c:1196
+#: src/main/eval.c:1368
 #, c-format
 msgid "symbol \"%s\" not in environment of method"
 msgstr ""
 
-#: src/main/eval.c:1308
+#: src/main/eval.c:1481
 msgid "the condition has length > 1 and only the first element will be used"
 msgstr ""
 
-#: src/main/eval.c:1325
+#: src/main/eval.c:1500
 msgid "missing value where TRUE/FALSE needed"
 msgstr ""
 
-#: src/main/eval.c:1326
+#: src/main/eval.c:1501
 msgid "argument is not interpretable as logical"
 msgstr ""
 
-#: src/main/eval.c:1327
+#: src/main/eval.c:1502
 msgid "argument is of length zero"
 msgstr ""
 
-#: src/main/eval.c:1418
+#: src/main/eval.c:1596
 msgid "non-symbol loop variable"
 msgstr ""
 
-#: src/main/eval.c:1510 src/main/eval.c:4408
+#: src/main/eval.c:1687 src/main/eval.c:5301
 msgid "invalid for() loop sequence"
 msgstr ""
 
-#: src/main/eval.c:1652
+#: src/main/eval.c:1826
 msgid "multi-argument returns are not permitted"
 msgstr ""
 
-#: src/main/eval.c:1701
+#: src/main/eval.c:1873
 msgid "invalid (NULL) left side of assignment"
 msgstr ""
 
-#: src/main/eval.c:1734
+#: src/main/eval.c:1907
 msgid "target of assignment expands to non-language object"
 msgstr ""
 
-#: src/main/eval.c:1817
+#: src/main/eval.c:1990
 #, c-format
 msgid "overlong name in '%s'"
 msgstr ""
 
-#: src/main/eval.c:1915
+#: src/main/eval.c:2080
 msgid "cannot do complex assignments in base namespace"
 msgstr ""
 
-#: src/main/eval.c:1917
+#: src/main/eval.c:2082
 msgid "cannot do complex assignments in base environment"
 msgstr ""
 
-#: src/main/eval.c:1954 src/main/eval.c:1981
+#: src/main/eval.c:2121 src/main/eval.c:2148
 msgid "invalid function in complex assignment"
 msgstr ""
 
-#: src/main/eval.c:2041
+#: src/main/eval.c:2208
 msgid "invalid (do_set) left-hand side to assignment"
 msgstr ""
 
-#: src/main/eval.c:2103
-#, c-format
-msgid "argument %d is empty"
-msgstr ""
-
-#: src/main/eval.c:2116
+#: src/main/eval.c:2284
 #, c-format
 msgid "'%s' is missing"
 msgstr ""
 
-#: src/main/eval.c:2267
+#: src/main/eval.c:2439
 msgid "invalid formal argument list for \"function\""
 msgstr ""
 
-#: src/main/eval.c:2325 src/main/eval.c:2356 src/main/eval.c:2361
+#: src/main/eval.c:2497 src/main/eval.c:2528 src/main/eval.c:2533
 #, c-format
 msgid "invalid '%s' argument of type '%s'"
 msgstr ""
 
-#: src/main/eval.c:2353
+#: src/main/eval.c:2525
 msgid "numeric 'envir' arg not of length one"
 msgstr ""
 
-#: src/main/eval.c:2377 src/main/eval.c:2399
+#: src/main/eval.c:2549 src/main/eval.c:2573
 msgid "restarts not supported in 'eval'"
 msgstr ""
 
-#: src/main/eval.c:2456 src/main/eval.c:2469
+#: src/main/eval.c:2632 src/main/eval.c:2645
 msgid "'Recall' called from outside a closure"
 msgstr ""
 
-#: src/main/eval.c:2562
+#: src/main/eval.c:2738
 msgid "value in '...' is not a promise"
 msgstr ""
 
-#: src/main/eval.c:2754 src/main/objects.c:720
-#, c-format
-msgid "call name too long in '%s'"
-msgstr ""
-
-#: src/main/eval.c:2775
-#, c-format
-msgid "generic name too long in '%s'"
-msgstr ""
-
-#: src/main/eval.c:2840
+#: src/main/eval.c:2999
 #, c-format
 msgid "Incompatible methods (\"%s\", \"%s\") for \"%s\""
 msgstr ""
 
-#: src/main/eval.c:2906
+#: src/main/eval.c:3048
 msgid "dispatch error in group dispatch"
 msgstr ""
 
-#: src/main/eval.c:3201
+#: src/main/eval.c:3532
 #, c-format
 msgid "\"%s\" is not a %s function"
 msgstr ""
 
-#: src/main/eval.c:3430
+#: src/main/eval.c:4047
 msgid "node stack overflow"
 msgstr ""
 
-#: src/main/eval.c:3436
+#: src/main/eval.c:4053
 msgid "integer stack overflow"
 msgstr ""
 
-#: src/main/eval.c:3490
+#: src/main/eval.c:4107
 msgid "bad opcode"
 msgstr ""
 
-#: src/main/eval.c:4219
+#: src/main/eval.c:5083
 #, c-format
 msgid "invalid %s type in 'x %s y'"
 msgstr ""
 
-#: src/main/eval.c:4310
+#: src/main/eval.c:5195
 msgid "bytecode version mismatch; using eval"
 msgstr ""
 
-#: src/main/eval.c:4315
+#: src/main/eval.c:5200
 msgid "bytecode version is too old"
 msgstr ""
 
-#: src/main/eval.c:4316
+#: src/main/eval.c:5201
 msgid "bytecode version is too new"
 msgstr ""
 
-#: src/main/eval.c:4350
+#: src/main/eval.c:5235
 msgid "byte code version mismatch"
 msgstr ""
 
-#: src/main/eval.c:4477
+#: src/main/eval.c:5383
 msgid "invalid sequence argument in for loop"
 msgstr ""
 
-#: src/main/eval.c:4624 src/main/names.c:1181
+#: src/main/eval.c:5522 src/main/names.c:1312
 #, c-format
 msgid "there is no .Internal function '%s'"
 msgstr ""
 
-#: src/main/eval.c:4731 src/main/eval.c:5077 src/main/eval.c:5119
+#: src/main/eval.c:5622 src/main/eval.c:5968 src/main/eval.c:6008
 msgid "bad function"
 msgstr ""
 
-#: src/main/eval.c:4746
+#: src/main/eval.c:5635
 msgid "not a BUILTIN function"
 msgstr ""
 
-#: src/main/eval.c:5159
+#: src/main/eval.c:6066
+msgid "bad numeric 'switch' offsets"
+msgstr ""
+
+#: src/main/eval.c:6072
 msgid "numeric EXPR required for 'switch' without named alternatives"
 msgstr ""
 
-#: src/main/eval.c:5255
+#: src/main/eval.c:6076
+msgid "bad character 'switch' offsets"
+msgstr ""
+
+#: src/main/eval.c:6188
 msgid "cannot find index for threaded code address"
 msgstr ""
 
-#: src/main/eval.c:5315
+#: src/main/eval.c:6248
 msgid "invalid body"
 msgstr ""
 
-#: src/main/eval.c:5335
+#: src/main/eval.c:6268
 msgid "invalid symbol"
 msgstr ""
 
-#: src/main/eval.c:5379
+#: src/main/eval.c:6312
 msgid "argument is not a byte code object"
 msgstr ""
 
-#: src/main/eval.c:5400
+#: src/main/eval.c:6334
 msgid "bad file name"
 msgstr ""
 
-#: src/main/eval.c:5404 src/main/eval.c:5425
+#: src/main/eval.c:6338 src/main/eval.c:6359
 msgid "unable to open 'file'"
 msgstr ""
 
-#: src/main/eval.c:5419 src/main/saveload.c:1942
+#: src/main/eval.c:6353 src/main/saveload.c:1944
 msgid "'file' must be non-empty string"
 msgstr ""
 
-#: src/main/eval.c:5421 src/main/saveload.c:1944 src/main/saveload.c:2244
-#: src/main/serialize.c:2149
+#: src/main/eval.c:6355 src/main/saveload.c:1946 src/main/saveload.c:2246
+#: src/main/serialize.c:2189
 msgid "'ascii' must be logical"
 msgstr ""
 
-#: src/main/eval.c:5492 src/main/eval.c:5511 src/main/eval.c:5541
+#: src/main/eval.c:6426 src/main/eval.c:6445 src/main/eval.c:6475
 msgid "constant buffer must be a generic vector"
 msgstr ""
 
-#: src/main/eval.c:5543
+#: src/main/eval.c:6477
 msgid "bad constant count"
 msgstr ""
 
-#: src/main/eval.c:5579
+#: src/main/eval.c:6515
 msgid "profile timer in use"
 msgstr ""
 
-#: src/main/eval.c:5581
+#: src/main/eval.c:6517
 msgid "already byte code profiling"
 msgstr ""
 
-#: src/main/eval.c:5599
+#: src/main/eval.c:6535
 msgid "setting profile timer failed"
 msgstr ""
 
-#: src/main/eval.c:5616
+#: src/main/eval.c:6553
 msgid "not byte code profiling"
 msgstr ""
 
+#: src/main/eval.c:6569 src/main/eval.c:6573 src/main/eval.c:6577
+msgid "byte code profiling is not supported in this build"
+msgstr ""
+
 #: src/main/gevents.c:43
 #, c-format
 msgid "'%s' events not supported in this device"
@@ -3607,26 +3665,26 @@ msgstr ""
 msgid "this graphics device does not support event handling"
 msgstr ""
 
-#: src/main/gevents.c:136
+#: src/main/gevents.c:135
 msgid "invalid prompt"
 msgstr ""
 
-#: src/main/gevents.c:148
+#: src/main/gevents.c:146
 msgid "recursive use of 'getGraphicsEvent' not supported"
 msgstr ""
 
-#: src/main/gevents.c:158
+#: src/main/gevents.c:157
 msgid "no graphics event handlers set"
 msgstr ""
 
-#: src/main/gram.y:222 src/main/gram.y:237 src/main/gram.y:2222
-#: src/main/gram.y:2236
+#: src/main/gram.y:222 src/main/gram.y:237 src/main/gram.y:2245
+#: src/main/gram.y:2259
 #, c-format
 msgid "EOF whilst reading MBCS char at line %d"
 msgstr ""
 
-#: src/main/gram.y:226 src/main/gram.y:234 src/main/gram.y:2226
-#: src/main/gram.y:2233
+#: src/main/gram.y:226 src/main/gram.y:234 src/main/gram.y:2249
+#: src/main/gram.y:2256
 #, c-format
 msgid "invalid multibyte character in parser at line %d"
 msgstr ""
@@ -3641,126 +3699,139 @@ msgstr ""
 msgid "incorrect tag type at line %d"
 msgstr ""
 
-#: src/main/gram.y:1653
+#: src/main/gram.y:1657
 msgid "contextstack overflow"
 msgstr ""
 
-#: src/main/gram.y:1890
-msgid "input"
+#: src/main/gram.y:1907 src/main/gram.y:1913
+#, c-format
+msgid "unexpected input"
 msgstr ""
 
-#: src/main/gram.y:1891
-msgid "end of input"
+#: src/main/gram.y:1910 src/main/main.c:311
+#, c-format
+msgid "unexpected end of input"
 msgstr ""
 
-#: src/main/gram.y:1892
-msgid "string constant"
+#: src/main/gram.y:1916
+#, c-format
+msgid "unexpected string constant"
 msgstr ""
 
-#: src/main/gram.y:1893
-msgid "numeric constant"
+#: src/main/gram.y:1919
+#, c-format
+msgid "unexpected numeric constant"
 msgstr ""
 
-#: src/main/gram.y:1894
-msgid "symbol"
+#: src/main/gram.y:1922
+#, c-format
+msgid "unexpected symbol"
 msgstr ""
 
-#: src/main/gram.y:1895
-msgid "assignment"
+#: src/main/gram.y:1925
+#, c-format
+msgid "unexpected assignment"
 msgstr ""
 
-#: src/main/gram.y:1896
-msgid "end of line"
+#: src/main/gram.y:1928
+#, c-format
+msgid "unexpected end of line"
 msgstr ""
 
-#: src/main/gram.y:1910 src/main/gram.y:1916
+#: src/main/gram.y:1931 src/main/gram.y:1939
 #, c-format
 msgid "unexpected %s"
 msgstr ""
 
-#: src/main/gram.y:1926
+#: src/main/gram.y:1951
 #, c-format
 msgid "repeated formal argument '%s' on line %d"
 msgstr ""
 
-#: src/main/gram.y:2136
+#: src/main/gram.y:2161
 #, c-format
 msgid "integer literal %s contains decimal; using numeric value"
 msgstr ""
 
-#: src/main/gram.y:2140
+#: src/main/gram.y:2164
 #, c-format
 msgid "non-integer value %s qualified with L; using numeric value"
 msgstr ""
 
-#: src/main/gram.y:2153
+#: src/main/gram.y:2176
 #, c-format
 msgid "integer literal %s contains unnecessary decimal point"
 msgstr ""
 
-#: src/main/gram.y:2185
+#: src/main/gram.y:2208
 #, c-format
 msgid "unable to allocate buffer for long string at line %d"
 msgstr ""
 
-#: src/main/gram.y:2338
+#: src/main/gram.y:2347 src/main/gram.y:2370 src/main/gram.y:2407
+#: src/main/gram.y:2443
+#, c-format
+msgid "nul character not allowed (line %d)"
+msgstr ""
+
+#: src/main/gram.y:2363
 #, c-format
 msgid "'\\x' used without hex digits in character string starting \"%s\""
 msgstr ""
 
-#: src/main/gram.y:2352
+#: src/main/gram.y:2379
 #, c-format
 msgid "\\uxxxx sequences not supported inside backticks (line %d)"
 msgstr ""
 
-#: src/main/gram.y:2367
+#: src/main/gram.y:2394
 #, c-format
 msgid "'\\u' used without hex digits in character string starting \"%s\""
 msgstr ""
 
-#: src/main/gram.y:2375
+#: src/main/gram.y:2402
 #, c-format
 msgid "invalid \\u{xxxx} sequence (line %d)"
 msgstr ""
 
-#: src/main/gram.y:2387
+#: src/main/gram.y:2416
 #, c-format
 msgid "\\Uxxxxxxxx sequences not supported inside backticks (line %d)"
 msgstr ""
 
-#: src/main/gram.y:2402
+#: src/main/gram.y:2431
 #, c-format
 msgid "'\\U' used without hex digits in character string starting \"%s\""
 msgstr ""
 
-#: src/main/gram.y:2410
+#: src/main/gram.y:2439
 #, c-format
 msgid "invalid \\U{xxxxxxxx} sequence (line %d)"
 msgstr ""
 
-#: src/main/gram.y:2451
+#: src/main/gram.y:2482
 #, c-format
 msgid "'\\%c' is an unrecognized escape in character string starting \"%s\""
 msgstr ""
 
-#: src/main/gram.y:2510
+#: src/main/gram.y:2546
 msgid "mixing Unicode and octal/hex escapes in a string is not allowed"
 msgstr ""
 
-#: src/main/gram.y:2514
+#: src/main/gram.y:2550
 #, c-format
 msgid ""
 "string at line %d containing Unicode escapes not in this locale\n"
 "is too long (max 10000 chars)"
 msgstr ""
 
-#: src/main/gram.y:3112 src/main/gram.y:3119 src/main/gram.y:3125
-#: src/main/gram.y:3132
+#: src/main/gram.y:3148 src/main/gram.y:3155 src/main/gram.y:3161
+#: src/main/gram.y:3168
 #, c-format
 msgid "contextstack overflow at line %d"
 msgstr ""
 
-#: src/main/gram.y:3227
+#: src/main/gram.y:3263
 #, c-format
 msgid "internal parser error at line %d"
 msgstr ""
@@ -3770,34 +3841,34 @@ msgstr ""
 msgid "relative range of values =%4.0f * EPS, is small (axis %d)"
 msgstr ""
 
-#: src/main/grep.c:93
+#: src/main/grep.c:96
 #, c-format
 msgid "invalid regular expression '%s', reason '%s'"
 msgstr ""
 
-#: src/main/grep.c:95
+#: src/main/grep.c:98
 #, c-format
 msgid "invalid regular expression, reason '%s'"
 msgstr ""
 
-#: src/main/grep.c:220 src/main/grep.c:308 src/main/grep.c:416
-#: src/main/grep.c:883 src/main/grep.c:2473
+#: src/main/grep.c:225 src/main/grep.c:315 src/main/grep.c:426
+#: src/main/grep.c:900 src/main/grep.c:2502
 #, c-format
 msgid "input string %d is invalid UTF-8"
 msgstr ""
 
-#: src/main/grep.c:286 src/main/grep.c:383
+#: src/main/grep.c:292 src/main/grep.c:391
 #, c-format
 msgid "'split' string %d is invalid UTF-8"
 msgstr ""
 
-#: src/main/grep.c:290 src/main/grep.c:387 src/main/grep.c:560
+#: src/main/grep.c:296 src/main/grep.c:395 src/main/grep.c:571
 #, c-format
 msgid "'split' string %d is invalid in this locale"
 msgstr ""
 
-#: src/main/grep.c:395 src/main/grep.c:851 src/main/grep.c:1600
-#: src/main/grep.c:2394
+#: src/main/grep.c:404 src/main/grep.c:867 src/main/grep.c:1621
+#: src/main/grep.c:2419
 #, c-format
 msgid ""
 "PCRE pattern compilation error\n"
@@ -3805,58 +3876,58 @@ msgid ""
 "\tat '%s'\n"
 msgstr ""
 
-#: src/main/grep.c:397
+#: src/main/grep.c:406
 #, c-format
 msgid "invalid split pattern '%s'"
 msgstr ""
 
-#: src/main/grep.c:401 src/main/grep.c:857 src/main/grep.c:1607
-#: src/main/grep.c:2401
+#: src/main/grep.c:410 src/main/grep.c:873 src/main/grep.c:1628
+#: src/main/grep.c:2426
 #, c-format
 msgid ""
 "PCRE pattern study error\n"
 "\t'%s'\n"
 msgstr ""
 
-#: src/main/grep.c:834 src/main/grep.c:2377
+#: src/main/grep.c:849 src/main/grep.c:2401
 msgid "regular expression is invalid UTF-8"
 msgstr ""
 
-#: src/main/grep.c:853 src/main/grep.c:1602 src/main/grep.c:2396
+#: src/main/grep.c:869 src/main/grep.c:1623 src/main/grep.c:2421
 #, c-format
 msgid "invalid regular expression '%s'"
 msgstr ""
 
-#: src/main/grep.c:1264
+#: src/main/grep.c:1282
 msgid "pattern matches an empty string infinitely, returning first match only"
 msgstr ""
 
-#: src/main/grep.c:1575
+#: src/main/grep.c:1595
 msgid "'pattern' is invalid UTF-8"
 msgstr ""
 
-#: src/main/grep.c:1577
+#: src/main/grep.c:1597
 msgid "'replacement' is invalid UTF-8"
 msgstr ""
 
-#: src/main/grep.c:1581
+#: src/main/grep.c:1601
 msgid "'pattern' is invalid in this locale"
 msgstr ""
 
-#: src/main/grep.c:1584
+#: src/main/grep.c:1604
 msgid "'replacement' is invalid in this locale"
 msgstr ""
 
-#: src/main/grep.c:1589
+#: src/main/grep.c:1609
 msgid "zero-length pattern"
 msgstr ""
 
-#: src/main/grep.c:1732 src/main/grep.c:1748 src/main/grep.c:1796
-#: src/main/grep.c:1812 src/main/grep.c:1859 src/main/grep.c:1875
+#: src/main/grep.c:1753 src/main/grep.c:1769 src/main/grep.c:1817
+#: src/main/grep.c:1833 src/main/grep.c:1880 src/main/grep.c:1896
 msgid "result string is too long"
 msgstr ""
 
-#: src/main/grep.c:2411
+#: src/main/grep.c:2436
 #, c-format
 msgid "'pcre_fullinfo' returned '%d' "
 msgstr ""
@@ -3865,31 +3936,26 @@ msgstr ""
 msgid "ignoring non-pairlist attributes"
 msgstr ""
 
-#: src/main/internet.c:92
+#: src/main/internet.c:83
 msgid "internet routines cannot be accessed in module"
 msgstr ""
 
-#: src/main/internet.c:103 src/main/internet.c:141 src/main/internet.c:154
-#: src/main/internet.c:165 src/main/internet.c:176 src/main/internet.c:187
-#: src/main/internet.c:196 src/main/internet.c:207 src/main/internet.c:218
-#: src/main/internet.c:227 src/main/internet.c:237
+#: src/main/internet.c:94 src/main/internet.c:106 src/main/internet.c:119
+#: src/main/internet.c:130 src/main/internet.c:141 src/main/internet.c:152
+#: src/main/internet.c:161 src/main/internet.c:172 src/main/internet.c:183
+#: src/main/internet.c:192 src/main/internet.c:202 src/main/internet.c:318
+#: src/main/internet.c:330 src/main/internet.c:342 src/main/internet.c:354
 msgid "internet routines cannot be loaded"
 msgstr ""
 
-#: src/main/internet.c:118 src/main/memory.c:3434 src/main/memory.c:3444
-#: src/main/memory.c:3456 src/main/memory.c:3470 src/main/memory.c:3487
-#: src/main/memory.c:3505
-msgid "bad value"
-msgstr ""
-
-#: src/main/internet.c:124
-msgid "internet routines were already initialized"
+#: src/main/internet.c:216 src/main/internet.c:230 src/main/internet.c:247
+#: src/main/internet.c:259 src/main/internet.c:273 src/main/internet.c:293
+#: src/main/internet.c:306
+msgid "socket routines cannot be loaded"
 msgstr ""
 
-#: src/main/internet.c:251 src/main/internet.c:265 src/main/internet.c:281
-#: src/main/internet.c:293 src/main/internet.c:307 src/main/internet.c:327
-#: src/main/internet.c:340
-msgid "socket routines cannot be loaded"
+#: src/main/internet.c:242
+msgid "attempt to close invalid socket"
 msgstr ""
 
 #: src/main/lapack.c:39
@@ -3900,42 +3966,38 @@ msgstr ""
 msgid "LAPACK routines cannot be loaded"
 msgstr ""
 
-#: src/main/logic.c:70
-msgid "binary operations require two arguments"
-msgstr ""
-
-#: src/main/logic.c:88 src/main/logic.c:150
+#: src/main/logic.c:80 src/main/logic.c:142
 msgid "operations are possible only for numeric, logical or complex types"
 msgstr ""
 
-#: src/main/logic.c:98
+#: src/main/logic.c:90
 msgid "binary operation on non-conformable arrays"
 msgstr ""
 
-#: src/main/logic.c:124 src/main/relop.c:247
+#: src/main/logic.c:116 src/main/relop.c:241
 msgid "non-conformable time series"
 msgstr ""
 
-#: src/main/logic.c:254
+#: src/main/logic.c:247
 #, c-format
 msgid "'%s' operator requires 2 arguments"
 msgstr ""
 
-#: src/main/logic.c:261
+#: src/main/logic.c:254
 #, c-format
 msgid "invalid 'x' type in 'x %s y'"
 msgstr ""
 
-#: src/main/logic.c:268
+#: src/main/logic.c:261
 #, c-format
 msgid "invalid 'y' type in 'x %s y'"
 msgstr ""
 
-#: src/main/logic.c:341
+#: src/main/logic.c:334
 msgid "Unary operator `!' called with two arguments"
 msgstr ""
 
-#: src/main/logic.c:448
+#: src/main/logic.c:439
 #, c-format
 msgid "coercing argument of type '%s' to logical"
 msgstr ""
@@ -3944,61 +4006,73 @@ msgstr ""
 msgid "dummy - do not translate"
 msgstr ""
 
-#: src/main/main.c:476
+#: src/main/main.c:329
+msgid "error during cleanup\n"
+msgstr ""
+
+#: src/main/main.c:336
+msgid "Execution halted\n"
+msgstr ""
+
+#: src/main/main.c:505
 msgid "Error: segfault from C stack overflow\n"
 msgstr ""
 
-#: src/main/main.c:846
+#: src/main/main.c:888
 msgid "unable to open the base package\n"
 msgstr ""
 
-#: src/main/main.c:924
+#: src/main/main.c:971
 #, c-format
 msgid "unable to restore saved data in %s\n"
 msgstr ""
 
-#: src/main/main.c:971
+#: src/main/main.c:1020
 msgid "During startup - "
 msgstr ""
 
-#: src/main/main.c:1224
+#: src/main/main.c:1036
+msgid "unable to initialize the JIT\n"
+msgstr ""
+
+#: src/main/main.c:1290
 msgid "cannot quit from browser"
 msgstr ""
 
-#: src/main/main.c:1228
+#: src/main/main.c:1294
 msgid "one of \"yes\", \"no\", \"ask\" or \"default\" expected."
 msgstr ""
 
-#: src/main/main.c:1233
+#: src/main/main.c:1299
 msgid "save=\"ask\" in non-interactive use: command-line default will be used"
 msgstr ""
 
-#: src/main/main.c:1241
+#: src/main/main.c:1307
 msgid "unrecognized value of 'save'"
 msgstr ""
 
-#: src/main/main.c:1244
+#: src/main/main.c:1310
 msgid "invalid 'status', 0 assumed"
 msgstr ""
 
-#: src/main/main.c:1249
+#: src/main/main.c:1315
 msgid "invalid 'runLast', FALSE assumed"
 msgstr ""
 
-#: src/main/main.c:1280
+#: src/main/main.c:1346
 msgid "cannot allocate space for toplevel callback element"
 msgstr ""
 
-#: src/main/main.c:1358
+#: src/main/main.c:1424
 msgid "negative index passed to R_removeTaskCallbackByIndex"
 msgstr ""
 
-#: src/main/main.c:1468
+#: src/main/main.c:1534
 #, c-format
 msgid "warning messages from top-level task callback '%s'\n"
 msgstr ""
 
-#: src/main/main.c:1524
+#: src/main/main.c:1591
 msgid "top-level task callback did not return a logical value"
 msgstr ""
 
@@ -4018,226 +4092,223 @@ msgstr ""
 msgid "invalid partial string match"
 msgstr ""
 
-#: src/main/match.c:228 src/main/match.c:268 src/main/objects.c:56
-#: src/main/objects.c:66
+#: src/main/match.c:228 src/main/match.c:266 src/main/objects.c:49
+#: src/main/objects.c:59
 #, c-format
 msgid "formal argument \"%s\" matched by multiple actual arguments"
 msgstr ""
 
-#: src/main/match.c:231 src/main/match.c:266
+#: src/main/match.c:231 src/main/match.c:264
 #, c-format
 msgid "argument %d matches multiple formal arguments"
 msgstr ""
 
-#: src/main/match.c:272
+#: src/main/match.c:270
 #, c-format
 msgid "partial argument match of '%s' to '%s'"
 msgstr ""
 
-#: src/main/match.c:383
+#: src/main/match.c:380
 #, c-format
 msgid "unused argument %s"
 msgid_plural "unused arguments %s"
 msgstr[0] ""
 msgstr[1] ""
 
-#: src/main/memory.c:1232
+#: src/main/memory.c:1234
 msgid "can only weakly reference/finalize reference objects"
 msgstr ""
 
-#: src/main/memory.c:1266
+#: src/main/memory.c:1268
 msgid "finalizer must be a function or NULL"
 msgstr ""
 
-#: src/main/memory.c:1322 src/main/memory.c:1330 src/main/memory.c:1341
+#: src/main/memory.c:1324 src/main/memory.c:1332 src/main/memory.c:1343
 msgid "not a weak reference"
 msgstr ""
 
-#: src/main/memory.c:1472
+#: src/main/memory.c:1474
 msgid "first argument must be environment or external pointer"
 msgstr ""
 
-#: src/main/memory.c:1474
+#: src/main/memory.c:1476
 msgid "second argument must be a function"
 msgstr ""
 
-#: src/main/memory.c:1478
+#: src/main/memory.c:1480
 msgid "third argument must be 'TRUE' or 'FALSE'"
 msgstr ""
 
-#: src/main/memory.c:1970
+#: src/main/memory.c:1979
 msgid "vector memory exhausted (limit reached?)"
 msgstr ""
 
-#: src/main/memory.c:1976
+#: src/main/memory.c:1985
 msgid "cons memory exhausted (limit reached?)"
 msgstr ""
 
-#: src/main/memory.c:1981
+#: src/main/memory.c:1990
 msgid "memory exhausted (limit reached?)"
 msgstr ""
 
-#: src/main/memory.c:2116
+#: src/main/memory.c:2126
 #, c-format
 msgid "cannot allocate memory block of size %0.f Tb"
 msgstr ""
 
-#: src/main/memory.c:2121
+#: src/main/memory.c:2131
 #, c-format
 msgid "cannot allocate memory block of size %0.1f Gb"
 msgstr ""
 
-#: src/main/memory.c:2442
+#: src/main/memory.c:2458
 msgid "vector is too large"
 msgstr ""
 
-#: src/main/memory.c:2445
+#: src/main/memory.c:2461
 msgid "negative length vectors are not allowed"
 msgstr ""
 
-#: src/main/memory.c:2471 src/main/memory.c:2484 src/main/memory.c:2497
-#: src/main/memory.c:2512
+#: src/main/memory.c:2487 src/main/memory.c:2500 src/main/memory.c:2513
+#: src/main/memory.c:2528
 #, c-format
 msgid "cannot allocate vector of length %d"
 msgstr ""
 
-#: src/main/memory.c:2533
+#: src/main/memory.c:2549
 #, c-format
 msgid "invalid type/length (%s/%d) in vector allocation"
 msgstr ""
 
-#: src/main/memory.c:2636
+#: src/main/memory.c:2648
 #, c-format
 msgid "cannot allocate vector of size %0.1f Gb"
 msgstr ""
 
-#: src/main/memory.c:2640
+#: src/main/memory.c:2652
 #, c-format
 msgid "cannot allocate vector of size %0.1f Mb"
 msgstr ""
 
-#: src/main/memory.c:2644
+#: src/main/memory.c:2656
 #, c-format
 msgid "cannot allocate vector of size %0.f Kb"
 msgstr ""
 
-#: src/main/memory.c:3001
+#: src/main/memory.c:3071
 msgid "protect(): protection stack overflow"
 msgstr ""
 
-#: src/main/memory.c:3008
+#: src/main/memory.c:3078
 #, c-format
-msgid "unprotect(): only %d protected items"
-msgstr ""
+msgid "unprotect(): only %d protected item"
+msgid_plural "unprotect(): only %d protected items"
+msgstr[0] ""
+msgstr[1] ""
 
-#: src/main/memory.c:3041
+#: src/main/memory.c:3113
 msgid "unprotect_ptr: pointer not found"
 msgstr ""
 
-#: src/main/memory.c:3079
+#: src/main/memory.c:3151
 #, c-format
-msgid "R_Reprotect: only %d protected items, can't reprotect index %d"
-msgstr ""
+msgid "R_Reprotect: only %d protected item, can't reprotect index %d"
+msgid_plural "R_Reprotect: only %d protected items, can't reprotect index %d"
+msgstr[0] ""
+msgstr[1] ""
 
-#: src/main/memory.c:3129
+#: src/main/memory.c:3203
 #, c-format
 msgid "'Calloc' could not allocate memory (%.0f of %u bytes)"
 msgstr ""
 
-#: src/main/memory.c:3140
+#: src/main/memory.c:3214
 #, c-format
 msgid "'Realloc' could not re-allocate memory (%.0f bytes)"
 msgstr ""
 
-#: src/main/memory.c:3380
+#: src/main/memory.c:3460
 msgid "not safe to return vector pointer"
 msgstr ""
 
-#: src/main/memory.c:3392
+#: src/main/memory.c:3471
 #, c-format
 msgid "attempt to set index %lu/%lu in SET_STRING_ELT"
 msgstr ""
 
-#: src/main/memory.c:3408
+#: src/main/memory.c:3487
 #, c-format
 msgid "attempt to set index %lu/%lu in SET_VECTOR_ELT"
 msgstr ""
 
-#: src/main/memory.c:3658
+#: src/main/memory.c:3514 src/main/memory.c:3524 src/main/memory.c:3536
+#: src/main/memory.c:3550 src/main/memory.c:3565 src/main/memory.c:3583
+msgid "bad value"
+msgstr ""
+
+#: src/main/memory.c:3746
 msgid "memory profiling is not available on this system"
 msgstr ""
 
-#: src/main/memory.c:3723
+#: src/main/memory.c:3810
 #, c-format
 msgid "Rprofmem: cannot open output file '%s'"
 msgstr ""
 
-#: src/main/memory.c:3830
+#: src/main/memory.c:3915
 #, c-format
 msgid "long vectors not supported yet: %s:%d"
 msgstr ""
 
-#: src/main/names.c:996
+#: src/main/names.c:1021
 msgid "string argument required"
 msgstr ""
 
-#: src/main/names.c:999
+#: src/main/names.c:1024
 msgid "no such primitive function"
 msgstr ""
 
-#: src/main/names.c:1146
+#: src/main/names.c:1212 src/main/names.c:1242
 msgid "attempt to use zero-length variable name"
 msgstr ""
 
-#: src/main/names.c:1148
+#: src/main/names.c:1214 src/main/names.c:1244
 #, c-format
 msgid "variable names are limited to %d bytes"
 msgstr ""
 
-#: src/main/names.c:1176 src/main/names.c:1179
+#: src/main/names.c:1307 src/main/names.c:1310
 msgid "invalid .Internal() argument"
 msgstr ""
 
-#: src/main/objects.c:46
+#: src/main/objects.c:39
 msgid "generic 'function' is not a function"
 msgstr ""
 
-#: src/main/objects.c:201
+#: src/main/objects.c:193
 msgid "bad generic call environment"
 msgstr ""
 
-#: src/main/objects.c:207
+#: src/main/objects.c:201
 msgid "bad generic definition environment"
 msgstr ""
 
-#: src/main/objects.c:246
+#: src/main/objects.c:249
 msgid ""
 "no '.S3MethodsClass' table, cannot use S4 objects with S3 methods ('methods' "
 "package not attached?)"
 msgstr ""
 
-#: src/main/objects.c:270 src/main/objects.c:411
-msgid "'UseMethod' used in an inappropriate fashion"
-msgstr ""
-
-#: src/main/objects.c:290
-msgid "invalid generic function in 'usemethod'"
-msgstr ""
-
-#: src/main/objects.c:399
+#: src/main/objects.c:415
 msgid "there must be a 'generic' argument"
 msgstr ""
 
-#: src/main/objects.c:403
+#: src/main/objects.c:419
 msgid "'generic' argument must be a character string"
 msgstr ""
 
-#: src/main/objects.c:440
-msgid "'UseMethod' called from outside a function"
-msgstr ""
-
-#: src/main/objects.c:447
-msgid "first argument must be a generic name"
+#: src/main/objects.c:427
+msgid "'UseMethod' used in an inappropriate fashion"
 msgstr ""
 
 #: src/main/objects.c:472
@@ -4245,226 +4316,225 @@ msgstr ""
 msgid "no applicable method for '%s' applied to an object of class \"%s\""
 msgstr ""
 
-#: src/main/objects.c:533
+#: src/main/objects.c:582
 msgid "'NextMethod' called from outside a function"
 msgstr ""
 
-#: src/main/objects.c:539
+#: src/main/objects.c:588
 msgid "'NextMethod' called from an anonymous function"
 msgstr ""
 
-#: src/main/objects.c:563
+#: src/main/objects.c:609
 msgid "no calling generic was found: was a method called directly?"
 msgstr ""
 
-#: src/main/objects.c:566
+#: src/main/objects.c:612
 #, c-format
 msgid "'function' is not a function, but of type %d"
 msgstr ""
 
-#: src/main/objects.c:640
+#: src/main/objects.c:639
 msgid "wrong argument ..."
 msgstr ""
 
-#: src/main/objects.c:653
+#: src/main/objects.c:651
 msgid "object not specified"
 msgstr ""
 
-#: src/main/objects.c:663 src/main/objects.c:670
+#: src/main/objects.c:659 src/main/objects.c:666
 msgid "generic function not specified"
 msgstr ""
 
-#: src/main/objects.c:667
+#: src/main/objects.c:663
 msgid "invalid generic argument to 'NextMethod'"
 msgstr ""
 
-#: src/main/objects.c:680
+#: src/main/objects.c:675
 msgid "invalid 'group' argument found in 'NextMethod'"
 msgstr ""
 
-#: src/main/objects.c:699
+#: src/main/objects.c:692
 msgid "wrong value for .Method"
 msgstr ""
 
-#: src/main/objects.c:703 src/main/objects.c:712
-#, c-format
-msgid "method name too long in '%s'"
-msgstr ""
-
-#: src/main/objects.c:715
+#: src/main/objects.c:702
 msgid "Incompatible methods ignored"
 msgstr ""
 
-#: src/main/objects.c:775 src/main/objects.c:780
+#: src/main/objects.c:759 src/main/objects.c:766
 msgid "no method to invoke"
 msgstr ""
 
-#: src/main/objects.c:832
+#: src/main/objects.c:817
 msgid "cannot unclass an environment"
 msgstr ""
 
-#: src/main/objects.c:835
+#: src/main/objects.c:820
 msgid "cannot unclass an external pointer"
 msgstr ""
 
-#: src/main/objects.c:872
+#: src/main/objects.c:856
 msgid "'what' must be a character vector"
 msgstr ""
 
-#: src/main/objects.c:876
+#: src/main/objects.c:860
 msgid "'which' must be a length 1 logical vector"
 msgstr ""
 
-#: src/main/objects.c:882
+#: src/main/objects.c:866
 msgid "use 'is()' instead of 'inherits()' on S4 objects"
 msgstr ""
 
-#: src/main/objects.c:1012
+#: src/main/objects.c:995
 msgid "could not find correct environment; please report!"
 msgstr ""
 
-#: src/main/objects.c:1052
+#: src/main/objects.c:1039
 msgid "'onOff' must be TRUE or FALSE"
 msgstr ""
 
-#: src/main/objects.c:1119
+#: src/main/objects.c:1104
 #, c-format
 msgid "unable to find a non-generic version of function \"%s\""
 msgstr ""
 
-#: src/main/objects.c:1151
+#: src/main/objects.c:1136
 msgid ""
 "'standardGeneric' called without 'methods' dispatch enabled (will be ignored)"
 msgstr ""
 
-#: src/main/objects.c:1160
+#: src/main/objects.c:1145
 msgid "argument to 'standardGeneric' must be a non-empty character string"
 msgstr ""
 
-#: src/main/objects.c:1165
+#: src/main/objects.c:1150
 #, c-format
 msgid ""
 "call to standardGeneric(\"%s\") apparently not from the body of that generic "
 "function"
 msgstr ""
 
-#: src/main/objects.c:1189
-msgid "argument 'code' must be a character string"
-msgstr ""
-
-#: src/main/objects.c:1257
+#: src/main/objects.c:1249
 #, c-format
 msgid ""
 "invalid primitive methods code (\"%s\"): should be \"clear\", \"reset\", "
 "\"set\", or \"suppress\""
 msgstr ""
 
-#: src/main/objects.c:1265
+#: src/main/objects.c:1257
 msgid "invalid object: must be a primitive function"
 msgstr ""
 
-#: src/main/objects.c:1312
+#: src/main/objects.c:1304
 #, c-format
 msgid ""
 "the formal definition of a primitive generic must be a function object (got "
 "type '%s')"
 msgstr ""
 
-#: src/main/objects.c:1342
+#: src/main/objects.c:1334
 #, c-format
 msgid "object returned as generic function \"%s\" does not appear to be one"
 msgstr ""
 
-#: src/main/objects.c:1444
+#: src/main/objects.c:1439
 msgid "invalid primitive operation given for dispatch"
 msgstr ""
 
-#: src/main/objects.c:1470 src/main/objects.c:1489
+#: src/main/objects.c:1468 src/main/objects.c:1487
 msgid "dispatch error"
 msgstr ""
 
-#: src/main/objects.c:1483
+#: src/main/objects.c:1481
 #, c-format
 msgid ""
 "primitive function \"%s\" has been set for methods but no generic function "
 "supplied"
 msgstr ""
 
-#: src/main/objects.c:1508
+#: src/main/objects.c:1506
 msgid "C level MAKE_CLASS macro called with NULL string pointer"
 msgstr ""
 
-#: src/main/objects.c:1524
+#: src/main/objects.c:1522
+msgid "'methods' package not yet loaded"
+msgstr ""
+
+#: src/main/objects.c:1532
 msgid "R_getClassDef(.) called with NULL string pointer"
 msgstr ""
 
-#: src/main/objects.c:1546
+#: src/main/objects.c:1577
 msgid "C level NEW macro called with null class definition pointer"
 msgstr ""
 
-#: src/main/objects.c:1550
+#: src/main/objects.c:1581
 #, c-format
 msgid "trying to generate an object from a virtual class (\"%s\")"
 msgstr ""
 
-#: src/main/objects.c:1627
+#: src/main/objects.c:1663
 #, c-format
 msgid "object of class \"%s\" does not correspond to a valid S3 object"
 msgstr ""
 
-#: src/main/options.c:120 src/main/options.c:180
+#: src/main/options.c:121 src/main/options.c:182
 msgid "corrupted options list"
 msgstr ""
 
-#: src/main/options.c:130
+#: src/main/options.c:131
 msgid "invalid printing width, used 80"
 msgstr ""
 
-#: src/main/options.c:141
+#: src/main/options.c:142
 msgid "invalid printing digits, used 7"
 msgstr ""
 
-#: src/main/options.c:153
+#: src/main/options.c:154
 msgid "invalid 'deparse.cutoff', used 60"
 msgstr ""
 
-#: src/main/options.c:165
+#: src/main/options.c:166
 msgid "invalid value for \"device.ask.default\", using FALSE"
 msgstr ""
 
-#: src/main/options.c:401
+#: src/main/options.c:416
 msgid "list argument has no valid names"
 msgstr ""
 
-#: src/main/options.c:429
+#: src/main/options.c:445
 #, c-format
 msgid "invalid 'width' parameter, allowed %d...%d"
 msgstr ""
 
-#: src/main/options.c:440
+#: src/main/options.c:456
 #, c-format
 msgid "invalid 'digits' parameter, allowed %d...%d"
 msgstr ""
 
-#: src/main/options.c:447
+#: src/main/options.c:463
 #, c-format
 msgid "'expressions' parameter invalid, allowed %d...%d"
 msgstr ""
 
-#: src/main/options.c:454 src/main/options.c:462 src/main/options.c:468
-#: src/main/options.c:476 src/main/options.c:483 src/main/options.c:488
-#: src/main/options.c:495 src/main/options.c:501 src/main/options.c:507
-#: src/main/options.c:512 src/main/options.c:517 src/main/options.c:526
-#: src/main/options.c:532 src/main/options.c:538 src/main/options.c:549
-#: src/main/options.c:556 src/main/options.c:562 src/main/options.c:570
-#: src/main/options.c:577 src/main/options.c:584 src/main/options.c:591
-#: src/main/options.c:598 src/main/options.c:606 src/main/options.c:615
-#: src/main/options.c:618 src/main/options.c:624
+#: src/main/options.c:470 src/main/options.c:478 src/main/options.c:484
+#: src/main/options.c:492 src/main/options.c:499 src/main/options.c:504
+#: src/main/options.c:511 src/main/options.c:517 src/main/options.c:523
+#: src/main/options.c:528 src/main/options.c:533 src/main/options.c:542
+#: src/main/options.c:548 src/main/options.c:554 src/main/options.c:564
+#: src/main/options.c:578 src/main/options.c:584 src/main/options.c:592
+#: src/main/options.c:599 src/main/options.c:606 src/main/options.c:613
+#: src/main/options.c:620 src/main/options.c:628 src/main/options.c:637
+#: src/main/options.c:640 src/main/options.c:646
 #, c-format
 msgid "invalid value for '%s'"
 msgstr ""
 
-#: src/main/options.c:611 src/main/options.c:640
+#: src/main/options.c:569
+msgid "'OutDec' must be a string of one character"
+msgstr ""
+
+#: src/main/options.c:633 src/main/options.c:662
 msgid "\"par.ask.default\" has been replaced by \"device.ask.default\""
 msgstr ""
 
@@ -4484,15 +4554,19 @@ msgstr ""
 msgid "non-string argument to Internal paste"
 msgstr ""
 
-#: src/main/paste.c:390
+#: src/main/paste.c:387
 msgid "first argument must be atomic"
 msgstr ""
 
-#: src/main/paste.c:560
+#: src/main/paste.c:448
+msgid "'decimal.mark' must be a string of one character"
+msgstr ""
+
+#: src/main/paste.c:579
 msgid "Impossible mode ( x )"
 msgstr ""
 
-#: src/main/paste.c:645
+#: src/main/paste.c:663
 msgid "atomic vector arguments only"
 msgstr ""
 
@@ -4500,209 +4574,192 @@ msgstr ""
 msgid "invalid filename specification"
 msgstr ""
 
-#: src/main/platform.c:375 src/main/platform.c:419
+#: src/main/platform.c:375 src/main/platform.c:420
 msgid "write error during file append"
 msgstr ""
 
-#: src/main/platform.c:394
+#: src/main/platform.c:395
 msgid "nothing to append to"
 msgstr ""
 
-#: src/main/platform.c:448 src/main/platform.c:795
+#: src/main/platform.c:449 src/main/platform.c:797 src/main/platform.c:979
 msgid "invalid filename argument"
 msgstr ""
 
-#: src/main/platform.c:460
+#: src/main/platform.c:461
 #, c-format
 msgid "cannot create file '%s', reason '%s'"
 msgstr ""
 
-#: src/main/platform.c:475 src/main/platform.c:545 src/main/platform.c:627
+#: src/main/platform.c:476 src/main/platform.c:546 src/main/platform.c:629
 msgid "invalid first filename"
 msgstr ""
 
-#: src/main/platform.c:487
+#: src/main/platform.c:488
 #, c-format
 msgid "cannot remove file '%s', reason '%s'"
 msgstr ""
 
-#: src/main/platform.c:547 src/main/platform.c:629
+#: src/main/platform.c:548 src/main/platform.c:631
 msgid "invalid second filename"
 msgstr ""
 
-#: src/main/platform.c:549 src/main/platform.c:631
+#: src/main/platform.c:551 src/main/platform.c:634
 msgid "nothing to link"
 msgstr ""
 
-#: src/main/platform.c:559
+#: src/main/platform.c:561
 msgid "symbolic links are not supported on this version of Windows"
 msgstr ""
 
-#: src/main/platform.c:581
+#: src/main/platform.c:583
 #, c-format
 msgid "cannot symlink '%ls' to '%ls', reason '%s'"
 msgstr ""
 
-#: src/main/platform.c:601
+#: src/main/platform.c:603
 #, c-format
 msgid "cannot symlink '%s' to '%s', reason '%s'"
 msgstr ""
 
-#: src/main/platform.c:609
+#: src/main/platform.c:611
 msgid "symbolic links are not supported on this platform"
 msgstr ""
 
-#: src/main/platform.c:649
+#: src/main/platform.c:652
 #, c-format
 msgid "cannot link '%ls' to '%ls', reason '%s'"
 msgstr ""
 
-#: src/main/platform.c:669
+#: src/main/platform.c:672
 #, c-format
 msgid "cannot link '%s' to '%s', reason '%s'"
 msgstr ""
 
-#: src/main/platform.c:678
+#: src/main/platform.c:681
 msgid "(hard) links are not supported on this platform"
 msgstr ""
 
-#: src/main/platform.c:709
+#: src/main/platform.c:713
 msgid "'from' and 'to' are of different lengths"
 msgstr ""
 
-#: src/main/platform.c:720 src/main/platform.c:730
+#: src/main/platform.c:724 src/main/platform.c:734
 msgid "expanded 'from' name too long"
 msgstr ""
 
-#: src/main/platform.c:724 src/main/platform.c:734
+#: src/main/platform.c:728 src/main/platform.c:738
 msgid "expanded 'to' name too long"
 msgstr ""
 
-#: src/main/platform.c:738
+#: src/main/platform.c:742
 #, c-format
 msgid "cannot rename file '%s' to '%s', reason '%s'"
 msgstr ""
 
-#: src/main/platform.c:1094
+#: src/main/platform.c:1168
 msgid "invalid 'pattern' regular expression"
 msgstr ""
 
-#: src/main/platform.c:1211
+#: src/main/platform.c:1285
 msgid "unable to determine R home location"
 msgstr ""
 
-#: src/main/platform.c:1263
+#: src/main/platform.c:1338
 msgid "file name too long"
 msgstr ""
 
-#: src/main/platform.c:1511 src/main/platform.c:1558 src/main/sysutils.c:1850
-#: src/main/sysutils.c:1864
+#: src/main/platform.c:1586 src/main/platform.c:1633 src/main/sysutils.c:1806
+#: src/main/sysutils.c:1820
 msgid "internal out-of-memory condition"
 msgstr ""
 
-#: src/main/platform.c:1554 src/main/sysutils.c:1860
+#: src/main/platform.c:1629 src/main/sysutils.c:1816
 #, c-format
 msgid "read error on '%s'"
 msgstr ""
 
-#: src/main/platform.c:1722
+#: src/main/platform.c:1728
 msgid "setting 'LC_NUMERIC' may cause R to function strangely"
 msgstr ""
 
-#: src/main/platform.c:1736
+#: src/main/platform.c:1742
 msgid "LC_MESSAGES exists on Windows but is not operational"
 msgstr ""
 
-#: src/main/platform.c:1763
+#: src/main/platform.c:1769
 #, c-format
 msgid "OS reports request to set locale to \"%s\" cannot be honored"
 msgstr ""
 
-#: src/main/platform.c:2065
-msgid "'hostname' must be a character vector of length 1"
-msgstr ""
-
-#: src/main/platform.c:2071
-#, c-format
-msgid "nsl() was unable to resolve host '%s'"
-msgstr ""
-
-#: src/main/platform.c:2078
-msgid "unknown format returned by C function 'gethostbyname'"
-msgstr ""
-
-#: src/main/platform.c:2087
-msgid "nsl() is not supported on this platform"
-msgstr ""
-
-#: src/main/platform.c:2158
+#: src/main/platform.c:2131
 #, c-format
 msgid "'%s' already exists"
 msgstr ""
 
-#: src/main/platform.c:2161
+#: src/main/platform.c:2134
 #, c-format
 msgid "cannot create dir '%s', reason '%s'"
 msgstr ""
 
-#: src/main/platform.c:2207
+#: src/main/platform.c:2181
 #, c-format
 msgid "'%ls' already exists"
 msgstr ""
 
-#: src/main/platform.c:2211
+#: src/main/platform.c:2183 src/main/platform.c:2189
 #, c-format
 msgid "cannot create dir '%ls', reason '%s'"
 msgstr ""
 
-#: src/main/platform.c:2245 src/main/platform.c:2449
+#: src/main/platform.c:2223 src/main/platform.c:2435
 msgid "too deep nesting"
 msgstr ""
 
-#: src/main/platform.c:2253 src/main/platform.c:2266 src/main/platform.c:2284
+#: src/main/platform.c:2231 src/main/platform.c:2244 src/main/platform.c:2262
 msgid "over-long path"
 msgstr ""
 
-#: src/main/platform.c:2273
+#: src/main/platform.c:2251
 #, c-format
 msgid "problem creating directory %ls: %s"
 msgstr ""
 
-#: src/main/platform.c:2293
+#: src/main/platform.c:2271
 #, c-format
 msgid "problem reading dir %ls: %s"
 msgstr ""
 
-#: src/main/platform.c:2304 src/main/platform.c:2465 src/main/platform.c:2478
-#: src/main/platform.c:2498 src/main/platform.c:2520
+#: src/main/platform.c:2282 src/main/platform.c:2451 src/main/platform.c:2464
+#: src/main/platform.c:2484 src/main/platform.c:2506
 msgid "over-long path length"
 msgstr ""
 
-#: src/main/platform.c:2312
+#: src/main/platform.c:2290
 #, c-format
 msgid "problem copying %ls to %ls: %s"
 msgstr ""
 
-#: src/main/platform.c:2487
+#: src/main/platform.c:2473
 #, c-format
 msgid "problem creating directory %s: %s"
 msgstr ""
 
-#: src/main/platform.c:2507
+#: src/main/platform.c:2493
 #, c-format
 msgid "problem reading directory %s: %s"
 msgstr ""
 
-#: src/main/platform.c:2529
+#: src/main/platform.c:2515
 #, c-format
 msgid "problem copying %s to %s: %s"
 msgstr ""
 
-#: src/main/platform.c:2662
+#: src/main/platform.c:2653
 msgid "'mode' must be of length at least one"
 msgstr ""
 
-#: src/main/platform.c:2729
+#: src/main/platform.c:2720
 msgid "insufficient OS support on this platform"
 msgstr ""
 
@@ -4723,91 +4780,95 @@ msgstr ""
 msgid "invalid math style encountered"
 msgstr ""
 
-#: src/main/plotmath.c:1261 src/main/plotmath.c:1366 src/main/plotmath.c:2664
+#: src/main/plotmath.c:1260 src/main/plotmath.c:1365 src/main/plotmath.c:2654
 msgid "invalid mathematical annotation"
 msgstr ""
 
-#: src/main/plotmath.c:1670
+#: src/main/plotmath.c:1669
 msgid "invalid accent"
 msgstr ""
 
-#: src/main/plotmath.c:1964
+#: src/main/plotmath.c:1963
 msgid "invalid group delimiter"
 msgstr ""
 
-#: src/main/plotmath.c:1991 src/main/plotmath.c:2137
+#: src/main/plotmath.c:1990 src/main/plotmath.c:2127
 msgid "invalid group specification"
 msgstr ""
 
-#: src/main/plotmath.c:2062
+#: src/main/plotmath.c:2052
 msgid "group is incomplete"
 msgstr ""
 
-#: src/main/plotmath.c:3190
+#: src/main/plotmath.c:3180
 msgid "Metric information not available for this family/device"
 msgstr ""
 
-#: src/main/print.c:148 src/main/print.c:254
+#: src/main/print.c:140 src/main/print.c:247
 msgid "invalid 'na.print' specification"
 msgstr ""
 
-#: src/main/print.c:157
+#: src/main/print.c:149
 msgid "invalid row labels"
 msgstr ""
 
-#: src/main/print.c:159
+#: src/main/print.c:151
 msgid "invalid column labels"
 msgstr ""
 
-#: src/main/print.c:183
+#: src/main/print.c:176
 msgid "non-function argument to .Internal(print.function(.))"
 msgstr ""
 
-#: src/main/print.c:264
+#: src/main/print.c:257
 msgid "'gap' must be non-negative integer"
 msgstr ""
 
-#: src/main/print.c:289
+#: src/main/print.c:282
 msgid "invalid 'tryS4' internal argument"
 msgstr ""
 
-#: src/main/print.c:1028
+#: src/main/print.c:851
+msgid "print buffer overflow"
+msgstr ""
+
+#: src/main/print.c:1043
 msgid "invalid character length in 'dblepr'"
 msgstr ""
 
-#: src/main/print.c:1046
+#: src/main/print.c:1061
 msgid "invalid character length in 'intpr'"
 msgstr ""
 
-#: src/main/print.c:1065
+#: src/main/print.c:1080
 msgid "invalid character length in 'realpr'"
 msgstr ""
 
-#: src/main/print.c:1075
+#: src/main/print.c:1090
 msgid "memory allocation error in 'realpr'"
 msgstr ""
 
-#: src/main/print.c:1091
+#: src/main/print.c:1106
 #, c-format
 msgid "BLAS/LAPACK routine '%6s' gave error code %d"
 msgstr ""
 
-#: src/main/printarray.c:453
+#: src/main/printarray.c:332
 msgid "too few row labels"
 msgstr ""
 
-#: src/main/printarray.c:455
+#: src/main/printarray.c:334
 msgid "too few column labels"
 msgstr ""
 
-#: src/main/printarray.c:489
+#: src/main/printarray.c:368
 #, c-format
 msgid " [ reached getOption(\"max.print\") -- omitted %d row ]\n"
 msgid_plural " [ reached getOption(\"max.print\") -- omitted %d rows ]\n"
 msgstr[0] ""
 msgstr[1] ""
 
-#: src/main/printutils.c:613
+#: src/main/printutils.c:710
 msgid "it is not known that wchar_t is Unicode on this platform"
 msgstr ""
 
@@ -4815,328 +4876,326 @@ msgstr ""
 msgid "argument is not a numeric vector"
 msgstr ""
 
-#: src/main/random.c:37
+#: src/main/random.c:39
 msgid "invalid arguments"
 msgstr ""
 
-#: src/main/random.c:93 src/main/random.c:110 src/main/random.c:175
-#: src/main/random.c:201 src/main/random.c:274 src/main/random.c:288
+#: src/main/random.c:95 src/main/random.c:112 src/main/random.c:178
+#: src/main/random.c:204 src/main/random.c:277 src/main/random.c:291
 msgid "NAs produced"
 msgstr ""
 
-#: src/main/random.c:445
+#: src/main/random.c:438
 msgid "NA in probability vector"
 msgstr ""
 
-#: src/main/random.c:447
-msgid "non-positive probability"
+#: src/main/random.c:440
+msgid "negative probability"
 msgstr ""
 
-#: src/main/random.c:454
+#: src/main/random.c:447
 msgid "too few positive probabilities"
 msgstr ""
 
-#: src/main/random.c:491 src/main/random.c:519
+#: src/main/random.c:483 src/main/random.c:511
 msgid "cannot take a sample larger than the population when 'replace = FALSE'"
 msgstr ""
 
-#: src/main/random.c:498
+#: src/main/random.c:490
 msgid "incorrect number of probabilities"
 msgstr ""
 
-#: src/main/random.c:537
+#: src/main/random.c:529
 msgid "n >= 2^31, replace = FALSE is only supported on 64-bit platforms"
 msgstr ""
 
-#: src/main/raw.c:37 src/main/raw.c:273
+#: src/main/raw.c:37 src/main/raw.c:277
 msgid "argument must be a character vector of length 1"
 msgstr ""
 
-#: src/main/raw.c:39 src/main/raw.c:275
+#: src/main/raw.c:39 src/main/raw.c:279
 msgid ""
 "argument should be a character vector of length 1\n"
 "all but the first element will be ignored"
 msgstr ""
 
-#: src/main/raw.c:53 src/main/raw.c:89 src/main/raw.c:110
+#: src/main/raw.c:53 src/main/raw.c:90 src/main/raw.c:113
 msgid "argument 'x' must be a raw vector"
 msgstr ""
 
-#: src/main/raw.c:56 src/main/raw.c:330
+#: src/main/raw.c:56 src/main/raw.c:336
 msgid "argument 'multiple' must be TRUE or FALSE"
 msgstr ""
 
-#: src/main/raw.c:91
+#: src/main/raw.c:92
 msgid "argument 'shift' must be a small integer"
 msgstr ""
 
-#: src/main/raw.c:129 src/main/raw.c:327
+#: src/main/raw.c:133 src/main/raw.c:333
 msgid "argument 'x' must be an integer vector"
 msgstr ""
 
-#: src/main/raw.c:148
+#: src/main/raw.c:153
 msgid "argument 'x' must be raw, integer or logical"
 msgstr ""
 
-#: src/main/raw.c:150
-msgid "argument 'type' must be a character string"
-msgstr ""
-
-#: src/main/raw.c:154
+#: src/main/raw.c:159
 #, c-format
 msgid "argument 'x' must be a multiple of %d long"
 msgstr ""
 
-#: src/main/raw.c:167 src/main/raw.c:181
+#: src/main/raw.c:172 src/main/raw.c:186
 msgid "argument 'x' must not contain NAs"
 msgstr ""
 
-#: src/main/raw.c:285
+#: src/main/raw.c:291
 msgid "invalid UTF-8 string"
 msgstr ""
 
-#: src/main/relop.c:202
+#: src/main/relop.c:196
 #, c-format
 msgid "comparison (%d) is possible only for atomic and list types"
 msgstr ""
 
-#: src/main/relop.c:207
+#: src/main/relop.c:201
 msgid "comparison is not allowed for expressions"
 msgstr ""
 
-#: src/main/relop.c:296
+#: src/main/relop.c:293
 msgid "comparison of these types is not implemented"
 msgstr ""
 
-#: src/main/relop.c:509
+#: src/main/relop.c:425
 msgid "invalid comparison with complex values"
 msgstr ""
 
-#: src/main/relop.c:767
+#: src/main/relop.c:683
 msgid "'a' and 'b' must have the same type"
 msgstr ""
 
-#: src/main/saveload.c:200 src/main/saveload.c:205 src/main/saveload.c:214
-#: src/main/saveload.c:223 src/main/saveload.c:232 src/main/saveload.c:241
-#: src/main/saveload.c:245 src/main/saveload.c:254 src/main/saveload.c:1381
-#: src/main/saveload.c:1386 src/main/saveload.c:1430 src/main/saveload.c:1498
-#: src/main/saveload.c:1507 src/main/serialize.c:331 src/main/serialize.c:338
-#: src/main/serialize.c:2388 src/main/serialize.c:2396
+#: src/main/saveload.c:202 src/main/saveload.c:207 src/main/saveload.c:216
+#: src/main/saveload.c:225 src/main/saveload.c:234 src/main/saveload.c:243
+#: src/main/saveload.c:247 src/main/saveload.c:256 src/main/saveload.c:1383
+#: src/main/saveload.c:1388 src/main/saveload.c:1432 src/main/saveload.c:1500
+#: src/main/saveload.c:1509 src/main/serialize.c:354 src/main/serialize.c:361
+#: src/main/serialize.c:374 src/main/serialize.c:378 src/main/serialize.c:405
+#: src/main/serialize.c:421 src/main/serialize.c:2429
+#: src/main/serialize.c:2437
 msgid "read error"
 msgstr ""
 
-#: src/main/saveload.c:332
+#: src/main/saveload.c:334
 msgid "a I read error occurred"
 msgstr ""
 
-#: src/main/saveload.c:342
+#: src/main/saveload.c:344
 msgid "a R read error occurred"
 msgstr ""
 
-#: src/main/saveload.c:352
+#: src/main/saveload.c:354
 msgid "a C read error occurred"
 msgstr ""
 
-#: src/main/saveload.c:362
+#: src/main/saveload.c:364
 msgid "a S read error occurred"
 msgstr ""
 
-#: src/main/saveload.c:387 src/main/saveload.c:395 src/main/saveload.c:403
-#: src/main/saveload.c:1594 src/main/saveload.c:1602
+#: src/main/saveload.c:389 src/main/saveload.c:397 src/main/saveload.c:405
+#: src/main/saveload.c:1596 src/main/saveload.c:1604
 msgid "a read error occurred"
 msgstr ""
 
-#: src/main/saveload.c:467
+#: src/main/saveload.c:469
 msgid "unresolved node during restore"
 msgstr ""
 
-#: src/main/saveload.c:488
+#: src/main/saveload.c:490
 #, c-format
 msgid "restore compatibility error - no version %d compatibility"
 msgstr ""
 
-#: src/main/saveload.c:572 src/main/saveload.c:645
+#: src/main/saveload.c:574 src/main/saveload.c:647
 msgid "bad SEXP type in data file"
 msgstr ""
 
-#: src/main/saveload.c:586
+#: src/main/saveload.c:588
 msgid "mismatch on types"
 msgstr ""
 
-#: src/main/saveload.c:607 src/main/saveload.c:1270 src/main/serialize.c:1636
+#: src/main/saveload.c:609 src/main/saveload.c:1272 src/main/serialize.c:1675
 #, c-format
 msgid "unrecognized internal function name \"%s\""
 msgstr ""
 
-#: src/main/saveload.c:709
+#: src/main/saveload.c:711
 msgid "cannot save file position while restoring data"
 msgstr ""
 
-#: src/main/saveload.c:722
+#: src/main/saveload.c:724
 msgid "cannot restore file position while restoring data"
 msgstr ""
 
-#: src/main/saveload.c:915
+#: src/main/saveload.c:917
 msgid "base namespace is not preserved in version 1 workspaces"
 msgstr ""
 
-#: src/main/saveload.c:917
+#: src/main/saveload.c:919
 msgid "cannot save namespace in version 1 workspaces"
 msgstr ""
 
-#: src/main/saveload.c:919
+#: src/main/saveload.c:921
 msgid ""
 "cannot save environment with locked/active bindings in version 1 workspaces"
 msgstr ""
 
-#: src/main/saveload.c:943
+#: src/main/saveload.c:945
 msgid "cannot save weak references in version 1 workspaces"
 msgstr ""
 
-#: src/main/saveload.c:1021
+#: src/main/saveload.c:1023
 msgid "NewWriteVec called with non-vector type"
 msgstr ""
 
-#: src/main/saveload.c:1084
+#: src/main/saveload.c:1086
 msgid "cannot save byte code objects in version 1 workspaces"
 msgstr ""
 
-#: src/main/saveload.c:1086
+#: src/main/saveload.c:1088
 #, c-format
 msgid "NewWriteItem: unknown type %i"
 msgstr ""
 
-#: src/main/saveload.c:1216
+#: src/main/saveload.c:1218
 msgid "NewReadVec called with non-vector type"
 msgstr ""
 
-#: src/main/saveload.c:1286
+#: src/main/saveload.c:1288
 msgid "cannot read byte code objects from version 1 workspaces"
 msgstr ""
 
-#: src/main/saveload.c:1288
+#: src/main/saveload.c:1290
 #, c-format
 msgid "NewReadItem: unknown type %i"
 msgstr ""
 
-#: src/main/saveload.c:1440
+#: src/main/saveload.c:1442
 msgid "out of memory reading ascii string"
 msgstr ""
 
-#: src/main/saveload.c:1565
+#: src/main/saveload.c:1567
 msgid "a binary read error occurred"
 msgstr ""
 
-#: src/main/saveload.c:1580 src/main/saveload.c:1681
+#: src/main/saveload.c:1582 src/main/saveload.c:1683
 msgid "out of memory reading binary string"
 msgstr ""
 
-#: src/main/saveload.c:1585
+#: src/main/saveload.c:1587
 msgid "a binary string read error occurred"
 msgstr ""
 
-#: src/main/saveload.c:1645
+#: src/main/saveload.c:1647
 msgid "an xdr integer data write error occurred"
 msgstr ""
 
-#: src/main/saveload.c:1652
+#: src/main/saveload.c:1654
 msgid "an xdr integer data read error occurred"
 msgstr ""
 
-#: src/main/saveload.c:1667 src/main/saveload.c:1686
+#: src/main/saveload.c:1669 src/main/saveload.c:1688
 msgid "an xdr string data write error occurred"
 msgstr ""
 
-#: src/main/saveload.c:1694
+#: src/main/saveload.c:1696
 msgid "an xdr real data write error occurred"
 msgstr ""
 
-#: src/main/saveload.c:1701
+#: src/main/saveload.c:1703
 msgid "an xdr real data read error occurred"
 msgstr ""
 
-#: src/main/saveload.c:1708
+#: src/main/saveload.c:1710
 msgid "an xdr complex data write error occurred"
 msgstr ""
 
-#: src/main/saveload.c:1715
+#: src/main/saveload.c:1717
 msgid "an xdr complex data read error occurred"
 msgstr ""
 
-#: src/main/saveload.c:1783 src/main/serialize.c:1958
-#: src/main/serialize.c:2568 src/modules/internet/internet.c:351
-#: src/modules/internet/internet.c:409 src/modules/internet/internet.c:514
+#: src/main/saveload.c:1785 src/main/serialize.c:1997
+#: src/main/serialize.c:2614 src/modules/internet/internet.c:514
+#: src/modules/internet/internet.c:590 src/modules/internet/internet.c:701
 msgid "write failed"
 msgstr ""
 
-#: src/main/saveload.c:1910
+#: src/main/saveload.c:1912
 msgid "restore file may be empty -- no data loaded"
 msgstr ""
 
-#: src/main/saveload.c:1912
+#: src/main/saveload.c:1914
 msgid "restore file may be from a newer version of R -- no data loaded"
 msgstr ""
 
-#: src/main/saveload.c:1914
+#: src/main/saveload.c:1916
 msgid "bad restore file magic number (file may be corrupted) -- no data loaded"
 msgstr ""
 
-#: src/main/saveload.c:1940 src/main/saveload.c:2238
+#: src/main/saveload.c:1942 src/main/saveload.c:2240
 msgid "first argument must be a character vector"
 msgstr ""
 
-#: src/main/saveload.c:2012
+#: src/main/saveload.c:2014
 msgid "not a valid named list"
 msgstr ""
 
-#: src/main/saveload.c:2019 src/main/saveload.c:2040
+#: src/main/saveload.c:2021 src/main/saveload.c:2042
 #, c-format
 msgid "'%s' looks like a pre-2.4.0 S4 object: please recreate it"
 msgstr ""
 
-#: src/main/saveload.c:2027
+#: src/main/saveload.c:2029
 msgid "loaded data is not in pair list form"
 msgstr ""
 
-#: src/main/saveload.c:2063
+#: src/main/saveload.c:2065
 msgid "first argument must be a file name"
 msgstr ""
 
-#: src/main/saveload.c:2108 src/main/saveload.c:2134 src/main/serialize.c:826
-#: src/main/serialize.c:863 src/main/serialize.c:901
+#: src/main/saveload.c:2110 src/main/saveload.c:2136 src/main/serialize.c:864
+#: src/main/serialize.c:901 src/main/serialize.c:939
 msgid "XDR write failed"
 msgstr ""
 
-#: src/main/saveload.c:2121 src/main/saveload.c:2146 src/main/serialize.c:1362
-#: src/main/serialize.c:1398 src/main/serialize.c:1436
+#: src/main/saveload.c:2123 src/main/saveload.c:2148 src/main/serialize.c:1400
+#: src/main/serialize.c:1436 src/main/serialize.c:1474
 msgid "XDR read failed"
 msgstr ""
 
-#: src/main/saveload.c:2157
+#: src/main/saveload.c:2159
 #, c-format
 msgid "cannot save data -- unable to open '%s': %s"
 msgstr ""
 
-#: src/main/saveload.c:2254 src/main/serialize.c:2161
+#: src/main/saveload.c:2256 src/main/serialize.c:2202
 #, c-format
 msgid "cannot save to connections in version %d format"
 msgstr ""
 
-#: src/main/saveload.c:2277 src/main/serialize.c:2186
+#: src/main/saveload.c:2279 src/main/serialize.c:2227
 msgid "connection not open for writing"
 msgstr ""
 
-#: src/main/saveload.c:2285
+#: src/main/saveload.c:2288
 msgid "cannot save XDR format to a text-mode connection"
 msgstr ""
 
-#: src/main/saveload.c:2295 src/main/serialize.c:2066
-#: src/main/serialize.c:2080 src/main/serialize.c:2262
-#: src/main/serialize.c:2284
+#: src/main/saveload.c:2298 src/main/serialize.c:2105
+#: src/main/serialize.c:2119 src/main/serialize.c:2303
+#: src/main/serialize.c:2325
 msgid "error writing to connection"
 msgstr ""
 
-#: src/main/saveload.c:2359 src/main/serialize.c:2234
+#: src/main/saveload.c:2359 src/main/serialize.c:2275
 msgid "connection not open for reading"
 msgstr ""
 
@@ -5163,7 +5222,7 @@ msgstr ""
 msgid "scan() expected '%s', got '%s'"
 msgstr ""
 
-#: src/main/scan.c:585 src/main/scan.c:732
+#: src/main/scan.c:585 src/main/scan.c:735
 msgid "too many items"
 msgstr ""
 
@@ -5171,7 +5230,7 @@ msgstr ""
 msgid "empty 'what' specified"
 msgstr ""
 
-#: src/main/scan.c:722
+#: src/main/scan.c:725
 #, c-format
 msgid "line %d did not have %d elements"
 msgstr ""
@@ -5200,257 +5259,259 @@ msgstr ""
 msgid "invalid quote symbol set"
 msgstr ""
 
-#: src/main/scan.c:987
+#: src/main/scan.c:988
 msgid "embedded nul(s) found in input"
 msgstr ""
 
-#: src/main/seq.c:48
+#: src/main/seq.c:49
 msgid "unequal factor lengths"
 msgstr ""
 
-#: src/main/seq.c:100
+#: src/main/seq.c:101
 msgid "result would be too long a vector"
 msgstr ""
 
-#: src/main/seq.c:159
+#: src/main/seq.c:160
 msgid "argument of length 0"
 msgstr ""
 
-#: src/main/seq.c:161 src/main/seq.c:163
+#: src/main/seq.c:163 src/main/seq.c:168
 #, c-format
-msgid "numerical expression has %d elements: only the first used"
-msgstr ""
+msgid "numerical expression has %d element: only the first used"
+msgid_plural "numerical expression has %d elements: only the first used"
+msgstr[0] ""
+msgstr[1] ""
 
-#: src/main/seq.c:167
+#: src/main/seq.c:174
 msgid "NA/NaN argument"
 msgstr ""
 
-#: src/main/seq.c:331
+#: src/main/seq.c:333
 msgid "incorrect type for second argument"
 msgstr ""
 
-#: src/main/seq.c:334
+#: src/main/seq.c:336
 #, c-format
 msgid "attempt to replicate an object of type '%s'"
 msgstr ""
 
-#: src/main/seq.c:387
+#: src/main/seq.c:393
 msgid "attempt to replicate non-vector"
 msgstr ""
 
-#: src/main/seq.c:403
+#: src/main/seq.c:409
 msgid "cannot replicate NULL to a non-zero length"
 msgstr ""
 
-#: src/main/seq.c:626 src/main/seq.c:633 src/main/seq.c:768 src/main/seq.c:979
+#: src/main/seq.c:630 src/main/seq.c:637 src/main/seq.c:766 src/main/seq.c:977
 #, c-format
 msgid "first element used of '%s' argument"
 msgstr ""
 
-#: src/main/seq.c:766
+#: src/main/seq.c:764
 msgid "'length.out' must be a non-negative number"
 msgstr ""
 
-#: src/main/seq.c:790 src/main/seq.c:856 src/main/seq.c:873
+#: src/main/seq.c:788 src/main/seq.c:854 src/main/seq.c:871
 msgid "'from' must be finite"
 msgstr ""
 
-#: src/main/seq.c:792 src/main/seq.c:858 src/main/seq.c:895
+#: src/main/seq.c:790 src/main/seq.c:856 src/main/seq.c:893
 msgid "'to' must be finite"
 msgstr ""
 
-#: src/main/seq.c:804
+#: src/main/seq.c:802
 msgid "invalid '(to - from)/by' in 'seq'"
 msgstr ""
 
-#: src/main/seq.c:816
+#: src/main/seq.c:814
 msgid "'by' argument is much too small"
 msgstr ""
 
-#: src/main/seq.c:818
+#: src/main/seq.c:816
 msgid "wrong sign in 'by' argument"
 msgstr ""
 
-#: src/main/seq.c:875 src/main/seq.c:897
+#: src/main/seq.c:873 src/main/seq.c:895
 msgid "'by' must be finite"
 msgstr ""
 
-#: src/main/seq.c:985 src/main/seq.c:990
+#: src/main/seq.c:983 src/main/seq.c:988
 msgid "argument must be coercible to non-negative integer"
 msgstr ""
 
-#: src/main/serialize.c:224 src/main/serialize.c:254 src/main/serialize.c:277
+#: src/main/serialize.c:228 src/main/serialize.c:275 src/main/serialize.c:299
 msgid "unknown or inappropriate output format"
 msgstr ""
 
-#: src/main/serialize.c:504
+#: src/main/serialize.c:542
 msgid "must specify ascii, binary, or xdr format"
 msgstr ""
 
-#: src/main/serialize.c:505
+#: src/main/serialize.c:543
 msgid "unknown output format"
 msgstr ""
 
-#: src/main/serialize.c:536
+#: src/main/serialize.c:574
 msgid "unknown input format"
 msgstr ""
 
-#: src/main/serialize.c:541
+#: src/main/serialize.c:579
 msgid "input format does not match specified format"
 msgstr ""
 
-#: src/main/serialize.c:752
+#: src/main/serialize.c:790
 msgid "no restore method available"
 msgstr ""
 
-#: src/main/serialize.c:794
+#: src/main/serialize.c:832
 msgid "names in persistent strings are currently ignored"
 msgstr ""
 
-#: src/main/serialize.c:963
+#: src/main/serialize.c:1001
 #, c-format
 msgid "'%s' may not be available when loading"
 msgstr ""
 
-#: src/main/serialize.c:970
+#: src/main/serialize.c:1008
 msgid "namespaces may not be available when loading"
 msgstr ""
 
-#: src/main/serialize.c:1097
+#: src/main/serialize.c:1136
 #, c-format
 msgid "WriteItem: unknown type %i"
 msgstr ""
 
-#: src/main/serialize.c:1273
+#: src/main/serialize.c:1312
 #, c-format
 msgid "version %d not supported"
 msgstr ""
 
-#: src/main/serialize.c:1305
+#: src/main/serialize.c:1343
 msgid "reference index out of range"
 msgstr ""
 
-#: src/main/serialize.c:1335
+#: src/main/serialize.c:1373
 msgid "names in persistent strings are not supported yet"
 msgstr ""
 
-#: src/main/serialize.c:1463
+#: src/main/serialize.c:1501
 msgid "negative serialized length for vector"
 msgstr ""
 
-#: src/main/serialize.c:1471
+#: src/main/serialize.c:1509
 msgid "invalid upper part of serialized vector length"
 msgstr ""
 
-#: src/main/serialize.c:1476
+#: src/main/serialize.c:1514
 msgid ""
 "negative serialized vector length:\n"
 "perhaps long vector from 64-bit version of R?"
 msgstr ""
 
-#: src/main/serialize.c:1707
+#: src/main/serialize.c:1746
 msgid "this version of R cannot read class references"
 msgstr ""
 
-#: src/main/serialize.c:1709
+#: src/main/serialize.c:1748
 msgid "this version of R cannot read generic function references"
 msgstr ""
 
-#: src/main/serialize.c:1726
+#: src/main/serialize.c:1765
 #, c-format
 msgid "ReadItem: unknown type %i, perhaps written by later version of R"
 msgstr ""
 
-#: src/main/serialize.c:1882
+#: src/main/serialize.c:1921
 #, c-format
 msgid ""
 "cannot read unreleased workspace version %d written by experimental R %d.%d."
 "%d"
 msgstr ""
 
-#: src/main/serialize.c:1886
+#: src/main/serialize.c:1925
 #, c-format
 msgid ""
 "cannot read workspace version %d written by R %d.%d.%d; need R %d.%d.%d or "
 "newer"
 msgstr ""
 
-#: src/main/serialize.c:1965
+#: src/main/serialize.c:2004
 msgid "read failed"
 msgstr ""
 
-#: src/main/serialize.c:2028
+#: src/main/serialize.c:2067
 msgid "error reading from ascii connection"
 msgstr ""
 
-#: src/main/serialize.c:2030
+#: src/main/serialize.c:2069
 msgid "unexpected format in ascii connection"
 msgstr ""
 
-#: src/main/serialize.c:2035 src/main/serialize.c:2049
+#: src/main/serialize.c:2074 src/main/serialize.c:2088
 msgid "error reading from connection"
 msgstr ""
 
-#: src/main/serialize.c:2090
+#: src/main/serialize.c:2130
 msgid "only ascii format can be written to text mode connections"
 msgstr ""
 
-#: src/main/serialize.c:2104
+#: src/main/serialize.c:2144
 msgid "only ascii format can be read from text mode connections"
 msgstr ""
 
-#: src/main/serialize.c:2159 src/main/serialize.c:2312
-#: src/main/serialize.c:2461
+#: src/main/serialize.c:2200 src/main/serialize.c:2353
+#: src/main/serialize.c:2502
 msgid "bad version value"
 msgstr ""
 
-#: src/main/serialize.c:2184
+#: src/main/serialize.c:2225
 msgid "binary-mode connection required for ascii=FALSE"
 msgstr ""
 
-#: src/main/serialize.c:2340 src/main/serialize.c:2377
-#: src/main/serialize.c:2440
+#: src/main/serialize.c:2381 src/main/serialize.c:2418
+#: src/main/serialize.c:2481
 msgid "serialization is too large to store in a raw vector"
 msgstr ""
 
-#: src/main/serialize.c:2357
+#: src/main/serialize.c:2398
 msgid "cannot allocate buffer"
 msgstr ""
 
-#: src/main/serialize.c:2546 src/main/serialize.c:2619
+#: src/main/serialize.c:2592 src/main/serialize.c:2665
 msgid "not a proper file name"
 msgstr ""
 
-#: src/main/serialize.c:2548
+#: src/main/serialize.c:2594
 msgid "not a proper raw vector"
 msgstr ""
 
-#: src/main/serialize.c:2569
+#: src/main/serialize.c:2615
 msgid "could not determine file position"
 msgstr ""
 
-#: src/main/serialize.c:2621
+#: src/main/serialize.c:2667
 msgid "bad offset/length argument"
 msgstr ""
 
-#: src/main/serialize.c:2645 src/main/serialize.c:2658
-#: src/main/serialize.c:2667 src/main/serialize.c:2677
-#: src/main/serialize.c:2690
+#: src/main/serialize.c:2691 src/main/serialize.c:2704
+#: src/main/serialize.c:2713 src/main/serialize.c:2723
+#: src/main/serialize.c:2736
 #, c-format
 msgid "seek failed on %s"
 msgstr ""
 
-#: src/main/serialize.c:2662 src/main/serialize.c:2671
-#: src/main/serialize.c:2681 src/main/serialize.c:2694
+#: src/main/serialize.c:2708 src/main/serialize.c:2717
+#: src/main/serialize.c:2727 src/main/serialize.c:2740
 #, c-format
 msgid "read failed on %s"
 msgstr ""
 
-#: src/main/serialize.c:2713
+#: src/main/serialize.c:2759
 msgid "bad environment"
 msgstr ""
 
-#: src/main/serialize.c:2715
+#: src/main/serialize.c:2761
 msgid "bad variable names"
 msgstr ""
 
@@ -5458,165 +5519,161 @@ msgstr ""
 msgid "only atomic vectors can be tested to be sorted"
 msgstr ""
 
-#: src/main/sort.c:326 src/main/sort.c:1228 src/main/sort.c:1396
+#: src/main/sort.c:325 src/main/sort.c:1248
 msgid "'decreasing' must be TRUE or FALSE"
 msgstr ""
 
-#: src/main/sort.c:329 src/main/sort.c:600
+#: src/main/sort.c:328 src/main/sort.c:599
 msgid "only atomic vectors can be sorted"
 msgstr ""
 
-#: src/main/sort.c:331 src/main/sort.c:602 src/main/sort.c:1297
+#: src/main/sort.c:330 src/main/sort.c:601 src/main/sort.c:1317
 msgid "raw vectors cannot be sorted"
 msgstr ""
 
-#: src/main/sort.c:613
+#: src/main/sort.c:612
 msgid "NA or infinite index"
 msgstr ""
 
-#: src/main/sort.c:616
+#: src/main/sort.c:615
 #, c-format
 msgid "index %ld outside bounds"
 msgstr ""
 
-#: src/main/sort.c:621 src/main/sort.c:634
+#: src/main/sort.c:620 src/main/sort.c:633
 msgid "NA index"
 msgstr ""
 
-#: src/main/sort.c:623 src/main/sort.c:636
+#: src/main/sort.c:622 src/main/sort.c:635
 #, c-format
 msgid "index %d outside bounds"
 msgstr ""
 
-#: src/main/sort.c:1237
+#: src/main/sort.c:1257
 #, c-format
 msgid "argument %d is not a vector"
 msgstr ""
 
-#: src/main/sort.c:1239
+#: src/main/sort.c:1259
 msgid "argument lengths differ"
 msgstr ""
 
-#: src/main/sort.c:1324
+#: src/main/sort.c:1344
 msgid "invalid ties.method for rank() [should never happen]"
 msgstr ""
 
-#: src/main/sort.c:1429
-msgid "too large a range of values in 'x'"
-msgstr ""
-
-#: src/main/source.c:215
+#: src/main/source.c:220
 msgid "coercion of 'text' to character was unsuccessful"
 msgstr ""
 
-#: src/main/source.c:231
+#: src/main/source.c:236
 #, c-format
 msgid "argument '%s = \"%s\"' will be ignored"
 msgstr ""
 
-#: src/main/split.c:38
+#: src/main/split.c:39
 msgid "first argument must be a vector"
 msgstr ""
 
-#: src/main/split.c:40
+#: src/main/split.c:41
 msgid "second argument must be a factor"
 msgstr ""
 
-#: src/main/split.c:45
+#: src/main/split.c:46
 msgid "group length is 0 but data length > 0"
 msgstr ""
 
-#: src/main/split.c:47
+#: src/main/split.c:48
 msgid "data length is not a multiple of split variable"
 msgstr ""
 
-#: src/main/split.c:56
+#: src/main/split.c:58
 msgid "factor has bad level"
 msgstr ""
 
-#: src/main/sprintf.c:94
+#: src/main/sprintf.c:97
 #, c-format
 msgid "required resulting string length %d is greater than maximal %d"
 msgstr ""
 
-#: src/main/sprintf.c:102
+#: src/main/sprintf.c:105
 msgid "'fmt' is not a character vector"
 msgstr ""
 
-#: src/main/sprintf.c:107
+#: src/main/sprintf.c:110
 #, c-format
 msgid "only %d arguments are allowed"
 msgstr ""
 
-#: src/main/sprintf.c:114
+#: src/main/sprintf.c:117
 #, c-format
 msgid "invalid type of argument[%d]: '%s'"
 msgstr ""
 
-#: src/main/sprintf.c:125 src/main/sprintf.c:128
+#: src/main/sprintf.c:128 src/main/sprintf.c:131
 msgid "arguments cannot be recycled to the same length"
 msgstr ""
 
-#: src/main/sprintf.c:150 src/main/sprintf.c:257
+#: src/main/sprintf.c:153 src/main/sprintf.c:260
 #, c-format
 msgid "'fmt' length exceeds maximal format length %d"
 msgstr ""
 
-#: src/main/sprintf.c:169
+#: src/main/sprintf.c:172
 #, c-format
 msgid "unrecognised format specification '%s'"
 msgstr ""
 
-#: src/main/sprintf.c:180 src/main/sprintf.c:186 src/main/sprintf.c:199
-#: src/main/sprintf.c:206
+#: src/main/sprintf.c:183 src/main/sprintf.c:189 src/main/sprintf.c:202
+#: src/main/sprintf.c:209
 #, c-format
 msgid "reference to non-existent argument %d"
 msgstr ""
 
-#: src/main/sprintf.c:218
+#: src/main/sprintf.c:221
 msgid "at most one asterisk '*' is supported in each conversion specification"
 msgstr ""
 
-#: src/main/sprintf.c:228
+#: src/main/sprintf.c:231
 msgid "argument for '*' conversion specification must be a number"
 msgstr ""
 
-#: src/main/sprintf.c:266
+#: src/main/sprintf.c:269
 msgid "coercion has changed vector length to 0"
 msgstr ""
 
-#: src/main/sprintf.c:339 src/main/sprintf.c:353 src/main/sprintf.c:367
-#: src/main/sprintf.c:402
+#: src/main/sprintf.c:343 src/main/sprintf.c:357 src/main/sprintf.c:371
+#: src/main/sprintf.c:406
 #, c-format
 msgid "invalid format '%s'; %s"
 msgstr ""
 
-#: src/main/sprintf.c:340
+#: src/main/sprintf.c:344
 #, c-format
 msgid "use format %d or %i for logical objects"
 msgstr ""
 
-#: src/main/sprintf.c:354
+#: src/main/sprintf.c:358
 #, c-format
 msgid "use format %d, %i, %o, %x or %X for integer objects"
 msgstr ""
 
-#: src/main/sprintf.c:368
+#: src/main/sprintf.c:372
 #, c-format
 msgid "use format %f, %e, %g or %a for numeric objects"
 msgstr ""
 
-#: src/main/sprintf.c:403
+#: src/main/sprintf.c:407
 #, c-format
 msgid "use format %s for character objects"
 msgstr ""
 
-#: src/main/sprintf.c:408
+#: src/main/sprintf.c:412
 #, c-format
 msgid "likely truncation of character string to %d characters"
 msgstr ""
 
-#: src/main/sprintf.c:417
+#: src/main/sprintf.c:421
 msgid "unsupported type"
 msgstr ""
 
@@ -5624,377 +5681,381 @@ msgstr ""
 msgid "R_LibraryFileName: buffer too small"
 msgstr ""
 
-#: src/main/subassign.c:117
+#: src/main/subassign.c:118
 msgid "attempt to enlarge non-vector"
 msgstr ""
 
-#: src/main/subassign.c:122
+#: src/main/subassign.c:123
 #, c-format
 msgid "assignment outside vector/list limits (extending from %d to %d)"
 msgstr ""
 
-#: src/main/subassign.c:367
+#: src/main/subassign.c:391
 #, c-format
 msgid "incompatible types (from %s to %s) in subassignment type fix"
 msgstr ""
 
-#: src/main/subassign.c:502 src/main/subassign.c:782 src/main/subassign.c:785
-#: src/main/subassign.c:1076
+#: src/main/subassign.c:550 src/main/subassign.c:830 src/main/subassign.c:833
+#: src/main/subassign.c:1133
 msgid "NAs are not allowed in subscripted assignments"
 msgstr ""
 
-#: src/main/subassign.c:520 src/main/subassign.c:796 src/main/subassign.c:1068
-#: src/main/subassign.c:1641
+#: src/main/subassign.c:568 src/main/subassign.c:844 src/main/subassign.c:1125
+#: src/main/subassign.c:1705
 msgid "replacement has length zero"
 msgstr ""
 
-#: src/main/subassign.c:522 src/main/subassign.c:798 src/main/subassign.c:1070
+#: src/main/subassign.c:570 src/main/subassign.c:846 src/main/subassign.c:1127
 msgid "number of items to replace is not a multiple of replacement length"
 msgstr ""
 
-#: src/main/subassign.c:766
+#: src/main/subassign.c:814
 msgid "incorrect number of subscripts on matrix"
 msgstr ""
 
-#: src/main/subassign.c:1022
+#: src/main/subassign.c:1079
 #, c-format
 msgid "incompatible types (from %s to %s) in matrix subset assignment"
 msgstr ""
 
-#: src/main/subassign.c:1038 src/main/subset.c:928
+#: src/main/subassign.c:1095 src/main/subset.c:957
 msgid "incorrect number of subscripts"
 msgstr ""
 
-#: src/main/subassign.c:1214
+#: src/main/subassign.c:1272
 #, c-format
 msgid "incompatible types (from %s to %s) in array subset assignment"
 msgstr ""
 
-#: src/main/subassign.c:1249 src/main/subassign.c:1270
+#: src/main/subassign.c:1308 src/main/subassign.c:1329
 msgid "invalid subscript in list assign"
 msgstr ""
 
-#: src/main/subassign.c:1263
+#: src/main/subassign.c:1322
 msgid "invalid number of subscripts to list assign"
 msgstr ""
 
-#: src/main/subassign.c:1361
+#: src/main/subassign.c:1421
 msgid "SubAssignArgs: invalid number of arguments"
 msgstr ""
 
-#: src/main/subassign.c:1506
+#: src/main/subassign.c:1566
 msgid "result is zero-length and so cannot be a language object"
 msgstr ""
 
-#: src/main/subassign.c:1611
+#: src/main/subassign.c:1665
 msgid ""
 "[[<- defined for objects of type \"S4\" only for subclasses of environment"
 msgstr ""
 
-#: src/main/subassign.c:1617
+#: src/main/subassign.c:1677
 msgid "wrong args for environment subassignment"
 msgstr ""
 
-#: src/main/subassign.c:1643
+#: src/main/subassign.c:1707
 msgid "more elements supplied than there are to replace"
 msgstr ""
 
-#: src/main/subassign.c:1645
+#: src/main/subassign.c:1709
 msgid "[[ ]] with missing subscript"
 msgstr ""
 
-#: src/main/subassign.c:1657 src/main/subassign.c:1675
+#: src/main/subassign.c:1727 src/main/subassign.c:1745
 msgid "[[ ]] subscript out of bounds"
 msgstr ""
 
-#: src/main/subassign.c:1663 src/main/subassign.c:1841
+#: src/main/subassign.c:1733 src/main/subassign.c:1914
 msgid "[[ ]] improper number of subscripts"
 msgstr ""
 
-#: src/main/subassign.c:1808
+#: src/main/subassign.c:1879
 #, c-format
 msgid "incompatible types (from %s to %s) in [[ assignment"
 msgstr ""
 
-#: src/main/subassign.c:1852
+#: src/main/subassign.c:1925
 #, c-format
 msgid "[[ ]] subscript (%d) out of bounds"
 msgstr ""
 
-#: src/main/subassign.c:1905 src/main/subscript.c:143 src/main/subscript.c:145
-#: src/main/subscript.c:274 src/main/subscript.c:276 src/main/subscript.c:826
-#: src/main/subscript.c:828 src/main/subscript.c:919 src/main/subscript.c:921
-#: src/main/subset.c:1109
+#: src/main/subassign.c:1986 src/main/subscript.c:151 src/main/subscript.c:278
+#: src/main/subscript.c:903 src/main/subscript.c:996 src/main/subset.c:1176
 #, c-format
 msgid "invalid subscript type '%s'"
 msgstr ""
 
-#: src/main/subassign.c:1950
+#: src/main/subassign.c:2037
 msgid "no method for assigning subsets of this S4 class"
 msgstr ""
 
-#: src/main/subassign.c:2008
+#: src/main/subassign.c:2095
 msgid "Coercing LHS to a list"
 msgstr ""
 
-#: src/main/subscript.c:53 src/main/subscript.c:75 src/main/subscript.c:180
-#: src/main/subscript.c:204
-msgid "attempt to select less than one element"
+#: src/main/subscript.c:59 src/main/subscript.c:81 src/main/subscript.c:185
+#: src/main/subscript.c:209
+#, c-format
+msgid "attempt to select less than one element in %s"
 msgstr ""
 
-#: src/main/subscript.c:57 src/main/subscript.c:72 src/main/subscript.c:178
-#: src/main/subscript.c:208 src/main/subscript.c:304
-msgid "attempt to select more than one element"
+#: src/main/subscript.c:63 src/main/subscript.c:78 src/main/subscript.c:183
+#: src/main/subscript.c:213 src/main/subscript.c:305
+#, c-format
+msgid "attempt to select more than one element in %s"
 msgstr ""
 
-#: src/main/subscript.c:184
+#: src/main/subscript.c:189
 msgid "internal error in use of recursive indexing"
 msgstr ""
 
-#: src/main/subscript.c:252
+#: src/main/subscript.c:257
 #, c-format
 msgid "further partial match of '%s' to '%s'"
 msgstr ""
 
-#: src/main/subscript.c:302
+#: src/main/subscript.c:303
 #, c-format
 msgid "recursive indexing failed at level %d\n"
 msgstr ""
 
-#: src/main/subscript.c:309
+#: src/main/subscript.c:313
 #, c-format
 msgid "no such index at level %d\n"
 msgstr ""
 
-#: src/main/subscript.c:352
+#: src/main/subscript.c:360
 msgid "incorrect number of columns in matrix subscript"
 msgstr ""
 
-#: src/main/subscript.c:371 src/main/subscript.c:389 src/main/subscript.c:413
+#: src/main/subscript.c:379 src/main/subscript.c:397 src/main/subscript.c:421
 msgid "negative values are not allowed in a matrix subscript"
 msgstr ""
 
-#: src/main/subscript.c:492
+#: src/main/subscript.c:500
 msgid "(subscript) logical subscript too long"
 msgstr ""
 
-#: src/main/subscript.c:590 src/main/subscript.c:645
+#: src/main/subscript.c:668 src/main/subscript.c:723
 msgid "only 0's may be mixed with negative subscripts"
 msgstr ""
 
-#: src/main/subscript.c:618
+#: src/main/subscript.c:696
 msgid "subscript too large for 32-bit R"
 msgstr ""
 
-#: src/main/subscript.c:817
+#: src/main/subscript.c:895
 msgid "no 'dimnames' attribute for array"
 msgstr ""
 
-#: src/main/subscript.c:857
+#: src/main/subscript.c:931
 msgid "subscripting on non-vector"
 msgstr ""
 
-#: src/main/subset.c:261
+#: src/main/subset.c:260
 msgid "dimensions would exceed maximum size of array"
 msgstr ""
 
-#: src/main/subset.c:304 src/main/subset.c:333
+#: src/main/subset.c:304 src/main/subset.c:334
 msgid "matrix subscripting not handled for this type"
 msgstr ""
 
-#: src/main/subset.c:488
+#: src/main/subset.c:493
 msgid "array subscripting not handled for this type"
 msgstr ""
 
-#: src/main/subset.c:827
+#: src/main/subset.c:856
 msgid "incorrect number of dimensions"
 msgstr ""
 
-#: src/main/subset.c:924
+#: src/main/subset.c:953
 msgid "no index specified"
 msgstr ""
 
-#: src/main/subset.c:934
+#: src/main/subset.c:963
 msgid "this S4 class is not subsettable"
 msgstr ""
 
-#: src/main/subset.c:940
+#: src/main/subset.c:970
 msgid "wrong arguments for subsetting an environment"
 msgstr ""
 
-#: src/main/summary.c:30
+#: src/main/summary.c:33
 #, c-format
 msgid "invalid 'type' (%s) of argument"
 msgstr ""
 
-#: src/main/summary.c:66 src/main/summary.c:78 src/main/summary.c:103
+#: src/main/summary.c:69 src/main/summary.c:81 src/main/summary.c:106
 msgid "integer overflow - use sum(as.numeric(.))"
 msgstr ""
 
-#: src/main/summary.c:522
+#: src/main/summary.c:526
 #, c-format
 msgid "internal error ('op = %d' in do_summary).\t Call a Guru"
 msgstr ""
 
-#: src/main/summary.c:623
+#: src/main/summary.c:637
 msgid "Integer overflow - use sum(as.numeric(.))"
 msgstr ""
 
-#: src/main/summary.c:731
+#: src/main/summary.c:750
 msgid "no non-missing arguments, returning NA"
 msgstr ""
 
-#: src/main/summary.c:734
+#: src/main/summary.c:753
 msgid "no non-missing arguments to min; returning Inf"
 msgstr ""
 
-#: src/main/summary.c:736
+#: src/main/summary.c:755
 msgid "no non-missing arguments to max; returning -Inf"
 msgstr ""
 
-#: src/main/summary.c:801
-msgid "non-numeric argument"
-msgstr ""
-
-#: src/main/summary.c:845
+#: src/main/summary.c:913
 msgid "argument to 'which' is not logical"
 msgstr ""
 
-#: src/main/summary.c:889
+#: src/main/summary.c:957
 msgid "no arguments"
 msgstr ""
 
-#: src/main/summary.c:900 src/main/summary.c:917
+#: src/main/summary.c:968 src/main/summary.c:985
 msgid "invalid input type"
 msgstr ""
 
-#: src/main/summary.c:934
+#: src/main/summary.c:1002
 msgid "an argument will be fractionally recycled"
 msgstr ""
 
-#: src/main/sysutils.c:69 src/main/sysutils.c:83
+#: src/main/sysutils.c:68 src/main/sysutils.c:82
 #, c-format
 msgid "cannot determine file modification time of '%s'"
 msgstr ""
 
-#: src/main/sysutils.c:167
+#: src/main/sysutils.c:166
 msgid "encoding of a filename cannot be 'bytes'"
 msgstr ""
 
-#: src/main/sysutils.c:170 src/main/sysutils.c:803 src/main/sysutils.c:818
-#: src/main/sysutils.c:909 src/main/sysutils.c:924 src/main/sysutils.c:1020
+#: src/main/sysutils.c:169 src/main/sysutils.c:831 src/main/sysutils.c:846
+#: src/main/sysutils.c:975
 #, c-format
 msgid "unsupported conversion from '%s' in codepage %d"
 msgstr ""
 
-#: src/main/sysutils.c:179
+#: src/main/sysutils.c:178
 msgid "file name conversion problem -- name too long?"
 msgstr ""
 
-#: src/main/sysutils.c:180
+#: src/main/sysutils.c:179
 msgid "file name conversion problem"
 msgstr ""
 
-#: src/main/sysutils.c:249
+#: src/main/sysutils.c:248
 msgid "invalid filename pattern"
 msgstr ""
 
-#: src/main/sysutils.c:253
+#: src/main/sysutils.c:252
 msgid "invalid file extension"
 msgstr ""
 
-#: src/main/sysutils.c:255
+#: src/main/sysutils.c:254
 msgid "no 'pattern'"
 msgstr ""
 
-#: src/main/sysutils.c:257
+#: src/main/sysutils.c:256
 msgid "no 'tempdir'"
 msgstr ""
 
-#: src/main/sysutils.c:259
+#: src/main/sysutils.c:258
 msgid "no 'fileext'"
 msgstr ""
 
-#: src/main/sysutils.c:345 src/main/sysutils.c:348 src/main/sysutils.c:439
-#: src/main/sysutils.c:441 src/main/sysutils.c:477
+#: src/main/sysutils.c:328
+#, c-format
+msgid "system call failed: %s"
+msgstr ""
+
+#: src/main/sysutils.c:357 src/main/sysutils.c:360 src/main/sysutils.c:451
+#: src/main/sysutils.c:453 src/main/sysutils.c:489
 msgid "wrong type for argument"
 msgstr ""
 
-#: src/main/sysutils.c:443
+#: src/main/sysutils.c:455
 msgid "wrong length for argument"
 msgstr ""
 
-#: src/main/sysutils.c:464
+#: src/main/sysutils.c:476
 msgid "'Sys.setenv' is not available on this system"
 msgstr ""
 
-#: src/main/sysutils.c:508
+#: src/main/sysutils.c:520
 msgid "this system cannot unset environment variables: setting to \"\""
 msgstr ""
 
-#: src/main/sysutils.c:519
+#: src/main/sysutils.c:531
 msgid "'Sys.unsetenv' is not available on this system"
 msgstr ""
 
-#: src/main/sysutils.c:616
+#: src/main/sysutils.c:628
 #, c-format
 msgid "unsupported conversion from '%s' to '%s' in codepage %d"
 msgstr ""
 
-#: src/main/sysutils.c:631
+#: src/main/sysutils.c:643
 msgid "'x' must be a character vector"
 msgstr ""
 
-#: src/main/sysutils.c:646
-msgid "'x' must be a list of NULL or raw vectors"
+#: src/main/sysutils.c:658
+msgid "'x' must be a character vector or a list of NULL or raw vectors"
 msgstr ""
 
-#: src/main/sysutils.c:724 src/main/sysutils.c:789 src/main/sysutils.c:895
-#: src/main/sysutils.c:994 src/main/sysutils.c:1010 src/main/sysutils.c:1087
+#: src/main/sysutils.c:736 src/main/sysutils.c:914 src/main/sysutils.c:932
+#: src/main/sysutils.c:949 src/main/sysutils.c:965 src/main/sysutils.c:1042
 #, c-format
 msgid "'%s' must be called on a CHARSXP"
 msgstr ""
 
-#: src/main/sysutils.c:792 src/main/sysutils.c:898 src/main/sysutils.c:1015
-#: src/main/sysutils.c:1090
+#: src/main/sysutils.c:805 src/main/sysutils.c:970 src/main/sysutils.c:1045
 msgid "translating strings with \"bytes\" encoding is not allowed"
 msgstr ""
 
-#: src/main/sysutils.c:1116
+#: src/main/sysutils.c:818
+msgid "internal error: no translation needed"
+msgstr ""
+
+#: src/main/sysutils.c:1071
 #, c-format
 msgid "unsupported conversion to '%s' from codepage %d"
 msgstr ""
 
-#: src/main/sysutils.c:1530
+#: src/main/sysutils.c:1486
 #, c-format
 msgid "invalid Unicode point %u"
 msgstr ""
 
-#: src/main/sysutils.c:1632
+#: src/main/sysutils.c:1588
 msgid "cannot create 'R_TempDir'"
 msgstr ""
 
-#: src/main/sysutils.c:1636 src/main/sysutils.c:1644 src/main/sysutils.c:1647
+#: src/main/sysutils.c:1592 src/main/sysutils.c:1600 src/main/sysutils.c:1603
 msgid "unable to set R_SESSION_TMPDIR"
 msgstr ""
 
-#: src/main/sysutils.c:1656
+#: src/main/sysutils.c:1612
 msgid "cannot allocate 'R_TempDir'"
 msgstr ""
 
-#: src/main/sysutils.c:1693
+#: src/main/sysutils.c:1649
 msgid "temporary name too long"
 msgstr ""
 
-#: src/main/sysutils.c:1708
+#: src/main/sysutils.c:1664
 msgid "cannot find unused tempfile name"
 msgstr ""
 
-#: src/main/sysutils.c:1711
+#: src/main/sysutils.c:1667
 msgid "allocation failed in R_tmpnam2"
 msgstr ""
 
-#: src/main/sysutils.c:1838
+#: src/main/sysutils.c:1794
 msgid "'dirmark = TRUE' is not supported on this platform"
 msgstr ""
 
@@ -6004,193 +6065,199 @@ msgid "length %d is too large for hashing"
 msgstr ""
 
 #: src/main/unique.c:490 src/main/unique.c:519 src/main/unique.c:549
-#: src/main/unique.c:575 src/main/unique.c:614
+#: src/main/unique.c:573 src/main/unique.c:612
 msgid "'duplicated' applies only to vectors"
 msgstr ""
 
-#: src/main/unique.c:619
+#: src/main/unique.c:617
 msgid "any_duplicated3(., <0-length incomp>)"
 msgstr ""
 
-#: src/main/unique.c:669
+#: src/main/unique.c:667
 msgid "'fromLast' must be length 1"
 msgstr ""
 
-#: src/main/unique.c:672
+#: src/main/unique.c:670
 msgid "'fromLast' must be TRUE or FALSE"
 msgstr ""
 
-#: src/main/unique.c:683
+#: src/main/unique.c:681
 #, c-format
 msgid "%s() applies only to vectors"
 msgstr ""
 
-#: src/main/unique.c:690
+#: src/main/unique.c:688
 msgid "'nmax' must be positive"
 msgstr ""
 
-#: src/main/unique.c:922
+#: src/main/unique.c:985
 msgid "'match' requires vector arguments"
 msgstr ""
 
-#: src/main/unique.c:970 src/main/unique.c:1125
+#: src/main/unique.c:1033 src/main/unique.c:1171
 msgid "argument is not of mode character"
 msgstr ""
 
-#: src/main/unique.c:1251
+#: src/main/unique.c:1296
 msgid "... used in a situation where it does not exist"
 msgstr ""
 
-#: src/main/unique.c:1342
-msgid "unable to find a closure from within which 'match.call' was called"
+#: src/main/unique.c:1302
+msgid "... is not a pairlist"
 msgstr ""
 
-#: src/main/unique.c:1536
+#: src/main/unique.c:1531
 msgid "non-numeric data frame in rowsum"
 msgstr ""
 
-#: src/main/unique.c:1568
+#: src/main/unique.c:1563
 msgid "this cannot happen"
 msgstr ""
 
-#: src/main/unique.c:1639
+#: src/main/unique.c:1634
 msgid "'names' must be a character vector"
 msgstr ""
 
-#: src/main/unique.c:1643
-msgid "'sep' must be a character string"
-msgstr ""
-
-#: src/main/util.c:88 src/main/util.c:106
+#: src/main/util.c:87 src/main/util.c:105
 msgid "object is not a matrix"
 msgstr ""
 
-#: src/main/util.c:254 src/main/util.c:268 src/main/util.c:285
+#: src/main/util.c:303 src/main/util.c:315 src/main/util.c:326
+#: src/main/util.c:341
 #, c-format
 msgid "type %d is unimplemented in '%s'"
 msgstr ""
 
-#: src/main/util.c:297
+#: src/main/util.c:352
 #, c-format
 msgid "unimplemented type '%s' in '%s'\n"
 msgstr ""
 
-#: src/main/util.c:299
+#: src/main/util.c:354
 #, c-format
 msgid "unimplemented type (%d) in '%s'\n"
 msgstr ""
 
-#: src/main/util.c:424
+#: src/main/util.c:479
 msgid "invalid tag in name extraction"
 msgstr ""
 
-#: src/main/util.c:434
+#: src/main/util.c:489
 #, c-format
 msgid "%d argument passed to .Internal(%s) which requires %d"
 msgid_plural "%d arguments passed to .Internal(%s) which requires %d"
 msgstr[0] ""
 msgstr[1] ""
 
-#: src/main/util.c:440
+#: src/main/util.c:495
 #, c-format
 msgid "%d argument passed to '%s' which requires %d"
 msgid_plural "%d arguments passed to '%s' which requires %d"
 msgstr[0] ""
 msgstr[1] ""
 
-#: src/main/util.c:455
+#: src/main/util.c:510
 #, c-format
 msgid "supplied argument name '%s' does not match '%s'"
 msgstr ""
 
-#: src/main/util.c:465
+#: src/main/util.c:520
 #, c-format
 msgid "'nthcdr' list shorter than %d"
 msgstr ""
 
-#: src/main/util.c:470
+#: src/main/util.c:525
 msgid "'nthcdr' needs a list to CDR down"
 msgstr ""
 
-#: src/main/util.c:586
+#: src/main/util.c:641
 msgid "'all.x' must be TRUE or FALSE"
 msgstr ""
 
-#: src/main/util.c:588
+#: src/main/util.c:643
 msgid "'all.y' must be TRUE or FALSE"
 msgstr ""
 
-#: src/main/util.c:700
+#: src/main/util.c:672
+msgid "number of rows in the result exceeds maximum vector length"
+msgstr ""
+
+#: src/main/util.c:764
 msgid "missing value is invalid"
 msgstr ""
 
-#: src/main/util.c:709 src/main/util.c:716
+#: src/main/util.c:773 src/main/util.c:780
 msgid "cannot change working directory"
 msgstr ""
 
-#: src/main/util.c:735 src/main/util.c:769 src/main/util.c:810
-#: src/main/util.c:852 src/main/util.c:981 src/main/util.c:1040
-#: src/main/util.c:1063
+#: src/main/util.c:800 src/main/util.c:834 src/main/util.c:875
+#: src/main/util.c:917 src/main/util.c:1046 src/main/util.c:1105
+#: src/main/util.c:1128
 msgid "a character vector argument expected"
 msgstr ""
 
-#: src/main/util.c:742 src/main/util.c:777 src/main/util.c:819
-#: src/main/util.c:860
+#: src/main/util.c:807 src/main/util.c:842 src/main/util.c:884
+#: src/main/util.c:925
 msgid "path too long"
 msgstr ""
 
-#: src/main/util.c:995
+#: src/main/util.c:1060
 msgid "only the first character of 'quote' will be used"
 msgstr ""
 
-#: src/main/util.c:1065
+#: src/main/util.c:1130
 msgid "a character vector 'value' expected"
 msgstr ""
 
-#: src/main/util.c:1068
+#: src/main/util.c:1133
 msgid "'value' must be of positive length"
 msgstr ""
 
-#: src/main/util.c:1197 src/main/util.c:1205
+#: src/main/util.c:1262 src/main/util.c:1270
 #, c-format
 msgid "invalid input '%s' in 'utf8towcs'"
 msgstr ""
 
-#: src/main/util.c:1290
+#: src/main/util.c:1355
 #, c-format
 msgid "invalid multibyte string at '%s'"
 msgstr ""
 
-#: src/main/util.c:1399
+#: src/main/util.c:1497
 msgid "error message truncated to 255 chars"
 msgstr ""
 
-#: src/main/util.c:1412
+#: src/main/util.c:1510
 msgid "warning message truncated to 255 chars"
 msgstr ""
 
-#: src/main/util.c:1819
+#: src/main/util.c:1659
+#, c-format
+msgid "accuracy loss in conversion from \"%s\" to numeric"
+msgstr ""
+
+#: src/main/util.c:1969
 msgid "all arguments must be named"
 msgstr ""
 
-#: src/main/util.c:1893
+#: src/main/util.c:2091
 msgid "ICU is not supported on this build"
 msgstr ""
 
-#: src/main/util.c:1954
+#: src/main/util.c:2158
 msgid "'breaks' is not sorted"
 msgstr ""
 
-#: src/main/util.c:1988 src/main/util.c:2034
+#: src/main/util.c:2192 src/main/util.c:2242
 #, c-format
 msgid "long vector '%s' is not supported"
 msgstr ""
 
-#: src/main/util.c:2087
+#: src/main/util.c:2296
 msgid "'eps.correct' must be 0, 1, or 2"
 msgstr ""
 
-#: src/main/util.c:2115
+#: src/main/util.c:2324
 msgid "'x' must be a vector"
 msgstr ""
 
@@ -6218,14 +6285,6 @@ msgid ""
 "\n"
 msgstr ""
 
-#: src/main/vfonts.c:50
-msgid "vfont routines cannot be accessed in module"
-msgstr ""
-
-#: src/main/vfonts.c:67 src/main/vfonts.c:80 src/main/vfonts.c:98
-msgid "Hershey fonts cannot be loaded"
-msgstr ""
-
 #: src/main/xspline.c:60
 #, c-format
 msgid "add_point - reached MAXNUMPTS (%d)"
@@ -6247,7 +6306,7 @@ msgstr ""
 msgid "There must be at least three control points"
 msgstr ""
 
-#: src/modules/X11/dataentry.c:1871 src/modules/X11/devX11.c:1246
+#: src/modules/X11/dataentry.c:1874 src/modules/X11/devX11.c:1248
 #, c-format
 msgid "X11 protocol error: %s"
 msgstr ""
@@ -6268,34 +6327,34 @@ msgid ""
 "Consider using X11 with colortype=\"pseudo.cube\" or \"gray\"."
 msgstr ""
 
-#: src/modules/X11/devX11.c:1027
+#: src/modules/X11/devX11.c:1029
 msgid ""
 "could not find any X11 fonts\n"
 "Check that the Font Path is correct."
 msgstr ""
 
-#: src/modules/X11/devX11.c:1087
+#: src/modules/X11/devX11.c:1089
 #, c-format
 msgid "X11 used font size %d when %d was requested"
 msgstr ""
 
-#: src/modules/X11/devX11.c:1121
+#: src/modules/X11/devX11.c:1123
 #, c-format
 msgid "X11 font %s, face %d at size %d could not be loaded"
 msgstr ""
 
-#: src/modules/X11/devX11.c:1130
+#: src/modules/X11/devX11.c:1132
 msgid ""
 "semi-transparency is not supported on this device: reported only once per "
 "page"
 msgstr ""
 
-#: src/modules/X11/devX11.c:1254
+#: src/modules/X11/devX11.c:1256
 #, c-format
 msgid "X11 I/O error while opening X11 connection to '%s'"
 msgstr ""
 
-#: src/modules/X11/devX11.c:1272
+#: src/modules/X11/devX11.c:1273
 msgid "X11 fatal IO error: please save work and shut down R"
 msgstr ""
 
@@ -6416,206 +6475,264 @@ msgstr ""
 msgid "attempt to use the locator after dev.hold()"
 msgstr ""
 
-#: src/modules/X11/devX11.c:3111
+#: src/modules/X11/devX11.c:3117
 #, c-format
 msgid "unable to start device %s"
 msgstr ""
 
-#: src/modules/X11/devX11.c:3138
+#: src/modules/X11/devX11.c:3144
 msgid "invalid 'width' or 'height'"
 msgstr ""
 
-#: src/modules/X11/devX11.c:3145
+#: src/modules/X11/devX11.c:3151
 msgid "invalid colortype passed to X11 driver"
 msgstr ""
 
-#: src/modules/X11/devX11.c:3159
+#: src/modules/X11/devX11.c:3165
 msgid "unknown X11 color/colour model -- using monochrome"
 msgstr ""
 
-#: src/modules/X11/devX11.c:3249
+#: src/modules/X11/devX11.c:3255
 msgid "no plot on device to save"
 msgstr ""
 
-#: src/modules/X11/devX11.c:3251
+#: src/modules/X11/devX11.c:3257
 msgid "not an open X11cairo device"
 msgstr ""
 
-#: src/modules/X11/devX11.c:3260
+#: src/modules/X11/devX11.c:3266
 #, c-format
 msgid "cannot open file '%s'"
 msgstr ""
 
-#: src/modules/X11/devX11.c:3277
+#: src/modules/X11/devX11.c:3283
 msgid "savePlot() is not supported on this build"
 msgstr ""
 
-#: src/modules/X11/devX11.c:3317
+#: src/modules/X11/devX11.c:3323
 msgid "unable to contact X11 display"
 msgstr ""
 
-#: src/modules/X11/devX11.c:3366
+#: src/modules/X11/devX11.c:3372
 #, c-format
 msgid "clipboard cannot be read (error code %d)"
 msgstr ""
 
-#: src/modules/X11/devX11.c:3397
+#: src/modules/X11/devX11.c:3408
 msgid "cannot allocate memory for X11Routines structure"
 msgstr ""
 
-#: src/modules/internet/internet.c:188 src/modules/internet/internet.c:192
-#: src/modules/internet/internet.c:198 src/modules/internet/internet.c:210
+#: src/modules/internet/internet.c:113
+msgid "for https:// URLs use method = \"wininet\""
+msgstr ""
+
+#: src/modules/internet/internet.c:153 src/modules/internet/internet.c:274
+#: src/modules/internet/internet.c:758
+#, c-format
+msgid "scheme not supported in URL '%s'"
+msgstr ""
+
+#: src/modules/internet/internet.c:348 src/modules/internet/internet.c:352
+#: src/modules/internet/internet.c:357 src/modules/internet/internet.c:381
+#: src/modules/internet/libcurl.c:791 src/modules/internet/libcurl.c:795
+#: src/modules/internet/libcurl.c:801 src/modules/internet/libcurl.c:814
+#: src/modules/internet/libcurl.c:822
 msgid "allocation of url connection failed"
 msgstr ""
 
-#: src/modules/internet/internet.c:286
+#: src/modules/internet/internet.c:455
 msgid "only first element of 'url' argument used"
 msgstr ""
 
-#: src/modules/internet/internet.c:292
+#: src/modules/internet/internet.c:461
 msgid "only first element of 'destfile' argument used"
 msgstr ""
 
-#: src/modules/internet/internet.c:317
+#: src/modules/internet/internet.c:480 src/modules/internet/libcurl.c:499
 msgid "Download progress"
 msgstr ""
 
-#: src/modules/internet/internet.c:339
+#: src/modules/internet/internet.c:502
 #, c-format
 msgid "cannot open URL '%s', reason '%s'"
 msgstr ""
 
-#: src/modules/internet/internet.c:346 src/modules/internet/internet.c:372
-#: src/modules/internet/internet.c:474
+#: src/modules/internet/internet.c:509 src/modules/internet/internet.c:536
+#: src/modules/internet/internet.c:661
 #, c-format
 msgid "cannot open destfile '%s', reason '%s'"
 msgstr ""
 
-#: src/modules/internet/internet.c:377 src/modules/internet/internet.c:479
+#: src/modules/internet/internet.c:541 src/modules/internet/internet.c:666
+#: src/modules/internet/libcurl.c:530
 #, c-format
 msgid "trying URL '%s'\n"
 msgstr ""
 
-#: src/modules/internet/internet.c:384 src/modules/internet/internet.c:486
-msgid "opened URL\n"
+#: src/modules/internet/internet.c:640 src/modules/internet/internet.c:751
+#: src/modules/internet/libcurl.c:578
+#, c-format
+msgid "downloaded length %0.f != reported length %0.f"
 msgstr ""
 
-#: src/modules/internet/internet.c:455 src/modules/internet/internet.c:560
+#: src/modules/internet/internet.c:645 src/modules/internet/internet.c:756
 #, c-format
-msgid "downloaded length %d != reported length %d"
+msgid "cannot open URL '%s'"
 msgstr ""
 
-#: src/modules/internet/internet.c:460 src/modules/internet/internet.c:565
+#: src/modules/internet/internet.c:779 src/modules/internet/internet.c:944
 #, c-format
-msgid "cannot open URL '%s'"
+msgid "cannot open URL '%s': HTTP status was '%d %s'"
 msgstr ""
 
-#: src/modules/internet/internet.c:593 src/modules/internet/internet.c:828
+#: src/modules/internet/internet.c:915 src/modules/internet/internet.c:929
+#: src/modules/internet/internet.c:1019 src/modules/internet/internet.c:1028
 #, c-format
-msgid "cannot open: HTTP status was '%d %s'"
+msgid "InternetOpenUrl failed: '%s'"
 msgstr ""
 
-#: src/modules/internet/internet.c:772 src/modules/internet/internet.c:935
-msgid "InternetOpenUrl timed out"
+#: src/modules/internet/libcurl.c:159
+#, c-format
+msgid "URL '%s': status was '%d %s'"
 msgstr ""
 
-#: src/modules/internet/internet.c:799 src/modules/internet/internet.c:813
-#: src/modules/internet/internet.c:957 src/modules/internet/internet.c:966
+#: src/modules/internet/libcurl.c:163
 #, c-format
-msgid "InternetOpenUrl failed: '%s'"
+msgid "URL '%s': status was '%s'"
+msgstr ""
+
+#: src/modules/internet/libcurl.c:240
+msgid "curlGetHeaders is not supported on this platform"
 msgstr ""
 
-#: src/modules/internet/internet.c:870
-msgid "Internet read timed out"
+#: src/modules/internet/libcurl.c:249 src/modules/internet/libcurl.c:252
+#, c-format
+msgid "invalid %s argument"
+msgstr ""
+
+#: src/modules/internet/libcurl.c:269
+#, c-format
+msgid ""
+"libcurl error code %d\n"
+"\t%s\n"
+msgstr ""
+
+#: src/modules/internet/libcurl.c:404
+msgid "download.file(method = \"libcurl\") is not supported on this platform"
+msgstr ""
+
+#: src/modules/internet/libcurl.c:420
+msgid "lengths of 'url' and 'destfile' must match"
+msgstr ""
+
+#: src/modules/internet/libcurl.c:481
+#, c-format
+msgid "URL %s: cannot open destfile '%s', reason '%s'"
 msgstr ""
 
-#: src/modules/internet/nanoftp.c:288 src/modules/internet/nanoftp.c:301
-#: src/modules/internet/nanoftp.c:312 src/modules/internet/nanoftp.c:346
-#: src/modules/internet/nanoftp.c:356
+#: src/modules/internet/libcurl.c:593
+msgid "cannot download all files"
+msgstr ""
+
+#: src/modules/internet/libcurl.c:727
+msgid "cannot read from connection"
+msgstr ""
+
+#: src/modules/internet/libcurl.c:763
+msgid "cannot open connection"
+msgstr ""
+
+#: src/modules/internet/libcurl.c:826
+msgid "url(method = \"libcurl\") is not supported on this platform"
+msgstr ""
+
+#: src/modules/internet/nanoftp.c:289 src/modules/internet/nanoftp.c:302
+#: src/modules/internet/nanoftp.c:313 src/modules/internet/nanoftp.c:347
+#: src/modules/internet/nanoftp.c:357
 msgid "RxmlNanoFTPScanURL: overlong (invalid?) URL"
 msgstr ""
 
-#: src/modules/internet/nanoftp.c:389
+#: src/modules/internet/nanoftp.c:390
 msgid "removing FTP proxy info"
 msgstr ""
 
-#: src/modules/internet/nanoftp.c:391
+#: src/modules/internet/nanoftp.c:392
 #, c-format
 msgid "using FTP proxy '%s'"
 msgstr ""
 
-#: src/modules/internet/nanoftp.c:402 src/modules/internet/nanoftp.c:431
+#: src/modules/internet/nanoftp.c:403 src/modules/internet/nanoftp.c:432
 msgid "RxmlNanoFTPScanProxy: overlong (invalid?) URL"
 msgstr ""
 
-#: src/modules/internet/nanoftp.c:830
+#: src/modules/internet/nanoftp.c:833
 msgid "cannot resolve host"
 msgstr ""
 
-#: src/modules/internet/nanoftp.c:860
+#: src/modules/internet/nanoftp.c:863
 msgid "failed to connect to server"
 msgstr ""
 
-#: src/modules/internet/nanoftp.c:871
+#: src/modules/internet/nanoftp.c:874
 msgid "failed to get response from server"
 msgstr ""
 
-#: src/modules/internet/nanoftp.c:1134
+#: src/modules/internet/nanoftp.c:1137
 msgid "RxmlNanoFTPGetConnection: failed to create socket"
 msgstr ""
 
-#: src/modules/internet/nanoftp.c:1180
+#: src/modules/internet/nanoftp.c:1183
 msgid "failed to create a data connection"
 msgstr ""
 
-#: src/modules/internet/nanoftp.c:1188
+#: src/modules/internet/nanoftp.c:1191
 msgid "failed to bind a port"
 msgstr ""
 
-#: src/modules/internet/nanoftp.c:1195
+#: src/modules/internet/nanoftp.c:1198
 #, c-format
 msgid "could not listen on port %d"
 msgstr ""
 
-#: src/modules/internet/nanohttp.c:370 src/modules/internet/nanohttp.c:398
-#: src/modules/internet/nanohttp.c:407
+#: src/modules/internet/nanohttp.c:369 src/modules/internet/nanohttp.c:400
+#: src/modules/internet/nanohttp.c:412
 msgid "RxmlNanoHTTPScanURL: overlong (invalid?) URL"
 msgstr ""
 
-#: src/modules/internet/nanohttp.c:441
+#: src/modules/internet/nanohttp.c:446
 msgid "removing HTTP proxy info"
 msgstr ""
 
-#: src/modules/internet/nanohttp.c:443
+#: src/modules/internet/nanohttp.c:448
 #, c-format
 msgid "using HTTP proxy '%s'"
 msgstr ""
 
-#: src/modules/internet/nanohttp.c:454 src/modules/internet/nanohttp.c:490
+#: src/modules/internet/nanohttp.c:459 src/modules/internet/nanohttp.c:497
 msgid "RxmlNanoHTTPScanProxy: overlong (invalid?) URL"
 msgstr ""
 
-#: src/modules/internet/nanohttp.c:1107
+#: src/modules/internet/nanohttp.c:1135
 #, c-format
 msgid "unable to resolve '%s'"
 msgstr ""
 
-#: src/modules/internet/nanohttp.c:1134
+#: src/modules/internet/nanohttp.c:1168
 #, c-format
 msgid "connected to '%s' on port %d."
 msgstr ""
 
-#: src/modules/internet/nanohttp.c:1139
+#: src/modules/internet/nanohttp.c:1173
 #, c-format
 msgid "unable to connect to '%s' on port %d."
 msgstr ""
 
-#: src/modules/internet/nanohttp.c:1443
+#: src/modules/internet/nanohttp.c:1477
 #, c-format
 msgid "redirect to: '%s'"
 msgstr ""
 
-#: src/modules/internet/nanohttp.c:1454
+#: src/modules/internet/nanohttp.c:1488
 msgid "too many redirects, aborting ..."
 msgstr ""
 
@@ -6648,11 +6765,11 @@ msgstr ""
 #: src/modules/lapack/Lapack.c:730 src/modules/lapack/Lapack.c:779
 #: src/modules/lapack/Lapack.c:786 src/modules/lapack/Lapack.c:834
 #: src/modules/lapack/Lapack.c:840 src/modules/lapack/Lapack.c:894
-#: src/modules/lapack/Lapack.c:900 src/modules/lapack/Lapack.c:1134
-#: src/modules/lapack/Lapack.c:1140 src/modules/lapack/Lapack.c:1188
-#: src/modules/lapack/Lapack.c:1195 src/modules/lapack/Lapack.c:1199
-#: src/modules/lapack/Lapack.c:1227 src/modules/lapack/Lapack.c:1234
-#: src/modules/lapack/Lapack.c:1254
+#: src/modules/lapack/Lapack.c:900 src/modules/lapack/Lapack.c:1135
+#: src/modules/lapack/Lapack.c:1141 src/modules/lapack/Lapack.c:1189
+#: src/modules/lapack/Lapack.c:1196 src/modules/lapack/Lapack.c:1200
+#: src/modules/lapack/Lapack.c:1228 src/modules/lapack/Lapack.c:1235
+#: src/modules/lapack/Lapack.c:1255
 #, c-format
 msgid "error code %d from Lapack routine '%s'"
 msgstr ""
@@ -6732,28 +6849,28 @@ msgstr ""
 msgid "'a' must be a complex matrix"
 msgstr ""
 
-#: src/modules/lapack/Lapack.c:535 src/modules/lapack/Lapack.c:1042
+#: src/modules/lapack/Lapack.c:535 src/modules/lapack/Lapack.c:1043
 msgid "'a' is 0-diml"
 msgstr ""
 
-#: src/modules/lapack/Lapack.c:537 src/modules/lapack/Lapack.c:1044
+#: src/modules/lapack/Lapack.c:537 src/modules/lapack/Lapack.c:1045
 #, c-format
 msgid "'a' (%d x %d) must be square"
 msgstr ""
 
-#: src/modules/lapack/Lapack.c:543 src/modules/lapack/Lapack.c:1050
+#: src/modules/lapack/Lapack.c:543 src/modules/lapack/Lapack.c:1051
 msgid "no right-hand side in 'b'"
 msgstr ""
 
 #: src/modules/lapack/Lapack.c:546 src/modules/lapack/Lapack.c:560
-#: src/modules/lapack/Lapack.c:1053 src/modules/lapack/Lapack.c:1069
+#: src/modules/lapack/Lapack.c:1054 src/modules/lapack/Lapack.c:1070
 #, c-format
 msgid "'b' (%d x %d) must be compatible with 'a' (%d x %d)"
 msgstr ""
 
 #: src/modules/lapack/Lapack.c:581 src/modules/lapack/Lapack.c:948
-#: src/modules/lapack/Lapack.c:962 src/modules/lapack/Lapack.c:1017
-#: src/modules/lapack/Lapack.c:1091
+#: src/modules/lapack/Lapack.c:962 src/modules/lapack/Lapack.c:1018
+#: src/modules/lapack/Lapack.c:1092
 #, c-format
 msgid "argument %d of Lapack routine %s had invalid value"
 msgstr ""
@@ -6763,7 +6880,7 @@ msgid "'b' must be a complex matrix"
 msgstr ""
 
 #: src/modules/lapack/Lapack.c:670 src/modules/lapack/Lapack.c:716
-#: src/modules/lapack/Lapack.c:1181 src/modules/lapack/Lapack.c:1220
+#: src/modules/lapack/Lapack.c:1182 src/modules/lapack/Lapack.c:1221
 #, c-format
 msgid "right-hand side should have %d not %d rows"
 msgstr ""
@@ -6780,13 +6897,13 @@ msgstr ""
 msgid "'x' must be a square complex matrix"
 msgstr ""
 
-#: src/modules/lapack/Lapack.c:926 src/modules/lapack/Lapack.c:1000
-#: src/modules/lapack/Lapack.c:1039 src/modules/lapack/Lapack.c:1114
-#: src/modules/lapack/Lapack.c:1245
+#: src/modules/lapack/Lapack.c:926 src/modules/lapack/Lapack.c:1001
+#: src/modules/lapack/Lapack.c:1040 src/modules/lapack/Lapack.c:1115
+#: src/modules/lapack/Lapack.c:1246
 msgid "'a' must be a numeric matrix"
 msgstr ""
 
-#: src/modules/lapack/Lapack.c:933 src/modules/lapack/Lapack.c:1250
+#: src/modules/lapack/Lapack.c:933 src/modules/lapack/Lapack.c:1251
 msgid "'a' must be a square matrix"
 msgstr ""
 
@@ -6803,40 +6920,40 @@ msgstr ""
 msgid "the matrix is either rank-deficient or indefinite"
 msgstr ""
 
-#: src/modules/lapack/Lapack.c:987
+#: src/modules/lapack/Lapack.c:988
 msgid "'size' argument must be a positive integer"
 msgstr ""
 
-#: src/modules/lapack/Lapack.c:1002
+#: src/modules/lapack/Lapack.c:1003
 #, c-format
 msgid "'size' cannot exceed ncol(x) = %d"
 msgstr ""
 
-#: src/modules/lapack/Lapack.c:1003
+#: src/modules/lapack/Lapack.c:1004
 #, c-format
 msgid "'size' cannot exceed nrow(x) = %d"
 msgstr ""
 
-#: src/modules/lapack/Lapack.c:1015
+#: src/modules/lapack/Lapack.c:1016
 #, c-format
 msgid "element (%d, %d) is zero, so the inverse cannot be computed"
 msgstr ""
 
-#: src/modules/lapack/Lapack.c:1094
+#: src/modules/lapack/Lapack.c:1095
 #, c-format
 msgid "Lapack routine %s: system is exactly singular: U[%d,%d] = 0"
 msgstr ""
 
-#: src/modules/lapack/Lapack.c:1102
+#: src/modules/lapack/Lapack.c:1103
 #, c-format
 msgid "system is computationally singular: reciprocal condition number = %g"
 msgstr ""
 
-#: src/modules/lapack/Lapack.c:1174 src/modules/lapack/Lapack.c:1212
+#: src/modules/lapack/Lapack.c:1175 src/modules/lapack/Lapack.c:1213
 msgid "'b' must be a numeric matrix"
 msgstr ""
 
-#: src/modules/lapack/Lapack.c:1246
+#: src/modules/lapack/Lapack.c:1247
 msgid "argument 'logarithm' must be logical"
 msgstr ""
 
@@ -6846,7 +6963,7 @@ msgstr ""
 
 #: src/nmath/bessel_i.c:77 src/nmath/bessel_i.c:122
 #, c-format
-msgid "bessel_i(%g): ncalc (=%ld) != nb (=%ld); alpha=%g. Arg. out of range?\n"
+msgid "bessel_i(%g): ncalc (=%d) != nb (=%d); alpha=%g. Arg. out of range?\n"
 msgstr ""
 
 #: src/nmath/bessel_i.c:80 src/nmath/bessel_i.c:125
@@ -6854,16 +6971,21 @@ msgstr ""
 msgid "bessel_i(%g,nu=%g): precision lost in result\n"
 msgstr ""
 
-#: src/nmath/bessel_j.c:67
+#: src/nmath/bessel_j.c:64 src/nmath/bessel_j.c:118
+#, c-format
+msgid "besselJ(x, nu): nu=%g too large for bessel_j() algorithm"
+msgstr ""
+
+#: src/nmath/bessel_j.c:72
 msgid "bessel_j allocation error"
 msgstr ""
 
-#: src/nmath/bessel_j.c:75 src/nmath/bessel_j.c:118
+#: src/nmath/bessel_j.c:80 src/nmath/bessel_j.c:127
 #, c-format
-msgid "bessel_j(%g): ncalc (=%ld) != nb (=%ld); alpha=%g. Arg. out of range?\n"
+msgid "bessel_j(%g): ncalc (=%d) != nb (=%d); alpha=%g. Arg. out of range?\n"
 msgstr ""
 
-#: src/nmath/bessel_j.c:78 src/nmath/bessel_j.c:121
+#: src/nmath/bessel_j.c:83 src/nmath/bessel_j.c:130
 #, c-format
 msgid "bessel_j(%g,nu=%g): precision lost in result\n"
 msgstr ""
@@ -6874,7 +6996,7 @@ msgstr ""
 
 #: src/nmath/bessel_k.c:71 src/nmath/bessel_k.c:108
 #, c-format
-msgid "bessel_k(%g): ncalc (=%ld) != nb (=%ld); alpha=%g. Arg. out of range?\n"
+msgid "bessel_k(%g): ncalc (=%d) != nb (=%d); alpha=%g. Arg. out of range?\n"
 msgstr ""
 
 #: src/nmath/bessel_k.c:74 src/nmath/bessel_k.c:111
@@ -6882,16 +7004,21 @@ msgstr ""
 msgid "bessel_k(%g,nu=%g): precision lost in result\n"
 msgstr ""
 
-#: src/nmath/bessel_y.c:66
+#: src/nmath/bessel_y.c:63 src/nmath/bessel_y.c:125
+#, c-format
+msgid "besselY(x, nu): nu=%g too large for bessel_y() algorithm"
+msgstr ""
+
+#: src/nmath/bessel_y.c:71
 msgid "bessel_y allocation error"
 msgstr ""
 
-#: src/nmath/bessel_y.c:82 src/nmath/bessel_y.c:127
+#: src/nmath/bessel_y.c:87 src/nmath/bessel_y.c:136
 #, c-format
-msgid "bessel_y(%g): ncalc (=%ld) != nb (=%ld); alpha=%g. Arg. out of range?\n"
+msgid "bessel_y(%g): ncalc (=%d) != nb (=%d); alpha=%g. Arg. out of range?\n"
 msgstr ""
 
-#: src/nmath/bessel_y.c:85 src/nmath/bessel_y.c:130
+#: src/nmath/bessel_y.c:90 src/nmath/bessel_y.c:139
 #, c-format
 msgid "bessel_y(%g,nu=%g): precision lost in result\n"
 msgstr ""
@@ -6901,42 +7028,42 @@ msgstr ""
 msgid "'k' (%.2f) must be integer, rounded to %.0f"
 msgstr ""
 
-#: src/nmath/nmath.h:141
+#: src/nmath/nmath.h:156
 #, c-format
 msgid "argument out of domain in '%s'\n"
 msgstr ""
 
-#: src/nmath/nmath.h:144
+#: src/nmath/nmath.h:159
 #, c-format
 msgid "value out of range in '%s'\n"
 msgstr ""
 
-#: src/nmath/nmath.h:147
+#: src/nmath/nmath.h:162
 #, c-format
 msgid "convergence failed in '%s'\n"
 msgstr ""
 
-#: src/nmath/nmath.h:150
+#: src/nmath/nmath.h:165
 #, c-format
 msgid "full precision may not have been achieved in '%s'\n"
 msgstr ""
 
-#: src/nmath/nmath.h:153
+#: src/nmath/nmath.h:168
 #, c-format
 msgid "underflow occurred in '%s'\n"
 msgstr ""
 
-#: src/nmath/pbeta.c:48
+#: src/nmath/pbeta.c:64
 #, c-format
-msgid "pbeta_raw() -> bratio() gave error code %d"
+msgid "pbeta_raw(%g, a=%g, b=%g, ..) -> bratio() gave error code %d"
 msgstr ""
 
-#: src/nmath/pnbinom.c:79
+#: src/nmath/pnbinom.c:82
 #, c-format
 msgid "pnbinom_mu() -> bratio() gave error code %d"
 msgstr ""
 
-#: src/nmath/pnchisq.c:246
+#: src/nmath/pnchisq.c:295
 #, c-format
 msgid "pnchisq(x=%g, ..): not converged in %d iter."
 msgstr ""
@@ -6978,7 +7105,7 @@ msgstr ""
 msgid "X11 module cannot be loaded"
 msgstr ""
 
-#: src/unix/X11.c:126 src/unix/X11.c:132 src/unix/X11.c:138 src/unix/X11.c:144
+#: src/unix/X11.c:144 src/unix/X11.c:150 src/unix/X11.c:156 src/unix/X11.c:162
 msgid "X11 is not available"
 msgstr ""
 
@@ -7004,7 +7131,7 @@ msgid ""
 "Explicit lazy dynamic loading not supported on this platform. Using default."
 msgstr ""
 
-#: src/unix/dynload.c:240
+#: src/unix/dynload.c:232
 msgid "cannot get working directory!"
 msgstr ""
 
@@ -7018,93 +7145,93 @@ msgid ""
 "report using bug.report()"
 msgstr ""
 
-#: src/unix/sys-std.c:1082 src/unix/sys-std.c:1249
+#: src/unix/sys-std.c:1085 src/unix/sys-std.c:1255
 #, c-format
 msgid "problem in saving the history file '%s'"
 msgstr ""
 
-#: src/unix/sys-std.c:1156
+#: src/unix/sys-std.c:1162
 #, c-format
 msgid ""
 "Cannot open file '%s': %s\n"
 "\n"
 msgstr ""
 
-#: src/unix/sys-std.c:1220 src/unix/sys-std.c:1243
+#: src/unix/sys-std.c:1226 src/unix/sys-std.c:1249
 msgid "'file' argument is too long"
 msgstr ""
 
-#: src/unix/sys-std.c:1226 src/unix/sys-std.c:1228
+#: src/unix/sys-std.c:1232 src/unix/sys-std.c:1234
 msgid "no history mechanism available"
 msgstr ""
 
-#: src/unix/sys-std.c:1255
+#: src/unix/sys-std.c:1261
 msgid "problem in truncating the history file"
 msgstr ""
 
-#: src/unix/sys-std.c:1257 src/unix/sys-std.c:1259
+#: src/unix/sys-std.c:1263 src/unix/sys-std.c:1265
 msgid "no history available to save"
 msgstr ""
 
-#: src/unix/sys-std.c:1271
+#: src/unix/sys-std.c:1277
 msgid "invalid timestamp"
 msgstr ""
 
-#: src/unix/sys-unix.c:251
+#: src/unix/sys-unix.c:248
 msgid "non-empty character argument expected"
 msgstr ""
 
-#: src/unix/sys-unix.c:254
+#: src/unix/sys-unix.c:251
 msgid "'intern' must be logical and not NA"
 msgstr ""
 
-#: src/unix/sys-unix.c:266
+#: src/unix/sys-unix.c:269
 #, c-format
 msgid "cannot popen '%s', probable reason '%s'"
 msgstr ""
 
-#: src/unix/sys-unix.c:271
+#: src/unix/sys-unix.c:279
 #, c-format
 msgid "line %d may be truncated in call to system(, intern = TRUE)"
 msgstr ""
 
-#: src/unix/sys-unix.c:288
+#: src/unix/sys-unix.c:301
 #, c-format
 msgid "error in running command: '%s'"
 msgstr ""
 
-#: src/unix/sys-unix.c:290
+#: src/unix/sys-unix.c:303
 msgid "error in running command"
 msgstr ""
 
-#: src/unix/sys-unix.c:294
+#: src/unix/sys-unix.c:307
 #, c-format
 msgid "running command '%s' had status %d and error message '%s'"
 msgstr ""
 
-#: src/unix/sys-unix.c:399
+#: src/unix/sys-unix.c:412
 msgid "Sys.info() is not implemented on this system"
 msgstr ""
 
-#: src/unix/system.c:257
+#: src/unix/system.c:267
 #, c-format
 msgid "WARNING: --gui or -g without value ignored"
 msgstr ""
 
-#: src/unix/system.c:275
+#: src/unix/system.c:285
 #, c-format
 msgid "WARNING: unknown gui '%s', using X11\n"
 msgstr ""
 
-#: src/unix/system.c:278
+#: src/unix/system.c:288
 #, c-format
 msgid "WARNING: unknown gui '%s', using none\n"
 msgstr ""
 
-#: src/unix/system.c:388
+#: src/unix/system.c:373
 msgid "creating temporary file for '-e' failed"
 msgstr ""
 
-#: src/unix/system.c:469
+#: src/unix/system.c:454
 msgid "WARNING: Only editing the first in the list of files"
 msgstr ""
diff --git a/src/library/base/po/RGui-da.po b/src/library/base/po/RGui-da.po
index ecb3464..24a41ba 100644
--- a/src/library/base/po/RGui-da.po
+++ b/src/library/base/po/RGui-da.po
@@ -7,7 +7,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: RGUi\n"
 "Report-Msgid-Bugs-To: bugs.r-project.org\n"
-"POT-Creation-Date: 2013-03-18 19:36+0000\n"
+"POT-Creation-Date: 2016-04-01 10:28-0700\n"
 "PO-Revision-Date: 2014-03-18 23:36+0200\n"
 "Last-Translator: Joe Hansen <joedalton2 at yahoo.dk>\n"
 "Language-Team: Danish <debian-l10n-danish at lists.debian.org>\n"
@@ -32,12 +32,12 @@ msgstr ""
 msgid "Unable to open the clipboard"
 msgstr "Kan ikke åbne udklipsholderen"
 
-#: src/gnuwin32/console.c:1914
+#: src/gnuwin32/console.c:1919
 msgid "Insufficient memory. Please close the console"
 msgstr "Utilstrækkelig hukommelse. Luk venligst konsollen"
 
 # engelsk fejl, ekstra mellemrum.
-#: src/gnuwin32/console.c:1969 src/gnuwin32/console.c:2022
+#: src/gnuwin32/console.c:1974 src/gnuwin32/console.c:2028
 #: src/gnuwin32/preferences.c:333
 #, c-format
 msgid ""
@@ -47,23 +47,23 @@ msgstr ""
 "Skrifttype %s-%d-%d blev ikke fundet.\n"
 "Bruger systemskrifttype"
 
-#: src/gnuwin32/console.c:2127
+#: src/gnuwin32/console.c:2133
 msgid "Save selection to"
 msgstr "Gem markering til"
 
-#: src/gnuwin32/console.c:2129
+#: src/gnuwin32/console.c:2135
 msgid "Save console contents to"
 msgstr "Gem konsolindhold til"
 
-#: src/gnuwin32/console.c:2228
+#: src/gnuwin32/console.c:2234
 msgid "Scrolling.\n"
 msgstr "Rulle.\n"
 
-#: src/gnuwin32/console.c:2229
+#: src/gnuwin32/console.c:2235
 msgid "  Keyboard: PgUp, PgDown, Ctrl+Arrows, Ctrl+Home, Ctrl+End,\n"
 msgstr "  Tastatur: PgUp, PgDown, Ctrl+pile, Ctrl+Home, Ctrl+End,\n"
 
-#: src/gnuwin32/console.c:2230
+#: src/gnuwin32/console.c:2236
 msgid ""
 "  Mouse: use the scrollbar(s).\n"
 "\n"
@@ -71,75 +71,75 @@ msgstr ""
 "  Mus: Brug rullebjælkerne.\n"
 "\n"
 
-#: src/gnuwin32/console.c:2231
+#: src/gnuwin32/console.c:2237
 msgid "Editing.\n"
 msgstr "Redigere.\n"
 
-#: src/gnuwin32/console.c:2232
+#: src/gnuwin32/console.c:2238
 msgid "  Moving the cursor: \n"
 msgstr "  Flytning af markøren: \n"
 
-#: src/gnuwin32/console.c:2233
+#: src/gnuwin32/console.c:2239
 msgid "     Left arrow or Ctrl+B: move backward one character;\n"
 msgstr "     Venstre pil eller Ctrl+B: Flyt et tegn tilbage;\n"
 
-#: src/gnuwin32/console.c:2234
+#: src/gnuwin32/console.c:2240
 msgid "     Right arrow or Ctrl+F: move forward one character;\n"
 msgstr "     Højre pil eller Ctrl+F: Flyt et tegn fremad;\n"
 
-#: src/gnuwin32/console.c:2235
+#: src/gnuwin32/console.c:2241
 msgid "     Home or Ctrl+A: go to beginning of line;\n"
 msgstr "     Home eller Ctrl+A: Gå til begyndelsen af linjen;\n"
 
-#: src/gnuwin32/console.c:2236
+#: src/gnuwin32/console.c:2242
 msgid "     End or Ctrl+E: go to end of line;\n"
 msgstr "     End eller Ctrl+E: Gå til slutningen af linjen;\n"
 
-#: src/gnuwin32/console.c:2237
+#: src/gnuwin32/console.c:2243
 msgid "  History: Up and Down Arrows, Ctrl+P, Ctrl+N\n"
 msgstr "  Historik: Pilene op og ned, Ctrl+P, Ctrl+N\n"
 
-#: src/gnuwin32/console.c:2238
+#: src/gnuwin32/console.c:2244
 msgid "  Deleting:\n"
 msgstr "  Slette:\n"
 
-#: src/gnuwin32/console.c:2239
+#: src/gnuwin32/console.c:2245
 msgid "     Del or Ctrl+D: delete current character or selection;\n"
 msgstr "     Del eller Ctrl+D: Slet aktuelt tegn eller markering;\n"
 
-#: src/gnuwin32/console.c:2240
+#: src/gnuwin32/console.c:2246
 msgid "     Backspace: delete preceding character;\n"
 msgstr "     Slet tilbage: Slet foregående tegn;\n"
 
-#: src/gnuwin32/console.c:2241
+#: src/gnuwin32/console.c:2247
 msgid ""
 "     Ctrl+Del or Ctrl+K: delete text from current character to end of line.\n"
 msgstr ""
 "     Ctrl+Del eller Ctrl+K: Slet tekst fra aktuel tegn til slutningen af "
 "linjen.\n"
 
-#: src/gnuwin32/console.c:2242
+#: src/gnuwin32/console.c:2248
 msgid "     Ctrl+U: delete all text from current line.\n"
 msgstr "     Ctrl+U: Slet al tekst fra aktuel linje.\n"
 
-#: src/gnuwin32/console.c:2243
+#: src/gnuwin32/console.c:2249
 msgid "  Copy and paste.\n"
 msgstr "  Kopier og indsæt.\n"
 
-#: src/gnuwin32/console.c:2244
+#: src/gnuwin32/console.c:2250
 msgid ""
 "     Use the mouse (with the left button held down) to mark (select) text.\n"
 msgstr ""
 "     Brug musen (med den venstre tast nede) til at markere (vælge) tekst.\n"
 
-#: src/gnuwin32/console.c:2245
+#: src/gnuwin32/console.c:2251
 msgid ""
 "     Use Shift+Del (or Ctrl+C) to copy the marked text to the clipboard and\n"
 msgstr ""
 "     Brug Skift+Del (eller Ctrl+C) til at kopiere den markerede tekst til "
 "udklipsholderen og\n"
 
-#: src/gnuwin32/console.c:2246
+#: src/gnuwin32/console.c:2252
 msgid ""
 "     Shift+Ins (or Ctrl+V or Ctrl+Y) to paste the content of the clipboard "
 "(if any)  \n"
@@ -147,28 +147,28 @@ msgstr ""
 "     Skift+Ins (eller Ctrl+V eller Ctrl+Y) til at indsætte indholdet af "
 "udklipsholderen (hvis der er noget)  \n"
 
-#: src/gnuwin32/console.c:2247
+#: src/gnuwin32/console.c:2253
 msgid "     to the console, Ctrl+X first copy then paste\n"
 msgstr "     til konsollen, Ctrl+X først kopier så indsæt\n"
 
-#: src/gnuwin32/console.c:2248
+#: src/gnuwin32/console.c:2254
 msgid "  Misc:\n"
 msgstr "  Div.:\n"
 
-#: src/gnuwin32/console.c:2249
+#: src/gnuwin32/console.c:2255
 msgid "     Ctrl+L: Clear the console.\n"
 msgstr "     Ctrl+L: Ryd konsollen.\n"
 
-#: src/gnuwin32/console.c:2250
+#: src/gnuwin32/console.c:2256
 msgid "     Ctrl+O or INS: Toggle overwrite mode: initially off.\n"
 msgstr ""
 "     Ctrl+O eller INS: Skift tilstand for overskrivning: Som start slukket.\n"
 
-#: src/gnuwin32/console.c:2251
+#: src/gnuwin32/console.c:2257
 msgid "     Ctrl+T: Interchange current char with one to the left.\n"
 msgstr "     Ctrl+T: Udveksl aktuelt tegn med tegnet til venstre.\n"
 
-#: src/gnuwin32/console.c:2252
+#: src/gnuwin32/console.c:2258
 msgid ""
 "\n"
 "Note: Console is updated only when some input is required.\n"
@@ -176,7 +176,7 @@ msgstr ""
 "\n"
 "Bemærk: Konsol opdateres kun når inddata er krævet..\n"
 
-#: src/gnuwin32/console.c:2253
+#: src/gnuwin32/console.c:2259
 msgid ""
 "  Use Ctrl+W to toggle this feature off/on.\n"
 "\n"
@@ -184,7 +184,7 @@ msgstr ""
 "  Brug Ctrl+W til at tænde og slukke denne funktion..\n"
 "\n"
 
-#: src/gnuwin32/console.c:2254
+#: src/gnuwin32/console.c:2260
 msgid ""
 "Use ESC to stop the interpreter.\n"
 "\n"
@@ -192,7 +192,7 @@ msgstr ""
 "Brug ESC til at stoppe fortolkeren.\n"
 "\n"
 
-#: src/gnuwin32/console.c:2255
+#: src/gnuwin32/console.c:2261
 msgid ""
 "TAB starts completion of the current word.\n"
 "\n"
@@ -200,268 +200,269 @@ msgstr ""
 "TAB påbegynder færdiggørelse af det aktuelle ord.\n"
 "\n"
 
-#: src/gnuwin32/console.c:2256
+#: src/gnuwin32/console.c:2262
 msgid "Standard Windows hotkeys can be used to switch to the\n"
 msgstr "Standardgenvejstaster for Windows kan bruges til at skifte til\n"
 
-#: src/gnuwin32/console.c:2257
+#: src/gnuwin32/console.c:2263
 msgid "graphics device (Ctrl+Tab or Ctrl+F6 in MDI, Alt+Tab in SDI)"
 msgstr "den grafiske enhed (Ctrl+Tab eller Ctrl+F6 i MDI, Alt+Tab i SDI)"
 
-#: src/gnuwin32/editor.c:88 src/gnuwin32/editor.c:90
+#: src/gnuwin32/editor.c:91 src/gnuwin32/editor.c:93
 msgid "R Editor"
 msgstr "Redigeringsprogrammet R"
 
-#: src/gnuwin32/editor.c:119
+#: src/gnuwin32/editor.c:123
 #, c-format
 msgid "unable to open file %s for reading"
 msgstr "kan ikke åbne fil %s for læsning"
 
-#: src/gnuwin32/editor.c:135
+#: src/gnuwin32/editor.c:139
 #, c-format
 msgid "Could not read from file '%s'"
 msgstr "Kunne ikke læse fra fil »%s«"
 
-#: src/gnuwin32/editor.c:166
+#: src/gnuwin32/editor.c:171
 #, c-format
 msgid "Could not save file '%s'"
 msgstr "Kunne ikke gemme fil »%s«"
 
-#: src/gnuwin32/editor.c:182
+#: src/gnuwin32/editor.c:187
 msgid "Save script as"
 msgstr "Gem skript som"
 
-#: src/gnuwin32/editor.c:377 src/gnuwin32/editor.c:694
-#: src/gnuwin32/pager.c:431 src/gnuwin32/rui.c:1076
+#: src/gnuwin32/editor.c:379 src/gnuwin32/editor.c:696
+#: src/gnuwin32/pager.c:430 src/gnuwin32/rui.c:1076
 msgid "Open script"
 msgstr "Åbn skript"
 
-#: src/gnuwin32/editor.c:500 src/gnuwin32/pager.c:185 src/gnuwin32/pager.c:205
+#: src/gnuwin32/editor.c:502 src/gnuwin32/pager.c:184 src/gnuwin32/pager.c:204
 msgid "No RGui console to paste to"
 msgstr "Ingen RGui-konsol at indsætte til"
 
-#: src/gnuwin32/editor.c:602
+#: src/gnuwin32/editor.c:604
 msgid "R EDITOR\n"
 msgstr "REDIGERINGSPROGRAM FOR R\n"
 
-#: src/gnuwin32/editor.c:604
+#: src/gnuwin32/editor.c:606
 msgid "A standard text editor for editing and running R code.\n"
 msgstr ""
 "Et standard tekstredigeringsprogram for redigering og kørsel af R-kode.\n"
 
-#: src/gnuwin32/editor.c:606
+#: src/gnuwin32/editor.c:608
 msgid "RUNNING COMMANDS\n"
 msgstr "KØRE KOMMANDOER\n"
 
-#: src/gnuwin32/editor.c:607
+#: src/gnuwin32/editor.c:609
 msgid "To run a line or section of R code, select the code and either\n"
 msgstr "For at køre en linje eller afsnit af R-kode, så vælg koden og enten\n"
 
-#: src/gnuwin32/editor.c:608
+#: src/gnuwin32/editor.c:610
 msgid "     Press Ctrl-R\n"
 msgstr "     Tryk Ctrl-R\n"
 
-#: src/gnuwin32/editor.c:609
+#: src/gnuwin32/editor.c:611
 msgid "     Select \"Run line or selection\" from the \"Edit\" menu\n"
 msgstr "     Vælg »Kør linje eller markering« fra menuen »Rediger«\n"
 
-#: src/gnuwin32/editor.c:610
+#: src/gnuwin32/editor.c:612
 msgid "     Press the \"Run line or selection\" icon on the toolbar\n"
 msgstr "     Tryk på ikonet »Kør linje eller markering« på værktøjsbjælken\n"
 
-#: src/gnuwin32/editor.c:611
+#: src/gnuwin32/editor.c:613
 msgid ""
 "This will copy the selected commands to the console and evaluate them.\n"
 msgstr ""
 "Dette vil kopiere de valgte kommandoer til konsollen og evaluere dem.\n"
 
-#: src/gnuwin32/editor.c:612
+#: src/gnuwin32/editor.c:614
 msgid ""
 "If there is no selection, this will just run the current line and advance\n"
 msgstr ""
 "Hvis der ikke er en markering, vil dette bare køre den aktuelle linje og "
 "fortsætte\n"
 
-#: src/gnuwin32/editor.c:613
+#: src/gnuwin32/editor.c:615
 msgid "the cursor by one line.\n"
 msgstr "markøren med en linje.\n"
 
-#: src/gnuwin32/editor.c:625 src/gnuwin32/editor.c:702
-#: src/gnuwin32/editor.c:760
+#: src/gnuwin32/editor.c:627 src/gnuwin32/editor.c:704
+#: src/gnuwin32/editor.c:762
 msgid "Run line or selection"
 msgstr "Kør linje eller markering"
 
-#: src/gnuwin32/editor.c:627 src/gnuwin32/editor.c:745
+#: src/gnuwin32/editor.c:629 src/gnuwin32/editor.c:747
 msgid "Undo"
 msgstr "Fortryd"
 
-#: src/gnuwin32/editor.c:629 src/gnuwin32/editor.c:748
+#: src/gnuwin32/editor.c:631 src/gnuwin32/editor.c:750
 msgid "Cut"
 msgstr "Klip"
 
-#: src/gnuwin32/editor.c:630 src/gnuwin32/editor.c:750
-#: src/gnuwin32/pager.c:305 src/gnuwin32/pager.c:478 src/gnuwin32/rui.c:859
+#: src/gnuwin32/editor.c:632 src/gnuwin32/editor.c:752
+#: src/gnuwin32/pager.c:304 src/gnuwin32/pager.c:477 src/gnuwin32/rui.c:859
 #: src/gnuwin32/rui.c:1088 src/gnuwin32/rui.c:1144
 msgid "Copy"
 msgstr "Kopier"
 
-#: src/gnuwin32/editor.c:631 src/gnuwin32/editor.c:752 src/gnuwin32/rui.c:860
+#: src/gnuwin32/editor.c:633 src/gnuwin32/editor.c:754 src/gnuwin32/rui.c:860
 #: src/gnuwin32/rui.c:1092 src/gnuwin32/rui.c:1145
 msgid "Paste"
 msgstr "Indsæt"
 
-#: src/gnuwin32/editor.c:632 src/gnuwin32/editor.c:754
+#: src/gnuwin32/editor.c:634 src/gnuwin32/editor.c:756
 msgid "Delete"
 msgstr "Slet"
 
-#: src/gnuwin32/editor.c:634 src/gnuwin32/editor.c:756
-#: src/gnuwin32/pager.c:308 src/gnuwin32/pager.c:484 src/gnuwin32/rui.c:866
+#: src/gnuwin32/editor.c:636 src/gnuwin32/editor.c:758
+#: src/gnuwin32/pager.c:307 src/gnuwin32/pager.c:483 src/gnuwin32/rui.c:866
 #: src/gnuwin32/rui.c:1149
 msgid "Select all"
 msgstr "Vælg alle"
 
-#: src/gnuwin32/editor.c:698
+#: src/gnuwin32/editor.c:700
 msgid "Save script"
 msgstr "Gem skript"
 
-#: src/gnuwin32/editor.c:706 src/gnuwin32/pager.c:451
-#: src/library/grDevices/src/devWindows.c:1594
+#: src/gnuwin32/editor.c:708 src/gnuwin32/pager.c:450
+#: src/library/grDevices/src/devWindows.c:1613
 msgid "Return focus to Console"
 msgstr "Returner fokus til konsollen"
 
-#: src/gnuwin32/editor.c:709
+#: src/gnuwin32/editor.c:711
 msgid "Print script"
 msgstr "Udskriv skript"
 
-#: src/gnuwin32/editor.c:711 src/gnuwin32/pager.c:446 src/gnuwin32/rui.c:1104
-#: src/library/grDevices/src/devWindows.c:1588
+#: src/gnuwin32/editor.c:713 src/gnuwin32/pager.c:445 src/gnuwin32/rui.c:1104
+#: src/library/grDevices/src/devWindows.c:1607
 msgid "Print"
 msgstr "Udskriv"
 
-#: src/gnuwin32/editor.c:729 src/gnuwin32/pager.c:467 src/gnuwin32/rui.c:1122
-#: src/library/utils/src/windows/dataentry.c:1790
-#: src/library/grDevices/src/devWindows.c:1626
+#: src/gnuwin32/editor.c:731 src/gnuwin32/pager.c:466 src/gnuwin32/rui.c:1122
+#: src/library/utils/src/windows/dataentry.c:1791
+#: src/library/grDevices/src/devWindows.c:1645
 msgid "File"
 msgstr "Fil"
 
-#: src/gnuwin32/editor.c:730 src/gnuwin32/pager.c:468 src/gnuwin32/rui.c:1124
+#: src/gnuwin32/editor.c:732 src/gnuwin32/pager.c:467 src/gnuwin32/rui.c:1124
 msgid "New script"
 msgstr "Nyt skript"
 
-#: src/gnuwin32/editor.c:732 src/gnuwin32/pager.c:469 src/gnuwin32/rui.c:1125
+#: src/gnuwin32/editor.c:734 src/gnuwin32/pager.c:468 src/gnuwin32/rui.c:1125
 msgid "Open script..."
 msgstr "Åbn skript..."
 
-#: src/gnuwin32/editor.c:734
+#: src/gnuwin32/editor.c:736
 msgid "Save"
 msgstr "Gem"
 
-#: src/gnuwin32/editor.c:736
+#: src/gnuwin32/editor.c:738
 msgid "Save as..."
 msgstr "Gem som..."
 
-#: src/gnuwin32/editor.c:739 src/gnuwin32/pager.c:470 src/gnuwin32/rui.c:1138
-#: src/library/grDevices/src/devWindows.c:1689
+#: src/gnuwin32/editor.c:741 src/gnuwin32/pager.c:469 src/gnuwin32/rui.c:1138
+#: src/library/grDevices/src/devWindows.c:1666
+#: src/library/grDevices/src/devWindows.c:1708
 msgid "Print..."
 msgstr "Udskriv..."
 
-#: src/gnuwin32/editor.c:742
+#: src/gnuwin32/editor.c:744
 msgid "Close script"
 msgstr "Luk skript"
 
-#: src/gnuwin32/editor.c:744 src/gnuwin32/pager.c:477 src/gnuwin32/rui.c:1143
-#: src/library/utils/src/windows/dataentry.c:1796
+#: src/gnuwin32/editor.c:746 src/gnuwin32/pager.c:476 src/gnuwin32/rui.c:1143
+#: src/library/utils/src/windows/dataentry.c:1797
 msgid "Edit"
 msgstr "Rediger"
 
-#: src/gnuwin32/editor.c:758 src/gnuwin32/rui.c:1150
+#: src/gnuwin32/editor.c:760 src/gnuwin32/rui.c:1150
 msgid "Clear console"
 msgstr "Ryd konsol"
 
-#: src/gnuwin32/editor.c:762
+#: src/gnuwin32/editor.c:764
 msgid "Run all"
 msgstr "Kør alle"
 
-#: src/gnuwin32/editor.c:765
+#: src/gnuwin32/editor.c:767
 msgid "Find..."
 msgstr "Søg..."
 
-#: src/gnuwin32/editor.c:767
+#: src/gnuwin32/editor.c:769
 msgid "Replace..."
 msgstr "Erstat..."
 
-#: src/gnuwin32/editor.c:770 src/gnuwin32/rui.c:1154
+#: src/gnuwin32/editor.c:772 src/gnuwin32/rui.c:1154
 msgid "GUI preferences..."
 msgstr "Indstillinger for grafisk brugerflade..."
 
-#: src/gnuwin32/editor.c:780 src/gnuwin32/rui.c:1186
-#: src/library/utils/src/windows/dataentry.c:1697
-#: src/library/utils/src/windows/dataentry.c:1807
+#: src/gnuwin32/editor.c:782 src/gnuwin32/rui.c:1186
+#: src/library/utils/src/windows/dataentry.c:1698
+#: src/library/utils/src/windows/dataentry.c:1808
 msgid "Help"
 msgstr "Hjælp"
 
-#: src/gnuwin32/editor.c:781
+#: src/gnuwin32/editor.c:783
 msgid "Editor"
 msgstr "Redigering"
 
-#: src/gnuwin32/editor.c:840
+#: src/gnuwin32/editor.c:842
 msgid "Maximum number of editors reached"
 msgstr "Det maksimale antal redigeringer er nået"
 
-#: src/gnuwin32/editor.c:845
+#: src/gnuwin32/editor.c:847
 msgid "Unable to create editor window"
 msgstr "Kunne ikke oprette redigeringsvindue"
 
-#: src/gnuwin32/editor.c:853
+#: src/gnuwin32/editor.c:855
 msgid "Untitled"
 msgstr "Uden titel"
 
-#: src/gnuwin32/extra.c:823 src/gnuwin32/rui.c:1224
+#: src/gnuwin32/extra.c:825
 msgid "Select file"
 msgstr "Vælg fil"
 
-#: src/gnuwin32/pager.c:89
+#: src/gnuwin32/pager.c:88
 msgid "Error opening file"
 msgstr "Fejl ved åbning af fil"
 
-#: src/gnuwin32/pager.c:96
+#: src/gnuwin32/pager.c:95
 msgid "Insufficient memory to display file in internal pager"
 msgstr "Utilstrækkelig hukommelse til at vise fil i intern tekstfremviser"
 
-#: src/gnuwin32/pager.c:177 src/gnuwin32/pager.c:189 src/gnuwin32/pager.c:209
+#: src/gnuwin32/pager.c:176 src/gnuwin32/pager.c:188 src/gnuwin32/pager.c:208
 #: src/gnuwin32/rui.c:237 src/gnuwin32/rui.c:264
 msgid "No selection"
 msgstr "Ingen markering"
 
-#: src/gnuwin32/pager.c:306 src/gnuwin32/pager.c:436 src/gnuwin32/pager.c:480
+#: src/gnuwin32/pager.c:305 src/gnuwin32/pager.c:435 src/gnuwin32/pager.c:479
 msgid "Paste to console"
 msgstr "Indsæt i konsol"
 
-#: src/gnuwin32/pager.c:307 src/gnuwin32/pager.c:441 src/gnuwin32/pager.c:482
+#: src/gnuwin32/pager.c:306 src/gnuwin32/pager.c:440 src/gnuwin32/pager.c:481
 msgid "Paste commands to console"
 msgstr "Indsæt kommandoer i konsol"
 
-#: src/gnuwin32/pager.c:310 src/gnuwin32/rui.c:869
-#: src/library/utils/src/windows/dataentry.c:1703
-#: src/library/grDevices/src/devWindows.c:1686
+#: src/gnuwin32/pager.c:309 src/gnuwin32/rui.c:869
+#: src/library/utils/src/windows/dataentry.c:1704
+#: src/library/grDevices/src/devWindows.c:1705
 msgid "Stay on top"
 msgstr "Forbliv øverst"
 
-#: src/gnuwin32/pager.c:312 src/gnuwin32/pager.c:475
-#: src/library/utils/src/windows/dataentry.c:1705
-#: src/library/utils/src/windows/dataentry.c:1792
+#: src/gnuwin32/pager.c:311 src/gnuwin32/pager.c:474
+#: src/library/utils/src/windows/dataentry.c:1706
+#: src/library/utils/src/windows/dataentry.c:1793
 msgid "Close"
 msgstr "Luk"
 
-#: src/gnuwin32/pager.c:472 src/gnuwin32/rui.c:1139
+#: src/gnuwin32/pager.c:471 src/gnuwin32/rui.c:1139
 msgid "Save to File..."
 msgstr "Gem til fil..."
 
-#: src/gnuwin32/pager.c:487 src/gnuwin32/rui.c:1156
+#: src/gnuwin32/pager.c:486 src/gnuwin32/rui.c:1156
 msgid "View"
 msgstr "Vis"
 
-#: src/gnuwin32/pager.c:519
+#: src/gnuwin32/pager.c:518
 msgid "Unable to create pager window"
 msgstr "Kan ikke oprette fremviservindue"
 
@@ -617,7 +618,8 @@ msgid "Update packages..."
 msgstr "Opdater pakker..."
 
 #: src/gnuwin32/rui.c:920
-msgid "Install package(s) from local zip files..."
+#, fuzzy
+msgid "Install package(s) from local files..."
 msgstr "Installer pakker fra lokale zip-filer..."
 
 #: src/gnuwin32/rui.c:944
@@ -785,53 +787,53 @@ msgstr "Vis søge&sti"
 msgid "Console"
 msgstr "Konsol"
 
-#: src/gnuwin32/rui.c:1268
+#: src/gnuwin32/rui.c:1251
 msgid "'mname' is limited to 1000 bytes"
 msgstr "»mname« er begrænset til 1.000 byte"
 
-#: src/gnuwin32/rui.c:1310
+#: src/gnuwin32/rui.c:1293
 #, c-format
 msgid "menu %s does not exist"
 msgstr "menu %s findes ikke"
 
-#: src/gnuwin32/rui.c:1363
+#: src/gnuwin32/rui.c:1346
 msgid "'menu' is limited to 500 bytes"
 msgstr "»menu« er begrænset til 500 byte"
 
-#: src/gnuwin32/rui.c:1373
+#: src/gnuwin32/rui.c:1356
 msgid "base menu does not exist"
 msgstr "basemenu findes ikke"
 
-#: src/gnuwin32/rui.c:1388
+#: src/gnuwin32/rui.c:1371
 msgid "failed to allocate menu"
 msgstr "kunne ikke allokere menu"
 
-#: src/gnuwin32/rui.c:1405 src/gnuwin32/rui.c:1529
+#: src/gnuwin32/rui.c:1388 src/gnuwin32/rui.c:1512
 msgid "menu + item is limited to 1000 bytes"
 msgstr "menu + punkt er begrænset til 1.000 byte"
 
-#: src/gnuwin32/rui.c:1413 src/gnuwin32/rui.c:1496
+#: src/gnuwin32/rui.c:1396 src/gnuwin32/rui.c:1479
 msgid "menu does not exist"
 msgstr "menu findes ikke"
 
-#: src/gnuwin32/rui.c:1431 src/gnuwin32/rui.c:1454 src/gnuwin32/rui.c:1459
+#: src/gnuwin32/rui.c:1414 src/gnuwin32/rui.c:1437 src/gnuwin32/rui.c:1442
 msgid "failed to allocate char storage"
 msgstr "kunne ikke allokere tegnlager"
 
 # engelsk fejl menuitem -> menu item
-#: src/gnuwin32/rui.c:1467
+#: src/gnuwin32/rui.c:1450
 msgid "failed to allocate menuitem"
 msgstr "kunne ikke allokere menuitem"
 
-#: src/gnuwin32/rui.c:1519
+#: src/gnuwin32/rui.c:1502
 msgid "menu not found"
 msgstr "menu ikke fundet"
 
-#: src/gnuwin32/rui.c:1537
+#: src/gnuwin32/rui.c:1520
 msgid "menu or item does not exist"
 msgstr "menu eller punkt findes ikke"
 
-#: src/gnuwin32/system.c:442
+#: src/gnuwin32/system.c:446
 msgid "Save workspace image?"
 msgstr "Gem arbejdsrumsbillede?"
 
@@ -839,41 +841,41 @@ msgstr "Gem arbejdsrumsbillede?"
 msgid "Insufficient memory: cell not copied to the clipboard"
 msgstr "Utilstrækkelig hukommelse: Celle ikke kopieret til udklipsholderen"
 
-#: src/extra/graphapp/dialogs.c:147 src/extra/graphapp/dialogs.c:164
-#: src/extra/graphapp/dialogs.c:181
+#: src/extra/graphapp/dialogs.c:148 src/extra/graphapp/dialogs.c:165
+#: src/extra/graphapp/dialogs.c:182
 msgid "Question"
 msgstr "Spørgsmål"
 
-#: src/extra/graphapp/dialogs.c:202
+#: src/extra/graphapp/dialogs.c:203
 msgid " Change working directory to:"
 msgstr " Ændr arbejdsmappe til:"
 
-#: src/extra/graphapp/dialogs.c:205
+#: src/extra/graphapp/dialogs.c:206
 #, c-format
 msgid "Unable to set '%s' as working directory"
 msgstr "Kan ikke angive »%s« som arbejdsmappe"
 
-#: src/extra/graphapp/dialogs.c:602 src/extra/graphapp/dialogs.c:620
-#: src/extra/graphapp/dialogs.c:626 src/extra/graphapp/dialogs.c:725
-#: src/extra/graphapp/dialogs.c:739 src/extra/graphapp/dialogs.c:745
+#: src/extra/graphapp/dialogs.c:604 src/extra/graphapp/dialogs.c:622
+#: src/extra/graphapp/dialogs.c:628 src/extra/graphapp/dialogs.c:727
+#: src/extra/graphapp/dialogs.c:741 src/extra/graphapp/dialogs.c:747
 #: src/library/utils/src/windows/widgets.c:125
 msgid "Cancel"
 msgstr "Afbryd"
 
-#: src/extra/graphapp/dialogs.c:622 src/extra/graphapp/dialogs.c:741
+#: src/extra/graphapp/dialogs.c:624 src/extra/graphapp/dialogs.c:743
 #: src/library/utils/src/windows/widgets.c:124
 msgid "OK"
 msgstr "O.k."
 
-#: src/extra/graphapp/dialogs.c:733
+#: src/extra/graphapp/dialogs.c:735
 msgid "User"
 msgstr "Bruger"
 
-#: src/extra/graphapp/dialogs.c:734
+#: src/extra/graphapp/dialogs.c:736
 msgid "Password"
 msgstr "Adgangskode"
 
-#: src/extra/graphapp/dialogs.c:900 src/extra/graphapp/dialogs.c:906
+#: src/extra/graphapp/dialogs.c:902 src/extra/graphapp/dialogs.c:908
 #, c-format
 msgid "\"%s\" not found"
 msgstr "»%s« ikke fundet"
@@ -883,9 +885,9 @@ msgid "Arrange Icons"
 msgstr "Arrangere ikoner"
 
 #: src/library/utils/src/windows/dataentry.c:223
-#: src/library/utils/src/windows/dataentry.c:1850
-#: src/library/utils/src/windows/dataentry.c:1853
-#: src/library/utils/src/windows/dataentry.c:1884
+#: src/library/utils/src/windows/dataentry.c:1851
+#: src/library/utils/src/windows/dataentry.c:1854
+#: src/library/utils/src/windows/dataentry.c:1885
 msgid "invalid argument"
 msgstr "ugyldig argument"
 
@@ -897,17 +899,12 @@ msgstr "ugyldig type for værdi"
 msgid "Data Editor"
 msgstr "Dataredigeringsprogram"
 
-#: src/library/utils/src/windows/dataentry.c:282
-#: src/library/utils/src/windows/dataentry.c:1891
-msgid "invalid device"
-msgstr "ugyldig enhed"
-
 #: src/library/utils/src/windows/dataentry.c:331
 msgid "dataentry: internal memory problem"
 msgstr "datapost: Internt hukommelsesproblem"
 
 #: src/library/utils/src/windows/dataentry.c:634
-#: src/library/utils/src/windows/dataentry.c:1221
+#: src/library/utils/src/windows/dataentry.c:1222
 msgid "dataentry: internal memory error"
 msgstr "datapost: Intern hukommelsesfejl"
 
@@ -916,44 +913,44 @@ msgstr "datapost: Intern hukommelsesfejl"
 msgid "internal type error in dataentry"
 msgstr "intern typefejl i datapost"
 
-#: src/library/utils/src/windows/dataentry.c:852
+#: src/library/utils/src/windows/dataentry.c:853
 msgid "dataentry: parse error on string"
 msgstr "datapost: Fortolk fejl på streng"
 
-#: src/library/utils/src/windows/dataentry.c:995
+#: src/library/utils/src/windows/dataentry.c:996
 msgid "dataentry: expression too long"
 msgstr "datapost: Udtryk er for langt"
 
-#: src/library/utils/src/windows/dataentry.c:1472
+#: src/library/utils/src/windows/dataentry.c:1473
 msgid "column names cannot be blank"
 msgstr "kolonnenavne kan ikke være tomme"
 
-#: src/library/utils/src/windows/dataentry.c:1518
+#: src/library/utils/src/windows/dataentry.c:1519
 msgid "Variable editor"
 msgstr "Redigeringsprogram for variabler"
 
-#: src/library/utils/src/windows/dataentry.c:1523
+#: src/library/utils/src/windows/dataentry.c:1524
 msgid "variable name"
 msgstr "variabelnavn"
 
-#: src/library/utils/src/windows/dataentry.c:1525
+#: src/library/utils/src/windows/dataentry.c:1526
 msgid "type"
 msgstr "type"
 
-#: src/library/utils/src/windows/dataentry.c:1639
+#: src/library/utils/src/windows/dataentry.c:1640
 msgid "Cell width(s)"
 msgstr "Cellebredder"
 
-#: src/library/utils/src/windows/dataentry.c:1645
+#: src/library/utils/src/windows/dataentry.c:1646
 msgid "Cell width"
 msgstr "Cellebredde"
 
-#: src/library/utils/src/windows/dataentry.c:1648
+#: src/library/utils/src/windows/dataentry.c:1649
 msgid "variable"
 msgstr "variabel"
 
 # engelsk fejl, spørg om maks 80 tegn.
-#: src/library/utils/src/windows/dataentry.c:1691
+#: src/library/utils/src/windows/dataentry.c:1692
 msgid ""
 "Navigation.\n"
 "  Keyboard: cursor keys move selection\n"
@@ -996,220 +993,222 @@ msgstr ""
 "kolonne\n"
 "\n"
 
-#: src/library/utils/src/windows/dataentry.c:1699
+#: src/library/utils/src/windows/dataentry.c:1700
 msgid "Copy selected cell"
 msgstr "Kopier valgt celle"
 
-#: src/library/utils/src/windows/dataentry.c:1700
+#: src/library/utils/src/windows/dataentry.c:1701
 msgid "Paste to selected cell"
 msgstr "Indsæt til valgt celle"
 
-#: src/library/utils/src/windows/dataentry.c:1701
+#: src/library/utils/src/windows/dataentry.c:1702
 msgid "Autosize column"
 msgstr "Automatisk størrelse på kolonne"
 
-#: src/library/utils/src/windows/dataentry.c:1797
+#: src/library/utils/src/windows/dataentry.c:1798
 msgid "Copy  \tCTRL+C"
 msgstr "Kopier  \tCTRL+C"
 
-#: src/library/utils/src/windows/dataentry.c:1799
+#: src/library/utils/src/windows/dataentry.c:1800
 msgid "Paste \tCTRL+V"
 msgstr "Indsæt \tCTRL+V"
 
-#: src/library/utils/src/windows/dataentry.c:1801
+#: src/library/utils/src/windows/dataentry.c:1802
 msgid "Delete\tDEL"
 msgstr "Slet\tDEL"
 
-#: src/library/utils/src/windows/dataentry.c:1804
+#: src/library/utils/src/windows/dataentry.c:1805
 msgid "Cell widths ..."
 msgstr "Cellebredder..."
 
-#: src/library/utils/src/windows/dataentry.c:1808
+#: src/library/utils/src/windows/dataentry.c:1809
 msgid "Data editor"
 msgstr "Redigeringsprogram for data"
 
-#: src/library/grDevices/src/devWindows.c:932
+#: src/library/grDevices/src/devWindows.c:949
 msgid "Portable network graphics file"
 msgstr "Portable network graphics-fil"
 
-#: src/library/grDevices/src/devWindows.c:935
+#: src/library/grDevices/src/devWindows.c:952
 msgid "Windows bitmap file"
 msgstr "Windows bitmap-fil"
 
-#: src/library/grDevices/src/devWindows.c:938
+#: src/library/grDevices/src/devWindows.c:955
 msgid "TIFF file"
 msgstr "TIFF-fil"
 
-#: src/library/grDevices/src/devWindows.c:941
+#: src/library/grDevices/src/devWindows.c:958
 msgid "Jpeg file"
 msgstr "Jpeg-fil"
 
-#: src/library/grDevices/src/devWindows.c:963
+#: src/library/grDevices/src/devWindows.c:980
 msgid "Postscript file"
 msgstr "Postscript-fil"
 
-#: src/library/grDevices/src/devWindows.c:975
+#: src/library/grDevices/src/devWindows.c:992
 msgid "PDF file"
 msgstr "PDF-fil"
 
-#: src/library/grDevices/src/devWindows.c:987
+#: src/library/grDevices/src/devWindows.c:1004
 msgid "Enhanced metafiles"
 msgstr "Forbedrede metafiler"
 
-#: src/library/grDevices/src/devWindows.c:990
-#: src/library/grDevices/src/devWindows.c:3436
+#: src/library/grDevices/src/devWindows.c:1007
+#: src/library/grDevices/src/devWindows.c:3445
 msgid "file path selected is too long: only 512 bytes are allowed"
 msgstr "den valgte filsti er for langt: Kun 512 byte er tilladt"
 
-#: src/library/grDevices/src/devWindows.c:1201
+#: src/library/grDevices/src/devWindows.c:1218
 msgid "No plot to replace!"
 msgstr "Intet plot at erstatte!"
 
-#: src/library/grDevices/src/devWindows.c:1249
+#: src/library/grDevices/src/devWindows.c:1268
 msgid "Variable name"
 msgstr "Variabelnavn"
 
-#: src/library/grDevices/src/devWindows.c:1258
+#: src/library/grDevices/src/devWindows.c:1277
 msgid "Variable doesn't contain any plots!"
 msgstr "Variabel indeholder ingen plot!"
 
-#: src/library/grDevices/src/devWindows.c:1273
+#: src/library/grDevices/src/devWindows.c:1292
 msgid "Name of variable to save to"
 msgstr "Navn på variabel at gemme til"
 
-#: src/library/grDevices/src/devWindows.c:1582
+#: src/library/grDevices/src/devWindows.c:1601
 msgid "Copy to the clipboard as a metafile"
 msgstr "Kopier til udklipsholderen som en metafil"
 
-#: src/library/grDevices/src/devWindows.c:1600
-#: src/library/grDevices/src/devWindows.c:1611
+#: src/library/grDevices/src/devWindows.c:1619
+#: src/library/grDevices/src/devWindows.c:1630
 msgid "Stop locator"
 msgstr "Stop lokalisering"
 
-#: src/library/grDevices/src/devWindows.c:1610
-#: src/library/grDevices/src/devWindows.c:1614
+#: src/library/grDevices/src/devWindows.c:1629
+#: src/library/grDevices/src/devWindows.c:1633
 msgid "Stop"
 msgstr "Stop"
 
-#: src/library/grDevices/src/devWindows.c:1616
+#: src/library/grDevices/src/devWindows.c:1635
 msgid "Continue"
 msgstr "Fortsæt"
 
-#: src/library/grDevices/src/devWindows.c:1620
+#: src/library/grDevices/src/devWindows.c:1639
 msgid "Next"
 msgstr "Næste"
 
-#: src/library/grDevices/src/devWindows.c:1621
+#: src/library/grDevices/src/devWindows.c:1640
 msgid "Next plot"
 msgstr "Næste plot"
 
-#: src/library/grDevices/src/devWindows.c:1627
+#: src/library/grDevices/src/devWindows.c:1646
 msgid "Save as"
 msgstr "Gem som"
 
-#: src/library/grDevices/src/devWindows.c:1636
-#: src/library/grDevices/src/devWindows.c:1638
-#: src/library/grDevices/src/devWindows.c:1640
+#: src/library/grDevices/src/devWindows.c:1655
+#: src/library/grDevices/src/devWindows.c:1657
+#: src/library/grDevices/src/devWindows.c:1659
 #, c-format
 msgid "%s quality..."
 msgstr "%s kvalitet..."
 
-#: src/library/grDevices/src/devWindows.c:1642
+#: src/library/grDevices/src/devWindows.c:1661
 msgid "Copy to the clipboard"
 msgstr "Kopier til udklipsholderen"
 
-#: src/library/grDevices/src/devWindows.c:1643
+#: src/library/grDevices/src/devWindows.c:1662
 msgid "as a Bitmap\tCTRL+C"
 msgstr "som en bitmap\tCTRL+C"
 
-#: src/library/grDevices/src/devWindows.c:1644
+#: src/library/grDevices/src/devWindows.c:1663
 msgid "as a Metafile\tCTRL+W"
 msgstr "som en metafil\tCTRL+W"
 
-#: src/library/grDevices/src/devWindows.c:1647
-msgid "Print...\tCTRL+P"
-msgstr "Udskriv...\tCTRL+P"
-
-#: src/library/grDevices/src/devWindows.c:1649
+#: src/library/grDevices/src/devWindows.c:1668
 msgid "close Device"
 msgstr "luk enhed"
 
-#: src/library/grDevices/src/devWindows.c:1650
+#: src/library/grDevices/src/devWindows.c:1669
 msgid "History"
 msgstr "Historik"
 
-#: src/library/grDevices/src/devWindows.c:1651
+#: src/library/grDevices/src/devWindows.c:1670
 msgid "Recording"
 msgstr "Optager"
 
-#: src/library/grDevices/src/devWindows.c:1654
+#: src/library/grDevices/src/devWindows.c:1673
 msgid "Add\tINS"
 msgstr "Tilføj\tINS"
 
-#: src/library/grDevices/src/devWindows.c:1655
+#: src/library/grDevices/src/devWindows.c:1674
 msgid "Replace"
 msgstr "Erstat"
 
-#: src/library/grDevices/src/devWindows.c:1657
+#: src/library/grDevices/src/devWindows.c:1676
 msgid "Previous\tPgUp"
 msgstr "Forrige\tPgUp"
 
-#: src/library/grDevices/src/devWindows.c:1658
+#: src/library/grDevices/src/devWindows.c:1677
 msgid "Next\tPgDown"
 msgstr "Næste\tPgDown"
 
-#: src/library/grDevices/src/devWindows.c:1660
+#: src/library/grDevices/src/devWindows.c:1679
 msgid "Save to variable..."
 msgstr "Gem til variabel..."
 
-#: src/library/grDevices/src/devWindows.c:1661
+#: src/library/grDevices/src/devWindows.c:1680
 msgid "Get from variable..."
 msgstr "Hent fra variabel..."
 
-#: src/library/grDevices/src/devWindows.c:1663
+#: src/library/grDevices/src/devWindows.c:1682
 msgid "Clear history"
 msgstr "Ryd historik"
 
-#: src/library/grDevices/src/devWindows.c:1664
+#: src/library/grDevices/src/devWindows.c:1683
 msgid "Resize"
 msgstr "Ændr størrelse"
 
-#: src/library/grDevices/src/devWindows.c:1665
+#: src/library/grDevices/src/devWindows.c:1684
 msgid "R mode"
 msgstr "R-tilstand"
 
-#: src/library/grDevices/src/devWindows.c:1667
+#: src/library/grDevices/src/devWindows.c:1686
 msgid "Fit to window"
 msgstr "Tilpas til vindue"
 
-#: src/library/grDevices/src/devWindows.c:1669
+#: src/library/grDevices/src/devWindows.c:1688
 msgid "Fixed size"
 msgstr "Fast størrelse"
 
-#: src/library/grDevices/src/devWindows.c:1676
+#: src/library/grDevices/src/devWindows.c:1695
 msgid "Copy as metafile"
 msgstr "Kopier som metafil"
 
-#: src/library/grDevices/src/devWindows.c:1678
+#: src/library/grDevices/src/devWindows.c:1697
 msgid "Copy as bitmap"
 msgstr "Kopier som bitmap"
 
-#: src/library/grDevices/src/devWindows.c:1681
+#: src/library/grDevices/src/devWindows.c:1700
 msgid "Save as metafile..."
 msgstr "Gem som metafil..."
 
-#: src/library/grDevices/src/devWindows.c:1683
+#: src/library/grDevices/src/devWindows.c:1702
 msgid "Save as postscript..."
 msgstr "Gem som postscript..."
 
-#: src/library/grDevices/src/devWindows.c:3136
+#: src/library/grDevices/src/devWindows.c:3143
 msgid "Locator is active"
 msgstr "Lokalisering er aktiv"
 
-#: src/library/grDevices/src/devWindows.c:3763
+#: src/library/grDevices/src/devWindows.c:3769
 msgid "Waiting to confirm page change..."
 msgstr "Venter på at bekræfte sideændring..."
 
-#: src/library/grDevices/src/devWindows.c:3775
+#: src/library/grDevices/src/devWindows.c:3781
 msgid "Click or hit ENTER for next page"
 msgstr "Klik eller tryk på RETUR for næste side"
+
+#~ msgid "Print...\tCTRL+P"
+#~ msgstr "Udskriv...\tCTRL+P"
+
+#~ msgid "invalid device"
+#~ msgstr "ugyldig enhed"
diff --git a/src/library/base/po/RGui-de.po b/src/library/base/po/RGui-de.po
index d89951d..67f0789 100644
--- a/src/library/base/po/RGui-de.po
+++ b/src/library/base/po/RGui-de.po
@@ -7,11 +7,11 @@ msgid ""
 msgstr ""
 "Project-Id-Version: R-3.1.0\n"
 "Report-Msgid-Bugs-To: bugs.r-project.org\n"
-"POT-Creation-Date: 2013-03-18 19:36+0000\n"
-"PO-Revision-Date: 2013-03-18 10:12+0100\n"
+"POT-Creation-Date: 2015-02-09 08:52+0000\n"
+"PO-Revision-Date: 2016-04-07 11:28+0200\n"
 "Last-Translator: Detlef Steuer <steuer at hsu-hh.de>\n"
 "Language-Team: R-core <R-core at r-project.org>\n"
-"Language: \n"
+"Language: de\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=ISO-8859-1\n"
 "Content-Transfer-Encoding: 8bit\n"
@@ -23,18 +23,18 @@ msgstr "Nicht gen
 
 #: src/gnuwin32/console.c:1256 src/gnuwin32/console.c:1260
 msgid "Insufficient memory: text not copied to the clipboard"
-msgstr "Nicht gen�gend Speicher: Text nicht in Zwischenablege kopiert"
+msgstr "Nicht gen�gend Speicher: Text nicht in Zwischenablage kopiert"
 
 #: src/gnuwin32/console.c:1296 src/extra/graphapp/clipboard.c:53
 #: src/extra/graphapp/clipboard.c:79
 msgid "Unable to open the clipboard"
 msgstr "Kann Zwischenablage nicht �ffnen"
 
-#: src/gnuwin32/console.c:1914
+#: src/gnuwin32/console.c:1917
 msgid "Insufficient memory. Please close the console"
 msgstr "Nicht gen�gend Speicher. Bitte Konsole schlie�en"
 
-#: src/gnuwin32/console.c:1969 src/gnuwin32/console.c:2022
+#: src/gnuwin32/console.c:1972 src/gnuwin32/console.c:2026
 #: src/gnuwin32/preferences.c:333
 #, c-format
 msgid ""
@@ -44,23 +44,23 @@ msgstr ""
 "Schrift %s-%d-%d nicht gefunden.\n"
 "Nutze fixed Systemschrift"
 
-#: src/gnuwin32/console.c:2127
+#: src/gnuwin32/console.c:2131
 msgid "Save selection to"
 msgstr "Speichere Auswahl nach"
 
-#: src/gnuwin32/console.c:2129
+#: src/gnuwin32/console.c:2133
 msgid "Save console contents to"
 msgstr "Speichere Konsoleninhalt nach"
 
-#: src/gnuwin32/console.c:2228
+#: src/gnuwin32/console.c:2232
 msgid "Scrolling.\n"
 msgstr "Scrolling.\n"
 
-#: src/gnuwin32/console.c:2229
+#: src/gnuwin32/console.c:2233
 msgid "  Keyboard: PgUp, PgDown, Ctrl+Arrows, Ctrl+Home, Ctrl+End,\n"
 msgstr "  Tastatur: PgUp, PgDown, Strg+Arrows, Strg+Home, Strg+End,\n"
 
-#: src/gnuwin32/console.c:2230
+#: src/gnuwin32/console.c:2234
 msgid ""
 "  Mouse: use the scrollbar(s).\n"
 "\n"
@@ -68,76 +68,76 @@ msgstr ""
 " Maus: nutze die Scrollbar(s).\n"
 "\n"
 
-#: src/gnuwin32/console.c:2231
+#: src/gnuwin32/console.c:2235
 msgid "Editing.\n"
 msgstr "Bearbeiten.\n"
 
-#: src/gnuwin32/console.c:2232
+#: src/gnuwin32/console.c:2236
 msgid "  Moving the cursor: \n"
 msgstr "  Bewege den Cursor: \n"
 
-#: src/gnuwin32/console.c:2233
+#: src/gnuwin32/console.c:2237
 msgid "     Left arrow or Ctrl+B: move backward one character;\n"
 msgstr "     Linker Pfeil oder Strg+B: ein Zeichen zur�ck;\n"
 
-#: src/gnuwin32/console.c:2234
+#: src/gnuwin32/console.c:2238
 msgid "     Right arrow or Ctrl+F: move forward one character;\n"
 msgstr "     Rechter Pfeil oder Strg+F: ein Zeichen vorw�rts;\n"
 
-#: src/gnuwin32/console.c:2235
+#: src/gnuwin32/console.c:2239
 msgid "     Home or Ctrl+A: go to beginning of line;\n"
 msgstr "     Pos1 oder Strg+A: gehe zum Zeilenanfang;\n"
 
-#: src/gnuwin32/console.c:2236
+#: src/gnuwin32/console.c:2240
 msgid "     End or Ctrl+E: go to end of line;\n"
 msgstr "     Ende oder Strg+E: gehe zum Zeilenende;\n"
 
-#: src/gnuwin32/console.c:2237
+#: src/gnuwin32/console.c:2241
 msgid "  History: Up and Down Arrows, Ctrl+P, Ctrl+N\n"
 msgstr "  History: Pfeile hoch und runter, Strg+P, Strg+N\n"
 
-#: src/gnuwin32/console.c:2238
+#: src/gnuwin32/console.c:2242
 msgid "  Deleting:\n"
 msgstr "  L�sche:\n"
 
-#: src/gnuwin32/console.c:2239
+#: src/gnuwin32/console.c:2243
 msgid "     Del or Ctrl+D: delete current character or selection;\n"
 msgstr "     Entf oder Strg+D: l�sche aktuelles Zeichen oder Auswahl;\n"
 
-#: src/gnuwin32/console.c:2240
+#: src/gnuwin32/console.c:2244
 msgid "     Backspace: delete preceding character;\n"
 msgstr "     Backspace: l�sche vorhergehendes Zeichen;\n"
 
-#: src/gnuwin32/console.c:2241
+#: src/gnuwin32/console.c:2245
 msgid ""
 "     Ctrl+Del or Ctrl+K: delete text from current character to end of line.\n"
 msgstr ""
 "     Strg+Entf oder Strg+K: l�sche Text vom aktuellen Zeichen bis zum "
 "Zeilenende.\n"
 
-#: src/gnuwin32/console.c:2242
+#: src/gnuwin32/console.c:2246
 msgid "     Ctrl+U: delete all text from current line.\n"
 msgstr "     Strg+U: l�sche den Text der aktuellen Zeile.\n"
 
-#: src/gnuwin32/console.c:2243
+#: src/gnuwin32/console.c:2247
 msgid "  Copy and paste.\n"
 msgstr "  Copy und Paste.\n"
 
-#: src/gnuwin32/console.c:2244
+#: src/gnuwin32/console.c:2248
 msgid ""
 "     Use the mouse (with the left button held down) to mark (select) text.\n"
 msgstr ""
 "     Nutze die Maus (linke Taste gedr�ckt) um Text zu markieren "
 "(auszuw�hlen).\n"
 
-#: src/gnuwin32/console.c:2245
+#: src/gnuwin32/console.c:2249
 msgid ""
 "     Use Shift+Del (or Ctrl+C) to copy the marked text to the clipboard and\n"
 msgstr ""
 "     Nutzte Shift+Entf (oder Strg+C) um markierten Text in die "
 "Zwischenablage zu kopieren und\n"
 
-#: src/gnuwin32/console.c:2246
+#: src/gnuwin32/console.c:2250
 msgid ""
 "     Shift+Ins (or Ctrl+V or Ctrl+Y) to paste the content of the clipboard "
 "(if any)  \n"
@@ -145,29 +145,29 @@ msgstr ""
 "     Shift+Einf (oder Strg+V oder Strg+Y) um den Inhalt der Zwischenablage "
 "einzuf�gen (falls nicht leer)  \n"
 
-#: src/gnuwin32/console.c:2247
+#: src/gnuwin32/console.c:2251
 msgid "     to the console, Ctrl+X first copy then paste\n"
 msgstr "     an die Konsole, Strg+X zuerst copy, dann paste\n"
 
-#: src/gnuwin32/console.c:2248
+#: src/gnuwin32/console.c:2252
 msgid "  Misc:\n"
 msgstr "  Verschiedenes:\n"
 
-#: src/gnuwin32/console.c:2249
+#: src/gnuwin32/console.c:2253
 msgid "     Ctrl+L: Clear the console.\n"
 msgstr "     Strg+L: Leere die Konsole.\n"
 
-#: src/gnuwin32/console.c:2250
+#: src/gnuwin32/console.c:2254
 msgid "     Ctrl+O or INS: Toggle overwrite mode: initially off.\n"
 msgstr ""
 "     Strg+O: Zwischen �berschreiben und Einf�gen hin und herschalten, steht "
 "anfangs auf Einf�gen.\n"
 
-#: src/gnuwin32/console.c:2251
+#: src/gnuwin32/console.c:2255
 msgid "     Ctrl+T: Interchange current char with one to the left.\n"
 msgstr "     Strg+T: Tausche aktuelles Zeichen mit dem links daneben.\n"
 
-#: src/gnuwin32/console.c:2252
+#: src/gnuwin32/console.c:2256
 msgid ""
 "\n"
 "Note: Console is updated only when some input is required.\n"
@@ -175,7 +175,7 @@ msgstr ""
 "\n"
 "Bemerkung: Konsole wird nur aktualisiert, wenn eine Eingabe erwartet wird.\n"
 
-#: src/gnuwin32/console.c:2253
+#: src/gnuwin32/console.c:2257
 msgid ""
 "  Use Ctrl+W to toggle this feature off/on.\n"
 "\n"
@@ -183,7 +183,7 @@ msgstr ""
 " Nutze Strg+W um dieses Feature an- und auszuschalten.\n"
 "\n"
 
-#: src/gnuwin32/console.c:2254
+#: src/gnuwin32/console.c:2258
 msgid ""
 "Use ESC to stop the interpreter.\n"
 "\n"
@@ -191,7 +191,7 @@ msgstr ""
 "Nutze ESC um den Interpreter zu stoppen.\n"
 "\n"
 
-#: src/gnuwin32/console.c:2255
+#: src/gnuwin32/console.c:2259
 msgid ""
 "TAB starts completion of the current word.\n"
 "\n"
@@ -199,271 +199,271 @@ msgstr ""
 "TAB startet Vervollst�ndigung des aktuellen Wortes.\n"
 "\n"
 
-#: src/gnuwin32/console.c:2256
+#: src/gnuwin32/console.c:2260
 msgid "Standard Windows hotkeys can be used to switch to the\n"
 msgstr ""
 "Die �blichen Windowos short-cuts k�nnen benutzt werden um umzuschalten zum\n"
 
-#: src/gnuwin32/console.c:2257
+#: src/gnuwin32/console.c:2261
 msgid "graphics device (Ctrl+Tab or Ctrl+F6 in MDI, Alt+Tab in SDI)"
 msgstr "Grafikdevice (Strg+Tab oder Strg+F6 in MDI, Alt+Tab in SDI)"
 
-#: src/gnuwin32/editor.c:88 src/gnuwin32/editor.c:90
+#: src/gnuwin32/editor.c:91 src/gnuwin32/editor.c:93
 msgid "R Editor"
 msgstr "R Editor"
 
-#: src/gnuwin32/editor.c:119
+#: src/gnuwin32/editor.c:123
 #, c-format
 msgid "unable to open file %s for reading"
 msgstr "Kann Datei %s nicht zum Lesen �ffnen"
 
-#: src/gnuwin32/editor.c:135
+#: src/gnuwin32/editor.c:139
 #, c-format
 msgid "Could not read from file '%s'"
 msgstr "Konnte nicht aus Datei '%s' lesen"
 
-#: src/gnuwin32/editor.c:166
+#: src/gnuwin32/editor.c:171
 #, c-format
 msgid "Could not save file '%s'"
 msgstr "Konnte Datei '%s' nicht speichern"
 
-#: src/gnuwin32/editor.c:182
+#: src/gnuwin32/editor.c:187
 msgid "Save script as"
 msgstr "Speichere Skript unter"
 
-#: src/gnuwin32/editor.c:377 src/gnuwin32/editor.c:694
-#: src/gnuwin32/pager.c:431 src/gnuwin32/rui.c:1076
+#: src/gnuwin32/editor.c:379 src/gnuwin32/editor.c:696
+#: src/gnuwin32/pager.c:430 src/gnuwin32/rui.c:1076
 msgid "Open script"
 msgstr "�ffne Skript"
 
-#: src/gnuwin32/editor.c:500 src/gnuwin32/pager.c:185 src/gnuwin32/pager.c:205
+#: src/gnuwin32/editor.c:502 src/gnuwin32/pager.c:184 src/gnuwin32/pager.c:204
 msgid "No RGui console to paste to"
 msgstr "Keine RGui Konsole um dort einzuf�gen"
 
-#: src/gnuwin32/editor.c:602
+#: src/gnuwin32/editor.c:604
 msgid "R EDITOR\n"
 msgstr "R Editor\n"
 
-#: src/gnuwin32/editor.c:604
+#: src/gnuwin32/editor.c:606
 msgid "A standard text editor for editing and running R code.\n"
-msgstr "Ein Standardtexteditor zum Bearbeiten und Laufen lassen von R Code.\n"
+msgstr "Ein Standardtexteditor zum Bearbeiten und Ausf�hren lassen von R Code.\n"
 
-#: src/gnuwin32/editor.c:606
+#: src/gnuwin32/editor.c:608
 msgid "RUNNING COMMANDS\n"
 msgstr "Befehle ausf�hren\n"
 
-#: src/gnuwin32/editor.c:607
+#: src/gnuwin32/editor.c:609
 msgid "To run a line or section of R code, select the code and either\n"
 msgstr ""
 "Um eine Zeile oder einen Abschnitt R Code auszuf�hren, markiere den Code und "
 "entweder\n"
 
-#: src/gnuwin32/editor.c:608
+#: src/gnuwin32/editor.c:610
 msgid "     Press Ctrl-R\n"
 msgstr "     dr�cke Strg+R\n"
 
-#: src/gnuwin32/editor.c:609
+#: src/gnuwin32/editor.c:611
 msgid "     Select \"Run line or selection\" from the \"Edit\" menu\n"
 msgstr ""
 "     w�hle \"Ausf�hrung Zeile oder Auswahl\" aus dem \"Bearbeiten\" Men�\n"
 
-#: src/gnuwin32/editor.c:610
+#: src/gnuwin32/editor.c:612
 msgid "     Press the \"Run line or selection\" icon on the toolbar\n"
 msgstr ""
 "     dr�cke das \"Ausf�hrung Zeile oder Auswahl\" Icon in der Toolbar\n"
 
-#: src/gnuwin32/editor.c:611
+#: src/gnuwin32/editor.c:613
 msgid ""
 "This will copy the selected commands to the console and evaluate them.\n"
 msgstr ""
 "Dieses kopiert die ausgew�hlten Kommandos in die Konsole und f�hrt sie aus.\n"
 
-#: src/gnuwin32/editor.c:612
+#: src/gnuwin32/editor.c:614
 msgid ""
 "If there is no selection, this will just run the current line and advance\n"
 msgstr ""
 "Ohne markierten Text wird die aktuelle Zeile ausgef�hrt und der Cursor\n"
 
-#: src/gnuwin32/editor.c:613
+#: src/gnuwin32/editor.c:615
 msgid "the cursor by one line.\n"
 msgstr "in die n�chste Zeile gesetzt.\n"
 
-#: src/gnuwin32/editor.c:625 src/gnuwin32/editor.c:702
-#: src/gnuwin32/editor.c:760
+#: src/gnuwin32/editor.c:627 src/gnuwin32/editor.c:704
+#: src/gnuwin32/editor.c:762
 msgid "Run line or selection"
 msgstr "Ausf�hrung Zeile oder Auswahl"
 
-#: src/gnuwin32/editor.c:627 src/gnuwin32/editor.c:745
+#: src/gnuwin32/editor.c:629 src/gnuwin32/editor.c:747
 msgid "Undo"
 msgstr "R�ckg�ngig"
 
-#: src/gnuwin32/editor.c:629 src/gnuwin32/editor.c:748
+#: src/gnuwin32/editor.c:631 src/gnuwin32/editor.c:750
 msgid "Cut"
 msgstr "Ausschneiden"
 
-#: src/gnuwin32/editor.c:630 src/gnuwin32/editor.c:750
-#: src/gnuwin32/pager.c:305 src/gnuwin32/pager.c:478 src/gnuwin32/rui.c:859
+#: src/gnuwin32/editor.c:632 src/gnuwin32/editor.c:752
+#: src/gnuwin32/pager.c:304 src/gnuwin32/pager.c:477 src/gnuwin32/rui.c:859
 #: src/gnuwin32/rui.c:1088 src/gnuwin32/rui.c:1144
 msgid "Copy"
 msgstr "Kopieren"
 
-#: src/gnuwin32/editor.c:631 src/gnuwin32/editor.c:752 src/gnuwin32/rui.c:860
+#: src/gnuwin32/editor.c:633 src/gnuwin32/editor.c:754 src/gnuwin32/rui.c:860
 #: src/gnuwin32/rui.c:1092 src/gnuwin32/rui.c:1145
 msgid "Paste"
 msgstr "Einf�gen"
 
-#: src/gnuwin32/editor.c:632 src/gnuwin32/editor.c:754
+#: src/gnuwin32/editor.c:634 src/gnuwin32/editor.c:756
 msgid "Delete"
 msgstr "L�schen"
 
-#: src/gnuwin32/editor.c:634 src/gnuwin32/editor.c:756
-#: src/gnuwin32/pager.c:308 src/gnuwin32/pager.c:484 src/gnuwin32/rui.c:866
+#: src/gnuwin32/editor.c:636 src/gnuwin32/editor.c:758
+#: src/gnuwin32/pager.c:307 src/gnuwin32/pager.c:483 src/gnuwin32/rui.c:866
 #: src/gnuwin32/rui.c:1149
 msgid "Select all"
 msgstr "Alles ausw�hlen"
 
-#: src/gnuwin32/editor.c:698
+#: src/gnuwin32/editor.c:700
 msgid "Save script"
 msgstr "Speichere Skript"
 
-#: src/gnuwin32/editor.c:706 src/gnuwin32/pager.c:451
-#: src/library/grDevices/src/devWindows.c:1594
+#: src/gnuwin32/editor.c:708 src/gnuwin32/pager.c:450
+#: src/library/grDevices/src/devWindows.c:1613
 msgid "Return focus to Console"
 msgstr "Gebe Fokus an Konsole zur�ck"
 
-#: src/gnuwin32/editor.c:709
+#: src/gnuwin32/editor.c:711
 msgid "Print script"
 msgstr "Drucke Skript"
 
-#: src/gnuwin32/editor.c:711 src/gnuwin32/pager.c:446 src/gnuwin32/rui.c:1104
-#: src/library/grDevices/src/devWindows.c:1588
+#: src/gnuwin32/editor.c:713 src/gnuwin32/pager.c:445 src/gnuwin32/rui.c:1104
+#: src/library/grDevices/src/devWindows.c:1607
 msgid "Print"
 msgstr "Drucken"
 
-#: src/gnuwin32/editor.c:729 src/gnuwin32/pager.c:467 src/gnuwin32/rui.c:1122
-#: src/library/utils/src/windows/dataentry.c:1790
-#: src/library/grDevices/src/devWindows.c:1626
+#: src/gnuwin32/editor.c:731 src/gnuwin32/pager.c:466 src/gnuwin32/rui.c:1122
+#: src/library/utils/src/windows/dataentry.c:1791
+#: src/library/grDevices/src/devWindows.c:1645
 msgid "File"
 msgstr "Datei"
 
-#: src/gnuwin32/editor.c:730 src/gnuwin32/pager.c:468 src/gnuwin32/rui.c:1124
+#: src/gnuwin32/editor.c:732 src/gnuwin32/pager.c:467 src/gnuwin32/rui.c:1124
 msgid "New script"
 msgstr "Neues Skript"
 
-#: src/gnuwin32/editor.c:732 src/gnuwin32/pager.c:469 src/gnuwin32/rui.c:1125
+#: src/gnuwin32/editor.c:734 src/gnuwin32/pager.c:468 src/gnuwin32/rui.c:1125
 msgid "Open script..."
 msgstr "�ffne Skript..."
 
-#: src/gnuwin32/editor.c:734
+#: src/gnuwin32/editor.c:736
 msgid "Save"
 msgstr "Speichern"
 
-#: src/gnuwin32/editor.c:736
+#: src/gnuwin32/editor.c:738
 msgid "Save as..."
 msgstr "Speichern unter..."
 
-#: src/gnuwin32/editor.c:739 src/gnuwin32/pager.c:470 src/gnuwin32/rui.c:1138
-#: src/library/grDevices/src/devWindows.c:1689
+#: src/gnuwin32/editor.c:741 src/gnuwin32/pager.c:469 src/gnuwin32/rui.c:1138
+#: src/library/grDevices/src/devWindows.c:1708
 msgid "Print..."
 msgstr "Drucken..."
 
-#: src/gnuwin32/editor.c:742
+#: src/gnuwin32/editor.c:744
 msgid "Close script"
 msgstr "Schlie�e Skript"
 
-#: src/gnuwin32/editor.c:744 src/gnuwin32/pager.c:477 src/gnuwin32/rui.c:1143
-#: src/library/utils/src/windows/dataentry.c:1796
+#: src/gnuwin32/editor.c:746 src/gnuwin32/pager.c:476 src/gnuwin32/rui.c:1143
+#: src/library/utils/src/windows/dataentry.c:1797
 msgid "Edit"
 msgstr "Bearbeiten"
 
-#: src/gnuwin32/editor.c:758 src/gnuwin32/rui.c:1150
+#: src/gnuwin32/editor.c:760 src/gnuwin32/rui.c:1150
 msgid "Clear console"
 msgstr "Leere Konsole"
 
-#: src/gnuwin32/editor.c:762
+#: src/gnuwin32/editor.c:764
 msgid "Run all"
 msgstr "Alles ausf�hren"
 
-#: src/gnuwin32/editor.c:765
+#: src/gnuwin32/editor.c:767
 msgid "Find..."
 msgstr "Finde..."
 
-#: src/gnuwin32/editor.c:767
+#: src/gnuwin32/editor.c:769
 msgid "Replace..."
 msgstr "Ersetze..."
 
-#: src/gnuwin32/editor.c:770 src/gnuwin32/rui.c:1154
+#: src/gnuwin32/editor.c:772 src/gnuwin32/rui.c:1154
 msgid "GUI preferences..."
 msgstr "GUI Einstellungen..."
 
-#: src/gnuwin32/editor.c:780 src/gnuwin32/rui.c:1186
-#: src/library/utils/src/windows/dataentry.c:1697
-#: src/library/utils/src/windows/dataentry.c:1807
+#: src/gnuwin32/editor.c:782 src/gnuwin32/rui.c:1186
+#: src/library/utils/src/windows/dataentry.c:1698
+#: src/library/utils/src/windows/dataentry.c:1808
 msgid "Help"
 msgstr "Hilfe"
 
-#: src/gnuwin32/editor.c:781
+#: src/gnuwin32/editor.c:783
 msgid "Editor"
 msgstr "Editor"
 
-#: src/gnuwin32/editor.c:840
+#: src/gnuwin32/editor.c:842
 msgid "Maximum number of editors reached"
 msgstr "Maximale Anzahl von Editoren erreicht"
 
-#: src/gnuwin32/editor.c:845
+#: src/gnuwin32/editor.c:847
 msgid "Unable to create editor window"
 msgstr "Kann kein Editor-Fenster �ffnen"
 
-#: src/gnuwin32/editor.c:853
+#: src/gnuwin32/editor.c:855
 msgid "Untitled"
 msgstr "Namenlos"
 
-#: src/gnuwin32/extra.c:823 src/gnuwin32/rui.c:1224
+#: src/gnuwin32/extra.c:811
 msgid "Select file"
 msgstr "W�hle Datei"
 
-#: src/gnuwin32/pager.c:89
+#: src/gnuwin32/pager.c:88
 msgid "Error opening file"
 msgstr "Fehler beim Datei �ffnen"
 
-#: src/gnuwin32/pager.c:96
+#: src/gnuwin32/pager.c:95
 msgid "Insufficient memory to display file in internal pager"
 msgstr "Ungen�gend Speicher um Datei in interner Anzeige zu zeigen"
 
-#: src/gnuwin32/pager.c:177 src/gnuwin32/pager.c:189 src/gnuwin32/pager.c:209
+#: src/gnuwin32/pager.c:176 src/gnuwin32/pager.c:188 src/gnuwin32/pager.c:208
 #: src/gnuwin32/rui.c:237 src/gnuwin32/rui.c:264
 msgid "No selection"
 msgstr "Keine Auswahl"
 
-#: src/gnuwin32/pager.c:306 src/gnuwin32/pager.c:436 src/gnuwin32/pager.c:480
+#: src/gnuwin32/pager.c:305 src/gnuwin32/pager.c:435 src/gnuwin32/pager.c:479
 msgid "Paste to console"
 msgstr "Einf�gen in Konsole"
 
-#: src/gnuwin32/pager.c:307 src/gnuwin32/pager.c:441 src/gnuwin32/pager.c:482
+#: src/gnuwin32/pager.c:306 src/gnuwin32/pager.c:440 src/gnuwin32/pager.c:481
 msgid "Paste commands to console"
 msgstr "Einf�gen der Befehle in Konsole"
 
-#: src/gnuwin32/pager.c:310 src/gnuwin32/rui.c:869
-#: src/library/utils/src/windows/dataentry.c:1703
-#: src/library/grDevices/src/devWindows.c:1686
+#: src/gnuwin32/pager.c:309 src/gnuwin32/rui.c:869
+#: src/library/utils/src/windows/dataentry.c:1704
+#: src/library/grDevices/src/devWindows.c:1705
 msgid "Stay on top"
 msgstr "Bleibe im Vordergrund"
 
-#: src/gnuwin32/pager.c:312 src/gnuwin32/pager.c:475
-#: src/library/utils/src/windows/dataentry.c:1705
-#: src/library/utils/src/windows/dataentry.c:1792
+#: src/gnuwin32/pager.c:311 src/gnuwin32/pager.c:474
+#: src/library/utils/src/windows/dataentry.c:1706
+#: src/library/utils/src/windows/dataentry.c:1793
 msgid "Close"
 msgstr "Schlie�e"
 
-#: src/gnuwin32/pager.c:472 src/gnuwin32/rui.c:1139
+#: src/gnuwin32/pager.c:471 src/gnuwin32/rui.c:1139
 msgid "Save to File..."
 msgstr "Speichern in Datei..."
 
-#: src/gnuwin32/pager.c:487 src/gnuwin32/rui.c:1156
+#: src/gnuwin32/pager.c:486 src/gnuwin32/rui.c:1156
 msgid "View"
 msgstr "Ansehen"
 
-#: src/gnuwin32/pager.c:519
+#: src/gnuwin32/pager.c:518
 msgid "Unable to create pager window"
 msgstr "Kann Anzeigen-Fenster nicht �ffnen"
 
@@ -475,7 +475,7 @@ msgid ""
 "Save the preferences and restart Rgui to apply them.\n"
 msgstr ""
 "Die Eigenschaften der Konsole k�nnen nicht ge�ndert\n"
-"werden w�hrend die Konsole l�uft.\n"
+"werden, w�hrend die Konsole l�uft.\n"
 "\n"
 "Sichern Sie die Einstellungen und starten Sie Rgui neu.\n"
 
@@ -540,7 +540,7 @@ msgstr "Lade History aus"
 
 #: src/gnuwin32/rui.c:199
 msgid "Save history in"
-msgstr "Speicher History in"
+msgstr "Speichere History in"
 
 #: src/gnuwin32/rui.c:246 src/gnuwin32/rui.c:255
 msgid "No text available"
@@ -548,7 +548,7 @@ msgstr "Kein Text verf
 
 #: src/gnuwin32/rui.c:304
 msgid "Name of data frame or matrix"
-msgstr "Name von Data Frame oder Matrix"
+msgstr "Name von Dataframe oder Matrix"
 
 #: src/gnuwin32/rui.c:311
 #, c-format
@@ -569,7 +569,7 @@ msgstr "Durchsuche Hilfe"
 
 #: src/gnuwin32/rui.c:617
 msgid "Search for words in help list archives and documentation"
-msgstr "Suche nach den Worten in den Archiven von R-help und der Dokumentation"
+msgstr "Suche nach Begriffen in den Archiven von R-help und der Dokumentation"
 
 #: src/gnuwin32/rui.c:632
 msgid "Apropos"
@@ -769,7 +769,7 @@ msgstr "Wortvervollst
 
 #: src/gnuwin32/rui.c:1172
 msgid "Filename completion"
-msgstr "Dateinamenvervolst�ndigung"
+msgstr "Dateinamenvervollst�ndigung"
 
 #: src/gnuwin32/rui.c:1179
 msgid "List objects"
@@ -787,94 +787,94 @@ msgstr "Liste Suchpfad auf"
 msgid "Console"
 msgstr "Konsole"
 
-#: src/gnuwin32/rui.c:1268
+#: src/gnuwin32/rui.c:1251
 msgid "'mname' is limited to 1000 bytes"
 msgstr "'mname' ist auf 1000 Zeichen begrenzt"
 
-#: src/gnuwin32/rui.c:1310
+#: src/gnuwin32/rui.c:1293
 #, c-format
 msgid "menu %s does not exist"
 msgstr "Men� %s existiert nicht"
 
-#: src/gnuwin32/rui.c:1363
+#: src/gnuwin32/rui.c:1346
 msgid "'menu' is limited to 500 bytes"
 msgstr "'menu' ist begrenzt auf 500 Zeichen"
 
-#: src/gnuwin32/rui.c:1373
+#: src/gnuwin32/rui.c:1356
 msgid "base menu does not exist"
 msgstr "Basismen� existiert nicht"
 
-#: src/gnuwin32/rui.c:1388
+#: src/gnuwin32/rui.c:1371
 msgid "failed to allocate menu"
 msgstr "Allokieren eines Men�s fehlgeschlagen"
 
-#: src/gnuwin32/rui.c:1405 src/gnuwin32/rui.c:1529
+#: src/gnuwin32/rui.c:1388 src/gnuwin32/rui.c:1512
 msgid "menu + item is limited to 1000 bytes"
 msgstr "Men� + Eintrag sind auf 1000 Zeichen begrenzt"
 
-#: src/gnuwin32/rui.c:1413 src/gnuwin32/rui.c:1496
+#: src/gnuwin32/rui.c:1396 src/gnuwin32/rui.c:1479
 msgid "menu does not exist"
 msgstr "Men� existiert nicht"
 
-#: src/gnuwin32/rui.c:1431 src/gnuwin32/rui.c:1454 src/gnuwin32/rui.c:1459
+#: src/gnuwin32/rui.c:1414 src/gnuwin32/rui.c:1437 src/gnuwin32/rui.c:1442
 msgid "failed to allocate char storage"
 msgstr "Allokieren von Speicher f�r Zeichen fehlgeschlagen"
 
-#: src/gnuwin32/rui.c:1467
+#: src/gnuwin32/rui.c:1450
 msgid "failed to allocate menuitem"
 msgstr "Allokieren von Men�eintrag fehlgeschlagen"
 
-#: src/gnuwin32/rui.c:1519
+#: src/gnuwin32/rui.c:1502
 msgid "menu not found"
 msgstr "Men� nicht gefunden"
 
-#: src/gnuwin32/rui.c:1537
+#: src/gnuwin32/rui.c:1520
 msgid "menu or item does not exist"
 msgstr "Men� oder Eintrag existieren nicht"
 
-#: src/gnuwin32/system.c:442
+#: src/gnuwin32/system.c:447
 msgid "Save workspace image?"
 msgstr "Workspace sichern?"
 
 #: src/extra/graphapp/clipboard.c:69 src/extra/graphapp/clipboard.c:73
 msgid "Insufficient memory: cell not copied to the clipboard"
-msgstr "Ungen�gend Speicher: Zelle wurde nicht in Zwischenablage kopiert"
+msgstr "Zu wenig Speicher: Zelle wurde nicht in Zwischenablage kopiert"
 
-#: src/extra/graphapp/dialogs.c:147 src/extra/graphapp/dialogs.c:164
-#: src/extra/graphapp/dialogs.c:181
+#: src/extra/graphapp/dialogs.c:148 src/extra/graphapp/dialogs.c:165
+#: src/extra/graphapp/dialogs.c:182
 msgid "Question"
 msgstr "Frage"
 
-#: src/extra/graphapp/dialogs.c:202
+#: src/extra/graphapp/dialogs.c:203
 msgid " Change working directory to:"
 msgstr " Wechsele Arbeitsverzeichnis nach:"
 
-#: src/extra/graphapp/dialogs.c:205
+#: src/extra/graphapp/dialogs.c:206
 #, c-format
 msgid "Unable to set '%s' as working directory"
 msgstr "Kann '%s' nicht als Arbeitsverzeichnis setzen"
 
-#: src/extra/graphapp/dialogs.c:602 src/extra/graphapp/dialogs.c:620
-#: src/extra/graphapp/dialogs.c:626 src/extra/graphapp/dialogs.c:725
-#: src/extra/graphapp/dialogs.c:739 src/extra/graphapp/dialogs.c:745
+#: src/extra/graphapp/dialogs.c:603 src/extra/graphapp/dialogs.c:621
+#: src/extra/graphapp/dialogs.c:627 src/extra/graphapp/dialogs.c:726
+#: src/extra/graphapp/dialogs.c:740 src/extra/graphapp/dialogs.c:746
 #: src/library/utils/src/windows/widgets.c:125
 msgid "Cancel"
 msgstr "Abbrechen"
 
-#: src/extra/graphapp/dialogs.c:622 src/extra/graphapp/dialogs.c:741
+#: src/extra/graphapp/dialogs.c:623 src/extra/graphapp/dialogs.c:742
 #: src/library/utils/src/windows/widgets.c:124
 msgid "OK"
 msgstr "OK"
 
-#: src/extra/graphapp/dialogs.c:733
+#: src/extra/graphapp/dialogs.c:734
 msgid "User"
 msgstr "Nutzer"
 
-#: src/extra/graphapp/dialogs.c:734
+#: src/extra/graphapp/dialogs.c:735
 msgid "Password"
 msgstr "Passwort"
 
-#: src/extra/graphapp/dialogs.c:900 src/extra/graphapp/dialogs.c:906
+#: src/extra/graphapp/dialogs.c:901 src/extra/graphapp/dialogs.c:907
 #, c-format
 msgid "\"%s\" not found"
 msgstr "\"%s\" nicht gefunden"
@@ -884,9 +884,9 @@ msgid "Arrange Icons"
 msgstr "Ordne Icons an"
 
 #: src/library/utils/src/windows/dataentry.c:223
-#: src/library/utils/src/windows/dataentry.c:1850
-#: src/library/utils/src/windows/dataentry.c:1853
-#: src/library/utils/src/windows/dataentry.c:1884
+#: src/library/utils/src/windows/dataentry.c:1851
+#: src/library/utils/src/windows/dataentry.c:1854
+#: src/library/utils/src/windows/dataentry.c:1885
 msgid "invalid argument"
 msgstr "ung�ltiges Argument"
 
@@ -898,17 +898,12 @@ msgstr "ung
 msgid "Data Editor"
 msgstr "Dateneditor"
 
-#: src/library/utils/src/windows/dataentry.c:282
-#: src/library/utils/src/windows/dataentry.c:1891
-msgid "invalid device"
-msgstr "ung�ltiges Ger�t"
-
 #: src/library/utils/src/windows/dataentry.c:331
 msgid "dataentry: internal memory problem"
 msgstr "dataentry: internes Speicherproblem"
 
 #: src/library/utils/src/windows/dataentry.c:634
-#: src/library/utils/src/windows/dataentry.c:1221
+#: src/library/utils/src/windows/dataentry.c:1222
 msgid "dataentry: internal memory error"
 msgstr "dataentry: interner Speicherfehler"
 
@@ -917,43 +912,43 @@ msgstr "dataentry: interner Speicherfehler"
 msgid "internal type error in dataentry"
 msgstr "interner Typfehler in dataentry"
 
-#: src/library/utils/src/windows/dataentry.c:852
+#: src/library/utils/src/windows/dataentry.c:853
 msgid "dataentry: parse error on string"
 msgstr "dataentry: Parserfehler in Zeichenkette"
 
-#: src/library/utils/src/windows/dataentry.c:995
+#: src/library/utils/src/windows/dataentry.c:996
 msgid "dataentry: expression too long"
 msgstr "dataentry: Ausdruck zu lang"
 
-#: src/library/utils/src/windows/dataentry.c:1472
+#: src/library/utils/src/windows/dataentry.c:1473
 msgid "column names cannot be blank"
-msgstr "Spaltennamen k�nnen keine Blanks sein"
+msgstr "Spaltennamen k�nnen nicht leer sein"
 
-#: src/library/utils/src/windows/dataentry.c:1518
+#: src/library/utils/src/windows/dataentry.c:1519
 msgid "Variable editor"
-msgstr "Variable Editor"
+msgstr "Variableneditor"
 
-#: src/library/utils/src/windows/dataentry.c:1523
+#: src/library/utils/src/windows/dataentry.c:1524
 msgid "variable name"
-msgstr "Variable Name"
+msgstr "Variablenname"
 
-#: src/library/utils/src/windows/dataentry.c:1525
+#: src/library/utils/src/windows/dataentry.c:1526
 msgid "type"
 msgstr "Typ"
 
-#: src/library/utils/src/windows/dataentry.c:1639
+#: src/library/utils/src/windows/dataentry.c:1640
 msgid "Cell width(s)"
 msgstr "Zellenbreite(n)"
 
-#: src/library/utils/src/windows/dataentry.c:1645
+#: src/library/utils/src/windows/dataentry.c:1646
 msgid "Cell width"
 msgstr "Zellenbreite"
 
-#: src/library/utils/src/windows/dataentry.c:1648
+#: src/library/utils/src/windows/dataentry.c:1649
 msgid "variable"
 msgstr "Variable"
 
-#: src/library/utils/src/windows/dataentry.c:1691
+#: src/library/utils/src/windows/dataentry.c:1692
 msgid ""
 "Navigation.\n"
 "  Keyboard: cursor keys move selection\n"
@@ -996,224 +991,227 @@ msgstr ""
 "automatisch anzupassen\n"
 "\n"
 
-#: src/library/utils/src/windows/dataentry.c:1699
+#: src/library/utils/src/windows/dataentry.c:1700
 msgid "Copy selected cell"
 msgstr "Kopiere ausgew�hlte Zelle"
 
-#: src/library/utils/src/windows/dataentry.c:1700
+#: src/library/utils/src/windows/dataentry.c:1701
 msgid "Paste to selected cell"
 msgstr "F�ge in ausgew�hlte Zelle ein"
 
-#: src/library/utils/src/windows/dataentry.c:1701
+#: src/library/utils/src/windows/dataentry.c:1702
 msgid "Autosize column"
 msgstr "Autosize Spalte"
 
-#: src/library/utils/src/windows/dataentry.c:1797
+#: src/library/utils/src/windows/dataentry.c:1798
 msgid "Copy  \tCTRL+C"
 msgstr "Kopiere  \tStrg+C"
 
-#: src/library/utils/src/windows/dataentry.c:1799
+#: src/library/utils/src/windows/dataentry.c:1800
 msgid "Paste \tCTRL+V"
 msgstr "Einf�gen \tStrg+V"
 
-#: src/library/utils/src/windows/dataentry.c:1801
+#: src/library/utils/src/windows/dataentry.c:1802
 msgid "Delete\tDEL"
 msgstr "L�sche\tEntf"
 
-#: src/library/utils/src/windows/dataentry.c:1804
+#: src/library/utils/src/windows/dataentry.c:1805
 msgid "Cell widths ..."
 msgstr "Zellenbreiten ..."
 
-#: src/library/utils/src/windows/dataentry.c:1808
+#: src/library/utils/src/windows/dataentry.c:1809
 msgid "Data editor"
 msgstr "Dateneditor"
 
-#: src/library/grDevices/src/devWindows.c:932
+#: src/library/grDevices/src/devWindows.c:949
 msgid "Portable network graphics file"
 msgstr "Portable network graphics Datei"
 
-#: src/library/grDevices/src/devWindows.c:935
+#: src/library/grDevices/src/devWindows.c:952
 msgid "Windows bitmap file"
 msgstr "Windows Bitmap Datei"
 
-#: src/library/grDevices/src/devWindows.c:938
+#: src/library/grDevices/src/devWindows.c:955
 msgid "TIFF file"
 msgstr "TIFF Datei"
 
-#: src/library/grDevices/src/devWindows.c:941
+#: src/library/grDevices/src/devWindows.c:958
 msgid "Jpeg file"
 msgstr "Jpeg Datei"
 
-#: src/library/grDevices/src/devWindows.c:963
+#: src/library/grDevices/src/devWindows.c:980
 msgid "Postscript file"
 msgstr "Postscript Datei"
 
-#: src/library/grDevices/src/devWindows.c:975
+#: src/library/grDevices/src/devWindows.c:992
 msgid "PDF file"
 msgstr "PDF Datei"
 
-#: src/library/grDevices/src/devWindows.c:987
+#: src/library/grDevices/src/devWindows.c:1004
 msgid "Enhanced metafiles"
 msgstr "Enhanced Metafiles"
 
-#: src/library/grDevices/src/devWindows.c:990
-#: src/library/grDevices/src/devWindows.c:3436
+#: src/library/grDevices/src/devWindows.c:1007
+#: src/library/grDevices/src/devWindows.c:3445
 msgid "file path selected is too long: only 512 bytes are allowed"
 msgstr "ausgew�hlter Pfadname zu lang: nur 512 Bytes erlaubt"
 
-#: src/library/grDevices/src/devWindows.c:1201
+#: src/library/grDevices/src/devWindows.c:1218
 msgid "No plot to replace!"
 msgstr "Kein Plot zum Ersetzen!"
 
-#: src/library/grDevices/src/devWindows.c:1249
+#: src/library/grDevices/src/devWindows.c:1268
 msgid "Variable name"
 msgstr "Variablenname"
 
-#: src/library/grDevices/src/devWindows.c:1258
+#: src/library/grDevices/src/devWindows.c:1277
 msgid "Variable doesn't contain any plots!"
 msgstr "Variable enth�lt keine Plots!"
 
-#: src/library/grDevices/src/devWindows.c:1273
+#: src/library/grDevices/src/devWindows.c:1292
 msgid "Name of variable to save to"
 msgstr "Name der Variablen zum Speichern"
 
-#: src/library/grDevices/src/devWindows.c:1582
+#: src/library/grDevices/src/devWindows.c:1601
 msgid "Copy to the clipboard as a metafile"
 msgstr "Kopiere als Metafile in die Zwischenablage"
 
-#: src/library/grDevices/src/devWindows.c:1600
-#: src/library/grDevices/src/devWindows.c:1611
+#: src/library/grDevices/src/devWindows.c:1619
+#: src/library/grDevices/src/devWindows.c:1630
 msgid "Stop locator"
-msgstr "Stopp locator()"
+msgstr "Beende locator()"
 
-#: src/library/grDevices/src/devWindows.c:1610
-#: src/library/grDevices/src/devWindows.c:1614
+#: src/library/grDevices/src/devWindows.c:1629
+#: src/library/grDevices/src/devWindows.c:1633
 msgid "Stop"
-msgstr "Stopp"
+msgstr "Beenden"
 
-#: src/library/grDevices/src/devWindows.c:1616
+#: src/library/grDevices/src/devWindows.c:1635
 msgid "Continue"
 msgstr "Fortsetzen"
 
-#: src/library/grDevices/src/devWindows.c:1620
+#: src/library/grDevices/src/devWindows.c:1639
 msgid "Next"
 msgstr "N�chster"
 
-#: src/library/grDevices/src/devWindows.c:1621
+#: src/library/grDevices/src/devWindows.c:1640
 msgid "Next plot"
 msgstr "N�chster Plot"
 
-#: src/library/grDevices/src/devWindows.c:1627
+#: src/library/grDevices/src/devWindows.c:1646
 msgid "Save as"
 msgstr "Speichern als"
 
-#: src/library/grDevices/src/devWindows.c:1636
-#: src/library/grDevices/src/devWindows.c:1638
-#: src/library/grDevices/src/devWindows.c:1640
+#: src/library/grDevices/src/devWindows.c:1655
+#: src/library/grDevices/src/devWindows.c:1657
+#: src/library/grDevices/src/devWindows.c:1659
 #, c-format
 msgid "%s quality..."
 msgstr "%s Qualit�t..."
 
-#: src/library/grDevices/src/devWindows.c:1642
+#: src/library/grDevices/src/devWindows.c:1661
 msgid "Copy to the clipboard"
 msgstr "Kopiere in Zwischenablage"
 
-#: src/library/grDevices/src/devWindows.c:1643
+#: src/library/grDevices/src/devWindows.c:1662
 msgid "as a Bitmap\tCTRL+C"
 msgstr "als Bitmap\tStrg+C"
 
-#: src/library/grDevices/src/devWindows.c:1644
+#: src/library/grDevices/src/devWindows.c:1663
 msgid "as a Metafile\tCTRL+W"
 msgstr "als Metafile\tStrg+W"
 
-#: src/library/grDevices/src/devWindows.c:1647
+#: src/library/grDevices/src/devWindows.c:1666
 msgid "Print...\tCTRL+P"
 msgstr "Drucken...\tStrg+P"
 
-#: src/library/grDevices/src/devWindows.c:1649
+#: src/library/grDevices/src/devWindows.c:1668
 msgid "close Device"
 msgstr "Schlie�e Device"
 
-#: src/library/grDevices/src/devWindows.c:1650
+#: src/library/grDevices/src/devWindows.c:1669
 msgid "History"
 msgstr "History"
 
-#: src/library/grDevices/src/devWindows.c:1651
+#: src/library/grDevices/src/devWindows.c:1670
 msgid "Recording"
 msgstr "Aufzeichnen"
 
-#: src/library/grDevices/src/devWindows.c:1654
+#: src/library/grDevices/src/devWindows.c:1673
 msgid "Add\tINS"
 msgstr "Hinzuf�gen\tINS"
 
-#: src/library/grDevices/src/devWindows.c:1655
+#: src/library/grDevices/src/devWindows.c:1674
 msgid "Replace"
 msgstr "Ersetzen"
 
-#: src/library/grDevices/src/devWindows.c:1657
+#: src/library/grDevices/src/devWindows.c:1676
 msgid "Previous\tPgUp"
 msgstr "Vorhergehender\tPgUp"
 
-#: src/library/grDevices/src/devWindows.c:1658
+#: src/library/grDevices/src/devWindows.c:1677
 msgid "Next\tPgDown"
 msgstr "N�chster\tPgDown"
 
-#: src/library/grDevices/src/devWindows.c:1660
+#: src/library/grDevices/src/devWindows.c:1679
 msgid "Save to variable..."
 msgstr "Sichere in Variable..."
 
-#: src/library/grDevices/src/devWindows.c:1661
+#: src/library/grDevices/src/devWindows.c:1680
 msgid "Get from variable..."
 msgstr "Lade aus Variable..."
 
-#: src/library/grDevices/src/devWindows.c:1663
+#: src/library/grDevices/src/devWindows.c:1682
 msgid "Clear history"
 msgstr "Leere History"
 
-#: src/library/grDevices/src/devWindows.c:1664
+#: src/library/grDevices/src/devWindows.c:1683
 msgid "Resize"
 msgstr "Resize"
 
-#: src/library/grDevices/src/devWindows.c:1665
+#: src/library/grDevices/src/devWindows.c:1684
 msgid "R mode"
 msgstr "R Mode"
 
-#: src/library/grDevices/src/devWindows.c:1667
+#: src/library/grDevices/src/devWindows.c:1686
 msgid "Fit to window"
 msgstr "An Fenster anpassen"
 
-#: src/library/grDevices/src/devWindows.c:1669
+#: src/library/grDevices/src/devWindows.c:1688
 msgid "Fixed size"
 msgstr "Feste Gr��e"
 
-#: src/library/grDevices/src/devWindows.c:1676
+#: src/library/grDevices/src/devWindows.c:1695
 msgid "Copy as metafile"
 msgstr "Kopiere als Metafile"
 
-#: src/library/grDevices/src/devWindows.c:1678
+#: src/library/grDevices/src/devWindows.c:1697
 msgid "Copy as bitmap"
 msgstr "Kopiere als Bitmap"
 
-#: src/library/grDevices/src/devWindows.c:1681
+#: src/library/grDevices/src/devWindows.c:1700
 msgid "Save as metafile..."
 msgstr "Speichere als Metafile..."
 
-#: src/library/grDevices/src/devWindows.c:1683
+#: src/library/grDevices/src/devWindows.c:1702
 msgid "Save as postscript..."
 msgstr "Speichere als Postscript..."
 
-#: src/library/grDevices/src/devWindows.c:3136
+#: src/library/grDevices/src/devWindows.c:3143
 msgid "Locator is active"
 msgstr "locator() ist aktiv"
 
-#: src/library/grDevices/src/devWindows.c:3763
+#: src/library/grDevices/src/devWindows.c:3769
 msgid "Waiting to confirm page change..."
 msgstr "Warte auf Best�tigung des Seitenwechsels..."
 
-#: src/library/grDevices/src/devWindows.c:3775
+#: src/library/grDevices/src/devWindows.c:3781
 msgid "Click or hit ENTER for next page"
 msgstr "Klick oder Return f�r die n�chste Seite"
 
+#~ msgid "invalid device"
+#~ msgstr "ung�ltiges Ger�t"
+
 #~ msgid "Html search page"
 #~ msgstr "HTML Suchseite"
 
diff --git a/src/library/base/po/RGui-es.po b/src/library/base/po/RGui-es.po
index e47737a..0bda33b 100644
--- a/src/library/base/po/RGui-es.po
+++ b/src/library/base/po/RGui-es.po
@@ -7,7 +7,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: R 2.13.0\n"
 "Report-Msgid-Bugs-To: bugs.r-project.org\n"
-"POT-Creation-Date: 2013-03-18 19:36+0000\n"
+"POT-Creation-Date: 2016-04-01 10:28-0700\n"
 "PO-Revision-Date: 2012-03-16 15:43+0100\n"
 "Last-Translator: Dr. Pablo Emilio Verde <pabloemilio.verde at uni-duesseldorf."
 "de>\n"
@@ -32,11 +32,11 @@ msgstr "Memoria insuficiente: texto no copiado en el 
 msgid "Unable to open the clipboard"
 msgstr "No es posible abrir el �rea de transferencia"
 
-#: src/gnuwin32/console.c:1914
+#: src/gnuwin32/console.c:1919
 msgid "Insufficient memory. Please close the console"
 msgstr "Memoria insuficiente. Por favor cierre la consola"
 
-#: src/gnuwin32/console.c:1969 src/gnuwin32/console.c:2022
+#: src/gnuwin32/console.c:1974 src/gnuwin32/console.c:2028
 #: src/gnuwin32/preferences.c:333
 #, c-format
 msgid ""
@@ -46,23 +46,23 @@ msgstr ""
 "Fuente %s-%d-%d  no encontrada.\n"
 "Usando fuente dada por el sistema"
 
-#: src/gnuwin32/console.c:2127
+#: src/gnuwin32/console.c:2133
 msgid "Save selection to"
 msgstr "Guardar como"
 
-#: src/gnuwin32/console.c:2129
+#: src/gnuwin32/console.c:2135
 msgid "Save console contents to"
 msgstr "Guardar contenido de la consola en "
 
-#: src/gnuwin32/console.c:2228
+#: src/gnuwin32/console.c:2234
 msgid "Scrolling.\n"
 msgstr "Desplazarse.\n"
 
-#: src/gnuwin32/console.c:2229
+#: src/gnuwin32/console.c:2235
 msgid "  Keyboard: PgUp, PgDown, Ctrl+Arrows, Ctrl+Home, Ctrl+End,\n"
 msgstr "  Teclado:  PgUp, PgDown, Ctrl+Arrows, Ctrl+Home, Ctrl+End,\n"
 
-#: src/gnuwin32/console.c:2230
+#: src/gnuwin32/console.c:2236
 msgid ""
 "  Mouse: use the scrollbar(s).\n"
 "\n"
@@ -70,75 +70,75 @@ msgstr ""
 "  Mouse: use la barra de desplazamiento.\n"
 "\n"
 
-#: src/gnuwin32/console.c:2231
+#: src/gnuwin32/console.c:2237
 msgid "Editing.\n"
 msgstr "Editando.\n"
 
-#: src/gnuwin32/console.c:2232
+#: src/gnuwin32/console.c:2238
 msgid "  Moving the cursor: \n"
 msgstr " Moviendo el cursor: \n"
 
-#: src/gnuwin32/console.c:2233
+#: src/gnuwin32/console.c:2239
 msgid "     Left arrow or Ctrl+B: move backward one character;\n"
 msgstr "    Flecha izquierda or Ctrl+B: mueve un caracter para atras;\n"
 
-#: src/gnuwin32/console.c:2234
+#: src/gnuwin32/console.c:2240
 msgid "     Right arrow or Ctrl+F: move forward one character;\n"
 msgstr "     Flecha derecha o  Ctrl+F: mueve un caracter para adelante;\n"
 
-#: src/gnuwin32/console.c:2235
+#: src/gnuwin32/console.c:2241
 msgid "     Home or Ctrl+A: go to beginning of line;\n"
 msgstr "     Home o Ctrl+A: va al principio de linea;\n"
 
-#: src/gnuwin32/console.c:2236
+#: src/gnuwin32/console.c:2242
 msgid "     End or Ctrl+E: go to end of line;\n"
 msgstr "     End o Ctrl+E: va al fin de linea;\n"
 
-#: src/gnuwin32/console.c:2237
+#: src/gnuwin32/console.c:2243
 msgid "  History: Up and Down Arrows, Ctrl+P, Ctrl+N\n"
 msgstr "  Hist�rico: flechas arriba y abajo, Ctrl+P, Ctrl+N\n"
 
-#: src/gnuwin32/console.c:2238
+#: src/gnuwin32/console.c:2244
 msgid "  Deleting:\n"
 msgstr "  Borrando:\n"
 
-#: src/gnuwin32/console.c:2239
+#: src/gnuwin32/console.c:2245
 msgid "     Del or Ctrl+D: delete current character or selection;\n"
 msgstr "     Del o Ctrl+D: borrar caracter actual o secci�n;\n"
 
-#: src/gnuwin32/console.c:2240
+#: src/gnuwin32/console.c:2246
 msgid "     Backspace: delete preceding character;\n"
 msgstr "     Backspace: delete preceding character;\n"
 
-#: src/gnuwin32/console.c:2241
+#: src/gnuwin32/console.c:2247
 msgid ""
 "     Ctrl+Del or Ctrl+K: delete text from current character to end of line.\n"
 msgstr ""
 "     Ctrl+Del o Ctrl+K: borra texto desde caracter actual al fin de linea.\n"
 
-#: src/gnuwin32/console.c:2242
+#: src/gnuwin32/console.c:2248
 msgid "     Ctrl+U: delete all text from current line.\n"
 msgstr "     Ctrl+U: borrar todo el texto desde la linea actual.\n"
 
-#: src/gnuwin32/console.c:2243
+#: src/gnuwin32/console.c:2249
 msgid "  Copy and paste.\n"
 msgstr "  Copiar y pegar.\n"
 
-#: src/gnuwin32/console.c:2244
+#: src/gnuwin32/console.c:2250
 msgid ""
 "     Use the mouse (with the left button held down) to mark (select) text.\n"
 msgstr ""
 "     Use el mouse (con el bot�n izquierdo sujetado) para marcar (selecionar) "
 "texto.\n"
 
-#: src/gnuwin32/console.c:2245
+#: src/gnuwin32/console.c:2251
 msgid ""
 "     Use Shift+Del (or Ctrl+C) to copy the marked text to the clipboard and\n"
 msgstr ""
 "     Use Shift+Del (o Ctrl+C) para copiar el texto selecionado para a �rea "
 "de transferencia\n"
 
-#: src/gnuwin32/console.c:2246
+#: src/gnuwin32/console.c:2252
 msgid ""
 "     Shift+Ins (or Ctrl+V or Ctrl+Y) to paste the content of the clipboard "
 "(if any)  \n"
@@ -146,29 +146,29 @@ msgstr ""
 "     Shift+Ins (o Ctrl+V o Ctrl+Y) para pegar el contenido del �rea de "
 "transferencia (si hubiera alguno)  \n"
 
-#: src/gnuwin32/console.c:2247
+#: src/gnuwin32/console.c:2253
 msgid "     to the console, Ctrl+X first copy then paste\n"
 msgstr "     para la consola, Ctrl+X primeiro copie depues pegue\n"
 
-#: src/gnuwin32/console.c:2248
+#: src/gnuwin32/console.c:2254
 msgid "  Misc:\n"
 msgstr "  Misc:\n"
 
-#: src/gnuwin32/console.c:2249
+#: src/gnuwin32/console.c:2255
 msgid "     Ctrl+L: Clear the console.\n"
 msgstr "     Ctrl+L: Limpia la consola.\n"
 
-#: src/gnuwin32/console.c:2250
+#: src/gnuwin32/console.c:2256
 msgid "     Ctrl+O or INS: Toggle overwrite mode: initially off.\n"
 msgstr ""
 "     Ctrl+O o INS: Alterna o modo de sobre ecritura: inicialmente "
 "desactivado.\n"
 
-#: src/gnuwin32/console.c:2251
+#: src/gnuwin32/console.c:2257
 msgid "     Ctrl+T: Interchange current char with one to the left.\n"
 msgstr "     Ctrl+T: Intercambia caracter actual con uno de la izquierda.\n"
 
-#: src/gnuwin32/console.c:2252
+#: src/gnuwin32/console.c:2258
 msgid ""
 "\n"
 "Note: Console is updated only when some input is required.\n"
@@ -176,7 +176,7 @@ msgstr ""
 "\n"
 "Nota: Consola es actualizada solo cuando alguna entrada es requerida.\n"
 
-#: src/gnuwin32/console.c:2253
+#: src/gnuwin32/console.c:2259
 msgid ""
 "  Use Ctrl+W to toggle this feature off/on.\n"
 "\n"
@@ -184,7 +184,7 @@ msgstr ""
 "  Use Ctrl+W para alternar esta caracteristica prendido/apagado.\n"
 "\n"
 
-#: src/gnuwin32/console.c:2254
+#: src/gnuwin32/console.c:2260
 msgid ""
 "Use ESC to stop the interpreter.\n"
 "\n"
@@ -192,7 +192,7 @@ msgstr ""
 "Use ESC para parar el interprete.\n"
 "\n"
 
-#: src/gnuwin32/console.c:2255
+#: src/gnuwin32/console.c:2261
 msgid ""
 "TAB starts completion of the current word.\n"
 "\n"
@@ -200,270 +200,271 @@ msgstr ""
 "TAB comienza a completar la palabra.\n"
 "\n"
 
-#: src/gnuwin32/console.c:2256
+#: src/gnuwin32/console.c:2262
 msgid "Standard Windows hotkeys can be used to switch to the\n"
 msgstr "Teclas estandards de Windows pueden ser utilizadas para cambiar a\n"
 
-#: src/gnuwin32/console.c:2257
+#: src/gnuwin32/console.c:2263
 msgid "graphics device (Ctrl+Tab or Ctrl+F6 in MDI, Alt+Tab in SDI)"
 msgstr "dispositivo gr�fico (Ctrl+Tab ou Ctrl+F6 en MDI, Alt+Tab en SDI)"
 
-#: src/gnuwin32/editor.c:88 src/gnuwin32/editor.c:90
+#: src/gnuwin32/editor.c:91 src/gnuwin32/editor.c:93
 msgid "R Editor"
 msgstr "Editor R"
 
-#: src/gnuwin32/editor.c:119
+#: src/gnuwin32/editor.c:123
 #, c-format
 msgid "unable to open file %s for reading"
 msgstr "No es posible abrir el archivo %s para la lectura"
 
-#: src/gnuwin32/editor.c:135
+#: src/gnuwin32/editor.c:139
 #, c-format
 msgid "Could not read from file '%s'"
 msgstr "No se pudo leer el archvo '%s"
 
-#: src/gnuwin32/editor.c:166
+#: src/gnuwin32/editor.c:171
 #, c-format
 msgid "Could not save file '%s'"
 msgstr "No se puede guardar el archivo '%s"
 
-#: src/gnuwin32/editor.c:182
+#: src/gnuwin32/editor.c:187
 msgid "Save script as"
 msgstr "Guardar script como ..."
 
-#: src/gnuwin32/editor.c:377 src/gnuwin32/editor.c:694
-#: src/gnuwin32/pager.c:431 src/gnuwin32/rui.c:1076
+#: src/gnuwin32/editor.c:379 src/gnuwin32/editor.c:696
+#: src/gnuwin32/pager.c:430 src/gnuwin32/rui.c:1076
 msgid "Open script"
 msgstr "Abrir script"
 
-#: src/gnuwin32/editor.c:500 src/gnuwin32/pager.c:185 src/gnuwin32/pager.c:205
+#: src/gnuwin32/editor.c:502 src/gnuwin32/pager.c:184 src/gnuwin32/pager.c:204
 msgid "No RGui console to paste to"
 msgstr "No hay consola RGui donde pegar"
 
-#: src/gnuwin32/editor.c:602
+#: src/gnuwin32/editor.c:604
 msgid "R EDITOR\n"
 msgstr "Editor R\n"
 
-#: src/gnuwin32/editor.c:604
+#: src/gnuwin32/editor.c:606
 msgid "A standard text editor for editing and running R code.\n"
 msgstr "Un editor de texto estandard para editar y correr c�digo de R.\n"
 
-#: src/gnuwin32/editor.c:606
+#: src/gnuwin32/editor.c:608
 msgid "RUNNING COMMANDS\n"
 msgstr "Ejecutando comandos\n"
 
-#: src/gnuwin32/editor.c:607
+#: src/gnuwin32/editor.c:609
 msgid "To run a line or section of R code, select the code and either\n"
 msgstr ""
 "Para ejecutar una linea o secci�n de codigo de R, seleccione el codigo y "
 "realice uno de los siguientes comandos\n"
 
-#: src/gnuwin32/editor.c:608
+#: src/gnuwin32/editor.c:610
 msgid "     Press Ctrl-R\n"
 msgstr "     Presione Ctrl-R\n"
 
-#: src/gnuwin32/editor.c:609
+#: src/gnuwin32/editor.c:611
 msgid "     Select \"Run line or selection\" from the \"Edit\" menu\n"
 msgstr ""
 "     Seleccione \"Ejecutar linea o secci�n\" a partir del menu \"Editar\"\n"
 
-#: src/gnuwin32/editor.c:610
+#: src/gnuwin32/editor.c:612
 msgid "     Press the \"Run line or selection\" icon on the toolbar\n"
 msgstr ""
 "     Presione el �cono \"Ejecutar linea o secci�n\" en la barra de "
 "herramientas\n"
 
-#: src/gnuwin32/editor.c:611
+#: src/gnuwin32/editor.c:613
 msgid ""
 "This will copy the selected commands to the console and evaluate them.\n"
 msgstr "Esto copiar� los comandos selecionados a la consola y los evaluar�.\n"
 
-#: src/gnuwin32/editor.c:612
+#: src/gnuwin32/editor.c:614
 msgid ""
 "If there is no selection, this will just run the current line and advance\n"
 msgstr "Si no hay selecci�n, esto solo correr� la linea actual y proseguira\n"
 
-#: src/gnuwin32/editor.c:613
+#: src/gnuwin32/editor.c:615
 msgid "the cursor by one line.\n"
 msgstr "el cursor por una linea.\n"
 
-#: src/gnuwin32/editor.c:625 src/gnuwin32/editor.c:702
-#: src/gnuwin32/editor.c:760
+#: src/gnuwin32/editor.c:627 src/gnuwin32/editor.c:704
+#: src/gnuwin32/editor.c:762
 msgid "Run line or selection"
 msgstr "Correr linea o seleccionar"
 
-#: src/gnuwin32/editor.c:627 src/gnuwin32/editor.c:745
+#: src/gnuwin32/editor.c:629 src/gnuwin32/editor.c:747
 msgid "Undo"
 msgstr "Deshacer"
 
-#: src/gnuwin32/editor.c:629 src/gnuwin32/editor.c:748
+#: src/gnuwin32/editor.c:631 src/gnuwin32/editor.c:750
 msgid "Cut"
 msgstr "Cortar"
 
-#: src/gnuwin32/editor.c:630 src/gnuwin32/editor.c:750
-#: src/gnuwin32/pager.c:305 src/gnuwin32/pager.c:478 src/gnuwin32/rui.c:859
+#: src/gnuwin32/editor.c:632 src/gnuwin32/editor.c:752
+#: src/gnuwin32/pager.c:304 src/gnuwin32/pager.c:477 src/gnuwin32/rui.c:859
 #: src/gnuwin32/rui.c:1088 src/gnuwin32/rui.c:1144
 msgid "Copy"
 msgstr "Copiar"
 
-#: src/gnuwin32/editor.c:631 src/gnuwin32/editor.c:752 src/gnuwin32/rui.c:860
+#: src/gnuwin32/editor.c:633 src/gnuwin32/editor.c:754 src/gnuwin32/rui.c:860
 #: src/gnuwin32/rui.c:1092 src/gnuwin32/rui.c:1145
 msgid "Paste"
 msgstr "Pegar"
 
-#: src/gnuwin32/editor.c:632 src/gnuwin32/editor.c:754
+#: src/gnuwin32/editor.c:634 src/gnuwin32/editor.c:756
 msgid "Delete"
 msgstr "Borrar"
 
-#: src/gnuwin32/editor.c:634 src/gnuwin32/editor.c:756
-#: src/gnuwin32/pager.c:308 src/gnuwin32/pager.c:484 src/gnuwin32/rui.c:866
+#: src/gnuwin32/editor.c:636 src/gnuwin32/editor.c:758
+#: src/gnuwin32/pager.c:307 src/gnuwin32/pager.c:483 src/gnuwin32/rui.c:866
 #: src/gnuwin32/rui.c:1149
 msgid "Select all"
 msgstr "Seleccionar todo"
 
-#: src/gnuwin32/editor.c:698
+#: src/gnuwin32/editor.c:700
 msgid "Save script"
 msgstr "Guardar script"
 
-#: src/gnuwin32/editor.c:706 src/gnuwin32/pager.c:451
-#: src/library/grDevices/src/devWindows.c:1594
+#: src/gnuwin32/editor.c:708 src/gnuwin32/pager.c:450
+#: src/library/grDevices/src/devWindows.c:1613
 msgid "Return focus to Console"
 msgstr "Retornar foco a la consola"
 
-#: src/gnuwin32/editor.c:709
+#: src/gnuwin32/editor.c:711
 msgid "Print script"
 msgstr "Imprimir script"
 
-#: src/gnuwin32/editor.c:711 src/gnuwin32/pager.c:446 src/gnuwin32/rui.c:1104
-#: src/library/grDevices/src/devWindows.c:1588
+#: src/gnuwin32/editor.c:713 src/gnuwin32/pager.c:445 src/gnuwin32/rui.c:1104
+#: src/library/grDevices/src/devWindows.c:1607
 msgid "Print"
 msgstr "Imprimir"
 
-#: src/gnuwin32/editor.c:729 src/gnuwin32/pager.c:467 src/gnuwin32/rui.c:1122
-#: src/library/utils/src/windows/dataentry.c:1790
-#: src/library/grDevices/src/devWindows.c:1626
+#: src/gnuwin32/editor.c:731 src/gnuwin32/pager.c:466 src/gnuwin32/rui.c:1122
+#: src/library/utils/src/windows/dataentry.c:1791
+#: src/library/grDevices/src/devWindows.c:1645
 msgid "File"
 msgstr "Archivo"
 
-#: src/gnuwin32/editor.c:730 src/gnuwin32/pager.c:468 src/gnuwin32/rui.c:1124
+#: src/gnuwin32/editor.c:732 src/gnuwin32/pager.c:467 src/gnuwin32/rui.c:1124
 msgid "New script"
 msgstr "Nuevo script"
 
-#: src/gnuwin32/editor.c:732 src/gnuwin32/pager.c:469 src/gnuwin32/rui.c:1125
+#: src/gnuwin32/editor.c:734 src/gnuwin32/pager.c:468 src/gnuwin32/rui.c:1125
 msgid "Open script..."
 msgstr "Abrir script..."
 
-#: src/gnuwin32/editor.c:734
+#: src/gnuwin32/editor.c:736
 msgid "Save"
 msgstr "Guardar"
 
-#: src/gnuwin32/editor.c:736
+#: src/gnuwin32/editor.c:738
 msgid "Save as..."
 msgstr "Guardar como..."
 
-#: src/gnuwin32/editor.c:739 src/gnuwin32/pager.c:470 src/gnuwin32/rui.c:1138
-#: src/library/grDevices/src/devWindows.c:1689
+#: src/gnuwin32/editor.c:741 src/gnuwin32/pager.c:469 src/gnuwin32/rui.c:1138
+#: src/library/grDevices/src/devWindows.c:1666
+#: src/library/grDevices/src/devWindows.c:1708
 msgid "Print..."
 msgstr "Imprimir..."
 
-#: src/gnuwin32/editor.c:742
+#: src/gnuwin32/editor.c:744
 msgid "Close script"
 msgstr "Cerrar script"
 
-#: src/gnuwin32/editor.c:744 src/gnuwin32/pager.c:477 src/gnuwin32/rui.c:1143
-#: src/library/utils/src/windows/dataentry.c:1796
+#: src/gnuwin32/editor.c:746 src/gnuwin32/pager.c:476 src/gnuwin32/rui.c:1143
+#: src/library/utils/src/windows/dataentry.c:1797
 msgid "Edit"
 msgstr "Editar"
 
-#: src/gnuwin32/editor.c:758 src/gnuwin32/rui.c:1150
+#: src/gnuwin32/editor.c:760 src/gnuwin32/rui.c:1150
 msgid "Clear console"
 msgstr "Limpar consola"
 
-#: src/gnuwin32/editor.c:762
+#: src/gnuwin32/editor.c:764
 msgid "Run all"
 msgstr "Ejecutar todo"
 
-#: src/gnuwin32/editor.c:765
+#: src/gnuwin32/editor.c:767
 msgid "Find..."
 msgstr "Localizar..."
 
-#: src/gnuwin32/editor.c:767
+#: src/gnuwin32/editor.c:769
 msgid "Replace..."
 msgstr "Substituir..."
 
-#: src/gnuwin32/editor.c:770 src/gnuwin32/rui.c:1154
+#: src/gnuwin32/editor.c:772 src/gnuwin32/rui.c:1154
 msgid "GUI preferences..."
 msgstr "Preferencias de la interface gr�fica"
 
-#: src/gnuwin32/editor.c:780 src/gnuwin32/rui.c:1186
-#: src/library/utils/src/windows/dataentry.c:1697
-#: src/library/utils/src/windows/dataentry.c:1807
+#: src/gnuwin32/editor.c:782 src/gnuwin32/rui.c:1186
+#: src/library/utils/src/windows/dataentry.c:1698
+#: src/library/utils/src/windows/dataentry.c:1808
 msgid "Help"
 msgstr "Ayuda"
 
-#: src/gnuwin32/editor.c:781
+#: src/gnuwin32/editor.c:783
 msgid "Editor"
 msgstr "Editor"
 
-#: src/gnuwin32/editor.c:840
+#: src/gnuwin32/editor.c:842
 msgid "Maximum number of editors reached"
 msgstr "N�mero m�ximo de editores encontrados"
 
-#: src/gnuwin32/editor.c:845
+#: src/gnuwin32/editor.c:847
 msgid "Unable to create editor window"
 msgstr "No fue posible crear una ventana de edici�n"
 
-#: src/gnuwin32/editor.c:853
+#: src/gnuwin32/editor.c:855
 msgid "Untitled"
 msgstr "Sin nombre"
 
-#: src/gnuwin32/extra.c:823 src/gnuwin32/rui.c:1224
+#: src/gnuwin32/extra.c:825
 msgid "Select file"
 msgstr "Selecionar archivo"
 
-#: src/gnuwin32/pager.c:89
+#: src/gnuwin32/pager.c:88
 msgid "Error opening file"
 msgstr "Error al abrir un archivo"
 
-#: src/gnuwin32/pager.c:96
+#: src/gnuwin32/pager.c:95
 msgid "Insufficient memory to display file in internal pager"
 msgstr ""
 "Memoria insuficiente para mostrar un archivo en el visualizador interno"
 
-#: src/gnuwin32/pager.c:177 src/gnuwin32/pager.c:189 src/gnuwin32/pager.c:209
+#: src/gnuwin32/pager.c:176 src/gnuwin32/pager.c:188 src/gnuwin32/pager.c:208
 #: src/gnuwin32/rui.c:237 src/gnuwin32/rui.c:264
 msgid "No selection"
 msgstr "Sin selecci�n"
 
-#: src/gnuwin32/pager.c:306 src/gnuwin32/pager.c:436 src/gnuwin32/pager.c:480
+#: src/gnuwin32/pager.c:305 src/gnuwin32/pager.c:435 src/gnuwin32/pager.c:479
 msgid "Paste to console"
 msgstr "Pegar en la consola"
 
-#: src/gnuwin32/pager.c:307 src/gnuwin32/pager.c:441 src/gnuwin32/pager.c:482
+#: src/gnuwin32/pager.c:306 src/gnuwin32/pager.c:440 src/gnuwin32/pager.c:481
 msgid "Paste commands to console"
 msgstr "Pegar comandos en la consola"
 
-#: src/gnuwin32/pager.c:310 src/gnuwin32/rui.c:869
-#: src/library/utils/src/windows/dataentry.c:1703
-#: src/library/grDevices/src/devWindows.c:1686
+#: src/gnuwin32/pager.c:309 src/gnuwin32/rui.c:869
+#: src/library/utils/src/windows/dataentry.c:1704
+#: src/library/grDevices/src/devWindows.c:1705
 msgid "Stay on top"
 msgstr "Siempre visible"
 
-#: src/gnuwin32/pager.c:312 src/gnuwin32/pager.c:475
-#: src/library/utils/src/windows/dataentry.c:1705
-#: src/library/utils/src/windows/dataentry.c:1792
+#: src/gnuwin32/pager.c:311 src/gnuwin32/pager.c:474
+#: src/library/utils/src/windows/dataentry.c:1706
+#: src/library/utils/src/windows/dataentry.c:1793
 msgid "Close"
 msgstr "Cerrar"
 
-#: src/gnuwin32/pager.c:472 src/gnuwin32/rui.c:1139
+#: src/gnuwin32/pager.c:471 src/gnuwin32/rui.c:1139
 msgid "Save to File..."
 msgstr "Guardar en Archivo ..."
 
-#: src/gnuwin32/pager.c:487 src/gnuwin32/rui.c:1156
+#: src/gnuwin32/pager.c:486 src/gnuwin32/rui.c:1156
 msgid "View"
 msgstr "Visualizar"
 
-#: src/gnuwin32/pager.c:519
+#: src/gnuwin32/pager.c:518
 msgid "Unable to create pager window"
 msgstr "No fue posible crear una ventana visualizadora"
 
@@ -620,7 +621,8 @@ msgid "Update packages..."
 msgstr "Actualizar paquetes..."
 
 #: src/gnuwin32/rui.c:920
-msgid "Install package(s) from local zip files..."
+#, fuzzy
+msgid "Install package(s) from local files..."
 msgstr "Instalar paquetes(s) a partir de archivos zip locales..."
 
 #: src/gnuwin32/rui.c:944
@@ -787,52 +789,52 @@ msgstr "Listar el camino de busqueda"
 msgid "Console"
 msgstr "Consola"
 
-#: src/gnuwin32/rui.c:1268
+#: src/gnuwin32/rui.c:1251
 msgid "'mname' is limited to 1000 bytes"
 msgstr "'mname' limitado a 1000 caracteres"
 
-#: src/gnuwin32/rui.c:1310
+#: src/gnuwin32/rui.c:1293
 #, c-format
 msgid "menu %s does not exist"
 msgstr "menu %s no existe"
 
-#: src/gnuwin32/rui.c:1363
+#: src/gnuwin32/rui.c:1346
 msgid "'menu' is limited to 500 bytes"
 msgstr "'menu'  limitado a 500 caracteres"
 
-#: src/gnuwin32/rui.c:1373
+#: src/gnuwin32/rui.c:1356
 msgid "base menu does not exist"
 msgstr "menu base no existe"
 
-#: src/gnuwin32/rui.c:1388
+#: src/gnuwin32/rui.c:1371
 msgid "failed to allocate menu"
 msgstr "falla al alocar menu"
 
-#: src/gnuwin32/rui.c:1405 src/gnuwin32/rui.c:1529
+#: src/gnuwin32/rui.c:1388 src/gnuwin32/rui.c:1512
 msgid "menu + item is limited to 1000 bytes"
 msgstr "menu + item es limitado a 1000 caracteres"
 
-#: src/gnuwin32/rui.c:1413 src/gnuwin32/rui.c:1496
+#: src/gnuwin32/rui.c:1396 src/gnuwin32/rui.c:1479
 msgid "menu does not exist"
 msgstr "menu no existe"
 
-#: src/gnuwin32/rui.c:1431 src/gnuwin32/rui.c:1454 src/gnuwin32/rui.c:1459
+#: src/gnuwin32/rui.c:1414 src/gnuwin32/rui.c:1437 src/gnuwin32/rui.c:1442
 msgid "failed to allocate char storage"
 msgstr "falla al alocar caracter de almacenamiento"
 
-#: src/gnuwin32/rui.c:1467
+#: src/gnuwin32/rui.c:1450
 msgid "failed to allocate menuitem"
 msgstr "falla al alocar item de menu"
 
-#: src/gnuwin32/rui.c:1519
+#: src/gnuwin32/rui.c:1502
 msgid "menu not found"
 msgstr "menu no encontrado"
 
-#: src/gnuwin32/rui.c:1537
+#: src/gnuwin32/rui.c:1520
 msgid "menu or item does not exist"
 msgstr "menu o item no existente"
 
-#: src/gnuwin32/system.c:442
+#: src/gnuwin32/system.c:446
 msgid "Save workspace image?"
 msgstr "Guardar imagen de �rea de trabajo?"
 
@@ -841,41 +843,41 @@ msgid "Insufficient memory: cell not copied to the clipboard"
 msgstr ""
 "Mem�ria insuficiente: la celda no fue copiada en el �rea de transferencia"
 
-#: src/extra/graphapp/dialogs.c:147 src/extra/graphapp/dialogs.c:164
-#: src/extra/graphapp/dialogs.c:181
+#: src/extra/graphapp/dialogs.c:148 src/extra/graphapp/dialogs.c:165
+#: src/extra/graphapp/dialogs.c:182
 msgid "Question"
 msgstr "Pregunta"
 
-#: src/extra/graphapp/dialogs.c:202
+#: src/extra/graphapp/dialogs.c:203
 msgid " Change working directory to:"
 msgstr "Cambiar el directorio de trabajo a:"
 
-#: src/extra/graphapp/dialogs.c:205
+#: src/extra/graphapp/dialogs.c:206
 #, c-format
 msgid "Unable to set '%s' as working directory"
 msgstr "No fue posible especificar '%s' como directorio de trabajo"
 
-#: src/extra/graphapp/dialogs.c:602 src/extra/graphapp/dialogs.c:620
-#: src/extra/graphapp/dialogs.c:626 src/extra/graphapp/dialogs.c:725
-#: src/extra/graphapp/dialogs.c:739 src/extra/graphapp/dialogs.c:745
+#: src/extra/graphapp/dialogs.c:604 src/extra/graphapp/dialogs.c:622
+#: src/extra/graphapp/dialogs.c:628 src/extra/graphapp/dialogs.c:727
+#: src/extra/graphapp/dialogs.c:741 src/extra/graphapp/dialogs.c:747
 #: src/library/utils/src/windows/widgets.c:125
 msgid "Cancel"
 msgstr "Cancelar"
 
-#: src/extra/graphapp/dialogs.c:622 src/extra/graphapp/dialogs.c:741
+#: src/extra/graphapp/dialogs.c:624 src/extra/graphapp/dialogs.c:743
 #: src/library/utils/src/windows/widgets.c:124
 msgid "OK"
 msgstr "OK"
 
-#: src/extra/graphapp/dialogs.c:733
+#: src/extra/graphapp/dialogs.c:735
 msgid "User"
 msgstr "Usuario"
 
-#: src/extra/graphapp/dialogs.c:734
+#: src/extra/graphapp/dialogs.c:736
 msgid "Password"
 msgstr "Palabra secreta"
 
-#: src/extra/graphapp/dialogs.c:900 src/extra/graphapp/dialogs.c:906
+#: src/extra/graphapp/dialogs.c:902 src/extra/graphapp/dialogs.c:908
 #, c-format
 msgid "\"%s\" not found"
 msgstr "\"%s\" no encontrado"
@@ -885,9 +887,9 @@ msgid "Arrange Icons"
 msgstr "Organizar Iconos"
 
 #: src/library/utils/src/windows/dataentry.c:223
-#: src/library/utils/src/windows/dataentry.c:1850
-#: src/library/utils/src/windows/dataentry.c:1853
-#: src/library/utils/src/windows/dataentry.c:1884
+#: src/library/utils/src/windows/dataentry.c:1851
+#: src/library/utils/src/windows/dataentry.c:1854
+#: src/library/utils/src/windows/dataentry.c:1885
 msgid "invalid argument"
 msgstr "argumento no v�lido"
 
@@ -899,17 +901,12 @@ msgstr "tipo no v
 msgid "Data Editor"
 msgstr "Editor de datos"
 
-#: src/library/utils/src/windows/dataentry.c:282
-#: src/library/utils/src/windows/dataentry.c:1891
-msgid "invalid device"
-msgstr "dispositivo inv�lido"
-
 #: src/library/utils/src/windows/dataentry.c:331
 msgid "dataentry: internal memory problem"
 msgstr "dataentry: problema interno de mem�ria"
 
 #: src/library/utils/src/windows/dataentry.c:634
-#: src/library/utils/src/windows/dataentry.c:1221
+#: src/library/utils/src/windows/dataentry.c:1222
 msgid "dataentry: internal memory error"
 msgstr "dataentry: error interno de mem�ria"
 
@@ -918,43 +915,43 @@ msgstr "dataentry: error interno de mem
 msgid "internal type error in dataentry"
 msgstr "error de tipo interno en la entrada de datos"
 
-#: src/library/utils/src/windows/dataentry.c:852
+#: src/library/utils/src/windows/dataentry.c:853
 msgid "dataentry: parse error on string"
 msgstr "dataentry: error de an�lisis en cadena de"
 
-#: src/library/utils/src/windows/dataentry.c:995
+#: src/library/utils/src/windows/dataentry.c:996
 msgid "dataentry: expression too long"
 msgstr "dataentry: expresion demasiado larga"
 
-#: src/library/utils/src/windows/dataentry.c:1472
+#: src/library/utils/src/windows/dataentry.c:1473
 msgid "column names cannot be blank"
 msgstr "nombres de columnas no pueden ser blancos"
 
-#: src/library/utils/src/windows/dataentry.c:1518
+#: src/library/utils/src/windows/dataentry.c:1519
 msgid "Variable editor"
 msgstr "Editor de variables"
 
-#: src/library/utils/src/windows/dataentry.c:1523
+#: src/library/utils/src/windows/dataentry.c:1524
 msgid "variable name"
 msgstr "nombre de variable"
 
-#: src/library/utils/src/windows/dataentry.c:1525
+#: src/library/utils/src/windows/dataentry.c:1526
 msgid "type"
 msgstr "tipo"
 
-#: src/library/utils/src/windows/dataentry.c:1639
+#: src/library/utils/src/windows/dataentry.c:1640
 msgid "Cell width(s)"
 msgstr "Largo(s) de celdas(s)"
 
-#: src/library/utils/src/windows/dataentry.c:1645
+#: src/library/utils/src/windows/dataentry.c:1646
 msgid "Cell width"
 msgstr "Largo de celdas"
 
-#: src/library/utils/src/windows/dataentry.c:1648
+#: src/library/utils/src/windows/dataentry.c:1649
 msgid "variable"
 msgstr "variable"
 
-#: src/library/utils/src/windows/dataentry.c:1691
+#: src/library/utils/src/windows/dataentry.c:1692
 msgid ""
 "Navigation.\n"
 "  Keyboard: cursor keys move selection\n"
@@ -998,223 +995,225 @@ msgstr ""
 "actualmente seleccionadas.\n"
 "\n"
 
-#: src/library/utils/src/windows/dataentry.c:1699
+#: src/library/utils/src/windows/dataentry.c:1700
 msgid "Copy selected cell"
 msgstr "Copiar la celda selecionada"
 
-#: src/library/utils/src/windows/dataentry.c:1700
+#: src/library/utils/src/windows/dataentry.c:1701
 msgid "Paste to selected cell"
 msgstr "Pegar la celda selecionada"
 
-#: src/library/utils/src/windows/dataentry.c:1701
+#: src/library/utils/src/windows/dataentry.c:1702
 msgid "Autosize column"
 msgstr "Autodimensionar la columna"
 
-#: src/library/utils/src/windows/dataentry.c:1797
+#: src/library/utils/src/windows/dataentry.c:1798
 msgid "Copy  \tCTRL+C"
 msgstr "Copiar  \tCTRL+C"
 
-#: src/library/utils/src/windows/dataentry.c:1799
+#: src/library/utils/src/windows/dataentry.c:1800
 msgid "Paste \tCTRL+V"
 msgstr "Pegar \tCTRL+V"
 
-#: src/library/utils/src/windows/dataentry.c:1801
+#: src/library/utils/src/windows/dataentry.c:1802
 msgid "Delete\tDEL"
 msgstr "Borrar\tDEL"
 
-#: src/library/utils/src/windows/dataentry.c:1804
+#: src/library/utils/src/windows/dataentry.c:1805
 msgid "Cell widths ..."
 msgstr "Ancho de celda ..."
 
-#: src/library/utils/src/windows/dataentry.c:1808
+#: src/library/utils/src/windows/dataentry.c:1809
 msgid "Data editor"
 msgstr "Editor de datos"
 
-#: src/library/grDevices/src/devWindows.c:932
+#: src/library/grDevices/src/devWindows.c:949
 msgid "Portable network graphics file"
 msgstr "Archivos de tipo Portable network graphics"
 
-#: src/library/grDevices/src/devWindows.c:935
+#: src/library/grDevices/src/devWindows.c:952
 msgid "Windows bitmap file"
 msgstr "Archivos de tipo Windows bitmap"
 
-#: src/library/grDevices/src/devWindows.c:938
+#: src/library/grDevices/src/devWindows.c:955
 msgid "TIFF file"
 msgstr "Archivos TIFF"
 
-#: src/library/grDevices/src/devWindows.c:941
+#: src/library/grDevices/src/devWindows.c:958
 msgid "Jpeg file"
 msgstr "Archivos jpeg"
 
-#: src/library/grDevices/src/devWindows.c:963
+#: src/library/grDevices/src/devWindows.c:980
 msgid "Postscript file"
 msgstr "Archivos postscript"
 
-#: src/library/grDevices/src/devWindows.c:975
+#: src/library/grDevices/src/devWindows.c:992
 msgid "PDF file"
 msgstr "Archivos PDF"
 
-#: src/library/grDevices/src/devWindows.c:987
+#: src/library/grDevices/src/devWindows.c:1004
 msgid "Enhanced metafiles"
 msgstr "Realzar metafiles"
 
-#: src/library/grDevices/src/devWindows.c:990
-#: src/library/grDevices/src/devWindows.c:3436
+#: src/library/grDevices/src/devWindows.c:1007
+#: src/library/grDevices/src/devWindows.c:3445
 msgid "file path selected is too long: only 512 bytes are allowed"
 msgstr ""
 "camino de archivo seleccionado es demaciado largo: solamente 512 bytes son "
 "permitidos"
 
-#: src/library/grDevices/src/devWindows.c:1201
+#: src/library/grDevices/src/devWindows.c:1218
 msgid "No plot to replace!"
 msgstr "No hay gr�fico para substituir"
 
-#: src/library/grDevices/src/devWindows.c:1249
+#: src/library/grDevices/src/devWindows.c:1268
 msgid "Variable name"
 msgstr "Nombre de variable"
 
-#: src/library/grDevices/src/devWindows.c:1258
+#: src/library/grDevices/src/devWindows.c:1277
 #, fuzzy
 msgid "Variable doesn't contain any plots!"
 msgstr "Variable inexistente o no contiene ning�n gr�fico"
 
-#: src/library/grDevices/src/devWindows.c:1273
+#: src/library/grDevices/src/devWindows.c:1292
 msgid "Name of variable to save to"
 msgstr "Nombre de variables a salvar"
 
-#: src/library/grDevices/src/devWindows.c:1582
+#: src/library/grDevices/src/devWindows.c:1601
 msgid "Copy to the clipboard as a metafile"
 msgstr "Copiar al �rea de transferencia como un metafile"
 
-#: src/library/grDevices/src/devWindows.c:1600
-#: src/library/grDevices/src/devWindows.c:1611
+#: src/library/grDevices/src/devWindows.c:1619
+#: src/library/grDevices/src/devWindows.c:1630
 msgid "Stop locator"
 msgstr "Parar localizador"
 
-#: src/library/grDevices/src/devWindows.c:1610
-#: src/library/grDevices/src/devWindows.c:1614
+#: src/library/grDevices/src/devWindows.c:1629
+#: src/library/grDevices/src/devWindows.c:1633
 msgid "Stop"
 msgstr "Parar"
 
-#: src/library/grDevices/src/devWindows.c:1616
+#: src/library/grDevices/src/devWindows.c:1635
 msgid "Continue"
 msgstr "Continuar"
 
-#: src/library/grDevices/src/devWindows.c:1620
+#: src/library/grDevices/src/devWindows.c:1639
 msgid "Next"
 msgstr "Pr�ximo"
 
-#: src/library/grDevices/src/devWindows.c:1621
+#: src/library/grDevices/src/devWindows.c:1640
 msgid "Next plot"
 msgstr "Pr�ximo gr�fico"
 
-#: src/library/grDevices/src/devWindows.c:1627
+#: src/library/grDevices/src/devWindows.c:1646
 msgid "Save as"
 msgstr "Guardar como"
 
-#: src/library/grDevices/src/devWindows.c:1636
-#: src/library/grDevices/src/devWindows.c:1638
-#: src/library/grDevices/src/devWindows.c:1640
+#: src/library/grDevices/src/devWindows.c:1655
+#: src/library/grDevices/src/devWindows.c:1657
+#: src/library/grDevices/src/devWindows.c:1659
 #, c-format
 msgid "%s quality..."
 msgstr "%s calidad..."
 
-#: src/library/grDevices/src/devWindows.c:1642
+#: src/library/grDevices/src/devWindows.c:1661
 msgid "Copy to the clipboard"
 msgstr "Copiar para el �rea de transferencia"
 
-#: src/library/grDevices/src/devWindows.c:1643
+#: src/library/grDevices/src/devWindows.c:1662
 msgid "as a Bitmap\tCTRL+C"
 msgstr "como un  Bitmap\tCTRL+C"
 
-#: src/library/grDevices/src/devWindows.c:1644
+#: src/library/grDevices/src/devWindows.c:1663
 msgid "as a Metafile\tCTRL+W"
 msgstr "como un Metafile\tCTRL+W"
 
-#: src/library/grDevices/src/devWindows.c:1647
-msgid "Print...\tCTRL+P"
-msgstr "Imprimir...\tCTRL+P"
-
-#: src/library/grDevices/src/devWindows.c:1649
+#: src/library/grDevices/src/devWindows.c:1668
 msgid "close Device"
 msgstr "cerrar Dispositivo"
 
-#: src/library/grDevices/src/devWindows.c:1650
+#: src/library/grDevices/src/devWindows.c:1669
 msgid "History"
 msgstr "Hist�rico"
 
-#: src/library/grDevices/src/devWindows.c:1651
+#: src/library/grDevices/src/devWindows.c:1670
 msgid "Recording"
 msgstr "Grabando"
 
-#: src/library/grDevices/src/devWindows.c:1654
+#: src/library/grDevices/src/devWindows.c:1673
 msgid "Add\tINS"
 msgstr "Agregar\tINS"
 
-#: src/library/grDevices/src/devWindows.c:1655
+#: src/library/grDevices/src/devWindows.c:1674
 msgid "Replace"
 msgstr "Substituir"
 
-#: src/library/grDevices/src/devWindows.c:1657
+#: src/library/grDevices/src/devWindows.c:1676
 msgid "Previous\tPgUp"
 msgstr "Anterior\tPageUp"
 
-#: src/library/grDevices/src/devWindows.c:1658
+#: src/library/grDevices/src/devWindows.c:1677
 msgid "Next\tPgDown"
 msgstr "Pr�ximo\tPageDown"
 
-#: src/library/grDevices/src/devWindows.c:1660
+#: src/library/grDevices/src/devWindows.c:1679
 msgid "Save to variable..."
 msgstr "Guardar en la variable ..."
 
-#: src/library/grDevices/src/devWindows.c:1661
+#: src/library/grDevices/src/devWindows.c:1680
 msgid "Get from variable..."
 msgstr "Obtener de la variable"
 
-#: src/library/grDevices/src/devWindows.c:1663
+#: src/library/grDevices/src/devWindows.c:1682
 msgid "Clear history"
 msgstr "Limpar hist�rico"
 
-#: src/library/grDevices/src/devWindows.c:1664
+#: src/library/grDevices/src/devWindows.c:1683
 msgid "Resize"
 msgstr "Redimensionar"
 
-#: src/library/grDevices/src/devWindows.c:1665
+#: src/library/grDevices/src/devWindows.c:1684
 msgid "R mode"
 msgstr "Modo R"
 
-#: src/library/grDevices/src/devWindows.c:1667
+#: src/library/grDevices/src/devWindows.c:1686
 msgid "Fit to window"
 msgstr "Ajuste al tama�o de ventana"
 
-#: src/library/grDevices/src/devWindows.c:1669
+#: src/library/grDevices/src/devWindows.c:1688
 msgid "Fixed size"
 msgstr "Tama�o fijo"
 
-#: src/library/grDevices/src/devWindows.c:1676
+#: src/library/grDevices/src/devWindows.c:1695
 msgid "Copy as metafile"
 msgstr "Copiar como metafile"
 
-#: src/library/grDevices/src/devWindows.c:1678
+#: src/library/grDevices/src/devWindows.c:1697
 msgid "Copy as bitmap"
 msgstr "Copiar como bitmap"
 
-#: src/library/grDevices/src/devWindows.c:1681
+#: src/library/grDevices/src/devWindows.c:1700
 msgid "Save as metafile..."
 msgstr "Guardar como metafile..."
 
-#: src/library/grDevices/src/devWindows.c:1683
+#: src/library/grDevices/src/devWindows.c:1702
 msgid "Save as postscript..."
 msgstr "Guardar como postscript..."
 
-#: src/library/grDevices/src/devWindows.c:3136
+#: src/library/grDevices/src/devWindows.c:3143
 msgid "Locator is active"
 msgstr "Localizador est� activo"
 
-#: src/library/grDevices/src/devWindows.c:3763
+#: src/library/grDevices/src/devWindows.c:3769
 msgid "Waiting to confirm page change..."
 msgstr "Esperando para confirmar cambio de p�gina..."
 
-#: src/library/grDevices/src/devWindows.c:3775
+#: src/library/grDevices/src/devWindows.c:3781
 msgid "Click or hit ENTER for next page"
 msgstr "Clique con el mouse o presione ENTER para pr�xima p�gina"
+
+#~ msgid "Print...\tCTRL+P"
+#~ msgstr "Imprimir...\tCTRL+P"
+
+#~ msgid "invalid device"
+#~ msgstr "dispositivo inv�lido"
diff --git a/src/library/base/po/RGui-fa.po b/src/library/base/po/RGui-fa.po
index 6e07a3a..04eed92 100644
--- a/src/library/base/po/RGui-fa.po
+++ b/src/library/base/po/RGui-fa.po
@@ -7,7 +7,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: R 2.15.2\n"
 "Report-Msgid-Bugs-To: bugs.r-project.org\n"
-"POT-Creation-Date: 2013-03-18 19:36+0000\n"
+"POT-Creation-Date: 2016-04-01 10:28-0700\n"
 "PO-Revision-Date: 2012-10-26 22:30+0330\n"
 "Last-Translator: Seyed Mahmood Taghavi Shahri <taghavi_m at razi.tums.ac.ir>\n"
 "Language-Team: Persian\n"
@@ -29,11 +29,11 @@ msgstr "به علت کمبود حافظه متن در کلیپ‌بود کپی 
 msgid "Unable to open the clipboard"
 msgstr "ناتوان در باز کردن کلیپ‌بود"
 
-#: src/gnuwin32/console.c:1914
+#: src/gnuwin32/console.c:1919
 msgid "Insufficient memory. Please close the console"
 msgstr "به علت کمبود حافظه لطفا کنسول را ببندید"
 
-#: src/gnuwin32/console.c:1969 src/gnuwin32/console.c:2022
+#: src/gnuwin32/console.c:1974 src/gnuwin32/console.c:2028
 #: src/gnuwin32/preferences.c:333
 #, c-format
 msgid ""
@@ -43,24 +43,24 @@ msgstr ""
 ".پیدا نشد %s-%d-%d فونت \n"
 "از فونت ثابت سیستم استفاده می‌شود"
 
-#: src/gnuwin32/console.c:2127
+#: src/gnuwin32/console.c:2133
 msgid "Save selection to"
 msgstr "ذخیره متن منتخب"
 
-#: src/gnuwin32/console.c:2129
+#: src/gnuwin32/console.c:2135
 msgid "Save console contents to"
 msgstr "ذخیره تمام متن"
 
-#: src/gnuwin32/console.c:2228
+#: src/gnuwin32/console.c:2234
 msgid "Scrolling.\n"
 msgstr "راهنمای پیمایش کنسول \n"
 
-#: src/gnuwin32/console.c:2229
+#: src/gnuwin32/console.c:2235
 msgid "  Keyboard: PgUp, PgDown, Ctrl+Arrows, Ctrl+Home, Ctrl+End,\n"
 msgstr ""
 " و کنترل کلیدهای جهتی Ctrl+End و Ctrl+Home و PgDown و PgUp :صفحه‌کلید \n"
 
-#: src/gnuwin32/console.c:2230
+#: src/gnuwin32/console.c:2236
 msgid ""
 "  Mouse: use the scrollbar(s).\n"
 "\n"
@@ -68,73 +68,73 @@ msgstr ""
 " موشی: از میله لغزشی که در لبه راست یا پایین کنسول ظاهر می‌شود استفاده کنید \n"
 "\n"
 
-#: src/gnuwin32/console.c:2231
+#: src/gnuwin32/console.c:2237
 msgid "Editing.\n"
 msgstr "راهنمای ویرایش در کنسول \n"
 
-#: src/gnuwin32/console.c:2232
+#: src/gnuwin32/console.c:2238
 msgid "  Moving the cursor: \n"
 msgstr "برای جابجایی مکان‌نمای چشمک‌زن: \n"
 
-#: src/gnuwin32/console.c:2233
+#: src/gnuwin32/console.c:2239
 msgid "     Left arrow or Ctrl+B: move backward one character;\n"
 msgstr " مکان‌نمای چشمک‌زن را یک حرف به عقب می‌برد Ctrl+B کلید جهتی چپ یا \n"
 
-#: src/gnuwin32/console.c:2234
+#: src/gnuwin32/console.c:2240
 msgid "     Right arrow or Ctrl+F: move forward one character;\n"
 msgstr " مکان‌نمای چشمک‌زن را یک حرف به جلو می‌برد Ctrl+F کلید جهتی راست یا \n"
 
-#: src/gnuwin32/console.c:2235
+#: src/gnuwin32/console.c:2241
 msgid "     Home or Ctrl+A: go to beginning of line;\n"
 msgstr " مکان‌نمای چشمک‌زن را به ابتدای خط انتقال می‌دهد Ctrl+A یا Home \n"
 
-#: src/gnuwin32/console.c:2236
+#: src/gnuwin32/console.c:2242
 msgid "     End or Ctrl+E: go to end of line;\n"
 msgstr " مکان‌نمای چشمک‌زن را به انتهای خط انتقال می‌دهد Ctrl+E یا End \n"
 
-#: src/gnuwin32/console.c:2237
+#: src/gnuwin32/console.c:2243
 msgid "  History: Up and Down Arrows, Ctrl+P, Ctrl+N\n"
 msgstr ""
 " تاریخچه را نشان می‌دهند Ctrl+N و Ctrl+P کلیدهای جهتی بالا و پایین یا \n"
 
-#: src/gnuwin32/console.c:2238
+#: src/gnuwin32/console.c:2244
 msgid "  Deleting:\n"
 msgstr "برای پاک کردن متن: \n"
 
-#: src/gnuwin32/console.c:2239
+#: src/gnuwin32/console.c:2245
 msgid "     Del or Ctrl+D: delete current character or selection;\n"
 msgstr " حرف (جاری) سمت راست یا محدوده منتخب را پاک می‌کند Ctrl+D یا Del \n"
 
-#: src/gnuwin32/console.c:2240
+#: src/gnuwin32/console.c:2246
 msgid "     Backspace: delete preceding character;\n"
 msgstr " حرف (قبلی) سمت چپ را پاک می‌کند Backspace \n"
 
-#: src/gnuwin32/console.c:2241
+#: src/gnuwin32/console.c:2247
 msgid ""
 "     Ctrl+Del or Ctrl+K: delete text from current character to end of line.\n"
 msgstr ""
 " از حرف (جاری) سمت راست تا انتهای خط را پاک می‌کند Ctrl+K یا Ctrl+Del \n"
 
-#: src/gnuwin32/console.c:2242
+#: src/gnuwin32/console.c:2248
 msgid "     Ctrl+U: delete all text from current line.\n"
 msgstr " نمام متن خط جاری را پاک می‌کند Ctrl+U \n"
 
-#: src/gnuwin32/console.c:2243
+#: src/gnuwin32/console.c:2249
 msgid "  Copy and paste.\n"
 msgstr "برای کپی و جای گذاری: \n"
 
-#: src/gnuwin32/console.c:2244
+#: src/gnuwin32/console.c:2250
 msgid ""
 "     Use the mouse (with the left button held down) to mark (select) text.\n"
 msgstr ""
 " برای علامت‌گذاری متن (انتخاب) از موشی (با نگه داشتن دکمه چپ) استفاده کنید \n"
 
-#: src/gnuwin32/console.c:2245
+#: src/gnuwin32/console.c:2251
 msgid ""
 "     Use Shift+Del (or Ctrl+C) to copy the marked text to the clipboard and\n"
 msgstr " برای کپی متن علامت‌گذاری به کلیپ‌بورد بکار می‌رود Shift+Del یا Ctrl+C \n"
 
-#: src/gnuwin32/console.c:2246
+#: src/gnuwin32/console.c:2252
 msgid ""
 "     Shift+Ins (or Ctrl+V or Ctrl+Y) to paste the content of the clipboard "
 "(if any)  \n"
@@ -142,27 +142,27 @@ msgstr ""
 " در کنسول برای Shift+Ins یا Ctrl+Y یا Ctrl+V \n"
 " جای گذاری محتوای کلیپ‌بورد (اگر وجود داشته باشد) بکار می‌رود \n"
 
-#: src/gnuwin32/console.c:2247
+#: src/gnuwin32/console.c:2253
 msgid "     to the console, Ctrl+X first copy then paste\n"
 msgstr " از متن کپی گرفته و همزمان جای گذاری می کند Ctrl+X \n"
 
-#: src/gnuwin32/console.c:2248
+#: src/gnuwin32/console.c:2254
 msgid "  Misc:\n"
 msgstr "راهنمای موارد دیگر \n"
 
-#: src/gnuwin32/console.c:2249
+#: src/gnuwin32/console.c:2255
 msgid "     Ctrl+L: Clear the console.\n"
 msgstr " متن کنسول را پاک می‌کند Ctrl+L \n"
 
-#: src/gnuwin32/console.c:2250
+#: src/gnuwin32/console.c:2256
 msgid "     Ctrl+O or INS: Toggle overwrite mode: initially off.\n"
 msgstr " حالت جای‌نوشت را که ابتدائا خاموش است روشن می‌کند Ctrl+O یا INS \n"
 
-#: src/gnuwin32/console.c:2251
+#: src/gnuwin32/console.c:2257
 msgid "     Ctrl+T: Interchange current char with one to the left.\n"
 msgstr " حروف راست و چپ مکان‌نمای چشمک‌زن را با هم عوض می‌کند Ctrl+T \n"
 
-#: src/gnuwin32/console.c:2252
+#: src/gnuwin32/console.c:2258
 msgid ""
 "\n"
 "Note: Console is updated only when some input is required.\n"
@@ -170,7 +170,7 @@ msgstr ""
 "\n"
 " نکته: بطور پیش‌فرض خروجی کنسول غیر لحظه‌ای نمایش داده می‌شود \n"
 
-#: src/gnuwin32/console.c:2253
+#: src/gnuwin32/console.c:2259
 msgid ""
 "  Use Ctrl+W to toggle this feature off/on.\n"
 "\n"
@@ -178,7 +178,7 @@ msgstr ""
 " بکار می‌رود Ctrl+W برای تغییر حالت خروجی به لحظه‌ای و بالعکس \n"
 "\n"
 
-#: src/gnuwin32/console.c:2254
+#: src/gnuwin32/console.c:2260
 msgid ""
 "Use ESC to stop the interpreter.\n"
 "\n"
@@ -186,7 +186,7 @@ msgstr ""
 " برای توقف محاسبات نرم‌افزار بکار می‌رود ESC \n"
 "\n"
 
-#: src/gnuwin32/console.c:2255
+#: src/gnuwin32/console.c:2261
 msgid ""
 "TAB starts completion of the current word.\n"
 "\n"
@@ -194,266 +194,267 @@ msgstr ""
 " در هنگام تایپ دستورات باعث کامل نمودن نام اشیاء و توابع می‌شود TAB \n"
 "\n"
 
-#: src/gnuwin32/console.c:2256
+#: src/gnuwin32/console.c:2262
 msgid "Standard Windows hotkeys can be used to switch to the\n"
 msgstr " با کلیدهای تعریف شده در ویندوز می‌توان بین پنجره‌ها جابه‌جا شد \n"
 
-#: src/gnuwin32/console.c:2257
+#: src/gnuwin32/console.c:2263
 msgid "graphics device (Ctrl+Tab or Ctrl+F6 in MDI, Alt+Tab in SDI)"
 msgstr " SDI در حالت Alt+Tab و MDI در حالت Ctrl+F6 یا Ctrl+Tab"
 
-#: src/gnuwin32/editor.c:88 src/gnuwin32/editor.c:90
+#: src/gnuwin32/editor.c:91 src/gnuwin32/editor.c:93
 msgid "R Editor"
 msgstr "ویرایشگر دست‌نوشته"
 
-#: src/gnuwin32/editor.c:119
+#: src/gnuwin32/editor.c:123
 #, c-format
 msgid "unable to open file %s for reading"
 msgstr "برای خواندن %s ناتوان در باز کردن فایل"
 
-#: src/gnuwin32/editor.c:135
+#: src/gnuwin32/editor.c:139
 #, c-format
 msgid "Could not read from file '%s'"
 msgstr "را خواند '%s' نمی‌توان محتوای فایل"
 
-#: src/gnuwin32/editor.c:166
+#: src/gnuwin32/editor.c:171
 #, c-format
 msgid "Could not save file '%s'"
 msgstr "را ذخیره کرد '%s' نمی‌توان فایل"
 
-#: src/gnuwin32/editor.c:182
+#: src/gnuwin32/editor.c:187
 msgid "Save script as"
 msgstr "ذخیره دست‌نوشته به عنوان"
 
-#: src/gnuwin32/editor.c:377 src/gnuwin32/editor.c:694
-#: src/gnuwin32/pager.c:431 src/gnuwin32/rui.c:1076
+#: src/gnuwin32/editor.c:379 src/gnuwin32/editor.c:696
+#: src/gnuwin32/pager.c:430 src/gnuwin32/rui.c:1076
 msgid "Open script"
 msgstr "باز کردن دست‌نوشته"
 
-#: src/gnuwin32/editor.c:500 src/gnuwin32/pager.c:185 src/gnuwin32/pager.c:205
+#: src/gnuwin32/editor.c:502 src/gnuwin32/pager.c:184 src/gnuwin32/pager.c:204
 msgid "No RGui console to paste to"
 msgstr "نیست تا در آن جای‌گذاری شود RGui کنسول"
 
-#: src/gnuwin32/editor.c:602
+#: src/gnuwin32/editor.c:604
 msgid "R EDITOR\n"
 msgstr "راهنمای ویرایشگر دست‌نوشته \n"
 
-#: src/gnuwin32/editor.c:604
+#: src/gnuwin32/editor.c:606
 msgid "A standard text editor for editing and running R code.\n"
 msgstr "می‌باشد R ویرایشگری استاندارد برای ویرایش و اجرای دستورات \n"
 
-#: src/gnuwin32/editor.c:606
+#: src/gnuwin32/editor.c:608
 msgid "RUNNING COMMANDS\n"
 msgstr "راهنمای اجرای دستورات از داخل ویرایشگر دست‌نوشته \n"
 
-#: src/gnuwin32/editor.c:607
+#: src/gnuwin32/editor.c:609
 msgid "To run a line or section of R code, select the code and either\n"
 msgstr ""
 " مکان‌نمای چشمک‌زن را در خطی که قصد اجرای دستورات آن را دارید قرار دهید \n"
 
-#: src/gnuwin32/editor.c:608
+#: src/gnuwin32/editor.c:610
 msgid "     Press Ctrl-R\n"
 msgstr ""
 " و یا محدوده مورد نظر را با فشرده نگه داشتن دکمه چپ موشی انتخاب نمایید \n"
 
-#: src/gnuwin32/editor.c:609
+#: src/gnuwin32/editor.c:611
 msgid "     Select \"Run line or selection\" from the \"Edit\" menu\n"
 msgstr " سپس از منوی ویرایش گزینه اجرای خط جاری یا محدوده منتخب را برگزینید \n"
 
-#: src/gnuwin32/editor.c:610
+#: src/gnuwin32/editor.c:612
 msgid "     Press the \"Run line or selection\" icon on the toolbar\n"
 msgstr " را فشار دهید Ctrl-R یا شمایل مذکور در نوارابزار را تلیک کنید و یا \n"
 
-#: src/gnuwin32/editor.c:611
+#: src/gnuwin32/editor.c:613
 msgid ""
 "This will copy the selected commands to the console and evaluate them.\n"
 msgstr " مراحل فوق باعث جای گذاری کپی دستورات در کنسول و اجرای آن می‌شود \n"
 
-#: src/gnuwin32/editor.c:612
+#: src/gnuwin32/editor.c:614
 msgid ""
 "If there is no selection, this will just run the current line and advance\n"
 msgstr " اگر هیچ محدوده‌ای انتخاب نشده باشد، دستورات خط جاری اجرا می‌گردد \n"
 
-#: src/gnuwin32/editor.c:613
+#: src/gnuwin32/editor.c:615
 msgid "the cursor by one line.\n"
 msgstr " و پس از آن مکان‌نمای چشمک‌زن به ابتدای خط بعد منتقل می‌شود \n"
 
-#: src/gnuwin32/editor.c:625 src/gnuwin32/editor.c:702
-#: src/gnuwin32/editor.c:760
+#: src/gnuwin32/editor.c:627 src/gnuwin32/editor.c:704
+#: src/gnuwin32/editor.c:762
 msgid "Run line or selection"
 msgstr "اجرای خط جاری یا محدوده منتخب"
 
-#: src/gnuwin32/editor.c:627 src/gnuwin32/editor.c:745
+#: src/gnuwin32/editor.c:629 src/gnuwin32/editor.c:747
 msgid "Undo"
 msgstr "واگرد"
 
-#: src/gnuwin32/editor.c:629 src/gnuwin32/editor.c:748
+#: src/gnuwin32/editor.c:631 src/gnuwin32/editor.c:750
 msgid "Cut"
 msgstr "برش"
 
-#: src/gnuwin32/editor.c:630 src/gnuwin32/editor.c:750
-#: src/gnuwin32/pager.c:305 src/gnuwin32/pager.c:478 src/gnuwin32/rui.c:859
+#: src/gnuwin32/editor.c:632 src/gnuwin32/editor.c:752
+#: src/gnuwin32/pager.c:304 src/gnuwin32/pager.c:477 src/gnuwin32/rui.c:859
 #: src/gnuwin32/rui.c:1088 src/gnuwin32/rui.c:1144
 msgid "Copy"
 msgstr "کپی"
 
-#: src/gnuwin32/editor.c:631 src/gnuwin32/editor.c:752 src/gnuwin32/rui.c:860
+#: src/gnuwin32/editor.c:633 src/gnuwin32/editor.c:754 src/gnuwin32/rui.c:860
 #: src/gnuwin32/rui.c:1092 src/gnuwin32/rui.c:1145
 msgid "Paste"
 msgstr "جای گذاری"
 
-#: src/gnuwin32/editor.c:632 src/gnuwin32/editor.c:754
+#: src/gnuwin32/editor.c:634 src/gnuwin32/editor.c:756
 msgid "Delete"
 msgstr "حذف"
 
-#: src/gnuwin32/editor.c:634 src/gnuwin32/editor.c:756
-#: src/gnuwin32/pager.c:308 src/gnuwin32/pager.c:484 src/gnuwin32/rui.c:866
+#: src/gnuwin32/editor.c:636 src/gnuwin32/editor.c:758
+#: src/gnuwin32/pager.c:307 src/gnuwin32/pager.c:483 src/gnuwin32/rui.c:866
 #: src/gnuwin32/rui.c:1149
 msgid "Select all"
 msgstr "انتخاب همه"
 
-#: src/gnuwin32/editor.c:698
+#: src/gnuwin32/editor.c:700
 msgid "Save script"
 msgstr "ذخیره دست‌نوشته"
 
-#: src/gnuwin32/editor.c:706 src/gnuwin32/pager.c:451
-#: src/library/grDevices/src/devWindows.c:1594
+#: src/gnuwin32/editor.c:708 src/gnuwin32/pager.c:450
+#: src/library/grDevices/src/devWindows.c:1613
 msgid "Return focus to Console"
 msgstr "بازگشت به کنسول"
 
-#: src/gnuwin32/editor.c:709
+#: src/gnuwin32/editor.c:711
 msgid "Print script"
 msgstr "چاپ دست‌نوشته"
 
-#: src/gnuwin32/editor.c:711 src/gnuwin32/pager.c:446 src/gnuwin32/rui.c:1104
-#: src/library/grDevices/src/devWindows.c:1588
+#: src/gnuwin32/editor.c:713 src/gnuwin32/pager.c:445 src/gnuwin32/rui.c:1104
+#: src/library/grDevices/src/devWindows.c:1607
 msgid "Print"
 msgstr "چاپ"
 
-#: src/gnuwin32/editor.c:729 src/gnuwin32/pager.c:467 src/gnuwin32/rui.c:1122
-#: src/library/utils/src/windows/dataentry.c:1790
-#: src/library/grDevices/src/devWindows.c:1626
+#: src/gnuwin32/editor.c:731 src/gnuwin32/pager.c:466 src/gnuwin32/rui.c:1122
+#: src/library/utils/src/windows/dataentry.c:1791
+#: src/library/grDevices/src/devWindows.c:1645
 msgid "File"
 msgstr "پرونده"
 
-#: src/gnuwin32/editor.c:730 src/gnuwin32/pager.c:468 src/gnuwin32/rui.c:1124
+#: src/gnuwin32/editor.c:732 src/gnuwin32/pager.c:467 src/gnuwin32/rui.c:1124
 msgid "New script"
 msgstr "دست‌نوشته جدید"
 
-#: src/gnuwin32/editor.c:732 src/gnuwin32/pager.c:469 src/gnuwin32/rui.c:1125
+#: src/gnuwin32/editor.c:734 src/gnuwin32/pager.c:468 src/gnuwin32/rui.c:1125
 msgid "Open script..."
 msgstr "باز کردن دست‌نوشته ..."
 
-#: src/gnuwin32/editor.c:734
+#: src/gnuwin32/editor.c:736
 msgid "Save"
 msgstr "ذخیره دست‌نوشته"
 
-#: src/gnuwin32/editor.c:736
+#: src/gnuwin32/editor.c:738
 msgid "Save as..."
 msgstr "ذخیره دست‌نوشته به عنوان ..."
 
-#: src/gnuwin32/editor.c:739 src/gnuwin32/pager.c:470 src/gnuwin32/rui.c:1138
-#: src/library/grDevices/src/devWindows.c:1689
+#: src/gnuwin32/editor.c:741 src/gnuwin32/pager.c:469 src/gnuwin32/rui.c:1138
+#: src/library/grDevices/src/devWindows.c:1666
+#: src/library/grDevices/src/devWindows.c:1708
 msgid "Print..."
 msgstr "چاپ ..."
 
-#: src/gnuwin32/editor.c:742
+#: src/gnuwin32/editor.c:744
 msgid "Close script"
 msgstr "بستن دست‌نوشته"
 
-#: src/gnuwin32/editor.c:744 src/gnuwin32/pager.c:477 src/gnuwin32/rui.c:1143
-#: src/library/utils/src/windows/dataentry.c:1796
+#: src/gnuwin32/editor.c:746 src/gnuwin32/pager.c:476 src/gnuwin32/rui.c:1143
+#: src/library/utils/src/windows/dataentry.c:1797
 msgid "Edit"
 msgstr "ویرایش"
 
-#: src/gnuwin32/editor.c:758 src/gnuwin32/rui.c:1150
+#: src/gnuwin32/editor.c:760 src/gnuwin32/rui.c:1150
 msgid "Clear console"
 msgstr "پاک کردن متن کنسول"
 
-#: src/gnuwin32/editor.c:762
+#: src/gnuwin32/editor.c:764
 msgid "Run all"
 msgstr "اجرای تمامی دستورات"
 
-#: src/gnuwin32/editor.c:765
+#: src/gnuwin32/editor.c:767
 msgid "Find..."
 msgstr "یافتن متن ..."
 
-#: src/gnuwin32/editor.c:767
+#: src/gnuwin32/editor.c:769
 msgid "Replace..."
 msgstr "جایگزینی متن ..."
 
-#: src/gnuwin32/editor.c:770 src/gnuwin32/rui.c:1154
+#: src/gnuwin32/editor.c:772 src/gnuwin32/rui.c:1154
 msgid "GUI preferences..."
 msgstr "تنظیمات ظاهری ..."
 
-#: src/gnuwin32/editor.c:780 src/gnuwin32/rui.c:1186
-#: src/library/utils/src/windows/dataentry.c:1697
-#: src/library/utils/src/windows/dataentry.c:1807
+#: src/gnuwin32/editor.c:782 src/gnuwin32/rui.c:1186
+#: src/library/utils/src/windows/dataentry.c:1698
+#: src/library/utils/src/windows/dataentry.c:1808
 msgid "Help"
 msgstr "راهنما"
 
-#: src/gnuwin32/editor.c:781
+#: src/gnuwin32/editor.c:783
 msgid "Editor"
 msgstr "راهنمای ویرایشگر دست‌نوشته"
 
-#: src/gnuwin32/editor.c:840
+#: src/gnuwin32/editor.c:842
 msgid "Maximum number of editors reached"
 msgstr "به محدودیت در حداکثر تعداد ویرایشگر دست‌نوشته رسیدید"
 
-#: src/gnuwin32/editor.c:845
+#: src/gnuwin32/editor.c:847
 msgid "Unable to create editor window"
 msgstr "ناتوان در ایجاد پنجره ویرایشگر دست‌نوشته"
 
-#: src/gnuwin32/editor.c:853
+#: src/gnuwin32/editor.c:855
 msgid "Untitled"
 msgstr "بدون عنوان"
 
-#: src/gnuwin32/extra.c:823 src/gnuwin32/rui.c:1224
+#: src/gnuwin32/extra.c:825
 msgid "Select file"
 msgstr "انتخاب پرونده"
 
-#: src/gnuwin32/pager.c:89
+#: src/gnuwin32/pager.c:88
 msgid "Error opening file"
 msgstr "خطا در باز کردن فایل"
 
-#: src/gnuwin32/pager.c:96
+#: src/gnuwin32/pager.c:95
 msgid "Insufficient memory to display file in internal pager"
 msgstr "حافظه برای نمایش پرونده در پیجر داخلی کافی نمی‌باشد"
 
-#: src/gnuwin32/pager.c:177 src/gnuwin32/pager.c:189 src/gnuwin32/pager.c:209
+#: src/gnuwin32/pager.c:176 src/gnuwin32/pager.c:188 src/gnuwin32/pager.c:208
 #: src/gnuwin32/rui.c:237 src/gnuwin32/rui.c:264
 msgid "No selection"
 msgstr "انتخابی صورت نگرفته است"
 
-#: src/gnuwin32/pager.c:306 src/gnuwin32/pager.c:436 src/gnuwin32/pager.c:480
+#: src/gnuwin32/pager.c:305 src/gnuwin32/pager.c:435 src/gnuwin32/pager.c:479
 msgid "Paste to console"
 msgstr "جای گذاری در کنسول"
 
-#: src/gnuwin32/pager.c:307 src/gnuwin32/pager.c:441 src/gnuwin32/pager.c:482
+#: src/gnuwin32/pager.c:306 src/gnuwin32/pager.c:440 src/gnuwin32/pager.c:481
 msgid "Paste commands to console"
 msgstr "جای گذاری فقط دستورات در کنسول"
 
-#: src/gnuwin32/pager.c:310 src/gnuwin32/rui.c:869
-#: src/library/utils/src/windows/dataentry.c:1703
-#: src/library/grDevices/src/devWindows.c:1686
+#: src/gnuwin32/pager.c:309 src/gnuwin32/rui.c:869
+#: src/library/utils/src/windows/dataentry.c:1704
+#: src/library/grDevices/src/devWindows.c:1705
 msgid "Stay on top"
 msgstr "همیشه رو ماندن"
 
-#: src/gnuwin32/pager.c:312 src/gnuwin32/pager.c:475
-#: src/library/utils/src/windows/dataentry.c:1705
-#: src/library/utils/src/windows/dataentry.c:1792
+#: src/gnuwin32/pager.c:311 src/gnuwin32/pager.c:474
+#: src/library/utils/src/windows/dataentry.c:1706
+#: src/library/utils/src/windows/dataentry.c:1793
 msgid "Close"
 msgstr "بستن"
 
-#: src/gnuwin32/pager.c:472 src/gnuwin32/rui.c:1139
+#: src/gnuwin32/pager.c:471 src/gnuwin32/rui.c:1139
 msgid "Save to File..."
 msgstr "ذخیره متن منتخب ..."
 
-#: src/gnuwin32/pager.c:487 src/gnuwin32/rui.c:1156
+#: src/gnuwin32/pager.c:486 src/gnuwin32/rui.c:1156
 msgid "View"
 msgstr "نما"
 
-#: src/gnuwin32/pager.c:519
+#: src/gnuwin32/pager.c:518
 msgid "Unable to create pager window"
 msgstr "ناتوان در ایجاد پنجره پیجر"
 
@@ -608,7 +609,8 @@ msgid "Update packages..."
 msgstr "به روزرسانی بسته‌ها ..."
 
 #: src/gnuwin32/rui.c:920
-msgid "Install package(s) from local zip files..."
+#, fuzzy
+msgid "Install package(s) from local files..."
 msgstr "zip نصب بسته بوسیله پرونده ..."
 
 #: src/gnuwin32/rui.c:944
@@ -775,52 +777,52 @@ msgstr "نمایش مسیرهای در دسترس"
 msgid "Console"
 msgstr "راهنمای کنسول"
 
-#: src/gnuwin32/rui.c:1268
+#: src/gnuwin32/rui.c:1251
 msgid "'mname' is limited to 1000 bytes"
 msgstr "به 1000 بایت محدود می‌باشد 'mname'"
 
-#: src/gnuwin32/rui.c:1310
+#: src/gnuwin32/rui.c:1293
 #, c-format
 msgid "menu %s does not exist"
 msgstr "موجود نمی‌باشد %s منوی"
 
-#: src/gnuwin32/rui.c:1363
+#: src/gnuwin32/rui.c:1346
 msgid "'menu' is limited to 500 bytes"
 msgstr "به 500 بایت محدود می‌باشد 'menu'"
 
-#: src/gnuwin32/rui.c:1373
+#: src/gnuwin32/rui.c:1356
 msgid "base menu does not exist"
 msgstr "منوی پایه موجود نمی‌باشد"
 
-#: src/gnuwin32/rui.c:1388
+#: src/gnuwin32/rui.c:1371
 msgid "failed to allocate menu"
 msgstr "موفق نشدن در تخصیص منو"
 
-#: src/gnuwin32/rui.c:1405 src/gnuwin32/rui.c:1529
+#: src/gnuwin32/rui.c:1388 src/gnuwin32/rui.c:1512
 msgid "menu + item is limited to 1000 bytes"
 msgstr "منو و گزینه‌های آن به 1000 بایت محدود می‌باشد"
 
-#: src/gnuwin32/rui.c:1413 src/gnuwin32/rui.c:1496
+#: src/gnuwin32/rui.c:1396 src/gnuwin32/rui.c:1479
 msgid "menu does not exist"
 msgstr "منو موجود نمی‌باشد"
 
-#: src/gnuwin32/rui.c:1431 src/gnuwin32/rui.c:1454 src/gnuwin32/rui.c:1459
+#: src/gnuwin32/rui.c:1414 src/gnuwin32/rui.c:1437 src/gnuwin32/rui.c:1442
 msgid "failed to allocate char storage"
 msgstr "موفق نشدن در تخصیص انباره کارکتر"
 
-#: src/gnuwin32/rui.c:1467
+#: src/gnuwin32/rui.c:1450
 msgid "failed to allocate menuitem"
 msgstr "موفق نشدن در تخصیص گزینه منو"
 
-#: src/gnuwin32/rui.c:1519
+#: src/gnuwin32/rui.c:1502
 msgid "menu not found"
 msgstr "منو پیدا نشد"
 
-#: src/gnuwin32/rui.c:1537
+#: src/gnuwin32/rui.c:1520
 msgid "menu or item does not exist"
 msgstr "منو یا گزینه موجود نیست"
 
-#: src/gnuwin32/system.c:442
+#: src/gnuwin32/system.c:446
 msgid "Save workspace image?"
 msgstr "فضای کار در مکان پوشه کاری ذخیره شود؟"
 
@@ -828,41 +830,41 @@ msgstr "فضای کار در مکان پوشه کاری ذخیره شود؟"
 msgid "Insufficient memory: cell not copied to the clipboard"
 msgstr "به علت کمبود حافظه سلول در کلیپ‌بورد کپی نشد"
 
-#: src/extra/graphapp/dialogs.c:147 src/extra/graphapp/dialogs.c:164
-#: src/extra/graphapp/dialogs.c:181
+#: src/extra/graphapp/dialogs.c:148 src/extra/graphapp/dialogs.c:165
+#: src/extra/graphapp/dialogs.c:182
 msgid "Question"
 msgstr "سوال"
 
-#: src/extra/graphapp/dialogs.c:202
+#: src/extra/graphapp/dialogs.c:203
 msgid " Change working directory to:"
 msgstr "مکان پوشه کاری را می توانید تغییر دهید:"
 
-#: src/extra/graphapp/dialogs.c:205
+#: src/extra/graphapp/dialogs.c:206
 #, c-format
 msgid "Unable to set '%s' as working directory"
 msgstr "به عنوان پوشه‌کاری '%s' ناتوان در تنظیم"
 
-#: src/extra/graphapp/dialogs.c:602 src/extra/graphapp/dialogs.c:620
-#: src/extra/graphapp/dialogs.c:626 src/extra/graphapp/dialogs.c:725
-#: src/extra/graphapp/dialogs.c:739 src/extra/graphapp/dialogs.c:745
+#: src/extra/graphapp/dialogs.c:604 src/extra/graphapp/dialogs.c:622
+#: src/extra/graphapp/dialogs.c:628 src/extra/graphapp/dialogs.c:727
+#: src/extra/graphapp/dialogs.c:741 src/extra/graphapp/dialogs.c:747
 #: src/library/utils/src/windows/widgets.c:125
 msgid "Cancel"
 msgstr " لغو "
 
-#: src/extra/graphapp/dialogs.c:622 src/extra/graphapp/dialogs.c:741
+#: src/extra/graphapp/dialogs.c:624 src/extra/graphapp/dialogs.c:743
 #: src/library/utils/src/windows/widgets.c:124
 msgid "OK"
 msgstr "تایید"
 
-#: src/extra/graphapp/dialogs.c:733
+#: src/extra/graphapp/dialogs.c:735
 msgid "User"
 msgstr "نام کاربری"
 
-#: src/extra/graphapp/dialogs.c:734
+#: src/extra/graphapp/dialogs.c:736
 msgid "Password"
 msgstr "رمز ورود"
 
-#: src/extra/graphapp/dialogs.c:900 src/extra/graphapp/dialogs.c:906
+#: src/extra/graphapp/dialogs.c:902 src/extra/graphapp/dialogs.c:908
 #, c-format
 msgid "\"%s\" not found"
 msgstr "پیدا نشد \"%s\""
@@ -872,9 +874,9 @@ msgid "Arrange Icons"
 msgstr "مرتب کردن آیکونی"
 
 #: src/library/utils/src/windows/dataentry.c:223
-#: src/library/utils/src/windows/dataentry.c:1850
-#: src/library/utils/src/windows/dataentry.c:1853
-#: src/library/utils/src/windows/dataentry.c:1884
+#: src/library/utils/src/windows/dataentry.c:1851
+#: src/library/utils/src/windows/dataentry.c:1854
+#: src/library/utils/src/windows/dataentry.c:1885
 msgid "invalid argument"
 msgstr "آرگومان نامعتبر"
 
@@ -886,17 +888,12 @@ msgstr "نوع نامعتبر برای مقدار"
 msgid "Data Editor"
 msgstr "ویرایشگر داده"
 
-#: src/library/utils/src/windows/dataentry.c:282
-#: src/library/utils/src/windows/dataentry.c:1891
-msgid "invalid device"
-msgstr "دستگاه نامعتبر"
-
 #: src/library/utils/src/windows/dataentry.c:331
 msgid "dataentry: internal memory problem"
 msgstr "ورود داده‌ها: مشکل حافظه داخلی"
 
 #: src/library/utils/src/windows/dataentry.c:634
-#: src/library/utils/src/windows/dataentry.c:1221
+#: src/library/utils/src/windows/dataentry.c:1222
 msgid "dataentry: internal memory error"
 msgstr "ورود داده‌ها: خطای حافظه داخلی"
 
@@ -905,43 +902,43 @@ msgstr "ورود داده‌ها: خطای حافظه داخلی"
 msgid "internal type error in dataentry"
 msgstr "خطای نوع داخلی در ورود داده‌ها"
 
-#: src/library/utils/src/windows/dataentry.c:852
+#: src/library/utils/src/windows/dataentry.c:853
 msgid "dataentry: parse error on string"
 msgstr "ورود داده‌ها: خطای تجزیه کردن رشته متنی"
 
-#: src/library/utils/src/windows/dataentry.c:995
+#: src/library/utils/src/windows/dataentry.c:996
 msgid "dataentry: expression too long"
 msgstr "ورود داده‌ها: عبارت بسیار طولانی می‌باشد"
 
-#: src/library/utils/src/windows/dataentry.c:1472
+#: src/library/utils/src/windows/dataentry.c:1473
 msgid "column names cannot be blank"
 msgstr "‌ستون بدون نام است! نامی بنویسید"
 
-#: src/library/utils/src/windows/dataentry.c:1518
+#: src/library/utils/src/windows/dataentry.c:1519
 msgid "Variable editor"
 msgstr "تنظیم خصوصیات ستون"
 
-#: src/library/utils/src/windows/dataentry.c:1523
+#: src/library/utils/src/windows/dataentry.c:1524
 msgid "variable name"
 msgstr "نام ستون"
 
-#: src/library/utils/src/windows/dataentry.c:1525
+#: src/library/utils/src/windows/dataentry.c:1526
 msgid "type"
 msgstr "نوع ستون"
 
-#: src/library/utils/src/windows/dataentry.c:1639
+#: src/library/utils/src/windows/dataentry.c:1640
 msgid "Cell width(s)"
 msgstr "تنظیم عرض ستون‌ها"
 
-#: src/library/utils/src/windows/dataentry.c:1645
+#: src/library/utils/src/windows/dataentry.c:1646
 msgid "Cell width"
 msgstr "مقدار پهنا"
 
-#: src/library/utils/src/windows/dataentry.c:1648
+#: src/library/utils/src/windows/dataentry.c:1649
 msgid "variable"
 msgstr "آزاد"
 
-#: src/library/utils/src/windows/dataentry.c:1691
+#: src/library/utils/src/windows/dataentry.c:1692
 msgid ""
 "Navigation.\n"
 "  Keyboard: cursor keys move selection\n"
@@ -983,221 +980,223 @@ msgstr ""
 " با راست تلیک نیز گزینه‌های مورد نیاز ظاهر می‌شود \n"
 "\n"
 
-#: src/library/utils/src/windows/dataentry.c:1699
+#: src/library/utils/src/windows/dataentry.c:1700
 msgid "Copy selected cell"
 msgstr "کپی از سلول انتخاب شده"
 
-#: src/library/utils/src/windows/dataentry.c:1700
+#: src/library/utils/src/windows/dataentry.c:1701
 msgid "Paste to selected cell"
 msgstr "جای گذاری در سلول انتخاب شده"
 
-#: src/library/utils/src/windows/dataentry.c:1701
+#: src/library/utils/src/windows/dataentry.c:1702
 msgid "Autosize column"
 msgstr "تنظیم خودکار عرض ستون"
 
-#: src/library/utils/src/windows/dataentry.c:1797
+#: src/library/utils/src/windows/dataentry.c:1798
 msgid "Copy  \tCTRL+C"
 msgstr "کپی \tCTRL+C"
 
-#: src/library/utils/src/windows/dataentry.c:1799
+#: src/library/utils/src/windows/dataentry.c:1800
 msgid "Paste \tCTRL+V"
 msgstr "جای گذاری \tCTRL+V"
 
-#: src/library/utils/src/windows/dataentry.c:1801
+#: src/library/utils/src/windows/dataentry.c:1802
 msgid "Delete\tDEL"
 msgstr "پاک کردن \tDEL"
 
-#: src/library/utils/src/windows/dataentry.c:1804
+#: src/library/utils/src/windows/dataentry.c:1805
 msgid "Cell widths ..."
 msgstr "‌عرض ستون‌ها ..."
 
-#: src/library/utils/src/windows/dataentry.c:1808
+#: src/library/utils/src/windows/dataentry.c:1809
 msgid "Data editor"
 msgstr "راهنمای ویرایشگر داده"
 
-#: src/library/grDevices/src/devWindows.c:932
+#: src/library/grDevices/src/devWindows.c:949
 msgid "Portable network graphics file"
 msgstr "Png ذخیره تصویر در قالب"
 
-#: src/library/grDevices/src/devWindows.c:935
+#: src/library/grDevices/src/devWindows.c:952
 msgid "Windows bitmap file"
 msgstr "Bitmap ذخیره تصویر در قالب"
 
-#: src/library/grDevices/src/devWindows.c:938
+#: src/library/grDevices/src/devWindows.c:955
 msgid "TIFF file"
 msgstr "TIFF ذخیره تصویر در قالب"
 
-#: src/library/grDevices/src/devWindows.c:941
+#: src/library/grDevices/src/devWindows.c:958
 msgid "Jpeg file"
 msgstr "Jpeg ذخیره تصویر در قالب"
 
-#: src/library/grDevices/src/devWindows.c:963
+#: src/library/grDevices/src/devWindows.c:980
 msgid "Postscript file"
 msgstr "Postscript ذخیره تصویر در قالب"
 
-#: src/library/grDevices/src/devWindows.c:975
+#: src/library/grDevices/src/devWindows.c:992
 msgid "PDF file"
 msgstr "PDF ذخیره تصویر در قالب"
 
-#: src/library/grDevices/src/devWindows.c:987
+#: src/library/grDevices/src/devWindows.c:1004
 msgid "Enhanced metafiles"
 msgstr "Metafile ذخیره تصویر در قالب"
 
-#: src/library/grDevices/src/devWindows.c:990
-#: src/library/grDevices/src/devWindows.c:3436
+#: src/library/grDevices/src/devWindows.c:1007
+#: src/library/grDevices/src/devWindows.c:3445
 msgid "file path selected is too long: only 512 bytes are allowed"
 msgstr "مسیر پرونده انتخاب شده بسیار طولانی است؛ فقط 512 بایت مجاز می‌باشد"
 
-#: src/library/grDevices/src/devWindows.c:1201
+#: src/library/grDevices/src/devWindows.c:1218
 msgid "No plot to replace!"
 msgstr "!تصویری وجود ندارد تا جایگزین شود"
 
-#: src/library/grDevices/src/devWindows.c:1249
+#: src/library/grDevices/src/devWindows.c:1268
 msgid "Variable name"
 msgstr "نام متغیر تصویرها را بنویسید"
 
-#: src/library/grDevices/src/devWindows.c:1258
+#: src/library/grDevices/src/devWindows.c:1277
 #, fuzzy
 msgid "Variable doesn't contain any plots!"
 msgstr "متغیری با این نام وجود ندارد یا دارای تصویر نمی‌باشد"
 
-#: src/library/grDevices/src/devWindows.c:1273
+#: src/library/grDevices/src/devWindows.c:1292
 msgid "Name of variable to save to"
 msgstr "نامی برای متغیر بنویسید"
 
-#: src/library/grDevices/src/devWindows.c:1582
+#: src/library/grDevices/src/devWindows.c:1601
 msgid "Copy to the clipboard as a metafile"
 msgstr "metafile کپی به کلیپ‌بورد به عنوان"
 
-#: src/library/grDevices/src/devWindows.c:1600
-#: src/library/grDevices/src/devWindows.c:1611
+#: src/library/grDevices/src/devWindows.c:1619
+#: src/library/grDevices/src/devWindows.c:1630
 msgid "Stop locator"
 msgstr "توقف مختصات‌یاب"
 
-#: src/library/grDevices/src/devWindows.c:1610
-#: src/library/grDevices/src/devWindows.c:1614
+#: src/library/grDevices/src/devWindows.c:1629
+#: src/library/grDevices/src/devWindows.c:1633
 msgid "Stop"
 msgstr "توقف"
 
-#: src/library/grDevices/src/devWindows.c:1616
+#: src/library/grDevices/src/devWindows.c:1635
 msgid "Continue"
 msgstr "ادامه"
 
-#: src/library/grDevices/src/devWindows.c:1620
+#: src/library/grDevices/src/devWindows.c:1639
 msgid "Next"
 msgstr "بعدی"
 
-#: src/library/grDevices/src/devWindows.c:1621
+#: src/library/grDevices/src/devWindows.c:1640
 msgid "Next plot"
 msgstr "تصویر بعد"
 
-#: src/library/grDevices/src/devWindows.c:1627
+#: src/library/grDevices/src/devWindows.c:1646
 msgid "Save as"
 msgstr "ذخیره تصویر به عنوان ..."
 
-#: src/library/grDevices/src/devWindows.c:1636
-#: src/library/grDevices/src/devWindows.c:1638
-#: src/library/grDevices/src/devWindows.c:1640
+#: src/library/grDevices/src/devWindows.c:1655
+#: src/library/grDevices/src/devWindows.c:1657
+#: src/library/grDevices/src/devWindows.c:1659
 #, c-format
 msgid "%s quality..."
 msgstr "%s با کیفیت ..."
 
-#: src/library/grDevices/src/devWindows.c:1642
+#: src/library/grDevices/src/devWindows.c:1661
 msgid "Copy to the clipboard"
 msgstr "کپی به کلیپ‌بورد"
 
-#: src/library/grDevices/src/devWindows.c:1643
+#: src/library/grDevices/src/devWindows.c:1662
 msgid "as a Bitmap\tCTRL+C"
 msgstr "Bitmap به عنوان \tCTRL+C"
 
-#: src/library/grDevices/src/devWindows.c:1644
+#: src/library/grDevices/src/devWindows.c:1663
 msgid "as a Metafile\tCTRL+W"
 msgstr "Metafile به عنوان \tCTRL+W"
 
-#: src/library/grDevices/src/devWindows.c:1647
-msgid "Print...\tCTRL+P"
-msgstr "چاپ ... \tCTRL+P"
-
-#: src/library/grDevices/src/devWindows.c:1649
+#: src/library/grDevices/src/devWindows.c:1668
 msgid "close Device"
 msgstr "گرافیک Device بستن"
 
-#: src/library/grDevices/src/devWindows.c:1650
+#: src/library/grDevices/src/devWindows.c:1669
 msgid "History"
 msgstr "حافظه تصویری"
 
-#: src/library/grDevices/src/devWindows.c:1651
+#: src/library/grDevices/src/devWindows.c:1670
 msgid "Recording"
 msgstr "حالت ضبط تصویرها"
 
-#: src/library/grDevices/src/devWindows.c:1654
+#: src/library/grDevices/src/devWindows.c:1673
 msgid "Add\tINS"
 msgstr "افزودن تصویر \tINS"
 
-#: src/library/grDevices/src/devWindows.c:1655
+#: src/library/grDevices/src/devWindows.c:1674
 msgid "Replace"
 msgstr "جایگزینی تصویر"
 
-#: src/library/grDevices/src/devWindows.c:1657
+#: src/library/grDevices/src/devWindows.c:1676
 msgid "Previous\tPgUp"
 msgstr "تصویر قبلی \tPgUp"
 
-#: src/library/grDevices/src/devWindows.c:1658
+#: src/library/grDevices/src/devWindows.c:1677
 msgid "Next\tPgDown"
 msgstr "تصویر بعدی \tPgDown"
 
-#: src/library/grDevices/src/devWindows.c:1660
+#: src/library/grDevices/src/devWindows.c:1679
 msgid "Save to variable..."
 msgstr "ثبت حافظه در متغیر ..."
 
-#: src/library/grDevices/src/devWindows.c:1661
+#: src/library/grDevices/src/devWindows.c:1680
 msgid "Get from variable..."
 msgstr "بازیابی بوسیله متغیر ..."
 
-#: src/library/grDevices/src/devWindows.c:1663
+#: src/library/grDevices/src/devWindows.c:1682
 msgid "Clear history"
 msgstr "پاک کردن حافظه تصویری"
 
-#: src/library/grDevices/src/devWindows.c:1664
+#: src/library/grDevices/src/devWindows.c:1683
 msgid "Resize"
 msgstr "اندازه تصویر"
 
-#: src/library/grDevices/src/devWindows.c:1665
+#: src/library/grDevices/src/devWindows.c:1684
 msgid "R mode"
 msgstr "R به سبک"
 
-#: src/library/grDevices/src/devWindows.c:1667
+#: src/library/grDevices/src/devWindows.c:1686
 msgid "Fit to window"
 msgstr "متناسب پنجره"
 
-#: src/library/grDevices/src/devWindows.c:1669
+#: src/library/grDevices/src/devWindows.c:1688
 msgid "Fixed size"
 msgstr "همیشه ثابت"
 
-#: src/library/grDevices/src/devWindows.c:1676
+#: src/library/grDevices/src/devWindows.c:1695
 msgid "Copy as metafile"
 msgstr "metafile کپی به عنوان"
 
-#: src/library/grDevices/src/devWindows.c:1678
+#: src/library/grDevices/src/devWindows.c:1697
 msgid "Copy as bitmap"
 msgstr "bitmap کپی به عنوان"
 
-#: src/library/grDevices/src/devWindows.c:1681
+#: src/library/grDevices/src/devWindows.c:1700
 msgid "Save as metafile..."
 msgstr "metafile ذخیره به عنوان ..."
 
-#: src/library/grDevices/src/devWindows.c:1683
+#: src/library/grDevices/src/devWindows.c:1702
 msgid "Save as postscript..."
 msgstr "postscript ذخیره به عنوان ..."
 
-#: src/library/grDevices/src/devWindows.c:3136
+#: src/library/grDevices/src/devWindows.c:3143
 msgid "Locator is active"
 msgstr "مختصات‌یاب فعال می‌باشد"
 
-#: src/library/grDevices/src/devWindows.c:3763
+#: src/library/grDevices/src/devWindows.c:3769
 msgid "Waiting to confirm page change..."
 msgstr "منتظر اجازه شما برای تغییر تصویر  ..."
 
-#: src/library/grDevices/src/devWindows.c:3775
+#: src/library/grDevices/src/devWindows.c:3781
 msgid "Click or hit ENTER for next page"
 msgstr "برای دیدن تصویر بعد در این پنجره تلیک کنید یا کلید اینتر را بزنید"
+
+#~ msgid "Print...\tCTRL+P"
+#~ msgstr "چاپ ... \tCTRL+P"
+
+#~ msgid "invalid device"
+#~ msgstr "دستگاه نامعتبر"
diff --git a/src/library/base/po/RGui-fr.po b/src/library/base/po/RGui-fr.po
index 1b3fdaf..2a912af 100644
--- a/src/library/base/po/RGui-fr.po
+++ b/src/library/base/po/RGui-fr.po
@@ -7,7 +7,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: RGui 2.12.0\n"
 "Report-Msgid-Bugs-To: bugs.r-project.org\n"
-"POT-Creation-Date: 2013-03-18 19:36+0000\n"
+"POT-Creation-Date: 2016-04-01 10:28-0700\n"
 "PO-Revision-Date: 2013-03-18 21:59+0100\n"
 "Last-Translator: Philippe Grosjean <phgrosjean at sciviews.org>\n"
 "Language-Team: French <R-core at r-project.org>\n"
@@ -31,11 +31,11 @@ msgstr "M
 msgid "Unable to open the clipboard"
 msgstr "Impossible d'ouvrir le presse-papier"
 
-#: src/gnuwin32/console.c:1914
+#: src/gnuwin32/console.c:1919
 msgid "Insufficient memory. Please close the console"
 msgstr "M�moire insuffisante. Veuillez refermer la console, s'il-vous-plait"
 
-#: src/gnuwin32/console.c:1969 src/gnuwin32/console.c:2022
+#: src/gnuwin32/console.c:1974 src/gnuwin32/console.c:2028
 #: src/gnuwin32/preferences.c:333
 #, c-format
 msgid ""
@@ -45,23 +45,23 @@ msgstr ""
 "La police %s-%d-%d est introuvable.\n"
 "La police syst�me non proportionnelle est utilis�e"
 
-#: src/gnuwin32/console.c:2127
+#: src/gnuwin32/console.c:2133
 msgid "Save selection to"
 msgstr "Sauver la s�lection dans"
 
-#: src/gnuwin32/console.c:2129
+#: src/gnuwin32/console.c:2135
 msgid "Save console contents to"
 msgstr "Sauver le contenu de la console dans"
 
-#: src/gnuwin32/console.c:2228
+#: src/gnuwin32/console.c:2234
 msgid "Scrolling.\n"
 msgstr "D�filement.\n"
 
-#: src/gnuwin32/console.c:2229
+#: src/gnuwin32/console.c:2235
 msgid "  Keyboard: PgUp, PgDown, Ctrl+Arrows, Ctrl+Home, Ctrl+End,\n"
 msgstr "  Clavier : PageHaut, PageBas, Ctrl+Fl�ches, Ctrl+D�but, Ctrl+Fin,\n"
 
-#: src/gnuwin32/console.c:2230
+#: src/gnuwin32/console.c:2236
 msgid ""
 "  Mouse: use the scrollbar(s).\n"
 "\n"
@@ -69,78 +69,78 @@ msgstr ""
 "  Souris : utilisez les barres de d�filement.\n"
 "\n"
 
-#: src/gnuwin32/console.c:2231
+#: src/gnuwin32/console.c:2237
 msgid "Editing.\n"
 msgstr "Edition.\n"
 
-#: src/gnuwin32/console.c:2232
+#: src/gnuwin32/console.c:2238
 msgid "  Moving the cursor: \n"
 msgstr "  D�placement du curseur : \n"
 
-#: src/gnuwin32/console.c:2233
+#: src/gnuwin32/console.c:2239
 msgid "     Left arrow or Ctrl+B: move backward one character;\n"
 msgstr ""
 "     Fl�che gauche ou Ctrl+B : se d�placer d'un caract�re vers la gauche ;\n"
 
-#: src/gnuwin32/console.c:2234
+#: src/gnuwin32/console.c:2240
 msgid "     Right arrow or Ctrl+F: move forward one character;\n"
 msgstr ""
 "     Fl�che droite ou Ctrl+F : se d�placer d'un caract�re vers la droite ;\n"
 
-#: src/gnuwin32/console.c:2235
+#: src/gnuwin32/console.c:2241
 msgid "     Home or Ctrl+A: go to beginning of line;\n"
 msgstr "     D�but ou Ctrl+A : aller au d�but de la ligne ;\n"
 
-#: src/gnuwin32/console.c:2236
+#: src/gnuwin32/console.c:2242
 msgid "     End or Ctrl+E: go to end of line;\n"
 msgstr "     Fin ou Ctrl+E : aller � la fin de la ligne ;\n"
 
-#: src/gnuwin32/console.c:2237
+#: src/gnuwin32/console.c:2243
 msgid "  History: Up and Down Arrows, Ctrl+P, Ctrl+N\n"
 msgstr "  Historique : fl�ches haut et bas, Ctrl+P, Ctrl+N\n"
 
-#: src/gnuwin32/console.c:2238
+#: src/gnuwin32/console.c:2244
 msgid "  Deleting:\n"
 msgstr "  Effacement :\n"
 
-#: src/gnuwin32/console.c:2239
+#: src/gnuwin32/console.c:2245
 msgid "     Del or Ctrl+D: delete current character or selection;\n"
 msgstr "     Del ou Ctrl+D : effacer le caract�re courant ou la s�lection ;\n"
 
-#: src/gnuwin32/console.c:2240
+#: src/gnuwin32/console.c:2246
 msgid "     Backspace: delete preceding character;\n"
 msgstr "     Suppr. arri�re: effacer le caract�re pr�c�dent ;\n"
 
-#: src/gnuwin32/console.c:2241
+#: src/gnuwin32/console.c:2247
 msgid ""
 "     Ctrl+Del or Ctrl+K: delete text from current character to end of line.\n"
 msgstr ""
 "     Ctrl+Suppr ou Ctrl+K : effacer le texte du caract�re sous le curseur "
 "jusqu'� la fin.\n"
 
-#: src/gnuwin32/console.c:2242
+#: src/gnuwin32/console.c:2248
 msgid "     Ctrl+U: delete all text from current line.\n"
 msgstr "     Ctrl+U : effacer tout le texte de la ligne courante.\n"
 
-#: src/gnuwin32/console.c:2243
+#: src/gnuwin32/console.c:2249
 msgid "  Copy and paste.\n"
 msgstr "  Copier et coller.\n"
 
-#: src/gnuwin32/console.c:2244
+#: src/gnuwin32/console.c:2250
 msgid ""
 "     Use the mouse (with the left button held down) to mark (select) text.\n"
 msgstr ""
 "     Utilisez la souris (bouton gauche enfonc�) pour marquer (s�lectionner) "
 "du texte.\n"
 
-#: src/gnuwin32/console.c:2245
+#: src/gnuwin32/console.c:2251
 msgid ""
 "     Use Shift+Del (or Ctrl+C) to copy the marked text to the clipboard and\n"
 msgstr ""
 "     Utilisez Shift+Suppr (ou Ctrl+C) pour copier le texte marqu� dans le "
 "presse-papier et\n"
 
-#: src/gnuwin32/console.c:2246
+#: src/gnuwin32/console.c:2252
 msgid ""
 "     Shift+Ins (or Ctrl+V or Ctrl+Y) to paste the content of the clipboard "
 "(if any)  \n"
@@ -148,28 +148,28 @@ msgstr ""
 "     Shift+Ins (ou Ctrl+V ou Ctrl+Y) pour coller le contenu du presse-"
 "papier\n"
 
-#: src/gnuwin32/console.c:2247
+#: src/gnuwin32/console.c:2253
 msgid "     to the console, Ctrl+X first copy then paste\n"
 msgstr "     dans la console, Ctrl+X copie et colle en une fois\n"
 
-#: src/gnuwin32/console.c:2248
+#: src/gnuwin32/console.c:2254
 msgid "  Misc:\n"
 msgstr "  Divers :\n"
 
-#: src/gnuwin32/console.c:2249
+#: src/gnuwin32/console.c:2255
 msgid "     Ctrl+L: Clear the console.\n"
 msgstr "     Ctrl+L : Effacer la console.\n"
 
-#: src/gnuwin32/console.c:2250
+#: src/gnuwin32/console.c:2256
 msgid "     Ctrl+O or INS: Toggle overwrite mode: initially off.\n"
 msgstr ""
 "     Ctrl+O ou INS : Bascule le mode surimpression ; d�sactiv� au d�part.\n"
 
-#: src/gnuwin32/console.c:2251
+#: src/gnuwin32/console.c:2257
 msgid "     Ctrl+T: Interchange current char with one to the left.\n"
 msgstr "     Ctrl+T : Echange le caract�re courant avec le pr�c�dent.\n"
 
-#: src/gnuwin32/console.c:2252
+#: src/gnuwin32/console.c:2258
 msgid ""
 "\n"
 "Note: Console is updated only when some input is required.\n"
@@ -178,7 +178,7 @@ msgstr ""
 "Note: la console est mise-�-jour quand elle est pr�te � recevoir une "
 "commande.\n"
 
-#: src/gnuwin32/console.c:2253
+#: src/gnuwin32/console.c:2259
 msgid ""
 "  Use Ctrl+W to toggle this feature off/on.\n"
 "\n"
@@ -186,7 +186,7 @@ msgstr ""
 "  Utilisez Ctrl+W pour (d�s)activer ce comportement.\n"
 "\n"
 
-#: src/gnuwin32/console.c:2254
+#: src/gnuwin32/console.c:2260
 msgid ""
 "Use ESC to stop the interpreter.\n"
 "\n"
@@ -194,7 +194,7 @@ msgstr ""
 "Utilisez ECHAPPE pour arr�ter le calcul.\n"
 "\n"
 
-#: src/gnuwin32/console.c:2255
+#: src/gnuwin32/console.c:2261
 msgid ""
 "TAB starts completion of the current word.\n"
 "\n"
@@ -202,270 +202,271 @@ msgstr ""
 "TAB pour compl�ter le mot courant.\n"
 "\n"
 
-#: src/gnuwin32/console.c:2256
+#: src/gnuwin32/console.c:2262
 msgid "Standard Windows hotkeys can be used to switch to the\n"
 msgstr "Les raccourcis Windows standard sont utilisables pour activer\n"
 
-#: src/gnuwin32/console.c:2257
+#: src/gnuwin32/console.c:2263
 msgid "graphics device (Ctrl+Tab or Ctrl+F6 in MDI, Alt+Tab in SDI)"
 msgstr ""
 "les p�riph�riques graphiques (Ctrl+Tab ou Ctrl+F6 en MDI, Alt+Tab en SDI)"
 
-#: src/gnuwin32/editor.c:88 src/gnuwin32/editor.c:90
+#: src/gnuwin32/editor.c:91 src/gnuwin32/editor.c:93
 msgid "R Editor"
 msgstr "Editeur R"
 
-#: src/gnuwin32/editor.c:119
+#: src/gnuwin32/editor.c:123
 #, c-format
 msgid "unable to open file %s for reading"
 msgstr "Impossible d'ouvrir le fichier %s en lecture"
 
-#: src/gnuwin32/editor.c:135
+#: src/gnuwin32/editor.c:139
 #, c-format
 msgid "Could not read from file '%s'"
 msgstr "Impossible de lire depuis le fichier '%s'"
 
-#: src/gnuwin32/editor.c:166
+#: src/gnuwin32/editor.c:171
 #, c-format
 msgid "Could not save file '%s'"
 msgstr "Impossible de sauver dans le fichier '%s'"
 
-#: src/gnuwin32/editor.c:182
+#: src/gnuwin32/editor.c:187
 msgid "Save script as"
 msgstr "Sauver le script comme"
 
-#: src/gnuwin32/editor.c:377 src/gnuwin32/editor.c:694
-#: src/gnuwin32/pager.c:431 src/gnuwin32/rui.c:1076
+#: src/gnuwin32/editor.c:379 src/gnuwin32/editor.c:696
+#: src/gnuwin32/pager.c:430 src/gnuwin32/rui.c:1076
 msgid "Open script"
 msgstr "Ouvrir un script"
 
-#: src/gnuwin32/editor.c:500 src/gnuwin32/pager.c:185 src/gnuwin32/pager.c:205
+#: src/gnuwin32/editor.c:502 src/gnuwin32/pager.c:184 src/gnuwin32/pager.c:204
 msgid "No RGui console to paste to"
 msgstr "Pas de console RGui o� coller"
 
-#: src/gnuwin32/editor.c:602
+#: src/gnuwin32/editor.c:604
 msgid "R EDITOR\n"
 msgstr "EDITEUR R\n"
 
-#: src/gnuwin32/editor.c:604
+#: src/gnuwin32/editor.c:606
 msgid "A standard text editor for editing and running R code.\n"
 msgstr "Un �diteur de texte standard pour �diter et ex�cuter du code R.\n"
 
-#: src/gnuwin32/editor.c:606
+#: src/gnuwin32/editor.c:608
 msgid "RUNNING COMMANDS\n"
 msgstr "COMMANDES D'EXECUTION\n"
 
-#: src/gnuwin32/editor.c:607
+#: src/gnuwin32/editor.c:609
 msgid "To run a line or section of R code, select the code and either\n"
 msgstr "Pour ex�cuter une ligne ou une section de code R, s�lectionnez-la et\n"
 
-#: src/gnuwin32/editor.c:608
+#: src/gnuwin32/editor.c:610
 msgid "     Press Ctrl-R\n"
 msgstr "     Appuyez Ctrl-R\n"
 
-#: src/gnuwin32/editor.c:609
+#: src/gnuwin32/editor.c:611
 msgid "     Select \"Run line or selection\" from the \"Edit\" menu\n"
 msgstr ""
 "     S�lectionnez \"Ex�cuter la ligne ou s�lection\" du menu \"Edition\"\n"
 
-#: src/gnuwin32/editor.c:610
+#: src/gnuwin32/editor.c:612
 msgid "     Press the \"Run line or selection\" icon on the toolbar\n"
 msgstr ""
 "     Enfoncez le bouton \"Ex�cuter la ligne ou s�lection\" de la barre "
 "d'outils\n"
 
-#: src/gnuwin32/editor.c:611
+#: src/gnuwin32/editor.c:613
 msgid ""
 "This will copy the selected commands to the console and evaluate them.\n"
 msgstr "Cela copie le code s�lectionn� et l'�value dans la console\n"
 
-#: src/gnuwin32/editor.c:612
+#: src/gnuwin32/editor.c:614
 msgid ""
 "If there is no selection, this will just run the current line and advance\n"
 msgstr ""
 "S'il n'y a aucune s�lection, la ligne courante est ex�cut�e et le curseur\n"
 
-#: src/gnuwin32/editor.c:613
+#: src/gnuwin32/editor.c:615
 msgid "the cursor by one line.\n"
 msgstr "avance d'une ligne.\n"
 
-#: src/gnuwin32/editor.c:625 src/gnuwin32/editor.c:702
-#: src/gnuwin32/editor.c:760
+#: src/gnuwin32/editor.c:627 src/gnuwin32/editor.c:704
+#: src/gnuwin32/editor.c:762
 msgid "Run line or selection"
 msgstr "Ex�cuter la ligne ou s�lection"
 
-#: src/gnuwin32/editor.c:627 src/gnuwin32/editor.c:745
+#: src/gnuwin32/editor.c:629 src/gnuwin32/editor.c:747
 msgid "Undo"
 msgstr "Annuler"
 
-#: src/gnuwin32/editor.c:629 src/gnuwin32/editor.c:748
+#: src/gnuwin32/editor.c:631 src/gnuwin32/editor.c:750
 msgid "Cut"
 msgstr "Couper"
 
-#: src/gnuwin32/editor.c:630 src/gnuwin32/editor.c:750
-#: src/gnuwin32/pager.c:305 src/gnuwin32/pager.c:478 src/gnuwin32/rui.c:859
+#: src/gnuwin32/editor.c:632 src/gnuwin32/editor.c:752
+#: src/gnuwin32/pager.c:304 src/gnuwin32/pager.c:477 src/gnuwin32/rui.c:859
 #: src/gnuwin32/rui.c:1088 src/gnuwin32/rui.c:1144
 msgid "Copy"
 msgstr "Copier"
 
-#: src/gnuwin32/editor.c:631 src/gnuwin32/editor.c:752 src/gnuwin32/rui.c:860
+#: src/gnuwin32/editor.c:633 src/gnuwin32/editor.c:754 src/gnuwin32/rui.c:860
 #: src/gnuwin32/rui.c:1092 src/gnuwin32/rui.c:1145
 msgid "Paste"
 msgstr "Coller"
 
-#: src/gnuwin32/editor.c:632 src/gnuwin32/editor.c:754
+#: src/gnuwin32/editor.c:634 src/gnuwin32/editor.c:756
 msgid "Delete"
 msgstr "Effacer"
 
-#: src/gnuwin32/editor.c:634 src/gnuwin32/editor.c:756
-#: src/gnuwin32/pager.c:308 src/gnuwin32/pager.c:484 src/gnuwin32/rui.c:866
+#: src/gnuwin32/editor.c:636 src/gnuwin32/editor.c:758
+#: src/gnuwin32/pager.c:307 src/gnuwin32/pager.c:483 src/gnuwin32/rui.c:866
 #: src/gnuwin32/rui.c:1149
 msgid "Select all"
 msgstr "S�lectionner tout"
 
-#: src/gnuwin32/editor.c:698
+#: src/gnuwin32/editor.c:700
 msgid "Save script"
 msgstr "Sauver le script"
 
-#: src/gnuwin32/editor.c:706 src/gnuwin32/pager.c:451
-#: src/library/grDevices/src/devWindows.c:1594
+#: src/gnuwin32/editor.c:708 src/gnuwin32/pager.c:450
+#: src/library/grDevices/src/devWindows.c:1613
 msgid "Return focus to Console"
 msgstr "Activer la console"
 
-#: src/gnuwin32/editor.c:709
+#: src/gnuwin32/editor.c:711
 msgid "Print script"
 msgstr "Imprimer le script"
 
-#: src/gnuwin32/editor.c:711 src/gnuwin32/pager.c:446 src/gnuwin32/rui.c:1104
-#: src/library/grDevices/src/devWindows.c:1588
+#: src/gnuwin32/editor.c:713 src/gnuwin32/pager.c:445 src/gnuwin32/rui.c:1104
+#: src/library/grDevices/src/devWindows.c:1607
 msgid "Print"
 msgstr "Imprimer"
 
-#: src/gnuwin32/editor.c:729 src/gnuwin32/pager.c:467 src/gnuwin32/rui.c:1122
-#: src/library/utils/src/windows/dataentry.c:1790
-#: src/library/grDevices/src/devWindows.c:1626
+#: src/gnuwin32/editor.c:731 src/gnuwin32/pager.c:466 src/gnuwin32/rui.c:1122
+#: src/library/utils/src/windows/dataentry.c:1791
+#: src/library/grDevices/src/devWindows.c:1645
 msgid "File"
 msgstr "Fichier"
 
-#: src/gnuwin32/editor.c:730 src/gnuwin32/pager.c:468 src/gnuwin32/rui.c:1124
+#: src/gnuwin32/editor.c:732 src/gnuwin32/pager.c:467 src/gnuwin32/rui.c:1124
 msgid "New script"
 msgstr "Nouveau script"
 
-#: src/gnuwin32/editor.c:732 src/gnuwin32/pager.c:469 src/gnuwin32/rui.c:1125
+#: src/gnuwin32/editor.c:734 src/gnuwin32/pager.c:468 src/gnuwin32/rui.c:1125
 msgid "Open script..."
 msgstr "Ouvrir un script..."
 
-#: src/gnuwin32/editor.c:734
+#: src/gnuwin32/editor.c:736
 msgid "Save"
 msgstr "Sauver"
 
-#: src/gnuwin32/editor.c:736
+#: src/gnuwin32/editor.c:738
 msgid "Save as..."
 msgstr "Sauver sous..."
 
-#: src/gnuwin32/editor.c:739 src/gnuwin32/pager.c:470 src/gnuwin32/rui.c:1138
-#: src/library/grDevices/src/devWindows.c:1689
+#: src/gnuwin32/editor.c:741 src/gnuwin32/pager.c:469 src/gnuwin32/rui.c:1138
+#: src/library/grDevices/src/devWindows.c:1666
+#: src/library/grDevices/src/devWindows.c:1708
 msgid "Print..."
 msgstr "Imprimer..."
 
-#: src/gnuwin32/editor.c:742
+#: src/gnuwin32/editor.c:744
 msgid "Close script"
 msgstr "Fermer le script"
 
-#: src/gnuwin32/editor.c:744 src/gnuwin32/pager.c:477 src/gnuwin32/rui.c:1143
-#: src/library/utils/src/windows/dataentry.c:1796
+#: src/gnuwin32/editor.c:746 src/gnuwin32/pager.c:476 src/gnuwin32/rui.c:1143
+#: src/library/utils/src/windows/dataentry.c:1797
 msgid "Edit"
 msgstr "Edition"
 
-#: src/gnuwin32/editor.c:758 src/gnuwin32/rui.c:1150
+#: src/gnuwin32/editor.c:760 src/gnuwin32/rui.c:1150
 msgid "Clear console"
 msgstr "Effacer la console"
 
-#: src/gnuwin32/editor.c:762
+#: src/gnuwin32/editor.c:764
 msgid "Run all"
 msgstr "Ex�cuter tout"
 
-#: src/gnuwin32/editor.c:765
+#: src/gnuwin32/editor.c:767
 msgid "Find..."
 msgstr "Rechercher..."
 
-#: src/gnuwin32/editor.c:767
+#: src/gnuwin32/editor.c:769
 msgid "Replace..."
 msgstr "Remplacer..."
 
-#: src/gnuwin32/editor.c:770 src/gnuwin32/rui.c:1154
+#: src/gnuwin32/editor.c:772 src/gnuwin32/rui.c:1154
 msgid "GUI preferences..."
 msgstr "Pr�f�rences..."
 
-#: src/gnuwin32/editor.c:780 src/gnuwin32/rui.c:1186
-#: src/library/utils/src/windows/dataentry.c:1697
-#: src/library/utils/src/windows/dataentry.c:1807
+#: src/gnuwin32/editor.c:782 src/gnuwin32/rui.c:1186
+#: src/library/utils/src/windows/dataentry.c:1698
+#: src/library/utils/src/windows/dataentry.c:1808
 msgid "Help"
 msgstr "Aide"
 
-#: src/gnuwin32/editor.c:781
+#: src/gnuwin32/editor.c:783
 msgid "Editor"
 msgstr "Editeur"
 
-#: src/gnuwin32/editor.c:840
+#: src/gnuwin32/editor.c:842
 msgid "Maximum number of editors reached"
 msgstr "Nombre maximum d'�diteurs atteint"
 
-#: src/gnuwin32/editor.c:845
+#: src/gnuwin32/editor.c:847
 msgid "Unable to create editor window"
 msgstr "Impossible de cr�er la fen�tre d'�dition"
 
-#: src/gnuwin32/editor.c:853
+#: src/gnuwin32/editor.c:855
 msgid "Untitled"
 msgstr "Sans titre"
 
-#: src/gnuwin32/extra.c:823 src/gnuwin32/rui.c:1224
+#: src/gnuwin32/extra.c:825
 msgid "Select file"
 msgstr "S�lectionner un fichier"
 
-#: src/gnuwin32/pager.c:89
+#: src/gnuwin32/pager.c:88
 msgid "Error opening file"
 msgstr "Erreur � l'ouverture du fichier"
 
-#: src/gnuwin32/pager.c:96
+#: src/gnuwin32/pager.c:95
 msgid "Insufficient memory to display file in internal pager"
 msgstr ""
 "M�moire insuffisante pour afficher le fichier dans un afficheur interne"
 
-#: src/gnuwin32/pager.c:177 src/gnuwin32/pager.c:189 src/gnuwin32/pager.c:209
+#: src/gnuwin32/pager.c:176 src/gnuwin32/pager.c:188 src/gnuwin32/pager.c:208
 #: src/gnuwin32/rui.c:237 src/gnuwin32/rui.c:264
 msgid "No selection"
 msgstr "Pas de s�lection"
 
-#: src/gnuwin32/pager.c:306 src/gnuwin32/pager.c:436 src/gnuwin32/pager.c:480
+#: src/gnuwin32/pager.c:305 src/gnuwin32/pager.c:435 src/gnuwin32/pager.c:479
 msgid "Paste to console"
 msgstr "Coller dans la console"
 
-#: src/gnuwin32/pager.c:307 src/gnuwin32/pager.c:441 src/gnuwin32/pager.c:482
+#: src/gnuwin32/pager.c:306 src/gnuwin32/pager.c:440 src/gnuwin32/pager.c:481
 msgid "Paste commands to console"
 msgstr "Coller les commandes dans la console"
 
-#: src/gnuwin32/pager.c:310 src/gnuwin32/rui.c:869
-#: src/library/utils/src/windows/dataentry.c:1703
-#: src/library/grDevices/src/devWindows.c:1686
+#: src/gnuwin32/pager.c:309 src/gnuwin32/rui.c:869
+#: src/library/utils/src/windows/dataentry.c:1704
+#: src/library/grDevices/src/devWindows.c:1705
 msgid "Stay on top"
 msgstr "Rester au dessus"
 
-#: src/gnuwin32/pager.c:312 src/gnuwin32/pager.c:475
-#: src/library/utils/src/windows/dataentry.c:1705
-#: src/library/utils/src/windows/dataentry.c:1792
+#: src/gnuwin32/pager.c:311 src/gnuwin32/pager.c:474
+#: src/library/utils/src/windows/dataentry.c:1706
+#: src/library/utils/src/windows/dataentry.c:1793
 msgid "Close"
 msgstr "Fermer"
 
-#: src/gnuwin32/pager.c:472 src/gnuwin32/rui.c:1139
+#: src/gnuwin32/pager.c:471 src/gnuwin32/rui.c:1139
 msgid "Save to File..."
 msgstr "Sauver dans le fichier..."
 
-#: src/gnuwin32/pager.c:487 src/gnuwin32/rui.c:1156
+#: src/gnuwin32/pager.c:486 src/gnuwin32/rui.c:1156
 msgid "View"
 msgstr "Voir"
 
-#: src/gnuwin32/pager.c:519
+#: src/gnuwin32/pager.c:518
 msgid "Unable to create pager window"
 msgstr "Impossible de cr�er la fen�tre de l'afficheur"
 
@@ -623,7 +624,8 @@ msgid "Update packages..."
 msgstr "Mettre � jour les packages..."
 
 #: src/gnuwin32/rui.c:920
-msgid "Install package(s) from local zip files..."
+#, fuzzy
+msgid "Install package(s) from local files..."
 msgstr "Installer le(s) package(s) depuis des fichiers zip..."
 
 #: src/gnuwin32/rui.c:944
@@ -790,52 +792,52 @@ msgstr "Lister les chemins de recherche"
 msgid "Console"
 msgstr "Console"
 
-#: src/gnuwin32/rui.c:1268
+#: src/gnuwin32/rui.c:1251
 msgid "'mname' is limited to 1000 bytes"
 msgstr "'mname' est limit� � 1000 bytes"
 
-#: src/gnuwin32/rui.c:1310
+#: src/gnuwin32/rui.c:1293
 #, c-format
 msgid "menu %s does not exist"
 msgstr "le menu %s n'existe pas"
 
-#: src/gnuwin32/rui.c:1363
+#: src/gnuwin32/rui.c:1346
 msgid "'menu' is limited to 500 bytes"
 msgstr "'menu' est limit� � 500 bytes"
 
-#: src/gnuwin32/rui.c:1373
+#: src/gnuwin32/rui.c:1356
 msgid "base menu does not exist"
 msgstr "le menu parent n'existe pas"
 
-#: src/gnuwin32/rui.c:1388
+#: src/gnuwin32/rui.c:1371
 msgid "failed to allocate menu"
 msgstr "erreur lors de la cr�ation du menu"
 
-#: src/gnuwin32/rui.c:1405 src/gnuwin32/rui.c:1529
+#: src/gnuwin32/rui.c:1388 src/gnuwin32/rui.c:1512
 msgid "menu + item is limited to 1000 bytes"
 msgstr "menu + entr�e est limit� � 1000 bytes"
 
-#: src/gnuwin32/rui.c:1413 src/gnuwin32/rui.c:1496
+#: src/gnuwin32/rui.c:1396 src/gnuwin32/rui.c:1479
 msgid "menu does not exist"
 msgstr "le menu n'existe pas"
 
-#: src/gnuwin32/rui.c:1431 src/gnuwin32/rui.c:1454 src/gnuwin32/rui.c:1459
+#: src/gnuwin32/rui.c:1414 src/gnuwin32/rui.c:1437 src/gnuwin32/rui.c:1442
 msgid "failed to allocate char storage"
 msgstr "l'allocation d'un espace de stockage de carat�res a �chou�"
 
-#: src/gnuwin32/rui.c:1467
+#: src/gnuwin32/rui.c:1450
 msgid "failed to allocate menuitem"
 msgstr "l'allocation de l'entr�e de menu a �chou�"
 
-#: src/gnuwin32/rui.c:1519
+#: src/gnuwin32/rui.c:1502
 msgid "menu not found"
 msgstr "menu introuvable"
 
-#: src/gnuwin32/rui.c:1537
+#: src/gnuwin32/rui.c:1520
 msgid "menu or item does not exist"
 msgstr "le menu ou l'entr�e de menu n'existe pas"
 
-#: src/gnuwin32/system.c:442
+#: src/gnuwin32/system.c:446
 msgid "Save workspace image?"
 msgstr "Sauver une image de la session ?"
 
@@ -843,41 +845,41 @@ msgstr "Sauver une image de la session ?"
 msgid "Insufficient memory: cell not copied to the clipboard"
 msgstr "M�moire insuffisante : cellule non copi�e vers le presse-papier"
 
-#: src/extra/graphapp/dialogs.c:147 src/extra/graphapp/dialogs.c:164
-#: src/extra/graphapp/dialogs.c:181
+#: src/extra/graphapp/dialogs.c:148 src/extra/graphapp/dialogs.c:165
+#: src/extra/graphapp/dialogs.c:182
 msgid "Question"
 msgstr "Question"
 
-#: src/extra/graphapp/dialogs.c:202
+#: src/extra/graphapp/dialogs.c:203
 msgid " Change working directory to:"
 msgstr "Changer le r�pertoire courant vers :"
 
-#: src/extra/graphapp/dialogs.c:205
+#: src/extra/graphapp/dialogs.c:206
 #, c-format
 msgid "Unable to set '%s' as working directory"
 msgstr "Impossible de sp�cifier '%s' comme r�pertoire courant"
 
-#: src/extra/graphapp/dialogs.c:602 src/extra/graphapp/dialogs.c:620
-#: src/extra/graphapp/dialogs.c:626 src/extra/graphapp/dialogs.c:725
-#: src/extra/graphapp/dialogs.c:739 src/extra/graphapp/dialogs.c:745
+#: src/extra/graphapp/dialogs.c:604 src/extra/graphapp/dialogs.c:622
+#: src/extra/graphapp/dialogs.c:628 src/extra/graphapp/dialogs.c:727
+#: src/extra/graphapp/dialogs.c:741 src/extra/graphapp/dialogs.c:747
 #: src/library/utils/src/windows/widgets.c:125
 msgid "Cancel"
 msgstr "Annuler"
 
-#: src/extra/graphapp/dialogs.c:622 src/extra/graphapp/dialogs.c:741
+#: src/extra/graphapp/dialogs.c:624 src/extra/graphapp/dialogs.c:743
 #: src/library/utils/src/windows/widgets.c:124
 msgid "OK"
 msgstr "OK"
 
-#: src/extra/graphapp/dialogs.c:733
+#: src/extra/graphapp/dialogs.c:735
 msgid "User"
 msgstr "Utilisateur"
 
-#: src/extra/graphapp/dialogs.c:734
+#: src/extra/graphapp/dialogs.c:736
 msgid "Password"
 msgstr "Mot de passe"
 
-#: src/extra/graphapp/dialogs.c:900 src/extra/graphapp/dialogs.c:906
+#: src/extra/graphapp/dialogs.c:902 src/extra/graphapp/dialogs.c:908
 #, c-format
 msgid "\"%s\" not found"
 msgstr "\"%s\" introuvable"
@@ -887,9 +889,9 @@ msgid "Arrange Icons"
 msgstr "Arranger les ic�nes"
 
 #: src/library/utils/src/windows/dataentry.c:223
-#: src/library/utils/src/windows/dataentry.c:1850
-#: src/library/utils/src/windows/dataentry.c:1853
-#: src/library/utils/src/windows/dataentry.c:1884
+#: src/library/utils/src/windows/dataentry.c:1851
+#: src/library/utils/src/windows/dataentry.c:1854
+#: src/library/utils/src/windows/dataentry.c:1885
 msgid "invalid argument"
 msgstr "argument incorrect"
 
@@ -901,17 +903,12 @@ msgstr "valeur de type incorrecte"
 msgid "Data Editor"
 msgstr "Editeur de donn�es"
 
-#: src/library/utils/src/windows/dataentry.c:282
-#: src/library/utils/src/windows/dataentry.c:1891
-msgid "invalid device"
-msgstr "p�riph�rique incorrect"
-
 #: src/library/utils/src/windows/dataentry.c:331
 msgid "dataentry: internal memory problem"
 msgstr "dataentry : probl�me interne de m�moire"
 
 #: src/library/utils/src/windows/dataentry.c:634
-#: src/library/utils/src/windows/dataentry.c:1221
+#: src/library/utils/src/windows/dataentry.c:1222
 msgid "dataentry: internal memory error"
 msgstr "dataentry : erreur interne de m�moire"
 
@@ -920,43 +917,43 @@ msgstr "dataentry : erreur interne de m
 msgid "internal type error in dataentry"
 msgstr "erreur de type interne dans dataentry"
 
-#: src/library/utils/src/windows/dataentry.c:852
+#: src/library/utils/src/windows/dataentry.c:853
 msgid "dataentry: parse error on string"
 msgstr "dataentry : erreur d'analyse de cha�ne de caract�res"
 
-#: src/library/utils/src/windows/dataentry.c:995
+#: src/library/utils/src/windows/dataentry.c:996
 msgid "dataentry: expression too long"
 msgstr "dataentry : expression trop longue"
 
-#: src/library/utils/src/windows/dataentry.c:1472
+#: src/library/utils/src/windows/dataentry.c:1473
 msgid "column names cannot be blank"
 msgstr "les noms de colonnes ne peuvent �tre vides"
 
-#: src/library/utils/src/windows/dataentry.c:1518
+#: src/library/utils/src/windows/dataentry.c:1519
 msgid "Variable editor"
 msgstr "Editeur de variable"
 
-#: src/library/utils/src/windows/dataentry.c:1523
+#: src/library/utils/src/windows/dataentry.c:1524
 msgid "variable name"
 msgstr "nom de variable"
 
-#: src/library/utils/src/windows/dataentry.c:1525
+#: src/library/utils/src/windows/dataentry.c:1526
 msgid "type"
 msgstr "type"
 
-#: src/library/utils/src/windows/dataentry.c:1639
+#: src/library/utils/src/windows/dataentry.c:1640
 msgid "Cell width(s)"
 msgstr "Longueur(s) de cellule(s)"
 
-#: src/library/utils/src/windows/dataentry.c:1645
+#: src/library/utils/src/windows/dataentry.c:1646
 msgid "Cell width"
 msgstr "Longueur de cellule"
 
-#: src/library/utils/src/windows/dataentry.c:1648
+#: src/library/utils/src/windows/dataentry.c:1649
 msgid "variable"
 msgstr "variable"
 
-#: src/library/utils/src/windows/dataentry.c:1691
+#: src/library/utils/src/windows/dataentry.c:1692
 msgid ""
 "Navigation.\n"
 "  Keyboard: cursor keys move selection\n"
@@ -999,220 +996,222 @@ msgstr ""
 "  Clic droit pour un menu copier, coller, dimensionnement auto\n"
 "\n"
 
-#: src/library/utils/src/windows/dataentry.c:1699
+#: src/library/utils/src/windows/dataentry.c:1700
 msgid "Copy selected cell"
 msgstr "Copier la cellule active"
 
-#: src/library/utils/src/windows/dataentry.c:1700
+#: src/library/utils/src/windows/dataentry.c:1701
 msgid "Paste to selected cell"
 msgstr "Coller dans la cellule active"
 
-#: src/library/utils/src/windows/dataentry.c:1701
+#: src/library/utils/src/windows/dataentry.c:1702
 msgid "Autosize column"
 msgstr "Dimensionnement auto"
 
-#: src/library/utils/src/windows/dataentry.c:1797
+#: src/library/utils/src/windows/dataentry.c:1798
 msgid "Copy  \tCTRL+C"
 msgstr "Copier  \tCTRL+C"
 
-#: src/library/utils/src/windows/dataentry.c:1799
+#: src/library/utils/src/windows/dataentry.c:1800
 msgid "Paste \tCTRL+V"
 msgstr "Coller \tCTRL+V"
 
-#: src/library/utils/src/windows/dataentry.c:1801
+#: src/library/utils/src/windows/dataentry.c:1802
 msgid "Delete\tDEL"
 msgstr "Effacer\tSUPPR"
 
-#: src/library/utils/src/windows/dataentry.c:1804
+#: src/library/utils/src/windows/dataentry.c:1805
 msgid "Cell widths ..."
 msgstr "Largeur de cellules..."
 
-#: src/library/utils/src/windows/dataentry.c:1808
+#: src/library/utils/src/windows/dataentry.c:1809
 msgid "Data editor"
 msgstr "Editeur de donn�es"
 
-#: src/library/grDevices/src/devWindows.c:932
+#: src/library/grDevices/src/devWindows.c:949
 msgid "Portable network graphics file"
 msgstr "Fichier PNG"
 
-#: src/library/grDevices/src/devWindows.c:935
+#: src/library/grDevices/src/devWindows.c:952
 msgid "Windows bitmap file"
 msgstr "Fichier bitmap Windows"
 
-#: src/library/grDevices/src/devWindows.c:938
+#: src/library/grDevices/src/devWindows.c:955
 msgid "TIFF file"
 msgstr "Fichier TIFF"
 
-#: src/library/grDevices/src/devWindows.c:941
+#: src/library/grDevices/src/devWindows.c:958
 msgid "Jpeg file"
 msgstr "Fichier JPEG"
 
-#: src/library/grDevices/src/devWindows.c:963
+#: src/library/grDevices/src/devWindows.c:980
 msgid "Postscript file"
 msgstr "Fichier postscript"
 
-#: src/library/grDevices/src/devWindows.c:975
+#: src/library/grDevices/src/devWindows.c:992
 msgid "PDF file"
 msgstr "Fichier PDF"
 
-#: src/library/grDevices/src/devWindows.c:987
+#: src/library/grDevices/src/devWindows.c:1004
 msgid "Enhanced metafiles"
 msgstr "M�tafichier avanc� EMF"
 
-#: src/library/grDevices/src/devWindows.c:990
-#: src/library/grDevices/src/devWindows.c:3436
+#: src/library/grDevices/src/devWindows.c:1007
+#: src/library/grDevices/src/devWindows.c:3445
 msgid "file path selected is too long: only 512 bytes are allowed"
 msgstr "chemin s�lectionn� trop long : 512 caract�res maximum"
 
-#: src/library/grDevices/src/devWindows.c:1201
+#: src/library/grDevices/src/devWindows.c:1218
 msgid "No plot to replace!"
 msgstr "Aucun graphe � remplacer !"
 
-#: src/library/grDevices/src/devWindows.c:1249
+#: src/library/grDevices/src/devWindows.c:1268
 msgid "Variable name"
 msgstr "Nom de la variable"
 
-#: src/library/grDevices/src/devWindows.c:1258
+#: src/library/grDevices/src/devWindows.c:1277
 msgid "Variable doesn't contain any plots!"
 msgstr "La variable ne contient aucun graphique!"
 
-#: src/library/grDevices/src/devWindows.c:1273
+#: src/library/grDevices/src/devWindows.c:1292
 msgid "Name of variable to save to"
 msgstr "Nom de la variable o� sauver les graphes"
 
-#: src/library/grDevices/src/devWindows.c:1582
+#: src/library/grDevices/src/devWindows.c:1601
 msgid "Copy to the clipboard as a metafile"
 msgstr "Copier au format vectoriel dans le presse-papier"
 
-#: src/library/grDevices/src/devWindows.c:1600
-#: src/library/grDevices/src/devWindows.c:1611
+#: src/library/grDevices/src/devWindows.c:1619
+#: src/library/grDevices/src/devWindows.c:1630
 msgid "Stop locator"
 msgstr "Arr�ter le mode de localisation � la souris"
 
-#: src/library/grDevices/src/devWindows.c:1610
-#: src/library/grDevices/src/devWindows.c:1614
+#: src/library/grDevices/src/devWindows.c:1629
+#: src/library/grDevices/src/devWindows.c:1633
 msgid "Stop"
 msgstr "Arr�ter"
 
-#: src/library/grDevices/src/devWindows.c:1616
+#: src/library/grDevices/src/devWindows.c:1635
 msgid "Continue"
 msgstr "Continuer"
 
-#: src/library/grDevices/src/devWindows.c:1620
+#: src/library/grDevices/src/devWindows.c:1639
 msgid "Next"
 msgstr "Suivant"
 
-#: src/library/grDevices/src/devWindows.c:1621
+#: src/library/grDevices/src/devWindows.c:1640
 msgid "Next plot"
 msgstr "Graphique suivant"
 
-#: src/library/grDevices/src/devWindows.c:1627
+#: src/library/grDevices/src/devWindows.c:1646
 msgid "Save as"
 msgstr "Sauver sous"
 
-#: src/library/grDevices/src/devWindows.c:1636
-#: src/library/grDevices/src/devWindows.c:1638
-#: src/library/grDevices/src/devWindows.c:1640
+#: src/library/grDevices/src/devWindows.c:1655
+#: src/library/grDevices/src/devWindows.c:1657
+#: src/library/grDevices/src/devWindows.c:1659
 #, c-format
 msgid "%s quality..."
 msgstr "Qualit� %s..."
 
-#: src/library/grDevices/src/devWindows.c:1642
+#: src/library/grDevices/src/devWindows.c:1661
 msgid "Copy to the clipboard"
 msgstr "Copier vers le presse-papier"
 
-#: src/library/grDevices/src/devWindows.c:1643
+#: src/library/grDevices/src/devWindows.c:1662
 msgid "as a Bitmap\tCTRL+C"
 msgstr "comme bitmap   \tCTRL+C"
 
-#: src/library/grDevices/src/devWindows.c:1644
+#: src/library/grDevices/src/devWindows.c:1663
 msgid "as a Metafile\tCTRL+W"
 msgstr "comme vectoriel\tCTRL+W"
 
-#: src/library/grDevices/src/devWindows.c:1647
-msgid "Print...\tCTRL+P"
-msgstr "Imprimer...\tCTRL+P"
-
-#: src/library/grDevices/src/devWindows.c:1649
+#: src/library/grDevices/src/devWindows.c:1668
 msgid "close Device"
 msgstr "Fermer le p�riph�rique"
 
-#: src/library/grDevices/src/devWindows.c:1650
+#: src/library/grDevices/src/devWindows.c:1669
 msgid "History"
 msgstr "Historique"
 
-#: src/library/grDevices/src/devWindows.c:1651
+#: src/library/grDevices/src/devWindows.c:1670
 msgid "Recording"
 msgstr "Enregistrer"
 
-#: src/library/grDevices/src/devWindows.c:1654
+#: src/library/grDevices/src/devWindows.c:1673
 msgid "Add\tINS"
 msgstr "Ajouter\tINS"
 
-#: src/library/grDevices/src/devWindows.c:1655
+#: src/library/grDevices/src/devWindows.c:1674
 msgid "Replace"
 msgstr "Remplacer"
 
-#: src/library/grDevices/src/devWindows.c:1657
+#: src/library/grDevices/src/devWindows.c:1676
 msgid "Previous\tPgUp"
 msgstr "Pr�c�dent\tPgHaut"
 
-#: src/library/grDevices/src/devWindows.c:1658
+#: src/library/grDevices/src/devWindows.c:1677
 msgid "Next\tPgDown"
 msgstr "Suivant\tPgBas"
 
-#: src/library/grDevices/src/devWindows.c:1660
+#: src/library/grDevices/src/devWindows.c:1679
 msgid "Save to variable..."
 msgstr "Sauver dans la variable..."
 
-#: src/library/grDevices/src/devWindows.c:1661
+#: src/library/grDevices/src/devWindows.c:1680
 msgid "Get from variable..."
 msgstr "R�cup�rer depuis la variable..."
 
-#: src/library/grDevices/src/devWindows.c:1663
+#: src/library/grDevices/src/devWindows.c:1682
 msgid "Clear history"
 msgstr "Effacer l'historique"
 
-#: src/library/grDevices/src/devWindows.c:1664
+#: src/library/grDevices/src/devWindows.c:1683
 msgid "Resize"
 msgstr "Redimensionnement"
 
-#: src/library/grDevices/src/devWindows.c:1665
+#: src/library/grDevices/src/devWindows.c:1684
 msgid "R mode"
 msgstr "Mode R"
 
-#: src/library/grDevices/src/devWindows.c:1667
+#: src/library/grDevices/src/devWindows.c:1686
 msgid "Fit to window"
 msgstr "Ajuster � la fen�tre"
 
-#: src/library/grDevices/src/devWindows.c:1669
+#: src/library/grDevices/src/devWindows.c:1688
 msgid "Fixed size"
 msgstr "Taille fixe"
 
-#: src/library/grDevices/src/devWindows.c:1676
+#: src/library/grDevices/src/devWindows.c:1695
 msgid "Copy as metafile"
 msgstr "Copier comme vectoriel"
 
-#: src/library/grDevices/src/devWindows.c:1678
+#: src/library/grDevices/src/devWindows.c:1697
 msgid "Copy as bitmap"
 msgstr "Copier comme bitmap"
 
-#: src/library/grDevices/src/devWindows.c:1681
+#: src/library/grDevices/src/devWindows.c:1700
 msgid "Save as metafile..."
 msgstr "Sauver comme vectoriel..."
 
-#: src/library/grDevices/src/devWindows.c:1683
+#: src/library/grDevices/src/devWindows.c:1702
 msgid "Save as postscript..."
 msgstr "Sauver comme postscript..."
 
-#: src/library/grDevices/src/devWindows.c:3136
+#: src/library/grDevices/src/devWindows.c:3143
 msgid "Locator is active"
 msgstr "Le mode de localisation � la souris est actif"
 
-#: src/library/grDevices/src/devWindows.c:3763
+#: src/library/grDevices/src/devWindows.c:3769
 msgid "Waiting to confirm page change..."
 msgstr "Changement de page : attente de confirmation..."
 
-#: src/library/grDevices/src/devWindows.c:3775
+#: src/library/grDevices/src/devWindows.c:3781
 msgid "Click or hit ENTER for next page"
 msgstr "Cliquez ou appuyez ENTREE pour la page suivante"
+
+#~ msgid "Print...\tCTRL+P"
+#~ msgstr "Imprimer...\tCTRL+P"
+
+#~ msgid "invalid device"
+#~ msgstr "p�riph�rique incorrect"
diff --git a/src/library/base/po/RGui-it.po b/src/library/base/po/RGui-it.po
index d59adae..b49035a 100644
--- a/src/library/base/po/RGui-it.po
+++ b/src/library/base/po/RGui-it.po
@@ -8,7 +8,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: RGui\n"
 "Report-Msgid-Bugs-To: bugs.r-project.org\n"
-"POT-Creation-Date: 2013-03-18 19:36+0000\n"
+"POT-Creation-Date: 2016-04-01 10:28-0700\n"
 "PO-Revision-Date: 2005-02-05 13:45+0100\n"
 "Last-Translator: Stefano M. Iacus <stefano.iacus at R-project.org>\n"
 "Language-Team: Italian <it at li.org>\n"
@@ -30,11 +30,11 @@ msgstr "Memoria insufficiente: il testo non pu
 msgid "Unable to open the clipboard"
 msgstr "Non � possibile aprire gli appunti"
 
-#: src/gnuwin32/console.c:1914
+#: src/gnuwin32/console.c:1919
 msgid "Insufficient memory. Please close the console"
 msgstr "Memoria insufficiente. Per piacere, chiudi la console"
 
-#: src/gnuwin32/console.c:1969 src/gnuwin32/console.c:2022
+#: src/gnuwin32/console.c:1974 src/gnuwin32/console.c:2028
 #: src/gnuwin32/preferences.c:333
 #, c-format
 msgid ""
@@ -44,23 +44,23 @@ msgstr ""
 "Font %s-%d-%d  non trovato.\n"
 "Utilizzo il carattere di sistema a spaziatura fissa"
 
-#: src/gnuwin32/console.c:2127
+#: src/gnuwin32/console.c:2133
 msgid "Save selection to"
 msgstr "Salva selezione su"
 
-#: src/gnuwin32/console.c:2129
+#: src/gnuwin32/console.c:2135
 msgid "Save console contents to"
 msgstr "Salva contenuto console su"
 
-#: src/gnuwin32/console.c:2228
+#: src/gnuwin32/console.c:2234
 msgid "Scrolling.\n"
 msgstr "Scorrimento.\n"
 
-#: src/gnuwin32/console.c:2229
+#: src/gnuwin32/console.c:2235
 msgid "  Keyboard: PgUp, PgDown, Ctrl+Arrows, Ctrl+Home, Ctrl+End,\n"
 msgstr "  Tastiera: PgUp, PgDown, Ctrl+Arrows, Ctrl+Home, Ctrl+End,\n"
 
-#: src/gnuwin32/console.c:2230
+#: src/gnuwin32/console.c:2236
 msgid ""
 "  Mouse: use the scrollbar(s).\n"
 "\n"
@@ -68,76 +68,76 @@ msgstr ""
 "  Mouse: usare barre scorrimento.\n"
 "\n"
 
-#: src/gnuwin32/console.c:2231
+#: src/gnuwin32/console.c:2237
 msgid "Editing.\n"
 msgstr "Modifica.\n"
 
-#: src/gnuwin32/console.c:2232
+#: src/gnuwin32/console.c:2238
 msgid "  Moving the cursor: \n"
 msgstr "  Sposto cursore a: \n"
 
-#: src/gnuwin32/console.c:2233
+#: src/gnuwin32/console.c:2239
 msgid "     Left arrow or Ctrl+B: move backward one character;\n"
 msgstr "     Freccia sinistra o Ctrl+B: muove indietro di un carattere;\n"
 
-#: src/gnuwin32/console.c:2234
+#: src/gnuwin32/console.c:2240
 msgid "     Right arrow or Ctrl+F: move forward one character;\n"
 msgstr "     Freccai destra o Ctrl+F: muove avanti di un carattere;\n"
 
-#: src/gnuwin32/console.c:2235
+#: src/gnuwin32/console.c:2241
 msgid "     Home or Ctrl+A: go to beginning of line;\n"
 msgstr "     Home o Ctrl+A: vai a inizio linea;\n"
 
-#: src/gnuwin32/console.c:2236
+#: src/gnuwin32/console.c:2242
 msgid "     End or Ctrl+E: go to end of line;\n"
 msgstr "     End o Ctrl+E: vai a fine linea;\n"
 
-#: src/gnuwin32/console.c:2237
+#: src/gnuwin32/console.c:2243
 msgid "  History: Up and Down Arrows, Ctrl+P, Ctrl+N\n"
 msgstr "  History: Freccia Su e Giu, Ctrl+P, Ctrl+N\n"
 
-#: src/gnuwin32/console.c:2238
+#: src/gnuwin32/console.c:2244
 msgid "  Deleting:\n"
 msgstr "  Cancello:\n"
 
-#: src/gnuwin32/console.c:2239
+#: src/gnuwin32/console.c:2245
 #, fuzzy
 msgid "     Del or Ctrl+D: delete current character or selection;\n"
 msgstr "     Del o Ctrl+D: elimina carattere corrente;\n"
 
-#: src/gnuwin32/console.c:2240
+#: src/gnuwin32/console.c:2246
 msgid "     Backspace: delete preceding character;\n"
 msgstr "     Backspace: elimina carattere precedente;\n"
 
-#: src/gnuwin32/console.c:2241
+#: src/gnuwin32/console.c:2247
 msgid ""
 "     Ctrl+Del or Ctrl+K: delete text from current character to end of line.\n"
 msgstr ""
 "     Ctrl+Del o Ctrl+K: cancella il testo dal carattere corrente a fine "
 "riga.\n"
 
-#: src/gnuwin32/console.c:2242
+#: src/gnuwin32/console.c:2248
 msgid "     Ctrl+U: delete all text from current line.\n"
 msgstr "     Ctrl+U: cancella tutto il testo della riga corrente.\n"
 
-#: src/gnuwin32/console.c:2243
+#: src/gnuwin32/console.c:2249
 msgid "  Copy and paste.\n"
 msgstr "  Copia e incolla.\n"
 
-#: src/gnuwin32/console.c:2244
+#: src/gnuwin32/console.c:2250
 msgid ""
 "     Use the mouse (with the left button held down) to mark (select) text.\n"
 msgstr ""
 "     Usa il mouse (tasto sinistro abbassato) per selezionare il testo.\n"
 
-#: src/gnuwin32/console.c:2245
+#: src/gnuwin32/console.c:2251
 msgid ""
 "     Use Shift+Del (or Ctrl+C) to copy the marked text to the clipboard and\n"
 msgstr ""
 "     Usa Shift+Del (o Ctrl+C) per copiare il testo selezionato negli appunti "
 "e\n"
 
-#: src/gnuwin32/console.c:2246
+#: src/gnuwin32/console.c:2252
 msgid ""
 "     Shift+Ins (or Ctrl+V or Ctrl+Y) to paste the content of the clipboard "
 "(if any)  \n"
@@ -145,29 +145,29 @@ msgstr ""
 "     Shift+Ins (o Ctrl+V o Ctrl+Y) per copiare il contenuto della clipboard "
 "(se presente)  \n"
 
-#: src/gnuwin32/console.c:2247
+#: src/gnuwin32/console.c:2253
 msgid "     to the console, Ctrl+X first copy then paste\n"
 msgstr "     nella console, Ctrl+X prima copia e poi incolla\n"
 
-#: src/gnuwin32/console.c:2248
+#: src/gnuwin32/console.c:2254
 msgid "  Misc:\n"
 msgstr " Varie:\n"
 
-#: src/gnuwin32/console.c:2249
+#: src/gnuwin32/console.c:2255
 msgid "     Ctrl+L: Clear the console.\n"
 msgstr "     Ctrl+L: pulisci console.\n"
 
-#: src/gnuwin32/console.c:2250
+#: src/gnuwin32/console.c:2256
 msgid "     Ctrl+O or INS: Toggle overwrite mode: initially off.\n"
 msgstr ""
 "     Ctrl+O o INS: attiva/disattiva modalit� sovrascrittura: inizialmente "
 "inattiva.\n"
 
-#: src/gnuwin32/console.c:2251
+#: src/gnuwin32/console.c:2257
 msgid "     Ctrl+T: Interchange current char with one to the left.\n"
 msgstr "     Ctrl+T: Scambia il carattere corrente con quello a sinistra.\n"
 
-#: src/gnuwin32/console.c:2252
+#: src/gnuwin32/console.c:2258
 msgid ""
 "\n"
 "Note: Console is updated only when some input is required.\n"
@@ -175,7 +175,7 @@ msgstr ""
 "\n"
 "Nota: La Console viene aggiornata solo quando richiesto dell'input.\n"
 
-#: src/gnuwin32/console.c:2253
+#: src/gnuwin32/console.c:2259
 msgid ""
 "  Use Ctrl+W to toggle this feature off/on.\n"
 "\n"
@@ -183,7 +183,7 @@ msgstr ""
 "  Usa Ctrl+W per attivare/disattivare questa funzione.\n"
 "\n"
 
-#: src/gnuwin32/console.c:2254
+#: src/gnuwin32/console.c:2260
 msgid ""
 "Use ESC to stop the interpreter.\n"
 "\n"
@@ -191,275 +191,276 @@ msgstr ""
 "Usa ESC per interrompere l'interprete.\n"
 "\n"
 
-#: src/gnuwin32/console.c:2255
+#: src/gnuwin32/console.c:2261
 msgid ""
 "TAB starts completion of the current word.\n"
 "\n"
 msgstr ""
 
-#: src/gnuwin32/console.c:2256
+#: src/gnuwin32/console.c:2262
 msgid "Standard Windows hotkeys can be used to switch to the\n"
 msgstr ""
 "Le hotkey standard di Windows possono essere utilizzate per spostarsi al\n"
 
-#: src/gnuwin32/console.c:2257
+#: src/gnuwin32/console.c:2263
 msgid "graphics device (Ctrl+Tab or Ctrl+F6 in MDI, Alt+Tab in SDI)"
 msgstr "dispositivo grafico (Ctrl+Tab o Ctrl+F6 in MDI, Alt+Tab in SDI)"
 
-#: src/gnuwin32/editor.c:88 src/gnuwin32/editor.c:90
+#: src/gnuwin32/editor.c:91 src/gnuwin32/editor.c:93
 msgid "R Editor"
 msgstr "Editor di R"
 
-#: src/gnuwin32/editor.c:119
+#: src/gnuwin32/editor.c:123
 #, fuzzy, c-format
 msgid "unable to open file %s for reading"
 msgstr "Non � possibile aprire gli appunti"
 
-#: src/gnuwin32/editor.c:135
+#: src/gnuwin32/editor.c:139
 #, c-format
 msgid "Could not read from file '%s'"
 msgstr ""
 
-#: src/gnuwin32/editor.c:166
+#: src/gnuwin32/editor.c:171
 #, c-format
 msgid "Could not save file '%s'"
 msgstr ""
 
-#: src/gnuwin32/editor.c:182
+#: src/gnuwin32/editor.c:187
 #, fuzzy
 msgid "Save script as"
 msgstr "Salva script"
 
-#: src/gnuwin32/editor.c:377 src/gnuwin32/editor.c:694
-#: src/gnuwin32/pager.c:431 src/gnuwin32/rui.c:1076
+#: src/gnuwin32/editor.c:379 src/gnuwin32/editor.c:696
+#: src/gnuwin32/pager.c:430 src/gnuwin32/rui.c:1076
 msgid "Open script"
 msgstr "Apri script"
 
-#: src/gnuwin32/editor.c:500 src/gnuwin32/pager.c:185 src/gnuwin32/pager.c:205
+#: src/gnuwin32/editor.c:502 src/gnuwin32/pager.c:184 src/gnuwin32/pager.c:204
 msgid "No RGui console to paste to"
 msgstr "Nessuna console RGui sulla quale incollare"
 
-#: src/gnuwin32/editor.c:602
+#: src/gnuwin32/editor.c:604
 msgid "R EDITOR\n"
 msgstr "Editor di R\n"
 
-#: src/gnuwin32/editor.c:604
+#: src/gnuwin32/editor.c:606
 msgid "A standard text editor for editing and running R code.\n"
 msgstr "Un editor standard per scrivere ed eseguire codice R.\n"
 
-#: src/gnuwin32/editor.c:606
+#: src/gnuwin32/editor.c:608
 msgid "RUNNING COMMANDS\n"
 msgstr "COMANDI IN ESECUZIONE\n"
 
-#: src/gnuwin32/editor.c:607
+#: src/gnuwin32/editor.c:609
 msgid "To run a line or section of R code, select the code and either\n"
 msgstr ""
 "Per eseguire una linea o sezione di codice R, selezionare il codice e\n"
 
-#: src/gnuwin32/editor.c:608
+#: src/gnuwin32/editor.c:610
 msgid "     Press Ctrl-R\n"
 msgstr "     Premi Ctrl-R\n"
 
-#: src/gnuwin32/editor.c:609
+#: src/gnuwin32/editor.c:611
 msgid "     Select \"Run line or selection\" from the \"Edit\" menu\n"
 msgstr "     Seleziona \"Esegui linea o selezione\" dal menu \"Modifica\"\n"
 
-#: src/gnuwin32/editor.c:610
+#: src/gnuwin32/editor.c:612
 msgid "     Press the \"Run line or selection\" icon on the toolbar\n"
 msgstr ""
 "     Premi l'icona \"Esegui linea o selezione\" sulla barra degli strumenti\n"
 
-#: src/gnuwin32/editor.c:611
+#: src/gnuwin32/editor.c:613
 msgid ""
 "This will copy the selected commands to the console and evaluate them.\n"
 msgstr ""
 "Con questo si copiano i comandi selezionati nella console e si valutano.\n"
 
-#: src/gnuwin32/editor.c:612
+#: src/gnuwin32/editor.c:614
 msgid ""
 "If there is no selection, this will just run the current line and advance\n"
 msgstr "Se non c'� selezione, questo eseguir� la linea attuale e avanzer�\n"
 
-#: src/gnuwin32/editor.c:613
+#: src/gnuwin32/editor.c:615
 msgid "the cursor by one line.\n"
 msgstr "il cursore per una linea.\n"
 
-#: src/gnuwin32/editor.c:625 src/gnuwin32/editor.c:702
-#: src/gnuwin32/editor.c:760
+#: src/gnuwin32/editor.c:627 src/gnuwin32/editor.c:704
+#: src/gnuwin32/editor.c:762
 msgid "Run line or selection"
 msgstr "Esegui linea o selezione"
 
-#: src/gnuwin32/editor.c:627 src/gnuwin32/editor.c:745
+#: src/gnuwin32/editor.c:629 src/gnuwin32/editor.c:747
 msgid "Undo"
 msgstr "Annulla"
 
-#: src/gnuwin32/editor.c:629 src/gnuwin32/editor.c:748
+#: src/gnuwin32/editor.c:631 src/gnuwin32/editor.c:750
 msgid "Cut"
 msgstr "Taglia"
 
-#: src/gnuwin32/editor.c:630 src/gnuwin32/editor.c:750
-#: src/gnuwin32/pager.c:305 src/gnuwin32/pager.c:478 src/gnuwin32/rui.c:859
+#: src/gnuwin32/editor.c:632 src/gnuwin32/editor.c:752
+#: src/gnuwin32/pager.c:304 src/gnuwin32/pager.c:477 src/gnuwin32/rui.c:859
 #: src/gnuwin32/rui.c:1088 src/gnuwin32/rui.c:1144
 msgid "Copy"
 msgstr "Copia"
 
-#: src/gnuwin32/editor.c:631 src/gnuwin32/editor.c:752 src/gnuwin32/rui.c:860
+#: src/gnuwin32/editor.c:633 src/gnuwin32/editor.c:754 src/gnuwin32/rui.c:860
 #: src/gnuwin32/rui.c:1092 src/gnuwin32/rui.c:1145
 msgid "Paste"
 msgstr "Incolla"
 
-#: src/gnuwin32/editor.c:632 src/gnuwin32/editor.c:754
+#: src/gnuwin32/editor.c:634 src/gnuwin32/editor.c:756
 msgid "Delete"
 msgstr "Elimina"
 
-#: src/gnuwin32/editor.c:634 src/gnuwin32/editor.c:756
-#: src/gnuwin32/pager.c:308 src/gnuwin32/pager.c:484 src/gnuwin32/rui.c:866
+#: src/gnuwin32/editor.c:636 src/gnuwin32/editor.c:758
+#: src/gnuwin32/pager.c:307 src/gnuwin32/pager.c:483 src/gnuwin32/rui.c:866
 #: src/gnuwin32/rui.c:1149
 msgid "Select all"
 msgstr "Seleziona tutti"
 
-#: src/gnuwin32/editor.c:698
+#: src/gnuwin32/editor.c:700
 msgid "Save script"
 msgstr "Salva script"
 
-#: src/gnuwin32/editor.c:706 src/gnuwin32/pager.c:451
-#: src/library/grDevices/src/devWindows.c:1594
+#: src/gnuwin32/editor.c:708 src/gnuwin32/pager.c:450
+#: src/library/grDevices/src/devWindows.c:1613
 msgid "Return focus to Console"
 msgstr "Restituisci il focus alla Console"
 
-#: src/gnuwin32/editor.c:709
+#: src/gnuwin32/editor.c:711
 msgid "Print script"
 msgstr "Stampa script"
 
-#: src/gnuwin32/editor.c:711 src/gnuwin32/pager.c:446 src/gnuwin32/rui.c:1104
-#: src/library/grDevices/src/devWindows.c:1588
+#: src/gnuwin32/editor.c:713 src/gnuwin32/pager.c:445 src/gnuwin32/rui.c:1104
+#: src/library/grDevices/src/devWindows.c:1607
 msgid "Print"
 msgstr "Stampa"
 
-#: src/gnuwin32/editor.c:729 src/gnuwin32/pager.c:467 src/gnuwin32/rui.c:1122
-#: src/library/utils/src/windows/dataentry.c:1790
-#: src/library/grDevices/src/devWindows.c:1626
+#: src/gnuwin32/editor.c:731 src/gnuwin32/pager.c:466 src/gnuwin32/rui.c:1122
+#: src/library/utils/src/windows/dataentry.c:1791
+#: src/library/grDevices/src/devWindows.c:1645
 msgid "File"
 msgstr "File"
 
-#: src/gnuwin32/editor.c:730 src/gnuwin32/pager.c:468 src/gnuwin32/rui.c:1124
+#: src/gnuwin32/editor.c:732 src/gnuwin32/pager.c:467 src/gnuwin32/rui.c:1124
 msgid "New script"
 msgstr "Nuovo script"
 
-#: src/gnuwin32/editor.c:732 src/gnuwin32/pager.c:469 src/gnuwin32/rui.c:1125
+#: src/gnuwin32/editor.c:734 src/gnuwin32/pager.c:468 src/gnuwin32/rui.c:1125
 msgid "Open script..."
 msgstr "Apri script..."
 
-#: src/gnuwin32/editor.c:734
+#: src/gnuwin32/editor.c:736
 msgid "Save"
 msgstr "Salva"
 
-#: src/gnuwin32/editor.c:736
+#: src/gnuwin32/editor.c:738
 msgid "Save as..."
 msgstr "Salva con nome..."
 
-#: src/gnuwin32/editor.c:739 src/gnuwin32/pager.c:470 src/gnuwin32/rui.c:1138
-#: src/library/grDevices/src/devWindows.c:1689
+#: src/gnuwin32/editor.c:741 src/gnuwin32/pager.c:469 src/gnuwin32/rui.c:1138
+#: src/library/grDevices/src/devWindows.c:1666
+#: src/library/grDevices/src/devWindows.c:1708
 msgid "Print..."
 msgstr "Stampa..."
 
-#: src/gnuwin32/editor.c:742
+#: src/gnuwin32/editor.c:744
 msgid "Close script"
 msgstr "Chiudi script"
 
-#: src/gnuwin32/editor.c:744 src/gnuwin32/pager.c:477 src/gnuwin32/rui.c:1143
-#: src/library/utils/src/windows/dataentry.c:1796
+#: src/gnuwin32/editor.c:746 src/gnuwin32/pager.c:476 src/gnuwin32/rui.c:1143
+#: src/library/utils/src/windows/dataentry.c:1797
 msgid "Edit"
 msgstr "Modifica"
 
-#: src/gnuwin32/editor.c:758 src/gnuwin32/rui.c:1150
+#: src/gnuwin32/editor.c:760 src/gnuwin32/rui.c:1150
 msgid "Clear console"
 msgstr "Pulisci console"
 
-#: src/gnuwin32/editor.c:762
+#: src/gnuwin32/editor.c:764
 msgid "Run all"
 msgstr "Esegui tutto"
 
-#: src/gnuwin32/editor.c:765
+#: src/gnuwin32/editor.c:767
 msgid "Find..."
 msgstr "Trova..."
 
-#: src/gnuwin32/editor.c:767
+#: src/gnuwin32/editor.c:769
 msgid "Replace..."
 msgstr "Sostituisci..."
 
-#: src/gnuwin32/editor.c:770 src/gnuwin32/rui.c:1154
+#: src/gnuwin32/editor.c:772 src/gnuwin32/rui.c:1154
 msgid "GUI preferences..."
 msgstr "Preferenze interfaccia..."
 
-#: src/gnuwin32/editor.c:780 src/gnuwin32/rui.c:1186
-#: src/library/utils/src/windows/dataentry.c:1697
-#: src/library/utils/src/windows/dataentry.c:1807
+#: src/gnuwin32/editor.c:782 src/gnuwin32/rui.c:1186
+#: src/library/utils/src/windows/dataentry.c:1698
+#: src/library/utils/src/windows/dataentry.c:1808
 msgid "Help"
 msgstr "Aiuto"
 
-#: src/gnuwin32/editor.c:781
+#: src/gnuwin32/editor.c:783
 msgid "Editor"
 msgstr "Editor"
 
-#: src/gnuwin32/editor.c:840
+#: src/gnuwin32/editor.c:842
 msgid "Maximum number of editors reached"
 msgstr "Numero massimo di editor trovati"
 
-#: src/gnuwin32/editor.c:845
+#: src/gnuwin32/editor.c:847
 msgid "Unable to create editor window"
 msgstr "Non � possibile creare una finestra per l'editor"
 
-#: src/gnuwin32/editor.c:853
+#: src/gnuwin32/editor.c:855
 msgid "Untitled"
 msgstr "Senza titolo"
 
-#: src/gnuwin32/extra.c:823 src/gnuwin32/rui.c:1224
+#: src/gnuwin32/extra.c:825
 msgid "Select file"
 msgstr "Seleziona file"
 
-#: src/gnuwin32/pager.c:89
+#: src/gnuwin32/pager.c:88
 msgid "Error opening file"
 msgstr "Errore durante l'apertura del file"
 
-#: src/gnuwin32/pager.c:96
+#: src/gnuwin32/pager.c:95
 msgid "Insufficient memory to display file in internal pager"
 msgstr "Memoria insufficiente per visualizzare il file con il pager interno"
 
-#: src/gnuwin32/pager.c:177 src/gnuwin32/pager.c:189 src/gnuwin32/pager.c:209
+#: src/gnuwin32/pager.c:176 src/gnuwin32/pager.c:188 src/gnuwin32/pager.c:208
 #: src/gnuwin32/rui.c:237 src/gnuwin32/rui.c:264
 msgid "No selection"
 msgstr "Nessuna selezione"
 
-#: src/gnuwin32/pager.c:306 src/gnuwin32/pager.c:436 src/gnuwin32/pager.c:480
+#: src/gnuwin32/pager.c:305 src/gnuwin32/pager.c:435 src/gnuwin32/pager.c:479
 msgid "Paste to console"
 msgstr "Incolla in console"
 
-#: src/gnuwin32/pager.c:307 src/gnuwin32/pager.c:441 src/gnuwin32/pager.c:482
+#: src/gnuwin32/pager.c:306 src/gnuwin32/pager.c:440 src/gnuwin32/pager.c:481
 msgid "Paste commands to console"
 msgstr "Incolla comandi in console"
 
-#: src/gnuwin32/pager.c:310 src/gnuwin32/rui.c:869
-#: src/library/utils/src/windows/dataentry.c:1703
-#: src/library/grDevices/src/devWindows.c:1686
+#: src/gnuwin32/pager.c:309 src/gnuwin32/rui.c:869
+#: src/library/utils/src/windows/dataentry.c:1704
+#: src/library/grDevices/src/devWindows.c:1705
 msgid "Stay on top"
 msgstr "Resta in primo piano"
 
-#: src/gnuwin32/pager.c:312 src/gnuwin32/pager.c:475
-#: src/library/utils/src/windows/dataentry.c:1705
-#: src/library/utils/src/windows/dataentry.c:1792
+#: src/gnuwin32/pager.c:311 src/gnuwin32/pager.c:474
+#: src/library/utils/src/windows/dataentry.c:1706
+#: src/library/utils/src/windows/dataentry.c:1793
 msgid "Close"
 msgstr "Chiudi"
 
-#: src/gnuwin32/pager.c:472 src/gnuwin32/rui.c:1139
+#: src/gnuwin32/pager.c:471 src/gnuwin32/rui.c:1139
 msgid "Save to File..."
 msgstr "Salva su file..."
 
-#: src/gnuwin32/pager.c:487 src/gnuwin32/rui.c:1156
+#: src/gnuwin32/pager.c:486 src/gnuwin32/rui.c:1156
 msgid "View"
 msgstr "Visualizza"
 
-#: src/gnuwin32/pager.c:519
+#: src/gnuwin32/pager.c:518
 msgid "Unable to create pager window"
 msgstr "Non � possibile creare una finestra pager"
 
@@ -617,7 +618,8 @@ msgid "Update packages..."
 msgstr "Aggiorna pacchetti..."
 
 #: src/gnuwin32/rui.c:920
-msgid "Install package(s) from local zip files..."
+#, fuzzy
+msgid "Install package(s) from local files..."
 msgstr "Installa pacchetti da file zip locali..."
 
 #: src/gnuwin32/rui.c:944
@@ -785,52 +787,52 @@ msgstr "Elenca &percorsi di ricerca"
 msgid "Console"
 msgstr "Console"
 
-#: src/gnuwin32/rui.c:1268
+#: src/gnuwin32/rui.c:1251
 msgid "'mname' is limited to 1000 bytes"
 msgstr "'mname' � limitato a 1000 caratteri"
 
-#: src/gnuwin32/rui.c:1310
+#: src/gnuwin32/rui.c:1293
 #, c-format
 msgid "menu %s does not exist"
 msgstr "il menu %s non esiste"
 
-#: src/gnuwin32/rui.c:1363
+#: src/gnuwin32/rui.c:1346
 msgid "'menu' is limited to 500 bytes"
 msgstr "'menu' � limitato a 500 caratteri"
 
-#: src/gnuwin32/rui.c:1373
+#: src/gnuwin32/rui.c:1356
 msgid "base menu does not exist"
 msgstr "il menu base non esiste"
 
-#: src/gnuwin32/rui.c:1388
+#: src/gnuwin32/rui.c:1371
 msgid "failed to allocate menu"
 msgstr "allocazione del menu non avvenuta"
 
-#: src/gnuwin32/rui.c:1405 src/gnuwin32/rui.c:1529
+#: src/gnuwin32/rui.c:1388 src/gnuwin32/rui.c:1512
 msgid "menu + item is limited to 1000 bytes"
 msgstr "menu + voce limitati a 1000 caratteri"
 
-#: src/gnuwin32/rui.c:1413 src/gnuwin32/rui.c:1496
+#: src/gnuwin32/rui.c:1396 src/gnuwin32/rui.c:1479
 msgid "menu does not exist"
 msgstr "il menu non esiste"
 
-#: src/gnuwin32/rui.c:1431 src/gnuwin32/rui.c:1454 src/gnuwin32/rui.c:1459
+#: src/gnuwin32/rui.c:1414 src/gnuwin32/rui.c:1437 src/gnuwin32/rui.c:1442
 msgid "failed to allocate char storage"
 msgstr "allocazione char storage non avvenuta"
 
-#: src/gnuwin32/rui.c:1467
+#: src/gnuwin32/rui.c:1450
 msgid "failed to allocate menuitem"
 msgstr "allocazione menuitem non avvenuta"
 
-#: src/gnuwin32/rui.c:1519
+#: src/gnuwin32/rui.c:1502
 msgid "menu not found"
 msgstr "menu non trovato"
 
-#: src/gnuwin32/rui.c:1537
+#: src/gnuwin32/rui.c:1520
 msgid "menu or item does not exist"
 msgstr "il menu o la voce non esistono"
 
-#: src/gnuwin32/system.c:442
+#: src/gnuwin32/system.c:446
 msgid "Save workspace image?"
 msgstr "Salva area di lavoro?"
 
@@ -838,41 +840,41 @@ msgstr "Salva area di lavoro?"
 msgid "Insufficient memory: cell not copied to the clipboard"
 msgstr "Memoria insufficiente: il testo non pu� essere copiato negli appunti"
 
-#: src/extra/graphapp/dialogs.c:147 src/extra/graphapp/dialogs.c:164
-#: src/extra/graphapp/dialogs.c:181
+#: src/extra/graphapp/dialogs.c:148 src/extra/graphapp/dialogs.c:165
+#: src/extra/graphapp/dialogs.c:182
 msgid "Question"
 msgstr "Domanda"
 
-#: src/extra/graphapp/dialogs.c:202
+#: src/extra/graphapp/dialogs.c:203
 msgid " Change working directory to:"
 msgstr " Cambia directory di lavoro a:"
 
-#: src/extra/graphapp/dialogs.c:205
+#: src/extra/graphapp/dialogs.c:206
 #, c-format
 msgid "Unable to set '%s' as working directory"
 msgstr "Impossibile impostare '%s' come directory di lavoro"
 
-#: src/extra/graphapp/dialogs.c:602 src/extra/graphapp/dialogs.c:620
-#: src/extra/graphapp/dialogs.c:626 src/extra/graphapp/dialogs.c:725
-#: src/extra/graphapp/dialogs.c:739 src/extra/graphapp/dialogs.c:745
+#: src/extra/graphapp/dialogs.c:604 src/extra/graphapp/dialogs.c:622
+#: src/extra/graphapp/dialogs.c:628 src/extra/graphapp/dialogs.c:727
+#: src/extra/graphapp/dialogs.c:741 src/extra/graphapp/dialogs.c:747
 #: src/library/utils/src/windows/widgets.c:125
 msgid "Cancel"
 msgstr "Annulla"
 
-#: src/extra/graphapp/dialogs.c:622 src/extra/graphapp/dialogs.c:741
+#: src/extra/graphapp/dialogs.c:624 src/extra/graphapp/dialogs.c:743
 #: src/library/utils/src/windows/widgets.c:124
 msgid "OK"
 msgstr ""
 
-#: src/extra/graphapp/dialogs.c:733
+#: src/extra/graphapp/dialogs.c:735
 msgid "User"
 msgstr "Utente"
 
-#: src/extra/graphapp/dialogs.c:734
+#: src/extra/graphapp/dialogs.c:736
 msgid "Password"
 msgstr ""
 
-#: src/extra/graphapp/dialogs.c:900 src/extra/graphapp/dialogs.c:906
+#: src/extra/graphapp/dialogs.c:902 src/extra/graphapp/dialogs.c:908
 #, c-format
 msgid "\"%s\" not found"
 msgstr "\"%s\" non trovato"
@@ -882,9 +884,9 @@ msgid "Arrange Icons"
 msgstr "Allinea icone"
 
 #: src/library/utils/src/windows/dataentry.c:223
-#: src/library/utils/src/windows/dataentry.c:1850
-#: src/library/utils/src/windows/dataentry.c:1853
-#: src/library/utils/src/windows/dataentry.c:1884
+#: src/library/utils/src/windows/dataentry.c:1851
+#: src/library/utils/src/windows/dataentry.c:1854
+#: src/library/utils/src/windows/dataentry.c:1885
 msgid "invalid argument"
 msgstr "argomento non valido"
 
@@ -896,17 +898,12 @@ msgstr "tipo non valido per il valore"
 msgid "Data Editor"
 msgstr "Editor dei dati"
 
-#: src/library/utils/src/windows/dataentry.c:282
-#: src/library/utils/src/windows/dataentry.c:1891
-msgid "invalid device"
-msgstr "dispositivo non valido"
-
 #: src/library/utils/src/windows/dataentry.c:331
 msgid "dataentry: internal memory problem"
 msgstr "inserimento dati: problema di memoria interno"
 
 #: src/library/utils/src/windows/dataentry.c:634
-#: src/library/utils/src/windows/dataentry.c:1221
+#: src/library/utils/src/windows/dataentry.c:1222
 msgid "dataentry: internal memory error"
 msgstr "inserimento dati: errore interno di memoria"
 
@@ -915,44 +912,44 @@ msgstr "inserimento dati: errore interno di memoria"
 msgid "internal type error in dataentry"
 msgstr "errore interno di tipo per l'inserimento dati"
 
-#: src/library/utils/src/windows/dataentry.c:852
+#: src/library/utils/src/windows/dataentry.c:853
 #, fuzzy
 msgid "dataentry: parse error on string"
 msgstr "inserimento dati: espressione troppo lunga"
 
-#: src/library/utils/src/windows/dataentry.c:995
+#: src/library/utils/src/windows/dataentry.c:996
 msgid "dataentry: expression too long"
 msgstr "inserimento dati: espressione troppo lunga"
 
-#: src/library/utils/src/windows/dataentry.c:1472
+#: src/library/utils/src/windows/dataentry.c:1473
 msgid "column names cannot be blank"
 msgstr "nomi colonna non possono essere vuoti"
 
-#: src/library/utils/src/windows/dataentry.c:1518
+#: src/library/utils/src/windows/dataentry.c:1519
 msgid "Variable editor"
 msgstr "Editor dei variabile"
 
-#: src/library/utils/src/windows/dataentry.c:1523
+#: src/library/utils/src/windows/dataentry.c:1524
 msgid "variable name"
 msgstr "nome variabile"
 
-#: src/library/utils/src/windows/dataentry.c:1525
+#: src/library/utils/src/windows/dataentry.c:1526
 msgid "type"
 msgstr "tipo"
 
-#: src/library/utils/src/windows/dataentry.c:1639
+#: src/library/utils/src/windows/dataentry.c:1640
 msgid "Cell width(s)"
 msgstr "Larghezza cella"
 
-#: src/library/utils/src/windows/dataentry.c:1645
+#: src/library/utils/src/windows/dataentry.c:1646
 msgid "Cell width"
 msgstr "Larghezza cella"
 
-#: src/library/utils/src/windows/dataentry.c:1648
+#: src/library/utils/src/windows/dataentry.c:1649
 msgid "variable"
 msgstr "variabile"
 
-#: src/library/utils/src/windows/dataentry.c:1691
+#: src/library/utils/src/windows/dataentry.c:1692
 msgid ""
 "Navigation.\n"
 "  Keyboard: cursor keys move selection\n"
@@ -995,221 +992,223 @@ msgstr ""
 "colonna selezionata\n"
 "\n"
 
-#: src/library/utils/src/windows/dataentry.c:1699
+#: src/library/utils/src/windows/dataentry.c:1700
 msgid "Copy selected cell"
 msgstr "Copia le celle selezionate"
 
-#: src/library/utils/src/windows/dataentry.c:1700
+#: src/library/utils/src/windows/dataentry.c:1701
 msgid "Paste to selected cell"
 msgstr "Incolla le celle selezionate"
 
-#: src/library/utils/src/windows/dataentry.c:1701
+#: src/library/utils/src/windows/dataentry.c:1702
 msgid "Autosize column"
 msgstr "Adatta colonna"
 
-#: src/library/utils/src/windows/dataentry.c:1797
+#: src/library/utils/src/windows/dataentry.c:1798
 msgid "Copy  \tCTRL+C"
 msgstr "Copia  \tCTRL+C"
 
-#: src/library/utils/src/windows/dataentry.c:1799
+#: src/library/utils/src/windows/dataentry.c:1800
 msgid "Paste \tCTRL+V"
 msgstr "Incolla \tCTRL+V"
 
-#: src/library/utils/src/windows/dataentry.c:1801
+#: src/library/utils/src/windows/dataentry.c:1802
 msgid "Delete\tDEL"
 msgstr "Elimina\tDEL"
 
-#: src/library/utils/src/windows/dataentry.c:1804
+#: src/library/utils/src/windows/dataentry.c:1805
 msgid "Cell widths ..."
 msgstr "Larghezza celle..."
 
-#: src/library/utils/src/windows/dataentry.c:1808
+#: src/library/utils/src/windows/dataentry.c:1809
 msgid "Data editor"
 msgstr "Editor dei dati"
 
-#: src/library/grDevices/src/devWindows.c:932
+#: src/library/grDevices/src/devWindows.c:949
 msgid "Portable network graphics file"
 msgstr "File Portable Network Graphics"
 
-#: src/library/grDevices/src/devWindows.c:935
+#: src/library/grDevices/src/devWindows.c:952
 msgid "Windows bitmap file"
 msgstr "File bitmap per Windows"
 
-#: src/library/grDevices/src/devWindows.c:938
+#: src/library/grDevices/src/devWindows.c:955
 msgid "TIFF file"
 msgstr "File TIFF"
 
-#: src/library/grDevices/src/devWindows.c:941
+#: src/library/grDevices/src/devWindows.c:958
 msgid "Jpeg file"
 msgstr "File jpeg"
 
-#: src/library/grDevices/src/devWindows.c:963
+#: src/library/grDevices/src/devWindows.c:980
 msgid "Postscript file"
 msgstr "file Postscript"
 
-#: src/library/grDevices/src/devWindows.c:975
+#: src/library/grDevices/src/devWindows.c:992
 msgid "PDF file"
 msgstr "File PDF"
 
-#: src/library/grDevices/src/devWindows.c:987
+#: src/library/grDevices/src/devWindows.c:1004
 msgid "Enhanced metafiles"
 msgstr "Metafile avanzati"
 
-#: src/library/grDevices/src/devWindows.c:990
-#: src/library/grDevices/src/devWindows.c:3436
+#: src/library/grDevices/src/devWindows.c:1007
+#: src/library/grDevices/src/devWindows.c:3445
 msgid "file path selected is too long: only 512 bytes are allowed"
 msgstr "Il percorso scelto � troppo lungo: ammessi solo 512 caratteri"
 
-#: src/library/grDevices/src/devWindows.c:1201
+#: src/library/grDevices/src/devWindows.c:1218
 msgid "No plot to replace!"
 msgstr "Nessun grafico da sostituire!"
 
-#: src/library/grDevices/src/devWindows.c:1249
+#: src/library/grDevices/src/devWindows.c:1268
 msgid "Variable name"
 msgstr "Nome variabile"
 
-#: src/library/grDevices/src/devWindows.c:1258
+#: src/library/grDevices/src/devWindows.c:1277
 #, fuzzy
 msgid "Variable doesn't contain any plots!"
 msgstr "La variabile non esiste o non contiene grafici!"
 
-#: src/library/grDevices/src/devWindows.c:1273
+#: src/library/grDevices/src/devWindows.c:1292
 msgid "Name of variable to save to"
 msgstr "Nome variabile da salvare"
 
-#: src/library/grDevices/src/devWindows.c:1582
+#: src/library/grDevices/src/devWindows.c:1601
 msgid "Copy to the clipboard as a metafile"
 msgstr "Copiare negli appunti come metafile"
 
-#: src/library/grDevices/src/devWindows.c:1600
-#: src/library/grDevices/src/devWindows.c:1611
+#: src/library/grDevices/src/devWindows.c:1619
+#: src/library/grDevices/src/devWindows.c:1630
 msgid "Stop locator"
 msgstr "Termina locator"
 
-#: src/library/grDevices/src/devWindows.c:1610
-#: src/library/grDevices/src/devWindows.c:1614
+#: src/library/grDevices/src/devWindows.c:1629
+#: src/library/grDevices/src/devWindows.c:1633
 msgid "Stop"
 msgstr "Stop"
 
-#: src/library/grDevices/src/devWindows.c:1616
+#: src/library/grDevices/src/devWindows.c:1635
 msgid "Continue"
 msgstr "Continua"
 
-#: src/library/grDevices/src/devWindows.c:1620
+#: src/library/grDevices/src/devWindows.c:1639
 msgid "Next"
 msgstr "Successivo"
 
-#: src/library/grDevices/src/devWindows.c:1621
+#: src/library/grDevices/src/devWindows.c:1640
 msgid "Next plot"
 msgstr "Grafico successivo"
 
-#: src/library/grDevices/src/devWindows.c:1627
+#: src/library/grDevices/src/devWindows.c:1646
 msgid "Save as"
 msgstr "Salva con nome..."
 
-#: src/library/grDevices/src/devWindows.c:1636
-#: src/library/grDevices/src/devWindows.c:1638
-#: src/library/grDevices/src/devWindows.c:1640
+#: src/library/grDevices/src/devWindows.c:1655
+#: src/library/grDevices/src/devWindows.c:1657
+#: src/library/grDevices/src/devWindows.c:1659
 #, c-format
 msgid "%s quality..."
 msgstr "qualit� %s..."
 
-#: src/library/grDevices/src/devWindows.c:1642
+#: src/library/grDevices/src/devWindows.c:1661
 msgid "Copy to the clipboard"
 msgstr "Copia negli appunti"
 
-#: src/library/grDevices/src/devWindows.c:1643
+#: src/library/grDevices/src/devWindows.c:1662
 msgid "as a Bitmap\tCTRL+C"
 msgstr "con Bitmpa\tCTRL+C"
 
-#: src/library/grDevices/src/devWindows.c:1644
+#: src/library/grDevices/src/devWindows.c:1663
 msgid "as a Metafile\tCTRL+W"
 msgstr "come Metafile\tCTRL+W"
 
-#: src/library/grDevices/src/devWindows.c:1647
-msgid "Print...\tCTRL+P"
-msgstr "Stampa...\tCTRL+P"
-
-#: src/library/grDevices/src/devWindows.c:1649
+#: src/library/grDevices/src/devWindows.c:1668
 msgid "close Device"
 msgstr "chiudi dispositivo"
 
-#: src/library/grDevices/src/devWindows.c:1650
+#: src/library/grDevices/src/devWindows.c:1669
 msgid "History"
 msgstr "Salva cronologia..."
 
-#: src/library/grDevices/src/devWindows.c:1651
+#: src/library/grDevices/src/devWindows.c:1670
 msgid "Recording"
 msgstr "Registro"
 
-#: src/library/grDevices/src/devWindows.c:1654
+#: src/library/grDevices/src/devWindows.c:1673
 msgid "Add\tINS"
 msgstr "Aggiungi\tINS"
 
-#: src/library/grDevices/src/devWindows.c:1655
+#: src/library/grDevices/src/devWindows.c:1674
 msgid "Replace"
 msgstr "Sostituisci"
 
-#: src/library/grDevices/src/devWindows.c:1657
+#: src/library/grDevices/src/devWindows.c:1676
 msgid "Previous\tPgUp"
 msgstr "Precedente\tPgUp"
 
-#: src/library/grDevices/src/devWindows.c:1658
+#: src/library/grDevices/src/devWindows.c:1677
 msgid "Next\tPgDown"
 msgstr "Successivo\tPgDown"
 
-#: src/library/grDevices/src/devWindows.c:1660
+#: src/library/grDevices/src/devWindows.c:1679
 msgid "Save to variable..."
 msgstr "Salva su variabile..."
 
-#: src/library/grDevices/src/devWindows.c:1661
+#: src/library/grDevices/src/devWindows.c:1680
 msgid "Get from variable..."
 msgstr "Ottieni da variabile..."
 
-#: src/library/grDevices/src/devWindows.c:1663
+#: src/library/grDevices/src/devWindows.c:1682
 msgid "Clear history"
 msgstr "Cancella cronologia"
 
-#: src/library/grDevices/src/devWindows.c:1664
+#: src/library/grDevices/src/devWindows.c:1683
 msgid "Resize"
 msgstr "Ridimensiona"
 
-#: src/library/grDevices/src/devWindows.c:1665
+#: src/library/grDevices/src/devWindows.c:1684
 msgid "R mode"
 msgstr "Modalit� R"
 
-#: src/library/grDevices/src/devWindows.c:1667
+#: src/library/grDevices/src/devWindows.c:1686
 msgid "Fit to window"
 msgstr "Riscala dimensione finestra"
 
-#: src/library/grDevices/src/devWindows.c:1669
+#: src/library/grDevices/src/devWindows.c:1688
 msgid "Fixed size"
 msgstr "Dimensione fissa"
 
-#: src/library/grDevices/src/devWindows.c:1676
+#: src/library/grDevices/src/devWindows.c:1695
 msgid "Copy as metafile"
 msgstr "Copia come metafile"
 
-#: src/library/grDevices/src/devWindows.c:1678
+#: src/library/grDevices/src/devWindows.c:1697
 msgid "Copy as bitmap"
 msgstr "Copia come bitmap"
 
-#: src/library/grDevices/src/devWindows.c:1681
+#: src/library/grDevices/src/devWindows.c:1700
 msgid "Save as metafile..."
 msgstr "Salva su metafile..."
 
-#: src/library/grDevices/src/devWindows.c:1683
+#: src/library/grDevices/src/devWindows.c:1702
 msgid "Save as postscript..."
 msgstr "Salva su postscript..."
 
-#: src/library/grDevices/src/devWindows.c:3136
+#: src/library/grDevices/src/devWindows.c:3143
 msgid "Locator is active"
 msgstr "Locator � attivo"
 
-#: src/library/grDevices/src/devWindows.c:3763
+#: src/library/grDevices/src/devWindows.c:3769
 msgid "Waiting to confirm page change..."
 msgstr "Aspetto per confermare cambio pagina..."
 
-#: src/library/grDevices/src/devWindows.c:3775
+#: src/library/grDevices/src/devWindows.c:3781
 msgid "Click or hit ENTER for next page"
 msgstr "Click o premi ENTER per pagina successiva"
+
+#~ msgid "Print...\tCTRL+P"
+#~ msgstr "Stampa...\tCTRL+P"
+
+#~ msgid "invalid device"
+#~ msgstr "dispositivo non valido"
diff --git a/src/library/base/po/RGui-ja.po b/src/library/base/po/RGui-ja.po
index 2687815..37dc4a6 100644
--- a/src/library/base/po/RGui-ja.po
+++ b/src/library/base/po/RGui-ja.po
@@ -6,8 +6,8 @@
 msgid ""
 msgstr ""
 "Project-Id-Version: R 2.1.1 \n"
-"Report-Msgid-Bugs-To: bugs.r-project.org \n"
-"POT-Creation-Date: 2013-03-18 19:36+0000 \n"
+"Report-Msgid-Bugs-To: bugs.r-project.org\n"
+"POT-Creation-Date: 2016-04-01 10:28-0700\n"
 "PO-Revision-Date: 2013-03-19 13:41+0200 \n"
 "Last-Translator: Masafumi  \n"
 "Language-Team: R-core <R-core at R-project.org> \n"
@@ -31,11 +31,11 @@ msgstr " メモリ不足: テキストをクリップボードにコピーする
 msgid "Unable to open the clipboard"
 msgstr " クリップボードを開くことができません "
 
-#: src/gnuwin32/console.c:1914
+#: src/gnuwin32/console.c:1919
 msgid "Insufficient memory. Please close the console"
 msgstr " メモリが不足しています。コンソールを閉じてください "
 
-#: src/gnuwin32/console.c:1969 src/gnuwin32/console.c:2022
+#: src/gnuwin32/console.c:1974 src/gnuwin32/console.c:2028
 #: src/gnuwin32/preferences.c:333
 #, c-format
 msgid ""
@@ -45,23 +45,23 @@ msgstr ""
 " フォント %s-%d-%d  が見つかりません \n"
 " システムに用意されているフォントを使います "
 
-#: src/gnuwin32/console.c:2127
+#: src/gnuwin32/console.c:2133
 msgid "Save selection to"
 msgstr " 選択を以下にセーブします "
 
-#: src/gnuwin32/console.c:2129
+#: src/gnuwin32/console.c:2135
 msgid "Save console contents to"
 msgstr " コンソールの内容を以下に保存します "
 
-#: src/gnuwin32/console.c:2228
+#: src/gnuwin32/console.c:2234
 msgid "Scrolling.\n"
 msgstr " スクロール. \n"
 
-#: src/gnuwin32/console.c:2229
+#: src/gnuwin32/console.c:2235
 msgid "  Keyboard: PgUp, PgDown, Ctrl+Arrows, Ctrl+Home, Ctrl+End,\n"
 msgstr "   キーボード: PgUp, PgDown, Ctrl+矢印, Ctrl+Home, Ctrl+End, \n"
 
-#: src/gnuwin32/console.c:2230
+#: src/gnuwin32/console.c:2236
 msgid ""
 "  Mouse: use the scrollbar(s).\n"
 "\n"
@@ -69,76 +69,76 @@ msgstr ""
 "   マウス: スクロールバーを使います. \n"
 " \n"
 
-#: src/gnuwin32/console.c:2231
+#: src/gnuwin32/console.c:2237
 msgid "Editing.\n"
 msgstr " 編集. \n"
 
-#: src/gnuwin32/console.c:2232
+#: src/gnuwin32/console.c:2238
 msgid "  Moving the cursor: \n"
 msgstr "   カーソル移動: \n"
 
-#: src/gnuwin32/console.c:2233
+#: src/gnuwin32/console.c:2239
 msgid "     Left arrow or Ctrl+B: move backward one character;\n"
 msgstr "      左矢印 または Ctrl+B: 1 文字戻る; \n"
 
-#: src/gnuwin32/console.c:2234
+#: src/gnuwin32/console.c:2240
 msgid "     Right arrow or Ctrl+F: move forward one character;\n"
 msgstr "      右矢印 または Ctrl+F: 1 文字進む; \n"
 
-#: src/gnuwin32/console.c:2235
+#: src/gnuwin32/console.c:2241
 msgid "     Home or Ctrl+A: go to beginning of line;\n"
 msgstr "      Home または Ctrl+A: 行頭に移動; \n"
 
-#: src/gnuwin32/console.c:2236
+#: src/gnuwin32/console.c:2242
 msgid "     End or Ctrl+E: go to end of line;\n"
 msgstr "      End または Ctrl+E: 行末に移動; \n"
 
-#: src/gnuwin32/console.c:2237
+#: src/gnuwin32/console.c:2243
 msgid "  History: Up and Down Arrows, Ctrl+P, Ctrl+N\n"
 msgstr "   履歴: 上矢印、下矢印、Ctrl+P、Ctrl+N \n"
 
-#: src/gnuwin32/console.c:2238
+#: src/gnuwin32/console.c:2244
 msgid "  Deleting:\n"
 msgstr "   消去: \n"
 
-#: src/gnuwin32/console.c:2239
+#: src/gnuwin32/console.c:2245
 msgid "     Del or Ctrl+D: delete current character or selection;\n"
 msgstr "      Delete または Ctrl+D: 現在選択している文字を消去; \n"
 
-#: src/gnuwin32/console.c:2240
+#: src/gnuwin32/console.c:2246
 msgid "     Backspace: delete preceding character;\n"
 msgstr "      Backspace: 1 つ前の文字を消去; \n"
 
-#: src/gnuwin32/console.c:2241
+#: src/gnuwin32/console.c:2247
 msgid ""
 "     Ctrl+Del or Ctrl+K: delete text from current character to end of line.\n"
 msgstr ""
 "      Ctrl+Del または Ctrl+K: 現在選択している文字から行末までの文字を全て消"
 "去。 \n"
 
-#: src/gnuwin32/console.c:2242
+#: src/gnuwin32/console.c:2248
 msgid "     Ctrl+U: delete all text from current line.\n"
 msgstr "      Ctrl+U: 現在の行のテキストを全て消去。 \n"
 
-#: src/gnuwin32/console.c:2243
+#: src/gnuwin32/console.c:2249
 msgid "  Copy and paste.\n"
 msgstr "   コピー&ペースト. \n"
 
-#: src/gnuwin32/console.c:2244
+#: src/gnuwin32/console.c:2250
 msgid ""
 "     Use the mouse (with the left button held down) to mark (select) text.\n"
 msgstr ""
 "      マウスの左ボタンを押しながらマウスを使って文字列をマーク (選択) しま"
 "す。 \n"
 
-#: src/gnuwin32/console.c:2245
+#: src/gnuwin32/console.c:2251
 msgid ""
 "     Use Shift+Del (or Ctrl+C) to copy the marked text to the clipboard and\n"
 msgstr ""
 "      Shift+Del (または Ctrl+C) を使って、マーク (選択) した文字列をクリップ"
 "ボードにコピーし、 \n"
 
-#: src/gnuwin32/console.c:2246
+#: src/gnuwin32/console.c:2252
 msgid ""
 "     Shift+Ins (or Ctrl+V or Ctrl+Y) to paste the content of the clipboard "
 "(if any)  \n"
@@ -146,29 +146,29 @@ msgstr ""
 "      Shift+Ins (または Ctrl+V または Ctrl+Y) でクリップボードの内容 (もしあ"
 "れば) をペーストして \n"
 
-#: src/gnuwin32/console.c:2247
+#: src/gnuwin32/console.c:2253
 msgid "     to the console, Ctrl+X first copy then paste\n"
 msgstr ""
 "      、コンソールへ出力します、また Ctrl+X でコピーした後にペーストしても構"
 "いません \n"
 
-#: src/gnuwin32/console.c:2248
+#: src/gnuwin32/console.c:2254
 msgid "  Misc:\n"
 msgstr "   その他: \n"
 
-#: src/gnuwin32/console.c:2249
+#: src/gnuwin32/console.c:2255
 msgid "     Ctrl+L: Clear the console.\n"
 msgstr "      Ctrl+L: コンソール画面を全消去します。 \n"
 
-#: src/gnuwin32/console.c:2250
+#: src/gnuwin32/console.c:2256
 msgid "     Ctrl+O or INS: Toggle overwrite mode: initially off.\n"
 msgstr "      Ctrl+O: 上書きモードを切り替えます: 最初はオフです. \n"
 
-#: src/gnuwin32/console.c:2251
+#: src/gnuwin32/console.c:2257
 msgid "     Ctrl+T: Interchange current char with one to the left.\n"
 msgstr "      Ctrl+T: 現在の文字と1文字前の文字を入れ替えます. \n"
 
-#: src/gnuwin32/console.c:2252
+#: src/gnuwin32/console.c:2258
 msgid ""
 "\n"
 "Note: Console is updated only when some input is required.\n"
@@ -176,7 +176,7 @@ msgstr ""
 "\n"
 " 注意: 何らかの入力が要求された場合にのみ,コンソールが更新されます. \n"
 
-#: src/gnuwin32/console.c:2253
+#: src/gnuwin32/console.c:2259
 msgid ""
 "  Use Ctrl+W to toggle this feature off/on.\n"
 "\n"
@@ -184,7 +184,7 @@ msgstr ""
 "   Ctrl+W で現在の機能の off/on を切り替えます. \n"
 " \n"
 
-#: src/gnuwin32/console.c:2254
+#: src/gnuwin32/console.c:2260
 msgid ""
 "Use ESC to stop the interpreter.\n"
 "\n"
@@ -192,7 +192,7 @@ msgstr ""
 " ESC で計算を中断します. \n"
 " \n"
 
-#: src/gnuwin32/console.c:2255
+#: src/gnuwin32/console.c:2261
 msgid ""
 "TAB starts completion of the current word.\n"
 "\n"
@@ -200,271 +200,272 @@ msgstr ""
 " 'rcompgen' パッケージがインストールされていれば, TAB で補完を開始します. \n"
 " \n"
 
-#: src/gnuwin32/console.c:2256
+#: src/gnuwin32/console.c:2262
 msgid "Standard Windows hotkeys can be used to switch to the\n"
 msgstr " 標準ウインドウズ・ホットキーを使い以下へ切りかえることができます \n"
 
-#: src/gnuwin32/console.c:2257
+#: src/gnuwin32/console.c:2263
 msgid "graphics device (Ctrl+Tab or Ctrl+F6 in MDI, Alt+Tab in SDI)"
 msgstr ""
 " グラフィックスデバイス (MDI 中の Ctrl+Tab または Ctrl+F6, SDI 中の Alt+Tab) "
 
-#: src/gnuwin32/editor.c:88 src/gnuwin32/editor.c:90
+#: src/gnuwin32/editor.c:91 src/gnuwin32/editor.c:93
 msgid "R Editor"
 msgstr " Rエディタ "
 
-#: src/gnuwin32/editor.c:119
+#: src/gnuwin32/editor.c:123
 #, c-format
 msgid "unable to open file %s for reading"
 msgstr " ファイル %s を読み込み用に開くことができません "
 
-#: src/gnuwin32/editor.c:135
+#: src/gnuwin32/editor.c:139
 #, c-format
 msgid "Could not read from file '%s'"
 msgstr " ファイル '%s' から読み込めません "
 
-#: src/gnuwin32/editor.c:166
+#: src/gnuwin32/editor.c:171
 #, c-format
 msgid "Could not save file '%s'"
 msgstr " ファイル '%s' に書き込めません "
 
-#: src/gnuwin32/editor.c:182
+#: src/gnuwin32/editor.c:187
 msgid "Save script as"
 msgstr " スクリプトを保存する "
 
-#: src/gnuwin32/editor.c:377 src/gnuwin32/editor.c:694
-#: src/gnuwin32/pager.c:431 src/gnuwin32/rui.c:1076
+#: src/gnuwin32/editor.c:379 src/gnuwin32/editor.c:696
+#: src/gnuwin32/pager.c:430 src/gnuwin32/rui.c:1076
 msgid "Open script"
 msgstr " スクリプトを開く "
 
-#: src/gnuwin32/editor.c:500 src/gnuwin32/pager.c:185 src/gnuwin32/pager.c:205
+#: src/gnuwin32/editor.c:502 src/gnuwin32/pager.c:184 src/gnuwin32/pager.c:204
 msgid "No RGui console to paste to"
 msgstr " ペーストすべき RGui コンソールがありません "
 
-#: src/gnuwin32/editor.c:602
+#: src/gnuwin32/editor.c:604
 msgid "R EDITOR\n"
 msgstr " R エディタ \n"
 
-#: src/gnuwin32/editor.c:604
+#: src/gnuwin32/editor.c:606
 msgid "A standard text editor for editing and running R code.\n"
 msgstr " R コードの編集・実行用の標準テキストエディタ. \n"
 
-#: src/gnuwin32/editor.c:606
+#: src/gnuwin32/editor.c:608
 msgid "RUNNING COMMANDS\n"
 msgstr " コマンド実行中 \n"
 
-#: src/gnuwin32/editor.c:607
+#: src/gnuwin32/editor.c:609
 msgid "To run a line or section of R code, select the code and either\n"
 msgstr ""
 " カーソル行または選択中の R コードを実行するために, コードを選択してから \n"
 
-#: src/gnuwin32/editor.c:608
+#: src/gnuwin32/editor.c:610
 msgid "     Press Ctrl-R\n"
 msgstr "     Ctrl+R を押してください \n"
 
-#: src/gnuwin32/editor.c:609
+#: src/gnuwin32/editor.c:611
 msgid "     Select \"Run line or selection\" from the \"Edit\" menu\n"
 msgstr ""
 "      \"編集\" メニューから \"カーソル行または選択中の R コードを実行\" を選"
 "択して \n"
 
-#: src/gnuwin32/editor.c:610
+#: src/gnuwin32/editor.c:612
 msgid "     Press the \"Run line or selection\" icon on the toolbar\n"
 msgstr ""
 "      ツールバーの \"カーソル行または選択中の R コードを実行\" アイコンをク"
 "リックしてください \n"
 
-#: src/gnuwin32/editor.c:611
+#: src/gnuwin32/editor.c:613
 msgid ""
 "This will copy the selected commands to the console and evaluate them.\n"
 msgstr ""
 " これは選択されたコマンドをコンソールにコピーし, そのコマンドを評価します \n"
 
-#: src/gnuwin32/editor.c:612
+#: src/gnuwin32/editor.c:614
 msgid ""
 "If there is no selection, this will just run the current line and advance\n"
 msgstr " コマンドの選択がなければ現在行を実行し, \n"
 
-#: src/gnuwin32/editor.c:613
+#: src/gnuwin32/editor.c:615
 msgid "the cursor by one line.\n"
 msgstr " カーソルを 1 行進めます \n"
 
-#: src/gnuwin32/editor.c:625 src/gnuwin32/editor.c:702
-#: src/gnuwin32/editor.c:760
+#: src/gnuwin32/editor.c:627 src/gnuwin32/editor.c:704
+#: src/gnuwin32/editor.c:762
 msgid "Run line or selection"
 msgstr " カーソル行または選択中の R コードを実行 "
 
-#: src/gnuwin32/editor.c:627 src/gnuwin32/editor.c:745
+#: src/gnuwin32/editor.c:629 src/gnuwin32/editor.c:747
 msgid "Undo"
 msgstr " やり直し "
 
-#: src/gnuwin32/editor.c:629 src/gnuwin32/editor.c:748
+#: src/gnuwin32/editor.c:631 src/gnuwin32/editor.c:750
 msgid "Cut"
 msgstr " カット "
 
-#: src/gnuwin32/editor.c:630 src/gnuwin32/editor.c:750
-#: src/gnuwin32/pager.c:305 src/gnuwin32/pager.c:478 src/gnuwin32/rui.c:859
+#: src/gnuwin32/editor.c:632 src/gnuwin32/editor.c:752
+#: src/gnuwin32/pager.c:304 src/gnuwin32/pager.c:477 src/gnuwin32/rui.c:859
 #: src/gnuwin32/rui.c:1088 src/gnuwin32/rui.c:1144
 msgid "Copy"
 msgstr " コピー "
 
-#: src/gnuwin32/editor.c:631 src/gnuwin32/editor.c:752 src/gnuwin32/rui.c:860
+#: src/gnuwin32/editor.c:633 src/gnuwin32/editor.c:754 src/gnuwin32/rui.c:860
 #: src/gnuwin32/rui.c:1092 src/gnuwin32/rui.c:1145
 msgid "Paste"
 msgstr " ペースト "
 
-#: src/gnuwin32/editor.c:632 src/gnuwin32/editor.c:754
+#: src/gnuwin32/editor.c:634 src/gnuwin32/editor.c:756
 msgid "Delete"
 msgstr " 消去 "
 
-#: src/gnuwin32/editor.c:634 src/gnuwin32/editor.c:756
-#: src/gnuwin32/pager.c:308 src/gnuwin32/pager.c:484 src/gnuwin32/rui.c:866
+#: src/gnuwin32/editor.c:636 src/gnuwin32/editor.c:758
+#: src/gnuwin32/pager.c:307 src/gnuwin32/pager.c:483 src/gnuwin32/rui.c:866
 #: src/gnuwin32/rui.c:1149
 msgid "Select all"
 msgstr " 全て選択 "
 
-#: src/gnuwin32/editor.c:698
+#: src/gnuwin32/editor.c:700
 msgid "Save script"
 msgstr " スクリプトを保存する "
 
-#: src/gnuwin32/editor.c:706 src/gnuwin32/pager.c:451
-#: src/library/grDevices/src/devWindows.c:1594
+#: src/gnuwin32/editor.c:708 src/gnuwin32/pager.c:450
+#: src/library/grDevices/src/devWindows.c:1613
 msgid "Return focus to Console"
 msgstr " コンソールに戻る "
 
-#: src/gnuwin32/editor.c:709
+#: src/gnuwin32/editor.c:711
 msgid "Print script"
 msgstr " スクリプトを印刷する "
 
-#: src/gnuwin32/editor.c:711 src/gnuwin32/pager.c:446 src/gnuwin32/rui.c:1104
-#: src/library/grDevices/src/devWindows.c:1588
+#: src/gnuwin32/editor.c:713 src/gnuwin32/pager.c:445 src/gnuwin32/rui.c:1104
+#: src/library/grDevices/src/devWindows.c:1607
 msgid "Print"
 msgstr " 印刷 "
 
-#: src/gnuwin32/editor.c:729 src/gnuwin32/pager.c:467 src/gnuwin32/rui.c:1122
-#: src/library/utils/src/windows/dataentry.c:1790
-#: src/library/grDevices/src/devWindows.c:1626
+#: src/gnuwin32/editor.c:731 src/gnuwin32/pager.c:466 src/gnuwin32/rui.c:1122
+#: src/library/utils/src/windows/dataentry.c:1791
+#: src/library/grDevices/src/devWindows.c:1645
 msgid "File"
 msgstr " ファイル "
 
-#: src/gnuwin32/editor.c:730 src/gnuwin32/pager.c:468 src/gnuwin32/rui.c:1124
+#: src/gnuwin32/editor.c:732 src/gnuwin32/pager.c:467 src/gnuwin32/rui.c:1124
 msgid "New script"
 msgstr " 新しいスクリプト "
 
-#: src/gnuwin32/editor.c:732 src/gnuwin32/pager.c:469 src/gnuwin32/rui.c:1125
+#: src/gnuwin32/editor.c:734 src/gnuwin32/pager.c:468 src/gnuwin32/rui.c:1125
 msgid "Open script..."
 msgstr " スクリプトを開く... "
 
-#: src/gnuwin32/editor.c:734
+#: src/gnuwin32/editor.c:736
 msgid "Save"
 msgstr " 保存 "
 
-#: src/gnuwin32/editor.c:736
+#: src/gnuwin32/editor.c:738
 msgid "Save as..."
 msgstr " 別名で保存... "
 
-#: src/gnuwin32/editor.c:739 src/gnuwin32/pager.c:470 src/gnuwin32/rui.c:1138
-#: src/library/grDevices/src/devWindows.c:1689
+#: src/gnuwin32/editor.c:741 src/gnuwin32/pager.c:469 src/gnuwin32/rui.c:1138
+#: src/library/grDevices/src/devWindows.c:1666
+#: src/library/grDevices/src/devWindows.c:1708
 msgid "Print..."
 msgstr " 印刷... "
 
-#: src/gnuwin32/editor.c:742
+#: src/gnuwin32/editor.c:744
 msgid "Close script"
 msgstr " スクリプトを閉じる "
 
-#: src/gnuwin32/editor.c:744 src/gnuwin32/pager.c:477 src/gnuwin32/rui.c:1143
-#: src/library/utils/src/windows/dataentry.c:1796
+#: src/gnuwin32/editor.c:746 src/gnuwin32/pager.c:476 src/gnuwin32/rui.c:1143
+#: src/library/utils/src/windows/dataentry.c:1797
 msgid "Edit"
 msgstr " 編集 "
 
-#: src/gnuwin32/editor.c:758 src/gnuwin32/rui.c:1150
+#: src/gnuwin32/editor.c:760 src/gnuwin32/rui.c:1150
 msgid "Clear console"
 msgstr " コンソール画面を消去 "
 
-#: src/gnuwin32/editor.c:762
+#: src/gnuwin32/editor.c:764
 msgid "Run all"
 msgstr " 全て実行 "
 
-#: src/gnuwin32/editor.c:765
+#: src/gnuwin32/editor.c:767
 msgid "Find..."
 msgstr " 検索... "
 
-#: src/gnuwin32/editor.c:767
+#: src/gnuwin32/editor.c:769
 msgid "Replace..."
 msgstr " 置換... "
 
-#: src/gnuwin32/editor.c:770 src/gnuwin32/rui.c:1154
+#: src/gnuwin32/editor.c:772 src/gnuwin32/rui.c:1154
 msgid "GUI preferences..."
 msgstr " GUI プリファレンス... "
 
-#: src/gnuwin32/editor.c:780 src/gnuwin32/rui.c:1186
-#: src/library/utils/src/windows/dataentry.c:1697
-#: src/library/utils/src/windows/dataentry.c:1807
+#: src/gnuwin32/editor.c:782 src/gnuwin32/rui.c:1186
+#: src/library/utils/src/windows/dataentry.c:1698
+#: src/library/utils/src/windows/dataentry.c:1808
 msgid "Help"
 msgstr " ヘルプ "
 
-#: src/gnuwin32/editor.c:781
+#: src/gnuwin32/editor.c:783
 msgid "Editor"
 msgstr " エディタ "
 
-#: src/gnuwin32/editor.c:840
+#: src/gnuwin32/editor.c:842
 msgid "Maximum number of editors reached"
 msgstr " エディタ範囲の最大数に達してしまいました "
 
-#: src/gnuwin32/editor.c:845
+#: src/gnuwin32/editor.c:847
 msgid "Unable to create editor window"
 msgstr " エディタウインドウを作成することができません "
 
-#: src/gnuwin32/editor.c:853
+#: src/gnuwin32/editor.c:855
 msgid "Untitled"
 msgstr " 無題 "
 
-#: src/gnuwin32/extra.c:823 src/gnuwin32/rui.c:1224
+#: src/gnuwin32/extra.c:825
 msgid "Select file"
 msgstr " ファイルを選択 "
 
-#: src/gnuwin32/pager.c:89
+#: src/gnuwin32/pager.c:88
 msgid "Error opening file"
 msgstr " ファイルを開く際にエラーが発生しました "
 
-#: src/gnuwin32/pager.c:96
+#: src/gnuwin32/pager.c:95
 msgid "Insufficient memory to display file in internal pager"
 msgstr " 内部ページャでファイルを表示するためのメモリが不足しています "
 
-#: src/gnuwin32/pager.c:177 src/gnuwin32/pager.c:189 src/gnuwin32/pager.c:209
+#: src/gnuwin32/pager.c:176 src/gnuwin32/pager.c:188 src/gnuwin32/pager.c:208
 #: src/gnuwin32/rui.c:237 src/gnuwin32/rui.c:264
 msgid "No selection"
 msgstr " 選択されていません "
 
-#: src/gnuwin32/pager.c:306 src/gnuwin32/pager.c:436 src/gnuwin32/pager.c:480
+#: src/gnuwin32/pager.c:305 src/gnuwin32/pager.c:435 src/gnuwin32/pager.c:479
 msgid "Paste to console"
 msgstr " コンソールにペースト "
 
-#: src/gnuwin32/pager.c:307 src/gnuwin32/pager.c:441 src/gnuwin32/pager.c:482
+#: src/gnuwin32/pager.c:306 src/gnuwin32/pager.c:440 src/gnuwin32/pager.c:481
 msgid "Paste commands to console"
 msgstr " コマンドをコンソールにペースト "
 
-#: src/gnuwin32/pager.c:310 src/gnuwin32/rui.c:869
-#: src/library/utils/src/windows/dataentry.c:1703
-#: src/library/grDevices/src/devWindows.c:1686
+#: src/gnuwin32/pager.c:309 src/gnuwin32/rui.c:869
+#: src/library/utils/src/windows/dataentry.c:1704
+#: src/library/grDevices/src/devWindows.c:1705
 msgid "Stay on top"
 msgstr " ウィンドウを常にトップに置く "
 
-#: src/gnuwin32/pager.c:312 src/gnuwin32/pager.c:475
-#: src/library/utils/src/windows/dataentry.c:1705
-#: src/library/utils/src/windows/dataentry.c:1792
+#: src/gnuwin32/pager.c:311 src/gnuwin32/pager.c:474
+#: src/library/utils/src/windows/dataentry.c:1706
+#: src/library/utils/src/windows/dataentry.c:1793
 msgid "Close"
 msgstr " 閉じる "
 
-#: src/gnuwin32/pager.c:472 src/gnuwin32/rui.c:1139
+#: src/gnuwin32/pager.c:471 src/gnuwin32/rui.c:1139
 msgid "Save to File..."
 msgstr " ファイルを保存... "
 
-#: src/gnuwin32/pager.c:487 src/gnuwin32/rui.c:1156
+#: src/gnuwin32/pager.c:486 src/gnuwin32/rui.c:1156
 msgid "View"
 msgstr " 閲覧 "
 
-#: src/gnuwin32/pager.c:519
+#: src/gnuwin32/pager.c:518
 msgid "Unable to create pager window"
 msgstr " ページャ用のウインドウを作成することができません "
 
@@ -619,7 +620,8 @@ msgid "Update packages..."
 msgstr " パッケージの更新... "
 
 #: src/gnuwin32/rui.c:920
-msgid "Install package(s) from local zip files..."
+#, fuzzy
+msgid "Install package(s) from local files..."
 msgstr " ローカルにある zip ファイルからのパッケージのインストール... "
 
 #: src/gnuwin32/rui.c:944
@@ -786,52 +788,52 @@ msgstr " search パスの一覧 "
 msgid "Console"
 msgstr " コンソール "
 
-#: src/gnuwin32/rui.c:1268
+#: src/gnuwin32/rui.c:1251
 msgid "'mname' is limited to 1000 bytes"
 msgstr " 'mname' は 1000 バイト分までに制限されています "
 
-#: src/gnuwin32/rui.c:1310
+#: src/gnuwin32/rui.c:1293
 #, c-format
 msgid "menu %s does not exist"
 msgstr " メニュー %s は存在しません "
 
-#: src/gnuwin32/rui.c:1363
+#: src/gnuwin32/rui.c:1346
 msgid "'menu' is limited to 500 bytes"
 msgstr " 'menu' は半角英数字で 500 文字までに制限されています "
 
-#: src/gnuwin32/rui.c:1373
+#: src/gnuwin32/rui.c:1356
 msgid "base menu does not exist"
 msgstr " base メニューが存在しません "
 
-#: src/gnuwin32/rui.c:1388
+#: src/gnuwin32/rui.c:1371
 msgid "failed to allocate menu"
 msgstr " メニューの割り当てに失敗しました "
 
-#: src/gnuwin32/rui.c:1405 src/gnuwin32/rui.c:1529
+#: src/gnuwin32/rui.c:1388 src/gnuwin32/rui.c:1512
 msgid "menu + item is limited to 1000 bytes"
 msgstr " menu + item は半角英数字で 1000 文字までに制限されています "
 
-#: src/gnuwin32/rui.c:1413 src/gnuwin32/rui.c:1496
+#: src/gnuwin32/rui.c:1396 src/gnuwin32/rui.c:1479
 msgid "menu does not exist"
 msgstr " メニューは存在しません "
 
-#: src/gnuwin32/rui.c:1431 src/gnuwin32/rui.c:1454 src/gnuwin32/rui.c:1459
+#: src/gnuwin32/rui.c:1414 src/gnuwin32/rui.c:1437 src/gnuwin32/rui.c:1442
 msgid "failed to allocate char storage"
 msgstr " char storage の割り当てに失敗しました "
 
-#: src/gnuwin32/rui.c:1467
+#: src/gnuwin32/rui.c:1450
 msgid "failed to allocate menuitem"
 msgstr " メニューアイテムの割り当てに失敗しました "
 
-#: src/gnuwin32/rui.c:1519
+#: src/gnuwin32/rui.c:1502
 msgid "menu not found"
 msgstr " メニューが見つかりません "
 
-#: src/gnuwin32/rui.c:1537
+#: src/gnuwin32/rui.c:1520
 msgid "menu or item does not exist"
 msgstr " メニューまたはアイテムが存在しません "
 
-#: src/gnuwin32/system.c:442
+#: src/gnuwin32/system.c:446
 msgid "Save workspace image?"
 msgstr " 作業スペースを保存しますか? "
 
@@ -840,41 +842,41 @@ msgid "Insufficient memory: cell not copied to the clipboard"
 msgstr ""
 " メモリが不足しています: セルをクリップボードにコピーすることができません "
 
-#: src/extra/graphapp/dialogs.c:147 src/extra/graphapp/dialogs.c:164
-#: src/extra/graphapp/dialogs.c:181
+#: src/extra/graphapp/dialogs.c:148 src/extra/graphapp/dialogs.c:165
+#: src/extra/graphapp/dialogs.c:182
 msgid "Question"
 msgstr " 質問 "
 
-#: src/extra/graphapp/dialogs.c:202
+#: src/extra/graphapp/dialogs.c:203
 msgid " Change working directory to:"
 msgstr " 作業ディレクトリの変更 "
 
-#: src/extra/graphapp/dialogs.c:205
+#: src/extra/graphapp/dialogs.c:206
 #, c-format
 msgid "Unable to set '%s' as working directory"
 msgstr " 作業ディレクトリとして '%s' を設定することができません "
 
-#: src/extra/graphapp/dialogs.c:602 src/extra/graphapp/dialogs.c:620
-#: src/extra/graphapp/dialogs.c:626 src/extra/graphapp/dialogs.c:725
-#: src/extra/graphapp/dialogs.c:739 src/extra/graphapp/dialogs.c:745
+#: src/extra/graphapp/dialogs.c:604 src/extra/graphapp/dialogs.c:622
+#: src/extra/graphapp/dialogs.c:628 src/extra/graphapp/dialogs.c:727
+#: src/extra/graphapp/dialogs.c:741 src/extra/graphapp/dialogs.c:747
 #: src/library/utils/src/windows/widgets.c:125
 msgid "Cancel"
 msgstr " キャンセル "
 
-#: src/extra/graphapp/dialogs.c:622 src/extra/graphapp/dialogs.c:741
+#: src/extra/graphapp/dialogs.c:624 src/extra/graphapp/dialogs.c:743
 #: src/library/utils/src/windows/widgets.c:124
 msgid "OK"
 msgstr " OK "
 
-#: src/extra/graphapp/dialogs.c:733
+#: src/extra/graphapp/dialogs.c:735
 msgid "User"
 msgstr " ユーザー "
 
-#: src/extra/graphapp/dialogs.c:734
+#: src/extra/graphapp/dialogs.c:736
 msgid "Password"
 msgstr " パスワード "
 
-#: src/extra/graphapp/dialogs.c:900 src/extra/graphapp/dialogs.c:906
+#: src/extra/graphapp/dialogs.c:902 src/extra/graphapp/dialogs.c:908
 #, c-format
 msgid "\"%s\" not found"
 msgstr " \"%s\" が見つかりません "
@@ -884,9 +886,9 @@ msgid "Arrange Icons"
 msgstr " アイコンの並べ替え "
 
 #: src/library/utils/src/windows/dataentry.c:223
-#: src/library/utils/src/windows/dataentry.c:1850
-#: src/library/utils/src/windows/dataentry.c:1853
-#: src/library/utils/src/windows/dataentry.c:1884
+#: src/library/utils/src/windows/dataentry.c:1851
+#: src/library/utils/src/windows/dataentry.c:1854
+#: src/library/utils/src/windows/dataentry.c:1885
 msgid "invalid argument"
 msgstr " 無効な引数です "
 
@@ -898,17 +900,12 @@ msgstr " 値に対して無効な型です "
 msgid "Data Editor"
 msgstr " データエディタ "
 
-#: src/library/utils/src/windows/dataentry.c:282
-#: src/library/utils/src/windows/dataentry.c:1891
-msgid "invalid device"
-msgstr " 無効なデバイスです "
-
 #: src/library/utils/src/windows/dataentry.c:331
 msgid "dataentry: internal memory problem"
 msgstr " dataentry: 内部メモリに問題が発生しました "
 
 #: src/library/utils/src/windows/dataentry.c:634
-#: src/library/utils/src/windows/dataentry.c:1221
+#: src/library/utils/src/windows/dataentry.c:1222
 msgid "dataentry: internal memory error"
 msgstr " dataentry: 内部メモリエラーです "
 
@@ -917,43 +914,43 @@ msgstr " dataentry: 内部メモリエラーです "
 msgid "internal type error in dataentry"
 msgstr " dataentry 中の内部の型エラーです "
 
-#: src/library/utils/src/windows/dataentry.c:852
+#: src/library/utils/src/windows/dataentry.c:853
 msgid "dataentry: parse error on string"
 msgstr " dataentry: 文字列のパースエラーです "
 
-#: src/library/utils/src/windows/dataentry.c:995
+#: src/library/utils/src/windows/dataentry.c:996
 msgid "dataentry: expression too long"
 msgstr " dataentry: 入力された式が長すぎます "
 
-#: src/library/utils/src/windows/dataentry.c:1472
+#: src/library/utils/src/windows/dataentry.c:1473
 msgid "column names cannot be blank"
 msgstr " 列名は空白であってはなりません "
 
-#: src/library/utils/src/windows/dataentry.c:1518
+#: src/library/utils/src/windows/dataentry.c:1519
 msgid "Variable editor"
 msgstr " 変数エディタ "
 
-#: src/library/utils/src/windows/dataentry.c:1523
+#: src/library/utils/src/windows/dataentry.c:1524
 msgid "variable name"
 msgstr " 変数名 "
 
-#: src/library/utils/src/windows/dataentry.c:1525
+#: src/library/utils/src/windows/dataentry.c:1526
 msgid "type"
 msgstr " 型 "
 
-#: src/library/utils/src/windows/dataentry.c:1639
+#: src/library/utils/src/windows/dataentry.c:1640
 msgid "Cell width(s)"
 msgstr " セル(複数)の幅 "
 
-#: src/library/utils/src/windows/dataentry.c:1645
+#: src/library/utils/src/windows/dataentry.c:1646
 msgid "Cell width"
 msgstr " セルの幅 "
 
-#: src/library/utils/src/windows/dataentry.c:1648
+#: src/library/utils/src/windows/dataentry.c:1649
 msgid "variable"
 msgstr " 変数 "
 
-#: src/library/utils/src/windows/dataentry.c:1691
+#: src/library/utils/src/windows/dataentry.c:1692
 msgid ""
 "Navigation.\n"
 "  Keyboard: cursor keys move selection\n"
@@ -997,220 +994,222 @@ msgstr ""
 "えます \n"
 " \n"
 
-#: src/library/utils/src/windows/dataentry.c:1699
+#: src/library/utils/src/windows/dataentry.c:1700
 msgid "Copy selected cell"
 msgstr " 選択中のセルをコピー "
 
-#: src/library/utils/src/windows/dataentry.c:1700
+#: src/library/utils/src/windows/dataentry.c:1701
 msgid "Paste to selected cell"
 msgstr " 選択中のセルにペースト "
 
-#: src/library/utils/src/windows/dataentry.c:1701
+#: src/library/utils/src/windows/dataentry.c:1702
 msgid "Autosize column"
 msgstr " セルサイズの自動調節 "
 
-#: src/library/utils/src/windows/dataentry.c:1797
+#: src/library/utils/src/windows/dataentry.c:1798
 msgid "Copy  \tCTRL+C"
 msgstr " コピー  \tCTRL+C "
 
-#: src/library/utils/src/windows/dataentry.c:1799
+#: src/library/utils/src/windows/dataentry.c:1800
 msgid "Paste \tCTRL+V"
 msgstr " ペースト \tCTRL+V "
 
-#: src/library/utils/src/windows/dataentry.c:1801
+#: src/library/utils/src/windows/dataentry.c:1802
 msgid "Delete\tDEL"
 msgstr " 消去 \tDel "
 
-#: src/library/utils/src/windows/dataentry.c:1804
+#: src/library/utils/src/windows/dataentry.c:1805
 msgid "Cell widths ..."
 msgstr " セルの幅 ... "
 
-#: src/library/utils/src/windows/dataentry.c:1808
+#: src/library/utils/src/windows/dataentry.c:1809
 msgid "Data editor"
 msgstr " データエディタ "
 
-#: src/library/grDevices/src/devWindows.c:932
+#: src/library/grDevices/src/devWindows.c:949
 msgid "Portable network graphics file"
 msgstr " ポータブル・ネットワークグラフィックファイル "
 
-#: src/library/grDevices/src/devWindows.c:935
+#: src/library/grDevices/src/devWindows.c:952
 msgid "Windows bitmap file"
 msgstr " Windows ビットマップファイル "
 
-#: src/library/grDevices/src/devWindows.c:938
+#: src/library/grDevices/src/devWindows.c:955
 msgid "TIFF file"
 msgstr " TIFF ファイル "
 
-#: src/library/grDevices/src/devWindows.c:941
+#: src/library/grDevices/src/devWindows.c:958
 msgid "Jpeg file"
 msgstr " Jpeg ファイル "
 
-#: src/library/grDevices/src/devWindows.c:963
+#: src/library/grDevices/src/devWindows.c:980
 msgid "Postscript file"
 msgstr " ポストスクリプトファイル "
 
-#: src/library/grDevices/src/devWindows.c:975
+#: src/library/grDevices/src/devWindows.c:992
 msgid "PDF file"
 msgstr " PDF ファイル "
 
-#: src/library/grDevices/src/devWindows.c:987
+#: src/library/grDevices/src/devWindows.c:1004
 msgid "Enhanced metafiles"
 msgstr " 拡張メタファイル "
 
-#: src/library/grDevices/src/devWindows.c:990
-#: src/library/grDevices/src/devWindows.c:3436
+#: src/library/grDevices/src/devWindows.c:1007
+#: src/library/grDevices/src/devWindows.c:3445
 msgid "file path selected is too long: only 512 bytes are allowed"
 msgstr " 選択されたファイルパスが長すぎます: 512 バイトまでです "
 
-#: src/library/grDevices/src/devWindows.c:1201
+#: src/library/grDevices/src/devWindows.c:1218
 msgid "No plot to replace!"
 msgstr " 置換すべきプロットがありません! "
 
-#: src/library/grDevices/src/devWindows.c:1249
+#: src/library/grDevices/src/devWindows.c:1268
 msgid "Variable name"
 msgstr " 変数名 "
 
-#: src/library/grDevices/src/devWindows.c:1258
+#: src/library/grDevices/src/devWindows.c:1277
 msgid "Variable doesn't contain any plots!"
 msgstr " 変数が存在しないか、いかなるプロットも含んでいません! "
 
-#: src/library/grDevices/src/devWindows.c:1273
+#: src/library/grDevices/src/devWindows.c:1292
 msgid "Name of variable to save to"
 msgstr " 変数名の保存 "
 
-#: src/library/grDevices/src/devWindows.c:1582
+#: src/library/grDevices/src/devWindows.c:1601
 msgid "Copy to the clipboard as a metafile"
 msgstr " メタファイルとしてクリップボードにコピー "
 
-#: src/library/grDevices/src/devWindows.c:1600
-#: src/library/grDevices/src/devWindows.c:1611
+#: src/library/grDevices/src/devWindows.c:1619
+#: src/library/grDevices/src/devWindows.c:1630
 msgid "Stop locator"
 msgstr " locator を停止 "
 
-#: src/library/grDevices/src/devWindows.c:1610
-#: src/library/grDevices/src/devWindows.c:1614
+#: src/library/grDevices/src/devWindows.c:1629
+#: src/library/grDevices/src/devWindows.c:1633
 msgid "Stop"
 msgstr " 停止 "
 
-#: src/library/grDevices/src/devWindows.c:1616
+#: src/library/grDevices/src/devWindows.c:1635
 msgid "Continue"
 msgstr " 続く "
 
-#: src/library/grDevices/src/devWindows.c:1620
+#: src/library/grDevices/src/devWindows.c:1639
 msgid "Next"
 msgstr " 次 "
 
-#: src/library/grDevices/src/devWindows.c:1621
+#: src/library/grDevices/src/devWindows.c:1640
 msgid "Next plot"
 msgstr " 次のプロット "
 
-#: src/library/grDevices/src/devWindows.c:1627
+#: src/library/grDevices/src/devWindows.c:1646
 msgid "Save as"
 msgstr " 別名で保存 "
 
-#: src/library/grDevices/src/devWindows.c:1636
-#: src/library/grDevices/src/devWindows.c:1638
-#: src/library/grDevices/src/devWindows.c:1640
+#: src/library/grDevices/src/devWindows.c:1655
+#: src/library/grDevices/src/devWindows.c:1657
+#: src/library/grDevices/src/devWindows.c:1659
 #, c-format
 msgid "%s quality..."
 msgstr " %s の品質... "
 
-#: src/library/grDevices/src/devWindows.c:1642
+#: src/library/grDevices/src/devWindows.c:1661
 msgid "Copy to the clipboard"
 msgstr " クリップボードにコピー "
 
-#: src/library/grDevices/src/devWindows.c:1643
+#: src/library/grDevices/src/devWindows.c:1662
 msgid "as a Bitmap\tCTRL+C"
 msgstr " ビットマップとして\tCTRL+C "
 
-#: src/library/grDevices/src/devWindows.c:1644
+#: src/library/grDevices/src/devWindows.c:1663
 msgid "as a Metafile\tCTRL+W"
 msgstr " メタファイルとして\tCTRL+W "
 
-#: src/library/grDevices/src/devWindows.c:1647
-msgid "Print...\tCTRL+P"
-msgstr " 印刷...\tCTRL+P "
-
-#: src/library/grDevices/src/devWindows.c:1649
+#: src/library/grDevices/src/devWindows.c:1668
 msgid "close Device"
 msgstr " デバイスを閉じる "
 
-#: src/library/grDevices/src/devWindows.c:1650
+#: src/library/grDevices/src/devWindows.c:1669
 msgid "History"
 msgstr " 履歴 "
 
-#: src/library/grDevices/src/devWindows.c:1651
+#: src/library/grDevices/src/devWindows.c:1670
 msgid "Recording"
 msgstr " 記録 "
 
-#: src/library/grDevices/src/devWindows.c:1654
+#: src/library/grDevices/src/devWindows.c:1673
 msgid "Add\tINS"
 msgstr " 追加\tINS "
 
-#: src/library/grDevices/src/devWindows.c:1655
+#: src/library/grDevices/src/devWindows.c:1674
 msgid "Replace"
 msgstr " 置換 "
 
-#: src/library/grDevices/src/devWindows.c:1657
+#: src/library/grDevices/src/devWindows.c:1676
 msgid "Previous\tPgUp"
 msgstr " 戻る\tPgUp "
 
-#: src/library/grDevices/src/devWindows.c:1658
+#: src/library/grDevices/src/devWindows.c:1677
 msgid "Next\tPgDown"
 msgstr " 進む\tPgDown "
 
-#: src/library/grDevices/src/devWindows.c:1660
+#: src/library/grDevices/src/devWindows.c:1679
 msgid "Save to variable..."
 msgstr " 変数へ保存... "
 
-#: src/library/grDevices/src/devWindows.c:1661
+#: src/library/grDevices/src/devWindows.c:1680
 msgid "Get from variable..."
 msgstr " 変数から取得... "
 
-#: src/library/grDevices/src/devWindows.c:1663
+#: src/library/grDevices/src/devWindows.c:1682
 msgid "Clear history"
 msgstr " 履歴の消去 "
 
-#: src/library/grDevices/src/devWindows.c:1664
+#: src/library/grDevices/src/devWindows.c:1683
 msgid "Resize"
 msgstr " サイズ変更 "
 
-#: src/library/grDevices/src/devWindows.c:1665
+#: src/library/grDevices/src/devWindows.c:1684
 msgid "R mode"
 msgstr " R モード "
 
-#: src/library/grDevices/src/devWindows.c:1667
+#: src/library/grDevices/src/devWindows.c:1686
 msgid "Fit to window"
 msgstr " ウインドウに合わせる "
 
-#: src/library/grDevices/src/devWindows.c:1669
+#: src/library/grDevices/src/devWindows.c:1688
 msgid "Fixed size"
 msgstr " 固定サイズ "
 
-#: src/library/grDevices/src/devWindows.c:1676
+#: src/library/grDevices/src/devWindows.c:1695
 msgid "Copy as metafile"
 msgstr " メタファイルにコピー "
 
-#: src/library/grDevices/src/devWindows.c:1678
+#: src/library/grDevices/src/devWindows.c:1697
 msgid "Copy as bitmap"
 msgstr " ビットマップにコピー "
 
-#: src/library/grDevices/src/devWindows.c:1681
+#: src/library/grDevices/src/devWindows.c:1700
 msgid "Save as metafile..."
 msgstr " メタファイルに保存... "
 
-#: src/library/grDevices/src/devWindows.c:1683
+#: src/library/grDevices/src/devWindows.c:1702
 msgid "Save as postscript..."
 msgstr " ポストスクリプトに保存... "
 
-#: src/library/grDevices/src/devWindows.c:3136
+#: src/library/grDevices/src/devWindows.c:3143
 msgid "Locator is active"
 msgstr " Locator はアクティブです "
 
-#: src/library/grDevices/src/devWindows.c:3763
+#: src/library/grDevices/src/devWindows.c:3769
 msgid "Waiting to confirm page change..."
 msgstr " ページ変更を確認するまで待機中... "
 
-#: src/library/grDevices/src/devWindows.c:3775
+#: src/library/grDevices/src/devWindows.c:3781
 msgid "Click or hit ENTER for next page"
 msgstr " クリックまたは ENTER キーを押すと次のページに移ります "
+
+#~ msgid "Print...\tCTRL+P"
+#~ msgstr " 印刷...\tCTRL+P "
+
+#~ msgid "invalid device"
+#~ msgstr " 無効なデバイスです "
diff --git a/src/library/base/po/RGui-ko.po b/src/library/base/po/RGui-ko.po
index a82d4e4..ec63d8a 100644
--- a/src/library/base/po/RGui-ko.po
+++ b/src/library/base/po/RGui-ko.po
@@ -1,24 +1,32 @@
 # Korean translation for R base package
-# src/library/base/po/RGui-ko.po
-# Copyright (C) 1995-2014 The R Core Team
+# ./base/po/RGui-ko.po
+#
+# Copyright (C) 1995-2016 The R Core Team
+#
 # This file is distributed under the same license as the R base package.
-# Chel Hee Lee <chl948 at mail.usask.ca>, 2008-2014.
+# Maintained by Chel Hee Lee <chl948 at mail.usask.ca>, 2008-2016.
+# Contact: Chel Hee Lee <gnustats at gmail.com>
+#
+# Notes:
+# Under development (unstable) starting from 11-APR-2016 for R-3.3.1 - QC: in progress
+# Freezed on 10-APR-2016 for R-3.3.0 - QC: PASS
+# Freezed on 30-MAR-2015 for R-3.2.0 - QC: PASS
+# Freezed on 06-FEB-2015 for R-3.1.3 - QC: PASS
+# Bug-reports are processed (17-JAN-2015)
 #
 msgid ""
 msgstr ""
-"Project-Id-Version: R 3.1.0\n"
+"Project-Id-Version: R-3.3.0\n"
 "Report-Msgid-Bugs-To: bugs.r-project.org\n"
-"POT-Creation-Date: 2013-03-18 19:36+0000\n"
-"PO-Revision-Date: 2014-03-27 08:58-0600\n"
+"POT-Creation-Date: 2016-04-01 10:28-0700\n"
+"PO-Revision-Date: 2016-04-11 13:08-0600\n"
 "Last-Translator: Chel Hee Lee <chl948 at mail.usask.ca>\n"
-"Language-Team:  <chl948 at mail.usask.ca>\n"
+"Language-Team: Chel Hee Lee <chl948 at mail.usask.ca>\n"
 "Language: ko\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
 "Plural-Forms: nplurals=1; plural=0;\n"
-"X-Poedit-SourceCharset: UTF-8\n"
-"X-Generator: Poedit 1.5.4\n"
 
 #: src/gnuwin32/console.c:1167 src/gnuwin32/console.c:1209
 msgid "Not enough memory"
@@ -33,11 +41,11 @@ msgstr "메모리 부족: 텍스트를 클립보드에 복사할 수 없습니
 msgid "Unable to open the clipboard"
 msgstr "클립보드를 열 수 없습니다"
 
-#: src/gnuwin32/console.c:1914
+#: src/gnuwin32/console.c:1919
 msgid "Insufficient memory. Please close the console"
 msgstr "메모리가 부족합니다.  콘솔을 닫아주세요"
 
-#: src/gnuwin32/console.c:1969 src/gnuwin32/console.c:2022
+#: src/gnuwin32/console.c:1974 src/gnuwin32/console.c:2028
 #: src/gnuwin32/preferences.c:333
 #, c-format
 msgid ""
@@ -47,23 +55,23 @@ msgstr ""
 "폰트 %s-%d-%d를 찾을 수 없습니다.\n"
 "시스템고정폰트를 사용합니다"
 
-#: src/gnuwin32/console.c:2127
+#: src/gnuwin32/console.c:2133
 msgid "Save selection to"
 msgstr "선택한 부분을 다음 위치에 저장합니다"
 
-#: src/gnuwin32/console.c:2129
+#: src/gnuwin32/console.c:2135
 msgid "Save console contents to"
 msgstr "콘솔의 내용을 다음의 위치에 저장합니다"
 
-#: src/gnuwin32/console.c:2228
+#: src/gnuwin32/console.c:2234
 msgid "Scrolling.\n"
 msgstr "스크롤링.\n"
 
-#: src/gnuwin32/console.c:2229
+#: src/gnuwin32/console.c:2235
 msgid "  Keyboard: PgUp, PgDown, Ctrl+Arrows, Ctrl+Home, Ctrl+End,\n"
 msgstr "  키보드: PgUp, PgDown, Ctrl+Arrows, Ctrl+Home, Ctrl+End,\n"
 
-#: src/gnuwin32/console.c:2230
+#: src/gnuwin32/console.c:2236
 msgid ""
 "  Mouse: use the scrollbar(s).\n"
 "\n"
@@ -71,103 +79,103 @@ msgstr ""
 "  마우스: 스크롤바를 사용하세요.\n"
 "\n"
 
-#: src/gnuwin32/console.c:2231
+#: src/gnuwin32/console.c:2237
 msgid "Editing.\n"
 msgstr "편집.\n"
 
-#: src/gnuwin32/console.c:2232
+#: src/gnuwin32/console.c:2238
 msgid "  Moving the cursor: \n"
 msgstr "  커서를 이동중: \n"
 
-#: src/gnuwin32/console.c:2233
+#: src/gnuwin32/console.c:2239
 msgid "     Left arrow or Ctrl+B: move backward one character;\n"
 msgstr "     좌로 이동화살표 또는 Ctrl+B: 한 문자 뒤로 이동합니다;\n"
 
-#: src/gnuwin32/console.c:2234
+#: src/gnuwin32/console.c:2240
 msgid "     Right arrow or Ctrl+F: move forward one character;\n"
 msgstr "     우로 이동화살표 또는 Ctrl+F: 한 문자 앞으로 이동합니다;\n"
 
-#: src/gnuwin32/console.c:2235
+#: src/gnuwin32/console.c:2241
 msgid "     Home or Ctrl+A: go to beginning of line;\n"
 msgstr "     Home 또는 Ctrl+A: 라인의 맨 처음으로 이동합니다;\n"
 
-#: src/gnuwin32/console.c:2236
+#: src/gnuwin32/console.c:2242
 msgid "     End or Ctrl+E: go to end of line;\n"
 msgstr "     End 또는 Ctrl+E: 라인의 맨 끝으로 이동합니다;\n"
 
-#: src/gnuwin32/console.c:2237
+#: src/gnuwin32/console.c:2243
 msgid "  History: Up and Down Arrows, Ctrl+P, Ctrl+N\n"
 msgstr "  작업기록: 위로 이동과 아래로 이동 화살표들, Ctrl+P, Ctrl+N\n"
 
-#: src/gnuwin32/console.c:2238
+#: src/gnuwin32/console.c:2244
 msgid "  Deleting:\n"
 msgstr "  삭제:\n"
 
-#: src/gnuwin32/console.c:2239
+#: src/gnuwin32/console.c:2245
 msgid "     Del or Ctrl+D: delete current character or selection;\n"
 msgstr "     Del 또는 Ctrl+D: 현재 문자 또는 선택 영역을 삭제합니다;\n"
 
-#: src/gnuwin32/console.c:2240
+#: src/gnuwin32/console.c:2246
 msgid "     Backspace: delete preceding character;\n"
 msgstr "     Backspace: 바로 이전문자를 삭제합니다;\n"
 
-#: src/gnuwin32/console.c:2241
+#: src/gnuwin32/console.c:2247
 msgid ""
 "     Ctrl+Del or Ctrl+K: delete text from current character to end of line.\n"
 msgstr "     Ctrl+Del 또는 Ctrl+K: 현재 문자부터 라인의 끝까지 삭제합니다.\n"
 
-#: src/gnuwin32/console.c:2242
+#: src/gnuwin32/console.c:2248
 msgid "     Ctrl+U: delete all text from current line.\n"
 msgstr "     Ctrl+U: 현재 라인의 모든 텍스트를 삭제합니다.\n"
 
-#: src/gnuwin32/console.c:2243
+#: src/gnuwin32/console.c:2249
 msgid "  Copy and paste.\n"
-msgstr "  복사와 붙여넣기.\n"
+msgstr "  복사하여 붙여넣기.\n"
 
-#: src/gnuwin32/console.c:2244
+#: src/gnuwin32/console.c:2250
 msgid ""
 "     Use the mouse (with the left button held down) to mark (select) text.\n"
 msgstr ""
-"     텍스트를 표시 혹은 선택하려면 (좌측버튼을 누른채로) 마우스를 이용하세"
-"요.\n"
+"     복사할 텍스트를 선택하기 위해서는 (좌측 버튼을 누른채로) 마우스를 이용하"
+"세요. \n"
 
-#: src/gnuwin32/console.c:2245
+#: src/gnuwin32/console.c:2251
 msgid ""
 "     Use Shift+Del (or Ctrl+C) to copy the marked text to the clipboard and\n"
 msgstr ""
-"     선택한 텍스트를 클립보드에 복사하기 위해서는 Shift+Del (또는 Ctrl+C)을 "
-"사용하세요\n"
+"     선택된 텍스트를 클립보드에 복사하기 위해서는 Shift+Del (또는 Ctrl+C)를 "
+"사용합니다. \n"
 
-#: src/gnuwin32/console.c:2246
+#: src/gnuwin32/console.c:2252
 msgid ""
 "     Shift+Ins (or Ctrl+V or Ctrl+Y) to paste the content of the clipboard "
 "(if any)  \n"
 msgstr ""
-"     (만약) 클립보드에 있는 내용을 붙여넣고자 한다면 Shift+Ins (또는 Ctrl+V "
-"혹은 Ctrl+Y)을 이용하세요  \n"
+"     클립보드에 있는 내용을 콘솔에 붙여넣고자 한다면 Shift+Ins (또는 Ctrl+V "
+"혹은 Ctrl+Y)를 사용할 수 있습니다.\n"
 
-#: src/gnuwin32/console.c:2247
+#: src/gnuwin32/console.c:2253
 msgid "     to the console, Ctrl+X first copy then paste\n"
-msgstr ""
+msgstr "     Ctrl+X를 이용하여 복사한 뒤 붙여넣을수도 있습니다.\n"
 
-#: src/gnuwin32/console.c:2248
+#: src/gnuwin32/console.c:2254
 msgid "  Misc:\n"
 msgstr "  기타:\n"
 
-#: src/gnuwin32/console.c:2249
+#: src/gnuwin32/console.c:2255
 msgid "     Ctrl+L: Clear the console.\n"
-msgstr "     Ctrl+L: 콘솔을 지워 깨끗이 합니다.\n"
+msgstr "     Ctrl+L: 콘솔화면을 깨끗하게 정리해 줍니다.\n"
 
-#: src/gnuwin32/console.c:2250
+#: src/gnuwin32/console.c:2256
 msgid "     Ctrl+O or INS: Toggle overwrite mode: initially off.\n"
 msgstr ""
 "     Ctrl+O 또는 INS: 덮어쓰기 모드로 전환합니다: 처음에는 꺼져있습니다.\n"
 
-#: src/gnuwin32/console.c:2251
+#: src/gnuwin32/console.c:2257
 msgid "     Ctrl+T: Interchange current char with one to the left.\n"
 msgstr "     Ctrl+T: 현재의 문자와 좌측에 있는 문자를 서로 교환합니다.\n"
 
-#: src/gnuwin32/console.c:2252
+#: src/gnuwin32/console.c:2258
 msgid ""
 "\n"
 "Note: Console is updated only when some input is required.\n"
@@ -175,7 +183,7 @@ msgstr ""
 "\n"
 "참고: 콘솔은 오로지 어떤 입력이 요구되어 질 때만 갱신됩니다.\n"
 
-#: src/gnuwin32/console.c:2253
+#: src/gnuwin32/console.c:2259
 msgid ""
 "  Use Ctrl+W to toggle this feature off/on.\n"
 "\n"
@@ -183,281 +191,287 @@ msgstr ""
 "  이 기능을 켜거나 혹은 끄고 싶을 때 Ctrl+W 를 이용하세요.\n"
 "\n"
 
-#: src/gnuwin32/console.c:2254
+#: src/gnuwin32/console.c:2260
 msgid ""
 "Use ESC to stop the interpreter.\n"
 "\n"
 msgstr ""
-"인터프리터를 중단하기 위해서는 ESC 를 이용하세요.\n"
+"인터프리터를 중단하기 위해서는 ESC 키를 이용하세요.\n"
 "\n"
 
-#: src/gnuwin32/console.c:2255
+#: src/gnuwin32/console.c:2261
 msgid ""
 "TAB starts completion of the current word.\n"
 "\n"
 msgstr ""
+"TAB키를 이용하여 현재 입력중인 단어에 대한 자동완성기능을 살펴볼 수 있습니"
+"다.\n"
+"\n"
 
-#: src/gnuwin32/console.c:2256
+#: src/gnuwin32/console.c:2262
 msgid "Standard Windows hotkeys can be used to switch to the\n"
-msgstr ""
+msgstr "표준 윈도우즈 핫키들이 그래픽 장치 전환에 사용될 수 있습니다 \n"
 
-#: src/gnuwin32/console.c:2257
+#: src/gnuwin32/console.c:2263
 msgid "graphics device (Ctrl+Tab or Ctrl+F6 in MDI, Alt+Tab in SDI)"
 msgstr ""
+"(MDI의 경우 Ctrl+Tab 또는 Ctrl+F6를, SDI의 경우 Alt+Tab을 사용할 수 있습니다)"
 
-#: src/gnuwin32/editor.c:88 src/gnuwin32/editor.c:90
+#: src/gnuwin32/editor.c:91 src/gnuwin32/editor.c:93
 msgid "R Editor"
 msgstr "R 편집기"
 
-#: src/gnuwin32/editor.c:119
+#: src/gnuwin32/editor.c:123
 #, c-format
 msgid "unable to open file %s for reading"
 msgstr "파일 %s를 열 수 없습니다"
 
-#: src/gnuwin32/editor.c:135
+#: src/gnuwin32/editor.c:139
 #, c-format
 msgid "Could not read from file '%s'"
 msgstr "파일 '%s'로부터 읽어올 수 없었습니다"
 
-#: src/gnuwin32/editor.c:166
+#: src/gnuwin32/editor.c:171
 #, c-format
 msgid "Could not save file '%s'"
 msgstr "파일 '%s'를 저장할 수 없었습니다"
 
-#: src/gnuwin32/editor.c:182
+#: src/gnuwin32/editor.c:187
 msgid "Save script as"
 msgstr "다른 이름으로 스크립트를 저장"
 
-#: src/gnuwin32/editor.c:377 src/gnuwin32/editor.c:694
-#: src/gnuwin32/pager.c:431 src/gnuwin32/rui.c:1076
+#: src/gnuwin32/editor.c:379 src/gnuwin32/editor.c:696
+#: src/gnuwin32/pager.c:430 src/gnuwin32/rui.c:1076
 msgid "Open script"
 msgstr "스크립트 열기"
 
-#: src/gnuwin32/editor.c:500 src/gnuwin32/pager.c:185 src/gnuwin32/pager.c:205
+#: src/gnuwin32/editor.c:502 src/gnuwin32/pager.c:184 src/gnuwin32/pager.c:204
 msgid "No RGui console to paste to"
 msgstr "붙여넣기를 할 RGui 콘솔이 없습니다"
 
-#: src/gnuwin32/editor.c:602
+#: src/gnuwin32/editor.c:604
 msgid "R EDITOR\n"
 msgstr "R 편집기\n"
 
-#: src/gnuwin32/editor.c:604
+#: src/gnuwin32/editor.c:606
 msgid "A standard text editor for editing and running R code.\n"
 msgstr "R 코드의 편집과 실행을 위한 표준 텍스트 편집기.\n"
 
-#: src/gnuwin32/editor.c:606
+#: src/gnuwin32/editor.c:608
 msgid "RUNNING COMMANDS\n"
 msgstr "명령들을 실행중입니다\n"
 
-#: src/gnuwin32/editor.c:607
+#: src/gnuwin32/editor.c:609
 msgid "To run a line or section of R code, select the code and either\n"
 msgstr ""
 "R 코드 한 줄 또는 선택한 영역을 실행하고자 한다면, 코드를 먼저 선택한 뒤 \n"
 
-#: src/gnuwin32/editor.c:608
+#: src/gnuwin32/editor.c:610
 msgid "     Press Ctrl-R\n"
 msgstr "     Ctrl-R 을 눌러주세요\n"
 
-#: src/gnuwin32/editor.c:609
+#: src/gnuwin32/editor.c:611
 msgid "     Select \"Run line or selection\" from the \"Edit\" menu\n"
 msgstr "     \"편집\" 메뉴에서 \"줄 또는 선택영역 실행\"을 선택해 주세요\n"
 
-#: src/gnuwin32/editor.c:610
+#: src/gnuwin32/editor.c:612
 msgid "     Press the \"Run line or selection\" icon on the toolbar\n"
 msgstr "     툴바에 있는 \"줄 또는 선택영역 실행\" 아이콘을 눌러 주세요\n"
 
-#: src/gnuwin32/editor.c:611
+#: src/gnuwin32/editor.c:613
 msgid ""
 "This will copy the selected commands to the console and evaluate them.\n"
-msgstr "이것은 선택된 명령어들을 콘솔로 복사한 뒤 그것들을 실행할 것입니다.\n"
+msgstr "이것은 선택된 명령어들을 콘솔로 복사하고 평가할 것입니다.\n"
 
-#: src/gnuwin32/editor.c:612
+#: src/gnuwin32/editor.c:614
 msgid ""
 "If there is no selection, this will just run the current line and advance\n"
 msgstr ""
-"만약 선택된 것이 없다면, 이것은 단순히 현재 라인과 이전라인만을 실행할 것입니"
-"다\n"
+"만약 선택된 명령어들이 없다면, 이것은 단순히 커서가 놓인 라인을 실행하고\n"
 
-#: src/gnuwin32/editor.c:613
+#: src/gnuwin32/editor.c:615
 msgid "the cursor by one line.\n"
-msgstr ""
+msgstr "그 다음라인으로 커서를 이동시킬 것입니다.\n"
 
-#: src/gnuwin32/editor.c:625 src/gnuwin32/editor.c:702
-#: src/gnuwin32/editor.c:760
+#: src/gnuwin32/editor.c:627 src/gnuwin32/editor.c:704
+#: src/gnuwin32/editor.c:762
 msgid "Run line or selection"
 msgstr "줄 또는 선택영역 실행"
 
-#: src/gnuwin32/editor.c:627 src/gnuwin32/editor.c:745
+#: src/gnuwin32/editor.c:629 src/gnuwin32/editor.c:747
 msgid "Undo"
 msgstr "실행취소"
 
-#: src/gnuwin32/editor.c:629 src/gnuwin32/editor.c:748
+#: src/gnuwin32/editor.c:631 src/gnuwin32/editor.c:750
 msgid "Cut"
 msgstr "잘라내기"
 
-#: src/gnuwin32/editor.c:630 src/gnuwin32/editor.c:750
-#: src/gnuwin32/pager.c:305 src/gnuwin32/pager.c:478 src/gnuwin32/rui.c:859
+#: src/gnuwin32/editor.c:632 src/gnuwin32/editor.c:752
+#: src/gnuwin32/pager.c:304 src/gnuwin32/pager.c:477 src/gnuwin32/rui.c:859
 #: src/gnuwin32/rui.c:1088 src/gnuwin32/rui.c:1144
 msgid "Copy"
 msgstr "복사하기"
 
-#: src/gnuwin32/editor.c:631 src/gnuwin32/editor.c:752 src/gnuwin32/rui.c:860
+#: src/gnuwin32/editor.c:633 src/gnuwin32/editor.c:754 src/gnuwin32/rui.c:860
 #: src/gnuwin32/rui.c:1092 src/gnuwin32/rui.c:1145
 msgid "Paste"
 msgstr "붙여넣기"
 
-#: src/gnuwin32/editor.c:632 src/gnuwin32/editor.c:754
+#: src/gnuwin32/editor.c:634 src/gnuwin32/editor.c:756
 msgid "Delete"
 msgstr "삭제하기"
 
-#: src/gnuwin32/editor.c:634 src/gnuwin32/editor.c:756
-#: src/gnuwin32/pager.c:308 src/gnuwin32/pager.c:484 src/gnuwin32/rui.c:866
+#: src/gnuwin32/editor.c:636 src/gnuwin32/editor.c:758
+#: src/gnuwin32/pager.c:307 src/gnuwin32/pager.c:483 src/gnuwin32/rui.c:866
 #: src/gnuwin32/rui.c:1149
 msgid "Select all"
-msgstr "모두 선택"
+msgstr "모두 선택하기"
 
-#: src/gnuwin32/editor.c:698
+#: src/gnuwin32/editor.c:700
 msgid "Save script"
 msgstr "스크립트 저장하기"
 
-#: src/gnuwin32/editor.c:706 src/gnuwin32/pager.c:451
-#: src/library/grDevices/src/devWindows.c:1594
+#: src/gnuwin32/editor.c:708 src/gnuwin32/pager.c:450
+#: src/library/grDevices/src/devWindows.c:1613
 msgid "Return focus to Console"
 msgstr "콘솔로 돌아가기"
 
-#: src/gnuwin32/editor.c:709
+#: src/gnuwin32/editor.c:711
 msgid "Print script"
 msgstr "스크립트 인쇄하기"
 
-#: src/gnuwin32/editor.c:711 src/gnuwin32/pager.c:446 src/gnuwin32/rui.c:1104
-#: src/library/grDevices/src/devWindows.c:1588
+#: src/gnuwin32/editor.c:713 src/gnuwin32/pager.c:445 src/gnuwin32/rui.c:1104
+#: src/library/grDevices/src/devWindows.c:1607
 msgid "Print"
 msgstr "인쇄하기"
 
-#: src/gnuwin32/editor.c:729 src/gnuwin32/pager.c:467 src/gnuwin32/rui.c:1122
-#: src/library/utils/src/windows/dataentry.c:1790
-#: src/library/grDevices/src/devWindows.c:1626
+#: src/gnuwin32/editor.c:731 src/gnuwin32/pager.c:466 src/gnuwin32/rui.c:1122
+#: src/library/utils/src/windows/dataentry.c:1791
+#: src/library/grDevices/src/devWindows.c:1645
 msgid "File"
 msgstr "파일"
 
-#: src/gnuwin32/editor.c:730 src/gnuwin32/pager.c:468 src/gnuwin32/rui.c:1124
+#: src/gnuwin32/editor.c:732 src/gnuwin32/pager.c:467 src/gnuwin32/rui.c:1124
 msgid "New script"
 msgstr "새 스크립트"
 
-#: src/gnuwin32/editor.c:732 src/gnuwin32/pager.c:469 src/gnuwin32/rui.c:1125
+#: src/gnuwin32/editor.c:734 src/gnuwin32/pager.c:468 src/gnuwin32/rui.c:1125
 msgid "Open script..."
 msgstr "스크립트 열기..."
 
-#: src/gnuwin32/editor.c:734
+#: src/gnuwin32/editor.c:736
 msgid "Save"
 msgstr "저장하기"
 
-#: src/gnuwin32/editor.c:736
+#: src/gnuwin32/editor.c:738
 msgid "Save as..."
 msgstr "다른 이름으로 저장..."
 
-#: src/gnuwin32/editor.c:739 src/gnuwin32/pager.c:470 src/gnuwin32/rui.c:1138
-#: src/library/grDevices/src/devWindows.c:1689
+#: src/gnuwin32/editor.c:741 src/gnuwin32/pager.c:469 src/gnuwin32/rui.c:1138
+#: src/library/grDevices/src/devWindows.c:1666
+#: src/library/grDevices/src/devWindows.c:1708
 msgid "Print..."
 msgstr "인쇄하기..."
 
-#: src/gnuwin32/editor.c:742
+#: src/gnuwin32/editor.c:744
 msgid "Close script"
 msgstr "스크립트 닫기"
 
-#: src/gnuwin32/editor.c:744 src/gnuwin32/pager.c:477 src/gnuwin32/rui.c:1143
-#: src/library/utils/src/windows/dataentry.c:1796
+#: src/gnuwin32/editor.c:746 src/gnuwin32/pager.c:476 src/gnuwin32/rui.c:1143
+#: src/library/utils/src/windows/dataentry.c:1797
 msgid "Edit"
 msgstr "편집"
 
-#: src/gnuwin32/editor.c:758 src/gnuwin32/rui.c:1150
+#: src/gnuwin32/editor.c:760 src/gnuwin32/rui.c:1150
 msgid "Clear console"
 msgstr "콘솔 지우기"
 
-#: src/gnuwin32/editor.c:762
+#: src/gnuwin32/editor.c:764
 msgid "Run all"
 msgstr "전부 실행하기"
 
-#: src/gnuwin32/editor.c:765
+# reported by 양민혁 <didalsgur85 at naver.com> on 15-DEC-2014
+# status: fixed (closed on 29-JAN-2015)
+#: src/gnuwin32/editor.c:767
 msgid "Find..."
-msgstr "착기..."
+msgstr "찾기..."
 
-#: src/gnuwin32/editor.c:767
+#: src/gnuwin32/editor.c:769
 msgid "Replace..."
 msgstr "바꾸기..."
 
-#: src/gnuwin32/editor.c:770 src/gnuwin32/rui.c:1154
+#: src/gnuwin32/editor.c:772 src/gnuwin32/rui.c:1154
 msgid "GUI preferences..."
 msgstr "GUI 설정..."
 
-#: src/gnuwin32/editor.c:780 src/gnuwin32/rui.c:1186
-#: src/library/utils/src/windows/dataentry.c:1697
-#: src/library/utils/src/windows/dataentry.c:1807
+#: src/gnuwin32/editor.c:782 src/gnuwin32/rui.c:1186
+#: src/library/utils/src/windows/dataentry.c:1698
+#: src/library/utils/src/windows/dataentry.c:1808
 msgid "Help"
 msgstr "도움말"
 
-#: src/gnuwin32/editor.c:781
+#: src/gnuwin32/editor.c:783
 msgid "Editor"
 msgstr "편집기"
 
-#: src/gnuwin32/editor.c:840
+#: src/gnuwin32/editor.c:842
 msgid "Maximum number of editors reached"
 msgstr "편집기의 개수가 주어진 최대값에 도달했습니다"
 
-#: src/gnuwin32/editor.c:845
+#: src/gnuwin32/editor.c:847
 msgid "Unable to create editor window"
 msgstr "편집기 윈도우를 생성할 수 없습니다"
 
-#: src/gnuwin32/editor.c:853
+#: src/gnuwin32/editor.c:855
 msgid "Untitled"
 msgstr "제목없음"
 
-#: src/gnuwin32/extra.c:823 src/gnuwin32/rui.c:1224
+#: src/gnuwin32/extra.c:825
 msgid "Select file"
 msgstr "파일선택"
 
-#: src/gnuwin32/pager.c:89
+#: src/gnuwin32/pager.c:88
 msgid "Error opening file"
 msgstr "파일을 여는 도중 에러가 발생했습니다"
 
-#: src/gnuwin32/pager.c:96
+#: src/gnuwin32/pager.c:95
 msgid "Insufficient memory to display file in internal pager"
 msgstr "내부페이저에 파일을 표시하기 위한 메모리가 부족합니다"
 
-#: src/gnuwin32/pager.c:177 src/gnuwin32/pager.c:189 src/gnuwin32/pager.c:209
+#: src/gnuwin32/pager.c:176 src/gnuwin32/pager.c:188 src/gnuwin32/pager.c:208
 #: src/gnuwin32/rui.c:237 src/gnuwin32/rui.c:264
 msgid "No selection"
 msgstr "선택된 것이 없습니다"
 
-#: src/gnuwin32/pager.c:306 src/gnuwin32/pager.c:436 src/gnuwin32/pager.c:480
+#: src/gnuwin32/pager.c:305 src/gnuwin32/pager.c:435 src/gnuwin32/pager.c:479
 msgid "Paste to console"
 msgstr "콘솔에 붙여넣기"
 
-#: src/gnuwin32/pager.c:307 src/gnuwin32/pager.c:441 src/gnuwin32/pager.c:482
+#: src/gnuwin32/pager.c:306 src/gnuwin32/pager.c:440 src/gnuwin32/pager.c:481
 msgid "Paste commands to console"
 msgstr "콘솔에 명령어를 붙여넣기"
 
-#: src/gnuwin32/pager.c:310 src/gnuwin32/rui.c:869
-#: src/library/utils/src/windows/dataentry.c:1703
-#: src/library/grDevices/src/devWindows.c:1686
+#: src/gnuwin32/pager.c:309 src/gnuwin32/rui.c:869
+#: src/library/utils/src/windows/dataentry.c:1704
+#: src/library/grDevices/src/devWindows.c:1705
 msgid "Stay on top"
 msgstr "맨 위에 있도록 합니다"
 
-#: src/gnuwin32/pager.c:312 src/gnuwin32/pager.c:475
-#: src/library/utils/src/windows/dataentry.c:1705
-#: src/library/utils/src/windows/dataentry.c:1792
+#: src/gnuwin32/pager.c:311 src/gnuwin32/pager.c:474
+#: src/library/utils/src/windows/dataentry.c:1706
+#: src/library/utils/src/windows/dataentry.c:1793
 msgid "Close"
 msgstr "닫기"
 
-#: src/gnuwin32/pager.c:472 src/gnuwin32/rui.c:1139
+#: src/gnuwin32/pager.c:471 src/gnuwin32/rui.c:1139
 msgid "Save to File..."
 msgstr "파일에 저장..."
 
-#: src/gnuwin32/pager.c:487 src/gnuwin32/rui.c:1156
+#: src/gnuwin32/pager.c:486 src/gnuwin32/rui.c:1156
 msgid "View"
 msgstr "보기"
 
-#: src/gnuwin32/pager.c:519
+#: src/gnuwin32/pager.c:518
 msgid "Unable to create pager window"
 msgstr "페이저 윈도우를 생성할 수 없습니다"
 
@@ -612,8 +626,8 @@ msgid "Update packages..."
 msgstr "패키지 업데이트..."
 
 #: src/gnuwin32/rui.c:920
-msgid "Install package(s) from local zip files..."
-msgstr "로컬에 있는 zip 파일들로부터 패키지(들) 설치..."
+msgid "Install package(s) from local files..."
+msgstr "로컬에 저장된 파일을 사용하여 패키지(들)를 설치합니다..."
 
 #: src/gnuwin32/rui.c:944
 msgid "FAQ on R"
@@ -665,19 +679,19 @@ msgstr "계단식"
 
 #: src/gnuwin32/rui.c:1010 src/extra/graphapp/gmenus.c:54
 msgid "Tile &Horizontally"
-msgstr ""
+msgstr "창을 가로로 정렬"
 
 #: src/gnuwin32/rui.c:1011 src/extra/graphapp/gmenus.c:55
 msgid "Tile &Vertically"
-msgstr ""
+msgstr "창을 세로로 정렬"
 
 #: src/gnuwin32/rui.c:1012
 msgid "Minimize group"
-msgstr ""
+msgstr "그룹을 축소합니다."
 
 #: src/gnuwin32/rui.c:1013
 msgid "Restore group"
-msgstr ""
+msgstr "그룹복원"
 
 #: src/gnuwin32/rui.c:1080
 msgid "Load workspace"
@@ -753,7 +767,7 @@ msgstr "모든 연산을 중단"
 
 #: src/gnuwin32/rui.c:1167
 msgid "Break to debugger"
-msgstr ""
+msgstr "디버거에 브레이크 지정"
 
 #: src/gnuwin32/rui.c:1170
 msgid "Word completion"
@@ -779,52 +793,52 @@ msgstr "검색 경로를 나열"
 msgid "Console"
 msgstr "콘솔"
 
-#: src/gnuwin32/rui.c:1268
+#: src/gnuwin32/rui.c:1251
 msgid "'mname' is limited to 1000 bytes"
 msgstr "'mname'은 1000 바이트로 제한되어 있습니다"
 
-#: src/gnuwin32/rui.c:1310
+#: src/gnuwin32/rui.c:1293
 #, c-format
 msgid "menu %s does not exist"
 msgstr "메뉴 %s는 존재하지 않습니다"
 
-#: src/gnuwin32/rui.c:1363
+#: src/gnuwin32/rui.c:1346
 msgid "'menu' is limited to 500 bytes"
 msgstr "'menu'는 500 바이트로 제한되어 있습니다"
 
-#: src/gnuwin32/rui.c:1373
+#: src/gnuwin32/rui.c:1356
 msgid "base menu does not exist"
 msgstr "기본메뉴가 존재하지 않습니다"
 
-#: src/gnuwin32/rui.c:1388
+#: src/gnuwin32/rui.c:1371
 msgid "failed to allocate menu"
 msgstr "메뉴를 할당하는데 실패했습니다"
 
-#: src/gnuwin32/rui.c:1405 src/gnuwin32/rui.c:1529
+#: src/gnuwin32/rui.c:1388 src/gnuwin32/rui.c:1512
 msgid "menu + item is limited to 1000 bytes"
 msgstr "메뉴와 항목은 1000 바이트로 제한되어 있습니다"
 
-#: src/gnuwin32/rui.c:1413 src/gnuwin32/rui.c:1496
+#: src/gnuwin32/rui.c:1396 src/gnuwin32/rui.c:1479
 msgid "menu does not exist"
 msgstr "메뉴가 존재하지 않습니다"
 
-#: src/gnuwin32/rui.c:1431 src/gnuwin32/rui.c:1454 src/gnuwin32/rui.c:1459
+#: src/gnuwin32/rui.c:1414 src/gnuwin32/rui.c:1437 src/gnuwin32/rui.c:1442
 msgid "failed to allocate char storage"
-msgstr ""
+msgstr "저장소에 문자를 할당하지 못했습니다."
 
-#: src/gnuwin32/rui.c:1467
+#: src/gnuwin32/rui.c:1450
 msgid "failed to allocate menuitem"
 msgstr "메뉴 항목을 할당하는데 실패했습니다"
 
-#: src/gnuwin32/rui.c:1519
+#: src/gnuwin32/rui.c:1502
 msgid "menu not found"
 msgstr "메뉴를 찾을 수 없습니다"
 
-#: src/gnuwin32/rui.c:1537
+#: src/gnuwin32/rui.c:1520
 msgid "menu or item does not exist"
 msgstr "메뉴 또는 항목이 존재하지 않습니다"
 
-#: src/gnuwin32/system.c:442
+#: src/gnuwin32/system.c:446
 msgid "Save workspace image?"
 msgstr "작업공간 이미지를 저장하시겠습니까?"
 
@@ -832,41 +846,41 @@ msgstr "작업공간 이미지를 저장하시겠습니까?"
 msgid "Insufficient memory: cell not copied to the clipboard"
 msgstr "메모리 부족: 클립보드에 셀을 복사할 수 없습니다"
 
-#: src/extra/graphapp/dialogs.c:147 src/extra/graphapp/dialogs.c:164
-#: src/extra/graphapp/dialogs.c:181
+#: src/extra/graphapp/dialogs.c:148 src/extra/graphapp/dialogs.c:165
+#: src/extra/graphapp/dialogs.c:182
 msgid "Question"
 msgstr "질문"
 
-#: src/extra/graphapp/dialogs.c:202
+#: src/extra/graphapp/dialogs.c:203
 msgid " Change working directory to:"
 msgstr "작업디렉토리를 다음의 위치로 변경:"
 
-#: src/extra/graphapp/dialogs.c:205
+#: src/extra/graphapp/dialogs.c:206
 #, c-format
 msgid "Unable to set '%s' as working directory"
 msgstr "'%s'를 작업디렉토리로 지정할 수 없습니다"
 
-#: src/extra/graphapp/dialogs.c:602 src/extra/graphapp/dialogs.c:620
-#: src/extra/graphapp/dialogs.c:626 src/extra/graphapp/dialogs.c:725
-#: src/extra/graphapp/dialogs.c:739 src/extra/graphapp/dialogs.c:745
+#: src/extra/graphapp/dialogs.c:604 src/extra/graphapp/dialogs.c:622
+#: src/extra/graphapp/dialogs.c:628 src/extra/graphapp/dialogs.c:727
+#: src/extra/graphapp/dialogs.c:741 src/extra/graphapp/dialogs.c:747
 #: src/library/utils/src/windows/widgets.c:125
 msgid "Cancel"
 msgstr "취소"
 
-#: src/extra/graphapp/dialogs.c:622 src/extra/graphapp/dialogs.c:741
+#: src/extra/graphapp/dialogs.c:624 src/extra/graphapp/dialogs.c:743
 #: src/library/utils/src/windows/widgets.c:124
 msgid "OK"
 msgstr "OK"
 
-#: src/extra/graphapp/dialogs.c:733
+#: src/extra/graphapp/dialogs.c:735
 msgid "User"
 msgstr "사용자"
 
-#: src/extra/graphapp/dialogs.c:734
+#: src/extra/graphapp/dialogs.c:736
 msgid "Password"
 msgstr "비밀번호"
 
-#: src/extra/graphapp/dialogs.c:900 src/extra/graphapp/dialogs.c:906
+#: src/extra/graphapp/dialogs.c:902 src/extra/graphapp/dialogs.c:908
 #, c-format
 msgid "\"%s\" not found"
 msgstr "\"%s\"를 찾을 수 없습니다"
@@ -876,9 +890,9 @@ msgid "Arrange Icons"
 msgstr "아이콘 배열"
 
 #: src/library/utils/src/windows/dataentry.c:223
-#: src/library/utils/src/windows/dataentry.c:1850
-#: src/library/utils/src/windows/dataentry.c:1853
-#: src/library/utils/src/windows/dataentry.c:1884
+#: src/library/utils/src/windows/dataentry.c:1851
+#: src/library/utils/src/windows/dataentry.c:1854
+#: src/library/utils/src/windows/dataentry.c:1885
 msgid "invalid argument"
 msgstr "잘못된 입력인자입니다"
 
@@ -890,17 +904,12 @@ msgstr "값에 대한 유형이 올바르지 않습니다"
 msgid "Data Editor"
 msgstr "데이터 편집기"
 
-#: src/library/utils/src/windows/dataentry.c:282
-#: src/library/utils/src/windows/dataentry.c:1891
-msgid "invalid device"
-msgstr "잘못된 장치입니다"
-
 #: src/library/utils/src/windows/dataentry.c:331
 msgid "dataentry: internal memory problem"
 msgstr "데이터입력: 내부 메모리 문제입니다"
 
 #: src/library/utils/src/windows/dataentry.c:634
-#: src/library/utils/src/windows/dataentry.c:1221
+#: src/library/utils/src/windows/dataentry.c:1222
 msgid "dataentry: internal memory error"
 msgstr "데이터입력: 내부 메모리 에러입니다"
 
@@ -909,43 +918,43 @@ msgstr "데이터입력: 내부 메모리 에러입니다"
 msgid "internal type error in dataentry"
 msgstr "데이터입력에 내부 유형의 에러입니다"
 
-#: src/library/utils/src/windows/dataentry.c:852
+#: src/library/utils/src/windows/dataentry.c:853
 msgid "dataentry: parse error on string"
 msgstr "데이터입력: 문자열 분석에 에러입니다"
 
-#: src/library/utils/src/windows/dataentry.c:995
+#: src/library/utils/src/windows/dataentry.c:996
 msgid "dataentry: expression too long"
 msgstr "데이터입력: 표현식이 너무 깁니다"
 
-#: src/library/utils/src/windows/dataentry.c:1472
+#: src/library/utils/src/windows/dataentry.c:1473
 msgid "column names cannot be blank"
 msgstr "열이름은 공백으로 남겨둘 수 없습니다"
 
-#: src/library/utils/src/windows/dataentry.c:1518
+#: src/library/utils/src/windows/dataentry.c:1519
 msgid "Variable editor"
 msgstr "변수 편집기"
 
-#: src/library/utils/src/windows/dataentry.c:1523
+#: src/library/utils/src/windows/dataentry.c:1524
 msgid "variable name"
 msgstr "변수명"
 
-#: src/library/utils/src/windows/dataentry.c:1525
+#: src/library/utils/src/windows/dataentry.c:1526
 msgid "type"
 msgstr "유형"
 
-#: src/library/utils/src/windows/dataentry.c:1639
+#: src/library/utils/src/windows/dataentry.c:1640
 msgid "Cell width(s)"
 msgstr "셀의 너비(들)"
 
-#: src/library/utils/src/windows/dataentry.c:1645
+#: src/library/utils/src/windows/dataentry.c:1646
 msgid "Cell width"
 msgstr "셀의 너비"
 
-#: src/library/utils/src/windows/dataentry.c:1648
+#: src/library/utils/src/windows/dataentry.c:1649
 msgid "variable"
 msgstr "변수"
 
-#: src/library/utils/src/windows/dataentry.c:1691
+#: src/library/utils/src/windows/dataentry.c:1692
 msgid ""
 "Navigation.\n"
 "  Keyboard: cursor keys move selection\n"
@@ -988,220 +997,222 @@ msgstr ""
 "있는 메뉴를 보여줍니다\n"
 "\n"
 
-#: src/library/utils/src/windows/dataentry.c:1699
+#: src/library/utils/src/windows/dataentry.c:1700
 msgid "Copy selected cell"
 msgstr "선택된 셀을 복사합니다"
 
-#: src/library/utils/src/windows/dataentry.c:1700
+#: src/library/utils/src/windows/dataentry.c:1701
 msgid "Paste to selected cell"
 msgstr "선택된 셀에 붙여넣습니다"
 
-#: src/library/utils/src/windows/dataentry.c:1701
+#: src/library/utils/src/windows/dataentry.c:1702
 msgid "Autosize column"
 msgstr "열의 크기를 자동조정합니다"
 
-#: src/library/utils/src/windows/dataentry.c:1797
+#: src/library/utils/src/windows/dataentry.c:1798
 msgid "Copy  \tCTRL+C"
 msgstr "복사  \tCTRL+C"
 
-#: src/library/utils/src/windows/dataentry.c:1799
+#: src/library/utils/src/windows/dataentry.c:1800
 msgid "Paste \tCTRL+V"
 msgstr "붙여넣기 \tCTRL+V"
 
-#: src/library/utils/src/windows/dataentry.c:1801
+#: src/library/utils/src/windows/dataentry.c:1802
 msgid "Delete\tDEL"
 msgstr "삭제\tDEL"
 
-#: src/library/utils/src/windows/dataentry.c:1804
+#: src/library/utils/src/windows/dataentry.c:1805
 msgid "Cell widths ..."
 msgstr "셀 너비 ..."
 
-#: src/library/utils/src/windows/dataentry.c:1808
+#: src/library/utils/src/windows/dataentry.c:1809
 msgid "Data editor"
 msgstr "데이터 편집기"
 
-#: src/library/grDevices/src/devWindows.c:932
+#: src/library/grDevices/src/devWindows.c:949
 msgid "Portable network graphics file"
 msgstr "휴대 네트워크 그래픽스 파일"
 
-#: src/library/grDevices/src/devWindows.c:935
+#: src/library/grDevices/src/devWindows.c:952
 msgid "Windows bitmap file"
-msgstr "윈도우즈 bitmap 파일"
+msgstr "윈도우즈 비트맵 파일"
 
-#: src/library/grDevices/src/devWindows.c:938
+#: src/library/grDevices/src/devWindows.c:955
 msgid "TIFF file"
 msgstr "TIFF 파일"
 
-#: src/library/grDevices/src/devWindows.c:941
+#: src/library/grDevices/src/devWindows.c:958
 msgid "Jpeg file"
 msgstr "Jpeg 파일"
 
-#: src/library/grDevices/src/devWindows.c:963
+#: src/library/grDevices/src/devWindows.c:980
 msgid "Postscript file"
-msgstr "Postscript 파일"
+msgstr "포스트스크립트(postscript) 파일"
 
-#: src/library/grDevices/src/devWindows.c:975
+#: src/library/grDevices/src/devWindows.c:992
 msgid "PDF file"
 msgstr "PDF 파일"
 
-#: src/library/grDevices/src/devWindows.c:987
+#: src/library/grDevices/src/devWindows.c:1004
 msgid "Enhanced metafiles"
-msgstr ""
+msgstr "확장형 메타파일(enhanced metafiles)"
 
-#: src/library/grDevices/src/devWindows.c:990
-#: src/library/grDevices/src/devWindows.c:3436
+#: src/library/grDevices/src/devWindows.c:1007
+#: src/library/grDevices/src/devWindows.c:3445
 msgid "file path selected is too long: only 512 bytes are allowed"
 msgstr "선택된 파일경로는 너무 깁니다: 512 바이트만 허용합니다"
 
-#: src/library/grDevices/src/devWindows.c:1201
+#: src/library/grDevices/src/devWindows.c:1218
 msgid "No plot to replace!"
 msgstr "대체할 플랏이 없습니다!"
 
-#: src/library/grDevices/src/devWindows.c:1249
+#: src/library/grDevices/src/devWindows.c:1268
 msgid "Variable name"
 msgstr "변수명"
 
-#: src/library/grDevices/src/devWindows.c:1258
+#: src/library/grDevices/src/devWindows.c:1277
 msgid "Variable doesn't contain any plots!"
 msgstr "변수가 어떠한 플랏들도 포함하고 있지 않습니다!"
 
-#: src/library/grDevices/src/devWindows.c:1273
+#: src/library/grDevices/src/devWindows.c:1292
 msgid "Name of variable to save to"
 msgstr "다음의 위치에 저장될 변수의 이름"
 
-#: src/library/grDevices/src/devWindows.c:1582
+#: src/library/grDevices/src/devWindows.c:1601
 msgid "Copy to the clipboard as a metafile"
 msgstr "클립보드에 메타파일로서 복사"
 
-#: src/library/grDevices/src/devWindows.c:1600
-#: src/library/grDevices/src/devWindows.c:1611
+#: src/library/grDevices/src/devWindows.c:1619
+#: src/library/grDevices/src/devWindows.c:1630
 msgid "Stop locator"
-msgstr ""
+msgstr "로케이터의 사용을 중지합니다."
 
-#: src/library/grDevices/src/devWindows.c:1610
-#: src/library/grDevices/src/devWindows.c:1614
+#: src/library/grDevices/src/devWindows.c:1629
+#: src/library/grDevices/src/devWindows.c:1633
 msgid "Stop"
 msgstr "중지"
 
-#: src/library/grDevices/src/devWindows.c:1616
+#: src/library/grDevices/src/devWindows.c:1635
 msgid "Continue"
 msgstr "계속"
 
-#: src/library/grDevices/src/devWindows.c:1620
+#: src/library/grDevices/src/devWindows.c:1639
 msgid "Next"
 msgstr "다음"
 
-#: src/library/grDevices/src/devWindows.c:1621
+#: src/library/grDevices/src/devWindows.c:1640
 msgid "Next plot"
 msgstr "다음 플랏"
 
-#: src/library/grDevices/src/devWindows.c:1627
+#: src/library/grDevices/src/devWindows.c:1646
 msgid "Save as"
 msgstr "다른 이름으로 저장"
 
-#: src/library/grDevices/src/devWindows.c:1636
-#: src/library/grDevices/src/devWindows.c:1638
-#: src/library/grDevices/src/devWindows.c:1640
+#: src/library/grDevices/src/devWindows.c:1655
+#: src/library/grDevices/src/devWindows.c:1657
+#: src/library/grDevices/src/devWindows.c:1659
 #, c-format
 msgid "%s quality..."
 msgstr "%s 품질..."
 
-#: src/library/grDevices/src/devWindows.c:1642
+#: src/library/grDevices/src/devWindows.c:1661
 msgid "Copy to the clipboard"
 msgstr "클립보드에 복사"
 
-#: src/library/grDevices/src/devWindows.c:1643
+#: src/library/grDevices/src/devWindows.c:1662
 msgid "as a Bitmap\tCTRL+C"
 msgstr "비트맵으로\tCTRL+C"
 
-#: src/library/grDevices/src/devWindows.c:1644
+#: src/library/grDevices/src/devWindows.c:1663
 msgid "as a Metafile\tCTRL+W"
 msgstr "메타파일로\tCTRL+W"
 
-#: src/library/grDevices/src/devWindows.c:1647
-msgid "Print...\tCTRL+P"
-msgstr "인쇄...\tCTRL+P"
-
-#: src/library/grDevices/src/devWindows.c:1649
+#: src/library/grDevices/src/devWindows.c:1668
 msgid "close Device"
 msgstr "장치를 닫습니다"
 
-#: src/library/grDevices/src/devWindows.c:1650
+#: src/library/grDevices/src/devWindows.c:1669
 msgid "History"
 msgstr "작업기록"
 
-#: src/library/grDevices/src/devWindows.c:1651
+#: src/library/grDevices/src/devWindows.c:1670
 msgid "Recording"
 msgstr "기록"
 
-#: src/library/grDevices/src/devWindows.c:1654
+#: src/library/grDevices/src/devWindows.c:1673
 msgid "Add\tINS"
 msgstr "삽입\tINS"
 
-#: src/library/grDevices/src/devWindows.c:1655
+#: src/library/grDevices/src/devWindows.c:1674
 msgid "Replace"
 msgstr "변경"
 
-#: src/library/grDevices/src/devWindows.c:1657
+#: src/library/grDevices/src/devWindows.c:1676
 msgid "Previous\tPgUp"
 msgstr "이전\tPgUp"
 
-#: src/library/grDevices/src/devWindows.c:1658
+#: src/library/grDevices/src/devWindows.c:1677
 msgid "Next\tPgDown"
 msgstr "다음\tPgDown"
 
-#: src/library/grDevices/src/devWindows.c:1660
+#: src/library/grDevices/src/devWindows.c:1679
 msgid "Save to variable..."
 msgstr "변수에 저장..."
 
-#: src/library/grDevices/src/devWindows.c:1661
+#: src/library/grDevices/src/devWindows.c:1680
 msgid "Get from variable..."
 msgstr "변수로부터 가져옴..."
 
-#: src/library/grDevices/src/devWindows.c:1663
+#: src/library/grDevices/src/devWindows.c:1682
 msgid "Clear history"
 msgstr "작업기록을 지우기"
 
-#: src/library/grDevices/src/devWindows.c:1664
+#: src/library/grDevices/src/devWindows.c:1683
 msgid "Resize"
 msgstr "크기변경"
 
-#: src/library/grDevices/src/devWindows.c:1665
+#: src/library/grDevices/src/devWindows.c:1684
 msgid "R mode"
 msgstr "R 모드"
 
-#: src/library/grDevices/src/devWindows.c:1667
+#: src/library/grDevices/src/devWindows.c:1686
 msgid "Fit to window"
-msgstr "윈도우에 맞추기"
+msgstr "윈도우 사이즈에 맞추기"
 
-#: src/library/grDevices/src/devWindows.c:1669
+#: src/library/grDevices/src/devWindows.c:1688
 msgid "Fixed size"
-msgstr "고정 크기"
+msgstr "고정 크기 사용하기"
 
-#: src/library/grDevices/src/devWindows.c:1676
+#: src/library/grDevices/src/devWindows.c:1695
 msgid "Copy as metafile"
-msgstr "메타파일 형식으로 복사"
+msgstr "메타파일(metafile) 형식으로 복사"
 
-#: src/library/grDevices/src/devWindows.c:1678
+#: src/library/grDevices/src/devWindows.c:1697
 msgid "Copy as bitmap"
-msgstr "bitmap 형식으로 복사"
+msgstr "비트맵(bitmap) 형식으로 복사"
 
-#: src/library/grDevices/src/devWindows.c:1681
+#: src/library/grDevices/src/devWindows.c:1700
 msgid "Save as metafile..."
-msgstr "메타파일 형식으로 저장..."
+msgstr "메타파일(metafile) 형식으로 저장..."
 
-#: src/library/grDevices/src/devWindows.c:1683
+#: src/library/grDevices/src/devWindows.c:1702
 msgid "Save as postscript..."
-msgstr "postscript 으로 저장..."
+msgstr "포스트스크립트(postscript) 형식으로 저장..."
 
-#: src/library/grDevices/src/devWindows.c:3136
+#: src/library/grDevices/src/devWindows.c:3143
 msgid "Locator is active"
-msgstr ""
+msgstr "로케이터가 활성화되었습니다."
 
-#: src/library/grDevices/src/devWindows.c:3763
+#: src/library/grDevices/src/devWindows.c:3769
 msgid "Waiting to confirm page change..."
 msgstr "페이지 변경을 확인하기 위해 기다리는 중..."
 
-#: src/library/grDevices/src/devWindows.c:3775
+#: src/library/grDevices/src/devWindows.c:3781
 msgid "Click or hit ENTER for next page"
 msgstr "다음 페이지로 이동하기 위해서는 클릭 또는 엔터키를 누르세요"
+
+#~ msgid "Print...\tCTRL+P"
+#~ msgstr "인쇄...\tCTRL+P"
+
+#~ msgid "invalid device"
+#~ msgstr "잘못된 장치입니다"
diff --git a/src/library/base/po/RGui-nn.po b/src/library/base/po/RGui-nn.po
index b8a2623..f91f233 100644
--- a/src/library/base/po/RGui-nn.po
+++ b/src/library/base/po/RGui-nn.po
@@ -7,7 +7,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: \n"
 "Report-Msgid-Bugs-To: bugs.r-project.org\n"
-"POT-Creation-Date: 2013-03-18 19:36+0000\n"
+"POT-Creation-Date: 2016-04-01 10:28-0700\n"
 "PO-Revision-Date: 2011-01-28 10:51+0100\n"
 "Last-Translator: Karl Ove Hufthammer <karl at huftis.org>\n"
 "Language-Team: Norwegian Nynorsk <i18n-nn at lister.ping.uio.no>\n"
@@ -31,11 +31,11 @@ msgstr "Ikkje nok minne: tekst ikkje kopiert til utklippstavla"
 msgid "Unable to open the clipboard"
 msgstr "Klarte ikkje opna utklippstavla"
 
-#: src/gnuwin32/console.c:1914
+#: src/gnuwin32/console.c:1919
 msgid "Insufficient memory. Please close the console"
 msgstr "Ikkje nok minne. Lukk konsollen."
 
-#: src/gnuwin32/console.c:1969 src/gnuwin32/console.c:2022
+#: src/gnuwin32/console.c:1974 src/gnuwin32/console.c:2028
 #: src/gnuwin32/preferences.c:333
 #, c-format
 msgid ""
@@ -45,24 +45,24 @@ msgstr ""
 "Fann ikkje skrifta «%s-%d-%d».\n"
 "Brukar system-skrifta."
 
-#: src/gnuwin32/console.c:2127
+#: src/gnuwin32/console.c:2133
 msgid "Save selection to"
 msgstr "Lagra utvalet til"
 
-#: src/gnuwin32/console.c:2129
+#: src/gnuwin32/console.c:2135
 msgid "Save console contents to"
 msgstr "Lagra konsollinhaldet til"
 
-#: src/gnuwin32/console.c:2228
+#: src/gnuwin32/console.c:2234
 msgid "Scrolling.\n"
 msgstr "Rulling.\n"
 
-#: src/gnuwin32/console.c:2229
+#: src/gnuwin32/console.c:2235
 msgid "  Keyboard: PgUp, PgDown, Ctrl+Arrows, Ctrl+Home, Ctrl+End,\n"
 msgstr ""
 "  Tastatur: Page Up, Page Down, Ctrl + piltastar, Ctrl + Home, Ctrl + End,\n"
 
-#: src/gnuwin32/console.c:2230
+#: src/gnuwin32/console.c:2236
 msgid ""
 "  Mouse: use the scrollbar(s).\n"
 "\n"
@@ -70,74 +70,74 @@ msgstr ""
 "  Mus: Bruk rullefelta.\n"
 "\n"
 
-#: src/gnuwin32/console.c:2231
+#: src/gnuwin32/console.c:2237
 msgid "Editing.\n"
 msgstr "Redigering.\n"
 
-#: src/gnuwin32/console.c:2232
+#: src/gnuwin32/console.c:2238
 msgid "  Moving the cursor: \n"
 msgstr "  Flytting av skrivemerket: \n"
 
-#: src/gnuwin32/console.c:2233
+#: src/gnuwin32/console.c:2239
 msgid "     Left arrow or Ctrl+B: move backward one character;\n"
 msgstr "     «Pil venstre» eller «Ctrl + B»: flytt eitt teikn bakover;\n"
 
-#: src/gnuwin32/console.c:2234
+#: src/gnuwin32/console.c:2240
 msgid "     Right arrow or Ctrl+F: move forward one character;\n"
 msgstr "     «Pil høgre» eller «Ctrl + F»: flytt eitt teikn framover;\n"
 
-#: src/gnuwin32/console.c:2235
+#: src/gnuwin32/console.c:2241
 msgid "     Home or Ctrl+A: go to beginning of line;\n"
 msgstr "     «Home» eller «Ctrl + A»: gå til starten av linja;\n"
 
-#: src/gnuwin32/console.c:2236
+#: src/gnuwin32/console.c:2242
 msgid "     End or Ctrl+E: go to end of line;\n"
 msgstr "     «End» eller «Ctrl + E»: gå til slutten av linja;\n"
 
-#: src/gnuwin32/console.c:2237
+#: src/gnuwin32/console.c:2243
 msgid "  History: Up and Down Arrows, Ctrl+P, Ctrl+N\n"
 msgstr "  Loggen: «Pil opp» og «Pil ned», eller «Ctrl + P» og «Ctrl + N»\n"
 
-#: src/gnuwin32/console.c:2238
+#: src/gnuwin32/console.c:2244
 msgid "  Deleting:\n"
 msgstr "  Sletting:\n"
 
-#: src/gnuwin32/console.c:2239
+#: src/gnuwin32/console.c:2245
 msgid "     Del or Ctrl+D: delete current character or selection;\n"
 msgstr "     «Delete» eller «Ctrl + D»: slett gjeldande teikn eller utval;\n"
 
-#: src/gnuwin32/console.c:2240
+#: src/gnuwin32/console.c:2246
 msgid "     Backspace: delete preceding character;\n"
 msgstr "     «Rettetast»: slett førre teikn;\n"
 
-#: src/gnuwin32/console.c:2241
+#: src/gnuwin32/console.c:2247
 msgid ""
 "     Ctrl+Del or Ctrl+K: delete text from current character to end of line.\n"
 msgstr ""
 "     «Ctrl + Delete» eller «Ctrl + K»: slett tekst frå gjeldande teikn til "
 "slutten av linja.\n"
 
-#: src/gnuwin32/console.c:2242
+#: src/gnuwin32/console.c:2248
 msgid "     Ctrl+U: delete all text from current line.\n"
 msgstr "     «Ctrl + U»: Slett all teksten frå den gjeldande linja.\n"
 
-#: src/gnuwin32/console.c:2243
+#: src/gnuwin32/console.c:2249
 msgid "  Copy and paste.\n"
 msgstr "  Kopiering og innliming.\n"
 
-#: src/gnuwin32/console.c:2244
+#: src/gnuwin32/console.c:2250
 msgid ""
 "     Use the mouse (with the left button held down) to mark (select) text.\n"
 msgstr "     Bruk musa (med venstre museknapp inne) for å merkje teksten.\n"
 
-#: src/gnuwin32/console.c:2245
+#: src/gnuwin32/console.c:2251
 msgid ""
 "     Use Shift+Del (or Ctrl+C) to copy the marked text to the clipboard and\n"
 msgstr ""
 "     Bruk «Shift + Delete» eller «Ctrl + C» for kopiera utvalet til "
 "utklippstavla, og\n"
 
-#: src/gnuwin32/console.c:2246
+#: src/gnuwin32/console.c:2252
 msgid ""
 "     Shift+Ins (or Ctrl+V or Ctrl+Y) to paste the content of the clipboard "
 "(if any)  \n"
@@ -145,29 +145,29 @@ msgstr ""
 "     «Shift + Insert», «Ctrl + V» eller «Ctrl +Y» for å lima inn innhaldet "
 "frå utklippstavla\n"
 
-#: src/gnuwin32/console.c:2247
+#: src/gnuwin32/console.c:2253
 msgid "     to the console, Ctrl+X first copy then paste\n"
 msgstr "     til konsollen, «Ctrl + X» først kopiera og så lima inn\n"
 
-#: src/gnuwin32/console.c:2248
+#: src/gnuwin32/console.c:2254
 msgid "  Misc:\n"
 msgstr "  Ymse:\n"
 
-#: src/gnuwin32/console.c:2249
+#: src/gnuwin32/console.c:2255
 msgid "     Ctrl+L: Clear the console.\n"
 msgstr "     «Ctrl + L»: tøm konsollen.\n"
 
-#: src/gnuwin32/console.c:2250
+#: src/gnuwin32/console.c:2256
 msgid "     Ctrl+O or INS: Toggle overwrite mode: initially off.\n"
 msgstr ""
 "     « Ctrl + O» eller «Insert»: slå på/av overskrivingsmodus (av som "
 "standard).\n"
 
-#: src/gnuwin32/console.c:2251
+#: src/gnuwin32/console.c:2257
 msgid "     Ctrl+T: Interchange current char with one to the left.\n"
 msgstr "     «Ctrl +T»: Byt det gjeldande teiknet med det til venstre.\n"
 
-#: src/gnuwin32/console.c:2252
+#: src/gnuwin32/console.c:2258
 msgid ""
 "\n"
 "Note: Console is updated only when some input is required.\n"
@@ -175,7 +175,7 @@ msgstr ""
 "\n"
 "Merk: Konsollen vert berre oppdatert når han treng inndata.\n"
 
-#: src/gnuwin32/console.c:2253
+#: src/gnuwin32/console.c:2259
 msgid ""
 "  Use Ctrl+W to toggle this feature off/on.\n"
 "\n"
@@ -183,7 +183,7 @@ msgstr ""
 "  Bruk «Ctrl + W» for å slå funksjonen av eller på.\n"
 "\n"
 
-#: src/gnuwin32/console.c:2254
+#: src/gnuwin32/console.c:2260
 msgid ""
 "Use ESC to stop the interpreter.\n"
 "\n"
@@ -191,7 +191,7 @@ msgstr ""
 "Bruk «Escape» for å stoppa skriptkøyringa.\n"
 "\n"
 
-#: src/gnuwin32/console.c:2255
+#: src/gnuwin32/console.c:2261
 msgid ""
 "TAB starts completion of the current word.\n"
 "\n"
@@ -199,267 +199,268 @@ msgstr ""
 "Bruk «Tab» for å autofullføra det gjeldande ordet.\n"
 "\n"
 
-#: src/gnuwin32/console.c:2256
+#: src/gnuwin32/console.c:2262
 msgid "Standard Windows hotkeys can be used to switch to the\n"
 msgstr "Du kan bruka dei vanlige Windows-snarvegane for å byta til\n"
 
-#: src/gnuwin32/console.c:2257
+#: src/gnuwin32/console.c:2263
 msgid "graphics device (Ctrl+Tab or Ctrl+F6 in MDI, Alt+Tab in SDI)"
 msgstr ""
 "grafikkeininga («Ctrl + Tab» eller «Ctrl + F6» i MDI, og «Alt + Tab» i SDI)"
 
-#: src/gnuwin32/editor.c:88 src/gnuwin32/editor.c:90
+#: src/gnuwin32/editor.c:91 src/gnuwin32/editor.c:93
 msgid "R Editor"
 msgstr "R-redigering"
 
-#: src/gnuwin32/editor.c:119
+#: src/gnuwin32/editor.c:123
 #, c-format
 msgid "unable to open file %s for reading"
 msgstr "klarte ikkje opna fila «%s» for lesing"
 
-#: src/gnuwin32/editor.c:135
+#: src/gnuwin32/editor.c:139
 #, c-format
 msgid "Could not read from file '%s'"
 msgstr "Klarte ikkje lesa frå fila «%s»"
 
-#: src/gnuwin32/editor.c:166
+#: src/gnuwin32/editor.c:171
 #, c-format
 msgid "Could not save file '%s'"
 msgstr "Klarte ikkje lagra fila «%s»"
 
-#: src/gnuwin32/editor.c:182
+#: src/gnuwin32/editor.c:187
 msgid "Save script as"
 msgstr "Lagra skript som"
 
-#: src/gnuwin32/editor.c:377 src/gnuwin32/editor.c:694
-#: src/gnuwin32/pager.c:431 src/gnuwin32/rui.c:1076
+#: src/gnuwin32/editor.c:379 src/gnuwin32/editor.c:696
+#: src/gnuwin32/pager.c:430 src/gnuwin32/rui.c:1076
 msgid "Open script"
 msgstr "Opna skript"
 
-#: src/gnuwin32/editor.c:500 src/gnuwin32/pager.c:185 src/gnuwin32/pager.c:205
+#: src/gnuwin32/editor.c:502 src/gnuwin32/pager.c:184 src/gnuwin32/pager.c:204
 msgid "No RGui console to paste to"
 msgstr "Manglar RGui-konsoll å lima inn i"
 
-#: src/gnuwin32/editor.c:602
+#: src/gnuwin32/editor.c:604
 msgid "R EDITOR\n"
 msgstr "R-REDIGERING\n"
 
-#: src/gnuwin32/editor.c:604
+#: src/gnuwin32/editor.c:606
 msgid "A standard text editor for editing and running R code.\n"
 msgstr "Standard skrivevindauge for redigering og køyring av R-kode.\n"
 
-#: src/gnuwin32/editor.c:606
+#: src/gnuwin32/editor.c:608
 msgid "RUNNING COMMANDS\n"
 msgstr "KØYRING AV KOMMANDOAR\n"
 
-#: src/gnuwin32/editor.c:607
+#: src/gnuwin32/editor.c:609
 msgid "To run a line or section of R code, select the code and either\n"
 msgstr "For å køyra ei linje eller eit utval R-kode, merk koden, og anten\n"
 
-#: src/gnuwin32/editor.c:608
+#: src/gnuwin32/editor.c:610
 msgid "     Press Ctrl-R\n"
 msgstr "     trykk «Ctrl + R»,\n"
 
-#: src/gnuwin32/editor.c:609
+#: src/gnuwin32/editor.c:611
 msgid "     Select \"Run line or selection\" from the \"Edit\" menu\n"
 msgstr "     vel «Køyr linje eller utval» frå «Rediger»-menyen,\n"
 
-#: src/gnuwin32/editor.c:610
+#: src/gnuwin32/editor.c:612
 msgid "     Press the \"Run line or selection\" icon on the toolbar\n"
 msgstr "     eller trykk «Køyr linje eller utval»-ikonet på verktøylinja.\n"
 
-#: src/gnuwin32/editor.c:611
+#: src/gnuwin32/editor.c:613
 msgid ""
 "This will copy the selected commands to the console and evaluate them.\n"
 msgstr ""
 "Dette vil kopiera dei merkte kommandoane til konsollen, og så køyra dei.\n"
 
-#: src/gnuwin32/editor.c:612
+#: src/gnuwin32/editor.c:614
 msgid ""
 "If there is no selection, this will just run the current line and advance\n"
 msgstr ""
 "Viss det ikkje finst noko utval, vert berre den gjeldande linja køyrd, og\n"
 
-#: src/gnuwin32/editor.c:613
+#: src/gnuwin32/editor.c:615
 msgid "the cursor by one line.\n"
 msgstr "skrivemerket vert flytta til neste linje.\n"
 
-#: src/gnuwin32/editor.c:625 src/gnuwin32/editor.c:702
-#: src/gnuwin32/editor.c:760
+#: src/gnuwin32/editor.c:627 src/gnuwin32/editor.c:704
+#: src/gnuwin32/editor.c:762
 msgid "Run line or selection"
 msgstr "Køyr linje eller utval"
 
-#: src/gnuwin32/editor.c:627 src/gnuwin32/editor.c:745
+#: src/gnuwin32/editor.c:629 src/gnuwin32/editor.c:747
 msgid "Undo"
 msgstr "Angra"
 
-#: src/gnuwin32/editor.c:629 src/gnuwin32/editor.c:748
+#: src/gnuwin32/editor.c:631 src/gnuwin32/editor.c:750
 msgid "Cut"
 msgstr "Klipp ut"
 
-#: src/gnuwin32/editor.c:630 src/gnuwin32/editor.c:750
-#: src/gnuwin32/pager.c:305 src/gnuwin32/pager.c:478 src/gnuwin32/rui.c:859
+#: src/gnuwin32/editor.c:632 src/gnuwin32/editor.c:752
+#: src/gnuwin32/pager.c:304 src/gnuwin32/pager.c:477 src/gnuwin32/rui.c:859
 #: src/gnuwin32/rui.c:1088 src/gnuwin32/rui.c:1144
 msgid "Copy"
 msgstr "Kopier"
 
-#: src/gnuwin32/editor.c:631 src/gnuwin32/editor.c:752 src/gnuwin32/rui.c:860
+#: src/gnuwin32/editor.c:633 src/gnuwin32/editor.c:754 src/gnuwin32/rui.c:860
 #: src/gnuwin32/rui.c:1092 src/gnuwin32/rui.c:1145
 msgid "Paste"
 msgstr "Lim inn"
 
-#: src/gnuwin32/editor.c:632 src/gnuwin32/editor.c:754
+#: src/gnuwin32/editor.c:634 src/gnuwin32/editor.c:756
 msgid "Delete"
 msgstr "Slett"
 
-#: src/gnuwin32/editor.c:634 src/gnuwin32/editor.c:756
-#: src/gnuwin32/pager.c:308 src/gnuwin32/pager.c:484 src/gnuwin32/rui.c:866
+#: src/gnuwin32/editor.c:636 src/gnuwin32/editor.c:758
+#: src/gnuwin32/pager.c:307 src/gnuwin32/pager.c:483 src/gnuwin32/rui.c:866
 #: src/gnuwin32/rui.c:1149
 msgid "Select all"
 msgstr "Merk alt"
 
-#: src/gnuwin32/editor.c:698
+#: src/gnuwin32/editor.c:700
 msgid "Save script"
 msgstr "Lagra skript"
 
-#: src/gnuwin32/editor.c:706 src/gnuwin32/pager.c:451
-#: src/library/grDevices/src/devWindows.c:1594
+#: src/gnuwin32/editor.c:708 src/gnuwin32/pager.c:450
+#: src/library/grDevices/src/devWindows.c:1613
 msgid "Return focus to Console"
 msgstr "Flytt fokuset tilbake til konsollen"
 
-#: src/gnuwin32/editor.c:709
+#: src/gnuwin32/editor.c:711
 msgid "Print script"
 msgstr "Skriv ut skript"
 
-#: src/gnuwin32/editor.c:711 src/gnuwin32/pager.c:446 src/gnuwin32/rui.c:1104
-#: src/library/grDevices/src/devWindows.c:1588
+#: src/gnuwin32/editor.c:713 src/gnuwin32/pager.c:445 src/gnuwin32/rui.c:1104
+#: src/library/grDevices/src/devWindows.c:1607
 msgid "Print"
 msgstr "Skriv ut"
 
-#: src/gnuwin32/editor.c:729 src/gnuwin32/pager.c:467 src/gnuwin32/rui.c:1122
-#: src/library/utils/src/windows/dataentry.c:1790
-#: src/library/grDevices/src/devWindows.c:1626
+#: src/gnuwin32/editor.c:731 src/gnuwin32/pager.c:466 src/gnuwin32/rui.c:1122
+#: src/library/utils/src/windows/dataentry.c:1791
+#: src/library/grDevices/src/devWindows.c:1645
 msgid "File"
 msgstr "Fil"
 
-#: src/gnuwin32/editor.c:730 src/gnuwin32/pager.c:468 src/gnuwin32/rui.c:1124
+#: src/gnuwin32/editor.c:732 src/gnuwin32/pager.c:467 src/gnuwin32/rui.c:1124
 msgid "New script"
 msgstr "Nytt skript"
 
-#: src/gnuwin32/editor.c:732 src/gnuwin32/pager.c:469 src/gnuwin32/rui.c:1125
+#: src/gnuwin32/editor.c:734 src/gnuwin32/pager.c:468 src/gnuwin32/rui.c:1125
 msgid "Open script..."
 msgstr "Opna skript …"
 
-#: src/gnuwin32/editor.c:734
+#: src/gnuwin32/editor.c:736
 msgid "Save"
 msgstr "Lagra"
 
-#: src/gnuwin32/editor.c:736
+#: src/gnuwin32/editor.c:738
 msgid "Save as..."
 msgstr "Lagra som …"
 
-#: src/gnuwin32/editor.c:739 src/gnuwin32/pager.c:470 src/gnuwin32/rui.c:1138
-#: src/library/grDevices/src/devWindows.c:1689
+#: src/gnuwin32/editor.c:741 src/gnuwin32/pager.c:469 src/gnuwin32/rui.c:1138
+#: src/library/grDevices/src/devWindows.c:1666
+#: src/library/grDevices/src/devWindows.c:1708
 msgid "Print..."
 msgstr "Skriv ut …"
 
-#: src/gnuwin32/editor.c:742
+#: src/gnuwin32/editor.c:744
 msgid "Close script"
 msgstr "Lukk skript"
 
-#: src/gnuwin32/editor.c:744 src/gnuwin32/pager.c:477 src/gnuwin32/rui.c:1143
-#: src/library/utils/src/windows/dataentry.c:1796
+#: src/gnuwin32/editor.c:746 src/gnuwin32/pager.c:476 src/gnuwin32/rui.c:1143
+#: src/library/utils/src/windows/dataentry.c:1797
 msgid "Edit"
 msgstr "Rediger"
 
-#: src/gnuwin32/editor.c:758 src/gnuwin32/rui.c:1150
+#: src/gnuwin32/editor.c:760 src/gnuwin32/rui.c:1150
 msgid "Clear console"
 msgstr "Tøm konsoll"
 
-#: src/gnuwin32/editor.c:762
+#: src/gnuwin32/editor.c:764
 msgid "Run all"
 msgstr "Køyr alt"
 
-#: src/gnuwin32/editor.c:765
+#: src/gnuwin32/editor.c:767
 msgid "Find..."
 msgstr "Søk etter …"
 
-#: src/gnuwin32/editor.c:767
+#: src/gnuwin32/editor.c:769
 msgid "Replace..."
 msgstr "&Byt ut …"
 
-#: src/gnuwin32/editor.c:770 src/gnuwin32/rui.c:1154
+#: src/gnuwin32/editor.c:772 src/gnuwin32/rui.c:1154
 msgid "GUI preferences..."
 msgstr "GUI-innstillingar …"
 
-#: src/gnuwin32/editor.c:780 src/gnuwin32/rui.c:1186
-#: src/library/utils/src/windows/dataentry.c:1697
-#: src/library/utils/src/windows/dataentry.c:1807
+#: src/gnuwin32/editor.c:782 src/gnuwin32/rui.c:1186
+#: src/library/utils/src/windows/dataentry.c:1698
+#: src/library/utils/src/windows/dataentry.c:1808
 msgid "Help"
 msgstr "Hjelp"
 
-#: src/gnuwin32/editor.c:781
+#: src/gnuwin32/editor.c:783
 msgid "Editor"
 msgstr "Redigering"
 
-#: src/gnuwin32/editor.c:840
+#: src/gnuwin32/editor.c:842
 msgid "Maximum number of editors reached"
 msgstr "Nådde maksgrensa for talet på skrivevindauge"
 
-#: src/gnuwin32/editor.c:845
+#: src/gnuwin32/editor.c:847
 msgid "Unable to create editor window"
 msgstr "Klarte ikkje laga nytt skrivevindauge"
 
-#: src/gnuwin32/editor.c:853
+#: src/gnuwin32/editor.c:855
 msgid "Untitled"
 msgstr "Namnlaus"
 
-#: src/gnuwin32/extra.c:823 src/gnuwin32/rui.c:1224
+#: src/gnuwin32/extra.c:825
 msgid "Select file"
 msgstr "Vel fil"
 
-#: src/gnuwin32/pager.c:89
+#: src/gnuwin32/pager.c:88
 msgid "Error opening file"
 msgstr "Feil ved opning av fil"
 
-#: src/gnuwin32/pager.c:96
+#: src/gnuwin32/pager.c:95
 msgid "Insufficient memory to display file in internal pager"
 msgstr "Ikkje nok minne til å visa fila i intern filvisar"
 
-#: src/gnuwin32/pager.c:177 src/gnuwin32/pager.c:189 src/gnuwin32/pager.c:209
+#: src/gnuwin32/pager.c:176 src/gnuwin32/pager.c:188 src/gnuwin32/pager.c:208
 #: src/gnuwin32/rui.c:237 src/gnuwin32/rui.c:264
 msgid "No selection"
 msgstr "Inkje utval"
 
-#: src/gnuwin32/pager.c:306 src/gnuwin32/pager.c:436 src/gnuwin32/pager.c:480
+#: src/gnuwin32/pager.c:305 src/gnuwin32/pager.c:435 src/gnuwin32/pager.c:479
 msgid "Paste to console"
 msgstr "Lim inn i konsoll"
 
-#: src/gnuwin32/pager.c:307 src/gnuwin32/pager.c:441 src/gnuwin32/pager.c:482
+#: src/gnuwin32/pager.c:306 src/gnuwin32/pager.c:440 src/gnuwin32/pager.c:481
 msgid "Paste commands to console"
 msgstr "Lim inn kommandoar i konsollen"
 
-#: src/gnuwin32/pager.c:310 src/gnuwin32/rui.c:869
-#: src/library/utils/src/windows/dataentry.c:1703
-#: src/library/grDevices/src/devWindows.c:1686
+#: src/gnuwin32/pager.c:309 src/gnuwin32/rui.c:869
+#: src/library/utils/src/windows/dataentry.c:1704
+#: src/library/grDevices/src/devWindows.c:1705
 msgid "Stay on top"
 msgstr "Hald øvst"
 
-#: src/gnuwin32/pager.c:312 src/gnuwin32/pager.c:475
-#: src/library/utils/src/windows/dataentry.c:1705
-#: src/library/utils/src/windows/dataentry.c:1792
+#: src/gnuwin32/pager.c:311 src/gnuwin32/pager.c:474
+#: src/library/utils/src/windows/dataentry.c:1706
+#: src/library/utils/src/windows/dataentry.c:1793
 msgid "Close"
 msgstr "Lukk"
 
-#: src/gnuwin32/pager.c:472 src/gnuwin32/rui.c:1139
+#: src/gnuwin32/pager.c:471 src/gnuwin32/rui.c:1139
 msgid "Save to File..."
 msgstr "Lagra til fil …"
 
-#: src/gnuwin32/pager.c:487 src/gnuwin32/rui.c:1156
+#: src/gnuwin32/pager.c:486 src/gnuwin32/rui.c:1156
 msgid "View"
 msgstr "Vis"
 
-#: src/gnuwin32/pager.c:519
+#: src/gnuwin32/pager.c:518
 msgid "Unable to create pager window"
 msgstr "Klarte ikkje laga nytt lesevindauge"
 
@@ -615,7 +616,8 @@ msgid "Update packages..."
 msgstr "Oppdater pakkar …"
 
 #: src/gnuwin32/rui.c:920
-msgid "Install package(s) from local zip files..."
+#, fuzzy
+msgid "Install package(s) from local files..."
 msgstr "Installer pakkar frå lokale ZIP-filer …"
 
 #: src/gnuwin32/rui.c:944
@@ -782,52 +784,52 @@ msgstr "Vis &søkjestig"
 msgid "Console"
 msgstr "Konsoll"
 
-#: src/gnuwin32/rui.c:1268
+#: src/gnuwin32/rui.c:1251
 msgid "'mname' is limited to 1000 bytes"
 msgstr "«mname» er avgrensa til 1000 byte"
 
-#: src/gnuwin32/rui.c:1310
+#: src/gnuwin32/rui.c:1293
 #, c-format
 msgid "menu %s does not exist"
 msgstr "menyen %s finst ikkje"
 
-#: src/gnuwin32/rui.c:1363
+#: src/gnuwin32/rui.c:1346
 msgid "'menu' is limited to 500 bytes"
 msgstr "«menu» er avgrensa til 500 byte"
 
-#: src/gnuwin32/rui.c:1373
+#: src/gnuwin32/rui.c:1356
 msgid "base menu does not exist"
 msgstr "grunnmenyen finst ikkje"
 
-#: src/gnuwin32/rui.c:1388
+#: src/gnuwin32/rui.c:1371
 msgid "failed to allocate menu"
 msgstr "klarte ikkje laga meny"
 
-#: src/gnuwin32/rui.c:1405 src/gnuwin32/rui.c:1529
+#: src/gnuwin32/rui.c:1388 src/gnuwin32/rui.c:1512
 msgid "menu + item is limited to 1000 bytes"
 msgstr "meny + element er avgrensa til 1000 byte"
 
-#: src/gnuwin32/rui.c:1413 src/gnuwin32/rui.c:1496
+#: src/gnuwin32/rui.c:1396 src/gnuwin32/rui.c:1479
 msgid "menu does not exist"
 msgstr "menyen finst ikkje"
 
-#: src/gnuwin32/rui.c:1431 src/gnuwin32/rui.c:1454 src/gnuwin32/rui.c:1459
+#: src/gnuwin32/rui.c:1414 src/gnuwin32/rui.c:1437 src/gnuwin32/rui.c:1442
 msgid "failed to allocate char storage"
 msgstr "klarte ikkje resevera teiknlager"
 
-#: src/gnuwin32/rui.c:1467
+#: src/gnuwin32/rui.c:1450
 msgid "failed to allocate menuitem"
 msgstr "klarte ikkje reservera menyelement"
 
-#: src/gnuwin32/rui.c:1519
+#: src/gnuwin32/rui.c:1502
 msgid "menu not found"
 msgstr "fann ikkje menyen"
 
-#: src/gnuwin32/rui.c:1537
+#: src/gnuwin32/rui.c:1520
 msgid "menu or item does not exist"
 msgstr "menyen eller elementet finst ikkje"
 
-#: src/gnuwin32/system.c:442
+#: src/gnuwin32/system.c:446
 msgid "Save workspace image?"
 msgstr "Vil du lagra arbeidsområdet?"
 
@@ -835,41 +837,41 @@ msgstr "Vil du lagra arbeidsområdet?"
 msgid "Insufficient memory: cell not copied to the clipboard"
 msgstr "Ikkje nok minne: cella vart ikkje kopiert til utklippstavla"
 
-#: src/extra/graphapp/dialogs.c:147 src/extra/graphapp/dialogs.c:164
-#: src/extra/graphapp/dialogs.c:181
+#: src/extra/graphapp/dialogs.c:148 src/extra/graphapp/dialogs.c:165
+#: src/extra/graphapp/dialogs.c:182
 msgid "Question"
 msgstr "Spørsmål"
 
-#: src/extra/graphapp/dialogs.c:202
+#: src/extra/graphapp/dialogs.c:203
 msgid " Change working directory to:"
 msgstr " Byt arbeidsmappa til:"
 
-#: src/extra/graphapp/dialogs.c:205
+#: src/extra/graphapp/dialogs.c:206
 #, c-format
 msgid "Unable to set '%s' as working directory"
 msgstr "Klarte ikkje velja «%s» som arbeidsmappe"
 
-#: src/extra/graphapp/dialogs.c:602 src/extra/graphapp/dialogs.c:620
-#: src/extra/graphapp/dialogs.c:626 src/extra/graphapp/dialogs.c:725
-#: src/extra/graphapp/dialogs.c:739 src/extra/graphapp/dialogs.c:745
+#: src/extra/graphapp/dialogs.c:604 src/extra/graphapp/dialogs.c:622
+#: src/extra/graphapp/dialogs.c:628 src/extra/graphapp/dialogs.c:727
+#: src/extra/graphapp/dialogs.c:741 src/extra/graphapp/dialogs.c:747
 #: src/library/utils/src/windows/widgets.c:125
 msgid "Cancel"
 msgstr "Avbryt"
 
-#: src/extra/graphapp/dialogs.c:622 src/extra/graphapp/dialogs.c:741
+#: src/extra/graphapp/dialogs.c:624 src/extra/graphapp/dialogs.c:743
 #: src/library/utils/src/windows/widgets.c:124
 msgid "OK"
 msgstr "OK"
 
-#: src/extra/graphapp/dialogs.c:733
+#: src/extra/graphapp/dialogs.c:735
 msgid "User"
 msgstr "Brukar"
 
-#: src/extra/graphapp/dialogs.c:734
+#: src/extra/graphapp/dialogs.c:736
 msgid "Password"
 msgstr "Passord"
 
-#: src/extra/graphapp/dialogs.c:900 src/extra/graphapp/dialogs.c:906
+#: src/extra/graphapp/dialogs.c:902 src/extra/graphapp/dialogs.c:908
 #, c-format
 msgid "\"%s\" not found"
 msgstr "Fann ikkje «%s»"
@@ -879,9 +881,9 @@ msgid "Arrange Icons"
 msgstr "Ordna ikona"
 
 #: src/library/utils/src/windows/dataentry.c:223
-#: src/library/utils/src/windows/dataentry.c:1850
-#: src/library/utils/src/windows/dataentry.c:1853
-#: src/library/utils/src/windows/dataentry.c:1884
+#: src/library/utils/src/windows/dataentry.c:1851
+#: src/library/utils/src/windows/dataentry.c:1854
+#: src/library/utils/src/windows/dataentry.c:1885
 msgid "invalid argument"
 msgstr "ugyldig argument"
 
@@ -893,17 +895,12 @@ msgstr "ugyldige type for verdien"
 msgid "Data Editor"
 msgstr "Dataredigering"
 
-#: src/library/utils/src/windows/dataentry.c:282
-#: src/library/utils/src/windows/dataentry.c:1891
-msgid "invalid device"
-msgstr "ugyldig eining"
-
 #: src/library/utils/src/windows/dataentry.c:331
 msgid "dataentry: internal memory problem"
 msgstr "inndata: internt minneproblem"
 
 #: src/library/utils/src/windows/dataentry.c:634
-#: src/library/utils/src/windows/dataentry.c:1221
+#: src/library/utils/src/windows/dataentry.c:1222
 msgid "dataentry: internal memory error"
 msgstr "inndata: intern minnefeil"
 
@@ -912,43 +909,43 @@ msgstr "inndata: intern minnefeil"
 msgid "internal type error in dataentry"
 msgstr "intern typefeil i inndata"
 
-#: src/library/utils/src/windows/dataentry.c:852
+#: src/library/utils/src/windows/dataentry.c:853
 msgid "dataentry: parse error on string"
 msgstr "inndata: klarte ikkje tolka tekststrengen"
 
-#: src/library/utils/src/windows/dataentry.c:995
+#: src/library/utils/src/windows/dataentry.c:996
 msgid "dataentry: expression too long"
 msgstr "inndata: uttrykket er for langt"
 
-#: src/library/utils/src/windows/dataentry.c:1472
+#: src/library/utils/src/windows/dataentry.c:1473
 msgid "column names cannot be blank"
 msgstr "kolonnenamna kan ikkje vera tomme"
 
-#: src/library/utils/src/windows/dataentry.c:1518
+#: src/library/utils/src/windows/dataentry.c:1519
 msgid "Variable editor"
 msgstr "Variabelredigering"
 
-#: src/library/utils/src/windows/dataentry.c:1523
+#: src/library/utils/src/windows/dataentry.c:1524
 msgid "variable name"
 msgstr "variabelnamn"
 
-#: src/library/utils/src/windows/dataentry.c:1525
+#: src/library/utils/src/windows/dataentry.c:1526
 msgid "type"
 msgstr "type"
 
-#: src/library/utils/src/windows/dataentry.c:1639
+#: src/library/utils/src/windows/dataentry.c:1640
 msgid "Cell width(s)"
 msgstr "Cellebreidd(er)"
 
-#: src/library/utils/src/windows/dataentry.c:1645
+#: src/library/utils/src/windows/dataentry.c:1646
 msgid "Cell width"
 msgstr "Cellebreidd"
 
-#: src/library/utils/src/windows/dataentry.c:1648
+#: src/library/utils/src/windows/dataentry.c:1649
 msgid "variable"
 msgstr "variabel"
 
-#: src/library/utils/src/windows/dataentry.c:1691
+#: src/library/utils/src/windows/dataentry.c:1692
 msgid ""
 "Navigation.\n"
 "  Keyboard: cursor keys move selection\n"
@@ -991,221 +988,223 @@ msgstr ""
 "  Høgreklikk for å få ein meny for kopiering, innliming og kolonnebreidd\n"
 "\n"
 
-#: src/library/utils/src/windows/dataentry.c:1699
+#: src/library/utils/src/windows/dataentry.c:1700
 msgid "Copy selected cell"
 msgstr "Kopier merkt celle"
 
-#: src/library/utils/src/windows/dataentry.c:1700
+#: src/library/utils/src/windows/dataentry.c:1701
 msgid "Paste to selected cell"
 msgstr "Lim inn i den valde cella"
 
-#: src/library/utils/src/windows/dataentry.c:1701
+#: src/library/utils/src/windows/dataentry.c:1702
 msgid "Autosize column"
 msgstr "Automatisk kolonnebreidd"
 
-#: src/library/utils/src/windows/dataentry.c:1797
+#: src/library/utils/src/windows/dataentry.c:1798
 msgid "Copy  \tCTRL+C"
 msgstr "Kopier  \tCTRL+C"
 
-#: src/library/utils/src/windows/dataentry.c:1799
+#: src/library/utils/src/windows/dataentry.c:1800
 msgid "Paste \tCTRL+V"
 msgstr "Lim inn \tCTRL+V"
 
-#: src/library/utils/src/windows/dataentry.c:1801
+#: src/library/utils/src/windows/dataentry.c:1802
 msgid "Delete\tDEL"
 msgstr "Søett\tDEL"
 
-#: src/library/utils/src/windows/dataentry.c:1804
+#: src/library/utils/src/windows/dataentry.c:1805
 msgid "Cell widths ..."
 msgstr "Cellebreidder …"
 
-#: src/library/utils/src/windows/dataentry.c:1808
+#: src/library/utils/src/windows/dataentry.c:1809
 msgid "Data editor"
 msgstr "Dataredigering"
 
-#: src/library/grDevices/src/devWindows.c:932
+#: src/library/grDevices/src/devWindows.c:949
 msgid "Portable network graphics file"
 msgstr "Portabel nettverksgrafikk-fil"
 
-#: src/library/grDevices/src/devWindows.c:935
+#: src/library/grDevices/src/devWindows.c:952
 msgid "Windows bitmap file"
 msgstr "Windows-punktbiletfil"
 
-#: src/library/grDevices/src/devWindows.c:938
+#: src/library/grDevices/src/devWindows.c:955
 msgid "TIFF file"
 msgstr "TIFF-fil"
 
-#: src/library/grDevices/src/devWindows.c:941
+#: src/library/grDevices/src/devWindows.c:958
 msgid "Jpeg file"
 msgstr "JPEG-fil"
 
-#: src/library/grDevices/src/devWindows.c:963
+#: src/library/grDevices/src/devWindows.c:980
 msgid "Postscript file"
 msgstr "PostScript-fil"
 
-#: src/library/grDevices/src/devWindows.c:975
+#: src/library/grDevices/src/devWindows.c:992
 msgid "PDF file"
 msgstr "PDF-fil"
 
-#: src/library/grDevices/src/devWindows.c:987
+#: src/library/grDevices/src/devWindows.c:1004
 msgid "Enhanced metafiles"
 msgstr "Enhanced metafile"
 
-#: src/library/grDevices/src/devWindows.c:990
-#: src/library/grDevices/src/devWindows.c:3436
+#: src/library/grDevices/src/devWindows.c:1007
+#: src/library/grDevices/src/devWindows.c:3445
 msgid "file path selected is too long: only 512 bytes are allowed"
 msgstr "for lang filadresse: maksgrensa er på 512 byte"
 
-#: src/library/grDevices/src/devWindows.c:1201
+#: src/library/grDevices/src/devWindows.c:1218
 msgid "No plot to replace!"
 msgstr "Manglar plott å byta ut"
 
-#: src/library/grDevices/src/devWindows.c:1249
+#: src/library/grDevices/src/devWindows.c:1268
 msgid "Variable name"
 msgstr "Variabelnamn"
 
-#: src/library/grDevices/src/devWindows.c:1258
+#: src/library/grDevices/src/devWindows.c:1277
 #, fuzzy
 msgid "Variable doesn't contain any plots!"
 msgstr "Variabelen finst ikkje, eller inneheld ikkje plott"
 
-#: src/library/grDevices/src/devWindows.c:1273
+#: src/library/grDevices/src/devWindows.c:1292
 msgid "Name of variable to save to"
 msgstr "Namn på variabelen å lagra til"
 
-#: src/library/grDevices/src/devWindows.c:1582
+#: src/library/grDevices/src/devWindows.c:1601
 msgid "Copy to the clipboard as a metafile"
 msgstr "Kopier to utklippstavla som metafil"
 
-#: src/library/grDevices/src/devWindows.c:1600
-#: src/library/grDevices/src/devWindows.c:1611
+#: src/library/grDevices/src/devWindows.c:1619
+#: src/library/grDevices/src/devWindows.c:1630
 msgid "Stop locator"
 msgstr "Stopp posisjonslesar"
 
-#: src/library/grDevices/src/devWindows.c:1610
-#: src/library/grDevices/src/devWindows.c:1614
+#: src/library/grDevices/src/devWindows.c:1629
+#: src/library/grDevices/src/devWindows.c:1633
 msgid "Stop"
 msgstr "Stopp"
 
-#: src/library/grDevices/src/devWindows.c:1616
+#: src/library/grDevices/src/devWindows.c:1635
 msgid "Continue"
 msgstr "Hald fram"
 
-#: src/library/grDevices/src/devWindows.c:1620
+#: src/library/grDevices/src/devWindows.c:1639
 msgid "Next"
 msgstr "Neste"
 
-#: src/library/grDevices/src/devWindows.c:1621
+#: src/library/grDevices/src/devWindows.c:1640
 msgid "Next plot"
 msgstr "Neste plott"
 
-#: src/library/grDevices/src/devWindows.c:1627
+#: src/library/grDevices/src/devWindows.c:1646
 msgid "Save as"
 msgstr "Lagra som"
 
-#: src/library/grDevices/src/devWindows.c:1636
-#: src/library/grDevices/src/devWindows.c:1638
-#: src/library/grDevices/src/devWindows.c:1640
+#: src/library/grDevices/src/devWindows.c:1655
+#: src/library/grDevices/src/devWindows.c:1657
+#: src/library/grDevices/src/devWindows.c:1659
 #, c-format
 msgid "%s quality..."
 msgstr "%s-kvalitet …"
 
-#: src/library/grDevices/src/devWindows.c:1642
+#: src/library/grDevices/src/devWindows.c:1661
 msgid "Copy to the clipboard"
 msgstr "Kopier til utklippstavla"
 
-#: src/library/grDevices/src/devWindows.c:1643
+#: src/library/grDevices/src/devWindows.c:1662
 msgid "as a Bitmap\tCTRL+C"
 msgstr "som punktbilete\tCTRL+C"
 
-#: src/library/grDevices/src/devWindows.c:1644
+#: src/library/grDevices/src/devWindows.c:1663
 msgid "as a Metafile\tCTRL+W"
 msgstr "Som metafil\tCTRL+w"
 
-#: src/library/grDevices/src/devWindows.c:1647
-msgid "Print...\tCTRL+P"
-msgstr "Skriv ut …\tCTRL+P"
-
-#: src/library/grDevices/src/devWindows.c:1649
+#: src/library/grDevices/src/devWindows.c:1668
 msgid "close Device"
 msgstr "lukk eining"
 
-#: src/library/grDevices/src/devWindows.c:1650
+#: src/library/grDevices/src/devWindows.c:1669
 msgid "History"
 msgstr "Logg"
 
-#: src/library/grDevices/src/devWindows.c:1651
+#: src/library/grDevices/src/devWindows.c:1670
 msgid "Recording"
 msgstr "Opptak"
 
-#: src/library/grDevices/src/devWindows.c:1654
+#: src/library/grDevices/src/devWindows.c:1673
 msgid "Add\tINS"
 msgstr "Legg til\tINS"
 
-#: src/library/grDevices/src/devWindows.c:1655
+#: src/library/grDevices/src/devWindows.c:1674
 msgid "Replace"
 msgstr "Byt ut"
 
-#: src/library/grDevices/src/devWindows.c:1657
+#: src/library/grDevices/src/devWindows.c:1676
 msgid "Previous\tPgUp"
 msgstr "Førre\tPgUp"
 
-#: src/library/grDevices/src/devWindows.c:1658
+#: src/library/grDevices/src/devWindows.c:1677
 msgid "Next\tPgDown"
 msgstr "Neste\tPgDown"
 
-#: src/library/grDevices/src/devWindows.c:1660
+#: src/library/grDevices/src/devWindows.c:1679
 msgid "Save to variable..."
 msgstr "Lagra til variabel …"
 
-#: src/library/grDevices/src/devWindows.c:1661
+#: src/library/grDevices/src/devWindows.c:1680
 msgid "Get from variable..."
 msgstr "Hent frå variabel …"
 
-#: src/library/grDevices/src/devWindows.c:1663
+#: src/library/grDevices/src/devWindows.c:1682
 msgid "Clear history"
 msgstr "Tøm loggen"
 
-#: src/library/grDevices/src/devWindows.c:1664
+#: src/library/grDevices/src/devWindows.c:1683
 msgid "Resize"
 msgstr "Endra storleik"
 
-#: src/library/grDevices/src/devWindows.c:1665
+#: src/library/grDevices/src/devWindows.c:1684
 msgid "R mode"
 msgstr "R-modus"
 
-#: src/library/grDevices/src/devWindows.c:1667
+#: src/library/grDevices/src/devWindows.c:1686
 msgid "Fit to window"
 msgstr "Tilpassa til vindauget"
 
-#: src/library/grDevices/src/devWindows.c:1669
+#: src/library/grDevices/src/devWindows.c:1688
 msgid "Fixed size"
 msgstr "Fast storleik"
 
-#: src/library/grDevices/src/devWindows.c:1676
+#: src/library/grDevices/src/devWindows.c:1695
 msgid "Copy as metafile"
 msgstr "Kopier som metafil"
 
-#: src/library/grDevices/src/devWindows.c:1678
+#: src/library/grDevices/src/devWindows.c:1697
 msgid "Copy as bitmap"
 msgstr "Kopier som punktbilet"
 
-#: src/library/grDevices/src/devWindows.c:1681
+#: src/library/grDevices/src/devWindows.c:1700
 msgid "Save as metafile..."
 msgstr "Lagra som metafil …"
 
-#: src/library/grDevices/src/devWindows.c:1683
+#: src/library/grDevices/src/devWindows.c:1702
 msgid "Save as postscript..."
 msgstr "Lagra som PostScript …"
 
-#: src/library/grDevices/src/devWindows.c:3136
+#: src/library/grDevices/src/devWindows.c:3143
 msgid "Locator is active"
 msgstr "Posisjonslesar køyrer"
 
-#: src/library/grDevices/src/devWindows.c:3763
+#: src/library/grDevices/src/devWindows.c:3769
 msgid "Waiting to confirm page change..."
 msgstr "Ventar på stadfesting av sideskifte …"
 
-#: src/library/grDevices/src/devWindows.c:3775
+#: src/library/grDevices/src/devWindows.c:3781
 msgid "Click or hit ENTER for next page"
 msgstr "Klikk eller trykk «Enter» for neste side"
+
+#~ msgid "Print...\tCTRL+P"
+#~ msgstr "Skriv ut …\tCTRL+P"
+
+#~ msgid "invalid device"
+#~ msgstr "ugyldig eining"
diff --git a/src/library/base/po/RGui-pl.po b/src/library/base/po/RGui-pl.po
index a5685fa..16b30e6 100644
--- a/src/library/base/po/RGui-pl.po
+++ b/src/library/base/po/RGui-pl.po
@@ -1,8 +1,8 @@
 msgid ""
 msgstr ""
-"Project-Id-Version: R 3.1.0\n"
+"Project-Id-Version: R 3.4.0\n"
 "Report-Msgid-Bugs-To: bugs.r-project.org\n"
-"POT-Creation-Date: 2013-08-23 11:17+0200\n"
+"POT-Creation-Date: 2016-04-01 10:28-0700\n"
 "PO-Revision-Date: \n"
 "Last-Translator: Łukasz Daniel <lukasz.daniel at gmail.com>\n"
 "Language-Team: Łukasz Daniel <lukasz.daniel at gmail.com>\n"
@@ -11,16 +11,15 @@ msgstr ""
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
 "na-Revision-Date: 2012-05-29 07:55+0100\n"
-"Plural-Forms: nplurals=3; plural=(n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 "
-"|| n%100>=20) ? 1 : 2);\n"
-"X-Poedit-SourceCharset: iso-8859-1\n"
-"X-Generator: Poedit 1.6.4\n"
+"Plural-Forms: nplurals=3; plural=(n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
+"X-Poedit-SourceCharset: UTF-8\n"
+"X-Generator: Poedit 1.8.4\n"
 
 # src/gnuwin32/console.c: 1167
 # G_("Not enough memory")
 # src/gnuwin32/console.c: 1209
 # G_("Not enough memory")
-#: src/gnuwin32/console.c:1174 src/gnuwin32/console.c:1216
+#: src/gnuwin32/console.c:1167 src/gnuwin32/console.c:1209
 msgid "Not enough memory"
 msgstr "Zbyt mało pamięci"
 
@@ -28,7 +27,7 @@ msgstr "Zbyt mało pamięci"
 # G_("Insufficient memory: text not copied to the clipboard")
 # src/gnuwin32/console.c: 1260
 # G_("Insufficient memory: text not copied to the clipboard")
-#: src/gnuwin32/console.c:1263 src/gnuwin32/console.c:1267
+#: src/gnuwin32/console.c:1256 src/gnuwin32/console.c:1260
 msgid "Insufficient memory: text not copied to the clipboard"
 msgstr "Brak wystarczającej pamięci: tekst nie został skopiowany do schowka"
 
@@ -38,14 +37,13 @@ msgstr "Brak wystarczającej pamięci: tekst nie został skopiowany do schowka"
 # G_("Unable to open the clipboard")
 # src/gnuwin32/console.c: 1296
 # G_("Unable to open the clipboard")
-#: src/gnuwin32/console.c:1303 src/extra/graphapp/clipboard.c:53
-#: src/extra/graphapp/clipboard.c:79
+#: src/gnuwin32/console.c:1296 src/extra/graphapp/clipboard.c:53 src/extra/graphapp/clipboard.c:79
 msgid "Unable to open the clipboard"
 msgstr "Nie można otworzyć schowka"
 
 # src/gnuwin32/console.c: 1914
 # G_("Insufficient memory. Please close the console")
-#: src/gnuwin32/console.c:1921
+#: src/gnuwin32/console.c:1919
 msgid "Insufficient memory. Please close the console"
 msgstr "Brak wystarczającej pamięci. Proszę zamknąć konsolę"
 
@@ -59,8 +57,7 @@ msgstr "Brak wystarczającej pamięci. Proszę zamknąć konsolę"
 # sprintf(msg,
 # 		    G_("Font %s-%d-%d  not found.\nUsing system fixed font"),
 # 		    fontname, fontsty | FixedWidth, pointsize)
-#: src/gnuwin32/console.c:1976 src/gnuwin32/console.c:2030
-#: src/gnuwin32/preferences.c:333
+#: src/gnuwin32/console.c:1974 src/gnuwin32/console.c:2028 src/gnuwin32/preferences.c:333
 #, c-format
 msgid ""
 "Font %s-%d-%d  not found.\n"
@@ -71,27 +68,27 @@ msgstr ""
 
 # src/gnuwin32/console.c: 2127
 # G_("Save selection to")
-#: src/gnuwin32/console.c:2135
+#: src/gnuwin32/console.c:2133
 msgid "Save selection to"
 msgstr "Zapisz wybór do"
 
 # src/gnuwin32/console.c: 2129
 # G_("Save console contents to")
-#: src/gnuwin32/console.c:2137
+#: src/gnuwin32/console.c:2135
 msgid "Save console contents to"
 msgstr "Zapisz zawartość konsoli w"
 
-#: src/gnuwin32/console.c:2236
+#: src/gnuwin32/console.c:2234
 msgid "Scrolling.\n"
 msgstr "Przewijanie.\n"
 
-#: src/gnuwin32/console.c:2237
+#: src/gnuwin32/console.c:2235
 msgid "  Keyboard: PgUp, PgDown, Ctrl+Arrows, Ctrl+Home, Ctrl+End,\n"
 msgstr "  Klawiatura: PgUp, PgDown, Ctrl+Strzałki, Ctrl+Home, Ctrl+End,\n"
 
 # src/gnuwin32/console.c: 2230
 # G_("  Mouse: use the scrollbar(s).\n\n")
-#: src/gnuwin32/console.c:2238
+#: src/gnuwin32/console.c:2236
 msgid ""
 "  Mouse: use the scrollbar(s).\n"
 "\n"
@@ -99,105 +96,93 @@ msgstr ""
 "  Myszka: użyj pasków przewijania.\n"
 "\n"
 
-#: src/gnuwin32/console.c:2239
+#: src/gnuwin32/console.c:2237
 msgid "Editing.\n"
 msgstr "Edytowanie.\n"
 
-#: src/gnuwin32/console.c:2240
+#: src/gnuwin32/console.c:2238
 msgid "  Moving the cursor: \n"
 msgstr "  Przesuwanie kursora: \n"
 
-#: src/gnuwin32/console.c:2241
+#: src/gnuwin32/console.c:2239
 msgid "     Left arrow or Ctrl+B: move backward one character;\n"
 msgstr "     Lewa strzałka lub Ctrl+B: przesuń wstecz o jeden znak;\n"
 
-#: src/gnuwin32/console.c:2242
+#: src/gnuwin32/console.c:2240
 msgid "     Right arrow or Ctrl+F: move forward one character;\n"
 msgstr "     Prawa strzałka lub Ctrl+F: przesuń do przodu o jeden znak;\n"
 
-#: src/gnuwin32/console.c:2243
+#: src/gnuwin32/console.c:2241
 msgid "     Home or Ctrl+A: go to beginning of line;\n"
 msgstr "     Home lub Ctrl+A: idź do początku linii;\n"
 
-#: src/gnuwin32/console.c:2244
+#: src/gnuwin32/console.c:2242
 msgid "     End or Ctrl+E: go to end of line;\n"
 msgstr "     End lub Ctrl+E: idź do końca linii;\n"
 
-#: src/gnuwin32/console.c:2245
+#: src/gnuwin32/console.c:2243
 msgid "  History: Up and Down Arrows, Ctrl+P, Ctrl+N\n"
 msgstr "  Historia: Strzałki Up oraz Down, Ctrl+P, Ctrl+N\n"
 
-#: src/gnuwin32/console.c:2246
+#: src/gnuwin32/console.c:2244
 msgid "  Deleting:\n"
 msgstr "Kasowanie:\n"
 
-#: src/gnuwin32/console.c:2247
+#: src/gnuwin32/console.c:2245
 msgid "     Del or Ctrl+D: delete current character or selection;\n"
 msgstr "     Del lub Ctrl+D: usuń bieżący znak lub zaznaczenie;\n"
 
-#: src/gnuwin32/console.c:2248
+#: src/gnuwin32/console.c:2246
 msgid "     Backspace: delete preceding character;\n"
 msgstr "     Backspace: usuń poprzedni znak;\n"
 
-#: src/gnuwin32/console.c:2249
-msgid ""
-"     Ctrl+Del or Ctrl+K: delete text from current character to end of line.\n"
-msgstr ""
-"     Ctrl+Del lub Ctrl+K: usuń tekst od bieżącego znaku do końca linii.\n"
+#: src/gnuwin32/console.c:2247
+msgid "     Ctrl+Del or Ctrl+K: delete text from current character to end of line.\n"
+msgstr "     Ctrl+Del lub Ctrl+K: usuń tekst od bieżącego znaku do końca linii.\n"
 
-#: src/gnuwin32/console.c:2250
+#: src/gnuwin32/console.c:2248
 msgid "     Ctrl+U: delete all text from current line.\n"
 msgstr "     Ctrl+U: usuń cały tekst z bieżącej linii.\n"
 
-#: src/gnuwin32/console.c:2251
+#: src/gnuwin32/console.c:2249
 msgid "  Copy and paste.\n"
 msgstr "Kopiuj i wklej.\n"
 
-#: src/gnuwin32/console.c:2252
-msgid ""
-"     Use the mouse (with the left button held down) to mark (select) text.\n"
-msgstr ""
-"     Użyj myszki (z naciśniętym lewym przyciskiem myszki) by zaznaczyć "
-"(wybrać) tekst.\n"
+#: src/gnuwin32/console.c:2250
+msgid "     Use the mouse (with the left button held down) to mark (select) text.\n"
+msgstr "     Użyj myszki (z naciśniętym lewym przyciskiem myszki) by zaznaczyć (wybrać) tekst.\n"
 
-#: src/gnuwin32/console.c:2253
-msgid ""
-"     Use Shift+Del (or Ctrl+C) to copy the marked text to the clipboard and\n"
-msgstr ""
-"     Użyj Shift+Del (lub Ctrl+C) by skopiować zaznaczony tekst do schowka i\n"
+#: src/gnuwin32/console.c:2251
+msgid "     Use Shift+Del (or Ctrl+C) to copy the marked text to the clipboard and\n"
+msgstr "     Użyj Shift+Del (lub Ctrl+C) by skopiować zaznaczony tekst do schowka i\n"
 
-#: src/gnuwin32/console.c:2254
-msgid ""
-"     Shift+Ins (or Ctrl+V or Ctrl+Y) to paste the content of the clipboard "
-"(if any)  \n"
-msgstr ""
-"     Shift+Ins (lub Ctrl+V lub Ctrl+Y) by wkleić zawartość schowka (jeśli "
-"jakaś jest)  \n"
+#: src/gnuwin32/console.c:2252
+msgid "     Shift+Ins (or Ctrl+V or Ctrl+Y) to paste the content of the clipboard (if any)  \n"
+msgstr "     Shift+Ins (lub Ctrl+V lub Ctrl+Y) by wkleić zawartość schowka (jeśli jakaś jest)  \n"
 
-#: src/gnuwin32/console.c:2255
+#: src/gnuwin32/console.c:2253
 msgid "     to the console, Ctrl+X first copy then paste\n"
 msgstr "     do konsoli, Ctrl+X najpierw kopiuje potem wkleja\n"
 
-#: src/gnuwin32/console.c:2256
+#: src/gnuwin32/console.c:2254
 msgid "  Misc:\n"
 msgstr " Różne:\n"
 
-#: src/gnuwin32/console.c:2257
+#: src/gnuwin32/console.c:2255
 msgid "     Ctrl+L: Clear the console.\n"
 msgstr "     Ctrl+L: Wyczyść konsolę.\n"
 
-#: src/gnuwin32/console.c:2258
+#: src/gnuwin32/console.c:2256
 msgid "     Ctrl+O or INS: Toggle overwrite mode: initially off.\n"
-msgstr ""
-"     Ctrl+O lub INS: Przełącz tryb nadpisywania: początkowo wyłączony.\n"
+msgstr "     Ctrl+O lub INS: Przełącz tryb nadpisywania: początkowo wyłączony.\n"
 
-#: src/gnuwin32/console.c:2259
+#: src/gnuwin32/console.c:2257
 msgid "     Ctrl+T: Interchange current char with one to the left.\n"
 msgstr "     Ctrl+T: Zamień bieżący znak z tym po lewej.\n"
 
 # src/gnuwin32/console.c: 2252
 # G_("\nNote: Console is updated only when some input is required.\n")
-#: src/gnuwin32/console.c:2260
+#: src/gnuwin32/console.c:2258
 msgid ""
 "\n"
 "Note: Console is updated only when some input is required.\n"
@@ -207,7 +192,7 @@ msgstr ""
 
 # src/gnuwin32/console.c: 2253
 # G_("  Use Ctrl+W to toggle this feature off/on.\n\n")
-#: src/gnuwin32/console.c:2261
+#: src/gnuwin32/console.c:2259
 msgid ""
 "  Use Ctrl+W to toggle this feature off/on.\n"
 "\n"
@@ -217,7 +202,7 @@ msgstr ""
 
 # src/gnuwin32/console.c: 2254
 # G_("Use ESC to stop the interpreter.\n\n")
-#: src/gnuwin32/console.c:2262
+#: src/gnuwin32/console.c:2260
 msgid ""
 "Use ESC to stop the interpreter.\n"
 "\n"
@@ -227,7 +212,7 @@ msgstr ""
 
 # src/gnuwin32/console.c: 2255
 # G_("TAB starts completion of the current word.\n\n")
-#: src/gnuwin32/console.c:2263
+#: src/gnuwin32/console.c:2261
 msgid ""
 "TAB starts completion of the current word.\n"
 "\n"
@@ -235,13 +220,13 @@ msgstr ""
 "TAB uzupełnia bieżące słowo.\n"
 "\n"
 
-#: src/gnuwin32/console.c:2264
+#: src/gnuwin32/console.c:2262
 msgid "Standard Windows hotkeys can be used to switch to the\n"
 msgstr "Standardowe klawisze skrótu mogą być użyte by przełączyć się do\n"
 
 # src/gnuwin32/console.c: 2257
 # G_("graphics device (Ctrl+Tab or Ctrl+F6 in MDI, Alt+Tab in SDI)")
-#: src/gnuwin32/console.c:2265
+#: src/gnuwin32/console.c:2263
 msgid "graphics device (Ctrl+Tab or Ctrl+F6 in MDI, Alt+Tab in SDI)"
 msgstr "urządzenia graficznego (Ctrl+Tab lub Ctrl+F6 w MDI, Alt+Tab w SDI)"
 
@@ -249,34 +234,34 @@ msgstr "urządzenia graficznego (Ctrl+Tab lub Ctrl+F6 w MDI, Alt+Tab w SDI)"
 # G_("R Editor")
 # src/gnuwin32/editor.c: 90
 # G_("R Editor")
-#: src/gnuwin32/editor.c:97 src/gnuwin32/editor.c:99
+#: src/gnuwin32/editor.c:91 src/gnuwin32/editor.c:93
 msgid "R Editor"
 msgstr "Edytor R"
 
 # src/gnuwin32/editor.c: 119
 # G_("unable to open file %s for reading")
-#: src/gnuwin32/editor.c:129
+#: src/gnuwin32/editor.c:123
 #, c-format
 msgid "unable to open file %s for reading"
 msgstr "nie można otworzyć pliku %s do czytania"
 
 # src/gnuwin32/editor.c: 166
 # G_("Could not save file '%s'")
-#: src/gnuwin32/editor.c:145
+#: src/gnuwin32/editor.c:139
 #, c-format
 msgid "Could not read from file '%s'"
 msgstr "Nie można było zapisać pliku '%s'"
 
 # src/gnuwin32/editor.c: 166
 # G_("Could not save file '%s'")
-#: src/gnuwin32/editor.c:177
+#: src/gnuwin32/editor.c:171
 #, c-format
 msgid "Could not save file '%s'"
 msgstr "Nie można było zapisać pliku '%s'"
 
 # src/gnuwin32/editor.c: 182
 # G_("Save script as")
-#: src/gnuwin32/editor.c:193
+#: src/gnuwin32/editor.c:187
 msgid "Save script as"
 msgstr "Zapisz skrypt jako"
 
@@ -288,8 +273,7 @@ msgstr "Zapisz skrypt jako"
 # G_("Open script")
 # src/gnuwin32/pager.c: 431
 # G_("Open script")
-#: src/gnuwin32/editor.c:385 src/gnuwin32/editor.c:703
-#: src/gnuwin32/pager.c:431 src/gnuwin32/rui.c:1076
+#: src/gnuwin32/editor.c:379 src/gnuwin32/editor.c:696 src/gnuwin32/pager.c:430 src/gnuwin32/rui.c:1076
 msgid "Open script"
 msgstr "Otwórz skrypt"
 
@@ -299,62 +283,59 @@ msgstr "Otwórz skrypt"
 # G_("No RGui console to paste to")
 # src/gnuwin32/pager.c: 205
 # G_("No RGui console to paste to")
-#: src/gnuwin32/editor.c:508 src/gnuwin32/pager.c:185 src/gnuwin32/pager.c:205
+#: src/gnuwin32/editor.c:502 src/gnuwin32/pager.c:184 src/gnuwin32/pager.c:204
 msgid "No RGui console to paste to"
 msgstr "Brak konsoli RGui do której można wkleić"
 
-#: src/gnuwin32/editor.c:610
+#: src/gnuwin32/editor.c:604
 msgid "R EDITOR\n"
 msgstr "EDYTOR R\n"
 
-#: src/gnuwin32/editor.c:612
+#: src/gnuwin32/editor.c:606
 msgid "A standard text editor for editing and running R code.\n"
-msgstr ""
-"Standardowy edytor tekstuA standard text editor for editing and running R "
-"code.\n"
+msgstr "Standardowy edytor tekstuA standard text editor for editing and running R code.\n"
 
-#: src/gnuwin32/editor.c:614
+#: src/gnuwin32/editor.c:608
 msgid "RUNNING COMMANDS\n"
 msgstr "URUCHAMIANIE POLECEŃ\n"
 
-#: src/gnuwin32/editor.c:615
-msgid "To run a line or section of R code, select the code and either:\n"
+#: src/gnuwin32/editor.c:609
+msgid "To run a line or section of R code, select the code and either\n"
 msgstr "Aby uruchomić linijkę lub sekcję kodu R, zaznacz kod i albo:\n"
 
-#: src/gnuwin32/editor.c:616
+#: src/gnuwin32/editor.c:610
 msgid "     Press Ctrl-R\n"
 msgstr "    Naciśnij Ctrl-R\n"
 
-#: src/gnuwin32/editor.c:617
+#: src/gnuwin32/editor.c:611
 msgid "     Select \"Run line or selection\" from the \"Edit\" menu\n"
 msgstr "     Wybierz \"Uruchom linię lub zaznaczenie\" z menu \"Edycja\" \n"
 
-#: src/gnuwin32/editor.c:618
+#: src/gnuwin32/editor.c:612
 msgid "     Press the \"Run line or selection\" icon on the toolbar\n"
-msgstr ""
-"     Naciśnij ikonę \"Uruchom linię lub zaznaczenie\" na pasku narzędzi\n"
+msgstr "     Naciśnij ikonę \"Uruchom linię lub zaznaczenie\" na pasku narzędzi\n"
 
-#: src/gnuwin32/editor.c:619
-msgid ""
-"This will copy the selected commands to the console and evaluate them.\n"
+#: src/gnuwin32/editor.c:613
+msgid "This will copy the selected commands to the console and evaluate them.\n"
 msgstr "To skopiuje zaznaczone polecenia do konsoli oraz przeliczy je.\n"
 
-#: src/gnuwin32/editor.c:622
-msgid ""
-"If there is no selection, this will just run the current line and advance\n"
-"the cursor by one line.\n"
+#: src/gnuwin32/editor.c:614
+msgid "If there is no selection, this will just run the current line and advance\n"
 msgstr ""
 "Jeśli nie ma zaznaczenia, to uruchomi bieżącą linię i przesunie\n"
 "kursor o jedną linię.\n"
 
+#: src/gnuwin32/editor.c:615
+msgid "the cursor by one line.\n"
+msgstr "kursor o jedną linię.\n"
+
 # src/gnuwin32/editor.c: 623
 # GN_("Run line or selection")
 # src/gnuwin32/editor.c: 700
 # G_("Run line or selection")
 # src/gnuwin32/editor.c: 761
 # G_("Run line or selection")
-#: src/gnuwin32/editor.c:634 src/gnuwin32/editor.c:711
-#: src/gnuwin32/editor.c:769
+#: src/gnuwin32/editor.c:627 src/gnuwin32/editor.c:704 src/gnuwin32/editor.c:762
 msgid "Run line or selection"
 msgstr "Uruchom linijkę lub zaznaczenie"
 
@@ -362,7 +343,7 @@ msgstr "Uruchom linijkę lub zaznaczenie"
 # GN_("Undo")
 # src/gnuwin32/editor.c: 746
 # G_("Undo")
-#: src/gnuwin32/editor.c:636 src/gnuwin32/editor.c:754
+#: src/gnuwin32/editor.c:629 src/gnuwin32/editor.c:747
 msgid "Undo"
 msgstr "Cofnij"
 
@@ -370,7 +351,7 @@ msgstr "Cofnij"
 # GN_("Cut")
 # src/gnuwin32/editor.c: 749
 # G_("Cut")
-#: src/gnuwin32/editor.c:638 src/gnuwin32/editor.c:757
+#: src/gnuwin32/editor.c:631 src/gnuwin32/editor.c:750
 msgid "Cut"
 msgstr "Wytnij"
 
@@ -388,9 +369,7 @@ msgstr "Wytnij"
 # GN_("Copy")
 # src/gnuwin32/pager.c: 478
 # G_("Copy")
-#: src/gnuwin32/editor.c:639 src/gnuwin32/editor.c:759
-#: src/gnuwin32/pager.c:305 src/gnuwin32/pager.c:478 src/gnuwin32/rui.c:859
-#: src/gnuwin32/rui.c:1088 src/gnuwin32/rui.c:1144
+#: src/gnuwin32/editor.c:632 src/gnuwin32/editor.c:752 src/gnuwin32/pager.c:304 src/gnuwin32/pager.c:477 src/gnuwin32/rui.c:859 src/gnuwin32/rui.c:1088 src/gnuwin32/rui.c:1144
 msgid "Copy"
 msgstr "Kopiuj"
 
@@ -404,8 +383,7 @@ msgstr "Kopiuj"
 # GN_("Paste")
 # src/gnuwin32/editor.c: 753
 # G_("Paste")
-#: src/gnuwin32/editor.c:640 src/gnuwin32/editor.c:761 src/gnuwin32/rui.c:860
-#: src/gnuwin32/rui.c:1092 src/gnuwin32/rui.c:1145
+#: src/gnuwin32/editor.c:633 src/gnuwin32/editor.c:754 src/gnuwin32/rui.c:860 src/gnuwin32/rui.c:1092 src/gnuwin32/rui.c:1145
 msgid "Paste"
 msgstr "Wklej"
 
@@ -413,7 +391,7 @@ msgstr "Wklej"
 # GN_("Delete")
 # src/gnuwin32/editor.c: 755
 # G_("Delete")
-#: src/gnuwin32/editor.c:641 src/gnuwin32/editor.c:763
+#: src/gnuwin32/editor.c:634 src/gnuwin32/editor.c:756
 msgid "Delete"
 msgstr "Usuń"
 
@@ -429,15 +407,13 @@ msgstr "Usuń"
 # GN_("Select all")
 # src/gnuwin32/pager.c: 484
 # G_("Select all")
-#: src/gnuwin32/editor.c:643 src/gnuwin32/editor.c:765
-#: src/gnuwin32/pager.c:308 src/gnuwin32/pager.c:484 src/gnuwin32/rui.c:866
-#: src/gnuwin32/rui.c:1149
+#: src/gnuwin32/editor.c:636 src/gnuwin32/editor.c:758 src/gnuwin32/pager.c:307 src/gnuwin32/pager.c:483 src/gnuwin32/rui.c:866 src/gnuwin32/rui.c:1149
 msgid "Select all"
 msgstr "Zaznacz wszystko"
 
 # src/gnuwin32/editor.c: 696
 # G_("Save script")
-#: src/gnuwin32/editor.c:707
+#: src/gnuwin32/editor.c:700
 msgid "Save script"
 msgstr "Zapisz skrypt"
 
@@ -447,14 +423,13 @@ msgstr "Zapisz skrypt"
 # G_("Return focus to Console")
 # src/library/grDevices/src/devWindows.c: 1593
 # G_("Return focus to Console")
-#: src/gnuwin32/editor.c:715 src/gnuwin32/pager.c:451
-#: src/library/grDevices/src/devWindows.c:1596
+#: src/gnuwin32/editor.c:708 src/gnuwin32/pager.c:450 src/library/grDevices/src/devWindows.c:1613
 msgid "Return focus to Console"
 msgstr "Ustaw fokus z powrotem na konsolę"
 
 # src/gnuwin32/editor.c: 707
 # G_("Print script")
-#: src/gnuwin32/editor.c:718
+#: src/gnuwin32/editor.c:711
 msgid "Print script"
 msgstr "Drukuj skrypt"
 
@@ -466,8 +441,7 @@ msgstr "Drukuj skrypt"
 # G_("Print")
 # src/library/grDevices/src/devWindows.c: 1587
 # G_("Print")
-#: src/gnuwin32/editor.c:720 src/gnuwin32/pager.c:446 src/gnuwin32/rui.c:1104
-#: src/library/grDevices/src/devWindows.c:1590
+#: src/gnuwin32/editor.c:713 src/gnuwin32/pager.c:445 src/gnuwin32/rui.c:1104 src/library/grDevices/src/devWindows.c:1607
 msgid "Print"
 msgstr "Drukuj"
 
@@ -487,9 +461,7 @@ msgstr "Drukuj"
 # stop("File", file, "does not exist in", getwd())
 # src/library/utils/tests/Sweave-tst.R: 30
 # stop("File", texF, "does not exist in", getwd())
-#: src/gnuwin32/editor.c:738 src/gnuwin32/pager.c:467 src/gnuwin32/rui.c:1122
-#: src/library/utils/src/windows/dataentry.c:1790
-#: src/library/grDevices/src/devWindows.c:1628
+#: src/gnuwin32/editor.c:731 src/gnuwin32/pager.c:466 src/gnuwin32/rui.c:1122 src/library/utils/src/windows/dataentry.c:1791 src/library/grDevices/src/devWindows.c:1645
 msgid "File"
 msgstr "Plik"
 
@@ -499,7 +471,7 @@ msgstr "Plik"
 # G_("New script")
 # src/gnuwin32/pager.c: 468
 # G_("New script")
-#: src/gnuwin32/editor.c:739 src/gnuwin32/pager.c:468 src/gnuwin32/rui.c:1124
+#: src/gnuwin32/editor.c:732 src/gnuwin32/pager.c:467 src/gnuwin32/rui.c:1124
 msgid "New script"
 msgstr "Nowy skrypt"
 
@@ -509,19 +481,19 @@ msgstr "Nowy skrypt"
 # G_("Open script...")
 # src/gnuwin32/pager.c: 469
 # G_("Open script...")
-#: src/gnuwin32/editor.c:741 src/gnuwin32/pager.c:469 src/gnuwin32/rui.c:1125
+#: src/gnuwin32/editor.c:734 src/gnuwin32/pager.c:468 src/gnuwin32/rui.c:1125
 msgid "Open script..."
 msgstr "Otwórz skrypt..."
 
 # src/gnuwin32/editor.c: 732
 # G_("Save")
-#: src/gnuwin32/editor.c:743
+#: src/gnuwin32/editor.c:736
 msgid "Save"
 msgstr "Zapisz"
 
 # src/gnuwin32/editor.c: 734
 # G_("Save as...")
-#: src/gnuwin32/editor.c:745
+#: src/gnuwin32/editor.c:738
 msgid "Save as..."
 msgstr "Zapisz jako..."
 
@@ -533,14 +505,13 @@ msgstr "Zapisz jako..."
 # G_("Print...")
 # src/library/grDevices/src/devWindows.c: 1688
 # G_("Print...")
-#: src/gnuwin32/editor.c:748 src/gnuwin32/pager.c:470 src/gnuwin32/rui.c:1138
-#: src/library/grDevices/src/devWindows.c:1691
+#: src/gnuwin32/editor.c:741 src/gnuwin32/pager.c:469 src/gnuwin32/rui.c:1138 src/library/grDevices/src/devWindows.c:1666 src/library/grDevices/src/devWindows.c:1708
 msgid "Print..."
 msgstr "Drukuj..."
 
 # src/gnuwin32/editor.c: 740
 # G_("Close script")
-#: src/gnuwin32/editor.c:751
+#: src/gnuwin32/editor.c:744
 msgid "Close script"
 msgstr "Zamknij skrypt"
 
@@ -552,8 +523,7 @@ msgstr "Zamknij skrypt"
 # G_("Edit")
 # src/library/utils/src/windows/dataentry.c: 1796
 # G_("Edit")
-#: src/gnuwin32/editor.c:753 src/gnuwin32/pager.c:477 src/gnuwin32/rui.c:1143
-#: src/library/utils/src/windows/dataentry.c:1796
+#: src/gnuwin32/editor.c:746 src/gnuwin32/pager.c:476 src/gnuwin32/rui.c:1143 src/library/utils/src/windows/dataentry.c:1797
 msgid "Edit"
 msgstr "Edytuj"
 
@@ -561,25 +531,25 @@ msgstr "Edytuj"
 # G_("Clear console")
 # src/gnuwin32/editor.c: 759
 # G_("Clear console")
-#: src/gnuwin32/editor.c:767 src/gnuwin32/rui.c:1150
+#: src/gnuwin32/editor.c:760 src/gnuwin32/rui.c:1150
 msgid "Clear console"
 msgstr "Wyczyść konsolę"
 
 # src/gnuwin32/editor.c: 763
 # G_("Run all")
-#: src/gnuwin32/editor.c:771
+#: src/gnuwin32/editor.c:764
 msgid "Run all"
 msgstr "Uruchom wszystko"
 
 # src/gnuwin32/editor.c: 766
 # G_("Find...")
-#: src/gnuwin32/editor.c:774
+#: src/gnuwin32/editor.c:767
 msgid "Find..."
 msgstr "Znajdź..."
 
 # src/gnuwin32/editor.c: 768
 # G_("Replace...")
-#: src/gnuwin32/editor.c:776
+#: src/gnuwin32/editor.c:769
 msgid "Replace..."
 msgstr "Zamień..."
 
@@ -587,7 +557,7 @@ msgstr "Zamień..."
 # G_("GUI preferences...")
 # src/gnuwin32/editor.c: 771
 # G_("GUI preferences...")
-#: src/gnuwin32/editor.c:779 src/gnuwin32/rui.c:1154
+#: src/gnuwin32/editor.c:772 src/gnuwin32/rui.c:1154
 msgid "GUI preferences..."
 msgstr "Preferencje GUI..."
 
@@ -601,33 +571,31 @@ msgstr "Preferencje GUI..."
 # GN_("Help")
 # src/library/utils/src/windows/dataentry.c: 1807
 # G_("Help")
-#: src/gnuwin32/editor.c:789 src/gnuwin32/rui.c:1186
-#: src/library/utils/src/windows/dataentry.c:1697
-#: src/library/utils/src/windows/dataentry.c:1807
+#: src/gnuwin32/editor.c:782 src/gnuwin32/rui.c:1186 src/library/utils/src/windows/dataentry.c:1698 src/library/utils/src/windows/dataentry.c:1808
 msgid "Help"
 msgstr "Pomoc"
 
 # src/gnuwin32/editor.c: 782
 # G_("Editor")
-#: src/gnuwin32/editor.c:790
+#: src/gnuwin32/editor.c:783
 msgid "Editor"
 msgstr "Edytor"
 
 # src/gnuwin32/editor.c: 841
 # G_("Maximum number of editors reached")
-#: src/gnuwin32/editor.c:849
+#: src/gnuwin32/editor.c:842
 msgid "Maximum number of editors reached"
 msgstr "Osiągnięto maksymalną liczbę edytorów"
 
 # src/gnuwin32/pager.c: 519
 # G_("Unable to create pager window")
-#: src/gnuwin32/editor.c:854
+#: src/gnuwin32/editor.c:847
 msgid "Unable to create editor window"
 msgstr "Nie można utworzyć okna edytora"
 
 # src/gnuwin32/editor.c: 854
 # G_("Untitled")
-#: src/gnuwin32/editor.c:862
+#: src/gnuwin32/editor.c:855
 msgid "Untitled"
 msgstr "Bez tytułu"
 
@@ -635,19 +603,19 @@ msgstr "Bez tytułu"
 # G_("Select file")
 # src/gnuwin32/extra.c: 823
 # G_("Select file")
-#: src/gnuwin32/extra.c:832 src/gnuwin32/rui.c:1224
+#: src/gnuwin32/extra.c:825
 msgid "Select file"
 msgstr "Wybierz plik"
 
 # src/gnuwin32/pager.c: 89
 # G_("Error opening file")
-#: src/gnuwin32/pager.c:89
+#: src/gnuwin32/pager.c:88
 msgid "Error opening file"
 msgstr "Błąd podczas otwierania pliku"
 
 # src/gnuwin32/pager.c: 96
 # G_("Insufficient memory to display file in internal pager")
-#: src/gnuwin32/pager.c:96
+#: src/gnuwin32/pager.c:95
 msgid "Insufficient memory to display file in internal pager"
 msgstr "Brak wystarczającej pamięci aby wyświetlić plik w wewnętrznej stronie"
 
@@ -661,8 +629,7 @@ msgstr "Brak wystarczającej pamięci aby wyświetlić plik w wewnętrznej stron
 # G_("No selection")
 # src/gnuwin32/pager.c: 209
 # G_("No selection")
-#: src/gnuwin32/pager.c:177 src/gnuwin32/pager.c:189 src/gnuwin32/pager.c:209
-#: src/gnuwin32/rui.c:237 src/gnuwin32/rui.c:264
+#: src/gnuwin32/pager.c:176 src/gnuwin32/pager.c:188 src/gnuwin32/pager.c:208 src/gnuwin32/rui.c:237 src/gnuwin32/rui.c:264
 msgid "No selection"
 msgstr "Brak zaznaczenia"
 
@@ -672,7 +639,7 @@ msgstr "Brak zaznaczenia"
 # G_("Paste to console")
 # src/gnuwin32/pager.c: 480
 # G_("Paste to console")
-#: src/gnuwin32/pager.c:306 src/gnuwin32/pager.c:436 src/gnuwin32/pager.c:480
+#: src/gnuwin32/pager.c:305 src/gnuwin32/pager.c:435 src/gnuwin32/pager.c:479
 msgid "Paste to console"
 msgstr "Wklej do konsoli"
 
@@ -682,7 +649,7 @@ msgstr "Wklej do konsoli"
 # G_("Paste commands to console")
 # src/gnuwin32/pager.c: 482
 # G_("Paste commands to console")
-#: src/gnuwin32/pager.c:307 src/gnuwin32/pager.c:441 src/gnuwin32/pager.c:482
+#: src/gnuwin32/pager.c:306 src/gnuwin32/pager.c:440 src/gnuwin32/pager.c:481
 msgid "Paste commands to console"
 msgstr "Wklej polecenia do konsoli"
 
@@ -694,9 +661,7 @@ msgstr "Wklej polecenia do konsoli"
 # G_("Stay on top")
 # src/library/utils/src/windows/dataentry.c: 1703
 # GN_("Stay on top")
-#: src/gnuwin32/pager.c:310 src/gnuwin32/rui.c:869
-#: src/library/utils/src/windows/dataentry.c:1703
-#: src/library/grDevices/src/devWindows.c:1688
+#: src/gnuwin32/pager.c:309 src/gnuwin32/rui.c:869 src/library/utils/src/windows/dataentry.c:1704 src/library/grDevices/src/devWindows.c:1705
 msgid "Stay on top"
 msgstr "Zawsze na wierzchu"
 
@@ -708,9 +673,7 @@ msgstr "Zawsze na wierzchu"
 # GN_("Close")
 # src/library/utils/src/windows/dataentry.c: 1792
 # G_("Close")
-#: src/gnuwin32/pager.c:312 src/gnuwin32/pager.c:475
-#: src/library/utils/src/windows/dataentry.c:1705
-#: src/library/utils/src/windows/dataentry.c:1792
+#: src/gnuwin32/pager.c:311 src/gnuwin32/pager.c:474 src/library/utils/src/windows/dataentry.c:1706 src/library/utils/src/windows/dataentry.c:1793
 msgid "Close"
 msgstr "Zamknij"
 
@@ -718,7 +681,7 @@ msgstr "Zamknij"
 # G_("Save to File...")
 # src/gnuwin32/pager.c: 472
 # G_("Save to File...")
-#: src/gnuwin32/pager.c:472 src/gnuwin32/rui.c:1139
+#: src/gnuwin32/pager.c:471 src/gnuwin32/rui.c:1139
 msgid "Save to File..."
 msgstr "Zapisz do pliku..."
 
@@ -726,13 +689,13 @@ msgstr "Zapisz do pliku..."
 # G_("View")
 # src/gnuwin32/pager.c: 487
 # G_("View")
-#: src/gnuwin32/pager.c:487 src/gnuwin32/rui.c:1156
+#: src/gnuwin32/pager.c:486 src/gnuwin32/rui.c:1156
 msgid "View"
 msgstr "Widok"
 
 # src/gnuwin32/pager.c: 519
 # G_("Unable to create pager window")
-#: src/gnuwin32/pager.c:519
+#: src/gnuwin32/pager.c:518
 msgid "Unable to create pager window"
 msgstr "Nie można utworzyć okna strony"
 
@@ -768,9 +731,7 @@ msgstr ""
 # G_("Changes in pager size will not apply to any open pagers")
 #: src/gnuwin32/preferences.c:371
 msgid "Changes in pager size will not apply to any open pagers"
-msgstr ""
-"Zmiany w rozmiarze strony nie zostaną zastosowane w żadnych otwartych "
-"stronach"
+msgstr "Zmiany w rozmiarze strony nie zostaną zastosowane w żadnych otwartych stronach"
 
 # src/gnuwin32/preferences.c: 377
 # G_("Do not change pager type if any pager is open\nProceed?")
@@ -965,8 +926,8 @@ msgstr "Zaktualizuj pakiety..."
 # src/gnuwin32/rui.c: 918
 # G_("Install package(s) from local zip files...")
 #: src/gnuwin32/rui.c:920
-msgid "Install package(s) from local zip files..."
-msgstr "Zainstaluj pakiet(y) z lokalnych plików zip..."
+msgid "Install package(s) from local files..."
+msgstr "Zainstaluj pakiet(y) z lokalnych plików..."
 
 # src/gnuwin32/rui.c: 942
 # G_("FAQ on R")
@@ -1230,26 +1191,26 @@ msgstr "Konsola"
 
 # src/gnuwin32/rui.c: 1361
 # G_("'menu' is limited to 500 bytes")
-#: src/gnuwin32/rui.c:1268
+#: src/gnuwin32/rui.c:1251
 msgid "'mname' is limited to 1000 bytes"
 msgstr "'mname' jest ograniczone do 1000 bajtów"
 
 # src/gnuwin32/rui.c: 1371
 # G_("base menu does not exist")
-#: src/gnuwin32/rui.c:1310
+#: src/gnuwin32/rui.c:1293
 #, c-format
 msgid "menu %s does not exist"
 msgstr "menu %s nie istnieje"
 
 # src/gnuwin32/rui.c: 1361
 # G_("'menu' is limited to 500 bytes")
-#: src/gnuwin32/rui.c:1363
+#: src/gnuwin32/rui.c:1346
 msgid "'menu' is limited to 500 bytes"
 msgstr "'menu' jest ograniczone do 500 bajtów"
 
 # src/gnuwin32/rui.c: 1371
 # G_("base menu does not exist")
-#: src/gnuwin32/rui.c:1373
+#: src/gnuwin32/rui.c:1356
 msgid "base menu does not exist"
 msgstr "bazowe menu nie istnieje"
 
@@ -1259,7 +1220,7 @@ msgstr "bazowe menu nie istnieje"
 # G_("failed to allocate char storage")
 # src/gnuwin32/rui.c: 1457
 # G_("failed to allocate char storage")
-#: src/gnuwin32/rui.c:1388
+#: src/gnuwin32/rui.c:1371
 msgid "failed to allocate menu"
 msgstr "nie można przydzielić pamięci dla menu"
 
@@ -1267,13 +1228,13 @@ msgstr "nie można przydzielić pamięci dla menu"
 # G_("menu + item is limited to 1000 bytes")
 # src/gnuwin32/rui.c: 1527
 # G_("menu + item is limited to 1000 bytes")
-#: src/gnuwin32/rui.c:1405 src/gnuwin32/rui.c:1529
+#: src/gnuwin32/rui.c:1388 src/gnuwin32/rui.c:1512
 msgid "menu + item is limited to 1000 bytes"
 msgstr "menu + pozycja są łącznie ograniczone do 1000 bajtów"
 
 # src/gnuwin32/rui.c: 1371
 # G_("base menu does not exist")
-#: src/gnuwin32/rui.c:1413 src/gnuwin32/rui.c:1496
+#: src/gnuwin32/rui.c:1396 src/gnuwin32/rui.c:1479
 msgid "menu does not exist"
 msgstr "menu nie istnieje"
 
@@ -1283,7 +1244,7 @@ msgstr "menu nie istnieje"
 # G_("failed to allocate char storage")
 # src/gnuwin32/rui.c: 1457
 # G_("failed to allocate char storage")
-#: src/gnuwin32/rui.c:1431 src/gnuwin32/rui.c:1454 src/gnuwin32/rui.c:1459
+#: src/gnuwin32/rui.c:1414 src/gnuwin32/rui.c:1437 src/gnuwin32/rui.c:1442
 msgid "failed to allocate char storage"
 msgstr "nie można przydzielić pamięci dla znaku"
 
@@ -1293,7 +1254,7 @@ msgstr "nie można przydzielić pamięci dla znaku"
 # G_("failed to allocate char storage")
 # src/gnuwin32/rui.c: 1457
 # G_("failed to allocate char storage")
-#: src/gnuwin32/rui.c:1467
+#: src/gnuwin32/rui.c:1450
 msgid "failed to allocate menuitem"
 msgstr "nie można przydzielić pamięci dla pozycji menu"
 
@@ -1301,19 +1262,19 @@ msgstr "nie można przydzielić pamięci dla pozycji menu"
 # G_("\"%s\" not found")
 # src/extra/graphapp/dialogs.c: 906
 # G_("\"%s\" not found")
-#: src/gnuwin32/rui.c:1519
+#: src/gnuwin32/rui.c:1502
 msgid "menu not found"
 msgstr "menu nie zostało znalezione"
 
 # src/gnuwin32/rui.c: 1371
 # G_("base menu does not exist")
-#: src/gnuwin32/rui.c:1537
+#: src/gnuwin32/rui.c:1520
 msgid "menu or item does not exist"
 msgstr "menu lub pozycja nie istnieje"
 
 # src/gnuwin32/system.c: 442
 # G_("Save workspace image?")
-#: src/gnuwin32/system.c:442
+#: src/gnuwin32/system.c:446
 msgid "Save workspace image?"
 msgstr "Zapisać obraz obszaru roboczego?"
 
@@ -1331,20 +1292,19 @@ msgstr "Brak wystarczającej pamięci: komórka nie została skopiowana do schow
 # G_("Question")
 # src/extra/graphapp/dialogs.c: 181
 # G_("Question")
-#: src/extra/graphapp/dialogs.c:147 src/extra/graphapp/dialogs.c:164
-#: src/extra/graphapp/dialogs.c:181
+#: src/extra/graphapp/dialogs.c:148 src/extra/graphapp/dialogs.c:165 src/extra/graphapp/dialogs.c:182
 msgid "Question"
 msgstr "Pytanie"
 
 # src/extra/graphapp/dialogs.c: 202
 # G_(" Change working directory to:")
-#: src/extra/graphapp/dialogs.c:202
+#: src/extra/graphapp/dialogs.c:203
 msgid " Change working directory to:"
 msgstr "Zmień katalog roboczy na:"
 
 # src/extra/graphapp/dialogs.c: 205
 # G_("Unable to set '%s' as working directory")
-#: src/extra/graphapp/dialogs.c:205
+#: src/extra/graphapp/dialogs.c:206
 #, c-format
 msgid "Unable to set '%s' as working directory"
 msgstr "Nie można ustawić '%s' jako katalogu roboczego"
@@ -1365,10 +1325,7 @@ msgstr "Nie można ustawić '%s' jako katalogu roboczego"
 # gettext("Cancel")
 # src/library/utils/src/windows/widgets.c: 125
 # G_("Cancel")
-#: src/extra/graphapp/dialogs.c:602 src/extra/graphapp/dialogs.c:620
-#: src/extra/graphapp/dialogs.c:626 src/extra/graphapp/dialogs.c:725
-#: src/extra/graphapp/dialogs.c:739 src/extra/graphapp/dialogs.c:745
-#: src/library/utils/src/windows/widgets.c:125
+#: src/extra/graphapp/dialogs.c:604 src/extra/graphapp/dialogs.c:622 src/extra/graphapp/dialogs.c:628 src/extra/graphapp/dialogs.c:727 src/extra/graphapp/dialogs.c:741 src/extra/graphapp/dialogs.c:747 src/library/utils/src/windows/widgets.c:125
 msgid "Cancel"
 msgstr "Anuluj"
 
@@ -1396,14 +1353,13 @@ msgstr "Anuluj"
 # message(" OK")
 # src/library/utils/src/windows/widgets.c: 124
 # G_("OK")
-#: src/extra/graphapp/dialogs.c:622 src/extra/graphapp/dialogs.c:741
-#: src/library/utils/src/windows/widgets.c:124
+#: src/extra/graphapp/dialogs.c:624 src/extra/graphapp/dialogs.c:743 src/library/utils/src/windows/widgets.c:124
 msgid "OK"
 msgstr "OK"
 
 # src/extra/graphapp/dialogs.c: 733
 # G_("User")
-#: src/extra/graphapp/dialogs.c:733
+#: src/extra/graphapp/dialogs.c:735
 msgid "User"
 msgstr "Użytkownik"
 
@@ -1411,7 +1367,7 @@ msgstr "Użytkownik"
 # G_("Password")
 # src/extra/graphapp/dialogs.c: 736
 # (_("Password"), rect(10, h*4, tw+4, h*2+2), AlignLeft)
-#: src/extra/graphapp/dialogs.c:734
+#: src/extra/graphapp/dialogs.c:736
 msgid "Password"
 msgstr "Hasło"
 
@@ -1419,7 +1375,7 @@ msgstr "Hasło"
 # G_("\"%s\" not found")
 # src/extra/graphapp/dialogs.c: 906
 # G_("\"%s\" not found")
-#: src/extra/graphapp/dialogs.c:900 src/extra/graphapp/dialogs.c:906
+#: src/extra/graphapp/dialogs.c:902 src/extra/graphapp/dialogs.c:908
 #, c-format
 msgid "\"%s\" not found"
 msgstr "\"%s\" nie znaleziono"
@@ -1450,10 +1406,7 @@ msgstr "Organizuj ikony"
 # error(_("invalid argument"))
 # src/main/options.c: 629
 # error(_("invalid argument"))
-#: src/library/utils/src/windows/dataentry.c:223
-#: src/library/utils/src/windows/dataentry.c:1850
-#: src/library/utils/src/windows/dataentry.c:1853
-#: src/library/utils/src/windows/dataentry.c:1884
+#: src/library/utils/src/windows/dataentry.c:223 src/library/utils/src/windows/dataentry.c:1851 src/library/utils/src/windows/dataentry.c:1854 src/library/utils/src/windows/dataentry.c:1885
 msgid "invalid argument"
 msgstr "błędny argument"
 
@@ -1469,29 +1422,6 @@ msgstr "błędny typ dla wartości"
 msgid "Data Editor"
 msgstr "Edytor danych"
 
-# src/gnuwin32/extra.c: 574
-# error(_("invalid device"))
-# src/gnuwin32/extra.c: 576
-# error(_("invalid device"))
-# src/gnuwin32/extra.c: 599
-# error(_("invalid device"))
-# src/gnuwin32/extra.c: 601
-# error(_("invalid device"))
-# src/gnuwin32/extra.c: 636
-# error(_("invalid device"))
-# src/library/utils/src/windows/dataentry.c: 282
-# error(G_("invalid device"))
-# src/library/utils/src/windows/dataentry.c: 1891
-# error(G_("invalid device"))
-# src/main/gevents.c: 60
-#  _("invalid device")
-# src/main/gevents.c: 97
-#  _("invalid device")
-#: src/library/utils/src/windows/dataentry.c:282
-#: src/library/utils/src/windows/dataentry.c:1891
-msgid "invalid device"
-msgstr "niepoprawne urządzenie"
-
 # src/modules/X11/dataentry.c: 439
 # error("dataentry: internal memory problem")
 # src/library/utils/src/windows/dataentry.c: 331
@@ -1506,8 +1436,7 @@ msgstr "dataentry: wewnętrzny problem pamięci"
 # error(G_("dataentry: internal memory error"))
 # src/library/utils/src/windows/dataentry.c: 1221
 # error(G_("dataentry: internal memory error"))
-#: src/library/utils/src/windows/dataentry.c:634
-#: src/library/utils/src/windows/dataentry.c:1221
+#: src/library/utils/src/windows/dataentry.c:634 src/library/utils/src/windows/dataentry.c:1222
 msgid "dataentry: internal memory error"
 msgstr "dataentry: wewnętrzny błąd pamięci"
 
@@ -1519,8 +1448,7 @@ msgstr "dataentry: wewnętrzny błąd pamięci"
 # error(G_("internal type error in dataentry"))
 # src/library/utils/src/windows/dataentry.c: 770
 # error(G_("internal type error in dataentry"))
-#: src/library/utils/src/windows/dataentry.c:757
-#: src/library/utils/src/windows/dataentry.c:770
+#: src/library/utils/src/windows/dataentry.c:757 src/library/utils/src/windows/dataentry.c:770
 msgid "internal type error in dataentry"
 msgstr "wewnętrzny błąd typu przy wprowadzaniu danych"
 
@@ -1528,7 +1456,7 @@ msgstr "wewnętrzny błąd typu przy wprowadzaniu danych"
 # warning("dataentry: parse error on string")
 # src/library/utils/src/windows/dataentry.c: 852
 # warning(G_("dataentry: parse error on string"))
-#: src/library/utils/src/windows/dataentry.c:852
+#: src/library/utils/src/windows/dataentry.c:853
 msgid "dataentry: parse error on string"
 msgstr "dataentry: błąd składni dla łańcucha"
 
@@ -1538,25 +1466,25 @@ msgstr "dataentry: błąd składni dla łańcucha"
 # warning("dataentry: expression too long")
 # src/library/utils/src/windows/dataentry.c: 995
 # warning(G_("dataentry: expression too long"))
-#: src/library/utils/src/windows/dataentry.c:995
+#: src/library/utils/src/windows/dataentry.c:996
 msgid "dataentry: expression too long"
 msgstr "dataentry: wyrażenie zbyt długie"
 
 # src/library/utils/src/windows/dataentry.c: 1472
 # G_("column names cannot be blank")
-#: src/library/utils/src/windows/dataentry.c:1472
+#: src/library/utils/src/windows/dataentry.c:1473
 msgid "column names cannot be blank"
 msgstr "nazwy kolumn nie mogą być puste"
 
 # src/library/utils/src/windows/dataentry.c: 1518
 # G_("Variable editor")
-#: src/library/utils/src/windows/dataentry.c:1518
+#: src/library/utils/src/windows/dataentry.c:1519
 msgid "Variable editor"
 msgstr "Edytor zmiennych"
 
 # src/library/grDevices/src/devWindows.c: 1249
 # G_("Variable name")
-#: src/library/utils/src/windows/dataentry.c:1523
+#: src/library/utils/src/windows/dataentry.c:1524
 msgid "variable name"
 msgstr "Nazwa zmiennej"
 
@@ -1582,19 +1510,19 @@ msgstr "Nazwa zmiennej"
 # error(_("invalid '%s' argument"), "type")
 # src/main/connections.c: 4581
 # error(_("invalid '%s' argument"), "type")
-#: src/library/utils/src/windows/dataentry.c:1525
+#: src/library/utils/src/windows/dataentry.c:1526
 msgid "type"
 msgstr "typ"
 
 # src/library/utils/src/windows/dataentry.c: 1639
 # G_("Cell width(s)")
-#: src/library/utils/src/windows/dataentry.c:1639
+#: src/library/utils/src/windows/dataentry.c:1640
 msgid "Cell width(s)"
 msgstr "Szerokość(i) komórki"
 
 # src/library/utils/src/windows/dataentry.c: 1645
 # G_("Cell width")
-#: src/library/utils/src/windows/dataentry.c:1645
+#: src/library/utils/src/windows/dataentry.c:1646
 msgid "Cell width"
 msgstr "Szerokość"
 
@@ -1602,13 +1530,13 @@ msgstr "Szerokość"
 # ngettext(length(miss), "variable", "variables")
 # src/library/utils/src/windows/dataentry.c: 1648
 # G_("variable")
-#: src/library/utils/src/windows/dataentry.c:1648
+#: src/library/utils/src/windows/dataentry.c:1649
 msgid "variable"
 msgstr "zmienna"
 
 # src/library/utils/src/windows/dataentry.c: 1691
 # GN_("Navigation.\n  Keyboard: cursor keys move selection\n\tTab move right, Shift+Tab moves left\n\tPgDn or Ctrl+F: move down one screenful\n\tPgUp or Ctrl+B: move up one screenful\n\tHome: move to (1,1) cell\n\tEnd: show last rows of last column.\n   Mouse: left-click in a cell, use the scrollbar(s).\n\nEditing.\n  Type in the currently hightlighted cell\n  Double-click in a cell for an editable field\n\nMisc.\n  Ctrl-L redraws the screen, auto-resizing the columns\n  Ctrl-C copies se [...]
-#: src/library/utils/src/windows/dataentry.c:1691
+#: src/library/utils/src/windows/dataentry.c:1692
 msgid ""
 "Navigation.\n"
 "  Keyboard: cursor keys move selection\n"
@@ -1637,8 +1565,7 @@ msgstr ""
 "\tPgUp lub Ctrl+B: przesuń w górę o jeden ekran\n"
 "\tHome: przesuwań do komórki (1,1) cell\n"
 "\tEnd: pokaż ostatnie wiersze ostatniej kolumny.\n"
-"   Myszka: kliknij lewym przyciskiem myszy na komórkę, używaj paska "
-"przewijania.\n"
+"   Myszka: kliknij lewym przyciskiem myszy na komórkę, używaj paska przewijania.\n"
 "\n"
 "Edytowanie.\n"
 "  Wprowadzaj wartości w aktualnie zaznaczonej komórce\n"
@@ -1648,97 +1575,96 @@ msgstr ""
 "  Ctrl-L przerysowuje ekran, automatycznie ustawianie rozmiaru kolumn\n"
 "  Ctrl-C kopiuje zaznaczoną komórkę\n"
 "  Ctrl-V wkleja do zaznaczonej komórki\n"
-"  Kliknij prawym przyciskiem myszy aby skopiować, wkleić automatycznie "
-"stawić aktualnie zaznaczoną kolumnę\n"
+"  Kliknij prawym przyciskiem myszy aby skopiować, wkleić automatycznie stawić aktualnie zaznaczoną kolumnę\n"
 "\n"
 
 # src/library/utils/src/windows/dataentry.c: 1699
 # GN_("Copy selected cell")
-#: src/library/utils/src/windows/dataentry.c:1699
+#: src/library/utils/src/windows/dataentry.c:1700
 msgid "Copy selected cell"
 msgstr "Kopiuj zaznaczoną komórkę"
 
 # src/library/utils/src/windows/dataentry.c: 1700
 # GN_("Paste to selected cell")
-#: src/library/utils/src/windows/dataentry.c:1700
+#: src/library/utils/src/windows/dataentry.c:1701
 msgid "Paste to selected cell"
 msgstr "Wklej do zaznaczonej komórki"
 
 # src/library/utils/src/windows/dataentry.c: 1701
 # GN_("Autosize column")
-#: src/library/utils/src/windows/dataentry.c:1701
+#: src/library/utils/src/windows/dataentry.c:1702
 msgid "Autosize column"
 msgstr "Automatycznie dopasuj kolumnę"
 
 # src/library/utils/src/windows/dataentry.c: 1797
 # G_("Copy  \tCTRL+C")
-#: src/library/utils/src/windows/dataentry.c:1797
+#: src/library/utils/src/windows/dataentry.c:1798
 msgid "Copy  \tCTRL+C"
 msgstr "Kopiuj  \tCTRL+C"
 
 # src/library/utils/src/windows/dataentry.c: 1799
 # G_("Paste \tCTRL+V")
-#: src/library/utils/src/windows/dataentry.c:1799
+#: src/library/utils/src/windows/dataentry.c:1800
 msgid "Paste \tCTRL+V"
 msgstr "Wklej \tCTRL+V"
 
 # src/library/utils/src/windows/dataentry.c: 1801
 # G_("Delete\tDEL")
-#: src/library/utils/src/windows/dataentry.c:1801
+#: src/library/utils/src/windows/dataentry.c:1802
 msgid "Delete\tDEL"
 msgstr "Usuń\tDEL"
 
 # src/library/utils/src/windows/dataentry.c: 1804
 # G_("Cell widths ...")
-#: src/library/utils/src/windows/dataentry.c:1804
+#: src/library/utils/src/windows/dataentry.c:1805
 msgid "Cell widths ..."
 msgstr "Szerokości komórki..."
 
 # src/library/utils/src/windows/dataentry.c: 1808
 # G_("Data editor")
-#: src/library/utils/src/windows/dataentry.c:1808
+#: src/library/utils/src/windows/dataentry.c:1809
 msgid "Data editor"
 msgstr "Edytor danych"
 
 # src/library/grDevices/src/devWindows.c: 932
 # G_("Portable network graphics file")
-#: src/library/grDevices/src/devWindows.c:932
+#: src/library/grDevices/src/devWindows.c:949
 msgid "Portable network graphics file"
 msgstr "Plik PNG"
 
 # src/library/grDevices/src/devWindows.c: 935
 # G_("Windows bitmap file")
-#: src/library/grDevices/src/devWindows.c:935
+#: src/library/grDevices/src/devWindows.c:952
 msgid "Windows bitmap file"
 msgstr "Plik bitmapy windowsa"
 
 # src/library/grDevices/src/devWindows.c: 938
 # G_("TIFF file")
-#: src/library/grDevices/src/devWindows.c:938
+#: src/library/grDevices/src/devWindows.c:955
 msgid "TIFF file"
 msgstr "Plik TIFF"
 
 # src/library/grDevices/src/devWindows.c: 941
 # G_("Jpeg file")
-#: src/library/grDevices/src/devWindows.c:941
+#: src/library/grDevices/src/devWindows.c:958
 msgid "Jpeg file"
 msgstr "Plik jpeg"
 
 # src/library/grDevices/src/devWindows.c: 963
 # G_("Postscript file")
-#: src/library/grDevices/src/devWindows.c:963
+#: src/library/grDevices/src/devWindows.c:980
 msgid "Postscript file"
 msgstr "Plik Postscript"
 
 # src/library/grDevices/src/devWindows.c: 975
 # G_("PDF file")
-#: src/library/grDevices/src/devWindows.c:975
+#: src/library/grDevices/src/devWindows.c:992
 msgid "PDF file"
 msgstr "Plik PDF"
 
 # src/library/grDevices/src/devWindows.c: 987
 # G_("Enhanced metafiles")
-#: src/library/grDevices/src/devWindows.c:987
+#: src/library/grDevices/src/devWindows.c:1004
 msgid "Enhanced metafiles"
 msgstr "Rozszerzone metapliki"
 
@@ -1746,39 +1672,37 @@ msgstr "Rozszerzone metapliki"
 # G_("file path selected is too long: only 512 bytes are allowed")
 # src/library/grDevices/src/devWindows.c: 3435
 # G_("file path selected is too long: only 512 bytes are allowed")
-#: src/library/grDevices/src/devWindows.c:990
-#: src/library/grDevices/src/devWindows.c:3438
+#: src/library/grDevices/src/devWindows.c:1007 src/library/grDevices/src/devWindows.c:3445
 msgid "file path selected is too long: only 512 bytes are allowed"
-msgstr ""
-"wybrana ścieżka do pliku jest zbyt długa: tylko 512 bajtów jest dozwolone"
+msgstr "wybrana ścieżka do pliku jest zbyt długa: tylko 512 bajtów jest dozwolone"
 
 # src/library/grDevices/src/devWindows.c: 1201
 # G_("No plot to replace!")
-#: src/library/grDevices/src/devWindows.c:1201
+#: src/library/grDevices/src/devWindows.c:1218
 msgid "No plot to replace!"
 msgstr "Brak wykresu do zastąpienia!"
 
 # src/library/grDevices/src/devWindows.c: 1249
 # G_("Variable name")
-#: src/library/grDevices/src/devWindows.c:1251
+#: src/library/grDevices/src/devWindows.c:1268
 msgid "Variable name"
 msgstr "Nazwa zmiennej"
 
 # src/library/grDevices/src/devWindows.c: 1256
 # G_("Variable doesn't exist or doesn't contain any plots!")
-#: src/library/grDevices/src/devWindows.c:1260
+#: src/library/grDevices/src/devWindows.c:1277
 msgid "Variable doesn't contain any plots!"
 msgstr "Zmienna nie zawiera żadnych wykresów!"
 
 # src/library/grDevices/src/devWindows.c: 1272
 # G_("Name of variable to save to")
-#: src/library/grDevices/src/devWindows.c:1275
+#: src/library/grDevices/src/devWindows.c:1292
 msgid "Name of variable to save to"
 msgstr "Nazwa zmiennej do której zapisać"
 
 # src/library/grDevices/src/devWindows.c: 1581
 # G_("Copy to the clipboard as a metafile")
-#: src/library/grDevices/src/devWindows.c:1584
+#: src/library/grDevices/src/devWindows.c:1601
 msgid "Copy to the clipboard as a metafile"
 msgstr "Kopiuj do schowka jako metaplik"
 
@@ -1786,8 +1710,7 @@ msgstr "Kopiuj do schowka jako metaplik"
 # G_("Stop locator")
 # src/library/grDevices/src/devWindows.c: 1610
 # G_("Stop locator")
-#: src/library/grDevices/src/devWindows.c:1602
-#: src/library/grDevices/src/devWindows.c:1613
+#: src/library/grDevices/src/devWindows.c:1619 src/library/grDevices/src/devWindows.c:1630
 msgid "Stop locator"
 msgstr "Zatrzymaj lokalizator"
 
@@ -1795,32 +1718,31 @@ msgstr "Zatrzymaj lokalizator"
 # G_("Stop")
 # src/library/grDevices/src/devWindows.c: 1613
 # G_("Stop")
-#: src/library/grDevices/src/devWindows.c:1612
-#: src/library/grDevices/src/devWindows.c:1616
+#: src/library/grDevices/src/devWindows.c:1629 src/library/grDevices/src/devWindows.c:1633
 msgid "Stop"
 msgstr "Stop"
 
 # src/library/grDevices/src/devWindows.c: 1615
 # G_("Continue")
-#: src/library/grDevices/src/devWindows.c:1618
+#: src/library/grDevices/src/devWindows.c:1635
 msgid "Continue"
 msgstr "Kontynuuj"
 
 # src/library/grDevices/src/devWindows.c: 1619
 # G_("Next")
-#: src/library/grDevices/src/devWindows.c:1622
+#: src/library/grDevices/src/devWindows.c:1639
 msgid "Next"
 msgstr "Następny"
 
 # src/library/grDevices/src/devWindows.c: 1620
 # G_("Next plot")
-#: src/library/grDevices/src/devWindows.c:1623
+#: src/library/grDevices/src/devWindows.c:1640
 msgid "Next plot"
 msgstr "Następny wykres"
 
 # src/library/grDevices/src/devWindows.c: 1626
 # G_("Save as")
-#: src/library/grDevices/src/devWindows.c:1629
+#: src/library/grDevices/src/devWindows.c:1646
 msgid "Save as"
 msgstr "Zapisz jako"
 
@@ -1830,163 +1752,181 @@ msgstr "Zapisz jako"
 # G_("%s quality...")
 # src/library/grDevices/src/devWindows.c: 1639
 # G_("%s quality...")
-#: src/library/grDevices/src/devWindows.c:1638
-#: src/library/grDevices/src/devWindows.c:1640
-#: src/library/grDevices/src/devWindows.c:1642
+#: src/library/grDevices/src/devWindows.c:1655 src/library/grDevices/src/devWindows.c:1657 src/library/grDevices/src/devWindows.c:1659
 #, c-format
 msgid "%s quality..."
 msgstr "%s jakości..."
 
 # src/library/grDevices/src/devWindows.c: 1641
 # G_("Copy to the clipboard")
-#: src/library/grDevices/src/devWindows.c:1644
+#: src/library/grDevices/src/devWindows.c:1661
 msgid "Copy to the clipboard"
 msgstr "Kopiuj do schowka"
 
 # src/library/grDevices/src/devWindows.c: 1642
 # G_("as a Bitmap\tCTRL+C")
-#: src/library/grDevices/src/devWindows.c:1645
+#: src/library/grDevices/src/devWindows.c:1662
 msgid "as a Bitmap\tCTRL+C"
 msgstr "jako Bitmapę\tCTRL+C"
 
 # src/library/grDevices/src/devWindows.c: 1643
 # G_("as a Metafile\tCTRL+W")
-#: src/library/grDevices/src/devWindows.c:1646
+#: src/library/grDevices/src/devWindows.c:1663
 msgid "as a Metafile\tCTRL+W"
 msgstr "jako Metaplik\tCTRL+W"
 
-# src/library/grDevices/src/devWindows.c: 1646
-# G_("Print...\tCTRL+P")
-#: src/library/grDevices/src/devWindows.c:1649
-msgid "Print...\tCTRL+P"
-msgstr "Drukuj...\tCTRL+P"
-
 # src/library/grDevices/src/devWindows.c: 1648
 # G_("close Device")
-#: src/library/grDevices/src/devWindows.c:1651
+#: src/library/grDevices/src/devWindows.c:1668
 msgid "close Device"
 msgstr "Zamknij okno"
 
 # src/library/grDevices/src/devWindows.c: 1649
 # G_("History")
-#: src/library/grDevices/src/devWindows.c:1652
+#: src/library/grDevices/src/devWindows.c:1669
 msgid "History"
 msgstr "Historia"
 
 # src/library/grDevices/src/devWindows.c: 1650
 # G_("Recording")
-#: src/library/grDevices/src/devWindows.c:1653
+#: src/library/grDevices/src/devWindows.c:1670
 msgid "Recording"
 msgstr "Nagrywanie"
 
 # src/library/grDevices/src/devWindows.c: 1653
 # G_("Add\tINS")
-#: src/library/grDevices/src/devWindows.c:1656
+#: src/library/grDevices/src/devWindows.c:1673
 msgid "Add\tINS"
 msgstr "Kopiuj\tINS"
 
 # src/library/grDevices/src/devWindows.c: 1654
 # G_("Replace")
-#: src/library/grDevices/src/devWindows.c:1657
+#: src/library/grDevices/src/devWindows.c:1674
 msgid "Replace"
 msgstr "Zamień"
 
 # src/library/grDevices/src/devWindows.c: 1656
 # G_("Previous\tPgUp")
-#: src/library/grDevices/src/devWindows.c:1659
+#: src/library/grDevices/src/devWindows.c:1676
 msgid "Previous\tPgUp"
 msgstr "Poprzedni\tPgUp"
 
 # src/library/grDevices/src/devWindows.c: 1657
 # G_("Next\tPgDown")
-#: src/library/grDevices/src/devWindows.c:1660
+#: src/library/grDevices/src/devWindows.c:1677
 msgid "Next\tPgDown"
 msgstr "Następny\tPgDown"
 
 # src/library/grDevices/src/devWindows.c: 1659
 # G_("Save to variable...")
-#: src/library/grDevices/src/devWindows.c:1662
+#: src/library/grDevices/src/devWindows.c:1679
 msgid "Save to variable..."
 msgstr "Zapisz do zmiennej..."
 
 # src/library/grDevices/src/devWindows.c: 1660
 # G_("Get from variable...")
-#: src/library/grDevices/src/devWindows.c:1663
+#: src/library/grDevices/src/devWindows.c:1680
 msgid "Get from variable..."
 msgstr "Pobierz ze zmiennej..."
 
 # src/library/grDevices/src/devWindows.c: 1662
 # G_("Clear history")
-#: src/library/grDevices/src/devWindows.c:1665
+#: src/library/grDevices/src/devWindows.c:1682
 msgid "Clear history"
 msgstr "Wyczyść historię"
 
 # src/library/grDevices/src/devWindows.c: 1663
 # G_("Resize")
-#: src/library/grDevices/src/devWindows.c:1666
+#: src/library/grDevices/src/devWindows.c:1683
 msgid "Resize"
 msgstr "Zmień rozmiar"
 
 # src/library/grDevices/src/devWindows.c: 1664
 # G_("R mode")
-#: src/library/grDevices/src/devWindows.c:1667
+#: src/library/grDevices/src/devWindows.c:1684
 msgid "R mode"
 msgstr "Tryb R"
 
 # src/library/grDevices/src/devWindows.c: 1666
 # G_("Fit to window")
-#: src/library/grDevices/src/devWindows.c:1669
+#: src/library/grDevices/src/devWindows.c:1686
 msgid "Fit to window"
 msgstr "Dopasuj do okna"
 
 # src/library/grDevices/src/devWindows.c: 1668
 # G_("Fixed size")
-#: src/library/grDevices/src/devWindows.c:1671
+#: src/library/grDevices/src/devWindows.c:1688
 msgid "Fixed size"
 msgstr "Ustalony rozmiar"
 
 # src/library/grDevices/src/devWindows.c: 1675
 # G_("Copy as metafile")
-#: src/library/grDevices/src/devWindows.c:1678
+#: src/library/grDevices/src/devWindows.c:1695
 msgid "Copy as metafile"
 msgstr "Kopiuj jako metaplik"
 
 # src/library/grDevices/src/devWindows.c: 1677
 # G_("Copy as bitmap")
-#: src/library/grDevices/src/devWindows.c:1680
+#: src/library/grDevices/src/devWindows.c:1697
 msgid "Copy as bitmap"
 msgstr "Kopiuj jako bitmapę"
 
 # src/library/grDevices/src/devWindows.c: 1680
 # G_("Save as metafile...")
-#: src/library/grDevices/src/devWindows.c:1683
+#: src/library/grDevices/src/devWindows.c:1700
 msgid "Save as metafile..."
 msgstr "Zapisz jako metaplik..."
 
 # src/library/grDevices/src/devWindows.c: 1682
 # G_("Save as postscript...")
-#: src/library/grDevices/src/devWindows.c:1685
+#: src/library/grDevices/src/devWindows.c:1702
 msgid "Save as postscript..."
 msgstr "Zapisz jako postscript..."
 
 # src/library/grDevices/src/devWindows.c: 3135
 # G_("Locator is active")
-#: src/library/grDevices/src/devWindows.c:3138
+#: src/library/grDevices/src/devWindows.c:3143
 msgid "Locator is active"
 msgstr "Lokalizator jest aktywny"
 
 # src/library/grDevices/src/devWindows.c: 3758
 # G_("Waiting to confirm page change...")
-#: src/library/grDevices/src/devWindows.c:3765
+#: src/library/grDevices/src/devWindows.c:3769
 msgid "Waiting to confirm page change..."
 msgstr "Oczekiwanie na potwierdzenie zmiany strony..."
 
 # src/library/grDevices/src/devWindows.c: 3770
 # G_("Click or hit ENTER for next page")
-#: src/library/grDevices/src/devWindows.c:3777
+#: src/library/grDevices/src/devWindows.c:3781
 msgid "Click or hit ENTER for next page"
 msgstr "Kliknij lub naciśnij ENTER aby przejść do następnej strony"
 
+# src/library/grDevices/src/devWindows.c: 1646
+# G_("Print...\tCTRL+P")
+#~ msgid "Print...\tCTRL+P"
+#~ msgstr "Drukuj...\tCTRL+P"
+
+# src/gnuwin32/extra.c: 574
+# error(_("invalid device"))
+# src/gnuwin32/extra.c: 576
+# error(_("invalid device"))
+# src/gnuwin32/extra.c: 599
+# error(_("invalid device"))
+# src/gnuwin32/extra.c: 601
+# error(_("invalid device"))
+# src/gnuwin32/extra.c: 636
+# error(_("invalid device"))
+# src/library/utils/src/windows/dataentry.c: 282
+# error(G_("invalid device"))
+# src/library/utils/src/windows/dataentry.c: 1891
+# error(G_("invalid device"))
+# src/main/gevents.c: 60
+#  _("invalid device")
+# src/main/gevents.c: 97
+#  _("invalid device")
+#~ msgid "invalid device"
+#~ msgstr "niepoprawne urządzenie"
+
 # src/extra/graphapp/clipboard.c: 53
 # G_("Unable to open the clipboard")
 # src/extra/graphapp/clipboard.c: 79
@@ -2013,8 +1953,7 @@ msgstr "Kliknij lub naciśnij ENTER aby przejść do następnej strony"
 # G_("Insufficient memory to display file in internal pager")
 #, fuzzy
 #~ msgid "Insufficient memory for new printer"
-#~ msgstr ""
-#~ "Brak wystarczającej pamięci aby wyświetlić plik w wewnętrznej stronie"
+#~ msgstr "Brak wystarczającej pamięci aby wyświetlić plik w wewnętrznej stronie"
 
 # src/gnuwin32/pager.c: 519
 # G_("Unable to create pager window")
@@ -4040,6 +3979,3 @@ msgstr "Kliknij lub naciśnij ENTER aby przejść do następnej strony"
 #, fuzzy
 #~ msgid "X11 is not available"
 #~ msgstr "Brak dostępnego tekstu"
-
-#~ msgid "the cursor by one line.\n"
-#~ msgstr "kursor o jedną linię.\n"
diff --git a/src/library/base/po/RGui-pt_BR.po b/src/library/base/po/RGui-pt_BR.po
index 191aecb..07da4e1 100644
--- a/src/library/base/po/RGui-pt_BR.po
+++ b/src/library/base/po/RGui-pt_BR.po
@@ -7,11 +7,11 @@ msgid ""
 msgstr ""
 "Project-Id-Version: R 2.1.1\n"
 "Report-Msgid-Bugs-To: bugs.r-project.org\n"
-"POT-Creation-Date: 2013-03-18 19:36+0000\n"
+"POT-Creation-Date: 2016-04-01 10:28-0700\n"
 "PO-Revision-Date: 2011-03-26 08:56-0300\n"
 "Last-Translator: Fernando Henrique <pessoal at fernandohrosa.com.br>\n"
 "Language-Team: http://www.feferraz.net/br/P/Projeto_Traducao_R_Portugues\n"
-"Language: \n"
+"Language: pt_BR\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=ISO-8859-1\n"
 "Content-Transfer-Encoding: 8bit\n"
@@ -33,11 +33,11 @@ msgstr "Mem
 msgid "Unable to open the clipboard"
 msgstr "N�o foi poss�vel abrir a �rea de transfer�ncia"
 
-#: src/gnuwin32/console.c:1914
+#: src/gnuwin32/console.c:1919
 msgid "Insufficient memory. Please close the console"
 msgstr "Mem�ria insuficiente. Por favor verifique o console"
 
-#: src/gnuwin32/console.c:1969 src/gnuwin32/console.c:2022
+#: src/gnuwin32/console.c:1974 src/gnuwin32/console.c:2028
 #: src/gnuwin32/preferences.c:333
 #, c-format
 msgid ""
@@ -47,23 +47,23 @@ msgstr ""
 "Fonte %s-%d-%d  n�o encontrada.\n"
 "Usando fonte fixa do sistema"
 
-#: src/gnuwin32/console.c:2127
+#: src/gnuwin32/console.c:2133
 msgid "Save selection to"
 msgstr "Salvar sele��o em"
 
-#: src/gnuwin32/console.c:2129
+#: src/gnuwin32/console.c:2135
 msgid "Save console contents to"
 msgstr "Salvar conte�do do console em"
 
-#: src/gnuwin32/console.c:2228
+#: src/gnuwin32/console.c:2234
 msgid "Scrolling.\n"
 msgstr "Fazendo rolagem.\n"
 
-#: src/gnuwin32/console.c:2229
+#: src/gnuwin32/console.c:2235
 msgid "  Keyboard: PgUp, PgDown, Ctrl+Arrows, Ctrl+Home, Ctrl+End,\n"
 msgstr "  Teclado:  PgUp, PgDown, Ctrl+Arrows, Ctrl+Home, Ctrl+End,\n"
 
-#: src/gnuwin32/console.c:2230
+#: src/gnuwin32/console.c:2236
 msgid ""
 "  Mouse: use the scrollbar(s).\n"
 "\n"
@@ -71,78 +71,78 @@ msgstr ""
 "  Mouse: use a(s) barra(s) de rolagem.\n"
 "\n"
 
-#: src/gnuwin32/console.c:2231
+#: src/gnuwin32/console.c:2237
 msgid "Editing.\n"
 msgstr "Editando.\n"
 
-#: src/gnuwin32/console.c:2232
+#: src/gnuwin32/console.c:2238
 msgid "  Moving the cursor: \n"
 msgstr " Movendo o cursor: \n"
 
-#: src/gnuwin32/console.c:2233
+#: src/gnuwin32/console.c:2239
 msgid "     Left arrow or Ctrl+B: move backward one character;\n"
 msgstr "     Seta esquerda ou Ctrl+B: anda para tr�s um caractere;\n"
 
-#: src/gnuwin32/console.c:2234
+#: src/gnuwin32/console.c:2240
 msgid "     Right arrow or Ctrl+F: move forward one character;\n"
 msgstr "     Seta direita ou Ctrl+F: anda para frente um caractere;\n"
 
-#: src/gnuwin32/console.c:2235
+#: src/gnuwin32/console.c:2241
 msgid "     Home or Ctrl+A: go to beginning of line;\n"
 msgstr "     Home ou Ctrl+A: vai para o come�o da linha;\n"
 
-#: src/gnuwin32/console.c:2236
+#: src/gnuwin32/console.c:2242
 msgid "     End or Ctrl+E: go to end of line;\n"
 msgstr "     End ou Ctrl+E: vai para o fim da linha;\n"
 
-#: src/gnuwin32/console.c:2237
+#: src/gnuwin32/console.c:2243
 msgid "  History: Up and Down Arrows, Ctrl+P, Ctrl+N\n"
 msgstr "  Hist�rico: setas para Cima e para Baixo, Ctrl+P, Ctrl+N\n"
 
-#: src/gnuwin32/console.c:2238
+#: src/gnuwin32/console.c:2244
 msgid "  Deleting:\n"
 msgstr "  Excluindo:\n"
 
-#: src/gnuwin32/console.c:2239
+#: src/gnuwin32/console.c:2245
 msgid "     Del or Ctrl+D: delete current character or selection;\n"
 msgstr "     Del ou Ctrl+D: exclui o caractere atual;\n"
 
 # precedente ou pr�ximo?
-#: src/gnuwin32/console.c:2240
+#: src/gnuwin32/console.c:2246
 msgid "     Backspace: delete preceding character;\n"
 msgstr "     Backspace: exclui o caracter precedente;\n"
 
 # atual ou corrente?
-#: src/gnuwin32/console.c:2241
+#: src/gnuwin32/console.c:2247
 msgid ""
 "     Ctrl+Del or Ctrl+K: delete text from current character to end of line.\n"
 msgstr ""
 "     Ctrl+Del ou Ctrl+K: apaga o texto do caracter atual at� o final da "
 "linha.\n"
 
-#: src/gnuwin32/console.c:2242
+#: src/gnuwin32/console.c:2248
 msgid "     Ctrl+U: delete all text from current line.\n"
 msgstr "     Ctrl+U: exclui todo o texto da linha atual.\n"
 
-#: src/gnuwin32/console.c:2243
+#: src/gnuwin32/console.c:2249
 msgid "  Copy and paste.\n"
 msgstr "  Copiar e colar.\n"
 
-#: src/gnuwin32/console.c:2244
+#: src/gnuwin32/console.c:2250
 msgid ""
 "     Use the mouse (with the left button held down) to mark (select) text.\n"
 msgstr ""
 "     Use o mouse (segurando o bot�o esquerdo) para marcar (selecionar) "
 "texto.\n"
 
-#: src/gnuwin32/console.c:2245
+#: src/gnuwin32/console.c:2251
 msgid ""
 "     Use Shift+Del (or Ctrl+C) to copy the marked text to the clipboard and\n"
 msgstr ""
 "     Use Shift+Del (ou Ctrl+C) para copiar o texto selecionado para a �rea "
 "de transfer�ncia e\n"
 
-#: src/gnuwin32/console.c:2246
+#: src/gnuwin32/console.c:2252
 msgid ""
 "     Shift+Ins (or Ctrl+V or Ctrl+Y) to paste the content of the clipboard "
 "(if any)  \n"
@@ -150,28 +150,28 @@ msgstr ""
 "     Shift+Ins (ou Ctrl+V ou Ctrl+Y) para colar o conte�do da �rea de "
 "transfer�ncia (se houver algum)  \n"
 
-#: src/gnuwin32/console.c:2247
+#: src/gnuwin32/console.c:2253
 msgid "     to the console, Ctrl+X first copy then paste\n"
 msgstr "     para o console, Ctrl+X primeiro copie depois cole\n"
 
-#: src/gnuwin32/console.c:2248
+#: src/gnuwin32/console.c:2254
 msgid "  Misc:\n"
 msgstr "  Misc:\n"
 
-#: src/gnuwin32/console.c:2249
+#: src/gnuwin32/console.c:2255
 msgid "     Ctrl+L: Clear the console.\n"
 msgstr "     Ctrl+L: Limpa o console.\n"
 
-#: src/gnuwin32/console.c:2250
+#: src/gnuwin32/console.c:2256
 msgid "     Ctrl+O or INS: Toggle overwrite mode: initially off.\n"
 msgstr ""
 "     Ctrl+O or INS: Alterna o modo de sobrescrita: inicialmente desligado.\n"
 
-#: src/gnuwin32/console.c:2251
+#: src/gnuwin32/console.c:2257
 msgid "     Ctrl+T: Interchange current char with one to the left.\n"
 msgstr "     Ctrl+T: Troca o caracter atual com o da esquerda.\n"
 
-#: src/gnuwin32/console.c:2252
+#: src/gnuwin32/console.c:2258
 msgid ""
 "\n"
 "Note: Console is updated only when some input is required.\n"
@@ -179,7 +179,7 @@ msgstr ""
 "\n"
 "Nota: O console � atualizado somente quando alguma entrada � requerida.\n"
 
-#: src/gnuwin32/console.c:2253
+#: src/gnuwin32/console.c:2259
 msgid ""
 "  Use Ctrl+W to toggle this feature off/on.\n"
 "\n"
@@ -187,7 +187,7 @@ msgstr ""
 "  Use Ctrl+W para alternar entre a ativa��o/desativa��o desse recurso.\n"
 "\n"
 
-#: src/gnuwin32/console.c:2254
+#: src/gnuwin32/console.c:2260
 msgid ""
 "Use ESC to stop the interpreter.\n"
 "\n"
@@ -195,7 +195,7 @@ msgstr ""
 "Use ESC para parar o interpretador.\n"
 "\n"
 
-#: src/gnuwin32/console.c:2255
+#: src/gnuwin32/console.c:2261
 msgid ""
 "TAB starts completion of the current word.\n"
 "\n"
@@ -203,272 +203,273 @@ msgstr ""
 "TAB come�a a completar a palavra atual.\n"
 "\n"
 
-#: src/gnuwin32/console.c:2256
+#: src/gnuwin32/console.c:2262
 msgid "Standard Windows hotkeys can be used to switch to the\n"
 msgstr ""
 "Teclas de atalho padr�o do Windows podem ser usadas para mudar para o\n"
 
-#: src/gnuwin32/console.c:2257
+#: src/gnuwin32/console.c:2263
 msgid "graphics device (Ctrl+Tab or Ctrl+F6 in MDI, Alt+Tab in SDI)"
 msgstr "dispositivo gr�fico (Ctrl+Tab ou Ctrl+F6 em MDI, Alt+Tab em SDI)"
 
-#: src/gnuwin32/editor.c:88 src/gnuwin32/editor.c:90
+#: src/gnuwin32/editor.c:91 src/gnuwin32/editor.c:93
 msgid "R Editor"
 msgstr "Editor R"
 
-#: src/gnuwin32/editor.c:119
+#: src/gnuwin32/editor.c:123
 #, c-format
 msgid "unable to open file %s for reading"
 msgstr "N�o foi poss�vel abrir o arquivo %s para leitura"
 
-#: src/gnuwin32/editor.c:135
+#: src/gnuwin32/editor.c:139
 #, c-format
 msgid "Could not read from file '%s'"
 msgstr "N�o foi poss�vel ler o arquivo '%s'"
 
-#: src/gnuwin32/editor.c:166
+#: src/gnuwin32/editor.c:171
 #, c-format
 msgid "Could not save file '%s'"
 msgstr "N�o foi poss�vel salvar o arquivo '%s'"
 
-#: src/gnuwin32/editor.c:182
+#: src/gnuwin32/editor.c:187
 msgid "Save script as"
 msgstr "Salvar script como"
 
-#: src/gnuwin32/editor.c:377 src/gnuwin32/editor.c:694
-#: src/gnuwin32/pager.c:431 src/gnuwin32/rui.c:1076
+#: src/gnuwin32/editor.c:379 src/gnuwin32/editor.c:696
+#: src/gnuwin32/pager.c:430 src/gnuwin32/rui.c:1076
 msgid "Open script"
 msgstr "Abrir script"
 
-#: src/gnuwin32/editor.c:500 src/gnuwin32/pager.c:185 src/gnuwin32/pager.c:205
+#: src/gnuwin32/editor.c:502 src/gnuwin32/pager.c:184 src/gnuwin32/pager.c:204
 msgid "No RGui console to paste to"
 msgstr "Nenhum console RGui para colar"
 
-#: src/gnuwin32/editor.c:602
+#: src/gnuwin32/editor.c:604
 msgid "R EDITOR\n"
 msgstr "Editor R\n"
 
-#: src/gnuwin32/editor.c:604
+#: src/gnuwin32/editor.c:606
 msgid "A standard text editor for editing and running R code.\n"
 msgstr "Um editor de texto padr�o para edi��o e execu��o de c�digo em R.\n"
 
-#: src/gnuwin32/editor.c:606
+#: src/gnuwin32/editor.c:608
 msgid "RUNNING COMMANDS\n"
 msgstr "Executando comandos\n"
 
-#: src/gnuwin32/editor.c:607
+#: src/gnuwin32/editor.c:609
 msgid "To run a line or section of R code, select the code and either\n"
 msgstr ""
 "Para executar uma linha ou se��o de c�digo R, selecione o c�digo e use um "
 "dos seguintes comandos\n"
 
-#: src/gnuwin32/editor.c:608
+#: src/gnuwin32/editor.c:610
 msgid "     Press Ctrl-R\n"
 msgstr "     Pressione Ctrl-R\n"
 
-#: src/gnuwin32/editor.c:609
+#: src/gnuwin32/editor.c:611
 msgid "     Select \"Run line or selection\" from the \"Edit\" menu\n"
 msgstr ""
 "     Seleciome \"Executar linha ou sele��o\" a partir do menu \"Editar\"\n"
 
-#: src/gnuwin32/editor.c:610
+#: src/gnuwin32/editor.c:612
 msgid "     Press the \"Run line or selection\" icon on the toolbar\n"
 msgstr ""
 "     Pressione o �cone \"Executar linha ou sele��o\" na barra de "
 "ferramentas\n"
 
-#: src/gnuwin32/editor.c:611
+#: src/gnuwin32/editor.c:613
 msgid ""
 "This will copy the selected commands to the console and evaluate them.\n"
 msgstr ""
 "Isso ir� copiar os comandos selecionados para o console e interpret�-los.\n"
 
-#: src/gnuwin32/editor.c:612
+#: src/gnuwin32/editor.c:614
 msgid ""
 "If there is no selection, this will just run the current line and advance\n"
 msgstr ""
 "Se n�o h� sele��o, isso ir� somente copiar a linha atual e prosseguir\n"
 
-#: src/gnuwin32/editor.c:613
+#: src/gnuwin32/editor.c:615
 msgid "the cursor by one line.\n"
 msgstr "o cursor em uma linha.\n"
 
-#: src/gnuwin32/editor.c:625 src/gnuwin32/editor.c:702
-#: src/gnuwin32/editor.c:760
+#: src/gnuwin32/editor.c:627 src/gnuwin32/editor.c:704
+#: src/gnuwin32/editor.c:762
 msgid "Run line or selection"
 msgstr "Executar linha ou sele��o"
 
-#: src/gnuwin32/editor.c:627 src/gnuwin32/editor.c:745
+#: src/gnuwin32/editor.c:629 src/gnuwin32/editor.c:747
 msgid "Undo"
 msgstr "Desfazer"
 
-#: src/gnuwin32/editor.c:629 src/gnuwin32/editor.c:748
+#: src/gnuwin32/editor.c:631 src/gnuwin32/editor.c:750
 msgid "Cut"
 msgstr "Recortar"
 
-#: src/gnuwin32/editor.c:630 src/gnuwin32/editor.c:750
-#: src/gnuwin32/pager.c:305 src/gnuwin32/pager.c:478 src/gnuwin32/rui.c:859
+#: src/gnuwin32/editor.c:632 src/gnuwin32/editor.c:752
+#: src/gnuwin32/pager.c:304 src/gnuwin32/pager.c:477 src/gnuwin32/rui.c:859
 #: src/gnuwin32/rui.c:1088 src/gnuwin32/rui.c:1144
 msgid "Copy"
 msgstr "Copiar"
 
-#: src/gnuwin32/editor.c:631 src/gnuwin32/editor.c:752 src/gnuwin32/rui.c:860
+#: src/gnuwin32/editor.c:633 src/gnuwin32/editor.c:754 src/gnuwin32/rui.c:860
 #: src/gnuwin32/rui.c:1092 src/gnuwin32/rui.c:1145
 msgid "Paste"
 msgstr "Colar"
 
-#: src/gnuwin32/editor.c:632 src/gnuwin32/editor.c:754
+#: src/gnuwin32/editor.c:634 src/gnuwin32/editor.c:756
 msgid "Delete"
 msgstr "Excluir"
 
-#: src/gnuwin32/editor.c:634 src/gnuwin32/editor.c:756
-#: src/gnuwin32/pager.c:308 src/gnuwin32/pager.c:484 src/gnuwin32/rui.c:866
+#: src/gnuwin32/editor.c:636 src/gnuwin32/editor.c:758
+#: src/gnuwin32/pager.c:307 src/gnuwin32/pager.c:483 src/gnuwin32/rui.c:866
 #: src/gnuwin32/rui.c:1149
 msgid "Select all"
 msgstr "Selecionar tudo"
 
-#: src/gnuwin32/editor.c:698
+#: src/gnuwin32/editor.c:700
 msgid "Save script"
 msgstr "Salvar script"
 
-#: src/gnuwin32/editor.c:706 src/gnuwin32/pager.c:451
-#: src/library/grDevices/src/devWindows.c:1594
+#: src/gnuwin32/editor.c:708 src/gnuwin32/pager.c:450
+#: src/library/grDevices/src/devWindows.c:1613
 msgid "Return focus to Console"
 msgstr "Retorna o foco para o Console"
 
-#: src/gnuwin32/editor.c:709
+#: src/gnuwin32/editor.c:711
 msgid "Print script"
 msgstr "Imprimir script"
 
-#: src/gnuwin32/editor.c:711 src/gnuwin32/pager.c:446 src/gnuwin32/rui.c:1104
-#: src/library/grDevices/src/devWindows.c:1588
+#: src/gnuwin32/editor.c:713 src/gnuwin32/pager.c:445 src/gnuwin32/rui.c:1104
+#: src/library/grDevices/src/devWindows.c:1607
 msgid "Print"
 msgstr "Imprimir"
 
-#: src/gnuwin32/editor.c:729 src/gnuwin32/pager.c:467 src/gnuwin32/rui.c:1122
-#: src/library/utils/src/windows/dataentry.c:1790
-#: src/library/grDevices/src/devWindows.c:1626
+#: src/gnuwin32/editor.c:731 src/gnuwin32/pager.c:466 src/gnuwin32/rui.c:1122
+#: src/library/utils/src/windows/dataentry.c:1791
+#: src/library/grDevices/src/devWindows.c:1645
 msgid "File"
 msgstr "Arquivo"
 
-#: src/gnuwin32/editor.c:730 src/gnuwin32/pager.c:468 src/gnuwin32/rui.c:1124
+#: src/gnuwin32/editor.c:732 src/gnuwin32/pager.c:467 src/gnuwin32/rui.c:1124
 msgid "New script"
 msgstr "Novo script"
 
-#: src/gnuwin32/editor.c:732 src/gnuwin32/pager.c:469 src/gnuwin32/rui.c:1125
+#: src/gnuwin32/editor.c:734 src/gnuwin32/pager.c:468 src/gnuwin32/rui.c:1125
 msgid "Open script..."
 msgstr "Abrir script..."
 
-#: src/gnuwin32/editor.c:734
+#: src/gnuwin32/editor.c:736
 msgid "Save"
 msgstr "Salvar"
 
-#: src/gnuwin32/editor.c:736
+#: src/gnuwin32/editor.c:738
 msgid "Save as..."
 msgstr "Salvar como..."
 
-#: src/gnuwin32/editor.c:739 src/gnuwin32/pager.c:470 src/gnuwin32/rui.c:1138
-#: src/library/grDevices/src/devWindows.c:1689
+#: src/gnuwin32/editor.c:741 src/gnuwin32/pager.c:469 src/gnuwin32/rui.c:1138
+#: src/library/grDevices/src/devWindows.c:1666
+#: src/library/grDevices/src/devWindows.c:1708
 msgid "Print..."
 msgstr "Imprimir..."
 
-#: src/gnuwin32/editor.c:742
+#: src/gnuwin32/editor.c:744
 msgid "Close script"
 msgstr "Fechar script"
 
-#: src/gnuwin32/editor.c:744 src/gnuwin32/pager.c:477 src/gnuwin32/rui.c:1143
-#: src/library/utils/src/windows/dataentry.c:1796
+#: src/gnuwin32/editor.c:746 src/gnuwin32/pager.c:476 src/gnuwin32/rui.c:1143
+#: src/library/utils/src/windows/dataentry.c:1797
 msgid "Edit"
 msgstr "Editar"
 
-#: src/gnuwin32/editor.c:758 src/gnuwin32/rui.c:1150
+#: src/gnuwin32/editor.c:760 src/gnuwin32/rui.c:1150
 msgid "Clear console"
 msgstr "Limpar o console"
 
-#: src/gnuwin32/editor.c:762
+#: src/gnuwin32/editor.c:764
 msgid "Run all"
 msgstr "Executar tudo"
 
-#: src/gnuwin32/editor.c:765
+#: src/gnuwin32/editor.c:767
 msgid "Find..."
 msgstr "Localizar..."
 
-#: src/gnuwin32/editor.c:767
+#: src/gnuwin32/editor.c:769
 msgid "Replace..."
 msgstr "Substituir..."
 
-#: src/gnuwin32/editor.c:770 src/gnuwin32/rui.c:1154
+#: src/gnuwin32/editor.c:772 src/gnuwin32/rui.c:1154
 msgid "GUI preferences..."
 msgstr "Prefer�ncias da interface gr�fica"
 
-#: src/gnuwin32/editor.c:780 src/gnuwin32/rui.c:1186
-#: src/library/utils/src/windows/dataentry.c:1697
-#: src/library/utils/src/windows/dataentry.c:1807
+#: src/gnuwin32/editor.c:782 src/gnuwin32/rui.c:1186
+#: src/library/utils/src/windows/dataentry.c:1698
+#: src/library/utils/src/windows/dataentry.c:1808
 msgid "Help"
 msgstr "Ajuda"
 
-#: src/gnuwin32/editor.c:781
+#: src/gnuwin32/editor.c:783
 msgid "Editor"
 msgstr "Editor"
 
-#: src/gnuwin32/editor.c:840
+#: src/gnuwin32/editor.c:842
 msgid "Maximum number of editors reached"
 msgstr "N�mero m�ximo de editores atingido"
 
-#: src/gnuwin32/editor.c:845
+#: src/gnuwin32/editor.c:847
 msgid "Unable to create editor window"
 msgstr "N�o foi poss�vel criar a janela do editor"
 
-#: src/gnuwin32/editor.c:853
+#: src/gnuwin32/editor.c:855
 msgid "Untitled"
 msgstr "Sem nome"
 
-#: src/gnuwin32/extra.c:823 src/gnuwin32/rui.c:1224
+#: src/gnuwin32/extra.c:825
 msgid "Select file"
 msgstr "Selecionar arquivo"
 
-#: src/gnuwin32/pager.c:89
+#: src/gnuwin32/pager.c:88
 msgid "Error opening file"
 msgstr "Erro ao abrir arquivo"
 
-#: src/gnuwin32/pager.c:96
+#: src/gnuwin32/pager.c:95
 msgid "Insufficient memory to display file in internal pager"
 msgstr "Mem�ria insuficiente para mostrar o arquivo no visualizador interno"
 
-#: src/gnuwin32/pager.c:177 src/gnuwin32/pager.c:189 src/gnuwin32/pager.c:209
+#: src/gnuwin32/pager.c:176 src/gnuwin32/pager.c:188 src/gnuwin32/pager.c:208
 #: src/gnuwin32/rui.c:237 src/gnuwin32/rui.c:264
 msgid "No selection"
 msgstr "Nenhuma sele��o"
 
-#: src/gnuwin32/pager.c:306 src/gnuwin32/pager.c:436 src/gnuwin32/pager.c:480
+#: src/gnuwin32/pager.c:305 src/gnuwin32/pager.c:435 src/gnuwin32/pager.c:479
 msgid "Paste to console"
 msgstr "Colar no console"
 
-#: src/gnuwin32/pager.c:307 src/gnuwin32/pager.c:441 src/gnuwin32/pager.c:482
+#: src/gnuwin32/pager.c:306 src/gnuwin32/pager.c:440 src/gnuwin32/pager.c:481
 msgid "Paste commands to console"
 msgstr "Colar os comandos no console"
 
-#: src/gnuwin32/pager.c:310 src/gnuwin32/rui.c:869
-#: src/library/utils/src/windows/dataentry.c:1703
-#: src/library/grDevices/src/devWindows.c:1686
+#: src/gnuwin32/pager.c:309 src/gnuwin32/rui.c:869
+#: src/library/utils/src/windows/dataentry.c:1704
+#: src/library/grDevices/src/devWindows.c:1705
 msgid "Stay on top"
 msgstr "Sempre vis�vel"
 
-#: src/gnuwin32/pager.c:312 src/gnuwin32/pager.c:475
-#: src/library/utils/src/windows/dataentry.c:1705
-#: src/library/utils/src/windows/dataentry.c:1792
+#: src/gnuwin32/pager.c:311 src/gnuwin32/pager.c:474
+#: src/library/utils/src/windows/dataentry.c:1706
+#: src/library/utils/src/windows/dataentry.c:1793
 msgid "Close"
 msgstr "Fechar"
 
-#: src/gnuwin32/pager.c:472 src/gnuwin32/rui.c:1139
+#: src/gnuwin32/pager.c:471 src/gnuwin32/rui.c:1139
 msgid "Save to File..."
 msgstr "Salvar em arquivo..."
 
-#: src/gnuwin32/pager.c:487 src/gnuwin32/rui.c:1156
+#: src/gnuwin32/pager.c:486 src/gnuwin32/rui.c:1156
 msgid "View"
 msgstr "Visualizar"
 
-#: src/gnuwin32/pager.c:519
+#: src/gnuwin32/pager.c:518
 msgid "Unable to create pager window"
 msgstr "N�o foi poss�vel criar janela do visualizador"
 
@@ -625,7 +626,8 @@ msgid "Update packages..."
 msgstr "Atualizar pacotes..."
 
 #: src/gnuwin32/rui.c:920
-msgid "Install package(s) from local zip files..."
+#, fuzzy
+msgid "Install package(s) from local files..."
 msgstr "Instalar pacote(s) a partir de arquivos zip locais..."
 
 #: src/gnuwin32/rui.c:944
@@ -792,52 +794,52 @@ msgstr "Listar o caminho de procura"
 msgid "Console"
 msgstr "Console"
 
-#: src/gnuwin32/rui.c:1268
+#: src/gnuwin32/rui.c:1251
 msgid "'mname' is limited to 1000 bytes"
 msgstr "'mname' � limitado a 1000 caracteres"
 
-#: src/gnuwin32/rui.c:1310
+#: src/gnuwin32/rui.c:1293
 #, c-format
 msgid "menu %s does not exist"
 msgstr "menu %s n�o existe"
 
-#: src/gnuwin32/rui.c:1363
+#: src/gnuwin32/rui.c:1346
 msgid "'menu' is limited to 500 bytes"
 msgstr "'menu' � limitado a 500 caracteres"
 
-#: src/gnuwin32/rui.c:1373
+#: src/gnuwin32/rui.c:1356
 msgid "base menu does not exist"
 msgstr "menu base n�o existe"
 
-#: src/gnuwin32/rui.c:1388
+#: src/gnuwin32/rui.c:1371
 msgid "failed to allocate menu"
 msgstr "falha ao alocar menu"
 
-#: src/gnuwin32/rui.c:1405 src/gnuwin32/rui.c:1529
+#: src/gnuwin32/rui.c:1388 src/gnuwin32/rui.c:1512
 msgid "menu + item is limited to 1000 bytes"
 msgstr "menu + item � limitado a 1000 caracteres"
 
-#: src/gnuwin32/rui.c:1413 src/gnuwin32/rui.c:1496
+#: src/gnuwin32/rui.c:1396 src/gnuwin32/rui.c:1479
 msgid "menu does not exist"
 msgstr "menu n�o existe"
 
-#: src/gnuwin32/rui.c:1431 src/gnuwin32/rui.c:1454 src/gnuwin32/rui.c:1459
+#: src/gnuwin32/rui.c:1414 src/gnuwin32/rui.c:1437 src/gnuwin32/rui.c:1442
 msgid "failed to allocate char storage"
 msgstr "falha ao alocar caracter de armazenamento"
 
-#: src/gnuwin32/rui.c:1467
+#: src/gnuwin32/rui.c:1450
 msgid "failed to allocate menuitem"
 msgstr "falha ao alocar item do menu"
 
-#: src/gnuwin32/rui.c:1519
+#: src/gnuwin32/rui.c:1502
 msgid "menu not found"
 msgstr "menu n�o encontrado"
 
-#: src/gnuwin32/rui.c:1537
+#: src/gnuwin32/rui.c:1520
 msgid "menu or item does not exist"
 msgstr "menu ou item n�o existe"
 
-#: src/gnuwin32/system.c:442
+#: src/gnuwin32/system.c:446
 msgid "Save workspace image?"
 msgstr "Salvar imagem da �rea de trabalho?"
 
@@ -846,41 +848,41 @@ msgid "Insufficient memory: cell not copied to the clipboard"
 msgstr ""
 "Mem�ria insuficiente: a c�lula n�o foi copiada para a �rea de transfer�ncia"
 
-#: src/extra/graphapp/dialogs.c:147 src/extra/graphapp/dialogs.c:164
-#: src/extra/graphapp/dialogs.c:181
+#: src/extra/graphapp/dialogs.c:148 src/extra/graphapp/dialogs.c:165
+#: src/extra/graphapp/dialogs.c:182
 msgid "Question"
 msgstr "Pergunta"
 
-#: src/extra/graphapp/dialogs.c:202
+#: src/extra/graphapp/dialogs.c:203
 msgid " Change working directory to:"
 msgstr "Mudar o diret�rio de trabalho para:"
 
-#: src/extra/graphapp/dialogs.c:205
+#: src/extra/graphapp/dialogs.c:206
 #, c-format
 msgid "Unable to set '%s' as working directory"
 msgstr "N�o foi poss�vel especificar '%s' como o diret�rio de trabalho"
 
-#: src/extra/graphapp/dialogs.c:602 src/extra/graphapp/dialogs.c:620
-#: src/extra/graphapp/dialogs.c:626 src/extra/graphapp/dialogs.c:725
-#: src/extra/graphapp/dialogs.c:739 src/extra/graphapp/dialogs.c:745
+#: src/extra/graphapp/dialogs.c:604 src/extra/graphapp/dialogs.c:622
+#: src/extra/graphapp/dialogs.c:628 src/extra/graphapp/dialogs.c:727
+#: src/extra/graphapp/dialogs.c:741 src/extra/graphapp/dialogs.c:747
 #: src/library/utils/src/windows/widgets.c:125
 msgid "Cancel"
 msgstr "Cancelar"
 
-#: src/extra/graphapp/dialogs.c:622 src/extra/graphapp/dialogs.c:741
+#: src/extra/graphapp/dialogs.c:624 src/extra/graphapp/dialogs.c:743
 #: src/library/utils/src/windows/widgets.c:124
 msgid "OK"
 msgstr "OK"
 
-#: src/extra/graphapp/dialogs.c:733
+#: src/extra/graphapp/dialogs.c:735
 msgid "User"
 msgstr "Usu�rio"
 
-#: src/extra/graphapp/dialogs.c:734
+#: src/extra/graphapp/dialogs.c:736
 msgid "Password"
 msgstr "Senha"
 
-#: src/extra/graphapp/dialogs.c:900 src/extra/graphapp/dialogs.c:906
+#: src/extra/graphapp/dialogs.c:902 src/extra/graphapp/dialogs.c:908
 #, c-format
 msgid "\"%s\" not found"
 msgstr "\"%s\" n�o encontrado"
@@ -890,9 +892,9 @@ msgid "Arrange Icons"
 msgstr "Arrumar �cones"
 
 #: src/library/utils/src/windows/dataentry.c:223
-#: src/library/utils/src/windows/dataentry.c:1850
-#: src/library/utils/src/windows/dataentry.c:1853
-#: src/library/utils/src/windows/dataentry.c:1884
+#: src/library/utils/src/windows/dataentry.c:1851
+#: src/library/utils/src/windows/dataentry.c:1854
+#: src/library/utils/src/windows/dataentry.c:1885
 msgid "invalid argument"
 msgstr "argumento inv�lido"
 
@@ -904,17 +906,12 @@ msgstr "tipo inv
 msgid "Data Editor"
 msgstr "Editor de dados"
 
-#: src/library/utils/src/windows/dataentry.c:282
-#: src/library/utils/src/windows/dataentry.c:1891
-msgid "invalid device"
-msgstr "dispositivo inv�lido"
-
 #: src/library/utils/src/windows/dataentry.c:331
 msgid "dataentry: internal memory problem"
 msgstr "dataentry: problema interno de mem�ria"
 
 #: src/library/utils/src/windows/dataentry.c:634
-#: src/library/utils/src/windows/dataentry.c:1221
+#: src/library/utils/src/windows/dataentry.c:1222
 msgid "dataentry: internal memory error"
 msgstr "dataentry: erro interno de mem�ria"
 
@@ -923,43 +920,43 @@ msgstr "dataentry: erro interno de mem
 msgid "internal type error in dataentry"
 msgstr "erro de tipo interno em dataentry"
 
-#: src/library/utils/src/windows/dataentry.c:852
+#: src/library/utils/src/windows/dataentry.c:853
 msgid "dataentry: parse error on string"
 msgstr "dataentry: erro de an�lise na cadeia de caracteres"
 
-#: src/library/utils/src/windows/dataentry.c:995
+#: src/library/utils/src/windows/dataentry.c:996
 msgid "dataentry: expression too long"
 msgstr "dataentry: express�o muito longa"
 
-#: src/library/utils/src/windows/dataentry.c:1472
+#: src/library/utils/src/windows/dataentry.c:1473
 msgid "column names cannot be blank"
 msgstr "nomes de colunas n�o podem ser brancos"
 
-#: src/library/utils/src/windows/dataentry.c:1518
+#: src/library/utils/src/windows/dataentry.c:1519
 msgid "Variable editor"
 msgstr "Editor de vari�veis"
 
-#: src/library/utils/src/windows/dataentry.c:1523
+#: src/library/utils/src/windows/dataentry.c:1524
 msgid "variable name"
 msgstr "nome da vari�vel"
 
-#: src/library/utils/src/windows/dataentry.c:1525
+#: src/library/utils/src/windows/dataentry.c:1526
 msgid "type"
 msgstr "tipo"
 
-#: src/library/utils/src/windows/dataentry.c:1639
+#: src/library/utils/src/windows/dataentry.c:1640
 msgid "Cell width(s)"
 msgstr "Largura da(s) c�lula(s)"
 
-#: src/library/utils/src/windows/dataentry.c:1645
+#: src/library/utils/src/windows/dataentry.c:1646
 msgid "Cell width"
 msgstr "Largura da c�lula"
 
-#: src/library/utils/src/windows/dataentry.c:1648
+#: src/library/utils/src/windows/dataentry.c:1649
 msgid "variable"
 msgstr "vari�vel"
 
-#: src/library/utils/src/windows/dataentry.c:1691
+#: src/library/utils/src/windows/dataentry.c:1692
 msgid ""
 "Navigation.\n"
 "  Keyboard: cursor keys move selection\n"
@@ -1003,225 +1000,227 @@ msgstr ""
 "selecionada atualmente.\n"
 "\n"
 
-#: src/library/utils/src/windows/dataentry.c:1699
+#: src/library/utils/src/windows/dataentry.c:1700
 msgid "Copy selected cell"
 msgstr "Copiar a c�lula selecionada"
 
-#: src/library/utils/src/windows/dataentry.c:1700
+#: src/library/utils/src/windows/dataentry.c:1701
 msgid "Paste to selected cell"
 msgstr "Colar na c�lula selecionada"
 
-#: src/library/utils/src/windows/dataentry.c:1701
+#: src/library/utils/src/windows/dataentry.c:1702
 msgid "Autosize column"
 msgstr "Autodimensionar a coluna"
 
-#: src/library/utils/src/windows/dataentry.c:1797
+#: src/library/utils/src/windows/dataentry.c:1798
 msgid "Copy  \tCTRL+C"
 msgstr "Copiar  \tCTRL+C"
 
-#: src/library/utils/src/windows/dataentry.c:1799
+#: src/library/utils/src/windows/dataentry.c:1800
 msgid "Paste \tCTRL+V"
 msgstr "Colar \tCTRL+V"
 
-#: src/library/utils/src/windows/dataentry.c:1801
+#: src/library/utils/src/windows/dataentry.c:1802
 msgid "Delete\tDEL"
 msgstr "Excluir\tDEL"
 
-#: src/library/utils/src/windows/dataentry.c:1804
+#: src/library/utils/src/windows/dataentry.c:1805
 msgid "Cell widths ..."
 msgstr "Comprimentos das c�lulas ..."
 
-#: src/library/utils/src/windows/dataentry.c:1808
+#: src/library/utils/src/windows/dataentry.c:1809
 msgid "Data editor"
 msgstr "Editor de dados"
 
-#: src/library/grDevices/src/devWindows.c:932
+#: src/library/grDevices/src/devWindows.c:949
 msgid "Portable network graphics file"
 msgstr "Arquivos do tipo Portable network graphics"
 
-#: src/library/grDevices/src/devWindows.c:935
+#: src/library/grDevices/src/devWindows.c:952
 msgid "Windows bitmap file"
 msgstr "Arquivo Windows bitmap"
 
-#: src/library/grDevices/src/devWindows.c:938
+#: src/library/grDevices/src/devWindows.c:955
 msgid "TIFF file"
 msgstr "Arquivo TIFF"
 
-#: src/library/grDevices/src/devWindows.c:941
+#: src/library/grDevices/src/devWindows.c:958
 msgid "Jpeg file"
 msgstr "Arquivo jpeg"
 
-#: src/library/grDevices/src/devWindows.c:963
+#: src/library/grDevices/src/devWindows.c:980
 msgid "Postscript file"
 msgstr "Arquivo postscript"
 
-#: src/library/grDevices/src/devWindows.c:975
+#: src/library/grDevices/src/devWindows.c:992
 msgid "PDF file"
 msgstr "Arquivo PDF"
 
 # enhanced = melhorado ???
-#: src/library/grDevices/src/devWindows.c:987
+#: src/library/grDevices/src/devWindows.c:1004
 msgid "Enhanced metafiles"
 msgstr "Enhanced metafiles"
 
-#: src/library/grDevices/src/devWindows.c:990
-#: src/library/grDevices/src/devWindows.c:3436
+#: src/library/grDevices/src/devWindows.c:1007
+#: src/library/grDevices/src/devWindows.c:3445
 msgid "file path selected is too long: only 512 bytes are allowed"
 msgstr ""
 "caminho do arquivo selecionado � muito grande: somente 512 bytes s�o "
 "permitidos"
 
-#: src/library/grDevices/src/devWindows.c:1201
+#: src/library/grDevices/src/devWindows.c:1218
 msgid "No plot to replace!"
 msgstr "N�o h� gr�fico para substituir"
 
 # inverte e deixa a primeira mai�scula
-#: src/library/grDevices/src/devWindows.c:1249
+#: src/library/grDevices/src/devWindows.c:1268
 msgid "Variable name"
 msgstr "Nome da vari�vel"
 
-#: src/library/grDevices/src/devWindows.c:1258
+#: src/library/grDevices/src/devWindows.c:1277
 #, fuzzy
 msgid "Variable doesn't contain any plots!"
 msgstr "Vari�vel n�o existe ou n�o cont�m nenhum gr�fico!"
 
-#: src/library/grDevices/src/devWindows.c:1273
+#: src/library/grDevices/src/devWindows.c:1292
 msgid "Name of variable to save to"
 msgstr "Nome da vari�vel para onde salvar"
 
-#: src/library/grDevices/src/devWindows.c:1582
+#: src/library/grDevices/src/devWindows.c:1601
 msgid "Copy to the clipboard as a metafile"
 msgstr "Copiar para a �rea de transfer�ncia como um metafile"
 
-#: src/library/grDevices/src/devWindows.c:1600
-#: src/library/grDevices/src/devWindows.c:1611
+#: src/library/grDevices/src/devWindows.c:1619
+#: src/library/grDevices/src/devWindows.c:1630
 msgid "Stop locator"
 msgstr "Parar localizador"
 
-#: src/library/grDevices/src/devWindows.c:1610
-#: src/library/grDevices/src/devWindows.c:1614
+#: src/library/grDevices/src/devWindows.c:1629
+#: src/library/grDevices/src/devWindows.c:1633
 msgid "Stop"
 msgstr "Parar"
 
-#: src/library/grDevices/src/devWindows.c:1616
+#: src/library/grDevices/src/devWindows.c:1635
 msgid "Continue"
 msgstr "Continuar"
 
-#: src/library/grDevices/src/devWindows.c:1620
+#: src/library/grDevices/src/devWindows.c:1639
 msgid "Next"
 msgstr "Pr�ximo"
 
-#: src/library/grDevices/src/devWindows.c:1621
+#: src/library/grDevices/src/devWindows.c:1640
 msgid "Next plot"
 msgstr "Pr�ximo gr�fico"
 
-#: src/library/grDevices/src/devWindows.c:1627
+#: src/library/grDevices/src/devWindows.c:1646
 msgid "Save as"
 msgstr "Salvar como"
 
-#: src/library/grDevices/src/devWindows.c:1636
-#: src/library/grDevices/src/devWindows.c:1638
-#: src/library/grDevices/src/devWindows.c:1640
+#: src/library/grDevices/src/devWindows.c:1655
+#: src/library/grDevices/src/devWindows.c:1657
+#: src/library/grDevices/src/devWindows.c:1659
 #, c-format
 msgid "%s quality..."
 msgstr "%s qualidade..."
 
-#: src/library/grDevices/src/devWindows.c:1642
+#: src/library/grDevices/src/devWindows.c:1661
 msgid "Copy to the clipboard"
 msgstr "Copiar para a �rea de transfer�ncia"
 
-#: src/library/grDevices/src/devWindows.c:1643
+#: src/library/grDevices/src/devWindows.c:1662
 msgid "as a Bitmap\tCTRL+C"
 msgstr "como um Bitmap\tCTRL+C"
 
-#: src/library/grDevices/src/devWindows.c:1644
+#: src/library/grDevices/src/devWindows.c:1663
 msgid "as a Metafile\tCTRL+W"
 msgstr "como um Metafile\tCTRL+W"
 
-#: src/library/grDevices/src/devWindows.c:1647
-msgid "Print...\tCTRL+P"
-msgstr "Imprimir...\tCTRL+P"
-
-#: src/library/grDevices/src/devWindows.c:1649
+#: src/library/grDevices/src/devWindows.c:1668
 msgid "close Device"
 msgstr "fecha Dispositivo"
 
-#: src/library/grDevices/src/devWindows.c:1650
+#: src/library/grDevices/src/devWindows.c:1669
 msgid "History"
 msgstr "Hist�rico"
 
-#: src/library/grDevices/src/devWindows.c:1651
+#: src/library/grDevices/src/devWindows.c:1670
 msgid "Recording"
 msgstr "Gravando"
 
-#: src/library/grDevices/src/devWindows.c:1654
+#: src/library/grDevices/src/devWindows.c:1673
 msgid "Add\tINS"
 msgstr "Adicionar\tINS"
 
-#: src/library/grDevices/src/devWindows.c:1655
+#: src/library/grDevices/src/devWindows.c:1674
 msgid "Replace"
 msgstr "Substituir"
 
-#: src/library/grDevices/src/devWindows.c:1657
+#: src/library/grDevices/src/devWindows.c:1676
 msgid "Previous\tPgUp"
 msgstr "Anterior\tPageUp"
 
-#: src/library/grDevices/src/devWindows.c:1658
+#: src/library/grDevices/src/devWindows.c:1677
 msgid "Next\tPgDown"
 msgstr "Pr�ximo\tPageDown"
 
-#: src/library/grDevices/src/devWindows.c:1660
+#: src/library/grDevices/src/devWindows.c:1679
 msgid "Save to variable..."
 msgstr "Salvar para vari�vel..."
 
-#: src/library/grDevices/src/devWindows.c:1661
+#: src/library/grDevices/src/devWindows.c:1680
 msgid "Get from variable..."
 msgstr "Pegar da vari�vel"
 
-#: src/library/grDevices/src/devWindows.c:1663
+#: src/library/grDevices/src/devWindows.c:1682
 msgid "Clear history"
 msgstr "Limpar hist�rico"
 
-#: src/library/grDevices/src/devWindows.c:1664
+#: src/library/grDevices/src/devWindows.c:1683
 msgid "Resize"
 msgstr "Redimensionar"
 
-#: src/library/grDevices/src/devWindows.c:1665
+#: src/library/grDevices/src/devWindows.c:1684
 msgid "R mode"
 msgstr "Modo R"
 
-#: src/library/grDevices/src/devWindows.c:1667
+#: src/library/grDevices/src/devWindows.c:1686
 msgid "Fit to window"
 msgstr "Ajuste ao tamanho da janela"
 
-#: src/library/grDevices/src/devWindows.c:1669
+#: src/library/grDevices/src/devWindows.c:1688
 msgid "Fixed size"
 msgstr "Tamanho fixo"
 
-#: src/library/grDevices/src/devWindows.c:1676
+#: src/library/grDevices/src/devWindows.c:1695
 msgid "Copy as metafile"
 msgstr "Copiar como metafile"
 
-#: src/library/grDevices/src/devWindows.c:1678
+#: src/library/grDevices/src/devWindows.c:1697
 msgid "Copy as bitmap"
 msgstr "Copiar como bitmap"
 
-#: src/library/grDevices/src/devWindows.c:1681
+#: src/library/grDevices/src/devWindows.c:1700
 msgid "Save as metafile..."
 msgstr "Salvar como metafile..."
 
-#: src/library/grDevices/src/devWindows.c:1683
+#: src/library/grDevices/src/devWindows.c:1702
 msgid "Save as postscript..."
 msgstr "Salvar como postscript..."
 
-#: src/library/grDevices/src/devWindows.c:3136
+#: src/library/grDevices/src/devWindows.c:3143
 msgid "Locator is active"
 msgstr "Localizador est� ativo"
 
-#: src/library/grDevices/src/devWindows.c:3763
+#: src/library/grDevices/src/devWindows.c:3769
 msgid "Waiting to confirm page change..."
 msgstr "Esperando para confirmar mudan�a de p�gina..."
 
-#: src/library/grDevices/src/devWindows.c:3775
+#: src/library/grDevices/src/devWindows.c:3781
 msgid "Click or hit ENTER for next page"
 msgstr "Clique com o mouse ou pressione ENTER para pr�xima p�gina"
+
+#~ msgid "Print...\tCTRL+P"
+#~ msgstr "Imprimir...\tCTRL+P"
+
+#~ msgid "invalid device"
+#~ msgstr "dispositivo inv�lido"
diff --git a/src/library/base/po/RGui-ru.po b/src/library/base/po/RGui-ru.po
index 0254925..a4c5337 100644
--- a/src/library/base/po/RGui-ru.po
+++ b/src/library/base/po/RGui-ru.po
@@ -8,11 +8,11 @@ msgid ""
 msgstr ""
 "Project-Id-Version: R 2.10.0\n"
 "Report-Msgid-Bugs-To: bugs.r-project.org\n"
-"POT-Creation-Date: 2013-03-18 19:30+0000\n"
-"PO-Revision-Date: 2013-03-19 17:46-0600\n"
+"POT-Creation-Date: 2015-02-09 08:52+0000\n"
+"PO-Revision-Date: 2016-04-05 18:17-0600\n"
 "Last-Translator: Alexey Shipunov <dactylorhiza at gmail.com>\n"
 "Language-Team: Russian <dactylorhiza at gmail>\n"
-"Language: \n"
+"Language: ru\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=koi8-r\n"
 "Content-Transfer-Encoding: 8bit\n"
@@ -34,12 +34,12 @@ msgstr "
 msgid "Unable to open the clipboard"
 msgstr "�� ���� ������� ����� ������"
 
-#: src/gnuwin32/console.c:1914
+#: src/gnuwin32/console.c:1917
 msgid "Insufficient memory. Please close the console"
 msgstr "������������ ������. ����������, �������� �������"
 
-#: src/gnuwin32/console.c:1969
-#: src/gnuwin32/console.c:2022
+#: src/gnuwin32/console.c:1972
+#: src/gnuwin32/console.c:2026
 #: src/gnuwin32/preferences.c:333
 #, c-format
 msgid ""
@@ -49,23 +49,23 @@ msgstr ""
 "����� %s-%d-%d  �� ������.\n"
 "������������ ��������� �����"
 
-#: src/gnuwin32/console.c:2127
+#: src/gnuwin32/console.c:2131
 msgid "Save selection to"
 msgstr "��������� ��������� �"
 
-#: src/gnuwin32/console.c:2129
+#: src/gnuwin32/console.c:2133
 msgid "Save console contents to"
 msgstr "��������� ���������� ������� �"
 
-#: src/gnuwin32/console.c:2228
+#: src/gnuwin32/console.c:2232
 msgid "Scrolling.\n"
 msgstr "���������.\n"
 
-#: src/gnuwin32/console.c:2229
+#: src/gnuwin32/console.c:2233
 msgid "  Keyboard: PgUp, PgDown, Ctrl+Arrows, Ctrl+Home, Ctrl+End,\n"
 msgstr "����������: PgUp, PgDown, Ctrl+Arrows, Ctrl+Home, Ctrl+End,\n"
 
-#: src/gnuwin32/console.c:2230
+#: src/gnuwin32/console.c:2234
 msgid ""
 "  Mouse: use the scrollbar(s).\n"
 "\n"
@@ -73,91 +73,91 @@ msgstr ""
 "  ����: ������������ �����(�) ���������.\n"
 "\n"
 
-#: src/gnuwin32/console.c:2231
+#: src/gnuwin32/console.c:2235
 msgid "Editing.\n"
 msgstr "��������������.\n"
 
-#: src/gnuwin32/console.c:2232
+#: src/gnuwin32/console.c:2236
 msgid "  Moving the cursor: \n"
 msgstr "  ����������� �������: \n"
 
-#: src/gnuwin32/console.c:2233
+#: src/gnuwin32/console.c:2237
 msgid "     Left arrow or Ctrl+B: move backward one character;\n"
 msgstr "     ����� ������� ��� Ctrl+B: ����� �� ���� ������;\n"
 
-#: src/gnuwin32/console.c:2234
+#: src/gnuwin32/console.c:2238
 msgid "     Right arrow or Ctrl+F: move forward one character;\n"
 msgstr "     ������� ������ ��� Ctrl+F: ������ �� ���� ������;\n"
 
-#: src/gnuwin32/console.c:2235
+#: src/gnuwin32/console.c:2239
 msgid "     Home or Ctrl+A: go to beginning of line;\n"
 msgstr "     Home ��� Ctrl+A: � ������ ������;\n"
 
-#: src/gnuwin32/console.c:2236
+#: src/gnuwin32/console.c:2240
 msgid "     End or Ctrl+E: go to end of line;\n"
 msgstr "     End ��� Ctrl+E: � ����� ������;\n"
 
-#: src/gnuwin32/console.c:2237
+#: src/gnuwin32/console.c:2241
 msgid "  History: Up and Down Arrows, Ctrl+P, Ctrl+N\n"
 msgstr "  �������: ������� ����� � ����, Ctrl+P, Ctrl+N\n"
 
-#: src/gnuwin32/console.c:2238
+#: src/gnuwin32/console.c:2242
 msgid "  Deleting:\n"
 msgstr "  ��������:\n"
 
-#: src/gnuwin32/console.c:2239
+#: src/gnuwin32/console.c:2243
 msgid "     Del or Ctrl+D: delete current character or selection;\n"
 msgstr "     Del ��� Ctrl+D: ������� ������� ������ ��� ���������;\n"
 
-#: src/gnuwin32/console.c:2240
+#: src/gnuwin32/console.c:2244
 msgid "     Backspace: delete preceding character;\n"
 msgstr "     Backspace: ������� ���������� ������;\n"
 
-#: src/gnuwin32/console.c:2241
+#: src/gnuwin32/console.c:2245
 msgid "     Ctrl+Del or Ctrl+K: delete text from current character to end of line.\n"
 msgstr "     Ctrl+Del ��� Ctrl+K: ������� ����� �� �������� ������� �� ����� ������.\n"
 
-#: src/gnuwin32/console.c:2242
+#: src/gnuwin32/console.c:2246
 msgid "     Ctrl+U: delete all text from current line.\n"
 msgstr "     Ctrl+U: ������� ���� ����� ������� ������.\n"
 
-#: src/gnuwin32/console.c:2243
+#: src/gnuwin32/console.c:2247
 msgid "  Copy and paste.\n"
 msgstr "  ����������� � �������:\n"
 
-#: src/gnuwin32/console.c:2244
+#: src/gnuwin32/console.c:2248
 msgid "     Use the mouse (with the left button held down) to mark (select) text.\n"
 msgstr "     ������������ ���� (� ������� ����� �������) ��� ��������� ������.\n"
 
-#: src/gnuwin32/console.c:2245
+#: src/gnuwin32/console.c:2249
 msgid "     Use Shift+Del (or Ctrl+C) to copy the marked text to the clipboard and\n"
 msgstr "     ������������ Shift+Del (��� Ctrl+C) ��� ����������� ��������� � �����\n"
 
-#: src/gnuwin32/console.c:2246
+#: src/gnuwin32/console.c:2250
 msgid "     Shift+Ins (or Ctrl+V or Ctrl+Y) to paste the content of the clipboard (if any)  \n"
 msgstr "     Shift+Ins (��� Ctrl+V ��� Ctrl+Y) ��� ������� ����������� ������ (���� ����)  \n"
 
-#: src/gnuwin32/console.c:2247
+#: src/gnuwin32/console.c:2251
 msgid "     to the console, Ctrl+X first copy then paste\n"
 msgstr "     �� �������, Ctrl+X ������� ��������, ����� ���������.\n"
 
-#: src/gnuwin32/console.c:2248
+#: src/gnuwin32/console.c:2252
 msgid "  Misc:\n"
 msgstr "  ������:\n"
 
-#: src/gnuwin32/console.c:2249
+#: src/gnuwin32/console.c:2253
 msgid "     Ctrl+L: Clear the console.\n"
 msgstr "     Ctrl+L: �������� �������.\n"
 
-#: src/gnuwin32/console.c:2250
+#: src/gnuwin32/console.c:2254
 msgid "     Ctrl+O or INS: Toggle overwrite mode: initially off.\n"
 msgstr "     Ctrl+O: ����������� ������/������� ��������: ������� ���������.\n"
 
-#: src/gnuwin32/console.c:2251
+#: src/gnuwin32/console.c:2255
 msgid "     Ctrl+T: Interchange current char with one to the left.\n"
 msgstr "     Ctrl+T: �������� ������� ������ � ����������.\n"
 
-#: src/gnuwin32/console.c:2252
+#: src/gnuwin32/console.c:2256
 msgid ""
 "\n"
 "Note: Console is updated only when some input is required.\n"
@@ -165,7 +165,7 @@ msgstr ""
 "\n"
 "��������: ������� ����������� ������ ����� ����� ����.\n"
 
-#: src/gnuwin32/console.c:2253
+#: src/gnuwin32/console.c:2257
 msgid ""
 "  Use Ctrl+W to toggle this feature off/on.\n"
 "\n"
@@ -173,7 +173,7 @@ msgstr ""
 "  ����������� Ctrl+W ��� ���������/���������� ����� ��������.\n"
 "\n"
 
-#: src/gnuwin32/console.c:2254
+#: src/gnuwin32/console.c:2258
 msgid ""
 "Use ESC to stop the interpreter.\n"
 "\n"
@@ -181,7 +181,7 @@ msgstr ""
 "����������� Esc ��� ��������� ��������������.\n"
 "\n"
 
-#: src/gnuwin32/console.c:2255
+#: src/gnuwin32/console.c:2259
 msgid ""
 "TAB starts completion of the current word.\n"
 "\n"
@@ -189,309 +189,308 @@ msgstr ""
 "TAB ������������ ���������� �������� �����.\n"
 "\n"
 
-#: src/gnuwin32/console.c:2256
+#: src/gnuwin32/console.c:2260
 msgid "Standard Windows hotkeys can be used to switch to the\n"
 msgstr "����������� ������� Windows ����� ������������ ��� �������� �\n"
 
-#: src/gnuwin32/console.c:2257
+#: src/gnuwin32/console.c:2261
 msgid "graphics device (Ctrl+Tab or Ctrl+F6 in MDI, Alt+Tab in SDI)"
 msgstr "���� ������� (Ctrl+Tab ��� Ctrl+F6 � MDI, Alt+Tab � SDI)"
 
-#: src/gnuwin32/editor.c:88
-#: src/gnuwin32/editor.c:90
+#: src/gnuwin32/editor.c:91
+#: src/gnuwin32/editor.c:93
 msgid "R Editor"
 msgstr "�������� R"
 
-#: src/gnuwin32/editor.c:119
+#: src/gnuwin32/editor.c:123
 #, c-format
 msgid "unable to open file %s for reading"
 msgstr "�� ���� ������� ���� %s ��� ������"
 
-#: src/gnuwin32/editor.c:135
+#: src/gnuwin32/editor.c:139
 #, c-format
 msgid "Could not read from file '%s'"
 msgstr "�� ���� ��������� �� ����� '%s'"
 
-#: src/gnuwin32/editor.c:166
+#: src/gnuwin32/editor.c:171
 #, c-format
 msgid "Could not save file '%s'"
 msgstr "�� ���� ��������� ���� '%s'"
 
-#: src/gnuwin32/editor.c:182
+#: src/gnuwin32/editor.c:187
 msgid "Save script as"
 msgstr "��������� ������ ���"
 
-#: src/gnuwin32/editor.c:377
-#: src/gnuwin32/editor.c:694
-#: src/gnuwin32/pager.c:431
+#: src/gnuwin32/editor.c:379
+#: src/gnuwin32/editor.c:696
+#: src/gnuwin32/pager.c:430
 #: src/gnuwin32/rui.c:1076
 msgid "Open script"
 msgstr "������� ������"
 
-#: src/gnuwin32/editor.c:500
-#: src/gnuwin32/pager.c:185
-#: src/gnuwin32/pager.c:205
+#: src/gnuwin32/editor.c:502
+#: src/gnuwin32/pager.c:184
+#: src/gnuwin32/pager.c:204
 msgid "No RGui console to paste to"
 msgstr "��� ����������� ������� ��� �������"
 
-#: src/gnuwin32/editor.c:602
+#: src/gnuwin32/editor.c:604
 msgid "R EDITOR\n"
 msgstr "�������� R\n"
 
-#: src/gnuwin32/editor.c:604
+#: src/gnuwin32/editor.c:606
 msgid "A standard text editor for editing and running R code.\n"
 msgstr "������� ��������� �������� ��� ������ � ������� ���� R.\n"
 
-#: src/gnuwin32/editor.c:606
+#: src/gnuwin32/editor.c:608
 msgid "RUNNING COMMANDS\n"
 msgstr "������� �������\n"
 
-#: src/gnuwin32/editor.c:607
+#: src/gnuwin32/editor.c:609
 msgid "To run a line or section of R code, select the code and either\n"
 msgstr "����� ��������� ������ ��� ���� ���� R, �������� ����� � ���\n"
 
-#: src/gnuwin32/editor.c:608
+#: src/gnuwin32/editor.c:610
 msgid "     Press Ctrl-R\n"
 msgstr "     ������� Ctrl-R\n"
 
-#: src/gnuwin32/editor.c:609
+#: src/gnuwin32/editor.c:611
 msgid "     Select \"Run line or selection\" from the \"Edit\" menu\n"
 msgstr "     �������� \"��������� ������ ��� ����\" �� ���� \"������\"\n"
 
-#: src/gnuwin32/editor.c:610
+#: src/gnuwin32/editor.c:612
 msgid "     Press the \"Run line or selection\" icon on the toolbar\n"
 msgstr "     ������� �� ������ ������ \"��������� ������ ��� ����\"\n"
 
-#: src/gnuwin32/editor.c:611
+#: src/gnuwin32/editor.c:613
 msgid "This will copy the selected commands to the console and evaluate them.\n"
 msgstr "� ���������� ��������� ������� ����������� �� ������� � ���������� ���.\n"
 
-#: src/gnuwin32/editor.c:612
+#: src/gnuwin32/editor.c:614
 msgid "If there is no selection, this will just run the current line and advance\n"
 msgstr "���� ��������� ���, ����� �������� ������� ������, � ������\n"
 
-#: src/gnuwin32/editor.c:613
+#: src/gnuwin32/editor.c:615
 msgid "the cursor by one line.\n"
 msgstr "������������ �� ������ ����.\n"
 
-#: src/gnuwin32/editor.c:625
-#: src/gnuwin32/editor.c:702
-#: src/gnuwin32/editor.c:760
+#: src/gnuwin32/editor.c:627
+#: src/gnuwin32/editor.c:704
+#: src/gnuwin32/editor.c:762
 msgid "Run line or selection"
 msgstr "��������� ������ ��� ����"
 
-#: src/gnuwin32/editor.c:627
-#: src/gnuwin32/editor.c:745
+#: src/gnuwin32/editor.c:629
+#: src/gnuwin32/editor.c:747
 msgid "Undo"
 msgstr "��������"
 
-#: src/gnuwin32/editor.c:629
-#: src/gnuwin32/editor.c:748
+#: src/gnuwin32/editor.c:631
+#: src/gnuwin32/editor.c:750
 msgid "Cut"
 msgstr "��������"
 
-#: src/gnuwin32/editor.c:630
-#: src/gnuwin32/editor.c:750
-#: src/gnuwin32/pager.c:305
-#: src/gnuwin32/pager.c:478
+#: src/gnuwin32/editor.c:632
+#: src/gnuwin32/editor.c:752
+#: src/gnuwin32/pager.c:304
+#: src/gnuwin32/pager.c:477
 #: src/gnuwin32/rui.c:859
 #: src/gnuwin32/rui.c:1088
 #: src/gnuwin32/rui.c:1144
 msgid "Copy"
 msgstr "����������"
 
-#: src/gnuwin32/editor.c:631
-#: src/gnuwin32/editor.c:752
+#: src/gnuwin32/editor.c:633
+#: src/gnuwin32/editor.c:754
 #: src/gnuwin32/rui.c:860
 #: src/gnuwin32/rui.c:1092
 #: src/gnuwin32/rui.c:1145
 msgid "Paste"
 msgstr "��������"
 
-#: src/gnuwin32/editor.c:632
-#: src/gnuwin32/editor.c:754
+#: src/gnuwin32/editor.c:634
+#: src/gnuwin32/editor.c:756
 msgid "Delete"
 msgstr "�������"
 
-#: src/gnuwin32/editor.c:634
-#: src/gnuwin32/editor.c:756
-#: src/gnuwin32/pager.c:308
-#: src/gnuwin32/pager.c:484
+#: src/gnuwin32/editor.c:636
+#: src/gnuwin32/editor.c:758
+#: src/gnuwin32/pager.c:307
+#: src/gnuwin32/pager.c:483
 #: src/gnuwin32/rui.c:866
 #: src/gnuwin32/rui.c:1149
 msgid "Select all"
 msgstr "�������� ���"
 
-#: src/gnuwin32/editor.c:698
+#: src/gnuwin32/editor.c:700
 msgid "Save script"
 msgstr "��������� ������"
 
-#: src/gnuwin32/editor.c:706
-#: src/gnuwin32/pager.c:451
-#: src/library/grDevices/src/devWindows.c:1594
+#: src/gnuwin32/editor.c:708
+#: src/gnuwin32/pager.c:450
+#: src/library/grDevices/src/devWindows.c:1613
 msgid "Return focus to Console"
 msgstr "������� ����� � �������"
 
-#: src/gnuwin32/editor.c:709
+#: src/gnuwin32/editor.c:711
 msgid "Print script"
 msgstr "�������� ������"
 
-#: src/gnuwin32/editor.c:711
-#: src/gnuwin32/pager.c:446
+#: src/gnuwin32/editor.c:713
+#: src/gnuwin32/pager.c:445
 #: src/gnuwin32/rui.c:1104
-#: src/library/grDevices/src/devWindows.c:1588
+#: src/library/grDevices/src/devWindows.c:1607
 msgid "Print"
 msgstr "������"
 
-#: src/gnuwin32/editor.c:729
-#: src/gnuwin32/pager.c:467
+#: src/gnuwin32/editor.c:731
+#: src/gnuwin32/pager.c:466
 #: src/gnuwin32/rui.c:1122
-#: src/library/utils/src/windows/dataentry.c:1790
-#: src/library/grDevices/src/devWindows.c:1626
+#: src/library/utils/src/windows/dataentry.c:1791
+#: src/library/grDevices/src/devWindows.c:1645
 msgid "File"
 msgstr "����"
 
-#: src/gnuwin32/editor.c:730
-#: src/gnuwin32/pager.c:468
+#: src/gnuwin32/editor.c:732
+#: src/gnuwin32/pager.c:467
 #: src/gnuwin32/rui.c:1124
 msgid "New script"
 msgstr "����� ������"
 
-#: src/gnuwin32/editor.c:732
-#: src/gnuwin32/pager.c:469
+#: src/gnuwin32/editor.c:734
+#: src/gnuwin32/pager.c:468
 #: src/gnuwin32/rui.c:1125
 msgid "Open script..."
 msgstr "������� ������..."
 
-#: src/gnuwin32/editor.c:734
+#: src/gnuwin32/editor.c:736
 msgid "Save"
 msgstr "���������"
 
-#: src/gnuwin32/editor.c:736
+#: src/gnuwin32/editor.c:738
 msgid "Save as..."
 msgstr "��������� ���..."
 
-#: src/gnuwin32/editor.c:739
-#: src/gnuwin32/pager.c:470
+#: src/gnuwin32/editor.c:741
+#: src/gnuwin32/pager.c:469
 #: src/gnuwin32/rui.c:1138
-#: src/library/grDevices/src/devWindows.c:1689
+#: src/library/grDevices/src/devWindows.c:1708
 msgid "Print..."
 msgstr "������..."
 
-#: src/gnuwin32/editor.c:742
+#: src/gnuwin32/editor.c:744
 msgid "Close script"
 msgstr "������� ������"
 
-#: src/gnuwin32/editor.c:744
-#: src/gnuwin32/pager.c:477
+#: src/gnuwin32/editor.c:746
+#: src/gnuwin32/pager.c:476
 #: src/gnuwin32/rui.c:1143
-#: src/library/utils/src/windows/dataentry.c:1796
+#: src/library/utils/src/windows/dataentry.c:1797
 msgid "Edit"
 msgstr "������"
 
-#: src/gnuwin32/editor.c:758
+#: src/gnuwin32/editor.c:760
 #: src/gnuwin32/rui.c:1150
 msgid "Clear console"
 msgstr "�������� �������"
 
-#: src/gnuwin32/editor.c:762
+#: src/gnuwin32/editor.c:764
 msgid "Run all"
 msgstr "��������� ���"
 
-#: src/gnuwin32/editor.c:765
+#: src/gnuwin32/editor.c:767
 msgid "Find..."
 msgstr "�����..."
 
-#: src/gnuwin32/editor.c:767
+#: src/gnuwin32/editor.c:769
 msgid "Replace..."
 msgstr "��������..."
 
-#: src/gnuwin32/editor.c:770
+#: src/gnuwin32/editor.c:772
 #: src/gnuwin32/rui.c:1154
 msgid "GUI preferences..."
 msgstr "��������� ����������..."
 
-#: src/gnuwin32/editor.c:780
+#: src/gnuwin32/editor.c:782
 #: src/gnuwin32/rui.c:1186
-#: src/library/utils/src/windows/dataentry.c:1697
-#: src/library/utils/src/windows/dataentry.c:1807
+#: src/library/utils/src/windows/dataentry.c:1698
+#: src/library/utils/src/windows/dataentry.c:1808
 msgid "Help"
 msgstr "�������"
 
-#: src/gnuwin32/editor.c:781
+#: src/gnuwin32/editor.c:783
 msgid "Editor"
 msgstr "��������"
 
-#: src/gnuwin32/editor.c:840
+#: src/gnuwin32/editor.c:842
 msgid "Maximum number of editors reached"
 msgstr "���������� ������������ ���������� ����������"
 
-#: src/gnuwin32/editor.c:845
+#: src/gnuwin32/editor.c:847
 msgid "Unable to create editor window"
 msgstr "�� ���� ������� ���� ���������"
 
-#: src/gnuwin32/editor.c:853
+#: src/gnuwin32/editor.c:855
 msgid "Untitled"
 msgstr "����������"
 
-#: src/gnuwin32/extra.c:823
-#: src/gnuwin32/rui.c:1224
+#: src/gnuwin32/extra.c:811
 msgid "Select file"
 msgstr "������� ����"
 
-#: src/gnuwin32/pager.c:89
+#: src/gnuwin32/pager.c:88
 msgid "Error opening file"
 msgstr "������ �������� �����"
 
-#: src/gnuwin32/pager.c:96
+#: src/gnuwin32/pager.c:95
 msgid "Insufficient memory to display file in internal pager"
 msgstr "�� ������� ������ ��� ��������� ����� �� ���������� ������������"
 
-#: src/gnuwin32/pager.c:177
-#: src/gnuwin32/pager.c:189
-#: src/gnuwin32/pager.c:209
+#: src/gnuwin32/pager.c:176
+#: src/gnuwin32/pager.c:188
+#: src/gnuwin32/pager.c:208
 #: src/gnuwin32/rui.c:237
 #: src/gnuwin32/rui.c:264
 msgid "No selection"
 msgstr "��� ���������"
 
-#: src/gnuwin32/pager.c:306
-#: src/gnuwin32/pager.c:436
-#: src/gnuwin32/pager.c:480
+#: src/gnuwin32/pager.c:305
+#: src/gnuwin32/pager.c:435
+#: src/gnuwin32/pager.c:479
 msgid "Paste to console"
 msgstr "�������� �� �������"
 
-#: src/gnuwin32/pager.c:307
-#: src/gnuwin32/pager.c:441
-#: src/gnuwin32/pager.c:482
+#: src/gnuwin32/pager.c:306
+#: src/gnuwin32/pager.c:440
+#: src/gnuwin32/pager.c:481
 msgid "Paste commands to console"
 msgstr "�������� ������� �� �������"
 
-#: src/gnuwin32/pager.c:310
+#: src/gnuwin32/pager.c:309
 #: src/gnuwin32/rui.c:869
-#: src/library/utils/src/windows/dataentry.c:1703
-#: src/library/grDevices/src/devWindows.c:1686
+#: src/library/utils/src/windows/dataentry.c:1704
+#: src/library/grDevices/src/devWindows.c:1705
 msgid "Stay on top"
 msgstr "����������� ������"
 
-#: src/gnuwin32/pager.c:312
-#: src/gnuwin32/pager.c:475
-#: src/library/utils/src/windows/dataentry.c:1705
-#: src/library/utils/src/windows/dataentry.c:1792
+#: src/gnuwin32/pager.c:311
+#: src/gnuwin32/pager.c:474
+#: src/library/utils/src/windows/dataentry.c:1706
+#: src/library/utils/src/windows/dataentry.c:1793
 msgid "Close"
 msgstr "�������"
 
-#: src/gnuwin32/pager.c:472
+#: src/gnuwin32/pager.c:471
 #: src/gnuwin32/rui.c:1139
 msgid "Save to File..."
 msgstr "��������� � ����..."
 
-#: src/gnuwin32/pager.c:487
+#: src/gnuwin32/pager.c:486
 #: src/gnuwin32/rui.c:1156
 msgid "View"
 msgstr "���"
 
-#: src/gnuwin32/pager.c:519
+#: src/gnuwin32/pager.c:518
 msgid "Unable to create pager window"
 msgstr "�� ���� ������� ���� ������������"
 
@@ -822,56 +821,56 @@ msgstr "
 msgid "Console"
 msgstr "�������"
 
-#: src/gnuwin32/rui.c:1268
+#: src/gnuwin32/rui.c:1251
 msgid "'mname' is limited to 1000 bytes"
 msgstr "'mname' ����������: 1000 ������"
 
-#: src/gnuwin32/rui.c:1310
+#: src/gnuwin32/rui.c:1293
 #, c-format
 msgid "menu %s does not exist"
 msgstr "���� %s �� ����������"
 
-#: src/gnuwin32/rui.c:1363
+#: src/gnuwin32/rui.c:1346
 msgid "'menu' is limited to 500 bytes"
 msgstr "'menu' ����������: 500 ������"
 
-#: src/gnuwin32/rui.c:1373
+#: src/gnuwin32/rui.c:1356
 msgid "base menu does not exist"
 msgstr "������� ���� �� ����������"
 
-#: src/gnuwin32/rui.c:1388
+#: src/gnuwin32/rui.c:1371
 msgid "failed to allocate menu"
 msgstr "�� ���������� ���������� ����"
 
-#: src/gnuwin32/rui.c:1405
-#: src/gnuwin32/rui.c:1529
+#: src/gnuwin32/rui.c:1388
+#: src/gnuwin32/rui.c:1512
 msgid "menu + item is limited to 1000 bytes"
 msgstr "���� + ����� ���� ����������: 1000 ������"
 
-#: src/gnuwin32/rui.c:1413
-#: src/gnuwin32/rui.c:1496
+#: src/gnuwin32/rui.c:1396
+#: src/gnuwin32/rui.c:1479
 msgid "menu does not exist"
 msgstr "���� �� ����������"
 
-#: src/gnuwin32/rui.c:1431
-#: src/gnuwin32/rui.c:1454
-#: src/gnuwin32/rui.c:1459
+#: src/gnuwin32/rui.c:1414
+#: src/gnuwin32/rui.c:1437
+#: src/gnuwin32/rui.c:1442
 msgid "failed to allocate char storage"
 msgstr "�� ���������� ���������� ��������� ������"
 
-#: src/gnuwin32/rui.c:1467
+#: src/gnuwin32/rui.c:1450
 msgid "failed to allocate menuitem"
 msgstr "�� ���������� ���������� ����� ����"
 
-#: src/gnuwin32/rui.c:1519
+#: src/gnuwin32/rui.c:1502
 msgid "menu not found"
 msgstr "���� �� �������"
 
-#: src/gnuwin32/rui.c:1537
+#: src/gnuwin32/rui.c:1520
 msgid "menu or item does not exist"
 msgstr "���� ��� ����� ���� �� ����������"
 
-#: src/gnuwin32/system.c:442
+#: src/gnuwin32/system.c:447
 msgid "Save workspace image?"
 msgstr "��������� ������� ������������?"
 
@@ -880,47 +879,47 @@ msgstr "
 msgid "Insufficient memory: cell not copied to the clipboard"
 msgstr "���� ������: ������ �� ������������� � �����"
 
-#: src/extra/graphapp/dialogs.c:147
-#: src/extra/graphapp/dialogs.c:164
-#: src/extra/graphapp/dialogs.c:181
+#: src/extra/graphapp/dialogs.c:148
+#: src/extra/graphapp/dialogs.c:165
+#: src/extra/graphapp/dialogs.c:182
 msgid "Question"
 msgstr "������"
 
-#: src/extra/graphapp/dialogs.c:202
+#: src/extra/graphapp/dialogs.c:203
 msgid " Change working directory to:"
 msgstr " �������� ������� ����� ��:"
 
-#: src/extra/graphapp/dialogs.c:205
+#: src/extra/graphapp/dialogs.c:206
 #, c-format
 msgid "Unable to set '%s' as working directory"
 msgstr "�� ���� ���������� '%s' ��� ������� �����"
 
-#: src/extra/graphapp/dialogs.c:602
-#: src/extra/graphapp/dialogs.c:620
-#: src/extra/graphapp/dialogs.c:626
-#: src/extra/graphapp/dialogs.c:725
-#: src/extra/graphapp/dialogs.c:739
-#: src/extra/graphapp/dialogs.c:745
+#: src/extra/graphapp/dialogs.c:603
+#: src/extra/graphapp/dialogs.c:621
+#: src/extra/graphapp/dialogs.c:627
+#: src/extra/graphapp/dialogs.c:726
+#: src/extra/graphapp/dialogs.c:740
+#: src/extra/graphapp/dialogs.c:746
 #: src/library/utils/src/windows/widgets.c:125
 msgid "Cancel"
 msgstr "��������"
 
-#: src/extra/graphapp/dialogs.c:622
-#: src/extra/graphapp/dialogs.c:741
+#: src/extra/graphapp/dialogs.c:623
+#: src/extra/graphapp/dialogs.c:742
 #: src/library/utils/src/windows/widgets.c:124
 msgid "OK"
 msgstr "OK"
 
-#: src/extra/graphapp/dialogs.c:733
+#: src/extra/graphapp/dialogs.c:734
 msgid "User"
 msgstr "������������"
 
-#: src/extra/graphapp/dialogs.c:734
+#: src/extra/graphapp/dialogs.c:735
 msgid "Password"
 msgstr "������"
 
-#: src/extra/graphapp/dialogs.c:900
-#: src/extra/graphapp/dialogs.c:906
+#: src/extra/graphapp/dialogs.c:901
+#: src/extra/graphapp/dialogs.c:907
 #, c-format
 msgid "\"%s\" not found"
 msgstr "\"%s\" �� ������"
@@ -930,9 +929,9 @@ msgid "Arrange Icons"
 msgstr "����������� �����������"
 
 #: src/library/utils/src/windows/dataentry.c:223
-#: src/library/utils/src/windows/dataentry.c:1850
-#: src/library/utils/src/windows/dataentry.c:1853
-#: src/library/utils/src/windows/dataentry.c:1884
+#: src/library/utils/src/windows/dataentry.c:1851
+#: src/library/utils/src/windows/dataentry.c:1854
+#: src/library/utils/src/windows/dataentry.c:1885
 msgid "invalid argument"
 msgstr "������������ ��������"
 
@@ -944,17 +943,12 @@ msgstr "
 msgid "Data Editor"
 msgstr "�������� ������"
 
-#: src/library/utils/src/windows/dataentry.c:282
-#: src/library/utils/src/windows/dataentry.c:1891
-msgid "invalid device"
-msgstr "������������ ����������"
-
 #: src/library/utils/src/windows/dataentry.c:331
 msgid "dataentry: internal memory problem"
 msgstr "�������� ������: �������� � �������"
 
 #: src/library/utils/src/windows/dataentry.c:634
-#: src/library/utils/src/windows/dataentry.c:1221
+#: src/library/utils/src/windows/dataentry.c:1222
 msgid "dataentry: internal memory error"
 msgstr "�������� ������: ������ ������"
 
@@ -963,43 +957,43 @@ msgstr "
 msgid "internal type error in dataentry"
 msgstr "���������� ������ � ��������� ������"
 
-#: src/library/utils/src/windows/dataentry.c:852
+#: src/library/utils/src/windows/dataentry.c:853
 msgid "dataentry: parse error on string"
 msgstr "�������� ������: ������ ��������� ������"
 
-#: src/library/utils/src/windows/dataentry.c:995
+#: src/library/utils/src/windows/dataentry.c:996
 msgid "dataentry: expression too long"
 msgstr "�������� ������: ������� ������� ���������"
 
-#: src/library/utils/src/windows/dataentry.c:1472
+#: src/library/utils/src/windows/dataentry.c:1473
 msgid "column names cannot be blank"
 msgstr "����� ������� �� ����� ���� �������"
 
-#: src/library/utils/src/windows/dataentry.c:1518
+#: src/library/utils/src/windows/dataentry.c:1519
 msgid "Variable editor"
 msgstr "�������� ����������"
 
-#: src/library/utils/src/windows/dataentry.c:1523
+#: src/library/utils/src/windows/dataentry.c:1524
 msgid "variable name"
 msgstr "��� ����������"
 
-#: src/library/utils/src/windows/dataentry.c:1525
+#: src/library/utils/src/windows/dataentry.c:1526
 msgid "type"
 msgstr "���"
 
-#: src/library/utils/src/windows/dataentry.c:1639
+#: src/library/utils/src/windows/dataentry.c:1640
 msgid "Cell width(s)"
 msgstr "������ ������ (�����)"
 
-#: src/library/utils/src/windows/dataentry.c:1645
+#: src/library/utils/src/windows/dataentry.c:1646
 msgid "Cell width"
 msgstr "������ ������"
 
-#: src/library/utils/src/windows/dataentry.c:1648
+#: src/library/utils/src/windows/dataentry.c:1649
 msgid "variable"
 msgstr "����������"
 
-#: src/library/utils/src/windows/dataentry.c:1691
+#: src/library/utils/src/windows/dataentry.c:1692
 msgid ""
 "Navigation.\n"
 "  Keyboard: cursor keys move selection\n"
@@ -1041,221 +1035,224 @@ msgstr ""
 "  Right-click ���� ��� �����������, ������� � ������� ������ �������\n"
 "\n"
 
-#: src/library/utils/src/windows/dataentry.c:1699
+#: src/library/utils/src/windows/dataentry.c:1700
 msgid "Copy selected cell"
 msgstr "���������� ���������� ������"
 
-#: src/library/utils/src/windows/dataentry.c:1700
+#: src/library/utils/src/windows/dataentry.c:1701
 msgid "Paste to selected cell"
 msgstr "�������� � ���������� ������"
 
-#: src/library/utils/src/windows/dataentry.c:1701
+#: src/library/utils/src/windows/dataentry.c:1702
 msgid "Autosize column"
 msgstr "���������� ������ �������"
 
-#: src/library/utils/src/windows/dataentry.c:1797
+#: src/library/utils/src/windows/dataentry.c:1798
 msgid "Copy  \tCTRL+C"
 msgstr "���������� \tCTRL+C"
 
-#: src/library/utils/src/windows/dataentry.c:1799
+#: src/library/utils/src/windows/dataentry.c:1800
 msgid "Paste \tCTRL+V"
 msgstr "�������� \tCTRL+V"
 
-#: src/library/utils/src/windows/dataentry.c:1801
+#: src/library/utils/src/windows/dataentry.c:1802
 msgid "Delete\tDEL"
 msgstr "�������\tDEL"
 
-#: src/library/utils/src/windows/dataentry.c:1804
+#: src/library/utils/src/windows/dataentry.c:1805
 msgid "Cell widths ..."
 msgstr "������ �����..."
 
-#: src/library/utils/src/windows/dataentry.c:1808
+#: src/library/utils/src/windows/dataentry.c:1809
 msgid "Data editor"
 msgstr "�������� ������"
 
-#: src/library/grDevices/src/devWindows.c:932
+#: src/library/grDevices/src/devWindows.c:949
 msgid "Portable network graphics file"
 msgstr "���� PNG"
 
-#: src/library/grDevices/src/devWindows.c:935
+#: src/library/grDevices/src/devWindows.c:952
 msgid "Windows bitmap file"
 msgstr "��������� ���� Windows"
 
-#: src/library/grDevices/src/devWindows.c:938
+#: src/library/grDevices/src/devWindows.c:955
 msgid "TIFF file"
 msgstr "���� TIFF"
 
-#: src/library/grDevices/src/devWindows.c:941
+#: src/library/grDevices/src/devWindows.c:958
 msgid "Jpeg file"
 msgstr "���� JPEG"
 
-#: src/library/grDevices/src/devWindows.c:963
+#: src/library/grDevices/src/devWindows.c:980
 msgid "Postscript file"
 msgstr "���� PostScript"
 
-#: src/library/grDevices/src/devWindows.c:975
+#: src/library/grDevices/src/devWindows.c:992
 msgid "PDF file"
 msgstr "���� PDF"
 
-#: src/library/grDevices/src/devWindows.c:987
+#: src/library/grDevices/src/devWindows.c:1004
 msgid "Enhanced metafiles"
 msgstr "���������� ��������� Windows"
 
-#: src/library/grDevices/src/devWindows.c:990
-#: src/library/grDevices/src/devWindows.c:3436
+#: src/library/grDevices/src/devWindows.c:1007
+#: src/library/grDevices/src/devWindows.c:3445
 msgid "file path selected is too long: only 512 bytes are allowed"
 msgstr "��������� �������� ���� ������� �������: ����� ������ 512 ����"
 
-#: src/library/grDevices/src/devWindows.c:1201
+#: src/library/grDevices/src/devWindows.c:1218
 msgid "No plot to replace!"
 msgstr "��� ������� ��� ������!"
 
-#: src/library/grDevices/src/devWindows.c:1249
+#: src/library/grDevices/src/devWindows.c:1268
 msgid "Variable name"
 msgstr "��� ����������"
 
-#: src/library/grDevices/src/devWindows.c:1258
+#: src/library/grDevices/src/devWindows.c:1277
 msgid "Variable doesn't contain any plots!"
 msgstr "���������� �� �������� ��������!"
 
-#: src/library/grDevices/src/devWindows.c:1273
+#: src/library/grDevices/src/devWindows.c:1292
 msgid "Name of variable to save to"
 msgstr "��� ���������� ��� ���������� �"
 
-#: src/library/grDevices/src/devWindows.c:1582
+#: src/library/grDevices/src/devWindows.c:1601
 msgid "Copy to the clipboard as a metafile"
 msgstr "���������� � ����� ������ ��� ��������"
 
-#: src/library/grDevices/src/devWindows.c:1600
-#: src/library/grDevices/src/devWindows.c:1611
+#: src/library/grDevices/src/devWindows.c:1619
+#: src/library/grDevices/src/devWindows.c:1630
 msgid "Stop locator"
 msgstr "���������� �������"
 
-#: src/library/grDevices/src/devWindows.c:1610
-#: src/library/grDevices/src/devWindows.c:1614
+#: src/library/grDevices/src/devWindows.c:1629
+#: src/library/grDevices/src/devWindows.c:1633
 msgid "Stop"
 msgstr "����������"
 
-#: src/library/grDevices/src/devWindows.c:1616
+#: src/library/grDevices/src/devWindows.c:1635
 msgid "Continue"
 msgstr "����������"
 
-#: src/library/grDevices/src/devWindows.c:1620
+#: src/library/grDevices/src/devWindows.c:1639
 msgid "Next"
 msgstr "���������"
 
-#: src/library/grDevices/src/devWindows.c:1621
+#: src/library/grDevices/src/devWindows.c:1640
 msgid "Next plot"
 msgstr "��������� ������"
 
-#: src/library/grDevices/src/devWindows.c:1627
+#: src/library/grDevices/src/devWindows.c:1646
 msgid "Save as"
 msgstr "��������� ���"
 
-#: src/library/grDevices/src/devWindows.c:1636
-#: src/library/grDevices/src/devWindows.c:1638
-#: src/library/grDevices/src/devWindows.c:1640
+#: src/library/grDevices/src/devWindows.c:1655
+#: src/library/grDevices/src/devWindows.c:1657
+#: src/library/grDevices/src/devWindows.c:1659
 #, c-format
 msgid "%s quality..."
 msgstr "�������� %s..."
 
-#: src/library/grDevices/src/devWindows.c:1642
+#: src/library/grDevices/src/devWindows.c:1661
 msgid "Copy to the clipboard"
 msgstr "���������� � ����� ������"
 
-#: src/library/grDevices/src/devWindows.c:1643
+#: src/library/grDevices/src/devWindows.c:1662
 msgid "as a Bitmap\tCTRL+C"
 msgstr "��� ��������� ���� Windows\tCTRL+C"
 
-#: src/library/grDevices/src/devWindows.c:1644
+#: src/library/grDevices/src/devWindows.c:1663
 msgid "as a Metafile\tCTRL+W"
 msgstr "��� ��������\tCTRL+W"
 
-#: src/library/grDevices/src/devWindows.c:1647
+#: src/library/grDevices/src/devWindows.c:1666
 msgid "Print...\tCTRL+P"
 msgstr "��������...\tCTRL+P"
 
-#: src/library/grDevices/src/devWindows.c:1649
+#: src/library/grDevices/src/devWindows.c:1668
 msgid "close Device"
 msgstr "������� ����������"
 
-#: src/library/grDevices/src/devWindows.c:1650
+#: src/library/grDevices/src/devWindows.c:1669
 msgid "History"
 msgstr "������� ������"
 
-#: src/library/grDevices/src/devWindows.c:1651
+#: src/library/grDevices/src/devWindows.c:1670
 msgid "Recording"
 msgstr "������"
 
-#: src/library/grDevices/src/devWindows.c:1654
+#: src/library/grDevices/src/devWindows.c:1673
 msgid "Add\tINS"
 msgstr "���������\tINS"
 
-#: src/library/grDevices/src/devWindows.c:1655
+#: src/library/grDevices/src/devWindows.c:1674
 msgid "Replace"
 msgstr "��������"
 
-#: src/library/grDevices/src/devWindows.c:1657
+#: src/library/grDevices/src/devWindows.c:1676
 msgid "Previous\tPgUp"
 msgstr "����������\tPgUp"
 
-#: src/library/grDevices/src/devWindows.c:1658
+#: src/library/grDevices/src/devWindows.c:1677
 msgid "Next\tPgDown"
 msgstr "���������\tPgDn"
 
-#: src/library/grDevices/src/devWindows.c:1660
+#: src/library/grDevices/src/devWindows.c:1679
 msgid "Save to variable..."
 msgstr "��������� � ����������..."
 
-#: src/library/grDevices/src/devWindows.c:1661
+#: src/library/grDevices/src/devWindows.c:1680
 msgid "Get from variable..."
 msgstr "����� �� ����������..."
 
-#: src/library/grDevices/src/devWindows.c:1663
+#: src/library/grDevices/src/devWindows.c:1682
 msgid "Clear history"
 msgstr "�������� �������"
 
-#: src/library/grDevices/src/devWindows.c:1664
+#: src/library/grDevices/src/devWindows.c:1683
 msgid "Resize"
 msgstr "�������� ������"
 
-#: src/library/grDevices/src/devWindows.c:1665
+#: src/library/grDevices/src/devWindows.c:1684
 msgid "R mode"
 msgstr "����� R"
 
-#: src/library/grDevices/src/devWindows.c:1667
+#: src/library/grDevices/src/devWindows.c:1686
 msgid "Fit to window"
 msgstr "��������� ��� ����"
 
-#: src/library/grDevices/src/devWindows.c:1669
+#: src/library/grDevices/src/devWindows.c:1688
 msgid "Fixed size"
 msgstr "������������� ������"
 
-#: src/library/grDevices/src/devWindows.c:1676
+#: src/library/grDevices/src/devWindows.c:1695
 msgid "Copy as metafile"
 msgstr "����������� ��� ��������"
 
-#: src/library/grDevices/src/devWindows.c:1678
+#: src/library/grDevices/src/devWindows.c:1697
 msgid "Copy as bitmap"
 msgstr "����������� ��� ��������� ���� Windows"
 
-#: src/library/grDevices/src/devWindows.c:1681
+#: src/library/grDevices/src/devWindows.c:1700
 msgid "Save as metafile..."
 msgstr "��������� ��� ��������..."
 
-#: src/library/grDevices/src/devWindows.c:1683
+#: src/library/grDevices/src/devWindows.c:1702
 msgid "Save as postscript..."
 msgstr "��������� ��� PostScript..."
 
-#: src/library/grDevices/src/devWindows.c:3136
+#: src/library/grDevices/src/devWindows.c:3143
 msgid "Locator is active"
 msgstr "������� �������"
 
-#: src/library/grDevices/src/devWindows.c:3763
+#: src/library/grDevices/src/devWindows.c:3769
 msgid "Waiting to confirm page change..."
 msgstr "������ ������������� ����� ��������..."
 
-#: src/library/grDevices/src/devWindows.c:3775
+#: src/library/grDevices/src/devWindows.c:3781
 msgid "Click or hit ENTER for next page"
 msgstr "��������� ��������: �������� ��� ������� ENTER "
 
+#~ msgid "invalid device"
+#~ msgstr "������������ ����������"
+
diff --git a/src/library/base/po/RGui-tr.po b/src/library/base/po/RGui-tr.po
index 2b69182..543d2bd 100644
--- a/src/library/base/po/RGui-tr.po
+++ b/src/library/base/po/RGui-tr.po
@@ -9,7 +9,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: R 2.13.0\n"
 "Report-Msgid-Bugs-To: bugs.r-project.org\n"
-"POT-Creation-Date: 2013-03-18 19:36+0000\n"
+"POT-Creation-Date: 2016-04-01 10:28-0700\n"
 "PO-Revision-Date: 2011-04-02 18:17+0200\n"
 "Last-Translator: Murat Alkan <muratalk at gmail.com>\n"
 "Language-Team: Turkish <muratalk at gmail.com>\n"
@@ -33,11 +33,11 @@ msgstr "Yetersiz bellek: metin panoya kopyalanmadı"
 msgid "Unable to open the clipboard"
 msgstr "Pano açılamadı"
 
-#: src/gnuwin32/console.c:1914
+#: src/gnuwin32/console.c:1919
 msgid "Insufficient memory. Please close the console"
 msgstr "Yetersiz bellek. Lütfen konsolu kapatın"
 
-#: src/gnuwin32/console.c:1969 src/gnuwin32/console.c:2022
+#: src/gnuwin32/console.c:1974 src/gnuwin32/console.c:2028
 #: src/gnuwin32/preferences.c:333
 #, c-format
 msgid ""
@@ -47,23 +47,23 @@ msgstr ""
 "Yazıtipi %s-%d-%d bulunamadı.\n"
 "Sistemde gömülü yazıtipi kullanılıyor"
 
-#: src/gnuwin32/console.c:2127
+#: src/gnuwin32/console.c:2133
 msgid "Save selection to"
 msgstr "Seçileni kaydet"
 
-#: src/gnuwin32/console.c:2129
+#: src/gnuwin32/console.c:2135
 msgid "Save console contents to"
 msgstr "Konsol içeriklerini dosyaya kaydet "
 
-#: src/gnuwin32/console.c:2228
+#: src/gnuwin32/console.c:2234
 msgid "Scrolling.\n"
 msgstr "Kaydırma.\n"
 
-#: src/gnuwin32/console.c:2229
+#: src/gnuwin32/console.c:2235
 msgid "  Keyboard: PgUp, PgDown, Ctrl+Arrows, Ctrl+Home, Ctrl+End,\n"
 msgstr "Klavye: PgUp, PgDown, Ctrl+Ok Tuşları, Ctrl+Home, Ctrl+End,\n"
 
-#: src/gnuwin32/console.c:2230
+#: src/gnuwin32/console.c:2236
 msgid ""
 "  Mouse: use the scrollbar(s).\n"
 "\n"
@@ -71,104 +71,104 @@ msgstr ""
 "  Fare: kaydırma çubuklarını kullan.\n"
 "\n"
 
-#: src/gnuwin32/console.c:2231
+#: src/gnuwin32/console.c:2237
 msgid "Editing.\n"
 msgstr "Düzenleme.\n"
 
-#: src/gnuwin32/console.c:2232
+#: src/gnuwin32/console.c:2238
 msgid "  Moving the cursor: \n"
 msgstr "  İmleç hareket ettirme: \n"
 
-#: src/gnuwin32/console.c:2233
+#: src/gnuwin32/console.c:2239
 msgid "     Left arrow or Ctrl+B: move backward one character;\n"
 msgstr "     Sol ok yada Ctrl+B: bir karakter geri git;\n"
 
-#: src/gnuwin32/console.c:2234
+#: src/gnuwin32/console.c:2240
 msgid "     Right arrow or Ctrl+F: move forward one character;\n"
 msgstr "     Sağ ok yada Ctrl+F: bir karakter ileri git;\n"
 
-#: src/gnuwin32/console.c:2235
+#: src/gnuwin32/console.c:2241
 msgid "     Home or Ctrl+A: go to beginning of line;\n"
 msgstr "     Home tuşu yada Ctrl+A: satır başına git;\n"
 
-#: src/gnuwin32/console.c:2236
+#: src/gnuwin32/console.c:2242
 msgid "     End or Ctrl+E: go to end of line;\n"
 msgstr "     End tuşu yada Ctrl+E: satır sonuna git;\n"
 
-#: src/gnuwin32/console.c:2237
+#: src/gnuwin32/console.c:2243
 msgid "  History: Up and Down Arrows, Ctrl+P, Ctrl+N\n"
 msgstr "  Geçmiş: Aşağı ve Yukarı Oklar, Ctrl+P, Ctrl+N\n"
 
-#: src/gnuwin32/console.c:2238
+#: src/gnuwin32/console.c:2244
 msgid "  Deleting:\n"
 msgstr "  Silme:\n"
 
-#: src/gnuwin32/console.c:2239
+#: src/gnuwin32/console.c:2245
 msgid "     Del or Ctrl+D: delete current character or selection;\n"
 msgstr "     Del tuşu yada Ctrl+D: geçerli seçimi yada karakteri sil;\n"
 
-#: src/gnuwin32/console.c:2240
+#: src/gnuwin32/console.c:2246
 msgid "     Backspace: delete preceding character;\n"
 msgstr "     Backspace: önceki karakteri sil;\n"
 
-#: src/gnuwin32/console.c:2241
+#: src/gnuwin32/console.c:2247
 msgid ""
 "     Ctrl+Del or Ctrl+K: delete text from current character to end of line.\n"
 msgstr ""
 "     Ctrl+Del yada Ctrl+K: metni geçerli karakterden satır sonuna kadar "
 "sil.\n"
 
-#: src/gnuwin32/console.c:2242
+#: src/gnuwin32/console.c:2248
 msgid "     Ctrl+U: delete all text from current line.\n"
 msgstr "     Ctrl+U: geçerli satırdaki tüm metni sil.\n"
 
-#: src/gnuwin32/console.c:2243
+#: src/gnuwin32/console.c:2249
 msgid "  Copy and paste.\n"
 msgstr "  Kopyalama ve yapıştırma.\n"
 
-#: src/gnuwin32/console.c:2244
+#: src/gnuwin32/console.c:2250
 msgid ""
 "     Use the mouse (with the left button held down) to mark (select) text.\n"
 msgstr ""
 "     Metni işaretlemek (seçmek) için fareyi (sol tuşuna basılı tutarak) "
 "kullan.\n"
 
-#: src/gnuwin32/console.c:2245
+#: src/gnuwin32/console.c:2251
 msgid ""
 "     Use Shift+Del (or Ctrl+C) to copy the marked text to the clipboard and\n"
 msgstr "     Seçili metni panoya kopyalamak Shift+Del (veya Ctrl+C), \n"
 
-#: src/gnuwin32/console.c:2246
+#: src/gnuwin32/console.c:2252
 msgid ""
 "     Shift+Ins (or Ctrl+V or Ctrl+Y) to paste the content of the clipboard "
 "(if any)  \n"
 msgstr "      (eğer varsa) pano içeriğini konsola yapıştırmak için\n"
 
-#: src/gnuwin32/console.c:2247
+#: src/gnuwin32/console.c:2253
 msgid "     to the console, Ctrl+X first copy then paste\n"
 msgstr ""
 "     Shift+Ins (veya Ctrl+V veya Ctrl+Y) kısayollarını kullanın,\n"
 "     Ctrl+X önce kopyalar ardından yapıştırır.\n"
 
-#: src/gnuwin32/console.c:2248
+#: src/gnuwin32/console.c:2254
 msgid "  Misc:\n"
 msgstr "  Diğer:\n"
 
-#: src/gnuwin32/console.c:2249
+#: src/gnuwin32/console.c:2255
 msgid "     Ctrl+L: Clear the console.\n"
 msgstr "     Ctrl+L: Konsolu temizle.\n"
 
-#: src/gnuwin32/console.c:2250
+#: src/gnuwin32/console.c:2256
 msgid "     Ctrl+O or INS: Toggle overwrite mode: initially off.\n"
 msgstr ""
 "     Ctrl+O veya INS: Üstüne yazma modunu değiştir: başlangıçta kapalıdır.\n"
 
-#: src/gnuwin32/console.c:2251
+#: src/gnuwin32/console.c:2257
 msgid "     Ctrl+T: Interchange current char with one to the left.\n"
 msgstr ""
 "     Ctrl+T: Geçerli karakteri soldakiyle karşılıklı olarak değiştir.\n"
 
-#: src/gnuwin32/console.c:2252
+#: src/gnuwin32/console.c:2258
 msgid ""
 "\n"
 "Note: Console is updated only when some input is required.\n"
@@ -176,7 +176,7 @@ msgstr ""
 "\n"
 "Not: Konsol sadece bir veri girişi gerektiğinde güncellenir.\n"
 
-#: src/gnuwin32/console.c:2253
+#: src/gnuwin32/console.c:2259
 msgid ""
 "  Use Ctrl+W to toggle this feature off/on.\n"
 "\n"
@@ -184,7 +184,7 @@ msgstr ""
 "  Bu özelliği açıp kapatmak için Ctrl+W kısayolunu kullanın.\n"
 "\n"
 
-#: src/gnuwin32/console.c:2254
+#: src/gnuwin32/console.c:2260
 msgid ""
 "Use ESC to stop the interpreter.\n"
 "\n"
@@ -192,7 +192,7 @@ msgstr ""
 "Yorumlamayı durdurmak için ESC tuşunu kullanın.\n"
 "\n"
 
-#: src/gnuwin32/console.c:2255
+#: src/gnuwin32/console.c:2261
 msgid ""
 "TAB starts completion of the current word.\n"
 "\n"
@@ -200,270 +200,271 @@ msgstr ""
 "TAB geçerli kelimenin tamamlanması işlemini başlatır.\n"
 "\n"
 
-#: src/gnuwin32/console.c:2256
+#: src/gnuwin32/console.c:2262
 msgid "Standard Windows hotkeys can be used to switch to the\n"
 msgstr "Grafik aygıtına geçmek için Standart Windows kısayolları\n"
 
-#: src/gnuwin32/console.c:2257
+#: src/gnuwin32/console.c:2263
 msgid "graphics device (Ctrl+Tab or Ctrl+F6 in MDI, Alt+Tab in SDI)"
 msgstr ""
 "kullanılabilir  (Çoklu pencerede Ctrl+Tab ve Ctrl+F6i, Tekli pencerede Alt"
 "+Tab)"
 
-#: src/gnuwin32/editor.c:88 src/gnuwin32/editor.c:90
+#: src/gnuwin32/editor.c:91 src/gnuwin32/editor.c:93
 msgid "R Editor"
 msgstr "R Düzenleyici"
 
-#: src/gnuwin32/editor.c:119
+#: src/gnuwin32/editor.c:123
 #, c-format
 msgid "unable to open file %s for reading"
 msgstr "%s dosyası okumak için açılamadı"
 
-#: src/gnuwin32/editor.c:135
+#: src/gnuwin32/editor.c:139
 #, c-format
 msgid "Could not read from file '%s'"
 msgstr "'%s' dosyasından okunamadı"
 
-#: src/gnuwin32/editor.c:166
+#: src/gnuwin32/editor.c:171
 #, c-format
 msgid "Could not save file '%s'"
 msgstr "'%s' dosyası kaydedilemedi"
 
-#: src/gnuwin32/editor.c:182
+#: src/gnuwin32/editor.c:187
 msgid "Save script as"
 msgstr "Betiği farklı kaydet"
 
-#: src/gnuwin32/editor.c:377 src/gnuwin32/editor.c:694
-#: src/gnuwin32/pager.c:431 src/gnuwin32/rui.c:1076
+#: src/gnuwin32/editor.c:379 src/gnuwin32/editor.c:696
+#: src/gnuwin32/pager.c:430 src/gnuwin32/rui.c:1076
 msgid "Open script"
 msgstr "Betik aç"
 
-#: src/gnuwin32/editor.c:500 src/gnuwin32/pager.c:185 src/gnuwin32/pager.c:205
+#: src/gnuwin32/editor.c:502 src/gnuwin32/pager.c:184 src/gnuwin32/pager.c:204
 msgid "No RGui console to paste to"
 msgstr "Yapıştırılacak RGui konsolu yok"
 
-#: src/gnuwin32/editor.c:602
+#: src/gnuwin32/editor.c:604
 msgid "R EDITOR\n"
 msgstr "R DÜZENLEYİCİ\n"
 
-#: src/gnuwin32/editor.c:604
+#: src/gnuwin32/editor.c:606
 msgid "A standard text editor for editing and running R code.\n"
 msgstr ""
 "R kodunu düzenlemek ve çalıştırmak için bir standart metin düzenleyicidir.\n"
 
-#: src/gnuwin32/editor.c:606
+#: src/gnuwin32/editor.c:608
 msgid "RUNNING COMMANDS\n"
 msgstr "KOMUT ÇALIŞTIRMA\n"
 
-#: src/gnuwin32/editor.c:607
+#: src/gnuwin32/editor.c:609
 msgid "To run a line or section of R code, select the code and either\n"
 msgstr ""
 "R kodunun bir satırını veya bölgesini çalıştırmak için, kodu seçin ve:\n"
 
-#: src/gnuwin32/editor.c:608
+#: src/gnuwin32/editor.c:610
 msgid "     Press Ctrl-R\n"
 msgstr "     Ctrl-R'ye basın\n"
 
-#: src/gnuwin32/editor.c:609
+#: src/gnuwin32/editor.c:611
 msgid "     Select \"Run line or selection\" from the \"Edit\" menu\n"
 msgstr "     Düzenle menüsünden \"Satırı veya seçimi çalıştır\"ı seçin\n"
 
-#: src/gnuwin32/editor.c:610
+#: src/gnuwin32/editor.c:612
 msgid "     Press the \"Run line or selection\" icon on the toolbar\n"
 msgstr ""
 "     Araç çubuğundan \"Satırı veya seçimi çalıştır\" simgesine tıklayın\n"
 "işlemlerinden birin yapın.\n"
 
-#: src/gnuwin32/editor.c:611
+#: src/gnuwin32/editor.c:613
 msgid ""
 "This will copy the selected commands to the console and evaluate them.\n"
 msgstr "Bu işlem, seçili komutları konsola kopyalayacak ve değerlendirecek.\n"
 
-#: src/gnuwin32/editor.c:612
+#: src/gnuwin32/editor.c:614
 msgid ""
 "If there is no selection, this will just run the current line and advance\n"
 msgstr "Seçim yoksa, bu işlem sadece geçerli satırı çalıştıracak ve\n"
 
-#: src/gnuwin32/editor.c:613
+#: src/gnuwin32/editor.c:615
 msgid "the cursor by one line.\n"
 msgstr "imleci bir satır devam ettirecek.\n"
 
-#: src/gnuwin32/editor.c:625 src/gnuwin32/editor.c:702
-#: src/gnuwin32/editor.c:760
+#: src/gnuwin32/editor.c:627 src/gnuwin32/editor.c:704
+#: src/gnuwin32/editor.c:762
 msgid "Run line or selection"
 msgstr "Satırı yada seçimi çalıştır"
 
-#: src/gnuwin32/editor.c:627 src/gnuwin32/editor.c:745
+#: src/gnuwin32/editor.c:629 src/gnuwin32/editor.c:747
 msgid "Undo"
 msgstr "Geri al"
 
-#: src/gnuwin32/editor.c:629 src/gnuwin32/editor.c:748
+#: src/gnuwin32/editor.c:631 src/gnuwin32/editor.c:750
 msgid "Cut"
 msgstr "Kes"
 
-#: src/gnuwin32/editor.c:630 src/gnuwin32/editor.c:750
-#: src/gnuwin32/pager.c:305 src/gnuwin32/pager.c:478 src/gnuwin32/rui.c:859
+#: src/gnuwin32/editor.c:632 src/gnuwin32/editor.c:752
+#: src/gnuwin32/pager.c:304 src/gnuwin32/pager.c:477 src/gnuwin32/rui.c:859
 #: src/gnuwin32/rui.c:1088 src/gnuwin32/rui.c:1144
 msgid "Copy"
 msgstr "Kopyala "
 
-#: src/gnuwin32/editor.c:631 src/gnuwin32/editor.c:752 src/gnuwin32/rui.c:860
+#: src/gnuwin32/editor.c:633 src/gnuwin32/editor.c:754 src/gnuwin32/rui.c:860
 #: src/gnuwin32/rui.c:1092 src/gnuwin32/rui.c:1145
 msgid "Paste"
 msgstr "Yapıştır"
 
-#: src/gnuwin32/editor.c:632 src/gnuwin32/editor.c:754
+#: src/gnuwin32/editor.c:634 src/gnuwin32/editor.c:756
 msgid "Delete"
 msgstr "Sil"
 
-#: src/gnuwin32/editor.c:634 src/gnuwin32/editor.c:756
-#: src/gnuwin32/pager.c:308 src/gnuwin32/pager.c:484 src/gnuwin32/rui.c:866
+#: src/gnuwin32/editor.c:636 src/gnuwin32/editor.c:758
+#: src/gnuwin32/pager.c:307 src/gnuwin32/pager.c:483 src/gnuwin32/rui.c:866
 #: src/gnuwin32/rui.c:1149
 msgid "Select all"
 msgstr "Tümünü seç"
 
-#: src/gnuwin32/editor.c:698
+#: src/gnuwin32/editor.c:700
 msgid "Save script"
 msgstr "Betiği kaydet"
 
-#: src/gnuwin32/editor.c:706 src/gnuwin32/pager.c:451
-#: src/library/grDevices/src/devWindows.c:1594
+#: src/gnuwin32/editor.c:708 src/gnuwin32/pager.c:450
+#: src/library/grDevices/src/devWindows.c:1613
 msgid "Return focus to Console"
 msgstr "Konsola dön"
 
-#: src/gnuwin32/editor.c:709
+#: src/gnuwin32/editor.c:711
 msgid "Print script"
 msgstr "Betiği yazdır"
 
-#: src/gnuwin32/editor.c:711 src/gnuwin32/pager.c:446 src/gnuwin32/rui.c:1104
-#: src/library/grDevices/src/devWindows.c:1588
+#: src/gnuwin32/editor.c:713 src/gnuwin32/pager.c:445 src/gnuwin32/rui.c:1104
+#: src/library/grDevices/src/devWindows.c:1607
 msgid "Print"
 msgstr "Yazdır"
 
-#: src/gnuwin32/editor.c:729 src/gnuwin32/pager.c:467 src/gnuwin32/rui.c:1122
-#: src/library/utils/src/windows/dataentry.c:1790
-#: src/library/grDevices/src/devWindows.c:1626
+#: src/gnuwin32/editor.c:731 src/gnuwin32/pager.c:466 src/gnuwin32/rui.c:1122
+#: src/library/utils/src/windows/dataentry.c:1791
+#: src/library/grDevices/src/devWindows.c:1645
 msgid "File"
 msgstr "Dosya"
 
-#: src/gnuwin32/editor.c:730 src/gnuwin32/pager.c:468 src/gnuwin32/rui.c:1124
+#: src/gnuwin32/editor.c:732 src/gnuwin32/pager.c:467 src/gnuwin32/rui.c:1124
 msgid "New script"
 msgstr "Yeni betik"
 
-#: src/gnuwin32/editor.c:732 src/gnuwin32/pager.c:469 src/gnuwin32/rui.c:1125
+#: src/gnuwin32/editor.c:734 src/gnuwin32/pager.c:468 src/gnuwin32/rui.c:1125
 msgid "Open script..."
 msgstr "Betik aç..."
 
-#: src/gnuwin32/editor.c:734
+#: src/gnuwin32/editor.c:736
 msgid "Save"
 msgstr "Kaydet"
 
-#: src/gnuwin32/editor.c:736
+#: src/gnuwin32/editor.c:738
 msgid "Save as..."
 msgstr "Farklı kaydet ... "
 
-#: src/gnuwin32/editor.c:739 src/gnuwin32/pager.c:470 src/gnuwin32/rui.c:1138
-#: src/library/grDevices/src/devWindows.c:1689
+#: src/gnuwin32/editor.c:741 src/gnuwin32/pager.c:469 src/gnuwin32/rui.c:1138
+#: src/library/grDevices/src/devWindows.c:1666
+#: src/library/grDevices/src/devWindows.c:1708
 msgid "Print..."
 msgstr "Yazdır..."
 
-#: src/gnuwin32/editor.c:742
+#: src/gnuwin32/editor.c:744
 msgid "Close script"
 msgstr "Betiği kapat"
 
-#: src/gnuwin32/editor.c:744 src/gnuwin32/pager.c:477 src/gnuwin32/rui.c:1143
-#: src/library/utils/src/windows/dataentry.c:1796
+#: src/gnuwin32/editor.c:746 src/gnuwin32/pager.c:476 src/gnuwin32/rui.c:1143
+#: src/library/utils/src/windows/dataentry.c:1797
 msgid "Edit"
 msgstr "Düzenle"
 
-#: src/gnuwin32/editor.c:758 src/gnuwin32/rui.c:1150
+#: src/gnuwin32/editor.c:760 src/gnuwin32/rui.c:1150
 msgid "Clear console"
 msgstr "Konsolu temizle"
 
-#: src/gnuwin32/editor.c:762
+#: src/gnuwin32/editor.c:764
 msgid "Run all"
 msgstr "Hepsini çalıştır"
 
-#: src/gnuwin32/editor.c:765
+#: src/gnuwin32/editor.c:767
 msgid "Find..."
 msgstr "Bul..."
 
-#: src/gnuwin32/editor.c:767
+#: src/gnuwin32/editor.c:769
 msgid "Replace..."
 msgstr "Değiştir..."
 
-#: src/gnuwin32/editor.c:770 src/gnuwin32/rui.c:1154
+#: src/gnuwin32/editor.c:772 src/gnuwin32/rui.c:1154
 msgid "GUI preferences..."
 msgstr "Arabirim tercihleri..."
 
-#: src/gnuwin32/editor.c:780 src/gnuwin32/rui.c:1186
-#: src/library/utils/src/windows/dataentry.c:1697
-#: src/library/utils/src/windows/dataentry.c:1807
+#: src/gnuwin32/editor.c:782 src/gnuwin32/rui.c:1186
+#: src/library/utils/src/windows/dataentry.c:1698
+#: src/library/utils/src/windows/dataentry.c:1808
 msgid "Help"
 msgstr "Yardım"
 
-#: src/gnuwin32/editor.c:781
+#: src/gnuwin32/editor.c:783
 msgid "Editor"
 msgstr "Düzenleyici"
 
-#: src/gnuwin32/editor.c:840
+#: src/gnuwin32/editor.c:842
 msgid "Maximum number of editors reached"
 msgstr "Maksimum düzenleyici sayısına erişildi"
 
-#: src/gnuwin32/editor.c:845
+#: src/gnuwin32/editor.c:847
 msgid "Unable to create editor window"
 msgstr "Düzenleyici penceresi oluşturulamadı"
 
-#: src/gnuwin32/editor.c:853
+#: src/gnuwin32/editor.c:855
 msgid "Untitled"
 msgstr "İsimsiz "
 
-#: src/gnuwin32/extra.c:823 src/gnuwin32/rui.c:1224
+#: src/gnuwin32/extra.c:825
 msgid "Select file"
 msgstr "Dosya seç"
 
-#: src/gnuwin32/pager.c:89
+#: src/gnuwin32/pager.c:88
 msgid "Error opening file"
 msgstr "Dosyayı açarken hata"
 
-#: src/gnuwin32/pager.c:96
+#: src/gnuwin32/pager.c:95
 msgid "Insufficient memory to display file in internal pager"
 msgstr "Dosyayı iç sayfalayıcıda göstermek için yetersiz bellek"
 
-#: src/gnuwin32/pager.c:177 src/gnuwin32/pager.c:189 src/gnuwin32/pager.c:209
+#: src/gnuwin32/pager.c:176 src/gnuwin32/pager.c:188 src/gnuwin32/pager.c:208
 #: src/gnuwin32/rui.c:237 src/gnuwin32/rui.c:264
 msgid "No selection"
 msgstr "Seçim yok"
 
-#: src/gnuwin32/pager.c:306 src/gnuwin32/pager.c:436 src/gnuwin32/pager.c:480
+#: src/gnuwin32/pager.c:305 src/gnuwin32/pager.c:435 src/gnuwin32/pager.c:479
 msgid "Paste to console"
 msgstr "Konsola yapıştır"
 
-#: src/gnuwin32/pager.c:307 src/gnuwin32/pager.c:441 src/gnuwin32/pager.c:482
+#: src/gnuwin32/pager.c:306 src/gnuwin32/pager.c:440 src/gnuwin32/pager.c:481
 msgid "Paste commands to console"
 msgstr "Komutları konsola yapıştır"
 
-#: src/gnuwin32/pager.c:310 src/gnuwin32/rui.c:869
-#: src/library/utils/src/windows/dataentry.c:1703
-#: src/library/grDevices/src/devWindows.c:1686
+#: src/gnuwin32/pager.c:309 src/gnuwin32/rui.c:869
+#: src/library/utils/src/windows/dataentry.c:1704
+#: src/library/grDevices/src/devWindows.c:1705
 msgid "Stay on top"
 msgstr "Üstte kal"
 
-#: src/gnuwin32/pager.c:312 src/gnuwin32/pager.c:475
-#: src/library/utils/src/windows/dataentry.c:1705
-#: src/library/utils/src/windows/dataentry.c:1792
+#: src/gnuwin32/pager.c:311 src/gnuwin32/pager.c:474
+#: src/library/utils/src/windows/dataentry.c:1706
+#: src/library/utils/src/windows/dataentry.c:1793
 msgid "Close"
 msgstr "Kapat"
 
-#: src/gnuwin32/pager.c:472 src/gnuwin32/rui.c:1139
+#: src/gnuwin32/pager.c:471 src/gnuwin32/rui.c:1139
 msgid "Save to File..."
 msgstr "Dosyaya Kaydet..."
 
-#: src/gnuwin32/pager.c:487 src/gnuwin32/rui.c:1156
+#: src/gnuwin32/pager.c:486 src/gnuwin32/rui.c:1156
 msgid "View"
 msgstr "Görünüm"
 
-#: src/gnuwin32/pager.c:519
+#: src/gnuwin32/pager.c:518
 msgid "Unable to create pager window"
 msgstr "Sayfalayıcı penceresi oluşturulamadı"
 
@@ -621,7 +622,8 @@ msgid "Update packages..."
 msgstr "Paketleri güncelle..."
 
 #: src/gnuwin32/rui.c:920
-msgid "Install package(s) from local zip files..."
+#, fuzzy
+msgid "Install package(s) from local files..."
 msgstr "Yerel zip dosyasından paket(ler) kur..."
 
 #: src/gnuwin32/rui.c:944
@@ -788,52 +790,52 @@ msgstr "Kontrol &klasörünü listele"
 msgid "Console"
 msgstr "Konsol"
 
-#: src/gnuwin32/rui.c:1268
+#: src/gnuwin32/rui.c:1251
 msgid "'mname' is limited to 1000 bytes"
 msgstr "'mname' 1000 baytla sınırlıdır"
 
-#: src/gnuwin32/rui.c:1310
+#: src/gnuwin32/rui.c:1293
 #, c-format
 msgid "menu %s does not exist"
 msgstr "%s menüsü bulunmuyor"
 
-#: src/gnuwin32/rui.c:1363
+#: src/gnuwin32/rui.c:1346
 msgid "'menu' is limited to 500 bytes"
 msgstr "'menu' 500 baytla sınırlıdır"
 
-#: src/gnuwin32/rui.c:1373
+#: src/gnuwin32/rui.c:1356
 msgid "base menu does not exist"
 msgstr "temel menü bulunmuyor"
 
-#: src/gnuwin32/rui.c:1388
+#: src/gnuwin32/rui.c:1371
 msgid "failed to allocate menu"
 msgstr "menüyü yerleştirmede hata"
 
-#: src/gnuwin32/rui.c:1405 src/gnuwin32/rui.c:1529
+#: src/gnuwin32/rui.c:1388 src/gnuwin32/rui.c:1512
 msgid "menu + item is limited to 1000 bytes"
 msgstr "menü + öğe 1000 baytla sınırlıdır"
 
-#: src/gnuwin32/rui.c:1413 src/gnuwin32/rui.c:1496
+#: src/gnuwin32/rui.c:1396 src/gnuwin32/rui.c:1479
 msgid "menu does not exist"
 msgstr "menu bulunmuyor"
 
-#: src/gnuwin32/rui.c:1431 src/gnuwin32/rui.c:1454 src/gnuwin32/rui.c:1459
+#: src/gnuwin32/rui.c:1414 src/gnuwin32/rui.c:1437 src/gnuwin32/rui.c:1442
 msgid "failed to allocate char storage"
 msgstr "karakter depolamayı yerleştirmede hata"
 
-#: src/gnuwin32/rui.c:1467
+#: src/gnuwin32/rui.c:1450
 msgid "failed to allocate menuitem"
 msgstr "menüöğesini yerleştirmede hata"
 
-#: src/gnuwin32/rui.c:1519
+#: src/gnuwin32/rui.c:1502
 msgid "menu not found"
 msgstr "menü bulunamadı"
 
-#: src/gnuwin32/rui.c:1537
+#: src/gnuwin32/rui.c:1520
 msgid "menu or item does not exist"
 msgstr "menü yada öğe bulunmuyor"
 
-#: src/gnuwin32/system.c:442
+#: src/gnuwin32/system.c:446
 msgid "Save workspace image?"
 msgstr "Çalışma alanı görüntüsünü kaydetmek istermisiniz?"
 
@@ -841,41 +843,41 @@ msgstr "Çalışma alanı görüntüsünü kaydetmek istermisiniz?"
 msgid "Insufficient memory: cell not copied to the clipboard"
 msgstr "Yetersiz bellek: hücre panoya kopyalanmadı"
 
-#: src/extra/graphapp/dialogs.c:147 src/extra/graphapp/dialogs.c:164
-#: src/extra/graphapp/dialogs.c:181
+#: src/extra/graphapp/dialogs.c:148 src/extra/graphapp/dialogs.c:165
+#: src/extra/graphapp/dialogs.c:182
 msgid "Question"
 msgstr "Soru"
 
-#: src/extra/graphapp/dialogs.c:202
+#: src/extra/graphapp/dialogs.c:203
 msgid " Change working directory to:"
 msgstr " Çalışma dizinini değiştir:"
 
-#: src/extra/graphapp/dialogs.c:205
+#: src/extra/graphapp/dialogs.c:206
 #, c-format
 msgid "Unable to set '%s' as working directory"
 msgstr "'%s' çalışma dizini olarak ayarlanamadı"
 
-#: src/extra/graphapp/dialogs.c:602 src/extra/graphapp/dialogs.c:620
-#: src/extra/graphapp/dialogs.c:626 src/extra/graphapp/dialogs.c:725
-#: src/extra/graphapp/dialogs.c:739 src/extra/graphapp/dialogs.c:745
+#: src/extra/graphapp/dialogs.c:604 src/extra/graphapp/dialogs.c:622
+#: src/extra/graphapp/dialogs.c:628 src/extra/graphapp/dialogs.c:727
+#: src/extra/graphapp/dialogs.c:741 src/extra/graphapp/dialogs.c:747
 #: src/library/utils/src/windows/widgets.c:125
 msgid "Cancel"
 msgstr "İptal"
 
-#: src/extra/graphapp/dialogs.c:622 src/extra/graphapp/dialogs.c:741
+#: src/extra/graphapp/dialogs.c:624 src/extra/graphapp/dialogs.c:743
 #: src/library/utils/src/windows/widgets.c:124
 msgid "OK"
 msgstr "Tamam"
 
-#: src/extra/graphapp/dialogs.c:733
+#: src/extra/graphapp/dialogs.c:735
 msgid "User"
 msgstr "Kullanıcı"
 
-#: src/extra/graphapp/dialogs.c:734
+#: src/extra/graphapp/dialogs.c:736
 msgid "Password"
 msgstr "Şifre"
 
-#: src/extra/graphapp/dialogs.c:900 src/extra/graphapp/dialogs.c:906
+#: src/extra/graphapp/dialogs.c:902 src/extra/graphapp/dialogs.c:908
 #, c-format
 msgid "\"%s\" not found"
 msgstr "\"%s\" bulunamadı"
@@ -885,9 +887,9 @@ msgid "Arrange Icons"
 msgstr "Simgeleri Düzenle"
 
 #: src/library/utils/src/windows/dataentry.c:223
-#: src/library/utils/src/windows/dataentry.c:1850
-#: src/library/utils/src/windows/dataentry.c:1853
-#: src/library/utils/src/windows/dataentry.c:1884
+#: src/library/utils/src/windows/dataentry.c:1851
+#: src/library/utils/src/windows/dataentry.c:1854
+#: src/library/utils/src/windows/dataentry.c:1885
 msgid "invalid argument"
 msgstr "geçersiz argüman"
 
@@ -899,17 +901,12 @@ msgstr "değişken için geçersiz yazım"
 msgid "Data Editor"
 msgstr "Veri Düzenleyici"
 
-#: src/library/utils/src/windows/dataentry.c:282
-#: src/library/utils/src/windows/dataentry.c:1891
-msgid "invalid device"
-msgstr "geçersiz aygıt"
-
 #: src/library/utils/src/windows/dataentry.c:331
 msgid "dataentry: internal memory problem"
 msgstr "verigirişi: iç bellek sorunu"
 
 #: src/library/utils/src/windows/dataentry.c:634
-#: src/library/utils/src/windows/dataentry.c:1221
+#: src/library/utils/src/windows/dataentry.c:1222
 msgid "dataentry: internal memory error"
 msgstr "verigirişi: iç bellek hatası"
 
@@ -918,43 +915,43 @@ msgstr "verigirişi: iç bellek hatası"
 msgid "internal type error in dataentry"
 msgstr "veri girişinde iç yazım hatası"
 
-#: src/library/utils/src/windows/dataentry.c:852
+#: src/library/utils/src/windows/dataentry.c:853
 msgid "dataentry: parse error on string"
 msgstr "verigirişi: satırda ayıklama hatası"
 
-#: src/library/utils/src/windows/dataentry.c:995
+#: src/library/utils/src/windows/dataentry.c:996
 msgid "dataentry: expression too long"
 msgstr "verigirişi: ifade çok uzun"
 
-#: src/library/utils/src/windows/dataentry.c:1472
+#: src/library/utils/src/windows/dataentry.c:1473
 msgid "column names cannot be blank"
 msgstr "sütun isimleri boş olamaz"
 
-#: src/library/utils/src/windows/dataentry.c:1518
+#: src/library/utils/src/windows/dataentry.c:1519
 msgid "Variable editor"
 msgstr "Değişken düzenleyici"
 
-#: src/library/utils/src/windows/dataentry.c:1523
+#: src/library/utils/src/windows/dataentry.c:1524
 msgid "variable name"
 msgstr "değişken adı"
 
-#: src/library/utils/src/windows/dataentry.c:1525
+#: src/library/utils/src/windows/dataentry.c:1526
 msgid "type"
 msgstr "tip"
 
-#: src/library/utils/src/windows/dataentry.c:1639
+#: src/library/utils/src/windows/dataentry.c:1640
 msgid "Cell width(s)"
 msgstr "Hücre genişliği"
 
-#: src/library/utils/src/windows/dataentry.c:1645
+#: src/library/utils/src/windows/dataentry.c:1646
 msgid "Cell width"
 msgstr "Hücre genişliği"
 
-#: src/library/utils/src/windows/dataentry.c:1648
+#: src/library/utils/src/windows/dataentry.c:1649
 msgid "variable"
 msgstr "değişken"
 
-#: src/library/utils/src/windows/dataentry.c:1691
+#: src/library/utils/src/windows/dataentry.c:1692
 msgid ""
 "Navigation.\n"
 "  Keyboard: cursor keys move selection\n"
@@ -996,221 +993,223 @@ msgstr ""
 "tıklayın\n"
 "\n"
 
-#: src/library/utils/src/windows/dataentry.c:1699
+#: src/library/utils/src/windows/dataentry.c:1700
 msgid "Copy selected cell"
 msgstr "Seçili hücreye yapıştır"
 
-#: src/library/utils/src/windows/dataentry.c:1700
+#: src/library/utils/src/windows/dataentry.c:1701
 msgid "Paste to selected cell"
 msgstr "Seçili hücreye yapıştır"
 
-#: src/library/utils/src/windows/dataentry.c:1701
+#: src/library/utils/src/windows/dataentry.c:1702
 msgid "Autosize column"
 msgstr "Sütunu oto-boyutlandır"
 
-#: src/library/utils/src/windows/dataentry.c:1797
+#: src/library/utils/src/windows/dataentry.c:1798
 msgid "Copy  \tCTRL+C"
 msgstr "Kopyala  \tCTRL+C"
 
-#: src/library/utils/src/windows/dataentry.c:1799
+#: src/library/utils/src/windows/dataentry.c:1800
 msgid "Paste \tCTRL+V"
 msgstr "Yapıştır \tCTRL+V"
 
-#: src/library/utils/src/windows/dataentry.c:1801
+#: src/library/utils/src/windows/dataentry.c:1802
 msgid "Delete\tDEL"
 msgstr "Sil\tDEL"
 
-#: src/library/utils/src/windows/dataentry.c:1804
+#: src/library/utils/src/windows/dataentry.c:1805
 msgid "Cell widths ..."
 msgstr "Hücre genişlikleri ..."
 
-#: src/library/utils/src/windows/dataentry.c:1808
+#: src/library/utils/src/windows/dataentry.c:1809
 msgid "Data editor"
 msgstr "Veri düzenleyici"
 
-#: src/library/grDevices/src/devWindows.c:932
+#: src/library/grDevices/src/devWindows.c:949
 msgid "Portable network graphics file"
 msgstr "Taşınabilir ağ grafiği dosyası"
 
-#: src/library/grDevices/src/devWindows.c:935
+#: src/library/grDevices/src/devWindows.c:952
 msgid "Windows bitmap file"
 msgstr "Windows biteşlem dosyası"
 
-#: src/library/grDevices/src/devWindows.c:938
+#: src/library/grDevices/src/devWindows.c:955
 msgid "TIFF file"
 msgstr "TIFF dosyası"
 
-#: src/library/grDevices/src/devWindows.c:941
+#: src/library/grDevices/src/devWindows.c:958
 msgid "Jpeg file"
 msgstr "Jpeg dosyası "
 
-#: src/library/grDevices/src/devWindows.c:963
+#: src/library/grDevices/src/devWindows.c:980
 msgid "Postscript file"
 msgstr "Postscript dosyası "
 
-#: src/library/grDevices/src/devWindows.c:975
+#: src/library/grDevices/src/devWindows.c:992
 msgid "PDF file"
 msgstr "PDF dosyası"
 
-#: src/library/grDevices/src/devWindows.c:987
+#: src/library/grDevices/src/devWindows.c:1004
 msgid "Enhanced metafiles"
 msgstr "Gelişmiş metafile'lar"
 
-#: src/library/grDevices/src/devWindows.c:990
-#: src/library/grDevices/src/devWindows.c:3436
+#: src/library/grDevices/src/devWindows.c:1007
+#: src/library/grDevices/src/devWindows.c:3445
 msgid "file path selected is too long: only 512 bytes are allowed"
 msgstr "seçilen dosya yolu çok uzun: sadece 512 bayta kadar izin verilir"
 
-#: src/library/grDevices/src/devWindows.c:1201
+#: src/library/grDevices/src/devWindows.c:1218
 msgid "No plot to replace!"
 msgstr "Değiştirilecek grafik yok! "
 
-#: src/library/grDevices/src/devWindows.c:1249
+#: src/library/grDevices/src/devWindows.c:1268
 msgid "Variable name"
 msgstr "Değişken adı "
 
-#: src/library/grDevices/src/devWindows.c:1258
+#: src/library/grDevices/src/devWindows.c:1277
 #, fuzzy
 msgid "Variable doesn't contain any plots!"
 msgstr "Değişken yok yada herhangi bir grafik içermiyor!"
 
-#: src/library/grDevices/src/devWindows.c:1273
+#: src/library/grDevices/src/devWindows.c:1292
 msgid "Name of variable to save to"
 msgstr "Kaydedilecek değişken adı"
 
-#: src/library/grDevices/src/devWindows.c:1582
+#: src/library/grDevices/src/devWindows.c:1601
 msgid "Copy to the clipboard as a metafile"
 msgstr "Panoya bir metadosya olarak kopyala"
 
-#: src/library/grDevices/src/devWindows.c:1600
-#: src/library/grDevices/src/devWindows.c:1611
+#: src/library/grDevices/src/devWindows.c:1619
+#: src/library/grDevices/src/devWindows.c:1630
 msgid "Stop locator"
 msgstr "Konumlayıcıyı durdur"
 
-#: src/library/grDevices/src/devWindows.c:1610
-#: src/library/grDevices/src/devWindows.c:1614
+#: src/library/grDevices/src/devWindows.c:1629
+#: src/library/grDevices/src/devWindows.c:1633
 msgid "Stop"
 msgstr "Dur "
 
-#: src/library/grDevices/src/devWindows.c:1616
+#: src/library/grDevices/src/devWindows.c:1635
 msgid "Continue"
 msgstr "Devam et "
 
-#: src/library/grDevices/src/devWindows.c:1620
+#: src/library/grDevices/src/devWindows.c:1639
 msgid "Next"
 msgstr "Sonraki "
 
-#: src/library/grDevices/src/devWindows.c:1621
+#: src/library/grDevices/src/devWindows.c:1640
 msgid "Next plot"
 msgstr "Sonraki grafik"
 
-#: src/library/grDevices/src/devWindows.c:1627
+#: src/library/grDevices/src/devWindows.c:1646
 msgid "Save as"
 msgstr "Farklı Kaydet "
 
-#: src/library/grDevices/src/devWindows.c:1636
-#: src/library/grDevices/src/devWindows.c:1638
-#: src/library/grDevices/src/devWindows.c:1640
+#: src/library/grDevices/src/devWindows.c:1655
+#: src/library/grDevices/src/devWindows.c:1657
+#: src/library/grDevices/src/devWindows.c:1659
 #, c-format
 msgid "%s quality..."
 msgstr "%s kalite..."
 
-#: src/library/grDevices/src/devWindows.c:1642
+#: src/library/grDevices/src/devWindows.c:1661
 msgid "Copy to the clipboard"
 msgstr "Panoya kopyala"
 
-#: src/library/grDevices/src/devWindows.c:1643
+#: src/library/grDevices/src/devWindows.c:1662
 msgid "as a Bitmap\tCTRL+C"
 msgstr "Biteşlem olarak\tCTRL+C"
 
-#: src/library/grDevices/src/devWindows.c:1644
+#: src/library/grDevices/src/devWindows.c:1663
 msgid "as a Metafile\tCTRL+W"
 msgstr "Metafile olarak\tCTRL+W"
 
-#: src/library/grDevices/src/devWindows.c:1647
-msgid "Print...\tCTRL+P"
-msgstr "Yazdır...\tCTRL+P "
-
-#: src/library/grDevices/src/devWindows.c:1649
+#: src/library/grDevices/src/devWindows.c:1668
 msgid "close Device"
 msgstr "Aygıtı kapat"
 
-#: src/library/grDevices/src/devWindows.c:1650
+#: src/library/grDevices/src/devWindows.c:1669
 msgid "History"
 msgstr "Geçmiş"
 
-#: src/library/grDevices/src/devWindows.c:1651
+#: src/library/grDevices/src/devWindows.c:1670
 msgid "Recording"
 msgstr "Kayıt"
 
-#: src/library/grDevices/src/devWindows.c:1654
+#: src/library/grDevices/src/devWindows.c:1673
 msgid "Add\tINS"
 msgstr "Ekle\tINS "
 
-#: src/library/grDevices/src/devWindows.c:1655
+#: src/library/grDevices/src/devWindows.c:1674
 msgid "Replace"
 msgstr "Değiştir"
 
-#: src/library/grDevices/src/devWindows.c:1657
+#: src/library/grDevices/src/devWindows.c:1676
 msgid "Previous\tPgUp"
 msgstr "Geri\tPgUp "
 
-#: src/library/grDevices/src/devWindows.c:1658
+#: src/library/grDevices/src/devWindows.c:1677
 msgid "Next\tPgDown"
 msgstr "İleri\tPgDown "
 
-#: src/library/grDevices/src/devWindows.c:1660
+#: src/library/grDevices/src/devWindows.c:1679
 msgid "Save to variable..."
 msgstr "Değişkene kaydet..."
 
-#: src/library/grDevices/src/devWindows.c:1661
+#: src/library/grDevices/src/devWindows.c:1680
 msgid "Get from variable..."
 msgstr "Değişkenden al..."
 
-#: src/library/grDevices/src/devWindows.c:1663
+#: src/library/grDevices/src/devWindows.c:1682
 msgid "Clear history"
 msgstr "Geçmişi temizleme"
 
-#: src/library/grDevices/src/devWindows.c:1664
+#: src/library/grDevices/src/devWindows.c:1683
 msgid "Resize"
 msgstr "Yeniden boyutlandır"
 
-#: src/library/grDevices/src/devWindows.c:1665
+#: src/library/grDevices/src/devWindows.c:1684
 msgid "R mode"
 msgstr "R modu"
 
-#: src/library/grDevices/src/devWindows.c:1667
+#: src/library/grDevices/src/devWindows.c:1686
 msgid "Fit to window"
 msgstr "Pencereye sığdır"
 
-#: src/library/grDevices/src/devWindows.c:1669
+#: src/library/grDevices/src/devWindows.c:1688
 msgid "Fixed size"
 msgstr "Sabit boyut"
 
-#: src/library/grDevices/src/devWindows.c:1676
+#: src/library/grDevices/src/devWindows.c:1695
 msgid "Copy as metafile"
 msgstr "Metafile olarak kopyala"
 
-#: src/library/grDevices/src/devWindows.c:1678
+#: src/library/grDevices/src/devWindows.c:1697
 msgid "Copy as bitmap"
 msgstr "Biteşlem olarak kopyala"
 
-#: src/library/grDevices/src/devWindows.c:1681
+#: src/library/grDevices/src/devWindows.c:1700
 msgid "Save as metafile..."
 msgstr "Metafile olarak farklı kaydet..."
 
-#: src/library/grDevices/src/devWindows.c:1683
+#: src/library/grDevices/src/devWindows.c:1702
 msgid "Save as postscript..."
 msgstr "Postscript olarak farklı kaydet"
 
-#: src/library/grDevices/src/devWindows.c:3136
+#: src/library/grDevices/src/devWindows.c:3143
 msgid "Locator is active"
 msgstr "Konumlayıcı aktif "
 
-#: src/library/grDevices/src/devWindows.c:3763
+#: src/library/grDevices/src/devWindows.c:3769
 msgid "Waiting to confirm page change..."
 msgstr "Sayfa değişikliği onayı bekleniyor..."
 
-#: src/library/grDevices/src/devWindows.c:3775
+#: src/library/grDevices/src/devWindows.c:3781
 msgid "Click or hit ENTER for next page"
 msgstr "Sonraki sayfa için ENTER'a basın yada tıklayın"
+
+#~ msgid "Print...\tCTRL+P"
+#~ msgstr "Yazdır...\tCTRL+P "
+
+#~ msgid "invalid device"
+#~ msgstr "geçersiz aygıt"
diff --git a/src/library/base/po/RGui-zh_CN.po b/src/library/base/po/RGui-zh_CN.po
index 1c25883..9bc8001 100644
--- a/src/library/base/po/RGui-zh_CN.po
+++ b/src/library/base/po/RGui-zh_CN.po
@@ -7,11 +7,11 @@ msgid ""
 msgstr ""
 "Project-Id-Version: R 2.1.0\n"
 "Report-Msgid-Bugs-To: bugs.r-project.org\n"
-"POT-Creation-Date: 2013-03-18 19:36+0000\n"
+"POT-Creation-Date: 2016-04-01 10:28-0700\n"
 "PO-Revision-Date: 2007-11-06 13:34+0800\n"
 "Last-Translator: Yihui Xie <xie at yihui.name>\n"
 "Language-Team: Chinese\n"
-"Language: \n"
+"Language: zh_CN\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=gb2312\n"
 "Content-Transfer-Encoding: 8bit\n"
@@ -30,11 +30,11 @@ msgstr "
 msgid "Unable to open the clipboard"
 msgstr "�޷��򿪼�����"
 
-#: src/gnuwin32/console.c:1914
+#: src/gnuwin32/console.c:1919
 msgid "Insufficient memory. Please close the console"
 msgstr "�ڴ治���� ��رտ���̨"
 
-#: src/gnuwin32/console.c:1969 src/gnuwin32/console.c:2022
+#: src/gnuwin32/console.c:1974 src/gnuwin32/console.c:2028
 #: src/gnuwin32/preferences.c:333
 #, c-format
 msgid ""
@@ -44,23 +44,23 @@ msgstr ""
 "�Ҳ���%s-%d-%d���塣\n"
 "��ϵͳ�̶�����"
 
-#: src/gnuwin32/console.c:2127
+#: src/gnuwin32/console.c:2133
 msgid "Save selection to"
 msgstr "������ѡ��"
 
-#: src/gnuwin32/console.c:2129
+#: src/gnuwin32/console.c:2135
 msgid "Save console contents to"
 msgstr "�������̨���ݵ�"
 
-#: src/gnuwin32/console.c:2228
+#: src/gnuwin32/console.c:2234
 msgid "Scrolling.\n"
 msgstr "������\n"
 
-#: src/gnuwin32/console.c:2229
+#: src/gnuwin32/console.c:2235
 msgid "  Keyboard: PgUp, PgDown, Ctrl+Arrows, Ctrl+Home, Ctrl+End,\n"
 msgstr "  ���̣�PgUp��PgDown��Ctrl+�������Ctrl+Home��Ctrl+End��\n"
 
-#: src/gnuwin32/console.c:2230
+#: src/gnuwin32/console.c:2236
 msgid ""
 "  Mouse: use the scrollbar(s).\n"
 "\n"
@@ -68,96 +68,96 @@ msgstr ""
 "  ��꣺���ƹ�������\n"
 "\n"
 
-#: src/gnuwin32/console.c:2231
+#: src/gnuwin32/console.c:2237
 msgid "Editing.\n"
 msgstr "�༭��\n"
 
-#: src/gnuwin32/console.c:2232
+#: src/gnuwin32/console.c:2238
 msgid "  Moving the cursor: \n"
 msgstr "  �ƶ���꣺\n"
 
-#: src/gnuwin32/console.c:2233
+#: src/gnuwin32/console.c:2239
 msgid "     Left arrow or Ctrl+B: move backward one character;\n"
 msgstr "     ���ͷ��Ctrl+B������һ�ַ���\n"
 
-#: src/gnuwin32/console.c:2234
+#: src/gnuwin32/console.c:2240
 msgid "     Right arrow or Ctrl+F: move forward one character;\n"
 msgstr "     �Ҽ�ͷ��Ctrl+F������һ�ַ���\n"
 
-#: src/gnuwin32/console.c:2235
+#: src/gnuwin32/console.c:2241
 msgid "     Home or Ctrl+A: go to beginning of line;\n"
 msgstr "     Home��Ctrl+A���Ƶ���ͷ��\n"
 
-#: src/gnuwin32/console.c:2236
+#: src/gnuwin32/console.c:2242
 msgid "     End or Ctrl+E: go to end of line;\n"
 msgstr "     End��Ctrl+E���Ƶ���β��\n"
 
-#: src/gnuwin32/console.c:2237
+#: src/gnuwin32/console.c:2243
 msgid "  History: Up and Down Arrows, Ctrl+P, Ctrl+N\n"
 msgstr "  ��ʷ����ϡ��¼�ͷ��Ctrl+P��Ctrl+N\n"
 
-#: src/gnuwin32/console.c:2238
+#: src/gnuwin32/console.c:2244
 msgid "  Deleting:\n"
 msgstr "  ɾ����\n"
 
-#: src/gnuwin32/console.c:2239
+#: src/gnuwin32/console.c:2245
 msgid "     Del or Ctrl+D: delete current character or selection;\n"
 msgstr "     Del��Ctrl+D��ɾ���ڵ�ǰλ�õ��ַ�����ѡ�ı���\n"
 
-#: src/gnuwin32/console.c:2240
+#: src/gnuwin32/console.c:2246
 msgid "     Backspace: delete preceding character;\n"
 msgstr "     Backspace��ɾ����ǰλ��֮ǰ���ַ���\n"
 
-#: src/gnuwin32/console.c:2241
+#: src/gnuwin32/console.c:2247
 msgid ""
 "     Ctrl+Del or Ctrl+K: delete text from current character to end of line.\n"
 msgstr "     Ctrl+Del��Ctrl+K��ɾ����ǰλ�õ���β���������֣�\n"
 
-#: src/gnuwin32/console.c:2242
+#: src/gnuwin32/console.c:2248
 msgid "     Ctrl+U: delete all text from current line.\n"
 msgstr "     Ctrl+U��ɾ����ǰ�������е����֣�\n"
 
-#: src/gnuwin32/console.c:2243
+#: src/gnuwin32/console.c:2249
 msgid "  Copy and paste.\n"
 msgstr "  ���ƺ�ճ����\n"
 
-#: src/gnuwin32/console.c:2244
+#: src/gnuwin32/console.c:2250
 msgid ""
 "     Use the mouse (with the left button held down) to mark (select) text.\n"
 msgstr "     ����������ѡ�����֣�\n"
 
-#: src/gnuwin32/console.c:2245
+#: src/gnuwin32/console.c:2251
 msgid ""
 "     Use Shift+Del (or Ctrl+C) to copy the marked text to the clipboard and\n"
 msgstr "     ��Shift+Del(��Ctrl+C) ��ѡ�����ָ��Ƶ������壻\n"
 
-#: src/gnuwin32/console.c:2246
+#: src/gnuwin32/console.c:2252
 msgid ""
 "     Shift+Ins (or Ctrl+V or Ctrl+Y) to paste the content of the clipboard "
 "(if any)  \n"
 msgstr "     ��Shift+Ins(��Ctrl+V��Ctrl+Y)��ճ������������ݣ�����еĻ�����\n"
 
-#: src/gnuwin32/console.c:2247
+#: src/gnuwin32/console.c:2253
 msgid "     to the console, Ctrl+X first copy then paste\n"
 msgstr "     �ڿ���̨�У�Ctrl+X��ʾ�ȸ�����ճ����\n"
 
-#: src/gnuwin32/console.c:2248
+#: src/gnuwin32/console.c:2254
 msgid "  Misc:\n"
 msgstr "  ������\n"
 
-#: src/gnuwin32/console.c:2249
+#: src/gnuwin32/console.c:2255
 msgid "     Ctrl+L: Clear the console.\n"
 msgstr "     Ctrl+L����տ���̨��\n"
 
-#: src/gnuwin32/console.c:2250
+#: src/gnuwin32/console.c:2256
 msgid "     Ctrl+O or INS: Toggle overwrite mode: initially off.\n"
 msgstr "     Ctrl+O��INS�����ظ���ģʽ����ʼ�ǹص�ģ�\n"
 
-#: src/gnuwin32/console.c:2251
+#: src/gnuwin32/console.c:2257
 msgid "     Ctrl+T: Interchange current char with one to the left.\n"
 msgstr "     Ctrl+T: ����ǰ����λ�õ��ַ������󷽵��ַ�������\n"
 
-#: src/gnuwin32/console.c:2252
+#: src/gnuwin32/console.c:2258
 msgid ""
 "\n"
 "Note: Console is updated only when some input is required.\n"
@@ -165,7 +165,7 @@ msgstr ""
 "\n"
 "ע�⣺����̨������Ա����壬\n"
 
-#: src/gnuwin32/console.c:2253
+#: src/gnuwin32/console.c:2259
 msgid ""
 "  Use Ctrl+W to toggle this feature off/on.\n"
 "\n"
@@ -173,7 +173,7 @@ msgstr ""
 "  ��Ctrl+W��������һ���ܡ�\n"
 "\n"
 
-#: src/gnuwin32/console.c:2254
+#: src/gnuwin32/console.c:2260
 msgid ""
 "Use ESC to stop the interpreter.\n"
 "\n"
@@ -181,270 +181,271 @@ msgstr ""
 "��ESC���жϽ������Ĺ�����\n"
 "\n"
 
-#: src/gnuwin32/console.c:2255
+#: src/gnuwin32/console.c:2261
 msgid ""
 "TAB starts completion of the current word.\n"
 "\n"
 msgstr "TAB�����Բ�ȫ��ǰ���ʡ�\n"
 
-#: src/gnuwin32/console.c:2256
+#: src/gnuwin32/console.c:2262
 msgid "Standard Windows hotkeys can be used to switch to the\n"
 msgstr "������Windows��׼�ȼ���ת��\n"
 
-#: src/gnuwin32/console.c:2257
+#: src/gnuwin32/console.c:2263
 msgid "graphics device (Ctrl+Tab or Ctrl+F6 in MDI, Alt+Tab in SDI)"
 msgstr "��ͼ�豸 (MDI��Ctrl+Tab��Ctrl+F6, SDI��Alt+Tab)"
 
-#: src/gnuwin32/editor.c:88 src/gnuwin32/editor.c:90
+#: src/gnuwin32/editor.c:91 src/gnuwin32/editor.c:93
 msgid "R Editor"
 msgstr "R�༭��"
 
-#: src/gnuwin32/editor.c:119
+#: src/gnuwin32/editor.c:123
 #, c-format
 msgid "unable to open file %s for reading"
 msgstr "�޷���ȡ�ļ�%s"
 
-#: src/gnuwin32/editor.c:135
+#: src/gnuwin32/editor.c:139
 #, c-format
 msgid "Could not read from file '%s'"
 msgstr "�޷���ȡ'%s'�ļ�"
 
-#: src/gnuwin32/editor.c:166
+#: src/gnuwin32/editor.c:171
 #, c-format
 msgid "Could not save file '%s'"
 msgstr "�޷�����'%s'�ļ�"
 
-#: src/gnuwin32/editor.c:182
+#: src/gnuwin32/editor.c:187
 msgid "Save script as"
 msgstr "�������ű�Ϊ"
 
-#: src/gnuwin32/editor.c:377 src/gnuwin32/editor.c:694
-#: src/gnuwin32/pager.c:431 src/gnuwin32/rui.c:1076
+#: src/gnuwin32/editor.c:379 src/gnuwin32/editor.c:696
+#: src/gnuwin32/pager.c:430 src/gnuwin32/rui.c:1076
 msgid "Open script"
 msgstr "�򿪳���ű�"
 
-#: src/gnuwin32/editor.c:500 src/gnuwin32/pager.c:185 src/gnuwin32/pager.c:205
+#: src/gnuwin32/editor.c:502 src/gnuwin32/pager.c:184 src/gnuwin32/pager.c:204
 msgid "No RGui console to paste to"
 msgstr "û�п���ճ���ϵ�RGui����̨"
 
-#: src/gnuwin32/editor.c:602
+#: src/gnuwin32/editor.c:604
 msgid "R EDITOR\n"
 msgstr "R�༭��\n"
 
-#: src/gnuwin32/editor.c:604
+#: src/gnuwin32/editor.c:606
 msgid "A standard text editor for editing and running R code.\n"
 msgstr "һ�����ڱ༭������R����ı�׼�ı��༭����\n"
 
-#: src/gnuwin32/editor.c:606
+#: src/gnuwin32/editor.c:608
 msgid "RUNNING COMMANDS\n"
 msgstr "��������\n"
 
-#: src/gnuwin32/editor.c:607
+#: src/gnuwin32/editor.c:609
 msgid "To run a line or section of R code, select the code and either\n"
 msgstr "Ҫ����һ�л�һ��R����, ����ѡ����룬Ȼ����\n"
 
-#: src/gnuwin32/editor.c:608
+#: src/gnuwin32/editor.c:610
 msgid "     Press Ctrl-R\n"
 msgstr "     ��Ctrl-R\n"
 
-#: src/gnuwin32/editor.c:609
+#: src/gnuwin32/editor.c:611
 msgid "     Select \"Run line or selection\" from the \"Edit\" menu\n"
 msgstr "     ���\"�༭\"�˵���ѡ��\"���е�ǰ�л���ѡ����\"\n"
 
-#: src/gnuwin32/editor.c:610
+#: src/gnuwin32/editor.c:612
 msgid "     Press the \"Run line or selection\" icon on the toolbar\n"
 msgstr "     �򰴹������ϵ�\"���е�ǰ�л���ѡ����\"��ť\n"
 
-#: src/gnuwin32/editor.c:611
+#: src/gnuwin32/editor.c:613
 msgid ""
 "This will copy the selected commands to the console and evaluate them.\n"
 msgstr "����ѡ���˵Ĵ��븴�Ƶ�����̨�����С�\n"
 
-#: src/gnuwin32/editor.c:612
+#: src/gnuwin32/editor.c:614
 msgid ""
 "If there is no selection, this will just run the current line and advance\n"
 msgstr "���û��ѡ�����Ļ��������е�ǰ�����еĴ��룬����\n"
 
-#: src/gnuwin32/editor.c:613
+#: src/gnuwin32/editor.c:615
 msgid "the cursor by one line.\n"
 msgstr "�������һ�С�\n"
 
-#: src/gnuwin32/editor.c:625 src/gnuwin32/editor.c:702
-#: src/gnuwin32/editor.c:760
+#: src/gnuwin32/editor.c:627 src/gnuwin32/editor.c:704
+#: src/gnuwin32/editor.c:762
 msgid "Run line or selection"
 msgstr "���е�ǰ�л���ѡ����"
 
-#: src/gnuwin32/editor.c:627 src/gnuwin32/editor.c:745
+#: src/gnuwin32/editor.c:629 src/gnuwin32/editor.c:747
 msgid "Undo"
 msgstr "����"
 
-#: src/gnuwin32/editor.c:629 src/gnuwin32/editor.c:748
+#: src/gnuwin32/editor.c:631 src/gnuwin32/editor.c:750
 msgid "Cut"
 msgstr "����"
 
-#: src/gnuwin32/editor.c:630 src/gnuwin32/editor.c:750
-#: src/gnuwin32/pager.c:305 src/gnuwin32/pager.c:478 src/gnuwin32/rui.c:859
+#: src/gnuwin32/editor.c:632 src/gnuwin32/editor.c:752
+#: src/gnuwin32/pager.c:304 src/gnuwin32/pager.c:477 src/gnuwin32/rui.c:859
 #: src/gnuwin32/rui.c:1088 src/gnuwin32/rui.c:1144
 msgid "Copy"
 msgstr "����"
 
-#: src/gnuwin32/editor.c:631 src/gnuwin32/editor.c:752 src/gnuwin32/rui.c:860
+#: src/gnuwin32/editor.c:633 src/gnuwin32/editor.c:754 src/gnuwin32/rui.c:860
 #: src/gnuwin32/rui.c:1092 src/gnuwin32/rui.c:1145
 msgid "Paste"
 msgstr "ճ��"
 
-#: src/gnuwin32/editor.c:632 src/gnuwin32/editor.c:754
+#: src/gnuwin32/editor.c:634 src/gnuwin32/editor.c:756
 msgid "Delete"
 msgstr "ɾ��"
 
-#: src/gnuwin32/editor.c:634 src/gnuwin32/editor.c:756
-#: src/gnuwin32/pager.c:308 src/gnuwin32/pager.c:484 src/gnuwin32/rui.c:866
+#: src/gnuwin32/editor.c:636 src/gnuwin32/editor.c:758
+#: src/gnuwin32/pager.c:307 src/gnuwin32/pager.c:483 src/gnuwin32/rui.c:866
 #: src/gnuwin32/rui.c:1149
 msgid "Select all"
 msgstr "ȫѡ"
 
-#: src/gnuwin32/editor.c:698
+#: src/gnuwin32/editor.c:700
 msgid "Save script"
 msgstr "�������ű�"
 
-#: src/gnuwin32/editor.c:706 src/gnuwin32/pager.c:451
-#: src/library/grDevices/src/devWindows.c:1594
+#: src/gnuwin32/editor.c:708 src/gnuwin32/pager.c:450
+#: src/library/grDevices/src/devWindows.c:1613
 msgid "Return focus to Console"
 msgstr "�ص�����̨"
 
-#: src/gnuwin32/editor.c:709
+#: src/gnuwin32/editor.c:711
 msgid "Print script"
 msgstr "��ӡ����ű�"
 
-#: src/gnuwin32/editor.c:711 src/gnuwin32/pager.c:446 src/gnuwin32/rui.c:1104
-#: src/library/grDevices/src/devWindows.c:1588
+#: src/gnuwin32/editor.c:713 src/gnuwin32/pager.c:445 src/gnuwin32/rui.c:1104
+#: src/library/grDevices/src/devWindows.c:1607
 msgid "Print"
 msgstr "��ӡ"
 
-#: src/gnuwin32/editor.c:729 src/gnuwin32/pager.c:467 src/gnuwin32/rui.c:1122
-#: src/library/utils/src/windows/dataentry.c:1790
-#: src/library/grDevices/src/devWindows.c:1626
+#: src/gnuwin32/editor.c:731 src/gnuwin32/pager.c:466 src/gnuwin32/rui.c:1122
+#: src/library/utils/src/windows/dataentry.c:1791
+#: src/library/grDevices/src/devWindows.c:1645
 msgid "File"
 msgstr "�ļ�"
 
-#: src/gnuwin32/editor.c:730 src/gnuwin32/pager.c:468 src/gnuwin32/rui.c:1124
+#: src/gnuwin32/editor.c:732 src/gnuwin32/pager.c:467 src/gnuwin32/rui.c:1124
 msgid "New script"
 msgstr "�½�����ű�"
 
-#: src/gnuwin32/editor.c:732 src/gnuwin32/pager.c:469 src/gnuwin32/rui.c:1125
+#: src/gnuwin32/editor.c:734 src/gnuwin32/pager.c:468 src/gnuwin32/rui.c:1125
 msgid "Open script..."
 msgstr "�򿪳���ű�..."
 
-#: src/gnuwin32/editor.c:734
+#: src/gnuwin32/editor.c:736
 msgid "Save"
 msgstr "����"
 
-#: src/gnuwin32/editor.c:736
+#: src/gnuwin32/editor.c:738
 msgid "Save as..."
 msgstr "���Ϊ..."
 
-#: src/gnuwin32/editor.c:739 src/gnuwin32/pager.c:470 src/gnuwin32/rui.c:1138
-#: src/library/grDevices/src/devWindows.c:1689
+#: src/gnuwin32/editor.c:741 src/gnuwin32/pager.c:469 src/gnuwin32/rui.c:1138
+#: src/library/grDevices/src/devWindows.c:1666
+#: src/library/grDevices/src/devWindows.c:1708
 msgid "Print..."
 msgstr "��ӡ..."
 
-#: src/gnuwin32/editor.c:742
+#: src/gnuwin32/editor.c:744
 msgid "Close script"
 msgstr "�رճ���ű�"
 
-#: src/gnuwin32/editor.c:744 src/gnuwin32/pager.c:477 src/gnuwin32/rui.c:1143
-#: src/library/utils/src/windows/dataentry.c:1796
+#: src/gnuwin32/editor.c:746 src/gnuwin32/pager.c:476 src/gnuwin32/rui.c:1143
+#: src/library/utils/src/windows/dataentry.c:1797
 msgid "Edit"
 msgstr "�༭"
 
-#: src/gnuwin32/editor.c:758 src/gnuwin32/rui.c:1150
+#: src/gnuwin32/editor.c:760 src/gnuwin32/rui.c:1150
 msgid "Clear console"
 msgstr "��տ���̨"
 
-#: src/gnuwin32/editor.c:762
+#: src/gnuwin32/editor.c:764
 msgid "Run all"
 msgstr "���������"
 
-#: src/gnuwin32/editor.c:765
+#: src/gnuwin32/editor.c:767
 msgid "Find..."
 msgstr "����..."
 
-#: src/gnuwin32/editor.c:767
+#: src/gnuwin32/editor.c:769
 msgid "Replace..."
 msgstr "�滻..."
 
-#: src/gnuwin32/editor.c:770 src/gnuwin32/rui.c:1154
+#: src/gnuwin32/editor.c:772 src/gnuwin32/rui.c:1154
 msgid "GUI preferences..."
 msgstr "GUIѡ��..."
 
-#: src/gnuwin32/editor.c:780 src/gnuwin32/rui.c:1186
-#: src/library/utils/src/windows/dataentry.c:1697
-#: src/library/utils/src/windows/dataentry.c:1807
+#: src/gnuwin32/editor.c:782 src/gnuwin32/rui.c:1186
+#: src/library/utils/src/windows/dataentry.c:1698
+#: src/library/utils/src/windows/dataentry.c:1808
 msgid "Help"
 msgstr "����"
 
-#: src/gnuwin32/editor.c:781
+#: src/gnuwin32/editor.c:783
 msgid "Editor"
 msgstr "�༭��"
 
-#: src/gnuwin32/editor.c:840
+#: src/gnuwin32/editor.c:842
 msgid "Maximum number of editors reached"
 msgstr "�����༭����������"
 
-#: src/gnuwin32/editor.c:845
+#: src/gnuwin32/editor.c:847
 msgid "Unable to create editor window"
 msgstr "�޷������༭������"
 
-#: src/gnuwin32/editor.c:853
+#: src/gnuwin32/editor.c:855
 msgid "Untitled"
 msgstr "���"
 
-#: src/gnuwin32/extra.c:823 src/gnuwin32/rui.c:1224
+#: src/gnuwin32/extra.c:825
 msgid "Select file"
 msgstr "ѡ���ļ�"
 
-#: src/gnuwin32/pager.c:89
+#: src/gnuwin32/pager.c:88
 msgid "Error opening file"
 msgstr "���ļ�ʱ����"
 
-#: src/gnuwin32/pager.c:96
+#: src/gnuwin32/pager.c:95
 msgid "Insufficient memory to display file in internal pager"
 msgstr "���ڲ��ı������������ʾ�ļ�ʱ�ڴ治��"
 
-#: src/gnuwin32/pager.c:177 src/gnuwin32/pager.c:189 src/gnuwin32/pager.c:209
+#: src/gnuwin32/pager.c:176 src/gnuwin32/pager.c:188 src/gnuwin32/pager.c:208
 #: src/gnuwin32/rui.c:237 src/gnuwin32/rui.c:264
 msgid "No selection"
 msgstr "û��ѡ������"
 
-#: src/gnuwin32/pager.c:306 src/gnuwin32/pager.c:436 src/gnuwin32/pager.c:480
+#: src/gnuwin32/pager.c:305 src/gnuwin32/pager.c:435 src/gnuwin32/pager.c:479
 msgid "Paste to console"
 msgstr "ճ��������̨"
 
-#: src/gnuwin32/pager.c:307 src/gnuwin32/pager.c:441 src/gnuwin32/pager.c:482
+#: src/gnuwin32/pager.c:306 src/gnuwin32/pager.c:440 src/gnuwin32/pager.c:481
 msgid "Paste commands to console"
 msgstr "ճ���������̨"
 
-#: src/gnuwin32/pager.c:310 src/gnuwin32/rui.c:869
-#: src/library/utils/src/windows/dataentry.c:1703
-#: src/library/grDevices/src/devWindows.c:1686
+#: src/gnuwin32/pager.c:309 src/gnuwin32/rui.c:869
+#: src/library/utils/src/windows/dataentry.c:1704
+#: src/library/grDevices/src/devWindows.c:1705
 msgid "Stay on top"
 msgstr "���ڱ�������ǰ��"
 
-#: src/gnuwin32/pager.c:312 src/gnuwin32/pager.c:475
-#: src/library/utils/src/windows/dataentry.c:1705
-#: src/library/utils/src/windows/dataentry.c:1792
+#: src/gnuwin32/pager.c:311 src/gnuwin32/pager.c:474
+#: src/library/utils/src/windows/dataentry.c:1706
+#: src/library/utils/src/windows/dataentry.c:1793
 msgid "Close"
 msgstr "�ر�"
 
-#: src/gnuwin32/pager.c:472 src/gnuwin32/rui.c:1139
+#: src/gnuwin32/pager.c:471 src/gnuwin32/rui.c:1139
 msgid "Save to File..."
 msgstr "���浽�ļ�..."
 
-#: src/gnuwin32/pager.c:487 src/gnuwin32/rui.c:1156
+#: src/gnuwin32/pager.c:486 src/gnuwin32/rui.c:1156
 msgid "View"
 msgstr "�鿴"
 
-#: src/gnuwin32/pager.c:519
+#: src/gnuwin32/pager.c:518
 msgid "Unable to create pager window"
 msgstr "�޷������ļ��������Ĵ���"
 
@@ -597,7 +598,8 @@ msgid "Update packages..."
 msgstr "���³����..."
 
 #: src/gnuwin32/rui.c:920
-msgid "Install package(s) from local zip files..."
+#, fuzzy
+msgid "Install package(s) from local files..."
 msgstr "�ӱ���zip�ļ���װ�����..."
 
 #: src/gnuwin32/rui.c:944
@@ -764,52 +766,52 @@ msgstr "
 msgid "Console"
 msgstr "����̨"
 
-#: src/gnuwin32/rui.c:1268
+#: src/gnuwin32/rui.c:1251
 msgid "'mname' is limited to 1000 bytes"
 msgstr "'mname'��С������1000�ֽ�����"
 
-#: src/gnuwin32/rui.c:1310
+#: src/gnuwin32/rui.c:1293
 #, c-format
 msgid "menu %s does not exist"
 msgstr "û��%s�˵�"
 
-#: src/gnuwin32/rui.c:1363
+#: src/gnuwin32/rui.c:1346
 msgid "'menu' is limited to 500 bytes"
 msgstr "'menu'�ij���������500�ֽ�����"
 
-#: src/gnuwin32/rui.c:1373
+#: src/gnuwin32/rui.c:1356
 msgid "base menu does not exist"
 msgstr "�����˵�������"
 
-#: src/gnuwin32/rui.c:1388
+#: src/gnuwin32/rui.c:1371
 msgid "failed to allocate menu"
 msgstr "�޷����ò˵�"
 
-#: src/gnuwin32/rui.c:1405 src/gnuwin32/rui.c:1529
+#: src/gnuwin32/rui.c:1388 src/gnuwin32/rui.c:1512
 msgid "menu + item is limited to 1000 bytes"
 msgstr "�˵��Ӳ˵���ij���������1000�ֽ�����"
 
-#: src/gnuwin32/rui.c:1413 src/gnuwin32/rui.c:1496
+#: src/gnuwin32/rui.c:1396 src/gnuwin32/rui.c:1479
 msgid "menu does not exist"
 msgstr "û����һ�˵�"
 
-#: src/gnuwin32/rui.c:1431 src/gnuwin32/rui.c:1454 src/gnuwin32/rui.c:1459
+#: src/gnuwin32/rui.c:1414 src/gnuwin32/rui.c:1437 src/gnuwin32/rui.c:1442
 msgid "failed to allocate char storage"
 msgstr "�����ַ�����ʧ��"
 
-#: src/gnuwin32/rui.c:1467
+#: src/gnuwin32/rui.c:1450
 msgid "failed to allocate menuitem"
 msgstr "���ò˵���ʧ��"
 
-#: src/gnuwin32/rui.c:1519
+#: src/gnuwin32/rui.c:1502
 msgid "menu not found"
 msgstr "�Ҳ����˵�"
 
-#: src/gnuwin32/rui.c:1537
+#: src/gnuwin32/rui.c:1520
 msgid "menu or item does not exist"
 msgstr "�˵����߲˵������"
 
-#: src/gnuwin32/system.c:442
+#: src/gnuwin32/system.c:446
 msgid "Save workspace image?"
 msgstr "�Ƿ񱣴湤���ռ�ӳ��?"
 
@@ -817,41 +819,41 @@ msgstr "
 msgid "Insufficient memory: cell not copied to the clipboard"
 msgstr "�ڴ治��: ��Ԫ��û�и��Ƶ�������"
 
-#: src/extra/graphapp/dialogs.c:147 src/extra/graphapp/dialogs.c:164
-#: src/extra/graphapp/dialogs.c:181
+#: src/extra/graphapp/dialogs.c:148 src/extra/graphapp/dialogs.c:165
+#: src/extra/graphapp/dialogs.c:182
 msgid "Question"
 msgstr "����"
 
-#: src/extra/graphapp/dialogs.c:202
+#: src/extra/graphapp/dialogs.c:203
 msgid " Change working directory to:"
 msgstr " ����ǰ����Ŀ¼�ijɣ�"
 
-#: src/extra/graphapp/dialogs.c:205
+#: src/extra/graphapp/dialogs.c:206
 #, c-format
 msgid "Unable to set '%s' as working directory"
 msgstr "�޷���'%s'��ɹ���Ŀ¼"
 
-#: src/extra/graphapp/dialogs.c:602 src/extra/graphapp/dialogs.c:620
-#: src/extra/graphapp/dialogs.c:626 src/extra/graphapp/dialogs.c:725
-#: src/extra/graphapp/dialogs.c:739 src/extra/graphapp/dialogs.c:745
+#: src/extra/graphapp/dialogs.c:604 src/extra/graphapp/dialogs.c:622
+#: src/extra/graphapp/dialogs.c:628 src/extra/graphapp/dialogs.c:727
+#: src/extra/graphapp/dialogs.c:741 src/extra/graphapp/dialogs.c:747
 #: src/library/utils/src/windows/widgets.c:125
 msgid "Cancel"
 msgstr "ȡ��"
 
-#: src/extra/graphapp/dialogs.c:622 src/extra/graphapp/dialogs.c:741
+#: src/extra/graphapp/dialogs.c:624 src/extra/graphapp/dialogs.c:743
 #: src/library/utils/src/windows/widgets.c:124
 msgid "OK"
 msgstr "ȷ��"
 
-#: src/extra/graphapp/dialogs.c:733
+#: src/extra/graphapp/dialogs.c:735
 msgid "User"
 msgstr "�û�"
 
-#: src/extra/graphapp/dialogs.c:734
+#: src/extra/graphapp/dialogs.c:736
 msgid "Password"
 msgstr "����"
 
-#: src/extra/graphapp/dialogs.c:900 src/extra/graphapp/dialogs.c:906
+#: src/extra/graphapp/dialogs.c:902 src/extra/graphapp/dialogs.c:908
 #, c-format
 msgid "\"%s\" not found"
 msgstr "�Ҳ���\"%s\""
@@ -861,9 +863,9 @@ msgid "Arrange Icons"
 msgstr "����ͼ��"
 
 #: src/library/utils/src/windows/dataentry.c:223
-#: src/library/utils/src/windows/dataentry.c:1850
-#: src/library/utils/src/windows/dataentry.c:1853
-#: src/library/utils/src/windows/dataentry.c:1884
+#: src/library/utils/src/windows/dataentry.c:1851
+#: src/library/utils/src/windows/dataentry.c:1854
+#: src/library/utils/src/windows/dataentry.c:1885
 msgid "invalid argument"
 msgstr "������Ч"
 
@@ -875,17 +877,12 @@ msgstr "ֵ
 msgid "Data Editor"
 msgstr "���ݱ༭��"
 
-#: src/library/utils/src/windows/dataentry.c:282
-#: src/library/utils/src/windows/dataentry.c:1891
-msgid "invalid device"
-msgstr "�豸��Ч"
-
 #: src/library/utils/src/windows/dataentry.c:331
 msgid "dataentry: internal memory problem"
 msgstr "dataentry���ڲ��ڴ�����"
 
 #: src/library/utils/src/windows/dataentry.c:634
-#: src/library/utils/src/windows/dataentry.c:1221
+#: src/library/utils/src/windows/dataentry.c:1222
 msgid "dataentry: internal memory error"
 msgstr "dataentry���ڲ��ڴ����"
 
@@ -894,43 +891,43 @@ msgstr "dataentry
 msgid "internal type error in dataentry"
 msgstr "dataentry�е��ڲ����ͳ���"
 
-#: src/library/utils/src/windows/dataentry.c:852
+#: src/library/utils/src/windows/dataentry.c:853
 msgid "dataentry: parse error on string"
 msgstr "dataentry���ַ����䷨��������"
 
-#: src/library/utils/src/windows/dataentry.c:995
+#: src/library/utils/src/windows/dataentry.c:996
 msgid "dataentry: expression too long"
 msgstr "dataentry�����ʽ̫��"
 
-#: src/library/utils/src/windows/dataentry.c:1472
+#: src/library/utils/src/windows/dataentry.c:1473
 msgid "column names cannot be blank"
 msgstr "����������"
 
-#: src/library/utils/src/windows/dataentry.c:1518
+#: src/library/utils/src/windows/dataentry.c:1519
 msgid "Variable editor"
 msgstr "�����༭��"
 
-#: src/library/utils/src/windows/dataentry.c:1523
+#: src/library/utils/src/windows/dataentry.c:1524
 msgid "variable name"
 msgstr "������"
 
-#: src/library/utils/src/windows/dataentry.c:1525
+#: src/library/utils/src/windows/dataentry.c:1526
 msgid "type"
 msgstr "����"
 
-#: src/library/utils/src/windows/dataentry.c:1639
+#: src/library/utils/src/windows/dataentry.c:1640
 msgid "Cell width(s)"
 msgstr "��Ԫ���"
 
-#: src/library/utils/src/windows/dataentry.c:1645
+#: src/library/utils/src/windows/dataentry.c:1646
 msgid "Cell width"
 msgstr "��Ԫ���"
 
-#: src/library/utils/src/windows/dataentry.c:1648
+#: src/library/utils/src/windows/dataentry.c:1649
 msgid "variable"
 msgstr "����"
 
-#: src/library/utils/src/windows/dataentry.c:1691
+#: src/library/utils/src/windows/dataentry.c:1692
 msgid ""
 "Navigation.\n"
 "  Keyboard: cursor keys move selection\n"
@@ -972,221 +969,223 @@ msgstr ""
 "  �Ҽ��˵���������, ճ��, �Զ�������ѡ�еĿ��\n"
 "\n"
 
-#: src/library/utils/src/windows/dataentry.c:1699
+#: src/library/utils/src/windows/dataentry.c:1700
 msgid "Copy selected cell"
 msgstr "������ѡ��Ԫ��"
 
-#: src/library/utils/src/windows/dataentry.c:1700
+#: src/library/utils/src/windows/dataentry.c:1701
 msgid "Paste to selected cell"
 msgstr "ճ������ѡ��Ԫ��"
 
-#: src/library/utils/src/windows/dataentry.c:1701
+#: src/library/utils/src/windows/dataentry.c:1702
 msgid "Autosize column"
 msgstr "�Զ������п�"
 
-#: src/library/utils/src/windows/dataentry.c:1797
+#: src/library/utils/src/windows/dataentry.c:1798
 msgid "Copy  \tCTRL+C"
 msgstr "����  \tCTRL+C"
 
-#: src/library/utils/src/windows/dataentry.c:1799
+#: src/library/utils/src/windows/dataentry.c:1800
 msgid "Paste \tCTRL+V"
 msgstr "ճ�� \tCTRL+V"
 
-#: src/library/utils/src/windows/dataentry.c:1801
+#: src/library/utils/src/windows/dataentry.c:1802
 msgid "Delete\tDEL"
 msgstr "ɾ��\tDEL"
 
-#: src/library/utils/src/windows/dataentry.c:1804
+#: src/library/utils/src/windows/dataentry.c:1805
 msgid "Cell widths ..."
 msgstr "��Ԫ���..."
 
-#: src/library/utils/src/windows/dataentry.c:1808
+#: src/library/utils/src/windows/dataentry.c:1809
 msgid "Data editor"
 msgstr "���ݱ༭��"
 
-#: src/library/grDevices/src/devWindows.c:932
+#: src/library/grDevices/src/devWindows.c:949
 msgid "Portable network graphics file"
 msgstr "��Яʽ����ͼ���ļ�"
 
-#: src/library/grDevices/src/devWindows.c:935
+#: src/library/grDevices/src/devWindows.c:952
 msgid "Windows bitmap file"
 msgstr "Windowsλͼ�ļ�"
 
-#: src/library/grDevices/src/devWindows.c:938
+#: src/library/grDevices/src/devWindows.c:955
 msgid "TIFF file"
 msgstr "TIFF�ļ�"
 
-#: src/library/grDevices/src/devWindows.c:941
+#: src/library/grDevices/src/devWindows.c:958
 msgid "Jpeg file"
 msgstr "Jpeg�ļ�"
 
-#: src/library/grDevices/src/devWindows.c:963
+#: src/library/grDevices/src/devWindows.c:980
 msgid "Postscript file"
 msgstr "Postscript�ļ�"
 
-#: src/library/grDevices/src/devWindows.c:975
+#: src/library/grDevices/src/devWindows.c:992
 msgid "PDF file"
 msgstr "PDF�ļ�"
 
-#: src/library/grDevices/src/devWindows.c:987
+#: src/library/grDevices/src/devWindows.c:1004
 msgid "Enhanced metafiles"
 msgstr "��ǿ��ͼԪ�ļ�"
 
-#: src/library/grDevices/src/devWindows.c:990
-#: src/library/grDevices/src/devWindows.c:3436
+#: src/library/grDevices/src/devWindows.c:1007
+#: src/library/grDevices/src/devWindows.c:3445
 msgid "file path selected is too long: only 512 bytes are allowed"
 msgstr "ѡ���ļ�·��̫�������ֻ����512�ֽ�"
 
-#: src/library/grDevices/src/devWindows.c:1201
+#: src/library/grDevices/src/devWindows.c:1218
 msgid "No plot to replace!"
 msgstr "û�п��滻��ͼ��"
 
-#: src/library/grDevices/src/devWindows.c:1249
+#: src/library/grDevices/src/devWindows.c:1268
 msgid "Variable name"
 msgstr "������"
 
-#: src/library/grDevices/src/devWindows.c:1258
+#: src/library/grDevices/src/devWindows.c:1277
 #, fuzzy
 msgid "Variable doesn't contain any plots!"
 msgstr "���������ڻ򲻰����κ�ͼ��"
 
-#: src/library/grDevices/src/devWindows.c:1273
+#: src/library/grDevices/src/devWindows.c:1292
 msgid "Name of variable to save to"
 msgstr "Ҫ���浽�ı�����"
 
-#: src/library/grDevices/src/devWindows.c:1582
+#: src/library/grDevices/src/devWindows.c:1601
 msgid "Copy to the clipboard as a metafile"
 msgstr "��Ϊ��ǿ��ͼԪ�ļ����Ƶ�������"
 
-#: src/library/grDevices/src/devWindows.c:1600
-#: src/library/grDevices/src/devWindows.c:1611
+#: src/library/grDevices/src/devWindows.c:1619
+#: src/library/grDevices/src/devWindows.c:1630
 msgid "Stop locator"
 msgstr "ֹͣ��λ��"
 
-#: src/library/grDevices/src/devWindows.c:1610
-#: src/library/grDevices/src/devWindows.c:1614
+#: src/library/grDevices/src/devWindows.c:1629
+#: src/library/grDevices/src/devWindows.c:1633
 msgid "Stop"
 msgstr "ֹͣ"
 
-#: src/library/grDevices/src/devWindows.c:1616
+#: src/library/grDevices/src/devWindows.c:1635
 msgid "Continue"
 msgstr "����"
 
-#: src/library/grDevices/src/devWindows.c:1620
+#: src/library/grDevices/src/devWindows.c:1639
 msgid "Next"
 msgstr "��һ��"
 
-#: src/library/grDevices/src/devWindows.c:1621
+#: src/library/grDevices/src/devWindows.c:1640
 msgid "Next plot"
 msgstr "��һ��ͼ"
 
-#: src/library/grDevices/src/devWindows.c:1627
+#: src/library/grDevices/src/devWindows.c:1646
 msgid "Save as"
 msgstr "���Ϊ"
 
-#: src/library/grDevices/src/devWindows.c:1636
-#: src/library/grDevices/src/devWindows.c:1638
-#: src/library/grDevices/src/devWindows.c:1640
+#: src/library/grDevices/src/devWindows.c:1655
+#: src/library/grDevices/src/devWindows.c:1657
+#: src/library/grDevices/src/devWindows.c:1659
 #, c-format
 msgid "%s quality..."
 msgstr "%s ӡˢ����..."
 
-#: src/library/grDevices/src/devWindows.c:1642
+#: src/library/grDevices/src/devWindows.c:1661
 msgid "Copy to the clipboard"
 msgstr "���Ƶ�������"
 
-#: src/library/grDevices/src/devWindows.c:1643
+#: src/library/grDevices/src/devWindows.c:1662
 msgid "as a Bitmap\tCTRL+C"
 msgstr "Ϊλͼ\tCTRL+C"
 
-#: src/library/grDevices/src/devWindows.c:1644
+#: src/library/grDevices/src/devWindows.c:1663
 msgid "as a Metafile\tCTRL+W"
 msgstr "ΪͼԪ�ļ�\tCTRL+W"
 
-#: src/library/grDevices/src/devWindows.c:1647
-msgid "Print...\tCTRL+P"
-msgstr "��ӡ...\tCTRL+P"
-
-#: src/library/grDevices/src/devWindows.c:1649
+#: src/library/grDevices/src/devWindows.c:1668
 msgid "close Device"
 msgstr "�ر��豸"
 
-#: src/library/grDevices/src/devWindows.c:1650
+#: src/library/grDevices/src/devWindows.c:1669
 msgid "History"
 msgstr "��ʷ"
 
-#: src/library/grDevices/src/devWindows.c:1651
+#: src/library/grDevices/src/devWindows.c:1670
 msgid "Recording"
 msgstr "��¼"
 
-#: src/library/grDevices/src/devWindows.c:1654
+#: src/library/grDevices/src/devWindows.c:1673
 msgid "Add\tINS"
 msgstr "����\tINS"
 
-#: src/library/grDevices/src/devWindows.c:1655
+#: src/library/grDevices/src/devWindows.c:1674
 msgid "Replace"
 msgstr "�滻"
 
-#: src/library/grDevices/src/devWindows.c:1657
+#: src/library/grDevices/src/devWindows.c:1676
 msgid "Previous\tPgUp"
 msgstr "��һ��\tPgUp"
 
-#: src/library/grDevices/src/devWindows.c:1658
+#: src/library/grDevices/src/devWindows.c:1677
 msgid "Next\tPgDown"
 msgstr "��һ��\tPgDown"
 
-#: src/library/grDevices/src/devWindows.c:1660
+#: src/library/grDevices/src/devWindows.c:1679
 msgid "Save to variable..."
 msgstr "���浽����..."
 
-#: src/library/grDevices/src/devWindows.c:1661
+#: src/library/grDevices/src/devWindows.c:1680
 msgid "Get from variable..."
 msgstr "��ȡ�ڱ���..."
 
-#: src/library/grDevices/src/devWindows.c:1663
+#: src/library/grDevices/src/devWindows.c:1682
 msgid "Clear history"
 msgstr "�����ʷ"
 
-#: src/library/grDevices/src/devWindows.c:1664
+#: src/library/grDevices/src/devWindows.c:1683
 msgid "Resize"
 msgstr "�����С"
 
-#: src/library/grDevices/src/devWindows.c:1665
+#: src/library/grDevices/src/devWindows.c:1684
 msgid "R mode"
 msgstr "Rģʽ"
 
-#: src/library/grDevices/src/devWindows.c:1667
+#: src/library/grDevices/src/devWindows.c:1686
 msgid "Fit to window"
 msgstr "�ʺϴ���"
 
-#: src/library/grDevices/src/devWindows.c:1669
+#: src/library/grDevices/src/devWindows.c:1688
 msgid "Fixed size"
 msgstr "�̶���С"
 
-#: src/library/grDevices/src/devWindows.c:1676
+#: src/library/grDevices/src/devWindows.c:1695
 msgid "Copy as metafile"
 msgstr "����ΪͼԪ�ļ�"
 
-#: src/library/grDevices/src/devWindows.c:1678
+#: src/library/grDevices/src/devWindows.c:1697
 msgid "Copy as bitmap"
 msgstr "����Ϊλͼ"
 
-#: src/library/grDevices/src/devWindows.c:1681
+#: src/library/grDevices/src/devWindows.c:1700
 msgid "Save as metafile..."
 msgstr "����ΪͼԪ�ļ�..."
 
-#: src/library/grDevices/src/devWindows.c:1683
+#: src/library/grDevices/src/devWindows.c:1702
 msgid "Save as postscript..."
 msgstr "����Ϊpostscript..."
 
-#: src/library/grDevices/src/devWindows.c:3136
+#: src/library/grDevices/src/devWindows.c:3143
 msgid "Locator is active"
 msgstr "��λ���Ѽ���"
 
-#: src/library/grDevices/src/devWindows.c:3763
+#: src/library/grDevices/src/devWindows.c:3769
 msgid "Waiting to confirm page change..."
 msgstr "�ȴ�ҳ��ı��ȷ��..."
 
-#: src/library/grDevices/src/devWindows.c:3775
+#: src/library/grDevices/src/devWindows.c:3781
 msgid "Click or hit ENTER for next page"
 msgstr "��ENTER����һҳ"
+
+#~ msgid "Print...\tCTRL+P"
+#~ msgstr "��ӡ...\tCTRL+P"
+
+#~ msgid "invalid device"
+#~ msgstr "�豸��Ч"
diff --git a/src/library/base/po/RGui-zh_TW.po b/src/library/base/po/RGui-zh_TW.po
index a05c936..87ef78f 100644
--- a/src/library/base/po/RGui-zh_TW.po
+++ b/src/library/base/po/RGui-zh_TW.po
@@ -8,7 +8,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: RGui 2.14.0\n"
 "Report-Msgid-Bugs-To: bugs.r-project.org\n"
-"POT-Creation-Date: 2013-03-18 19:36+0000\n"
+"POT-Creation-Date: 2016-04-01 10:28-0700\n"
 "PO-Revision-Date: 2011-10-13 17:33+0800\n"
 "Last-Translator: Wei-Lun Chao <chaoweilun at gmail.com>\n"
 "Language-Team: Chinese (traditional) <zh-l10n at linux.org.tw>\n"
@@ -31,11 +31,11 @@ msgstr "
 msgid "Unable to open the clipboard"
 msgstr "�L�k�}�ҰŶKï"
 
-#: src/gnuwin32/console.c:1914
+#: src/gnuwin32/console.c:1919
 msgid "Insufficient memory. Please close the console"
 msgstr "�O���餣���C�������D���O"
 
-#: src/gnuwin32/console.c:1969 src/gnuwin32/console.c:2022
+#: src/gnuwin32/console.c:1974 src/gnuwin32/console.c:2028
 #: src/gnuwin32/preferences.c:333
 #, c-format
 msgid ""
@@ -45,23 +45,23 @@ msgstr ""
 "�䤣�� %s-%d-%d �r���C\n"
 "�ϥΨt�Ωw�e�r��"
 
-#: src/gnuwin32/console.c:2127
+#: src/gnuwin32/console.c:2133
 msgid "Save selection to"
 msgstr "�x�s�ҿﳡ����"
 
-#: src/gnuwin32/console.c:2129
+#: src/gnuwin32/console.c:2135
 msgid "Save console contents to"
 msgstr "�x�s�D���O���e��"
 
-#: src/gnuwin32/console.c:2228
+#: src/gnuwin32/console.c:2234
 msgid "Scrolling.\n"
 msgstr "���ʡC\n"
 
-#: src/gnuwin32/console.c:2229
+#: src/gnuwin32/console.c:2235
 msgid "  Keyboard: PgUp, PgDown, Ctrl+Arrows, Ctrl+Home, Ctrl+End,\n"
 msgstr "  ��L: PgUp�BPgDown�BCtrl+��V��BCtrl+Home�BCtrl+End�B\n"
 
-#: src/gnuwin32/console.c:2230
+#: src/gnuwin32/console.c:2236
 msgid ""
 "  Mouse: use the scrollbar(s).\n"
 "\n"
@@ -69,97 +69,97 @@ msgstr ""
 "  �ƹ�: �ϥα��ʶb�C\n"
 "\n"
 
-#: src/gnuwin32/console.c:2231
+#: src/gnuwin32/console.c:2237
 msgid "Editing.\n"
 msgstr "�s�褤�C\n"
 
-#: src/gnuwin32/console.c:2232
+#: src/gnuwin32/console.c:2238
 msgid "  Moving the cursor: \n"
 msgstr "  ���ʴ��: \n"
 
-#: src/gnuwin32/console.c:2233
+#: src/gnuwin32/console.c:2239
 msgid "     Left arrow or Ctrl+B: move backward one character;\n"
 msgstr "     ���b�Y�� Ctrl+B: �����@�r���F\n"
 
-#: src/gnuwin32/console.c:2234
+#: src/gnuwin32/console.c:2240
 msgid "     Right arrow or Ctrl+F: move forward one character;\n"
 msgstr "     �k�b�Y��Ctrl+F: �k���@�r���F\n"
 
-#: src/gnuwin32/console.c:2235
+#: src/gnuwin32/console.c:2241
 msgid "     Home or Ctrl+A: go to beginning of line;\n"
 msgstr "     Home �� Ctrl+A: ����C���F\n"
 
-#: src/gnuwin32/console.c:2236
+#: src/gnuwin32/console.c:2242
 msgid "     End or Ctrl+E: go to end of line;\n"
 msgstr "     End �� Ctrl+E: ����C���F\n"
 
-#: src/gnuwin32/console.c:2237
+#: src/gnuwin32/console.c:2243
 msgid "  History: Up and Down Arrows, Ctrl+P, Ctrl+N\n"
 msgstr "  �R�O���{: �W�B�U�b�Y�BCtrl+P�BCtrl+N\n"
 
-#: src/gnuwin32/console.c:2238
+#: src/gnuwin32/console.c:2244
 msgid "  Deleting:\n"
 msgstr "  �R����:\n"
 
-#: src/gnuwin32/console.c:2239
+#: src/gnuwin32/console.c:2245
 msgid "     Del or Ctrl+D: delete current character or selection;\n"
 msgstr "     Del �� Ctrl+D:�R���ثe�Ҧb�r���ο���F\n"
 
-#: src/gnuwin32/console.c:2240
+#: src/gnuwin32/console.c:2246
 msgid "     Backspace: delete preceding character;\n"
 msgstr "     Backspace: �R���ثe��m���e���r���F\n"
 
-#: src/gnuwin32/console.c:2241
+#: src/gnuwin32/console.c:2247
 msgid ""
 "     Ctrl+Del or Ctrl+K: delete text from current character to end of line.\n"
 msgstr "     Ctrl+Del �� Ctrl+K: �R���ثe��m��C�����Ҧ���r�C\n"
 
-#: src/gnuwin32/console.c:2242
+#: src/gnuwin32/console.c:2248
 msgid "     Ctrl+U: delete all text from current line.\n"
 msgstr "     Ctrl+U: �q�ثe�Ҧb�C�}�l�R���Ҧ�����r�C\n"
 
-#: src/gnuwin32/console.c:2243
+#: src/gnuwin32/console.c:2249
 msgid "  Copy and paste.\n"
 msgstr "  �ƻs�M�K�W�C\n"
 
-#: src/gnuwin32/console.c:2244
+#: src/gnuwin32/console.c:2250
 msgid ""
 "     Use the mouse (with the left button held down) to mark (select) text.\n"
 msgstr "     �ηƹ� (������ۥ���) �ӿ�ܤ�r�C\n"
 
-#: src/gnuwin32/console.c:2245
+#: src/gnuwin32/console.c:2251
 msgid ""
 "     Use Shift+Del (or Ctrl+C) to copy the marked text to the clipboard and\n"
 msgstr "     �� Shift+Del (�� Ctrl+C) ���ܦn����r�ƻs��ŶKï�H��\n"
 
-#: src/gnuwin32/console.c:2246
+#: src/gnuwin32/console.c:2252
 msgid ""
 "     Shift+Ins (or Ctrl+V or Ctrl+Y) to paste the content of the clipboard "
 "(if any)  \n"
 msgstr ""
 "     �� Shift+Ins (�� Ctrl+V �� Ctrl+Y) �ӶK�W�ŶKï�����e (�p�G������)  \n"
 
-#: src/gnuwin32/console.c:2247
+#: src/gnuwin32/console.c:2253
 msgid "     to the console, Ctrl+X first copy then paste\n"
 msgstr "     ��D���O�ACtrl+X ���ƻs�A�K�W\n"
 
-#: src/gnuwin32/console.c:2248
+#: src/gnuwin32/console.c:2254
 msgid "  Misc:\n"
 msgstr "  �䥦:\n"
 
-#: src/gnuwin32/console.c:2249
+#: src/gnuwin32/console.c:2255
 msgid "     Ctrl+L: Clear the console.\n"
 msgstr "     Ctrl+L: �M���D���O�C\n"
 
-#: src/gnuwin32/console.c:2250
+#: src/gnuwin32/console.c:2256
 msgid "     Ctrl+O or INS: Toggle overwrite mode: initially off.\n"
 msgstr "     Ctrl+O �� INS�G�����мg�Ҧ��G��l�������C\n"
 
-#: src/gnuwin32/console.c:2251
+#: src/gnuwin32/console.c:2257
 msgid "     Ctrl+T: Interchange current char with one to the left.\n"
 msgstr "     Ctrl+T: �N�ثe�Ҧb��m���r���P�䥪�誺�r���洫�C\n"
 
-#: src/gnuwin32/console.c:2252
+#: src/gnuwin32/console.c:2258
 msgid ""
 "\n"
 "Note: Console is updated only when some input is required.\n"
@@ -167,7 +167,7 @@ msgstr ""
 "\n"
 "�`�N: �u���b�n�D��J�ɥD���O�~�|�Q��s�C\n"
 
-#: src/gnuwin32/console.c:2253
+#: src/gnuwin32/console.c:2259
 msgid ""
 "  Use Ctrl+W to toggle this feature off/on.\n"
 "\n"
@@ -175,7 +175,7 @@ msgstr ""
 "  �ϥ� Ctrl+W �Ӷ}�����@�\��C\n"
 "\n"
 
-#: src/gnuwin32/console.c:2254
+#: src/gnuwin32/console.c:2260
 msgid ""
 "Use ESC to stop the interpreter.\n"
 "\n"
@@ -183,7 +183,7 @@ msgstr ""
 "�ϥ� ESC �Ӱ����Ķ���C\n"
 "\n"
 
-#: src/gnuwin32/console.c:2255
+#: src/gnuwin32/console.c:2261
 msgid ""
 "TAB starts completion of the current word.\n"
 "\n"
@@ -191,264 +191,265 @@ msgstr ""
 "TAB �Ұʸɧ��ثe���r���C\n"
 "\n"
 
-#: src/gnuwin32/console.c:2256
+#: src/gnuwin32/console.c:2262
 msgid "Standard Windows hotkeys can be used to switch to the\n"
 msgstr "�i�H�� Windows ���зǧֱ�����ഫ\n"
 
-#: src/gnuwin32/console.c:2257
+#: src/gnuwin32/console.c:2263
 msgid "graphics device (Ctrl+Tab or Ctrl+F6 in MDI, Alt+Tab in SDI)"
 msgstr "ø�ϸ˸m (MDI �� Ctrl+Tab �� Ctrl+F6�ASDI �� Alt+Tab)"
 
-#: src/gnuwin32/editor.c:88 src/gnuwin32/editor.c:90
+#: src/gnuwin32/editor.c:91 src/gnuwin32/editor.c:93
 msgid "R Editor"
 msgstr "R �s�边"
 
-#: src/gnuwin32/editor.c:119
+#: src/gnuwin32/editor.c:123
 #, c-format
 msgid "unable to open file %s for reading"
 msgstr "�L�k�}���ɮ� %s �HŪ��"
 
-#: src/gnuwin32/editor.c:135
+#: src/gnuwin32/editor.c:139
 #, c-format
 msgid "Could not read from file '%s'"
 msgstr "�L�kŪ�����ɮ� '%s'"
 
-#: src/gnuwin32/editor.c:166
+#: src/gnuwin32/editor.c:171
 #, c-format
 msgid "Could not save file '%s'"
 msgstr "�L�k�x�s�ɮ� '%s'"
 
-#: src/gnuwin32/editor.c:182
+#: src/gnuwin32/editor.c:187
 msgid "Save script as"
 msgstr "�R�O�Z�t�s��"
 
-#: src/gnuwin32/editor.c:377 src/gnuwin32/editor.c:694
-#: src/gnuwin32/pager.c:431 src/gnuwin32/rui.c:1076
+#: src/gnuwin32/editor.c:379 src/gnuwin32/editor.c:696
+#: src/gnuwin32/pager.c:430 src/gnuwin32/rui.c:1076
 msgid "Open script"
 msgstr "�}�ҩR�O�Z"
 
-#: src/gnuwin32/editor.c:500 src/gnuwin32/pager.c:185 src/gnuwin32/pager.c:205
+#: src/gnuwin32/editor.c:502 src/gnuwin32/pager.c:184 src/gnuwin32/pager.c:204
 msgid "No RGui console to paste to"
 msgstr "�S���i�H�K�W�� RGui �D���O"
 
-#: src/gnuwin32/editor.c:602
+#: src/gnuwin32/editor.c:604
 msgid "R EDITOR\n"
 msgstr "R �s�边\n"
 
-#: src/gnuwin32/editor.c:604
+#: src/gnuwin32/editor.c:606
 msgid "A standard text editor for editing and running R code.\n"
 msgstr "�@�ӥΩ�s��M���� R �{�����зǤ�r�s�边�C\n"
 
-#: src/gnuwin32/editor.c:606
+#: src/gnuwin32/editor.c:608
 msgid "RUNNING COMMANDS\n"
 msgstr "����R�O\n"
 
-#: src/gnuwin32/editor.c:607
+#: src/gnuwin32/editor.c:609
 msgid "To run a line or section of R code, select the code and either\n"
 msgstr "�n����@�C�Τ@�q R ���{���X�A����ܩһݭn���{���X�A�M��A\n"
 
-#: src/gnuwin32/editor.c:608
+#: src/gnuwin32/editor.c:610
 msgid "     Press Ctrl-R\n"
 msgstr "     �� Ctrl-R\n"
 
-#: src/gnuwin32/editor.c:609
+#: src/gnuwin32/editor.c:611
 msgid "     Select \"Run line or selection\" from the \"Edit\" menu\n"
 msgstr "     �q�u�s��v��椤��ܡu����{���C�ο�ܶ��v\n"
 
-#: src/gnuwin32/editor.c:610
+#: src/gnuwin32/editor.c:612
 msgid "     Press the \"Run line or selection\" icon on the toolbar\n"
 msgstr "     ���u��C�W���u����{���C�ο�ܶ��v���s\n"
 
-#: src/gnuwin32/editor.c:611
+#: src/gnuwin32/editor.c:613
 msgid ""
 "This will copy the selected commands to the console and evaluate them.\n"
 msgstr "�o�|���ܪ��R�O�ƻs��D���O�Ӥ��H����C\n"
 
-#: src/gnuwin32/editor.c:612
+#: src/gnuwin32/editor.c:614
 msgid ""
 "If there is no selection, this will just run the current line and advance\n"
 msgstr "�p�G�S����ܪ��ܡA�ثe�Ҧb�C���R�O�|�Q����\n"
 
-#: src/gnuwin32/editor.c:613
+#: src/gnuwin32/editor.c:615
 msgid "the cursor by one line.\n"
 msgstr "��ЩҦb�C�C\n"
 
-#: src/gnuwin32/editor.c:625 src/gnuwin32/editor.c:702
-#: src/gnuwin32/editor.c:760
+#: src/gnuwin32/editor.c:627 src/gnuwin32/editor.c:704
+#: src/gnuwin32/editor.c:762
 msgid "Run line or selection"
 msgstr "����{���C�ο�ܶ�"
 
-#: src/gnuwin32/editor.c:627 src/gnuwin32/editor.c:745
+#: src/gnuwin32/editor.c:629 src/gnuwin32/editor.c:747
 msgid "Undo"
 msgstr "�_��"
 
-#: src/gnuwin32/editor.c:629 src/gnuwin32/editor.c:748
+#: src/gnuwin32/editor.c:631 src/gnuwin32/editor.c:750
 msgid "Cut"
 msgstr "�ŤU"
 
-#: src/gnuwin32/editor.c:630 src/gnuwin32/editor.c:750
-#: src/gnuwin32/pager.c:305 src/gnuwin32/pager.c:478 src/gnuwin32/rui.c:859
+#: src/gnuwin32/editor.c:632 src/gnuwin32/editor.c:752
+#: src/gnuwin32/pager.c:304 src/gnuwin32/pager.c:477 src/gnuwin32/rui.c:859
 #: src/gnuwin32/rui.c:1088 src/gnuwin32/rui.c:1144
 msgid "Copy"
 msgstr "�ƻs"
 
-#: src/gnuwin32/editor.c:631 src/gnuwin32/editor.c:752 src/gnuwin32/rui.c:860
+#: src/gnuwin32/editor.c:633 src/gnuwin32/editor.c:754 src/gnuwin32/rui.c:860
 #: src/gnuwin32/rui.c:1092 src/gnuwin32/rui.c:1145
 msgid "Paste"
 msgstr "�K�W"
 
-#: src/gnuwin32/editor.c:632 src/gnuwin32/editor.c:754
+#: src/gnuwin32/editor.c:634 src/gnuwin32/editor.c:756
 msgid "Delete"
 msgstr "�R��"
 
-#: src/gnuwin32/editor.c:634 src/gnuwin32/editor.c:756
-#: src/gnuwin32/pager.c:308 src/gnuwin32/pager.c:484 src/gnuwin32/rui.c:866
+#: src/gnuwin32/editor.c:636 src/gnuwin32/editor.c:758
+#: src/gnuwin32/pager.c:307 src/gnuwin32/pager.c:483 src/gnuwin32/rui.c:866
 #: src/gnuwin32/rui.c:1149
 msgid "Select all"
 msgstr "�������"
 
-#: src/gnuwin32/editor.c:698
+#: src/gnuwin32/editor.c:700
 msgid "Save script"
 msgstr "�x�s�R�O�Z"
 
-#: src/gnuwin32/editor.c:706 src/gnuwin32/pager.c:451
-#: src/library/grDevices/src/devWindows.c:1594
+#: src/gnuwin32/editor.c:708 src/gnuwin32/pager.c:450
+#: src/library/grDevices/src/devWindows.c:1613
 msgid "Return focus to Console"
 msgstr "�^�_�J�I��D���O"
 
-#: src/gnuwin32/editor.c:709
+#: src/gnuwin32/editor.c:711
 msgid "Print script"
 msgstr "�C�L�R�O�Z"
 
-#: src/gnuwin32/editor.c:711 src/gnuwin32/pager.c:446 src/gnuwin32/rui.c:1104
-#: src/library/grDevices/src/devWindows.c:1588
+#: src/gnuwin32/editor.c:713 src/gnuwin32/pager.c:445 src/gnuwin32/rui.c:1104
+#: src/library/grDevices/src/devWindows.c:1607
 msgid "Print"
 msgstr "�C�L"
 
-#: src/gnuwin32/editor.c:729 src/gnuwin32/pager.c:467 src/gnuwin32/rui.c:1122
-#: src/library/utils/src/windows/dataentry.c:1790
-#: src/library/grDevices/src/devWindows.c:1626
+#: src/gnuwin32/editor.c:731 src/gnuwin32/pager.c:466 src/gnuwin32/rui.c:1122
+#: src/library/utils/src/windows/dataentry.c:1791
+#: src/library/grDevices/src/devWindows.c:1645
 msgid "File"
 msgstr "�ɮ�"
 
-#: src/gnuwin32/editor.c:730 src/gnuwin32/pager.c:468 src/gnuwin32/rui.c:1124
+#: src/gnuwin32/editor.c:732 src/gnuwin32/pager.c:467 src/gnuwin32/rui.c:1124
 msgid "New script"
 msgstr "�إ߷s���R�O�Z"
 
-#: src/gnuwin32/editor.c:732 src/gnuwin32/pager.c:469 src/gnuwin32/rui.c:1125
+#: src/gnuwin32/editor.c:734 src/gnuwin32/pager.c:468 src/gnuwin32/rui.c:1125
 msgid "Open script..."
 msgstr "�}�ҩR�O�Z�K"
 
-#: src/gnuwin32/editor.c:734
+#: src/gnuwin32/editor.c:736
 msgid "Save"
 msgstr "�x�s"
 
-#: src/gnuwin32/editor.c:736
+#: src/gnuwin32/editor.c:738
 msgid "Save as..."
 msgstr "�t�s���K"
 
-#: src/gnuwin32/editor.c:739 src/gnuwin32/pager.c:470 src/gnuwin32/rui.c:1138
-#: src/library/grDevices/src/devWindows.c:1689
+#: src/gnuwin32/editor.c:741 src/gnuwin32/pager.c:469 src/gnuwin32/rui.c:1138
+#: src/library/grDevices/src/devWindows.c:1666
+#: src/library/grDevices/src/devWindows.c:1708
 msgid "Print..."
 msgstr "�C�L�K"
 
-#: src/gnuwin32/editor.c:742
+#: src/gnuwin32/editor.c:744
 msgid "Close script"
 msgstr "�����R�O�Z"
 
-#: src/gnuwin32/editor.c:744 src/gnuwin32/pager.c:477 src/gnuwin32/rui.c:1143
-#: src/library/utils/src/windows/dataentry.c:1796
+#: src/gnuwin32/editor.c:746 src/gnuwin32/pager.c:476 src/gnuwin32/rui.c:1143
+#: src/library/utils/src/windows/dataentry.c:1797
 msgid "Edit"
 msgstr "�s��"
 
-#: src/gnuwin32/editor.c:758 src/gnuwin32/rui.c:1150
+#: src/gnuwin32/editor.c:760 src/gnuwin32/rui.c:1150
 msgid "Clear console"
 msgstr "�M�ťD���O"
 
-#: src/gnuwin32/editor.c:762
+#: src/gnuwin32/editor.c:764
 msgid "Run all"
 msgstr "�������"
 
-#: src/gnuwin32/editor.c:765
+#: src/gnuwin32/editor.c:767
 msgid "Find..."
 msgstr "�M��K"
 
-#: src/gnuwin32/editor.c:767
+#: src/gnuwin32/editor.c:769
 msgid "Replace..."
 msgstr "�����K"
 
-#: src/gnuwin32/editor.c:770 src/gnuwin32/rui.c:1154
+#: src/gnuwin32/editor.c:772 src/gnuwin32/rui.c:1154
 msgid "GUI preferences..."
 msgstr "GUI ���n�]�w�K"
 
-#: src/gnuwin32/editor.c:780 src/gnuwin32/rui.c:1186
-#: src/library/utils/src/windows/dataentry.c:1697
-#: src/library/utils/src/windows/dataentry.c:1807
+#: src/gnuwin32/editor.c:782 src/gnuwin32/rui.c:1186
+#: src/library/utils/src/windows/dataentry.c:1698
+#: src/library/utils/src/windows/dataentry.c:1808
 msgid "Help"
 msgstr "���U"
 
-#: src/gnuwin32/editor.c:781
+#: src/gnuwin32/editor.c:783
 msgid "Editor"
 msgstr "�s�边"
 
-#: src/gnuwin32/editor.c:840
+#: src/gnuwin32/editor.c:842
 msgid "Maximum number of editors reached"
 msgstr "�s�边�ƶq�Ӧh"
 
-#: src/gnuwin32/editor.c:845
+#: src/gnuwin32/editor.c:847
 msgid "Unable to create editor window"
 msgstr "�L�k�إ߽s�边����"
 
-#: src/gnuwin32/editor.c:853
+#: src/gnuwin32/editor.c:855
 msgid "Untitled"
 msgstr "���R�W"
 
-#: src/gnuwin32/extra.c:823 src/gnuwin32/rui.c:1224
+#: src/gnuwin32/extra.c:825
 msgid "Select file"
 msgstr "����ɮ�"
 
-#: src/gnuwin32/pager.c:89
+#: src/gnuwin32/pager.c:88
 msgid "Error opening file"
 msgstr "�}���ɮ׮ɵo�Ϳ��~"
 
-#: src/gnuwin32/pager.c:96
+#: src/gnuwin32/pager.c:95
 msgid "Insufficient memory to display file in internal pager"
 msgstr "�Τ������������{��������ɮ׮ɰO���餣��"
 
-#: src/gnuwin32/pager.c:177 src/gnuwin32/pager.c:189 src/gnuwin32/pager.c:209
+#: src/gnuwin32/pager.c:176 src/gnuwin32/pager.c:188 src/gnuwin32/pager.c:208
 #: src/gnuwin32/rui.c:237 src/gnuwin32/rui.c:264
 msgid "No selection"
 msgstr "�S�����"
 
-#: src/gnuwin32/pager.c:306 src/gnuwin32/pager.c:436 src/gnuwin32/pager.c:480
+#: src/gnuwin32/pager.c:305 src/gnuwin32/pager.c:435 src/gnuwin32/pager.c:479
 msgid "Paste to console"
 msgstr "�K��D���O"
 
-#: src/gnuwin32/pager.c:307 src/gnuwin32/pager.c:441 src/gnuwin32/pager.c:482
+#: src/gnuwin32/pager.c:306 src/gnuwin32/pager.c:440 src/gnuwin32/pager.c:481
 msgid "Paste commands to console"
 msgstr "�K�W�R�O��D���O"
 
-#: src/gnuwin32/pager.c:310 src/gnuwin32/rui.c:869
-#: src/library/utils/src/windows/dataentry.c:1703
-#: src/library/grDevices/src/devWindows.c:1686
+#: src/gnuwin32/pager.c:309 src/gnuwin32/rui.c:869
+#: src/library/utils/src/windows/dataentry.c:1704
+#: src/library/grDevices/src/devWindows.c:1705
 msgid "Stay on top"
 msgstr "�����O���b�̤W�h"
 
-#: src/gnuwin32/pager.c:312 src/gnuwin32/pager.c:475
-#: src/library/utils/src/windows/dataentry.c:1705
-#: src/library/utils/src/windows/dataentry.c:1792
+#: src/gnuwin32/pager.c:311 src/gnuwin32/pager.c:474
+#: src/library/utils/src/windows/dataentry.c:1706
+#: src/library/utils/src/windows/dataentry.c:1793
 msgid "Close"
 msgstr "����"
 
-#: src/gnuwin32/pager.c:472 src/gnuwin32/rui.c:1139
+#: src/gnuwin32/pager.c:471 src/gnuwin32/rui.c:1139
 msgid "Save to File..."
 msgstr "�x�s���ɮסK"
 
-#: src/gnuwin32/pager.c:487 src/gnuwin32/rui.c:1156
+#: src/gnuwin32/pager.c:486 src/gnuwin32/rui.c:1156
 msgid "View"
 msgstr "��"
 
-#: src/gnuwin32/pager.c:519
+#: src/gnuwin32/pager.c:518
 msgid "Unable to create pager window"
 msgstr "�L�k�إ߭��������{������"
 
@@ -602,7 +603,8 @@ msgid "Update packages..."
 msgstr "��s�{���M��K"
 
 #: src/gnuwin32/rui.c:920
-msgid "Install package(s) from local zip files..."
+#, fuzzy
+msgid "Install package(s) from local files..."
 msgstr "�Υ����� zip �ɮרӦw�˵{���M��K"
 
 #: src/gnuwin32/rui.c:944
@@ -770,52 +772,52 @@ msgstr "
 msgid "Console"
 msgstr "�D���O"
 
-#: src/gnuwin32/rui.c:1268
+#: src/gnuwin32/rui.c:1251
 msgid "'mname' is limited to 1000 bytes"
 msgstr "'mname' �����׳̦h�u�঳ 1000 �Ӧr��"
 
-#: src/gnuwin32/rui.c:1310
+#: src/gnuwin32/rui.c:1293
 #, c-format
 msgid "menu %s does not exist"
 msgstr "%s ��椣�s�b"
 
-#: src/gnuwin32/rui.c:1363
+#: src/gnuwin32/rui.c:1346
 msgid "'menu' is limited to 500 bytes"
 msgstr "'menu' �����׳̦h�u�঳ 500 �Ӧr��"
 
-#: src/gnuwin32/rui.c:1373
+#: src/gnuwin32/rui.c:1356
 msgid "base menu does not exist"
 msgstr "�򥻿�椣�s�b"
 
-#: src/gnuwin32/rui.c:1388
+#: src/gnuwin32/rui.c:1371
 msgid "failed to allocate menu"
 msgstr "�L�k�t�m���"
 
-#: src/gnuwin32/rui.c:1405 src/gnuwin32/rui.c:1529
+#: src/gnuwin32/rui.c:1388 src/gnuwin32/rui.c:1512
 msgid "menu + item is limited to 1000 bytes"
 msgstr "���϶��ت����ץu��b 1000 �Ӧr����"
 
-#: src/gnuwin32/rui.c:1413 src/gnuwin32/rui.c:1496
+#: src/gnuwin32/rui.c:1396 src/gnuwin32/rui.c:1479
 msgid "menu does not exist"
 msgstr "�S�����@���"
 
-#: src/gnuwin32/rui.c:1431 src/gnuwin32/rui.c:1454 src/gnuwin32/rui.c:1459
+#: src/gnuwin32/rui.c:1414 src/gnuwin32/rui.c:1437 src/gnuwin32/rui.c:1442
 msgid "failed to allocate char storage"
 msgstr "�t�m�r���x�s������"
 
-#: src/gnuwin32/rui.c:1467
+#: src/gnuwin32/rui.c:1450
 msgid "failed to allocate menuitem"
 msgstr "�t�m��涵����"
 
-#: src/gnuwin32/rui.c:1519
+#: src/gnuwin32/rui.c:1502
 msgid "menu not found"
 msgstr "�䤣����"
 
-#: src/gnuwin32/rui.c:1537
+#: src/gnuwin32/rui.c:1520
 msgid "menu or item does not exist"
 msgstr "���άO���ؤ��s�b"
 
-#: src/gnuwin32/system.c:442
+#: src/gnuwin32/system.c:446
 msgid "Save workspace image?"
 msgstr "�x�s�u�@�Ŷ��Ϯ�?"
 
@@ -823,41 +825,41 @@ msgstr "
 msgid "Insufficient memory: cell not copied to the clipboard"
 msgstr "�O���餣��: �椸��S���ƻs��ŶKï"
 
-#: src/extra/graphapp/dialogs.c:147 src/extra/graphapp/dialogs.c:164
-#: src/extra/graphapp/dialogs.c:181
+#: src/extra/graphapp/dialogs.c:148 src/extra/graphapp/dialogs.c:165
+#: src/extra/graphapp/dialogs.c:182
 msgid "Question"
 msgstr "���D"
 
-#: src/extra/graphapp/dialogs.c:202
+#: src/extra/graphapp/dialogs.c:203
 msgid " Change working directory to:"
 msgstr " �{��ؿ��令�G"
 
-#: src/extra/graphapp/dialogs.c:205
+#: src/extra/graphapp/dialogs.c:206
 #, c-format
 msgid "Unable to set '%s' as working directory"
 msgstr "�L�k�N '%s' �]���{��ؿ�"
 
-#: src/extra/graphapp/dialogs.c:602 src/extra/graphapp/dialogs.c:620
-#: src/extra/graphapp/dialogs.c:626 src/extra/graphapp/dialogs.c:725
-#: src/extra/graphapp/dialogs.c:739 src/extra/graphapp/dialogs.c:745
+#: src/extra/graphapp/dialogs.c:604 src/extra/graphapp/dialogs.c:622
+#: src/extra/graphapp/dialogs.c:628 src/extra/graphapp/dialogs.c:727
+#: src/extra/graphapp/dialogs.c:741 src/extra/graphapp/dialogs.c:747
 #: src/library/utils/src/windows/widgets.c:125
 msgid "Cancel"
 msgstr "����"
 
-#: src/extra/graphapp/dialogs.c:622 src/extra/graphapp/dialogs.c:741
+#: src/extra/graphapp/dialogs.c:624 src/extra/graphapp/dialogs.c:743
 #: src/library/utils/src/windows/widgets.c:124
 msgid "OK"
 msgstr "�T�w"
 
-#: src/extra/graphapp/dialogs.c:733
+#: src/extra/graphapp/dialogs.c:735
 msgid "User"
 msgstr "�ϥΪ�"
 
-#: src/extra/graphapp/dialogs.c:734
+#: src/extra/graphapp/dialogs.c:736
 msgid "Password"
 msgstr "�K�X"
 
-#: src/extra/graphapp/dialogs.c:900 src/extra/graphapp/dialogs.c:906
+#: src/extra/graphapp/dialogs.c:902 src/extra/graphapp/dialogs.c:908
 #, c-format
 msgid "\"%s\" not found"
 msgstr "�䤣�� \"%s\""
@@ -867,9 +869,9 @@ msgid "Arrange Icons"
 msgstr "�ƦC�ϥ�"
 
 #: src/library/utils/src/windows/dataentry.c:223
-#: src/library/utils/src/windows/dataentry.c:1850
-#: src/library/utils/src/windows/dataentry.c:1853
-#: src/library/utils/src/windows/dataentry.c:1884
+#: src/library/utils/src/windows/dataentry.c:1851
+#: src/library/utils/src/windows/dataentry.c:1854
+#: src/library/utils/src/windows/dataentry.c:1885
 msgid "invalid argument"
 msgstr "�޼Ƥ����T"
 
@@ -881,17 +883,12 @@ msgstr "
 msgid "Data Editor"
 msgstr "��ƽs�边"
 
-#: src/library/utils/src/windows/dataentry.c:282
-#: src/library/utils/src/windows/dataentry.c:1891
-msgid "invalid device"
-msgstr "�˸m�o�Ϳ��~"
-
 #: src/library/utils/src/windows/dataentry.c:331
 msgid "dataentry: internal memory problem"
 msgstr "dataentry: �����O������D"
 
 #: src/library/utils/src/windows/dataentry.c:634
-#: src/library/utils/src/windows/dataentry.c:1221
+#: src/library/utils/src/windows/dataentry.c:1222
 msgid "dataentry: internal memory error"
 msgstr "dataentry: �����O������~"
 
@@ -900,43 +897,43 @@ msgstr "dataentry: 
 msgid "internal type error in dataentry"
 msgstr "dataentry ���������o�Ϳ��~"
 
-#: src/library/utils/src/windows/dataentry.c:852
+#: src/library/utils/src/windows/dataentry.c:853
 msgid "dataentry: parse error on string"
 msgstr "dataentry�G�r���R���~"
 
-#: src/library/utils/src/windows/dataentry.c:995
+#: src/library/utils/src/windows/dataentry.c:996
 msgid "dataentry: expression too long"
 msgstr "dataentry: �B�⦡�Ӫ�"
 
-#: src/library/utils/src/windows/dataentry.c:1472
+#: src/library/utils/src/windows/dataentry.c:1473
 msgid "column names cannot be blank"
 msgstr "��W����O�ťժ�"
 
-#: src/library/utils/src/windows/dataentry.c:1518
+#: src/library/utils/src/windows/dataentry.c:1519
 msgid "Variable editor"
 msgstr "�ܼƽs�边"
 
-#: src/library/utils/src/windows/dataentry.c:1523
+#: src/library/utils/src/windows/dataentry.c:1524
 msgid "variable name"
 msgstr "�ܼƦW��"
 
-#: src/library/utils/src/windows/dataentry.c:1525
+#: src/library/utils/src/windows/dataentry.c:1526
 msgid "type"
 msgstr "����"
 
-#: src/library/utils/src/windows/dataentry.c:1639
+#: src/library/utils/src/windows/dataentry.c:1640
 msgid "Cell width(s)"
 msgstr "�椸��e"
 
-#: src/library/utils/src/windows/dataentry.c:1645
+#: src/library/utils/src/windows/dataentry.c:1646
 msgid "Cell width"
 msgstr "�椸��e"
 
-#: src/library/utils/src/windows/dataentry.c:1648
+#: src/library/utils/src/windows/dataentry.c:1649
 msgid "variable"
 msgstr "�ܼ�"
 
-#: src/library/utils/src/windows/dataentry.c:1691
+#: src/library/utils/src/windows/dataentry.c:1692
 msgid ""
 "Navigation.\n"
 "  Keyboard: cursor keys move selection\n"
@@ -978,221 +975,223 @@ msgstr ""
 "  �k����Ψӽƻs�B�K�W�B���ҿ�ܪ���ۤv�վ�j�p\n"
 "\n"
 
-#: src/library/utils/src/windows/dataentry.c:1699
+#: src/library/utils/src/windows/dataentry.c:1700
 msgid "Copy selected cell"
 msgstr "�ƻs�ҿ諸�椸��"
 
-#: src/library/utils/src/windows/dataentry.c:1700
+#: src/library/utils/src/windows/dataentry.c:1701
 msgid "Paste to selected cell"
 msgstr "�K��ҿ�ܪ��椸��"
 
-#: src/library/utils/src/windows/dataentry.c:1701
+#: src/library/utils/src/windows/dataentry.c:1702
 msgid "Autosize column"
 msgstr "�۰ʽո`�檺�j�p"
 
-#: src/library/utils/src/windows/dataentry.c:1797
+#: src/library/utils/src/windows/dataentry.c:1798
 msgid "Copy  \tCTRL+C"
 msgstr "�ƻs  \tCTRL+C"
 
-#: src/library/utils/src/windows/dataentry.c:1799
+#: src/library/utils/src/windows/dataentry.c:1800
 msgid "Paste \tCTRL+V"
 msgstr "�K�W \tCTRL+V"
 
-#: src/library/utils/src/windows/dataentry.c:1801
+#: src/library/utils/src/windows/dataentry.c:1802
 msgid "Delete\tDEL"
 msgstr "�R��\tDEL"
 
-#: src/library/utils/src/windows/dataentry.c:1804
+#: src/library/utils/src/windows/dataentry.c:1805
 msgid "Cell widths ..."
 msgstr "�椸��e�K"
 
-#: src/library/utils/src/windows/dataentry.c:1808
+#: src/library/utils/src/windows/dataentry.c:1809
 msgid "Data editor"
 msgstr "��ƽs�边"
 
-#: src/library/grDevices/src/devWindows.c:932
+#: src/library/grDevices/src/devWindows.c:949
 msgid "Portable network graphics file"
 msgstr "Portable network graphics �ɮ�"
 
-#: src/library/grDevices/src/devWindows.c:935
+#: src/library/grDevices/src/devWindows.c:952
 msgid "Windows bitmap file"
 msgstr "Windows bitmap �ɮ�"
 
-#: src/library/grDevices/src/devWindows.c:938
+#: src/library/grDevices/src/devWindows.c:955
 msgid "TIFF file"
 msgstr "TIFF �ɮ�"
 
-#: src/library/grDevices/src/devWindows.c:941
+#: src/library/grDevices/src/devWindows.c:958
 msgid "Jpeg file"
 msgstr "Jpeg �ɮ�"
 
-#: src/library/grDevices/src/devWindows.c:963
+#: src/library/grDevices/src/devWindows.c:980
 msgid "Postscript file"
 msgstr "Postscript �ɮ�"
 
-#: src/library/grDevices/src/devWindows.c:975
+#: src/library/grDevices/src/devWindows.c:992
 msgid "PDF file"
 msgstr "PDF �ɮ�"
 
-#: src/library/grDevices/src/devWindows.c:987
+#: src/library/grDevices/src/devWindows.c:1004
 msgid "Enhanced metafiles"
 msgstr "�i�� metafiles"
 
-#: src/library/grDevices/src/devWindows.c:990
-#: src/library/grDevices/src/devWindows.c:3436
+#: src/library/grDevices/src/devWindows.c:1007
+#: src/library/grDevices/src/devWindows.c:3445
 msgid "file path selected is too long: only 512 bytes are allowed"
 msgstr "��ܪ��ɮ׸�|�Ӫ��G�̦h�u�঳ 512 �줸��"
 
-#: src/library/grDevices/src/devWindows.c:1201
+#: src/library/grDevices/src/devWindows.c:1218
 msgid "No plot to replace!"
 msgstr "�S���i�������Ϫ�!"
 
-#: src/library/grDevices/src/devWindows.c:1249
+#: src/library/grDevices/src/devWindows.c:1268
 msgid "Variable name"
 msgstr "�ܼƦW"
 
-#: src/library/grDevices/src/devWindows.c:1258
+#: src/library/grDevices/src/devWindows.c:1277
 #, fuzzy
 msgid "Variable doesn't contain any plots!"
 msgstr "�ܼƤ��s�b�Τ��]�t���Ϫ�!"
 
-#: src/library/grDevices/src/devWindows.c:1273
+#: src/library/grDevices/src/devWindows.c:1292
 msgid "Name of variable to save to"
 msgstr "�n�x�s�i�h���ܼƦW"
 
-#: src/library/grDevices/src/devWindows.c:1582
+#: src/library/grDevices/src/devWindows.c:1601
 msgid "Copy to the clipboard as a metafile"
 msgstr "���� metafile �ƻs��ŶKï"
 
-#: src/library/grDevices/src/devWindows.c:1600
-#: src/library/grDevices/src/devWindows.c:1611
+#: src/library/grDevices/src/devWindows.c:1619
+#: src/library/grDevices/src/devWindows.c:1630
 msgid "Stop locator"
 msgstr "����w�쾹"
 
-#: src/library/grDevices/src/devWindows.c:1610
-#: src/library/grDevices/src/devWindows.c:1614
+#: src/library/grDevices/src/devWindows.c:1629
+#: src/library/grDevices/src/devWindows.c:1633
 msgid "Stop"
 msgstr "����"
 
-#: src/library/grDevices/src/devWindows.c:1616
+#: src/library/grDevices/src/devWindows.c:1635
 msgid "Continue"
 msgstr "�~��"
 
-#: src/library/grDevices/src/devWindows.c:1620
+#: src/library/grDevices/src/devWindows.c:1639
 msgid "Next"
 msgstr "�U�@��"
 
-#: src/library/grDevices/src/devWindows.c:1621
+#: src/library/grDevices/src/devWindows.c:1640
 msgid "Next plot"
 msgstr "�U�@�ӹϪ�"
 
-#: src/library/grDevices/src/devWindows.c:1627
+#: src/library/grDevices/src/devWindows.c:1646
 msgid "Save as"
 msgstr "�t�s��"
 
-#: src/library/grDevices/src/devWindows.c:1636
-#: src/library/grDevices/src/devWindows.c:1638
-#: src/library/grDevices/src/devWindows.c:1640
+#: src/library/grDevices/src/devWindows.c:1655
+#: src/library/grDevices/src/devWindows.c:1657
+#: src/library/grDevices/src/devWindows.c:1659
 #, c-format
 msgid "%s quality..."
 msgstr "%s �~��K"
 
-#: src/library/grDevices/src/devWindows.c:1642
+#: src/library/grDevices/src/devWindows.c:1661
 msgid "Copy to the clipboard"
 msgstr "�ƻs��ŶKï"
 
-#: src/library/grDevices/src/devWindows.c:1643
+#: src/library/grDevices/src/devWindows.c:1662
 msgid "as a Bitmap\tCTRL+C"
 msgstr "���� Bitmap\tCTRL+C"
 
-#: src/library/grDevices/src/devWindows.c:1644
+#: src/library/grDevices/src/devWindows.c:1663
 msgid "as a Metafile\tCTRL+W"
 msgstr "���� Metafile\tCTRL+W"
 
-#: src/library/grDevices/src/devWindows.c:1647
-msgid "Print...\tCTRL+P"
-msgstr "�C�L�K\tCTRL+P"
-
-#: src/library/grDevices/src/devWindows.c:1649
+#: src/library/grDevices/src/devWindows.c:1668
 msgid "close Device"
 msgstr "�����˸m"
 
-#: src/library/grDevices/src/devWindows.c:1650
+#: src/library/grDevices/src/devWindows.c:1669
 msgid "History"
 msgstr "�R�O���{"
 
-#: src/library/grDevices/src/devWindows.c:1651
+#: src/library/grDevices/src/devWindows.c:1670
 msgid "Recording"
 msgstr "�O��"
 
-#: src/library/grDevices/src/devWindows.c:1654
+#: src/library/grDevices/src/devWindows.c:1673
 msgid "Add\tINS"
 msgstr "�[�J\tINS"
 
-#: src/library/grDevices/src/devWindows.c:1655
+#: src/library/grDevices/src/devWindows.c:1674
 msgid "Replace"
 msgstr "����"
 
-#: src/library/grDevices/src/devWindows.c:1657
+#: src/library/grDevices/src/devWindows.c:1676
 msgid "Previous\tPgUp"
 msgstr "�W�@��\tPgUp"
 
-#: src/library/grDevices/src/devWindows.c:1658
+#: src/library/grDevices/src/devWindows.c:1677
 msgid "Next\tPgDown"
 msgstr "�U�@��\tPgDown"
 
-#: src/library/grDevices/src/devWindows.c:1660
+#: src/library/grDevices/src/devWindows.c:1679
 msgid "Save to variable..."
 msgstr "�x�s���ܼơK"
 
-#: src/library/grDevices/src/devWindows.c:1661
+#: src/library/grDevices/src/devWindows.c:1680
 msgid "Get from variable..."
 msgstr "�^�����ܼơK"
 
-#: src/library/grDevices/src/devWindows.c:1663
+#: src/library/grDevices/src/devWindows.c:1682
 msgid "Clear history"
 msgstr "�M���R�O���{"
 
-#: src/library/grDevices/src/devWindows.c:1664
+#: src/library/grDevices/src/devWindows.c:1683
 msgid "Resize"
 msgstr "���]�j�p"
 
-#: src/library/grDevices/src/devWindows.c:1665
+#: src/library/grDevices/src/devWindows.c:1684
 msgid "R mode"
 msgstr "R �Ҧ�"
 
-#: src/library/grDevices/src/devWindows.c:1667
+#: src/library/grDevices/src/devWindows.c:1686
 msgid "Fit to window"
 msgstr "�A�X�����j�p"
 
-#: src/library/grDevices/src/devWindows.c:1669
+#: src/library/grDevices/src/devWindows.c:1688
 msgid "Fixed size"
 msgstr "�T�w���j�p"
 
-#: src/library/grDevices/src/devWindows.c:1676
+#: src/library/grDevices/src/devWindows.c:1695
 msgid "Copy as metafile"
 msgstr "�ƻs�� metafile"
 
-#: src/library/grDevices/src/devWindows.c:1678
+#: src/library/grDevices/src/devWindows.c:1697
 msgid "Copy as bitmap"
 msgstr "�ƻs�� bitmap"
 
-#: src/library/grDevices/src/devWindows.c:1681
+#: src/library/grDevices/src/devWindows.c:1700
 msgid "Save as metafile..."
 msgstr "�x�s�� metafile�K"
 
-#: src/library/grDevices/src/devWindows.c:1683
+#: src/library/grDevices/src/devWindows.c:1702
 msgid "Save as postscript..."
 msgstr "�x�s�� postscript�K"
 
-#: src/library/grDevices/src/devWindows.c:3136
+#: src/library/grDevices/src/devWindows.c:3143
 msgid "Locator is active"
 msgstr "�w�쾹�b�ҥΪ��A"
 
-#: src/library/grDevices/src/devWindows.c:3763
+#: src/library/grDevices/src/devWindows.c:3769
 msgid "Waiting to confirm page change..."
 msgstr "���ݭ����ܧ󪺽T�{�K"
 
-#: src/library/grDevices/src/devWindows.c:3775
+#: src/library/grDevices/src/devWindows.c:3781
 msgid "Click or hit ENTER for next page"
 msgstr "�� ENTER �ӬݤU�@��"
+
+#~ msgid "Print...\tCTRL+P"
+#~ msgstr "�C�L�K\tCTRL+P"
+
+#~ msgid "invalid device"
+#~ msgstr "�˸m�o�Ϳ��~"
diff --git a/src/library/base/po/RGui.pot b/src/library/base/po/RGui.pot
index 683ffa6..7460a50 100644
--- a/src/library/base/po/RGui.pot
+++ b/src/library/base/po/RGui.pot
@@ -6,9 +6,9 @@
 #, fuzzy
 msgid ""
 msgstr ""
-"Project-Id-Version: R 3.1.0\n"
+"Project-Id-Version: R 3.4.0\n"
 "Report-Msgid-Bugs-To: bugs.r-project.org\n"
-"POT-Creation-Date: 2013-03-18 19:36+0000\n"
+"POT-Creation-Date: 2016-04-01 10:28-0700\n"
 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
 "Last-Translator: FULL NAME <EMAIL at ADDRESS>\n"
 "Language-Team: LANGUAGE <LL at li.org>\n"
@@ -30,11 +30,11 @@ msgstr ""
 msgid "Unable to open the clipboard"
 msgstr ""
 
-#: src/gnuwin32/console.c:1914
+#: src/gnuwin32/console.c:1919
 msgid "Insufficient memory. Please close the console"
 msgstr ""
 
-#: src/gnuwin32/console.c:1969 src/gnuwin32/console.c:2022
+#: src/gnuwin32/console.c:1974 src/gnuwin32/console.c:2028
 #: src/gnuwin32/preferences.c:333
 #, c-format
 msgid ""
@@ -42,399 +42,400 @@ msgid ""
 "Using system fixed font"
 msgstr ""
 
-#: src/gnuwin32/console.c:2127
+#: src/gnuwin32/console.c:2133
 msgid "Save selection to"
 msgstr ""
 
-#: src/gnuwin32/console.c:2129
+#: src/gnuwin32/console.c:2135
 msgid "Save console contents to"
 msgstr ""
 
-#: src/gnuwin32/console.c:2228
+#: src/gnuwin32/console.c:2234
 msgid "Scrolling.\n"
 msgstr ""
 
-#: src/gnuwin32/console.c:2229
+#: src/gnuwin32/console.c:2235
 msgid "  Keyboard: PgUp, PgDown, Ctrl+Arrows, Ctrl+Home, Ctrl+End,\n"
 msgstr ""
 
-#: src/gnuwin32/console.c:2230
+#: src/gnuwin32/console.c:2236
 msgid ""
 "  Mouse: use the scrollbar(s).\n"
 "\n"
 msgstr ""
 
-#: src/gnuwin32/console.c:2231
+#: src/gnuwin32/console.c:2237
 msgid "Editing.\n"
 msgstr ""
 
-#: src/gnuwin32/console.c:2232
+#: src/gnuwin32/console.c:2238
 msgid "  Moving the cursor: \n"
 msgstr ""
 
-#: src/gnuwin32/console.c:2233
+#: src/gnuwin32/console.c:2239
 msgid "     Left arrow or Ctrl+B: move backward one character;\n"
 msgstr ""
 
-#: src/gnuwin32/console.c:2234
+#: src/gnuwin32/console.c:2240
 msgid "     Right arrow or Ctrl+F: move forward one character;\n"
 msgstr ""
 
-#: src/gnuwin32/console.c:2235
+#: src/gnuwin32/console.c:2241
 msgid "     Home or Ctrl+A: go to beginning of line;\n"
 msgstr ""
 
-#: src/gnuwin32/console.c:2236
+#: src/gnuwin32/console.c:2242
 msgid "     End or Ctrl+E: go to end of line;\n"
 msgstr ""
 
-#: src/gnuwin32/console.c:2237
+#: src/gnuwin32/console.c:2243
 msgid "  History: Up and Down Arrows, Ctrl+P, Ctrl+N\n"
 msgstr ""
 
-#: src/gnuwin32/console.c:2238
+#: src/gnuwin32/console.c:2244
 msgid "  Deleting:\n"
 msgstr ""
 
-#: src/gnuwin32/console.c:2239
+#: src/gnuwin32/console.c:2245
 msgid "     Del or Ctrl+D: delete current character or selection;\n"
 msgstr ""
 
-#: src/gnuwin32/console.c:2240
+#: src/gnuwin32/console.c:2246
 msgid "     Backspace: delete preceding character;\n"
 msgstr ""
 
-#: src/gnuwin32/console.c:2241
+#: src/gnuwin32/console.c:2247
 msgid ""
 "     Ctrl+Del or Ctrl+K: delete text from current character to end of line.\n"
 msgstr ""
 
-#: src/gnuwin32/console.c:2242
+#: src/gnuwin32/console.c:2248
 msgid "     Ctrl+U: delete all text from current line.\n"
 msgstr ""
 
-#: src/gnuwin32/console.c:2243
+#: src/gnuwin32/console.c:2249
 msgid "  Copy and paste.\n"
 msgstr ""
 
-#: src/gnuwin32/console.c:2244
+#: src/gnuwin32/console.c:2250
 msgid ""
 "     Use the mouse (with the left button held down) to mark (select) text.\n"
 msgstr ""
 
-#: src/gnuwin32/console.c:2245
+#: src/gnuwin32/console.c:2251
 msgid ""
 "     Use Shift+Del (or Ctrl+C) to copy the marked text to the clipboard and\n"
 msgstr ""
 
-#: src/gnuwin32/console.c:2246
+#: src/gnuwin32/console.c:2252
 msgid ""
 "     Shift+Ins (or Ctrl+V or Ctrl+Y) to paste the content of the clipboard "
 "(if any)  \n"
 msgstr ""
 
-#: src/gnuwin32/console.c:2247
+#: src/gnuwin32/console.c:2253
 msgid "     to the console, Ctrl+X first copy then paste\n"
 msgstr ""
 
-#: src/gnuwin32/console.c:2248
+#: src/gnuwin32/console.c:2254
 msgid "  Misc:\n"
 msgstr ""
 
-#: src/gnuwin32/console.c:2249
+#: src/gnuwin32/console.c:2255
 msgid "     Ctrl+L: Clear the console.\n"
 msgstr ""
 
-#: src/gnuwin32/console.c:2250
+#: src/gnuwin32/console.c:2256
 msgid "     Ctrl+O or INS: Toggle overwrite mode: initially off.\n"
 msgstr ""
 
-#: src/gnuwin32/console.c:2251
+#: src/gnuwin32/console.c:2257
 msgid "     Ctrl+T: Interchange current char with one to the left.\n"
 msgstr ""
 
-#: src/gnuwin32/console.c:2252
+#: src/gnuwin32/console.c:2258
 msgid ""
 "\n"
 "Note: Console is updated only when some input is required.\n"
 msgstr ""
 
-#: src/gnuwin32/console.c:2253
+#: src/gnuwin32/console.c:2259
 msgid ""
 "  Use Ctrl+W to toggle this feature off/on.\n"
 "\n"
 msgstr ""
 
-#: src/gnuwin32/console.c:2254
+#: src/gnuwin32/console.c:2260
 msgid ""
 "Use ESC to stop the interpreter.\n"
 "\n"
 msgstr ""
 
-#: src/gnuwin32/console.c:2255
+#: src/gnuwin32/console.c:2261
 msgid ""
 "TAB starts completion of the current word.\n"
 "\n"
 msgstr ""
 
-#: src/gnuwin32/console.c:2256
+#: src/gnuwin32/console.c:2262
 msgid "Standard Windows hotkeys can be used to switch to the\n"
 msgstr ""
 
-#: src/gnuwin32/console.c:2257
+#: src/gnuwin32/console.c:2263
 msgid "graphics device (Ctrl+Tab or Ctrl+F6 in MDI, Alt+Tab in SDI)"
 msgstr ""
 
-#: src/gnuwin32/editor.c:88 src/gnuwin32/editor.c:90
+#: src/gnuwin32/editor.c:91 src/gnuwin32/editor.c:93
 msgid "R Editor"
 msgstr ""
 
-#: src/gnuwin32/editor.c:119
+#: src/gnuwin32/editor.c:123
 #, c-format
 msgid "unable to open file %s for reading"
 msgstr ""
 
-#: src/gnuwin32/editor.c:135
+#: src/gnuwin32/editor.c:139
 #, c-format
 msgid "Could not read from file '%s'"
 msgstr ""
 
-#: src/gnuwin32/editor.c:166
+#: src/gnuwin32/editor.c:171
 #, c-format
 msgid "Could not save file '%s'"
 msgstr ""
 
-#: src/gnuwin32/editor.c:182
+#: src/gnuwin32/editor.c:187
 msgid "Save script as"
 msgstr ""
 
-#: src/gnuwin32/editor.c:377 src/gnuwin32/editor.c:694
-#: src/gnuwin32/pager.c:431 src/gnuwin32/rui.c:1076
+#: src/gnuwin32/editor.c:379 src/gnuwin32/editor.c:696
+#: src/gnuwin32/pager.c:430 src/gnuwin32/rui.c:1076
 msgid "Open script"
 msgstr ""
 
-#: src/gnuwin32/editor.c:500 src/gnuwin32/pager.c:185 src/gnuwin32/pager.c:205
+#: src/gnuwin32/editor.c:502 src/gnuwin32/pager.c:184 src/gnuwin32/pager.c:204
 msgid "No RGui console to paste to"
 msgstr ""
 
-#: src/gnuwin32/editor.c:602
+#: src/gnuwin32/editor.c:604
 msgid "R EDITOR\n"
 msgstr ""
 
-#: src/gnuwin32/editor.c:604
+#: src/gnuwin32/editor.c:606
 msgid "A standard text editor for editing and running R code.\n"
 msgstr ""
 
-#: src/gnuwin32/editor.c:606
+#: src/gnuwin32/editor.c:608
 msgid "RUNNING COMMANDS\n"
 msgstr ""
 
-#: src/gnuwin32/editor.c:607
+#: src/gnuwin32/editor.c:609
 msgid "To run a line or section of R code, select the code and either\n"
 msgstr ""
 
-#: src/gnuwin32/editor.c:608
+#: src/gnuwin32/editor.c:610
 msgid "     Press Ctrl-R\n"
 msgstr ""
 
-#: src/gnuwin32/editor.c:609
+#: src/gnuwin32/editor.c:611
 msgid "     Select \"Run line or selection\" from the \"Edit\" menu\n"
 msgstr ""
 
-#: src/gnuwin32/editor.c:610
+#: src/gnuwin32/editor.c:612
 msgid "     Press the \"Run line or selection\" icon on the toolbar\n"
 msgstr ""
 
-#: src/gnuwin32/editor.c:611
+#: src/gnuwin32/editor.c:613
 msgid ""
 "This will copy the selected commands to the console and evaluate them.\n"
 msgstr ""
 
-#: src/gnuwin32/editor.c:612
+#: src/gnuwin32/editor.c:614
 msgid ""
 "If there is no selection, this will just run the current line and advance\n"
 msgstr ""
 
-#: src/gnuwin32/editor.c:613
+#: src/gnuwin32/editor.c:615
 msgid "the cursor by one line.\n"
 msgstr ""
 
-#: src/gnuwin32/editor.c:625 src/gnuwin32/editor.c:702
-#: src/gnuwin32/editor.c:760
+#: src/gnuwin32/editor.c:627 src/gnuwin32/editor.c:704
+#: src/gnuwin32/editor.c:762
 msgid "Run line or selection"
 msgstr ""
 
-#: src/gnuwin32/editor.c:627 src/gnuwin32/editor.c:745
+#: src/gnuwin32/editor.c:629 src/gnuwin32/editor.c:747
 msgid "Undo"
 msgstr ""
 
-#: src/gnuwin32/editor.c:629 src/gnuwin32/editor.c:748
+#: src/gnuwin32/editor.c:631 src/gnuwin32/editor.c:750
 msgid "Cut"
 msgstr ""
 
-#: src/gnuwin32/editor.c:630 src/gnuwin32/editor.c:750
-#: src/gnuwin32/pager.c:305 src/gnuwin32/pager.c:478 src/gnuwin32/rui.c:859
+#: src/gnuwin32/editor.c:632 src/gnuwin32/editor.c:752
+#: src/gnuwin32/pager.c:304 src/gnuwin32/pager.c:477 src/gnuwin32/rui.c:859
 #: src/gnuwin32/rui.c:1088 src/gnuwin32/rui.c:1144
 msgid "Copy"
 msgstr ""
 
-#: src/gnuwin32/editor.c:631 src/gnuwin32/editor.c:752 src/gnuwin32/rui.c:860
+#: src/gnuwin32/editor.c:633 src/gnuwin32/editor.c:754 src/gnuwin32/rui.c:860
 #: src/gnuwin32/rui.c:1092 src/gnuwin32/rui.c:1145
 msgid "Paste"
 msgstr ""
 
-#: src/gnuwin32/editor.c:632 src/gnuwin32/editor.c:754
+#: src/gnuwin32/editor.c:634 src/gnuwin32/editor.c:756
 msgid "Delete"
 msgstr ""
 
-#: src/gnuwin32/editor.c:634 src/gnuwin32/editor.c:756
-#: src/gnuwin32/pager.c:308 src/gnuwin32/pager.c:484 src/gnuwin32/rui.c:866
+#: src/gnuwin32/editor.c:636 src/gnuwin32/editor.c:758
+#: src/gnuwin32/pager.c:307 src/gnuwin32/pager.c:483 src/gnuwin32/rui.c:866
 #: src/gnuwin32/rui.c:1149
 msgid "Select all"
 msgstr ""
 
-#: src/gnuwin32/editor.c:698
+#: src/gnuwin32/editor.c:700
 msgid "Save script"
 msgstr ""
 
-#: src/gnuwin32/editor.c:706 src/gnuwin32/pager.c:451
-#: src/library/grDevices/src/devWindows.c:1594
+#: src/gnuwin32/editor.c:708 src/gnuwin32/pager.c:450
+#: src/library/grDevices/src/devWindows.c:1613
 msgid "Return focus to Console"
 msgstr ""
 
-#: src/gnuwin32/editor.c:709
+#: src/gnuwin32/editor.c:711
 msgid "Print script"
 msgstr ""
 
-#: src/gnuwin32/editor.c:711 src/gnuwin32/pager.c:446 src/gnuwin32/rui.c:1104
-#: src/library/grDevices/src/devWindows.c:1588
+#: src/gnuwin32/editor.c:713 src/gnuwin32/pager.c:445 src/gnuwin32/rui.c:1104
+#: src/library/grDevices/src/devWindows.c:1607
 msgid "Print"
 msgstr ""
 
-#: src/gnuwin32/editor.c:729 src/gnuwin32/pager.c:467 src/gnuwin32/rui.c:1122
-#: src/library/utils/src/windows/dataentry.c:1790
-#: src/library/grDevices/src/devWindows.c:1626
+#: src/gnuwin32/editor.c:731 src/gnuwin32/pager.c:466 src/gnuwin32/rui.c:1122
+#: src/library/utils/src/windows/dataentry.c:1791
+#: src/library/grDevices/src/devWindows.c:1645
 msgid "File"
 msgstr ""
 
-#: src/gnuwin32/editor.c:730 src/gnuwin32/pager.c:468 src/gnuwin32/rui.c:1124
+#: src/gnuwin32/editor.c:732 src/gnuwin32/pager.c:467 src/gnuwin32/rui.c:1124
 msgid "New script"
 msgstr ""
 
-#: src/gnuwin32/editor.c:732 src/gnuwin32/pager.c:469 src/gnuwin32/rui.c:1125
+#: src/gnuwin32/editor.c:734 src/gnuwin32/pager.c:468 src/gnuwin32/rui.c:1125
 msgid "Open script..."
 msgstr ""
 
-#: src/gnuwin32/editor.c:734
+#: src/gnuwin32/editor.c:736
 msgid "Save"
 msgstr ""
 
-#: src/gnuwin32/editor.c:736
+#: src/gnuwin32/editor.c:738
 msgid "Save as..."
 msgstr ""
 
-#: src/gnuwin32/editor.c:739 src/gnuwin32/pager.c:470 src/gnuwin32/rui.c:1138
-#: src/library/grDevices/src/devWindows.c:1689
+#: src/gnuwin32/editor.c:741 src/gnuwin32/pager.c:469 src/gnuwin32/rui.c:1138
+#: src/library/grDevices/src/devWindows.c:1666
+#: src/library/grDevices/src/devWindows.c:1708
 msgid "Print..."
 msgstr ""
 
-#: src/gnuwin32/editor.c:742
+#: src/gnuwin32/editor.c:744
 msgid "Close script"
 msgstr ""
 
-#: src/gnuwin32/editor.c:744 src/gnuwin32/pager.c:477 src/gnuwin32/rui.c:1143
-#: src/library/utils/src/windows/dataentry.c:1796
+#: src/gnuwin32/editor.c:746 src/gnuwin32/pager.c:476 src/gnuwin32/rui.c:1143
+#: src/library/utils/src/windows/dataentry.c:1797
 msgid "Edit"
 msgstr ""
 
-#: src/gnuwin32/editor.c:758 src/gnuwin32/rui.c:1150
+#: src/gnuwin32/editor.c:760 src/gnuwin32/rui.c:1150
 msgid "Clear console"
 msgstr ""
 
-#: src/gnuwin32/editor.c:762
+#: src/gnuwin32/editor.c:764
 msgid "Run all"
 msgstr ""
 
-#: src/gnuwin32/editor.c:765
+#: src/gnuwin32/editor.c:767
 msgid "Find..."
 msgstr ""
 
-#: src/gnuwin32/editor.c:767
+#: src/gnuwin32/editor.c:769
 msgid "Replace..."
 msgstr ""
 
-#: src/gnuwin32/editor.c:770 src/gnuwin32/rui.c:1154
+#: src/gnuwin32/editor.c:772 src/gnuwin32/rui.c:1154
 msgid "GUI preferences..."
 msgstr ""
 
-#: src/gnuwin32/editor.c:780 src/gnuwin32/rui.c:1186
-#: src/library/utils/src/windows/dataentry.c:1697
-#: src/library/utils/src/windows/dataentry.c:1807
+#: src/gnuwin32/editor.c:782 src/gnuwin32/rui.c:1186
+#: src/library/utils/src/windows/dataentry.c:1698
+#: src/library/utils/src/windows/dataentry.c:1808
 msgid "Help"
 msgstr ""
 
-#: src/gnuwin32/editor.c:781
+#: src/gnuwin32/editor.c:783
 msgid "Editor"
 msgstr ""
 
-#: src/gnuwin32/editor.c:840
+#: src/gnuwin32/editor.c:842
 msgid "Maximum number of editors reached"
 msgstr ""
 
-#: src/gnuwin32/editor.c:845
+#: src/gnuwin32/editor.c:847
 msgid "Unable to create editor window"
 msgstr ""
 
-#: src/gnuwin32/editor.c:853
+#: src/gnuwin32/editor.c:855
 msgid "Untitled"
 msgstr ""
 
-#: src/gnuwin32/extra.c:823 src/gnuwin32/rui.c:1224
+#: src/gnuwin32/extra.c:825
 msgid "Select file"
 msgstr ""
 
-#: src/gnuwin32/pager.c:89
+#: src/gnuwin32/pager.c:88
 msgid "Error opening file"
 msgstr ""
 
-#: src/gnuwin32/pager.c:96
+#: src/gnuwin32/pager.c:95
 msgid "Insufficient memory to display file in internal pager"
 msgstr ""
 
-#: src/gnuwin32/pager.c:177 src/gnuwin32/pager.c:189 src/gnuwin32/pager.c:209
+#: src/gnuwin32/pager.c:176 src/gnuwin32/pager.c:188 src/gnuwin32/pager.c:208
 #: src/gnuwin32/rui.c:237 src/gnuwin32/rui.c:264
 msgid "No selection"
 msgstr ""
 
-#: src/gnuwin32/pager.c:306 src/gnuwin32/pager.c:436 src/gnuwin32/pager.c:480
+#: src/gnuwin32/pager.c:305 src/gnuwin32/pager.c:435 src/gnuwin32/pager.c:479
 msgid "Paste to console"
 msgstr ""
 
-#: src/gnuwin32/pager.c:307 src/gnuwin32/pager.c:441 src/gnuwin32/pager.c:482
+#: src/gnuwin32/pager.c:306 src/gnuwin32/pager.c:440 src/gnuwin32/pager.c:481
 msgid "Paste commands to console"
 msgstr ""
 
-#: src/gnuwin32/pager.c:310 src/gnuwin32/rui.c:869
-#: src/library/utils/src/windows/dataentry.c:1703
-#: src/library/grDevices/src/devWindows.c:1686
+#: src/gnuwin32/pager.c:309 src/gnuwin32/rui.c:869
+#: src/library/utils/src/windows/dataentry.c:1704
+#: src/library/grDevices/src/devWindows.c:1705
 msgid "Stay on top"
 msgstr ""
 
-#: src/gnuwin32/pager.c:312 src/gnuwin32/pager.c:475
-#: src/library/utils/src/windows/dataentry.c:1705
-#: src/library/utils/src/windows/dataentry.c:1792
+#: src/gnuwin32/pager.c:311 src/gnuwin32/pager.c:474
+#: src/library/utils/src/windows/dataentry.c:1706
+#: src/library/utils/src/windows/dataentry.c:1793
 msgid "Close"
 msgstr ""
 
-#: src/gnuwin32/pager.c:472 src/gnuwin32/rui.c:1139
+#: src/gnuwin32/pager.c:471 src/gnuwin32/rui.c:1139
 msgid "Save to File..."
 msgstr ""
 
-#: src/gnuwin32/pager.c:487 src/gnuwin32/rui.c:1156
+#: src/gnuwin32/pager.c:486 src/gnuwin32/rui.c:1156
 msgid "View"
 msgstr ""
 
-#: src/gnuwin32/pager.c:519
+#: src/gnuwin32/pager.c:518
 msgid "Unable to create pager window"
 msgstr ""
 
@@ -579,7 +580,7 @@ msgid "Update packages..."
 msgstr ""
 
 #: src/gnuwin32/rui.c:920
-msgid "Install package(s) from local zip files..."
+msgid "Install package(s) from local files..."
 msgstr ""
 
 #: src/gnuwin32/rui.c:944
@@ -746,52 +747,52 @@ msgstr ""
 msgid "Console"
 msgstr ""
 
-#: src/gnuwin32/rui.c:1268
+#: src/gnuwin32/rui.c:1251
 msgid "'mname' is limited to 1000 bytes"
 msgstr ""
 
-#: src/gnuwin32/rui.c:1310
+#: src/gnuwin32/rui.c:1293
 #, c-format
 msgid "menu %s does not exist"
 msgstr ""
 
-#: src/gnuwin32/rui.c:1363
+#: src/gnuwin32/rui.c:1346
 msgid "'menu' is limited to 500 bytes"
 msgstr ""
 
-#: src/gnuwin32/rui.c:1373
+#: src/gnuwin32/rui.c:1356
 msgid "base menu does not exist"
 msgstr ""
 
-#: src/gnuwin32/rui.c:1388
+#: src/gnuwin32/rui.c:1371
 msgid "failed to allocate menu"
 msgstr ""
 
-#: src/gnuwin32/rui.c:1405 src/gnuwin32/rui.c:1529
+#: src/gnuwin32/rui.c:1388 src/gnuwin32/rui.c:1512
 msgid "menu + item is limited to 1000 bytes"
 msgstr ""
 
-#: src/gnuwin32/rui.c:1413 src/gnuwin32/rui.c:1496
+#: src/gnuwin32/rui.c:1396 src/gnuwin32/rui.c:1479
 msgid "menu does not exist"
 msgstr ""
 
-#: src/gnuwin32/rui.c:1431 src/gnuwin32/rui.c:1454 src/gnuwin32/rui.c:1459
+#: src/gnuwin32/rui.c:1414 src/gnuwin32/rui.c:1437 src/gnuwin32/rui.c:1442
 msgid "failed to allocate char storage"
 msgstr ""
 
-#: src/gnuwin32/rui.c:1467
+#: src/gnuwin32/rui.c:1450
 msgid "failed to allocate menuitem"
 msgstr ""
 
-#: src/gnuwin32/rui.c:1519
+#: src/gnuwin32/rui.c:1502
 msgid "menu not found"
 msgstr ""
 
-#: src/gnuwin32/rui.c:1537
+#: src/gnuwin32/rui.c:1520
 msgid "menu or item does not exist"
 msgstr ""
 
-#: src/gnuwin32/system.c:442
+#: src/gnuwin32/system.c:446
 msgid "Save workspace image?"
 msgstr ""
 
@@ -799,41 +800,41 @@ msgstr ""
 msgid "Insufficient memory: cell not copied to the clipboard"
 msgstr ""
 
-#: src/extra/graphapp/dialogs.c:147 src/extra/graphapp/dialogs.c:164
-#: src/extra/graphapp/dialogs.c:181
+#: src/extra/graphapp/dialogs.c:148 src/extra/graphapp/dialogs.c:165
+#: src/extra/graphapp/dialogs.c:182
 msgid "Question"
 msgstr ""
 
-#: src/extra/graphapp/dialogs.c:202
+#: src/extra/graphapp/dialogs.c:203
 msgid " Change working directory to:"
 msgstr ""
 
-#: src/extra/graphapp/dialogs.c:205
+#: src/extra/graphapp/dialogs.c:206
 #, c-format
 msgid "Unable to set '%s' as working directory"
 msgstr ""
 
-#: src/extra/graphapp/dialogs.c:602 src/extra/graphapp/dialogs.c:620
-#: src/extra/graphapp/dialogs.c:626 src/extra/graphapp/dialogs.c:725
-#: src/extra/graphapp/dialogs.c:739 src/extra/graphapp/dialogs.c:745
+#: src/extra/graphapp/dialogs.c:604 src/extra/graphapp/dialogs.c:622
+#: src/extra/graphapp/dialogs.c:628 src/extra/graphapp/dialogs.c:727
+#: src/extra/graphapp/dialogs.c:741 src/extra/graphapp/dialogs.c:747
 #: src/library/utils/src/windows/widgets.c:125
 msgid "Cancel"
 msgstr ""
 
-#: src/extra/graphapp/dialogs.c:622 src/extra/graphapp/dialogs.c:741
+#: src/extra/graphapp/dialogs.c:624 src/extra/graphapp/dialogs.c:743
 #: src/library/utils/src/windows/widgets.c:124
 msgid "OK"
 msgstr ""
 
-#: src/extra/graphapp/dialogs.c:733
+#: src/extra/graphapp/dialogs.c:735
 msgid "User"
 msgstr ""
 
-#: src/extra/graphapp/dialogs.c:734
+#: src/extra/graphapp/dialogs.c:736
 msgid "Password"
 msgstr ""
 
-#: src/extra/graphapp/dialogs.c:900 src/extra/graphapp/dialogs.c:906
+#: src/extra/graphapp/dialogs.c:902 src/extra/graphapp/dialogs.c:908
 #, c-format
 msgid "\"%s\" not found"
 msgstr ""
@@ -843,9 +844,9 @@ msgid "Arrange Icons"
 msgstr ""
 
 #: src/library/utils/src/windows/dataentry.c:223
-#: src/library/utils/src/windows/dataentry.c:1850
-#: src/library/utils/src/windows/dataentry.c:1853
-#: src/library/utils/src/windows/dataentry.c:1884
+#: src/library/utils/src/windows/dataentry.c:1851
+#: src/library/utils/src/windows/dataentry.c:1854
+#: src/library/utils/src/windows/dataentry.c:1885
 msgid "invalid argument"
 msgstr ""
 
@@ -857,17 +858,12 @@ msgstr ""
 msgid "Data Editor"
 msgstr ""
 
-#: src/library/utils/src/windows/dataentry.c:282
-#: src/library/utils/src/windows/dataentry.c:1891
-msgid "invalid device"
-msgstr ""
-
 #: src/library/utils/src/windows/dataentry.c:331
 msgid "dataentry: internal memory problem"
 msgstr ""
 
 #: src/library/utils/src/windows/dataentry.c:634
-#: src/library/utils/src/windows/dataentry.c:1221
+#: src/library/utils/src/windows/dataentry.c:1222
 msgid "dataentry: internal memory error"
 msgstr ""
 
@@ -876,43 +872,43 @@ msgstr ""
 msgid "internal type error in dataentry"
 msgstr ""
 
-#: src/library/utils/src/windows/dataentry.c:852
+#: src/library/utils/src/windows/dataentry.c:853
 msgid "dataentry: parse error on string"
 msgstr ""
 
-#: src/library/utils/src/windows/dataentry.c:995
+#: src/library/utils/src/windows/dataentry.c:996
 msgid "dataentry: expression too long"
 msgstr ""
 
-#: src/library/utils/src/windows/dataentry.c:1472
+#: src/library/utils/src/windows/dataentry.c:1473
 msgid "column names cannot be blank"
 msgstr ""
 
-#: src/library/utils/src/windows/dataentry.c:1518
+#: src/library/utils/src/windows/dataentry.c:1519
 msgid "Variable editor"
 msgstr ""
 
-#: src/library/utils/src/windows/dataentry.c:1523
+#: src/library/utils/src/windows/dataentry.c:1524
 msgid "variable name"
 msgstr ""
 
-#: src/library/utils/src/windows/dataentry.c:1525
+#: src/library/utils/src/windows/dataentry.c:1526
 msgid "type"
 msgstr ""
 
-#: src/library/utils/src/windows/dataentry.c:1639
+#: src/library/utils/src/windows/dataentry.c:1640
 msgid "Cell width(s)"
 msgstr ""
 
-#: src/library/utils/src/windows/dataentry.c:1645
+#: src/library/utils/src/windows/dataentry.c:1646
 msgid "Cell width"
 msgstr ""
 
-#: src/library/utils/src/windows/dataentry.c:1648
+#: src/library/utils/src/windows/dataentry.c:1649
 msgid "variable"
 msgstr ""
 
-#: src/library/utils/src/windows/dataentry.c:1691
+#: src/library/utils/src/windows/dataentry.c:1692
 msgid ""
 "Navigation.\n"
 "  Keyboard: cursor keys move selection\n"
@@ -935,220 +931,216 @@ msgid ""
 "\n"
 msgstr ""
 
-#: src/library/utils/src/windows/dataentry.c:1699
+#: src/library/utils/src/windows/dataentry.c:1700
 msgid "Copy selected cell"
 msgstr ""
 
-#: src/library/utils/src/windows/dataentry.c:1700
+#: src/library/utils/src/windows/dataentry.c:1701
 msgid "Paste to selected cell"
 msgstr ""
 
-#: src/library/utils/src/windows/dataentry.c:1701
+#: src/library/utils/src/windows/dataentry.c:1702
 msgid "Autosize column"
 msgstr ""
 
-#: src/library/utils/src/windows/dataentry.c:1797
+#: src/library/utils/src/windows/dataentry.c:1798
 msgid "Copy  \tCTRL+C"
 msgstr ""
 
-#: src/library/utils/src/windows/dataentry.c:1799
+#: src/library/utils/src/windows/dataentry.c:1800
 msgid "Paste \tCTRL+V"
 msgstr ""
 
-#: src/library/utils/src/windows/dataentry.c:1801
+#: src/library/utils/src/windows/dataentry.c:1802
 msgid "Delete\tDEL"
 msgstr ""
 
-#: src/library/utils/src/windows/dataentry.c:1804
+#: src/library/utils/src/windows/dataentry.c:1805
 msgid "Cell widths ..."
 msgstr ""
 
-#: src/library/utils/src/windows/dataentry.c:1808
+#: src/library/utils/src/windows/dataentry.c:1809
 msgid "Data editor"
 msgstr ""
 
-#: src/library/grDevices/src/devWindows.c:932
+#: src/library/grDevices/src/devWindows.c:949
 msgid "Portable network graphics file"
 msgstr ""
 
-#: src/library/grDevices/src/devWindows.c:935
+#: src/library/grDevices/src/devWindows.c:952
 msgid "Windows bitmap file"
 msgstr ""
 
-#: src/library/grDevices/src/devWindows.c:938
+#: src/library/grDevices/src/devWindows.c:955
 msgid "TIFF file"
 msgstr ""
 
-#: src/library/grDevices/src/devWindows.c:941
+#: src/library/grDevices/src/devWindows.c:958
 msgid "Jpeg file"
 msgstr ""
 
-#: src/library/grDevices/src/devWindows.c:963
+#: src/library/grDevices/src/devWindows.c:980
 msgid "Postscript file"
 msgstr ""
 
-#: src/library/grDevices/src/devWindows.c:975
+#: src/library/grDevices/src/devWindows.c:992
 msgid "PDF file"
 msgstr ""
 
-#: src/library/grDevices/src/devWindows.c:987
+#: src/library/grDevices/src/devWindows.c:1004
 msgid "Enhanced metafiles"
 msgstr ""
 
-#: src/library/grDevices/src/devWindows.c:990
-#: src/library/grDevices/src/devWindows.c:3436
+#: src/library/grDevices/src/devWindows.c:1007
+#: src/library/grDevices/src/devWindows.c:3445
 msgid "file path selected is too long: only 512 bytes are allowed"
 msgstr ""
 
-#: src/library/grDevices/src/devWindows.c:1201
+#: src/library/grDevices/src/devWindows.c:1218
 msgid "No plot to replace!"
 msgstr ""
 
-#: src/library/grDevices/src/devWindows.c:1249
+#: src/library/grDevices/src/devWindows.c:1268
 msgid "Variable name"
 msgstr ""
 
-#: src/library/grDevices/src/devWindows.c:1258
+#: src/library/grDevices/src/devWindows.c:1277
 msgid "Variable doesn't contain any plots!"
 msgstr ""
 
-#: src/library/grDevices/src/devWindows.c:1273
+#: src/library/grDevices/src/devWindows.c:1292
 msgid "Name of variable to save to"
 msgstr ""
 
-#: src/library/grDevices/src/devWindows.c:1582
+#: src/library/grDevices/src/devWindows.c:1601
 msgid "Copy to the clipboard as a metafile"
 msgstr ""
 
-#: src/library/grDevices/src/devWindows.c:1600
-#: src/library/grDevices/src/devWindows.c:1611
+#: src/library/grDevices/src/devWindows.c:1619
+#: src/library/grDevices/src/devWindows.c:1630
 msgid "Stop locator"
 msgstr ""
 
-#: src/library/grDevices/src/devWindows.c:1610
-#: src/library/grDevices/src/devWindows.c:1614
+#: src/library/grDevices/src/devWindows.c:1629
+#: src/library/grDevices/src/devWindows.c:1633
 msgid "Stop"
 msgstr ""
 
-#: src/library/grDevices/src/devWindows.c:1616
+#: src/library/grDevices/src/devWindows.c:1635
 msgid "Continue"
 msgstr ""
 
-#: src/library/grDevices/src/devWindows.c:1620
+#: src/library/grDevices/src/devWindows.c:1639
 msgid "Next"
 msgstr ""
 
-#: src/library/grDevices/src/devWindows.c:1621
+#: src/library/grDevices/src/devWindows.c:1640
 msgid "Next plot"
 msgstr ""
 
-#: src/library/grDevices/src/devWindows.c:1627
+#: src/library/grDevices/src/devWindows.c:1646
 msgid "Save as"
 msgstr ""
 
-#: src/library/grDevices/src/devWindows.c:1636
-#: src/library/grDevices/src/devWindows.c:1638
-#: src/library/grDevices/src/devWindows.c:1640
+#: src/library/grDevices/src/devWindows.c:1655
+#: src/library/grDevices/src/devWindows.c:1657
+#: src/library/grDevices/src/devWindows.c:1659
 #, c-format
 msgid "%s quality..."
 msgstr ""
 
-#: src/library/grDevices/src/devWindows.c:1642
+#: src/library/grDevices/src/devWindows.c:1661
 msgid "Copy to the clipboard"
 msgstr ""
 
-#: src/library/grDevices/src/devWindows.c:1643
+#: src/library/grDevices/src/devWindows.c:1662
 msgid "as a Bitmap\tCTRL+C"
 msgstr ""
 
-#: src/library/grDevices/src/devWindows.c:1644
+#: src/library/grDevices/src/devWindows.c:1663
 msgid "as a Metafile\tCTRL+W"
 msgstr ""
 
-#: src/library/grDevices/src/devWindows.c:1647
-msgid "Print...\tCTRL+P"
-msgstr ""
-
-#: src/library/grDevices/src/devWindows.c:1649
+#: src/library/grDevices/src/devWindows.c:1668
 msgid "close Device"
 msgstr ""
 
-#: src/library/grDevices/src/devWindows.c:1650
+#: src/library/grDevices/src/devWindows.c:1669
 msgid "History"
 msgstr ""
 
-#: src/library/grDevices/src/devWindows.c:1651
+#: src/library/grDevices/src/devWindows.c:1670
 msgid "Recording"
 msgstr ""
 
-#: src/library/grDevices/src/devWindows.c:1654
+#: src/library/grDevices/src/devWindows.c:1673
 msgid "Add\tINS"
 msgstr ""
 
-#: src/library/grDevices/src/devWindows.c:1655
+#: src/library/grDevices/src/devWindows.c:1674
 msgid "Replace"
 msgstr ""
 
-#: src/library/grDevices/src/devWindows.c:1657
+#: src/library/grDevices/src/devWindows.c:1676
 msgid "Previous\tPgUp"
 msgstr ""
 
-#: src/library/grDevices/src/devWindows.c:1658
+#: src/library/grDevices/src/devWindows.c:1677
 msgid "Next\tPgDown"
 msgstr ""
 
-#: src/library/grDevices/src/devWindows.c:1660
+#: src/library/grDevices/src/devWindows.c:1679
 msgid "Save to variable..."
 msgstr ""
 
-#: src/library/grDevices/src/devWindows.c:1661
+#: src/library/grDevices/src/devWindows.c:1680
 msgid "Get from variable..."
 msgstr ""
 
-#: src/library/grDevices/src/devWindows.c:1663
+#: src/library/grDevices/src/devWindows.c:1682
 msgid "Clear history"
 msgstr ""
 
-#: src/library/grDevices/src/devWindows.c:1664
+#: src/library/grDevices/src/devWindows.c:1683
 msgid "Resize"
 msgstr ""
 
-#: src/library/grDevices/src/devWindows.c:1665
+#: src/library/grDevices/src/devWindows.c:1684
 msgid "R mode"
 msgstr ""
 
-#: src/library/grDevices/src/devWindows.c:1667
+#: src/library/grDevices/src/devWindows.c:1686
 msgid "Fit to window"
 msgstr ""
 
-#: src/library/grDevices/src/devWindows.c:1669
+#: src/library/grDevices/src/devWindows.c:1688
 msgid "Fixed size"
 msgstr ""
 
-#: src/library/grDevices/src/devWindows.c:1676
+#: src/library/grDevices/src/devWindows.c:1695
 msgid "Copy as metafile"
 msgstr ""
 
-#: src/library/grDevices/src/devWindows.c:1678
+#: src/library/grDevices/src/devWindows.c:1697
 msgid "Copy as bitmap"
 msgstr ""
 
-#: src/library/grDevices/src/devWindows.c:1681
+#: src/library/grDevices/src/devWindows.c:1700
 msgid "Save as metafile..."
 msgstr ""
 
-#: src/library/grDevices/src/devWindows.c:1683
+#: src/library/grDevices/src/devWindows.c:1702
 msgid "Save as postscript..."
 msgstr ""
 
-#: src/library/grDevices/src/devWindows.c:3136
+#: src/library/grDevices/src/devWindows.c:3143
 msgid "Locator is active"
 msgstr ""
 
-#: src/library/grDevices/src/devWindows.c:3763
+#: src/library/grDevices/src/devWindows.c:3769
 msgid "Waiting to confirm page change..."
 msgstr ""
 
-#: src/library/grDevices/src/devWindows.c:3775
+#: src/library/grDevices/src/devWindows.c:3781
 msgid "Click or hit ENTER for next page"
 msgstr ""
diff --git a/src/library/base/po/da.po b/src/library/base/po/da.po
index 16df720..0fa2709 100644
--- a/src/library/base/po/da.po
+++ b/src/library/base/po/da.po
@@ -1,17 +1,19 @@
 # Danish translation r.
-# Copyright (c) 2014 r & nedenstående oversættere.
+# Copyright (c) 2015 r & nedenstående oversættere.
 # This file is distributed under the same license as the r package.
-# Joe Hansen <joedalton2 at yahoo.dk>, 2011, 2012, 2014.
+# Joe Hansen <joedalton2 at yahoo.dk>, 2011, 2012, 2014, 2015.
 #
 # '' -> ''
 # \" -> ""
+# sink -> datakanal
+# unary -> unær
 #
 msgid ""
 msgstr ""
-"Project-Id-Version: R 3.1.0\n"
-"Report-Msgid-Bugs-To: bugs.r-project.org\n"
-"POT-Creation-Date: 2014-03-27 07:46+0000\n"
-"PO-Revision-Date: 2014-03-18 21:34+0200\n"
+"Project-Id-Version: R 3.2.0\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2016-04-01 10:28-0700\n"
+"PO-Revision-Date: 2015-03-25 21:34+0200\n"
 "Last-Translator: Joe Hansen <joedalton2 at yahoo.dk>\n"
 "Language-Team: Danish <debian-l10n-danish at lists.debian.org>\n"
 "Language: da\n"
@@ -53,15 +55,15 @@ msgstr "Funktion kan ikke evalueres ved oprindelige parametre"
 msgid "unknown type in \"CG\" method of 'optim'"
 msgstr "ukendt type i CG-metode for 'optim'"
 
-#: src/appl/optim.c:665
+#: src/appl/optim.c:662
 msgid "REPORT must be > 0 (method = \"L-BFGS-B\")"
 msgstr "REPORT skal være > 0 (metode = \"L-BFGS-B\")"
 
-#: src/appl/optim.c:688
+#: src/appl/optim.c:685
 msgid "L-BFGS-B needs finite values of 'fn'"
 msgstr "L-BFGS-B kræver endelige værdier for 'fn'"
 
-#: src/appl/optim.c:744
+#: src/appl/optim.c:741
 msgid "trace, REPORT must be >= 0 (method = \"SANN\")"
 msgstr "trace, REPORT skal være >= 0 (metode = \"SANN\")"
 
@@ -126,122 +128,127 @@ msgstr "adgang til '%ls' nægtet"
 msgid "problem in displaying '%ls'"
 msgstr "problem med visning af '%ls'"
 
-#: src/gnuwin32/extra.c:116 src/gnuwin32/extra.c:159 src/gnuwin32/extra.c:349
-#: src/gnuwin32/extra.c:577 src/gnuwin32/extra.c:602 src/main/agrep.c:131
-#: src/main/agrep.c:135 src/main/agrep.c:775 src/main/agrep.c:780
-#: src/main/apply.c:293 src/main/apply.c:295 src/main/apply.c:298
-#: src/main/array.c:87 src/main/array.c:1137 src/main/array.c:1263
-#: src/main/array.c:1265 src/main/array.c:1266 src/main/array.c:1592
-#: src/main/array.c:1594 src/main/array.c:1596 src/main/attrib.c:196
+#: src/gnuwin32/extra.c:116 src/gnuwin32/extra.c:158 src/gnuwin32/extra.c:348
+#: src/gnuwin32/extra.c:574 src/gnuwin32/extra.c:599 src/main/agrep.c:131
+#: src/main/agrep.c:135 src/main/agrep.c:776 src/main/agrep.c:781
+#: src/main/apply.c:330 src/main/apply.c:332 src/main/apply.c:335
+#: src/main/array.c:90 src/main/array.c:1272 src/main/array.c:1411
+#: src/main/array.c:1413 src/main/array.c:1414 src/main/array.c:1758
+#: src/main/array.c:1760 src/main/array.c:1762 src/main/attrib.c:190
 #: src/main/builtin.c:88 src/main/builtin.c:97 src/main/builtin.c:116
-#: src/main/builtin.c:118 src/main/builtin.c:147 src/main/builtin.c:534
-#: src/main/builtin.c:550 src/main/builtin.c:739 src/main/builtin.c:741
-#: src/main/builtin.c:743 src/main/character.c:139 src/main/character.c:142
-#: src/main/character.c:203 src/main/character.c:1037
-#: src/main/character.c:1041 src/main/character.c:1276
-#: src/main/character.c:1280 src/main/character.c:1341
-#: src/main/character.c:1344 src/main/connections.c:1217
-#: src/main/connections.c:1223 src/main/connections.c:1226
-#: src/main/connections.c:1230 src/main/connections.c:1375
-#: src/main/connections.c:1391 src/main/connections.c:1396
-#: src/main/connections.c:1996 src/main/connections.c:2002
-#: src/main/connections.c:2006 src/main/connections.c:2010
-#: src/main/connections.c:2015 src/main/connections.c:2665
-#: src/main/connections.c:2670 src/main/connections.c:2673
-#: src/main/connections.c:2676 src/main/connections.c:3057
-#: src/main/connections.c:3062 src/main/connections.c:3068
-#: src/main/connections.c:3071 src/main/connections.c:3075
-#: src/main/connections.c:3090 src/main/connections.c:3140
-#: src/main/connections.c:3145 src/main/connections.c:3149
-#: src/main/connections.c:3153 src/main/connections.c:3157
-#: src/main/connections.c:3163 src/main/connections.c:3210
-#: src/main/connections.c:3216 src/main/connections.c:3220
-#: src/main/connections.c:3270 src/main/connections.c:3273
-#: src/main/connections.c:3547 src/main/connections.c:3550
-#: src/main/connections.c:3553 src/main/connections.c:3559
-#: src/main/connections.c:3666 src/main/connections.c:3672
-#: src/main/connections.c:3675 src/main/connections.c:3826
-#: src/main/connections.c:3829 src/main/connections.c:3833
-#: src/main/connections.c:3836 src/main/connections.c:3956
-#: src/main/connections.c:4074 src/main/connections.c:4077
-#: src/main/connections.c:4414 src/main/connections.c:4439
-#: src/main/connections.c:4474 src/main/connections.c:4489
-#: src/main/connections.c:4497 src/main/connections.c:4523
-#: src/main/connections.c:4669 src/main/connections.c:4673
-#: src/main/connections.c:4801 src/main/connections.c:4803
-#: src/main/connections.c:4805 src/main/connections.c:4833
-#: src/main/connections.c:4965 src/main/connections.c:4991
-#: src/main/connections.c:4995 src/main/connections.c:4999
-#: src/main/connections.c:5003 src/main/context.c:596 src/main/context.c:605
-#: src/main/context.c:609 src/main/datetime.c:775 src/main/datetime.c:865
-#: src/main/datetime.c:867 src/main/datetime.c:871 src/main/datetime.c:1026
-#: src/main/datetime.c:1028 src/main/datetime.c:1232 src/main/debug.c:228
-#: src/main/deparse.c:397 src/main/dotcode.c:478 src/main/dotcode.c:482
-#: src/main/dotcode.c:487 src/main/dounzip.c:322 src/main/dounzip.c:329
-#: src/main/dounzip.c:339 src/main/dounzip.c:344 src/main/dounzip.c:348
-#: src/main/dounzip.c:352 src/main/envir.c:1618 src/main/envir.c:1621
-#: src/main/envir.c:1742 src/main/envir.c:1747 src/main/envir.c:1813
-#: src/main/envir.c:1829 src/main/envir.c:1835 src/main/envir.c:1932
-#: src/main/envir.c:1940 src/main/envir.c:1947 src/main/envir.c:1958
-#: src/main/envir.c:2172 src/main/envir.c:2293 src/main/envir.c:2552
-#: src/main/envir.c:2762 src/main/envir.c:2776 src/main/envir.c:2783
-#: src/main/envir.c:2799 src/main/envir.c:3367 src/main/errors.c:1030
-#: src/main/eval.c:397 src/main/eval.c:406 src/main/eval.c:409
-#: src/main/grep.c:767 src/main/grep.c:772 src/main/grep.c:1061
-#: src/main/grep.c:1063 src/main/grep.c:1065 src/main/grep.c:1510
-#: src/main/grep.c:1514 src/main/grep.c:1519 src/main/grep.c:2323
-#: src/main/grep.c:2328 src/main/grep.c:2621 src/main/grep.c:2626
-#: src/main/memory.c:3736 src/main/paste.c:96 src/main/paste.c:395
-#: src/main/paste.c:402 src/main/paste.c:409 src/main/paste.c:414
-#: src/main/paste.c:419 src/main/paste.c:424 src/main/paste.c:427
-#: src/main/paste.c:435 src/main/paste.c:601 src/main/paste.c:606
+#: src/main/builtin.c:118 src/main/builtin.c:149 src/main/builtin.c:569
+#: src/main/builtin.c:585 src/main/builtin.c:773 src/main/builtin.c:775
+#: src/main/builtin.c:777 src/main/character.c:239 src/main/character.c:242
+#: src/main/character.c:247 src/main/character.c:788 src/main/character.c:791
+#: src/main/character.c:1289 src/main/character.c:1293
+#: src/main/character.c:1528 src/main/character.c:1532
+#: src/main/character.c:1593 src/main/character.c:1596
+#: src/main/connections.c:1208 src/main/connections.c:1214
+#: src/main/connections.c:1217 src/main/connections.c:1221
+#: src/main/connections.c:1367 src/main/connections.c:1383
+#: src/main/connections.c:1388 src/main/connections.c:1989
+#: src/main/connections.c:1995 src/main/connections.c:1999
+#: src/main/connections.c:2003 src/main/connections.c:2008
+#: src/main/connections.c:2659 src/main/connections.c:2664
+#: src/main/connections.c:2667 src/main/connections.c:2670
+#: src/main/connections.c:3053 src/main/connections.c:3058
+#: src/main/connections.c:3064 src/main/connections.c:3067
+#: src/main/connections.c:3071 src/main/connections.c:3086
+#: src/main/connections.c:3135 src/main/connections.c:3140
+#: src/main/connections.c:3144 src/main/connections.c:3148
+#: src/main/connections.c:3152 src/main/connections.c:3158
+#: src/main/connections.c:3203 src/main/connections.c:3209
+#: src/main/connections.c:3213 src/main/connections.c:3264
+#: src/main/connections.c:3267 src/main/connections.c:3543
+#: src/main/connections.c:3546 src/main/connections.c:3549
+#: src/main/connections.c:3555 src/main/connections.c:3662
+#: src/main/connections.c:3668 src/main/connections.c:3671
+#: src/main/connections.c:3823 src/main/connections.c:3826
+#: src/main/connections.c:3830 src/main/connections.c:3833
+#: src/main/connections.c:3954 src/main/connections.c:4085
+#: src/main/connections.c:4088 src/main/connections.c:4425
+#: src/main/connections.c:4450 src/main/connections.c:4485
+#: src/main/connections.c:4500 src/main/connections.c:4508
+#: src/main/connections.c:4534 src/main/connections.c:4680
+#: src/main/connections.c:4684 src/main/connections.c:4814
+#: src/main/connections.c:4816 src/main/connections.c:4818
+#: src/main/connections.c:4846 src/main/connections.c:4980
+#: src/main/connections.c:5019 src/main/connections.c:5024
+#: src/main/connections.c:5029 src/main/connections.c:5050
+#: src/main/context.c:607 src/main/context.c:616 src/main/context.c:620
+#: src/main/datetime.c:781 src/main/datetime.c:869 src/main/datetime.c:872
+#: src/main/datetime.c:876 src/main/datetime.c:1043 src/main/datetime.c:1045
+#: src/main/datetime.c:1250 src/main/debug.c:245 src/main/deparse.c:408
+#: src/main/dotcode.c:496 src/main/dotcode.c:500 src/main/dotcode.c:505
+#: src/main/dounzip.c:323 src/main/dounzip.c:330 src/main/dounzip.c:340
+#: src/main/dounzip.c:345 src/main/dounzip.c:349 src/main/dounzip.c:353
+#: src/main/envir.c:1752 src/main/envir.c:1755 src/main/envir.c:1876
+#: src/main/envir.c:1881 src/main/envir.c:1945 src/main/envir.c:1961
+#: src/main/envir.c:1967 src/main/envir.c:2079 src/main/envir.c:2087
+#: src/main/envir.c:2094 src/main/envir.c:2105 src/main/envir.c:2337
+#: src/main/envir.c:2458 src/main/envir.c:2755 src/main/envir.c:3022
+#: src/main/envir.c:3036 src/main/envir.c:3043 src/main/envir.c:3059
+#: src/main/envir.c:3642 src/main/errors.c:1011 src/main/eval.c:454
+#: src/main/eval.c:463 src/main/eval.c:466 src/main/grep.c:780
+#: src/main/grep.c:785 src/main/grep.c:1079 src/main/grep.c:1081
+#: src/main/grep.c:1083 src/main/grep.c:1528 src/main/grep.c:1532
+#: src/main/grep.c:1537 src/main/grep.c:2345 src/main/grep.c:2350
+#: src/main/grep.c:2652 src/main/grep.c:2657 src/main/memory.c:3823
+#: src/main/paste.c:96 src/main/paste.c:392 src/main/paste.c:399
+#: src/main/paste.c:406 src/main/paste.c:411 src/main/paste.c:416
+#: src/main/paste.c:421 src/main/paste.c:424 src/main/paste.c:432
+#: src/main/paste.c:437 src/main/paste.c:619 src/main/paste.c:624
 #: src/main/platform.c:306 src/main/platform.c:308 src/main/platform.c:310
 #: src/main/platform.c:326 src/main/platform.c:337 src/main/platform.c:390
-#: src/main/platform.c:392 src/main/platform.c:705 src/main/platform.c:707
-#: src/main/platform.c:1064 src/main/platform.c:1070 src/main/platform.c:1073
-#: src/main/platform.c:1076 src/main/platform.c:1079 src/main/platform.c:1082
-#: src/main/platform.c:1085 src/main/platform.c:1088 src/main/platform.c:1185
-#: src/main/platform.c:1188 src/main/platform.c:1191 src/main/platform.c:1229
-#: src/main/platform.c:1286 src/main/platform.c:1289 src/main/platform.c:1498
-#: src/main/platform.c:1501 src/main/platform.c:1504 src/main/platform.c:1540
-#: src/main/platform.c:1543 src/main/platform.c:1546 src/main/platform.c:1629
-#: src/main/platform.c:1645 src/main/platform.c:1684 src/main/platform.c:1686
-#: src/main/platform.c:1757 src/main/platform.c:1841 src/main/platform.c:2116
-#: src/main/platform.c:2176 src/main/platform.c:2353 src/main/platform.c:2356
-#: src/main/platform.c:2359 src/main/platform.c:2362 src/main/platform.c:2365
-#: src/main/platform.c:2368 src/main/platform.c:2568 src/main/platform.c:2571
-#: src/main/platform.c:2574 src/main/platform.c:2577 src/main/platform.c:2580
-#: src/main/platform.c:2583 src/main/platform.c:2657 src/main/platform.c:2665
-#: src/main/platform.c:2701 src/main/platform.c:2751 src/main/print.c:242
-#: src/main/print.c:248 src/main/print.c:270 src/main/print.c:276
-#: src/main/print.c:283 src/main/random.c:478 src/main/random.c:482
-#: src/main/random.c:489 src/main/random.c:517 src/main/saveload.c:1950
-#: src/main/saveload.c:1953 src/main/saveload.c:1956 src/main/saveload.c:2072
-#: src/main/saveload.c:2252 src/main/saveload.c:2257 src/main/saveload.c:2260
+#: src/main/platform.c:392 src/main/platform.c:708 src/main/platform.c:710
+#: src/main/platform.c:800 src/main/platform.c:1138 src/main/platform.c:1144
+#: src/main/platform.c:1147 src/main/platform.c:1150 src/main/platform.c:1153
+#: src/main/platform.c:1156 src/main/platform.c:1159 src/main/platform.c:1162
+#: src/main/platform.c:1259 src/main/platform.c:1262 src/main/platform.c:1265
+#: src/main/platform.c:1303 src/main/platform.c:1361 src/main/platform.c:1364
+#: src/main/platform.c:1573 src/main/platform.c:1576 src/main/platform.c:1579
+#: src/main/platform.c:1615 src/main/platform.c:1618 src/main/platform.c:1621
+#: src/main/platform.c:1657 src/main/platform.c:1690 src/main/platform.c:1692
+#: src/main/platform.c:1763 src/main/platform.c:1848 src/main/platform.c:2089
+#: src/main/platform.c:2149 src/main/platform.c:2334 src/main/platform.c:2337
+#: src/main/platform.c:2340 src/main/platform.c:2343 src/main/platform.c:2346
+#: src/main/platform.c:2349 src/main/platform.c:2555 src/main/platform.c:2558
+#: src/main/platform.c:2561 src/main/platform.c:2564 src/main/platform.c:2567
+#: src/main/platform.c:2570 src/main/platform.c:2648 src/main/platform.c:2656
+#: src/main/platform.c:2692 src/main/platform.c:2742 src/main/print.c:235
+#: src/main/print.c:241 src/main/print.c:263 src/main/print.c:269
+#: src/main/print.c:276 src/main/random.c:470 src/main/random.c:474
+#: src/main/random.c:481 src/main/random.c:509 src/main/saveload.c:1952
+#: src/main/saveload.c:1955 src/main/saveload.c:1958 src/main/saveload.c:2074
+#: src/main/saveload.c:2254 src/main/saveload.c:2259 src/main/saveload.c:2262
 #: src/main/saveload.c:2366 src/main/scan.c:684 src/main/scan.c:853
 #: src/main/scan.c:867 src/main/scan.c:871 src/main/scan.c:873
 #: src/main/scan.c:884 src/main/scan.c:911 src/main/scan.c:914
-#: src/main/scan.c:917 src/main/scan.c:972 src/main/seq.c:618
-#: src/main/seq.c:623 src/main/seq.c:631 src/main/seq.c:662 src/main/seq.c:666
-#: src/main/seq.c:672 src/main/seq.c:680 src/main/sort.c:175
-#: src/main/sysutils.c:585 src/main/sysutils.c:589 src/main/sysutils.c:593
-#: src/main/sysutils.c:599 src/main/sysutils.c:603 src/main/sysutils.c:1831
-#: src/main/sysutils.c:1835 src/main/unique.c:966 src/main/unique.c:1289
-#: src/main/unique.c:1349 src/main/unique.c:1356 src/main/unique.c:1750
-#: src/main/util.c:581 src/main/util.c:584 src/main/util.c:1825
-#: src/main/util.c:1994 src/main/util.c:1995 src/main/util.c:1996
-#: src/main/util.c:2013 src/main/util.c:2037 src/main/util.c:2041
-#: src/main/util.c:2043 src/main/util.c:2068 src/main/util.c:2070
-#: src/main/util.c:2072 src/main/util.c:2075 src/main/util.c:2078
-#: src/main/util.c:2082 src/main/util.c:2084 src/modules/X11/devX11.c:3241
-#: src/modules/X11/devX11.c:3244 src/modules/X11/devX11.c:3247
-#: src/modules/X11/devX11.c:3271 src/modules/internet/internet.c:284
-#: src/modules/internet/internet.c:290 src/modules/internet/internet.c:296
-#: src/modules/internet/internet.c:299 src/modules/internet/internet.c:303
+#: src/main/scan.c:917 src/main/scan.c:972 src/main/seq.c:622
+#: src/main/seq.c:627 src/main/seq.c:635 src/main/seq.c:666 src/main/seq.c:670
+#: src/main/seq.c:676 src/main/seq.c:684 src/main/sort.c:175
+#: src/main/sysutils.c:597 src/main/sysutils.c:601 src/main/sysutils.c:605
+#: src/main/sysutils.c:611 src/main/sysutils.c:615 src/main/sysutils.c:1787
+#: src/main/sysutils.c:1791 src/main/unique.c:1029 src/main/unique.c:1337
+#: src/main/unique.c:1341 src/main/unique.c:1351 src/main/unique.c:1747
+#: src/main/util.c:636 src/main/util.c:639 src/main/util.c:1379
+#: src/main/util.c:1393 src/main/util.c:1975 src/main/util.c:2198
+#: src/main/util.c:2199 src/main/util.c:2200 src/main/util.c:2217
+#: src/main/util.c:2245 src/main/util.c:2249 src/main/util.c:2251
+#: src/main/util.c:2277 src/main/util.c:2279 src/main/util.c:2281
+#: src/main/util.c:2284 src/main/util.c:2287 src/main/util.c:2291
+#: src/main/util.c:2293 src/modules/X11/devX11.c:3247
+#: src/modules/X11/devX11.c:3250 src/modules/X11/devX11.c:3253
+#: src/modules/X11/devX11.c:3277 src/modules/internet/internet.c:453
+#: src/modules/internet/internet.c:459 src/modules/internet/internet.c:465
+#: src/modules/internet/internet.c:468 src/modules/internet/internet.c:472
+#: src/modules/internet/internet.c:477 src/modules/internet/libcurl.c:414
+#: src/modules/internet/libcurl.c:418 src/modules/internet/libcurl.c:423
+#: src/modules/internet/libcurl.c:426 src/modules/internet/libcurl.c:430
 #: src/modules/lapack/Lapack.c:155 src/modules/lapack/Lapack.c:261
 #: src/modules/lapack/Lapack.c:709 src/modules/lapack/Lapack.c:818
-#: src/modules/lapack/Lapack.c:880 src/modules/lapack/Lapack.c:1214
-#: src/unix/sys-std.c:1217 src/unix/sys-std.c:1240
+#: src/modules/lapack/Lapack.c:880 src/modules/lapack/Lapack.c:1215
+#: src/unix/sys-std.c:1223 src/unix/sys-std.c:1246
 #, c-format
 msgid "invalid '%s' argument"
 msgstr "ugyldigt '%s'-argument"
@@ -250,365 +257,342 @@ msgstr "ugyldigt '%s'-argument"
 msgid "unsupported version of Windows"
 msgstr "Windowsversion er ikke understøttet"
 
-#: src/gnuwin32/extra.c:267 src/main/apply.c:105 src/main/character.c:595
-#: src/main/connections.c:3555 src/main/context.c:642 src/main/context.c:661
-#: src/main/datetime.c:675 src/main/datetime.c:777 src/main/datetime.c:1030
-#: src/main/dotcode.c:199 src/main/errors.c:929 src/main/errors.c:962
-#: src/main/errors.c:1065 src/main/errors.c:1090 src/main/errors.c:1095
-#: src/main/errors.c:1368 src/main/identical.c:66 src/main/identical.c:67
-#: src/main/identical.c:68 src/main/identical.c:69 src/main/identical.c:70
-#: src/main/seq.c:185 src/main/seq.c:341 src/main/seq.c:346 src/main/seq.c:350
-#: src/main/seq.c:391 src/main/seq.c:395 src/main/seq.c:399
-#: src/main/sort.c:1224 src/main/sort.c:1307 src/main/sort.c:1311
-#: src/main/sort.c:1318 src/main/sort.c:1393 src/main/source.c:220
-#: src/main/summary.c:886 src/main/sysutils.c:251 src/main/util.c:986
-#: src/main/util.c:991 src/main/util.c:998 src/main/util.c:1001
-#: src/modules/X11/devX11.c:3142 src/modules/X11/devX11.c:3169
-#: src/modules/X11/devX11.c:3174 src/modules/X11/devX11.c:3179
-#: src/modules/X11/devX11.c:3189 src/modules/X11/devX11.c:3194
-#: src/modules/X11/devX11.c:3198 src/modules/X11/devX11.c:3202
-#: src/unix/sys-std.c:1291
-#, c-format
-msgid "invalid '%s' value"
-msgstr "ugyldig '%s'-værdi"
-
-#: src/gnuwin32/extra.c:308 src/gnuwin32/extra.c:321
+#: src/gnuwin32/extra.c:313 src/gnuwin32/extra.c:324
 msgid "incorrect argument"
 msgstr "ukorrekt argument"
 
-#: src/gnuwin32/extra.c:312
+#: src/gnuwin32/extra.c:316
 msgid "don't be silly!: your machine has a 4Gb address limit"
 msgstr "vær ikke fjollet!: din maskine har en 4GB adressebegrænsning"
 
-#: src/gnuwin32/extra.c:316
+#: src/gnuwin32/extra.c:320
 msgid "cannot decrease memory limit: ignored"
 msgstr "kan ikke formindske hukommelsesbegrænsning: ignoreret"
 
-#: src/gnuwin32/extra.c:428 src/gnuwin32/extra.c:529 src/main/util.c:897
+#: src/gnuwin32/extra.c:427 src/gnuwin32/extra.c:528 src/main/util.c:962
 msgid "'path' must be a character vector"
 msgstr "'path' skal være en tegnvektor"
 
-#: src/gnuwin32/extra.c:579 src/gnuwin32/extra.c:581 src/gnuwin32/extra.c:604
-#: src/gnuwin32/extra.c:606 src/gnuwin32/extra.c:641 src/main/gevents.c:61
+#: src/gnuwin32/extra.c:576 src/gnuwin32/extra.c:578 src/gnuwin32/extra.c:601
+#: src/gnuwin32/extra.c:603 src/gnuwin32/extra.c:638 src/main/gevents.c:61
 #: src/main/gevents.c:98
 msgid "invalid device"
 msgstr "ugyldig enhed"
 
-#: src/gnuwin32/extra.c:582
+#: src/gnuwin32/extra.c:579
 msgid "requires SDI mode"
 msgstr "kræver SDI-tilstand"
 
-#: src/gnuwin32/extra.c:635 src/main/gevents.c:58 src/main/gevents.c:95
+#: src/gnuwin32/extra.c:632 src/main/gevents.c:58 src/main/gevents.c:95
 msgid "invalid graphical device number"
 msgstr "ugyldig grafisk enhedsnummer"
 
-#: src/gnuwin32/extra.c:645
+#: src/gnuwin32/extra.c:642
 msgid "bad device"
 msgstr "ugyldig enhed"
 
-#: src/gnuwin32/extra.c:799 src/gnuwin32/extra.c:807
+#: src/gnuwin32/extra.c:796 src/gnuwin32/extra.c:804
 msgid "invalid input in 'Rmbstowcs'"
 msgstr "ugyldige inddata i 'Rmbstowcs'"
 
-#: src/gnuwin32/extra.c:830 src/main/platform.c:1261
+#: src/gnuwin32/extra.c:827 src/main/platform.c:1336
 msgid "file choice cancelled"
 msgstr "filvalg afbrudt"
 
-#: src/gnuwin32/run.c:242
+#: src/gnuwin32/run.c:244
 #, c-format
 msgid "'CreateProcess' failed to run '%s'"
 msgstr "'CreateProcess' fejlede i at køre '%s'"
 
-#: src/gnuwin32/run.c:344
+#: src/gnuwin32/run.c:346
 msgid "Child process not responding.  R will terminate it."
 msgstr "Underproces svarer ikke. R vil afslutte den."
 
-#: src/gnuwin32/run.c:402
+#: src/gnuwin32/run.c:404
 #, c-format
 msgid "Exit code was %d"
 msgstr "Afslutningskode var %d"
 
-#: src/gnuwin32/run.c:434
+#: src/gnuwin32/run.c:436
 msgid "Insufficient memory (rpipeOpen)"
 msgstr "Ikke nok hukommelse (rpipeOpen)"
 
-#: src/gnuwin32/run.c:648 src/main/dounzip.c:482
+#: src/gnuwin32/run.c:650 src/main/dounzip.c:481
 msgid "seek not enabled for this connection"
 msgstr "søgning ikke aktiveret for denne forbindelse"
 
-#: src/gnuwin32/run.c:654
+#: src/gnuwin32/run.c:656
 msgid "truncate not enabled for this connection"
 msgstr "afkort ikke aktiveret for denne forbindelse"
 
-#: src/gnuwin32/run.c:729 src/gnuwin32/run.c:733 src/gnuwin32/run.c:746
-#: src/gnuwin32/run.c:774 src/main/connections.c:1330
-#: src/main/connections.c:1334 src/main/connections.c:1340
-#: src/main/connections.c:1354
+#: src/gnuwin32/run.c:731 src/gnuwin32/run.c:735 src/gnuwin32/run.c:748
+#: src/gnuwin32/run.c:776 src/main/connections.c:1322
+#: src/main/connections.c:1326 src/main/connections.c:1332
+#: src/main/connections.c:1346
 msgid "allocation of pipe connection failed"
 msgstr "allokering for datakanalforbindelse fejlede"
 
-#: src/gnuwin32/run.c:788
+#: src/gnuwin32/run.c:790
 msgid "'names' is not a character vector"
 msgstr "'names' er ikke en tegnvektor"
 
-#: src/gnuwin32/sys-win32.c:182
+#: src/gnuwin32/sys-win32.c:180
 msgid "character string expected as first argument"
 msgstr "tegnstreng forventet som første argument"
 
-#: src/gnuwin32/sys-win32.c:191
+#: src/gnuwin32/sys-win32.c:189
 msgid "character string expected as third argument"
 msgstr "tegnstreng forventet som tredje argument"
 
-#: src/gnuwin32/sys-win32.c:257 src/unix/sys-unix.c:299
+#: src/gnuwin32/sys-win32.c:255 src/unix/sys-unix.c:312
 #, c-format
 msgid "running command '%s' had status %d"
 msgstr "kørende kommando '%s' havde status %d"
 
-#: src/gnuwin32/system.c:122 src/unix/sys-unix.c:427
+#: src/gnuwin32/system.c:121 src/unix/sys-unix.c:440
 msgid "reached session elapsed time limit"
 msgstr "nåede tidsbegrænsningen for sessionen"
 
-#: src/gnuwin32/system.c:124 src/unix/sys-unix.c:429
+#: src/gnuwin32/system.c:123 src/unix/sys-unix.c:442
 msgid "reached elapsed time limit"
 msgstr "nåede tidsbegrænsningen"
 
-#: src/gnuwin32/system.c:130 src/unix/sys-unix.c:435
+#: src/gnuwin32/system.c:129 src/unix/sys-unix.c:448
 msgid "reached session CPU time limit"
 msgstr "nåede CPU-tidsbegrænsningen for sessionen"
 
-#: src/gnuwin32/system.c:132 src/unix/sys-unix.c:437
+#: src/gnuwin32/system.c:131 src/unix/sys-unix.c:450
 msgid "reached CPU time limit"
 msgstr "nåede CPU-tidsbegrænsningen"
 
-#: src/gnuwin32/system.c:157
+#: src/gnuwin32/system.c:156
 #, c-format
 msgid "Fatal error: %s\n"
 msgstr "Fatal fejl: %s\n"
 
-#: src/gnuwin32/system.c:335 src/unix/sys-std.c:863
+#: src/gnuwin32/system.c:334 src/unix/sys-std.c:866
 #, c-format
 msgid "encoding '%s' is not recognised"
 msgstr "kodning '%s' blev ikke genkendt"
 
-#: src/gnuwin32/system.c:341 src/unix/sys-std.c:869
+#: src/gnuwin32/system.c:340 src/unix/sys-std.c:872
 #, c-format
 msgid "<ERROR: re-encoding failure from encoding '%s'>\n"
 msgstr "<FEJL: genkodningsfejl fra kodning '%s'>\n"
 
-#: src/gnuwin32/system.c:555 src/gnuwin32/system.c:1049
-#: src/gnuwin32/system.c:1061 src/main/connections.c:590
-#: src/main/connections.c:595 src/main/dounzip.c:177 src/main/saveload.c:1961
-#: src/main/serialize.c:2552 src/main/serialize.c:2557
-#: src/main/serialize.c:2642 src/main/serialize.c:2687 src/unix/system.c:323
-#: src/unix/system.c:343
+#: src/gnuwin32/system.c:562 src/gnuwin32/system.c:1058
+#: src/gnuwin32/system.c:1070 src/main/connections.c:581
+#: src/main/connections.c:586 src/main/dounzip.c:178 src/main/saveload.c:1963
+#: src/main/serialize.c:2598 src/main/serialize.c:2603
+#: src/main/serialize.c:2688 src/main/serialize.c:2733 src/unix/system.c:328
 #, c-format
 msgid "cannot open file '%s': %s"
 msgstr "kan ikke åbne fil '%s': %s"
 
-#: src/gnuwin32/system.c:569
+#: src/gnuwin32/system.c:576
 #, c-format
 msgid "file.show(): file '%s' does not exist\n"
 msgstr "file.show(): fil '%s' findes ikke\n"
 
-#: src/gnuwin32/system.c:970
+#: src/gnuwin32/system.c:979
 #, c-format
 msgid "WARNING: R_MAX_MEM_SIZE value is invalid: ignored\n"
 msgstr "ADVARSEL: R_MAX_MEM_SIZE-værdien er ugyldig: ignoreres\n"
 
-#: src/gnuwin32/system.c:1002
+#: src/gnuwin32/system.c:1011
 msgid "WARNING: no max-mem-size given\n"
 msgstr "ADVARSEL: ingen max-mem-size angivet\n"
 
-#: src/gnuwin32/system.c:1009
+#: src/gnuwin32/system.c:1018
 #, c-format
 msgid "WARNING: --max-mem-size value is invalid: ignored\n"
 msgstr "ADVARSEL: --max-mem-size-værdi er ugyldig: ignoreres\n"
 
-#: src/gnuwin32/system.c:1012
+#: src/gnuwin32/system.c:1021
 #, c-format
 msgid "WARNING: --max-mem-size=%lu%c: too large and ignored\n"
 msgstr "ADVARSEL: --max-mem-size=%lu%c: er for stor og ignoreres\n"
 
-#: src/gnuwin32/system.c:1018
+#: src/gnuwin32/system.c:1027
 #, c-format
 msgid "WARNING: --max-mem-size=%4.1fM: too small and ignored\n"
 msgstr "ADVARSEL: --max-mem-size=%4.1fM: er for lille og ignoreres\n"
 
-#: src/gnuwin32/system.c:1023
+#: src/gnuwin32/system.c:1032
 #, c-format
 msgid "WARNING: --max-mem-size=%4.0fM: too large and taken as %uM\n"
 msgstr "ADVARSEL: --max-mem-size=%4.0fM: er for stor og taget som %uM\n"
 
-#: src/gnuwin32/system.c:1039
+#: src/gnuwin32/system.c:1048
 #, c-format
 msgid "option '%s' requires an argument"
 msgstr "tilvalg '%s' kræver et argument"
 
-#: src/gnuwin32/system.c:1070
+#: src/gnuwin32/system.c:1079
 #, c-format
 msgid "option '%s' requires a non-empty argument"
 msgstr "tilvalg '%s' kræver et ikketomt argument"
 
-#: src/gnuwin32/system.c:1078 src/unix/system.c:362
+#: src/gnuwin32/system.c:1087 src/unix/system.c:347
 #, c-format
 msgid "WARNING: '-e %s' omitted as input is too long\n"
 msgstr "ADVARSEL: '-e %s' udeladt som inddata er for langt\n"
 
-#: src/gnuwin32/system.c:1082 src/unix/system.c:375
+#: src/gnuwin32/system.c:1091 src/unix/system.c:360
 #, c-format
 msgid "WARNING: unknown option '%s'\n"
 msgstr "ADVARSEL: ukendt tilvalg '%s'\n"
 
-#: src/gnuwin32/system.c:1104 src/unix/system.c:379
+#: src/gnuwin32/system.c:1113 src/unix/system.c:364
 #, c-format
 msgid "ARGUMENT '%s' __ignored__\n"
 msgstr "ARGUMENT '%s' __ignoreret__\n"
 
-#: src/gnuwin32/system.c:1110 src/unix/system.c:386
+#: src/gnuwin32/system.c:1119 src/unix/system.c:371
 msgid "cannot use -e with -f or --file"
 msgstr "kan ikke bruge -e med -f eller --file"
 
-#: src/gnuwin32/system.c:1128
+#: src/gnuwin32/system.c:1137
 msgid "creation of tmpfile failed -- set TMPDIR suitably?"
 msgstr "oprettelse midlertidig fil mislykkedes - sæt TMPDIR på passende vis?"
 
-#: src/gnuwin32/system.c:1147 src/unix/system.c:437
+#: src/gnuwin32/system.c:1156 src/unix/system.c:422
 msgid "you must specify '--save', '--no-save' or '--vanilla'"
 msgstr "du skal angive '--save', '--no-save' eller '--vanilla'"
 
-#: src/gnuwin32/system.c:1152
+#: src/gnuwin32/system.c:1161
 msgid ""
 "impossible to create 'reader thread'; you must free some system resources"
 msgstr ""
 "umuligt at oprette 'reader thread'; du skal frigive nogle systemressourcer"
 
-#: src/include/Errormsg.h:25 src/main/subscript.c:375 src/main/subscript.c:393
-#: src/main/subscript.c:417 src/main/subscript.c:456 src/main/subscript.c:584
-#: src/main/subscript.c:623 src/main/subscript.c:766
+#: src/include/Errormsg.h:27 src/main/subscript.c:383 src/main/subscript.c:401
+#: src/main/subscript.c:425 src/main/subscript.c:464 src/main/subscript.c:662
+#: src/main/subscript.c:701 src/main/subscript.c:844
 msgid "subscript out of bounds"
 msgstr ""
 
-#: src/include/Errormsg.h:26
+#: src/include/Errormsg.h:28
 #, c-format
 msgid "object of type '%s' is not subsettable"
 msgstr ""
 
-#: src/main/CommandLineArgs.c:170
+#: src/main/CommandLineArgs.c:171
 msgid "WARNING: no value given for --encoding"
 msgstr "ADVARSEL: ingen værdi angivet for --encoding"
 
-#: src/main/CommandLineArgs.c:195
+#: src/main/CommandLineArgs.c:196
 #, c-format
 msgid "WARNING: option '%s' no longer supported"
 msgstr "ADVARSEL: tilvalg '%s' er ikke længere understøttet"
 
-#: src/main/CommandLineArgs.c:206
+#: src/main/CommandLineArgs.c:207
 #, c-format
 msgid "WARNING: no value given for '%s'"
 msgstr "ADVARSEL: ingen værdi angivet for '%s'"
 
-#: src/main/CommandLineArgs.c:216
+#: src/main/CommandLineArgs.c:217
 #, c-format
 msgid "WARNING: '%s' value is invalid: ignored"
 msgstr "ADVARSEL: værdien '%s' er ugyldig: ignoreres"
 
-#: src/main/CommandLineArgs.c:220
+#: src/main/CommandLineArgs.c:221
 #, c-format
 msgid "WARNING: %s: too large and ignored"
 msgstr "ADVARSEL: %s: for store og ignoreres"
 
-#: src/main/CommandLineArgs.c:234
+#: src/main/CommandLineArgs.c:235
 msgid "WARNING: no value given for '--max-ppsize'"
 msgstr "ADVARSEL: ingen værdi angivet for '--max-ppsize'"
 
-#: src/main/CommandLineArgs.c:239
+#: src/main/CommandLineArgs.c:240
 msgid "WARNING: '--max-ppsize' value is negative: ignored"
 msgstr ""
 
-#: src/main/CommandLineArgs.c:241
+#: src/main/CommandLineArgs.c:242
 msgid "WARNING: '--max-ppsize' value is too small: ignored"
 msgstr ""
 
-#: src/main/CommandLineArgs.c:244
+#: src/main/CommandLineArgs.c:245
 msgid "WARNING: '--max-ppsize' value is too large: ignored"
 msgstr ""
 
-#: src/main/RNG.c:175
+#: src/main/RNG.c:176
 #, c-format
 msgid "unif_rand: unimplemented RNG kind %d"
 msgstr ""
 
-#: src/main/RNG.c:260
+#: src/main/RNG.c:261
 #, c-format
 msgid "FixupSeeds: unimplemented RNG kind %d"
 msgstr ""
 
-#: src/main/RNG.c:302
+#: src/main/RNG.c:301
 msgid "'user_unif_rand' not in load table"
 msgstr ""
 
-#: src/main/RNG.c:310
+#: src/main/RNG.c:309
 msgid "cannot read seeds unless 'user_unif_nseed' is supplied"
 msgstr ""
 
-#: src/main/RNG.c:315
+#: src/main/RNG.c:314
 msgid "seed length must be in 0...625; ignored"
 msgstr ""
 
-#: src/main/RNG.c:323
+#: src/main/RNG.c:322
 #, c-format
 msgid "RNG_Init: unimplemented RNG kind %d"
 msgstr ""
 
-#: src/main/RNG.c:354
+#: src/main/RNG.c:351
 msgid "'.Random.seed' is a missing argument with no default"
 msgstr ""
 
-#: src/main/RNG.c:355
+#: src/main/RNG.c:352
 #, c-format
 msgid "'.Random.seed' is not an integer vector but of type '%s', so ignored"
 msgstr ""
 
-#: src/main/RNG.c:363
+#: src/main/RNG.c:360
 msgid "'.Random.seed[1]' is not a valid integer, so ignored"
 msgstr ""
 
-#: src/main/RNG.c:369
+#: src/main/RNG.c:366
 msgid "'.Random.seed[1]' is not a valid Normal type, so ignored"
 msgstr ""
 
-#: src/main/RNG.c:383
+#: src/main/RNG.c:380
 msgid "'.Random.seed[1] = 5' but no user-supplied generator, so ignored"
 msgstr ""
 
-#: src/main/RNG.c:388
+#: src/main/RNG.c:385
 msgid "'.Random.seed[1]' is not a valid RNG kind so ignored"
 msgstr ""
 
-#: src/main/RNG.c:415
+#: src/main/RNG.c:412
 msgid "'.Random.seed' has wrong length"
 msgstr "'.Random.seed' er af forkert længde"
 
-#: src/main/RNG.c:468
+#: src/main/RNG.c:465
 #, c-format
 msgid "RNGkind: unimplemented RNG kind %d"
 msgstr ""
 
-#: src/main/RNG.c:488
+#: src/main/RNG.c:485
 msgid "invalid Normal type in 'RNGkind'"
 msgstr "ugyldig Normaltype i 'RNGkind'"
 
-#: src/main/RNG.c:491
+#: src/main/RNG.c:488
 msgid "'user_norm_rand' not in load table"
 msgstr ""
 
-#: src/main/RNG.c:535
+#: src/main/RNG.c:532
 msgid "supplied seed is not a valid integer"
 msgstr ""
 
 #: src/main/Rdynload.c:248
 msgid "R_RegisterRoutines called with invalid DllInfo object."
-msgstr ""
+msgstr "R_RegisterRoutines kaldt med ugyldigt DllInfo-objekt."
 
 #: src/main/Rdynload.c:533
 msgid "`maximal number of DLLs reached..."
@@ -627,7 +611,7 @@ msgstr "DLLname '%s' er for langt"
 msgid "could not allocate space for 'name'"
 msgstr "kunne ikke allokere plads for 'name'"
 
-#: src/main/Rdynload.c:881 src/main/Rdynload.c:897 src/main/util.c:698
+#: src/main/Rdynload.c:881 src/main/Rdynload.c:897 src/main/util.c:762
 msgid "character argument expected"
 msgstr "tegnargument forventet"
 
@@ -637,167 +621,196 @@ msgid ""
 "unable to load shared object '%s':\n"
 "  %s"
 msgstr ""
+"kan ikke indlæse delt objekt '%s':\n"
+"  %s"
 
 #: src/main/Rdynload.c:900
 #, c-format
 msgid "shared object '%s' was not loaded"
-msgstr ""
+msgstr "delt objekt '%s' blev ikke indlæst"
 
 #: src/main/Rdynload.c:979
 #, c-format
-msgid "cannot allocate memory for registered native symbol (%d bytes)"
-msgstr ""
+msgid "cannot allocate memory for registered native symbol (%d byte)"
+msgid_plural "cannot allocate memory for registered native symbol (%d bytes)"
+msgstr[0] ""
+"kan ikke allokere hukommelse for registreret standardsymbol (%d byte)"
+msgstr[1] ""
+"kan ikke allokere hukommelse for registreret standardsymbol (%d byte)"
 
-#: src/main/Rdynload.c:1100 src/main/Rdynload.c:1321
+#: src/main/Rdynload.c:1102 src/main/Rdynload.c:1323
 msgid "must pass package name or DllInfo reference"
-msgstr ""
+msgstr "skal sende pakkenavn eller DllInfo-reference"
 
-#: src/main/Rdynload.c:1197
+#: src/main/Rdynload.c:1199
 #, c-format
 msgid "unimplemented type %d in 'createRSymbolObject'"
-msgstr ""
+msgstr "ikke implementeret type %d i »createRSymbolObject«"
 
-#: src/main/Rdynload.c:1279 src/main/Rdynload.c:1373
+#: src/main/Rdynload.c:1281 src/main/Rdynload.c:1375
 msgid "R_getRegisteredRoutines() expects a DllInfo reference"
 msgstr ""
 
-#: src/main/Rdynload.c:1282 src/main/Rdynload.c:1376
+#: src/main/Rdynload.c:1284 src/main/Rdynload.c:1378
 msgid "NULL value passed for DllInfo"
 msgstr ""
 
-#: src/main/Rdynload.c:1436
+#: src/main/Rdynload.c:1441
 #, c-format
 msgid "function '%s' not provided by package '%s'"
-msgstr ""
+msgstr "funktion »%s« er ikke tilbudt af pakken »%s«"
 
-#: src/main/Rdynload.c:1438
+#: src/main/Rdynload.c:1443
 msgid "table entry must be an external pointer"
 msgstr ""
 
 #: src/main/Renviron.c:159 src/main/Renviron.c:164
 #, c-format
 msgid "problem in setting variable '%s' in Renviron"
-msgstr ""
+msgstr "der opstod et problem ved indstilling af variabel »%s« i Renviron"
 
-#: src/main/Renviron.c:311
-msgid "argument 'x' must be a character string"
-msgstr "argument 'x' skal være en tegnstreng"
+#: src/main/Renviron.c:311 src/main/objects.c:1174 src/main/raw.c:155
+#, c-format
+msgid "argument '%s' must be a character string"
+msgstr "argument '%s' skal være en tegnstreng"
 
 #: src/main/Renviron.c:315
 #, c-format
 msgid "file '%s' cannot be opened for reading"
 msgstr "filen '%s' kan ikke være åben for læsning"
 
-#: src/main/Rstrptime.h:517 src/main/Rstrptime.h:984
+#: src/main/Rstrptime.h:524 src/main/Rstrptime.h:991
 #, c-format
 msgid "use of %s for input is not supported"
 msgstr "brug af %s som inddata er ikke understøttet"
 
-#: src/main/Rstrptime.h:1242
+#: src/main/Rstrptime.h:1263
 msgid "input string is too long"
 msgstr "inddatastreng er for lang"
 
-#: src/main/Rstrptime.h:1244
+#: src/main/Rstrptime.h:1265
 msgid "invalid multibyte input string"
 msgstr ""
 
-#: src/main/Rstrptime.h:1247
+#: src/main/Rstrptime.h:1268
 msgid "format string is too long"
 msgstr "formatstreng er for lang"
 
-#: src/main/Rstrptime.h:1249
+#: src/main/Rstrptime.h:1270
 msgid "invalid multibyte format string"
 msgstr ""
 
-#: src/main/agrep.c:133 src/main/agrep.c:777 src/main/character.c:1039
-#: src/main/character.c:1043 src/main/grep.c:769 src/main/grep.c:1512
-#: src/main/grep.c:1516 src/main/grep.c:2325 src/main/grep.c:2623
+#: src/main/agrep.c:133 src/main/agrep.c:778 src/main/character.c:1291
+#: src/main/character.c:1295 src/main/grep.c:782 src/main/grep.c:1530
+#: src/main/grep.c:1534 src/main/grep.c:2347 src/main/grep.c:2654
 #, c-format
 msgid "argument '%s' has length > 1 and only the first element will be used"
 msgstr ""
 
-#: src/main/agrep.c:189 src/main/agrep.c:818
+#: src/main/agrep.c:190 src/main/agrep.c:820
 msgid "'pattern' must be a non-empty character string"
 msgstr ""
 
-#: src/main/agrep.c:200 src/main/agrep.c:827 src/main/grep.c:838
-#: src/main/grep.c:2381 src/main/grep.c:2662
+#: src/main/agrep.c:201 src/main/agrep.c:829 src/main/grep.c:853
+#: src/main/grep.c:2405 src/main/grep.c:2707
 msgid "regular expression is invalid in this locale"
 msgstr ""
 
-#: src/main/agrep.c:206 src/main/agrep.c:623
+#: src/main/agrep.c:207 src/main/agrep.c:624
 #, c-format
 msgid "regcomp error:  '%s'"
-msgstr ""
+msgstr "regcomp-fejl:  '%s'"
 
-#: src/main/agrep.c:238 src/main/agrep.c:871 src/main/grep.c:227
-#: src/main/grep.c:315 src/main/grep.c:423 src/main/grep.c:578
-#: src/main/grep.c:889 src/main/grep.c:2480 src/main/grep.c:2548
-#: src/main/grep.c:2698
+#: src/main/agrep.c:239 src/main/agrep.c:874 src/main/grep.c:233
+#: src/main/grep.c:323 src/main/grep.c:434 src/main/grep.c:590
+#: src/main/grep.c:907 src/main/grep.c:2510 src/main/grep.c:2579
+#: src/main/grep.c:2744
 #, c-format
 msgid "input string %d is invalid in this locale"
 msgstr ""
 
-#: src/main/agrep.c:525 src/main/agrep.c:765 src/main/grep.c:155
-#: src/main/grep.c:760 src/main/grep.c:762 src/main/grep.c:1047
-#: src/main/grep.c:1055 src/main/grep.c:1503 src/main/grep.c:1505
-#: src/main/grep.c:2315 src/main/grep.c:2317 src/main/grep.c:2611
+#: src/main/agrep.c:526 src/main/agrep.c:766 src/main/grep.c:159
+#: src/main/grep.c:773 src/main/grep.c:775 src/main/grep.c:1065
+#: src/main/grep.c:1073 src/main/grep.c:1521 src/main/grep.c:1523
+#: src/main/grep.c:2337 src/main/grep.c:2339 src/main/grep.c:2642
 #, c-format
 msgid "argument '%s' will be ignored"
 msgstr ""
 
-#: src/main/agrep.c:614
+#: src/main/agrep.c:615
 #, c-format
 msgid "input string x[%d] is invalid in this locale"
 msgstr ""
 
-#: src/main/agrep.c:660
+#: src/main/agrep.c:661
 #, c-format
 msgid "input string y[%d] is invalid in this locale"
 msgstr ""
 
-#: src/main/agrep.c:833 src/main/grep.c:2668
+#: src/main/agrep.c:835 src/main/grep.c:2713
 #, c-format
 msgid "regcomp error: '%s'"
 msgstr ""
 
-#: src/main/apply.c:103
+#: src/main/apply.c:98
 msgid "'FUN.VALUE' must be a vector"
 msgstr "'FUN.VALUE' skal være en vektor"
 
-#: src/main/apply.c:108 src/main/complex.c:758
+#: src/main/apply.c:100 src/main/array.c:506 src/main/character.c:847
+#: src/main/character.c:1655 src/main/connections.c:3551
+#: src/main/context.c:653 src/main/context.c:672 src/main/datetime.c:681
+#: src/main/datetime.c:783 src/main/datetime.c:1047 src/main/dotcode.c:222
+#: src/main/errors.c:910 src/main/errors.c:943 src/main/errors.c:1049
+#: src/main/errors.c:1074 src/main/errors.c:1079 src/main/errors.c:1349
+#: src/main/identical.c:66 src/main/identical.c:67 src/main/identical.c:68
+#: src/main/identical.c:69 src/main/identical.c:70 src/main/platform.c:2982
+#: src/main/seq.c:192 src/main/seq.c:343 src/main/seq.c:348 src/main/seq.c:352
+#: src/main/seq.c:397 src/main/seq.c:401 src/main/seq.c:405
+#: src/main/sort.c:1244 src/main/sort.c:1327 src/main/sort.c:1331
+#: src/main/sort.c:1338 src/main/source.c:225 src/main/summary.c:954
+#: src/main/sysutils.c:250 src/main/util.c:1051 src/main/util.c:1056
+#: src/main/util.c:1063 src/main/util.c:1066 src/main/util.c:2035
+#: src/modules/X11/devX11.c:3148 src/modules/X11/devX11.c:3175
+#: src/modules/X11/devX11.c:3180 src/modules/X11/devX11.c:3185
+#: src/modules/X11/devX11.c:3195 src/modules/X11/devX11.c:3200
+#: src/modules/X11/devX11.c:3204 src/modules/X11/devX11.c:3208
+#, c-format
+msgid "invalid '%s' value"
+msgstr "ugyldig '%s'-værdi"
+
+#: src/main/apply.c:103 src/main/complex.c:753
 msgid "invalid length"
 msgstr "ugyldig længde"
 
-#: src/main/apply.c:113
+#: src/main/apply.c:108
 msgid "long vectors are not supported for matrix/array results"
 msgstr ""
 
-#: src/main/apply.c:162
+#: src/main/apply.c:115
+#, c-format
+msgid "type '%s' is not supported"
+msgstr ""
+
+#: src/main/apply.c:163
 #, c-format
 msgid ""
 "values must be length %d,\n"
 " but FUN(X[[%d]]) result is length %d"
 msgstr ""
 
-#: src/main/apply.c:174
+#: src/main/apply.c:175
 #, c-format
 msgid ""
 "values must be type '%s',\n"
 " but FUN(X[[%d]]) result is type '%s'"
 msgstr ""
 
-#: src/main/apply.c:193
-#, c-format
-msgid "type '%s' is not supported"
-msgstr ""
-
-#: src/main/apply.c:225
+#: src/main/apply.c:252
 #, c-format
 msgid "dimnames(<value>) is neither NULL nor list of length %d"
 msgstr ""
 
-#: src/main/arithmetic.c:42
+#: src/main/arithmetic.c:42 src/main/eval.c:3633
 msgid "NaNs produced"
 msgstr ""
 
@@ -805,677 +818,722 @@ msgstr ""
 msgid "non-numeric argument to mathematical function"
 msgstr ""
 
-#: src/main/arithmetic.c:187
+#: src/main/arithmetic.c:186
 msgid "probable complete loss of accuracy in modulus"
 msgstr ""
 
-#: src/main/arithmetic.c:337
+#: src/main/arithmetic.c:298
 msgid "NAs produced by integer overflow"
 msgstr ""
 
-#: src/main/arithmetic.c:538
+#: src/main/arithmetic.c:499
 msgid "operator needs one or two arguments"
 msgstr ""
 
-#: src/main/arithmetic.c:554
+#: src/main/arithmetic.c:515
 msgid "non-numeric argument to binary operator"
 msgstr ""
 
-#: src/main/arithmetic.c:615 src/main/relop.c:227
+#: src/main/arithmetic.c:576 src/main/relop.c:221
 msgid "non-conformable arrays"
 msgstr ""
 
-#: src/main/arithmetic.c:658
+#: src/main/arithmetic.c:619
 msgid "non-conformable time-series"
 msgstr ""
 
-#: src/main/arithmetic.c:680 src/main/logic.c:143 src/main/relop.c:166
-#: src/main/relop.c:265
+#: src/main/arithmetic.c:641 src/main/logic.c:135 src/main/relop.c:160
+#: src/main/relop.c:259
 msgid "longer object length is not a multiple of shorter object length"
 msgstr ""
 
-#: src/main/arithmetic.c:751
+#: src/main/arithmetic.c:712
 msgid "invalid argument to unary operator"
-msgstr ""
+msgstr "ugyldig arguemnt for unær-operator"
 
-#: src/main/arithmetic.c:780 src/main/arithmetic.c:805
-#: src/main/arithmetic.c:824
+#: src/main/arithmetic.c:741 src/main/arithmetic.c:766
+#: src/main/arithmetic.c:785
 msgid "invalid unary operator"
-msgstr ""
+msgstr "ugyldig unær-operator"
 
-#: src/main/arithmetic.c:1241
+#: src/main/arithmetic.c:1191
 msgid "unimplemented real function of 1 argument"
 msgstr ""
 
-#: src/main/arithmetic.c:1255 src/main/complex.c:648 src/main/complex.c:718
+#: src/main/arithmetic.c:1205 src/main/complex.c:638 src/main/complex.c:708
 msgid "unimplemented complex function"
 msgstr ""
 
-#: src/main/arithmetic.c:1526 src/main/arithmetic.c:1877
-#: src/main/arithmetic.c:2056 src/main/arithmetic.c:2168
+#: src/main/arithmetic.c:1484 src/main/arithmetic.c:1877
+#: src/main/arithmetic.c:2049 src/main/arithmetic.c:2152
 #, c-format
 msgid "unimplemented real function of %d numeric arguments"
 msgstr ""
 
-#: src/main/arithmetic.c:1552
+#: src/main/arithmetic.c:1511
 #, c-format
-msgid "%d arguments passed to '%s' which requires 1 or 2"
-msgstr ""
+msgid "%d argument passed to '%s' which requires 1 or 2 arguments"
+msgid_plural "%d arguments passed to '%s'which requires 1 or 2 arguments"
+msgstr[0] "%d argument sendt til '%s' som kræver 1 eller 2 argumenter"
+msgstr[1] "%d argumenter sendt til '%s' som kræver 1 eller 2 argumenter"
 
-#: src/main/arithmetic.c:1570
+#: src/main/arithmetic.c:1530
 msgid "invalid second argument of length 0"
 msgstr ""
 
-#: src/main/arithmetic.c:1639
-msgid "invalid argument 'base' of length 0"
+#: src/main/arithmetic.c:1625 src/main/arithmetic.c:1643 src/main/envir.c:1464
+#: src/main/envir.c:1972 src/main/eval.c:630 src/main/eval.c:4237
+#, c-format
+msgid "argument \"%s\" is missing, with no default"
 msgstr ""
 
-#: src/main/arithmetic.c:1647
-#, c-format
-msgid "%d arguments passed to 'log' which requires 1 or 2"
+#: src/main/arithmetic.c:1649
+msgid "invalid argument 'base' of length 0"
 msgstr ""
 
-#: src/main/array.c:79 src/main/array.c:1441
+#: src/main/array.c:82 src/main/array.c:1591
 #, c-format
 msgid "'data' must be of a vector type, was '%s'"
 msgstr ""
 
-#: src/main/array.c:94 src/main/array.c:102
+#: src/main/array.c:97 src/main/array.c:105
 msgid "non-numeric matrix extent"
 msgstr ""
 
-#: src/main/array.c:97 src/main/array.c:1535
+#: src/main/array.c:100 src/main/array.c:1695
 msgid "invalid 'nrow' value (too large or NA)"
 msgstr ""
 
-#: src/main/array.c:99 src/main/array.c:1537
+#: src/main/array.c:102 src/main/array.c:1697
 msgid "invalid 'nrow' value (< 0)"
 msgstr ""
 
-#: src/main/array.c:105 src/main/array.c:1540
+#: src/main/array.c:108 src/main/array.c:1700
 msgid "invalid 'ncol' value (too large or NA)"
 msgstr ""
 
-#: src/main/array.c:107 src/main/array.c:1542
+#: src/main/array.c:110 src/main/array.c:1702
 msgid "invalid 'ncol' value (< 0)"
 msgstr ""
 
-#: src/main/array.c:116
+#: src/main/array.c:119
 msgid "nc = 0 for non-null data"
 msgstr ""
 
-#: src/main/array.c:124
+#: src/main/array.c:127
 msgid "nr = 0 for non-null data"
 msgstr ""
 
-#: src/main/array.c:135
+#: src/main/array.c:138
 #, c-format
 msgid ""
 "data length [%d] is not a sub-multiple or multiple of the number of rows [%d]"
 msgstr ""
 
-#: src/main/array.c:138
+#: src/main/array.c:141
 #, c-format
 msgid ""
 "data length [%d] is not a sub-multiple or multiple of the number of columns "
 "[%d]"
 msgstr ""
 
-#: src/main/array.c:141
+#: src/main/array.c:144
 msgid "data length exceeds size of matrix"
 msgstr ""
 
-#: src/main/array.c:147 src/main/array.c:1453 src/main/array.c:1549
+#: src/main/array.c:150 src/main/array.c:1603 src/main/array.c:1709
 msgid "too many elements specified"
 msgstr ""
 
-#: src/main/array.c:205
+#: src/main/array.c:208
 msgid "negative extents to matrix"
 msgstr ""
 
-#: src/main/array.c:208
+#: src/main/array.c:211
 msgid "allocMatrix: too many elements specified"
 msgstr ""
 
-#: src/main/array.c:236
+#: src/main/array.c:239
 msgid "negative extents to 3D array"
 msgstr ""
 
-#: src/main/array.c:239
+#: src/main/array.c:242
 msgid "'alloc3Darray': too many elements specified"
 msgstr ""
 
-#: src/main/array.c:264
+#: src/main/array.c:267
 msgid "'allocArray': too many elements specified by 'dims'"
 msgstr ""
 
-#: src/main/array.c:448
+#: src/main/array.c:523
+#, fuzzy, c-format
+msgid "'%s' must be a list or atomic vector"
+msgstr "'%s' skal være en liste"
+
+#: src/main/array.c:561
 #, c-format
 msgid "a matrix-like object is required as argument to '%s'"
 msgstr ""
 
-#: src/main/array.c:662
+#: src/main/array.c:776
 msgid "requires numeric/complex matrix/vector arguments"
 msgstr ""
 
-#: src/main/array.c:752 src/main/array.c:756 src/main/array.c:760
+#: src/main/array.c:886 src/main/array.c:890 src/main/array.c:894
 msgid "non-conformable arguments"
 msgstr ""
 
-#: src/main/array.c:1058
+#: src/main/array.c:1193
 msgid "argument is not a matrix"
 msgstr ""
 
-#: src/main/array.c:1093
+#: src/main/array.c:1228
 msgid "invalid first argument, must be an array"
 msgstr ""
 
-#: src/main/array.c:1107
+#: src/main/array.c:1242
 #, c-format
 msgid "'perm' is of wrong length %d (!= %d)"
 msgstr ""
 
-#: src/main/array.c:1112 src/main/array.c:1115
+#: src/main/array.c:1247 src/main/array.c:1250
 msgid "'a' does not have named dimnames"
 msgstr ""
 
-#: src/main/array.c:1122
+#: src/main/array.c:1257
 #, c-format
 msgid "'perm[%d]' does not match a dimension name"
 msgstr ""
 
-#: src/main/array.c:1135
+#: src/main/array.c:1270
 msgid "value out of range in 'perm'"
 msgstr ""
 
-#: src/main/array.c:1217
+#: src/main/array.c:1352
 msgid "'resize' must be TRUE or FALSE"
 msgstr ""
 
-#: src/main/array.c:1275
+#: src/main/array.c:1422
 msgid "'x' must be numeric"
 msgstr "'x' skal være numerisk"
 
-#: src/main/array.c:1449
+#: src/main/array.c:1425
+#, fuzzy
+msgid "'x' is too short"
+msgstr "'object' er for kort"
+
+#: src/main/array.c:1599
 msgid "'dims' cannot be of length 0"
 msgstr "'dims' kan ikke have længden 0"
 
-#: src/main/array.c:1545
+#: src/main/array.c:1705
 msgid "'x' must have positive length"
 msgstr "'x' skal have en positiv længde"
 
-#: src/main/array.c:1605
+#: src/main/array.c:1771
 #, c-format
 msgid "singular matrix in 'backsolve'. First zero in diagonal [%d]"
 msgstr ""
 
-#: src/main/attrib.c:40 src/main/attrib.c:235 src/main/attrib.c:269
-#: src/main/attrib.c:291 src/main/attrib.c:405 src/main/attrib.c:452
-#: src/main/attrib.c:502
+#: src/main/attrib.c:40 src/main/attrib.c:231 src/main/attrib.c:265
+#: src/main/attrib.c:287 src/main/attrib.c:403 src/main/attrib.c:450
+#: src/main/attrib.c:501
 msgid "attempt to set an attribute on NULL"
 msgstr ""
 
-#: src/main/attrib.c:72
+#: src/main/attrib.c:77
 #, c-format
 msgid "row names must be 'character' or 'integer', not '%s'"
 msgstr "rækkenavne skal være 'character' eller 'integer', ikke '%s'"
 
-#: src/main/attrib.c:124
+#: src/main/attrib.c:130
 #, c-format
 msgid "getAttrib: invalid type (%s) for TAG"
 msgstr ""
 
-#: src/main/attrib.c:379
+#: src/main/attrib.c:377
 #, c-format
 msgid "invalid type (%s) for 'names': must be vector"
 msgstr ""
 
-#: src/main/attrib.c:382
+#: src/main/attrib.c:380
 #, c-format
 msgid "'names' attribute [%d] must be the same length as the vector [%d]"
 msgstr ""
 
-#: src/main/attrib.c:387
+#: src/main/attrib.c:385
 msgid "names() applied to a non-vector"
 msgstr ""
 
-#: src/main/attrib.c:395
+#: src/main/attrib.c:393
 msgid "invalid time series parameters specified"
 msgstr ""
 
-#: src/main/attrib.c:409
+#: src/main/attrib.c:407
 msgid "'tsp' attribute must be numeric"
 msgstr ""
 
-#: src/main/attrib.c:415
+#: src/main/attrib.c:413
 msgid "'tsp' attribute must be numeric of length three"
 msgstr ""
 
-#: src/main/attrib.c:432
+#: src/main/attrib.c:430
 msgid "cannot assign 'tsp' to zero-length vector"
 msgstr ""
 
-#: src/main/attrib.c:463
+#: src/main/attrib.c:461
 msgid "attempt to set invalid 'comment' attribute"
 msgstr ""
 
-#: src/main/attrib.c:511
+#: src/main/attrib.c:510
 msgid "adding class \"factor\" to an invalid object"
 msgstr ""
 
-#: src/main/attrib.c:519
+#: src/main/attrib.c:541
 msgid "attempt to set invalid 'class' attribute"
 msgstr ""
 
-#: src/main/attrib.c:777
+#: src/main/attrib.c:872
 #, c-format
 msgid "class '%s' has no 'names' slot"
 msgstr ""
 
-#: src/main/attrib.c:779
+#: src/main/attrib.c:874
 #, c-format
 msgid ""
 "class '%s' has no 'names' slot; assigning a names attribute will create an "
 "invalid object"
 msgstr ""
 
-#: src/main/attrib.c:782
+#: src/main/attrib.c:877
 #, c-format
 msgid ""
 "invalid to use names()<- to set the 'names' slot in a non-vector class ('%s')"
 msgstr ""
 
-#: src/main/attrib.c:812
+#: src/main/attrib.c:907
 msgid "incompatible 'names' argument"
 msgstr ""
 
-#: src/main/attrib.c:867
+#: src/main/attrib.c:962
 #, c-format
 msgid "invalid type (%s) to set 'names' attribute"
 msgstr ""
 
-#: src/main/attrib.c:938
+#: src/main/attrib.c:1035
 msgid "'dimnames' applied to non-array"
 msgstr ""
 
-#: src/main/attrib.c:943
-msgid "'dimnames' must be a list"
-msgstr ""
+#: src/main/attrib.c:1040 src/main/coerce.c:2471
+#, c-format
+msgid "'%s' must be a list"
+msgstr "'%s' skal være en liste"
 
-#: src/main/attrib.c:946 src/main/attrib.c:974
+#: src/main/attrib.c:1043 src/main/attrib.c:1071
 #, c-format
 msgid "length of 'dimnames' [%d] must match that of 'dims' [%d]"
 msgstr ""
 
-#: src/main/attrib.c:980
+#: src/main/attrib.c:1077
 #, c-format
 msgid "invalid type (%s) for 'dimnames' (must be a vector)"
 msgstr ""
 
-#: src/main/attrib.c:983
+#: src/main/attrib.c:1080
 #, c-format
 msgid "length of 'dimnames' [%d] not equal to array extent"
 msgstr ""
 
-#: src/main/attrib.c:1055 src/main/builtin.c:75 src/main/builtin.c:112
-#: src/main/envir.c:1606 src/main/envir.c:1734 src/main/envir.c:1796
-#: src/main/envir.c:1918 src/main/paste.c:74 src/main/paste.c:293
-#: src/main/random.c:487 src/main/random.c:516 src/main/unique.c:1749
+#: src/main/attrib.c:1152 src/main/builtin.c:75 src/main/builtin.c:112
+#: src/main/envir.c:1740 src/main/envir.c:1868 src/main/envir.c:1928
+#: src/main/envir.c:2065 src/main/paste.c:74 src/main/paste.c:293
+#: src/main/random.c:479 src/main/random.c:508 src/main/unique.c:1746
 msgid "invalid first argument"
 msgstr ""
 
-#: src/main/attrib.c:1058
+#: src/main/attrib.c:1155
 msgid "invalid second argument"
 msgstr ""
 
-#: src/main/attrib.c:1066
+#: src/main/attrib.c:1163
 msgid "length-0 dimension vector is invalid"
 msgstr ""
 
-#: src/main/attrib.c:1071
+#: src/main/attrib.c:1168
 msgid "the dims contain missing values"
 msgstr ""
 
-#: src/main/attrib.c:1073
+#: src/main/attrib.c:1170
 msgid "the dims contain negative values"
 msgstr ""
 
-#: src/main/attrib.c:1078
+#: src/main/attrib.c:1175
 msgid "dims do not match the length of object"
 msgstr ""
 
-#: src/main/attrib.c:1080
+#: src/main/attrib.c:1177
 #, c-format
 msgid "dims [product %d] do not match the length of object [%d]"
 msgstr ""
 
-#: src/main/attrib.c:1177
+#: src/main/attrib.c:1284
 msgid "attributes must be a list or NULL"
 msgstr ""
 
-#: src/main/attrib.c:1182
+#: src/main/attrib.c:1289
 msgid "attributes must be named"
-msgstr ""
+msgstr "attributter skal være navngivet"
 
-#: src/main/attrib.c:1186
+#: src/main/attrib.c:1293
 #, c-format
 msgid "all attributes must have names [%d does not]"
 msgstr ""
 
-#: src/main/attrib.c:1285
+#: src/main/attrib.c:1393
 msgid "'which' must be of mode character"
 msgstr ""
 
-#: src/main/attrib.c:1287
+#: src/main/attrib.c:1395
 msgid "exactly one attribute 'which' must be given"
 msgstr ""
 
-#: src/main/attrib.c:1345 src/main/attrib.c:1368 src/main/subscript.c:240
-#: src/main/subscript.c:244 src/main/subset.c:1188 src/main/subset.c:1239
+#: src/main/attrib.c:1456 src/main/attrib.c:1479 src/main/subscript.c:245
+#: src/main/subscript.c:249 src/main/subset.c:1257 src/main/subset.c:1311
 #, c-format
 msgid "partial match of '%s' to '%s'"
 msgstr ""
 
-#: src/main/attrib.c:1406
+#: src/main/attrib.c:1525
 #, c-format
 msgid "invalid type '%s' for slot name"
 msgstr "ugyldig type '%s' for pladsnavn"
 
-#: src/main/attrib.c:1444
+#: src/main/attrib.c:1563
 msgid "'name' must be non-null character string"
 msgstr ""
 
-#: src/main/attrib.c:1568 src/main/attrib.c:1639 src/main/attrib.c:1676
+#: src/main/attrib.c:1688 src/main/attrib.c:1759 src/main/attrib.c:1797
 msgid "invalid type or length for slot name"
 msgstr ""
 
-#: src/main/attrib.c:1602
+#: src/main/attrib.c:1722
 #, c-format
 msgid "cannot get a slot (\"%s\") from an object of type \"%s\""
 msgstr ""
 
-#: src/main/attrib.c:1613
+#: src/main/attrib.c:1733
 #, c-format
 msgid "no slot of name \"%s\" for this object of class \"%s\""
 msgstr ""
 
-#: src/main/attrib.c:1630
+#: src/main/attrib.c:1750
 msgid "attempt to set slot on NULL object"
 msgstr ""
 
-#: src/main/attrib.c:1671
+#: src/main/attrib.c:1792
 msgid "formal classes cannot be used without the 'methods' package"
 msgstr ""
 
-#: src/main/attrib.c:1683
+#: src/main/attrib.c:1804
 #, c-format
 msgid ""
 "trying to get slot \"%s\" from an object of a basic class (\"%s\") with no "
 "slots"
 msgstr ""
 
-#: src/main/attrib.c:1687
+#: src/main/attrib.c:1808
 #, c-format
 msgid ""
 "trying to get slot \"%s\" from an object (class \"%s\") that is not an S4 "
 "object "
 msgstr ""
 
-#: src/main/bind.c:161
+#: src/main/bind.c:164
 #, c-format
 msgid "resulting vector exceeds vector length limit in '%s'"
 msgstr ""
 
-#: src/main/bind.c:291 src/main/bind.c:327 src/main/bind.c:376
-#: src/main/bind.c:449 src/main/bind.c:477
+#: src/main/bind.c:294 src/main/bind.c:330 src/main/bind.c:379
+#: src/main/bind.c:452 src/main/bind.c:480
 #, c-format
 msgid "type '%s' is unimplemented in '%s'"
-msgstr ""
+msgstr "type '%s' er ikke implementeret i '%s'"
 
-#: src/main/bind.c:685
+#: src/main/bind.c:688
 msgid "repeated formal argument 'recursive'"
 msgstr ""
 
-#: src/main/bind.c:696
+#: src/main/bind.c:699
 msgid "repeated formal argument 'use.names'"
 msgstr ""
 
-#: src/main/bind.c:894
+#: src/main/bind.c:900
 msgid "argument not a list"
 msgstr ""
 
-#: src/main/bind.c:1038 src/main/eval.c:2691 src/main/eval.c:2700
-#: src/main/objects.c:318 src/main/objects.c:354 src/main/objects.c:729
-#: src/main/objects.c:746 src/main/objects.c:753
+#: src/main/bind.c:1044 src/main/names.c:1273 src/main/names.c:1278
+#: src/main/names.c:1283 src/main/names.c:1288
 #, c-format
 msgid "class name too long in '%s'"
 msgstr "klassenavnet er for langt i '%s'"
 
-#: src/main/bind.c:1114
+#: src/main/bind.c:1128
 #, c-format
 msgid "cannot create a matrix from type '%s'"
 msgstr "kan ikke oprette en matrix fra typen '%s'"
 
-#: src/main/bind.c:1185
+#: src/main/bind.c:1198
 #, c-format
 msgid "number of rows of matrices must match (see arg %d)"
 msgstr ""
 
-#: src/main/bind.c:1430
+#: src/main/bind.c:1455
 #, c-format
 msgid "number of columns of matrices must match (see arg %d)"
 msgstr ""
 
 #: src/main/builtin.c:43
 msgid "vector size cannot be NA"
-msgstr ""
+msgstr "vektorstørrelse kan ikke være NA"
 
-#: src/main/builtin.c:49 src/main/builtin.c:57 src/main/sort.c:1303
+#: src/main/builtin.c:49 src/main/builtin.c:57 src/main/sort.c:1323
 msgid "vector size cannot be NA/NaN"
 msgstr ""
 
-#: src/main/builtin.c:50 src/main/builtin.c:58 src/main/sort.c:1304
+#: src/main/builtin.c:50 src/main/builtin.c:58 src/main/sort.c:1324
 msgid "vector size cannot be infinite"
 msgstr ""
 
-#: src/main/builtin.c:51 src/main/builtin.c:59 src/main/builtin.c:916
-#: src/main/sort.c:1305
+#: src/main/builtin.c:51 src/main/builtin.c:59 src/main/builtin.c:950
+#: src/main/sort.c:1325
 msgid "vector size specified is too large"
 msgstr ""
 
-#: src/main/builtin.c:84 src/main/builtin.c:93 src/main/builtin.c:293
-#: src/main/builtin.c:326 src/main/builtin.c:365 src/main/builtin.c:375
-#: src/main/coerce.c:1537 src/main/connections.c:3066 src/main/engine.c:2967
-#: src/main/envir.c:993 src/main/envir.c:1046 src/main/envir.c:1136
-#: src/main/envir.c:1615 src/main/envir.c:1739 src/main/envir.c:1807
-#: src/main/envir.c:1925 src/main/envir.c:2582 src/main/envir.c:2642
-#: src/main/envir.c:2922 src/main/envir.c:2951 src/main/envir.c:2972
-#: src/main/envir.c:2995 src/main/envir.c:3030 src/main/envir.c:3051
-#: src/main/envir.c:3357 src/main/envir.c:3362 src/main/eval.c:5318
-#: src/main/objects.c:197 src/main/objects.c:203 src/main/saveload.c:2070
-#: src/main/saveload.c:2364 src/main/serialize.c:2709
+#: src/main/builtin.c:84 src/main/builtin.c:93 src/main/builtin.c:304
+#: src/main/builtin.c:337 src/main/builtin.c:394 src/main/builtin.c:408
+#: src/main/coerce.c:1536 src/main/connections.c:3062 src/main/engine.c:2987
+#: src/main/envir.c:1001 src/main/envir.c:1054 src/main/envir.c:1210
+#: src/main/envir.c:1749 src/main/envir.c:1873 src/main/envir.c:1939
+#: src/main/envir.c:2072 src/main/envir.c:2791 src/main/envir.c:2877
+#: src/main/envir.c:3182 src/main/envir.c:3211 src/main/envir.c:3232
+#: src/main/envir.c:3255 src/main/envir.c:3290 src/main/envir.c:3311
+#: src/main/envir.c:3632 src/main/envir.c:3637 src/main/eval.c:6251
+#: src/main/objects.c:191 src/main/objects.c:199 src/main/saveload.c:2072
+#: src/main/saveload.c:2364 src/main/serialize.c:2755
 msgid "use of NULL environment is defunct"
-msgstr ""
+msgstr "brug af NULL-miljø er fejlramt"
 
-#: src/main/builtin.c:306
+#: src/main/builtin.c:250 src/main/builtin.c:263
+#, fuzzy
+msgid "argument is not a function"
+msgstr "argument må ikke være en funktion"
+
+#: src/main/builtin.c:317
 msgid "replacement object is not an environment"
-msgstr ""
+msgstr "erstatningsobjekt er ikke et miljø"
 
-#: src/main/builtin.c:331
+#: src/main/builtin.c:342
 msgid "'enclos' must be an environment"
-msgstr ""
+msgstr "'enclos' skal være et miljø"
 
-#: src/main/builtin.c:352 src/main/builtin.c:370
+#: src/main/builtin.c:363 src/main/builtin.c:399
 msgid "argument is not an environment"
-msgstr ""
+msgstr "argument er ikke et miljø"
 
-#: src/main/builtin.c:354
+#: src/main/builtin.c:365
 msgid "the empty environment has no parent"
-msgstr ""
+msgstr "det tomme miljø har ingen overdel"
 
-#: src/main/builtin.c:372
+#: src/main/builtin.c:401
 msgid "can not set parent of the empty environment"
-msgstr ""
+msgstr "kunne ikke angive overdel for tomt miljø"
 
-#: src/main/builtin.c:380
-msgid "'parent' is not an environment"
-msgstr ""
+#: src/main/builtin.c:403
+msgid "can not set the parent environment of a namespace"
+msgstr "kan ikke angive overmiljøet for et navnerum"
+
+#: src/main/builtin.c:405
+msgid "can not set the parent environment of package imports"
+msgstr "kan ikke angive overmiljøet for pakkeimport"
 
-#: src/main/builtin.c:521 src/main/connections.c:3691
-#: src/main/connections.c:4068 src/main/connections.c:4102
-#: src/main/connections.c:4480 src/main/connections.c:4550
-#: src/main/connections.c:4759 src/main/connections.c:4763
-#: src/main/connections.c:5124 src/main/deparse.c:360 src/main/deparse.c:446
-#: src/main/serialize.c:2006
+#: src/main/builtin.c:413
+msgid "'parent' is not an environment"
+msgstr "'parent' er ikke et miljø"
+
+#: src/main/builtin.c:556 src/main/connections.c:3687
+#: src/main/connections.c:4079 src/main/connections.c:4113
+#: src/main/connections.c:4491 src/main/connections.c:4561
+#: src/main/connections.c:4772 src/main/connections.c:4776
+#: src/main/connections.c:5199 src/main/deparse.c:369 src/main/deparse.c:458
+#: src/main/serialize.c:2045
 msgid "cannot write to this connection"
-msgstr ""
+msgstr "kan ikke skrive til denne forbindelse"
 
-#: src/main/builtin.c:526 src/main/builtin.c:556
+#: src/main/builtin.c:561 src/main/builtin.c:591
 #, c-format
 msgid "invalid '%s' specification"
-msgstr ""
+msgstr "ugyldig '%s'-specifikation"
 
-#: src/main/builtin.c:543
+#: src/main/builtin.c:578
 msgid "non-positive 'fill' argument will be ignored"
 msgstr ""
 
-#: src/main/builtin.c:618
+#: src/main/builtin.c:653
 #, c-format
 msgid "argument %d (type '%s') cannot be handled by 'cat'"
 msgstr ""
 
-#: src/main/builtin.c:763
+#: src/main/builtin.c:797
 #, c-format
 msgid "vector: cannot make a vector of mode '%s'."
 msgstr ""
 
-#: src/main/builtin.c:789
+#: src/main/builtin.c:823
 msgid "cannot set length of non-vector"
 msgstr ""
 
-#: src/main/builtin.c:897 src/main/builtin.c:907 src/main/options.c:637
+#: src/main/builtin.c:931 src/main/builtin.c:941 src/main/options.c:659
 msgid "invalid argument"
-msgstr ""
+msgstr "ugyldigt argument"
 
-#: src/main/builtin.c:899 src/main/builtin.c:909 src/main/builtin.c:911
-#: src/main/character.c:366 src/main/coerce.c:2765
+#: src/main/builtin.c:933 src/main/builtin.c:943 src/main/builtin.c:945
+#: src/main/character.c:525 src/main/coerce.c:2832
 msgid "invalid value"
-msgstr ""
+msgstr "ugyldig værdi"
 
-#: src/main/builtin.c:942 src/main/coerce.c:2478 src/main/coerce.c:2519
-#: src/main/eval.c:563 src/main/eval.c:683 src/main/eval.c:2099
-#: src/main/eval.c:2176 src/main/eval.c:2236 src/main/eval.c:2569
-#: src/main/eval.c:4694 src/main/eval.c:4814
+#: src/main/builtin.c:976 src/main/coerce.c:2541 src/main/coerce.c:2584
+#: src/main/eval.c:620 src/main/eval.c:740 src/main/eval.c:2266
+#: src/main/eval.c:2346 src/main/eval.c:2407 src/main/eval.c:2745
+#: src/main/eval.c:5584 src/main/eval.c:5701
 msgid "'...' used in an incorrect context"
 msgstr ""
 
-#: src/main/builtin.c:963
+#: src/main/builtin.c:998
 #, c-format
 msgid "duplicate 'switch' defaults: '%s' and '%s'"
 msgstr ""
 
-#: src/main/builtin.c:996
+#: src/main/builtin.c:1031
 msgid "'EXPR' is missing"
 msgstr ""
 
-#: src/main/builtin.c:1000 src/main/eval.c:5155
+#: src/main/builtin.c:1035 src/main/eval.c:6056
 msgid "EXPR must be a length 1 vector"
-msgstr ""
+msgstr "EXPR skal være en længde 1 vektor"
 
-#: src/main/builtin.c:1003
+#: src/main/builtin.c:1038 src/main/eval.c:6059
 #, c-format
 msgid ""
 "EXPR is a \"factor\", treated as integer.\n"
 " Consider using '%s' instead."
 msgstr ""
 
-#: src/main/character.c:105 src/main/character.c:108 src/main/character.c:132
-#: src/main/character.c:135
-#, c-format
-msgid "'%s' requires a character vector"
+#: src/main/builtin.c:1095 src/main/eval.c:6069 src/main/eval.c:6098
+msgid "'switch' with no alternatives"
 msgstr ""
 
-#: src/main/character.c:164
+#: src/main/character.c:103 src/main/character.c:224
+#, fuzzy, c-format
+msgid "%d argument passed to '%s' which requires %d to %d"
+msgid_plural "%d arguments passed to '%s' which requires %d to %d"
+msgstr[0] "%d argument sendt til '%s' som kræver 1 eller 2 argumenter"
+msgstr[1] "%d argumenter sendt til '%s' som kræver 1 eller 2 argumenter"
+
+#: src/main/character.c:110 src/main/character.c:113 src/main/character.c:232
+#: src/main/character.c:235
 #, c-format
-msgid ""
-"number of characters is not computable for element %d in \"bytes\" encoding"
+msgid "'%s' requires a character vector"
 msgstr ""
 
-#: src/main/character.c:169 src/main/character.c:197 src/main/character.c:653
-#: src/main/character.c:750
+#: src/main/character.c:150 src/main/character.c:165 src/main/character.c:175
+#: src/main/character.c:203
+#, fuzzy, c-format
+msgid "invalid multibyte string, %s"
+msgstr "ugyldige understrengsargumenter"
+
+#: src/main/character.c:159
 #, c-format
-msgid "invalid multibyte string %d"
+msgid "number of characters is not computable in \"bytes\" encoding, %s"
 msgstr ""
 
-#: src/main/character.c:185
+#: src/main/character.c:188
 #, c-format
-msgid "width is not computable for element %d in \"bytes\" encoding"
+msgid "width is not computable for %s in \"bytes\" encoding"
 msgstr ""
 
-#: src/main/character.c:263
+#: src/main/character.c:311
 msgid "extracting substrings from a non-character object"
 msgstr ""
 
-#: src/main/character.c:268 src/main/character.c:363
+#: src/main/character.c:321 src/main/character.c:522
 msgid "invalid substring arguments"
 msgstr "ugyldige understrengsargumenter"
 
-#: src/main/character.c:358
+#: src/main/character.c:361
+msgid "non-character object(s)"
+msgstr ""
+
+#: src/main/character.c:517
 msgid "replacing substrings in a non-character object"
 msgstr ""
 
-#: src/main/character.c:551
+#: src/main/character.c:785
 msgid "the first argument must be a character vector"
 msgstr ""
 
-#: src/main/character.c:570
+#: src/main/character.c:822
 msgid "abbreviate used with non-ASCII chars"
 msgstr ""
 
-#: src/main/character.c:591
+#: src/main/character.c:843
 msgid "non-character names"
 msgstr ""
 
-#: src/main/character.c:696 src/main/grep.c:159
+#: src/main/character.c:905 src/main/character.c:1002
+#, c-format
+msgid "invalid multibyte string %d"
+msgstr ""
+
+#: src/main/character.c:948 src/main/grep.c:163
 msgid "non-character argument"
 msgstr ""
 
-#: src/main/character.c:805
+#: src/main/character.c:1057
 #, c-format
 msgid "decreasing range specification ('%lc-%lc')"
 msgstr ""
 
-#: src/main/character.c:891
+#: src/main/character.c:1143
 #, c-format
 msgid "decreasing range specification ('%c-%c')"
 msgstr ""
 
-#: src/main/character.c:1079
+#: src/main/character.c:1331
 msgid "invalid UTF-8 string 'old'"
 msgstr ""
 
-#: src/main/character.c:1085
+#: src/main/character.c:1337
 msgid "invalid multibyte string 'old'"
 msgstr ""
 
-#: src/main/character.c:1098
+#: src/main/character.c:1350
 msgid "invalid UTF-8 string 'new'"
 msgstr ""
 
-#: src/main/character.c:1104
+#: src/main/character.c:1356
 msgid "invalid multibyte string 'new'"
 msgstr ""
 
-#: src/main/character.c:1132 src/main/character.c:1221
+#: src/main/character.c:1384 src/main/character.c:1473
 msgid "'old' is longer than 'new'"
 msgstr ""
 
-#: src/main/character.c:1164
+#: src/main/character.c:1416
 #, c-format
 msgid "invalid input multibyte string %d"
 msgstr ""
 
-#: src/main/character.c:1271
+#: src/main/character.c:1523
 msgid "strtrim() requires a character vector"
 msgstr ""
 
@@ -1487,15 +1545,15 @@ msgstr ""
 msgid "applies only to lists and vectors"
 msgstr ""
 
-#: src/main/coerce.c:77 src/main/errors.c:1208
+#: src/main/coerce.c:77 src/main/errors.c:1194
 msgid "NAs introduced by coercion"
 msgstr ""
 
-#: src/main/coerce.c:79 src/main/errors.c:1209
-msgid "inaccurate integer conversion in coercion"
+#: src/main/coerce.c:79
+msgid "NAs introduced by coercion to integer range"
 msgstr ""
 
-#: src/main/coerce.c:81 src/main/errors.c:1210
+#: src/main/coerce.c:81 src/main/errors.c:1196
 msgid "imaginary parts discarded in coercion"
 msgstr ""
 
@@ -1503,59 +1561,63 @@ msgstr ""
 msgid "out-of-range values treated as 0 in coercion to raw"
 msgstr ""
 
-#: src/main/coerce.c:414
+#: src/main/coerce.c:399
 #, c-format
 msgid "invalid data of mode '%s' (too short)"
-msgstr ""
+msgstr "ugyldige data for tilstand '%s' (for kort)"
 
-#: src/main/coerce.c:1016
+#: src/main/coerce.c:1002
 #, c-format
 msgid "'pairlist' object cannot be coerced to type '%s'"
 msgstr ""
 
-#: src/main/coerce.c:1134
+#: src/main/coerce.c:1120
 #, c-format
 msgid "(list) object cannot be coerced to type '%s'"
 msgstr ""
 
-#: src/main/coerce.c:1157
+#: src/main/coerce.c:1143
 #, c-format
 msgid "(symbol) object cannot be coerced to type '%s'"
 msgstr ""
 
-#: src/main/coerce.c:1173 src/main/coerce.c:1485
+#: src/main/coerce.c:1159 src/main/coerce.c:1484
 msgid "no method for coercing this S4 class to a vector"
 msgstr ""
 
-#: src/main/coerce.c:1232
+#: src/main/coerce.c:1222
 msgid "environments cannot be coerced to other types"
 msgstr ""
 
-#: src/main/coerce.c:1379
+#: src/main/coerce.c:1374
 msgid "attempting to coerce non-factor"
 msgstr ""
 
-#: src/main/coerce.c:1533
+#: src/main/coerce.c:1379 src/main/coerce.c:1389
+msgid "malformed factor"
+msgstr ""
+
+#: src/main/coerce.c:1532
 msgid "list argument expected"
 msgstr ""
 
-#: src/main/coerce.c:1541 src/main/eval.c:5322
+#: src/main/coerce.c:1540 src/main/eval.c:6255
 msgid "invalid environment"
 msgstr ""
 
-#: src/main/coerce.c:1545
+#: src/main/coerce.c:1544
 msgid "argument must have length at least 1"
 msgstr ""
 
-#: src/main/coerce.c:1567
+#: src/main/coerce.c:1566
 msgid "invalid body for function"
 msgstr ""
 
-#: src/main/coerce.c:1590
+#: src/main/coerce.c:1589
 msgid "invalid length 0 argument"
 msgstr ""
 
-#: src/main/coerce.c:1605
+#: src/main/coerce.c:1604
 msgid "invalid argument list"
 msgstr ""
 
@@ -1567,812 +1629,808 @@ msgstr ""
 msgid "unimplemented predicate"
 msgstr ""
 
-#: src/main/coerce.c:2069
+#: src/main/coerce.c:2070
 #, c-format
 msgid "%s() applied to non-(list or vector) of type '%s'"
 msgstr ""
 
-#: src/main/coerce.c:2212 src/main/coerce.c:2275 src/main/coerce.c:2343
+#: src/main/coerce.c:2267 src/main/coerce.c:2331 src/main/coerce.c:2403
 #, c-format
 msgid "default method not implemented for type '%s'"
-msgstr ""
+msgstr "standardmetode er endnu ikke implementeret for type '%s'"
 
-#: src/main/coerce.c:2361
+#: src/main/coerce.c:2425
 msgid "'name' is missing"
-msgstr ""
+msgstr "'name' mangler"
 
-#: src/main/coerce.c:2368
+#: src/main/coerce.c:2432
 msgid "first argument must be a character string"
-msgstr ""
+msgstr "første argument skal være en tegnstreng"
 
-#: src/main/coerce.c:2401
-msgid "'what' must be a character string or a function"
-msgstr ""
+#: src/main/coerce.c:2464
+#, fuzzy
+msgid "'what' must be a function or character string"
+msgstr "'type' skal være en tegnstreng"
 
-#: src/main/coerce.c:2405
+#: src/main/coerce.c:2468
 msgid "'args' must be a list or expression"
 msgstr "'args' skal være en liste eller et udtryk"
 
-#: src/main/coerce.c:2408
-msgid "'args' must be a list"
-msgstr "'args' skal være en liste"
-
-#: src/main/coerce.c:2412
+#: src/main/coerce.c:2475 src/main/unique.c:1345
 msgid "'envir' must be an environment"
 msgstr "'envir' skal være et miljø"
 
-#: src/main/coerce.c:2567
+#: src/main/coerce.c:2634
 msgid "invalid environment specified"
 msgstr "ugyldigt miljø angivet"
 
-#: src/main/coerce.c:2633
+#: src/main/coerce.c:2700
 msgid "Setting class(x) to NULL;   result will no longer be an S4 object"
 msgstr ""
 
-#: src/main/coerce.c:2636
+#: src/main/coerce.c:2703
 #, c-format
 msgid ""
 "Setting class(x) to multiple strings (\"%s\", \"%s\", ...); result will no "
 "longer be an S4 object"
 msgstr ""
 
-#: src/main/coerce.c:2640
+#: src/main/coerce.c:2707
 #, c-format
 msgid ""
 "Setting class(x) to \"%s\" sets attribute to NULL; result will no longer be "
 "an S4 object"
 msgstr ""
 
-#: src/main/coerce.c:2673
+#: src/main/coerce.c:2740
 msgid "invalid replacement object to be a class string"
 msgstr ""
 
-#: src/main/coerce.c:2694
+#: src/main/coerce.c:2761
 #, c-format
 msgid ""
 "\"%s\" can only be set as the class if the object has this type; found \"%s\""
 msgstr ""
 
-#: src/main/coerce.c:2712
+#: src/main/coerce.c:2779
 #, c-format
 msgid ""
 "invalid to set the class to matrix unless the dimension attribute is of "
 "length 2 (was %d)"
 msgstr ""
 
-#: src/main/coerce.c:2720
+#: src/main/coerce.c:2787
 msgid ""
 "cannot set class to \"array\" unless the dimension attribute has length > 0"
 msgstr ""
 
-#: src/main/coerce.c:2756
+#: src/main/coerce.c:2823
 msgid "'value' must be non-null character string"
 msgstr ""
 
-#: src/main/coerce.c:2769
+#: src/main/coerce.c:2836
 msgid "invalid to change the storage mode of a factor"
 msgstr ""
 
-#: src/main/complex.c:126
+#: src/main/complex.c:123
 msgid "invalid complex unary operator"
-msgstr ""
+msgstr "ugyldig kompleks unær-operator"
 
-#: src/main/complex.c:261
+#: src/main/complex.c:251
 msgid "unimplemented complex operation"
 msgstr ""
 
-#: src/main/complex.c:363
+#: src/main/complex.c:353
 msgid "non-numeric argument to function"
 msgstr ""
 
-#: src/main/complex.c:827
+#: src/main/complex.c:822
 msgid "invalid polynomial coefficient"
 msgstr ""
 
-#: src/main/complex.c:832
+#: src/main/complex.c:827
 msgid "root finding code failed"
 msgstr ""
 
-#: src/main/connections.c:153
+#: src/main/connections.c:150
 msgid "all connections are in use"
-msgstr ""
+msgstr "alle forbindelser er i brug"
 
-#: src/main/connections.c:164
+#: src/main/connections.c:161
 msgid "connection not found"
-msgstr ""
+msgstr "forbindelse ikke fundet"
 
-#: src/main/connections.c:175
+#: src/main/connections.c:172 src/main/connections.c:5213
 msgid "invalid connection"
-msgstr ""
+msgstr "ugyldig forbindelse"
 
-#: src/main/connections.c:207
+#: src/main/connections.c:204
 #, c-format
 msgid "closing unused connection %d (%s)\n"
-msgstr ""
+msgstr "lukker ubrugt forbindelse %d (%s)\n"
 
-#: src/main/connections.c:232 src/main/sysutils.c:619 src/main/sysutils.c:806
-#: src/main/sysutils.c:821 src/main/sysutils.c:912 src/main/sysutils.c:927
-#: src/main/sysutils.c:1023 src/main/sysutils.c:1096 src/main/sysutils.c:1106
-#: src/main/sysutils.c:1119 src/main/sysutils.c:1516
+#: src/main/connections.c:229 src/main/sysutils.c:631 src/main/sysutils.c:834
+#: src/main/sysutils.c:849 src/main/sysutils.c:978 src/main/sysutils.c:1051
+#: src/main/sysutils.c:1061 src/main/sysutils.c:1074 src/main/sysutils.c:1472
 #, c-format
 msgid "unsupported conversion from '%s' to '%s'"
 msgstr ""
 
-#: src/main/connections.c:288 src/main/connections.c:304
-#: src/main/connections.c:456 src/main/connections.c:462
-#: src/main/connections.c:468 src/main/connections.c:479
-#: src/main/connections.c:486
+#: src/main/connections.c:285 src/main/connections.c:300
+#: src/main/connections.c:451 src/main/connections.c:456
+#: src/main/connections.c:461 src/main/connections.c:472
+#: src/main/connections.c:478
 #, c-format
 msgid "%s not enabled for this connection"
-msgstr ""
+msgstr "%s ikke aktiveret for denne forbindelse"
 
-#: src/main/connections.c:335 src/main/connections.c:352
-#: src/main/connections.c:2916
+#: src/main/connections.c:330 src/main/connections.c:347
+#: src/main/connections.c:2910
 msgid "printing of extremely long output is truncated"
 msgstr ""
 
-#: src/main/connections.c:375
+#: src/main/connections.c:370
 msgid "invalid char string in output conversion"
 msgstr ""
 
-#: src/main/connections.c:439
+#: src/main/connections.c:434
 #, c-format
 msgid "invalid input found on input connection '%s'"
 msgstr ""
 
-#: src/main/connections.c:580
+#: src/main/connections.c:571
 #, c-format
 msgid "cannot open file '%ls': %s"
 msgstr "kan ikke åbne filen '%ls': %s"
 
-#: src/main/connections.c:691
+#: src/main/connections.c:683
 msgid "connection is not open for reading"
 msgstr "forbindelse er ikke åben for læsning"
 
-#: src/main/connections.c:696
+#: src/main/connections.c:688
 msgid "connection is not open for writing"
 msgstr "forbindelse er ikke åben for skrivning"
 
-#: src/main/connections.c:734 src/main/connections.c:2229
+#: src/main/connections.c:726 src/main/connections.c:2223
 msgid "can only truncate connections open for writing"
 msgstr ""
 
-#: src/main/connections.c:738 src/main/connections.c:740
+#: src/main/connections.c:730 src/main/connections.c:732
 msgid "file truncation failed"
 msgstr ""
 
-#: src/main/connections.c:742
+#: src/main/connections.c:734
 msgid "file truncation unavailable on this platform"
 msgstr ""
 
-#: src/main/connections.c:788 src/main/connections.c:792
-#: src/main/connections.c:798 src/main/connections.c:815
+#: src/main/connections.c:780 src/main/connections.c:784
+#: src/main/connections.c:790 src/main/connections.c:807
 msgid "allocation of file connection failed"
 msgstr ""
 
-#: src/main/connections.c:866 src/main/connections.c:1044
+#: src/main/connections.c:858 src/main/connections.c:1035
 #, c-format
 msgid "cannot create fifo '%s', reason '%s'"
-msgstr ""
+msgstr "kan ikke oprette fifo '%s', årsag '%s'"
 
-#: src/main/connections.c:872
+#: src/main/connections.c:864
 #, c-format
 msgid "'%s' exists but is not a fifo"
-msgstr ""
+msgstr "'%s' findes men er ikke en fifo"
 
-#: src/main/connections.c:886
+#: src/main/connections.c:878
 #, c-format
 msgid "fifo '%s' is not ready"
-msgstr ""
+msgstr "fifo '%s' er ikke klar"
 
-#: src/main/connections.c:887
+#: src/main/connections.c:879
 #, c-format
 msgid "cannot open fifo '%s'"
-msgstr ""
-
-#: src/main/connections.c:928 src/main/connections.c:939
-#: src/main/connections.c:1104 src/main/connections.c:1123
-#: src/main/connections.c:1531 src/main/connections.c:1541
-#: src/main/connections.c:1660 src/main/connections.c:1720
-#: src/main/connections.c:2246 src/main/connections.c:2263
-#: src/main/connections.c:2572 src/main/connections.c:5305
-#: src/main/connections.c:5369
+msgstr "kan ikke åbne fifo '%s'"
+
+#: src/main/connections.c:920 src/main/connections.c:931
+#: src/main/connections.c:1095 src/main/connections.c:1114
+#: src/main/connections.c:1524 src/main/connections.c:1534
+#: src/main/connections.c:1653 src/main/connections.c:1713
+#: src/main/connections.c:2240 src/main/connections.c:2257
+#: src/main/connections.c:2566 src/main/connections.c:5385
+#: src/main/connections.c:5449
 msgid "too large a block specified"
-msgstr ""
+msgstr "for stor en blok angivet"
 
-#: src/main/connections.c:998 src/main/connections.c:1004
+#: src/main/connections.c:989 src/main/connections.c:995
 msgid "allocation of fifo name failed"
 msgstr "allokering af fifo-navn mislykkedes"
 
-#: src/main/connections.c:1066
+#: src/main/connections.c:1057
 #, c-format
 msgid "cannot open fifo '%s', reason '%s'"
 msgstr "kan ikke åbne fifo '%s', årsag '%s'"
 
-#: src/main/connections.c:1107 src/main/connections.c:1131
+#: src/main/connections.c:1098 src/main/connections.c:1122
 msgid "allocation of fifo buffer failed"
 msgstr "allokering af fifo-buffer mislykkedes"
 
-#: src/main/connections.c:1139
+#: src/main/connections.c:1130
 #, c-format
 msgid "cannot write FIFO '%s'"
 msgstr "kan ikke skrive FIFO '%s'"
 
-#: src/main/connections.c:1175 src/main/connections.c:1179
-#: src/main/connections.c:1185 src/main/connections.c:1201
+#: src/main/connections.c:1166 src/main/connections.c:1170
+#: src/main/connections.c:1176 src/main/connections.c:1192
 msgid "allocation of fifo connection failed"
 msgstr "allokering af fifo-forbindelse mislykkedes"
 
-#: src/main/connections.c:1219 src/main/connections.c:1377
-#: src/main/connections.c:1998 src/main/connections.c:3212
-#: src/main/connections.c:4967
+#: src/main/connections.c:1210 src/main/connections.c:1369
+#: src/main/connections.c:1991 src/main/connections.c:3205
+#: src/main/connections.c:4982
 msgid "only first element of 'description' argument used"
 msgstr ""
 
-#: src/main/connections.c:1236
+#: src/main/connections.c:1227
 msgid ""
 "fifo(\"\") only supports open = \"w+\" and open = \"w+b\": using the former"
 msgstr ""
 
-#: src/main/connections.c:1250 src/main/connections.c:1414
-#: src/main/connections.c:2064 src/main/connections.c:3179
-#: src/main/connections.c:3232 src/main/connections.c:3280
-#: src/main/connections.c:3567 src/main/connections.c:3683
-#: src/main/connections.c:3844 src/main/connections.c:4095
-#: src/main/connections.c:4423 src/main/connections.c:4543
-#: src/main/connections.c:4755 src/main/connections.c:5105 src/main/dcf.c:94
-#: src/main/deparse.c:352 src/main/deparse.c:438 src/main/saveload.c:2267
-#: src/main/saveload.c:2350 src/main/scan.c:933 src/main/serialize.c:2175
-#: src/main/serialize.c:2226 src/main/source.c:265
+#: src/main/connections.c:1242 src/main/connections.c:1407
+#: src/main/connections.c:2058 src/main/connections.c:3175
+#: src/main/connections.c:3226 src/main/connections.c:3274
+#: src/main/connections.c:3563 src/main/connections.c:3679
+#: src/main/connections.c:3841 src/main/connections.c:4106
+#: src/main/connections.c:4434 src/main/connections.c:4554
+#: src/main/connections.c:4768 src/main/connections.c:5180 src/main/dcf.c:93
+#: src/main/deparse.c:361 src/main/deparse.c:450 src/main/saveload.c:2269
+#: src/main/saveload.c:2350 src/main/scan.c:933 src/main/serialize.c:2216
+#: src/main/serialize.c:2267 src/main/source.c:270
 msgid "cannot open the connection"
 msgstr "kan ikke åbne forbindelsen"
 
-#: src/main/connections.c:1265
+#: src/main/connections.c:1257
 msgid "fifo connections are not available on this system"
 msgstr "fifo-forbindelser er ikke tilgængelige på dette system"
 
-#: src/main/connections.c:1295
+#: src/main/connections.c:1287
 #, c-format
 msgid "cannot pipe() cmd '%ls': %s"
 msgstr "kan ikke pipt() cmd '%ls': %s"
 
-#: src/main/connections.c:1302
+#: src/main/connections.c:1294
 #, c-format
 msgid "cannot open pipe() cmd '%s': %s"
 msgstr "kan ikke åben pipe() cmd '%s': %s"
 
-#: src/main/connections.c:1471 src/main/connections.c:1791
+#: src/main/connections.c:1464 src/main/connections.c:1784
 #, c-format
 msgid "cannot open compressed file '%s', probable reason '%s'"
 msgstr "kan ikke åbne komprimeret fil '%s', sandsynlig årsag '%s'"
 
-#: src/main/connections.c:1511
+#: src/main/connections.c:1504
 msgid "whence = \"end\" is not implemented for gzfile connections"
 msgstr ""
 
-#: src/main/connections.c:1516
+#: src/main/connections.c:1509
 msgid "seek on a gzfile connection returned an internal error"
 msgstr ""
 
-#: src/main/connections.c:1550 src/main/connections.c:1554
-#: src/main/connections.c:1560 src/main/connections.c:1577
+#: src/main/connections.c:1543 src/main/connections.c:1547
+#: src/main/connections.c:1553 src/main/connections.c:1570
 msgid "allocation of gzfile connection failed"
 msgstr ""
 
-#: src/main/connections.c:1606
+#: src/main/connections.c:1599
 #, c-format
 msgid "cannot open bzip2-ed file '%s', probable reason '%s'"
 msgstr ""
 
-#: src/main/connections.c:1615
+#: src/main/connections.c:1608
 #, c-format
 msgid "file '%s' appears not to be compressed by bzip2"
 msgstr ""
 
-#: src/main/connections.c:1624
+#: src/main/connections.c:1617
 #, c-format
 msgid "initializing bzip2 compression for file '%s' failed"
 msgstr ""
 
-#: src/main/connections.c:1678
+#: src/main/connections.c:1671
 msgid "allocation of overflow buffer for bzfile failed"
 msgstr ""
 
-#: src/main/connections.c:1685
+#: src/main/connections.c:1678
 #, c-format
 msgid ""
 "file '%s' has trailing content that appears not to be compressed by bzip2"
 msgstr ""
 
-#: src/main/connections.c:1731 src/main/connections.c:1735
-#: src/main/connections.c:1741 src/main/connections.c:1758
+#: src/main/connections.c:1724 src/main/connections.c:1728
+#: src/main/connections.c:1734 src/main/connections.c:1751
 msgid "allocation of bzfile connection failed"
 msgstr ""
 
-#: src/main/connections.c:1804 src/main/connections.c:5961
+#: src/main/connections.c:1797 src/main/connections.c:6046
 #, c-format
 msgid "cannot initialize lzma decoder, error %d"
 msgstr ""
 
-#: src/main/connections.c:1820
+#: src/main/connections.c:1813
 #, c-format
 msgid "cannot initialize lzma encoder, error %d"
 msgstr ""
 
-#: src/main/connections.c:1948 src/main/connections.c:1952
-#: src/main/connections.c:1958 src/main/connections.c:1976
+#: src/main/connections.c:1941 src/main/connections.c:1945
+#: src/main/connections.c:1951 src/main/connections.c:1969
 msgid "allocation of xzfile connection failed"
 msgstr ""
 
-#: src/main/connections.c:2035
+#: src/main/connections.c:2028
 #, c-format
 msgid "this is a %s-compressed file which this build of R does not support"
 msgstr ""
 
-#: src/main/connections.c:2130 src/modules/X11/devX11.c:3375
+#: src/main/connections.c:2124 src/modules/X11/devX11.c:3381
 msgid "memory allocation to copy clipboard failed"
 msgstr "hukommelsesallokering til kopier udklipsholder mislykkedes"
 
-#: src/main/connections.c:2135 src/modules/X11/devX11.c:3354
-#: src/modules/X11/devX11.c:3359
+#: src/main/connections.c:2129 src/modules/X11/devX11.c:3360
+#: src/modules/X11/devX11.c:3365
 msgid "clipboard cannot be opened or contains no text"
 msgstr "udklipsholder kan ikke åbnes eller indeholder ingen tekst"
 
-#: src/main/connections.c:2146
+#: src/main/connections.c:2140
 msgid "memory allocation to open clipboard failed"
 msgstr "hukommelsesallokering til åben udklipsholder mislykkedes"
 
-#: src/main/connections.c:2174
+#: src/main/connections.c:2168
 msgid "unable to open the clipboard"
 msgstr "kan ikke åbne udklipsholderen"
 
-#: src/main/connections.c:2178
+#: src/main/connections.c:2172
 msgid "unable to write to the clipboard"
 msgstr "kan ikke skrive til udklipsholderen"
 
-#: src/main/connections.c:2218
+#: src/main/connections.c:2212
 msgid "attempt to seek outside the range of the clipboard"
 msgstr "forsøg på at søge uden for udklipsholderens interval"
 
-#: src/main/connections.c:2261
+#: src/main/connections.c:2255
 msgid "clipboard connection is open for reading only"
 msgstr "udklipsholderforbindelsen er kun åben for læsning"
 
-#: src/main/connections.c:2281
+#: src/main/connections.c:2275
 msgid "clipboard buffer is full and output lost"
 msgstr "udklipsholderens mellemlager er fyldt og uddata mistet"
 
-#: src/main/connections.c:2302
+#: src/main/connections.c:2296
 msgid "'mode' for the clipboard must be 'r' or 'w'"
 msgstr "'mode' for udklipsholderen skal være 'r' eller 'w'"
 
-#: src/main/connections.c:2305
+#: src/main/connections.c:2299
 msgid "'mode' for the clipboard must be 'r' on Unix"
 msgstr "'mode' for udklipsholderen skal være 'r' på Unix"
 
-#: src/main/connections.c:2308 src/main/connections.c:2314
-#: src/main/connections.c:2320 src/main/connections.c:2337
+#: src/main/connections.c:2302 src/main/connections.c:2308
+#: src/main/connections.c:2314 src/main/connections.c:2331
 msgid "allocation of clipboard connection failed"
 msgstr "allokering af udklipsholderforbindelsen mislykkedes"
 
-#: src/main/connections.c:2406 src/main/connections.c:2410
-#: src/main/connections.c:2416
+#: src/main/connections.c:2400 src/main/connections.c:2404
+#: src/main/connections.c:2410
 msgid "allocation of terminal connection failed"
 msgstr "allokering af terminalforbindelsen mislykkedes"
 
-#: src/main/connections.c:2549
+#: src/main/connections.c:2543
 msgid "attempting to add too many elements to raw vector"
 msgstr ""
 
-#: src/main/connections.c:2601
+#: src/main/connections.c:2595
 msgid "attempt to seek outside the range of the raw connection"
 msgstr ""
 
-#: src/main/connections.c:2612 src/main/connections.c:2616
-#: src/main/connections.c:2622 src/main/connections.c:2648
+#: src/main/connections.c:2606 src/main/connections.c:2610
+#: src/main/connections.c:2616 src/main/connections.c:2642
 msgid "allocation of raw connection failed"
 msgstr ""
 
-#: src/main/connections.c:2701
+#: src/main/connections.c:2695
 msgid "'con' is not a rawConnection"
 msgstr ""
 
-#: src/main/connections.c:2704
+#: src/main/connections.c:2698
 msgid "'con' is not an output rawConnection"
 msgstr ""
 
-#: src/main/connections.c:2742
+#: src/main/connections.c:2736
 msgid "too many characters for text connection"
 msgstr ""
 
-#: src/main/connections.c:2747
+#: src/main/connections.c:2741
 msgid "cannot allocate memory for text connection"
 msgstr "kan ikke allokere hukommsel for tekstforbindelse"
 
-#: src/main/connections.c:2796
+#: src/main/connections.c:2790
 msgid "seek is not relevant for text connection"
 msgstr ""
 
-#: src/main/connections.c:2804 src/main/connections.c:2808
-#: src/main/connections.c:2814 src/main/connections.c:2827
-#: src/main/connections.c:3012 src/main/connections.c:3016
-#: src/main/connections.c:3022 src/main/connections.c:3035
-#: src/main/connections.c:3041
+#: src/main/connections.c:2798 src/main/connections.c:2802
+#: src/main/connections.c:2808 src/main/connections.c:2821
+#: src/main/connections.c:3008 src/main/connections.c:3012
+#: src/main/connections.c:3018 src/main/connections.c:3031
+#: src/main/connections.c:3037
 msgid "allocation of text connection failed"
 msgstr ""
 
-#: src/main/connections.c:2989
+#: src/main/connections.c:2983
 msgid "text connection: appending to a non-existent char vector"
 msgstr ""
 
-#: src/main/connections.c:3093
+#: src/main/connections.c:3089
 msgid "unsupported mode"
 msgstr ""
 
-#: src/main/connections.c:3115
+#: src/main/connections.c:3111
 msgid "'con' is not a textConnection"
 msgstr ""
 
-#: src/main/connections.c:3118
+#: src/main/connections.c:3114
 msgid "'con' is not an output textConnection"
 msgstr ""
 
-#: src/main/connections.c:3192
-msgid "sockets are not available on this system"
-msgstr ""
-
-#: src/main/connections.c:3260 src/main/connections.c:3309
-#: src/main/connections.c:3320 src/main/connections.c:3367
-#: src/main/connections.c:3392 src/main/connections.c:3415
-#: src/main/connections.c:3427 src/main/connections.c:3543
-#: src/main/connections.c:3668 src/main/connections.c:5408
+#: src/main/connections.c:3254 src/main/connections.c:3303
+#: src/main/connections.c:3314 src/main/connections.c:3361
+#: src/main/connections.c:3388 src/main/connections.c:3411
+#: src/main/connections.c:3423 src/main/connections.c:3539
+#: src/main/connections.c:3664 src/main/connections.c:5489
 msgid "'con' is not a connection"
-msgstr ""
+msgstr "'con' er ikke en forbindelse"
 
-#: src/main/connections.c:3263
+#: src/main/connections.c:3257
 msgid "cannot open standard connections"
-msgstr ""
+msgstr "kan ikke åbne standardforbindelser"
 
-#: src/main/connections.c:3265
+#: src/main/connections.c:3259
 msgid "connection is already open"
-msgstr ""
+msgstr "forbindelse er allerede åben"
 
-#: src/main/connections.c:3298
+#: src/main/connections.c:3292
 msgid "unknown 'rw' value"
-msgstr ""
+msgstr "ukendt 'rw'-værdi"
 
-#: src/main/connections.c:3369
+#: src/main/connections.c:3363
 msgid "cannot close standard connections"
-msgstr ""
+msgstr "kan ikke lukke standardforbindelser"
 
-#: src/main/connections.c:3372
+#: src/main/connections.c:3366
 msgid "cannot close 'output' sink connection"
-msgstr ""
+msgstr "kan ikke lukke 'output'-datakanalforbindelse"
 
-#: src/main/connections.c:3374
+#: src/main/connections.c:3368
 msgid "cannot close 'message' sink connection"
-msgstr ""
+msgstr "kan ikke lukke 'message'-datakanalforbindelse"
 
-#: src/main/connections.c:3394 src/main/connections.c:5123
-#: src/main/connections.c:5131 src/main/serialize.c:1996
-#: src/main/serialize.c:2004
+#: src/main/connections.c:3390 src/main/connections.c:5198
+#: src/main/connections.c:5206 src/main/serialize.c:2035
+#: src/main/serialize.c:2043
 msgid "connection is not open"
-msgstr ""
+msgstr "forbindelse er ikke åben"
 
-#: src/main/connections.c:3490 src/main/connections.c:3502
+#: src/main/connections.c:3486 src/main/connections.c:3498
 msgid "line longer than buffer size"
-msgstr ""
+msgstr "linje længere end bufferstørrelse"
 
-#: src/main/connections.c:3574 src/main/connections.c:3576
-#: src/main/connections.c:3852 src/main/connections.c:4406
-#: src/main/connections.c:4431 src/main/connections.c:5132 src/main/dcf.c:101
-#: src/main/scan.c:936 src/main/scan.c:940 src/main/serialize.c:1998
-#: src/main/source.c:272
+#: src/main/connections.c:3570 src/main/connections.c:3572
+#: src/main/connections.c:3849 src/main/connections.c:4417
+#: src/main/connections.c:4442 src/main/connections.c:5207 src/main/dcf.c:100
+#: src/main/scan.c:936 src/main/scan.c:940 src/main/serialize.c:2037
+#: src/main/source.c:277
 msgid "cannot read from this connection"
-msgstr ""
+msgstr "kan ikke læse fra denne forbindelse"
 
-#: src/main/connections.c:3588 src/main/connections.c:3610
+#: src/main/connections.c:3584 src/main/connections.c:3606
 msgid "cannot allocate buffer in readLines"
-msgstr ""
+msgstr "kan ikke allokere buffer i readLines"
 
-#: src/main/connections.c:3623
+#: src/main/connections.c:3619
 #, c-format
 msgid "line %d appears to contain an embedded nul"
-msgstr ""
+msgstr "linje %d ser ud til at indeholde en indlejret nul"
 
-#: src/main/connections.c:3640
+#: src/main/connections.c:3636
 #, c-format
 msgid "incomplete final line found on '%s'"
-msgstr ""
+msgstr "ufuldstændig endelig linje fundet på '%s'"
 
-#: src/main/connections.c:3646
+#: src/main/connections.c:3642
 msgid "too few lines read in readLines"
-msgstr ""
+msgstr "for få linjer læst i readLines"
 
-#: src/main/connections.c:3749
+#: src/main/connections.c:3746
 msgid "incomplete string at end of file has been discarded"
-msgstr ""
+msgstr "ufuldstændig streng i filendelsen er blevet fjernet"
 
-#: src/main/connections.c:3755
+#: src/main/connections.c:3752
 msgid "null terminator not found: breaking string at 10000 bytes"
 msgstr ""
 
-#: src/main/connections.c:3820
+#: src/main/connections.c:3817
 msgid "can only read from a binary connection"
-msgstr ""
+msgstr "kan kun læse fra en binær forbindelse"
 
-#: src/main/connections.c:3869 src/main/connections.c:4176
+#: src/main/connections.c:3866 src/main/connections.c:4187
 msgid "size changing is not supported for complex vectors"
 msgstr ""
 
-#: src/main/connections.c:3907 src/main/connections.c:3925
-#: src/main/connections.c:3951 src/main/connections.c:4010
-#: src/main/connections.c:4030 src/main/connections.c:4157
-#: src/main/connections.c:4170 src/main/connections.c:4229
-#: src/main/connections.c:4261
+#: src/main/connections.c:3905 src/main/connections.c:3923
+#: src/main/connections.c:3949 src/main/connections.c:3993
+#: src/main/connections.c:4024 src/main/connections.c:4044
+#: src/main/connections.c:4168 src/main/connections.c:4181
+#: src/main/connections.c:4240 src/main/connections.c:4272
 #, c-format
 msgid "size %d is unknown on this machine"
-msgstr ""
+msgstr "størrelse %d er ukendt på denne maskine"
 
-#: src/main/connections.c:3936
+#: src/main/connections.c:3934
 msgid "raw is always of size 1"
-msgstr ""
+msgstr "raw er altid størrelse 1"
 
-#: src/main/connections.c:3959
+#: src/main/connections.c:3957
 msgid "'signed = FALSE' is only valid for integers of sizes 1 and 2"
 msgstr ""
 
-#: src/main/connections.c:4060
+#: src/main/connections.c:4071
 msgid "'x' is not an atomic vector type"
 msgstr ""
 
-#: src/main/connections.c:4066
+#: src/main/connections.c:4077
 msgid "can only write to a binary connection"
-msgstr ""
+msgstr "kan kun skrive til en binær forbindelse"
 
-#: src/main/connections.c:4085
+#: src/main/connections.c:4096
 msgid "only 2^31-1 bytes can be written to a raw vector"
-msgstr ""
+msgstr "kun 2^31-1 byte kan skrives til en rå vektor"
 
-#: src/main/connections.c:4087
+#: src/main/connections.c:4098
 msgid "only 2^31-1 bytes can be written in a single writeBin() call"
-msgstr ""
+msgstr "kun 2^31-1 byte kan skrives i et enkelt writeBin()-kald"
 
-#: src/main/connections.c:4136 src/main/connections.c:4289
-#: src/main/connections.c:4570 src/main/connections.c:4610
+#: src/main/connections.c:4147 src/main/connections.c:4300
+#: src/main/connections.c:4581 src/main/connections.c:4621
 msgid "problem writing to connection"
-msgstr ""
+msgstr "problem ved skrivning til forbindelse"
 
-#: src/main/connections.c:4181
+#: src/main/connections.c:4192
 msgid "size changing is not supported for raw vectors"
 msgstr ""
 
-#: src/main/connections.c:4324 src/main/connections.c:4328
-#: src/main/connections.c:4367
+#: src/main/connections.c:4335 src/main/connections.c:4339
+#: src/main/connections.c:4378
 msgid "invalid UTF-8 input in readChar()"
 msgstr ""
 
-#: src/main/connections.c:4434
+#: src/main/connections.c:4445
 msgid "can only read in bytes in a non-UTF-8 MBCS locale"
 msgstr ""
 
-#: src/main/connections.c:4506
+#: src/main/connections.c:4517
 msgid "'object' is too short"
-msgstr ""
+msgstr "'object' er for kort"
 
-#: src/main/connections.c:4559
+#: src/main/connections.c:4570
 msgid "writeChar: more bytes requested than are in the string - will zero-pad"
 msgstr ""
 
-#: src/main/connections.c:4584
+#: src/main/connections.c:4595
 msgid ""
 "writeChar: more characters requested than are in the string - will zero-pad"
 msgstr ""
 
-#: src/main/connections.c:4638
+#: src/main/connections.c:4649
 msgid "maximum number of pushback lines exceeded"
 msgstr ""
 
-#: src/main/connections.c:4644 src/main/connections.c:4648
-#: src/main/connections.c:4685 src/main/connections.c:4693
+#: src/main/connections.c:4655 src/main/connections.c:4659
+#: src/main/connections.c:4696 src/main/connections.c:4704
 msgid "could not allocate space for pushback"
 msgstr ""
 
-#: src/main/connections.c:4676
+#: src/main/connections.c:4687
 msgid "can only push back on open readable connections"
 msgstr ""
 
-#: src/main/connections.c:4678
+#: src/main/connections.c:4689
 msgid "can only push back on text-mode connections"
 msgstr ""
 
-#: src/main/connections.c:4740 src/main/connections.c:4810
+#: src/main/connections.c:4753 src/main/connections.c:4823
 msgid "sink stack is full"
-msgstr ""
+msgstr "datakanalstak er fuld"
 
-#: src/main/connections.c:4743
+#: src/main/connections.c:4756
 msgid "cannot switch output to stdin"
 msgstr ""
 
-#: src/main/connections.c:4770
+#: src/main/connections.c:4783
 msgid "no sink to remove"
-msgstr ""
+msgstr "ingen datakanal at fjerne"
 
-#: src/main/connections.c:4892
+#: src/main/connections.c:4903
 msgid "there is no connection NA"
-msgstr ""
+msgstr "der er ingen forbindelse NA"
 
-#: src/main/connections.c:4894
+#: src/main/connections.c:4905
 #, c-format
 msgid "there is no connection %d"
-msgstr ""
+msgstr "der er ingen forbindelse %d"
+
+#: src/main/connections.c:5039
+msgid "method = \"wininet\" is only supported on Windows"
+msgstr "metode = »wininet« er kun understøttet på Windows"
 
-#: src/main/connections.c:5029
+#: src/main/connections.c:5103
 msgid ""
 "file(\"\") only supports open = \"w+\" and open = \"w+b\": using the former"
 msgstr ""
 
-#: src/main/connections.c:5083 src/modules/internet/internet.c:115
-#: src/modules/internet/internet.c:569
-msgid "unsupported URL scheme"
+#: src/main/connections.c:5157
+msgid "URL scheme unsupported by this method"
 msgstr ""
 
-#: src/main/connections.c:5173
+#: src/main/connections.c:5253
 msgid "file stream does not have gzip magic number"
 msgstr ""
 
-#: src/main/connections.c:5184
+#: src/main/connections.c:5264
 msgid "file stream does not have valid gzip header"
 msgstr ""
 
-#: src/main/connections.c:5249
+#: src/main/connections.c:5329
 msgid "writing error whilst flushing 'gzcon' connection"
 msgstr ""
 
-#: src/main/connections.c:5351
+#: src/main/connections.c:5431
 #, c-format
 msgid "crc error %x %x\n"
 msgstr "crc-fejl %x %x\n"
 
-#: src/main/connections.c:5378
+#: src/main/connections.c:5458
 msgid "write error on 'gzcon' connection"
-msgstr ""
+msgstr "skrivefejl på 'gzcon'-forbindelse"
 
-#: src/main/connections.c:5412
+#: src/main/connections.c:5493
 msgid "'level' must be one of 0 ... 9"
-msgstr ""
+msgstr "'level' skal være en af 0 ... 9"
 
-#: src/main/connections.c:5415
+#: src/main/connections.c:5496
 msgid "'allowNonCompression' must be TRUE or FALSE"
 msgstr ""
 
-#: src/main/connections.c:5418
+#: src/main/connections.c:5499
+#, fuzzy
+msgid "'text' must be TRUE or FALSE"
+msgstr "'onOff' skal være TRUE (SAND) eller FALSE (FALSK)"
+
+#: src/main/connections.c:5502
 msgid "this is already a 'gzcon' connection"
 msgstr ""
 
-#: src/main/connections.c:5424
+#: src/main/connections.c:5508
 msgid "can only use read- or write- binary connections"
 msgstr ""
 
-#: src/main/connections.c:5427
+#: src/main/connections.c:5511
 msgid "using a text-mode 'file' connection may not work correctly"
 msgstr ""
 
-#: src/main/connections.c:5430
+#: src/main/connections.c:5514
 msgid ""
 "cannot create a 'gzcon' connection from a writable textConnection; maybe use "
 "rawConnection"
 msgstr ""
 
-#: src/main/connections.c:5433 src/main/connections.c:5437
-#: src/main/connections.c:5444 src/main/connections.c:5458
+#: src/main/connections.c:5517 src/main/connections.c:5521
+#: src/main/connections.c:5528 src/main/connections.c:5542
 msgid "allocation of 'gzcon' connection failed"
 msgstr ""
 
-#: src/main/connections.c:5644
+#: src/main/connections.c:5729
 msgid "not a list of sockets"
 msgstr ""
 
-#: src/main/connections.c:5649
+#: src/main/connections.c:5734
 msgid "bad write indicators"
 msgstr ""
 
-#: src/main/connections.c:5660
+#: src/main/connections.c:5745
 msgid "not a socket connection"
 msgstr "ikke en sokkelforbindelse"
 
-#: src/main/connections.c:5905
+#: src/main/connections.c:5990
 msgid "unknown compression, assuming none"
 msgstr "ukendt komprimering, antager ingen"
 
-#: src/main/connections.c:6023 src/main/connections.c:6027
-#: src/main/connections.c:6033
+#: src/main/connections.c:6108 src/main/connections.c:6112
+#: src/main/connections.c:6118
 #, c-format
 msgid "allocation of %s connection failed"
 msgstr "allokering af %s-forbindelse mislykkedes"
 
-#: src/main/context.c:282
+#: src/main/context.c:316
 msgid "no loop for break/next, jumping to top level"
 msgstr ""
 
-#: src/main/context.c:290
+#: src/main/context.c:324
 msgid "no function to return from, jumping to top level"
 msgstr ""
 
-#: src/main/context.c:302
+#: src/main/context.c:339
 msgid "target context is not on the stack"
 msgstr ""
 
-#: src/main/context.c:324 src/main/context.c:340 src/main/context.c:407
-#: src/main/context.c:428 src/main/context.c:440 src/main/context.c:452
+#: src/main/context.c:361 src/main/context.c:377 src/main/context.c:444
+#: src/main/context.c:465 src/main/context.c:477 src/main/context.c:489
 msgid "not that many frames on the stack"
 msgstr ""
 
-#: src/main/context.c:357
+#: src/main/context.c:394
 msgid "only positive values of 'n' are allowed"
-msgstr ""
+msgstr "kun positive værdier for 'n' er tilladt"
 
-#: src/main/context.c:478
-msgid "no function to restart"
-msgstr "ingen funktion at genstarte"
-
-#: src/main/context.c:515
+#: src/main/context.c:526
 msgid "number of contexts must be positive"
 msgstr ""
 
-#: src/main/context.c:528
+#: src/main/context.c:539
 msgid "no browser context to query"
 msgstr "ingen browserkontekst at forespørge"
 
-#: src/main/context.c:546
+#: src/main/context.c:557
 msgid "not that many calls to browser are active"
 msgstr ""
 
-#: src/main/context.c:560
+#: src/main/context.c:571
 msgid "not that many functions on the call stack"
 msgstr ""
 
-#: src/main/context.c:645
+#: src/main/context.c:656
 msgid "internal error in 'do_sys'"
-msgstr ""
+msgstr "intern fejl i 'do_sys'"
 
 #: src/main/cum.c:49
 msgid "integer overflow in 'cumsum'; use 'cumsum(as.numeric(.))'"
 msgstr ""
 
-#: src/main/cum.c:178
-msgid "'cummin' not defined for complex numbers"
+#: src/main/cum.c:179
+msgid "'cummax' not defined for complex numbers"
 msgstr ""
 
-#: src/main/cum.c:181
-msgid "'cummax' not defined for complex numbers"
+#: src/main/cum.c:182
+msgid "'cummin' not defined for complex numbers"
 msgstr ""
 
-#: src/main/cum.c:206 src/main/cum.c:230
+#: src/main/cum.c:209 src/main/cum.c:236
 msgid "unknown cumxxx function"
-msgstr ""
+msgstr "ukendt cumxxx-funktion"
 
-#: src/main/datetime.c:548 src/main/datetime.c:556 src/main/datetime.c:570
-#: src/main/datetime.c:575
+#: src/main/datetime.c:554 src/main/datetime.c:562 src/main/datetime.c:576
+#: src/main/datetime.c:581
 msgid "problem with setting timezone"
-msgstr ""
+msgstr "der opstod et problem med indstilling af tidszonen"
 
-#: src/main/datetime.c:560
+#: src/main/datetime.c:566
 msgid "cannot set timezones on this system"
-msgstr ""
+msgstr "kan ikke instille tidszoner på dette system"
 
-#: src/main/datetime.c:582 src/main/datetime.c:584
+#: src/main/datetime.c:588 src/main/datetime.c:590
 msgid "problem with unsetting timezone"
-msgstr ""
+msgstr "problem med at fjerne indstilling for tidszone"
 
-#: src/main/datetime.c:804 src/main/datetime.c:806 src/main/datetime.c:901
-#: src/main/datetime.c:1240 src/main/datetime.c:1242
+#: src/main/datetime.c:810 src/main/datetime.c:812 src/main/datetime.c:908
+#: src/main/datetime.c:1258 src/main/datetime.c:1260
 msgid "zero-length component in non-empty \"POSIXlt\" structure"
 msgstr ""
 
-#: src/main/dcf.c:113 src/main/dcf.c:181 src/main/dcf.c:253
+#: src/main/dcf.c:112 src/main/dcf.c:181 src/main/dcf.c:253
 msgid "could not allocate memory for 'read.dcf'"
-msgstr ""
+msgstr "kunne ikke allokere hukomemlse for 'read.dcf'"
 
 #: src/main/dcf.c:156
 #, c-format
@@ -2384,78 +2442,83 @@ msgstr ""
 msgid "Line starting '%s ...' is malformed!"
 msgstr ""
 
-#: src/main/debug.c:45
-msgid "argument must be a closure"
-msgstr ""
-
-#: src/main/debug.c:76
+#: src/main/debug.c:46 src/main/debug.c:76
 msgid "argument must be a function"
-msgstr ""
+msgstr "argument skal være en funktion"
+
+#: src/main/debug.c:111
+#, c-format
+msgid "Value for '%s' must be TRUE or FALSE"
+msgstr "Værdi for '%s' skal være TRUE (sand) eller FALSE (falsk)"
 
-#: src/main/debug.c:132 src/main/debug.c:166 src/main/debug.c:224
+#: src/main/debug.c:139 src/main/debug.c:167 src/main/debug.c:241
 msgid "argument must not be a function"
-msgstr ""
+msgstr "argument må ikke være en funktion"
 
-#: src/main/debug.c:135
+#: src/main/debug.c:142
 msgid "cannot trace NULL"
 msgstr ""
 
-#: src/main/debug.c:139
+#: src/main/debug.c:146
 msgid "'tracemem' is not useful for promise and environment objects"
 msgstr ""
 
-#: src/main/debug.c:142
+#: src/main/debug.c:149
 msgid "'tracemem' is not useful for weak reference or external pointer objects"
 msgstr ""
 
-#: src/main/debug.c:148 src/main/debug.c:171
+#: src/main/debug.c:180 src/main/debug.c:187
 msgid "R was not compiled with support for memory profiling"
 msgstr ""
 
-#: src/main/deparse.c:152 src/main/sprintf.c:213 src/main/sprintf.c:245
+#: src/main/deparse.c:156 src/main/sprintf.c:216 src/main/sprintf.c:248
 msgid "too few arguments"
 msgstr ""
 
-#: src/main/deparse.c:159
+#: src/main/deparse.c:163
 msgid "invalid 'cutoff' value for 'deparse', using default"
 msgstr ""
 
-#: src/main/deparse.c:247
+#: src/main/deparse.c:254
 msgid "deparse of an S4 object will not be source()able"
 msgstr ""
 
-#: src/main/deparse.c:249
+#: src/main/deparse.c:256
 msgid "deparse may be incomplete"
 msgstr ""
 
-#: src/main/deparse.c:251
+#: src/main/deparse.c:258
 msgid "deparse may be not be source()able in R < 2.7.0"
 msgstr ""
 
-#: src/main/deparse.c:369 src/main/deparse.c:461 src/main/deparse.c:467
+#: src/main/deparse.c:350 src/main/deparse.c:400 src/main/source.c:206
+msgid "'file' must be a character string or connection"
+msgstr "file' skal være en tegnstreng eller forbindelse"
+
+#: src/main/deparse.c:378 src/main/deparse.c:473 src/main/deparse.c:479
 msgid "wrote too few characters"
-msgstr ""
+msgstr "skrev for få tegn"
 
-#: src/main/deparse.c:391
+#: src/main/deparse.c:402
 msgid "character arguments expected"
 msgstr ""
 
-#: src/main/deparse.c:394
+#: src/main/deparse.c:405
 msgid "zero-length argument"
 msgstr "nullængde for argument"
 
-#: src/main/deparse.c:401
+#: src/main/deparse.c:412
 msgid "'opts' should be small non-negative integer"
 msgstr ""
 
-#: src/main/deparse.c:411 src/main/envir.c:1764 src/main/envir.c:1846
-#: src/main/eval.c:569 src/main/eval.c:1251 src/main/eval.c:3627
-#: src/main/saveload.c:1978 src/main/saveload.c:2309 src/main/serialize.c:2727
+#: src/main/deparse.c:422 src/main/envir.c:1898 src/main/envir.c:1983
+#: src/main/eval.c:626 src/main/eval.c:1423 src/main/eval.c:4246
+#: src/main/saveload.c:1980 src/main/saveload.c:2312 src/main/serialize.c:2773
 #, c-format
 msgid "object '%s' not found"
-msgstr ""
+msgstr "objekt '%s' blev ikke fundet"
 
-#: src/main/deparse.c:1519
+#: src/main/deparse.c:1592
 msgid "badly formed function expression"
 msgstr "ugyldigt udformet funktionsudtryk"
 
@@ -2463,255 +2526,240 @@ msgstr "ugyldigt udformet funktionsudtryk"
 msgid "the base graphics system is not registered"
 msgstr "basisgrafiksystemet er ikke registreret"
 
-#: src/main/devices.c:165 src/main/devices.c:172
+#: src/main/devices.c:166 src/main/devices.c:174
 msgid "no active or default device"
 msgstr "ingen aktiv enhed eller standardenhed"
 
-#: src/main/devices.c:385 src/main/devices.c:447
+#: src/main/devices.c:388 src/main/devices.c:450
 msgid "too many open devices"
 msgstr "for mange åbne enheder"
 
-#: src/main/devices.c:474
+#: src/main/devices.c:491
 msgid "not enough memory to allocate device (in GEcreateDevDesc)"
 msgstr "ikke nok hukommelse til at allokere enhed (i GEcreateDevDesc)"
 
-#: src/main/devices.c:515
+#: src/main/devices.c:532
 msgid "Hit <Return> to see next plot: "
 msgstr ""
 
-#: src/main/dotcode.c:112 src/main/dotcode.c:142
+#: src/main/dotcode.c:127 src/main/dotcode.c:157
 msgid "NULL value passed as symbol address"
 msgstr ""
 
-#: src/main/dotcode.c:133
+#: src/main/dotcode.c:148
 #, c-format
 msgid "Unimplemented type %d in createRSymbolObject"
 msgstr ""
 
-#: src/main/dotcode.c:147 src/main/dotcode.c:237
+#: src/main/dotcode.c:162 src/main/dotcode.c:260
 #, c-format
 msgid "symbol '%s' is too long"
-msgstr ""
+msgstr "symbol '%s' er for lang"
 
-#: src/main/dotcode.c:159
+#: src/main/dotcode.c:174
 msgid ""
 "first argument must be a string (of length 1) or native symbol reference"
 msgstr ""
 
-#: src/main/dotcode.c:201 src/main/dotcode.c:563
+#: src/main/dotcode.c:224 src/main/dotcode.c:1240
 msgid "too many arguments in foreign function call"
-msgstr ""
+msgstr "for mange argumenter i fremmed funktionskald"
 
-#: src/main/dotcode.c:213
+#: src/main/dotcode.c:236
 msgid "PACKAGE = \"\" is invalid"
-msgstr ""
+msgstr "PAKKE = \"\" er ugyldig"
 
-#: src/main/dotcode.c:269 src/main/dotcode.c:274 src/main/dotcode.c:279
-#: src/main/dotcode.c:284
+#: src/main/dotcode.c:292 src/main/dotcode.c:297 src/main/dotcode.c:302
+#: src/main/dotcode.c:307
 #, c-format
 msgid "\"%s\" not available for %s() for package \"%s\""
 msgstr ""
 
-#: src/main/dotcode.c:289
+#: src/main/dotcode.c:312
 #, c-format
 msgid "%s symbol name \"%s\" not in DLL for package \"%s\""
 msgstr ""
 
-#: src/main/dotcode.c:294
+#: src/main/dotcode.c:317
 #, c-format
 msgid "%s symbol name \"%s\" not in load table"
 msgstr ""
 
-#: src/main/dotcode.c:348 src/main/dotcode.c:352 src/main/dotcode.c:362
-#: src/main/dotcode.c:427 src/main/dotcode.c:434
+#: src/main/dotcode.c:368 src/main/dotcode.c:370 src/main/dotcode.c:380
+#: src/main/dotcode.c:445 src/main/dotcode.c:452
 #, c-format
 msgid "'%s' used more than once"
-msgstr ""
+msgstr "'%s' brugt mere end en gang"
 
-#: src/main/dotcode.c:358
+#: src/main/dotcode.c:376
 msgid "DLL name is too long"
-msgstr ""
+msgstr "DLL-navn er for langt"
 
-#: src/main/dotcode.c:403
+#: src/main/dotcode.c:421
 msgid "PACKAGE argument must be a single character string"
 msgstr ""
 
-#: src/main/dotcode.c:409
+#: src/main/dotcode.c:427
 msgid "PACKAGE argument is too long"
 msgstr ""
 
-#: src/main/dotcode.c:474
+#: src/main/dotcode.c:492
 msgid "no arguments supplied"
 msgstr ""
 
-#: src/main/dotcode.c:475 src/main/seq.c:913
+#: src/main/dotcode.c:493 src/main/seq.c:911
 msgid "too many arguments"
 msgstr ""
 
-#: src/main/dotcode.c:512 src/main/dotcode.c:554 src/main/dotcode.c:1397
+#: src/main/dotcode.c:530 src/main/dotcode.c:1232 src/main/dotcode.c:1420
 msgid "'.NAME' is missing"
 msgstr ""
 
-#: src/main/dotcode.c:521 src/main/dotcode.c:570 src/main/dotcode.c:1418
+#: src/main/dotcode.c:539 src/main/dotcode.c:1247 src/main/dotcode.c:1441
 #, c-format
 msgid "Incorrect number of arguments (%d), expecting %d for '%s'"
 msgstr ""
 
-#: src/main/dotcode.c:1227 src/main/dotcode.c:2276
+#: src/main/dotcode.c:1216 src/main/dotcode.c:2290
 msgid "too many arguments, sorry"
-msgstr ""
+msgstr "for mange argumenter, beklager"
 
-#: src/main/dotcode.c:1261 src/main/dotcode.c:1278 src/main/engine.c:2993
+#: src/main/dotcode.c:1284 src/main/dotcode.c:1301 src/main/engine.c:3013
 msgid "invalid graphics state"
 msgstr ""
 
-#: src/main/dotcode.c:1357
+#: src/main/dotcode.c:1380
 msgid "NULL value for DLLInfoReference when looking for DLL"
 msgstr ""
 
-#: src/main/dotcode.c:1458
+#: src/main/dotcode.c:1481
 #, c-format
 msgid "wrong type for argument %d in call to %s"
 msgstr "forkert type for argument %d i kald til %s"
 
-#: src/main/dotcode.c:1470
-#, c-format
-msgid ""
-"explicit request not to duplicate arguments in call to '%s', but argument %d "
-"is of the wrong type (%d != %d)"
-msgstr ""
-
-#: src/main/dotcode.c:1493
+#: src/main/dotcode.c:1510
 #, c-format
 msgid "long vectors (argument %d) are not supported in %s"
 msgstr ""
 
-#: src/main/dotcode.c:1524
+#: src/main/dotcode.c:1541
 #, c-format
 msgid "NAs in foreign function call (arg %d)"
 msgstr ""
 
-#: src/main/dotcode.c:1547
+#: src/main/dotcode.c:1564
 #, c-format
 msgid "NA/NaN/Inf in foreign function call (arg %d)"
 msgstr ""
 
-#: src/main/dotcode.c:1552
-msgid "single values not returned if not duplicated"
-msgstr ""
-
-#: src/main/dotcode.c:1578
+#: src/main/dotcode.c:1594
 #, c-format
 msgid "complex NA/NaN/Inf in foreign function call (arg %d)"
 msgstr ""
 
-#: src/main/dotcode.c:1597
-msgid "character variables must be duplicated in .C/.Fortran"
-msgstr ""
-
-#: src/main/dotcode.c:1602
+#: src/main/dotcode.c:1616
 msgid "only first string in char vector used in .Fortran"
 msgstr ""
 
-#: src/main/dotcode.c:1645 src/main/dotcode.c:1661 src/main/dotcode.c:1672
+#: src/main/dotcode.c:1659 src/main/dotcode.c:1675 src/main/dotcode.c:1686
 #, c-format
 msgid "invalid mode (%s) to pass to Fortran (arg %d)"
 msgstr ""
 
-#: src/main/dotcode.c:1666
+#: src/main/dotcode.c:1680
 #, c-format
 msgid "invalid mode (%s) to pass to C or Fortran (arg %d)"
 msgstr ""
 
-#: src/main/dotcode.c:1677
+#: src/main/dotcode.c:1691
 msgid "pairlists are passed as SEXP as from R 2.15.0"
 msgstr ""
 
-#: src/main/dotcode.c:2499
+#: src/main/dotcode.c:2510
 #, c-format
 msgid "type \"%s\" not supported in interlanguage calls"
 msgstr ""
 
-#: src/main/dotcode.c:2604
+#: src/main/dotcode.c:2615
 #, c-format
 msgid "mode '%s' is not supported in call_R"
 msgstr ""
 
-#: src/main/dounzip.c:171
+#: src/main/dounzip.c:172
 #, c-format
 msgid " not overwriting file '%s"
 msgstr ""
 
-#: src/main/dounzip.c:256
+#: src/main/dounzip.c:257
 #, c-format
 msgid "zip file '%s' cannot be opened"
-msgstr ""
+msgstr "zip-filen '%s' kan ikke åbnes"
 
-#: src/main/dounzip.c:312
+#: src/main/dounzip.c:313
 msgid "invalid zip name argument"
 msgstr ""
 
-#: src/main/dounzip.c:315 src/main/dounzip.c:409
+#: src/main/dounzip.c:316 src/main/dounzip.c:410
 msgid "zip path is too long"
-msgstr ""
+msgstr "zip-sti er for lang"
 
-#: src/main/dounzip.c:332
+#: src/main/dounzip.c:333
 msgid "'exdir' is too long"
-msgstr ""
+msgstr "'exdir' er for lang"
 
-#: src/main/dounzip.c:335
+#: src/main/dounzip.c:336
 msgid "'exdir' does not exist"
-msgstr ""
+msgstr "'exdir' findes ikke"
 
-#: src/main/dounzip.c:363
+#: src/main/dounzip.c:364
 msgid "requested file not found in the zip file"
 msgstr ""
 
-#: src/main/dounzip.c:366
+#: src/main/dounzip.c:367
 msgid "zip file is corrupt"
 msgstr ""
 
-#: src/main/dounzip.c:369
+#: src/main/dounzip.c:370
 msgid "CRC error in zip file"
 msgstr ""
 
-#: src/main/dounzip.c:376
+#: src/main/dounzip.c:377
 msgid "write error in extracting from zip file"
 msgstr ""
 
-#: src/main/dounzip.c:379
+#: src/main/dounzip.c:380
 #, c-format
 msgid "error %d in extracting from zip file"
 msgstr ""
 
-#: src/main/dounzip.c:404
+#: src/main/dounzip.c:405
 msgid "unz connections can only be opened for reading"
 msgstr ""
 
-#: src/main/dounzip.c:415
+#: src/main/dounzip.c:416
 msgid "invalid description of 'unz' connection"
 msgstr ""
 
-#: src/main/dounzip.c:421
+#: src/main/dounzip.c:422
 #, c-format
 msgid "cannot open zip file '%s'"
-msgstr ""
+msgstr "kan ikke åbne zip-filen '%s'"
 
-#: src/main/dounzip.c:425
+#: src/main/dounzip.c:426
 #, c-format
 msgid "cannot locate file '%s' in zip file '%s'"
-msgstr ""
+msgstr "kan ikke finde filen '%s' i zip-filen '%s'"
 
-#: src/main/dounzip.c:469
+#: src/main/dounzip.c:470
 msgid "printing not enabled for this connection"
-msgstr ""
+msgstr "udskrivning ikke aktiveret for denne forbindelse"
 
 #: src/main/dounzip.c:476
 msgid "write not enabled for this connection"
-msgstr ""
+msgstr "skrivning ikke aktiveret for denne forbindelse"
 
-#: src/main/dounzip.c:496 src/main/dounzip.c:500 src/main/dounzip.c:506
-#: src/main/dounzip.c:523
+#: src/main/dounzip.c:494 src/main/dounzip.c:498 src/main/dounzip.c:504
+#: src/main/dounzip.c:521
 msgid "allocation of 'unz' connection failed"
 msgstr "allokering af 'unz'-forbindelse mislykkedes"
 
@@ -2727,7 +2775,7 @@ msgstr ""
 msgid "invalid argument to edit()"
 msgstr "ugyldigt argument for edit()"
 
-#: src/main/edit.c:121 src/main/saveload.c:2076
+#: src/main/edit.c:121 src/main/saveload.c:2078
 msgid "unable to open file"
 msgstr "kan ikke åbne fil"
 
@@ -2787,12 +2835,12 @@ msgid "no graphics system to unregister"
 msgstr ""
 
 #: src/main/engine.c:443 src/main/engine.c:448 src/main/engine.c:456
-#: src/main/engine.c:463 src/main/engine.c:477 src/modules/X11/devX11.c:1157
+#: src/main/engine.c:463 src/main/engine.c:477 src/modules/X11/devX11.c:1159
 msgid "invalid line end"
 msgstr ""
 
 #: src/main/engine.c:508 src/main/engine.c:513 src/main/engine.c:521
-#: src/main/engine.c:528 src/main/engine.c:542 src/modules/X11/devX11.c:1175
+#: src/main/engine.c:528 src/main/engine.c:542 src/modules/X11/devX11.c:1177
 msgid "invalid line join"
 msgstr ""
 
@@ -2821,82 +2869,96 @@ msgstr ""
 msgid "raster capture is not available for this device"
 msgstr ""
 
-#: src/main/engine.c:1656
+#: src/main/engine.c:1662
 #, c-format
 msgid "font face %d not supported for font family '%s'"
 msgstr ""
 
-#: src/main/engine.c:1972
+#: src/main/engine.c:1978
 msgid "no graphics device is active"
 msgstr ""
 
-#: src/main/engine.c:2049
+#: src/main/engine.c:2055
 #, c-format
 msgid "pch value '%d' is invalid in this locale"
 msgstr ""
 
-#: src/main/engine.c:2307
+#: src/main/engine.c:2313
 #, c-format
 msgid "unimplemented pch value '%d'"
 msgstr ""
 
-#: src/main/engine.c:2330
+#: src/main/engine.c:2336
 #, c-format
 msgid "invalid axis extents [GEPretty(.,.,n=%d)"
 msgstr ""
 
-#: src/main/engine.c:2334
+#: src/main/engine.c:2340
 #, c-format
 msgid "infinite axis extents [GEPretty(%g,%g,%d)]"
 msgstr ""
 
-#: src/main/engine.c:2371
+#: src/main/engine.c:2377
 #, c-format
 msgid " .. GEPretty(.): new *lo = %g < %g = x1"
 msgstr ""
 
-#: src/main/engine.c:2373
+#: src/main/engine.c:2379
 #, c-format
 msgid " .. GEPretty(.): new *up = %g > %g = x2"
 msgstr ""
 
-#: src/main/engine.c:2773
+#: src/main/engine.c:2784
 msgid "display list redraw incomplete"
 msgstr ""
 
-#: src/main/engine.c:2777
+#: src/main/engine.c:2788
 msgid "invalid display list"
 msgstr "ugyldig skærmliste"
 
-#: src/main/engine.c:2963
+#: src/main/engine.c:2900
+#, c-format
+msgid ""
+"snapshot recorded with different graphics engine version (pre 11 - this is "
+"version %d)"
+msgstr ""
+
+#: src/main/engine.c:2904
+#, c-format
+msgid ""
+"snapshot recorded with different graphics engine version (%d - this is "
+"version %d)"
+msgstr ""
+
+#: src/main/engine.c:2983
 msgid "'expr' argument must be an expression"
 msgstr "'expr'-argumentet skal være et udtryk"
 
-#: src/main/engine.c:2965
+#: src/main/engine.c:2985
 msgid "'list' argument must be a list"
 msgstr ""
 
-#: src/main/engine.c:2971
+#: src/main/engine.c:2991
 msgid "'env' argument must be an environment"
 msgstr ""
 
-#: src/main/engine.c:3051 src/main/engine.c:3059
+#: src/main/engine.c:3071 src/main/engine.c:3079
 msgid "invalid multibyte char in pch=\"c\""
 msgstr ""
 
-#: src/main/engine.c:3106
+#: src/main/engine.c:3126
 msgid "invalid hex digit in 'color' or 'lty'"
 msgstr ""
 
-#: src/main/engine.c:3129
+#: src/main/engine.c:3149
 msgid "invalid line type: must be length 2, 4, 6 or 8"
 msgstr ""
 
-#: src/main/engine.c:3133
+#: src/main/engine.c:3153
 msgid "invalid line type: zeroes are not allowed"
 msgstr ""
 
-#: src/main/engine.c:3142 src/main/engine.c:3150 src/main/engine.c:3157
+#: src/main/engine.c:3162 src/main/engine.c:3170 src/main/engine.c:3177
 msgid "invalid line type"
 msgstr ""
 
@@ -2905,701 +2967,705 @@ msgstr ""
 msgid "cannot change value of locked binding for '%s'"
 msgstr ""
 
-#: src/main/envir.c:251 src/main/envir.c:1454
+#: src/main/envir.c:251 src/main/envir.c:1530
 msgid "cannot add bindings to a locked environment"
 msgstr ""
 
-#: src/main/envir.c:772
+#: src/main/envir.c:775
 msgid "invalid cached value in R_GetGlobalCache"
 msgstr ""
 
-#: src/main/envir.c:830
+#: src/main/envir.c:836
 msgid "cannot unbind in the base namespace"
 msgstr ""
 
-#: src/main/envir.c:832
+#: src/main/envir.c:838
 msgid "unbind in the base environment is unimplemented"
 msgstr ""
 
-#: src/main/envir.c:834 src/main/envir.c:1684
+#: src/main/envir.c:840 src/main/envir.c:1818
 msgid "cannot remove bindings from a locked environment"
 msgstr ""
 
-#: src/main/envir.c:1139
+#: src/main/envir.c:1213
 #, c-format
 msgid "argument to '%s' is not an environment"
 msgstr ""
 
-#: src/main/envir.c:1300
+#: src/main/envir.c:1374
 #, c-format
 msgid "the ... list does not contain %d elements"
 msgstr ""
 
-#: src/main/envir.c:1302
+#: src/main/envir.c:1376
 #, c-format
 msgid "..%d used in an incorrect context, no ... to look in"
 msgstr ""
 
-#: src/main/envir.c:1390 src/main/envir.c:1842 src/main/eval.c:573
-#: src/main/eval.c:3618
-#, c-format
-msgid "argument \"%s\" is missing, with no default"
-msgstr ""
-
-#: src/main/envir.c:1395
+#: src/main/envir.c:1469
 #, c-format
 msgid "could not find function \"%s\""
 msgstr ""
 
-#: src/main/envir.c:1418
+#: src/main/envir.c:1492
 msgid "cannot assign values in the empty environment"
 msgstr ""
 
-#: src/main/envir.c:1424 src/main/envir.c:1497
+#: src/main/envir.c:1498 src/main/envir.c:1628
 msgid "cannot assign variables to this database"
 msgstr ""
 
-#: src/main/envir.c:1580
+#: src/main/envir.c:1714
 #, c-format
 msgid "cannot add binding of '%s' to the base environment"
 msgstr ""
 
-#: src/main/envir.c:1609
+#: src/main/envir.c:1743
 msgid "only the first element is used as variable name"
 msgstr ""
 
-#: src/main/envir.c:1641
+#: src/main/envir.c:1775
 msgid "first argument must be a named list"
 msgstr ""
 
-#: src/main/envir.c:1646
+#: src/main/envir.c:1780
 msgid "names(x) must be a character vector of the same length as x"
 msgstr ""
 
-#: src/main/envir.c:1649
+#: src/main/envir.c:1783
 msgid "'envir' argument must be an environment"
 msgstr ""
 
-#: src/main/envir.c:1678
+#: src/main/envir.c:1812
 msgid "cannot remove variables from base namespace"
 msgstr ""
 
-#: src/main/envir.c:1680
+#: src/main/envir.c:1814
 msgid "cannot remove variables from the base environment"
 msgstr ""
 
-#: src/main/envir.c:1682
+#: src/main/envir.c:1816
 msgid "cannot remove variables from the empty environment"
 msgstr ""
 
-#: src/main/envir.c:1690
+#: src/main/envir.c:1824
 msgid "cannot remove variables from this database"
-msgstr ""
+msgstr "kan ikke fjerne variabler fra denne database"
 
-#: src/main/envir.c:1849
+#: src/main/envir.c:1985
 #, c-format
 msgid "object '%s' of mode '%s' was not found"
-msgstr ""
+msgstr "objekt '%s' for tilstand '%s' blev ikke fundet"
 
-#: src/main/envir.c:1921
+#: src/main/envir.c:2068
 #, c-format
 msgid "invalid name in position %d"
-msgstr ""
+msgstr "ugyldigt navn i position %d"
 
-#: src/main/envir.c:1927
+#: src/main/envir.c:2074
 msgid "second argument must be an environment"
 msgstr ""
 
-#: src/main/envir.c:1935 src/main/envir.c:1943
+#: src/main/envir.c:2082 src/main/envir.c:2090
 #, c-format
 msgid "wrong length for '%s' argument"
 msgstr "forkert længde for '%s'-argument"
 
-#: src/main/envir.c:2062
+#: src/main/envir.c:2221
 msgid "invalid use of 'missing'"
 msgstr "ugyldig brug af 'missing'"
 
-#: src/main/envir.c:2087
+#: src/main/envir.c:2247
 msgid "'missing' can only be used for arguments"
 msgstr "'missing' kan kun bruges for argumenter"
 
-#: src/main/envir.c:2168
+#: src/main/envir.c:2333
 msgid "'pos' must be an integer"
 msgstr "'pos' skal være et heltal"
 
-#: src/main/envir.c:2182
+#: src/main/envir.c:2347
 msgid "all elements of a list must be named"
 msgstr "alle elementer på en liste skal være navngivet"
 
-#: src/main/envir.c:2205
+#: src/main/envir.c:2370
 msgid "'attach' only works for lists, data frames and environments"
 msgstr "'attach' virker kun forlister, datarammer og miljøer"
 
-#: src/main/envir.c:2288
+#: src/main/envir.c:2453
 msgid "detaching \"package:base\" is not allowed"
 msgstr ""
 
-#: src/main/envir.c:2589 src/main/envir.c:2644
+#: src/main/envir.c:2798 src/main/envir.c:2879
 msgid "argument must be an environment"
 msgstr "argument skal være et miljø"
 
-#: src/main/envir.c:2648
+#: src/main/envir.c:2883
 msgid "arguments must be symbolic"
 msgstr "arguments skal være symbolske"
 
-#: src/main/envir.c:2772
+#: src/main/envir.c:3032
 msgid "no enclosing environment"
 msgstr ""
 
-#: src/main/envir.c:2825
+#: src/main/envir.c:3085
 #, c-format
 msgid "no item called \"%s\" on the search list"
 msgstr ""
 
-#: src/main/envir.c:2850
+#: src/main/envir.c:3110
 msgid "using 'as.environment(NULL)' is defunct"
 msgstr ""
 
-#: src/main/envir.c:2856
+#: src/main/envir.c:3116
 msgid "S4 object does not extend class \"environment\""
 msgstr "S4-objekt udvider ikke klasse \"environment\""
 
-#: src/main/envir.c:2871
+#: src/main/envir.c:3131
 msgid "invalid object for 'as.environment'"
 msgstr "ugyldigt objekt for 'as.environment'"
 
-#: src/main/envir.c:2897 src/main/envir.c:2925 src/main/envir.c:2954
-#: src/main/envir.c:2975 src/main/envir.c:2998 src/main/envir.c:3033
-#: src/main/envir.c:3054
+#: src/main/envir.c:3157 src/main/envir.c:3185 src/main/envir.c:3214
+#: src/main/envir.c:3235 src/main/envir.c:3258 src/main/envir.c:3293
+#: src/main/envir.c:3314
 msgid "not an environment"
 msgstr "ikke et miljø"
 
-#: src/main/envir.c:2949 src/main/envir.c:2970 src/main/envir.c:2991
-#: src/main/envir.c:3028 src/main/envir.c:3049 src/main/envir.c:3148
+#: src/main/envir.c:3209 src/main/envir.c:3230 src/main/envir.c:3251
+#: src/main/envir.c:3288 src/main/envir.c:3309 src/main/envir.c:3408
 msgid "not a symbol"
 msgstr "ikke et symbol"
 
-#: src/main/envir.c:2962 src/main/envir.c:2983 src/main/envir.c:3041
-#: src/main/envir.c:3062
+#: src/main/envir.c:3222 src/main/envir.c:3243 src/main/envir.c:3301
+#: src/main/envir.c:3322
 #, c-format
 msgid "no binding for \"%s\""
 msgstr "ingen binding for \"%s\""
 
-#: src/main/envir.c:2993
+#: src/main/envir.c:3253
 msgid "not a function"
 msgstr "ikke en funktion"
 
-#: src/main/envir.c:3001 src/main/envir.c:3017
+#: src/main/envir.c:3261 src/main/envir.c:3277
 msgid "symbol already has a regular binding"
 msgstr "symbol har allerede en regulær binding"
 
-#: src/main/envir.c:3003 src/main/envir.c:3019
+#: src/main/envir.c:3263 src/main/envir.c:3279
 msgid "cannot change active binding if binding is locked"
 msgstr "kan ikke ændre aktive binding hvis binding er låst"
 
-#: src/main/envir.c:3107
+#: src/main/envir.c:3367 src/main/envir.c:3604
 msgid "unknown op"
-msgstr ""
+msgstr "ukendt op"
 
-#: src/main/envir.c:3152
+#: src/main/envir.c:3412
 msgid "cannot unbind a locked binding"
 msgstr ""
 
-#: src/main/envir.c:3154
+#: src/main/envir.c:3414
 msgid "cannot unbind an active binding"
 msgstr ""
 
-#: src/main/envir.c:3289
+#: src/main/envir.c:3555
 msgid "bad namespace name"
 msgstr ""
 
-#: src/main/envir.c:3301
+#: src/main/envir.c:3567
 msgid "namespace already registered"
 msgstr "navnerum er allerede registreret"
 
-#: src/main/envir.c:3313
+#: src/main/envir.c:3579
 msgid "namespace not registered"
 msgstr "navnerum er ikke registreret"
 
-#: src/main/envir.c:3360
+#: src/main/envir.c:3635
 msgid "bad import environment argument"
 msgstr "ugyldigt arguement for importmiljø"
 
-#: src/main/envir.c:3365
+#: src/main/envir.c:3640
 msgid "bad export environment argument"
 msgstr "ugyldigt argument for eksportmiljø"
 
-#: src/main/envir.c:3369
+#: src/main/envir.c:3644
 msgid "length of import and export names must match"
 msgstr "længden på import- og eksportnavne skal matche"
 
-#: src/main/envir.c:3392
+#: src/main/envir.c:3667
 #, c-format
 msgid "exported symbol '%s' has no value"
 msgstr "eksporteret symbol '%s' har ingen værdi"
 
-#: src/main/envir.c:3557
+#: src/main/envir.c:3833
 #, c-format
 msgid "unknown encoding: %d"
 msgstr "ukendt kodning: %d"
 
-#: src/main/envir.c:3577
+#: src/main/envir.c:3853
 #, c-format
 msgid "embedded nul in string: '%s'"
 msgstr "indlejret nul i streng: '%s'"
 
-#: src/main/errors.c:178 src/main/errors.c:215
+#: src/main/errors.c:163 src/main/errors.c:200
 msgid "interrupts suspended; signal ignored"
 msgstr ""
 
-#: src/main/errors.c:318
+#: src/main/errors.c:250
+msgid "[... truncated]"
+msgstr "[... afkortet]"
+
+#: src/main/errors.c:310
 msgid "invalid option \"warning.expression\""
 msgstr "ugyldig indstilling \"warning.expression\""
 
-#: src/main/errors.c:348
+#: src/main/errors.c:339
 #, c-format
 msgid "(converted from warning) %s"
 msgstr "(konverteret fra advarsel) %s"
 
-#: src/main/errors.c:359
-#, c-format
-msgid "Warning: %s\n"
-msgstr "Advarsel: %s\n"
+#: src/main/errors.c:349
+msgid "Warning:"
+msgstr "Advarsel:"
 
-#: src/main/errors.c:363
+#: src/main/errors.c:351
 #, c-format
-msgid "Warning in %s : %s\n"
-msgstr "Advarsel i %s : %s\n"
+msgid "Warning in %s :"
+msgstr "Advarsel i %s :"
 
-#: src/main/errors.c:365
-#, c-format
-msgid ""
-"Warning in %s :\n"
-"  %s\n"
-msgstr ""
-"Advarsel i %s :\n"
-"  %s\n"
+#: src/main/errors.c:360 src/main/errors.c:374 src/main/errors.c:687
+msgid "Calls:"
+msgstr "Kald:"
 
-#: src/main/errors.c:428 src/main/errors.c:447 src/main/errors.c:596
+#: src/main/errors.c:421 src/main/errors.c:440 src/main/errors.c:602
 msgid "Lost warning messages\n"
 msgstr "Mistede advarselsbeskeder\n"
 
-#: src/main/errors.c:459
-msgid "Warning message:\n"
-msgid_plural "Warning messages:\n"
-msgstr[0] "Advarselsbesked:\n"
-msgstr[1] "Advarselsbeskeder:\n"
+#: src/main/errors.c:452
+msgid "Warning message:"
+msgid_plural "Warning messages:"
+msgstr[0] "Advarselsbesked:"
+msgstr[1] "Advarselsbeskeder:"
 
-#: src/main/errors.c:514
+#: src/main/errors.c:462 src/main/errors.c:490
 #, c-format
-msgid "There were %d warnings (use warnings() to see them)\n"
-msgstr "Der var %d advarsler (brug warnings() for at se dem)\n"
+msgid "In %s :"
+msgstr "I %s :"
 
-#: src/main/errors.c:517
+#: src/main/errors.c:515
 #, c-format
-msgid "There were %d or more warnings (use warnings() to see the first %d)\n"
+msgid "There was %d warning (use warnings() to see it)"
+msgid_plural "There were %d warnings (use warnings() to see them)"
+msgstr[0] "Der var %d advarsel (brug warnings() for at se dem)"
+msgstr[1] "Der var %d advarsler (brug warnings() for at se dem)"
+
+#: src/main/errors.c:520
+#, c-format
+msgid "There were %d or more warnings (use warnings() to see the first %d)"
 msgstr ""
-"Der var %d eller flere advarsler (brug warnings() for at se den første %d)\n"
+"Der var %d eller flere advarsler (brug warnings() for at se den første %d)"
 
-#: src/main/errors.c:587
+#: src/main/errors.c:593
 msgid "Error during wrapup: "
 msgstr ""
 
-#: src/main/errors.c:612
+#: src/main/errors.c:618
 msgid "Error in "
 msgstr "Fejl i "
 
-#: src/main/errors.c:613
+#: src/main/errors.c:640 src/main/errors.c:647
 #, c-format
-msgid " (from %s) : "
-msgstr " (fra %s) :"
+msgid "Error in %s (from %s) : "
+msgstr "Fejl i %s (fra %s) : "
 
-#: src/main/errors.c:664 src/main/errors.c:670
+#: src/main/errors.c:649
+#, c-format
+msgid "Error in %s : "
+msgstr "Fejl i %s : "
+
+#: src/main/errors.c:669 src/main/errors.c:675
 #, c-format
 msgid "Error: "
 msgstr "Fejl: "
 
-#: src/main/errors.c:690 src/main/errors.c:1319
+#: src/main/errors.c:696 src/main/errors.c:1300
 msgid "In addition: "
 msgstr ""
 
-#: src/main/errors.c:811
+#: src/main/errors.c:818
 msgid "invalid option \"error\"\n"
-msgstr ""
+msgstr "ugyldig tilvalg »error«\n"
 
-#: src/main/errors.c:893
-msgid "Execution halted\n"
-msgstr ""
-
-#: src/main/errors.c:1032
-msgid "'msg1' must be a character string"
-msgstr "'msg1' skal være en tegnstreng"
-
-#: src/main/errors.c:1034
-msgid "'msg2' must be a character string"
-msgstr "'msg2' skal være en tegnstreng"
+#: src/main/errors.c:1013 src/main/errors.c:1015 src/main/options.c:339
+#: src/main/unique.c:1638
+#, c-format
+msgid "'%s' must be a character string"
+msgstr "'%s' skal være en tegnstreng"
 
-#: src/main/errors.c:1131
+#: src/main/errors.c:1116
 msgid " [invalid string in stop(.)]"
 msgstr " [ugyldig streng i stop(.)]"
 
-#: src/main/errors.c:1162
+#: src/main/errors.c:1148
 msgid " [invalid string in warning(.)]"
 msgstr " [ugyldig streng i warning(.)]"
 
-#: src/main/errors.c:1178
+#: src/main/errors.c:1164
 #, c-format
 msgid "incorrect number of arguments to \"%s\""
 msgstr "forkert antal argumenter for \"%s\""
 
-#: src/main/errors.c:1184 src/main/errors.c:1199
+#: src/main/errors.c:1170 src/main/errors.c:1185
 #, c-format
 msgid "unimplemented feature in %s"
 msgstr "funktion ikke implementeret i %s"
 
-#: src/main/errors.c:1193
+#: src/main/errors.c:1179
 msgid "invalid number of arguments"
 msgstr "ugyldigt antal argumenter"
 
-#: src/main/errors.c:1194 src/main/logic.c:189
+#: src/main/errors.c:1180 src/main/logic.c:181
 msgid "invalid argument type"
 msgstr ""
 
-#: src/main/errors.c:1196
+#: src/main/errors.c:1182
 msgid "time-series/vector length mismatch"
 msgstr ""
 
-#: src/main/errors.c:1197
+#: src/main/errors.c:1183
 msgid "incompatible arguments"
 msgstr "argumenter er ikke kompatible"
 
-#: src/main/errors.c:1200
+#: src/main/errors.c:1186
 msgid "unknown error (report this!)"
 msgstr "ukendt fejl (rapporter denne!)"
 
-#: src/main/errors.c:1212
+#: src/main/errors.c:1195
+msgid "inaccurate integer conversion in coercion"
+msgstr ""
+
+#: src/main/errors.c:1198
 msgid "unknown warning (report this!)"
 msgstr "ukendt advarsel (rapporter denne !)"
 
-#: src/main/errors.c:1283
+#: src/main/errors.c:1269
 msgid "No function to return from, jumping to top level"
 msgstr "Ingen funktion at returnere fra, hopper til øverste niveau"
 
-#: src/main/errors.c:1299
+#: src/main/errors.c:1285
 msgid "top level inconsistency?"
 msgstr ""
 
-#: src/main/errors.c:1478
+#: src/main/errors.c:1459
 msgid "bad handler data"
 msgstr "ugyldige håndtagsdata"
 
-#: src/main/errors.c:1628
+#: src/main/errors.c:1613
 msgid "error message not a string"
 msgstr "fejlbesked er ikke en streng"
 
-#: src/main/errors.c:1703
+#: src/main/errors.c:1688
 msgid "handler or restart stack mismatch in old restart"
 msgstr ""
 
-#: src/main/errors.c:1729 src/main/errors.c:1745
+#: src/main/errors.c:1714 src/main/errors.c:1730
 msgid "bad error message"
 msgstr "ugyldig fejlbesked"
 
-#: src/main/errors.c:1787
+#: src/main/errors.c:1771
 msgid "bad restart"
 msgstr "ugyldig restart"
 
-#: src/main/errors.c:1819
+#: src/main/errors.c:1803
 msgid "restart not on stack"
 msgstr ""
 
-#: src/main/errors.c:1836
+#: src/main/errors.c:1819
 msgid "not in a try context"
 msgstr ""
 
-#: src/main/errors.c:1849
+#: src/main/errors.c:1832
 msgid "error message must be a character string"
 msgstr "fejlbesked skal være en tegnstreng"
 
-#: src/main/eval.c:308
+#: src/main/eval.c:365
 #, c-format
 msgid "source files skipped by Rprof; please increase '%s'"
 msgstr ""
 
-#: src/main/eval.c:328
+#: src/main/eval.c:385
 #, c-format
 msgid "Rprof: cannot open profile file '%s'"
 msgstr "Rprof: Kan ikke åbne profilfil '%s'"
 
-#: src/main/eval.c:422
+#: src/main/eval.c:479
 msgid "R profiling is not available on this system"
 msgstr "R-profilering er ikke tilgængelig på dette system"
 
-#: src/main/eval.c:446
+#: src/main/eval.c:503
 msgid ""
 "promise already under evaluation: recursive default argument reference or "
 "earlier problems?"
 msgstr ""
 
-#: src/main/eval.c:448
+#: src/main/eval.c:505
 msgid "restarting interrupted promise evaluation"
 msgstr ""
 
-#: src/main/eval.c:544
+#: src/main/eval.c:601
 msgid ""
 "evaluation nested too deeply: infinite recursion / options(expressions=)?"
 msgstr ""
 
-#: src/main/eval.c:575 src/main/eval.c:3619
+#: src/main/eval.c:632 src/main/eval.c:4238
 msgid "argument is missing, with no default"
-msgstr ""
+msgstr "argument mangler, uden nogen standard"
 
-#: src/main/eval.c:679 src/main/eval.c:4642
+#: src/main/eval.c:736 src/main/eval.c:1306 src/main/eval.c:5533
 msgid "attempt to apply non-function"
 msgstr ""
 
-#: src/main/eval.c:702
+#: src/main/eval.c:759
 #, c-format
 msgid "%s at %s#%d: "
 msgstr ""
 
-#: src/main/eval.c:1178
+#: src/main/eval.c:1298 src/main/eval.c:2271
+#, c-format
+msgid "argument %d is empty"
+msgstr "argument %d er tomt"
+
+#: src/main/eval.c:1350
 #, c-format
 msgid "could not find symbol \"%s\" in environment of the generic function"
-msgstr ""
+msgstr "kunne ikke finde symbol »%s« i miljø for den generiske funktion"
 
-#: src/main/eval.c:1196
+#: src/main/eval.c:1368
 #, c-format
 msgid "symbol \"%s\" not in environment of method"
-msgstr ""
+msgstr "symbol »%s« er ikke i metodemiljø"
 
-#: src/main/eval.c:1308
+#: src/main/eval.c:1481
 msgid "the condition has length > 1 and only the first element will be used"
 msgstr "betingelsen har længde > 1 og kun det første element vil blive brugt"
 
-#: src/main/eval.c:1325
+#: src/main/eval.c:1500
 msgid "missing value where TRUE/FALSE needed"
 msgstr "manglende værdi hvor TRUE/FALSE er krævet"
 
-#: src/main/eval.c:1326
+#: src/main/eval.c:1501
 msgid "argument is not interpretable as logical"
 msgstr "argument kan ikke fortolkes som logisk"
 
-#: src/main/eval.c:1327
+#: src/main/eval.c:1502
 msgid "argument is of length zero"
 msgstr "argument har længden nul"
 
-#: src/main/eval.c:1418
+#: src/main/eval.c:1596
 msgid "non-symbol loop variable"
 msgstr ""
 
-#: src/main/eval.c:1510 src/main/eval.c:4408
+#: src/main/eval.c:1687 src/main/eval.c:5301
 msgid "invalid for() loop sequence"
 msgstr ""
 
-#: src/main/eval.c:1652
+#: src/main/eval.c:1826
 msgid "multi-argument returns are not permitted"
 msgstr ""
 
-#: src/main/eval.c:1701
+#: src/main/eval.c:1873
 msgid "invalid (NULL) left side of assignment"
 msgstr ""
 
-#: src/main/eval.c:1734
+#: src/main/eval.c:1907
 msgid "target of assignment expands to non-language object"
 msgstr ""
 
-#: src/main/eval.c:1817
+#: src/main/eval.c:1990
 #, c-format
 msgid "overlong name in '%s'"
 msgstr ""
 
-#: src/main/eval.c:1915
+#: src/main/eval.c:2080
 msgid "cannot do complex assignments in base namespace"
 msgstr ""
 
-#: src/main/eval.c:1917
+#: src/main/eval.c:2082
 msgid "cannot do complex assignments in base environment"
 msgstr ""
 
-#: src/main/eval.c:1954 src/main/eval.c:1981
+#: src/main/eval.c:2121 src/main/eval.c:2148
 msgid "invalid function in complex assignment"
 msgstr ""
 
-#: src/main/eval.c:2041
+#: src/main/eval.c:2208
 msgid "invalid (do_set) left-hand side to assignment"
 msgstr ""
 
-#: src/main/eval.c:2103
-#, c-format
-msgid "argument %d is empty"
-msgstr "argument %d er tomt"
-
-#: src/main/eval.c:2116
+#: src/main/eval.c:2284
 #, c-format
 msgid "'%s' is missing"
 msgstr "'%s' mangler"
 
-#: src/main/eval.c:2267
+#: src/main/eval.c:2439
 msgid "invalid formal argument list for \"function\""
 msgstr ""
 
-#: src/main/eval.c:2325 src/main/eval.c:2356 src/main/eval.c:2361
+#: src/main/eval.c:2497 src/main/eval.c:2528 src/main/eval.c:2533
 #, c-format
 msgid "invalid '%s' argument of type '%s'"
 msgstr "ugyldigt '%s'-argument af typen '%s'"
 
-#: src/main/eval.c:2353
+#: src/main/eval.c:2525
 msgid "numeric 'envir' arg not of length one"
 msgstr ""
 
-#: src/main/eval.c:2377 src/main/eval.c:2399
+#: src/main/eval.c:2549 src/main/eval.c:2573
 msgid "restarts not supported in 'eval'"
 msgstr ""
 
-#: src/main/eval.c:2456 src/main/eval.c:2469
+#: src/main/eval.c:2632 src/main/eval.c:2645
 msgid "'Recall' called from outside a closure"
 msgstr ""
 
-#: src/main/eval.c:2562
+#: src/main/eval.c:2738
 msgid "value in '...' is not a promise"
 msgstr ""
 
-#: src/main/eval.c:2754 src/main/objects.c:720
-#, c-format
-msgid "call name too long in '%s'"
-msgstr "kaldnavn for langt i '%s'"
-
-#: src/main/eval.c:2775
-#, c-format
-msgid "generic name too long in '%s'"
-msgstr "generisk navn for langt i '%s'"
-
-#: src/main/eval.c:2840
+#: src/main/eval.c:2999
 #, c-format
 msgid "Incompatible methods (\"%s\", \"%s\") for \"%s\""
 msgstr ""
 
-#: src/main/eval.c:2906
+#: src/main/eval.c:3048
 msgid "dispatch error in group dispatch"
 msgstr ""
 
-#: src/main/eval.c:3201
+#: src/main/eval.c:3532
 #, c-format
 msgid "\"%s\" is not a %s function"
 msgstr "\"%s\" er ikke en %s-funktion"
 
-#: src/main/eval.c:3430
+#: src/main/eval.c:4047
 msgid "node stack overflow"
 msgstr ""
 
-#: src/main/eval.c:3436
+#: src/main/eval.c:4053
 msgid "integer stack overflow"
 msgstr ""
 
-#: src/main/eval.c:3490
+#: src/main/eval.c:4107
 msgid "bad opcode"
 msgstr "ugyldig opcode"
 
-#: src/main/eval.c:4219
+#: src/main/eval.c:5083
 #, c-format
 msgid "invalid %s type in 'x %s y'"
 msgstr ""
 
-#: src/main/eval.c:4310
+#: src/main/eval.c:5195
 msgid "bytecode version mismatch; using eval"
 msgstr ""
 
-#: src/main/eval.c:4315
+#: src/main/eval.c:5200
 msgid "bytecode version is too old"
 msgstr ""
 
-#: src/main/eval.c:4316
+#: src/main/eval.c:5201
 msgid "bytecode version is too new"
 msgstr ""
 
-#: src/main/eval.c:4350
+#: src/main/eval.c:5235
 msgid "byte code version mismatch"
 msgstr ""
 
-#: src/main/eval.c:4477
+#: src/main/eval.c:5383
 msgid "invalid sequence argument in for loop"
 msgstr ""
 
-#: src/main/eval.c:4624 src/main/names.c:1181
+#: src/main/eval.c:5522 src/main/names.c:1312
 #, c-format
 msgid "there is no .Internal function '%s'"
 msgstr ""
 
-#: src/main/eval.c:4731 src/main/eval.c:5077 src/main/eval.c:5119
+#: src/main/eval.c:5622 src/main/eval.c:5968 src/main/eval.c:6008
 msgid "bad function"
 msgstr ""
 
-#: src/main/eval.c:4746
+#: src/main/eval.c:5635
 msgid "not a BUILTIN function"
 msgstr ""
 
-#: src/main/eval.c:5159
+#: src/main/eval.c:6066
+msgid "bad numeric 'switch' offsets"
+msgstr ""
+
+#: src/main/eval.c:6072
 msgid "numeric EXPR required for 'switch' without named alternatives"
 msgstr ""
 
-#: src/main/eval.c:5255
+#: src/main/eval.c:6076
+msgid "bad character 'switch' offsets"
+msgstr ""
+
+#: src/main/eval.c:6188
 msgid "cannot find index for threaded code address"
 msgstr ""
 
-#: src/main/eval.c:5315
+#: src/main/eval.c:6248
 msgid "invalid body"
 msgstr ""
 
-#: src/main/eval.c:5335
+#: src/main/eval.c:6268
 msgid "invalid symbol"
 msgstr ""
 
-#: src/main/eval.c:5379
+#: src/main/eval.c:6312
 msgid "argument is not a byte code object"
 msgstr ""
 
-#: src/main/eval.c:5400
+#: src/main/eval.c:6334
 msgid "bad file name"
 msgstr ""
 
-#: src/main/eval.c:5404 src/main/eval.c:5425
+#: src/main/eval.c:6338 src/main/eval.c:6359
 msgid "unable to open 'file'"
 msgstr ""
 
-#: src/main/eval.c:5419 src/main/saveload.c:1942
+#: src/main/eval.c:6353 src/main/saveload.c:1944
 msgid "'file' must be non-empty string"
 msgstr ""
 
-#: src/main/eval.c:5421 src/main/saveload.c:1944 src/main/saveload.c:2244
-#: src/main/serialize.c:2149
+#: src/main/eval.c:6355 src/main/saveload.c:1946 src/main/saveload.c:2246
+#: src/main/serialize.c:2189
 msgid "'ascii' must be logical"
 msgstr ""
 
-#: src/main/eval.c:5492 src/main/eval.c:5511 src/main/eval.c:5541
+#: src/main/eval.c:6426 src/main/eval.c:6445 src/main/eval.c:6475
 msgid "constant buffer must be a generic vector"
 msgstr ""
 
-#: src/main/eval.c:5543
+#: src/main/eval.c:6477
 msgid "bad constant count"
 msgstr ""
 
-#: src/main/eval.c:5579
+#: src/main/eval.c:6515
 msgid "profile timer in use"
 msgstr ""
 
-#: src/main/eval.c:5581
+#: src/main/eval.c:6517
 msgid "already byte code profiling"
 msgstr ""
 
-#: src/main/eval.c:5599
+#: src/main/eval.c:6535
 msgid "setting profile timer failed"
 msgstr ""
 
-#: src/main/eval.c:5616
+#: src/main/eval.c:6553
 msgid "not byte code profiling"
 msgstr ""
 
+#: src/main/eval.c:6569 src/main/eval.c:6573 src/main/eval.c:6577
+msgid "byte code profiling is not supported in this build"
+msgstr "bytekodeprofilering er ikke understøttet i denne bygning"
+
 #: src/main/gevents.c:43
 #, c-format
 msgid "'%s' events not supported in this device"
@@ -3607,32 +3673,32 @@ msgstr ""
 
 #: src/main/gevents.c:67
 msgid "internal error"
-msgstr ""
+msgstr "intern fejl"
 
 #: src/main/gevents.c:73
 msgid "this graphics device does not support event handling"
-msgstr ""
+msgstr "denne grafiskenhed understøtter ikke hændelseshandling"
 
-#: src/main/gevents.c:136
+#: src/main/gevents.c:135
 msgid "invalid prompt"
 msgstr ""
 
-#: src/main/gevents.c:148
+#: src/main/gevents.c:146
 msgid "recursive use of 'getGraphicsEvent' not supported"
 msgstr ""
 
-#: src/main/gevents.c:158
+#: src/main/gevents.c:157
 msgid "no graphics event handlers set"
 msgstr ""
 
-#: src/main/gram.y:222 src/main/gram.y:237 src/main/gram.y:2222
-#: src/main/gram.y:2236
+#: src/main/gram.y:222 src/main/gram.y:237 src/main/gram.y:2245
+#: src/main/gram.y:2259
 #, c-format
 msgid "EOF whilst reading MBCS char at line %d"
 msgstr ""
 
-#: src/main/gram.y:226 src/main/gram.y:234 src/main/gram.y:2226
-#: src/main/gram.y:2233
+#: src/main/gram.y:226 src/main/gram.y:234 src/main/gram.y:2249
+#: src/main/gram.y:2256
 #, c-format
 msgid "invalid multibyte character in parser at line %d"
 msgstr ""
@@ -3647,126 +3713,139 @@ msgstr ""
 msgid "incorrect tag type at line %d"
 msgstr ""
 
-#: src/main/gram.y:1653
+#: src/main/gram.y:1657
 msgid "contextstack overflow"
 msgstr ""
 
-#: src/main/gram.y:1890
-msgid "input"
+#: src/main/gram.y:1907 src/main/gram.y:1913
+#, c-format
+msgid "unexpected input"
 msgstr ""
 
-#: src/main/gram.y:1891
-msgid "end of input"
+#: src/main/gram.y:1910 src/main/main.c:311
+#, c-format
+msgid "unexpected end of input"
 msgstr ""
 
-#: src/main/gram.y:1892
-msgid "string constant"
-msgstr ""
+#: src/main/gram.y:1916
+#, c-format
+msgid "unexpected string constant"
+msgstr "uventet strengkonstant"
 
-#: src/main/gram.y:1893
-msgid "numeric constant"
-msgstr ""
+#: src/main/gram.y:1919
+#, c-format
+msgid "unexpected numeric constant"
+msgstr "uventet numerisk konstant"
 
-#: src/main/gram.y:1894
-msgid "symbol"
-msgstr "symbol"
+#: src/main/gram.y:1922
+#, c-format
+msgid "unexpected symbol"
+msgstr "uventet symbol"
 
-#: src/main/gram.y:1895
-msgid "assignment"
-msgstr ""
+#: src/main/gram.y:1925
+#, c-format
+msgid "unexpected assignment"
+msgstr "uventet tildeling"
 
-#: src/main/gram.y:1896
-msgid "end of line"
+#: src/main/gram.y:1928
+#, c-format
+msgid "unexpected end of line"
 msgstr ""
 
-#: src/main/gram.y:1910 src/main/gram.y:1916
+#: src/main/gram.y:1931 src/main/gram.y:1939
 #, c-format
 msgid "unexpected %s"
-msgstr ""
+msgstr "uventet %s"
 
-#: src/main/gram.y:1926
+#: src/main/gram.y:1951
 #, c-format
 msgid "repeated formal argument '%s' on line %d"
 msgstr ""
 
-#: src/main/gram.y:2136
+#: src/main/gram.y:2161
 #, c-format
 msgid "integer literal %s contains decimal; using numeric value"
 msgstr ""
 
-#: src/main/gram.y:2140
+#: src/main/gram.y:2164
 #, c-format
 msgid "non-integer value %s qualified with L; using numeric value"
 msgstr ""
 
-#: src/main/gram.y:2153
+#: src/main/gram.y:2176
 #, c-format
 msgid "integer literal %s contains unnecessary decimal point"
 msgstr ""
 
-#: src/main/gram.y:2185
+#: src/main/gram.y:2208
 #, c-format
 msgid "unable to allocate buffer for long string at line %d"
 msgstr ""
 
-#: src/main/gram.y:2338
+#: src/main/gram.y:2347 src/main/gram.y:2370 src/main/gram.y:2407
+#: src/main/gram.y:2443
+#, c-format
+msgid "nul character not allowed (line %d)"
+msgstr ""
+
+#: src/main/gram.y:2363
 #, c-format
 msgid "'\\x' used without hex digits in character string starting \"%s\""
 msgstr ""
 
-#: src/main/gram.y:2352
+#: src/main/gram.y:2379
 #, c-format
 msgid "\\uxxxx sequences not supported inside backticks (line %d)"
 msgstr ""
 
-#: src/main/gram.y:2367
+#: src/main/gram.y:2394
 #, c-format
 msgid "'\\u' used without hex digits in character string starting \"%s\""
 msgstr ""
 
-#: src/main/gram.y:2375
+#: src/main/gram.y:2402
 #, c-format
 msgid "invalid \\u{xxxx} sequence (line %d)"
 msgstr ""
 
-#: src/main/gram.y:2387
+#: src/main/gram.y:2416
 #, c-format
 msgid "\\Uxxxxxxxx sequences not supported inside backticks (line %d)"
 msgstr ""
 
-#: src/main/gram.y:2402
+#: src/main/gram.y:2431
 #, c-format
 msgid "'\\U' used without hex digits in character string starting \"%s\""
 msgstr ""
 
-#: src/main/gram.y:2410
+#: src/main/gram.y:2439
 #, c-format
 msgid "invalid \\U{xxxxxxxx} sequence (line %d)"
 msgstr ""
 
-#: src/main/gram.y:2451
+#: src/main/gram.y:2482
 #, c-format
 msgid "'\\%c' is an unrecognized escape in character string starting \"%s\""
 msgstr ""
 
-#: src/main/gram.y:2510
+#: src/main/gram.y:2546
 msgid "mixing Unicode and octal/hex escapes in a string is not allowed"
 msgstr ""
 
-#: src/main/gram.y:2514
+#: src/main/gram.y:2550
 #, c-format
 msgid ""
 "string at line %d containing Unicode escapes not in this locale\n"
 "is too long (max 10000 chars)"
 msgstr ""
 
-#: src/main/gram.y:3112 src/main/gram.y:3119 src/main/gram.y:3125
-#: src/main/gram.y:3132
+#: src/main/gram.y:3148 src/main/gram.y:3155 src/main/gram.y:3161
+#: src/main/gram.y:3168
 #, c-format
 msgid "contextstack overflow at line %d"
 msgstr ""
 
-#: src/main/gram.y:3227
+#: src/main/gram.y:3263
 #, c-format
 msgid "internal parser error at line %d"
 msgstr ""
@@ -3776,34 +3855,34 @@ msgstr ""
 msgid "relative range of values =%4.0f * EPS, is small (axis %d)"
 msgstr ""
 
-#: src/main/grep.c:93
+#: src/main/grep.c:96
 #, c-format
 msgid "invalid regular expression '%s', reason '%s'"
 msgstr ""
 
-#: src/main/grep.c:95
+#: src/main/grep.c:98
 #, c-format
 msgid "invalid regular expression, reason '%s'"
 msgstr ""
 
-#: src/main/grep.c:220 src/main/grep.c:308 src/main/grep.c:416
-#: src/main/grep.c:883 src/main/grep.c:2473
+#: src/main/grep.c:225 src/main/grep.c:315 src/main/grep.c:426
+#: src/main/grep.c:900 src/main/grep.c:2502
 #, c-format
 msgid "input string %d is invalid UTF-8"
 msgstr ""
 
-#: src/main/grep.c:286 src/main/grep.c:383
+#: src/main/grep.c:292 src/main/grep.c:391
 #, c-format
 msgid "'split' string %d is invalid UTF-8"
 msgstr ""
 
-#: src/main/grep.c:290 src/main/grep.c:387 src/main/grep.c:560
+#: src/main/grep.c:296 src/main/grep.c:395 src/main/grep.c:571
 #, c-format
 msgid "'split' string %d is invalid in this locale"
 msgstr ""
 
-#: src/main/grep.c:395 src/main/grep.c:851 src/main/grep.c:1600
-#: src/main/grep.c:2394
+#: src/main/grep.c:404 src/main/grep.c:867 src/main/grep.c:1621
+#: src/main/grep.c:2419
 #, c-format
 msgid ""
 "PCRE pattern compilation error\n"
@@ -3811,58 +3890,58 @@ msgid ""
 "\tat '%s'\n"
 msgstr ""
 
-#: src/main/grep.c:397
+#: src/main/grep.c:406
 #, c-format
 msgid "invalid split pattern '%s'"
 msgstr ""
 
-#: src/main/grep.c:401 src/main/grep.c:857 src/main/grep.c:1607
-#: src/main/grep.c:2401
+#: src/main/grep.c:410 src/main/grep.c:873 src/main/grep.c:1628
+#: src/main/grep.c:2426
 #, c-format
 msgid ""
 "PCRE pattern study error\n"
 "\t'%s'\n"
 msgstr ""
 
-#: src/main/grep.c:834 src/main/grep.c:2377
+#: src/main/grep.c:849 src/main/grep.c:2401
 msgid "regular expression is invalid UTF-8"
 msgstr ""
 
-#: src/main/grep.c:853 src/main/grep.c:1602 src/main/grep.c:2396
+#: src/main/grep.c:869 src/main/grep.c:1623 src/main/grep.c:2421
 #, c-format
 msgid "invalid regular expression '%s'"
 msgstr ""
 
-#: src/main/grep.c:1264
+#: src/main/grep.c:1282
 msgid "pattern matches an empty string infinitely, returning first match only"
 msgstr ""
 
-#: src/main/grep.c:1575
+#: src/main/grep.c:1595
 msgid "'pattern' is invalid UTF-8"
 msgstr ""
 
-#: src/main/grep.c:1577
+#: src/main/grep.c:1597
 msgid "'replacement' is invalid UTF-8"
 msgstr ""
 
-#: src/main/grep.c:1581
+#: src/main/grep.c:1601
 msgid "'pattern' is invalid in this locale"
 msgstr ""
 
-#: src/main/grep.c:1584
+#: src/main/grep.c:1604
 msgid "'replacement' is invalid in this locale"
 msgstr ""
 
-#: src/main/grep.c:1589
+#: src/main/grep.c:1609
 msgid "zero-length pattern"
 msgstr ""
 
-#: src/main/grep.c:1732 src/main/grep.c:1748 src/main/grep.c:1796
-#: src/main/grep.c:1812 src/main/grep.c:1859 src/main/grep.c:1875
+#: src/main/grep.c:1753 src/main/grep.c:1769 src/main/grep.c:1817
+#: src/main/grep.c:1833 src/main/grep.c:1880 src/main/grep.c:1896
 msgid "result string is too long"
 msgstr ""
 
-#: src/main/grep.c:2411
+#: src/main/grep.c:2436
 #, c-format
 msgid "'pcre_fullinfo' returned '%d' "
 msgstr ""
@@ -3871,31 +3950,26 @@ msgstr ""
 msgid "ignoring non-pairlist attributes"
 msgstr ""
 
-#: src/main/internet.c:92
+#: src/main/internet.c:83
 msgid "internet routines cannot be accessed in module"
 msgstr ""
 
-#: src/main/internet.c:103 src/main/internet.c:141 src/main/internet.c:154
-#: src/main/internet.c:165 src/main/internet.c:176 src/main/internet.c:187
-#: src/main/internet.c:196 src/main/internet.c:207 src/main/internet.c:218
-#: src/main/internet.c:227 src/main/internet.c:237
+#: src/main/internet.c:94 src/main/internet.c:106 src/main/internet.c:119
+#: src/main/internet.c:130 src/main/internet.c:141 src/main/internet.c:152
+#: src/main/internet.c:161 src/main/internet.c:172 src/main/internet.c:183
+#: src/main/internet.c:192 src/main/internet.c:202 src/main/internet.c:318
+#: src/main/internet.c:330 src/main/internet.c:342 src/main/internet.c:354
 msgid "internet routines cannot be loaded"
 msgstr ""
 
-#: src/main/internet.c:118 src/main/memory.c:3434 src/main/memory.c:3444
-#: src/main/memory.c:3456 src/main/memory.c:3470 src/main/memory.c:3487
-#: src/main/memory.c:3505
-msgid "bad value"
-msgstr ""
-
-#: src/main/internet.c:124
-msgid "internet routines were already initialized"
+#: src/main/internet.c:216 src/main/internet.c:230 src/main/internet.c:247
+#: src/main/internet.c:259 src/main/internet.c:273 src/main/internet.c:293
+#: src/main/internet.c:306
+msgid "socket routines cannot be loaded"
 msgstr ""
 
-#: src/main/internet.c:251 src/main/internet.c:265 src/main/internet.c:281
-#: src/main/internet.c:293 src/main/internet.c:307 src/main/internet.c:327
-#: src/main/internet.c:340
-msgid "socket routines cannot be loaded"
+#: src/main/internet.c:242
+msgid "attempt to close invalid socket"
 msgstr ""
 
 #: src/main/lapack.c:39
@@ -3906,42 +3980,38 @@ msgstr ""
 msgid "LAPACK routines cannot be loaded"
 msgstr ""
 
-#: src/main/logic.c:70
-msgid "binary operations require two arguments"
-msgstr ""
-
-#: src/main/logic.c:88 src/main/logic.c:150
+#: src/main/logic.c:80 src/main/logic.c:142
 msgid "operations are possible only for numeric, logical or complex types"
 msgstr ""
 
-#: src/main/logic.c:98
+#: src/main/logic.c:90
 msgid "binary operation on non-conformable arrays"
 msgstr ""
 
-#: src/main/logic.c:124 src/main/relop.c:247
+#: src/main/logic.c:116 src/main/relop.c:241
 msgid "non-conformable time series"
 msgstr ""
 
-#: src/main/logic.c:254
+#: src/main/logic.c:247
 #, c-format
 msgid "'%s' operator requires 2 arguments"
 msgstr ""
 
-#: src/main/logic.c:261
+#: src/main/logic.c:254
 #, c-format
 msgid "invalid 'x' type in 'x %s y'"
 msgstr ""
 
-#: src/main/logic.c:268
+#: src/main/logic.c:261
 #, c-format
 msgid "invalid 'y' type in 'x %s y'"
 msgstr ""
 
-#: src/main/logic.c:341
+#: src/main/logic.c:334
 msgid "Unary operator `!' called with two arguments"
-msgstr ""
+msgstr "Unær-operator `!' kaldt med to argumenter"
 
-#: src/main/logic.c:448
+#: src/main/logic.c:439
 #, c-format
 msgid "coercing argument of type '%s' to logical"
 msgstr ""
@@ -3950,61 +4020,75 @@ msgstr ""
 msgid "dummy - do not translate"
 msgstr ""
 
-#: src/main/main.c:476
+#: src/main/main.c:329
+#, fuzzy
+msgid "error during cleanup\n"
+msgstr "skrivefejl under filtilføjelse"
+
+#: src/main/main.c:336
+msgid "Execution halted\n"
+msgstr "Kørsel stoppet\n"
+
+#: src/main/main.c:505
 msgid "Error: segfault from C stack overflow\n"
 msgstr ""
 
-#: src/main/main.c:846
+#: src/main/main.c:888
 msgid "unable to open the base package\n"
 msgstr ""
 
-#: src/main/main.c:924
+#: src/main/main.c:971
 #, c-format
 msgid "unable to restore saved data in %s\n"
 msgstr ""
 
-#: src/main/main.c:971
+#: src/main/main.c:1020
 msgid "During startup - "
 msgstr ""
 
-#: src/main/main.c:1224
+#: src/main/main.c:1036
+#, fuzzy
+msgid "unable to initialize the JIT\n"
+msgstr "kan ikke åbne og læse fil"
+
+#: src/main/main.c:1290
 msgid "cannot quit from browser"
 msgstr ""
 
-#: src/main/main.c:1228
+#: src/main/main.c:1294
 msgid "one of \"yes\", \"no\", \"ask\" or \"default\" expected."
 msgstr ""
 
-#: src/main/main.c:1233
+#: src/main/main.c:1299
 msgid "save=\"ask\" in non-interactive use: command-line default will be used"
 msgstr ""
 
-#: src/main/main.c:1241
+#: src/main/main.c:1307
 msgid "unrecognized value of 'save'"
 msgstr ""
 
-#: src/main/main.c:1244
+#: src/main/main.c:1310
 msgid "invalid 'status', 0 assumed"
 msgstr ""
 
-#: src/main/main.c:1249
+#: src/main/main.c:1315
 msgid "invalid 'runLast', FALSE assumed"
 msgstr ""
 
-#: src/main/main.c:1280
+#: src/main/main.c:1346
 msgid "cannot allocate space for toplevel callback element"
 msgstr ""
 
-#: src/main/main.c:1358
+#: src/main/main.c:1424
 msgid "negative index passed to R_removeTaskCallbackByIndex"
 msgstr ""
 
-#: src/main/main.c:1468
+#: src/main/main.c:1534
 #, c-format
 msgid "warning messages from top-level task callback '%s'\n"
 msgstr ""
 
-#: src/main/main.c:1524
+#: src/main/main.c:1591
 msgid "top-level task callback did not return a logical value"
 msgstr ""
 
@@ -4024,226 +4108,223 @@ msgstr ""
 msgid "invalid partial string match"
 msgstr ""
 
-#: src/main/match.c:228 src/main/match.c:268 src/main/objects.c:56
-#: src/main/objects.c:66
+#: src/main/match.c:228 src/main/match.c:266 src/main/objects.c:49
+#: src/main/objects.c:59
 #, c-format
 msgid "formal argument \"%s\" matched by multiple actual arguments"
 msgstr ""
 
-#: src/main/match.c:231 src/main/match.c:266
+#: src/main/match.c:231 src/main/match.c:264
 #, c-format
 msgid "argument %d matches multiple formal arguments"
 msgstr ""
 
-#: src/main/match.c:272
+#: src/main/match.c:270
 #, c-format
 msgid "partial argument match of '%s' to '%s'"
 msgstr ""
 
-#: src/main/match.c:383
+#: src/main/match.c:380
 #, c-format
 msgid "unused argument %s"
 msgid_plural "unused arguments %s"
 msgstr[0] "ubrugt argument %s"
 msgstr[1] "ubrugte argumenter %s"
 
-#: src/main/memory.c:1232
+#: src/main/memory.c:1234
 msgid "can only weakly reference/finalize reference objects"
 msgstr ""
 
-#: src/main/memory.c:1266
+#: src/main/memory.c:1268
 msgid "finalizer must be a function or NULL"
 msgstr ""
 
-#: src/main/memory.c:1322 src/main/memory.c:1330 src/main/memory.c:1341
+#: src/main/memory.c:1324 src/main/memory.c:1332 src/main/memory.c:1343
 msgid "not a weak reference"
 msgstr "ikke en svag reference"
 
-#: src/main/memory.c:1472
+#: src/main/memory.c:1474
 msgid "first argument must be environment or external pointer"
 msgstr ""
 
-#: src/main/memory.c:1474
+#: src/main/memory.c:1476
 msgid "second argument must be a function"
 msgstr ""
 
-#: src/main/memory.c:1478
+#: src/main/memory.c:1480
 msgid "third argument must be 'TRUE' or 'FALSE'"
 msgstr ""
 
-#: src/main/memory.c:1970
+#: src/main/memory.c:1979
 msgid "vector memory exhausted (limit reached?)"
 msgstr ""
 
-#: src/main/memory.c:1976
+#: src/main/memory.c:1985
 msgid "cons memory exhausted (limit reached?)"
 msgstr ""
 
-#: src/main/memory.c:1981
+#: src/main/memory.c:1990
 msgid "memory exhausted (limit reached?)"
 msgstr ""
 
-#: src/main/memory.c:2116
+#: src/main/memory.c:2126
 #, c-format
 msgid "cannot allocate memory block of size %0.f Tb"
 msgstr ""
 
-#: src/main/memory.c:2121
+#: src/main/memory.c:2131
 #, c-format
 msgid "cannot allocate memory block of size %0.1f Gb"
 msgstr ""
 
-#: src/main/memory.c:2442
+#: src/main/memory.c:2458
 msgid "vector is too large"
 msgstr ""
 
-#: src/main/memory.c:2445
+#: src/main/memory.c:2461
 msgid "negative length vectors are not allowed"
 msgstr ""
 
-#: src/main/memory.c:2471 src/main/memory.c:2484 src/main/memory.c:2497
-#: src/main/memory.c:2512
+#: src/main/memory.c:2487 src/main/memory.c:2500 src/main/memory.c:2513
+#: src/main/memory.c:2528
 #, c-format
 msgid "cannot allocate vector of length %d"
 msgstr ""
 
-#: src/main/memory.c:2533
+#: src/main/memory.c:2549
 #, c-format
 msgid "invalid type/length (%s/%d) in vector allocation"
 msgstr ""
 
-#: src/main/memory.c:2636
+#: src/main/memory.c:2648
 #, c-format
 msgid "cannot allocate vector of size %0.1f Gb"
 msgstr ""
 
-#: src/main/memory.c:2640
+#: src/main/memory.c:2652
 #, c-format
 msgid "cannot allocate vector of size %0.1f Mb"
 msgstr ""
 
-#: src/main/memory.c:2644
+#: src/main/memory.c:2656
 #, c-format
 msgid "cannot allocate vector of size %0.f Kb"
 msgstr ""
 
-#: src/main/memory.c:3001
+#: src/main/memory.c:3071
 msgid "protect(): protection stack overflow"
 msgstr ""
 
-#: src/main/memory.c:3008
+#: src/main/memory.c:3078
 #, c-format
-msgid "unprotect(): only %d protected items"
-msgstr ""
+msgid "unprotect(): only %d protected item"
+msgid_plural "unprotect(): only %d protected items"
+msgstr[0] ""
+msgstr[1] ""
 
-#: src/main/memory.c:3041
+#: src/main/memory.c:3113
 msgid "unprotect_ptr: pointer not found"
 msgstr ""
 
-#: src/main/memory.c:3079
+#: src/main/memory.c:3151
 #, c-format
-msgid "R_Reprotect: only %d protected items, can't reprotect index %d"
-msgstr ""
+msgid "R_Reprotect: only %d protected item, can't reprotect index %d"
+msgid_plural "R_Reprotect: only %d protected items, can't reprotect index %d"
+msgstr[0] ""
+msgstr[1] ""
 
-#: src/main/memory.c:3129
+#: src/main/memory.c:3203
 #, c-format
 msgid "'Calloc' could not allocate memory (%.0f of %u bytes)"
 msgstr ""
 
-#: src/main/memory.c:3140
+#: src/main/memory.c:3214
 #, c-format
 msgid "'Realloc' could not re-allocate memory (%.0f bytes)"
 msgstr ""
 
-#: src/main/memory.c:3380
+#: src/main/memory.c:3460
 msgid "not safe to return vector pointer"
 msgstr ""
 
-#: src/main/memory.c:3392
+#: src/main/memory.c:3471
 #, c-format
 msgid "attempt to set index %lu/%lu in SET_STRING_ELT"
 msgstr ""
 
-#: src/main/memory.c:3408
+#: src/main/memory.c:3487
 #, c-format
 msgid "attempt to set index %lu/%lu in SET_VECTOR_ELT"
 msgstr ""
 
-#: src/main/memory.c:3658
+#: src/main/memory.c:3514 src/main/memory.c:3524 src/main/memory.c:3536
+#: src/main/memory.c:3550 src/main/memory.c:3565 src/main/memory.c:3583
+msgid "bad value"
+msgstr ""
+
+#: src/main/memory.c:3746
 msgid "memory profiling is not available on this system"
 msgstr ""
 
-#: src/main/memory.c:3723
+#: src/main/memory.c:3810
 #, c-format
 msgid "Rprofmem: cannot open output file '%s'"
 msgstr ""
 
-#: src/main/memory.c:3830
+#: src/main/memory.c:3915
 #, c-format
 msgid "long vectors not supported yet: %s:%d"
 msgstr ""
 
-#: src/main/names.c:996
+#: src/main/names.c:1021
 msgid "string argument required"
 msgstr ""
 
-#: src/main/names.c:999
+#: src/main/names.c:1024
 msgid "no such primitive function"
 msgstr ""
 
-#: src/main/names.c:1146
+#: src/main/names.c:1212 src/main/names.c:1242
 msgid "attempt to use zero-length variable name"
 msgstr ""
 
-#: src/main/names.c:1148
+#: src/main/names.c:1214 src/main/names.c:1244
 #, c-format
 msgid "variable names are limited to %d bytes"
 msgstr ""
 
-#: src/main/names.c:1176 src/main/names.c:1179
+#: src/main/names.c:1307 src/main/names.c:1310
 msgid "invalid .Internal() argument"
 msgstr ""
 
-#: src/main/objects.c:46
+#: src/main/objects.c:39
 msgid "generic 'function' is not a function"
 msgstr ""
 
-#: src/main/objects.c:201
+#: src/main/objects.c:193
 msgid "bad generic call environment"
 msgstr ""
 
-#: src/main/objects.c:207
+#: src/main/objects.c:201
 msgid "bad generic definition environment"
 msgstr ""
 
-#: src/main/objects.c:246
+#: src/main/objects.c:249
 msgid ""
 "no '.S3MethodsClass' table, cannot use S4 objects with S3 methods ('methods' "
 "package not attached?)"
 msgstr ""
 
-#: src/main/objects.c:270 src/main/objects.c:411
-msgid "'UseMethod' used in an inappropriate fashion"
-msgstr ""
-
-#: src/main/objects.c:290
-msgid "invalid generic function in 'usemethod'"
-msgstr ""
-
-#: src/main/objects.c:399
+#: src/main/objects.c:415
 msgid "there must be a 'generic' argument"
 msgstr ""
 
-#: src/main/objects.c:403
+#: src/main/objects.c:419
 msgid "'generic' argument must be a character string"
 msgstr ""
 
-#: src/main/objects.c:440
-msgid "'UseMethod' called from outside a function"
-msgstr ""
-
-#: src/main/objects.c:447
-msgid "first argument must be a generic name"
+#: src/main/objects.c:427
+msgid "'UseMethod' used in an inappropriate fashion"
 msgstr ""
 
 #: src/main/objects.c:472
@@ -4251,226 +4332,226 @@ msgstr ""
 msgid "no applicable method for '%s' applied to an object of class \"%s\""
 msgstr ""
 
-#: src/main/objects.c:533
+#: src/main/objects.c:582
 msgid "'NextMethod' called from outside a function"
 msgstr ""
 
-#: src/main/objects.c:539
+#: src/main/objects.c:588
 msgid "'NextMethod' called from an anonymous function"
 msgstr ""
 
-#: src/main/objects.c:563
+#: src/main/objects.c:609
 msgid "no calling generic was found: was a method called directly?"
 msgstr ""
 
-#: src/main/objects.c:566
+#: src/main/objects.c:612
 #, c-format
 msgid "'function' is not a function, but of type %d"
 msgstr ""
 
-#: src/main/objects.c:640
+#: src/main/objects.c:639
 msgid "wrong argument ..."
 msgstr ""
 
-#: src/main/objects.c:653
+#: src/main/objects.c:651
 msgid "object not specified"
 msgstr ""
 
-#: src/main/objects.c:663 src/main/objects.c:670
+#: src/main/objects.c:659 src/main/objects.c:666
 msgid "generic function not specified"
 msgstr ""
 
-#: src/main/objects.c:667
+#: src/main/objects.c:663
 msgid "invalid generic argument to 'NextMethod'"
 msgstr ""
 
-#: src/main/objects.c:680
+#: src/main/objects.c:675
 msgid "invalid 'group' argument found in 'NextMethod'"
 msgstr ""
 
-#: src/main/objects.c:699
+#: src/main/objects.c:692
 msgid "wrong value for .Method"
 msgstr ""
 
-#: src/main/objects.c:703 src/main/objects.c:712
-#, c-format
-msgid "method name too long in '%s'"
-msgstr ""
-
-#: src/main/objects.c:715
+#: src/main/objects.c:702
 msgid "Incompatible methods ignored"
 msgstr ""
 
-#: src/main/objects.c:775 src/main/objects.c:780
+#: src/main/objects.c:759 src/main/objects.c:766
 msgid "no method to invoke"
 msgstr ""
 
-#: src/main/objects.c:832
+#: src/main/objects.c:817
 msgid "cannot unclass an environment"
 msgstr ""
 
-#: src/main/objects.c:835
+#: src/main/objects.c:820
 msgid "cannot unclass an external pointer"
 msgstr ""
 
-#: src/main/objects.c:872
+#: src/main/objects.c:856
 msgid "'what' must be a character vector"
 msgstr ""
 
-#: src/main/objects.c:876
+#: src/main/objects.c:860
 msgid "'which' must be a length 1 logical vector"
 msgstr ""
 
-#: src/main/objects.c:882
+#: src/main/objects.c:866
 msgid "use 'is()' instead of 'inherits()' on S4 objects"
 msgstr ""
 
-#: src/main/objects.c:1012
+#: src/main/objects.c:995
 msgid "could not find correct environment; please report!"
 msgstr ""
 
-#: src/main/objects.c:1052
+#: src/main/objects.c:1039
 msgid "'onOff' must be TRUE or FALSE"
 msgstr "'onOff' skal være TRUE (SAND) eller FALSE (FALSK)"
 
-#: src/main/objects.c:1119
+#: src/main/objects.c:1104
 #, c-format
 msgid "unable to find a non-generic version of function \"%s\""
 msgstr ""
 
-#: src/main/objects.c:1151
+#: src/main/objects.c:1136
 msgid ""
 "'standardGeneric' called without 'methods' dispatch enabled (will be ignored)"
 msgstr ""
 
-#: src/main/objects.c:1160
+#: src/main/objects.c:1145
 msgid "argument to 'standardGeneric' must be a non-empty character string"
 msgstr "argument for 'standardGeneric' skal være en ikketom tegnstreng"
 
-#: src/main/objects.c:1165
+#: src/main/objects.c:1150
 #, c-format
 msgid ""
 "call to standardGeneric(\"%s\") apparently not from the body of that generic "
 "function"
 msgstr ""
 
-#: src/main/objects.c:1189
-msgid "argument 'code' must be a character string"
-msgstr ""
-
-#: src/main/objects.c:1257
+#: src/main/objects.c:1249
 #, c-format
 msgid ""
 "invalid primitive methods code (\"%s\"): should be \"clear\", \"reset\", "
 "\"set\", or \"suppress\""
 msgstr ""
 
-#: src/main/objects.c:1265
+#: src/main/objects.c:1257
 msgid "invalid object: must be a primitive function"
 msgstr ""
 
-#: src/main/objects.c:1312
+#: src/main/objects.c:1304
 #, c-format
 msgid ""
 "the formal definition of a primitive generic must be a function object (got "
 "type '%s')"
 msgstr ""
 
-#: src/main/objects.c:1342
+#: src/main/objects.c:1334
 #, c-format
 msgid "object returned as generic function \"%s\" does not appear to be one"
 msgstr ""
 
-#: src/main/objects.c:1444
+#: src/main/objects.c:1439
 msgid "invalid primitive operation given for dispatch"
 msgstr ""
 
-#: src/main/objects.c:1470 src/main/objects.c:1489
+#: src/main/objects.c:1468 src/main/objects.c:1487
 msgid "dispatch error"
 msgstr ""
 
-#: src/main/objects.c:1483
+#: src/main/objects.c:1481
 #, c-format
 msgid ""
 "primitive function \"%s\" has been set for methods but no generic function "
 "supplied"
 msgstr ""
 
-#: src/main/objects.c:1508
+#: src/main/objects.c:1506
 msgid "C level MAKE_CLASS macro called with NULL string pointer"
 msgstr ""
 
-#: src/main/objects.c:1524
+#: src/main/objects.c:1522
+msgid "'methods' package not yet loaded"
+msgstr "'methods'-pakke endnu ikke indlæst"
+
+#: src/main/objects.c:1532
 msgid "R_getClassDef(.) called with NULL string pointer"
 msgstr ""
 
-#: src/main/objects.c:1546
+#: src/main/objects.c:1577
 msgid "C level NEW macro called with null class definition pointer"
 msgstr ""
 
-#: src/main/objects.c:1550
+#: src/main/objects.c:1581
 #, c-format
 msgid "trying to generate an object from a virtual class (\"%s\")"
 msgstr ""
 
-#: src/main/objects.c:1627
+#: src/main/objects.c:1663
 #, c-format
 msgid "object of class \"%s\" does not correspond to a valid S3 object"
-msgstr "objekt for klasse \"%s\" korresponderer ikke til et gyldigt S3-objekt"
+msgstr "objekt for klasse »%s« korresponderer ikke til et gyldigt S3-objekt"
 
-#: src/main/options.c:120 src/main/options.c:180
+#: src/main/options.c:121 src/main/options.c:182
 msgid "corrupted options list"
 msgstr ""
 
-#: src/main/options.c:130
+#: src/main/options.c:131
 msgid "invalid printing width, used 80"
 msgstr ""
 
-#: src/main/options.c:141
+#: src/main/options.c:142
 msgid "invalid printing digits, used 7"
 msgstr ""
 
-#: src/main/options.c:153
+#: src/main/options.c:154
 msgid "invalid 'deparse.cutoff', used 60"
 msgstr ""
 
-#: src/main/options.c:165
+#: src/main/options.c:166
 msgid "invalid value for \"device.ask.default\", using FALSE"
 msgstr ""
 
-#: src/main/options.c:401
+#: src/main/options.c:416
 msgid "list argument has no valid names"
 msgstr ""
 
-#: src/main/options.c:429
+#: src/main/options.c:445
 #, c-format
 msgid "invalid 'width' parameter, allowed %d...%d"
 msgstr ""
 
-#: src/main/options.c:440
+#: src/main/options.c:456
 #, c-format
 msgid "invalid 'digits' parameter, allowed %d...%d"
 msgstr ""
 
-#: src/main/options.c:447
+#: src/main/options.c:463
 #, c-format
 msgid "'expressions' parameter invalid, allowed %d...%d"
 msgstr ""
 
-#: src/main/options.c:454 src/main/options.c:462 src/main/options.c:468
-#: src/main/options.c:476 src/main/options.c:483 src/main/options.c:488
-#: src/main/options.c:495 src/main/options.c:501 src/main/options.c:507
-#: src/main/options.c:512 src/main/options.c:517 src/main/options.c:526
-#: src/main/options.c:532 src/main/options.c:538 src/main/options.c:549
-#: src/main/options.c:556 src/main/options.c:562 src/main/options.c:570
-#: src/main/options.c:577 src/main/options.c:584 src/main/options.c:591
-#: src/main/options.c:598 src/main/options.c:606 src/main/options.c:615
-#: src/main/options.c:618 src/main/options.c:624
+#: src/main/options.c:470 src/main/options.c:478 src/main/options.c:484
+#: src/main/options.c:492 src/main/options.c:499 src/main/options.c:504
+#: src/main/options.c:511 src/main/options.c:517 src/main/options.c:523
+#: src/main/options.c:528 src/main/options.c:533 src/main/options.c:542
+#: src/main/options.c:548 src/main/options.c:554 src/main/options.c:564
+#: src/main/options.c:578 src/main/options.c:584 src/main/options.c:592
+#: src/main/options.c:599 src/main/options.c:606 src/main/options.c:613
+#: src/main/options.c:620 src/main/options.c:628 src/main/options.c:637
+#: src/main/options.c:640 src/main/options.c:646
 #, c-format
 msgid "invalid value for '%s'"
 msgstr "ugyldig værdi for '%s'"
 
-#: src/main/options.c:611 src/main/options.c:640
+#: src/main/options.c:569
+#, fuzzy
+msgid "'OutDec' must be a string of one character"
+msgstr "'type' skal være en tegnstreng"
+
+#: src/main/options.c:633 src/main/options.c:662
 msgid "\"par.ask.default\" has been replaced by \"device.ask.default\""
 msgstr "\"par.ask.default\" er blevet erstattet af \"device.ask.default\""
 
@@ -4490,15 +4571,20 @@ msgstr ""
 msgid "non-string argument to Internal paste"
 msgstr ""
 
-#: src/main/paste.c:390
+#: src/main/paste.c:387
 msgid "first argument must be atomic"
 msgstr ""
 
-#: src/main/paste.c:560
+#: src/main/paste.c:448
+#, fuzzy
+msgid "'decimal.mark' must be a string of one character"
+msgstr "file' skal være en tegnstreng eller forbindelse"
+
+#: src/main/paste.c:579
 msgid "Impossible mode ( x )"
 msgstr "Umulig tilstand ( x )"
 
-#: src/main/paste.c:645
+#: src/main/paste.c:663
 msgid "atomic vector arguments only"
 msgstr ""
 
@@ -4506,210 +4592,193 @@ msgstr ""
 msgid "invalid filename specification"
 msgstr "ugyldig filnavnsspecifikation"
 
-#: src/main/platform.c:375 src/main/platform.c:419
+#: src/main/platform.c:375 src/main/platform.c:420
 msgid "write error during file append"
 msgstr "skrivefejl under filtilføjelse"
 
-#: src/main/platform.c:394
+#: src/main/platform.c:395
 msgid "nothing to append to"
 msgstr "intet at tilføje til"
 
-#: src/main/platform.c:448 src/main/platform.c:795
+#: src/main/platform.c:449 src/main/platform.c:797 src/main/platform.c:979
 msgid "invalid filename argument"
 msgstr ""
 
-#: src/main/platform.c:460
+#: src/main/platform.c:461
 #, c-format
 msgid "cannot create file '%s', reason '%s'"
 msgstr ""
 
-#: src/main/platform.c:475 src/main/platform.c:545 src/main/platform.c:627
+#: src/main/platform.c:476 src/main/platform.c:546 src/main/platform.c:629
 msgid "invalid first filename"
 msgstr ""
 
-#: src/main/platform.c:487
+#: src/main/platform.c:488
 #, c-format
 msgid "cannot remove file '%s', reason '%s'"
 msgstr ""
 
-#: src/main/platform.c:547 src/main/platform.c:629
+#: src/main/platform.c:548 src/main/platform.c:631
 msgid "invalid second filename"
 msgstr ""
 
-#: src/main/platform.c:549 src/main/platform.c:631
+#: src/main/platform.c:551 src/main/platform.c:634
 msgid "nothing to link"
 msgstr ""
 
-#: src/main/platform.c:559
+#: src/main/platform.c:561
 msgid "symbolic links are not supported on this version of Windows"
 msgstr ""
 "symbolske henvisninger er ikke understøttet på denne version af Windows"
 
-#: src/main/platform.c:581
+#: src/main/platform.c:583
 #, c-format
 msgid "cannot symlink '%ls' to '%ls', reason '%s'"
 msgstr ""
 
-#: src/main/platform.c:601
+#: src/main/platform.c:603
 #, c-format
 msgid "cannot symlink '%s' to '%s', reason '%s'"
 msgstr ""
 
-#: src/main/platform.c:609
+#: src/main/platform.c:611
 msgid "symbolic links are not supported on this platform"
 msgstr "symbolske henvisninger er ikke understøttet på denne platform"
 
-#: src/main/platform.c:649
+#: src/main/platform.c:652
 #, c-format
 msgid "cannot link '%ls' to '%ls', reason '%s'"
 msgstr "kan ikke lænke '%ls' til '%ls', årsag '%s'"
 
-#: src/main/platform.c:669
+#: src/main/platform.c:672
 #, c-format
 msgid "cannot link '%s' to '%s', reason '%s'"
 msgstr "kan ikke lænke '%s' til '%s', årsag '%s'"
 
-#: src/main/platform.c:678
+#: src/main/platform.c:681
 msgid "(hard) links are not supported on this platform"
 msgstr ""
 
-#: src/main/platform.c:709
+#: src/main/platform.c:713
 msgid "'from' and 'to' are of different lengths"
 msgstr "'from' og 'to' er af forskellig længde"
 
-#: src/main/platform.c:720 src/main/platform.c:730
+#: src/main/platform.c:724 src/main/platform.c:734
 msgid "expanded 'from' name too long"
 msgstr "udvidet 'from'-navn er for langt"
 
-#: src/main/platform.c:724 src/main/platform.c:734
+#: src/main/platform.c:728 src/main/platform.c:738
 msgid "expanded 'to' name too long"
 msgstr "udvidet 'to'-navn er for langt"
 
-#: src/main/platform.c:738
+#: src/main/platform.c:742
 #, c-format
 msgid "cannot rename file '%s' to '%s', reason '%s'"
 msgstr "kan ikke omdøbe fil '%s' til '%s', årsag '%s'"
 
-#: src/main/platform.c:1094
+#: src/main/platform.c:1168
 msgid "invalid 'pattern' regular expression"
 msgstr "ugyldigt regulært udtryk for 'pattern'"
 
-#: src/main/platform.c:1211
+#: src/main/platform.c:1285
 msgid "unable to determine R home location"
 msgstr ""
 
-#: src/main/platform.c:1263
+#: src/main/platform.c:1338
 msgid "file name too long"
 msgstr "filnavn er for langt"
 
-#: src/main/platform.c:1511 src/main/platform.c:1558 src/main/sysutils.c:1850
-#: src/main/sysutils.c:1864
+#: src/main/platform.c:1586 src/main/platform.c:1633 src/main/sysutils.c:1806
+#: src/main/sysutils.c:1820
 msgid "internal out-of-memory condition"
 msgstr ""
 
-#: src/main/platform.c:1554 src/main/sysutils.c:1860
+#: src/main/platform.c:1629 src/main/sysutils.c:1816
 #, c-format
 msgid "read error on '%s'"
 msgstr "læsefejl på '%s'"
 
-#: src/main/platform.c:1722
+#: src/main/platform.c:1728
 msgid "setting 'LC_NUMERIC' may cause R to function strangely"
 msgstr "angivelse af 'LC_NUMERIC' kan få R til at fungere mærkeligt"
 
-#: src/main/platform.c:1736
+#: src/main/platform.c:1742
 msgid "LC_MESSAGES exists on Windows but is not operational"
 msgstr ""
 
-#: src/main/platform.c:1763
+#: src/main/platform.c:1769
 #, c-format
 msgid "OS reports request to set locale to \"%s\" cannot be honored"
 msgstr ""
 
-#: src/main/platform.c:2065
-msgid "'hostname' must be a character vector of length 1"
-msgstr ""
-
-#: src/main/platform.c:2071
-#, c-format
-msgid "nsl() was unable to resolve host '%s'"
-msgstr ""
-
-#: src/main/platform.c:2078
-msgid "unknown format returned by C function 'gethostbyname'"
-msgstr ""
-
-#: src/main/platform.c:2087
-msgid "nsl() is not supported on this platform"
-msgstr ""
-
-#: src/main/platform.c:2158
+#: src/main/platform.c:2131
 #, c-format
 msgid "'%s' already exists"
 msgstr "'%s' findes allerede"
 
-#: src/main/platform.c:2161
+#: src/main/platform.c:2134
 #, c-format
 msgid "cannot create dir '%s', reason '%s'"
 msgstr "kan ikke oprette mappe '%s', årsag '%s'"
 
-#: src/main/platform.c:2207
+#: src/main/platform.c:2181
 #, c-format
 msgid "'%ls' already exists"
 msgstr "'%ls' findes allerede"
 
-#: src/main/platform.c:2211
+#: src/main/platform.c:2183 src/main/platform.c:2189
 #, c-format
 msgid "cannot create dir '%ls', reason '%s'"
 msgstr "kan ikke oprette mappe '%ls', årsag '%s'"
 
-#: src/main/platform.c:2245 src/main/platform.c:2449
+#: src/main/platform.c:2223 src/main/platform.c:2435
 msgid "too deep nesting"
 msgstr ""
 
-#: src/main/platform.c:2253 src/main/platform.c:2266 src/main/platform.c:2284
+#: src/main/platform.c:2231 src/main/platform.c:2244 src/main/platform.c:2262
 msgid "over-long path"
 msgstr ""
 
-#: src/main/platform.c:2273
+#: src/main/platform.c:2251
 #, c-format
 msgid "problem creating directory %ls: %s"
 msgstr "problem ved oprettelse af mappe %ls: %s"
 
-#: src/main/platform.c:2293
+#: src/main/platform.c:2271
 #, c-format
 msgid "problem reading dir %ls: %s"
 msgstr "problem ved læsning af mappe %ls: %s"
 
-#: src/main/platform.c:2304 src/main/platform.c:2465 src/main/platform.c:2478
-#: src/main/platform.c:2498 src/main/platform.c:2520
+#: src/main/platform.c:2282 src/main/platform.c:2451 src/main/platform.c:2464
+#: src/main/platform.c:2484 src/main/platform.c:2506
 msgid "over-long path length"
 msgstr ""
 
-#: src/main/platform.c:2312
+#: src/main/platform.c:2290
 #, c-format
 msgid "problem copying %ls to %ls: %s"
 msgstr ""
 
-#: src/main/platform.c:2487
+#: src/main/platform.c:2473
 #, c-format
 msgid "problem creating directory %s: %s"
 msgstr ""
 
-#: src/main/platform.c:2507
+#: src/main/platform.c:2493
 #, c-format
 msgid "problem reading directory %s: %s"
 msgstr "problem ved læsning af mappe %s: %s"
 
-#: src/main/platform.c:2529
+#: src/main/platform.c:2515
 #, c-format
 msgid "problem copying %s to %s: %s"
 msgstr "problem med at kopiere %s til %s: %s"
 
-#: src/main/platform.c:2662
+#: src/main/platform.c:2653
 msgid "'mode' must be of length at least one"
 msgstr "'mode' skal mindst have længden en"
 
-#: src/main/platform.c:2729
+#: src/main/platform.c:2720
 msgid "insufficient OS support on this platform"
 msgstr "utilstrækkelig OS-understøttelse på denne platform"
 
@@ -4730,91 +4799,95 @@ msgstr ""
 msgid "invalid math style encountered"
 msgstr ""
 
-#: src/main/plotmath.c:1261 src/main/plotmath.c:1366 src/main/plotmath.c:2664
+#: src/main/plotmath.c:1260 src/main/plotmath.c:1365 src/main/plotmath.c:2654
 msgid "invalid mathematical annotation"
 msgstr ""
 
-#: src/main/plotmath.c:1670
+#: src/main/plotmath.c:1669
 msgid "invalid accent"
 msgstr ""
 
-#: src/main/plotmath.c:1964
+#: src/main/plotmath.c:1963
 msgid "invalid group delimiter"
 msgstr ""
 
-#: src/main/plotmath.c:1991 src/main/plotmath.c:2137
+#: src/main/plotmath.c:1990 src/main/plotmath.c:2127
 msgid "invalid group specification"
 msgstr ""
 
-#: src/main/plotmath.c:2062
+#: src/main/plotmath.c:2052
 msgid "group is incomplete"
 msgstr ""
 
-#: src/main/plotmath.c:3190
+#: src/main/plotmath.c:3180
 msgid "Metric information not available for this family/device"
 msgstr ""
 
-#: src/main/print.c:148 src/main/print.c:254
+#: src/main/print.c:140 src/main/print.c:247
 msgid "invalid 'na.print' specification"
 msgstr ""
 
-#: src/main/print.c:157
+#: src/main/print.c:149
 msgid "invalid row labels"
 msgstr "ugyldige rækkeetiketter"
 
-#: src/main/print.c:159
+#: src/main/print.c:151
 msgid "invalid column labels"
 msgstr "ugyldige kolonneetiketter"
 
-#: src/main/print.c:183
+#: src/main/print.c:176
 msgid "non-function argument to .Internal(print.function(.))"
 msgstr ""
 
-#: src/main/print.c:264
+#: src/main/print.c:257
 msgid "'gap' must be non-negative integer"
 msgstr "'gap' skal være et ikkenegativt heltal"
 
-#: src/main/print.c:289
+#: src/main/print.c:282
 msgid "invalid 'tryS4' internal argument"
 msgstr ""
 
-#: src/main/print.c:1028
+#: src/main/print.c:851
+msgid "print buffer overflow"
+msgstr ""
+
+#: src/main/print.c:1043
 msgid "invalid character length in 'dblepr'"
 msgstr ""
 
-#: src/main/print.c:1046
+#: src/main/print.c:1061
 msgid "invalid character length in 'intpr'"
 msgstr ""
 
-#: src/main/print.c:1065
+#: src/main/print.c:1080
 msgid "invalid character length in 'realpr'"
 msgstr ""
 
-#: src/main/print.c:1075
+#: src/main/print.c:1090
 msgid "memory allocation error in 'realpr'"
 msgstr ""
 
-#: src/main/print.c:1091
+#: src/main/print.c:1106
 #, c-format
 msgid "BLAS/LAPACK routine '%6s' gave error code %d"
 msgstr ""
 
-#: src/main/printarray.c:453
+#: src/main/printarray.c:332
 msgid "too few row labels"
 msgstr ""
 
-#: src/main/printarray.c:455
+#: src/main/printarray.c:334
 msgid "too few column labels"
 msgstr ""
 
-#: src/main/printarray.c:489
+#: src/main/printarray.c:368
 #, c-format
 msgid " [ reached getOption(\"max.print\") -- omitted %d row ]\n"
 msgid_plural " [ reached getOption(\"max.print\") -- omitted %d rows ]\n"
 msgstr[0] ""
 msgstr[1] ""
 
-#: src/main/printutils.c:613
+#: src/main/printutils.c:710
 msgid "it is not known that wchar_t is Unicode on this platform"
 msgstr ""
 
@@ -4822,44 +4895,44 @@ msgstr ""
 msgid "argument is not a numeric vector"
 msgstr ""
 
-#: src/main/random.c:37
+#: src/main/random.c:39
 msgid "invalid arguments"
 msgstr ""
 
-#: src/main/random.c:93 src/main/random.c:110 src/main/random.c:175
-#: src/main/random.c:201 src/main/random.c:274 src/main/random.c:288
+#: src/main/random.c:95 src/main/random.c:112 src/main/random.c:178
+#: src/main/random.c:204 src/main/random.c:277 src/main/random.c:291
 msgid "NAs produced"
 msgstr ""
 
-#: src/main/random.c:445
+#: src/main/random.c:438
 msgid "NA in probability vector"
 msgstr ""
 
-#: src/main/random.c:447
-msgid "non-positive probability"
+#: src/main/random.c:440
+msgid "negative probability"
 msgstr ""
 
-#: src/main/random.c:454
+#: src/main/random.c:447
 msgid "too few positive probabilities"
 msgstr ""
 
-#: src/main/random.c:491 src/main/random.c:519
+#: src/main/random.c:483 src/main/random.c:511
 msgid "cannot take a sample larger than the population when 'replace = FALSE'"
 msgstr ""
 
-#: src/main/random.c:498
+#: src/main/random.c:490
 msgid "incorrect number of probabilities"
 msgstr ""
 
-#: src/main/random.c:537
+#: src/main/random.c:529
 msgid "n >= 2^31, replace = FALSE is only supported on 64-bit platforms"
 msgstr ""
 
-#: src/main/raw.c:37 src/main/raw.c:273
+#: src/main/raw.c:37 src/main/raw.c:277
 msgid "argument must be a character vector of length 1"
 msgstr "argument skal være en tegnvektor med længden 1"
 
-#: src/main/raw.c:39 src/main/raw.c:275
+#: src/main/raw.c:39 src/main/raw.c:279
 msgid ""
 "argument should be a character vector of length 1\n"
 "all but the first element will be ignored"
@@ -4867,285 +4940,283 @@ msgstr ""
 "argument skal være en tegnvektor med længden 1\n"
 "alle undtagen det første element vil blive ignoreret"
 
-#: src/main/raw.c:53 src/main/raw.c:89 src/main/raw.c:110
+#: src/main/raw.c:53 src/main/raw.c:90 src/main/raw.c:113
 msgid "argument 'x' must be a raw vector"
 msgstr "argument 'x' skal være en rå vektor"
 
-#: src/main/raw.c:56 src/main/raw.c:330
+#: src/main/raw.c:56 src/main/raw.c:336
 msgid "argument 'multiple' must be TRUE or FALSE"
 msgstr "argument 'multiple' skal være TRUE (SAND) eller FALSE (FALSK)"
 
-#: src/main/raw.c:91
+#: src/main/raw.c:92
 msgid "argument 'shift' must be a small integer"
 msgstr "argument 'shift' skal være et lille heltal"
 
-#: src/main/raw.c:129 src/main/raw.c:327
+#: src/main/raw.c:133 src/main/raw.c:333
 msgid "argument 'x' must be an integer vector"
 msgstr "argument 'x' skal være en heltalsvektor"
 
-#: src/main/raw.c:148
+#: src/main/raw.c:153
 msgid "argument 'x' must be raw, integer or logical"
 msgstr "argument 'x' skal være rå, heltal eller logisk"
 
-#: src/main/raw.c:150
-msgid "argument 'type' must be a character string"
-msgstr "argument 'type' skal være en tegnstreng"
-
-#: src/main/raw.c:154
+#: src/main/raw.c:159
 #, c-format
 msgid "argument 'x' must be a multiple of %d long"
 msgstr "argument 'x' skal være et multiplum af %d i længden"
 
-#: src/main/raw.c:167 src/main/raw.c:181
+#: src/main/raw.c:172 src/main/raw.c:186
 msgid "argument 'x' must not contain NAs"
 msgstr "argument 'x' må ikke indeholder NA'er"
 
-#: src/main/raw.c:285
+#: src/main/raw.c:291
 msgid "invalid UTF-8 string"
 msgstr "ugyldig UTF-8-streng"
 
-#: src/main/relop.c:202
+#: src/main/relop.c:196
 #, c-format
 msgid "comparison (%d) is possible only for atomic and list types"
 msgstr ""
 
-#: src/main/relop.c:207
+#: src/main/relop.c:201
 msgid "comparison is not allowed for expressions"
 msgstr ""
 
-#: src/main/relop.c:296
+#: src/main/relop.c:293
 msgid "comparison of these types is not implemented"
 msgstr ""
 
-#: src/main/relop.c:509
+#: src/main/relop.c:425
 msgid "invalid comparison with complex values"
 msgstr ""
 
-#: src/main/relop.c:767
+#: src/main/relop.c:683
 msgid "'a' and 'b' must have the same type"
 msgstr "'a' og 'b' skal have den samme type"
 
-#: src/main/saveload.c:200 src/main/saveload.c:205 src/main/saveload.c:214
-#: src/main/saveload.c:223 src/main/saveload.c:232 src/main/saveload.c:241
-#: src/main/saveload.c:245 src/main/saveload.c:254 src/main/saveload.c:1381
-#: src/main/saveload.c:1386 src/main/saveload.c:1430 src/main/saveload.c:1498
-#: src/main/saveload.c:1507 src/main/serialize.c:331 src/main/serialize.c:338
-#: src/main/serialize.c:2388 src/main/serialize.c:2396
+#: src/main/saveload.c:202 src/main/saveload.c:207 src/main/saveload.c:216
+#: src/main/saveload.c:225 src/main/saveload.c:234 src/main/saveload.c:243
+#: src/main/saveload.c:247 src/main/saveload.c:256 src/main/saveload.c:1383
+#: src/main/saveload.c:1388 src/main/saveload.c:1432 src/main/saveload.c:1500
+#: src/main/saveload.c:1509 src/main/serialize.c:354 src/main/serialize.c:361
+#: src/main/serialize.c:374 src/main/serialize.c:378 src/main/serialize.c:405
+#: src/main/serialize.c:421 src/main/serialize.c:2429
+#: src/main/serialize.c:2437
 msgid "read error"
 msgstr "læsefejl"
 
-#: src/main/saveload.c:332
+#: src/main/saveload.c:334
 msgid "a I read error occurred"
 msgstr ""
 
-#: src/main/saveload.c:342
+#: src/main/saveload.c:344
 msgid "a R read error occurred"
 msgstr ""
 
-#: src/main/saveload.c:352
+#: src/main/saveload.c:354
 msgid "a C read error occurred"
 msgstr ""
 
-#: src/main/saveload.c:362
+#: src/main/saveload.c:364
 msgid "a S read error occurred"
 msgstr ""
 
-#: src/main/saveload.c:387 src/main/saveload.c:395 src/main/saveload.c:403
-#: src/main/saveload.c:1594 src/main/saveload.c:1602
+#: src/main/saveload.c:389 src/main/saveload.c:397 src/main/saveload.c:405
+#: src/main/saveload.c:1596 src/main/saveload.c:1604
 msgid "a read error occurred"
 msgstr ""
 
-#: src/main/saveload.c:467
+#: src/main/saveload.c:469
 msgid "unresolved node during restore"
 msgstr ""
 
-#: src/main/saveload.c:488
+#: src/main/saveload.c:490
 #, c-format
 msgid "restore compatibility error - no version %d compatibility"
 msgstr ""
 
-#: src/main/saveload.c:572 src/main/saveload.c:645
+#: src/main/saveload.c:574 src/main/saveload.c:647
 msgid "bad SEXP type in data file"
 msgstr ""
 
-#: src/main/saveload.c:586
+#: src/main/saveload.c:588
 msgid "mismatch on types"
 msgstr ""
 
-#: src/main/saveload.c:607 src/main/saveload.c:1270 src/main/serialize.c:1636
+#: src/main/saveload.c:609 src/main/saveload.c:1272 src/main/serialize.c:1675
 #, c-format
 msgid "unrecognized internal function name \"%s\""
 msgstr ""
 
-#: src/main/saveload.c:709
+#: src/main/saveload.c:711
 msgid "cannot save file position while restoring data"
 msgstr ""
 
-#: src/main/saveload.c:722
+#: src/main/saveload.c:724
 msgid "cannot restore file position while restoring data"
 msgstr ""
 
-#: src/main/saveload.c:915
+#: src/main/saveload.c:917
 msgid "base namespace is not preserved in version 1 workspaces"
 msgstr ""
 
-#: src/main/saveload.c:917
+#: src/main/saveload.c:919
 msgid "cannot save namespace in version 1 workspaces"
 msgstr ""
 
-#: src/main/saveload.c:919
+#: src/main/saveload.c:921
 msgid ""
 "cannot save environment with locked/active bindings in version 1 workspaces"
 msgstr ""
 
-#: src/main/saveload.c:943
+#: src/main/saveload.c:945
 msgid "cannot save weak references in version 1 workspaces"
 msgstr ""
 
-#: src/main/saveload.c:1021
+#: src/main/saveload.c:1023
 msgid "NewWriteVec called with non-vector type"
 msgstr ""
 
-#: src/main/saveload.c:1084
+#: src/main/saveload.c:1086
 msgid "cannot save byte code objects in version 1 workspaces"
 msgstr ""
 
-#: src/main/saveload.c:1086
+#: src/main/saveload.c:1088
 #, c-format
 msgid "NewWriteItem: unknown type %i"
 msgstr ""
 
-#: src/main/saveload.c:1216
+#: src/main/saveload.c:1218
 msgid "NewReadVec called with non-vector type"
 msgstr ""
 
-#: src/main/saveload.c:1286
+#: src/main/saveload.c:1288
 msgid "cannot read byte code objects from version 1 workspaces"
 msgstr ""
 
-#: src/main/saveload.c:1288
+#: src/main/saveload.c:1290
 #, c-format
 msgid "NewReadItem: unknown type %i"
 msgstr ""
 
-#: src/main/saveload.c:1440
+#: src/main/saveload.c:1442
 msgid "out of memory reading ascii string"
 msgstr ""
 
-#: src/main/saveload.c:1565
+#: src/main/saveload.c:1567
 msgid "a binary read error occurred"
 msgstr ""
 
-#: src/main/saveload.c:1580 src/main/saveload.c:1681
+#: src/main/saveload.c:1582 src/main/saveload.c:1683
 msgid "out of memory reading binary string"
 msgstr ""
 
-#: src/main/saveload.c:1585
+#: src/main/saveload.c:1587
 msgid "a binary string read error occurred"
 msgstr ""
 
-#: src/main/saveload.c:1645
+#: src/main/saveload.c:1647
 msgid "an xdr integer data write error occurred"
 msgstr ""
 
-#: src/main/saveload.c:1652
+#: src/main/saveload.c:1654
 msgid "an xdr integer data read error occurred"
 msgstr ""
 
-#: src/main/saveload.c:1667 src/main/saveload.c:1686
+#: src/main/saveload.c:1669 src/main/saveload.c:1688
 msgid "an xdr string data write error occurred"
 msgstr ""
 
-#: src/main/saveload.c:1694
+#: src/main/saveload.c:1696
 msgid "an xdr real data write error occurred"
 msgstr ""
 
-#: src/main/saveload.c:1701
+#: src/main/saveload.c:1703
 msgid "an xdr real data read error occurred"
 msgstr ""
 
-#: src/main/saveload.c:1708
+#: src/main/saveload.c:1710
 msgid "an xdr complex data write error occurred"
 msgstr ""
 
-#: src/main/saveload.c:1715
+#: src/main/saveload.c:1717
 msgid "an xdr complex data read error occurred"
 msgstr ""
 
-#: src/main/saveload.c:1783 src/main/serialize.c:1958
-#: src/main/serialize.c:2568 src/modules/internet/internet.c:351
-#: src/modules/internet/internet.c:409 src/modules/internet/internet.c:514
+#: src/main/saveload.c:1785 src/main/serialize.c:1997
+#: src/main/serialize.c:2614 src/modules/internet/internet.c:514
+#: src/modules/internet/internet.c:590 src/modules/internet/internet.c:701
 msgid "write failed"
 msgstr ""
 
-#: src/main/saveload.c:1910
+#: src/main/saveload.c:1912
 msgid "restore file may be empty -- no data loaded"
 msgstr ""
 
-#: src/main/saveload.c:1912
+#: src/main/saveload.c:1914
 msgid "restore file may be from a newer version of R -- no data loaded"
 msgstr ""
 
-#: src/main/saveload.c:1914
+#: src/main/saveload.c:1916
 msgid "bad restore file magic number (file may be corrupted) -- no data loaded"
 msgstr ""
 
-#: src/main/saveload.c:1940 src/main/saveload.c:2238
+#: src/main/saveload.c:1942 src/main/saveload.c:2240
 msgid "first argument must be a character vector"
 msgstr ""
 
-#: src/main/saveload.c:2012
+#: src/main/saveload.c:2014
 msgid "not a valid named list"
 msgstr ""
 
-#: src/main/saveload.c:2019 src/main/saveload.c:2040
+#: src/main/saveload.c:2021 src/main/saveload.c:2042
 #, c-format
 msgid "'%s' looks like a pre-2.4.0 S4 object: please recreate it"
 msgstr ""
 
-#: src/main/saveload.c:2027
+#: src/main/saveload.c:2029
 msgid "loaded data is not in pair list form"
 msgstr ""
 
-#: src/main/saveload.c:2063
+#: src/main/saveload.c:2065
 msgid "first argument must be a file name"
 msgstr ""
 
-#: src/main/saveload.c:2108 src/main/saveload.c:2134 src/main/serialize.c:826
-#: src/main/serialize.c:863 src/main/serialize.c:901
+#: src/main/saveload.c:2110 src/main/saveload.c:2136 src/main/serialize.c:864
+#: src/main/serialize.c:901 src/main/serialize.c:939
 msgid "XDR write failed"
 msgstr ""
 
-#: src/main/saveload.c:2121 src/main/saveload.c:2146 src/main/serialize.c:1362
-#: src/main/serialize.c:1398 src/main/serialize.c:1436
+#: src/main/saveload.c:2123 src/main/saveload.c:2148 src/main/serialize.c:1400
+#: src/main/serialize.c:1436 src/main/serialize.c:1474
 msgid "XDR read failed"
 msgstr ""
 
-#: src/main/saveload.c:2157
+#: src/main/saveload.c:2159
 #, c-format
 msgid "cannot save data -- unable to open '%s': %s"
 msgstr ""
 
-#: src/main/saveload.c:2254 src/main/serialize.c:2161
+#: src/main/saveload.c:2256 src/main/serialize.c:2202
 #, c-format
 msgid "cannot save to connections in version %d format"
 msgstr ""
 
-#: src/main/saveload.c:2277 src/main/serialize.c:2186
+#: src/main/saveload.c:2279 src/main/serialize.c:2227
 msgid "connection not open for writing"
 msgstr ""
 
-#: src/main/saveload.c:2285
+#: src/main/saveload.c:2288
 msgid "cannot save XDR format to a text-mode connection"
 msgstr ""
 
-#: src/main/saveload.c:2295 src/main/serialize.c:2066
-#: src/main/serialize.c:2080 src/main/serialize.c:2262
-#: src/main/serialize.c:2284
+#: src/main/saveload.c:2298 src/main/serialize.c:2105
+#: src/main/serialize.c:2119 src/main/serialize.c:2303
+#: src/main/serialize.c:2325
 msgid "error writing to connection"
 msgstr ""
 
-#: src/main/saveload.c:2359 src/main/serialize.c:2234
+#: src/main/saveload.c:2359 src/main/serialize.c:2275
 msgid "connection not open for reading"
 msgstr ""
 
@@ -5172,7 +5243,7 @@ msgstr ""
 msgid "scan() expected '%s', got '%s'"
 msgstr ""
 
-#: src/main/scan.c:585 src/main/scan.c:732
+#: src/main/scan.c:585 src/main/scan.c:735
 msgid "too many items"
 msgstr ""
 
@@ -5180,7 +5251,7 @@ msgstr ""
 msgid "empty 'what' specified"
 msgstr ""
 
-#: src/main/scan.c:722
+#: src/main/scan.c:725
 #, c-format
 msgid "line %d did not have %d elements"
 msgstr ""
@@ -5209,168 +5280,170 @@ msgstr ""
 msgid "invalid quote symbol set"
 msgstr ""
 
-#: src/main/scan.c:987
+#: src/main/scan.c:988
 msgid "embedded nul(s) found in input"
 msgstr "indlejret nuller fundet i streng"
 
-#: src/main/seq.c:48
+#: src/main/seq.c:49
 msgid "unequal factor lengths"
 msgstr ""
 
-#: src/main/seq.c:100
+#: src/main/seq.c:101
 msgid "result would be too long a vector"
 msgstr ""
 
-#: src/main/seq.c:159
+#: src/main/seq.c:160
 msgid "argument of length 0"
 msgstr ""
 
-#: src/main/seq.c:161 src/main/seq.c:163
+#: src/main/seq.c:163 src/main/seq.c:168
 #, c-format
-msgid "numerical expression has %d elements: only the first used"
-msgstr ""
+msgid "numerical expression has %d element: only the first used"
+msgid_plural "numerical expression has %d elements: only the first used"
+msgstr[0] ""
+msgstr[1] ""
 
-#: src/main/seq.c:167
+#: src/main/seq.c:174
 msgid "NA/NaN argument"
 msgstr ""
 
-#: src/main/seq.c:331
+#: src/main/seq.c:333
 msgid "incorrect type for second argument"
 msgstr ""
 
-#: src/main/seq.c:334
+#: src/main/seq.c:336
 #, c-format
 msgid "attempt to replicate an object of type '%s'"
 msgstr ""
 
-#: src/main/seq.c:387
+#: src/main/seq.c:393
 msgid "attempt to replicate non-vector"
 msgstr ""
 
-#: src/main/seq.c:403
+#: src/main/seq.c:409
 msgid "cannot replicate NULL to a non-zero length"
 msgstr ""
 
-#: src/main/seq.c:626 src/main/seq.c:633 src/main/seq.c:768 src/main/seq.c:979
+#: src/main/seq.c:630 src/main/seq.c:637 src/main/seq.c:766 src/main/seq.c:977
 #, c-format
 msgid "first element used of '%s' argument"
 msgstr ""
 
-#: src/main/seq.c:766
+#: src/main/seq.c:764
 msgid "'length.out' must be a non-negative number"
 msgstr ""
 
-#: src/main/seq.c:790 src/main/seq.c:856 src/main/seq.c:873
+#: src/main/seq.c:788 src/main/seq.c:854 src/main/seq.c:871
 msgid "'from' must be finite"
 msgstr ""
 
-#: src/main/seq.c:792 src/main/seq.c:858 src/main/seq.c:895
+#: src/main/seq.c:790 src/main/seq.c:856 src/main/seq.c:893
 msgid "'to' must be finite"
 msgstr "'to' skal være finitte"
 
-#: src/main/seq.c:804
+#: src/main/seq.c:802
 msgid "invalid '(to - from)/by' in 'seq'"
 msgstr ""
 
-#: src/main/seq.c:816
+#: src/main/seq.c:814
 msgid "'by' argument is much too small"
 msgstr "'by'-argument er alt for lille"
 
-#: src/main/seq.c:818
+#: src/main/seq.c:816
 msgid "wrong sign in 'by' argument"
 msgstr "forkert tegn i 'by'-argument"
 
-#: src/main/seq.c:875 src/main/seq.c:897
+#: src/main/seq.c:873 src/main/seq.c:895
 msgid "'by' must be finite"
 msgstr "'by' skal være finitte"
 
-#: src/main/seq.c:985 src/main/seq.c:990
+#: src/main/seq.c:983 src/main/seq.c:988
 msgid "argument must be coercible to non-negative integer"
 msgstr ""
 
-#: src/main/serialize.c:224 src/main/serialize.c:254 src/main/serialize.c:277
+#: src/main/serialize.c:228 src/main/serialize.c:275 src/main/serialize.c:299
 msgid "unknown or inappropriate output format"
 msgstr "ukendt eller upassende resultatformat"
 
-#: src/main/serialize.c:504
+#: src/main/serialize.c:542
 msgid "must specify ascii, binary, or xdr format"
 msgstr "det skal være ascii-, binært eller xdr-format"
 
-#: src/main/serialize.c:505
+#: src/main/serialize.c:543
 msgid "unknown output format"
 msgstr "ukendt resultatformat"
 
-#: src/main/serialize.c:536
+#: src/main/serialize.c:574
 msgid "unknown input format"
 msgstr "ukendt kildeformat"
 
-#: src/main/serialize.c:541
+#: src/main/serialize.c:579
 msgid "input format does not match specified format"
 msgstr "kildeformat matcher ikke angivet format"
 
-#: src/main/serialize.c:752
+#: src/main/serialize.c:790
 msgid "no restore method available"
 msgstr "ingen gendannelsesmetode tilgængelig"
 
-#: src/main/serialize.c:794
+#: src/main/serialize.c:832
 msgid "names in persistent strings are currently ignored"
 msgstr "navne i vedvarende strenge ignoreres i øjeblikket"
 
-#: src/main/serialize.c:963
+#: src/main/serialize.c:1001
 #, c-format
 msgid "'%s' may not be available when loading"
 msgstr "'%s' er måske ikke tilgængelig under indlæsning"
 
-#: src/main/serialize.c:970
+#: src/main/serialize.c:1008
 msgid "namespaces may not be available when loading"
 msgstr "navnerum er måske ikke tilgængelig under indlæsning"
 
-#: src/main/serialize.c:1097
+#: src/main/serialize.c:1136
 #, c-format
 msgid "WriteItem: unknown type %i"
 msgstr "WriteItem: Ukendt type %i"
 
-#: src/main/serialize.c:1273
+#: src/main/serialize.c:1312
 #, c-format
 msgid "version %d not supported"
 msgstr "version %d er ikke understøttet"
 
-#: src/main/serialize.c:1305
+#: src/main/serialize.c:1343
 msgid "reference index out of range"
 msgstr "referenceindeks uden for interval"
 
-#: src/main/serialize.c:1335
+#: src/main/serialize.c:1373
 msgid "names in persistent strings are not supported yet"
 msgstr "navne i vedvarende strenge er endnu ikke understøttet"
 
-#: src/main/serialize.c:1463
+#: src/main/serialize.c:1501
 msgid "negative serialized length for vector"
 msgstr ""
 
-#: src/main/serialize.c:1471
+#: src/main/serialize.c:1509
 msgid "invalid upper part of serialized vector length"
 msgstr "ugyldig øvre dle af serialiseret vektorlængde"
 
-#: src/main/serialize.c:1476
+#: src/main/serialize.c:1514
 msgid ""
 "negative serialized vector length:\n"
 "perhaps long vector from 64-bit version of R?"
 msgstr ""
 
-#: src/main/serialize.c:1707
+#: src/main/serialize.c:1746
 msgid "this version of R cannot read class references"
 msgstr "denne version af R kan ikke læse klassereferencer"
 
-#: src/main/serialize.c:1709
+#: src/main/serialize.c:1748
 msgid "this version of R cannot read generic function references"
 msgstr "denne version af R kan ikke læse generiske funktionsreferencer"
 
-#: src/main/serialize.c:1726
+#: src/main/serialize.c:1765
 #, c-format
 msgid "ReadItem: unknown type %i, perhaps written by later version of R"
 msgstr "ReadItem: Ukendt type %i, msåke skrevet af en senere version af R"
 
-#: src/main/serialize.c:1882
+#: src/main/serialize.c:1921
 #, c-format
 msgid ""
 "cannot read unreleased workspace version %d written by experimental R %d.%d."
@@ -5379,7 +5452,7 @@ msgstr ""
 "kan ikke læse ej frigivet arbejdsrumversion %d skrevet af eksperimentel R %d."
 "%d.%d"
 
-#: src/main/serialize.c:1886
+#: src/main/serialize.c:1925
 #, c-format
 msgid ""
 "cannot read workspace version %d written by R %d.%d.%d; need R %d.%d.%d or "
@@ -5388,82 +5461,82 @@ msgstr ""
 "kan ikke læse arbejdsrumversion %d skrevet af R %d.%d.%d; kræver R %d.%d.%d "
 "eller nyere"
 
-#: src/main/serialize.c:1965
+#: src/main/serialize.c:2004
 msgid "read failed"
 msgstr "læs mislykkedes"
 
-#: src/main/serialize.c:2028
+#: src/main/serialize.c:2067
 msgid "error reading from ascii connection"
 msgstr "fejl under læsning fra ascii-forbindelse"
 
-#: src/main/serialize.c:2030
+#: src/main/serialize.c:2069
 msgid "unexpected format in ascii connection"
 msgstr "uventet format i ascii-forbindelse"
 
-#: src/main/serialize.c:2035 src/main/serialize.c:2049
+#: src/main/serialize.c:2074 src/main/serialize.c:2088
 msgid "error reading from connection"
 msgstr "fejl under læsning fra forbindelse"
 
-#: src/main/serialize.c:2090
+#: src/main/serialize.c:2130
 msgid "only ascii format can be written to text mode connections"
 msgstr "kun ascii-format kan skrivet til forbindelser i teksttilstand"
 
-#: src/main/serialize.c:2104
+#: src/main/serialize.c:2144
 msgid "only ascii format can be read from text mode connections"
 msgstr "kun ascii-format kan læses fra forbindelser i teksttilstand"
 
-#: src/main/serialize.c:2159 src/main/serialize.c:2312
-#: src/main/serialize.c:2461
+#: src/main/serialize.c:2200 src/main/serialize.c:2353
+#: src/main/serialize.c:2502
 msgid "bad version value"
 msgstr "ugyldig versionsværdi"
 
-#: src/main/serialize.c:2184
+#: src/main/serialize.c:2225
 msgid "binary-mode connection required for ascii=FALSE"
 msgstr "forbindlese i binær tilstand krævet for ascii=FALSE"
 
-#: src/main/serialize.c:2340 src/main/serialize.c:2377
-#: src/main/serialize.c:2440
+#: src/main/serialize.c:2381 src/main/serialize.c:2418
+#: src/main/serialize.c:2481
 msgid "serialization is too large to store in a raw vector"
 msgstr "serialisering er for stor til at lagre i en rå vektor"
 
-#: src/main/serialize.c:2357
+#: src/main/serialize.c:2398
 msgid "cannot allocate buffer"
 msgstr "kan ikke allokere mellemlager"
 
-#: src/main/serialize.c:2546 src/main/serialize.c:2619
+#: src/main/serialize.c:2592 src/main/serialize.c:2665
 msgid "not a proper file name"
 msgstr "ikke et korrekt filnavn"
 
-#: src/main/serialize.c:2548
+#: src/main/serialize.c:2594
 msgid "not a proper raw vector"
 msgstr "ikke en korrekt rå vektor"
 
-#: src/main/serialize.c:2569
+#: src/main/serialize.c:2615
 msgid "could not determine file position"
 msgstr "kunne ikke bestemme filplacering"
 
-#: src/main/serialize.c:2621
+#: src/main/serialize.c:2667
 msgid "bad offset/length argument"
 msgstr "ugyldig forskydning/længde-argument"
 
-#: src/main/serialize.c:2645 src/main/serialize.c:2658
-#: src/main/serialize.c:2667 src/main/serialize.c:2677
-#: src/main/serialize.c:2690
+#: src/main/serialize.c:2691 src/main/serialize.c:2704
+#: src/main/serialize.c:2713 src/main/serialize.c:2723
+#: src/main/serialize.c:2736
 #, c-format
 msgid "seek failed on %s"
 msgstr "søgning mislykkedes på %s"
 
-#: src/main/serialize.c:2662 src/main/serialize.c:2671
-#: src/main/serialize.c:2681 src/main/serialize.c:2694
+#: src/main/serialize.c:2708 src/main/serialize.c:2717
+#: src/main/serialize.c:2727 src/main/serialize.c:2740
 #, c-format
 msgid "read failed on %s"
 msgstr "læsning mislykkedes på %s"
 
-#: src/main/serialize.c:2713
+#: src/main/serialize.c:2759
 msgid "bad environment"
 msgstr "ugyldigt miljø"
 
-#: src/main/serialize.c:2715
+#: src/main/serialize.c:2761
 msgid "bad variable names"
 msgstr "ugyldige variabelnavne"
 
@@ -5471,165 +5544,161 @@ msgstr "ugyldige variabelnavne"
 msgid "only atomic vectors can be tested to be sorted"
 msgstr "kun atomare vektorer kan testes for sortering"
 
-#: src/main/sort.c:326 src/main/sort.c:1228 src/main/sort.c:1396
+#: src/main/sort.c:325 src/main/sort.c:1248
 msgid "'decreasing' must be TRUE or FALSE"
 msgstr "'decreasing' skal være SAND eller FALSK"
 
-#: src/main/sort.c:329 src/main/sort.c:600
+#: src/main/sort.c:328 src/main/sort.c:599
 msgid "only atomic vectors can be sorted"
 msgstr "kun atomare vektorer kan sorteres"
 
-#: src/main/sort.c:331 src/main/sort.c:602 src/main/sort.c:1297
+#: src/main/sort.c:330 src/main/sort.c:601 src/main/sort.c:1317
 msgid "raw vectors cannot be sorted"
 msgstr "rå vektorer kan ikke sorteres"
 
-#: src/main/sort.c:613
+#: src/main/sort.c:612
 msgid "NA or infinite index"
 msgstr ""
 
-#: src/main/sort.c:616
+#: src/main/sort.c:615
 #, c-format
 msgid "index %ld outside bounds"
 msgstr "indeks %ld uden for grænserne"
 
-#: src/main/sort.c:621 src/main/sort.c:634
+#: src/main/sort.c:620 src/main/sort.c:633
 msgid "NA index"
 msgstr "NA-indeks"
 
-#: src/main/sort.c:623 src/main/sort.c:636
+#: src/main/sort.c:622 src/main/sort.c:635
 #, c-format
 msgid "index %d outside bounds"
 msgstr "indeks %d uden for grænserne"
 
-#: src/main/sort.c:1237
+#: src/main/sort.c:1257
 #, c-format
 msgid "argument %d is not a vector"
 msgstr "argument %d er ikke en vektor"
 
-#: src/main/sort.c:1239
+#: src/main/sort.c:1259
 msgid "argument lengths differ"
 msgstr "argumentlængder er forskellige"
 
-#: src/main/sort.c:1324
+#: src/main/sort.c:1344
 msgid "invalid ties.method for rank() [should never happen]"
 msgstr "ugyldig ties.method for rank() [bør aldrig ske]"
 
-#: src/main/sort.c:1429
-msgid "too large a range of values in 'x'"
-msgstr "for stort interval for værdier i 'x'"
-
-#: src/main/source.c:215
+#: src/main/source.c:220
 msgid "coercion of 'text' to character was unsuccessful"
 msgstr ""
 
-#: src/main/source.c:231
+#: src/main/source.c:236
 #, c-format
 msgid "argument '%s = \"%s\"' will be ignored"
 msgstr ""
 
-#: src/main/split.c:38
+#: src/main/split.c:39
 msgid "first argument must be a vector"
 msgstr ""
 
-#: src/main/split.c:40
+#: src/main/split.c:41
 msgid "second argument must be a factor"
 msgstr ""
 
-#: src/main/split.c:45
+#: src/main/split.c:46
 msgid "group length is 0 but data length > 0"
 msgstr ""
 
-#: src/main/split.c:47
+#: src/main/split.c:48
 msgid "data length is not a multiple of split variable"
 msgstr ""
 
-#: src/main/split.c:56
+#: src/main/split.c:58
 msgid "factor has bad level"
 msgstr ""
 
-#: src/main/sprintf.c:94
+#: src/main/sprintf.c:97
 #, c-format
 msgid "required resulting string length %d is greater than maximal %d"
 msgstr ""
 
-#: src/main/sprintf.c:102
+#: src/main/sprintf.c:105
 msgid "'fmt' is not a character vector"
 msgstr ""
 
-#: src/main/sprintf.c:107
+#: src/main/sprintf.c:110
 #, c-format
 msgid "only %d arguments are allowed"
 msgstr ""
 
-#: src/main/sprintf.c:114
+#: src/main/sprintf.c:117
 #, c-format
 msgid "invalid type of argument[%d]: '%s'"
 msgstr ""
 
-#: src/main/sprintf.c:125 src/main/sprintf.c:128
+#: src/main/sprintf.c:128 src/main/sprintf.c:131
 msgid "arguments cannot be recycled to the same length"
 msgstr ""
 
-#: src/main/sprintf.c:150 src/main/sprintf.c:257
+#: src/main/sprintf.c:153 src/main/sprintf.c:260
 #, c-format
 msgid "'fmt' length exceeds maximal format length %d"
 msgstr ""
 
-#: src/main/sprintf.c:169
+#: src/main/sprintf.c:172
 #, c-format
 msgid "unrecognised format specification '%s'"
 msgstr ""
 
-#: src/main/sprintf.c:180 src/main/sprintf.c:186 src/main/sprintf.c:199
-#: src/main/sprintf.c:206
+#: src/main/sprintf.c:183 src/main/sprintf.c:189 src/main/sprintf.c:202
+#: src/main/sprintf.c:209
 #, c-format
 msgid "reference to non-existent argument %d"
 msgstr ""
 
-#: src/main/sprintf.c:218
+#: src/main/sprintf.c:221
 msgid "at most one asterisk '*' is supported in each conversion specification"
 msgstr ""
 
-#: src/main/sprintf.c:228
+#: src/main/sprintf.c:231
 msgid "argument for '*' conversion specification must be a number"
 msgstr ""
 
-#: src/main/sprintf.c:266
+#: src/main/sprintf.c:269
 msgid "coercion has changed vector length to 0"
 msgstr ""
 
-#: src/main/sprintf.c:339 src/main/sprintf.c:353 src/main/sprintf.c:367
-#: src/main/sprintf.c:402
+#: src/main/sprintf.c:343 src/main/sprintf.c:357 src/main/sprintf.c:371
+#: src/main/sprintf.c:406
 #, c-format
 msgid "invalid format '%s'; %s"
 msgstr ""
 
-#: src/main/sprintf.c:340
+#: src/main/sprintf.c:344
 #, c-format
 msgid "use format %d or %i for logical objects"
 msgstr ""
 
-#: src/main/sprintf.c:354
+#: src/main/sprintf.c:358
 #, c-format
 msgid "use format %d, %i, %o, %x or %X for integer objects"
 msgstr ""
 
-#: src/main/sprintf.c:368
+#: src/main/sprintf.c:372
 #, c-format
 msgid "use format %f, %e, %g or %a for numeric objects"
 msgstr ""
 
-#: src/main/sprintf.c:403
+#: src/main/sprintf.c:407
 #, c-format
 msgid "use format %s for character objects"
 msgstr ""
 
-#: src/main/sprintf.c:408
+#: src/main/sprintf.c:412
 #, c-format
 msgid "likely truncation of character string to %d characters"
 msgstr ""
 
-#: src/main/sprintf.c:417
+#: src/main/sprintf.c:421
 msgid "unsupported type"
 msgstr "ej understøttet type"
 
@@ -5637,377 +5706,382 @@ msgstr "ej understøttet type"
 msgid "R_LibraryFileName: buffer too small"
 msgstr "R_LibraryFileName: mellemlager for lille"
 
-#: src/main/subassign.c:117
+#: src/main/subassign.c:118
 msgid "attempt to enlarge non-vector"
 msgstr ""
 
-#: src/main/subassign.c:122
+#: src/main/subassign.c:123
 #, c-format
 msgid "assignment outside vector/list limits (extending from %d to %d)"
 msgstr ""
 
-#: src/main/subassign.c:367
+#: src/main/subassign.c:391
 #, c-format
 msgid "incompatible types (from %s to %s) in subassignment type fix"
 msgstr ""
 
-#: src/main/subassign.c:502 src/main/subassign.c:782 src/main/subassign.c:785
-#: src/main/subassign.c:1076
+#: src/main/subassign.c:550 src/main/subassign.c:830 src/main/subassign.c:833
+#: src/main/subassign.c:1133
 msgid "NAs are not allowed in subscripted assignments"
 msgstr ""
 
-#: src/main/subassign.c:520 src/main/subassign.c:796 src/main/subassign.c:1068
-#: src/main/subassign.c:1641
+#: src/main/subassign.c:568 src/main/subassign.c:844 src/main/subassign.c:1125
+#: src/main/subassign.c:1705
 msgid "replacement has length zero"
 msgstr "erstatning har længden nul"
 
-#: src/main/subassign.c:522 src/main/subassign.c:798 src/main/subassign.c:1070
+#: src/main/subassign.c:570 src/main/subassign.c:846 src/main/subassign.c:1127
 msgid "number of items to replace is not a multiple of replacement length"
 msgstr ""
 
-#: src/main/subassign.c:766
+#: src/main/subassign.c:814
 msgid "incorrect number of subscripts on matrix"
 msgstr ""
 
-#: src/main/subassign.c:1022
+#: src/main/subassign.c:1079
 #, c-format
 msgid "incompatible types (from %s to %s) in matrix subset assignment"
 msgstr ""
 
-#: src/main/subassign.c:1038 src/main/subset.c:928
+#: src/main/subassign.c:1095 src/main/subset.c:957
 msgid "incorrect number of subscripts"
 msgstr ""
 
-#: src/main/subassign.c:1214
+#: src/main/subassign.c:1272
 #, c-format
 msgid "incompatible types (from %s to %s) in array subset assignment"
 msgstr ""
 
-#: src/main/subassign.c:1249 src/main/subassign.c:1270
+#: src/main/subassign.c:1308 src/main/subassign.c:1329
 msgid "invalid subscript in list assign"
 msgstr ""
 
-#: src/main/subassign.c:1263
+#: src/main/subassign.c:1322
 msgid "invalid number of subscripts to list assign"
 msgstr ""
 
-#: src/main/subassign.c:1361
+#: src/main/subassign.c:1421
 msgid "SubAssignArgs: invalid number of arguments"
 msgstr ""
 
-#: src/main/subassign.c:1506
+#: src/main/subassign.c:1566
 msgid "result is zero-length and so cannot be a language object"
 msgstr ""
 
-#: src/main/subassign.c:1611
+#: src/main/subassign.c:1665
 msgid ""
 "[[<- defined for objects of type \"S4\" only for subclasses of environment"
 msgstr ""
 
-#: src/main/subassign.c:1617
+#: src/main/subassign.c:1677
 msgid "wrong args for environment subassignment"
 msgstr ""
 
-#: src/main/subassign.c:1643
+#: src/main/subassign.c:1707
 msgid "more elements supplied than there are to replace"
 msgstr ""
 
-#: src/main/subassign.c:1645
+#: src/main/subassign.c:1709
 msgid "[[ ]] with missing subscript"
 msgstr ""
 
-#: src/main/subassign.c:1657 src/main/subassign.c:1675
+#: src/main/subassign.c:1727 src/main/subassign.c:1745
 msgid "[[ ]] subscript out of bounds"
 msgstr ""
 
-#: src/main/subassign.c:1663 src/main/subassign.c:1841
+#: src/main/subassign.c:1733 src/main/subassign.c:1914
 msgid "[[ ]] improper number of subscripts"
 msgstr ""
 
-#: src/main/subassign.c:1808
+#: src/main/subassign.c:1879
 #, c-format
 msgid "incompatible types (from %s to %s) in [[ assignment"
 msgstr ""
 
-#: src/main/subassign.c:1852
+#: src/main/subassign.c:1925
 #, c-format
 msgid "[[ ]] subscript (%d) out of bounds"
 msgstr ""
 
-#: src/main/subassign.c:1905 src/main/subscript.c:143 src/main/subscript.c:145
-#: src/main/subscript.c:274 src/main/subscript.c:276 src/main/subscript.c:826
-#: src/main/subscript.c:828 src/main/subscript.c:919 src/main/subscript.c:921
-#: src/main/subset.c:1109
+#: src/main/subassign.c:1986 src/main/subscript.c:151 src/main/subscript.c:278
+#: src/main/subscript.c:903 src/main/subscript.c:996 src/main/subset.c:1176
 #, c-format
 msgid "invalid subscript type '%s'"
 msgstr ""
 
-#: src/main/subassign.c:1950
+#: src/main/subassign.c:2037
 msgid "no method for assigning subsets of this S4 class"
 msgstr ""
 
-#: src/main/subassign.c:2008
+#: src/main/subassign.c:2095
 msgid "Coercing LHS to a list"
 msgstr ""
 
-#: src/main/subscript.c:53 src/main/subscript.c:75 src/main/subscript.c:180
-#: src/main/subscript.c:204
-msgid "attempt to select less than one element"
+#: src/main/subscript.c:59 src/main/subscript.c:81 src/main/subscript.c:185
+#: src/main/subscript.c:209
+#, c-format
+msgid "attempt to select less than one element in %s"
 msgstr ""
 
-#: src/main/subscript.c:57 src/main/subscript.c:72 src/main/subscript.c:178
-#: src/main/subscript.c:208 src/main/subscript.c:304
-msgid "attempt to select more than one element"
+#: src/main/subscript.c:63 src/main/subscript.c:78 src/main/subscript.c:183
+#: src/main/subscript.c:213 src/main/subscript.c:305
+#, c-format
+msgid "attempt to select more than one element in %s"
 msgstr ""
 
-#: src/main/subscript.c:184
+#: src/main/subscript.c:189
 msgid "internal error in use of recursive indexing"
 msgstr "intern fejl i brugen af rekursiv indeksering"
 
-#: src/main/subscript.c:252
+#: src/main/subscript.c:257
 #, c-format
 msgid "further partial match of '%s' to '%s'"
 msgstr ""
 
-#: src/main/subscript.c:302
+#: src/main/subscript.c:303
 #, c-format
 msgid "recursive indexing failed at level %d\n"
 msgstr "rekursiv indeksering mislykkedes på niveau %d\n"
 
-#: src/main/subscript.c:309
+#: src/main/subscript.c:313
 #, c-format
 msgid "no such index at level %d\n"
 msgstr "intet sådant indeks på niveau %d\n"
 
-#: src/main/subscript.c:352
+#: src/main/subscript.c:360
 msgid "incorrect number of columns in matrix subscript"
 msgstr "ukorrekt antal kolonner i matrix-underskript"
 
-#: src/main/subscript.c:371 src/main/subscript.c:389 src/main/subscript.c:413
+#: src/main/subscript.c:379 src/main/subscript.c:397 src/main/subscript.c:421
 msgid "negative values are not allowed in a matrix subscript"
 msgstr "negative værdier er ikke tilladt i et matrix-underskript"
 
-#: src/main/subscript.c:492
+#: src/main/subscript.c:500
 msgid "(subscript) logical subscript too long"
 msgstr ""
 
-#: src/main/subscript.c:590 src/main/subscript.c:645
+#: src/main/subscript.c:668 src/main/subscript.c:723
 msgid "only 0's may be mixed with negative subscripts"
 msgstr ""
 
-#: src/main/subscript.c:618
+#: src/main/subscript.c:696
 msgid "subscript too large for 32-bit R"
 msgstr ""
 
-#: src/main/subscript.c:817
+#: src/main/subscript.c:895
 msgid "no 'dimnames' attribute for array"
 msgstr ""
 
-#: src/main/subscript.c:857
+#: src/main/subscript.c:931
 msgid "subscripting on non-vector"
 msgstr ""
 
-#: src/main/subset.c:261
+#: src/main/subset.c:260
 msgid "dimensions would exceed maximum size of array"
 msgstr ""
 
-#: src/main/subset.c:304 src/main/subset.c:333
+#: src/main/subset.c:304 src/main/subset.c:334
 msgid "matrix subscripting not handled for this type"
 msgstr ""
 
-#: src/main/subset.c:488
+#: src/main/subset.c:493
 msgid "array subscripting not handled for this type"
 msgstr ""
 
-#: src/main/subset.c:827
+#: src/main/subset.c:856
 msgid "incorrect number of dimensions"
 msgstr ""
 
-#: src/main/subset.c:924
+#: src/main/subset.c:953
 msgid "no index specified"
 msgstr "intet indeks angivet"
 
-#: src/main/subset.c:934
+#: src/main/subset.c:963
 msgid "this S4 class is not subsettable"
 msgstr ""
 
-#: src/main/subset.c:940
+#: src/main/subset.c:970
 msgid "wrong arguments for subsetting an environment"
 msgstr ""
 
-#: src/main/summary.c:30
+#: src/main/summary.c:33
 #, c-format
 msgid "invalid 'type' (%s) of argument"
 msgstr ""
 
-#: src/main/summary.c:66 src/main/summary.c:78 src/main/summary.c:103
+#: src/main/summary.c:69 src/main/summary.c:81 src/main/summary.c:106
 msgid "integer overflow - use sum(as.numeric(.))"
 msgstr ""
 
-#: src/main/summary.c:522
+#: src/main/summary.c:526
 #, c-format
 msgid "internal error ('op = %d' in do_summary).\t Call a Guru"
 msgstr ""
 
-#: src/main/summary.c:623
+#: src/main/summary.c:637
 msgid "Integer overflow - use sum(as.numeric(.))"
 msgstr ""
 
-#: src/main/summary.c:731
+#: src/main/summary.c:750
 msgid "no non-missing arguments, returning NA"
 msgstr ""
 
-#: src/main/summary.c:734
+#: src/main/summary.c:753
 msgid "no non-missing arguments to min; returning Inf"
 msgstr ""
 
-#: src/main/summary.c:736
+#: src/main/summary.c:755
 msgid "no non-missing arguments to max; returning -Inf"
 msgstr ""
 
-#: src/main/summary.c:801
-msgid "non-numeric argument"
-msgstr ""
-
-#: src/main/summary.c:845
+#: src/main/summary.c:913
 msgid "argument to 'which' is not logical"
 msgstr ""
 
-#: src/main/summary.c:889
+#: src/main/summary.c:957
 msgid "no arguments"
 msgstr "ingen argumenter"
 
-#: src/main/summary.c:900 src/main/summary.c:917
+#: src/main/summary.c:968 src/main/summary.c:985
 msgid "invalid input type"
 msgstr ""
 
-#: src/main/summary.c:934
+#: src/main/summary.c:1002
 msgid "an argument will be fractionally recycled"
 msgstr ""
 
-#: src/main/sysutils.c:69 src/main/sysutils.c:83
+#: src/main/sysutils.c:68 src/main/sysutils.c:82
 #, c-format
 msgid "cannot determine file modification time of '%s'"
 msgstr ""
 
-#: src/main/sysutils.c:167
+#: src/main/sysutils.c:166
 msgid "encoding of a filename cannot be 'bytes'"
 msgstr "kodning for et filnavn kan ikke være 'bytes'"
 
-#: src/main/sysutils.c:170 src/main/sysutils.c:803 src/main/sysutils.c:818
-#: src/main/sysutils.c:909 src/main/sysutils.c:924 src/main/sysutils.c:1020
+#: src/main/sysutils.c:169 src/main/sysutils.c:831 src/main/sysutils.c:846
+#: src/main/sysutils.c:975
 #, c-format
 msgid "unsupported conversion from '%s' in codepage %d"
 msgstr ""
 
-#: src/main/sysutils.c:179
+#: src/main/sysutils.c:178
 msgid "file name conversion problem -- name too long?"
 msgstr ""
 
-#: src/main/sysutils.c:180
+#: src/main/sysutils.c:179
 msgid "file name conversion problem"
 msgstr ""
 
-#: src/main/sysutils.c:249
+#: src/main/sysutils.c:248
 msgid "invalid filename pattern"
-msgstr ""
+msgstr "ugyldig filnavnmønster"
 
-#: src/main/sysutils.c:253
+#: src/main/sysutils.c:252
 msgid "invalid file extension"
 msgstr "ugyldig filendelse"
 
-#: src/main/sysutils.c:255
+#: src/main/sysutils.c:254
 msgid "no 'pattern'"
 msgstr "ingen 'pattern'"
 
-#: src/main/sysutils.c:257
+#: src/main/sysutils.c:256
 msgid "no 'tempdir'"
 msgstr "ingen 'tempdir'"
 
-#: src/main/sysutils.c:259
+#: src/main/sysutils.c:258
 msgid "no 'fileext'"
 msgstr "ingen 'fileext'"
 
-#: src/main/sysutils.c:345 src/main/sysutils.c:348 src/main/sysutils.c:439
-#: src/main/sysutils.c:441 src/main/sysutils.c:477
+#: src/main/sysutils.c:328
+#, c-format
+msgid "system call failed: %s"
+msgstr "systemkald mislykkedes: %s"
+
+#: src/main/sysutils.c:357 src/main/sysutils.c:360 src/main/sysutils.c:451
+#: src/main/sysutils.c:453 src/main/sysutils.c:489
 msgid "wrong type for argument"
 msgstr "forkert type for argument"
 
-#: src/main/sysutils.c:443
+#: src/main/sysutils.c:455
 msgid "wrong length for argument"
 msgstr "forkert længde for argument"
 
-#: src/main/sysutils.c:464
+#: src/main/sysutils.c:476
 msgid "'Sys.setenv' is not available on this system"
 msgstr "'Sys.setenv' er ikke tilgængelig på dette system"
 
-#: src/main/sysutils.c:508
+#: src/main/sysutils.c:520
 msgid "this system cannot unset environment variables: setting to \"\""
 msgstr ""
 
-#: src/main/sysutils.c:519
+#: src/main/sysutils.c:531
 msgid "'Sys.unsetenv' is not available on this system"
 msgstr ""
 
-#: src/main/sysutils.c:616
+#: src/main/sysutils.c:628
 #, c-format
 msgid "unsupported conversion from '%s' to '%s' in codepage %d"
 msgstr ""
 
-#: src/main/sysutils.c:631
+#: src/main/sysutils.c:643
 msgid "'x' must be a character vector"
 msgstr ""
 
-#: src/main/sysutils.c:646
-msgid "'x' must be a list of NULL or raw vectors"
-msgstr ""
+#: src/main/sysutils.c:658
+#, fuzzy
+msgid "'x' must be a character vector or a list of NULL or raw vectors"
+msgstr "'what' skal være en tegnstreng eller en funktion"
 
-#: src/main/sysutils.c:724 src/main/sysutils.c:789 src/main/sysutils.c:895
-#: src/main/sysutils.c:994 src/main/sysutils.c:1010 src/main/sysutils.c:1087
+#: src/main/sysutils.c:736 src/main/sysutils.c:914 src/main/sysutils.c:932
+#: src/main/sysutils.c:949 src/main/sysutils.c:965 src/main/sysutils.c:1042
 #, c-format
 msgid "'%s' must be called on a CHARSXP"
-msgstr ""
+msgstr "'%s' skal kaldes på en CHARSXP"
 
-#: src/main/sysutils.c:792 src/main/sysutils.c:898 src/main/sysutils.c:1015
-#: src/main/sysutils.c:1090
+#: src/main/sysutils.c:805 src/main/sysutils.c:970 src/main/sysutils.c:1045
 msgid "translating strings with \"bytes\" encoding is not allowed"
 msgstr ""
 
-#: src/main/sysutils.c:1116
+#: src/main/sysutils.c:818
+msgid "internal error: no translation needed"
+msgstr "intern fejl: ingen oversættelse krævet"
+
+#: src/main/sysutils.c:1071
 #, c-format
 msgid "unsupported conversion to '%s' from codepage %d"
-msgstr ""
+msgstr "ikke understøttet konvertering til '%s' fra kodeside %d"
 
-#: src/main/sysutils.c:1530
+#: src/main/sysutils.c:1486
 #, c-format
 msgid "invalid Unicode point %u"
 msgstr ""
 
-#: src/main/sysutils.c:1632
+#: src/main/sysutils.c:1588
 msgid "cannot create 'R_TempDir'"
 msgstr ""
 
-#: src/main/sysutils.c:1636 src/main/sysutils.c:1644 src/main/sysutils.c:1647
+#: src/main/sysutils.c:1592 src/main/sysutils.c:1600 src/main/sysutils.c:1603
 msgid "unable to set R_SESSION_TMPDIR"
 msgstr ""
 
-#: src/main/sysutils.c:1656
+#: src/main/sysutils.c:1612
 msgid "cannot allocate 'R_TempDir'"
 msgstr "kan ikke allokere 'R_TempDir'"
 
-#: src/main/sysutils.c:1693
+#: src/main/sysutils.c:1649
 msgid "temporary name too long"
 msgstr ""
 
-#: src/main/sysutils.c:1708
+#: src/main/sysutils.c:1664
 msgid "cannot find unused tempfile name"
 msgstr ""
 
-#: src/main/sysutils.c:1711
+#: src/main/sysutils.c:1667
 msgid "allocation failed in R_tmpnam2"
 msgstr ""
 
-#: src/main/sysutils.c:1838
+#: src/main/sysutils.c:1794
 msgid "'dirmark = TRUE' is not supported on this platform"
 msgstr ""
 
@@ -6017,193 +6091,199 @@ msgid "length %d is too large for hashing"
 msgstr ""
 
 #: src/main/unique.c:490 src/main/unique.c:519 src/main/unique.c:549
-#: src/main/unique.c:575 src/main/unique.c:614
+#: src/main/unique.c:573 src/main/unique.c:612
 msgid "'duplicated' applies only to vectors"
 msgstr ""
 
-#: src/main/unique.c:619
+#: src/main/unique.c:617
 msgid "any_duplicated3(., <0-length incomp>)"
 msgstr ""
 
-#: src/main/unique.c:669
+#: src/main/unique.c:667
 msgid "'fromLast' must be length 1"
 msgstr ""
 
-#: src/main/unique.c:672
+#: src/main/unique.c:670
 msgid "'fromLast' must be TRUE or FALSE"
 msgstr ""
 
-#: src/main/unique.c:683
+#: src/main/unique.c:681
 #, c-format
 msgid "%s() applies only to vectors"
 msgstr ""
 
-#: src/main/unique.c:690
+#: src/main/unique.c:688
 msgid "'nmax' must be positive"
 msgstr "'nmax' skal være positiv"
 
-#: src/main/unique.c:922
+#: src/main/unique.c:985
 msgid "'match' requires vector arguments"
 msgstr ""
 
-#: src/main/unique.c:970 src/main/unique.c:1125
+#: src/main/unique.c:1033 src/main/unique.c:1171
 msgid "argument is not of mode character"
 msgstr ""
 
-#: src/main/unique.c:1251
+#: src/main/unique.c:1296
 msgid "... used in a situation where it does not exist"
 msgstr ""
 
-#: src/main/unique.c:1342
-msgid "unable to find a closure from within which 'match.call' was called"
+#: src/main/unique.c:1302
+msgid "... is not a pairlist"
 msgstr ""
 
-#: src/main/unique.c:1536
+#: src/main/unique.c:1531
 msgid "non-numeric data frame in rowsum"
 msgstr ""
 
-#: src/main/unique.c:1568
+#: src/main/unique.c:1563
 msgid "this cannot happen"
 msgstr ""
 
-#: src/main/unique.c:1639
+#: src/main/unique.c:1634
 msgid "'names' must be a character vector"
 msgstr ""
 
-#: src/main/unique.c:1643
-msgid "'sep' must be a character string"
-msgstr ""
-
-#: src/main/util.c:88 src/main/util.c:106
+#: src/main/util.c:87 src/main/util.c:105
 msgid "object is not a matrix"
 msgstr ""
 
-#: src/main/util.c:254 src/main/util.c:268 src/main/util.c:285
+#: src/main/util.c:303 src/main/util.c:315 src/main/util.c:326
+#: src/main/util.c:341
 #, c-format
 msgid "type %d is unimplemented in '%s'"
 msgstr ""
 
-#: src/main/util.c:297
+#: src/main/util.c:352
 #, c-format
 msgid "unimplemented type '%s' in '%s'\n"
 msgstr ""
 
-#: src/main/util.c:299
+#: src/main/util.c:354
 #, c-format
 msgid "unimplemented type (%d) in '%s'\n"
 msgstr ""
 
-#: src/main/util.c:424
+#: src/main/util.c:479
 msgid "invalid tag in name extraction"
 msgstr ""
 
-#: src/main/util.c:434
+#: src/main/util.c:489
 #, c-format
 msgid "%d argument passed to .Internal(%s) which requires %d"
 msgid_plural "%d arguments passed to .Internal(%s) which requires %d"
 msgstr[0] ""
 msgstr[1] ""
 
-#: src/main/util.c:440
+#: src/main/util.c:495
 #, c-format
 msgid "%d argument passed to '%s' which requires %d"
 msgid_plural "%d arguments passed to '%s' which requires %d"
 msgstr[0] ""
 msgstr[1] ""
 
-#: src/main/util.c:455
+#: src/main/util.c:510
 #, c-format
 msgid "supplied argument name '%s' does not match '%s'"
 msgstr ""
 
-#: src/main/util.c:465
+#: src/main/util.c:520
 #, c-format
 msgid "'nthcdr' list shorter than %d"
 msgstr ""
 
-#: src/main/util.c:470
+#: src/main/util.c:525
 msgid "'nthcdr' needs a list to CDR down"
 msgstr ""
 
-#: src/main/util.c:586
+#: src/main/util.c:641
 msgid "'all.x' must be TRUE or FALSE"
 msgstr ""
 
-#: src/main/util.c:588
+#: src/main/util.c:643
 msgid "'all.y' must be TRUE or FALSE"
 msgstr ""
 
-#: src/main/util.c:700
+#: src/main/util.c:672
+msgid "number of rows in the result exceeds maximum vector length"
+msgstr ""
+
+#: src/main/util.c:764
 msgid "missing value is invalid"
 msgstr ""
 
-#: src/main/util.c:709 src/main/util.c:716
+#: src/main/util.c:773 src/main/util.c:780
 msgid "cannot change working directory"
 msgstr ""
 
-#: src/main/util.c:735 src/main/util.c:769 src/main/util.c:810
-#: src/main/util.c:852 src/main/util.c:981 src/main/util.c:1040
-#: src/main/util.c:1063
+#: src/main/util.c:800 src/main/util.c:834 src/main/util.c:875
+#: src/main/util.c:917 src/main/util.c:1046 src/main/util.c:1105
+#: src/main/util.c:1128
 msgid "a character vector argument expected"
 msgstr ""
 
-#: src/main/util.c:742 src/main/util.c:777 src/main/util.c:819
-#: src/main/util.c:860
+#: src/main/util.c:807 src/main/util.c:842 src/main/util.c:884
+#: src/main/util.c:925
 msgid "path too long"
 msgstr ""
 
-#: src/main/util.c:995
+#: src/main/util.c:1060
 msgid "only the first character of 'quote' will be used"
 msgstr ""
 
-#: src/main/util.c:1065
+#: src/main/util.c:1130
 msgid "a character vector 'value' expected"
 msgstr ""
 
-#: src/main/util.c:1068
+#: src/main/util.c:1133
 msgid "'value' must be of positive length"
 msgstr ""
 
-#: src/main/util.c:1197 src/main/util.c:1205
+#: src/main/util.c:1262 src/main/util.c:1270
 #, c-format
 msgid "invalid input '%s' in 'utf8towcs'"
 msgstr ""
 
-#: src/main/util.c:1290
+#: src/main/util.c:1355
 #, c-format
 msgid "invalid multibyte string at '%s'"
 msgstr ""
 
-#: src/main/util.c:1399
+#: src/main/util.c:1497
 msgid "error message truncated to 255 chars"
 msgstr ""
 
-#: src/main/util.c:1412
+#: src/main/util.c:1510
 msgid "warning message truncated to 255 chars"
 msgstr ""
 
-#: src/main/util.c:1819
+#: src/main/util.c:1659
+#, c-format
+msgid "accuracy loss in conversion from \"%s\" to numeric"
+msgstr ""
+
+#: src/main/util.c:1969
 msgid "all arguments must be named"
 msgstr ""
 
-#: src/main/util.c:1893
+#: src/main/util.c:2091
 msgid "ICU is not supported on this build"
 msgstr ""
 
-#: src/main/util.c:1954
+#: src/main/util.c:2158
 msgid "'breaks' is not sorted"
 msgstr "'breaks' er ikke sorteret"
 
-#: src/main/util.c:1988 src/main/util.c:2034
+#: src/main/util.c:2192 src/main/util.c:2242
 #, c-format
 msgid "long vector '%s' is not supported"
 msgstr "lang vektor '%s' er ikke understøttet"
 
-#: src/main/util.c:2087
+#: src/main/util.c:2296
 msgid "'eps.correct' must be 0, 1, or 2"
 msgstr ""
 
-#: src/main/util.c:2115
+#: src/main/util.c:2324
 msgid "'x' must be a vector"
 msgstr "'x' skal være en vektor"
 
@@ -6231,14 +6311,6 @@ msgid ""
 "\n"
 msgstr ""
 
-#: src/main/vfonts.c:50
-msgid "vfont routines cannot be accessed in module"
-msgstr ""
-
-#: src/main/vfonts.c:67 src/main/vfonts.c:80 src/main/vfonts.c:98
-msgid "Hershey fonts cannot be loaded"
-msgstr ""
-
 #: src/main/xspline.c:60
 #, c-format
 msgid "add_point - reached MAXNUMPTS (%d)"
@@ -6260,7 +6332,7 @@ msgstr ""
 msgid "There must be at least three control points"
 msgstr ""
 
-#: src/modules/X11/dataentry.c:1871 src/modules/X11/devX11.c:1246
+#: src/modules/X11/dataentry.c:1874 src/modules/X11/devX11.c:1248
 #, c-format
 msgid "X11 protocol error: %s"
 msgstr ""
@@ -6281,34 +6353,34 @@ msgid ""
 "Consider using X11 with colortype=\"pseudo.cube\" or \"gray\"."
 msgstr ""
 
-#: src/modules/X11/devX11.c:1027
+#: src/modules/X11/devX11.c:1029
 msgid ""
 "could not find any X11 fonts\n"
 "Check that the Font Path is correct."
 msgstr ""
 
-#: src/modules/X11/devX11.c:1087
+#: src/modules/X11/devX11.c:1089
 #, c-format
 msgid "X11 used font size %d when %d was requested"
 msgstr ""
 
-#: src/modules/X11/devX11.c:1121
+#: src/modules/X11/devX11.c:1123
 #, c-format
 msgid "X11 font %s, face %d at size %d could not be loaded"
 msgstr ""
 
-#: src/modules/X11/devX11.c:1130
+#: src/modules/X11/devX11.c:1132
 msgid ""
 "semi-transparency is not supported on this device: reported only once per "
 "page"
 msgstr ""
 
-#: src/modules/X11/devX11.c:1254
+#: src/modules/X11/devX11.c:1256
 #, c-format
 msgid "X11 I/O error while opening X11 connection to '%s'"
 msgstr ""
 
-#: src/modules/X11/devX11.c:1272
+#: src/modules/X11/devX11.c:1273
 msgid "X11 fatal IO error: please save work and shut down R"
 msgstr ""
 
@@ -6429,206 +6501,270 @@ msgstr ""
 msgid "attempt to use the locator after dev.hold()"
 msgstr ""
 
-#: src/modules/X11/devX11.c:3111
+#: src/modules/X11/devX11.c:3117
 #, c-format
 msgid "unable to start device %s"
 msgstr ""
 
-#: src/modules/X11/devX11.c:3138
+#: src/modules/X11/devX11.c:3144
 msgid "invalid 'width' or 'height'"
 msgstr ""
 
-#: src/modules/X11/devX11.c:3145
+#: src/modules/X11/devX11.c:3151
 msgid "invalid colortype passed to X11 driver"
 msgstr ""
 
-#: src/modules/X11/devX11.c:3159
+#: src/modules/X11/devX11.c:3165
 msgid "unknown X11 color/colour model -- using monochrome"
 msgstr ""
 
-#: src/modules/X11/devX11.c:3249
+#: src/modules/X11/devX11.c:3255
 msgid "no plot on device to save"
 msgstr ""
 
-#: src/modules/X11/devX11.c:3251
+#: src/modules/X11/devX11.c:3257
 msgid "not an open X11cairo device"
 msgstr ""
 
-#: src/modules/X11/devX11.c:3260
+#: src/modules/X11/devX11.c:3266
 #, c-format
 msgid "cannot open file '%s'"
 msgstr ""
 
-#: src/modules/X11/devX11.c:3277
+#: src/modules/X11/devX11.c:3283
 msgid "savePlot() is not supported on this build"
 msgstr ""
 
-#: src/modules/X11/devX11.c:3317
+#: src/modules/X11/devX11.c:3323
 msgid "unable to contact X11 display"
 msgstr ""
 
-#: src/modules/X11/devX11.c:3366
+#: src/modules/X11/devX11.c:3372
 #, c-format
 msgid "clipboard cannot be read (error code %d)"
 msgstr ""
 
-#: src/modules/X11/devX11.c:3397
+#: src/modules/X11/devX11.c:3408
 msgid "cannot allocate memory for X11Routines structure"
 msgstr ""
 
-#: src/modules/internet/internet.c:188 src/modules/internet/internet.c:192
-#: src/modules/internet/internet.c:198 src/modules/internet/internet.c:210
+#: src/modules/internet/internet.c:113
+msgid "for https:// URLs use method = \"wininet\""
+msgstr ""
+
+#: src/modules/internet/internet.c:153 src/modules/internet/internet.c:274
+#: src/modules/internet/internet.c:758
+#, fuzzy, c-format
+msgid "scheme not supported in URL '%s'"
+msgstr "kan ikke åbne adresse '%s'"
+
+#: src/modules/internet/internet.c:348 src/modules/internet/internet.c:352
+#: src/modules/internet/internet.c:357 src/modules/internet/internet.c:381
+#: src/modules/internet/libcurl.c:791 src/modules/internet/libcurl.c:795
+#: src/modules/internet/libcurl.c:801 src/modules/internet/libcurl.c:814
+#: src/modules/internet/libcurl.c:822
 msgid "allocation of url connection failed"
 msgstr ""
 
-#: src/modules/internet/internet.c:286
+#: src/modules/internet/internet.c:455
 msgid "only first element of 'url' argument used"
 msgstr ""
 
-#: src/modules/internet/internet.c:292
+#: src/modules/internet/internet.c:461
 msgid "only first element of 'destfile' argument used"
 msgstr ""
 
-#: src/modules/internet/internet.c:317
+#: src/modules/internet/internet.c:480 src/modules/internet/libcurl.c:499
 msgid "Download progress"
 msgstr ""
 
-#: src/modules/internet/internet.c:339
+#: src/modules/internet/internet.c:502
 #, c-format
 msgid "cannot open URL '%s', reason '%s'"
 msgstr ""
 
-#: src/modules/internet/internet.c:346 src/modules/internet/internet.c:372
-#: src/modules/internet/internet.c:474
+#: src/modules/internet/internet.c:509 src/modules/internet/internet.c:536
+#: src/modules/internet/internet.c:661
 #, c-format
 msgid "cannot open destfile '%s', reason '%s'"
 msgstr ""
 
-#: src/modules/internet/internet.c:377 src/modules/internet/internet.c:479
+#: src/modules/internet/internet.c:541 src/modules/internet/internet.c:666
+#: src/modules/internet/libcurl.c:530
 #, c-format
 msgid "trying URL '%s'\n"
 msgstr ""
 
-#: src/modules/internet/internet.c:384 src/modules/internet/internet.c:486
-msgid "opened URL\n"
-msgstr ""
-
-#: src/modules/internet/internet.c:455 src/modules/internet/internet.c:560
+#: src/modules/internet/internet.c:640 src/modules/internet/internet.c:751
+#: src/modules/internet/libcurl.c:578
 #, c-format
-msgid "downloaded length %d != reported length %d"
+msgid "downloaded length %0.f != reported length %0.f"
 msgstr ""
 
-#: src/modules/internet/internet.c:460 src/modules/internet/internet.c:565
+#: src/modules/internet/internet.c:645 src/modules/internet/internet.c:756
 #, c-format
 msgid "cannot open URL '%s'"
-msgstr ""
+msgstr "kan ikke åbne adresse '%s'"
+
+#: src/modules/internet/internet.c:779 src/modules/internet/internet.c:944
+#, fuzzy, c-format
+msgid "cannot open URL '%s': HTTP status was '%d %s'"
+msgstr "kan ikke åbne: HTTP-status var '%d %s'"
 
-#: src/modules/internet/internet.c:593 src/modules/internet/internet.c:828
+#: src/modules/internet/internet.c:915 src/modules/internet/internet.c:929
+#: src/modules/internet/internet.c:1019 src/modules/internet/internet.c:1028
 #, c-format
-msgid "cannot open: HTTP status was '%d %s'"
-msgstr ""
+msgid "InternetOpenUrl failed: '%s'"
+msgstr "InternetOpenUrl mislykkedes: '%s'"
 
-#: src/modules/internet/internet.c:772 src/modules/internet/internet.c:935
-msgid "InternetOpenUrl timed out"
+#: src/modules/internet/libcurl.c:159
+#, fuzzy, c-format
+msgid "URL '%s': status was '%d %s'"
+msgstr "kan ikke åbne: HTTP-status var '%d %s'"
+
+#: src/modules/internet/libcurl.c:163
+#, c-format
+msgid "URL '%s': status was '%s'"
 msgstr ""
 
-#: src/modules/internet/internet.c:799 src/modules/internet/internet.c:813
-#: src/modules/internet/internet.c:957 src/modules/internet/internet.c:966
+#: src/modules/internet/libcurl.c:240
+msgid "curlGetHeaders is not supported on this platform"
+msgstr "curlGetHeaders er ikke understøttet på denne platform"
+
+#: src/modules/internet/libcurl.c:249 src/modules/internet/libcurl.c:252
 #, c-format
-msgid "InternetOpenUrl failed: '%s'"
+msgid "invalid %s argument"
+msgstr "ugyldigt %s-argument"
+
+#: src/modules/internet/libcurl.c:269
+#, c-format
+msgid ""
+"libcurl error code %d\n"
+"\t%s\n"
 msgstr ""
+"libcurl-fejlkode %d\n"
+"\t%s\n"
 
-#: src/modules/internet/internet.c:870
-msgid "Internet read timed out"
+#: src/modules/internet/libcurl.c:404
+msgid "download.file(method = \"libcurl\") is not supported on this platform"
 msgstr ""
+"download.file(method = \"libcurl\") er ikke understøttet på denne platform"
+
+#: src/modules/internet/libcurl.c:420
+msgid "lengths of 'url' and 'destfile' must match"
+msgstr "længden på 'url' og 'destfile' skal matche"
+
+#: src/modules/internet/libcurl.c:481
+#, fuzzy, c-format
+msgid "URL %s: cannot open destfile '%s', reason '%s'"
+msgstr "kan ikke åbne fifo '%s', årsag '%s'"
 
-#: src/modules/internet/nanoftp.c:288 src/modules/internet/nanoftp.c:301
-#: src/modules/internet/nanoftp.c:312 src/modules/internet/nanoftp.c:346
-#: src/modules/internet/nanoftp.c:356
+#: src/modules/internet/libcurl.c:593
+#, fuzzy
+msgid "cannot download all files"
+msgstr "kan ikke åbne zip-filen '%s'"
+
+#: src/modules/internet/libcurl.c:727
+#, fuzzy
+msgid "cannot read from connection"
+msgstr "kan ikke læse fra denne forbindelse"
+
+#: src/modules/internet/libcurl.c:763
+#, fuzzy
+msgid "cannot open connection"
+msgstr "kan ikke åbne forbindelsen"
+
+#: src/modules/internet/libcurl.c:826
+msgid "url(method = \"libcurl\") is not supported on this platform"
+msgstr "url(method = \"libcurl\") er ikke understøttet på denne platform"
+
+#: src/modules/internet/nanoftp.c:289 src/modules/internet/nanoftp.c:302
+#: src/modules/internet/nanoftp.c:313 src/modules/internet/nanoftp.c:347
+#: src/modules/internet/nanoftp.c:357
 msgid "RxmlNanoFTPScanURL: overlong (invalid?) URL"
 msgstr ""
 
-#: src/modules/internet/nanoftp.c:389
+#: src/modules/internet/nanoftp.c:390
 msgid "removing FTP proxy info"
 msgstr ""
 
-#: src/modules/internet/nanoftp.c:391
+#: src/modules/internet/nanoftp.c:392
 #, c-format
 msgid "using FTP proxy '%s'"
 msgstr ""
 
-#: src/modules/internet/nanoftp.c:402 src/modules/internet/nanoftp.c:431
+#: src/modules/internet/nanoftp.c:403 src/modules/internet/nanoftp.c:432
 msgid "RxmlNanoFTPScanProxy: overlong (invalid?) URL"
 msgstr ""
 
-#: src/modules/internet/nanoftp.c:830
+#: src/modules/internet/nanoftp.c:833
 msgid "cannot resolve host"
 msgstr ""
 
-#: src/modules/internet/nanoftp.c:860
+#: src/modules/internet/nanoftp.c:863
 msgid "failed to connect to server"
 msgstr ""
 
-#: src/modules/internet/nanoftp.c:871
+#: src/modules/internet/nanoftp.c:874
 msgid "failed to get response from server"
 msgstr ""
 
-#: src/modules/internet/nanoftp.c:1134
+#: src/modules/internet/nanoftp.c:1137
 msgid "RxmlNanoFTPGetConnection: failed to create socket"
 msgstr ""
 
-#: src/modules/internet/nanoftp.c:1180
+#: src/modules/internet/nanoftp.c:1183
 msgid "failed to create a data connection"
 msgstr ""
 
-#: src/modules/internet/nanoftp.c:1188
+#: src/modules/internet/nanoftp.c:1191
 msgid "failed to bind a port"
 msgstr ""
 
-#: src/modules/internet/nanoftp.c:1195
+#: src/modules/internet/nanoftp.c:1198
 #, c-format
 msgid "could not listen on port %d"
 msgstr ""
 
-#: src/modules/internet/nanohttp.c:370 src/modules/internet/nanohttp.c:398
-#: src/modules/internet/nanohttp.c:407
+#: src/modules/internet/nanohttp.c:369 src/modules/internet/nanohttp.c:400
+#: src/modules/internet/nanohttp.c:412
 msgid "RxmlNanoHTTPScanURL: overlong (invalid?) URL"
 msgstr ""
 
-#: src/modules/internet/nanohttp.c:441
+#: src/modules/internet/nanohttp.c:446
 msgid "removing HTTP proxy info"
 msgstr ""
 
-#: src/modules/internet/nanohttp.c:443
+#: src/modules/internet/nanohttp.c:448
 #, c-format
 msgid "using HTTP proxy '%s'"
 msgstr ""
 
-#: src/modules/internet/nanohttp.c:454 src/modules/internet/nanohttp.c:490
+#: src/modules/internet/nanohttp.c:459 src/modules/internet/nanohttp.c:497
 msgid "RxmlNanoHTTPScanProxy: overlong (invalid?) URL"
 msgstr ""
 
-#: src/modules/internet/nanohttp.c:1107
+#: src/modules/internet/nanohttp.c:1135
 #, c-format
 msgid "unable to resolve '%s'"
 msgstr ""
 
-#: src/modules/internet/nanohttp.c:1134
+#: src/modules/internet/nanohttp.c:1168
 #, c-format
 msgid "connected to '%s' on port %d."
 msgstr ""
 
-#: src/modules/internet/nanohttp.c:1139
+#: src/modules/internet/nanohttp.c:1173
 #, c-format
 msgid "unable to connect to '%s' on port %d."
 msgstr ""
 
-#: src/modules/internet/nanohttp.c:1443
+#: src/modules/internet/nanohttp.c:1477
 #, c-format
 msgid "redirect to: '%s'"
 msgstr ""
 
-#: src/modules/internet/nanohttp.c:1454
+#: src/modules/internet/nanohttp.c:1488
 msgid "too many redirects, aborting ..."
 msgstr ""
 
@@ -6661,11 +6797,11 @@ msgstr ""
 #: src/modules/lapack/Lapack.c:730 src/modules/lapack/Lapack.c:779
 #: src/modules/lapack/Lapack.c:786 src/modules/lapack/Lapack.c:834
 #: src/modules/lapack/Lapack.c:840 src/modules/lapack/Lapack.c:894
-#: src/modules/lapack/Lapack.c:900 src/modules/lapack/Lapack.c:1134
-#: src/modules/lapack/Lapack.c:1140 src/modules/lapack/Lapack.c:1188
-#: src/modules/lapack/Lapack.c:1195 src/modules/lapack/Lapack.c:1199
-#: src/modules/lapack/Lapack.c:1227 src/modules/lapack/Lapack.c:1234
-#: src/modules/lapack/Lapack.c:1254
+#: src/modules/lapack/Lapack.c:900 src/modules/lapack/Lapack.c:1135
+#: src/modules/lapack/Lapack.c:1141 src/modules/lapack/Lapack.c:1189
+#: src/modules/lapack/Lapack.c:1196 src/modules/lapack/Lapack.c:1200
+#: src/modules/lapack/Lapack.c:1228 src/modules/lapack/Lapack.c:1235
+#: src/modules/lapack/Lapack.c:1255
 #, c-format
 msgid "error code %d from Lapack routine '%s'"
 msgstr ""
@@ -6682,17 +6818,17 @@ msgstr ""
 
 #: src/modules/lapack/Lapack.c:327
 msgid "'type' must be a character string"
-msgstr ""
+msgstr "'type' skal være en tegnstreng"
 
 #: src/modules/lapack/Lapack.c:357 src/modules/lapack/Lapack.c:405
 #: src/modules/lapack/Lapack.c:441 src/modules/lapack/Lapack.c:498
 msgid "'norm' must be a character string"
-msgstr ""
+msgstr "'norm' skal være en tegnstreng"
 
 #: src/modules/lapack/Lapack.c:377
 #, c-format
 msgid "error [%d] from Lapack 'dgetrf()'"
-msgstr ""
+msgstr "fejl [%d] fra Lapack 'dgetrf()'"
 
 #: src/modules/lapack/Lapack.c:382
 #, c-format
@@ -6702,7 +6838,7 @@ msgstr ""
 #: src/modules/lapack/Lapack.c:394
 #, c-format
 msgid "error [%d] from Lapack 'dgecon()'"
-msgstr ""
+msgstr "fejl [%d] fra Lapack 'dgecon()'"
 
 #: src/modules/lapack/Lapack.c:414 src/modules/lapack/Lapack.c:446
 #: src/modules/lapack/Lapack.c:504
@@ -6721,7 +6857,7 @@ msgstr ""
 #: src/modules/lapack/Lapack.c:465 src/modules/lapack/Lapack.c:472
 #, c-format
 msgid "error [%d] from Lapack 'zgetrf()'"
-msgstr ""
+msgstr "fejl [%d] fra Lapack 'zgetrf()'"
 
 #: src/modules/lapack/Lapack.c:480
 #, c-format
@@ -6745,28 +6881,28 @@ msgstr ""
 msgid "'a' must be a complex matrix"
 msgstr "'a' skal være en kompleks matrix"
 
-#: src/modules/lapack/Lapack.c:535 src/modules/lapack/Lapack.c:1042
+#: src/modules/lapack/Lapack.c:535 src/modules/lapack/Lapack.c:1043
 msgid "'a' is 0-diml"
-msgstr ""
+msgstr "'a' er 0-diml"
 
-#: src/modules/lapack/Lapack.c:537 src/modules/lapack/Lapack.c:1044
+#: src/modules/lapack/Lapack.c:537 src/modules/lapack/Lapack.c:1045
 #, c-format
 msgid "'a' (%d x %d) must be square"
 msgstr ""
 
-#: src/modules/lapack/Lapack.c:543 src/modules/lapack/Lapack.c:1050
+#: src/modules/lapack/Lapack.c:543 src/modules/lapack/Lapack.c:1051
 msgid "no right-hand side in 'b'"
 msgstr ""
 
 #: src/modules/lapack/Lapack.c:546 src/modules/lapack/Lapack.c:560
-#: src/modules/lapack/Lapack.c:1053 src/modules/lapack/Lapack.c:1069
+#: src/modules/lapack/Lapack.c:1054 src/modules/lapack/Lapack.c:1070
 #, c-format
 msgid "'b' (%d x %d) must be compatible with 'a' (%d x %d)"
 msgstr "'b' (%d x %d) skal være kompatibel med 'a' (%d x %d)"
 
 #: src/modules/lapack/Lapack.c:581 src/modules/lapack/Lapack.c:948
-#: src/modules/lapack/Lapack.c:962 src/modules/lapack/Lapack.c:1017
-#: src/modules/lapack/Lapack.c:1091
+#: src/modules/lapack/Lapack.c:962 src/modules/lapack/Lapack.c:1018
+#: src/modules/lapack/Lapack.c:1092
 #, c-format
 msgid "argument %d of Lapack routine %s had invalid value"
 msgstr ""
@@ -6776,7 +6912,7 @@ msgid "'b' must be a complex matrix"
 msgstr "'b' skal være en kompleks matrix"
 
 #: src/modules/lapack/Lapack.c:670 src/modules/lapack/Lapack.c:716
-#: src/modules/lapack/Lapack.c:1181 src/modules/lapack/Lapack.c:1220
+#: src/modules/lapack/Lapack.c:1182 src/modules/lapack/Lapack.c:1221
 #, c-format
 msgid "right-hand side should have %d not %d rows"
 msgstr ""
@@ -6793,13 +6929,13 @@ msgstr ""
 msgid "'x' must be a square complex matrix"
 msgstr "'x' skal være en kvadratisk kompleks matrix"
 
-#: src/modules/lapack/Lapack.c:926 src/modules/lapack/Lapack.c:1000
-#: src/modules/lapack/Lapack.c:1039 src/modules/lapack/Lapack.c:1114
-#: src/modules/lapack/Lapack.c:1245
+#: src/modules/lapack/Lapack.c:926 src/modules/lapack/Lapack.c:1001
+#: src/modules/lapack/Lapack.c:1040 src/modules/lapack/Lapack.c:1115
+#: src/modules/lapack/Lapack.c:1246
 msgid "'a' must be a numeric matrix"
 msgstr "'a' skal være en numerisk matrix"
 
-#: src/modules/lapack/Lapack.c:933 src/modules/lapack/Lapack.c:1250
+#: src/modules/lapack/Lapack.c:933 src/modules/lapack/Lapack.c:1251
 msgid "'a' must be a square matrix"
 msgstr "'a' skal være en kvadratisk matrix"
 
@@ -6816,140 +6952,150 @@ msgstr ""
 msgid "the matrix is either rank-deficient or indefinite"
 msgstr ""
 
-#: src/modules/lapack/Lapack.c:987
+#: src/modules/lapack/Lapack.c:988
 msgid "'size' argument must be a positive integer"
 msgstr ""
 
-#: src/modules/lapack/Lapack.c:1002
+#: src/modules/lapack/Lapack.c:1003
 #, c-format
 msgid "'size' cannot exceed ncol(x) = %d"
 msgstr ""
 
-#: src/modules/lapack/Lapack.c:1003
+#: src/modules/lapack/Lapack.c:1004
 #, c-format
 msgid "'size' cannot exceed nrow(x) = %d"
 msgstr ""
 
-#: src/modules/lapack/Lapack.c:1015
+#: src/modules/lapack/Lapack.c:1016
 #, c-format
 msgid "element (%d, %d) is zero, so the inverse cannot be computed"
 msgstr ""
 
-#: src/modules/lapack/Lapack.c:1094
+#: src/modules/lapack/Lapack.c:1095
 #, c-format
 msgid "Lapack routine %s: system is exactly singular: U[%d,%d] = 0"
 msgstr ""
 
-#: src/modules/lapack/Lapack.c:1102
+#: src/modules/lapack/Lapack.c:1103
 #, c-format
 msgid "system is computationally singular: reciprocal condition number = %g"
 msgstr ""
 
-#: src/modules/lapack/Lapack.c:1174 src/modules/lapack/Lapack.c:1212
+#: src/modules/lapack/Lapack.c:1175 src/modules/lapack/Lapack.c:1213
 msgid "'b' must be a numeric matrix"
-msgstr ""
+msgstr "'b' skal være en numerisk matrix"
 
-#: src/modules/lapack/Lapack.c:1246
+#: src/modules/lapack/Lapack.c:1247
 msgid "argument 'logarithm' must be logical"
-msgstr ""
+msgstr "argument 'logarithm' skal være logisk"
 
 #: src/nmath/bessel_i.c:69
 msgid "bessel_i allocation error"
-msgstr ""
+msgstr "bessel_i-allokeringsfejl"
 
 #: src/nmath/bessel_i.c:77 src/nmath/bessel_i.c:122
 #, c-format
-msgid "bessel_i(%g): ncalc (=%ld) != nb (=%ld); alpha=%g. Arg. out of range?\n"
+msgid "bessel_i(%g): ncalc (=%d) != nb (=%d); alpha=%g. Arg. out of range?\n"
 msgstr ""
 
 #: src/nmath/bessel_i.c:80 src/nmath/bessel_i.c:125
 #, c-format
 msgid "bessel_i(%g,nu=%g): precision lost in result\n"
+msgstr "bessel_i(%g,nu=%g): præcision tabt i resultat\n"
+
+#: src/nmath/bessel_j.c:64 src/nmath/bessel_j.c:118
+#, c-format
+msgid "besselJ(x, nu): nu=%g too large for bessel_j() algorithm"
 msgstr ""
 
-#: src/nmath/bessel_j.c:67
+#: src/nmath/bessel_j.c:72
 msgid "bessel_j allocation error"
-msgstr ""
+msgstr "bessel_j-allokeringsfejl"
 
-#: src/nmath/bessel_j.c:75 src/nmath/bessel_j.c:118
+#: src/nmath/bessel_j.c:80 src/nmath/bessel_j.c:127
 #, c-format
-msgid "bessel_j(%g): ncalc (=%ld) != nb (=%ld); alpha=%g. Arg. out of range?\n"
+msgid "bessel_j(%g): ncalc (=%d) != nb (=%d); alpha=%g. Arg. out of range?\n"
 msgstr ""
 
-#: src/nmath/bessel_j.c:78 src/nmath/bessel_j.c:121
+#: src/nmath/bessel_j.c:83 src/nmath/bessel_j.c:130
 #, c-format
 msgid "bessel_j(%g,nu=%g): precision lost in result\n"
-msgstr ""
+msgstr "bessel_j(%g,nu=%g): præcision tabt i resultat\n"
 
 #: src/nmath/bessel_k.c:63
 msgid "bessel_k allocation error"
-msgstr ""
+msgstr "bessel_k-allokeringsfejl"
 
 #: src/nmath/bessel_k.c:71 src/nmath/bessel_k.c:108
 #, c-format
-msgid "bessel_k(%g): ncalc (=%ld) != nb (=%ld); alpha=%g. Arg. out of range?\n"
+msgid "bessel_k(%g): ncalc (=%d) != nb (=%d); alpha=%g. Arg. out of range?\n"
 msgstr ""
 
 #: src/nmath/bessel_k.c:74 src/nmath/bessel_k.c:111
 #, c-format
 msgid "bessel_k(%g,nu=%g): precision lost in result\n"
+msgstr "bessel_k(%g,nu=%g): præcision tabt i resultat\n"
+
+#: src/nmath/bessel_y.c:63 src/nmath/bessel_y.c:125
+#, c-format
+msgid "besselY(x, nu): nu=%g too large for bessel_y() algorithm"
 msgstr ""
 
-#: src/nmath/bessel_y.c:66
+#: src/nmath/bessel_y.c:71
 msgid "bessel_y allocation error"
 msgstr ""
 
-#: src/nmath/bessel_y.c:82 src/nmath/bessel_y.c:127
+#: src/nmath/bessel_y.c:87 src/nmath/bessel_y.c:136
 #, c-format
-msgid "bessel_y(%g): ncalc (=%ld) != nb (=%ld); alpha=%g. Arg. out of range?\n"
+msgid "bessel_y(%g): ncalc (=%d) != nb (=%d); alpha=%g. Arg. out of range?\n"
 msgstr ""
 
-#: src/nmath/bessel_y.c:85 src/nmath/bessel_y.c:130
+#: src/nmath/bessel_y.c:90 src/nmath/bessel_y.c:139
 #, c-format
 msgid "bessel_y(%g,nu=%g): precision lost in result\n"
-msgstr ""
+msgstr "bessel_y(%g,nu=%g): præcision tabt i resultat\n"
 
 #: src/nmath/choose.c:79 src/nmath/choose.c:122
 #, c-format
 msgid "'k' (%.2f) must be integer, rounded to %.0f"
-msgstr ""
+msgstr "'k' (%.2f) skal være et heltal, afrundet til %.0f"
 
-#: src/nmath/nmath.h:141
+#: src/nmath/nmath.h:156
 #, c-format
 msgid "argument out of domain in '%s'\n"
 msgstr ""
 
-#: src/nmath/nmath.h:144
+#: src/nmath/nmath.h:159
 #, c-format
 msgid "value out of range in '%s'\n"
 msgstr ""
 
-#: src/nmath/nmath.h:147
+#: src/nmath/nmath.h:162
 #, c-format
 msgid "convergence failed in '%s'\n"
 msgstr ""
 
-#: src/nmath/nmath.h:150
+#: src/nmath/nmath.h:165
 #, c-format
 msgid "full precision may not have been achieved in '%s'\n"
 msgstr ""
 
-#: src/nmath/nmath.h:153
+#: src/nmath/nmath.h:168
 #, c-format
 msgid "underflow occurred in '%s'\n"
 msgstr ""
 
-#: src/nmath/pbeta.c:48
+#: src/nmath/pbeta.c:64
 #, c-format
-msgid "pbeta_raw() -> bratio() gave error code %d"
+msgid "pbeta_raw(%g, a=%g, b=%g, ..) -> bratio() gave error code %d"
 msgstr ""
 
-#: src/nmath/pnbinom.c:79
+#: src/nmath/pnbinom.c:82
 #, c-format
 msgid "pnbinom_mu() -> bratio() gave error code %d"
 msgstr ""
 
-#: src/nmath/pnchisq.c:246
+#: src/nmath/pnchisq.c:295
 #, c-format
 msgid "pnchisq(x=%g, ..): not converged in %d iter."
 msgstr ""
@@ -6991,7 +7137,7 @@ msgstr "X11-rutiner kan ikke tilgås i modulet"
 msgid "X11 module cannot be loaded"
 msgstr "X11-modul kan ikke indlæses"
 
-#: src/unix/X11.c:126 src/unix/X11.c:132 src/unix/X11.c:138 src/unix/X11.c:144
+#: src/unix/X11.c:144 src/unix/X11.c:150 src/unix/X11.c:156 src/unix/X11.c:162
 msgid "X11 is not available"
 msgstr "X11 er ikke tilgængelig"
 
@@ -7017,7 +7163,7 @@ msgid ""
 "Explicit lazy dynamic loading not supported on this platform. Using default."
 msgstr ""
 
-#: src/unix/dynload.c:240
+#: src/unix/dynload.c:232
 msgid "cannot get working directory!"
 msgstr ""
 
@@ -7031,93 +7177,127 @@ msgid ""
 "report using bug.report()"
 msgstr ""
 
-#: src/unix/sys-std.c:1082 src/unix/sys-std.c:1249
+#: src/unix/sys-std.c:1085 src/unix/sys-std.c:1255
 #, c-format
 msgid "problem in saving the history file '%s'"
 msgstr ""
 
-#: src/unix/sys-std.c:1156
+#: src/unix/sys-std.c:1162
 #, c-format
 msgid ""
 "Cannot open file '%s': %s\n"
 "\n"
 msgstr ""
 
-#: src/unix/sys-std.c:1220 src/unix/sys-std.c:1243
+#: src/unix/sys-std.c:1226 src/unix/sys-std.c:1249
 msgid "'file' argument is too long"
 msgstr ""
 
-#: src/unix/sys-std.c:1226 src/unix/sys-std.c:1228
+#: src/unix/sys-std.c:1232 src/unix/sys-std.c:1234
 msgid "no history mechanism available"
 msgstr "ingen historikmekanisme er tilgængelig"
 
-#: src/unix/sys-std.c:1255
+#: src/unix/sys-std.c:1261
 msgid "problem in truncating the history file"
 msgstr ""
 
-#: src/unix/sys-std.c:1257 src/unix/sys-std.c:1259
+#: src/unix/sys-std.c:1263 src/unix/sys-std.c:1265
 msgid "no history available to save"
 msgstr "ingen historik tilgængelig for lagring"
 
-#: src/unix/sys-std.c:1271
+#: src/unix/sys-std.c:1277
 msgid "invalid timestamp"
 msgstr "ugyldigt tidsstempel"
 
-#: src/unix/sys-unix.c:251
+#: src/unix/sys-unix.c:248
 msgid "non-empty character argument expected"
 msgstr ""
 
-#: src/unix/sys-unix.c:254
+#: src/unix/sys-unix.c:251
 msgid "'intern' must be logical and not NA"
-msgstr ""
+msgstr "'intern' skal være logisk og ikke NA"
 
-#: src/unix/sys-unix.c:266
+#: src/unix/sys-unix.c:269
 #, c-format
 msgid "cannot popen '%s', probable reason '%s'"
 msgstr "kan ikke popen '%s', mulig årslag '%s'"
 
-#: src/unix/sys-unix.c:271
+#: src/unix/sys-unix.c:279
 #, c-format
 msgid "line %d may be truncated in call to system(, intern = TRUE)"
 msgstr ""
 
-#: src/unix/sys-unix.c:288
+#: src/unix/sys-unix.c:301
 #, c-format
 msgid "error in running command: '%s'"
 msgstr "fejl i kørende kommando: '%s'"
 
-#: src/unix/sys-unix.c:290
+#: src/unix/sys-unix.c:303
 msgid "error in running command"
 msgstr "fejl i kørende kommando"
 
-#: src/unix/sys-unix.c:294
+#: src/unix/sys-unix.c:307
 #, c-format
 msgid "running command '%s' had status %d and error message '%s'"
 msgstr "kørende kommando '%s' havde status %d og fejlbesked '%s'"
 
-#: src/unix/sys-unix.c:399
+#: src/unix/sys-unix.c:412
 msgid "Sys.info() is not implemented on this system"
 msgstr "Sys.info() er ikke implementeret på dette system"
 
-#: src/unix/system.c:257
+#: src/unix/system.c:267
 #, c-format
 msgid "WARNING: --gui or -g without value ignored"
 msgstr "ADVARSEL: --gui eller -g uden værdi ignoreret"
 
-#: src/unix/system.c:275
+#: src/unix/system.c:285
 #, c-format
 msgid "WARNING: unknown gui '%s', using X11\n"
 msgstr "ADVARSEL: ukendt grafisk brugerflade '%s', bruger X11\n"
 
-#: src/unix/system.c:278
+#: src/unix/system.c:288
 #, c-format
 msgid "WARNING: unknown gui '%s', using none\n"
 msgstr "ADVARSEL: ukendt grafisk brugerflade '%s', bruger ingen\n"
 
-#: src/unix/system.c:388
+#: src/unix/system.c:373
 msgid "creating temporary file for '-e' failed"
 msgstr "oprettelse af midlertidig fil for '-e' mislykkedes"
 
-#: src/unix/system.c:469
+#: src/unix/system.c:454
 msgid "WARNING: Only editing the first in the list of files"
 msgstr "ADVARSEL: Redigeringer kun den første i listen over filer"
+
+#~ msgid "sockets are not available on this system"
+#~ msgstr "sokler er ikke tilgængelig på dette system"
+
+#~ msgid "no function to restart"
+#~ msgstr "ingen funktion at genstarte"
+
+#~ msgid "too large a range of values in 'x'"
+#~ msgstr "for stort interval for værdier i 'x'"
+
+#~ msgid "'args' must be a list"
+#~ msgstr "'args' skal være en liste"
+
+#~ msgid "'msg2' must be a character string"
+#~ msgstr "'msg2' skal være en tegnstreng"
+
+#~ msgid "argument 'type' must be a character string"
+#~ msgstr "argument 'type' skal være en tegnstreng"
+
+#~ msgid "call name too long in '%s'"
+#~ msgstr "kaldnavn for langt i '%s'"
+
+#~ msgid "generic name too long in '%s'"
+#~ msgstr "generisk navn for langt i '%s'"
+
+#~ msgid ""
+#~ "Warning in %s :\n"
+#~ "  %s\n"
+#~ msgstr ""
+#~ "Advarsel i %s :\n"
+#~ "  %s\n"
+
+#~ msgid "symbol"
+#~ msgstr "symbol"
diff --git a/src/library/base/po/de.po b/src/library/base/po/de.po
index 67d942e..0962cfc 100644
--- a/src/library/base/po/de.po
+++ b/src/library/base/po/de.po
@@ -4,13 +4,13 @@
 # Detlef Steuer <steuer at hsu-hh.de>, 2005-2014.
 msgid ""
 msgstr ""
-"Project-Id-Version: R-3.1.0\n"
+"Project-Id-Version: R-3.3.0\n"
 "Report-Msgid-Bugs-To: bugs.r-project.org\n"
-"POT-Creation-Date: 2014-03-27 07:46+0000\n"
-"PO-Revision-Date: 2014-03-16 15:58+0100\n"
+"POT-Creation-Date: 2015-06-06 13:51+0100\n"
+"PO-Revision-Date: 2016-04-07 17:29+0200\n"
 "Last-Translator: Detlef Steuer <steuer at hsu-hh.de>\n"
 "Language-Team: R-core <R-core at r-project.org>\n"
-"Language: \n"
+"Language: de\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
@@ -23,8 +23,7 @@ msgstr "nicht endlicher Wert von 'optim' übergeben"
 #: src/appl/optim.c:67
 #, c-format
 msgid "candidate point in 'optim' evaluated to length %d not %d"
-msgstr ""
-"Kandidatenpunkt in 'optim' gibt Ergebnis der Länge %d zurück, nicht Länge %d"
+msgstr "Kandidatenpunkt in 'optim' gibt Ergebnis der Länge %d zurück, nicht %d"
 
 #: src/appl/optim.c:136
 msgid "REPORT must be > 0 (method = \"BFGS\")"
@@ -40,7 +39,7 @@ msgstr "Funktion kann für die Startwerte nicht berechnet werden"
 
 #: src/appl/optim.c:497
 msgid "unknown 'type' in \"CG\" method of 'optim'"
-msgstr "unbekannter 'type' in \"CG\" Methode von 'optim'"
+msgstr "unbekannter 'type' in \"CG\"-Methode von 'optim'"
 
 #: src/appl/optim.c:510
 msgid "Function cannot be evaluated at initial parameters"
@@ -48,17 +47,17 @@ msgstr "Funktion kann für die Startwerte nicht berechnet werden"
 
 #: src/appl/optim.c:565
 msgid "unknown type in \"CG\" method of 'optim'"
-msgstr "unbekannter Typ in \"CG\" Methode von optim"
+msgstr "unbekannter Typ in \"CG\"-Methode von optim"
 
-#: src/appl/optim.c:665
+#: src/appl/optim.c:662
 msgid "REPORT must be > 0 (method = \"L-BFGS-B\")"
 msgstr "REPORT muss > 0 sein (method = \"L-BFGS-B\")"
 
-#: src/appl/optim.c:688
+#: src/appl/optim.c:685
 msgid "L-BFGS-B needs finite values of 'fn'"
 msgstr "L-BFGS-B benötigt endliche Werte von 'fn'"
 
-#: src/appl/optim.c:744
+#: src/appl/optim.c:741
 msgid "trace, REPORT must be >= 0 (method = \"SANN\")"
 msgstr "trace, REPORT muss > 0 sein (method = \"SANN\")"
 
@@ -123,281 +122,262 @@ msgstr "Zugriff auf '%ls' verweigert"
 msgid "problem in displaying '%ls'"
 msgstr "Problem bei der Anzeige von '%ls'"
 
-#: src/gnuwin32/extra.c:116 src/gnuwin32/extra.c:159 src/gnuwin32/extra.c:349
-#: src/gnuwin32/extra.c:577 src/gnuwin32/extra.c:602 src/main/agrep.c:131
-#: src/main/agrep.c:135 src/main/agrep.c:775 src/main/agrep.c:780
-#: src/main/apply.c:293 src/main/apply.c:295 src/main/apply.c:298
-#: src/main/array.c:87 src/main/array.c:1137 src/main/array.c:1263
-#: src/main/array.c:1265 src/main/array.c:1266 src/main/array.c:1592
-#: src/main/array.c:1594 src/main/array.c:1596 src/main/attrib.c:196
+#: src/gnuwin32/extra.c:116 src/gnuwin32/extra.c:158 src/gnuwin32/extra.c:334
+#: src/gnuwin32/extra.c:560 src/gnuwin32/extra.c:585 src/main/agrep.c:131
+#: src/main/agrep.c:135 src/main/agrep.c:776 src/main/agrep.c:781
+#: src/main/apply.c:330 src/main/apply.c:332 src/main/apply.c:335
+#: src/main/array.c:87 src/main/array.c:1241 src/main/array.c:1367
+#: src/main/array.c:1369 src/main/array.c:1370 src/main/array.c:1713
+#: src/main/array.c:1715 src/main/array.c:1717 src/main/attrib.c:190
 #: src/main/builtin.c:88 src/main/builtin.c:97 src/main/builtin.c:116
-#: src/main/builtin.c:118 src/main/builtin.c:147 src/main/builtin.c:534
-#: src/main/builtin.c:550 src/main/builtin.c:739 src/main/builtin.c:741
-#: src/main/builtin.c:743 src/main/character.c:139 src/main/character.c:142
-#: src/main/character.c:203 src/main/character.c:1037
-#: src/main/character.c:1041 src/main/character.c:1276
-#: src/main/character.c:1280 src/main/character.c:1341
-#: src/main/character.c:1344 src/main/connections.c:1217
-#: src/main/connections.c:1223 src/main/connections.c:1226
-#: src/main/connections.c:1230 src/main/connections.c:1375
-#: src/main/connections.c:1391 src/main/connections.c:1396
-#: src/main/connections.c:1996 src/main/connections.c:2002
-#: src/main/connections.c:2006 src/main/connections.c:2010
-#: src/main/connections.c:2015 src/main/connections.c:2665
-#: src/main/connections.c:2670 src/main/connections.c:2673
-#: src/main/connections.c:2676 src/main/connections.c:3057
-#: src/main/connections.c:3062 src/main/connections.c:3068
-#: src/main/connections.c:3071 src/main/connections.c:3075
-#: src/main/connections.c:3090 src/main/connections.c:3140
-#: src/main/connections.c:3145 src/main/connections.c:3149
-#: src/main/connections.c:3153 src/main/connections.c:3157
-#: src/main/connections.c:3163 src/main/connections.c:3210
-#: src/main/connections.c:3216 src/main/connections.c:3220
-#: src/main/connections.c:3270 src/main/connections.c:3273
-#: src/main/connections.c:3547 src/main/connections.c:3550
-#: src/main/connections.c:3553 src/main/connections.c:3559
-#: src/main/connections.c:3666 src/main/connections.c:3672
-#: src/main/connections.c:3675 src/main/connections.c:3826
-#: src/main/connections.c:3829 src/main/connections.c:3833
-#: src/main/connections.c:3836 src/main/connections.c:3956
-#: src/main/connections.c:4074 src/main/connections.c:4077
-#: src/main/connections.c:4414 src/main/connections.c:4439
-#: src/main/connections.c:4474 src/main/connections.c:4489
-#: src/main/connections.c:4497 src/main/connections.c:4523
-#: src/main/connections.c:4669 src/main/connections.c:4673
-#: src/main/connections.c:4801 src/main/connections.c:4803
-#: src/main/connections.c:4805 src/main/connections.c:4833
-#: src/main/connections.c:4965 src/main/connections.c:4991
-#: src/main/connections.c:4995 src/main/connections.c:4999
-#: src/main/connections.c:5003 src/main/context.c:596 src/main/context.c:605
-#: src/main/context.c:609 src/main/datetime.c:775 src/main/datetime.c:865
-#: src/main/datetime.c:867 src/main/datetime.c:871 src/main/datetime.c:1026
-#: src/main/datetime.c:1028 src/main/datetime.c:1232 src/main/debug.c:228
-#: src/main/deparse.c:397 src/main/dotcode.c:478 src/main/dotcode.c:482
-#: src/main/dotcode.c:487 src/main/dounzip.c:322 src/main/dounzip.c:329
-#: src/main/dounzip.c:339 src/main/dounzip.c:344 src/main/dounzip.c:348
-#: src/main/dounzip.c:352 src/main/envir.c:1618 src/main/envir.c:1621
-#: src/main/envir.c:1742 src/main/envir.c:1747 src/main/envir.c:1813
-#: src/main/envir.c:1829 src/main/envir.c:1835 src/main/envir.c:1932
-#: src/main/envir.c:1940 src/main/envir.c:1947 src/main/envir.c:1958
-#: src/main/envir.c:2172 src/main/envir.c:2293 src/main/envir.c:2552
-#: src/main/envir.c:2762 src/main/envir.c:2776 src/main/envir.c:2783
-#: src/main/envir.c:2799 src/main/envir.c:3367 src/main/errors.c:1030
-#: src/main/eval.c:397 src/main/eval.c:406 src/main/eval.c:409
-#: src/main/grep.c:767 src/main/grep.c:772 src/main/grep.c:1061
-#: src/main/grep.c:1063 src/main/grep.c:1065 src/main/grep.c:1510
-#: src/main/grep.c:1514 src/main/grep.c:1519 src/main/grep.c:2323
-#: src/main/grep.c:2328 src/main/grep.c:2621 src/main/grep.c:2626
-#: src/main/memory.c:3736 src/main/paste.c:96 src/main/paste.c:395
-#: src/main/paste.c:402 src/main/paste.c:409 src/main/paste.c:414
-#: src/main/paste.c:419 src/main/paste.c:424 src/main/paste.c:427
-#: src/main/paste.c:435 src/main/paste.c:601 src/main/paste.c:606
+#: src/main/builtin.c:118 src/main/builtin.c:148 src/main/builtin.c:559
+#: src/main/builtin.c:575 src/main/builtin.c:764 src/main/builtin.c:766
+#: src/main/builtin.c:768 src/main/character.c:159 src/main/character.c:162
+#: src/main/character.c:167 src/main/character.c:1086
+#: src/main/character.c:1090 src/main/character.c:1325
+#: src/main/character.c:1329 src/main/character.c:1390
+#: src/main/character.c:1393 src/main/connections.c:1208
+#: src/main/connections.c:1214 src/main/connections.c:1217
+#: src/main/connections.c:1221 src/main/connections.c:1367
+#: src/main/connections.c:1383 src/main/connections.c:1388
+#: src/main/connections.c:1989 src/main/connections.c:1995
+#: src/main/connections.c:1999 src/main/connections.c:2003
+#: src/main/connections.c:2008 src/main/connections.c:2659
+#: src/main/connections.c:2664 src/main/connections.c:2667
+#: src/main/connections.c:2670 src/main/connections.c:3053
+#: src/main/connections.c:3058 src/main/connections.c:3064
+#: src/main/connections.c:3067 src/main/connections.c:3071
+#: src/main/connections.c:3086 src/main/connections.c:3136
+#: src/main/connections.c:3141 src/main/connections.c:3145
+#: src/main/connections.c:3149 src/main/connections.c:3153
+#: src/main/connections.c:3159 src/main/connections.c:3207
+#: src/main/connections.c:3213 src/main/connections.c:3217
+#: src/main/connections.c:3268 src/main/connections.c:3271
+#: src/main/connections.c:3545 src/main/connections.c:3548
+#: src/main/connections.c:3551 src/main/connections.c:3557
+#: src/main/connections.c:3664 src/main/connections.c:3670
+#: src/main/connections.c:3673 src/main/connections.c:3825
+#: src/main/connections.c:3828 src/main/connections.c:3832
+#: src/main/connections.c:3835 src/main/connections.c:3956
+#: src/main/connections.c:4078 src/main/connections.c:4081
+#: src/main/connections.c:4418 src/main/connections.c:4443
+#: src/main/connections.c:4478 src/main/connections.c:4493
+#: src/main/connections.c:4501 src/main/connections.c:4527
+#: src/main/connections.c:4673 src/main/connections.c:4677
+#: src/main/connections.c:4805 src/main/connections.c:4807
+#: src/main/connections.c:4809 src/main/connections.c:4837
+#: src/main/connections.c:4975 src/main/connections.c:5004
+#: src/main/connections.c:5008 src/main/connections.c:5012
+#: src/main/connections.c:5016 src/main/context.c:611 src/main/context.c:620
+#: src/main/context.c:624 src/main/datetime.c:785 src/main/datetime.c:875
+#: src/main/datetime.c:877 src/main/datetime.c:881 src/main/datetime.c:1042
+#: src/main/datetime.c:1044 src/main/datetime.c:1249 src/main/debug.c:241
+#: src/main/deparse.c:407 src/main/dotcode.c:496 src/main/dotcode.c:500
+#: src/main/dotcode.c:505 src/main/dounzip.c:323 src/main/dounzip.c:330
+#: src/main/dounzip.c:340 src/main/dounzip.c:345 src/main/dounzip.c:349
+#: src/main/dounzip.c:353 src/main/envir.c:1750 src/main/envir.c:1753
+#: src/main/envir.c:1874 src/main/envir.c:1879 src/main/envir.c:1943
+#: src/main/envir.c:1959 src/main/envir.c:1965 src/main/envir.c:2077
+#: src/main/envir.c:2085 src/main/envir.c:2092 src/main/envir.c:2103
+#: src/main/envir.c:2335 src/main/envir.c:2456 src/main/envir.c:2753
+#: src/main/envir.c:3007 src/main/envir.c:3021 src/main/envir.c:3028
+#: src/main/envir.c:3044 src/main/envir.c:3627 src/main/errors.c:1044
+#: src/main/eval.c:396 src/main/eval.c:405 src/main/eval.c:408
+#: src/main/grep.c:780 src/main/grep.c:785 src/main/grep.c:1079
+#: src/main/grep.c:1081 src/main/grep.c:1083 src/main/grep.c:1528
+#: src/main/grep.c:1532 src/main/grep.c:1537 src/main/grep.c:2345
+#: src/main/grep.c:2350 src/main/grep.c:2649 src/main/grep.c:2654
+#: src/main/memory.c:3799 src/main/paste.c:96 src/main/paste.c:392
+#: src/main/paste.c:399 src/main/paste.c:406 src/main/paste.c:411
+#: src/main/paste.c:416 src/main/paste.c:421 src/main/paste.c:424
+#: src/main/paste.c:432 src/main/paste.c:599 src/main/paste.c:604
 #: src/main/platform.c:306 src/main/platform.c:308 src/main/platform.c:310
 #: src/main/platform.c:326 src/main/platform.c:337 src/main/platform.c:390
 #: src/main/platform.c:392 src/main/platform.c:705 src/main/platform.c:707
-#: src/main/platform.c:1064 src/main/platform.c:1070 src/main/platform.c:1073
-#: src/main/platform.c:1076 src/main/platform.c:1079 src/main/platform.c:1082
-#: src/main/platform.c:1085 src/main/platform.c:1088 src/main/platform.c:1185
-#: src/main/platform.c:1188 src/main/platform.c:1191 src/main/platform.c:1229
-#: src/main/platform.c:1286 src/main/platform.c:1289 src/main/platform.c:1498
-#: src/main/platform.c:1501 src/main/platform.c:1504 src/main/platform.c:1540
-#: src/main/platform.c:1543 src/main/platform.c:1546 src/main/platform.c:1629
-#: src/main/platform.c:1645 src/main/platform.c:1684 src/main/platform.c:1686
-#: src/main/platform.c:1757 src/main/platform.c:1841 src/main/platform.c:2116
-#: src/main/platform.c:2176 src/main/platform.c:2353 src/main/platform.c:2356
-#: src/main/platform.c:2359 src/main/platform.c:2362 src/main/platform.c:2365
-#: src/main/platform.c:2368 src/main/platform.c:2568 src/main/platform.c:2571
-#: src/main/platform.c:2574 src/main/platform.c:2577 src/main/platform.c:2580
-#: src/main/platform.c:2583 src/main/platform.c:2657 src/main/platform.c:2665
-#: src/main/platform.c:2701 src/main/platform.c:2751 src/main/print.c:242
-#: src/main/print.c:248 src/main/print.c:270 src/main/print.c:276
-#: src/main/print.c:283 src/main/random.c:478 src/main/random.c:482
-#: src/main/random.c:489 src/main/random.c:517 src/main/saveload.c:1950
-#: src/main/saveload.c:1953 src/main/saveload.c:1956 src/main/saveload.c:2072
-#: src/main/saveload.c:2252 src/main/saveload.c:2257 src/main/saveload.c:2260
-#: src/main/saveload.c:2366 src/main/scan.c:684 src/main/scan.c:853
-#: src/main/scan.c:867 src/main/scan.c:871 src/main/scan.c:873
-#: src/main/scan.c:884 src/main/scan.c:911 src/main/scan.c:914
-#: src/main/scan.c:917 src/main/scan.c:972 src/main/seq.c:618
-#: src/main/seq.c:623 src/main/seq.c:631 src/main/seq.c:662 src/main/seq.c:666
-#: src/main/seq.c:672 src/main/seq.c:680 src/main/sort.c:175
-#: src/main/sysutils.c:585 src/main/sysutils.c:589 src/main/sysutils.c:593
-#: src/main/sysutils.c:599 src/main/sysutils.c:603 src/main/sysutils.c:1831
-#: src/main/sysutils.c:1835 src/main/unique.c:966 src/main/unique.c:1289
-#: src/main/unique.c:1349 src/main/unique.c:1356 src/main/unique.c:1750
-#: src/main/util.c:581 src/main/util.c:584 src/main/util.c:1825
-#: src/main/util.c:1994 src/main/util.c:1995 src/main/util.c:1996
-#: src/main/util.c:2013 src/main/util.c:2037 src/main/util.c:2041
-#: src/main/util.c:2043 src/main/util.c:2068 src/main/util.c:2070
-#: src/main/util.c:2072 src/main/util.c:2075 src/main/util.c:2078
-#: src/main/util.c:2082 src/main/util.c:2084 src/modules/X11/devX11.c:3241
+#: src/main/platform.c:796 src/main/platform.c:1134 src/main/platform.c:1140
+#: src/main/platform.c:1143 src/main/platform.c:1146 src/main/platform.c:1149
+#: src/main/platform.c:1152 src/main/platform.c:1155 src/main/platform.c:1158
+#: src/main/platform.c:1255 src/main/platform.c:1258 src/main/platform.c:1261
+#: src/main/platform.c:1299 src/main/platform.c:1357 src/main/platform.c:1360
+#: src/main/platform.c:1569 src/main/platform.c:1572 src/main/platform.c:1575
+#: src/main/platform.c:1611 src/main/platform.c:1614 src/main/platform.c:1617
+#: src/main/platform.c:1700 src/main/platform.c:1716 src/main/platform.c:1749
+#: src/main/platform.c:1751 src/main/platform.c:1822 src/main/platform.c:1906
+#: src/main/platform.c:2199 src/main/platform.c:2259 src/main/platform.c:2436
+#: src/main/platform.c:2439 src/main/platform.c:2442 src/main/platform.c:2445
+#: src/main/platform.c:2448 src/main/platform.c:2451 src/main/platform.c:2656
+#: src/main/platform.c:2659 src/main/platform.c:2662 src/main/platform.c:2665
+#: src/main/platform.c:2668 src/main/platform.c:2671 src/main/platform.c:2749
+#: src/main/platform.c:2757 src/main/platform.c:2793 src/main/platform.c:2843
+#: src/main/print.c:242 src/main/print.c:248 src/main/print.c:270
+#: src/main/print.c:276 src/main/print.c:283 src/main/random.c:467
+#: src/main/random.c:471 src/main/random.c:478 src/main/random.c:506
+#: src/main/saveload.c:1950 src/main/saveload.c:1953 src/main/saveload.c:1956
+#: src/main/saveload.c:2072 src/main/saveload.c:2252 src/main/saveload.c:2257
+#: src/main/saveload.c:2260 src/main/saveload.c:2364 src/main/scan.c:684
+#: src/main/scan.c:853 src/main/scan.c:867 src/main/scan.c:871
+#: src/main/scan.c:873 src/main/scan.c:884 src/main/scan.c:911
+#: src/main/scan.c:914 src/main/scan.c:917 src/main/scan.c:972
+#: src/main/seq.c:622 src/main/seq.c:627 src/main/seq.c:635 src/main/seq.c:666
+#: src/main/seq.c:670 src/main/seq.c:676 src/main/seq.c:684
+#: src/main/sort.c:175 src/main/sysutils.c:591 src/main/sysutils.c:595
+#: src/main/sysutils.c:599 src/main/sysutils.c:605 src/main/sysutils.c:609
+#: src/main/sysutils.c:1781 src/main/sysutils.c:1785 src/main/unique.c:969
+#: src/main/unique.c:1277 src/main/unique.c:1281 src/main/unique.c:1291
+#: src/main/unique.c:1685 src/main/util.c:636 src/main/util.c:639
+#: src/main/util.c:1375 src/main/util.c:1389 src/main/util.c:1971
+#: src/main/util.c:2192 src/main/util.c:2193 src/main/util.c:2194
+#: src/main/util.c:2211 src/main/util.c:2235 src/main/util.c:2239
+#: src/main/util.c:2241 src/main/util.c:2266 src/main/util.c:2268
+#: src/main/util.c:2270 src/main/util.c:2273 src/main/util.c:2276
+#: src/main/util.c:2280 src/main/util.c:2282 src/modules/X11/devX11.c:3241
 #: src/modules/X11/devX11.c:3244 src/modules/X11/devX11.c:3247
-#: src/modules/X11/devX11.c:3271 src/modules/internet/internet.c:284
-#: src/modules/internet/internet.c:290 src/modules/internet/internet.c:296
-#: src/modules/internet/internet.c:299 src/modules/internet/internet.c:303
+#: src/modules/X11/devX11.c:3271 src/modules/internet/internet.c:453
+#: src/modules/internet/internet.c:459 src/modules/internet/internet.c:465
+#: src/modules/internet/internet.c:468 src/modules/internet/internet.c:472
+#: src/modules/internet/internet.c:476 src/modules/internet/libcurl.c:316
+#: src/modules/internet/libcurl.c:320 src/modules/internet/libcurl.c:325
+#: src/modules/internet/libcurl.c:328 src/modules/internet/libcurl.c:332
 #: src/modules/lapack/Lapack.c:155 src/modules/lapack/Lapack.c:261
 #: src/modules/lapack/Lapack.c:709 src/modules/lapack/Lapack.c:818
-#: src/modules/lapack/Lapack.c:880 src/modules/lapack/Lapack.c:1214
-#: src/unix/sys-std.c:1217 src/unix/sys-std.c:1240
+#: src/modules/lapack/Lapack.c:880 src/modules/lapack/Lapack.c:1215
+#: src/unix/sys-std.c:1220 src/unix/sys-std.c:1243
 #, c-format
 msgid "invalid '%s' argument"
 msgstr "ungültiges '%s' Argument"
 
-#: src/gnuwin32/extra.c:183
+#: src/gnuwin32/extra.c:182
 msgid "unsupported version of Windows"
 msgstr "nicht unterstützte Windows-Version"
 
-#: src/gnuwin32/extra.c:267 src/main/apply.c:105 src/main/character.c:595
-#: src/main/connections.c:3555 src/main/context.c:642 src/main/context.c:661
-#: src/main/datetime.c:675 src/main/datetime.c:777 src/main/datetime.c:1030
-#: src/main/dotcode.c:199 src/main/errors.c:929 src/main/errors.c:962
-#: src/main/errors.c:1065 src/main/errors.c:1090 src/main/errors.c:1095
-#: src/main/errors.c:1368 src/main/identical.c:66 src/main/identical.c:67
-#: src/main/identical.c:68 src/main/identical.c:69 src/main/identical.c:70
-#: src/main/seq.c:185 src/main/seq.c:341 src/main/seq.c:346 src/main/seq.c:350
-#: src/main/seq.c:391 src/main/seq.c:395 src/main/seq.c:399
-#: src/main/sort.c:1224 src/main/sort.c:1307 src/main/sort.c:1311
-#: src/main/sort.c:1318 src/main/sort.c:1393 src/main/source.c:220
-#: src/main/summary.c:886 src/main/sysutils.c:251 src/main/util.c:986
-#: src/main/util.c:991 src/main/util.c:998 src/main/util.c:1001
-#: src/modules/X11/devX11.c:3142 src/modules/X11/devX11.c:3169
-#: src/modules/X11/devX11.c:3174 src/modules/X11/devX11.c:3179
-#: src/modules/X11/devX11.c:3189 src/modules/X11/devX11.c:3194
-#: src/modules/X11/devX11.c:3198 src/modules/X11/devX11.c:3202
-#: src/unix/sys-std.c:1291
-#, c-format
-msgid "invalid '%s' value"
-msgstr "ungültiger '%s' Wert"
-
-#: src/gnuwin32/extra.c:308 src/gnuwin32/extra.c:321
+#: src/gnuwin32/extra.c:299 src/gnuwin32/extra.c:310
 msgid "incorrect argument"
 msgstr "falsches Argument"
 
-#: src/gnuwin32/extra.c:312
+#: src/gnuwin32/extra.c:302
 msgid "don't be silly!: your machine has a 4Gb address limit"
-msgstr "Stell Dich nicht dumm!: Deine Kiste kann nur 4Gb adressieren"
+msgstr "Stell Dich nicht dumm! Dein Computer kann nur 4Gb adressieren"
 
-#: src/gnuwin32/extra.c:316
+#: src/gnuwin32/extra.c:306
 msgid "cannot decrease memory limit: ignored"
 msgstr "kann Speicherobergrenze nicht reduzieren: wird ignoriert"
 
-#: src/gnuwin32/extra.c:428 src/gnuwin32/extra.c:529 src/main/util.c:897
+#: src/gnuwin32/extra.c:413 src/gnuwin32/extra.c:514 src/main/util.c:958
 msgid "'path' must be a character vector"
-msgstr "'path' muss eine Charaktervektor sein"
+msgstr "'path' muss eine Zeichenkettenvektor sein"
 
-#: src/gnuwin32/extra.c:579 src/gnuwin32/extra.c:581 src/gnuwin32/extra.c:604
-#: src/gnuwin32/extra.c:606 src/gnuwin32/extra.c:641 src/main/gevents.c:61
+#: src/gnuwin32/extra.c:562 src/gnuwin32/extra.c:564 src/gnuwin32/extra.c:587
+#: src/gnuwin32/extra.c:589 src/gnuwin32/extra.c:624 src/main/gevents.c:61
 #: src/main/gevents.c:98
 msgid "invalid device"
 msgstr "ungültiges Device"
 
-#: src/gnuwin32/extra.c:582
+#: src/gnuwin32/extra.c:565
 msgid "requires SDI mode"
-msgstr "verlangt SDI Modus"
+msgstr "verlangt SDI-Modus"
 
-#: src/gnuwin32/extra.c:635 src/main/gevents.c:58 src/main/gevents.c:95
+#: src/gnuwin32/extra.c:618 src/main/gevents.c:58 src/main/gevents.c:95
 msgid "invalid graphical device number"
 msgstr "ungültige Grafikdevicenummer"
 
-#: src/gnuwin32/extra.c:645
+#: src/gnuwin32/extra.c:628
 msgid "bad device"
 msgstr "unbrauchbares Device"
 
-#: src/gnuwin32/extra.c:799 src/gnuwin32/extra.c:807
+#: src/gnuwin32/extra.c:782 src/gnuwin32/extra.c:790
 msgid "invalid input in 'Rmbstowcs'"
 msgstr "ungültige Eingabe in 'Rmbstowcs'"
 
-#: src/gnuwin32/extra.c:830 src/main/platform.c:1261
+#: src/gnuwin32/extra.c:813 src/main/platform.c:1332
 msgid "file choice cancelled"
 msgstr "Dateiauswahl abgebrochen"
 
-#: src/gnuwin32/run.c:242
+#: src/gnuwin32/run.c:244
 #, c-format
 msgid "'CreateProcess' failed to run '%s'"
-msgstr "'Createprocess' konnte '%s' nicht ausführen"
+msgstr "'CreateProcess' konnte '%s' nicht ausführen"
 
-#: src/gnuwin32/run.c:344
+#: src/gnuwin32/run.c:346
 msgid "Child process not responding.  R will terminate it."
 msgstr "Kindprozess antwortet nicht. R beendet den Kindprozess."
 
-#: src/gnuwin32/run.c:402
+#: src/gnuwin32/run.c:404
 #, c-format
 msgid "Exit code was %d"
 msgstr "Rückgabewert war %d"
 
-#: src/gnuwin32/run.c:434
+#: src/gnuwin32/run.c:436
 msgid "Insufficient memory (rpipeOpen)"
 msgstr "Zu wenig Speicher (rpipeOpen)"
 
-#: src/gnuwin32/run.c:648 src/main/dounzip.c:482
+#: src/gnuwin32/run.c:650 src/main/dounzip.c:481
 msgid "seek not enabled for this connection"
 msgstr "für diesen Verbindungstyp ist seek nicht möglich"
 
-#: src/gnuwin32/run.c:654
+#: src/gnuwin32/run.c:656
 msgid "truncate not enabled for this connection"
 msgstr "für diesen Verbindungstyp ist truncate nicht möglich"
 
-#: src/gnuwin32/run.c:729 src/gnuwin32/run.c:733 src/gnuwin32/run.c:746
-#: src/gnuwin32/run.c:774 src/main/connections.c:1330
-#: src/main/connections.c:1334 src/main/connections.c:1340
-#: src/main/connections.c:1354
+#: src/gnuwin32/run.c:731 src/gnuwin32/run.c:735 src/gnuwin32/run.c:748
+#: src/gnuwin32/run.c:776 src/main/connections.c:1322
+#: src/main/connections.c:1326 src/main/connections.c:1332
+#: src/main/connections.c:1346
 msgid "allocation of pipe connection failed"
 msgstr "Einrichtung einer pipe Verbindung fehlgeschlagen"
 
-#: src/gnuwin32/run.c:788
+#: src/gnuwin32/run.c:790
 msgid "'names' is not a character vector"
-msgstr "'names' ist kein Zeichenketten-Vektor"
+msgstr "'names' ist kein Zeichenkettenvektor"
 
-#: src/gnuwin32/sys-win32.c:182
+#: src/gnuwin32/sys-win32.c:179
 msgid "character string expected as first argument"
 msgstr "Zeichenkette als erstes Argument erwartet"
 
-#: src/gnuwin32/sys-win32.c:191
+#: src/gnuwin32/sys-win32.c:188
 msgid "character string expected as third argument"
 msgstr "Zeichenkette als drittes Argument erwartet"
 
-#: src/gnuwin32/sys-win32.c:257 src/unix/sys-unix.c:299
+#: src/gnuwin32/sys-win32.c:254 src/unix/sys-unix.c:295
 #, c-format
 msgid "running command '%s' had status %d"
 msgstr "Ausführung von Kommando '%s' ergab Status %d"
 
-#: src/gnuwin32/system.c:122 src/unix/sys-unix.c:427
+#: src/gnuwin32/system.c:122 src/unix/sys-unix.c:423
 msgid "reached session elapsed time limit"
 msgstr "Zeitlimit für die Sitzung erreicht"
 
-#: src/gnuwin32/system.c:124 src/unix/sys-unix.c:429
+#: src/gnuwin32/system.c:124 src/unix/sys-unix.c:425
 msgid "reached elapsed time limit"
 msgstr "Zeitlimit erreicht"
 
-#: src/gnuwin32/system.c:130 src/unix/sys-unix.c:435
+#: src/gnuwin32/system.c:130 src/unix/sys-unix.c:431
 msgid "reached session CPU time limit"
-msgstr "CPU Zeitlimit für die Sitzung erreicht"
+msgstr "CPU-Zeitlimit für die Sitzung erreicht"
 
-#: src/gnuwin32/system.c:132 src/unix/sys-unix.c:437
+#: src/gnuwin32/system.c:132 src/unix/sys-unix.c:433
 msgid "reached CPU time limit"
-msgstr "CPU Zeitlimit erreicht"
+msgstr "CPU-Zeitlimit erreicht"
 
 #: src/gnuwin32/system.c:157
 #, c-format
 msgid "Fatal error: %s\n"
 msgstr "Fataler Fehler: %s\n"
 
-#: src/gnuwin32/system.c:335 src/unix/sys-std.c:863
+#: src/gnuwin32/system.c:335 src/unix/sys-std.c:866
 #, c-format
 msgid "encoding '%s' is not recognised"
 msgstr "Kodierung '%s' wird nicht erkannt"
 
-#: src/gnuwin32/system.c:341 src/unix/sys-std.c:869
+#: src/gnuwin32/system.c:341 src/unix/sys-std.c:872
 #, c-format
 msgid "<ERROR: re-encoding failure from encoding '%s'>\n"
 msgstr "<Fehler: Rekodierungsfehler aus Kodierung '%s'>\n"
 
-#: src/gnuwin32/system.c:555 src/gnuwin32/system.c:1049
-#: src/gnuwin32/system.c:1061 src/main/connections.c:590
-#: src/main/connections.c:595 src/main/dounzip.c:177 src/main/saveload.c:1961
-#: src/main/serialize.c:2552 src/main/serialize.c:2557
-#: src/main/serialize.c:2642 src/main/serialize.c:2687 src/unix/system.c:323
-#: src/unix/system.c:343
+#: src/gnuwin32/system.c:555 src/gnuwin32/system.c:1047
+#: src/gnuwin32/system.c:1059 src/main/connections.c:581
+#: src/main/connections.c:586 src/main/dounzip.c:178 src/main/saveload.c:1961
+#: src/main/serialize.c:2598 src/main/serialize.c:2603
+#: src/main/serialize.c:2688 src/main/serialize.c:2733 src/unix/system.c:328
 #, c-format
 msgid "cannot open file '%s': %s"
 msgstr "kann Datei '%s' nicht öffnen: %s"
@@ -407,82 +387,82 @@ msgstr "kann Datei '%s' nicht öffnen: %s"
 msgid "file.show(): file '%s' does not exist\n"
 msgstr "file.show(): Datei '%s' existiert nicht\n"
 
-#: src/gnuwin32/system.c:970
+#: src/gnuwin32/system.c:968
 #, c-format
 msgid "WARNING: R_MAX_MEM_SIZE value is invalid: ignored\n"
 msgstr "Warnung: R_MAX_MEM_SIZE Wert ist ungültig: wird ignoriert\n"
 
-#: src/gnuwin32/system.c:1002
+#: src/gnuwin32/system.c:1000
 msgid "WARNING: no max-mem-size given\n"
 msgstr "Warnung: max-mem-size nicht gegeben\n"
 
-#: src/gnuwin32/system.c:1009
+#: src/gnuwin32/system.c:1007
 #, c-format
 msgid "WARNING: --max-mem-size value is invalid: ignored\n"
 msgstr "Warnung: --max-mem-size Wert ist ungültig: wird ignoriert\n"
 
-#: src/gnuwin32/system.c:1012
+#: src/gnuwin32/system.c:1010
 #, c-format
 msgid "WARNING: --max-mem-size=%lu%c: too large and ignored\n"
 msgstr "Warnung: --max-mem-size=%lu%c: zu groß und wird ignoriert\n"
 
-#: src/gnuwin32/system.c:1018
+#: src/gnuwin32/system.c:1016
 #, c-format
 msgid "WARNING: --max-mem-size=%4.1fM: too small and ignored\n"
 msgstr "Warnung: --max-mem-size =%4.1fM: zu klein und wird ignoriert\n"
 
-#: src/gnuwin32/system.c:1023
+#: src/gnuwin32/system.c:1021
 #, c-format
 msgid "WARNING: --max-mem-size=%4.0fM: too large and taken as %uM\n"
 msgstr "Warnung: --max-mem-size =%4.0fM: zu groß und wird als %uM angenommen\n"
 
-#: src/gnuwin32/system.c:1039
+#: src/gnuwin32/system.c:1037
 #, c-format
 msgid "option '%s' requires an argument"
 msgstr "Option '%s' verlangt ein Argument"
 
-#: src/gnuwin32/system.c:1070
+#: src/gnuwin32/system.c:1068
 #, c-format
 msgid "option '%s' requires a non-empty argument"
 msgstr "Option '%s' verlangt ein nicht-leeres Argument"
 
-#: src/gnuwin32/system.c:1078 src/unix/system.c:362
+#: src/gnuwin32/system.c:1076 src/unix/system.c:347
 #, c-format
 msgid "WARNING: '-e %s' omitted as input is too long\n"
 msgstr "Warnung: '-e %s' wird ausgelassen; Eingabe ist zu lang\n"
 
-#: src/gnuwin32/system.c:1082 src/unix/system.c:375
+#: src/gnuwin32/system.c:1080 src/unix/system.c:360
 #, c-format
 msgid "WARNING: unknown option '%s'\n"
 msgstr "Warnung: unbekannte Option '%s'\n"
 
-#: src/gnuwin32/system.c:1104 src/unix/system.c:379
+#: src/gnuwin32/system.c:1102 src/unix/system.c:364
 #, c-format
 msgid "ARGUMENT '%s' __ignored__\n"
 msgstr "Argument '%s' __ignoriert__\n"
 
-#: src/gnuwin32/system.c:1110 src/unix/system.c:386
+#: src/gnuwin32/system.c:1108 src/unix/system.c:371
 msgid "cannot use -e with -f or --file"
 msgstr "kann -e nicht mit -f oder --file benutzen"
 
-#: src/gnuwin32/system.c:1128
+#: src/gnuwin32/system.c:1126
 msgid "creation of tmpfile failed -- set TMPDIR suitably?"
 msgstr "Erzeugung von tmpfile fehlgeschlagen -- ist TMPDIR geeignet gesetzt?"
 
-#: src/gnuwin32/system.c:1147 src/unix/system.c:437
+#: src/gnuwin32/system.c:1145 src/unix/system.c:422
 msgid "you must specify '--save', '--no-save' or '--vanilla'"
 msgstr "Sie müssen '--save', '--no-save' oder '--vanilla' angeben"
 
-#: src/gnuwin32/system.c:1152
+#: src/gnuwin32/system.c:1150
 msgid ""
 "impossible to create 'reader thread'; you must free some system resources"
 msgstr ""
 "kann keinen 'reader thread' erzeugen; Sie müssen einige Systemressourcen "
 "freigeben"
 
-#: src/include/Errormsg.h:25 src/main/subscript.c:375 src/main/subscript.c:393
-#: src/main/subscript.c:417 src/main/subscript.c:456 src/main/subscript.c:584
-#: src/main/subscript.c:623 src/main/subscript.c:766
+#: src/include/Errormsg.h:25 src/main/subscript.c:390 src/main/subscript.c:408
+#: src/main/subscript.c:432 src/main/subscript.c:471 src/main/subscript.c:652
+#: src/main/subscript.c:691 src/main/subscript.c:834
 msgid "subscript out of bounds"
 msgstr "Indizierung außerhalb der Grenzen"
 
@@ -493,7 +473,7 @@ msgstr "Objekt des Typs '%s' ist nicht indizierbar"
 
 #: src/main/CommandLineArgs.c:170
 msgid "WARNING: no value given for --encoding"
-msgstr "Warnung: kein Wert für --encoding gegeben"
+msgstr "Warnung: kein Wert für --encoding angegeben"
 
 #: src/main/CommandLineArgs.c:195
 #, c-format
@@ -503,7 +483,7 @@ msgstr "Warnung: Option '%s' wird nicht mehr unterstützt"
 #: src/main/CommandLineArgs.c:206
 #, c-format
 msgid "WARNING: no value given for '%s'"
-msgstr "Warnung: kein Wert für '%s' gegeben"
+msgstr "Warnung: kein Wert für '%s' angegeben"
 
 #: src/main/CommandLineArgs.c:216
 #, c-format
@@ -531,88 +511,88 @@ msgstr "Warnung: '--max-ppsize' ist zu klein: wird ignoriert"
 msgid "WARNING: '--max-ppsize' value is too large: ignored"
 msgstr "Warnung: '--max-ppsize' ist zu groß: wird ignoriert"
 
-#: src/main/RNG.c:175
+#: src/main/RNG.c:176
 #, c-format
 msgid "unif_rand: unimplemented RNG kind %d"
 msgstr "unif_rand: nicht implementierter Typ RNG %d"
 
-#: src/main/RNG.c:260
+#: src/main/RNG.c:261
 #, c-format
 msgid "FixupSeeds: unimplemented RNG kind %d"
 msgstr "FixupSeeds: nicht implementierter Typ RNG %d"
 
-#: src/main/RNG.c:302
+#: src/main/RNG.c:301
 msgid "'user_unif_rand' not in load table"
 msgstr "'user_unif_rand' nicht in Ladeliste"
 
-#: src/main/RNG.c:310
+#: src/main/RNG.c:309
 msgid "cannot read seeds unless 'user_unif_nseed' is supplied"
 msgstr "kann Startwerte nicht lesen, außer 'user_unif_nseed' wird angegeben"
 
-#: src/main/RNG.c:315
+#: src/main/RNG.c:314
 msgid "seed length must be in 0...625; ignored"
-msgstr "Startwertlänge muss in 0...625 liegen: wird ignoriert"
+msgstr "Startwertlänge muss im Bereich 0..625 liegen; wird ignoriert"
 
-#: src/main/RNG.c:323
+#: src/main/RNG.c:322
 #, c-format
 msgid "RNG_Init: unimplemented RNG kind %d"
 msgstr "RNG_Init: nicht implementierter RNG-Typ %d"
 
-#: src/main/RNG.c:354
+#: src/main/RNG.c:351
 msgid "'.Random.seed' is a missing argument with no default"
 msgstr "'.Random.seed' fehlt und es gibt keinen Standard"
 
-#: src/main/RNG.c:355
+#: src/main/RNG.c:352
 #, c-format
 msgid "'.Random.seed' is not an integer vector but of type '%s', so ignored"
 msgstr ""
 "'.Random.seed' ist kein Integer-Vektor sondern vom Typ '%s', wird also "
 "ignoriert"
 
-#: src/main/RNG.c:363
+#: src/main/RNG.c:360
 msgid "'.Random.seed[1]' is not a valid integer, so ignored"
 msgstr "'.Random.seed[1]' ist keine zulässige ganze Zahl, wird also ignoriert"
 
-#: src/main/RNG.c:369
+#: src/main/RNG.c:366
 msgid "'.Random.seed[1]' is not a valid Normal type, so ignored"
 msgstr ""
 "'.Random.seed[1]' ist kein gültiger Normalverteilungs-Typ, wird also "
 "ignoriert"
 
-#: src/main/RNG.c:383
+#: src/main/RNG.c:380
 msgid "'.Random.seed[1] = 5' but no user-supplied generator, so ignored"
 msgstr ""
-"'.Random.seed[1] = 5', aber kein nitzerdefinierter Generator angegeben, wird "
+"'.Random.seed[1] = 5', aber kein nutzerdefinierter Generator angegeben, wird "
 "also ignoriert"
 
-#: src/main/RNG.c:388
+#: src/main/RNG.c:385
 msgid "'.Random.seed[1]' is not a valid RNG kind so ignored"
-msgstr "'.Random.seed[1]' ist kein gültiger RNG Typ, wird also ignoriert"
+msgstr "'.Random.seed[1]' ist kein gültiger RNG-Typ, wird also ignoriert"
 
-#: src/main/RNG.c:415
+#: src/main/RNG.c:412
 msgid "'.Random.seed' has wrong length"
 msgstr "'.Random.seed' hat die falsche Länge"
 
-#: src/main/RNG.c:468
+#: src/main/RNG.c:465
 #, c-format
 msgid "RNGkind: unimplemented RNG kind %d"
-msgstr "RNGkind: nicht implementierter RNG Typ %d"
+msgstr "RNGkind: nicht implementierter RNG-Typ %d"
 
-#: src/main/RNG.c:488
+#: src/main/RNG.c:485
 msgid "invalid Normal type in 'RNGkind'"
 msgstr "ungültiger Normalverteilungstyp in 'RNGkind'"
 
-#: src/main/RNG.c:491
+#: src/main/RNG.c:488
 msgid "'user_norm_rand' not in load table"
 msgstr "'user_norm_rand' nicht in der Ladeliste"
 
-#: src/main/RNG.c:535
+#: src/main/RNG.c:532
 msgid "supplied seed is not a valid integer"
 msgstr "angegebener Startwert ist keine gültige ganze Zahl"
 
 #: src/main/Rdynload.c:248
 msgid "R_RegisterRoutines called with invalid DllInfo object."
-msgstr "R_RegisterRoutines mit ungültigem DllInfo Objekt."
+msgstr "R_RegisterRoutines mit ungültigem DllInfo-Objekt."
 
 #: src/main/Rdynload.c:533
 msgid "`maximal number of DLLs reached..."
@@ -631,9 +611,9 @@ msgstr "DLLname '%s' ist zu lang"
 msgid "could not allocate space for 'name'"
 msgstr "konnte keinen Speicher für 'name' zuteilen"
 
-#: src/main/Rdynload.c:881 src/main/Rdynload.c:897 src/main/util.c:698
+#: src/main/Rdynload.c:881 src/main/Rdynload.c:897 src/main/util.c:758
 msgid "character argument expected"
-msgstr "Charakter als Argument erwartet"
+msgstr "Zeichenkette als Argument erwartet"
 
 #: src/main/Rdynload.c:887 src/main/Rdynload.c:919 src/main/Rdynload.c:939
 #, c-format
@@ -651,34 +631,38 @@ msgstr "shared object '%s' wurde nicht geladen"
 
 #: src/main/Rdynload.c:979
 #, c-format
-msgid "cannot allocate memory for registered native symbol (%d bytes)"
-msgstr ""
-"kann keinen Speicher für ein registriertes natives Symbol(%d Bytes) "
+msgid "cannot allocate memory for registered native symbol (%d byte)"
+msgid_plural "cannot allocate memory for registered native symbol (%d bytes)"
+msgstr[0] ""
+"kann keinen Speicher für ein registriertes natives Symbol (%d Byte) "
+"allozieren"
+msgstr[1] ""
+"kann keinen Speicher für ein registriertes natives Symbol (%d Bytes) "
 "allozieren"
 
-#: src/main/Rdynload.c:1100 src/main/Rdynload.c:1321
+#: src/main/Rdynload.c:1102 src/main/Rdynload.c:1323
 msgid "must pass package name or DllInfo reference"
-msgstr "es muss der Paketname oder DllInfo Referenz übergeben werden"
+msgstr "es muss der Paketname oder eine DllInfo-Referenz übergeben werden"
 
-#: src/main/Rdynload.c:1197
+#: src/main/Rdynload.c:1199
 #, c-format
 msgid "unimplemented type %d in 'createRSymbolObject'"
 msgstr "Nicht implementierter Typ %d in 'createRSymbolObject'"
 
-#: src/main/Rdynload.c:1279 src/main/Rdynload.c:1373
+#: src/main/Rdynload.c:1281 src/main/Rdynload.c:1375
 msgid "R_getRegisteredRoutines() expects a DllInfo reference"
 msgstr "R_getRegisteredRoutines() erwartet eine DllInfo Referenz"
 
-#: src/main/Rdynload.c:1282 src/main/Rdynload.c:1376
+#: src/main/Rdynload.c:1284 src/main/Rdynload.c:1378
 msgid "NULL value passed for DllInfo"
-msgstr "NULL Wert für DllInfo übergeben"
+msgstr "Wert NULL für DllInfo übergeben"
 
-#: src/main/Rdynload.c:1436
+#: src/main/Rdynload.c:1441
 #, c-format
 msgid "function '%s' not provided by package '%s'"
 msgstr "Die Funktion '%s' wird nicht von Paket '%s' bereitgestellt"
 
-#: src/main/Rdynload.c:1438
+#: src/main/Rdynload.c:1443
 msgid "table entry must be an external pointer"
 msgstr "Tabelleneintrag muss ein externer Zeiger sein"
 
@@ -687,103 +671,132 @@ msgstr "Tabelleneintrag muss ein externer Zeiger sein"
 msgid "problem in setting variable '%s' in Renviron"
 msgstr "Problem beim Setzen der Variable '%s' in Renviron"
 
-#: src/main/Renviron.c:311
-msgid "argument 'x' must be a character string"
-msgstr "Argument 'x' muss Zeichenkette sein"
+#: src/main/Renviron.c:311 src/main/objects.c:1147 src/main/raw.c:150
+#, c-format
+msgid "argument '%s' must be a character string"
+msgstr "Argument '%s' muss Zeichenkette sein"
 
 #: src/main/Renviron.c:315
 #, c-format
 msgid "file '%s' cannot be opened for reading"
 msgstr "Datei '%s' kann nicht zum Lesen geöffnet werden"
 
-#: src/main/Rstrptime.h:517 src/main/Rstrptime.h:984
+#: src/main/Rstrptime.h:524 src/main/Rstrptime.h:991
 #, c-format
 msgid "use of %s for input is not supported"
 msgstr "Benutzung von '%s' als Eingabe wird nicht unterstützt"
 
-#: src/main/Rstrptime.h:1242
+#: src/main/Rstrptime.h:1263
 msgid "input string is too long"
 msgstr "Eingabe-Zeichenkette ist zu lang"
 
-#: src/main/Rstrptime.h:1244
+#: src/main/Rstrptime.h:1265
 msgid "invalid multibyte input string"
 msgstr "ungültige multi-byte Eingabe-Zeichenkette"
 
-#: src/main/Rstrptime.h:1247
+#: src/main/Rstrptime.h:1268
 msgid "format string is too long"
-msgstr "Formattierungs-Zeichenkette ist zu lang"
+msgstr "Formatierungs-Zeichenkette ist zu lang"
 
-#: src/main/Rstrptime.h:1249
+#: src/main/Rstrptime.h:1270
 msgid "invalid multibyte format string"
-msgstr "ungültige multi-byte Formattierungs-Zeichenkette"
+msgstr "ungültige multi-byte Formatierungs-Zeichenkette"
 
-#: src/main/agrep.c:133 src/main/agrep.c:777 src/main/character.c:1039
-#: src/main/character.c:1043 src/main/grep.c:769 src/main/grep.c:1512
-#: src/main/grep.c:1516 src/main/grep.c:2325 src/main/grep.c:2623
+#: src/main/agrep.c:133 src/main/agrep.c:778 src/main/character.c:1088
+#: src/main/character.c:1092 src/main/grep.c:782 src/main/grep.c:1530
+#: src/main/grep.c:1534 src/main/grep.c:2347 src/main/grep.c:2651
 #, c-format
 msgid "argument '%s' has length > 1 and only the first element will be used"
 msgstr ""
-"Argument '%s' hat einen Länge > 1 und nur das erste Element wird benutzt"
+"Argument '%s' hat eine Länge > 1 und nur das erste Element wird benutzt"
 
-#: src/main/agrep.c:189 src/main/agrep.c:818
+#: src/main/agrep.c:190 src/main/agrep.c:820
 msgid "'pattern' must be a non-empty character string"
 msgstr "'pattern' muss eine nicht-leere Zeichenkette sein"
 
-#: src/main/agrep.c:200 src/main/agrep.c:827 src/main/grep.c:838
-#: src/main/grep.c:2381 src/main/grep.c:2662
+#: src/main/agrep.c:201 src/main/agrep.c:829 src/main/grep.c:853
+#: src/main/grep.c:2405 src/main/grep.c:2704
 msgid "regular expression is invalid in this locale"
-msgstr "regular expression ist in dieser Lokalisierung ungültig"
+msgstr "regular expression ist in dieser locale ungültig"
 
-#: src/main/agrep.c:206 src/main/agrep.c:623
+#: src/main/agrep.c:207 src/main/agrep.c:624
 #, c-format
 msgid "regcomp error:  '%s'"
 msgstr "Fehler bei regcomp: '%s'"
 
-#: src/main/agrep.c:238 src/main/agrep.c:871 src/main/grep.c:227
-#: src/main/grep.c:315 src/main/grep.c:423 src/main/grep.c:578
-#: src/main/grep.c:889 src/main/grep.c:2480 src/main/grep.c:2548
-#: src/main/grep.c:2698
+#: src/main/agrep.c:239 src/main/agrep.c:874 src/main/grep.c:233
+#: src/main/grep.c:323 src/main/grep.c:434 src/main/grep.c:590
+#: src/main/grep.c:907 src/main/grep.c:2507 src/main/grep.c:2576
+#: src/main/grep.c:2741
 #, c-format
 msgid "input string %d is invalid in this locale"
-msgstr "Eingabezeichenkette %d ungültig in dieser locale"
+msgstr "Eingabe-Zeichenkette %d ungültig in dieser locale"
 
-#: src/main/agrep.c:525 src/main/agrep.c:765 src/main/grep.c:155
-#: src/main/grep.c:760 src/main/grep.c:762 src/main/grep.c:1047
-#: src/main/grep.c:1055 src/main/grep.c:1503 src/main/grep.c:1505
-#: src/main/grep.c:2315 src/main/grep.c:2317 src/main/grep.c:2611
+#: src/main/agrep.c:526 src/main/agrep.c:766 src/main/grep.c:159
+#: src/main/grep.c:773 src/main/grep.c:775 src/main/grep.c:1065
+#: src/main/grep.c:1073 src/main/grep.c:1521 src/main/grep.c:1523
+#: src/main/grep.c:2337 src/main/grep.c:2339 src/main/grep.c:2639
 #, c-format
 msgid "argument '%s' will be ignored"
 msgstr "Argument '%s' wird ignoriert"
 
-#: src/main/agrep.c:614
+#: src/main/agrep.c:615
 #, c-format
 msgid "input string x[%d] is invalid in this locale"
 msgstr "Eingabezeichenkette x[%d] ungültig in dieser locale"
 
-#: src/main/agrep.c:660
+#: src/main/agrep.c:661
 #, c-format
 msgid "input string y[%d] is invalid in this locale"
 msgstr "Eingabezeichenkette y[%d] ungültig in dieser locale"
 
-#: src/main/agrep.c:833 src/main/grep.c:2668
+#: src/main/agrep.c:835 src/main/grep.c:2710
 #, c-format
 msgid "regcomp error: '%s'"
 msgstr "Fehler bei regcomp: '%s'"
 
-#: src/main/apply.c:103
+#: src/main/apply.c:98
 msgid "'FUN.VALUE' must be a vector"
 msgstr "'FUN.VALUE' muss Vektor sein"
 
-#: src/main/apply.c:108 src/main/complex.c:758
+#: src/main/apply.c:100 src/main/array.c:480 src/main/character.c:644
+#: src/main/character.c:1453 src/main/connections.c:3553
+#: src/main/context.c:657 src/main/context.c:676 src/main/datetime.c:685
+#: src/main/datetime.c:787 src/main/datetime.c:1046 src/main/dotcode.c:222
+#: src/main/errors.c:943 src/main/errors.c:976 src/main/errors.c:1079
+#: src/main/errors.c:1104 src/main/errors.c:1109 src/main/errors.c:1382
+#: src/main/identical.c:66 src/main/identical.c:67 src/main/identical.c:68
+#: src/main/identical.c:69 src/main/identical.c:70 src/main/platform.c:3083
+#: src/main/seq.c:191 src/main/seq.c:347 src/main/seq.c:352 src/main/seq.c:356
+#: src/main/seq.c:397 src/main/seq.c:401 src/main/seq.c:405
+#: src/main/sort.c:1224 src/main/sort.c:1307 src/main/sort.c:1311
+#: src/main/sort.c:1318 src/main/sort.c:1393 src/main/source.c:225
+#: src/main/summary.c:901 src/main/sysutils.c:250 src/main/util.c:1047
+#: src/main/util.c:1052 src/main/util.c:1059 src/main/util.c:1062
+#: src/main/util.c:2031 src/modules/X11/devX11.c:3142
+#: src/modules/X11/devX11.c:3169 src/modules/X11/devX11.c:3174
+#: src/modules/X11/devX11.c:3179 src/modules/X11/devX11.c:3189
+#: src/modules/X11/devX11.c:3194 src/modules/X11/devX11.c:3198
+#: src/modules/X11/devX11.c:3202
+#, c-format
+msgid "invalid '%s' value"
+msgstr "ungültiger '%s' Wert"
+
+#: src/main/apply.c:103 src/main/complex.c:761
 msgid "invalid length"
 msgstr "ungültige Länge"
 
-#: src/main/apply.c:113
+#: src/main/apply.c:108
 msgid "long vectors are not supported for matrix/array results"
 msgstr ""
 "lange Vektoren werden als Ergebnisse für matrix/array nicht unterstützt"
 
-#: src/main/apply.c:162
+#: src/main/apply.c:115
+#, c-format
+msgid "type '%s' is not supported"
+msgstr "Typ '%s' wird nicht unterstützt"
+
+#: src/main/apply.c:163
 #, c-format
 msgid ""
 "values must be length %d,\n"
@@ -792,7 +805,7 @@ msgstr ""
 "Werte müssen die Länge %d haben,\n"
 "Ergebnis von FUN(X[[%d]]) hat aber Länge %d"
 
-#: src/main/apply.c:174
+#: src/main/apply.c:175
 #, c-format
 msgid ""
 "values must be type '%s',\n"
@@ -801,12 +814,7 @@ msgstr ""
 "Werte müssen vom Typ '%s' sein,\n"
 "Ergebnis von FUN(X[[%d]]) ist aber Typ '%s'"
 
-#: src/main/apply.c:193
-#, c-format
-msgid "type '%s' is not supported"
-msgstr "Typ '%s' wird nicht unterstützt"
-
-#: src/main/apply.c:225
+#: src/main/apply.c:252
 #, c-format
 msgid "dimnames(<value>) is neither NULL nor list of length %d"
 msgstr "dimnames(<value>) ist weder NULL noch Liste der Länge %d"
@@ -819,80 +827,84 @@ msgstr "NaNs wurden erzeugt"
 msgid "non-numeric argument to mathematical function"
 msgstr "Nicht-numerisches Argument für mathematische Funktion"
 
-#: src/main/arithmetic.c:187
+#: src/main/arithmetic.c:186
 msgid "probable complete loss of accuracy in modulus"
 msgstr "evtl. totaler Verlust der Genauigkeit in modulus"
 
-#: src/main/arithmetic.c:337
+#: src/main/arithmetic.c:294
 msgid "NAs produced by integer overflow"
 msgstr "NAs durch Ganzzahlüberlauf erzeugt"
 
-#: src/main/arithmetic.c:538
+#: src/main/arithmetic.c:495
 msgid "operator needs one or two arguments"
 msgstr "Operator braucht ein oder zwei Argumente"
 
-#: src/main/arithmetic.c:554
+#: src/main/arithmetic.c:511
 msgid "non-numeric argument to binary operator"
 msgstr "nicht-numerisches Argument für binären Operator"
 
-#: src/main/arithmetic.c:615 src/main/relop.c:227
+#: src/main/arithmetic.c:572 src/main/relop.c:227
 msgid "non-conformable arrays"
 msgstr "nicht passende Arrays"
 
-#: src/main/arithmetic.c:658
+#: src/main/arithmetic.c:615
 msgid "non-conformable time-series"
 msgstr "nicht zusammenpassende Zeitreihen"
 
-#: src/main/arithmetic.c:680 src/main/logic.c:143 src/main/relop.c:166
+#: src/main/arithmetic.c:637 src/main/logic.c:134 src/main/relop.c:166
 #: src/main/relop.c:265
 msgid "longer object length is not a multiple of shorter object length"
 msgstr ""
 "Länge des längeren Objektes\n"
 " \t ist kein Vielfaches der Länge des kürzeren Objektes"
 
-#: src/main/arithmetic.c:751
+#: src/main/arithmetic.c:708
 msgid "invalid argument to unary operator"
 msgstr "ungültiges Argument für unären Operator"
 
-#: src/main/arithmetic.c:780 src/main/arithmetic.c:805
-#: src/main/arithmetic.c:824
+#: src/main/arithmetic.c:737 src/main/arithmetic.c:762
+#: src/main/arithmetic.c:781
 msgid "invalid unary operator"
 msgstr "ungültiger unärer Operator"
 
-#: src/main/arithmetic.c:1241
+#: src/main/arithmetic.c:1193
 msgid "unimplemented real function of 1 argument"
 msgstr "nicht implementierte reelle Funktion (1 Argument)"
 
-#: src/main/arithmetic.c:1255 src/main/complex.c:648 src/main/complex.c:718
+#: src/main/arithmetic.c:1207 src/main/complex.c:648 src/main/complex.c:718
 msgid "unimplemented complex function"
 msgstr "nicht implementierte komplexe Funktion"
 
-#: src/main/arithmetic.c:1526 src/main/arithmetic.c:1877
-#: src/main/arithmetic.c:2056 src/main/arithmetic.c:2168
+#: src/main/arithmetic.c:1486 src/main/arithmetic.c:1885
+#: src/main/arithmetic.c:2064 src/main/arithmetic.c:2176
 #, c-format
 msgid "unimplemented real function of %d numeric arguments"
 msgstr "nicht implementierte reelle Funktion von %d numerischen Argumenten"
 
-#: src/main/arithmetic.c:1552
+#: src/main/arithmetic.c:1513
 #, c-format
-msgid "%d arguments passed to '%s' which requires 1 or 2"
-msgstr ""
-"%d Argumente an '%s' üergeben, welches aber 1 oder 2 Argumente benötigt"
+msgid "%d argument passed to '%s' which requires 1 or 2 arguments"
+msgid_plural "%d arguments passed to '%s'which requires 1 or 2 arguments"
+msgstr[0] ""
+"%d Argument an '%s' übergeben, welches aber 1 oder 2 Argumente benötigt"
+msgstr[1] ""
+"%d Argumente an '%s' übergeben, welches aber 1 oder 2 Argumente benötigt"
 
-#: src/main/arithmetic.c:1570
+#: src/main/arithmetic.c:1532
 msgid "invalid second argument of length 0"
 msgstr "ungültiges zweites Argument der Länge 0"
 
-#: src/main/arithmetic.c:1639
+#: src/main/arithmetic.c:1627 src/main/arithmetic.c:1645 src/main/envir.c:1462
+#: src/main/envir.c:1970 src/main/eval.c:572 src/main/eval.c:4118
+#, c-format
+msgid "argument \"%s\" is missing, with no default"
+msgstr "Argument \"%s\" fehlt (ohne Standardwert)"
+
+#: src/main/arithmetic.c:1651
 msgid "invalid argument 'base' of length 0"
 msgstr "ungültiges Argument 'base' mit Länge 0"
 
-#: src/main/arithmetic.c:1647
-#, c-format
-msgid "%d arguments passed to 'log' which requires 1 or 2"
-msgstr "%d Argumente an 'log' übergeben, das 1 oder 2 braucht"
-
-#: src/main/array.c:79 src/main/array.c:1441
+#: src/main/array.c:79 src/main/array.c:1547
 #, c-format
 msgid "'data' must be of a vector type, was '%s'"
 msgstr "'data' muss vom Typ vector sein, war '%s'"
@@ -901,19 +913,19 @@ msgstr "'data' muss vom Typ vector sein, war '%s'"
 msgid "non-numeric matrix extent"
 msgstr "nicht numerische Matrix-Ausdehnung"
 
-#: src/main/array.c:97 src/main/array.c:1535
+#: src/main/array.c:97 src/main/array.c:1656
 msgid "invalid 'nrow' value (too large or NA)"
 msgstr "ungültiger 'nrow' Wert (zu groß oder NA)"
 
-#: src/main/array.c:99 src/main/array.c:1537
+#: src/main/array.c:99 src/main/array.c:1658
 msgid "invalid 'nrow' value (< 0)"
 msgstr "ungültiger 'nrow' Wert (< 0)"
 
-#: src/main/array.c:105 src/main/array.c:1540
+#: src/main/array.c:105 src/main/array.c:1661
 msgid "invalid 'ncol' value (too large or NA)"
 msgstr "ungültiger 'ncol' Wert (zu groß oder NA)"
 
-#: src/main/array.c:107 src/main/array.c:1542
+#: src/main/array.c:107 src/main/array.c:1663
 msgid "invalid 'ncol' value (< 0)"
 msgstr "ungültiger 'ncol' Wert (< 0)"
 
@@ -944,7 +956,7 @@ msgstr ""
 msgid "data length exceeds size of matrix"
 msgstr "Datenlänge überschreitet Größe der Matrix"
 
-#: src/main/array.c:147 src/main/array.c:1453 src/main/array.c:1549
+#: src/main/array.c:147 src/main/array.c:1559 src/main/array.c:1670
 msgid "too many elements specified"
 msgstr "zu viele Elemente angegeben"
 
@@ -958,7 +970,7 @@ msgstr "allocMatrix: zu viele Elemente angegeben"
 
 #: src/main/array.c:236
 msgid "negative extents to 3D array"
-msgstr "negative Ausdehnung für einen 3D Array"
+msgstr "negative Ausdehnung für ein 3D Array"
 
 #: src/main/array.c:239
 msgid "'alloc3Darray': too many elements specified"
@@ -968,130 +980,139 @@ msgstr "'alloc3Darray': zu viele Elemente angegeben"
 msgid "'allocArray': too many elements specified by 'dims'"
 msgstr "'allocArray': zu viele Elemente durch 'dims' angegeben"
 
-#: src/main/array.c:448
+#: src/main/array.c:493
+#, c-format
+msgid "'%s' must be a list or atomic vector"
+msgstr "'%s' muss eine Liste oder ein atomarer Vektor sein"
+
+#: src/main/array.c:531
 #, c-format
 msgid "a matrix-like object is required as argument to '%s'"
 msgstr "ein matrixähnliches Objekt ist als Argument für '%s' nötig"
 
-#: src/main/array.c:662
+#: src/main/array.c:745
 msgid "requires numeric/complex matrix/vector arguments"
 msgstr "verlangt numerische/komplexe Matrix/Vektor-Argumente"
 
-#: src/main/array.c:752 src/main/array.c:756 src/main/array.c:760
+#: src/main/array.c:855 src/main/array.c:859 src/main/array.c:863
 msgid "non-conformable arguments"
 msgstr "nicht passende Argumente"
 
-#: src/main/array.c:1058
+#: src/main/array.c:1162
 msgid "argument is not a matrix"
 msgstr "Argument ist keine Matrix"
 
-#: src/main/array.c:1093
+#: src/main/array.c:1197
 msgid "invalid first argument, must be an array"
 msgstr "ungültiges erstes Argument, muss ein Array sein"
 
-#: src/main/array.c:1107
+#: src/main/array.c:1211
 #, c-format
 msgid "'perm' is of wrong length %d (!= %d)"
 msgstr "'perm' hat falsche Länge %d (!= %d)"
 
-#: src/main/array.c:1112 src/main/array.c:1115
+#: src/main/array.c:1216 src/main/array.c:1219
 msgid "'a' does not have named dimnames"
 msgstr "'a' hat keine benannten Dimensionen"
 
-#: src/main/array.c:1122
+#: src/main/array.c:1226
 #, c-format
 msgid "'perm[%d]' does not match a dimension name"
-msgstr "'perm[%d]' entspricht  keinem Dimensionsnamen"
+msgstr "'perm[%d]' entspricht keinem Dimensionsnamen"
 
-#: src/main/array.c:1135
+#: src/main/array.c:1239
 msgid "value out of range in 'perm'"
 msgstr "Wert außerhalb des Bereichs in 'perm'"
 
-#: src/main/array.c:1217
+#: src/main/array.c:1321
 msgid "'resize' must be TRUE or FALSE"
 msgstr "'resize' muss TRUE oder FALSE sein"
 
-#: src/main/array.c:1275
+#: src/main/array.c:1378
 msgid "'x' must be numeric"
 msgstr "'x' muss numerisch sein"
 
-#: src/main/array.c:1449
+#: src/main/array.c:1381
+msgid "'x' is too short"
+msgstr "'x' ist zu kurz"
+
+#: src/main/array.c:1555
 msgid "'dims' cannot be of length 0"
 msgstr "'dims' kann nicht Länge 0 haben"
 
-#: src/main/array.c:1545
+#: src/main/array.c:1666
 msgid "'x' must have positive length"
 msgstr "'x' muss positive Länge haben"
 
-#: src/main/array.c:1605
+#: src/main/array.c:1726
 #, c-format
 msgid "singular matrix in 'backsolve'. First zero in diagonal [%d]"
 msgstr "singuläre Matrix in 'backsolve'. Erste Null in Diagonale [%d]"
 
-#: src/main/attrib.c:40 src/main/attrib.c:235 src/main/attrib.c:269
-#: src/main/attrib.c:291 src/main/attrib.c:405 src/main/attrib.c:452
-#: src/main/attrib.c:502
+#: src/main/attrib.c:40 src/main/attrib.c:231 src/main/attrib.c:265
+#: src/main/attrib.c:287 src/main/attrib.c:403 src/main/attrib.c:450
+#: src/main/attrib.c:501
 msgid "attempt to set an attribute on NULL"
 msgstr "Versuch ein Attribut von NULL zu setzen"
 
-#: src/main/attrib.c:72
+#: src/main/attrib.c:77
 #, c-format
 msgid "row names must be 'character' or 'integer', not '%s'"
 msgstr "Zeilennamen müssen 'character' oder 'integer' sein, nicht '%s'"
 
-#: src/main/attrib.c:124
+#: src/main/attrib.c:130
 #, c-format
 msgid "getAttrib: invalid type (%s) for TAG"
 msgstr "getAttrib: ungültiger Typ (%s) für TAG"
 
-#: src/main/attrib.c:379
+#: src/main/attrib.c:377
 #, c-format
 msgid "invalid type (%s) for 'names': must be vector"
 msgstr "ungültiger Typ (%s) für 'names': muss ein Vektor sein"
 
-#: src/main/attrib.c:382
+#: src/main/attrib.c:380
 #, c-format
 msgid "'names' attribute [%d] must be the same length as the vector [%d]"
 msgstr "Attribut 'names' [%d] muss dieselbe Länge haben wie der Vektor [%d]"
 
-#: src/main/attrib.c:387
+#: src/main/attrib.c:385
 msgid "names() applied to a non-vector"
 msgstr "names() angewendet auf einen Nicht-Vektor"
 
-#: src/main/attrib.c:395
+#: src/main/attrib.c:393
 msgid "invalid time series parameters specified"
 msgstr "ungültige Zeitreihen Parameter spezifiziert"
 
-#: src/main/attrib.c:409
+#: src/main/attrib.c:407
 msgid "'tsp' attribute must be numeric"
 msgstr "'tsp' Attribut muss numerisch sein"
 
-#: src/main/attrib.c:415
+#: src/main/attrib.c:413
 msgid "'tsp' attribute must be numeric of length three"
 msgstr "'tsp' Attribut muss numerisch sein und Länge 3 haben"
 
-#: src/main/attrib.c:432
+#: src/main/attrib.c:430
 msgid "cannot assign 'tsp' to zero-length vector"
 msgstr "kann 'tsp' nicht einem Vektor der Länge 0 zuordnen"
 
-#: src/main/attrib.c:463
+#: src/main/attrib.c:461
 msgid "attempt to set invalid 'comment' attribute"
 msgstr "Versuch ungültiges Attribut 'comment' zu setzen"
 
-#: src/main/attrib.c:511
+#: src/main/attrib.c:510
 msgid "adding class \"factor\" to an invalid object"
 msgstr "Klasse \"factor\" wird zu einem ungültigen Objekt hinzugefügt"
 
-#: src/main/attrib.c:519
+#: src/main/attrib.c:541
 msgid "attempt to set invalid 'class' attribute"
 msgstr "Versuch ungültiges Attribut 'class' zu setzen"
 
-#: src/main/attrib.c:777
+#: src/main/attrib.c:865
 #, c-format
 msgid "class '%s' has no 'names' slot"
-msgstr "Klasse '%s' hat keinen 'names' Eintrag"
+msgstr "Klasse '%s' hat keinen 'names'-Eintrag"
 
-#: src/main/attrib.c:779
+#: src/main/attrib.c:867
 #, c-format
 msgid ""
 "class '%s' has no 'names' slot; assigning a names attribute will create an "
@@ -1100,7 +1121,7 @@ msgstr ""
 "Klasse '%s' hat keinen 'names' Eintrag; ein Namensattribut zuzuweisen\n"
 "erzeugte ein ungültiges Objekt"
 
-#: src/main/attrib.c:782
+#: src/main/attrib.c:870
 #, c-format
 msgid ""
 "invalid to use names()<- to set the 'names' slot in a non-vector class ('%s')"
@@ -1108,129 +1129,130 @@ msgstr ""
 "Es ist unzulässig names()<- zu nutzen, um den 'names' Eintrag einer\n"
 "Nicht-Vektor-Klasse ('%s') zu setzen"
 
-#: src/main/attrib.c:812
+#: src/main/attrib.c:900
 msgid "incompatible 'names' argument"
 msgstr "inkompatibles Argument für 'names'"
 
-#: src/main/attrib.c:867
+#: src/main/attrib.c:955
 #, c-format
 msgid "invalid type (%s) to set 'names' attribute"
 msgstr "Ungültiger Typ (%s) um Attribut 'names' zu setzen"
 
-#: src/main/attrib.c:938
+#: src/main/attrib.c:1028
 msgid "'dimnames' applied to non-array"
 msgstr "'dimnames' angewendet auf Nicht-Array"
 
-#: src/main/attrib.c:943
-msgid "'dimnames' must be a list"
-msgstr "'dimnames' muss eine Liste sein"
+#: src/main/attrib.c:1033 src/main/coerce.c:2452
+#, c-format
+msgid "'%s' must be a list"
+msgstr "'%s' muss eine Liste sein"
 
-#: src/main/attrib.c:946 src/main/attrib.c:974
+#: src/main/attrib.c:1036 src/main/attrib.c:1064
 #, c-format
 msgid "length of 'dimnames' [%d] must match that of 'dims' [%d]"
 msgstr "Länge von 'dimnames' [%d] muss dieselbe sein wie die von 'dims' [%d]"
 
-#: src/main/attrib.c:980
+#: src/main/attrib.c:1070
 #, c-format
 msgid "invalid type (%s) for 'dimnames' (must be a vector)"
 msgstr "ungültiger Typ (%s) für 'dimnames' (muss Vektor sein)"
 
-#: src/main/attrib.c:983
+#: src/main/attrib.c:1073
 #, c-format
 msgid "length of 'dimnames' [%d] not equal to array extent"
 msgstr "Länge von 'dimnames' [%d] ungleich der Arrayausdehnung"
 
-#: src/main/attrib.c:1055 src/main/builtin.c:75 src/main/builtin.c:112
-#: src/main/envir.c:1606 src/main/envir.c:1734 src/main/envir.c:1796
-#: src/main/envir.c:1918 src/main/paste.c:74 src/main/paste.c:293
-#: src/main/random.c:487 src/main/random.c:516 src/main/unique.c:1749
+#: src/main/attrib.c:1145 src/main/builtin.c:75 src/main/builtin.c:112
+#: src/main/envir.c:1738 src/main/envir.c:1866 src/main/envir.c:1926
+#: src/main/envir.c:2063 src/main/paste.c:74 src/main/paste.c:293
+#: src/main/random.c:476 src/main/random.c:505 src/main/unique.c:1684
 msgid "invalid first argument"
 msgstr "ungültiges erstes Argument"
 
-#: src/main/attrib.c:1058
+#: src/main/attrib.c:1148
 msgid "invalid second argument"
 msgstr "ungültiges zweites Argument"
 
-#: src/main/attrib.c:1066
+#: src/main/attrib.c:1156
 msgid "length-0 dimension vector is invalid"
 msgstr "ungültiger Dimensionenvektor der Länge 0"
 
-#: src/main/attrib.c:1071
+#: src/main/attrib.c:1161
 msgid "the dims contain missing values"
 msgstr "das dims Argument enthält fehlende Werte"
 
-#: src/main/attrib.c:1073
+#: src/main/attrib.c:1163
 msgid "the dims contain negative values"
 msgstr "das dims Argument enthält negative Werte"
 
-#: src/main/attrib.c:1078
+#: src/main/attrib.c:1168
 msgid "dims do not match the length of object"
 msgstr "Dimensionen passen nicht zur Länge des Objektes "
 
-#: src/main/attrib.c:1080
+#: src/main/attrib.c:1170
 #, c-format
 msgid "dims [product %d] do not match the length of object [%d]"
 msgstr "Dimensionen [Produkt %d] passen nicht zur Länge des Objektes [%d]"
 
-#: src/main/attrib.c:1177
+#: src/main/attrib.c:1272
 msgid "attributes must be a list or NULL"
 msgstr "Attribute müssen eine Liste oder NULL sein"
 
-#: src/main/attrib.c:1182
+#: src/main/attrib.c:1277
 msgid "attributes must be named"
 msgstr "Attribute müssen Namen haben"
 
-#: src/main/attrib.c:1186
+#: src/main/attrib.c:1281
 #, c-format
 msgid "all attributes must have names [%d does not]"
 msgstr "alle Attribute müssen Namen haben [%d hat keinen]"
 
-#: src/main/attrib.c:1285
+#: src/main/attrib.c:1381
 msgid "'which' must be of mode character"
-msgstr "'which' muss vom Modus Charakter sein"
+msgstr "'which' muss vom Modus character sein"
 
-#: src/main/attrib.c:1287
+#: src/main/attrib.c:1383
 msgid "exactly one attribute 'which' must be given"
 msgstr "es muss genau ein Attribut 'which' angegeben werden"
 
-#: src/main/attrib.c:1345 src/main/attrib.c:1368 src/main/subscript.c:240
-#: src/main/subscript.c:244 src/main/subset.c:1188 src/main/subset.c:1239
+#: src/main/attrib.c:1441 src/main/attrib.c:1464 src/main/subscript.c:248
+#: src/main/subscript.c:252 src/main/subset.c:1230 src/main/subset.c:1281
 #, c-format
 msgid "partial match of '%s' to '%s'"
 msgstr "partieller Treffer von '%s' auf '%s'"
 
-#: src/main/attrib.c:1406
+#: src/main/attrib.c:1503
 #, c-format
 msgid "invalid type '%s' for slot name"
 msgstr "ungültiger Typ '%s' für den Slot-Namen"
 
-#: src/main/attrib.c:1444
+#: src/main/attrib.c:1539
 msgid "'name' must be non-null character string"
-msgstr "'name' muss eine nicht-Null Zeichenkette sein"
+msgstr "'name' muss eine nicht-null Zeichenkette sein"
 
-#: src/main/attrib.c:1568 src/main/attrib.c:1639 src/main/attrib.c:1676
+#: src/main/attrib.c:1663 src/main/attrib.c:1734 src/main/attrib.c:1771
 msgid "invalid type or length for slot name"
 msgstr "ungültiger Typ oder ungültige Länge für den Slot-Namen"
 
-#: src/main/attrib.c:1602
+#: src/main/attrib.c:1697
 #, c-format
 msgid "cannot get a slot (\"%s\") from an object of type \"%s\""
 msgstr "kann keinen Slot (\"%s\") von einem Objekt vom Typ \"%s\" bekommen"
 
-#: src/main/attrib.c:1613
+#: src/main/attrib.c:1708
 #, c-format
 msgid "no slot of name \"%s\" for this object of class \"%s\""
 msgstr "kein Slot des Namens \"%s\" für dieses Objekt der Klasse \"%s\""
 
-#: src/main/attrib.c:1630
+#: src/main/attrib.c:1725
 msgid "attempt to set slot on NULL object"
 msgstr "Versuch einen Slot für NULL Objekt zu setzen"
 
-#: src/main/attrib.c:1671
+#: src/main/attrib.c:1766
 msgid "formal classes cannot be used without the 'methods' package"
 msgstr "formale Klassen können nicht ohne das 'methods' Paket benutzt werden"
 
-#: src/main/attrib.c:1683
+#: src/main/attrib.c:1778
 #, c-format
 msgid ""
 "trying to get slot \"%s\" from an object of a basic class (\"%s\") with no "
@@ -1239,14 +1261,14 @@ msgstr ""
 "versuche einen Slot \"%s\" von einem Objekt der einfachen Klasse (\"%s\") "
 "ohne Slots anzufordern"
 
-#: src/main/attrib.c:1687
+#: src/main/attrib.c:1782
 #, c-format
 msgid ""
 "trying to get slot \"%s\" from an object (class \"%s\") that is not an S4 "
 "object "
 msgstr ""
 "versuche einen Slot \"%s\" von einem Objekt der Klasse (\"%s\") anzufordern, "
-"das aber kein S4 Objekt ist"
+"das aber kein S4-Objekt ist"
 
 #: src/main/bind.c:161
 #, c-format
@@ -1271,24 +1293,23 @@ msgstr "Wiederholung des formalen Argumentes 'use.names'"
 msgid "argument not a list"
 msgstr "Argument ist keine Liste"
 
-#: src/main/bind.c:1038 src/main/eval.c:2691 src/main/eval.c:2700
-#: src/main/objects.c:318 src/main/objects.c:354 src/main/objects.c:729
-#: src/main/objects.c:746 src/main/objects.c:753
+#: src/main/bind.c:1038 src/main/names.c:1273 src/main/names.c:1278
+#: src/main/names.c:1283 src/main/names.c:1288
 #, c-format
 msgid "class name too long in '%s'"
 msgstr "Klassenname zu lang in '%s'"
 
-#: src/main/bind.c:1114
+#: src/main/bind.c:1122
 #, c-format
 msgid "cannot create a matrix from type '%s'"
 msgstr "kann keine Matrix aus Typ '%s' erzeugen"
 
-#: src/main/bind.c:1185
+#: src/main/bind.c:1192
 #, c-format
 msgid "number of rows of matrices must match (see arg %d)"
 msgstr "Anzahl der Zeilen der Matrizen muss übereinstimmen (siehe Argument %d)"
 
-#: src/main/bind.c:1430
+#: src/main/bind.c:1439
 #, c-format
 msgid "number of columns of matrices must match (see arg %d)"
 msgstr ""
@@ -1306,111 +1327,119 @@ msgstr "Vektorgröße kann nicht NA/NaN sein"
 msgid "vector size cannot be infinite"
 msgstr "Vektorgröße kann nicht unendlich sein"
 
-#: src/main/builtin.c:51 src/main/builtin.c:59 src/main/builtin.c:916
+#: src/main/builtin.c:51 src/main/builtin.c:59 src/main/builtin.c:941
 #: src/main/sort.c:1305
 msgid "vector size specified is too large"
 msgstr "angegebene Vektorgröße ist zu groß"
 
-#: src/main/builtin.c:84 src/main/builtin.c:93 src/main/builtin.c:293
-#: src/main/builtin.c:326 src/main/builtin.c:365 src/main/builtin.c:375
-#: src/main/coerce.c:1537 src/main/connections.c:3066 src/main/engine.c:2967
-#: src/main/envir.c:993 src/main/envir.c:1046 src/main/envir.c:1136
-#: src/main/envir.c:1615 src/main/envir.c:1739 src/main/envir.c:1807
-#: src/main/envir.c:1925 src/main/envir.c:2582 src/main/envir.c:2642
-#: src/main/envir.c:2922 src/main/envir.c:2951 src/main/envir.c:2972
-#: src/main/envir.c:2995 src/main/envir.c:3030 src/main/envir.c:3051
-#: src/main/envir.c:3357 src/main/envir.c:3362 src/main/eval.c:5318
-#: src/main/objects.c:197 src/main/objects.c:203 src/main/saveload.c:2070
-#: src/main/saveload.c:2364 src/main/serialize.c:2709
+#: src/main/builtin.c:84 src/main/builtin.c:93 src/main/builtin.c:294
+#: src/main/builtin.c:327 src/main/builtin.c:384 src/main/builtin.c:398
+#: src/main/coerce.c:1519 src/main/connections.c:3062 src/main/engine.c:2967
+#: src/main/envir.c:999 src/main/envir.c:1052 src/main/envir.c:1208
+#: src/main/envir.c:1747 src/main/envir.c:1871 src/main/envir.c:1937
+#: src/main/envir.c:2070 src/main/envir.c:2789 src/main/envir.c:2875
+#: src/main/envir.c:3167 src/main/envir.c:3196 src/main/envir.c:3217
+#: src/main/envir.c:3240 src/main/envir.c:3275 src/main/envir.c:3296
+#: src/main/envir.c:3617 src/main/envir.c:3622 src/main/eval.c:6114
+#: src/main/objects.c:191 src/main/objects.c:199 src/main/saveload.c:2070
+#: src/main/saveload.c:2362 src/main/serialize.c:2755
 msgid "use of NULL environment is defunct"
 msgstr "Verwendung der NULL Umgebung ist nicht mehr möglich"
 
-#: src/main/builtin.c:306
+#: src/main/builtin.c:307
 msgid "replacement object is not an environment"
 msgstr "Ersatzobjekt ist keine Umgebung"
 
-#: src/main/builtin.c:331
+#: src/main/builtin.c:332
 msgid "'enclos' must be an environment"
 msgstr "'enclos' muss eine Umgebung sein"
 
-#: src/main/builtin.c:352 src/main/builtin.c:370
+#: src/main/builtin.c:353 src/main/builtin.c:389
 msgid "argument is not an environment"
 msgstr "Argument ist keine Umgebung"
 
-#: src/main/builtin.c:354
+#: src/main/builtin.c:355
 msgid "the empty environment has no parent"
 msgstr "die leere Umgebung hat keinen Parent"
 
-#: src/main/builtin.c:372
+#: src/main/builtin.c:391
 msgid "can not set parent of the empty environment"
 msgstr "kann keinen Parent für die leere Umgebung setzen"
 
-#: src/main/builtin.c:380
+#: src/main/builtin.c:393
+msgid "can not set the parent environment of a namespace"
+msgstr "kann keine Elternumgebung für einen Namensraum setzen"
+
+#: src/main/builtin.c:395
+msgid "can not set the parent environment of package imports"
+msgstr "kann keine Elternumgebung für Paketimporte setzen"
+
+#: src/main/builtin.c:403
 msgid "'parent' is not an environment"
 msgstr "'parent' ist keine Umgebung"
 
-#: src/main/builtin.c:521 src/main/connections.c:3691
-#: src/main/connections.c:4068 src/main/connections.c:4102
-#: src/main/connections.c:4480 src/main/connections.c:4550
-#: src/main/connections.c:4759 src/main/connections.c:4763
-#: src/main/connections.c:5124 src/main/deparse.c:360 src/main/deparse.c:446
-#: src/main/serialize.c:2006
+#: src/main/builtin.c:546 src/main/connections.c:3689
+#: src/main/connections.c:4072 src/main/connections.c:4106
+#: src/main/connections.c:4484 src/main/connections.c:4554
+#: src/main/connections.c:4763 src/main/connections.c:4767
+#: src/main/connections.c:5212 src/main/deparse.c:368 src/main/deparse.c:457
+#: src/main/serialize.c:2045
 msgid "cannot write to this connection"
 msgstr "kann auf diese Verbindung nicht schreiben"
 
-#: src/main/builtin.c:526 src/main/builtin.c:556
+#: src/main/builtin.c:551 src/main/builtin.c:581
 #, c-format
 msgid "invalid '%s' specification"
 msgstr "ungültige '%s' Spezifikation"
 
-#: src/main/builtin.c:543
+#: src/main/builtin.c:568
 msgid "non-positive 'fill' argument will be ignored"
 msgstr "nicht-positives Argument für 'fill' wird ignoriert"
 
-#: src/main/builtin.c:618
+#: src/main/builtin.c:643
 #, c-format
 msgid "argument %d (type '%s') cannot be handled by 'cat'"
-msgstr "Argument %d (Typ '%s') wird nicht von 'cat' beherrscht"
+msgstr "Argument %d (Typ '%s') wird nicht von 'cat' verstanden"
 
-#: src/main/builtin.c:763
+#: src/main/builtin.c:788
 #, c-format
 msgid "vector: cannot make a vector of mode '%s'."
 msgstr "vector: kann keinen Vektor vom Mode '%s' erzeugen."
 
-#: src/main/builtin.c:789
+#: src/main/builtin.c:814
 msgid "cannot set length of non-vector"
 msgstr "kann Länge eines Nicht-Vektors nicht setzen"
 
-#: src/main/builtin.c:897 src/main/builtin.c:907 src/main/options.c:637
+#: src/main/builtin.c:922 src/main/builtin.c:932 src/main/options.c:653
 msgid "invalid argument"
 msgstr "ungültiges Argument"
 
-#: src/main/builtin.c:899 src/main/builtin.c:909 src/main/builtin.c:911
-#: src/main/character.c:366 src/main/coerce.c:2765
+#: src/main/builtin.c:924 src/main/builtin.c:934 src/main/builtin.c:936
+#: src/main/character.c:415 src/main/coerce.c:2813
 msgid "invalid value"
 msgstr "ungültiger Wert"
 
-#: src/main/builtin.c:942 src/main/coerce.c:2478 src/main/coerce.c:2519
-#: src/main/eval.c:563 src/main/eval.c:683 src/main/eval.c:2099
-#: src/main/eval.c:2176 src/main/eval.c:2236 src/main/eval.c:2569
-#: src/main/eval.c:4694 src/main/eval.c:4814
+#: src/main/builtin.c:967 src/main/coerce.c:2522 src/main/coerce.c:2565
+#: src/main/eval.c:562 src/main/eval.c:682 src/main/eval.c:2175
+#: src/main/eval.c:2255 src/main/eval.c:2316 src/main/eval.c:2654
+#: src/main/eval.c:5459 src/main/eval.c:5576
 msgid "'...' used in an incorrect context"
 msgstr "'...' in falschem Kontext benutzt"
 
-#: src/main/builtin.c:963
+#: src/main/builtin.c:989
 #, c-format
 msgid "duplicate 'switch' defaults: '%s' and '%s'"
 msgstr "doppelter Default für 'switch': '%s' und '%s'"
 
-#: src/main/builtin.c:996
+#: src/main/builtin.c:1022
 msgid "'EXPR' is missing"
 msgstr "'EXPR' fehlt"
 
-#: src/main/builtin.c:1000 src/main/eval.c:5155
+#: src/main/builtin.c:1026 src/main/eval.c:5931
 msgid "EXPR must be a length 1 vector"
 msgstr "EXPR muss ein Vektor der Länge 1 sein"
 
-#: src/main/builtin.c:1003
+#: src/main/builtin.c:1029 src/main/eval.c:5934
 #, c-format
 msgid ""
 "EXPR is a \"factor\", treated as integer.\n"
@@ -1419,13 +1448,26 @@ msgstr ""
 "EXPR ist ein \"factor\", behandelt wie ein Integer.\n"
 " Evtl. stattdessen '%s' benutzen."
 
-#: src/main/character.c:105 src/main/character.c:108 src/main/character.c:132
-#: src/main/character.c:135
+#: src/main/character.c:104 src/main/character.c:146
+#, c-format
+msgid "%d argument passed to '%s' which requires %d to %d"
+msgid_plural "%d arguments passed to '%s' which requires %d to %d"
+msgstr[0] "%d Argument an '%s' übergeben, welches zwischen %d und %d benötigt"
+msgstr[1] "%d Argumente an '%s' übergeben, welches zwischen %d und %d benötigt"
+
+#: src/main/character.c:111 src/main/character.c:114 src/main/character.c:152
+#: src/main/character.c:155
 #, c-format
 msgid "'%s' requires a character vector"
-msgstr "'%s' benötigt einen Charakter-Vektor"
+msgstr "'%s' benötigt einen Zeichenkettenvektor"
+
+#: src/main/character.c:193 src/main/character.c:209 src/main/character.c:219
+#: src/main/character.c:244 src/main/character.c:702 src/main/character.c:799
+#, c-format
+msgid "invalid multibyte string %d"
+msgstr "ungültige multibyte Zeichenkette %d"
 
-#: src/main/character.c:164
+#: src/main/character.c:203
 #, c-format
 msgid ""
 "number of characters is not computable for element %d in \"bytes\" encoding"
@@ -1433,85 +1475,79 @@ msgstr ""
 "Anzahl der Zeichen ist nicht berechenbar für das Element %d, wenn\n"
 "\"bytes\"-Kodierung benutzt wird"
 
-#: src/main/character.c:169 src/main/character.c:197 src/main/character.c:653
-#: src/main/character.c:750
-#, c-format
-msgid "invalid multibyte string %d"
-msgstr "ungültige multibyte Zeichenkette %d"
-
-#: src/main/character.c:185
+#: src/main/character.c:232
 #, c-format
 msgid "width is not computable for element %d in \"bytes\" encoding"
 msgstr ""
 "Breite ist nicht berechenbar für das Element %d, wenn \"bytes\"-Kodierung "
 "benutzt wird\""
 
-#: src/main/character.c:263
+#: src/main/character.c:312
 msgid "extracting substrings from a non-character object"
-msgstr "extrahieren von Teilzeichenketten aus einem Nicht-Charakter Objekt"
+msgstr "extrahieren von Teilzeichenketten aus einem nicht-character Objekt"
 
-#: src/main/character.c:268 src/main/character.c:363
+#: src/main/character.c:317 src/main/character.c:412
 msgid "invalid substring arguments"
 msgstr "ungültige Teilzeichenkettenargument"
 
-#: src/main/character.c:358
+#: src/main/character.c:407
 msgid "replacing substrings in a non-character object"
-msgstr "Ersetzen von Teilzeichenketten in einem Nicht-Charakter Objekt"
+msgstr "Ersetzen von Teilzeichenketten in einem nicht-character Objekt"
 
-#: src/main/character.c:551
+#: src/main/character.c:600
 msgid "the first argument must be a character vector"
-msgstr "erstes Argument muss ein Charaktervektor sein"
+msgstr "erstes Argument muss ein Zeichenkettenvektor sein"
 
-#: src/main/character.c:570
+#: src/main/character.c:619
 msgid "abbreviate used with non-ASCII chars"
-msgstr "abbreviate mit nicht-ASCII Zeichen genutzt"
+msgstr "abbreviate mit Nicht-ASCII-Zeichen genutzt"
 
-#: src/main/character.c:591
+#: src/main/character.c:640
 msgid "non-character names"
-msgstr "Nicht-Charakter Namen"
+msgstr "Nicht-character Namen"
 
-#: src/main/character.c:696 src/main/grep.c:159
+#: src/main/character.c:745 src/main/grep.c:163
 msgid "non-character argument"
-msgstr "Nicht-Charakter Argument"
+msgstr "nicht-character Argument"
 
-#: src/main/character.c:805
+#: src/main/character.c:854
 #, c-format
 msgid "decreasing range specification ('%lc-%lc')"
 msgstr "abnehmende Bereichsspezifikation ('%lc-%lc')"
 
-#: src/main/character.c:891
+#: src/main/character.c:940
 #, c-format
 msgid "decreasing range specification ('%c-%c')"
 msgstr "abnehmende Bereichsspezifikation ('%c-%c')"
 
-#: src/main/character.c:1079
+#: src/main/character.c:1128
 msgid "invalid UTF-8 string 'old'"
-msgstr "ungültige UTF-8 Zeichenkette 'old'"
+msgstr "ungültige UTF-8-Zeichenkette 'old'"
 
-#: src/main/character.c:1085
+#: src/main/character.c:1134
 msgid "invalid multibyte string 'old'"
-msgstr "ungültige multibyte Zeichenkette 'old'"
+msgstr "ungültige multi-byte Zeichenkette 'old'"
 
-#: src/main/character.c:1098
+#: src/main/character.c:1147
 msgid "invalid UTF-8 string 'new'"
-msgstr "ungültige UTF-8 Zeichenkette 'new'"
+msgstr "ungültige UTF-8-Zeichenkette 'new'"
 
-#: src/main/character.c:1104
+#: src/main/character.c:1153
 msgid "invalid multibyte string 'new'"
-msgstr "ungültige multibyte Zeichenkette 'new'"
+msgstr "ungültige multi-byte Zeichenkette 'new'"
 
-#: src/main/character.c:1132 src/main/character.c:1221
+#: src/main/character.c:1181 src/main/character.c:1270
 msgid "'old' is longer than 'new'"
 msgstr "'old' ist länger als 'new'"
 
-#: src/main/character.c:1164
+#: src/main/character.c:1213
 #, c-format
 msgid "invalid input multibyte string %d"
-msgstr "ungültige multibyte Eingabezeichenkette %d"
+msgstr "ungültige multi-byte Eingabezeichenkette %d"
 
-#: src/main/character.c:1271
+#: src/main/character.c:1320
 msgid "strtrim() requires a character vector"
-msgstr "strtrim() benötigt Charakter-Vektor"
+msgstr "strtrim() benötigt Zeichenkettenvektor"
 
 #: src/main/coerce.c:32
 msgid "invalid 'mode' argument"
@@ -1521,15 +1557,15 @@ msgstr "ungültiges 'mode' Argument"
 msgid "applies only to lists and vectors"
 msgstr "kann nur auf Listen und Vektoren angewendet werden"
 
-#: src/main/coerce.c:77 src/main/errors.c:1208
+#: src/main/coerce.c:77 src/main/errors.c:1222
 msgid "NAs introduced by coercion"
 msgstr "NAs durch Umwandlung erzeugt"
 
-#: src/main/coerce.c:79 src/main/errors.c:1209
-msgid "inaccurate integer conversion in coercion"
-msgstr "ungenaue Ganzzahlkonversion in Umwandlung"
+#: src/main/coerce.c:79
+msgid "NAs introduced by coercion to integer range"
+msgstr "NAs durch Umwandlung in Bereich ganzer Zahlen erzeugt"
 
-#: src/main/coerce.c:81 src/main/errors.c:1210
+#: src/main/coerce.c:81 src/main/errors.c:1224
 msgid "imaginary parts discarded in coercion"
 msgstr "imaginäre Teile verworfen in Umwandlung"
 
@@ -1537,135 +1573,135 @@ msgstr "imaginäre Teile verworfen in Umwandlung"
 msgid "out-of-range values treated as 0 in coercion to raw"
 msgstr "Werte außerhalb des Bereichs als 0 behandelt in Umwandlung nach raw"
 
-#: src/main/coerce.c:414
+#: src/main/coerce.c:392
 #, c-format
 msgid "invalid data of mode '%s' (too short)"
-msgstr "ungültige Daten vom Mode '%s' (zu kurz)"
+msgstr "ungültige Daten vom Modus '%s' (zu kurz)"
 
-#: src/main/coerce.c:1016
+#: src/main/coerce.c:995
 #, c-format
 msgid "'pairlist' object cannot be coerced to type '%s'"
 msgstr "Objekt 'pairlist' kann nicht nach '%s' umgewandelt werden"
 
-#: src/main/coerce.c:1134
+#: src/main/coerce.c:1113
 #, c-format
 msgid "(list) object cannot be coerced to type '%s'"
 msgstr "(list) Objekt kann nicht nach '%s' umgewandelt werden"
 
-#: src/main/coerce.c:1157
+#: src/main/coerce.c:1136
 #, c-format
 msgid "(symbol) object cannot be coerced to type '%s'"
 msgstr "(symbol) Objekt kann nicht in Typ '%s' umgewandelt werden"
 
-#: src/main/coerce.c:1173 src/main/coerce.c:1485
+#: src/main/coerce.c:1152 src/main/coerce.c:1467
 msgid "no method for coercing this S4 class to a vector"
-msgstr "Keine Methode um diese S4 Klasse in einen Vektor zu verwandeln"
+msgstr "Keine Methode um diese S4-Klasse in einen Vektor umzuwandeln"
 
-#: src/main/coerce.c:1232
+#: src/main/coerce.c:1215
 msgid "environments cannot be coerced to other types"
 msgstr "Umgebungen können nicht in andere Typen umgewandelt werden"
 
-#: src/main/coerce.c:1379
+#: src/main/coerce.c:1357
 msgid "attempting to coerce non-factor"
-msgstr "Versuch einen nicht-Faktor umzuwandeln"
+msgstr "Versuch einen Nicht-Faktor umzuwandeln"
+
+#: src/main/coerce.c:1362 src/main/coerce.c:1372
+msgid "malformed factor"
+msgstr "ungültige Faktoren"
 
-#: src/main/coerce.c:1533
+#: src/main/coerce.c:1515
 msgid "list argument expected"
 msgstr "Listenargument erwartet"
 
-#: src/main/coerce.c:1541 src/main/eval.c:5322
+#: src/main/coerce.c:1523 src/main/eval.c:6118
 msgid "invalid environment"
 msgstr "ungültige Umgebung"
 
-#: src/main/coerce.c:1545
+#: src/main/coerce.c:1527
 msgid "argument must have length at least 1"
 msgstr "Argument muss mindestens Länge 1 haben"
 
-#: src/main/coerce.c:1567
+#: src/main/coerce.c:1549
 msgid "invalid body for function"
 msgstr "ungültiger Funktionstext"
 
-#: src/main/coerce.c:1590
+#: src/main/coerce.c:1572
 msgid "invalid length 0 argument"
 msgstr "ungültiges Argument der Länge 0"
 
-#: src/main/coerce.c:1605
+#: src/main/coerce.c:1587
 msgid "invalid argument list"
 msgstr "ungültige Argumentenliste"
 
-#: src/main/coerce.c:1916
+#: src/main/coerce.c:1899
 msgid "type \"single\" unimplemented in R"
 msgstr "Typ \"single\" nicht in R implementiert"
 
-#: src/main/coerce.c:1918
+#: src/main/coerce.c:1901
 msgid "unimplemented predicate"
 msgstr "nicht implementiertes Prädikat"
 
-#: src/main/coerce.c:2069
+#: src/main/coerce.c:2053
 #, c-format
 msgid "%s() applied to non-(list or vector) of type '%s'"
-msgstr "%s() auf nicht-(Liste oder Vektor) des Typs '%s' angewendet"
+msgstr "%s() auf Nicht-(Liste oder Vektor) des Typs '%s' angewendet"
 
-#: src/main/coerce.c:2212 src/main/coerce.c:2275 src/main/coerce.c:2343
+#: src/main/coerce.c:2250 src/main/coerce.c:2313 src/main/coerce.c:2384
 #, c-format
 msgid "default method not implemented for type '%s'"
 msgstr "nicht implementierte Standardmethode für Typ '%s'"
 
-#: src/main/coerce.c:2361
+#: src/main/coerce.c:2405
 msgid "'name' is missing"
 msgstr "'name' fehlt"
 
-#: src/main/coerce.c:2368
+#: src/main/coerce.c:2412
 msgid "first argument must be a character string"
 msgstr "erstes Argument muss eine Zeichenkette sein"
 
-#: src/main/coerce.c:2401
+#: src/main/coerce.c:2445
 msgid "'what' must be a character string or a function"
 msgstr "'what' muss eine Zeichenkette oder eine Funktion sein"
 
-#: src/main/coerce.c:2405
+#: src/main/coerce.c:2449
 msgid "'args' must be a list or expression"
 msgstr "'args' muss eine Liste oder ein Ausdruck sein"
 
-#: src/main/coerce.c:2408
-msgid "'args' must be a list"
-msgstr "'args' muss eine Liste sein"
-
-#: src/main/coerce.c:2412
+#: src/main/coerce.c:2456 src/main/unique.c:1285
 msgid "'envir' must be an environment"
 msgstr "'envir' muss eine Umgebung sein"
 
-#: src/main/coerce.c:2567
+#: src/main/coerce.c:2615
 msgid "invalid environment specified"
 msgstr "ungültige Umgebung spezifiziert"
 
-#: src/main/coerce.c:2633
+#: src/main/coerce.c:2681
 msgid "Setting class(x) to NULL;   result will no longer be an S4 object"
-msgstr "Setze class(x) auf NULL;  das Ergebnis ist keine S4 Objekt mehr"
+msgstr "Setze class(x) auf NULL;   das Ergebnis ist kein S4-Objekt mehr"
 
-#: src/main/coerce.c:2636
+#: src/main/coerce.c:2684
 #, c-format
 msgid ""
 "Setting class(x) to multiple strings (\"%s\", \"%s\", ...); result will no "
 "longer be an S4 object"
 msgstr ""
 "Setze class(x) auf mehrere Zeichenketten(\"%s\", \"%s\", ...); das Ergebnis "
-"ist kein S4 Objekt mehr"
+"ist kein S4-Objekt mehr"
 
-#: src/main/coerce.c:2640
+#: src/main/coerce.c:2688
 #, c-format
 msgid ""
 "Setting class(x) to \"%s\" sets attribute to NULL; result will no longer be "
 "an S4 object"
 msgstr ""
 "class(x) auf \"%s\" zu setzen, setzt Attribut auf NULL; das Ergebnis ist "
-"kein S4 Objekt mehr"
+"kein S4-Objekt mehr"
 
-#: src/main/coerce.c:2673
+#: src/main/coerce.c:2721
 msgid "invalid replacement object to be a class string"
 msgstr "Ungültiges Ersetzungsobjekt als Klassenzeichenkette"
 
-#: src/main/coerce.c:2694
+#: src/main/coerce.c:2742
 #, c-format
 msgid ""
 "\"%s\" can only be set as the class if the object has this type; found \"%s\""
@@ -1673,7 +1709,7 @@ msgstr ""
 "\"%s\" kann nur als Klasse gesetzt werden, wenn das Objekt diesen Typ hat; "
 "gefunden wurde \"%s\""
 
-#: src/main/coerce.c:2712
+#: src/main/coerce.c:2760
 #, c-format
 msgid ""
 "invalid to set the class to matrix unless the dimension attribute is of "
@@ -1682,18 +1718,18 @@ msgstr ""
 "ungültig die Klasse auf Matrix zu setzen, außer das Dimensionsattribut hat "
 "Länge 2 (war %d)"
 
-#: src/main/coerce.c:2720
+#: src/main/coerce.c:2768
 msgid ""
 "cannot set class to \"array\" unless the dimension attribute has length > 0"
 msgstr ""
 "Kann Klasse nicht auf \"array\" setzen, außer das Dimensionsattribut hat "
 "eine Länge > 0"
 
-#: src/main/coerce.c:2756
+#: src/main/coerce.c:2804
 msgid "'value' must be non-null character string"
 msgstr "'value' muss eine nicht-Null Zeichenkette sein"
 
-#: src/main/coerce.c:2769
+#: src/main/coerce.c:2817
 msgid "invalid to change the storage mode of a factor"
 msgstr "unzulässig den Speichermodus eines Faktors zu ändern"
 
@@ -1709,459 +1745,458 @@ msgstr "nicht implementierte komplexe Operation"
 msgid "non-numeric argument to function"
 msgstr "nicht-numerisches Argument für Funktion"
 
-#: src/main/complex.c:827
+#: src/main/complex.c:830
 msgid "invalid polynomial coefficient"
 msgstr "ungültiger Polynomialkoeffizient"
 
-#: src/main/complex.c:832
+#: src/main/complex.c:835
 msgid "root finding code failed"
 msgstr "Nullstellensuche fehlgeschlagen"
 
-#: src/main/connections.c:153
+#: src/main/connections.c:150
 msgid "all connections are in use"
 msgstr "alle Verbindungen werden benutzt"
 
-#: src/main/connections.c:164
+#: src/main/connections.c:161
 msgid "connection not found"
 msgstr "Verbindung nicht gefunden"
 
-#: src/main/connections.c:175
+#: src/main/connections.c:172
 msgid "invalid connection"
 msgstr "ungültige Verbindung"
 
-#: src/main/connections.c:207
+#: src/main/connections.c:204
 #, c-format
 msgid "closing unused connection %d (%s)\n"
 msgstr "ungenutzte Verbindung %d (%s) geschlossen\n"
 
-#: src/main/connections.c:232 src/main/sysutils.c:619 src/main/sysutils.c:806
-#: src/main/sysutils.c:821 src/main/sysutils.c:912 src/main/sysutils.c:927
-#: src/main/sysutils.c:1023 src/main/sysutils.c:1096 src/main/sysutils.c:1106
-#: src/main/sysutils.c:1119 src/main/sysutils.c:1516
+#: src/main/connections.c:229 src/main/sysutils.c:625 src/main/sysutils.c:828
+#: src/main/sysutils.c:843 src/main/sysutils.c:972 src/main/sysutils.c:1045
+#: src/main/sysutils.c:1055 src/main/sysutils.c:1068 src/main/sysutils.c:1466
 #, c-format
 msgid "unsupported conversion from '%s' to '%s'"
 msgstr "nicht unterstützte Umwandlung von '%s' nach '%s'"
 
-#: src/main/connections.c:288 src/main/connections.c:304
-#: src/main/connections.c:456 src/main/connections.c:462
-#: src/main/connections.c:468 src/main/connections.c:479
-#: src/main/connections.c:486
+#: src/main/connections.c:285 src/main/connections.c:300
+#: src/main/connections.c:451 src/main/connections.c:456
+#: src/main/connections.c:461 src/main/connections.c:472
+#: src/main/connections.c:478
 #, c-format
 msgid "%s not enabled for this connection"
 msgstr "%s für diese Verbindung nicht ermöglicht"
 
-#: src/main/connections.c:335 src/main/connections.c:352
-#: src/main/connections.c:2916
+#: src/main/connections.c:330 src/main/connections.c:347
+#: src/main/connections.c:2910
 msgid "printing of extremely long output is truncated"
-msgstr "Druck von extrem langer Ausgabe wird abgeschnitten"
+msgstr "Ausdruck extrem langer Ausgabe wird abgeschnitten"
 
-#: src/main/connections.c:375
+#: src/main/connections.c:370
 msgid "invalid char string in output conversion"
 msgstr "ungültige Zeichenkette in Konvertierung der Ausgabe"
 
-#: src/main/connections.c:439
+#: src/main/connections.c:434
 #, c-format
 msgid "invalid input found on input connection '%s'"
 msgstr "ungültige Eingabe gefunden in der Eingabeverbindung '%s'"
 
-#: src/main/connections.c:580
+#: src/main/connections.c:571
 #, c-format
 msgid "cannot open file '%ls': %s"
 msgstr "kann Datei '%ls' nicht öffnen: %s"
 
-#: src/main/connections.c:691
+#: src/main/connections.c:683
 msgid "connection is not open for reading"
 msgstr "Verbindung nicht zum Lesen geöffnet"
 
-#: src/main/connections.c:696
+#: src/main/connections.c:688
 msgid "connection is not open for writing"
 msgstr "Verbindung nicht zum Schreiben geöffnet"
 
-#: src/main/connections.c:734 src/main/connections.c:2229
+#: src/main/connections.c:726 src/main/connections.c:2223
 msgid "can only truncate connections open for writing"
 msgstr ""
 "nur bei zum Schreiben geöffneten Verbindungen kann abgeschnitten werden"
 
-#: src/main/connections.c:738 src/main/connections.c:740
+#: src/main/connections.c:730 src/main/connections.c:732
 msgid "file truncation failed"
 msgstr "Abschneiden der Datei fehlgeschlagen"
 
-#: src/main/connections.c:742
+#: src/main/connections.c:734
 msgid "file truncation unavailable on this platform"
 msgstr "Abschneiden einer Datei auf dieser Plattform nicht verfügbar"
 
-#: src/main/connections.c:788 src/main/connections.c:792
-#: src/main/connections.c:798 src/main/connections.c:815
+#: src/main/connections.c:780 src/main/connections.c:784
+#: src/main/connections.c:790 src/main/connections.c:807
 msgid "allocation of file connection failed"
 msgstr "Allokation einer Dateiverbindung fehlgeschlagen"
 
-#: src/main/connections.c:866 src/main/connections.c:1044
+#: src/main/connections.c:858 src/main/connections.c:1035
 #, c-format
 msgid "cannot create fifo '%s', reason '%s'"
 msgstr "kann fifo '%s' nicht erzeugen. Grund '%s'"
 
-#: src/main/connections.c:872
+#: src/main/connections.c:864
 #, c-format
 msgid "'%s' exists but is not a fifo"
 msgstr "'%s' existiert, aber ist kein fifo"
 
-#: src/main/connections.c:886
+#: src/main/connections.c:878
 #, c-format
 msgid "fifo '%s' is not ready"
 msgstr "fifo '%s' ist nicht bereit"
 
-#: src/main/connections.c:887
+#: src/main/connections.c:879
 #, c-format
 msgid "cannot open fifo '%s'"
 msgstr "kann fifo '%s' nicht öffnen"
 
-#: src/main/connections.c:928 src/main/connections.c:939
-#: src/main/connections.c:1104 src/main/connections.c:1123
-#: src/main/connections.c:1531 src/main/connections.c:1541
-#: src/main/connections.c:1660 src/main/connections.c:1720
-#: src/main/connections.c:2246 src/main/connections.c:2263
-#: src/main/connections.c:2572 src/main/connections.c:5305
-#: src/main/connections.c:5369
+#: src/main/connections.c:920 src/main/connections.c:931
+#: src/main/connections.c:1095 src/main/connections.c:1114
+#: src/main/connections.c:1524 src/main/connections.c:1534
+#: src/main/connections.c:1653 src/main/connections.c:1713
+#: src/main/connections.c:2240 src/main/connections.c:2257
+#: src/main/connections.c:2566 src/main/connections.c:5393
+#: src/main/connections.c:5457
 msgid "too large a block specified"
 msgstr "zu großer Block spezifiziert"
 
-#: src/main/connections.c:998 src/main/connections.c:1004
+#: src/main/connections.c:989 src/main/connections.c:995
 msgid "allocation of fifo name failed"
-msgstr "Allokation des FIFO Namens fehlgeschlagen"
+msgstr "Allokation des fifo-Namens fehlgeschlagen"
 
-#: src/main/connections.c:1066
+#: src/main/connections.c:1057
 #, c-format
 msgid "cannot open fifo '%s', reason '%s'"
-msgstr "kann FIFO '%s' nicht öffnen. Grund '%s'"
+msgstr "kann fifo '%s' nicht öffnen. Grund '%s'"
 
-#: src/main/connections.c:1107 src/main/connections.c:1131
+#: src/main/connections.c:1098 src/main/connections.c:1122
 msgid "allocation of fifo buffer failed"
-msgstr "Allokation des FIFO Buffers fehlgeschlagen"
+msgstr "Allokation des fifo-Buffers fehlgeschlagen"
 
-#: src/main/connections.c:1139
+#: src/main/connections.c:1130
 #, c-format
 msgid "cannot write FIFO '%s'"
-msgstr "kann nicht in FIFO  '%s' schreiben"
+msgstr "kann nicht in fifo '%s' schreiben"
 
-#: src/main/connections.c:1175 src/main/connections.c:1179
-#: src/main/connections.c:1185 src/main/connections.c:1201
+#: src/main/connections.c:1166 src/main/connections.c:1170
+#: src/main/connections.c:1176 src/main/connections.c:1192
 msgid "allocation of fifo connection failed"
-msgstr "Allokation der fifo Verbindung fehlgeschlagen"
+msgstr "Allokation der fifo-Verbindung fehlgeschlagen"
 
-#: src/main/connections.c:1219 src/main/connections.c:1377
-#: src/main/connections.c:1998 src/main/connections.c:3212
-#: src/main/connections.c:4967
+#: src/main/connections.c:1210 src/main/connections.c:1369
+#: src/main/connections.c:1991 src/main/connections.c:3209
+#: src/main/connections.c:4977
 msgid "only first element of 'description' argument used"
 msgstr "nur das erste Element von 'description' benutzt"
 
-#: src/main/connections.c:1236
+#: src/main/connections.c:1227
 msgid ""
 "fifo(\"\") only supports open = \"w+\" and open = \"w+b\": using the former"
 msgstr ""
 "fifo(\"\") unterstützt nur open = \"w+\" und open = \"w+b\": Ersteres wird "
 "verwendet"
 
-#: src/main/connections.c:1250 src/main/connections.c:1414
-#: src/main/connections.c:2064 src/main/connections.c:3179
-#: src/main/connections.c:3232 src/main/connections.c:3280
-#: src/main/connections.c:3567 src/main/connections.c:3683
-#: src/main/connections.c:3844 src/main/connections.c:4095
-#: src/main/connections.c:4423 src/main/connections.c:4543
-#: src/main/connections.c:4755 src/main/connections.c:5105 src/main/dcf.c:94
-#: src/main/deparse.c:352 src/main/deparse.c:438 src/main/saveload.c:2267
-#: src/main/saveload.c:2350 src/main/scan.c:933 src/main/serialize.c:2175
-#: src/main/serialize.c:2226 src/main/source.c:265
+#: src/main/connections.c:1242 src/main/connections.c:1407
+#: src/main/connections.c:2058 src/main/connections.c:3176
+#: src/main/connections.c:3230 src/main/connections.c:3278
+#: src/main/connections.c:3565 src/main/connections.c:3681
+#: src/main/connections.c:3843 src/main/connections.c:4099
+#: src/main/connections.c:4427 src/main/connections.c:4547
+#: src/main/connections.c:4759 src/main/connections.c:5193 src/main/dcf.c:94
+#: src/main/deparse.c:360 src/main/deparse.c:449 src/main/saveload.c:2267
+#: src/main/saveload.c:2348 src/main/scan.c:933 src/main/serialize.c:2216
+#: src/main/serialize.c:2267 src/main/source.c:270
 msgid "cannot open the connection"
 msgstr "kann Verbindung nicht öffnen"
 
-#: src/main/connections.c:1265
+#: src/main/connections.c:1257
 msgid "fifo connections are not available on this system"
-msgstr "fifo Verbindungen sind auf diesem System nicht verfügbar"
+msgstr "fifo-Verbindungen sind auf diesem System nicht verfügbar"
 
-#: src/main/connections.c:1295
+#: src/main/connections.c:1287
 #, c-format
 msgid "cannot pipe() cmd '%ls': %s"
 msgstr "kann pipe() cmd '%ls': %s nicht öffnen"
 
-#: src/main/connections.c:1302
+#: src/main/connections.c:1294
 #, c-format
 msgid "cannot open pipe() cmd '%s': %s"
 msgstr "kann pipe() cmd '%s': %s nicht öffnen"
 
-#: src/main/connections.c:1471 src/main/connections.c:1791
+#: src/main/connections.c:1464 src/main/connections.c:1784
 #, c-format
 msgid "cannot open compressed file '%s', probable reason '%s'"
 msgstr "kann komprimierte Datei '%s' nicht öffnen. Grund evtl. '%s'"
 
-#: src/main/connections.c:1511
+#: src/main/connections.c:1504
 msgid "whence = \"end\" is not implemented for gzfile connections"
 msgstr "whence =\"end\" für gzfile Verbindungen nicht implementiert"
 
-#: src/main/connections.c:1516
+#: src/main/connections.c:1509
 msgid "seek on a gzfile connection returned an internal error"
 msgstr "seek in einer gzfile Verbindung gab internen Fehler zurück"
 
-#: src/main/connections.c:1550 src/main/connections.c:1554
-#: src/main/connections.c:1560 src/main/connections.c:1577
+#: src/main/connections.c:1543 src/main/connections.c:1547
+#: src/main/connections.c:1553 src/main/connections.c:1570
 msgid "allocation of gzfile connection failed"
 msgstr "Allokation einer gzfile Verbindung fehlgeschlagen"
 
-#: src/main/connections.c:1606
+#: src/main/connections.c:1599
 #, c-format
 msgid "cannot open bzip2-ed file '%s', probable reason '%s'"
 msgstr "kann bzip2-ed Datei '%s' nicht öffnen. Grund evtl. '%s'"
 
-#: src/main/connections.c:1615
+#: src/main/connections.c:1608
 #, c-format
 msgid "file '%s' appears not to be compressed by bzip2"
 msgstr "Datei '%s' scheint nicht mit bzip2 komprimiert zu sein"
 
-#: src/main/connections.c:1624
+#: src/main/connections.c:1617
 #, c-format
 msgid "initializing bzip2 compression for file '%s' failed"
 msgstr ""
 "Initialisierung der bzip2-Kompression für Datei '%s' ist fehlgeschlagen"
 
-#: src/main/connections.c:1678
+#: src/main/connections.c:1671
 msgid "allocation of overflow buffer for bzfile failed"
-msgstr "Allokation des overflow buffers für bzfile fehlgeschlagen"
+msgstr "Allokation des Overflow-Puffers für bzfile fehlgeschlagen"
 
-#: src/main/connections.c:1685
+#: src/main/connections.c:1678
 #, c-format
 msgid ""
 "file '%s' has trailing content that appears not to be compressed by bzip2"
 msgstr ""
 "Datei '%s' endet mit Inhalt, der nicht mit bzip2 komprimiert zu sein scheint"
 
-#: src/main/connections.c:1731 src/main/connections.c:1735
-#: src/main/connections.c:1741 src/main/connections.c:1758
+#: src/main/connections.c:1724 src/main/connections.c:1728
+#: src/main/connections.c:1734 src/main/connections.c:1751
 msgid "allocation of bzfile connection failed"
-msgstr "Allokation einer bzfile Verbindung fehlgeschlagen"
+msgstr "Allokation einer bzfile-Verbindung fehlgeschlagen"
 
-#: src/main/connections.c:1804 src/main/connections.c:5961
+#: src/main/connections.c:1797 src/main/connections.c:6050
 #, c-format
 msgid "cannot initialize lzma decoder, error %d"
 msgstr "kann den lzma Dekodierer nicht initialisieren, Fehler %d"
 
-#: src/main/connections.c:1820
+#: src/main/connections.c:1813
 #, c-format
 msgid "cannot initialize lzma encoder, error %d"
-msgstr "kann den lzma Kodierer nicht initialisieren, Fehler %d"
+msgstr "kann den lzma-Kodierer nicht initialisieren, Fehler %d"
 
-#: src/main/connections.c:1948 src/main/connections.c:1952
-#: src/main/connections.c:1958 src/main/connections.c:1976
+#: src/main/connections.c:1941 src/main/connections.c:1945
+#: src/main/connections.c:1951 src/main/connections.c:1969
 msgid "allocation of xzfile connection failed"
 msgstr "Allokation einer xzfile Verbindung fehlgeschlagen"
 
-#: src/main/connections.c:2035
+#: src/main/connections.c:2028
 #, c-format
 msgid "this is a %s-compressed file which this build of R does not support"
 msgstr ""
 "dies ist eine %s-komprimierte Datei, die in diesem R Binary nicht "
 "unterstützt wird"
 
-#: src/main/connections.c:2130 src/modules/X11/devX11.c:3375
+#: src/main/connections.c:2124 src/modules/X11/devX11.c:3375
 msgid "memory allocation to copy clipboard failed"
 msgstr "Allokation von Speicher für Kopie der Zwischenablage fehlgeschlagen"
 
-#: src/main/connections.c:2135 src/modules/X11/devX11.c:3354
+#: src/main/connections.c:2129 src/modules/X11/devX11.c:3354
 #: src/modules/X11/devX11.c:3359
 msgid "clipboard cannot be opened or contains no text"
 msgstr "Zwischenablage kann nicht geöffnet werden oder enthält keinen Text"
 
-#: src/main/connections.c:2146
+#: src/main/connections.c:2140
 msgid "memory allocation to open clipboard failed"
-msgstr "Allokation von Speicher um die Zwischenablage zu öffnen fehlgeschlagen"
+msgstr "Allokation von Speicher zum Öffnen der Zwischenablage fehlgeschlagen"
 
-#: src/main/connections.c:2174
+#: src/main/connections.c:2168
 msgid "unable to open the clipboard"
 msgstr "kann die Zwischenablage nicht öffnen"
 
-#: src/main/connections.c:2178
+#: src/main/connections.c:2172
 msgid "unable to write to the clipboard"
 msgstr "kann nicht in die Zwischenablage schreiben"
 
-#: src/main/connections.c:2218
+#: src/main/connections.c:2212
 msgid "attempt to seek outside the range of the clipboard"
 msgstr "Versuch den Bereich der Zwischenablage zu verlassen"
 
-#: src/main/connections.c:2261
+#: src/main/connections.c:2255
 msgid "clipboard connection is open for reading only"
 msgstr "Verbindung zur Zwischenablage ist nur zum Lesen geöffnet"
 
-#: src/main/connections.c:2281
+#: src/main/connections.c:2275
 msgid "clipboard buffer is full and output lost"
-msgstr "Zwischenablage-buffer ist voll und Teil der Ausgabe verloren"
+msgstr "Puffer der Zwischenablage ist voll und ein Teil der Ausgabe ging verloren"
 
-#: src/main/connections.c:2302
+#: src/main/connections.c:2296
 msgid "'mode' for the clipboard must be 'r' or 'w'"
 msgstr "'mode' für die Zwischenablage muss entweder 'r' oder 'w' sein"
 
-#: src/main/connections.c:2305
+#: src/main/connections.c:2299
 msgid "'mode' for the clipboard must be 'r' on Unix"
 msgstr "'mode' für die Zwischenablage muss unter Unix 'r' sein"
 
-#: src/main/connections.c:2308 src/main/connections.c:2314
-#: src/main/connections.c:2320 src/main/connections.c:2337
+#: src/main/connections.c:2302 src/main/connections.c:2308
+#: src/main/connections.c:2314 src/main/connections.c:2331
 msgid "allocation of clipboard connection failed"
 msgstr "Allokation einer Zwischenablage-Verbindung fehlgeschlagen"
 
-#: src/main/connections.c:2406 src/main/connections.c:2410
-#: src/main/connections.c:2416
+#: src/main/connections.c:2400 src/main/connections.c:2404
+#: src/main/connections.c:2410
 msgid "allocation of terminal connection failed"
-msgstr "Allokation einer Terminal Verbindung fehlgeschlagen"
+msgstr "Allokation einer Terminal-Verbindung fehlgeschlagen"
 
-#: src/main/connections.c:2549
+#: src/main/connections.c:2543
 msgid "attempting to add too many elements to raw vector"
-msgstr "Versuch einem raw Vektor zu viele Elements hinzuzufügen"
+msgstr "Versuch einem raw Vektor zu viele Elemente hinzuzufügen"
 
-#: src/main/connections.c:2601
+#: src/main/connections.c:2595
 msgid "attempt to seek outside the range of the raw connection"
-msgstr "Versuch außerhalb des Bereichs einer raw connection zuzugreifen"
+msgstr "Versuch außerhalb des Bereichs einer raw-Verbindung zuzugreifen"
 
-#: src/main/connections.c:2612 src/main/connections.c:2616
-#: src/main/connections.c:2622 src/main/connections.c:2648
+#: src/main/connections.c:2606 src/main/connections.c:2610
+#: src/main/connections.c:2616 src/main/connections.c:2642
 msgid "allocation of raw connection failed"
 msgstr "Allokation einer raw-Verbindung fehlgeschlagen"
 
-#: src/main/connections.c:2701
+#: src/main/connections.c:2695
 msgid "'con' is not a rawConnection"
 msgstr "'con' ist keine raw-Verbindung"
 
-#: src/main/connections.c:2704
+#: src/main/connections.c:2698
 msgid "'con' is not an output rawConnection"
 msgstr "'con' ist keine Ausgabe-Verbindung vom raw Typ"
 
-#: src/main/connections.c:2742
+#: src/main/connections.c:2736
 msgid "too many characters for text connection"
-msgstr "zu viele Zeichen für eine Textverbindung"
+msgstr "zu viele Zeichen für eine Text-Verbindung"
 
-#: src/main/connections.c:2747
+#: src/main/connections.c:2741
 msgid "cannot allocate memory for text connection"
-msgstr "kann keinen Speicher für Textverbindung zuweisen"
+msgstr "kann keinen Speicher für Text-Verbindung zuweisen"
 
-#: src/main/connections.c:2796
+#: src/main/connections.c:2790
 msgid "seek is not relevant for text connection"
-msgstr "seek ist nicht relevant für Textverbindungen"
+msgstr "seek ist nicht relevant für Text-Verbindungen"
 
-#: src/main/connections.c:2804 src/main/connections.c:2808
-#: src/main/connections.c:2814 src/main/connections.c:2827
-#: src/main/connections.c:3012 src/main/connections.c:3016
-#: src/main/connections.c:3022 src/main/connections.c:3035
-#: src/main/connections.c:3041
+#: src/main/connections.c:2798 src/main/connections.c:2802
+#: src/main/connections.c:2808 src/main/connections.c:2821
+#: src/main/connections.c:3008 src/main/connections.c:3012
+#: src/main/connections.c:3018 src/main/connections.c:3031
+#: src/main/connections.c:3037
 msgid "allocation of text connection failed"
 msgstr "Allokation einer Textverbindung fehlgeschlagen"
 
-#: src/main/connections.c:2989
+#: src/main/connections.c:2983
 msgid "text connection: appending to a non-existent char vector"
-msgstr "Text Verbindung: Anhängen an nicht existierenden Charakter Vektor"
+msgstr "Text-Verbindung: Anhängen an nicht existierenden Zeichenkettenvektor"
 
-#: src/main/connections.c:3093
+#: src/main/connections.c:3089
 msgid "unsupported mode"
 msgstr "nicht unterstützter Modus"
 
-#: src/main/connections.c:3115
+#: src/main/connections.c:3111
 msgid "'con' is not a textConnection"
 msgstr "'con' ist keine Text-Verbindung"
 
-#: src/main/connections.c:3118
+#: src/main/connections.c:3114
 msgid "'con' is not an output textConnection"
 msgstr "'con' ist keine Ausgabe-Textverbindung"
 
-#: src/main/connections.c:3192
+#: src/main/connections.c:3189
 msgid "sockets are not available on this system"
 msgstr "Sockets sind auf diesem System nicht verfügbar"
 
-#: src/main/connections.c:3260 src/main/connections.c:3309
-#: src/main/connections.c:3320 src/main/connections.c:3367
-#: src/main/connections.c:3392 src/main/connections.c:3415
-#: src/main/connections.c:3427 src/main/connections.c:3543
-#: src/main/connections.c:3668 src/main/connections.c:5408
+#: src/main/connections.c:3258 src/main/connections.c:3307
+#: src/main/connections.c:3318 src/main/connections.c:3365
+#: src/main/connections.c:3390 src/main/connections.c:3413
+#: src/main/connections.c:3425 src/main/connections.c:3541
+#: src/main/connections.c:3666 src/main/connections.c:5496
 msgid "'con' is not a connection"
 msgstr "'con' ist keine Verbindung"
 
-#: src/main/connections.c:3263
+#: src/main/connections.c:3261
 msgid "cannot open standard connections"
 msgstr "kann die Standardverbindungen nicht öffnen"
 
-#: src/main/connections.c:3265
+#: src/main/connections.c:3263
 msgid "connection is already open"
 msgstr "Verbindung bereits geöffnet"
 
-#: src/main/connections.c:3298
+#: src/main/connections.c:3296
 msgid "unknown 'rw' value"
 msgstr "unbekannter 'rw' Wert"
 
-#: src/main/connections.c:3369
+#: src/main/connections.c:3367
 msgid "cannot close standard connections"
 msgstr "kann Standardverbindungen nicht schließen"
 
-#: src/main/connections.c:3372
+#: src/main/connections.c:3370
 msgid "cannot close 'output' sink connection"
 msgstr "kann 'outout' Verbindung  für sink nicht schließen"
 
-#: src/main/connections.c:3374
+#: src/main/connections.c:3372
 msgid "cannot close 'message' sink connection"
 msgstr "kann die 'message' Verbindung für sink nicht schließen"
 
-#: src/main/connections.c:3394 src/main/connections.c:5123
-#: src/main/connections.c:5131 src/main/serialize.c:1996
-#: src/main/serialize.c:2004
+#: src/main/connections.c:3392 src/main/connections.c:5211
+#: src/main/connections.c:5219 src/main/serialize.c:2035
+#: src/main/serialize.c:2043
 msgid "connection is not open"
 msgstr "Verbindung ist nicht geöffnet"
 
-#: src/main/connections.c:3490 src/main/connections.c:3502
+#: src/main/connections.c:3488 src/main/connections.c:3500
 msgid "line longer than buffer size"
 msgstr "Zeile länger als Buffergröße"
 
-#: src/main/connections.c:3574 src/main/connections.c:3576
-#: src/main/connections.c:3852 src/main/connections.c:4406
-#: src/main/connections.c:4431 src/main/connections.c:5132 src/main/dcf.c:101
-#: src/main/scan.c:936 src/main/scan.c:940 src/main/serialize.c:1998
-#: src/main/source.c:272
+#: src/main/connections.c:3572 src/main/connections.c:3574
+#: src/main/connections.c:3851 src/main/connections.c:4410
+#: src/main/connections.c:4435 src/main/connections.c:5220 src/main/dcf.c:101
+#: src/main/scan.c:936 src/main/scan.c:940 src/main/serialize.c:2037
+#: src/main/source.c:277
 msgid "cannot read from this connection"
 msgstr "kann aus dieser Verbindung nicht lesen"
 
-#: src/main/connections.c:3588 src/main/connections.c:3610
+#: src/main/connections.c:3586 src/main/connections.c:3608
 msgid "cannot allocate buffer in readLines"
 msgstr "kann Buffer in readLines nicht allozieren"
 
-#: src/main/connections.c:3623
+#: src/main/connections.c:3621
 #, c-format
 msgid "line %d appears to contain an embedded nul"
 msgstr "Zeile %d scheint ein nul Zeichen zu enthalten"
 
-#: src/main/connections.c:3640
+#: src/main/connections.c:3638
 #, c-format
 msgid "incomplete final line found on '%s'"
 msgstr "unvollständige letzte Zeile in '%s' gefunden"
 
-#: src/main/connections.c:3646
+#: src/main/connections.c:3644
 msgid "too few lines read in readLines"
 msgstr "zu wenig Zeilen gelesen in readLines"
 
-#: src/main/connections.c:3749
+#: src/main/connections.c:3748
 msgid "incomplete string at end of file has been discarded"
 msgstr "unvollständige Zeichenkette am Ende der Datei wurde verworfen"
 
-#: src/main/connections.c:3755
+#: src/main/connections.c:3754
 msgid "null terminator not found: breaking string at 10000 bytes"
 msgstr ""
 "Null Terminator nicht gefunden: Zeichenkette bei 10000 Zeichen abgebrochen"
 
-#: src/main/connections.c:3820
+#: src/main/connections.c:3819
 msgid "can only read from a binary connection"
 msgstr "kann nur aus binärer Verbindung lesen"
 
-#: src/main/connections.c:3869 src/main/connections.c:4176
+#: src/main/connections.c:3868 src/main/connections.c:4180
 msgid "size changing is not supported for complex vectors"
 msgstr "Ändern der Größe für komplexe Vektoren nicht unterstützt"
 
 #: src/main/connections.c:3907 src/main/connections.c:3925
-#: src/main/connections.c:3951 src/main/connections.c:4010
-#: src/main/connections.c:4030 src/main/connections.c:4157
-#: src/main/connections.c:4170 src/main/connections.c:4229
-#: src/main/connections.c:4261
+#: src/main/connections.c:3951 src/main/connections.c:4013
+#: src/main/connections.c:4034 src/main/connections.c:4161
+#: src/main/connections.c:4174 src/main/connections.c:4233
+#: src/main/connections.c:4265
 #, c-format
 msgid "size %d is unknown on this machine"
 msgstr "Größe %d ist auf dieser Maschine unbekannt"
@@ -2174,228 +2209,232 @@ msgstr "raw hat immer Größe 1"
 msgid "'signed = FALSE' is only valid for integers of sizes 1 and 2"
 msgstr "'signed = FALSE' ist nur für Integer der Größe 1 oder 2 zulässig"
 
-#: src/main/connections.c:4060
+#: src/main/connections.c:4064
 msgid "'x' is not an atomic vector type"
-msgstr "'x' ist kein atomarer Vektor Typ"
+msgstr "'x' ist kein atomarer Vektortyp"
 
-#: src/main/connections.c:4066
+#: src/main/connections.c:4070
 msgid "can only write to a binary connection"
 msgstr "kann nur in binäre Verbindungen schreiben"
 
-#: src/main/connections.c:4085
+#: src/main/connections.c:4089
 msgid "only 2^31-1 bytes can be written to a raw vector"
 msgstr "lediglich 2^31-1 Bytes können in einen raw vector geschrieben werden"
 
-#: src/main/connections.c:4087
+#: src/main/connections.c:4091
 msgid "only 2^31-1 bytes can be written in a single writeBin() call"
 msgstr ""
-"lediglich 2^31 -1 Bytes können in einem einzelnen aufruf von writeBin() "
+"lediglich 2^31 -1 Bytes können in einem einzelnen Aufruf von writeBin() "
 "geschrieben werden"
 
-#: src/main/connections.c:4136 src/main/connections.c:4289
-#: src/main/connections.c:4570 src/main/connections.c:4610
+#: src/main/connections.c:4140 src/main/connections.c:4293
+#: src/main/connections.c:4574 src/main/connections.c:4614
 msgid "problem writing to connection"
 msgstr "Problem beim Schreiben in Verbindung"
 
-#: src/main/connections.c:4181
+#: src/main/connections.c:4185
 msgid "size changing is not supported for raw vectors"
 msgstr "Ändern der Größe nicht unterstützt für raw Vektoren"
 
-#: src/main/connections.c:4324 src/main/connections.c:4328
-#: src/main/connections.c:4367
+#: src/main/connections.c:4328 src/main/connections.c:4332
+#: src/main/connections.c:4371
 msgid "invalid UTF-8 input in readChar()"
-msgstr "ungültige UTF-8 Eingabe in readChar()"
+msgstr "ungültige UTF-8-Eingabe in readChar()"
 
-#: src/main/connections.c:4434
+#: src/main/connections.c:4438
 msgid "can only read in bytes in a non-UTF-8 MBCS locale"
 msgstr "kann Bytes nur in nicht-UTF-8 MBCS Lokalisierungen lesen"
 
-#: src/main/connections.c:4506
+#: src/main/connections.c:4510
 msgid "'object' is too short"
 msgstr "'object' ist zu kurz"
 
-#: src/main/connections.c:4559
+#: src/main/connections.c:4563
 msgid "writeChar: more bytes requested than are in the string - will zero-pad"
 msgstr ""
 "writeChar: mehr Zeichen verlangt als in Zeichenkette vorhanden - fülle mit "
 "Nullen auf"
 
-#: src/main/connections.c:4584
+#: src/main/connections.c:4588
 msgid ""
 "writeChar: more characters requested than are in the string - will zero-pad"
 msgstr ""
 "writeChar: mehr Zeichen verlangt als in Zeichenkette vorhanden - fülle mit "
 "Nullen auf"
 
-#: src/main/connections.c:4638
+#: src/main/connections.c:4642
 msgid "maximum number of pushback lines exceeded"
 msgstr "maximale Anzahl von pushback Zeilen überschritten"
 
-#: src/main/connections.c:4644 src/main/connections.c:4648
-#: src/main/connections.c:4685 src/main/connections.c:4693
+#: src/main/connections.c:4648 src/main/connections.c:4652
+#: src/main/connections.c:4689 src/main/connections.c:4697
 msgid "could not allocate space for pushback"
 msgstr "konnte keinen Speicher für pushBack allokieren"
 
-#: src/main/connections.c:4676
+#: src/main/connections.c:4680
 msgid "can only push back on open readable connections"
-msgstr "push back geht nur auf offenen lesbaren Verbindungen"
+msgstr "push back geht nur auf offenen, lesbaren Verbindungen"
 
-#: src/main/connections.c:4678
+#: src/main/connections.c:4682
 msgid "can only push back on text-mode connections"
-msgstr "push back geht nur bei Text Verbindungen"
+msgstr "push back geht nur bei Text-Verbindungen"
 
-#: src/main/connections.c:4740 src/main/connections.c:4810
+#: src/main/connections.c:4744 src/main/connections.c:4814
 msgid "sink stack is full"
 msgstr "sink stack ist voll"
 
-#: src/main/connections.c:4743
+#: src/main/connections.c:4747
 msgid "cannot switch output to stdin"
 msgstr "kann Ausgabe nicht auf stdin umleiten"
 
-#: src/main/connections.c:4770
+#: src/main/connections.c:4774
 msgid "no sink to remove"
 msgstr "kein sink zu entfernen"
 
-#: src/main/connections.c:4892
+#: src/main/connections.c:4894
 msgid "there is no connection NA"
 msgstr "Es gibt keine Verbindung NA"
 
-#: src/main/connections.c:4894
+#: src/main/connections.c:4896
 #, c-format
 msgid "there is no connection %d"
 msgstr "Es gibt keine Verbindung %d"
 
-#: src/main/connections.c:5029
+#: src/main/connections.c:5026
+msgid "method = \"wininet\" is only supported on Windows"
+msgstr "method = \"wininet\" wird nur für Windows unterstützt"
+
+#: src/main/connections.c:5116
 msgid ""
 "file(\"\") only supports open = \"w+\" and open = \"w+b\": using the former"
 msgstr ""
 "file(\"\") unterstützt nur open = \"w+\" und open = \"w+b\": Ersteres wird "
 "verwendet"
 
-#: src/main/connections.c:5083 src/modules/internet/internet.c:115
-#: src/modules/internet/internet.c:569
-msgid "unsupported URL scheme"
-msgstr "nicht unterstütztes URL Schema"
+#: src/main/connections.c:5170 src/modules/internet/internet.c:153
+#: src/modules/internet/internet.c:274
+msgid "URL scheme unsupported by this method"
+msgstr "URL-Schema wird von dieser Methode nicht unterstützt"
 
-#: src/main/connections.c:5173
+#: src/main/connections.c:5261
 msgid "file stream does not have gzip magic number"
 msgstr "Dateistrom hat nicht die magic number von gzip"
 
-#: src/main/connections.c:5184
+#: src/main/connections.c:5272
 msgid "file stream does not have valid gzip header"
 msgstr "Dateistrom hat keinen gültigen gzip header"
 
-#: src/main/connections.c:5249
+#: src/main/connections.c:5337
 msgid "writing error whilst flushing 'gzcon' connection"
-msgstr "Schreibfehler während flush auf 'gzcon' Verbindung"
+msgstr "Schreibfehler während flush auf 'gzcon'-Verbindung"
 
-#: src/main/connections.c:5351
+#: src/main/connections.c:5439
 #, c-format
 msgid "crc error %x %x\n"
 msgstr "Checksummenfehler %x %x\n"
 
-#: src/main/connections.c:5378
+#: src/main/connections.c:5466
 msgid "write error on 'gzcon' connection"
 msgstr "Schreibfehler auf 'gzcon' Verbindung"
 
-#: src/main/connections.c:5412
+#: src/main/connections.c:5500
 msgid "'level' must be one of 0 ... 9"
 msgstr "'level' muss aus 0..9 sein"
 
-#: src/main/connections.c:5415
+#: src/main/connections.c:5503
 msgid "'allowNonCompression' must be TRUE or FALSE"
 msgstr "'allowNonCompression' muss entweder TRUE oder FALSE sein"
 
-#: src/main/connections.c:5418
+#: src/main/connections.c:5506
 msgid "this is already a 'gzcon' connection"
 msgstr "dies ist bereits eine 'gzcon' Verbindung"
 
-#: src/main/connections.c:5424
+#: src/main/connections.c:5512
 msgid "can only use read- or write- binary connections"
 msgstr "kann nur entweder read- oder write- binäre Verbindungen benutzen"
 
-#: src/main/connections.c:5427
+#: src/main/connections.c:5515
 msgid "using a text-mode 'file' connection may not work correctly"
 msgstr ""
-"Benutzung einer text-mode 'file' connection arbeitet evtl. nicht korrekt"
+"Benutzung einer text-mode 'file' Verbindung arbeitet evtl. nicht korrekt"
 
-#: src/main/connections.c:5430
+#: src/main/connections.c:5518
 msgid ""
 "cannot create a 'gzcon' connection from a writable textConnection; maybe use "
 "rawConnection"
 msgstr ""
 "kann aus einer schreibbaren textConnection keine 'gzcon' Verbindung "
-"erzeugen; evtl. rawconnection benutzen"
+"erzeugen; evtl. rawConnection benutzen"
 
-#: src/main/connections.c:5433 src/main/connections.c:5437
-#: src/main/connections.c:5444 src/main/connections.c:5458
+#: src/main/connections.c:5521 src/main/connections.c:5525
+#: src/main/connections.c:5532 src/main/connections.c:5546
 msgid "allocation of 'gzcon' connection failed"
 msgstr "Allokation einer 'gzcon' Verbindung fehlgeschlagen"
 
-#: src/main/connections.c:5644
+#: src/main/connections.c:5733
 msgid "not a list of sockets"
 msgstr "keine Liste von Sockets"
 
-#: src/main/connections.c:5649
+#: src/main/connections.c:5738
 msgid "bad write indicators"
 msgstr "unbrauchbare Schreibindikatoren"
 
-#: src/main/connections.c:5660
+#: src/main/connections.c:5749
 msgid "not a socket connection"
 msgstr "keine Socket Verbindung"
 
-#: src/main/connections.c:5905
+#: src/main/connections.c:5994
 msgid "unknown compression, assuming none"
 msgstr "unbekannte Kompression, vermute keine"
 
-#: src/main/connections.c:6023 src/main/connections.c:6027
-#: src/main/connections.c:6033
+#: src/main/connections.c:6112 src/main/connections.c:6116
+#: src/main/connections.c:6122
 #, c-format
 msgid "allocation of %s connection failed"
 msgstr "Allokation einer %s Verbindung fehlgeschlagen"
 
-#: src/main/context.c:282
+#: src/main/context.c:294
 msgid "no loop for break/next, jumping to top level"
 msgstr "keine Schleife abzubrechen, springe zum Top Level"
 
-#: src/main/context.c:290
+#: src/main/context.c:302
 msgid "no function to return from, jumping to top level"
 msgstr "keine Funktion abzubrechen, springe zum Top Level"
 
-#: src/main/context.c:302
+#: src/main/context.c:317
 msgid "target context is not on the stack"
 msgstr "Zielkontext ist nicht im Stack"
 
-#: src/main/context.c:324 src/main/context.c:340 src/main/context.c:407
-#: src/main/context.c:428 src/main/context.c:440 src/main/context.c:452
+#: src/main/context.c:339 src/main/context.c:355 src/main/context.c:422
+#: src/main/context.c:443 src/main/context.c:455 src/main/context.c:467
 msgid "not that many frames on the stack"
 msgstr "nicht so viele einschließende Umgebungen im Stack"
 
-#: src/main/context.c:357
+#: src/main/context.c:372
 msgid "only positive values of 'n' are allowed"
 msgstr "nur positive Werte von 'n' zugelassen"
 
-#: src/main/context.c:478
+#: src/main/context.c:493
 msgid "no function to restart"
 msgstr "keine Funktion für Neustart"
 
-#: src/main/context.c:515
+#: src/main/context.c:530
 msgid "number of contexts must be positive"
 msgstr "Anzahl der Kontexte muss positiv sein"
 
-#: src/main/context.c:528
+#: src/main/context.c:543
 msgid "no browser context to query"
 msgstr "kein Browserkontext für Abfrage"
 
-#: src/main/context.c:546
+#: src/main/context.c:561
 msgid "not that many calls to browser are active"
 msgstr "so viele Browseraufrufe sind nicht aktiv"
 
-#: src/main/context.c:560
+#: src/main/context.c:575
 msgid "not that many functions on the call stack"
 msgstr "nicht so viele Funktionen im Aufrufstack"
 
-#: src/main/context.c:645
+#: src/main/context.c:660
 msgid "internal error in 'do_sys'"
 msgstr "interner Fehler in 'do_sys'"
 
@@ -2403,35 +2442,35 @@ msgstr "interner Fehler in 'do_sys'"
 msgid "integer overflow in 'cumsum'; use 'cumsum(as.numeric(.))'"
 msgstr "Integer-Überlauf in 'cumsum'; nutze 'cumsum(as.numeric(.))'"
 
-#: src/main/cum.c:178
-msgid "'cummin' not defined for complex numbers"
-msgstr "'cummin' für komplexe Zahlen nicht definiert"
-
-#: src/main/cum.c:181
+#: src/main/cum.c:180
 msgid "'cummax' not defined for complex numbers"
 msgstr "'cummax' für komplexe Zahlen nicht definiert"
 
-#: src/main/cum.c:206 src/main/cum.c:230
+#: src/main/cum.c:183
+msgid "'cummin' not defined for complex numbers"
+msgstr "'cummin' für komplexe Zahlen nicht definiert"
+
+#: src/main/cum.c:210 src/main/cum.c:237
 msgid "unknown cumxxx function"
 msgstr "unbekannte cumxxx Funktion"
 
-#: src/main/datetime.c:548 src/main/datetime.c:556 src/main/datetime.c:570
-#: src/main/datetime.c:575
+#: src/main/datetime.c:558 src/main/datetime.c:566 src/main/datetime.c:580
+#: src/main/datetime.c:585
 msgid "problem with setting timezone"
 msgstr "Problem beim Setzen der Zeitzone"
 
-#: src/main/datetime.c:560
+#: src/main/datetime.c:570
 msgid "cannot set timezones on this system"
 msgstr "kann Zeitzonen auf diesem System nicht setzen"
 
-#: src/main/datetime.c:582 src/main/datetime.c:584
+#: src/main/datetime.c:592 src/main/datetime.c:594
 msgid "problem with unsetting timezone"
 msgstr "Problem beim Zurücksetzen der Zeitzone"
 
-#: src/main/datetime.c:804 src/main/datetime.c:806 src/main/datetime.c:901
-#: src/main/datetime.c:1240 src/main/datetime.c:1242
+#: src/main/datetime.c:814 src/main/datetime.c:816 src/main/datetime.c:911
+#: src/main/datetime.c:1257 src/main/datetime.c:1259
 msgid "zero-length component in non-empty \"POSIXlt\" structure"
-msgstr "Komponente der Länge 0 in nicht-leerer \"POSIXlt\" Struktur"
+msgstr "Komponente der Länge 0 in nicht-leerer \"POSIXlt\"-Struktur"
 
 #: src/main/dcf.c:113 src/main/dcf.c:181 src/main/dcf.c:253
 msgid "could not allocate memory for 'read.dcf'"
@@ -2456,71 +2495,80 @@ msgstr "Argument muss ein Abschluss sein"
 msgid "argument must be a function"
 msgstr "Argument muss eine Funktion sein"
 
-#: src/main/debug.c:132 src/main/debug.c:166 src/main/debug.c:224
+#: src/main/debug.c:111
+#, c-format
+msgid "Value for '%s' must be TRUE or FALSE"
+msgstr "Wert für '%s' muss TRUE oder FALSE sein"
+
+#: src/main/debug.c:139 src/main/debug.c:167 src/main/debug.c:237
 msgid "argument must not be a function"
 msgstr "Argument darf keine Funktion sein"
 
-#: src/main/debug.c:135
+#: src/main/debug.c:142
 msgid "cannot trace NULL"
 msgstr "Kann NULL nicht zurückverfolgen"
 
-#: src/main/debug.c:139
+#: src/main/debug.c:146
 msgid "'tracemem' is not useful for promise and environment objects"
 msgstr "'tracemem' ist für Promise- und Umgebungsobjekte nicht sinnvoll"
 
-#: src/main/debug.c:142
+#: src/main/debug.c:149
 msgid "'tracemem' is not useful for weak reference or external pointer objects"
 msgstr ""
 "'tracemem' ist für schwache Referenzen oder externe Zeiger nicht sinnvoll"
 
-#: src/main/debug.c:148 src/main/debug.c:171
+#: src/main/debug.c:178 src/main/debug.c:183
 msgid "R was not compiled with support for memory profiling"
 msgstr "R wurde ohne Unterstützung von Memoryprofiling kompiliert"
 
-#: src/main/deparse.c:152 src/main/sprintf.c:213 src/main/sprintf.c:245
+#: src/main/deparse.c:155 src/main/sprintf.c:216 src/main/sprintf.c:248
 msgid "too few arguments"
 msgstr "zu wenig Argumente"
 
-#: src/main/deparse.c:159
+#: src/main/deparse.c:162
 msgid "invalid 'cutoff' value for 'deparse', using default"
-msgstr "ungültiger 'cutoff' Wert für 'deparse', nutze Standard"
+msgstr "ungültiger 'cutoff'-Wert für 'deparse', nutze Standard"
 
-#: src/main/deparse.c:247
+#: src/main/deparse.c:253
 msgid "deparse of an S4 object will not be source()able"
-msgstr "Deparsed S4 Objekt kann nicht ge-sourced() werden"
+msgstr "Deparsed S4-Objekt kann nicht ge-sourced() werden"
 
-#: src/main/deparse.c:249
+#: src/main/deparse.c:255
 msgid "deparse may be incomplete"
 msgstr "deparse ist evtl. unvollständig"
 
-#: src/main/deparse.c:251
+#: src/main/deparse.c:257
 msgid "deparse may be not be source()able in R < 2.7.0"
 msgstr "deparse evtl. nicht source()bar in R < 2.7.0"
 
-#: src/main/deparse.c:369 src/main/deparse.c:461 src/main/deparse.c:467
+#: src/main/deparse.c:349 src/main/deparse.c:399 src/main/source.c:206
+msgid "'file' must be a character string or connection"
+msgstr "'file' muss eine Zeichenkette oder eine Verbindung sein"
+
+#: src/main/deparse.c:377 src/main/deparse.c:472 src/main/deparse.c:478
 msgid "wrote too few characters"
 msgstr "zu wenig Zeichen geschrieben"
 
-#: src/main/deparse.c:391
+#: src/main/deparse.c:401
 msgid "character arguments expected"
-msgstr "Charakter Argumente erwartet"
+msgstr "Zeichenketten-Argumente erwartet"
 
-#: src/main/deparse.c:394
+#: src/main/deparse.c:404
 msgid "zero-length argument"
 msgstr "Argument der Länge 0"
 
-#: src/main/deparse.c:401
+#: src/main/deparse.c:411
 msgid "'opts' should be small non-negative integer"
 msgstr "'opts' sollte eine kleine nicht-negative ganze Zahl sein"
 
-#: src/main/deparse.c:411 src/main/envir.c:1764 src/main/envir.c:1846
-#: src/main/eval.c:569 src/main/eval.c:1251 src/main/eval.c:3627
-#: src/main/saveload.c:1978 src/main/saveload.c:2309 src/main/serialize.c:2727
+#: src/main/deparse.c:421 src/main/envir.c:1896 src/main/envir.c:1981
+#: src/main/eval.c:568 src/main/eval.c:1332 src/main/eval.c:4127
+#: src/main/saveload.c:1978 src/main/saveload.c:2310 src/main/serialize.c:2773
 #, c-format
 msgid "object '%s' not found"
 msgstr "Objekt '%s' nicht gefunden"
 
-#: src/main/deparse.c:1519
+#: src/main/deparse.c:1573
 msgid "badly formed function expression"
 msgstr "unbrauchbar gebildeter Funktionenausdruck"
 
@@ -2528,250 +2576,233 @@ msgstr "unbrauchbar gebildeter Funktionenausdruck"
 msgid "the base graphics system is not registered"
 msgstr "das Grafiksystem aus base ist nicht registriert"
 
-#: src/main/devices.c:165 src/main/devices.c:172
+#: src/main/devices.c:166 src/main/devices.c:174
 msgid "no active or default device"
 msgstr "kein aktives und kein Standarddevice"
 
-#: src/main/devices.c:385 src/main/devices.c:447
+#: src/main/devices.c:387 src/main/devices.c:449
 msgid "too many open devices"
 msgstr "zu viele offene Devices"
 
-#: src/main/devices.c:474
+#: src/main/devices.c:490
 msgid "not enough memory to allocate device (in GEcreateDevDesc)"
 msgstr "kann nicht genug Speicher für Device zuteilen (in GEcreateDevDesc)"
 
-#: src/main/devices.c:515
+#: src/main/devices.c:531
 msgid "Hit <Return> to see next plot: "
 msgstr "Drücke Eingabetaste für den nächsten Plot:"
 
-#: src/main/dotcode.c:112 src/main/dotcode.c:142
+#: src/main/dotcode.c:127 src/main/dotcode.c:157
 msgid "NULL value passed as symbol address"
-msgstr "NULL Wert als Symboladresse übergeben"
+msgstr "Wert NULL als Symboladresse übergeben"
 
-#: src/main/dotcode.c:133
+#: src/main/dotcode.c:148
 #, c-format
 msgid "Unimplemented type %d in createRSymbolObject"
 msgstr "Nicht implementierter Typ %d in createRSymbolObject"
 
-#: src/main/dotcode.c:147 src/main/dotcode.c:237
+#: src/main/dotcode.c:162 src/main/dotcode.c:260
 #, c-format
 msgid "symbol '%s' is too long"
 msgstr "symbol '%s' ist zu lang"
 
-#: src/main/dotcode.c:159
+#: src/main/dotcode.c:174
 msgid ""
 "first argument must be a string (of length 1) or native symbol reference"
 msgstr ""
 "das erste Argument muss entweder Zeichenkette (der Länge 1) oder native "
 "Symbolreferenz sein"
 
-#: src/main/dotcode.c:201 src/main/dotcode.c:563
+#: src/main/dotcode.c:224 src/main/dotcode.c:1240
 msgid "too many arguments in foreign function call"
 msgstr "zu viele Argumente im externen Funktionsaufruf"
 
-#: src/main/dotcode.c:213
+#: src/main/dotcode.c:236
 msgid "PACKAGE = \"\" is invalid"
 msgstr "PACKAGE = \"\" ist ungültig"
 
-#: src/main/dotcode.c:269 src/main/dotcode.c:274 src/main/dotcode.c:279
-#: src/main/dotcode.c:284
+#: src/main/dotcode.c:292 src/main/dotcode.c:297 src/main/dotcode.c:302
+#: src/main/dotcode.c:307
 #, c-format
 msgid "\"%s\" not available for %s() for package \"%s\""
 msgstr "'%s' ist nicht verfügbar für %s() aus Paket \"%s\""
 
-#: src/main/dotcode.c:289
+#: src/main/dotcode.c:312
 #, c-format
 msgid "%s symbol name \"%s\" not in DLL for package \"%s\""
 msgstr "%s Symbolname \"%s\" nicht in der DLL für Paket \"%s\""
 
-#: src/main/dotcode.c:294
+#: src/main/dotcode.c:317
 #, c-format
 msgid "%s symbol name \"%s\" not in load table"
 msgstr "%s Symbolname \"%s\" nicht in Ladeliste"
 
-#: src/main/dotcode.c:348 src/main/dotcode.c:352 src/main/dotcode.c:362
-#: src/main/dotcode.c:427 src/main/dotcode.c:434
+#: src/main/dotcode.c:368 src/main/dotcode.c:370 src/main/dotcode.c:380
+#: src/main/dotcode.c:445 src/main/dotcode.c:452
 #, c-format
 msgid "'%s' used more than once"
 msgstr "'%s' mehr als einmal benutzt"
 
-#: src/main/dotcode.c:358
+#: src/main/dotcode.c:376
 msgid "DLL name is too long"
-msgstr "DLL Name ist zu lang"
+msgstr "DLL-Name ist zu lang"
 
-#: src/main/dotcode.c:403
+#: src/main/dotcode.c:421
 msgid "PACKAGE argument must be a single character string"
-msgstr "PACKAGE Argument muss eine einfache Zeichenkette sein"
+msgstr "Argument PACKAGE muss eine einfache Zeichenkette sein"
 
-#: src/main/dotcode.c:409
+#: src/main/dotcode.c:427
 msgid "PACKAGE argument is too long"
-msgstr "PACKAGE Argument ist zu lang"
+msgstr "Argument PACKAGE ist zu lang"
 
-#: src/main/dotcode.c:474
+#: src/main/dotcode.c:492
 msgid "no arguments supplied"
 msgstr "keine Argumente angegeben"
 
-#: src/main/dotcode.c:475 src/main/seq.c:913
+#: src/main/dotcode.c:493 src/main/seq.c:911
 msgid "too many arguments"
 msgstr "zu viele Argumente"
 
-#: src/main/dotcode.c:512 src/main/dotcode.c:554 src/main/dotcode.c:1397
+#: src/main/dotcode.c:530 src/main/dotcode.c:1232 src/main/dotcode.c:1420
 msgid "'.NAME' is missing"
 msgstr "'.NAME' fehlt"
 
-#: src/main/dotcode.c:521 src/main/dotcode.c:570 src/main/dotcode.c:1418
+#: src/main/dotcode.c:539 src/main/dotcode.c:1247 src/main/dotcode.c:1441
 #, c-format
 msgid "Incorrect number of arguments (%d), expecting %d for '%s'"
 msgstr "Falsche Anzahl von Argumenten (%d), erwarte %d für '%s'"
 
-#: src/main/dotcode.c:1227 src/main/dotcode.c:2276
+#: src/main/dotcode.c:1216 src/main/dotcode.c:2290
 msgid "too many arguments, sorry"
 msgstr "zu viele Argumente, sorry"
 
-#: src/main/dotcode.c:1261 src/main/dotcode.c:1278 src/main/engine.c:2993
+#: src/main/dotcode.c:1284 src/main/dotcode.c:1301 src/main/engine.c:2993
 msgid "invalid graphics state"
 msgstr "ungültiger Grafikzustand"
 
-#: src/main/dotcode.c:1357
+#: src/main/dotcode.c:1380
 msgid "NULL value for DLLInfoReference when looking for DLL"
-msgstr "NULL Wert für DLLInfoReference bei der Suche nach DLL"
+msgstr "NULL-Wert für DLLInfoReference bei der Suche nach DLL"
 
-#: src/main/dotcode.c:1458
+#: src/main/dotcode.c:1481
 #, c-format
 msgid "wrong type for argument %d in call to %s"
 msgstr "Falscher Argumenttyp %d beim Aufruf von %s"
 
-#: src/main/dotcode.c:1470
-#, c-format
-msgid ""
-"explicit request not to duplicate arguments in call to '%s', but argument %d "
-"is of the wrong type (%d != %d)"
-msgstr ""
-"expliziter Wunsch Argumente im Aufruf von '%s' nicht zu duplizieren, aber "
-"Argument %d ist von falschem Typ (%d != %d)"
-
-#: src/main/dotcode.c:1493
+#: src/main/dotcode.c:1510
 #, c-format
 msgid "long vectors (argument %d) are not supported in %s"
 msgstr "lange Vektoren (Argument %d) nicht unterstützt in  %s"
 
-#: src/main/dotcode.c:1524
+#: src/main/dotcode.c:1541
 #, c-format
 msgid "NAs in foreign function call (arg %d)"
 msgstr "NAs in externem Funktionsaufruf (arg %d)"
 
-#: src/main/dotcode.c:1547
+#: src/main/dotcode.c:1564
 #, c-format
 msgid "NA/NaN/Inf in foreign function call (arg %d)"
 msgstr "NA/NaN/Inf in externem Funktionsaufruf (arg %d)"
 
-#: src/main/dotcode.c:1552
-msgid "single values not returned if not duplicated"
-msgstr "einzelne Werte nicht zurückgegeben, wenn nicht doppelt"
-
-#: src/main/dotcode.c:1578
+#: src/main/dotcode.c:1594
 #, c-format
 msgid "complex NA/NaN/Inf in foreign function call (arg %d)"
 msgstr "komplexes NA/NaN/Inf in externem Funktionsaufruf (arg %d)"
 
-#: src/main/dotcode.c:1597
-msgid "character variables must be duplicated in .C/.Fortran"
-msgstr "Charakter Variablen müssen in .C/.Fortran dupliziert werden"
-
-#: src/main/dotcode.c:1602
+#: src/main/dotcode.c:1616
 msgid "only first string in char vector used in .Fortran"
-msgstr "nur erste Zeichenkette in Charaktervektor in .Fortran benutzt"
+msgstr "nur erste Zeichenkette in Zeichenkettenvektor in .Fortran benutzt"
 
-#: src/main/dotcode.c:1645 src/main/dotcode.c:1661 src/main/dotcode.c:1672
+#: src/main/dotcode.c:1659 src/main/dotcode.c:1675 src/main/dotcode.c:1686
 #, c-format
 msgid "invalid mode (%s) to pass to Fortran (arg %d)"
 msgstr "ungültiger Modus (%s) zur Übergabe nach Fortran (arg. %d)"
 
-#: src/main/dotcode.c:1666
+#: src/main/dotcode.c:1680
 #, c-format
 msgid "invalid mode (%s) to pass to C or Fortran (arg %d)"
 msgstr "ungültiger Modus (%s) zur Übergabe nach C oder Fortran (Arg. %d)"
 
-#: src/main/dotcode.c:1677
+#: src/main/dotcode.c:1691
 msgid "pairlists are passed as SEXP as from R 2.15.0"
 msgstr "beginnend mit R-2.15.0 werden Paarlisten als SEXP übergeben"
 
-#: src/main/dotcode.c:2499
+#: src/main/dotcode.c:2510
 #, c-format
 msgid "type \"%s\" not supported in interlanguage calls"
 msgstr "Typ \"%s\" wird nicht unterstützt bei Aufrufen über Sprachgrenzen"
 
-#: src/main/dotcode.c:2604
+#: src/main/dotcode.c:2615
 #, c-format
 msgid "mode '%s' is not supported in call_R"
 msgstr "Mode '%s' wird in call_R nicht unterstützt"
 
-#: src/main/dounzip.c:171
+#: src/main/dounzip.c:172
 #, c-format
 msgid " not overwriting file '%s"
 msgstr "überschreibe Datei '%s' nicht"
 
-#: src/main/dounzip.c:256
+#: src/main/dounzip.c:257
 #, c-format
 msgid "zip file '%s' cannot be opened"
 msgstr "zip Datei '%s' kann nicht geöffnet werden"
 
-#: src/main/dounzip.c:312
+#: src/main/dounzip.c:313
 msgid "invalid zip name argument"
 msgstr "ungültiges Argument für Namen von Zipfile"
 
-#: src/main/dounzip.c:315 src/main/dounzip.c:409
+#: src/main/dounzip.c:316 src/main/dounzip.c:410
 msgid "zip path is too long"
 msgstr "Pfad aus zip ist zu lang"
 
-#: src/main/dounzip.c:332
+#: src/main/dounzip.c:333
 msgid "'exdir' is too long"
 msgstr "'exdir' ist zu lang"
 
-#: src/main/dounzip.c:335
+#: src/main/dounzip.c:336
 msgid "'exdir' does not exist"
 msgstr "'exdir' existiert nicht"
 
-#: src/main/dounzip.c:363
+#: src/main/dounzip.c:364
 msgid "requested file not found in the zip file"
-msgstr "angeforderte Datei nicht in Zipfile gefunden"
+msgstr "angeforderte Datei nicht in Zip-Datei gefunden"
 
-#: src/main/dounzip.c:366
+#: src/main/dounzip.c:367
 msgid "zip file is corrupt"
-msgstr "Zipfile ist defekt"
+msgstr "Zip-Datei ist defekt"
 
-#: src/main/dounzip.c:369
+#: src/main/dounzip.c:370
 msgid "CRC error in zip file"
-msgstr "CRC Fehler in Zipfile"
+msgstr "CRC-Fehler in Zip-Datei"
 
-#: src/main/dounzip.c:376
+#: src/main/dounzip.c:377
 msgid "write error in extracting from zip file"
-msgstr "Schreibfehler während des Extrahierens aus Zipfile"
+msgstr "Schreibfehler während des Extrahierens aus Zip-Datei"
 
-#: src/main/dounzip.c:379
+#: src/main/dounzip.c:380
 #, c-format
 msgid "error %d in extracting from zip file"
-msgstr "Fehler %d während des Extrahierens aus Zipfile"
+msgstr "Fehler %d während des Extrahierens aus Zip-Datei"
 
-#: src/main/dounzip.c:404
+#: src/main/dounzip.c:405
 msgid "unz connections can only be opened for reading"
 msgstr "unz Verbindungen können nur zum Lesen geöffnet werden"
 
-#: src/main/dounzip.c:415
+#: src/main/dounzip.c:416
 msgid "invalid description of 'unz' connection"
-msgstr "ungültige Beschreibung einer 'unz' Verbindung"
+msgstr "ungültige Beschreibung einer 'unz'-Verbindung"
 
-#: src/main/dounzip.c:421
+#: src/main/dounzip.c:422
 #, c-format
 msgid "cannot open zip file '%s'"
-msgstr "kann Zipfile '%s' nicht öffnen"
+msgstr "kann Zip-Datei '%s' nicht öffnen"
 
-#: src/main/dounzip.c:425
+#: src/main/dounzip.c:426
 #, c-format
 msgid "cannot locate file '%s' in zip file '%s'"
-msgstr "kann Datei '%s' nicht in Zipfile '%s' finden"
+msgstr "kann Datei '%s' nicht in Zip-Datei '%s' finden"
 
-#: src/main/dounzip.c:469
+#: src/main/dounzip.c:470
 msgid "printing not enabled for this connection"
 msgstr "Drucken für diese Verbindung nicht erlaubt"
 
@@ -2779,10 +2810,10 @@ msgstr "Drucken für diese Verbindung nicht erlaubt"
 msgid "write not enabled for this connection"
 msgstr "write für diese Verbindung nicht möglich"
 
-#: src/main/dounzip.c:496 src/main/dounzip.c:500 src/main/dounzip.c:506
-#: src/main/dounzip.c:523
+#: src/main/dounzip.c:494 src/main/dounzip.c:498 src/main/dounzip.c:504
+#: src/main/dounzip.c:521
 msgid "allocation of 'unz' connection failed"
-msgstr "Allokation einer 'unz' Verbindung fehlgeschlagen"
+msgstr "Allokation einer 'unz'-Verbindung fehlgeschlagen"
 
 #: src/main/dstruct.c:90
 msgid "invalid formal arguments for 'function'"
@@ -2819,7 +2850,7 @@ msgstr "kann editor '%s' nicht starten"
 
 #: src/main/edit.c:161
 msgid "editor ran but returned error status"
-msgstr "Editor lief, aber lieferte Fehlerstatus"
+msgstr "Editor lief, aber lieferte Fehlerstatus zurück"
 
 #: src/main/edit.c:171
 #, c-format
@@ -2845,7 +2876,7 @@ msgstr ""
 
 #: src/main/engine.c:40
 msgid "Graphics API version mismatch"
-msgstr "Grafik-API Version passt nicht"
+msgstr "Graphics API-Version passt nicht"
 
 #: src/main/engine.c:113 src/main/engine.c:118 src/main/engine.c:182
 msgid "unable to allocate memory (in GEregister)"
@@ -2872,7 +2903,7 @@ msgstr "ungültige Zusammenfassung von Zeilen"
 #: src/main/engine.c:761 src/main/engine.c:865 src/main/engine.c:1098
 #: src/main/engine.c:1205 src/main/engine.c:1328 src/main/engine.c:1392
 msgid "'lwd' must be non-negative and finite"
-msgstr "'lwd' muss nicht-negative und endlich sein"
+msgstr "'lwd' muss nicht-negativ und endlich sein"
 
 #: src/main/engine.c:798
 msgid "out of memory while clipping polyline"
@@ -2943,19 +2974,19 @@ msgstr "ungültige Displayliste"
 
 #: src/main/engine.c:2963
 msgid "'expr' argument must be an expression"
-msgstr "'expr' Argument muss ein Ausdruck sein"
+msgstr "'expr'-Argument muss ein Ausdruck sein"
 
 #: src/main/engine.c:2965
 msgid "'list' argument must be a list"
-msgstr "'list' Argument muss eine Liste sein"
+msgstr "'list'-Argument muss eine Liste sein"
 
 #: src/main/engine.c:2971
 msgid "'env' argument must be an environment"
-msgstr "'env' Argument muss eine Umgebung sein"
+msgstr "'env'-Argument muss eine Umgebung sein"
 
 #: src/main/engine.c:3051 src/main/engine.c:3059
 msgid "invalid multibyte char in pch=\"c\""
-msgstr "ungültiges multibyte zeichen in pch=\"c\""
+msgstr "ungültiges multi-byte Zeichen in pch=\"c\""
 
 #: src/main/engine.c:3106
 msgid "invalid hex digit in 'color' or 'lty'"
@@ -2978,436 +3009,442 @@ msgstr "ungültiger Linientyp"
 msgid "cannot change value of locked binding for '%s'"
 msgstr "kann den Wert einer festgestellten Bindung für '%s' nicht ändern"
 
-#: src/main/envir.c:251 src/main/envir.c:1454
+#: src/main/envir.c:251 src/main/envir.c:1528
 msgid "cannot add bindings to a locked environment"
 msgstr "kann keine Bindungen zu einer abgeschlossenen Umgebung hinzufügen"
 
-#: src/main/envir.c:772
+#: src/main/envir.c:775
 msgid "invalid cached value in R_GetGlobalCache"
 msgstr "ungültiger zwischengespeicherter Wert in R_GetGlobalCache"
 
-#: src/main/envir.c:830
+#: src/main/envir.c:836
 msgid "cannot unbind in the base namespace"
 msgstr "kann Bindung in der Basisumgebung nicht lösen"
 
-#: src/main/envir.c:832
+#: src/main/envir.c:838
 msgid "unbind in the base environment is unimplemented"
 msgstr "unbind ist in der Basisumgebung nicht implementiert"
 
-#: src/main/envir.c:834 src/main/envir.c:1684
+#: src/main/envir.c:840 src/main/envir.c:1816
 msgid "cannot remove bindings from a locked environment"
 msgstr "kann keine Bindungen aus einer abgeschlossenen Umgebung lösen"
 
-#: src/main/envir.c:1139
+#: src/main/envir.c:1211
 #, c-format
 msgid "argument to '%s' is not an environment"
 msgstr "Argument zu '%s' ist keine Umgebung"
 
-#: src/main/envir.c:1300
+#: src/main/envir.c:1372
 #, c-format
 msgid "the ... list does not contain %d elements"
 msgstr "die ... Liste enthält nicht %d Elemente"
 
-#: src/main/envir.c:1302
+#: src/main/envir.c:1374
 #, c-format
 msgid "..%d used in an incorrect context, no ... to look in"
 msgstr "..%d in einem falschen Kontext benutzt, kein ... um auszulesen"
 
-#: src/main/envir.c:1390 src/main/envir.c:1842 src/main/eval.c:573
-#: src/main/eval.c:3618
-#, c-format
-msgid "argument \"%s\" is missing, with no default"
-msgstr "Argument \"%s\" fehlt (ohne Standardwert)"
-
-#: src/main/envir.c:1395
+#: src/main/envir.c:1467
 #, c-format
 msgid "could not find function \"%s\""
 msgstr "konnte Funktion \"%s\" nicht finden"
 
-#: src/main/envir.c:1418
+#: src/main/envir.c:1490
 msgid "cannot assign values in the empty environment"
 msgstr "kann in der leeren Umgebung keine Werte zuweisen"
 
-#: src/main/envir.c:1424 src/main/envir.c:1497
+#: src/main/envir.c:1496 src/main/envir.c:1626
 msgid "cannot assign variables to this database"
 msgstr "kann dieser Datenbank keine Variablen zuordnen"
 
-#: src/main/envir.c:1580
+#: src/main/envir.c:1712
 #, c-format
 msgid "cannot add binding of '%s' to the base environment"
 msgstr "kann keine Bindung von '%s' zur Basisumgebung hinzufügen"
 
-#: src/main/envir.c:1609
+#: src/main/envir.c:1741
 msgid "only the first element is used as variable name"
 msgstr "nur das erste Element wird als Variablenname genutzt"
 
-#: src/main/envir.c:1641
+#: src/main/envir.c:1773
 msgid "first argument must be a named list"
 msgstr "das erste Argument muss eine benannte Liste sein"
 
-#: src/main/envir.c:1646
+#: src/main/envir.c:1778
 msgid "names(x) must be a character vector of the same length as x"
-msgstr "names(x) muss ein Charaktervektor so lang wie x sein"
+msgstr "names(x) muss ein Zeichenkettenvektor derselben Länge wie x sein"
 
-#: src/main/envir.c:1649
+#: src/main/envir.c:1781
 msgid "'envir' argument must be an environment"
-msgstr "'envir' Argument muss eine Umgebung sein"
+msgstr "'envir'-Argument muss eine Umgebung sein"
 
-#: src/main/envir.c:1678
+#: src/main/envir.c:1810
 msgid "cannot remove variables from base namespace"
 msgstr "kann keine Variablen aus dem Basisnamesraum entfernen"
 
-#: src/main/envir.c:1680
+#: src/main/envir.c:1812
 msgid "cannot remove variables from the base environment"
 msgstr "kann keine Variablen aus der Basisumgebung entfernen"
 
-#: src/main/envir.c:1682
+#: src/main/envir.c:1814
 msgid "cannot remove variables from the empty environment"
 msgstr "kann keine Variablen aus der leeren Umgebung entfernen"
 
-#: src/main/envir.c:1690
+#: src/main/envir.c:1822
 msgid "cannot remove variables from this database"
 msgstr "kann aus dieser Datenbank keine Variablen entfernen"
 
-#: src/main/envir.c:1849
+#: src/main/envir.c:1983
 #, c-format
 msgid "object '%s' of mode '%s' was not found"
 msgstr "Objekt '%s' mit Modus '%s' nicht gefunden"
 
-#: src/main/envir.c:1921
+#: src/main/envir.c:2066
 #, c-format
 msgid "invalid name in position %d"
 msgstr "ungültiger Name an Position %d"
 
-#: src/main/envir.c:1927
+#: src/main/envir.c:2072
 msgid "second argument must be an environment"
 msgstr "zweites Argument muss eine Umgebung sein"
 
-#: src/main/envir.c:1935 src/main/envir.c:1943
+#: src/main/envir.c:2080 src/main/envir.c:2088
 #, c-format
 msgid "wrong length for '%s' argument"
 msgstr "falsche Länge für das '%s' Argument"
 
-#: src/main/envir.c:2062
+#: src/main/envir.c:2219
 msgid "invalid use of 'missing'"
 msgstr "ungültige Nutzung von 'missing'"
 
-#: src/main/envir.c:2087
+#: src/main/envir.c:2245
 msgid "'missing' can only be used for arguments"
 msgstr "'missing' kann nur für Argumente genutzt werden"
 
-#: src/main/envir.c:2168
+#: src/main/envir.c:2331
 msgid "'pos' must be an integer"
 msgstr "'pos' muss ganzzahlig sein"
 
-#: src/main/envir.c:2182
+#: src/main/envir.c:2345
 msgid "all elements of a list must be named"
 msgstr "alle Elemente einer Liste müssen benannt werden"
 
-#: src/main/envir.c:2205
+#: src/main/envir.c:2368
 msgid "'attach' only works for lists, data frames and environments"
-msgstr "'attach' arbeitet nur für Listen, Data Frames und Umgebungen"
+msgstr "'attach' funktioniert nur für Listen, Data Frames und Umgebungen"
 
-#: src/main/envir.c:2288
+#: src/main/envir.c:2451
 msgid "detaching \"package:base\" is not allowed"
 msgstr "\"package:base\" kann nicht \"detached\" werden"
 
-#: src/main/envir.c:2589 src/main/envir.c:2644
+#: src/main/envir.c:2796 src/main/envir.c:2877
 msgid "argument must be an environment"
 msgstr "Argument muss eine Umgebung sein"
 
-#: src/main/envir.c:2648
+#: src/main/envir.c:2881
 msgid "arguments must be symbolic"
 msgstr "Argumente müssen symbolisch sein"
 
-#: src/main/envir.c:2772
+#: src/main/envir.c:3017
 msgid "no enclosing environment"
 msgstr "keine einschließende Umgebung"
 
-#: src/main/envir.c:2825
+#: src/main/envir.c:3070
 #, c-format
 msgid "no item called \"%s\" on the search list"
 msgstr "kein Eintrag names \"%s\" im Suchpfad"
 
-#: src/main/envir.c:2850
+#: src/main/envir.c:3095
 msgid "using 'as.environment(NULL)' is defunct"
 msgstr "Benutzung von 'as.enivornment(NULL) ist nicht mehr möglich"
 
-#: src/main/envir.c:2856
+#: src/main/envir.c:3101
 msgid "S4 object does not extend class \"environment\""
-msgstr "Das S4 Objekt erweitert nicht die Klasse \"environment\""
+msgstr "Das S4-Objekt erweitert nicht die Klasse \"environment\""
 
-#: src/main/envir.c:2871
+#: src/main/envir.c:3116
 msgid "invalid object for 'as.environment'"
 msgstr "ungültiges Objekt für 'as.environment'"
 
-#: src/main/envir.c:2897 src/main/envir.c:2925 src/main/envir.c:2954
-#: src/main/envir.c:2975 src/main/envir.c:2998 src/main/envir.c:3033
-#: src/main/envir.c:3054
+#: src/main/envir.c:3142 src/main/envir.c:3170 src/main/envir.c:3199
+#: src/main/envir.c:3220 src/main/envir.c:3243 src/main/envir.c:3278
+#: src/main/envir.c:3299
 msgid "not an environment"
 msgstr "keine Umgebung"
 
-#: src/main/envir.c:2949 src/main/envir.c:2970 src/main/envir.c:2991
-#: src/main/envir.c:3028 src/main/envir.c:3049 src/main/envir.c:3148
+#: src/main/envir.c:3194 src/main/envir.c:3215 src/main/envir.c:3236
+#: src/main/envir.c:3273 src/main/envir.c:3294 src/main/envir.c:3393
 msgid "not a symbol"
 msgstr "kein Symbol"
 
-#: src/main/envir.c:2962 src/main/envir.c:2983 src/main/envir.c:3041
-#: src/main/envir.c:3062
+#: src/main/envir.c:3207 src/main/envir.c:3228 src/main/envir.c:3286
+#: src/main/envir.c:3307
 #, c-format
 msgid "no binding for \"%s\""
 msgstr "keine Bindung für \"%s\""
 
-#: src/main/envir.c:2993
+#: src/main/envir.c:3238
 msgid "not a function"
 msgstr "keine Funktion"
 
-#: src/main/envir.c:3001 src/main/envir.c:3017
+#: src/main/envir.c:3246 src/main/envir.c:3262
 msgid "symbol already has a regular binding"
 msgstr "Symbol hat bereits reguläre Bindung"
 
-#: src/main/envir.c:3003 src/main/envir.c:3019
+#: src/main/envir.c:3248 src/main/envir.c:3264
 msgid "cannot change active binding if binding is locked"
 msgstr "kann die aktive Bindung nicht ändern, wenn diese geschlossen ist"
 
-#: src/main/envir.c:3107
+#: src/main/envir.c:3352 src/main/envir.c:3589
 msgid "unknown op"
 msgstr "unbekannte Operation"
 
-#: src/main/envir.c:3152
+#: src/main/envir.c:3397
 msgid "cannot unbind a locked binding"
 msgstr "kann abgeschlossene Bindung nicht lösen"
 
-#: src/main/envir.c:3154
+#: src/main/envir.c:3399
 msgid "cannot unbind an active binding"
 msgstr "kann aktive Bindung nicht lösen"
 
-#: src/main/envir.c:3289
+#: src/main/envir.c:3540
 msgid "bad namespace name"
 msgstr "unbrauchbarer Name für Namensraum"
 
-#: src/main/envir.c:3301
+#: src/main/envir.c:3552
 msgid "namespace already registered"
 msgstr "Namensraum bereits registriert"
 
-#: src/main/envir.c:3313
+#: src/main/envir.c:3564
 msgid "namespace not registered"
 msgstr "Namensraum nicht registriert"
 
-#: src/main/envir.c:3360
+#: src/main/envir.c:3620
 msgid "bad import environment argument"
 msgstr "unbrauchbares Argument für zu importierende Umgebung"
 
-#: src/main/envir.c:3365
+#: src/main/envir.c:3625
 msgid "bad export environment argument"
 msgstr "unbrauchbares Argument für zu exportierende Umgebung"
 
-#: src/main/envir.c:3369
+#: src/main/envir.c:3629
 msgid "length of import and export names must match"
 msgstr "Länge von Import- und Exportnamen muss übereinstimmen"
 
-#: src/main/envir.c:3392
+#: src/main/envir.c:3652
 #, c-format
 msgid "exported symbol '%s' has no value"
 msgstr "exportiertes Symbol '%s' hat keinen Wert"
 
-#: src/main/envir.c:3557
+#: src/main/envir.c:3817
 #, c-format
 msgid "unknown encoding: %d"
 msgstr "unbekannte Kodierung: %d"
 
-#: src/main/envir.c:3577
+#: src/main/envir.c:3837
 #, c-format
 msgid "embedded nul in string: '%s'"
 msgstr "Zeichenkette '%s' enthält nul Zeichen"
 
-#: src/main/errors.c:178 src/main/errors.c:215
+#: src/main/errors.c:171 src/main/errors.c:208
 msgid "interrupts suspended; signal ignored"
 msgstr "Interrupts aufgehoben; Signal ignoriert"
 
+#: src/main/errors.c:258
+msgid "[... truncated]"
+msgstr "[... abgeschnitten]"
+
 #: src/main/errors.c:318
 msgid "invalid option \"warning.expression\""
 msgstr "ungültige Option \"warning.expression\""
 
-#: src/main/errors.c:348
+#: src/main/errors.c:347
 #, c-format
 msgid "(converted from warning) %s"
 msgstr "(konvertiert von Warnung) %s"
 
-#: src/main/errors.c:359
-#, c-format
-msgid "Warning: %s\n"
-msgstr "Warnung: %s\n"
+#: src/main/errors.c:357
+msgid "Warning:"
+msgstr "Warnung:"
 
-#: src/main/errors.c:363
+#: src/main/errors.c:359
 #, c-format
-msgid "Warning in %s : %s\n"
-msgstr "Warnung in %s : %s\n"
+msgid "Warning in %s :"
+msgstr "Warnung in %s"
 
-#: src/main/errors.c:365
-#, c-format
-msgid ""
-"Warning in %s :\n"
-"  %s\n"
-msgstr ""
-"Warnung in %s :\n"
-"  %s\n"
+#: src/main/errors.c:368 src/main/errors.c:382 src/main/errors.c:695
+msgid "Calls:"
+msgstr "Ruft auf:"
 
-#: src/main/errors.c:428 src/main/errors.c:447 src/main/errors.c:596
+#: src/main/errors.c:429 src/main/errors.c:448 src/main/errors.c:610
 msgid "Lost warning messages\n"
 msgstr "Warnmeldungen verloren\n"
 
-#: src/main/errors.c:459
-msgid "Warning message:\n"
-msgid_plural "Warning messages:\n"
-msgstr[0] "Warnmeldung:\n"
-msgstr[1] "Warnmeldungen:\n"
+#: src/main/errors.c:460
+msgid "Warning message:"
+msgid_plural "Warning messages:"
+msgstr[0] "Warnmeldung:"
+msgstr[1] "Warnmeldungen:"
+
+#: src/main/errors.c:470 src/main/errors.c:498
+#, c-format
+msgid "In %s :"
+msgstr "In %s :"
 
-#: src/main/errors.c:514
+#: src/main/errors.c:523
 #, c-format
-msgid "There were %d warnings (use warnings() to see them)\n"
-msgstr "Es gab %d Warnungen (Anzeige mit warnings())\n"
+msgid "There was %d warning (use warnings() to see it)"
+msgid_plural "There were %d warnings (use warnings() to see them)"
+msgstr[0] "Es gab %d Warnung (Anzeige mit warnings())"
+msgstr[1] "Es gab %d Warnungen (Anzeige mit warnings())"
 
-#: src/main/errors.c:517
+#: src/main/errors.c:528
 #, c-format
-msgid "There were %d or more warnings (use warnings() to see the first %d)\n"
-msgstr "Es gab %d oder mehr Warnungen (Anzeige der ersten %d mit warnings())\n"
+msgid "There were %d or more warnings (use warnings() to see the first %d)"
+msgstr "Es gab %d oder mehr Warnungen (Anzeige der ersten %d mit warnings())"
 
-#: src/main/errors.c:587
+#: src/main/errors.c:601
 msgid "Error during wrapup: "
 msgstr "Fehler während wrapup: "
 
-#: src/main/errors.c:612
+#: src/main/errors.c:626
 msgid "Error in "
 msgstr "Fehler in "
 
-#: src/main/errors.c:613
+#: src/main/errors.c:648 src/main/errors.c:655
 #, c-format
-msgid " (from %s) : "
-msgstr " (von %s) : "
+msgid "Error in %s (from %s) : "
+msgstr "Fehler in %s (von %s) : "
 
-#: src/main/errors.c:664 src/main/errors.c:670
+#: src/main/errors.c:657
+#, c-format
+msgid "Error in %s : "
+msgstr "Fehler in %s : "
+
+#: src/main/errors.c:677 src/main/errors.c:683
 #, c-format
 msgid "Error: "
 msgstr "Fehler: "
 
-#: src/main/errors.c:690 src/main/errors.c:1319
+#: src/main/errors.c:704 src/main/errors.c:1333
 msgid "In addition: "
 msgstr "Zusätzlich: "
 
-#: src/main/errors.c:811
+#: src/main/errors.c:825
 msgid "invalid option \"error\"\n"
 msgstr "ungültige Option \"error\"\n"
 
-#: src/main/errors.c:893
+#: src/main/errors.c:907
 msgid "Execution halted\n"
 msgstr "Ausführung angehalten\n"
 
-#: src/main/errors.c:1032
-msgid "'msg1' must be a character string"
-msgstr "'msg1' muss eine Zeichenkette sein"
-
-#: src/main/errors.c:1034
-msgid "'msg2' must be a character string"
-msgstr "'msg2' muss eine Zeichenkette sein"
+#: src/main/errors.c:1046 src/main/errors.c:1048 src/main/options.c:338
+#: src/main/unique.c:1578
+#, c-format
+msgid "'%s' must be a character string"
+msgstr "'%s' muss eine Zeichenkette sein"
 
-#: src/main/errors.c:1131
+#: src/main/errors.c:1145
 msgid " [invalid string in stop(.)]"
 msgstr "[ungültige Zeichenkette in stop(.)]"
 
-#: src/main/errors.c:1162
+#: src/main/errors.c:1176
 msgid " [invalid string in warning(.)]"
 msgstr "[ungültige Zeichenkette in warning(.)]"
 
-#: src/main/errors.c:1178
+#: src/main/errors.c:1192
 #, c-format
 msgid "incorrect number of arguments to \"%s\""
 msgstr "falsche Anzahl von Argumenten für \"%s\""
 
-#: src/main/errors.c:1184 src/main/errors.c:1199
+#: src/main/errors.c:1198 src/main/errors.c:1213
 #, c-format
 msgid "unimplemented feature in %s"
 msgstr "nicht implementiertes Feature in %s"
 
-#: src/main/errors.c:1193
+#: src/main/errors.c:1207
 msgid "invalid number of arguments"
 msgstr "ungültige Anzahl von Argumenten"
 
-#: src/main/errors.c:1194 src/main/logic.c:189
+#: src/main/errors.c:1208 src/main/logic.c:180
 msgid "invalid argument type"
 msgstr "ungültiger Argumenttyp"
 
-#: src/main/errors.c:1196
+#: src/main/errors.c:1210
 msgid "time-series/vector length mismatch"
 msgstr "nicht passende Zeitreihen/Vektor Länge"
 
-#: src/main/errors.c:1197
+#: src/main/errors.c:1211
 msgid "incompatible arguments"
 msgstr "inkompatible Argumente"
 
-#: src/main/errors.c:1200
+#: src/main/errors.c:1214
 msgid "unknown error (report this!)"
 msgstr "unbekannter Fehler (bitte R-devel mitteilen!)"
 
-#: src/main/errors.c:1212
+#: src/main/errors.c:1223
+msgid "inaccurate integer conversion in coercion"
+msgstr "ungenaue Ganzzahlkonversion in Umwandlung"
+
+#: src/main/errors.c:1226
 msgid "unknown warning (report this!)"
 msgstr "unbekannte Warnung (bitte R-devel mitteilen!)"
 
-#: src/main/errors.c:1283
+#: src/main/errors.c:1297
 msgid "No function to return from, jumping to top level"
 msgstr "keine Funktion abzubrechen, springe zum Top Level"
 
-#: src/main/errors.c:1299
+#: src/main/errors.c:1313
 msgid "top level inconsistency?"
 msgstr "Inkonsistenz auf Top Level?"
 
-#: src/main/errors.c:1478
+#: src/main/errors.c:1492
 msgid "bad handler data"
 msgstr "unbrauchbare Daten für handler"
 
-#: src/main/errors.c:1628
+#: src/main/errors.c:1642
 msgid "error message not a string"
 msgstr "Fehlermeldung ist keine Zeichenkette"
 
-#: src/main/errors.c:1703
+#: src/main/errors.c:1717
 msgid "handler or restart stack mismatch in old restart"
 msgstr "nicht passender handler oder restart stack für altes restart"
 
-#: src/main/errors.c:1729 src/main/errors.c:1745
+#: src/main/errors.c:1743 src/main/errors.c:1759
 msgid "bad error message"
 msgstr "unbrauchbare Fehlermeldung"
 
-#: src/main/errors.c:1787
+#: src/main/errors.c:1800
 msgid "bad restart"
 msgstr "unbrauchbarer Neustart"
 
-#: src/main/errors.c:1819
+#: src/main/errors.c:1832
 msgid "restart not on stack"
 msgstr "restart nicht auf dem Stack"
 
-#: src/main/errors.c:1836
+#: src/main/errors.c:1848
 msgid "not in a try context"
 msgstr "nicht in einer try Umgebung"
 
-#: src/main/errors.c:1849
+#: src/main/errors.c:1861
 msgid "error message must be a character string"
 msgstr "Fehlermeldung muss eine Zeichenkette sein"
 
-#: src/main/eval.c:308
+#: src/main/eval.c:307
 #, c-format
 msgid "source files skipped by Rprof; please increase '%s'"
-msgstr "Quellkodedateien übersprungen von Rprof; bitte '%s' erhöhen"
+msgstr "Quellcodedateien übersprungen von Rprof; bitte '%s' erhöhen"
 
-#: src/main/eval.c:328
+#: src/main/eval.c:327
 #, c-format
 msgid "Rprof: cannot open profile file '%s'"
 msgstr "Rprof: kann profile Datei '%s' nicht öffnen"
 
-#: src/main/eval.c:422
+#: src/main/eval.c:421
 msgid "R profiling is not available on this system"
 msgstr "R Profiling ist auf diesem System nicht verfügbar"
 
-#: src/main/eval.c:446
+#: src/main/eval.c:445
 msgid ""
 "promise already under evaluation: recursive default argument reference or "
 "earlier problems?"
@@ -3415,266 +3452,260 @@ msgstr ""
 "promise evaluation läuft bereits: rekursive Referenz auf das "
 "Standardargument oder frühere Fehler?"
 
-#: src/main/eval.c:448
+#: src/main/eval.c:447
 msgid "restarting interrupted promise evaluation"
 msgstr "Neustart einer unterbrochenen promise evaluation"
 
-#: src/main/eval.c:544
+#: src/main/eval.c:543
 msgid ""
 "evaluation nested too deeply: infinite recursion / options(expressions=)?"
 msgstr ""
-"Auswertung zu tief verschachtelt: unendliche Rekursion / options"
-"(expressions=)?"
+"Auswertung zu tief verschachtelt: unendliche Rekursion / "
+"options(expressions=)?"
 
-#: src/main/eval.c:575 src/main/eval.c:3619
+#: src/main/eval.c:574 src/main/eval.c:4119
 msgid "argument is missing, with no default"
 msgstr "Argument fehlt ohne Standard"
 
-#: src/main/eval.c:679 src/main/eval.c:4642
+#: src/main/eval.c:678 src/main/eval.c:1215 src/main/eval.c:5410
 msgid "attempt to apply non-function"
 msgstr "Versuch eine Nicht-Funktion anzuwenden"
 
-#: src/main/eval.c:702
+#: src/main/eval.c:701
 #, c-format
 msgid "%s at %s#%d: "
 msgstr "%s bei %s#%d:"
 
-#: src/main/eval.c:1178
+#: src/main/eval.c:1207 src/main/eval.c:2180
+#, c-format
+msgid "argument %d is empty"
+msgstr "Argument %d ist leer"
+
+#: src/main/eval.c:1259
 #, c-format
 msgid "could not find symbol \"%s\" in environment of the generic function"
 msgstr "konnte Symbol \"%s\" nicht in Umgebung der generischen Funktion finden"
 
-#: src/main/eval.c:1196
+#: src/main/eval.c:1277
 #, c-format
 msgid "symbol \"%s\" not in environment of method"
 msgstr "symbol \"%s\" nicht in Umgebung der Methode"
 
-#: src/main/eval.c:1308
+#: src/main/eval.c:1390
 msgid "the condition has length > 1 and only the first element will be used"
 msgstr "Bedingung hat Länge > 1 und nur das erste Element wird benutzt"
 
-#: src/main/eval.c:1325
+#: src/main/eval.c:1409
 msgid "missing value where TRUE/FALSE needed"
 msgstr "Fehlender Wert, wo TRUE/FALSE nötig ist"
 
-#: src/main/eval.c:1326
+#: src/main/eval.c:1410
 msgid "argument is not interpretable as logical"
 msgstr "Argument kann nicht als logischer Wert interpretiert werden"
 
-#: src/main/eval.c:1327
+#: src/main/eval.c:1411
 msgid "argument is of length zero"
 msgstr "Argument hat Länge 0"
 
-#: src/main/eval.c:1418
+#: src/main/eval.c:1504
 msgid "non-symbol loop variable"
 msgstr "nicht-symbolische Schleifenvariable"
 
-#: src/main/eval.c:1510 src/main/eval.c:4408
+#: src/main/eval.c:1596 src/main/eval.c:5182
 msgid "invalid for() loop sequence"
 msgstr "unbrauchbare Sequenz für for() Schleife"
 
-#: src/main/eval.c:1652
+#: src/main/eval.c:1736
 msgid "multi-argument returns are not permitted"
 msgstr "mehrargumentige Rückgaben sind nicht erlaubt"
 
-#: src/main/eval.c:1701
+#: src/main/eval.c:1783
 msgid "invalid (NULL) left side of assignment"
 msgstr "ungültige (NULL) linke Seite in Zuweisung"
 
-#: src/main/eval.c:1734
+#: src/main/eval.c:1817
 msgid "target of assignment expands to non-language object"
-msgstr "ziel der Zuweisung expandiert zu keinem Sprachobjekt"
+msgstr "Ziel der Zuweisung expandiert zu keinem Sprachobjekt"
 
-#: src/main/eval.c:1817
+#: src/main/eval.c:1900
 #, c-format
 msgid "overlong name in '%s'"
 msgstr "überlanger Name in '%s'"
 
-#: src/main/eval.c:1915
+#: src/main/eval.c:1990
 msgid "cannot do complex assignments in base namespace"
 msgstr "kann keine komplexen Zuweisungen im Basisnamensraum durchführen"
 
-#: src/main/eval.c:1917
+#: src/main/eval.c:1992
 msgid "cannot do complex assignments in base environment"
 msgstr "kann keine komplexen Zuweisungen in der Basisumgebung durchführen"
 
-#: src/main/eval.c:1954 src/main/eval.c:1981
+#: src/main/eval.c:2030 src/main/eval.c:2057
 msgid "invalid function in complex assignment"
 msgstr "ungültige Funktion in komplexer Zuweisung"
 
-#: src/main/eval.c:2041
+#: src/main/eval.c:2117
 msgid "invalid (do_set) left-hand side to assignment"
 msgstr "ungültige (do_set) linke Seite in Zuweisung"
 
-#: src/main/eval.c:2103
-#, c-format
-msgid "argument %d is empty"
-msgstr "Argument %d ist leer"
-
-#: src/main/eval.c:2116
+#: src/main/eval.c:2193
 #, c-format
 msgid "'%s' is missing"
 msgstr "'%s' fehlt"
 
-#: src/main/eval.c:2267
+#: src/main/eval.c:2348
 msgid "invalid formal argument list for \"function\""
 msgstr "ungültiges formales Argument für \"function\""
 
-#: src/main/eval.c:2325 src/main/eval.c:2356 src/main/eval.c:2361
+#: src/main/eval.c:2406 src/main/eval.c:2437 src/main/eval.c:2442
 #, c-format
 msgid "invalid '%s' argument of type '%s'"
 msgstr "ungültiges '%s' Argument vom Typ '%s'"
 
-#: src/main/eval.c:2353
+#: src/main/eval.c:2434
 msgid "numeric 'envir' arg not of length one"
 msgstr "numerisches 'envir' Argument hat nicht Länge 1"
 
-#: src/main/eval.c:2377 src/main/eval.c:2399
+#: src/main/eval.c:2458 src/main/eval.c:2482
 msgid "restarts not supported in 'eval'"
 msgstr "Neustarts in 'eval' werden nicht unterstützt"
 
-#: src/main/eval.c:2456 src/main/eval.c:2469
+#: src/main/eval.c:2541 src/main/eval.c:2554
 msgid "'Recall' called from outside a closure"
 msgstr "'Recall' von außerhalb eines 'closure' aufgerufen"
 
-#: src/main/eval.c:2562
+#: src/main/eval.c:2647
 msgid "value in '...' is not a promise"
 msgstr "Wert in '...' ist kein 'promise'"
 
-#: src/main/eval.c:2754 src/main/objects.c:720
-#, c-format
-msgid "call name too long in '%s'"
-msgstr "Aufrufname in '%s' zu lang"
-
-#: src/main/eval.c:2775
-#, c-format
-msgid "generic name too long in '%s'"
-msgstr "generischer Name in '%s' zu lang"
-
-#: src/main/eval.c:2840
+#: src/main/eval.c:2908
 #, c-format
 msgid "Incompatible methods (\"%s\", \"%s\") for \"%s\""
 msgstr "Inkompatible Methoden (\"%s\", \"%s\") für \"%s\""
 
-#: src/main/eval.c:2906
+#: src/main/eval.c:2957
 msgid "dispatch error in group dispatch"
-msgstr "Dispatch Fehler beim Gruppendispatch"
+msgstr "Dispatch-Fehler beim Gruppen-Dispatch"
 
-#: src/main/eval.c:3201
+#: src/main/eval.c:3441
 #, c-format
 msgid "\"%s\" is not a %s function"
 msgstr "\"%s\" ist keine %s Funktion"
 
-#: src/main/eval.c:3430
+#: src/main/eval.c:3928
 msgid "node stack overflow"
-msgstr "Knotenstacküberlauf"
+msgstr "Knotenstack-Überlauf"
 
-#: src/main/eval.c:3436
+#: src/main/eval.c:3934
 msgid "integer stack overflow"
 msgstr "Integerstack-Überlauf"
 
-#: src/main/eval.c:3490
+#: src/main/eval.c:3988
 msgid "bad opcode"
 msgstr "unbrauchbarer opcode"
 
-#: src/main/eval.c:4219
+#: src/main/eval.c:4964
 #, c-format
 msgid "invalid %s type in 'x %s y'"
 msgstr "ungültiger %s Typ in 'x %s y'"
 
-#: src/main/eval.c:4310
+#: src/main/eval.c:5076
 msgid "bytecode version mismatch; using eval"
 msgstr "nicht passende Bytecode Versionen; nutze eval"
 
-#: src/main/eval.c:4315
+#: src/main/eval.c:5081
 msgid "bytecode version is too old"
 msgstr "Bytecode Version ist zu alt"
 
-#: src/main/eval.c:4316
+#: src/main/eval.c:5082
 msgid "bytecode version is too new"
 msgstr "Bytecode Version ist zu neu"
 
-#: src/main/eval.c:4350
+#: src/main/eval.c:5116
 msgid "byte code version mismatch"
 msgstr "nicht passende Bytecode Versionen"
 
-#: src/main/eval.c:4477
+#: src/main/eval.c:5264
 msgid "invalid sequence argument in for loop"
 msgstr "ungültiges Argument für Sequenz in for Schleife"
 
-#: src/main/eval.c:4624 src/main/names.c:1181
+#: src/main/eval.c:5399 src/main/names.c:1312
 #, c-format
 msgid "there is no .Internal function '%s'"
 msgstr "es gibt keine .Internal Funktion '%s'"
 
-#: src/main/eval.c:4731 src/main/eval.c:5077 src/main/eval.c:5119
+#: src/main/eval.c:5497 src/main/eval.c:5843 src/main/eval.c:5883
 msgid "bad function"
 msgstr "unbrauchbare Funktion"
 
-#: src/main/eval.c:4746
+#: src/main/eval.c:5510
 msgid "not a BUILTIN function"
 msgstr "keine BUILTIN Funktion"
 
-#: src/main/eval.c:5159
+#: src/main/eval.c:5940
 msgid "numeric EXPR required for 'switch' without named alternatives"
 msgstr "für 'switch' ohne benannte Alternativen ist eine numerische EXPR nötig"
 
-#: src/main/eval.c:5255
+#: src/main/eval.c:6051
 msgid "cannot find index for threaded code address"
 msgstr "konnte Index für threaded code Adresse nicht finden"
 
-#: src/main/eval.c:5315
+#: src/main/eval.c:6111
 msgid "invalid body"
 msgstr "ungültiger body"
 
-#: src/main/eval.c:5335
+#: src/main/eval.c:6131
 msgid "invalid symbol"
 msgstr "ungültiges Symbol"
 
-#: src/main/eval.c:5379
+#: src/main/eval.c:6175
 msgid "argument is not a byte code object"
 msgstr "Argument ist kein Bytecode Objekt"
 
-#: src/main/eval.c:5400
+#: src/main/eval.c:6196
 msgid "bad file name"
 msgstr "unbrauchbarer Dateiname"
 
-#: src/main/eval.c:5404 src/main/eval.c:5425
+#: src/main/eval.c:6200 src/main/eval.c:6221
 msgid "unable to open 'file'"
 msgstr "kann 'file' nicht öffnen"
 
-#: src/main/eval.c:5419 src/main/saveload.c:1942
+#: src/main/eval.c:6215 src/main/saveload.c:1942
 msgid "'file' must be non-empty string"
 msgstr "'file' muss eine nichtleere Zeichenkette sein"
 
-#: src/main/eval.c:5421 src/main/saveload.c:1944 src/main/saveload.c:2244
-#: src/main/serialize.c:2149
+#: src/main/eval.c:6217 src/main/saveload.c:1944 src/main/saveload.c:2244
+#: src/main/serialize.c:2189
 msgid "'ascii' must be logical"
 msgstr "'ascii' muss ein logischer Wert sein"
 
-#: src/main/eval.c:5492 src/main/eval.c:5511 src/main/eval.c:5541
+#: src/main/eval.c:6288 src/main/eval.c:6307 src/main/eval.c:6337
 msgid "constant buffer must be a generic vector"
 msgstr "constant buffer muss ein generischer Vektor sein"
 
-#: src/main/eval.c:5543
+#: src/main/eval.c:6339
 msgid "bad constant count"
 msgstr "unzulässige Anzahl von Konstanten"
 
-#: src/main/eval.c:5579
+#: src/main/eval.c:6375
 msgid "profile timer in use"
 msgstr "Profiling-Zeitmessung läuft"
 
-#: src/main/eval.c:5581
+#: src/main/eval.c:6377
 msgid "already byte code profiling"
 msgstr "Bytecode-Profiling läuft bereits"
 
-#: src/main/eval.c:5599
+#: src/main/eval.c:6395
 msgid "setting profile timer failed"
 msgstr "Stellen des Profile-Zeitnehmers fehlgeschlagen"
 
-#: src/main/eval.c:5616
+#: src/main/eval.c:6412
 msgid "not byte code profiling"
-msgstr "Byte Code Profiling läuft nicht"
+msgstr "Bytecodeprofiling läuft nicht"
+
+#: src/main/eval.c:6427 src/main/eval.c:6430 src/main/eval.c:6433
+msgid "byte code profiling is not supported in this build"
+msgstr "Bytecodeprofiling wird in diesem Binary nicht unterstützt"
 
 #: src/main/gevents.c:43
 #, c-format
@@ -3701,14 +3732,14 @@ msgstr "rekursive Nutzung von 'getGraphicsEvent' wird nicht unterstützt"
 msgid "no graphics event handlers set"
 msgstr "keine Verarbeitung für Grafikereignisse gesetzt"
 
-#: src/main/gram.y:222 src/main/gram.y:237 src/main/gram.y:2222
-#: src/main/gram.y:2236
+#: src/main/gram.y:222 src/main/gram.y:237 src/main/gram.y:2245
+#: src/main/gram.y:2259
 #, c-format
 msgid "EOF whilst reading MBCS char at line %d"
 msgstr "EOF beim Lesen von MBCS Zeichen in Zeile %d"
 
-#: src/main/gram.y:226 src/main/gram.y:234 src/main/gram.y:2226
-#: src/main/gram.y:2233
+#: src/main/gram.y:226 src/main/gram.y:234 src/main/gram.y:2249
+#: src/main/gram.y:2256
 #, c-format
 msgid "invalid multibyte character in parser at line %d"
 msgstr "ungültiges multibyte Zeichen im Parser in Zeile %d"
@@ -3723,138 +3754,152 @@ msgstr "Überlauf des Eingabebuffers in Zeile %d"
 msgid "incorrect tag type at line %d"
 msgstr "ungültiger tag-Typ in Zeile %d"
 
-#: src/main/gram.y:1653
+#: src/main/gram.y:1657
 msgid "contextstack overflow"
-msgstr "Kontextstacküberlauf"
+msgstr "Kontextstack-Überlauf"
 
-#: src/main/gram.y:1890
-msgid "input"
-msgstr "Eingabe"
+#: src/main/gram.y:1907 src/main/gram.y:1913
+#, c-format
+msgid "unexpected input"
+msgstr "unerwartete Eingabe"
 
-#: src/main/gram.y:1891
-msgid "end of input"
-msgstr "Ende der Eingabe"
+#: src/main/gram.y:1910 src/main/main.c:311
+#, c-format
+msgid "unexpected end of input"
+msgstr "unerwartetes Ende der Eingabe"
 
-#: src/main/gram.y:1892
-msgid "string constant"
-msgstr "Zeichenkettenkonstante"
+#: src/main/gram.y:1916
+#, c-format
+msgid "unexpected string constant"
+msgstr "unerwartete Zeichenkettenkonstante"
 
-#: src/main/gram.y:1893
-msgid "numeric constant"
-msgstr "numerische Konstante"
+#: src/main/gram.y:1919
+#, c-format
+msgid "unexpected numeric constant"
+msgstr "unerwartete numerische Konstante"
 
-#: src/main/gram.y:1894
-msgid "symbol"
-msgstr "Symbol"
+#: src/main/gram.y:1922
+#, c-format
+msgid "unexpected symbol"
+msgstr "unerwartetes Symbol"
 
-#: src/main/gram.y:1895
-msgid "assignment"
-msgstr "Zuweisung"
+#: src/main/gram.y:1925
+#, c-format
+msgid "unexpected assignment"
+msgstr "unerwartete Zuweisung"
 
-#: src/main/gram.y:1896
-msgid "end of line"
-msgstr "Zeilenende"
+#: src/main/gram.y:1928
+#, c-format
+msgid "unexpected end of line"
+msgstr "unerwartetes Zeilenende"
 
-#: src/main/gram.y:1910 src/main/gram.y:1916
+#: src/main/gram.y:1931 src/main/gram.y:1939
 #, c-format
 msgid "unexpected %s"
 msgstr "Unerwartete(s) %s"
 
-#: src/main/gram.y:1926
+#: src/main/gram.y:1951
 #, c-format
 msgid "repeated formal argument '%s' on line %d"
 msgstr "wiederholtes formales Argument '%s' in Zeile %d"
 
-#: src/main/gram.y:2136
+#: src/main/gram.y:2161
 #, c-format
 msgid "integer literal %s contains decimal; using numeric value"
 msgstr "ganzzahliges Literal %s enthält ein Komma; nutze den numerischen Wert"
 
-#: src/main/gram.y:2140
+#: src/main/gram.y:2164
 #, c-format
 msgid "non-integer value %s qualified with L; using numeric value"
 msgstr ""
 "nicht-ganzzahliger Wert %s mit L qualifiziert; nutze den numerischen Wert"
 
-#: src/main/gram.y:2153
+#: src/main/gram.y:2176
 #, c-format
 msgid "integer literal %s contains unnecessary decimal point"
 msgstr "ganzzahliges Literal %s enthält unnötiges Komma"
 
-#: src/main/gram.y:2185
+#: src/main/gram.y:2208
 #, c-format
 msgid "unable to allocate buffer for long string at line %d"
 msgstr ""
 "kann nicht genug Speicher für lange Zeichenkette in Zeile %d allozieren"
 
-#: src/main/gram.y:2338
+#: src/main/gram.y:2347 src/main/gram.y:2370 src/main/gram.y:2407
+#: src/main/gram.y:2443
+#, c-format
+msgid "nul character not allowed (line %d)"
+msgstr "nul Zeichen nicht erlaubt (Zeile %d)"
+
+#: src/main/gram.y:2363
 #, c-format
 msgid "'\\x' used without hex digits in character string starting \"%s\""
 msgstr ""
 "\\x' ohne Hex-Ziffern in der Zeichenkette beginnened mit \"%s\" genutzt"
 
-#: src/main/gram.y:2352
+#: src/main/gram.y:2379
 #, c-format
 msgid "\\uxxxx sequences not supported inside backticks (line %d)"
 msgstr ""
 "\\uxxxx Sequenzen werden nicht zwischen backticks unterstützt (Zeile %d)"
 
-#: src/main/gram.y:2367
+#: src/main/gram.y:2394
 #, c-format
 msgid "'\\u' used without hex digits in character string starting \"%s\""
 msgstr "\\u' ohne Hex-Ziffern in der Zeichekette beginnend mit \"%s\" genutzt"
 
-#: src/main/gram.y:2375
+#: src/main/gram.y:2402
 #, c-format
 msgid "invalid \\u{xxxx} sequence (line %d)"
 msgstr "ungültige \\u{xxxx} Sequenz (Zeile %d)"
 
-#: src/main/gram.y:2387
+#: src/main/gram.y:2416
 #, c-format
 msgid "\\Uxxxxxxxx sequences not supported inside backticks (line %d)"
 msgstr ""
 "\\Uxxxxxxx Sequenzen werden nicht zwischen backticks unterstützt (Zeile %d)"
 
-#: src/main/gram.y:2402
+#: src/main/gram.y:2431
 #, c-format
 msgid "'\\U' used without hex digits in character string starting \"%s\""
 msgstr ""
 "'\\U' ohne Hex-Ziffern in der Zeichenkette beginnend mit \"%s\" genutzt"
 
-#: src/main/gram.y:2410
+#: src/main/gram.y:2439
 #, c-format
 msgid "invalid \\U{xxxxxxxx} sequence (line %d)"
 msgstr "ungültige \\U{xxxxxxxx} Sequenz (Zeile %d)"
 
-#: src/main/gram.y:2451
+#: src/main/gram.y:2482
 #, c-format
 msgid "'\\%c' is an unrecognized escape in character string starting \"%s\""
 msgstr ""
 "'\\%c' ist eine unbekannte Escape-Sequenz in der Zeichenkette beginnend mit "
 "\"%s\""
 
-#: src/main/gram.y:2510
+#: src/main/gram.y:2546
 msgid "mixing Unicode and octal/hex escapes in a string is not allowed"
 msgstr ""
 "Unicode und oktale bzw. hexadezimale Escapecodes in einer Zeichenkette zu "
 "mischen ist nicht zulässig."
 
-#: src/main/gram.y:2514
+#: src/main/gram.y:2550
 #, c-format
 msgid ""
 "string at line %d containing Unicode escapes not in this locale\n"
 "is too long (max 10000 chars)"
 msgstr ""
-"Zeichenkette in Zeile %d mit Unicodeescapes nicht aus dieser Lokalisierung\n"
+"Zeichenkette in Zeile %d mit Unicode-Escapecodes nicht aus dieser "
+"Lokalisierung\n"
 "ist zu lang (max. 1000 Zeichen)"
 
-#: src/main/gram.y:3112 src/main/gram.y:3119 src/main/gram.y:3125
-#: src/main/gram.y:3132
+#: src/main/gram.y:3148 src/main/gram.y:3155 src/main/gram.y:3161
+#: src/main/gram.y:3168
 #, c-format
 msgid "contextstack overflow at line %d"
 msgstr "Kontextstack-Überlauf in Zeile %d"
 
-#: src/main/gram.y:3227
+#: src/main/gram.y:3263
 #, c-format
 msgid "internal parser error at line %d"
 msgstr "interner Parserfehler in Zeile %d"
@@ -3864,34 +3909,34 @@ msgstr "interner Parserfehler in Zeile %d"
 msgid "relative range of values =%4.0f * EPS, is small (axis %d)"
 msgstr "relativer Wertebereich =%4.0f * EPS ist klein (Achse %d)"
 
-#: src/main/grep.c:93
+#: src/main/grep.c:96
 #, c-format
 msgid "invalid regular expression '%s', reason '%s'"
 msgstr "ungültiger regulärer Ausdruck '%s', Grund '%s'"
 
-#: src/main/grep.c:95
+#: src/main/grep.c:98
 #, c-format
 msgid "invalid regular expression, reason '%s'"
 msgstr "ungültiger regulärer Ausdruck '%s'"
 
-#: src/main/grep.c:220 src/main/grep.c:308 src/main/grep.c:416
-#: src/main/grep.c:883 src/main/grep.c:2473
+#: src/main/grep.c:225 src/main/grep.c:315 src/main/grep.c:426
+#: src/main/grep.c:900 src/main/grep.c:2499
 #, c-format
 msgid "input string %d is invalid UTF-8"
-msgstr "Eingabezeichenkette %d ist unkorrektes UTF-8"
+msgstr "Eingabe-Zeichenkette %d ist ungültig in UTF-8"
 
-#: src/main/grep.c:286 src/main/grep.c:383
+#: src/main/grep.c:292 src/main/grep.c:391
 #, c-format
 msgid "'split' string %d is invalid UTF-8"
-msgstr "'split' Zeichenkette %d ist unkorrektes UTF-8"
+msgstr "'split' Zeichenkette %d ist inkorrektes UTF-8"
 
-#: src/main/grep.c:290 src/main/grep.c:387 src/main/grep.c:560
+#: src/main/grep.c:296 src/main/grep.c:395 src/main/grep.c:571
 #, c-format
 msgid "'split' string %d is invalid in this locale"
 msgstr "'split' Zeichenkette %d ist ungültig in dieser Lokalisierung"
 
-#: src/main/grep.c:395 src/main/grep.c:851 src/main/grep.c:1600
-#: src/main/grep.c:2394
+#: src/main/grep.c:404 src/main/grep.c:867 src/main/grep.c:1621
+#: src/main/grep.c:2419
 #, c-format
 msgid ""
 "PCRE pattern compilation error\n"
@@ -3902,13 +3947,13 @@ msgstr ""
 "\t'%s'\n"
 "\tat '%s'\n"
 
-#: src/main/grep.c:397
+#: src/main/grep.c:406
 #, c-format
 msgid "invalid split pattern '%s'"
 msgstr "ungültiges Teilungsmuster '%s'"
 
-#: src/main/grep.c:401 src/main/grep.c:857 src/main/grep.c:1607
-#: src/main/grep.c:2401
+#: src/main/grep.c:410 src/main/grep.c:873 src/main/grep.c:1628
+#: src/main/grep.c:2426
 #, c-format
 msgid ""
 "PCRE pattern study error\n"
@@ -3917,47 +3962,47 @@ msgstr ""
 "PCRE Fehler bei der Musteruntersuchung\n"
 "\\t'%s'\n"
 
-#: src/main/grep.c:834 src/main/grep.c:2377
+#: src/main/grep.c:849 src/main/grep.c:2401
 msgid "regular expression is invalid UTF-8"
 msgstr "regulärer Ausdruck ist kein gültiges UTF-8"
 
-#: src/main/grep.c:853 src/main/grep.c:1602 src/main/grep.c:2396
+#: src/main/grep.c:869 src/main/grep.c:1623 src/main/grep.c:2421
 #, c-format
 msgid "invalid regular expression '%s'"
 msgstr "ungültige regular expression '%s'"
 
-#: src/main/grep.c:1264
+#: src/main/grep.c:1282
 msgid "pattern matches an empty string infinitely, returning first match only"
 msgstr ""
 "Das Muster passt unendlich oft auf eine leere Zeichenkette, nur erster\n"
 "Treffer zurückgegeben"
 
-#: src/main/grep.c:1575
+#: src/main/grep.c:1595
 msgid "'pattern' is invalid UTF-8"
 msgstr "'pattern' ist kein gültiges UTF-8"
 
-#: src/main/grep.c:1577
+#: src/main/grep.c:1597
 msgid "'replacement' is invalid UTF-8"
 msgstr "'replacement' ist kein gültiges UTF-8"
 
-#: src/main/grep.c:1581
+#: src/main/grep.c:1601
 msgid "'pattern' is invalid in this locale"
 msgstr "'pattern' ist ungültig in dieser Lokalisierung"
 
-#: src/main/grep.c:1584
+#: src/main/grep.c:1604
 msgid "'replacement' is invalid in this locale"
 msgstr "'replacement' ist ungültig in dieser Lokalisierung"
 
-#: src/main/grep.c:1589
+#: src/main/grep.c:1609
 msgid "zero-length pattern"
 msgstr "Muster mit Länge 0"
 
-#: src/main/grep.c:1732 src/main/grep.c:1748 src/main/grep.c:1796
-#: src/main/grep.c:1812 src/main/grep.c:1859 src/main/grep.c:1875
+#: src/main/grep.c:1753 src/main/grep.c:1769 src/main/grep.c:1817
+#: src/main/grep.c:1833 src/main/grep.c:1880 src/main/grep.c:1896
 msgid "result string is too long"
 msgstr "Ergebnis-Zeichenkette ist zu lang"
 
-#: src/main/grep.c:2411
+#: src/main/grep.c:2436
 #, c-format
 msgid "'pcre_fullinfo' returned '%d' "
 msgstr "'pcre_fullinfo' lieferte '%d' zurück"
@@ -3966,78 +4011,71 @@ msgstr "'pcre_fullinfo' lieferte '%d' zurück"
 msgid "ignoring non-pairlist attributes"
 msgstr "ignoriere Attribute, die keine Paarliste sind"
 
-#: src/main/internet.c:92
+#: src/main/internet.c:83
 msgid "internet routines cannot be accessed in module"
-msgstr "Internetroutinen können nicht im Modul angesprochen werden"
+msgstr "Internet-Routinen können nicht angesprochen werden im Modul"
 
-#: src/main/internet.c:103 src/main/internet.c:141 src/main/internet.c:154
-#: src/main/internet.c:165 src/main/internet.c:176 src/main/internet.c:187
-#: src/main/internet.c:196 src/main/internet.c:207 src/main/internet.c:218
-#: src/main/internet.c:227 src/main/internet.c:237
+#: src/main/internet.c:94 src/main/internet.c:128 src/main/internet.c:141
+#: src/main/internet.c:152 src/main/internet.c:163 src/main/internet.c:174
+#: src/main/internet.c:183 src/main/internet.c:194 src/main/internet.c:205
+#: src/main/internet.c:214 src/main/internet.c:224 src/main/internet.c:338
+#: src/main/internet.c:349 src/main/internet.c:360 src/main/internet.c:372
 msgid "internet routines cannot be loaded"
-msgstr "Internet Routinen können nicht geladen werden"
+msgstr "Internet-Routinen können nicht geladen werden"
 
-#: src/main/internet.c:118 src/main/memory.c:3434 src/main/memory.c:3444
-#: src/main/memory.c:3456 src/main/memory.c:3470 src/main/memory.c:3487
-#: src/main/memory.c:3505
+#: src/main/internet.c:109 src/main/memory.c:3490 src/main/memory.c:3500
+#: src/main/memory.c:3512 src/main/memory.c:3526 src/main/memory.c:3541
+#: src/main/memory.c:3559
 msgid "bad value"
 msgstr "unbrauchbarer Wert"
 
-#: src/main/internet.c:124
-msgid "internet routines were already initialized"
-msgstr "Internet Routinen sind bereits initialisiert"
-
-#: src/main/internet.c:251 src/main/internet.c:265 src/main/internet.c:281
-#: src/main/internet.c:293 src/main/internet.c:307 src/main/internet.c:327
-#: src/main/internet.c:340
+#: src/main/internet.c:238 src/main/internet.c:252 src/main/internet.c:268
+#: src/main/internet.c:280 src/main/internet.c:294 src/main/internet.c:314
+#: src/main/internet.c:327
 msgid "socket routines cannot be loaded"
-msgstr "Socket Routinen können nicht geladen werden"
+msgstr "Socket-Routinen können nicht geladen werden"
 
 #: src/main/lapack.c:39
 msgid "LAPACK routines cannot be accessed in module"
-msgstr "LAPACK Routinen  nicht verfügbar aus Modul"
+msgstr "LAPACK-Routinen  nicht verfügbar aus Modul"
 
 #: src/main/lapack.c:53
 msgid "LAPACK routines cannot be loaded"
-msgstr "LAPACK Routinen können nicht geladen werden"
-
-#: src/main/logic.c:70
-msgid "binary operations require two arguments"
-msgstr "binäre Operationen verlangen zwei Argumente"
+msgstr "LAPACK-Routinen können nicht geladen werden"
 
-#: src/main/logic.c:88 src/main/logic.c:150
+#: src/main/logic.c:79 src/main/logic.c:141
 msgid "operations are possible only for numeric, logical or complex types"
 msgstr ""
 "Operationen sind nur für numerische, logische oder komplexe Typen möglich"
 
-#: src/main/logic.c:98
+#: src/main/logic.c:89
 msgid "binary operation on non-conformable arrays"
 msgstr "binäre Operation auf nicht passenden Arrays"
 
-#: src/main/logic.c:124 src/main/relop.c:247
+#: src/main/logic.c:115 src/main/relop.c:247
 msgid "non-conformable time series"
 msgstr "nicht zusammenpassende Zeitreihen"
 
-#: src/main/logic.c:254
+#: src/main/logic.c:245
 #, c-format
 msgid "'%s' operator requires 2 arguments"
 msgstr "'%s' Operator benötigt 2 Argumente"
 
-#: src/main/logic.c:261
+#: src/main/logic.c:252
 #, c-format
 msgid "invalid 'x' type in 'x %s y'"
 msgstr "ungültiger 'x' Typ in 'x %s y'"
 
-#: src/main/logic.c:268
+#: src/main/logic.c:259
 #, c-format
 msgid "invalid 'y' type in 'x %s y'"
 msgstr "ungültiger 'y' Typ in 'x %s y'"
 
-#: src/main/logic.c:341
+#: src/main/logic.c:332
 msgid "Unary operator `!' called with two arguments"
 msgstr "Unärer Operator `!' mit zwei Argumenten aufgerufen"
 
-#: src/main/logic.c:448
+#: src/main/logic.c:437
 #, c-format
 msgid "coercing argument of type '%s' to logical"
 msgstr "wandle Argument des Typs '%s' nach boolesch"
@@ -4046,63 +4084,63 @@ msgstr "wandle Argument des Typs '%s' nach boolesch"
 msgid "dummy - do not translate"
 msgstr ""
 
-#: src/main/main.c:476
+#: src/main/main.c:481
 msgid "Error: segfault from C stack overflow\n"
-msgstr "Fehler: segmentation fault wegen eines C-Stack Überlaufes\n"
+msgstr "Fehler: segmentation fault wegen eines C-Stack-Überlaufes\n"
 
-#: src/main/main.c:846
+#: src/main/main.c:853
 msgid "unable to open the base package\n"
 msgstr "kann das base Paket nicht öffnen\n"
 
-#: src/main/main.c:924
+#: src/main/main.c:931
 #, c-format
 msgid "unable to restore saved data in %s\n"
 msgstr "kann die gespeicherten Daten aus %s nicht wiederherstellen\n"
 
-#: src/main/main.c:971
+#: src/main/main.c:978
 msgid "During startup - "
 msgstr "Beim Start - "
 
-#: src/main/main.c:1224
+#: src/main/main.c:1235
 msgid "cannot quit from browser"
 msgstr "kann Browser nicht beenden"
 
-#: src/main/main.c:1228
+#: src/main/main.c:1239
 msgid "one of \"yes\", \"no\", \"ask\" or \"default\" expected."
 msgstr "entweder \"yes\", \"no\", \"ask\" oder \"default\" erwartet."
 
-#: src/main/main.c:1233
+#: src/main/main.c:1244
 msgid "save=\"ask\" in non-interactive use: command-line default will be used"
 msgstr ""
 "save=\"ask\" in nicht-interaktiver Nutzung: Kommandozeilenstandard wird "
 "benutzt"
 
-#: src/main/main.c:1241
+#: src/main/main.c:1252
 msgid "unrecognized value of 'save'"
 msgstr "unbekannter Wert für 'save'"
 
-#: src/main/main.c:1244
+#: src/main/main.c:1255
 msgid "invalid 'status', 0 assumed"
 msgstr "ungültiger 'status', nehme 0 an"
 
-#: src/main/main.c:1249
+#: src/main/main.c:1260
 msgid "invalid 'runLast', FALSE assumed"
 msgstr "ungültiger Wert für 'runLast', nehme FALSE an"
 
-#: src/main/main.c:1280
+#: src/main/main.c:1291
 msgid "cannot allocate space for toplevel callback element"
 msgstr "kann keinen Speicher für toplevel callback zuteilen"
 
-#: src/main/main.c:1358
+#: src/main/main.c:1369
 msgid "negative index passed to R_removeTaskCallbackByIndex"
 msgstr "negativer Index an R_removeTaskCallbackByIndex übergeben"
 
-#: src/main/main.c:1468
+#: src/main/main.c:1479
 #, c-format
 msgid "warning messages from top-level task callback '%s'\n"
 msgstr "Warnmeldung vom toplevel task callback '%s'\n"
 
-#: src/main/main.c:1524
+#: src/main/main.c:1535
 msgid "top-level task callback did not return a logical value"
 msgstr "toplevel task callback gibt keinen logischen Wert zurück"
 
@@ -4125,230 +4163,223 @@ msgstr ""
 msgid "invalid partial string match"
 msgstr "ungültige Teilzeichenketten-übereinstimmung"
 
-#: src/main/match.c:228 src/main/match.c:268 src/main/objects.c:56
-#: src/main/objects.c:66
+#: src/main/match.c:228 src/main/match.c:266 src/main/objects.c:49
+#: src/main/objects.c:59
 #, c-format
 msgid "formal argument \"%s\" matched by multiple actual arguments"
 msgstr "formales Argument \"%s\" passt zu mehreren gegebenen Argumenten"
 
-#: src/main/match.c:231 src/main/match.c:266
+#: src/main/match.c:231 src/main/match.c:264
 #, c-format
 msgid "argument %d matches multiple formal arguments"
 msgstr "Argument %d passt auf mehrere formale Argumente"
 
-#: src/main/match.c:272
+#: src/main/match.c:270
 #, c-format
 msgid "partial argument match of '%s' to '%s'"
 msgstr "partielle Übereinstimmung des Argumentes '%s' mit '%s'"
 
-#: src/main/match.c:383
+#: src/main/match.c:380
 #, c-format
 msgid "unused argument %s"
 msgid_plural "unused arguments %s"
 msgstr[0] "unbenutztes Argument %s"
 msgstr[1] "unbenutzte Argumente %s"
 
-#: src/main/memory.c:1232
+#: src/main/memory.c:1238
 msgid "can only weakly reference/finalize reference objects"
 msgstr "kann referenzierte Objekte nur schwach referenzieren/finalisieren"
 
-#: src/main/memory.c:1266
+#: src/main/memory.c:1272
 msgid "finalizer must be a function or NULL"
 msgstr "Finalisierer muss entweder Funktion sein oder NULL"
 
-#: src/main/memory.c:1322 src/main/memory.c:1330 src/main/memory.c:1341
+#: src/main/memory.c:1328 src/main/memory.c:1336 src/main/memory.c:1347
 msgid "not a weak reference"
 msgstr "keine schwache Referenz"
 
-#: src/main/memory.c:1472
+#: src/main/memory.c:1478
 msgid "first argument must be environment or external pointer"
 msgstr "erstes Argument muss entweder Umgebung oder externer Zeiger sein"
 
-#: src/main/memory.c:1474
+#: src/main/memory.c:1480
 msgid "second argument must be a function"
 msgstr "zweites Argument muss eine Funktion sein"
 
-#: src/main/memory.c:1478
+#: src/main/memory.c:1484
 msgid "third argument must be 'TRUE' or 'FALSE'"
 msgstr "drittes Argument muss 'TRUE' oder 'FALSE' sein"
 
-#: src/main/memory.c:1970
+#: src/main/memory.c:1978
 msgid "vector memory exhausted (limit reached?)"
 msgstr "Vektorspeicher erschöpft (Limit erreicht?)"
 
-#: src/main/memory.c:1976
+#: src/main/memory.c:1984
 msgid "cons memory exhausted (limit reached?)"
 msgstr "Cons-Speicher erschöpft (Limit erreicht?)"
 
-#: src/main/memory.c:1981
+#: src/main/memory.c:1989
 msgid "memory exhausted (limit reached?)"
 msgstr "Speicher erschöpft (Limit erreicht?)"
 
-#: src/main/memory.c:2116
+#: src/main/memory.c:2125
 #, c-format
 msgid "cannot allocate memory block of size %0.f Tb"
 msgstr "kann Speicherblock der Größe %0.f Tb nicht allozieren"
 
-#: src/main/memory.c:2121
+#: src/main/memory.c:2130
 #, c-format
 msgid "cannot allocate memory block of size %0.1f Gb"
 msgstr "kann Speicherblock der Größe %0.1f GB nicht zuteilen"
 
-#: src/main/memory.c:2442
+#: src/main/memory.c:2457
 msgid "vector is too large"
 msgstr "Vektor ist zu groß"
 
-#: src/main/memory.c:2445
+#: src/main/memory.c:2460
 msgid "negative length vectors are not allowed"
 msgstr "Vektoren negativer Länge sind nicht erlaubt"
 
-#: src/main/memory.c:2471 src/main/memory.c:2484 src/main/memory.c:2497
-#: src/main/memory.c:2512
+#: src/main/memory.c:2486 src/main/memory.c:2499 src/main/memory.c:2512
+#: src/main/memory.c:2527
 #, c-format
 msgid "cannot allocate vector of length %d"
 msgstr "kann Vektor der Länge %d nicht allozieren"
 
-#: src/main/memory.c:2533
+#: src/main/memory.c:2548
 #, c-format
 msgid "invalid type/length (%s/%d) in vector allocation"
 msgstr "ungültiger Typ/Länge (%s/%d) bei der Vektorallokation"
 
-#: src/main/memory.c:2636
+#: src/main/memory.c:2647
 #, c-format
 msgid "cannot allocate vector of size %0.1f Gb"
 msgstr "kann Vektor der Größe %0.1f GB nicht allozieren"
 
-#: src/main/memory.c:2640
+#: src/main/memory.c:2651
 #, c-format
 msgid "cannot allocate vector of size %0.1f Mb"
 msgstr "kann Vektor der Größe %0.1f MB nicht allozieren"
 
-#: src/main/memory.c:2644
+#: src/main/memory.c:2655
 #, c-format
 msgid "cannot allocate vector of size %0.f Kb"
 msgstr "kann Vektor der Größe %0.f KB nicht allozieren"
 
-#: src/main/memory.c:3001
+#: src/main/memory.c:3052
 msgid "protect(): protection stack overflow"
 msgstr "protect(): protection stack Überlauf"
 
-#: src/main/memory.c:3008
+#: src/main/memory.c:3059
 #, c-format
-msgid "unprotect(): only %d protected items"
-msgstr "unprotect(): nur %d geschützte Elemente"
+msgid "unprotect(): only %d protected item"
+msgid_plural "unprotect(): only %d protected items"
+msgstr[0] "unprotect(): nur %d geschütztes Element"
+msgstr[1] "unprotect(): nur %d geschützte Elemente"
 
-#: src/main/memory.c:3041
+#: src/main/memory.c:3094
 msgid "unprotect_ptr: pointer not found"
 msgstr "unprotect_ptr: Zeiger nicht gefunden"
 
-#: src/main/memory.c:3079
+#: src/main/memory.c:3132
 #, c-format
-msgid "R_Reprotect: only %d protected items, can't reprotect index %d"
-msgstr ""
-"R_Reprotect(): nur %d geschützte Elemente, kann Index %d nicht reprotecten"
+msgid "R_Reprotect: only %d protected item, can't reprotect index %d"
+msgid_plural "R_Reprotect: only %d protected items, can't reprotect index %d"
+msgstr[0] ""
+"R_Reprotect: nur %d geschütztes Element, kann Index %d nicht re-protecten"
+msgstr[1] ""
+"R_Reprotect: nur %d geschützte Elemente, kann Index %d nicht re-protecten"
 
-#: src/main/memory.c:3129
+#: src/main/memory.c:3184
 #, c-format
 msgid "'Calloc' could not allocate memory (%.0f of %u bytes)"
 msgstr "'Calloc' konnte keinen Speicher (%.0f von %u Bytes) zuteilen"
 
-#: src/main/memory.c:3140
+#: src/main/memory.c:3195
 #, c-format
 msgid "'Realloc' could not re-allocate memory (%.0f bytes)"
 msgstr "'Realloc' konnte keinen Speicher re-allozieren (%.0f Bytes)"
 
-#: src/main/memory.c:3380
+#: src/main/memory.c:3436
 msgid "not safe to return vector pointer"
 msgstr "Vektorzeigerrückgabe ist unsicher"
 
-#: src/main/memory.c:3392
+#: src/main/memory.c:3447
 #, c-format
 msgid "attempt to set index %lu/%lu in SET_STRING_ELT"
-msgstr "Versuch den Inde %lu/%lu in SET_STRING_ELT zu setzen"
+msgstr "Versuch den Index %lu/%lu in SET_STRING_ELT zu setzen"
 
-#: src/main/memory.c:3408
+#: src/main/memory.c:3463
 #, c-format
 msgid "attempt to set index %lu/%lu in SET_VECTOR_ELT"
-msgstr "Versuch den Inde %lu/%lu in SET_VECTOR_ELT zu setzen"
+msgstr "Versuch den Index %lu/%lu in SET_VECTOR_ELT zu setzen"
 
-#: src/main/memory.c:3658
+#: src/main/memory.c:3722
 msgid "memory profiling is not available on this system"
 msgstr "Speicherprofiling ist auf diesem System nicht verfügbar"
 
-#: src/main/memory.c:3723
+#: src/main/memory.c:3786
 #, c-format
 msgid "Rprofmem: cannot open output file '%s'"
 msgstr "Rprofmem: kann die Ausgabedatei '%s' nicht öffnen"
 
-#: src/main/memory.c:3830
+#: src/main/memory.c:3894
 #, c-format
 msgid "long vectors not supported yet: %s:%d"
 msgstr "lange Vektoren noch nicht unterstützt: %s:%d"
 
-#: src/main/names.c:996
+#: src/main/names.c:1021
 msgid "string argument required"
 msgstr "Zeichenkettenargument benötigt"
 
-#: src/main/names.c:999
+#: src/main/names.c:1024
 msgid "no such primitive function"
 msgstr "keine solche primitive Funktion"
 
-#: src/main/names.c:1146
+#: src/main/names.c:1212 src/main/names.c:1242
 msgid "attempt to use zero-length variable name"
 msgstr "Versuch einen Variablennamen der Länge 0 zu nutzen"
 
-#: src/main/names.c:1148
+#: src/main/names.c:1214 src/main/names.c:1244
 #, c-format
 msgid "variable names are limited to %d bytes"
 msgstr "Variablennamen sind auf %d Bytes beschränkt"
 
-#: src/main/names.c:1176 src/main/names.c:1179
+#: src/main/names.c:1307 src/main/names.c:1310
 msgid "invalid .Internal() argument"
 msgstr "ungültiges Argument für .Internal()"
 
-#: src/main/objects.c:46
+#: src/main/objects.c:39
 msgid "generic 'function' is not a function"
 msgstr "generische 'function' ist keine Funktion"
 
-#: src/main/objects.c:201
+#: src/main/objects.c:193
 msgid "bad generic call environment"
 msgstr "unbrauchbare generische Aufrufumgebung"
 
-#: src/main/objects.c:207
+#: src/main/objects.c:201
 msgid "bad generic definition environment"
 msgstr "unbrauchbare generische Definitionsumgebung"
 
-#: src/main/objects.c:246
+#: src/main/objects.c:249
 msgid ""
 "no '.S3MethodsClass' table, cannot use S4 objects with S3 methods ('methods' "
 "package not attached?)"
 msgstr ""
-"Keine Tabelle '.S3MethodsClass', kann keine S4 Objekte mit S3 Methoden "
+"Keine Tabelle '.S3MethodsClass', kann keine S4-Objekte mit S3-Methoden "
 "nutzen (Paket 'methods' nicht eingebunden?)"
 
-#: src/main/objects.c:270 src/main/objects.c:411
-msgid "'UseMethod' used in an inappropriate fashion"
-msgstr "'UseMethod' auf unangemessene Weise benutzt"
-
-#: src/main/objects.c:290
-msgid "invalid generic function in 'usemethod'"
-msgstr "ungültige generische Funktion in 'usemethod'"
-
-#: src/main/objects.c:399
+#: src/main/objects.c:415
 msgid "there must be a 'generic' argument"
 msgstr "es muss ein 'generic' Argument geben"
 
-#: src/main/objects.c:403
+#: src/main/objects.c:419
 msgid "'generic' argument must be a character string"
 msgstr "das 'generic' Argument muss eine Zeichenkette sein"
 
-#: src/main/objects.c:440
-msgid "'UseMethod' called from outside a function"
-msgstr "'UseMethod' außerhalb einer Funktion aufgerufen"
-
-#: src/main/objects.c:447
-msgid "first argument must be a generic name"
-msgstr "erstes Argument muss ein generischer Name sein"
+#: src/main/objects.c:427
+msgid "'UseMethod' used in an inappropriate fashion"
+msgstr "'UseMethod' auf unangemessene Weise benutzt"
 
 #: src/main/objects.c:472
 #, c-format
@@ -4356,106 +4387,101 @@ msgid "no applicable method for '%s' applied to an object of class \"%s\""
 msgstr ""
 "nicht anwendbare Methode für '%s' auf Objekt der Klasse \"%s\" angewendet"
 
-#: src/main/objects.c:533
+#: src/main/objects.c:558
 msgid "'NextMethod' called from outside a function"
 msgstr "'NextMethod' außerhalb einer Funktion aufgerufen"
 
-#: src/main/objects.c:539
+#: src/main/objects.c:564
 msgid "'NextMethod' called from an anonymous function"
 msgstr "'NextMethod' aus einer anonymen Funktion aufgerufen"
 
-#: src/main/objects.c:563
+#: src/main/objects.c:585
 msgid "no calling generic was found: was a method called directly?"
 msgstr ""
 "kein aufrufendes generic gefunden: Wurde eine Methode direkt aufgerufen?"
 
-#: src/main/objects.c:566
+#: src/main/objects.c:588
 #, c-format
 msgid "'function' is not a function, but of type %d"
 msgstr "'function' ist keine Funktion, sondern vom Typ %d"
 
-#: src/main/objects.c:640
+#: src/main/objects.c:615
 msgid "wrong argument ..."
 msgstr "falsches Argument ..."
 
-#: src/main/objects.c:653
+#: src/main/objects.c:627
 msgid "object not specified"
 msgstr "Objekt nicht spezifiziert"
 
-#: src/main/objects.c:663 src/main/objects.c:670
+#: src/main/objects.c:635 src/main/objects.c:642
 msgid "generic function not specified"
 msgstr "generische Funktion nicht spezifiziert"
 
-#: src/main/objects.c:667
+#: src/main/objects.c:639
 msgid "invalid generic argument to 'NextMethod'"
 msgstr "ungültiges generisches Argument zu 'NextMethod'"
 
-#: src/main/objects.c:680
+#: src/main/objects.c:651
 msgid "invalid 'group' argument found in 'NextMethod'"
 msgstr "ungültiges 'group' Argument in 'NextMethod' gefunden"
 
-#: src/main/objects.c:699
+#: src/main/objects.c:668
 msgid "wrong value for .Method"
 msgstr "falscher Wert für .Method"
 
-#: src/main/objects.c:703 src/main/objects.c:712
-#, c-format
-msgid "method name too long in '%s'"
-msgstr "Methodenname in '%s' zu lang"
-
-#: src/main/objects.c:715
+#: src/main/objects.c:678
 msgid "Incompatible methods ignored"
 msgstr "inkompatible Methoden ignoriert"
 
-#: src/main/objects.c:775 src/main/objects.c:780
+#: src/main/objects.c:735 src/main/objects.c:740
 msgid "no method to invoke"
 msgstr "Keine Methode für den Aufruf"
 
-#: src/main/objects.c:832
+#: src/main/objects.c:790
 msgid "cannot unclass an environment"
 msgstr "kann Klasse von Umgebung nicht entfernen"
 
-#: src/main/objects.c:835
+#: src/main/objects.c:793
 msgid "cannot unclass an external pointer"
 msgstr "kann Klasse von externem Zeiger nicht entfernen"
 
-#: src/main/objects.c:872
+#: src/main/objects.c:829
 msgid "'what' must be a character vector"
-msgstr "'what' muss eine Charaktervektor sein"
+msgstr "'what' muss ein Zeichenkettenvektor sein"
 
-#: src/main/objects.c:876
+#: src/main/objects.c:833
 msgid "'which' must be a length 1 logical vector"
 msgstr "'which' muss ein logischer Vektor der Länge 1 sein"
 
-#: src/main/objects.c:882
+#: src/main/objects.c:839
 msgid "use 'is()' instead of 'inherits()' on S4 objects"
-msgstr "benutze 'is()' statt 'inherits()' für S4 Objekte"
+msgstr "benutze 'is()' statt 'inherits()' für S4-Objekte"
 
-#: src/main/objects.c:1012
+#: src/main/objects.c:968
 msgid "could not find correct environment; please report!"
-msgstr "konnte die richtige Umgebung nicht finden: bitte melden!"
+msgstr "konnte die richtige Umgebung nicht finden: bitte R-devel melden!"
 
-#: src/main/objects.c:1052
+#: src/main/objects.c:1012
 msgid "'onOff' must be TRUE or FALSE"
 msgstr "'onOff' muss TRUE oder FALSE sein"
 
-#: src/main/objects.c:1119
+#: src/main/objects.c:1077
 #, c-format
 msgid "unable to find a non-generic version of function \"%s\""
 msgstr "kann nicht-generische Version der Funktion \"%s\" nicht finden"
 
-#: src/main/objects.c:1151
+#: src/main/objects.c:1109
 msgid ""
 "'standardGeneric' called without 'methods' dispatch enabled (will be ignored)"
 msgstr ""
-"'standardGeneric' aufgerufen Dispatch  aus 'methods' zu aktivieren(wird "
+"'standardGeneric' aufgerufen ohne Dispatch aus 'methods' zu aktivieren (wird "
 "ignoriert)"
 
-#: src/main/objects.c:1160
+#: src/main/objects.c:1118
 msgid "argument to 'standardGeneric' must be a non-empty character string"
 msgstr "Argument für 'standardGeneric' muss eine nicht-leere Zeichenkette sein"
 
-#: src/main/objects.c:1165
+#: src/main/objects.c:1123
 #, c-format
 msgid ""
 "call to standardGeneric(\"%s\") apparently not from the body of that generic "
@@ -4464,11 +4490,7 @@ msgstr ""
 "Aufruf von standardGeneric(\"%s\") anscheinend nicht aus dieser generischen "
 "Funktion heraus"
 
-#: src/main/objects.c:1189
-msgid "argument 'code' must be a character string"
-msgstr "Argument 'code' muss Zeichenkette sein"
-
-#: src/main/objects.c:1257
+#: src/main/objects.c:1214
 #, c-format
 msgid ""
 "invalid primitive methods code (\"%s\"): should be \"clear\", \"reset\", "
@@ -4477,11 +4499,11 @@ msgstr ""
 "Ungültiger Code für primitive Methode (\"%s\"): sollte entweder \"clear\", "
 "\"reset\", \"set\" oder \"suppress\" sein"
 
-#: src/main/objects.c:1265
+#: src/main/objects.c:1222
 msgid "invalid object: must be a primitive function"
 msgstr "ungültiges Objekt: muss eine primitive Funktion sein"
 
-#: src/main/objects.c:1312
+#: src/main/objects.c:1269
 #, c-format
 msgid ""
 "the formal definition of a primitive generic must be a function object (got "
@@ -4490,22 +4512,22 @@ msgstr ""
 "formale Definition einer primitiven Generischen muss ein Funktionsobjekt "
 "sein (war Typ '%s')"
 
-#: src/main/objects.c:1342
+#: src/main/objects.c:1299
 #, c-format
 msgid "object returned as generic function \"%s\" does not appear to be one"
 msgstr ""
 "Das Objekt, das als generische Funktion \"%s\" zurückgegeben wurde, scheint "
 "keine zu sein"
 
-#: src/main/objects.c:1444
+#: src/main/objects.c:1404
 msgid "invalid primitive operation given for dispatch"
 msgstr "ungültige primitive Operation für den Dispatch angegeben"
 
-#: src/main/objects.c:1470 src/main/objects.c:1489
+#: src/main/objects.c:1430 src/main/objects.c:1449
 msgid "dispatch error"
-msgstr "Dispatch Fehler"
+msgstr "Dispatch-Fehler"
 
-#: src/main/objects.c:1483
+#: src/main/objects.c:1443
 #, c-format
 msgid ""
 "primitive function \"%s\" has been set for methods but no generic function "
@@ -4514,32 +4536,36 @@ msgstr ""
 "primitive Funktion \"%s\" ist für Methoden gesetzt, aber keine generische "
 "Funktion angegeben"
 
-#: src/main/objects.c:1508
+#: src/main/objects.c:1468
 msgid "C level MAKE_CLASS macro called with NULL string pointer"
-msgstr "Makro MAKE_CLASS auf C Level mit NULL Zeichenkettenzeiger aufgerufen"
+msgstr "Makro MAKE_CLASS auf C Level mit Zeichenketten-NULL-Zeiger aufgerufen"
 
-#: src/main/objects.c:1524
+#: src/main/objects.c:1484
+msgid "'methods' package not yet loaded"
+msgstr "Paket 'method' noch nicht geladen"
+
+#: src/main/objects.c:1494
 msgid "R_getClassDef(.) called with NULL string pointer"
 msgstr "R_getClassDef(.) mit Zeichenketten NULL-Zeiger aufgerufen"
 
-#: src/main/objects.c:1546
+#: src/main/objects.c:1539
 msgid "C level NEW macro called with null class definition pointer"
 msgstr "Makro NEW auf C Level mit NULL Klassendefinitionszeiger aufgerufen"
 
-#: src/main/objects.c:1550
+#: src/main/objects.c:1543
 #, c-format
 msgid "trying to generate an object from a virtual class (\"%s\")"
 msgstr "Versuch, ein Objekt aus einer virtuelle Klasse (\"%s\") zu erzeugen"
 
-#: src/main/objects.c:1627
+#: src/main/objects.c:1625
 #, c-format
 msgid "object of class \"%s\" does not correspond to a valid S3 object"
 msgstr ""
-"Objekt der Klasse \"%s\" korrespondiert nicht mit einem gültigen S3 Objekt"
+"Objekt der Klasse \"%s\" korrespondiert nicht mit einem gültigen S3-Objekt"
 
-#: src/main/options.c:120 src/main/options.c:180
+#: src/main/options.c:120 src/main/options.c:181
 msgid "corrupted options list"
-msgstr "korrupte Optionsliste"
+msgstr "beschädigte Optionsliste"
 
 #: src/main/options.c:130
 msgid "invalid printing width, used 80"
@@ -4547,7 +4573,7 @@ msgstr "ungültige Ausgabeweite, nutze 80"
 
 #: src/main/options.c:141
 msgid "invalid printing digits, used 7"
-msgstr "unzulässige Anzahl von Stelle für die Ausgabe, nutze 7"
+msgstr "unzulässige Anzahl von Stellen für die Ausgabe, nutze 7"
 
 #: src/main/options.c:153
 msgid "invalid 'deparse.cutoff', used 60"
@@ -4557,39 +4583,39 @@ msgstr "unzulässiger 'deparse.cutoff', 60 benutzt"
 msgid "invalid value for \"device.ask.default\", using FALSE"
 msgstr "unzulässiger Wert für \"device.ask.default\", nutze FALSE"
 
-#: src/main/options.c:401
+#: src/main/options.c:414
 msgid "list argument has no valid names"
 msgstr "Listenargument hat keine zulässigen Namen"
 
-#: src/main/options.c:429
+#: src/main/options.c:443
 #, c-format
 msgid "invalid 'width' parameter, allowed %d...%d"
 msgstr "unzulässiger 'width' Parameter, erlaubt %d...%d"
 
-#: src/main/options.c:440
+#: src/main/options.c:454
 #, c-format
 msgid "invalid 'digits' parameter, allowed %d...%d"
 msgstr "unzulässiger 'digits' Parameter, erlaubt %d...%d"
 
-#: src/main/options.c:447
+#: src/main/options.c:461
 #, c-format
 msgid "'expressions' parameter invalid, allowed %d...%d"
 msgstr "'expressions' Parameter unzulässig, erlaubt %d...%d"
 
-#: src/main/options.c:454 src/main/options.c:462 src/main/options.c:468
-#: src/main/options.c:476 src/main/options.c:483 src/main/options.c:488
-#: src/main/options.c:495 src/main/options.c:501 src/main/options.c:507
-#: src/main/options.c:512 src/main/options.c:517 src/main/options.c:526
-#: src/main/options.c:532 src/main/options.c:538 src/main/options.c:549
-#: src/main/options.c:556 src/main/options.c:562 src/main/options.c:570
-#: src/main/options.c:577 src/main/options.c:584 src/main/options.c:591
-#: src/main/options.c:598 src/main/options.c:606 src/main/options.c:615
-#: src/main/options.c:618 src/main/options.c:624
+#: src/main/options.c:468 src/main/options.c:476 src/main/options.c:482
+#: src/main/options.c:490 src/main/options.c:497 src/main/options.c:502
+#: src/main/options.c:509 src/main/options.c:515 src/main/options.c:521
+#: src/main/options.c:526 src/main/options.c:531 src/main/options.c:540
+#: src/main/options.c:546 src/main/options.c:552 src/main/options.c:562
+#: src/main/options.c:572 src/main/options.c:578 src/main/options.c:586
+#: src/main/options.c:593 src/main/options.c:600 src/main/options.c:607
+#: src/main/options.c:614 src/main/options.c:622 src/main/options.c:631
+#: src/main/options.c:634 src/main/options.c:640
 #, c-format
 msgid "invalid value for '%s'"
 msgstr "ungültiger Wert für '%s'"
 
-#: src/main/options.c:611 src/main/options.c:640
+#: src/main/options.c:627 src/main/options.c:656
 msgid "\"par.ask.default\" has been replaced by \"device.ask.default\""
 msgstr "\"par.ask.default\" ist ersetzt worden durch \"device.ask.default\""
 
@@ -4609,15 +4635,15 @@ msgstr "Ergebnis wäre länger als 2^31-1 Bytes"
 msgid "non-string argument to Internal paste"
 msgstr "Nicht-Zeichenkette als Argument für internes paste"
 
-#: src/main/paste.c:390
+#: src/main/paste.c:387
 msgid "first argument must be atomic"
 msgstr "erstes Argument muss atomar sein"
 
-#: src/main/paste.c:560
+#: src/main/paste.c:558
 msgid "Impossible mode ( x )"
 msgstr "unmöglicher Modus ( x )"
 
-#: src/main/paste.c:645
+#: src/main/paste.c:643
 msgid "atomic vector arguments only"
 msgstr "nur atomare Vektorargumente"
 
@@ -4633,7 +4659,7 @@ msgstr "Schreibfehler während des Anhängens an Datei"
 msgid "nothing to append to"
 msgstr "nichts anzuhängen an"
 
-#: src/main/platform.c:448 src/main/platform.c:795
+#: src/main/platform.c:448 src/main/platform.c:793 src/main/platform.c:975
 msgid "invalid filename argument"
 msgstr "ungültiges Dateinamensargument"
 
@@ -4701,137 +4727,137 @@ msgstr "expandierter Name 'from' zu lang"
 
 #: src/main/platform.c:724 src/main/platform.c:734
 msgid "expanded 'to' name too long"
-msgstr "expandierter 'to' Name zu lang"
+msgstr "expandierter Name 'to' zu lang"
 
 #: src/main/platform.c:738
 #, c-format
 msgid "cannot rename file '%s' to '%s', reason '%s'"
 msgstr "kann Datei '%s' nicht in '%s' umbenennen. Grund '%s'"
 
-#: src/main/platform.c:1094
+#: src/main/platform.c:1164
 msgid "invalid 'pattern' regular expression"
 msgstr "ungültige regular expression für 'pattern'"
 
-#: src/main/platform.c:1211
+#: src/main/platform.c:1281
 msgid "unable to determine R home location"
 msgstr "kann R Home nicht finden"
 
-#: src/main/platform.c:1263
+#: src/main/platform.c:1334
 msgid "file name too long"
 msgstr "Dateiname zu lang"
 
-#: src/main/platform.c:1511 src/main/platform.c:1558 src/main/sysutils.c:1850
-#: src/main/sysutils.c:1864
+#: src/main/platform.c:1582 src/main/platform.c:1629 src/main/sysutils.c:1800
+#: src/main/sysutils.c:1814
 msgid "internal out-of-memory condition"
 msgstr "interner out-of-memory Vorfall"
 
-#: src/main/platform.c:1554 src/main/sysutils.c:1860
+#: src/main/platform.c:1625 src/main/sysutils.c:1810
 #, c-format
 msgid "read error on '%s'"
 msgstr "Lesefehler auf '%s'"
 
-#: src/main/platform.c:1722
+#: src/main/platform.c:1787
 msgid "setting 'LC_NUMERIC' may cause R to function strangely"
 msgstr "das Setzen von 'LC_NUMERIC' kann bewirken, dass R sich komisch benimmt"
 
-#: src/main/platform.c:1736
+#: src/main/platform.c:1801
 msgid "LC_MESSAGES exists on Windows but is not operational"
 msgstr "LC_MESSAGES existiert unter Windows, ist aber nicht funktionsfähig"
 
-#: src/main/platform.c:1763
+#: src/main/platform.c:1828
 #, c-format
 msgid "OS reports request to set locale to \"%s\" cannot be honored"
 msgstr ""
-"OS meldet: Anfrage Lokilisierung auf \"%s\" zu setzen kann nicht beachtet "
+"OS meldet: Anfrage Lokalisierung auf \"%s\" zu setzen kann nicht beachtet "
 "werden"
 
-#: src/main/platform.c:2065
+#: src/main/platform.c:2148
 msgid "'hostname' must be a character vector of length 1"
-msgstr "'hostname' muss eine Charaktervektor der Länge 1 sein"
+msgstr "'hostname' muss ein Zeichenkettenvektor der Länge 1 sein"
 
-#: src/main/platform.c:2071
+#: src/main/platform.c:2154
 #, c-format
 msgid "nsl() was unable to resolve host '%s'"
 msgstr "nsl() konnte Rechnernamen '%s' nicht auflösen"
 
-#: src/main/platform.c:2078
+#: src/main/platform.c:2161
 msgid "unknown format returned by C function 'gethostbyname'"
-msgstr "unbekanntes Format von der C Funktion  'gethostbyname' zurückgegeben"
+msgstr "unbekanntes Format von der C-Funktion 'gethostbyname' zurückgegeben"
 
-#: src/main/platform.c:2087
+#: src/main/platform.c:2170
 msgid "nsl() is not supported on this platform"
 msgstr "nsl() wird auf dieser Plattform nicht unterstützt"
 
-#: src/main/platform.c:2158
+#: src/main/platform.c:2241
 #, c-format
 msgid "'%s' already exists"
 msgstr "'%s' existiert bereits"
 
-#: src/main/platform.c:2161
+#: src/main/platform.c:2244
 #, c-format
 msgid "cannot create dir '%s', reason '%s'"
 msgstr "kann Verzeichnis '%s' nicht erzeugen. Grund '%s'"
 
-#: src/main/platform.c:2207
+#: src/main/platform.c:2290
 #, c-format
 msgid "'%ls' already exists"
 msgstr "'%ls' existiert bereits"
 
-#: src/main/platform.c:2211
+#: src/main/platform.c:2294
 #, c-format
 msgid "cannot create dir '%ls', reason '%s'"
 msgstr "kann Verzeichnis '%ls' nicht erzeugen, Grund '%s'"
 
-#: src/main/platform.c:2245 src/main/platform.c:2449
+#: src/main/platform.c:2328 src/main/platform.c:2537
 msgid "too deep nesting"
 msgstr "zu tiefe Verschachtelung"
 
-#: src/main/platform.c:2253 src/main/platform.c:2266 src/main/platform.c:2284
+#: src/main/platform.c:2336 src/main/platform.c:2349 src/main/platform.c:2367
 msgid "over-long path"
 msgstr "überlanger Pfad"
 
-#: src/main/platform.c:2273
+#: src/main/platform.c:2356
 #, c-format
 msgid "problem creating directory %ls: %s"
-msgstr "Problem beim erzeugen von Verzeichnis %ls: %s"
+msgstr "Problem beim Erzeugen von Verzeichnis %ls: %s"
 
-#: src/main/platform.c:2293
+#: src/main/platform.c:2376
 #, c-format
 msgid "problem reading dir %ls: %s"
 msgstr "Problem beim Lesen von Verzeichnis %ls: %s"
 
-#: src/main/platform.c:2304 src/main/platform.c:2465 src/main/platform.c:2478
-#: src/main/platform.c:2498 src/main/platform.c:2520
+#: src/main/platform.c:2387 src/main/platform.c:2553 src/main/platform.c:2566
+#: src/main/platform.c:2586 src/main/platform.c:2608
 msgid "over-long path length"
 msgstr "überlange Pfadlänge"
 
-#: src/main/platform.c:2312
+#: src/main/platform.c:2395
 #, c-format
 msgid "problem copying %ls to %ls: %s"
 msgstr "Problem %ls nach %ls zu kopieren: %s"
 
-#: src/main/platform.c:2487
+#: src/main/platform.c:2575
 #, c-format
 msgid "problem creating directory %s: %s"
 msgstr "Problem beim Erzeugen von Verzeichnis %s: %s"
 
-#: src/main/platform.c:2507
+#: src/main/platform.c:2595
 #, c-format
 msgid "problem reading directory %s: %s"
 msgstr "Problem beim Lesen aus Verzeichnis %s: %s"
 
-#: src/main/platform.c:2529
+#: src/main/platform.c:2617
 #, c-format
 msgid "problem copying %s to %s: %s"
 msgstr "Problem %s nach %s zu kopieren: %s"
 
-#: src/main/platform.c:2662
+#: src/main/platform.c:2754
 msgid "'mode' must be of length at least one"
 msgstr "'mode' muss Länge >= 1 haben"
 
-#: src/main/platform.c:2729
+#: src/main/platform.c:2821
 msgid "insufficient OS support on this platform"
-msgstr "ungenügende OS Unterstützung auf dieser Plattform"
+msgstr "ungenügende OS-Unterstützung auf dieser Plattform"
 
 #: src/main/plot3d.c:118
 #, c-format
@@ -4840,37 +4866,37 @@ msgstr "contour(): zirkuläre/lange Segmentliste -- festgelegtes %s > %d?"
 
 #: src/main/plot3d.c:196
 msgid "all z values are equal"
-msgstr "alle z Werte sind gleich"
+msgstr "alle z-Werte sind gleich"
 
 #: src/main/plot3d.c:198
 msgid "all z values are NA"
-msgstr "alle z Werte sind NA"
+msgstr "alle z-Werte sind NA"
 
 #: src/main/plotmath.c:333
 msgid "invalid math style encountered"
-msgstr "unzulässiger Math-Stil aufgetreten"
+msgstr "unzulässiger mathematischer Stil aufgetreten"
 
-#: src/main/plotmath.c:1261 src/main/plotmath.c:1366 src/main/plotmath.c:2664
+#: src/main/plotmath.c:1260 src/main/plotmath.c:1365 src/main/plotmath.c:2654
 msgid "invalid mathematical annotation"
 msgstr "unzulässige mathematische Annotation"
 
-#: src/main/plotmath.c:1670
+#: src/main/plotmath.c:1669
 msgid "invalid accent"
 msgstr "ungültiger Akzent"
 
-#: src/main/plotmath.c:1964
+#: src/main/plotmath.c:1963
 msgid "invalid group delimiter"
 msgstr "unzulässiger Gruppenbegrenzer"
 
-#: src/main/plotmath.c:1991 src/main/plotmath.c:2137
+#: src/main/plotmath.c:1990 src/main/plotmath.c:2127
 msgid "invalid group specification"
 msgstr "ungültige Gruppenspezifikation"
 
-#: src/main/plotmath.c:2062
+#: src/main/plotmath.c:2052
 msgid "group is incomplete"
 msgstr "Gruppe ist unvollständig"
 
-#: src/main/plotmath.c:3190
+#: src/main/plotmath.c:3180
 msgid "Metric information not available for this family/device"
 msgstr "Metrische Information für diese(s) Familie/Device nicht vorhanden"
 
@@ -4898,43 +4924,43 @@ msgstr "'gap' muss eine nicht-negative ganze Zahl sein"
 msgid "invalid 'tryS4' internal argument"
 msgstr "ungültiges internes Argument für 'tryS4'"
 
-#: src/main/print.c:1028
+#: src/main/print.c:1052
 msgid "invalid character length in 'dblepr'"
 msgstr "ungültige Zeichenkettenlänge in 'dblepr'"
 
-#: src/main/print.c:1046
+#: src/main/print.c:1070
 msgid "invalid character length in 'intpr'"
 msgstr "ungültige Zeichenkettenlänge in 'intpr'"
 
-#: src/main/print.c:1065
+#: src/main/print.c:1089
 msgid "invalid character length in 'realpr'"
 msgstr "ungültige Zeichenkettenlänge in 'realpr'"
 
-#: src/main/print.c:1075
+#: src/main/print.c:1099
 msgid "memory allocation error in 'realpr'"
 msgstr "Speicherallokationsfehler in 'realpr'"
 
-#: src/main/print.c:1091
+#: src/main/print.c:1115
 #, c-format
 msgid "BLAS/LAPACK routine '%6s' gave error code %d"
 msgstr "BLAS/LAPACK-Routine '%6s' gab Fehlercode %d"
 
-#: src/main/printarray.c:453
+#: src/main/printarray.c:327
 msgid "too few row labels"
 msgstr "zu wenig Zeilenlabel"
 
-#: src/main/printarray.c:455
+#: src/main/printarray.c:329
 msgid "too few column labels"
 msgstr "zu wenig Spaltenlabel"
 
-#: src/main/printarray.c:489
+#: src/main/printarray.c:363
 #, c-format
 msgid " [ reached getOption(\"max.print\") -- omitted %d row ]\n"
 msgid_plural " [ reached getOption(\"max.print\") -- omitted %d rows ]\n"
 msgstr[0] " [ erreichte getOption(\"max.print\") --  Zeile %d ausgelassen ]\n"
 msgstr[1] " [ erreichte getOption(\"max.print\") --  %d Zeilen ausgelassen ]\n"
 
-#: src/main/printutils.c:613
+#: src/main/printutils.c:688
 msgid "it is not known that wchar_t is Unicode on this platform"
 msgstr "es ist unbekannt, dass wchar_t ein Unicode auf dieser Platform ist"
 
@@ -4951,37 +4977,37 @@ msgstr "ungültige Argumente"
 msgid "NAs produced"
 msgstr "NAs produziert"
 
-#: src/main/random.c:445
+#: src/main/random.c:435
 msgid "NA in probability vector"
 msgstr "NA in Vektor von Wahrscheinlichkeiten"
 
-#: src/main/random.c:447
-msgid "non-positive probability"
-msgstr "nicht-positive Wahrscheinlichkeit"
+#: src/main/random.c:437
+msgid "negative probability"
+msgstr "negative Wahrscheinlichkeit"
 
-#: src/main/random.c:454
+#: src/main/random.c:444
 msgid "too few positive probabilities"
 msgstr "zu wenig positive Wahrscheinlichkeiten"
 
-#: src/main/random.c:491 src/main/random.c:519
+#: src/main/random.c:480 src/main/random.c:508
 msgid "cannot take a sample larger than the population when 'replace = FALSE'"
 msgstr ""
-"kann keine Stichprobe größer als die Grundgesamtheit nehmen\n"
+"kann keine Stichprobe größer als die Grundgesamtheit nehmen,\n"
 " wenn 'replace = FALSE'"
 
-#: src/main/random.c:498
+#: src/main/random.c:487
 msgid "incorrect number of probabilities"
 msgstr "falsche Anzahl von Wahrscheinlichkeiten"
 
-#: src/main/random.c:537
+#: src/main/random.c:526
 msgid "n >= 2^31, replace = FALSE is only supported on 64-bit platforms"
 msgstr "n >= 2^31, replace = FALSE ist nur auf 64-bit Plattformen unterstützt"
 
-#: src/main/raw.c:37 src/main/raw.c:273
+#: src/main/raw.c:37 src/main/raw.c:272
 msgid "argument must be a character vector of length 1"
-msgstr "Argument muss ein Charaktervektor der Länge 1 sein"
+msgstr "Argument muss ein Zeichenkettenvektor der Länge 1 sein"
 
-#: src/main/raw.c:39 src/main/raw.c:275
+#: src/main/raw.c:39 src/main/raw.c:274
 msgid ""
 "argument should be a character vector of length 1\n"
 "all but the first element will be ignored"
@@ -4993,25 +5019,21 @@ msgstr ""
 msgid "argument 'x' must be a raw vector"
 msgstr "Argument 'x' muss ein raw-Vektor sein"
 
-#: src/main/raw.c:56 src/main/raw.c:330
+#: src/main/raw.c:56 src/main/raw.c:331
 msgid "argument 'multiple' must be TRUE or FALSE"
-msgstr "Argument 'mulitple' muss TRUE oder FALSE sein"
+msgstr "Argument 'multiple' muss TRUE oder FALSE sein"
 
 #: src/main/raw.c:91
 msgid "argument 'shift' must be a small integer"
 msgstr "Argument 'shift' muss eine kleine ganze Zahl sein"
 
-#: src/main/raw.c:129 src/main/raw.c:327
+#: src/main/raw.c:129 src/main/raw.c:328
 msgid "argument 'x' must be an integer vector"
 msgstr "Argument 'x' muss ein Vektor ganzer Zahlen sein"
 
 #: src/main/raw.c:148
 msgid "argument 'x' must be raw, integer or logical"
-msgstr "Argument 'x' muss raw, ganzzahlig oder Boole'sch sein"
-
-#: src/main/raw.c:150
-msgid "argument 'type' must be a character string"
-msgstr "Argument 'type' muss Zeichenkette sein"
+msgstr "Argument 'x' muss raw, ganzzahlig oder boolesch sein"
 
 #: src/main/raw.c:154
 #, c-format
@@ -5022,9 +5044,9 @@ msgstr "Argument 'x' muss ein Vielfaches von %d lang sein"
 msgid "argument 'x' must not contain NAs"
 msgstr "Argument 'x' darf keine NAs enthalten"
 
-#: src/main/raw.c:285
+#: src/main/raw.c:286
 msgid "invalid UTF-8 string"
-msgstr "ungültige UTF-8 Zeichenkette"
+msgstr "ungültige UTF-8-Zeichenkette"
 
 #: src/main/relop.c:202
 #, c-format
@@ -5051,8 +5073,10 @@ msgstr "'a' und 'b' müssen vom selben Typ sein"
 #: src/main/saveload.c:223 src/main/saveload.c:232 src/main/saveload.c:241
 #: src/main/saveload.c:245 src/main/saveload.c:254 src/main/saveload.c:1381
 #: src/main/saveload.c:1386 src/main/saveload.c:1430 src/main/saveload.c:1498
-#: src/main/saveload.c:1507 src/main/serialize.c:331 src/main/serialize.c:338
-#: src/main/serialize.c:2388 src/main/serialize.c:2396
+#: src/main/saveload.c:1507 src/main/serialize.c:354 src/main/serialize.c:361
+#: src/main/serialize.c:374 src/main/serialize.c:378 src/main/serialize.c:405
+#: src/main/serialize.c:421 src/main/serialize.c:2429
+#: src/main/serialize.c:2437
 msgid "read error"
 msgstr "Lesefehler"
 
@@ -5088,13 +5112,13 @@ msgstr "Kompatibilitätsfehler in restore - keine Kompatibilität mit Version %d
 
 #: src/main/saveload.c:572 src/main/saveload.c:645
 msgid "bad SEXP type in data file"
-msgstr "unbrauchbarer SEXP Typ in Datenfile"
+msgstr "unbrauchbarer SEXP-Typ in Datendatei"
 
 #: src/main/saveload.c:586
 msgid "mismatch on types"
 msgstr "Typen passen nicht zusammen"
 
-#: src/main/saveload.c:607 src/main/saveload.c:1270 src/main/serialize.c:1636
+#: src/main/saveload.c:607 src/main/saveload.c:1270 src/main/serialize.c:1675
 #, c-format
 msgid "unrecognized internal function name \"%s\""
 msgstr "unerkannter interner Funktionsname \"%s\""
@@ -5107,8 +5131,8 @@ msgstr ""
 #: src/main/saveload.c:722
 msgid "cannot restore file position while restoring data"
 msgstr ""
-"kann Position in Datei nicht wiederherstellen, während ich Daten "
-"wiederherstelle"
+"kann Position in Datei nicht wiederherstellen, während Daten "
+"wiederhergestellt werden"
 
 #: src/main/saveload.c:915
 msgid "base namespace is not preserved in version 1 workspaces"
@@ -5135,7 +5159,7 @@ msgstr "NewWriteVec mit Nicht-Vektor Typ aufgerufen"
 
 #: src/main/saveload.c:1084
 msgid "cannot save byte code objects in version 1 workspaces"
-msgstr "kann Bytecodeobjekte nicht in Version 1 workspace sichern"
+msgstr "kann Bytecode-Objekte nicht in Version 1 Workspace sichern"
 
 #: src/main/saveload.c:1086
 #, c-format
@@ -5148,7 +5172,7 @@ msgstr "NewReadVec mit Nicht-Vektor Typ aufgerufen"
 
 #: src/main/saveload.c:1286
 msgid "cannot read byte code objects from version 1 workspaces"
-msgstr "kann keine Bytecodeobjekte aus Version 1 workspace laden"
+msgstr "kann keine Bytecodeobjekte aus Version 1 Workspace laden"
 
 #: src/main/saveload.c:1288
 #, c-format
@@ -5169,7 +5193,7 @@ msgstr "Speicher erschöpft beim Lesen einer binären Zeichenkette"
 
 #: src/main/saveload.c:1585
 msgid "a binary string read error occurred"
-msgstr "binärer Zeichenkettenlesefehler aufgetreten"
+msgstr "Lesefehler bei binärer Zeichenkette aufgetreten"
 
 #: src/main/saveload.c:1645
 msgid "an xdr integer data write error occurred"
@@ -5181,7 +5205,7 @@ msgstr "xdr Lesefehler bei integer Daten aufgetreten"
 
 #: src/main/saveload.c:1667 src/main/saveload.c:1686
 msgid "an xdr string data write error occurred"
-msgstr "xdr Schreibfehler bei Zeichenkettendaten aufgetreten"
+msgstr "xdr Schreibfehler bei Zeichenketten-Daten aufgetreten"
 
 #: src/main/saveload.c:1694
 msgid "an xdr real data write error occurred"
@@ -5193,15 +5217,15 @@ msgstr "xdr Lesefehler bei real Daten aufgetreten"
 
 #: src/main/saveload.c:1708
 msgid "an xdr complex data write error occurred"
-msgstr "xdr Schreibfehler bei complex aufgetreten"
+msgstr "xdr Schreibfehler bei complex Daten aufgetreten"
 
 #: src/main/saveload.c:1715
 msgid "an xdr complex data read error occurred"
 msgstr "xdr Lesefehler bei complex aufgetreten"
 
-#: src/main/saveload.c:1783 src/main/serialize.c:1958
-#: src/main/serialize.c:2568 src/modules/internet/internet.c:351
-#: src/modules/internet/internet.c:409 src/modules/internet/internet.c:514
+#: src/main/saveload.c:1783 src/main/serialize.c:1997
+#: src/main/serialize.c:2614 src/modules/internet/internet.c:513
+#: src/modules/internet/internet.c:590 src/modules/internet/internet.c:701
 msgid "write failed"
 msgstr "Schreibfehler"
 
@@ -5216,12 +5240,12 @@ msgstr "Restore Datei evtl. von neuerer R Version -- keine Daten geladen"
 #: src/main/saveload.c:1914
 msgid "bad restore file magic number (file may be corrupted) -- no data loaded"
 msgstr ""
-"unbrauchbare Restoredatei magic number (Datei evtl. korrupt) -- keine Daten "
-"geladen"
+"unbrauchbare Restore Datei magic number (Datei evtl. beschädigt) -- keine "
+"Daten geladen"
 
 #: src/main/saveload.c:1940 src/main/saveload.c:2238
 msgid "first argument must be a character vector"
-msgstr "erstes Argument muss ein Charaktervektor sein"
+msgstr "erstes Argument muss ein Zeichenkettenvektor sein"
 
 #: src/main/saveload.c:2012
 msgid "not a valid named list"
@@ -5230,23 +5254,23 @@ msgstr "keine gültige benannte Liste"
 #: src/main/saveload.c:2019 src/main/saveload.c:2040
 #, c-format
 msgid "'%s' looks like a pre-2.4.0 S4 object: please recreate it"
-msgstr "'%s' sieht aus wie ein pre R-2.4.0 Objekt: bitte neu erzeugen"
+msgstr "'%s' sieht aus wie ein prä R-2.4.0 S4-Objekt: bitte neu erzeugen"
 
 #: src/main/saveload.c:2027
 msgid "loaded data is not in pair list form"
-msgstr "geladene Daten sind nicht in Paarlisten Form"
+msgstr "geladene Daten sind nicht in Form von Paarlisten"
 
 #: src/main/saveload.c:2063
 msgid "first argument must be a file name"
 msgstr "erstes Argument muss ein Dateiname sein"
 
-#: src/main/saveload.c:2108 src/main/saveload.c:2134 src/main/serialize.c:826
-#: src/main/serialize.c:863 src/main/serialize.c:901
+#: src/main/saveload.c:2108 src/main/saveload.c:2134 src/main/serialize.c:864
+#: src/main/serialize.c:901 src/main/serialize.c:939
 msgid "XDR write failed"
 msgstr "XDR Schreibfehler"
 
-#: src/main/saveload.c:2121 src/main/saveload.c:2146 src/main/serialize.c:1362
-#: src/main/serialize.c:1398 src/main/serialize.c:1436
+#: src/main/saveload.c:2121 src/main/saveload.c:2146 src/main/serialize.c:1400
+#: src/main/serialize.c:1436 src/main/serialize.c:1474
 msgid "XDR read failed"
 msgstr "XDR Lesefehler"
 
@@ -5255,38 +5279,38 @@ msgstr "XDR Lesefehler"
 msgid "cannot save data -- unable to open '%s': %s"
 msgstr "kann Daten nicht sichern -- kann '%s': %s nicht öffnen"
 
-#: src/main/saveload.c:2254 src/main/serialize.c:2161
+#: src/main/saveload.c:2254 src/main/serialize.c:2202
 #, c-format
 msgid "cannot save to connections in version %d format"
 msgstr "kann nicht in Verbindungen in Version %d Format sichern"
 
-#: src/main/saveload.c:2277 src/main/serialize.c:2186
+#: src/main/saveload.c:2277 src/main/serialize.c:2227
 msgid "connection not open for writing"
 msgstr "Verbindungen nicht geöffnet zum Schreiben"
 
-#: src/main/saveload.c:2285
+#: src/main/saveload.c:2286
 msgid "cannot save XDR format to a text-mode connection"
 msgstr "kann XDR Format nicht in eine Verbindung im Textmodus sichern"
 
-#: src/main/saveload.c:2295 src/main/serialize.c:2066
-#: src/main/serialize.c:2080 src/main/serialize.c:2262
-#: src/main/serialize.c:2284
+#: src/main/saveload.c:2296 src/main/serialize.c:2105
+#: src/main/serialize.c:2119 src/main/serialize.c:2303
+#: src/main/serialize.c:2325
 msgid "error writing to connection"
 msgstr "Schreibfehler in Verbindung"
 
-#: src/main/saveload.c:2359 src/main/serialize.c:2234
+#: src/main/saveload.c:2357 src/main/serialize.c:2275
 msgid "connection not open for reading"
 msgstr "Verbindung nicht zum Lesen geöffnet"
 
-#: src/main/saveload.c:2360
+#: src/main/saveload.c:2358
 msgid "can only load() from a binary connection"
 msgstr "load() funktioniert nur aus binärer Verbindung"
 
-#: src/main/saveload.c:2371
+#: src/main/saveload.c:2369
 msgid "no input is available"
 msgstr "keine Eingabe verfügbar"
 
-#: src/main/saveload.c:2383
+#: src/main/saveload.c:2381
 msgid ""
 "the input does not start with a magic number compatible with loading from a "
 "connection"
@@ -5340,172 +5364,174 @@ msgstr "ungültiger Dezimaltrenner"
 msgid "invalid quote symbol set"
 msgstr "ungültige Menge von quote Symbolen"
 
-#: src/main/scan.c:987
+#: src/main/scan.c:988
 msgid "embedded nul(s) found in input"
-msgstr "Eingabe  enthält nul Zeichen"
+msgstr "Eingabe enthält nul Zeichen"
 
 #: src/main/seq.c:48
 msgid "unequal factor lengths"
-msgstr "ungleiche Faktor Längen"
+msgstr "ungleiche Faktorlängen"
 
 #: src/main/seq.c:100
 msgid "result would be too long a vector"
-msgstr "Resultat wäre zu langer Vektor"
+msgstr "Resultat wäre ein zu langer Vektor"
 
 #: src/main/seq.c:159
 msgid "argument of length 0"
 msgstr "Argument der Länge 0"
 
-#: src/main/seq.c:161 src/main/seq.c:163
+#: src/main/seq.c:162 src/main/seq.c:167
 #, c-format
-msgid "numerical expression has %d elements: only the first used"
-msgstr "numerischer Ausdruck hat %d Elemente: nur erstes wird genutzt"
+msgid "numerical expression has %d element: only the first used"
+msgid_plural "numerical expression has %d elements: only the first used"
+msgstr[0] "numerischer Ausdruck hat %d Element: nur erstes wird genutzt"
+msgstr[1] "numerischer Ausdruck hat %d Elemente: nur erstes wird genutzt"
 
-#: src/main/seq.c:167
+#: src/main/seq.c:173
 msgid "NA/NaN argument"
 msgstr "NA/NaN Argument"
 
-#: src/main/seq.c:331
+#: src/main/seq.c:337
 msgid "incorrect type for second argument"
 msgstr "falscher Typ für zweites Argument"
 
-#: src/main/seq.c:334
+#: src/main/seq.c:340
 #, c-format
 msgid "attempt to replicate an object of type '%s'"
 msgstr "Versuch ein Objekt vom Typ '%s' zu replizieren"
 
-#: src/main/seq.c:387
+#: src/main/seq.c:393
 msgid "attempt to replicate non-vector"
 msgstr "Versuch einen nicht-Vektor zu replizieren"
 
-#: src/main/seq.c:403
+#: src/main/seq.c:409
 msgid "cannot replicate NULL to a non-zero length"
 msgstr "kann NULL nicht auf positive Länge replizieren"
 
-#: src/main/seq.c:626 src/main/seq.c:633 src/main/seq.c:768 src/main/seq.c:979
+#: src/main/seq.c:630 src/main/seq.c:637 src/main/seq.c:766 src/main/seq.c:977
 #, c-format
 msgid "first element used of '%s' argument"
 msgstr "das erste Element des '%s' Arguments benutzt"
 
-#: src/main/seq.c:766
+#: src/main/seq.c:764
 msgid "'length.out' must be a non-negative number"
 msgstr "'length.out' muss eine nicht-negative Zahl sein"
 
-#: src/main/seq.c:790 src/main/seq.c:856 src/main/seq.c:873
+#: src/main/seq.c:788 src/main/seq.c:854 src/main/seq.c:871
 msgid "'from' must be finite"
 msgstr "'from' muss endlich sein"
 
-#: src/main/seq.c:792 src/main/seq.c:858 src/main/seq.c:895
+#: src/main/seq.c:790 src/main/seq.c:856 src/main/seq.c:893
 msgid "'to' must be finite"
 msgstr "'to' muss endlich sein"
 
-#: src/main/seq.c:804
+#: src/main/seq.c:802
 msgid "invalid '(to - from)/by' in 'seq'"
 msgstr "ungültiger Wert '(to - from)/by' in 'seq'"
 
-#: src/main/seq.c:816
+#: src/main/seq.c:814
 msgid "'by' argument is much too small"
 msgstr "'by' Argument ist viel zu klein"
 
-#: src/main/seq.c:818
+#: src/main/seq.c:816
 msgid "wrong sign in 'by' argument"
 msgstr "falsches Vorzeichen beim Argument für 'by'"
 
-#: src/main/seq.c:875 src/main/seq.c:897
+#: src/main/seq.c:873 src/main/seq.c:895
 msgid "'by' must be finite"
 msgstr "'by' muss endlich sein"
 
-#: src/main/seq.c:985 src/main/seq.c:990
+#: src/main/seq.c:983 src/main/seq.c:988
 msgid "argument must be coercible to non-negative integer"
 msgstr "Argument muss sich in eine nicht-negative ganze Zahl umwandeln lassen"
 
-#: src/main/serialize.c:224 src/main/serialize.c:254 src/main/serialize.c:277
+#: src/main/serialize.c:228 src/main/serialize.c:275 src/main/serialize.c:299
 msgid "unknown or inappropriate output format"
 msgstr "unbekanntes oder unpassendes Ausgabeformat"
 
-#: src/main/serialize.c:504
+#: src/main/serialize.c:542
 msgid "must specify ascii, binary, or xdr format"
 msgstr "ascii, binär oder xdr muss angegeben werden"
 
-#: src/main/serialize.c:505
+#: src/main/serialize.c:543
 msgid "unknown output format"
 msgstr "unbekanntes Ausgabeformat"
 
-#: src/main/serialize.c:536
+#: src/main/serialize.c:574
 msgid "unknown input format"
 msgstr "unbekanntes Eingabeformat"
 
-#: src/main/serialize.c:541
+#: src/main/serialize.c:579
 msgid "input format does not match specified format"
 msgstr "Eingabeformat passt nicht zum angegebenen Format"
 
-#: src/main/serialize.c:752
+#: src/main/serialize.c:790
 msgid "no restore method available"
 msgstr "keine Restore-Methode vorhanden"
 
-#: src/main/serialize.c:794
+#: src/main/serialize.c:832
 msgid "names in persistent strings are currently ignored"
 msgstr "Namen in persistenten Zeichenketten werden im Moment ignoriert"
 
-#: src/main/serialize.c:963
+#: src/main/serialize.c:1001
 #, c-format
 msgid "'%s' may not be available when loading"
 msgstr "'%s' evtl. nicht verfügbar während des Ladens"
 
-#: src/main/serialize.c:970
+#: src/main/serialize.c:1008
 msgid "namespaces may not be available when loading"
 msgstr "namespaces evtl. nicht verfügbar während des Ladens"
 
-#: src/main/serialize.c:1097
+#: src/main/serialize.c:1136
 #, c-format
 msgid "WriteItem: unknown type %i"
 msgstr "WriteItem: unbekannter Typ %i"
 
-#: src/main/serialize.c:1273
+#: src/main/serialize.c:1312
 #, c-format
 msgid "version %d not supported"
 msgstr "Version %d nicht unterstützt"
 
-#: src/main/serialize.c:1305
+#: src/main/serialize.c:1343
 msgid "reference index out of range"
 msgstr "Referenzindex außerhalb des Bereichs"
 
-#: src/main/serialize.c:1335
+#: src/main/serialize.c:1373
 msgid "names in persistent strings are not supported yet"
 msgstr "Namen in persistenten Zeichenketten werden noch nicht unterstützt"
 
-#: src/main/serialize.c:1463
+#: src/main/serialize.c:1501
 msgid "negative serialized length for vector"
 msgstr "negative serialisierte Länge für Vektor"
 
-#: src/main/serialize.c:1471
+#: src/main/serialize.c:1509
 msgid "invalid upper part of serialized vector length"
 msgstr "ungültiger oberer Teil der serialisierten Vektorlänge"
 
-#: src/main/serialize.c:1476
+#: src/main/serialize.c:1514
 msgid ""
 "negative serialized vector length:\n"
 "perhaps long vector from 64-bit version of R?"
 msgstr ""
-"negative Länge für einen serialisierten vektor:\n"
+"negative Länge für einen serialisierten Vektor:\n"
 "evtl. ein langer Vektor aus der 64-bit Version von R"
 
-#: src/main/serialize.c:1707
+#: src/main/serialize.c:1746
 msgid "this version of R cannot read class references"
 msgstr "diese R Version kann keine Klassenreferenzen lesen"
 
-#: src/main/serialize.c:1709
+#: src/main/serialize.c:1748
 msgid "this version of R cannot read generic function references"
-msgstr "diese R Version kann keine Referenzen auf generische Funktionen lesen"
+msgstr "diese R-Version kann keine Referenzen auf generische Funktionen lesen"
 
-#: src/main/serialize.c:1726
+#: src/main/serialize.c:1765
 #, c-format
 msgid "ReadItem: unknown type %i, perhaps written by later version of R"
 msgstr ""
 "ReadItem: unbekannter Typ %i, evtl. von einer späteren Version von R "
 "geschrieben"
 
-#: src/main/serialize.c:1882
+#: src/main/serialize.c:1921
 #, c-format
 msgid ""
 "cannot read unreleased workspace version %d written by experimental R %d.%d."
@@ -5514,7 +5540,7 @@ msgstr ""
 "kann inoffiziellen Version %d workspace nicht lesen, geschrieben von "
 "experimentellem R %d.%d.%d"
 
-#: src/main/serialize.c:1886
+#: src/main/serialize.c:1925
 #, c-format
 msgid ""
 "cannot read workspace version %d written by R %d.%d.%d; need R %d.%d.%d or "
@@ -5523,83 +5549,83 @@ msgstr ""
 "kann Version %d workspace geschrieben von R %d.%d.%d nicht lesen, brauche "
 "mindestens R %d.%d.%d"
 
-#: src/main/serialize.c:1965
+#: src/main/serialize.c:2004
 msgid "read failed"
 msgstr "Lesen fehlgeschlagen"
 
-#: src/main/serialize.c:2028
+#: src/main/serialize.c:2067
 msgid "error reading from ascii connection"
 msgstr "Lesefehler aus ASCII-Verbindung"
 
-#: src/main/serialize.c:2030
+#: src/main/serialize.c:2069
 msgid "unexpected format in ascii connection"
-msgstr "unerwartetes Format aus ASCII Verbindung"
+msgstr "unerwartetes Format aus ASCII-Verbindung"
 
-#: src/main/serialize.c:2035 src/main/serialize.c:2049
+#: src/main/serialize.c:2074 src/main/serialize.c:2088
 msgid "error reading from connection"
 msgstr "Lesefehler aus Verbindung"
 
-#: src/main/serialize.c:2090
+#: src/main/serialize.c:2130
 msgid "only ascii format can be written to text mode connections"
 msgstr "nur ASCII kann in Verbindung im Textmodus geschrieben werden"
 
-#: src/main/serialize.c:2104
+#: src/main/serialize.c:2144
 msgid "only ascii format can be read from text mode connections"
 msgstr "nur ASCII kann in Verbindung im Textmodus gelesen werden"
 
-#: src/main/serialize.c:2159 src/main/serialize.c:2312
-#: src/main/serialize.c:2461
+#: src/main/serialize.c:2200 src/main/serialize.c:2353
+#: src/main/serialize.c:2502
 msgid "bad version value"
 msgstr "unbrauchbarer Wert für Version"
 
-#: src/main/serialize.c:2184
+#: src/main/serialize.c:2225
 msgid "binary-mode connection required for ascii=FALSE"
 msgstr "binäre Verbindung für ascii=FALSE benötigt"
 
-#: src/main/serialize.c:2340 src/main/serialize.c:2377
-#: src/main/serialize.c:2440
+#: src/main/serialize.c:2381 src/main/serialize.c:2418
+#: src/main/serialize.c:2481
 msgid "serialization is too large to store in a raw vector"
 msgstr ""
-"Serialisierung ist zu groß, um in einem Raw-Vektor gespeichert zu werden"
+"Serialisierung ist zu groß, um in einem raw Vektor gespeichert zu werden"
 
-#: src/main/serialize.c:2357
+#: src/main/serialize.c:2398
 msgid "cannot allocate buffer"
 msgstr "kann Zwischenspeicher nicht zuteilen"
 
-#: src/main/serialize.c:2546 src/main/serialize.c:2619
+#: src/main/serialize.c:2592 src/main/serialize.c:2665
 msgid "not a proper file name"
 msgstr "kein korrekter Dateiname"
 
-#: src/main/serialize.c:2548
+#: src/main/serialize.c:2594
 msgid "not a proper raw vector"
 msgstr "kein zulässiger raw Vektor"
 
-#: src/main/serialize.c:2569
+#: src/main/serialize.c:2615
 msgid "could not determine file position"
 msgstr "konnte Position in Datei nicht bestimmen"
 
-#: src/main/serialize.c:2621
+#: src/main/serialize.c:2667
 msgid "bad offset/length argument"
 msgstr "unbrauchbares Argument für Offset/Länge"
 
-#: src/main/serialize.c:2645 src/main/serialize.c:2658
-#: src/main/serialize.c:2667 src/main/serialize.c:2677
-#: src/main/serialize.c:2690
+#: src/main/serialize.c:2691 src/main/serialize.c:2704
+#: src/main/serialize.c:2713 src/main/serialize.c:2723
+#: src/main/serialize.c:2736
 #, c-format
 msgid "seek failed on %s"
 msgstr "seek fehlgeschlagen auf %s"
 
-#: src/main/serialize.c:2662 src/main/serialize.c:2671
-#: src/main/serialize.c:2681 src/main/serialize.c:2694
+#: src/main/serialize.c:2708 src/main/serialize.c:2717
+#: src/main/serialize.c:2727 src/main/serialize.c:2740
 #, c-format
 msgid "read failed on %s"
 msgstr "Lesen fehlgeschlagen auf %s"
 
-#: src/main/serialize.c:2713
+#: src/main/serialize.c:2759
 msgid "bad environment"
 msgstr "unbrauchbare Umgebung"
 
-#: src/main/serialize.c:2715
+#: src/main/serialize.c:2761
 msgid "bad variable names"
 msgstr "unbrauchbarer Variablenname"
 
@@ -5654,11 +5680,11 @@ msgstr "ungültige ties.method für rank() [sollte nie vorkommen]"
 msgid "too large a range of values in 'x'"
 msgstr "zu großer Wertebereich in 'x'"
 
-#: src/main/source.c:215
+#: src/main/source.c:220
 msgid "coercion of 'text' to character was unsuccessful"
 msgstr "Umwandlung von 'text' in Zeichenkette fehlgeschlagen"
 
-#: src/main/source.c:231
+#: src/main/source.c:236
 #, c-format
 msgid "argument '%s = \"%s\"' will be ignored"
 msgstr "Argument '%s = \"%s\"'' wird ignoriert"
@@ -5683,93 +5709,93 @@ msgstr "Datenlänge ist kein Vielfaches der Split-Variablen"
 msgid "factor has bad level"
 msgstr "Faktor hat eine unzulässige Faktorstufe "
 
-#: src/main/sprintf.c:94
+#: src/main/sprintf.c:97
 #, c-format
 msgid "required resulting string length %d is greater than maximal %d"
 msgstr ""
 "die benötigte Ergebniszeichenkettenlänge %d ist länger als das Maximum %d"
 
-#: src/main/sprintf.c:102
+#: src/main/sprintf.c:105
 msgid "'fmt' is not a character vector"
-msgstr "'fmt' ist kein Charakter-Vektor"
+msgstr "'fmt' ist kein Zeichenkettenvektor"
 
-#: src/main/sprintf.c:107
+#: src/main/sprintf.c:110
 #, c-format
 msgid "only %d arguments are allowed"
 msgstr "nur %d Argumente zugelassen"
 
-#: src/main/sprintf.c:114
+#: src/main/sprintf.c:117
 #, c-format
 msgid "invalid type of argument[%d]: '%s'"
 msgstr "ungültiger Typ des Argumentes[%d]: '%s'"
 
-#: src/main/sprintf.c:125 src/main/sprintf.c:128
+#: src/main/sprintf.c:128 src/main/sprintf.c:131
 msgid "arguments cannot be recycled to the same length"
 msgstr ""
-"Argumente können nicht durch Wiederverwendung auf gleiche Länge gebraucht "
+"Argumente können nicht durch Wiederverwendung (Recycling) auf gleiche Länge gebracht "
 "werden"
 
-#: src/main/sprintf.c:150 src/main/sprintf.c:257
+#: src/main/sprintf.c:153 src/main/sprintf.c:260
 #, c-format
 msgid "'fmt' length exceeds maximal format length %d"
 msgstr "'fmt' Länge überschreitet maximale Formatlänge %d"
 
-#: src/main/sprintf.c:169
+#: src/main/sprintf.c:172
 #, c-format
 msgid "unrecognised format specification '%s'"
 msgstr "unbekannte Formatspezifikation '%s'"
 
-#: src/main/sprintf.c:180 src/main/sprintf.c:186 src/main/sprintf.c:199
-#: src/main/sprintf.c:206
+#: src/main/sprintf.c:183 src/main/sprintf.c:189 src/main/sprintf.c:202
+#: src/main/sprintf.c:209
 #, c-format
 msgid "reference to non-existent argument %d"
 msgstr "Referenz auf nicht existierendes Argument %d"
 
-#: src/main/sprintf.c:218
+#: src/main/sprintf.c:221
 msgid "at most one asterisk '*' is supported in each conversion specification"
 msgstr ""
-"höchstens ein Stern `*' wird in jeder Konvertierungsspezifikation unterstützt"
+"höchstens ein Stern '*' wird in jeder Konvertierungsspezifikation unterstützt"
 
-#: src/main/sprintf.c:228
+#: src/main/sprintf.c:231
 msgid "argument for '*' conversion specification must be a number"
-msgstr "Argument für `*' Konvertierung muss eine Zahl sein"
+msgstr "Argument für '*' Konvertierung muss eine Zahl sein"
 
-#: src/main/sprintf.c:266
+#: src/main/sprintf.c:269
 msgid "coercion has changed vector length to 0"
-msgstr "Umwandlung hat Länge des Vektors zu 0 gemacht"
+msgstr "Umwandlung hat Länge des Vektors zu 0 geändert"
 
-#: src/main/sprintf.c:339 src/main/sprintf.c:353 src/main/sprintf.c:367
-#: src/main/sprintf.c:402
+#: src/main/sprintf.c:342 src/main/sprintf.c:356 src/main/sprintf.c:370
+#: src/main/sprintf.c:405
 #, c-format
 msgid "invalid format '%s'; %s"
 msgstr "ungültiges Format '%s'; %s"
 
-#: src/main/sprintf.c:340
+#: src/main/sprintf.c:343
 #, c-format
 msgid "use format %d or %i for logical objects"
 msgstr "benutze Format %d oder %i für boolesche Objekte"
 
-#: src/main/sprintf.c:354
+#: src/main/sprintf.c:357
 #, c-format
 msgid "use format %d, %i, %o, %x or %X for integer objects"
 msgstr "benutze Format %d, %i, %o, %x oder %X für integer Objekte"
 
-#: src/main/sprintf.c:368
+#: src/main/sprintf.c:371
 #, c-format
 msgid "use format %f, %e, %g or %a for numeric objects"
 msgstr "benutze Format %f, %e, %g or %a für numerische Objekte"
 
-#: src/main/sprintf.c:403
+#: src/main/sprintf.c:406
 #, c-format
 msgid "use format %s for character objects"
-msgstr "benutze Format %s für Charakter-Objekte"
+msgstr "benutze Format %s für Zeichenketten-Objekte"
 
-#: src/main/sprintf.c:408
+#: src/main/sprintf.c:411
 #, c-format
 msgid "likely truncation of character string to %d characters"
 msgstr "Wahrscheinlich wurde Zeichenkette bei %d Zeichen abgeschnitten"
 
-#: src/main/sprintf.c:417
+#: src/main/sprintf.c:420
 msgid "unsupported type"
 msgstr "nicht unterstützter Typ"
 
@@ -5792,190 +5818,190 @@ msgstr ""
 msgid "incompatible types (from %s to %s) in subassignment type fix"
 msgstr "inkompatible Typen (von %s nach %s) in subassignment Typ fix"
 
-#: src/main/subassign.c:502 src/main/subassign.c:782 src/main/subassign.c:785
-#: src/main/subassign.c:1076
+#: src/main/subassign.c:503 src/main/subassign.c:783 src/main/subassign.c:786
+#: src/main/subassign.c:1077
 msgid "NAs are not allowed in subscripted assignments"
 msgstr "NAs nicht zugelassen in Teilbereichszuweisungen"
 
-#: src/main/subassign.c:520 src/main/subassign.c:796 src/main/subassign.c:1068
-#: src/main/subassign.c:1641
+#: src/main/subassign.c:521 src/main/subassign.c:797 src/main/subassign.c:1069
+#: src/main/subassign.c:1647
 msgid "replacement has length zero"
 msgstr "Ersetzung hat Länge 0"
 
-#: src/main/subassign.c:522 src/main/subassign.c:798 src/main/subassign.c:1070
+#: src/main/subassign.c:523 src/main/subassign.c:799 src/main/subassign.c:1071
 msgid "number of items to replace is not a multiple of replacement length"
 msgstr ""
 "Anzahl der zu ersetzenden Elemente ist kein Vielfaches der Ersetzungslänge"
 
-#: src/main/subassign.c:766
+#: src/main/subassign.c:767
 msgid "incorrect number of subscripts on matrix"
 msgstr "falsche Anzahl von Indizes für Matrix"
 
-#: src/main/subassign.c:1022
+#: src/main/subassign.c:1023
 #, c-format
 msgid "incompatible types (from %s to %s) in matrix subset assignment"
 msgstr "inkompatible Typen (von %s nach %s) in Matrizenteilzuweisung"
 
-#: src/main/subassign.c:1038 src/main/subset.c:928
+#: src/main/subassign.c:1039 src/main/subset.c:947
 msgid "incorrect number of subscripts"
 msgstr "falsche Anzahl von subscripts"
 
-#: src/main/subassign.c:1214
+#: src/main/subassign.c:1215
 #, c-format
 msgid "incompatible types (from %s to %s) in array subset assignment"
 msgstr "inkompatible Typen (von %s nach %s) in Arrayteilzuweisung"
 
-#: src/main/subassign.c:1249 src/main/subassign.c:1270
+#: src/main/subassign.c:1250 src/main/subassign.c:1271
 msgid "invalid subscript in list assign"
 msgstr "ungültiger Subskript in Listenzuweisung"
 
-#: src/main/subassign.c:1263
+#: src/main/subassign.c:1264
 msgid "invalid number of subscripts to list assign"
 msgstr "ungültige Anzahl von Indizes für Listenzuweisung"
 
-#: src/main/subassign.c:1361
+#: src/main/subassign.c:1363
 msgid "SubAssignArgs: invalid number of arguments"
 msgstr "subAssignArgs: ungültige Anzahl von Argumenten"
 
-#: src/main/subassign.c:1506
+#: src/main/subassign.c:1508
 msgid "result is zero-length and so cannot be a language object"
 msgstr "Ergebnis hat Länge 0 und kann deshalb kein Objekt der Sprache sein"
 
-#: src/main/subassign.c:1611
+#: src/main/subassign.c:1607
 msgid ""
 "[[<- defined for objects of type \"S4\" only for subclasses of environment"
 msgstr ""
 "[[<- für Objekte vom \"S4\"-Typ nur für Unterklassen von environment "
 "definiert"
 
-#: src/main/subassign.c:1617
+#: src/main/subassign.c:1619
 msgid "wrong args for environment subassignment"
 msgstr "falsche Argumente für eine Umgebungsteilzuweisung"
 
-#: src/main/subassign.c:1643
+#: src/main/subassign.c:1649
 msgid "more elements supplied than there are to replace"
 msgstr "mehr Elemente gegeben als zu ersetzen sind"
 
-#: src/main/subassign.c:1645
+#: src/main/subassign.c:1651
 msgid "[[ ]] with missing subscript"
 msgstr "[[ ]] mit fehlendem Index"
 
-#: src/main/subassign.c:1657 src/main/subassign.c:1675
+#: src/main/subassign.c:1669 src/main/subassign.c:1687
 msgid "[[ ]] subscript out of bounds"
 msgstr "[[ ]] Index außerhalb der Grenzen"
 
-#: src/main/subassign.c:1663 src/main/subassign.c:1841
+#: src/main/subassign.c:1675 src/main/subassign.c:1856
 msgid "[[ ]] improper number of subscripts"
 msgstr "[[ ]] unpassende Zahl von Indizes"
 
-#: src/main/subassign.c:1808
+#: src/main/subassign.c:1821
 #, c-format
 msgid "incompatible types (from %s to %s) in [[ assignment"
 msgstr "inkompatible Typen (von %s nach %s) in [[ Zuweisung"
 
-#: src/main/subassign.c:1852
+#: src/main/subassign.c:1867
 #, c-format
 msgid "[[ ]] subscript (%d) out of bounds"
 msgstr "[[ ]] Index (%d) außerhalb des Bereichs"
 
-#: src/main/subassign.c:1905 src/main/subscript.c:143 src/main/subscript.c:145
-#: src/main/subscript.c:274 src/main/subscript.c:276 src/main/subscript.c:826
-#: src/main/subscript.c:828 src/main/subscript.c:919 src/main/subscript.c:921
-#: src/main/subset.c:1109
+#: src/main/subassign.c:1923 src/main/subscript.c:151 src/main/subscript.c:153
+#: src/main/subscript.c:282 src/main/subscript.c:284 src/main/subscript.c:894
+#: src/main/subscript.c:896 src/main/subscript.c:987 src/main/subscript.c:989
+#: src/main/subset.c:1149
 #, c-format
 msgid "invalid subscript type '%s'"
 msgstr "ungültiger Indextyp '%s'"
 
-#: src/main/subassign.c:1950
+#: src/main/subassign.c:1968
 msgid "no method for assigning subsets of this S4 class"
-msgstr "keine Methode um Teilmengen dieser S4 Klasse zuzuweisen"
+msgstr "keine Methode um Teilmengen dieser S4-Klasse zuzuweisen"
 
-#: src/main/subassign.c:2008
+#: src/main/subassign.c:2026
 msgid "Coercing LHS to a list"
 msgstr "Wandle linke Seite in eine Liste um"
 
-#: src/main/subscript.c:53 src/main/subscript.c:75 src/main/subscript.c:180
-#: src/main/subscript.c:204
+#: src/main/subscript.c:58 src/main/subscript.c:80 src/main/subscript.c:188
+#: src/main/subscript.c:212
 msgid "attempt to select less than one element"
 msgstr "Versuch weniger als ein Element zu wählen"
 
-#: src/main/subscript.c:57 src/main/subscript.c:72 src/main/subscript.c:178
-#: src/main/subscript.c:208 src/main/subscript.c:304
+#: src/main/subscript.c:62 src/main/subscript.c:77 src/main/subscript.c:186
+#: src/main/subscript.c:216 src/main/subscript.c:312
 msgid "attempt to select more than one element"
 msgstr "Versuch mehr als ein Element zu wählen"
 
-#: src/main/subscript.c:184
+#: src/main/subscript.c:192
 msgid "internal error in use of recursive indexing"
 msgstr "interner Fehler bei rekursiver Indizierung"
 
-#: src/main/subscript.c:252
+#: src/main/subscript.c:260
 #, c-format
 msgid "further partial match of '%s' to '%s'"
 msgstr "weitere partielle Übereinstimmung von '%s' mit '%s'"
 
-#: src/main/subscript.c:302
+#: src/main/subscript.c:310
 #, c-format
 msgid "recursive indexing failed at level %d\n"
 msgstr "rekursives Indizieren auf Level %d fehlgeschlagen\n"
 
-#: src/main/subscript.c:309
+#: src/main/subscript.c:320
 #, c-format
 msgid "no such index at level %d\n"
 msgstr "kein solcher Index auf Level %d\n"
 
-#: src/main/subscript.c:352
+#: src/main/subscript.c:367
 msgid "incorrect number of columns in matrix subscript"
 msgstr "falsche Anzahl Spalten in Matrixindizierung"
 
-#: src/main/subscript.c:371 src/main/subscript.c:389 src/main/subscript.c:413
+#: src/main/subscript.c:386 src/main/subscript.c:404 src/main/subscript.c:428
 msgid "negative values are not allowed in a matrix subscript"
 msgstr "negative Werte sind nicht erlaubt in Matrixindizierung"
 
-#: src/main/subscript.c:492
+#: src/main/subscript.c:507
 msgid "(subscript) logical subscript too long"
 msgstr "(subscript) boolescher Index zu lang"
 
-#: src/main/subscript.c:590 src/main/subscript.c:645
+#: src/main/subscript.c:658 src/main/subscript.c:713
 msgid "only 0's may be mixed with negative subscripts"
 msgstr "nur Nullen dürfen mit negativen Indizes gemischt werden"
 
-#: src/main/subscript.c:618
+#: src/main/subscript.c:686
 msgid "subscript too large for 32-bit R"
 msgstr "Index für 32-bit R zu groß"
 
-#: src/main/subscript.c:817
+#: src/main/subscript.c:885
 msgid "no 'dimnames' attribute for array"
 msgstr "kein 'dimnames' Attribut für Arrays"
 
-#: src/main/subscript.c:857
+#: src/main/subscript.c:925
 msgid "subscripting on non-vector"
 msgstr "Indizierung bei einem Nicht-Vektor"
 
-#: src/main/subset.c:261
+#: src/main/subset.c:262
 msgid "dimensions would exceed maximum size of array"
 msgstr "Dimensionen würden die maximale Arraygröße überschreiten"
 
-#: src/main/subset.c:304 src/main/subset.c:333
+#: src/main/subset.c:305 src/main/subset.c:334
 msgid "matrix subscripting not handled for this type"
 msgstr "Matrixindizierung für diesen Typ nicht möglich"
 
-#: src/main/subset.c:488
+#: src/main/subset.c:490
 msgid "array subscripting not handled for this type"
 msgstr "Array-Indizierung für diesen Typ nicht möglich"
 
-#: src/main/subset.c:827
+#: src/main/subset.c:846
 msgid "incorrect number of dimensions"
 msgstr "falsche Anzahl von Dimensionen"
 
-#: src/main/subset.c:924
+#: src/main/subset.c:943
 msgid "no index specified"
 msgstr "kein Index angegeben"
 
-#: src/main/subset.c:934
+#: src/main/subset.c:953
 msgid "this S4 class is not subsettable"
-msgstr "Diese S4 Klasse ist nicht in Teilen verfügbar"
+msgstr "Diese S4-Klasse ist nicht in Teilen verfügbar"
 
-#: src/main/subset.c:940
+#: src/main/subset.c:960
 msgid "wrong arguments for subsetting an environment"
 msgstr "falsche Argumente um ein environment zu indizieren"
 
@@ -5993,165 +6019,173 @@ msgstr "Integer-Überlauf - nutze sum(as.numeric(.))"
 msgid "internal error ('op = %d' in do_summary).\t Call a Guru"
 msgstr "interner Fehler ('op = %d' in do_summary).\t Call a Guru"
 
-#: src/main/summary.c:623
+#: src/main/summary.c:633
 msgid "Integer overflow - use sum(as.numeric(.))"
-msgstr "Integer-Überlauf - nutze sum(as.numeric(,))"
+msgstr "Integer-Überlauf - nutze sum(as.numeric(.))"
 
-#: src/main/summary.c:731
+#: src/main/summary.c:746
 msgid "no non-missing arguments, returning NA"
 msgstr "kein nicht-fehlendes Argument, gebe NA zurück"
 
-#: src/main/summary.c:734
+#: src/main/summary.c:749
 msgid "no non-missing arguments to min; returning Inf"
 msgstr "kein nicht-fehlendes Argument für min; gebe Inf zurück"
 
-#: src/main/summary.c:736
+#: src/main/summary.c:751
 msgid "no non-missing arguments to max; returning -Inf"
 msgstr "kein nicht-fehlendes Argument für max; gebe -Inf zurück"
 
-#: src/main/summary.c:801
+#: src/main/summary.c:816
 msgid "non-numeric argument"
 msgstr "nicht-numerisches Argument"
 
-#: src/main/summary.c:845
+#: src/main/summary.c:860
 msgid "argument to 'which' is not logical"
 msgstr "Argument zu 'which' ist nicht boolesch"
 
-#: src/main/summary.c:889
+#: src/main/summary.c:904
 msgid "no arguments"
 msgstr "keine Argumente"
 
-#: src/main/summary.c:900 src/main/summary.c:917
+#: src/main/summary.c:915 src/main/summary.c:932
 msgid "invalid input type"
 msgstr "ungültiger Eingabetyp"
 
-#: src/main/summary.c:934
+#: src/main/summary.c:949
 msgid "an argument will be fractionally recycled"
 msgstr "ein Argument wird teilweise recycled"
 
-#: src/main/sysutils.c:69 src/main/sysutils.c:83
+#: src/main/sysutils.c:68 src/main/sysutils.c:82
 #, c-format
 msgid "cannot determine file modification time of '%s'"
 msgstr "kann Zeit der letzten Dateiänderung von '%s' nicht feststellen"
 
-#: src/main/sysutils.c:167
+#: src/main/sysutils.c:166
 msgid "encoding of a filename cannot be 'bytes'"
 msgstr "ein Dateiname kann nicht mit 'bytes' kodiert werden"
 
-#: src/main/sysutils.c:170 src/main/sysutils.c:803 src/main/sysutils.c:818
-#: src/main/sysutils.c:909 src/main/sysutils.c:924 src/main/sysutils.c:1020
+#: src/main/sysutils.c:169 src/main/sysutils.c:825 src/main/sysutils.c:840
+#: src/main/sysutils.c:969
 #, c-format
 msgid "unsupported conversion from '%s' in codepage %d"
 msgstr "nicht unterstützte Umwandlung von '%s' in codepage %d"
 
-#: src/main/sysutils.c:179
+#: src/main/sysutils.c:178
 msgid "file name conversion problem -- name too long?"
 msgstr "Problem bei der Konvertierung des Dateinamens -- zu lang?"
 
-#: src/main/sysutils.c:180
+#: src/main/sysutils.c:179
 msgid "file name conversion problem"
-msgstr "Problem bei der Konversion des Dateinamens"
+msgstr "Problem bei der Konvertierung des Dateinamens"
 
-#: src/main/sysutils.c:249
+#: src/main/sysutils.c:248
 msgid "invalid filename pattern"
 msgstr "ungültiges Dateinamenmuster"
 
-#: src/main/sysutils.c:253
+#: src/main/sysutils.c:252
 msgid "invalid file extension"
 msgstr "unzulässige Dateierweiterung"
 
-#: src/main/sysutils.c:255
+#: src/main/sysutils.c:254
 msgid "no 'pattern'"
 msgstr "kein 'pattern' angegeben"
 
-#: src/main/sysutils.c:257
+#: src/main/sysutils.c:256
 msgid "no 'tempdir'"
 msgstr "kein 'tempdir' angegeben"
 
-#: src/main/sysutils.c:259
+#: src/main/sysutils.c:258
 msgid "no 'fileext'"
-msgstr "keine 'fileext'"
+msgstr "keine 'fileext' angegeben"
+
+#: src/main/sysutils.c:322
+#, c-format
+msgid "system call failed: %s"
+msgstr "Systemaufruf fehlgeschlagen: %s"
 
-#: src/main/sysutils.c:345 src/main/sysutils.c:348 src/main/sysutils.c:439
-#: src/main/sysutils.c:441 src/main/sysutils.c:477
+#: src/main/sysutils.c:351 src/main/sysutils.c:354 src/main/sysutils.c:445
+#: src/main/sysutils.c:447 src/main/sysutils.c:483
 msgid "wrong type for argument"
 msgstr "falscher Typ für Argument"
 
-#: src/main/sysutils.c:443
+#: src/main/sysutils.c:449
 msgid "wrong length for argument"
 msgstr "falsche Länge für das Argument"
 
-#: src/main/sysutils.c:464
+#: src/main/sysutils.c:470
 msgid "'Sys.setenv' is not available on this system"
 msgstr "'Sys.setenv' auf diesem System nicht verfügbar"
 
-#: src/main/sysutils.c:508
+#: src/main/sysutils.c:514
 msgid "this system cannot unset environment variables: setting to \"\""
 msgstr "dieses System kann Umgebungsvariablen nicht löschen: setze auf \"\""
 
-#: src/main/sysutils.c:519
+#: src/main/sysutils.c:525
 msgid "'Sys.unsetenv' is not available on this system"
 msgstr "'Sys.unsetenv' auf diesem System nicht verfügbar"
 
-#: src/main/sysutils.c:616
+#: src/main/sysutils.c:622
 #, c-format
 msgid "unsupported conversion from '%s' to '%s' in codepage %d"
 msgstr "nicht unterstützte Umwandlung von '%s' nach '%s' in codepage %d"
 
-#: src/main/sysutils.c:631
+#: src/main/sysutils.c:637
 msgid "'x' must be a character vector"
-msgstr "'x' muss ein Charaktervektor sein"
+msgstr "'x' muss ein Zeichenkettenvektor sein"
 
-#: src/main/sysutils.c:646
+#: src/main/sysutils.c:652
 msgid "'x' must be a list of NULL or raw vectors"
-msgstr "'x' muss eine Liste von NULL oder ein raw vector sein"
+msgstr "'x' muss eine Liste von NULL oder von raw-Vektoren sein"
 
-#: src/main/sysutils.c:724 src/main/sysutils.c:789 src/main/sysutils.c:895
-#: src/main/sysutils.c:994 src/main/sysutils.c:1010 src/main/sysutils.c:1087
+#: src/main/sysutils.c:730 src/main/sysutils.c:908 src/main/sysutils.c:926
+#: src/main/sysutils.c:943 src/main/sysutils.c:959 src/main/sysutils.c:1036
 #, c-format
 msgid "'%s' must be called on a CHARSXP"
 msgstr "'%s' muss für CHARSXP aufgerufen werden"
 
-#: src/main/sysutils.c:792 src/main/sysutils.c:898 src/main/sysutils.c:1015
-#: src/main/sysutils.c:1090
+#: src/main/sysutils.c:799 src/main/sysutils.c:964 src/main/sysutils.c:1039
 msgid "translating strings with \"bytes\" encoding is not allowed"
 msgstr "Übersetzung von Zeichenketten mit \"bytes\"-Kodierung nicht erlaubt"
 
-#: src/main/sysutils.c:1116
+#: src/main/sysutils.c:812
+msgid "internal error: no translation needed"
+msgstr "interner Fehler: Keine Übersetzung nötig"
+
+#: src/main/sysutils.c:1065
 #, c-format
 msgid "unsupported conversion to '%s' from codepage %d"
 msgstr "nicht unterstützte Umwandlung von '%s' aus codepage %d"
 
-#: src/main/sysutils.c:1530
+#: src/main/sysutils.c:1480
 #, c-format
 msgid "invalid Unicode point %u"
 msgstr "ungültiger Unicode Punkt %u"
 
-#: src/main/sysutils.c:1632
+#: src/main/sysutils.c:1582
 msgid "cannot create 'R_TempDir'"
 msgstr "kann 'R_TempDir' nicht erzeugen"
 
-#: src/main/sysutils.c:1636 src/main/sysutils.c:1644 src/main/sysutils.c:1647
+#: src/main/sysutils.c:1586 src/main/sysutils.c:1594 src/main/sysutils.c:1597
 msgid "unable to set R_SESSION_TMPDIR"
 msgstr "kann R_SESSION_TMPDIR nicht setzen"
 
-#: src/main/sysutils.c:1656
+#: src/main/sysutils.c:1606
 msgid "cannot allocate 'R_TempDir'"
 msgstr "kann 'R_TempDir' nicht allozieren"
 
-#: src/main/sysutils.c:1693
+#: src/main/sysutils.c:1643
 msgid "temporary name too long"
 msgstr "Name für temporäre Datei zu lang"
 
-#: src/main/sysutils.c:1708
+#: src/main/sysutils.c:1658
 msgid "cannot find unused tempfile name"
 msgstr "kann keinen ungenutzten temporären Dateinamen finden"
 
-#: src/main/sysutils.c:1711
+#: src/main/sysutils.c:1661
 msgid "allocation failed in R_tmpnam2"
 msgstr "Allokationsfehler in R_tmpnam2"
 
-#: src/main/sysutils.c:1838
+#: src/main/sysutils.c:1788
 msgid "'dirmark = TRUE' is not supported on this platform"
 msgstr "'dirmark = TRUE' wird auf dieser Plattform nicht unterstützt"
 
@@ -6161,193 +6195,199 @@ msgid "length %d is too large for hashing"
 msgstr "Länge %d zu lang für hashing"
 
 #: src/main/unique.c:490 src/main/unique.c:519 src/main/unique.c:549
-#: src/main/unique.c:575 src/main/unique.c:614
+#: src/main/unique.c:573 src/main/unique.c:612
 msgid "'duplicated' applies only to vectors"
 msgstr "'duplicated' kann nur auf Vektoren angewendet werden"
 
-#: src/main/unique.c:619
+#: src/main/unique.c:617
 msgid "any_duplicated3(., <0-length incomp>)"
 msgstr "any_duplicated3(., <0-length incomp>)"
 
-#: src/main/unique.c:669
+#: src/main/unique.c:667
 msgid "'fromLast' must be length 1"
 msgstr "'fromLast' muss Länge 1 haben"
 
-#: src/main/unique.c:672
+#: src/main/unique.c:670
 msgid "'fromLast' must be TRUE or FALSE"
 msgstr "'fromLast' muss TRUE oder FALSE sein"
 
-#: src/main/unique.c:683
+#: src/main/unique.c:681
 #, c-format
 msgid "%s() applies only to vectors"
 msgstr "%s() kann nur auf Vektoren angewendet werden"
 
-#: src/main/unique.c:690
+#: src/main/unique.c:688
 msgid "'nmax' must be positive"
 msgstr "'nmax' muss positiv sein"
 
-#: src/main/unique.c:922
+#: src/main/unique.c:925
 msgid "'match' requires vector arguments"
 msgstr "'match' benötigt Vektoren als Argumente"
 
-#: src/main/unique.c:970 src/main/unique.c:1125
+#: src/main/unique.c:973 src/main/unique.c:1111
 msgid "argument is not of mode character"
-msgstr "Argument hat nicht Modus Charakter"
+msgstr "Argument hat nicht Modus character"
 
-#: src/main/unique.c:1251
+#: src/main/unique.c:1236
 msgid "... used in a situation where it does not exist"
 msgstr "... in einer Situation benutzt, in der es nicht existiert"
 
-#: src/main/unique.c:1342
-msgid "unable to find a closure from within which 'match.call' was called"
-msgstr "kann keinen Aschluss finden, aus dem 'match.call' aufgerufen wurde"
+#: src/main/unique.c:1242
+msgid "... is not a pairlist"
+msgstr "... ist keine Paarliste"
 
-#: src/main/unique.c:1536
+#: src/main/unique.c:1471
 msgid "non-numeric data frame in rowsum"
-msgstr "nicht-numerischer dataframe in rowsum"
+msgstr "nicht-numerischer Dataframe in rowsum"
 
-#: src/main/unique.c:1568
+#: src/main/unique.c:1503
 msgid "this cannot happen"
 msgstr "dies kann nicht passieren"
 
-#: src/main/unique.c:1639
+#: src/main/unique.c:1574
 msgid "'names' must be a character vector"
-msgstr "'names' muss Charaktervektor sein"
-
-#: src/main/unique.c:1643
-msgid "'sep' must be a character string"
-msgstr "'sep' muss Zeichenkette sein"
+msgstr "'names' muss ein Zeichenkettenvektor sein"
 
-#: src/main/util.c:88 src/main/util.c:106
+#: src/main/util.c:87 src/main/util.c:105
 msgid "object is not a matrix"
 msgstr "Objekt ist keine Matrix"
 
-#: src/main/util.c:254 src/main/util.c:268 src/main/util.c:285
+#: src/main/util.c:303 src/main/util.c:315 src/main/util.c:326
+#: src/main/util.c:341
 #, c-format
 msgid "type %d is unimplemented in '%s'"
 msgstr "Typ %d ist in '%s' nicht implementiert"
 
-#: src/main/util.c:297
+#: src/main/util.c:352
 #, c-format
 msgid "unimplemented type '%s' in '%s'\n"
 msgstr "nicht implementierter Typ '%s' in '%s'\n"
 
-#: src/main/util.c:299
+#: src/main/util.c:354
 #, c-format
 msgid "unimplemented type (%d) in '%s'\n"
 msgstr "nicht implementierter Typ (%d) in '%s'\n"
 
-#: src/main/util.c:424
+#: src/main/util.c:479
 msgid "invalid tag in name extraction"
 msgstr "ungültiger tag in Namensauswertung"
 
-#: src/main/util.c:434
+#: src/main/util.c:489
 #, c-format
 msgid "%d argument passed to .Internal(%s) which requires %d"
 msgid_plural "%d arguments passed to .Internal(%s) which requires %d"
 msgstr[0] "%d Argument an .Internal(%s) übergeben, welches %d benötigt"
 msgstr[1] "%d Argumente an .Internal(%s) übergeben, welches %d benötigt"
 
-#: src/main/util.c:440
+#: src/main/util.c:495
 #, c-format
 msgid "%d argument passed to '%s' which requires %d"
 msgid_plural "%d arguments passed to '%s' which requires %d"
 msgstr[0] "%d Argument an '%s' übergeben, welches %d benötigt"
 msgstr[1] "%d Argumente an '%s' übergeben, welches %d benötigt"
 
-#: src/main/util.c:455
+#: src/main/util.c:510
 #, c-format
 msgid "supplied argument name '%s' does not match '%s'"
 msgstr "angegebenes Argument names '%s' passt nicht zu '%s'"
 
-#: src/main/util.c:465
+#: src/main/util.c:520
 #, c-format
 msgid "'nthcdr' list shorter than %d"
 msgstr "'nthcdr' Liste kürzer als %d"
 
-#: src/main/util.c:470
+#: src/main/util.c:525
 msgid "'nthcdr' needs a list to CDR down"
 msgstr "'nthcdr' braucht eine Liste um CDR zu verkleinern"
 
-#: src/main/util.c:586
+#: src/main/util.c:641
 msgid "'all.x' must be TRUE or FALSE"
 msgstr "'all.x' muss TRUE oder FALSE sein"
 
-#: src/main/util.c:588
+#: src/main/util.c:643
 msgid "'all.y' must be TRUE or FALSE"
 msgstr "'all.y' muss TRUE oder FALSE sein"
 
-#: src/main/util.c:700
+#: src/main/util.c:668
+msgid "number of rows in the result exceeds maximum vector length"
+msgstr "Anzahl der Zeilen im Ergebnis überschreitet die maximale Vektorlänge"
+
+#: src/main/util.c:760
 msgid "missing value is invalid"
 msgstr "fehlender Wert ist unzulässig"
 
-#: src/main/util.c:709 src/main/util.c:716
+#: src/main/util.c:769 src/main/util.c:776
 msgid "cannot change working directory"
 msgstr "kann Arbeitsverzeichnis nicht wechseln"
 
-#: src/main/util.c:735 src/main/util.c:769 src/main/util.c:810
-#: src/main/util.c:852 src/main/util.c:981 src/main/util.c:1040
-#: src/main/util.c:1063
+#: src/main/util.c:796 src/main/util.c:830 src/main/util.c:871
+#: src/main/util.c:913 src/main/util.c:1042 src/main/util.c:1101
+#: src/main/util.c:1124
 msgid "a character vector argument expected"
-msgstr "Charaktervektor als Argument erwartet"
+msgstr "Zeichenkettenvektor als Argument erwartet"
 
-#: src/main/util.c:742 src/main/util.c:777 src/main/util.c:819
-#: src/main/util.c:860
+#: src/main/util.c:803 src/main/util.c:838 src/main/util.c:880
+#: src/main/util.c:921
 msgid "path too long"
 msgstr "Pfad zu lang"
 
-#: src/main/util.c:995
+#: src/main/util.c:1056
 msgid "only the first character of 'quote' will be used"
 msgstr "nur das erste Zeichen von 'quote' wird benutzt"
 
-#: src/main/util.c:1065
+#: src/main/util.c:1126
 msgid "a character vector 'value' expected"
-msgstr "Charaktervektor 'value' erwartet"
+msgstr "Zeichenkettenvektor 'value' erwartet"
 
-#: src/main/util.c:1068
+#: src/main/util.c:1129
 msgid "'value' must be of positive length"
 msgstr "'value' muss positive Länge haben"
 
-#: src/main/util.c:1197 src/main/util.c:1205
+#: src/main/util.c:1258 src/main/util.c:1266
 #, c-format
 msgid "invalid input '%s' in 'utf8towcs'"
 msgstr "ungültige Eingabe '%s' in 'utf8towcs"
 
-#: src/main/util.c:1290
+#: src/main/util.c:1351
 #, c-format
 msgid "invalid multibyte string at '%s'"
 msgstr "ungültige multibyte Zeichenkette bei '%s'"
 
-#: src/main/util.c:1399
+#: src/main/util.c:1493
 msgid "error message truncated to 255 chars"
 msgstr "Fehlermeldung auf 255 Zeichen gekürzt"
 
-#: src/main/util.c:1412
+#: src/main/util.c:1506
 msgid "warning message truncated to 255 chars"
 msgstr "Warnung auf 255 Zeichen gekürzt"
 
-#: src/main/util.c:1819
+#: src/main/util.c:1655
+#, c-format
+msgid "accuracy loss in conversion from \"%s\" to numeric"
+msgstr "Genauigkeitsverlust bei der Konvertierung von \"%s\" in numerisch\""
+
+#: src/main/util.c:1965
 msgid "all arguments must be named"
 msgstr "alle Argumente müssen Namen haben"
 
-#: src/main/util.c:1893
+#: src/main/util.c:2085
 msgid "ICU is not supported on this build"
 msgstr "ICU wird in diesem Binary nicht unterstützt"
 
-#: src/main/util.c:1954
+#: src/main/util.c:2152
 msgid "'breaks' is not sorted"
 msgstr "'breaks' ist nicht sortiert"
 
-#: src/main/util.c:1988 src/main/util.c:2034
+#: src/main/util.c:2186 src/main/util.c:2232
 #, c-format
 msgid "long vector '%s' is not supported"
 msgstr "langer Vektor '%s' wird nicht unterstützt"
 
-#: src/main/util.c:2087
+#: src/main/util.c:2285
 msgid "'eps.correct' must be 0, 1, or 2"
 msgstr "'eps.correct' muss 0, 1 oder 2 sein"
 
-#: src/main/util.c:2115
+#: src/main/util.c:2313
 msgid "'x' must be a vector"
 msgstr "'x' muss ein Vektor sein"
 
@@ -6388,14 +6428,6 @@ msgstr ""
 "Tippen Sie 'q()', um R zu verlassen.\n"
 "\n"
 
-#: src/main/vfonts.c:50
-msgid "vfont routines cannot be accessed in module"
-msgstr "auf vfont Routinen kann aus Modul nicht zugegriffen werden"
-
-#: src/main/vfonts.c:67 src/main/vfonts.c:80 src/main/vfonts.c:98
-msgid "Hershey fonts cannot be loaded"
-msgstr "Hershey fonts können nicht geladen werden"
-
 #: src/main/xspline.c:60
 #, c-format
 msgid "add_point - reached MAXNUMPTS (%d)"
@@ -6403,7 +6435,7 @@ msgstr "add_point - erreichte MAXNUMPTS (%d)"
 
 #: src/main/xspline.c:74
 msgid "insufficient memory to allocate point array"
-msgstr "zu wenig Hauptspeicher um Punktarry zu allozieren"
+msgstr "zu wenig Hauptspeicher um Punkt-Array zu allozieren"
 
 #: src/main/xspline.c:472
 msgid "there must be at least two control points"
@@ -6417,7 +6449,7 @@ msgstr "es muss mindestens vier Kontrollpunkte geben"
 msgid "There must be at least three control points"
 msgstr "es muss mindestens drei Kontrollpunkte geben"
 
-#: src/modules/X11/dataentry.c:1871 src/modules/X11/devX11.c:1246
+#: src/modules/X11/dataentry.c:1874 src/modules/X11/devX11.c:1246
 #, c-format
 msgid "X11 protocol error: %s"
 msgstr "X11 Protokollfehler: %s"
@@ -6431,7 +6463,7 @@ msgid ""
 "X11 driver unable to obtain color cube\n"
 "  reverting to monochrome"
 msgstr ""
-"X11 Treiber kann den Farbwürfel nicht bekommen\n"
+"X11-Treiber kann den Farbwürfel nicht bekommen\n"
 "  greife auf monochrom zurück"
 
 #: src/modules/X11/devX11.c:594
@@ -6447,7 +6479,7 @@ msgid ""
 "could not find any X11 fonts\n"
 "Check that the Font Path is correct."
 msgstr ""
-"kann keine X11 Schriften finden\n"
+"kann keine X11-Schriften finden\n"
 "Bitte Fontpath überprüfen."
 
 #: src/modules/X11/devX11.c:1087
@@ -6458,141 +6490,141 @@ msgstr "X11 nutzt Schriftgröße %d obwohl %d angefordert war"
 #: src/modules/X11/devX11.c:1121
 #, c-format
 msgid "X11 font %s, face %d at size %d could not be loaded"
-msgstr "X11 Schrift %s, Typ %d in Größe %d konnte nicht geladen werden"
+msgstr "X11-Schrift %s, Typ %d in Größe %d konnte nicht geladen werden"
 
 #: src/modules/X11/devX11.c:1130
 msgid ""
 "semi-transparency is not supported on this device: reported only once per "
 "page"
 msgstr ""
-"Semi-TRansparenz ist auf diesem Gerät nicht verfügbar: Meldung nur ein Mal "
+"Semi-Transparenz ist auf diesem Gerät nicht verfügbar: Meldung nur ein Mal "
 "pro Seite"
 
 #: src/modules/X11/devX11.c:1254
 #, c-format
 msgid "X11 I/O error while opening X11 connection to '%s'"
-msgstr "X11 E/A Fehler beim Öffnen einer X11 Verbindung nach '%s'"
+msgstr "X11-I/O-Fehler beim Öffnen einer X11-Verbindung nach '%s'"
 
-#: src/modules/X11/devX11.c:1272
+#: src/modules/X11/devX11.c:1271
 msgid "X11 fatal IO error: please save work and shut down R"
-msgstr "fataler IO Fehler in X11: Bitte Arbeit sichern und R schließen!"
+msgstr "fataler I/O-Fehler in X11: Bitte Arbeit sichern und R schließen!"
 
-#: src/modules/X11/devX11.c:1328
+#: src/modules/X11/devX11.c:1326
 msgid "locale not supported by Xlib: some X ops will operate in C locale"
 msgstr ""
-"Locale nicht von Xlib unterstützt: einige X Operationen werden in Locale C "
+"Lokalisierung nicht von Xlib unterstützt: einige X-Operationen werden in Locale C "
 "ausgeführt"
 
-#: src/modules/X11/devX11.c:1329
+#: src/modules/X11/devX11.c:1327
 msgid "X cannot set locale modifiers"
 msgstr "X kann Locales nicht setzen"
 
-#: src/modules/X11/devX11.c:1333
+#: src/modules/X11/devX11.c:1331
 msgid "no png support in this version of R"
 msgstr "png wird in dieser Version von R nicht unterstützt"
 
-#: src/modules/X11/devX11.c:1339
+#: src/modules/X11/devX11.c:1337
 msgid "filename too long in png() call"
 msgstr "Dateiname zu lang im png() Aufruf"
 
-#: src/modules/X11/devX11.c:1343
+#: src/modules/X11/devX11.c:1341
 #, c-format
 msgid "could not open PNG file '%s'"
-msgstr "konnte PNG Datei '%s' nicht öffnen"
+msgstr "konnte PNG-Datei '%s' nicht öffnen"
 
-#: src/modules/X11/devX11.c:1355
+#: src/modules/X11/devX11.c:1353
 msgid "no jpeg support in this version of R"
 msgstr "jpeg wird in dieser Version von R nicht unterstützt"
 
-#: src/modules/X11/devX11.c:1365
+#: src/modules/X11/devX11.c:1363
 msgid "filename too long in jpeg() call"
 msgstr "Dateiname zu lang im jpeg() Aufruf"
 
-#: src/modules/X11/devX11.c:1369
+#: src/modules/X11/devX11.c:1367
 #, c-format
 msgid "could not open JPEG file '%s'"
-msgstr "konnte JPEG Datei '%s' nicht öffnen"
+msgstr "konnte JPEG-Datei '%s' nicht öffnen"
 
-#: src/modules/X11/devX11.c:1381
+#: src/modules/X11/devX11.c:1379
 msgid "no tiff support in this version of R"
 msgstr "tiff wird in dieser Version von R nicht unterstützt"
 
-#: src/modules/X11/devX11.c:1389
+#: src/modules/X11/devX11.c:1387
 msgid "filename too long in tiff() call"
 msgstr "Dateiname zu lang im tiff() Aufruf"
 
-#: src/modules/X11/devX11.c:1401
+#: src/modules/X11/devX11.c:1399
 msgid "filename too long in bmp() call"
 msgstr "Dateiname zu lang im bmp() Aufruf"
 
-#: src/modules/X11/devX11.c:1405
+#: src/modules/X11/devX11.c:1403
 #, c-format
 msgid "could not open BMP file '%s'"
-msgstr "konnte BMP Datei '%s' nicht öffnen"
+msgstr "konnte BMP-Datei '%s' nicht öffnen"
 
-#: src/modules/X11/devX11.c:1435
+#: src/modules/X11/devX11.c:1433
 #, c-format
 msgid "unable to open connection to X11 display '%s'"
-msgstr "konnte Verbindung zu X11 display '%s' nicht öffnen"
+msgstr "konnte Verbindung zu X11-Display '%s' nicht öffnen"
 
-#: src/modules/X11/devX11.c:1445
+#: src/modules/X11/devX11.c:1443
 msgid "ignoring 'display' argument as an X11 device is already open"
-msgstr "'display' Argument ignoriert, da X11 Device bereits geöffnet"
+msgstr "'display' Argument ignoriert, da X11-Device bereits geöffnet"
 
-#: src/modules/X11/devX11.c:1451
+#: src/modules/X11/devX11.c:1449
 msgid "cairo-based types may only work correctly on TrueColor visuals"
-msgstr "cairo-basierte Typen arbeiten evtl. nur auf TrueColor Anzeigen korrekt"
+msgstr "cairo-basierte Typen arbeiten evtl. nur auf TrueColor-Anzeigen korrekt"
 
-#: src/modules/X11/devX11.c:1461
+#: src/modules/X11/devX11.c:1459
 msgid "jpeg() does not support transparency: using white bg"
 msgstr "jpeg() unstützt keine Transparenz: nutze weißen Hintergrund"
 
-#: src/modules/X11/devX11.c:1566
+#: src/modules/X11/devX11.c:1564
 #, c-format
 msgid "unable to obtain information on display '%s'"
 msgstr "konnte keine Informationen über Display '%s' erhalten"
 
-#: src/modules/X11/devX11.c:1584
+#: src/modules/X11/devX11.c:1582
 msgid "unable to create X11 window"
 msgstr "kann X11 Fenster nicht öffnen"
 
-#: src/modules/X11/devX11.c:1719
+#: src/modules/X11/devX11.c:1717
 #, c-format
 msgid "'width=%d, height=%d' are unlikely values in pixels"
 msgstr "'width=%d, height=%d' sind unwahrscheinliche Werte für Pixel"
 
-#: src/modules/X11/devX11.c:1724
+#: src/modules/X11/devX11.c:1722
 msgid "unable to create pixmap"
 msgstr "kann pixmap nicht erzeugen"
 
-#: src/modules/X11/devX11.c:1755
+#: src/modules/X11/devX11.c:1753
 msgid "invalid font specification"
 msgstr "ungültige Zeichensatzspezifikation"
 
-#: src/modules/X11/devX11.c:1795
+#: src/modules/X11/devX11.c:1793
 msgid "font family not found in X11 font database"
-msgstr "Schriftfamilie nicht in X11 Schriftdatenbank gefunden"
+msgstr "Schriftfamilie nicht in X11-Schriftdatenbank gefunden"
 
-#: src/modules/X11/devX11.c:1834
+#: src/modules/X11/devX11.c:1832
 #, c-format
 msgid "invalid use of %d < 0 in '%s'"
 msgstr "ungültige Nutzung von %d < 0 in '%s'"
 
-#: src/modules/X11/devX11.c:1955
+#: src/modules/X11/devX11.c:1953
 #, c-format
 msgid "could not open file '%s'"
 msgstr "konnte Datei '%s' nicht öffnen"
 
-#: src/modules/X11/devX11.c:2185
+#: src/modules/X11/devX11.c:2183
 #, c-format
 msgid "%s not available for this device"
 msgstr "'%s' für dieses Device nicht verfügbar"
 
-#: src/modules/X11/devX11.c:2330
+#: src/modules/X11/devX11.c:2328
 msgid "Unable to create XImage"
 msgstr "Kann XImage nicht erzeugen"
 
-#: src/modules/X11/devX11.c:2529
+#: src/modules/X11/devX11.c:2527
 msgid "attempt to use the locator after dev.hold()"
 msgstr "Versuch den Lokator nach Aufruf von dev.hold() zu nutzen"
 
@@ -6611,7 +6643,7 @@ msgstr "ungültiger Farbtyp an X11 Treiber übergeben"
 
 #: src/modules/X11/devX11.c:3159
 msgid "unknown X11 color/colour model -- using monochrome"
-msgstr "unbekanntes X11 Farbmodell -- nutze Monochrom"
+msgstr "unbekanntes X11-Farbmodell -- nutze Monochrom"
 
 #: src/modules/X11/devX11.c:3249
 msgid "no plot on device to save"
@@ -6632,127 +6664,160 @@ msgstr "savePlot() wird auf dieser Plattform nicht unterstützt"
 
 #: src/modules/X11/devX11.c:3317
 msgid "unable to contact X11 display"
-msgstr "konnte Verbindung zu X11 Display nicht herstellen"
+msgstr "konnte Verbindung zu X11-Display nicht herstellen"
 
 #: src/modules/X11/devX11.c:3366
 #, c-format
 msgid "clipboard cannot be read (error code %d)"
 msgstr "Zwischenablage kann nicht gelesen werden (Fehlerkode %d)"
 
-#: src/modules/X11/devX11.c:3397
+#: src/modules/X11/devX11.c:3402
 msgid "cannot allocate memory for X11Routines structure"
 msgstr "kann Speicher für X11Routines-Struktur nicht zuteilen"
 
-#: src/modules/internet/internet.c:188 src/modules/internet/internet.c:192
-#: src/modules/internet/internet.c:198 src/modules/internet/internet.c:210
+#: src/modules/internet/internet.c:113
+msgid "for https:// URLs use setInternet2(TRUE)"
+msgstr "um https:// URLs zu nutzen setze setInternet2(TRUE)"
+
+#: src/modules/internet/internet.c:348 src/modules/internet/internet.c:352
+#: src/modules/internet/internet.c:357 src/modules/internet/internet.c:381
+#: src/modules/internet/libcurl.c:655 src/modules/internet/libcurl.c:659
+#: src/modules/internet/libcurl.c:665 src/modules/internet/libcurl.c:677
+#: src/modules/internet/libcurl.c:685
 msgid "allocation of url connection failed"
 msgstr "Allokation einer URL-Verbindung fehlgeschlagen"
 
-#: src/modules/internet/internet.c:286
+#: src/modules/internet/internet.c:455
 msgid "only first element of 'url' argument used"
 msgstr "nur das erste Element des 'url' Arguments wird benutzt"
 
-#: src/modules/internet/internet.c:292
+#: src/modules/internet/internet.c:461
 msgid "only first element of 'destfile' argument used"
 msgstr "nur das erste Element des 'destfile' Arguments wird benutzt"
 
-#: src/modules/internet/internet.c:317
+#: src/modules/internet/internet.c:479 src/modules/internet/libcurl.c:367
 msgid "Download progress"
 msgstr "Downloadfortschritt"
 
-#: src/modules/internet/internet.c:339
+#: src/modules/internet/internet.c:501
 #, c-format
 msgid "cannot open URL '%s', reason '%s'"
 msgstr "kann URL '%s' nicht öffnen. Grund '%s'"
 
-#: src/modules/internet/internet.c:346 src/modules/internet/internet.c:372
-#: src/modules/internet/internet.c:474
+#: src/modules/internet/internet.c:508 src/modules/internet/internet.c:536
+#: src/modules/internet/internet.c:661 src/modules/internet/libcurl.c:408
 #, c-format
 msgid "cannot open destfile '%s', reason '%s'"
 msgstr "kann Zieldatei '%s' nicht öffnen. Grund '%s'"
 
-#: src/modules/internet/internet.c:377 src/modules/internet/internet.c:479
+#: src/modules/internet/internet.c:541 src/modules/internet/internet.c:666
+#: src/modules/internet/libcurl.c:412
 #, c-format
 msgid "trying URL '%s'\n"
 msgstr "versuche URL '%s'\n"
 
-#: src/modules/internet/internet.c:384 src/modules/internet/internet.c:486
-msgid "opened URL\n"
-msgstr "URL geöffnet\n"
-
-#: src/modules/internet/internet.c:455 src/modules/internet/internet.c:560
+#: src/modules/internet/internet.c:640 src/modules/internet/internet.c:751
+#: src/modules/internet/libcurl.c:460
 #, c-format
-msgid "downloaded length %d != reported length %d"
-msgstr "heruntergeladene Länge %d != angegebener Länge %d"
+msgid "downloaded length %0.f != reported length %0.f"
+msgstr "heruntergeladene Länge %0.f != angegebene Länge %0.f"
 
-#: src/modules/internet/internet.c:460 src/modules/internet/internet.c:565
+#: src/modules/internet/internet.c:645 src/modules/internet/internet.c:756
 #, c-format
 msgid "cannot open URL '%s'"
 msgstr "kann URL '%s' nicht öffnen"
 
-#: src/modules/internet/internet.c:593 src/modules/internet/internet.c:828
+#: src/modules/internet/internet.c:760
+msgid "unsupported URL scheme"
+msgstr "nicht unterstütztes URL-Schema"
+
+#: src/modules/internet/internet.c:783 src/modules/internet/internet.c:949
 #, c-format
 msgid "cannot open: HTTP status was '%d %s'"
-msgstr "Öffnen fehlgeschlagen: HTTP Status war '%d %s'"
+msgstr "Öffnen fehlgeschlagen: HTTP-Status war '%d %s'"
 
-#: src/modules/internet/internet.c:772 src/modules/internet/internet.c:935
-msgid "InternetOpenUrl timed out"
-msgstr "InternetOpenUrl Time-Out"
-
-#: src/modules/internet/internet.c:799 src/modules/internet/internet.c:813
-#: src/modules/internet/internet.c:957 src/modules/internet/internet.c:966
+#: src/modules/internet/internet.c:920 src/modules/internet/internet.c:934
+#: src/modules/internet/internet.c:1021 src/modules/internet/internet.c:1030
 #, c-format
 msgid "InternetOpenUrl failed: '%s'"
 msgstr "InternetOpenUrl fehlgeschlagen: '%s'"
 
-#: src/modules/internet/internet.c:870
-msgid "Internet read timed out"
-msgstr "Lesen vom Internet: Time-Out"
+#: src/modules/internet/libcurl.c:142
+msgid "curlGetHeaders is not supported on this platform"
+msgstr "curlGetHeaders wird auf dieser Plattform nicht unterstützt"
+
+#: src/modules/internet/libcurl.c:151 src/modules/internet/libcurl.c:154
+#, c-format
+msgid "invalid %s argument"
+msgstr "ungültiges %s Argument"
+
+#: src/modules/internet/libcurl.c:171
+#, c-format
+msgid ""
+"libcurl error code %d\n"
+"\t%s\n"
+msgstr ""
+"libcurl Fehlercode %d\n"
+"\\t%s\n"
+
+#: src/modules/internet/libcurl.c:306
+msgid "download.file(method = \"libcurl\") is not supported on this platform"
+msgstr ""
+"download.file(method = \"libcurl\") wird auf dieser Plattform nicht "
+"unterstützt"
+
+#: src/modules/internet/libcurl.c:322
+msgid "lengths of 'url' and 'destfile' must match"
+msgstr "Länge von 'url' und 'destfile' muss übereinstimmen"
+
+#: src/modules/internet/libcurl.c:689
+msgid "url(method = \"libcurl\") is not supported on this platform"
+msgstr "url(method = \"libcurl\") wird auf dieser Plattform nicht unterstützt"
 
-#: src/modules/internet/nanoftp.c:288 src/modules/internet/nanoftp.c:301
-#: src/modules/internet/nanoftp.c:312 src/modules/internet/nanoftp.c:346
-#: src/modules/internet/nanoftp.c:356
+#: src/modules/internet/nanoftp.c:290 src/modules/internet/nanoftp.c:303
+#: src/modules/internet/nanoftp.c:314 src/modules/internet/nanoftp.c:348
+#: src/modules/internet/nanoftp.c:358
 msgid "RxmlNanoFTPScanURL: overlong (invalid?) URL"
 msgstr "RxmlNanoFTPScanURL: überlange (ungültige?) URL"
 
-#: src/modules/internet/nanoftp.c:389
+#: src/modules/internet/nanoftp.c:391
 msgid "removing FTP proxy info"
-msgstr "Entferne FTP Proxy Information"
+msgstr "Entferne FTP-Proxy-Information"
 
-#: src/modules/internet/nanoftp.c:391
+#: src/modules/internet/nanoftp.c:393
 #, c-format
 msgid "using FTP proxy '%s'"
-msgstr "Nutze FTP proxy '%s'"
+msgstr "Nutze FTP-Proxy '%s'"
 
-#: src/modules/internet/nanoftp.c:402 src/modules/internet/nanoftp.c:431
+#: src/modules/internet/nanoftp.c:404 src/modules/internet/nanoftp.c:433
 msgid "RxmlNanoFTPScanProxy: overlong (invalid?) URL"
 msgstr "RxmlNanoFTPScanProxy: überlange (ungültige?) URL"
 
-#: src/modules/internet/nanoftp.c:830
+#: src/modules/internet/nanoftp.c:834
 msgid "cannot resolve host"
 msgstr "kann Host nicht auflösen"
 
-#: src/modules/internet/nanoftp.c:860
+#: src/modules/internet/nanoftp.c:864
 msgid "failed to connect to server"
 msgstr "Verbindung zum Server fehlgeschlagen"
 
-#: src/modules/internet/nanoftp.c:871
+#: src/modules/internet/nanoftp.c:875
 msgid "failed to get response from server"
 msgstr "Keine Antwort vom Server"
 
-#: src/modules/internet/nanoftp.c:1134
+#: src/modules/internet/nanoftp.c:1138
 msgid "RxmlNanoFTPGetConnection: failed to create socket"
 msgstr "RxmlNanoFTPGetConnection: Socketbereitstellung fehlgeschlagen"
 
-#: src/modules/internet/nanoftp.c:1180
+#: src/modules/internet/nanoftp.c:1184
 msgid "failed to create a data connection"
 msgstr "Herstellung einer Datenverbindung fehlgeschlagen"
 
-#: src/modules/internet/nanoftp.c:1188
+#: src/modules/internet/nanoftp.c:1192
 msgid "failed to bind a port"
 msgstr "Binden an einen Port fehlgeschlagen"
 
-#: src/modules/internet/nanoftp.c:1195
+#: src/modules/internet/nanoftp.c:1199
 #, c-format
 msgid "could not listen on port %d"
 msgstr "konnte auf Port %d nicht lauschen"
@@ -6764,40 +6829,40 @@ msgstr "RxmlNanoHTTPScanURL: überlange (ungültige?) URL"
 
 #: src/modules/internet/nanohttp.c:441
 msgid "removing HTTP proxy info"
-msgstr "entferne HTTP Proxy Information"
+msgstr "entferne HTTP-Proxy-Information"
 
 #: src/modules/internet/nanohttp.c:443
 #, c-format
 msgid "using HTTP proxy '%s'"
-msgstr "nutze HTTP Proxy '%s'"
+msgstr "nutze HTTP-Proxy '%s'"
 
 #: src/modules/internet/nanohttp.c:454 src/modules/internet/nanohttp.c:490
 msgid "RxmlNanoHTTPScanProxy: overlong (invalid?) URL"
 msgstr "RxmlNanoHTTPScanProxy: überlange (ungültige?) URL"
 
-#: src/modules/internet/nanohttp.c:1107
+#: src/modules/internet/nanohttp.c:1124
 #, c-format
 msgid "unable to resolve '%s'"
 msgstr "kann '%s' nicht auflösen"
 
-#: src/modules/internet/nanohttp.c:1134
+#: src/modules/internet/nanohttp.c:1157
 #, c-format
 msgid "connected to '%s' on port %d."
 msgstr "verbunden mit '%s' auf Port %d"
 
-#: src/modules/internet/nanohttp.c:1139
+#: src/modules/internet/nanohttp.c:1162
 #, c-format
 msgid "unable to connect to '%s' on port %d."
 msgstr "kann nicht mit '%s' auf Port %d verbinden"
 
-#: src/modules/internet/nanohttp.c:1443
+#: src/modules/internet/nanohttp.c:1466
 #, c-format
 msgid "redirect to: '%s'"
 msgstr "leite nach '%s' um"
 
-#: src/modules/internet/nanohttp.c:1454
+#: src/modules/internet/nanohttp.c:1477
 msgid "too many redirects, aborting ..."
-msgstr "zu viele Umleitungen, breche ab ..."
+msgstr "zu viele Umleitungen (Redirects), breche ab ..."
 
 #: src/modules/internet/sockconn.c:177 src/modules/internet/sockconn.c:181
 #: src/modules/internet/sockconn.c:187 src/modules/internet/sockconn.c:200
@@ -6807,7 +6872,7 @@ msgstr "Allokation einer Socketverbindung fehlgeschlagen"
 #: src/modules/lapack/Lapack.c:48 src/modules/lapack/Lapack.c:67
 #, c-format
 msgid "argument type[1]='%s' must be a character string of string length 1"
-msgstr "Argument type[1]='%s' muss ein Charakter-Vektor der Länge 1 sein"
+msgstr "Argument type[1]='%s' muss ein Zeichenkettenvektor der Länge 1 sein"
 
 #: src/modules/lapack/Lapack.c:56
 #, c-format
@@ -6829,14 +6894,14 @@ msgstr "Argument type[1]='%s' muss einer von '1','O' oder 'I' sein"
 #: src/modules/lapack/Lapack.c:730 src/modules/lapack/Lapack.c:779
 #: src/modules/lapack/Lapack.c:786 src/modules/lapack/Lapack.c:834
 #: src/modules/lapack/Lapack.c:840 src/modules/lapack/Lapack.c:894
-#: src/modules/lapack/Lapack.c:900 src/modules/lapack/Lapack.c:1134
-#: src/modules/lapack/Lapack.c:1140 src/modules/lapack/Lapack.c:1188
-#: src/modules/lapack/Lapack.c:1195 src/modules/lapack/Lapack.c:1199
-#: src/modules/lapack/Lapack.c:1227 src/modules/lapack/Lapack.c:1234
-#: src/modules/lapack/Lapack.c:1254
+#: src/modules/lapack/Lapack.c:900 src/modules/lapack/Lapack.c:1135
+#: src/modules/lapack/Lapack.c:1141 src/modules/lapack/Lapack.c:1189
+#: src/modules/lapack/Lapack.c:1196 src/modules/lapack/Lapack.c:1200
+#: src/modules/lapack/Lapack.c:1228 src/modules/lapack/Lapack.c:1235
+#: src/modules/lapack/Lapack.c:1255
 #, c-format
 msgid "error code %d from Lapack routine '%s'"
-msgstr "Fehlercode %d von Lapackroutine '%s'"
+msgstr "Fehlercode %d von Lapack-Routine '%s'"
 
 #: src/modules/lapack/Lapack.c:153 src/modules/lapack/Lapack.c:248
 #: src/modules/lapack/Lapack.c:874
@@ -6860,7 +6925,7 @@ msgstr "'norm' muss eine Zeichenkette sein"
 #: src/modules/lapack/Lapack.c:377
 #, c-format
 msgid "error [%d] from Lapack 'dgetrf()'"
-msgstr "Fehlercode %d von Lapackroutine 'dgetrf()'"
+msgstr "Fehlercode %d von Lapack-Routine 'dgetrf()'"
 
 #: src/modules/lapack/Lapack.c:382
 #, c-format
@@ -6870,7 +6935,7 @@ msgstr "exakte Singularität: U[%d,%d] = 0 in LU-Zerlegung {Lapack 'dgetrf()'}"
 #: src/modules/lapack/Lapack.c:394
 #, c-format
 msgid "error [%d] from Lapack 'dgecon()'"
-msgstr "Fehlercode %d von Lapackroutine 'dgecon()'"
+msgstr "Fehlercode %d von Lapack-Routine 'dgecon()'"
 
 #: src/modules/lapack/Lapack.c:414 src/modules/lapack/Lapack.c:446
 #: src/modules/lapack/Lapack.c:504
@@ -6880,7 +6945,7 @@ msgstr "'A' muss *quadratische* Matrix sein"
 #: src/modules/lapack/Lapack.c:428
 #, c-format
 msgid "error [%d] from Lapack 'dtrcon()'"
-msgstr "Fehlercode %d von Lapackroutine 'dtrcon()'"
+msgstr "Fehlercode %d von Lapack-Routine 'dtrcon()'"
 
 #: src/modules/lapack/Lapack.c:443 src/modules/lapack/Lapack.c:500
 msgid "'A' must be a complex matrix"
@@ -6889,12 +6954,12 @@ msgstr "'A' muss eine komplexe Matrix sein"
 #: src/modules/lapack/Lapack.c:465 src/modules/lapack/Lapack.c:472
 #, c-format
 msgid "error [%d] from Lapack 'zgetrf()'"
-msgstr "Fehlercode %d von Lapackroutine 'zgetrf()'"
+msgstr "Fehlercode %d von Lapack-Routine 'zgetrf()'"
 
 #: src/modules/lapack/Lapack.c:480
 #, c-format
 msgid "error [%d] from Lapack 'zgecon()'"
-msgstr "Fehlercode %d von Lapackroutine 'zgecon()'"
+msgstr "Fehlercode %d von Lapack-Routine 'zgecon()'"
 
 #: src/modules/lapack/Lapack.c:484 src/modules/lapack/Lapack.c:519
 #: src/modules/lapack/Lapack.c:588 src/modules/lapack/Lapack.c:648
@@ -6907,44 +6972,44 @@ msgstr "komplexe Fortran Funktionen auf dieser Plattform nicht verfügbar"
 #: src/modules/lapack/Lapack.c:516
 #, c-format
 msgid "error [%d] from Lapack 'ztrcon()'"
-msgstr "Fehlercode %d von Lapackroutine 'ztrcon()'"
+msgstr "Fehlercode %d von Lapack-Routine 'ztrcon()'"
 
 #: src/modules/lapack/Lapack.c:532 src/modules/lapack/Lapack.c:602
 msgid "'a' must be a complex matrix"
 msgstr "'a' muss eine komplexe Matrix sein"
 
-#: src/modules/lapack/Lapack.c:535 src/modules/lapack/Lapack.c:1042
+#: src/modules/lapack/Lapack.c:535 src/modules/lapack/Lapack.c:1043
 msgid "'a' is 0-diml"
 msgstr "'a' ist 0-dimensional"
 
-#: src/modules/lapack/Lapack.c:537 src/modules/lapack/Lapack.c:1044
+#: src/modules/lapack/Lapack.c:537 src/modules/lapack/Lapack.c:1045
 #, c-format
 msgid "'a' (%d x %d) must be square"
 msgstr "'a' (%d x %d) muss quadratisch sein"
 
-#: src/modules/lapack/Lapack.c:543 src/modules/lapack/Lapack.c:1050
+#: src/modules/lapack/Lapack.c:543 src/modules/lapack/Lapack.c:1051
 msgid "no right-hand side in 'b'"
 msgstr "keine rechte Seite in 'b'"
 
 #: src/modules/lapack/Lapack.c:546 src/modules/lapack/Lapack.c:560
-#: src/modules/lapack/Lapack.c:1053 src/modules/lapack/Lapack.c:1069
+#: src/modules/lapack/Lapack.c:1054 src/modules/lapack/Lapack.c:1070
 #, c-format
 msgid "'b' (%d x %d) must be compatible with 'a' (%d x %d)"
 msgstr "'b' (%d x %d) muss zu 'a' (%d x %d) passen"
 
 #: src/modules/lapack/Lapack.c:581 src/modules/lapack/Lapack.c:948
-#: src/modules/lapack/Lapack.c:962 src/modules/lapack/Lapack.c:1017
-#: src/modules/lapack/Lapack.c:1091
+#: src/modules/lapack/Lapack.c:962 src/modules/lapack/Lapack.c:1018
+#: src/modules/lapack/Lapack.c:1092
 #, c-format
 msgid "argument %d of Lapack routine %s had invalid value"
-msgstr "Argument %d der Lapackroutine '%s' hatte ungültigen Wert"
+msgstr "Argument %d der Lapack-Routine '%s' hatte ungültigen Wert"
 
 #: src/modules/lapack/Lapack.c:662 src/modules/lapack/Lapack.c:707
 msgid "'b' must be a complex matrix"
 msgstr "'b' muss eine komplexe Matrix sein"
 
 #: src/modules/lapack/Lapack.c:670 src/modules/lapack/Lapack.c:716
-#: src/modules/lapack/Lapack.c:1181 src/modules/lapack/Lapack.c:1220
+#: src/modules/lapack/Lapack.c:1182 src/modules/lapack/Lapack.c:1221
 #, c-format
 msgid "right-hand side should have %d not %d rows"
 msgstr "rechte Seite sollte %d, nicht %d Zeilen haben"
@@ -6961,13 +7026,13 @@ msgstr "Matrizen mit 2^31 oder mehr Elementen werden nicht unterstützt"
 msgid "'x' must be a square complex matrix"
 msgstr "'x' muss eine quadratische, komplexe Matrix sein"
 
-#: src/modules/lapack/Lapack.c:926 src/modules/lapack/Lapack.c:1000
-#: src/modules/lapack/Lapack.c:1039 src/modules/lapack/Lapack.c:1114
-#: src/modules/lapack/Lapack.c:1245
+#: src/modules/lapack/Lapack.c:926 src/modules/lapack/Lapack.c:1001
+#: src/modules/lapack/Lapack.c:1040 src/modules/lapack/Lapack.c:1115
+#: src/modules/lapack/Lapack.c:1246
 msgid "'a' must be a numeric matrix"
 msgstr "'a' muss numerische Matrix sein"
 
-#: src/modules/lapack/Lapack.c:933 src/modules/lapack/Lapack.c:1250
+#: src/modules/lapack/Lapack.c:933 src/modules/lapack/Lapack.c:1251
 msgid "'a' must be a square matrix"
 msgstr "'a' muss quadratische Matrix sein"
 
@@ -6984,40 +7049,40 @@ msgstr "der führende Minor der Ordnung %d ist nicht positiv definit"
 msgid "the matrix is either rank-deficient or indefinite"
 msgstr "die Matrix hat entweder nicht vollen Rang oder ist indefinit"
 
-#: src/modules/lapack/Lapack.c:987
+#: src/modules/lapack/Lapack.c:988
 msgid "'size' argument must be a positive integer"
 msgstr "Argument 'size' muss positive ganze Zahl sein"
 
-#: src/modules/lapack/Lapack.c:1002
+#: src/modules/lapack/Lapack.c:1003
 #, c-format
 msgid "'size' cannot exceed ncol(x) = %d"
 msgstr "'size' kann ncol(x) = %d nicht überschreiten"
 
-#: src/modules/lapack/Lapack.c:1003
+#: src/modules/lapack/Lapack.c:1004
 #, c-format
 msgid "'size' cannot exceed nrow(x) = %d"
 msgstr "'size' kann nrow(x) = %d nicht überschreiten"
 
-#: src/modules/lapack/Lapack.c:1015
+#: src/modules/lapack/Lapack.c:1016
 #, c-format
 msgid "element (%d, %d) is zero, so the inverse cannot be computed"
 msgstr "Element (%d, %d) ist Null, deshalb kann Inverse nicht berechnet werden"
 
-#: src/modules/lapack/Lapack.c:1094
+#: src/modules/lapack/Lapack.c:1095
 #, c-format
 msgid "Lapack routine %s: system is exactly singular: U[%d,%d] = 0"
 msgstr "Lapackroutine %s: System ist genau singulär: U[%d,%d] = 0"
 
-#: src/modules/lapack/Lapack.c:1102
+#: src/modules/lapack/Lapack.c:1103
 #, c-format
 msgid "system is computationally singular: reciprocal condition number = %g"
 msgstr "System ist für den Rechner singulär: reziproke Konditionszahl = %g"
 
-#: src/modules/lapack/Lapack.c:1174 src/modules/lapack/Lapack.c:1212
+#: src/modules/lapack/Lapack.c:1175 src/modules/lapack/Lapack.c:1213
 msgid "'b' must be a numeric matrix"
 msgstr "'b' muss numerische Matrix sein"
 
-#: src/modules/lapack/Lapack.c:1246
+#: src/modules/lapack/Lapack.c:1247
 msgid "argument 'logarithm' must be logical"
 msgstr "Argument 'logarithm' muss boolesch sein"
 
@@ -7037,18 +7102,18 @@ msgstr ""
 msgid "bessel_i(%g,nu=%g): precision lost in result\n"
 msgstr "bessel_i(%g,nu=%g): Präzision im Ergebnis verloren\n"
 
-#: src/nmath/bessel_j.c:67
+#: src/nmath/bessel_j.c:71
 msgid "bessel_j allocation error"
 msgstr "Allokationsfehler in bessel_j"
 
-#: src/nmath/bessel_j.c:75 src/nmath/bessel_j.c:118
+#: src/nmath/bessel_j.c:79 src/nmath/bessel_j.c:125
 #, c-format
 msgid "bessel_j(%g): ncalc (=%ld) != nb (=%ld); alpha=%g. Arg. out of range?\n"
 msgstr ""
 "bessel_j(%g): ncalc (=%ld) != nb (=%ld); alpha=%g. Argument außerhalb des "
 "Bereichs?\n"
 
-#: src/nmath/bessel_j.c:78 src/nmath/bessel_j.c:121
+#: src/nmath/bessel_j.c:82 src/nmath/bessel_j.c:128
 #, c-format
 msgid "bessel_j(%g,nu=%g): precision lost in result\n"
 msgstr "bessel_j(%g,nu=%g): Präzision im Ergebnis verloren\n"
@@ -7069,18 +7134,18 @@ msgstr ""
 msgid "bessel_k(%g,nu=%g): precision lost in result\n"
 msgstr "bessel_k(%g,nu=%g): Präzision im Ergebnis verloren\n"
 
-#: src/nmath/bessel_y.c:66
+#: src/nmath/bessel_y.c:70
 msgid "bessel_y allocation error"
 msgstr "Allokationsfehler in bessel_y"
 
-#: src/nmath/bessel_y.c:82 src/nmath/bessel_y.c:127
+#: src/nmath/bessel_y.c:86 src/nmath/bessel_y.c:134
 #, c-format
 msgid "bessel_y(%g): ncalc (=%ld) != nb (=%ld); alpha=%g. Arg. out of range?\n"
 msgstr ""
 "bessel_y(%g): ncalc (=%ld) != nb (=%ld); alpha=%g. Argument außerhalb des "
 "Bereichs?\n"
 
-#: src/nmath/bessel_y.c:85 src/nmath/bessel_y.c:130
+#: src/nmath/bessel_y.c:89 src/nmath/bessel_y.c:137
 #, c-format
 msgid "bessel_y(%g,nu=%g): precision lost in result\n"
 msgstr "bessel_y(%g,nu=%g): Präzision im Ergebnis verloren\n"
@@ -7090,45 +7155,45 @@ msgstr "bessel_y(%g,nu=%g): Präzision im Ergebnis verloren\n"
 msgid "'k' (%.2f) must be integer, rounded to %.0f"
 msgstr "'k' (%.2f) muss ganze Zahl sein, gerundet auf %.0f"
 
-#: src/nmath/nmath.h:141
+#: src/nmath/nmath.h:143
 #, c-format
 msgid "argument out of domain in '%s'\n"
 msgstr "Wert außerhalb des Bereichs in '%s'\n"
 
-#: src/nmath/nmath.h:144
+#: src/nmath/nmath.h:146
 #, c-format
 msgid "value out of range in '%s'\n"
 msgstr "Wert außerhalb des Bereichs in '%s'\n"
 
-#: src/nmath/nmath.h:147
+#: src/nmath/nmath.h:149
 #, c-format
 msgid "convergence failed in '%s'\n"
 msgstr "Keine Konvergenz in '%s'\n"
 
-#: src/nmath/nmath.h:150
+#: src/nmath/nmath.h:152
 #, c-format
 msgid "full precision may not have been achieved in '%s'\n"
 msgstr "eventuell wurde in '%s' nicht die volle Genauigkeit erreicht\n"
 
-#: src/nmath/nmath.h:153
+#: src/nmath/nmath.h:155
 #, c-format
 msgid "underflow occurred in '%s'\n"
 msgstr "Underflow in '%s' aufgetreten\n"
 
-#: src/nmath/pbeta.c:48
+#: src/nmath/pbeta.c:67
 #, c-format
-msgid "pbeta_raw() -> bratio() gave error code %d"
-msgstr "pbeta_raw() -> bratio() ergab Fehlerkode %d"
+msgid "pbeta_raw(%g, a=%g, b=%g, ..) -> bratio() gave error code %d"
+msgstr "pbeta_raw(%g, a=%g, b=%g, ..) -> bratio() ergab Fehlerkode %d"
 
 #: src/nmath/pnbinom.c:79
 #, c-format
 msgid "pnbinom_mu() -> bratio() gave error code %d"
 msgstr "pnbinom_mu() -> bratio() ergab Fehlerkode %d"
 
-#: src/nmath/pnchisq.c:246
+#: src/nmath/pnchisq.c:292
 #, c-format
 msgid "pnchisq(x=%g, ..): not converged in %d iter."
-msgstr "pnchisq(x=%g, ..): in %d Iterationen nicht konvergiert"
+msgstr "pnchisq(x=%g, ..): nach %d Iterationen nicht konvergiert"
 
 #: src/nmath/polygamma.c:499
 #, c-format
@@ -7138,7 +7203,7 @@ msgstr "deriv = %d > %d (= n_max)\n"
 #: src/nmath/rmultinom.c:78
 #, c-format
 msgid "rbinom: probability sum should be 1, but is %g"
-msgstr "rbinom: Wahrscheinlichkeitssumme sollte 1 sein, ist aber %g"
+msgstr "rbinom: Summe der Wahrscheinlichkeiten sollte 1 ergeben, ergab aber %g"
 
 #: src/nmath/signrank.c:77
 msgid "signrank allocation error"
@@ -7157,17 +7222,17 @@ msgstr "Allokationsfehler %d in wilcox"
 
 #: src/unix/X11.c:54
 msgid "X11 module is not available under this GUI"
-msgstr "X11 Modul ist unter diesem GUI nicht verfügbar"
+msgstr "X11-Modul ist unter diesem GUI nicht verfügbar"
 
 #: src/unix/X11.c:60
 msgid "X11 routines cannot be accessed in module"
-msgstr "X11 Routinen aus Modul nicht verfügbar"
+msgstr "X11-Routinen aus Modul nicht verfügbar"
 
 #: src/unix/X11.c:78 src/unix/X11.c:90 src/unix/X11.c:102 src/unix/X11.c:113
 msgid "X11 module cannot be loaded"
-msgstr "X11 Modul kann nicht geladen werden"
+msgstr "X11-Modul kann nicht geladen werden"
 
-#: src/unix/X11.c:126 src/unix/X11.c:132 src/unix/X11.c:138 src/unix/X11.c:144
+#: src/unix/X11.c:144 src/unix/X11.c:150 src/unix/X11.c:156 src/unix/X11.c:162
 msgid "X11 is not available"
 msgstr "X11 nicht verfügbar"
 
@@ -7214,15 +7279,15 @@ msgid ""
 "An unusual circumstance has arisen in the nesting of readline input. Please "
 "report using bug.report()"
 msgstr ""
-"Ungewöhnliches Ereignis aufgetreten in verschachtelter readline Eingabe. "
-"Bitte melden Sie's via bug.report()"
+"Ungewöhnliches Ereignis in verschachtelter 'readline'-Eingabe aufgetreten. "
+"Bitte melden Sie dies via bug.report()"
 
-#: src/unix/sys-std.c:1082 src/unix/sys-std.c:1249
+#: src/unix/sys-std.c:1085 src/unix/sys-std.c:1252
 #, c-format
 msgid "problem in saving the history file '%s'"
 msgstr "Problem beim Speichern der Befehlshistory '%s'"
 
-#: src/unix/sys-std.c:1156
+#: src/unix/sys-std.c:1159
 #, c-format
 msgid ""
 "Cannot open file '%s': %s\n"
@@ -7231,86 +7296,178 @@ msgstr ""
 "kann Datei '%s': %s nicht öffnen\n"
 "\n"
 
-#: src/unix/sys-std.c:1220 src/unix/sys-std.c:1243
+#: src/unix/sys-std.c:1223 src/unix/sys-std.c:1246
 msgid "'file' argument is too long"
 msgstr "Argument für 'file' zu lang"
 
-#: src/unix/sys-std.c:1226 src/unix/sys-std.c:1228
+#: src/unix/sys-std.c:1229 src/unix/sys-std.c:1231
 msgid "no history mechanism available"
-msgstr "kein History Mechanismus verfügbar"
+msgstr "kein History-Mechanismus verfügbar"
 
-#: src/unix/sys-std.c:1255
+#: src/unix/sys-std.c:1258
 msgid "problem in truncating the history file"
 msgstr "Problem beim Kürzen der Befehlshistory"
 
-#: src/unix/sys-std.c:1257 src/unix/sys-std.c:1259
+#: src/unix/sys-std.c:1260 src/unix/sys-std.c:1262
 msgid "no history available to save"
 msgstr "keine History zum Sichern verfügbar"
 
-#: src/unix/sys-std.c:1271
+#: src/unix/sys-std.c:1274
 msgid "invalid timestamp"
 msgstr "ungültiger Zeitstempel"
 
-#: src/unix/sys-unix.c:251
+#: src/unix/sys-unix.c:247
 msgid "non-empty character argument expected"
-msgstr "erwarte nicht-leeres Charakter-Argument"
+msgstr "erwarte nicht-leeres Zeichenketten-Argument"
 
-#: src/unix/sys-unix.c:254
+#: src/unix/sys-unix.c:250
 msgid "'intern' must be logical and not NA"
-msgstr "'intern' muss ein logischer Wert und kein NA sein"
+msgstr "'intern' muss ein logischer Wert und nicht NA sein"
 
-#: src/unix/sys-unix.c:266
+#: src/unix/sys-unix.c:262
 #, c-format
 msgid "cannot popen '%s', probable reason '%s'"
 msgstr "kann nicht popen '%s'. Grund vermutlich '%s'"
 
-#: src/unix/sys-unix.c:271
+#: src/unix/sys-unix.c:267
 #, c-format
 msgid "line %d may be truncated in call to system(, intern = TRUE)"
 msgstr ""
 "Zeile %d eventuell abgeschnitten beim Aufruf von system(, intern = TRUE)"
 
-#: src/unix/sys-unix.c:288
+#: src/unix/sys-unix.c:284
 #, c-format
 msgid "error in running command: '%s'"
 msgstr "Fehler bei der Ausführung von: '%s'"
 
-#: src/unix/sys-unix.c:290
+#: src/unix/sys-unix.c:286
 msgid "error in running command"
-msgstr "Fehler bei der Ausführung des Kommandos"
+msgstr "Fehler bei der Ausführung des Befehls"
 
-#: src/unix/sys-unix.c:294
+#: src/unix/sys-unix.c:290
 #, c-format
 msgid "running command '%s' had status %d and error message '%s'"
-msgstr "Ausführung von Kommando '%s' ergab Status %d und Fehlermeldung '%s'"
+msgstr "Ausführung von Befehl '%s' ergab Status %d und Fehlermeldung '%s'"
 
-#: src/unix/sys-unix.c:399
+#: src/unix/sys-unix.c:395
 msgid "Sys.info() is not implemented on this system"
 msgstr "Sys.info() ist auf diesem System nicht implementiert"
 
-#: src/unix/system.c:257
+#: src/unix/system.c:267
 #, c-format
 msgid "WARNING: --gui or -g without value ignored"
 msgstr "Warnung: --gui oder -g ohne Wert ignoriert"
 
-#: src/unix/system.c:275
+#: src/unix/system.c:285
 #, c-format
 msgid "WARNING: unknown gui '%s', using X11\n"
-msgstr "Warnung: unbekanntes gui '%s', nutze X11\n"
+msgstr "Warnung: unbekanntes GUI '%s', nutze X11\n"
 
-#: src/unix/system.c:278
+#: src/unix/system.c:288
 #, c-format
 msgid "WARNING: unknown gui '%s', using none\n"
-msgstr "Warnung: unbekanntes gui '%s', nutze keines\n"
+msgstr "Warnung: unbekanntes GUI '%s', nutze keines\n"
 
-#: src/unix/system.c:388
+#: src/unix/system.c:373
 msgid "creating temporary file for '-e' failed"
 msgstr "Erzeugen einer temporären Datei für '-e' fehlgeschlagen"
 
-#: src/unix/system.c:469
+#: src/unix/system.c:454
 msgid "WARNING: Only editing the first in the list of files"
 msgstr "Warnung: editiere nur das erste in der Dateiliste"
 
+#~ msgid "'dimnames' must be a list"
+#~ msgstr "'dimnames' muss eine Liste sein"
+
+#~ msgid "'args' must be a list"
+#~ msgstr "'args' muss eine Liste sein"
+
+#~ msgid "binary operations require two arguments"
+#~ msgstr "binäre Operationen verlangen zwei Argumente"
+
+#~ msgid "opened URL\n"
+#~ msgstr "URL geöffnet\n"
+
+#~ msgid "internet routines were already initialized"
+#~ msgstr "Internet Routinen sind bereits initialisiert"
+
+#~ msgid "'msg1' must be a character string"
+#~ msgstr "'msg1' muss eine Zeichenkette sein"
+
+#~ msgid "'msg2' must be a character string"
+#~ msgstr "'msg2' muss eine Zeichenkette sein"
+
+#~ msgid "argument 'code' must be a character string"
+#~ msgstr "Argument 'code' muss Zeichenkette sein"
+
+#~ msgid "argument 'type' must be a character string"
+#~ msgstr "Argument 'type' muss Zeichenkette sein"
+
+#~ msgid "InternetOpenUrl timed out"
+#~ msgstr "InternetOpenUrl Time-Out"
+
+#~ msgid "Internet read timed out"
+#~ msgstr "Lesen vom Internet: Time-Out"
+
+#~ msgid "unable to find a closure from within which 'match.call' was called"
+#~ msgstr "kann keinen Aschluss finden, aus dem 'match.call' aufgerufen wurde"
+
+#~ msgid "vfont routines cannot be accessed in module"
+#~ msgstr "auf vfont Routinen kann aus Modul nicht zugegriffen werden"
+
+#~ msgid "Hershey fonts cannot be loaded"
+#~ msgstr "Hershey fonts können nicht geladen werden"
+
+#~ msgid "invalid generic function in 'usemethod'"
+#~ msgstr "ungültige generische Funktion in 'usemethod'"
+
+#~ msgid "'UseMethod' called from outside a function"
+#~ msgstr "'UseMethod' außerhalb einer Funktion aufgerufen"
+
+#~ msgid "first argument must be a generic name"
+#~ msgstr "erstes Argument muss ein generischer Name sein"
+
+#~ msgid ""
+#~ "explicit request not to duplicate arguments in call to '%s', but argument "
+#~ "%d is of the wrong type (%d != %d)"
+#~ msgstr ""
+#~ "expliziter Wunsch Argumente im Aufruf von '%s' nicht zu duplizieren, aber "
+#~ "Argument %d ist von falschem Typ (%d != %d)"
+
+#~ msgid "single values not returned if not duplicated"
+#~ msgstr "einzelne Werte nicht zurückgegeben, wenn nicht doppelt"
+
+#~ msgid "character variables must be duplicated in .C/.Fortran"
+#~ msgstr "Charakter Variablen müssen in .C/.Fortran dupliziert werden"
+
+#~ msgid "call name too long in '%s'"
+#~ msgstr "Aufrufname in '%s' zu lang"
+
+#~ msgid "generic name too long in '%s'"
+#~ msgstr "generischer Name in '%s' zu lang"
+
+#~ msgid "method name too long in '%s'"
+#~ msgstr "Methodenname in '%s' zu lang"
+
+#~ msgid "%d arguments passed to 'log' which requires 1 or 2"
+#~ msgstr "%d Argumente an 'log' übergeben, das 1 oder 2 braucht"
+
+#~ msgid ""
+#~ "Warning in %s :\n"
+#~ "  %s\n"
+#~ msgstr ""
+#~ "Warnung in %s :\n"
+#~ "  %s\n"
+
+#~ msgid "input"
+#~ msgstr "Eingabe"
+
+#~ msgid "symbol"
+#~ msgstr "Symbol"
+
+#~ msgid "assignment"
+#~ msgstr "Zuweisung"
+
 #~ msgid "negative value in 'x'"
 #~ msgstr "negativer Wert in 'x'"
 
@@ -7407,9 +7564,6 @@ msgstr "Warnung: editiere nur das erste in der Dateiliste"
 #~ msgid "invalid return value count in call_R"
 #~ msgstr "ungültige Zahl von Rückgabewerten in call_R"
 
-#~ msgid "internal error in unz code"
-#~ msgstr "interner Fehler in unz Code"
-
 #~ msgid "can't use R profiling while byte code profiling"
 #~ msgstr "kann R profiling nicht nutzen während Profiling von Byte-Code läuft"
 
@@ -7592,9 +7746,6 @@ msgstr "Warnung: editiere nur das erste in der Dateiliste"
 #~ msgid "'%s' must be length 1"
 #~ msgstr "'%s' muss Länge 1 haben"
 
-#~ msgid "'%s' must be a list"
-#~ msgstr "'%s' muss eine Liste sein"
-
 #~ msgid "'%s' element %d is not a window handle"
 #~ msgstr "'%s' Element %d ist kein Fenster handle"
 
@@ -7712,9 +7863,6 @@ msgstr "Warnung: editiere nur das erste in der Dateiliste"
 #~ msgid "no factors"
 #~ msgstr "keine Faktoren"
 
-#~ msgid "invalid factors"
-#~ msgstr "ungültige Faktoren"
-
 #~ msgid "bad units specified in '%s'"
 #~ msgstr "unbrauchbare Einheit in '%s' spezifiziert"
 
diff --git a/src/library/base/po/en.po b/src/library/base/po/en.po
index 4726516..a7bf048 100644
--- a/src/library/base/po/en.po
+++ b/src/library/base/po/en.po
@@ -7,12 +7,12 @@
 msgid ""
 msgstr ""
 "Project-Id-Version: R 2.1.0\n"
-"Report-Msgid-Bugs-To: bugs.r-project.org\n"
-"POT-Creation-Date: 2014-03-27 07:46+0000\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2016-04-01 10:28-0700\n"
 "PO-Revision-Date: 2005-01-25 12:01+0000\n"
 "Last-Translator: Brian Ripley <Brian.Ripley at R-project.org>\n"
 "Language-Team: R-core <R-core at R-project.org>\n"
-"Language: \n"
+"Language: en\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=ISO-8859-1\n"
 "Content-Transfer-Encoding: 8bit\n"
@@ -50,15 +50,15 @@ msgstr ""
 msgid "unknown type in \"CG\" method of 'optim'"
 msgstr ""
 
-#: src/appl/optim.c:665
+#: src/appl/optim.c:662
 msgid "REPORT must be > 0 (method = \"L-BFGS-B\")"
 msgstr ""
 
-#: src/appl/optim.c:688
+#: src/appl/optim.c:685
 msgid "L-BFGS-B needs finite values of 'fn'"
 msgstr ""
 
-#: src/appl/optim.c:744
+#: src/appl/optim.c:741
 msgid "trace, REPORT must be >= 0 (method = \"SANN\")"
 msgstr ""
 
@@ -123,122 +123,127 @@ msgstr ""
 msgid "problem in displaying '%ls'"
 msgstr ""
 
-#: src/gnuwin32/extra.c:116 src/gnuwin32/extra.c:159 src/gnuwin32/extra.c:349
-#: src/gnuwin32/extra.c:577 src/gnuwin32/extra.c:602 src/main/agrep.c:131
-#: src/main/agrep.c:135 src/main/agrep.c:775 src/main/agrep.c:780
-#: src/main/apply.c:293 src/main/apply.c:295 src/main/apply.c:298
-#: src/main/array.c:87 src/main/array.c:1137 src/main/array.c:1263
-#: src/main/array.c:1265 src/main/array.c:1266 src/main/array.c:1592
-#: src/main/array.c:1594 src/main/array.c:1596 src/main/attrib.c:196
+#: src/gnuwin32/extra.c:116 src/gnuwin32/extra.c:158 src/gnuwin32/extra.c:348
+#: src/gnuwin32/extra.c:574 src/gnuwin32/extra.c:599 src/main/agrep.c:131
+#: src/main/agrep.c:135 src/main/agrep.c:776 src/main/agrep.c:781
+#: src/main/apply.c:330 src/main/apply.c:332 src/main/apply.c:335
+#: src/main/array.c:90 src/main/array.c:1272 src/main/array.c:1411
+#: src/main/array.c:1413 src/main/array.c:1414 src/main/array.c:1758
+#: src/main/array.c:1760 src/main/array.c:1762 src/main/attrib.c:190
 #: src/main/builtin.c:88 src/main/builtin.c:97 src/main/builtin.c:116
-#: src/main/builtin.c:118 src/main/builtin.c:147 src/main/builtin.c:534
-#: src/main/builtin.c:550 src/main/builtin.c:739 src/main/builtin.c:741
-#: src/main/builtin.c:743 src/main/character.c:139 src/main/character.c:142
-#: src/main/character.c:203 src/main/character.c:1037
-#: src/main/character.c:1041 src/main/character.c:1276
-#: src/main/character.c:1280 src/main/character.c:1341
-#: src/main/character.c:1344 src/main/connections.c:1217
-#: src/main/connections.c:1223 src/main/connections.c:1226
-#: src/main/connections.c:1230 src/main/connections.c:1375
-#: src/main/connections.c:1391 src/main/connections.c:1396
-#: src/main/connections.c:1996 src/main/connections.c:2002
-#: src/main/connections.c:2006 src/main/connections.c:2010
-#: src/main/connections.c:2015 src/main/connections.c:2665
-#: src/main/connections.c:2670 src/main/connections.c:2673
-#: src/main/connections.c:2676 src/main/connections.c:3057
-#: src/main/connections.c:3062 src/main/connections.c:3068
-#: src/main/connections.c:3071 src/main/connections.c:3075
-#: src/main/connections.c:3090 src/main/connections.c:3140
-#: src/main/connections.c:3145 src/main/connections.c:3149
-#: src/main/connections.c:3153 src/main/connections.c:3157
-#: src/main/connections.c:3163 src/main/connections.c:3210
-#: src/main/connections.c:3216 src/main/connections.c:3220
-#: src/main/connections.c:3270 src/main/connections.c:3273
-#: src/main/connections.c:3547 src/main/connections.c:3550
-#: src/main/connections.c:3553 src/main/connections.c:3559
-#: src/main/connections.c:3666 src/main/connections.c:3672
-#: src/main/connections.c:3675 src/main/connections.c:3826
-#: src/main/connections.c:3829 src/main/connections.c:3833
-#: src/main/connections.c:3836 src/main/connections.c:3956
-#: src/main/connections.c:4074 src/main/connections.c:4077
-#: src/main/connections.c:4414 src/main/connections.c:4439
-#: src/main/connections.c:4474 src/main/connections.c:4489
-#: src/main/connections.c:4497 src/main/connections.c:4523
-#: src/main/connections.c:4669 src/main/connections.c:4673
-#: src/main/connections.c:4801 src/main/connections.c:4803
-#: src/main/connections.c:4805 src/main/connections.c:4833
-#: src/main/connections.c:4965 src/main/connections.c:4991
-#: src/main/connections.c:4995 src/main/connections.c:4999
-#: src/main/connections.c:5003 src/main/context.c:596 src/main/context.c:605
-#: src/main/context.c:609 src/main/datetime.c:775 src/main/datetime.c:865
-#: src/main/datetime.c:867 src/main/datetime.c:871 src/main/datetime.c:1026
-#: src/main/datetime.c:1028 src/main/datetime.c:1232 src/main/debug.c:228
-#: src/main/deparse.c:397 src/main/dotcode.c:478 src/main/dotcode.c:482
-#: src/main/dotcode.c:487 src/main/dounzip.c:322 src/main/dounzip.c:329
-#: src/main/dounzip.c:339 src/main/dounzip.c:344 src/main/dounzip.c:348
-#: src/main/dounzip.c:352 src/main/envir.c:1618 src/main/envir.c:1621
-#: src/main/envir.c:1742 src/main/envir.c:1747 src/main/envir.c:1813
-#: src/main/envir.c:1829 src/main/envir.c:1835 src/main/envir.c:1932
-#: src/main/envir.c:1940 src/main/envir.c:1947 src/main/envir.c:1958
-#: src/main/envir.c:2172 src/main/envir.c:2293 src/main/envir.c:2552
-#: src/main/envir.c:2762 src/main/envir.c:2776 src/main/envir.c:2783
-#: src/main/envir.c:2799 src/main/envir.c:3367 src/main/errors.c:1030
-#: src/main/eval.c:397 src/main/eval.c:406 src/main/eval.c:409
-#: src/main/grep.c:767 src/main/grep.c:772 src/main/grep.c:1061
-#: src/main/grep.c:1063 src/main/grep.c:1065 src/main/grep.c:1510
-#: src/main/grep.c:1514 src/main/grep.c:1519 src/main/grep.c:2323
-#: src/main/grep.c:2328 src/main/grep.c:2621 src/main/grep.c:2626
-#: src/main/memory.c:3736 src/main/paste.c:96 src/main/paste.c:395
-#: src/main/paste.c:402 src/main/paste.c:409 src/main/paste.c:414
-#: src/main/paste.c:419 src/main/paste.c:424 src/main/paste.c:427
-#: src/main/paste.c:435 src/main/paste.c:601 src/main/paste.c:606
+#: src/main/builtin.c:118 src/main/builtin.c:149 src/main/builtin.c:569
+#: src/main/builtin.c:585 src/main/builtin.c:773 src/main/builtin.c:775
+#: src/main/builtin.c:777 src/main/character.c:239 src/main/character.c:242
+#: src/main/character.c:247 src/main/character.c:788 src/main/character.c:791
+#: src/main/character.c:1289 src/main/character.c:1293
+#: src/main/character.c:1528 src/main/character.c:1532
+#: src/main/character.c:1593 src/main/character.c:1596
+#: src/main/connections.c:1208 src/main/connections.c:1214
+#: src/main/connections.c:1217 src/main/connections.c:1221
+#: src/main/connections.c:1367 src/main/connections.c:1383
+#: src/main/connections.c:1388 src/main/connections.c:1989
+#: src/main/connections.c:1995 src/main/connections.c:1999
+#: src/main/connections.c:2003 src/main/connections.c:2008
+#: src/main/connections.c:2659 src/main/connections.c:2664
+#: src/main/connections.c:2667 src/main/connections.c:2670
+#: src/main/connections.c:3053 src/main/connections.c:3058
+#: src/main/connections.c:3064 src/main/connections.c:3067
+#: src/main/connections.c:3071 src/main/connections.c:3086
+#: src/main/connections.c:3135 src/main/connections.c:3140
+#: src/main/connections.c:3144 src/main/connections.c:3148
+#: src/main/connections.c:3152 src/main/connections.c:3158
+#: src/main/connections.c:3203 src/main/connections.c:3209
+#: src/main/connections.c:3213 src/main/connections.c:3264
+#: src/main/connections.c:3267 src/main/connections.c:3543
+#: src/main/connections.c:3546 src/main/connections.c:3549
+#: src/main/connections.c:3555 src/main/connections.c:3662
+#: src/main/connections.c:3668 src/main/connections.c:3671
+#: src/main/connections.c:3823 src/main/connections.c:3826
+#: src/main/connections.c:3830 src/main/connections.c:3833
+#: src/main/connections.c:3954 src/main/connections.c:4085
+#: src/main/connections.c:4088 src/main/connections.c:4425
+#: src/main/connections.c:4450 src/main/connections.c:4485
+#: src/main/connections.c:4500 src/main/connections.c:4508
+#: src/main/connections.c:4534 src/main/connections.c:4680
+#: src/main/connections.c:4684 src/main/connections.c:4814
+#: src/main/connections.c:4816 src/main/connections.c:4818
+#: src/main/connections.c:4846 src/main/connections.c:4980
+#: src/main/connections.c:5019 src/main/connections.c:5024
+#: src/main/connections.c:5029 src/main/connections.c:5050
+#: src/main/context.c:607 src/main/context.c:616 src/main/context.c:620
+#: src/main/datetime.c:781 src/main/datetime.c:869 src/main/datetime.c:872
+#: src/main/datetime.c:876 src/main/datetime.c:1043 src/main/datetime.c:1045
+#: src/main/datetime.c:1250 src/main/debug.c:245 src/main/deparse.c:408
+#: src/main/dotcode.c:496 src/main/dotcode.c:500 src/main/dotcode.c:505
+#: src/main/dounzip.c:323 src/main/dounzip.c:330 src/main/dounzip.c:340
+#: src/main/dounzip.c:345 src/main/dounzip.c:349 src/main/dounzip.c:353
+#: src/main/envir.c:1752 src/main/envir.c:1755 src/main/envir.c:1876
+#: src/main/envir.c:1881 src/main/envir.c:1945 src/main/envir.c:1961
+#: src/main/envir.c:1967 src/main/envir.c:2079 src/main/envir.c:2087
+#: src/main/envir.c:2094 src/main/envir.c:2105 src/main/envir.c:2337
+#: src/main/envir.c:2458 src/main/envir.c:2755 src/main/envir.c:3022
+#: src/main/envir.c:3036 src/main/envir.c:3043 src/main/envir.c:3059
+#: src/main/envir.c:3642 src/main/errors.c:1011 src/main/eval.c:454
+#: src/main/eval.c:463 src/main/eval.c:466 src/main/grep.c:780
+#: src/main/grep.c:785 src/main/grep.c:1079 src/main/grep.c:1081
+#: src/main/grep.c:1083 src/main/grep.c:1528 src/main/grep.c:1532
+#: src/main/grep.c:1537 src/main/grep.c:2345 src/main/grep.c:2350
+#: src/main/grep.c:2652 src/main/grep.c:2657 src/main/memory.c:3823
+#: src/main/paste.c:96 src/main/paste.c:392 src/main/paste.c:399
+#: src/main/paste.c:406 src/main/paste.c:411 src/main/paste.c:416
+#: src/main/paste.c:421 src/main/paste.c:424 src/main/paste.c:432
+#: src/main/paste.c:437 src/main/paste.c:619 src/main/paste.c:624
 #: src/main/platform.c:306 src/main/platform.c:308 src/main/platform.c:310
 #: src/main/platform.c:326 src/main/platform.c:337 src/main/platform.c:390
-#: src/main/platform.c:392 src/main/platform.c:705 src/main/platform.c:707
-#: src/main/platform.c:1064 src/main/platform.c:1070 src/main/platform.c:1073
-#: src/main/platform.c:1076 src/main/platform.c:1079 src/main/platform.c:1082
-#: src/main/platform.c:1085 src/main/platform.c:1088 src/main/platform.c:1185
-#: src/main/platform.c:1188 src/main/platform.c:1191 src/main/platform.c:1229
-#: src/main/platform.c:1286 src/main/platform.c:1289 src/main/platform.c:1498
-#: src/main/platform.c:1501 src/main/platform.c:1504 src/main/platform.c:1540
-#: src/main/platform.c:1543 src/main/platform.c:1546 src/main/platform.c:1629
-#: src/main/platform.c:1645 src/main/platform.c:1684 src/main/platform.c:1686
-#: src/main/platform.c:1757 src/main/platform.c:1841 src/main/platform.c:2116
-#: src/main/platform.c:2176 src/main/platform.c:2353 src/main/platform.c:2356
-#: src/main/platform.c:2359 src/main/platform.c:2362 src/main/platform.c:2365
-#: src/main/platform.c:2368 src/main/platform.c:2568 src/main/platform.c:2571
-#: src/main/platform.c:2574 src/main/platform.c:2577 src/main/platform.c:2580
-#: src/main/platform.c:2583 src/main/platform.c:2657 src/main/platform.c:2665
-#: src/main/platform.c:2701 src/main/platform.c:2751 src/main/print.c:242
-#: src/main/print.c:248 src/main/print.c:270 src/main/print.c:276
-#: src/main/print.c:283 src/main/random.c:478 src/main/random.c:482
-#: src/main/random.c:489 src/main/random.c:517 src/main/saveload.c:1950
-#: src/main/saveload.c:1953 src/main/saveload.c:1956 src/main/saveload.c:2072
-#: src/main/saveload.c:2252 src/main/saveload.c:2257 src/main/saveload.c:2260
+#: src/main/platform.c:392 src/main/platform.c:708 src/main/platform.c:710
+#: src/main/platform.c:800 src/main/platform.c:1138 src/main/platform.c:1144
+#: src/main/platform.c:1147 src/main/platform.c:1150 src/main/platform.c:1153
+#: src/main/platform.c:1156 src/main/platform.c:1159 src/main/platform.c:1162
+#: src/main/platform.c:1259 src/main/platform.c:1262 src/main/platform.c:1265
+#: src/main/platform.c:1303 src/main/platform.c:1361 src/main/platform.c:1364
+#: src/main/platform.c:1573 src/main/platform.c:1576 src/main/platform.c:1579
+#: src/main/platform.c:1615 src/main/platform.c:1618 src/main/platform.c:1621
+#: src/main/platform.c:1657 src/main/platform.c:1690 src/main/platform.c:1692
+#: src/main/platform.c:1763 src/main/platform.c:1848 src/main/platform.c:2089
+#: src/main/platform.c:2149 src/main/platform.c:2334 src/main/platform.c:2337
+#: src/main/platform.c:2340 src/main/platform.c:2343 src/main/platform.c:2346
+#: src/main/platform.c:2349 src/main/platform.c:2555 src/main/platform.c:2558
+#: src/main/platform.c:2561 src/main/platform.c:2564 src/main/platform.c:2567
+#: src/main/platform.c:2570 src/main/platform.c:2648 src/main/platform.c:2656
+#: src/main/platform.c:2692 src/main/platform.c:2742 src/main/print.c:235
+#: src/main/print.c:241 src/main/print.c:263 src/main/print.c:269
+#: src/main/print.c:276 src/main/random.c:470 src/main/random.c:474
+#: src/main/random.c:481 src/main/random.c:509 src/main/saveload.c:1952
+#: src/main/saveload.c:1955 src/main/saveload.c:1958 src/main/saveload.c:2074
+#: src/main/saveload.c:2254 src/main/saveload.c:2259 src/main/saveload.c:2262
 #: src/main/saveload.c:2366 src/main/scan.c:684 src/main/scan.c:853
 #: src/main/scan.c:867 src/main/scan.c:871 src/main/scan.c:873
 #: src/main/scan.c:884 src/main/scan.c:911 src/main/scan.c:914
-#: src/main/scan.c:917 src/main/scan.c:972 src/main/seq.c:618
-#: src/main/seq.c:623 src/main/seq.c:631 src/main/seq.c:662 src/main/seq.c:666
-#: src/main/seq.c:672 src/main/seq.c:680 src/main/sort.c:175
-#: src/main/sysutils.c:585 src/main/sysutils.c:589 src/main/sysutils.c:593
-#: src/main/sysutils.c:599 src/main/sysutils.c:603 src/main/sysutils.c:1831
-#: src/main/sysutils.c:1835 src/main/unique.c:966 src/main/unique.c:1289
-#: src/main/unique.c:1349 src/main/unique.c:1356 src/main/unique.c:1750
-#: src/main/util.c:581 src/main/util.c:584 src/main/util.c:1825
-#: src/main/util.c:1994 src/main/util.c:1995 src/main/util.c:1996
-#: src/main/util.c:2013 src/main/util.c:2037 src/main/util.c:2041
-#: src/main/util.c:2043 src/main/util.c:2068 src/main/util.c:2070
-#: src/main/util.c:2072 src/main/util.c:2075 src/main/util.c:2078
-#: src/main/util.c:2082 src/main/util.c:2084 src/modules/X11/devX11.c:3241
-#: src/modules/X11/devX11.c:3244 src/modules/X11/devX11.c:3247
-#: src/modules/X11/devX11.c:3271 src/modules/internet/internet.c:284
-#: src/modules/internet/internet.c:290 src/modules/internet/internet.c:296
-#: src/modules/internet/internet.c:299 src/modules/internet/internet.c:303
+#: src/main/scan.c:917 src/main/scan.c:972 src/main/seq.c:622
+#: src/main/seq.c:627 src/main/seq.c:635 src/main/seq.c:666 src/main/seq.c:670
+#: src/main/seq.c:676 src/main/seq.c:684 src/main/sort.c:175
+#: src/main/sysutils.c:597 src/main/sysutils.c:601 src/main/sysutils.c:605
+#: src/main/sysutils.c:611 src/main/sysutils.c:615 src/main/sysutils.c:1787
+#: src/main/sysutils.c:1791 src/main/unique.c:1029 src/main/unique.c:1337
+#: src/main/unique.c:1341 src/main/unique.c:1351 src/main/unique.c:1747
+#: src/main/util.c:636 src/main/util.c:639 src/main/util.c:1379
+#: src/main/util.c:1393 src/main/util.c:1975 src/main/util.c:2198
+#: src/main/util.c:2199 src/main/util.c:2200 src/main/util.c:2217
+#: src/main/util.c:2245 src/main/util.c:2249 src/main/util.c:2251
+#: src/main/util.c:2277 src/main/util.c:2279 src/main/util.c:2281
+#: src/main/util.c:2284 src/main/util.c:2287 src/main/util.c:2291
+#: src/main/util.c:2293 src/modules/X11/devX11.c:3247
+#: src/modules/X11/devX11.c:3250 src/modules/X11/devX11.c:3253
+#: src/modules/X11/devX11.c:3277 src/modules/internet/internet.c:453
+#: src/modules/internet/internet.c:459 src/modules/internet/internet.c:465
+#: src/modules/internet/internet.c:468 src/modules/internet/internet.c:472
+#: src/modules/internet/internet.c:477 src/modules/internet/libcurl.c:414
+#: src/modules/internet/libcurl.c:418 src/modules/internet/libcurl.c:423
+#: src/modules/internet/libcurl.c:426 src/modules/internet/libcurl.c:430
 #: src/modules/lapack/Lapack.c:155 src/modules/lapack/Lapack.c:261
 #: src/modules/lapack/Lapack.c:709 src/modules/lapack/Lapack.c:818
-#: src/modules/lapack/Lapack.c:880 src/modules/lapack/Lapack.c:1214
-#: src/unix/sys-std.c:1217 src/unix/sys-std.c:1240
+#: src/modules/lapack/Lapack.c:880 src/modules/lapack/Lapack.c:1215
+#: src/unix/sys-std.c:1223 src/unix/sys-std.c:1246
 #, c-format
 msgid "invalid '%s' argument"
 msgstr ""
@@ -247,358 +252,335 @@ msgstr ""
 msgid "unsupported version of Windows"
 msgstr ""
 
-#: src/gnuwin32/extra.c:267 src/main/apply.c:105 src/main/character.c:595
-#: src/main/connections.c:3555 src/main/context.c:642 src/main/context.c:661
-#: src/main/datetime.c:675 src/main/datetime.c:777 src/main/datetime.c:1030
-#: src/main/dotcode.c:199 src/main/errors.c:929 src/main/errors.c:962
-#: src/main/errors.c:1065 src/main/errors.c:1090 src/main/errors.c:1095
-#: src/main/errors.c:1368 src/main/identical.c:66 src/main/identical.c:67
-#: src/main/identical.c:68 src/main/identical.c:69 src/main/identical.c:70
-#: src/main/seq.c:185 src/main/seq.c:341 src/main/seq.c:346 src/main/seq.c:350
-#: src/main/seq.c:391 src/main/seq.c:395 src/main/seq.c:399
-#: src/main/sort.c:1224 src/main/sort.c:1307 src/main/sort.c:1311
-#: src/main/sort.c:1318 src/main/sort.c:1393 src/main/source.c:220
-#: src/main/summary.c:886 src/main/sysutils.c:251 src/main/util.c:986
-#: src/main/util.c:991 src/main/util.c:998 src/main/util.c:1001
-#: src/modules/X11/devX11.c:3142 src/modules/X11/devX11.c:3169
-#: src/modules/X11/devX11.c:3174 src/modules/X11/devX11.c:3179
-#: src/modules/X11/devX11.c:3189 src/modules/X11/devX11.c:3194
-#: src/modules/X11/devX11.c:3198 src/modules/X11/devX11.c:3202
-#: src/unix/sys-std.c:1291
-#, c-format
-msgid "invalid '%s' value"
-msgstr ""
-
-#: src/gnuwin32/extra.c:308 src/gnuwin32/extra.c:321
+#: src/gnuwin32/extra.c:313 src/gnuwin32/extra.c:324
 msgid "incorrect argument"
 msgstr ""
 
-#: src/gnuwin32/extra.c:312
+#: src/gnuwin32/extra.c:316
 msgid "don't be silly!: your machine has a 4Gb address limit"
 msgstr ""
 
-#: src/gnuwin32/extra.c:316
+#: src/gnuwin32/extra.c:320
 msgid "cannot decrease memory limit: ignored"
 msgstr ""
 
-#: src/gnuwin32/extra.c:428 src/gnuwin32/extra.c:529 src/main/util.c:897
+#: src/gnuwin32/extra.c:427 src/gnuwin32/extra.c:528 src/main/util.c:962
 msgid "'path' must be a character vector"
 msgstr ""
 
-#: src/gnuwin32/extra.c:579 src/gnuwin32/extra.c:581 src/gnuwin32/extra.c:604
-#: src/gnuwin32/extra.c:606 src/gnuwin32/extra.c:641 src/main/gevents.c:61
+#: src/gnuwin32/extra.c:576 src/gnuwin32/extra.c:578 src/gnuwin32/extra.c:601
+#: src/gnuwin32/extra.c:603 src/gnuwin32/extra.c:638 src/main/gevents.c:61
 #: src/main/gevents.c:98
 msgid "invalid device"
 msgstr ""
 
-#: src/gnuwin32/extra.c:582
+#: src/gnuwin32/extra.c:579
 msgid "requires SDI mode"
 msgstr ""
 
-#: src/gnuwin32/extra.c:635 src/main/gevents.c:58 src/main/gevents.c:95
+#: src/gnuwin32/extra.c:632 src/main/gevents.c:58 src/main/gevents.c:95
 msgid "invalid graphical device number"
 msgstr ""
 
-#: src/gnuwin32/extra.c:645
+#: src/gnuwin32/extra.c:642
 msgid "bad device"
 msgstr ""
 
-#: src/gnuwin32/extra.c:799 src/gnuwin32/extra.c:807
+#: src/gnuwin32/extra.c:796 src/gnuwin32/extra.c:804
 msgid "invalid input in 'Rmbstowcs'"
 msgstr ""
 
-#: src/gnuwin32/extra.c:830 src/main/platform.c:1261
+#: src/gnuwin32/extra.c:827 src/main/platform.c:1336
 msgid "file choice cancelled"
 msgstr ""
 
-#: src/gnuwin32/run.c:242
+#: src/gnuwin32/run.c:244
 #, c-format
 msgid "'CreateProcess' failed to run '%s'"
 msgstr ""
 
-#: src/gnuwin32/run.c:344
+#: src/gnuwin32/run.c:346
 msgid "Child process not responding.  R will terminate it."
 msgstr ""
 
-#: src/gnuwin32/run.c:402
+#: src/gnuwin32/run.c:404
 #, c-format
 msgid "Exit code was %d"
 msgstr ""
 
-#: src/gnuwin32/run.c:434
+#: src/gnuwin32/run.c:436
 msgid "Insufficient memory (rpipeOpen)"
 msgstr ""
 
-#: src/gnuwin32/run.c:648 src/main/dounzip.c:482
+#: src/gnuwin32/run.c:650 src/main/dounzip.c:481
 msgid "seek not enabled for this connection"
 msgstr ""
 
-#: src/gnuwin32/run.c:654
+#: src/gnuwin32/run.c:656
 msgid "truncate not enabled for this connection"
 msgstr ""
 
-#: src/gnuwin32/run.c:729 src/gnuwin32/run.c:733 src/gnuwin32/run.c:746
-#: src/gnuwin32/run.c:774 src/main/connections.c:1330
-#: src/main/connections.c:1334 src/main/connections.c:1340
-#: src/main/connections.c:1354
+#: src/gnuwin32/run.c:731 src/gnuwin32/run.c:735 src/gnuwin32/run.c:748
+#: src/gnuwin32/run.c:776 src/main/connections.c:1322
+#: src/main/connections.c:1326 src/main/connections.c:1332
+#: src/main/connections.c:1346
 msgid "allocation of pipe connection failed"
 msgstr ""
 
-#: src/gnuwin32/run.c:788
+#: src/gnuwin32/run.c:790
 msgid "'names' is not a character vector"
 msgstr ""
 
-#: src/gnuwin32/sys-win32.c:182
+#: src/gnuwin32/sys-win32.c:180
 msgid "character string expected as first argument"
 msgstr ""
 
-#: src/gnuwin32/sys-win32.c:191
+#: src/gnuwin32/sys-win32.c:189
 msgid "character string expected as third argument"
 msgstr ""
 
-#: src/gnuwin32/sys-win32.c:257 src/unix/sys-unix.c:299
+#: src/gnuwin32/sys-win32.c:255 src/unix/sys-unix.c:312
 #, c-format
 msgid "running command '%s' had status %d"
 msgstr ""
 
-#: src/gnuwin32/system.c:122 src/unix/sys-unix.c:427
+#: src/gnuwin32/system.c:121 src/unix/sys-unix.c:440
 msgid "reached session elapsed time limit"
 msgstr ""
 
-#: src/gnuwin32/system.c:124 src/unix/sys-unix.c:429
+#: src/gnuwin32/system.c:123 src/unix/sys-unix.c:442
 msgid "reached elapsed time limit"
 msgstr ""
 
-#: src/gnuwin32/system.c:130 src/unix/sys-unix.c:435
+#: src/gnuwin32/system.c:129 src/unix/sys-unix.c:448
 msgid "reached session CPU time limit"
 msgstr ""
 
-#: src/gnuwin32/system.c:132 src/unix/sys-unix.c:437
+#: src/gnuwin32/system.c:131 src/unix/sys-unix.c:450
 msgid "reached CPU time limit"
 msgstr ""
 
-#: src/gnuwin32/system.c:157
+#: src/gnuwin32/system.c:156
 #, c-format
 msgid "Fatal error: %s\n"
 msgstr ""
 
-#: src/gnuwin32/system.c:335 src/unix/sys-std.c:863
+#: src/gnuwin32/system.c:334 src/unix/sys-std.c:866
 #, c-format
 msgid "encoding '%s' is not recognised"
 msgstr ""
 
-#: src/gnuwin32/system.c:341 src/unix/sys-std.c:869
+#: src/gnuwin32/system.c:340 src/unix/sys-std.c:872
 #, c-format
 msgid "<ERROR: re-encoding failure from encoding '%s'>\n"
 msgstr ""
 
-#: src/gnuwin32/system.c:555 src/gnuwin32/system.c:1049
-#: src/gnuwin32/system.c:1061 src/main/connections.c:590
-#: src/main/connections.c:595 src/main/dounzip.c:177 src/main/saveload.c:1961
-#: src/main/serialize.c:2552 src/main/serialize.c:2557
-#: src/main/serialize.c:2642 src/main/serialize.c:2687 src/unix/system.c:323
-#: src/unix/system.c:343
+#: src/gnuwin32/system.c:562 src/gnuwin32/system.c:1058
+#: src/gnuwin32/system.c:1070 src/main/connections.c:581
+#: src/main/connections.c:586 src/main/dounzip.c:178 src/main/saveload.c:1963
+#: src/main/serialize.c:2598 src/main/serialize.c:2603
+#: src/main/serialize.c:2688 src/main/serialize.c:2733 src/unix/system.c:328
 #, c-format
 msgid "cannot open file '%s': %s"
 msgstr ""
 
-#: src/gnuwin32/system.c:569
+#: src/gnuwin32/system.c:576
 #, c-format
 msgid "file.show(): file '%s' does not exist\n"
 msgstr ""
 
-#: src/gnuwin32/system.c:970
+#: src/gnuwin32/system.c:979
 #, c-format
 msgid "WARNING: R_MAX_MEM_SIZE value is invalid: ignored\n"
 msgstr ""
 
-#: src/gnuwin32/system.c:1002
+#: src/gnuwin32/system.c:1011
 msgid "WARNING: no max-mem-size given\n"
 msgstr ""
 
-#: src/gnuwin32/system.c:1009
+#: src/gnuwin32/system.c:1018
 #, c-format
 msgid "WARNING: --max-mem-size value is invalid: ignored\n"
 msgstr ""
 
-#: src/gnuwin32/system.c:1012
+#: src/gnuwin32/system.c:1021
 #, c-format
 msgid "WARNING: --max-mem-size=%lu%c: too large and ignored\n"
 msgstr ""
 
-#: src/gnuwin32/system.c:1018
+#: src/gnuwin32/system.c:1027
 #, c-format
 msgid "WARNING: --max-mem-size=%4.1fM: too small and ignored\n"
 msgstr ""
 
-#: src/gnuwin32/system.c:1023
+#: src/gnuwin32/system.c:1032
 #, c-format
 msgid "WARNING: --max-mem-size=%4.0fM: too large and taken as %uM\n"
 msgstr ""
 
-#: src/gnuwin32/system.c:1039
+#: src/gnuwin32/system.c:1048
 #, c-format
 msgid "option '%s' requires an argument"
 msgstr ""
 
-#: src/gnuwin32/system.c:1070
+#: src/gnuwin32/system.c:1079
 #, c-format
 msgid "option '%s' requires a non-empty argument"
 msgstr ""
 
-#: src/gnuwin32/system.c:1078 src/unix/system.c:362
+#: src/gnuwin32/system.c:1087 src/unix/system.c:347
 #, c-format
 msgid "WARNING: '-e %s' omitted as input is too long\n"
 msgstr ""
 
-#: src/gnuwin32/system.c:1082 src/unix/system.c:375
+#: src/gnuwin32/system.c:1091 src/unix/system.c:360
 #, c-format
 msgid "WARNING: unknown option '%s'\n"
 msgstr ""
 
-#: src/gnuwin32/system.c:1104 src/unix/system.c:379
+#: src/gnuwin32/system.c:1113 src/unix/system.c:364
 #, c-format
 msgid "ARGUMENT '%s' __ignored__\n"
 msgstr ""
 
-#: src/gnuwin32/system.c:1110 src/unix/system.c:386
+#: src/gnuwin32/system.c:1119 src/unix/system.c:371
 msgid "cannot use -e with -f or --file"
 msgstr ""
 
-#: src/gnuwin32/system.c:1128
+#: src/gnuwin32/system.c:1137
 msgid "creation of tmpfile failed -- set TMPDIR suitably?"
 msgstr ""
 
-#: src/gnuwin32/system.c:1147 src/unix/system.c:437
+#: src/gnuwin32/system.c:1156 src/unix/system.c:422
 msgid "you must specify '--save', '--no-save' or '--vanilla'"
 msgstr ""
 
-#: src/gnuwin32/system.c:1152
+#: src/gnuwin32/system.c:1161
 msgid ""
 "impossible to create 'reader thread'; you must free some system resources"
 msgstr ""
 
-#: src/include/Errormsg.h:25 src/main/subscript.c:375 src/main/subscript.c:393
-#: src/main/subscript.c:417 src/main/subscript.c:456 src/main/subscript.c:584
-#: src/main/subscript.c:623 src/main/subscript.c:766
+#: src/include/Errormsg.h:27 src/main/subscript.c:383 src/main/subscript.c:401
+#: src/main/subscript.c:425 src/main/subscript.c:464 src/main/subscript.c:662
+#: src/main/subscript.c:701 src/main/subscript.c:844
 msgid "subscript out of bounds"
 msgstr ""
 
-#: src/include/Errormsg.h:26
+#: src/include/Errormsg.h:28
 #, c-format
 msgid "object of type '%s' is not subsettable"
 msgstr ""
 
-#: src/main/CommandLineArgs.c:170
+#: src/main/CommandLineArgs.c:171
 msgid "WARNING: no value given for --encoding"
 msgstr ""
 
-#: src/main/CommandLineArgs.c:195
+#: src/main/CommandLineArgs.c:196
 #, c-format
 msgid "WARNING: option '%s' no longer supported"
 msgstr ""
 
-#: src/main/CommandLineArgs.c:206
+#: src/main/CommandLineArgs.c:207
 #, c-format
 msgid "WARNING: no value given for '%s'"
 msgstr ""
 
-#: src/main/CommandLineArgs.c:216
+#: src/main/CommandLineArgs.c:217
 #, c-format
 msgid "WARNING: '%s' value is invalid: ignored"
 msgstr ""
 
-#: src/main/CommandLineArgs.c:220
+#: src/main/CommandLineArgs.c:221
 #, c-format
 msgid "WARNING: %s: too large and ignored"
 msgstr ""
 
-#: src/main/CommandLineArgs.c:234
+#: src/main/CommandLineArgs.c:235
 msgid "WARNING: no value given for '--max-ppsize'"
 msgstr ""
 
-#: src/main/CommandLineArgs.c:239
+#: src/main/CommandLineArgs.c:240
 msgid "WARNING: '--max-ppsize' value is negative: ignored"
 msgstr ""
 
-#: src/main/CommandLineArgs.c:241
+#: src/main/CommandLineArgs.c:242
 msgid "WARNING: '--max-ppsize' value is too small: ignored"
 msgstr ""
 
-#: src/main/CommandLineArgs.c:244
+#: src/main/CommandLineArgs.c:245
 msgid "WARNING: '--max-ppsize' value is too large: ignored"
 msgstr ""
 
-#: src/main/RNG.c:175
+#: src/main/RNG.c:176
 #, c-format
 msgid "unif_rand: unimplemented RNG kind %d"
 msgstr ""
 
-#: src/main/RNG.c:260
+#: src/main/RNG.c:261
 #, c-format
 msgid "FixupSeeds: unimplemented RNG kind %d"
 msgstr ""
 
-#: src/main/RNG.c:302
+#: src/main/RNG.c:301
 msgid "'user_unif_rand' not in load table"
 msgstr ""
 
-#: src/main/RNG.c:310
+#: src/main/RNG.c:309
 msgid "cannot read seeds unless 'user_unif_nseed' is supplied"
 msgstr ""
 
-#: src/main/RNG.c:315
+#: src/main/RNG.c:314
 msgid "seed length must be in 0...625; ignored"
 msgstr ""
 
-#: src/main/RNG.c:323
+#: src/main/RNG.c:322
 #, c-format
 msgid "RNG_Init: unimplemented RNG kind %d"
 msgstr ""
 
-#: src/main/RNG.c:354
+#: src/main/RNG.c:351
 msgid "'.Random.seed' is a missing argument with no default"
 msgstr ""
 
-#: src/main/RNG.c:355
+#: src/main/RNG.c:352
 #, c-format
 msgid "'.Random.seed' is not an integer vector but of type '%s', so ignored"
 msgstr ""
 
-#: src/main/RNG.c:363
+#: src/main/RNG.c:360
 msgid "'.Random.seed[1]' is not a valid integer, so ignored"
 msgstr ""
 
-#: src/main/RNG.c:369
+#: src/main/RNG.c:366
 msgid "'.Random.seed[1]' is not a valid Normal type, so ignored"
 msgstr ""
 
-#: src/main/RNG.c:383
+#: src/main/RNG.c:380
 msgid "'.Random.seed[1] = 5' but no user-supplied generator, so ignored"
 msgstr ""
 
-#: src/main/RNG.c:388
+#: src/main/RNG.c:385
 msgid "'.Random.seed[1]' is not a valid RNG kind so ignored"
 msgstr ""
 
-#: src/main/RNG.c:415
+#: src/main/RNG.c:412
 msgid "'.Random.seed' has wrong length"
 msgstr ""
 
-#: src/main/RNG.c:468
+#: src/main/RNG.c:465
 #, c-format
 msgid "RNGkind: unimplemented RNG kind %d"
 msgstr ""
 
-#: src/main/RNG.c:488
+#: src/main/RNG.c:485
 msgid "invalid Normal type in 'RNGkind'"
 msgstr ""
 
-#: src/main/RNG.c:491
+#: src/main/RNG.c:488
 msgid "'user_norm_rand' not in load table"
 msgstr ""
 
-#: src/main/RNG.c:535
+#: src/main/RNG.c:532
 msgid "supplied seed is not a valid integer"
 msgstr ""
 
@@ -623,7 +605,7 @@ msgstr ""
 msgid "could not allocate space for 'name'"
 msgstr ""
 
-#: src/main/Rdynload.c:881 src/main/Rdynload.c:897 src/main/util.c:698
+#: src/main/Rdynload.c:881 src/main/Rdynload.c:897 src/main/util.c:762
 msgid "character argument expected"
 msgstr ""
 
@@ -641,32 +623,34 @@ msgstr ""
 
 #: src/main/Rdynload.c:979
 #, c-format
-msgid "cannot allocate memory for registered native symbol (%d bytes)"
-msgstr ""
+msgid "cannot allocate memory for registered native symbol (%d byte)"
+msgid_plural "cannot allocate memory for registered native symbol (%d bytes)"
+msgstr[0] ""
+msgstr[1] ""
 
-#: src/main/Rdynload.c:1100 src/main/Rdynload.c:1321
+#: src/main/Rdynload.c:1102 src/main/Rdynload.c:1323
 msgid "must pass package name or DllInfo reference"
 msgstr ""
 
-#: src/main/Rdynload.c:1197
+#: src/main/Rdynload.c:1199
 #, c-format
 msgid "unimplemented type %d in 'createRSymbolObject'"
 msgstr ""
 
-#: src/main/Rdynload.c:1279 src/main/Rdynload.c:1373
+#: src/main/Rdynload.c:1281 src/main/Rdynload.c:1375
 msgid "R_getRegisteredRoutines() expects a DllInfo reference"
 msgstr ""
 
-#: src/main/Rdynload.c:1282 src/main/Rdynload.c:1376
+#: src/main/Rdynload.c:1284 src/main/Rdynload.c:1378
 msgid "NULL value passed for DllInfo"
 msgstr ""
 
-#: src/main/Rdynload.c:1436
+#: src/main/Rdynload.c:1441
 #, c-format
 msgid "function '%s' not provided by package '%s'"
 msgstr ""
 
-#: src/main/Rdynload.c:1438
+#: src/main/Rdynload.c:1443
 msgid "table entry must be an external pointer"
 msgstr ""
 
@@ -675,8 +659,9 @@ msgstr ""
 msgid "problem in setting variable '%s' in Renviron"
 msgstr ""
 
-#: src/main/Renviron.c:311
-msgid "argument 'x' must be a character string"
+#: src/main/Renviron.c:311 src/main/objects.c:1174 src/main/raw.c:155
+#, c-format
+msgid "argument '%s' must be a character string"
 msgstr ""
 
 #: src/main/Renviron.c:315
@@ -684,116 +669,138 @@ msgstr ""
 msgid "file '%s' cannot be opened for reading"
 msgstr ""
 
-#: src/main/Rstrptime.h:517 src/main/Rstrptime.h:984
+#: src/main/Rstrptime.h:524 src/main/Rstrptime.h:991
 #, c-format
 msgid "use of %s for input is not supported"
 msgstr ""
 
-#: src/main/Rstrptime.h:1242
+#: src/main/Rstrptime.h:1263
 msgid "input string is too long"
 msgstr ""
 
-#: src/main/Rstrptime.h:1244
+#: src/main/Rstrptime.h:1265
 msgid "invalid multibyte input string"
 msgstr ""
 
-#: src/main/Rstrptime.h:1247
+#: src/main/Rstrptime.h:1268
 msgid "format string is too long"
 msgstr ""
 
-#: src/main/Rstrptime.h:1249
+#: src/main/Rstrptime.h:1270
 msgid "invalid multibyte format string"
 msgstr ""
 
-#: src/main/agrep.c:133 src/main/agrep.c:777 src/main/character.c:1039
-#: src/main/character.c:1043 src/main/grep.c:769 src/main/grep.c:1512
-#: src/main/grep.c:1516 src/main/grep.c:2325 src/main/grep.c:2623
+#: src/main/agrep.c:133 src/main/agrep.c:778 src/main/character.c:1291
+#: src/main/character.c:1295 src/main/grep.c:782 src/main/grep.c:1530
+#: src/main/grep.c:1534 src/main/grep.c:2347 src/main/grep.c:2654
 #, c-format
 msgid "argument '%s' has length > 1 and only the first element will be used"
 msgstr ""
 
-#: src/main/agrep.c:189 src/main/agrep.c:818
+#: src/main/agrep.c:190 src/main/agrep.c:820
 msgid "'pattern' must be a non-empty character string"
 msgstr ""
 
-#: src/main/agrep.c:200 src/main/agrep.c:827 src/main/grep.c:838
-#: src/main/grep.c:2381 src/main/grep.c:2662
+#: src/main/agrep.c:201 src/main/agrep.c:829 src/main/grep.c:853
+#: src/main/grep.c:2405 src/main/grep.c:2707
 msgid "regular expression is invalid in this locale"
 msgstr ""
 
-#: src/main/agrep.c:206 src/main/agrep.c:623
+#: src/main/agrep.c:207 src/main/agrep.c:624
 #, c-format
 msgid "regcomp error:  '%s'"
 msgstr ""
 
-#: src/main/agrep.c:238 src/main/agrep.c:871 src/main/grep.c:227
-#: src/main/grep.c:315 src/main/grep.c:423 src/main/grep.c:578
-#: src/main/grep.c:889 src/main/grep.c:2480 src/main/grep.c:2548
-#: src/main/grep.c:2698
+#: src/main/agrep.c:239 src/main/agrep.c:874 src/main/grep.c:233
+#: src/main/grep.c:323 src/main/grep.c:434 src/main/grep.c:590
+#: src/main/grep.c:907 src/main/grep.c:2510 src/main/grep.c:2579
+#: src/main/grep.c:2744
 #, c-format
 msgid "input string %d is invalid in this locale"
 msgstr ""
 
-#: src/main/agrep.c:525 src/main/agrep.c:765 src/main/grep.c:155
-#: src/main/grep.c:760 src/main/grep.c:762 src/main/grep.c:1047
-#: src/main/grep.c:1055 src/main/grep.c:1503 src/main/grep.c:1505
-#: src/main/grep.c:2315 src/main/grep.c:2317 src/main/grep.c:2611
+#: src/main/agrep.c:526 src/main/agrep.c:766 src/main/grep.c:159
+#: src/main/grep.c:773 src/main/grep.c:775 src/main/grep.c:1065
+#: src/main/grep.c:1073 src/main/grep.c:1521 src/main/grep.c:1523
+#: src/main/grep.c:2337 src/main/grep.c:2339 src/main/grep.c:2642
 #, c-format
 msgid "argument '%s' will be ignored"
 msgstr ""
 
-#: src/main/agrep.c:614
+#: src/main/agrep.c:615
 #, c-format
 msgid "input string x[%d] is invalid in this locale"
 msgstr ""
 
-#: src/main/agrep.c:660
+#: src/main/agrep.c:661
 #, c-format
 msgid "input string y[%d] is invalid in this locale"
 msgstr ""
 
-#: src/main/agrep.c:833 src/main/grep.c:2668
+#: src/main/agrep.c:835 src/main/grep.c:2713
 #, c-format
 msgid "regcomp error: '%s'"
 msgstr ""
 
-#: src/main/apply.c:103
+#: src/main/apply.c:98
 msgid "'FUN.VALUE' must be a vector"
 msgstr ""
 
-#: src/main/apply.c:108 src/main/complex.c:758
+#: src/main/apply.c:100 src/main/array.c:506 src/main/character.c:847
+#: src/main/character.c:1655 src/main/connections.c:3551
+#: src/main/context.c:653 src/main/context.c:672 src/main/datetime.c:681
+#: src/main/datetime.c:783 src/main/datetime.c:1047 src/main/dotcode.c:222
+#: src/main/errors.c:910 src/main/errors.c:943 src/main/errors.c:1049
+#: src/main/errors.c:1074 src/main/errors.c:1079 src/main/errors.c:1349
+#: src/main/identical.c:66 src/main/identical.c:67 src/main/identical.c:68
+#: src/main/identical.c:69 src/main/identical.c:70 src/main/platform.c:2982
+#: src/main/seq.c:192 src/main/seq.c:343 src/main/seq.c:348 src/main/seq.c:352
+#: src/main/seq.c:397 src/main/seq.c:401 src/main/seq.c:405
+#: src/main/sort.c:1244 src/main/sort.c:1327 src/main/sort.c:1331
+#: src/main/sort.c:1338 src/main/source.c:225 src/main/summary.c:954
+#: src/main/sysutils.c:250 src/main/util.c:1051 src/main/util.c:1056
+#: src/main/util.c:1063 src/main/util.c:1066 src/main/util.c:2035
+#: src/modules/X11/devX11.c:3148 src/modules/X11/devX11.c:3175
+#: src/modules/X11/devX11.c:3180 src/modules/X11/devX11.c:3185
+#: src/modules/X11/devX11.c:3195 src/modules/X11/devX11.c:3200
+#: src/modules/X11/devX11.c:3204 src/modules/X11/devX11.c:3208
+#, c-format
+msgid "invalid '%s' value"
+msgstr ""
+
+#: src/main/apply.c:103 src/main/complex.c:753
 msgid "invalid length"
 msgstr ""
 
-#: src/main/apply.c:113
+#: src/main/apply.c:108
 msgid "long vectors are not supported for matrix/array results"
 msgstr ""
 
-#: src/main/apply.c:162
+#: src/main/apply.c:115
+#, c-format
+msgid "type '%s' is not supported"
+msgstr ""
+
+#: src/main/apply.c:163
 #, c-format
 msgid ""
 "values must be length %d,\n"
 " but FUN(X[[%d]]) result is length %d"
 msgstr ""
 
-#: src/main/apply.c:174
+#: src/main/apply.c:175
 #, c-format
 msgid ""
 "values must be type '%s',\n"
 " but FUN(X[[%d]]) result is type '%s'"
 msgstr ""
 
-#: src/main/apply.c:193
-#, c-format
-msgid "type '%s' is not supported"
-msgstr ""
-
-#: src/main/apply.c:225
+#: src/main/apply.c:252
 #, c-format
 msgid "dimnames(<value>) is neither NULL nor list of length %d"
 msgstr ""
 
-#: src/main/arithmetic.c:42
+#: src/main/arithmetic.c:42 src/main/eval.c:3633
 msgid "NaNs produced"
 msgstr ""
 
@@ -801,463 +808,475 @@ msgstr ""
 msgid "non-numeric argument to mathematical function"
 msgstr ""
 
-#: src/main/arithmetic.c:187
+#: src/main/arithmetic.c:186
 msgid "probable complete loss of accuracy in modulus"
 msgstr ""
 
-#: src/main/arithmetic.c:337
+#: src/main/arithmetic.c:298
 msgid "NAs produced by integer overflow"
 msgstr ""
 
-#: src/main/arithmetic.c:538
+#: src/main/arithmetic.c:499
 msgid "operator needs one or two arguments"
 msgstr ""
 
-#: src/main/arithmetic.c:554
+#: src/main/arithmetic.c:515
 msgid "non-numeric argument to binary operator"
 msgstr ""
 
-#: src/main/arithmetic.c:615 src/main/relop.c:227
+#: src/main/arithmetic.c:576 src/main/relop.c:221
 msgid "non-conformable arrays"
 msgstr ""
 
-#: src/main/arithmetic.c:658
+#: src/main/arithmetic.c:619
 msgid "non-conformable time-series"
 msgstr ""
 
-#: src/main/arithmetic.c:680 src/main/logic.c:143 src/main/relop.c:166
-#: src/main/relop.c:265
+#: src/main/arithmetic.c:641 src/main/logic.c:135 src/main/relop.c:160
+#: src/main/relop.c:259
 msgid "longer object length is not a multiple of shorter object length"
 msgstr ""
 
-#: src/main/arithmetic.c:751
+#: src/main/arithmetic.c:712
 msgid "invalid argument to unary operator"
 msgstr ""
 
-#: src/main/arithmetic.c:780 src/main/arithmetic.c:805
-#: src/main/arithmetic.c:824
+#: src/main/arithmetic.c:741 src/main/arithmetic.c:766
+#: src/main/arithmetic.c:785
 msgid "invalid unary operator"
 msgstr ""
 
-#: src/main/arithmetic.c:1241
+#: src/main/arithmetic.c:1191
 msgid "unimplemented real function of 1 argument"
 msgstr ""
 
-#: src/main/arithmetic.c:1255 src/main/complex.c:648 src/main/complex.c:718
+#: src/main/arithmetic.c:1205 src/main/complex.c:638 src/main/complex.c:708
 msgid "unimplemented complex function"
 msgstr ""
 
-#: src/main/arithmetic.c:1526 src/main/arithmetic.c:1877
-#: src/main/arithmetic.c:2056 src/main/arithmetic.c:2168
+#: src/main/arithmetic.c:1484 src/main/arithmetic.c:1877
+#: src/main/arithmetic.c:2049 src/main/arithmetic.c:2152
 #, c-format
 msgid "unimplemented real function of %d numeric arguments"
 msgstr ""
 
-#: src/main/arithmetic.c:1552
+#: src/main/arithmetic.c:1511
 #, c-format
-msgid "%d arguments passed to '%s' which requires 1 or 2"
-msgstr ""
+msgid "%d argument passed to '%s' which requires 1 or 2 arguments"
+msgid_plural "%d arguments passed to '%s'which requires 1 or 2 arguments"
+msgstr[0] ""
+msgstr[1] ""
 
-#: src/main/arithmetic.c:1570
+#: src/main/arithmetic.c:1530
 msgid "invalid second argument of length 0"
 msgstr ""
 
-#: src/main/arithmetic.c:1639
-msgid "invalid argument 'base' of length 0"
+#: src/main/arithmetic.c:1625 src/main/arithmetic.c:1643 src/main/envir.c:1464
+#: src/main/envir.c:1972 src/main/eval.c:630 src/main/eval.c:4237
+#, c-format
+msgid "argument \"%s\" is missing, with no default"
 msgstr ""
 
-#: src/main/arithmetic.c:1647
-#, c-format
-msgid "%d arguments passed to 'log' which requires 1 or 2"
+#: src/main/arithmetic.c:1649
+msgid "invalid argument 'base' of length 0"
 msgstr ""
 
-#: src/main/array.c:79 src/main/array.c:1441
+#: src/main/array.c:82 src/main/array.c:1591
 #, c-format
 msgid "'data' must be of a vector type, was '%s'"
 msgstr ""
 
-#: src/main/array.c:94 src/main/array.c:102
+#: src/main/array.c:97 src/main/array.c:105
 msgid "non-numeric matrix extent"
 msgstr ""
 
-#: src/main/array.c:97 src/main/array.c:1535
+#: src/main/array.c:100 src/main/array.c:1695
 msgid "invalid 'nrow' value (too large or NA)"
 msgstr ""
 
-#: src/main/array.c:99 src/main/array.c:1537
+#: src/main/array.c:102 src/main/array.c:1697
 msgid "invalid 'nrow' value (< 0)"
 msgstr ""
 
-#: src/main/array.c:105 src/main/array.c:1540
+#: src/main/array.c:108 src/main/array.c:1700
 msgid "invalid 'ncol' value (too large or NA)"
 msgstr ""
 
-#: src/main/array.c:107 src/main/array.c:1542
+#: src/main/array.c:110 src/main/array.c:1702
 msgid "invalid 'ncol' value (< 0)"
 msgstr ""
 
-#: src/main/array.c:116
+#: src/main/array.c:119
 msgid "nc = 0 for non-null data"
 msgstr ""
 
-#: src/main/array.c:124
+#: src/main/array.c:127
 msgid "nr = 0 for non-null data"
 msgstr ""
 
-#: src/main/array.c:135
+#: src/main/array.c:138
 #, c-format
 msgid ""
 "data length [%d] is not a sub-multiple or multiple of the number of rows [%d]"
 msgstr ""
 
-#: src/main/array.c:138
+#: src/main/array.c:141
 #, c-format
 msgid ""
 "data length [%d] is not a sub-multiple or multiple of the number of columns "
 "[%d]"
 msgstr ""
 
-#: src/main/array.c:141
+#: src/main/array.c:144
 msgid "data length exceeds size of matrix"
 msgstr ""
 
-#: src/main/array.c:147 src/main/array.c:1453 src/main/array.c:1549
+#: src/main/array.c:150 src/main/array.c:1603 src/main/array.c:1709
 msgid "too many elements specified"
 msgstr ""
 
-#: src/main/array.c:205
+#: src/main/array.c:208
 msgid "negative extents to matrix"
 msgstr ""
 
-#: src/main/array.c:208
+#: src/main/array.c:211
 msgid "allocMatrix: too many elements specified"
 msgstr ""
 
-#: src/main/array.c:236
+#: src/main/array.c:239
 msgid "negative extents to 3D array"
 msgstr ""
 
-#: src/main/array.c:239
+#: src/main/array.c:242
 msgid "'alloc3Darray': too many elements specified"
 msgstr ""
 
-#: src/main/array.c:264
+#: src/main/array.c:267
 msgid "'allocArray': too many elements specified by 'dims'"
 msgstr ""
 
-#: src/main/array.c:448
+#: src/main/array.c:523
+#, c-format
+msgid "'%s' must be a list or atomic vector"
+msgstr ""
+
+#: src/main/array.c:561
 #, c-format
 msgid "a matrix-like object is required as argument to '%s'"
 msgstr ""
 
-#: src/main/array.c:662
+#: src/main/array.c:776
 msgid "requires numeric/complex matrix/vector arguments"
 msgstr ""
 
-#: src/main/array.c:752 src/main/array.c:756 src/main/array.c:760
+#: src/main/array.c:886 src/main/array.c:890 src/main/array.c:894
 msgid "non-conformable arguments"
 msgstr ""
 
-#: src/main/array.c:1058
+#: src/main/array.c:1193
 msgid "argument is not a matrix"
 msgstr ""
 
-#: src/main/array.c:1093
+#: src/main/array.c:1228
 msgid "invalid first argument, must be an array"
 msgstr ""
 
-#: src/main/array.c:1107
+#: src/main/array.c:1242
 #, c-format
 msgid "'perm' is of wrong length %d (!= %d)"
 msgstr ""
 
-#: src/main/array.c:1112 src/main/array.c:1115
+#: src/main/array.c:1247 src/main/array.c:1250
 msgid "'a' does not have named dimnames"
 msgstr ""
 
-#: src/main/array.c:1122
+#: src/main/array.c:1257
 #, c-format
 msgid "'perm[%d]' does not match a dimension name"
 msgstr ""
 
-#: src/main/array.c:1135
+#: src/main/array.c:1270
 msgid "value out of range in 'perm'"
 msgstr ""
 
-#: src/main/array.c:1217
+#: src/main/array.c:1352
 msgid "'resize' must be TRUE or FALSE"
 msgstr ""
 
-#: src/main/array.c:1275
+#: src/main/array.c:1422
 msgid "'x' must be numeric"
 msgstr ""
 
-#: src/main/array.c:1449
+#: src/main/array.c:1425
+msgid "'x' is too short"
+msgstr ""
+
+#: src/main/array.c:1599
 msgid "'dims' cannot be of length 0"
 msgstr ""
 
-#: src/main/array.c:1545
+#: src/main/array.c:1705
 msgid "'x' must have positive length"
 msgstr ""
 
-#: src/main/array.c:1605
+#: src/main/array.c:1771
 #, c-format
 msgid "singular matrix in 'backsolve'. First zero in diagonal [%d]"
 msgstr ""
 
-#: src/main/attrib.c:40 src/main/attrib.c:235 src/main/attrib.c:269
-#: src/main/attrib.c:291 src/main/attrib.c:405 src/main/attrib.c:452
-#: src/main/attrib.c:502
+#: src/main/attrib.c:40 src/main/attrib.c:231 src/main/attrib.c:265
+#: src/main/attrib.c:287 src/main/attrib.c:403 src/main/attrib.c:450
+#: src/main/attrib.c:501
 msgid "attempt to set an attribute on NULL"
 msgstr ""
 
-#: src/main/attrib.c:72
+#: src/main/attrib.c:77
 #, c-format
 msgid "row names must be 'character' or 'integer', not '%s'"
 msgstr ""
 
-#: src/main/attrib.c:124
+#: src/main/attrib.c:130
 #, c-format
 msgid "getAttrib: invalid type (%s) for TAG"
 msgstr ""
 
-#: src/main/attrib.c:379
+#: src/main/attrib.c:377
 #, c-format
 msgid "invalid type (%s) for 'names': must be vector"
 msgstr ""
 
-#: src/main/attrib.c:382
+#: src/main/attrib.c:380
 #, c-format
 msgid "'names' attribute [%d] must be the same length as the vector [%d]"
 msgstr ""
 
-#: src/main/attrib.c:387
+#: src/main/attrib.c:385
 msgid "names() applied to a non-vector"
 msgstr ""
 
-#: src/main/attrib.c:395
+#: src/main/attrib.c:393
 msgid "invalid time series parameters specified"
 msgstr ""
 
-#: src/main/attrib.c:409
+#: src/main/attrib.c:407
 msgid "'tsp' attribute must be numeric"
 msgstr ""
 
-#: src/main/attrib.c:415
+#: src/main/attrib.c:413
 msgid "'tsp' attribute must be numeric of length three"
 msgstr ""
 
-#: src/main/attrib.c:432
+#: src/main/attrib.c:430
 msgid "cannot assign 'tsp' to zero-length vector"
 msgstr ""
 
-#: src/main/attrib.c:463
+#: src/main/attrib.c:461
 msgid "attempt to set invalid 'comment' attribute"
 msgstr ""
 
-#: src/main/attrib.c:511
+#: src/main/attrib.c:510
 msgid "adding class \"factor\" to an invalid object"
 msgstr ""
 
-#: src/main/attrib.c:519
+#: src/main/attrib.c:541
 msgid "attempt to set invalid 'class' attribute"
 msgstr ""
 
-#: src/main/attrib.c:777
+#: src/main/attrib.c:872
 #, c-format
 msgid "class '%s' has no 'names' slot"
 msgstr ""
 
-#: src/main/attrib.c:779
+#: src/main/attrib.c:874
 #, c-format
 msgid ""
 "class '%s' has no 'names' slot; assigning a names attribute will create an "
 "invalid object"
 msgstr ""
 
-#: src/main/attrib.c:782
+#: src/main/attrib.c:877
 #, c-format
 msgid ""
 "invalid to use names()<- to set the 'names' slot in a non-vector class ('%s')"
 msgstr ""
 
-#: src/main/attrib.c:812
+#: src/main/attrib.c:907
 msgid "incompatible 'names' argument"
 msgstr ""
 
-#: src/main/attrib.c:867
+#: src/main/attrib.c:962
 #, c-format
 msgid "invalid type (%s) to set 'names' attribute"
 msgstr ""
 
-#: src/main/attrib.c:938
+#: src/main/attrib.c:1035
 msgid "'dimnames' applied to non-array"
 msgstr ""
 
-#: src/main/attrib.c:943
-msgid "'dimnames' must be a list"
+#: src/main/attrib.c:1040 src/main/coerce.c:2471
+#, c-format
+msgid "'%s' must be a list"
 msgstr ""
 
-#: src/main/attrib.c:946 src/main/attrib.c:974
+#: src/main/attrib.c:1043 src/main/attrib.c:1071
 #, c-format
 msgid "length of 'dimnames' [%d] must match that of 'dims' [%d]"
 msgstr ""
 
-#: src/main/attrib.c:980
+#: src/main/attrib.c:1077
 #, c-format
 msgid "invalid type (%s) for 'dimnames' (must be a vector)"
 msgstr ""
 
-#: src/main/attrib.c:983
+#: src/main/attrib.c:1080
 #, c-format
 msgid "length of 'dimnames' [%d] not equal to array extent"
 msgstr ""
 
-#: src/main/attrib.c:1055 src/main/builtin.c:75 src/main/builtin.c:112
-#: src/main/envir.c:1606 src/main/envir.c:1734 src/main/envir.c:1796
-#: src/main/envir.c:1918 src/main/paste.c:74 src/main/paste.c:293
-#: src/main/random.c:487 src/main/random.c:516 src/main/unique.c:1749
+#: src/main/attrib.c:1152 src/main/builtin.c:75 src/main/builtin.c:112
+#: src/main/envir.c:1740 src/main/envir.c:1868 src/main/envir.c:1928
+#: src/main/envir.c:2065 src/main/paste.c:74 src/main/paste.c:293
+#: src/main/random.c:479 src/main/random.c:508 src/main/unique.c:1746
 msgid "invalid first argument"
 msgstr ""
 
-#: src/main/attrib.c:1058
+#: src/main/attrib.c:1155
 msgid "invalid second argument"
 msgstr ""
 
-#: src/main/attrib.c:1066
+#: src/main/attrib.c:1163
 msgid "length-0 dimension vector is invalid"
 msgstr ""
 
-#: src/main/attrib.c:1071
+#: src/main/attrib.c:1168
 msgid "the dims contain missing values"
 msgstr ""
 
-#: src/main/attrib.c:1073
+#: src/main/attrib.c:1170
 msgid "the dims contain negative values"
 msgstr ""
 
-#: src/main/attrib.c:1078
+#: src/main/attrib.c:1175
 msgid "dims do not match the length of object"
 msgstr ""
 
-#: src/main/attrib.c:1080
+#: src/main/attrib.c:1177
 #, c-format
 msgid "dims [product %d] do not match the length of object [%d]"
 msgstr ""
 
-#: src/main/attrib.c:1177
+#: src/main/attrib.c:1284
 msgid "attributes must be a list or NULL"
 msgstr ""
 
-#: src/main/attrib.c:1182
+#: src/main/attrib.c:1289
 msgid "attributes must be named"
 msgstr ""
 
-#: src/main/attrib.c:1186
+#: src/main/attrib.c:1293
 #, c-format
 msgid "all attributes must have names [%d does not]"
 msgstr ""
 
-#: src/main/attrib.c:1285
+#: src/main/attrib.c:1393
 msgid "'which' must be of mode character"
 msgstr ""
 
-#: src/main/attrib.c:1287
+#: src/main/attrib.c:1395
 msgid "exactly one attribute 'which' must be given"
 msgstr ""
 
-#: src/main/attrib.c:1345 src/main/attrib.c:1368 src/main/subscript.c:240
-#: src/main/subscript.c:244 src/main/subset.c:1188 src/main/subset.c:1239
+#: src/main/attrib.c:1456 src/main/attrib.c:1479 src/main/subscript.c:245
+#: src/main/subscript.c:249 src/main/subset.c:1257 src/main/subset.c:1311
 #, c-format
 msgid "partial match of '%s' to '%s'"
 msgstr ""
 
-#: src/main/attrib.c:1406
+#: src/main/attrib.c:1525
 #, c-format
 msgid "invalid type '%s' for slot name"
 msgstr ""
 
-#: src/main/attrib.c:1444
+#: src/main/attrib.c:1563
 msgid "'name' must be non-null character string"
 msgstr ""
 
-#: src/main/attrib.c:1568 src/main/attrib.c:1639 src/main/attrib.c:1676
+#: src/main/attrib.c:1688 src/main/attrib.c:1759 src/main/attrib.c:1797
 msgid "invalid type or length for slot name"
 msgstr ""
 
-#: src/main/attrib.c:1602
+#: src/main/attrib.c:1722
 #, c-format
 msgid "cannot get a slot (\"%s\") from an object of type \"%s\""
 msgstr ""
 
-#: src/main/attrib.c:1613
+#: src/main/attrib.c:1733
 #, c-format
 msgid "no slot of name \"%s\" for this object of class \"%s\""
 msgstr ""
 
-#: src/main/attrib.c:1630
+#: src/main/attrib.c:1750
 msgid "attempt to set slot on NULL object"
 msgstr ""
 
-#: src/main/attrib.c:1671
+#: src/main/attrib.c:1792
 msgid "formal classes cannot be used without the 'methods' package"
 msgstr ""
 
-#: src/main/attrib.c:1683
+#: src/main/attrib.c:1804
 #, c-format
 msgid ""
 "trying to get slot \"%s\" from an object of a basic class (\"%s\") with no "
 "slots"
 msgstr ""
 
-#: src/main/attrib.c:1687
+#: src/main/attrib.c:1808
 #, c-format
 msgid ""
 "trying to get slot \"%s\" from an object (class \"%s\") that is not an S4 "
 "object "
 msgstr ""
 
-#: src/main/bind.c:161
+#: src/main/bind.c:164
 #, c-format
 msgid "resulting vector exceeds vector length limit in '%s'"
 msgstr ""
 
-#: src/main/bind.c:291 src/main/bind.c:327 src/main/bind.c:376
-#: src/main/bind.c:449 src/main/bind.c:477
+#: src/main/bind.c:294 src/main/bind.c:330 src/main/bind.c:379
+#: src/main/bind.c:452 src/main/bind.c:480
 #, c-format
 msgid "type '%s' is unimplemented in '%s'"
 msgstr ""
 
-#: src/main/bind.c:685
+#: src/main/bind.c:688
 msgid "repeated formal argument 'recursive'"
 msgstr ""
 
-#: src/main/bind.c:696
+#: src/main/bind.c:699
 msgid "repeated formal argument 'use.names'"
 msgstr ""
 
-#: src/main/bind.c:894
+#: src/main/bind.c:900
 msgid "argument not a list"
 msgstr ""
 
-#: src/main/bind.c:1038 src/main/eval.c:2691 src/main/eval.c:2700
-#: src/main/objects.c:318 src/main/objects.c:354 src/main/objects.c:729
-#: src/main/objects.c:746 src/main/objects.c:753
+#: src/main/bind.c:1044 src/main/names.c:1273 src/main/names.c:1278
+#: src/main/names.c:1283 src/main/names.c:1288
 #, c-format
 msgid "class name too long in '%s'"
 msgstr ""
 
-#: src/main/bind.c:1114
+#: src/main/bind.c:1128
 #, c-format
 msgid "cannot create a matrix from type '%s'"
 msgstr ""
 
-#: src/main/bind.c:1185
+#: src/main/bind.c:1198
 #, c-format
 msgid "number of rows of matrices must match (see arg %d)"
 msgstr ""
 
-#: src/main/bind.c:1430
+#: src/main/bind.c:1455
 #, c-format
 msgid "number of columns of matrices must match (see arg %d)"
 msgstr ""
@@ -1266,212 +1285,243 @@ msgstr ""
 msgid "vector size cannot be NA"
 msgstr ""
 
-#: src/main/builtin.c:49 src/main/builtin.c:57 src/main/sort.c:1303
+#: src/main/builtin.c:49 src/main/builtin.c:57 src/main/sort.c:1323
 msgid "vector size cannot be NA/NaN"
 msgstr ""
 
-#: src/main/builtin.c:50 src/main/builtin.c:58 src/main/sort.c:1304
+#: src/main/builtin.c:50 src/main/builtin.c:58 src/main/sort.c:1324
 msgid "vector size cannot be infinite"
 msgstr ""
 
-#: src/main/builtin.c:51 src/main/builtin.c:59 src/main/builtin.c:916
-#: src/main/sort.c:1305
+#: src/main/builtin.c:51 src/main/builtin.c:59 src/main/builtin.c:950
+#: src/main/sort.c:1325
 msgid "vector size specified is too large"
 msgstr ""
 
-#: src/main/builtin.c:84 src/main/builtin.c:93 src/main/builtin.c:293
-#: src/main/builtin.c:326 src/main/builtin.c:365 src/main/builtin.c:375
-#: src/main/coerce.c:1537 src/main/connections.c:3066 src/main/engine.c:2967
-#: src/main/envir.c:993 src/main/envir.c:1046 src/main/envir.c:1136
-#: src/main/envir.c:1615 src/main/envir.c:1739 src/main/envir.c:1807
-#: src/main/envir.c:1925 src/main/envir.c:2582 src/main/envir.c:2642
-#: src/main/envir.c:2922 src/main/envir.c:2951 src/main/envir.c:2972
-#: src/main/envir.c:2995 src/main/envir.c:3030 src/main/envir.c:3051
-#: src/main/envir.c:3357 src/main/envir.c:3362 src/main/eval.c:5318
-#: src/main/objects.c:197 src/main/objects.c:203 src/main/saveload.c:2070
-#: src/main/saveload.c:2364 src/main/serialize.c:2709
+#: src/main/builtin.c:84 src/main/builtin.c:93 src/main/builtin.c:304
+#: src/main/builtin.c:337 src/main/builtin.c:394 src/main/builtin.c:408
+#: src/main/coerce.c:1536 src/main/connections.c:3062 src/main/engine.c:2987
+#: src/main/envir.c:1001 src/main/envir.c:1054 src/main/envir.c:1210
+#: src/main/envir.c:1749 src/main/envir.c:1873 src/main/envir.c:1939
+#: src/main/envir.c:2072 src/main/envir.c:2791 src/main/envir.c:2877
+#: src/main/envir.c:3182 src/main/envir.c:3211 src/main/envir.c:3232
+#: src/main/envir.c:3255 src/main/envir.c:3290 src/main/envir.c:3311
+#: src/main/envir.c:3632 src/main/envir.c:3637 src/main/eval.c:6251
+#: src/main/objects.c:191 src/main/objects.c:199 src/main/saveload.c:2072
+#: src/main/saveload.c:2364 src/main/serialize.c:2755
 msgid "use of NULL environment is defunct"
 msgstr ""
 
-#: src/main/builtin.c:306
+#: src/main/builtin.c:250 src/main/builtin.c:263
+msgid "argument is not a function"
+msgstr ""
+
+#: src/main/builtin.c:317
 msgid "replacement object is not an environment"
 msgstr ""
 
-#: src/main/builtin.c:331
+#: src/main/builtin.c:342
 msgid "'enclos' must be an environment"
 msgstr ""
 
-#: src/main/builtin.c:352 src/main/builtin.c:370
+#: src/main/builtin.c:363 src/main/builtin.c:399
 msgid "argument is not an environment"
 msgstr ""
 
-#: src/main/builtin.c:354
+#: src/main/builtin.c:365
 msgid "the empty environment has no parent"
 msgstr ""
 
-#: src/main/builtin.c:372
+#: src/main/builtin.c:401
 msgid "can not set parent of the empty environment"
 msgstr ""
 
-#: src/main/builtin.c:380
+#: src/main/builtin.c:403
+msgid "can not set the parent environment of a namespace"
+msgstr ""
+
+#: src/main/builtin.c:405
+msgid "can not set the parent environment of package imports"
+msgstr ""
+
+#: src/main/builtin.c:413
 msgid "'parent' is not an environment"
 msgstr ""
 
-#: src/main/builtin.c:521 src/main/connections.c:3691
-#: src/main/connections.c:4068 src/main/connections.c:4102
-#: src/main/connections.c:4480 src/main/connections.c:4550
-#: src/main/connections.c:4759 src/main/connections.c:4763
-#: src/main/connections.c:5124 src/main/deparse.c:360 src/main/deparse.c:446
-#: src/main/serialize.c:2006
+#: src/main/builtin.c:556 src/main/connections.c:3687
+#: src/main/connections.c:4079 src/main/connections.c:4113
+#: src/main/connections.c:4491 src/main/connections.c:4561
+#: src/main/connections.c:4772 src/main/connections.c:4776
+#: src/main/connections.c:5199 src/main/deparse.c:369 src/main/deparse.c:458
+#: src/main/serialize.c:2045
 msgid "cannot write to this connection"
 msgstr ""
 
-#: src/main/builtin.c:526 src/main/builtin.c:556
+#: src/main/builtin.c:561 src/main/builtin.c:591
 #, c-format
 msgid "invalid '%s' specification"
 msgstr ""
 
-#: src/main/builtin.c:543
+#: src/main/builtin.c:578
 msgid "non-positive 'fill' argument will be ignored"
 msgstr ""
 
-#: src/main/builtin.c:618
+#: src/main/builtin.c:653
 #, c-format
 msgid "argument %d (type '%s') cannot be handled by 'cat'"
 msgstr ""
 
-#: src/main/builtin.c:763
+#: src/main/builtin.c:797
 #, c-format
 msgid "vector: cannot make a vector of mode '%s'."
 msgstr ""
 
-#: src/main/builtin.c:789
+#: src/main/builtin.c:823
 msgid "cannot set length of non-vector"
 msgstr ""
 
-#: src/main/builtin.c:897 src/main/builtin.c:907 src/main/options.c:637
+#: src/main/builtin.c:931 src/main/builtin.c:941 src/main/options.c:659
 msgid "invalid argument"
 msgstr ""
 
-#: src/main/builtin.c:899 src/main/builtin.c:909 src/main/builtin.c:911
-#: src/main/character.c:366 src/main/coerce.c:2765
+#: src/main/builtin.c:933 src/main/builtin.c:943 src/main/builtin.c:945
+#: src/main/character.c:525 src/main/coerce.c:2832
 msgid "invalid value"
 msgstr ""
 
-#: src/main/builtin.c:942 src/main/coerce.c:2478 src/main/coerce.c:2519
-#: src/main/eval.c:563 src/main/eval.c:683 src/main/eval.c:2099
-#: src/main/eval.c:2176 src/main/eval.c:2236 src/main/eval.c:2569
-#: src/main/eval.c:4694 src/main/eval.c:4814
+#: src/main/builtin.c:976 src/main/coerce.c:2541 src/main/coerce.c:2584
+#: src/main/eval.c:620 src/main/eval.c:740 src/main/eval.c:2266
+#: src/main/eval.c:2346 src/main/eval.c:2407 src/main/eval.c:2745
+#: src/main/eval.c:5584 src/main/eval.c:5701
 msgid "'...' used in an incorrect context"
 msgstr ""
 
-#: src/main/builtin.c:963
+#: src/main/builtin.c:998
 #, c-format
 msgid "duplicate 'switch' defaults: '%s' and '%s'"
 msgstr ""
 
-#: src/main/builtin.c:996
+#: src/main/builtin.c:1031
 msgid "'EXPR' is missing"
 msgstr ""
 
-#: src/main/builtin.c:1000 src/main/eval.c:5155
+#: src/main/builtin.c:1035 src/main/eval.c:6056
 msgid "EXPR must be a length 1 vector"
 msgstr ""
 
-#: src/main/builtin.c:1003
+#: src/main/builtin.c:1038 src/main/eval.c:6059
 #, c-format
 msgid ""
 "EXPR is a \"factor\", treated as integer.\n"
 " Consider using '%s' instead."
 msgstr ""
 
-#: src/main/character.c:105 src/main/character.c:108 src/main/character.c:132
-#: src/main/character.c:135
+#: src/main/builtin.c:1095 src/main/eval.c:6069 src/main/eval.c:6098
+msgid "'switch' with no alternatives"
+msgstr ""
+
+#: src/main/character.c:103 src/main/character.c:224
+#, c-format
+msgid "%d argument passed to '%s' which requires %d to %d"
+msgid_plural "%d arguments passed to '%s' which requires %d to %d"
+msgstr[0] ""
+msgstr[1] ""
+
+#: src/main/character.c:110 src/main/character.c:113 src/main/character.c:232
+#: src/main/character.c:235
 #, c-format
 msgid "'%s' requires a character vector"
 msgstr ""
 
-#: src/main/character.c:164
+#: src/main/character.c:150 src/main/character.c:165 src/main/character.c:175
+#: src/main/character.c:203
 #, c-format
-msgid ""
-"number of characters is not computable for element %d in \"bytes\" encoding"
+msgid "invalid multibyte string, %s"
 msgstr ""
 
-#: src/main/character.c:169 src/main/character.c:197 src/main/character.c:653
-#: src/main/character.c:750
+#: src/main/character.c:159
 #, c-format
-msgid "invalid multibyte string %d"
+msgid "number of characters is not computable in \"bytes\" encoding, %s"
 msgstr ""
 
-#: src/main/character.c:185
+#: src/main/character.c:188
 #, c-format
-msgid "width is not computable for element %d in \"bytes\" encoding"
+msgid "width is not computable for %s in \"bytes\" encoding"
 msgstr ""
 
-#: src/main/character.c:263
+#: src/main/character.c:311
 msgid "extracting substrings from a non-character object"
 msgstr ""
 
-#: src/main/character.c:268 src/main/character.c:363
+#: src/main/character.c:321 src/main/character.c:522
 msgid "invalid substring arguments"
 msgstr ""
 
-#: src/main/character.c:358
+#: src/main/character.c:361
+msgid "non-character object(s)"
+msgstr ""
+
+#: src/main/character.c:517
 msgid "replacing substrings in a non-character object"
 msgstr ""
 
-#: src/main/character.c:551
+#: src/main/character.c:785
 msgid "the first argument must be a character vector"
 msgstr ""
 
-#: src/main/character.c:570
+#: src/main/character.c:822
 msgid "abbreviate used with non-ASCII chars"
 msgstr ""
 
-#: src/main/character.c:591
+#: src/main/character.c:843
 msgid "non-character names"
 msgstr ""
 
-#: src/main/character.c:696 src/main/grep.c:159
+#: src/main/character.c:905 src/main/character.c:1002
+#, c-format
+msgid "invalid multibyte string %d"
+msgstr ""
+
+#: src/main/character.c:948 src/main/grep.c:163
 msgid "non-character argument"
 msgstr ""
 
-#: src/main/character.c:805
+#: src/main/character.c:1057
 #, c-format
 msgid "decreasing range specification ('%lc-%lc')"
 msgstr ""
 
-#: src/main/character.c:891
+#: src/main/character.c:1143
 #, c-format
 msgid "decreasing range specification ('%c-%c')"
 msgstr ""
 
-#: src/main/character.c:1079
+#: src/main/character.c:1331
 msgid "invalid UTF-8 string 'old'"
 msgstr ""
 
-#: src/main/character.c:1085
+#: src/main/character.c:1337
 msgid "invalid multibyte string 'old'"
 msgstr ""
 
-#: src/main/character.c:1098
+#: src/main/character.c:1350
 msgid "invalid UTF-8 string 'new'"
 msgstr ""
 
-#: src/main/character.c:1104
+#: src/main/character.c:1356
 msgid "invalid multibyte string 'new'"
 msgstr ""
 
-#: src/main/character.c:1132 src/main/character.c:1221
+#: src/main/character.c:1384 src/main/character.c:1473
 msgid "'old' is longer than 'new'"
 msgstr ""
 
-#: src/main/character.c:1164
+#: src/main/character.c:1416
 #, c-format
 msgid "invalid input multibyte string %d"
 msgstr ""
 
-#: src/main/character.c:1271
+#: src/main/character.c:1523
 msgid "strtrim() requires a character vector"
 msgstr ""
 
@@ -1483,15 +1533,15 @@ msgstr ""
 msgid "applies only to lists and vectors"
 msgstr ""
 
-#: src/main/coerce.c:77 src/main/errors.c:1208
+#: src/main/coerce.c:77 src/main/errors.c:1194
 msgid "NAs introduced by coercion"
 msgstr ""
 
-#: src/main/coerce.c:79 src/main/errors.c:1209
-msgid "inaccurate integer conversion in coercion"
+#: src/main/coerce.c:79
+msgid "NAs introduced by coercion to integer range"
 msgstr ""
 
-#: src/main/coerce.c:81 src/main/errors.c:1210
+#: src/main/coerce.c:81 src/main/errors.c:1196
 msgid "imaginary parts discarded in coercion"
 msgstr ""
 
@@ -1499,59 +1549,63 @@ msgstr ""
 msgid "out-of-range values treated as 0 in coercion to raw"
 msgstr ""
 
-#: src/main/coerce.c:414
+#: src/main/coerce.c:399
 #, c-format
 msgid "invalid data of mode '%s' (too short)"
 msgstr ""
 
-#: src/main/coerce.c:1016
+#: src/main/coerce.c:1002
 #, c-format
 msgid "'pairlist' object cannot be coerced to type '%s'"
 msgstr ""
 
-#: src/main/coerce.c:1134
+#: src/main/coerce.c:1120
 #, c-format
 msgid "(list) object cannot be coerced to type '%s'"
 msgstr ""
 
-#: src/main/coerce.c:1157
+#: src/main/coerce.c:1143
 #, c-format
 msgid "(symbol) object cannot be coerced to type '%s'"
 msgstr ""
 
-#: src/main/coerce.c:1173 src/main/coerce.c:1485
+#: src/main/coerce.c:1159 src/main/coerce.c:1484
 msgid "no method for coercing this S4 class to a vector"
 msgstr ""
 
-#: src/main/coerce.c:1232
+#: src/main/coerce.c:1222
 msgid "environments cannot be coerced to other types"
 msgstr ""
 
-#: src/main/coerce.c:1379
+#: src/main/coerce.c:1374
 msgid "attempting to coerce non-factor"
 msgstr ""
 
-#: src/main/coerce.c:1533
+#: src/main/coerce.c:1379 src/main/coerce.c:1389
+msgid "malformed factor"
+msgstr ""
+
+#: src/main/coerce.c:1532
 msgid "list argument expected"
 msgstr ""
 
-#: src/main/coerce.c:1541 src/main/eval.c:5322
+#: src/main/coerce.c:1540 src/main/eval.c:6255
 msgid "invalid environment"
 msgstr ""
 
-#: src/main/coerce.c:1545
+#: src/main/coerce.c:1544
 msgid "argument must have length at least 1"
 msgstr ""
 
-#: src/main/coerce.c:1567
+#: src/main/coerce.c:1566
 msgid "invalid body for function"
 msgstr ""
 
-#: src/main/coerce.c:1590
+#: src/main/coerce.c:1589
 msgid "invalid length 0 argument"
 msgstr ""
 
-#: src/main/coerce.c:1605
+#: src/main/coerce.c:1604
 msgid "invalid argument list"
 msgstr ""
 
@@ -1563,772 +1617,766 @@ msgstr ""
 msgid "unimplemented predicate"
 msgstr ""
 
-#: src/main/coerce.c:2069
+#: src/main/coerce.c:2070
 #, c-format
 msgid "%s() applied to non-(list or vector) of type '%s'"
 msgstr ""
 
-#: src/main/coerce.c:2212 src/main/coerce.c:2275 src/main/coerce.c:2343
+#: src/main/coerce.c:2267 src/main/coerce.c:2331 src/main/coerce.c:2403
 #, c-format
 msgid "default method not implemented for type '%s'"
 msgstr ""
 
-#: src/main/coerce.c:2361
+#: src/main/coerce.c:2425
 msgid "'name' is missing"
 msgstr ""
 
-#: src/main/coerce.c:2368
+#: src/main/coerce.c:2432
 msgid "first argument must be a character string"
 msgstr ""
 
-#: src/main/coerce.c:2401
-msgid "'what' must be a character string or a function"
+#: src/main/coerce.c:2464
+msgid "'what' must be a function or character string"
 msgstr ""
 
-#: src/main/coerce.c:2405
+#: src/main/coerce.c:2468
 msgid "'args' must be a list or expression"
 msgstr ""
 
-#: src/main/coerce.c:2408
-msgid "'args' must be a list"
-msgstr ""
-
-#: src/main/coerce.c:2412
+#: src/main/coerce.c:2475 src/main/unique.c:1345
 msgid "'envir' must be an environment"
 msgstr ""
 
-#: src/main/coerce.c:2567
+#: src/main/coerce.c:2634
 msgid "invalid environment specified"
 msgstr ""
 
-#: src/main/coerce.c:2633
+#: src/main/coerce.c:2700
 msgid "Setting class(x) to NULL;   result will no longer be an S4 object"
 msgstr ""
 
-#: src/main/coerce.c:2636
+#: src/main/coerce.c:2703
 #, c-format
 msgid ""
 "Setting class(x) to multiple strings (\"%s\", \"%s\", ...); result will no "
 "longer be an S4 object"
 msgstr ""
 
-#: src/main/coerce.c:2640
+#: src/main/coerce.c:2707
 #, c-format
 msgid ""
 "Setting class(x) to \"%s\" sets attribute to NULL; result will no longer be "
 "an S4 object"
 msgstr ""
 
-#: src/main/coerce.c:2673
+#: src/main/coerce.c:2740
 msgid "invalid replacement object to be a class string"
 msgstr ""
 
-#: src/main/coerce.c:2694
+#: src/main/coerce.c:2761
 #, c-format
 msgid ""
 "\"%s\" can only be set as the class if the object has this type; found \"%s\""
 msgstr ""
 
-#: src/main/coerce.c:2712
+#: src/main/coerce.c:2779
 #, c-format
 msgid ""
 "invalid to set the class to matrix unless the dimension attribute is of "
 "length 2 (was %d)"
 msgstr ""
 
-#: src/main/coerce.c:2720
+#: src/main/coerce.c:2787
 msgid ""
 "cannot set class to \"array\" unless the dimension attribute has length > 0"
 msgstr ""
 
-#: src/main/coerce.c:2756
+#: src/main/coerce.c:2823
 msgid "'value' must be non-null character string"
 msgstr ""
 
-#: src/main/coerce.c:2769
+#: src/main/coerce.c:2836
 msgid "invalid to change the storage mode of a factor"
 msgstr ""
 
-#: src/main/complex.c:126
+#: src/main/complex.c:123
 msgid "invalid complex unary operator"
 msgstr ""
 
-#: src/main/complex.c:261
+#: src/main/complex.c:251
 msgid "unimplemented complex operation"
 msgstr ""
 
-#: src/main/complex.c:363
+#: src/main/complex.c:353
 msgid "non-numeric argument to function"
 msgstr ""
 
-#: src/main/complex.c:827
+#: src/main/complex.c:822
 msgid "invalid polynomial coefficient"
 msgstr ""
 
-#: src/main/complex.c:832
+#: src/main/complex.c:827
 msgid "root finding code failed"
 msgstr ""
 
-#: src/main/connections.c:153
+#: src/main/connections.c:150
 msgid "all connections are in use"
 msgstr ""
 
-#: src/main/connections.c:164
+#: src/main/connections.c:161
 msgid "connection not found"
 msgstr ""
 
-#: src/main/connections.c:175
+#: src/main/connections.c:172 src/main/connections.c:5213
 msgid "invalid connection"
 msgstr ""
 
-#: src/main/connections.c:207
+#: src/main/connections.c:204
 #, c-format
 msgid "closing unused connection %d (%s)\n"
 msgstr ""
 
-#: src/main/connections.c:232 src/main/sysutils.c:619 src/main/sysutils.c:806
-#: src/main/sysutils.c:821 src/main/sysutils.c:912 src/main/sysutils.c:927
-#: src/main/sysutils.c:1023 src/main/sysutils.c:1096 src/main/sysutils.c:1106
-#: src/main/sysutils.c:1119 src/main/sysutils.c:1516
+#: src/main/connections.c:229 src/main/sysutils.c:631 src/main/sysutils.c:834
+#: src/main/sysutils.c:849 src/main/sysutils.c:978 src/main/sysutils.c:1051
+#: src/main/sysutils.c:1061 src/main/sysutils.c:1074 src/main/sysutils.c:1472
 #, c-format
 msgid "unsupported conversion from '%s' to '%s'"
 msgstr ""
 
-#: src/main/connections.c:288 src/main/connections.c:304
-#: src/main/connections.c:456 src/main/connections.c:462
-#: src/main/connections.c:468 src/main/connections.c:479
-#: src/main/connections.c:486
+#: src/main/connections.c:285 src/main/connections.c:300
+#: src/main/connections.c:451 src/main/connections.c:456
+#: src/main/connections.c:461 src/main/connections.c:472
+#: src/main/connections.c:478
 #, c-format
 msgid "%s not enabled for this connection"
 msgstr ""
 
-#: src/main/connections.c:335 src/main/connections.c:352
-#: src/main/connections.c:2916
+#: src/main/connections.c:330 src/main/connections.c:347
+#: src/main/connections.c:2910
 msgid "printing of extremely long output is truncated"
 msgstr ""
 
-#: src/main/connections.c:375
+#: src/main/connections.c:370
 msgid "invalid char string in output conversion"
 msgstr ""
 
-#: src/main/connections.c:439
+#: src/main/connections.c:434
 #, c-format
 msgid "invalid input found on input connection '%s'"
 msgstr ""
 
-#: src/main/connections.c:580
+#: src/main/connections.c:571
 #, c-format
 msgid "cannot open file '%ls': %s"
 msgstr ""
 
-#: src/main/connections.c:691
+#: src/main/connections.c:683
 msgid "connection is not open for reading"
 msgstr ""
 
-#: src/main/connections.c:696
+#: src/main/connections.c:688
 msgid "connection is not open for writing"
 msgstr ""
 
-#: src/main/connections.c:734 src/main/connections.c:2229
+#: src/main/connections.c:726 src/main/connections.c:2223
 msgid "can only truncate connections open for writing"
 msgstr ""
 
-#: src/main/connections.c:738 src/main/connections.c:740
+#: src/main/connections.c:730 src/main/connections.c:732
 msgid "file truncation failed"
 msgstr ""
 
-#: src/main/connections.c:742
+#: src/main/connections.c:734
 msgid "file truncation unavailable on this platform"
 msgstr ""
 
-#: src/main/connections.c:788 src/main/connections.c:792
-#: src/main/connections.c:798 src/main/connections.c:815
+#: src/main/connections.c:780 src/main/connections.c:784
+#: src/main/connections.c:790 src/main/connections.c:807
 msgid "allocation of file connection failed"
 msgstr ""
 
-#: src/main/connections.c:866 src/main/connections.c:1044
+#: src/main/connections.c:858 src/main/connections.c:1035
 #, c-format
 msgid "cannot create fifo '%s', reason '%s'"
 msgstr ""
 
-#: src/main/connections.c:872
+#: src/main/connections.c:864
 #, c-format
 msgid "'%s' exists but is not a fifo"
 msgstr ""
 
-#: src/main/connections.c:886
+#: src/main/connections.c:878
 #, c-format
 msgid "fifo '%s' is not ready"
 msgstr ""
 
-#: src/main/connections.c:887
+#: src/main/connections.c:879
 #, c-format
 msgid "cannot open fifo '%s'"
 msgstr ""
 
-#: src/main/connections.c:928 src/main/connections.c:939
-#: src/main/connections.c:1104 src/main/connections.c:1123
-#: src/main/connections.c:1531 src/main/connections.c:1541
-#: src/main/connections.c:1660 src/main/connections.c:1720
-#: src/main/connections.c:2246 src/main/connections.c:2263
-#: src/main/connections.c:2572 src/main/connections.c:5305
-#: src/main/connections.c:5369
+#: src/main/connections.c:920 src/main/connections.c:931
+#: src/main/connections.c:1095 src/main/connections.c:1114
+#: src/main/connections.c:1524 src/main/connections.c:1534
+#: src/main/connections.c:1653 src/main/connections.c:1713
+#: src/main/connections.c:2240 src/main/connections.c:2257
+#: src/main/connections.c:2566 src/main/connections.c:5385
+#: src/main/connections.c:5449
 msgid "too large a block specified"
 msgstr ""
 
-#: src/main/connections.c:998 src/main/connections.c:1004
+#: src/main/connections.c:989 src/main/connections.c:995
 msgid "allocation of fifo name failed"
 msgstr ""
 
-#: src/main/connections.c:1066
+#: src/main/connections.c:1057
 #, c-format
 msgid "cannot open fifo '%s', reason '%s'"
 msgstr ""
 
-#: src/main/connections.c:1107 src/main/connections.c:1131
+#: src/main/connections.c:1098 src/main/connections.c:1122
 msgid "allocation of fifo buffer failed"
 msgstr ""
 
-#: src/main/connections.c:1139
+#: src/main/connections.c:1130
 #, c-format
 msgid "cannot write FIFO '%s'"
 msgstr ""
 
-#: src/main/connections.c:1175 src/main/connections.c:1179
-#: src/main/connections.c:1185 src/main/connections.c:1201
+#: src/main/connections.c:1166 src/main/connections.c:1170
+#: src/main/connections.c:1176 src/main/connections.c:1192
 msgid "allocation of fifo connection failed"
 msgstr ""
 
-#: src/main/connections.c:1219 src/main/connections.c:1377
-#: src/main/connections.c:1998 src/main/connections.c:3212
-#: src/main/connections.c:4967
+#: src/main/connections.c:1210 src/main/connections.c:1369
+#: src/main/connections.c:1991 src/main/connections.c:3205
+#: src/main/connections.c:4982
 msgid "only first element of 'description' argument used"
 msgstr ""
 
-#: src/main/connections.c:1236
+#: src/main/connections.c:1227
 msgid ""
 "fifo(\"\") only supports open = \"w+\" and open = \"w+b\": using the former"
 msgstr ""
 
-#: src/main/connections.c:1250 src/main/connections.c:1414
-#: src/main/connections.c:2064 src/main/connections.c:3179
-#: src/main/connections.c:3232 src/main/connections.c:3280
-#: src/main/connections.c:3567 src/main/connections.c:3683
-#: src/main/connections.c:3844 src/main/connections.c:4095
-#: src/main/connections.c:4423 src/main/connections.c:4543
-#: src/main/connections.c:4755 src/main/connections.c:5105 src/main/dcf.c:94
-#: src/main/deparse.c:352 src/main/deparse.c:438 src/main/saveload.c:2267
-#: src/main/saveload.c:2350 src/main/scan.c:933 src/main/serialize.c:2175
-#: src/main/serialize.c:2226 src/main/source.c:265
+#: src/main/connections.c:1242 src/main/connections.c:1407
+#: src/main/connections.c:2058 src/main/connections.c:3175
+#: src/main/connections.c:3226 src/main/connections.c:3274
+#: src/main/connections.c:3563 src/main/connections.c:3679
+#: src/main/connections.c:3841 src/main/connections.c:4106
+#: src/main/connections.c:4434 src/main/connections.c:4554
+#: src/main/connections.c:4768 src/main/connections.c:5180 src/main/dcf.c:93
+#: src/main/deparse.c:361 src/main/deparse.c:450 src/main/saveload.c:2269
+#: src/main/saveload.c:2350 src/main/scan.c:933 src/main/serialize.c:2216
+#: src/main/serialize.c:2267 src/main/source.c:270
 msgid "cannot open the connection"
 msgstr ""
 
-#: src/main/connections.c:1265
+#: src/main/connections.c:1257
 msgid "fifo connections are not available on this system"
 msgstr ""
 
-#: src/main/connections.c:1295
+#: src/main/connections.c:1287
 #, c-format
 msgid "cannot pipe() cmd '%ls': %s"
 msgstr ""
 
-#: src/main/connections.c:1302
+#: src/main/connections.c:1294
 #, c-format
 msgid "cannot open pipe() cmd '%s': %s"
 msgstr ""
 
-#: src/main/connections.c:1471 src/main/connections.c:1791
+#: src/main/connections.c:1464 src/main/connections.c:1784
 #, c-format
 msgid "cannot open compressed file '%s', probable reason '%s'"
 msgstr ""
 
-#: src/main/connections.c:1511
+#: src/main/connections.c:1504
 msgid "whence = \"end\" is not implemented for gzfile connections"
 msgstr ""
 
-#: src/main/connections.c:1516
+#: src/main/connections.c:1509
 msgid "seek on a gzfile connection returned an internal error"
 msgstr ""
 
-#: src/main/connections.c:1550 src/main/connections.c:1554
-#: src/main/connections.c:1560 src/main/connections.c:1577
+#: src/main/connections.c:1543 src/main/connections.c:1547
+#: src/main/connections.c:1553 src/main/connections.c:1570
 msgid "allocation of gzfile connection failed"
 msgstr ""
 
-#: src/main/connections.c:1606
+#: src/main/connections.c:1599
 #, c-format
 msgid "cannot open bzip2-ed file '%s', probable reason '%s'"
 msgstr ""
 
-#: src/main/connections.c:1615
+#: src/main/connections.c:1608
 #, c-format
 msgid "file '%s' appears not to be compressed by bzip2"
 msgstr ""
 
-#: src/main/connections.c:1624
+#: src/main/connections.c:1617
 #, c-format
 msgid "initializing bzip2 compression for file '%s' failed"
 msgstr ""
 
-#: src/main/connections.c:1678
+#: src/main/connections.c:1671
 msgid "allocation of overflow buffer for bzfile failed"
 msgstr ""
 
-#: src/main/connections.c:1685
+#: src/main/connections.c:1678
 #, c-format
 msgid ""
 "file '%s' has trailing content that appears not to be compressed by bzip2"
 msgstr ""
 
-#: src/main/connections.c:1731 src/main/connections.c:1735
-#: src/main/connections.c:1741 src/main/connections.c:1758
+#: src/main/connections.c:1724 src/main/connections.c:1728
+#: src/main/connections.c:1734 src/main/connections.c:1751
 msgid "allocation of bzfile connection failed"
 msgstr ""
 
-#: src/main/connections.c:1804 src/main/connections.c:5961
+#: src/main/connections.c:1797 src/main/connections.c:6046
 #, c-format
 msgid "cannot initialize lzma decoder, error %d"
 msgstr ""
 
-#: src/main/connections.c:1820
+#: src/main/connections.c:1813
 #, c-format
 msgid "cannot initialize lzma encoder, error %d"
 msgstr ""
 
-#: src/main/connections.c:1948 src/main/connections.c:1952
-#: src/main/connections.c:1958 src/main/connections.c:1976
+#: src/main/connections.c:1941 src/main/connections.c:1945
+#: src/main/connections.c:1951 src/main/connections.c:1969
 msgid "allocation of xzfile connection failed"
 msgstr ""
 
-#: src/main/connections.c:2035
+#: src/main/connections.c:2028
 #, c-format
 msgid "this is a %s-compressed file which this build of R does not support"
 msgstr ""
 
-#: src/main/connections.c:2130 src/modules/X11/devX11.c:3375
+#: src/main/connections.c:2124 src/modules/X11/devX11.c:3381
 msgid "memory allocation to copy clipboard failed"
 msgstr ""
 
-#: src/main/connections.c:2135 src/modules/X11/devX11.c:3354
-#: src/modules/X11/devX11.c:3359
+#: src/main/connections.c:2129 src/modules/X11/devX11.c:3360
+#: src/modules/X11/devX11.c:3365
 msgid "clipboard cannot be opened or contains no text"
 msgstr ""
 
-#: src/main/connections.c:2146
+#: src/main/connections.c:2140
 msgid "memory allocation to open clipboard failed"
 msgstr ""
 
-#: src/main/connections.c:2174
+#: src/main/connections.c:2168
 msgid "unable to open the clipboard"
 msgstr ""
 
-#: src/main/connections.c:2178
+#: src/main/connections.c:2172
 msgid "unable to write to the clipboard"
 msgstr ""
 
-#: src/main/connections.c:2218
+#: src/main/connections.c:2212
 msgid "attempt to seek outside the range of the clipboard"
 msgstr ""
 
-#: src/main/connections.c:2261
+#: src/main/connections.c:2255
 msgid "clipboard connection is open for reading only"
 msgstr ""
 
-#: src/main/connections.c:2281
+#: src/main/connections.c:2275
 msgid "clipboard buffer is full and output lost"
 msgstr ""
 
-#: src/main/connections.c:2302
+#: src/main/connections.c:2296
 msgid "'mode' for the clipboard must be 'r' or 'w'"
 msgstr ""
 
-#: src/main/connections.c:2305
+#: src/main/connections.c:2299
 msgid "'mode' for the clipboard must be 'r' on Unix"
 msgstr ""
 
-#: src/main/connections.c:2308 src/main/connections.c:2314
-#: src/main/connections.c:2320 src/main/connections.c:2337
+#: src/main/connections.c:2302 src/main/connections.c:2308
+#: src/main/connections.c:2314 src/main/connections.c:2331
 msgid "allocation of clipboard connection failed"
 msgstr ""
 
-#: src/main/connections.c:2406 src/main/connections.c:2410
-#: src/main/connections.c:2416
+#: src/main/connections.c:2400 src/main/connections.c:2404
+#: src/main/connections.c:2410
 msgid "allocation of terminal connection failed"
 msgstr ""
 
-#: src/main/connections.c:2549
+#: src/main/connections.c:2543
 msgid "attempting to add too many elements to raw vector"
 msgstr ""
 
-#: src/main/connections.c:2601
+#: src/main/connections.c:2595
 msgid "attempt to seek outside the range of the raw connection"
 msgstr ""
 
-#: src/main/connections.c:2612 src/main/connections.c:2616
-#: src/main/connections.c:2622 src/main/connections.c:2648
+#: src/main/connections.c:2606 src/main/connections.c:2610
+#: src/main/connections.c:2616 src/main/connections.c:2642
 msgid "allocation of raw connection failed"
 msgstr ""
 
-#: src/main/connections.c:2701
+#: src/main/connections.c:2695
 msgid "'con' is not a rawConnection"
 msgstr ""
 
-#: src/main/connections.c:2704
+#: src/main/connections.c:2698
 msgid "'con' is not an output rawConnection"
 msgstr ""
 
-#: src/main/connections.c:2742
+#: src/main/connections.c:2736
 msgid "too many characters for text connection"
 msgstr ""
 
-#: src/main/connections.c:2747
+#: src/main/connections.c:2741
 msgid "cannot allocate memory for text connection"
 msgstr ""
 
-#: src/main/connections.c:2796
+#: src/main/connections.c:2790
 msgid "seek is not relevant for text connection"
 msgstr ""
 
-#: src/main/connections.c:2804 src/main/connections.c:2808
-#: src/main/connections.c:2814 src/main/connections.c:2827
-#: src/main/connections.c:3012 src/main/connections.c:3016
-#: src/main/connections.c:3022 src/main/connections.c:3035
-#: src/main/connections.c:3041
+#: src/main/connections.c:2798 src/main/connections.c:2802
+#: src/main/connections.c:2808 src/main/connections.c:2821
+#: src/main/connections.c:3008 src/main/connections.c:3012
+#: src/main/connections.c:3018 src/main/connections.c:3031
+#: src/main/connections.c:3037
 msgid "allocation of text connection failed"
 msgstr ""
 
-#: src/main/connections.c:2989
+#: src/main/connections.c:2983
 msgid "text connection: appending to a non-existent char vector"
 msgstr ""
 
-#: src/main/connections.c:3093
+#: src/main/connections.c:3089
 msgid "unsupported mode"
 msgstr ""
 
-#: src/main/connections.c:3115
+#: src/main/connections.c:3111
 msgid "'con' is not a textConnection"
 msgstr ""
 
-#: src/main/connections.c:3118
+#: src/main/connections.c:3114
 msgid "'con' is not an output textConnection"
 msgstr ""
 
-#: src/main/connections.c:3192
-msgid "sockets are not available on this system"
-msgstr ""
-
-#: src/main/connections.c:3260 src/main/connections.c:3309
-#: src/main/connections.c:3320 src/main/connections.c:3367
-#: src/main/connections.c:3392 src/main/connections.c:3415
-#: src/main/connections.c:3427 src/main/connections.c:3543
-#: src/main/connections.c:3668 src/main/connections.c:5408
+#: src/main/connections.c:3254 src/main/connections.c:3303
+#: src/main/connections.c:3314 src/main/connections.c:3361
+#: src/main/connections.c:3388 src/main/connections.c:3411
+#: src/main/connections.c:3423 src/main/connections.c:3539
+#: src/main/connections.c:3664 src/main/connections.c:5489
 msgid "'con' is not a connection"
 msgstr ""
 
-#: src/main/connections.c:3263
+#: src/main/connections.c:3257
 msgid "cannot open standard connections"
 msgstr ""
 
-#: src/main/connections.c:3265
+#: src/main/connections.c:3259
 msgid "connection is already open"
 msgstr ""
 
-#: src/main/connections.c:3298
+#: src/main/connections.c:3292
 msgid "unknown 'rw' value"
 msgstr ""
 
-#: src/main/connections.c:3369
+#: src/main/connections.c:3363
 msgid "cannot close standard connections"
 msgstr ""
 
-#: src/main/connections.c:3372
+#: src/main/connections.c:3366
 msgid "cannot close 'output' sink connection"
 msgstr ""
 
-#: src/main/connections.c:3374
+#: src/main/connections.c:3368
 msgid "cannot close 'message' sink connection"
 msgstr ""
 
-#: src/main/connections.c:3394 src/main/connections.c:5123
-#: src/main/connections.c:5131 src/main/serialize.c:1996
-#: src/main/serialize.c:2004
+#: src/main/connections.c:3390 src/main/connections.c:5198
+#: src/main/connections.c:5206 src/main/serialize.c:2035
+#: src/main/serialize.c:2043
 msgid "connection is not open"
 msgstr ""
 
-#: src/main/connections.c:3490 src/main/connections.c:3502
+#: src/main/connections.c:3486 src/main/connections.c:3498
 msgid "line longer than buffer size"
 msgstr ""
 
-#: src/main/connections.c:3574 src/main/connections.c:3576
-#: src/main/connections.c:3852 src/main/connections.c:4406
-#: src/main/connections.c:4431 src/main/connections.c:5132 src/main/dcf.c:101
-#: src/main/scan.c:936 src/main/scan.c:940 src/main/serialize.c:1998
-#: src/main/source.c:272
+#: src/main/connections.c:3570 src/main/connections.c:3572
+#: src/main/connections.c:3849 src/main/connections.c:4417
+#: src/main/connections.c:4442 src/main/connections.c:5207 src/main/dcf.c:100
+#: src/main/scan.c:936 src/main/scan.c:940 src/main/serialize.c:2037
+#: src/main/source.c:277
 msgid "cannot read from this connection"
 msgstr ""
 
-#: src/main/connections.c:3588 src/main/connections.c:3610
+#: src/main/connections.c:3584 src/main/connections.c:3606
 msgid "cannot allocate buffer in readLines"
 msgstr ""
 
-#: src/main/connections.c:3623
+#: src/main/connections.c:3619
 #, c-format
 msgid "line %d appears to contain an embedded nul"
 msgstr ""
 
-#: src/main/connections.c:3640
+#: src/main/connections.c:3636
 #, c-format
 msgid "incomplete final line found on '%s'"
 msgstr ""
 
-#: src/main/connections.c:3646
+#: src/main/connections.c:3642
 msgid "too few lines read in readLines"
 msgstr ""
 
-#: src/main/connections.c:3749
+#: src/main/connections.c:3746
 msgid "incomplete string at end of file has been discarded"
 msgstr ""
 
-#: src/main/connections.c:3755
+#: src/main/connections.c:3752
 msgid "null terminator not found: breaking string at 10000 bytes"
 msgstr ""
 
-#: src/main/connections.c:3820
+#: src/main/connections.c:3817
 msgid "can only read from a binary connection"
 msgstr ""
 
-#: src/main/connections.c:3869 src/main/connections.c:4176
+#: src/main/connections.c:3866 src/main/connections.c:4187
 msgid "size changing is not supported for complex vectors"
 msgstr ""
 
-#: src/main/connections.c:3907 src/main/connections.c:3925
-#: src/main/connections.c:3951 src/main/connections.c:4010
-#: src/main/connections.c:4030 src/main/connections.c:4157
-#: src/main/connections.c:4170 src/main/connections.c:4229
-#: src/main/connections.c:4261
+#: src/main/connections.c:3905 src/main/connections.c:3923
+#: src/main/connections.c:3949 src/main/connections.c:3993
+#: src/main/connections.c:4024 src/main/connections.c:4044
+#: src/main/connections.c:4168 src/main/connections.c:4181
+#: src/main/connections.c:4240 src/main/connections.c:4272
 #, c-format
 msgid "size %d is unknown on this machine"
 msgstr ""
 
-#: src/main/connections.c:3936
+#: src/main/connections.c:3934
 msgid "raw is always of size 1"
 msgstr ""
 
-#: src/main/connections.c:3959
+#: src/main/connections.c:3957
 msgid "'signed = FALSE' is only valid for integers of sizes 1 and 2"
 msgstr ""
 
-#: src/main/connections.c:4060
+#: src/main/connections.c:4071
 msgid "'x' is not an atomic vector type"
 msgstr ""
 
-#: src/main/connections.c:4066
+#: src/main/connections.c:4077
 msgid "can only write to a binary connection"
 msgstr ""
 
-#: src/main/connections.c:4085
+#: src/main/connections.c:4096
 msgid "only 2^31-1 bytes can be written to a raw vector"
 msgstr ""
 
-#: src/main/connections.c:4087
+#: src/main/connections.c:4098
 msgid "only 2^31-1 bytes can be written in a single writeBin() call"
 msgstr ""
 
-#: src/main/connections.c:4136 src/main/connections.c:4289
-#: src/main/connections.c:4570 src/main/connections.c:4610
+#: src/main/connections.c:4147 src/main/connections.c:4300
+#: src/main/connections.c:4581 src/main/connections.c:4621
 msgid "problem writing to connection"
 msgstr ""
 
-#: src/main/connections.c:4181
+#: src/main/connections.c:4192
 msgid "size changing is not supported for raw vectors"
 msgstr ""
 
-#: src/main/connections.c:4324 src/main/connections.c:4328
-#: src/main/connections.c:4367
+#: src/main/connections.c:4335 src/main/connections.c:4339
+#: src/main/connections.c:4378
 msgid "invalid UTF-8 input in readChar()"
 msgstr ""
 
-#: src/main/connections.c:4434
+#: src/main/connections.c:4445
 msgid "can only read in bytes in a non-UTF-8 MBCS locale"
 msgstr ""
 
-#: src/main/connections.c:4506
+#: src/main/connections.c:4517
 msgid "'object' is too short"
 msgstr ""
 
-#: src/main/connections.c:4559
+#: src/main/connections.c:4570
 msgid "writeChar: more bytes requested than are in the string - will zero-pad"
 msgstr ""
 
-#: src/main/connections.c:4584
+#: src/main/connections.c:4595
 msgid ""
 "writeChar: more characters requested than are in the string - will zero-pad"
 msgstr ""
 
-#: src/main/connections.c:4638
+#: src/main/connections.c:4649
 msgid "maximum number of pushback lines exceeded"
 msgstr ""
 
-#: src/main/connections.c:4644 src/main/connections.c:4648
-#: src/main/connections.c:4685 src/main/connections.c:4693
+#: src/main/connections.c:4655 src/main/connections.c:4659
+#: src/main/connections.c:4696 src/main/connections.c:4704
 msgid "could not allocate space for pushback"
 msgstr ""
 
-#: src/main/connections.c:4676
+#: src/main/connections.c:4687
 msgid "can only push back on open readable connections"
 msgstr ""
 
-#: src/main/connections.c:4678
+#: src/main/connections.c:4689
 msgid "can only push back on text-mode connections"
 msgstr ""
 
-#: src/main/connections.c:4740 src/main/connections.c:4810
+#: src/main/connections.c:4753 src/main/connections.c:4823
 msgid "sink stack is full"
 msgstr ""
 
-#: src/main/connections.c:4743
+#: src/main/connections.c:4756
 msgid "cannot switch output to stdin"
 msgstr ""
 
-#: src/main/connections.c:4770
+#: src/main/connections.c:4783
 msgid "no sink to remove"
 msgstr ""
 
-#: src/main/connections.c:4892
+#: src/main/connections.c:4903
 msgid "there is no connection NA"
 msgstr ""
 
-#: src/main/connections.c:4894
+#: src/main/connections.c:4905
 #, c-format
 msgid "there is no connection %d"
 msgstr ""
 
-#: src/main/connections.c:5029
+#: src/main/connections.c:5039
+msgid "method = \"wininet\" is only supported on Windows"
+msgstr ""
+
+#: src/main/connections.c:5103
 msgid ""
 "file(\"\") only supports open = \"w+\" and open = \"w+b\": using the former"
 msgstr ""
 
-#: src/main/connections.c:5083 src/modules/internet/internet.c:115
-#: src/modules/internet/internet.c:569
-msgid "unsupported URL scheme"
+#: src/main/connections.c:5157
+msgid "URL scheme unsupported by this method"
 msgstr ""
 
-#: src/main/connections.c:5173
+#: src/main/connections.c:5253
 msgid "file stream does not have gzip magic number"
 msgstr ""
 
-#: src/main/connections.c:5184
+#: src/main/connections.c:5264
 msgid "file stream does not have valid gzip header"
 msgstr ""
 
-#: src/main/connections.c:5249
+#: src/main/connections.c:5329
 msgid "writing error whilst flushing 'gzcon' connection"
 msgstr ""
 
-#: src/main/connections.c:5351
+#: src/main/connections.c:5431
 #, c-format
 msgid "crc error %x %x\n"
 msgstr ""
 
-#: src/main/connections.c:5378
+#: src/main/connections.c:5458
 msgid "write error on 'gzcon' connection"
 msgstr ""
 
-#: src/main/connections.c:5412
+#: src/main/connections.c:5493
 msgid "'level' must be one of 0 ... 9"
 msgstr ""
 
-#: src/main/connections.c:5415
+#: src/main/connections.c:5496
 msgid "'allowNonCompression' must be TRUE or FALSE"
 msgstr ""
 
-#: src/main/connections.c:5418
+#: src/main/connections.c:5499
+msgid "'text' must be TRUE or FALSE"
+msgstr ""
+
+#: src/main/connections.c:5502
 msgid "this is already a 'gzcon' connection"
 msgstr ""
 
-#: src/main/connections.c:5424
+#: src/main/connections.c:5508
 msgid "can only use read- or write- binary connections"
 msgstr ""
 
-#: src/main/connections.c:5427
+#: src/main/connections.c:5511
 msgid "using a text-mode 'file' connection may not work correctly"
 msgstr ""
 
-#: src/main/connections.c:5430
+#: src/main/connections.c:5514
 msgid ""
 "cannot create a 'gzcon' connection from a writable textConnection; maybe use "
 "rawConnection"
 msgstr ""
 
-#: src/main/connections.c:5433 src/main/connections.c:5437
-#: src/main/connections.c:5444 src/main/connections.c:5458
+#: src/main/connections.c:5517 src/main/connections.c:5521
+#: src/main/connections.c:5528 src/main/connections.c:5542
 msgid "allocation of 'gzcon' connection failed"
 msgstr ""
 
-#: src/main/connections.c:5644
+#: src/main/connections.c:5729
 msgid "not a list of sockets"
 msgstr ""
 
-#: src/main/connections.c:5649
+#: src/main/connections.c:5734
 msgid "bad write indicators"
 msgstr ""
 
-#: src/main/connections.c:5660
+#: src/main/connections.c:5745
 msgid "not a socket connection"
 msgstr ""
 
-#: src/main/connections.c:5905
+#: src/main/connections.c:5990
 msgid "unknown compression, assuming none"
 msgstr ""
 
-#: src/main/connections.c:6023 src/main/connections.c:6027
-#: src/main/connections.c:6033
+#: src/main/connections.c:6108 src/main/connections.c:6112
+#: src/main/connections.c:6118
 #, c-format
 msgid "allocation of %s connection failed"
 msgstr ""
 
-#: src/main/context.c:282
+#: src/main/context.c:316
 msgid "no loop for break/next, jumping to top level"
 msgstr ""
 
-#: src/main/context.c:290
+#: src/main/context.c:324
 msgid "no function to return from, jumping to top level"
 msgstr ""
 
-#: src/main/context.c:302
+#: src/main/context.c:339
 msgid "target context is not on the stack"
 msgstr ""
 
-#: src/main/context.c:324 src/main/context.c:340 src/main/context.c:407
-#: src/main/context.c:428 src/main/context.c:440 src/main/context.c:452
+#: src/main/context.c:361 src/main/context.c:377 src/main/context.c:444
+#: src/main/context.c:465 src/main/context.c:477 src/main/context.c:489
 msgid "not that many frames on the stack"
 msgstr ""
 
-#: src/main/context.c:357
+#: src/main/context.c:394
 msgid "only positive values of 'n' are allowed"
 msgstr ""
 
-#: src/main/context.c:478
-msgid "no function to restart"
-msgstr ""
-
-#: src/main/context.c:515
+#: src/main/context.c:526
 msgid "number of contexts must be positive"
 msgstr ""
 
-#: src/main/context.c:528
+#: src/main/context.c:539
 msgid "no browser context to query"
 msgstr ""
 
-#: src/main/context.c:546
+#: src/main/context.c:557
 msgid "not that many calls to browser are active"
 msgstr ""
 
-#: src/main/context.c:560
+#: src/main/context.c:571
 msgid "not that many functions on the call stack"
 msgstr ""
 
-#: src/main/context.c:645
+#: src/main/context.c:656
 msgid "internal error in 'do_sys'"
 msgstr ""
 
@@ -2336,37 +2384,37 @@ msgstr ""
 msgid "integer overflow in 'cumsum'; use 'cumsum(as.numeric(.))'"
 msgstr ""
 
-#: src/main/cum.c:178
-msgid "'cummin' not defined for complex numbers"
+#: src/main/cum.c:179
+msgid "'cummax' not defined for complex numbers"
 msgstr ""
 
-#: src/main/cum.c:181
-msgid "'cummax' not defined for complex numbers"
+#: src/main/cum.c:182
+msgid "'cummin' not defined for complex numbers"
 msgstr ""
 
-#: src/main/cum.c:206 src/main/cum.c:230
+#: src/main/cum.c:209 src/main/cum.c:236
 msgid "unknown cumxxx function"
 msgstr ""
 
-#: src/main/datetime.c:548 src/main/datetime.c:556 src/main/datetime.c:570
-#: src/main/datetime.c:575
+#: src/main/datetime.c:554 src/main/datetime.c:562 src/main/datetime.c:576
+#: src/main/datetime.c:581
 msgid "problem with setting timezone"
 msgstr ""
 
-#: src/main/datetime.c:560
+#: src/main/datetime.c:566
 msgid "cannot set timezones on this system"
 msgstr ""
 
-#: src/main/datetime.c:582 src/main/datetime.c:584
+#: src/main/datetime.c:588 src/main/datetime.c:590
 msgid "problem with unsetting timezone"
 msgstr ""
 
-#: src/main/datetime.c:804 src/main/datetime.c:806 src/main/datetime.c:901
-#: src/main/datetime.c:1240 src/main/datetime.c:1242
+#: src/main/datetime.c:810 src/main/datetime.c:812 src/main/datetime.c:908
+#: src/main/datetime.c:1258 src/main/datetime.c:1260
 msgid "zero-length component in non-empty \"POSIXlt\" structure"
 msgstr ""
 
-#: src/main/dcf.c:113 src/main/dcf.c:181 src/main/dcf.c:253
+#: src/main/dcf.c:112 src/main/dcf.c:181 src/main/dcf.c:253
 msgid "could not allocate memory for 'read.dcf'"
 msgstr ""
 
@@ -2380,78 +2428,83 @@ msgstr ""
 msgid "Line starting '%s ...' is malformed!"
 msgstr ""
 
-#: src/main/debug.c:45
-msgid "argument must be a closure"
+#: src/main/debug.c:46 src/main/debug.c:76
+msgid "argument must be a function"
 msgstr ""
 
-#: src/main/debug.c:76
-msgid "argument must be a function"
+#: src/main/debug.c:111
+#, c-format
+msgid "Value for '%s' must be TRUE or FALSE"
 msgstr ""
 
-#: src/main/debug.c:132 src/main/debug.c:166 src/main/debug.c:224
+#: src/main/debug.c:139 src/main/debug.c:167 src/main/debug.c:241
 msgid "argument must not be a function"
 msgstr ""
 
-#: src/main/debug.c:135
+#: src/main/debug.c:142
 msgid "cannot trace NULL"
 msgstr ""
 
-#: src/main/debug.c:139
+#: src/main/debug.c:146
 msgid "'tracemem' is not useful for promise and environment objects"
 msgstr ""
 
-#: src/main/debug.c:142
+#: src/main/debug.c:149
 msgid "'tracemem' is not useful for weak reference or external pointer objects"
 msgstr ""
 
-#: src/main/debug.c:148 src/main/debug.c:171
+#: src/main/debug.c:180 src/main/debug.c:187
 msgid "R was not compiled with support for memory profiling"
 msgstr ""
 
-#: src/main/deparse.c:152 src/main/sprintf.c:213 src/main/sprintf.c:245
+#: src/main/deparse.c:156 src/main/sprintf.c:216 src/main/sprintf.c:248
 msgid "too few arguments"
 msgstr ""
 
-#: src/main/deparse.c:159
+#: src/main/deparse.c:163
 msgid "invalid 'cutoff' value for 'deparse', using default"
 msgstr ""
 
-#: src/main/deparse.c:247
+#: src/main/deparse.c:254
 msgid "deparse of an S4 object will not be source()able"
 msgstr ""
 
-#: src/main/deparse.c:249
+#: src/main/deparse.c:256
 msgid "deparse may be incomplete"
 msgstr ""
 
-#: src/main/deparse.c:251
+#: src/main/deparse.c:258
 msgid "deparse may be not be source()able in R < 2.7.0"
 msgstr ""
 
-#: src/main/deparse.c:369 src/main/deparse.c:461 src/main/deparse.c:467
+#: src/main/deparse.c:350 src/main/deparse.c:400 src/main/source.c:206
+msgid "'file' must be a character string or connection"
+msgstr ""
+
+#: src/main/deparse.c:378 src/main/deparse.c:473 src/main/deparse.c:479
 msgid "wrote too few characters"
 msgstr ""
 
-#: src/main/deparse.c:391
+#: src/main/deparse.c:402
 msgid "character arguments expected"
 msgstr ""
 
-#: src/main/deparse.c:394
+#: src/main/deparse.c:405
 msgid "zero-length argument"
 msgstr ""
 
-#: src/main/deparse.c:401
+#: src/main/deparse.c:412
 msgid "'opts' should be small non-negative integer"
 msgstr ""
 
-#: src/main/deparse.c:411 src/main/envir.c:1764 src/main/envir.c:1846
-#: src/main/eval.c:569 src/main/eval.c:1251 src/main/eval.c:3627
-#: src/main/saveload.c:1978 src/main/saveload.c:2309 src/main/serialize.c:2727
+#: src/main/deparse.c:422 src/main/envir.c:1898 src/main/envir.c:1983
+#: src/main/eval.c:626 src/main/eval.c:1423 src/main/eval.c:4246
+#: src/main/saveload.c:1980 src/main/saveload.c:2312 src/main/serialize.c:2773
 #, c-format
 msgid "object '%s' not found"
 msgstr ""
 
-#: src/main/deparse.c:1519
+#: src/main/deparse.c:1592
 msgid "badly formed function expression"
 msgstr ""
 
@@ -2459,246 +2512,231 @@ msgstr ""
 msgid "the base graphics system is not registered"
 msgstr ""
 
-#: src/main/devices.c:165 src/main/devices.c:172
+#: src/main/devices.c:166 src/main/devices.c:174
 msgid "no active or default device"
 msgstr ""
 
-#: src/main/devices.c:385 src/main/devices.c:447
+#: src/main/devices.c:388 src/main/devices.c:450
 msgid "too many open devices"
 msgstr ""
 
-#: src/main/devices.c:474
+#: src/main/devices.c:491
 msgid "not enough memory to allocate device (in GEcreateDevDesc)"
 msgstr ""
 
-#: src/main/devices.c:515
+#: src/main/devices.c:532
 msgid "Hit <Return> to see next plot: "
 msgstr ""
 
-#: src/main/dotcode.c:112 src/main/dotcode.c:142
+#: src/main/dotcode.c:127 src/main/dotcode.c:157
 msgid "NULL value passed as symbol address"
 msgstr ""
 
-#: src/main/dotcode.c:133
+#: src/main/dotcode.c:148
 #, c-format
 msgid "Unimplemented type %d in createRSymbolObject"
 msgstr ""
 
-#: src/main/dotcode.c:147 src/main/dotcode.c:237
+#: src/main/dotcode.c:162 src/main/dotcode.c:260
 #, c-format
 msgid "symbol '%s' is too long"
 msgstr ""
 
-#: src/main/dotcode.c:159
+#: src/main/dotcode.c:174
 msgid ""
 "first argument must be a string (of length 1) or native symbol reference"
 msgstr ""
 
-#: src/main/dotcode.c:201 src/main/dotcode.c:563
+#: src/main/dotcode.c:224 src/main/dotcode.c:1240
 msgid "too many arguments in foreign function call"
 msgstr ""
 
-#: src/main/dotcode.c:213
+#: src/main/dotcode.c:236
 msgid "PACKAGE = \"\" is invalid"
 msgstr ""
 
-#: src/main/dotcode.c:269 src/main/dotcode.c:274 src/main/dotcode.c:279
-#: src/main/dotcode.c:284
+#: src/main/dotcode.c:292 src/main/dotcode.c:297 src/main/dotcode.c:302
+#: src/main/dotcode.c:307
 #, c-format
 msgid "\"%s\" not available for %s() for package \"%s\""
 msgstr ""
 
-#: src/main/dotcode.c:289
+#: src/main/dotcode.c:312
 #, c-format
 msgid "%s symbol name \"%s\" not in DLL for package \"%s\""
 msgstr ""
 
-#: src/main/dotcode.c:294
+#: src/main/dotcode.c:317
 #, c-format
 msgid "%s symbol name \"%s\" not in load table"
 msgstr ""
 
-#: src/main/dotcode.c:348 src/main/dotcode.c:352 src/main/dotcode.c:362
-#: src/main/dotcode.c:427 src/main/dotcode.c:434
+#: src/main/dotcode.c:368 src/main/dotcode.c:370 src/main/dotcode.c:380
+#: src/main/dotcode.c:445 src/main/dotcode.c:452
 #, c-format
 msgid "'%s' used more than once"
 msgstr ""
 
-#: src/main/dotcode.c:358
+#: src/main/dotcode.c:376
 msgid "DLL name is too long"
 msgstr ""
 
-#: src/main/dotcode.c:403
+#: src/main/dotcode.c:421
 msgid "PACKAGE argument must be a single character string"
 msgstr ""
 
-#: src/main/dotcode.c:409
+#: src/main/dotcode.c:427
 msgid "PACKAGE argument is too long"
 msgstr ""
 
-#: src/main/dotcode.c:474
+#: src/main/dotcode.c:492
 msgid "no arguments supplied"
 msgstr ""
 
-#: src/main/dotcode.c:475 src/main/seq.c:913
+#: src/main/dotcode.c:493 src/main/seq.c:911
 msgid "too many arguments"
 msgstr ""
 
-#: src/main/dotcode.c:512 src/main/dotcode.c:554 src/main/dotcode.c:1397
+#: src/main/dotcode.c:530 src/main/dotcode.c:1232 src/main/dotcode.c:1420
 msgid "'.NAME' is missing"
 msgstr ""
 
-#: src/main/dotcode.c:521 src/main/dotcode.c:570 src/main/dotcode.c:1418
+#: src/main/dotcode.c:539 src/main/dotcode.c:1247 src/main/dotcode.c:1441
 #, c-format
 msgid "Incorrect number of arguments (%d), expecting %d for '%s'"
 msgstr ""
 
-#: src/main/dotcode.c:1227 src/main/dotcode.c:2276
+#: src/main/dotcode.c:1216 src/main/dotcode.c:2290
 msgid "too many arguments, sorry"
 msgstr ""
 
-#: src/main/dotcode.c:1261 src/main/dotcode.c:1278 src/main/engine.c:2993
+#: src/main/dotcode.c:1284 src/main/dotcode.c:1301 src/main/engine.c:3013
 msgid "invalid graphics state"
 msgstr ""
 
-#: src/main/dotcode.c:1357
+#: src/main/dotcode.c:1380
 msgid "NULL value for DLLInfoReference when looking for DLL"
 msgstr ""
 
-#: src/main/dotcode.c:1458
+#: src/main/dotcode.c:1481
 #, c-format
 msgid "wrong type for argument %d in call to %s"
 msgstr ""
 
-#: src/main/dotcode.c:1470
-#, c-format
-msgid ""
-"explicit request not to duplicate arguments in call to '%s', but argument %d "
-"is of the wrong type (%d != %d)"
-msgstr ""
-
-#: src/main/dotcode.c:1493
+#: src/main/dotcode.c:1510
 #, c-format
 msgid "long vectors (argument %d) are not supported in %s"
 msgstr ""
 
-#: src/main/dotcode.c:1524
+#: src/main/dotcode.c:1541
 #, c-format
 msgid "NAs in foreign function call (arg %d)"
 msgstr ""
 
-#: src/main/dotcode.c:1547
+#: src/main/dotcode.c:1564
 #, c-format
 msgid "NA/NaN/Inf in foreign function call (arg %d)"
 msgstr ""
 
-#: src/main/dotcode.c:1552
-msgid "single values not returned if not duplicated"
-msgstr ""
-
-#: src/main/dotcode.c:1578
+#: src/main/dotcode.c:1594
 #, c-format
 msgid "complex NA/NaN/Inf in foreign function call (arg %d)"
 msgstr ""
 
-#: src/main/dotcode.c:1597
-msgid "character variables must be duplicated in .C/.Fortran"
-msgstr ""
-
-#: src/main/dotcode.c:1602
+#: src/main/dotcode.c:1616
 msgid "only first string in char vector used in .Fortran"
 msgstr ""
 
-#: src/main/dotcode.c:1645 src/main/dotcode.c:1661 src/main/dotcode.c:1672
+#: src/main/dotcode.c:1659 src/main/dotcode.c:1675 src/main/dotcode.c:1686
 #, c-format
 msgid "invalid mode (%s) to pass to Fortran (arg %d)"
 msgstr ""
 
-#: src/main/dotcode.c:1666
+#: src/main/dotcode.c:1680
 #, c-format
 msgid "invalid mode (%s) to pass to C or Fortran (arg %d)"
 msgstr ""
 
-#: src/main/dotcode.c:1677
+#: src/main/dotcode.c:1691
 msgid "pairlists are passed as SEXP as from R 2.15.0"
 msgstr ""
 
-#: src/main/dotcode.c:2499
+#: src/main/dotcode.c:2510
 #, c-format
 msgid "type \"%s\" not supported in interlanguage calls"
 msgstr ""
 
-#: src/main/dotcode.c:2604
+#: src/main/dotcode.c:2615
 #, c-format
 msgid "mode '%s' is not supported in call_R"
 msgstr ""
 
-#: src/main/dounzip.c:171
+#: src/main/dounzip.c:172
 #, c-format
 msgid " not overwriting file '%s"
 msgstr ""
 
-#: src/main/dounzip.c:256
+#: src/main/dounzip.c:257
 #, c-format
 msgid "zip file '%s' cannot be opened"
 msgstr ""
 
-#: src/main/dounzip.c:312
+#: src/main/dounzip.c:313
 msgid "invalid zip name argument"
 msgstr ""
 
-#: src/main/dounzip.c:315 src/main/dounzip.c:409
+#: src/main/dounzip.c:316 src/main/dounzip.c:410
 msgid "zip path is too long"
 msgstr ""
 
-#: src/main/dounzip.c:332
+#: src/main/dounzip.c:333
 msgid "'exdir' is too long"
 msgstr ""
 
-#: src/main/dounzip.c:335
+#: src/main/dounzip.c:336
 msgid "'exdir' does not exist"
 msgstr ""
 
-#: src/main/dounzip.c:363
+#: src/main/dounzip.c:364
 msgid "requested file not found in the zip file"
 msgstr ""
 
-#: src/main/dounzip.c:366
+#: src/main/dounzip.c:367
 msgid "zip file is corrupt"
 msgstr ""
 
-#: src/main/dounzip.c:369
+#: src/main/dounzip.c:370
 msgid "CRC error in zip file"
 msgstr ""
 
-#: src/main/dounzip.c:376
+#: src/main/dounzip.c:377
 msgid "write error in extracting from zip file"
 msgstr ""
 
-#: src/main/dounzip.c:379
+#: src/main/dounzip.c:380
 #, c-format
 msgid "error %d in extracting from zip file"
 msgstr ""
 
-#: src/main/dounzip.c:404
+#: src/main/dounzip.c:405
 msgid "unz connections can only be opened for reading"
 msgstr ""
 
-#: src/main/dounzip.c:415
+#: src/main/dounzip.c:416
 msgid "invalid description of 'unz' connection"
 msgstr ""
 
-#: src/main/dounzip.c:421
+#: src/main/dounzip.c:422
 #, c-format
 msgid "cannot open zip file '%s'"
 msgstr ""
 
-#: src/main/dounzip.c:425
+#: src/main/dounzip.c:426
 #, c-format
 msgid "cannot locate file '%s' in zip file '%s'"
 msgstr ""
 
-#: src/main/dounzip.c:469
+#: src/main/dounzip.c:470
 msgid "printing not enabled for this connection"
 msgstr ""
 
@@ -2706,8 +2744,8 @@ msgstr ""
 msgid "write not enabled for this connection"
 msgstr ""
 
-#: src/main/dounzip.c:496 src/main/dounzip.c:500 src/main/dounzip.c:506
-#: src/main/dounzip.c:523
+#: src/main/dounzip.c:494 src/main/dounzip.c:498 src/main/dounzip.c:504
+#: src/main/dounzip.c:521
 msgid "allocation of 'unz' connection failed"
 msgstr ""
 
@@ -2723,7 +2761,7 @@ msgstr ""
 msgid "invalid argument to edit()"
 msgstr ""
 
-#: src/main/edit.c:121 src/main/saveload.c:2076
+#: src/main/edit.c:121 src/main/saveload.c:2078
 msgid "unable to open file"
 msgstr ""
 
@@ -2783,12 +2821,12 @@ msgid "no graphics system to unregister"
 msgstr ""
 
 #: src/main/engine.c:443 src/main/engine.c:448 src/main/engine.c:456
-#: src/main/engine.c:463 src/main/engine.c:477 src/modules/X11/devX11.c:1157
+#: src/main/engine.c:463 src/main/engine.c:477 src/modules/X11/devX11.c:1159
 msgid "invalid line end"
 msgstr ""
 
 #: src/main/engine.c:508 src/main/engine.c:513 src/main/engine.c:521
-#: src/main/engine.c:528 src/main/engine.c:542 src/modules/X11/devX11.c:1175
+#: src/main/engine.c:528 src/main/engine.c:542 src/modules/X11/devX11.c:1177
 msgid "invalid line join"
 msgstr ""
 
@@ -2817,82 +2855,96 @@ msgstr ""
 msgid "raster capture is not available for this device"
 msgstr ""
 
-#: src/main/engine.c:1656
+#: src/main/engine.c:1662
 #, c-format
 msgid "font face %d not supported for font family '%s'"
 msgstr ""
 
-#: src/main/engine.c:1972
+#: src/main/engine.c:1978
 msgid "no graphics device is active"
 msgstr ""
 
-#: src/main/engine.c:2049
+#: src/main/engine.c:2055
 #, c-format
 msgid "pch value '%d' is invalid in this locale"
 msgstr ""
 
-#: src/main/engine.c:2307
+#: src/main/engine.c:2313
 #, c-format
 msgid "unimplemented pch value '%d'"
 msgstr ""
 
-#: src/main/engine.c:2330
+#: src/main/engine.c:2336
 #, c-format
 msgid "invalid axis extents [GEPretty(.,.,n=%d)"
 msgstr ""
 
-#: src/main/engine.c:2334
+#: src/main/engine.c:2340
 #, c-format
 msgid "infinite axis extents [GEPretty(%g,%g,%d)]"
 msgstr ""
 
-#: src/main/engine.c:2371
+#: src/main/engine.c:2377
 #, c-format
 msgid " .. GEPretty(.): new *lo = %g < %g = x1"
 msgstr ""
 
-#: src/main/engine.c:2373
+#: src/main/engine.c:2379
 #, c-format
 msgid " .. GEPretty(.): new *up = %g > %g = x2"
 msgstr ""
 
-#: src/main/engine.c:2773
+#: src/main/engine.c:2784
 msgid "display list redraw incomplete"
 msgstr ""
 
-#: src/main/engine.c:2777
+#: src/main/engine.c:2788
 msgid "invalid display list"
 msgstr ""
 
-#: src/main/engine.c:2963
+#: src/main/engine.c:2900
+#, c-format
+msgid ""
+"snapshot recorded with different graphics engine version (pre 11 - this is "
+"version %d)"
+msgstr ""
+
+#: src/main/engine.c:2904
+#, c-format
+msgid ""
+"snapshot recorded with different graphics engine version (%d - this is "
+"version %d)"
+msgstr ""
+
+#: src/main/engine.c:2983
 msgid "'expr' argument must be an expression"
 msgstr ""
 
-#: src/main/engine.c:2965
+#: src/main/engine.c:2985
 msgid "'list' argument must be a list"
 msgstr ""
 
-#: src/main/engine.c:2971
+#: src/main/engine.c:2991
 msgid "'env' argument must be an environment"
 msgstr ""
 
-#: src/main/engine.c:3051 src/main/engine.c:3059
+#: src/main/engine.c:3071 src/main/engine.c:3079
 msgid "invalid multibyte char in pch=\"c\""
 msgstr ""
 
-#: src/main/engine.c:3106
+#: src/main/engine.c:3126
 msgid "invalid hex digit in 'color' or 'lty'"
 msgstr ""
 
-#: src/main/engine.c:3129
+#: src/main/engine.c:3149
 msgid "invalid line type: must be length 2, 4, 6 or 8"
 msgstr ""
 
-#: src/main/engine.c:3133
+#: src/main/engine.c:3153
 msgid "invalid line type: zeroes are not allowed"
 msgstr ""
 
-#: src/main/engine.c:3142 src/main/engine.c:3150 src/main/engine.c:3157
+#: src/main/engine.c:3162 src/main/engine.c:3170 src/main/engine.c:3177
 msgid "invalid line type"
 msgstr ""
 
@@ -2901,698 +2953,704 @@ msgstr ""
 msgid "cannot change value of locked binding for '%s'"
 msgstr ""
 
-#: src/main/envir.c:251 src/main/envir.c:1454
+#: src/main/envir.c:251 src/main/envir.c:1530
 msgid "cannot add bindings to a locked environment"
 msgstr ""
 
-#: src/main/envir.c:772
+#: src/main/envir.c:775
 msgid "invalid cached value in R_GetGlobalCache"
 msgstr ""
 
-#: src/main/envir.c:830
+#: src/main/envir.c:836
 msgid "cannot unbind in the base namespace"
 msgstr ""
 
-#: src/main/envir.c:832
+#: src/main/envir.c:838
 msgid "unbind in the base environment is unimplemented"
 msgstr ""
 
-#: src/main/envir.c:834 src/main/envir.c:1684
+#: src/main/envir.c:840 src/main/envir.c:1818
 msgid "cannot remove bindings from a locked environment"
 msgstr ""
 
-#: src/main/envir.c:1139
+#: src/main/envir.c:1213
 #, c-format
 msgid "argument to '%s' is not an environment"
 msgstr ""
 
-#: src/main/envir.c:1300
+#: src/main/envir.c:1374
 #, c-format
 msgid "the ... list does not contain %d elements"
 msgstr ""
 
-#: src/main/envir.c:1302
+#: src/main/envir.c:1376
 #, c-format
 msgid "..%d used in an incorrect context, no ... to look in"
 msgstr ""
 
-#: src/main/envir.c:1390 src/main/envir.c:1842 src/main/eval.c:573
-#: src/main/eval.c:3618
-#, c-format
-msgid "argument \"%s\" is missing, with no default"
-msgstr ""
-
-#: src/main/envir.c:1395
+#: src/main/envir.c:1469
 #, c-format
 msgid "could not find function \"%s\""
 msgstr ""
 
-#: src/main/envir.c:1418
+#: src/main/envir.c:1492
 msgid "cannot assign values in the empty environment"
 msgstr ""
 
-#: src/main/envir.c:1424 src/main/envir.c:1497
+#: src/main/envir.c:1498 src/main/envir.c:1628
 msgid "cannot assign variables to this database"
 msgstr ""
 
-#: src/main/envir.c:1580
+#: src/main/envir.c:1714
 #, c-format
 msgid "cannot add binding of '%s' to the base environment"
 msgstr ""
 
-#: src/main/envir.c:1609
+#: src/main/envir.c:1743
 msgid "only the first element is used as variable name"
 msgstr ""
 
-#: src/main/envir.c:1641
+#: src/main/envir.c:1775
 msgid "first argument must be a named list"
 msgstr ""
 
-#: src/main/envir.c:1646
+#: src/main/envir.c:1780
 msgid "names(x) must be a character vector of the same length as x"
 msgstr ""
 
-#: src/main/envir.c:1649
+#: src/main/envir.c:1783
 msgid "'envir' argument must be an environment"
 msgstr ""
 
-#: src/main/envir.c:1678
+#: src/main/envir.c:1812
 msgid "cannot remove variables from base namespace"
 msgstr ""
 
-#: src/main/envir.c:1680
+#: src/main/envir.c:1814
 msgid "cannot remove variables from the base environment"
 msgstr ""
 
-#: src/main/envir.c:1682
+#: src/main/envir.c:1816
 msgid "cannot remove variables from the empty environment"
 msgstr ""
 
-#: src/main/envir.c:1690
+#: src/main/envir.c:1824
 msgid "cannot remove variables from this database"
 msgstr ""
 
-#: src/main/envir.c:1849
+#: src/main/envir.c:1985
 #, c-format
 msgid "object '%s' of mode '%s' was not found"
 msgstr ""
 
-#: src/main/envir.c:1921
+#: src/main/envir.c:2068
 #, c-format
 msgid "invalid name in position %d"
 msgstr ""
 
-#: src/main/envir.c:1927
+#: src/main/envir.c:2074
 msgid "second argument must be an environment"
 msgstr ""
 
-#: src/main/envir.c:1935 src/main/envir.c:1943
+#: src/main/envir.c:2082 src/main/envir.c:2090
 #, c-format
 msgid "wrong length for '%s' argument"
 msgstr ""
 
-#: src/main/envir.c:2062
+#: src/main/envir.c:2221
 msgid "invalid use of 'missing'"
 msgstr ""
 
-#: src/main/envir.c:2087
+#: src/main/envir.c:2247
 msgid "'missing' can only be used for arguments"
 msgstr ""
 
-#: src/main/envir.c:2168
+#: src/main/envir.c:2333
 msgid "'pos' must be an integer"
 msgstr ""
 
-#: src/main/envir.c:2182
+#: src/main/envir.c:2347
 msgid "all elements of a list must be named"
 msgstr ""
 
-#: src/main/envir.c:2205
+#: src/main/envir.c:2370
 msgid "'attach' only works for lists, data frames and environments"
 msgstr ""
 
-#: src/main/envir.c:2288
+#: src/main/envir.c:2453
 msgid "detaching \"package:base\" is not allowed"
 msgstr ""
 
-#: src/main/envir.c:2589 src/main/envir.c:2644
+#: src/main/envir.c:2798 src/main/envir.c:2879
 msgid "argument must be an environment"
 msgstr ""
 
-#: src/main/envir.c:2648
+#: src/main/envir.c:2883
 msgid "arguments must be symbolic"
 msgstr ""
 
-#: src/main/envir.c:2772
+#: src/main/envir.c:3032
 msgid "no enclosing environment"
 msgstr ""
 
-#: src/main/envir.c:2825
+#: src/main/envir.c:3085
 #, c-format
 msgid "no item called \"%s\" on the search list"
 msgstr ""
 
-#: src/main/envir.c:2850
+#: src/main/envir.c:3110
 msgid "using 'as.environment(NULL)' is defunct"
 msgstr ""
 
-#: src/main/envir.c:2856
+#: src/main/envir.c:3116
 msgid "S4 object does not extend class \"environment\""
 msgstr ""
 
-#: src/main/envir.c:2871
+#: src/main/envir.c:3131
 msgid "invalid object for 'as.environment'"
 msgstr ""
 
-#: src/main/envir.c:2897 src/main/envir.c:2925 src/main/envir.c:2954
-#: src/main/envir.c:2975 src/main/envir.c:2998 src/main/envir.c:3033
-#: src/main/envir.c:3054
+#: src/main/envir.c:3157 src/main/envir.c:3185 src/main/envir.c:3214
+#: src/main/envir.c:3235 src/main/envir.c:3258 src/main/envir.c:3293
+#: src/main/envir.c:3314
 msgid "not an environment"
 msgstr ""
 
-#: src/main/envir.c:2949 src/main/envir.c:2970 src/main/envir.c:2991
-#: src/main/envir.c:3028 src/main/envir.c:3049 src/main/envir.c:3148
+#: src/main/envir.c:3209 src/main/envir.c:3230 src/main/envir.c:3251
+#: src/main/envir.c:3288 src/main/envir.c:3309 src/main/envir.c:3408
 msgid "not a symbol"
 msgstr ""
 
-#: src/main/envir.c:2962 src/main/envir.c:2983 src/main/envir.c:3041
-#: src/main/envir.c:3062
+#: src/main/envir.c:3222 src/main/envir.c:3243 src/main/envir.c:3301
+#: src/main/envir.c:3322
 #, c-format
 msgid "no binding for \"%s\""
 msgstr ""
 
-#: src/main/envir.c:2993
+#: src/main/envir.c:3253
 msgid "not a function"
 msgstr ""
 
-#: src/main/envir.c:3001 src/main/envir.c:3017
+#: src/main/envir.c:3261 src/main/envir.c:3277
 msgid "symbol already has a regular binding"
 msgstr ""
 
-#: src/main/envir.c:3003 src/main/envir.c:3019
+#: src/main/envir.c:3263 src/main/envir.c:3279
 msgid "cannot change active binding if binding is locked"
 msgstr ""
 
-#: src/main/envir.c:3107
+#: src/main/envir.c:3367 src/main/envir.c:3604
 msgid "unknown op"
 msgstr ""
 
-#: src/main/envir.c:3152
+#: src/main/envir.c:3412
 msgid "cannot unbind a locked binding"
 msgstr ""
 
-#: src/main/envir.c:3154
+#: src/main/envir.c:3414
 msgid "cannot unbind an active binding"
 msgstr ""
 
-#: src/main/envir.c:3289
+#: src/main/envir.c:3555
 msgid "bad namespace name"
 msgstr ""
 
-#: src/main/envir.c:3301
+#: src/main/envir.c:3567
 msgid "namespace already registered"
 msgstr ""
 
-#: src/main/envir.c:3313
+#: src/main/envir.c:3579
 msgid "namespace not registered"
 msgstr ""
 
-#: src/main/envir.c:3360
+#: src/main/envir.c:3635
 msgid "bad import environment argument"
 msgstr ""
 
-#: src/main/envir.c:3365
+#: src/main/envir.c:3640
 msgid "bad export environment argument"
 msgstr ""
 
-#: src/main/envir.c:3369
+#: src/main/envir.c:3644
 msgid "length of import and export names must match"
 msgstr ""
 
-#: src/main/envir.c:3392
+#: src/main/envir.c:3667
 #, c-format
 msgid "exported symbol '%s' has no value"
 msgstr ""
 
-#: src/main/envir.c:3557
+#: src/main/envir.c:3833
 #, c-format
 msgid "unknown encoding: %d"
 msgstr ""
 
-#: src/main/envir.c:3577
+#: src/main/envir.c:3853
 #, c-format
 msgid "embedded nul in string: '%s'"
 msgstr ""
 
-#: src/main/errors.c:178 src/main/errors.c:215
+#: src/main/errors.c:163 src/main/errors.c:200
 msgid "interrupts suspended; signal ignored"
 msgstr ""
 
-#: src/main/errors.c:318
+#: src/main/errors.c:250
+msgid "[... truncated]"
+msgstr ""
+
+#: src/main/errors.c:310
 msgid "invalid option \"warning.expression\""
 msgstr ""
 
-#: src/main/errors.c:348
+#: src/main/errors.c:339
 #, c-format
 msgid "(converted from warning) %s"
 msgstr ""
 
-#: src/main/errors.c:359
-#, c-format
-msgid "Warning: %s\n"
+#: src/main/errors.c:349
+msgid "Warning:"
 msgstr ""
 
-#: src/main/errors.c:363
+#: src/main/errors.c:351
 #, c-format
-msgid "Warning in %s : %s\n"
+msgid "Warning in %s :"
 msgstr ""
 
-#: src/main/errors.c:365
-#, c-format
-msgid ""
-"Warning in %s :\n"
-"  %s\n"
+#: src/main/errors.c:360 src/main/errors.c:374 src/main/errors.c:687
+msgid "Calls:"
 msgstr ""
 
-#: src/main/errors.c:428 src/main/errors.c:447 src/main/errors.c:596
+#: src/main/errors.c:421 src/main/errors.c:440 src/main/errors.c:602
 msgid "Lost warning messages\n"
 msgstr ""
 
-#: src/main/errors.c:459
-msgid "Warning message:\n"
-msgid_plural "Warning messages:\n"
+#: src/main/errors.c:452
+msgid "Warning message:"
+msgid_plural "Warning messages:"
 msgstr[0] ""
 msgstr[1] ""
 
-#: src/main/errors.c:514
+#: src/main/errors.c:462 src/main/errors.c:490
 #, c-format
-msgid "There were %d warnings (use warnings() to see them)\n"
+msgid "In %s :"
 msgstr ""
 
-#: src/main/errors.c:517
+#: src/main/errors.c:515
 #, c-format
-msgid "There were %d or more warnings (use warnings() to see the first %d)\n"
+msgid "There was %d warning (use warnings() to see it)"
+msgid_plural "There were %d warnings (use warnings() to see them)"
+msgstr[0] ""
+msgstr[1] ""
+
+#: src/main/errors.c:520
+#, c-format
+msgid "There were %d or more warnings (use warnings() to see the first %d)"
 msgstr ""
 
-#: src/main/errors.c:587
+#: src/main/errors.c:593
 msgid "Error during wrapup: "
 msgstr ""
 
-#: src/main/errors.c:612
+#: src/main/errors.c:618
 msgid "Error in "
 msgstr ""
 
-#: src/main/errors.c:613
+#: src/main/errors.c:640 src/main/errors.c:647
 #, c-format
-msgid " (from %s) : "
+msgid "Error in %s (from %s) : "
 msgstr ""
 
-#: src/main/errors.c:664 src/main/errors.c:670
+#: src/main/errors.c:649
+#, c-format
+msgid "Error in %s : "
+msgstr ""
+
+#: src/main/errors.c:669 src/main/errors.c:675
 #, c-format
 msgid "Error: "
 msgstr ""
 
-#: src/main/errors.c:690 src/main/errors.c:1319
+#: src/main/errors.c:696 src/main/errors.c:1300
 msgid "In addition: "
 msgstr ""
 
-#: src/main/errors.c:811
+#: src/main/errors.c:818
 msgid "invalid option \"error\"\n"
 msgstr ""
 
-#: src/main/errors.c:893
-msgid "Execution halted\n"
-msgstr ""
-
-#: src/main/errors.c:1032
-msgid "'msg1' must be a character string"
-msgstr ""
-
-#: src/main/errors.c:1034
-msgid "'msg2' must be a character string"
+#: src/main/errors.c:1013 src/main/errors.c:1015 src/main/options.c:339
+#: src/main/unique.c:1638
+#, c-format
+msgid "'%s' must be a character string"
 msgstr ""
 
-#: src/main/errors.c:1131
+#: src/main/errors.c:1116
 msgid " [invalid string in stop(.)]"
 msgstr ""
 
-#: src/main/errors.c:1162
+#: src/main/errors.c:1148
 msgid " [invalid string in warning(.)]"
 msgstr ""
 
-#: src/main/errors.c:1178
+#: src/main/errors.c:1164
 #, c-format
 msgid "incorrect number of arguments to \"%s\""
 msgstr ""
 
-#: src/main/errors.c:1184 src/main/errors.c:1199
+#: src/main/errors.c:1170 src/main/errors.c:1185
 #, c-format
 msgid "unimplemented feature in %s"
 msgstr ""
 
-#: src/main/errors.c:1193
+#: src/main/errors.c:1179
 msgid "invalid number of arguments"
 msgstr ""
 
-#: src/main/errors.c:1194 src/main/logic.c:189
+#: src/main/errors.c:1180 src/main/logic.c:181
 msgid "invalid argument type"
 msgstr ""
 
-#: src/main/errors.c:1196
+#: src/main/errors.c:1182
 msgid "time-series/vector length mismatch"
 msgstr ""
 
-#: src/main/errors.c:1197
+#: src/main/errors.c:1183
 msgid "incompatible arguments"
 msgstr ""
 
-#: src/main/errors.c:1200
+#: src/main/errors.c:1186
 msgid "unknown error (report this!)"
 msgstr ""
 
-#: src/main/errors.c:1212
+#: src/main/errors.c:1195
+msgid "inaccurate integer conversion in coercion"
+msgstr ""
+
+#: src/main/errors.c:1198
 msgid "unknown warning (report this!)"
 msgstr ""
 
-#: src/main/errors.c:1283
+#: src/main/errors.c:1269
 msgid "No function to return from, jumping to top level"
 msgstr ""
 
-#: src/main/errors.c:1299
+#: src/main/errors.c:1285
 msgid "top level inconsistency?"
 msgstr ""
 
-#: src/main/errors.c:1478
+#: src/main/errors.c:1459
 msgid "bad handler data"
 msgstr ""
 
-#: src/main/errors.c:1628
+#: src/main/errors.c:1613
 msgid "error message not a string"
 msgstr ""
 
-#: src/main/errors.c:1703
+#: src/main/errors.c:1688
 msgid "handler or restart stack mismatch in old restart"
 msgstr ""
 
-#: src/main/errors.c:1729 src/main/errors.c:1745
+#: src/main/errors.c:1714 src/main/errors.c:1730
 msgid "bad error message"
 msgstr ""
 
-#: src/main/errors.c:1787
+#: src/main/errors.c:1771
 msgid "bad restart"
 msgstr ""
 
-#: src/main/errors.c:1819
+#: src/main/errors.c:1803
 msgid "restart not on stack"
 msgstr ""
 
-#: src/main/errors.c:1836
+#: src/main/errors.c:1819
 msgid "not in a try context"
 msgstr ""
 
-#: src/main/errors.c:1849
+#: src/main/errors.c:1832
 msgid "error message must be a character string"
 msgstr ""
 
-#: src/main/eval.c:308
+#: src/main/eval.c:365
 #, c-format
 msgid "source files skipped by Rprof; please increase '%s'"
 msgstr ""
 
-#: src/main/eval.c:328
+#: src/main/eval.c:385
 #, c-format
 msgid "Rprof: cannot open profile file '%s'"
 msgstr ""
 
-#: src/main/eval.c:422
+#: src/main/eval.c:479
 msgid "R profiling is not available on this system"
 msgstr ""
 
-#: src/main/eval.c:446
+#: src/main/eval.c:503
 msgid ""
 "promise already under evaluation: recursive default argument reference or "
 "earlier problems?"
 msgstr ""
 
-#: src/main/eval.c:448
+#: src/main/eval.c:505
 msgid "restarting interrupted promise evaluation"
 msgstr ""
 
-#: src/main/eval.c:544
+#: src/main/eval.c:601
 msgid ""
 "evaluation nested too deeply: infinite recursion / options(expressions=)?"
 msgstr ""
 
-#: src/main/eval.c:575 src/main/eval.c:3619
+#: src/main/eval.c:632 src/main/eval.c:4238
 msgid "argument is missing, with no default"
 msgstr ""
 
-#: src/main/eval.c:679 src/main/eval.c:4642
+#: src/main/eval.c:736 src/main/eval.c:1306 src/main/eval.c:5533
 msgid "attempt to apply non-function"
 msgstr ""
 
-#: src/main/eval.c:702
+#: src/main/eval.c:759
 #, c-format
 msgid "%s at %s#%d: "
 msgstr ""
 
-#: src/main/eval.c:1178
+#: src/main/eval.c:1298 src/main/eval.c:2271
+#, c-format
+msgid "argument %d is empty"
+msgstr ""
+
+#: src/main/eval.c:1350
 #, c-format
 msgid "could not find symbol \"%s\" in environment of the generic function"
 msgstr ""
 
-#: src/main/eval.c:1196
+#: src/main/eval.c:1368
 #, c-format
 msgid "symbol \"%s\" not in environment of method"
 msgstr ""
 
-#: src/main/eval.c:1308
+#: src/main/eval.c:1481
 msgid "the condition has length > 1 and only the first element will be used"
 msgstr ""
 
-#: src/main/eval.c:1325
+#: src/main/eval.c:1500
 msgid "missing value where TRUE/FALSE needed"
 msgstr ""
 
-#: src/main/eval.c:1326
+#: src/main/eval.c:1501
 msgid "argument is not interpretable as logical"
 msgstr ""
 
-#: src/main/eval.c:1327
+#: src/main/eval.c:1502
 msgid "argument is of length zero"
 msgstr ""
 
-#: src/main/eval.c:1418
+#: src/main/eval.c:1596
 msgid "non-symbol loop variable"
 msgstr ""
 
-#: src/main/eval.c:1510 src/main/eval.c:4408
+#: src/main/eval.c:1687 src/main/eval.c:5301
 msgid "invalid for() loop sequence"
 msgstr ""
 
-#: src/main/eval.c:1652
+#: src/main/eval.c:1826
 msgid "multi-argument returns are not permitted"
 msgstr ""
 
-#: src/main/eval.c:1701
+#: src/main/eval.c:1873
 msgid "invalid (NULL) left side of assignment"
 msgstr ""
 
-#: src/main/eval.c:1734
+#: src/main/eval.c:1907
 msgid "target of assignment expands to non-language object"
 msgstr ""
 
-#: src/main/eval.c:1817
+#: src/main/eval.c:1990
 #, c-format
 msgid "overlong name in '%s'"
 msgstr ""
 
-#: src/main/eval.c:1915
+#: src/main/eval.c:2080
 msgid "cannot do complex assignments in base namespace"
 msgstr ""
 
-#: src/main/eval.c:1917
+#: src/main/eval.c:2082
 msgid "cannot do complex assignments in base environment"
 msgstr ""
 
-#: src/main/eval.c:1954 src/main/eval.c:1981
+#: src/main/eval.c:2121 src/main/eval.c:2148
 msgid "invalid function in complex assignment"
 msgstr ""
 
-#: src/main/eval.c:2041
+#: src/main/eval.c:2208
 msgid "invalid (do_set) left-hand side to assignment"
 msgstr ""
 
-#: src/main/eval.c:2103
-#, c-format
-msgid "argument %d is empty"
-msgstr ""
-
-#: src/main/eval.c:2116
+#: src/main/eval.c:2284
 #, c-format
 msgid "'%s' is missing"
 msgstr ""
 
-#: src/main/eval.c:2267
+#: src/main/eval.c:2439
 msgid "invalid formal argument list for \"function\""
 msgstr ""
 
-#: src/main/eval.c:2325 src/main/eval.c:2356 src/main/eval.c:2361
+#: src/main/eval.c:2497 src/main/eval.c:2528 src/main/eval.c:2533
 #, c-format
 msgid "invalid '%s' argument of type '%s'"
 msgstr ""
 
-#: src/main/eval.c:2353
+#: src/main/eval.c:2525
 msgid "numeric 'envir' arg not of length one"
 msgstr ""
 
-#: src/main/eval.c:2377 src/main/eval.c:2399
+#: src/main/eval.c:2549 src/main/eval.c:2573
 msgid "restarts not supported in 'eval'"
 msgstr ""
 
-#: src/main/eval.c:2456 src/main/eval.c:2469
+#: src/main/eval.c:2632 src/main/eval.c:2645
 msgid "'Recall' called from outside a closure"
 msgstr ""
 
-#: src/main/eval.c:2562
+#: src/main/eval.c:2738
 msgid "value in '...' is not a promise"
 msgstr ""
 
-#: src/main/eval.c:2754 src/main/objects.c:720
-#, c-format
-msgid "call name too long in '%s'"
-msgstr ""
-
-#: src/main/eval.c:2775
-#, c-format
-msgid "generic name too long in '%s'"
-msgstr ""
-
-#: src/main/eval.c:2840
+#: src/main/eval.c:2999
 #, c-format
 msgid "Incompatible methods (\"%s\", \"%s\") for \"%s\""
 msgstr ""
 
-#: src/main/eval.c:2906
+#: src/main/eval.c:3048
 msgid "dispatch error in group dispatch"
 msgstr ""
 
-#: src/main/eval.c:3201
+#: src/main/eval.c:3532
 #, c-format
 msgid "\"%s\" is not a %s function"
 msgstr ""
 
-#: src/main/eval.c:3430
+#: src/main/eval.c:4047
 msgid "node stack overflow"
 msgstr ""
 
-#: src/main/eval.c:3436
+#: src/main/eval.c:4053
 msgid "integer stack overflow"
 msgstr ""
 
-#: src/main/eval.c:3490
+#: src/main/eval.c:4107
 msgid "bad opcode"
 msgstr ""
 
-#: src/main/eval.c:4219
+#: src/main/eval.c:5083
 #, c-format
 msgid "invalid %s type in 'x %s y'"
 msgstr ""
 
-#: src/main/eval.c:4310
+#: src/main/eval.c:5195
 msgid "bytecode version mismatch; using eval"
 msgstr ""
 
-#: src/main/eval.c:4315
+#: src/main/eval.c:5200
 msgid "bytecode version is too old"
 msgstr ""
 
-#: src/main/eval.c:4316
+#: src/main/eval.c:5201
 msgid "bytecode version is too new"
 msgstr ""
 
-#: src/main/eval.c:4350
+#: src/main/eval.c:5235
 msgid "byte code version mismatch"
 msgstr ""
 
-#: src/main/eval.c:4477
+#: src/main/eval.c:5383
 msgid "invalid sequence argument in for loop"
 msgstr ""
 
-#: src/main/eval.c:4624 src/main/names.c:1181
+#: src/main/eval.c:5522 src/main/names.c:1312
 #, c-format
 msgid "there is no .Internal function '%s'"
 msgstr ""
 
-#: src/main/eval.c:4731 src/main/eval.c:5077 src/main/eval.c:5119
+#: src/main/eval.c:5622 src/main/eval.c:5968 src/main/eval.c:6008
 msgid "bad function"
 msgstr ""
 
-#: src/main/eval.c:4746
+#: src/main/eval.c:5635
 msgid "not a BUILTIN function"
 msgstr ""
 
-#: src/main/eval.c:5159
+#: src/main/eval.c:6066
+msgid "bad numeric 'switch' offsets"
+msgstr ""
+
+#: src/main/eval.c:6072
 msgid "numeric EXPR required for 'switch' without named alternatives"
 msgstr ""
 
-#: src/main/eval.c:5255
+#: src/main/eval.c:6076
+msgid "bad character 'switch' offsets"
+msgstr ""
+
+#: src/main/eval.c:6188
 msgid "cannot find index for threaded code address"
 msgstr ""
 
-#: src/main/eval.c:5315
+#: src/main/eval.c:6248
 msgid "invalid body"
 msgstr ""
 
-#: src/main/eval.c:5335
+#: src/main/eval.c:6268
 msgid "invalid symbol"
 msgstr ""
 
-#: src/main/eval.c:5379
+#: src/main/eval.c:6312
 msgid "argument is not a byte code object"
 msgstr ""
 
-#: src/main/eval.c:5400
+#: src/main/eval.c:6334
 msgid "bad file name"
 msgstr ""
 
-#: src/main/eval.c:5404 src/main/eval.c:5425
+#: src/main/eval.c:6338 src/main/eval.c:6359
 msgid "unable to open 'file'"
 msgstr ""
 
-#: src/main/eval.c:5419 src/main/saveload.c:1942
+#: src/main/eval.c:6353 src/main/saveload.c:1944
 msgid "'file' must be non-empty string"
 msgstr ""
 
-#: src/main/eval.c:5421 src/main/saveload.c:1944 src/main/saveload.c:2244
-#: src/main/serialize.c:2149
+#: src/main/eval.c:6355 src/main/saveload.c:1946 src/main/saveload.c:2246
+#: src/main/serialize.c:2189
 msgid "'ascii' must be logical"
 msgstr ""
 
-#: src/main/eval.c:5492 src/main/eval.c:5511 src/main/eval.c:5541
+#: src/main/eval.c:6426 src/main/eval.c:6445 src/main/eval.c:6475
 msgid "constant buffer must be a generic vector"
 msgstr ""
 
-#: src/main/eval.c:5543
+#: src/main/eval.c:6477
 msgid "bad constant count"
 msgstr ""
 
-#: src/main/eval.c:5579
+#: src/main/eval.c:6515
 msgid "profile timer in use"
 msgstr ""
 
-#: src/main/eval.c:5581
+#: src/main/eval.c:6517
 msgid "already byte code profiling"
 msgstr ""
 
-#: src/main/eval.c:5599
+#: src/main/eval.c:6535
 msgid "setting profile timer failed"
 msgstr ""
 
-#: src/main/eval.c:5616
+#: src/main/eval.c:6553
 msgid "not byte code profiling"
 msgstr ""
 
+#: src/main/eval.c:6569 src/main/eval.c:6573 src/main/eval.c:6577
+msgid "byte code profiling is not supported in this build"
+msgstr ""
+
 #: src/main/gevents.c:43
 #, c-format
 msgid "'%s' events not supported in this device"
@@ -3606,26 +3664,26 @@ msgstr ""
 msgid "this graphics device does not support event handling"
 msgstr ""
 
-#: src/main/gevents.c:136
+#: src/main/gevents.c:135
 msgid "invalid prompt"
 msgstr ""
 
-#: src/main/gevents.c:148
+#: src/main/gevents.c:146
 msgid "recursive use of 'getGraphicsEvent' not supported"
 msgstr ""
 
-#: src/main/gevents.c:158
+#: src/main/gevents.c:157
 msgid "no graphics event handlers set"
 msgstr ""
 
-#: src/main/gram.y:222 src/main/gram.y:237 src/main/gram.y:2222
-#: src/main/gram.y:2236
+#: src/main/gram.y:222 src/main/gram.y:237 src/main/gram.y:2245
+#: src/main/gram.y:2259
 #, c-format
 msgid "EOF whilst reading MBCS char at line %d"
 msgstr ""
 
-#: src/main/gram.y:226 src/main/gram.y:234 src/main/gram.y:2226
-#: src/main/gram.y:2233
+#: src/main/gram.y:226 src/main/gram.y:234 src/main/gram.y:2249
+#: src/main/gram.y:2256
 #, c-format
 msgid "invalid multibyte character in parser at line %d"
 msgstr ""
@@ -3640,126 +3698,139 @@ msgstr ""
 msgid "incorrect tag type at line %d"
 msgstr ""
 
-#: src/main/gram.y:1653
+#: src/main/gram.y:1657
 msgid "contextstack overflow"
 msgstr ""
 
-#: src/main/gram.y:1890
-msgid "input"
+#: src/main/gram.y:1907 src/main/gram.y:1913
+#, c-format
+msgid "unexpected input"
 msgstr ""
 
-#: src/main/gram.y:1891
-msgid "end of input"
+#: src/main/gram.y:1910 src/main/main.c:311
+#, c-format
+msgid "unexpected end of input"
 msgstr ""
 
-#: src/main/gram.y:1892
-msgid "string constant"
+#: src/main/gram.y:1916
+#, c-format
+msgid "unexpected string constant"
 msgstr ""
 
-#: src/main/gram.y:1893
-msgid "numeric constant"
+#: src/main/gram.y:1919
+#, c-format
+msgid "unexpected numeric constant"
 msgstr ""
 
-#: src/main/gram.y:1894
-msgid "symbol"
+#: src/main/gram.y:1922
+#, c-format
+msgid "unexpected symbol"
 msgstr ""
 
-#: src/main/gram.y:1895
-msgid "assignment"
+#: src/main/gram.y:1925
+#, c-format
+msgid "unexpected assignment"
 msgstr ""
 
-#: src/main/gram.y:1896
-msgid "end of line"
+#: src/main/gram.y:1928
+#, c-format
+msgid "unexpected end of line"
 msgstr ""
 
-#: src/main/gram.y:1910 src/main/gram.y:1916
+#: src/main/gram.y:1931 src/main/gram.y:1939
 #, c-format
 msgid "unexpected %s"
 msgstr ""
 
-#: src/main/gram.y:1926
+#: src/main/gram.y:1951
 #, c-format
 msgid "repeated formal argument '%s' on line %d"
 msgstr ""
 
-#: src/main/gram.y:2136
+#: src/main/gram.y:2161
 #, c-format
 msgid "integer literal %s contains decimal; using numeric value"
 msgstr ""
 
-#: src/main/gram.y:2140
+#: src/main/gram.y:2164
 #, c-format
 msgid "non-integer value %s qualified with L; using numeric value"
 msgstr ""
 
-#: src/main/gram.y:2153
+#: src/main/gram.y:2176
 #, c-format
 msgid "integer literal %s contains unnecessary decimal point"
 msgstr ""
 
-#: src/main/gram.y:2185
+#: src/main/gram.y:2208
 #, c-format
 msgid "unable to allocate buffer for long string at line %d"
 msgstr ""
 
-#: src/main/gram.y:2338
+#: src/main/gram.y:2347 src/main/gram.y:2370 src/main/gram.y:2407
+#: src/main/gram.y:2443
+#, c-format
+msgid "nul character not allowed (line %d)"
+msgstr ""
+
+#: src/main/gram.y:2363
 #, c-format
 msgid "'\\x' used without hex digits in character string starting \"%s\""
 msgstr ""
 
-#: src/main/gram.y:2352
+#: src/main/gram.y:2379
 #, c-format
 msgid "\\uxxxx sequences not supported inside backticks (line %d)"
 msgstr ""
 
-#: src/main/gram.y:2367
+#: src/main/gram.y:2394
 #, c-format
 msgid "'\\u' used without hex digits in character string starting \"%s\""
 msgstr ""
 
-#: src/main/gram.y:2375
+#: src/main/gram.y:2402
 #, c-format
 msgid "invalid \\u{xxxx} sequence (line %d)"
 msgstr ""
 
-#: src/main/gram.y:2387
+#: src/main/gram.y:2416
 #, c-format
 msgid "\\Uxxxxxxxx sequences not supported inside backticks (line %d)"
 msgstr ""
 
-#: src/main/gram.y:2402
+#: src/main/gram.y:2431
 #, c-format
 msgid "'\\U' used without hex digits in character string starting \"%s\""
 msgstr ""
 
-#: src/main/gram.y:2410
+#: src/main/gram.y:2439
 #, c-format
 msgid "invalid \\U{xxxxxxxx} sequence (line %d)"
 msgstr ""
 
-#: src/main/gram.y:2451
+#: src/main/gram.y:2482
 #, c-format
 msgid "'\\%c' is an unrecognized escape in character string starting \"%s\""
 msgstr ""
 
-#: src/main/gram.y:2510
+#: src/main/gram.y:2546
 msgid "mixing Unicode and octal/hex escapes in a string is not allowed"
 msgstr ""
 
-#: src/main/gram.y:2514
+#: src/main/gram.y:2550
 #, c-format
 msgid ""
 "string at line %d containing Unicode escapes not in this locale\n"
 "is too long (max 10000 chars)"
 msgstr ""
 
-#: src/main/gram.y:3112 src/main/gram.y:3119 src/main/gram.y:3125
-#: src/main/gram.y:3132
+#: src/main/gram.y:3148 src/main/gram.y:3155 src/main/gram.y:3161
+#: src/main/gram.y:3168
 #, c-format
 msgid "contextstack overflow at line %d"
 msgstr ""
 
-#: src/main/gram.y:3227
+#: src/main/gram.y:3263
 #, c-format
 msgid "internal parser error at line %d"
 msgstr ""
@@ -3769,34 +3840,34 @@ msgstr ""
 msgid "relative range of values =%4.0f * EPS, is small (axis %d)"
 msgstr ""
 
-#: src/main/grep.c:93
+#: src/main/grep.c:96
 #, c-format
 msgid "invalid regular expression '%s', reason '%s'"
 msgstr ""
 
-#: src/main/grep.c:95
+#: src/main/grep.c:98
 #, c-format
 msgid "invalid regular expression, reason '%s'"
 msgstr ""
 
-#: src/main/grep.c:220 src/main/grep.c:308 src/main/grep.c:416
-#: src/main/grep.c:883 src/main/grep.c:2473
+#: src/main/grep.c:225 src/main/grep.c:315 src/main/grep.c:426
+#: src/main/grep.c:900 src/main/grep.c:2502
 #, c-format
 msgid "input string %d is invalid UTF-8"
 msgstr ""
 
-#: src/main/grep.c:286 src/main/grep.c:383
+#: src/main/grep.c:292 src/main/grep.c:391
 #, c-format
 msgid "'split' string %d is invalid UTF-8"
 msgstr ""
 
-#: src/main/grep.c:290 src/main/grep.c:387 src/main/grep.c:560
+#: src/main/grep.c:296 src/main/grep.c:395 src/main/grep.c:571
 #, c-format
 msgid "'split' string %d is invalid in this locale"
 msgstr ""
 
-#: src/main/grep.c:395 src/main/grep.c:851 src/main/grep.c:1600
-#: src/main/grep.c:2394
+#: src/main/grep.c:404 src/main/grep.c:867 src/main/grep.c:1621
+#: src/main/grep.c:2419
 #, c-format
 msgid ""
 "PCRE pattern compilation error\n"
@@ -3804,58 +3875,58 @@ msgid ""
 "\tat '%s'\n"
 msgstr ""
 
-#: src/main/grep.c:397
+#: src/main/grep.c:406
 #, c-format
 msgid "invalid split pattern '%s'"
 msgstr ""
 
-#: src/main/grep.c:401 src/main/grep.c:857 src/main/grep.c:1607
-#: src/main/grep.c:2401
+#: src/main/grep.c:410 src/main/grep.c:873 src/main/grep.c:1628
+#: src/main/grep.c:2426
 #, c-format
 msgid ""
 "PCRE pattern study error\n"
 "\t'%s'\n"
 msgstr ""
 
-#: src/main/grep.c:834 src/main/grep.c:2377
+#: src/main/grep.c:849 src/main/grep.c:2401
 msgid "regular expression is invalid UTF-8"
 msgstr ""
 
-#: src/main/grep.c:853 src/main/grep.c:1602 src/main/grep.c:2396
+#: src/main/grep.c:869 src/main/grep.c:1623 src/main/grep.c:2421
 #, c-format
 msgid "invalid regular expression '%s'"
 msgstr ""
 
-#: src/main/grep.c:1264
+#: src/main/grep.c:1282
 msgid "pattern matches an empty string infinitely, returning first match only"
 msgstr ""
 
-#: src/main/grep.c:1575
+#: src/main/grep.c:1595
 msgid "'pattern' is invalid UTF-8"
 msgstr ""
 
-#: src/main/grep.c:1577
+#: src/main/grep.c:1597
 msgid "'replacement' is invalid UTF-8"
 msgstr ""
 
-#: src/main/grep.c:1581
+#: src/main/grep.c:1601
 msgid "'pattern' is invalid in this locale"
 msgstr ""
 
-#: src/main/grep.c:1584
+#: src/main/grep.c:1604
 msgid "'replacement' is invalid in this locale"
 msgstr ""
 
-#: src/main/grep.c:1589
+#: src/main/grep.c:1609
 msgid "zero-length pattern"
 msgstr ""
 
-#: src/main/grep.c:1732 src/main/grep.c:1748 src/main/grep.c:1796
-#: src/main/grep.c:1812 src/main/grep.c:1859 src/main/grep.c:1875
+#: src/main/grep.c:1753 src/main/grep.c:1769 src/main/grep.c:1817
+#: src/main/grep.c:1833 src/main/grep.c:1880 src/main/grep.c:1896
 msgid "result string is too long"
 msgstr ""
 
-#: src/main/grep.c:2411
+#: src/main/grep.c:2436
 #, c-format
 msgid "'pcre_fullinfo' returned '%d' "
 msgstr ""
@@ -3864,31 +3935,26 @@ msgstr ""
 msgid "ignoring non-pairlist attributes"
 msgstr ""
 
-#: src/main/internet.c:92
+#: src/main/internet.c:83
 msgid "internet routines cannot be accessed in module"
 msgstr ""
 
-#: src/main/internet.c:103 src/main/internet.c:141 src/main/internet.c:154
-#: src/main/internet.c:165 src/main/internet.c:176 src/main/internet.c:187
-#: src/main/internet.c:196 src/main/internet.c:207 src/main/internet.c:218
-#: src/main/internet.c:227 src/main/internet.c:237
+#: src/main/internet.c:94 src/main/internet.c:106 src/main/internet.c:119
+#: src/main/internet.c:130 src/main/internet.c:141 src/main/internet.c:152
+#: src/main/internet.c:161 src/main/internet.c:172 src/main/internet.c:183
+#: src/main/internet.c:192 src/main/internet.c:202 src/main/internet.c:318
+#: src/main/internet.c:330 src/main/internet.c:342 src/main/internet.c:354
 msgid "internet routines cannot be loaded"
 msgstr ""
 
-#: src/main/internet.c:118 src/main/memory.c:3434 src/main/memory.c:3444
-#: src/main/memory.c:3456 src/main/memory.c:3470 src/main/memory.c:3487
-#: src/main/memory.c:3505
-msgid "bad value"
-msgstr ""
-
-#: src/main/internet.c:124
-msgid "internet routines were already initialized"
+#: src/main/internet.c:216 src/main/internet.c:230 src/main/internet.c:247
+#: src/main/internet.c:259 src/main/internet.c:273 src/main/internet.c:293
+#: src/main/internet.c:306
+msgid "socket routines cannot be loaded"
 msgstr ""
 
-#: src/main/internet.c:251 src/main/internet.c:265 src/main/internet.c:281
-#: src/main/internet.c:293 src/main/internet.c:307 src/main/internet.c:327
-#: src/main/internet.c:340
-msgid "socket routines cannot be loaded"
+#: src/main/internet.c:242
+msgid "attempt to close invalid socket"
 msgstr ""
 
 #: src/main/lapack.c:39
@@ -3899,42 +3965,38 @@ msgstr ""
 msgid "LAPACK routines cannot be loaded"
 msgstr ""
 
-#: src/main/logic.c:70
-msgid "binary operations require two arguments"
-msgstr ""
-
-#: src/main/logic.c:88 src/main/logic.c:150
+#: src/main/logic.c:80 src/main/logic.c:142
 msgid "operations are possible only for numeric, logical or complex types"
 msgstr ""
 
-#: src/main/logic.c:98
+#: src/main/logic.c:90
 msgid "binary operation on non-conformable arrays"
 msgstr ""
 
-#: src/main/logic.c:124 src/main/relop.c:247
+#: src/main/logic.c:116 src/main/relop.c:241
 msgid "non-conformable time series"
 msgstr ""
 
-#: src/main/logic.c:254
+#: src/main/logic.c:247
 #, c-format
 msgid "'%s' operator requires 2 arguments"
 msgstr ""
 
-#: src/main/logic.c:261
+#: src/main/logic.c:254
 #, c-format
 msgid "invalid 'x' type in 'x %s y'"
 msgstr ""
 
-#: src/main/logic.c:268
+#: src/main/logic.c:261
 #, c-format
 msgid "invalid 'y' type in 'x %s y'"
 msgstr ""
 
-#: src/main/logic.c:341
+#: src/main/logic.c:334
 msgid "Unary operator `!' called with two arguments"
 msgstr ""
 
-#: src/main/logic.c:448
+#: src/main/logic.c:439
 #, c-format
 msgid "coercing argument of type '%s' to logical"
 msgstr ""
@@ -3943,61 +4005,73 @@ msgstr ""
 msgid "dummy - do not translate"
 msgstr ""
 
-#: src/main/main.c:476
+#: src/main/main.c:329
+msgid "error during cleanup\n"
+msgstr ""
+
+#: src/main/main.c:336
+msgid "Execution halted\n"
+msgstr ""
+
+#: src/main/main.c:505
 msgid "Error: segfault from C stack overflow\n"
 msgstr ""
 
-#: src/main/main.c:846
+#: src/main/main.c:888
 msgid "unable to open the base package\n"
 msgstr ""
 
-#: src/main/main.c:924
+#: src/main/main.c:971
 #, c-format
 msgid "unable to restore saved data in %s\n"
 msgstr ""
 
-#: src/main/main.c:971
+#: src/main/main.c:1020
 msgid "During startup - "
 msgstr ""
 
-#: src/main/main.c:1224
+#: src/main/main.c:1036
+msgid "unable to initialize the JIT\n"
+msgstr ""
+
+#: src/main/main.c:1290
 msgid "cannot quit from browser"
 msgstr ""
 
-#: src/main/main.c:1228
+#: src/main/main.c:1294
 msgid "one of \"yes\", \"no\", \"ask\" or \"default\" expected."
 msgstr ""
 
-#: src/main/main.c:1233
+#: src/main/main.c:1299
 msgid "save=\"ask\" in non-interactive use: command-line default will be used"
 msgstr ""
 
-#: src/main/main.c:1241
+#: src/main/main.c:1307
 msgid "unrecognized value of 'save'"
 msgstr ""
 
-#: src/main/main.c:1244
+#: src/main/main.c:1310
 msgid "invalid 'status', 0 assumed"
 msgstr ""
 
-#: src/main/main.c:1249
+#: src/main/main.c:1315
 msgid "invalid 'runLast', FALSE assumed"
 msgstr ""
 
-#: src/main/main.c:1280
+#: src/main/main.c:1346
 msgid "cannot allocate space for toplevel callback element"
 msgstr ""
 
-#: src/main/main.c:1358
+#: src/main/main.c:1424
 msgid "negative index passed to R_removeTaskCallbackByIndex"
 msgstr ""
 
-#: src/main/main.c:1468
+#: src/main/main.c:1534
 #, c-format
 msgid "warning messages from top-level task callback '%s'\n"
 msgstr ""
 
-#: src/main/main.c:1524
+#: src/main/main.c:1591
 msgid "top-level task callback did not return a logical value"
 msgstr ""
 
@@ -4017,226 +4091,223 @@ msgstr ""
 msgid "invalid partial string match"
 msgstr ""
 
-#: src/main/match.c:228 src/main/match.c:268 src/main/objects.c:56
-#: src/main/objects.c:66
+#: src/main/match.c:228 src/main/match.c:266 src/main/objects.c:49
+#: src/main/objects.c:59
 #, c-format
 msgid "formal argument \"%s\" matched by multiple actual arguments"
 msgstr ""
 
-#: src/main/match.c:231 src/main/match.c:266
+#: src/main/match.c:231 src/main/match.c:264
 #, c-format
 msgid "argument %d matches multiple formal arguments"
 msgstr ""
 
-#: src/main/match.c:272
+#: src/main/match.c:270
 #, c-format
 msgid "partial argument match of '%s' to '%s'"
 msgstr ""
 
-#: src/main/match.c:383
+#: src/main/match.c:380
 #, c-format
 msgid "unused argument %s"
 msgid_plural "unused arguments %s"
 msgstr[0] ""
 msgstr[1] ""
 
-#: src/main/memory.c:1232
+#: src/main/memory.c:1234
 msgid "can only weakly reference/finalize reference objects"
 msgstr ""
 
-#: src/main/memory.c:1266
+#: src/main/memory.c:1268
 msgid "finalizer must be a function or NULL"
 msgstr ""
 
-#: src/main/memory.c:1322 src/main/memory.c:1330 src/main/memory.c:1341
+#: src/main/memory.c:1324 src/main/memory.c:1332 src/main/memory.c:1343
 msgid "not a weak reference"
 msgstr ""
 
-#: src/main/memory.c:1472
+#: src/main/memory.c:1474
 msgid "first argument must be environment or external pointer"
 msgstr ""
 
-#: src/main/memory.c:1474
+#: src/main/memory.c:1476
 msgid "second argument must be a function"
 msgstr ""
 
-#: src/main/memory.c:1478
+#: src/main/memory.c:1480
 msgid "third argument must be 'TRUE' or 'FALSE'"
 msgstr ""
 
-#: src/main/memory.c:1970
+#: src/main/memory.c:1979
 msgid "vector memory exhausted (limit reached?)"
 msgstr ""
 
-#: src/main/memory.c:1976
+#: src/main/memory.c:1985
 msgid "cons memory exhausted (limit reached?)"
 msgstr ""
 
-#: src/main/memory.c:1981
+#: src/main/memory.c:1990
 msgid "memory exhausted (limit reached?)"
 msgstr ""
 
-#: src/main/memory.c:2116
+#: src/main/memory.c:2126
 #, c-format
 msgid "cannot allocate memory block of size %0.f Tb"
 msgstr ""
 
-#: src/main/memory.c:2121
+#: src/main/memory.c:2131
 #, c-format
 msgid "cannot allocate memory block of size %0.1f Gb"
 msgstr ""
 
-#: src/main/memory.c:2442
+#: src/main/memory.c:2458
 msgid "vector is too large"
 msgstr ""
 
-#: src/main/memory.c:2445
+#: src/main/memory.c:2461
 msgid "negative length vectors are not allowed"
 msgstr ""
 
-#: src/main/memory.c:2471 src/main/memory.c:2484 src/main/memory.c:2497
-#: src/main/memory.c:2512
+#: src/main/memory.c:2487 src/main/memory.c:2500 src/main/memory.c:2513
+#: src/main/memory.c:2528
 #, c-format
 msgid "cannot allocate vector of length %d"
 msgstr ""
 
-#: src/main/memory.c:2533
+#: src/main/memory.c:2549
 #, c-format
 msgid "invalid type/length (%s/%d) in vector allocation"
 msgstr ""
 
-#: src/main/memory.c:2636
+#: src/main/memory.c:2648
 #, c-format
 msgid "cannot allocate vector of size %0.1f Gb"
 msgstr ""
 
-#: src/main/memory.c:2640
+#: src/main/memory.c:2652
 #, c-format
 msgid "cannot allocate vector of size %0.1f Mb"
 msgstr ""
 
-#: src/main/memory.c:2644
+#: src/main/memory.c:2656
 #, c-format
 msgid "cannot allocate vector of size %0.f Kb"
 msgstr ""
 
-#: src/main/memory.c:3001
+#: src/main/memory.c:3071
 msgid "protect(): protection stack overflow"
 msgstr ""
 
-#: src/main/memory.c:3008
+#: src/main/memory.c:3078
 #, c-format
-msgid "unprotect(): only %d protected items"
-msgstr ""
+msgid "unprotect(): only %d protected item"
+msgid_plural "unprotect(): only %d protected items"
+msgstr[0] ""
+msgstr[1] ""
 
-#: src/main/memory.c:3041
+#: src/main/memory.c:3113
 msgid "unprotect_ptr: pointer not found"
 msgstr ""
 
-#: src/main/memory.c:3079
+#: src/main/memory.c:3151
 #, c-format
-msgid "R_Reprotect: only %d protected items, can't reprotect index %d"
-msgstr ""
+msgid "R_Reprotect: only %d protected item, can't reprotect index %d"
+msgid_plural "R_Reprotect: only %d protected items, can't reprotect index %d"
+msgstr[0] ""
+msgstr[1] ""
 
-#: src/main/memory.c:3129
+#: src/main/memory.c:3203
 #, c-format
 msgid "'Calloc' could not allocate memory (%.0f of %u bytes)"
 msgstr ""
 
-#: src/main/memory.c:3140
+#: src/main/memory.c:3214
 #, c-format
 msgid "'Realloc' could not re-allocate memory (%.0f bytes)"
 msgstr ""
 
-#: src/main/memory.c:3380
+#: src/main/memory.c:3460
 msgid "not safe to return vector pointer"
 msgstr ""
 
-#: src/main/memory.c:3392
+#: src/main/memory.c:3471
 #, c-format
 msgid "attempt to set index %lu/%lu in SET_STRING_ELT"
 msgstr ""
 
-#: src/main/memory.c:3408
+#: src/main/memory.c:3487
 #, c-format
 msgid "attempt to set index %lu/%lu in SET_VECTOR_ELT"
 msgstr ""
 
-#: src/main/memory.c:3658
+#: src/main/memory.c:3514 src/main/memory.c:3524 src/main/memory.c:3536
+#: src/main/memory.c:3550 src/main/memory.c:3565 src/main/memory.c:3583
+msgid "bad value"
+msgstr ""
+
+#: src/main/memory.c:3746
 msgid "memory profiling is not available on this system"
 msgstr ""
 
-#: src/main/memory.c:3723
+#: src/main/memory.c:3810
 #, c-format
 msgid "Rprofmem: cannot open output file '%s'"
 msgstr ""
 
-#: src/main/memory.c:3830
+#: src/main/memory.c:3915
 #, c-format
 msgid "long vectors not supported yet: %s:%d"
 msgstr ""
 
-#: src/main/names.c:996
+#: src/main/names.c:1021
 msgid "string argument required"
 msgstr ""
 
-#: src/main/names.c:999
+#: src/main/names.c:1024
 msgid "no such primitive function"
 msgstr ""
 
-#: src/main/names.c:1146
+#: src/main/names.c:1212 src/main/names.c:1242
 msgid "attempt to use zero-length variable name"
 msgstr ""
 
-#: src/main/names.c:1148
+#: src/main/names.c:1214 src/main/names.c:1244
 #, c-format
 msgid "variable names are limited to %d bytes"
 msgstr ""
 
-#: src/main/names.c:1176 src/main/names.c:1179
+#: src/main/names.c:1307 src/main/names.c:1310
 msgid "invalid .Internal() argument"
 msgstr ""
 
-#: src/main/objects.c:46
+#: src/main/objects.c:39
 msgid "generic 'function' is not a function"
 msgstr ""
 
-#: src/main/objects.c:201
+#: src/main/objects.c:193
 msgid "bad generic call environment"
 msgstr ""
 
-#: src/main/objects.c:207
+#: src/main/objects.c:201
 msgid "bad generic definition environment"
 msgstr ""
 
-#: src/main/objects.c:246
+#: src/main/objects.c:249
 msgid ""
 "no '.S3MethodsClass' table, cannot use S4 objects with S3 methods ('methods' "
 "package not attached?)"
 msgstr ""
 
-#: src/main/objects.c:270 src/main/objects.c:411
-msgid "'UseMethod' used in an inappropriate fashion"
-msgstr ""
-
-#: src/main/objects.c:290
-msgid "invalid generic function in 'usemethod'"
-msgstr ""
-
-#: src/main/objects.c:399
+#: src/main/objects.c:415
 msgid "there must be a 'generic' argument"
 msgstr ""
 
-#: src/main/objects.c:403
+#: src/main/objects.c:419
 msgid "'generic' argument must be a character string"
 msgstr ""
 
-#: src/main/objects.c:440
-msgid "'UseMethod' called from outside a function"
-msgstr ""
-
-#: src/main/objects.c:447
-msgid "first argument must be a generic name"
+#: src/main/objects.c:427
+msgid "'UseMethod' used in an inappropriate fashion"
 msgstr ""
 
 #: src/main/objects.c:472
@@ -4244,226 +4315,225 @@ msgstr ""
 msgid "no applicable method for '%s' applied to an object of class \"%s\""
 msgstr ""
 
-#: src/main/objects.c:533
+#: src/main/objects.c:582
 msgid "'NextMethod' called from outside a function"
 msgstr ""
 
-#: src/main/objects.c:539
+#: src/main/objects.c:588
 msgid "'NextMethod' called from an anonymous function"
 msgstr ""
 
-#: src/main/objects.c:563
+#: src/main/objects.c:609
 msgid "no calling generic was found: was a method called directly?"
 msgstr ""
 
-#: src/main/objects.c:566
+#: src/main/objects.c:612
 #, c-format
 msgid "'function' is not a function, but of type %d"
 msgstr ""
 
-#: src/main/objects.c:640
+#: src/main/objects.c:639
 msgid "wrong argument ..."
 msgstr ""
 
-#: src/main/objects.c:653
+#: src/main/objects.c:651
 msgid "object not specified"
 msgstr ""
 
-#: src/main/objects.c:663 src/main/objects.c:670
+#: src/main/objects.c:659 src/main/objects.c:666
 msgid "generic function not specified"
 msgstr ""
 
-#: src/main/objects.c:667
+#: src/main/objects.c:663
 msgid "invalid generic argument to 'NextMethod'"
 msgstr ""
 
-#: src/main/objects.c:680
+#: src/main/objects.c:675
 msgid "invalid 'group' argument found in 'NextMethod'"
 msgstr ""
 
-#: src/main/objects.c:699
+#: src/main/objects.c:692
 msgid "wrong value for .Method"
 msgstr ""
 
-#: src/main/objects.c:703 src/main/objects.c:712
-#, c-format
-msgid "method name too long in '%s'"
-msgstr ""
-
-#: src/main/objects.c:715
+#: src/main/objects.c:702
 msgid "Incompatible methods ignored"
 msgstr ""
 
-#: src/main/objects.c:775 src/main/objects.c:780
+#: src/main/objects.c:759 src/main/objects.c:766
 msgid "no method to invoke"
 msgstr ""
 
-#: src/main/objects.c:832
+#: src/main/objects.c:817
 msgid "cannot unclass an environment"
 msgstr ""
 
-#: src/main/objects.c:835
+#: src/main/objects.c:820
 msgid "cannot unclass an external pointer"
 msgstr ""
 
-#: src/main/objects.c:872
+#: src/main/objects.c:856
 msgid "'what' must be a character vector"
 msgstr ""
 
-#: src/main/objects.c:876
+#: src/main/objects.c:860
 msgid "'which' must be a length 1 logical vector"
 msgstr ""
 
-#: src/main/objects.c:882
+#: src/main/objects.c:866
 msgid "use 'is()' instead of 'inherits()' on S4 objects"
 msgstr ""
 
-#: src/main/objects.c:1012
+#: src/main/objects.c:995
 msgid "could not find correct environment; please report!"
 msgstr ""
 
-#: src/main/objects.c:1052
+#: src/main/objects.c:1039
 msgid "'onOff' must be TRUE or FALSE"
 msgstr ""
 
-#: src/main/objects.c:1119
+#: src/main/objects.c:1104
 #, c-format
 msgid "unable to find a non-generic version of function \"%s\""
 msgstr ""
 
-#: src/main/objects.c:1151
+#: src/main/objects.c:1136
 msgid ""
 "'standardGeneric' called without 'methods' dispatch enabled (will be ignored)"
 msgstr ""
 
-#: src/main/objects.c:1160
+#: src/main/objects.c:1145
 msgid "argument to 'standardGeneric' must be a non-empty character string"
 msgstr ""
 
-#: src/main/objects.c:1165
+#: src/main/objects.c:1150
 #, c-format
 msgid ""
 "call to standardGeneric(\"%s\") apparently not from the body of that generic "
 "function"
 msgstr ""
 
-#: src/main/objects.c:1189
-msgid "argument 'code' must be a character string"
-msgstr ""
-
-#: src/main/objects.c:1257
+#: src/main/objects.c:1249
 #, c-format
 msgid ""
 "invalid primitive methods code (\"%s\"): should be \"clear\", \"reset\", "
 "\"set\", or \"suppress\""
 msgstr ""
 
-#: src/main/objects.c:1265
+#: src/main/objects.c:1257
 msgid "invalid object: must be a primitive function"
 msgstr ""
 
-#: src/main/objects.c:1312
+#: src/main/objects.c:1304
 #, c-format
 msgid ""
 "the formal definition of a primitive generic must be a function object (got "
 "type '%s')"
 msgstr ""
 
-#: src/main/objects.c:1342
+#: src/main/objects.c:1334
 #, c-format
 msgid "object returned as generic function \"%s\" does not appear to be one"
 msgstr ""
 
-#: src/main/objects.c:1444
+#: src/main/objects.c:1439
 msgid "invalid primitive operation given for dispatch"
 msgstr ""
 
-#: src/main/objects.c:1470 src/main/objects.c:1489
+#: src/main/objects.c:1468 src/main/objects.c:1487
 msgid "dispatch error"
 msgstr ""
 
-#: src/main/objects.c:1483
+#: src/main/objects.c:1481
 #, c-format
 msgid ""
 "primitive function \"%s\" has been set for methods but no generic function "
 "supplied"
 msgstr ""
 
-#: src/main/objects.c:1508
+#: src/main/objects.c:1506
 msgid "C level MAKE_CLASS macro called with NULL string pointer"
 msgstr ""
 
-#: src/main/objects.c:1524
+#: src/main/objects.c:1522
+msgid "'methods' package not yet loaded"
+msgstr ""
+
+#: src/main/objects.c:1532
 msgid "R_getClassDef(.) called with NULL string pointer"
 msgstr ""
 
-#: src/main/objects.c:1546
+#: src/main/objects.c:1577
 msgid "C level NEW macro called with null class definition pointer"
 msgstr ""
 
-#: src/main/objects.c:1550
+#: src/main/objects.c:1581
 #, c-format
 msgid "trying to generate an object from a virtual class (\"%s\")"
 msgstr ""
 
-#: src/main/objects.c:1627
+#: src/main/objects.c:1663
 #, c-format
 msgid "object of class \"%s\" does not correspond to a valid S3 object"
 msgstr ""
 
-#: src/main/options.c:120 src/main/options.c:180
+#: src/main/options.c:121 src/main/options.c:182
 msgid "corrupted options list"
 msgstr ""
 
-#: src/main/options.c:130
+#: src/main/options.c:131
 msgid "invalid printing width, used 80"
 msgstr ""
 
-#: src/main/options.c:141
+#: src/main/options.c:142
 msgid "invalid printing digits, used 7"
 msgstr ""
 
-#: src/main/options.c:153
+#: src/main/options.c:154
 msgid "invalid 'deparse.cutoff', used 60"
 msgstr ""
 
-#: src/main/options.c:165
+#: src/main/options.c:166
 msgid "invalid value for \"device.ask.default\", using FALSE"
 msgstr ""
 
-#: src/main/options.c:401
+#: src/main/options.c:416
 msgid "list argument has no valid names"
 msgstr ""
 
-#: src/main/options.c:429
+#: src/main/options.c:445
 #, c-format
 msgid "invalid 'width' parameter, allowed %d...%d"
 msgstr ""
 
-#: src/main/options.c:440
+#: src/main/options.c:456
 #, c-format
 msgid "invalid 'digits' parameter, allowed %d...%d"
 msgstr ""
 
-#: src/main/options.c:447
+#: src/main/options.c:463
 #, c-format
 msgid "'expressions' parameter invalid, allowed %d...%d"
 msgstr ""
 
-#: src/main/options.c:454 src/main/options.c:462 src/main/options.c:468
-#: src/main/options.c:476 src/main/options.c:483 src/main/options.c:488
-#: src/main/options.c:495 src/main/options.c:501 src/main/options.c:507
-#: src/main/options.c:512 src/main/options.c:517 src/main/options.c:526
-#: src/main/options.c:532 src/main/options.c:538 src/main/options.c:549
-#: src/main/options.c:556 src/main/options.c:562 src/main/options.c:570
-#: src/main/options.c:577 src/main/options.c:584 src/main/options.c:591
-#: src/main/options.c:598 src/main/options.c:606 src/main/options.c:615
-#: src/main/options.c:618 src/main/options.c:624
+#: src/main/options.c:470 src/main/options.c:478 src/main/options.c:484
+#: src/main/options.c:492 src/main/options.c:499 src/main/options.c:504
+#: src/main/options.c:511 src/main/options.c:517 src/main/options.c:523
+#: src/main/options.c:528 src/main/options.c:533 src/main/options.c:542
+#: src/main/options.c:548 src/main/options.c:554 src/main/options.c:564
+#: src/main/options.c:578 src/main/options.c:584 src/main/options.c:592
+#: src/main/options.c:599 src/main/options.c:606 src/main/options.c:613
+#: src/main/options.c:620 src/main/options.c:628 src/main/options.c:637
+#: src/main/options.c:640 src/main/options.c:646
 #, c-format
 msgid "invalid value for '%s'"
 msgstr ""
 
-#: src/main/options.c:611 src/main/options.c:640
+#: src/main/options.c:569
+msgid "'OutDec' must be a string of one character"
+msgstr ""
+
+#: src/main/options.c:633 src/main/options.c:662
 msgid "\"par.ask.default\" has been replaced by \"device.ask.default\""
 msgstr ""
 
@@ -4483,15 +4553,19 @@ msgstr ""
 msgid "non-string argument to Internal paste"
 msgstr ""
 
-#: src/main/paste.c:390
+#: src/main/paste.c:387
 msgid "first argument must be atomic"
 msgstr ""
 
-#: src/main/paste.c:560
+#: src/main/paste.c:448
+msgid "'decimal.mark' must be a string of one character"
+msgstr ""
+
+#: src/main/paste.c:579
 msgid "Impossible mode ( x )"
 msgstr ""
 
-#: src/main/paste.c:645
+#: src/main/paste.c:663
 msgid "atomic vector arguments only"
 msgstr ""
 
@@ -4499,209 +4573,192 @@ msgstr ""
 msgid "invalid filename specification"
 msgstr ""
 
-#: src/main/platform.c:375 src/main/platform.c:419
+#: src/main/platform.c:375 src/main/platform.c:420
 msgid "write error during file append"
 msgstr ""
 
-#: src/main/platform.c:394
+#: src/main/platform.c:395
 msgid "nothing to append to"
 msgstr ""
 
-#: src/main/platform.c:448 src/main/platform.c:795
+#: src/main/platform.c:449 src/main/platform.c:797 src/main/platform.c:979
 msgid "invalid filename argument"
 msgstr ""
 
-#: src/main/platform.c:460
+#: src/main/platform.c:461
 #, c-format
 msgid "cannot create file '%s', reason '%s'"
 msgstr ""
 
-#: src/main/platform.c:475 src/main/platform.c:545 src/main/platform.c:627
+#: src/main/platform.c:476 src/main/platform.c:546 src/main/platform.c:629
 msgid "invalid first filename"
 msgstr ""
 
-#: src/main/platform.c:487
+#: src/main/platform.c:488
 #, c-format
 msgid "cannot remove file '%s', reason '%s'"
 msgstr ""
 
-#: src/main/platform.c:547 src/main/platform.c:629
+#: src/main/platform.c:548 src/main/platform.c:631
 msgid "invalid second filename"
 msgstr ""
 
-#: src/main/platform.c:549 src/main/platform.c:631
+#: src/main/platform.c:551 src/main/platform.c:634
 msgid "nothing to link"
 msgstr ""
 
-#: src/main/platform.c:559
+#: src/main/platform.c:561
 msgid "symbolic links are not supported on this version of Windows"
 msgstr ""
 
-#: src/main/platform.c:581
+#: src/main/platform.c:583
 #, c-format
 msgid "cannot symlink '%ls' to '%ls', reason '%s'"
 msgstr ""
 
-#: src/main/platform.c:601
+#: src/main/platform.c:603
 #, c-format
 msgid "cannot symlink '%s' to '%s', reason '%s'"
 msgstr ""
 
-#: src/main/platform.c:609
+#: src/main/platform.c:611
 msgid "symbolic links are not supported on this platform"
 msgstr ""
 
-#: src/main/platform.c:649
+#: src/main/platform.c:652
 #, c-format
 msgid "cannot link '%ls' to '%ls', reason '%s'"
 msgstr ""
 
-#: src/main/platform.c:669
+#: src/main/platform.c:672
 #, c-format
 msgid "cannot link '%s' to '%s', reason '%s'"
 msgstr ""
 
-#: src/main/platform.c:678
+#: src/main/platform.c:681
 msgid "(hard) links are not supported on this platform"
 msgstr ""
 
-#: src/main/platform.c:709
+#: src/main/platform.c:713
 msgid "'from' and 'to' are of different lengths"
 msgstr ""
 
-#: src/main/platform.c:720 src/main/platform.c:730
+#: src/main/platform.c:724 src/main/platform.c:734
 msgid "expanded 'from' name too long"
 msgstr ""
 
-#: src/main/platform.c:724 src/main/platform.c:734
+#: src/main/platform.c:728 src/main/platform.c:738
 msgid "expanded 'to' name too long"
 msgstr ""
 
-#: src/main/platform.c:738
+#: src/main/platform.c:742
 #, c-format
 msgid "cannot rename file '%s' to '%s', reason '%s'"
 msgstr ""
 
-#: src/main/platform.c:1094
+#: src/main/platform.c:1168
 msgid "invalid 'pattern' regular expression"
 msgstr ""
 
-#: src/main/platform.c:1211
+#: src/main/platform.c:1285
 msgid "unable to determine R home location"
 msgstr ""
 
-#: src/main/platform.c:1263
+#: src/main/platform.c:1338
 msgid "file name too long"
 msgstr ""
 
-#: src/main/platform.c:1511 src/main/platform.c:1558 src/main/sysutils.c:1850
-#: src/main/sysutils.c:1864
+#: src/main/platform.c:1586 src/main/platform.c:1633 src/main/sysutils.c:1806
+#: src/main/sysutils.c:1820
 msgid "internal out-of-memory condition"
 msgstr ""
 
-#: src/main/platform.c:1554 src/main/sysutils.c:1860
+#: src/main/platform.c:1629 src/main/sysutils.c:1816
 #, c-format
 msgid "read error on '%s'"
 msgstr ""
 
-#: src/main/platform.c:1722
+#: src/main/platform.c:1728
 msgid "setting 'LC_NUMERIC' may cause R to function strangely"
 msgstr ""
 
-#: src/main/platform.c:1736
+#: src/main/platform.c:1742
 msgid "LC_MESSAGES exists on Windows but is not operational"
 msgstr ""
 
-#: src/main/platform.c:1763
+#: src/main/platform.c:1769
 #, c-format
 msgid "OS reports request to set locale to \"%s\" cannot be honored"
 msgstr ""
 
-#: src/main/platform.c:2065
-msgid "'hostname' must be a character vector of length 1"
-msgstr ""
-
-#: src/main/platform.c:2071
-#, c-format
-msgid "nsl() was unable to resolve host '%s'"
-msgstr ""
-
-#: src/main/platform.c:2078
-msgid "unknown format returned by C function 'gethostbyname'"
-msgstr ""
-
-#: src/main/platform.c:2087
-msgid "nsl() is not supported on this platform"
-msgstr ""
-
-#: src/main/platform.c:2158
+#: src/main/platform.c:2131
 #, c-format
 msgid "'%s' already exists"
 msgstr ""
 
-#: src/main/platform.c:2161
+#: src/main/platform.c:2134
 #, c-format
 msgid "cannot create dir '%s', reason '%s'"
 msgstr ""
 
-#: src/main/platform.c:2207
+#: src/main/platform.c:2181
 #, c-format
 msgid "'%ls' already exists"
 msgstr ""
 
-#: src/main/platform.c:2211
+#: src/main/platform.c:2183 src/main/platform.c:2189
 #, c-format
 msgid "cannot create dir '%ls', reason '%s'"
 msgstr ""
 
-#: src/main/platform.c:2245 src/main/platform.c:2449
+#: src/main/platform.c:2223 src/main/platform.c:2435
 msgid "too deep nesting"
 msgstr ""
 
-#: src/main/platform.c:2253 src/main/platform.c:2266 src/main/platform.c:2284
+#: src/main/platform.c:2231 src/main/platform.c:2244 src/main/platform.c:2262
 msgid "over-long path"
 msgstr ""
 
-#: src/main/platform.c:2273
+#: src/main/platform.c:2251
 #, c-format
 msgid "problem creating directory %ls: %s"
 msgstr ""
 
-#: src/main/platform.c:2293
+#: src/main/platform.c:2271
 #, c-format
 msgid "problem reading dir %ls: %s"
 msgstr ""
 
-#: src/main/platform.c:2304 src/main/platform.c:2465 src/main/platform.c:2478
-#: src/main/platform.c:2498 src/main/platform.c:2520
+#: src/main/platform.c:2282 src/main/platform.c:2451 src/main/platform.c:2464
+#: src/main/platform.c:2484 src/main/platform.c:2506
 msgid "over-long path length"
 msgstr ""
 
-#: src/main/platform.c:2312
+#: src/main/platform.c:2290
 #, c-format
 msgid "problem copying %ls to %ls: %s"
 msgstr ""
 
-#: src/main/platform.c:2487
+#: src/main/platform.c:2473
 #, c-format
 msgid "problem creating directory %s: %s"
 msgstr ""
 
-#: src/main/platform.c:2507
+#: src/main/platform.c:2493
 #, c-format
 msgid "problem reading directory %s: %s"
 msgstr ""
 
-#: src/main/platform.c:2529
+#: src/main/platform.c:2515
 #, c-format
 msgid "problem copying %s to %s: %s"
 msgstr ""
 
-#: src/main/platform.c:2662
+#: src/main/platform.c:2653
 msgid "'mode' must be of length at least one"
 msgstr ""
 
-#: src/main/platform.c:2729
+#: src/main/platform.c:2720
 msgid "insufficient OS support on this platform"
 msgstr ""
 
@@ -4722,91 +4779,95 @@ msgstr ""
 msgid "invalid math style encountered"
 msgstr ""
 
-#: src/main/plotmath.c:1261 src/main/plotmath.c:1366 src/main/plotmath.c:2664
+#: src/main/plotmath.c:1260 src/main/plotmath.c:1365 src/main/plotmath.c:2654
 msgid "invalid mathematical annotation"
 msgstr ""
 
-#: src/main/plotmath.c:1670
+#: src/main/plotmath.c:1669
 msgid "invalid accent"
 msgstr ""
 
-#: src/main/plotmath.c:1964
+#: src/main/plotmath.c:1963
 msgid "invalid group delimiter"
 msgstr ""
 
-#: src/main/plotmath.c:1991 src/main/plotmath.c:2137
+#: src/main/plotmath.c:1990 src/main/plotmath.c:2127
 msgid "invalid group specification"
 msgstr ""
 
-#: src/main/plotmath.c:2062
+#: src/main/plotmath.c:2052
 msgid "group is incomplete"
 msgstr ""
 
-#: src/main/plotmath.c:3190
+#: src/main/plotmath.c:3180
 msgid "Metric information not available for this family/device"
 msgstr ""
 
-#: src/main/print.c:148 src/main/print.c:254
+#: src/main/print.c:140 src/main/print.c:247
 msgid "invalid 'na.print' specification"
 msgstr ""
 
-#: src/main/print.c:157
+#: src/main/print.c:149
 msgid "invalid row labels"
 msgstr ""
 
-#: src/main/print.c:159
+#: src/main/print.c:151
 msgid "invalid column labels"
 msgstr ""
 
-#: src/main/print.c:183
+#: src/main/print.c:176
 msgid "non-function argument to .Internal(print.function(.))"
 msgstr ""
 
-#: src/main/print.c:264
+#: src/main/print.c:257
 msgid "'gap' must be non-negative integer"
 msgstr ""
 
-#: src/main/print.c:289
+#: src/main/print.c:282
 msgid "invalid 'tryS4' internal argument"
 msgstr ""
 
-#: src/main/print.c:1028
+#: src/main/print.c:851
+msgid "print buffer overflow"
+msgstr ""
+
+#: src/main/print.c:1043
 msgid "invalid character length in 'dblepr'"
 msgstr ""
 
-#: src/main/print.c:1046
+#: src/main/print.c:1061
 msgid "invalid character length in 'intpr'"
 msgstr ""
 
-#: src/main/print.c:1065
+#: src/main/print.c:1080
 msgid "invalid character length in 'realpr'"
 msgstr ""
 
-#: src/main/print.c:1075
+#: src/main/print.c:1090
 msgid "memory allocation error in 'realpr'"
 msgstr ""
 
-#: src/main/print.c:1091
+#: src/main/print.c:1106
 #, c-format
 msgid "BLAS/LAPACK routine '%6s' gave error code %d"
 msgstr ""
 
-#: src/main/printarray.c:453
+#: src/main/printarray.c:332
 msgid "too few row labels"
 msgstr ""
 
-#: src/main/printarray.c:455
+#: src/main/printarray.c:334
 msgid "too few column labels"
 msgstr ""
 
-#: src/main/printarray.c:489
+#: src/main/printarray.c:368
 #, c-format
 msgid " [ reached getOption(\"max.print\") -- omitted %d row ]\n"
 msgid_plural " [ reached getOption(\"max.print\") -- omitted %d rows ]\n"
 msgstr[0] ""
 msgstr[1] ""
 
-#: src/main/printutils.c:613
+#: src/main/printutils.c:710
 msgid "it is not known that wchar_t is Unicode on this platform"
 msgstr ""
 
@@ -4814,328 +4875,326 @@ msgstr ""
 msgid "argument is not a numeric vector"
 msgstr ""
 
-#: src/main/random.c:37
+#: src/main/random.c:39
 msgid "invalid arguments"
 msgstr ""
 
-#: src/main/random.c:93 src/main/random.c:110 src/main/random.c:175
-#: src/main/random.c:201 src/main/random.c:274 src/main/random.c:288
+#: src/main/random.c:95 src/main/random.c:112 src/main/random.c:178
+#: src/main/random.c:204 src/main/random.c:277 src/main/random.c:291
 msgid "NAs produced"
 msgstr ""
 
-#: src/main/random.c:445
+#: src/main/random.c:438
 msgid "NA in probability vector"
 msgstr ""
 
-#: src/main/random.c:447
-msgid "non-positive probability"
+#: src/main/random.c:440
+msgid "negative probability"
 msgstr ""
 
-#: src/main/random.c:454
+#: src/main/random.c:447
 msgid "too few positive probabilities"
 msgstr ""
 
-#: src/main/random.c:491 src/main/random.c:519
+#: src/main/random.c:483 src/main/random.c:511
 msgid "cannot take a sample larger than the population when 'replace = FALSE'"
 msgstr ""
 
-#: src/main/random.c:498
+#: src/main/random.c:490
 msgid "incorrect number of probabilities"
 msgstr ""
 
-#: src/main/random.c:537
+#: src/main/random.c:529
 msgid "n >= 2^31, replace = FALSE is only supported on 64-bit platforms"
 msgstr ""
 
-#: src/main/raw.c:37 src/main/raw.c:273
+#: src/main/raw.c:37 src/main/raw.c:277
 msgid "argument must be a character vector of length 1"
 msgstr ""
 
-#: src/main/raw.c:39 src/main/raw.c:275
+#: src/main/raw.c:39 src/main/raw.c:279
 msgid ""
 "argument should be a character vector of length 1\n"
 "all but the first element will be ignored"
 msgstr ""
 
-#: src/main/raw.c:53 src/main/raw.c:89 src/main/raw.c:110
+#: src/main/raw.c:53 src/main/raw.c:90 src/main/raw.c:113
 msgid "argument 'x' must be a raw vector"
 msgstr ""
 
-#: src/main/raw.c:56 src/main/raw.c:330
+#: src/main/raw.c:56 src/main/raw.c:336
 msgid "argument 'multiple' must be TRUE or FALSE"
 msgstr ""
 
-#: src/main/raw.c:91
+#: src/main/raw.c:92
 msgid "argument 'shift' must be a small integer"
 msgstr ""
 
-#: src/main/raw.c:129 src/main/raw.c:327
+#: src/main/raw.c:133 src/main/raw.c:333
 msgid "argument 'x' must be an integer vector"
 msgstr ""
 
-#: src/main/raw.c:148
+#: src/main/raw.c:153
 msgid "argument 'x' must be raw, integer or logical"
 msgstr ""
 
-#: src/main/raw.c:150
-msgid "argument 'type' must be a character string"
-msgstr ""
-
-#: src/main/raw.c:154
+#: src/main/raw.c:159
 #, c-format
 msgid "argument 'x' must be a multiple of %d long"
 msgstr ""
 
-#: src/main/raw.c:167 src/main/raw.c:181
+#: src/main/raw.c:172 src/main/raw.c:186
 msgid "argument 'x' must not contain NAs"
 msgstr ""
 
-#: src/main/raw.c:285
+#: src/main/raw.c:291
 msgid "invalid UTF-8 string"
 msgstr ""
 
-#: src/main/relop.c:202
+#: src/main/relop.c:196
 #, c-format
 msgid "comparison (%d) is possible only for atomic and list types"
 msgstr ""
 
-#: src/main/relop.c:207
+#: src/main/relop.c:201
 msgid "comparison is not allowed for expressions"
 msgstr ""
 
-#: src/main/relop.c:296
+#: src/main/relop.c:293
 msgid "comparison of these types is not implemented"
 msgstr ""
 
-#: src/main/relop.c:509
+#: src/main/relop.c:425
 msgid "invalid comparison with complex values"
 msgstr ""
 
-#: src/main/relop.c:767
+#: src/main/relop.c:683
 msgid "'a' and 'b' must have the same type"
 msgstr ""
 
-#: src/main/saveload.c:200 src/main/saveload.c:205 src/main/saveload.c:214
-#: src/main/saveload.c:223 src/main/saveload.c:232 src/main/saveload.c:241
-#: src/main/saveload.c:245 src/main/saveload.c:254 src/main/saveload.c:1381
-#: src/main/saveload.c:1386 src/main/saveload.c:1430 src/main/saveload.c:1498
-#: src/main/saveload.c:1507 src/main/serialize.c:331 src/main/serialize.c:338
-#: src/main/serialize.c:2388 src/main/serialize.c:2396
+#: src/main/saveload.c:202 src/main/saveload.c:207 src/main/saveload.c:216
+#: src/main/saveload.c:225 src/main/saveload.c:234 src/main/saveload.c:243
+#: src/main/saveload.c:247 src/main/saveload.c:256 src/main/saveload.c:1383
+#: src/main/saveload.c:1388 src/main/saveload.c:1432 src/main/saveload.c:1500
+#: src/main/saveload.c:1509 src/main/serialize.c:354 src/main/serialize.c:361
+#: src/main/serialize.c:374 src/main/serialize.c:378 src/main/serialize.c:405
+#: src/main/serialize.c:421 src/main/serialize.c:2429
+#: src/main/serialize.c:2437
 msgid "read error"
 msgstr ""
 
-#: src/main/saveload.c:332
+#: src/main/saveload.c:334
 msgid "a I read error occurred"
 msgstr ""
 
-#: src/main/saveload.c:342
+#: src/main/saveload.c:344
 msgid "a R read error occurred"
 msgstr ""
 
-#: src/main/saveload.c:352
+#: src/main/saveload.c:354
 msgid "a C read error occurred"
 msgstr ""
 
-#: src/main/saveload.c:362
+#: src/main/saveload.c:364
 msgid "a S read error occurred"
 msgstr ""
 
-#: src/main/saveload.c:387 src/main/saveload.c:395 src/main/saveload.c:403
-#: src/main/saveload.c:1594 src/main/saveload.c:1602
+#: src/main/saveload.c:389 src/main/saveload.c:397 src/main/saveload.c:405
+#: src/main/saveload.c:1596 src/main/saveload.c:1604
 msgid "a read error occurred"
 msgstr ""
 
-#: src/main/saveload.c:467
+#: src/main/saveload.c:469
 msgid "unresolved node during restore"
 msgstr ""
 
-#: src/main/saveload.c:488
+#: src/main/saveload.c:490
 #, c-format
 msgid "restore compatibility error - no version %d compatibility"
 msgstr ""
 
-#: src/main/saveload.c:572 src/main/saveload.c:645
+#: src/main/saveload.c:574 src/main/saveload.c:647
 msgid "bad SEXP type in data file"
 msgstr ""
 
-#: src/main/saveload.c:586
+#: src/main/saveload.c:588
 msgid "mismatch on types"
 msgstr ""
 
-#: src/main/saveload.c:607 src/main/saveload.c:1270 src/main/serialize.c:1636
+#: src/main/saveload.c:609 src/main/saveload.c:1272 src/main/serialize.c:1675
 #, c-format
 msgid "unrecognized internal function name \"%s\""
 msgstr ""
 
-#: src/main/saveload.c:709
+#: src/main/saveload.c:711
 msgid "cannot save file position while restoring data"
 msgstr ""
 
-#: src/main/saveload.c:722
+#: src/main/saveload.c:724
 msgid "cannot restore file position while restoring data"
 msgstr ""
 
-#: src/main/saveload.c:915
+#: src/main/saveload.c:917
 msgid "base namespace is not preserved in version 1 workspaces"
 msgstr ""
 
-#: src/main/saveload.c:917
+#: src/main/saveload.c:919
 msgid "cannot save namespace in version 1 workspaces"
 msgstr ""
 
-#: src/main/saveload.c:919
+#: src/main/saveload.c:921
 msgid ""
 "cannot save environment with locked/active bindings in version 1 workspaces"
 msgstr ""
 
-#: src/main/saveload.c:943
+#: src/main/saveload.c:945
 msgid "cannot save weak references in version 1 workspaces"
 msgstr ""
 
-#: src/main/saveload.c:1021
+#: src/main/saveload.c:1023
 msgid "NewWriteVec called with non-vector type"
 msgstr ""
 
-#: src/main/saveload.c:1084
+#: src/main/saveload.c:1086
 msgid "cannot save byte code objects in version 1 workspaces"
 msgstr ""
 
-#: src/main/saveload.c:1086
+#: src/main/saveload.c:1088
 #, c-format
 msgid "NewWriteItem: unknown type %i"
 msgstr ""
 
-#: src/main/saveload.c:1216
+#: src/main/saveload.c:1218
 msgid "NewReadVec called with non-vector type"
 msgstr ""
 
-#: src/main/saveload.c:1286
+#: src/main/saveload.c:1288
 msgid "cannot read byte code objects from version 1 workspaces"
 msgstr ""
 
-#: src/main/saveload.c:1288
+#: src/main/saveload.c:1290
 #, c-format
 msgid "NewReadItem: unknown type %i"
 msgstr ""
 
-#: src/main/saveload.c:1440
+#: src/main/saveload.c:1442
 msgid "out of memory reading ascii string"
 msgstr ""
 
-#: src/main/saveload.c:1565
+#: src/main/saveload.c:1567
 msgid "a binary read error occurred"
 msgstr ""
 
-#: src/main/saveload.c:1580 src/main/saveload.c:1681
+#: src/main/saveload.c:1582 src/main/saveload.c:1683
 msgid "out of memory reading binary string"
 msgstr ""
 
-#: src/main/saveload.c:1585
+#: src/main/saveload.c:1587
 msgid "a binary string read error occurred"
 msgstr ""
 
-#: src/main/saveload.c:1645
+#: src/main/saveload.c:1647
 msgid "an xdr integer data write error occurred"
 msgstr ""
 
-#: src/main/saveload.c:1652
+#: src/main/saveload.c:1654
 msgid "an xdr integer data read error occurred"
 msgstr ""
 
-#: src/main/saveload.c:1667 src/main/saveload.c:1686
+#: src/main/saveload.c:1669 src/main/saveload.c:1688
 msgid "an xdr string data write error occurred"
 msgstr ""
 
-#: src/main/saveload.c:1694
+#: src/main/saveload.c:1696
 msgid "an xdr real data write error occurred"
 msgstr ""
 
-#: src/main/saveload.c:1701
+#: src/main/saveload.c:1703
 msgid "an xdr real data read error occurred"
 msgstr ""
 
-#: src/main/saveload.c:1708
+#: src/main/saveload.c:1710
 msgid "an xdr complex data write error occurred"
 msgstr ""
 
-#: src/main/saveload.c:1715
+#: src/main/saveload.c:1717
 msgid "an xdr complex data read error occurred"
 msgstr ""
 
-#: src/main/saveload.c:1783 src/main/serialize.c:1958
-#: src/main/serialize.c:2568 src/modules/internet/internet.c:351
-#: src/modules/internet/internet.c:409 src/modules/internet/internet.c:514
+#: src/main/saveload.c:1785 src/main/serialize.c:1997
+#: src/main/serialize.c:2614 src/modules/internet/internet.c:514
+#: src/modules/internet/internet.c:590 src/modules/internet/internet.c:701
 msgid "write failed"
 msgstr ""
 
-#: src/main/saveload.c:1910
+#: src/main/saveload.c:1912
 msgid "restore file may be empty -- no data loaded"
 msgstr ""
 
-#: src/main/saveload.c:1912
+#: src/main/saveload.c:1914
 msgid "restore file may be from a newer version of R -- no data loaded"
 msgstr ""
 
-#: src/main/saveload.c:1914
+#: src/main/saveload.c:1916
 msgid "bad restore file magic number (file may be corrupted) -- no data loaded"
 msgstr ""
 
-#: src/main/saveload.c:1940 src/main/saveload.c:2238
+#: src/main/saveload.c:1942 src/main/saveload.c:2240
 msgid "first argument must be a character vector"
 msgstr ""
 
-#: src/main/saveload.c:2012
+#: src/main/saveload.c:2014
 msgid "not a valid named list"
 msgstr ""
 
-#: src/main/saveload.c:2019 src/main/saveload.c:2040
+#: src/main/saveload.c:2021 src/main/saveload.c:2042
 #, c-format
 msgid "'%s' looks like a pre-2.4.0 S4 object: please recreate it"
 msgstr ""
 
-#: src/main/saveload.c:2027
+#: src/main/saveload.c:2029
 msgid "loaded data is not in pair list form"
 msgstr ""
 
-#: src/main/saveload.c:2063
+#: src/main/saveload.c:2065
 msgid "first argument must be a file name"
 msgstr ""
 
-#: src/main/saveload.c:2108 src/main/saveload.c:2134 src/main/serialize.c:826
-#: src/main/serialize.c:863 src/main/serialize.c:901
+#: src/main/saveload.c:2110 src/main/saveload.c:2136 src/main/serialize.c:864
+#: src/main/serialize.c:901 src/main/serialize.c:939
 msgid "XDR write failed"
 msgstr ""
 
-#: src/main/saveload.c:2121 src/main/saveload.c:2146 src/main/serialize.c:1362
-#: src/main/serialize.c:1398 src/main/serialize.c:1436
+#: src/main/saveload.c:2123 src/main/saveload.c:2148 src/main/serialize.c:1400
+#: src/main/serialize.c:1436 src/main/serialize.c:1474
 msgid "XDR read failed"
 msgstr ""
 
-#: src/main/saveload.c:2157
+#: src/main/saveload.c:2159
 #, c-format
 msgid "cannot save data -- unable to open '%s': %s"
 msgstr ""
 
-#: src/main/saveload.c:2254 src/main/serialize.c:2161
+#: src/main/saveload.c:2256 src/main/serialize.c:2202
 #, c-format
 msgid "cannot save to connections in version %d format"
 msgstr ""
 
-#: src/main/saveload.c:2277 src/main/serialize.c:2186
+#: src/main/saveload.c:2279 src/main/serialize.c:2227
 msgid "connection not open for writing"
 msgstr ""
 
-#: src/main/saveload.c:2285
+#: src/main/saveload.c:2288
 msgid "cannot save XDR format to a text-mode connection"
 msgstr ""
 
-#: src/main/saveload.c:2295 src/main/serialize.c:2066
-#: src/main/serialize.c:2080 src/main/serialize.c:2262
-#: src/main/serialize.c:2284
+#: src/main/saveload.c:2298 src/main/serialize.c:2105
+#: src/main/serialize.c:2119 src/main/serialize.c:2303
+#: src/main/serialize.c:2325
 msgid "error writing to connection"
 msgstr ""
 
-#: src/main/saveload.c:2359 src/main/serialize.c:2234
+#: src/main/saveload.c:2359 src/main/serialize.c:2275
 msgid "connection not open for reading"
 msgstr ""
 
@@ -5162,7 +5221,7 @@ msgstr ""
 msgid "scan() expected '%s', got '%s'"
 msgstr ""
 
-#: src/main/scan.c:585 src/main/scan.c:732
+#: src/main/scan.c:585 src/main/scan.c:735
 msgid "too many items"
 msgstr ""
 
@@ -5170,7 +5229,7 @@ msgstr ""
 msgid "empty 'what' specified"
 msgstr ""
 
-#: src/main/scan.c:722
+#: src/main/scan.c:725
 #, c-format
 msgid "line %d did not have %d elements"
 msgstr ""
@@ -5199,257 +5258,259 @@ msgstr ""
 msgid "invalid quote symbol set"
 msgstr ""
 
-#: src/main/scan.c:987
+#: src/main/scan.c:988
 msgid "embedded nul(s) found in input"
 msgstr ""
 
-#: src/main/seq.c:48
+#: src/main/seq.c:49
 msgid "unequal factor lengths"
 msgstr ""
 
-#: src/main/seq.c:100
+#: src/main/seq.c:101
 msgid "result would be too long a vector"
 msgstr ""
 
-#: src/main/seq.c:159
+#: src/main/seq.c:160
 msgid "argument of length 0"
 msgstr ""
 
-#: src/main/seq.c:161 src/main/seq.c:163
+#: src/main/seq.c:163 src/main/seq.c:168
 #, c-format
-msgid "numerical expression has %d elements: only the first used"
-msgstr ""
+msgid "numerical expression has %d element: only the first used"
+msgid_plural "numerical expression has %d elements: only the first used"
+msgstr[0] ""
+msgstr[1] ""
 
-#: src/main/seq.c:167
+#: src/main/seq.c:174
 msgid "NA/NaN argument"
 msgstr ""
 
-#: src/main/seq.c:331
+#: src/main/seq.c:333
 msgid "incorrect type for second argument"
 msgstr ""
 
-#: src/main/seq.c:334
+#: src/main/seq.c:336
 #, c-format
 msgid "attempt to replicate an object of type '%s'"
 msgstr ""
 
-#: src/main/seq.c:387
+#: src/main/seq.c:393
 msgid "attempt to replicate non-vector"
 msgstr ""
 
-#: src/main/seq.c:403
+#: src/main/seq.c:409
 msgid "cannot replicate NULL to a non-zero length"
 msgstr ""
 
-#: src/main/seq.c:626 src/main/seq.c:633 src/main/seq.c:768 src/main/seq.c:979
+#: src/main/seq.c:630 src/main/seq.c:637 src/main/seq.c:766 src/main/seq.c:977
 #, c-format
 msgid "first element used of '%s' argument"
 msgstr ""
 
-#: src/main/seq.c:766
+#: src/main/seq.c:764
 msgid "'length.out' must be a non-negative number"
 msgstr ""
 
-#: src/main/seq.c:790 src/main/seq.c:856 src/main/seq.c:873
+#: src/main/seq.c:788 src/main/seq.c:854 src/main/seq.c:871
 msgid "'from' must be finite"
 msgstr ""
 
-#: src/main/seq.c:792 src/main/seq.c:858 src/main/seq.c:895
+#: src/main/seq.c:790 src/main/seq.c:856 src/main/seq.c:893
 msgid "'to' must be finite"
 msgstr ""
 
-#: src/main/seq.c:804
+#: src/main/seq.c:802
 msgid "invalid '(to - from)/by' in 'seq'"
 msgstr ""
 
-#: src/main/seq.c:816
+#: src/main/seq.c:814
 msgid "'by' argument is much too small"
 msgstr ""
 
-#: src/main/seq.c:818
+#: src/main/seq.c:816
 msgid "wrong sign in 'by' argument"
 msgstr ""
 
-#: src/main/seq.c:875 src/main/seq.c:897
+#: src/main/seq.c:873 src/main/seq.c:895
 msgid "'by' must be finite"
 msgstr ""
 
-#: src/main/seq.c:985 src/main/seq.c:990
+#: src/main/seq.c:983 src/main/seq.c:988
 msgid "argument must be coercible to non-negative integer"
 msgstr ""
 
-#: src/main/serialize.c:224 src/main/serialize.c:254 src/main/serialize.c:277
+#: src/main/serialize.c:228 src/main/serialize.c:275 src/main/serialize.c:299
 msgid "unknown or inappropriate output format"
 msgstr ""
 
-#: src/main/serialize.c:504
+#: src/main/serialize.c:542
 msgid "must specify ascii, binary, or xdr format"
 msgstr ""
 
-#: src/main/serialize.c:505
+#: src/main/serialize.c:543
 msgid "unknown output format"
 msgstr ""
 
-#: src/main/serialize.c:536
+#: src/main/serialize.c:574
 msgid "unknown input format"
 msgstr ""
 
-#: src/main/serialize.c:541
+#: src/main/serialize.c:579
 msgid "input format does not match specified format"
 msgstr ""
 
-#: src/main/serialize.c:752
+#: src/main/serialize.c:790
 msgid "no restore method available"
 msgstr ""
 
-#: src/main/serialize.c:794
+#: src/main/serialize.c:832
 msgid "names in persistent strings are currently ignored"
 msgstr ""
 
-#: src/main/serialize.c:963
+#: src/main/serialize.c:1001
 #, c-format
 msgid "'%s' may not be available when loading"
 msgstr ""
 
-#: src/main/serialize.c:970
+#: src/main/serialize.c:1008
 msgid "namespaces may not be available when loading"
 msgstr ""
 
-#: src/main/serialize.c:1097
+#: src/main/serialize.c:1136
 #, c-format
 msgid "WriteItem: unknown type %i"
 msgstr ""
 
-#: src/main/serialize.c:1273
+#: src/main/serialize.c:1312
 #, c-format
 msgid "version %d not supported"
 msgstr ""
 
-#: src/main/serialize.c:1305
+#: src/main/serialize.c:1343
 msgid "reference index out of range"
 msgstr ""
 
-#: src/main/serialize.c:1335
+#: src/main/serialize.c:1373
 msgid "names in persistent strings are not supported yet"
 msgstr ""
 
-#: src/main/serialize.c:1463
+#: src/main/serialize.c:1501
 msgid "negative serialized length for vector"
 msgstr ""
 
-#: src/main/serialize.c:1471
+#: src/main/serialize.c:1509
 msgid "invalid upper part of serialized vector length"
 msgstr ""
 
-#: src/main/serialize.c:1476
+#: src/main/serialize.c:1514
 msgid ""
 "negative serialized vector length:\n"
 "perhaps long vector from 64-bit version of R?"
 msgstr ""
 
-#: src/main/serialize.c:1707
+#: src/main/serialize.c:1746
 msgid "this version of R cannot read class references"
 msgstr ""
 
-#: src/main/serialize.c:1709
+#: src/main/serialize.c:1748
 msgid "this version of R cannot read generic function references"
 msgstr ""
 
-#: src/main/serialize.c:1726
+#: src/main/serialize.c:1765
 #, c-format
 msgid "ReadItem: unknown type %i, perhaps written by later version of R"
 msgstr ""
 
-#: src/main/serialize.c:1882
+#: src/main/serialize.c:1921
 #, c-format
 msgid ""
 "cannot read unreleased workspace version %d written by experimental R %d.%d."
 "%d"
 msgstr ""
 
-#: src/main/serialize.c:1886
+#: src/main/serialize.c:1925
 #, c-format
 msgid ""
 "cannot read workspace version %d written by R %d.%d.%d; need R %d.%d.%d or "
 "newer"
 msgstr ""
 
-#: src/main/serialize.c:1965
+#: src/main/serialize.c:2004
 msgid "read failed"
 msgstr ""
 
-#: src/main/serialize.c:2028
+#: src/main/serialize.c:2067
 msgid "error reading from ascii connection"
 msgstr ""
 
-#: src/main/serialize.c:2030
+#: src/main/serialize.c:2069
 msgid "unexpected format in ascii connection"
 msgstr ""
 
-#: src/main/serialize.c:2035 src/main/serialize.c:2049
+#: src/main/serialize.c:2074 src/main/serialize.c:2088
 msgid "error reading from connection"
 msgstr ""
 
-#: src/main/serialize.c:2090
+#: src/main/serialize.c:2130
 msgid "only ascii format can be written to text mode connections"
 msgstr ""
 
-#: src/main/serialize.c:2104
+#: src/main/serialize.c:2144
 msgid "only ascii format can be read from text mode connections"
 msgstr ""
 
-#: src/main/serialize.c:2159 src/main/serialize.c:2312
-#: src/main/serialize.c:2461
+#: src/main/serialize.c:2200 src/main/serialize.c:2353
+#: src/main/serialize.c:2502
 msgid "bad version value"
 msgstr ""
 
-#: src/main/serialize.c:2184
+#: src/main/serialize.c:2225
 msgid "binary-mode connection required for ascii=FALSE"
 msgstr ""
 
-#: src/main/serialize.c:2340 src/main/serialize.c:2377
-#: src/main/serialize.c:2440
+#: src/main/serialize.c:2381 src/main/serialize.c:2418
+#: src/main/serialize.c:2481
 msgid "serialization is too large to store in a raw vector"
 msgstr ""
 
-#: src/main/serialize.c:2357
+#: src/main/serialize.c:2398
 msgid "cannot allocate buffer"
 msgstr ""
 
-#: src/main/serialize.c:2546 src/main/serialize.c:2619
+#: src/main/serialize.c:2592 src/main/serialize.c:2665
 msgid "not a proper file name"
 msgstr ""
 
-#: src/main/serialize.c:2548
+#: src/main/serialize.c:2594
 msgid "not a proper raw vector"
 msgstr ""
 
-#: src/main/serialize.c:2569
+#: src/main/serialize.c:2615
 msgid "could not determine file position"
 msgstr ""
 
-#: src/main/serialize.c:2621
+#: src/main/serialize.c:2667
 msgid "bad offset/length argument"
 msgstr ""
 
-#: src/main/serialize.c:2645 src/main/serialize.c:2658
-#: src/main/serialize.c:2667 src/main/serialize.c:2677
-#: src/main/serialize.c:2690
+#: src/main/serialize.c:2691 src/main/serialize.c:2704
+#: src/main/serialize.c:2713 src/main/serialize.c:2723
+#: src/main/serialize.c:2736
 #, c-format
 msgid "seek failed on %s"
 msgstr ""
 
-#: src/main/serialize.c:2662 src/main/serialize.c:2671
-#: src/main/serialize.c:2681 src/main/serialize.c:2694
+#: src/main/serialize.c:2708 src/main/serialize.c:2717
+#: src/main/serialize.c:2727 src/main/serialize.c:2740
 #, c-format
 msgid "read failed on %s"
 msgstr ""
 
-#: src/main/serialize.c:2713
+#: src/main/serialize.c:2759
 msgid "bad environment"
 msgstr ""
 
-#: src/main/serialize.c:2715
+#: src/main/serialize.c:2761
 msgid "bad variable names"
 msgstr ""
 
@@ -5457,165 +5518,161 @@ msgstr ""
 msgid "only atomic vectors can be tested to be sorted"
 msgstr ""
 
-#: src/main/sort.c:326 src/main/sort.c:1228 src/main/sort.c:1396
+#: src/main/sort.c:325 src/main/sort.c:1248
 msgid "'decreasing' must be TRUE or FALSE"
 msgstr ""
 
-#: src/main/sort.c:329 src/main/sort.c:600
+#: src/main/sort.c:328 src/main/sort.c:599
 msgid "only atomic vectors can be sorted"
 msgstr ""
 
-#: src/main/sort.c:331 src/main/sort.c:602 src/main/sort.c:1297
+#: src/main/sort.c:330 src/main/sort.c:601 src/main/sort.c:1317
 msgid "raw vectors cannot be sorted"
 msgstr ""
 
-#: src/main/sort.c:613
+#: src/main/sort.c:612
 msgid "NA or infinite index"
 msgstr ""
 
-#: src/main/sort.c:616
+#: src/main/sort.c:615
 #, c-format
 msgid "index %ld outside bounds"
 msgstr ""
 
-#: src/main/sort.c:621 src/main/sort.c:634
+#: src/main/sort.c:620 src/main/sort.c:633
 msgid "NA index"
 msgstr ""
 
-#: src/main/sort.c:623 src/main/sort.c:636
+#: src/main/sort.c:622 src/main/sort.c:635
 #, c-format
 msgid "index %d outside bounds"
 msgstr ""
 
-#: src/main/sort.c:1237
+#: src/main/sort.c:1257
 #, c-format
 msgid "argument %d is not a vector"
 msgstr ""
 
-#: src/main/sort.c:1239
+#: src/main/sort.c:1259
 msgid "argument lengths differ"
 msgstr ""
 
-#: src/main/sort.c:1324
+#: src/main/sort.c:1344
 msgid "invalid ties.method for rank() [should never happen]"
 msgstr ""
 
-#: src/main/sort.c:1429
-msgid "too large a range of values in 'x'"
-msgstr ""
-
-#: src/main/source.c:215
+#: src/main/source.c:220
 msgid "coercion of 'text' to character was unsuccessful"
 msgstr ""
 
-#: src/main/source.c:231
+#: src/main/source.c:236
 #, c-format
 msgid "argument '%s = \"%s\"' will be ignored"
 msgstr ""
 
-#: src/main/split.c:38
+#: src/main/split.c:39
 msgid "first argument must be a vector"
 msgstr ""
 
-#: src/main/split.c:40
+#: src/main/split.c:41
 msgid "second argument must be a factor"
 msgstr ""
 
-#: src/main/split.c:45
+#: src/main/split.c:46
 msgid "group length is 0 but data length > 0"
 msgstr ""
 
-#: src/main/split.c:47
+#: src/main/split.c:48
 msgid "data length is not a multiple of split variable"
 msgstr ""
 
-#: src/main/split.c:56
+#: src/main/split.c:58
 msgid "factor has bad level"
 msgstr ""
 
-#: src/main/sprintf.c:94
+#: src/main/sprintf.c:97
 #, c-format
 msgid "required resulting string length %d is greater than maximal %d"
 msgstr ""
 
-#: src/main/sprintf.c:102
+#: src/main/sprintf.c:105
 msgid "'fmt' is not a character vector"
 msgstr ""
 
-#: src/main/sprintf.c:107
+#: src/main/sprintf.c:110
 #, c-format
 msgid "only %d arguments are allowed"
 msgstr ""
 
-#: src/main/sprintf.c:114
+#: src/main/sprintf.c:117
 #, c-format
 msgid "invalid type of argument[%d]: '%s'"
 msgstr ""
 
-#: src/main/sprintf.c:125 src/main/sprintf.c:128
+#: src/main/sprintf.c:128 src/main/sprintf.c:131
 msgid "arguments cannot be recycled to the same length"
 msgstr ""
 
-#: src/main/sprintf.c:150 src/main/sprintf.c:257
+#: src/main/sprintf.c:153 src/main/sprintf.c:260
 #, c-format
 msgid "'fmt' length exceeds maximal format length %d"
 msgstr ""
 
-#: src/main/sprintf.c:169
+#: src/main/sprintf.c:172
 #, c-format
 msgid "unrecognised format specification '%s'"
 msgstr ""
 
-#: src/main/sprintf.c:180 src/main/sprintf.c:186 src/main/sprintf.c:199
-#: src/main/sprintf.c:206
+#: src/main/sprintf.c:183 src/main/sprintf.c:189 src/main/sprintf.c:202
+#: src/main/sprintf.c:209
 #, c-format
 msgid "reference to non-existent argument %d"
 msgstr ""
 
-#: src/main/sprintf.c:218
+#: src/main/sprintf.c:221
 msgid "at most one asterisk '*' is supported in each conversion specification"
 msgstr ""
 
-#: src/main/sprintf.c:228
+#: src/main/sprintf.c:231
 msgid "argument for '*' conversion specification must be a number"
 msgstr ""
 
-#: src/main/sprintf.c:266
+#: src/main/sprintf.c:269
 msgid "coercion has changed vector length to 0"
 msgstr ""
 
-#: src/main/sprintf.c:339 src/main/sprintf.c:353 src/main/sprintf.c:367
-#: src/main/sprintf.c:402
+#: src/main/sprintf.c:343 src/main/sprintf.c:357 src/main/sprintf.c:371
+#: src/main/sprintf.c:406
 #, c-format
 msgid "invalid format '%s'; %s"
 msgstr ""
 
-#: src/main/sprintf.c:340
+#: src/main/sprintf.c:344
 #, c-format
 msgid "use format %d or %i for logical objects"
 msgstr ""
 
-#: src/main/sprintf.c:354
+#: src/main/sprintf.c:358
 #, c-format
 msgid "use format %d, %i, %o, %x or %X for integer objects"
 msgstr ""
 
-#: src/main/sprintf.c:368
+#: src/main/sprintf.c:372
 #, c-format
 msgid "use format %f, %e, %g or %a for numeric objects"
 msgstr ""
 
-#: src/main/sprintf.c:403
+#: src/main/sprintf.c:407
 #, c-format
 msgid "use format %s for character objects"
 msgstr ""
 
-#: src/main/sprintf.c:408
+#: src/main/sprintf.c:412
 #, c-format
 msgid "likely truncation of character string to %d characters"
 msgstr ""
 
-#: src/main/sprintf.c:417
+#: src/main/sprintf.c:421
 msgid "unsupported type"
 msgstr ""
 
@@ -5623,377 +5680,381 @@ msgstr ""
 msgid "R_LibraryFileName: buffer too small"
 msgstr ""
 
-#: src/main/subassign.c:117
+#: src/main/subassign.c:118
 msgid "attempt to enlarge non-vector"
 msgstr ""
 
-#: src/main/subassign.c:122
+#: src/main/subassign.c:123
 #, c-format
 msgid "assignment outside vector/list limits (extending from %d to %d)"
 msgstr ""
 
-#: src/main/subassign.c:367
+#: src/main/subassign.c:391
 #, c-format
 msgid "incompatible types (from %s to %s) in subassignment type fix"
 msgstr ""
 
-#: src/main/subassign.c:502 src/main/subassign.c:782 src/main/subassign.c:785
-#: src/main/subassign.c:1076
+#: src/main/subassign.c:550 src/main/subassign.c:830 src/main/subassign.c:833
+#: src/main/subassign.c:1133
 msgid "NAs are not allowed in subscripted assignments"
 msgstr ""
 
-#: src/main/subassign.c:520 src/main/subassign.c:796 src/main/subassign.c:1068
-#: src/main/subassign.c:1641
+#: src/main/subassign.c:568 src/main/subassign.c:844 src/main/subassign.c:1125
+#: src/main/subassign.c:1705
 msgid "replacement has length zero"
 msgstr ""
 
-#: src/main/subassign.c:522 src/main/subassign.c:798 src/main/subassign.c:1070
+#: src/main/subassign.c:570 src/main/subassign.c:846 src/main/subassign.c:1127
 msgid "number of items to replace is not a multiple of replacement length"
 msgstr ""
 
-#: src/main/subassign.c:766
+#: src/main/subassign.c:814
 msgid "incorrect number of subscripts on matrix"
 msgstr ""
 
-#: src/main/subassign.c:1022
+#: src/main/subassign.c:1079
 #, c-format
 msgid "incompatible types (from %s to %s) in matrix subset assignment"
 msgstr ""
 
-#: src/main/subassign.c:1038 src/main/subset.c:928
+#: src/main/subassign.c:1095 src/main/subset.c:957
 msgid "incorrect number of subscripts"
 msgstr ""
 
-#: src/main/subassign.c:1214
+#: src/main/subassign.c:1272
 #, c-format
 msgid "incompatible types (from %s to %s) in array subset assignment"
 msgstr ""
 
-#: src/main/subassign.c:1249 src/main/subassign.c:1270
+#: src/main/subassign.c:1308 src/main/subassign.c:1329
 msgid "invalid subscript in list assign"
 msgstr ""
 
-#: src/main/subassign.c:1263
+#: src/main/subassign.c:1322
 msgid "invalid number of subscripts to list assign"
 msgstr ""
 
-#: src/main/subassign.c:1361
+#: src/main/subassign.c:1421
 msgid "SubAssignArgs: invalid number of arguments"
 msgstr ""
 
-#: src/main/subassign.c:1506
+#: src/main/subassign.c:1566
 msgid "result is zero-length and so cannot be a language object"
 msgstr ""
 
-#: src/main/subassign.c:1611
+#: src/main/subassign.c:1665
 msgid ""
 "[[<- defined for objects of type \"S4\" only for subclasses of environment"
 msgstr ""
 
-#: src/main/subassign.c:1617
+#: src/main/subassign.c:1677
 msgid "wrong args for environment subassignment"
 msgstr ""
 
-#: src/main/subassign.c:1643
+#: src/main/subassign.c:1707
 msgid "more elements supplied than there are to replace"
 msgstr ""
 
-#: src/main/subassign.c:1645
+#: src/main/subassign.c:1709
 msgid "[[ ]] with missing subscript"
 msgstr ""
 
-#: src/main/subassign.c:1657 src/main/subassign.c:1675
+#: src/main/subassign.c:1727 src/main/subassign.c:1745
 msgid "[[ ]] subscript out of bounds"
 msgstr ""
 
-#: src/main/subassign.c:1663 src/main/subassign.c:1841
+#: src/main/subassign.c:1733 src/main/subassign.c:1914
 msgid "[[ ]] improper number of subscripts"
 msgstr ""
 
-#: src/main/subassign.c:1808
+#: src/main/subassign.c:1879
 #, c-format
 msgid "incompatible types (from %s to %s) in [[ assignment"
 msgstr ""
 
-#: src/main/subassign.c:1852
+#: src/main/subassign.c:1925
 #, c-format
 msgid "[[ ]] subscript (%d) out of bounds"
 msgstr ""
 
-#: src/main/subassign.c:1905 src/main/subscript.c:143 src/main/subscript.c:145
-#: src/main/subscript.c:274 src/main/subscript.c:276 src/main/subscript.c:826
-#: src/main/subscript.c:828 src/main/subscript.c:919 src/main/subscript.c:921
-#: src/main/subset.c:1109
+#: src/main/subassign.c:1986 src/main/subscript.c:151 src/main/subscript.c:278
+#: src/main/subscript.c:903 src/main/subscript.c:996 src/main/subset.c:1176
 #, c-format
 msgid "invalid subscript type '%s'"
 msgstr ""
 
-#: src/main/subassign.c:1950
+#: src/main/subassign.c:2037
 msgid "no method for assigning subsets of this S4 class"
 msgstr ""
 
-#: src/main/subassign.c:2008
+#: src/main/subassign.c:2095
 msgid "Coercing LHS to a list"
 msgstr ""
 
-#: src/main/subscript.c:53 src/main/subscript.c:75 src/main/subscript.c:180
-#: src/main/subscript.c:204
-msgid "attempt to select less than one element"
+#: src/main/subscript.c:59 src/main/subscript.c:81 src/main/subscript.c:185
+#: src/main/subscript.c:209
+#, c-format
+msgid "attempt to select less than one element in %s"
 msgstr ""
 
-#: src/main/subscript.c:57 src/main/subscript.c:72 src/main/subscript.c:178
-#: src/main/subscript.c:208 src/main/subscript.c:304
-msgid "attempt to select more than one element"
+#: src/main/subscript.c:63 src/main/subscript.c:78 src/main/subscript.c:183
+#: src/main/subscript.c:213 src/main/subscript.c:305
+#, c-format
+msgid "attempt to select more than one element in %s"
 msgstr ""
 
-#: src/main/subscript.c:184
+#: src/main/subscript.c:189
 msgid "internal error in use of recursive indexing"
 msgstr ""
 
-#: src/main/subscript.c:252
+#: src/main/subscript.c:257
 #, c-format
 msgid "further partial match of '%s' to '%s'"
 msgstr ""
 
-#: src/main/subscript.c:302
+#: src/main/subscript.c:303
 #, c-format
 msgid "recursive indexing failed at level %d\n"
 msgstr ""
 
-#: src/main/subscript.c:309
+#: src/main/subscript.c:313
 #, c-format
 msgid "no such index at level %d\n"
 msgstr ""
 
-#: src/main/subscript.c:352
+#: src/main/subscript.c:360
 msgid "incorrect number of columns in matrix subscript"
 msgstr ""
 
-#: src/main/subscript.c:371 src/main/subscript.c:389 src/main/subscript.c:413
+#: src/main/subscript.c:379 src/main/subscript.c:397 src/main/subscript.c:421
 msgid "negative values are not allowed in a matrix subscript"
 msgstr ""
 
-#: src/main/subscript.c:492
+#: src/main/subscript.c:500
 msgid "(subscript) logical subscript too long"
 msgstr ""
 
-#: src/main/subscript.c:590 src/main/subscript.c:645
+#: src/main/subscript.c:668 src/main/subscript.c:723
 msgid "only 0's may be mixed with negative subscripts"
 msgstr ""
 
-#: src/main/subscript.c:618
+#: src/main/subscript.c:696
 msgid "subscript too large for 32-bit R"
 msgstr ""
 
-#: src/main/subscript.c:817
+#: src/main/subscript.c:895
 msgid "no 'dimnames' attribute for array"
 msgstr ""
 
-#: src/main/subscript.c:857
+#: src/main/subscript.c:931
 msgid "subscripting on non-vector"
 msgstr ""
 
-#: src/main/subset.c:261
+#: src/main/subset.c:260
 msgid "dimensions would exceed maximum size of array"
 msgstr ""
 
-#: src/main/subset.c:304 src/main/subset.c:333
+#: src/main/subset.c:304 src/main/subset.c:334
 msgid "matrix subscripting not handled for this type"
 msgstr ""
 
-#: src/main/subset.c:488
+#: src/main/subset.c:493
 msgid "array subscripting not handled for this type"
 msgstr ""
 
-#: src/main/subset.c:827
+#: src/main/subset.c:856
 msgid "incorrect number of dimensions"
 msgstr ""
 
-#: src/main/subset.c:924
+#: src/main/subset.c:953
 msgid "no index specified"
 msgstr ""
 
-#: src/main/subset.c:934
+#: src/main/subset.c:963
 msgid "this S4 class is not subsettable"
 msgstr ""
 
-#: src/main/subset.c:940
+#: src/main/subset.c:970
 msgid "wrong arguments for subsetting an environment"
 msgstr ""
 
-#: src/main/summary.c:30
+#: src/main/summary.c:33
 #, c-format
 msgid "invalid 'type' (%s) of argument"
 msgstr ""
 
-#: src/main/summary.c:66 src/main/summary.c:78 src/main/summary.c:103
+#: src/main/summary.c:69 src/main/summary.c:81 src/main/summary.c:106
 msgid "integer overflow - use sum(as.numeric(.))"
 msgstr ""
 
-#: src/main/summary.c:522
+#: src/main/summary.c:526
 #, c-format
 msgid "internal error ('op = %d' in do_summary).\t Call a Guru"
 msgstr ""
 
-#: src/main/summary.c:623
+#: src/main/summary.c:637
 msgid "Integer overflow - use sum(as.numeric(.))"
 msgstr ""
 
-#: src/main/summary.c:731
+#: src/main/summary.c:750
 msgid "no non-missing arguments, returning NA"
 msgstr ""
 
-#: src/main/summary.c:734
+#: src/main/summary.c:753
 msgid "no non-missing arguments to min; returning Inf"
 msgstr ""
 
-#: src/main/summary.c:736
+#: src/main/summary.c:755
 msgid "no non-missing arguments to max; returning -Inf"
 msgstr ""
 
-#: src/main/summary.c:801
-msgid "non-numeric argument"
-msgstr ""
-
-#: src/main/summary.c:845
+#: src/main/summary.c:913
 msgid "argument to 'which' is not logical"
 msgstr ""
 
-#: src/main/summary.c:889
+#: src/main/summary.c:957
 msgid "no arguments"
 msgstr ""
 
-#: src/main/summary.c:900 src/main/summary.c:917
+#: src/main/summary.c:968 src/main/summary.c:985
 msgid "invalid input type"
 msgstr ""
 
-#: src/main/summary.c:934
+#: src/main/summary.c:1002
 msgid "an argument will be fractionally recycled"
 msgstr ""
 
-#: src/main/sysutils.c:69 src/main/sysutils.c:83
+#: src/main/sysutils.c:68 src/main/sysutils.c:82
 #, c-format
 msgid "cannot determine file modification time of '%s'"
 msgstr ""
 
-#: src/main/sysutils.c:167
+#: src/main/sysutils.c:166
 msgid "encoding of a filename cannot be 'bytes'"
 msgstr ""
 
-#: src/main/sysutils.c:170 src/main/sysutils.c:803 src/main/sysutils.c:818
-#: src/main/sysutils.c:909 src/main/sysutils.c:924 src/main/sysutils.c:1020
+#: src/main/sysutils.c:169 src/main/sysutils.c:831 src/main/sysutils.c:846
+#: src/main/sysutils.c:975
 #, c-format
 msgid "unsupported conversion from '%s' in codepage %d"
 msgstr ""
 
-#: src/main/sysutils.c:179
+#: src/main/sysutils.c:178
 msgid "file name conversion problem -- name too long?"
 msgstr ""
 
-#: src/main/sysutils.c:180
+#: src/main/sysutils.c:179
 msgid "file name conversion problem"
 msgstr ""
 
-#: src/main/sysutils.c:249
+#: src/main/sysutils.c:248
 msgid "invalid filename pattern"
 msgstr ""
 
-#: src/main/sysutils.c:253
+#: src/main/sysutils.c:252
 msgid "invalid file extension"
 msgstr ""
 
-#: src/main/sysutils.c:255
+#: src/main/sysutils.c:254
 msgid "no 'pattern'"
 msgstr ""
 
-#: src/main/sysutils.c:257
+#: src/main/sysutils.c:256
 msgid "no 'tempdir'"
 msgstr ""
 
-#: src/main/sysutils.c:259
+#: src/main/sysutils.c:258
 msgid "no 'fileext'"
 msgstr ""
 
-#: src/main/sysutils.c:345 src/main/sysutils.c:348 src/main/sysutils.c:439
-#: src/main/sysutils.c:441 src/main/sysutils.c:477
+#: src/main/sysutils.c:328
+#, c-format
+msgid "system call failed: %s"
+msgstr ""
+
+#: src/main/sysutils.c:357 src/main/sysutils.c:360 src/main/sysutils.c:451
+#: src/main/sysutils.c:453 src/main/sysutils.c:489
 msgid "wrong type for argument"
 msgstr ""
 
-#: src/main/sysutils.c:443
+#: src/main/sysutils.c:455
 msgid "wrong length for argument"
 msgstr ""
 
-#: src/main/sysutils.c:464
+#: src/main/sysutils.c:476
 msgid "'Sys.setenv' is not available on this system"
 msgstr ""
 
-#: src/main/sysutils.c:508
+#: src/main/sysutils.c:520
 msgid "this system cannot unset environment variables: setting to \"\""
 msgstr ""
 
-#: src/main/sysutils.c:519
+#: src/main/sysutils.c:531
 msgid "'Sys.unsetenv' is not available on this system"
 msgstr ""
 
-#: src/main/sysutils.c:616
+#: src/main/sysutils.c:628
 #, c-format
 msgid "unsupported conversion from '%s' to '%s' in codepage %d"
 msgstr ""
 
-#: src/main/sysutils.c:631
+#: src/main/sysutils.c:643
 msgid "'x' must be a character vector"
 msgstr ""
 
-#: src/main/sysutils.c:646
-msgid "'x' must be a list of NULL or raw vectors"
+#: src/main/sysutils.c:658
+msgid "'x' must be a character vector or a list of NULL or raw vectors"
 msgstr ""
 
-#: src/main/sysutils.c:724 src/main/sysutils.c:789 src/main/sysutils.c:895
-#: src/main/sysutils.c:994 src/main/sysutils.c:1010 src/main/sysutils.c:1087
+#: src/main/sysutils.c:736 src/main/sysutils.c:914 src/main/sysutils.c:932
+#: src/main/sysutils.c:949 src/main/sysutils.c:965 src/main/sysutils.c:1042
 #, c-format
 msgid "'%s' must be called on a CHARSXP"
 msgstr ""
 
-#: src/main/sysutils.c:792 src/main/sysutils.c:898 src/main/sysutils.c:1015
-#: src/main/sysutils.c:1090
+#: src/main/sysutils.c:805 src/main/sysutils.c:970 src/main/sysutils.c:1045
 msgid "translating strings with \"bytes\" encoding is not allowed"
 msgstr ""
 
-#: src/main/sysutils.c:1116
+#: src/main/sysutils.c:818
+msgid "internal error: no translation needed"
+msgstr ""
+
+#: src/main/sysutils.c:1071
 #, c-format
 msgid "unsupported conversion to '%s' from codepage %d"
 msgstr ""
 
-#: src/main/sysutils.c:1530
+#: src/main/sysutils.c:1486
 #, c-format
 msgid "invalid Unicode point %u"
 msgstr ""
 
-#: src/main/sysutils.c:1632
+#: src/main/sysutils.c:1588
 msgid "cannot create 'R_TempDir'"
 msgstr ""
 
-#: src/main/sysutils.c:1636 src/main/sysutils.c:1644 src/main/sysutils.c:1647
+#: src/main/sysutils.c:1592 src/main/sysutils.c:1600 src/main/sysutils.c:1603
 msgid "unable to set R_SESSION_TMPDIR"
 msgstr ""
 
-#: src/main/sysutils.c:1656
+#: src/main/sysutils.c:1612
 msgid "cannot allocate 'R_TempDir'"
 msgstr ""
 
-#: src/main/sysutils.c:1693
+#: src/main/sysutils.c:1649
 msgid "temporary name too long"
 msgstr ""
 
-#: src/main/sysutils.c:1708
+#: src/main/sysutils.c:1664
 msgid "cannot find unused tempfile name"
 msgstr ""
 
-#: src/main/sysutils.c:1711
+#: src/main/sysutils.c:1667
 msgid "allocation failed in R_tmpnam2"
 msgstr ""
 
-#: src/main/sysutils.c:1838
+#: src/main/sysutils.c:1794
 msgid "'dirmark = TRUE' is not supported on this platform"
 msgstr ""
 
@@ -6003,193 +6064,199 @@ msgid "length %d is too large for hashing"
 msgstr ""
 
 #: src/main/unique.c:490 src/main/unique.c:519 src/main/unique.c:549
-#: src/main/unique.c:575 src/main/unique.c:614
+#: src/main/unique.c:573 src/main/unique.c:612
 msgid "'duplicated' applies only to vectors"
 msgstr ""
 
-#: src/main/unique.c:619
+#: src/main/unique.c:617
 msgid "any_duplicated3(., <0-length incomp>)"
 msgstr ""
 
-#: src/main/unique.c:669
+#: src/main/unique.c:667
 msgid "'fromLast' must be length 1"
 msgstr ""
 
-#: src/main/unique.c:672
+#: src/main/unique.c:670
 msgid "'fromLast' must be TRUE or FALSE"
 msgstr ""
 
-#: src/main/unique.c:683
+#: src/main/unique.c:681
 #, c-format
 msgid "%s() applies only to vectors"
 msgstr ""
 
-#: src/main/unique.c:690
+#: src/main/unique.c:688
 msgid "'nmax' must be positive"
 msgstr ""
 
-#: src/main/unique.c:922
+#: src/main/unique.c:985
 msgid "'match' requires vector arguments"
 msgstr ""
 
-#: src/main/unique.c:970 src/main/unique.c:1125
+#: src/main/unique.c:1033 src/main/unique.c:1171
 msgid "argument is not of mode character"
 msgstr ""
 
-#: src/main/unique.c:1251
+#: src/main/unique.c:1296
 msgid "... used in a situation where it does not exist"
 msgstr ""
 
-#: src/main/unique.c:1342
-msgid "unable to find a closure from within which 'match.call' was called"
+#: src/main/unique.c:1302
+msgid "... is not a pairlist"
 msgstr ""
 
-#: src/main/unique.c:1536
+#: src/main/unique.c:1531
 msgid "non-numeric data frame in rowsum"
 msgstr ""
 
-#: src/main/unique.c:1568
+#: src/main/unique.c:1563
 msgid "this cannot happen"
 msgstr ""
 
-#: src/main/unique.c:1639
+#: src/main/unique.c:1634
 msgid "'names' must be a character vector"
 msgstr ""
 
-#: src/main/unique.c:1643
-msgid "'sep' must be a character string"
-msgstr ""
-
-#: src/main/util.c:88 src/main/util.c:106
+#: src/main/util.c:87 src/main/util.c:105
 msgid "object is not a matrix"
 msgstr ""
 
-#: src/main/util.c:254 src/main/util.c:268 src/main/util.c:285
+#: src/main/util.c:303 src/main/util.c:315 src/main/util.c:326
+#: src/main/util.c:341
 #, c-format
 msgid "type %d is unimplemented in '%s'"
 msgstr ""
 
-#: src/main/util.c:297
+#: src/main/util.c:352
 #, c-format
 msgid "unimplemented type '%s' in '%s'\n"
 msgstr ""
 
-#: src/main/util.c:299
+#: src/main/util.c:354
 #, c-format
 msgid "unimplemented type (%d) in '%s'\n"
 msgstr ""
 
-#: src/main/util.c:424
+#: src/main/util.c:479
 msgid "invalid tag in name extraction"
 msgstr ""
 
-#: src/main/util.c:434
+#: src/main/util.c:489
 #, c-format
 msgid "%d argument passed to .Internal(%s) which requires %d"
 msgid_plural "%d arguments passed to .Internal(%s) which requires %d"
 msgstr[0] ""
 msgstr[1] ""
 
-#: src/main/util.c:440
+#: src/main/util.c:495
 #, c-format
 msgid "%d argument passed to '%s' which requires %d"
 msgid_plural "%d arguments passed to '%s' which requires %d"
 msgstr[0] ""
 msgstr[1] ""
 
-#: src/main/util.c:455
+#: src/main/util.c:510
 #, c-format
 msgid "supplied argument name '%s' does not match '%s'"
 msgstr ""
 
-#: src/main/util.c:465
+#: src/main/util.c:520
 #, c-format
 msgid "'nthcdr' list shorter than %d"
 msgstr ""
 
-#: src/main/util.c:470
+#: src/main/util.c:525
 msgid "'nthcdr' needs a list to CDR down"
 msgstr ""
 
-#: src/main/util.c:586
+#: src/main/util.c:641
 msgid "'all.x' must be TRUE or FALSE"
 msgstr ""
 
-#: src/main/util.c:588
+#: src/main/util.c:643
 msgid "'all.y' must be TRUE or FALSE"
 msgstr ""
 
-#: src/main/util.c:700
+#: src/main/util.c:672
+msgid "number of rows in the result exceeds maximum vector length"
+msgstr ""
+
+#: src/main/util.c:764
 msgid "missing value is invalid"
 msgstr ""
 
-#: src/main/util.c:709 src/main/util.c:716
+#: src/main/util.c:773 src/main/util.c:780
 msgid "cannot change working directory"
 msgstr ""
 
-#: src/main/util.c:735 src/main/util.c:769 src/main/util.c:810
-#: src/main/util.c:852 src/main/util.c:981 src/main/util.c:1040
-#: src/main/util.c:1063
+#: src/main/util.c:800 src/main/util.c:834 src/main/util.c:875
+#: src/main/util.c:917 src/main/util.c:1046 src/main/util.c:1105
+#: src/main/util.c:1128
 msgid "a character vector argument expected"
 msgstr ""
 
-#: src/main/util.c:742 src/main/util.c:777 src/main/util.c:819
-#: src/main/util.c:860
+#: src/main/util.c:807 src/main/util.c:842 src/main/util.c:884
+#: src/main/util.c:925
 msgid "path too long"
 msgstr ""
 
-#: src/main/util.c:995
+#: src/main/util.c:1060
 msgid "only the first character of 'quote' will be used"
 msgstr ""
 
-#: src/main/util.c:1065
+#: src/main/util.c:1130
 msgid "a character vector 'value' expected"
 msgstr ""
 
-#: src/main/util.c:1068
+#: src/main/util.c:1133
 msgid "'value' must be of positive length"
 msgstr ""
 
-#: src/main/util.c:1197 src/main/util.c:1205
+#: src/main/util.c:1262 src/main/util.c:1270
 #, c-format
 msgid "invalid input '%s' in 'utf8towcs'"
 msgstr ""
 
-#: src/main/util.c:1290
+#: src/main/util.c:1355
 #, c-format
 msgid "invalid multibyte string at '%s'"
 msgstr ""
 
-#: src/main/util.c:1399
+#: src/main/util.c:1497
 msgid "error message truncated to 255 chars"
 msgstr ""
 
-#: src/main/util.c:1412
+#: src/main/util.c:1510
 msgid "warning message truncated to 255 chars"
 msgstr ""
 
-#: src/main/util.c:1819
+#: src/main/util.c:1659
+#, c-format
+msgid "accuracy loss in conversion from \"%s\" to numeric"
+msgstr ""
+
+#: src/main/util.c:1969
 msgid "all arguments must be named"
 msgstr ""
 
-#: src/main/util.c:1893
+#: src/main/util.c:2091
 msgid "ICU is not supported on this build"
 msgstr ""
 
-#: src/main/util.c:1954
+#: src/main/util.c:2158
 msgid "'breaks' is not sorted"
 msgstr ""
 
-#: src/main/util.c:1988 src/main/util.c:2034
+#: src/main/util.c:2192 src/main/util.c:2242
 #, c-format
 msgid "long vector '%s' is not supported"
 msgstr ""
 
-#: src/main/util.c:2087
+#: src/main/util.c:2296
 msgid "'eps.correct' must be 0, 1, or 2"
 msgstr ""
 
-#: src/main/util.c:2115
+#: src/main/util.c:2324
 msgid "'x' must be a vector"
 msgstr ""
 
@@ -6223,14 +6290,6 @@ msgid ""
 "\n"
 msgstr ""
 
-#: src/main/vfonts.c:50
-msgid "vfont routines cannot be accessed in module"
-msgstr ""
-
-#: src/main/vfonts.c:67 src/main/vfonts.c:80 src/main/vfonts.c:98
-msgid "Hershey fonts cannot be loaded"
-msgstr ""
-
 #: src/main/xspline.c:60
 #, c-format
 msgid "add_point - reached MAXNUMPTS (%d)"
@@ -6252,7 +6311,7 @@ msgstr ""
 msgid "There must be at least three control points"
 msgstr ""
 
-#: src/modules/X11/dataentry.c:1871 src/modules/X11/devX11.c:1246
+#: src/modules/X11/dataentry.c:1874 src/modules/X11/devX11.c:1248
 #, c-format
 msgid "X11 protocol error: %s"
 msgstr ""
@@ -6273,34 +6332,34 @@ msgid ""
 "Consider using X11 with colortype=\"pseudo.cube\" or \"gray\"."
 msgstr ""
 
-#: src/modules/X11/devX11.c:1027
+#: src/modules/X11/devX11.c:1029
 msgid ""
 "could not find any X11 fonts\n"
 "Check that the Font Path is correct."
 msgstr ""
 
-#: src/modules/X11/devX11.c:1087
+#: src/modules/X11/devX11.c:1089
 #, c-format
 msgid "X11 used font size %d when %d was requested"
 msgstr ""
 
-#: src/modules/X11/devX11.c:1121
+#: src/modules/X11/devX11.c:1123
 #, c-format
 msgid "X11 font %s, face %d at size %d could not be loaded"
 msgstr ""
 
-#: src/modules/X11/devX11.c:1130
+#: src/modules/X11/devX11.c:1132
 msgid ""
 "semi-transparency is not supported on this device: reported only once per "
 "page"
 msgstr ""
 
-#: src/modules/X11/devX11.c:1254
+#: src/modules/X11/devX11.c:1256
 #, c-format
 msgid "X11 I/O error while opening X11 connection to '%s'"
 msgstr ""
 
-#: src/modules/X11/devX11.c:1272
+#: src/modules/X11/devX11.c:1273
 msgid "X11 fatal IO error: please save work and shut down R"
 msgstr ""
 
@@ -6421,206 +6480,264 @@ msgstr ""
 msgid "attempt to use the locator after dev.hold()"
 msgstr ""
 
-#: src/modules/X11/devX11.c:3111
+#: src/modules/X11/devX11.c:3117
 #, c-format
 msgid "unable to start device %s"
 msgstr ""
 
-#: src/modules/X11/devX11.c:3138
+#: src/modules/X11/devX11.c:3144
 msgid "invalid 'width' or 'height'"
 msgstr ""
 
-#: src/modules/X11/devX11.c:3145
+#: src/modules/X11/devX11.c:3151
 msgid "invalid colortype passed to X11 driver"
 msgstr ""
 
-#: src/modules/X11/devX11.c:3159
+#: src/modules/X11/devX11.c:3165
 msgid "unknown X11 color/colour model -- using monochrome"
 msgstr ""
 
-#: src/modules/X11/devX11.c:3249
+#: src/modules/X11/devX11.c:3255
 msgid "no plot on device to save"
 msgstr ""
 
-#: src/modules/X11/devX11.c:3251
+#: src/modules/X11/devX11.c:3257
 msgid "not an open X11cairo device"
 msgstr ""
 
-#: src/modules/X11/devX11.c:3260
+#: src/modules/X11/devX11.c:3266
 #, c-format
 msgid "cannot open file '%s'"
 msgstr ""
 
-#: src/modules/X11/devX11.c:3277
+#: src/modules/X11/devX11.c:3283
 msgid "savePlot() is not supported on this build"
 msgstr ""
 
-#: src/modules/X11/devX11.c:3317
+#: src/modules/X11/devX11.c:3323
 msgid "unable to contact X11 display"
 msgstr ""
 
-#: src/modules/X11/devX11.c:3366
+#: src/modules/X11/devX11.c:3372
 #, c-format
 msgid "clipboard cannot be read (error code %d)"
 msgstr ""
 
-#: src/modules/X11/devX11.c:3397
+#: src/modules/X11/devX11.c:3408
 msgid "cannot allocate memory for X11Routines structure"
 msgstr ""
 
-#: src/modules/internet/internet.c:188 src/modules/internet/internet.c:192
-#: src/modules/internet/internet.c:198 src/modules/internet/internet.c:210
+#: src/modules/internet/internet.c:113
+msgid "for https:// URLs use method = \"wininet\""
+msgstr ""
+
+#: src/modules/internet/internet.c:153 src/modules/internet/internet.c:274
+#: src/modules/internet/internet.c:758
+#, c-format
+msgid "scheme not supported in URL '%s'"
+msgstr ""
+
+#: src/modules/internet/internet.c:348 src/modules/internet/internet.c:352
+#: src/modules/internet/internet.c:357 src/modules/internet/internet.c:381
+#: src/modules/internet/libcurl.c:791 src/modules/internet/libcurl.c:795
+#: src/modules/internet/libcurl.c:801 src/modules/internet/libcurl.c:814
+#: src/modules/internet/libcurl.c:822
 msgid "allocation of url connection failed"
 msgstr ""
 
-#: src/modules/internet/internet.c:286
+#: src/modules/internet/internet.c:455
 msgid "only first element of 'url' argument used"
 msgstr ""
 
-#: src/modules/internet/internet.c:292
+#: src/modules/internet/internet.c:461
 msgid "only first element of 'destfile' argument used"
 msgstr ""
 
-#: src/modules/internet/internet.c:317
+#: src/modules/internet/internet.c:480 src/modules/internet/libcurl.c:499
 msgid "Download progress"
 msgstr ""
 
-#: src/modules/internet/internet.c:339
+#: src/modules/internet/internet.c:502
 #, c-format
 msgid "cannot open URL '%s', reason '%s'"
 msgstr ""
 
-#: src/modules/internet/internet.c:346 src/modules/internet/internet.c:372
-#: src/modules/internet/internet.c:474
+#: src/modules/internet/internet.c:509 src/modules/internet/internet.c:536
+#: src/modules/internet/internet.c:661
 #, c-format
 msgid "cannot open destfile '%s', reason '%s'"
 msgstr ""
 
-#: src/modules/internet/internet.c:377 src/modules/internet/internet.c:479
+#: src/modules/internet/internet.c:541 src/modules/internet/internet.c:666
+#: src/modules/internet/libcurl.c:530
 #, c-format
 msgid "trying URL '%s'\n"
 msgstr ""
 
-#: src/modules/internet/internet.c:384 src/modules/internet/internet.c:486
-msgid "opened URL\n"
+#: src/modules/internet/internet.c:640 src/modules/internet/internet.c:751
+#: src/modules/internet/libcurl.c:578
+#, c-format
+msgid "downloaded length %0.f != reported length %0.f"
 msgstr ""
 
-#: src/modules/internet/internet.c:455 src/modules/internet/internet.c:560
+#: src/modules/internet/internet.c:645 src/modules/internet/internet.c:756
 #, c-format
-msgid "downloaded length %d != reported length %d"
+msgid "cannot open URL '%s'"
 msgstr ""
 
-#: src/modules/internet/internet.c:460 src/modules/internet/internet.c:565
+#: src/modules/internet/internet.c:779 src/modules/internet/internet.c:944
 #, c-format
-msgid "cannot open URL '%s'"
+msgid "cannot open URL '%s': HTTP status was '%d %s'"
 msgstr ""
 
-#: src/modules/internet/internet.c:593 src/modules/internet/internet.c:828
+#: src/modules/internet/internet.c:915 src/modules/internet/internet.c:929
+#: src/modules/internet/internet.c:1019 src/modules/internet/internet.c:1028
 #, c-format
-msgid "cannot open: HTTP status was '%d %s'"
+msgid "InternetOpenUrl failed: '%s'"
 msgstr ""
 
-#: src/modules/internet/internet.c:772 src/modules/internet/internet.c:935
-msgid "InternetOpenUrl timed out"
+#: src/modules/internet/libcurl.c:159
+#, c-format
+msgid "URL '%s': status was '%d %s'"
 msgstr ""
 
-#: src/modules/internet/internet.c:799 src/modules/internet/internet.c:813
-#: src/modules/internet/internet.c:957 src/modules/internet/internet.c:966
+#: src/modules/internet/libcurl.c:163
 #, c-format
-msgid "InternetOpenUrl failed: '%s'"
+msgid "URL '%s': status was '%s'"
+msgstr ""
+
+#: src/modules/internet/libcurl.c:240
+msgid "curlGetHeaders is not supported on this platform"
 msgstr ""
 
-#: src/modules/internet/internet.c:870
-msgid "Internet read timed out"
+#: src/modules/internet/libcurl.c:249 src/modules/internet/libcurl.c:252
+#, c-format
+msgid "invalid %s argument"
+msgstr ""
+
+#: src/modules/internet/libcurl.c:269
+#, c-format
+msgid ""
+"libcurl error code %d\n"
+"\t%s\n"
+msgstr ""
+
+#: src/modules/internet/libcurl.c:404
+msgid "download.file(method = \"libcurl\") is not supported on this platform"
+msgstr ""
+
+#: src/modules/internet/libcurl.c:420
+msgid "lengths of 'url' and 'destfile' must match"
+msgstr ""
+
+#: src/modules/internet/libcurl.c:481
+#, c-format
+msgid "URL %s: cannot open destfile '%s', reason '%s'"
 msgstr ""
 
-#: src/modules/internet/nanoftp.c:288 src/modules/internet/nanoftp.c:301
-#: src/modules/internet/nanoftp.c:312 src/modules/internet/nanoftp.c:346
-#: src/modules/internet/nanoftp.c:356
+#: src/modules/internet/libcurl.c:593
+msgid "cannot download all files"
+msgstr ""
+
+#: src/modules/internet/libcurl.c:727
+msgid "cannot read from connection"
+msgstr ""
+
+#: src/modules/internet/libcurl.c:763
+msgid "cannot open connection"
+msgstr ""
+
+#: src/modules/internet/libcurl.c:826
+msgid "url(method = \"libcurl\") is not supported on this platform"
+msgstr ""
+
+#: src/modules/internet/nanoftp.c:289 src/modules/internet/nanoftp.c:302
+#: src/modules/internet/nanoftp.c:313 src/modules/internet/nanoftp.c:347
+#: src/modules/internet/nanoftp.c:357
 msgid "RxmlNanoFTPScanURL: overlong (invalid?) URL"
 msgstr ""
 
-#: src/modules/internet/nanoftp.c:389
+#: src/modules/internet/nanoftp.c:390
 msgid "removing FTP proxy info"
 msgstr ""
 
-#: src/modules/internet/nanoftp.c:391
+#: src/modules/internet/nanoftp.c:392
 #, c-format
 msgid "using FTP proxy '%s'"
 msgstr ""
 
-#: src/modules/internet/nanoftp.c:402 src/modules/internet/nanoftp.c:431
+#: src/modules/internet/nanoftp.c:403 src/modules/internet/nanoftp.c:432
 msgid "RxmlNanoFTPScanProxy: overlong (invalid?) URL"
 msgstr ""
 
-#: src/modules/internet/nanoftp.c:830
+#: src/modules/internet/nanoftp.c:833
 msgid "cannot resolve host"
 msgstr ""
 
-#: src/modules/internet/nanoftp.c:860
+#: src/modules/internet/nanoftp.c:863
 msgid "failed to connect to server"
 msgstr ""
 
-#: src/modules/internet/nanoftp.c:871
+#: src/modules/internet/nanoftp.c:874
 msgid "failed to get response from server"
 msgstr ""
 
-#: src/modules/internet/nanoftp.c:1134
+#: src/modules/internet/nanoftp.c:1137
 msgid "RxmlNanoFTPGetConnection: failed to create socket"
 msgstr ""
 
-#: src/modules/internet/nanoftp.c:1180
+#: src/modules/internet/nanoftp.c:1183
 msgid "failed to create a data connection"
 msgstr ""
 
-#: src/modules/internet/nanoftp.c:1188
+#: src/modules/internet/nanoftp.c:1191
 msgid "failed to bind a port"
 msgstr ""
 
-#: src/modules/internet/nanoftp.c:1195
+#: src/modules/internet/nanoftp.c:1198
 #, c-format
 msgid "could not listen on port %d"
 msgstr ""
 
-#: src/modules/internet/nanohttp.c:370 src/modules/internet/nanohttp.c:398
-#: src/modules/internet/nanohttp.c:407
+#: src/modules/internet/nanohttp.c:369 src/modules/internet/nanohttp.c:400
+#: src/modules/internet/nanohttp.c:412
 msgid "RxmlNanoHTTPScanURL: overlong (invalid?) URL"
 msgstr ""
 
-#: src/modules/internet/nanohttp.c:441
+#: src/modules/internet/nanohttp.c:446
 msgid "removing HTTP proxy info"
 msgstr ""
 
-#: src/modules/internet/nanohttp.c:443
+#: src/modules/internet/nanohttp.c:448
 #, c-format
 msgid "using HTTP proxy '%s'"
 msgstr ""
 
-#: src/modules/internet/nanohttp.c:454 src/modules/internet/nanohttp.c:490
+#: src/modules/internet/nanohttp.c:459 src/modules/internet/nanohttp.c:497
 msgid "RxmlNanoHTTPScanProxy: overlong (invalid?) URL"
 msgstr ""
 
-#: src/modules/internet/nanohttp.c:1107
+#: src/modules/internet/nanohttp.c:1135
 #, c-format
 msgid "unable to resolve '%s'"
 msgstr ""
 
-#: src/modules/internet/nanohttp.c:1134
+#: src/modules/internet/nanohttp.c:1168
 #, c-format
 msgid "connected to '%s' on port %d."
 msgstr ""
 
-#: src/modules/internet/nanohttp.c:1139
+#: src/modules/internet/nanohttp.c:1173
 #, c-format
 msgid "unable to connect to '%s' on port %d."
 msgstr ""
 
-#: src/modules/internet/nanohttp.c:1443
+#: src/modules/internet/nanohttp.c:1477
 #, c-format
 msgid "redirect to: '%s'"
 msgstr ""
 
-#: src/modules/internet/nanohttp.c:1454
+#: src/modules/internet/nanohttp.c:1488
 msgid "too many redirects, aborting ..."
 msgstr ""
 
@@ -6653,11 +6770,11 @@ msgstr ""
 #: src/modules/lapack/Lapack.c:730 src/modules/lapack/Lapack.c:779
 #: src/modules/lapack/Lapack.c:786 src/modules/lapack/Lapack.c:834
 #: src/modules/lapack/Lapack.c:840 src/modules/lapack/Lapack.c:894
-#: src/modules/lapack/Lapack.c:900 src/modules/lapack/Lapack.c:1134
-#: src/modules/lapack/Lapack.c:1140 src/modules/lapack/Lapack.c:1188
-#: src/modules/lapack/Lapack.c:1195 src/modules/lapack/Lapack.c:1199
-#: src/modules/lapack/Lapack.c:1227 src/modules/lapack/Lapack.c:1234
-#: src/modules/lapack/Lapack.c:1254
+#: src/modules/lapack/Lapack.c:900 src/modules/lapack/Lapack.c:1135
+#: src/modules/lapack/Lapack.c:1141 src/modules/lapack/Lapack.c:1189
+#: src/modules/lapack/Lapack.c:1196 src/modules/lapack/Lapack.c:1200
+#: src/modules/lapack/Lapack.c:1228 src/modules/lapack/Lapack.c:1235
+#: src/modules/lapack/Lapack.c:1255
 #, c-format
 msgid "error code %d from Lapack routine '%s'"
 msgstr ""
@@ -6737,28 +6854,28 @@ msgstr ""
 msgid "'a' must be a complex matrix"
 msgstr ""
 
-#: src/modules/lapack/Lapack.c:535 src/modules/lapack/Lapack.c:1042
+#: src/modules/lapack/Lapack.c:535 src/modules/lapack/Lapack.c:1043
 msgid "'a' is 0-diml"
 msgstr ""
 
-#: src/modules/lapack/Lapack.c:537 src/modules/lapack/Lapack.c:1044
+#: src/modules/lapack/Lapack.c:537 src/modules/lapack/Lapack.c:1045
 #, c-format
 msgid "'a' (%d x %d) must be square"
 msgstr ""
 
-#: src/modules/lapack/Lapack.c:543 src/modules/lapack/Lapack.c:1050
+#: src/modules/lapack/Lapack.c:543 src/modules/lapack/Lapack.c:1051
 msgid "no right-hand side in 'b'"
 msgstr ""
 
 #: src/modules/lapack/Lapack.c:546 src/modules/lapack/Lapack.c:560
-#: src/modules/lapack/Lapack.c:1053 src/modules/lapack/Lapack.c:1069
+#: src/modules/lapack/Lapack.c:1054 src/modules/lapack/Lapack.c:1070
 #, c-format
 msgid "'b' (%d x %d) must be compatible with 'a' (%d x %d)"
 msgstr ""
 
 #: src/modules/lapack/Lapack.c:581 src/modules/lapack/Lapack.c:948
-#: src/modules/lapack/Lapack.c:962 src/modules/lapack/Lapack.c:1017
-#: src/modules/lapack/Lapack.c:1091
+#: src/modules/lapack/Lapack.c:962 src/modules/lapack/Lapack.c:1018
+#: src/modules/lapack/Lapack.c:1092
 #, c-format
 msgid "argument %d of Lapack routine %s had invalid value"
 msgstr ""
@@ -6768,7 +6885,7 @@ msgid "'b' must be a complex matrix"
 msgstr ""
 
 #: src/modules/lapack/Lapack.c:670 src/modules/lapack/Lapack.c:716
-#: src/modules/lapack/Lapack.c:1181 src/modules/lapack/Lapack.c:1220
+#: src/modules/lapack/Lapack.c:1182 src/modules/lapack/Lapack.c:1221
 #, c-format
 msgid "right-hand side should have %d not %d rows"
 msgstr ""
@@ -6785,13 +6902,13 @@ msgstr ""
 msgid "'x' must be a square complex matrix"
 msgstr ""
 
-#: src/modules/lapack/Lapack.c:926 src/modules/lapack/Lapack.c:1000
-#: src/modules/lapack/Lapack.c:1039 src/modules/lapack/Lapack.c:1114
-#: src/modules/lapack/Lapack.c:1245
+#: src/modules/lapack/Lapack.c:926 src/modules/lapack/Lapack.c:1001
+#: src/modules/lapack/Lapack.c:1040 src/modules/lapack/Lapack.c:1115
+#: src/modules/lapack/Lapack.c:1246
 msgid "'a' must be a numeric matrix"
 msgstr ""
 
-#: src/modules/lapack/Lapack.c:933 src/modules/lapack/Lapack.c:1250
+#: src/modules/lapack/Lapack.c:933 src/modules/lapack/Lapack.c:1251
 msgid "'a' must be a square matrix"
 msgstr ""
 
@@ -6808,40 +6925,40 @@ msgstr ""
 msgid "the matrix is either rank-deficient or indefinite"
 msgstr ""
 
-#: src/modules/lapack/Lapack.c:987
+#: src/modules/lapack/Lapack.c:988
 msgid "'size' argument must be a positive integer"
 msgstr ""
 
-#: src/modules/lapack/Lapack.c:1002
+#: src/modules/lapack/Lapack.c:1003
 #, c-format
 msgid "'size' cannot exceed ncol(x) = %d"
 msgstr ""
 
-#: src/modules/lapack/Lapack.c:1003
+#: src/modules/lapack/Lapack.c:1004
 #, c-format
 msgid "'size' cannot exceed nrow(x) = %d"
 msgstr ""
 
-#: src/modules/lapack/Lapack.c:1015
+#: src/modules/lapack/Lapack.c:1016
 #, c-format
 msgid "element (%d, %d) is zero, so the inverse cannot be computed"
 msgstr ""
 
-#: src/modules/lapack/Lapack.c:1094
+#: src/modules/lapack/Lapack.c:1095
 #, c-format
 msgid "Lapack routine %s: system is exactly singular: U[%d,%d] = 0"
 msgstr ""
 
-#: src/modules/lapack/Lapack.c:1102
+#: src/modules/lapack/Lapack.c:1103
 #, c-format
 msgid "system is computationally singular: reciprocal condition number = %g"
 msgstr ""
 
-#: src/modules/lapack/Lapack.c:1174 src/modules/lapack/Lapack.c:1212
+#: src/modules/lapack/Lapack.c:1175 src/modules/lapack/Lapack.c:1213
 msgid "'b' must be a numeric matrix"
 msgstr ""
 
-#: src/modules/lapack/Lapack.c:1246
+#: src/modules/lapack/Lapack.c:1247
 msgid "argument 'logarithm' must be logical"
 msgstr ""
 
@@ -6851,7 +6968,7 @@ msgstr ""
 
 #: src/nmath/bessel_i.c:77 src/nmath/bessel_i.c:122
 #, c-format
-msgid "bessel_i(%g): ncalc (=%ld) != nb (=%ld); alpha=%g. Arg. out of range?\n"
+msgid "bessel_i(%g): ncalc (=%d) != nb (=%d); alpha=%g. Arg. out of range?\n"
 msgstr ""
 
 #: src/nmath/bessel_i.c:80 src/nmath/bessel_i.c:125
@@ -6859,16 +6976,21 @@ msgstr ""
 msgid "bessel_i(%g,nu=%g): precision lost in result\n"
 msgstr ""
 
-#: src/nmath/bessel_j.c:67
+#: src/nmath/bessel_j.c:64 src/nmath/bessel_j.c:118
+#, c-format
+msgid "besselJ(x, nu): nu=%g too large for bessel_j() algorithm"
+msgstr ""
+
+#: src/nmath/bessel_j.c:72
 msgid "bessel_j allocation error"
 msgstr ""
 
-#: src/nmath/bessel_j.c:75 src/nmath/bessel_j.c:118
+#: src/nmath/bessel_j.c:80 src/nmath/bessel_j.c:127
 #, c-format
-msgid "bessel_j(%g): ncalc (=%ld) != nb (=%ld); alpha=%g. Arg. out of range?\n"
+msgid "bessel_j(%g): ncalc (=%d) != nb (=%d); alpha=%g. Arg. out of range?\n"
 msgstr ""
 
-#: src/nmath/bessel_j.c:78 src/nmath/bessel_j.c:121
+#: src/nmath/bessel_j.c:83 src/nmath/bessel_j.c:130
 #, c-format
 msgid "bessel_j(%g,nu=%g): precision lost in result\n"
 msgstr ""
@@ -6879,7 +7001,7 @@ msgstr ""
 
 #: src/nmath/bessel_k.c:71 src/nmath/bessel_k.c:108
 #, c-format
-msgid "bessel_k(%g): ncalc (=%ld) != nb (=%ld); alpha=%g. Arg. out of range?\n"
+msgid "bessel_k(%g): ncalc (=%d) != nb (=%d); alpha=%g. Arg. out of range?\n"
 msgstr ""
 
 #: src/nmath/bessel_k.c:74 src/nmath/bessel_k.c:111
@@ -6887,16 +7009,21 @@ msgstr ""
 msgid "bessel_k(%g,nu=%g): precision lost in result\n"
 msgstr ""
 
-#: src/nmath/bessel_y.c:66
+#: src/nmath/bessel_y.c:63 src/nmath/bessel_y.c:125
+#, c-format
+msgid "besselY(x, nu): nu=%g too large for bessel_y() algorithm"
+msgstr ""
+
+#: src/nmath/bessel_y.c:71
 msgid "bessel_y allocation error"
 msgstr ""
 
-#: src/nmath/bessel_y.c:82 src/nmath/bessel_y.c:127
+#: src/nmath/bessel_y.c:87 src/nmath/bessel_y.c:136
 #, c-format
-msgid "bessel_y(%g): ncalc (=%ld) != nb (=%ld); alpha=%g. Arg. out of range?\n"
+msgid "bessel_y(%g): ncalc (=%d) != nb (=%d); alpha=%g. Arg. out of range?\n"
 msgstr ""
 
-#: src/nmath/bessel_y.c:85 src/nmath/bessel_y.c:130
+#: src/nmath/bessel_y.c:90 src/nmath/bessel_y.c:139
 #, c-format
 msgid "bessel_y(%g,nu=%g): precision lost in result\n"
 msgstr ""
@@ -6906,42 +7033,42 @@ msgstr ""
 msgid "'k' (%.2f) must be integer, rounded to %.0f"
 msgstr ""
 
-#: src/nmath/nmath.h:141
+#: src/nmath/nmath.h:156
 #, c-format
 msgid "argument out of domain in '%s'\n"
 msgstr ""
 
-#: src/nmath/nmath.h:144
+#: src/nmath/nmath.h:159
 #, c-format
 msgid "value out of range in '%s'\n"
 msgstr ""
 
-#: src/nmath/nmath.h:147
+#: src/nmath/nmath.h:162
 #, c-format
 msgid "convergence failed in '%s'\n"
 msgstr ""
 
-#: src/nmath/nmath.h:150
+#: src/nmath/nmath.h:165
 #, c-format
 msgid "full precision may not have been achieved in '%s'\n"
 msgstr ""
 
-#: src/nmath/nmath.h:153
+#: src/nmath/nmath.h:168
 #, c-format
 msgid "underflow occurred in '%s'\n"
 msgstr ""
 
-#: src/nmath/pbeta.c:48
+#: src/nmath/pbeta.c:64
 #, c-format
-msgid "pbeta_raw() -> bratio() gave error code %d"
+msgid "pbeta_raw(%g, a=%g, b=%g, ..) -> bratio() gave error code %d"
 msgstr ""
 
-#: src/nmath/pnbinom.c:79
+#: src/nmath/pnbinom.c:82
 #, c-format
 msgid "pnbinom_mu() -> bratio() gave error code %d"
 msgstr ""
 
-#: src/nmath/pnchisq.c:246
+#: src/nmath/pnchisq.c:295
 #, c-format
 msgid "pnchisq(x=%g, ..): not converged in %d iter."
 msgstr ""
@@ -6983,7 +7110,7 @@ msgstr ""
 msgid "X11 module cannot be loaded"
 msgstr ""
 
-#: src/unix/X11.c:126 src/unix/X11.c:132 src/unix/X11.c:138 src/unix/X11.c:144
+#: src/unix/X11.c:144 src/unix/X11.c:150 src/unix/X11.c:156 src/unix/X11.c:162
 msgid "X11 is not available"
 msgstr ""
 
@@ -7009,7 +7136,7 @@ msgid ""
 "Explicit lazy dynamic loading not supported on this platform. Using default."
 msgstr ""
 
-#: src/unix/dynload.c:240
+#: src/unix/dynload.c:232
 msgid "cannot get working directory!"
 msgstr ""
 
@@ -7023,93 +7150,93 @@ msgid ""
 "report using bug.report()"
 msgstr ""
 
-#: src/unix/sys-std.c:1082 src/unix/sys-std.c:1249
+#: src/unix/sys-std.c:1085 src/unix/sys-std.c:1255
 #, c-format
 msgid "problem in saving the history file '%s'"
 msgstr ""
 
-#: src/unix/sys-std.c:1156
+#: src/unix/sys-std.c:1162
 #, c-format
 msgid ""
 "Cannot open file '%s': %s\n"
 "\n"
 msgstr ""
 
-#: src/unix/sys-std.c:1220 src/unix/sys-std.c:1243
+#: src/unix/sys-std.c:1226 src/unix/sys-std.c:1249
 msgid "'file' argument is too long"
 msgstr ""
 
-#: src/unix/sys-std.c:1226 src/unix/sys-std.c:1228
+#: src/unix/sys-std.c:1232 src/unix/sys-std.c:1234
 msgid "no history mechanism available"
 msgstr ""
 
-#: src/unix/sys-std.c:1255
+#: src/unix/sys-std.c:1261
 msgid "problem in truncating the history file"
 msgstr ""
 
-#: src/unix/sys-std.c:1257 src/unix/sys-std.c:1259
+#: src/unix/sys-std.c:1263 src/unix/sys-std.c:1265
 msgid "no history available to save"
 msgstr ""
 
-#: src/unix/sys-std.c:1271
+#: src/unix/sys-std.c:1277
 msgid "invalid timestamp"
 msgstr ""
 
-#: src/unix/sys-unix.c:251
+#: src/unix/sys-unix.c:248
 msgid "non-empty character argument expected"
 msgstr ""
 
-#: src/unix/sys-unix.c:254
+#: src/unix/sys-unix.c:251
 msgid "'intern' must be logical and not NA"
 msgstr ""
 
-#: src/unix/sys-unix.c:266
+#: src/unix/sys-unix.c:269
 #, c-format
 msgid "cannot popen '%s', probable reason '%s'"
 msgstr ""
 
-#: src/unix/sys-unix.c:271
+#: src/unix/sys-unix.c:279
 #, c-format
 msgid "line %d may be truncated in call to system(, intern = TRUE)"
 msgstr ""
 
-#: src/unix/sys-unix.c:288
+#: src/unix/sys-unix.c:301
 #, c-format
 msgid "error in running command: '%s'"
 msgstr ""
 
-#: src/unix/sys-unix.c:290
+#: src/unix/sys-unix.c:303
 msgid "error in running command"
 msgstr ""
 
-#: src/unix/sys-unix.c:294
+#: src/unix/sys-unix.c:307
 #, c-format
 msgid "running command '%s' had status %d and error message '%s'"
 msgstr ""
 
-#: src/unix/sys-unix.c:399
+#: src/unix/sys-unix.c:412
 msgid "Sys.info() is not implemented on this system"
 msgstr ""
 
-#: src/unix/system.c:257
+#: src/unix/system.c:267
 #, c-format
 msgid "WARNING: --gui or -g without value ignored"
 msgstr ""
 
-#: src/unix/system.c:275
+#: src/unix/system.c:285
 #, c-format
 msgid "WARNING: unknown gui '%s', using X11\n"
 msgstr ""
 
-#: src/unix/system.c:278
+#: src/unix/system.c:288
 #, c-format
 msgid "WARNING: unknown gui '%s', using none\n"
 msgstr ""
 
-#: src/unix/system.c:388
+#: src/unix/system.c:373
 msgid "creating temporary file for '-e' failed"
 msgstr ""
 
-#: src/unix/system.c:469
+#: src/unix/system.c:454
 msgid "WARNING: Only editing the first in the list of files"
 msgstr ""
diff --git a/src/library/base/po/en_GB.po b/src/library/base/po/en_GB.po
index 2824015..a786b3d 100644
--- a/src/library/base/po/en_GB.po
+++ b/src/library/base/po/en_GB.po
@@ -6,12 +6,12 @@
 msgid ""
 msgstr ""
 "Project-Id-Version: R 2.1.0\n"
-"Report-Msgid-Bugs-To: bugs.r-project.org\n"
-"POT-Creation-Date: 2014-03-27 07:46+0000\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2016-04-01 10:28-0700\n"
 "PO-Revision-Date: 2008-02-18 11:38+0000\n"
 "Last-Translator: Prof Brian Ripley <ripley at stats.ox.ac.uk>\n"
 "Language-Team: English\n"
-"Language: \n"
+"Language: en_GB\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=ISO-8859-1\n"
 "Content-Transfer-Encoding: 8bit\n"
@@ -50,15 +50,15 @@ msgstr ""
 msgid "unknown type in \"CG\" method of 'optim'"
 msgstr ""
 
-#: src/appl/optim.c:665
+#: src/appl/optim.c:662
 msgid "REPORT must be > 0 (method = \"L-BFGS-B\")"
 msgstr ""
 
-#: src/appl/optim.c:688
+#: src/appl/optim.c:685
 msgid "L-BFGS-B needs finite values of 'fn'"
 msgstr ""
 
-#: src/appl/optim.c:744
+#: src/appl/optim.c:741
 msgid "trace, REPORT must be >= 0 (method = \"SANN\")"
 msgstr ""
 
@@ -123,122 +123,127 @@ msgstr ""
 msgid "problem in displaying '%ls'"
 msgstr ""
 
-#: src/gnuwin32/extra.c:116 src/gnuwin32/extra.c:159 src/gnuwin32/extra.c:349
-#: src/gnuwin32/extra.c:577 src/gnuwin32/extra.c:602 src/main/agrep.c:131
-#: src/main/agrep.c:135 src/main/agrep.c:775 src/main/agrep.c:780
-#: src/main/apply.c:293 src/main/apply.c:295 src/main/apply.c:298
-#: src/main/array.c:87 src/main/array.c:1137 src/main/array.c:1263
-#: src/main/array.c:1265 src/main/array.c:1266 src/main/array.c:1592
-#: src/main/array.c:1594 src/main/array.c:1596 src/main/attrib.c:196
+#: src/gnuwin32/extra.c:116 src/gnuwin32/extra.c:158 src/gnuwin32/extra.c:348
+#: src/gnuwin32/extra.c:574 src/gnuwin32/extra.c:599 src/main/agrep.c:131
+#: src/main/agrep.c:135 src/main/agrep.c:776 src/main/agrep.c:781
+#: src/main/apply.c:330 src/main/apply.c:332 src/main/apply.c:335
+#: src/main/array.c:90 src/main/array.c:1272 src/main/array.c:1411
+#: src/main/array.c:1413 src/main/array.c:1414 src/main/array.c:1758
+#: src/main/array.c:1760 src/main/array.c:1762 src/main/attrib.c:190
 #: src/main/builtin.c:88 src/main/builtin.c:97 src/main/builtin.c:116
-#: src/main/builtin.c:118 src/main/builtin.c:147 src/main/builtin.c:534
-#: src/main/builtin.c:550 src/main/builtin.c:739 src/main/builtin.c:741
-#: src/main/builtin.c:743 src/main/character.c:139 src/main/character.c:142
-#: src/main/character.c:203 src/main/character.c:1037
-#: src/main/character.c:1041 src/main/character.c:1276
-#: src/main/character.c:1280 src/main/character.c:1341
-#: src/main/character.c:1344 src/main/connections.c:1217
-#: src/main/connections.c:1223 src/main/connections.c:1226
-#: src/main/connections.c:1230 src/main/connections.c:1375
-#: src/main/connections.c:1391 src/main/connections.c:1396
-#: src/main/connections.c:1996 src/main/connections.c:2002
-#: src/main/connections.c:2006 src/main/connections.c:2010
-#: src/main/connections.c:2015 src/main/connections.c:2665
-#: src/main/connections.c:2670 src/main/connections.c:2673
-#: src/main/connections.c:2676 src/main/connections.c:3057
-#: src/main/connections.c:3062 src/main/connections.c:3068
-#: src/main/connections.c:3071 src/main/connections.c:3075
-#: src/main/connections.c:3090 src/main/connections.c:3140
-#: src/main/connections.c:3145 src/main/connections.c:3149
-#: src/main/connections.c:3153 src/main/connections.c:3157
-#: src/main/connections.c:3163 src/main/connections.c:3210
-#: src/main/connections.c:3216 src/main/connections.c:3220
-#: src/main/connections.c:3270 src/main/connections.c:3273
-#: src/main/connections.c:3547 src/main/connections.c:3550
-#: src/main/connections.c:3553 src/main/connections.c:3559
-#: src/main/connections.c:3666 src/main/connections.c:3672
-#: src/main/connections.c:3675 src/main/connections.c:3826
-#: src/main/connections.c:3829 src/main/connections.c:3833
-#: src/main/connections.c:3836 src/main/connections.c:3956
-#: src/main/connections.c:4074 src/main/connections.c:4077
-#: src/main/connections.c:4414 src/main/connections.c:4439
-#: src/main/connections.c:4474 src/main/connections.c:4489
-#: src/main/connections.c:4497 src/main/connections.c:4523
-#: src/main/connections.c:4669 src/main/connections.c:4673
-#: src/main/connections.c:4801 src/main/connections.c:4803
-#: src/main/connections.c:4805 src/main/connections.c:4833
-#: src/main/connections.c:4965 src/main/connections.c:4991
-#: src/main/connections.c:4995 src/main/connections.c:4999
-#: src/main/connections.c:5003 src/main/context.c:596 src/main/context.c:605
-#: src/main/context.c:609 src/main/datetime.c:775 src/main/datetime.c:865
-#: src/main/datetime.c:867 src/main/datetime.c:871 src/main/datetime.c:1026
-#: src/main/datetime.c:1028 src/main/datetime.c:1232 src/main/debug.c:228
-#: src/main/deparse.c:397 src/main/dotcode.c:478 src/main/dotcode.c:482
-#: src/main/dotcode.c:487 src/main/dounzip.c:322 src/main/dounzip.c:329
-#: src/main/dounzip.c:339 src/main/dounzip.c:344 src/main/dounzip.c:348
-#: src/main/dounzip.c:352 src/main/envir.c:1618 src/main/envir.c:1621
-#: src/main/envir.c:1742 src/main/envir.c:1747 src/main/envir.c:1813
-#: src/main/envir.c:1829 src/main/envir.c:1835 src/main/envir.c:1932
-#: src/main/envir.c:1940 src/main/envir.c:1947 src/main/envir.c:1958
-#: src/main/envir.c:2172 src/main/envir.c:2293 src/main/envir.c:2552
-#: src/main/envir.c:2762 src/main/envir.c:2776 src/main/envir.c:2783
-#: src/main/envir.c:2799 src/main/envir.c:3367 src/main/errors.c:1030
-#: src/main/eval.c:397 src/main/eval.c:406 src/main/eval.c:409
-#: src/main/grep.c:767 src/main/grep.c:772 src/main/grep.c:1061
-#: src/main/grep.c:1063 src/main/grep.c:1065 src/main/grep.c:1510
-#: src/main/grep.c:1514 src/main/grep.c:1519 src/main/grep.c:2323
-#: src/main/grep.c:2328 src/main/grep.c:2621 src/main/grep.c:2626
-#: src/main/memory.c:3736 src/main/paste.c:96 src/main/paste.c:395
-#: src/main/paste.c:402 src/main/paste.c:409 src/main/paste.c:414
-#: src/main/paste.c:419 src/main/paste.c:424 src/main/paste.c:427
-#: src/main/paste.c:435 src/main/paste.c:601 src/main/paste.c:606
+#: src/main/builtin.c:118 src/main/builtin.c:149 src/main/builtin.c:569
+#: src/main/builtin.c:585 src/main/builtin.c:773 src/main/builtin.c:775
+#: src/main/builtin.c:777 src/main/character.c:239 src/main/character.c:242
+#: src/main/character.c:247 src/main/character.c:788 src/main/character.c:791
+#: src/main/character.c:1289 src/main/character.c:1293
+#: src/main/character.c:1528 src/main/character.c:1532
+#: src/main/character.c:1593 src/main/character.c:1596
+#: src/main/connections.c:1208 src/main/connections.c:1214
+#: src/main/connections.c:1217 src/main/connections.c:1221
+#: src/main/connections.c:1367 src/main/connections.c:1383
+#: src/main/connections.c:1388 src/main/connections.c:1989
+#: src/main/connections.c:1995 src/main/connections.c:1999
+#: src/main/connections.c:2003 src/main/connections.c:2008
+#: src/main/connections.c:2659 src/main/connections.c:2664
+#: src/main/connections.c:2667 src/main/connections.c:2670
+#: src/main/connections.c:3053 src/main/connections.c:3058
+#: src/main/connections.c:3064 src/main/connections.c:3067
+#: src/main/connections.c:3071 src/main/connections.c:3086
+#: src/main/connections.c:3135 src/main/connections.c:3140
+#: src/main/connections.c:3144 src/main/connections.c:3148
+#: src/main/connections.c:3152 src/main/connections.c:3158
+#: src/main/connections.c:3203 src/main/connections.c:3209
+#: src/main/connections.c:3213 src/main/connections.c:3264
+#: src/main/connections.c:3267 src/main/connections.c:3543
+#: src/main/connections.c:3546 src/main/connections.c:3549
+#: src/main/connections.c:3555 src/main/connections.c:3662
+#: src/main/connections.c:3668 src/main/connections.c:3671
+#: src/main/connections.c:3823 src/main/connections.c:3826
+#: src/main/connections.c:3830 src/main/connections.c:3833
+#: src/main/connections.c:3954 src/main/connections.c:4085
+#: src/main/connections.c:4088 src/main/connections.c:4425
+#: src/main/connections.c:4450 src/main/connections.c:4485
+#: src/main/connections.c:4500 src/main/connections.c:4508
+#: src/main/connections.c:4534 src/main/connections.c:4680
+#: src/main/connections.c:4684 src/main/connections.c:4814
+#: src/main/connections.c:4816 src/main/connections.c:4818
+#: src/main/connections.c:4846 src/main/connections.c:4980
+#: src/main/connections.c:5019 src/main/connections.c:5024
+#: src/main/connections.c:5029 src/main/connections.c:5050
+#: src/main/context.c:607 src/main/context.c:616 src/main/context.c:620
+#: src/main/datetime.c:781 src/main/datetime.c:869 src/main/datetime.c:872
+#: src/main/datetime.c:876 src/main/datetime.c:1043 src/main/datetime.c:1045
+#: src/main/datetime.c:1250 src/main/debug.c:245 src/main/deparse.c:408
+#: src/main/dotcode.c:496 src/main/dotcode.c:500 src/main/dotcode.c:505
+#: src/main/dounzip.c:323 src/main/dounzip.c:330 src/main/dounzip.c:340
+#: src/main/dounzip.c:345 src/main/dounzip.c:349 src/main/dounzip.c:353
+#: src/main/envir.c:1752 src/main/envir.c:1755 src/main/envir.c:1876
+#: src/main/envir.c:1881 src/main/envir.c:1945 src/main/envir.c:1961
+#: src/main/envir.c:1967 src/main/envir.c:2079 src/main/envir.c:2087
+#: src/main/envir.c:2094 src/main/envir.c:2105 src/main/envir.c:2337
+#: src/main/envir.c:2458 src/main/envir.c:2755 src/main/envir.c:3022
+#: src/main/envir.c:3036 src/main/envir.c:3043 src/main/envir.c:3059
+#: src/main/envir.c:3642 src/main/errors.c:1011 src/main/eval.c:454
+#: src/main/eval.c:463 src/main/eval.c:466 src/main/grep.c:780
+#: src/main/grep.c:785 src/main/grep.c:1079 src/main/grep.c:1081
+#: src/main/grep.c:1083 src/main/grep.c:1528 src/main/grep.c:1532
+#: src/main/grep.c:1537 src/main/grep.c:2345 src/main/grep.c:2350
+#: src/main/grep.c:2652 src/main/grep.c:2657 src/main/memory.c:3823
+#: src/main/paste.c:96 src/main/paste.c:392 src/main/paste.c:399
+#: src/main/paste.c:406 src/main/paste.c:411 src/main/paste.c:416
+#: src/main/paste.c:421 src/main/paste.c:424 src/main/paste.c:432
+#: src/main/paste.c:437 src/main/paste.c:619 src/main/paste.c:624
 #: src/main/platform.c:306 src/main/platform.c:308 src/main/platform.c:310
 #: src/main/platform.c:326 src/main/platform.c:337 src/main/platform.c:390
-#: src/main/platform.c:392 src/main/platform.c:705 src/main/platform.c:707
-#: src/main/platform.c:1064 src/main/platform.c:1070 src/main/platform.c:1073
-#: src/main/platform.c:1076 src/main/platform.c:1079 src/main/platform.c:1082
-#: src/main/platform.c:1085 src/main/platform.c:1088 src/main/platform.c:1185
-#: src/main/platform.c:1188 src/main/platform.c:1191 src/main/platform.c:1229
-#: src/main/platform.c:1286 src/main/platform.c:1289 src/main/platform.c:1498
-#: src/main/platform.c:1501 src/main/platform.c:1504 src/main/platform.c:1540
-#: src/main/platform.c:1543 src/main/platform.c:1546 src/main/platform.c:1629
-#: src/main/platform.c:1645 src/main/platform.c:1684 src/main/platform.c:1686
-#: src/main/platform.c:1757 src/main/platform.c:1841 src/main/platform.c:2116
-#: src/main/platform.c:2176 src/main/platform.c:2353 src/main/platform.c:2356
-#: src/main/platform.c:2359 src/main/platform.c:2362 src/main/platform.c:2365
-#: src/main/platform.c:2368 src/main/platform.c:2568 src/main/platform.c:2571
-#: src/main/platform.c:2574 src/main/platform.c:2577 src/main/platform.c:2580
-#: src/main/platform.c:2583 src/main/platform.c:2657 src/main/platform.c:2665
-#: src/main/platform.c:2701 src/main/platform.c:2751 src/main/print.c:242
-#: src/main/print.c:248 src/main/print.c:270 src/main/print.c:276
-#: src/main/print.c:283 src/main/random.c:478 src/main/random.c:482
-#: src/main/random.c:489 src/main/random.c:517 src/main/saveload.c:1950
-#: src/main/saveload.c:1953 src/main/saveload.c:1956 src/main/saveload.c:2072
-#: src/main/saveload.c:2252 src/main/saveload.c:2257 src/main/saveload.c:2260
+#: src/main/platform.c:392 src/main/platform.c:708 src/main/platform.c:710
+#: src/main/platform.c:800 src/main/platform.c:1138 src/main/platform.c:1144
+#: src/main/platform.c:1147 src/main/platform.c:1150 src/main/platform.c:1153
+#: src/main/platform.c:1156 src/main/platform.c:1159 src/main/platform.c:1162
+#: src/main/platform.c:1259 src/main/platform.c:1262 src/main/platform.c:1265
+#: src/main/platform.c:1303 src/main/platform.c:1361 src/main/platform.c:1364
+#: src/main/platform.c:1573 src/main/platform.c:1576 src/main/platform.c:1579
+#: src/main/platform.c:1615 src/main/platform.c:1618 src/main/platform.c:1621
+#: src/main/platform.c:1657 src/main/platform.c:1690 src/main/platform.c:1692
+#: src/main/platform.c:1763 src/main/platform.c:1848 src/main/platform.c:2089
+#: src/main/platform.c:2149 src/main/platform.c:2334 src/main/platform.c:2337
+#: src/main/platform.c:2340 src/main/platform.c:2343 src/main/platform.c:2346
+#: src/main/platform.c:2349 src/main/platform.c:2555 src/main/platform.c:2558
+#: src/main/platform.c:2561 src/main/platform.c:2564 src/main/platform.c:2567
+#: src/main/platform.c:2570 src/main/platform.c:2648 src/main/platform.c:2656
+#: src/main/platform.c:2692 src/main/platform.c:2742 src/main/print.c:235
+#: src/main/print.c:241 src/main/print.c:263 src/main/print.c:269
+#: src/main/print.c:276 src/main/random.c:470 src/main/random.c:474
+#: src/main/random.c:481 src/main/random.c:509 src/main/saveload.c:1952
+#: src/main/saveload.c:1955 src/main/saveload.c:1958 src/main/saveload.c:2074
+#: src/main/saveload.c:2254 src/main/saveload.c:2259 src/main/saveload.c:2262
 #: src/main/saveload.c:2366 src/main/scan.c:684 src/main/scan.c:853
 #: src/main/scan.c:867 src/main/scan.c:871 src/main/scan.c:873
 #: src/main/scan.c:884 src/main/scan.c:911 src/main/scan.c:914
-#: src/main/scan.c:917 src/main/scan.c:972 src/main/seq.c:618
-#: src/main/seq.c:623 src/main/seq.c:631 src/main/seq.c:662 src/main/seq.c:666
-#: src/main/seq.c:672 src/main/seq.c:680 src/main/sort.c:175
-#: src/main/sysutils.c:585 src/main/sysutils.c:589 src/main/sysutils.c:593
-#: src/main/sysutils.c:599 src/main/sysutils.c:603 src/main/sysutils.c:1831
-#: src/main/sysutils.c:1835 src/main/unique.c:966 src/main/unique.c:1289
-#: src/main/unique.c:1349 src/main/unique.c:1356 src/main/unique.c:1750
-#: src/main/util.c:581 src/main/util.c:584 src/main/util.c:1825
-#: src/main/util.c:1994 src/main/util.c:1995 src/main/util.c:1996
-#: src/main/util.c:2013 src/main/util.c:2037 src/main/util.c:2041
-#: src/main/util.c:2043 src/main/util.c:2068 src/main/util.c:2070
-#: src/main/util.c:2072 src/main/util.c:2075 src/main/util.c:2078
-#: src/main/util.c:2082 src/main/util.c:2084 src/modules/X11/devX11.c:3241
-#: src/modules/X11/devX11.c:3244 src/modules/X11/devX11.c:3247
-#: src/modules/X11/devX11.c:3271 src/modules/internet/internet.c:284
-#: src/modules/internet/internet.c:290 src/modules/internet/internet.c:296
-#: src/modules/internet/internet.c:299 src/modules/internet/internet.c:303
+#: src/main/scan.c:917 src/main/scan.c:972 src/main/seq.c:622
+#: src/main/seq.c:627 src/main/seq.c:635 src/main/seq.c:666 src/main/seq.c:670
+#: src/main/seq.c:676 src/main/seq.c:684 src/main/sort.c:175
+#: src/main/sysutils.c:597 src/main/sysutils.c:601 src/main/sysutils.c:605
+#: src/main/sysutils.c:611 src/main/sysutils.c:615 src/main/sysutils.c:1787
+#: src/main/sysutils.c:1791 src/main/unique.c:1029 src/main/unique.c:1337
+#: src/main/unique.c:1341 src/main/unique.c:1351 src/main/unique.c:1747
+#: src/main/util.c:636 src/main/util.c:639 src/main/util.c:1379
+#: src/main/util.c:1393 src/main/util.c:1975 src/main/util.c:2198
+#: src/main/util.c:2199 src/main/util.c:2200 src/main/util.c:2217
+#: src/main/util.c:2245 src/main/util.c:2249 src/main/util.c:2251
+#: src/main/util.c:2277 src/main/util.c:2279 src/main/util.c:2281
+#: src/main/util.c:2284 src/main/util.c:2287 src/main/util.c:2291
+#: src/main/util.c:2293 src/modules/X11/devX11.c:3247
+#: src/modules/X11/devX11.c:3250 src/modules/X11/devX11.c:3253
+#: src/modules/X11/devX11.c:3277 src/modules/internet/internet.c:453
+#: src/modules/internet/internet.c:459 src/modules/internet/internet.c:465
+#: src/modules/internet/internet.c:468 src/modules/internet/internet.c:472
+#: src/modules/internet/internet.c:477 src/modules/internet/libcurl.c:414
+#: src/modules/internet/libcurl.c:418 src/modules/internet/libcurl.c:423
+#: src/modules/internet/libcurl.c:426 src/modules/internet/libcurl.c:430
 #: src/modules/lapack/Lapack.c:155 src/modules/lapack/Lapack.c:261
 #: src/modules/lapack/Lapack.c:709 src/modules/lapack/Lapack.c:818
-#: src/modules/lapack/Lapack.c:880 src/modules/lapack/Lapack.c:1214
-#: src/unix/sys-std.c:1217 src/unix/sys-std.c:1240
+#: src/modules/lapack/Lapack.c:880 src/modules/lapack/Lapack.c:1215
+#: src/unix/sys-std.c:1223 src/unix/sys-std.c:1246
 #, c-format
 msgid "invalid '%s' argument"
 msgstr ""
@@ -247,358 +252,335 @@ msgstr ""
 msgid "unsupported version of Windows"
 msgstr ""
 
-#: src/gnuwin32/extra.c:267 src/main/apply.c:105 src/main/character.c:595
-#: src/main/connections.c:3555 src/main/context.c:642 src/main/context.c:661
-#: src/main/datetime.c:675 src/main/datetime.c:777 src/main/datetime.c:1030
-#: src/main/dotcode.c:199 src/main/errors.c:929 src/main/errors.c:962
-#: src/main/errors.c:1065 src/main/errors.c:1090 src/main/errors.c:1095
-#: src/main/errors.c:1368 src/main/identical.c:66 src/main/identical.c:67
-#: src/main/identical.c:68 src/main/identical.c:69 src/main/identical.c:70
-#: src/main/seq.c:185 src/main/seq.c:341 src/main/seq.c:346 src/main/seq.c:350
-#: src/main/seq.c:391 src/main/seq.c:395 src/main/seq.c:399
-#: src/main/sort.c:1224 src/main/sort.c:1307 src/main/sort.c:1311
-#: src/main/sort.c:1318 src/main/sort.c:1393 src/main/source.c:220
-#: src/main/summary.c:886 src/main/sysutils.c:251 src/main/util.c:986
-#: src/main/util.c:991 src/main/util.c:998 src/main/util.c:1001
-#: src/modules/X11/devX11.c:3142 src/modules/X11/devX11.c:3169
-#: src/modules/X11/devX11.c:3174 src/modules/X11/devX11.c:3179
-#: src/modules/X11/devX11.c:3189 src/modules/X11/devX11.c:3194
-#: src/modules/X11/devX11.c:3198 src/modules/X11/devX11.c:3202
-#: src/unix/sys-std.c:1291
-#, c-format
-msgid "invalid '%s' value"
-msgstr ""
-
-#: src/gnuwin32/extra.c:308 src/gnuwin32/extra.c:321
+#: src/gnuwin32/extra.c:313 src/gnuwin32/extra.c:324
 msgid "incorrect argument"
 msgstr ""
 
-#: src/gnuwin32/extra.c:312
+#: src/gnuwin32/extra.c:316
 msgid "don't be silly!: your machine has a 4Gb address limit"
 msgstr ""
 
-#: src/gnuwin32/extra.c:316
+#: src/gnuwin32/extra.c:320
 msgid "cannot decrease memory limit: ignored"
 msgstr ""
 
-#: src/gnuwin32/extra.c:428 src/gnuwin32/extra.c:529 src/main/util.c:897
+#: src/gnuwin32/extra.c:427 src/gnuwin32/extra.c:528 src/main/util.c:962
 msgid "'path' must be a character vector"
 msgstr ""
 
-#: src/gnuwin32/extra.c:579 src/gnuwin32/extra.c:581 src/gnuwin32/extra.c:604
-#: src/gnuwin32/extra.c:606 src/gnuwin32/extra.c:641 src/main/gevents.c:61
+#: src/gnuwin32/extra.c:576 src/gnuwin32/extra.c:578 src/gnuwin32/extra.c:601
+#: src/gnuwin32/extra.c:603 src/gnuwin32/extra.c:638 src/main/gevents.c:61
 #: src/main/gevents.c:98
 msgid "invalid device"
 msgstr ""
 
-#: src/gnuwin32/extra.c:582
+#: src/gnuwin32/extra.c:579
 msgid "requires SDI mode"
 msgstr ""
 
-#: src/gnuwin32/extra.c:635 src/main/gevents.c:58 src/main/gevents.c:95
+#: src/gnuwin32/extra.c:632 src/main/gevents.c:58 src/main/gevents.c:95
 msgid "invalid graphical device number"
 msgstr ""
 
-#: src/gnuwin32/extra.c:645
+#: src/gnuwin32/extra.c:642
 msgid "bad device"
 msgstr ""
 
-#: src/gnuwin32/extra.c:799 src/gnuwin32/extra.c:807
+#: src/gnuwin32/extra.c:796 src/gnuwin32/extra.c:804
 msgid "invalid input in 'Rmbstowcs'"
 msgstr ""
 
-#: src/gnuwin32/extra.c:830 src/main/platform.c:1261
+#: src/gnuwin32/extra.c:827 src/main/platform.c:1336
 msgid "file choice cancelled"
 msgstr ""
 
-#: src/gnuwin32/run.c:242
+#: src/gnuwin32/run.c:244
 #, c-format
 msgid "'CreateProcess' failed to run '%s'"
 msgstr ""
 
-#: src/gnuwin32/run.c:344
+#: src/gnuwin32/run.c:346
 msgid "Child process not responding.  R will terminate it."
 msgstr ""
 
-#: src/gnuwin32/run.c:402
+#: src/gnuwin32/run.c:404
 #, c-format
 msgid "Exit code was %d"
 msgstr ""
 
-#: src/gnuwin32/run.c:434
+#: src/gnuwin32/run.c:436
 msgid "Insufficient memory (rpipeOpen)"
 msgstr ""
 
-#: src/gnuwin32/run.c:648 src/main/dounzip.c:482
+#: src/gnuwin32/run.c:650 src/main/dounzip.c:481
 msgid "seek not enabled for this connection"
 msgstr ""
 
-#: src/gnuwin32/run.c:654
+#: src/gnuwin32/run.c:656
 msgid "truncate not enabled for this connection"
 msgstr ""
 
-#: src/gnuwin32/run.c:729 src/gnuwin32/run.c:733 src/gnuwin32/run.c:746
-#: src/gnuwin32/run.c:774 src/main/connections.c:1330
-#: src/main/connections.c:1334 src/main/connections.c:1340
-#: src/main/connections.c:1354
+#: src/gnuwin32/run.c:731 src/gnuwin32/run.c:735 src/gnuwin32/run.c:748
+#: src/gnuwin32/run.c:776 src/main/connections.c:1322
+#: src/main/connections.c:1326 src/main/connections.c:1332
+#: src/main/connections.c:1346
 msgid "allocation of pipe connection failed"
 msgstr ""
 
-#: src/gnuwin32/run.c:788
+#: src/gnuwin32/run.c:790
 msgid "'names' is not a character vector"
 msgstr ""
 
-#: src/gnuwin32/sys-win32.c:182
+#: src/gnuwin32/sys-win32.c:180
 msgid "character string expected as first argument"
 msgstr ""
 
-#: src/gnuwin32/sys-win32.c:191
+#: src/gnuwin32/sys-win32.c:189
 msgid "character string expected as third argument"
 msgstr ""
 
-#: src/gnuwin32/sys-win32.c:257 src/unix/sys-unix.c:299
+#: src/gnuwin32/sys-win32.c:255 src/unix/sys-unix.c:312
 #, c-format
 msgid "running command '%s' had status %d"
 msgstr ""
 
-#: src/gnuwin32/system.c:122 src/unix/sys-unix.c:427
+#: src/gnuwin32/system.c:121 src/unix/sys-unix.c:440
 msgid "reached session elapsed time limit"
 msgstr ""
 
-#: src/gnuwin32/system.c:124 src/unix/sys-unix.c:429
+#: src/gnuwin32/system.c:123 src/unix/sys-unix.c:442
 msgid "reached elapsed time limit"
 msgstr ""
 
-#: src/gnuwin32/system.c:130 src/unix/sys-unix.c:435
+#: src/gnuwin32/system.c:129 src/unix/sys-unix.c:448
 msgid "reached session CPU time limit"
 msgstr ""
 
-#: src/gnuwin32/system.c:132 src/unix/sys-unix.c:437
+#: src/gnuwin32/system.c:131 src/unix/sys-unix.c:450
 msgid "reached CPU time limit"
 msgstr ""
 
-#: src/gnuwin32/system.c:157
+#: src/gnuwin32/system.c:156
 #, c-format
 msgid "Fatal error: %s\n"
 msgstr ""
 
-#: src/gnuwin32/system.c:335 src/unix/sys-std.c:863
+#: src/gnuwin32/system.c:334 src/unix/sys-std.c:866
 #, c-format
 msgid "encoding '%s' is not recognised"
 msgstr ""
 
-#: src/gnuwin32/system.c:341 src/unix/sys-std.c:869
+#: src/gnuwin32/system.c:340 src/unix/sys-std.c:872
 #, c-format
 msgid "<ERROR: re-encoding failure from encoding '%s'>\n"
 msgstr ""
 
-#: src/gnuwin32/system.c:555 src/gnuwin32/system.c:1049
-#: src/gnuwin32/system.c:1061 src/main/connections.c:590
-#: src/main/connections.c:595 src/main/dounzip.c:177 src/main/saveload.c:1961
-#: src/main/serialize.c:2552 src/main/serialize.c:2557
-#: src/main/serialize.c:2642 src/main/serialize.c:2687 src/unix/system.c:323
-#: src/unix/system.c:343
+#: src/gnuwin32/system.c:562 src/gnuwin32/system.c:1058
+#: src/gnuwin32/system.c:1070 src/main/connections.c:581
+#: src/main/connections.c:586 src/main/dounzip.c:178 src/main/saveload.c:1963
+#: src/main/serialize.c:2598 src/main/serialize.c:2603
+#: src/main/serialize.c:2688 src/main/serialize.c:2733 src/unix/system.c:328
 #, c-format
 msgid "cannot open file '%s': %s"
 msgstr ""
 
-#: src/gnuwin32/system.c:569
+#: src/gnuwin32/system.c:576
 #, c-format
 msgid "file.show(): file '%s' does not exist\n"
 msgstr ""
 
-#: src/gnuwin32/system.c:970
+#: src/gnuwin32/system.c:979
 #, c-format
 msgid "WARNING: R_MAX_MEM_SIZE value is invalid: ignored\n"
 msgstr ""
 
-#: src/gnuwin32/system.c:1002
+#: src/gnuwin32/system.c:1011
 msgid "WARNING: no max-mem-size given\n"
 msgstr ""
 
-#: src/gnuwin32/system.c:1009
+#: src/gnuwin32/system.c:1018
 #, c-format
 msgid "WARNING: --max-mem-size value is invalid: ignored\n"
 msgstr ""
 
-#: src/gnuwin32/system.c:1012
+#: src/gnuwin32/system.c:1021
 #, c-format
 msgid "WARNING: --max-mem-size=%lu%c: too large and ignored\n"
 msgstr ""
 
-#: src/gnuwin32/system.c:1018
+#: src/gnuwin32/system.c:1027
 #, c-format
 msgid "WARNING: --max-mem-size=%4.1fM: too small and ignored\n"
 msgstr ""
 
-#: src/gnuwin32/system.c:1023
+#: src/gnuwin32/system.c:1032
 #, c-format
 msgid "WARNING: --max-mem-size=%4.0fM: too large and taken as %uM\n"
 msgstr ""
 
-#: src/gnuwin32/system.c:1039
+#: src/gnuwin32/system.c:1048
 #, c-format
 msgid "option '%s' requires an argument"
 msgstr ""
 
-#: src/gnuwin32/system.c:1070
+#: src/gnuwin32/system.c:1079
 #, c-format
 msgid "option '%s' requires a non-empty argument"
 msgstr ""
 
-#: src/gnuwin32/system.c:1078 src/unix/system.c:362
+#: src/gnuwin32/system.c:1087 src/unix/system.c:347
 #, c-format
 msgid "WARNING: '-e %s' omitted as input is too long\n"
 msgstr ""
 
-#: src/gnuwin32/system.c:1082 src/unix/system.c:375
+#: src/gnuwin32/system.c:1091 src/unix/system.c:360
 #, c-format
 msgid "WARNING: unknown option '%s'\n"
 msgstr ""
 
-#: src/gnuwin32/system.c:1104 src/unix/system.c:379
+#: src/gnuwin32/system.c:1113 src/unix/system.c:364
 #, c-format
 msgid "ARGUMENT '%s' __ignored__\n"
 msgstr ""
 
-#: src/gnuwin32/system.c:1110 src/unix/system.c:386
+#: src/gnuwin32/system.c:1119 src/unix/system.c:371
 msgid "cannot use -e with -f or --file"
 msgstr ""
 
-#: src/gnuwin32/system.c:1128
+#: src/gnuwin32/system.c:1137
 msgid "creation of tmpfile failed -- set TMPDIR suitably?"
 msgstr ""
 
-#: src/gnuwin32/system.c:1147 src/unix/system.c:437
+#: src/gnuwin32/system.c:1156 src/unix/system.c:422
 msgid "you must specify '--save', '--no-save' or '--vanilla'"
 msgstr ""
 
-#: src/gnuwin32/system.c:1152
+#: src/gnuwin32/system.c:1161
 msgid ""
 "impossible to create 'reader thread'; you must free some system resources"
 msgstr ""
 
-#: src/include/Errormsg.h:25 src/main/subscript.c:375 src/main/subscript.c:393
-#: src/main/subscript.c:417 src/main/subscript.c:456 src/main/subscript.c:584
-#: src/main/subscript.c:623 src/main/subscript.c:766
+#: src/include/Errormsg.h:27 src/main/subscript.c:383 src/main/subscript.c:401
+#: src/main/subscript.c:425 src/main/subscript.c:464 src/main/subscript.c:662
+#: src/main/subscript.c:701 src/main/subscript.c:844
 msgid "subscript out of bounds"
 msgstr ""
 
-#: src/include/Errormsg.h:26
+#: src/include/Errormsg.h:28
 #, c-format
 msgid "object of type '%s' is not subsettable"
 msgstr ""
 
-#: src/main/CommandLineArgs.c:170
+#: src/main/CommandLineArgs.c:171
 msgid "WARNING: no value given for --encoding"
 msgstr ""
 
-#: src/main/CommandLineArgs.c:195
+#: src/main/CommandLineArgs.c:196
 #, c-format
 msgid "WARNING: option '%s' no longer supported"
 msgstr ""
 
-#: src/main/CommandLineArgs.c:206
+#: src/main/CommandLineArgs.c:207
 #, c-format
 msgid "WARNING: no value given for '%s'"
 msgstr ""
 
-#: src/main/CommandLineArgs.c:216
+#: src/main/CommandLineArgs.c:217
 #, c-format
 msgid "WARNING: '%s' value is invalid: ignored"
 msgstr ""
 
-#: src/main/CommandLineArgs.c:220
+#: src/main/CommandLineArgs.c:221
 #, c-format
 msgid "WARNING: %s: too large and ignored"
 msgstr ""
 
-#: src/main/CommandLineArgs.c:234
+#: src/main/CommandLineArgs.c:235
 msgid "WARNING: no value given for '--max-ppsize'"
 msgstr ""
 
-#: src/main/CommandLineArgs.c:239
+#: src/main/CommandLineArgs.c:240
 msgid "WARNING: '--max-ppsize' value is negative: ignored"
 msgstr ""
 
-#: src/main/CommandLineArgs.c:241
+#: src/main/CommandLineArgs.c:242
 msgid "WARNING: '--max-ppsize' value is too small: ignored"
 msgstr ""
 
-#: src/main/CommandLineArgs.c:244
+#: src/main/CommandLineArgs.c:245
 msgid "WARNING: '--max-ppsize' value is too large: ignored"
 msgstr ""
 
-#: src/main/RNG.c:175
+#: src/main/RNG.c:176
 #, c-format
 msgid "unif_rand: unimplemented RNG kind %d"
 msgstr ""
 
-#: src/main/RNG.c:260
+#: src/main/RNG.c:261
 #, c-format
 msgid "FixupSeeds: unimplemented RNG kind %d"
 msgstr ""
 
-#: src/main/RNG.c:302
+#: src/main/RNG.c:301
 msgid "'user_unif_rand' not in load table"
 msgstr ""
 
-#: src/main/RNG.c:310
+#: src/main/RNG.c:309
 msgid "cannot read seeds unless 'user_unif_nseed' is supplied"
 msgstr ""
 
-#: src/main/RNG.c:315
+#: src/main/RNG.c:314
 msgid "seed length must be in 0...625; ignored"
 msgstr ""
 
-#: src/main/RNG.c:323
+#: src/main/RNG.c:322
 #, c-format
 msgid "RNG_Init: unimplemented RNG kind %d"
 msgstr ""
 
-#: src/main/RNG.c:354
+#: src/main/RNG.c:351
 msgid "'.Random.seed' is a missing argument with no default"
 msgstr ""
 
-#: src/main/RNG.c:355
+#: src/main/RNG.c:352
 #, c-format
 msgid "'.Random.seed' is not an integer vector but of type '%s', so ignored"
 msgstr ""
 
-#: src/main/RNG.c:363
+#: src/main/RNG.c:360
 msgid "'.Random.seed[1]' is not a valid integer, so ignored"
 msgstr ""
 
-#: src/main/RNG.c:369
+#: src/main/RNG.c:366
 msgid "'.Random.seed[1]' is not a valid Normal type, so ignored"
 msgstr ""
 
-#: src/main/RNG.c:383
+#: src/main/RNG.c:380
 msgid "'.Random.seed[1] = 5' but no user-supplied generator, so ignored"
 msgstr ""
 
-#: src/main/RNG.c:388
+#: src/main/RNG.c:385
 msgid "'.Random.seed[1]' is not a valid RNG kind so ignored"
 msgstr ""
 
-#: src/main/RNG.c:415
+#: src/main/RNG.c:412
 msgid "'.Random.seed' has wrong length"
 msgstr ""
 
-#: src/main/RNG.c:468
+#: src/main/RNG.c:465
 #, c-format
 msgid "RNGkind: unimplemented RNG kind %d"
 msgstr ""
 
-#: src/main/RNG.c:488
+#: src/main/RNG.c:485
 msgid "invalid Normal type in 'RNGkind'"
 msgstr ""
 
-#: src/main/RNG.c:491
+#: src/main/RNG.c:488
 msgid "'user_norm_rand' not in load table"
 msgstr ""
 
-#: src/main/RNG.c:535
+#: src/main/RNG.c:532
 msgid "supplied seed is not a valid integer"
 msgstr ""
 
@@ -623,7 +605,7 @@ msgstr ""
 msgid "could not allocate space for 'name'"
 msgstr ""
 
-#: src/main/Rdynload.c:881 src/main/Rdynload.c:897 src/main/util.c:698
+#: src/main/Rdynload.c:881 src/main/Rdynload.c:897 src/main/util.c:762
 msgid "character argument expected"
 msgstr ""
 
@@ -641,32 +623,34 @@ msgstr ""
 
 #: src/main/Rdynload.c:979
 #, c-format
-msgid "cannot allocate memory for registered native symbol (%d bytes)"
-msgstr ""
+msgid "cannot allocate memory for registered native symbol (%d byte)"
+msgid_plural "cannot allocate memory for registered native symbol (%d bytes)"
+msgstr[0] ""
+msgstr[1] ""
 
-#: src/main/Rdynload.c:1100 src/main/Rdynload.c:1321
+#: src/main/Rdynload.c:1102 src/main/Rdynload.c:1323
 msgid "must pass package name or DllInfo reference"
 msgstr ""
 
-#: src/main/Rdynload.c:1197
+#: src/main/Rdynload.c:1199
 #, c-format
 msgid "unimplemented type %d in 'createRSymbolObject'"
 msgstr ""
 
-#: src/main/Rdynload.c:1279 src/main/Rdynload.c:1373
+#: src/main/Rdynload.c:1281 src/main/Rdynload.c:1375
 msgid "R_getRegisteredRoutines() expects a DllInfo reference"
 msgstr ""
 
-#: src/main/Rdynload.c:1282 src/main/Rdynload.c:1376
+#: src/main/Rdynload.c:1284 src/main/Rdynload.c:1378
 msgid "NULL value passed for DllInfo"
 msgstr ""
 
-#: src/main/Rdynload.c:1436
+#: src/main/Rdynload.c:1441
 #, c-format
 msgid "function '%s' not provided by package '%s'"
 msgstr ""
 
-#: src/main/Rdynload.c:1438
+#: src/main/Rdynload.c:1443
 msgid "table entry must be an external pointer"
 msgstr ""
 
@@ -675,8 +659,9 @@ msgstr ""
 msgid "problem in setting variable '%s' in Renviron"
 msgstr ""
 
-#: src/main/Renviron.c:311
-msgid "argument 'x' must be a character string"
+#: src/main/Renviron.c:311 src/main/objects.c:1174 src/main/raw.c:155
+#, c-format
+msgid "argument '%s' must be a character string"
 msgstr ""
 
 #: src/main/Renviron.c:315
@@ -684,116 +669,138 @@ msgstr ""
 msgid "file '%s' cannot be opened for reading"
 msgstr ""
 
-#: src/main/Rstrptime.h:517 src/main/Rstrptime.h:984
+#: src/main/Rstrptime.h:524 src/main/Rstrptime.h:991
 #, c-format
 msgid "use of %s for input is not supported"
 msgstr ""
 
-#: src/main/Rstrptime.h:1242
+#: src/main/Rstrptime.h:1263
 msgid "input string is too long"
 msgstr ""
 
-#: src/main/Rstrptime.h:1244
+#: src/main/Rstrptime.h:1265
 msgid "invalid multibyte input string"
 msgstr ""
 
-#: src/main/Rstrptime.h:1247
+#: src/main/Rstrptime.h:1268
 msgid "format string is too long"
 msgstr ""
 
-#: src/main/Rstrptime.h:1249
+#: src/main/Rstrptime.h:1270
 msgid "invalid multibyte format string"
 msgstr ""
 
-#: src/main/agrep.c:133 src/main/agrep.c:777 src/main/character.c:1039
-#: src/main/character.c:1043 src/main/grep.c:769 src/main/grep.c:1512
-#: src/main/grep.c:1516 src/main/grep.c:2325 src/main/grep.c:2623
+#: src/main/agrep.c:133 src/main/agrep.c:778 src/main/character.c:1291
+#: src/main/character.c:1295 src/main/grep.c:782 src/main/grep.c:1530
+#: src/main/grep.c:1534 src/main/grep.c:2347 src/main/grep.c:2654
 #, c-format
 msgid "argument '%s' has length > 1 and only the first element will be used"
 msgstr ""
 
-#: src/main/agrep.c:189 src/main/agrep.c:818
+#: src/main/agrep.c:190 src/main/agrep.c:820
 msgid "'pattern' must be a non-empty character string"
 msgstr ""
 
-#: src/main/agrep.c:200 src/main/agrep.c:827 src/main/grep.c:838
-#: src/main/grep.c:2381 src/main/grep.c:2662
+#: src/main/agrep.c:201 src/main/agrep.c:829 src/main/grep.c:853
+#: src/main/grep.c:2405 src/main/grep.c:2707
 msgid "regular expression is invalid in this locale"
 msgstr ""
 
-#: src/main/agrep.c:206 src/main/agrep.c:623
+#: src/main/agrep.c:207 src/main/agrep.c:624
 #, c-format
 msgid "regcomp error:  '%s'"
 msgstr ""
 
-#: src/main/agrep.c:238 src/main/agrep.c:871 src/main/grep.c:227
-#: src/main/grep.c:315 src/main/grep.c:423 src/main/grep.c:578
-#: src/main/grep.c:889 src/main/grep.c:2480 src/main/grep.c:2548
-#: src/main/grep.c:2698
+#: src/main/agrep.c:239 src/main/agrep.c:874 src/main/grep.c:233
+#: src/main/grep.c:323 src/main/grep.c:434 src/main/grep.c:590
+#: src/main/grep.c:907 src/main/grep.c:2510 src/main/grep.c:2579
+#: src/main/grep.c:2744
 #, c-format
 msgid "input string %d is invalid in this locale"
 msgstr ""
 
-#: src/main/agrep.c:525 src/main/agrep.c:765 src/main/grep.c:155
-#: src/main/grep.c:760 src/main/grep.c:762 src/main/grep.c:1047
-#: src/main/grep.c:1055 src/main/grep.c:1503 src/main/grep.c:1505
-#: src/main/grep.c:2315 src/main/grep.c:2317 src/main/grep.c:2611
+#: src/main/agrep.c:526 src/main/agrep.c:766 src/main/grep.c:159
+#: src/main/grep.c:773 src/main/grep.c:775 src/main/grep.c:1065
+#: src/main/grep.c:1073 src/main/grep.c:1521 src/main/grep.c:1523
+#: src/main/grep.c:2337 src/main/grep.c:2339 src/main/grep.c:2642
 #, c-format
 msgid "argument '%s' will be ignored"
 msgstr ""
 
-#: src/main/agrep.c:614
+#: src/main/agrep.c:615
 #, c-format
 msgid "input string x[%d] is invalid in this locale"
 msgstr ""
 
-#: src/main/agrep.c:660
+#: src/main/agrep.c:661
 #, c-format
 msgid "input string y[%d] is invalid in this locale"
 msgstr ""
 
-#: src/main/agrep.c:833 src/main/grep.c:2668
+#: src/main/agrep.c:835 src/main/grep.c:2713
 #, c-format
 msgid "regcomp error: '%s'"
 msgstr ""
 
-#: src/main/apply.c:103
+#: src/main/apply.c:98
 msgid "'FUN.VALUE' must be a vector"
 msgstr ""
 
-#: src/main/apply.c:108 src/main/complex.c:758
+#: src/main/apply.c:100 src/main/array.c:506 src/main/character.c:847
+#: src/main/character.c:1655 src/main/connections.c:3551
+#: src/main/context.c:653 src/main/context.c:672 src/main/datetime.c:681
+#: src/main/datetime.c:783 src/main/datetime.c:1047 src/main/dotcode.c:222
+#: src/main/errors.c:910 src/main/errors.c:943 src/main/errors.c:1049
+#: src/main/errors.c:1074 src/main/errors.c:1079 src/main/errors.c:1349
+#: src/main/identical.c:66 src/main/identical.c:67 src/main/identical.c:68
+#: src/main/identical.c:69 src/main/identical.c:70 src/main/platform.c:2982
+#: src/main/seq.c:192 src/main/seq.c:343 src/main/seq.c:348 src/main/seq.c:352
+#: src/main/seq.c:397 src/main/seq.c:401 src/main/seq.c:405
+#: src/main/sort.c:1244 src/main/sort.c:1327 src/main/sort.c:1331
+#: src/main/sort.c:1338 src/main/source.c:225 src/main/summary.c:954
+#: src/main/sysutils.c:250 src/main/util.c:1051 src/main/util.c:1056
+#: src/main/util.c:1063 src/main/util.c:1066 src/main/util.c:2035
+#: src/modules/X11/devX11.c:3148 src/modules/X11/devX11.c:3175
+#: src/modules/X11/devX11.c:3180 src/modules/X11/devX11.c:3185
+#: src/modules/X11/devX11.c:3195 src/modules/X11/devX11.c:3200
+#: src/modules/X11/devX11.c:3204 src/modules/X11/devX11.c:3208
+#, c-format
+msgid "invalid '%s' value"
+msgstr ""
+
+#: src/main/apply.c:103 src/main/complex.c:753
 msgid "invalid length"
 msgstr ""
 
-#: src/main/apply.c:113
+#: src/main/apply.c:108
 msgid "long vectors are not supported for matrix/array results"
 msgstr ""
 
-#: src/main/apply.c:162
+#: src/main/apply.c:115
+#, c-format
+msgid "type '%s' is not supported"
+msgstr ""
+
+#: src/main/apply.c:163
 #, c-format
 msgid ""
 "values must be length %d,\n"
 " but FUN(X[[%d]]) result is length %d"
 msgstr ""
 
-#: src/main/apply.c:174
+#: src/main/apply.c:175
 #, c-format
 msgid ""
 "values must be type '%s',\n"
 " but FUN(X[[%d]]) result is type '%s'"
 msgstr ""
 
-#: src/main/apply.c:193
-#, c-format
-msgid "type '%s' is not supported"
-msgstr ""
-
-#: src/main/apply.c:225
+#: src/main/apply.c:252
 #, c-format
 msgid "dimnames(<value>) is neither NULL nor list of length %d"
 msgstr ""
 
-#: src/main/arithmetic.c:42
+#: src/main/arithmetic.c:42 src/main/eval.c:3633
 msgid "NaNs produced"
 msgstr ""
 
@@ -801,463 +808,475 @@ msgstr ""
 msgid "non-numeric argument to mathematical function"
 msgstr ""
 
-#: src/main/arithmetic.c:187
+#: src/main/arithmetic.c:186
 msgid "probable complete loss of accuracy in modulus"
 msgstr ""
 
-#: src/main/arithmetic.c:337
+#: src/main/arithmetic.c:298
 msgid "NAs produced by integer overflow"
 msgstr ""
 
-#: src/main/arithmetic.c:538
+#: src/main/arithmetic.c:499
 msgid "operator needs one or two arguments"
 msgstr ""
 
-#: src/main/arithmetic.c:554
+#: src/main/arithmetic.c:515
 msgid "non-numeric argument to binary operator"
 msgstr ""
 
-#: src/main/arithmetic.c:615 src/main/relop.c:227
+#: src/main/arithmetic.c:576 src/main/relop.c:221
 msgid "non-conformable arrays"
 msgstr ""
 
-#: src/main/arithmetic.c:658
+#: src/main/arithmetic.c:619
 msgid "non-conformable time-series"
 msgstr ""
 
-#: src/main/arithmetic.c:680 src/main/logic.c:143 src/main/relop.c:166
-#: src/main/relop.c:265
+#: src/main/arithmetic.c:641 src/main/logic.c:135 src/main/relop.c:160
+#: src/main/relop.c:259
 msgid "longer object length is not a multiple of shorter object length"
 msgstr ""
 
-#: src/main/arithmetic.c:751
+#: src/main/arithmetic.c:712
 msgid "invalid argument to unary operator"
 msgstr ""
 
-#: src/main/arithmetic.c:780 src/main/arithmetic.c:805
-#: src/main/arithmetic.c:824
+#: src/main/arithmetic.c:741 src/main/arithmetic.c:766
+#: src/main/arithmetic.c:785
 msgid "invalid unary operator"
 msgstr ""
 
-#: src/main/arithmetic.c:1241
+#: src/main/arithmetic.c:1191
 msgid "unimplemented real function of 1 argument"
 msgstr ""
 
-#: src/main/arithmetic.c:1255 src/main/complex.c:648 src/main/complex.c:718
+#: src/main/arithmetic.c:1205 src/main/complex.c:638 src/main/complex.c:708
 msgid "unimplemented complex function"
 msgstr ""
 
-#: src/main/arithmetic.c:1526 src/main/arithmetic.c:1877
-#: src/main/arithmetic.c:2056 src/main/arithmetic.c:2168
+#: src/main/arithmetic.c:1484 src/main/arithmetic.c:1877
+#: src/main/arithmetic.c:2049 src/main/arithmetic.c:2152
 #, c-format
 msgid "unimplemented real function of %d numeric arguments"
 msgstr ""
 
-#: src/main/arithmetic.c:1552
+#: src/main/arithmetic.c:1511
 #, c-format
-msgid "%d arguments passed to '%s' which requires 1 or 2"
-msgstr ""
+msgid "%d argument passed to '%s' which requires 1 or 2 arguments"
+msgid_plural "%d arguments passed to '%s'which requires 1 or 2 arguments"
+msgstr[0] ""
+msgstr[1] ""
 
-#: src/main/arithmetic.c:1570
+#: src/main/arithmetic.c:1530
 msgid "invalid second argument of length 0"
 msgstr ""
 
-#: src/main/arithmetic.c:1639
-msgid "invalid argument 'base' of length 0"
+#: src/main/arithmetic.c:1625 src/main/arithmetic.c:1643 src/main/envir.c:1464
+#: src/main/envir.c:1972 src/main/eval.c:630 src/main/eval.c:4237
+#, c-format
+msgid "argument \"%s\" is missing, with no default"
 msgstr ""
 
-#: src/main/arithmetic.c:1647
-#, c-format
-msgid "%d arguments passed to 'log' which requires 1 or 2"
+#: src/main/arithmetic.c:1649
+msgid "invalid argument 'base' of length 0"
 msgstr ""
 
-#: src/main/array.c:79 src/main/array.c:1441
+#: src/main/array.c:82 src/main/array.c:1591
 #, c-format
 msgid "'data' must be of a vector type, was '%s'"
 msgstr ""
 
-#: src/main/array.c:94 src/main/array.c:102
+#: src/main/array.c:97 src/main/array.c:105
 msgid "non-numeric matrix extent"
 msgstr ""
 
-#: src/main/array.c:97 src/main/array.c:1535
+#: src/main/array.c:100 src/main/array.c:1695
 msgid "invalid 'nrow' value (too large or NA)"
 msgstr ""
 
-#: src/main/array.c:99 src/main/array.c:1537
+#: src/main/array.c:102 src/main/array.c:1697
 msgid "invalid 'nrow' value (< 0)"
 msgstr ""
 
-#: src/main/array.c:105 src/main/array.c:1540
+#: src/main/array.c:108 src/main/array.c:1700
 msgid "invalid 'ncol' value (too large or NA)"
 msgstr ""
 
-#: src/main/array.c:107 src/main/array.c:1542
+#: src/main/array.c:110 src/main/array.c:1702
 msgid "invalid 'ncol' value (< 0)"
 msgstr ""
 
-#: src/main/array.c:116
+#: src/main/array.c:119
 msgid "nc = 0 for non-null data"
 msgstr ""
 
-#: src/main/array.c:124
+#: src/main/array.c:127
 msgid "nr = 0 for non-null data"
 msgstr ""
 
-#: src/main/array.c:135
+#: src/main/array.c:138
 #, c-format
 msgid ""
 "data length [%d] is not a sub-multiple or multiple of the number of rows [%d]"
 msgstr ""
 
-#: src/main/array.c:138
+#: src/main/array.c:141
 #, c-format
 msgid ""
 "data length [%d] is not a sub-multiple or multiple of the number of columns "
 "[%d]"
 msgstr ""
 
-#: src/main/array.c:141
+#: src/main/array.c:144
 msgid "data length exceeds size of matrix"
 msgstr ""
 
-#: src/main/array.c:147 src/main/array.c:1453 src/main/array.c:1549
+#: src/main/array.c:150 src/main/array.c:1603 src/main/array.c:1709
 msgid "too many elements specified"
 msgstr ""
 
-#: src/main/array.c:205
+#: src/main/array.c:208
 msgid "negative extents to matrix"
 msgstr ""
 
-#: src/main/array.c:208
+#: src/main/array.c:211
 msgid "allocMatrix: too many elements specified"
 msgstr ""
 
-#: src/main/array.c:236
+#: src/main/array.c:239
 msgid "negative extents to 3D array"
 msgstr ""
 
-#: src/main/array.c:239
+#: src/main/array.c:242
 msgid "'alloc3Darray': too many elements specified"
 msgstr ""
 
-#: src/main/array.c:264
+#: src/main/array.c:267
 msgid "'allocArray': too many elements specified by 'dims'"
 msgstr ""
 
-#: src/main/array.c:448
+#: src/main/array.c:523
+#, c-format
+msgid "'%s' must be a list or atomic vector"
+msgstr ""
+
+#: src/main/array.c:561
 #, c-format
 msgid "a matrix-like object is required as argument to '%s'"
 msgstr ""
 
-#: src/main/array.c:662
+#: src/main/array.c:776
 msgid "requires numeric/complex matrix/vector arguments"
 msgstr ""
 
-#: src/main/array.c:752 src/main/array.c:756 src/main/array.c:760
+#: src/main/array.c:886 src/main/array.c:890 src/main/array.c:894
 msgid "non-conformable arguments"
 msgstr ""
 
-#: src/main/array.c:1058
+#: src/main/array.c:1193
 msgid "argument is not a matrix"
 msgstr ""
 
-#: src/main/array.c:1093
+#: src/main/array.c:1228
 msgid "invalid first argument, must be an array"
 msgstr ""
 
-#: src/main/array.c:1107
+#: src/main/array.c:1242
 #, c-format
 msgid "'perm' is of wrong length %d (!= %d)"
 msgstr ""
 
-#: src/main/array.c:1112 src/main/array.c:1115
+#: src/main/array.c:1247 src/main/array.c:1250
 msgid "'a' does not have named dimnames"
 msgstr ""
 
-#: src/main/array.c:1122
+#: src/main/array.c:1257
 #, c-format
 msgid "'perm[%d]' does not match a dimension name"
 msgstr ""
 
-#: src/main/array.c:1135
+#: src/main/array.c:1270
 msgid "value out of range in 'perm'"
 msgstr ""
 
-#: src/main/array.c:1217
+#: src/main/array.c:1352
 msgid "'resize' must be TRUE or FALSE"
 msgstr ""
 
-#: src/main/array.c:1275
+#: src/main/array.c:1422
 msgid "'x' must be numeric"
 msgstr ""
 
-#: src/main/array.c:1449
+#: src/main/array.c:1425
+msgid "'x' is too short"
+msgstr ""
+
+#: src/main/array.c:1599
 msgid "'dims' cannot be of length 0"
 msgstr ""
 
-#: src/main/array.c:1545
+#: src/main/array.c:1705
 msgid "'x' must have positive length"
 msgstr ""
 
-#: src/main/array.c:1605
+#: src/main/array.c:1771
 #, c-format
 msgid "singular matrix in 'backsolve'. First zero in diagonal [%d]"
 msgstr ""
 
-#: src/main/attrib.c:40 src/main/attrib.c:235 src/main/attrib.c:269
-#: src/main/attrib.c:291 src/main/attrib.c:405 src/main/attrib.c:452
-#: src/main/attrib.c:502
+#: src/main/attrib.c:40 src/main/attrib.c:231 src/main/attrib.c:265
+#: src/main/attrib.c:287 src/main/attrib.c:403 src/main/attrib.c:450
+#: src/main/attrib.c:501
 msgid "attempt to set an attribute on NULL"
 msgstr ""
 
-#: src/main/attrib.c:72
+#: src/main/attrib.c:77
 #, c-format
 msgid "row names must be 'character' or 'integer', not '%s'"
 msgstr ""
 
-#: src/main/attrib.c:124
+#: src/main/attrib.c:130
 #, c-format
 msgid "getAttrib: invalid type (%s) for TAG"
 msgstr ""
 
-#: src/main/attrib.c:379
+#: src/main/attrib.c:377
 #, c-format
 msgid "invalid type (%s) for 'names': must be vector"
 msgstr ""
 
-#: src/main/attrib.c:382
+#: src/main/attrib.c:380
 #, c-format
 msgid "'names' attribute [%d] must be the same length as the vector [%d]"
 msgstr ""
 
-#: src/main/attrib.c:387
+#: src/main/attrib.c:385
 msgid "names() applied to a non-vector"
 msgstr ""
 
-#: src/main/attrib.c:395
+#: src/main/attrib.c:393
 msgid "invalid time series parameters specified"
 msgstr ""
 
-#: src/main/attrib.c:409
+#: src/main/attrib.c:407
 msgid "'tsp' attribute must be numeric"
 msgstr ""
 
-#: src/main/attrib.c:415
+#: src/main/attrib.c:413
 msgid "'tsp' attribute must be numeric of length three"
 msgstr ""
 
-#: src/main/attrib.c:432
+#: src/main/attrib.c:430
 msgid "cannot assign 'tsp' to zero-length vector"
 msgstr ""
 
-#: src/main/attrib.c:463
+#: src/main/attrib.c:461
 msgid "attempt to set invalid 'comment' attribute"
 msgstr ""
 
-#: src/main/attrib.c:511
+#: src/main/attrib.c:510
 msgid "adding class \"factor\" to an invalid object"
 msgstr ""
 
-#: src/main/attrib.c:519
+#: src/main/attrib.c:541
 msgid "attempt to set invalid 'class' attribute"
 msgstr ""
 
-#: src/main/attrib.c:777
+#: src/main/attrib.c:872
 #, c-format
 msgid "class '%s' has no 'names' slot"
 msgstr ""
 
-#: src/main/attrib.c:779
+#: src/main/attrib.c:874
 #, c-format
 msgid ""
 "class '%s' has no 'names' slot; assigning a names attribute will create an "
 "invalid object"
 msgstr ""
 
-#: src/main/attrib.c:782
+#: src/main/attrib.c:877
 #, c-format
 msgid ""
 "invalid to use names()<- to set the 'names' slot in a non-vector class ('%s')"
 msgstr ""
 
-#: src/main/attrib.c:812
+#: src/main/attrib.c:907
 msgid "incompatible 'names' argument"
 msgstr ""
 
-#: src/main/attrib.c:867
+#: src/main/attrib.c:962
 #, c-format
 msgid "invalid type (%s) to set 'names' attribute"
 msgstr ""
 
-#: src/main/attrib.c:938
+#: src/main/attrib.c:1035
 msgid "'dimnames' applied to non-array"
 msgstr ""
 
-#: src/main/attrib.c:943
-msgid "'dimnames' must be a list"
+#: src/main/attrib.c:1040 src/main/coerce.c:2471
+#, c-format
+msgid "'%s' must be a list"
 msgstr ""
 
-#: src/main/attrib.c:946 src/main/attrib.c:974
+#: src/main/attrib.c:1043 src/main/attrib.c:1071
 #, c-format
 msgid "length of 'dimnames' [%d] must match that of 'dims' [%d]"
 msgstr ""
 
-#: src/main/attrib.c:980
+#: src/main/attrib.c:1077
 #, c-format
 msgid "invalid type (%s) for 'dimnames' (must be a vector)"
 msgstr ""
 
-#: src/main/attrib.c:983
+#: src/main/attrib.c:1080
 #, c-format
 msgid "length of 'dimnames' [%d] not equal to array extent"
 msgstr ""
 
-#: src/main/attrib.c:1055 src/main/builtin.c:75 src/main/builtin.c:112
-#: src/main/envir.c:1606 src/main/envir.c:1734 src/main/envir.c:1796
-#: src/main/envir.c:1918 src/main/paste.c:74 src/main/paste.c:293
-#: src/main/random.c:487 src/main/random.c:516 src/main/unique.c:1749
+#: src/main/attrib.c:1152 src/main/builtin.c:75 src/main/builtin.c:112
+#: src/main/envir.c:1740 src/main/envir.c:1868 src/main/envir.c:1928
+#: src/main/envir.c:2065 src/main/paste.c:74 src/main/paste.c:293
+#: src/main/random.c:479 src/main/random.c:508 src/main/unique.c:1746
 msgid "invalid first argument"
 msgstr ""
 
-#: src/main/attrib.c:1058
+#: src/main/attrib.c:1155
 msgid "invalid second argument"
 msgstr ""
 
-#: src/main/attrib.c:1066
+#: src/main/attrib.c:1163
 msgid "length-0 dimension vector is invalid"
 msgstr ""
 
-#: src/main/attrib.c:1071
+#: src/main/attrib.c:1168
 msgid "the dims contain missing values"
 msgstr ""
 
-#: src/main/attrib.c:1073
+#: src/main/attrib.c:1170
 msgid "the dims contain negative values"
 msgstr ""
 
-#: src/main/attrib.c:1078
+#: src/main/attrib.c:1175
 msgid "dims do not match the length of object"
 msgstr ""
 
-#: src/main/attrib.c:1080
+#: src/main/attrib.c:1177
 #, c-format
 msgid "dims [product %d] do not match the length of object [%d]"
 msgstr ""
 
-#: src/main/attrib.c:1177
+#: src/main/attrib.c:1284
 msgid "attributes must be a list or NULL"
 msgstr ""
 
-#: src/main/attrib.c:1182
+#: src/main/attrib.c:1289
 msgid "attributes must be named"
 msgstr ""
 
-#: src/main/attrib.c:1186
+#: src/main/attrib.c:1293
 #, c-format
 msgid "all attributes must have names [%d does not]"
 msgstr ""
 
-#: src/main/attrib.c:1285
+#: src/main/attrib.c:1393
 msgid "'which' must be of mode character"
 msgstr ""
 
-#: src/main/attrib.c:1287
+#: src/main/attrib.c:1395
 msgid "exactly one attribute 'which' must be given"
 msgstr ""
 
-#: src/main/attrib.c:1345 src/main/attrib.c:1368 src/main/subscript.c:240
-#: src/main/subscript.c:244 src/main/subset.c:1188 src/main/subset.c:1239
+#: src/main/attrib.c:1456 src/main/attrib.c:1479 src/main/subscript.c:245
+#: src/main/subscript.c:249 src/main/subset.c:1257 src/main/subset.c:1311
 #, c-format
 msgid "partial match of '%s' to '%s'"
 msgstr ""
 
-#: src/main/attrib.c:1406
+#: src/main/attrib.c:1525
 #, c-format
 msgid "invalid type '%s' for slot name"
 msgstr ""
 
-#: src/main/attrib.c:1444
+#: src/main/attrib.c:1563
 msgid "'name' must be non-null character string"
 msgstr ""
 
-#: src/main/attrib.c:1568 src/main/attrib.c:1639 src/main/attrib.c:1676
+#: src/main/attrib.c:1688 src/main/attrib.c:1759 src/main/attrib.c:1797
 msgid "invalid type or length for slot name"
 msgstr ""
 
-#: src/main/attrib.c:1602
+#: src/main/attrib.c:1722
 #, c-format
 msgid "cannot get a slot (\"%s\") from an object of type \"%s\""
 msgstr ""
 
-#: src/main/attrib.c:1613
+#: src/main/attrib.c:1733
 #, c-format
 msgid "no slot of name \"%s\" for this object of class \"%s\""
 msgstr ""
 
-#: src/main/attrib.c:1630
+#: src/main/attrib.c:1750
 msgid "attempt to set slot on NULL object"
 msgstr ""
 
-#: src/main/attrib.c:1671
+#: src/main/attrib.c:1792
 msgid "formal classes cannot be used without the 'methods' package"
 msgstr ""
 
-#: src/main/attrib.c:1683
+#: src/main/attrib.c:1804
 #, c-format
 msgid ""
 "trying to get slot \"%s\" from an object of a basic class (\"%s\") with no "
 "slots"
 msgstr ""
 
-#: src/main/attrib.c:1687
+#: src/main/attrib.c:1808
 #, c-format
 msgid ""
 "trying to get slot \"%s\" from an object (class \"%s\") that is not an S4 "
 "object "
 msgstr ""
 
-#: src/main/bind.c:161
+#: src/main/bind.c:164
 #, c-format
 msgid "resulting vector exceeds vector length limit in '%s'"
 msgstr ""
 
-#: src/main/bind.c:291 src/main/bind.c:327 src/main/bind.c:376
-#: src/main/bind.c:449 src/main/bind.c:477
+#: src/main/bind.c:294 src/main/bind.c:330 src/main/bind.c:379
+#: src/main/bind.c:452 src/main/bind.c:480
 #, c-format
 msgid "type '%s' is unimplemented in '%s'"
 msgstr ""
 
-#: src/main/bind.c:685
+#: src/main/bind.c:688
 msgid "repeated formal argument 'recursive'"
 msgstr ""
 
-#: src/main/bind.c:696
+#: src/main/bind.c:699
 msgid "repeated formal argument 'use.names'"
 msgstr ""
 
-#: src/main/bind.c:894
+#: src/main/bind.c:900
 msgid "argument not a list"
 msgstr ""
 
-#: src/main/bind.c:1038 src/main/eval.c:2691 src/main/eval.c:2700
-#: src/main/objects.c:318 src/main/objects.c:354 src/main/objects.c:729
-#: src/main/objects.c:746 src/main/objects.c:753
+#: src/main/bind.c:1044 src/main/names.c:1273 src/main/names.c:1278
+#: src/main/names.c:1283 src/main/names.c:1288
 #, c-format
 msgid "class name too long in '%s'"
 msgstr ""
 
-#: src/main/bind.c:1114
+#: src/main/bind.c:1128
 #, c-format
 msgid "cannot create a matrix from type '%s'"
 msgstr ""
 
-#: src/main/bind.c:1185
+#: src/main/bind.c:1198
 #, c-format
 msgid "number of rows of matrices must match (see arg %d)"
 msgstr ""
 
-#: src/main/bind.c:1430
+#: src/main/bind.c:1455
 #, c-format
 msgid "number of columns of matrices must match (see arg %d)"
 msgstr ""
@@ -1266,212 +1285,243 @@ msgstr ""
 msgid "vector size cannot be NA"
 msgstr ""
 
-#: src/main/builtin.c:49 src/main/builtin.c:57 src/main/sort.c:1303
+#: src/main/builtin.c:49 src/main/builtin.c:57 src/main/sort.c:1323
 msgid "vector size cannot be NA/NaN"
 msgstr ""
 
-#: src/main/builtin.c:50 src/main/builtin.c:58 src/main/sort.c:1304
+#: src/main/builtin.c:50 src/main/builtin.c:58 src/main/sort.c:1324
 msgid "vector size cannot be infinite"
 msgstr ""
 
-#: src/main/builtin.c:51 src/main/builtin.c:59 src/main/builtin.c:916
-#: src/main/sort.c:1305
+#: src/main/builtin.c:51 src/main/builtin.c:59 src/main/builtin.c:950
+#: src/main/sort.c:1325
 msgid "vector size specified is too large"
 msgstr ""
 
-#: src/main/builtin.c:84 src/main/builtin.c:93 src/main/builtin.c:293
-#: src/main/builtin.c:326 src/main/builtin.c:365 src/main/builtin.c:375
-#: src/main/coerce.c:1537 src/main/connections.c:3066 src/main/engine.c:2967
-#: src/main/envir.c:993 src/main/envir.c:1046 src/main/envir.c:1136
-#: src/main/envir.c:1615 src/main/envir.c:1739 src/main/envir.c:1807
-#: src/main/envir.c:1925 src/main/envir.c:2582 src/main/envir.c:2642
-#: src/main/envir.c:2922 src/main/envir.c:2951 src/main/envir.c:2972
-#: src/main/envir.c:2995 src/main/envir.c:3030 src/main/envir.c:3051
-#: src/main/envir.c:3357 src/main/envir.c:3362 src/main/eval.c:5318
-#: src/main/objects.c:197 src/main/objects.c:203 src/main/saveload.c:2070
-#: src/main/saveload.c:2364 src/main/serialize.c:2709
+#: src/main/builtin.c:84 src/main/builtin.c:93 src/main/builtin.c:304
+#: src/main/builtin.c:337 src/main/builtin.c:394 src/main/builtin.c:408
+#: src/main/coerce.c:1536 src/main/connections.c:3062 src/main/engine.c:2987
+#: src/main/envir.c:1001 src/main/envir.c:1054 src/main/envir.c:1210
+#: src/main/envir.c:1749 src/main/envir.c:1873 src/main/envir.c:1939
+#: src/main/envir.c:2072 src/main/envir.c:2791 src/main/envir.c:2877
+#: src/main/envir.c:3182 src/main/envir.c:3211 src/main/envir.c:3232
+#: src/main/envir.c:3255 src/main/envir.c:3290 src/main/envir.c:3311
+#: src/main/envir.c:3632 src/main/envir.c:3637 src/main/eval.c:6251
+#: src/main/objects.c:191 src/main/objects.c:199 src/main/saveload.c:2072
+#: src/main/saveload.c:2364 src/main/serialize.c:2755
 msgid "use of NULL environment is defunct"
 msgstr ""
 
-#: src/main/builtin.c:306
+#: src/main/builtin.c:250 src/main/builtin.c:263
+msgid "argument is not a function"
+msgstr ""
+
+#: src/main/builtin.c:317
 msgid "replacement object is not an environment"
 msgstr ""
 
-#: src/main/builtin.c:331
+#: src/main/builtin.c:342
 msgid "'enclos' must be an environment"
 msgstr ""
 
-#: src/main/builtin.c:352 src/main/builtin.c:370
+#: src/main/builtin.c:363 src/main/builtin.c:399
 msgid "argument is not an environment"
 msgstr ""
 
-#: src/main/builtin.c:354
+#: src/main/builtin.c:365
 msgid "the empty environment has no parent"
 msgstr ""
 
-#: src/main/builtin.c:372
+#: src/main/builtin.c:401
 msgid "can not set parent of the empty environment"
 msgstr ""
 
-#: src/main/builtin.c:380
+#: src/main/builtin.c:403
+msgid "can not set the parent environment of a namespace"
+msgstr ""
+
+#: src/main/builtin.c:405
+msgid "can not set the parent environment of package imports"
+msgstr ""
+
+#: src/main/builtin.c:413
 msgid "'parent' is not an environment"
 msgstr ""
 
-#: src/main/builtin.c:521 src/main/connections.c:3691
-#: src/main/connections.c:4068 src/main/connections.c:4102
-#: src/main/connections.c:4480 src/main/connections.c:4550
-#: src/main/connections.c:4759 src/main/connections.c:4763
-#: src/main/connections.c:5124 src/main/deparse.c:360 src/main/deparse.c:446
-#: src/main/serialize.c:2006
+#: src/main/builtin.c:556 src/main/connections.c:3687
+#: src/main/connections.c:4079 src/main/connections.c:4113
+#: src/main/connections.c:4491 src/main/connections.c:4561
+#: src/main/connections.c:4772 src/main/connections.c:4776
+#: src/main/connections.c:5199 src/main/deparse.c:369 src/main/deparse.c:458
+#: src/main/serialize.c:2045
 msgid "cannot write to this connection"
 msgstr ""
 
-#: src/main/builtin.c:526 src/main/builtin.c:556
+#: src/main/builtin.c:561 src/main/builtin.c:591
 #, c-format
 msgid "invalid '%s' specification"
 msgstr ""
 
-#: src/main/builtin.c:543
+#: src/main/builtin.c:578
 msgid "non-positive 'fill' argument will be ignored"
 msgstr ""
 
-#: src/main/builtin.c:618
+#: src/main/builtin.c:653
 #, c-format
 msgid "argument %d (type '%s') cannot be handled by 'cat'"
 msgstr ""
 
-#: src/main/builtin.c:763
+#: src/main/builtin.c:797
 #, c-format
 msgid "vector: cannot make a vector of mode '%s'."
 msgstr ""
 
-#: src/main/builtin.c:789
+#: src/main/builtin.c:823
 msgid "cannot set length of non-vector"
 msgstr ""
 
-#: src/main/builtin.c:897 src/main/builtin.c:907 src/main/options.c:637
+#: src/main/builtin.c:931 src/main/builtin.c:941 src/main/options.c:659
 msgid "invalid argument"
 msgstr ""
 
-#: src/main/builtin.c:899 src/main/builtin.c:909 src/main/builtin.c:911
-#: src/main/character.c:366 src/main/coerce.c:2765
+#: src/main/builtin.c:933 src/main/builtin.c:943 src/main/builtin.c:945
+#: src/main/character.c:525 src/main/coerce.c:2832
 msgid "invalid value"
 msgstr ""
 
-#: src/main/builtin.c:942 src/main/coerce.c:2478 src/main/coerce.c:2519
-#: src/main/eval.c:563 src/main/eval.c:683 src/main/eval.c:2099
-#: src/main/eval.c:2176 src/main/eval.c:2236 src/main/eval.c:2569
-#: src/main/eval.c:4694 src/main/eval.c:4814
+#: src/main/builtin.c:976 src/main/coerce.c:2541 src/main/coerce.c:2584
+#: src/main/eval.c:620 src/main/eval.c:740 src/main/eval.c:2266
+#: src/main/eval.c:2346 src/main/eval.c:2407 src/main/eval.c:2745
+#: src/main/eval.c:5584 src/main/eval.c:5701
 msgid "'...' used in an incorrect context"
 msgstr ""
 
-#: src/main/builtin.c:963
+#: src/main/builtin.c:998
 #, c-format
 msgid "duplicate 'switch' defaults: '%s' and '%s'"
 msgstr ""
 
-#: src/main/builtin.c:996
+#: src/main/builtin.c:1031
 msgid "'EXPR' is missing"
 msgstr ""
 
-#: src/main/builtin.c:1000 src/main/eval.c:5155
+#: src/main/builtin.c:1035 src/main/eval.c:6056
 msgid "EXPR must be a length 1 vector"
 msgstr ""
 
-#: src/main/builtin.c:1003
+#: src/main/builtin.c:1038 src/main/eval.c:6059
 #, c-format
 msgid ""
 "EXPR is a \"factor\", treated as integer.\n"
 " Consider using '%s' instead."
 msgstr ""
 
-#: src/main/character.c:105 src/main/character.c:108 src/main/character.c:132
-#: src/main/character.c:135
+#: src/main/builtin.c:1095 src/main/eval.c:6069 src/main/eval.c:6098
+msgid "'switch' with no alternatives"
+msgstr ""
+
+#: src/main/character.c:103 src/main/character.c:224
+#, c-format
+msgid "%d argument passed to '%s' which requires %d to %d"
+msgid_plural "%d arguments passed to '%s' which requires %d to %d"
+msgstr[0] ""
+msgstr[1] ""
+
+#: src/main/character.c:110 src/main/character.c:113 src/main/character.c:232
+#: src/main/character.c:235
 #, c-format
 msgid "'%s' requires a character vector"
 msgstr ""
 
-#: src/main/character.c:164
+#: src/main/character.c:150 src/main/character.c:165 src/main/character.c:175
+#: src/main/character.c:203
 #, c-format
-msgid ""
-"number of characters is not computable for element %d in \"bytes\" encoding"
+msgid "invalid multibyte string, %s"
 msgstr ""
 
-#: src/main/character.c:169 src/main/character.c:197 src/main/character.c:653
-#: src/main/character.c:750
+#: src/main/character.c:159
 #, c-format
-msgid "invalid multibyte string %d"
+msgid "number of characters is not computable in \"bytes\" encoding, %s"
 msgstr ""
 
-#: src/main/character.c:185
+#: src/main/character.c:188
 #, c-format
-msgid "width is not computable for element %d in \"bytes\" encoding"
+msgid "width is not computable for %s in \"bytes\" encoding"
 msgstr ""
 
-#: src/main/character.c:263
+#: src/main/character.c:311
 msgid "extracting substrings from a non-character object"
 msgstr ""
 
-#: src/main/character.c:268 src/main/character.c:363
+#: src/main/character.c:321 src/main/character.c:522
 msgid "invalid substring arguments"
 msgstr ""
 
-#: src/main/character.c:358
+#: src/main/character.c:361
+msgid "non-character object(s)"
+msgstr ""
+
+#: src/main/character.c:517
 msgid "replacing substrings in a non-character object"
 msgstr ""
 
-#: src/main/character.c:551
+#: src/main/character.c:785
 msgid "the first argument must be a character vector"
 msgstr ""
 
-#: src/main/character.c:570
+#: src/main/character.c:822
 msgid "abbreviate used with non-ASCII chars"
 msgstr ""
 
-#: src/main/character.c:591
+#: src/main/character.c:843
 msgid "non-character names"
 msgstr ""
 
-#: src/main/character.c:696 src/main/grep.c:159
+#: src/main/character.c:905 src/main/character.c:1002
+#, c-format
+msgid "invalid multibyte string %d"
+msgstr ""
+
+#: src/main/character.c:948 src/main/grep.c:163
 msgid "non-character argument"
 msgstr ""
 
-#: src/main/character.c:805
+#: src/main/character.c:1057
 #, c-format
 msgid "decreasing range specification ('%lc-%lc')"
 msgstr ""
 
-#: src/main/character.c:891
+#: src/main/character.c:1143
 #, c-format
 msgid "decreasing range specification ('%c-%c')"
 msgstr ""
 
-#: src/main/character.c:1079
+#: src/main/character.c:1331
 msgid "invalid UTF-8 string 'old'"
 msgstr ""
 
-#: src/main/character.c:1085
+#: src/main/character.c:1337
 msgid "invalid multibyte string 'old'"
 msgstr ""
 
-#: src/main/character.c:1098
+#: src/main/character.c:1350
 msgid "invalid UTF-8 string 'new'"
 msgstr ""
 
-#: src/main/character.c:1104
+#: src/main/character.c:1356
 msgid "invalid multibyte string 'new'"
 msgstr ""
 
-#: src/main/character.c:1132 src/main/character.c:1221
+#: src/main/character.c:1384 src/main/character.c:1473
 msgid "'old' is longer than 'new'"
 msgstr ""
 
-#: src/main/character.c:1164
+#: src/main/character.c:1416
 #, c-format
 msgid "invalid input multibyte string %d"
 msgstr ""
 
-#: src/main/character.c:1271
+#: src/main/character.c:1523
 msgid "strtrim() requires a character vector"
 msgstr ""
 
@@ -1483,15 +1533,15 @@ msgstr ""
 msgid "applies only to lists and vectors"
 msgstr ""
 
-#: src/main/coerce.c:77 src/main/errors.c:1208
+#: src/main/coerce.c:77 src/main/errors.c:1194
 msgid "NAs introduced by coercion"
 msgstr ""
 
-#: src/main/coerce.c:79 src/main/errors.c:1209
-msgid "inaccurate integer conversion in coercion"
+#: src/main/coerce.c:79
+msgid "NAs introduced by coercion to integer range"
 msgstr ""
 
-#: src/main/coerce.c:81 src/main/errors.c:1210
+#: src/main/coerce.c:81 src/main/errors.c:1196
 msgid "imaginary parts discarded in coercion"
 msgstr ""
 
@@ -1499,59 +1549,63 @@ msgstr ""
 msgid "out-of-range values treated as 0 in coercion to raw"
 msgstr ""
 
-#: src/main/coerce.c:414
+#: src/main/coerce.c:399
 #, c-format
 msgid "invalid data of mode '%s' (too short)"
 msgstr ""
 
-#: src/main/coerce.c:1016
+#: src/main/coerce.c:1002
 #, c-format
 msgid "'pairlist' object cannot be coerced to type '%s'"
 msgstr ""
 
-#: src/main/coerce.c:1134
+#: src/main/coerce.c:1120
 #, c-format
 msgid "(list) object cannot be coerced to type '%s'"
 msgstr ""
 
-#: src/main/coerce.c:1157
+#: src/main/coerce.c:1143
 #, c-format
 msgid "(symbol) object cannot be coerced to type '%s'"
 msgstr ""
 
-#: src/main/coerce.c:1173 src/main/coerce.c:1485
+#: src/main/coerce.c:1159 src/main/coerce.c:1484
 msgid "no method for coercing this S4 class to a vector"
 msgstr ""
 
-#: src/main/coerce.c:1232
+#: src/main/coerce.c:1222
 msgid "environments cannot be coerced to other types"
 msgstr ""
 
-#: src/main/coerce.c:1379
+#: src/main/coerce.c:1374
 msgid "attempting to coerce non-factor"
 msgstr ""
 
-#: src/main/coerce.c:1533
+#: src/main/coerce.c:1379 src/main/coerce.c:1389
+msgid "malformed factor"
+msgstr ""
+
+#: src/main/coerce.c:1532
 msgid "list argument expected"
 msgstr ""
 
-#: src/main/coerce.c:1541 src/main/eval.c:5322
+#: src/main/coerce.c:1540 src/main/eval.c:6255
 msgid "invalid environment"
 msgstr ""
 
-#: src/main/coerce.c:1545
+#: src/main/coerce.c:1544
 msgid "argument must have length at least 1"
 msgstr ""
 
-#: src/main/coerce.c:1567
+#: src/main/coerce.c:1566
 msgid "invalid body for function"
 msgstr ""
 
-#: src/main/coerce.c:1590
+#: src/main/coerce.c:1589
 msgid "invalid length 0 argument"
 msgstr ""
 
-#: src/main/coerce.c:1605
+#: src/main/coerce.c:1604
 msgid "invalid argument list"
 msgstr ""
 
@@ -1563,772 +1617,766 @@ msgstr ""
 msgid "unimplemented predicate"
 msgstr ""
 
-#: src/main/coerce.c:2069
+#: src/main/coerce.c:2070
 #, c-format
 msgid "%s() applied to non-(list or vector) of type '%s'"
 msgstr ""
 
-#: src/main/coerce.c:2212 src/main/coerce.c:2275 src/main/coerce.c:2343
+#: src/main/coerce.c:2267 src/main/coerce.c:2331 src/main/coerce.c:2403
 #, c-format
 msgid "default method not implemented for type '%s'"
 msgstr ""
 
-#: src/main/coerce.c:2361
+#: src/main/coerce.c:2425
 msgid "'name' is missing"
 msgstr ""
 
-#: src/main/coerce.c:2368
+#: src/main/coerce.c:2432
 msgid "first argument must be a character string"
 msgstr ""
 
-#: src/main/coerce.c:2401
-msgid "'what' must be a character string or a function"
+#: src/main/coerce.c:2464
+msgid "'what' must be a function or character string"
 msgstr ""
 
-#: src/main/coerce.c:2405
+#: src/main/coerce.c:2468
 msgid "'args' must be a list or expression"
 msgstr ""
 
-#: src/main/coerce.c:2408
-msgid "'args' must be a list"
-msgstr ""
-
-#: src/main/coerce.c:2412
+#: src/main/coerce.c:2475 src/main/unique.c:1345
 msgid "'envir' must be an environment"
 msgstr ""
 
-#: src/main/coerce.c:2567
+#: src/main/coerce.c:2634
 msgid "invalid environment specified"
 msgstr ""
 
-#: src/main/coerce.c:2633
+#: src/main/coerce.c:2700
 msgid "Setting class(x) to NULL;   result will no longer be an S4 object"
 msgstr ""
 
-#: src/main/coerce.c:2636
+#: src/main/coerce.c:2703
 #, c-format
 msgid ""
 "Setting class(x) to multiple strings (\"%s\", \"%s\", ...); result will no "
 "longer be an S4 object"
 msgstr ""
 
-#: src/main/coerce.c:2640
+#: src/main/coerce.c:2707
 #, c-format
 msgid ""
 "Setting class(x) to \"%s\" sets attribute to NULL; result will no longer be "
 "an S4 object"
 msgstr ""
 
-#: src/main/coerce.c:2673
+#: src/main/coerce.c:2740
 msgid "invalid replacement object to be a class string"
 msgstr ""
 
-#: src/main/coerce.c:2694
+#: src/main/coerce.c:2761
 #, c-format
 msgid ""
 "\"%s\" can only be set as the class if the object has this type; found \"%s\""
 msgstr ""
 
-#: src/main/coerce.c:2712
+#: src/main/coerce.c:2779
 #, c-format
 msgid ""
 "invalid to set the class to matrix unless the dimension attribute is of "
 "length 2 (was %d)"
 msgstr ""
 
-#: src/main/coerce.c:2720
+#: src/main/coerce.c:2787
 msgid ""
 "cannot set class to \"array\" unless the dimension attribute has length > 0"
 msgstr ""
 
-#: src/main/coerce.c:2756
+#: src/main/coerce.c:2823
 msgid "'value' must be non-null character string"
 msgstr ""
 
-#: src/main/coerce.c:2769
+#: src/main/coerce.c:2836
 msgid "invalid to change the storage mode of a factor"
 msgstr ""
 
-#: src/main/complex.c:126
+#: src/main/complex.c:123
 msgid "invalid complex unary operator"
 msgstr ""
 
-#: src/main/complex.c:261
+#: src/main/complex.c:251
 msgid "unimplemented complex operation"
 msgstr ""
 
-#: src/main/complex.c:363
+#: src/main/complex.c:353
 msgid "non-numeric argument to function"
 msgstr ""
 
-#: src/main/complex.c:827
+#: src/main/complex.c:822
 msgid "invalid polynomial coefficient"
 msgstr ""
 
-#: src/main/complex.c:832
+#: src/main/complex.c:827
 msgid "root finding code failed"
 msgstr ""
 
-#: src/main/connections.c:153
+#: src/main/connections.c:150
 msgid "all connections are in use"
 msgstr ""
 
-#: src/main/connections.c:164
+#: src/main/connections.c:161
 msgid "connection not found"
 msgstr ""
 
-#: src/main/connections.c:175
+#: src/main/connections.c:172 src/main/connections.c:5213
 msgid "invalid connection"
 msgstr ""
 
-#: src/main/connections.c:207
+#: src/main/connections.c:204
 #, c-format
 msgid "closing unused connection %d (%s)\n"
 msgstr ""
 
-#: src/main/connections.c:232 src/main/sysutils.c:619 src/main/sysutils.c:806
-#: src/main/sysutils.c:821 src/main/sysutils.c:912 src/main/sysutils.c:927
-#: src/main/sysutils.c:1023 src/main/sysutils.c:1096 src/main/sysutils.c:1106
-#: src/main/sysutils.c:1119 src/main/sysutils.c:1516
+#: src/main/connections.c:229 src/main/sysutils.c:631 src/main/sysutils.c:834
+#: src/main/sysutils.c:849 src/main/sysutils.c:978 src/main/sysutils.c:1051
+#: src/main/sysutils.c:1061 src/main/sysutils.c:1074 src/main/sysutils.c:1472
 #, c-format
 msgid "unsupported conversion from '%s' to '%s'"
 msgstr ""
 
-#: src/main/connections.c:288 src/main/connections.c:304
-#: src/main/connections.c:456 src/main/connections.c:462
-#: src/main/connections.c:468 src/main/connections.c:479
-#: src/main/connections.c:486
+#: src/main/connections.c:285 src/main/connections.c:300
+#: src/main/connections.c:451 src/main/connections.c:456
+#: src/main/connections.c:461 src/main/connections.c:472
+#: src/main/connections.c:478
 #, c-format
 msgid "%s not enabled for this connection"
 msgstr ""
 
-#: src/main/connections.c:335 src/main/connections.c:352
-#: src/main/connections.c:2916
+#: src/main/connections.c:330 src/main/connections.c:347
+#: src/main/connections.c:2910
 msgid "printing of extremely long output is truncated"
 msgstr ""
 
-#: src/main/connections.c:375
+#: src/main/connections.c:370
 msgid "invalid char string in output conversion"
 msgstr ""
 
-#: src/main/connections.c:439
+#: src/main/connections.c:434
 #, c-format
 msgid "invalid input found on input connection '%s'"
 msgstr ""
 
-#: src/main/connections.c:580
+#: src/main/connections.c:571
 #, c-format
 msgid "cannot open file '%ls': %s"
 msgstr ""
 
-#: src/main/connections.c:691
+#: src/main/connections.c:683
 msgid "connection is not open for reading"
 msgstr ""
 
-#: src/main/connections.c:696
+#: src/main/connections.c:688
 msgid "connection is not open for writing"
 msgstr ""
 
-#: src/main/connections.c:734 src/main/connections.c:2229
+#: src/main/connections.c:726 src/main/connections.c:2223
 msgid "can only truncate connections open for writing"
 msgstr ""
 
-#: src/main/connections.c:738 src/main/connections.c:740
+#: src/main/connections.c:730 src/main/connections.c:732
 msgid "file truncation failed"
 msgstr ""
 
-#: src/main/connections.c:742
+#: src/main/connections.c:734
 msgid "file truncation unavailable on this platform"
 msgstr ""
 
-#: src/main/connections.c:788 src/main/connections.c:792
-#: src/main/connections.c:798 src/main/connections.c:815
+#: src/main/connections.c:780 src/main/connections.c:784
+#: src/main/connections.c:790 src/main/connections.c:807
 msgid "allocation of file connection failed"
 msgstr ""
 
-#: src/main/connections.c:866 src/main/connections.c:1044
+#: src/main/connections.c:858 src/main/connections.c:1035
 #, c-format
 msgid "cannot create fifo '%s', reason '%s'"
 msgstr ""
 
-#: src/main/connections.c:872
+#: src/main/connections.c:864
 #, c-format
 msgid "'%s' exists but is not a fifo"
 msgstr ""
 
-#: src/main/connections.c:886
+#: src/main/connections.c:878
 #, c-format
 msgid "fifo '%s' is not ready"
 msgstr ""
 
-#: src/main/connections.c:887
+#: src/main/connections.c:879
 #, c-format
 msgid "cannot open fifo '%s'"
 msgstr ""
 
-#: src/main/connections.c:928 src/main/connections.c:939
-#: src/main/connections.c:1104 src/main/connections.c:1123
-#: src/main/connections.c:1531 src/main/connections.c:1541
-#: src/main/connections.c:1660 src/main/connections.c:1720
-#: src/main/connections.c:2246 src/main/connections.c:2263
-#: src/main/connections.c:2572 src/main/connections.c:5305
-#: src/main/connections.c:5369
+#: src/main/connections.c:920 src/main/connections.c:931
+#: src/main/connections.c:1095 src/main/connections.c:1114
+#: src/main/connections.c:1524 src/main/connections.c:1534
+#: src/main/connections.c:1653 src/main/connections.c:1713
+#: src/main/connections.c:2240 src/main/connections.c:2257
+#: src/main/connections.c:2566 src/main/connections.c:5385
+#: src/main/connections.c:5449
 msgid "too large a block specified"
 msgstr ""
 
-#: src/main/connections.c:998 src/main/connections.c:1004
+#: src/main/connections.c:989 src/main/connections.c:995
 msgid "allocation of fifo name failed"
 msgstr ""
 
-#: src/main/connections.c:1066
+#: src/main/connections.c:1057
 #, c-format
 msgid "cannot open fifo '%s', reason '%s'"
 msgstr ""
 
-#: src/main/connections.c:1107 src/main/connections.c:1131
+#: src/main/connections.c:1098 src/main/connections.c:1122
 msgid "allocation of fifo buffer failed"
 msgstr ""
 
-#: src/main/connections.c:1139
+#: src/main/connections.c:1130
 #, c-format
 msgid "cannot write FIFO '%s'"
 msgstr ""
 
-#: src/main/connections.c:1175 src/main/connections.c:1179
-#: src/main/connections.c:1185 src/main/connections.c:1201
+#: src/main/connections.c:1166 src/main/connections.c:1170
+#: src/main/connections.c:1176 src/main/connections.c:1192
 msgid "allocation of fifo connection failed"
 msgstr ""
 
-#: src/main/connections.c:1219 src/main/connections.c:1377
-#: src/main/connections.c:1998 src/main/connections.c:3212
-#: src/main/connections.c:4967
+#: src/main/connections.c:1210 src/main/connections.c:1369
+#: src/main/connections.c:1991 src/main/connections.c:3205
+#: src/main/connections.c:4982
 msgid "only first element of 'description' argument used"
 msgstr ""
 
-#: src/main/connections.c:1236
+#: src/main/connections.c:1227
 msgid ""
 "fifo(\"\") only supports open = \"w+\" and open = \"w+b\": using the former"
 msgstr ""
 
-#: src/main/connections.c:1250 src/main/connections.c:1414
-#: src/main/connections.c:2064 src/main/connections.c:3179
-#: src/main/connections.c:3232 src/main/connections.c:3280
-#: src/main/connections.c:3567 src/main/connections.c:3683
-#: src/main/connections.c:3844 src/main/connections.c:4095
-#: src/main/connections.c:4423 src/main/connections.c:4543
-#: src/main/connections.c:4755 src/main/connections.c:5105 src/main/dcf.c:94
-#: src/main/deparse.c:352 src/main/deparse.c:438 src/main/saveload.c:2267
-#: src/main/saveload.c:2350 src/main/scan.c:933 src/main/serialize.c:2175
-#: src/main/serialize.c:2226 src/main/source.c:265
+#: src/main/connections.c:1242 src/main/connections.c:1407
+#: src/main/connections.c:2058 src/main/connections.c:3175
+#: src/main/connections.c:3226 src/main/connections.c:3274
+#: src/main/connections.c:3563 src/main/connections.c:3679
+#: src/main/connections.c:3841 src/main/connections.c:4106
+#: src/main/connections.c:4434 src/main/connections.c:4554
+#: src/main/connections.c:4768 src/main/connections.c:5180 src/main/dcf.c:93
+#: src/main/deparse.c:361 src/main/deparse.c:450 src/main/saveload.c:2269
+#: src/main/saveload.c:2350 src/main/scan.c:933 src/main/serialize.c:2216
+#: src/main/serialize.c:2267 src/main/source.c:270
 msgid "cannot open the connection"
 msgstr ""
 
-#: src/main/connections.c:1265
+#: src/main/connections.c:1257
 msgid "fifo connections are not available on this system"
 msgstr ""
 
-#: src/main/connections.c:1295
+#: src/main/connections.c:1287
 #, c-format
 msgid "cannot pipe() cmd '%ls': %s"
 msgstr ""
 
-#: src/main/connections.c:1302
+#: src/main/connections.c:1294
 #, c-format
 msgid "cannot open pipe() cmd '%s': %s"
 msgstr ""
 
-#: src/main/connections.c:1471 src/main/connections.c:1791
+#: src/main/connections.c:1464 src/main/connections.c:1784
 #, c-format
 msgid "cannot open compressed file '%s', probable reason '%s'"
 msgstr ""
 
-#: src/main/connections.c:1511
+#: src/main/connections.c:1504
 msgid "whence = \"end\" is not implemented for gzfile connections"
 msgstr ""
 
-#: src/main/connections.c:1516
+#: src/main/connections.c:1509
 msgid "seek on a gzfile connection returned an internal error"
 msgstr ""
 
-#: src/main/connections.c:1550 src/main/connections.c:1554
-#: src/main/connections.c:1560 src/main/connections.c:1577
+#: src/main/connections.c:1543 src/main/connections.c:1547
+#: src/main/connections.c:1553 src/main/connections.c:1570
 msgid "allocation of gzfile connection failed"
 msgstr ""
 
-#: src/main/connections.c:1606
+#: src/main/connections.c:1599
 #, c-format
 msgid "cannot open bzip2-ed file '%s', probable reason '%s'"
 msgstr ""
 
-#: src/main/connections.c:1615
+#: src/main/connections.c:1608
 #, c-format
 msgid "file '%s' appears not to be compressed by bzip2"
 msgstr ""
 
-#: src/main/connections.c:1624
+#: src/main/connections.c:1617
 #, c-format
 msgid "initializing bzip2 compression for file '%s' failed"
 msgstr ""
 
-#: src/main/connections.c:1678
+#: src/main/connections.c:1671
 msgid "allocation of overflow buffer for bzfile failed"
 msgstr ""
 
-#: src/main/connections.c:1685
+#: src/main/connections.c:1678
 #, c-format
 msgid ""
 "file '%s' has trailing content that appears not to be compressed by bzip2"
 msgstr ""
 
-#: src/main/connections.c:1731 src/main/connections.c:1735
-#: src/main/connections.c:1741 src/main/connections.c:1758
+#: src/main/connections.c:1724 src/main/connections.c:1728
+#: src/main/connections.c:1734 src/main/connections.c:1751
 msgid "allocation of bzfile connection failed"
 msgstr ""
 
-#: src/main/connections.c:1804 src/main/connections.c:5961
+#: src/main/connections.c:1797 src/main/connections.c:6046
 #, c-format
 msgid "cannot initialize lzma decoder, error %d"
 msgstr ""
 
-#: src/main/connections.c:1820
+#: src/main/connections.c:1813
 #, c-format
 msgid "cannot initialize lzma encoder, error %d"
 msgstr ""
 
-#: src/main/connections.c:1948 src/main/connections.c:1952
-#: src/main/connections.c:1958 src/main/connections.c:1976
+#: src/main/connections.c:1941 src/main/connections.c:1945
+#: src/main/connections.c:1951 src/main/connections.c:1969
 msgid "allocation of xzfile connection failed"
 msgstr ""
 
-#: src/main/connections.c:2035
+#: src/main/connections.c:2028
 #, c-format
 msgid "this is a %s-compressed file which this build of R does not support"
 msgstr ""
 
-#: src/main/connections.c:2130 src/modules/X11/devX11.c:3375
+#: src/main/connections.c:2124 src/modules/X11/devX11.c:3381
 msgid "memory allocation to copy clipboard failed"
 msgstr ""
 
-#: src/main/connections.c:2135 src/modules/X11/devX11.c:3354
-#: src/modules/X11/devX11.c:3359
+#: src/main/connections.c:2129 src/modules/X11/devX11.c:3360
+#: src/modules/X11/devX11.c:3365
 msgid "clipboard cannot be opened or contains no text"
 msgstr ""
 
-#: src/main/connections.c:2146
+#: src/main/connections.c:2140
 msgid "memory allocation to open clipboard failed"
 msgstr ""
 
-#: src/main/connections.c:2174
+#: src/main/connections.c:2168
 msgid "unable to open the clipboard"
 msgstr ""
 
-#: src/main/connections.c:2178
+#: src/main/connections.c:2172
 msgid "unable to write to the clipboard"
 msgstr ""
 
-#: src/main/connections.c:2218
+#: src/main/connections.c:2212
 msgid "attempt to seek outside the range of the clipboard"
 msgstr ""
 
-#: src/main/connections.c:2261
+#: src/main/connections.c:2255
 msgid "clipboard connection is open for reading only"
 msgstr ""
 
-#: src/main/connections.c:2281
+#: src/main/connections.c:2275
 msgid "clipboard buffer is full and output lost"
 msgstr ""
 
-#: src/main/connections.c:2302
+#: src/main/connections.c:2296
 msgid "'mode' for the clipboard must be 'r' or 'w'"
 msgstr ""
 
-#: src/main/connections.c:2305
+#: src/main/connections.c:2299
 msgid "'mode' for the clipboard must be 'r' on Unix"
 msgstr ""
 
-#: src/main/connections.c:2308 src/main/connections.c:2314
-#: src/main/connections.c:2320 src/main/connections.c:2337
+#: src/main/connections.c:2302 src/main/connections.c:2308
+#: src/main/connections.c:2314 src/main/connections.c:2331
 msgid "allocation of clipboard connection failed"
 msgstr ""
 
-#: src/main/connections.c:2406 src/main/connections.c:2410
-#: src/main/connections.c:2416
+#: src/main/connections.c:2400 src/main/connections.c:2404
+#: src/main/connections.c:2410
 msgid "allocation of terminal connection failed"
 msgstr ""
 
-#: src/main/connections.c:2549
+#: src/main/connections.c:2543
 msgid "attempting to add too many elements to raw vector"
 msgstr ""
 
-#: src/main/connections.c:2601
+#: src/main/connections.c:2595
 msgid "attempt to seek outside the range of the raw connection"
 msgstr ""
 
-#: src/main/connections.c:2612 src/main/connections.c:2616
-#: src/main/connections.c:2622 src/main/connections.c:2648
+#: src/main/connections.c:2606 src/main/connections.c:2610
+#: src/main/connections.c:2616 src/main/connections.c:2642
 msgid "allocation of raw connection failed"
 msgstr ""
 
-#: src/main/connections.c:2701
+#: src/main/connections.c:2695
 msgid "'con' is not a rawConnection"
 msgstr ""
 
-#: src/main/connections.c:2704
+#: src/main/connections.c:2698
 msgid "'con' is not an output rawConnection"
 msgstr ""
 
-#: src/main/connections.c:2742
+#: src/main/connections.c:2736
 msgid "too many characters for text connection"
 msgstr ""
 
-#: src/main/connections.c:2747
+#: src/main/connections.c:2741
 msgid "cannot allocate memory for text connection"
 msgstr ""
 
-#: src/main/connections.c:2796
+#: src/main/connections.c:2790
 msgid "seek is not relevant for text connection"
 msgstr ""
 
-#: src/main/connections.c:2804 src/main/connections.c:2808
-#: src/main/connections.c:2814 src/main/connections.c:2827
-#: src/main/connections.c:3012 src/main/connections.c:3016
-#: src/main/connections.c:3022 src/main/connections.c:3035
-#: src/main/connections.c:3041
+#: src/main/connections.c:2798 src/main/connections.c:2802
+#: src/main/connections.c:2808 src/main/connections.c:2821
+#: src/main/connections.c:3008 src/main/connections.c:3012
+#: src/main/connections.c:3018 src/main/connections.c:3031
+#: src/main/connections.c:3037
 msgid "allocation of text connection failed"
 msgstr ""
 
-#: src/main/connections.c:2989
+#: src/main/connections.c:2983
 msgid "text connection: appending to a non-existent char vector"
 msgstr ""
 
-#: src/main/connections.c:3093
+#: src/main/connections.c:3089
 msgid "unsupported mode"
 msgstr ""
 
-#: src/main/connections.c:3115
+#: src/main/connections.c:3111
 msgid "'con' is not a textConnection"
 msgstr ""
 
-#: src/main/connections.c:3118
+#: src/main/connections.c:3114
 msgid "'con' is not an output textConnection"
 msgstr ""
 
-#: src/main/connections.c:3192
-msgid "sockets are not available on this system"
-msgstr ""
-
-#: src/main/connections.c:3260 src/main/connections.c:3309
-#: src/main/connections.c:3320 src/main/connections.c:3367
-#: src/main/connections.c:3392 src/main/connections.c:3415
-#: src/main/connections.c:3427 src/main/connections.c:3543
-#: src/main/connections.c:3668 src/main/connections.c:5408
+#: src/main/connections.c:3254 src/main/connections.c:3303
+#: src/main/connections.c:3314 src/main/connections.c:3361
+#: src/main/connections.c:3388 src/main/connections.c:3411
+#: src/main/connections.c:3423 src/main/connections.c:3539
+#: src/main/connections.c:3664 src/main/connections.c:5489
 msgid "'con' is not a connection"
 msgstr ""
 
-#: src/main/connections.c:3263
+#: src/main/connections.c:3257
 msgid "cannot open standard connections"
 msgstr ""
 
-#: src/main/connections.c:3265
+#: src/main/connections.c:3259
 msgid "connection is already open"
 msgstr ""
 
-#: src/main/connections.c:3298
+#: src/main/connections.c:3292
 msgid "unknown 'rw' value"
 msgstr ""
 
-#: src/main/connections.c:3369
+#: src/main/connections.c:3363
 msgid "cannot close standard connections"
 msgstr ""
 
-#: src/main/connections.c:3372
+#: src/main/connections.c:3366
 msgid "cannot close 'output' sink connection"
 msgstr ""
 
-#: src/main/connections.c:3374
+#: src/main/connections.c:3368
 msgid "cannot close 'message' sink connection"
 msgstr ""
 
-#: src/main/connections.c:3394 src/main/connections.c:5123
-#: src/main/connections.c:5131 src/main/serialize.c:1996
-#: src/main/serialize.c:2004
+#: src/main/connections.c:3390 src/main/connections.c:5198
+#: src/main/connections.c:5206 src/main/serialize.c:2035
+#: src/main/serialize.c:2043
 msgid "connection is not open"
 msgstr ""
 
-#: src/main/connections.c:3490 src/main/connections.c:3502
+#: src/main/connections.c:3486 src/main/connections.c:3498
 msgid "line longer than buffer size"
 msgstr ""
 
-#: src/main/connections.c:3574 src/main/connections.c:3576
-#: src/main/connections.c:3852 src/main/connections.c:4406
-#: src/main/connections.c:4431 src/main/connections.c:5132 src/main/dcf.c:101
-#: src/main/scan.c:936 src/main/scan.c:940 src/main/serialize.c:1998
-#: src/main/source.c:272
+#: src/main/connections.c:3570 src/main/connections.c:3572
+#: src/main/connections.c:3849 src/main/connections.c:4417
+#: src/main/connections.c:4442 src/main/connections.c:5207 src/main/dcf.c:100
+#: src/main/scan.c:936 src/main/scan.c:940 src/main/serialize.c:2037
+#: src/main/source.c:277
 msgid "cannot read from this connection"
 msgstr ""
 
-#: src/main/connections.c:3588 src/main/connections.c:3610
+#: src/main/connections.c:3584 src/main/connections.c:3606
 msgid "cannot allocate buffer in readLines"
 msgstr ""
 
-#: src/main/connections.c:3623
+#: src/main/connections.c:3619
 #, c-format
 msgid "line %d appears to contain an embedded nul"
 msgstr ""
 
-#: src/main/connections.c:3640
+#: src/main/connections.c:3636
 #, c-format
 msgid "incomplete final line found on '%s'"
 msgstr ""
 
-#: src/main/connections.c:3646
+#: src/main/connections.c:3642
 msgid "too few lines read in readLines"
 msgstr ""
 
-#: src/main/connections.c:3749
+#: src/main/connections.c:3746
 msgid "incomplete string at end of file has been discarded"
 msgstr ""
 
-#: src/main/connections.c:3755
+#: src/main/connections.c:3752
 msgid "null terminator not found: breaking string at 10000 bytes"
 msgstr ""
 
-#: src/main/connections.c:3820
+#: src/main/connections.c:3817
 msgid "can only read from a binary connection"
 msgstr ""
 
-#: src/main/connections.c:3869 src/main/connections.c:4176
+#: src/main/connections.c:3866 src/main/connections.c:4187
 msgid "size changing is not supported for complex vectors"
 msgstr ""
 
-#: src/main/connections.c:3907 src/main/connections.c:3925
-#: src/main/connections.c:3951 src/main/connections.c:4010
-#: src/main/connections.c:4030 src/main/connections.c:4157
-#: src/main/connections.c:4170 src/main/connections.c:4229
-#: src/main/connections.c:4261
+#: src/main/connections.c:3905 src/main/connections.c:3923
+#: src/main/connections.c:3949 src/main/connections.c:3993
+#: src/main/connections.c:4024 src/main/connections.c:4044
+#: src/main/connections.c:4168 src/main/connections.c:4181
+#: src/main/connections.c:4240 src/main/connections.c:4272
 #, c-format
 msgid "size %d is unknown on this machine"
 msgstr ""
 
-#: src/main/connections.c:3936
+#: src/main/connections.c:3934
 msgid "raw is always of size 1"
 msgstr ""
 
-#: src/main/connections.c:3959
+#: src/main/connections.c:3957
 msgid "'signed = FALSE' is only valid for integers of sizes 1 and 2"
 msgstr ""
 
-#: src/main/connections.c:4060
+#: src/main/connections.c:4071
 msgid "'x' is not an atomic vector type"
 msgstr ""
 
-#: src/main/connections.c:4066
+#: src/main/connections.c:4077
 msgid "can only write to a binary connection"
 msgstr ""
 
-#: src/main/connections.c:4085
+#: src/main/connections.c:4096
 msgid "only 2^31-1 bytes can be written to a raw vector"
 msgstr ""
 
-#: src/main/connections.c:4087
+#: src/main/connections.c:4098
 msgid "only 2^31-1 bytes can be written in a single writeBin() call"
 msgstr ""
 
-#: src/main/connections.c:4136 src/main/connections.c:4289
-#: src/main/connections.c:4570 src/main/connections.c:4610
+#: src/main/connections.c:4147 src/main/connections.c:4300
+#: src/main/connections.c:4581 src/main/connections.c:4621
 msgid "problem writing to connection"
 msgstr ""
 
-#: src/main/connections.c:4181
+#: src/main/connections.c:4192
 msgid "size changing is not supported for raw vectors"
 msgstr ""
 
-#: src/main/connections.c:4324 src/main/connections.c:4328
-#: src/main/connections.c:4367
+#: src/main/connections.c:4335 src/main/connections.c:4339
+#: src/main/connections.c:4378
 msgid "invalid UTF-8 input in readChar()"
 msgstr ""
 
-#: src/main/connections.c:4434
+#: src/main/connections.c:4445
 msgid "can only read in bytes in a non-UTF-8 MBCS locale"
 msgstr ""
 
-#: src/main/connections.c:4506
+#: src/main/connections.c:4517
 msgid "'object' is too short"
 msgstr ""
 
-#: src/main/connections.c:4559
+#: src/main/connections.c:4570
 msgid "writeChar: more bytes requested than are in the string - will zero-pad"
 msgstr ""
 
-#: src/main/connections.c:4584
+#: src/main/connections.c:4595
 msgid ""
 "writeChar: more characters requested than are in the string - will zero-pad"
 msgstr ""
 
-#: src/main/connections.c:4638
+#: src/main/connections.c:4649
 msgid "maximum number of pushback lines exceeded"
 msgstr ""
 
-#: src/main/connections.c:4644 src/main/connections.c:4648
-#: src/main/connections.c:4685 src/main/connections.c:4693
+#: src/main/connections.c:4655 src/main/connections.c:4659
+#: src/main/connections.c:4696 src/main/connections.c:4704
 msgid "could not allocate space for pushback"
 msgstr ""
 
-#: src/main/connections.c:4676
+#: src/main/connections.c:4687
 msgid "can only push back on open readable connections"
 msgstr ""
 
-#: src/main/connections.c:4678
+#: src/main/connections.c:4689
 msgid "can only push back on text-mode connections"
 msgstr ""
 
-#: src/main/connections.c:4740 src/main/connections.c:4810
+#: src/main/connections.c:4753 src/main/connections.c:4823
 msgid "sink stack is full"
 msgstr ""
 
-#: src/main/connections.c:4743
+#: src/main/connections.c:4756
 msgid "cannot switch output to stdin"
 msgstr ""
 
-#: src/main/connections.c:4770
+#: src/main/connections.c:4783
 msgid "no sink to remove"
 msgstr ""
 
-#: src/main/connections.c:4892
+#: src/main/connections.c:4903
 msgid "there is no connection NA"
 msgstr ""
 
-#: src/main/connections.c:4894
+#: src/main/connections.c:4905
 #, c-format
 msgid "there is no connection %d"
 msgstr ""
 
-#: src/main/connections.c:5029
+#: src/main/connections.c:5039
+msgid "method = \"wininet\" is only supported on Windows"
+msgstr ""
+
+#: src/main/connections.c:5103
 msgid ""
 "file(\"\") only supports open = \"w+\" and open = \"w+b\": using the former"
 msgstr ""
 
-#: src/main/connections.c:5083 src/modules/internet/internet.c:115
-#: src/modules/internet/internet.c:569
-msgid "unsupported URL scheme"
+#: src/main/connections.c:5157
+msgid "URL scheme unsupported by this method"
 msgstr ""
 
-#: src/main/connections.c:5173
+#: src/main/connections.c:5253
 msgid "file stream does not have gzip magic number"
 msgstr ""
 
-#: src/main/connections.c:5184
+#: src/main/connections.c:5264
 msgid "file stream does not have valid gzip header"
 msgstr ""
 
-#: src/main/connections.c:5249
+#: src/main/connections.c:5329
 msgid "writing error whilst flushing 'gzcon' connection"
 msgstr ""
 
-#: src/main/connections.c:5351
+#: src/main/connections.c:5431
 #, c-format
 msgid "crc error %x %x\n"
 msgstr ""
 
-#: src/main/connections.c:5378
+#: src/main/connections.c:5458
 msgid "write error on 'gzcon' connection"
 msgstr ""
 
-#: src/main/connections.c:5412
+#: src/main/connections.c:5493
 msgid "'level' must be one of 0 ... 9"
 msgstr ""
 
-#: src/main/connections.c:5415
+#: src/main/connections.c:5496
 msgid "'allowNonCompression' must be TRUE or FALSE"
 msgstr ""
 
-#: src/main/connections.c:5418
+#: src/main/connections.c:5499
+msgid "'text' must be TRUE or FALSE"
+msgstr ""
+
+#: src/main/connections.c:5502
 msgid "this is already a 'gzcon' connection"
 msgstr ""
 
-#: src/main/connections.c:5424
+#: src/main/connections.c:5508
 msgid "can only use read- or write- binary connections"
 msgstr ""
 
-#: src/main/connections.c:5427
+#: src/main/connections.c:5511
 msgid "using a text-mode 'file' connection may not work correctly"
 msgstr ""
 
-#: src/main/connections.c:5430
+#: src/main/connections.c:5514
 msgid ""
 "cannot create a 'gzcon' connection from a writable textConnection; maybe use "
 "rawConnection"
 msgstr ""
 
-#: src/main/connections.c:5433 src/main/connections.c:5437
-#: src/main/connections.c:5444 src/main/connections.c:5458
+#: src/main/connections.c:5517 src/main/connections.c:5521
+#: src/main/connections.c:5528 src/main/connections.c:5542
 msgid "allocation of 'gzcon' connection failed"
 msgstr ""
 
-#: src/main/connections.c:5644
+#: src/main/connections.c:5729
 msgid "not a list of sockets"
 msgstr ""
 
-#: src/main/connections.c:5649
+#: src/main/connections.c:5734
 msgid "bad write indicators"
 msgstr ""
 
-#: src/main/connections.c:5660
+#: src/main/connections.c:5745
 msgid "not a socket connection"
 msgstr ""
 
-#: src/main/connections.c:5905
+#: src/main/connections.c:5990
 msgid "unknown compression, assuming none"
 msgstr ""
 
-#: src/main/connections.c:6023 src/main/connections.c:6027
-#: src/main/connections.c:6033
+#: src/main/connections.c:6108 src/main/connections.c:6112
+#: src/main/connections.c:6118
 #, c-format
 msgid "allocation of %s connection failed"
 msgstr ""
 
-#: src/main/context.c:282
+#: src/main/context.c:316
 msgid "no loop for break/next, jumping to top level"
 msgstr ""
 
-#: src/main/context.c:290
+#: src/main/context.c:324
 msgid "no function to return from, jumping to top level"
 msgstr ""
 
-#: src/main/context.c:302
+#: src/main/context.c:339
 msgid "target context is not on the stack"
 msgstr ""
 
-#: src/main/context.c:324 src/main/context.c:340 src/main/context.c:407
-#: src/main/context.c:428 src/main/context.c:440 src/main/context.c:452
+#: src/main/context.c:361 src/main/context.c:377 src/main/context.c:444
+#: src/main/context.c:465 src/main/context.c:477 src/main/context.c:489
 msgid "not that many frames on the stack"
 msgstr ""
 
-#: src/main/context.c:357
+#: src/main/context.c:394
 msgid "only positive values of 'n' are allowed"
 msgstr ""
 
-#: src/main/context.c:478
-msgid "no function to restart"
-msgstr ""
-
-#: src/main/context.c:515
+#: src/main/context.c:526
 msgid "number of contexts must be positive"
 msgstr ""
 
-#: src/main/context.c:528
+#: src/main/context.c:539
 msgid "no browser context to query"
 msgstr ""
 
-#: src/main/context.c:546
+#: src/main/context.c:557
 msgid "not that many calls to browser are active"
 msgstr ""
 
-#: src/main/context.c:560
+#: src/main/context.c:571
 msgid "not that many functions on the call stack"
 msgstr ""
 
-#: src/main/context.c:645
+#: src/main/context.c:656
 msgid "internal error in 'do_sys'"
 msgstr ""
 
@@ -2336,37 +2384,37 @@ msgstr ""
 msgid "integer overflow in 'cumsum'; use 'cumsum(as.numeric(.))'"
 msgstr ""
 
-#: src/main/cum.c:178
-msgid "'cummin' not defined for complex numbers"
+#: src/main/cum.c:179
+msgid "'cummax' not defined for complex numbers"
 msgstr ""
 
-#: src/main/cum.c:181
-msgid "'cummax' not defined for complex numbers"
+#: src/main/cum.c:182
+msgid "'cummin' not defined for complex numbers"
 msgstr ""
 
-#: src/main/cum.c:206 src/main/cum.c:230
+#: src/main/cum.c:209 src/main/cum.c:236
 msgid "unknown cumxxx function"
 msgstr ""
 
-#: src/main/datetime.c:548 src/main/datetime.c:556 src/main/datetime.c:570
-#: src/main/datetime.c:575
+#: src/main/datetime.c:554 src/main/datetime.c:562 src/main/datetime.c:576
+#: src/main/datetime.c:581
 msgid "problem with setting timezone"
 msgstr ""
 
-#: src/main/datetime.c:560
+#: src/main/datetime.c:566
 msgid "cannot set timezones on this system"
 msgstr ""
 
-#: src/main/datetime.c:582 src/main/datetime.c:584
+#: src/main/datetime.c:588 src/main/datetime.c:590
 msgid "problem with unsetting timezone"
 msgstr ""
 
-#: src/main/datetime.c:804 src/main/datetime.c:806 src/main/datetime.c:901
-#: src/main/datetime.c:1240 src/main/datetime.c:1242
+#: src/main/datetime.c:810 src/main/datetime.c:812 src/main/datetime.c:908
+#: src/main/datetime.c:1258 src/main/datetime.c:1260
 msgid "zero-length component in non-empty \"POSIXlt\" structure"
 msgstr ""
 
-#: src/main/dcf.c:113 src/main/dcf.c:181 src/main/dcf.c:253
+#: src/main/dcf.c:112 src/main/dcf.c:181 src/main/dcf.c:253
 msgid "could not allocate memory for 'read.dcf'"
 msgstr ""
 
@@ -2380,78 +2428,83 @@ msgstr ""
 msgid "Line starting '%s ...' is malformed!"
 msgstr ""
 
-#: src/main/debug.c:45
-msgid "argument must be a closure"
+#: src/main/debug.c:46 src/main/debug.c:76
+msgid "argument must be a function"
 msgstr ""
 
-#: src/main/debug.c:76
-msgid "argument must be a function"
+#: src/main/debug.c:111
+#, c-format
+msgid "Value for '%s' must be TRUE or FALSE"
 msgstr ""
 
-#: src/main/debug.c:132 src/main/debug.c:166 src/main/debug.c:224
+#: src/main/debug.c:139 src/main/debug.c:167 src/main/debug.c:241
 msgid "argument must not be a function"
 msgstr ""
 
-#: src/main/debug.c:135
+#: src/main/debug.c:142
 msgid "cannot trace NULL"
 msgstr ""
 
-#: src/main/debug.c:139
+#: src/main/debug.c:146
 msgid "'tracemem' is not useful for promise and environment objects"
 msgstr ""
 
-#: src/main/debug.c:142
+#: src/main/debug.c:149
 msgid "'tracemem' is not useful for weak reference or external pointer objects"
 msgstr ""
 
-#: src/main/debug.c:148 src/main/debug.c:171
+#: src/main/debug.c:180 src/main/debug.c:187
 msgid "R was not compiled with support for memory profiling"
 msgstr ""
 
-#: src/main/deparse.c:152 src/main/sprintf.c:213 src/main/sprintf.c:245
+#: src/main/deparse.c:156 src/main/sprintf.c:216 src/main/sprintf.c:248
 msgid "too few arguments"
 msgstr ""
 
-#: src/main/deparse.c:159
+#: src/main/deparse.c:163
 msgid "invalid 'cutoff' value for 'deparse', using default"
 msgstr ""
 
-#: src/main/deparse.c:247
+#: src/main/deparse.c:254
 msgid "deparse of an S4 object will not be source()able"
 msgstr ""
 
-#: src/main/deparse.c:249
+#: src/main/deparse.c:256
 msgid "deparse may be incomplete"
 msgstr ""
 
-#: src/main/deparse.c:251
+#: src/main/deparse.c:258
 msgid "deparse may be not be source()able in R < 2.7.0"
 msgstr ""
 
-#: src/main/deparse.c:369 src/main/deparse.c:461 src/main/deparse.c:467
+#: src/main/deparse.c:350 src/main/deparse.c:400 src/main/source.c:206
+msgid "'file' must be a character string or connection"
+msgstr ""
+
+#: src/main/deparse.c:378 src/main/deparse.c:473 src/main/deparse.c:479
 msgid "wrote too few characters"
 msgstr ""
 
-#: src/main/deparse.c:391
+#: src/main/deparse.c:402
 msgid "character arguments expected"
 msgstr ""
 
-#: src/main/deparse.c:394
+#: src/main/deparse.c:405
 msgid "zero-length argument"
 msgstr ""
 
-#: src/main/deparse.c:401
+#: src/main/deparse.c:412
 msgid "'opts' should be small non-negative integer"
 msgstr ""
 
-#: src/main/deparse.c:411 src/main/envir.c:1764 src/main/envir.c:1846
-#: src/main/eval.c:569 src/main/eval.c:1251 src/main/eval.c:3627
-#: src/main/saveload.c:1978 src/main/saveload.c:2309 src/main/serialize.c:2727
+#: src/main/deparse.c:422 src/main/envir.c:1898 src/main/envir.c:1983
+#: src/main/eval.c:626 src/main/eval.c:1423 src/main/eval.c:4246
+#: src/main/saveload.c:1980 src/main/saveload.c:2312 src/main/serialize.c:2773
 #, c-format
 msgid "object '%s' not found"
 msgstr ""
 
-#: src/main/deparse.c:1519
+#: src/main/deparse.c:1592
 msgid "badly formed function expression"
 msgstr ""
 
@@ -2459,246 +2512,231 @@ msgstr ""
 msgid "the base graphics system is not registered"
 msgstr ""
 
-#: src/main/devices.c:165 src/main/devices.c:172
+#: src/main/devices.c:166 src/main/devices.c:174
 msgid "no active or default device"
 msgstr ""
 
-#: src/main/devices.c:385 src/main/devices.c:447
+#: src/main/devices.c:388 src/main/devices.c:450
 msgid "too many open devices"
 msgstr ""
 
-#: src/main/devices.c:474
+#: src/main/devices.c:491
 msgid "not enough memory to allocate device (in GEcreateDevDesc)"
 msgstr ""
 
-#: src/main/devices.c:515
+#: src/main/devices.c:532
 msgid "Hit <Return> to see next plot: "
 msgstr ""
 
-#: src/main/dotcode.c:112 src/main/dotcode.c:142
+#: src/main/dotcode.c:127 src/main/dotcode.c:157
 msgid "NULL value passed as symbol address"
 msgstr ""
 
-#: src/main/dotcode.c:133
+#: src/main/dotcode.c:148
 #, c-format
 msgid "Unimplemented type %d in createRSymbolObject"
 msgstr ""
 
-#: src/main/dotcode.c:147 src/main/dotcode.c:237
+#: src/main/dotcode.c:162 src/main/dotcode.c:260
 #, c-format
 msgid "symbol '%s' is too long"
 msgstr ""
 
-#: src/main/dotcode.c:159
+#: src/main/dotcode.c:174
 msgid ""
 "first argument must be a string (of length 1) or native symbol reference"
 msgstr ""
 
-#: src/main/dotcode.c:201 src/main/dotcode.c:563
+#: src/main/dotcode.c:224 src/main/dotcode.c:1240
 msgid "too many arguments in foreign function call"
 msgstr ""
 
-#: src/main/dotcode.c:213
+#: src/main/dotcode.c:236
 msgid "PACKAGE = \"\" is invalid"
 msgstr ""
 
-#: src/main/dotcode.c:269 src/main/dotcode.c:274 src/main/dotcode.c:279
-#: src/main/dotcode.c:284
+#: src/main/dotcode.c:292 src/main/dotcode.c:297 src/main/dotcode.c:302
+#: src/main/dotcode.c:307
 #, c-format
 msgid "\"%s\" not available for %s() for package \"%s\""
 msgstr ""
 
-#: src/main/dotcode.c:289
+#: src/main/dotcode.c:312
 #, c-format
 msgid "%s symbol name \"%s\" not in DLL for package \"%s\""
 msgstr ""
 
-#: src/main/dotcode.c:294
+#: src/main/dotcode.c:317
 #, c-format
 msgid "%s symbol name \"%s\" not in load table"
 msgstr ""
 
-#: src/main/dotcode.c:348 src/main/dotcode.c:352 src/main/dotcode.c:362
-#: src/main/dotcode.c:427 src/main/dotcode.c:434
+#: src/main/dotcode.c:368 src/main/dotcode.c:370 src/main/dotcode.c:380
+#: src/main/dotcode.c:445 src/main/dotcode.c:452
 #, c-format
 msgid "'%s' used more than once"
 msgstr ""
 
-#: src/main/dotcode.c:358
+#: src/main/dotcode.c:376
 msgid "DLL name is too long"
 msgstr ""
 
-#: src/main/dotcode.c:403
+#: src/main/dotcode.c:421
 msgid "PACKAGE argument must be a single character string"
 msgstr ""
 
-#: src/main/dotcode.c:409
+#: src/main/dotcode.c:427
 msgid "PACKAGE argument is too long"
 msgstr ""
 
-#: src/main/dotcode.c:474
+#: src/main/dotcode.c:492
 msgid "no arguments supplied"
 msgstr ""
 
-#: src/main/dotcode.c:475 src/main/seq.c:913
+#: src/main/dotcode.c:493 src/main/seq.c:911
 msgid "too many arguments"
 msgstr ""
 
-#: src/main/dotcode.c:512 src/main/dotcode.c:554 src/main/dotcode.c:1397
+#: src/main/dotcode.c:530 src/main/dotcode.c:1232 src/main/dotcode.c:1420
 msgid "'.NAME' is missing"
 msgstr ""
 
-#: src/main/dotcode.c:521 src/main/dotcode.c:570 src/main/dotcode.c:1418
+#: src/main/dotcode.c:539 src/main/dotcode.c:1247 src/main/dotcode.c:1441
 #, c-format
 msgid "Incorrect number of arguments (%d), expecting %d for '%s'"
 msgstr ""
 
-#: src/main/dotcode.c:1227 src/main/dotcode.c:2276
+#: src/main/dotcode.c:1216 src/main/dotcode.c:2290
 msgid "too many arguments, sorry"
 msgstr ""
 
-#: src/main/dotcode.c:1261 src/main/dotcode.c:1278 src/main/engine.c:2993
+#: src/main/dotcode.c:1284 src/main/dotcode.c:1301 src/main/engine.c:3013
 msgid "invalid graphics state"
 msgstr ""
 
-#: src/main/dotcode.c:1357
+#: src/main/dotcode.c:1380
 msgid "NULL value for DLLInfoReference when looking for DLL"
 msgstr ""
 
-#: src/main/dotcode.c:1458
+#: src/main/dotcode.c:1481
 #, c-format
 msgid "wrong type for argument %d in call to %s"
 msgstr ""
 
-#: src/main/dotcode.c:1470
-#, c-format
-msgid ""
-"explicit request not to duplicate arguments in call to '%s', but argument %d "
-"is of the wrong type (%d != %d)"
-msgstr ""
-
-#: src/main/dotcode.c:1493
+#: src/main/dotcode.c:1510
 #, c-format
 msgid "long vectors (argument %d) are not supported in %s"
 msgstr ""
 
-#: src/main/dotcode.c:1524
+#: src/main/dotcode.c:1541
 #, c-format
 msgid "NAs in foreign function call (arg %d)"
 msgstr ""
 
-#: src/main/dotcode.c:1547
+#: src/main/dotcode.c:1564
 #, c-format
 msgid "NA/NaN/Inf in foreign function call (arg %d)"
 msgstr ""
 
-#: src/main/dotcode.c:1552
-msgid "single values not returned if not duplicated"
-msgstr ""
-
-#: src/main/dotcode.c:1578
+#: src/main/dotcode.c:1594
 #, c-format
 msgid "complex NA/NaN/Inf in foreign function call (arg %d)"
 msgstr ""
 
-#: src/main/dotcode.c:1597
-msgid "character variables must be duplicated in .C/.Fortran"
-msgstr ""
-
-#: src/main/dotcode.c:1602
+#: src/main/dotcode.c:1616
 msgid "only first string in char vector used in .Fortran"
 msgstr ""
 
-#: src/main/dotcode.c:1645 src/main/dotcode.c:1661 src/main/dotcode.c:1672
+#: src/main/dotcode.c:1659 src/main/dotcode.c:1675 src/main/dotcode.c:1686
 #, c-format
 msgid "invalid mode (%s) to pass to Fortran (arg %d)"
 msgstr ""
 
-#: src/main/dotcode.c:1666
+#: src/main/dotcode.c:1680
 #, c-format
 msgid "invalid mode (%s) to pass to C or Fortran (arg %d)"
 msgstr ""
 
-#: src/main/dotcode.c:1677
+#: src/main/dotcode.c:1691
 msgid "pairlists are passed as SEXP as from R 2.15.0"
 msgstr ""
 
-#: src/main/dotcode.c:2499
+#: src/main/dotcode.c:2510
 #, c-format
 msgid "type \"%s\" not supported in interlanguage calls"
 msgstr ""
 
-#: src/main/dotcode.c:2604
+#: src/main/dotcode.c:2615
 #, c-format
 msgid "mode '%s' is not supported in call_R"
 msgstr ""
 
-#: src/main/dounzip.c:171
+#: src/main/dounzip.c:172
 #, c-format
 msgid " not overwriting file '%s"
 msgstr ""
 
-#: src/main/dounzip.c:256
+#: src/main/dounzip.c:257
 #, c-format
 msgid "zip file '%s' cannot be opened"
 msgstr ""
 
-#: src/main/dounzip.c:312
+#: src/main/dounzip.c:313
 msgid "invalid zip name argument"
 msgstr ""
 
-#: src/main/dounzip.c:315 src/main/dounzip.c:409
+#: src/main/dounzip.c:316 src/main/dounzip.c:410
 msgid "zip path is too long"
 msgstr ""
 
-#: src/main/dounzip.c:332
+#: src/main/dounzip.c:333
 msgid "'exdir' is too long"
 msgstr ""
 
-#: src/main/dounzip.c:335
+#: src/main/dounzip.c:336
 msgid "'exdir' does not exist"
 msgstr ""
 
-#: src/main/dounzip.c:363
+#: src/main/dounzip.c:364
 msgid "requested file not found in the zip file"
 msgstr ""
 
-#: src/main/dounzip.c:366
+#: src/main/dounzip.c:367
 msgid "zip file is corrupt"
 msgstr ""
 
-#: src/main/dounzip.c:369
+#: src/main/dounzip.c:370
 msgid "CRC error in zip file"
 msgstr ""
 
-#: src/main/dounzip.c:376
+#: src/main/dounzip.c:377
 msgid "write error in extracting from zip file"
 msgstr ""
 
-#: src/main/dounzip.c:379
+#: src/main/dounzip.c:380
 #, c-format
 msgid "error %d in extracting from zip file"
 msgstr ""
 
-#: src/main/dounzip.c:404
+#: src/main/dounzip.c:405
 msgid "unz connections can only be opened for reading"
 msgstr ""
 
-#: src/main/dounzip.c:415
+#: src/main/dounzip.c:416
 msgid "invalid description of 'unz' connection"
 msgstr ""
 
-#: src/main/dounzip.c:421
+#: src/main/dounzip.c:422
 #, c-format
 msgid "cannot open zip file '%s'"
 msgstr ""
 
-#: src/main/dounzip.c:425
+#: src/main/dounzip.c:426
 #, c-format
 msgid "cannot locate file '%s' in zip file '%s'"
 msgstr ""
 
-#: src/main/dounzip.c:469
+#: src/main/dounzip.c:470
 msgid "printing not enabled for this connection"
 msgstr ""
 
@@ -2706,8 +2744,8 @@ msgstr ""
 msgid "write not enabled for this connection"
 msgstr ""
 
-#: src/main/dounzip.c:496 src/main/dounzip.c:500 src/main/dounzip.c:506
-#: src/main/dounzip.c:523
+#: src/main/dounzip.c:494 src/main/dounzip.c:498 src/main/dounzip.c:504
+#: src/main/dounzip.c:521
 msgid "allocation of 'unz' connection failed"
 msgstr ""
 
@@ -2723,7 +2761,7 @@ msgstr ""
 msgid "invalid argument to edit()"
 msgstr ""
 
-#: src/main/edit.c:121 src/main/saveload.c:2076
+#: src/main/edit.c:121 src/main/saveload.c:2078
 msgid "unable to open file"
 msgstr ""
 
@@ -2783,12 +2821,12 @@ msgid "no graphics system to unregister"
 msgstr ""
 
 #: src/main/engine.c:443 src/main/engine.c:448 src/main/engine.c:456
-#: src/main/engine.c:463 src/main/engine.c:477 src/modules/X11/devX11.c:1157
+#: src/main/engine.c:463 src/main/engine.c:477 src/modules/X11/devX11.c:1159
 msgid "invalid line end"
 msgstr ""
 
 #: src/main/engine.c:508 src/main/engine.c:513 src/main/engine.c:521
-#: src/main/engine.c:528 src/main/engine.c:542 src/modules/X11/devX11.c:1175
+#: src/main/engine.c:528 src/main/engine.c:542 src/modules/X11/devX11.c:1177
 msgid "invalid line join"
 msgstr ""
 
@@ -2817,82 +2855,96 @@ msgstr ""
 msgid "raster capture is not available for this device"
 msgstr ""
 
-#: src/main/engine.c:1656
+#: src/main/engine.c:1662
 #, c-format
 msgid "font face %d not supported for font family '%s'"
 msgstr ""
 
-#: src/main/engine.c:1972
+#: src/main/engine.c:1978
 msgid "no graphics device is active"
 msgstr ""
 
-#: src/main/engine.c:2049
+#: src/main/engine.c:2055
 #, c-format
 msgid "pch value '%d' is invalid in this locale"
 msgstr ""
 
-#: src/main/engine.c:2307
+#: src/main/engine.c:2313
 #, c-format
 msgid "unimplemented pch value '%d'"
 msgstr ""
 
-#: src/main/engine.c:2330
+#: src/main/engine.c:2336
 #, c-format
 msgid "invalid axis extents [GEPretty(.,.,n=%d)"
 msgstr ""
 
-#: src/main/engine.c:2334
+#: src/main/engine.c:2340
 #, c-format
 msgid "infinite axis extents [GEPretty(%g,%g,%d)]"
 msgstr ""
 
-#: src/main/engine.c:2371
+#: src/main/engine.c:2377
 #, c-format
 msgid " .. GEPretty(.): new *lo = %g < %g = x1"
 msgstr ""
 
-#: src/main/engine.c:2373
+#: src/main/engine.c:2379
 #, c-format
 msgid " .. GEPretty(.): new *up = %g > %g = x2"
 msgstr ""
 
-#: src/main/engine.c:2773
+#: src/main/engine.c:2784
 msgid "display list redraw incomplete"
 msgstr ""
 
-#: src/main/engine.c:2777
+#: src/main/engine.c:2788
 msgid "invalid display list"
 msgstr ""
 
-#: src/main/engine.c:2963
+#: src/main/engine.c:2900
+#, c-format
+msgid ""
+"snapshot recorded with different graphics engine version (pre 11 - this is "
+"version %d)"
+msgstr ""
+
+#: src/main/engine.c:2904
+#, c-format
+msgid ""
+"snapshot recorded with different graphics engine version (%d - this is "
+"version %d)"
+msgstr ""
+
+#: src/main/engine.c:2983
 msgid "'expr' argument must be an expression"
 msgstr ""
 
-#: src/main/engine.c:2965
+#: src/main/engine.c:2985
 msgid "'list' argument must be a list"
 msgstr ""
 
-#: src/main/engine.c:2971
+#: src/main/engine.c:2991
 msgid "'env' argument must be an environment"
 msgstr ""
 
-#: src/main/engine.c:3051 src/main/engine.c:3059
+#: src/main/engine.c:3071 src/main/engine.c:3079
 msgid "invalid multibyte char in pch=\"c\""
 msgstr ""
 
-#: src/main/engine.c:3106
+#: src/main/engine.c:3126
 msgid "invalid hex digit in 'color' or 'lty'"
 msgstr ""
 
-#: src/main/engine.c:3129
+#: src/main/engine.c:3149
 msgid "invalid line type: must be length 2, 4, 6 or 8"
 msgstr ""
 
-#: src/main/engine.c:3133
+#: src/main/engine.c:3153
 msgid "invalid line type: zeroes are not allowed"
 msgstr ""
 
-#: src/main/engine.c:3142 src/main/engine.c:3150 src/main/engine.c:3157
+#: src/main/engine.c:3162 src/main/engine.c:3170 src/main/engine.c:3177
 msgid "invalid line type"
 msgstr ""
 
@@ -2901,698 +2953,704 @@ msgstr ""
 msgid "cannot change value of locked binding for '%s'"
 msgstr ""
 
-#: src/main/envir.c:251 src/main/envir.c:1454
+#: src/main/envir.c:251 src/main/envir.c:1530
 msgid "cannot add bindings to a locked environment"
 msgstr ""
 
-#: src/main/envir.c:772
+#: src/main/envir.c:775
 msgid "invalid cached value in R_GetGlobalCache"
 msgstr ""
 
-#: src/main/envir.c:830
+#: src/main/envir.c:836
 msgid "cannot unbind in the base namespace"
 msgstr ""
 
-#: src/main/envir.c:832
+#: src/main/envir.c:838
 msgid "unbind in the base environment is unimplemented"
 msgstr ""
 
-#: src/main/envir.c:834 src/main/envir.c:1684
+#: src/main/envir.c:840 src/main/envir.c:1818
 msgid "cannot remove bindings from a locked environment"
 msgstr ""
 
-#: src/main/envir.c:1139
+#: src/main/envir.c:1213
 #, c-format
 msgid "argument to '%s' is not an environment"
 msgstr ""
 
-#: src/main/envir.c:1300
+#: src/main/envir.c:1374
 #, c-format
 msgid "the ... list does not contain %d elements"
 msgstr ""
 
-#: src/main/envir.c:1302
+#: src/main/envir.c:1376
 #, c-format
 msgid "..%d used in an incorrect context, no ... to look in"
 msgstr ""
 
-#: src/main/envir.c:1390 src/main/envir.c:1842 src/main/eval.c:573
-#: src/main/eval.c:3618
-#, c-format
-msgid "argument \"%s\" is missing, with no default"
-msgstr ""
-
-#: src/main/envir.c:1395
+#: src/main/envir.c:1469
 #, c-format
 msgid "could not find function \"%s\""
 msgstr ""
 
-#: src/main/envir.c:1418
+#: src/main/envir.c:1492
 msgid "cannot assign values in the empty environment"
 msgstr ""
 
-#: src/main/envir.c:1424 src/main/envir.c:1497
+#: src/main/envir.c:1498 src/main/envir.c:1628
 msgid "cannot assign variables to this database"
 msgstr ""
 
-#: src/main/envir.c:1580
+#: src/main/envir.c:1714
 #, c-format
 msgid "cannot add binding of '%s' to the base environment"
 msgstr ""
 
-#: src/main/envir.c:1609
+#: src/main/envir.c:1743
 msgid "only the first element is used as variable name"
 msgstr ""
 
-#: src/main/envir.c:1641
+#: src/main/envir.c:1775
 msgid "first argument must be a named list"
 msgstr ""
 
-#: src/main/envir.c:1646
+#: src/main/envir.c:1780
 msgid "names(x) must be a character vector of the same length as x"
 msgstr ""
 
-#: src/main/envir.c:1649
+#: src/main/envir.c:1783
 msgid "'envir' argument must be an environment"
 msgstr ""
 
-#: src/main/envir.c:1678
+#: src/main/envir.c:1812
 msgid "cannot remove variables from base namespace"
 msgstr ""
 
-#: src/main/envir.c:1680
+#: src/main/envir.c:1814
 msgid "cannot remove variables from the base environment"
 msgstr ""
 
-#: src/main/envir.c:1682
+#: src/main/envir.c:1816
 msgid "cannot remove variables from the empty environment"
 msgstr ""
 
-#: src/main/envir.c:1690
+#: src/main/envir.c:1824
 msgid "cannot remove variables from this database"
 msgstr ""
 
-#: src/main/envir.c:1849
+#: src/main/envir.c:1985
 #, c-format
 msgid "object '%s' of mode '%s' was not found"
 msgstr ""
 
-#: src/main/envir.c:1921
+#: src/main/envir.c:2068
 #, c-format
 msgid "invalid name in position %d"
 msgstr ""
 
-#: src/main/envir.c:1927
+#: src/main/envir.c:2074
 msgid "second argument must be an environment"
 msgstr ""
 
-#: src/main/envir.c:1935 src/main/envir.c:1943
+#: src/main/envir.c:2082 src/main/envir.c:2090
 #, c-format
 msgid "wrong length for '%s' argument"
 msgstr ""
 
-#: src/main/envir.c:2062
+#: src/main/envir.c:2221
 msgid "invalid use of 'missing'"
 msgstr ""
 
-#: src/main/envir.c:2087
+#: src/main/envir.c:2247
 msgid "'missing' can only be used for arguments"
 msgstr ""
 
-#: src/main/envir.c:2168
+#: src/main/envir.c:2333
 msgid "'pos' must be an integer"
 msgstr ""
 
-#: src/main/envir.c:2182
+#: src/main/envir.c:2347
 msgid "all elements of a list must be named"
 msgstr ""
 
-#: src/main/envir.c:2205
+#: src/main/envir.c:2370
 msgid "'attach' only works for lists, data frames and environments"
 msgstr ""
 
-#: src/main/envir.c:2288
+#: src/main/envir.c:2453
 msgid "detaching \"package:base\" is not allowed"
 msgstr ""
 
-#: src/main/envir.c:2589 src/main/envir.c:2644
+#: src/main/envir.c:2798 src/main/envir.c:2879
 msgid "argument must be an environment"
 msgstr ""
 
-#: src/main/envir.c:2648
+#: src/main/envir.c:2883
 msgid "arguments must be symbolic"
 msgstr ""
 
-#: src/main/envir.c:2772
+#: src/main/envir.c:3032
 msgid "no enclosing environment"
 msgstr ""
 
-#: src/main/envir.c:2825
+#: src/main/envir.c:3085
 #, c-format
 msgid "no item called \"%s\" on the search list"
 msgstr ""
 
-#: src/main/envir.c:2850
+#: src/main/envir.c:3110
 msgid "using 'as.environment(NULL)' is defunct"
 msgstr ""
 
-#: src/main/envir.c:2856
+#: src/main/envir.c:3116
 msgid "S4 object does not extend class \"environment\""
 msgstr ""
 
-#: src/main/envir.c:2871
+#: src/main/envir.c:3131
 msgid "invalid object for 'as.environment'"
 msgstr ""
 
-#: src/main/envir.c:2897 src/main/envir.c:2925 src/main/envir.c:2954
-#: src/main/envir.c:2975 src/main/envir.c:2998 src/main/envir.c:3033
-#: src/main/envir.c:3054
+#: src/main/envir.c:3157 src/main/envir.c:3185 src/main/envir.c:3214
+#: src/main/envir.c:3235 src/main/envir.c:3258 src/main/envir.c:3293
+#: src/main/envir.c:3314
 msgid "not an environment"
 msgstr ""
 
-#: src/main/envir.c:2949 src/main/envir.c:2970 src/main/envir.c:2991
-#: src/main/envir.c:3028 src/main/envir.c:3049 src/main/envir.c:3148
+#: src/main/envir.c:3209 src/main/envir.c:3230 src/main/envir.c:3251
+#: src/main/envir.c:3288 src/main/envir.c:3309 src/main/envir.c:3408
 msgid "not a symbol"
 msgstr ""
 
-#: src/main/envir.c:2962 src/main/envir.c:2983 src/main/envir.c:3041
-#: src/main/envir.c:3062
+#: src/main/envir.c:3222 src/main/envir.c:3243 src/main/envir.c:3301
+#: src/main/envir.c:3322
 #, c-format
 msgid "no binding for \"%s\""
 msgstr ""
 
-#: src/main/envir.c:2993
+#: src/main/envir.c:3253
 msgid "not a function"
 msgstr ""
 
-#: src/main/envir.c:3001 src/main/envir.c:3017
+#: src/main/envir.c:3261 src/main/envir.c:3277
 msgid "symbol already has a regular binding"
 msgstr ""
 
-#: src/main/envir.c:3003 src/main/envir.c:3019
+#: src/main/envir.c:3263 src/main/envir.c:3279
 msgid "cannot change active binding if binding is locked"
 msgstr ""
 
-#: src/main/envir.c:3107
+#: src/main/envir.c:3367 src/main/envir.c:3604
 msgid "unknown op"
 msgstr ""
 
-#: src/main/envir.c:3152
+#: src/main/envir.c:3412
 msgid "cannot unbind a locked binding"
 msgstr ""
 
-#: src/main/envir.c:3154
+#: src/main/envir.c:3414
 msgid "cannot unbind an active binding"
 msgstr ""
 
-#: src/main/envir.c:3289
+#: src/main/envir.c:3555
 msgid "bad namespace name"
 msgstr ""
 
-#: src/main/envir.c:3301
+#: src/main/envir.c:3567
 msgid "namespace already registered"
 msgstr ""
 
-#: src/main/envir.c:3313
+#: src/main/envir.c:3579
 msgid "namespace not registered"
 msgstr ""
 
-#: src/main/envir.c:3360
+#: src/main/envir.c:3635
 msgid "bad import environment argument"
 msgstr ""
 
-#: src/main/envir.c:3365
+#: src/main/envir.c:3640
 msgid "bad export environment argument"
 msgstr ""
 
-#: src/main/envir.c:3369
+#: src/main/envir.c:3644
 msgid "length of import and export names must match"
 msgstr ""
 
-#: src/main/envir.c:3392
+#: src/main/envir.c:3667
 #, c-format
 msgid "exported symbol '%s' has no value"
 msgstr ""
 
-#: src/main/envir.c:3557
+#: src/main/envir.c:3833
 #, c-format
 msgid "unknown encoding: %d"
 msgstr ""
 
-#: src/main/envir.c:3577
+#: src/main/envir.c:3853
 #, c-format
 msgid "embedded nul in string: '%s'"
 msgstr ""
 
-#: src/main/errors.c:178 src/main/errors.c:215
+#: src/main/errors.c:163 src/main/errors.c:200
 msgid "interrupts suspended; signal ignored"
 msgstr ""
 
-#: src/main/errors.c:318
+#: src/main/errors.c:250
+msgid "[... truncated]"
+msgstr ""
+
+#: src/main/errors.c:310
 msgid "invalid option \"warning.expression\""
 msgstr ""
 
-#: src/main/errors.c:348
+#: src/main/errors.c:339
 #, c-format
 msgid "(converted from warning) %s"
 msgstr ""
 
-#: src/main/errors.c:359
-#, c-format
-msgid "Warning: %s\n"
+#: src/main/errors.c:349
+msgid "Warning:"
 msgstr ""
 
-#: src/main/errors.c:363
+#: src/main/errors.c:351
 #, c-format
-msgid "Warning in %s : %s\n"
+msgid "Warning in %s :"
 msgstr ""
 
-#: src/main/errors.c:365
-#, c-format
-msgid ""
-"Warning in %s :\n"
-"  %s\n"
+#: src/main/errors.c:360 src/main/errors.c:374 src/main/errors.c:687
+msgid "Calls:"
 msgstr ""
 
-#: src/main/errors.c:428 src/main/errors.c:447 src/main/errors.c:596
+#: src/main/errors.c:421 src/main/errors.c:440 src/main/errors.c:602
 msgid "Lost warning messages\n"
 msgstr ""
 
-#: src/main/errors.c:459
-msgid "Warning message:\n"
-msgid_plural "Warning messages:\n"
+#: src/main/errors.c:452
+msgid "Warning message:"
+msgid_plural "Warning messages:"
 msgstr[0] ""
 msgstr[1] ""
 
-#: src/main/errors.c:514
+#: src/main/errors.c:462 src/main/errors.c:490
 #, c-format
-msgid "There were %d warnings (use warnings() to see them)\n"
+msgid "In %s :"
 msgstr ""
 
-#: src/main/errors.c:517
+#: src/main/errors.c:515
 #, c-format
-msgid "There were %d or more warnings (use warnings() to see the first %d)\n"
+msgid "There was %d warning (use warnings() to see it)"
+msgid_plural "There were %d warnings (use warnings() to see them)"
+msgstr[0] ""
+msgstr[1] ""
+
+#: src/main/errors.c:520
+#, c-format
+msgid "There were %d or more warnings (use warnings() to see the first %d)"
 msgstr ""
 
-#: src/main/errors.c:587
+#: src/main/errors.c:593
 msgid "Error during wrapup: "
 msgstr ""
 
-#: src/main/errors.c:612
+#: src/main/errors.c:618
 msgid "Error in "
 msgstr ""
 
-#: src/main/errors.c:613
+#: src/main/errors.c:640 src/main/errors.c:647
 #, c-format
-msgid " (from %s) : "
+msgid "Error in %s (from %s) : "
 msgstr ""
 
-#: src/main/errors.c:664 src/main/errors.c:670
+#: src/main/errors.c:649
+#, c-format
+msgid "Error in %s : "
+msgstr ""
+
+#: src/main/errors.c:669 src/main/errors.c:675
 #, c-format
 msgid "Error: "
 msgstr ""
 
-#: src/main/errors.c:690 src/main/errors.c:1319
+#: src/main/errors.c:696 src/main/errors.c:1300
 msgid "In addition: "
 msgstr ""
 
-#: src/main/errors.c:811
+#: src/main/errors.c:818
 msgid "invalid option \"error\"\n"
 msgstr ""
 
-#: src/main/errors.c:893
-msgid "Execution halted\n"
-msgstr ""
-
-#: src/main/errors.c:1032
-msgid "'msg1' must be a character string"
-msgstr ""
-
-#: src/main/errors.c:1034
-msgid "'msg2' must be a character string"
+#: src/main/errors.c:1013 src/main/errors.c:1015 src/main/options.c:339
+#: src/main/unique.c:1638
+#, c-format
+msgid "'%s' must be a character string"
 msgstr ""
 
-#: src/main/errors.c:1131
+#: src/main/errors.c:1116
 msgid " [invalid string in stop(.)]"
 msgstr ""
 
-#: src/main/errors.c:1162
+#: src/main/errors.c:1148
 msgid " [invalid string in warning(.)]"
 msgstr ""
 
-#: src/main/errors.c:1178
+#: src/main/errors.c:1164
 #, c-format
 msgid "incorrect number of arguments to \"%s\""
 msgstr ""
 
-#: src/main/errors.c:1184 src/main/errors.c:1199
+#: src/main/errors.c:1170 src/main/errors.c:1185
 #, c-format
 msgid "unimplemented feature in %s"
 msgstr ""
 
-#: src/main/errors.c:1193
+#: src/main/errors.c:1179
 msgid "invalid number of arguments"
 msgstr ""
 
-#: src/main/errors.c:1194 src/main/logic.c:189
+#: src/main/errors.c:1180 src/main/logic.c:181
 msgid "invalid argument type"
 msgstr ""
 
-#: src/main/errors.c:1196
+#: src/main/errors.c:1182
 msgid "time-series/vector length mismatch"
 msgstr ""
 
-#: src/main/errors.c:1197
+#: src/main/errors.c:1183
 msgid "incompatible arguments"
 msgstr ""
 
-#: src/main/errors.c:1200
+#: src/main/errors.c:1186
 msgid "unknown error (report this!)"
 msgstr ""
 
-#: src/main/errors.c:1212
+#: src/main/errors.c:1195
+msgid "inaccurate integer conversion in coercion"
+msgstr ""
+
+#: src/main/errors.c:1198
 msgid "unknown warning (report this!)"
 msgstr ""
 
-#: src/main/errors.c:1283
+#: src/main/errors.c:1269
 msgid "No function to return from, jumping to top level"
 msgstr ""
 
-#: src/main/errors.c:1299
+#: src/main/errors.c:1285
 msgid "top level inconsistency?"
 msgstr ""
 
-#: src/main/errors.c:1478
+#: src/main/errors.c:1459
 msgid "bad handler data"
 msgstr ""
 
-#: src/main/errors.c:1628
+#: src/main/errors.c:1613
 msgid "error message not a string"
 msgstr ""
 
-#: src/main/errors.c:1703
+#: src/main/errors.c:1688
 msgid "handler or restart stack mismatch in old restart"
 msgstr ""
 
-#: src/main/errors.c:1729 src/main/errors.c:1745
+#: src/main/errors.c:1714 src/main/errors.c:1730
 msgid "bad error message"
 msgstr ""
 
-#: src/main/errors.c:1787
+#: src/main/errors.c:1771
 msgid "bad restart"
 msgstr ""
 
-#: src/main/errors.c:1819
+#: src/main/errors.c:1803
 msgid "restart not on stack"
 msgstr ""
 
-#: src/main/errors.c:1836
+#: src/main/errors.c:1819
 msgid "not in a try context"
 msgstr ""
 
-#: src/main/errors.c:1849
+#: src/main/errors.c:1832
 msgid "error message must be a character string"
 msgstr ""
 
-#: src/main/eval.c:308
+#: src/main/eval.c:365
 #, c-format
 msgid "source files skipped by Rprof; please increase '%s'"
 msgstr ""
 
-#: src/main/eval.c:328
+#: src/main/eval.c:385
 #, c-format
 msgid "Rprof: cannot open profile file '%s'"
 msgstr ""
 
-#: src/main/eval.c:422
+#: src/main/eval.c:479
 msgid "R profiling is not available on this system"
 msgstr ""
 
-#: src/main/eval.c:446
+#: src/main/eval.c:503
 msgid ""
 "promise already under evaluation: recursive default argument reference or "
 "earlier problems?"
 msgstr ""
 
-#: src/main/eval.c:448
+#: src/main/eval.c:505
 msgid "restarting interrupted promise evaluation"
 msgstr ""
 
-#: src/main/eval.c:544
+#: src/main/eval.c:601
 msgid ""
 "evaluation nested too deeply: infinite recursion / options(expressions=)?"
 msgstr ""
 
-#: src/main/eval.c:575 src/main/eval.c:3619
+#: src/main/eval.c:632 src/main/eval.c:4238
 msgid "argument is missing, with no default"
 msgstr ""
 
-#: src/main/eval.c:679 src/main/eval.c:4642
+#: src/main/eval.c:736 src/main/eval.c:1306 src/main/eval.c:5533
 msgid "attempt to apply non-function"
 msgstr ""
 
-#: src/main/eval.c:702
+#: src/main/eval.c:759
 #, c-format
 msgid "%s at %s#%d: "
 msgstr ""
 
-#: src/main/eval.c:1178
+#: src/main/eval.c:1298 src/main/eval.c:2271
+#, c-format
+msgid "argument %d is empty"
+msgstr ""
+
+#: src/main/eval.c:1350
 #, c-format
 msgid "could not find symbol \"%s\" in environment of the generic function"
 msgstr ""
 
-#: src/main/eval.c:1196
+#: src/main/eval.c:1368
 #, c-format
 msgid "symbol \"%s\" not in environment of method"
 msgstr ""
 
-#: src/main/eval.c:1308
+#: src/main/eval.c:1481
 msgid "the condition has length > 1 and only the first element will be used"
 msgstr ""
 
-#: src/main/eval.c:1325
+#: src/main/eval.c:1500
 msgid "missing value where TRUE/FALSE needed"
 msgstr ""
 
-#: src/main/eval.c:1326
+#: src/main/eval.c:1501
 msgid "argument is not interpretable as logical"
 msgstr ""
 
-#: src/main/eval.c:1327
+#: src/main/eval.c:1502
 msgid "argument is of length zero"
 msgstr ""
 
-#: src/main/eval.c:1418
+#: src/main/eval.c:1596
 msgid "non-symbol loop variable"
 msgstr ""
 
-#: src/main/eval.c:1510 src/main/eval.c:4408
+#: src/main/eval.c:1687 src/main/eval.c:5301
 msgid "invalid for() loop sequence"
 msgstr ""
 
-#: src/main/eval.c:1652
+#: src/main/eval.c:1826
 msgid "multi-argument returns are not permitted"
 msgstr ""
 
-#: src/main/eval.c:1701
+#: src/main/eval.c:1873
 msgid "invalid (NULL) left side of assignment"
 msgstr ""
 
-#: src/main/eval.c:1734
+#: src/main/eval.c:1907
 msgid "target of assignment expands to non-language object"
 msgstr ""
 
-#: src/main/eval.c:1817
+#: src/main/eval.c:1990
 #, c-format
 msgid "overlong name in '%s'"
 msgstr ""
 
-#: src/main/eval.c:1915
+#: src/main/eval.c:2080
 msgid "cannot do complex assignments in base namespace"
 msgstr ""
 
-#: src/main/eval.c:1917
+#: src/main/eval.c:2082
 msgid "cannot do complex assignments in base environment"
 msgstr ""
 
-#: src/main/eval.c:1954 src/main/eval.c:1981
+#: src/main/eval.c:2121 src/main/eval.c:2148
 msgid "invalid function in complex assignment"
 msgstr ""
 
-#: src/main/eval.c:2041
+#: src/main/eval.c:2208
 msgid "invalid (do_set) left-hand side to assignment"
 msgstr ""
 
-#: src/main/eval.c:2103
-#, c-format
-msgid "argument %d is empty"
-msgstr ""
-
-#: src/main/eval.c:2116
+#: src/main/eval.c:2284
 #, c-format
 msgid "'%s' is missing"
 msgstr ""
 
-#: src/main/eval.c:2267
+#: src/main/eval.c:2439
 msgid "invalid formal argument list for \"function\""
 msgstr ""
 
-#: src/main/eval.c:2325 src/main/eval.c:2356 src/main/eval.c:2361
+#: src/main/eval.c:2497 src/main/eval.c:2528 src/main/eval.c:2533
 #, c-format
 msgid "invalid '%s' argument of type '%s'"
 msgstr ""
 
-#: src/main/eval.c:2353
+#: src/main/eval.c:2525
 msgid "numeric 'envir' arg not of length one"
 msgstr ""
 
-#: src/main/eval.c:2377 src/main/eval.c:2399
+#: src/main/eval.c:2549 src/main/eval.c:2573
 msgid "restarts not supported in 'eval'"
 msgstr ""
 
-#: src/main/eval.c:2456 src/main/eval.c:2469
+#: src/main/eval.c:2632 src/main/eval.c:2645
 msgid "'Recall' called from outside a closure"
 msgstr ""
 
-#: src/main/eval.c:2562
+#: src/main/eval.c:2738
 msgid "value in '...' is not a promise"
 msgstr ""
 
-#: src/main/eval.c:2754 src/main/objects.c:720
-#, c-format
-msgid "call name too long in '%s'"
-msgstr ""
-
-#: src/main/eval.c:2775
-#, c-format
-msgid "generic name too long in '%s'"
-msgstr ""
-
-#: src/main/eval.c:2840
+#: src/main/eval.c:2999
 #, c-format
 msgid "Incompatible methods (\"%s\", \"%s\") for \"%s\""
 msgstr ""
 
-#: src/main/eval.c:2906
+#: src/main/eval.c:3048
 msgid "dispatch error in group dispatch"
 msgstr ""
 
-#: src/main/eval.c:3201
+#: src/main/eval.c:3532
 #, c-format
 msgid "\"%s\" is not a %s function"
 msgstr ""
 
-#: src/main/eval.c:3430
+#: src/main/eval.c:4047
 msgid "node stack overflow"
 msgstr ""
 
-#: src/main/eval.c:3436
+#: src/main/eval.c:4053
 msgid "integer stack overflow"
 msgstr ""
 
-#: src/main/eval.c:3490
+#: src/main/eval.c:4107
 msgid "bad opcode"
 msgstr ""
 
-#: src/main/eval.c:4219
+#: src/main/eval.c:5083
 #, c-format
 msgid "invalid %s type in 'x %s y'"
 msgstr ""
 
-#: src/main/eval.c:4310
+#: src/main/eval.c:5195
 msgid "bytecode version mismatch; using eval"
 msgstr ""
 
-#: src/main/eval.c:4315
+#: src/main/eval.c:5200
 msgid "bytecode version is too old"
 msgstr ""
 
-#: src/main/eval.c:4316
+#: src/main/eval.c:5201
 msgid "bytecode version is too new"
 msgstr ""
 
-#: src/main/eval.c:4350
+#: src/main/eval.c:5235
 msgid "byte code version mismatch"
 msgstr ""
 
-#: src/main/eval.c:4477
+#: src/main/eval.c:5383
 msgid "invalid sequence argument in for loop"
 msgstr ""
 
-#: src/main/eval.c:4624 src/main/names.c:1181
+#: src/main/eval.c:5522 src/main/names.c:1312
 #, c-format
 msgid "there is no .Internal function '%s'"
 msgstr ""
 
-#: src/main/eval.c:4731 src/main/eval.c:5077 src/main/eval.c:5119
+#: src/main/eval.c:5622 src/main/eval.c:5968 src/main/eval.c:6008
 msgid "bad function"
 msgstr ""
 
-#: src/main/eval.c:4746
+#: src/main/eval.c:5635
 msgid "not a BUILTIN function"
 msgstr ""
 
-#: src/main/eval.c:5159
+#: src/main/eval.c:6066
+msgid "bad numeric 'switch' offsets"
+msgstr ""
+
+#: src/main/eval.c:6072
 msgid "numeric EXPR required for 'switch' without named alternatives"
 msgstr ""
 
-#: src/main/eval.c:5255
+#: src/main/eval.c:6076
+msgid "bad character 'switch' offsets"
+msgstr ""
+
+#: src/main/eval.c:6188
 msgid "cannot find index for threaded code address"
 msgstr ""
 
-#: src/main/eval.c:5315
+#: src/main/eval.c:6248
 msgid "invalid body"
 msgstr ""
 
-#: src/main/eval.c:5335
+#: src/main/eval.c:6268
 msgid "invalid symbol"
 msgstr ""
 
-#: src/main/eval.c:5379
+#: src/main/eval.c:6312
 msgid "argument is not a byte code object"
 msgstr ""
 
-#: src/main/eval.c:5400
+#: src/main/eval.c:6334
 msgid "bad file name"
 msgstr ""
 
-#: src/main/eval.c:5404 src/main/eval.c:5425
+#: src/main/eval.c:6338 src/main/eval.c:6359
 msgid "unable to open 'file'"
 msgstr ""
 
-#: src/main/eval.c:5419 src/main/saveload.c:1942
+#: src/main/eval.c:6353 src/main/saveload.c:1944
 msgid "'file' must be non-empty string"
 msgstr ""
 
-#: src/main/eval.c:5421 src/main/saveload.c:1944 src/main/saveload.c:2244
-#: src/main/serialize.c:2149
+#: src/main/eval.c:6355 src/main/saveload.c:1946 src/main/saveload.c:2246
+#: src/main/serialize.c:2189
 msgid "'ascii' must be logical"
 msgstr ""
 
-#: src/main/eval.c:5492 src/main/eval.c:5511 src/main/eval.c:5541
+#: src/main/eval.c:6426 src/main/eval.c:6445 src/main/eval.c:6475
 msgid "constant buffer must be a generic vector"
 msgstr ""
 
-#: src/main/eval.c:5543
+#: src/main/eval.c:6477
 msgid "bad constant count"
 msgstr ""
 
-#: src/main/eval.c:5579
+#: src/main/eval.c:6515
 msgid "profile timer in use"
 msgstr ""
 
-#: src/main/eval.c:5581
+#: src/main/eval.c:6517
 msgid "already byte code profiling"
 msgstr ""
 
-#: src/main/eval.c:5599
+#: src/main/eval.c:6535
 msgid "setting profile timer failed"
 msgstr ""
 
-#: src/main/eval.c:5616
+#: src/main/eval.c:6553
 msgid "not byte code profiling"
 msgstr ""
 
+#: src/main/eval.c:6569 src/main/eval.c:6573 src/main/eval.c:6577
+msgid "byte code profiling is not supported in this build"
+msgstr ""
+
 #: src/main/gevents.c:43
 #, c-format
 msgid "'%s' events not supported in this device"
@@ -3606,26 +3664,26 @@ msgstr ""
 msgid "this graphics device does not support event handling"
 msgstr ""
 
-#: src/main/gevents.c:136
+#: src/main/gevents.c:135
 msgid "invalid prompt"
 msgstr ""
 
-#: src/main/gevents.c:148
+#: src/main/gevents.c:146
 msgid "recursive use of 'getGraphicsEvent' not supported"
 msgstr ""
 
-#: src/main/gevents.c:158
+#: src/main/gevents.c:157
 msgid "no graphics event handlers set"
 msgstr ""
 
-#: src/main/gram.y:222 src/main/gram.y:237 src/main/gram.y:2222
-#: src/main/gram.y:2236
+#: src/main/gram.y:222 src/main/gram.y:237 src/main/gram.y:2245
+#: src/main/gram.y:2259
 #, c-format
 msgid "EOF whilst reading MBCS char at line %d"
 msgstr ""
 
-#: src/main/gram.y:226 src/main/gram.y:234 src/main/gram.y:2226
-#: src/main/gram.y:2233
+#: src/main/gram.y:226 src/main/gram.y:234 src/main/gram.y:2249
+#: src/main/gram.y:2256
 #, c-format
 msgid "invalid multibyte character in parser at line %d"
 msgstr ""
@@ -3640,126 +3698,139 @@ msgstr ""
 msgid "incorrect tag type at line %d"
 msgstr ""
 
-#: src/main/gram.y:1653
+#: src/main/gram.y:1657
 msgid "contextstack overflow"
 msgstr ""
 
-#: src/main/gram.y:1890
-msgid "input"
+#: src/main/gram.y:1907 src/main/gram.y:1913
+#, c-format
+msgid "unexpected input"
 msgstr ""
 
-#: src/main/gram.y:1891
-msgid "end of input"
+#: src/main/gram.y:1910 src/main/main.c:311
+#, c-format
+msgid "unexpected end of input"
 msgstr ""
 
-#: src/main/gram.y:1892
-msgid "string constant"
+#: src/main/gram.y:1916
+#, c-format
+msgid "unexpected string constant"
 msgstr ""
 
-#: src/main/gram.y:1893
-msgid "numeric constant"
+#: src/main/gram.y:1919
+#, c-format
+msgid "unexpected numeric constant"
 msgstr ""
 
-#: src/main/gram.y:1894
-msgid "symbol"
+#: src/main/gram.y:1922
+#, c-format
+msgid "unexpected symbol"
 msgstr ""
 
-#: src/main/gram.y:1895
-msgid "assignment"
+#: src/main/gram.y:1925
+#, c-format
+msgid "unexpected assignment"
 msgstr ""
 
-#: src/main/gram.y:1896
-msgid "end of line"
+#: src/main/gram.y:1928
+#, c-format
+msgid "unexpected end of line"
 msgstr ""
 
-#: src/main/gram.y:1910 src/main/gram.y:1916
+#: src/main/gram.y:1931 src/main/gram.y:1939
 #, c-format
 msgid "unexpected %s"
 msgstr ""
 
-#: src/main/gram.y:1926
+#: src/main/gram.y:1951
 #, c-format
 msgid "repeated formal argument '%s' on line %d"
 msgstr ""
 
-#: src/main/gram.y:2136
+#: src/main/gram.y:2161
 #, c-format
 msgid "integer literal %s contains decimal; using numeric value"
 msgstr ""
 
-#: src/main/gram.y:2140
+#: src/main/gram.y:2164
 #, c-format
 msgid "non-integer value %s qualified with L; using numeric value"
 msgstr ""
 
-#: src/main/gram.y:2153
+#: src/main/gram.y:2176
 #, c-format
 msgid "integer literal %s contains unnecessary decimal point"
 msgstr ""
 
-#: src/main/gram.y:2185
+#: src/main/gram.y:2208
 #, c-format
 msgid "unable to allocate buffer for long string at line %d"
 msgstr ""
 
-#: src/main/gram.y:2338
+#: src/main/gram.y:2347 src/main/gram.y:2370 src/main/gram.y:2407
+#: src/main/gram.y:2443
+#, c-format
+msgid "nul character not allowed (line %d)"
+msgstr ""
+
+#: src/main/gram.y:2363
 #, c-format
 msgid "'\\x' used without hex digits in character string starting \"%s\""
 msgstr ""
 
-#: src/main/gram.y:2352
+#: src/main/gram.y:2379
 #, c-format
 msgid "\\uxxxx sequences not supported inside backticks (line %d)"
 msgstr ""
 
-#: src/main/gram.y:2367
+#: src/main/gram.y:2394
 #, c-format
 msgid "'\\u' used without hex digits in character string starting \"%s\""
 msgstr ""
 
-#: src/main/gram.y:2375
+#: src/main/gram.y:2402
 #, c-format
 msgid "invalid \\u{xxxx} sequence (line %d)"
 msgstr ""
 
-#: src/main/gram.y:2387
+#: src/main/gram.y:2416
 #, c-format
 msgid "\\Uxxxxxxxx sequences not supported inside backticks (line %d)"
 msgstr ""
 
-#: src/main/gram.y:2402
+#: src/main/gram.y:2431
 #, c-format
 msgid "'\\U' used without hex digits in character string starting \"%s\""
 msgstr ""
 
-#: src/main/gram.y:2410
+#: src/main/gram.y:2439
 #, c-format
 msgid "invalid \\U{xxxxxxxx} sequence (line %d)"
 msgstr ""
 
-#: src/main/gram.y:2451
+#: src/main/gram.y:2482
 #, c-format
 msgid "'\\%c' is an unrecognized escape in character string starting \"%s\""
 msgstr ""
 
-#: src/main/gram.y:2510
+#: src/main/gram.y:2546
 msgid "mixing Unicode and octal/hex escapes in a string is not allowed"
 msgstr ""
 
-#: src/main/gram.y:2514
+#: src/main/gram.y:2550
 #, c-format
 msgid ""
 "string at line %d containing Unicode escapes not in this locale\n"
 "is too long (max 10000 chars)"
 msgstr ""
 
-#: src/main/gram.y:3112 src/main/gram.y:3119 src/main/gram.y:3125
-#: src/main/gram.y:3132
+#: src/main/gram.y:3148 src/main/gram.y:3155 src/main/gram.y:3161
+#: src/main/gram.y:3168
 #, c-format
 msgid "contextstack overflow at line %d"
 msgstr ""
 
-#: src/main/gram.y:3227
+#: src/main/gram.y:3263
 #, c-format
 msgid "internal parser error at line %d"
 msgstr ""
@@ -3769,34 +3840,34 @@ msgstr ""
 msgid "relative range of values =%4.0f * EPS, is small (axis %d)"
 msgstr ""
 
-#: src/main/grep.c:93
+#: src/main/grep.c:96
 #, c-format
 msgid "invalid regular expression '%s', reason '%s'"
 msgstr ""
 
-#: src/main/grep.c:95
+#: src/main/grep.c:98
 #, c-format
 msgid "invalid regular expression, reason '%s'"
 msgstr ""
 
-#: src/main/grep.c:220 src/main/grep.c:308 src/main/grep.c:416
-#: src/main/grep.c:883 src/main/grep.c:2473
+#: src/main/grep.c:225 src/main/grep.c:315 src/main/grep.c:426
+#: src/main/grep.c:900 src/main/grep.c:2502
 #, c-format
 msgid "input string %d is invalid UTF-8"
 msgstr ""
 
-#: src/main/grep.c:286 src/main/grep.c:383
+#: src/main/grep.c:292 src/main/grep.c:391
 #, c-format
 msgid "'split' string %d is invalid UTF-8"
 msgstr ""
 
-#: src/main/grep.c:290 src/main/grep.c:387 src/main/grep.c:560
+#: src/main/grep.c:296 src/main/grep.c:395 src/main/grep.c:571
 #, c-format
 msgid "'split' string %d is invalid in this locale"
 msgstr ""
 
-#: src/main/grep.c:395 src/main/grep.c:851 src/main/grep.c:1600
-#: src/main/grep.c:2394
+#: src/main/grep.c:404 src/main/grep.c:867 src/main/grep.c:1621
+#: src/main/grep.c:2419
 #, c-format
 msgid ""
 "PCRE pattern compilation error\n"
@@ -3804,58 +3875,58 @@ msgid ""
 "\tat '%s'\n"
 msgstr ""
 
-#: src/main/grep.c:397
+#: src/main/grep.c:406
 #, c-format
 msgid "invalid split pattern '%s'"
 msgstr ""
 
-#: src/main/grep.c:401 src/main/grep.c:857 src/main/grep.c:1607
-#: src/main/grep.c:2401
+#: src/main/grep.c:410 src/main/grep.c:873 src/main/grep.c:1628
+#: src/main/grep.c:2426
 #, c-format
 msgid ""
 "PCRE pattern study error\n"
 "\t'%s'\n"
 msgstr ""
 
-#: src/main/grep.c:834 src/main/grep.c:2377
+#: src/main/grep.c:849 src/main/grep.c:2401
 msgid "regular expression is invalid UTF-8"
 msgstr ""
 
-#: src/main/grep.c:853 src/main/grep.c:1602 src/main/grep.c:2396
+#: src/main/grep.c:869 src/main/grep.c:1623 src/main/grep.c:2421
 #, c-format
 msgid "invalid regular expression '%s'"
 msgstr ""
 
-#: src/main/grep.c:1264
+#: src/main/grep.c:1282
 msgid "pattern matches an empty string infinitely, returning first match only"
 msgstr ""
 
-#: src/main/grep.c:1575
+#: src/main/grep.c:1595
 msgid "'pattern' is invalid UTF-8"
 msgstr ""
 
-#: src/main/grep.c:1577
+#: src/main/grep.c:1597
 msgid "'replacement' is invalid UTF-8"
 msgstr ""
 
-#: src/main/grep.c:1581
+#: src/main/grep.c:1601
 msgid "'pattern' is invalid in this locale"
 msgstr ""
 
-#: src/main/grep.c:1584
+#: src/main/grep.c:1604
 msgid "'replacement' is invalid in this locale"
 msgstr ""
 
-#: src/main/grep.c:1589
+#: src/main/grep.c:1609
 msgid "zero-length pattern"
 msgstr ""
 
-#: src/main/grep.c:1732 src/main/grep.c:1748 src/main/grep.c:1796
-#: src/main/grep.c:1812 src/main/grep.c:1859 src/main/grep.c:1875
+#: src/main/grep.c:1753 src/main/grep.c:1769 src/main/grep.c:1817
+#: src/main/grep.c:1833 src/main/grep.c:1880 src/main/grep.c:1896
 msgid "result string is too long"
 msgstr ""
 
-#: src/main/grep.c:2411
+#: src/main/grep.c:2436
 #, c-format
 msgid "'pcre_fullinfo' returned '%d' "
 msgstr ""
@@ -3864,31 +3935,26 @@ msgstr ""
 msgid "ignoring non-pairlist attributes"
 msgstr ""
 
-#: src/main/internet.c:92
+#: src/main/internet.c:83
 msgid "internet routines cannot be accessed in module"
 msgstr ""
 
-#: src/main/internet.c:103 src/main/internet.c:141 src/main/internet.c:154
-#: src/main/internet.c:165 src/main/internet.c:176 src/main/internet.c:187
-#: src/main/internet.c:196 src/main/internet.c:207 src/main/internet.c:218
-#: src/main/internet.c:227 src/main/internet.c:237
+#: src/main/internet.c:94 src/main/internet.c:106 src/main/internet.c:119
+#: src/main/internet.c:130 src/main/internet.c:141 src/main/internet.c:152
+#: src/main/internet.c:161 src/main/internet.c:172 src/main/internet.c:183
+#: src/main/internet.c:192 src/main/internet.c:202 src/main/internet.c:318
+#: src/main/internet.c:330 src/main/internet.c:342 src/main/internet.c:354
 msgid "internet routines cannot be loaded"
 msgstr ""
 
-#: src/main/internet.c:118 src/main/memory.c:3434 src/main/memory.c:3444
-#: src/main/memory.c:3456 src/main/memory.c:3470 src/main/memory.c:3487
-#: src/main/memory.c:3505
-msgid "bad value"
-msgstr ""
-
-#: src/main/internet.c:124
-msgid "internet routines were already initialized"
+#: src/main/internet.c:216 src/main/internet.c:230 src/main/internet.c:247
+#: src/main/internet.c:259 src/main/internet.c:273 src/main/internet.c:293
+#: src/main/internet.c:306
+msgid "socket routines cannot be loaded"
 msgstr ""
 
-#: src/main/internet.c:251 src/main/internet.c:265 src/main/internet.c:281
-#: src/main/internet.c:293 src/main/internet.c:307 src/main/internet.c:327
-#: src/main/internet.c:340
-msgid "socket routines cannot be loaded"
+#: src/main/internet.c:242
+msgid "attempt to close invalid socket"
 msgstr ""
 
 #: src/main/lapack.c:39
@@ -3899,42 +3965,38 @@ msgstr ""
 msgid "LAPACK routines cannot be loaded"
 msgstr ""
 
-#: src/main/logic.c:70
-msgid "binary operations require two arguments"
-msgstr ""
-
-#: src/main/logic.c:88 src/main/logic.c:150
+#: src/main/logic.c:80 src/main/logic.c:142
 msgid "operations are possible only for numeric, logical or complex types"
 msgstr ""
 
-#: src/main/logic.c:98
+#: src/main/logic.c:90
 msgid "binary operation on non-conformable arrays"
 msgstr ""
 
-#: src/main/logic.c:124 src/main/relop.c:247
+#: src/main/logic.c:116 src/main/relop.c:241
 msgid "non-conformable time series"
 msgstr ""
 
-#: src/main/logic.c:254
+#: src/main/logic.c:247
 #, c-format
 msgid "'%s' operator requires 2 arguments"
 msgstr ""
 
-#: src/main/logic.c:261
+#: src/main/logic.c:254
 #, c-format
 msgid "invalid 'x' type in 'x %s y'"
 msgstr ""
 
-#: src/main/logic.c:268
+#: src/main/logic.c:261
 #, c-format
 msgid "invalid 'y' type in 'x %s y'"
 msgstr ""
 
-#: src/main/logic.c:341
+#: src/main/logic.c:334
 msgid "Unary operator `!' called with two arguments"
 msgstr ""
 
-#: src/main/logic.c:448
+#: src/main/logic.c:439
 #, c-format
 msgid "coercing argument of type '%s' to logical"
 msgstr ""
@@ -3943,61 +4005,73 @@ msgstr ""
 msgid "dummy - do not translate"
 msgstr ""
 
-#: src/main/main.c:476
+#: src/main/main.c:329
+msgid "error during cleanup\n"
+msgstr ""
+
+#: src/main/main.c:336
+msgid "Execution halted\n"
+msgstr ""
+
+#: src/main/main.c:505
 msgid "Error: segfault from C stack overflow\n"
 msgstr ""
 
-#: src/main/main.c:846
+#: src/main/main.c:888
 msgid "unable to open the base package\n"
 msgstr ""
 
-#: src/main/main.c:924
+#: src/main/main.c:971
 #, c-format
 msgid "unable to restore saved data in %s\n"
 msgstr ""
 
-#: src/main/main.c:971
+#: src/main/main.c:1020
 msgid "During startup - "
 msgstr ""
 
-#: src/main/main.c:1224
+#: src/main/main.c:1036
+msgid "unable to initialize the JIT\n"
+msgstr ""
+
+#: src/main/main.c:1290
 msgid "cannot quit from browser"
 msgstr ""
 
-#: src/main/main.c:1228
+#: src/main/main.c:1294
 msgid "one of \"yes\", \"no\", \"ask\" or \"default\" expected."
 msgstr ""
 
-#: src/main/main.c:1233
+#: src/main/main.c:1299
 msgid "save=\"ask\" in non-interactive use: command-line default will be used"
 msgstr ""
 
-#: src/main/main.c:1241
+#: src/main/main.c:1307
 msgid "unrecognized value of 'save'"
 msgstr ""
 
-#: src/main/main.c:1244
+#: src/main/main.c:1310
 msgid "invalid 'status', 0 assumed"
 msgstr ""
 
-#: src/main/main.c:1249
+#: src/main/main.c:1315
 msgid "invalid 'runLast', FALSE assumed"
 msgstr ""
 
-#: src/main/main.c:1280
+#: src/main/main.c:1346
 msgid "cannot allocate space for toplevel callback element"
 msgstr ""
 
-#: src/main/main.c:1358
+#: src/main/main.c:1424
 msgid "negative index passed to R_removeTaskCallbackByIndex"
 msgstr ""
 
-#: src/main/main.c:1468
+#: src/main/main.c:1534
 #, c-format
 msgid "warning messages from top-level task callback '%s'\n"
 msgstr ""
 
-#: src/main/main.c:1524
+#: src/main/main.c:1591
 msgid "top-level task callback did not return a logical value"
 msgstr ""
 
@@ -4017,226 +4091,223 @@ msgstr ""
 msgid "invalid partial string match"
 msgstr ""
 
-#: src/main/match.c:228 src/main/match.c:268 src/main/objects.c:56
-#: src/main/objects.c:66
+#: src/main/match.c:228 src/main/match.c:266 src/main/objects.c:49
+#: src/main/objects.c:59
 #, c-format
 msgid "formal argument \"%s\" matched by multiple actual arguments"
 msgstr ""
 
-#: src/main/match.c:231 src/main/match.c:266
+#: src/main/match.c:231 src/main/match.c:264
 #, c-format
 msgid "argument %d matches multiple formal arguments"
 msgstr ""
 
-#: src/main/match.c:272
+#: src/main/match.c:270
 #, c-format
 msgid "partial argument match of '%s' to '%s'"
 msgstr ""
 
-#: src/main/match.c:383
+#: src/main/match.c:380
 #, c-format
 msgid "unused argument %s"
 msgid_plural "unused arguments %s"
 msgstr[0] ""
 msgstr[1] ""
 
-#: src/main/memory.c:1232
+#: src/main/memory.c:1234
 msgid "can only weakly reference/finalize reference objects"
 msgstr ""
 
-#: src/main/memory.c:1266
+#: src/main/memory.c:1268
 msgid "finalizer must be a function or NULL"
 msgstr ""
 
-#: src/main/memory.c:1322 src/main/memory.c:1330 src/main/memory.c:1341
+#: src/main/memory.c:1324 src/main/memory.c:1332 src/main/memory.c:1343
 msgid "not a weak reference"
 msgstr ""
 
-#: src/main/memory.c:1472
+#: src/main/memory.c:1474
 msgid "first argument must be environment or external pointer"
 msgstr ""
 
-#: src/main/memory.c:1474
+#: src/main/memory.c:1476
 msgid "second argument must be a function"
 msgstr ""
 
-#: src/main/memory.c:1478
+#: src/main/memory.c:1480
 msgid "third argument must be 'TRUE' or 'FALSE'"
 msgstr ""
 
-#: src/main/memory.c:1970
+#: src/main/memory.c:1979
 msgid "vector memory exhausted (limit reached?)"
 msgstr ""
 
-#: src/main/memory.c:1976
+#: src/main/memory.c:1985
 msgid "cons memory exhausted (limit reached?)"
 msgstr ""
 
-#: src/main/memory.c:1981
+#: src/main/memory.c:1990
 msgid "memory exhausted (limit reached?)"
 msgstr ""
 
-#: src/main/memory.c:2116
+#: src/main/memory.c:2126
 #, c-format
 msgid "cannot allocate memory block of size %0.f Tb"
 msgstr ""
 
-#: src/main/memory.c:2121
+#: src/main/memory.c:2131
 #, c-format
 msgid "cannot allocate memory block of size %0.1f Gb"
 msgstr ""
 
-#: src/main/memory.c:2442
+#: src/main/memory.c:2458
 msgid "vector is too large"
 msgstr ""
 
-#: src/main/memory.c:2445
+#: src/main/memory.c:2461
 msgid "negative length vectors are not allowed"
 msgstr ""
 
-#: src/main/memory.c:2471 src/main/memory.c:2484 src/main/memory.c:2497
-#: src/main/memory.c:2512
+#: src/main/memory.c:2487 src/main/memory.c:2500 src/main/memory.c:2513
+#: src/main/memory.c:2528
 #, c-format
 msgid "cannot allocate vector of length %d"
 msgstr ""
 
-#: src/main/memory.c:2533
+#: src/main/memory.c:2549
 #, c-format
 msgid "invalid type/length (%s/%d) in vector allocation"
 msgstr ""
 
-#: src/main/memory.c:2636
+#: src/main/memory.c:2648
 #, c-format
 msgid "cannot allocate vector of size %0.1f Gb"
 msgstr ""
 
-#: src/main/memory.c:2640
+#: src/main/memory.c:2652
 #, c-format
 msgid "cannot allocate vector of size %0.1f Mb"
 msgstr ""
 
-#: src/main/memory.c:2644
+#: src/main/memory.c:2656
 #, c-format
 msgid "cannot allocate vector of size %0.f Kb"
 msgstr ""
 
-#: src/main/memory.c:3001
+#: src/main/memory.c:3071
 msgid "protect(): protection stack overflow"
 msgstr ""
 
-#: src/main/memory.c:3008
+#: src/main/memory.c:3078
 #, c-format
-msgid "unprotect(): only %d protected items"
-msgstr ""
+msgid "unprotect(): only %d protected item"
+msgid_plural "unprotect(): only %d protected items"
+msgstr[0] ""
+msgstr[1] ""
 
-#: src/main/memory.c:3041
+#: src/main/memory.c:3113
 msgid "unprotect_ptr: pointer not found"
 msgstr ""
 
-#: src/main/memory.c:3079
+#: src/main/memory.c:3151
 #, c-format
-msgid "R_Reprotect: only %d protected items, can't reprotect index %d"
-msgstr ""
+msgid "R_Reprotect: only %d protected item, can't reprotect index %d"
+msgid_plural "R_Reprotect: only %d protected items, can't reprotect index %d"
+msgstr[0] ""
+msgstr[1] ""
 
-#: src/main/memory.c:3129
+#: src/main/memory.c:3203
 #, c-format
 msgid "'Calloc' could not allocate memory (%.0f of %u bytes)"
 msgstr ""
 
-#: src/main/memory.c:3140
+#: src/main/memory.c:3214
 #, c-format
 msgid "'Realloc' could not re-allocate memory (%.0f bytes)"
 msgstr ""
 
-#: src/main/memory.c:3380
+#: src/main/memory.c:3460
 msgid "not safe to return vector pointer"
 msgstr ""
 
-#: src/main/memory.c:3392
+#: src/main/memory.c:3471
 #, c-format
 msgid "attempt to set index %lu/%lu in SET_STRING_ELT"
 msgstr ""
 
-#: src/main/memory.c:3408
+#: src/main/memory.c:3487
 #, c-format
 msgid "attempt to set index %lu/%lu in SET_VECTOR_ELT"
 msgstr ""
 
-#: src/main/memory.c:3658
+#: src/main/memory.c:3514 src/main/memory.c:3524 src/main/memory.c:3536
+#: src/main/memory.c:3550 src/main/memory.c:3565 src/main/memory.c:3583
+msgid "bad value"
+msgstr ""
+
+#: src/main/memory.c:3746
 msgid "memory profiling is not available on this system"
 msgstr ""
 
-#: src/main/memory.c:3723
+#: src/main/memory.c:3810
 #, c-format
 msgid "Rprofmem: cannot open output file '%s'"
 msgstr ""
 
-#: src/main/memory.c:3830
+#: src/main/memory.c:3915
 #, c-format
 msgid "long vectors not supported yet: %s:%d"
 msgstr ""
 
-#: src/main/names.c:996
+#: src/main/names.c:1021
 msgid "string argument required"
 msgstr ""
 
-#: src/main/names.c:999
+#: src/main/names.c:1024
 msgid "no such primitive function"
 msgstr ""
 
-#: src/main/names.c:1146
+#: src/main/names.c:1212 src/main/names.c:1242
 msgid "attempt to use zero-length variable name"
 msgstr ""
 
-#: src/main/names.c:1148
+#: src/main/names.c:1214 src/main/names.c:1244
 #, c-format
 msgid "variable names are limited to %d bytes"
 msgstr ""
 
-#: src/main/names.c:1176 src/main/names.c:1179
+#: src/main/names.c:1307 src/main/names.c:1310
 msgid "invalid .Internal() argument"
 msgstr ""
 
-#: src/main/objects.c:46
+#: src/main/objects.c:39
 msgid "generic 'function' is not a function"
 msgstr ""
 
-#: src/main/objects.c:201
+#: src/main/objects.c:193
 msgid "bad generic call environment"
 msgstr ""
 
-#: src/main/objects.c:207
+#: src/main/objects.c:201
 msgid "bad generic definition environment"
 msgstr ""
 
-#: src/main/objects.c:246
+#: src/main/objects.c:249
 msgid ""
 "no '.S3MethodsClass' table, cannot use S4 objects with S3 methods ('methods' "
 "package not attached?)"
 msgstr ""
 
-#: src/main/objects.c:270 src/main/objects.c:411
-msgid "'UseMethod' used in an inappropriate fashion"
-msgstr ""
-
-#: src/main/objects.c:290
-msgid "invalid generic function in 'usemethod'"
-msgstr ""
-
-#: src/main/objects.c:399
+#: src/main/objects.c:415
 msgid "there must be a 'generic' argument"
 msgstr ""
 
-#: src/main/objects.c:403
+#: src/main/objects.c:419
 msgid "'generic' argument must be a character string"
 msgstr ""
 
-#: src/main/objects.c:440
-msgid "'UseMethod' called from outside a function"
-msgstr ""
-
-#: src/main/objects.c:447
-msgid "first argument must be a generic name"
+#: src/main/objects.c:427
+msgid "'UseMethod' used in an inappropriate fashion"
 msgstr ""
 
 #: src/main/objects.c:472
@@ -4244,226 +4315,225 @@ msgstr ""
 msgid "no applicable method for '%s' applied to an object of class \"%s\""
 msgstr ""
 
-#: src/main/objects.c:533
+#: src/main/objects.c:582
 msgid "'NextMethod' called from outside a function"
 msgstr ""
 
-#: src/main/objects.c:539
+#: src/main/objects.c:588
 msgid "'NextMethod' called from an anonymous function"
 msgstr ""
 
-#: src/main/objects.c:563
+#: src/main/objects.c:609
 msgid "no calling generic was found: was a method called directly?"
 msgstr ""
 
-#: src/main/objects.c:566
+#: src/main/objects.c:612
 #, c-format
 msgid "'function' is not a function, but of type %d"
 msgstr ""
 
-#: src/main/objects.c:640
+#: src/main/objects.c:639
 msgid "wrong argument ..."
 msgstr ""
 
-#: src/main/objects.c:653
+#: src/main/objects.c:651
 msgid "object not specified"
 msgstr ""
 
-#: src/main/objects.c:663 src/main/objects.c:670
+#: src/main/objects.c:659 src/main/objects.c:666
 msgid "generic function not specified"
 msgstr ""
 
-#: src/main/objects.c:667
+#: src/main/objects.c:663
 msgid "invalid generic argument to 'NextMethod'"
 msgstr ""
 
-#: src/main/objects.c:680
+#: src/main/objects.c:675
 msgid "invalid 'group' argument found in 'NextMethod'"
 msgstr ""
 
-#: src/main/objects.c:699
+#: src/main/objects.c:692
 msgid "wrong value for .Method"
 msgstr ""
 
-#: src/main/objects.c:703 src/main/objects.c:712
-#, c-format
-msgid "method name too long in '%s'"
-msgstr ""
-
-#: src/main/objects.c:715
+#: src/main/objects.c:702
 msgid "Incompatible methods ignored"
 msgstr ""
 
-#: src/main/objects.c:775 src/main/objects.c:780
+#: src/main/objects.c:759 src/main/objects.c:766
 msgid "no method to invoke"
 msgstr ""
 
-#: src/main/objects.c:832
+#: src/main/objects.c:817
 msgid "cannot unclass an environment"
 msgstr ""
 
-#: src/main/objects.c:835
+#: src/main/objects.c:820
 msgid "cannot unclass an external pointer"
 msgstr ""
 
-#: src/main/objects.c:872
+#: src/main/objects.c:856
 msgid "'what' must be a character vector"
 msgstr ""
 
-#: src/main/objects.c:876
+#: src/main/objects.c:860
 msgid "'which' must be a length 1 logical vector"
 msgstr ""
 
-#: src/main/objects.c:882
+#: src/main/objects.c:866
 msgid "use 'is()' instead of 'inherits()' on S4 objects"
 msgstr ""
 
-#: src/main/objects.c:1012
+#: src/main/objects.c:995
 msgid "could not find correct environment; please report!"
 msgstr ""
 
-#: src/main/objects.c:1052
+#: src/main/objects.c:1039
 msgid "'onOff' must be TRUE or FALSE"
 msgstr ""
 
-#: src/main/objects.c:1119
+#: src/main/objects.c:1104
 #, c-format
 msgid "unable to find a non-generic version of function \"%s\""
 msgstr ""
 
-#: src/main/objects.c:1151
+#: src/main/objects.c:1136
 msgid ""
 "'standardGeneric' called without 'methods' dispatch enabled (will be ignored)"
 msgstr ""
 
-#: src/main/objects.c:1160
+#: src/main/objects.c:1145
 msgid "argument to 'standardGeneric' must be a non-empty character string"
 msgstr ""
 
-#: src/main/objects.c:1165
+#: src/main/objects.c:1150
 #, c-format
 msgid ""
 "call to standardGeneric(\"%s\") apparently not from the body of that generic "
 "function"
 msgstr ""
 
-#: src/main/objects.c:1189
-msgid "argument 'code' must be a character string"
-msgstr ""
-
-#: src/main/objects.c:1257
+#: src/main/objects.c:1249
 #, c-format
 msgid ""
 "invalid primitive methods code (\"%s\"): should be \"clear\", \"reset\", "
 "\"set\", or \"suppress\""
 msgstr ""
 
-#: src/main/objects.c:1265
+#: src/main/objects.c:1257
 msgid "invalid object: must be a primitive function"
 msgstr ""
 
-#: src/main/objects.c:1312
+#: src/main/objects.c:1304
 #, c-format
 msgid ""
 "the formal definition of a primitive generic must be a function object (got "
 "type '%s')"
 msgstr ""
 
-#: src/main/objects.c:1342
+#: src/main/objects.c:1334
 #, c-format
 msgid "object returned as generic function \"%s\" does not appear to be one"
 msgstr ""
 
-#: src/main/objects.c:1444
+#: src/main/objects.c:1439
 msgid "invalid primitive operation given for dispatch"
 msgstr ""
 
-#: src/main/objects.c:1470 src/main/objects.c:1489
+#: src/main/objects.c:1468 src/main/objects.c:1487
 msgid "dispatch error"
 msgstr ""
 
-#: src/main/objects.c:1483
+#: src/main/objects.c:1481
 #, c-format
 msgid ""
 "primitive function \"%s\" has been set for methods but no generic function "
 "supplied"
 msgstr ""
 
-#: src/main/objects.c:1508
+#: src/main/objects.c:1506
 msgid "C level MAKE_CLASS macro called with NULL string pointer"
 msgstr ""
 
-#: src/main/objects.c:1524
+#: src/main/objects.c:1522
+msgid "'methods' package not yet loaded"
+msgstr ""
+
+#: src/main/objects.c:1532
 msgid "R_getClassDef(.) called with NULL string pointer"
 msgstr ""
 
-#: src/main/objects.c:1546
+#: src/main/objects.c:1577
 msgid "C level NEW macro called with null class definition pointer"
 msgstr ""
 
-#: src/main/objects.c:1550
+#: src/main/objects.c:1581
 #, c-format
 msgid "trying to generate an object from a virtual class (\"%s\")"
 msgstr ""
 
-#: src/main/objects.c:1627
+#: src/main/objects.c:1663
 #, c-format
 msgid "object of class \"%s\" does not correspond to a valid S3 object"
 msgstr ""
 
-#: src/main/options.c:120 src/main/options.c:180
+#: src/main/options.c:121 src/main/options.c:182
 msgid "corrupted options list"
 msgstr ""
 
-#: src/main/options.c:130
+#: src/main/options.c:131
 msgid "invalid printing width, used 80"
 msgstr ""
 
-#: src/main/options.c:141
+#: src/main/options.c:142
 msgid "invalid printing digits, used 7"
 msgstr ""
 
-#: src/main/options.c:153
+#: src/main/options.c:154
 msgid "invalid 'deparse.cutoff', used 60"
 msgstr ""
 
-#: src/main/options.c:165
+#: src/main/options.c:166
 msgid "invalid value for \"device.ask.default\", using FALSE"
 msgstr ""
 
-#: src/main/options.c:401
+#: src/main/options.c:416
 msgid "list argument has no valid names"
 msgstr ""
 
-#: src/main/options.c:429
+#: src/main/options.c:445
 #, c-format
 msgid "invalid 'width' parameter, allowed %d...%d"
 msgstr ""
 
-#: src/main/options.c:440
+#: src/main/options.c:456
 #, c-format
 msgid "invalid 'digits' parameter, allowed %d...%d"
 msgstr ""
 
-#: src/main/options.c:447
+#: src/main/options.c:463
 #, c-format
 msgid "'expressions' parameter invalid, allowed %d...%d"
 msgstr ""
 
-#: src/main/options.c:454 src/main/options.c:462 src/main/options.c:468
-#: src/main/options.c:476 src/main/options.c:483 src/main/options.c:488
-#: src/main/options.c:495 src/main/options.c:501 src/main/options.c:507
-#: src/main/options.c:512 src/main/options.c:517 src/main/options.c:526
-#: src/main/options.c:532 src/main/options.c:538 src/main/options.c:549
-#: src/main/options.c:556 src/main/options.c:562 src/main/options.c:570
-#: src/main/options.c:577 src/main/options.c:584 src/main/options.c:591
-#: src/main/options.c:598 src/main/options.c:606 src/main/options.c:615
-#: src/main/options.c:618 src/main/options.c:624
+#: src/main/options.c:470 src/main/options.c:478 src/main/options.c:484
+#: src/main/options.c:492 src/main/options.c:499 src/main/options.c:504
+#: src/main/options.c:511 src/main/options.c:517 src/main/options.c:523
+#: src/main/options.c:528 src/main/options.c:533 src/main/options.c:542
+#: src/main/options.c:548 src/main/options.c:554 src/main/options.c:564
+#: src/main/options.c:578 src/main/options.c:584 src/main/options.c:592
+#: src/main/options.c:599 src/main/options.c:606 src/main/options.c:613
+#: src/main/options.c:620 src/main/options.c:628 src/main/options.c:637
+#: src/main/options.c:640 src/main/options.c:646
 #, c-format
 msgid "invalid value for '%s'"
 msgstr ""
 
-#: src/main/options.c:611 src/main/options.c:640
+#: src/main/options.c:569
+msgid "'OutDec' must be a string of one character"
+msgstr ""
+
+#: src/main/options.c:633 src/main/options.c:662
 msgid "\"par.ask.default\" has been replaced by \"device.ask.default\""
 msgstr ""
 
@@ -4483,15 +4553,19 @@ msgstr ""
 msgid "non-string argument to Internal paste"
 msgstr ""
 
-#: src/main/paste.c:390
+#: src/main/paste.c:387
 msgid "first argument must be atomic"
 msgstr ""
 
-#: src/main/paste.c:560
+#: src/main/paste.c:448
+msgid "'decimal.mark' must be a string of one character"
+msgstr ""
+
+#: src/main/paste.c:579
 msgid "Impossible mode ( x )"
 msgstr ""
 
-#: src/main/paste.c:645
+#: src/main/paste.c:663
 msgid "atomic vector arguments only"
 msgstr ""
 
@@ -4499,209 +4573,192 @@ msgstr ""
 msgid "invalid filename specification"
 msgstr ""
 
-#: src/main/platform.c:375 src/main/platform.c:419
+#: src/main/platform.c:375 src/main/platform.c:420
 msgid "write error during file append"
 msgstr ""
 
-#: src/main/platform.c:394
+#: src/main/platform.c:395
 msgid "nothing to append to"
 msgstr ""
 
-#: src/main/platform.c:448 src/main/platform.c:795
+#: src/main/platform.c:449 src/main/platform.c:797 src/main/platform.c:979
 msgid "invalid filename argument"
 msgstr ""
 
-#: src/main/platform.c:460
+#: src/main/platform.c:461
 #, c-format
 msgid "cannot create file '%s', reason '%s'"
 msgstr ""
 
-#: src/main/platform.c:475 src/main/platform.c:545 src/main/platform.c:627
+#: src/main/platform.c:476 src/main/platform.c:546 src/main/platform.c:629
 msgid "invalid first filename"
 msgstr ""
 
-#: src/main/platform.c:487
+#: src/main/platform.c:488
 #, c-format
 msgid "cannot remove file '%s', reason '%s'"
 msgstr ""
 
-#: src/main/platform.c:547 src/main/platform.c:629
+#: src/main/platform.c:548 src/main/platform.c:631
 msgid "invalid second filename"
 msgstr ""
 
-#: src/main/platform.c:549 src/main/platform.c:631
+#: src/main/platform.c:551 src/main/platform.c:634
 msgid "nothing to link"
 msgstr ""
 
-#: src/main/platform.c:559
+#: src/main/platform.c:561
 msgid "symbolic links are not supported on this version of Windows"
 msgstr ""
 
-#: src/main/platform.c:581
+#: src/main/platform.c:583
 #, c-format
 msgid "cannot symlink '%ls' to '%ls', reason '%s'"
 msgstr ""
 
-#: src/main/platform.c:601
+#: src/main/platform.c:603
 #, c-format
 msgid "cannot symlink '%s' to '%s', reason '%s'"
 msgstr ""
 
-#: src/main/platform.c:609
+#: src/main/platform.c:611
 msgid "symbolic links are not supported on this platform"
 msgstr ""
 
-#: src/main/platform.c:649
+#: src/main/platform.c:652
 #, c-format
 msgid "cannot link '%ls' to '%ls', reason '%s'"
 msgstr ""
 
-#: src/main/platform.c:669
+#: src/main/platform.c:672
 #, c-format
 msgid "cannot link '%s' to '%s', reason '%s'"
 msgstr ""
 
-#: src/main/platform.c:678
+#: src/main/platform.c:681
 msgid "(hard) links are not supported on this platform"
 msgstr ""
 
-#: src/main/platform.c:709
+#: src/main/platform.c:713
 msgid "'from' and 'to' are of different lengths"
 msgstr ""
 
-#: src/main/platform.c:720 src/main/platform.c:730
+#: src/main/platform.c:724 src/main/platform.c:734
 msgid "expanded 'from' name too long"
 msgstr ""
 
-#: src/main/platform.c:724 src/main/platform.c:734
+#: src/main/platform.c:728 src/main/platform.c:738
 msgid "expanded 'to' name too long"
 msgstr ""
 
-#: src/main/platform.c:738
+#: src/main/platform.c:742
 #, c-format
 msgid "cannot rename file '%s' to '%s', reason '%s'"
 msgstr ""
 
-#: src/main/platform.c:1094
+#: src/main/platform.c:1168
 msgid "invalid 'pattern' regular expression"
 msgstr ""
 
-#: src/main/platform.c:1211
+#: src/main/platform.c:1285
 msgid "unable to determine R home location"
 msgstr ""
 
-#: src/main/platform.c:1263
+#: src/main/platform.c:1338
 msgid "file name too long"
 msgstr ""
 
-#: src/main/platform.c:1511 src/main/platform.c:1558 src/main/sysutils.c:1850
-#: src/main/sysutils.c:1864
+#: src/main/platform.c:1586 src/main/platform.c:1633 src/main/sysutils.c:1806
+#: src/main/sysutils.c:1820
 msgid "internal out-of-memory condition"
 msgstr ""
 
-#: src/main/platform.c:1554 src/main/sysutils.c:1860
+#: src/main/platform.c:1629 src/main/sysutils.c:1816
 #, c-format
 msgid "read error on '%s'"
 msgstr ""
 
-#: src/main/platform.c:1722
+#: src/main/platform.c:1728
 msgid "setting 'LC_NUMERIC' may cause R to function strangely"
 msgstr ""
 
-#: src/main/platform.c:1736
+#: src/main/platform.c:1742
 msgid "LC_MESSAGES exists on Windows but is not operational"
 msgstr ""
 
-#: src/main/platform.c:1763
+#: src/main/platform.c:1769
 #, c-format
 msgid "OS reports request to set locale to \"%s\" cannot be honored"
 msgstr ""
 
-#: src/main/platform.c:2065
-msgid "'hostname' must be a character vector of length 1"
-msgstr ""
-
-#: src/main/platform.c:2071
-#, c-format
-msgid "nsl() was unable to resolve host '%s'"
-msgstr ""
-
-#: src/main/platform.c:2078
-msgid "unknown format returned by C function 'gethostbyname'"
-msgstr ""
-
-#: src/main/platform.c:2087
-msgid "nsl() is not supported on this platform"
-msgstr ""
-
-#: src/main/platform.c:2158
+#: src/main/platform.c:2131
 #, c-format
 msgid "'%s' already exists"
 msgstr ""
 
-#: src/main/platform.c:2161
+#: src/main/platform.c:2134
 #, c-format
 msgid "cannot create dir '%s', reason '%s'"
 msgstr ""
 
-#: src/main/platform.c:2207
+#: src/main/platform.c:2181
 #, c-format
 msgid "'%ls' already exists"
 msgstr ""
 
-#: src/main/platform.c:2211
+#: src/main/platform.c:2183 src/main/platform.c:2189
 #, c-format
 msgid "cannot create dir '%ls', reason '%s'"
 msgstr ""
 
-#: src/main/platform.c:2245 src/main/platform.c:2449
+#: src/main/platform.c:2223 src/main/platform.c:2435
 msgid "too deep nesting"
 msgstr ""
 
-#: src/main/platform.c:2253 src/main/platform.c:2266 src/main/platform.c:2284
+#: src/main/platform.c:2231 src/main/platform.c:2244 src/main/platform.c:2262
 msgid "over-long path"
 msgstr ""
 
-#: src/main/platform.c:2273
+#: src/main/platform.c:2251
 #, c-format
 msgid "problem creating directory %ls: %s"
 msgstr ""
 
-#: src/main/platform.c:2293
+#: src/main/platform.c:2271
 #, c-format
 msgid "problem reading dir %ls: %s"
 msgstr ""
 
-#: src/main/platform.c:2304 src/main/platform.c:2465 src/main/platform.c:2478
-#: src/main/platform.c:2498 src/main/platform.c:2520
+#: src/main/platform.c:2282 src/main/platform.c:2451 src/main/platform.c:2464
+#: src/main/platform.c:2484 src/main/platform.c:2506
 msgid "over-long path length"
 msgstr ""
 
-#: src/main/platform.c:2312
+#: src/main/platform.c:2290
 #, c-format
 msgid "problem copying %ls to %ls: %s"
 msgstr ""
 
-#: src/main/platform.c:2487
+#: src/main/platform.c:2473
 #, c-format
 msgid "problem creating directory %s: %s"
 msgstr ""
 
-#: src/main/platform.c:2507
+#: src/main/platform.c:2493
 #, c-format
 msgid "problem reading directory %s: %s"
 msgstr ""
 
-#: src/main/platform.c:2529
+#: src/main/platform.c:2515
 #, c-format
 msgid "problem copying %s to %s: %s"
 msgstr ""
 
-#: src/main/platform.c:2662
+#: src/main/platform.c:2653
 msgid "'mode' must be of length at least one"
 msgstr ""
 
-#: src/main/platform.c:2729
+#: src/main/platform.c:2720
 msgid "insufficient OS support on this platform"
 msgstr ""
 
@@ -4722,91 +4779,95 @@ msgstr ""
 msgid "invalid math style encountered"
 msgstr ""
 
-#: src/main/plotmath.c:1261 src/main/plotmath.c:1366 src/main/plotmath.c:2664
+#: src/main/plotmath.c:1260 src/main/plotmath.c:1365 src/main/plotmath.c:2654
 msgid "invalid mathematical annotation"
 msgstr ""
 
-#: src/main/plotmath.c:1670
+#: src/main/plotmath.c:1669
 msgid "invalid accent"
 msgstr ""
 
-#: src/main/plotmath.c:1964
+#: src/main/plotmath.c:1963
 msgid "invalid group delimiter"
 msgstr ""
 
-#: src/main/plotmath.c:1991 src/main/plotmath.c:2137
+#: src/main/plotmath.c:1990 src/main/plotmath.c:2127
 msgid "invalid group specification"
 msgstr ""
 
-#: src/main/plotmath.c:2062
+#: src/main/plotmath.c:2052
 msgid "group is incomplete"
 msgstr ""
 
-#: src/main/plotmath.c:3190
+#: src/main/plotmath.c:3180
 msgid "Metric information not available for this family/device"
 msgstr ""
 
-#: src/main/print.c:148 src/main/print.c:254
+#: src/main/print.c:140 src/main/print.c:247
 msgid "invalid 'na.print' specification"
 msgstr ""
 
-#: src/main/print.c:157
+#: src/main/print.c:149
 msgid "invalid row labels"
 msgstr ""
 
-#: src/main/print.c:159
+#: src/main/print.c:151
 msgid "invalid column labels"
 msgstr ""
 
-#: src/main/print.c:183
+#: src/main/print.c:176
 msgid "non-function argument to .Internal(print.function(.))"
 msgstr ""
 
-#: src/main/print.c:264
+#: src/main/print.c:257
 msgid "'gap' must be non-negative integer"
 msgstr ""
 
-#: src/main/print.c:289
+#: src/main/print.c:282
 msgid "invalid 'tryS4' internal argument"
 msgstr ""
 
-#: src/main/print.c:1028
+#: src/main/print.c:851
+msgid "print buffer overflow"
+msgstr ""
+
+#: src/main/print.c:1043
 msgid "invalid character length in 'dblepr'"
 msgstr ""
 
-#: src/main/print.c:1046
+#: src/main/print.c:1061
 msgid "invalid character length in 'intpr'"
 msgstr ""
 
-#: src/main/print.c:1065
+#: src/main/print.c:1080
 msgid "invalid character length in 'realpr'"
 msgstr ""
 
-#: src/main/print.c:1075
+#: src/main/print.c:1090
 msgid "memory allocation error in 'realpr'"
 msgstr ""
 
-#: src/main/print.c:1091
+#: src/main/print.c:1106
 #, c-format
 msgid "BLAS/LAPACK routine '%6s' gave error code %d"
 msgstr ""
 
-#: src/main/printarray.c:453
+#: src/main/printarray.c:332
 msgid "too few row labels"
 msgstr ""
 
-#: src/main/printarray.c:455
+#: src/main/printarray.c:334
 msgid "too few column labels"
 msgstr ""
 
-#: src/main/printarray.c:489
+#: src/main/printarray.c:368
 #, c-format
 msgid " [ reached getOption(\"max.print\") -- omitted %d row ]\n"
 msgid_plural " [ reached getOption(\"max.print\") -- omitted %d rows ]\n"
 msgstr[0] ""
 msgstr[1] ""
 
-#: src/main/printutils.c:613
+#: src/main/printutils.c:710
 msgid "it is not known that wchar_t is Unicode on this platform"
 msgstr ""
 
@@ -4814,328 +4875,326 @@ msgstr ""
 msgid "argument is not a numeric vector"
 msgstr ""
 
-#: src/main/random.c:37
+#: src/main/random.c:39
 msgid "invalid arguments"
 msgstr ""
 
-#: src/main/random.c:93 src/main/random.c:110 src/main/random.c:175
-#: src/main/random.c:201 src/main/random.c:274 src/main/random.c:288
+#: src/main/random.c:95 src/main/random.c:112 src/main/random.c:178
+#: src/main/random.c:204 src/main/random.c:277 src/main/random.c:291
 msgid "NAs produced"
 msgstr ""
 
-#: src/main/random.c:445
+#: src/main/random.c:438
 msgid "NA in probability vector"
 msgstr ""
 
-#: src/main/random.c:447
-msgid "non-positive probability"
+#: src/main/random.c:440
+msgid "negative probability"
 msgstr ""
 
-#: src/main/random.c:454
+#: src/main/random.c:447
 msgid "too few positive probabilities"
 msgstr ""
 
-#: src/main/random.c:491 src/main/random.c:519
+#: src/main/random.c:483 src/main/random.c:511
 msgid "cannot take a sample larger than the population when 'replace = FALSE'"
 msgstr ""
 
-#: src/main/random.c:498
+#: src/main/random.c:490
 msgid "incorrect number of probabilities"
 msgstr ""
 
-#: src/main/random.c:537
+#: src/main/random.c:529
 msgid "n >= 2^31, replace = FALSE is only supported on 64-bit platforms"
 msgstr ""
 
-#: src/main/raw.c:37 src/main/raw.c:273
+#: src/main/raw.c:37 src/main/raw.c:277
 msgid "argument must be a character vector of length 1"
 msgstr ""
 
-#: src/main/raw.c:39 src/main/raw.c:275
+#: src/main/raw.c:39 src/main/raw.c:279
 msgid ""
 "argument should be a character vector of length 1\n"
 "all but the first element will be ignored"
 msgstr ""
 
-#: src/main/raw.c:53 src/main/raw.c:89 src/main/raw.c:110
+#: src/main/raw.c:53 src/main/raw.c:90 src/main/raw.c:113
 msgid "argument 'x' must be a raw vector"
 msgstr ""
 
-#: src/main/raw.c:56 src/main/raw.c:330
+#: src/main/raw.c:56 src/main/raw.c:336
 msgid "argument 'multiple' must be TRUE or FALSE"
 msgstr ""
 
-#: src/main/raw.c:91
+#: src/main/raw.c:92
 msgid "argument 'shift' must be a small integer"
 msgstr ""
 
-#: src/main/raw.c:129 src/main/raw.c:327
+#: src/main/raw.c:133 src/main/raw.c:333
 msgid "argument 'x' must be an integer vector"
 msgstr ""
 
-#: src/main/raw.c:148
+#: src/main/raw.c:153
 msgid "argument 'x' must be raw, integer or logical"
 msgstr ""
 
-#: src/main/raw.c:150
-msgid "argument 'type' must be a character string"
-msgstr ""
-
-#: src/main/raw.c:154
+#: src/main/raw.c:159
 #, c-format
 msgid "argument 'x' must be a multiple of %d long"
 msgstr ""
 
-#: src/main/raw.c:167 src/main/raw.c:181
+#: src/main/raw.c:172 src/main/raw.c:186
 msgid "argument 'x' must not contain NAs"
 msgstr ""
 
-#: src/main/raw.c:285
+#: src/main/raw.c:291
 msgid "invalid UTF-8 string"
 msgstr ""
 
-#: src/main/relop.c:202
+#: src/main/relop.c:196
 #, c-format
 msgid "comparison (%d) is possible only for atomic and list types"
 msgstr ""
 
-#: src/main/relop.c:207
+#: src/main/relop.c:201
 msgid "comparison is not allowed for expressions"
 msgstr ""
 
-#: src/main/relop.c:296
+#: src/main/relop.c:293
 msgid "comparison of these types is not implemented"
 msgstr ""
 
-#: src/main/relop.c:509
+#: src/main/relop.c:425
 msgid "invalid comparison with complex values"
 msgstr ""
 
-#: src/main/relop.c:767
+#: src/main/relop.c:683
 msgid "'a' and 'b' must have the same type"
 msgstr ""
 
-#: src/main/saveload.c:200 src/main/saveload.c:205 src/main/saveload.c:214
-#: src/main/saveload.c:223 src/main/saveload.c:232 src/main/saveload.c:241
-#: src/main/saveload.c:245 src/main/saveload.c:254 src/main/saveload.c:1381
-#: src/main/saveload.c:1386 src/main/saveload.c:1430 src/main/saveload.c:1498
-#: src/main/saveload.c:1507 src/main/serialize.c:331 src/main/serialize.c:338
-#: src/main/serialize.c:2388 src/main/serialize.c:2396
+#: src/main/saveload.c:202 src/main/saveload.c:207 src/main/saveload.c:216
+#: src/main/saveload.c:225 src/main/saveload.c:234 src/main/saveload.c:243
+#: src/main/saveload.c:247 src/main/saveload.c:256 src/main/saveload.c:1383
+#: src/main/saveload.c:1388 src/main/saveload.c:1432 src/main/saveload.c:1500
+#: src/main/saveload.c:1509 src/main/serialize.c:354 src/main/serialize.c:361
+#: src/main/serialize.c:374 src/main/serialize.c:378 src/main/serialize.c:405
+#: src/main/serialize.c:421 src/main/serialize.c:2429
+#: src/main/serialize.c:2437
 msgid "read error"
 msgstr ""
 
-#: src/main/saveload.c:332
+#: src/main/saveload.c:334
 msgid "a I read error occurred"
 msgstr ""
 
-#: src/main/saveload.c:342
+#: src/main/saveload.c:344
 msgid "a R read error occurred"
 msgstr ""
 
-#: src/main/saveload.c:352
+#: src/main/saveload.c:354
 msgid "a C read error occurred"
 msgstr ""
 
-#: src/main/saveload.c:362
+#: src/main/saveload.c:364
 msgid "a S read error occurred"
 msgstr ""
 
-#: src/main/saveload.c:387 src/main/saveload.c:395 src/main/saveload.c:403
-#: src/main/saveload.c:1594 src/main/saveload.c:1602
+#: src/main/saveload.c:389 src/main/saveload.c:397 src/main/saveload.c:405
+#: src/main/saveload.c:1596 src/main/saveload.c:1604
 msgid "a read error occurred"
 msgstr ""
 
-#: src/main/saveload.c:467
+#: src/main/saveload.c:469
 msgid "unresolved node during restore"
 msgstr ""
 
-#: src/main/saveload.c:488
+#: src/main/saveload.c:490
 #, c-format
 msgid "restore compatibility error - no version %d compatibility"
 msgstr ""
 
-#: src/main/saveload.c:572 src/main/saveload.c:645
+#: src/main/saveload.c:574 src/main/saveload.c:647
 msgid "bad SEXP type in data file"
 msgstr ""
 
-#: src/main/saveload.c:586
+#: src/main/saveload.c:588
 msgid "mismatch on types"
 msgstr ""
 
-#: src/main/saveload.c:607 src/main/saveload.c:1270 src/main/serialize.c:1636
+#: src/main/saveload.c:609 src/main/saveload.c:1272 src/main/serialize.c:1675
 #, c-format
 msgid "unrecognized internal function name \"%s\""
 msgstr ""
 
-#: src/main/saveload.c:709
+#: src/main/saveload.c:711
 msgid "cannot save file position while restoring data"
 msgstr ""
 
-#: src/main/saveload.c:722
+#: src/main/saveload.c:724
 msgid "cannot restore file position while restoring data"
 msgstr ""
 
-#: src/main/saveload.c:915
+#: src/main/saveload.c:917
 msgid "base namespace is not preserved in version 1 workspaces"
 msgstr ""
 
-#: src/main/saveload.c:917
+#: src/main/saveload.c:919
 msgid "cannot save namespace in version 1 workspaces"
 msgstr ""
 
-#: src/main/saveload.c:919
+#: src/main/saveload.c:921
 msgid ""
 "cannot save environment with locked/active bindings in version 1 workspaces"
 msgstr ""
 
-#: src/main/saveload.c:943
+#: src/main/saveload.c:945
 msgid "cannot save weak references in version 1 workspaces"
 msgstr ""
 
-#: src/main/saveload.c:1021
+#: src/main/saveload.c:1023
 msgid "NewWriteVec called with non-vector type"
 msgstr ""
 
-#: src/main/saveload.c:1084
+#: src/main/saveload.c:1086
 msgid "cannot save byte code objects in version 1 workspaces"
 msgstr ""
 
-#: src/main/saveload.c:1086
+#: src/main/saveload.c:1088
 #, c-format
 msgid "NewWriteItem: unknown type %i"
 msgstr ""
 
-#: src/main/saveload.c:1216
+#: src/main/saveload.c:1218
 msgid "NewReadVec called with non-vector type"
 msgstr ""
 
-#: src/main/saveload.c:1286
+#: src/main/saveload.c:1288
 msgid "cannot read byte code objects from version 1 workspaces"
 msgstr ""
 
-#: src/main/saveload.c:1288
+#: src/main/saveload.c:1290
 #, c-format
 msgid "NewReadItem: unknown type %i"
 msgstr ""
 
-#: src/main/saveload.c:1440
+#: src/main/saveload.c:1442
 msgid "out of memory reading ascii string"
 msgstr ""
 
-#: src/main/saveload.c:1565
+#: src/main/saveload.c:1567
 msgid "a binary read error occurred"
 msgstr ""
 
-#: src/main/saveload.c:1580 src/main/saveload.c:1681
+#: src/main/saveload.c:1582 src/main/saveload.c:1683
 msgid "out of memory reading binary string"
 msgstr ""
 
-#: src/main/saveload.c:1585
+#: src/main/saveload.c:1587
 msgid "a binary string read error occurred"
 msgstr ""
 
-#: src/main/saveload.c:1645
+#: src/main/saveload.c:1647
 msgid "an xdr integer data write error occurred"
 msgstr ""
 
-#: src/main/saveload.c:1652
+#: src/main/saveload.c:1654
 msgid "an xdr integer data read error occurred"
 msgstr ""
 
-#: src/main/saveload.c:1667 src/main/saveload.c:1686
+#: src/main/saveload.c:1669 src/main/saveload.c:1688
 msgid "an xdr string data write error occurred"
 msgstr ""
 
-#: src/main/saveload.c:1694
+#: src/main/saveload.c:1696
 msgid "an xdr real data write error occurred"
 msgstr ""
 
-#: src/main/saveload.c:1701
+#: src/main/saveload.c:1703
 msgid "an xdr real data read error occurred"
 msgstr ""
 
-#: src/main/saveload.c:1708
+#: src/main/saveload.c:1710
 msgid "an xdr complex data write error occurred"
 msgstr ""
 
-#: src/main/saveload.c:1715
+#: src/main/saveload.c:1717
 msgid "an xdr complex data read error occurred"
 msgstr ""
 
-#: src/main/saveload.c:1783 src/main/serialize.c:1958
-#: src/main/serialize.c:2568 src/modules/internet/internet.c:351
-#: src/modules/internet/internet.c:409 src/modules/internet/internet.c:514
+#: src/main/saveload.c:1785 src/main/serialize.c:1997
+#: src/main/serialize.c:2614 src/modules/internet/internet.c:514
+#: src/modules/internet/internet.c:590 src/modules/internet/internet.c:701
 msgid "write failed"
 msgstr ""
 
-#: src/main/saveload.c:1910
+#: src/main/saveload.c:1912
 msgid "restore file may be empty -- no data loaded"
 msgstr ""
 
-#: src/main/saveload.c:1912
+#: src/main/saveload.c:1914
 msgid "restore file may be from a newer version of R -- no data loaded"
 msgstr ""
 
-#: src/main/saveload.c:1914
+#: src/main/saveload.c:1916
 msgid "bad restore file magic number (file may be corrupted) -- no data loaded"
 msgstr ""
 
-#: src/main/saveload.c:1940 src/main/saveload.c:2238
+#: src/main/saveload.c:1942 src/main/saveload.c:2240
 msgid "first argument must be a character vector"
 msgstr ""
 
-#: src/main/saveload.c:2012
+#: src/main/saveload.c:2014
 msgid "not a valid named list"
 msgstr ""
 
-#: src/main/saveload.c:2019 src/main/saveload.c:2040
+#: src/main/saveload.c:2021 src/main/saveload.c:2042
 #, c-format
 msgid "'%s' looks like a pre-2.4.0 S4 object: please recreate it"
 msgstr ""
 
-#: src/main/saveload.c:2027
+#: src/main/saveload.c:2029
 msgid "loaded data is not in pair list form"
 msgstr ""
 
-#: src/main/saveload.c:2063
+#: src/main/saveload.c:2065
 msgid "first argument must be a file name"
 msgstr ""
 
-#: src/main/saveload.c:2108 src/main/saveload.c:2134 src/main/serialize.c:826
-#: src/main/serialize.c:863 src/main/serialize.c:901
+#: src/main/saveload.c:2110 src/main/saveload.c:2136 src/main/serialize.c:864
+#: src/main/serialize.c:901 src/main/serialize.c:939
 msgid "XDR write failed"
 msgstr ""
 
-#: src/main/saveload.c:2121 src/main/saveload.c:2146 src/main/serialize.c:1362
-#: src/main/serialize.c:1398 src/main/serialize.c:1436
+#: src/main/saveload.c:2123 src/main/saveload.c:2148 src/main/serialize.c:1400
+#: src/main/serialize.c:1436 src/main/serialize.c:1474
 msgid "XDR read failed"
 msgstr ""
 
-#: src/main/saveload.c:2157
+#: src/main/saveload.c:2159
 #, c-format
 msgid "cannot save data -- unable to open '%s': %s"
 msgstr ""
 
-#: src/main/saveload.c:2254 src/main/serialize.c:2161
+#: src/main/saveload.c:2256 src/main/serialize.c:2202
 #, c-format
 msgid "cannot save to connections in version %d format"
 msgstr ""
 
-#: src/main/saveload.c:2277 src/main/serialize.c:2186
+#: src/main/saveload.c:2279 src/main/serialize.c:2227
 msgid "connection not open for writing"
 msgstr ""
 
-#: src/main/saveload.c:2285
+#: src/main/saveload.c:2288
 msgid "cannot save XDR format to a text-mode connection"
 msgstr ""
 
-#: src/main/saveload.c:2295 src/main/serialize.c:2066
-#: src/main/serialize.c:2080 src/main/serialize.c:2262
-#: src/main/serialize.c:2284
+#: src/main/saveload.c:2298 src/main/serialize.c:2105
+#: src/main/serialize.c:2119 src/main/serialize.c:2303
+#: src/main/serialize.c:2325
 msgid "error writing to connection"
 msgstr ""
 
-#: src/main/saveload.c:2359 src/main/serialize.c:2234
+#: src/main/saveload.c:2359 src/main/serialize.c:2275
 msgid "connection not open for reading"
 msgstr ""
 
@@ -5162,7 +5221,7 @@ msgstr ""
 msgid "scan() expected '%s', got '%s'"
 msgstr ""
 
-#: src/main/scan.c:585 src/main/scan.c:732
+#: src/main/scan.c:585 src/main/scan.c:735
 msgid "too many items"
 msgstr ""
 
@@ -5170,7 +5229,7 @@ msgstr ""
 msgid "empty 'what' specified"
 msgstr ""
 
-#: src/main/scan.c:722
+#: src/main/scan.c:725
 #, c-format
 msgid "line %d did not have %d elements"
 msgstr ""
@@ -5199,257 +5258,259 @@ msgstr ""
 msgid "invalid quote symbol set"
 msgstr ""
 
-#: src/main/scan.c:987
+#: src/main/scan.c:988
 msgid "embedded nul(s) found in input"
 msgstr ""
 
-#: src/main/seq.c:48
+#: src/main/seq.c:49
 msgid "unequal factor lengths"
 msgstr ""
 
-#: src/main/seq.c:100
+#: src/main/seq.c:101
 msgid "result would be too long a vector"
 msgstr ""
 
-#: src/main/seq.c:159
+#: src/main/seq.c:160
 msgid "argument of length 0"
 msgstr ""
 
-#: src/main/seq.c:161 src/main/seq.c:163
+#: src/main/seq.c:163 src/main/seq.c:168
 #, c-format
-msgid "numerical expression has %d elements: only the first used"
-msgstr ""
+msgid "numerical expression has %d element: only the first used"
+msgid_plural "numerical expression has %d elements: only the first used"
+msgstr[0] ""
+msgstr[1] ""
 
-#: src/main/seq.c:167
+#: src/main/seq.c:174
 msgid "NA/NaN argument"
 msgstr ""
 
-#: src/main/seq.c:331
+#: src/main/seq.c:333
 msgid "incorrect type for second argument"
 msgstr ""
 
-#: src/main/seq.c:334
+#: src/main/seq.c:336
 #, c-format
 msgid "attempt to replicate an object of type '%s'"
 msgstr ""
 
-#: src/main/seq.c:387
+#: src/main/seq.c:393
 msgid "attempt to replicate non-vector"
 msgstr ""
 
-#: src/main/seq.c:403
+#: src/main/seq.c:409
 msgid "cannot replicate NULL to a non-zero length"
 msgstr ""
 
-#: src/main/seq.c:626 src/main/seq.c:633 src/main/seq.c:768 src/main/seq.c:979
+#: src/main/seq.c:630 src/main/seq.c:637 src/main/seq.c:766 src/main/seq.c:977
 #, c-format
 msgid "first element used of '%s' argument"
 msgstr ""
 
-#: src/main/seq.c:766
+#: src/main/seq.c:764
 msgid "'length.out' must be a non-negative number"
 msgstr ""
 
-#: src/main/seq.c:790 src/main/seq.c:856 src/main/seq.c:873
+#: src/main/seq.c:788 src/main/seq.c:854 src/main/seq.c:871
 msgid "'from' must be finite"
 msgstr ""
 
-#: src/main/seq.c:792 src/main/seq.c:858 src/main/seq.c:895
+#: src/main/seq.c:790 src/main/seq.c:856 src/main/seq.c:893
 msgid "'to' must be finite"
 msgstr ""
 
-#: src/main/seq.c:804
+#: src/main/seq.c:802
 msgid "invalid '(to - from)/by' in 'seq'"
 msgstr ""
 
-#: src/main/seq.c:816
+#: src/main/seq.c:814
 msgid "'by' argument is much too small"
 msgstr ""
 
-#: src/main/seq.c:818
+#: src/main/seq.c:816
 msgid "wrong sign in 'by' argument"
 msgstr ""
 
-#: src/main/seq.c:875 src/main/seq.c:897
+#: src/main/seq.c:873 src/main/seq.c:895
 msgid "'by' must be finite"
 msgstr ""
 
-#: src/main/seq.c:985 src/main/seq.c:990
+#: src/main/seq.c:983 src/main/seq.c:988
 msgid "argument must be coercible to non-negative integer"
 msgstr ""
 
-#: src/main/serialize.c:224 src/main/serialize.c:254 src/main/serialize.c:277
+#: src/main/serialize.c:228 src/main/serialize.c:275 src/main/serialize.c:299
 msgid "unknown or inappropriate output format"
 msgstr ""
 
-#: src/main/serialize.c:504
+#: src/main/serialize.c:542
 msgid "must specify ascii, binary, or xdr format"
 msgstr ""
 
-#: src/main/serialize.c:505
+#: src/main/serialize.c:543
 msgid "unknown output format"
 msgstr ""
 
-#: src/main/serialize.c:536
+#: src/main/serialize.c:574
 msgid "unknown input format"
 msgstr ""
 
-#: src/main/serialize.c:541
+#: src/main/serialize.c:579
 msgid "input format does not match specified format"
 msgstr ""
 
-#: src/main/serialize.c:752
+#: src/main/serialize.c:790
 msgid "no restore method available"
 msgstr ""
 
-#: src/main/serialize.c:794
+#: src/main/serialize.c:832
 msgid "names in persistent strings are currently ignored"
 msgstr ""
 
-#: src/main/serialize.c:963
+#: src/main/serialize.c:1001
 #, c-format
 msgid "'%s' may not be available when loading"
 msgstr ""
 
-#: src/main/serialize.c:970
+#: src/main/serialize.c:1008
 msgid "namespaces may not be available when loading"
 msgstr ""
 
-#: src/main/serialize.c:1097
+#: src/main/serialize.c:1136
 #, c-format
 msgid "WriteItem: unknown type %i"
 msgstr ""
 
-#: src/main/serialize.c:1273
+#: src/main/serialize.c:1312
 #, c-format
 msgid "version %d not supported"
 msgstr ""
 
-#: src/main/serialize.c:1305
+#: src/main/serialize.c:1343
 msgid "reference index out of range"
 msgstr ""
 
-#: src/main/serialize.c:1335
+#: src/main/serialize.c:1373
 msgid "names in persistent strings are not supported yet"
 msgstr ""
 
-#: src/main/serialize.c:1463
+#: src/main/serialize.c:1501
 msgid "negative serialized length for vector"
 msgstr ""
 
-#: src/main/serialize.c:1471
+#: src/main/serialize.c:1509
 msgid "invalid upper part of serialized vector length"
 msgstr ""
 
-#: src/main/serialize.c:1476
+#: src/main/serialize.c:1514
 msgid ""
 "negative serialized vector length:\n"
 "perhaps long vector from 64-bit version of R?"
 msgstr ""
 
-#: src/main/serialize.c:1707
+#: src/main/serialize.c:1746
 msgid "this version of R cannot read class references"
 msgstr ""
 
-#: src/main/serialize.c:1709
+#: src/main/serialize.c:1748
 msgid "this version of R cannot read generic function references"
 msgstr ""
 
-#: src/main/serialize.c:1726
+#: src/main/serialize.c:1765
 #, c-format
 msgid "ReadItem: unknown type %i, perhaps written by later version of R"
 msgstr ""
 
-#: src/main/serialize.c:1882
+#: src/main/serialize.c:1921
 #, c-format
 msgid ""
 "cannot read unreleased workspace version %d written by experimental R %d.%d."
 "%d"
 msgstr ""
 
-#: src/main/serialize.c:1886
+#: src/main/serialize.c:1925
 #, c-format
 msgid ""
 "cannot read workspace version %d written by R %d.%d.%d; need R %d.%d.%d or "
 "newer"
 msgstr ""
 
-#: src/main/serialize.c:1965
+#: src/main/serialize.c:2004
 msgid "read failed"
 msgstr ""
 
-#: src/main/serialize.c:2028
+#: src/main/serialize.c:2067
 msgid "error reading from ascii connection"
 msgstr ""
 
-#: src/main/serialize.c:2030
+#: src/main/serialize.c:2069
 msgid "unexpected format in ascii connection"
 msgstr ""
 
-#: src/main/serialize.c:2035 src/main/serialize.c:2049
+#: src/main/serialize.c:2074 src/main/serialize.c:2088
 msgid "error reading from connection"
 msgstr ""
 
-#: src/main/serialize.c:2090
+#: src/main/serialize.c:2130
 msgid "only ascii format can be written to text mode connections"
 msgstr ""
 
-#: src/main/serialize.c:2104
+#: src/main/serialize.c:2144
 msgid "only ascii format can be read from text mode connections"
 msgstr ""
 
-#: src/main/serialize.c:2159 src/main/serialize.c:2312
-#: src/main/serialize.c:2461
+#: src/main/serialize.c:2200 src/main/serialize.c:2353
+#: src/main/serialize.c:2502
 msgid "bad version value"
 msgstr ""
 
-#: src/main/serialize.c:2184
+#: src/main/serialize.c:2225
 msgid "binary-mode connection required for ascii=FALSE"
 msgstr ""
 
-#: src/main/serialize.c:2340 src/main/serialize.c:2377
-#: src/main/serialize.c:2440
+#: src/main/serialize.c:2381 src/main/serialize.c:2418
+#: src/main/serialize.c:2481
 msgid "serialization is too large to store in a raw vector"
 msgstr ""
 
-#: src/main/serialize.c:2357
+#: src/main/serialize.c:2398
 msgid "cannot allocate buffer"
 msgstr ""
 
-#: src/main/serialize.c:2546 src/main/serialize.c:2619
+#: src/main/serialize.c:2592 src/main/serialize.c:2665
 msgid "not a proper file name"
 msgstr ""
 
-#: src/main/serialize.c:2548
+#: src/main/serialize.c:2594
 msgid "not a proper raw vector"
 msgstr ""
 
-#: src/main/serialize.c:2569
+#: src/main/serialize.c:2615
 msgid "could not determine file position"
 msgstr ""
 
-#: src/main/serialize.c:2621
+#: src/main/serialize.c:2667
 msgid "bad offset/length argument"
 msgstr ""
 
-#: src/main/serialize.c:2645 src/main/serialize.c:2658
-#: src/main/serialize.c:2667 src/main/serialize.c:2677
-#: src/main/serialize.c:2690
+#: src/main/serialize.c:2691 src/main/serialize.c:2704
+#: src/main/serialize.c:2713 src/main/serialize.c:2723
+#: src/main/serialize.c:2736
 #, c-format
 msgid "seek failed on %s"
 msgstr ""
 
-#: src/main/serialize.c:2662 src/main/serialize.c:2671
-#: src/main/serialize.c:2681 src/main/serialize.c:2694
+#: src/main/serialize.c:2708 src/main/serialize.c:2717
+#: src/main/serialize.c:2727 src/main/serialize.c:2740
 #, c-format
 msgid "read failed on %s"
 msgstr ""
 
-#: src/main/serialize.c:2713
+#: src/main/serialize.c:2759
 msgid "bad environment"
 msgstr ""
 
-#: src/main/serialize.c:2715
+#: src/main/serialize.c:2761
 msgid "bad variable names"
 msgstr ""
 
@@ -5457,165 +5518,161 @@ msgstr ""
 msgid "only atomic vectors can be tested to be sorted"
 msgstr ""
 
-#: src/main/sort.c:326 src/main/sort.c:1228 src/main/sort.c:1396
+#: src/main/sort.c:325 src/main/sort.c:1248
 msgid "'decreasing' must be TRUE or FALSE"
 msgstr ""
 
-#: src/main/sort.c:329 src/main/sort.c:600
+#: src/main/sort.c:328 src/main/sort.c:599
 msgid "only atomic vectors can be sorted"
 msgstr ""
 
-#: src/main/sort.c:331 src/main/sort.c:602 src/main/sort.c:1297
+#: src/main/sort.c:330 src/main/sort.c:601 src/main/sort.c:1317
 msgid "raw vectors cannot be sorted"
 msgstr ""
 
-#: src/main/sort.c:613
+#: src/main/sort.c:612
 msgid "NA or infinite index"
 msgstr ""
 
-#: src/main/sort.c:616
+#: src/main/sort.c:615
 #, c-format
 msgid "index %ld outside bounds"
 msgstr ""
 
-#: src/main/sort.c:621 src/main/sort.c:634
+#: src/main/sort.c:620 src/main/sort.c:633
 msgid "NA index"
 msgstr ""
 
-#: src/main/sort.c:623 src/main/sort.c:636
+#: src/main/sort.c:622 src/main/sort.c:635
 #, c-format
 msgid "index %d outside bounds"
 msgstr ""
 
-#: src/main/sort.c:1237
+#: src/main/sort.c:1257
 #, c-format
 msgid "argument %d is not a vector"
 msgstr ""
 
-#: src/main/sort.c:1239
+#: src/main/sort.c:1259
 msgid "argument lengths differ"
 msgstr ""
 
-#: src/main/sort.c:1324
+#: src/main/sort.c:1344
 msgid "invalid ties.method for rank() [should never happen]"
 msgstr ""
 
-#: src/main/sort.c:1429
-msgid "too large a range of values in 'x'"
-msgstr ""
-
-#: src/main/source.c:215
+#: src/main/source.c:220
 msgid "coercion of 'text' to character was unsuccessful"
 msgstr ""
 
-#: src/main/source.c:231
+#: src/main/source.c:236
 #, c-format
 msgid "argument '%s = \"%s\"' will be ignored"
 msgstr ""
 
-#: src/main/split.c:38
+#: src/main/split.c:39
 msgid "first argument must be a vector"
 msgstr ""
 
-#: src/main/split.c:40
+#: src/main/split.c:41
 msgid "second argument must be a factor"
 msgstr ""
 
-#: src/main/split.c:45
+#: src/main/split.c:46
 msgid "group length is 0 but data length > 0"
 msgstr ""
 
-#: src/main/split.c:47
+#: src/main/split.c:48
 msgid "data length is not a multiple of split variable"
 msgstr ""
 
-#: src/main/split.c:56
+#: src/main/split.c:58
 msgid "factor has bad level"
 msgstr ""
 
-#: src/main/sprintf.c:94
+#: src/main/sprintf.c:97
 #, c-format
 msgid "required resulting string length %d is greater than maximal %d"
 msgstr ""
 
-#: src/main/sprintf.c:102
+#: src/main/sprintf.c:105
 msgid "'fmt' is not a character vector"
 msgstr ""
 
-#: src/main/sprintf.c:107
+#: src/main/sprintf.c:110
 #, c-format
 msgid "only %d arguments are allowed"
 msgstr ""
 
-#: src/main/sprintf.c:114
+#: src/main/sprintf.c:117
 #, c-format
 msgid "invalid type of argument[%d]: '%s'"
 msgstr ""
 
-#: src/main/sprintf.c:125 src/main/sprintf.c:128
+#: src/main/sprintf.c:128 src/main/sprintf.c:131
 msgid "arguments cannot be recycled to the same length"
 msgstr ""
 
-#: src/main/sprintf.c:150 src/main/sprintf.c:257
+#: src/main/sprintf.c:153 src/main/sprintf.c:260
 #, c-format
 msgid "'fmt' length exceeds maximal format length %d"
 msgstr ""
 
-#: src/main/sprintf.c:169
+#: src/main/sprintf.c:172
 #, c-format
 msgid "unrecognised format specification '%s'"
 msgstr ""
 
-#: src/main/sprintf.c:180 src/main/sprintf.c:186 src/main/sprintf.c:199
-#: src/main/sprintf.c:206
+#: src/main/sprintf.c:183 src/main/sprintf.c:189 src/main/sprintf.c:202
+#: src/main/sprintf.c:209
 #, c-format
 msgid "reference to non-existent argument %d"
 msgstr ""
 
-#: src/main/sprintf.c:218
+#: src/main/sprintf.c:221
 msgid "at most one asterisk '*' is supported in each conversion specification"
 msgstr ""
 
-#: src/main/sprintf.c:228
+#: src/main/sprintf.c:231
 msgid "argument for '*' conversion specification must be a number"
 msgstr ""
 
-#: src/main/sprintf.c:266
+#: src/main/sprintf.c:269
 msgid "coercion has changed vector length to 0"
 msgstr ""
 
-#: src/main/sprintf.c:339 src/main/sprintf.c:353 src/main/sprintf.c:367
-#: src/main/sprintf.c:402
+#: src/main/sprintf.c:343 src/main/sprintf.c:357 src/main/sprintf.c:371
+#: src/main/sprintf.c:406
 #, c-format
 msgid "invalid format '%s'; %s"
 msgstr ""
 
-#: src/main/sprintf.c:340
+#: src/main/sprintf.c:344
 #, c-format
 msgid "use format %d or %i for logical objects"
 msgstr ""
 
-#: src/main/sprintf.c:354
+#: src/main/sprintf.c:358
 #, c-format
 msgid "use format %d, %i, %o, %x or %X for integer objects"
 msgstr ""
 
-#: src/main/sprintf.c:368
+#: src/main/sprintf.c:372
 #, c-format
 msgid "use format %f, %e, %g or %a for numeric objects"
 msgstr ""
 
-#: src/main/sprintf.c:403
+#: src/main/sprintf.c:407
 #, c-format
 msgid "use format %s for character objects"
 msgstr ""
 
-#: src/main/sprintf.c:408
+#: src/main/sprintf.c:412
 #, c-format
 msgid "likely truncation of character string to %d characters"
 msgstr ""
 
-#: src/main/sprintf.c:417
+#: src/main/sprintf.c:421
 msgid "unsupported type"
 msgstr ""
 
@@ -5623,377 +5680,381 @@ msgstr ""
 msgid "R_LibraryFileName: buffer too small"
 msgstr ""
 
-#: src/main/subassign.c:117
+#: src/main/subassign.c:118
 msgid "attempt to enlarge non-vector"
 msgstr ""
 
-#: src/main/subassign.c:122
+#: src/main/subassign.c:123
 #, c-format
 msgid "assignment outside vector/list limits (extending from %d to %d)"
 msgstr ""
 
-#: src/main/subassign.c:367
+#: src/main/subassign.c:391
 #, c-format
 msgid "incompatible types (from %s to %s) in subassignment type fix"
 msgstr ""
 
-#: src/main/subassign.c:502 src/main/subassign.c:782 src/main/subassign.c:785
-#: src/main/subassign.c:1076
+#: src/main/subassign.c:550 src/main/subassign.c:830 src/main/subassign.c:833
+#: src/main/subassign.c:1133
 msgid "NAs are not allowed in subscripted assignments"
 msgstr ""
 
-#: src/main/subassign.c:520 src/main/subassign.c:796 src/main/subassign.c:1068
-#: src/main/subassign.c:1641
+#: src/main/subassign.c:568 src/main/subassign.c:844 src/main/subassign.c:1125
+#: src/main/subassign.c:1705
 msgid "replacement has length zero"
 msgstr ""
 
-#: src/main/subassign.c:522 src/main/subassign.c:798 src/main/subassign.c:1070
+#: src/main/subassign.c:570 src/main/subassign.c:846 src/main/subassign.c:1127
 msgid "number of items to replace is not a multiple of replacement length"
 msgstr ""
 
-#: src/main/subassign.c:766
+#: src/main/subassign.c:814
 msgid "incorrect number of subscripts on matrix"
 msgstr ""
 
-#: src/main/subassign.c:1022
+#: src/main/subassign.c:1079
 #, c-format
 msgid "incompatible types (from %s to %s) in matrix subset assignment"
 msgstr ""
 
-#: src/main/subassign.c:1038 src/main/subset.c:928
+#: src/main/subassign.c:1095 src/main/subset.c:957
 msgid "incorrect number of subscripts"
 msgstr ""
 
-#: src/main/subassign.c:1214
+#: src/main/subassign.c:1272
 #, c-format
 msgid "incompatible types (from %s to %s) in array subset assignment"
 msgstr ""
 
-#: src/main/subassign.c:1249 src/main/subassign.c:1270
+#: src/main/subassign.c:1308 src/main/subassign.c:1329
 msgid "invalid subscript in list assign"
 msgstr ""
 
-#: src/main/subassign.c:1263
+#: src/main/subassign.c:1322
 msgid "invalid number of subscripts to list assign"
 msgstr ""
 
-#: src/main/subassign.c:1361
+#: src/main/subassign.c:1421
 msgid "SubAssignArgs: invalid number of arguments"
 msgstr ""
 
-#: src/main/subassign.c:1506
+#: src/main/subassign.c:1566
 msgid "result is zero-length and so cannot be a language object"
 msgstr ""
 
-#: src/main/subassign.c:1611
+#: src/main/subassign.c:1665
 msgid ""
 "[[<- defined for objects of type \"S4\" only for subclasses of environment"
 msgstr ""
 
-#: src/main/subassign.c:1617
+#: src/main/subassign.c:1677
 msgid "wrong args for environment subassignment"
 msgstr ""
 
-#: src/main/subassign.c:1643
+#: src/main/subassign.c:1707
 msgid "more elements supplied than there are to replace"
 msgstr ""
 
-#: src/main/subassign.c:1645
+#: src/main/subassign.c:1709
 msgid "[[ ]] with missing subscript"
 msgstr ""
 
-#: src/main/subassign.c:1657 src/main/subassign.c:1675
+#: src/main/subassign.c:1727 src/main/subassign.c:1745
 msgid "[[ ]] subscript out of bounds"
 msgstr ""
 
-#: src/main/subassign.c:1663 src/main/subassign.c:1841
+#: src/main/subassign.c:1733 src/main/subassign.c:1914
 msgid "[[ ]] improper number of subscripts"
 msgstr ""
 
-#: src/main/subassign.c:1808
+#: src/main/subassign.c:1879
 #, c-format
 msgid "incompatible types (from %s to %s) in [[ assignment"
 msgstr ""
 
-#: src/main/subassign.c:1852
+#: src/main/subassign.c:1925
 #, c-format
 msgid "[[ ]] subscript (%d) out of bounds"
 msgstr ""
 
-#: src/main/subassign.c:1905 src/main/subscript.c:143 src/main/subscript.c:145
-#: src/main/subscript.c:274 src/main/subscript.c:276 src/main/subscript.c:826
-#: src/main/subscript.c:828 src/main/subscript.c:919 src/main/subscript.c:921
-#: src/main/subset.c:1109
+#: src/main/subassign.c:1986 src/main/subscript.c:151 src/main/subscript.c:278
+#: src/main/subscript.c:903 src/main/subscript.c:996 src/main/subset.c:1176
 #, c-format
 msgid "invalid subscript type '%s'"
 msgstr ""
 
-#: src/main/subassign.c:1950
+#: src/main/subassign.c:2037
 msgid "no method for assigning subsets of this S4 class"
 msgstr ""
 
-#: src/main/subassign.c:2008
+#: src/main/subassign.c:2095
 msgid "Coercing LHS to a list"
 msgstr ""
 
-#: src/main/subscript.c:53 src/main/subscript.c:75 src/main/subscript.c:180
-#: src/main/subscript.c:204
-msgid "attempt to select less than one element"
+#: src/main/subscript.c:59 src/main/subscript.c:81 src/main/subscript.c:185
+#: src/main/subscript.c:209
+#, c-format
+msgid "attempt to select less than one element in %s"
 msgstr ""
 
-#: src/main/subscript.c:57 src/main/subscript.c:72 src/main/subscript.c:178
-#: src/main/subscript.c:208 src/main/subscript.c:304
-msgid "attempt to select more than one element"
+#: src/main/subscript.c:63 src/main/subscript.c:78 src/main/subscript.c:183
+#: src/main/subscript.c:213 src/main/subscript.c:305
+#, c-format
+msgid "attempt to select more than one element in %s"
 msgstr ""
 
-#: src/main/subscript.c:184
+#: src/main/subscript.c:189
 msgid "internal error in use of recursive indexing"
 msgstr ""
 
-#: src/main/subscript.c:252
+#: src/main/subscript.c:257
 #, c-format
 msgid "further partial match of '%s' to '%s'"
 msgstr ""
 
-#: src/main/subscript.c:302
+#: src/main/subscript.c:303
 #, c-format
 msgid "recursive indexing failed at level %d\n"
 msgstr ""
 
-#: src/main/subscript.c:309
+#: src/main/subscript.c:313
 #, c-format
 msgid "no such index at level %d\n"
 msgstr ""
 
-#: src/main/subscript.c:352
+#: src/main/subscript.c:360
 msgid "incorrect number of columns in matrix subscript"
 msgstr ""
 
-#: src/main/subscript.c:371 src/main/subscript.c:389 src/main/subscript.c:413
+#: src/main/subscript.c:379 src/main/subscript.c:397 src/main/subscript.c:421
 msgid "negative values are not allowed in a matrix subscript"
 msgstr ""
 
-#: src/main/subscript.c:492
+#: src/main/subscript.c:500
 msgid "(subscript) logical subscript too long"
 msgstr ""
 
-#: src/main/subscript.c:590 src/main/subscript.c:645
+#: src/main/subscript.c:668 src/main/subscript.c:723
 msgid "only 0's may be mixed with negative subscripts"
 msgstr ""
 
-#: src/main/subscript.c:618
+#: src/main/subscript.c:696
 msgid "subscript too large for 32-bit R"
 msgstr ""
 
-#: src/main/subscript.c:817
+#: src/main/subscript.c:895
 msgid "no 'dimnames' attribute for array"
 msgstr ""
 
-#: src/main/subscript.c:857
+#: src/main/subscript.c:931
 msgid "subscripting on non-vector"
 msgstr ""
 
-#: src/main/subset.c:261
+#: src/main/subset.c:260
 msgid "dimensions would exceed maximum size of array"
 msgstr ""
 
-#: src/main/subset.c:304 src/main/subset.c:333
+#: src/main/subset.c:304 src/main/subset.c:334
 msgid "matrix subscripting not handled for this type"
 msgstr ""
 
-#: src/main/subset.c:488
+#: src/main/subset.c:493
 msgid "array subscripting not handled for this type"
 msgstr ""
 
-#: src/main/subset.c:827
+#: src/main/subset.c:856
 msgid "incorrect number of dimensions"
 msgstr ""
 
-#: src/main/subset.c:924
+#: src/main/subset.c:953
 msgid "no index specified"
 msgstr ""
 
-#: src/main/subset.c:934
+#: src/main/subset.c:963
 msgid "this S4 class is not subsettable"
 msgstr ""
 
-#: src/main/subset.c:940
+#: src/main/subset.c:970
 msgid "wrong arguments for subsetting an environment"
 msgstr ""
 
-#: src/main/summary.c:30
+#: src/main/summary.c:33
 #, c-format
 msgid "invalid 'type' (%s) of argument"
 msgstr ""
 
-#: src/main/summary.c:66 src/main/summary.c:78 src/main/summary.c:103
+#: src/main/summary.c:69 src/main/summary.c:81 src/main/summary.c:106
 msgid "integer overflow - use sum(as.numeric(.))"
 msgstr ""
 
-#: src/main/summary.c:522
+#: src/main/summary.c:526
 #, c-format
 msgid "internal error ('op = %d' in do_summary).\t Call a Guru"
 msgstr ""
 
-#: src/main/summary.c:623
+#: src/main/summary.c:637
 msgid "Integer overflow - use sum(as.numeric(.))"
 msgstr ""
 
-#: src/main/summary.c:731
+#: src/main/summary.c:750
 msgid "no non-missing arguments, returning NA"
 msgstr ""
 
-#: src/main/summary.c:734
+#: src/main/summary.c:753
 msgid "no non-missing arguments to min; returning Inf"
 msgstr ""
 
-#: src/main/summary.c:736
+#: src/main/summary.c:755
 msgid "no non-missing arguments to max; returning -Inf"
 msgstr ""
 
-#: src/main/summary.c:801
-msgid "non-numeric argument"
-msgstr ""
-
-#: src/main/summary.c:845
+#: src/main/summary.c:913
 msgid "argument to 'which' is not logical"
 msgstr ""
 
-#: src/main/summary.c:889
+#: src/main/summary.c:957
 msgid "no arguments"
 msgstr ""
 
-#: src/main/summary.c:900 src/main/summary.c:917
+#: src/main/summary.c:968 src/main/summary.c:985
 msgid "invalid input type"
 msgstr ""
 
-#: src/main/summary.c:934
+#: src/main/summary.c:1002
 msgid "an argument will be fractionally recycled"
 msgstr ""
 
-#: src/main/sysutils.c:69 src/main/sysutils.c:83
+#: src/main/sysutils.c:68 src/main/sysutils.c:82
 #, c-format
 msgid "cannot determine file modification time of '%s'"
 msgstr ""
 
-#: src/main/sysutils.c:167
+#: src/main/sysutils.c:166
 msgid "encoding of a filename cannot be 'bytes'"
 msgstr ""
 
-#: src/main/sysutils.c:170 src/main/sysutils.c:803 src/main/sysutils.c:818
-#: src/main/sysutils.c:909 src/main/sysutils.c:924 src/main/sysutils.c:1020
+#: src/main/sysutils.c:169 src/main/sysutils.c:831 src/main/sysutils.c:846
+#: src/main/sysutils.c:975
 #, c-format
 msgid "unsupported conversion from '%s' in codepage %d"
 msgstr ""
 
-#: src/main/sysutils.c:179
+#: src/main/sysutils.c:178
 msgid "file name conversion problem -- name too long?"
 msgstr ""
 
-#: src/main/sysutils.c:180
+#: src/main/sysutils.c:179
 msgid "file name conversion problem"
 msgstr ""
 
-#: src/main/sysutils.c:249
+#: src/main/sysutils.c:248
 msgid "invalid filename pattern"
 msgstr ""
 
-#: src/main/sysutils.c:253
+#: src/main/sysutils.c:252
 msgid "invalid file extension"
 msgstr ""
 
-#: src/main/sysutils.c:255
+#: src/main/sysutils.c:254
 msgid "no 'pattern'"
 msgstr ""
 
-#: src/main/sysutils.c:257
+#: src/main/sysutils.c:256
 msgid "no 'tempdir'"
 msgstr ""
 
-#: src/main/sysutils.c:259
+#: src/main/sysutils.c:258
 msgid "no 'fileext'"
 msgstr ""
 
-#: src/main/sysutils.c:345 src/main/sysutils.c:348 src/main/sysutils.c:439
-#: src/main/sysutils.c:441 src/main/sysutils.c:477
+#: src/main/sysutils.c:328
+#, c-format
+msgid "system call failed: %s"
+msgstr ""
+
+#: src/main/sysutils.c:357 src/main/sysutils.c:360 src/main/sysutils.c:451
+#: src/main/sysutils.c:453 src/main/sysutils.c:489
 msgid "wrong type for argument"
 msgstr ""
 
-#: src/main/sysutils.c:443
+#: src/main/sysutils.c:455
 msgid "wrong length for argument"
 msgstr ""
 
-#: src/main/sysutils.c:464
+#: src/main/sysutils.c:476
 msgid "'Sys.setenv' is not available on this system"
 msgstr ""
 
-#: src/main/sysutils.c:508
+#: src/main/sysutils.c:520
 msgid "this system cannot unset environment variables: setting to \"\""
 msgstr ""
 
-#: src/main/sysutils.c:519
+#: src/main/sysutils.c:531
 msgid "'Sys.unsetenv' is not available on this system"
 msgstr ""
 
-#: src/main/sysutils.c:616
+#: src/main/sysutils.c:628
 #, c-format
 msgid "unsupported conversion from '%s' to '%s' in codepage %d"
 msgstr ""
 
-#: src/main/sysutils.c:631
+#: src/main/sysutils.c:643
 msgid "'x' must be a character vector"
 msgstr ""
 
-#: src/main/sysutils.c:646
-msgid "'x' must be a list of NULL or raw vectors"
+#: src/main/sysutils.c:658
+msgid "'x' must be a character vector or a list of NULL or raw vectors"
 msgstr ""
 
-#: src/main/sysutils.c:724 src/main/sysutils.c:789 src/main/sysutils.c:895
-#: src/main/sysutils.c:994 src/main/sysutils.c:1010 src/main/sysutils.c:1087
+#: src/main/sysutils.c:736 src/main/sysutils.c:914 src/main/sysutils.c:932
+#: src/main/sysutils.c:949 src/main/sysutils.c:965 src/main/sysutils.c:1042
 #, c-format
 msgid "'%s' must be called on a CHARSXP"
 msgstr ""
 
-#: src/main/sysutils.c:792 src/main/sysutils.c:898 src/main/sysutils.c:1015
-#: src/main/sysutils.c:1090
+#: src/main/sysutils.c:805 src/main/sysutils.c:970 src/main/sysutils.c:1045
 msgid "translating strings with \"bytes\" encoding is not allowed"
 msgstr ""
 
-#: src/main/sysutils.c:1116
+#: src/main/sysutils.c:818
+msgid "internal error: no translation needed"
+msgstr ""
+
+#: src/main/sysutils.c:1071
 #, c-format
 msgid "unsupported conversion to '%s' from codepage %d"
 msgstr ""
 
-#: src/main/sysutils.c:1530
+#: src/main/sysutils.c:1486
 #, c-format
 msgid "invalid Unicode point %u"
 msgstr ""
 
-#: src/main/sysutils.c:1632
+#: src/main/sysutils.c:1588
 msgid "cannot create 'R_TempDir'"
 msgstr ""
 
-#: src/main/sysutils.c:1636 src/main/sysutils.c:1644 src/main/sysutils.c:1647
+#: src/main/sysutils.c:1592 src/main/sysutils.c:1600 src/main/sysutils.c:1603
 msgid "unable to set R_SESSION_TMPDIR"
 msgstr ""
 
-#: src/main/sysutils.c:1656
+#: src/main/sysutils.c:1612
 msgid "cannot allocate 'R_TempDir'"
 msgstr ""
 
-#: src/main/sysutils.c:1693
+#: src/main/sysutils.c:1649
 msgid "temporary name too long"
 msgstr ""
 
-#: src/main/sysutils.c:1708
+#: src/main/sysutils.c:1664
 msgid "cannot find unused tempfile name"
 msgstr ""
 
-#: src/main/sysutils.c:1711
+#: src/main/sysutils.c:1667
 msgid "allocation failed in R_tmpnam2"
 msgstr ""
 
-#: src/main/sysutils.c:1838
+#: src/main/sysutils.c:1794
 msgid "'dirmark = TRUE' is not supported on this platform"
 msgstr ""
 
@@ -6003,193 +6064,199 @@ msgid "length %d is too large for hashing"
 msgstr ""
 
 #: src/main/unique.c:490 src/main/unique.c:519 src/main/unique.c:549
-#: src/main/unique.c:575 src/main/unique.c:614
+#: src/main/unique.c:573 src/main/unique.c:612
 msgid "'duplicated' applies only to vectors"
 msgstr ""
 
-#: src/main/unique.c:619
+#: src/main/unique.c:617
 msgid "any_duplicated3(., <0-length incomp>)"
 msgstr ""
 
-#: src/main/unique.c:669
+#: src/main/unique.c:667
 msgid "'fromLast' must be length 1"
 msgstr ""
 
-#: src/main/unique.c:672
+#: src/main/unique.c:670
 msgid "'fromLast' must be TRUE or FALSE"
 msgstr ""
 
-#: src/main/unique.c:683
+#: src/main/unique.c:681
 #, c-format
 msgid "%s() applies only to vectors"
 msgstr ""
 
-#: src/main/unique.c:690
+#: src/main/unique.c:688
 msgid "'nmax' must be positive"
 msgstr ""
 
-#: src/main/unique.c:922
+#: src/main/unique.c:985
 msgid "'match' requires vector arguments"
 msgstr ""
 
-#: src/main/unique.c:970 src/main/unique.c:1125
+#: src/main/unique.c:1033 src/main/unique.c:1171
 msgid "argument is not of mode character"
 msgstr ""
 
-#: src/main/unique.c:1251
+#: src/main/unique.c:1296
 msgid "... used in a situation where it does not exist"
 msgstr ""
 
-#: src/main/unique.c:1342
-msgid "unable to find a closure from within which 'match.call' was called"
+#: src/main/unique.c:1302
+msgid "... is not a pairlist"
 msgstr ""
 
-#: src/main/unique.c:1536
+#: src/main/unique.c:1531
 msgid "non-numeric data frame in rowsum"
 msgstr ""
 
-#: src/main/unique.c:1568
+#: src/main/unique.c:1563
 msgid "this cannot happen"
 msgstr ""
 
-#: src/main/unique.c:1639
+#: src/main/unique.c:1634
 msgid "'names' must be a character vector"
 msgstr ""
 
-#: src/main/unique.c:1643
-msgid "'sep' must be a character string"
-msgstr ""
-
-#: src/main/util.c:88 src/main/util.c:106
+#: src/main/util.c:87 src/main/util.c:105
 msgid "object is not a matrix"
 msgstr ""
 
-#: src/main/util.c:254 src/main/util.c:268 src/main/util.c:285
+#: src/main/util.c:303 src/main/util.c:315 src/main/util.c:326
+#: src/main/util.c:341
 #, c-format
 msgid "type %d is unimplemented in '%s'"
 msgstr ""
 
-#: src/main/util.c:297
+#: src/main/util.c:352
 #, c-format
 msgid "unimplemented type '%s' in '%s'\n"
 msgstr ""
 
-#: src/main/util.c:299
+#: src/main/util.c:354
 #, c-format
 msgid "unimplemented type (%d) in '%s'\n"
 msgstr ""
 
-#: src/main/util.c:424
+#: src/main/util.c:479
 msgid "invalid tag in name extraction"
 msgstr ""
 
-#: src/main/util.c:434
+#: src/main/util.c:489
 #, c-format
 msgid "%d argument passed to .Internal(%s) which requires %d"
 msgid_plural "%d arguments passed to .Internal(%s) which requires %d"
 msgstr[0] ""
 msgstr[1] ""
 
-#: src/main/util.c:440
+#: src/main/util.c:495
 #, c-format
 msgid "%d argument passed to '%s' which requires %d"
 msgid_plural "%d arguments passed to '%s' which requires %d"
 msgstr[0] ""
 msgstr[1] ""
 
-#: src/main/util.c:455
+#: src/main/util.c:510
 #, c-format
 msgid "supplied argument name '%s' does not match '%s'"
 msgstr ""
 
-#: src/main/util.c:465
+#: src/main/util.c:520
 #, c-format
 msgid "'nthcdr' list shorter than %d"
 msgstr ""
 
-#: src/main/util.c:470
+#: src/main/util.c:525
 msgid "'nthcdr' needs a list to CDR down"
 msgstr ""
 
-#: src/main/util.c:586
+#: src/main/util.c:641
 msgid "'all.x' must be TRUE or FALSE"
 msgstr ""
 
-#: src/main/util.c:588
+#: src/main/util.c:643
 msgid "'all.y' must be TRUE or FALSE"
 msgstr ""
 
-#: src/main/util.c:700
+#: src/main/util.c:672
+msgid "number of rows in the result exceeds maximum vector length"
+msgstr ""
+
+#: src/main/util.c:764
 msgid "missing value is invalid"
 msgstr ""
 
-#: src/main/util.c:709 src/main/util.c:716
+#: src/main/util.c:773 src/main/util.c:780
 msgid "cannot change working directory"
 msgstr ""
 
-#: src/main/util.c:735 src/main/util.c:769 src/main/util.c:810
-#: src/main/util.c:852 src/main/util.c:981 src/main/util.c:1040
-#: src/main/util.c:1063
+#: src/main/util.c:800 src/main/util.c:834 src/main/util.c:875
+#: src/main/util.c:917 src/main/util.c:1046 src/main/util.c:1105
+#: src/main/util.c:1128
 msgid "a character vector argument expected"
 msgstr ""
 
-#: src/main/util.c:742 src/main/util.c:777 src/main/util.c:819
-#: src/main/util.c:860
+#: src/main/util.c:807 src/main/util.c:842 src/main/util.c:884
+#: src/main/util.c:925
 msgid "path too long"
 msgstr ""
 
-#: src/main/util.c:995
+#: src/main/util.c:1060
 msgid "only the first character of 'quote' will be used"
 msgstr ""
 
-#: src/main/util.c:1065
+#: src/main/util.c:1130
 msgid "a character vector 'value' expected"
 msgstr ""
 
-#: src/main/util.c:1068
+#: src/main/util.c:1133
 msgid "'value' must be of positive length"
 msgstr ""
 
-#: src/main/util.c:1197 src/main/util.c:1205
+#: src/main/util.c:1262 src/main/util.c:1270
 #, c-format
 msgid "invalid input '%s' in 'utf8towcs'"
 msgstr ""
 
-#: src/main/util.c:1290
+#: src/main/util.c:1355
 #, c-format
 msgid "invalid multibyte string at '%s'"
 msgstr ""
 
-#: src/main/util.c:1399
+#: src/main/util.c:1497
 msgid "error message truncated to 255 chars"
 msgstr ""
 
-#: src/main/util.c:1412
+#: src/main/util.c:1510
 msgid "warning message truncated to 255 chars"
 msgstr ""
 
-#: src/main/util.c:1819
+#: src/main/util.c:1659
+#, c-format
+msgid "accuracy loss in conversion from \"%s\" to numeric"
+msgstr ""
+
+#: src/main/util.c:1969
 msgid "all arguments must be named"
 msgstr ""
 
-#: src/main/util.c:1893
+#: src/main/util.c:2091
 msgid "ICU is not supported on this build"
 msgstr ""
 
-#: src/main/util.c:1954
+#: src/main/util.c:2158
 msgid "'breaks' is not sorted"
 msgstr ""
 
-#: src/main/util.c:1988 src/main/util.c:2034
+#: src/main/util.c:2192 src/main/util.c:2242
 #, c-format
 msgid "long vector '%s' is not supported"
 msgstr ""
 
-#: src/main/util.c:2087
+#: src/main/util.c:2296
 msgid "'eps.correct' must be 0, 1, or 2"
 msgstr ""
 
-#: src/main/util.c:2115
+#: src/main/util.c:2324
 msgid "'x' must be a vector"
 msgstr ""
 
@@ -6217,14 +6284,6 @@ msgid ""
 "\n"
 msgstr ""
 
-#: src/main/vfonts.c:50
-msgid "vfont routines cannot be accessed in module"
-msgstr ""
-
-#: src/main/vfonts.c:67 src/main/vfonts.c:80 src/main/vfonts.c:98
-msgid "Hershey fonts cannot be loaded"
-msgstr ""
-
 #: src/main/xspline.c:60
 #, c-format
 msgid "add_point - reached MAXNUMPTS (%d)"
@@ -6246,7 +6305,7 @@ msgstr ""
 msgid "There must be at least three control points"
 msgstr ""
 
-#: src/modules/X11/dataentry.c:1871 src/modules/X11/devX11.c:1246
+#: src/modules/X11/dataentry.c:1874 src/modules/X11/devX11.c:1248
 #, c-format
 msgid "X11 protocol error: %s"
 msgstr ""
@@ -6271,34 +6330,34 @@ msgstr ""
 "Error: X11 cannot allocate additional graphics colours.\n"
 "Consider using X11 with colortype=\"pseudo.cube\" or \"gray\"."
 
-#: src/modules/X11/devX11.c:1027
+#: src/modules/X11/devX11.c:1029
 msgid ""
 "could not find any X11 fonts\n"
 "Check that the Font Path is correct."
 msgstr ""
 
-#: src/modules/X11/devX11.c:1087
+#: src/modules/X11/devX11.c:1089
 #, c-format
 msgid "X11 used font size %d when %d was requested"
 msgstr ""
 
-#: src/modules/X11/devX11.c:1121
+#: src/modules/X11/devX11.c:1123
 #, c-format
 msgid "X11 font %s, face %d at size %d could not be loaded"
 msgstr ""
 
-#: src/modules/X11/devX11.c:1130
+#: src/modules/X11/devX11.c:1132
 msgid ""
 "semi-transparency is not supported on this device: reported only once per "
 "page"
 msgstr ""
 
-#: src/modules/X11/devX11.c:1254
+#: src/modules/X11/devX11.c:1256
 #, c-format
 msgid "X11 I/O error while opening X11 connection to '%s'"
 msgstr ""
 
-#: src/modules/X11/devX11.c:1272
+#: src/modules/X11/devX11.c:1273
 msgid "X11 fatal IO error: please save work and shut down R"
 msgstr ""
 
@@ -6419,206 +6478,264 @@ msgstr ""
 msgid "attempt to use the locator after dev.hold()"
 msgstr ""
 
-#: src/modules/X11/devX11.c:3111
+#: src/modules/X11/devX11.c:3117
 #, c-format
 msgid "unable to start device %s"
 msgstr ""
 
-#: src/modules/X11/devX11.c:3138
+#: src/modules/X11/devX11.c:3144
 msgid "invalid 'width' or 'height'"
 msgstr ""
 
-#: src/modules/X11/devX11.c:3145
+#: src/modules/X11/devX11.c:3151
 msgid "invalid colortype passed to X11 driver"
 msgstr ""
 
-#: src/modules/X11/devX11.c:3159
+#: src/modules/X11/devX11.c:3165
 msgid "unknown X11 color/colour model -- using monochrome"
 msgstr "unknown X11 colour model -- using monochrome"
 
-#: src/modules/X11/devX11.c:3249
+#: src/modules/X11/devX11.c:3255
 msgid "no plot on device to save"
 msgstr ""
 
-#: src/modules/X11/devX11.c:3251
+#: src/modules/X11/devX11.c:3257
 msgid "not an open X11cairo device"
 msgstr ""
 
-#: src/modules/X11/devX11.c:3260
+#: src/modules/X11/devX11.c:3266
 #, c-format
 msgid "cannot open file '%s'"
 msgstr ""
 
-#: src/modules/X11/devX11.c:3277
+#: src/modules/X11/devX11.c:3283
 msgid "savePlot() is not supported on this build"
 msgstr ""
 
-#: src/modules/X11/devX11.c:3317
+#: src/modules/X11/devX11.c:3323
 msgid "unable to contact X11 display"
 msgstr ""
 
-#: src/modules/X11/devX11.c:3366
+#: src/modules/X11/devX11.c:3372
 #, c-format
 msgid "clipboard cannot be read (error code %d)"
 msgstr ""
 
-#: src/modules/X11/devX11.c:3397
+#: src/modules/X11/devX11.c:3408
 msgid "cannot allocate memory for X11Routines structure"
 msgstr ""
 
-#: src/modules/internet/internet.c:188 src/modules/internet/internet.c:192
-#: src/modules/internet/internet.c:198 src/modules/internet/internet.c:210
+#: src/modules/internet/internet.c:113
+msgid "for https:// URLs use method = \"wininet\""
+msgstr ""
+
+#: src/modules/internet/internet.c:153 src/modules/internet/internet.c:274
+#: src/modules/internet/internet.c:758
+#, c-format
+msgid "scheme not supported in URL '%s'"
+msgstr ""
+
+#: src/modules/internet/internet.c:348 src/modules/internet/internet.c:352
+#: src/modules/internet/internet.c:357 src/modules/internet/internet.c:381
+#: src/modules/internet/libcurl.c:791 src/modules/internet/libcurl.c:795
+#: src/modules/internet/libcurl.c:801 src/modules/internet/libcurl.c:814
+#: src/modules/internet/libcurl.c:822
 msgid "allocation of url connection failed"
 msgstr ""
 
-#: src/modules/internet/internet.c:286
+#: src/modules/internet/internet.c:455
 msgid "only first element of 'url' argument used"
 msgstr ""
 
-#: src/modules/internet/internet.c:292
+#: src/modules/internet/internet.c:461
 msgid "only first element of 'destfile' argument used"
 msgstr ""
 
-#: src/modules/internet/internet.c:317
+#: src/modules/internet/internet.c:480 src/modules/internet/libcurl.c:499
 msgid "Download progress"
 msgstr ""
 
-#: src/modules/internet/internet.c:339
+#: src/modules/internet/internet.c:502
 #, c-format
 msgid "cannot open URL '%s', reason '%s'"
 msgstr ""
 
-#: src/modules/internet/internet.c:346 src/modules/internet/internet.c:372
-#: src/modules/internet/internet.c:474
+#: src/modules/internet/internet.c:509 src/modules/internet/internet.c:536
+#: src/modules/internet/internet.c:661
 #, c-format
 msgid "cannot open destfile '%s', reason '%s'"
 msgstr ""
 
-#: src/modules/internet/internet.c:377 src/modules/internet/internet.c:479
+#: src/modules/internet/internet.c:541 src/modules/internet/internet.c:666
+#: src/modules/internet/libcurl.c:530
 #, c-format
 msgid "trying URL '%s'\n"
 msgstr ""
 
-#: src/modules/internet/internet.c:384 src/modules/internet/internet.c:486
-msgid "opened URL\n"
+#: src/modules/internet/internet.c:640 src/modules/internet/internet.c:751
+#: src/modules/internet/libcurl.c:578
+#, c-format
+msgid "downloaded length %0.f != reported length %0.f"
 msgstr ""
 
-#: src/modules/internet/internet.c:455 src/modules/internet/internet.c:560
+#: src/modules/internet/internet.c:645 src/modules/internet/internet.c:756
 #, c-format
-msgid "downloaded length %d != reported length %d"
+msgid "cannot open URL '%s'"
 msgstr ""
 
-#: src/modules/internet/internet.c:460 src/modules/internet/internet.c:565
+#: src/modules/internet/internet.c:779 src/modules/internet/internet.c:944
 #, c-format
-msgid "cannot open URL '%s'"
+msgid "cannot open URL '%s': HTTP status was '%d %s'"
 msgstr ""
 
-#: src/modules/internet/internet.c:593 src/modules/internet/internet.c:828
+#: src/modules/internet/internet.c:915 src/modules/internet/internet.c:929
+#: src/modules/internet/internet.c:1019 src/modules/internet/internet.c:1028
 #, c-format
-msgid "cannot open: HTTP status was '%d %s'"
+msgid "InternetOpenUrl failed: '%s'"
 msgstr ""
 
-#: src/modules/internet/internet.c:772 src/modules/internet/internet.c:935
-msgid "InternetOpenUrl timed out"
+#: src/modules/internet/libcurl.c:159
+#, c-format
+msgid "URL '%s': status was '%d %s'"
 msgstr ""
 
-#: src/modules/internet/internet.c:799 src/modules/internet/internet.c:813
-#: src/modules/internet/internet.c:957 src/modules/internet/internet.c:966
+#: src/modules/internet/libcurl.c:163
 #, c-format
-msgid "InternetOpenUrl failed: '%s'"
+msgid "URL '%s': status was '%s'"
+msgstr ""
+
+#: src/modules/internet/libcurl.c:240
+msgid "curlGetHeaders is not supported on this platform"
+msgstr ""
+
+#: src/modules/internet/libcurl.c:249 src/modules/internet/libcurl.c:252
+#, fuzzy, c-format
+msgid "invalid %s argument"
+msgstr "invalid hcl colour"
+
+#: src/modules/internet/libcurl.c:269
+#, c-format
+msgid ""
+"libcurl error code %d\n"
+"\t%s\n"
+msgstr ""
+
+#: src/modules/internet/libcurl.c:404
+msgid "download.file(method = \"libcurl\") is not supported on this platform"
+msgstr ""
+
+#: src/modules/internet/libcurl.c:420
+msgid "lengths of 'url' and 'destfile' must match"
+msgstr ""
+
+#: src/modules/internet/libcurl.c:481
+#, c-format
+msgid "URL %s: cannot open destfile '%s', reason '%s'"
 msgstr ""
 
-#: src/modules/internet/internet.c:870
-msgid "Internet read timed out"
+#: src/modules/internet/libcurl.c:593
+msgid "cannot download all files"
 msgstr ""
 
-#: src/modules/internet/nanoftp.c:288 src/modules/internet/nanoftp.c:301
-#: src/modules/internet/nanoftp.c:312 src/modules/internet/nanoftp.c:346
-#: src/modules/internet/nanoftp.c:356
+#: src/modules/internet/libcurl.c:727
+msgid "cannot read from connection"
+msgstr ""
+
+#: src/modules/internet/libcurl.c:763
+msgid "cannot open connection"
+msgstr ""
+
+#: src/modules/internet/libcurl.c:826
+msgid "url(method = \"libcurl\") is not supported on this platform"
+msgstr ""
+
+#: src/modules/internet/nanoftp.c:289 src/modules/internet/nanoftp.c:302
+#: src/modules/internet/nanoftp.c:313 src/modules/internet/nanoftp.c:347
+#: src/modules/internet/nanoftp.c:357
 msgid "RxmlNanoFTPScanURL: overlong (invalid?) URL"
 msgstr ""
 
-#: src/modules/internet/nanoftp.c:389
+#: src/modules/internet/nanoftp.c:390
 msgid "removing FTP proxy info"
 msgstr ""
 
-#: src/modules/internet/nanoftp.c:391
+#: src/modules/internet/nanoftp.c:392
 #, c-format
 msgid "using FTP proxy '%s'"
 msgstr ""
 
-#: src/modules/internet/nanoftp.c:402 src/modules/internet/nanoftp.c:431
+#: src/modules/internet/nanoftp.c:403 src/modules/internet/nanoftp.c:432
 msgid "RxmlNanoFTPScanProxy: overlong (invalid?) URL"
 msgstr ""
 
-#: src/modules/internet/nanoftp.c:830
+#: src/modules/internet/nanoftp.c:833
 msgid "cannot resolve host"
 msgstr ""
 
-#: src/modules/internet/nanoftp.c:860
+#: src/modules/internet/nanoftp.c:863
 msgid "failed to connect to server"
 msgstr ""
 
-#: src/modules/internet/nanoftp.c:871
+#: src/modules/internet/nanoftp.c:874
 msgid "failed to get response from server"
 msgstr ""
 
-#: src/modules/internet/nanoftp.c:1134
+#: src/modules/internet/nanoftp.c:1137
 msgid "RxmlNanoFTPGetConnection: failed to create socket"
 msgstr ""
 
-#: src/modules/internet/nanoftp.c:1180
+#: src/modules/internet/nanoftp.c:1183
 msgid "failed to create a data connection"
 msgstr ""
 
-#: src/modules/internet/nanoftp.c:1188
+#: src/modules/internet/nanoftp.c:1191
 msgid "failed to bind a port"
 msgstr ""
 
-#: src/modules/internet/nanoftp.c:1195
+#: src/modules/internet/nanoftp.c:1198
 #, c-format
 msgid "could not listen on port %d"
 msgstr ""
 
-#: src/modules/internet/nanohttp.c:370 src/modules/internet/nanohttp.c:398
-#: src/modules/internet/nanohttp.c:407
+#: src/modules/internet/nanohttp.c:369 src/modules/internet/nanohttp.c:400
+#: src/modules/internet/nanohttp.c:412
 msgid "RxmlNanoHTTPScanURL: overlong (invalid?) URL"
 msgstr ""
 
-#: src/modules/internet/nanohttp.c:441
+#: src/modules/internet/nanohttp.c:446
 msgid "removing HTTP proxy info"
 msgstr ""
 
-#: src/modules/internet/nanohttp.c:443
+#: src/modules/internet/nanohttp.c:448
 #, c-format
 msgid "using HTTP proxy '%s'"
 msgstr ""
 
-#: src/modules/internet/nanohttp.c:454 src/modules/internet/nanohttp.c:490
+#: src/modules/internet/nanohttp.c:459 src/modules/internet/nanohttp.c:497
 msgid "RxmlNanoHTTPScanProxy: overlong (invalid?) URL"
 msgstr ""
 
-#: src/modules/internet/nanohttp.c:1107
+#: src/modules/internet/nanohttp.c:1135
 #, c-format
 msgid "unable to resolve '%s'"
 msgstr ""
 
-#: src/modules/internet/nanohttp.c:1134
+#: src/modules/internet/nanohttp.c:1168
 #, c-format
 msgid "connected to '%s' on port %d."
 msgstr ""
 
-#: src/modules/internet/nanohttp.c:1139
+#: src/modules/internet/nanohttp.c:1173
 #, c-format
 msgid "unable to connect to '%s' on port %d."
 msgstr ""
 
-#: src/modules/internet/nanohttp.c:1443
+#: src/modules/internet/nanohttp.c:1477
 #, c-format
 msgid "redirect to: '%s'"
 msgstr ""
 
-#: src/modules/internet/nanohttp.c:1454
+#: src/modules/internet/nanohttp.c:1488
 msgid "too many redirects, aborting ..."
 msgstr ""
 
@@ -6651,11 +6768,11 @@ msgstr ""
 #: src/modules/lapack/Lapack.c:730 src/modules/lapack/Lapack.c:779
 #: src/modules/lapack/Lapack.c:786 src/modules/lapack/Lapack.c:834
 #: src/modules/lapack/Lapack.c:840 src/modules/lapack/Lapack.c:894
-#: src/modules/lapack/Lapack.c:900 src/modules/lapack/Lapack.c:1134
-#: src/modules/lapack/Lapack.c:1140 src/modules/lapack/Lapack.c:1188
-#: src/modules/lapack/Lapack.c:1195 src/modules/lapack/Lapack.c:1199
-#: src/modules/lapack/Lapack.c:1227 src/modules/lapack/Lapack.c:1234
-#: src/modules/lapack/Lapack.c:1254
+#: src/modules/lapack/Lapack.c:900 src/modules/lapack/Lapack.c:1135
+#: src/modules/lapack/Lapack.c:1141 src/modules/lapack/Lapack.c:1189
+#: src/modules/lapack/Lapack.c:1196 src/modules/lapack/Lapack.c:1200
+#: src/modules/lapack/Lapack.c:1228 src/modules/lapack/Lapack.c:1235
+#: src/modules/lapack/Lapack.c:1255
 #, c-format
 msgid "error code %d from Lapack routine '%s'"
 msgstr ""
@@ -6735,28 +6852,28 @@ msgstr ""
 msgid "'a' must be a complex matrix"
 msgstr ""
 
-#: src/modules/lapack/Lapack.c:535 src/modules/lapack/Lapack.c:1042
+#: src/modules/lapack/Lapack.c:535 src/modules/lapack/Lapack.c:1043
 msgid "'a' is 0-diml"
 msgstr ""
 
-#: src/modules/lapack/Lapack.c:537 src/modules/lapack/Lapack.c:1044
+#: src/modules/lapack/Lapack.c:537 src/modules/lapack/Lapack.c:1045
 #, c-format
 msgid "'a' (%d x %d) must be square"
 msgstr ""
 
-#: src/modules/lapack/Lapack.c:543 src/modules/lapack/Lapack.c:1050
+#: src/modules/lapack/Lapack.c:543 src/modules/lapack/Lapack.c:1051
 msgid "no right-hand side in 'b'"
 msgstr ""
 
 #: src/modules/lapack/Lapack.c:546 src/modules/lapack/Lapack.c:560
-#: src/modules/lapack/Lapack.c:1053 src/modules/lapack/Lapack.c:1069
+#: src/modules/lapack/Lapack.c:1054 src/modules/lapack/Lapack.c:1070
 #, c-format
 msgid "'b' (%d x %d) must be compatible with 'a' (%d x %d)"
 msgstr ""
 
 #: src/modules/lapack/Lapack.c:581 src/modules/lapack/Lapack.c:948
-#: src/modules/lapack/Lapack.c:962 src/modules/lapack/Lapack.c:1017
-#: src/modules/lapack/Lapack.c:1091
+#: src/modules/lapack/Lapack.c:962 src/modules/lapack/Lapack.c:1018
+#: src/modules/lapack/Lapack.c:1092
 #, c-format
 msgid "argument %d of Lapack routine %s had invalid value"
 msgstr ""
@@ -6766,7 +6883,7 @@ msgid "'b' must be a complex matrix"
 msgstr ""
 
 #: src/modules/lapack/Lapack.c:670 src/modules/lapack/Lapack.c:716
-#: src/modules/lapack/Lapack.c:1181 src/modules/lapack/Lapack.c:1220
+#: src/modules/lapack/Lapack.c:1182 src/modules/lapack/Lapack.c:1221
 #, c-format
 msgid "right-hand side should have %d not %d rows"
 msgstr ""
@@ -6783,13 +6900,13 @@ msgstr ""
 msgid "'x' must be a square complex matrix"
 msgstr ""
 
-#: src/modules/lapack/Lapack.c:926 src/modules/lapack/Lapack.c:1000
-#: src/modules/lapack/Lapack.c:1039 src/modules/lapack/Lapack.c:1114
-#: src/modules/lapack/Lapack.c:1245
+#: src/modules/lapack/Lapack.c:926 src/modules/lapack/Lapack.c:1001
+#: src/modules/lapack/Lapack.c:1040 src/modules/lapack/Lapack.c:1115
+#: src/modules/lapack/Lapack.c:1246
 msgid "'a' must be a numeric matrix"
 msgstr ""
 
-#: src/modules/lapack/Lapack.c:933 src/modules/lapack/Lapack.c:1250
+#: src/modules/lapack/Lapack.c:933 src/modules/lapack/Lapack.c:1251
 msgid "'a' must be a square matrix"
 msgstr ""
 
@@ -6806,40 +6923,40 @@ msgstr ""
 msgid "the matrix is either rank-deficient or indefinite"
 msgstr ""
 
-#: src/modules/lapack/Lapack.c:987
+#: src/modules/lapack/Lapack.c:988
 msgid "'size' argument must be a positive integer"
 msgstr ""
 
-#: src/modules/lapack/Lapack.c:1002
+#: src/modules/lapack/Lapack.c:1003
 #, c-format
 msgid "'size' cannot exceed ncol(x) = %d"
 msgstr ""
 
-#: src/modules/lapack/Lapack.c:1003
+#: src/modules/lapack/Lapack.c:1004
 #, c-format
 msgid "'size' cannot exceed nrow(x) = %d"
 msgstr ""
 
-#: src/modules/lapack/Lapack.c:1015
+#: src/modules/lapack/Lapack.c:1016
 #, c-format
 msgid "element (%d, %d) is zero, so the inverse cannot be computed"
 msgstr ""
 
-#: src/modules/lapack/Lapack.c:1094
+#: src/modules/lapack/Lapack.c:1095
 #, c-format
 msgid "Lapack routine %s: system is exactly singular: U[%d,%d] = 0"
 msgstr ""
 
-#: src/modules/lapack/Lapack.c:1102
+#: src/modules/lapack/Lapack.c:1103
 #, c-format
 msgid "system is computationally singular: reciprocal condition number = %g"
 msgstr ""
 
-#: src/modules/lapack/Lapack.c:1174 src/modules/lapack/Lapack.c:1212
+#: src/modules/lapack/Lapack.c:1175 src/modules/lapack/Lapack.c:1213
 msgid "'b' must be a numeric matrix"
 msgstr ""
 
-#: src/modules/lapack/Lapack.c:1246
+#: src/modules/lapack/Lapack.c:1247
 msgid "argument 'logarithm' must be logical"
 msgstr ""
 
@@ -6849,7 +6966,7 @@ msgstr ""
 
 #: src/nmath/bessel_i.c:77 src/nmath/bessel_i.c:122
 #, c-format
-msgid "bessel_i(%g): ncalc (=%ld) != nb (=%ld); alpha=%g. Arg. out of range?\n"
+msgid "bessel_i(%g): ncalc (=%d) != nb (=%d); alpha=%g. Arg. out of range?\n"
 msgstr ""
 
 #: src/nmath/bessel_i.c:80 src/nmath/bessel_i.c:125
@@ -6857,16 +6974,21 @@ msgstr ""
 msgid "bessel_i(%g,nu=%g): precision lost in result\n"
 msgstr ""
 
-#: src/nmath/bessel_j.c:67
+#: src/nmath/bessel_j.c:64 src/nmath/bessel_j.c:118
+#, c-format
+msgid "besselJ(x, nu): nu=%g too large for bessel_j() algorithm"
+msgstr ""
+
+#: src/nmath/bessel_j.c:72
 msgid "bessel_j allocation error"
 msgstr ""
 
-#: src/nmath/bessel_j.c:75 src/nmath/bessel_j.c:118
+#: src/nmath/bessel_j.c:80 src/nmath/bessel_j.c:127
 #, c-format
-msgid "bessel_j(%g): ncalc (=%ld) != nb (=%ld); alpha=%g. Arg. out of range?\n"
+msgid "bessel_j(%g): ncalc (=%d) != nb (=%d); alpha=%g. Arg. out of range?\n"
 msgstr ""
 
-#: src/nmath/bessel_j.c:78 src/nmath/bessel_j.c:121
+#: src/nmath/bessel_j.c:83 src/nmath/bessel_j.c:130
 #, c-format
 msgid "bessel_j(%g,nu=%g): precision lost in result\n"
 msgstr ""
@@ -6877,7 +6999,7 @@ msgstr ""
 
 #: src/nmath/bessel_k.c:71 src/nmath/bessel_k.c:108
 #, c-format
-msgid "bessel_k(%g): ncalc (=%ld) != nb (=%ld); alpha=%g. Arg. out of range?\n"
+msgid "bessel_k(%g): ncalc (=%d) != nb (=%d); alpha=%g. Arg. out of range?\n"
 msgstr ""
 
 #: src/nmath/bessel_k.c:74 src/nmath/bessel_k.c:111
@@ -6885,16 +7007,21 @@ msgstr ""
 msgid "bessel_k(%g,nu=%g): precision lost in result\n"
 msgstr ""
 
-#: src/nmath/bessel_y.c:66
+#: src/nmath/bessel_y.c:63 src/nmath/bessel_y.c:125
+#, c-format
+msgid "besselY(x, nu): nu=%g too large for bessel_y() algorithm"
+msgstr ""
+
+#: src/nmath/bessel_y.c:71
 msgid "bessel_y allocation error"
 msgstr ""
 
-#: src/nmath/bessel_y.c:82 src/nmath/bessel_y.c:127
+#: src/nmath/bessel_y.c:87 src/nmath/bessel_y.c:136
 #, c-format
-msgid "bessel_y(%g): ncalc (=%ld) != nb (=%ld); alpha=%g. Arg. out of range?\n"
+msgid "bessel_y(%g): ncalc (=%d) != nb (=%d); alpha=%g. Arg. out of range?\n"
 msgstr ""
 
-#: src/nmath/bessel_y.c:85 src/nmath/bessel_y.c:130
+#: src/nmath/bessel_y.c:90 src/nmath/bessel_y.c:139
 #, c-format
 msgid "bessel_y(%g,nu=%g): precision lost in result\n"
 msgstr ""
@@ -6904,42 +7031,42 @@ msgstr ""
 msgid "'k' (%.2f) must be integer, rounded to %.0f"
 msgstr ""
 
-#: src/nmath/nmath.h:141
+#: src/nmath/nmath.h:156
 #, c-format
 msgid "argument out of domain in '%s'\n"
 msgstr ""
 
-#: src/nmath/nmath.h:144
+#: src/nmath/nmath.h:159
 #, c-format
 msgid "value out of range in '%s'\n"
 msgstr ""
 
-#: src/nmath/nmath.h:147
+#: src/nmath/nmath.h:162
 #, c-format
 msgid "convergence failed in '%s'\n"
 msgstr ""
 
-#: src/nmath/nmath.h:150
+#: src/nmath/nmath.h:165
 #, c-format
 msgid "full precision may not have been achieved in '%s'\n"
 msgstr ""
 
-#: src/nmath/nmath.h:153
+#: src/nmath/nmath.h:168
 #, c-format
 msgid "underflow occurred in '%s'\n"
 msgstr ""
 
-#: src/nmath/pbeta.c:48
+#: src/nmath/pbeta.c:64
 #, c-format
-msgid "pbeta_raw() -> bratio() gave error code %d"
+msgid "pbeta_raw(%g, a=%g, b=%g, ..) -> bratio() gave error code %d"
 msgstr ""
 
-#: src/nmath/pnbinom.c:79
+#: src/nmath/pnbinom.c:82
 #, c-format
 msgid "pnbinom_mu() -> bratio() gave error code %d"
 msgstr ""
 
-#: src/nmath/pnchisq.c:246
+#: src/nmath/pnchisq.c:295
 #, c-format
 msgid "pnchisq(x=%g, ..): not converged in %d iter."
 msgstr ""
@@ -6981,7 +7108,7 @@ msgstr ""
 msgid "X11 module cannot be loaded"
 msgstr ""
 
-#: src/unix/X11.c:126 src/unix/X11.c:132 src/unix/X11.c:138 src/unix/X11.c:144
+#: src/unix/X11.c:144 src/unix/X11.c:150 src/unix/X11.c:156 src/unix/X11.c:162
 msgid "X11 is not available"
 msgstr ""
 
@@ -7007,7 +7134,7 @@ msgid ""
 "Explicit lazy dynamic loading not supported on this platform. Using default."
 msgstr ""
 
-#: src/unix/dynload.c:240
+#: src/unix/dynload.c:232
 msgid "cannot get working directory!"
 msgstr ""
 
@@ -7021,94 +7148,94 @@ msgid ""
 "report using bug.report()"
 msgstr ""
 
-#: src/unix/sys-std.c:1082 src/unix/sys-std.c:1249
+#: src/unix/sys-std.c:1085 src/unix/sys-std.c:1255
 #, c-format
 msgid "problem in saving the history file '%s'"
 msgstr ""
 
-#: src/unix/sys-std.c:1156
+#: src/unix/sys-std.c:1162
 #, c-format
 msgid ""
 "Cannot open file '%s': %s\n"
 "\n"
 msgstr ""
 
-#: src/unix/sys-std.c:1220 src/unix/sys-std.c:1243
+#: src/unix/sys-std.c:1226 src/unix/sys-std.c:1249
 msgid "'file' argument is too long"
 msgstr ""
 
-#: src/unix/sys-std.c:1226 src/unix/sys-std.c:1228
+#: src/unix/sys-std.c:1232 src/unix/sys-std.c:1234
 msgid "no history mechanism available"
 msgstr ""
 
-#: src/unix/sys-std.c:1255
+#: src/unix/sys-std.c:1261
 msgid "problem in truncating the history file"
 msgstr ""
 
-#: src/unix/sys-std.c:1257 src/unix/sys-std.c:1259
+#: src/unix/sys-std.c:1263 src/unix/sys-std.c:1265
 msgid "no history available to save"
 msgstr ""
 
-#: src/unix/sys-std.c:1271
+#: src/unix/sys-std.c:1277
 msgid "invalid timestamp"
 msgstr ""
 
-#: src/unix/sys-unix.c:251
+#: src/unix/sys-unix.c:248
 msgid "non-empty character argument expected"
 msgstr ""
 
-#: src/unix/sys-unix.c:254
+#: src/unix/sys-unix.c:251
 msgid "'intern' must be logical and not NA"
 msgstr ""
 
-#: src/unix/sys-unix.c:266
+#: src/unix/sys-unix.c:269
 #, c-format
 msgid "cannot popen '%s', probable reason '%s'"
 msgstr ""
 
-#: src/unix/sys-unix.c:271
+#: src/unix/sys-unix.c:279
 #, c-format
 msgid "line %d may be truncated in call to system(, intern = TRUE)"
 msgstr ""
 
-#: src/unix/sys-unix.c:288
+#: src/unix/sys-unix.c:301
 #, c-format
 msgid "error in running command: '%s'"
 msgstr ""
 
-#: src/unix/sys-unix.c:290
+#: src/unix/sys-unix.c:303
 msgid "error in running command"
 msgstr ""
 
-#: src/unix/sys-unix.c:294
+#: src/unix/sys-unix.c:307
 #, c-format
 msgid "running command '%s' had status %d and error message '%s'"
 msgstr ""
 
-#: src/unix/sys-unix.c:399
+#: src/unix/sys-unix.c:412
 msgid "Sys.info() is not implemented on this system"
 msgstr ""
 
-#: src/unix/system.c:257
+#: src/unix/system.c:267
 #, c-format
 msgid "WARNING: --gui or -g without value ignored"
 msgstr ""
 
-#: src/unix/system.c:275
+#: src/unix/system.c:285
 #, c-format
 msgid "WARNING: unknown gui '%s', using X11\n"
 msgstr ""
 
-#: src/unix/system.c:278
+#: src/unix/system.c:288
 #, c-format
 msgid "WARNING: unknown gui '%s', using none\n"
 msgstr ""
 
-#: src/unix/system.c:388
+#: src/unix/system.c:373
 msgid "creating temporary file for '-e' failed"
 msgstr ""
 
-#: src/unix/system.c:469
+#: src/unix/system.c:454
 msgid "WARNING: Only editing the first in the list of files"
 msgstr ""
 
@@ -7140,9 +7267,6 @@ msgstr ""
 #~ msgid "color intensity %d, not in 0:255"
 #~ msgstr "colour intensity %d, not in 0:25"
 
-#~ msgid "invalid hsv color"
-#~ msgstr "invalid hcl colour"
-
 #~ msgid "invalid hcl color"
 #~ msgstr "invalid hcl colour"
 
diff --git a/src/library/base/po/es.po b/src/library/base/po/es.po
index 2ca6045..624f8fb 100644
--- a/src/library/base/po/es.po
+++ b/src/library/base/po/es.po
@@ -6,8 +6,8 @@
 msgid ""
 msgstr ""
 "Project-Id-Version: R 2.13.0\n"
-"Report-Msgid-Bugs-To: bugs.r-project.org\n"
-"POT-Creation-Date: 2014-03-27 07:46+0000\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2016-04-01 10:28-0700\n"
 "PO-Revision-Date: 2012-03-16 15:59+0100\n"
 "Last-Translator: \n"
 "Language-Team: Spanish <pabloemilio.verde at uni-duesseldorf.de>\n"
@@ -54,15 +54,15 @@ msgstr "La funci
 msgid "unknown type in \"CG\" method of 'optim'"
 msgstr "'type' desconocido en el m�todo CG de optim"
 
-#: src/appl/optim.c:665
+#: src/appl/optim.c:662
 msgid "REPORT must be > 0 (method = \"L-BFGS-B\")"
 msgstr "REPORT debe ser > 0 (m�todo = \"L-BFGS-B\")"
 
-#: src/appl/optim.c:688
+#: src/appl/optim.c:685
 msgid "L-BFGS-B needs finite values of 'fn'"
 msgstr "L-BFGS-B necesita valores finitos de 'fn'"
 
-#: src/appl/optim.c:744
+#: src/appl/optim.c:741
 msgid "trace, REPORT must be >= 0 (method = \"SANN\")"
 msgstr "trace, REPORT debe ser > 0 (m�todo = \"SANN\")"
 
@@ -127,122 +127,127 @@ msgstr "acceso a  '%ls' no permitido"
 msgid "problem in displaying '%ls'"
 msgstr "problemas al mostrar  '%ls'"
 
-#: src/gnuwin32/extra.c:116 src/gnuwin32/extra.c:159 src/gnuwin32/extra.c:349
-#: src/gnuwin32/extra.c:577 src/gnuwin32/extra.c:602 src/main/agrep.c:131
-#: src/main/agrep.c:135 src/main/agrep.c:775 src/main/agrep.c:780
-#: src/main/apply.c:293 src/main/apply.c:295 src/main/apply.c:298
-#: src/main/array.c:87 src/main/array.c:1137 src/main/array.c:1263
-#: src/main/array.c:1265 src/main/array.c:1266 src/main/array.c:1592
-#: src/main/array.c:1594 src/main/array.c:1596 src/main/attrib.c:196
+#: src/gnuwin32/extra.c:116 src/gnuwin32/extra.c:158 src/gnuwin32/extra.c:348
+#: src/gnuwin32/extra.c:574 src/gnuwin32/extra.c:599 src/main/agrep.c:131
+#: src/main/agrep.c:135 src/main/agrep.c:776 src/main/agrep.c:781
+#: src/main/apply.c:330 src/main/apply.c:332 src/main/apply.c:335
+#: src/main/array.c:90 src/main/array.c:1272 src/main/array.c:1411
+#: src/main/array.c:1413 src/main/array.c:1414 src/main/array.c:1758
+#: src/main/array.c:1760 src/main/array.c:1762 src/main/attrib.c:190
 #: src/main/builtin.c:88 src/main/builtin.c:97 src/main/builtin.c:116
-#: src/main/builtin.c:118 src/main/builtin.c:147 src/main/builtin.c:534
-#: src/main/builtin.c:550 src/main/builtin.c:739 src/main/builtin.c:741
-#: src/main/builtin.c:743 src/main/character.c:139 src/main/character.c:142
-#: src/main/character.c:203 src/main/character.c:1037
-#: src/main/character.c:1041 src/main/character.c:1276
-#: src/main/character.c:1280 src/main/character.c:1341
-#: src/main/character.c:1344 src/main/connections.c:1217
-#: src/main/connections.c:1223 src/main/connections.c:1226
-#: src/main/connections.c:1230 src/main/connections.c:1375
-#: src/main/connections.c:1391 src/main/connections.c:1396
-#: src/main/connections.c:1996 src/main/connections.c:2002
-#: src/main/connections.c:2006 src/main/connections.c:2010
-#: src/main/connections.c:2015 src/main/connections.c:2665
-#: src/main/connections.c:2670 src/main/connections.c:2673
-#: src/main/connections.c:2676 src/main/connections.c:3057
-#: src/main/connections.c:3062 src/main/connections.c:3068
-#: src/main/connections.c:3071 src/main/connections.c:3075
-#: src/main/connections.c:3090 src/main/connections.c:3140
-#: src/main/connections.c:3145 src/main/connections.c:3149
-#: src/main/connections.c:3153 src/main/connections.c:3157
-#: src/main/connections.c:3163 src/main/connections.c:3210
-#: src/main/connections.c:3216 src/main/connections.c:3220
-#: src/main/connections.c:3270 src/main/connections.c:3273
-#: src/main/connections.c:3547 src/main/connections.c:3550
-#: src/main/connections.c:3553 src/main/connections.c:3559
-#: src/main/connections.c:3666 src/main/connections.c:3672
-#: src/main/connections.c:3675 src/main/connections.c:3826
-#: src/main/connections.c:3829 src/main/connections.c:3833
-#: src/main/connections.c:3836 src/main/connections.c:3956
-#: src/main/connections.c:4074 src/main/connections.c:4077
-#: src/main/connections.c:4414 src/main/connections.c:4439
-#: src/main/connections.c:4474 src/main/connections.c:4489
-#: src/main/connections.c:4497 src/main/connections.c:4523
-#: src/main/connections.c:4669 src/main/connections.c:4673
-#: src/main/connections.c:4801 src/main/connections.c:4803
-#: src/main/connections.c:4805 src/main/connections.c:4833
-#: src/main/connections.c:4965 src/main/connections.c:4991
-#: src/main/connections.c:4995 src/main/connections.c:4999
-#: src/main/connections.c:5003 src/main/context.c:596 src/main/context.c:605
-#: src/main/context.c:609 src/main/datetime.c:775 src/main/datetime.c:865
-#: src/main/datetime.c:867 src/main/datetime.c:871 src/main/datetime.c:1026
-#: src/main/datetime.c:1028 src/main/datetime.c:1232 src/main/debug.c:228
-#: src/main/deparse.c:397 src/main/dotcode.c:478 src/main/dotcode.c:482
-#: src/main/dotcode.c:487 src/main/dounzip.c:322 src/main/dounzip.c:329
-#: src/main/dounzip.c:339 src/main/dounzip.c:344 src/main/dounzip.c:348
-#: src/main/dounzip.c:352 src/main/envir.c:1618 src/main/envir.c:1621
-#: src/main/envir.c:1742 src/main/envir.c:1747 src/main/envir.c:1813
-#: src/main/envir.c:1829 src/main/envir.c:1835 src/main/envir.c:1932
-#: src/main/envir.c:1940 src/main/envir.c:1947 src/main/envir.c:1958
-#: src/main/envir.c:2172 src/main/envir.c:2293 src/main/envir.c:2552
-#: src/main/envir.c:2762 src/main/envir.c:2776 src/main/envir.c:2783
-#: src/main/envir.c:2799 src/main/envir.c:3367 src/main/errors.c:1030
-#: src/main/eval.c:397 src/main/eval.c:406 src/main/eval.c:409
-#: src/main/grep.c:767 src/main/grep.c:772 src/main/grep.c:1061
-#: src/main/grep.c:1063 src/main/grep.c:1065 src/main/grep.c:1510
-#: src/main/grep.c:1514 src/main/grep.c:1519 src/main/grep.c:2323
-#: src/main/grep.c:2328 src/main/grep.c:2621 src/main/grep.c:2626
-#: src/main/memory.c:3736 src/main/paste.c:96 src/main/paste.c:395
-#: src/main/paste.c:402 src/main/paste.c:409 src/main/paste.c:414
-#: src/main/paste.c:419 src/main/paste.c:424 src/main/paste.c:427
-#: src/main/paste.c:435 src/main/paste.c:601 src/main/paste.c:606
+#: src/main/builtin.c:118 src/main/builtin.c:149 src/main/builtin.c:569
+#: src/main/builtin.c:585 src/main/builtin.c:773 src/main/builtin.c:775
+#: src/main/builtin.c:777 src/main/character.c:239 src/main/character.c:242
+#: src/main/character.c:247 src/main/character.c:788 src/main/character.c:791
+#: src/main/character.c:1289 src/main/character.c:1293
+#: src/main/character.c:1528 src/main/character.c:1532
+#: src/main/character.c:1593 src/main/character.c:1596
+#: src/main/connections.c:1208 src/main/connections.c:1214
+#: src/main/connections.c:1217 src/main/connections.c:1221
+#: src/main/connections.c:1367 src/main/connections.c:1383
+#: src/main/connections.c:1388 src/main/connections.c:1989
+#: src/main/connections.c:1995 src/main/connections.c:1999
+#: src/main/connections.c:2003 src/main/connections.c:2008
+#: src/main/connections.c:2659 src/main/connections.c:2664
+#: src/main/connections.c:2667 src/main/connections.c:2670
+#: src/main/connections.c:3053 src/main/connections.c:3058
+#: src/main/connections.c:3064 src/main/connections.c:3067
+#: src/main/connections.c:3071 src/main/connections.c:3086
+#: src/main/connections.c:3135 src/main/connections.c:3140
+#: src/main/connections.c:3144 src/main/connections.c:3148
+#: src/main/connections.c:3152 src/main/connections.c:3158
+#: src/main/connections.c:3203 src/main/connections.c:3209
+#: src/main/connections.c:3213 src/main/connections.c:3264
+#: src/main/connections.c:3267 src/main/connections.c:3543
+#: src/main/connections.c:3546 src/main/connections.c:3549
+#: src/main/connections.c:3555 src/main/connections.c:3662
+#: src/main/connections.c:3668 src/main/connections.c:3671
+#: src/main/connections.c:3823 src/main/connections.c:3826
+#: src/main/connections.c:3830 src/main/connections.c:3833
+#: src/main/connections.c:3954 src/main/connections.c:4085
+#: src/main/connections.c:4088 src/main/connections.c:4425
+#: src/main/connections.c:4450 src/main/connections.c:4485
+#: src/main/connections.c:4500 src/main/connections.c:4508
+#: src/main/connections.c:4534 src/main/connections.c:4680
+#: src/main/connections.c:4684 src/main/connections.c:4814
+#: src/main/connections.c:4816 src/main/connections.c:4818
+#: src/main/connections.c:4846 src/main/connections.c:4980
+#: src/main/connections.c:5019 src/main/connections.c:5024
+#: src/main/connections.c:5029 src/main/connections.c:5050
+#: src/main/context.c:607 src/main/context.c:616 src/main/context.c:620
+#: src/main/datetime.c:781 src/main/datetime.c:869 src/main/datetime.c:872
+#: src/main/datetime.c:876 src/main/datetime.c:1043 src/main/datetime.c:1045
+#: src/main/datetime.c:1250 src/main/debug.c:245 src/main/deparse.c:408
+#: src/main/dotcode.c:496 src/main/dotcode.c:500 src/main/dotcode.c:505
+#: src/main/dounzip.c:323 src/main/dounzip.c:330 src/main/dounzip.c:340
+#: src/main/dounzip.c:345 src/main/dounzip.c:349 src/main/dounzip.c:353
+#: src/main/envir.c:1752 src/main/envir.c:1755 src/main/envir.c:1876
+#: src/main/envir.c:1881 src/main/envir.c:1945 src/main/envir.c:1961
+#: src/main/envir.c:1967 src/main/envir.c:2079 src/main/envir.c:2087
+#: src/main/envir.c:2094 src/main/envir.c:2105 src/main/envir.c:2337
+#: src/main/envir.c:2458 src/main/envir.c:2755 src/main/envir.c:3022
+#: src/main/envir.c:3036 src/main/envir.c:3043 src/main/envir.c:3059
+#: src/main/envir.c:3642 src/main/errors.c:1011 src/main/eval.c:454
+#: src/main/eval.c:463 src/main/eval.c:466 src/main/grep.c:780
+#: src/main/grep.c:785 src/main/grep.c:1079 src/main/grep.c:1081
+#: src/main/grep.c:1083 src/main/grep.c:1528 src/main/grep.c:1532
+#: src/main/grep.c:1537 src/main/grep.c:2345 src/main/grep.c:2350
+#: src/main/grep.c:2652 src/main/grep.c:2657 src/main/memory.c:3823
+#: src/main/paste.c:96 src/main/paste.c:392 src/main/paste.c:399
+#: src/main/paste.c:406 src/main/paste.c:411 src/main/paste.c:416
+#: src/main/paste.c:421 src/main/paste.c:424 src/main/paste.c:432
+#: src/main/paste.c:437 src/main/paste.c:619 src/main/paste.c:624
 #: src/main/platform.c:306 src/main/platform.c:308 src/main/platform.c:310
 #: src/main/platform.c:326 src/main/platform.c:337 src/main/platform.c:390
-#: src/main/platform.c:392 src/main/platform.c:705 src/main/platform.c:707
-#: src/main/platform.c:1064 src/main/platform.c:1070 src/main/platform.c:1073
-#: src/main/platform.c:1076 src/main/platform.c:1079 src/main/platform.c:1082
-#: src/main/platform.c:1085 src/main/platform.c:1088 src/main/platform.c:1185
-#: src/main/platform.c:1188 src/main/platform.c:1191 src/main/platform.c:1229
-#: src/main/platform.c:1286 src/main/platform.c:1289 src/main/platform.c:1498
-#: src/main/platform.c:1501 src/main/platform.c:1504 src/main/platform.c:1540
-#: src/main/platform.c:1543 src/main/platform.c:1546 src/main/platform.c:1629
-#: src/main/platform.c:1645 src/main/platform.c:1684 src/main/platform.c:1686
-#: src/main/platform.c:1757 src/main/platform.c:1841 src/main/platform.c:2116
-#: src/main/platform.c:2176 src/main/platform.c:2353 src/main/platform.c:2356
-#: src/main/platform.c:2359 src/main/platform.c:2362 src/main/platform.c:2365
-#: src/main/platform.c:2368 src/main/platform.c:2568 src/main/platform.c:2571
-#: src/main/platform.c:2574 src/main/platform.c:2577 src/main/platform.c:2580
-#: src/main/platform.c:2583 src/main/platform.c:2657 src/main/platform.c:2665
-#: src/main/platform.c:2701 src/main/platform.c:2751 src/main/print.c:242
-#: src/main/print.c:248 src/main/print.c:270 src/main/print.c:276
-#: src/main/print.c:283 src/main/random.c:478 src/main/random.c:482
-#: src/main/random.c:489 src/main/random.c:517 src/main/saveload.c:1950
-#: src/main/saveload.c:1953 src/main/saveload.c:1956 src/main/saveload.c:2072
-#: src/main/saveload.c:2252 src/main/saveload.c:2257 src/main/saveload.c:2260
+#: src/main/platform.c:392 src/main/platform.c:708 src/main/platform.c:710
+#: src/main/platform.c:800 src/main/platform.c:1138 src/main/platform.c:1144
+#: src/main/platform.c:1147 src/main/platform.c:1150 src/main/platform.c:1153
+#: src/main/platform.c:1156 src/main/platform.c:1159 src/main/platform.c:1162
+#: src/main/platform.c:1259 src/main/platform.c:1262 src/main/platform.c:1265
+#: src/main/platform.c:1303 src/main/platform.c:1361 src/main/platform.c:1364
+#: src/main/platform.c:1573 src/main/platform.c:1576 src/main/platform.c:1579
+#: src/main/platform.c:1615 src/main/platform.c:1618 src/main/platform.c:1621
+#: src/main/platform.c:1657 src/main/platform.c:1690 src/main/platform.c:1692
+#: src/main/platform.c:1763 src/main/platform.c:1848 src/main/platform.c:2089
+#: src/main/platform.c:2149 src/main/platform.c:2334 src/main/platform.c:2337
+#: src/main/platform.c:2340 src/main/platform.c:2343 src/main/platform.c:2346
+#: src/main/platform.c:2349 src/main/platform.c:2555 src/main/platform.c:2558
+#: src/main/platform.c:2561 src/main/platform.c:2564 src/main/platform.c:2567
+#: src/main/platform.c:2570 src/main/platform.c:2648 src/main/platform.c:2656
+#: src/main/platform.c:2692 src/main/platform.c:2742 src/main/print.c:235
+#: src/main/print.c:241 src/main/print.c:263 src/main/print.c:269
+#: src/main/print.c:276 src/main/random.c:470 src/main/random.c:474
+#: src/main/random.c:481 src/main/random.c:509 src/main/saveload.c:1952
+#: src/main/saveload.c:1955 src/main/saveload.c:1958 src/main/saveload.c:2074
+#: src/main/saveload.c:2254 src/main/saveload.c:2259 src/main/saveload.c:2262
 #: src/main/saveload.c:2366 src/main/scan.c:684 src/main/scan.c:853
 #: src/main/scan.c:867 src/main/scan.c:871 src/main/scan.c:873
 #: src/main/scan.c:884 src/main/scan.c:911 src/main/scan.c:914
-#: src/main/scan.c:917 src/main/scan.c:972 src/main/seq.c:618
-#: src/main/seq.c:623 src/main/seq.c:631 src/main/seq.c:662 src/main/seq.c:666
-#: src/main/seq.c:672 src/main/seq.c:680 src/main/sort.c:175
-#: src/main/sysutils.c:585 src/main/sysutils.c:589 src/main/sysutils.c:593
-#: src/main/sysutils.c:599 src/main/sysutils.c:603 src/main/sysutils.c:1831
-#: src/main/sysutils.c:1835 src/main/unique.c:966 src/main/unique.c:1289
-#: src/main/unique.c:1349 src/main/unique.c:1356 src/main/unique.c:1750
-#: src/main/util.c:581 src/main/util.c:584 src/main/util.c:1825
-#: src/main/util.c:1994 src/main/util.c:1995 src/main/util.c:1996
-#: src/main/util.c:2013 src/main/util.c:2037 src/main/util.c:2041
-#: src/main/util.c:2043 src/main/util.c:2068 src/main/util.c:2070
-#: src/main/util.c:2072 src/main/util.c:2075 src/main/util.c:2078
-#: src/main/util.c:2082 src/main/util.c:2084 src/modules/X11/devX11.c:3241
-#: src/modules/X11/devX11.c:3244 src/modules/X11/devX11.c:3247
-#: src/modules/X11/devX11.c:3271 src/modules/internet/internet.c:284
-#: src/modules/internet/internet.c:290 src/modules/internet/internet.c:296
-#: src/modules/internet/internet.c:299 src/modules/internet/internet.c:303
+#: src/main/scan.c:917 src/main/scan.c:972 src/main/seq.c:622
+#: src/main/seq.c:627 src/main/seq.c:635 src/main/seq.c:666 src/main/seq.c:670
+#: src/main/seq.c:676 src/main/seq.c:684 src/main/sort.c:175
+#: src/main/sysutils.c:597 src/main/sysutils.c:601 src/main/sysutils.c:605
+#: src/main/sysutils.c:611 src/main/sysutils.c:615 src/main/sysutils.c:1787
+#: src/main/sysutils.c:1791 src/main/unique.c:1029 src/main/unique.c:1337
+#: src/main/unique.c:1341 src/main/unique.c:1351 src/main/unique.c:1747
+#: src/main/util.c:636 src/main/util.c:639 src/main/util.c:1379
+#: src/main/util.c:1393 src/main/util.c:1975 src/main/util.c:2198
+#: src/main/util.c:2199 src/main/util.c:2200 src/main/util.c:2217
+#: src/main/util.c:2245 src/main/util.c:2249 src/main/util.c:2251
+#: src/main/util.c:2277 src/main/util.c:2279 src/main/util.c:2281
+#: src/main/util.c:2284 src/main/util.c:2287 src/main/util.c:2291
+#: src/main/util.c:2293 src/modules/X11/devX11.c:3247
+#: src/modules/X11/devX11.c:3250 src/modules/X11/devX11.c:3253
+#: src/modules/X11/devX11.c:3277 src/modules/internet/internet.c:453
+#: src/modules/internet/internet.c:459 src/modules/internet/internet.c:465
+#: src/modules/internet/internet.c:468 src/modules/internet/internet.c:472
+#: src/modules/internet/internet.c:477 src/modules/internet/libcurl.c:414
+#: src/modules/internet/libcurl.c:418 src/modules/internet/libcurl.c:423
+#: src/modules/internet/libcurl.c:426 src/modules/internet/libcurl.c:430
 #: src/modules/lapack/Lapack.c:155 src/modules/lapack/Lapack.c:261
 #: src/modules/lapack/Lapack.c:709 src/modules/lapack/Lapack.c:818
-#: src/modules/lapack/Lapack.c:880 src/modules/lapack/Lapack.c:1214
-#: src/unix/sys-std.c:1217 src/unix/sys-std.c:1240
+#: src/modules/lapack/Lapack.c:880 src/modules/lapack/Lapack.c:1215
+#: src/unix/sys-std.c:1223 src/unix/sys-std.c:1246
 #, c-format
 msgid "invalid '%s' argument"
 msgstr "argumento '%s' inv�lido"
@@ -251,379 +256,356 @@ msgstr "argumento '%s' inv
 msgid "unsupported version of Windows"
 msgstr "versi�n de Windows no soportada"
 
-#: src/gnuwin32/extra.c:267 src/main/apply.c:105 src/main/character.c:595
-#: src/main/connections.c:3555 src/main/context.c:642 src/main/context.c:661
-#: src/main/datetime.c:675 src/main/datetime.c:777 src/main/datetime.c:1030
-#: src/main/dotcode.c:199 src/main/errors.c:929 src/main/errors.c:962
-#: src/main/errors.c:1065 src/main/errors.c:1090 src/main/errors.c:1095
-#: src/main/errors.c:1368 src/main/identical.c:66 src/main/identical.c:67
-#: src/main/identical.c:68 src/main/identical.c:69 src/main/identical.c:70
-#: src/main/seq.c:185 src/main/seq.c:341 src/main/seq.c:346 src/main/seq.c:350
-#: src/main/seq.c:391 src/main/seq.c:395 src/main/seq.c:399
-#: src/main/sort.c:1224 src/main/sort.c:1307 src/main/sort.c:1311
-#: src/main/sort.c:1318 src/main/sort.c:1393 src/main/source.c:220
-#: src/main/summary.c:886 src/main/sysutils.c:251 src/main/util.c:986
-#: src/main/util.c:991 src/main/util.c:998 src/main/util.c:1001
-#: src/modules/X11/devX11.c:3142 src/modules/X11/devX11.c:3169
-#: src/modules/X11/devX11.c:3174 src/modules/X11/devX11.c:3179
-#: src/modules/X11/devX11.c:3189 src/modules/X11/devX11.c:3194
-#: src/modules/X11/devX11.c:3198 src/modules/X11/devX11.c:3202
-#: src/unix/sys-std.c:1291
-#, c-format
-msgid "invalid '%s' value"
-msgstr "valor de '%s' no v�lido"
-
-#: src/gnuwin32/extra.c:308 src/gnuwin32/extra.c:321
+#: src/gnuwin32/extra.c:313 src/gnuwin32/extra.c:324
 msgid "incorrect argument"
 msgstr "argumento incorrecto"
 
-#: src/gnuwin32/extra.c:312
+#: src/gnuwin32/extra.c:316
 msgid "don't be silly!: your machine has a 4Gb address limit"
 msgstr ""
 "no sea ingenuo: su computadora tiene un l�mite de direccionamiento de 4Gb"
 
-#: src/gnuwin32/extra.c:316
+#: src/gnuwin32/extra.c:320
 msgid "cannot decrease memory limit: ignored"
 msgstr "no se puede disminuir el l�mite de la memoria: ignorado"
 
-#: src/gnuwin32/extra.c:428 src/gnuwin32/extra.c:529 src/main/util.c:897
+#: src/gnuwin32/extra.c:427 src/gnuwin32/extra.c:528 src/main/util.c:962
 msgid "'path' must be a character vector"
 msgstr "'path' debe ser un vector de caracteres"
 
-#: src/gnuwin32/extra.c:579 src/gnuwin32/extra.c:581 src/gnuwin32/extra.c:604
-#: src/gnuwin32/extra.c:606 src/gnuwin32/extra.c:641 src/main/gevents.c:61
+#: src/gnuwin32/extra.c:576 src/gnuwin32/extra.c:578 src/gnuwin32/extra.c:601
+#: src/gnuwin32/extra.c:603 src/gnuwin32/extra.c:638 src/main/gevents.c:61
 #: src/main/gevents.c:98
 msgid "invalid device"
 msgstr "dispositivo inv�lido"
 
-#: src/gnuwin32/extra.c:582
+#: src/gnuwin32/extra.c:579
 msgid "requires SDI mode"
 msgstr "modo SDI requerido"
 
-#: src/gnuwin32/extra.c:635 src/main/gevents.c:58 src/main/gevents.c:95
+#: src/gnuwin32/extra.c:632 src/main/gevents.c:58 src/main/gevents.c:95
 msgid "invalid graphical device number"
 msgstr "n�mero de dispositivo gr�fico no v�lido"
 
-#: src/gnuwin32/extra.c:645
+#: src/gnuwin32/extra.c:642
 msgid "bad device"
 msgstr "dispositivo defectuoso "
 
-#: src/gnuwin32/extra.c:799 src/gnuwin32/extra.c:807
+#: src/gnuwin32/extra.c:796 src/gnuwin32/extra.c:804
 #, fuzzy
 msgid "invalid input in 'Rmbstowcs'"
 msgstr "entrada no v�lida en Rmbstowcs"
 
-#: src/gnuwin32/extra.c:830 src/main/platform.c:1261
+#: src/gnuwin32/extra.c:827 src/main/platform.c:1336
 msgid "file choice cancelled"
 msgstr "selecci�n de archivo cancelada"
 
-#: src/gnuwin32/run.c:242
+#: src/gnuwin32/run.c:244
 #, fuzzy, c-format
 msgid "'CreateProcess' failed to run '%s'"
 msgstr "falla de lectura en %s"
 
-#: src/gnuwin32/run.c:344
+#: src/gnuwin32/run.c:346
 msgid "Child process not responding.  R will terminate it."
 msgstr "El proceso hijo no responde. R lo dar� por terminado."
 
-#: src/gnuwin32/run.c:402
+#: src/gnuwin32/run.c:404
 #, c-format
 msgid "Exit code was %d"
 msgstr "Codigo de salida fue %d"
 
-#: src/gnuwin32/run.c:434
+#: src/gnuwin32/run.c:436
 msgid "Insufficient memory (rpipeOpen)"
 msgstr "Memoria insuficiente (rpipeOpen)"
 
-#: src/gnuwin32/run.c:648 src/main/dounzip.c:482
+#: src/gnuwin32/run.c:650 src/main/dounzip.c:481
 msgid "seek not enabled for this connection"
 msgstr "b�squeda no habilitada para esta conexi�n"
 
-#: src/gnuwin32/run.c:654
+#: src/gnuwin32/run.c:656
 msgid "truncate not enabled for this connection"
 msgstr "truncamiento no habilitado para esta conexi�n"
 
-#: src/gnuwin32/run.c:729 src/gnuwin32/run.c:733 src/gnuwin32/run.c:746
-#: src/gnuwin32/run.c:774 src/main/connections.c:1330
-#: src/main/connections.c:1334 src/main/connections.c:1340
-#: src/main/connections.c:1354
+#: src/gnuwin32/run.c:731 src/gnuwin32/run.c:735 src/gnuwin32/run.c:748
+#: src/gnuwin32/run.c:776 src/main/connections.c:1322
+#: src/main/connections.c:1326 src/main/connections.c:1332
+#: src/main/connections.c:1346
 msgid "allocation of pipe connection failed"
 msgstr "asignaci�n de conexi�n pipe no lograda"
 
-#: src/gnuwin32/run.c:788
+#: src/gnuwin32/run.c:790
 #, fuzzy
 msgid "'names' is not a character vector"
 msgstr "'fmt' debe ser un vector de caracteres no vac�o"
 
-#: src/gnuwin32/sys-win32.c:182
+#: src/gnuwin32/sys-win32.c:180
 msgid "character string expected as first argument"
 msgstr "string de caracteres esperado como primer argumento"
 
-#: src/gnuwin32/sys-win32.c:191
+#: src/gnuwin32/sys-win32.c:189
 msgid "character string expected as third argument"
 msgstr "string de caracteres esperado como tercer argumento"
 
-#: src/gnuwin32/sys-win32.c:257 src/unix/sys-unix.c:299
+#: src/gnuwin32/sys-win32.c:255 src/unix/sys-unix.c:312
 #, c-format
 msgid "running command '%s' had status %d"
 msgstr "comando ejecutado '%s' tiene estatus %d"
 
-#: src/gnuwin32/system.c:122 src/unix/sys-unix.c:427
+#: src/gnuwin32/system.c:121 src/unix/sys-unix.c:440
 msgid "reached session elapsed time limit"
 msgstr "per�odo de sesiones lleg� a l�mite de tiempo transcurrido"
 
-#: src/gnuwin32/system.c:124 src/unix/sys-unix.c:429
+#: src/gnuwin32/system.c:123 src/unix/sys-unix.c:442
 msgid "reached elapsed time limit"
 msgstr "llegado el tiempo l�mite"
 
-#: src/gnuwin32/system.c:130 src/unix/sys-unix.c:435
+#: src/gnuwin32/system.c:129 src/unix/sys-unix.c:448
 msgid "reached session CPU time limit"
 msgstr "per�odo de sesiones lleg� a l�mite de tiempo de CPU"
 
-#: src/gnuwin32/system.c:132 src/unix/sys-unix.c:437
+#: src/gnuwin32/system.c:131 src/unix/sys-unix.c:450
 msgid "reached CPU time limit"
 msgstr "lleg� a tiempo de CPU l�mite"
 
-#: src/gnuwin32/system.c:157
+#: src/gnuwin32/system.c:156
 #, c-format
 msgid "Fatal error: %s\n"
 msgstr "Error fatal: %s\n"
 
-#: src/gnuwin32/system.c:335 src/unix/sys-std.c:863
+#: src/gnuwin32/system.c:334 src/unix/sys-std.c:866
 #, c-format
 msgid "encoding '%s' is not recognised"
 msgstr "codificaci�n'%s' no reconocida"
 
-#: src/gnuwin32/system.c:341 src/unix/sys-std.c:869
+#: src/gnuwin32/system.c:340 src/unix/sys-std.c:872
 #, c-format
 msgid "<ERROR: re-encoding failure from encoding '%s'>\n"
 msgstr "<ERROR: entrada no v�lida para codificaci�n '%s'>\n"
 
-#: src/gnuwin32/system.c:555 src/gnuwin32/system.c:1049
-#: src/gnuwin32/system.c:1061 src/main/connections.c:590
-#: src/main/connections.c:595 src/main/dounzip.c:177 src/main/saveload.c:1961
-#: src/main/serialize.c:2552 src/main/serialize.c:2557
-#: src/main/serialize.c:2642 src/main/serialize.c:2687 src/unix/system.c:323
-#: src/unix/system.c:343
+#: src/gnuwin32/system.c:562 src/gnuwin32/system.c:1058
+#: src/gnuwin32/system.c:1070 src/main/connections.c:581
+#: src/main/connections.c:586 src/main/dounzip.c:178 src/main/saveload.c:1963
+#: src/main/serialize.c:2598 src/main/serialize.c:2603
+#: src/main/serialize.c:2688 src/main/serialize.c:2733 src/unix/system.c:328
 #, c-format
 msgid "cannot open file '%s': %s"
 msgstr "no fue posible abrir el archivo '%s': %s"
 
-#: src/gnuwin32/system.c:569
+#: src/gnuwin32/system.c:576
 #, c-format
 msgid "file.show(): file '%s' does not exist\n"
 msgstr "file.show(): archivo '%s' no existe\n"
 
-#: src/gnuwin32/system.c:970
+#: src/gnuwin32/system.c:979
 #, fuzzy, c-format
 msgid "WARNING: R_MAX_MEM_SIZE value is invalid: ignored\n"
 msgstr "ATENCI�N: el valor '%s' no es v�lido: ignorado\n"
 
-#: src/gnuwin32/system.c:1002
+#: src/gnuwin32/system.c:1011
 msgid "WARNING: no max-mem-size given\n"
 msgstr "ATENCI�N: falta el argumento max-mem-size\n"
 
-#: src/gnuwin32/system.c:1009
+#: src/gnuwin32/system.c:1018
 #, c-format
 msgid "WARNING: --max-mem-size value is invalid: ignored\n"
 msgstr "ATENCI�N: valor de --max-mem-size =E9 no v�lido: ignorado\n"
 
-#: src/gnuwin32/system.c:1012
+#: src/gnuwin32/system.c:1021
 #, c-format
 msgid "WARNING: --max-mem-size=%lu%c: too large and ignored\n"
 msgstr "ATENCI�N: --max-mem-size=%lu%c: demasiado grande e ignorada\n"
 
-#: src/gnuwin32/system.c:1018
+#: src/gnuwin32/system.c:1027
 #, c-format
 msgid "WARNING: --max-mem-size=%4.1fM: too small and ignored\n"
 msgstr "ATENCI�N: --max-mem-size =%4.1fM: demasiado peque�a e ignorada\n"
 
-#: src/gnuwin32/system.c:1023
+#: src/gnuwin32/system.c:1032
 #, c-format
 msgid "WARNING: --max-mem-size=%4.0fM: too large and taken as %uM\n"
 msgstr "ATENCI�N: max-mem-size =%4.0fM demasiado grande y tomada como %uM\n"
 
-#: src/gnuwin32/system.c:1039
+#: src/gnuwin32/system.c:1048
 #, fuzzy, c-format
 msgid "option '%s' requires an argument"
 msgstr "operaciones binarias requieren dos argumentos"
 
-#: src/gnuwin32/system.c:1070
+#: src/gnuwin32/system.c:1079
 #, fuzzy, c-format
 msgid "option '%s' requires a non-empty argument"
 msgstr "operaciones binarias requieren dos argumentos"
 
-#: src/gnuwin32/system.c:1078 src/unix/system.c:362
+#: src/gnuwin32/system.c:1087 src/unix/system.c:347
 #, c-format
 msgid "WARNING: '-e %s' omitted as input is too long\n"
 msgstr "ATENCION: se omite entrada de  '-e %s' (muy larga)\n"
 
-#: src/gnuwin32/system.c:1082 src/unix/system.c:375
+#: src/gnuwin32/system.c:1091 src/unix/system.c:360
 #, c-format
 msgid "WARNING: unknown option '%s'\n"
 msgstr "ATENCI�N: opci�n desconocida '%s'\n"
 
-#: src/gnuwin32/system.c:1104 src/unix/system.c:379
+#: src/gnuwin32/system.c:1113 src/unix/system.c:364
 #, c-format
 msgid "ARGUMENT '%s' __ignored__\n"
 msgstr "ARGUMENTO '%s' __ignorado__\n"
 
 # Fijate si asi se entiende. Lo deje como estaba
-#: src/gnuwin32/system.c:1110 src/unix/system.c:386
+#: src/gnuwin32/system.c:1119 src/unix/system.c:371
 msgid "cannot use -e with -f or --file"
 msgstr "no es posible utilizar -e con -f o --file"
 
-#: src/gnuwin32/system.c:1128
+#: src/gnuwin32/system.c:1137
 msgid "creation of tmpfile failed -- set TMPDIR suitably?"
 msgstr ""
 "fallo la creaci�n de archivo tmpfile - establecer TMPDIR adecuadamente?"
 
-#: src/gnuwin32/system.c:1147 src/unix/system.c:437
+#: src/gnuwin32/system.c:1156 src/unix/system.c:422
 msgid "you must specify '--save', '--no-save' or '--vanilla'"
 msgstr "se debe especificar '--save', '--no-save' o '--vanilla'"
 
-#: src/gnuwin32/system.c:1152
+#: src/gnuwin32/system.c:1161
 msgid ""
 "impossible to create 'reader thread'; you must free some system resources"
 msgstr ""
 "es imposible crear 'reader thread'; usted debe liberar alg�n recurso del "
 "sistema"
 
-#: src/include/Errormsg.h:25 src/main/subscript.c:375 src/main/subscript.c:393
-#: src/main/subscript.c:417 src/main/subscript.c:456 src/main/subscript.c:584
-#: src/main/subscript.c:623 src/main/subscript.c:766
+#: src/include/Errormsg.h:27 src/main/subscript.c:383 src/main/subscript.c:401
+#: src/main/subscript.c:425 src/main/subscript.c:464 src/main/subscript.c:662
+#: src/main/subscript.c:701 src/main/subscript.c:844
 msgid "subscript out of bounds"
 msgstr "sub�ndice fuera de  los l�mites"
 
-#: src/include/Errormsg.h:26
+#: src/include/Errormsg.h:28
 #, c-format
 msgid "object of type '%s' is not subsettable"
 msgstr "objeto de tipo '%s' no es subconjunto"
 
-#: src/main/CommandLineArgs.c:170
+#: src/main/CommandLineArgs.c:171
 #, fuzzy
 msgid "WARNING: no value given for --encoding"
 msgstr "ATENCI�N: ning�n valor especificado para --encoding\n"
 
-#: src/main/CommandLineArgs.c:195
+#: src/main/CommandLineArgs.c:196
 #, fuzzy, c-format
 msgid "WARNING: option '%s' no longer supported"
 msgstr "ATENCI�N: ya no se provee soporte de la opci�n '%s'\n"
 
-#: src/main/CommandLineArgs.c:206
+#: src/main/CommandLineArgs.c:207
 #, fuzzy, c-format
 msgid "WARNING: no value given for '%s'"
 msgstr "ATENCI�N: ning�n valor especificado para '%s'\n"
 
-#: src/main/CommandLineArgs.c:216
+#: src/main/CommandLineArgs.c:217
 #, fuzzy, c-format
 msgid "WARNING: '%s' value is invalid: ignored"
 msgstr "ATENCI�N: el valor '%s' no es v�lido: ignorado\n"
 
-#: src/main/CommandLineArgs.c:220
+#: src/main/CommandLineArgs.c:221
 #, fuzzy, c-format
 msgid "WARNING: %s: too large and ignored"
 msgstr "ATENCI�N: %s: demasiado grande e ignorado\n"
 
-#: src/main/CommandLineArgs.c:234
+#: src/main/CommandLineArgs.c:235
 #, fuzzy
 msgid "WARNING: no value given for '--max-ppsize'"
 msgstr "ATENCI�N: ning�n valor especificado para '--max-ppsize'\n"
 
-#: src/main/CommandLineArgs.c:239
+#: src/main/CommandLineArgs.c:240
 #, fuzzy
 msgid "WARNING: '--max-ppsize' value is negative: ignored"
 msgstr "ATENCI�N: el valor de '-max-ppsize'es negativo: ignorado\n"
 
-#: src/main/CommandLineArgs.c:241
+#: src/main/CommandLineArgs.c:242
 #, fuzzy
 msgid "WARNING: '--max-ppsize' value is too small: ignored"
 msgstr "ATENCI�N: el valor de '-max-ppsize' es demasiado peque�o: ignorado\n"
 
-#: src/main/CommandLineArgs.c:244
+#: src/main/CommandLineArgs.c:245
 #, fuzzy
 msgid "WARNING: '--max-ppsize' value is too large: ignored"
 msgstr "ATENCI�N: el valor de '-max-ppsize' es demasiado grande: ignorado\n"
 
-#: src/main/RNG.c:175
+#: src/main/RNG.c:176
 #, c-format
 msgid "unif_rand: unimplemented RNG kind %d"
 msgstr "unif_rand: tipo RNG %d no implementado"
 
-#: src/main/RNG.c:260
+#: src/main/RNG.c:261
 #, c-format
 msgid "FixupSeeds: unimplemented RNG kind %d"
 msgstr "FixupSeeds: tipo RNG %d no implementado"
 
-#: src/main/RNG.c:302
+#: src/main/RNG.c:301
 msgid "'user_unif_rand' not in load table"
 msgstr "'user_unif_rand' no est� en la tabla de carga"
 
-#: src/main/RNG.c:310
+#: src/main/RNG.c:309
 msgid "cannot read seeds unless 'user_unif_nseed' is supplied"
 msgstr ""
 "no se pueden leer las semillas al menos que se especifique 'user_unif_nseed'"
 
-#: src/main/RNG.c:315
+#: src/main/RNG.c:314
 msgid "seed length must be in 0...625; ignored"
 msgstr ""
 "la longitud de la semilla debe estar comprendida entre 0...625; ignorado"
 
-#: src/main/RNG.c:323
+#: src/main/RNG.c:322
 #, c-format
 msgid "RNG_Init: unimplemented RNG kind %d"
 msgstr "RNG_Init: tipo RNG %d no implementado"
 
-#: src/main/RNG.c:354
+#: src/main/RNG.c:351
 #, fuzzy
 msgid "'.Random.seed' is a missing argument with no default"
 msgstr "el argumento .Random.seed no existe y no tiene valor por defecto"
 
-#: src/main/RNG.c:355
+#: src/main/RNG.c:352
 #, fuzzy, c-format
 msgid "'.Random.seed' is not an integer vector but of type '%s', so ignored"
 msgstr ".Random.seed no es un vector de n�meros enteros pero es de tipo '%s'"
 
-#: src/main/RNG.c:363
+#: src/main/RNG.c:360
 #, fuzzy
 msgid "'.Random.seed[1]' is not a valid integer, so ignored"
 msgstr ".Random.seed[1] no es un entero v�lido"
 
-#: src/main/RNG.c:369
+#: src/main/RNG.c:366
 #, fuzzy
 msgid "'.Random.seed[1]' is not a valid Normal type, so ignored"
 msgstr ".Random.seed[0] no es un tipo Normal v�lido"
 
-#: src/main/RNG.c:383
+#: src/main/RNG.c:380
 #, fuzzy
 msgid "'.Random.seed[1] = 5' but no user-supplied generator, so ignored"
 msgstr ".Random.seed[1] = 5 pero el usuario no ha especificado un generador"
 
-#: src/main/RNG.c:388
+#: src/main/RNG.c:385
 #, fuzzy
 msgid "'.Random.seed[1]' is not a valid RNG kind so ignored"
 msgstr ".Random.seed[1] no es un tipo RNG v�lido (c�digo)"
 
-#: src/main/RNG.c:415
+#: src/main/RNG.c:412
 #, fuzzy
 msgid "'.Random.seed' has wrong length"
 msgstr ".Random.seed tiene una longitud no v�lida"
 
-#: src/main/RNG.c:468
+#: src/main/RNG.c:465
 #, c-format
 msgid "RNGkind: unimplemented RNG kind %d"
 msgstr "RNGkind: tipo RNG %d no implementado"
 
-#: src/main/RNG.c:488
+#: src/main/RNG.c:485
 #, fuzzy
 msgid "invalid Normal type in 'RNGkind'"
 msgstr "tipo Normal no v�lido en RNGkind"
 
-#: src/main/RNG.c:491
+#: src/main/RNG.c:488
 msgid "'user_norm_rand' not in load table"
 msgstr "'user_norm_rand' no est� en la tabla de carga"
 
-#: src/main/RNG.c:535
+#: src/main/RNG.c:532
 msgid "supplied seed is not a valid integer"
 msgstr "la semilla especificada no es un entero v�lido"
 
@@ -649,7 +631,7 @@ msgstr "DLLname '%s' es demasiado largo"
 msgid "could not allocate space for 'name'"
 msgstr "no fu� posible asignar espacio a 'name'"
 
-#: src/main/Rdynload.c:881 src/main/Rdynload.c:897 src/main/util.c:698
+#: src/main/Rdynload.c:881 src/main/Rdynload.c:897 src/main/util.c:762
 msgid "character argument expected"
 msgstr "argumento car�cter esperado"
 
@@ -669,35 +651,39 @@ msgstr "la biblioteca din
 
 # Igual que antes, fijate si conviene asi. No lo modifico
 #: src/main/Rdynload.c:979
-#, c-format
-msgid "cannot allocate memory for registered native symbol (%d bytes)"
-msgstr ""
+#, fuzzy, c-format
+msgid "cannot allocate memory for registered native symbol (%d byte)"
+msgid_plural "cannot allocate memory for registered native symbol (%d bytes)"
+msgstr[0] ""
+"no fue posible adjudicar memoria para los simbolos nativos registrados (%d "
+"bytes)"
+msgstr[1] ""
 "no fue posible adjudicar memoria para los simbolos nativos registrados (%d "
 "bytes)"
 
-#: src/main/Rdynload.c:1100 src/main/Rdynload.c:1321
+#: src/main/Rdynload.c:1102 src/main/Rdynload.c:1323
 msgid "must pass package name or DllInfo reference"
 msgstr "debe darse un nombre de paquete o una referencia de DllInfo"
 
-#: src/main/Rdynload.c:1197
+#: src/main/Rdynload.c:1199
 #, fuzzy, c-format
 msgid "unimplemented type %d in 'createRSymbolObject'"
 msgstr "Tipo %d no implementado  en createRSymbolObject"
 
-#: src/main/Rdynload.c:1279 src/main/Rdynload.c:1373
+#: src/main/Rdynload.c:1281 src/main/Rdynload.c:1375
 msgid "R_getRegisteredRoutines() expects a DllInfo reference"
 msgstr "R_getRegisteredRoutines() espera una refer=EAncia para DllInfo"
 
-#: src/main/Rdynload.c:1282 src/main/Rdynload.c:1376
+#: src/main/Rdynload.c:1284 src/main/Rdynload.c:1378
 msgid "NULL value passed for DllInfo"
 msgstr "valor NULL dado a DllInfo"
 
-#: src/main/Rdynload.c:1436
+#: src/main/Rdynload.c:1441
 #, c-format
 msgid "function '%s' not provided by package '%s'"
 msgstr "el paquete '%s' no ofrece la funci�n '%s'"
 
-#: src/main/Rdynload.c:1438
+#: src/main/Rdynload.c:1443
 msgid "table entry must be an external pointer"
 msgstr "la entrada de 'table' debe ser un puntero externo"
 
@@ -706,9 +692,9 @@ msgstr "la entrada de 'table' debe ser un puntero externo"
 msgid "problem in setting variable '%s' in Renviron"
 msgstr "problema  al establecer zona horaria"
 
-#: src/main/Renviron.c:311
-#, fuzzy
-msgid "argument 'x' must be a character string"
+#: src/main/Renviron.c:311 src/main/objects.c:1174 src/main/raw.c:155
+#, fuzzy, c-format
+msgid "argument '%s' must be a character string"
 msgstr "el argumento de 'code' debe ser un string de caracteres"
 
 #: src/main/Renviron.c:315
@@ -716,96 +702,123 @@ msgstr "el argumento de 'code' debe ser un string de caracteres"
 msgid "file '%s' cannot be opened for reading"
 msgstr "archivo zip '%s' no pueden ser cargadas"
 
-#: src/main/Rstrptime.h:517 src/main/Rstrptime.h:984
+#: src/main/Rstrptime.h:524 src/main/Rstrptime.h:991
 #, fuzzy, c-format
 msgid "use of %s for input is not supported"
 msgstr "el modo '%s' no es soportado en call_R"
 
-#: src/main/Rstrptime.h:1242
+#: src/main/Rstrptime.h:1263
 msgid "input string is too long"
 msgstr "string de entrada demasiado larga"
 
-#: src/main/Rstrptime.h:1244
+#: src/main/Rstrptime.h:1265
 msgid "invalid multibyte input string"
 msgstr "string de entrada multibyte no v�lida"
 
-#: src/main/Rstrptime.h:1247
+#: src/main/Rstrptime.h:1268
 msgid "format string is too long"
 msgstr "string de formato demasiado larga"
 
-#: src/main/Rstrptime.h:1249
+#: src/main/Rstrptime.h:1270
 msgid "invalid multibyte format string"
 msgstr "string de formato multibyte no v�lida"
 
-#: src/main/agrep.c:133 src/main/agrep.c:777 src/main/character.c:1039
-#: src/main/character.c:1043 src/main/grep.c:769 src/main/grep.c:1512
-#: src/main/grep.c:1516 src/main/grep.c:2325 src/main/grep.c:2623
+#: src/main/agrep.c:133 src/main/agrep.c:778 src/main/character.c:1291
+#: src/main/character.c:1295 src/main/grep.c:782 src/main/grep.c:1530
+#: src/main/grep.c:1534 src/main/grep.c:2347 src/main/grep.c:2654
 #, c-format
 msgid "argument '%s' has length > 1 and only the first element will be used"
 msgstr ""
 "el argumento '%s' tiene tiene longitud > 1 y s�lo el primer elemento ser� "
 "usado"
 
-#: src/main/agrep.c:189 src/main/agrep.c:818
+#: src/main/agrep.c:190 src/main/agrep.c:820
 #, fuzzy
 msgid "'pattern' must be a non-empty character string"
 msgstr "'title' debe ser un string de caracteres"
 
-#: src/main/agrep.c:200 src/main/agrep.c:827 src/main/grep.c:838
-#: src/main/grep.c:2381 src/main/grep.c:2662
+#: src/main/agrep.c:201 src/main/agrep.c:829 src/main/grep.c:853
+#: src/main/grep.c:2405 src/main/grep.c:2707
 msgid "regular expression is invalid in this locale"
 msgstr "la expresi�n regular es inv�lida es este locale"
 
-#: src/main/agrep.c:206 src/main/agrep.c:623
+#: src/main/agrep.c:207 src/main/agrep.c:624
 #, c-format
 msgid "regcomp error:  '%s'"
 msgstr "error regcomp:  '%s'"
 
-#: src/main/agrep.c:238 src/main/agrep.c:871 src/main/grep.c:227
-#: src/main/grep.c:315 src/main/grep.c:423 src/main/grep.c:578
-#: src/main/grep.c:889 src/main/grep.c:2480 src/main/grep.c:2548
-#: src/main/grep.c:2698
+#: src/main/agrep.c:239 src/main/agrep.c:874 src/main/grep.c:233
+#: src/main/grep.c:323 src/main/grep.c:434 src/main/grep.c:590
+#: src/main/grep.c:907 src/main/grep.c:2510 src/main/grep.c:2579
+#: src/main/grep.c:2744
 #, c-format
 msgid "input string %d is invalid in this locale"
 msgstr "string de entrada %d es inv�lida en este locale"
 
-#: src/main/agrep.c:525 src/main/agrep.c:765 src/main/grep.c:155
-#: src/main/grep.c:760 src/main/grep.c:762 src/main/grep.c:1047
-#: src/main/grep.c:1055 src/main/grep.c:1503 src/main/grep.c:1505
-#: src/main/grep.c:2315 src/main/grep.c:2317 src/main/grep.c:2611
+#: src/main/agrep.c:526 src/main/agrep.c:766 src/main/grep.c:159
+#: src/main/grep.c:773 src/main/grep.c:775 src/main/grep.c:1065
+#: src/main/grep.c:1073 src/main/grep.c:1521 src/main/grep.c:1523
+#: src/main/grep.c:2337 src/main/grep.c:2339 src/main/grep.c:2642
 #, c-format
 msgid "argument '%s' will be ignored"
 msgstr "argumento '%s  ser� ignorado"
 
-#: src/main/agrep.c:614
+#: src/main/agrep.c:615
 #, fuzzy, c-format
 msgid "input string x[%d] is invalid in this locale"
 msgstr "string de entrada %d es inv�lida en este locale"
 
-#: src/main/agrep.c:660
+#: src/main/agrep.c:661
 #, fuzzy, c-format
 msgid "input string y[%d] is invalid in this locale"
 msgstr "string de entrada %d es inv�lida en este locale"
 
-#: src/main/agrep.c:833 src/main/grep.c:2668
+#: src/main/agrep.c:835 src/main/grep.c:2713
 #, fuzzy, c-format
 msgid "regcomp error: '%s'"
 msgstr "error regcomp:  '%s'"
 
-#: src/main/apply.c:103
+#: src/main/apply.c:98
 #, fuzzy
 msgid "'FUN.VALUE' must be a vector"
 msgstr "code debe ser un vector gen�rico"
 
-#: src/main/apply.c:108 src/main/complex.c:758
+#: src/main/apply.c:100 src/main/array.c:506 src/main/character.c:847
+#: src/main/character.c:1655 src/main/connections.c:3551
+#: src/main/context.c:653 src/main/context.c:672 src/main/datetime.c:681
+#: src/main/datetime.c:783 src/main/datetime.c:1047 src/main/dotcode.c:222
+#: src/main/errors.c:910 src/main/errors.c:943 src/main/errors.c:1049
+#: src/main/errors.c:1074 src/main/errors.c:1079 src/main/errors.c:1349
+#: src/main/identical.c:66 src/main/identical.c:67 src/main/identical.c:68
+#: src/main/identical.c:69 src/main/identical.c:70 src/main/platform.c:2982
+#: src/main/seq.c:192 src/main/seq.c:343 src/main/seq.c:348 src/main/seq.c:352
+#: src/main/seq.c:397 src/main/seq.c:401 src/main/seq.c:405
+#: src/main/sort.c:1244 src/main/sort.c:1327 src/main/sort.c:1331
+#: src/main/sort.c:1338 src/main/source.c:225 src/main/summary.c:954
+#: src/main/sysutils.c:250 src/main/util.c:1051 src/main/util.c:1056
+#: src/main/util.c:1063 src/main/util.c:1066 src/main/util.c:2035
+#: src/modules/X11/devX11.c:3148 src/modules/X11/devX11.c:3175
+#: src/modules/X11/devX11.c:3180 src/modules/X11/devX11.c:3185
+#: src/modules/X11/devX11.c:3195 src/modules/X11/devX11.c:3200
+#: src/modules/X11/devX11.c:3204 src/modules/X11/devX11.c:3208
+#, c-format
+msgid "invalid '%s' value"
+msgstr "valor de '%s' no v�lido"
+
+#: src/main/apply.c:103 src/main/complex.c:753
 msgid "invalid length"
 msgstr "longitud no v�lida"
 
-#: src/main/apply.c:113
+#: src/main/apply.c:108
 msgid "long vectors are not supported for matrix/array results"
 msgstr ""
 
-#: src/main/apply.c:162
+#: src/main/apply.c:115
+#, fuzzy, c-format
+msgid "type '%s' is not supported"
+msgstr "el modo '%s' no es soportado en call_R"
+
+#: src/main/apply.c:163
 #, c-format
 msgid ""
 "values must be length %d,\n"
@@ -814,7 +827,7 @@ msgstr ""
 "Los valores deben ser de longitud %d, \n"
 "pero el resultado FUN(X [[%d]]) es la longitud %d "
 
-#: src/main/apply.c:174
+#: src/main/apply.c:175
 #, c-format
 msgid ""
 "values must be type '%s',\n"
@@ -823,17 +836,12 @@ msgstr ""
 "valores deben ser del tipo '%s',\n"
 "pero el resultado FUN(X[[%d]])  es del tipo  '%s'"
 
-#: src/main/apply.c:193
-#, fuzzy, c-format
-msgid "type '%s' is not supported"
-msgstr "el modo '%s' no es soportado en call_R"
-
-#: src/main/apply.c:225
+#: src/main/apply.c:252
 #, c-format
 msgid "dimnames(<value>) is neither NULL nor list of length %d"
 msgstr "dimnames(<value>) no es ni NULL ni un list de longitud %d"
 
-#: src/main/arithmetic.c:42
+#: src/main/arithmetic.c:42 src/main/eval.c:3633
 msgid "NaNs produced"
 msgstr "Se han producido NaNs"
 
@@ -842,110 +850,113 @@ msgstr "Se han producido NaNs"
 msgid "non-numeric argument to mathematical function"
 msgstr "Argumento no num�rico para funci�n matem�tica"
 
-#: src/main/arithmetic.c:187
+#: src/main/arithmetic.c:186
 msgid "probable complete loss of accuracy in modulus"
 msgstr "probable p�rdida completa de precisi�n en el m�dulo"
 
-#: src/main/arithmetic.c:337
+#: src/main/arithmetic.c:298
 msgid "NAs produced by integer overflow"
 msgstr "NAs producidos por enteros excedidos"
 
-#: src/main/arithmetic.c:538
+#: src/main/arithmetic.c:499
 msgid "operator needs one or two arguments"
 msgstr "el operador necesita uno o dos argumentos"
 
-#: src/main/arithmetic.c:554
+#: src/main/arithmetic.c:515
 msgid "non-numeric argument to binary operator"
 msgstr "argumento no-num�rico para operador binario"
 
-#: src/main/arithmetic.c:615 src/main/relop.c:227
+#: src/main/arithmetic.c:576 src/main/relop.c:221
 msgid "non-conformable arrays"
 msgstr "arreglos de dimens�n no compatibles"
 
-#: src/main/arithmetic.c:658
+#: src/main/arithmetic.c:619
 msgid "non-conformable time-series"
 msgstr "series de tiempo no compatibles"
 
-#: src/main/arithmetic.c:680 src/main/logic.c:143 src/main/relop.c:166
-#: src/main/relop.c:265
+#: src/main/arithmetic.c:641 src/main/logic.c:135 src/main/relop.c:160
+#: src/main/relop.c:259
 msgid "longer object length is not a multiple of shorter object length"
 msgstr "longitud de objeto mayor no es m�ltiplo de la longitud de uno menor"
 
-#: src/main/arithmetic.c:751
+#: src/main/arithmetic.c:712
 msgid "invalid argument to unary operator"
 msgstr "argumento no v�lido para un operador unitario"
 
-#: src/main/arithmetic.c:780 src/main/arithmetic.c:805
-#: src/main/arithmetic.c:824
+#: src/main/arithmetic.c:741 src/main/arithmetic.c:766
+#: src/main/arithmetic.c:785
 msgid "invalid unary operator"
 msgstr "operador unitario no v�lido"
 
-#: src/main/arithmetic.c:1241
+#: src/main/arithmetic.c:1191
 msgid "unimplemented real function of 1 argument"
 msgstr "funci�n real de 1 argumento no implementada"
 
-#: src/main/arithmetic.c:1255 src/main/complex.c:648 src/main/complex.c:718
+#: src/main/arithmetic.c:1205 src/main/complex.c:638 src/main/complex.c:708
 msgid "unimplemented complex function"
 msgstr "operaci�n compleja no implementada"
 
-#: src/main/arithmetic.c:1526 src/main/arithmetic.c:1877
-#: src/main/arithmetic.c:2056 src/main/arithmetic.c:2168
+#: src/main/arithmetic.c:1484 src/main/arithmetic.c:1877
+#: src/main/arithmetic.c:2049 src/main/arithmetic.c:2152
 #, c-format
 msgid "unimplemented real function of %d numeric arguments"
 msgstr "funci�n real de %d argumentos num�ricos no implementada"
 
-#: src/main/arithmetic.c:1552
-#, c-format
-msgid "%d arguments passed to '%s' which requires 1 or 2"
-msgstr "%d argumentos dados a '%s', que requeiren 1 o 2"
+#: src/main/arithmetic.c:1511
+#, fuzzy, c-format
+msgid "%d argument passed to '%s' which requires 1 or 2 arguments"
+msgid_plural "%d arguments passed to '%s'which requires 1 or 2 arguments"
+msgstr[0] "%d argumentos dados a '%s', que requeiren 1 o 2"
+msgstr[1] "%d argumentos dados a '%s', que requeiren 1 o 2"
 
-#: src/main/arithmetic.c:1570
+#: src/main/arithmetic.c:1530
 msgid "invalid second argument of length 0"
 msgstr "segundo argumento no v�lido de longitud cero"
 
-#: src/main/arithmetic.c:1639
+#: src/main/arithmetic.c:1625 src/main/arithmetic.c:1643 src/main/envir.c:1464
+#: src/main/envir.c:1972 src/main/eval.c:630 src/main/eval.c:4237
+#, c-format
+msgid "argument \"%s\" is missing, with no default"
+msgstr "el argumento \"%s\" est� ausente, sin valor por omisi�n"
+
+#: src/main/arithmetic.c:1649
 msgid "invalid argument 'base' of length 0"
 msgstr "argumento no v�lido de base de longitud 0"
 
-#: src/main/arithmetic.c:1647
-#, c-format
-msgid "%d arguments passed to 'log' which requires 1 or 2"
-msgstr "%d argumentos dados a 'log', que requeiren 1 o 2"
-
-#: src/main/array.c:79 src/main/array.c:1441
+#: src/main/array.c:82 src/main/array.c:1591
 #, fuzzy, c-format
 msgid "'data' must be of a vector type, was '%s'"
 msgstr "'path' debe ser un vector de caracteres"
 
-#: src/main/array.c:94 src/main/array.c:102
+#: src/main/array.c:97 src/main/array.c:105
 msgid "non-numeric matrix extent"
 msgstr "extensi�n matricial no num�rica"
 
-#: src/main/array.c:97 src/main/array.c:1535
+#: src/main/array.c:100 src/main/array.c:1695
 msgid "invalid 'nrow' value (too large or NA)"
 msgstr "valor de 'nrow' no v�lido (demasiado grande o NA)"
 
-#: src/main/array.c:99 src/main/array.c:1537
+#: src/main/array.c:102 src/main/array.c:1697
 msgid "invalid 'nrow' value (< 0)"
 msgstr "valor 'nrow' no v�lido (< 0)"
 
-#: src/main/array.c:105 src/main/array.c:1540
+#: src/main/array.c:108 src/main/array.c:1700
 msgid "invalid 'ncol' value (too large or NA)"
 msgstr "valor de 'ncol' no v�lido (demasiado grande o NA)"
 
-#: src/main/array.c:107 src/main/array.c:1542
+#: src/main/array.c:110 src/main/array.c:1702
 msgid "invalid 'ncol' value (< 0)"
 msgstr "valor de 'ncol' no v�lido (< 0)"
 
-#: src/main/array.c:116
+#: src/main/array.c:119
 msgid "nc = 0 for non-null data"
 msgstr ""
 
-#: src/main/array.c:124
+#: src/main/array.c:127
 msgid "nr = 0 for non-null data"
 msgstr ""
 
-#: src/main/array.c:135
+#: src/main/array.c:138
 #, c-format
 msgid ""
 "data length [%d] is not a sub-multiple or multiple of the number of rows [%d]"
@@ -953,7 +964,7 @@ msgstr ""
 "la longitud de los datos [%d] no es un subm�ltiplo o m�ltiplo del n�mero de "
 "filas [%d] en la matriz"
 
-#: src/main/array.c:138
+#: src/main/array.c:141
 #, c-format
 msgid ""
 "data length [%d] is not a sub-multiple or multiple of the number of columns "
@@ -962,165 +973,176 @@ msgstr ""
 "la longitud de los datos [%d] no es un subm�ltiplo o m�ltiplo del n�mero de "
 "columnas [%d] en la matriz"
 
-#: src/main/array.c:141
+#: src/main/array.c:144
 msgid "data length exceeds size of matrix"
 msgstr "la longitud de los datos excede el tama�o de la matriz"
 
-#: src/main/array.c:147 src/main/array.c:1453 src/main/array.c:1549
+#: src/main/array.c:150 src/main/array.c:1603 src/main/array.c:1709
 msgid "too many elements specified"
 msgstr "demasiados elementos especificados"
 
-#: src/main/array.c:205
+#: src/main/array.c:208
 msgid "negative extents to matrix"
 msgstr "extensi�n negativa para la matriz"
 
-#: src/main/array.c:208
+#: src/main/array.c:211
 msgid "allocMatrix: too many elements specified"
 msgstr "allocMatrix: demasiados elementos especificados"
 
-#: src/main/array.c:236
+#: src/main/array.c:239
 msgid "negative extents to 3D array"
 msgstr "extensi�n negativa para array 3D"
 
-#: src/main/array.c:239
+#: src/main/array.c:242
 #, fuzzy
 msgid "'alloc3Darray': too many elements specified"
 msgstr "alloc3Darray: demasiados elementos especificados"
 
-#: src/main/array.c:264
+#: src/main/array.c:267
 #, fuzzy
 msgid "'allocArray': too many elements specified by 'dims'"
 msgstr "allocArray: demasiados elementos especificados para 'dims'"
 
-#: src/main/array.c:448
+#: src/main/array.c:523
+#, fuzzy, c-format
+msgid "'%s' must be a list or atomic vector"
+msgstr "'x' debe ser un vector de caracteres"
+
+#: src/main/array.c:561
 #, fuzzy, c-format
 msgid "a matrix-like object is required as argument to '%s'"
 msgstr "se requiere una matriz  como argumento de 'row/col'"
 
-#: src/main/array.c:662
+#: src/main/array.c:776
 #, fuzzy
 msgid "requires numeric/complex matrix/vector arguments"
 msgstr "requiere argumentos num�ricos matriz/vector"
 
-#: src/main/array.c:752 src/main/array.c:756 src/main/array.c:760
+#: src/main/array.c:886 src/main/array.c:890 src/main/array.c:894
 msgid "non-conformable arguments"
 msgstr "argumentos no compatibles"
 
-#: src/main/array.c:1058
+#: src/main/array.c:1193
 msgid "argument is not a matrix"
 msgstr "el argumento no es una matriz"
 
-#: src/main/array.c:1093
+#: src/main/array.c:1228
 msgid "invalid first argument, must be an array"
 msgstr "primer argumento no v�lido: debe ser un arreglo"
 
-#: src/main/array.c:1107
+#: src/main/array.c:1242
 #, fuzzy, c-format
 msgid "'perm' is of wrong length %d (!= %d)"
 msgstr "'perm' tiene longitud err�nea"
 
-#: src/main/array.c:1112 src/main/array.c:1115
+#: src/main/array.c:1247 src/main/array.c:1250
 msgid "'a' does not have named dimnames"
 msgstr "'a' no tiene un nombre en dimnames"
 
-#: src/main/array.c:1122
+#: src/main/array.c:1257
 #, fuzzy, c-format
 msgid "'perm[%d]' does not match a dimension name"
 msgstr "perm[%d] no tiene un nombre en dimension"
 
-#: src/main/array.c:1135
+#: src/main/array.c:1270
 msgid "value out of range in 'perm'"
 msgstr "valor fuera de sus l�mites en 'perm'"
 
-#: src/main/array.c:1217
+#: src/main/array.c:1352
 #, fuzzy
 msgid "'resize' must be TRUE or FALSE"
 msgstr "'decreciente' debe ser TRUE o FALSE"
 
-#: src/main/array.c:1275
+#: src/main/array.c:1422
 msgid "'x' must be numeric"
 msgstr "'x' debe ser num�rico"
 
-#: src/main/array.c:1449
+# No se en que contexto va este mensaje, puede estar bien o mal traducido. Vos sabes?
+#: src/main/array.c:1425
+#, fuzzy
+msgid "'x' is too short"
+msgstr "objecto demasiado peque�o"
+
+#: src/main/array.c:1599
 #, fuzzy
 msgid "'dims' cannot be of length 0"
 msgstr "'hadj' debe tener longitud 1"
 
-#: src/main/array.c:1545
+#: src/main/array.c:1705
 #, fuzzy
 msgid "'x' must have positive length"
 msgstr "argumento debe tener longitud positiva"
 
-#: src/main/array.c:1605
+#: src/main/array.c:1771
 #, c-format
 msgid "singular matrix in 'backsolve'. First zero in diagonal [%d]"
 msgstr ""
 
-#: src/main/attrib.c:40 src/main/attrib.c:235 src/main/attrib.c:269
-#: src/main/attrib.c:291 src/main/attrib.c:405 src/main/attrib.c:452
-#: src/main/attrib.c:502
+#: src/main/attrib.c:40 src/main/attrib.c:231 src/main/attrib.c:265
+#: src/main/attrib.c:287 src/main/attrib.c:403 src/main/attrib.c:450
+#: src/main/attrib.c:501
 msgid "attempt to set an attribute on NULL"
 msgstr "se intenta especificar un atributo en un NULL"
 
-#: src/main/attrib.c:72
+#: src/main/attrib.c:77
 #, c-format
 msgid "row names must be 'character' or 'integer', not '%s'"
 msgstr "'row.name' debe ser un vector de caracteres o de enteros, no '%s'"
 
-#: src/main/attrib.c:124
+#: src/main/attrib.c:130
 #, c-format
 msgid "getAttrib: invalid type (%s) for TAG"
 msgstr "getAttrib: tipo no v�lido (%s)  para TAG"
 
-#: src/main/attrib.c:379
+#: src/main/attrib.c:377
 #, c-format
 msgid "invalid type (%s) for 'names': must be vector"
 msgstr "tipo no v�lido (%s)  para 'names': debe ser un vector"
 
-#: src/main/attrib.c:382
+#: src/main/attrib.c:380
 #, c-format
 msgid "'names' attribute [%d] must be the same length as the vector [%d]"
 msgstr ""
 "el atributo 'names' [%d] debe tener la misma longitud que el vector [%d]"
 
-#: src/main/attrib.c:387
+#: src/main/attrib.c:385
 msgid "names() applied to a non-vector"
 msgstr "names() aplicado a un objeto que no es un vector"
 
-#: src/main/attrib.c:395
+#: src/main/attrib.c:393
 msgid "invalid time series parameters specified"
 msgstr "par�metros no v�lidos para series temporales"
 
-#: src/main/attrib.c:409
+#: src/main/attrib.c:407
 msgid "'tsp' attribute must be numeric"
 msgstr "el atributo 'tsp' debe ser num�rico"
 
-#: src/main/attrib.c:415
+#: src/main/attrib.c:413
 msgid "'tsp' attribute must be numeric of length three"
 msgstr "el atributo 'tsp' debe ser num�rico de longitud tres"
 
-#: src/main/attrib.c:432
+#: src/main/attrib.c:430
 msgid "cannot assign 'tsp' to zero-length vector"
 msgstr "no se puede asignar 'tsp' a un vector de longitud 0"
 
-#: src/main/attrib.c:463
+#: src/main/attrib.c:461
 msgid "attempt to set invalid 'comment' attribute"
 msgstr "se intenta especificar un atributo 'comment' no v�lido"
 
-#: src/main/attrib.c:511
+#: src/main/attrib.c:510
 msgid "adding class \"factor\" to an invalid object"
 msgstr "se agreg� una clase\"factor\" a un objeto no v�lido"
 
-#: src/main/attrib.c:519
+#: src/main/attrib.c:541
 msgid "attempt to set invalid 'class' attribute"
 msgstr "se intenta especificar un atributo 'class' no v�lido"
 
-#: src/main/attrib.c:777
+#: src/main/attrib.c:872
 #, fuzzy, c-format
 msgid "class '%s' has no 'names' slot"
 msgstr "Clase '%s' no tiene 'names' en slot"
 
-#: src/main/attrib.c:779
+#: src/main/attrib.c:874
 #, fuzzy, c-format
 msgid ""
 "class '%s' has no 'names' slot; assigning a names attribute will create an "
@@ -1129,7 +1151,7 @@ msgstr ""
 "Clase '%s' no tiene 'names' en slot; asignar un nombre a un atributo creara "
 "un objeto no v�lido  "
 
-#: src/main/attrib.c:782
+#: src/main/attrib.c:877
 #, fuzzy, c-format
 msgid ""
 "invalid to use names()<- to set the 'names' slot in a non-vector class ('%s')"
@@ -1137,132 +1159,133 @@ msgstr ""
 "No es valido usar names()<- para dar 'names' a un slot en una clase que no "
 "es vector ('%s')"
 
-#: src/main/attrib.c:812
+#: src/main/attrib.c:907
 msgid "incompatible 'names' argument"
 msgstr "argumento 'names' incompatible"
 
-#: src/main/attrib.c:867
+#: src/main/attrib.c:962
 #, c-format
 msgid "invalid type (%s) to set 'names' attribute"
 msgstr "tipo inv�lido (%s)  para especificar el atributo de 'names'"
 
-#: src/main/attrib.c:938
+#: src/main/attrib.c:1035
 msgid "'dimnames' applied to non-array"
 msgstr "'dimnames' aplicado a un objeto que no es un arreglo"
 
-#: src/main/attrib.c:943
-msgid "'dimnames' must be a list"
-msgstr "'dimnames' debe ser una lista"
+#: src/main/attrib.c:1040 src/main/coerce.c:2471
+#, fuzzy, c-format
+msgid "'%s' must be a list"
+msgstr "'%s' debe ser una lista"
 
-#: src/main/attrib.c:946 src/main/attrib.c:974
+#: src/main/attrib.c:1043 src/main/attrib.c:1071
 #, c-format
 msgid "length of 'dimnames' [%d] must match that of 'dims' [%d]"
 msgstr "la longitud de 'dimnames' [%d] debe coincidir con la de 'dims' [%d]"
 
-#: src/main/attrib.c:980
+#: src/main/attrib.c:1077
 #, c-format
 msgid "invalid type (%s) for 'dimnames' (must be a vector)"
 msgstr "tipo inv�lido (%s) para 'dimnames' (debe ser un vector)"
 
-#: src/main/attrib.c:983
+#: src/main/attrib.c:1080
 #, c-format
 msgid "length of 'dimnames' [%d] not equal to array extent"
 msgstr "la longitud de 'dimnames' [%d] no es igual a la extensi�n del arreglo"
 
-#: src/main/attrib.c:1055 src/main/builtin.c:75 src/main/builtin.c:112
-#: src/main/envir.c:1606 src/main/envir.c:1734 src/main/envir.c:1796
-#: src/main/envir.c:1918 src/main/paste.c:74 src/main/paste.c:293
-#: src/main/random.c:487 src/main/random.c:516 src/main/unique.c:1749
+#: src/main/attrib.c:1152 src/main/builtin.c:75 src/main/builtin.c:112
+#: src/main/envir.c:1740 src/main/envir.c:1868 src/main/envir.c:1928
+#: src/main/envir.c:2065 src/main/paste.c:74 src/main/paste.c:293
+#: src/main/random.c:479 src/main/random.c:508 src/main/unique.c:1746
 msgid "invalid first argument"
 msgstr "primer argumento inv�lido"
 
-#: src/main/attrib.c:1058
+#: src/main/attrib.c:1155
 msgid "invalid second argument"
 msgstr "segundo argumento inv�lido"
 
-#: src/main/attrib.c:1066
+#: src/main/attrib.c:1163
 msgid "length-0 dimension vector is invalid"
 msgstr "vector de dimensi�n de longitud 0 es inv�lido"
 
-#: src/main/attrib.c:1071
+#: src/main/attrib.c:1168
 msgid "the dims contain missing values"
 msgstr "el dims contiene valores missing"
 
-#: src/main/attrib.c:1073
+#: src/main/attrib.c:1170
 msgid "the dims contain negative values"
 msgstr "el dims contiene valores negativos"
 
-#: src/main/attrib.c:1078
+#: src/main/attrib.c:1175
 #, fuzzy
 msgid "dims do not match the length of object"
 msgstr "dims [producto %d] no coincide con la longitud del objeto [%d]"
 
-#: src/main/attrib.c:1080
+#: src/main/attrib.c:1177
 #, c-format
 msgid "dims [product %d] do not match the length of object [%d]"
 msgstr "dims [producto %d] no coincide con la longitud del objeto [%d]"
 
-#: src/main/attrib.c:1177
+#: src/main/attrib.c:1284
 msgid "attributes must be a list or NULL"
 msgstr "los atributos deben estar en una lista o NULL"
 
-#: src/main/attrib.c:1182
+#: src/main/attrib.c:1289
 msgid "attributes must be named"
 msgstr "los atributos deben tener nombre"
 
-#: src/main/attrib.c:1186
+#: src/main/attrib.c:1293
 #, c-format
 msgid "all attributes must have names [%d does not]"
 msgstr "todos los atributos deben tener nombre [%d no lo tiene]"
 
-#: src/main/attrib.c:1285
+#: src/main/attrib.c:1393
 msgid "'which' must be of mode character"
 msgstr "which' debe ser de modo car�cter"
 
-#: src/main/attrib.c:1287
+#: src/main/attrib.c:1395
 msgid "exactly one attribute 'which' must be given"
 msgstr "exactamente 1 atributo 'which' debe ser especificado"
 
-#: src/main/attrib.c:1345 src/main/attrib.c:1368 src/main/subscript.c:240
-#: src/main/subscript.c:244 src/main/subset.c:1188 src/main/subset.c:1239
+#: src/main/attrib.c:1456 src/main/attrib.c:1479 src/main/subscript.c:245
+#: src/main/subscript.c:249 src/main/subset.c:1257 src/main/subset.c:1311
 #, c-format
 msgid "partial match of '%s' to '%s'"
 msgstr " encuentros parciales de '%s' to '%s'"
 
-#: src/main/attrib.c:1406
+#: src/main/attrib.c:1525
 #, fuzzy, c-format
 msgid "invalid type '%s' for slot name"
 msgstr "tipo o longitud inv�lido para el nombre de slot"
 
-#: src/main/attrib.c:1444
+#: src/main/attrib.c:1563
 msgid "'name' must be non-null character string"
 msgstr "'name' debe ser una cadena de caracteres no nula"
 
-#: src/main/attrib.c:1568 src/main/attrib.c:1639 src/main/attrib.c:1676
+#: src/main/attrib.c:1688 src/main/attrib.c:1759 src/main/attrib.c:1797
 msgid "invalid type or length for slot name"
 msgstr "tipo o longitud inv�lido para el nombre de slot"
 
-#: src/main/attrib.c:1602
+#: src/main/attrib.c:1722
 #, c-format
 msgid "cannot get a slot (\"%s\") from an object of type \"%s\""
 msgstr "no es posible obtener un slot (\"%s\") de un objeto de tipo \"%s\""
 
-#: src/main/attrib.c:1613
+#: src/main/attrib.c:1733
 #, c-format
 msgid "no slot of name \"%s\" for this object of class \"%s\""
 msgstr "no hay un slot de nombre \"%s\" para ese objeto de clase \"%s\""
 
-#: src/main/attrib.c:1630
+#: src/main/attrib.c:1750
 #, fuzzy
 msgid "attempt to set slot on NULL object"
 msgstr "se intenta especificar un atributo en un NULL"
 
-#: src/main/attrib.c:1671
+#: src/main/attrib.c:1792
 #, fuzzy
 msgid "formal classes cannot be used without the 'methods' package"
 msgstr "no pueden utilizarse clases formales  sin el paquete m�todos"
 
-#: src/main/attrib.c:1683
+#: src/main/attrib.c:1804
 #, c-format
 msgid ""
 "trying to get slot \"%s\" from an object of a basic class (\"%s\") with no "
@@ -1271,7 +1294,7 @@ msgstr ""
 "tentativa de obtener un slot \"%s\" de un objeto de una clase b�sica (\"%s"
 "\") sin slots"
 
-#: src/main/attrib.c:1687
+#: src/main/attrib.c:1808
 #, c-format
 msgid ""
 "trying to get slot \"%s\" from an object (class \"%s\") that is not an S4 "
@@ -1280,47 +1303,46 @@ msgstr ""
 "tentativa de obtener un slot \"%s\" de un objeto cuya clase (\"%s\") que no "
 "es un objecto clase S4"
 
-#: src/main/bind.c:161
+#: src/main/bind.c:164
 #, c-format
 msgid "resulting vector exceeds vector length limit in '%s'"
 msgstr "el vector resultante excede el limite del largo en '%s'"
 
-#: src/main/bind.c:291 src/main/bind.c:327 src/main/bind.c:376
-#: src/main/bind.c:449 src/main/bind.c:477
+#: src/main/bind.c:294 src/main/bind.c:330 src/main/bind.c:379
+#: src/main/bind.c:452 src/main/bind.c:480
 #, c-format
 msgid "type '%s' is unimplemented in '%s'"
 msgstr "tipo '%s' no esta implementado en  '%s'"
 
-#: src/main/bind.c:685
+#: src/main/bind.c:688
 msgid "repeated formal argument 'recursive'"
 msgstr "argumento formal repetido 'recursive'"
 
-#: src/main/bind.c:696
+#: src/main/bind.c:699
 msgid "repeated formal argument 'use.names'"
 msgstr "argumento formal repetido 'use.names'"
 
-#: src/main/bind.c:894
+#: src/main/bind.c:900
 msgid "argument not a list"
 msgstr "el argumento no es una lista"
 
-#: src/main/bind.c:1038 src/main/eval.c:2691 src/main/eval.c:2700
-#: src/main/objects.c:318 src/main/objects.c:354 src/main/objects.c:729
-#: src/main/objects.c:746 src/main/objects.c:753
+#: src/main/bind.c:1044 src/main/names.c:1273 src/main/names.c:1278
+#: src/main/names.c:1283 src/main/names.c:1288
 #, c-format
 msgid "class name too long in '%s'"
 msgstr "el nombre de la clase es muy largo en '%s'"
 
-#: src/main/bind.c:1114
+#: src/main/bind.c:1128
 #, fuzzy, c-format
 msgid "cannot create a matrix from type '%s'"
 msgstr "no es posible crear una matriz a partir de estos tipos"
 
-#: src/main/bind.c:1185
+#: src/main/bind.c:1198
 #, c-format
 msgid "number of rows of matrices must match (see arg %d)"
 msgstr "el n�mero de filas de las matrices debe coincidir (vea arg %d)"
 
-#: src/main/bind.c:1430
+#: src/main/bind.c:1455
 #, c-format
 msgid "number of columns of matrices must match (see arg %d)"
 msgstr "el n�mero de columnas de las matrices debe coincidir (vea arg %d)"
@@ -1329,218 +1351,255 @@ msgstr "el n
 msgid "vector size cannot be NA"
 msgstr "tama�o del vector no puede ser NA"
 
-#: src/main/builtin.c:49 src/main/builtin.c:57 src/main/sort.c:1303
+#: src/main/builtin.c:49 src/main/builtin.c:57 src/main/sort.c:1323
 msgid "vector size cannot be NA/NaN"
 msgstr "tama�o del vector no puede ser NA/NaN"
 
-#: src/main/builtin.c:50 src/main/builtin.c:58 src/main/sort.c:1304
+#: src/main/builtin.c:50 src/main/builtin.c:58 src/main/sort.c:1324
 msgid "vector size cannot be infinite"
 msgstr "tama�o del vector no puede ser infinito"
 
-#: src/main/builtin.c:51 src/main/builtin.c:59 src/main/builtin.c:916
-#: src/main/sort.c:1305
+#: src/main/builtin.c:51 src/main/builtin.c:59 src/main/builtin.c:950
+#: src/main/sort.c:1325
 msgid "vector size specified is too large"
 msgstr "tama�o del vector especificado es muy grande"
 
-#: src/main/builtin.c:84 src/main/builtin.c:93 src/main/builtin.c:293
-#: src/main/builtin.c:326 src/main/builtin.c:365 src/main/builtin.c:375
-#: src/main/coerce.c:1537 src/main/connections.c:3066 src/main/engine.c:2967
-#: src/main/envir.c:993 src/main/envir.c:1046 src/main/envir.c:1136
-#: src/main/envir.c:1615 src/main/envir.c:1739 src/main/envir.c:1807
-#: src/main/envir.c:1925 src/main/envir.c:2582 src/main/envir.c:2642
-#: src/main/envir.c:2922 src/main/envir.c:2951 src/main/envir.c:2972
-#: src/main/envir.c:2995 src/main/envir.c:3030 src/main/envir.c:3051
-#: src/main/envir.c:3357 src/main/envir.c:3362 src/main/eval.c:5318
-#: src/main/objects.c:197 src/main/objects.c:203 src/main/saveload.c:2070
-#: src/main/saveload.c:2364 src/main/serialize.c:2709
+#: src/main/builtin.c:84 src/main/builtin.c:93 src/main/builtin.c:304
+#: src/main/builtin.c:337 src/main/builtin.c:394 src/main/builtin.c:408
+#: src/main/coerce.c:1536 src/main/connections.c:3062 src/main/engine.c:2987
+#: src/main/envir.c:1001 src/main/envir.c:1054 src/main/envir.c:1210
+#: src/main/envir.c:1749 src/main/envir.c:1873 src/main/envir.c:1939
+#: src/main/envir.c:2072 src/main/envir.c:2791 src/main/envir.c:2877
+#: src/main/envir.c:3182 src/main/envir.c:3211 src/main/envir.c:3232
+#: src/main/envir.c:3255 src/main/envir.c:3290 src/main/envir.c:3311
+#: src/main/envir.c:3632 src/main/envir.c:3637 src/main/eval.c:6251
+#: src/main/objects.c:191 src/main/objects.c:199 src/main/saveload.c:2072
+#: src/main/saveload.c:2364 src/main/serialize.c:2755
 msgid "use of NULL environment is defunct"
 msgstr "no es posible usar un ambiente NULL"
 
-#: src/main/builtin.c:306
+#: src/main/builtin.c:250 src/main/builtin.c:263
+#, fuzzy
+msgid "argument is not a function"
+msgstr "el argumento no debe ser una funci�n"
+
+#: src/main/builtin.c:317
 msgid "replacement object is not an environment"
 msgstr "el objeto de reemplazo no es un entorno"
 
-#: src/main/builtin.c:331
+#: src/main/builtin.c:342
 msgid "'enclos' must be an environment"
 msgstr "'enclos' debe ser un entorno"
 
-#: src/main/builtin.c:352 src/main/builtin.c:370
+#: src/main/builtin.c:363 src/main/builtin.c:399
 msgid "argument is not an environment"
 msgstr "el argumento no es un entorno"
 
-#: src/main/builtin.c:354
+#: src/main/builtin.c:365
 msgid "the empty environment has no parent"
 msgstr "el entorno vacio no esta asociado"
 
-#: src/main/builtin.c:372
+#: src/main/builtin.c:401
 msgid "can not set parent of the empty environment"
 msgstr "no se puede fijar un entorno en el ambiente vac�o"
 
-#: src/main/builtin.c:380
+#: src/main/builtin.c:403
+#, fuzzy
+msgid "can not set the parent environment of a namespace"
+msgstr "no se puede fijar un entorno en el ambiente vac�o"
+
+#: src/main/builtin.c:405
+#, fuzzy
+msgid "can not set the parent environment of package imports"
+msgstr "no se puede fijar un entorno en el ambiente vac�o"
+
+#: src/main/builtin.c:413
 msgid "'parent' is not an environment"
 msgstr "'parent' no es un entorno"
 
-#: src/main/builtin.c:521 src/main/connections.c:3691
-#: src/main/connections.c:4068 src/main/connections.c:4102
-#: src/main/connections.c:4480 src/main/connections.c:4550
-#: src/main/connections.c:4759 src/main/connections.c:4763
-#: src/main/connections.c:5124 src/main/deparse.c:360 src/main/deparse.c:446
-#: src/main/serialize.c:2006
+#: src/main/builtin.c:556 src/main/connections.c:3687
+#: src/main/connections.c:4079 src/main/connections.c:4113
+#: src/main/connections.c:4491 src/main/connections.c:4561
+#: src/main/connections.c:4772 src/main/connections.c:4776
+#: src/main/connections.c:5199 src/main/deparse.c:369 src/main/deparse.c:458
+#: src/main/serialize.c:2045
 msgid "cannot write to this connection"
 msgstr "no es posible escribir en esa conexi�n"
 
-#: src/main/builtin.c:526 src/main/builtin.c:556
+#: src/main/builtin.c:561 src/main/builtin.c:591
 #, c-format
 msgid "invalid '%s' specification"
 msgstr "especificaci�n '%s' inv�lida"
 
-#: src/main/builtin.c:543
+#: src/main/builtin.c:578
 msgid "non-positive 'fill' argument will be ignored"
 msgstr "un argumento no positivo en 'fill' ser� ignorado"
 
-#: src/main/builtin.c:618
+#: src/main/builtin.c:653
 #, c-format
 msgid "argument %d (type '%s') cannot be handled by 'cat'"
 msgstr "el argumento %d (type '%s') no es soportado por 'cat'"
 
-#: src/main/builtin.c:763
+#: src/main/builtin.c:797
 #, c-format
 msgid "vector: cannot make a vector of mode '%s'."
 msgstr "vector: no es posible hacer un vector de modo '%s'."
 
-#: src/main/builtin.c:789
+#: src/main/builtin.c:823
 msgid "cannot set length of non-vector"
 msgstr "no es posible especificar la longitud de un objeto que no es un vector"
 
-#: src/main/builtin.c:897 src/main/builtin.c:907 src/main/options.c:637
+#: src/main/builtin.c:931 src/main/builtin.c:941 src/main/options.c:659
 msgid "invalid argument"
 msgstr "argumento no v�lido"
 
-#: src/main/builtin.c:899 src/main/builtin.c:909 src/main/builtin.c:911
-#: src/main/character.c:366 src/main/coerce.c:2765
+#: src/main/builtin.c:933 src/main/builtin.c:943 src/main/builtin.c:945
+#: src/main/character.c:525 src/main/coerce.c:2832
 msgid "invalid value"
 msgstr "valor no v�lido"
 
-#: src/main/builtin.c:942 src/main/coerce.c:2478 src/main/coerce.c:2519
-#: src/main/eval.c:563 src/main/eval.c:683 src/main/eval.c:2099
-#: src/main/eval.c:2176 src/main/eval.c:2236 src/main/eval.c:2569
-#: src/main/eval.c:4694 src/main/eval.c:4814
+#: src/main/builtin.c:976 src/main/coerce.c:2541 src/main/coerce.c:2584
+#: src/main/eval.c:620 src/main/eval.c:740 src/main/eval.c:2266
+#: src/main/eval.c:2346 src/main/eval.c:2407 src/main/eval.c:2745
+#: src/main/eval.c:5584 src/main/eval.c:5701
 msgid "'...' used in an incorrect context"
 msgstr "'...' usado en un contexto incorrecto"
 
-#: src/main/builtin.c:963
+#: src/main/builtin.c:998
 #, fuzzy, c-format
 msgid "duplicate 'switch' defaults: '%s' and '%s'"
 msgstr "duplicado de interuptores por defecto: '%s' y '%s'"
 
-#: src/main/builtin.c:996
+#: src/main/builtin.c:1031
 msgid "'EXPR' is missing"
 msgstr "'EXPR' esta perdida"
 
-#: src/main/builtin.c:1000 src/main/eval.c:5155
+#: src/main/builtin.c:1035 src/main/eval.c:6056
 #, fuzzy
 msgid "EXPR must be a length 1 vector"
 msgstr "switch: EXPR debe devolver un vector de longitud 1"
 
-#: src/main/builtin.c:1003
+#: src/main/builtin.c:1038 src/main/eval.c:6059
 #, c-format
 msgid ""
 "EXPR is a \"factor\", treated as integer.\n"
 " Consider using '%s' instead."
 msgstr ""
 
-#: src/main/character.c:105 src/main/character.c:108 src/main/character.c:132
-#: src/main/character.c:135
+#: src/main/builtin.c:1095 src/main/eval.c:6069 src/main/eval.c:6098
+#, fuzzy
+msgid "'switch' with no alternatives"
+msgstr ""
+"EXPR num�ricos son necesarios para el switch() sin alternativas con nombre"
+
+#: src/main/character.c:103 src/main/character.c:224
+#, fuzzy, c-format
+msgid "%d argument passed to '%s' which requires %d to %d"
+msgid_plural "%d arguments passed to '%s' which requires %d to %d"
+msgstr[0] "%d argumentos dados a '%s', que requeiren 1 o 2"
+msgstr[1] "%d argumentos dados a '%s', que requeiren 1 o 2"
+
+#: src/main/character.c:110 src/main/character.c:113 src/main/character.c:232
+#: src/main/character.c:235
 #, c-format
 msgid "'%s' requires a character vector"
 msgstr "%s' requiere un vector de caracteres"
 
-#: src/main/character.c:164
-#, c-format
-msgid ""
-"number of characters is not computable for element %d in \"bytes\" encoding"
+#: src/main/character.c:150 src/main/character.c:165 src/main/character.c:175
+#: src/main/character.c:203
+#, fuzzy, c-format
+msgid "invalid multibyte string, %s"
+msgstr "string multibyte %d inv�lida"
+
+#: src/main/character.c:159
+#, fuzzy, c-format
+msgid "number of characters is not computable in \"bytes\" encoding, %s"
 msgstr ""
 "n�mero de caracteres no es computable para el elemento %d en el \"bytes\" "
 "codificaci�n"
 
-#: src/main/character.c:169 src/main/character.c:197 src/main/character.c:653
-#: src/main/character.c:750
-#, c-format
-msgid "invalid multibyte string %d"
-msgstr "string multibyte %d inv�lida"
-
-#: src/main/character.c:185
-#, c-format
-msgid "width is not computable for element %d in \"bytes\" encoding"
+#: src/main/character.c:188
+#, fuzzy, c-format
+msgid "width is not computable for %s in \"bytes\" encoding"
 msgstr ""
 "el ancho no es computable para el elemento %d en el \"bytes\" codificaci�n"
 
-#: src/main/character.c:263
+#: src/main/character.c:311
 msgid "extracting substrings from a non-character object"
 msgstr ""
 "tentativa de extraer substrings de un objeto que no es de tipo car�cter"
 
-#: src/main/character.c:268 src/main/character.c:363
+#: src/main/character.c:321 src/main/character.c:522
 #, fuzzy
 msgid "invalid substring arguments"
 msgstr "argumento(s) string no v�lido"
 
-#: src/main/character.c:358
+#: src/main/character.c:361
+#, fuzzy
+msgid "non-character object(s)"
+msgstr "nombres de tipo no car�cter"
+
+#: src/main/character.c:517
 msgid "replacing substrings in a non-character object"
 msgstr "sustituci�n de substrings en un objeto que no es car�cter"
 
-#: src/main/character.c:551
+#: src/main/character.c:785
 msgid "the first argument must be a character vector"
 msgstr "el primer argumento debe ser un vector de caracteres"
 
-#: src/main/character.c:570
+#: src/main/character.c:822
 msgid "abbreviate used with non-ASCII chars"
 msgstr "abreviatura utilizada con caracteres no ASCII"
 
-#: src/main/character.c:591
+#: src/main/character.c:843
 msgid "non-character names"
 msgstr "nombres de tipo no car�cter"
 
-#: src/main/character.c:696 src/main/grep.c:159
+#: src/main/character.c:905 src/main/character.c:1002
+#, c-format
+msgid "invalid multibyte string %d"
+msgstr "string multibyte %d inv�lida"
+
+#: src/main/character.c:948 src/main/grep.c:163
 msgid "non-character argument"
 msgstr "argumento de tipo no-car�cter"
 
-#: src/main/character.c:805
+#: src/main/character.c:1057
 #, c-format
 msgid "decreasing range specification ('%lc-%lc')"
 msgstr "especificaci�n de rango decreciente ('%lc-%lc')"
 
-#: src/main/character.c:891
+#: src/main/character.c:1143
 #, c-format
 msgid "decreasing range specification ('%c-%c')"
 msgstr "especificaci�n de rango decreciente ('%c-%c')"
 
-#: src/main/character.c:1079
+#: src/main/character.c:1331
 msgid "invalid UTF-8 string 'old'"
 msgstr "string UTF-8  no v�lido  'old'"
 
-#: src/main/character.c:1085
+#: src/main/character.c:1337
 msgid "invalid multibyte string 'old'"
 msgstr "string multibyte 'old' inv�lida"
 
-#: src/main/character.c:1098
+#: src/main/character.c:1350
 msgid "invalid UTF-8 string 'new'"
 msgstr "string UTF-8  no v�lido  'new' "
 
-#: src/main/character.c:1104
+#: src/main/character.c:1356
 msgid "invalid multibyte string 'new'"
 msgstr "string multibyte 'new' inv�lida"
 
-#: src/main/character.c:1132 src/main/character.c:1221
+#: src/main/character.c:1384 src/main/character.c:1473
 msgid "'old' is longer than 'new'"
 msgstr "'old' es m�s largo que 'new'"
 
-#: src/main/character.c:1164
+#: src/main/character.c:1416
 #, c-format
 msgid "invalid input multibyte string %d"
 msgstr "string multibyte %d de entrada inv�lida"
 
-#: src/main/character.c:1271
+#: src/main/character.c:1523
 msgid "strtrim() requires a character vector"
 msgstr "strtrim() requiere un vector de caracteres"
 
@@ -1552,15 +1611,16 @@ msgstr "argumento 'mode' no v
 msgid "applies only to lists and vectors"
 msgstr "se aplica solamente a listas y vectores"
 
-#: src/main/coerce.c:77 src/main/errors.c:1208
+#: src/main/coerce.c:77 src/main/errors.c:1194
 msgid "NAs introduced by coercion"
 msgstr "NAs introducidos por coerci�n"
 
-#: src/main/coerce.c:79 src/main/errors.c:1209
-msgid "inaccurate integer conversion in coercion"
-msgstr "conversi�n entera imprecisa en la coerci�n"
+#: src/main/coerce.c:79
+#, fuzzy
+msgid "NAs introduced by coercion to integer range"
+msgstr "NAs introducidos por coerci�n"
 
-#: src/main/coerce.c:81 src/main/errors.c:1210
+#: src/main/coerce.c:81 src/main/errors.c:1196
 msgid "imaginary parts discarded in coercion"
 msgstr "partes imaginarias descartadas en la coerci�n"
 
@@ -1568,59 +1628,63 @@ msgstr "partes imaginarias descartadas en la coerci
 msgid "out-of-range values treated as 0 in coercion to raw"
 msgstr "valores fuera de rango tratados como 0 en la coerci�n a crudo (raw)"
 
-#: src/main/coerce.c:414
+#: src/main/coerce.c:399
 #, c-format
 msgid "invalid data of mode '%s' (too short)"
 msgstr "dato inv�lido de modo '%s' (muy corto)"
 
-#: src/main/coerce.c:1016
+#: src/main/coerce.c:1002
 #, c-format
 msgid "'pairlist' object cannot be coerced to type '%s'"
 msgstr "el objeto 'pairlist' no puede ser coercionado a '%s'"
 
-#: src/main/coerce.c:1134
+#: src/main/coerce.c:1120
 #, c-format
 msgid "(list) object cannot be coerced to type '%s'"
 msgstr "el objeto (list) no puede ser coercionado a '%s'"
 
-#: src/main/coerce.c:1157
+#: src/main/coerce.c:1143
 #, fuzzy, c-format
 msgid "(symbol) object cannot be coerced to type '%s'"
 msgstr "el objeto (list) no puede ser coercionado a '%s'"
 
-#: src/main/coerce.c:1173 src/main/coerce.c:1485
+#: src/main/coerce.c:1159 src/main/coerce.c:1484
 msgid "no method for coercing this S4 class to a vector"
 msgstr "ning�n m�todo para coaccionar a esta clase S4 a un vector"
 
-#: src/main/coerce.c:1232
+#: src/main/coerce.c:1222
 msgid "environments cannot be coerced to other types"
 msgstr "los entornos no son coercionables a otros tipos"
 
-#: src/main/coerce.c:1379
+#: src/main/coerce.c:1374
 msgid "attempting to coerce non-factor"
 msgstr "intento de coaccionar un objeto diferente a un factor"
 
-#: src/main/coerce.c:1533
+#: src/main/coerce.c:1379 src/main/coerce.c:1389
+msgid "malformed factor"
+msgstr ""
+
+#: src/main/coerce.c:1532
 msgid "list argument expected"
 msgstr "argumento de lista esperado"
 
-#: src/main/coerce.c:1541 src/main/eval.c:5322
+#: src/main/coerce.c:1540 src/main/eval.c:6255
 msgid "invalid environment"
 msgstr "entorno inv�lido"
 
-#: src/main/coerce.c:1545
+#: src/main/coerce.c:1544
 msgid "argument must have length at least 1"
 msgstr "el argumento debe tener al menos longitud 1"
 
-#: src/main/coerce.c:1567
+#: src/main/coerce.c:1566
 msgid "invalid body for function"
 msgstr "cuerpo inv�lido para la funci�n"
 
-#: src/main/coerce.c:1590
+#: src/main/coerce.c:1589
 msgid "invalid length 0 argument"
 msgstr "longitud 0 del argumento inv�lida"
 
-#: src/main/coerce.c:1605
+#: src/main/coerce.c:1604
 msgid "invalid argument list"
 msgstr "argumento de lista inv�lido"
 
@@ -1632,50 +1696,47 @@ msgstr "tipo \"single\" no implementado en R"
 msgid "unimplemented predicate"
 msgstr "predicado no implementado"
 
-#: src/main/coerce.c:2069
+#: src/main/coerce.c:2070
 #, c-format
 msgid "%s() applied to non-(list or vector) of type '%s'"
 msgstr "%s() aplicado a un objeto que no es (lista o vector) de tipo '%s"
 
-#: src/main/coerce.c:2212 src/main/coerce.c:2275 src/main/coerce.c:2343
+#: src/main/coerce.c:2267 src/main/coerce.c:2331 src/main/coerce.c:2403
 #, fuzzy, c-format
 msgid "default method not implemented for type '%s'"
 msgstr "tipo no implementado '%s' en '%s'\n"
 
-#: src/main/coerce.c:2361
+#: src/main/coerce.c:2425
 msgid "'name' is missing"
 msgstr "nombre esta perdido"
 
-#: src/main/coerce.c:2368
+#: src/main/coerce.c:2432
 msgid "first argument must be a character string"
 msgstr "el primer argumento debe ser un string de caracteres"
 
-#: src/main/coerce.c:2401
-msgid "'what' must be a character string or a function"
-msgstr "que debe ser un string de caracteres o una funci�n"
+#: src/main/coerce.c:2464
+#, fuzzy
+msgid "'what' must be a function or character string"
+msgstr "'text' debe ser un string de caracteres"
 
-#: src/main/coerce.c:2405
+#: src/main/coerce.c:2468
 #, fuzzy
 msgid "'args' must be a list or expression"
 msgstr "'args' debe ser una lista"
 
-#: src/main/coerce.c:2408
-msgid "'args' must be a list"
-msgstr "'args' debe ser una lista"
-
-#: src/main/coerce.c:2412
+#: src/main/coerce.c:2475 src/main/unique.c:1345
 msgid "'envir' must be an environment"
 msgstr "'envir' debe ser un entorno"
 
-#: src/main/coerce.c:2567
+#: src/main/coerce.c:2634
 msgid "invalid environment specified"
 msgstr "entorno especificado inv�lido"
 
-#: src/main/coerce.c:2633
+#: src/main/coerce.c:2700
 msgid "Setting class(x) to NULL;   result will no longer be an S4 object"
 msgstr "Configuraci�n de clase (x) a NULL; resultado ya no ser� un objeto S4"
 
-#: src/main/coerce.c:2636
+#: src/main/coerce.c:2703
 #, c-format
 msgid ""
 "Setting class(x) to multiple strings (\"%s\", \"%s\", ...); result will no "
@@ -1684,7 +1745,7 @@ msgstr ""
 "Configuraci�n de clase (x) a varias cadenas (\"%s \", \"%s \", ...); "
 "resultado ya no ser� un objeto S4"
 
-#: src/main/coerce.c:2640
+#: src/main/coerce.c:2707
 #, c-format
 msgid ""
 "Setting class(x) to \"%s\" sets attribute to NULL; result will no longer be "
@@ -1693,11 +1754,11 @@ msgstr ""
 "Configuraci�n de clase(x) a \"%s\" establece atribuibles a NULL; resultado "
 "ya no ser� un objeto S4"
 
-#: src/main/coerce.c:2673
+#: src/main/coerce.c:2740
 msgid "invalid replacement object to be a class string"
 msgstr "objeto inv�lido de reemplazo de clase string "
 
-#: src/main/coerce.c:2694
+#: src/main/coerce.c:2761
 #, c-format
 msgid ""
 "\"%s\" can only be set as the class if the object has this type; found \"%s\""
@@ -1705,7 +1766,7 @@ msgstr ""
 "\"%s\" s�lo puede ser puesto como clase si el objeto tiene el tipo;  "
 "encontrado \"%s\""
 
-#: src/main/coerce.c:2712
+#: src/main/coerce.c:2779
 #, c-format
 msgid ""
 "invalid to set the class to matrix unless the dimension attribute is of "
@@ -1714,654 +1775,659 @@ msgstr ""
 "inv�lido poner la clase como matriz a menos que la dimensi�n del  atributo "
 "sea de longitud 2 (era %d)"
 
-#: src/main/coerce.c:2720
+#: src/main/coerce.c:2787
 msgid ""
 "cannot set class to \"array\" unless the dimension attribute has length > 0"
 msgstr ""
 "no es posible especificar la clase como \"array\" a menos que la dimensi�n "
 "del atributo tenga longitud > 0"
 
-#: src/main/coerce.c:2756
+#: src/main/coerce.c:2823
 msgid "'value' must be non-null character string"
 msgstr "'value' debe ser una cadena de caracteres no nula"
 
-#: src/main/coerce.c:2769
+#: src/main/coerce.c:2836
 msgid "invalid to change the storage mode of a factor"
 msgstr "cambio no valido en el contenido de un factor"
 
-#: src/main/complex.c:126
+#: src/main/complex.c:123
 msgid "invalid complex unary operator"
 msgstr "operador singular complejo inv�lido"
 
-#: src/main/complex.c:261
+#: src/main/complex.c:251
 msgid "unimplemented complex operation"
 msgstr "operaci�n compleja no implementada"
 
-#: src/main/complex.c:363
+#: src/main/complex.c:353
 msgid "non-numeric argument to function"
 msgstr "argumento no num�rico para la funci�n"
 
-#: src/main/complex.c:827
+#: src/main/complex.c:822
 msgid "invalid polynomial coefficient"
 msgstr "coeficiente polinomial inv�lido"
 
-#: src/main/complex.c:832
+#: src/main/complex.c:827
 msgid "root finding code failed"
 msgstr "fall� la ra�z que encuentra el c�digo"
 
-#: src/main/connections.c:153
+#: src/main/connections.c:150
 msgid "all connections are in use"
 msgstr "todas las conexiones est�n en uso"
 
-#: src/main/connections.c:164
+#: src/main/connections.c:161
 msgid "connection not found"
 msgstr "conexi�n no encontrada"
 
-#: src/main/connections.c:175
+#: src/main/connections.c:172 src/main/connections.c:5213
 msgid "invalid connection"
 msgstr "conexi�n inv�lida"
 
-#: src/main/connections.c:207
+#: src/main/connections.c:204
 #, c-format
 msgid "closing unused connection %d (%s)\n"
 msgstr "cerrando la conenexion %d (%s) que no esta siendo utilizada \n"
 
-#: src/main/connections.c:232 src/main/sysutils.c:619 src/main/sysutils.c:806
-#: src/main/sysutils.c:821 src/main/sysutils.c:912 src/main/sysutils.c:927
-#: src/main/sysutils.c:1023 src/main/sysutils.c:1096 src/main/sysutils.c:1106
-#: src/main/sysutils.c:1119 src/main/sysutils.c:1516
+#: src/main/connections.c:229 src/main/sysutils.c:631 src/main/sysutils.c:834
+#: src/main/sysutils.c:849 src/main/sysutils.c:978 src/main/sysutils.c:1051
+#: src/main/sysutils.c:1061 src/main/sysutils.c:1074 src/main/sysutils.c:1472
 #, c-format
 msgid "unsupported conversion from '%s' to '%s'"
 msgstr "conversi�n no soportada de '%s' a '%s"
 
-#: src/main/connections.c:288 src/main/connections.c:304
-#: src/main/connections.c:456 src/main/connections.c:462
-#: src/main/connections.c:468 src/main/connections.c:479
-#: src/main/connections.c:486
+#: src/main/connections.c:285 src/main/connections.c:300
+#: src/main/connections.c:451 src/main/connections.c:456
+#: src/main/connections.c:461 src/main/connections.c:472
+#: src/main/connections.c:478
 #, c-format
 msgid "%s not enabled for this connection"
 msgstr "%s  b�squeda no habilitada para esta conexi�n"
 
-#: src/main/connections.c:335 src/main/connections.c:352
-#: src/main/connections.c:2916
+#: src/main/connections.c:330 src/main/connections.c:347
+#: src/main/connections.c:2910
 msgid "printing of extremely long output is truncated"
 msgstr "impresi�n de longitud extremadamente larga est� truncada"
 
-#: src/main/connections.c:375
+#: src/main/connections.c:370
 msgid "invalid char string in output conversion"
 msgstr "string de caracteres inv�lidos en la conversi�n de salida"
 
-#: src/main/connections.c:439
+#: src/main/connections.c:434
 #, c-format
 msgid "invalid input found on input connection '%s'"
 msgstr "entrada inv�lida encontrada en la conexi�n de entrada '%s'"
 
-#: src/main/connections.c:580
+#: src/main/connections.c:571
 #, fuzzy, c-format
 msgid "cannot open file '%ls': %s"
 msgstr "no fue posible abrir el archivo '%s': %s"
 
-#: src/main/connections.c:691
+#: src/main/connections.c:683
 msgid "connection is not open for reading"
 msgstr "la conexi�n no est� abierta para la lectura"
 
-#: src/main/connections.c:696
+#: src/main/connections.c:688
 msgid "connection is not open for writing"
 msgstr "la conexi�n no est� abierta para la escritura"
 
-#: src/main/connections.c:734 src/main/connections.c:2229
+#: src/main/connections.c:726 src/main/connections.c:2223
 msgid "can only truncate connections open for writing"
 msgstr "s�lo pueden truncarse conexiones abiertas para la escritura"
 
-#: src/main/connections.c:738 src/main/connections.c:740
+#: src/main/connections.c:730 src/main/connections.c:732
 msgid "file truncation failed"
 msgstr "falla en el truncamiento del archivo"
 
-#: src/main/connections.c:742
+#: src/main/connections.c:734
 msgid "file truncation unavailable on this platform"
 msgstr "el truncamiento de archivo no est� disponible en esta plataforma"
 
-#: src/main/connections.c:788 src/main/connections.c:792
-#: src/main/connections.c:798 src/main/connections.c:815
+#: src/main/connections.c:780 src/main/connections.c:784
+#: src/main/connections.c:790 src/main/connections.c:807
 msgid "allocation of file connection failed"
 msgstr "falla en la asignaci�n de conexi�n del archivo"
 
-#: src/main/connections.c:866 src/main/connections.c:1044
+#: src/main/connections.c:858 src/main/connections.c:1035
 #, c-format
 msgid "cannot create fifo '%s', reason '%s'"
 msgstr "no fue posible crear fifo '%s', motivo '%s'"
 
-#: src/main/connections.c:872
+#: src/main/connections.c:864
 #, c-format
 msgid "'%s' exists but is not a fifo"
 msgstr "'%s' existe pero no es un fifo"
 
-#: src/main/connections.c:886
+#: src/main/connections.c:878
 #, c-format
 msgid "fifo '%s' is not ready"
 msgstr "fifo '%s' no est� listo"
 
-#: src/main/connections.c:887
+#: src/main/connections.c:879
 #, c-format
 msgid "cannot open fifo '%s'"
 msgstr "no fue posible abrir fifo '%s'"
 
-#: src/main/connections.c:928 src/main/connections.c:939
-#: src/main/connections.c:1104 src/main/connections.c:1123
-#: src/main/connections.c:1531 src/main/connections.c:1541
-#: src/main/connections.c:1660 src/main/connections.c:1720
-#: src/main/connections.c:2246 src/main/connections.c:2263
-#: src/main/connections.c:2572 src/main/connections.c:5305
-#: src/main/connections.c:5369
+#: src/main/connections.c:920 src/main/connections.c:931
+#: src/main/connections.c:1095 src/main/connections.c:1114
+#: src/main/connections.c:1524 src/main/connections.c:1534
+#: src/main/connections.c:1653 src/main/connections.c:1713
+#: src/main/connections.c:2240 src/main/connections.c:2257
+#: src/main/connections.c:2566 src/main/connections.c:5385
+#: src/main/connections.c:5449
 msgid "too large a block specified"
 msgstr "bloque especificado demasiado largo"
 
-#: src/main/connections.c:998 src/main/connections.c:1004
+#: src/main/connections.c:989 src/main/connections.c:995
 #, fuzzy
 msgid "allocation of fifo name failed"
 msgstr "falla en la asignaci�n de conexi�n fifo"
 
-#: src/main/connections.c:1066
+#: src/main/connections.c:1057
 #, fuzzy, c-format
 msgid "cannot open fifo '%s', reason '%s'"
 msgstr "no fue posible abrir el archivo '%s', motivo '%s'"
 
-#: src/main/connections.c:1107 src/main/connections.c:1131
+#: src/main/connections.c:1098 src/main/connections.c:1122
 #, fuzzy
 msgid "allocation of fifo buffer failed"
 msgstr "falla en la asignaci�n de conexi�n fifo"
 
-#: src/main/connections.c:1139
+#: src/main/connections.c:1130
 #, fuzzy, c-format
 msgid "cannot write FIFO '%s'"
 msgstr "no fue posible abrir la URL '%s'"
 
-#: src/main/connections.c:1175 src/main/connections.c:1179
-#: src/main/connections.c:1185 src/main/connections.c:1201
+#: src/main/connections.c:1166 src/main/connections.c:1170
+#: src/main/connections.c:1176 src/main/connections.c:1192
 msgid "allocation of fifo connection failed"
 msgstr "falla en la asignaci�n de conexi�n fifo"
 
-#: src/main/connections.c:1219 src/main/connections.c:1377
-#: src/main/connections.c:1998 src/main/connections.c:3212
-#: src/main/connections.c:4967
+#: src/main/connections.c:1210 src/main/connections.c:1369
+#: src/main/connections.c:1991 src/main/connections.c:3205
+#: src/main/connections.c:4982
 msgid "only first element of 'description' argument used"
 msgstr "s�lo fue usado el primer elemento del argumento 'description' "
 
-#: src/main/connections.c:1236
+#: src/main/connections.c:1227
 msgid ""
 "fifo(\"\") only supports open = \"w+\" and open = \"w+b\": using the former"
 msgstr ""
 "fifo(\"\") permite solamente open = \"w+\" y open = \"w+b\": se us� la "
 "primera opci�n"
 
-#: src/main/connections.c:1250 src/main/connections.c:1414
-#: src/main/connections.c:2064 src/main/connections.c:3179
-#: src/main/connections.c:3232 src/main/connections.c:3280
-#: src/main/connections.c:3567 src/main/connections.c:3683
-#: src/main/connections.c:3844 src/main/connections.c:4095
-#: src/main/connections.c:4423 src/main/connections.c:4543
-#: src/main/connections.c:4755 src/main/connections.c:5105 src/main/dcf.c:94
-#: src/main/deparse.c:352 src/main/deparse.c:438 src/main/saveload.c:2267
-#: src/main/saveload.c:2350 src/main/scan.c:933 src/main/serialize.c:2175
-#: src/main/serialize.c:2226 src/main/source.c:265
+#: src/main/connections.c:1242 src/main/connections.c:1407
+#: src/main/connections.c:2058 src/main/connections.c:3175
+#: src/main/connections.c:3226 src/main/connections.c:3274
+#: src/main/connections.c:3563 src/main/connections.c:3679
+#: src/main/connections.c:3841 src/main/connections.c:4106
+#: src/main/connections.c:4434 src/main/connections.c:4554
+#: src/main/connections.c:4768 src/main/connections.c:5180 src/main/dcf.c:93
+#: src/main/deparse.c:361 src/main/deparse.c:450 src/main/saveload.c:2269
+#: src/main/saveload.c:2350 src/main/scan.c:933 src/main/serialize.c:2216
+#: src/main/serialize.c:2267 src/main/source.c:270
 msgid "cannot open the connection"
 msgstr "no se puede abrir la conexi�n"
 
-#: src/main/connections.c:1265
+#: src/main/connections.c:1257
 msgid "fifo connections are not available on this system"
 msgstr "la conexi�n fifo no est� disponible en este sistema"
 
-#: src/main/connections.c:1295
+#: src/main/connections.c:1287
 #, fuzzy, c-format
 msgid "cannot pipe() cmd '%ls': %s"
 msgstr "no fue posible abrir el comando pipe() '%s' : %s"
 
-#: src/main/connections.c:1302
+#: src/main/connections.c:1294
 #, c-format
 msgid "cannot open pipe() cmd '%s': %s"
 msgstr "no fue posible abrir el comando pipe() '%s' : %s"
 
-#: src/main/connections.c:1471 src/main/connections.c:1791
+#: src/main/connections.c:1464 src/main/connections.c:1784
 #, fuzzy, c-format
 msgid "cannot open compressed file '%s', probable reason '%s'"
 msgstr "no fue posible abrir el archivo '%s', motivo '%s'"
 
-#: src/main/connections.c:1511
+#: src/main/connections.c:1504
 msgid "whence = \"end\" is not implemented for gzfile connections"
 msgstr "whence = \"end\" no est� implementado para la conexi�n gzfile"
 
-#: src/main/connections.c:1516
+#: src/main/connections.c:1509
 msgid "seek on a gzfile connection returned an internal error"
 msgstr "busca en una conexi�n gzfile retornando un error interno"
 
-#: src/main/connections.c:1550 src/main/connections.c:1554
-#: src/main/connections.c:1560 src/main/connections.c:1577
+#: src/main/connections.c:1543 src/main/connections.c:1547
+#: src/main/connections.c:1553 src/main/connections.c:1570
 msgid "allocation of gzfile connection failed"
 msgstr "falla en la asignaci�n de la conexi�n gzfile"
 
-#: src/main/connections.c:1606
+#: src/main/connections.c:1599
 #, fuzzy, c-format
 msgid "cannot open bzip2-ed file '%s', probable reason '%s'"
 msgstr "no fue posible abrir el archivo '%s', motivo '%s'"
 
-#: src/main/connections.c:1615
+#: src/main/connections.c:1608
 #, c-format
 msgid "file '%s' appears not to be compressed by bzip2"
 msgstr "el archivo '%s' parece no haber sido comprimido por bzip2"
 
-#: src/main/connections.c:1624
+#: src/main/connections.c:1617
 #, c-format
 msgid "initializing bzip2 compression for file '%s' failed"
 msgstr "inicializaci�n de la compresi�n bzip2 para el archivo '%s' fall� "
 
-#: src/main/connections.c:1678
+#: src/main/connections.c:1671
 #, fuzzy
 msgid "allocation of overflow buffer for bzfile failed"
 msgstr "falla en la asignaci�n de conexi�n del archivo"
 
-#: src/main/connections.c:1685
+#: src/main/connections.c:1678
 #, fuzzy, c-format
 msgid ""
 "file '%s' has trailing content that appears not to be compressed by bzip2"
 msgstr "el archivo '%s' parece no haber sido comprimido por bzip2"
 
-#: src/main/connections.c:1731 src/main/connections.c:1735
-#: src/main/connections.c:1741 src/main/connections.c:1758
+#: src/main/connections.c:1724 src/main/connections.c:1728
+#: src/main/connections.c:1734 src/main/connections.c:1751
 msgid "allocation of bzfile connection failed"
 msgstr "falla en la asignaci�n de la conecci�n bzfile"
 
-#: src/main/connections.c:1804 src/main/connections.c:5961
+#: src/main/connections.c:1797 src/main/connections.c:6046
 #, c-format
 msgid "cannot initialize lzma decoder, error %d"
 msgstr "No se puede inicializar decodificador lzma, error %d"
 
-#: src/main/connections.c:1820
+#: src/main/connections.c:1813
 #, c-format
 msgid "cannot initialize lzma encoder, error %d"
 msgstr "No se puede inicializar el codificador lzma, error %d"
 
-#: src/main/connections.c:1948 src/main/connections.c:1952
-#: src/main/connections.c:1958 src/main/connections.c:1976
+#: src/main/connections.c:1941 src/main/connections.c:1945
+#: src/main/connections.c:1951 src/main/connections.c:1969
 msgid "allocation of xzfile connection failed"
 msgstr "falla en la asignaci�n de la conexi�n xzfile"
 
-#: src/main/connections.c:2035
+#: src/main/connections.c:2028
 #, c-format
 msgid "this is a %s-compressed file which this build of R does not support"
 msgstr ""
 "Este es un %s archivo comprimido que no es compatible con esta versi�n de R"
 
-#: src/main/connections.c:2130 src/modules/X11/devX11.c:3375
+#: src/main/connections.c:2124 src/modules/X11/devX11.c:3381
 msgid "memory allocation to copy clipboard failed"
 msgstr "falla en la asignaci�n de memoria para copiar en el portapapeles"
 
-#: src/main/connections.c:2135 src/modules/X11/devX11.c:3354
-#: src/modules/X11/devX11.c:3359
+#: src/main/connections.c:2129 src/modules/X11/devX11.c:3360
+#: src/modules/X11/devX11.c:3365
 msgid "clipboard cannot be opened or contains no text"
 msgstr "no fue posible abrir el portapapeles o no contiene texto"
 
-#: src/main/connections.c:2146
+#: src/main/connections.c:2140
 msgid "memory allocation to open clipboard failed"
 msgstr "falla en la asignaci�n de memoria para abrir el portapapeles"
 
-#: src/main/connections.c:2174
+#: src/main/connections.c:2168
 #, fuzzy
 msgid "unable to open the clipboard"
 msgstr "no se puede abrir el �rea de transferencia "
 
-#: src/main/connections.c:2178
+#: src/main/connections.c:2172
 #, fuzzy
 msgid "unable to write to the clipboard"
 msgstr "no se puede escribir en el �rea de transferencia"
 
-#: src/main/connections.c:2218
+#: src/main/connections.c:2212
 msgid "attempt to seek outside the range of the clipboard"
 msgstr "tentativa de buscar fuera del rango del portapapeles"
 
-#: src/main/connections.c:2261
+#: src/main/connections.c:2255
 msgid "clipboard connection is open for reading only"
 msgstr "la conexi�n con el portapapeles est� abierta s�lo para lectura"
 
-#: src/main/connections.c:2281
+#: src/main/connections.c:2275
 msgid "clipboard buffer is full and output lost"
 msgstr "el buffer del portapapeles est� lleno y la salida se perdi�"
 
-#: src/main/connections.c:2302
+#: src/main/connections.c:2296
 msgid "'mode' for the clipboard must be 'r' or 'w'"
 msgstr "'mode' para el portapapeles debe ser 'r' o 'w'"
 
-#: src/main/connections.c:2305
+#: src/main/connections.c:2299
 msgid "'mode' for the clipboard must be 'r' on Unix"
 msgstr "'mode' para el portapapeles debe ser 'r' en Unix"
 
-#: src/main/connections.c:2308 src/main/connections.c:2314
-#: src/main/connections.c:2320 src/main/connections.c:2337
+#: src/main/connections.c:2302 src/main/connections.c:2308
+#: src/main/connections.c:2314 src/main/connections.c:2331
 msgid "allocation of clipboard connection failed"
 msgstr "la conexi�n para asignaci�n del portapapeles fall�"
 
-#: src/main/connections.c:2406 src/main/connections.c:2410
-#: src/main/connections.c:2416
+#: src/main/connections.c:2400 src/main/connections.c:2404
+#: src/main/connections.c:2410
 msgid "allocation of terminal connection failed"
 msgstr "la conexi�n para asignaci�n de terminal fall� "
 
-#: src/main/connections.c:2549
+#: src/main/connections.c:2543
 msgid "attempting to add too many elements to raw vector"
 msgstr "intentando a�adir demasiados elementos en vector"
 
-#: src/main/connections.c:2601
+#: src/main/connections.c:2595
 msgid "attempt to seek outside the range of the raw connection"
 msgstr "tentativa de buscar fuera del alcance de la conexi�n basica "
 
-#: src/main/connections.c:2612 src/main/connections.c:2616
-#: src/main/connections.c:2622 src/main/connections.c:2648
+#: src/main/connections.c:2606 src/main/connections.c:2610
+#: src/main/connections.c:2616 src/main/connections.c:2642
 msgid "allocation of raw connection failed"
 msgstr "fallo de asignaci�n de la conexi�n b�sica"
 
-#: src/main/connections.c:2701
+#: src/main/connections.c:2695
 msgid "'con' is not a rawConnection"
 msgstr "'con' no es una conexi�n b�sica"
 
-#: src/main/connections.c:2704
+#: src/main/connections.c:2698
 msgid "'con' is not an output rawConnection"
 msgstr "'con' no es un resultado de una conexi�n b�sica"
 
-#: src/main/connections.c:2742
+#: src/main/connections.c:2736
 #, fuzzy
 msgid "too many characters for text connection"
 msgstr "no puede asignar memoria para la conexi�n de texto"
 
-#: src/main/connections.c:2747
+#: src/main/connections.c:2741
 msgid "cannot allocate memory for text connection"
 msgstr "no puede asignar memoria para la conexi�n de texto"
 
-#: src/main/connections.c:2796
+#: src/main/connections.c:2790
 msgid "seek is not relevant for text connection"
 msgstr "la b�squeda no es relevante para la conexi�n de texto"
 
-#: src/main/connections.c:2804 src/main/connections.c:2808
-#: src/main/connections.c:2814 src/main/connections.c:2827
-#: src/main/connections.c:3012 src/main/connections.c:3016
-#: src/main/connections.c:3022 src/main/connections.c:3035
-#: src/main/connections.c:3041
+#: src/main/connections.c:2798 src/main/connections.c:2802
+#: src/main/connections.c:2808 src/main/connections.c:2821
+#: src/main/connections.c:3008 src/main/connections.c:3012
+#: src/main/connections.c:3018 src/main/connections.c:3031
+#: src/main/connections.c:3037
 msgid "allocation of text connection failed"
 msgstr "la conexi�n para asignaci�n de texto fall�"
 
-#: src/main/connections.c:2989
+#: src/main/connections.c:2983
 msgid "text connection: appending to a non-existent char vector"
 msgstr "conexi�n de texto: agregando a un vector de caracteres no existente"
 
-#: src/main/connections.c:3093
+#: src/main/connections.c:3089
 msgid "unsupported mode"
 msgstr "modo sin soporte"
 
-#: src/main/connections.c:3115
+#: src/main/connections.c:3111
 msgid "'con' is not a textConnection"
 msgstr "'con' no es una conexi�n de texto"
 
-#: src/main/connections.c:3118
+#: src/main/connections.c:3114
 msgid "'con' is not an output textConnection"
 msgstr "'con' no es una salida de una conexi�n de texto"
 
-#: src/main/connections.c:3192
-msgid "sockets are not available on this system"
-msgstr "sockets no est�n disponibles en este sistema"
-
-#: src/main/connections.c:3260 src/main/connections.c:3309
-#: src/main/connections.c:3320 src/main/connections.c:3367
-#: src/main/connections.c:3392 src/main/connections.c:3415
-#: src/main/connections.c:3427 src/main/connections.c:3543
-#: src/main/connections.c:3668 src/main/connections.c:5408
+#: src/main/connections.c:3254 src/main/connections.c:3303
+#: src/main/connections.c:3314 src/main/connections.c:3361
+#: src/main/connections.c:3388 src/main/connections.c:3411
+#: src/main/connections.c:3423 src/main/connections.c:3539
+#: src/main/connections.c:3664 src/main/connections.c:5489
 msgid "'con' is not a connection"
 msgstr "'con' no es una conexi�n"
 
-#: src/main/connections.c:3263
+#: src/main/connections.c:3257
 msgid "cannot open standard connections"
 msgstr "no se pueden abrir las conexiones est�ndar"
 
-#: src/main/connections.c:3265
+#: src/main/connections.c:3259
 msgid "connection is already open"
 msgstr "la conexi�n ya est� abierta"
 
-#: src/main/connections.c:3298
+#: src/main/connections.c:3292
 msgid "unknown 'rw' value"
 msgstr "valor 'rw' desconocido"
 
-#: src/main/connections.c:3369
+#: src/main/connections.c:3363
 msgid "cannot close standard connections"
 msgstr "no se pueden cerrar las conexiones est�ndar"
 
-#: src/main/connections.c:3372
+#: src/main/connections.c:3366
 #, fuzzy
 msgid "cannot close 'output' sink connection"
 msgstr "no se puede cerrar la salida de conexi�n sink"
 
-#: src/main/connections.c:3374
+#: src/main/connections.c:3368
 #, fuzzy
 msgid "cannot close 'message' sink connection"
 msgstr "no se puede cerrar el mensaje de conexi�n sink"
 
-#: src/main/connections.c:3394 src/main/connections.c:5123
-#: src/main/connections.c:5131 src/main/serialize.c:1996
-#: src/main/serialize.c:2004
+#: src/main/connections.c:3390 src/main/connections.c:5198
+#: src/main/connections.c:5206 src/main/serialize.c:2035
+#: src/main/serialize.c:2043
 msgid "connection is not open"
 msgstr "la conexi�n no est� abierta"
 
-#: src/main/connections.c:3490 src/main/connections.c:3502
+#: src/main/connections.c:3486 src/main/connections.c:3498
 #, fuzzy
 msgid "line longer than buffer size"
 msgstr "L�nea m�s larga que el tama�o del buffer"
 
-#: src/main/connections.c:3574 src/main/connections.c:3576
-#: src/main/connections.c:3852 src/main/connections.c:4406
-#: src/main/connections.c:4431 src/main/connections.c:5132 src/main/dcf.c:101
-#: src/main/scan.c:936 src/main/scan.c:940 src/main/serialize.c:1998
-#: src/main/source.c:272
+#: src/main/connections.c:3570 src/main/connections.c:3572
+#: src/main/connections.c:3849 src/main/connections.c:4417
+#: src/main/connections.c:4442 src/main/connections.c:5207 src/main/dcf.c:100
+#: src/main/scan.c:936 src/main/scan.c:940 src/main/serialize.c:2037
+#: src/main/source.c:277
 msgid "cannot read from this connection"
 msgstr "no se puede leer desde esta conexi�n"
 
-#: src/main/connections.c:3588 src/main/connections.c:3610
+#: src/main/connections.c:3584 src/main/connections.c:3606
 msgid "cannot allocate buffer in readLines"
 msgstr "no se puede asignar buffer en readLines"
 
-#: src/main/connections.c:3623
+#: src/main/connections.c:3619
 #, c-format
 msgid "line %d appears to contain an embedded nul"
 msgstr ""
 
-#: src/main/connections.c:3640
+#: src/main/connections.c:3636
 #, fuzzy, c-format
 msgid "incomplete final line found on '%s'"
 msgstr " readLines encontr� la l�nea final incompleta en '%s'"
 
-#: src/main/connections.c:3646
+#: src/main/connections.c:3642
 msgid "too few lines read in readLines"
 msgstr "muy pocas l�neas le�das en readLines"
 
-#: src/main/connections.c:3749
+#: src/main/connections.c:3746
 msgid "incomplete string at end of file has been discarded"
 msgstr "se descart� un string incompleto al final del archivo"
 
-#: src/main/connections.c:3755
+#: src/main/connections.c:3752
 msgid "null terminator not found: breaking string at 10000 bytes"
 msgstr ""
 "terminador nulo no encontrado: partiendo string despu�s de 10000 caracteres"
 
-#: src/main/connections.c:3820
+#: src/main/connections.c:3817
 msgid "can only read from a binary connection"
 msgstr "s�lo se puede leer desde una conexi�n binaria"
 
-#: src/main/connections.c:3869 src/main/connections.c:4176
+#: src/main/connections.c:3866 src/main/connections.c:4187
 msgid "size changing is not supported for complex vectors"
 msgstr "el cambio de tama�o no tiene soporte para vectores complejos"
 
-#: src/main/connections.c:3907 src/main/connections.c:3925
-#: src/main/connections.c:3951 src/main/connections.c:4010
-#: src/main/connections.c:4030 src/main/connections.c:4157
-#: src/main/connections.c:4170 src/main/connections.c:4229
-#: src/main/connections.c:4261
+#: src/main/connections.c:3905 src/main/connections.c:3923
+#: src/main/connections.c:3949 src/main/connections.c:3993
+#: src/main/connections.c:4024 src/main/connections.c:4044
+#: src/main/connections.c:4168 src/main/connections.c:4181
+#: src/main/connections.c:4240 src/main/connections.c:4272
 #, c-format
 msgid "size %d is unknown on this machine"
 msgstr "tama�o %d desconocido en esta m�quina"
 
-#: src/main/connections.c:3936
+#: src/main/connections.c:3934
 msgid "raw is always of size 1"
 msgstr "modo raw es siempre de tama�o 1"
 
-#: src/main/connections.c:3959
+#: src/main/connections.c:3957
 msgid "'signed = FALSE' is only valid for integers of sizes 1 and 2"
 msgstr "'signed = FALSE' es solo valido para enteros de tama�o 1 y 2"
 
-#: src/main/connections.c:4060
+#: src/main/connections.c:4071
 msgid "'x' is not an atomic vector type"
 msgstr "'x' no es un vector de tipo at�mico"
 
-#: src/main/connections.c:4066
+#: src/main/connections.c:4077
 msgid "can only write to a binary connection"
 msgstr "s�lo se puede escribir en una conexi�n binaria"
 
-#: src/main/connections.c:4085
+#: src/main/connections.c:4096
 #, fuzzy
 msgid "only 2^31-1 bytes can be written to a raw vector"
 msgstr "solo formato ascii puede ser escrito en conexiones de modo texto"
 
-#: src/main/connections.c:4087
+#: src/main/connections.c:4098
 #, fuzzy
 msgid "only 2^31-1 bytes can be written in a single writeBin() call"
 msgstr "s�lo 2^31-1 bytes se pueden escribir en una sola llamada readBin ()"
 
-#: src/main/connections.c:4136 src/main/connections.c:4289
-#: src/main/connections.c:4570 src/main/connections.c:4610
+#: src/main/connections.c:4147 src/main/connections.c:4300
+#: src/main/connections.c:4581 src/main/connections.c:4621
 msgid "problem writing to connection"
 msgstr "problema al escribir en la conexi�n"
 
-#: src/main/connections.c:4181
+#: src/main/connections.c:4192
 msgid "size changing is not supported for raw vectors"
 msgstr "el cambio de tama�o no tiene soporte en vectores de tipo crudo (raw)"
 
-#: src/main/connections.c:4324 src/main/connections.c:4328
-#: src/main/connections.c:4367
+#: src/main/connections.c:4335 src/main/connections.c:4339
+#: src/main/connections.c:4378
 msgid "invalid UTF-8 input in readChar()"
 msgstr "entrada UTF-8 inv�lida en readChar()"
 
-#: src/main/connections.c:4434
+#: src/main/connections.c:4445
 msgid "can only read in bytes in a non-UTF-8 MBCS locale"
 msgstr "puede solo leer en bytes en un local  non-UTF-8 MBCS"
 
 # No se en que contexto va este mensaje, puede estar bien o mal traducido. Vos sabes?
-#: src/main/connections.c:4506
+#: src/main/connections.c:4517
 msgid "'object' is too short"
 msgstr "objecto demasiado peque�o"
 
-#: src/main/connections.c:4559
+#: src/main/connections.c:4570
 msgid "writeChar: more bytes requested than are in the string - will zero-pad"
 msgstr ""
 "writeChar: se requieren m�s bytes que los existentes en el string - ser�n "
 "reemplazados con cero"
 
-#: src/main/connections.c:4584
+#: src/main/connections.c:4595
 msgid ""
 "writeChar: more characters requested than are in the string - will zero-pad"
 msgstr ""
 "writeChar: se requieren m�s caracteres que los existentes en el string - "
 "ser�n reemplazados con cero"
 
-#: src/main/connections.c:4638
+#: src/main/connections.c:4649
 #, fuzzy
 msgid "maximum number of pushback lines exceeded"
 msgstr "excedido el n�mero m�ximo de colores"
 
-#: src/main/connections.c:4644 src/main/connections.c:4648
-#: src/main/connections.c:4685 src/main/connections.c:4693
+#: src/main/connections.c:4655 src/main/connections.c:4659
+#: src/main/connections.c:4696 src/main/connections.c:4704
 #, fuzzy
 msgid "could not allocate space for pushback"
 msgstr "no es posible asignar espacio para pushBack"
 
-#: src/main/connections.c:4676
+#: src/main/connections.c:4687
 msgid "can only push back on open readable connections"
 msgstr "s�lo puede dar vuelta en una conexi�n abierta para lectura"
 
-#: src/main/connections.c:4678
+#: src/main/connections.c:4689
 msgid "can only push back on text-mode connections"
 msgstr " s�lo puede dar vuelta en conexiones de modo texto"
 
-#: src/main/connections.c:4740 src/main/connections.c:4810
+#: src/main/connections.c:4753 src/main/connections.c:4823
 msgid "sink stack is full"
 msgstr "pila sink esta llena"
 
-#: src/main/connections.c:4743
+#: src/main/connections.c:4756
 msgid "cannot switch output to stdin"
 msgstr "no se puede cambiar la salida a stdin"
 
-#: src/main/connections.c:4770
+#: src/main/connections.c:4783
 msgid "no sink to remove"
 msgstr "ning�n sink para remover"
 
-#: src/main/connections.c:4892
+#: src/main/connections.c:4903
 #, fuzzy
 msgid "there is no connection NA"
 msgstr "No hay conexi�n %d"
 
-#: src/main/connections.c:4894
+#: src/main/connections.c:4905
 #, c-format
 msgid "there is no connection %d"
 msgstr "No hay conexi�n %d"
 
-#: src/main/connections.c:5029
+#: src/main/connections.c:5039
+#, fuzzy
+msgid "method = \"wininet\" is only supported on Windows"
+msgstr "esta plataforma no soporta nsl()"
+
+#: src/main/connections.c:5103
 msgid ""
 "file(\"\") only supports open = \"w+\" and open = \"w+b\": using the former"
 msgstr ""
 "file(\"\") permite solamente open = \"w+\" y open = \"w+b\": se us� la "
 "primera opci�n"
 
-#: src/main/connections.c:5083 src/modules/internet/internet.c:115
-#: src/modules/internet/internet.c:569
-msgid "unsupported URL scheme"
-msgstr "esquema de URL sin soporte"
+#: src/main/connections.c:5157
+#, fuzzy
+msgid "URL scheme unsupported by this method"
+msgstr "esta plataforma no soporta nsl()"
 
-#: src/main/connections.c:5173
+#: src/main/connections.c:5253
 msgid "file stream does not have gzip magic number"
 msgstr "flujo de archivos no tiene n�mero m�gico de gzip"
 
-#: src/main/connections.c:5184
+#: src/main/connections.c:5264
 msgid "file stream does not have valid gzip header"
 msgstr " flujo de archivos no tiene encabezado v�lido de gzip "
 
-#: src/main/connections.c:5249
+#: src/main/connections.c:5329
 msgid "writing error whilst flushing 'gzcon' connection"
 msgstr "error de escritura al vaciar la conexi�n 'gzcon'"
 
-#: src/main/connections.c:5351
+#: src/main/connections.c:5431
 #, c-format
 msgid "crc error %x %x\n"
 msgstr "error crc %x %x\n"
 
-#: src/main/connections.c:5378
+#: src/main/connections.c:5458
 msgid "write error on 'gzcon' connection"
 msgstr "error de escritura en la conexi�n 'gzcon'"
 
-#: src/main/connections.c:5412
+#: src/main/connections.c:5493
 msgid "'level' must be one of 0 ... 9"
 msgstr "'level' debe ser uno de 0 ... 9"
 
-#: src/main/connections.c:5415
+#: src/main/connections.c:5496
 msgid "'allowNonCompression' must be TRUE or FALSE"
 msgstr "'allowNonCompression' debe ser TRUE o FALSE"
 
-#: src/main/connections.c:5418
+#: src/main/connections.c:5499
+#, fuzzy
+msgid "'text' must be TRUE or FALSE"
+msgstr "'all.x' debe ser TRUE o FALSE"
+
+#: src/main/connections.c:5502
 #, fuzzy
 msgid "this is already a 'gzcon' connection"
 msgstr "esta ya es una conexi�n gzcon"
 
-#: src/main/connections.c:5424
+#: src/main/connections.c:5508
 msgid "can only use read- or write- binary connections"
 msgstr "solo se puede usar conexiones binarias de lectura- o escritura-"
 
-#: src/main/connections.c:5427
+#: src/main/connections.c:5511
 msgid "using a text-mode 'file' connection may not work correctly"
 msgstr ""
 "la conecci�n puede fallar si se usa un argumento en modo texto en 'file'"
 
-#: src/main/connections.c:5430
+#: src/main/connections.c:5514
 #, fuzzy
 msgid ""
 "cannot create a 'gzcon' connection from a writable textConnection; maybe use "
@@ -2370,76 +2436,72 @@ msgstr ""
 "no se puede crear una conexi�n gzcon de una escritura textConnection, tal "
 "vez el use rawConnection"
 
-#: src/main/connections.c:5433 src/main/connections.c:5437
-#: src/main/connections.c:5444 src/main/connections.c:5458
+#: src/main/connections.c:5517 src/main/connections.c:5521
+#: src/main/connections.c:5528 src/main/connections.c:5542
 msgid "allocation of 'gzcon' connection failed"
 msgstr "la conexi�n de asignaci�n 'gzcon' fall�"
 
-#: src/main/connections.c:5644
+#: src/main/connections.c:5729
 msgid "not a list of sockets"
 msgstr "no es una lista de sockets"
 
-#: src/main/connections.c:5649
+#: src/main/connections.c:5734
 msgid "bad write indicators"
 msgstr "indicadores de escritura defectuosos"
 
-#: src/main/connections.c:5660
+#: src/main/connections.c:5745
 msgid "not a socket connection"
 msgstr "no es una  conexi�n socket"
 
-#: src/main/connections.c:5905
+#: src/main/connections.c:5990
 msgid "unknown compression, assuming none"
 msgstr "compresi�n desconocido, en el supuesto ninguno"
 
-#: src/main/connections.c:6023 src/main/connections.c:6027
-#: src/main/connections.c:6033
+#: src/main/connections.c:6108 src/main/connections.c:6112
+#: src/main/connections.c:6118
 #, fuzzy, c-format
 msgid "allocation of %s connection failed"
 msgstr "fallo de asignaci�n de la conexi�n b�sica"
 
-#: src/main/context.c:282
+#: src/main/context.c:316
 #, fuzzy
 msgid "no loop for break/next, jumping to top level"
 msgstr "ning�n ciclo para romper, saltando a nivel superior"
 
-#: src/main/context.c:290
+#: src/main/context.c:324
 msgid "no function to return from, jumping to top level"
 msgstr "ninguna funci�n desde donde volver, saltando a nivel superior"
 
-#: src/main/context.c:302
+#: src/main/context.c:339
 msgid "target context is not on the stack"
 msgstr "contexto de destino no est� en la pila"
 
-#: src/main/context.c:324 src/main/context.c:340 src/main/context.c:407
-#: src/main/context.c:428 src/main/context.c:440 src/main/context.c:452
+#: src/main/context.c:361 src/main/context.c:377 src/main/context.c:444
+#: src/main/context.c:465 src/main/context.c:477 src/main/context.c:489
 msgid "not that many frames on the stack"
 msgstr "no hay tantas estructuras en la pila"
 
-#: src/main/context.c:357
+#: src/main/context.c:394
 msgid "only positive values of 'n' are allowed"
 msgstr "solamente se permiten valore positivos de 'n'"
 
-#: src/main/context.c:478
-msgid "no function to restart"
-msgstr "ninguna funci�n para reiniciar"
-
-#: src/main/context.c:515
+#: src/main/context.c:526
 msgid "number of contexts must be positive"
 msgstr "el n�mero de contextos debe ser positivo"
 
-#: src/main/context.c:528
+#: src/main/context.c:539
 msgid "no browser context to query"
 msgstr "no hay contexto en el navegador para la consulta"
 
-#: src/main/context.c:546
+#: src/main/context.c:557
 msgid "not that many calls to browser are active"
 msgstr "no es que muchas llamadas al navegador estan activas"
 
-#: src/main/context.c:560
+#: src/main/context.c:571
 msgid "not that many functions on the call stack"
 msgstr "no es que muchas funciones en la pila de llamadas"
 
-#: src/main/context.c:645
+#: src/main/context.c:656
 msgid "internal error in 'do_sys'"
 msgstr "error interno en 'do_sys'"
 
@@ -2448,40 +2510,40 @@ msgstr "error interno en 'do_sys'"
 msgid "integer overflow in 'cumsum'; use 'cumsum(as.numeric(.))'"
 msgstr "Exceso de capacidad (overflow) en 'cumsum'; use 'cumsum(as.numeric(.))"
 
-#: src/main/cum.c:178
+#: src/main/cum.c:179
 #, fuzzy
-msgid "'cummin' not defined for complex numbers"
+msgid "'cummax' not defined for complex numbers"
 msgstr "min/max no definido para n�meros complejos"
 
-#: src/main/cum.c:181
+#: src/main/cum.c:182
 #, fuzzy
-msgid "'cummax' not defined for complex numbers"
+msgid "'cummin' not defined for complex numbers"
 msgstr "min/max no definido para n�meros complejos"
 
-#: src/main/cum.c:206 src/main/cum.c:230
+#: src/main/cum.c:209 src/main/cum.c:236
 msgid "unknown cumxxx function"
 msgstr "funci�n cumxxx desconocida"
 
-#: src/main/datetime.c:548 src/main/datetime.c:556 src/main/datetime.c:570
-#: src/main/datetime.c:575
+#: src/main/datetime.c:554 src/main/datetime.c:562 src/main/datetime.c:576
+#: src/main/datetime.c:581
 msgid "problem with setting timezone"
 msgstr "problema  al establecer zona horaria"
 
-#: src/main/datetime.c:560
+#: src/main/datetime.c:566
 msgid "cannot set timezones on this system"
 msgstr "no se puede especificar el uso horario en este sistema"
 
-#: src/main/datetime.c:582 src/main/datetime.c:584
+#: src/main/datetime.c:588 src/main/datetime.c:590
 msgid "problem with unsetting timezone"
 msgstr "problema  al desestablecer zona horaria"
 
-#: src/main/datetime.c:804 src/main/datetime.c:806 src/main/datetime.c:901
-#: src/main/datetime.c:1240 src/main/datetime.c:1242
+#: src/main/datetime.c:810 src/main/datetime.c:812 src/main/datetime.c:908
+#: src/main/datetime.c:1258 src/main/datetime.c:1260
 #, fuzzy
 msgid "zero-length component in non-empty \"POSIXlt\" structure"
 msgstr "componente de longitud cero en estructura POSIXlt no vac�a"
 
-#: src/main/dcf.c:113 src/main/dcf.c:181 src/main/dcf.c:253
+#: src/main/dcf.c:112 src/main/dcf.c:181 src/main/dcf.c:253
 msgid "could not allocate memory for 'read.dcf'"
 msgstr "no se puede asignar memoria para 'read.dcf'"
 
@@ -2495,80 +2557,86 @@ msgstr "Se encontr
 msgid "Line starting '%s ...' is malformed!"
 msgstr "L�nea de inicio '%s ...esta mal formateada!"
 
-#: src/main/debug.c:45
-msgid "argument must be a closure"
-msgstr "argumento debe ser una clausura"
-
-#: src/main/debug.c:76
+#: src/main/debug.c:46 src/main/debug.c:76
 msgid "argument must be a function"
 msgstr "argumento debe ser una funci�n"
 
-#: src/main/debug.c:132 src/main/debug.c:166 src/main/debug.c:224
+#: src/main/debug.c:111
+#, fuzzy, c-format
+msgid "Value for '%s' must be TRUE or FALSE"
+msgstr "'all.x' debe ser TRUE o FALSE"
+
+#: src/main/debug.c:139 src/main/debug.c:167 src/main/debug.c:241
 msgid "argument must not be a function"
 msgstr "el argumento no debe ser una funci�n"
 
-#: src/main/debug.c:135
+#: src/main/debug.c:142
 msgid "cannot trace NULL"
 msgstr "no puede rastrearse NULL"
 
-#: src/main/debug.c:139
+#: src/main/debug.c:146
 msgid "'tracemem' is not useful for promise and environment objects"
 msgstr "no usar 'tracemem' para objetos esperados o del ambiente"
 
-#: src/main/debug.c:142
+#: src/main/debug.c:149
 msgid "'tracemem' is not useful for weak reference or external pointer objects"
 msgstr "no usar 'tracemem' para referencias d�biles u objetos externos"
 
-#: src/main/debug.c:148 src/main/debug.c:171
+#: src/main/debug.c:180 src/main/debug.c:187
 msgid "R was not compiled with support for memory profiling"
 msgstr "R no fue compilado con soporte para perfil de memoria 'R profiling' "
 
-#: src/main/deparse.c:152 src/main/sprintf.c:213 src/main/sprintf.c:245
+#: src/main/deparse.c:156 src/main/sprintf.c:216 src/main/sprintf.c:248
 msgid "too few arguments"
 msgstr "muy pocos argumentos"
 
-#: src/main/deparse.c:159
+#: src/main/deparse.c:163
 #, fuzzy
 msgid "invalid 'cutoff' value for 'deparse', using default"
 msgstr "'cutoff' inv�lido para deparse, se us� el definido por omisi�n"
 
-#: src/main/deparse.c:247
+#: src/main/deparse.c:254
 msgid "deparse of an S4 object will not be source()able"
 msgstr "deparse de un objeto S4 no puede ser cargado"
 
-#: src/main/deparse.c:249
+#: src/main/deparse.c:256
 msgid "deparse may be incomplete"
 msgstr "deparse puede estar incompleto"
 
-#: src/main/deparse.c:251
+#: src/main/deparse.c:258
 msgid "deparse may be not be source()able in R < 2.7.0"
 msgstr " deparse may be not be source()able in R < 2.7.0"
 
-#: src/main/deparse.c:369 src/main/deparse.c:461 src/main/deparse.c:467
+#: src/main/deparse.c:350 src/main/deparse.c:400 src/main/source.c:206
+#, fuzzy
+msgid "'file' must be a character string or connection"
+msgstr "que debe ser un string de caracteres o una funci�n"
+
+#: src/main/deparse.c:378 src/main/deparse.c:473 src/main/deparse.c:479
 msgid "wrote too few characters"
 msgstr "muy pocos caracteres escritos"
 
-#: src/main/deparse.c:391
+#: src/main/deparse.c:402
 msgid "character arguments expected"
 msgstr "argumentos de tipo car�cter esperados"
 
-#: src/main/deparse.c:394
+#: src/main/deparse.c:405
 #, fuzzy
 msgid "zero-length argument"
 msgstr "argumento de longitud cero"
 
-#: src/main/deparse.c:401
+#: src/main/deparse.c:412
 msgid "'opts' should be small non-negative integer"
 msgstr "'opts' debe ser un entero no negativo peque�o"
 
-#: src/main/deparse.c:411 src/main/envir.c:1764 src/main/envir.c:1846
-#: src/main/eval.c:569 src/main/eval.c:1251 src/main/eval.c:3627
-#: src/main/saveload.c:1978 src/main/saveload.c:2309 src/main/serialize.c:2727
+#: src/main/deparse.c:422 src/main/envir.c:1898 src/main/envir.c:1983
+#: src/main/eval.c:626 src/main/eval.c:1423 src/main/eval.c:4246
+#: src/main/saveload.c:1980 src/main/saveload.c:2312 src/main/serialize.c:2773
 #, c-format
 msgid "object '%s' not found"
 msgstr "objeto '%s' no encontrado"
 
-#: src/main/deparse.c:1519
+#: src/main/deparse.c:1592
 msgid "badly formed function expression"
 msgstr "expresi�n de la funci�n mal formada"
 
@@ -2577,38 +2645,38 @@ msgstr "expresi
 msgid "the base graphics system is not registered"
 msgstr "demasiados sistemas gr�ficos registrados"
 
-#: src/main/devices.c:165 src/main/devices.c:172
+#: src/main/devices.c:166 src/main/devices.c:174
 msgid "no active or default device"
 msgstr "ning�n dispositivo activo o por defecto"
 
-#: src/main/devices.c:385 src/main/devices.c:447
+#: src/main/devices.c:388 src/main/devices.c:450
 msgid "too many open devices"
 msgstr "demasiados dispositivos abiertos"
 
-#: src/main/devices.c:474
+#: src/main/devices.c:491
 msgid "not enough memory to allocate device (in GEcreateDevDesc)"
 msgstr ""
 "no hay memoria suficiente para asignar dispositivo (en  GEcreateDevDesc)"
 
-#: src/main/devices.c:515
+#: src/main/devices.c:532
 msgid "Hit <Return> to see next plot: "
 msgstr "<Enter> para ver el pr�ximo gr�fico: "
 
-#: src/main/dotcode.c:112 src/main/dotcode.c:142
+#: src/main/dotcode.c:127 src/main/dotcode.c:157
 msgid "NULL value passed as symbol address"
 msgstr "valor NULL pasado como un s�mbolo de direcci�n"
 
-#: src/main/dotcode.c:133
+#: src/main/dotcode.c:148
 #, c-format
 msgid "Unimplemented type %d in createRSymbolObject"
 msgstr "Tipo %d no implementado  en createRSymbolObject"
 
-#: src/main/dotcode.c:147 src/main/dotcode.c:237
+#: src/main/dotcode.c:162 src/main/dotcode.c:260
 #, c-format
 msgid "symbol '%s' is too long"
 msgstr "symbol '%s' es demasiado largo"
 
-#: src/main/dotcode.c:159
+#: src/main/dotcode.c:174
 #, fuzzy
 msgid ""
 "first argument must be a string (of length 1) or native symbol reference"
@@ -2616,217 +2684,200 @@ msgstr ""
 "'name' debe ser un string (de longitud 1) o una referencia a un s�mbolo "
 "nativo"
 
-#: src/main/dotcode.c:201 src/main/dotcode.c:563
+#: src/main/dotcode.c:224 src/main/dotcode.c:1240
 msgid "too many arguments in foreign function call"
 msgstr "demasiados argumentos en llamada a una funci�n externa"
 
-#: src/main/dotcode.c:213
+#: src/main/dotcode.c:236
 msgid "PACKAGE = \"\" is invalid"
 msgstr ""
 
-#: src/main/dotcode.c:269 src/main/dotcode.c:274 src/main/dotcode.c:279
-#: src/main/dotcode.c:284
+#: src/main/dotcode.c:292 src/main/dotcode.c:297 src/main/dotcode.c:302
+#: src/main/dotcode.c:307
 #, fuzzy, c-format
 msgid "\"%s\" not available for %s() for package \"%s\""
 msgstr "\t\"Informaci�n m�trica no disponible para este dispositivo"
 
-#: src/main/dotcode.c:289
+#: src/main/dotcode.c:312
 #, c-format
 msgid "%s symbol name \"%s\" not in DLL for package \"%s\""
 msgstr "%s nombre de s�mbolo \"%s\" no est� en el DLL para el paquete \"%s\""
 
-#: src/main/dotcode.c:294
+#: src/main/dotcode.c:317
 #, c-format
 msgid "%s symbol name \"%s\" not in load table"
 msgstr "%s nombre de s�mbolo \"%s\" no est� en la tabla de carga"
 
-#: src/main/dotcode.c:348 src/main/dotcode.c:352 src/main/dotcode.c:362
-#: src/main/dotcode.c:427 src/main/dotcode.c:434
+#: src/main/dotcode.c:368 src/main/dotcode.c:370 src/main/dotcode.c:380
+#: src/main/dotcode.c:445 src/main/dotcode.c:452
 #, fuzzy, c-format
 msgid "'%s' used more than once"
 msgstr "DUP usado m�s de un vez"
 
-#: src/main/dotcode.c:358
+#: src/main/dotcode.c:376
 msgid "DLL name is too long"
 msgstr "el nombre de la DLL es demasiado largo"
 
-#: src/main/dotcode.c:403
+#: src/main/dotcode.c:421
 msgid "PACKAGE argument must be a single character string"
 msgstr "el argumento PACKAGE debe ser un �nico string de caracteres"
 
-#: src/main/dotcode.c:409
+#: src/main/dotcode.c:427
 msgid "PACKAGE argument is too long"
 msgstr "el argumento PACKAGE es demasiado largo"
 
-#: src/main/dotcode.c:474
+#: src/main/dotcode.c:492
 msgid "no arguments supplied"
 msgstr "ning�n argumento suministrado"
 
-#: src/main/dotcode.c:475 src/main/seq.c:913
+#: src/main/dotcode.c:493 src/main/seq.c:911
 msgid "too many arguments"
 msgstr "demasiados argumentos"
 
-#: src/main/dotcode.c:512 src/main/dotcode.c:554 src/main/dotcode.c:1397
+#: src/main/dotcode.c:530 src/main/dotcode.c:1232 src/main/dotcode.c:1420
 #, fuzzy
 msgid "'.NAME' is missing"
 msgstr "'EXPR' esta perdida"
 
-#: src/main/dotcode.c:521 src/main/dotcode.c:570 src/main/dotcode.c:1418
+#: src/main/dotcode.c:539 src/main/dotcode.c:1247 src/main/dotcode.c:1441
 #, fuzzy, c-format
 msgid "Incorrect number of arguments (%d), expecting %d for '%s'"
 msgstr "N�mero incorreto de argumentos (%d), esperando %d para %s"
 
-#: src/main/dotcode.c:1227 src/main/dotcode.c:2276
+#: src/main/dotcode.c:1216 src/main/dotcode.c:2290
 msgid "too many arguments, sorry"
 msgstr "demasiados argumentos, disculpe"
 
-#: src/main/dotcode.c:1261 src/main/dotcode.c:1278 src/main/engine.c:2993
+#: src/main/dotcode.c:1284 src/main/dotcode.c:1301 src/main/engine.c:3013
 msgid "invalid graphics state"
 msgstr "estado gr�fico inv�lido"
 
-#: src/main/dotcode.c:1357
+#: src/main/dotcode.c:1380
 msgid "NULL value for DLLInfoReference when looking for DLL"
 msgstr "valor NULL para DLLInfoReference cuando se est� buscando DLL"
 
-#: src/main/dotcode.c:1458
+#: src/main/dotcode.c:1481
 #, fuzzy, c-format
 msgid "wrong type for argument %d in call to %s"
 msgstr "Tipo err�neo para el argumento %d en la llamada a %s"
 
-#: src/main/dotcode.c:1470
-#, c-format
-msgid ""
-"explicit request not to duplicate arguments in call to '%s', but argument %d "
-"is of the wrong type (%d != %d)"
-msgstr ""
-"pedido expl�cito para no duplicar argumentos en la llamada a '%s', pero el "
-"argumento %d es de tipo err�neo (%d != %d)"
-
-#: src/main/dotcode.c:1493
+#: src/main/dotcode.c:1510
 #, fuzzy, c-format
 msgid "long vectors (argument %d) are not supported in %s"
 msgstr "esta plataforma no soporta symlinks"
 
-#: src/main/dotcode.c:1524
+#: src/main/dotcode.c:1541
 #, c-format
 msgid "NAs in foreign function call (arg %d)"
 msgstr "NAs en llamada a una funci�n externa (arg %d)"
 
-#: src/main/dotcode.c:1547
+#: src/main/dotcode.c:1564
 #, c-format
 msgid "NA/NaN/Inf in foreign function call (arg %d)"
 msgstr "NA/NaN/Inf en llamada a una funci�n externa (arg %d)"
 
-#: src/main/dotcode.c:1552
-msgid "single values not returned if not duplicated"
-msgstr ""
-
-#: src/main/dotcode.c:1578
+#: src/main/dotcode.c:1594
 #, c-format
 msgid "complex NA/NaN/Inf in foreign function call (arg %d)"
 msgstr "NA/NaN/Inf complejo en llamada a una funci�n externa (arg %d)"
 
-#: src/main/dotcode.c:1597
-msgid "character variables must be duplicated in .C/.Fortran"
-msgstr "las variables de tipo car�cter deben estar duplicadas en .C/.Fortran"
-
-#: src/main/dotcode.c:1602
+#: src/main/dotcode.c:1616
 msgid "only first string in char vector used in .Fortran"
 msgstr "s�lo el primer string del vector de caracteres es usado en .Fortran"
 
-#: src/main/dotcode.c:1645 src/main/dotcode.c:1661 src/main/dotcode.c:1672
+#: src/main/dotcode.c:1659 src/main/dotcode.c:1675 src/main/dotcode.c:1686
 #, fuzzy, c-format
 msgid "invalid mode (%s) to pass to Fortran (arg %d)"
 msgstr "modo inv�lido para pasar a Fortran (arg %d)"
 
-#: src/main/dotcode.c:1666
+#: src/main/dotcode.c:1680
 #, fuzzy, c-format
 msgid "invalid mode (%s) to pass to C or Fortran (arg %d)"
 msgstr "modo inv�lido para pasar a Fortran (arg %d)"
 
-#: src/main/dotcode.c:1677
+#: src/main/dotcode.c:1691
 msgid "pairlists are passed as SEXP as from R 2.15.0"
 msgstr "pares de lista son enviados como SEXP como desde R 2.15.0"
 
-#: src/main/dotcode.c:2499
+#: src/main/dotcode.c:2510
 #, c-format
 msgid "type \"%s\" not supported in interlanguage calls"
 msgstr "tipo \"%s\" no soportado en llamadas entre lenguajes"
 
-#: src/main/dotcode.c:2604
+#: src/main/dotcode.c:2615
 #, c-format
 msgid "mode '%s' is not supported in call_R"
 msgstr "el modo '%s' no es soportado en call_R"
 
-#: src/main/dounzip.c:171
+#: src/main/dounzip.c:172
 #, c-format
 msgid " not overwriting file '%s"
 msgstr "no fue posible sobre escribir el archivo '%s'"
 
-#: src/main/dounzip.c:256
+#: src/main/dounzip.c:257
 #, c-format
 msgid "zip file '%s' cannot be opened"
 msgstr "archivo zip '%s' no pueden ser cargadas"
 
-#: src/main/dounzip.c:312
+#: src/main/dounzip.c:313
 msgid "invalid zip name argument"
 msgstr "argumento zip inv�lido"
 
-#: src/main/dounzip.c:315 src/main/dounzip.c:409
+#: src/main/dounzip.c:316 src/main/dounzip.c:410
 msgid "zip path is too long"
 msgstr "el path de zip es demasiado largo"
 
-#: src/main/dounzip.c:332
+#: src/main/dounzip.c:333
 #, fuzzy
 msgid "'exdir' is too long"
 msgstr "'destination' es demasiado largo"
 
-#: src/main/dounzip.c:335
+#: src/main/dounzip.c:336
 #, fuzzy
 msgid "'exdir' does not exist"
 msgstr "el men� no existe"
 
-#: src/main/dounzip.c:363
+#: src/main/dounzip.c:364
 msgid "requested file not found in the zip file"
 msgstr "el archivo requerido no fue encontrado en el archivo zip"
 
-#: src/main/dounzip.c:366
+#: src/main/dounzip.c:367
 msgid "zip file is corrupt"
 msgstr "el archivo zip est� corrupto"
 
-#: src/main/dounzip.c:369
+#: src/main/dounzip.c:370
 msgid "CRC error in zip file"
 msgstr "error CRC en el archivo zip"
 
-#: src/main/dounzip.c:376
+#: src/main/dounzip.c:377
 msgid "write error in extracting from zip file"
 msgstr "error de escritura al extraer del archivo zip"
 
-#: src/main/dounzip.c:379
+#: src/main/dounzip.c:380
 #, c-format
 msgid "error %d in extracting from zip file"
 msgstr "error %d al extraer del archivo zip"
 
-#: src/main/dounzip.c:404
+#: src/main/dounzip.c:405
 msgid "unz connections can only be opened for reading"
 msgstr "las conecciones unz s�lo pueden ser abiertas para lectura"
 
-#: src/main/dounzip.c:415
+#: src/main/dounzip.c:416
 #, fuzzy
 msgid "invalid description of 'unz' connection"
 msgstr "descripci�n inv�lida de conexi�n unz"
 
-#: src/main/dounzip.c:421
+#: src/main/dounzip.c:422
 #, c-format
 msgid "cannot open zip file '%s'"
 msgstr "no se puede abrir el archivo zip '%s'"
 
-#: src/main/dounzip.c:425
+#: src/main/dounzip.c:426
 #, c-format
 msgid "cannot locate file '%s' in zip file '%s'"
 msgstr "no se puede localizar el archivo '%s' en el archivo zip '%s'"
 
-#: src/main/dounzip.c:469
+#: src/main/dounzip.c:470
 msgid "printing not enabled for this connection"
 msgstr "impresi�n no habilitada para esta conexi�n"
 
@@ -2834,8 +2885,8 @@ msgstr "impresi
 msgid "write not enabled for this connection"
 msgstr "no esta permitido escribir en esta conexi�n"
 
-#: src/main/dounzip.c:496 src/main/dounzip.c:500 src/main/dounzip.c:506
-#: src/main/dounzip.c:523
+#: src/main/dounzip.c:494 src/main/dounzip.c:498 src/main/dounzip.c:504
+#: src/main/dounzip.c:521
 #, fuzzy
 msgid "allocation of 'unz' connection failed"
 msgstr "la localizaci�n de la conexi�n unz fall�"
@@ -2854,7 +2905,7 @@ msgstr "argumentos formales inv
 msgid "invalid argument to edit()"
 msgstr "argumento no v�lido para edit()"
 
-#: src/main/edit.c:121 src/main/saveload.c:2076
+#: src/main/edit.c:121 src/main/saveload.c:2078
 msgid "unable to open file"
 msgstr "no es posible abrir el archivo"
 
@@ -2918,12 +2969,12 @@ msgid "no graphics system to unregister"
 msgstr "ning�n sistema gr�fico para desregistrar"
 
 #: src/main/engine.c:443 src/main/engine.c:448 src/main/engine.c:456
-#: src/main/engine.c:463 src/main/engine.c:477 src/modules/X11/devX11.c:1157
+#: src/main/engine.c:463 src/main/engine.c:477 src/modules/X11/devX11.c:1159
 msgid "invalid line end"
 msgstr "final de l�nea inv�lido"
 
 #: src/main/engine.c:508 src/main/engine.c:513 src/main/engine.c:521
-#: src/main/engine.c:528 src/main/engine.c:542 src/modules/X11/devX11.c:1175
+#: src/main/engine.c:528 src/main/engine.c:542 src/modules/X11/devX11.c:1177
 msgid "invalid line join"
 msgstr "uni�n de l�nea inv�lida"
 
@@ -2957,87 +3008,101 @@ msgstr "Sys.sleep no est
 msgid "raster capture is not available for this device"
 msgstr "\t\"Informaci�n m�trica no disponible para este dispositivo"
 
-#: src/main/engine.c:1656
+#: src/main/engine.c:1662
 #, c-format
 msgid "font face %d not supported for font family '%s'"
 msgstr "vista fuente %d no soportada para la familia fuente '%s'"
 
-#: src/main/engine.c:1972
+#: src/main/engine.c:1978
 msgid "no graphics device is active"
 msgstr "ning�n dispositivo gr�fico est� ativo"
 
-#: src/main/engine.c:2049
+#: src/main/engine.c:2055
 #, c-format
 msgid "pch value '%d' is invalid in this locale"
 msgstr "'valor pch '%d' no es v�lido en este locale"
 
-#: src/main/engine.c:2307
+#: src/main/engine.c:2313
 #, c-format
 msgid "unimplemented pch value '%d'"
 msgstr "valor pch '%d' no implementado"
 
-#: src/main/engine.c:2330
+#: src/main/engine.c:2336
 #, c-format
 msgid "invalid axis extents [GEPretty(.,.,n=%d)"
 msgstr "extensi�n de los ejes inv�lida [GEPretty(.,.,n=%d)"
 
-#: src/main/engine.c:2334
+#: src/main/engine.c:2340
 #, c-format
 msgid "infinite axis extents [GEPretty(%g,%g,%d)]"
 msgstr "extensi�n de los ejes infinita [GEPretty(%g,%g,%d)]"
 
-#: src/main/engine.c:2371
+#: src/main/engine.c:2377
 #, c-format
 msgid " .. GEPretty(.): new *lo = %g < %g = x1"
 msgstr " .. GEPretty(.): nuevo *lo = %g < %g = x1"
 
-#: src/main/engine.c:2373
+#: src/main/engine.c:2379
 #, c-format
 msgid " .. GEPretty(.): new *up = %g > %g = x2"
 msgstr " .. GEPretty(.): nuevo *up = %g > %g = x2"
 
-#: src/main/engine.c:2773
+#: src/main/engine.c:2784
 #, fuzzy
 msgid "display list redraw incomplete"
 msgstr "Exhibici�n de redise�o de la lista incompleta"
 
-#: src/main/engine.c:2777
+#: src/main/engine.c:2788
 #, fuzzy
 msgid "invalid display list"
 msgstr "argumento de lista inv�lido"
 
-#: src/main/engine.c:2963
+#: src/main/engine.c:2900
+#, c-format
+msgid ""
+"snapshot recorded with different graphics engine version (pre 11 - this is "
+"version %d)"
+msgstr ""
+
+#: src/main/engine.c:2904
+#, c-format
+msgid ""
+"snapshot recorded with different graphics engine version (%d - this is "
+"version %d)"
+msgstr ""
+
+#: src/main/engine.c:2983
 msgid "'expr' argument must be an expression"
 msgstr "el argumento 'expr' debe ser una expresi�n"
 
 # Marca para mi 3pm
-#: src/main/engine.c:2965
+#: src/main/engine.c:2985
 msgid "'list' argument must be a list"
 msgstr "el argumento 'list' debe ser una lista"
 
-#: src/main/engine.c:2971
+#: src/main/engine.c:2991
 msgid "'env' argument must be an environment"
 msgstr "el argumento 'env' debe ser un ambiente"
 
-#: src/main/engine.c:3051 src/main/engine.c:3059
+#: src/main/engine.c:3071 src/main/engine.c:3079
 msgid "invalid multibyte char in pch=\"c\""
 msgstr "car�cter multibyte inv�lido en pch=\"c\""
 
-#: src/main/engine.c:3106
+#: src/main/engine.c:3126
 msgid "invalid hex digit in 'color' or 'lty'"
 msgstr "valor de d�gito hexadecimal inv�lido en 'color' o 'lty'"
 
-#: src/main/engine.c:3129
+#: src/main/engine.c:3149
 msgid "invalid line type: must be length 2, 4, 6 or 8"
 msgstr "tipo de l�nea inv�lida: debe tener longitud 2, 4, 6 u 8"
 
 # tipo de linea inv�lida: ceros no permitidos
 # La traduccion seria esta, pero......???
-#: src/main/engine.c:3133
+#: src/main/engine.c:3153
 msgid "invalid line type: zeroes are not allowed"
 msgstr "tipo de l�nea no v�lido: los ceros no son permitidos"
 
-#: src/main/engine.c:3142 src/main/engine.c:3150 src/main/engine.c:3157
+#: src/main/engine.c:3162 src/main/engine.c:3170 src/main/engine.c:3177
 msgid "invalid line type"
 msgstr "tipo de l�nea inv�lido"
 
@@ -3046,718 +3111,727 @@ msgstr "tipo de l
 msgid "cannot change value of locked binding for '%s'"
 msgstr "no se puede cambiar el valor de un v�nculo bloqueado para  '%s'"
 
-#: src/main/envir.c:251 src/main/envir.c:1454
+#: src/main/envir.c:251 src/main/envir.c:1530
 msgid "cannot add bindings to a locked environment"
 msgstr "no se pueden adicionar v�nculos a un ambiente bloqueado"
 
-#: src/main/envir.c:772
+#: src/main/envir.c:775
 msgid "invalid cached value in R_GetGlobalCache"
 msgstr "valor en cache inv�lido en R_GetGlobalCache"
 
-#: src/main/envir.c:830
+#: src/main/envir.c:836
 msgid "cannot unbind in the base namespace"
 msgstr "no se puede desvincular en el espacio de nombres base"
 
-#: src/main/envir.c:832
+#: src/main/envir.c:838
 msgid "unbind in the base environment is unimplemented"
 msgstr "desenlazar en el entorno de base no esta implementado"
 
-#: src/main/envir.c:834 src/main/envir.c:1684
+#: src/main/envir.c:840 src/main/envir.c:1818
 msgid "cannot remove bindings from a locked environment"
 msgstr "no se pueden eliminar vinculaciones de un ambiente bloqueado"
 
-#: src/main/envir.c:1139
+#: src/main/envir.c:1213
 #, c-format
 msgid "argument to '%s' is not an environment"
 msgstr "el argumento a '%s' no es un entorno"
 
-#: src/main/envir.c:1300
+#: src/main/envir.c:1374
 #, fuzzy, c-format
 msgid "the ... list does not contain %d elements"
 msgstr "La lista ... no contiene elementos %d"
 
-#: src/main/envir.c:1302
+#: src/main/envir.c:1376
 #, c-format
 msgid "..%d used in an incorrect context, no ... to look in"
 msgstr "..%d usado en un contexto incorreto, ning�n ... para examinar"
 
-#: src/main/envir.c:1390 src/main/envir.c:1842 src/main/eval.c:573
-#: src/main/eval.c:3618
-#, c-format
-msgid "argument \"%s\" is missing, with no default"
-msgstr "el argumento \"%s\" est� ausente, sin valor por omisi�n"
-
-#: src/main/envir.c:1395
+#: src/main/envir.c:1469
 #, c-format
 msgid "could not find function \"%s\""
 msgstr "no se pudo encontrar la funci�n \"%s\""
 
-#: src/main/envir.c:1418
+#: src/main/envir.c:1492
 msgid "cannot assign values in the empty environment"
 msgstr "no se pueden asignar valores en el ambiente vac�o"
 
-#: src/main/envir.c:1424 src/main/envir.c:1497
+#: src/main/envir.c:1498 src/main/envir.c:1628
 msgid "cannot assign variables to this database"
 msgstr "no se pueden asignar variables a esta base de datos"
 
-#: src/main/envir.c:1580
+#: src/main/envir.c:1714
 #, c-format
 msgid "cannot add binding of '%s' to the base environment"
 msgstr "no se pueden adicionar v�nculos de '%s' al ambiente base"
 
-#: src/main/envir.c:1609
+#: src/main/envir.c:1743
 msgid "only the first element is used as variable name"
 msgstr "s�lo el primer elemento es usado como nombre de variable"
 
-#: src/main/envir.c:1641
+#: src/main/envir.c:1775
 #, fuzzy
 msgid "first argument must be a named list"
 msgstr "el primer argumento debe ser una lista"
 
-#: src/main/envir.c:1646
+#: src/main/envir.c:1780
 #, fuzzy
 msgid "names(x) must be a character vector of the same length as x"
 msgstr "'hostname' debe ser un vector de caracteres de longitud 1"
 
-#: src/main/envir.c:1649
+#: src/main/envir.c:1783
 #, fuzzy
 msgid "'envir' argument must be an environment"
 msgstr "el argumento 'env' debe ser un ambiente"
 
-#: src/main/envir.c:1678
+#: src/main/envir.c:1812
 msgid "cannot remove variables from base namespace"
 msgstr "no es posible remover las variables del 'base namespace'"
 
-#: src/main/envir.c:1680
+#: src/main/envir.c:1814
 msgid "cannot remove variables from the base environment"
 msgstr "no se pueden quitar variables del ambiente base"
 
-#: src/main/envir.c:1682
+#: src/main/envir.c:1816
 msgid "cannot remove variables from the empty environment"
 msgstr "no se pueden quitar variables del ambiente vacio"
 
-#: src/main/envir.c:1690
+#: src/main/envir.c:1824
 msgid "cannot remove variables from this database"
 msgstr "no se pueden quitar variables de esta base de datos"
 
-#: src/main/envir.c:1849
+#: src/main/envir.c:1985
 #, c-format
 msgid "object '%s' of mode '%s' was not found"
 msgstr "el objeto '%s' de modo '%s' no fue encontrado"
 
-#: src/main/envir.c:1921
+#: src/main/envir.c:2068
 #, c-format
 msgid "invalid name in position %d"
 msgstr "nombre inv�lido en la posici�n %d"
 
-#: src/main/envir.c:1927
+#: src/main/envir.c:2074
 msgid "second argument must be an environment"
 msgstr "el segundo argumento debe ser un entorno"
 
-#: src/main/envir.c:1935 src/main/envir.c:1943
+#: src/main/envir.c:2082 src/main/envir.c:2090
 #, c-format
 msgid "wrong length for '%s' argument"
 msgstr "longitud incorrecta para el argumento '%s''"
 
-#: src/main/envir.c:2062
+#: src/main/envir.c:2221
 msgid "invalid use of 'missing'"
 msgstr "uso inv�lido de 'missing'"
 
-#: src/main/envir.c:2087
+#: src/main/envir.c:2247
 msgid "'missing' can only be used for arguments"
 msgstr "'missing' s�lo puede ser usado para argumentos"
 
-#: src/main/envir.c:2168
+#: src/main/envir.c:2333
 msgid "'pos' must be an integer"
 msgstr "pos' deben ser un entero"
 
-#: src/main/envir.c:2182
+#: src/main/envir.c:2347
 msgid "all elements of a list must be named"
 msgstr "attach: todos los elementos de una lista deben ser nombrados"
 
-#: src/main/envir.c:2205
+#: src/main/envir.c:2370
 msgid "'attach' only works for lists, data frames and environments"
 msgstr "'attach' s�lo funciona con listas, 'data frames' y ambientes"
 
-#: src/main/envir.c:2288
+#: src/main/envir.c:2453
 msgid "detaching \"package:base\" is not allowed"
 msgstr "'detach' del \"package:base\" no est� permitido"
 
-#: src/main/envir.c:2589 src/main/envir.c:2644
+#: src/main/envir.c:2798 src/main/envir.c:2879
 msgid "argument must be an environment"
 msgstr "el argumento debe ser un entorno"
 
-#: src/main/envir.c:2648
+#: src/main/envir.c:2883
 msgid "arguments must be symbolic"
 msgstr "los argumentos deben ser simb�licos"
 
-#: src/main/envir.c:2772
+#: src/main/envir.c:3032
 msgid "no enclosing environment"
 msgstr "ning�n entorno envolvente"
 
-#: src/main/envir.c:2825
+#: src/main/envir.c:3085
 #, c-format
 msgid "no item called \"%s\" on the search list"
 msgstr "ning�n item \"%s\" en la lista de b�squeda"
 
-#: src/main/envir.c:2850
+#: src/main/envir.c:3110
 msgid "using 'as.environment(NULL)' is defunct"
 msgstr "no est� ya disponible 'as.environment(NULL)'"
 
-#: src/main/envir.c:2856
+#: src/main/envir.c:3116
 msgid "S4 object does not extend class \"environment\""
 msgstr "objeto S4 no se extiende la classe \"environment\""
 
-#: src/main/envir.c:2871
+#: src/main/envir.c:3131
 msgid "invalid object for 'as.environment'"
 msgstr "objeto inv�lido para 'as.environment'"
 
-#: src/main/envir.c:2897 src/main/envir.c:2925 src/main/envir.c:2954
-#: src/main/envir.c:2975 src/main/envir.c:2998 src/main/envir.c:3033
-#: src/main/envir.c:3054
+#: src/main/envir.c:3157 src/main/envir.c:3185 src/main/envir.c:3214
+#: src/main/envir.c:3235 src/main/envir.c:3258 src/main/envir.c:3293
+#: src/main/envir.c:3314
 msgid "not an environment"
 msgstr "no es un entorno"
 
-#: src/main/envir.c:2949 src/main/envir.c:2970 src/main/envir.c:2991
-#: src/main/envir.c:3028 src/main/envir.c:3049 src/main/envir.c:3148
+#: src/main/envir.c:3209 src/main/envir.c:3230 src/main/envir.c:3251
+#: src/main/envir.c:3288 src/main/envir.c:3309 src/main/envir.c:3408
 msgid "not a symbol"
 msgstr "no es un s�mbolo"
 
-#: src/main/envir.c:2962 src/main/envir.c:2983 src/main/envir.c:3041
-#: src/main/envir.c:3062
+#: src/main/envir.c:3222 src/main/envir.c:3243 src/main/envir.c:3301
+#: src/main/envir.c:3322
 #, c-format
 msgid "no binding for \"%s\""
 msgstr "ning�n v�nculo para \"%s\""
 
-#: src/main/envir.c:2993
+#: src/main/envir.c:3253
 msgid "not a function"
 msgstr "no es una funci�n"
 
-#: src/main/envir.c:3001 src/main/envir.c:3017
+#: src/main/envir.c:3261 src/main/envir.c:3277
 msgid "symbol already has a regular binding"
 msgstr "el s�mbolo ya tiene un v�nculo regular"
 
-#: src/main/envir.c:3003 src/main/envir.c:3019
+#: src/main/envir.c:3263 src/main/envir.c:3279
 #, fuzzy
 msgid "cannot change active binding if binding is locked"
 msgstr "no se puede cambiar el valor de un v�nculo bloqueado para  '%s'"
 
-#: src/main/envir.c:3107
+#: src/main/envir.c:3367 src/main/envir.c:3604
 msgid "unknown op"
 msgstr "operador desconocido"
 
-#: src/main/envir.c:3152
+#: src/main/envir.c:3412
 msgid "cannot unbind a locked binding"
 msgstr "no es posible desvincular un v�nculo bloqueado"
 
-#: src/main/envir.c:3154
+#: src/main/envir.c:3414
 msgid "cannot unbind an active binding"
 msgstr "no es posible desvincular un v�nculo activo"
 
-#: src/main/envir.c:3289
+#: src/main/envir.c:3555
 #, fuzzy
 msgid "bad namespace name"
 msgstr "nombre de espacio inv�lido"
 
-#: src/main/envir.c:3301
+#: src/main/envir.c:3567
 #, fuzzy
 msgid "namespace already registered"
 msgstr "nombre de espacio ya registrado"
 
-#: src/main/envir.c:3313
+#: src/main/envir.c:3579
 #, fuzzy
 msgid "namespace not registered"
 msgstr "espacio de nombres no registrado"
 
-#: src/main/envir.c:3360
+#: src/main/envir.c:3635
 msgid "bad import environment argument"
 msgstr "argumento inv�lido de importaci�n de entorno"
 
-#: src/main/envir.c:3365
+#: src/main/envir.c:3640
 msgid "bad export environment argument"
 msgstr "argumento inv�lido de exportaci�n de entorno"
 
-#: src/main/envir.c:3369
+#: src/main/envir.c:3644
 msgid "length of import and export names must match"
 msgstr "la longitud de los nombres de importaci�n y exportaci�n debe coincidir"
 
-#: src/main/envir.c:3392
+#: src/main/envir.c:3667
 #, c-format
 msgid "exported symbol '%s' has no value"
 msgstr "s�mbolo exportado '%s' no tiene valor"
 
-#: src/main/envir.c:3557
+#: src/main/envir.c:3833
 #, fuzzy, c-format
 msgid "unknown encoding: %d"
 msgstr "codificaci�n '%s' no soportada"
 
-#: src/main/envir.c:3577
+#: src/main/envir.c:3853
 #, c-format
 msgid "embedded nul in string: '%s'"
 msgstr "nul incrustado en la cadena: '%s' \""
 
-#: src/main/errors.c:178 src/main/errors.c:215
+#: src/main/errors.c:163 src/main/errors.c:200
 msgid "interrupts suspended; signal ignored"
 msgstr "'interrupts' suspendidas; se�al ignorada"
 
-#: src/main/errors.c:318
+#: src/main/errors.c:250
+msgid "[... truncated]"
+msgstr ""
+
+#: src/main/errors.c:310
 msgid "invalid option \"warning.expression\""
 msgstr "opci�n inv�lida \"warning.expression\""
 
-#: src/main/errors.c:348
+#: src/main/errors.c:339
 #, c-format
 msgid "(converted from warning) %s"
 msgstr "(convertido del aviso) %s"
 
-#: src/main/errors.c:359
-#, c-format
-msgid "Warning: %s\n"
+#: src/main/errors.c:349
+#, fuzzy
+msgid "Warning:"
 msgstr "Aviso: %s\n"
 
-#: src/main/errors.c:363
-#, c-format
-msgid "Warning in %s : %s\n"
+#: src/main/errors.c:351
+#, fuzzy, c-format
+msgid "Warning in %s :"
 msgstr "Aviso en %s: %s\n"
 
-#: src/main/errors.c:365
-#, c-format
-msgid ""
-"Warning in %s :\n"
-"  %s\n"
+#: src/main/errors.c:360 src/main/errors.c:374 src/main/errors.c:687
+msgid "Calls:"
 msgstr ""
-"Aviso en %s :\n"
-" %s\n"
 
-#: src/main/errors.c:428 src/main/errors.c:447 src/main/errors.c:596
+#: src/main/errors.c:421 src/main/errors.c:440 src/main/errors.c:602
 msgid "Lost warning messages\n"
 msgstr "Mensajes de aviso perdidos\n"
 
-#: src/main/errors.c:459
-msgid "Warning message:\n"
-msgid_plural "Warning messages:\n"
+#: src/main/errors.c:452
+#, fuzzy
+msgid "Warning message:"
+msgid_plural "Warning messages:"
 msgstr[0] "Mensajes de aviso perdidos\n"
 msgstr[1] "Mensajes de aviso perdidos\n"
 
-#: src/main/errors.c:514
+#: src/main/errors.c:462 src/main/errors.c:490
 #, c-format
-msgid "There were %d warnings (use warnings() to see them)\n"
-msgstr "Hubo %d avisos (use warnings() para verlos)\n"
+msgid "In %s :"
+msgstr ""
 
-#: src/main/errors.c:517
+#: src/main/errors.c:515
 #, fuzzy, c-format
-msgid "There were %d or more warnings (use warnings() to see the first %d)\n"
+msgid "There was %d warning (use warnings() to see it)"
+msgid_plural "There were %d warnings (use warnings() to see them)"
+msgstr[0] "Hubo %d avisos (use warnings() para verlos)\n"
+msgstr[1] "Hubo %d avisos (use warnings() para verlos)\n"
+
+#: src/main/errors.c:520
+#, fuzzy, c-format
+msgid "There were %d or more warnings (use warnings() to see the first %d)"
 msgstr "Hubo 50 o  m�s avisos (use warnings() para ver los primeros 50)\n"
 
-#: src/main/errors.c:587
+#: src/main/errors.c:593
 msgid "Error during wrapup: "
 msgstr "Error durante el wrapup: "
 
-#: src/main/errors.c:612
+#: src/main/errors.c:618
 msgid "Error in "
 msgstr "Error en "
 
-#: src/main/errors.c:613
+#: src/main/errors.c:640 src/main/errors.c:647
 #, c-format
-msgid " (from %s) : "
+msgid "Error in %s (from %s) : "
 msgstr ""
 
-#: src/main/errors.c:664 src/main/errors.c:670
+#: src/main/errors.c:649
+#, fuzzy, c-format
+msgid "Error in %s : "
+msgstr "Error en "
+
+#: src/main/errors.c:669 src/main/errors.c:675
 #, c-format
 msgid "Error: "
 msgstr "Error: "
 
-#: src/main/errors.c:690 src/main/errors.c:1319
+#: src/main/errors.c:696 src/main/errors.c:1300
 msgid "In addition: "
 msgstr "Adem�s: "
 
-#: src/main/errors.c:811
+#: src/main/errors.c:818
 msgid "invalid option \"error\"\n"
 msgstr "opci�n inv�lida \"error\"\n"
 
-#: src/main/errors.c:893
-msgid "Execution halted\n"
-msgstr "Ejecuci�n interrumpida\n"
-
-#: src/main/errors.c:1032
-msgid "'msg1' must be a character string"
-msgstr "'msg1' debe ser un string de caracteres"
-
-#: src/main/errors.c:1034
-msgid "'msg2' must be a character string"
-msgstr "'msg2' debe ser un string de caracteres"
+#: src/main/errors.c:1013 src/main/errors.c:1015 src/main/options.c:339
+#: src/main/unique.c:1638
+#, fuzzy, c-format
+msgid "'%s' must be a character string"
+msgstr "'sep' debe ser una cadena (string) de caracteres"
 
-#: src/main/errors.c:1131
+#: src/main/errors.c:1116
 msgid " [invalid string in stop(.)]"
 msgstr " [string inv�lido en stop(.)]"
 
-#: src/main/errors.c:1162
+#: src/main/errors.c:1148
 msgid " [invalid string in warning(.)]"
 msgstr " [string inv�lido en warning(.)]"
 
-#: src/main/errors.c:1178
+#: src/main/errors.c:1164
 #, c-format
 msgid "incorrect number of arguments to \"%s\""
 msgstr "n�mero de argumentos incorrectos para \"%s\""
 
-#: src/main/errors.c:1184 src/main/errors.c:1199
+#: src/main/errors.c:1170 src/main/errors.c:1185
 #, c-format
 msgid "unimplemented feature in %s"
 msgstr "recurso no implementado en %s"
 
-#: src/main/errors.c:1193
+#: src/main/errors.c:1179
 msgid "invalid number of arguments"
 msgstr "n�mero inv�lido de argumentos"
 
-#: src/main/errors.c:1194 src/main/logic.c:189
+#: src/main/errors.c:1180 src/main/logic.c:181
 msgid "invalid argument type"
 msgstr "argumento de tipo inv�lido"
 
-#: src/main/errors.c:1196
+#: src/main/errors.c:1182
 msgid "time-series/vector length mismatch"
 msgstr "longitud de la serie-temporal/vector incompatible"
 
-#: src/main/errors.c:1197
+#: src/main/errors.c:1183
 msgid "incompatible arguments"
 msgstr "argumentos incompatibles"
 
-#: src/main/errors.c:1200
+#: src/main/errors.c:1186
 msgid "unknown error (report this!)"
 msgstr "error desconocido (reporte esto!)"
 
-#: src/main/errors.c:1212
+#: src/main/errors.c:1195
+msgid "inaccurate integer conversion in coercion"
+msgstr "conversi�n entera imprecisa en la coerci�n"
+
+#: src/main/errors.c:1198
 msgid "unknown warning (report this!)"
 msgstr "aviso desconocido (reporte esto!)"
 
-#: src/main/errors.c:1283
+#: src/main/errors.c:1269
 msgid "No function to return from, jumping to top level"
 msgstr "Ninguna funci�n desde donde retornar, saltando al nivel superior"
 
-#: src/main/errors.c:1299
+#: src/main/errors.c:1285
 msgid "top level inconsistency?"
 msgstr "=BFnivel superior inconsistente?"
 
-#: src/main/errors.c:1478
+#: src/main/errors.c:1459
 msgid "bad handler data"
 msgstr "manipulador de datos defectuosos"
 
-#: src/main/errors.c:1628
+#: src/main/errors.c:1613
 msgid "error message not a string"
 msgstr "el mensaje de error no es un string"
 
-#: src/main/errors.c:1703
+#: src/main/errors.c:1688
 msgid "handler or restart stack mismatch in old restart"
 msgstr ""
 "manipulador o 'stack' de reinicio incompatible durante el reinicio antiguo"
 
-#: src/main/errors.c:1729 src/main/errors.c:1745
+#: src/main/errors.c:1714 src/main/errors.c:1730
 msgid "bad error message"
 msgstr "mensaje de error inv�lido"
 
-#: src/main/errors.c:1787
+#: src/main/errors.c:1771
 msgid "bad restart"
 msgstr "reinicio defectuoso"
 
-#: src/main/errors.c:1819
+#: src/main/errors.c:1803
 msgid "restart not on stack"
 msgstr "reinicio no est� en el 'stack'"
 
-#: src/main/errors.c:1836
+#: src/main/errors.c:1819
 msgid "not in a try context"
 msgstr "no en el contexto 'try'"
 
-#: src/main/errors.c:1849
+#: src/main/errors.c:1832
 msgid "error message must be a character string"
 msgstr "\t\"mensaje de error debe ser una cadena de caracteres"
 
-#: src/main/eval.c:308
+#: src/main/eval.c:365
 #, c-format
 msgid "source files skipped by Rprof; please increase '%s'"
 msgstr ""
 
-#: src/main/eval.c:328
+#: src/main/eval.c:385
 #, c-format
 msgid "Rprof: cannot open profile file '%s'"
 msgstr "Rprof: no puede abrir el archivo de perfil '%s'"
 
-#: src/main/eval.c:422
+#: src/main/eval.c:479
 msgid "R profiling is not available on this system"
 msgstr "'R profiling' no disponible en este sistema"
 
-#: src/main/eval.c:446
+#: src/main/eval.c:503
 msgid ""
 "promise already under evaluation: recursive default argument reference or "
 "earlier problems?"
 msgstr "entrada en evaluacion: recursivo por defecto o problemas anteriores?"
 
-#: src/main/eval.c:448
+#: src/main/eval.c:505
 msgid "restarting interrupted promise evaluation"
 msgstr "reiniciar evaluaci�n premisa interrumpida"
 
-#: src/main/eval.c:544
+#: src/main/eval.c:601
 msgid ""
 "evaluation nested too deeply: infinite recursion / options(expressions=)?"
 msgstr ""
-"evaluaci�n anidada demasiado profunda; recursi�n infinita options"
-"(expressions= )?"
+"evaluaci�n anidada demasiado profunda; recursi�n infinita "
+"options(expressions= )?"
 
-#: src/main/eval.c:575 src/main/eval.c:3619
+#: src/main/eval.c:632 src/main/eval.c:4238
 msgid "argument is missing, with no default"
 msgstr "argumento ausente, sin argumento por omisi�n"
 
-#: src/main/eval.c:679 src/main/eval.c:4642
+#: src/main/eval.c:736 src/main/eval.c:1306 src/main/eval.c:5533
 msgid "attempt to apply non-function"
 msgstr "tentativa de aplicar una no-funci�n"
 
-#: src/main/eval.c:702
+#: src/main/eval.c:759
 #, c-format
 msgid "%s at %s#%d: "
 msgstr "%s en %s#%d: "
 
-#: src/main/eval.c:1178
+#: src/main/eval.c:1298 src/main/eval.c:2271
+#, fuzzy, c-format
+msgid "argument %d is empty"
+msgstr "elemento %d est� vac�o"
+
+#: src/main/eval.c:1350
 #, c-format
 msgid "could not find symbol \"%s\" in environment of the generic function"
 msgstr ""
 "no es posible encontrar el s�mbolo \"%s\" en el entorno de la funci�n "
 "generica"
 
-#: src/main/eval.c:1196
+#: src/main/eval.c:1368
 #, c-format
 msgid "symbol \"%s\" not in environment of method"
 msgstr "s�mbolo \"%s\" no est� en el entorno del m�todo"
 
-#: src/main/eval.c:1308
+#: src/main/eval.c:1481
 msgid "the condition has length > 1 and only the first element will be used"
 msgstr "la condici�n tiene longitud > 1 y s�lo el primer elemento ser� usado"
 
-#: src/main/eval.c:1325
+#: src/main/eval.c:1500
 msgid "missing value where TRUE/FALSE needed"
 msgstr "valor ausente donde TRUE/FALSE es necesario"
 
-#: src/main/eval.c:1326
+#: src/main/eval.c:1501
 msgid "argument is not interpretable as logical"
 msgstr "argumento no interpetable como l�gico"
 
-#: src/main/eval.c:1327
+#: src/main/eval.c:1502
 msgid "argument is of length zero"
 msgstr "argumento tiene longitud cero"
 
-#: src/main/eval.c:1418
+#: src/main/eval.c:1596
 msgid "non-symbol loop variable"
 msgstr "variable 'loop' no-simb�lica"
 
-#: src/main/eval.c:1510 src/main/eval.c:4408
+#: src/main/eval.c:1687 src/main/eval.c:5301
 msgid "invalid for() loop sequence"
 msgstr "secuencia loop for() inv�lida"
 
-#: src/main/eval.c:1652
+#: src/main/eval.c:1826
 #, fuzzy
 msgid "multi-argument returns are not permitted"
 msgstr "retornos con argumentos m�ltiples son obsoletos"
 
-#: src/main/eval.c:1701
+#: src/main/eval.c:1873
 msgid "invalid (NULL) left side of assignment"
 msgstr "lado izquierdo de la asignaci�n inv�lida (NULL)"
 
-#: src/main/eval.c:1734
+#: src/main/eval.c:1907
 msgid "target of assignment expands to non-language object"
 msgstr "destino de la asignaci�n se expande a un objeto fuera del lenguaje"
 
-#: src/main/eval.c:1817
+#: src/main/eval.c:1990
 #, c-format
 msgid "overlong name in '%s'"
 msgstr "nombre demasiado largo en '%s'"
 
-#: src/main/eval.c:1915
+#: src/main/eval.c:2080
 msgid "cannot do complex assignments in base namespace"
 msgstr "no se pueden realizar asignaciones complejas en el 'base namespace'"
 
-#: src/main/eval.c:1917
+#: src/main/eval.c:2082
 msgid "cannot do complex assignments in base environment"
 msgstr "no se pueden realizar asignaciones complejas en el entorno base"
 
-#: src/main/eval.c:1954 src/main/eval.c:1981
+#: src/main/eval.c:2121 src/main/eval.c:2148
 msgid "invalid function in complex assignment"
 msgstr "funci�n inv�lida en asignaci�n compleja"
 
-#: src/main/eval.c:2041
+#: src/main/eval.c:2208
 msgid "invalid (do_set) left-hand side to assignment"
 msgstr "lado izquierdo de la asignaci�n inv�lida (do_set)"
 
-#: src/main/eval.c:2103
-#, fuzzy, c-format
-msgid "argument %d is empty"
-msgstr "elemento %d est� vac�o"
-
-#: src/main/eval.c:2116
+#: src/main/eval.c:2284
 #, c-format
 msgid "'%s' is missing"
 msgstr "%s' esta perdido"
 
-#: src/main/eval.c:2267
+#: src/main/eval.c:2439
 msgid "invalid formal argument list for \"function\""
 msgstr "lista de argumentos formales inv�lida para \"function\""
 
-#: src/main/eval.c:2325 src/main/eval.c:2356 src/main/eval.c:2361
+#: src/main/eval.c:2497 src/main/eval.c:2528 src/main/eval.c:2533
 #, fuzzy, c-format
 msgid "invalid '%s' argument of type '%s'"
 msgstr "argumento '%s' inv�lido"
 
-#: src/main/eval.c:2353
+#: src/main/eval.c:2525
 msgid "numeric 'envir' arg not of length one"
 msgstr "argumento 'envir' n�merico no tiene longitud uno"
 
-#: src/main/eval.c:2377 src/main/eval.c:2399
+#: src/main/eval.c:2549 src/main/eval.c:2573
 msgid "restarts not supported in 'eval'"
 msgstr "reinicios no sustentados en 'eval'"
 
-#: src/main/eval.c:2456 src/main/eval.c:2469
+#: src/main/eval.c:2632 src/main/eval.c:2645
 msgid "'Recall' called from outside a closure"
 msgstr "'Recall' llamada desde fuera de la clausura"
 
-#: src/main/eval.c:2562
+#: src/main/eval.c:2738
 msgid "value in '...' is not a promise"
 msgstr "no se espera el valor en '...'"
 
-#: src/main/eval.c:2754 src/main/objects.c:720
-#, c-format
-msgid "call name too long in '%s'"
-msgstr "nombre de llamada  en '%s' muy largo"
-
-#: src/main/eval.c:2775
-#, c-format
-msgid "generic name too long in '%s'"
-msgstr "nombre gen�rico en '%s' muy largo"
-
-#: src/main/eval.c:2840
+#: src/main/eval.c:2999
 #, c-format
 msgid "Incompatible methods (\"%s\", \"%s\") for \"%s\""
 msgstr "M�todos incompatibles (\"%s\", \"%s\") para \"%s\""
 
-#: src/main/eval.c:2906
+#: src/main/eval.c:3048
 msgid "dispatch error in group dispatch"
 msgstr "expedici�n de error en el env�o de grupo"
 
-#: src/main/eval.c:3201
+#: src/main/eval.c:3532
 #, fuzzy, c-format
 msgid "\"%s\" is not a %s function"
 msgstr "'%s' no es una funci�n"
 
-#: src/main/eval.c:3430
+#: src/main/eval.c:4047
 msgid "node stack overflow"
 msgstr "stack central desbordado"
 
-#: src/main/eval.c:3436
+#: src/main/eval.c:4053
 msgid "integer stack overflow"
 msgstr "stack de enteros desbordado"
 
-#: src/main/eval.c:3490
+#: src/main/eval.c:4107
 #, fuzzy
 msgid "bad opcode"
 msgstr "C�digo de operador defectuoso"
 
-#: src/main/eval.c:4219
+#: src/main/eval.c:5083
 #, fuzzy, c-format
 msgid "invalid %s type in 'x %s y'"
 msgstr "tipo de 'x' inv�lido en 'x %s y'"
 
-#: src/main/eval.c:4310
+#: src/main/eval.c:5195
 msgid "bytecode version mismatch; using eval"
 msgstr "versi�n de bytecode incompatible; usando eval"
 
-#: src/main/eval.c:4315
+#: src/main/eval.c:5200
 msgid "bytecode version is too old"
 msgstr "versi�n de bytecode muy vieja"
 
-#: src/main/eval.c:4316
+#: src/main/eval.c:5201
 msgid "bytecode version is too new"
 msgstr "versi�n de bytecode muy nueva"
 
-#: src/main/eval.c:4350
+#: src/main/eval.c:5235
 msgid "byte code version mismatch"
 msgstr "versi�n de bytecode incompatible"
 
-#: src/main/eval.c:4477
+#: src/main/eval.c:5383
 msgid "invalid sequence argument in for loop"
 msgstr "secuencia inv�lida de argumentos en el ciclo for"
 
-#: src/main/eval.c:4624 src/main/names.c:1181
+#: src/main/eval.c:5522 src/main/names.c:1312
 #, fuzzy, c-format
 msgid "there is no .Internal function '%s'"
 msgstr "no hay ninguna funci�n interna \"%s\""
 
-#: src/main/eval.c:4731 src/main/eval.c:5077 src/main/eval.c:5119
+#: src/main/eval.c:5622 src/main/eval.c:5968 src/main/eval.c:6008
 msgid "bad function"
 msgstr "funci�n defectuosa"
 
-#: src/main/eval.c:4746
+#: src/main/eval.c:5635
 msgid "not a BUILTIN function"
 msgstr "no es una funci�n NATIVA"
 
-#: src/main/eval.c:5159
+#: src/main/eval.c:6066
+#, fuzzy
+msgid "bad numeric 'switch' offsets"
+msgstr "mal num�rico en el interruptor offsets"
+
+#: src/main/eval.c:6072
 #, fuzzy
 msgid "numeric EXPR required for 'switch' without named alternatives"
 msgstr ""
 "EXPR num�ricos son necesarios para el switch() sin alternativas con nombre"
 
-#: src/main/eval.c:5255
+#: src/main/eval.c:6076
+#, fuzzy
+msgid "bad character 'switch' offsets"
+msgstr "mal car�cter en el interruptor offsets"
+
+#: src/main/eval.c:6188
 msgid "cannot find index for threaded code address"
 msgstr "�ndice de encadenamiento del c�digo no encontrado"
 
-#: src/main/eval.c:5315
+#: src/main/eval.c:6248
 #, fuzzy
 msgid "invalid body"
 msgstr "s�mbolo inv�lido"
 
-#: src/main/eval.c:5335
+#: src/main/eval.c:6268
 msgid "invalid symbol"
 msgstr "s�mbolo inv�lido"
 
-#: src/main/eval.c:5379
+#: src/main/eval.c:6312
 msgid "argument is not a byte code object"
 msgstr "el argumento no es un objeto bytecode"
 
-#: src/main/eval.c:5400
+#: src/main/eval.c:6334
 msgid "bad file name"
 msgstr "nombre de archivo inv�lido"
 
-#: src/main/eval.c:5404 src/main/eval.c:5425
+#: src/main/eval.c:6338 src/main/eval.c:6359
 msgid "unable to open 'file'"
 msgstr "imposible abrir 'file'"
 
-#: src/main/eval.c:5419 src/main/saveload.c:1942
+#: src/main/eval.c:6353 src/main/saveload.c:1944
 msgid "'file' must be non-empty string"
 msgstr "'file' debe ser un string no vac�o"
 
-#: src/main/eval.c:5421 src/main/saveload.c:1944 src/main/saveload.c:2244
-#: src/main/serialize.c:2149
+#: src/main/eval.c:6355 src/main/saveload.c:1946 src/main/saveload.c:2246
+#: src/main/serialize.c:2189
 msgid "'ascii' must be logical"
 msgstr "'ascii' debe ser un valor l�gico"
 
-#: src/main/eval.c:5492 src/main/eval.c:5511 src/main/eval.c:5541
+#: src/main/eval.c:6426 src/main/eval.c:6445 src/main/eval.c:6475
 #, fuzzy
 msgid "constant buffer must be a generic vector"
 msgstr "code debe ser un vector gen�rico"
 
-#: src/main/eval.c:5543
+#: src/main/eval.c:6477
 msgid "bad constant count"
 msgstr "mal contador de constante"
 
-#: src/main/eval.c:5579
+#: src/main/eval.c:6515
 msgid "profile timer in use"
 msgstr "cron�metro de desempe�o en uso"
 
-#: src/main/eval.c:5581
+#: src/main/eval.c:6517
 msgid "already byte code profiling"
 msgstr "byte code ya en desarrollo"
 
-#: src/main/eval.c:5599
+#: src/main/eval.c:6535
 msgid "setting profile timer failed"
 msgstr "fall� la definici�n del cron�metro de desempe�o"
 
-#: src/main/eval.c:5616
+#: src/main/eval.c:6553
 msgid "not byte code profiling"
 msgstr "byte code no se est� desarrollando"
 
+#: src/main/eval.c:6569 src/main/eval.c:6573 src/main/eval.c:6577
+#, fuzzy
+msgid "byte code profiling is not supported in this build"
+msgstr "esta plataforma no soporta nsl()"
+
 #: src/main/gevents.c:43
 #, fuzzy, c-format
 msgid "'%s' events not supported in this device"
@@ -3773,28 +3847,28 @@ msgstr "error interno en 'do_sys'"
 msgid "this graphics device does not support event handling"
 msgstr "dispositivo gr�fico no soporta los casos gr�ficos"
 
-#: src/main/gevents.c:136
+#: src/main/gevents.c:135
 msgid "invalid prompt"
 msgstr "prompt inv�lido"
 
-#: src/main/gevents.c:148
+#: src/main/gevents.c:146
 #, fuzzy
 msgid "recursive use of 'getGraphicsEvent' not supported"
 msgstr "el modo '%s' no es soportado en call_R"
 
-#: src/main/gevents.c:158
+#: src/main/gevents.c:157
 #, fuzzy
 msgid "no graphics event handlers set"
 msgstr "ning�n dispositivo gr�fico est� ativo"
 
-#: src/main/gram.y:222 src/main/gram.y:237 src/main/gram.y:2222
-#: src/main/gram.y:2236
+#: src/main/gram.y:222 src/main/gram.y:237 src/main/gram.y:2245
+#: src/main/gram.y:2259
 #, c-format
 msgid "EOF whilst reading MBCS char at line %d"
 msgstr "EOF mientras se lee tarea MBCS en la linea %d"
 
-#: src/main/gram.y:226 src/main/gram.y:234 src/main/gram.y:2226
-#: src/main/gram.y:2233
+#: src/main/gram.y:226 src/main/gram.y:234 src/main/gram.y:2249
+#: src/main/gram.y:2256
 #, c-format
 msgid "invalid multibyte character in parser at line %d"
 msgstr "car�cter multibyte inv�lido en la linea %d"
@@ -3809,119 +3883,132 @@ msgstr "buffer de entrada desbordado en la linea %d"
 msgid "incorrect tag type at line %d"
 msgstr "tipo de etiqueta incorreto en la linea %d"
 
-#: src/main/gram.y:1653
+#: src/main/gram.y:1657
 msgid "contextstack overflow"
 msgstr "desbordamiento contextstack"
 
-#: src/main/gram.y:1890
-msgid "input"
-msgstr "entrada"
+#: src/main/gram.y:1907 src/main/gram.y:1913
+#, fuzzy, c-format
+msgid "unexpected input"
+msgstr "inesperado %s"
 
-#: src/main/gram.y:1891
-msgid "end of input"
+#: src/main/gram.y:1910 src/main/main.c:311
+#, fuzzy, c-format
+msgid "unexpected end of input"
 msgstr "fin de entrada"
 
-#: src/main/gram.y:1892
-msgid "string constant"
+#: src/main/gram.y:1916
+#, fuzzy, c-format
+msgid "unexpected string constant"
 msgstr "string constante"
 
-#: src/main/gram.y:1893
-msgid "numeric constant"
+#: src/main/gram.y:1919
+#, fuzzy, c-format
+msgid "unexpected numeric constant"
 msgstr "constante num�rica"
 
-#: src/main/gram.y:1894
-msgid "symbol"
-msgstr "s�mbolo"
+#: src/main/gram.y:1922
+#, fuzzy, c-format
+msgid "unexpected symbol"
+msgstr "inesperado %s"
 
-#: src/main/gram.y:1895
-msgid "assignment"
-msgstr "asignaci�n"
+#: src/main/gram.y:1925
+#, fuzzy, c-format
+msgid "unexpected assignment"
+msgstr "inesperado %s"
 
-#: src/main/gram.y:1896
-msgid "end of line"
+#: src/main/gram.y:1928
+#, fuzzy, c-format
+msgid "unexpected end of line"
 msgstr "fin de linea"
 
-#: src/main/gram.y:1910 src/main/gram.y:1916
+#: src/main/gram.y:1931 src/main/gram.y:1939
 #, c-format
 msgid "unexpected %s"
 msgstr "inesperado %s"
 
-#: src/main/gram.y:1926
+#: src/main/gram.y:1951
 #, fuzzy, c-format
 msgid "repeated formal argument '%s' on line %d"
 msgstr "Argumento formal '%s' repetido en la linea %d"
 
 # No se si esta instruccion y la siguiente est�n bien. Por favor fijate.
-#: src/main/gram.y:2136
+#: src/main/gram.y:2161
 #, fuzzy, c-format
 msgid "integer literal %s contains decimal; using numeric value"
 msgstr "%sL contiene decimales; use un valor num�rico"
 
-#: src/main/gram.y:2140
+#: src/main/gram.y:2164
 #, c-format
 msgid "non-integer value %s qualified with L; using numeric value"
 msgstr "valor no entero %s califica con L; use un valor num�rico"
 
-#: src/main/gram.y:2153
+#: src/main/gram.y:2176
 #, fuzzy, c-format
 msgid "integer literal %s contains unnecessary decimal point"
 msgstr "%sL contiene un punto decimal innecesario"
 
-#: src/main/gram.y:2185
+#: src/main/gram.y:2208
 #, c-format
 msgid "unable to allocate buffer for long string at line %d"
 msgstr "no se puede asignar memoria para una cadena larga en la linea %d"
 
-#: src/main/gram.y:2338
+#: src/main/gram.y:2347 src/main/gram.y:2370 src/main/gram.y:2407
+#: src/main/gram.y:2443
+#, fuzzy, c-format
+msgid "nul character not allowed (line %d)"
+msgstr "car�cter multibyte inv�lido en la linea %d"
+
+#: src/main/gram.y:2363
 #, fuzzy, c-format
 msgid "'\\x' used without hex digits in character string starting \"%s\""
 msgstr "'\\x' utilizado sin d�gitos hexadecimales"
 
-#: src/main/gram.y:2352
+#: src/main/gram.y:2379
 #, c-format
 msgid "\\uxxxx sequences not supported inside backticks (line %d)"
 msgstr ""
 "\\uxxxx secuencias no soportada dentro de comillas simples invertidas (l�nea "
 "%d)"
 
-#: src/main/gram.y:2367
+#: src/main/gram.y:2394
 #, fuzzy, c-format
 msgid "'\\u' used without hex digits in character string starting \"%s\""
 msgstr "'\\x' utilizado sin d�gitos hexadecimales"
 
-#: src/main/gram.y:2375
+#: src/main/gram.y:2402
 #, c-format
 msgid "invalid \\u{xxxx} sequence (line %d)"
 msgstr "secuencia \\u{xxxx} inv�lida (linea %d)"
 
-#: src/main/gram.y:2387
+#: src/main/gram.y:2416
 #, c-format
 msgid "\\Uxxxxxxxx sequences not supported inside backticks (line %d)"
 msgstr ""
 "\\Uxxxxxxxx secuencias no soportada dentro de comillas simples invertidas "
 "(l�nea %d)"
 
-#: src/main/gram.y:2402
+#: src/main/gram.y:2431
 #, fuzzy, c-format
 msgid "'\\U' used without hex digits in character string starting \"%s\""
 msgstr "'\\x' utilizado sin d�gitos hexadecimales"
 
-#: src/main/gram.y:2410
+#: src/main/gram.y:2439
 #, c-format
 msgid "invalid \\U{xxxxxxxx} sequence (line %d)"
 msgstr "inv�lido \\U{xxxxxxxx} secuencia (l�nea %d)"
 
-#: src/main/gram.y:2451
+#: src/main/gram.y:2482
 #, fuzzy, c-format
 msgid "'\\%c' is an unrecognized escape in character string starting \"%s\""
 msgstr "'\\%c' es un escape no reconocido en una cadena de caracteres"
 
-#: src/main/gram.y:2510
+#: src/main/gram.y:2546
 msgid "mixing Unicode and octal/hex escapes in a string is not allowed"
 msgstr ""
 "mesclar escapes Unicode y octal / hexadecimal en una cadena no est� permitido"
 
-#: src/main/gram.y:2514
+#: src/main/gram.y:2550
 #, c-format
 msgid ""
 "string at line %d containing Unicode escapes not in this locale\n"
@@ -3930,13 +4017,13 @@ msgstr ""
 "cadena en la l�nea %d contiene escapes Unicode en esta localidad\n"
 "es demasiado largo (m�ximo 10000 caracteres) "
 
-#: src/main/gram.y:3112 src/main/gram.y:3119 src/main/gram.y:3125
-#: src/main/gram.y:3132
+#: src/main/gram.y:3148 src/main/gram.y:3155 src/main/gram.y:3161
+#: src/main/gram.y:3168
 #, c-format
 msgid "contextstack overflow at line %d"
 msgstr "desbordamiento contextstack en la l�nea %d"
 
-#: src/main/gram.y:3227
+#: src/main/gram.y:3263
 #, fuzzy, c-format
 msgid "internal parser error at line %d"
 msgstr "buffer de entrada desbordado en la linea %d"
@@ -3946,34 +4033,34 @@ msgstr "buffer de entrada desbordado en la linea %d"
 msgid "relative range of values =%4.0f * EPS, is small (axis %d)"
 msgstr "amplitud relativa de valores =%4.0f * EPS, es peque�o (eixo %d)"
 
-#: src/main/grep.c:93
+#: src/main/grep.c:96
 #, fuzzy, c-format
 msgid "invalid regular expression '%s', reason '%s'"
 msgstr "expresi�n regular '%s' inv�lida"
 
-#: src/main/grep.c:95
+#: src/main/grep.c:98
 #, fuzzy, c-format
 msgid "invalid regular expression, reason '%s'"
 msgstr "expresi�n regular '%s' inv�lida"
 
-#: src/main/grep.c:220 src/main/grep.c:308 src/main/grep.c:416
-#: src/main/grep.c:883 src/main/grep.c:2473
+#: src/main/grep.c:225 src/main/grep.c:315 src/main/grep.c:426
+#: src/main/grep.c:900 src/main/grep.c:2502
 #, fuzzy, c-format
 msgid "input string %d is invalid UTF-8"
 msgstr "string de entrada %d es inv�lida en este locale"
 
-#: src/main/grep.c:286 src/main/grep.c:383
+#: src/main/grep.c:292 src/main/grep.c:391
 #, fuzzy, c-format
 msgid "'split' string %d is invalid UTF-8"
 msgstr "string de entrada %d es inv�lida en este locale"
 
-#: src/main/grep.c:290 src/main/grep.c:387 src/main/grep.c:560
+#: src/main/grep.c:296 src/main/grep.c:395 src/main/grep.c:571
 #, fuzzy, c-format
 msgid "'split' string %d is invalid in this locale"
 msgstr "string de entrada %d es inv�lida en este locale"
 
-#: src/main/grep.c:395 src/main/grep.c:851 src/main/grep.c:1600
-#: src/main/grep.c:2394
+#: src/main/grep.c:404 src/main/grep.c:867 src/main/grep.c:1621
+#: src/main/grep.c:2419
 #, c-format
 msgid ""
 "PCRE pattern compilation error\n"
@@ -3984,13 +4071,13 @@ msgstr ""
 "\t'%s'\n"
 "\ta '%s'\n"
 
-#: src/main/grep.c:397
+#: src/main/grep.c:406
 #, c-format
 msgid "invalid split pattern '%s'"
 msgstr "patr�n '%s' de separaci�n inv�lido"
 
-#: src/main/grep.c:401 src/main/grep.c:857 src/main/grep.c:1607
-#: src/main/grep.c:2401
+#: src/main/grep.c:410 src/main/grep.c:873 src/main/grep.c:1628
+#: src/main/grep.c:2426
 #, c-format
 msgid ""
 "PCRE pattern study error\n"
@@ -3999,51 +4086,51 @@ msgstr ""
 "error en patron de estudio PCRE \n"
 "\t'%s'\n"
 
-#: src/main/grep.c:834 src/main/grep.c:2377
+#: src/main/grep.c:849 src/main/grep.c:2401
 #, fuzzy
 msgid "regular expression is invalid UTF-8"
 msgstr "la expresi�n regular es inv�lida es este locale"
 
-#: src/main/grep.c:853 src/main/grep.c:1602 src/main/grep.c:2396
+#: src/main/grep.c:869 src/main/grep.c:1623 src/main/grep.c:2421
 #, c-format
 msgid "invalid regular expression '%s'"
 msgstr "expresi�n regular '%s' inv�lida"
 
-#: src/main/grep.c:1264
+#: src/main/grep.c:1282
 msgid "pattern matches an empty string infinitely, returning first match only"
 msgstr ""
 "patr�n coincide con una cadena vac�a infinitamente, devolviendo primer "
 "patr�n �nico "
 
-#: src/main/grep.c:1575
+#: src/main/grep.c:1595
 #, fuzzy
 msgid "'pattern' is invalid UTF-8"
 msgstr "'pattern' es inv�lido en este locale"
 
-#: src/main/grep.c:1577
+#: src/main/grep.c:1597
 #, fuzzy
 msgid "'replacement' is invalid UTF-8"
 msgstr "'replacement' es inv�lido en este locale"
 
-#: src/main/grep.c:1581
+#: src/main/grep.c:1601
 msgid "'pattern' is invalid in this locale"
 msgstr "'pattern' es inv�lido en este locale"
 
-#: src/main/grep.c:1584
+#: src/main/grep.c:1604
 msgid "'replacement' is invalid in this locale"
 msgstr "'replacement' es inv�lido en este locale"
 
-#: src/main/grep.c:1589
+#: src/main/grep.c:1609
 msgid "zero-length pattern"
 msgstr "patr�n de longitud 0"
 
-#: src/main/grep.c:1732 src/main/grep.c:1748 src/main/grep.c:1796
-#: src/main/grep.c:1812 src/main/grep.c:1859 src/main/grep.c:1875
+#: src/main/grep.c:1753 src/main/grep.c:1769 src/main/grep.c:1817
+#: src/main/grep.c:1833 src/main/grep.c:1880 src/main/grep.c:1896
 #, fuzzy
 msgid "result string is too long"
 msgstr "string de entrada demasiado larga"
 
-#: src/main/grep.c:2411
+#: src/main/grep.c:2436
 #, fuzzy, c-format
 msgid "'pcre_fullinfo' returned '%d' "
 msgstr "pcre_fullinfo retornado '%d' "
@@ -4052,33 +4139,29 @@ msgstr "pcre_fullinfo retornado '%d' "
 msgid "ignoring non-pairlist attributes"
 msgstr ""
 
-#: src/main/internet.c:92
+#: src/main/internet.c:83
 msgid "internet routines cannot be accessed in module"
 msgstr "rutinas de internet no pueden ser abiertas en el m�dulo"
 
-#: src/main/internet.c:103 src/main/internet.c:141 src/main/internet.c:154
-#: src/main/internet.c:165 src/main/internet.c:176 src/main/internet.c:187
-#: src/main/internet.c:196 src/main/internet.c:207 src/main/internet.c:218
-#: src/main/internet.c:227 src/main/internet.c:237
+#: src/main/internet.c:94 src/main/internet.c:106 src/main/internet.c:119
+#: src/main/internet.c:130 src/main/internet.c:141 src/main/internet.c:152
+#: src/main/internet.c:161 src/main/internet.c:172 src/main/internet.c:183
+#: src/main/internet.c:192 src/main/internet.c:202 src/main/internet.c:318
+#: src/main/internet.c:330 src/main/internet.c:342 src/main/internet.c:354
 msgid "internet routines cannot be loaded"
 msgstr "rutinas de internet no pueden ser cargadas"
 
-#: src/main/internet.c:118 src/main/memory.c:3434 src/main/memory.c:3444
-#: src/main/memory.c:3456 src/main/memory.c:3470 src/main/memory.c:3487
-#: src/main/memory.c:3505
-msgid "bad value"
-msgstr "valor incorrecto"
-
-#: src/main/internet.c:124
-msgid "internet routines were already initialized"
-msgstr "rutinas de Internet ya est� iniciadas"
-
-#: src/main/internet.c:251 src/main/internet.c:265 src/main/internet.c:281
-#: src/main/internet.c:293 src/main/internet.c:307 src/main/internet.c:327
-#: src/main/internet.c:340
+#: src/main/internet.c:216 src/main/internet.c:230 src/main/internet.c:247
+#: src/main/internet.c:259 src/main/internet.c:273 src/main/internet.c:293
+#: src/main/internet.c:306
 msgid "socket routines cannot be loaded"
 msgstr "rutinas socket no pueden ser cargadas"
 
+#: src/main/internet.c:242
+#, fuzzy
+msgid "attempt to close invalid socket"
+msgstr "se intenta especificar un atributo 'comment' no v�lido"
+
 #: src/main/lapack.c:39
 #, fuzzy
 msgid "LAPACK routines cannot be accessed in module"
@@ -4089,44 +4172,40 @@ msgstr "rutinas X11 no pueden accederse en m
 msgid "LAPACK routines cannot be loaded"
 msgstr "rutinas socket no pueden ser cargadas"
 
-#: src/main/logic.c:70
-msgid "binary operations require two arguments"
-msgstr "operaciones binarias requieren dos argumentos"
-
-#: src/main/logic.c:88 src/main/logic.c:150
+#: src/main/logic.c:80 src/main/logic.c:142
 msgid "operations are possible only for numeric, logical or complex types"
 msgstr ""
 "solo son posibles operaciones para variables de tipo num�rico, compleja o "
 "l�gico"
 
-#: src/main/logic.c:98
+#: src/main/logic.c:90
 msgid "binary operation on non-conformable arrays"
 msgstr "operaci�n binaria en arreglos no conformables"
 
-#: src/main/logic.c:124 src/main/relop.c:247
+#: src/main/logic.c:116 src/main/relop.c:241
 msgid "non-conformable time series"
 msgstr "series temporales no conformables"
 
-#: src/main/logic.c:254
+#: src/main/logic.c:247
 #, c-format
 msgid "'%s' operator requires 2 arguments"
 msgstr "operador '%s' requiere 2 argumentos"
 
-#: src/main/logic.c:261
+#: src/main/logic.c:254
 #, c-format
 msgid "invalid 'x' type in 'x %s y'"
 msgstr "tipo de 'x' inv�lido en 'x %s y'"
 
-#: src/main/logic.c:268
+#: src/main/logic.c:261
 #, c-format
 msgid "invalid 'y' type in 'x %s y'"
 msgstr "tipo de 'y' inv�lido en 'x %s y'"
 
-#: src/main/logic.c:341
+#: src/main/logic.c:334
 msgid "Unary operator `!' called with two arguments"
 msgstr "Operador unitario `!' llamado con dos argumentos"
 
-#: src/main/logic.c:448
+#: src/main/logic.c:439
 #, c-format
 msgid "coercing argument of type '%s' to logical"
 msgstr "coarcionando argumento de tipo '%s' a logical"
@@ -4135,69 +4214,83 @@ msgstr "coarcionando argumento de tipo '%s' a logical"
 msgid "dummy - do not translate"
 msgstr "dummy"
 
+#: src/main/main.c:329
+#, fuzzy
+msgid "error during cleanup\n"
+msgstr "Error durante el wrapup: "
+
+#: src/main/main.c:336
+msgid "Execution halted\n"
+msgstr "Ejecuci�n interrumpida\n"
+
 # Revisar!!!
-#: src/main/main.c:476
+#: src/main/main.c:505
 msgid "Error: segfault from C stack overflow\n"
 msgstr "Error: C produce desborde de pila en 'segfault'\n"
 
-#: src/main/main.c:846
+#: src/main/main.c:888
 msgid "unable to open the base package\n"
 msgstr "imposible abrir el paquete base package\n"
 
-#: src/main/main.c:924
+#: src/main/main.c:971
 #, fuzzy, c-format
 msgid "unable to restore saved data in %s\n"
 msgstr "imposible restaurar datos guardados en .RData\n"
 
-#: src/main/main.c:971
+#: src/main/main.c:1020
 msgid "During startup - "
 msgstr "Durante la inicializaci�n - "
 
-#: src/main/main.c:1224
+#: src/main/main.c:1036
+#, fuzzy
+msgid "unable to initialize the JIT\n"
+msgstr "no fue posible abrir un archivo de lectura"
+
+#: src/main/main.c:1290
 msgid "cannot quit from browser"
 msgstr "no se puede salir del navegador"
 
-#: src/main/main.c:1228
+#: src/main/main.c:1294
 msgid "one of \"yes\", \"no\", \"ask\" or \"default\" expected."
 msgstr ""
 "se espera una de las siguientes respuestas: \"yes\", \"no\", \"ask\" o "
 "\"default\""
 
-#: src/main/main.c:1233
+#: src/main/main.c:1299
 msgid "save=\"ask\" in non-interactive use: command-line default will be used"
 msgstr ""
 "guardar=\"ask\" en uso no-interactivo: se usar� por defecto la l�nea de "
 "comando"
 
-#: src/main/main.c:1241
+#: src/main/main.c:1307
 msgid "unrecognized value of 'save'"
 msgstr "no se reconoce el valor 'save'"
 
-#: src/main/main.c:1244
+#: src/main/main.c:1310
 msgid "invalid 'status', 0 assumed"
 msgstr "'status' inv�lido, se supone el valor 0"
 
-#: src/main/main.c:1249
+#: src/main/main.c:1315
 msgid "invalid 'runLast', FALSE assumed"
 msgstr "'runLast' no es v�lida, se asume el valor FALSE"
 
-#: src/main/main.c:1280
+#: src/main/main.c:1346
 msgid "cannot allocate space for toplevel callback element"
 msgstr ""
 "no fue posible asignar espacio para el elemento de retorno de llamada de "
 "nivel superior"
 
-#: src/main/main.c:1358
+#: src/main/main.c:1424
 msgid "negative index passed to R_removeTaskCallbackByIndex"
 msgstr "�ndice negativo pasado a R_removeTaskCallbackByIndex"
 
-#: src/main/main.c:1468
+#: src/main/main.c:1534
 #, c-format
 msgid "warning messages from top-level task callback '%s'\n"
 msgstr ""
 "mensajes de advertencia desde la llamada de tarea de nivel superior '%s'\n"
 
-#: src/main/main.c:1524
+#: src/main/main.c:1591
 msgid "top-level task callback did not return a logical value"
 msgstr "la llamada de tarea de nivel superior no devuelve un valor l�gico"
 
@@ -4220,202 +4313,211 @@ msgstr "el argumento m
 msgid "invalid partial string match"
 msgstr "la correspondencia de string parcial no es v�lida"
 
-#: src/main/match.c:228 src/main/match.c:268 src/main/objects.c:56
-#: src/main/objects.c:66
+#: src/main/match.c:228 src/main/match.c:266 src/main/objects.c:49
+#: src/main/objects.c:59
 #, c-format
 msgid "formal argument \"%s\" matched by multiple actual arguments"
 msgstr ""
 "el argumento formal \"%s\" concuerda con m�ltiples argumentos especificados"
 
-#: src/main/match.c:231 src/main/match.c:266
+#: src/main/match.c:231 src/main/match.c:264
 #, c-format
 msgid "argument %d matches multiple formal arguments"
 msgstr "el argumento %d concuerda con multiples argumentos formales"
 
-#: src/main/match.c:272
+#: src/main/match.c:270
 #, c-format
 msgid "partial argument match of '%s' to '%s'"
 msgstr " argumentos parcialmente correctos de '%s' a '%s'"
 
-#: src/main/match.c:383
+#: src/main/match.c:380
 #, fuzzy, c-format
 msgid "unused argument %s"
 msgid_plural "unused arguments %s"
 msgstr[0] "el argumento(s) no fue utilizado(s) %s"
 msgstr[1] "el argumento(s) no fue utilizado(s) %s"
 
-#: src/main/memory.c:1232
+#: src/main/memory.c:1234
 msgid "can only weakly reference/finalize reference objects"
 msgstr "puede s�lo referenciar/finalizar debilmente objetos de referencia"
 
-#: src/main/memory.c:1266
+#: src/main/memory.c:1268
 msgid "finalizer must be a function or NULL"
 msgstr "el finalizador debe ser una funci�n o NULL"
 
-#: src/main/memory.c:1322 src/main/memory.c:1330 src/main/memory.c:1341
+#: src/main/memory.c:1324 src/main/memory.c:1332 src/main/memory.c:1343
 msgid "not a weak reference"
 msgstr "no es una referencia d�bil"
 
-#: src/main/memory.c:1472
+#: src/main/memory.c:1474
 msgid "first argument must be environment or external pointer"
 msgstr "el primer argumento debe ser un indicador de entorno o externo"
 
-#: src/main/memory.c:1474
+#: src/main/memory.c:1476
 msgid "second argument must be a function"
 msgstr "el segundo argumento debe ser una funci�n"
 
-#: src/main/memory.c:1478
+#: src/main/memory.c:1480
 msgid "third argument must be 'TRUE' or 'FALSE'"
 msgstr "el tercer argumento debe ser TRUE o FALSE"
 
-#: src/main/memory.c:1970
+#: src/main/memory.c:1979
 msgid "vector memory exhausted (limit reached?)"
 msgstr "la memoria vectorial est� agotada (se alcanz� el l�mite?)"
 
-#: src/main/memory.c:1976
+#: src/main/memory.c:1985
 msgid "cons memory exhausted (limit reached?)"
 msgstr "la memoria cons est� agotada (se alcanz� el l�mite?)"
 
-#: src/main/memory.c:1981
+#: src/main/memory.c:1990
 msgid "memory exhausted (limit reached?)"
 msgstr "la memoria est� agotada (se alcanz� el l�mite?)"
 
-#: src/main/memory.c:2116
+#: src/main/memory.c:2126
 #, fuzzy, c-format
 msgid "cannot allocate memory block of size %0.f Tb"
 msgstr "no se puede asignar un bloque de memoria de tama�o %0.1f Gb"
 
-#: src/main/memory.c:2121
+#: src/main/memory.c:2131
 #, c-format
 msgid "cannot allocate memory block of size %0.1f Gb"
 msgstr "no se puede asignar un bloque de memoria de tama�o %0.1f Gb"
 
-#: src/main/memory.c:2442
+#: src/main/memory.c:2458
 #, fuzzy
 msgid "vector is too large"
 msgstr "tama�o del vector especificado es muy grande"
 
-#: src/main/memory.c:2445
+#: src/main/memory.c:2461
 msgid "negative length vectors are not allowed"
 msgstr "no se permiten vectores de longitud negativa"
 
-#: src/main/memory.c:2471 src/main/memory.c:2484 src/main/memory.c:2497
-#: src/main/memory.c:2512
+#: src/main/memory.c:2487 src/main/memory.c:2500 src/main/memory.c:2513
+#: src/main/memory.c:2528
 #, c-format
 msgid "cannot allocate vector of length %d"
 msgstr "no se puede asignar un vector de longitud %d"
 
-#: src/main/memory.c:2533
+#: src/main/memory.c:2549
 #, c-format
 msgid "invalid type/length (%s/%d) in vector allocation"
 msgstr "tipo/longitud no v�lido (%s/%d) en la asignaci�n del vector"
 
-#: src/main/memory.c:2636
+#: src/main/memory.c:2648
 #, c-format
 msgid "cannot allocate vector of size %0.1f Gb"
 msgstr "no se puede ubicar un vector de tama�o  %0.1f Gb"
 
-#: src/main/memory.c:2640
+#: src/main/memory.c:2652
 #, c-format
 msgid "cannot allocate vector of size %0.1f Mb"
 msgstr "no se puede ubicar un vector de tama�o  %0.1f Mb"
 
-#: src/main/memory.c:2644
+#: src/main/memory.c:2656
 #, c-format
 msgid "cannot allocate vector of size %0.f Kb"
 msgstr "no se puede ubicar un vector de tama�o  %0.f Kb"
 
-#: src/main/memory.c:3001
+#: src/main/memory.c:3071
 msgid "protect(): protection stack overflow"
 msgstr "protect(): protecci�n del desborde de la pila"
 
-#: src/main/memory.c:3008
-#, c-format
-msgid "unprotect(): only %d protected items"
-msgstr "unprotect(): solo %d proteje items"
+#: src/main/memory.c:3078
+#, fuzzy, c-format
+msgid "unprotect(): only %d protected item"
+msgid_plural "unprotect(): only %d protected items"
+msgstr[0] "unprotect(): solo %d proteje items"
+msgstr[1] "unprotect(): solo %d proteje items"
 
-#: src/main/memory.c:3041
+#: src/main/memory.c:3113
 msgid "unprotect_ptr: pointer not found"
 msgstr "unprotect_ptr: no se encontr� el puntero"
 
-#: src/main/memory.c:3079
+#: src/main/memory.c:3151
 #, fuzzy, c-format
-msgid "R_Reprotect: only %d protected items, can't reprotect index %d"
-msgstr "unprotect(): solo %d proteje items"
+msgid "R_Reprotect: only %d protected item, can't reprotect index %d"
+msgid_plural "R_Reprotect: only %d protected items, can't reprotect index %d"
+msgstr[0] "unprotect(): solo %d proteje items"
+msgstr[1] "unprotect(): solo %d proteje items"
 
-#: src/main/memory.c:3129
+#: src/main/memory.c:3203
 #, fuzzy, c-format
 msgid "'Calloc' could not allocate memory (%.0f of %u bytes)"
 msgstr "Calloc no puede asignar memoria (%d de %d)"
 
-#: src/main/memory.c:3140
+#: src/main/memory.c:3214
 #, fuzzy, c-format
 msgid "'Realloc' could not re-allocate memory (%.0f bytes)"
 msgstr "Realloc no puede re-asignar memoria (tama�o %d)"
 
-#: src/main/memory.c:3380
+#: src/main/memory.c:3460
 msgid "not safe to return vector pointer"
 msgstr "no es seguro devolver un puntero de vector"
 
-#: src/main/memory.c:3392
+#: src/main/memory.c:3471
 #, c-format
 msgid "attempt to set index %lu/%lu in SET_STRING_ELT"
 msgstr ""
 
-#: src/main/memory.c:3408
+#: src/main/memory.c:3487
 #, c-format
 msgid "attempt to set index %lu/%lu in SET_VECTOR_ELT"
 msgstr ""
 
-#: src/main/memory.c:3658
+#: src/main/memory.c:3514 src/main/memory.c:3524 src/main/memory.c:3536
+#: src/main/memory.c:3550 src/main/memory.c:3565 src/main/memory.c:3583
+msgid "bad value"
+msgstr "valor incorrecto"
+
+#: src/main/memory.c:3746
 #, fuzzy
 msgid "memory profiling is not available on this system"
 msgstr "'R profiling' no disponible en este sistema"
 
-#: src/main/memory.c:3723
+#: src/main/memory.c:3810
 #, c-format
 msgid "Rprofmem: cannot open output file '%s'"
 msgstr "Rprofmem: no puede abrir el archivo de perfil '%s'"
 
-#: src/main/memory.c:3830
+#: src/main/memory.c:3915
 #, c-format
 msgid "long vectors not supported yet: %s:%d"
 msgstr ""
 
-#: src/main/names.c:996
+#: src/main/names.c:1021
 msgid "string argument required"
 msgstr "se requiere el argumento del string"
 
-#: src/main/names.c:999
+#: src/main/names.c:1024
 msgid "no such primitive function"
 msgstr "no existe esta funci�n primitiva"
 
-#: src/main/names.c:1146
+#: src/main/names.c:1212 src/main/names.c:1242
 msgid "attempt to use zero-length variable name"
 msgstr "se intenta usar un nombre de varible de longitud cero"
 
-#: src/main/names.c:1148
+#: src/main/names.c:1214 src/main/names.c:1244
 #, c-format
 msgid "variable names are limited to %d bytes"
 msgstr "nombres de variables se limitan a %d bytes"
 
-#: src/main/names.c:1176 src/main/names.c:1179
+#: src/main/names.c:1307 src/main/names.c:1310
 msgid "invalid .Internal() argument"
 msgstr "el argumento .Internal() no es v�lido"
 
-#: src/main/objects.c:46
+#: src/main/objects.c:39
 msgid "generic 'function' is not a function"
 msgstr "la 'function' gen�rica no es una funci�n"
 
-#: src/main/objects.c:201
+#: src/main/objects.c:193
 msgid "bad generic call environment"
 msgstr "el entorno de llamada gen�rico est� mal"
 
-#: src/main/objects.c:207
+#: src/main/objects.c:201
 msgid "bad generic definition environment"
 msgstr "el entorno de definici�n gen�rico est� mal"
 
-#: src/main/objects.c:246
+#: src/main/objects.c:249
 #, fuzzy
 msgid ""
 "no '.S3MethodsClass' table, cannot use S4 objects with S3 methods ('methods' "
@@ -4424,138 +4526,119 @@ msgstr ""
 "No hay table de .S3MethodsClass, no puede usar objetos S4 con los m�todos de "
 "S3 (paquete de m�todos ne esta adjuntado?)"
 
-#: src/main/objects.c:270 src/main/objects.c:411
-msgid "'UseMethod' used in an inappropriate fashion"
-msgstr "'UseMethod' se us� de manera no apropiada"
-
-#: src/main/objects.c:290
-#, fuzzy
-msgid "invalid generic function in 'usemethod'"
-msgstr "la funci�n gen�rica en 'usemethod' no es v�lida"
-
-#: src/main/objects.c:399
+#: src/main/objects.c:415
 #, fuzzy
 msgid "there must be a 'generic' argument"
 msgstr "debe haber un primer argumento"
 
-#: src/main/objects.c:403
+#: src/main/objects.c:419
 #, fuzzy
 msgid "'generic' argument must be a character string"
 msgstr "el segundo argumento debe ser un string de caracteres"
 
-#: src/main/objects.c:440
-#, fuzzy
-msgid "'UseMethod' called from outside a function"
-msgstr "'NextMethod' fue llamado desde afuera de una funci�n"
-
-#: src/main/objects.c:447
-msgid "first argument must be a generic name"
-msgstr "el primer argumento debe ser un nombre gen�rico"
+#: src/main/objects.c:427
+msgid "'UseMethod' used in an inappropriate fashion"
+msgstr "'UseMethod' se us� de manera no apropiada"
 
 #: src/main/objects.c:472
 #, fuzzy, c-format
 msgid "no applicable method for '%s' applied to an object of class \"%s\""
 msgstr "no hay m�todo aplicable para \"%s\""
 
-#: src/main/objects.c:533
+#: src/main/objects.c:582
 msgid "'NextMethod' called from outside a function"
 msgstr "'NextMethod' fue llamado desde afuera de una funci�n"
 
-#: src/main/objects.c:539
+#: src/main/objects.c:588
 msgid "'NextMethod' called from an anonymous function"
 msgstr "'NextMethod' fue llamado desde una funci�n an�nima"
 
-#: src/main/objects.c:563
+#: src/main/objects.c:609
 msgid "no calling generic was found: was a method called directly?"
 msgstr ""
 "no se encontr� ninguna llamada gen�rica: se llam� un m�todo directamente?"
 
-#: src/main/objects.c:566
+#: src/main/objects.c:612
 #, c-format
 msgid "'function' is not a function, but of type %d"
 msgstr "'function' no es una funci�n, sino que es de tipo %d"
 
-#: src/main/objects.c:640
+#: src/main/objects.c:639
 msgid "wrong argument ..."
 msgstr "argumento ... errado"
 
-#: src/main/objects.c:653
+#: src/main/objects.c:651
 msgid "object not specified"
 msgstr "No se especific� el objeto"
 
-#: src/main/objects.c:663 src/main/objects.c:670
+#: src/main/objects.c:659 src/main/objects.c:666
 msgid "generic function not specified"
 msgstr "no se especific� la funci�n gen�rica"
 
-#: src/main/objects.c:667
+#: src/main/objects.c:663
 #, fuzzy
 msgid "invalid generic argument to 'NextMethod'"
 msgstr "el argumento gen�rico no es v�lido para NextMethod"
 
-#: src/main/objects.c:680
+#: src/main/objects.c:675
 #, fuzzy
 msgid "invalid 'group' argument found in 'NextMethod'"
 msgstr "se encontr� un argumento 'group' inv�lido en NextMethod"
 
-#: src/main/objects.c:699
+#: src/main/objects.c:692
 msgid "wrong value for .Method"
 msgstr "valor equivocado para .Method"
 
-#: src/main/objects.c:703 src/main/objects.c:712
-#, c-format
-msgid "method name too long in '%s'"
-msgstr "el nombre del m�todo es demasiado largo en '%s'"
-
-#: src/main/objects.c:715
+#: src/main/objects.c:702
 msgid "Incompatible methods ignored"
 msgstr "se ignoran los m�todos incompatibles"
 
-#: src/main/objects.c:775 src/main/objects.c:780
+#: src/main/objects.c:759 src/main/objects.c:766
 msgid "no method to invoke"
 msgstr "no existe ning�n m�todo para invocar"
 
-#: src/main/objects.c:832
+#: src/main/objects.c:817
 msgid "cannot unclass an environment"
 msgstr "no se puede desclasificar un entorno"
 
-#: src/main/objects.c:835
+#: src/main/objects.c:820
 msgid "cannot unclass an external pointer"
 msgstr "no se puede desclasificar un puntero externo"
 
-#: src/main/objects.c:872
+#: src/main/objects.c:856
 msgid "'what' must be a character vector"
 msgstr "'what' debe ser un vector de caracteres"
 
-#: src/main/objects.c:876
+#: src/main/objects.c:860
 msgid "'which' must be a length 1 logical vector"
 msgstr "'which' debe ser un vector l�gico de longitud 1"
 
-#: src/main/objects.c:882
+#: src/main/objects.c:866
 msgid "use 'is()' instead of 'inherits()' on S4 objects"
 msgstr "use 'is()' en lugar de 'inherits()' en objetos S4"
 
-#: src/main/objects.c:1012
+#: src/main/objects.c:995
 msgid "could not find correct environment; please report!"
 msgstr "no se puede encontrar el entorno correcto; por favor reportar!"
 
-#: src/main/objects.c:1052
+#: src/main/objects.c:1039
 #, fuzzy
 msgid "'onOff' must be TRUE or FALSE"
 msgstr "'all.x' debe ser TRUE o FALSE"
 
-#: src/main/objects.c:1119
+#: src/main/objects.c:1104
 #, c-format
 msgid "unable to find a non-generic version of function \"%s\""
 msgstr "no fue posible encontrar una versi�n no gen�rica de la funci�n \"%s\""
 
-#: src/main/objects.c:1151
+#: src/main/objects.c:1136
 #, fuzzy
 msgid ""
 "'standardGeneric' called without 'methods' dispatch enabled (will be ignored)"
 msgstr ""
 "standardGeneric fue llamada sin m�todo de despacho habilitado (ser� ignorada)"
 
-#: src/main/objects.c:1160
+#: src/main/objects.c:1145
 #, fuzzy
 msgid "argument to 'standardGeneric' must be a non-empty character string"
 msgstr ""
@@ -4564,7 +4647,7 @@ msgstr ""
 # ....desde el cuerpo de esa funci�n gen�rica
 # o bien
 # ....desde el cuerpo de esa \"funtion\" gen�rica
-#: src/main/objects.c:1165
+#: src/main/objects.c:1150
 #, c-format
 msgid ""
 "call to standardGeneric(\"%s\") apparently not from the body of that generic "
@@ -4573,11 +4656,7 @@ msgstr ""
 "la llamada de standardGeneric(\"%s\") parece no haber sido originada desde "
 "el cuerpo de una \"function\" gen�rica"
 
-#: src/main/objects.c:1189
-msgid "argument 'code' must be a character string"
-msgstr "el argumento de 'code' debe ser un string de caracteres"
-
-#: src/main/objects.c:1257
+#: src/main/objects.c:1249
 #, c-format
 msgid ""
 "invalid primitive methods code (\"%s\"): should be \"clear\", \"reset\", "
@@ -4586,33 +4665,33 @@ msgstr ""
 "el c�digo de los m�todos primitivos no es v�lido (\"%s\"): debe ser \"clear"
 "\", \"reset\", \"set\", o \"suppress\""
 
-#: src/main/objects.c:1265
+#: src/main/objects.c:1257
 msgid "invalid object: must be a primitive function"
 msgstr "objeto inv�lido: debe ser una funci�n primitiva"
 
-#: src/main/objects.c:1312
+#: src/main/objects.c:1304
 #, c-format
 msgid ""
 "the formal definition of a primitive generic must be a function object (got "
 "type '%s')"
 msgstr ""
-"la definici�n formal de una primitiva gen�rica debe ser un objeto del tipo="
-"(got type '%s')"
+"la definici�n formal de una primitiva gen�rica debe ser un objeto del "
+"tipo=(got type '%s')"
 
-#: src/main/objects.c:1342
+#: src/main/objects.c:1334
 #, fuzzy, c-format
 msgid "object returned as generic function \"%s\" does not appear to be one"
 msgstr "no parece ser un objecto retornado como funcion generica \"%s\""
 
-#: src/main/objects.c:1444
+#: src/main/objects.c:1439
 msgid "invalid primitive operation given for dispatch"
 msgstr "operaci�n primitiva inv�lida para enviar"
 
-#: src/main/objects.c:1470 src/main/objects.c:1489
+#: src/main/objects.c:1468 src/main/objects.c:1487
 msgid "dispatch error"
 msgstr "error de env�o"
 
-#: src/main/objects.c:1483
+#: src/main/objects.c:1481
 #, c-format
 msgid ""
 "primitive function \"%s\" has been set for methods but no generic function "
@@ -4621,85 +4700,95 @@ msgstr ""
 "la funci�n primitiva \"%s\" se ha fijado para los m�todos pero no fue "
 "provista la funci�n gen�rica"
 
-#: src/main/objects.c:1508
+#: src/main/objects.c:1506
 msgid "C level MAKE_CLASS macro called with NULL string pointer"
 msgstr "macro MAKE_CLASS en C llamado con el puntero de string NULL"
 
-#: src/main/objects.c:1524
+#: src/main/objects.c:1522
+#, fuzzy
+msgid "'methods' package not yet loaded"
+msgstr "las fuentes Hershey no pueden ser cargadas"
+
+#: src/main/objects.c:1532
 #, fuzzy
 msgid "R_getClassDef(.) called with NULL string pointer"
 msgstr "macro MAKE_CLASS en C llamado con el puntero de string NULL"
 
-#: src/main/objects.c:1546
+#: src/main/objects.c:1577
 msgid "C level NEW macro called with null class definition pointer"
 msgstr ""
 "macro NEW en C llamado con el puntero nulo de la definici�n de la clase"
 
-#: src/main/objects.c:1550
+#: src/main/objects.c:1581
 #, fuzzy, c-format
 msgid "trying to generate an object from a virtual class (\"%s\")"
 msgstr "intenci�n de generar un objeto en C de una clase virtual (\"%s\")"
 
-#: src/main/objects.c:1627
+#: src/main/objects.c:1663
 #, fuzzy, c-format
 msgid "object of class \"%s\" does not correspond to a valid S3 object"
 msgstr "Objeto de la clase \"%s\" no corresponde a un objeto v�lido S3"
 
-#: src/main/options.c:120 src/main/options.c:180
+#: src/main/options.c:121 src/main/options.c:182
 msgid "corrupted options list"
 msgstr " opsiones de lista corruptos"
 
-#: src/main/options.c:130
+#: src/main/options.c:131
 #, fuzzy
 msgid "invalid printing width, used 80"
 msgstr "la correspondencia de string parcial no es v�lida"
 
-#: src/main/options.c:141
+#: src/main/options.c:142
 msgid "invalid printing digits, used 7"
 msgstr "numero de digitos no valido, use  7"
 
-#: src/main/options.c:153
+#: src/main/options.c:154
 msgid "invalid 'deparse.cutoff', used 60"
 msgstr ""
 
-#: src/main/options.c:165
+#: src/main/options.c:166
 msgid "invalid value for \"device.ask.default\", using FALSE"
 msgstr "valor no valido para \"device.ask.default\", usando FALSE"
 
-#: src/main/options.c:401
+#: src/main/options.c:416
 #, fuzzy
 msgid "list argument has no valid names"
 msgstr "el argumento no es un modelo v�lido"
 
-#: src/main/options.c:429
+#: src/main/options.c:445
 #, fuzzy, c-format
 msgid "invalid 'width' parameter, allowed %d...%d"
 msgstr "par�metro 'trans' no v�lido"
 
-#: src/main/options.c:440
+#: src/main/options.c:456
 #, fuzzy, c-format
 msgid "invalid 'digits' parameter, allowed %d...%d"
 msgstr "par�metro 'trans' no v�lido"
 
-#: src/main/options.c:447
+#: src/main/options.c:463
 #, c-format
 msgid "'expressions' parameter invalid, allowed %d...%d"
 msgstr "' parametros invalidos, perimitido es %d...%d"
 
-#: src/main/options.c:454 src/main/options.c:462 src/main/options.c:468
-#: src/main/options.c:476 src/main/options.c:483 src/main/options.c:488
-#: src/main/options.c:495 src/main/options.c:501 src/main/options.c:507
-#: src/main/options.c:512 src/main/options.c:517 src/main/options.c:526
-#: src/main/options.c:532 src/main/options.c:538 src/main/options.c:549
-#: src/main/options.c:556 src/main/options.c:562 src/main/options.c:570
-#: src/main/options.c:577 src/main/options.c:584 src/main/options.c:591
-#: src/main/options.c:598 src/main/options.c:606 src/main/options.c:615
-#: src/main/options.c:618 src/main/options.c:624
+#: src/main/options.c:470 src/main/options.c:478 src/main/options.c:484
+#: src/main/options.c:492 src/main/options.c:499 src/main/options.c:504
+#: src/main/options.c:511 src/main/options.c:517 src/main/options.c:523
+#: src/main/options.c:528 src/main/options.c:533 src/main/options.c:542
+#: src/main/options.c:548 src/main/options.c:554 src/main/options.c:564
+#: src/main/options.c:578 src/main/options.c:584 src/main/options.c:592
+#: src/main/options.c:599 src/main/options.c:606 src/main/options.c:613
+#: src/main/options.c:620 src/main/options.c:628 src/main/options.c:637
+#: src/main/options.c:640 src/main/options.c:646
 #, c-format
 msgid "invalid value for '%s'"
 msgstr "valor inv�lido para '%s'"
 
-#: src/main/options.c:611 src/main/options.c:640
+#: src/main/options.c:569
+#, fuzzy
+msgid "'OutDec' must be a string of one character"
+msgstr "'dec' debe ser un car�cter �nico"
+
+#: src/main/options.c:633 src/main/options.c:662
 msgid "\"par.ask.default\" has been replaced by \"device.ask.default\""
 msgstr "\"par.ask.default\" ha sido reemplazado por \"device.ask.default\""
 
@@ -4720,15 +4809,20 @@ msgstr ""
 msgid "non-string argument to Internal paste"
 msgstr "el argumento para pegado interno no es un string"
 
-#: src/main/paste.c:390
+#: src/main/paste.c:387
 msgid "first argument must be atomic"
 msgstr "primer argumento debe ser at�mico"
 
-#: src/main/paste.c:560
+#: src/main/paste.c:448
+#, fuzzy
+msgid "'decimal.mark' must be a string of one character"
+msgstr "'dec' debe ser un car�cter �nico"
+
+#: src/main/paste.c:579
 msgid "Impossible mode ( x )"
 msgstr "modo imposible (x)"
 
-#: src/main/paste.c:645
+#: src/main/paste.c:663
 msgid "atomic vector arguments only"
 msgstr "s�lo argumentos de vectores at�micos"
 
@@ -4736,219 +4830,201 @@ msgstr "s
 msgid "invalid filename specification"
 msgstr "especificaci�n del nombre de archivo inv�lido"
 
-#: src/main/platform.c:375 src/main/platform.c:419
+#: src/main/platform.c:375 src/main/platform.c:420
 msgid "write error during file append"
 msgstr "error de escritura mientras se a�ade el archivo"
 
-#: src/main/platform.c:394
+#: src/main/platform.c:395
 msgid "nothing to append to"
 msgstr "nada para a�adir a"
 
-#: src/main/platform.c:448 src/main/platform.c:795
+#: src/main/platform.c:449 src/main/platform.c:797 src/main/platform.c:979
 msgid "invalid filename argument"
 msgstr "argumento del nombre de archivo inv�lido"
 
-#: src/main/platform.c:460
+#: src/main/platform.c:461
 #, fuzzy, c-format
 msgid "cannot create file '%s', reason '%s'"
 msgstr "no fue posible crear fifo '%s', motivo '%s'"
 
-#: src/main/platform.c:475 src/main/platform.c:545 src/main/platform.c:627
+#: src/main/platform.c:476 src/main/platform.c:546 src/main/platform.c:629
 msgid "invalid first filename"
 msgstr "primer nombre de archivo inv�lido"
 
-#: src/main/platform.c:487
+#: src/main/platform.c:488
 #, c-format
 msgid "cannot remove file '%s', reason '%s'"
 msgstr "no fue posible abrir el archivo '%s', motivo '%s'"
 
-#: src/main/platform.c:547 src/main/platform.c:629
+#: src/main/platform.c:548 src/main/platform.c:631
 msgid "invalid second filename"
 msgstr "segundo nombre de archivo inv�lido"
 
-#: src/main/platform.c:549 src/main/platform.c:631
+#: src/main/platform.c:551 src/main/platform.c:634
 msgid "nothing to link"
 msgstr "nada para vincular"
 
-#: src/main/platform.c:559
+#: src/main/platform.c:561
 #, fuzzy
 msgid "symbolic links are not supported on this version of Windows"
 msgstr "esta plataforma no soporta symlinks"
 
-#: src/main/platform.c:581
+#: src/main/platform.c:583
 #, fuzzy, c-format
 msgid "cannot symlink '%ls' to '%ls', reason '%s'"
 msgstr "no fue posible abrir el archivo '%s', motivo '%s'"
 
-#: src/main/platform.c:601
+#: src/main/platform.c:603
 #, fuzzy, c-format
 msgid "cannot symlink '%s' to '%s', reason '%s'"
 msgstr "no fue posible abrir el archivo '%s', motivo '%s'"
 
-#: src/main/platform.c:609
+#: src/main/platform.c:611
 #, fuzzy
 msgid "symbolic links are not supported on this platform"
 msgstr "esta plataforma no soporta symlinks"
 
-#: src/main/platform.c:649
+#: src/main/platform.c:652
 #, fuzzy, c-format
 msgid "cannot link '%ls' to '%ls', reason '%s'"
 msgstr "no fue posible abrir el archivo '%s', motivo '%s'"
 
-#: src/main/platform.c:669
+#: src/main/platform.c:672
 #, fuzzy, c-format
 msgid "cannot link '%s' to '%s', reason '%s'"
 msgstr "no fue posible abrir el archivo '%s', motivo '%s'"
 
-#: src/main/platform.c:678
+#: src/main/platform.c:681
 #, fuzzy
 msgid "(hard) links are not supported on this platform"
 msgstr "esta plataforma no soporta symlinks"
 
-#: src/main/platform.c:709
+#: src/main/platform.c:713
 msgid "'from' and 'to' are of different lengths"
 msgstr "'from' y 'to' son de longitudes diferentes"
 
-#: src/main/platform.c:720 src/main/platform.c:730
+#: src/main/platform.c:724 src/main/platform.c:734
 #, fuzzy
 msgid "expanded 'from' name too long"
 msgstr "nombre ampliado de fuente demasiado largo"
 
-#: src/main/platform.c:724 src/main/platform.c:734
+#: src/main/platform.c:728 src/main/platform.c:738
 #, fuzzy
 msgid "expanded 'to' name too long"
 msgstr "nombre ampliado de fuente demasiado largo"
 
-#: src/main/platform.c:738
+#: src/main/platform.c:742
 #, fuzzy, c-format
 msgid "cannot rename file '%s' to '%s', reason '%s'"
 msgstr "no fue posible crear fifo '%s', motivo '%s'"
 
-#: src/main/platform.c:1094
+#: src/main/platform.c:1168
 msgid "invalid 'pattern' regular expression"
 msgstr "expresi�n regular inv�lida en 'pattern'"
 
-#: src/main/platform.c:1211
+#: src/main/platform.c:1285
 msgid "unable to determine R home location"
 msgstr "no fue posible determinar el directorio inicial de R"
 
-#: src/main/platform.c:1263
+#: src/main/platform.c:1338
 msgid "file name too long"
 msgstr "nombre de archivo muy largo"
 
-#: src/main/platform.c:1511 src/main/platform.c:1558 src/main/sysutils.c:1850
-#: src/main/sysutils.c:1864
+#: src/main/platform.c:1586 src/main/platform.c:1633 src/main/sysutils.c:1806
+#: src/main/sysutils.c:1820
 msgid "internal out-of-memory condition"
 msgstr "memoria interna rebasada"
 
-#: src/main/platform.c:1554 src/main/sysutils.c:1860
+#: src/main/platform.c:1629 src/main/sysutils.c:1816
 #, c-format
 msgid "read error on '%s'"
 msgstr "error de lectura en '%s'"
 
-#: src/main/platform.c:1722
+#: src/main/platform.c:1728
 msgid "setting 'LC_NUMERIC' may cause R to function strangely"
 msgstr ""
 "especificacion de 'LC_NUMERIC' puede forzar R a funcionar de forma extra�a"
 
-#: src/main/platform.c:1736
+#: src/main/platform.c:1742
 msgid "LC_MESSAGES exists on Windows but is not operational"
 msgstr "existen LC_MESSAGES en Windows pero no es operacional "
 
-#: src/main/platform.c:1763
+#: src/main/platform.c:1769
 #, fuzzy, c-format
 msgid "OS reports request to set locale to \"%s\" cannot be honored"
 msgstr "el sistema operativo informa que un pedido no puede ser cumplido"
 
-#: src/main/platform.c:2065
-msgid "'hostname' must be a character vector of length 1"
-msgstr "'hostname' debe ser un vector de caracteres de longitud 1"
-
-#: src/main/platform.c:2071
-#, c-format
-msgid "nsl() was unable to resolve host '%s'"
-msgstr "soluci�n de m�quina '%s' imposible en nsl()"
-
-#: src/main/platform.c:2078
-#, fuzzy
-msgid "unknown format returned by C function 'gethostbyname'"
-msgstr "formato desconocido retornado por gethostbyname"
-
-#: src/main/platform.c:2087
-msgid "nsl() is not supported on this platform"
-msgstr "esta plataforma no soporta nsl()"
-
-#: src/main/platform.c:2158
+#: src/main/platform.c:2131
 #, c-format
 msgid "'%s' already exists"
 msgstr "'%s' ya existe"
 
-#: src/main/platform.c:2161
+#: src/main/platform.c:2134
 #, fuzzy, c-format
 msgid "cannot create dir '%s', reason '%s'"
 msgstr "no fue posible crear fifo '%s', motivo '%s'"
 
-#: src/main/platform.c:2207
+#: src/main/platform.c:2181
 #, fuzzy, c-format
 msgid "'%ls' already exists"
 msgstr "'%s' ya existe"
 
-#: src/main/platform.c:2211
+#: src/main/platform.c:2183 src/main/platform.c:2189
 #, fuzzy, c-format
 msgid "cannot create dir '%ls', reason '%s'"
 msgstr "no fue posible crear fifo '%s', motivo '%s'"
 
-#: src/main/platform.c:2245 src/main/platform.c:2449
+#: src/main/platform.c:2223 src/main/platform.c:2435
 msgid "too deep nesting"
 msgstr ""
 
-#: src/main/platform.c:2253 src/main/platform.c:2266 src/main/platform.c:2284
+#: src/main/platform.c:2231 src/main/platform.c:2244 src/main/platform.c:2262
 #, fuzzy
 msgid "over-long path"
 msgstr "patr�n de longitud 0"
 
-#: src/main/platform.c:2273
+#: src/main/platform.c:2251
 #, fuzzy, c-format
 msgid "problem creating directory %ls: %s"
 msgstr "problema al ejecutar el editor %s"
 
-#: src/main/platform.c:2293
+#: src/main/platform.c:2271
 #, fuzzy, c-format
 msgid "problem reading dir %ls: %s"
 msgstr "problema al ejecutar el editor %s"
 
-#: src/main/platform.c:2304 src/main/platform.c:2465 src/main/platform.c:2478
-#: src/main/platform.c:2498 src/main/platform.c:2520
+#: src/main/platform.c:2282 src/main/platform.c:2451 src/main/platform.c:2464
+#: src/main/platform.c:2484 src/main/platform.c:2506
 #, fuzzy
 msgid "over-long path length"
 msgstr "patr�n de longitud 0"
 
-#: src/main/platform.c:2312
+#: src/main/platform.c:2290
 #, c-format
 msgid "problem copying %ls to %ls: %s"
 msgstr "problema al copiar %ls  a %ls: %s"
 
-#: src/main/platform.c:2487
+#: src/main/platform.c:2473
 #, fuzzy, c-format
 msgid "problem creating directory %s: %s"
 msgstr "problema al ejecutar el editor %s"
 
-#: src/main/platform.c:2507
+#: src/main/platform.c:2493
 #, fuzzy, c-format
 msgid "problem reading directory %s: %s"
 msgstr "problema al ejecutar el editor %s"
 
-#: src/main/platform.c:2529
+#: src/main/platform.c:2515
 #, c-format
 msgid "problem copying %s to %s: %s"
 msgstr "problema al copiar %s a %s: %s"
 
-#: src/main/platform.c:2662
+#: src/main/platform.c:2653
 #, fuzzy
 msgid "'mode' must be of length at least one"
 msgstr "'hadj' debe tener longitud 1"
 
-#: src/main/platform.c:2729
+#: src/main/platform.c:2720
 #, fuzzy
 msgid "insufficient OS support on this platform"
 msgstr "esta plataforma no soporta nsl()"
@@ -4972,102 +5048,107 @@ msgstr "todos los valore de z son NA"
 msgid "invalid math style encountered"
 msgstr "n�mero de ejes no v�lido %d"
 
-#: src/main/plotmath.c:1261 src/main/plotmath.c:1366 src/main/plotmath.c:2664
+#: src/main/plotmath.c:1260 src/main/plotmath.c:1365 src/main/plotmath.c:2654
 #, fuzzy
 msgid "invalid mathematical annotation"
 msgstr "la funci�n interna no es v�lida"
 
-#: src/main/plotmath.c:1670
+#: src/main/plotmath.c:1669
 #, fuzzy
 msgid "invalid accent"
 msgstr "argumento no v�lido"
 
-#: src/main/plotmath.c:1964
+#: src/main/plotmath.c:1963
 #, fuzzy
 msgid "invalid group delimiter"
 msgstr "l�mites de 'x' no v�lidos"
 
-#: src/main/plotmath.c:1991 src/main/plotmath.c:2137
+#: src/main/plotmath.c:1990 src/main/plotmath.c:2127
 #, fuzzy
 msgid "invalid group specification"
 msgstr "especificaci�n de fuente no v�lida"
 
-#: src/main/plotmath.c:2062
+#: src/main/plotmath.c:2052
 #, fuzzy
 msgid "group is incomplete"
 msgstr "Exhibici�n de redise�o de la lista incompleta"
 
-#: src/main/plotmath.c:3190
+#: src/main/plotmath.c:3180
 #, fuzzy
 msgid "Metric information not available for this family/device"
 msgstr "truncamiento no habilitado para esta conexi�n"
 
-#: src/main/print.c:148 src/main/print.c:254
+#: src/main/print.c:140 src/main/print.c:247
 msgid "invalid 'na.print' specification"
 msgstr "especificaci�n 'na.print' inv�lida"
 
-#: src/main/print.c:157
+#: src/main/print.c:149
 msgid "invalid row labels"
 msgstr "r�tulos de l�neas inv�lidos"
 
-#: src/main/print.c:159
+#: src/main/print.c:151
 msgid "invalid column labels"
 msgstr "r�tulos de columnas inv�lidos"
 
-#: src/main/print.c:183
+#: src/main/print.c:176
 #, fuzzy
 msgid "non-function argument to .Internal(print.function(.))"
 msgstr "el argumento para pegado interno no es un string"
 
-#: src/main/print.c:264
+#: src/main/print.c:257
 msgid "'gap' must be non-negative integer"
 msgstr "'gap' debe ser un entero no negativo"
 
-#: src/main/print.c:289
+#: src/main/print.c:282
 msgid "invalid 'tryS4' internal argument"
 msgstr "argumento interno 'tryS4' inv�lido"
 
-#: src/main/print.c:1028
+#: src/main/print.c:851
+#, fuzzy
+msgid "print buffer overflow"
+msgstr "buffer de entrada desbordado en la linea %d"
+
+#: src/main/print.c:1043
 #, fuzzy
 msgid "invalid character length in 'dblepr'"
 msgstr "largo de car�cter inv�lido en dblepr"
 
-#: src/main/print.c:1046
+#: src/main/print.c:1061
 #, fuzzy
 msgid "invalid character length in 'intpr'"
 msgstr " largo de car�cter inv�lido en intpr"
 
-#: src/main/print.c:1065
+#: src/main/print.c:1080
 #, fuzzy
 msgid "invalid character length in 'realpr'"
 msgstr " largo de car�cter inv�lido en realpr"
 
-#: src/main/print.c:1075
+#: src/main/print.c:1090
 #, fuzzy
 msgid "memory allocation error in 'realpr'"
 msgstr "error de asignaci�n de memoria en realpr"
 
-#: src/main/print.c:1091
+#: src/main/print.c:1106
 #, c-format
 msgid "BLAS/LAPACK routine '%6s' gave error code %d"
 msgstr "rutina BLAS/LAPACK  '%6s' tuvo un error de c�digo %d"
 
-#: src/main/printarray.c:453
+#: src/main/printarray.c:332
 msgid "too few row labels"
 msgstr "muy pocos r�tulos de filas"
 
-#: src/main/printarray.c:455
+#: src/main/printarray.c:334
 msgid "too few column labels"
 msgstr " muy pocos r�tulos de columnas"
 
-#: src/main/printarray.c:489
+#: src/main/printarray.c:368
 #, fuzzy, c-format
 msgid " [ reached getOption(\"max.print\") -- omitted %d row ]\n"
 msgid_plural " [ reached getOption(\"max.print\") -- omitted %d rows ]\n"
 msgstr[0] " [ reached getOption(\"max.print\") -- omitida la �ltima fila ]]\n"
 msgstr[1] " [ reached getOption(\"max.print\") -- omitidas %d filas ]]\n"
 
-#: src/main/printutils.c:613
+#: src/main/printutils.c:710
 #, fuzzy
 msgid "it is not known that wchar_t is Unicode on this platform"
 msgstr "esta plataforma no soporta nsl()"
@@ -5076,49 +5157,50 @@ msgstr "esta plataforma no soporta nsl()"
 msgid "argument is not a numeric vector"
 msgstr "el argumento no es un vector num�rico"
 
-#: src/main/random.c:37
+#: src/main/random.c:39
 msgid "invalid arguments"
 msgstr "argumentos inv�lidos"
 
-#: src/main/random.c:93 src/main/random.c:110 src/main/random.c:175
-#: src/main/random.c:201 src/main/random.c:274 src/main/random.c:288
+#: src/main/random.c:95 src/main/random.c:112 src/main/random.c:178
+#: src/main/random.c:204 src/main/random.c:277 src/main/random.c:291
 msgid "NAs produced"
 msgstr "NAs producidos"
 
-#: src/main/random.c:445
+#: src/main/random.c:438
 msgid "NA in probability vector"
 msgstr "NA en vector de probabilidades"
 
-#: src/main/random.c:447
-msgid "non-positive probability"
+#: src/main/random.c:440
+#, fuzzy
+msgid "negative probability"
 msgstr "probabilidad negativa"
 
-#: src/main/random.c:454
+#: src/main/random.c:447
 msgid "too few positive probabilities"
 msgstr "muy pocas probabilidades positivas"
 
-#: src/main/random.c:491 src/main/random.c:519
+#: src/main/random.c:483 src/main/random.c:511
 #, fuzzy
 msgid "cannot take a sample larger than the population when 'replace = FALSE'"
 msgstr ""
 "imposible tomar una muestra mayor que la poblaci�n\n"
 "cuando 'remplace = FALSE'"
 
-#: src/main/random.c:498
+#: src/main/random.c:490
 msgid "incorrect number of probabilities"
 msgstr "n�mero de probabilidades incorrecto"
 
-#: src/main/random.c:537
+#: src/main/random.c:529
 #, fuzzy
 msgid "n >= 2^31, replace = FALSE is only supported on 64-bit platforms"
 msgstr "esta plataforma no soporta 'dirmark = TRUE'"
 
-#: src/main/raw.c:37 src/main/raw.c:273
+#: src/main/raw.c:37 src/main/raw.c:277
 #, fuzzy
 msgid "argument must be a character vector of length 1"
 msgstr "'hostname' debe ser un vector de caracteres de longitud 1"
 
-#: src/main/raw.c:39 src/main/raw.c:275
+#: src/main/raw.c:39 src/main/raw.c:279
 #, fuzzy
 msgid ""
 "argument should be a character vector of length 1\n"
@@ -5127,146 +5209,143 @@ msgstr ""
 "el argumento '%s' tiene tiene longitud > 1 y s�lo el primer elemento ser� "
 "usado"
 
-#: src/main/raw.c:53 src/main/raw.c:89 src/main/raw.c:110
+#: src/main/raw.c:53 src/main/raw.c:90 src/main/raw.c:113
 #, fuzzy
 msgid "argument 'x' must be a raw vector"
 msgstr "primer argumento debe ser un vector"
 
-#: src/main/raw.c:56 src/main/raw.c:330
+#: src/main/raw.c:56 src/main/raw.c:336
 #, fuzzy
 msgid "argument 'multiple' must be TRUE or FALSE"
 msgstr "'decreciente' debe ser TRUE o FALSE"
 
-#: src/main/raw.c:91
+#: src/main/raw.c:92
 #, fuzzy
 msgid "argument 'shift' must be a small integer"
 msgstr "el argumento 'size' debe ser un entero positivo"
 
-#: src/main/raw.c:129 src/main/raw.c:327
+#: src/main/raw.c:133 src/main/raw.c:333
 #, fuzzy
 msgid "argument 'x' must be an integer vector"
 msgstr "el primer argumento debe ser un vector de caracteres"
 
-#: src/main/raw.c:148
+#: src/main/raw.c:153
 #, fuzzy
 msgid "argument 'x' must be raw, integer or logical"
 msgstr "argumento 'logarithm' debe ser l�gico"
 
-#: src/main/raw.c:150
-#, fuzzy
-msgid "argument 'type' must be a character string"
-msgstr "el argumento de 'code' debe ser un string de caracteres"
-
-#: src/main/raw.c:154
+#: src/main/raw.c:159
 #, fuzzy, c-format
 msgid "argument 'x' must be a multiple of %d long"
 msgstr "argumento debe ser una funci�n"
 
-#: src/main/raw.c:167 src/main/raw.c:181
+#: src/main/raw.c:172 src/main/raw.c:186
 #, fuzzy
 msgid "argument 'x' must not contain NAs"
 msgstr "el argumento no debe ser una funci�n"
 
-#: src/main/raw.c:285
+#: src/main/raw.c:291
 #, fuzzy
 msgid "invalid UTF-8 string"
 msgstr "string UTF-8  no v�lido  'old'"
 
-#: src/main/relop.c:202
+#: src/main/relop.c:196
 #, c-format
 msgid "comparison (%d) is possible only for atomic and list types"
 msgstr "comparaci�n  (%d) es posible solo para tipos lista y at�mico"
 
-#: src/main/relop.c:207
+#: src/main/relop.c:201
 msgid "comparison is not allowed for expressions"
 msgstr "comparaci�n no permitida para expresiones"
 
-#: src/main/relop.c:296
+#: src/main/relop.c:293
 msgid "comparison of these types is not implemented"
 msgstr "comparaciones de estos tipoo no est�n implementadas"
 
-#: src/main/relop.c:509
+#: src/main/relop.c:425
 msgid "invalid comparison with complex values"
 msgstr "comparaci�n con valores complejos es inv�lida"
 
-#: src/main/relop.c:767
+#: src/main/relop.c:683
 #, fuzzy
 msgid "'a' and 'b' must have the same type"
 msgstr "'path' debe ser un vector de caracteres"
 
-#: src/main/saveload.c:200 src/main/saveload.c:205 src/main/saveload.c:214
-#: src/main/saveload.c:223 src/main/saveload.c:232 src/main/saveload.c:241
-#: src/main/saveload.c:245 src/main/saveload.c:254 src/main/saveload.c:1381
-#: src/main/saveload.c:1386 src/main/saveload.c:1430 src/main/saveload.c:1498
-#: src/main/saveload.c:1507 src/main/serialize.c:331 src/main/serialize.c:338
-#: src/main/serialize.c:2388 src/main/serialize.c:2396
+#: src/main/saveload.c:202 src/main/saveload.c:207 src/main/saveload.c:216
+#: src/main/saveload.c:225 src/main/saveload.c:234 src/main/saveload.c:243
+#: src/main/saveload.c:247 src/main/saveload.c:256 src/main/saveload.c:1383
+#: src/main/saveload.c:1388 src/main/saveload.c:1432 src/main/saveload.c:1500
+#: src/main/saveload.c:1509 src/main/serialize.c:354 src/main/serialize.c:361
+#: src/main/serialize.c:374 src/main/serialize.c:378 src/main/serialize.c:405
+#: src/main/serialize.c:421 src/main/serialize.c:2429
+#: src/main/serialize.c:2437
 msgid "read error"
 msgstr "error de lectura"
 
-#: src/main/saveload.c:332
+#: src/main/saveload.c:334
 msgid "a I read error occurred"
 msgstr " ocurri� un error de lectura en I "
 
-#: src/main/saveload.c:342
+#: src/main/saveload.c:344
 msgid "a R read error occurred"
 msgstr "ocurri� un error de lectura en R "
 
-#: src/main/saveload.c:352
+#: src/main/saveload.c:354
 msgid "a C read error occurred"
 msgstr " ocurri� un error de lectura en C "
 
-#: src/main/saveload.c:362
+#: src/main/saveload.c:364
 msgid "a S read error occurred"
 msgstr " ocurri� un error de lectura en S "
 
-#: src/main/saveload.c:387 src/main/saveload.c:395 src/main/saveload.c:403
-#: src/main/saveload.c:1594 src/main/saveload.c:1602
+#: src/main/saveload.c:389 src/main/saveload.c:397 src/main/saveload.c:405
+#: src/main/saveload.c:1596 src/main/saveload.c:1604
 msgid "a read error occurred"
 msgstr "ocurri� un error de lectura "
 
-#: src/main/saveload.c:467
+#: src/main/saveload.c:469
 msgid "unresolved node during restore"
 msgstr "nodo no resuelto durante restauraci�n"
 
-#: src/main/saveload.c:488
+#: src/main/saveload.c:490
 #, c-format
 msgid "restore compatibility error - no version %d compatibility"
 msgstr ""
 "error de compatibilidad de restauraci�n - sin compatibilidad con versi�n %d"
 
-#: src/main/saveload.c:572 src/main/saveload.c:645
+#: src/main/saveload.c:574 src/main/saveload.c:647
 msgid "bad SEXP type in data file"
 msgstr "tipo SEXP defectuoso en archivo de datos"
 
-#: src/main/saveload.c:586
+#: src/main/saveload.c:588
 msgid "mismatch on types"
 msgstr "incompatibilidad de tipos"
 
-#: src/main/saveload.c:607 src/main/saveload.c:1270 src/main/serialize.c:1636
+#: src/main/saveload.c:609 src/main/saveload.c:1272 src/main/serialize.c:1675
 #, fuzzy, c-format
 msgid "unrecognized internal function name \"%s\""
 msgstr "no se pudo encontrar la funci�n \"%s\""
 
-#: src/main/saveload.c:709
+#: src/main/saveload.c:711
 msgid "cannot save file position while restoring data"
 msgstr "no es posible guardar posici�n de archivo mientras se restauran datos"
 
-#: src/main/saveload.c:722
+#: src/main/saveload.c:724
 msgid "cannot restore file position while restoring data"
 msgstr ""
 "no es posible restaurar posici�n de archivo mientras se restauran datos "
 
-#: src/main/saveload.c:915
+#: src/main/saveload.c:917
 msgid "base namespace is not preserved in version 1 workspaces"
 msgstr ""
 "espacio de nombres no est� preservado en �reas de trabajo de la versi�n 1"
 
-#: src/main/saveload.c:917
+#: src/main/saveload.c:919
 msgid "cannot save namespace in version 1 workspaces"
 msgstr ""
 "no es posible guardar nombres de espacio en �reas de trabajo de la versi�n 1"
 
-#: src/main/saveload.c:919
+#: src/main/saveload.c:921
 #, fuzzy
 msgid ""
 "cannot save environment with locked/active bindings in version 1 workspaces"
@@ -5274,163 +5353,163 @@ msgstr ""
 "no es posible guardar ambiente con v�nculos bloqueados/activos en �reas de "
 "trabajo de la versi�n 1"
 
-#: src/main/saveload.c:943
+#: src/main/saveload.c:945
 msgid "cannot save weak references in version 1 workspaces"
 msgstr ""
 "no es posible guardar referencias d�biles en �reas de trabajo de la versi�n 1"
 
-#: src/main/saveload.c:1021
+#: src/main/saveload.c:1023
 msgid "NewWriteVec called with non-vector type"
 msgstr "NewWriteVec llamado con un tipo no vectorial"
 
-#: src/main/saveload.c:1084
+#: src/main/saveload.c:1086
 msgid "cannot save byte code objects in version 1 workspaces"
 msgstr ""
 "no es posible guardar objetos de tipo c�digos de byte en �reas de trabajo de "
 "la versi�n 1"
 
-#: src/main/saveload.c:1086
+#: src/main/saveload.c:1088
 #, c-format
 msgid "NewWriteItem: unknown type %i"
 msgstr "NewWriteItem: tipo desconocido %i"
 
-#: src/main/saveload.c:1216
+#: src/main/saveload.c:1218
 msgid "NewReadVec called with non-vector type"
 msgstr "NewReadVec llamado con un tipo no vectorial"
 
-#: src/main/saveload.c:1286
+#: src/main/saveload.c:1288
 msgid "cannot read byte code objects from version 1 workspaces"
 msgstr ""
 "no es posible leer objetos de tipo c�digos de byte a partir de �reas de "
 "trabajo de la versi�n 1"
 
-#: src/main/saveload.c:1288
+#: src/main/saveload.c:1290
 #, c-format
 msgid "NewReadItem: unknown type %i"
 msgstr "NewReadItem: tipo desconocido %i"
 
-#: src/main/saveload.c:1440
+#: src/main/saveload.c:1442
 msgid "out of memory reading ascii string"
 msgstr "memoria insuficiente en lectura de string ascii"
 
-#: src/main/saveload.c:1565
+#: src/main/saveload.c:1567
 msgid "a binary read error occurred"
 msgstr "ocurri� un error de lectura binario"
 
-#: src/main/saveload.c:1580 src/main/saveload.c:1681
+#: src/main/saveload.c:1582 src/main/saveload.c:1683
 msgid "out of memory reading binary string"
 msgstr " memoria insuficiente en lectura de string binario"
 
-#: src/main/saveload.c:1585
+#: src/main/saveload.c:1587
 msgid "a binary string read error occurred"
 msgstr "ocurri� un error de lectura de string binario"
 
-#: src/main/saveload.c:1645
+#: src/main/saveload.c:1647
 msgid "an xdr integer data write error occurred"
 msgstr "ocurri� un error de escritura de un entero xdr "
 
-#: src/main/saveload.c:1652
+#: src/main/saveload.c:1654
 msgid "an xdr integer data read error occurred"
 msgstr " ocurri� un error de lectura de un entero xdr "
 
-#: src/main/saveload.c:1667 src/main/saveload.c:1686
+#: src/main/saveload.c:1669 src/main/saveload.c:1688
 msgid "an xdr string data write error occurred"
 msgstr " ocurri� un error de escritura de string xdr "
 
-#: src/main/saveload.c:1694
+#: src/main/saveload.c:1696
 msgid "an xdr real data write error occurred"
 msgstr " ocurri� un error de escritura de un real xdr "
 
-#: src/main/saveload.c:1701
+#: src/main/saveload.c:1703
 msgid "an xdr real data read error occurred"
 msgstr " ocurri� un error de lectura de un real xdr "
 
-#: src/main/saveload.c:1708
+#: src/main/saveload.c:1710
 msgid "an xdr complex data write error occurred"
 msgstr " ocurri� un error de escritura de un complejo xdr"
 
-#: src/main/saveload.c:1715
+#: src/main/saveload.c:1717
 msgid "an xdr complex data read error occurred"
 msgstr " ocurri� un error de lectura de un complejo xdr"
 
-#: src/main/saveload.c:1783 src/main/serialize.c:1958
-#: src/main/serialize.c:2568 src/modules/internet/internet.c:351
-#: src/modules/internet/internet.c:409 src/modules/internet/internet.c:514
+#: src/main/saveload.c:1785 src/main/serialize.c:1997
+#: src/main/serialize.c:2614 src/modules/internet/internet.c:514
+#: src/modules/internet/internet.c:590 src/modules/internet/internet.c:701
 msgid "write failed"
 msgstr "fall� escritura"
 
-#: src/main/saveload.c:1910
+#: src/main/saveload.c:1912
 msgid "restore file may be empty -- no data loaded"
 msgstr "el archivo de restauraci�n  puede estar vac�o - ning�n dato cargado"
 
-#: src/main/saveload.c:1912
+#: src/main/saveload.c:1914
 msgid "restore file may be from a newer version of R -- no data loaded"
 msgstr ""
 "el archivo de restauraci�n puede ser de una versi�n  m�s nueva de R - ning�n "
 "dato cargado"
 
-#: src/main/saveload.c:1914
+#: src/main/saveload.c:1916
 msgid "bad restore file magic number (file may be corrupted) -- no data loaded"
 msgstr ""
 "n�mero m�gico de archivo de restauraci�n inv�lido (el archivo puede estar "
 "da�ado) -- ning�n dato recargado"
 
-#: src/main/saveload.c:1940 src/main/saveload.c:2238
+#: src/main/saveload.c:1942 src/main/saveload.c:2240
 msgid "first argument must be a character vector"
 msgstr "el primer argumento debe ser un vector de caracteres"
 
-#: src/main/saveload.c:2012
+#: src/main/saveload.c:2014
 msgid "not a valid named list"
 msgstr "no es una lista de nombres v�lida"
 
-#: src/main/saveload.c:2019 src/main/saveload.c:2040
+#: src/main/saveload.c:2021 src/main/saveload.c:2042
 #, c-format
 msgid "'%s' looks like a pre-2.4.0 S4 object: please recreate it"
 msgstr "'%s' parece un objecto pre-2.4.0 S4 : por favor recreelo"
 
-#: src/main/saveload.c:2027
+#: src/main/saveload.c:2029
 msgid "loaded data is not in pair list form"
 msgstr "los datos cargados no est�n en forma de lista pareada"
 
-#: src/main/saveload.c:2063
+#: src/main/saveload.c:2065
 msgid "first argument must be a file name"
 msgstr "el primer argumento debe ser un nombre de archivo"
 
-#: src/main/saveload.c:2108 src/main/saveload.c:2134 src/main/serialize.c:826
-#: src/main/serialize.c:863 src/main/serialize.c:901
+#: src/main/saveload.c:2110 src/main/saveload.c:2136 src/main/serialize.c:864
+#: src/main/serialize.c:901 src/main/serialize.c:939
 msgid "XDR write failed"
 msgstr "escritura XDR fall�"
 
-#: src/main/saveload.c:2121 src/main/saveload.c:2146 src/main/serialize.c:1362
-#: src/main/serialize.c:1398 src/main/serialize.c:1436
+#: src/main/saveload.c:2123 src/main/saveload.c:2148 src/main/serialize.c:1400
+#: src/main/serialize.c:1436 src/main/serialize.c:1474
 msgid "XDR read failed"
 msgstr "lectura XDR fall�"
 
-#: src/main/saveload.c:2157
+#: src/main/saveload.c:2159
 #, fuzzy, c-format
 msgid "cannot save data -- unable to open '%s': %s"
 msgstr "no es posible guardar los datos -- no fue posible abrir %s"
 
-#: src/main/saveload.c:2254 src/main/serialize.c:2161
+#: src/main/saveload.c:2256 src/main/serialize.c:2202
 #, c-format
 msgid "cannot save to connections in version %d format"
 msgstr "no es posible guardar  para conexiones en formato de versi�n %d"
 
-#: src/main/saveload.c:2277 src/main/serialize.c:2186
+#: src/main/saveload.c:2279 src/main/serialize.c:2227
 msgid "connection not open for writing"
 msgstr "conexi�n no abierta para escritura"
 
-#: src/main/saveload.c:2285
+#: src/main/saveload.c:2288
 msgid "cannot save XDR format to a text-mode connection"
 msgstr "no es posible guardar en formato XDR para una conexi�n de modo texto"
 
-#: src/main/saveload.c:2295 src/main/serialize.c:2066
-#: src/main/serialize.c:2080 src/main/serialize.c:2262
-#: src/main/serialize.c:2284
+#: src/main/saveload.c:2298 src/main/serialize.c:2105
+#: src/main/serialize.c:2119 src/main/serialize.c:2303
+#: src/main/serialize.c:2325
 msgid "error writing to connection"
 msgstr "error al escribir en una conexi�n"
 
-#: src/main/saveload.c:2359 src/main/serialize.c:2234
+#: src/main/saveload.c:2359 src/main/serialize.c:2275
 #, fuzzy
 msgid "connection not open for reading"
 msgstr "la conexi�n no est� abierta para la lectura"
@@ -5462,7 +5541,7 @@ msgstr ""
 msgid "scan() expected '%s', got '%s'"
 msgstr "scan() esperaba '%s', obtuvo '%s'"
 
-#: src/main/scan.c:585 src/main/scan.c:732
+#: src/main/scan.c:585 src/main/scan.c:735
 #, fuzzy
 msgid "too many items"
 msgstr "demasiados argumentos"
@@ -5471,7 +5550,7 @@ msgstr "demasiados argumentos"
 msgid "empty 'what' specified"
 msgstr "especificaci�n vac�a de 'what'"
 
-#: src/main/scan.c:722
+#: src/main/scan.c:725
 #, c-format
 msgid "line %d did not have %d elements"
 msgstr "la linea %d no tiene %d elementos"
@@ -5500,183 +5579,185 @@ msgstr "separador decimal inv
 msgid "invalid quote symbol set"
 msgstr "s�mbolo de citaci�n especificado inv�lido"
 
-#: src/main/scan.c:987
+#: src/main/scan.c:988
 #, fuzzy
 msgid "embedded nul(s) found in input"
 msgstr "nul incrustado en la cadena: '%s' \""
 
-#: src/main/seq.c:48
+#: src/main/seq.c:49
 msgid "unequal factor lengths"
 msgstr "factores de largos desiguales"
 
-#: src/main/seq.c:100
+#: src/main/seq.c:101
 msgid "result would be too long a vector"
 msgstr "el resultado seria un vector muy largo"
 
-#: src/main/seq.c:159
+#: src/main/seq.c:160
 #, fuzzy
 msgid "argument of length 0"
 msgstr "argumento tiene longitud cero"
 
-#: src/main/seq.c:161 src/main/seq.c:163
-#, c-format
-msgid "numerical expression has %d elements: only the first used"
-msgstr "expresi�n num�rica tiene %d elementos: solo el primero es utilizado"
+#: src/main/seq.c:163 src/main/seq.c:168
+#, fuzzy, c-format
+msgid "numerical expression has %d element: only the first used"
+msgid_plural "numerical expression has %d elements: only the first used"
+msgstr[0] "expresi�n num�rica tiene %d elementos: solo el primero es utilizado"
+msgstr[1] "expresi�n num�rica tiene %d elementos: solo el primero es utilizado"
 
-#: src/main/seq.c:167
+#: src/main/seq.c:174
 msgid "NA/NaN argument"
 msgstr "Argumento NA/NaN"
 
-#: src/main/seq.c:331
+#: src/main/seq.c:333
 #, fuzzy
 msgid "incorrect type for second argument"
 msgstr "rep() del segundo argumento de tipo incorrecto"
 
-#: src/main/seq.c:334
+#: src/main/seq.c:336
 #, fuzzy, c-format
 msgid "attempt to replicate an object of type '%s'"
 msgstr "intento de r�plica de objeto que no es vector"
 
-#: src/main/seq.c:387
+#: src/main/seq.c:393
 msgid "attempt to replicate non-vector"
 msgstr "intento de r�plica de objeto que no es vector"
 
-#: src/main/seq.c:403
+#: src/main/seq.c:409
 #, fuzzy
 msgid "cannot replicate NULL to a non-zero length"
 msgstr "no se puede asignar un vector de longitud %d"
 
-#: src/main/seq.c:626 src/main/seq.c:633 src/main/seq.c:768 src/main/seq.c:979
+#: src/main/seq.c:630 src/main/seq.c:637 src/main/seq.c:766 src/main/seq.c:977
 #, fuzzy, c-format
 msgid "first element used of '%s' argument"
 msgstr "solo se utiliz� el primer elemento del argumento 'url'"
 
-#: src/main/seq.c:766
+#: src/main/seq.c:764
 #, fuzzy
 msgid "'length.out' must be a non-negative number"
 msgstr "'gap' debe ser un entero no negativo"
 
-#: src/main/seq.c:790 src/main/seq.c:856 src/main/seq.c:873
+#: src/main/seq.c:788 src/main/seq.c:854 src/main/seq.c:871
 #, fuzzy
 msgid "'from' must be finite"
 msgstr "'a' e 'b' deben ser finitos"
 
-#: src/main/seq.c:792 src/main/seq.c:858 src/main/seq.c:895
+#: src/main/seq.c:790 src/main/seq.c:856 src/main/seq.c:893
 #, fuzzy
 msgid "'to' must be finite"
 msgstr "'a' e 'b' deben ser finitos"
 
-#: src/main/seq.c:804
+#: src/main/seq.c:802
 msgid "invalid '(to - from)/by' in 'seq'"
 msgstr "'(to - from)/by' inv�lido en 'seq'"
 
-#: src/main/seq.c:816
+#: src/main/seq.c:814
 #, fuzzy
 msgid "'by' argument is much too small"
 msgstr "argumento 'file' es muy largo"
 
-#: src/main/seq.c:818
+#: src/main/seq.c:816
 #, fuzzy
 msgid "wrong sign in 'by' argument"
 msgstr "longitud incorrecta para el argumento 'mode'"
 
-#: src/main/seq.c:875 src/main/seq.c:897
+#: src/main/seq.c:873 src/main/seq.c:895
 #, fuzzy
 msgid "'by' must be finite"
 msgstr "'a' e 'b' deben ser finitos"
 
-#: src/main/seq.c:985 src/main/seq.c:990
+#: src/main/seq.c:983 src/main/seq.c:988
 #, fuzzy
 msgid "argument must be coercible to non-negative integer"
 msgstr "argumento debe ser un entorno"
 
-#: src/main/serialize.c:224 src/main/serialize.c:254 src/main/serialize.c:277
+#: src/main/serialize.c:228 src/main/serialize.c:275 src/main/serialize.c:299
 msgid "unknown or inappropriate output format"
 msgstr "formato de salida inapropiado o desconocido"
 
-#: src/main/serialize.c:504
+#: src/main/serialize.c:542
 msgid "must specify ascii, binary, or xdr format"
 msgstr "formato debe ser de tipo ascii, binario o xdr"
 
-#: src/main/serialize.c:505
+#: src/main/serialize.c:543
 msgid "unknown output format"
 msgstr "formato de salida desconocido"
 
-#: src/main/serialize.c:536
+#: src/main/serialize.c:574
 msgid "unknown input format"
 msgstr "formato de entrada desconocido"
 
-#: src/main/serialize.c:541
+#: src/main/serialize.c:579
 msgid "input format does not match specified format"
 msgstr "formato de entrada no coincide con formato especificado"
 
-#: src/main/serialize.c:752
+#: src/main/serialize.c:790
 msgid "no restore method available"
 msgstr "ning�n m�todo de recuperaci�n disponible"
 
-#: src/main/serialize.c:794
+#: src/main/serialize.c:832
 msgid "names in persistent strings are currently ignored"
 msgstr "nombres en strings persistentes son actualmente ignorados"
 
-#: src/main/serialize.c:963
+#: src/main/serialize.c:1001
 #, c-format
 msgid "'%s' may not be available when loading"
 msgstr "'%s' puede no estar disponible en el proceso de carga"
 
-#: src/main/serialize.c:970
+#: src/main/serialize.c:1008
 msgid "namespaces may not be available when loading"
 msgstr "espacios de nombres pueden no estar disponibles en el proceso de carga"
 
-#: src/main/serialize.c:1097
+#: src/main/serialize.c:1136
 #, c-format
 msgid "WriteItem: unknown type %i"
 msgstr "WriteItem: tipo %i desconocido"
 
-#: src/main/serialize.c:1273
+#: src/main/serialize.c:1312
 #, c-format
 msgid "version %d not supported"
 msgstr "versi�n %d no mantenida"
 
-#: src/main/serialize.c:1305
+#: src/main/serialize.c:1343
 msgid "reference index out of range"
 msgstr "�ndice de referencia fuera de l�mites"
 
-#: src/main/serialize.c:1335
+#: src/main/serialize.c:1373
 msgid "names in persistent strings are not supported yet"
 msgstr "nombres en strings persistentes no disponibles todav�a"
 
-#: src/main/serialize.c:1463
+#: src/main/serialize.c:1501
 #, fuzzy
 msgid "negative serialized length for vector"
 msgstr "no es posible especificar la longitud de un objeto que no es un vector"
 
-#: src/main/serialize.c:1471
+#: src/main/serialize.c:1509
 #, fuzzy
 msgid "invalid upper part of serialized vector length"
 msgstr "tama�o de par�metro inv�lido"
 
-#: src/main/serialize.c:1476
+#: src/main/serialize.c:1514
 msgid ""
 "negative serialized vector length:\n"
 "perhaps long vector from 64-bit version of R?"
 msgstr ""
 
-#: src/main/serialize.c:1707
+#: src/main/serialize.c:1746
 msgid "this version of R cannot read class references"
 msgstr "esta versi�n de R no puede leer referencias de clases"
 
-#: src/main/serialize.c:1709
+#: src/main/serialize.c:1748
 msgid "this version of R cannot read generic function references"
 msgstr "esta versi�n de R no puede leer referencias de funciones gen�ricas"
 
-#: src/main/serialize.c:1726
+#: src/main/serialize.c:1765
 #, c-format
 msgid "ReadItem: unknown type %i, perhaps written by later version of R"
 msgstr ""
 "ReadItem: tipo desconocido en %i, tal vez escrito con una versi�n posterio "
 "de R"
 
-#: src/main/serialize.c:1882
+#: src/main/serialize.c:1921
 #, c-format
 msgid ""
 "cannot read unreleased workspace version %d written by experimental R %d.%d."
@@ -5685,7 +5766,7 @@ msgstr ""
 "no puede leerse espacio de trabajo no liberado, versi�n %d escrita por R "
 "experimental %d.%d.%d"
 
-#: src/main/serialize.c:1886
+#: src/main/serialize.c:1925
 #, c-format
 msgid ""
 "cannot read workspace version %d written by R %d.%d.%d; need R %d.%d.%d or "
@@ -5694,86 +5775,86 @@ msgstr ""
 "no puede leerse espacio de trabajo versi�n %d escrita por R %d.%d.%d; "
 "necesita R %d.%d.%d m�s reciente"
 
-#: src/main/serialize.c:1965
+#: src/main/serialize.c:2004
 #, fuzzy
 msgid "read failed"
 msgstr "lectura XDR fall�"
 
-#: src/main/serialize.c:2028
+#: src/main/serialize.c:2067
 #, fuzzy
 msgid "error reading from ascii connection"
 msgstr "error al leer desde conexi�n"
 
-#: src/main/serialize.c:2030
+#: src/main/serialize.c:2069
 #, fuzzy
 msgid "unexpected format in ascii connection"
 msgstr "no se puede leer desde esta conexi�n"
 
-#: src/main/serialize.c:2035 src/main/serialize.c:2049
+#: src/main/serialize.c:2074 src/main/serialize.c:2088
 msgid "error reading from connection"
 msgstr "error al leer desde conexi�n"
 
-#: src/main/serialize.c:2090
+#: src/main/serialize.c:2130
 msgid "only ascii format can be written to text mode connections"
 msgstr "solo formato ascii puede ser escrito en conexiones de modo texto"
 
-#: src/main/serialize.c:2104
+#: src/main/serialize.c:2144
 msgid "only ascii format can be read from text mode connections"
 msgstr "solo formato ascii puede ser leido de conexiones de modo texto"
 
-#: src/main/serialize.c:2159 src/main/serialize.c:2312
-#: src/main/serialize.c:2461
+#: src/main/serialize.c:2200 src/main/serialize.c:2353
+#: src/main/serialize.c:2502
 msgid "bad version value"
 msgstr "valor de versi�n inv�lido"
 
-#: src/main/serialize.c:2184
+#: src/main/serialize.c:2225
 #, fuzzy
 msgid "binary-mode connection required for ascii=FALSE"
 msgstr "operaciones binarias requieren dos argumentos"
 
-#: src/main/serialize.c:2340 src/main/serialize.c:2377
-#: src/main/serialize.c:2440
+#: src/main/serialize.c:2381 src/main/serialize.c:2418
+#: src/main/serialize.c:2481
 msgid "serialization is too large to store in a raw vector"
 msgstr " demasiado largo para ser guardado en un vector"
 
-#: src/main/serialize.c:2357
+#: src/main/serialize.c:2398
 msgid "cannot allocate buffer"
 msgstr "no puede asignarse buffer"
 
-#: src/main/serialize.c:2546 src/main/serialize.c:2619
+#: src/main/serialize.c:2592 src/main/serialize.c:2665
 msgid "not a proper file name"
 msgstr "nombre de archivo no v�lido"
 
-#: src/main/serialize.c:2548
+#: src/main/serialize.c:2594
 msgid "not a proper raw vector"
 msgstr "no es un vector crudo (raw)"
 
-#: src/main/serialize.c:2569
+#: src/main/serialize.c:2615
 msgid "could not determine file position"
 msgstr "no se pudo determinar posici�n del archivo"
 
-#: src/main/serialize.c:2621
+#: src/main/serialize.c:2667
 msgid "bad offset/length argument"
 msgstr "argumento fuera de rango o longitud inv�lida"
 
-#: src/main/serialize.c:2645 src/main/serialize.c:2658
-#: src/main/serialize.c:2667 src/main/serialize.c:2677
-#: src/main/serialize.c:2690
+#: src/main/serialize.c:2691 src/main/serialize.c:2704
+#: src/main/serialize.c:2713 src/main/serialize.c:2723
+#: src/main/serialize.c:2736
 #, c-format
 msgid "seek failed on %s"
 msgstr "falla de b�squeda en %s"
 
-#: src/main/serialize.c:2662 src/main/serialize.c:2671
-#: src/main/serialize.c:2681 src/main/serialize.c:2694
+#: src/main/serialize.c:2708 src/main/serialize.c:2717
+#: src/main/serialize.c:2727 src/main/serialize.c:2740
 #, c-format
 msgid "read failed on %s"
 msgstr "falla de lectura en %s"
 
-#: src/main/serialize.c:2713
+#: src/main/serialize.c:2759
 msgid "bad environment"
 msgstr "ambiente inv�lido"
 
-#: src/main/serialize.c:2715
+#: src/main/serialize.c:2761
 msgid "bad variable names"
 msgstr "nombres de variables incorrectos"
 
@@ -5781,170 +5862,166 @@ msgstr "nombres de variables incorrectos"
 msgid "only atomic vectors can be tested to be sorted"
 msgstr "solo vectores at�micos pueden ser comparados para ordenarse"
 
-#: src/main/sort.c:326 src/main/sort.c:1228 src/main/sort.c:1396
+#: src/main/sort.c:325 src/main/sort.c:1248
 msgid "'decreasing' must be TRUE or FALSE"
 msgstr "'decreciente' debe ser TRUE o FALSE"
 
-#: src/main/sort.c:329 src/main/sort.c:600
+#: src/main/sort.c:328 src/main/sort.c:599
 msgid "only atomic vectors can be sorted"
 msgstr "solo vectores at�micos pueden ser ordenados"
 
-#: src/main/sort.c:331 src/main/sort.c:602 src/main/sort.c:1297
+#: src/main/sort.c:330 src/main/sort.c:601 src/main/sort.c:1317
 msgid "raw vectors cannot be sorted"
 msgstr "vetores crudos (raw) no pueden ser ordenados"
 
-#: src/main/sort.c:613
+#: src/main/sort.c:612
 msgid "NA or infinite index"
 msgstr ""
 
-#: src/main/sort.c:616
+#: src/main/sort.c:615
 #, fuzzy, c-format
 msgid "index %ld outside bounds"
 msgstr "�ndice %d fuera de l�mites"
 
-#: src/main/sort.c:621 src/main/sort.c:634
+#: src/main/sort.c:620 src/main/sort.c:633
 msgid "NA index"
 msgstr "�ndice NA"
 
-#: src/main/sort.c:623 src/main/sort.c:636
+#: src/main/sort.c:622 src/main/sort.c:635
 #, c-format
 msgid "index %d outside bounds"
 msgstr "�ndice %d fuera de l�mites"
 
-#: src/main/sort.c:1237
+#: src/main/sort.c:1257
 #, c-format
 msgid "argument %d is not a vector"
 msgstr "argumento %d no es un vector"
 
-#: src/main/sort.c:1239
+#: src/main/sort.c:1259
 msgid "argument lengths differ"
 msgstr "argumentos con longitudes diferentes"
 
-#: src/main/sort.c:1324
+#: src/main/sort.c:1344
 msgid "invalid ties.method for rank() [should never happen]"
 msgstr "ties.method inv�lidod para rank() [nunca deber�a suceder]"
 
-#: src/main/sort.c:1429
-msgid "too large a range of values in 'x'"
-msgstr "intervalo de valores muy grande en 'x'"
-
-#: src/main/source.c:215
+#: src/main/source.c:220
 msgid "coercion of 'text' to character was unsuccessful"
 msgstr "coacci�n de \"texto \" a car�cteres  no tuvo �xito"
 
-#: src/main/source.c:231
+#: src/main/source.c:236
 #, fuzzy, c-format
 msgid "argument '%s = \"%s\"' will be ignored"
 msgstr "argumento '%s  ser� ignorado"
 
-#: src/main/split.c:38
+#: src/main/split.c:39
 msgid "first argument must be a vector"
 msgstr "primer argumento debe ser un vector"
 
-#: src/main/split.c:40
+#: src/main/split.c:41
 msgid "second argument must be a factor"
 msgstr "segundo argumento debe ser un factor"
 
-#: src/main/split.c:45
+#: src/main/split.c:46
 #, fuzzy
 msgid "group length is 0 but data length > 0"
 msgstr "Largo de grupo es 0 pero el largo de los datos es > 0"
 
-#: src/main/split.c:47
+#: src/main/split.c:48
 msgid "data length is not a multiple of split variable"
 msgstr "largo de datos no es m�ltiplo de la variable de separaci�n"
 
-#: src/main/split.c:56
+#: src/main/split.c:58
 msgid "factor has bad level"
 msgstr "factor con mal nivel"
 
-#: src/main/sprintf.c:94
+#: src/main/sprintf.c:97
 #, fuzzy, c-format
 msgid "required resulting string length %d is greater than maximal %d"
 msgstr "requerido como resultado longitud de la cadena %d es > m�xima %d"
 
-#: src/main/sprintf.c:102
+#: src/main/sprintf.c:105
 #, fuzzy
 msgid "'fmt' is not a character vector"
 msgstr "'fmt' debe ser un vector de caracteres no vac�o"
 
-#: src/main/sprintf.c:107
+#: src/main/sprintf.c:110
 #, fuzzy, c-format
 msgid "only %d arguments are allowed"
 msgstr "solo 100 argumentos son permitidos"
 
-#: src/main/sprintf.c:114
+#: src/main/sprintf.c:117
 #, fuzzy, c-format
 msgid "invalid type of argument[%d]: '%s'"
 msgstr "'type' (%s) de argumento no v�lido"
 
-#: src/main/sprintf.c:125 src/main/sprintf.c:128
+#: src/main/sprintf.c:128 src/main/sprintf.c:131
 msgid "arguments cannot be recycled to the same length"
 msgstr "argumentos no pueden ser reciclados al mismo tama�o"
 
-#: src/main/sprintf.c:150 src/main/sprintf.c:257
+#: src/main/sprintf.c:153 src/main/sprintf.c:260
 #, fuzzy, c-format
 msgid "'fmt' length exceeds maximal format length %d"
 msgstr "longitud de 'fmt' excede la longitud m�xima %d de buffer"
 
-#: src/main/sprintf.c:169
+#: src/main/sprintf.c:172
 #, fuzzy, c-format
 msgid "unrecognised format specification '%s'"
 msgstr "especificaci�n de color inv�lida '%s"
 
-#: src/main/sprintf.c:180 src/main/sprintf.c:186 src/main/sprintf.c:199
-#: src/main/sprintf.c:206
+#: src/main/sprintf.c:183 src/main/sprintf.c:189 src/main/sprintf.c:202
+#: src/main/sprintf.c:209
 #, c-format
 msgid "reference to non-existent argument %d"
 msgstr "referencia a un argumento no existente %d"
 
-#: src/main/sprintf.c:218
+#: src/main/sprintf.c:221
 #, fuzzy
 msgid "at most one asterisk '*' is supported in each conversion specification"
 msgstr ""
 "a lo sumo un asterisco `*' es permitido en cada especificaci�n de conversi�n"
 
-#: src/main/sprintf.c:228
+#: src/main/sprintf.c:231
 #, fuzzy
 msgid "argument for '*' conversion specification must be a number"
 msgstr "argumento para especificaci�n de conversi�n `*' debe ser un n�mero"
 
-#: src/main/sprintf.c:266
+#: src/main/sprintf.c:269
 msgid "coercion has changed vector length to 0"
 msgstr "coerci�n ha cambiado largo de vector a 0"
 
-#: src/main/sprintf.c:339 src/main/sprintf.c:353 src/main/sprintf.c:367
-#: src/main/sprintf.c:402
+#: src/main/sprintf.c:343 src/main/sprintf.c:357 src/main/sprintf.c:371
+#: src/main/sprintf.c:406
 #, fuzzy, c-format
 msgid "invalid format '%s'; %s"
 msgstr "valor inv�lido para '%s'"
 
-#: src/main/sprintf.c:340
+#: src/main/sprintf.c:344
 #, c-format
 msgid "use format %d or %i for logical objects"
 msgstr "use formato %d o %i para objetos l�gicos"
 
-#: src/main/sprintf.c:354
+#: src/main/sprintf.c:358
 #, fuzzy, c-format
 msgid "use format %d, %i, %o, %x or %X for integer objects"
 msgstr "use formato %d, %i, %x o %X para objetos enteros"
 
-#: src/main/sprintf.c:368
+#: src/main/sprintf.c:372
 #, fuzzy, c-format
 msgid "use format %f, %e, %g or %a for numeric objects"
 msgstr "use formato %f, %e o %g para objetos num�ricos"
 
-#: src/main/sprintf.c:403
+#: src/main/sprintf.c:407
 #, c-format
 msgid "use format %s for character objects"
 msgstr "use formato %s para objetos tipo car�cter"
 
-#: src/main/sprintf.c:408
+#: src/main/sprintf.c:412
 #, fuzzy, c-format
 msgid "likely truncation of character string to %d characters"
 msgstr "Probable truncamento de string de caracteres"
 
-#: src/main/sprintf.c:417
+#: src/main/sprintf.c:421
 msgid "unsupported type"
 msgstr "tipo no soportado"
 
@@ -5952,410 +6029,415 @@ msgstr "tipo no soportado"
 msgid "R_LibraryFileName: buffer too small"
 msgstr "R_LibraryFileName: buffer muy peque�o"
 
-#: src/main/subassign.c:117
+#: src/main/subassign.c:118
 msgid "attempt to enlarge non-vector"
 msgstr "intento de alargar un objeto diferente a un vector"
 
-#: src/main/subassign.c:122
+#: src/main/subassign.c:123
 #, c-format
 msgid "assignment outside vector/list limits (extending from %d to %d)"
 msgstr ""
 "asignaci�n fuera de los l�mites del vector/lista (extendiendo de %d a %d)"
 
-#: src/main/subassign.c:367
+#: src/main/subassign.c:391
 #, c-format
 msgid "incompatible types (from %s to %s) in subassignment type fix"
 msgstr "tipos incompatibles (de %s a %s) en fijaci�n de tipo sub-asignaci�n"
 
-#: src/main/subassign.c:502 src/main/subassign.c:782 src/main/subassign.c:785
-#: src/main/subassign.c:1076
+#: src/main/subassign.c:550 src/main/subassign.c:830 src/main/subassign.c:833
+#: src/main/subassign.c:1133
 msgid "NAs are not allowed in subscripted assignments"
 msgstr "NAs no son permitidos en asignaciones subscritas"
 
-#: src/main/subassign.c:520 src/main/subassign.c:796 src/main/subassign.c:1068
-#: src/main/subassign.c:1641
+#: src/main/subassign.c:568 src/main/subassign.c:844 src/main/subassign.c:1125
+#: src/main/subassign.c:1705
 #, fuzzy
 msgid "replacement has length zero"
 msgstr "argumento tiene longitud cero"
 
-#: src/main/subassign.c:522 src/main/subassign.c:798 src/main/subassign.c:1070
+#: src/main/subassign.c:570 src/main/subassign.c:846 src/main/subassign.c:1127
 msgid "number of items to replace is not a multiple of replacement length"
 msgstr ""
 "n�mero de items para para sustituir no es un m�ltiplo de la longitud del "
 "reemplazo"
 
-#: src/main/subassign.c:766
+#: src/main/subassign.c:814
 msgid "incorrect number of subscripts on matrix"
 msgstr "n�mero de subscritos incorretos en matriz"
 
-#: src/main/subassign.c:1022
+#: src/main/subassign.c:1079
 #, c-format
 msgid "incompatible types (from %s to %s) in matrix subset assignment"
 msgstr ""
 "tipos incompatibles (de %s a %s) en asignaciones de subconjunto de la matriz"
 
-#: src/main/subassign.c:1038 src/main/subset.c:928
+#: src/main/subassign.c:1095 src/main/subset.c:957
 msgid "incorrect number of subscripts"
 msgstr "n�mero incorrecto de sub�ndices"
 
-#: src/main/subassign.c:1214
+#: src/main/subassign.c:1272
 #, c-format
 msgid "incompatible types (from %s to %s) in array subset assignment"
 msgstr ""
 "tipos incompatibles (de %s a %s) en asignaciones de subconjunto de arreglos "
 "(arrays)"
 
-#: src/main/subassign.c:1249 src/main/subassign.c:1270
+#: src/main/subassign.c:1308 src/main/subassign.c:1329
 #, fuzzy
 msgid "invalid subscript in list assign"
 msgstr "n�mero de subscritos inv�lidos en asignaci�n de lista"
 
-#: src/main/subassign.c:1263
+#: src/main/subassign.c:1322
 msgid "invalid number of subscripts to list assign"
 msgstr "n�mero de subscritos inv�lidos en asignaci�n de lista"
 
-#: src/main/subassign.c:1361
+#: src/main/subassign.c:1421
 msgid "SubAssignArgs: invalid number of arguments"
 msgstr "SubAssignArgs: n�mero de argumentos inv�lidos"
 
-#: src/main/subassign.c:1506
+#: src/main/subassign.c:1566
 msgid "result is zero-length and so cannot be a language object"
 msgstr ""
 "resultado longitud-cero y de este modo no pude ser un objecto de este "
 "lenguanje"
 
-#: src/main/subassign.c:1611
+#: src/main/subassign.c:1665
 msgid ""
 "[[<- defined for objects of type \"S4\" only for subclasses of environment"
 msgstr ""
 "[[<- definido para objectos de tipo \"S4\" solo para subclases de entorno"
 
-#: src/main/subassign.c:1617
+#: src/main/subassign.c:1677
 msgid "wrong args for environment subassignment"
 msgstr "argumentos inv�lidos para sub-asignaci�n de entorno"
 
-#: src/main/subassign.c:1643
+#: src/main/subassign.c:1707
 msgid "more elements supplied than there are to replace"
 msgstr "se dan m�s elementos que los que pueden ser sustitu�dos"
 
-#: src/main/subassign.c:1645
+#: src/main/subassign.c:1709
 msgid "[[ ]] with missing subscript"
 msgstr "[[ ]] con subscrito ausente"
 
-#: src/main/subassign.c:1657 src/main/subassign.c:1675
+#: src/main/subassign.c:1727 src/main/subassign.c:1745
 msgid "[[ ]] subscript out of bounds"
 msgstr "subscrito [[ ]] fuera de l�mites"
 
-#: src/main/subassign.c:1663 src/main/subassign.c:1841
+#: src/main/subassign.c:1733 src/main/subassign.c:1914
 msgid "[[ ]] improper number of subscripts"
 msgstr "n�mero inadecuado de subscritos en [[ ]]"
 
-#: src/main/subassign.c:1808
+#: src/main/subassign.c:1879
 #, c-format
 msgid "incompatible types (from %s to %s) in [[ assignment"
 msgstr "tipos incompatibles (de %s a %s) en asignaci�n [["
 
-#: src/main/subassign.c:1852
+#: src/main/subassign.c:1925
 #, c-format
 msgid "[[ ]] subscript (%d) out of bounds"
 msgstr "subscrito (%d) en [[ ]] fuera de �imites"
 
-#: src/main/subassign.c:1905 src/main/subscript.c:143 src/main/subscript.c:145
-#: src/main/subscript.c:274 src/main/subscript.c:276 src/main/subscript.c:826
-#: src/main/subscript.c:828 src/main/subscript.c:919 src/main/subscript.c:921
-#: src/main/subset.c:1109
+#: src/main/subassign.c:1986 src/main/subscript.c:151 src/main/subscript.c:278
+#: src/main/subscript.c:903 src/main/subscript.c:996 src/main/subset.c:1176
 #, fuzzy, c-format
 msgid "invalid subscript type '%s'"
 msgstr "tipo de subscrito inv�lido"
 
-#: src/main/subassign.c:1950
+#: src/main/subassign.c:2037
 msgid "no method for assigning subsets of this S4 class"
 msgstr "ning�n m�todo para la asignaci�n de subconjuntos de esta clase S4"
 
-#: src/main/subassign.c:2008
+#: src/main/subassign.c:2095
 msgid "Coercing LHS to a list"
 msgstr "Realizando coercion de LHD a una lista"
 
-#: src/main/subscript.c:53 src/main/subscript.c:75 src/main/subscript.c:180
-#: src/main/subscript.c:204
-msgid "attempt to select less than one element"
+#: src/main/subscript.c:59 src/main/subscript.c:81 src/main/subscript.c:185
+#: src/main/subscript.c:209
+#, fuzzy, c-format
+msgid "attempt to select less than one element in %s"
 msgstr "intento de selecionar menos de un elemento"
 
-#: src/main/subscript.c:57 src/main/subscript.c:72 src/main/subscript.c:178
-#: src/main/subscript.c:208 src/main/subscript.c:304
-msgid "attempt to select more than one element"
+#: src/main/subscript.c:63 src/main/subscript.c:78 src/main/subscript.c:183
+#: src/main/subscript.c:213 src/main/subscript.c:305
+#, fuzzy, c-format
+msgid "attempt to select more than one element in %s"
 msgstr "intento de selecionar m�s de un elemento"
 
-#: src/main/subscript.c:184
+#: src/main/subscript.c:189
 msgid "internal error in use of recursive indexing"
 msgstr "error interno en uso de indexaci�n recursiva"
 
-#: src/main/subscript.c:252
+#: src/main/subscript.c:257
 #, c-format
 msgid "further partial match of '%s' to '%s'"
 msgstr "mas encuentros parciales de  '%s' to '%s'"
 
-#: src/main/subscript.c:302
+#: src/main/subscript.c:303
 #, c-format
 msgid "recursive indexing failed at level %d\n"
 msgstr "fall� indexaci�n recursiva en nivel %d\n"
 
-#: src/main/subscript.c:309
+#: src/main/subscript.c:313
 #, c-format
 msgid "no such index at level %d\n"
 msgstr "indice inexistente en el nivel %d\n"
 
-#: src/main/subscript.c:352
+#: src/main/subscript.c:360
 msgid "incorrect number of columns in matrix subscript"
 msgstr "n�mero incorreto de columnas en subscrito de matriz"
 
-#: src/main/subscript.c:371 src/main/subscript.c:389 src/main/subscript.c:413
+#: src/main/subscript.c:379 src/main/subscript.c:397 src/main/subscript.c:421
 msgid "negative values are not allowed in a matrix subscript"
 msgstr "no se permiten valores negativos en subscrito de matriz"
 
-#: src/main/subscript.c:492
+#: src/main/subscript.c:500
 msgid "(subscript) logical subscript too long"
 msgstr "(subscript) subscrito l�gico muy largo"
 
-#: src/main/subscript.c:590 src/main/subscript.c:645
+#: src/main/subscript.c:668 src/main/subscript.c:723
 msgid "only 0's may be mixed with negative subscripts"
 msgstr "solamente 0's pueden ser mezclados con subscritos negativos"
 
-#: src/main/subscript.c:618
+#: src/main/subscript.c:696
 msgid "subscript too large for 32-bit R"
 msgstr ""
 
-#: src/main/subscript.c:817
+#: src/main/subscript.c:895
 msgid "no 'dimnames' attribute for array"
 msgstr "arreglo (array) sin atributo 'dimnames'"
 
-#: src/main/subscript.c:857
+#: src/main/subscript.c:931
 msgid "subscripting on non-vector"
 msgstr "intento de usar un subscrito en un objeto distinto a un vector"
 
-#: src/main/subset.c:261
+#: src/main/subset.c:260
 msgid "dimensions would exceed maximum size of array"
 msgstr "dimensiones deben execeder el maximo tama�o de un arreglo"
 
-#: src/main/subset.c:304 src/main/subset.c:333
+#: src/main/subset.c:304 src/main/subset.c:334
 msgid "matrix subscripting not handled for this type"
 msgstr "uso de subscritos en matrices no soportadas para este tipo"
 
-#: src/main/subset.c:488
+#: src/main/subset.c:493
 msgid "array subscripting not handled for this type"
 msgstr "uso de subscritos en arreglos (arrays) no disponibles para este tipo"
 
-#: src/main/subset.c:827
+#: src/main/subset.c:856
 msgid "incorrect number of dimensions"
 msgstr "n�mero incorreto de dimensiones"
 
-#: src/main/subset.c:924
+#: src/main/subset.c:953
 msgid "no index specified"
 msgstr "ning�n �ndice especificado"
 
-#: src/main/subset.c:934
+#: src/main/subset.c:963
 #, fuzzy
 msgid "this S4 class is not subsettable"
 msgstr "no es posible dividir el objeto en subconjuntos"
 
-#: src/main/subset.c:940
+#: src/main/subset.c:970
 msgid "wrong arguments for subsetting an environment"
 msgstr "argumentos incorrectos para obtenci�n de subconjuntos de un ambiente"
 
-#: src/main/summary.c:30
+#: src/main/summary.c:33
 #, c-format
 msgid "invalid 'type' (%s) of argument"
 msgstr "'type' (%s) de argumento no v�lido"
 
-#: src/main/summary.c:66 src/main/summary.c:78 src/main/summary.c:103
+#: src/main/summary.c:69 src/main/summary.c:81 src/main/summary.c:106
 #, fuzzy
 msgid "integer overflow - use sum(as.numeric(.))"
 msgstr "Exceso de capacidad (overflow) en sum(.); use sum(as.numeric(.))"
 
-#: src/main/summary.c:522
+#: src/main/summary.c:526
 #, c-format
 msgid "internal error ('op = %d' in do_summary).\t Call a Guru"
 msgstr "error interno ('op = %d' en do_summary).\t Llame a un Guru"
 
-#: src/main/summary.c:623
+#: src/main/summary.c:637
 #, fuzzy
 msgid "Integer overflow - use sum(as.numeric(.))"
 msgstr "Exceso de capacidad (overflow) en sum(.); use sum(as.numeric(.))"
 
-#: src/main/summary.c:731
+#: src/main/summary.c:750
 #, fuzzy
 msgid "no non-missing arguments, returning NA"
 msgstr "ning�n argumento finito para min; retornando Inf"
 
-#: src/main/summary.c:734
+#: src/main/summary.c:753
 msgid "no non-missing arguments to min; returning Inf"
 msgstr "ning�n argumento finito para min; retornando Inf"
 
-#: src/main/summary.c:736
+#: src/main/summary.c:755
 msgid "no non-missing arguments to max; returning -Inf"
 msgstr "ningun argumento finito para max; retornando -Inf"
 
-#: src/main/summary.c:801
-msgid "non-numeric argument"
-msgstr "argumento no num�rico"
-
-#: src/main/summary.c:845
+#: src/main/summary.c:913
 #, fuzzy
 msgid "argument to 'which' is not logical"
 msgstr "argumento 'logarithm' debe ser l�gico"
 
-#: src/main/summary.c:889
+#: src/main/summary.c:957
 #, fuzzy
 msgid "no arguments"
 msgstr "muy pocos argumentos"
 
-#: src/main/summary.c:900 src/main/summary.c:917
+#: src/main/summary.c:968 src/main/summary.c:985
 #, fuzzy
 msgid "invalid input type"
 msgstr "de tipo l�nea inv�lido"
 
-#: src/main/summary.c:934
+#: src/main/summary.c:1002
 #, fuzzy
 msgid "an argument will be fractionally recycled"
 msgstr "argumento '%s  ser� ignorado"
 
-#: src/main/sysutils.c:69 src/main/sysutils.c:83
+#: src/main/sysutils.c:68 src/main/sysutils.c:82
 #, c-format
 msgid "cannot determine file modification time of '%s'"
 msgstr ""
 "no es posible determinar el tiempo de modificaci�n del archivo de  '%s'"
 
-#: src/main/sysutils.c:167
+#: src/main/sysutils.c:166
 msgid "encoding of a filename cannot be 'bytes'"
 msgstr "codificaci�n de un nombre de archivo no puede ser 'bytes'"
 
-#: src/main/sysutils.c:170 src/main/sysutils.c:803 src/main/sysutils.c:818
-#: src/main/sysutils.c:909 src/main/sysutils.c:924 src/main/sysutils.c:1020
+#: src/main/sysutils.c:169 src/main/sysutils.c:831 src/main/sysutils.c:846
+#: src/main/sysutils.c:975
 #, fuzzy, c-format
 msgid "unsupported conversion from '%s' in codepage %d"
 msgstr "conversi�n no soportada de '%s' a '%s"
 
-#: src/main/sysutils.c:179
+#: src/main/sysutils.c:178
 #, fuzzy
 msgid "file name conversion problem -- name too long?"
 msgstr "nombre de archivo muy largo"
 
-#: src/main/sysutils.c:180
+#: src/main/sysutils.c:179
 #, fuzzy
 msgid "file name conversion problem"
 msgstr "nombre de archivo muy largo"
 
-#: src/main/sysutils.c:249
+#: src/main/sysutils.c:248
 msgid "invalid filename pattern"
 msgstr "patr�n de nombre de archivo inv�lido"
 
-#: src/main/sysutils.c:253
+#: src/main/sysutils.c:252
 #, fuzzy
 msgid "invalid file extension"
 msgstr "Expresi�n regular inv�lida"
 
-#: src/main/sysutils.c:255
+#: src/main/sysutils.c:254
 msgid "no 'pattern'"
 msgstr "'pattern' no especificado"
 
-#: src/main/sysutils.c:257
+#: src/main/sysutils.c:256
 msgid "no 'tempdir'"
 msgstr "'tempdir' no especificado"
 
-#: src/main/sysutils.c:259
+#: src/main/sysutils.c:258
 msgid "no 'fileext'"
 msgstr "no hay 'fileext'"
 
-#: src/main/sysutils.c:345 src/main/sysutils.c:348 src/main/sysutils.c:439
-#: src/main/sysutils.c:441 src/main/sysutils.c:477
+#: src/main/sysutils.c:328
+#, fuzzy, c-format
+msgid "system call failed: %s"
+msgstr "falla de b�squeda en %s"
+
+#: src/main/sysutils.c:357 src/main/sysutils.c:360 src/main/sysutils.c:451
+#: src/main/sysutils.c:453 src/main/sysutils.c:489
 msgid "wrong type for argument"
 msgstr "argumento de tipo inv�lido"
 
-#: src/main/sysutils.c:443
+#: src/main/sysutils.c:455
 #, fuzzy
 msgid "wrong length for argument"
 msgstr "longitud incorrecta para el argumento 'mode'"
 
-#: src/main/sysutils.c:464
+#: src/main/sysutils.c:476
 #, fuzzy
 msgid "'Sys.setenv' is not available on this system"
 msgstr "'putenv' no est� disponible en este sistema"
 
-#: src/main/sysutils.c:508
+#: src/main/sysutils.c:520
 msgid "this system cannot unset environment variables: setting to \"\""
 msgstr ""
 "este sistema no puede desvincular variables generales que han sido puestas a "
 "\"\""
 
-#: src/main/sysutils.c:519
+#: src/main/sysutils.c:531
 #, fuzzy
 msgid "'Sys.unsetenv' is not available on this system"
 msgstr "'putenv' no est� disponible en este sistema"
 
-#: src/main/sysutils.c:616
+#: src/main/sysutils.c:628
 #, fuzzy, c-format
 msgid "unsupported conversion from '%s' to '%s' in codepage %d"
 msgstr "conversi�n no soportada de '%s' a '%s"
 
-#: src/main/sysutils.c:631
+#: src/main/sysutils.c:643
 msgid "'x' must be a character vector"
 msgstr "'x' debe ser un vector de caracteres"
 
-#: src/main/sysutils.c:646
+#: src/main/sysutils.c:658
 #, fuzzy
-msgid "'x' must be a list of NULL or raw vectors"
+msgid "'x' must be a character vector or a list of NULL or raw vectors"
 msgstr "'x' debe ser un vector de caracteres"
 
-#: src/main/sysutils.c:724 src/main/sysutils.c:789 src/main/sysutils.c:895
-#: src/main/sysutils.c:994 src/main/sysutils.c:1010 src/main/sysutils.c:1087
+#: src/main/sysutils.c:736 src/main/sysutils.c:914 src/main/sysutils.c:932
+#: src/main/sysutils.c:949 src/main/sysutils.c:965 src/main/sysutils.c:1042
 #, fuzzy, c-format
 msgid "'%s' must be called on a CHARSXP"
 msgstr "csduplicated no llamada dentro de una STRSXP"
 
-#: src/main/sysutils.c:792 src/main/sysutils.c:898 src/main/sysutils.c:1015
-#: src/main/sysutils.c:1090
+#: src/main/sysutils.c:805 src/main/sysutils.c:970 src/main/sysutils.c:1045
 msgid "translating strings with \"bytes\" encoding is not allowed"
 msgstr "no se permite traducci�n de cadenas con \"bytes\" de codificaci�n"
 
-#: src/main/sysutils.c:1116
+#: src/main/sysutils.c:818
+#, fuzzy
+msgid "internal error: no translation needed"
+msgstr "error interno en el c�digo unz"
+
+#: src/main/sysutils.c:1071
 #, fuzzy, c-format
 msgid "unsupported conversion to '%s' from codepage %d"
 msgstr "conversi�n no soportada de '%s' a '%s"
 
-#: src/main/sysutils.c:1530
+#: src/main/sysutils.c:1486
 #, fuzzy, c-format
 msgid "invalid Unicode point %u"
 msgstr "uni�n de l�nea inv�lida"
 
-#: src/main/sysutils.c:1632
+#: src/main/sysutils.c:1588
 #, fuzzy
 msgid "cannot create 'R_TempDir'"
 msgstr "no puede asignarse R_TempDir"
 
-#: src/main/sysutils.c:1636 src/main/sysutils.c:1644 src/main/sysutils.c:1647
+#: src/main/sysutils.c:1592 src/main/sysutils.c:1600 src/main/sysutils.c:1603
 msgid "unable to set R_SESSION_TMPDIR"
 msgstr "imposible fijar R_SESSION_TMPDIR"
 
-#: src/main/sysutils.c:1656
+#: src/main/sysutils.c:1612
 #, fuzzy
 msgid "cannot allocate 'R_TempDir'"
 msgstr "no puede asignarse R_TempDir"
 
-#: src/main/sysutils.c:1693
+#: src/main/sysutils.c:1649
 #, fuzzy
 msgid "temporary name too long"
 msgstr "nombre de archivo muy largo"
 
-#: src/main/sysutils.c:1708
+#: src/main/sysutils.c:1664
 msgid "cannot find unused tempfile name"
 msgstr "no se puede encontrar un nombre temporario de archivo no utilizado"
 
-#: src/main/sysutils.c:1711
+#: src/main/sysutils.c:1667
 #, fuzzy
 msgid "allocation failed in R_tmpnam2"
 msgstr "fallo de asignaci�n en GVText"
 
-#: src/main/sysutils.c:1838
+#: src/main/sysutils.c:1794
 msgid "'dirmark = TRUE' is not supported on this platform"
 msgstr "esta plataforma no soporta 'dirmark = TRUE'"
 
@@ -6365,205 +6447,211 @@ msgid "length %d is too large for hashing"
 msgstr "longitud %d es muy grande para uso de hash"
 
 #: src/main/unique.c:490 src/main/unique.c:519 src/main/unique.c:549
-#: src/main/unique.c:575 src/main/unique.c:614
+#: src/main/unique.c:573 src/main/unique.c:612
 msgid "'duplicated' applies only to vectors"
 msgstr "'duplicated' puede ser aplicada solamente a vectores"
 
-#: src/main/unique.c:619
+#: src/main/unique.c:617
 msgid "any_duplicated3(., <0-length incomp>)"
 msgstr "cualquier_duplicado3(., <longitud-0 incomp>)"
 
-#: src/main/unique.c:669
+#: src/main/unique.c:667
 #, fuzzy
 msgid "'fromLast' must be length 1"
 msgstr "'%s' debe tener longitud 1"
 
-#: src/main/unique.c:672
+#: src/main/unique.c:670
 #, fuzzy
 msgid "'fromLast' must be TRUE or FALSE"
 msgstr "'decreciente' debe ser TRUE o FALSE"
 
-#: src/main/unique.c:683
+#: src/main/unique.c:681
 #, c-format
 msgid "%s() applies only to vectors"
 msgstr "%s() puede ser aplicada solamente a vectores"
 
-#: src/main/unique.c:690
+#: src/main/unique.c:688
 #, fuzzy
 msgid "'nmax' must be positive"
 msgstr "argumento debe tener longitud positiva"
 
-#: src/main/unique.c:922
+#: src/main/unique.c:985
 msgid "'match' requires vector arguments"
 msgstr "'match' requiere argumentos vectoriales"
 
-#: src/main/unique.c:970 src/main/unique.c:1125
+#: src/main/unique.c:1033 src/main/unique.c:1171
 msgid "argument is not of mode character"
 msgstr "argumento no es de modo car�cter"
 
-#: src/main/unique.c:1251
+#: src/main/unique.c:1296
 #, fuzzy
 msgid "... used in a situation where it does not exist"
 msgstr "... usado en una situacion donde no existe"
 
-#: src/main/unique.c:1342
-msgid "unable to find a closure from within which 'match.call' was called"
-msgstr ""
-"no es posible encontrar una clausura desde la cual  'match.call' fue llamando"
+#: src/main/unique.c:1302
+#, fuzzy
+msgid "... is not a pairlist"
+msgstr "no se espera el valor en '...'"
 
-#: src/main/unique.c:1536
+#: src/main/unique.c:1531
 msgid "non-numeric data frame in rowsum"
 msgstr "data frame no num�rico en rowsum"
 
-#: src/main/unique.c:1568
+#: src/main/unique.c:1563
 msgid "this cannot happen"
 msgstr "esto no puede ocurrir"
 
-#: src/main/unique.c:1639
+#: src/main/unique.c:1634
 msgid "'names' must be a character vector"
 msgstr "'names' debe ser un vector de caracteres"
 
-#: src/main/unique.c:1643
-msgid "'sep' must be a character string"
-msgstr "'sep' debe ser una cadena (string) de caracteres"
-
-#: src/main/util.c:88 src/main/util.c:106
+#: src/main/util.c:87 src/main/util.c:105
 msgid "object is not a matrix"
 msgstr "objeto no es una matriz"
 
-#: src/main/util.c:254 src/main/util.c:268 src/main/util.c:285
+#: src/main/util.c:303 src/main/util.c:315 src/main/util.c:326
+#: src/main/util.c:341
 #, fuzzy, c-format
 msgid "type %d is unimplemented in '%s'"
 msgstr "tipo %d no esta implementado en type2str"
 
-#: src/main/util.c:297
+#: src/main/util.c:352
 #, c-format
 msgid "unimplemented type '%s' in '%s'\n"
 msgstr "tipo no implementado '%s' en '%s'\n"
 
-#: src/main/util.c:299
+#: src/main/util.c:354
 #, c-format
 msgid "unimplemented type (%d) in '%s'\n"
 msgstr "tipo no implementado (%d) en '%s'\n"
 
-#: src/main/util.c:424
+#: src/main/util.c:479
 msgid "invalid tag in name extraction"
 msgstr "etiqueta invalida durante la extracci�n de nombre"
 
-#: src/main/util.c:434
+#: src/main/util.c:489
 #, fuzzy, c-format
 msgid "%d argument passed to .Internal(%s) which requires %d"
 msgid_plural "%d arguments passed to .Internal(%s) which requires %d"
 msgstr[0] "%d argumentos dados a 'atan', que requieren 1"
 msgstr[1] "%d argumentos dados a 'atan', que requieren 1"
 
-#: src/main/util.c:440
+#: src/main/util.c:495
 #, fuzzy, c-format
 msgid "%d argument passed to '%s' which requires %d"
 msgid_plural "%d arguments passed to '%s' which requires %d"
 msgstr[0] "%d argumentos dados a '%s', que requeiren 1 o 2"
 msgstr[1] "%d argumentos dados a '%s', que requeiren 1 o 2"
 
-#: src/main/util.c:455
+#: src/main/util.c:510
 #, c-format
 msgid "supplied argument name '%s' does not match '%s'"
 msgstr "nombre de argumento suministrado '%s' no coincide '%s'"
 
-#: src/main/util.c:465
+#: src/main/util.c:520
 #, fuzzy, c-format
 msgid "'nthcdr' list shorter than %d"
 msgstr "lista \"nthcdr\" es menor que %d"
 
-#: src/main/util.c:470
+#: src/main/util.c:525
 #, fuzzy
 msgid "'nthcdr' needs a list to CDR down"
 msgstr "\"nthcdr\" requiere una lista para bajar CDR"
 
-#: src/main/util.c:586
+#: src/main/util.c:641
 msgid "'all.x' must be TRUE or FALSE"
 msgstr "'all.x' debe ser TRUE o FALSE"
 
-#: src/main/util.c:588
+#: src/main/util.c:643
 msgid "'all.y' must be TRUE or FALSE"
 msgstr "'all.y' debe ser TRUE o FALSE"
 
-#: src/main/util.c:700
+#: src/main/util.c:672
+msgid "number of rows in the result exceeds maximum vector length"
+msgstr ""
+
+#: src/main/util.c:764
 #, fuzzy
 msgid "missing value is invalid"
 msgstr "valor faltante para el par�metro"
 
-#: src/main/util.c:709 src/main/util.c:716
+#: src/main/util.c:773 src/main/util.c:780
 msgid "cannot change working directory"
 msgstr "no es posible cambiar el directorio de trabajo"
 
-#: src/main/util.c:735 src/main/util.c:769 src/main/util.c:810
-#: src/main/util.c:852 src/main/util.c:981 src/main/util.c:1040
-#: src/main/util.c:1063
+#: src/main/util.c:800 src/main/util.c:834 src/main/util.c:875
+#: src/main/util.c:917 src/main/util.c:1046 src/main/util.c:1105
+#: src/main/util.c:1128
 msgid "a character vector argument expected"
 msgstr "se espera un vector de caracteres como argumento"
 
-#: src/main/util.c:742 src/main/util.c:777 src/main/util.c:819
-#: src/main/util.c:860
+#: src/main/util.c:807 src/main/util.c:842 src/main/util.c:884
+#: src/main/util.c:925
 msgid "path too long"
 msgstr "camino (path) muy largo"
 
-#: src/main/util.c:995
+#: src/main/util.c:1060
 msgid "only the first character of 'quote' will be used"
 msgstr "solo el primer car�cter de 'quote' ser� utilizado"
 
-#: src/main/util.c:1065
+#: src/main/util.c:1130
 #, fuzzy
 msgid "a character vector 'value' expected"
 msgstr "se espera un vector de caracteres como argumento"
 
-#: src/main/util.c:1068
+#: src/main/util.c:1133
 #, fuzzy
 msgid "'value' must be of positive length"
 msgstr "argumento debe tener longitud positiva"
 
-#: src/main/util.c:1197 src/main/util.c:1205
+#: src/main/util.c:1262 src/main/util.c:1270
 #, fuzzy, c-format
 msgid "invalid input '%s' in 'utf8towcs'"
 msgstr "entrada no v�lida en Rmbstowcs"
 
-#: src/main/util.c:1290
+#: src/main/util.c:1355
 #, fuzzy, c-format
 msgid "invalid multibyte string at '%s'"
 msgstr "string multibyte %d inv�lida"
 
-#: src/main/util.c:1399
+#: src/main/util.c:1497
 msgid "error message truncated to 255 chars"
 msgstr "mensage de error truncado en 255 caracteres"
 
-#: src/main/util.c:1412
+#: src/main/util.c:1510
 msgid "warning message truncated to 255 chars"
 msgstr "mensage de atenci�n truncado en 255 caracteres"
 
-#: src/main/util.c:1819
+#: src/main/util.c:1659
+#, c-format
+msgid "accuracy loss in conversion from \"%s\" to numeric"
+msgstr ""
+
+#: src/main/util.c:1969
 #, fuzzy
 msgid "all arguments must be named"
 msgstr "los atributos deben tener nombre"
 
-#: src/main/util.c:1893
+#: src/main/util.c:2091
 #, fuzzy
 msgid "ICU is not supported on this build"
 msgstr "esta plataforma no soporta nsl()"
 
-#: src/main/util.c:1954
+#: src/main/util.c:2158
 #, fuzzy
 msgid "'breaks' is not sorted"
 msgstr "el modo '%s' no es soportado en call_R"
 
-#: src/main/util.c:1988 src/main/util.c:2034
+#: src/main/util.c:2192 src/main/util.c:2242
 #, fuzzy, c-format
 msgid "long vector '%s' is not supported"
 msgstr "el modo '%s' no es soportado en call_R"
 
-#: src/main/util.c:2087
+#: src/main/util.c:2296
 msgid "'eps.correct' must be 0, 1, or 2"
 msgstr ""
 
-#: src/main/util.c:2115
+#: src/main/util.c:2324
 #, fuzzy
 msgid "'x' must be a vector"
 msgstr "'x' debe ser un vector de caracteres"
@@ -6605,14 +6693,6 @@ msgstr ""
 "Escriba 'q()' para salir de R.\n"
 "\n"
 
-#: src/main/vfonts.c:50
-msgid "vfont routines cannot be accessed in module"
-msgstr "no hay acceso a las rutinas vfont en el m�dulo"
-
-#: src/main/vfonts.c:67 src/main/vfonts.c:80 src/main/vfonts.c:98
-msgid "Hershey fonts cannot be loaded"
-msgstr "las fuentes Hershey no pueden ser cargadas"
-
 #: src/main/xspline.c:60
 #, c-format
 msgid "add_point - reached MAXNUMPTS (%d)"
@@ -6637,7 +6717,7 @@ msgstr "Deben existir al menos cuatro puntos control"
 msgid "There must be at least three control points"
 msgstr "debe haber un primer argumento"
 
-#: src/modules/X11/dataentry.c:1871 src/modules/X11/devX11.c:1246
+#: src/modules/X11/dataentry.c:1874 src/modules/X11/devX11.c:1248
 #, c-format
 msgid "X11 protocol error: %s"
 msgstr "Error de protocolo X11: %s"
@@ -6663,7 +6743,7 @@ msgstr ""
 "Error: X11 no puede asignar colores gr�ficos adicionales.\n"
 "Considere usar X11 con colortype=\"pseudo.cube\" o \"gray\""
 
-#: src/modules/X11/devX11.c:1027
+#: src/modules/X11/devX11.c:1029
 msgid ""
 "could not find any X11 fonts\n"
 "Check that the Font Path is correct."
@@ -6671,17 +6751,17 @@ msgstr ""
 "no fue posible encontrar ninguna fuente X11\n"
 "Verifique que el directorio de fuentes es correcto."
 
-#: src/modules/X11/devX11.c:1087
+#: src/modules/X11/devX11.c:1089
 #, c-format
 msgid "X11 used font size %d when %d was requested"
 msgstr "X11 usa fuentes de tama�o %d cuando %d fue pedido"
 
-#: src/modules/X11/devX11.c:1121
+#: src/modules/X11/devX11.c:1123
 #, fuzzy, c-format
 msgid "X11 font %s, face %d at size %d could not be loaded"
 msgstr "fuente X11 de tama�o %d no puede ser cargada"
 
-#: src/modules/X11/devX11.c:1130
+#: src/modules/X11/devX11.c:1132
 msgid ""
 "semi-transparency is not supported on this device: reported only once per "
 "page"
@@ -6689,12 +6769,12 @@ msgstr ""
 "semi-transparencia no esta soportado en este dispositivo: reportado solo una "
 "vez por pagina"
 
-#: src/modules/X11/devX11.c:1254
+#: src/modules/X11/devX11.c:1256
 #, c-format
 msgid "X11 I/O error while opening X11 connection to '%s'"
 msgstr "X11 I/O error al abrir la conexi�n X11 a \"%s\""
 
-#: src/modules/X11/devX11.c:1272
+#: src/modules/X11/devX11.c:1273
 msgid "X11 fatal IO error: please save work and shut down R"
 msgstr "Error fatal de E/S: por favor guarde su trabajo y cancele R"
 
@@ -6824,209 +6904,274 @@ msgstr "imposible crear mapa de pixeles"
 msgid "attempt to use the locator after dev.hold()"
 msgstr "intento de usar el localizador dev.hold()"
 
-#: src/modules/X11/devX11.c:3111
+#: src/modules/X11/devX11.c:3117
 #, c-format
 msgid "unable to start device %s"
 msgstr "no fue posible iniciar el dispositivo %s"
 
-#: src/modules/X11/devX11.c:3138
+#: src/modules/X11/devX11.c:3144
 msgid "invalid 'width' or 'height'"
 msgstr "'width' o 'height' no v�lidos"
 
-#: src/modules/X11/devX11.c:3145
+#: src/modules/X11/devX11.c:3151
 msgid "invalid colortype passed to X11 driver"
 msgstr "tipo de color no v�lido pasado al driver X11"
 
-#: src/modules/X11/devX11.c:3159
+#: src/modules/X11/devX11.c:3165
 msgid "unknown X11 color/colour model -- using monochrome"
 msgstr "modo de color X11 desconocido -- usando modo monocrom�tico"
 
-#: src/modules/X11/devX11.c:3249
+#: src/modules/X11/devX11.c:3255
 #, fuzzy
 msgid "no plot on device to save"
 msgstr "no hay historia disponible para guardar"
 
-#: src/modules/X11/devX11.c:3251
+#: src/modules/X11/devX11.c:3257
 #, fuzzy
 msgid "not an open X11cairo device"
 msgstr "demasiados dispositivos abiertos"
 
-#: src/modules/X11/devX11.c:3260
+#: src/modules/X11/devX11.c:3266
 #, c-format
 msgid "cannot open file '%s'"
 msgstr "no fue posible abrir el archivo '%s'"
 
-#: src/modules/X11/devX11.c:3277
+#: src/modules/X11/devX11.c:3283
 #, fuzzy
 msgid "savePlot() is not supported on this build"
 msgstr "esta plataforma no soporta nsl()"
 
-#: src/modules/X11/devX11.c:3317
+#: src/modules/X11/devX11.c:3323
 msgid "unable to contact X11 display"
 msgstr "no fue posible abrir conexi�n con el dispositivo X11"
 
-#: src/modules/X11/devX11.c:3366
+#: src/modules/X11/devX11.c:3372
 #, fuzzy, c-format
 msgid "clipboard cannot be read (error code %d)"
 msgstr "no fue posible abrir el portapapeles o no contiene texto"
 
-#: src/modules/X11/devX11.c:3397
+#: src/modules/X11/devX11.c:3408
 msgid "cannot allocate memory for X11Routines structure"
 msgstr "no fue posible asignar memoria para estrutura de tipo X11Routines"
 
-#: src/modules/internet/internet.c:188 src/modules/internet/internet.c:192
-#: src/modules/internet/internet.c:198 src/modules/internet/internet.c:210
+#: src/modules/internet/internet.c:113
+msgid "for https:// URLs use method = \"wininet\""
+msgstr ""
+
+#: src/modules/internet/internet.c:153 src/modules/internet/internet.c:274
+#: src/modules/internet/internet.c:758
+#, fuzzy, c-format
+msgid "scheme not supported in URL '%s'"
+msgstr "reinicios no sustentados en 'eval'"
+
+#: src/modules/internet/internet.c:348 src/modules/internet/internet.c:352
+#: src/modules/internet/internet.c:357 src/modules/internet/internet.c:381
+#: src/modules/internet/libcurl.c:791 src/modules/internet/libcurl.c:795
+#: src/modules/internet/libcurl.c:801 src/modules/internet/libcurl.c:814
+#: src/modules/internet/libcurl.c:822
 msgid "allocation of url connection failed"
 msgstr "fallo de asignaci�n de la conexi�n url"
 
-#: src/modules/internet/internet.c:286
+#: src/modules/internet/internet.c:455
 msgid "only first element of 'url' argument used"
 msgstr "solo se utiliz� el primer elemento del argumento 'url'"
 
-#: src/modules/internet/internet.c:292
+#: src/modules/internet/internet.c:461
 msgid "only first element of 'destfile' argument used"
 msgstr "solo se utiliz� el primer elemento del argumento 'destfile'"
 
-#: src/modules/internet/internet.c:317
+#: src/modules/internet/internet.c:480 src/modules/internet/libcurl.c:499
 msgid "Download progress"
 msgstr "Descarga en progreso"
 
-#: src/modules/internet/internet.c:339
+#: src/modules/internet/internet.c:502
 #, fuzzy, c-format
 msgid "cannot open URL '%s', reason '%s'"
 msgstr "no fue posible abrir el archivo '%s', motivo '%s'"
 
-#: src/modules/internet/internet.c:346 src/modules/internet/internet.c:372
-#: src/modules/internet/internet.c:474
+#: src/modules/internet/internet.c:509 src/modules/internet/internet.c:536
+#: src/modules/internet/internet.c:661
 #, fuzzy, c-format
 msgid "cannot open destfile '%s', reason '%s'"
 msgstr "no fue posible abrir el archivo '%s', motivo '%s'"
 
-#: src/modules/internet/internet.c:377 src/modules/internet/internet.c:479
+#: src/modules/internet/internet.c:541 src/modules/internet/internet.c:666
+#: src/modules/internet/libcurl.c:530
 #, c-format
 msgid "trying URL '%s'\n"
 msgstr "probando la URL '%s'\n"
 
-#: src/modules/internet/internet.c:384 src/modules/internet/internet.c:486
-msgid "opened URL\n"
-msgstr "URL abierta\n"
-
-#: src/modules/internet/internet.c:455 src/modules/internet/internet.c:560
-#, c-format
-msgid "downloaded length %d != reported length %d"
+#: src/modules/internet/internet.c:640 src/modules/internet/internet.c:751
+#: src/modules/internet/libcurl.c:578
+#, fuzzy, c-format
+msgid "downloaded length %0.f != reported length %0.f"
 msgstr "longitud bajada %d != longitud informada %d"
 
-#: src/modules/internet/internet.c:460 src/modules/internet/internet.c:565
+#: src/modules/internet/internet.c:645 src/modules/internet/internet.c:756
 #, c-format
 msgid "cannot open URL '%s'"
 msgstr "no fue posible abrir la URL '%s'"
 
-#: src/modules/internet/internet.c:593 src/modules/internet/internet.c:828
-#, c-format
-msgid "cannot open: HTTP status was '%d %s'"
+#: src/modules/internet/internet.c:779 src/modules/internet/internet.c:944
+#, fuzzy, c-format
+msgid "cannot open URL '%s': HTTP status was '%d %s'"
 msgstr "no fue posible abrir: el status HTTP fue '%d %s'"
 
-#: src/modules/internet/internet.c:772 src/modules/internet/internet.c:935
-msgid "InternetOpenUrl timed out"
-msgstr "Tiempo l�mite agotado en InternetOpenUrl"
-
-#: src/modules/internet/internet.c:799 src/modules/internet/internet.c:813
-#: src/modules/internet/internet.c:957 src/modules/internet/internet.c:966
+#: src/modules/internet/internet.c:915 src/modules/internet/internet.c:929
+#: src/modules/internet/internet.c:1019 src/modules/internet/internet.c:1028
 #, c-format
 msgid "InternetOpenUrl failed: '%s'"
 msgstr "fallo en InternetOpenUrl: '%s'"
 
-#: src/modules/internet/internet.c:870
-msgid "Internet read timed out"
-msgstr "Tiempo l�mite de lectura de Internet agotado"
+#: src/modules/internet/libcurl.c:159
+#, fuzzy, c-format
+msgid "URL '%s': status was '%d %s'"
+msgstr "no fue posible abrir: el status HTTP fue '%d %s'"
+
+#: src/modules/internet/libcurl.c:163
+#, c-format
+msgid "URL '%s': status was '%s'"
+msgstr ""
 
-#: src/modules/internet/nanoftp.c:288 src/modules/internet/nanoftp.c:301
-#: src/modules/internet/nanoftp.c:312 src/modules/internet/nanoftp.c:346
-#: src/modules/internet/nanoftp.c:356
+#: src/modules/internet/libcurl.c:240
+#, fuzzy
+msgid "curlGetHeaders is not supported on this platform"
+msgstr "esta plataforma no soporta nsl()"
+
+#: src/modules/internet/libcurl.c:249 src/modules/internet/libcurl.c:252
+#, fuzzy, c-format
+msgid "invalid %s argument"
+msgstr "argumento '%s' inv�lido"
+
+#: src/modules/internet/libcurl.c:269
+#, c-format
+msgid ""
+"libcurl error code %d\n"
+"\t%s\n"
+msgstr ""
+
+#: src/modules/internet/libcurl.c:404
+#, fuzzy
+msgid "download.file(method = \"libcurl\") is not supported on this platform"
+msgstr "esta plataforma no soporta nsl()"
+
+#: src/modules/internet/libcurl.c:420
+#, fuzzy
+msgid "lengths of 'url' and 'destfile' must match"
+msgstr "la longitud de los nombres de importaci�n y exportaci�n debe coincidir"
+
+#: src/modules/internet/libcurl.c:481
+#, fuzzy, c-format
+msgid "URL %s: cannot open destfile '%s', reason '%s'"
+msgstr "no fue posible abrir el archivo '%s', motivo '%s'"
+
+#: src/modules/internet/libcurl.c:593
+#, fuzzy
+msgid "cannot download all files"
+msgstr "no fue posible abrir el archivo '%s'"
+
+#: src/modules/internet/libcurl.c:727
+#, fuzzy
+msgid "cannot read from connection"
+msgstr "no se puede leer desde esta conexi�n"
+
+#: src/modules/internet/libcurl.c:763
+#, fuzzy
+msgid "cannot open connection"
+msgstr "no se puede abrir la conexi�n"
+
+#: src/modules/internet/libcurl.c:826
+#, fuzzy
+msgid "url(method = \"libcurl\") is not supported on this platform"
+msgstr "esta plataforma no soporta nsl()"
+
+#: src/modules/internet/nanoftp.c:289 src/modules/internet/nanoftp.c:302
+#: src/modules/internet/nanoftp.c:313 src/modules/internet/nanoftp.c:347
+#: src/modules/internet/nanoftp.c:357
 msgid "RxmlNanoFTPScanURL: overlong (invalid?) URL"
 msgstr "RxmlNanoFTPScanURL: (inv�lido?) URL muy largo"
 
-#: src/modules/internet/nanoftp.c:389
+#: src/modules/internet/nanoftp.c:390
 msgid "removing FTP proxy info"
 msgstr "quitando la informaci�n proxy FTP"
 
-#: src/modules/internet/nanoftp.c:391
+#: src/modules/internet/nanoftp.c:392
 #, c-format
 msgid "using FTP proxy '%s'"
 msgstr "usando proxy FTP '%s'"
 
-#: src/modules/internet/nanoftp.c:402 src/modules/internet/nanoftp.c:431
+#: src/modules/internet/nanoftp.c:403 src/modules/internet/nanoftp.c:432
 msgid "RxmlNanoFTPScanProxy: overlong (invalid?) URL"
 msgstr "RxmlNanoFTPScanProxy: (inv�lido?) URL muy largo"
 
-#: src/modules/internet/nanoftp.c:830
+#: src/modules/internet/nanoftp.c:833
 msgid "cannot resolve host"
 msgstr "no fue posible resolver el host"
 
-#: src/modules/internet/nanoftp.c:860
+#: src/modules/internet/nanoftp.c:863
 msgid "failed to connect to server"
 msgstr "fallo en la conexi�n con el servidor"
 
-#: src/modules/internet/nanoftp.c:871
+#: src/modules/internet/nanoftp.c:874
 msgid "failed to get response from server"
 msgstr "fallo al intentar obtener respuesta del servidor"
 
-#: src/modules/internet/nanoftp.c:1134
+#: src/modules/internet/nanoftp.c:1137
 msgid "RxmlNanoFTPGetConnection: failed to create socket"
 msgstr "RxmlNanoFTPGetConnection: fallo en el intento de crear socket"
 
-#: src/modules/internet/nanoftp.c:1180
+#: src/modules/internet/nanoftp.c:1183
 msgid "failed to create a data connection"
 msgstr "fallo al intentar crear una conexi�n de datos"
 
-#: src/modules/internet/nanoftp.c:1188
+#: src/modules/internet/nanoftp.c:1191
 msgid "failed to bind a port"
 msgstr "fallo en el intento de vincular un puerto"
 
-#: src/modules/internet/nanoftp.c:1195
+#: src/modules/internet/nanoftp.c:1198
 #, c-format
 msgid "could not listen on port %d"
 msgstr "no fue posible escuchar en el puerto %d"
 
-#: src/modules/internet/nanohttp.c:370 src/modules/internet/nanohttp.c:398
-#: src/modules/internet/nanohttp.c:407
+#: src/modules/internet/nanohttp.c:369 src/modules/internet/nanohttp.c:400
+#: src/modules/internet/nanohttp.c:412
 msgid "RxmlNanoHTTPScanURL: overlong (invalid?) URL"
 msgstr "RxmlNanoHTTPScanURL: (inv�lido?) URL muy largo"
 
-#: src/modules/internet/nanohttp.c:441
+#: src/modules/internet/nanohttp.c:446
 msgid "removing HTTP proxy info"
 msgstr "quitando la informaci�n sobre proxy HTTP"
 
-#: src/modules/internet/nanohttp.c:443
+#: src/modules/internet/nanohttp.c:448
 #, c-format
 msgid "using HTTP proxy '%s'"
 msgstr "usando proxy HTTP '%s'"
 
-#: src/modules/internet/nanohttp.c:454 src/modules/internet/nanohttp.c:490
+#: src/modules/internet/nanohttp.c:459 src/modules/internet/nanohttp.c:497
 msgid "RxmlNanoHTTPScanProxy: overlong (invalid?) URL"
 msgstr "RxmlNanoHTTPScanProxy: (inv�lido?) URL muy largo"
 
-#: src/modules/internet/nanohttp.c:1107
+#: src/modules/internet/nanohttp.c:1135
 #, fuzzy, c-format
 msgid "unable to resolve '%s'"
 msgstr "no fue posible resolver '%s'."
 
-#: src/modules/internet/nanohttp.c:1134
+#: src/modules/internet/nanohttp.c:1168
 #, c-format
 msgid "connected to '%s' on port %d."
 msgstr "conectado a '%s' en el puerto %d."
 
-#: src/modules/internet/nanohttp.c:1139
+#: src/modules/internet/nanohttp.c:1173
 #, c-format
 msgid "unable to connect to '%s' on port %d."
 msgstr "no fue posible conectarse a '%s' en el puerto %d."
 
-#: src/modules/internet/nanohttp.c:1443
+#: src/modules/internet/nanohttp.c:1477
 #, c-format
 msgid "redirect to: '%s'"
 msgstr "redireccionamiento a: '%s'"
 
-#: src/modules/internet/nanohttp.c:1454
+#: src/modules/internet/nanohttp.c:1488
 msgid "too many redirects, aborting ..."
 msgstr "muchos redireccionamientos, abortando ..."
 
@@ -7059,11 +7204,11 @@ msgstr "argument tipo[1]='%s' debe ser uno de  '1','O', or 'I'"
 #: src/modules/lapack/Lapack.c:730 src/modules/lapack/Lapack.c:779
 #: src/modules/lapack/Lapack.c:786 src/modules/lapack/Lapack.c:834
 #: src/modules/lapack/Lapack.c:840 src/modules/lapack/Lapack.c:894
-#: src/modules/lapack/Lapack.c:900 src/modules/lapack/Lapack.c:1134
-#: src/modules/lapack/Lapack.c:1140 src/modules/lapack/Lapack.c:1188
-#: src/modules/lapack/Lapack.c:1195 src/modules/lapack/Lapack.c:1199
-#: src/modules/lapack/Lapack.c:1227 src/modules/lapack/Lapack.c:1234
-#: src/modules/lapack/Lapack.c:1254
+#: src/modules/lapack/Lapack.c:900 src/modules/lapack/Lapack.c:1135
+#: src/modules/lapack/Lapack.c:1141 src/modules/lapack/Lapack.c:1189
+#: src/modules/lapack/Lapack.c:1196 src/modules/lapack/Lapack.c:1200
+#: src/modules/lapack/Lapack.c:1228 src/modules/lapack/Lapack.c:1235
+#: src/modules/lapack/Lapack.c:1255
 #, c-format
 msgid "error code %d from Lapack routine '%s'"
 msgstr "error de c�digo %d en la rutina Lapack '%s'"
@@ -7149,28 +7294,28 @@ msgstr "error de c
 msgid "'a' must be a complex matrix"
 msgstr "'a' debe ser una matriz compleja"
 
-#: src/modules/lapack/Lapack.c:535 src/modules/lapack/Lapack.c:1042
+#: src/modules/lapack/Lapack.c:535 src/modules/lapack/Lapack.c:1043
 msgid "'a' is 0-diml"
 msgstr "'a' tiene dimensi�n 0"
 
-#: src/modules/lapack/Lapack.c:537 src/modules/lapack/Lapack.c:1044
+#: src/modules/lapack/Lapack.c:537 src/modules/lapack/Lapack.c:1045
 #, c-format
 msgid "'a' (%d x %d) must be square"
 msgstr "'a' (%d x %d) debe ser cuadrada"
 
-#: src/modules/lapack/Lapack.c:543 src/modules/lapack/Lapack.c:1050
+#: src/modules/lapack/Lapack.c:543 src/modules/lapack/Lapack.c:1051
 msgid "no right-hand side in 'b'"
 msgstr "no hay lado derecho en 'b'"
 
 #: src/modules/lapack/Lapack.c:546 src/modules/lapack/Lapack.c:560
-#: src/modules/lapack/Lapack.c:1053 src/modules/lapack/Lapack.c:1069
+#: src/modules/lapack/Lapack.c:1054 src/modules/lapack/Lapack.c:1070
 #, c-format
 msgid "'b' (%d x %d) must be compatible with 'a' (%d x %d)"
 msgstr "'b' (%d x %d) debe ser compatible con 'a' (%d x %d)"
 
 #: src/modules/lapack/Lapack.c:581 src/modules/lapack/Lapack.c:948
-#: src/modules/lapack/Lapack.c:962 src/modules/lapack/Lapack.c:1017
-#: src/modules/lapack/Lapack.c:1091
+#: src/modules/lapack/Lapack.c:962 src/modules/lapack/Lapack.c:1018
+#: src/modules/lapack/Lapack.c:1092
 #, c-format
 msgid "argument %d of Lapack routine %s had invalid value"
 msgstr "el argumento %d de la rutina Lapack '%s' tiene un valor inv�lido"
@@ -7180,7 +7325,7 @@ msgid "'b' must be a complex matrix"
 msgstr "'b' debe ser una matriz compleja"
 
 #: src/modules/lapack/Lapack.c:670 src/modules/lapack/Lapack.c:716
-#: src/modules/lapack/Lapack.c:1181 src/modules/lapack/Lapack.c:1220
+#: src/modules/lapack/Lapack.c:1182 src/modules/lapack/Lapack.c:1221
 #, c-format
 msgid "right-hand side should have %d not %d rows"
 msgstr "el t�rmino de la derecha debe tener %d y no %d lineas"
@@ -7199,13 +7344,13 @@ msgstr ""
 msgid "'x' must be a square complex matrix"
 msgstr "'x' debe ser una matriz num�rica cuadrada"
 
-#: src/modules/lapack/Lapack.c:926 src/modules/lapack/Lapack.c:1000
-#: src/modules/lapack/Lapack.c:1039 src/modules/lapack/Lapack.c:1114
-#: src/modules/lapack/Lapack.c:1245
+#: src/modules/lapack/Lapack.c:926 src/modules/lapack/Lapack.c:1001
+#: src/modules/lapack/Lapack.c:1040 src/modules/lapack/Lapack.c:1115
+#: src/modules/lapack/Lapack.c:1246
 msgid "'a' must be a numeric matrix"
 msgstr "'a' debe ser una matriz num�rica"
 
-#: src/modules/lapack/Lapack.c:933 src/modules/lapack/Lapack.c:1250
+#: src/modules/lapack/Lapack.c:933 src/modules/lapack/Lapack.c:1251
 msgid "'a' must be a square matrix"
 msgstr "'a' debe ser una matriz cuadrada"
 
@@ -7222,42 +7367,42 @@ msgstr "la submatriz de orden %d no es definida positiva"
 msgid "the matrix is either rank-deficient or indefinite"
 msgstr ""
 
-#: src/modules/lapack/Lapack.c:987
+#: src/modules/lapack/Lapack.c:988
 msgid "'size' argument must be a positive integer"
 msgstr "el argumento 'size' debe ser un entero positivo"
 
-#: src/modules/lapack/Lapack.c:1002
+#: src/modules/lapack/Lapack.c:1003
 #, c-format
 msgid "'size' cannot exceed ncol(x) = %d"
 msgstr "'size' no puede exeder ncol(x) = %d"
 
-#: src/modules/lapack/Lapack.c:1003
+#: src/modules/lapack/Lapack.c:1004
 #, c-format
 msgid "'size' cannot exceed nrow(x) = %d"
 msgstr "'size' no puede exceder nrow(x) = %d"
 
-#: src/modules/lapack/Lapack.c:1015
+#: src/modules/lapack/Lapack.c:1016
 #, c-format
 msgid "element (%d, %d) is zero, so the inverse cannot be computed"
 msgstr ""
 "elemento (%d, %d) es cero, por lo tanto la inversa no puede ser calculada"
 
-#: src/modules/lapack/Lapack.c:1094
+#: src/modules/lapack/Lapack.c:1095
 #, fuzzy, c-format
 msgid "Lapack routine %s: system is exactly singular: U[%d,%d] = 0"
 msgstr "rutina Lapack dgesv: sistema es exactamente singular"
 
-#: src/modules/lapack/Lapack.c:1102
+#: src/modules/lapack/Lapack.c:1103
 #, c-format
 msgid "system is computationally singular: reciprocal condition number = %g"
 msgstr ""
 "sistema es computacionalmente singular: n�mero de condici�n rec�proco = %g"
 
-#: src/modules/lapack/Lapack.c:1174 src/modules/lapack/Lapack.c:1212
+#: src/modules/lapack/Lapack.c:1175 src/modules/lapack/Lapack.c:1213
 msgid "'b' must be a numeric matrix"
 msgstr "'b' debe ser una matriz num�rica"
 
-#: src/modules/lapack/Lapack.c:1246
+#: src/modules/lapack/Lapack.c:1247
 msgid "argument 'logarithm' must be logical"
 msgstr "argumento 'logarithm' debe ser l�gico"
 
@@ -7266,8 +7411,8 @@ msgid "bessel_i allocation error"
 msgstr "error de asignaci�n bessel_i"
 
 #: src/nmath/bessel_i.c:77 src/nmath/bessel_i.c:122
-#, c-format
-msgid "bessel_i(%g): ncalc (=%ld) != nb (=%ld); alpha=%g. Arg. out of range?\n"
+#, fuzzy, c-format
+msgid "bessel_i(%g): ncalc (=%d) != nb (=%d); alpha=%g. Arg. out of range?\n"
 msgstr ""
 "bessel_i(%g): ncalc (=%ld) != nb (=%ld); alpha=%g. Argumento fuera de "
 "l�mites?\n"
@@ -7277,18 +7422,23 @@ msgstr ""
 msgid "bessel_i(%g,nu=%g): precision lost in result\n"
 msgstr "bessel_i(%g,nu=%g): precisi�n perdida en resultado\n"
 
-#: src/nmath/bessel_j.c:67
+#: src/nmath/bessel_j.c:64 src/nmath/bessel_j.c:118
+#, c-format
+msgid "besselJ(x, nu): nu=%g too large for bessel_j() algorithm"
+msgstr ""
+
+#: src/nmath/bessel_j.c:72
 msgid "bessel_j allocation error"
 msgstr "error de asignaci�n en bessel_j"
 
-#: src/nmath/bessel_j.c:75 src/nmath/bessel_j.c:118
-#, c-format
-msgid "bessel_j(%g): ncalc (=%ld) != nb (=%ld); alpha=%g. Arg. out of range?\n"
+#: src/nmath/bessel_j.c:80 src/nmath/bessel_j.c:127
+#, fuzzy, c-format
+msgid "bessel_j(%g): ncalc (=%d) != nb (=%d); alpha=%g. Arg. out of range?\n"
 msgstr ""
 "bessel_j(%g): ncalc (=%ld) != nb (=%ld); alpha=%g. Argumento fuera de "
 "l�mites?\n"
 
-#: src/nmath/bessel_j.c:78 src/nmath/bessel_j.c:121
+#: src/nmath/bessel_j.c:83 src/nmath/bessel_j.c:130
 #, c-format
 msgid "bessel_j(%g,nu=%g): precision lost in result\n"
 msgstr "bessel_j(%g,nu=%g): precisi�n perdida en resultado\n"
@@ -7298,8 +7448,8 @@ msgid "bessel_k allocation error"
 msgstr "error de asignaci�n en bessel_k"
 
 #: src/nmath/bessel_k.c:71 src/nmath/bessel_k.c:108
-#, c-format
-msgid "bessel_k(%g): ncalc (=%ld) != nb (=%ld); alpha=%g. Arg. out of range?\n"
+#, fuzzy, c-format
+msgid "bessel_k(%g): ncalc (=%d) != nb (=%d); alpha=%g. Arg. out of range?\n"
 msgstr ""
 "bessel_k(%g): ncalc (=%ld) != nb (=%ld); alpha=%g. Argumento fuera de "
 "l�mites?\n"
@@ -7309,18 +7459,23 @@ msgstr ""
 msgid "bessel_k(%g,nu=%g): precision lost in result\n"
 msgstr "bessel_k(%g,nu=%g): precisi�n perdida en resultado\n"
 
-#: src/nmath/bessel_y.c:66
+#: src/nmath/bessel_y.c:63 src/nmath/bessel_y.c:125
+#, c-format
+msgid "besselY(x, nu): nu=%g too large for bessel_y() algorithm"
+msgstr ""
+
+#: src/nmath/bessel_y.c:71
 msgid "bessel_y allocation error"
 msgstr "error de asignaci�n en bessel_y"
 
-#: src/nmath/bessel_y.c:82 src/nmath/bessel_y.c:127
-#, c-format
-msgid "bessel_y(%g): ncalc (=%ld) != nb (=%ld); alpha=%g. Arg. out of range?\n"
+#: src/nmath/bessel_y.c:87 src/nmath/bessel_y.c:136
+#, fuzzy, c-format
+msgid "bessel_y(%g): ncalc (=%d) != nb (=%d); alpha=%g. Arg. out of range?\n"
 msgstr ""
 "bessel_y(%g): ncalc (=%ld) != nb (=%ld); alpha=%g. Argumento fuera de "
 "l�mites?\n"
 
-#: src/nmath/bessel_y.c:85 src/nmath/bessel_y.c:130
+#: src/nmath/bessel_y.c:90 src/nmath/bessel_y.c:139
 #, c-format
 msgid "bessel_y(%g,nu=%g): precision lost in result\n"
 msgstr "bessel_y(%g,nu=%g): precisi�n perdida en resultado\n"
@@ -7330,42 +7485,42 @@ msgstr "bessel_y(%g,nu=%g): precisi
 msgid "'k' (%.2f) must be integer, rounded to %.0f"
 msgstr ""
 
-#: src/nmath/nmath.h:141
+#: src/nmath/nmath.h:156
 #, fuzzy, c-format
 msgid "argument out of domain in '%s'\n"
 msgstr "valor fuera de sus l�mites en 'perm'"
 
-#: src/nmath/nmath.h:144
+#: src/nmath/nmath.h:159
 #, fuzzy, c-format
 msgid "value out of range in '%s'\n"
 msgstr "valor fuera de sus l�mites en 'perm'"
 
-#: src/nmath/nmath.h:147
+#: src/nmath/nmath.h:162
 #, fuzzy, c-format
 msgid "convergence failed in '%s'\n"
 msgstr "falla de apertura en %s"
 
-#: src/nmath/nmath.h:150
+#: src/nmath/nmath.h:165
 #, c-format
 msgid "full precision may not have been achieved in '%s'\n"
 msgstr "no se han podido alcanzar precisi�n absoluta en '%s' \n"
 
-#: src/nmath/nmath.h:153
+#: src/nmath/nmath.h:168
 #, c-format
 msgid "underflow occurred in '%s'\n"
 msgstr "se produjo un desbordamiento en '%s' \n"
 
-#: src/nmath/pbeta.c:48
+#: src/nmath/pbeta.c:64
 #, c-format
-msgid "pbeta_raw() -> bratio() gave error code %d"
+msgid "pbeta_raw(%g, a=%g, b=%g, ..) -> bratio() gave error code %d"
 msgstr ""
 
-#: src/nmath/pnbinom.c:79
+#: src/nmath/pnbinom.c:82
 #, c-format
 msgid "pnbinom_mu() -> bratio() gave error code %d"
 msgstr ""
 
-#: src/nmath/pnchisq.c:246
+#: src/nmath/pnchisq.c:295
 #, c-format
 msgid "pnchisq(x=%g, ..): not converged in %d iter."
 msgstr "pnchisq(x=%g, ..): no converge en %d iteraciones"
@@ -7407,7 +7562,7 @@ msgstr "rutinas X11 no pueden accederse en m
 msgid "X11 module cannot be loaded"
 msgstr "m�dulo X11 no puede ser cargado"
 
-#: src/unix/X11.c:126 src/unix/X11.c:132 src/unix/X11.c:138 src/unix/X11.c:144
+#: src/unix/X11.c:144 src/unix/X11.c:150 src/unix/X11.c:156 src/unix/X11.c:162
 msgid "X11 is not available"
 msgstr "X11 no est� disponible"
 
@@ -7438,7 +7593,7 @@ msgid ""
 "Explicit lazy dynamic loading not supported on this platform. Using default."
 msgstr "Carga lazy expl�cita no soportado en esta plataforma. Usa por defecto."
 
-#: src/unix/dynload.c:240
+#: src/unix/dynload.c:232
 msgid "cannot get working directory!"
 msgstr "no es posible obtener el directorio de trabajo!"
 
@@ -7454,12 +7609,12 @@ msgstr ""
 "Una circunstancia inusual ha ocurrido en el anidado de entrada readline. Por "
 "favor informe usando bug.report()"
 
-#: src/unix/sys-std.c:1082 src/unix/sys-std.c:1249
+#: src/unix/sys-std.c:1085 src/unix/sys-std.c:1255
 #, fuzzy, c-format
 msgid "problem in saving the history file '%s'"
 msgstr "problemas al mostrar  '%s'"
 
-#: src/unix/sys-std.c:1156
+#: src/unix/sys-std.c:1162
 #, fuzzy, c-format
 msgid ""
 "Cannot open file '%s': %s\n"
@@ -7468,86 +7623,215 @@ msgstr ""
 "no fue posible abrir el archivo '%s'\n"
 "\n"
 
-#: src/unix/sys-std.c:1220 src/unix/sys-std.c:1243
+#: src/unix/sys-std.c:1226 src/unix/sys-std.c:1249
 msgid "'file' argument is too long"
 msgstr "argumento 'file' es muy largo"
 
-#: src/unix/sys-std.c:1226 src/unix/sys-std.c:1228
+#: src/unix/sys-std.c:1232 src/unix/sys-std.c:1234
 msgid "no history mechanism available"
 msgstr "no hay disponible mecanismos de historia"
 
-#: src/unix/sys-std.c:1255
+#: src/unix/sys-std.c:1261
 msgid "problem in truncating the history file"
 msgstr "problema al truncar el archivo de historial"
 
-#: src/unix/sys-std.c:1257 src/unix/sys-std.c:1259
+#: src/unix/sys-std.c:1263 src/unix/sys-std.c:1265
 msgid "no history available to save"
 msgstr "no hay historia disponible para guardar"
 
-#: src/unix/sys-std.c:1271
+#: src/unix/sys-std.c:1277
 msgid "invalid timestamp"
 msgstr "etiqueta inv�lida"
 
-#: src/unix/sys-unix.c:251
+#: src/unix/sys-unix.c:248
 msgid "non-empty character argument expected"
 msgstr "argumento de car�cter no vac�o esperado"
 
-#: src/unix/sys-unix.c:254
+#: src/unix/sys-unix.c:251
 msgid "'intern' must be logical and not NA"
 msgstr "'intern' debe ser un valor l�gico y no NA"
 
-#: src/unix/sys-unix.c:266
+#: src/unix/sys-unix.c:269
 #, fuzzy, c-format
 msgid "cannot popen '%s', probable reason '%s'"
 msgstr "no fue posible abrir el archivo '%s', motivo '%s'"
 
-#: src/unix/sys-unix.c:271
+#: src/unix/sys-unix.c:279
 #, c-format
 msgid "line %d may be truncated in call to system(, intern = TRUE)"
 msgstr "linea  %d puede ser truncada en la llamada a  system(, intern = TRUE)"
 
-#: src/unix/sys-unix.c:288
+#: src/unix/sys-unix.c:301
 #, fuzzy, c-format
 msgid "error in running command: '%s'"
 msgstr "error interno en el c�digo unz"
 
-#: src/unix/sys-unix.c:290
+#: src/unix/sys-unix.c:303
 #, fuzzy
 msgid "error in running command"
 msgstr "error interno en el c�digo unz"
 
-#: src/unix/sys-unix.c:294
+#: src/unix/sys-unix.c:307
 #, c-format
 msgid "running command '%s' had status %d and error message '%s'"
 msgstr "comando ejecuta '%s' tiene estatus %d y mensaje de error '%s' "
 
-#: src/unix/sys-unix.c:399
+#: src/unix/sys-unix.c:412
 msgid "Sys.info() is not implemented on this system"
 msgstr "Sys.info() no est� implementado en este sistema"
 
-#: src/unix/system.c:257
+#: src/unix/system.c:267
 #, c-format
 msgid "WARNING: --gui or -g without value ignored"
 msgstr "ATENCI�N: --gui o -g sin especificaci�n es ignorado"
 
-#: src/unix/system.c:275
+#: src/unix/system.c:285
 #, c-format
 msgid "WARNING: unknown gui '%s', using X11\n"
 msgstr "ATENCI�N: interface gr�fica desconocida '%s', usando X11\n"
 
-#: src/unix/system.c:278
+#: src/unix/system.c:288
 #, c-format
 msgid "WARNING: unknown gui '%s', using none\n"
 msgstr "ATENCI�N: interface gr�fica '%s' desconocida, usando ninguna\n"
 
-#: src/unix/system.c:388
+#: src/unix/system.c:373
 msgid "creating temporary file for '-e' failed"
 msgstr "creaci�n de archivo temporal '-e' fall�"
 
-#: src/unix/system.c:469
+#: src/unix/system.c:454
 msgid "WARNING: Only editing the first in the list of files"
 msgstr "ATENCI�N: Solamente editando el primero de los archivos de lista"
 
+#~ msgid "'what' must be a character string or a function"
+#~ msgstr "que debe ser un string de caracteres o una funci�n"
+
+#~ msgid "sockets are not available on this system"
+#~ msgstr "sockets no est�n disponibles en este sistema"
+
+#~ msgid "no function to restart"
+#~ msgstr "ninguna funci�n para reiniciar"
+
+#~ msgid "argument must be a closure"
+#~ msgstr "argumento debe ser una clausura"
+
+#~ msgid "'hostname' must be a character vector of length 1"
+#~ msgstr "'hostname' debe ser un vector de caracteres de longitud 1"
+
+#~ msgid "nsl() was unable to resolve host '%s'"
+#~ msgstr "soluci�n de m�quina '%s' imposible en nsl()"
+
+#, fuzzy
+#~ msgid "unknown format returned by C function 'gethostbyname'"
+#~ msgstr "formato desconocido retornado por gethostbyname"
+
+#~ msgid "nsl() is not supported on this platform"
+#~ msgstr "esta plataforma no soporta nsl()"
+
+#~ msgid "too large a range of values in 'x'"
+#~ msgstr "intervalo de valores muy grande en 'x'"
+
+#~ msgid "non-numeric argument"
+#~ msgstr "argumento no num�rico"
+
+#~ msgid "unsupported URL scheme"
+#~ msgstr "esquema de URL sin soporte"
+
+#~ msgid "'dimnames' must be a list"
+#~ msgstr "'dimnames' debe ser una lista"
+
+#~ msgid "'args' must be a list"
+#~ msgstr "'args' debe ser una lista"
+
+#~ msgid "binary operations require two arguments"
+#~ msgstr "operaciones binarias requieren dos argumentos"
+
+#~ msgid "opened URL\n"
+#~ msgstr "URL abierta\n"
+
+#~ msgid "internet routines were already initialized"
+#~ msgstr "rutinas de Internet ya est� iniciadas"
+
+#~ msgid "'msg1' must be a character string"
+#~ msgstr "'msg1' debe ser un string de caracteres"
+
+#~ msgid "'msg2' must be a character string"
+#~ msgstr "'msg2' debe ser un string de caracteres"
+
+#~ msgid "argument 'code' must be a character string"
+#~ msgstr "el argumento de 'code' debe ser un string de caracteres"
+
+#, fuzzy
+#~ msgid "argument 'type' must be a character string"
+#~ msgstr "el argumento de 'code' debe ser un string de caracteres"
+
+#~ msgid "InternetOpenUrl timed out"
+#~ msgstr "Tiempo l�mite agotado en InternetOpenUrl"
+
+#~ msgid "Internet read timed out"
+#~ msgstr "Tiempo l�mite de lectura de Internet agotado"
+
+#~ msgid "unable to find a closure from within which 'match.call' was called"
+#~ msgstr ""
+#~ "no es posible encontrar una clausura desde la cual  'match.call' fue "
+#~ "llamando"
+
+#~ msgid "vfont routines cannot be accessed in module"
+#~ msgstr "no hay acceso a las rutinas vfont en el m�dulo"
+
+#~ msgid "Hershey fonts cannot be loaded"
+#~ msgstr "las fuentes Hershey no pueden ser cargadas"
+
+#, fuzzy
+#~ msgid "invalid generic function in 'usemethod'"
+#~ msgstr "la funci�n gen�rica en 'usemethod' no es v�lida"
+
+#, fuzzy
+#~ msgid "'UseMethod' called from outside a function"
+#~ msgstr "'NextMethod' fue llamado desde afuera de una funci�n"
+
+#~ msgid "first argument must be a generic name"
+#~ msgstr "el primer argumento debe ser un nombre gen�rico"
+
+#~ msgid ""
+#~ "explicit request not to duplicate arguments in call to '%s', but argument "
+#~ "%d is of the wrong type (%d != %d)"
+#~ msgstr ""
+#~ "pedido expl�cito para no duplicar argumentos en la llamada a '%s', pero "
+#~ "el argumento %d es de tipo err�neo (%d != %d)"
+
+#~ msgid "character variables must be duplicated in .C/.Fortran"
+#~ msgstr ""
+#~ "las variables de tipo car�cter deben estar duplicadas en .C/.Fortran"
+
+#~ msgid "call name too long in '%s'"
+#~ msgstr "nombre de llamada  en '%s' muy largo"
+
+#~ msgid "generic name too long in '%s'"
+#~ msgstr "nombre gen�rico en '%s' muy largo"
+
+#~ msgid "method name too long in '%s'"
+#~ msgstr "el nombre del m�todo es demasiado largo en '%s'"
+
+#~ msgid "%d arguments passed to 'log' which requires 1 or 2"
+#~ msgstr "%d argumentos dados a 'log', que requeiren 1 o 2"
+
+#~ msgid ""
+#~ "Warning in %s :\n"
+#~ "  %s\n"
+#~ msgstr ""
+#~ "Aviso en %s :\n"
+#~ " %s\n"
+
+#~ msgid "input"
+#~ msgstr "entrada"
+
+#~ msgid "symbol"
+#~ msgstr "s�mbolo"
+
+#~ msgid "assignment"
+#~ msgstr "asignaci�n"
+
 #~ msgid "negative value in 'x'"
 #~ msgstr "valor negativo en 'x'"
 
@@ -7648,22 +7932,13 @@ msgstr "ATENCI
 #~ msgid "invalid return value count in call_R"
 #~ msgstr "conteo de valor de retorno inv�lido en call_R"
 
-#~ msgid "internal error in unz code"
-#~ msgstr "error interno en el c�digo unz"
-
 #~ msgid "can't use R profiling while byte code profiling"
 #~ msgstr "no puede usarse 'R profiling' durante 'byte code profiling'"
 
-#~ msgid "bad character switch offsets"
-#~ msgstr "mal car�cter en el interruptor offsets"
-
 #, fuzzy
 #~ msgid "bad switch names"
 #~ msgstr "nombre de archivo inv�lido"
 
-#~ msgid "bad numeric switch offsets"
-#~ msgstr "mal num�rico en el interruptor offsets"
-
 #, fuzzy
 #~ msgid "constBuf must be a generic vector"
 #~ msgstr "code debe ser un vector gen�rico"
@@ -7840,15 +8115,9 @@ msgstr "ATENCI
 #~ msgid "'title' must be a character string"
 #~ msgstr "'title' debe ser un string de caracteres"
 
-#~ msgid "'text' must be a character string"
-#~ msgstr "'text' debe ser un string de caracteres"
-
 #~ msgid "'%s' must be length 1"
 #~ msgstr "'%s' debe tener longitud 1"
 
-#~ msgid "'%s' must be a list"
-#~ msgstr "'%s' debe ser una lista"
-
 #~ msgid "'%s' element %d is not a window handle"
 #~ msgstr "%s'  elemento %d no es un identificador de ventana"
 
@@ -7877,9 +8146,6 @@ msgstr "ATENCI
 #~ msgid "'file' is not a connection"
 #~ msgstr "'file' no es una conexi�n"
 
-#~ msgid "'dec' must be a single character"
-#~ msgstr "'dec' debe ser un car�cter �nico"
-
 #~ msgid "corrupt data frame -- length of column %d does not not match nrows"
 #~ msgstr ""
 #~ "data frame con problemas -- largo de columna %d no se corresponde con "
diff --git a/src/library/base/po/fa.po b/src/library/base/po/fa.po
index ee627cf..ca5bf3a 100644
--- a/src/library/base/po/fa.po
+++ b/src/library/base/po/fa.po
@@ -6,8 +6,8 @@
 msgid ""
 msgstr ""
 "Project-Id-Version: R 2.15.2\n"
-"Report-Msgid-Bugs-To: bugs.r-project.org\n"
-"POT-Creation-Date: 2014-03-27 07:46+0000\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2016-04-01 10:28-0700\n"
 "PO-Revision-Date: 2012-10-26 22:30+0330\n"
 "Last-Translator: Seyed Mahmood Taghavi Shahri <taghavi_m at razi.tums.ac.ir>\n"
 "Language-Team: Persian\n"
@@ -50,15 +50,15 @@ msgstr ""
 msgid "unknown type in \"CG\" method of 'optim'"
 msgstr ""
 
-#: src/appl/optim.c:665
+#: src/appl/optim.c:662
 msgid "REPORT must be > 0 (method = \"L-BFGS-B\")"
 msgstr ""
 
-#: src/appl/optim.c:688
+#: src/appl/optim.c:685
 msgid "L-BFGS-B needs finite values of 'fn'"
 msgstr ""
 
-#: src/appl/optim.c:744
+#: src/appl/optim.c:741
 msgid "trace, REPORT must be >= 0 (method = \"SANN\")"
 msgstr ""
 
@@ -123,122 +123,127 @@ msgstr ""
 msgid "problem in displaying '%ls'"
 msgstr ""
 
-#: src/gnuwin32/extra.c:116 src/gnuwin32/extra.c:159 src/gnuwin32/extra.c:349
-#: src/gnuwin32/extra.c:577 src/gnuwin32/extra.c:602 src/main/agrep.c:131
-#: src/main/agrep.c:135 src/main/agrep.c:775 src/main/agrep.c:780
-#: src/main/apply.c:293 src/main/apply.c:295 src/main/apply.c:298
-#: src/main/array.c:87 src/main/array.c:1137 src/main/array.c:1263
-#: src/main/array.c:1265 src/main/array.c:1266 src/main/array.c:1592
-#: src/main/array.c:1594 src/main/array.c:1596 src/main/attrib.c:196
+#: src/gnuwin32/extra.c:116 src/gnuwin32/extra.c:158 src/gnuwin32/extra.c:348
+#: src/gnuwin32/extra.c:574 src/gnuwin32/extra.c:599 src/main/agrep.c:131
+#: src/main/agrep.c:135 src/main/agrep.c:776 src/main/agrep.c:781
+#: src/main/apply.c:330 src/main/apply.c:332 src/main/apply.c:335
+#: src/main/array.c:90 src/main/array.c:1272 src/main/array.c:1411
+#: src/main/array.c:1413 src/main/array.c:1414 src/main/array.c:1758
+#: src/main/array.c:1760 src/main/array.c:1762 src/main/attrib.c:190
 #: src/main/builtin.c:88 src/main/builtin.c:97 src/main/builtin.c:116
-#: src/main/builtin.c:118 src/main/builtin.c:147 src/main/builtin.c:534
-#: src/main/builtin.c:550 src/main/builtin.c:739 src/main/builtin.c:741
-#: src/main/builtin.c:743 src/main/character.c:139 src/main/character.c:142
-#: src/main/character.c:203 src/main/character.c:1037
-#: src/main/character.c:1041 src/main/character.c:1276
-#: src/main/character.c:1280 src/main/character.c:1341
-#: src/main/character.c:1344 src/main/connections.c:1217
-#: src/main/connections.c:1223 src/main/connections.c:1226
-#: src/main/connections.c:1230 src/main/connections.c:1375
-#: src/main/connections.c:1391 src/main/connections.c:1396
-#: src/main/connections.c:1996 src/main/connections.c:2002
-#: src/main/connections.c:2006 src/main/connections.c:2010
-#: src/main/connections.c:2015 src/main/connections.c:2665
-#: src/main/connections.c:2670 src/main/connections.c:2673
-#: src/main/connections.c:2676 src/main/connections.c:3057
-#: src/main/connections.c:3062 src/main/connections.c:3068
-#: src/main/connections.c:3071 src/main/connections.c:3075
-#: src/main/connections.c:3090 src/main/connections.c:3140
-#: src/main/connections.c:3145 src/main/connections.c:3149
-#: src/main/connections.c:3153 src/main/connections.c:3157
-#: src/main/connections.c:3163 src/main/connections.c:3210
-#: src/main/connections.c:3216 src/main/connections.c:3220
-#: src/main/connections.c:3270 src/main/connections.c:3273
-#: src/main/connections.c:3547 src/main/connections.c:3550
-#: src/main/connections.c:3553 src/main/connections.c:3559
-#: src/main/connections.c:3666 src/main/connections.c:3672
-#: src/main/connections.c:3675 src/main/connections.c:3826
-#: src/main/connections.c:3829 src/main/connections.c:3833
-#: src/main/connections.c:3836 src/main/connections.c:3956
-#: src/main/connections.c:4074 src/main/connections.c:4077
-#: src/main/connections.c:4414 src/main/connections.c:4439
-#: src/main/connections.c:4474 src/main/connections.c:4489
-#: src/main/connections.c:4497 src/main/connections.c:4523
-#: src/main/connections.c:4669 src/main/connections.c:4673
-#: src/main/connections.c:4801 src/main/connections.c:4803
-#: src/main/connections.c:4805 src/main/connections.c:4833
-#: src/main/connections.c:4965 src/main/connections.c:4991
-#: src/main/connections.c:4995 src/main/connections.c:4999
-#: src/main/connections.c:5003 src/main/context.c:596 src/main/context.c:605
-#: src/main/context.c:609 src/main/datetime.c:775 src/main/datetime.c:865
-#: src/main/datetime.c:867 src/main/datetime.c:871 src/main/datetime.c:1026
-#: src/main/datetime.c:1028 src/main/datetime.c:1232 src/main/debug.c:228
-#: src/main/deparse.c:397 src/main/dotcode.c:478 src/main/dotcode.c:482
-#: src/main/dotcode.c:487 src/main/dounzip.c:322 src/main/dounzip.c:329
-#: src/main/dounzip.c:339 src/main/dounzip.c:344 src/main/dounzip.c:348
-#: src/main/dounzip.c:352 src/main/envir.c:1618 src/main/envir.c:1621
-#: src/main/envir.c:1742 src/main/envir.c:1747 src/main/envir.c:1813
-#: src/main/envir.c:1829 src/main/envir.c:1835 src/main/envir.c:1932
-#: src/main/envir.c:1940 src/main/envir.c:1947 src/main/envir.c:1958
-#: src/main/envir.c:2172 src/main/envir.c:2293 src/main/envir.c:2552
-#: src/main/envir.c:2762 src/main/envir.c:2776 src/main/envir.c:2783
-#: src/main/envir.c:2799 src/main/envir.c:3367 src/main/errors.c:1030
-#: src/main/eval.c:397 src/main/eval.c:406 src/main/eval.c:409
-#: src/main/grep.c:767 src/main/grep.c:772 src/main/grep.c:1061
-#: src/main/grep.c:1063 src/main/grep.c:1065 src/main/grep.c:1510
-#: src/main/grep.c:1514 src/main/grep.c:1519 src/main/grep.c:2323
-#: src/main/grep.c:2328 src/main/grep.c:2621 src/main/grep.c:2626
-#: src/main/memory.c:3736 src/main/paste.c:96 src/main/paste.c:395
-#: src/main/paste.c:402 src/main/paste.c:409 src/main/paste.c:414
-#: src/main/paste.c:419 src/main/paste.c:424 src/main/paste.c:427
-#: src/main/paste.c:435 src/main/paste.c:601 src/main/paste.c:606
+#: src/main/builtin.c:118 src/main/builtin.c:149 src/main/builtin.c:569
+#: src/main/builtin.c:585 src/main/builtin.c:773 src/main/builtin.c:775
+#: src/main/builtin.c:777 src/main/character.c:239 src/main/character.c:242
+#: src/main/character.c:247 src/main/character.c:788 src/main/character.c:791
+#: src/main/character.c:1289 src/main/character.c:1293
+#: src/main/character.c:1528 src/main/character.c:1532
+#: src/main/character.c:1593 src/main/character.c:1596
+#: src/main/connections.c:1208 src/main/connections.c:1214
+#: src/main/connections.c:1217 src/main/connections.c:1221
+#: src/main/connections.c:1367 src/main/connections.c:1383
+#: src/main/connections.c:1388 src/main/connections.c:1989
+#: src/main/connections.c:1995 src/main/connections.c:1999
+#: src/main/connections.c:2003 src/main/connections.c:2008
+#: src/main/connections.c:2659 src/main/connections.c:2664
+#: src/main/connections.c:2667 src/main/connections.c:2670
+#: src/main/connections.c:3053 src/main/connections.c:3058
+#: src/main/connections.c:3064 src/main/connections.c:3067
+#: src/main/connections.c:3071 src/main/connections.c:3086
+#: src/main/connections.c:3135 src/main/connections.c:3140
+#: src/main/connections.c:3144 src/main/connections.c:3148
+#: src/main/connections.c:3152 src/main/connections.c:3158
+#: src/main/connections.c:3203 src/main/connections.c:3209
+#: src/main/connections.c:3213 src/main/connections.c:3264
+#: src/main/connections.c:3267 src/main/connections.c:3543
+#: src/main/connections.c:3546 src/main/connections.c:3549
+#: src/main/connections.c:3555 src/main/connections.c:3662
+#: src/main/connections.c:3668 src/main/connections.c:3671
+#: src/main/connections.c:3823 src/main/connections.c:3826
+#: src/main/connections.c:3830 src/main/connections.c:3833
+#: src/main/connections.c:3954 src/main/connections.c:4085
+#: src/main/connections.c:4088 src/main/connections.c:4425
+#: src/main/connections.c:4450 src/main/connections.c:4485
+#: src/main/connections.c:4500 src/main/connections.c:4508
+#: src/main/connections.c:4534 src/main/connections.c:4680
+#: src/main/connections.c:4684 src/main/connections.c:4814
+#: src/main/connections.c:4816 src/main/connections.c:4818
+#: src/main/connections.c:4846 src/main/connections.c:4980
+#: src/main/connections.c:5019 src/main/connections.c:5024
+#: src/main/connections.c:5029 src/main/connections.c:5050
+#: src/main/context.c:607 src/main/context.c:616 src/main/context.c:620
+#: src/main/datetime.c:781 src/main/datetime.c:869 src/main/datetime.c:872
+#: src/main/datetime.c:876 src/main/datetime.c:1043 src/main/datetime.c:1045
+#: src/main/datetime.c:1250 src/main/debug.c:245 src/main/deparse.c:408
+#: src/main/dotcode.c:496 src/main/dotcode.c:500 src/main/dotcode.c:505
+#: src/main/dounzip.c:323 src/main/dounzip.c:330 src/main/dounzip.c:340
+#: src/main/dounzip.c:345 src/main/dounzip.c:349 src/main/dounzip.c:353
+#: src/main/envir.c:1752 src/main/envir.c:1755 src/main/envir.c:1876
+#: src/main/envir.c:1881 src/main/envir.c:1945 src/main/envir.c:1961
+#: src/main/envir.c:1967 src/main/envir.c:2079 src/main/envir.c:2087
+#: src/main/envir.c:2094 src/main/envir.c:2105 src/main/envir.c:2337
+#: src/main/envir.c:2458 src/main/envir.c:2755 src/main/envir.c:3022
+#: src/main/envir.c:3036 src/main/envir.c:3043 src/main/envir.c:3059
+#: src/main/envir.c:3642 src/main/errors.c:1011 src/main/eval.c:454
+#: src/main/eval.c:463 src/main/eval.c:466 src/main/grep.c:780
+#: src/main/grep.c:785 src/main/grep.c:1079 src/main/grep.c:1081
+#: src/main/grep.c:1083 src/main/grep.c:1528 src/main/grep.c:1532
+#: src/main/grep.c:1537 src/main/grep.c:2345 src/main/grep.c:2350
+#: src/main/grep.c:2652 src/main/grep.c:2657 src/main/memory.c:3823
+#: src/main/paste.c:96 src/main/paste.c:392 src/main/paste.c:399
+#: src/main/paste.c:406 src/main/paste.c:411 src/main/paste.c:416
+#: src/main/paste.c:421 src/main/paste.c:424 src/main/paste.c:432
+#: src/main/paste.c:437 src/main/paste.c:619 src/main/paste.c:624
 #: src/main/platform.c:306 src/main/platform.c:308 src/main/platform.c:310
 #: src/main/platform.c:326 src/main/platform.c:337 src/main/platform.c:390
-#: src/main/platform.c:392 src/main/platform.c:705 src/main/platform.c:707
-#: src/main/platform.c:1064 src/main/platform.c:1070 src/main/platform.c:1073
-#: src/main/platform.c:1076 src/main/platform.c:1079 src/main/platform.c:1082
-#: src/main/platform.c:1085 src/main/platform.c:1088 src/main/platform.c:1185
-#: src/main/platform.c:1188 src/main/platform.c:1191 src/main/platform.c:1229
-#: src/main/platform.c:1286 src/main/platform.c:1289 src/main/platform.c:1498
-#: src/main/platform.c:1501 src/main/platform.c:1504 src/main/platform.c:1540
-#: src/main/platform.c:1543 src/main/platform.c:1546 src/main/platform.c:1629
-#: src/main/platform.c:1645 src/main/platform.c:1684 src/main/platform.c:1686
-#: src/main/platform.c:1757 src/main/platform.c:1841 src/main/platform.c:2116
-#: src/main/platform.c:2176 src/main/platform.c:2353 src/main/platform.c:2356
-#: src/main/platform.c:2359 src/main/platform.c:2362 src/main/platform.c:2365
-#: src/main/platform.c:2368 src/main/platform.c:2568 src/main/platform.c:2571
-#: src/main/platform.c:2574 src/main/platform.c:2577 src/main/platform.c:2580
-#: src/main/platform.c:2583 src/main/platform.c:2657 src/main/platform.c:2665
-#: src/main/platform.c:2701 src/main/platform.c:2751 src/main/print.c:242
-#: src/main/print.c:248 src/main/print.c:270 src/main/print.c:276
-#: src/main/print.c:283 src/main/random.c:478 src/main/random.c:482
-#: src/main/random.c:489 src/main/random.c:517 src/main/saveload.c:1950
-#: src/main/saveload.c:1953 src/main/saveload.c:1956 src/main/saveload.c:2072
-#: src/main/saveload.c:2252 src/main/saveload.c:2257 src/main/saveload.c:2260
+#: src/main/platform.c:392 src/main/platform.c:708 src/main/platform.c:710
+#: src/main/platform.c:800 src/main/platform.c:1138 src/main/platform.c:1144
+#: src/main/platform.c:1147 src/main/platform.c:1150 src/main/platform.c:1153
+#: src/main/platform.c:1156 src/main/platform.c:1159 src/main/platform.c:1162
+#: src/main/platform.c:1259 src/main/platform.c:1262 src/main/platform.c:1265
+#: src/main/platform.c:1303 src/main/platform.c:1361 src/main/platform.c:1364
+#: src/main/platform.c:1573 src/main/platform.c:1576 src/main/platform.c:1579
+#: src/main/platform.c:1615 src/main/platform.c:1618 src/main/platform.c:1621
+#: src/main/platform.c:1657 src/main/platform.c:1690 src/main/platform.c:1692
+#: src/main/platform.c:1763 src/main/platform.c:1848 src/main/platform.c:2089
+#: src/main/platform.c:2149 src/main/platform.c:2334 src/main/platform.c:2337
+#: src/main/platform.c:2340 src/main/platform.c:2343 src/main/platform.c:2346
+#: src/main/platform.c:2349 src/main/platform.c:2555 src/main/platform.c:2558
+#: src/main/platform.c:2561 src/main/platform.c:2564 src/main/platform.c:2567
+#: src/main/platform.c:2570 src/main/platform.c:2648 src/main/platform.c:2656
+#: src/main/platform.c:2692 src/main/platform.c:2742 src/main/print.c:235
+#: src/main/print.c:241 src/main/print.c:263 src/main/print.c:269
+#: src/main/print.c:276 src/main/random.c:470 src/main/random.c:474
+#: src/main/random.c:481 src/main/random.c:509 src/main/saveload.c:1952
+#: src/main/saveload.c:1955 src/main/saveload.c:1958 src/main/saveload.c:2074
+#: src/main/saveload.c:2254 src/main/saveload.c:2259 src/main/saveload.c:2262
 #: src/main/saveload.c:2366 src/main/scan.c:684 src/main/scan.c:853
 #: src/main/scan.c:867 src/main/scan.c:871 src/main/scan.c:873
 #: src/main/scan.c:884 src/main/scan.c:911 src/main/scan.c:914
-#: src/main/scan.c:917 src/main/scan.c:972 src/main/seq.c:618
-#: src/main/seq.c:623 src/main/seq.c:631 src/main/seq.c:662 src/main/seq.c:666
-#: src/main/seq.c:672 src/main/seq.c:680 src/main/sort.c:175
-#: src/main/sysutils.c:585 src/main/sysutils.c:589 src/main/sysutils.c:593
-#: src/main/sysutils.c:599 src/main/sysutils.c:603 src/main/sysutils.c:1831
-#: src/main/sysutils.c:1835 src/main/unique.c:966 src/main/unique.c:1289
-#: src/main/unique.c:1349 src/main/unique.c:1356 src/main/unique.c:1750
-#: src/main/util.c:581 src/main/util.c:584 src/main/util.c:1825
-#: src/main/util.c:1994 src/main/util.c:1995 src/main/util.c:1996
-#: src/main/util.c:2013 src/main/util.c:2037 src/main/util.c:2041
-#: src/main/util.c:2043 src/main/util.c:2068 src/main/util.c:2070
-#: src/main/util.c:2072 src/main/util.c:2075 src/main/util.c:2078
-#: src/main/util.c:2082 src/main/util.c:2084 src/modules/X11/devX11.c:3241
-#: src/modules/X11/devX11.c:3244 src/modules/X11/devX11.c:3247
-#: src/modules/X11/devX11.c:3271 src/modules/internet/internet.c:284
-#: src/modules/internet/internet.c:290 src/modules/internet/internet.c:296
-#: src/modules/internet/internet.c:299 src/modules/internet/internet.c:303
+#: src/main/scan.c:917 src/main/scan.c:972 src/main/seq.c:622
+#: src/main/seq.c:627 src/main/seq.c:635 src/main/seq.c:666 src/main/seq.c:670
+#: src/main/seq.c:676 src/main/seq.c:684 src/main/sort.c:175
+#: src/main/sysutils.c:597 src/main/sysutils.c:601 src/main/sysutils.c:605
+#: src/main/sysutils.c:611 src/main/sysutils.c:615 src/main/sysutils.c:1787
+#: src/main/sysutils.c:1791 src/main/unique.c:1029 src/main/unique.c:1337
+#: src/main/unique.c:1341 src/main/unique.c:1351 src/main/unique.c:1747
+#: src/main/util.c:636 src/main/util.c:639 src/main/util.c:1379
+#: src/main/util.c:1393 src/main/util.c:1975 src/main/util.c:2198
+#: src/main/util.c:2199 src/main/util.c:2200 src/main/util.c:2217
+#: src/main/util.c:2245 src/main/util.c:2249 src/main/util.c:2251
+#: src/main/util.c:2277 src/main/util.c:2279 src/main/util.c:2281
+#: src/main/util.c:2284 src/main/util.c:2287 src/main/util.c:2291
+#: src/main/util.c:2293 src/modules/X11/devX11.c:3247
+#: src/modules/X11/devX11.c:3250 src/modules/X11/devX11.c:3253
+#: src/modules/X11/devX11.c:3277 src/modules/internet/internet.c:453
+#: src/modules/internet/internet.c:459 src/modules/internet/internet.c:465
+#: src/modules/internet/internet.c:468 src/modules/internet/internet.c:472
+#: src/modules/internet/internet.c:477 src/modules/internet/libcurl.c:414
+#: src/modules/internet/libcurl.c:418 src/modules/internet/libcurl.c:423
+#: src/modules/internet/libcurl.c:426 src/modules/internet/libcurl.c:430
 #: src/modules/lapack/Lapack.c:155 src/modules/lapack/Lapack.c:261
 #: src/modules/lapack/Lapack.c:709 src/modules/lapack/Lapack.c:818
-#: src/modules/lapack/Lapack.c:880 src/modules/lapack/Lapack.c:1214
-#: src/unix/sys-std.c:1217 src/unix/sys-std.c:1240
+#: src/modules/lapack/Lapack.c:880 src/modules/lapack/Lapack.c:1215
+#: src/unix/sys-std.c:1223 src/unix/sys-std.c:1246
 #, c-format
 msgid "invalid '%s' argument"
 msgstr ""
@@ -247,358 +252,335 @@ msgstr ""
 msgid "unsupported version of Windows"
 msgstr ""
 
-#: src/gnuwin32/extra.c:267 src/main/apply.c:105 src/main/character.c:595
-#: src/main/connections.c:3555 src/main/context.c:642 src/main/context.c:661
-#: src/main/datetime.c:675 src/main/datetime.c:777 src/main/datetime.c:1030
-#: src/main/dotcode.c:199 src/main/errors.c:929 src/main/errors.c:962
-#: src/main/errors.c:1065 src/main/errors.c:1090 src/main/errors.c:1095
-#: src/main/errors.c:1368 src/main/identical.c:66 src/main/identical.c:67
-#: src/main/identical.c:68 src/main/identical.c:69 src/main/identical.c:70
-#: src/main/seq.c:185 src/main/seq.c:341 src/main/seq.c:346 src/main/seq.c:350
-#: src/main/seq.c:391 src/main/seq.c:395 src/main/seq.c:399
-#: src/main/sort.c:1224 src/main/sort.c:1307 src/main/sort.c:1311
-#: src/main/sort.c:1318 src/main/sort.c:1393 src/main/source.c:220
-#: src/main/summary.c:886 src/main/sysutils.c:251 src/main/util.c:986
-#: src/main/util.c:991 src/main/util.c:998 src/main/util.c:1001
-#: src/modules/X11/devX11.c:3142 src/modules/X11/devX11.c:3169
-#: src/modules/X11/devX11.c:3174 src/modules/X11/devX11.c:3179
-#: src/modules/X11/devX11.c:3189 src/modules/X11/devX11.c:3194
-#: src/modules/X11/devX11.c:3198 src/modules/X11/devX11.c:3202
-#: src/unix/sys-std.c:1291
-#, c-format
-msgid "invalid '%s' value"
-msgstr ""
-
-#: src/gnuwin32/extra.c:308 src/gnuwin32/extra.c:321
+#: src/gnuwin32/extra.c:313 src/gnuwin32/extra.c:324
 msgid "incorrect argument"
 msgstr ""
 
-#: src/gnuwin32/extra.c:312
+#: src/gnuwin32/extra.c:316
 msgid "don't be silly!: your machine has a 4Gb address limit"
 msgstr ""
 
-#: src/gnuwin32/extra.c:316
+#: src/gnuwin32/extra.c:320
 msgid "cannot decrease memory limit: ignored"
 msgstr ""
 
-#: src/gnuwin32/extra.c:428 src/gnuwin32/extra.c:529 src/main/util.c:897
+#: src/gnuwin32/extra.c:427 src/gnuwin32/extra.c:528 src/main/util.c:962
 msgid "'path' must be a character vector"
 msgstr ""
 
-#: src/gnuwin32/extra.c:579 src/gnuwin32/extra.c:581 src/gnuwin32/extra.c:604
-#: src/gnuwin32/extra.c:606 src/gnuwin32/extra.c:641 src/main/gevents.c:61
+#: src/gnuwin32/extra.c:576 src/gnuwin32/extra.c:578 src/gnuwin32/extra.c:601
+#: src/gnuwin32/extra.c:603 src/gnuwin32/extra.c:638 src/main/gevents.c:61
 #: src/main/gevents.c:98
 msgid "invalid device"
 msgstr ""
 
-#: src/gnuwin32/extra.c:582
+#: src/gnuwin32/extra.c:579
 msgid "requires SDI mode"
 msgstr ""
 
-#: src/gnuwin32/extra.c:635 src/main/gevents.c:58 src/main/gevents.c:95
+#: src/gnuwin32/extra.c:632 src/main/gevents.c:58 src/main/gevents.c:95
 msgid "invalid graphical device number"
 msgstr ""
 
-#: src/gnuwin32/extra.c:645
+#: src/gnuwin32/extra.c:642
 msgid "bad device"
 msgstr ""
 
-#: src/gnuwin32/extra.c:799 src/gnuwin32/extra.c:807
+#: src/gnuwin32/extra.c:796 src/gnuwin32/extra.c:804
 msgid "invalid input in 'Rmbstowcs'"
 msgstr ""
 
-#: src/gnuwin32/extra.c:830 src/main/platform.c:1261
+#: src/gnuwin32/extra.c:827 src/main/platform.c:1336
 msgid "file choice cancelled"
 msgstr ""
 
-#: src/gnuwin32/run.c:242
+#: src/gnuwin32/run.c:244
 #, c-format
 msgid "'CreateProcess' failed to run '%s'"
 msgstr ""
 
-#: src/gnuwin32/run.c:344
+#: src/gnuwin32/run.c:346
 msgid "Child process not responding.  R will terminate it."
 msgstr ""
 
-#: src/gnuwin32/run.c:402
+#: src/gnuwin32/run.c:404
 #, c-format
 msgid "Exit code was %d"
 msgstr ""
 
-#: src/gnuwin32/run.c:434
+#: src/gnuwin32/run.c:436
 msgid "Insufficient memory (rpipeOpen)"
 msgstr ""
 
-#: src/gnuwin32/run.c:648 src/main/dounzip.c:482
+#: src/gnuwin32/run.c:650 src/main/dounzip.c:481
 msgid "seek not enabled for this connection"
 msgstr ""
 
-#: src/gnuwin32/run.c:654
+#: src/gnuwin32/run.c:656
 msgid "truncate not enabled for this connection"
 msgstr ""
 
-#: src/gnuwin32/run.c:729 src/gnuwin32/run.c:733 src/gnuwin32/run.c:746
-#: src/gnuwin32/run.c:774 src/main/connections.c:1330
-#: src/main/connections.c:1334 src/main/connections.c:1340
-#: src/main/connections.c:1354
+#: src/gnuwin32/run.c:731 src/gnuwin32/run.c:735 src/gnuwin32/run.c:748
+#: src/gnuwin32/run.c:776 src/main/connections.c:1322
+#: src/main/connections.c:1326 src/main/connections.c:1332
+#: src/main/connections.c:1346
 msgid "allocation of pipe connection failed"
 msgstr ""
 
-#: src/gnuwin32/run.c:788
+#: src/gnuwin32/run.c:790
 msgid "'names' is not a character vector"
 msgstr ""
 
-#: src/gnuwin32/sys-win32.c:182
+#: src/gnuwin32/sys-win32.c:180
 msgid "character string expected as first argument"
 msgstr ""
 
-#: src/gnuwin32/sys-win32.c:191
+#: src/gnuwin32/sys-win32.c:189
 msgid "character string expected as third argument"
 msgstr ""
 
-#: src/gnuwin32/sys-win32.c:257 src/unix/sys-unix.c:299
+#: src/gnuwin32/sys-win32.c:255 src/unix/sys-unix.c:312
 #, c-format
 msgid "running command '%s' had status %d"
 msgstr ""
 
-#: src/gnuwin32/system.c:122 src/unix/sys-unix.c:427
+#: src/gnuwin32/system.c:121 src/unix/sys-unix.c:440
 msgid "reached session elapsed time limit"
 msgstr ""
 
-#: src/gnuwin32/system.c:124 src/unix/sys-unix.c:429
+#: src/gnuwin32/system.c:123 src/unix/sys-unix.c:442
 msgid "reached elapsed time limit"
 msgstr ""
 
-#: src/gnuwin32/system.c:130 src/unix/sys-unix.c:435
+#: src/gnuwin32/system.c:129 src/unix/sys-unix.c:448
 msgid "reached session CPU time limit"
 msgstr ""
 
-#: src/gnuwin32/system.c:132 src/unix/sys-unix.c:437
+#: src/gnuwin32/system.c:131 src/unix/sys-unix.c:450
 msgid "reached CPU time limit"
 msgstr ""
 
-#: src/gnuwin32/system.c:157
+#: src/gnuwin32/system.c:156
 #, c-format
 msgid "Fatal error: %s\n"
 msgstr ""
 
-#: src/gnuwin32/system.c:335 src/unix/sys-std.c:863
+#: src/gnuwin32/system.c:334 src/unix/sys-std.c:866
 #, c-format
 msgid "encoding '%s' is not recognised"
 msgstr ""
 
-#: src/gnuwin32/system.c:341 src/unix/sys-std.c:869
+#: src/gnuwin32/system.c:340 src/unix/sys-std.c:872
 #, c-format
 msgid "<ERROR: re-encoding failure from encoding '%s'>\n"
 msgstr ""
 
-#: src/gnuwin32/system.c:555 src/gnuwin32/system.c:1049
-#: src/gnuwin32/system.c:1061 src/main/connections.c:590
-#: src/main/connections.c:595 src/main/dounzip.c:177 src/main/saveload.c:1961
-#: src/main/serialize.c:2552 src/main/serialize.c:2557
-#: src/main/serialize.c:2642 src/main/serialize.c:2687 src/unix/system.c:323
-#: src/unix/system.c:343
+#: src/gnuwin32/system.c:562 src/gnuwin32/system.c:1058
+#: src/gnuwin32/system.c:1070 src/main/connections.c:581
+#: src/main/connections.c:586 src/main/dounzip.c:178 src/main/saveload.c:1963
+#: src/main/serialize.c:2598 src/main/serialize.c:2603
+#: src/main/serialize.c:2688 src/main/serialize.c:2733 src/unix/system.c:328
 #, c-format
 msgid "cannot open file '%s': %s"
 msgstr ""
 
-#: src/gnuwin32/system.c:569
+#: src/gnuwin32/system.c:576
 #, c-format
 msgid "file.show(): file '%s' does not exist\n"
 msgstr ""
 
-#: src/gnuwin32/system.c:970
+#: src/gnuwin32/system.c:979
 #, c-format
 msgid "WARNING: R_MAX_MEM_SIZE value is invalid: ignored\n"
 msgstr ""
 
-#: src/gnuwin32/system.c:1002
+#: src/gnuwin32/system.c:1011
 msgid "WARNING: no max-mem-size given\n"
 msgstr ""
 
-#: src/gnuwin32/system.c:1009
+#: src/gnuwin32/system.c:1018
 #, c-format
 msgid "WARNING: --max-mem-size value is invalid: ignored\n"
 msgstr ""
 
-#: src/gnuwin32/system.c:1012
+#: src/gnuwin32/system.c:1021
 #, c-format
 msgid "WARNING: --max-mem-size=%lu%c: too large and ignored\n"
 msgstr ""
 
-#: src/gnuwin32/system.c:1018
+#: src/gnuwin32/system.c:1027
 #, c-format
 msgid "WARNING: --max-mem-size=%4.1fM: too small and ignored\n"
 msgstr ""
 
-#: src/gnuwin32/system.c:1023
+#: src/gnuwin32/system.c:1032
 #, c-format
 msgid "WARNING: --max-mem-size=%4.0fM: too large and taken as %uM\n"
 msgstr ""
 
-#: src/gnuwin32/system.c:1039
+#: src/gnuwin32/system.c:1048
 #, c-format
 msgid "option '%s' requires an argument"
 msgstr ""
 
-#: src/gnuwin32/system.c:1070
+#: src/gnuwin32/system.c:1079
 #, c-format
 msgid "option '%s' requires a non-empty argument"
 msgstr ""
 
-#: src/gnuwin32/system.c:1078 src/unix/system.c:362
+#: src/gnuwin32/system.c:1087 src/unix/system.c:347
 #, c-format
 msgid "WARNING: '-e %s' omitted as input is too long\n"
 msgstr ""
 
-#: src/gnuwin32/system.c:1082 src/unix/system.c:375
+#: src/gnuwin32/system.c:1091 src/unix/system.c:360
 #, c-format
 msgid "WARNING: unknown option '%s'\n"
 msgstr ""
 
-#: src/gnuwin32/system.c:1104 src/unix/system.c:379
+#: src/gnuwin32/system.c:1113 src/unix/system.c:364
 #, c-format
 msgid "ARGUMENT '%s' __ignored__\n"
 msgstr ""
 
-#: src/gnuwin32/system.c:1110 src/unix/system.c:386
+#: src/gnuwin32/system.c:1119 src/unix/system.c:371
 msgid "cannot use -e with -f or --file"
 msgstr ""
 
-#: src/gnuwin32/system.c:1128
+#: src/gnuwin32/system.c:1137
 msgid "creation of tmpfile failed -- set TMPDIR suitably?"
 msgstr ""
 
-#: src/gnuwin32/system.c:1147 src/unix/system.c:437
+#: src/gnuwin32/system.c:1156 src/unix/system.c:422
 msgid "you must specify '--save', '--no-save' or '--vanilla'"
 msgstr ""
 
-#: src/gnuwin32/system.c:1152
+#: src/gnuwin32/system.c:1161
 msgid ""
 "impossible to create 'reader thread'; you must free some system resources"
 msgstr ""
 
-#: src/include/Errormsg.h:25 src/main/subscript.c:375 src/main/subscript.c:393
-#: src/main/subscript.c:417 src/main/subscript.c:456 src/main/subscript.c:584
-#: src/main/subscript.c:623 src/main/subscript.c:766
+#: src/include/Errormsg.h:27 src/main/subscript.c:383 src/main/subscript.c:401
+#: src/main/subscript.c:425 src/main/subscript.c:464 src/main/subscript.c:662
+#: src/main/subscript.c:701 src/main/subscript.c:844
 msgid "subscript out of bounds"
 msgstr ""
 
-#: src/include/Errormsg.h:26
+#: src/include/Errormsg.h:28
 #, c-format
 msgid "object of type '%s' is not subsettable"
 msgstr ""
 
-#: src/main/CommandLineArgs.c:170
+#: src/main/CommandLineArgs.c:171
 msgid "WARNING: no value given for --encoding"
 msgstr ""
 
-#: src/main/CommandLineArgs.c:195
+#: src/main/CommandLineArgs.c:196
 #, c-format
 msgid "WARNING: option '%s' no longer supported"
 msgstr ""
 
-#: src/main/CommandLineArgs.c:206
+#: src/main/CommandLineArgs.c:207
 #, c-format
 msgid "WARNING: no value given for '%s'"
 msgstr ""
 
-#: src/main/CommandLineArgs.c:216
+#: src/main/CommandLineArgs.c:217
 #, c-format
 msgid "WARNING: '%s' value is invalid: ignored"
 msgstr ""
 
-#: src/main/CommandLineArgs.c:220
+#: src/main/CommandLineArgs.c:221
 #, c-format
 msgid "WARNING: %s: too large and ignored"
 msgstr ""
 
-#: src/main/CommandLineArgs.c:234
+#: src/main/CommandLineArgs.c:235
 msgid "WARNING: no value given for '--max-ppsize'"
 msgstr ""
 
-#: src/main/CommandLineArgs.c:239
+#: src/main/CommandLineArgs.c:240
 msgid "WARNING: '--max-ppsize' value is negative: ignored"
 msgstr ""
 
-#: src/main/CommandLineArgs.c:241
+#: src/main/CommandLineArgs.c:242
 msgid "WARNING: '--max-ppsize' value is too small: ignored"
 msgstr ""
 
-#: src/main/CommandLineArgs.c:244
+#: src/main/CommandLineArgs.c:245
 msgid "WARNING: '--max-ppsize' value is too large: ignored"
 msgstr ""
 
-#: src/main/RNG.c:175
+#: src/main/RNG.c:176
 #, c-format
 msgid "unif_rand: unimplemented RNG kind %d"
 msgstr ""
 
-#: src/main/RNG.c:260
+#: src/main/RNG.c:261
 #, c-format
 msgid "FixupSeeds: unimplemented RNG kind %d"
 msgstr ""
 
-#: src/main/RNG.c:302
+#: src/main/RNG.c:301
 msgid "'user_unif_rand' not in load table"
 msgstr ""
 
-#: src/main/RNG.c:310
+#: src/main/RNG.c:309
 msgid "cannot read seeds unless 'user_unif_nseed' is supplied"
 msgstr ""
 
-#: src/main/RNG.c:315
+#: src/main/RNG.c:314
 msgid "seed length must be in 0...625; ignored"
 msgstr ""
 
-#: src/main/RNG.c:323
+#: src/main/RNG.c:322
 #, c-format
 msgid "RNG_Init: unimplemented RNG kind %d"
 msgstr ""
 
-#: src/main/RNG.c:354
+#: src/main/RNG.c:351
 msgid "'.Random.seed' is a missing argument with no default"
 msgstr ""
 
-#: src/main/RNG.c:355
+#: src/main/RNG.c:352
 #, c-format
 msgid "'.Random.seed' is not an integer vector but of type '%s', so ignored"
 msgstr ""
 
-#: src/main/RNG.c:363
+#: src/main/RNG.c:360
 msgid "'.Random.seed[1]' is not a valid integer, so ignored"
 msgstr ""
 
-#: src/main/RNG.c:369
+#: src/main/RNG.c:366
 msgid "'.Random.seed[1]' is not a valid Normal type, so ignored"
 msgstr ""
 
-#: src/main/RNG.c:383
+#: src/main/RNG.c:380
 msgid "'.Random.seed[1] = 5' but no user-supplied generator, so ignored"
 msgstr ""
 
-#: src/main/RNG.c:388
+#: src/main/RNG.c:385
 msgid "'.Random.seed[1]' is not a valid RNG kind so ignored"
 msgstr ""
 
-#: src/main/RNG.c:415
+#: src/main/RNG.c:412
 msgid "'.Random.seed' has wrong length"
 msgstr ""
 
-#: src/main/RNG.c:468
+#: src/main/RNG.c:465
 #, c-format
 msgid "RNGkind: unimplemented RNG kind %d"
 msgstr ""
 
-#: src/main/RNG.c:488
+#: src/main/RNG.c:485
 msgid "invalid Normal type in 'RNGkind'"
 msgstr ""
 
-#: src/main/RNG.c:491
+#: src/main/RNG.c:488
 msgid "'user_norm_rand' not in load table"
 msgstr ""
 
-#: src/main/RNG.c:535
+#: src/main/RNG.c:532
 msgid "supplied seed is not a valid integer"
 msgstr ""
 
@@ -623,7 +605,7 @@ msgstr ""
 msgid "could not allocate space for 'name'"
 msgstr ""
 
-#: src/main/Rdynload.c:881 src/main/Rdynload.c:897 src/main/util.c:698
+#: src/main/Rdynload.c:881 src/main/Rdynload.c:897 src/main/util.c:762
 msgid "character argument expected"
 msgstr ""
 
@@ -641,32 +623,34 @@ msgstr ""
 
 #: src/main/Rdynload.c:979
 #, c-format
-msgid "cannot allocate memory for registered native symbol (%d bytes)"
-msgstr ""
+msgid "cannot allocate memory for registered native symbol (%d byte)"
+msgid_plural "cannot allocate memory for registered native symbol (%d bytes)"
+msgstr[0] ""
+msgstr[1] ""
 
-#: src/main/Rdynload.c:1100 src/main/Rdynload.c:1321
+#: src/main/Rdynload.c:1102 src/main/Rdynload.c:1323
 msgid "must pass package name or DllInfo reference"
 msgstr ""
 
-#: src/main/Rdynload.c:1197
+#: src/main/Rdynload.c:1199
 #, c-format
 msgid "unimplemented type %d in 'createRSymbolObject'"
 msgstr ""
 
-#: src/main/Rdynload.c:1279 src/main/Rdynload.c:1373
+#: src/main/Rdynload.c:1281 src/main/Rdynload.c:1375
 msgid "R_getRegisteredRoutines() expects a DllInfo reference"
 msgstr ""
 
-#: src/main/Rdynload.c:1282 src/main/Rdynload.c:1376
+#: src/main/Rdynload.c:1284 src/main/Rdynload.c:1378
 msgid "NULL value passed for DllInfo"
 msgstr ""
 
-#: src/main/Rdynload.c:1436
+#: src/main/Rdynload.c:1441
 #, c-format
 msgid "function '%s' not provided by package '%s'"
 msgstr ""
 
-#: src/main/Rdynload.c:1438
+#: src/main/Rdynload.c:1443
 msgid "table entry must be an external pointer"
 msgstr ""
 
@@ -675,8 +659,9 @@ msgstr ""
 msgid "problem in setting variable '%s' in Renviron"
 msgstr ""
 
-#: src/main/Renviron.c:311
-msgid "argument 'x' must be a character string"
+#: src/main/Renviron.c:311 src/main/objects.c:1174 src/main/raw.c:155
+#, c-format
+msgid "argument '%s' must be a character string"
 msgstr ""
 
 #: src/main/Renviron.c:315
@@ -684,116 +669,138 @@ msgstr ""
 msgid "file '%s' cannot be opened for reading"
 msgstr ""
 
-#: src/main/Rstrptime.h:517 src/main/Rstrptime.h:984
+#: src/main/Rstrptime.h:524 src/main/Rstrptime.h:991
 #, c-format
 msgid "use of %s for input is not supported"
 msgstr ""
 
-#: src/main/Rstrptime.h:1242
+#: src/main/Rstrptime.h:1263
 msgid "input string is too long"
 msgstr ""
 
-#: src/main/Rstrptime.h:1244
+#: src/main/Rstrptime.h:1265
 msgid "invalid multibyte input string"
 msgstr ""
 
-#: src/main/Rstrptime.h:1247
+#: src/main/Rstrptime.h:1268
 msgid "format string is too long"
 msgstr ""
 
-#: src/main/Rstrptime.h:1249
+#: src/main/Rstrptime.h:1270
 msgid "invalid multibyte format string"
 msgstr ""
 
-#: src/main/agrep.c:133 src/main/agrep.c:777 src/main/character.c:1039
-#: src/main/character.c:1043 src/main/grep.c:769 src/main/grep.c:1512
-#: src/main/grep.c:1516 src/main/grep.c:2325 src/main/grep.c:2623
+#: src/main/agrep.c:133 src/main/agrep.c:778 src/main/character.c:1291
+#: src/main/character.c:1295 src/main/grep.c:782 src/main/grep.c:1530
+#: src/main/grep.c:1534 src/main/grep.c:2347 src/main/grep.c:2654
 #, c-format
 msgid "argument '%s' has length > 1 and only the first element will be used"
 msgstr ""
 
-#: src/main/agrep.c:189 src/main/agrep.c:818
+#: src/main/agrep.c:190 src/main/agrep.c:820
 msgid "'pattern' must be a non-empty character string"
 msgstr ""
 
-#: src/main/agrep.c:200 src/main/agrep.c:827 src/main/grep.c:838
-#: src/main/grep.c:2381 src/main/grep.c:2662
+#: src/main/agrep.c:201 src/main/agrep.c:829 src/main/grep.c:853
+#: src/main/grep.c:2405 src/main/grep.c:2707
 msgid "regular expression is invalid in this locale"
 msgstr ""
 
-#: src/main/agrep.c:206 src/main/agrep.c:623
+#: src/main/agrep.c:207 src/main/agrep.c:624
 #, c-format
 msgid "regcomp error:  '%s'"
 msgstr ""
 
-#: src/main/agrep.c:238 src/main/agrep.c:871 src/main/grep.c:227
-#: src/main/grep.c:315 src/main/grep.c:423 src/main/grep.c:578
-#: src/main/grep.c:889 src/main/grep.c:2480 src/main/grep.c:2548
-#: src/main/grep.c:2698
+#: src/main/agrep.c:239 src/main/agrep.c:874 src/main/grep.c:233
+#: src/main/grep.c:323 src/main/grep.c:434 src/main/grep.c:590
+#: src/main/grep.c:907 src/main/grep.c:2510 src/main/grep.c:2579
+#: src/main/grep.c:2744
 #, c-format
 msgid "input string %d is invalid in this locale"
 msgstr ""
 
-#: src/main/agrep.c:525 src/main/agrep.c:765 src/main/grep.c:155
-#: src/main/grep.c:760 src/main/grep.c:762 src/main/grep.c:1047
-#: src/main/grep.c:1055 src/main/grep.c:1503 src/main/grep.c:1505
-#: src/main/grep.c:2315 src/main/grep.c:2317 src/main/grep.c:2611
+#: src/main/agrep.c:526 src/main/agrep.c:766 src/main/grep.c:159
+#: src/main/grep.c:773 src/main/grep.c:775 src/main/grep.c:1065
+#: src/main/grep.c:1073 src/main/grep.c:1521 src/main/grep.c:1523
+#: src/main/grep.c:2337 src/main/grep.c:2339 src/main/grep.c:2642
 #, c-format
 msgid "argument '%s' will be ignored"
 msgstr ""
 
-#: src/main/agrep.c:614
+#: src/main/agrep.c:615
 #, c-format
 msgid "input string x[%d] is invalid in this locale"
 msgstr ""
 
-#: src/main/agrep.c:660
+#: src/main/agrep.c:661
 #, c-format
 msgid "input string y[%d] is invalid in this locale"
 msgstr ""
 
-#: src/main/agrep.c:833 src/main/grep.c:2668
+#: src/main/agrep.c:835 src/main/grep.c:2713
 #, c-format
 msgid "regcomp error: '%s'"
 msgstr ""
 
-#: src/main/apply.c:103
+#: src/main/apply.c:98
 msgid "'FUN.VALUE' must be a vector"
 msgstr ""
 
-#: src/main/apply.c:108 src/main/complex.c:758
+#: src/main/apply.c:100 src/main/array.c:506 src/main/character.c:847
+#: src/main/character.c:1655 src/main/connections.c:3551
+#: src/main/context.c:653 src/main/context.c:672 src/main/datetime.c:681
+#: src/main/datetime.c:783 src/main/datetime.c:1047 src/main/dotcode.c:222
+#: src/main/errors.c:910 src/main/errors.c:943 src/main/errors.c:1049
+#: src/main/errors.c:1074 src/main/errors.c:1079 src/main/errors.c:1349
+#: src/main/identical.c:66 src/main/identical.c:67 src/main/identical.c:68
+#: src/main/identical.c:69 src/main/identical.c:70 src/main/platform.c:2982
+#: src/main/seq.c:192 src/main/seq.c:343 src/main/seq.c:348 src/main/seq.c:352
+#: src/main/seq.c:397 src/main/seq.c:401 src/main/seq.c:405
+#: src/main/sort.c:1244 src/main/sort.c:1327 src/main/sort.c:1331
+#: src/main/sort.c:1338 src/main/source.c:225 src/main/summary.c:954
+#: src/main/sysutils.c:250 src/main/util.c:1051 src/main/util.c:1056
+#: src/main/util.c:1063 src/main/util.c:1066 src/main/util.c:2035
+#: src/modules/X11/devX11.c:3148 src/modules/X11/devX11.c:3175
+#: src/modules/X11/devX11.c:3180 src/modules/X11/devX11.c:3185
+#: src/modules/X11/devX11.c:3195 src/modules/X11/devX11.c:3200
+#: src/modules/X11/devX11.c:3204 src/modules/X11/devX11.c:3208
+#, c-format
+msgid "invalid '%s' value"
+msgstr ""
+
+#: src/main/apply.c:103 src/main/complex.c:753
 msgid "invalid length"
 msgstr ""
 
-#: src/main/apply.c:113
+#: src/main/apply.c:108
 msgid "long vectors are not supported for matrix/array results"
 msgstr ""
 
-#: src/main/apply.c:162
+#: src/main/apply.c:115
+#, c-format
+msgid "type '%s' is not supported"
+msgstr ""
+
+#: src/main/apply.c:163
 #, c-format
 msgid ""
 "values must be length %d,\n"
 " but FUN(X[[%d]]) result is length %d"
 msgstr ""
 
-#: src/main/apply.c:174
+#: src/main/apply.c:175
 #, c-format
 msgid ""
 "values must be type '%s',\n"
 " but FUN(X[[%d]]) result is type '%s'"
 msgstr ""
 
-#: src/main/apply.c:193
-#, c-format
-msgid "type '%s' is not supported"
-msgstr ""
-
-#: src/main/apply.c:225
+#: src/main/apply.c:252
 #, c-format
 msgid "dimnames(<value>) is neither NULL nor list of length %d"
 msgstr ""
 
-#: src/main/arithmetic.c:42
+#: src/main/arithmetic.c:42 src/main/eval.c:3633
 msgid "NaNs produced"
 msgstr ""
 
@@ -801,463 +808,475 @@ msgstr ""
 msgid "non-numeric argument to mathematical function"
 msgstr ""
 
-#: src/main/arithmetic.c:187
+#: src/main/arithmetic.c:186
 msgid "probable complete loss of accuracy in modulus"
 msgstr ""
 
-#: src/main/arithmetic.c:337
+#: src/main/arithmetic.c:298
 msgid "NAs produced by integer overflow"
 msgstr ""
 
-#: src/main/arithmetic.c:538
+#: src/main/arithmetic.c:499
 msgid "operator needs one or two arguments"
 msgstr ""
 
-#: src/main/arithmetic.c:554
+#: src/main/arithmetic.c:515
 msgid "non-numeric argument to binary operator"
 msgstr ""
 
-#: src/main/arithmetic.c:615 src/main/relop.c:227
+#: src/main/arithmetic.c:576 src/main/relop.c:221
 msgid "non-conformable arrays"
 msgstr ""
 
-#: src/main/arithmetic.c:658
+#: src/main/arithmetic.c:619
 msgid "non-conformable time-series"
 msgstr ""
 
-#: src/main/arithmetic.c:680 src/main/logic.c:143 src/main/relop.c:166
-#: src/main/relop.c:265
+#: src/main/arithmetic.c:641 src/main/logic.c:135 src/main/relop.c:160
+#: src/main/relop.c:259
 msgid "longer object length is not a multiple of shorter object length"
 msgstr ""
 
-#: src/main/arithmetic.c:751
+#: src/main/arithmetic.c:712
 msgid "invalid argument to unary operator"
 msgstr ""
 
-#: src/main/arithmetic.c:780 src/main/arithmetic.c:805
-#: src/main/arithmetic.c:824
+#: src/main/arithmetic.c:741 src/main/arithmetic.c:766
+#: src/main/arithmetic.c:785
 msgid "invalid unary operator"
 msgstr ""
 
-#: src/main/arithmetic.c:1241
+#: src/main/arithmetic.c:1191
 msgid "unimplemented real function of 1 argument"
 msgstr ""
 
-#: src/main/arithmetic.c:1255 src/main/complex.c:648 src/main/complex.c:718
+#: src/main/arithmetic.c:1205 src/main/complex.c:638 src/main/complex.c:708
 msgid "unimplemented complex function"
 msgstr ""
 
-#: src/main/arithmetic.c:1526 src/main/arithmetic.c:1877
-#: src/main/arithmetic.c:2056 src/main/arithmetic.c:2168
+#: src/main/arithmetic.c:1484 src/main/arithmetic.c:1877
+#: src/main/arithmetic.c:2049 src/main/arithmetic.c:2152
 #, c-format
 msgid "unimplemented real function of %d numeric arguments"
 msgstr ""
 
-#: src/main/arithmetic.c:1552
+#: src/main/arithmetic.c:1511
 #, c-format
-msgid "%d arguments passed to '%s' which requires 1 or 2"
-msgstr ""
+msgid "%d argument passed to '%s' which requires 1 or 2 arguments"
+msgid_plural "%d arguments passed to '%s'which requires 1 or 2 arguments"
+msgstr[0] ""
+msgstr[1] ""
 
-#: src/main/arithmetic.c:1570
+#: src/main/arithmetic.c:1530
 msgid "invalid second argument of length 0"
 msgstr ""
 
-#: src/main/arithmetic.c:1639
-msgid "invalid argument 'base' of length 0"
+#: src/main/arithmetic.c:1625 src/main/arithmetic.c:1643 src/main/envir.c:1464
+#: src/main/envir.c:1972 src/main/eval.c:630 src/main/eval.c:4237
+#, c-format
+msgid "argument \"%s\" is missing, with no default"
 msgstr ""
 
-#: src/main/arithmetic.c:1647
-#, c-format
-msgid "%d arguments passed to 'log' which requires 1 or 2"
+#: src/main/arithmetic.c:1649
+msgid "invalid argument 'base' of length 0"
 msgstr ""
 
-#: src/main/array.c:79 src/main/array.c:1441
+#: src/main/array.c:82 src/main/array.c:1591
 #, c-format
 msgid "'data' must be of a vector type, was '%s'"
 msgstr ""
 
-#: src/main/array.c:94 src/main/array.c:102
+#: src/main/array.c:97 src/main/array.c:105
 msgid "non-numeric matrix extent"
 msgstr ""
 
-#: src/main/array.c:97 src/main/array.c:1535
+#: src/main/array.c:100 src/main/array.c:1695
 msgid "invalid 'nrow' value (too large or NA)"
 msgstr ""
 
-#: src/main/array.c:99 src/main/array.c:1537
+#: src/main/array.c:102 src/main/array.c:1697
 msgid "invalid 'nrow' value (< 0)"
 msgstr ""
 
-#: src/main/array.c:105 src/main/array.c:1540
+#: src/main/array.c:108 src/main/array.c:1700
 msgid "invalid 'ncol' value (too large or NA)"
 msgstr ""
 
-#: src/main/array.c:107 src/main/array.c:1542
+#: src/main/array.c:110 src/main/array.c:1702
 msgid "invalid 'ncol' value (< 0)"
 msgstr ""
 
-#: src/main/array.c:116
+#: src/main/array.c:119
 msgid "nc = 0 for non-null data"
 msgstr ""
 
-#: src/main/array.c:124
+#: src/main/array.c:127
 msgid "nr = 0 for non-null data"
 msgstr ""
 
-#: src/main/array.c:135
+#: src/main/array.c:138
 #, c-format
 msgid ""
 "data length [%d] is not a sub-multiple or multiple of the number of rows [%d]"
 msgstr ""
 
-#: src/main/array.c:138
+#: src/main/array.c:141
 #, c-format
 msgid ""
 "data length [%d] is not a sub-multiple or multiple of the number of columns "
 "[%d]"
 msgstr ""
 
-#: src/main/array.c:141
+#: src/main/array.c:144
 msgid "data length exceeds size of matrix"
 msgstr ""
 
-#: src/main/array.c:147 src/main/array.c:1453 src/main/array.c:1549
+#: src/main/array.c:150 src/main/array.c:1603 src/main/array.c:1709
 msgid "too many elements specified"
 msgstr ""
 
-#: src/main/array.c:205
+#: src/main/array.c:208
 msgid "negative extents to matrix"
 msgstr ""
 
-#: src/main/array.c:208
+#: src/main/array.c:211
 msgid "allocMatrix: too many elements specified"
 msgstr ""
 
-#: src/main/array.c:236
+#: src/main/array.c:239
 msgid "negative extents to 3D array"
 msgstr ""
 
-#: src/main/array.c:239
+#: src/main/array.c:242
 msgid "'alloc3Darray': too many elements specified"
 msgstr ""
 
-#: src/main/array.c:264
+#: src/main/array.c:267
 msgid "'allocArray': too many elements specified by 'dims'"
 msgstr ""
 
-#: src/main/array.c:448
+#: src/main/array.c:523
+#, c-format
+msgid "'%s' must be a list or atomic vector"
+msgstr ""
+
+#: src/main/array.c:561
 #, c-format
 msgid "a matrix-like object is required as argument to '%s'"
 msgstr ""
 
-#: src/main/array.c:662
+#: src/main/array.c:776
 msgid "requires numeric/complex matrix/vector arguments"
 msgstr ""
 
-#: src/main/array.c:752 src/main/array.c:756 src/main/array.c:760
+#: src/main/array.c:886 src/main/array.c:890 src/main/array.c:894
 msgid "non-conformable arguments"
 msgstr ""
 
-#: src/main/array.c:1058
+#: src/main/array.c:1193
 msgid "argument is not a matrix"
 msgstr ""
 
-#: src/main/array.c:1093
+#: src/main/array.c:1228
 msgid "invalid first argument, must be an array"
 msgstr ""
 
-#: src/main/array.c:1107
+#: src/main/array.c:1242
 #, c-format
 msgid "'perm' is of wrong length %d (!= %d)"
 msgstr ""
 
-#: src/main/array.c:1112 src/main/array.c:1115
+#: src/main/array.c:1247 src/main/array.c:1250
 msgid "'a' does not have named dimnames"
 msgstr ""
 
-#: src/main/array.c:1122
+#: src/main/array.c:1257
 #, c-format
 msgid "'perm[%d]' does not match a dimension name"
 msgstr ""
 
-#: src/main/array.c:1135
+#: src/main/array.c:1270
 msgid "value out of range in 'perm'"
 msgstr ""
 
-#: src/main/array.c:1217
+#: src/main/array.c:1352
 msgid "'resize' must be TRUE or FALSE"
 msgstr ""
 
-#: src/main/array.c:1275
+#: src/main/array.c:1422
 msgid "'x' must be numeric"
 msgstr ""
 
-#: src/main/array.c:1449
+#: src/main/array.c:1425
+msgid "'x' is too short"
+msgstr ""
+
+#: src/main/array.c:1599
 msgid "'dims' cannot be of length 0"
 msgstr ""
 
-#: src/main/array.c:1545
+#: src/main/array.c:1705
 msgid "'x' must have positive length"
 msgstr ""
 
-#: src/main/array.c:1605
+#: src/main/array.c:1771
 #, c-format
 msgid "singular matrix in 'backsolve'. First zero in diagonal [%d]"
 msgstr ""
 
-#: src/main/attrib.c:40 src/main/attrib.c:235 src/main/attrib.c:269
-#: src/main/attrib.c:291 src/main/attrib.c:405 src/main/attrib.c:452
-#: src/main/attrib.c:502
+#: src/main/attrib.c:40 src/main/attrib.c:231 src/main/attrib.c:265
+#: src/main/attrib.c:287 src/main/attrib.c:403 src/main/attrib.c:450
+#: src/main/attrib.c:501
 msgid "attempt to set an attribute on NULL"
 msgstr ""
 
-#: src/main/attrib.c:72
+#: src/main/attrib.c:77
 #, c-format
 msgid "row names must be 'character' or 'integer', not '%s'"
 msgstr ""
 
-#: src/main/attrib.c:124
+#: src/main/attrib.c:130
 #, c-format
 msgid "getAttrib: invalid type (%s) for TAG"
 msgstr ""
 
-#: src/main/attrib.c:379
+#: src/main/attrib.c:377
 #, c-format
 msgid "invalid type (%s) for 'names': must be vector"
 msgstr ""
 
-#: src/main/attrib.c:382
+#: src/main/attrib.c:380
 #, c-format
 msgid "'names' attribute [%d] must be the same length as the vector [%d]"
 msgstr ""
 
-#: src/main/attrib.c:387
+#: src/main/attrib.c:385
 msgid "names() applied to a non-vector"
 msgstr ""
 
-#: src/main/attrib.c:395
+#: src/main/attrib.c:393
 msgid "invalid time series parameters specified"
 msgstr ""
 
-#: src/main/attrib.c:409
+#: src/main/attrib.c:407
 msgid "'tsp' attribute must be numeric"
 msgstr ""
 
-#: src/main/attrib.c:415
+#: src/main/attrib.c:413
 msgid "'tsp' attribute must be numeric of length three"
 msgstr ""
 
-#: src/main/attrib.c:432
+#: src/main/attrib.c:430
 msgid "cannot assign 'tsp' to zero-length vector"
 msgstr ""
 
-#: src/main/attrib.c:463
+#: src/main/attrib.c:461
 msgid "attempt to set invalid 'comment' attribute"
 msgstr ""
 
-#: src/main/attrib.c:511
+#: src/main/attrib.c:510
 msgid "adding class \"factor\" to an invalid object"
 msgstr ""
 
-#: src/main/attrib.c:519
+#: src/main/attrib.c:541
 msgid "attempt to set invalid 'class' attribute"
 msgstr ""
 
-#: src/main/attrib.c:777
+#: src/main/attrib.c:872
 #, c-format
 msgid "class '%s' has no 'names' slot"
 msgstr ""
 
-#: src/main/attrib.c:779
+#: src/main/attrib.c:874
 #, c-format
 msgid ""
 "class '%s' has no 'names' slot; assigning a names attribute will create an "
 "invalid object"
 msgstr ""
 
-#: src/main/attrib.c:782
+#: src/main/attrib.c:877
 #, c-format
 msgid ""
 "invalid to use names()<- to set the 'names' slot in a non-vector class ('%s')"
 msgstr ""
 
-#: src/main/attrib.c:812
+#: src/main/attrib.c:907
 msgid "incompatible 'names' argument"
 msgstr ""
 
-#: src/main/attrib.c:867
+#: src/main/attrib.c:962
 #, c-format
 msgid "invalid type (%s) to set 'names' attribute"
 msgstr ""
 
-#: src/main/attrib.c:938
+#: src/main/attrib.c:1035
 msgid "'dimnames' applied to non-array"
 msgstr ""
 
-#: src/main/attrib.c:943
-msgid "'dimnames' must be a list"
+#: src/main/attrib.c:1040 src/main/coerce.c:2471
+#, c-format
+msgid "'%s' must be a list"
 msgstr ""
 
-#: src/main/attrib.c:946 src/main/attrib.c:974
+#: src/main/attrib.c:1043 src/main/attrib.c:1071
 #, c-format
 msgid "length of 'dimnames' [%d] must match that of 'dims' [%d]"
 msgstr ""
 
-#: src/main/attrib.c:980
+#: src/main/attrib.c:1077
 #, c-format
 msgid "invalid type (%s) for 'dimnames' (must be a vector)"
 msgstr ""
 
-#: src/main/attrib.c:983
+#: src/main/attrib.c:1080
 #, c-format
 msgid "length of 'dimnames' [%d] not equal to array extent"
 msgstr ""
 
-#: src/main/attrib.c:1055 src/main/builtin.c:75 src/main/builtin.c:112
-#: src/main/envir.c:1606 src/main/envir.c:1734 src/main/envir.c:1796
-#: src/main/envir.c:1918 src/main/paste.c:74 src/main/paste.c:293
-#: src/main/random.c:487 src/main/random.c:516 src/main/unique.c:1749
+#: src/main/attrib.c:1152 src/main/builtin.c:75 src/main/builtin.c:112
+#: src/main/envir.c:1740 src/main/envir.c:1868 src/main/envir.c:1928
+#: src/main/envir.c:2065 src/main/paste.c:74 src/main/paste.c:293
+#: src/main/random.c:479 src/main/random.c:508 src/main/unique.c:1746
 msgid "invalid first argument"
 msgstr ""
 
-#: src/main/attrib.c:1058
+#: src/main/attrib.c:1155
 msgid "invalid second argument"
 msgstr ""
 
-#: src/main/attrib.c:1066
+#: src/main/attrib.c:1163
 msgid "length-0 dimension vector is invalid"
 msgstr ""
 
-#: src/main/attrib.c:1071
+#: src/main/attrib.c:1168
 msgid "the dims contain missing values"
 msgstr ""
 
-#: src/main/attrib.c:1073
+#: src/main/attrib.c:1170
 msgid "the dims contain negative values"
 msgstr ""
 
-#: src/main/attrib.c:1078
+#: src/main/attrib.c:1175
 msgid "dims do not match the length of object"
 msgstr ""
 
-#: src/main/attrib.c:1080
+#: src/main/attrib.c:1177
 #, c-format
 msgid "dims [product %d] do not match the length of object [%d]"
 msgstr ""
 
-#: src/main/attrib.c:1177
+#: src/main/attrib.c:1284
 msgid "attributes must be a list or NULL"
 msgstr ""
 
-#: src/main/attrib.c:1182
+#: src/main/attrib.c:1289
 msgid "attributes must be named"
 msgstr ""
 
-#: src/main/attrib.c:1186
+#: src/main/attrib.c:1293
 #, c-format
 msgid "all attributes must have names [%d does not]"
 msgstr ""
 
-#: src/main/attrib.c:1285
+#: src/main/attrib.c:1393
 msgid "'which' must be of mode character"
 msgstr ""
 
-#: src/main/attrib.c:1287
+#: src/main/attrib.c:1395
 msgid "exactly one attribute 'which' must be given"
 msgstr ""
 
-#: src/main/attrib.c:1345 src/main/attrib.c:1368 src/main/subscript.c:240
-#: src/main/subscript.c:244 src/main/subset.c:1188 src/main/subset.c:1239
+#: src/main/attrib.c:1456 src/main/attrib.c:1479 src/main/subscript.c:245
+#: src/main/subscript.c:249 src/main/subset.c:1257 src/main/subset.c:1311
 #, c-format
 msgid "partial match of '%s' to '%s'"
 msgstr ""
 
-#: src/main/attrib.c:1406
+#: src/main/attrib.c:1525
 #, c-format
 msgid "invalid type '%s' for slot name"
 msgstr ""
 
-#: src/main/attrib.c:1444
+#: src/main/attrib.c:1563
 msgid "'name' must be non-null character string"
 msgstr ""
 
-#: src/main/attrib.c:1568 src/main/attrib.c:1639 src/main/attrib.c:1676
+#: src/main/attrib.c:1688 src/main/attrib.c:1759 src/main/attrib.c:1797
 msgid "invalid type or length for slot name"
 msgstr ""
 
-#: src/main/attrib.c:1602
+#: src/main/attrib.c:1722
 #, c-format
 msgid "cannot get a slot (\"%s\") from an object of type \"%s\""
 msgstr ""
 
-#: src/main/attrib.c:1613
+#: src/main/attrib.c:1733
 #, c-format
 msgid "no slot of name \"%s\" for this object of class \"%s\""
 msgstr ""
 
-#: src/main/attrib.c:1630
+#: src/main/attrib.c:1750
 msgid "attempt to set slot on NULL object"
 msgstr ""
 
-#: src/main/attrib.c:1671
+#: src/main/attrib.c:1792
 msgid "formal classes cannot be used without the 'methods' package"
 msgstr ""
 
-#: src/main/attrib.c:1683
+#: src/main/attrib.c:1804
 #, c-format
 msgid ""
 "trying to get slot \"%s\" from an object of a basic class (\"%s\") with no "
 "slots"
 msgstr ""
 
-#: src/main/attrib.c:1687
+#: src/main/attrib.c:1808
 #, c-format
 msgid ""
 "trying to get slot \"%s\" from an object (class \"%s\") that is not an S4 "
 "object "
 msgstr ""
 
-#: src/main/bind.c:161
+#: src/main/bind.c:164
 #, c-format
 msgid "resulting vector exceeds vector length limit in '%s'"
 msgstr ""
 
-#: src/main/bind.c:291 src/main/bind.c:327 src/main/bind.c:376
-#: src/main/bind.c:449 src/main/bind.c:477
+#: src/main/bind.c:294 src/main/bind.c:330 src/main/bind.c:379
+#: src/main/bind.c:452 src/main/bind.c:480
 #, c-format
 msgid "type '%s' is unimplemented in '%s'"
 msgstr ""
 
-#: src/main/bind.c:685
+#: src/main/bind.c:688
 msgid "repeated formal argument 'recursive'"
 msgstr ""
 
-#: src/main/bind.c:696
+#: src/main/bind.c:699
 msgid "repeated formal argument 'use.names'"
 msgstr ""
 
-#: src/main/bind.c:894
+#: src/main/bind.c:900
 msgid "argument not a list"
 msgstr ""
 
-#: src/main/bind.c:1038 src/main/eval.c:2691 src/main/eval.c:2700
-#: src/main/objects.c:318 src/main/objects.c:354 src/main/objects.c:729
-#: src/main/objects.c:746 src/main/objects.c:753
+#: src/main/bind.c:1044 src/main/names.c:1273 src/main/names.c:1278
+#: src/main/names.c:1283 src/main/names.c:1288
 #, c-format
 msgid "class name too long in '%s'"
 msgstr ""
 
-#: src/main/bind.c:1114
+#: src/main/bind.c:1128
 #, c-format
 msgid "cannot create a matrix from type '%s'"
 msgstr ""
 
-#: src/main/bind.c:1185
+#: src/main/bind.c:1198
 #, c-format
 msgid "number of rows of matrices must match (see arg %d)"
 msgstr ""
 
-#: src/main/bind.c:1430
+#: src/main/bind.c:1455
 #, c-format
 msgid "number of columns of matrices must match (see arg %d)"
 msgstr ""
@@ -1266,212 +1285,243 @@ msgstr ""
 msgid "vector size cannot be NA"
 msgstr ""
 
-#: src/main/builtin.c:49 src/main/builtin.c:57 src/main/sort.c:1303
+#: src/main/builtin.c:49 src/main/builtin.c:57 src/main/sort.c:1323
 msgid "vector size cannot be NA/NaN"
 msgstr ""
 
-#: src/main/builtin.c:50 src/main/builtin.c:58 src/main/sort.c:1304
+#: src/main/builtin.c:50 src/main/builtin.c:58 src/main/sort.c:1324
 msgid "vector size cannot be infinite"
 msgstr ""
 
-#: src/main/builtin.c:51 src/main/builtin.c:59 src/main/builtin.c:916
-#: src/main/sort.c:1305
+#: src/main/builtin.c:51 src/main/builtin.c:59 src/main/builtin.c:950
+#: src/main/sort.c:1325
 msgid "vector size specified is too large"
 msgstr ""
 
-#: src/main/builtin.c:84 src/main/builtin.c:93 src/main/builtin.c:293
-#: src/main/builtin.c:326 src/main/builtin.c:365 src/main/builtin.c:375
-#: src/main/coerce.c:1537 src/main/connections.c:3066 src/main/engine.c:2967
-#: src/main/envir.c:993 src/main/envir.c:1046 src/main/envir.c:1136
-#: src/main/envir.c:1615 src/main/envir.c:1739 src/main/envir.c:1807
-#: src/main/envir.c:1925 src/main/envir.c:2582 src/main/envir.c:2642
-#: src/main/envir.c:2922 src/main/envir.c:2951 src/main/envir.c:2972
-#: src/main/envir.c:2995 src/main/envir.c:3030 src/main/envir.c:3051
-#: src/main/envir.c:3357 src/main/envir.c:3362 src/main/eval.c:5318
-#: src/main/objects.c:197 src/main/objects.c:203 src/main/saveload.c:2070
-#: src/main/saveload.c:2364 src/main/serialize.c:2709
+#: src/main/builtin.c:84 src/main/builtin.c:93 src/main/builtin.c:304
+#: src/main/builtin.c:337 src/main/builtin.c:394 src/main/builtin.c:408
+#: src/main/coerce.c:1536 src/main/connections.c:3062 src/main/engine.c:2987
+#: src/main/envir.c:1001 src/main/envir.c:1054 src/main/envir.c:1210
+#: src/main/envir.c:1749 src/main/envir.c:1873 src/main/envir.c:1939
+#: src/main/envir.c:2072 src/main/envir.c:2791 src/main/envir.c:2877
+#: src/main/envir.c:3182 src/main/envir.c:3211 src/main/envir.c:3232
+#: src/main/envir.c:3255 src/main/envir.c:3290 src/main/envir.c:3311
+#: src/main/envir.c:3632 src/main/envir.c:3637 src/main/eval.c:6251
+#: src/main/objects.c:191 src/main/objects.c:199 src/main/saveload.c:2072
+#: src/main/saveload.c:2364 src/main/serialize.c:2755
 msgid "use of NULL environment is defunct"
 msgstr ""
 
-#: src/main/builtin.c:306
+#: src/main/builtin.c:250 src/main/builtin.c:263
+msgid "argument is not a function"
+msgstr ""
+
+#: src/main/builtin.c:317
 msgid "replacement object is not an environment"
 msgstr ""
 
-#: src/main/builtin.c:331
+#: src/main/builtin.c:342
 msgid "'enclos' must be an environment"
 msgstr ""
 
-#: src/main/builtin.c:352 src/main/builtin.c:370
+#: src/main/builtin.c:363 src/main/builtin.c:399
 msgid "argument is not an environment"
 msgstr ""
 
-#: src/main/builtin.c:354
+#: src/main/builtin.c:365
 msgid "the empty environment has no parent"
 msgstr ""
 
-#: src/main/builtin.c:372
+#: src/main/builtin.c:401
 msgid "can not set parent of the empty environment"
 msgstr ""
 
-#: src/main/builtin.c:380
+#: src/main/builtin.c:403
+msgid "can not set the parent environment of a namespace"
+msgstr ""
+
+#: src/main/builtin.c:405
+msgid "can not set the parent environment of package imports"
+msgstr ""
+
+#: src/main/builtin.c:413
 msgid "'parent' is not an environment"
 msgstr ""
 
-#: src/main/builtin.c:521 src/main/connections.c:3691
-#: src/main/connections.c:4068 src/main/connections.c:4102
-#: src/main/connections.c:4480 src/main/connections.c:4550
-#: src/main/connections.c:4759 src/main/connections.c:4763
-#: src/main/connections.c:5124 src/main/deparse.c:360 src/main/deparse.c:446
-#: src/main/serialize.c:2006
+#: src/main/builtin.c:556 src/main/connections.c:3687
+#: src/main/connections.c:4079 src/main/connections.c:4113
+#: src/main/connections.c:4491 src/main/connections.c:4561
+#: src/main/connections.c:4772 src/main/connections.c:4776
+#: src/main/connections.c:5199 src/main/deparse.c:369 src/main/deparse.c:458
+#: src/main/serialize.c:2045
 msgid "cannot write to this connection"
 msgstr ""
 
-#: src/main/builtin.c:526 src/main/builtin.c:556
+#: src/main/builtin.c:561 src/main/builtin.c:591
 #, c-format
 msgid "invalid '%s' specification"
 msgstr ""
 
-#: src/main/builtin.c:543
+#: src/main/builtin.c:578
 msgid "non-positive 'fill' argument will be ignored"
 msgstr ""
 
-#: src/main/builtin.c:618
+#: src/main/builtin.c:653
 #, c-format
 msgid "argument %d (type '%s') cannot be handled by 'cat'"
 msgstr ""
 
-#: src/main/builtin.c:763
+#: src/main/builtin.c:797
 #, c-format
 msgid "vector: cannot make a vector of mode '%s'."
 msgstr ""
 
-#: src/main/builtin.c:789
+#: src/main/builtin.c:823
 msgid "cannot set length of non-vector"
 msgstr ""
 
-#: src/main/builtin.c:897 src/main/builtin.c:907 src/main/options.c:637
+#: src/main/builtin.c:931 src/main/builtin.c:941 src/main/options.c:659
 msgid "invalid argument"
 msgstr ""
 
-#: src/main/builtin.c:899 src/main/builtin.c:909 src/main/builtin.c:911
-#: src/main/character.c:366 src/main/coerce.c:2765
+#: src/main/builtin.c:933 src/main/builtin.c:943 src/main/builtin.c:945
+#: src/main/character.c:525 src/main/coerce.c:2832
 msgid "invalid value"
 msgstr ""
 
-#: src/main/builtin.c:942 src/main/coerce.c:2478 src/main/coerce.c:2519
-#: src/main/eval.c:563 src/main/eval.c:683 src/main/eval.c:2099
-#: src/main/eval.c:2176 src/main/eval.c:2236 src/main/eval.c:2569
-#: src/main/eval.c:4694 src/main/eval.c:4814
+#: src/main/builtin.c:976 src/main/coerce.c:2541 src/main/coerce.c:2584
+#: src/main/eval.c:620 src/main/eval.c:740 src/main/eval.c:2266
+#: src/main/eval.c:2346 src/main/eval.c:2407 src/main/eval.c:2745
+#: src/main/eval.c:5584 src/main/eval.c:5701
 msgid "'...' used in an incorrect context"
 msgstr ""
 
-#: src/main/builtin.c:963
+#: src/main/builtin.c:998
 #, c-format
 msgid "duplicate 'switch' defaults: '%s' and '%s'"
 msgstr ""
 
-#: src/main/builtin.c:996
+#: src/main/builtin.c:1031
 msgid "'EXPR' is missing"
 msgstr ""
 
-#: src/main/builtin.c:1000 src/main/eval.c:5155
+#: src/main/builtin.c:1035 src/main/eval.c:6056
 msgid "EXPR must be a length 1 vector"
 msgstr ""
 
-#: src/main/builtin.c:1003
+#: src/main/builtin.c:1038 src/main/eval.c:6059
 #, c-format
 msgid ""
 "EXPR is a \"factor\", treated as integer.\n"
 " Consider using '%s' instead."
 msgstr ""
 
-#: src/main/character.c:105 src/main/character.c:108 src/main/character.c:132
-#: src/main/character.c:135
+#: src/main/builtin.c:1095 src/main/eval.c:6069 src/main/eval.c:6098
+msgid "'switch' with no alternatives"
+msgstr ""
+
+#: src/main/character.c:103 src/main/character.c:224
+#, c-format
+msgid "%d argument passed to '%s' which requires %d to %d"
+msgid_plural "%d arguments passed to '%s' which requires %d to %d"
+msgstr[0] ""
+msgstr[1] ""
+
+#: src/main/character.c:110 src/main/character.c:113 src/main/character.c:232
+#: src/main/character.c:235
 #, c-format
 msgid "'%s' requires a character vector"
 msgstr ""
 
-#: src/main/character.c:164
+#: src/main/character.c:150 src/main/character.c:165 src/main/character.c:175
+#: src/main/character.c:203
 #, c-format
-msgid ""
-"number of characters is not computable for element %d in \"bytes\" encoding"
+msgid "invalid multibyte string, %s"
 msgstr ""
 
-#: src/main/character.c:169 src/main/character.c:197 src/main/character.c:653
-#: src/main/character.c:750
+#: src/main/character.c:159
 #, c-format
-msgid "invalid multibyte string %d"
+msgid "number of characters is not computable in \"bytes\" encoding, %s"
 msgstr ""
 
-#: src/main/character.c:185
+#: src/main/character.c:188
 #, c-format
-msgid "width is not computable for element %d in \"bytes\" encoding"
+msgid "width is not computable for %s in \"bytes\" encoding"
 msgstr ""
 
-#: src/main/character.c:263
+#: src/main/character.c:311
 msgid "extracting substrings from a non-character object"
 msgstr ""
 
-#: src/main/character.c:268 src/main/character.c:363
+#: src/main/character.c:321 src/main/character.c:522
 msgid "invalid substring arguments"
 msgstr ""
 
-#: src/main/character.c:358
+#: src/main/character.c:361
+msgid "non-character object(s)"
+msgstr ""
+
+#: src/main/character.c:517
 msgid "replacing substrings in a non-character object"
 msgstr ""
 
-#: src/main/character.c:551
+#: src/main/character.c:785
 msgid "the first argument must be a character vector"
 msgstr ""
 
-#: src/main/character.c:570
+#: src/main/character.c:822
 msgid "abbreviate used with non-ASCII chars"
 msgstr ""
 
-#: src/main/character.c:591
+#: src/main/character.c:843
 msgid "non-character names"
 msgstr ""
 
-#: src/main/character.c:696 src/main/grep.c:159
+#: src/main/character.c:905 src/main/character.c:1002
+#, c-format
+msgid "invalid multibyte string %d"
+msgstr ""
+
+#: src/main/character.c:948 src/main/grep.c:163
 msgid "non-character argument"
 msgstr ""
 
-#: src/main/character.c:805
+#: src/main/character.c:1057
 #, c-format
 msgid "decreasing range specification ('%lc-%lc')"
 msgstr ""
 
-#: src/main/character.c:891
+#: src/main/character.c:1143
 #, c-format
 msgid "decreasing range specification ('%c-%c')"
 msgstr ""
 
-#: src/main/character.c:1079
+#: src/main/character.c:1331
 msgid "invalid UTF-8 string 'old'"
 msgstr ""
 
-#: src/main/character.c:1085
+#: src/main/character.c:1337
 msgid "invalid multibyte string 'old'"
 msgstr ""
 
-#: src/main/character.c:1098
+#: src/main/character.c:1350
 msgid "invalid UTF-8 string 'new'"
 msgstr ""
 
-#: src/main/character.c:1104
+#: src/main/character.c:1356
 msgid "invalid multibyte string 'new'"
 msgstr ""
 
-#: src/main/character.c:1132 src/main/character.c:1221
+#: src/main/character.c:1384 src/main/character.c:1473
 msgid "'old' is longer than 'new'"
 msgstr ""
 
-#: src/main/character.c:1164
+#: src/main/character.c:1416
 #, c-format
 msgid "invalid input multibyte string %d"
 msgstr ""
 
-#: src/main/character.c:1271
+#: src/main/character.c:1523
 msgid "strtrim() requires a character vector"
 msgstr ""
 
@@ -1483,15 +1533,15 @@ msgstr ""
 msgid "applies only to lists and vectors"
 msgstr ""
 
-#: src/main/coerce.c:77 src/main/errors.c:1208
+#: src/main/coerce.c:77 src/main/errors.c:1194
 msgid "NAs introduced by coercion"
 msgstr ""
 
-#: src/main/coerce.c:79 src/main/errors.c:1209
-msgid "inaccurate integer conversion in coercion"
+#: src/main/coerce.c:79
+msgid "NAs introduced by coercion to integer range"
 msgstr ""
 
-#: src/main/coerce.c:81 src/main/errors.c:1210
+#: src/main/coerce.c:81 src/main/errors.c:1196
 msgid "imaginary parts discarded in coercion"
 msgstr ""
 
@@ -1499,59 +1549,63 @@ msgstr ""
 msgid "out-of-range values treated as 0 in coercion to raw"
 msgstr ""
 
-#: src/main/coerce.c:414
+#: src/main/coerce.c:399
 #, c-format
 msgid "invalid data of mode '%s' (too short)"
 msgstr ""
 
-#: src/main/coerce.c:1016
+#: src/main/coerce.c:1002
 #, c-format
 msgid "'pairlist' object cannot be coerced to type '%s'"
 msgstr ""
 
-#: src/main/coerce.c:1134
+#: src/main/coerce.c:1120
 #, c-format
 msgid "(list) object cannot be coerced to type '%s'"
 msgstr ""
 
-#: src/main/coerce.c:1157
+#: src/main/coerce.c:1143
 #, c-format
 msgid "(symbol) object cannot be coerced to type '%s'"
 msgstr ""
 
-#: src/main/coerce.c:1173 src/main/coerce.c:1485
+#: src/main/coerce.c:1159 src/main/coerce.c:1484
 msgid "no method for coercing this S4 class to a vector"
 msgstr ""
 
-#: src/main/coerce.c:1232
+#: src/main/coerce.c:1222
 msgid "environments cannot be coerced to other types"
 msgstr ""
 
-#: src/main/coerce.c:1379
+#: src/main/coerce.c:1374
 msgid "attempting to coerce non-factor"
 msgstr ""
 
-#: src/main/coerce.c:1533
+#: src/main/coerce.c:1379 src/main/coerce.c:1389
+msgid "malformed factor"
+msgstr ""
+
+#: src/main/coerce.c:1532
 msgid "list argument expected"
 msgstr ""
 
-#: src/main/coerce.c:1541 src/main/eval.c:5322
+#: src/main/coerce.c:1540 src/main/eval.c:6255
 msgid "invalid environment"
 msgstr ""
 
-#: src/main/coerce.c:1545
+#: src/main/coerce.c:1544
 msgid "argument must have length at least 1"
 msgstr ""
 
-#: src/main/coerce.c:1567
+#: src/main/coerce.c:1566
 msgid "invalid body for function"
 msgstr ""
 
-#: src/main/coerce.c:1590
+#: src/main/coerce.c:1589
 msgid "invalid length 0 argument"
 msgstr ""
 
-#: src/main/coerce.c:1605
+#: src/main/coerce.c:1604
 msgid "invalid argument list"
 msgstr ""
 
@@ -1563,772 +1617,766 @@ msgstr ""
 msgid "unimplemented predicate"
 msgstr ""
 
-#: src/main/coerce.c:2069
+#: src/main/coerce.c:2070
 #, c-format
 msgid "%s() applied to non-(list or vector) of type '%s'"
 msgstr ""
 
-#: src/main/coerce.c:2212 src/main/coerce.c:2275 src/main/coerce.c:2343
+#: src/main/coerce.c:2267 src/main/coerce.c:2331 src/main/coerce.c:2403
 #, c-format
 msgid "default method not implemented for type '%s'"
 msgstr ""
 
-#: src/main/coerce.c:2361
+#: src/main/coerce.c:2425
 msgid "'name' is missing"
 msgstr ""
 
-#: src/main/coerce.c:2368
+#: src/main/coerce.c:2432
 msgid "first argument must be a character string"
 msgstr ""
 
-#: src/main/coerce.c:2401
-msgid "'what' must be a character string or a function"
+#: src/main/coerce.c:2464
+msgid "'what' must be a function or character string"
 msgstr ""
 
-#: src/main/coerce.c:2405
+#: src/main/coerce.c:2468
 msgid "'args' must be a list or expression"
 msgstr ""
 
-#: src/main/coerce.c:2408
-msgid "'args' must be a list"
-msgstr ""
-
-#: src/main/coerce.c:2412
+#: src/main/coerce.c:2475 src/main/unique.c:1345
 msgid "'envir' must be an environment"
 msgstr ""
 
-#: src/main/coerce.c:2567
+#: src/main/coerce.c:2634
 msgid "invalid environment specified"
 msgstr ""
 
-#: src/main/coerce.c:2633
+#: src/main/coerce.c:2700
 msgid "Setting class(x) to NULL;   result will no longer be an S4 object"
 msgstr ""
 
-#: src/main/coerce.c:2636
+#: src/main/coerce.c:2703
 #, c-format
 msgid ""
 "Setting class(x) to multiple strings (\"%s\", \"%s\", ...); result will no "
 "longer be an S4 object"
 msgstr ""
 
-#: src/main/coerce.c:2640
+#: src/main/coerce.c:2707
 #, c-format
 msgid ""
 "Setting class(x) to \"%s\" sets attribute to NULL; result will no longer be "
 "an S4 object"
 msgstr ""
 
-#: src/main/coerce.c:2673
+#: src/main/coerce.c:2740
 msgid "invalid replacement object to be a class string"
 msgstr ""
 
-#: src/main/coerce.c:2694
+#: src/main/coerce.c:2761
 #, c-format
 msgid ""
 "\"%s\" can only be set as the class if the object has this type; found \"%s\""
 msgstr ""
 
-#: src/main/coerce.c:2712
+#: src/main/coerce.c:2779
 #, c-format
 msgid ""
 "invalid to set the class to matrix unless the dimension attribute is of "
 "length 2 (was %d)"
 msgstr ""
 
-#: src/main/coerce.c:2720
+#: src/main/coerce.c:2787
 msgid ""
 "cannot set class to \"array\" unless the dimension attribute has length > 0"
 msgstr ""
 
-#: src/main/coerce.c:2756
+#: src/main/coerce.c:2823
 msgid "'value' must be non-null character string"
 msgstr ""
 
-#: src/main/coerce.c:2769
+#: src/main/coerce.c:2836
 msgid "invalid to change the storage mode of a factor"
 msgstr ""
 
-#: src/main/complex.c:126
+#: src/main/complex.c:123
 msgid "invalid complex unary operator"
 msgstr ""
 
-#: src/main/complex.c:261
+#: src/main/complex.c:251
 msgid "unimplemented complex operation"
 msgstr ""
 
-#: src/main/complex.c:363
+#: src/main/complex.c:353
 msgid "non-numeric argument to function"
 msgstr ""
 
-#: src/main/complex.c:827
+#: src/main/complex.c:822
 msgid "invalid polynomial coefficient"
 msgstr ""
 
-#: src/main/complex.c:832
+#: src/main/complex.c:827
 msgid "root finding code failed"
 msgstr ""
 
-#: src/main/connections.c:153
+#: src/main/connections.c:150
 msgid "all connections are in use"
 msgstr ""
 
-#: src/main/connections.c:164
+#: src/main/connections.c:161
 msgid "connection not found"
 msgstr ""
 
-#: src/main/connections.c:175
+#: src/main/connections.c:172 src/main/connections.c:5213
 msgid "invalid connection"
 msgstr ""
 
-#: src/main/connections.c:207
+#: src/main/connections.c:204
 #, c-format
 msgid "closing unused connection %d (%s)\n"
 msgstr ""
 
-#: src/main/connections.c:232 src/main/sysutils.c:619 src/main/sysutils.c:806
-#: src/main/sysutils.c:821 src/main/sysutils.c:912 src/main/sysutils.c:927
-#: src/main/sysutils.c:1023 src/main/sysutils.c:1096 src/main/sysutils.c:1106
-#: src/main/sysutils.c:1119 src/main/sysutils.c:1516
+#: src/main/connections.c:229 src/main/sysutils.c:631 src/main/sysutils.c:834
+#: src/main/sysutils.c:849 src/main/sysutils.c:978 src/main/sysutils.c:1051
+#: src/main/sysutils.c:1061 src/main/sysutils.c:1074 src/main/sysutils.c:1472
 #, c-format
 msgid "unsupported conversion from '%s' to '%s'"
 msgstr ""
 
-#: src/main/connections.c:288 src/main/connections.c:304
-#: src/main/connections.c:456 src/main/connections.c:462
-#: src/main/connections.c:468 src/main/connections.c:479
-#: src/main/connections.c:486
+#: src/main/connections.c:285 src/main/connections.c:300
+#: src/main/connections.c:451 src/main/connections.c:456
+#: src/main/connections.c:461 src/main/connections.c:472
+#: src/main/connections.c:478
 #, c-format
 msgid "%s not enabled for this connection"
 msgstr ""
 
-#: src/main/connections.c:335 src/main/connections.c:352
-#: src/main/connections.c:2916
+#: src/main/connections.c:330 src/main/connections.c:347
+#: src/main/connections.c:2910
 msgid "printing of extremely long output is truncated"
 msgstr ""
 
-#: src/main/connections.c:375
+#: src/main/connections.c:370
 msgid "invalid char string in output conversion"
 msgstr ""
 
-#: src/main/connections.c:439
+#: src/main/connections.c:434
 #, c-format
 msgid "invalid input found on input connection '%s'"
 msgstr ""
 
-#: src/main/connections.c:580
+#: src/main/connections.c:571
 #, c-format
 msgid "cannot open file '%ls': %s"
 msgstr ""
 
-#: src/main/connections.c:691
+#: src/main/connections.c:683
 msgid "connection is not open for reading"
 msgstr ""
 
-#: src/main/connections.c:696
+#: src/main/connections.c:688
 msgid "connection is not open for writing"
 msgstr ""
 
-#: src/main/connections.c:734 src/main/connections.c:2229
+#: src/main/connections.c:726 src/main/connections.c:2223
 msgid "can only truncate connections open for writing"
 msgstr ""
 
-#: src/main/connections.c:738 src/main/connections.c:740
+#: src/main/connections.c:730 src/main/connections.c:732
 msgid "file truncation failed"
 msgstr ""
 
-#: src/main/connections.c:742
+#: src/main/connections.c:734
 msgid "file truncation unavailable on this platform"
 msgstr ""
 
-#: src/main/connections.c:788 src/main/connections.c:792
-#: src/main/connections.c:798 src/main/connections.c:815
+#: src/main/connections.c:780 src/main/connections.c:784
+#: src/main/connections.c:790 src/main/connections.c:807
 msgid "allocation of file connection failed"
 msgstr ""
 
-#: src/main/connections.c:866 src/main/connections.c:1044
+#: src/main/connections.c:858 src/main/connections.c:1035
 #, c-format
 msgid "cannot create fifo '%s', reason '%s'"
 msgstr ""
 
-#: src/main/connections.c:872
+#: src/main/connections.c:864
 #, c-format
 msgid "'%s' exists but is not a fifo"
 msgstr ""
 
-#: src/main/connections.c:886
+#: src/main/connections.c:878
 #, c-format
 msgid "fifo '%s' is not ready"
 msgstr ""
 
-#: src/main/connections.c:887
+#: src/main/connections.c:879
 #, c-format
 msgid "cannot open fifo '%s'"
 msgstr ""
 
-#: src/main/connections.c:928 src/main/connections.c:939
-#: src/main/connections.c:1104 src/main/connections.c:1123
-#: src/main/connections.c:1531 src/main/connections.c:1541
-#: src/main/connections.c:1660 src/main/connections.c:1720
-#: src/main/connections.c:2246 src/main/connections.c:2263
-#: src/main/connections.c:2572 src/main/connections.c:5305
-#: src/main/connections.c:5369
+#: src/main/connections.c:920 src/main/connections.c:931
+#: src/main/connections.c:1095 src/main/connections.c:1114
+#: src/main/connections.c:1524 src/main/connections.c:1534
+#: src/main/connections.c:1653 src/main/connections.c:1713
+#: src/main/connections.c:2240 src/main/connections.c:2257
+#: src/main/connections.c:2566 src/main/connections.c:5385
+#: src/main/connections.c:5449
 msgid "too large a block specified"
 msgstr ""
 
-#: src/main/connections.c:998 src/main/connections.c:1004
+#: src/main/connections.c:989 src/main/connections.c:995
 msgid "allocation of fifo name failed"
 msgstr ""
 
-#: src/main/connections.c:1066
+#: src/main/connections.c:1057
 #, c-format
 msgid "cannot open fifo '%s', reason '%s'"
 msgstr ""
 
-#: src/main/connections.c:1107 src/main/connections.c:1131
+#: src/main/connections.c:1098 src/main/connections.c:1122
 msgid "allocation of fifo buffer failed"
 msgstr ""
 
-#: src/main/connections.c:1139
+#: src/main/connections.c:1130
 #, c-format
 msgid "cannot write FIFO '%s'"
 msgstr ""
 
-#: src/main/connections.c:1175 src/main/connections.c:1179
-#: src/main/connections.c:1185 src/main/connections.c:1201
+#: src/main/connections.c:1166 src/main/connections.c:1170
+#: src/main/connections.c:1176 src/main/connections.c:1192
 msgid "allocation of fifo connection failed"
 msgstr ""
 
-#: src/main/connections.c:1219 src/main/connections.c:1377
-#: src/main/connections.c:1998 src/main/connections.c:3212
-#: src/main/connections.c:4967
+#: src/main/connections.c:1210 src/main/connections.c:1369
+#: src/main/connections.c:1991 src/main/connections.c:3205
+#: src/main/connections.c:4982
 msgid "only first element of 'description' argument used"
 msgstr ""
 
-#: src/main/connections.c:1236
+#: src/main/connections.c:1227
 msgid ""
 "fifo(\"\") only supports open = \"w+\" and open = \"w+b\": using the former"
 msgstr ""
 
-#: src/main/connections.c:1250 src/main/connections.c:1414
-#: src/main/connections.c:2064 src/main/connections.c:3179
-#: src/main/connections.c:3232 src/main/connections.c:3280
-#: src/main/connections.c:3567 src/main/connections.c:3683
-#: src/main/connections.c:3844 src/main/connections.c:4095
-#: src/main/connections.c:4423 src/main/connections.c:4543
-#: src/main/connections.c:4755 src/main/connections.c:5105 src/main/dcf.c:94
-#: src/main/deparse.c:352 src/main/deparse.c:438 src/main/saveload.c:2267
-#: src/main/saveload.c:2350 src/main/scan.c:933 src/main/serialize.c:2175
-#: src/main/serialize.c:2226 src/main/source.c:265
+#: src/main/connections.c:1242 src/main/connections.c:1407
+#: src/main/connections.c:2058 src/main/connections.c:3175
+#: src/main/connections.c:3226 src/main/connections.c:3274
+#: src/main/connections.c:3563 src/main/connections.c:3679
+#: src/main/connections.c:3841 src/main/connections.c:4106
+#: src/main/connections.c:4434 src/main/connections.c:4554
+#: src/main/connections.c:4768 src/main/connections.c:5180 src/main/dcf.c:93
+#: src/main/deparse.c:361 src/main/deparse.c:450 src/main/saveload.c:2269
+#: src/main/saveload.c:2350 src/main/scan.c:933 src/main/serialize.c:2216
+#: src/main/serialize.c:2267 src/main/source.c:270
 msgid "cannot open the connection"
 msgstr ""
 
-#: src/main/connections.c:1265
+#: src/main/connections.c:1257
 msgid "fifo connections are not available on this system"
 msgstr ""
 
-#: src/main/connections.c:1295
+#: src/main/connections.c:1287
 #, c-format
 msgid "cannot pipe() cmd '%ls': %s"
 msgstr ""
 
-#: src/main/connections.c:1302
+#: src/main/connections.c:1294
 #, c-format
 msgid "cannot open pipe() cmd '%s': %s"
 msgstr ""
 
-#: src/main/connections.c:1471 src/main/connections.c:1791
+#: src/main/connections.c:1464 src/main/connections.c:1784
 #, c-format
 msgid "cannot open compressed file '%s', probable reason '%s'"
 msgstr ""
 
-#: src/main/connections.c:1511
+#: src/main/connections.c:1504
 msgid "whence = \"end\" is not implemented for gzfile connections"
 msgstr ""
 
-#: src/main/connections.c:1516
+#: src/main/connections.c:1509
 msgid "seek on a gzfile connection returned an internal error"
 msgstr ""
 
-#: src/main/connections.c:1550 src/main/connections.c:1554
-#: src/main/connections.c:1560 src/main/connections.c:1577
+#: src/main/connections.c:1543 src/main/connections.c:1547
+#: src/main/connections.c:1553 src/main/connections.c:1570
 msgid "allocation of gzfile connection failed"
 msgstr ""
 
-#: src/main/connections.c:1606
+#: src/main/connections.c:1599
 #, c-format
 msgid "cannot open bzip2-ed file '%s', probable reason '%s'"
 msgstr ""
 
-#: src/main/connections.c:1615
+#: src/main/connections.c:1608
 #, c-format
 msgid "file '%s' appears not to be compressed by bzip2"
 msgstr ""
 
-#: src/main/connections.c:1624
+#: src/main/connections.c:1617
 #, c-format
 msgid "initializing bzip2 compression for file '%s' failed"
 msgstr ""
 
-#: src/main/connections.c:1678
+#: src/main/connections.c:1671
 msgid "allocation of overflow buffer for bzfile failed"
 msgstr ""
 
-#: src/main/connections.c:1685
+#: src/main/connections.c:1678
 #, c-format
 msgid ""
 "file '%s' has trailing content that appears not to be compressed by bzip2"
 msgstr ""
 
-#: src/main/connections.c:1731 src/main/connections.c:1735
-#: src/main/connections.c:1741 src/main/connections.c:1758
+#: src/main/connections.c:1724 src/main/connections.c:1728
+#: src/main/connections.c:1734 src/main/connections.c:1751
 msgid "allocation of bzfile connection failed"
 msgstr ""
 
-#: src/main/connections.c:1804 src/main/connections.c:5961
+#: src/main/connections.c:1797 src/main/connections.c:6046
 #, c-format
 msgid "cannot initialize lzma decoder, error %d"
 msgstr ""
 
-#: src/main/connections.c:1820
+#: src/main/connections.c:1813
 #, c-format
 msgid "cannot initialize lzma encoder, error %d"
 msgstr ""
 
-#: src/main/connections.c:1948 src/main/connections.c:1952
-#: src/main/connections.c:1958 src/main/connections.c:1976
+#: src/main/connections.c:1941 src/main/connections.c:1945
+#: src/main/connections.c:1951 src/main/connections.c:1969
 msgid "allocation of xzfile connection failed"
 msgstr ""
 
-#: src/main/connections.c:2035
+#: src/main/connections.c:2028
 #, c-format
 msgid "this is a %s-compressed file which this build of R does not support"
 msgstr ""
 
-#: src/main/connections.c:2130 src/modules/X11/devX11.c:3375
+#: src/main/connections.c:2124 src/modules/X11/devX11.c:3381
 msgid "memory allocation to copy clipboard failed"
 msgstr ""
 
-#: src/main/connections.c:2135 src/modules/X11/devX11.c:3354
-#: src/modules/X11/devX11.c:3359
+#: src/main/connections.c:2129 src/modules/X11/devX11.c:3360
+#: src/modules/X11/devX11.c:3365
 msgid "clipboard cannot be opened or contains no text"
 msgstr ""
 
-#: src/main/connections.c:2146
+#: src/main/connections.c:2140
 msgid "memory allocation to open clipboard failed"
 msgstr ""
 
-#: src/main/connections.c:2174
+#: src/main/connections.c:2168
 msgid "unable to open the clipboard"
 msgstr ""
 
-#: src/main/connections.c:2178
+#: src/main/connections.c:2172
 msgid "unable to write to the clipboard"
 msgstr ""
 
-#: src/main/connections.c:2218
+#: src/main/connections.c:2212
 msgid "attempt to seek outside the range of the clipboard"
 msgstr ""
 
-#: src/main/connections.c:2261
+#: src/main/connections.c:2255
 msgid "clipboard connection is open for reading only"
 msgstr ""
 
-#: src/main/connections.c:2281
+#: src/main/connections.c:2275
 msgid "clipboard buffer is full and output lost"
 msgstr ""
 
-#: src/main/connections.c:2302
+#: src/main/connections.c:2296
 msgid "'mode' for the clipboard must be 'r' or 'w'"
 msgstr ""
 
-#: src/main/connections.c:2305
+#: src/main/connections.c:2299
 msgid "'mode' for the clipboard must be 'r' on Unix"
 msgstr ""
 
-#: src/main/connections.c:2308 src/main/connections.c:2314
-#: src/main/connections.c:2320 src/main/connections.c:2337
+#: src/main/connections.c:2302 src/main/connections.c:2308
+#: src/main/connections.c:2314 src/main/connections.c:2331
 msgid "allocation of clipboard connection failed"
 msgstr ""
 
-#: src/main/connections.c:2406 src/main/connections.c:2410
-#: src/main/connections.c:2416
+#: src/main/connections.c:2400 src/main/connections.c:2404
+#: src/main/connections.c:2410
 msgid "allocation of terminal connection failed"
 msgstr ""
 
-#: src/main/connections.c:2549
+#: src/main/connections.c:2543
 msgid "attempting to add too many elements to raw vector"
 msgstr ""
 
-#: src/main/connections.c:2601
+#: src/main/connections.c:2595
 msgid "attempt to seek outside the range of the raw connection"
 msgstr ""
 
-#: src/main/connections.c:2612 src/main/connections.c:2616
-#: src/main/connections.c:2622 src/main/connections.c:2648
+#: src/main/connections.c:2606 src/main/connections.c:2610
+#: src/main/connections.c:2616 src/main/connections.c:2642
 msgid "allocation of raw connection failed"
 msgstr ""
 
-#: src/main/connections.c:2701
+#: src/main/connections.c:2695
 msgid "'con' is not a rawConnection"
 msgstr ""
 
-#: src/main/connections.c:2704
+#: src/main/connections.c:2698
 msgid "'con' is not an output rawConnection"
 msgstr ""
 
-#: src/main/connections.c:2742
+#: src/main/connections.c:2736
 msgid "too many characters for text connection"
 msgstr ""
 
-#: src/main/connections.c:2747
+#: src/main/connections.c:2741
 msgid "cannot allocate memory for text connection"
 msgstr ""
 
-#: src/main/connections.c:2796
+#: src/main/connections.c:2790
 msgid "seek is not relevant for text connection"
 msgstr ""
 
-#: src/main/connections.c:2804 src/main/connections.c:2808
-#: src/main/connections.c:2814 src/main/connections.c:2827
-#: src/main/connections.c:3012 src/main/connections.c:3016
-#: src/main/connections.c:3022 src/main/connections.c:3035
-#: src/main/connections.c:3041
+#: src/main/connections.c:2798 src/main/connections.c:2802
+#: src/main/connections.c:2808 src/main/connections.c:2821
+#: src/main/connections.c:3008 src/main/connections.c:3012
+#: src/main/connections.c:3018 src/main/connections.c:3031
+#: src/main/connections.c:3037
 msgid "allocation of text connection failed"
 msgstr ""
 
-#: src/main/connections.c:2989
+#: src/main/connections.c:2983
 msgid "text connection: appending to a non-existent char vector"
 msgstr ""
 
-#: src/main/connections.c:3093
+#: src/main/connections.c:3089
 msgid "unsupported mode"
 msgstr ""
 
-#: src/main/connections.c:3115
+#: src/main/connections.c:3111
 msgid "'con' is not a textConnection"
 msgstr ""
 
-#: src/main/connections.c:3118
+#: src/main/connections.c:3114
 msgid "'con' is not an output textConnection"
 msgstr ""
 
-#: src/main/connections.c:3192
-msgid "sockets are not available on this system"
-msgstr ""
-
-#: src/main/connections.c:3260 src/main/connections.c:3309
-#: src/main/connections.c:3320 src/main/connections.c:3367
-#: src/main/connections.c:3392 src/main/connections.c:3415
-#: src/main/connections.c:3427 src/main/connections.c:3543
-#: src/main/connections.c:3668 src/main/connections.c:5408
+#: src/main/connections.c:3254 src/main/connections.c:3303
+#: src/main/connections.c:3314 src/main/connections.c:3361
+#: src/main/connections.c:3388 src/main/connections.c:3411
+#: src/main/connections.c:3423 src/main/connections.c:3539
+#: src/main/connections.c:3664 src/main/connections.c:5489
 msgid "'con' is not a connection"
 msgstr ""
 
-#: src/main/connections.c:3263
+#: src/main/connections.c:3257
 msgid "cannot open standard connections"
 msgstr ""
 
-#: src/main/connections.c:3265
+#: src/main/connections.c:3259
 msgid "connection is already open"
 msgstr ""
 
-#: src/main/connections.c:3298
+#: src/main/connections.c:3292
 msgid "unknown 'rw' value"
 msgstr ""
 
-#: src/main/connections.c:3369
+#: src/main/connections.c:3363
 msgid "cannot close standard connections"
 msgstr ""
 
-#: src/main/connections.c:3372
+#: src/main/connections.c:3366
 msgid "cannot close 'output' sink connection"
 msgstr ""
 
-#: src/main/connections.c:3374
+#: src/main/connections.c:3368
 msgid "cannot close 'message' sink connection"
 msgstr ""
 
-#: src/main/connections.c:3394 src/main/connections.c:5123
-#: src/main/connections.c:5131 src/main/serialize.c:1996
-#: src/main/serialize.c:2004
+#: src/main/connections.c:3390 src/main/connections.c:5198
+#: src/main/connections.c:5206 src/main/serialize.c:2035
+#: src/main/serialize.c:2043
 msgid "connection is not open"
 msgstr ""
 
-#: src/main/connections.c:3490 src/main/connections.c:3502
+#: src/main/connections.c:3486 src/main/connections.c:3498
 msgid "line longer than buffer size"
 msgstr ""
 
-#: src/main/connections.c:3574 src/main/connections.c:3576
-#: src/main/connections.c:3852 src/main/connections.c:4406
-#: src/main/connections.c:4431 src/main/connections.c:5132 src/main/dcf.c:101
-#: src/main/scan.c:936 src/main/scan.c:940 src/main/serialize.c:1998
-#: src/main/source.c:272
+#: src/main/connections.c:3570 src/main/connections.c:3572
+#: src/main/connections.c:3849 src/main/connections.c:4417
+#: src/main/connections.c:4442 src/main/connections.c:5207 src/main/dcf.c:100
+#: src/main/scan.c:936 src/main/scan.c:940 src/main/serialize.c:2037
+#: src/main/source.c:277
 msgid "cannot read from this connection"
 msgstr ""
 
-#: src/main/connections.c:3588 src/main/connections.c:3610
+#: src/main/connections.c:3584 src/main/connections.c:3606
 msgid "cannot allocate buffer in readLines"
 msgstr ""
 
-#: src/main/connections.c:3623
+#: src/main/connections.c:3619
 #, c-format
 msgid "line %d appears to contain an embedded nul"
 msgstr ""
 
-#: src/main/connections.c:3640
+#: src/main/connections.c:3636
 #, c-format
 msgid "incomplete final line found on '%s'"
 msgstr ""
 
-#: src/main/connections.c:3646
+#: src/main/connections.c:3642
 msgid "too few lines read in readLines"
 msgstr ""
 
-#: src/main/connections.c:3749
+#: src/main/connections.c:3746
 msgid "incomplete string at end of file has been discarded"
 msgstr ""
 
-#: src/main/connections.c:3755
+#: src/main/connections.c:3752
 msgid "null terminator not found: breaking string at 10000 bytes"
 msgstr ""
 
-#: src/main/connections.c:3820
+#: src/main/connections.c:3817
 msgid "can only read from a binary connection"
 msgstr ""
 
-#: src/main/connections.c:3869 src/main/connections.c:4176
+#: src/main/connections.c:3866 src/main/connections.c:4187
 msgid "size changing is not supported for complex vectors"
 msgstr ""
 
-#: src/main/connections.c:3907 src/main/connections.c:3925
-#: src/main/connections.c:3951 src/main/connections.c:4010
-#: src/main/connections.c:4030 src/main/connections.c:4157
-#: src/main/connections.c:4170 src/main/connections.c:4229
-#: src/main/connections.c:4261
+#: src/main/connections.c:3905 src/main/connections.c:3923
+#: src/main/connections.c:3949 src/main/connections.c:3993
+#: src/main/connections.c:4024 src/main/connections.c:4044
+#: src/main/connections.c:4168 src/main/connections.c:4181
+#: src/main/connections.c:4240 src/main/connections.c:4272
 #, c-format
 msgid "size %d is unknown on this machine"
 msgstr ""
 
-#: src/main/connections.c:3936
+#: src/main/connections.c:3934
 msgid "raw is always of size 1"
 msgstr ""
 
-#: src/main/connections.c:3959
+#: src/main/connections.c:3957
 msgid "'signed = FALSE' is only valid for integers of sizes 1 and 2"
 msgstr ""
 
-#: src/main/connections.c:4060
+#: src/main/connections.c:4071
 msgid "'x' is not an atomic vector type"
 msgstr ""
 
-#: src/main/connections.c:4066
+#: src/main/connections.c:4077
 msgid "can only write to a binary connection"
 msgstr ""
 
-#: src/main/connections.c:4085
+#: src/main/connections.c:4096
 msgid "only 2^31-1 bytes can be written to a raw vector"
 msgstr ""
 
-#: src/main/connections.c:4087
+#: src/main/connections.c:4098
 msgid "only 2^31-1 bytes can be written in a single writeBin() call"
 msgstr ""
 
-#: src/main/connections.c:4136 src/main/connections.c:4289
-#: src/main/connections.c:4570 src/main/connections.c:4610
+#: src/main/connections.c:4147 src/main/connections.c:4300
+#: src/main/connections.c:4581 src/main/connections.c:4621
 msgid "problem writing to connection"
 msgstr ""
 
-#: src/main/connections.c:4181
+#: src/main/connections.c:4192
 msgid "size changing is not supported for raw vectors"
 msgstr ""
 
-#: src/main/connections.c:4324 src/main/connections.c:4328
-#: src/main/connections.c:4367
+#: src/main/connections.c:4335 src/main/connections.c:4339
+#: src/main/connections.c:4378
 msgid "invalid UTF-8 input in readChar()"
 msgstr ""
 
-#: src/main/connections.c:4434
+#: src/main/connections.c:4445
 msgid "can only read in bytes in a non-UTF-8 MBCS locale"
 msgstr ""
 
-#: src/main/connections.c:4506
+#: src/main/connections.c:4517
 msgid "'object' is too short"
 msgstr ""
 
-#: src/main/connections.c:4559
+#: src/main/connections.c:4570
 msgid "writeChar: more bytes requested than are in the string - will zero-pad"
 msgstr ""
 
-#: src/main/connections.c:4584
+#: src/main/connections.c:4595
 msgid ""
 "writeChar: more characters requested than are in the string - will zero-pad"
 msgstr ""
 
-#: src/main/connections.c:4638
+#: src/main/connections.c:4649
 msgid "maximum number of pushback lines exceeded"
 msgstr ""
 
-#: src/main/connections.c:4644 src/main/connections.c:4648
-#: src/main/connections.c:4685 src/main/connections.c:4693
+#: src/main/connections.c:4655 src/main/connections.c:4659
+#: src/main/connections.c:4696 src/main/connections.c:4704
 msgid "could not allocate space for pushback"
 msgstr ""
 
-#: src/main/connections.c:4676
+#: src/main/connections.c:4687
 msgid "can only push back on open readable connections"
 msgstr ""
 
-#: src/main/connections.c:4678
+#: src/main/connections.c:4689
 msgid "can only push back on text-mode connections"
 msgstr ""
 
-#: src/main/connections.c:4740 src/main/connections.c:4810
+#: src/main/connections.c:4753 src/main/connections.c:4823
 msgid "sink stack is full"
 msgstr ""
 
-#: src/main/connections.c:4743
+#: src/main/connections.c:4756
 msgid "cannot switch output to stdin"
 msgstr ""
 
-#: src/main/connections.c:4770
+#: src/main/connections.c:4783
 msgid "no sink to remove"
 msgstr ""
 
-#: src/main/connections.c:4892
+#: src/main/connections.c:4903
 msgid "there is no connection NA"
 msgstr ""
 
-#: src/main/connections.c:4894
+#: src/main/connections.c:4905
 #, c-format
 msgid "there is no connection %d"
 msgstr ""
 
-#: src/main/connections.c:5029
+#: src/main/connections.c:5039
+msgid "method = \"wininet\" is only supported on Windows"
+msgstr ""
+
+#: src/main/connections.c:5103
 msgid ""
 "file(\"\") only supports open = \"w+\" and open = \"w+b\": using the former"
 msgstr ""
 
-#: src/main/connections.c:5083 src/modules/internet/internet.c:115
-#: src/modules/internet/internet.c:569
-msgid "unsupported URL scheme"
+#: src/main/connections.c:5157
+msgid "URL scheme unsupported by this method"
 msgstr ""
 
-#: src/main/connections.c:5173
+#: src/main/connections.c:5253
 msgid "file stream does not have gzip magic number"
 msgstr ""
 
-#: src/main/connections.c:5184
+#: src/main/connections.c:5264
 msgid "file stream does not have valid gzip header"
 msgstr ""
 
-#: src/main/connections.c:5249
+#: src/main/connections.c:5329
 msgid "writing error whilst flushing 'gzcon' connection"
 msgstr ""
 
-#: src/main/connections.c:5351
+#: src/main/connections.c:5431
 #, c-format
 msgid "crc error %x %x\n"
 msgstr ""
 
-#: src/main/connections.c:5378
+#: src/main/connections.c:5458
 msgid "write error on 'gzcon' connection"
 msgstr ""
 
-#: src/main/connections.c:5412
+#: src/main/connections.c:5493
 msgid "'level' must be one of 0 ... 9"
 msgstr ""
 
-#: src/main/connections.c:5415
+#: src/main/connections.c:5496
 msgid "'allowNonCompression' must be TRUE or FALSE"
 msgstr ""
 
-#: src/main/connections.c:5418
+#: src/main/connections.c:5499
+msgid "'text' must be TRUE or FALSE"
+msgstr ""
+
+#: src/main/connections.c:5502
 msgid "this is already a 'gzcon' connection"
 msgstr ""
 
-#: src/main/connections.c:5424
+#: src/main/connections.c:5508
 msgid "can only use read- or write- binary connections"
 msgstr ""
 
-#: src/main/connections.c:5427
+#: src/main/connections.c:5511
 msgid "using a text-mode 'file' connection may not work correctly"
 msgstr ""
 
-#: src/main/connections.c:5430
+#: src/main/connections.c:5514
 msgid ""
 "cannot create a 'gzcon' connection from a writable textConnection; maybe use "
 "rawConnection"
 msgstr ""
 
-#: src/main/connections.c:5433 src/main/connections.c:5437
-#: src/main/connections.c:5444 src/main/connections.c:5458
+#: src/main/connections.c:5517 src/main/connections.c:5521
+#: src/main/connections.c:5528 src/main/connections.c:5542
 msgid "allocation of 'gzcon' connection failed"
 msgstr ""
 
-#: src/main/connections.c:5644
+#: src/main/connections.c:5729
 msgid "not a list of sockets"
 msgstr ""
 
-#: src/main/connections.c:5649
+#: src/main/connections.c:5734
 msgid "bad write indicators"
 msgstr ""
 
-#: src/main/connections.c:5660
+#: src/main/connections.c:5745
 msgid "not a socket connection"
 msgstr ""
 
-#: src/main/connections.c:5905
+#: src/main/connections.c:5990
 msgid "unknown compression, assuming none"
 msgstr ""
 
-#: src/main/connections.c:6023 src/main/connections.c:6027
-#: src/main/connections.c:6033
+#: src/main/connections.c:6108 src/main/connections.c:6112
+#: src/main/connections.c:6118
 #, c-format
 msgid "allocation of %s connection failed"
 msgstr ""
 
-#: src/main/context.c:282
+#: src/main/context.c:316
 msgid "no loop for break/next, jumping to top level"
 msgstr ""
 
-#: src/main/context.c:290
+#: src/main/context.c:324
 msgid "no function to return from, jumping to top level"
 msgstr ""
 
-#: src/main/context.c:302
+#: src/main/context.c:339
 msgid "target context is not on the stack"
 msgstr ""
 
-#: src/main/context.c:324 src/main/context.c:340 src/main/context.c:407
-#: src/main/context.c:428 src/main/context.c:440 src/main/context.c:452
+#: src/main/context.c:361 src/main/context.c:377 src/main/context.c:444
+#: src/main/context.c:465 src/main/context.c:477 src/main/context.c:489
 msgid "not that many frames on the stack"
 msgstr ""
 
-#: src/main/context.c:357
+#: src/main/context.c:394
 msgid "only positive values of 'n' are allowed"
 msgstr ""
 
-#: src/main/context.c:478
-msgid "no function to restart"
-msgstr ""
-
-#: src/main/context.c:515
+#: src/main/context.c:526
 msgid "number of contexts must be positive"
 msgstr ""
 
-#: src/main/context.c:528
+#: src/main/context.c:539
 msgid "no browser context to query"
 msgstr ""
 
-#: src/main/context.c:546
+#: src/main/context.c:557
 msgid "not that many calls to browser are active"
 msgstr ""
 
-#: src/main/context.c:560
+#: src/main/context.c:571
 msgid "not that many functions on the call stack"
 msgstr ""
 
-#: src/main/context.c:645
+#: src/main/context.c:656
 msgid "internal error in 'do_sys'"
 msgstr ""
 
@@ -2336,37 +2384,37 @@ msgstr ""
 msgid "integer overflow in 'cumsum'; use 'cumsum(as.numeric(.))'"
 msgstr ""
 
-#: src/main/cum.c:178
-msgid "'cummin' not defined for complex numbers"
+#: src/main/cum.c:179
+msgid "'cummax' not defined for complex numbers"
 msgstr ""
 
-#: src/main/cum.c:181
-msgid "'cummax' not defined for complex numbers"
+#: src/main/cum.c:182
+msgid "'cummin' not defined for complex numbers"
 msgstr ""
 
-#: src/main/cum.c:206 src/main/cum.c:230
+#: src/main/cum.c:209 src/main/cum.c:236
 msgid "unknown cumxxx function"
 msgstr ""
 
-#: src/main/datetime.c:548 src/main/datetime.c:556 src/main/datetime.c:570
-#: src/main/datetime.c:575
+#: src/main/datetime.c:554 src/main/datetime.c:562 src/main/datetime.c:576
+#: src/main/datetime.c:581
 msgid "problem with setting timezone"
 msgstr ""
 
-#: src/main/datetime.c:560
+#: src/main/datetime.c:566
 msgid "cannot set timezones on this system"
 msgstr ""
 
-#: src/main/datetime.c:582 src/main/datetime.c:584
+#: src/main/datetime.c:588 src/main/datetime.c:590
 msgid "problem with unsetting timezone"
 msgstr ""
 
-#: src/main/datetime.c:804 src/main/datetime.c:806 src/main/datetime.c:901
-#: src/main/datetime.c:1240 src/main/datetime.c:1242
+#: src/main/datetime.c:810 src/main/datetime.c:812 src/main/datetime.c:908
+#: src/main/datetime.c:1258 src/main/datetime.c:1260
 msgid "zero-length component in non-empty \"POSIXlt\" structure"
 msgstr ""
 
-#: src/main/dcf.c:113 src/main/dcf.c:181 src/main/dcf.c:253
+#: src/main/dcf.c:112 src/main/dcf.c:181 src/main/dcf.c:253
 msgid "could not allocate memory for 'read.dcf'"
 msgstr ""
 
@@ -2380,78 +2428,83 @@ msgstr ""
 msgid "Line starting '%s ...' is malformed!"
 msgstr ""
 
-#: src/main/debug.c:45
-msgid "argument must be a closure"
+#: src/main/debug.c:46 src/main/debug.c:76
+msgid "argument must be a function"
 msgstr ""
 
-#: src/main/debug.c:76
-msgid "argument must be a function"
+#: src/main/debug.c:111
+#, c-format
+msgid "Value for '%s' must be TRUE or FALSE"
 msgstr ""
 
-#: src/main/debug.c:132 src/main/debug.c:166 src/main/debug.c:224
+#: src/main/debug.c:139 src/main/debug.c:167 src/main/debug.c:241
 msgid "argument must not be a function"
 msgstr ""
 
-#: src/main/debug.c:135
+#: src/main/debug.c:142
 msgid "cannot trace NULL"
 msgstr ""
 
-#: src/main/debug.c:139
+#: src/main/debug.c:146
 msgid "'tracemem' is not useful for promise and environment objects"
 msgstr ""
 
-#: src/main/debug.c:142
+#: src/main/debug.c:149
 msgid "'tracemem' is not useful for weak reference or external pointer objects"
 msgstr ""
 
-#: src/main/debug.c:148 src/main/debug.c:171
+#: src/main/debug.c:180 src/main/debug.c:187
 msgid "R was not compiled with support for memory profiling"
 msgstr ""
 
-#: src/main/deparse.c:152 src/main/sprintf.c:213 src/main/sprintf.c:245
+#: src/main/deparse.c:156 src/main/sprintf.c:216 src/main/sprintf.c:248
 msgid "too few arguments"
 msgstr ""
 
-#: src/main/deparse.c:159
+#: src/main/deparse.c:163
 msgid "invalid 'cutoff' value for 'deparse', using default"
 msgstr ""
 
-#: src/main/deparse.c:247
+#: src/main/deparse.c:254
 msgid "deparse of an S4 object will not be source()able"
 msgstr ""
 
-#: src/main/deparse.c:249
+#: src/main/deparse.c:256
 msgid "deparse may be incomplete"
 msgstr ""
 
-#: src/main/deparse.c:251
+#: src/main/deparse.c:258
 msgid "deparse may be not be source()able in R < 2.7.0"
 msgstr ""
 
-#: src/main/deparse.c:369 src/main/deparse.c:461 src/main/deparse.c:467
+#: src/main/deparse.c:350 src/main/deparse.c:400 src/main/source.c:206
+msgid "'file' must be a character string or connection"
+msgstr ""
+
+#: src/main/deparse.c:378 src/main/deparse.c:473 src/main/deparse.c:479
 msgid "wrote too few characters"
 msgstr ""
 
-#: src/main/deparse.c:391
+#: src/main/deparse.c:402
 msgid "character arguments expected"
 msgstr ""
 
-#: src/main/deparse.c:394
+#: src/main/deparse.c:405
 msgid "zero-length argument"
 msgstr ""
 
-#: src/main/deparse.c:401
+#: src/main/deparse.c:412
 msgid "'opts' should be small non-negative integer"
 msgstr ""
 
-#: src/main/deparse.c:411 src/main/envir.c:1764 src/main/envir.c:1846
-#: src/main/eval.c:569 src/main/eval.c:1251 src/main/eval.c:3627
-#: src/main/saveload.c:1978 src/main/saveload.c:2309 src/main/serialize.c:2727
+#: src/main/deparse.c:422 src/main/envir.c:1898 src/main/envir.c:1983
+#: src/main/eval.c:626 src/main/eval.c:1423 src/main/eval.c:4246
+#: src/main/saveload.c:1980 src/main/saveload.c:2312 src/main/serialize.c:2773
 #, c-format
 msgid "object '%s' not found"
 msgstr ""
 
-#: src/main/deparse.c:1519
+#: src/main/deparse.c:1592
 msgid "badly formed function expression"
 msgstr ""
 
@@ -2459,246 +2512,231 @@ msgstr ""
 msgid "the base graphics system is not registered"
 msgstr ""
 
-#: src/main/devices.c:165 src/main/devices.c:172
+#: src/main/devices.c:166 src/main/devices.c:174
 msgid "no active or default device"
 msgstr ""
 
-#: src/main/devices.c:385 src/main/devices.c:447
+#: src/main/devices.c:388 src/main/devices.c:450
 msgid "too many open devices"
 msgstr ""
 
-#: src/main/devices.c:474
+#: src/main/devices.c:491
 msgid "not enough memory to allocate device (in GEcreateDevDesc)"
 msgstr ""
 
-#: src/main/devices.c:515
+#: src/main/devices.c:532
 msgid "Hit <Return> to see next plot: "
 msgstr ""
 
-#: src/main/dotcode.c:112 src/main/dotcode.c:142
+#: src/main/dotcode.c:127 src/main/dotcode.c:157
 msgid "NULL value passed as symbol address"
 msgstr ""
 
-#: src/main/dotcode.c:133
+#: src/main/dotcode.c:148
 #, c-format
 msgid "Unimplemented type %d in createRSymbolObject"
 msgstr ""
 
-#: src/main/dotcode.c:147 src/main/dotcode.c:237
+#: src/main/dotcode.c:162 src/main/dotcode.c:260
 #, c-format
 msgid "symbol '%s' is too long"
 msgstr ""
 
-#: src/main/dotcode.c:159
+#: src/main/dotcode.c:174
 msgid ""
 "first argument must be a string (of length 1) or native symbol reference"
 msgstr ""
 
-#: src/main/dotcode.c:201 src/main/dotcode.c:563
+#: src/main/dotcode.c:224 src/main/dotcode.c:1240
 msgid "too many arguments in foreign function call"
 msgstr ""
 
-#: src/main/dotcode.c:213
+#: src/main/dotcode.c:236
 msgid "PACKAGE = \"\" is invalid"
 msgstr ""
 
-#: src/main/dotcode.c:269 src/main/dotcode.c:274 src/main/dotcode.c:279
-#: src/main/dotcode.c:284
+#: src/main/dotcode.c:292 src/main/dotcode.c:297 src/main/dotcode.c:302
+#: src/main/dotcode.c:307
 #, c-format
 msgid "\"%s\" not available for %s() for package \"%s\""
 msgstr ""
 
-#: src/main/dotcode.c:289
+#: src/main/dotcode.c:312
 #, c-format
 msgid "%s symbol name \"%s\" not in DLL for package \"%s\""
 msgstr ""
 
-#: src/main/dotcode.c:294
+#: src/main/dotcode.c:317
 #, c-format
 msgid "%s symbol name \"%s\" not in load table"
 msgstr ""
 
-#: src/main/dotcode.c:348 src/main/dotcode.c:352 src/main/dotcode.c:362
-#: src/main/dotcode.c:427 src/main/dotcode.c:434
+#: src/main/dotcode.c:368 src/main/dotcode.c:370 src/main/dotcode.c:380
+#: src/main/dotcode.c:445 src/main/dotcode.c:452
 #, c-format
 msgid "'%s' used more than once"
 msgstr ""
 
-#: src/main/dotcode.c:358
+#: src/main/dotcode.c:376
 msgid "DLL name is too long"
 msgstr ""
 
-#: src/main/dotcode.c:403
+#: src/main/dotcode.c:421
 msgid "PACKAGE argument must be a single character string"
 msgstr ""
 
-#: src/main/dotcode.c:409
+#: src/main/dotcode.c:427
 msgid "PACKAGE argument is too long"
 msgstr ""
 
-#: src/main/dotcode.c:474
+#: src/main/dotcode.c:492
 msgid "no arguments supplied"
 msgstr ""
 
-#: src/main/dotcode.c:475 src/main/seq.c:913
+#: src/main/dotcode.c:493 src/main/seq.c:911
 msgid "too many arguments"
 msgstr ""
 
-#: src/main/dotcode.c:512 src/main/dotcode.c:554 src/main/dotcode.c:1397
+#: src/main/dotcode.c:530 src/main/dotcode.c:1232 src/main/dotcode.c:1420
 msgid "'.NAME' is missing"
 msgstr ""
 
-#: src/main/dotcode.c:521 src/main/dotcode.c:570 src/main/dotcode.c:1418
+#: src/main/dotcode.c:539 src/main/dotcode.c:1247 src/main/dotcode.c:1441
 #, c-format
 msgid "Incorrect number of arguments (%d), expecting %d for '%s'"
 msgstr ""
 
-#: src/main/dotcode.c:1227 src/main/dotcode.c:2276
+#: src/main/dotcode.c:1216 src/main/dotcode.c:2290
 msgid "too many arguments, sorry"
 msgstr ""
 
-#: src/main/dotcode.c:1261 src/main/dotcode.c:1278 src/main/engine.c:2993
+#: src/main/dotcode.c:1284 src/main/dotcode.c:1301 src/main/engine.c:3013
 msgid "invalid graphics state"
 msgstr ""
 
-#: src/main/dotcode.c:1357
+#: src/main/dotcode.c:1380
 msgid "NULL value for DLLInfoReference when looking for DLL"
 msgstr ""
 
-#: src/main/dotcode.c:1458
+#: src/main/dotcode.c:1481
 #, c-format
 msgid "wrong type for argument %d in call to %s"
 msgstr ""
 
-#: src/main/dotcode.c:1470
-#, c-format
-msgid ""
-"explicit request not to duplicate arguments in call to '%s', but argument %d "
-"is of the wrong type (%d != %d)"
-msgstr ""
-
-#: src/main/dotcode.c:1493
+#: src/main/dotcode.c:1510
 #, c-format
 msgid "long vectors (argument %d) are not supported in %s"
 msgstr ""
 
-#: src/main/dotcode.c:1524
+#: src/main/dotcode.c:1541
 #, c-format
 msgid "NAs in foreign function call (arg %d)"
 msgstr ""
 
-#: src/main/dotcode.c:1547
+#: src/main/dotcode.c:1564
 #, c-format
 msgid "NA/NaN/Inf in foreign function call (arg %d)"
 msgstr ""
 
-#: src/main/dotcode.c:1552
-msgid "single values not returned if not duplicated"
-msgstr ""
-
-#: src/main/dotcode.c:1578
+#: src/main/dotcode.c:1594
 #, c-format
 msgid "complex NA/NaN/Inf in foreign function call (arg %d)"
 msgstr ""
 
-#: src/main/dotcode.c:1597
-msgid "character variables must be duplicated in .C/.Fortran"
-msgstr ""
-
-#: src/main/dotcode.c:1602
+#: src/main/dotcode.c:1616
 msgid "only first string in char vector used in .Fortran"
 msgstr ""
 
-#: src/main/dotcode.c:1645 src/main/dotcode.c:1661 src/main/dotcode.c:1672
+#: src/main/dotcode.c:1659 src/main/dotcode.c:1675 src/main/dotcode.c:1686
 #, c-format
 msgid "invalid mode (%s) to pass to Fortran (arg %d)"
 msgstr ""
 
-#: src/main/dotcode.c:1666
+#: src/main/dotcode.c:1680
 #, c-format
 msgid "invalid mode (%s) to pass to C or Fortran (arg %d)"
 msgstr ""
 
-#: src/main/dotcode.c:1677
+#: src/main/dotcode.c:1691
 msgid "pairlists are passed as SEXP as from R 2.15.0"
 msgstr ""
 
-#: src/main/dotcode.c:2499
+#: src/main/dotcode.c:2510
 #, c-format
 msgid "type \"%s\" not supported in interlanguage calls"
 msgstr ""
 
-#: src/main/dotcode.c:2604
+#: src/main/dotcode.c:2615
 #, c-format
 msgid "mode '%s' is not supported in call_R"
 msgstr ""
 
-#: src/main/dounzip.c:171
+#: src/main/dounzip.c:172
 #, c-format
 msgid " not overwriting file '%s"
 msgstr ""
 
-#: src/main/dounzip.c:256
+#: src/main/dounzip.c:257
 #, c-format
 msgid "zip file '%s' cannot be opened"
 msgstr ""
 
-#: src/main/dounzip.c:312
+#: src/main/dounzip.c:313
 msgid "invalid zip name argument"
 msgstr ""
 
-#: src/main/dounzip.c:315 src/main/dounzip.c:409
+#: src/main/dounzip.c:316 src/main/dounzip.c:410
 msgid "zip path is too long"
 msgstr ""
 
-#: src/main/dounzip.c:332
+#: src/main/dounzip.c:333
 msgid "'exdir' is too long"
 msgstr ""
 
-#: src/main/dounzip.c:335
+#: src/main/dounzip.c:336
 msgid "'exdir' does not exist"
 msgstr ""
 
-#: src/main/dounzip.c:363
+#: src/main/dounzip.c:364
 msgid "requested file not found in the zip file"
 msgstr ""
 
-#: src/main/dounzip.c:366
+#: src/main/dounzip.c:367
 msgid "zip file is corrupt"
 msgstr ""
 
-#: src/main/dounzip.c:369
+#: src/main/dounzip.c:370
 msgid "CRC error in zip file"
 msgstr ""
 
-#: src/main/dounzip.c:376
+#: src/main/dounzip.c:377
 msgid "write error in extracting from zip file"
 msgstr ""
 
-#: src/main/dounzip.c:379
+#: src/main/dounzip.c:380
 #, c-format
 msgid "error %d in extracting from zip file"
 msgstr ""
 
-#: src/main/dounzip.c:404
+#: src/main/dounzip.c:405
 msgid "unz connections can only be opened for reading"
 msgstr ""
 
-#: src/main/dounzip.c:415
+#: src/main/dounzip.c:416
 msgid "invalid description of 'unz' connection"
 msgstr ""
 
-#: src/main/dounzip.c:421
+#: src/main/dounzip.c:422
 #, c-format
 msgid "cannot open zip file '%s'"
 msgstr ""
 
-#: src/main/dounzip.c:425
+#: src/main/dounzip.c:426
 #, c-format
 msgid "cannot locate file '%s' in zip file '%s'"
 msgstr ""
 
-#: src/main/dounzip.c:469
+#: src/main/dounzip.c:470
 msgid "printing not enabled for this connection"
 msgstr ""
 
@@ -2706,8 +2744,8 @@ msgstr ""
 msgid "write not enabled for this connection"
 msgstr ""
 
-#: src/main/dounzip.c:496 src/main/dounzip.c:500 src/main/dounzip.c:506
-#: src/main/dounzip.c:523
+#: src/main/dounzip.c:494 src/main/dounzip.c:498 src/main/dounzip.c:504
+#: src/main/dounzip.c:521
 msgid "allocation of 'unz' connection failed"
 msgstr ""
 
@@ -2723,7 +2761,7 @@ msgstr ""
 msgid "invalid argument to edit()"
 msgstr ""
 
-#: src/main/edit.c:121 src/main/saveload.c:2076
+#: src/main/edit.c:121 src/main/saveload.c:2078
 msgid "unable to open file"
 msgstr ""
 
@@ -2783,12 +2821,12 @@ msgid "no graphics system to unregister"
 msgstr ""
 
 #: src/main/engine.c:443 src/main/engine.c:448 src/main/engine.c:456
-#: src/main/engine.c:463 src/main/engine.c:477 src/modules/X11/devX11.c:1157
+#: src/main/engine.c:463 src/main/engine.c:477 src/modules/X11/devX11.c:1159
 msgid "invalid line end"
 msgstr ""
 
 #: src/main/engine.c:508 src/main/engine.c:513 src/main/engine.c:521
-#: src/main/engine.c:528 src/main/engine.c:542 src/modules/X11/devX11.c:1175
+#: src/main/engine.c:528 src/main/engine.c:542 src/modules/X11/devX11.c:1177
 msgid "invalid line join"
 msgstr ""
 
@@ -2817,82 +2855,96 @@ msgstr ""
 msgid "raster capture is not available for this device"
 msgstr ""
 
-#: src/main/engine.c:1656
+#: src/main/engine.c:1662
 #, c-format
 msgid "font face %d not supported for font family '%s'"
 msgstr ""
 
-#: src/main/engine.c:1972
+#: src/main/engine.c:1978
 msgid "no graphics device is active"
 msgstr ""
 
-#: src/main/engine.c:2049
+#: src/main/engine.c:2055
 #, c-format
 msgid "pch value '%d' is invalid in this locale"
 msgstr ""
 
-#: src/main/engine.c:2307
+#: src/main/engine.c:2313
 #, c-format
 msgid "unimplemented pch value '%d'"
 msgstr ""
 
-#: src/main/engine.c:2330
+#: src/main/engine.c:2336
 #, c-format
 msgid "invalid axis extents [GEPretty(.,.,n=%d)"
 msgstr ""
 
-#: src/main/engine.c:2334
+#: src/main/engine.c:2340
 #, c-format
 msgid "infinite axis extents [GEPretty(%g,%g,%d)]"
 msgstr ""
 
-#: src/main/engine.c:2371
+#: src/main/engine.c:2377
 #, c-format
 msgid " .. GEPretty(.): new *lo = %g < %g = x1"
 msgstr ""
 
-#: src/main/engine.c:2373
+#: src/main/engine.c:2379
 #, c-format
 msgid " .. GEPretty(.): new *up = %g > %g = x2"
 msgstr ""
 
-#: src/main/engine.c:2773
+#: src/main/engine.c:2784
 msgid "display list redraw incomplete"
 msgstr ""
 
-#: src/main/engine.c:2777
+#: src/main/engine.c:2788
 msgid "invalid display list"
 msgstr ""
 
-#: src/main/engine.c:2963
+#: src/main/engine.c:2900
+#, c-format
+msgid ""
+"snapshot recorded with different graphics engine version (pre 11 - this is "
+"version %d)"
+msgstr ""
+
+#: src/main/engine.c:2904
+#, c-format
+msgid ""
+"snapshot recorded with different graphics engine version (%d - this is "
+"version %d)"
+msgstr ""
+
+#: src/main/engine.c:2983
 msgid "'expr' argument must be an expression"
 msgstr ""
 
-#: src/main/engine.c:2965
+#: src/main/engine.c:2985
 msgid "'list' argument must be a list"
 msgstr ""
 
-#: src/main/engine.c:2971
+#: src/main/engine.c:2991
 msgid "'env' argument must be an environment"
 msgstr ""
 
-#: src/main/engine.c:3051 src/main/engine.c:3059
+#: src/main/engine.c:3071 src/main/engine.c:3079
 msgid "invalid multibyte char in pch=\"c\""
 msgstr ""
 
-#: src/main/engine.c:3106
+#: src/main/engine.c:3126
 msgid "invalid hex digit in 'color' or 'lty'"
 msgstr ""
 
-#: src/main/engine.c:3129
+#: src/main/engine.c:3149
 msgid "invalid line type: must be length 2, 4, 6 or 8"
 msgstr ""
 
-#: src/main/engine.c:3133
+#: src/main/engine.c:3153
 msgid "invalid line type: zeroes are not allowed"
 msgstr ""
 
-#: src/main/engine.c:3142 src/main/engine.c:3150 src/main/engine.c:3157
+#: src/main/engine.c:3162 src/main/engine.c:3170 src/main/engine.c:3177
 msgid "invalid line type"
 msgstr ""
 
@@ -2901,698 +2953,704 @@ msgstr ""
 msgid "cannot change value of locked binding for '%s'"
 msgstr ""
 
-#: src/main/envir.c:251 src/main/envir.c:1454
+#: src/main/envir.c:251 src/main/envir.c:1530
 msgid "cannot add bindings to a locked environment"
 msgstr ""
 
-#: src/main/envir.c:772
+#: src/main/envir.c:775
 msgid "invalid cached value in R_GetGlobalCache"
 msgstr ""
 
-#: src/main/envir.c:830
+#: src/main/envir.c:836
 msgid "cannot unbind in the base namespace"
 msgstr ""
 
-#: src/main/envir.c:832
+#: src/main/envir.c:838
 msgid "unbind in the base environment is unimplemented"
 msgstr ""
 
-#: src/main/envir.c:834 src/main/envir.c:1684
+#: src/main/envir.c:840 src/main/envir.c:1818
 msgid "cannot remove bindings from a locked environment"
 msgstr ""
 
-#: src/main/envir.c:1139
+#: src/main/envir.c:1213
 #, c-format
 msgid "argument to '%s' is not an environment"
 msgstr ""
 
-#: src/main/envir.c:1300
+#: src/main/envir.c:1374
 #, c-format
 msgid "the ... list does not contain %d elements"
 msgstr ""
 
-#: src/main/envir.c:1302
+#: src/main/envir.c:1376
 #, c-format
 msgid "..%d used in an incorrect context, no ... to look in"
 msgstr ""
 
-#: src/main/envir.c:1390 src/main/envir.c:1842 src/main/eval.c:573
-#: src/main/eval.c:3618
-#, c-format
-msgid "argument \"%s\" is missing, with no default"
-msgstr ""
-
-#: src/main/envir.c:1395
+#: src/main/envir.c:1469
 #, c-format
 msgid "could not find function \"%s\""
 msgstr ""
 
-#: src/main/envir.c:1418
+#: src/main/envir.c:1492
 msgid "cannot assign values in the empty environment"
 msgstr ""
 
-#: src/main/envir.c:1424 src/main/envir.c:1497
+#: src/main/envir.c:1498 src/main/envir.c:1628
 msgid "cannot assign variables to this database"
 msgstr ""
 
-#: src/main/envir.c:1580
+#: src/main/envir.c:1714
 #, c-format
 msgid "cannot add binding of '%s' to the base environment"
 msgstr ""
 
-#: src/main/envir.c:1609
+#: src/main/envir.c:1743
 msgid "only the first element is used as variable name"
 msgstr ""
 
-#: src/main/envir.c:1641
+#: src/main/envir.c:1775
 msgid "first argument must be a named list"
 msgstr ""
 
-#: src/main/envir.c:1646
+#: src/main/envir.c:1780
 msgid "names(x) must be a character vector of the same length as x"
 msgstr ""
 
-#: src/main/envir.c:1649
+#: src/main/envir.c:1783
 msgid "'envir' argument must be an environment"
 msgstr ""
 
-#: src/main/envir.c:1678
+#: src/main/envir.c:1812
 msgid "cannot remove variables from base namespace"
 msgstr ""
 
-#: src/main/envir.c:1680
+#: src/main/envir.c:1814
 msgid "cannot remove variables from the base environment"
 msgstr ""
 
-#: src/main/envir.c:1682
+#: src/main/envir.c:1816
 msgid "cannot remove variables from the empty environment"
 msgstr ""
 
-#: src/main/envir.c:1690
+#: src/main/envir.c:1824
 msgid "cannot remove variables from this database"
 msgstr ""
 
-#: src/main/envir.c:1849
+#: src/main/envir.c:1985
 #, c-format
 msgid "object '%s' of mode '%s' was not found"
 msgstr ""
 
-#: src/main/envir.c:1921
+#: src/main/envir.c:2068
 #, c-format
 msgid "invalid name in position %d"
 msgstr ""
 
-#: src/main/envir.c:1927
+#: src/main/envir.c:2074
 msgid "second argument must be an environment"
 msgstr ""
 
-#: src/main/envir.c:1935 src/main/envir.c:1943
+#: src/main/envir.c:2082 src/main/envir.c:2090
 #, c-format
 msgid "wrong length for '%s' argument"
 msgstr ""
 
-#: src/main/envir.c:2062
+#: src/main/envir.c:2221
 msgid "invalid use of 'missing'"
 msgstr ""
 
-#: src/main/envir.c:2087
+#: src/main/envir.c:2247
 msgid "'missing' can only be used for arguments"
 msgstr ""
 
-#: src/main/envir.c:2168
+#: src/main/envir.c:2333
 msgid "'pos' must be an integer"
 msgstr ""
 
-#: src/main/envir.c:2182
+#: src/main/envir.c:2347
 msgid "all elements of a list must be named"
 msgstr ""
 
-#: src/main/envir.c:2205
+#: src/main/envir.c:2370
 msgid "'attach' only works for lists, data frames and environments"
 msgstr ""
 
-#: src/main/envir.c:2288
+#: src/main/envir.c:2453
 msgid "detaching \"package:base\" is not allowed"
 msgstr ""
 
-#: src/main/envir.c:2589 src/main/envir.c:2644
+#: src/main/envir.c:2798 src/main/envir.c:2879
 msgid "argument must be an environment"
 msgstr ""
 
-#: src/main/envir.c:2648
+#: src/main/envir.c:2883
 msgid "arguments must be symbolic"
 msgstr ""
 
-#: src/main/envir.c:2772
+#: src/main/envir.c:3032
 msgid "no enclosing environment"
 msgstr ""
 
-#: src/main/envir.c:2825
+#: src/main/envir.c:3085
 #, c-format
 msgid "no item called \"%s\" on the search list"
 msgstr ""
 
-#: src/main/envir.c:2850
+#: src/main/envir.c:3110
 msgid "using 'as.environment(NULL)' is defunct"
 msgstr ""
 
-#: src/main/envir.c:2856
+#: src/main/envir.c:3116
 msgid "S4 object does not extend class \"environment\""
 msgstr ""
 
-#: src/main/envir.c:2871
+#: src/main/envir.c:3131
 msgid "invalid object for 'as.environment'"
 msgstr ""
 
-#: src/main/envir.c:2897 src/main/envir.c:2925 src/main/envir.c:2954
-#: src/main/envir.c:2975 src/main/envir.c:2998 src/main/envir.c:3033
-#: src/main/envir.c:3054
+#: src/main/envir.c:3157 src/main/envir.c:3185 src/main/envir.c:3214
+#: src/main/envir.c:3235 src/main/envir.c:3258 src/main/envir.c:3293
+#: src/main/envir.c:3314
 msgid "not an environment"
 msgstr ""
 
-#: src/main/envir.c:2949 src/main/envir.c:2970 src/main/envir.c:2991
-#: src/main/envir.c:3028 src/main/envir.c:3049 src/main/envir.c:3148
+#: src/main/envir.c:3209 src/main/envir.c:3230 src/main/envir.c:3251
+#: src/main/envir.c:3288 src/main/envir.c:3309 src/main/envir.c:3408
 msgid "not a symbol"
 msgstr ""
 
-#: src/main/envir.c:2962 src/main/envir.c:2983 src/main/envir.c:3041
-#: src/main/envir.c:3062
+#: src/main/envir.c:3222 src/main/envir.c:3243 src/main/envir.c:3301
+#: src/main/envir.c:3322
 #, c-format
 msgid "no binding for \"%s\""
 msgstr ""
 
-#: src/main/envir.c:2993
+#: src/main/envir.c:3253
 msgid "not a function"
 msgstr ""
 
-#: src/main/envir.c:3001 src/main/envir.c:3017
+#: src/main/envir.c:3261 src/main/envir.c:3277
 msgid "symbol already has a regular binding"
 msgstr ""
 
-#: src/main/envir.c:3003 src/main/envir.c:3019
+#: src/main/envir.c:3263 src/main/envir.c:3279
 msgid "cannot change active binding if binding is locked"
 msgstr ""
 
-#: src/main/envir.c:3107
+#: src/main/envir.c:3367 src/main/envir.c:3604
 msgid "unknown op"
 msgstr ""
 
-#: src/main/envir.c:3152
+#: src/main/envir.c:3412
 msgid "cannot unbind a locked binding"
 msgstr ""
 
-#: src/main/envir.c:3154
+#: src/main/envir.c:3414
 msgid "cannot unbind an active binding"
 msgstr ""
 
-#: src/main/envir.c:3289
+#: src/main/envir.c:3555
 msgid "bad namespace name"
 msgstr ""
 
-#: src/main/envir.c:3301
+#: src/main/envir.c:3567
 msgid "namespace already registered"
 msgstr ""
 
-#: src/main/envir.c:3313
+#: src/main/envir.c:3579
 msgid "namespace not registered"
 msgstr ""
 
-#: src/main/envir.c:3360
+#: src/main/envir.c:3635
 msgid "bad import environment argument"
 msgstr ""
 
-#: src/main/envir.c:3365
+#: src/main/envir.c:3640
 msgid "bad export environment argument"
 msgstr ""
 
-#: src/main/envir.c:3369
+#: src/main/envir.c:3644
 msgid "length of import and export names must match"
 msgstr ""
 
-#: src/main/envir.c:3392
+#: src/main/envir.c:3667
 #, c-format
 msgid "exported symbol '%s' has no value"
 msgstr ""
 
-#: src/main/envir.c:3557
+#: src/main/envir.c:3833
 #, c-format
 msgid "unknown encoding: %d"
 msgstr ""
 
-#: src/main/envir.c:3577
+#: src/main/envir.c:3853
 #, c-format
 msgid "embedded nul in string: '%s'"
 msgstr ""
 
-#: src/main/errors.c:178 src/main/errors.c:215
+#: src/main/errors.c:163 src/main/errors.c:200
 msgid "interrupts suspended; signal ignored"
 msgstr ""
 
-#: src/main/errors.c:318
+#: src/main/errors.c:250
+msgid "[... truncated]"
+msgstr ""
+
+#: src/main/errors.c:310
 msgid "invalid option \"warning.expression\""
 msgstr ""
 
-#: src/main/errors.c:348
+#: src/main/errors.c:339
 #, c-format
 msgid "(converted from warning) %s"
 msgstr ""
 
-#: src/main/errors.c:359
-#, c-format
-msgid "Warning: %s\n"
+#: src/main/errors.c:349
+msgid "Warning:"
 msgstr ""
 
-#: src/main/errors.c:363
+#: src/main/errors.c:351
 #, c-format
-msgid "Warning in %s : %s\n"
+msgid "Warning in %s :"
 msgstr ""
 
-#: src/main/errors.c:365
-#, c-format
-msgid ""
-"Warning in %s :\n"
-"  %s\n"
+#: src/main/errors.c:360 src/main/errors.c:374 src/main/errors.c:687
+msgid "Calls:"
 msgstr ""
 
-#: src/main/errors.c:428 src/main/errors.c:447 src/main/errors.c:596
+#: src/main/errors.c:421 src/main/errors.c:440 src/main/errors.c:602
 msgid "Lost warning messages\n"
 msgstr ""
 
-#: src/main/errors.c:459
-msgid "Warning message:\n"
-msgid_plural "Warning messages:\n"
+#: src/main/errors.c:452
+msgid "Warning message:"
+msgid_plural "Warning messages:"
 msgstr[0] ""
 msgstr[1] ""
 
-#: src/main/errors.c:514
+#: src/main/errors.c:462 src/main/errors.c:490
 #, c-format
-msgid "There were %d warnings (use warnings() to see them)\n"
+msgid "In %s :"
 msgstr ""
 
-#: src/main/errors.c:517
+#: src/main/errors.c:515
 #, c-format
-msgid "There were %d or more warnings (use warnings() to see the first %d)\n"
+msgid "There was %d warning (use warnings() to see it)"
+msgid_plural "There were %d warnings (use warnings() to see them)"
+msgstr[0] ""
+msgstr[1] ""
+
+#: src/main/errors.c:520
+#, c-format
+msgid "There were %d or more warnings (use warnings() to see the first %d)"
 msgstr ""
 
-#: src/main/errors.c:587
+#: src/main/errors.c:593
 msgid "Error during wrapup: "
 msgstr ""
 
-#: src/main/errors.c:612
+#: src/main/errors.c:618
 msgid "Error in "
 msgstr ""
 
-#: src/main/errors.c:613
+#: src/main/errors.c:640 src/main/errors.c:647
 #, c-format
-msgid " (from %s) : "
+msgid "Error in %s (from %s) : "
 msgstr ""
 
-#: src/main/errors.c:664 src/main/errors.c:670
+#: src/main/errors.c:649
+#, c-format
+msgid "Error in %s : "
+msgstr ""
+
+#: src/main/errors.c:669 src/main/errors.c:675
 #, c-format
 msgid "Error: "
 msgstr ""
 
-#: src/main/errors.c:690 src/main/errors.c:1319
+#: src/main/errors.c:696 src/main/errors.c:1300
 msgid "In addition: "
 msgstr ""
 
-#: src/main/errors.c:811
+#: src/main/errors.c:818
 msgid "invalid option \"error\"\n"
 msgstr ""
 
-#: src/main/errors.c:893
-msgid "Execution halted\n"
-msgstr ""
-
-#: src/main/errors.c:1032
-msgid "'msg1' must be a character string"
-msgstr ""
-
-#: src/main/errors.c:1034
-msgid "'msg2' must be a character string"
+#: src/main/errors.c:1013 src/main/errors.c:1015 src/main/options.c:339
+#: src/main/unique.c:1638
+#, c-format
+msgid "'%s' must be a character string"
 msgstr ""
 
-#: src/main/errors.c:1131
+#: src/main/errors.c:1116
 msgid " [invalid string in stop(.)]"
 msgstr ""
 
-#: src/main/errors.c:1162
+#: src/main/errors.c:1148
 msgid " [invalid string in warning(.)]"
 msgstr ""
 
-#: src/main/errors.c:1178
+#: src/main/errors.c:1164
 #, c-format
 msgid "incorrect number of arguments to \"%s\""
 msgstr ""
 
-#: src/main/errors.c:1184 src/main/errors.c:1199
+#: src/main/errors.c:1170 src/main/errors.c:1185
 #, c-format
 msgid "unimplemented feature in %s"
 msgstr ""
 
-#: src/main/errors.c:1193
+#: src/main/errors.c:1179
 msgid "invalid number of arguments"
 msgstr ""
 
-#: src/main/errors.c:1194 src/main/logic.c:189
+#: src/main/errors.c:1180 src/main/logic.c:181
 msgid "invalid argument type"
 msgstr ""
 
-#: src/main/errors.c:1196
+#: src/main/errors.c:1182
 msgid "time-series/vector length mismatch"
 msgstr ""
 
-#: src/main/errors.c:1197
+#: src/main/errors.c:1183
 msgid "incompatible arguments"
 msgstr ""
 
-#: src/main/errors.c:1200
+#: src/main/errors.c:1186
 msgid "unknown error (report this!)"
 msgstr ""
 
-#: src/main/errors.c:1212
+#: src/main/errors.c:1195
+msgid "inaccurate integer conversion in coercion"
+msgstr ""
+
+#: src/main/errors.c:1198
 msgid "unknown warning (report this!)"
 msgstr ""
 
-#: src/main/errors.c:1283
+#: src/main/errors.c:1269
 msgid "No function to return from, jumping to top level"
 msgstr ""
 
-#: src/main/errors.c:1299
+#: src/main/errors.c:1285
 msgid "top level inconsistency?"
 msgstr ""
 
-#: src/main/errors.c:1478
+#: src/main/errors.c:1459
 msgid "bad handler data"
 msgstr ""
 
-#: src/main/errors.c:1628
+#: src/main/errors.c:1613
 msgid "error message not a string"
 msgstr ""
 
-#: src/main/errors.c:1703
+#: src/main/errors.c:1688
 msgid "handler or restart stack mismatch in old restart"
 msgstr ""
 
-#: src/main/errors.c:1729 src/main/errors.c:1745
+#: src/main/errors.c:1714 src/main/errors.c:1730
 msgid "bad error message"
 msgstr ""
 
-#: src/main/errors.c:1787
+#: src/main/errors.c:1771
 msgid "bad restart"
 msgstr ""
 
-#: src/main/errors.c:1819
+#: src/main/errors.c:1803
 msgid "restart not on stack"
 msgstr ""
 
-#: src/main/errors.c:1836
+#: src/main/errors.c:1819
 msgid "not in a try context"
 msgstr ""
 
-#: src/main/errors.c:1849
+#: src/main/errors.c:1832
 msgid "error message must be a character string"
 msgstr ""
 
-#: src/main/eval.c:308
+#: src/main/eval.c:365
 #, c-format
 msgid "source files skipped by Rprof; please increase '%s'"
 msgstr ""
 
-#: src/main/eval.c:328
+#: src/main/eval.c:385
 #, c-format
 msgid "Rprof: cannot open profile file '%s'"
 msgstr ""
 
-#: src/main/eval.c:422
+#: src/main/eval.c:479
 msgid "R profiling is not available on this system"
 msgstr ""
 
-#: src/main/eval.c:446
+#: src/main/eval.c:503
 msgid ""
 "promise already under evaluation: recursive default argument reference or "
 "earlier problems?"
 msgstr ""
 
-#: src/main/eval.c:448
+#: src/main/eval.c:505
 msgid "restarting interrupted promise evaluation"
 msgstr ""
 
-#: src/main/eval.c:544
+#: src/main/eval.c:601
 msgid ""
 "evaluation nested too deeply: infinite recursion / options(expressions=)?"
 msgstr ""
 
-#: src/main/eval.c:575 src/main/eval.c:3619
+#: src/main/eval.c:632 src/main/eval.c:4238
 msgid "argument is missing, with no default"
 msgstr ""
 
-#: src/main/eval.c:679 src/main/eval.c:4642
+#: src/main/eval.c:736 src/main/eval.c:1306 src/main/eval.c:5533
 msgid "attempt to apply non-function"
 msgstr ""
 
-#: src/main/eval.c:702
+#: src/main/eval.c:759
 #, c-format
 msgid "%s at %s#%d: "
 msgstr ""
 
-#: src/main/eval.c:1178
+#: src/main/eval.c:1298 src/main/eval.c:2271
+#, c-format
+msgid "argument %d is empty"
+msgstr ""
+
+#: src/main/eval.c:1350
 #, c-format
 msgid "could not find symbol \"%s\" in environment of the generic function"
 msgstr ""
 
-#: src/main/eval.c:1196
+#: src/main/eval.c:1368
 #, c-format
 msgid "symbol \"%s\" not in environment of method"
 msgstr ""
 
-#: src/main/eval.c:1308
+#: src/main/eval.c:1481
 msgid "the condition has length > 1 and only the first element will be used"
 msgstr ""
 
-#: src/main/eval.c:1325
+#: src/main/eval.c:1500
 msgid "missing value where TRUE/FALSE needed"
 msgstr ""
 
-#: src/main/eval.c:1326
+#: src/main/eval.c:1501
 msgid "argument is not interpretable as logical"
 msgstr ""
 
-#: src/main/eval.c:1327
+#: src/main/eval.c:1502
 msgid "argument is of length zero"
 msgstr ""
 
-#: src/main/eval.c:1418
+#: src/main/eval.c:1596
 msgid "non-symbol loop variable"
 msgstr ""
 
-#: src/main/eval.c:1510 src/main/eval.c:4408
+#: src/main/eval.c:1687 src/main/eval.c:5301
 msgid "invalid for() loop sequence"
 msgstr ""
 
-#: src/main/eval.c:1652
+#: src/main/eval.c:1826
 msgid "multi-argument returns are not permitted"
 msgstr ""
 
-#: src/main/eval.c:1701
+#: src/main/eval.c:1873
 msgid "invalid (NULL) left side of assignment"
 msgstr ""
 
-#: src/main/eval.c:1734
+#: src/main/eval.c:1907
 msgid "target of assignment expands to non-language object"
 msgstr ""
 
-#: src/main/eval.c:1817
+#: src/main/eval.c:1990
 #, c-format
 msgid "overlong name in '%s'"
 msgstr ""
 
-#: src/main/eval.c:1915
+#: src/main/eval.c:2080
 msgid "cannot do complex assignments in base namespace"
 msgstr ""
 
-#: src/main/eval.c:1917
+#: src/main/eval.c:2082
 msgid "cannot do complex assignments in base environment"
 msgstr ""
 
-#: src/main/eval.c:1954 src/main/eval.c:1981
+#: src/main/eval.c:2121 src/main/eval.c:2148
 msgid "invalid function in complex assignment"
 msgstr ""
 
-#: src/main/eval.c:2041
+#: src/main/eval.c:2208
 msgid "invalid (do_set) left-hand side to assignment"
 msgstr ""
 
-#: src/main/eval.c:2103
-#, c-format
-msgid "argument %d is empty"
-msgstr ""
-
-#: src/main/eval.c:2116
+#: src/main/eval.c:2284
 #, c-format
 msgid "'%s' is missing"
 msgstr ""
 
-#: src/main/eval.c:2267
+#: src/main/eval.c:2439
 msgid "invalid formal argument list for \"function\""
 msgstr ""
 
-#: src/main/eval.c:2325 src/main/eval.c:2356 src/main/eval.c:2361
+#: src/main/eval.c:2497 src/main/eval.c:2528 src/main/eval.c:2533
 #, c-format
 msgid "invalid '%s' argument of type '%s'"
 msgstr ""
 
-#: src/main/eval.c:2353
+#: src/main/eval.c:2525
 msgid "numeric 'envir' arg not of length one"
 msgstr ""
 
-#: src/main/eval.c:2377 src/main/eval.c:2399
+#: src/main/eval.c:2549 src/main/eval.c:2573
 msgid "restarts not supported in 'eval'"
 msgstr ""
 
-#: src/main/eval.c:2456 src/main/eval.c:2469
+#: src/main/eval.c:2632 src/main/eval.c:2645
 msgid "'Recall' called from outside a closure"
 msgstr ""
 
-#: src/main/eval.c:2562
+#: src/main/eval.c:2738
 msgid "value in '...' is not a promise"
 msgstr ""
 
-#: src/main/eval.c:2754 src/main/objects.c:720
-#, c-format
-msgid "call name too long in '%s'"
-msgstr ""
-
-#: src/main/eval.c:2775
-#, c-format
-msgid "generic name too long in '%s'"
-msgstr ""
-
-#: src/main/eval.c:2840
+#: src/main/eval.c:2999
 #, c-format
 msgid "Incompatible methods (\"%s\", \"%s\") for \"%s\""
 msgstr ""
 
-#: src/main/eval.c:2906
+#: src/main/eval.c:3048
 msgid "dispatch error in group dispatch"
 msgstr ""
 
-#: src/main/eval.c:3201
+#: src/main/eval.c:3532
 #, c-format
 msgid "\"%s\" is not a %s function"
 msgstr ""
 
-#: src/main/eval.c:3430
+#: src/main/eval.c:4047
 msgid "node stack overflow"
 msgstr ""
 
-#: src/main/eval.c:3436
+#: src/main/eval.c:4053
 msgid "integer stack overflow"
 msgstr ""
 
-#: src/main/eval.c:3490
+#: src/main/eval.c:4107
 msgid "bad opcode"
 msgstr ""
 
-#: src/main/eval.c:4219
+#: src/main/eval.c:5083
 #, c-format
 msgid "invalid %s type in 'x %s y'"
 msgstr ""
 
-#: src/main/eval.c:4310
+#: src/main/eval.c:5195
 msgid "bytecode version mismatch; using eval"
 msgstr ""
 
-#: src/main/eval.c:4315
+#: src/main/eval.c:5200
 msgid "bytecode version is too old"
 msgstr ""
 
-#: src/main/eval.c:4316
+#: src/main/eval.c:5201
 msgid "bytecode version is too new"
 msgstr ""
 
-#: src/main/eval.c:4350
+#: src/main/eval.c:5235
 msgid "byte code version mismatch"
 msgstr ""
 
-#: src/main/eval.c:4477
+#: src/main/eval.c:5383
 msgid "invalid sequence argument in for loop"
 msgstr ""
 
-#: src/main/eval.c:4624 src/main/names.c:1181
+#: src/main/eval.c:5522 src/main/names.c:1312
 #, c-format
 msgid "there is no .Internal function '%s'"
 msgstr ""
 
-#: src/main/eval.c:4731 src/main/eval.c:5077 src/main/eval.c:5119
+#: src/main/eval.c:5622 src/main/eval.c:5968 src/main/eval.c:6008
 msgid "bad function"
 msgstr ""
 
-#: src/main/eval.c:4746
+#: src/main/eval.c:5635
 msgid "not a BUILTIN function"
 msgstr ""
 
-#: src/main/eval.c:5159
+#: src/main/eval.c:6066
+msgid "bad numeric 'switch' offsets"
+msgstr ""
+
+#: src/main/eval.c:6072
 msgid "numeric EXPR required for 'switch' without named alternatives"
 msgstr ""
 
-#: src/main/eval.c:5255
+#: src/main/eval.c:6076
+msgid "bad character 'switch' offsets"
+msgstr ""
+
+#: src/main/eval.c:6188
 msgid "cannot find index for threaded code address"
 msgstr ""
 
-#: src/main/eval.c:5315
+#: src/main/eval.c:6248
 msgid "invalid body"
 msgstr ""
 
-#: src/main/eval.c:5335
+#: src/main/eval.c:6268
 msgid "invalid symbol"
 msgstr ""
 
-#: src/main/eval.c:5379
+#: src/main/eval.c:6312
 msgid "argument is not a byte code object"
 msgstr ""
 
-#: src/main/eval.c:5400
+#: src/main/eval.c:6334
 msgid "bad file name"
 msgstr ""
 
-#: src/main/eval.c:5404 src/main/eval.c:5425
+#: src/main/eval.c:6338 src/main/eval.c:6359
 msgid "unable to open 'file'"
 msgstr ""
 
-#: src/main/eval.c:5419 src/main/saveload.c:1942
+#: src/main/eval.c:6353 src/main/saveload.c:1944
 msgid "'file' must be non-empty string"
 msgstr ""
 
-#: src/main/eval.c:5421 src/main/saveload.c:1944 src/main/saveload.c:2244
-#: src/main/serialize.c:2149
+#: src/main/eval.c:6355 src/main/saveload.c:1946 src/main/saveload.c:2246
+#: src/main/serialize.c:2189
 msgid "'ascii' must be logical"
 msgstr ""
 
-#: src/main/eval.c:5492 src/main/eval.c:5511 src/main/eval.c:5541
+#: src/main/eval.c:6426 src/main/eval.c:6445 src/main/eval.c:6475
 msgid "constant buffer must be a generic vector"
 msgstr ""
 
-#: src/main/eval.c:5543
+#: src/main/eval.c:6477
 msgid "bad constant count"
 msgstr ""
 
-#: src/main/eval.c:5579
+#: src/main/eval.c:6515
 msgid "profile timer in use"
 msgstr ""
 
-#: src/main/eval.c:5581
+#: src/main/eval.c:6517
 msgid "already byte code profiling"
 msgstr ""
 
-#: src/main/eval.c:5599
+#: src/main/eval.c:6535
 msgid "setting profile timer failed"
 msgstr ""
 
-#: src/main/eval.c:5616
+#: src/main/eval.c:6553
 msgid "not byte code profiling"
 msgstr ""
 
+#: src/main/eval.c:6569 src/main/eval.c:6573 src/main/eval.c:6577
+msgid "byte code profiling is not supported in this build"
+msgstr ""
+
 #: src/main/gevents.c:43
 #, c-format
 msgid "'%s' events not supported in this device"
@@ -3606,26 +3664,26 @@ msgstr ""
 msgid "this graphics device does not support event handling"
 msgstr ""
 
-#: src/main/gevents.c:136
+#: src/main/gevents.c:135
 msgid "invalid prompt"
 msgstr ""
 
-#: src/main/gevents.c:148
+#: src/main/gevents.c:146
 msgid "recursive use of 'getGraphicsEvent' not supported"
 msgstr ""
 
-#: src/main/gevents.c:158
+#: src/main/gevents.c:157
 msgid "no graphics event handlers set"
 msgstr ""
 
-#: src/main/gram.y:222 src/main/gram.y:237 src/main/gram.y:2222
-#: src/main/gram.y:2236
+#: src/main/gram.y:222 src/main/gram.y:237 src/main/gram.y:2245
+#: src/main/gram.y:2259
 #, c-format
 msgid "EOF whilst reading MBCS char at line %d"
 msgstr ""
 
-#: src/main/gram.y:226 src/main/gram.y:234 src/main/gram.y:2226
-#: src/main/gram.y:2233
+#: src/main/gram.y:226 src/main/gram.y:234 src/main/gram.y:2249
+#: src/main/gram.y:2256
 #, c-format
 msgid "invalid multibyte character in parser at line %d"
 msgstr ""
@@ -3640,126 +3698,139 @@ msgstr ""
 msgid "incorrect tag type at line %d"
 msgstr ""
 
-#: src/main/gram.y:1653
+#: src/main/gram.y:1657
 msgid "contextstack overflow"
 msgstr ""
 
-#: src/main/gram.y:1890
-msgid "input"
+#: src/main/gram.y:1907 src/main/gram.y:1913
+#, c-format
+msgid "unexpected input"
 msgstr ""
 
-#: src/main/gram.y:1891
-msgid "end of input"
+#: src/main/gram.y:1910 src/main/main.c:311
+#, c-format
+msgid "unexpected end of input"
 msgstr ""
 
-#: src/main/gram.y:1892
-msgid "string constant"
+#: src/main/gram.y:1916
+#, c-format
+msgid "unexpected string constant"
 msgstr ""
 
-#: src/main/gram.y:1893
-msgid "numeric constant"
+#: src/main/gram.y:1919
+#, c-format
+msgid "unexpected numeric constant"
 msgstr ""
 
-#: src/main/gram.y:1894
-msgid "symbol"
+#: src/main/gram.y:1922
+#, c-format
+msgid "unexpected symbol"
 msgstr ""
 
-#: src/main/gram.y:1895
-msgid "assignment"
+#: src/main/gram.y:1925
+#, c-format
+msgid "unexpected assignment"
 msgstr ""
 
-#: src/main/gram.y:1896
-msgid "end of line"
+#: src/main/gram.y:1928
+#, c-format
+msgid "unexpected end of line"
 msgstr ""
 
-#: src/main/gram.y:1910 src/main/gram.y:1916
+#: src/main/gram.y:1931 src/main/gram.y:1939
 #, c-format
 msgid "unexpected %s"
 msgstr ""
 
-#: src/main/gram.y:1926
+#: src/main/gram.y:1951
 #, c-format
 msgid "repeated formal argument '%s' on line %d"
 msgstr ""
 
-#: src/main/gram.y:2136
+#: src/main/gram.y:2161
 #, c-format
 msgid "integer literal %s contains decimal; using numeric value"
 msgstr ""
 
-#: src/main/gram.y:2140
+#: src/main/gram.y:2164
 #, c-format
 msgid "non-integer value %s qualified with L; using numeric value"
 msgstr ""
 
-#: src/main/gram.y:2153
+#: src/main/gram.y:2176
 #, c-format
 msgid "integer literal %s contains unnecessary decimal point"
 msgstr ""
 
-#: src/main/gram.y:2185
+#: src/main/gram.y:2208
 #, c-format
 msgid "unable to allocate buffer for long string at line %d"
 msgstr ""
 
-#: src/main/gram.y:2338
+#: src/main/gram.y:2347 src/main/gram.y:2370 src/main/gram.y:2407
+#: src/main/gram.y:2443
+#, c-format
+msgid "nul character not allowed (line %d)"
+msgstr ""
+
+#: src/main/gram.y:2363
 #, c-format
 msgid "'\\x' used without hex digits in character string starting \"%s\""
 msgstr ""
 
-#: src/main/gram.y:2352
+#: src/main/gram.y:2379
 #, c-format
 msgid "\\uxxxx sequences not supported inside backticks (line %d)"
 msgstr ""
 
-#: src/main/gram.y:2367
+#: src/main/gram.y:2394
 #, c-format
 msgid "'\\u' used without hex digits in character string starting \"%s\""
 msgstr ""
 
-#: src/main/gram.y:2375
+#: src/main/gram.y:2402
 #, c-format
 msgid "invalid \\u{xxxx} sequence (line %d)"
 msgstr ""
 
-#: src/main/gram.y:2387
+#: src/main/gram.y:2416
 #, c-format
 msgid "\\Uxxxxxxxx sequences not supported inside backticks (line %d)"
 msgstr ""
 
-#: src/main/gram.y:2402
+#: src/main/gram.y:2431
 #, c-format
 msgid "'\\U' used without hex digits in character string starting \"%s\""
 msgstr ""
 
-#: src/main/gram.y:2410
+#: src/main/gram.y:2439
 #, c-format
 msgid "invalid \\U{xxxxxxxx} sequence (line %d)"
 msgstr ""
 
-#: src/main/gram.y:2451
+#: src/main/gram.y:2482
 #, c-format
 msgid "'\\%c' is an unrecognized escape in character string starting \"%s\""
 msgstr ""
 
-#: src/main/gram.y:2510
+#: src/main/gram.y:2546
 msgid "mixing Unicode and octal/hex escapes in a string is not allowed"
 msgstr ""
 
-#: src/main/gram.y:2514
+#: src/main/gram.y:2550
 #, c-format
 msgid ""
 "string at line %d containing Unicode escapes not in this locale\n"
 "is too long (max 10000 chars)"
 msgstr ""
 
-#: src/main/gram.y:3112 src/main/gram.y:3119 src/main/gram.y:3125
-#: src/main/gram.y:3132
+#: src/main/gram.y:3148 src/main/gram.y:3155 src/main/gram.y:3161
+#: src/main/gram.y:3168
 #, c-format
 msgid "contextstack overflow at line %d"
 msgstr ""
 
-#: src/main/gram.y:3227
+#: src/main/gram.y:3263
 #, c-format
 msgid "internal parser error at line %d"
 msgstr ""
@@ -3769,34 +3840,34 @@ msgstr ""
 msgid "relative range of values =%4.0f * EPS, is small (axis %d)"
 msgstr ""
 
-#: src/main/grep.c:93
+#: src/main/grep.c:96
 #, c-format
 msgid "invalid regular expression '%s', reason '%s'"
 msgstr ""
 
-#: src/main/grep.c:95
+#: src/main/grep.c:98
 #, c-format
 msgid "invalid regular expression, reason '%s'"
 msgstr ""
 
-#: src/main/grep.c:220 src/main/grep.c:308 src/main/grep.c:416
-#: src/main/grep.c:883 src/main/grep.c:2473
+#: src/main/grep.c:225 src/main/grep.c:315 src/main/grep.c:426
+#: src/main/grep.c:900 src/main/grep.c:2502
 #, c-format
 msgid "input string %d is invalid UTF-8"
 msgstr ""
 
-#: src/main/grep.c:286 src/main/grep.c:383
+#: src/main/grep.c:292 src/main/grep.c:391
 #, c-format
 msgid "'split' string %d is invalid UTF-8"
 msgstr ""
 
-#: src/main/grep.c:290 src/main/grep.c:387 src/main/grep.c:560
+#: src/main/grep.c:296 src/main/grep.c:395 src/main/grep.c:571
 #, c-format
 msgid "'split' string %d is invalid in this locale"
 msgstr ""
 
-#: src/main/grep.c:395 src/main/grep.c:851 src/main/grep.c:1600
-#: src/main/grep.c:2394
+#: src/main/grep.c:404 src/main/grep.c:867 src/main/grep.c:1621
+#: src/main/grep.c:2419
 #, c-format
 msgid ""
 "PCRE pattern compilation error\n"
@@ -3804,58 +3875,58 @@ msgid ""
 "\tat '%s'\n"
 msgstr ""
 
-#: src/main/grep.c:397
+#: src/main/grep.c:406
 #, c-format
 msgid "invalid split pattern '%s'"
 msgstr ""
 
-#: src/main/grep.c:401 src/main/grep.c:857 src/main/grep.c:1607
-#: src/main/grep.c:2401
+#: src/main/grep.c:410 src/main/grep.c:873 src/main/grep.c:1628
+#: src/main/grep.c:2426
 #, c-format
 msgid ""
 "PCRE pattern study error\n"
 "\t'%s'\n"
 msgstr ""
 
-#: src/main/grep.c:834 src/main/grep.c:2377
+#: src/main/grep.c:849 src/main/grep.c:2401
 msgid "regular expression is invalid UTF-8"
 msgstr ""
 
-#: src/main/grep.c:853 src/main/grep.c:1602 src/main/grep.c:2396
+#: src/main/grep.c:869 src/main/grep.c:1623 src/main/grep.c:2421
 #, c-format
 msgid "invalid regular expression '%s'"
 msgstr ""
 
-#: src/main/grep.c:1264
+#: src/main/grep.c:1282
 msgid "pattern matches an empty string infinitely, returning first match only"
 msgstr ""
 
-#: src/main/grep.c:1575
+#: src/main/grep.c:1595
 msgid "'pattern' is invalid UTF-8"
 msgstr ""
 
-#: src/main/grep.c:1577
+#: src/main/grep.c:1597
 msgid "'replacement' is invalid UTF-8"
 msgstr ""
 
-#: src/main/grep.c:1581
+#: src/main/grep.c:1601
 msgid "'pattern' is invalid in this locale"
 msgstr ""
 
-#: src/main/grep.c:1584
+#: src/main/grep.c:1604
 msgid "'replacement' is invalid in this locale"
 msgstr ""
 
-#: src/main/grep.c:1589
+#: src/main/grep.c:1609
 msgid "zero-length pattern"
 msgstr ""
 
-#: src/main/grep.c:1732 src/main/grep.c:1748 src/main/grep.c:1796
-#: src/main/grep.c:1812 src/main/grep.c:1859 src/main/grep.c:1875
+#: src/main/grep.c:1753 src/main/grep.c:1769 src/main/grep.c:1817
+#: src/main/grep.c:1833 src/main/grep.c:1880 src/main/grep.c:1896
 msgid "result string is too long"
 msgstr ""
 
-#: src/main/grep.c:2411
+#: src/main/grep.c:2436
 #, c-format
 msgid "'pcre_fullinfo' returned '%d' "
 msgstr ""
@@ -3864,31 +3935,26 @@ msgstr ""
 msgid "ignoring non-pairlist attributes"
 msgstr ""
 
-#: src/main/internet.c:92
+#: src/main/internet.c:83
 msgid "internet routines cannot be accessed in module"
 msgstr ""
 
-#: src/main/internet.c:103 src/main/internet.c:141 src/main/internet.c:154
-#: src/main/internet.c:165 src/main/internet.c:176 src/main/internet.c:187
-#: src/main/internet.c:196 src/main/internet.c:207 src/main/internet.c:218
-#: src/main/internet.c:227 src/main/internet.c:237
+#: src/main/internet.c:94 src/main/internet.c:106 src/main/internet.c:119
+#: src/main/internet.c:130 src/main/internet.c:141 src/main/internet.c:152
+#: src/main/internet.c:161 src/main/internet.c:172 src/main/internet.c:183
+#: src/main/internet.c:192 src/main/internet.c:202 src/main/internet.c:318
+#: src/main/internet.c:330 src/main/internet.c:342 src/main/internet.c:354
 msgid "internet routines cannot be loaded"
 msgstr ""
 
-#: src/main/internet.c:118 src/main/memory.c:3434 src/main/memory.c:3444
-#: src/main/memory.c:3456 src/main/memory.c:3470 src/main/memory.c:3487
-#: src/main/memory.c:3505
-msgid "bad value"
-msgstr ""
-
-#: src/main/internet.c:124
-msgid "internet routines were already initialized"
+#: src/main/internet.c:216 src/main/internet.c:230 src/main/internet.c:247
+#: src/main/internet.c:259 src/main/internet.c:273 src/main/internet.c:293
+#: src/main/internet.c:306
+msgid "socket routines cannot be loaded"
 msgstr ""
 
-#: src/main/internet.c:251 src/main/internet.c:265 src/main/internet.c:281
-#: src/main/internet.c:293 src/main/internet.c:307 src/main/internet.c:327
-#: src/main/internet.c:340
-msgid "socket routines cannot be loaded"
+#: src/main/internet.c:242
+msgid "attempt to close invalid socket"
 msgstr ""
 
 #: src/main/lapack.c:39
@@ -3899,42 +3965,38 @@ msgstr ""
 msgid "LAPACK routines cannot be loaded"
 msgstr ""
 
-#: src/main/logic.c:70
-msgid "binary operations require two arguments"
-msgstr ""
-
-#: src/main/logic.c:88 src/main/logic.c:150
+#: src/main/logic.c:80 src/main/logic.c:142
 msgid "operations are possible only for numeric, logical or complex types"
 msgstr ""
 
-#: src/main/logic.c:98
+#: src/main/logic.c:90
 msgid "binary operation on non-conformable arrays"
 msgstr ""
 
-#: src/main/logic.c:124 src/main/relop.c:247
+#: src/main/logic.c:116 src/main/relop.c:241
 msgid "non-conformable time series"
 msgstr ""
 
-#: src/main/logic.c:254
+#: src/main/logic.c:247
 #, c-format
 msgid "'%s' operator requires 2 arguments"
 msgstr ""
 
-#: src/main/logic.c:261
+#: src/main/logic.c:254
 #, c-format
 msgid "invalid 'x' type in 'x %s y'"
 msgstr ""
 
-#: src/main/logic.c:268
+#: src/main/logic.c:261
 #, c-format
 msgid "invalid 'y' type in 'x %s y'"
 msgstr ""
 
-#: src/main/logic.c:341
+#: src/main/logic.c:334
 msgid "Unary operator `!' called with two arguments"
 msgstr ""
 
-#: src/main/logic.c:448
+#: src/main/logic.c:439
 #, c-format
 msgid "coercing argument of type '%s' to logical"
 msgstr ""
@@ -3943,61 +4005,73 @@ msgstr ""
 msgid "dummy - do not translate"
 msgstr ""
 
-#: src/main/main.c:476
+#: src/main/main.c:329
+msgid "error during cleanup\n"
+msgstr ""
+
+#: src/main/main.c:336
+msgid "Execution halted\n"
+msgstr ""
+
+#: src/main/main.c:505
 msgid "Error: segfault from C stack overflow\n"
 msgstr ""
 
-#: src/main/main.c:846
+#: src/main/main.c:888
 msgid "unable to open the base package\n"
 msgstr ""
 
-#: src/main/main.c:924
+#: src/main/main.c:971
 #, c-format
 msgid "unable to restore saved data in %s\n"
 msgstr ""
 
-#: src/main/main.c:971
+#: src/main/main.c:1020
 msgid "During startup - "
 msgstr ""
 
-#: src/main/main.c:1224
+#: src/main/main.c:1036
+msgid "unable to initialize the JIT\n"
+msgstr ""
+
+#: src/main/main.c:1290
 msgid "cannot quit from browser"
 msgstr ""
 
-#: src/main/main.c:1228
+#: src/main/main.c:1294
 msgid "one of \"yes\", \"no\", \"ask\" or \"default\" expected."
 msgstr ""
 
-#: src/main/main.c:1233
+#: src/main/main.c:1299
 msgid "save=\"ask\" in non-interactive use: command-line default will be used"
 msgstr ""
 
-#: src/main/main.c:1241
+#: src/main/main.c:1307
 msgid "unrecognized value of 'save'"
 msgstr ""
 
-#: src/main/main.c:1244
+#: src/main/main.c:1310
 msgid "invalid 'status', 0 assumed"
 msgstr ""
 
-#: src/main/main.c:1249
+#: src/main/main.c:1315
 msgid "invalid 'runLast', FALSE assumed"
 msgstr ""
 
-#: src/main/main.c:1280
+#: src/main/main.c:1346
 msgid "cannot allocate space for toplevel callback element"
 msgstr ""
 
-#: src/main/main.c:1358
+#: src/main/main.c:1424
 msgid "negative index passed to R_removeTaskCallbackByIndex"
 msgstr ""
 
-#: src/main/main.c:1468
+#: src/main/main.c:1534
 #, c-format
 msgid "warning messages from top-level task callback '%s'\n"
 msgstr ""
 
-#: src/main/main.c:1524
+#: src/main/main.c:1591
 msgid "top-level task callback did not return a logical value"
 msgstr ""
 
@@ -4017,226 +4091,223 @@ msgstr ""
 msgid "invalid partial string match"
 msgstr ""
 
-#: src/main/match.c:228 src/main/match.c:268 src/main/objects.c:56
-#: src/main/objects.c:66
+#: src/main/match.c:228 src/main/match.c:266 src/main/objects.c:49
+#: src/main/objects.c:59
 #, c-format
 msgid "formal argument \"%s\" matched by multiple actual arguments"
 msgstr ""
 
-#: src/main/match.c:231 src/main/match.c:266
+#: src/main/match.c:231 src/main/match.c:264
 #, c-format
 msgid "argument %d matches multiple formal arguments"
 msgstr ""
 
-#: src/main/match.c:272
+#: src/main/match.c:270
 #, c-format
 msgid "partial argument match of '%s' to '%s'"
 msgstr ""
 
-#: src/main/match.c:383
+#: src/main/match.c:380
 #, c-format
 msgid "unused argument %s"
 msgid_plural "unused arguments %s"
 msgstr[0] ""
 msgstr[1] ""
 
-#: src/main/memory.c:1232
+#: src/main/memory.c:1234
 msgid "can only weakly reference/finalize reference objects"
 msgstr ""
 
-#: src/main/memory.c:1266
+#: src/main/memory.c:1268
 msgid "finalizer must be a function or NULL"
 msgstr ""
 
-#: src/main/memory.c:1322 src/main/memory.c:1330 src/main/memory.c:1341
+#: src/main/memory.c:1324 src/main/memory.c:1332 src/main/memory.c:1343
 msgid "not a weak reference"
 msgstr ""
 
-#: src/main/memory.c:1472
+#: src/main/memory.c:1474
 msgid "first argument must be environment or external pointer"
 msgstr ""
 
-#: src/main/memory.c:1474
+#: src/main/memory.c:1476
 msgid "second argument must be a function"
 msgstr ""
 
-#: src/main/memory.c:1478
+#: src/main/memory.c:1480
 msgid "third argument must be 'TRUE' or 'FALSE'"
 msgstr ""
 
-#: src/main/memory.c:1970
+#: src/main/memory.c:1979
 msgid "vector memory exhausted (limit reached?)"
 msgstr ""
 
-#: src/main/memory.c:1976
+#: src/main/memory.c:1985
 msgid "cons memory exhausted (limit reached?)"
 msgstr ""
 
-#: src/main/memory.c:1981
+#: src/main/memory.c:1990
 msgid "memory exhausted (limit reached?)"
 msgstr ""
 
-#: src/main/memory.c:2116
+#: src/main/memory.c:2126
 #, c-format
 msgid "cannot allocate memory block of size %0.f Tb"
 msgstr ""
 
-#: src/main/memory.c:2121
+#: src/main/memory.c:2131
 #, c-format
 msgid "cannot allocate memory block of size %0.1f Gb"
 msgstr ""
 
-#: src/main/memory.c:2442
+#: src/main/memory.c:2458
 msgid "vector is too large"
 msgstr ""
 
-#: src/main/memory.c:2445
+#: src/main/memory.c:2461
 msgid "negative length vectors are not allowed"
 msgstr ""
 
-#: src/main/memory.c:2471 src/main/memory.c:2484 src/main/memory.c:2497
-#: src/main/memory.c:2512
+#: src/main/memory.c:2487 src/main/memory.c:2500 src/main/memory.c:2513
+#: src/main/memory.c:2528
 #, c-format
 msgid "cannot allocate vector of length %d"
 msgstr ""
 
-#: src/main/memory.c:2533
+#: src/main/memory.c:2549
 #, c-format
 msgid "invalid type/length (%s/%d) in vector allocation"
 msgstr ""
 
-#: src/main/memory.c:2636
+#: src/main/memory.c:2648
 #, c-format
 msgid "cannot allocate vector of size %0.1f Gb"
 msgstr ""
 
-#: src/main/memory.c:2640
+#: src/main/memory.c:2652
 #, c-format
 msgid "cannot allocate vector of size %0.1f Mb"
 msgstr ""
 
-#: src/main/memory.c:2644
+#: src/main/memory.c:2656
 #, c-format
 msgid "cannot allocate vector of size %0.f Kb"
 msgstr ""
 
-#: src/main/memory.c:3001
+#: src/main/memory.c:3071
 msgid "protect(): protection stack overflow"
 msgstr ""
 
-#: src/main/memory.c:3008
+#: src/main/memory.c:3078
 #, c-format
-msgid "unprotect(): only %d protected items"
-msgstr ""
+msgid "unprotect(): only %d protected item"
+msgid_plural "unprotect(): only %d protected items"
+msgstr[0] ""
+msgstr[1] ""
 
-#: src/main/memory.c:3041
+#: src/main/memory.c:3113
 msgid "unprotect_ptr: pointer not found"
 msgstr ""
 
-#: src/main/memory.c:3079
+#: src/main/memory.c:3151
 #, c-format
-msgid "R_Reprotect: only %d protected items, can't reprotect index %d"
-msgstr ""
+msgid "R_Reprotect: only %d protected item, can't reprotect index %d"
+msgid_plural "R_Reprotect: only %d protected items, can't reprotect index %d"
+msgstr[0] ""
+msgstr[1] ""
 
-#: src/main/memory.c:3129
+#: src/main/memory.c:3203
 #, c-format
 msgid "'Calloc' could not allocate memory (%.0f of %u bytes)"
 msgstr ""
 
-#: src/main/memory.c:3140
+#: src/main/memory.c:3214
 #, c-format
 msgid "'Realloc' could not re-allocate memory (%.0f bytes)"
 msgstr ""
 
-#: src/main/memory.c:3380
+#: src/main/memory.c:3460
 msgid "not safe to return vector pointer"
 msgstr ""
 
-#: src/main/memory.c:3392
+#: src/main/memory.c:3471
 #, c-format
 msgid "attempt to set index %lu/%lu in SET_STRING_ELT"
 msgstr ""
 
-#: src/main/memory.c:3408
+#: src/main/memory.c:3487
 #, c-format
 msgid "attempt to set index %lu/%lu in SET_VECTOR_ELT"
 msgstr ""
 
-#: src/main/memory.c:3658
+#: src/main/memory.c:3514 src/main/memory.c:3524 src/main/memory.c:3536
+#: src/main/memory.c:3550 src/main/memory.c:3565 src/main/memory.c:3583
+msgid "bad value"
+msgstr ""
+
+#: src/main/memory.c:3746
 msgid "memory profiling is not available on this system"
 msgstr ""
 
-#: src/main/memory.c:3723
+#: src/main/memory.c:3810
 #, c-format
 msgid "Rprofmem: cannot open output file '%s'"
 msgstr ""
 
-#: src/main/memory.c:3830
+#: src/main/memory.c:3915
 #, c-format
 msgid "long vectors not supported yet: %s:%d"
 msgstr ""
 
-#: src/main/names.c:996
+#: src/main/names.c:1021
 msgid "string argument required"
 msgstr ""
 
-#: src/main/names.c:999
+#: src/main/names.c:1024
 msgid "no such primitive function"
 msgstr ""
 
-#: src/main/names.c:1146
+#: src/main/names.c:1212 src/main/names.c:1242
 msgid "attempt to use zero-length variable name"
 msgstr ""
 
-#: src/main/names.c:1148
+#: src/main/names.c:1214 src/main/names.c:1244
 #, c-format
 msgid "variable names are limited to %d bytes"
 msgstr ""
 
-#: src/main/names.c:1176 src/main/names.c:1179
+#: src/main/names.c:1307 src/main/names.c:1310
 msgid "invalid .Internal() argument"
 msgstr ""
 
-#: src/main/objects.c:46
+#: src/main/objects.c:39
 msgid "generic 'function' is not a function"
 msgstr ""
 
-#: src/main/objects.c:201
+#: src/main/objects.c:193
 msgid "bad generic call environment"
 msgstr ""
 
-#: src/main/objects.c:207
+#: src/main/objects.c:201
 msgid "bad generic definition environment"
 msgstr ""
 
-#: src/main/objects.c:246
+#: src/main/objects.c:249
 msgid ""
 "no '.S3MethodsClass' table, cannot use S4 objects with S3 methods ('methods' "
 "package not attached?)"
 msgstr ""
 
-#: src/main/objects.c:270 src/main/objects.c:411
-msgid "'UseMethod' used in an inappropriate fashion"
-msgstr ""
-
-#: src/main/objects.c:290
-msgid "invalid generic function in 'usemethod'"
-msgstr ""
-
-#: src/main/objects.c:399
+#: src/main/objects.c:415
 msgid "there must be a 'generic' argument"
 msgstr ""
 
-#: src/main/objects.c:403
+#: src/main/objects.c:419
 msgid "'generic' argument must be a character string"
 msgstr ""
 
-#: src/main/objects.c:440
-msgid "'UseMethod' called from outside a function"
-msgstr ""
-
-#: src/main/objects.c:447
-msgid "first argument must be a generic name"
+#: src/main/objects.c:427
+msgid "'UseMethod' used in an inappropriate fashion"
 msgstr ""
 
 #: src/main/objects.c:472
@@ -4244,226 +4315,225 @@ msgstr ""
 msgid "no applicable method for '%s' applied to an object of class \"%s\""
 msgstr ""
 
-#: src/main/objects.c:533
+#: src/main/objects.c:582
 msgid "'NextMethod' called from outside a function"
 msgstr ""
 
-#: src/main/objects.c:539
+#: src/main/objects.c:588
 msgid "'NextMethod' called from an anonymous function"
 msgstr ""
 
-#: src/main/objects.c:563
+#: src/main/objects.c:609
 msgid "no calling generic was found: was a method called directly?"
 msgstr ""
 
-#: src/main/objects.c:566
+#: src/main/objects.c:612
 #, c-format
 msgid "'function' is not a function, but of type %d"
 msgstr ""
 
-#: src/main/objects.c:640
+#: src/main/objects.c:639
 msgid "wrong argument ..."
 msgstr ""
 
-#: src/main/objects.c:653
+#: src/main/objects.c:651
 msgid "object not specified"
 msgstr ""
 
-#: src/main/objects.c:663 src/main/objects.c:670
+#: src/main/objects.c:659 src/main/objects.c:666
 msgid "generic function not specified"
 msgstr ""
 
-#: src/main/objects.c:667
+#: src/main/objects.c:663
 msgid "invalid generic argument to 'NextMethod'"
 msgstr ""
 
-#: src/main/objects.c:680
+#: src/main/objects.c:675
 msgid "invalid 'group' argument found in 'NextMethod'"
 msgstr ""
 
-#: src/main/objects.c:699
+#: src/main/objects.c:692
 msgid "wrong value for .Method"
 msgstr ""
 
-#: src/main/objects.c:703 src/main/objects.c:712
-#, c-format
-msgid "method name too long in '%s'"
-msgstr ""
-
-#: src/main/objects.c:715
+#: src/main/objects.c:702
 msgid "Incompatible methods ignored"
 msgstr ""
 
-#: src/main/objects.c:775 src/main/objects.c:780
+#: src/main/objects.c:759 src/main/objects.c:766
 msgid "no method to invoke"
 msgstr ""
 
-#: src/main/objects.c:832
+#: src/main/objects.c:817
 msgid "cannot unclass an environment"
 msgstr ""
 
-#: src/main/objects.c:835
+#: src/main/objects.c:820
 msgid "cannot unclass an external pointer"
 msgstr ""
 
-#: src/main/objects.c:872
+#: src/main/objects.c:856
 msgid "'what' must be a character vector"
 msgstr ""
 
-#: src/main/objects.c:876
+#: src/main/objects.c:860
 msgid "'which' must be a length 1 logical vector"
 msgstr ""
 
-#: src/main/objects.c:882
+#: src/main/objects.c:866
 msgid "use 'is()' instead of 'inherits()' on S4 objects"
 msgstr ""
 
-#: src/main/objects.c:1012
+#: src/main/objects.c:995
 msgid "could not find correct environment; please report!"
 msgstr ""
 
-#: src/main/objects.c:1052
+#: src/main/objects.c:1039
 msgid "'onOff' must be TRUE or FALSE"
 msgstr ""
 
-#: src/main/objects.c:1119
+#: src/main/objects.c:1104
 #, c-format
 msgid "unable to find a non-generic version of function \"%s\""
 msgstr ""
 
-#: src/main/objects.c:1151
+#: src/main/objects.c:1136
 msgid ""
 "'standardGeneric' called without 'methods' dispatch enabled (will be ignored)"
 msgstr ""
 
-#: src/main/objects.c:1160
+#: src/main/objects.c:1145
 msgid "argument to 'standardGeneric' must be a non-empty character string"
 msgstr ""
 
-#: src/main/objects.c:1165
+#: src/main/objects.c:1150
 #, c-format
 msgid ""
 "call to standardGeneric(\"%s\") apparently not from the body of that generic "
 "function"
 msgstr ""
 
-#: src/main/objects.c:1189
-msgid "argument 'code' must be a character string"
-msgstr ""
-
-#: src/main/objects.c:1257
+#: src/main/objects.c:1249
 #, c-format
 msgid ""
 "invalid primitive methods code (\"%s\"): should be \"clear\", \"reset\", "
 "\"set\", or \"suppress\""
 msgstr ""
 
-#: src/main/objects.c:1265
+#: src/main/objects.c:1257
 msgid "invalid object: must be a primitive function"
 msgstr ""
 
-#: src/main/objects.c:1312
+#: src/main/objects.c:1304
 #, c-format
 msgid ""
 "the formal definition of a primitive generic must be a function object (got "
 "type '%s')"
 msgstr ""
 
-#: src/main/objects.c:1342
+#: src/main/objects.c:1334
 #, c-format
 msgid "object returned as generic function \"%s\" does not appear to be one"
 msgstr ""
 
-#: src/main/objects.c:1444
+#: src/main/objects.c:1439
 msgid "invalid primitive operation given for dispatch"
 msgstr ""
 
-#: src/main/objects.c:1470 src/main/objects.c:1489
+#: src/main/objects.c:1468 src/main/objects.c:1487
 msgid "dispatch error"
 msgstr ""
 
-#: src/main/objects.c:1483
+#: src/main/objects.c:1481
 #, c-format
 msgid ""
 "primitive function \"%s\" has been set for methods but no generic function "
 "supplied"
 msgstr ""
 
-#: src/main/objects.c:1508
+#: src/main/objects.c:1506
 msgid "C level MAKE_CLASS macro called with NULL string pointer"
 msgstr ""
 
-#: src/main/objects.c:1524
+#: src/main/objects.c:1522
+msgid "'methods' package not yet loaded"
+msgstr ""
+
+#: src/main/objects.c:1532
 msgid "R_getClassDef(.) called with NULL string pointer"
 msgstr ""
 
-#: src/main/objects.c:1546
+#: src/main/objects.c:1577
 msgid "C level NEW macro called with null class definition pointer"
 msgstr ""
 
-#: src/main/objects.c:1550
+#: src/main/objects.c:1581
 #, c-format
 msgid "trying to generate an object from a virtual class (\"%s\")"
 msgstr ""
 
-#: src/main/objects.c:1627
+#: src/main/objects.c:1663
 #, c-format
 msgid "object of class \"%s\" does not correspond to a valid S3 object"
 msgstr ""
 
-#: src/main/options.c:120 src/main/options.c:180
+#: src/main/options.c:121 src/main/options.c:182
 msgid "corrupted options list"
 msgstr ""
 
-#: src/main/options.c:130
+#: src/main/options.c:131
 msgid "invalid printing width, used 80"
 msgstr ""
 
-#: src/main/options.c:141
+#: src/main/options.c:142
 msgid "invalid printing digits, used 7"
 msgstr ""
 
-#: src/main/options.c:153
+#: src/main/options.c:154
 msgid "invalid 'deparse.cutoff', used 60"
 msgstr ""
 
-#: src/main/options.c:165
+#: src/main/options.c:166
 msgid "invalid value for \"device.ask.default\", using FALSE"
 msgstr ""
 
-#: src/main/options.c:401
+#: src/main/options.c:416
 msgid "list argument has no valid names"
 msgstr ""
 
-#: src/main/options.c:429
+#: src/main/options.c:445
 #, c-format
 msgid "invalid 'width' parameter, allowed %d...%d"
 msgstr ""
 
-#: src/main/options.c:440
+#: src/main/options.c:456
 #, c-format
 msgid "invalid 'digits' parameter, allowed %d...%d"
 msgstr ""
 
-#: src/main/options.c:447
+#: src/main/options.c:463
 #, c-format
 msgid "'expressions' parameter invalid, allowed %d...%d"
 msgstr ""
 
-#: src/main/options.c:454 src/main/options.c:462 src/main/options.c:468
-#: src/main/options.c:476 src/main/options.c:483 src/main/options.c:488
-#: src/main/options.c:495 src/main/options.c:501 src/main/options.c:507
-#: src/main/options.c:512 src/main/options.c:517 src/main/options.c:526
-#: src/main/options.c:532 src/main/options.c:538 src/main/options.c:549
-#: src/main/options.c:556 src/main/options.c:562 src/main/options.c:570
-#: src/main/options.c:577 src/main/options.c:584 src/main/options.c:591
-#: src/main/options.c:598 src/main/options.c:606 src/main/options.c:615
-#: src/main/options.c:618 src/main/options.c:624
+#: src/main/options.c:470 src/main/options.c:478 src/main/options.c:484
+#: src/main/options.c:492 src/main/options.c:499 src/main/options.c:504
+#: src/main/options.c:511 src/main/options.c:517 src/main/options.c:523
+#: src/main/options.c:528 src/main/options.c:533 src/main/options.c:542
+#: src/main/options.c:548 src/main/options.c:554 src/main/options.c:564
+#: src/main/options.c:578 src/main/options.c:584 src/main/options.c:592
+#: src/main/options.c:599 src/main/options.c:606 src/main/options.c:613
+#: src/main/options.c:620 src/main/options.c:628 src/main/options.c:637
+#: src/main/options.c:640 src/main/options.c:646
 #, c-format
 msgid "invalid value for '%s'"
 msgstr ""
 
-#: src/main/options.c:611 src/main/options.c:640
+#: src/main/options.c:569
+msgid "'OutDec' must be a string of one character"
+msgstr ""
+
+#: src/main/options.c:633 src/main/options.c:662
 msgid "\"par.ask.default\" has been replaced by \"device.ask.default\""
 msgstr ""
 
@@ -4483,15 +4553,19 @@ msgstr ""
 msgid "non-string argument to Internal paste"
 msgstr ""
 
-#: src/main/paste.c:390
+#: src/main/paste.c:387
 msgid "first argument must be atomic"
 msgstr ""
 
-#: src/main/paste.c:560
+#: src/main/paste.c:448
+msgid "'decimal.mark' must be a string of one character"
+msgstr ""
+
+#: src/main/paste.c:579
 msgid "Impossible mode ( x )"
 msgstr ""
 
-#: src/main/paste.c:645
+#: src/main/paste.c:663
 msgid "atomic vector arguments only"
 msgstr ""
 
@@ -4499,209 +4573,192 @@ msgstr ""
 msgid "invalid filename specification"
 msgstr ""
 
-#: src/main/platform.c:375 src/main/platform.c:419
+#: src/main/platform.c:375 src/main/platform.c:420
 msgid "write error during file append"
 msgstr ""
 
-#: src/main/platform.c:394
+#: src/main/platform.c:395
 msgid "nothing to append to"
 msgstr ""
 
-#: src/main/platform.c:448 src/main/platform.c:795
+#: src/main/platform.c:449 src/main/platform.c:797 src/main/platform.c:979
 msgid "invalid filename argument"
 msgstr ""
 
-#: src/main/platform.c:460
+#: src/main/platform.c:461
 #, c-format
 msgid "cannot create file '%s', reason '%s'"
 msgstr ""
 
-#: src/main/platform.c:475 src/main/platform.c:545 src/main/platform.c:627
+#: src/main/platform.c:476 src/main/platform.c:546 src/main/platform.c:629
 msgid "invalid first filename"
 msgstr ""
 
-#: src/main/platform.c:487
+#: src/main/platform.c:488
 #, c-format
 msgid "cannot remove file '%s', reason '%s'"
 msgstr ""
 
-#: src/main/platform.c:547 src/main/platform.c:629
+#: src/main/platform.c:548 src/main/platform.c:631
 msgid "invalid second filename"
 msgstr ""
 
-#: src/main/platform.c:549 src/main/platform.c:631
+#: src/main/platform.c:551 src/main/platform.c:634
 msgid "nothing to link"
 msgstr ""
 
-#: src/main/platform.c:559
+#: src/main/platform.c:561
 msgid "symbolic links are not supported on this version of Windows"
 msgstr ""
 
-#: src/main/platform.c:581
+#: src/main/platform.c:583
 #, c-format
 msgid "cannot symlink '%ls' to '%ls', reason '%s'"
 msgstr ""
 
-#: src/main/platform.c:601
+#: src/main/platform.c:603
 #, c-format
 msgid "cannot symlink '%s' to '%s', reason '%s'"
 msgstr ""
 
-#: src/main/platform.c:609
+#: src/main/platform.c:611
 msgid "symbolic links are not supported on this platform"
 msgstr ""
 
-#: src/main/platform.c:649
+#: src/main/platform.c:652
 #, c-format
 msgid "cannot link '%ls' to '%ls', reason '%s'"
 msgstr ""
 
-#: src/main/platform.c:669
+#: src/main/platform.c:672
 #, c-format
 msgid "cannot link '%s' to '%s', reason '%s'"
 msgstr ""
 
-#: src/main/platform.c:678
+#: src/main/platform.c:681
 msgid "(hard) links are not supported on this platform"
 msgstr ""
 
-#: src/main/platform.c:709
+#: src/main/platform.c:713
 msgid "'from' and 'to' are of different lengths"
 msgstr ""
 
-#: src/main/platform.c:720 src/main/platform.c:730
+#: src/main/platform.c:724 src/main/platform.c:734
 msgid "expanded 'from' name too long"
 msgstr ""
 
-#: src/main/platform.c:724 src/main/platform.c:734
+#: src/main/platform.c:728 src/main/platform.c:738
 msgid "expanded 'to' name too long"
 msgstr ""
 
-#: src/main/platform.c:738
+#: src/main/platform.c:742
 #, c-format
 msgid "cannot rename file '%s' to '%s', reason '%s'"
 msgstr ""
 
-#: src/main/platform.c:1094
+#: src/main/platform.c:1168
 msgid "invalid 'pattern' regular expression"
 msgstr ""
 
-#: src/main/platform.c:1211
+#: src/main/platform.c:1285
 msgid "unable to determine R home location"
 msgstr ""
 
-#: src/main/platform.c:1263
+#: src/main/platform.c:1338
 msgid "file name too long"
 msgstr ""
 
-#: src/main/platform.c:1511 src/main/platform.c:1558 src/main/sysutils.c:1850
-#: src/main/sysutils.c:1864
+#: src/main/platform.c:1586 src/main/platform.c:1633 src/main/sysutils.c:1806
+#: src/main/sysutils.c:1820
 msgid "internal out-of-memory condition"
 msgstr ""
 
-#: src/main/platform.c:1554 src/main/sysutils.c:1860
+#: src/main/platform.c:1629 src/main/sysutils.c:1816
 #, c-format
 msgid "read error on '%s'"
 msgstr ""
 
-#: src/main/platform.c:1722
+#: src/main/platform.c:1728
 msgid "setting 'LC_NUMERIC' may cause R to function strangely"
 msgstr ""
 
-#: src/main/platform.c:1736
+#: src/main/platform.c:1742
 msgid "LC_MESSAGES exists on Windows but is not operational"
 msgstr ""
 
-#: src/main/platform.c:1763
+#: src/main/platform.c:1769
 #, c-format
 msgid "OS reports request to set locale to \"%s\" cannot be honored"
 msgstr ""
 
-#: src/main/platform.c:2065
-msgid "'hostname' must be a character vector of length 1"
-msgstr ""
-
-#: src/main/platform.c:2071
-#, c-format
-msgid "nsl() was unable to resolve host '%s'"
-msgstr ""
-
-#: src/main/platform.c:2078
-msgid "unknown format returned by C function 'gethostbyname'"
-msgstr ""
-
-#: src/main/platform.c:2087
-msgid "nsl() is not supported on this platform"
-msgstr ""
-
-#: src/main/platform.c:2158
+#: src/main/platform.c:2131
 #, c-format
 msgid "'%s' already exists"
 msgstr ""
 
-#: src/main/platform.c:2161
+#: src/main/platform.c:2134
 #, c-format
 msgid "cannot create dir '%s', reason '%s'"
 msgstr ""
 
-#: src/main/platform.c:2207
+#: src/main/platform.c:2181
 #, c-format
 msgid "'%ls' already exists"
 msgstr ""
 
-#: src/main/platform.c:2211
+#: src/main/platform.c:2183 src/main/platform.c:2189
 #, c-format
 msgid "cannot create dir '%ls', reason '%s'"
 msgstr ""
 
-#: src/main/platform.c:2245 src/main/platform.c:2449
+#: src/main/platform.c:2223 src/main/platform.c:2435
 msgid "too deep nesting"
 msgstr ""
 
-#: src/main/platform.c:2253 src/main/platform.c:2266 src/main/platform.c:2284
+#: src/main/platform.c:2231 src/main/platform.c:2244 src/main/platform.c:2262
 msgid "over-long path"
 msgstr ""
 
-#: src/main/platform.c:2273
+#: src/main/platform.c:2251
 #, c-format
 msgid "problem creating directory %ls: %s"
 msgstr ""
 
-#: src/main/platform.c:2293
+#: src/main/platform.c:2271
 #, c-format
 msgid "problem reading dir %ls: %s"
 msgstr ""
 
-#: src/main/platform.c:2304 src/main/platform.c:2465 src/main/platform.c:2478
-#: src/main/platform.c:2498 src/main/platform.c:2520
+#: src/main/platform.c:2282 src/main/platform.c:2451 src/main/platform.c:2464
+#: src/main/platform.c:2484 src/main/platform.c:2506
 msgid "over-long path length"
 msgstr ""
 
-#: src/main/platform.c:2312
+#: src/main/platform.c:2290
 #, c-format
 msgid "problem copying %ls to %ls: %s"
 msgstr ""
 
-#: src/main/platform.c:2487
+#: src/main/platform.c:2473
 #, c-format
 msgid "problem creating directory %s: %s"
 msgstr ""
 
-#: src/main/platform.c:2507
+#: src/main/platform.c:2493
 #, c-format
 msgid "problem reading directory %s: %s"
 msgstr ""
 
-#: src/main/platform.c:2529
+#: src/main/platform.c:2515
 #, c-format
 msgid "problem copying %s to %s: %s"
 msgstr ""
 
-#: src/main/platform.c:2662
+#: src/main/platform.c:2653
 msgid "'mode' must be of length at least one"
 msgstr ""
 
-#: src/main/platform.c:2729
+#: src/main/platform.c:2720
 msgid "insufficient OS support on this platform"
 msgstr ""
 
@@ -4722,91 +4779,95 @@ msgstr ""
 msgid "invalid math style encountered"
 msgstr ""
 
-#: src/main/plotmath.c:1261 src/main/plotmath.c:1366 src/main/plotmath.c:2664
+#: src/main/plotmath.c:1260 src/main/plotmath.c:1365 src/main/plotmath.c:2654
 msgid "invalid mathematical annotation"
 msgstr ""
 
-#: src/main/plotmath.c:1670
+#: src/main/plotmath.c:1669
 msgid "invalid accent"
 msgstr ""
 
-#: src/main/plotmath.c:1964
+#: src/main/plotmath.c:1963
 msgid "invalid group delimiter"
 msgstr ""
 
-#: src/main/plotmath.c:1991 src/main/plotmath.c:2137
+#: src/main/plotmath.c:1990 src/main/plotmath.c:2127
 msgid "invalid group specification"
 msgstr ""
 
-#: src/main/plotmath.c:2062
+#: src/main/plotmath.c:2052
 msgid "group is incomplete"
 msgstr ""
 
-#: src/main/plotmath.c:3190
+#: src/main/plotmath.c:3180
 msgid "Metric information not available for this family/device"
 msgstr ""
 
-#: src/main/print.c:148 src/main/print.c:254
+#: src/main/print.c:140 src/main/print.c:247
 msgid "invalid 'na.print' specification"
 msgstr ""
 
-#: src/main/print.c:157
+#: src/main/print.c:149
 msgid "invalid row labels"
 msgstr ""
 
-#: src/main/print.c:159
+#: src/main/print.c:151
 msgid "invalid column labels"
 msgstr ""
 
-#: src/main/print.c:183
+#: src/main/print.c:176
 msgid "non-function argument to .Internal(print.function(.))"
 msgstr ""
 
-#: src/main/print.c:264
+#: src/main/print.c:257
 msgid "'gap' must be non-negative integer"
 msgstr ""
 
-#: src/main/print.c:289
+#: src/main/print.c:282
 msgid "invalid 'tryS4' internal argument"
 msgstr ""
 
-#: src/main/print.c:1028
+#: src/main/print.c:851
+msgid "print buffer overflow"
+msgstr ""
+
+#: src/main/print.c:1043
 msgid "invalid character length in 'dblepr'"
 msgstr ""
 
-#: src/main/print.c:1046
+#: src/main/print.c:1061
 msgid "invalid character length in 'intpr'"
 msgstr ""
 
-#: src/main/print.c:1065
+#: src/main/print.c:1080
 msgid "invalid character length in 'realpr'"
 msgstr ""
 
-#: src/main/print.c:1075
+#: src/main/print.c:1090
 msgid "memory allocation error in 'realpr'"
 msgstr ""
 
-#: src/main/print.c:1091
+#: src/main/print.c:1106
 #, c-format
 msgid "BLAS/LAPACK routine '%6s' gave error code %d"
 msgstr ""
 
-#: src/main/printarray.c:453
+#: src/main/printarray.c:332
 msgid "too few row labels"
 msgstr ""
 
-#: src/main/printarray.c:455
+#: src/main/printarray.c:334
 msgid "too few column labels"
 msgstr ""
 
-#: src/main/printarray.c:489
+#: src/main/printarray.c:368
 #, c-format
 msgid " [ reached getOption(\"max.print\") -- omitted %d row ]\n"
 msgid_plural " [ reached getOption(\"max.print\") -- omitted %d rows ]\n"
 msgstr[0] ""
 msgstr[1] ""
 
-#: src/main/printutils.c:613
+#: src/main/printutils.c:710
 msgid "it is not known that wchar_t is Unicode on this platform"
 msgstr ""
 
@@ -4814,328 +4875,326 @@ msgstr ""
 msgid "argument is not a numeric vector"
 msgstr ""
 
-#: src/main/random.c:37
+#: src/main/random.c:39
 msgid "invalid arguments"
 msgstr ""
 
-#: src/main/random.c:93 src/main/random.c:110 src/main/random.c:175
-#: src/main/random.c:201 src/main/random.c:274 src/main/random.c:288
+#: src/main/random.c:95 src/main/random.c:112 src/main/random.c:178
+#: src/main/random.c:204 src/main/random.c:277 src/main/random.c:291
 msgid "NAs produced"
 msgstr ""
 
-#: src/main/random.c:445
+#: src/main/random.c:438
 msgid "NA in probability vector"
 msgstr ""
 
-#: src/main/random.c:447
-msgid "non-positive probability"
+#: src/main/random.c:440
+msgid "negative probability"
 msgstr ""
 
-#: src/main/random.c:454
+#: src/main/random.c:447
 msgid "too few positive probabilities"
 msgstr ""
 
-#: src/main/random.c:491 src/main/random.c:519
+#: src/main/random.c:483 src/main/random.c:511
 msgid "cannot take a sample larger than the population when 'replace = FALSE'"
 msgstr ""
 
-#: src/main/random.c:498
+#: src/main/random.c:490
 msgid "incorrect number of probabilities"
 msgstr ""
 
-#: src/main/random.c:537
+#: src/main/random.c:529
 msgid "n >= 2^31, replace = FALSE is only supported on 64-bit platforms"
 msgstr ""
 
-#: src/main/raw.c:37 src/main/raw.c:273
+#: src/main/raw.c:37 src/main/raw.c:277
 msgid "argument must be a character vector of length 1"
 msgstr ""
 
-#: src/main/raw.c:39 src/main/raw.c:275
+#: src/main/raw.c:39 src/main/raw.c:279
 msgid ""
 "argument should be a character vector of length 1\n"
 "all but the first element will be ignored"
 msgstr ""
 
-#: src/main/raw.c:53 src/main/raw.c:89 src/main/raw.c:110
+#: src/main/raw.c:53 src/main/raw.c:90 src/main/raw.c:113
 msgid "argument 'x' must be a raw vector"
 msgstr ""
 
-#: src/main/raw.c:56 src/main/raw.c:330
+#: src/main/raw.c:56 src/main/raw.c:336
 msgid "argument 'multiple' must be TRUE or FALSE"
 msgstr ""
 
-#: src/main/raw.c:91
+#: src/main/raw.c:92
 msgid "argument 'shift' must be a small integer"
 msgstr ""
 
-#: src/main/raw.c:129 src/main/raw.c:327
+#: src/main/raw.c:133 src/main/raw.c:333
 msgid "argument 'x' must be an integer vector"
 msgstr ""
 
-#: src/main/raw.c:148
+#: src/main/raw.c:153
 msgid "argument 'x' must be raw, integer or logical"
 msgstr ""
 
-#: src/main/raw.c:150
-msgid "argument 'type' must be a character string"
-msgstr ""
-
-#: src/main/raw.c:154
+#: src/main/raw.c:159
 #, c-format
 msgid "argument 'x' must be a multiple of %d long"
 msgstr ""
 
-#: src/main/raw.c:167 src/main/raw.c:181
+#: src/main/raw.c:172 src/main/raw.c:186
 msgid "argument 'x' must not contain NAs"
 msgstr ""
 
-#: src/main/raw.c:285
+#: src/main/raw.c:291
 msgid "invalid UTF-8 string"
 msgstr ""
 
-#: src/main/relop.c:202
+#: src/main/relop.c:196
 #, c-format
 msgid "comparison (%d) is possible only for atomic and list types"
 msgstr ""
 
-#: src/main/relop.c:207
+#: src/main/relop.c:201
 msgid "comparison is not allowed for expressions"
 msgstr ""
 
-#: src/main/relop.c:296
+#: src/main/relop.c:293
 msgid "comparison of these types is not implemented"
 msgstr ""
 
-#: src/main/relop.c:509
+#: src/main/relop.c:425
 msgid "invalid comparison with complex values"
 msgstr ""
 
-#: src/main/relop.c:767
+#: src/main/relop.c:683
 msgid "'a' and 'b' must have the same type"
 msgstr ""
 
-#: src/main/saveload.c:200 src/main/saveload.c:205 src/main/saveload.c:214
-#: src/main/saveload.c:223 src/main/saveload.c:232 src/main/saveload.c:241
-#: src/main/saveload.c:245 src/main/saveload.c:254 src/main/saveload.c:1381
-#: src/main/saveload.c:1386 src/main/saveload.c:1430 src/main/saveload.c:1498
-#: src/main/saveload.c:1507 src/main/serialize.c:331 src/main/serialize.c:338
-#: src/main/serialize.c:2388 src/main/serialize.c:2396
+#: src/main/saveload.c:202 src/main/saveload.c:207 src/main/saveload.c:216
+#: src/main/saveload.c:225 src/main/saveload.c:234 src/main/saveload.c:243
+#: src/main/saveload.c:247 src/main/saveload.c:256 src/main/saveload.c:1383
+#: src/main/saveload.c:1388 src/main/saveload.c:1432 src/main/saveload.c:1500
+#: src/main/saveload.c:1509 src/main/serialize.c:354 src/main/serialize.c:361
+#: src/main/serialize.c:374 src/main/serialize.c:378 src/main/serialize.c:405
+#: src/main/serialize.c:421 src/main/serialize.c:2429
+#: src/main/serialize.c:2437
 msgid "read error"
 msgstr ""
 
-#: src/main/saveload.c:332
+#: src/main/saveload.c:334
 msgid "a I read error occurred"
 msgstr ""
 
-#: src/main/saveload.c:342
+#: src/main/saveload.c:344
 msgid "a R read error occurred"
 msgstr ""
 
-#: src/main/saveload.c:352
+#: src/main/saveload.c:354
 msgid "a C read error occurred"
 msgstr ""
 
-#: src/main/saveload.c:362
+#: src/main/saveload.c:364
 msgid "a S read error occurred"
 msgstr ""
 
-#: src/main/saveload.c:387 src/main/saveload.c:395 src/main/saveload.c:403
-#: src/main/saveload.c:1594 src/main/saveload.c:1602
+#: src/main/saveload.c:389 src/main/saveload.c:397 src/main/saveload.c:405
+#: src/main/saveload.c:1596 src/main/saveload.c:1604
 msgid "a read error occurred"
 msgstr ""
 
-#: src/main/saveload.c:467
+#: src/main/saveload.c:469
 msgid "unresolved node during restore"
 msgstr ""
 
-#: src/main/saveload.c:488
+#: src/main/saveload.c:490
 #, c-format
 msgid "restore compatibility error - no version %d compatibility"
 msgstr ""
 
-#: src/main/saveload.c:572 src/main/saveload.c:645
+#: src/main/saveload.c:574 src/main/saveload.c:647
 msgid "bad SEXP type in data file"
 msgstr ""
 
-#: src/main/saveload.c:586
+#: src/main/saveload.c:588
 msgid "mismatch on types"
 msgstr ""
 
-#: src/main/saveload.c:607 src/main/saveload.c:1270 src/main/serialize.c:1636
+#: src/main/saveload.c:609 src/main/saveload.c:1272 src/main/serialize.c:1675
 #, c-format
 msgid "unrecognized internal function name \"%s\""
 msgstr ""
 
-#: src/main/saveload.c:709
+#: src/main/saveload.c:711
 msgid "cannot save file position while restoring data"
 msgstr ""
 
-#: src/main/saveload.c:722
+#: src/main/saveload.c:724
 msgid "cannot restore file position while restoring data"
 msgstr ""
 
-#: src/main/saveload.c:915
+#: src/main/saveload.c:917
 msgid "base namespace is not preserved in version 1 workspaces"
 msgstr ""
 
-#: src/main/saveload.c:917
+#: src/main/saveload.c:919
 msgid "cannot save namespace in version 1 workspaces"
 msgstr ""
 
-#: src/main/saveload.c:919
+#: src/main/saveload.c:921
 msgid ""
 "cannot save environment with locked/active bindings in version 1 workspaces"
 msgstr ""
 
-#: src/main/saveload.c:943
+#: src/main/saveload.c:945
 msgid "cannot save weak references in version 1 workspaces"
 msgstr ""
 
-#: src/main/saveload.c:1021
+#: src/main/saveload.c:1023
 msgid "NewWriteVec called with non-vector type"
 msgstr ""
 
-#: src/main/saveload.c:1084
+#: src/main/saveload.c:1086
 msgid "cannot save byte code objects in version 1 workspaces"
 msgstr ""
 
-#: src/main/saveload.c:1086
+#: src/main/saveload.c:1088
 #, c-format
 msgid "NewWriteItem: unknown type %i"
 msgstr ""
 
-#: src/main/saveload.c:1216
+#: src/main/saveload.c:1218
 msgid "NewReadVec called with non-vector type"
 msgstr ""
 
-#: src/main/saveload.c:1286
+#: src/main/saveload.c:1288
 msgid "cannot read byte code objects from version 1 workspaces"
 msgstr ""
 
-#: src/main/saveload.c:1288
+#: src/main/saveload.c:1290
 #, c-format
 msgid "NewReadItem: unknown type %i"
 msgstr ""
 
-#: src/main/saveload.c:1440
+#: src/main/saveload.c:1442
 msgid "out of memory reading ascii string"
 msgstr ""
 
-#: src/main/saveload.c:1565
+#: src/main/saveload.c:1567
 msgid "a binary read error occurred"
 msgstr ""
 
-#: src/main/saveload.c:1580 src/main/saveload.c:1681
+#: src/main/saveload.c:1582 src/main/saveload.c:1683
 msgid "out of memory reading binary string"
 msgstr ""
 
-#: src/main/saveload.c:1585
+#: src/main/saveload.c:1587
 msgid "a binary string read error occurred"
 msgstr ""
 
-#: src/main/saveload.c:1645
+#: src/main/saveload.c:1647
 msgid "an xdr integer data write error occurred"
 msgstr ""
 
-#: src/main/saveload.c:1652
+#: src/main/saveload.c:1654
 msgid "an xdr integer data read error occurred"
 msgstr ""
 
-#: src/main/saveload.c:1667 src/main/saveload.c:1686
+#: src/main/saveload.c:1669 src/main/saveload.c:1688
 msgid "an xdr string data write error occurred"
 msgstr ""
 
-#: src/main/saveload.c:1694
+#: src/main/saveload.c:1696
 msgid "an xdr real data write error occurred"
 msgstr ""
 
-#: src/main/saveload.c:1701
+#: src/main/saveload.c:1703
 msgid "an xdr real data read error occurred"
 msgstr ""
 
-#: src/main/saveload.c:1708
+#: src/main/saveload.c:1710
 msgid "an xdr complex data write error occurred"
 msgstr ""
 
-#: src/main/saveload.c:1715
+#: src/main/saveload.c:1717
 msgid "an xdr complex data read error occurred"
 msgstr ""
 
-#: src/main/saveload.c:1783 src/main/serialize.c:1958
-#: src/main/serialize.c:2568 src/modules/internet/internet.c:351
-#: src/modules/internet/internet.c:409 src/modules/internet/internet.c:514
+#: src/main/saveload.c:1785 src/main/serialize.c:1997
+#: src/main/serialize.c:2614 src/modules/internet/internet.c:514
+#: src/modules/internet/internet.c:590 src/modules/internet/internet.c:701
 msgid "write failed"
 msgstr ""
 
-#: src/main/saveload.c:1910
+#: src/main/saveload.c:1912
 msgid "restore file may be empty -- no data loaded"
 msgstr ""
 
-#: src/main/saveload.c:1912
+#: src/main/saveload.c:1914
 msgid "restore file may be from a newer version of R -- no data loaded"
 msgstr ""
 
-#: src/main/saveload.c:1914
+#: src/main/saveload.c:1916
 msgid "bad restore file magic number (file may be corrupted) -- no data loaded"
 msgstr ""
 
-#: src/main/saveload.c:1940 src/main/saveload.c:2238
+#: src/main/saveload.c:1942 src/main/saveload.c:2240
 msgid "first argument must be a character vector"
 msgstr ""
 
-#: src/main/saveload.c:2012
+#: src/main/saveload.c:2014
 msgid "not a valid named list"
 msgstr ""
 
-#: src/main/saveload.c:2019 src/main/saveload.c:2040
+#: src/main/saveload.c:2021 src/main/saveload.c:2042
 #, c-format
 msgid "'%s' looks like a pre-2.4.0 S4 object: please recreate it"
 msgstr ""
 
-#: src/main/saveload.c:2027
+#: src/main/saveload.c:2029
 msgid "loaded data is not in pair list form"
 msgstr ""
 
-#: src/main/saveload.c:2063
+#: src/main/saveload.c:2065
 msgid "first argument must be a file name"
 msgstr ""
 
-#: src/main/saveload.c:2108 src/main/saveload.c:2134 src/main/serialize.c:826
-#: src/main/serialize.c:863 src/main/serialize.c:901
+#: src/main/saveload.c:2110 src/main/saveload.c:2136 src/main/serialize.c:864
+#: src/main/serialize.c:901 src/main/serialize.c:939
 msgid "XDR write failed"
 msgstr ""
 
-#: src/main/saveload.c:2121 src/main/saveload.c:2146 src/main/serialize.c:1362
-#: src/main/serialize.c:1398 src/main/serialize.c:1436
+#: src/main/saveload.c:2123 src/main/saveload.c:2148 src/main/serialize.c:1400
+#: src/main/serialize.c:1436 src/main/serialize.c:1474
 msgid "XDR read failed"
 msgstr ""
 
-#: src/main/saveload.c:2157
+#: src/main/saveload.c:2159
 #, c-format
 msgid "cannot save data -- unable to open '%s': %s"
 msgstr ""
 
-#: src/main/saveload.c:2254 src/main/serialize.c:2161
+#: src/main/saveload.c:2256 src/main/serialize.c:2202
 #, c-format
 msgid "cannot save to connections in version %d format"
 msgstr ""
 
-#: src/main/saveload.c:2277 src/main/serialize.c:2186
+#: src/main/saveload.c:2279 src/main/serialize.c:2227
 msgid "connection not open for writing"
 msgstr ""
 
-#: src/main/saveload.c:2285
+#: src/main/saveload.c:2288
 msgid "cannot save XDR format to a text-mode connection"
 msgstr ""
 
-#: src/main/saveload.c:2295 src/main/serialize.c:2066
-#: src/main/serialize.c:2080 src/main/serialize.c:2262
-#: src/main/serialize.c:2284
+#: src/main/saveload.c:2298 src/main/serialize.c:2105
+#: src/main/serialize.c:2119 src/main/serialize.c:2303
+#: src/main/serialize.c:2325
 msgid "error writing to connection"
 msgstr ""
 
-#: src/main/saveload.c:2359 src/main/serialize.c:2234
+#: src/main/saveload.c:2359 src/main/serialize.c:2275
 msgid "connection not open for reading"
 msgstr ""
 
@@ -5162,7 +5221,7 @@ msgstr ""
 msgid "scan() expected '%s', got '%s'"
 msgstr ""
 
-#: src/main/scan.c:585 src/main/scan.c:732
+#: src/main/scan.c:585 src/main/scan.c:735
 msgid "too many items"
 msgstr ""
 
@@ -5170,7 +5229,7 @@ msgstr ""
 msgid "empty 'what' specified"
 msgstr ""
 
-#: src/main/scan.c:722
+#: src/main/scan.c:725
 #, c-format
 msgid "line %d did not have %d elements"
 msgstr ""
@@ -5199,257 +5258,259 @@ msgstr ""
 msgid "invalid quote symbol set"
 msgstr ""
 
-#: src/main/scan.c:987
+#: src/main/scan.c:988
 msgid "embedded nul(s) found in input"
 msgstr ""
 
-#: src/main/seq.c:48
+#: src/main/seq.c:49
 msgid "unequal factor lengths"
 msgstr ""
 
-#: src/main/seq.c:100
+#: src/main/seq.c:101
 msgid "result would be too long a vector"
 msgstr ""
 
-#: src/main/seq.c:159
+#: src/main/seq.c:160
 msgid "argument of length 0"
 msgstr ""
 
-#: src/main/seq.c:161 src/main/seq.c:163
+#: src/main/seq.c:163 src/main/seq.c:168
 #, c-format
-msgid "numerical expression has %d elements: only the first used"
-msgstr ""
+msgid "numerical expression has %d element: only the first used"
+msgid_plural "numerical expression has %d elements: only the first used"
+msgstr[0] ""
+msgstr[1] ""
 
-#: src/main/seq.c:167
+#: src/main/seq.c:174
 msgid "NA/NaN argument"
 msgstr ""
 
-#: src/main/seq.c:331
+#: src/main/seq.c:333
 msgid "incorrect type for second argument"
 msgstr ""
 
-#: src/main/seq.c:334
+#: src/main/seq.c:336
 #, c-format
 msgid "attempt to replicate an object of type '%s'"
 msgstr ""
 
-#: src/main/seq.c:387
+#: src/main/seq.c:393
 msgid "attempt to replicate non-vector"
 msgstr ""
 
-#: src/main/seq.c:403
+#: src/main/seq.c:409
 msgid "cannot replicate NULL to a non-zero length"
 msgstr ""
 
-#: src/main/seq.c:626 src/main/seq.c:633 src/main/seq.c:768 src/main/seq.c:979
+#: src/main/seq.c:630 src/main/seq.c:637 src/main/seq.c:766 src/main/seq.c:977
 #, c-format
 msgid "first element used of '%s' argument"
 msgstr ""
 
-#: src/main/seq.c:766
+#: src/main/seq.c:764
 msgid "'length.out' must be a non-negative number"
 msgstr ""
 
-#: src/main/seq.c:790 src/main/seq.c:856 src/main/seq.c:873
+#: src/main/seq.c:788 src/main/seq.c:854 src/main/seq.c:871
 msgid "'from' must be finite"
 msgstr ""
 
-#: src/main/seq.c:792 src/main/seq.c:858 src/main/seq.c:895
+#: src/main/seq.c:790 src/main/seq.c:856 src/main/seq.c:893
 msgid "'to' must be finite"
 msgstr ""
 
-#: src/main/seq.c:804
+#: src/main/seq.c:802
 msgid "invalid '(to - from)/by' in 'seq'"
 msgstr ""
 
-#: src/main/seq.c:816
+#: src/main/seq.c:814
 msgid "'by' argument is much too small"
 msgstr ""
 
-#: src/main/seq.c:818
+#: src/main/seq.c:816
 msgid "wrong sign in 'by' argument"
 msgstr ""
 
-#: src/main/seq.c:875 src/main/seq.c:897
+#: src/main/seq.c:873 src/main/seq.c:895
 msgid "'by' must be finite"
 msgstr ""
 
-#: src/main/seq.c:985 src/main/seq.c:990
+#: src/main/seq.c:983 src/main/seq.c:988
 msgid "argument must be coercible to non-negative integer"
 msgstr ""
 
-#: src/main/serialize.c:224 src/main/serialize.c:254 src/main/serialize.c:277
+#: src/main/serialize.c:228 src/main/serialize.c:275 src/main/serialize.c:299
 msgid "unknown or inappropriate output format"
 msgstr ""
 
-#: src/main/serialize.c:504
+#: src/main/serialize.c:542
 msgid "must specify ascii, binary, or xdr format"
 msgstr ""
 
-#: src/main/serialize.c:505
+#: src/main/serialize.c:543
 msgid "unknown output format"
 msgstr ""
 
-#: src/main/serialize.c:536
+#: src/main/serialize.c:574
 msgid "unknown input format"
 msgstr ""
 
-#: src/main/serialize.c:541
+#: src/main/serialize.c:579
 msgid "input format does not match specified format"
 msgstr ""
 
-#: src/main/serialize.c:752
+#: src/main/serialize.c:790
 msgid "no restore method available"
 msgstr ""
 
-#: src/main/serialize.c:794
+#: src/main/serialize.c:832
 msgid "names in persistent strings are currently ignored"
 msgstr ""
 
-#: src/main/serialize.c:963
+#: src/main/serialize.c:1001
 #, c-format
 msgid "'%s' may not be available when loading"
 msgstr ""
 
-#: src/main/serialize.c:970
+#: src/main/serialize.c:1008
 msgid "namespaces may not be available when loading"
 msgstr ""
 
-#: src/main/serialize.c:1097
+#: src/main/serialize.c:1136
 #, c-format
 msgid "WriteItem: unknown type %i"
 msgstr ""
 
-#: src/main/serialize.c:1273
+#: src/main/serialize.c:1312
 #, c-format
 msgid "version %d not supported"
 msgstr ""
 
-#: src/main/serialize.c:1305
+#: src/main/serialize.c:1343
 msgid "reference index out of range"
 msgstr ""
 
-#: src/main/serialize.c:1335
+#: src/main/serialize.c:1373
 msgid "names in persistent strings are not supported yet"
 msgstr ""
 
-#: src/main/serialize.c:1463
+#: src/main/serialize.c:1501
 msgid "negative serialized length for vector"
 msgstr ""
 
-#: src/main/serialize.c:1471
+#: src/main/serialize.c:1509
 msgid "invalid upper part of serialized vector length"
 msgstr ""
 
-#: src/main/serialize.c:1476
+#: src/main/serialize.c:1514
 msgid ""
 "negative serialized vector length:\n"
 "perhaps long vector from 64-bit version of R?"
 msgstr ""
 
-#: src/main/serialize.c:1707
+#: src/main/serialize.c:1746
 msgid "this version of R cannot read class references"
 msgstr ""
 
-#: src/main/serialize.c:1709
+#: src/main/serialize.c:1748
 msgid "this version of R cannot read generic function references"
 msgstr ""
 
-#: src/main/serialize.c:1726
+#: src/main/serialize.c:1765
 #, c-format
 msgid "ReadItem: unknown type %i, perhaps written by later version of R"
 msgstr ""
 
-#: src/main/serialize.c:1882
+#: src/main/serialize.c:1921
 #, c-format
 msgid ""
 "cannot read unreleased workspace version %d written by experimental R %d.%d."
 "%d"
 msgstr ""
 
-#: src/main/serialize.c:1886
+#: src/main/serialize.c:1925
 #, c-format
 msgid ""
 "cannot read workspace version %d written by R %d.%d.%d; need R %d.%d.%d or "
 "newer"
 msgstr ""
 
-#: src/main/serialize.c:1965
+#: src/main/serialize.c:2004
 msgid "read failed"
 msgstr ""
 
-#: src/main/serialize.c:2028
+#: src/main/serialize.c:2067
 msgid "error reading from ascii connection"
 msgstr ""
 
-#: src/main/serialize.c:2030
+#: src/main/serialize.c:2069
 msgid "unexpected format in ascii connection"
 msgstr ""
 
-#: src/main/serialize.c:2035 src/main/serialize.c:2049
+#: src/main/serialize.c:2074 src/main/serialize.c:2088
 msgid "error reading from connection"
 msgstr ""
 
-#: src/main/serialize.c:2090
+#: src/main/serialize.c:2130
 msgid "only ascii format can be written to text mode connections"
 msgstr ""
 
-#: src/main/serialize.c:2104
+#: src/main/serialize.c:2144
 msgid "only ascii format can be read from text mode connections"
 msgstr ""
 
-#: src/main/serialize.c:2159 src/main/serialize.c:2312
-#: src/main/serialize.c:2461
+#: src/main/serialize.c:2200 src/main/serialize.c:2353
+#: src/main/serialize.c:2502
 msgid "bad version value"
 msgstr ""
 
-#: src/main/serialize.c:2184
+#: src/main/serialize.c:2225
 msgid "binary-mode connection required for ascii=FALSE"
 msgstr ""
 
-#: src/main/serialize.c:2340 src/main/serialize.c:2377
-#: src/main/serialize.c:2440
+#: src/main/serialize.c:2381 src/main/serialize.c:2418
+#: src/main/serialize.c:2481
 msgid "serialization is too large to store in a raw vector"
 msgstr ""
 
-#: src/main/serialize.c:2357
+#: src/main/serialize.c:2398
 msgid "cannot allocate buffer"
 msgstr ""
 
-#: src/main/serialize.c:2546 src/main/serialize.c:2619
+#: src/main/serialize.c:2592 src/main/serialize.c:2665
 msgid "not a proper file name"
 msgstr ""
 
-#: src/main/serialize.c:2548
+#: src/main/serialize.c:2594
 msgid "not a proper raw vector"
 msgstr ""
 
-#: src/main/serialize.c:2569
+#: src/main/serialize.c:2615
 msgid "could not determine file position"
 msgstr ""
 
-#: src/main/serialize.c:2621
+#: src/main/serialize.c:2667
 msgid "bad offset/length argument"
 msgstr ""
 
-#: src/main/serialize.c:2645 src/main/serialize.c:2658
-#: src/main/serialize.c:2667 src/main/serialize.c:2677
-#: src/main/serialize.c:2690
+#: src/main/serialize.c:2691 src/main/serialize.c:2704
+#: src/main/serialize.c:2713 src/main/serialize.c:2723
+#: src/main/serialize.c:2736
 #, c-format
 msgid "seek failed on %s"
 msgstr ""
 
-#: src/main/serialize.c:2662 src/main/serialize.c:2671
-#: src/main/serialize.c:2681 src/main/serialize.c:2694
+#: src/main/serialize.c:2708 src/main/serialize.c:2717
+#: src/main/serialize.c:2727 src/main/serialize.c:2740
 #, c-format
 msgid "read failed on %s"
 msgstr ""
 
-#: src/main/serialize.c:2713
+#: src/main/serialize.c:2759
 msgid "bad environment"
 msgstr ""
 
-#: src/main/serialize.c:2715
+#: src/main/serialize.c:2761
 msgid "bad variable names"
 msgstr ""
 
@@ -5457,165 +5518,161 @@ msgstr ""
 msgid "only atomic vectors can be tested to be sorted"
 msgstr ""
 
-#: src/main/sort.c:326 src/main/sort.c:1228 src/main/sort.c:1396
+#: src/main/sort.c:325 src/main/sort.c:1248
 msgid "'decreasing' must be TRUE or FALSE"
 msgstr ""
 
-#: src/main/sort.c:329 src/main/sort.c:600
+#: src/main/sort.c:328 src/main/sort.c:599
 msgid "only atomic vectors can be sorted"
 msgstr ""
 
-#: src/main/sort.c:331 src/main/sort.c:602 src/main/sort.c:1297
+#: src/main/sort.c:330 src/main/sort.c:601 src/main/sort.c:1317
 msgid "raw vectors cannot be sorted"
 msgstr ""
 
-#: src/main/sort.c:613
+#: src/main/sort.c:612
 msgid "NA or infinite index"
 msgstr ""
 
-#: src/main/sort.c:616
+#: src/main/sort.c:615
 #, c-format
 msgid "index %ld outside bounds"
 msgstr ""
 
-#: src/main/sort.c:621 src/main/sort.c:634
+#: src/main/sort.c:620 src/main/sort.c:633
 msgid "NA index"
 msgstr ""
 
-#: src/main/sort.c:623 src/main/sort.c:636
+#: src/main/sort.c:622 src/main/sort.c:635
 #, c-format
 msgid "index %d outside bounds"
 msgstr ""
 
-#: src/main/sort.c:1237
+#: src/main/sort.c:1257
 #, c-format
 msgid "argument %d is not a vector"
 msgstr ""
 
-#: src/main/sort.c:1239
+#: src/main/sort.c:1259
 msgid "argument lengths differ"
 msgstr ""
 
-#: src/main/sort.c:1324
+#: src/main/sort.c:1344
 msgid "invalid ties.method for rank() [should never happen]"
 msgstr ""
 
-#: src/main/sort.c:1429
-msgid "too large a range of values in 'x'"
-msgstr ""
-
-#: src/main/source.c:215
+#: src/main/source.c:220
 msgid "coercion of 'text' to character was unsuccessful"
 msgstr ""
 
-#: src/main/source.c:231
+#: src/main/source.c:236
 #, c-format
 msgid "argument '%s = \"%s\"' will be ignored"
 msgstr ""
 
-#: src/main/split.c:38
+#: src/main/split.c:39
 msgid "first argument must be a vector"
 msgstr ""
 
-#: src/main/split.c:40
+#: src/main/split.c:41
 msgid "second argument must be a factor"
 msgstr ""
 
-#: src/main/split.c:45
+#: src/main/split.c:46
 msgid "group length is 0 but data length > 0"
 msgstr ""
 
-#: src/main/split.c:47
+#: src/main/split.c:48
 msgid "data length is not a multiple of split variable"
 msgstr ""
 
-#: src/main/split.c:56
+#: src/main/split.c:58
 msgid "factor has bad level"
 msgstr ""
 
-#: src/main/sprintf.c:94
+#: src/main/sprintf.c:97
 #, c-format
 msgid "required resulting string length %d is greater than maximal %d"
 msgstr ""
 
-#: src/main/sprintf.c:102
+#: src/main/sprintf.c:105
 msgid "'fmt' is not a character vector"
 msgstr ""
 
-#: src/main/sprintf.c:107
+#: src/main/sprintf.c:110
 #, c-format
 msgid "only %d arguments are allowed"
 msgstr ""
 
-#: src/main/sprintf.c:114
+#: src/main/sprintf.c:117
 #, c-format
 msgid "invalid type of argument[%d]: '%s'"
 msgstr ""
 
-#: src/main/sprintf.c:125 src/main/sprintf.c:128
+#: src/main/sprintf.c:128 src/main/sprintf.c:131
 msgid "arguments cannot be recycled to the same length"
 msgstr ""
 
-#: src/main/sprintf.c:150 src/main/sprintf.c:257
+#: src/main/sprintf.c:153 src/main/sprintf.c:260
 #, c-format
 msgid "'fmt' length exceeds maximal format length %d"
 msgstr ""
 
-#: src/main/sprintf.c:169
+#: src/main/sprintf.c:172
 #, c-format
 msgid "unrecognised format specification '%s'"
 msgstr ""
 
-#: src/main/sprintf.c:180 src/main/sprintf.c:186 src/main/sprintf.c:199
-#: src/main/sprintf.c:206
+#: src/main/sprintf.c:183 src/main/sprintf.c:189 src/main/sprintf.c:202
+#: src/main/sprintf.c:209
 #, c-format
 msgid "reference to non-existent argument %d"
 msgstr ""
 
-#: src/main/sprintf.c:218
+#: src/main/sprintf.c:221
 msgid "at most one asterisk '*' is supported in each conversion specification"
 msgstr ""
 
-#: src/main/sprintf.c:228
+#: src/main/sprintf.c:231
 msgid "argument for '*' conversion specification must be a number"
 msgstr ""
 
-#: src/main/sprintf.c:266
+#: src/main/sprintf.c:269
 msgid "coercion has changed vector length to 0"
 msgstr ""
 
-#: src/main/sprintf.c:339 src/main/sprintf.c:353 src/main/sprintf.c:367
-#: src/main/sprintf.c:402
+#: src/main/sprintf.c:343 src/main/sprintf.c:357 src/main/sprintf.c:371
+#: src/main/sprintf.c:406
 #, c-format
 msgid "invalid format '%s'; %s"
 msgstr ""
 
-#: src/main/sprintf.c:340
+#: src/main/sprintf.c:344
 #, c-format
 msgid "use format %d or %i for logical objects"
 msgstr ""
 
-#: src/main/sprintf.c:354
+#: src/main/sprintf.c:358
 #, c-format
 msgid "use format %d, %i, %o, %x or %X for integer objects"
 msgstr ""
 
-#: src/main/sprintf.c:368
+#: src/main/sprintf.c:372
 #, c-format
 msgid "use format %f, %e, %g or %a for numeric objects"
 msgstr ""
 
-#: src/main/sprintf.c:403
+#: src/main/sprintf.c:407
 #, c-format
 msgid "use format %s for character objects"
 msgstr ""
 
-#: src/main/sprintf.c:408
+#: src/main/sprintf.c:412
 #, c-format
 msgid "likely truncation of character string to %d characters"
 msgstr ""
 
-#: src/main/sprintf.c:417
+#: src/main/sprintf.c:421
 msgid "unsupported type"
 msgstr ""
 
@@ -5623,377 +5680,381 @@ msgstr ""
 msgid "R_LibraryFileName: buffer too small"
 msgstr ""
 
-#: src/main/subassign.c:117
+#: src/main/subassign.c:118
 msgid "attempt to enlarge non-vector"
 msgstr ""
 
-#: src/main/subassign.c:122
+#: src/main/subassign.c:123
 #, c-format
 msgid "assignment outside vector/list limits (extending from %d to %d)"
 msgstr ""
 
-#: src/main/subassign.c:367
+#: src/main/subassign.c:391
 #, c-format
 msgid "incompatible types (from %s to %s) in subassignment type fix"
 msgstr ""
 
-#: src/main/subassign.c:502 src/main/subassign.c:782 src/main/subassign.c:785
-#: src/main/subassign.c:1076
+#: src/main/subassign.c:550 src/main/subassign.c:830 src/main/subassign.c:833
+#: src/main/subassign.c:1133
 msgid "NAs are not allowed in subscripted assignments"
 msgstr ""
 
-#: src/main/subassign.c:520 src/main/subassign.c:796 src/main/subassign.c:1068
-#: src/main/subassign.c:1641
+#: src/main/subassign.c:568 src/main/subassign.c:844 src/main/subassign.c:1125
+#: src/main/subassign.c:1705
 msgid "replacement has length zero"
 msgstr ""
 
-#: src/main/subassign.c:522 src/main/subassign.c:798 src/main/subassign.c:1070
+#: src/main/subassign.c:570 src/main/subassign.c:846 src/main/subassign.c:1127
 msgid "number of items to replace is not a multiple of replacement length"
 msgstr ""
 
-#: src/main/subassign.c:766
+#: src/main/subassign.c:814
 msgid "incorrect number of subscripts on matrix"
 msgstr ""
 
-#: src/main/subassign.c:1022
+#: src/main/subassign.c:1079
 #, c-format
 msgid "incompatible types (from %s to %s) in matrix subset assignment"
 msgstr ""
 
-#: src/main/subassign.c:1038 src/main/subset.c:928
+#: src/main/subassign.c:1095 src/main/subset.c:957
 msgid "incorrect number of subscripts"
 msgstr ""
 
-#: src/main/subassign.c:1214
+#: src/main/subassign.c:1272
 #, c-format
 msgid "incompatible types (from %s to %s) in array subset assignment"
 msgstr ""
 
-#: src/main/subassign.c:1249 src/main/subassign.c:1270
+#: src/main/subassign.c:1308 src/main/subassign.c:1329
 msgid "invalid subscript in list assign"
 msgstr ""
 
-#: src/main/subassign.c:1263
+#: src/main/subassign.c:1322
 msgid "invalid number of subscripts to list assign"
 msgstr ""
 
-#: src/main/subassign.c:1361
+#: src/main/subassign.c:1421
 msgid "SubAssignArgs: invalid number of arguments"
 msgstr ""
 
-#: src/main/subassign.c:1506
+#: src/main/subassign.c:1566
 msgid "result is zero-length and so cannot be a language object"
 msgstr ""
 
-#: src/main/subassign.c:1611
+#: src/main/subassign.c:1665
 msgid ""
 "[[<- defined for objects of type \"S4\" only for subclasses of environment"
 msgstr ""
 
-#: src/main/subassign.c:1617
+#: src/main/subassign.c:1677
 msgid "wrong args for environment subassignment"
 msgstr ""
 
-#: src/main/subassign.c:1643
+#: src/main/subassign.c:1707
 msgid "more elements supplied than there are to replace"
 msgstr ""
 
-#: src/main/subassign.c:1645
+#: src/main/subassign.c:1709
 msgid "[[ ]] with missing subscript"
 msgstr ""
 
-#: src/main/subassign.c:1657 src/main/subassign.c:1675
+#: src/main/subassign.c:1727 src/main/subassign.c:1745
 msgid "[[ ]] subscript out of bounds"
 msgstr ""
 
-#: src/main/subassign.c:1663 src/main/subassign.c:1841
+#: src/main/subassign.c:1733 src/main/subassign.c:1914
 msgid "[[ ]] improper number of subscripts"
 msgstr ""
 
-#: src/main/subassign.c:1808
+#: src/main/subassign.c:1879
 #, c-format
 msgid "incompatible types (from %s to %s) in [[ assignment"
 msgstr ""
 
-#: src/main/subassign.c:1852
+#: src/main/subassign.c:1925
 #, c-format
 msgid "[[ ]] subscript (%d) out of bounds"
 msgstr ""
 
-#: src/main/subassign.c:1905 src/main/subscript.c:143 src/main/subscript.c:145
-#: src/main/subscript.c:274 src/main/subscript.c:276 src/main/subscript.c:826
-#: src/main/subscript.c:828 src/main/subscript.c:919 src/main/subscript.c:921
-#: src/main/subset.c:1109
+#: src/main/subassign.c:1986 src/main/subscript.c:151 src/main/subscript.c:278
+#: src/main/subscript.c:903 src/main/subscript.c:996 src/main/subset.c:1176
 #, c-format
 msgid "invalid subscript type '%s'"
 msgstr ""
 
-#: src/main/subassign.c:1950
+#: src/main/subassign.c:2037
 msgid "no method for assigning subsets of this S4 class"
 msgstr ""
 
-#: src/main/subassign.c:2008
+#: src/main/subassign.c:2095
 msgid "Coercing LHS to a list"
 msgstr ""
 
-#: src/main/subscript.c:53 src/main/subscript.c:75 src/main/subscript.c:180
-#: src/main/subscript.c:204
-msgid "attempt to select less than one element"
+#: src/main/subscript.c:59 src/main/subscript.c:81 src/main/subscript.c:185
+#: src/main/subscript.c:209
+#, c-format
+msgid "attempt to select less than one element in %s"
 msgstr ""
 
-#: src/main/subscript.c:57 src/main/subscript.c:72 src/main/subscript.c:178
-#: src/main/subscript.c:208 src/main/subscript.c:304
-msgid "attempt to select more than one element"
+#: src/main/subscript.c:63 src/main/subscript.c:78 src/main/subscript.c:183
+#: src/main/subscript.c:213 src/main/subscript.c:305
+#, c-format
+msgid "attempt to select more than one element in %s"
 msgstr ""
 
-#: src/main/subscript.c:184
+#: src/main/subscript.c:189
 msgid "internal error in use of recursive indexing"
 msgstr ""
 
-#: src/main/subscript.c:252
+#: src/main/subscript.c:257
 #, c-format
 msgid "further partial match of '%s' to '%s'"
 msgstr ""
 
-#: src/main/subscript.c:302
+#: src/main/subscript.c:303
 #, c-format
 msgid "recursive indexing failed at level %d\n"
 msgstr ""
 
-#: src/main/subscript.c:309
+#: src/main/subscript.c:313
 #, c-format
 msgid "no such index at level %d\n"
 msgstr ""
 
-#: src/main/subscript.c:352
+#: src/main/subscript.c:360
 msgid "incorrect number of columns in matrix subscript"
 msgstr ""
 
-#: src/main/subscript.c:371 src/main/subscript.c:389 src/main/subscript.c:413
+#: src/main/subscript.c:379 src/main/subscript.c:397 src/main/subscript.c:421
 msgid "negative values are not allowed in a matrix subscript"
 msgstr ""
 
-#: src/main/subscript.c:492
+#: src/main/subscript.c:500
 msgid "(subscript) logical subscript too long"
 msgstr ""
 
-#: src/main/subscript.c:590 src/main/subscript.c:645
+#: src/main/subscript.c:668 src/main/subscript.c:723
 msgid "only 0's may be mixed with negative subscripts"
 msgstr ""
 
-#: src/main/subscript.c:618
+#: src/main/subscript.c:696
 msgid "subscript too large for 32-bit R"
 msgstr ""
 
-#: src/main/subscript.c:817
+#: src/main/subscript.c:895
 msgid "no 'dimnames' attribute for array"
 msgstr ""
 
-#: src/main/subscript.c:857
+#: src/main/subscript.c:931
 msgid "subscripting on non-vector"
 msgstr ""
 
-#: src/main/subset.c:261
+#: src/main/subset.c:260
 msgid "dimensions would exceed maximum size of array"
 msgstr ""
 
-#: src/main/subset.c:304 src/main/subset.c:333
+#: src/main/subset.c:304 src/main/subset.c:334
 msgid "matrix subscripting not handled for this type"
 msgstr ""
 
-#: src/main/subset.c:488
+#: src/main/subset.c:493
 msgid "array subscripting not handled for this type"
 msgstr ""
 
-#: src/main/subset.c:827
+#: src/main/subset.c:856
 msgid "incorrect number of dimensions"
 msgstr ""
 
-#: src/main/subset.c:924
+#: src/main/subset.c:953
 msgid "no index specified"
 msgstr ""
 
-#: src/main/subset.c:934
+#: src/main/subset.c:963
 msgid "this S4 class is not subsettable"
 msgstr ""
 
-#: src/main/subset.c:940
+#: src/main/subset.c:970
 msgid "wrong arguments for subsetting an environment"
 msgstr ""
 
-#: src/main/summary.c:30
+#: src/main/summary.c:33
 #, c-format
 msgid "invalid 'type' (%s) of argument"
 msgstr ""
 
-#: src/main/summary.c:66 src/main/summary.c:78 src/main/summary.c:103
+#: src/main/summary.c:69 src/main/summary.c:81 src/main/summary.c:106
 msgid "integer overflow - use sum(as.numeric(.))"
 msgstr ""
 
-#: src/main/summary.c:522
+#: src/main/summary.c:526
 #, c-format
 msgid "internal error ('op = %d' in do_summary).\t Call a Guru"
 msgstr ""
 
-#: src/main/summary.c:623
+#: src/main/summary.c:637
 msgid "Integer overflow - use sum(as.numeric(.))"
 msgstr ""
 
-#: src/main/summary.c:731
+#: src/main/summary.c:750
 msgid "no non-missing arguments, returning NA"
 msgstr ""
 
-#: src/main/summary.c:734
+#: src/main/summary.c:753
 msgid "no non-missing arguments to min; returning Inf"
 msgstr ""
 
-#: src/main/summary.c:736
+#: src/main/summary.c:755
 msgid "no non-missing arguments to max; returning -Inf"
 msgstr ""
 
-#: src/main/summary.c:801
-msgid "non-numeric argument"
-msgstr ""
-
-#: src/main/summary.c:845
+#: src/main/summary.c:913
 msgid "argument to 'which' is not logical"
 msgstr ""
 
-#: src/main/summary.c:889
+#: src/main/summary.c:957
 msgid "no arguments"
 msgstr ""
 
-#: src/main/summary.c:900 src/main/summary.c:917
+#: src/main/summary.c:968 src/main/summary.c:985
 msgid "invalid input type"
 msgstr ""
 
-#: src/main/summary.c:934
+#: src/main/summary.c:1002
 msgid "an argument will be fractionally recycled"
 msgstr ""
 
-#: src/main/sysutils.c:69 src/main/sysutils.c:83
+#: src/main/sysutils.c:68 src/main/sysutils.c:82
 #, c-format
 msgid "cannot determine file modification time of '%s'"
 msgstr ""
 
-#: src/main/sysutils.c:167
+#: src/main/sysutils.c:166
 msgid "encoding of a filename cannot be 'bytes'"
 msgstr ""
 
-#: src/main/sysutils.c:170 src/main/sysutils.c:803 src/main/sysutils.c:818
-#: src/main/sysutils.c:909 src/main/sysutils.c:924 src/main/sysutils.c:1020
+#: src/main/sysutils.c:169 src/main/sysutils.c:831 src/main/sysutils.c:846
+#: src/main/sysutils.c:975
 #, c-format
 msgid "unsupported conversion from '%s' in codepage %d"
 msgstr ""
 
-#: src/main/sysutils.c:179
+#: src/main/sysutils.c:178
 msgid "file name conversion problem -- name too long?"
 msgstr ""
 
-#: src/main/sysutils.c:180
+#: src/main/sysutils.c:179
 msgid "file name conversion problem"
 msgstr ""
 
-#: src/main/sysutils.c:249
+#: src/main/sysutils.c:248
 msgid "invalid filename pattern"
 msgstr ""
 
-#: src/main/sysutils.c:253
+#: src/main/sysutils.c:252
 msgid "invalid file extension"
 msgstr ""
 
-#: src/main/sysutils.c:255
+#: src/main/sysutils.c:254
 msgid "no 'pattern'"
 msgstr ""
 
-#: src/main/sysutils.c:257
+#: src/main/sysutils.c:256
 msgid "no 'tempdir'"
 msgstr ""
 
-#: src/main/sysutils.c:259
+#: src/main/sysutils.c:258
 msgid "no 'fileext'"
 msgstr ""
 
-#: src/main/sysutils.c:345 src/main/sysutils.c:348 src/main/sysutils.c:439
-#: src/main/sysutils.c:441 src/main/sysutils.c:477
+#: src/main/sysutils.c:328
+#, c-format
+msgid "system call failed: %s"
+msgstr ""
+
+#: src/main/sysutils.c:357 src/main/sysutils.c:360 src/main/sysutils.c:451
+#: src/main/sysutils.c:453 src/main/sysutils.c:489
 msgid "wrong type for argument"
 msgstr ""
 
-#: src/main/sysutils.c:443
+#: src/main/sysutils.c:455
 msgid "wrong length for argument"
 msgstr ""
 
-#: src/main/sysutils.c:464
+#: src/main/sysutils.c:476
 msgid "'Sys.setenv' is not available on this system"
 msgstr ""
 
-#: src/main/sysutils.c:508
+#: src/main/sysutils.c:520
 msgid "this system cannot unset environment variables: setting to \"\""
 msgstr ""
 
-#: src/main/sysutils.c:519
+#: src/main/sysutils.c:531
 msgid "'Sys.unsetenv' is not available on this system"
 msgstr ""
 
-#: src/main/sysutils.c:616
+#: src/main/sysutils.c:628
 #, c-format
 msgid "unsupported conversion from '%s' to '%s' in codepage %d"
 msgstr ""
 
-#: src/main/sysutils.c:631
+#: src/main/sysutils.c:643
 msgid "'x' must be a character vector"
 msgstr ""
 
-#: src/main/sysutils.c:646
-msgid "'x' must be a list of NULL or raw vectors"
+#: src/main/sysutils.c:658
+msgid "'x' must be a character vector or a list of NULL or raw vectors"
 msgstr ""
 
-#: src/main/sysutils.c:724 src/main/sysutils.c:789 src/main/sysutils.c:895
-#: src/main/sysutils.c:994 src/main/sysutils.c:1010 src/main/sysutils.c:1087
+#: src/main/sysutils.c:736 src/main/sysutils.c:914 src/main/sysutils.c:932
+#: src/main/sysutils.c:949 src/main/sysutils.c:965 src/main/sysutils.c:1042
 #, c-format
 msgid "'%s' must be called on a CHARSXP"
 msgstr ""
 
-#: src/main/sysutils.c:792 src/main/sysutils.c:898 src/main/sysutils.c:1015
-#: src/main/sysutils.c:1090
+#: src/main/sysutils.c:805 src/main/sysutils.c:970 src/main/sysutils.c:1045
 msgid "translating strings with \"bytes\" encoding is not allowed"
 msgstr ""
 
-#: src/main/sysutils.c:1116
+#: src/main/sysutils.c:818
+msgid "internal error: no translation needed"
+msgstr ""
+
+#: src/main/sysutils.c:1071
 #, c-format
 msgid "unsupported conversion to '%s' from codepage %d"
 msgstr ""
 
-#: src/main/sysutils.c:1530
+#: src/main/sysutils.c:1486
 #, c-format
 msgid "invalid Unicode point %u"
 msgstr ""
 
-#: src/main/sysutils.c:1632
+#: src/main/sysutils.c:1588
 msgid "cannot create 'R_TempDir'"
 msgstr ""
 
-#: src/main/sysutils.c:1636 src/main/sysutils.c:1644 src/main/sysutils.c:1647
+#: src/main/sysutils.c:1592 src/main/sysutils.c:1600 src/main/sysutils.c:1603
 msgid "unable to set R_SESSION_TMPDIR"
 msgstr ""
 
-#: src/main/sysutils.c:1656
+#: src/main/sysutils.c:1612
 msgid "cannot allocate 'R_TempDir'"
 msgstr ""
 
-#: src/main/sysutils.c:1693
+#: src/main/sysutils.c:1649
 msgid "temporary name too long"
 msgstr ""
 
-#: src/main/sysutils.c:1708
+#: src/main/sysutils.c:1664
 msgid "cannot find unused tempfile name"
 msgstr ""
 
-#: src/main/sysutils.c:1711
+#: src/main/sysutils.c:1667
 msgid "allocation failed in R_tmpnam2"
 msgstr ""
 
-#: src/main/sysutils.c:1838
+#: src/main/sysutils.c:1794
 msgid "'dirmark = TRUE' is not supported on this platform"
 msgstr ""
 
@@ -6003,193 +6064,199 @@ msgid "length %d is too large for hashing"
 msgstr ""
 
 #: src/main/unique.c:490 src/main/unique.c:519 src/main/unique.c:549
-#: src/main/unique.c:575 src/main/unique.c:614
+#: src/main/unique.c:573 src/main/unique.c:612
 msgid "'duplicated' applies only to vectors"
 msgstr ""
 
-#: src/main/unique.c:619
+#: src/main/unique.c:617
 msgid "any_duplicated3(., <0-length incomp>)"
 msgstr ""
 
-#: src/main/unique.c:669
+#: src/main/unique.c:667
 msgid "'fromLast' must be length 1"
 msgstr ""
 
-#: src/main/unique.c:672
+#: src/main/unique.c:670
 msgid "'fromLast' must be TRUE or FALSE"
 msgstr ""
 
-#: src/main/unique.c:683
+#: src/main/unique.c:681
 #, c-format
 msgid "%s() applies only to vectors"
 msgstr ""
 
-#: src/main/unique.c:690
+#: src/main/unique.c:688
 msgid "'nmax' must be positive"
 msgstr ""
 
-#: src/main/unique.c:922
+#: src/main/unique.c:985
 msgid "'match' requires vector arguments"
 msgstr ""
 
-#: src/main/unique.c:970 src/main/unique.c:1125
+#: src/main/unique.c:1033 src/main/unique.c:1171
 msgid "argument is not of mode character"
 msgstr ""
 
-#: src/main/unique.c:1251
+#: src/main/unique.c:1296
 msgid "... used in a situation where it does not exist"
 msgstr ""
 
-#: src/main/unique.c:1342
-msgid "unable to find a closure from within which 'match.call' was called"
+#: src/main/unique.c:1302
+msgid "... is not a pairlist"
 msgstr ""
 
-#: src/main/unique.c:1536
+#: src/main/unique.c:1531
 msgid "non-numeric data frame in rowsum"
 msgstr ""
 
-#: src/main/unique.c:1568
+#: src/main/unique.c:1563
 msgid "this cannot happen"
 msgstr ""
 
-#: src/main/unique.c:1639
+#: src/main/unique.c:1634
 msgid "'names' must be a character vector"
 msgstr ""
 
-#: src/main/unique.c:1643
-msgid "'sep' must be a character string"
-msgstr ""
-
-#: src/main/util.c:88 src/main/util.c:106
+#: src/main/util.c:87 src/main/util.c:105
 msgid "object is not a matrix"
 msgstr ""
 
-#: src/main/util.c:254 src/main/util.c:268 src/main/util.c:285
+#: src/main/util.c:303 src/main/util.c:315 src/main/util.c:326
+#: src/main/util.c:341
 #, c-format
 msgid "type %d is unimplemented in '%s'"
 msgstr ""
 
-#: src/main/util.c:297
+#: src/main/util.c:352
 #, c-format
 msgid "unimplemented type '%s' in '%s'\n"
 msgstr ""
 
-#: src/main/util.c:299
+#: src/main/util.c:354
 #, c-format
 msgid "unimplemented type (%d) in '%s'\n"
 msgstr ""
 
-#: src/main/util.c:424
+#: src/main/util.c:479
 msgid "invalid tag in name extraction"
 msgstr ""
 
-#: src/main/util.c:434
+#: src/main/util.c:489
 #, c-format
 msgid "%d argument passed to .Internal(%s) which requires %d"
 msgid_plural "%d arguments passed to .Internal(%s) which requires %d"
 msgstr[0] ""
 msgstr[1] ""
 
-#: src/main/util.c:440
+#: src/main/util.c:495
 #, c-format
 msgid "%d argument passed to '%s' which requires %d"
 msgid_plural "%d arguments passed to '%s' which requires %d"
 msgstr[0] ""
 msgstr[1] ""
 
-#: src/main/util.c:455
+#: src/main/util.c:510
 #, c-format
 msgid "supplied argument name '%s' does not match '%s'"
 msgstr ""
 
-#: src/main/util.c:465
+#: src/main/util.c:520
 #, c-format
 msgid "'nthcdr' list shorter than %d"
 msgstr ""
 
-#: src/main/util.c:470
+#: src/main/util.c:525
 msgid "'nthcdr' needs a list to CDR down"
 msgstr ""
 
-#: src/main/util.c:586
+#: src/main/util.c:641
 msgid "'all.x' must be TRUE or FALSE"
 msgstr ""
 
-#: src/main/util.c:588
+#: src/main/util.c:643
 msgid "'all.y' must be TRUE or FALSE"
 msgstr ""
 
-#: src/main/util.c:700
+#: src/main/util.c:672
+msgid "number of rows in the result exceeds maximum vector length"
+msgstr ""
+
+#: src/main/util.c:764
 msgid "missing value is invalid"
 msgstr ""
 
-#: src/main/util.c:709 src/main/util.c:716
+#: src/main/util.c:773 src/main/util.c:780
 msgid "cannot change working directory"
 msgstr ""
 
-#: src/main/util.c:735 src/main/util.c:769 src/main/util.c:810
-#: src/main/util.c:852 src/main/util.c:981 src/main/util.c:1040
-#: src/main/util.c:1063
+#: src/main/util.c:800 src/main/util.c:834 src/main/util.c:875
+#: src/main/util.c:917 src/main/util.c:1046 src/main/util.c:1105
+#: src/main/util.c:1128
 msgid "a character vector argument expected"
 msgstr ""
 
-#: src/main/util.c:742 src/main/util.c:777 src/main/util.c:819
-#: src/main/util.c:860
+#: src/main/util.c:807 src/main/util.c:842 src/main/util.c:884
+#: src/main/util.c:925
 msgid "path too long"
 msgstr ""
 
-#: src/main/util.c:995
+#: src/main/util.c:1060
 msgid "only the first character of 'quote' will be used"
 msgstr ""
 
-#: src/main/util.c:1065
+#: src/main/util.c:1130
 msgid "a character vector 'value' expected"
 msgstr ""
 
-#: src/main/util.c:1068
+#: src/main/util.c:1133
 msgid "'value' must be of positive length"
 msgstr ""
 
-#: src/main/util.c:1197 src/main/util.c:1205
+#: src/main/util.c:1262 src/main/util.c:1270
 #, c-format
 msgid "invalid input '%s' in 'utf8towcs'"
 msgstr ""
 
-#: src/main/util.c:1290
+#: src/main/util.c:1355
 #, c-format
 msgid "invalid multibyte string at '%s'"
 msgstr ""
 
-#: src/main/util.c:1399
+#: src/main/util.c:1497
 msgid "error message truncated to 255 chars"
 msgstr ""
 
-#: src/main/util.c:1412
+#: src/main/util.c:1510
 msgid "warning message truncated to 255 chars"
 msgstr ""
 
-#: src/main/util.c:1819
+#: src/main/util.c:1659
+#, c-format
+msgid "accuracy loss in conversion from \"%s\" to numeric"
+msgstr ""
+
+#: src/main/util.c:1969
 msgid "all arguments must be named"
 msgstr ""
 
-#: src/main/util.c:1893
+#: src/main/util.c:2091
 msgid "ICU is not supported on this build"
 msgstr ""
 
-#: src/main/util.c:1954
+#: src/main/util.c:2158
 msgid "'breaks' is not sorted"
 msgstr ""
 
-#: src/main/util.c:1988 src/main/util.c:2034
+#: src/main/util.c:2192 src/main/util.c:2242
 #, c-format
 msgid "long vector '%s' is not supported"
 msgstr ""
 
-#: src/main/util.c:2087
+#: src/main/util.c:2296
 msgid "'eps.correct' must be 0, 1, or 2"
 msgstr ""
 
-#: src/main/util.c:2115
+#: src/main/util.c:2324
 msgid "'x' must be a vector"
 msgstr ""
 
@@ -6231,14 +6298,6 @@ msgstr ""
 "         .را تایپ کنید q() در صورت تمایل به خروج از نرم‌افزار، دستور\n"
 "\n"
 
-#: src/main/vfonts.c:50
-msgid "vfont routines cannot be accessed in module"
-msgstr ""
-
-#: src/main/vfonts.c:67 src/main/vfonts.c:80 src/main/vfonts.c:98
-msgid "Hershey fonts cannot be loaded"
-msgstr ""
-
 #: src/main/xspline.c:60
 #, c-format
 msgid "add_point - reached MAXNUMPTS (%d)"
@@ -6260,7 +6319,7 @@ msgstr ""
 msgid "There must be at least three control points"
 msgstr ""
 
-#: src/modules/X11/dataentry.c:1871 src/modules/X11/devX11.c:1246
+#: src/modules/X11/dataentry.c:1874 src/modules/X11/devX11.c:1248
 #, c-format
 msgid "X11 protocol error: %s"
 msgstr ""
@@ -6281,34 +6340,34 @@ msgid ""
 "Consider using X11 with colortype=\"pseudo.cube\" or \"gray\"."
 msgstr ""
 
-#: src/modules/X11/devX11.c:1027
+#: src/modules/X11/devX11.c:1029
 msgid ""
 "could not find any X11 fonts\n"
 "Check that the Font Path is correct."
 msgstr ""
 
-#: src/modules/X11/devX11.c:1087
+#: src/modules/X11/devX11.c:1089
 #, c-format
 msgid "X11 used font size %d when %d was requested"
 msgstr ""
 
-#: src/modules/X11/devX11.c:1121
+#: src/modules/X11/devX11.c:1123
 #, c-format
 msgid "X11 font %s, face %d at size %d could not be loaded"
 msgstr ""
 
-#: src/modules/X11/devX11.c:1130
+#: src/modules/X11/devX11.c:1132
 msgid ""
 "semi-transparency is not supported on this device: reported only once per "
 "page"
 msgstr ""
 
-#: src/modules/X11/devX11.c:1254
+#: src/modules/X11/devX11.c:1256
 #, c-format
 msgid "X11 I/O error while opening X11 connection to '%s'"
 msgstr ""
 
-#: src/modules/X11/devX11.c:1272
+#: src/modules/X11/devX11.c:1273
 msgid "X11 fatal IO error: please save work and shut down R"
 msgstr ""
 
@@ -6429,206 +6488,264 @@ msgstr ""
 msgid "attempt to use the locator after dev.hold()"
 msgstr ""
 
-#: src/modules/X11/devX11.c:3111
+#: src/modules/X11/devX11.c:3117
 #, c-format
 msgid "unable to start device %s"
 msgstr ""
 
-#: src/modules/X11/devX11.c:3138
+#: src/modules/X11/devX11.c:3144
 msgid "invalid 'width' or 'height'"
 msgstr ""
 
-#: src/modules/X11/devX11.c:3145
+#: src/modules/X11/devX11.c:3151
 msgid "invalid colortype passed to X11 driver"
 msgstr ""
 
-#: src/modules/X11/devX11.c:3159
+#: src/modules/X11/devX11.c:3165
 msgid "unknown X11 color/colour model -- using monochrome"
 msgstr ""
 
-#: src/modules/X11/devX11.c:3249
+#: src/modules/X11/devX11.c:3255
 msgid "no plot on device to save"
 msgstr ""
 
-#: src/modules/X11/devX11.c:3251
+#: src/modules/X11/devX11.c:3257
 msgid "not an open X11cairo device"
 msgstr ""
 
-#: src/modules/X11/devX11.c:3260
+#: src/modules/X11/devX11.c:3266
 #, c-format
 msgid "cannot open file '%s'"
 msgstr ""
 
-#: src/modules/X11/devX11.c:3277
+#: src/modules/X11/devX11.c:3283
 msgid "savePlot() is not supported on this build"
 msgstr ""
 
-#: src/modules/X11/devX11.c:3317
+#: src/modules/X11/devX11.c:3323
 msgid "unable to contact X11 display"
 msgstr ""
 
-#: src/modules/X11/devX11.c:3366
+#: src/modules/X11/devX11.c:3372
 #, c-format
 msgid "clipboard cannot be read (error code %d)"
 msgstr ""
 
-#: src/modules/X11/devX11.c:3397
+#: src/modules/X11/devX11.c:3408
 msgid "cannot allocate memory for X11Routines structure"
 msgstr ""
 
-#: src/modules/internet/internet.c:188 src/modules/internet/internet.c:192
-#: src/modules/internet/internet.c:198 src/modules/internet/internet.c:210
+#: src/modules/internet/internet.c:113
+msgid "for https:// URLs use method = \"wininet\""
+msgstr ""
+
+#: src/modules/internet/internet.c:153 src/modules/internet/internet.c:274
+#: src/modules/internet/internet.c:758
+#, c-format
+msgid "scheme not supported in URL '%s'"
+msgstr ""
+
+#: src/modules/internet/internet.c:348 src/modules/internet/internet.c:352
+#: src/modules/internet/internet.c:357 src/modules/internet/internet.c:381
+#: src/modules/internet/libcurl.c:791 src/modules/internet/libcurl.c:795
+#: src/modules/internet/libcurl.c:801 src/modules/internet/libcurl.c:814
+#: src/modules/internet/libcurl.c:822
 msgid "allocation of url connection failed"
 msgstr ""
 
-#: src/modules/internet/internet.c:286
+#: src/modules/internet/internet.c:455
 msgid "only first element of 'url' argument used"
 msgstr ""
 
-#: src/modules/internet/internet.c:292
+#: src/modules/internet/internet.c:461
 msgid "only first element of 'destfile' argument used"
 msgstr ""
 
-#: src/modules/internet/internet.c:317
+#: src/modules/internet/internet.c:480 src/modules/internet/libcurl.c:499
 msgid "Download progress"
 msgstr ""
 
-#: src/modules/internet/internet.c:339
+#: src/modules/internet/internet.c:502
 #, c-format
 msgid "cannot open URL '%s', reason '%s'"
 msgstr ""
 
-#: src/modules/internet/internet.c:346 src/modules/internet/internet.c:372
-#: src/modules/internet/internet.c:474
+#: src/modules/internet/internet.c:509 src/modules/internet/internet.c:536
+#: src/modules/internet/internet.c:661
 #, c-format
 msgid "cannot open destfile '%s', reason '%s'"
 msgstr ""
 
-#: src/modules/internet/internet.c:377 src/modules/internet/internet.c:479
+#: src/modules/internet/internet.c:541 src/modules/internet/internet.c:666
+#: src/modules/internet/libcurl.c:530
 #, c-format
 msgid "trying URL '%s'\n"
 msgstr ""
 
-#: src/modules/internet/internet.c:384 src/modules/internet/internet.c:486
-msgid "opened URL\n"
+#: src/modules/internet/internet.c:640 src/modules/internet/internet.c:751
+#: src/modules/internet/libcurl.c:578
+#, c-format
+msgid "downloaded length %0.f != reported length %0.f"
 msgstr ""
 
-#: src/modules/internet/internet.c:455 src/modules/internet/internet.c:560
+#: src/modules/internet/internet.c:645 src/modules/internet/internet.c:756
 #, c-format
-msgid "downloaded length %d != reported length %d"
+msgid "cannot open URL '%s'"
 msgstr ""
 
-#: src/modules/internet/internet.c:460 src/modules/internet/internet.c:565
+#: src/modules/internet/internet.c:779 src/modules/internet/internet.c:944
 #, c-format
-msgid "cannot open URL '%s'"
+msgid "cannot open URL '%s': HTTP status was '%d %s'"
 msgstr ""
 
-#: src/modules/internet/internet.c:593 src/modules/internet/internet.c:828
+#: src/modules/internet/internet.c:915 src/modules/internet/internet.c:929
+#: src/modules/internet/internet.c:1019 src/modules/internet/internet.c:1028
 #, c-format
-msgid "cannot open: HTTP status was '%d %s'"
+msgid "InternetOpenUrl failed: '%s'"
 msgstr ""
 
-#: src/modules/internet/internet.c:772 src/modules/internet/internet.c:935
-msgid "InternetOpenUrl timed out"
+#: src/modules/internet/libcurl.c:159
+#, c-format
+msgid "URL '%s': status was '%d %s'"
 msgstr ""
 
-#: src/modules/internet/internet.c:799 src/modules/internet/internet.c:813
-#: src/modules/internet/internet.c:957 src/modules/internet/internet.c:966
+#: src/modules/internet/libcurl.c:163
 #, c-format
-msgid "InternetOpenUrl failed: '%s'"
+msgid "URL '%s': status was '%s'"
+msgstr ""
+
+#: src/modules/internet/libcurl.c:240
+msgid "curlGetHeaders is not supported on this platform"
 msgstr ""
 
-#: src/modules/internet/internet.c:870
-msgid "Internet read timed out"
+#: src/modules/internet/libcurl.c:249 src/modules/internet/libcurl.c:252
+#, c-format
+msgid "invalid %s argument"
+msgstr ""
+
+#: src/modules/internet/libcurl.c:269
+#, c-format
+msgid ""
+"libcurl error code %d\n"
+"\t%s\n"
+msgstr ""
+
+#: src/modules/internet/libcurl.c:404
+msgid "download.file(method = \"libcurl\") is not supported on this platform"
+msgstr ""
+
+#: src/modules/internet/libcurl.c:420
+msgid "lengths of 'url' and 'destfile' must match"
+msgstr ""
+
+#: src/modules/internet/libcurl.c:481
+#, c-format
+msgid "URL %s: cannot open destfile '%s', reason '%s'"
 msgstr ""
 
-#: src/modules/internet/nanoftp.c:288 src/modules/internet/nanoftp.c:301
-#: src/modules/internet/nanoftp.c:312 src/modules/internet/nanoftp.c:346
-#: src/modules/internet/nanoftp.c:356
+#: src/modules/internet/libcurl.c:593
+msgid "cannot download all files"
+msgstr ""
+
+#: src/modules/internet/libcurl.c:727
+msgid "cannot read from connection"
+msgstr ""
+
+#: src/modules/internet/libcurl.c:763
+msgid "cannot open connection"
+msgstr ""
+
+#: src/modules/internet/libcurl.c:826
+msgid "url(method = \"libcurl\") is not supported on this platform"
+msgstr ""
+
+#: src/modules/internet/nanoftp.c:289 src/modules/internet/nanoftp.c:302
+#: src/modules/internet/nanoftp.c:313 src/modules/internet/nanoftp.c:347
+#: src/modules/internet/nanoftp.c:357
 msgid "RxmlNanoFTPScanURL: overlong (invalid?) URL"
 msgstr ""
 
-#: src/modules/internet/nanoftp.c:389
+#: src/modules/internet/nanoftp.c:390
 msgid "removing FTP proxy info"
 msgstr ""
 
-#: src/modules/internet/nanoftp.c:391
+#: src/modules/internet/nanoftp.c:392
 #, c-format
 msgid "using FTP proxy '%s'"
 msgstr ""
 
-#: src/modules/internet/nanoftp.c:402 src/modules/internet/nanoftp.c:431
+#: src/modules/internet/nanoftp.c:403 src/modules/internet/nanoftp.c:432
 msgid "RxmlNanoFTPScanProxy: overlong (invalid?) URL"
 msgstr ""
 
-#: src/modules/internet/nanoftp.c:830
+#: src/modules/internet/nanoftp.c:833
 msgid "cannot resolve host"
 msgstr ""
 
-#: src/modules/internet/nanoftp.c:860
+#: src/modules/internet/nanoftp.c:863
 msgid "failed to connect to server"
 msgstr ""
 
-#: src/modules/internet/nanoftp.c:871
+#: src/modules/internet/nanoftp.c:874
 msgid "failed to get response from server"
 msgstr ""
 
-#: src/modules/internet/nanoftp.c:1134
+#: src/modules/internet/nanoftp.c:1137
 msgid "RxmlNanoFTPGetConnection: failed to create socket"
 msgstr ""
 
-#: src/modules/internet/nanoftp.c:1180
+#: src/modules/internet/nanoftp.c:1183
 msgid "failed to create a data connection"
 msgstr ""
 
-#: src/modules/internet/nanoftp.c:1188
+#: src/modules/internet/nanoftp.c:1191
 msgid "failed to bind a port"
 msgstr ""
 
-#: src/modules/internet/nanoftp.c:1195
+#: src/modules/internet/nanoftp.c:1198
 #, c-format
 msgid "could not listen on port %d"
 msgstr ""
 
-#: src/modules/internet/nanohttp.c:370 src/modules/internet/nanohttp.c:398
-#: src/modules/internet/nanohttp.c:407
+#: src/modules/internet/nanohttp.c:369 src/modules/internet/nanohttp.c:400
+#: src/modules/internet/nanohttp.c:412
 msgid "RxmlNanoHTTPScanURL: overlong (invalid?) URL"
 msgstr ""
 
-#: src/modules/internet/nanohttp.c:441
+#: src/modules/internet/nanohttp.c:446
 msgid "removing HTTP proxy info"
 msgstr ""
 
-#: src/modules/internet/nanohttp.c:443
+#: src/modules/internet/nanohttp.c:448
 #, c-format
 msgid "using HTTP proxy '%s'"
 msgstr ""
 
-#: src/modules/internet/nanohttp.c:454 src/modules/internet/nanohttp.c:490
+#: src/modules/internet/nanohttp.c:459 src/modules/internet/nanohttp.c:497
 msgid "RxmlNanoHTTPScanProxy: overlong (invalid?) URL"
 msgstr ""
 
-#: src/modules/internet/nanohttp.c:1107
+#: src/modules/internet/nanohttp.c:1135
 #, c-format
 msgid "unable to resolve '%s'"
 msgstr ""
 
-#: src/modules/internet/nanohttp.c:1134
+#: src/modules/internet/nanohttp.c:1168
 #, c-format
 msgid "connected to '%s' on port %d."
 msgstr ""
 
-#: src/modules/internet/nanohttp.c:1139
+#: src/modules/internet/nanohttp.c:1173
 #, c-format
 msgid "unable to connect to '%s' on port %d."
 msgstr ""
 
-#: src/modules/internet/nanohttp.c:1443
+#: src/modules/internet/nanohttp.c:1477
 #, c-format
 msgid "redirect to: '%s'"
 msgstr ""
 
-#: src/modules/internet/nanohttp.c:1454
+#: src/modules/internet/nanohttp.c:1488
 msgid "too many redirects, aborting ..."
 msgstr ""
 
@@ -6661,11 +6778,11 @@ msgstr ""
 #: src/modules/lapack/Lapack.c:730 src/modules/lapack/Lapack.c:779
 #: src/modules/lapack/Lapack.c:786 src/modules/lapack/Lapack.c:834
 #: src/modules/lapack/Lapack.c:840 src/modules/lapack/Lapack.c:894
-#: src/modules/lapack/Lapack.c:900 src/modules/lapack/Lapack.c:1134
-#: src/modules/lapack/Lapack.c:1140 src/modules/lapack/Lapack.c:1188
-#: src/modules/lapack/Lapack.c:1195 src/modules/lapack/Lapack.c:1199
-#: src/modules/lapack/Lapack.c:1227 src/modules/lapack/Lapack.c:1234
-#: src/modules/lapack/Lapack.c:1254
+#: src/modules/lapack/Lapack.c:900 src/modules/lapack/Lapack.c:1135
+#: src/modules/lapack/Lapack.c:1141 src/modules/lapack/Lapack.c:1189
+#: src/modules/lapack/Lapack.c:1196 src/modules/lapack/Lapack.c:1200
+#: src/modules/lapack/Lapack.c:1228 src/modules/lapack/Lapack.c:1235
+#: src/modules/lapack/Lapack.c:1255
 #, c-format
 msgid "error code %d from Lapack routine '%s'"
 msgstr ""
@@ -6745,28 +6862,28 @@ msgstr ""
 msgid "'a' must be a complex matrix"
 msgstr ""
 
-#: src/modules/lapack/Lapack.c:535 src/modules/lapack/Lapack.c:1042
+#: src/modules/lapack/Lapack.c:535 src/modules/lapack/Lapack.c:1043
 msgid "'a' is 0-diml"
 msgstr ""
 
-#: src/modules/lapack/Lapack.c:537 src/modules/lapack/Lapack.c:1044
+#: src/modules/lapack/Lapack.c:537 src/modules/lapack/Lapack.c:1045
 #, c-format
 msgid "'a' (%d x %d) must be square"
 msgstr ""
 
-#: src/modules/lapack/Lapack.c:543 src/modules/lapack/Lapack.c:1050
+#: src/modules/lapack/Lapack.c:543 src/modules/lapack/Lapack.c:1051
 msgid "no right-hand side in 'b'"
 msgstr ""
 
 #: src/modules/lapack/Lapack.c:546 src/modules/lapack/Lapack.c:560
-#: src/modules/lapack/Lapack.c:1053 src/modules/lapack/Lapack.c:1069
+#: src/modules/lapack/Lapack.c:1054 src/modules/lapack/Lapack.c:1070
 #, c-format
 msgid "'b' (%d x %d) must be compatible with 'a' (%d x %d)"
 msgstr ""
 
 #: src/modules/lapack/Lapack.c:581 src/modules/lapack/Lapack.c:948
-#: src/modules/lapack/Lapack.c:962 src/modules/lapack/Lapack.c:1017
-#: src/modules/lapack/Lapack.c:1091
+#: src/modules/lapack/Lapack.c:962 src/modules/lapack/Lapack.c:1018
+#: src/modules/lapack/Lapack.c:1092
 #, c-format
 msgid "argument %d of Lapack routine %s had invalid value"
 msgstr ""
@@ -6776,7 +6893,7 @@ msgid "'b' must be a complex matrix"
 msgstr ""
 
 #: src/modules/lapack/Lapack.c:670 src/modules/lapack/Lapack.c:716
-#: src/modules/lapack/Lapack.c:1181 src/modules/lapack/Lapack.c:1220
+#: src/modules/lapack/Lapack.c:1182 src/modules/lapack/Lapack.c:1221
 #, c-format
 msgid "right-hand side should have %d not %d rows"
 msgstr ""
@@ -6793,13 +6910,13 @@ msgstr ""
 msgid "'x' must be a square complex matrix"
 msgstr ""
 
-#: src/modules/lapack/Lapack.c:926 src/modules/lapack/Lapack.c:1000
-#: src/modules/lapack/Lapack.c:1039 src/modules/lapack/Lapack.c:1114
-#: src/modules/lapack/Lapack.c:1245
+#: src/modules/lapack/Lapack.c:926 src/modules/lapack/Lapack.c:1001
+#: src/modules/lapack/Lapack.c:1040 src/modules/lapack/Lapack.c:1115
+#: src/modules/lapack/Lapack.c:1246
 msgid "'a' must be a numeric matrix"
 msgstr ""
 
-#: src/modules/lapack/Lapack.c:933 src/modules/lapack/Lapack.c:1250
+#: src/modules/lapack/Lapack.c:933 src/modules/lapack/Lapack.c:1251
 msgid "'a' must be a square matrix"
 msgstr ""
 
@@ -6816,40 +6933,40 @@ msgstr ""
 msgid "the matrix is either rank-deficient or indefinite"
 msgstr ""
 
-#: src/modules/lapack/Lapack.c:987
+#: src/modules/lapack/Lapack.c:988
 msgid "'size' argument must be a positive integer"
 msgstr ""
 
-#: src/modules/lapack/Lapack.c:1002
+#: src/modules/lapack/Lapack.c:1003
 #, c-format
 msgid "'size' cannot exceed ncol(x) = %d"
 msgstr ""
 
-#: src/modules/lapack/Lapack.c:1003
+#: src/modules/lapack/Lapack.c:1004
 #, c-format
 msgid "'size' cannot exceed nrow(x) = %d"
 msgstr ""
 
-#: src/modules/lapack/Lapack.c:1015
+#: src/modules/lapack/Lapack.c:1016
 #, c-format
 msgid "element (%d, %d) is zero, so the inverse cannot be computed"
 msgstr ""
 
-#: src/modules/lapack/Lapack.c:1094
+#: src/modules/lapack/Lapack.c:1095
 #, c-format
 msgid "Lapack routine %s: system is exactly singular: U[%d,%d] = 0"
 msgstr ""
 
-#: src/modules/lapack/Lapack.c:1102
+#: src/modules/lapack/Lapack.c:1103
 #, c-format
 msgid "system is computationally singular: reciprocal condition number = %g"
 msgstr ""
 
-#: src/modules/lapack/Lapack.c:1174 src/modules/lapack/Lapack.c:1212
+#: src/modules/lapack/Lapack.c:1175 src/modules/lapack/Lapack.c:1213
 msgid "'b' must be a numeric matrix"
 msgstr ""
 
-#: src/modules/lapack/Lapack.c:1246
+#: src/modules/lapack/Lapack.c:1247
 msgid "argument 'logarithm' must be logical"
 msgstr ""
 
@@ -6859,7 +6976,7 @@ msgstr ""
 
 #: src/nmath/bessel_i.c:77 src/nmath/bessel_i.c:122
 #, c-format
-msgid "bessel_i(%g): ncalc (=%ld) != nb (=%ld); alpha=%g. Arg. out of range?\n"
+msgid "bessel_i(%g): ncalc (=%d) != nb (=%d); alpha=%g. Arg. out of range?\n"
 msgstr ""
 
 #: src/nmath/bessel_i.c:80 src/nmath/bessel_i.c:125
@@ -6867,16 +6984,21 @@ msgstr ""
 msgid "bessel_i(%g,nu=%g): precision lost in result\n"
 msgstr ""
 
-#: src/nmath/bessel_j.c:67
+#: src/nmath/bessel_j.c:64 src/nmath/bessel_j.c:118
+#, c-format
+msgid "besselJ(x, nu): nu=%g too large for bessel_j() algorithm"
+msgstr ""
+
+#: src/nmath/bessel_j.c:72
 msgid "bessel_j allocation error"
 msgstr ""
 
-#: src/nmath/bessel_j.c:75 src/nmath/bessel_j.c:118
+#: src/nmath/bessel_j.c:80 src/nmath/bessel_j.c:127
 #, c-format
-msgid "bessel_j(%g): ncalc (=%ld) != nb (=%ld); alpha=%g. Arg. out of range?\n"
+msgid "bessel_j(%g): ncalc (=%d) != nb (=%d); alpha=%g. Arg. out of range?\n"
 msgstr ""
 
-#: src/nmath/bessel_j.c:78 src/nmath/bessel_j.c:121
+#: src/nmath/bessel_j.c:83 src/nmath/bessel_j.c:130
 #, c-format
 msgid "bessel_j(%g,nu=%g): precision lost in result\n"
 msgstr ""
@@ -6887,7 +7009,7 @@ msgstr ""
 
 #: src/nmath/bessel_k.c:71 src/nmath/bessel_k.c:108
 #, c-format
-msgid "bessel_k(%g): ncalc (=%ld) != nb (=%ld); alpha=%g. Arg. out of range?\n"
+msgid "bessel_k(%g): ncalc (=%d) != nb (=%d); alpha=%g. Arg. out of range?\n"
 msgstr ""
 
 #: src/nmath/bessel_k.c:74 src/nmath/bessel_k.c:111
@@ -6895,16 +7017,21 @@ msgstr ""
 msgid "bessel_k(%g,nu=%g): precision lost in result\n"
 msgstr ""
 
-#: src/nmath/bessel_y.c:66
+#: src/nmath/bessel_y.c:63 src/nmath/bessel_y.c:125
+#, c-format
+msgid "besselY(x, nu): nu=%g too large for bessel_y() algorithm"
+msgstr ""
+
+#: src/nmath/bessel_y.c:71
 msgid "bessel_y allocation error"
 msgstr ""
 
-#: src/nmath/bessel_y.c:82 src/nmath/bessel_y.c:127
+#: src/nmath/bessel_y.c:87 src/nmath/bessel_y.c:136
 #, c-format
-msgid "bessel_y(%g): ncalc (=%ld) != nb (=%ld); alpha=%g. Arg. out of range?\n"
+msgid "bessel_y(%g): ncalc (=%d) != nb (=%d); alpha=%g. Arg. out of range?\n"
 msgstr ""
 
-#: src/nmath/bessel_y.c:85 src/nmath/bessel_y.c:130
+#: src/nmath/bessel_y.c:90 src/nmath/bessel_y.c:139
 #, c-format
 msgid "bessel_y(%g,nu=%g): precision lost in result\n"
 msgstr ""
@@ -6914,42 +7041,42 @@ msgstr ""
 msgid "'k' (%.2f) must be integer, rounded to %.0f"
 msgstr ""
 
-#: src/nmath/nmath.h:141
+#: src/nmath/nmath.h:156
 #, c-format
 msgid "argument out of domain in '%s'\n"
 msgstr ""
 
-#: src/nmath/nmath.h:144
+#: src/nmath/nmath.h:159
 #, c-format
 msgid "value out of range in '%s'\n"
 msgstr ""
 
-#: src/nmath/nmath.h:147
+#: src/nmath/nmath.h:162
 #, c-format
 msgid "convergence failed in '%s'\n"
 msgstr ""
 
-#: src/nmath/nmath.h:150
+#: src/nmath/nmath.h:165
 #, c-format
 msgid "full precision may not have been achieved in '%s'\n"
 msgstr ""
 
-#: src/nmath/nmath.h:153
+#: src/nmath/nmath.h:168
 #, c-format
 msgid "underflow occurred in '%s'\n"
 msgstr ""
 
-#: src/nmath/pbeta.c:48
+#: src/nmath/pbeta.c:64
 #, c-format
-msgid "pbeta_raw() -> bratio() gave error code %d"
+msgid "pbeta_raw(%g, a=%g, b=%g, ..) -> bratio() gave error code %d"
 msgstr ""
 
-#: src/nmath/pnbinom.c:79
+#: src/nmath/pnbinom.c:82
 #, c-format
 msgid "pnbinom_mu() -> bratio() gave error code %d"
 msgstr ""
 
-#: src/nmath/pnchisq.c:246
+#: src/nmath/pnchisq.c:295
 #, c-format
 msgid "pnchisq(x=%g, ..): not converged in %d iter."
 msgstr ""
@@ -6991,7 +7118,7 @@ msgstr ""
 msgid "X11 module cannot be loaded"
 msgstr ""
 
-#: src/unix/X11.c:126 src/unix/X11.c:132 src/unix/X11.c:138 src/unix/X11.c:144
+#: src/unix/X11.c:144 src/unix/X11.c:150 src/unix/X11.c:156 src/unix/X11.c:162
 msgid "X11 is not available"
 msgstr ""
 
@@ -7017,7 +7144,7 @@ msgid ""
 "Explicit lazy dynamic loading not supported on this platform. Using default."
 msgstr ""
 
-#: src/unix/dynload.c:240
+#: src/unix/dynload.c:232
 msgid "cannot get working directory!"
 msgstr ""
 
@@ -7031,93 +7158,93 @@ msgid ""
 "report using bug.report()"
 msgstr ""
 
-#: src/unix/sys-std.c:1082 src/unix/sys-std.c:1249
+#: src/unix/sys-std.c:1085 src/unix/sys-std.c:1255
 #, c-format
 msgid "problem in saving the history file '%s'"
 msgstr ""
 
-#: src/unix/sys-std.c:1156
+#: src/unix/sys-std.c:1162
 #, c-format
 msgid ""
 "Cannot open file '%s': %s\n"
 "\n"
 msgstr ""
 
-#: src/unix/sys-std.c:1220 src/unix/sys-std.c:1243
+#: src/unix/sys-std.c:1226 src/unix/sys-std.c:1249
 msgid "'file' argument is too long"
 msgstr ""
 
-#: src/unix/sys-std.c:1226 src/unix/sys-std.c:1228
+#: src/unix/sys-std.c:1232 src/unix/sys-std.c:1234
 msgid "no history mechanism available"
 msgstr ""
 
-#: src/unix/sys-std.c:1255
+#: src/unix/sys-std.c:1261
 msgid "problem in truncating the history file"
 msgstr ""
 
-#: src/unix/sys-std.c:1257 src/unix/sys-std.c:1259
+#: src/unix/sys-std.c:1263 src/unix/sys-std.c:1265
 msgid "no history available to save"
 msgstr ""
 
-#: src/unix/sys-std.c:1271
+#: src/unix/sys-std.c:1277
 msgid "invalid timestamp"
 msgstr ""
 
-#: src/unix/sys-unix.c:251
+#: src/unix/sys-unix.c:248
 msgid "non-empty character argument expected"
 msgstr ""
 
-#: src/unix/sys-unix.c:254
+#: src/unix/sys-unix.c:251
 msgid "'intern' must be logical and not NA"
 msgstr ""
 
-#: src/unix/sys-unix.c:266
+#: src/unix/sys-unix.c:269
 #, c-format
 msgid "cannot popen '%s', probable reason '%s'"
 msgstr ""
 
-#: src/unix/sys-unix.c:271
+#: src/unix/sys-unix.c:279
 #, c-format
 msgid "line %d may be truncated in call to system(, intern = TRUE)"
 msgstr ""
 
-#: src/unix/sys-unix.c:288
+#: src/unix/sys-unix.c:301
 #, c-format
 msgid "error in running command: '%s'"
 msgstr ""
 
-#: src/unix/sys-unix.c:290
+#: src/unix/sys-unix.c:303
 msgid "error in running command"
 msgstr ""
 
-#: src/unix/sys-unix.c:294
+#: src/unix/sys-unix.c:307
 #, c-format
 msgid "running command '%s' had status %d and error message '%s'"
 msgstr ""
 
-#: src/unix/sys-unix.c:399
+#: src/unix/sys-unix.c:412
 msgid "Sys.info() is not implemented on this system"
 msgstr ""
 
-#: src/unix/system.c:257
+#: src/unix/system.c:267
 #, c-format
 msgid "WARNING: --gui or -g without value ignored"
 msgstr ""
 
-#: src/unix/system.c:275
+#: src/unix/system.c:285
 #, c-format
 msgid "WARNING: unknown gui '%s', using X11\n"
 msgstr ""
 
-#: src/unix/system.c:278
+#: src/unix/system.c:288
 #, c-format
 msgid "WARNING: unknown gui '%s', using none\n"
 msgstr ""
 
-#: src/unix/system.c:388
+#: src/unix/system.c:373
 msgid "creating temporary file for '-e' failed"
 msgstr ""
 
-#: src/unix/system.c:469
+#: src/unix/system.c:454
 msgid "WARNING: Only editing the first in the list of files"
 msgstr ""
diff --git a/src/library/base/po/fr.po b/src/library/base/po/fr.po
index 8bbf8af..88b5a5a 100644
--- a/src/library/base/po/fr.po
+++ b/src/library/base/po/fr.po
@@ -6,8 +6,8 @@
 msgid ""
 msgstr ""
 "Project-Id-Version: R-2.12.0\n"
-"Report-Msgid-Bugs-To: bugs.r-project.org\n"
-"POT-Creation-Date: 2014-03-27 07:46+0000\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2016-04-01 10:28-0700\n"
 "PO-Revision-Date: 2014-03-17 10:36+0100\n"
 "Last-Translator: Philippe Grosjean <phgrosjean at sciviews.org>\n"
 "Language-Team: French <R-core at r-project.org>\n"
@@ -52,15 +52,15 @@ msgstr "La fonction ne peut 
 msgid "unknown type in \"CG\" method of 'optim'"
 msgstr "type inconnu dans la m�thode \"CG\" de 'optim'"
 
-#: src/appl/optim.c:665
+#: src/appl/optim.c:662
 msgid "REPORT must be > 0 (method = \"L-BFGS-B\")"
 msgstr "REPORT doit �tre > 0 (method = \"L-BFGS-B\")"
 
-#: src/appl/optim.c:688
+#: src/appl/optim.c:685
 msgid "L-BFGS-B needs finite values of 'fn'"
 msgstr "L-BFGS-B n�cessite des valeurs finies de 'fn'"
 
-#: src/appl/optim.c:744
+#: src/appl/optim.c:741
 msgid "trace, REPORT must be >= 0 (method = \"SANN\")"
 msgstr "trace, REPORT doit �tre >= 0 (method = \"SANN\")"
 
@@ -125,122 +125,127 @@ msgstr "l'acc
 msgid "problem in displaying '%ls'"
 msgstr "probl�me lors de l'affichage de '%ls'"
 
-#: src/gnuwin32/extra.c:116 src/gnuwin32/extra.c:159 src/gnuwin32/extra.c:349
-#: src/gnuwin32/extra.c:577 src/gnuwin32/extra.c:602 src/main/agrep.c:131
-#: src/main/agrep.c:135 src/main/agrep.c:775 src/main/agrep.c:780
-#: src/main/apply.c:293 src/main/apply.c:295 src/main/apply.c:298
-#: src/main/array.c:87 src/main/array.c:1137 src/main/array.c:1263
-#: src/main/array.c:1265 src/main/array.c:1266 src/main/array.c:1592
-#: src/main/array.c:1594 src/main/array.c:1596 src/main/attrib.c:196
+#: src/gnuwin32/extra.c:116 src/gnuwin32/extra.c:158 src/gnuwin32/extra.c:348
+#: src/gnuwin32/extra.c:574 src/gnuwin32/extra.c:599 src/main/agrep.c:131
+#: src/main/agrep.c:135 src/main/agrep.c:776 src/main/agrep.c:781
+#: src/main/apply.c:330 src/main/apply.c:332 src/main/apply.c:335
+#: src/main/array.c:90 src/main/array.c:1272 src/main/array.c:1411
+#: src/main/array.c:1413 src/main/array.c:1414 src/main/array.c:1758
+#: src/main/array.c:1760 src/main/array.c:1762 src/main/attrib.c:190
 #: src/main/builtin.c:88 src/main/builtin.c:97 src/main/builtin.c:116
-#: src/main/builtin.c:118 src/main/builtin.c:147 src/main/builtin.c:534
-#: src/main/builtin.c:550 src/main/builtin.c:739 src/main/builtin.c:741
-#: src/main/builtin.c:743 src/main/character.c:139 src/main/character.c:142
-#: src/main/character.c:203 src/main/character.c:1037
-#: src/main/character.c:1041 src/main/character.c:1276
-#: src/main/character.c:1280 src/main/character.c:1341
-#: src/main/character.c:1344 src/main/connections.c:1217
-#: src/main/connections.c:1223 src/main/connections.c:1226
-#: src/main/connections.c:1230 src/main/connections.c:1375
-#: src/main/connections.c:1391 src/main/connections.c:1396
-#: src/main/connections.c:1996 src/main/connections.c:2002
-#: src/main/connections.c:2006 src/main/connections.c:2010
-#: src/main/connections.c:2015 src/main/connections.c:2665
-#: src/main/connections.c:2670 src/main/connections.c:2673
-#: src/main/connections.c:2676 src/main/connections.c:3057
-#: src/main/connections.c:3062 src/main/connections.c:3068
-#: src/main/connections.c:3071 src/main/connections.c:3075
-#: src/main/connections.c:3090 src/main/connections.c:3140
-#: src/main/connections.c:3145 src/main/connections.c:3149
-#: src/main/connections.c:3153 src/main/connections.c:3157
-#: src/main/connections.c:3163 src/main/connections.c:3210
-#: src/main/connections.c:3216 src/main/connections.c:3220
-#: src/main/connections.c:3270 src/main/connections.c:3273
-#: src/main/connections.c:3547 src/main/connections.c:3550
-#: src/main/connections.c:3553 src/main/connections.c:3559
-#: src/main/connections.c:3666 src/main/connections.c:3672
-#: src/main/connections.c:3675 src/main/connections.c:3826
-#: src/main/connections.c:3829 src/main/connections.c:3833
-#: src/main/connections.c:3836 src/main/connections.c:3956
-#: src/main/connections.c:4074 src/main/connections.c:4077
-#: src/main/connections.c:4414 src/main/connections.c:4439
-#: src/main/connections.c:4474 src/main/connections.c:4489
-#: src/main/connections.c:4497 src/main/connections.c:4523
-#: src/main/connections.c:4669 src/main/connections.c:4673
-#: src/main/connections.c:4801 src/main/connections.c:4803
-#: src/main/connections.c:4805 src/main/connections.c:4833
-#: src/main/connections.c:4965 src/main/connections.c:4991
-#: src/main/connections.c:4995 src/main/connections.c:4999
-#: src/main/connections.c:5003 src/main/context.c:596 src/main/context.c:605
-#: src/main/context.c:609 src/main/datetime.c:775 src/main/datetime.c:865
-#: src/main/datetime.c:867 src/main/datetime.c:871 src/main/datetime.c:1026
-#: src/main/datetime.c:1028 src/main/datetime.c:1232 src/main/debug.c:228
-#: src/main/deparse.c:397 src/main/dotcode.c:478 src/main/dotcode.c:482
-#: src/main/dotcode.c:487 src/main/dounzip.c:322 src/main/dounzip.c:329
-#: src/main/dounzip.c:339 src/main/dounzip.c:344 src/main/dounzip.c:348
-#: src/main/dounzip.c:352 src/main/envir.c:1618 src/main/envir.c:1621
-#: src/main/envir.c:1742 src/main/envir.c:1747 src/main/envir.c:1813
-#: src/main/envir.c:1829 src/main/envir.c:1835 src/main/envir.c:1932
-#: src/main/envir.c:1940 src/main/envir.c:1947 src/main/envir.c:1958
-#: src/main/envir.c:2172 src/main/envir.c:2293 src/main/envir.c:2552
-#: src/main/envir.c:2762 src/main/envir.c:2776 src/main/envir.c:2783
-#: src/main/envir.c:2799 src/main/envir.c:3367 src/main/errors.c:1030
-#: src/main/eval.c:397 src/main/eval.c:406 src/main/eval.c:409
-#: src/main/grep.c:767 src/main/grep.c:772 src/main/grep.c:1061
-#: src/main/grep.c:1063 src/main/grep.c:1065 src/main/grep.c:1510
-#: src/main/grep.c:1514 src/main/grep.c:1519 src/main/grep.c:2323
-#: src/main/grep.c:2328 src/main/grep.c:2621 src/main/grep.c:2626
-#: src/main/memory.c:3736 src/main/paste.c:96 src/main/paste.c:395
-#: src/main/paste.c:402 src/main/paste.c:409 src/main/paste.c:414
-#: src/main/paste.c:419 src/main/paste.c:424 src/main/paste.c:427
-#: src/main/paste.c:435 src/main/paste.c:601 src/main/paste.c:606
+#: src/main/builtin.c:118 src/main/builtin.c:149 src/main/builtin.c:569
+#: src/main/builtin.c:585 src/main/builtin.c:773 src/main/builtin.c:775
+#: src/main/builtin.c:777 src/main/character.c:239 src/main/character.c:242
+#: src/main/character.c:247 src/main/character.c:788 src/main/character.c:791
+#: src/main/character.c:1289 src/main/character.c:1293
+#: src/main/character.c:1528 src/main/character.c:1532
+#: src/main/character.c:1593 src/main/character.c:1596
+#: src/main/connections.c:1208 src/main/connections.c:1214
+#: src/main/connections.c:1217 src/main/connections.c:1221
+#: src/main/connections.c:1367 src/main/connections.c:1383
+#: src/main/connections.c:1388 src/main/connections.c:1989
+#: src/main/connections.c:1995 src/main/connections.c:1999
+#: src/main/connections.c:2003 src/main/connections.c:2008
+#: src/main/connections.c:2659 src/main/connections.c:2664
+#: src/main/connections.c:2667 src/main/connections.c:2670
+#: src/main/connections.c:3053 src/main/connections.c:3058
+#: src/main/connections.c:3064 src/main/connections.c:3067
+#: src/main/connections.c:3071 src/main/connections.c:3086
+#: src/main/connections.c:3135 src/main/connections.c:3140
+#: src/main/connections.c:3144 src/main/connections.c:3148
+#: src/main/connections.c:3152 src/main/connections.c:3158
+#: src/main/connections.c:3203 src/main/connections.c:3209
+#: src/main/connections.c:3213 src/main/connections.c:3264
+#: src/main/connections.c:3267 src/main/connections.c:3543
+#: src/main/connections.c:3546 src/main/connections.c:3549
+#: src/main/connections.c:3555 src/main/connections.c:3662
+#: src/main/connections.c:3668 src/main/connections.c:3671
+#: src/main/connections.c:3823 src/main/connections.c:3826
+#: src/main/connections.c:3830 src/main/connections.c:3833
+#: src/main/connections.c:3954 src/main/connections.c:4085
+#: src/main/connections.c:4088 src/main/connections.c:4425
+#: src/main/connections.c:4450 src/main/connections.c:4485
+#: src/main/connections.c:4500 src/main/connections.c:4508
+#: src/main/connections.c:4534 src/main/connections.c:4680
+#: src/main/connections.c:4684 src/main/connections.c:4814
+#: src/main/connections.c:4816 src/main/connections.c:4818
+#: src/main/connections.c:4846 src/main/connections.c:4980
+#: src/main/connections.c:5019 src/main/connections.c:5024
+#: src/main/connections.c:5029 src/main/connections.c:5050
+#: src/main/context.c:607 src/main/context.c:616 src/main/context.c:620
+#: src/main/datetime.c:781 src/main/datetime.c:869 src/main/datetime.c:872
+#: src/main/datetime.c:876 src/main/datetime.c:1043 src/main/datetime.c:1045
+#: src/main/datetime.c:1250 src/main/debug.c:245 src/main/deparse.c:408
+#: src/main/dotcode.c:496 src/main/dotcode.c:500 src/main/dotcode.c:505
+#: src/main/dounzip.c:323 src/main/dounzip.c:330 src/main/dounzip.c:340
+#: src/main/dounzip.c:345 src/main/dounzip.c:349 src/main/dounzip.c:353
+#: src/main/envir.c:1752 src/main/envir.c:1755 src/main/envir.c:1876
+#: src/main/envir.c:1881 src/main/envir.c:1945 src/main/envir.c:1961
+#: src/main/envir.c:1967 src/main/envir.c:2079 src/main/envir.c:2087
+#: src/main/envir.c:2094 src/main/envir.c:2105 src/main/envir.c:2337
+#: src/main/envir.c:2458 src/main/envir.c:2755 src/main/envir.c:3022
+#: src/main/envir.c:3036 src/main/envir.c:3043 src/main/envir.c:3059
+#: src/main/envir.c:3642 src/main/errors.c:1011 src/main/eval.c:454
+#: src/main/eval.c:463 src/main/eval.c:466 src/main/grep.c:780
+#: src/main/grep.c:785 src/main/grep.c:1079 src/main/grep.c:1081
+#: src/main/grep.c:1083 src/main/grep.c:1528 src/main/grep.c:1532
+#: src/main/grep.c:1537 src/main/grep.c:2345 src/main/grep.c:2350
+#: src/main/grep.c:2652 src/main/grep.c:2657 src/main/memory.c:3823
+#: src/main/paste.c:96 src/main/paste.c:392 src/main/paste.c:399
+#: src/main/paste.c:406 src/main/paste.c:411 src/main/paste.c:416
+#: src/main/paste.c:421 src/main/paste.c:424 src/main/paste.c:432
+#: src/main/paste.c:437 src/main/paste.c:619 src/main/paste.c:624
 #: src/main/platform.c:306 src/main/platform.c:308 src/main/platform.c:310
 #: src/main/platform.c:326 src/main/platform.c:337 src/main/platform.c:390
-#: src/main/platform.c:392 src/main/platform.c:705 src/main/platform.c:707
-#: src/main/platform.c:1064 src/main/platform.c:1070 src/main/platform.c:1073
-#: src/main/platform.c:1076 src/main/platform.c:1079 src/main/platform.c:1082
-#: src/main/platform.c:1085 src/main/platform.c:1088 src/main/platform.c:1185
-#: src/main/platform.c:1188 src/main/platform.c:1191 src/main/platform.c:1229
-#: src/main/platform.c:1286 src/main/platform.c:1289 src/main/platform.c:1498
-#: src/main/platform.c:1501 src/main/platform.c:1504 src/main/platform.c:1540
-#: src/main/platform.c:1543 src/main/platform.c:1546 src/main/platform.c:1629
-#: src/main/platform.c:1645 src/main/platform.c:1684 src/main/platform.c:1686
-#: src/main/platform.c:1757 src/main/platform.c:1841 src/main/platform.c:2116
-#: src/main/platform.c:2176 src/main/platform.c:2353 src/main/platform.c:2356
-#: src/main/platform.c:2359 src/main/platform.c:2362 src/main/platform.c:2365
-#: src/main/platform.c:2368 src/main/platform.c:2568 src/main/platform.c:2571
-#: src/main/platform.c:2574 src/main/platform.c:2577 src/main/platform.c:2580
-#: src/main/platform.c:2583 src/main/platform.c:2657 src/main/platform.c:2665
-#: src/main/platform.c:2701 src/main/platform.c:2751 src/main/print.c:242
-#: src/main/print.c:248 src/main/print.c:270 src/main/print.c:276
-#: src/main/print.c:283 src/main/random.c:478 src/main/random.c:482
-#: src/main/random.c:489 src/main/random.c:517 src/main/saveload.c:1950
-#: src/main/saveload.c:1953 src/main/saveload.c:1956 src/main/saveload.c:2072
-#: src/main/saveload.c:2252 src/main/saveload.c:2257 src/main/saveload.c:2260
+#: src/main/platform.c:392 src/main/platform.c:708 src/main/platform.c:710
+#: src/main/platform.c:800 src/main/platform.c:1138 src/main/platform.c:1144
+#: src/main/platform.c:1147 src/main/platform.c:1150 src/main/platform.c:1153
+#: src/main/platform.c:1156 src/main/platform.c:1159 src/main/platform.c:1162
+#: src/main/platform.c:1259 src/main/platform.c:1262 src/main/platform.c:1265
+#: src/main/platform.c:1303 src/main/platform.c:1361 src/main/platform.c:1364
+#: src/main/platform.c:1573 src/main/platform.c:1576 src/main/platform.c:1579
+#: src/main/platform.c:1615 src/main/platform.c:1618 src/main/platform.c:1621
+#: src/main/platform.c:1657 src/main/platform.c:1690 src/main/platform.c:1692
+#: src/main/platform.c:1763 src/main/platform.c:1848 src/main/platform.c:2089
+#: src/main/platform.c:2149 src/main/platform.c:2334 src/main/platform.c:2337
+#: src/main/platform.c:2340 src/main/platform.c:2343 src/main/platform.c:2346
+#: src/main/platform.c:2349 src/main/platform.c:2555 src/main/platform.c:2558
+#: src/main/platform.c:2561 src/main/platform.c:2564 src/main/platform.c:2567
+#: src/main/platform.c:2570 src/main/platform.c:2648 src/main/platform.c:2656
+#: src/main/platform.c:2692 src/main/platform.c:2742 src/main/print.c:235
+#: src/main/print.c:241 src/main/print.c:263 src/main/print.c:269
+#: src/main/print.c:276 src/main/random.c:470 src/main/random.c:474
+#: src/main/random.c:481 src/main/random.c:509 src/main/saveload.c:1952
+#: src/main/saveload.c:1955 src/main/saveload.c:1958 src/main/saveload.c:2074
+#: src/main/saveload.c:2254 src/main/saveload.c:2259 src/main/saveload.c:2262
 #: src/main/saveload.c:2366 src/main/scan.c:684 src/main/scan.c:853
 #: src/main/scan.c:867 src/main/scan.c:871 src/main/scan.c:873
 #: src/main/scan.c:884 src/main/scan.c:911 src/main/scan.c:914
-#: src/main/scan.c:917 src/main/scan.c:972 src/main/seq.c:618
-#: src/main/seq.c:623 src/main/seq.c:631 src/main/seq.c:662 src/main/seq.c:666
-#: src/main/seq.c:672 src/main/seq.c:680 src/main/sort.c:175
-#: src/main/sysutils.c:585 src/main/sysutils.c:589 src/main/sysutils.c:593
-#: src/main/sysutils.c:599 src/main/sysutils.c:603 src/main/sysutils.c:1831
-#: src/main/sysutils.c:1835 src/main/unique.c:966 src/main/unique.c:1289
-#: src/main/unique.c:1349 src/main/unique.c:1356 src/main/unique.c:1750
-#: src/main/util.c:581 src/main/util.c:584 src/main/util.c:1825
-#: src/main/util.c:1994 src/main/util.c:1995 src/main/util.c:1996
-#: src/main/util.c:2013 src/main/util.c:2037 src/main/util.c:2041
-#: src/main/util.c:2043 src/main/util.c:2068 src/main/util.c:2070
-#: src/main/util.c:2072 src/main/util.c:2075 src/main/util.c:2078
-#: src/main/util.c:2082 src/main/util.c:2084 src/modules/X11/devX11.c:3241
-#: src/modules/X11/devX11.c:3244 src/modules/X11/devX11.c:3247
-#: src/modules/X11/devX11.c:3271 src/modules/internet/internet.c:284
-#: src/modules/internet/internet.c:290 src/modules/internet/internet.c:296
-#: src/modules/internet/internet.c:299 src/modules/internet/internet.c:303
+#: src/main/scan.c:917 src/main/scan.c:972 src/main/seq.c:622
+#: src/main/seq.c:627 src/main/seq.c:635 src/main/seq.c:666 src/main/seq.c:670
+#: src/main/seq.c:676 src/main/seq.c:684 src/main/sort.c:175
+#: src/main/sysutils.c:597 src/main/sysutils.c:601 src/main/sysutils.c:605
+#: src/main/sysutils.c:611 src/main/sysutils.c:615 src/main/sysutils.c:1787
+#: src/main/sysutils.c:1791 src/main/unique.c:1029 src/main/unique.c:1337
+#: src/main/unique.c:1341 src/main/unique.c:1351 src/main/unique.c:1747
+#: src/main/util.c:636 src/main/util.c:639 src/main/util.c:1379
+#: src/main/util.c:1393 src/main/util.c:1975 src/main/util.c:2198
+#: src/main/util.c:2199 src/main/util.c:2200 src/main/util.c:2217
+#: src/main/util.c:2245 src/main/util.c:2249 src/main/util.c:2251
+#: src/main/util.c:2277 src/main/util.c:2279 src/main/util.c:2281
+#: src/main/util.c:2284 src/main/util.c:2287 src/main/util.c:2291
+#: src/main/util.c:2293 src/modules/X11/devX11.c:3247
+#: src/modules/X11/devX11.c:3250 src/modules/X11/devX11.c:3253
+#: src/modules/X11/devX11.c:3277 src/modules/internet/internet.c:453
+#: src/modules/internet/internet.c:459 src/modules/internet/internet.c:465
+#: src/modules/internet/internet.c:468 src/modules/internet/internet.c:472
+#: src/modules/internet/internet.c:477 src/modules/internet/libcurl.c:414
+#: src/modules/internet/libcurl.c:418 src/modules/internet/libcurl.c:423
+#: src/modules/internet/libcurl.c:426 src/modules/internet/libcurl.c:430
 #: src/modules/lapack/Lapack.c:155 src/modules/lapack/Lapack.c:261
 #: src/modules/lapack/Lapack.c:709 src/modules/lapack/Lapack.c:818
-#: src/modules/lapack/Lapack.c:880 src/modules/lapack/Lapack.c:1214
-#: src/unix/sys-std.c:1217 src/unix/sys-std.c:1240
+#: src/modules/lapack/Lapack.c:880 src/modules/lapack/Lapack.c:1215
+#: src/unix/sys-std.c:1223 src/unix/sys-std.c:1246
 #, c-format
 msgid "invalid '%s' argument"
 msgstr "argument '%s' incorrect"
@@ -249,379 +254,356 @@ msgstr "argument '%s' incorrect"
 msgid "unsupported version of Windows"
 msgstr "version de Windows non support�e"
 
-#: src/gnuwin32/extra.c:267 src/main/apply.c:105 src/main/character.c:595
-#: src/main/connections.c:3555 src/main/context.c:642 src/main/context.c:661
-#: src/main/datetime.c:675 src/main/datetime.c:777 src/main/datetime.c:1030
-#: src/main/dotcode.c:199 src/main/errors.c:929 src/main/errors.c:962
-#: src/main/errors.c:1065 src/main/errors.c:1090 src/main/errors.c:1095
-#: src/main/errors.c:1368 src/main/identical.c:66 src/main/identical.c:67
-#: src/main/identical.c:68 src/main/identical.c:69 src/main/identical.c:70
-#: src/main/seq.c:185 src/main/seq.c:341 src/main/seq.c:346 src/main/seq.c:350
-#: src/main/seq.c:391 src/main/seq.c:395 src/main/seq.c:399
-#: src/main/sort.c:1224 src/main/sort.c:1307 src/main/sort.c:1311
-#: src/main/sort.c:1318 src/main/sort.c:1393 src/main/source.c:220
-#: src/main/summary.c:886 src/main/sysutils.c:251 src/main/util.c:986
-#: src/main/util.c:991 src/main/util.c:998 src/main/util.c:1001
-#: src/modules/X11/devX11.c:3142 src/modules/X11/devX11.c:3169
-#: src/modules/X11/devX11.c:3174 src/modules/X11/devX11.c:3179
-#: src/modules/X11/devX11.c:3189 src/modules/X11/devX11.c:3194
-#: src/modules/X11/devX11.c:3198 src/modules/X11/devX11.c:3202
-#: src/unix/sys-std.c:1291
-#, c-format
-msgid "invalid '%s' value"
-msgstr "valeur '%s' incorrecte"
-
-#: src/gnuwin32/extra.c:308 src/gnuwin32/extra.c:321
+#: src/gnuwin32/extra.c:313 src/gnuwin32/extra.c:324
 msgid "incorrect argument"
 msgstr "argument incorrect"
 
-#: src/gnuwin32/extra.c:312
+#: src/gnuwin32/extra.c:316
 msgid "don't be silly!: your machine has a 4Gb address limit"
 msgstr ""
 "ne soyez pas stupide ! Votre machine a une limite de m�moire adressable de 4 "
 "Go"
 
-#: src/gnuwin32/extra.c:316
+#: src/gnuwin32/extra.c:320
 msgid "cannot decrease memory limit: ignored"
 msgstr "impossible de diminuer la limite de m�moire allou�e : ignor�e"
 
-#: src/gnuwin32/extra.c:428 src/gnuwin32/extra.c:529 src/main/util.c:897
+#: src/gnuwin32/extra.c:427 src/gnuwin32/extra.c:528 src/main/util.c:962
 msgid "'path' must be a character vector"
 msgstr "'path' doit �tre un vecteur de cha�ne de caract�res"
 
-#: src/gnuwin32/extra.c:579 src/gnuwin32/extra.c:581 src/gnuwin32/extra.c:604
-#: src/gnuwin32/extra.c:606 src/gnuwin32/extra.c:641 src/main/gevents.c:61
+#: src/gnuwin32/extra.c:576 src/gnuwin32/extra.c:578 src/gnuwin32/extra.c:601
+#: src/gnuwin32/extra.c:603 src/gnuwin32/extra.c:638 src/main/gevents.c:61
 #: src/main/gevents.c:98
 msgid "invalid device"
 msgstr "p�riph�rique incorrect"
 
-#: src/gnuwin32/extra.c:582
+#: src/gnuwin32/extra.c:579
 msgid "requires SDI mode"
 msgstr "n�cessite le mode SDI"
 
-#: src/gnuwin32/extra.c:635 src/main/gevents.c:58 src/main/gevents.c:95
+#: src/gnuwin32/extra.c:632 src/main/gevents.c:58 src/main/gevents.c:95
 msgid "invalid graphical device number"
 msgstr "num�ro de p�riph�rique graphique incorrect"
 
-#: src/gnuwin32/extra.c:645
+#: src/gnuwin32/extra.c:642
 msgid "bad device"
 msgstr "mauvais p�riph�rique"
 
-#: src/gnuwin32/extra.c:799 src/gnuwin32/extra.c:807
+#: src/gnuwin32/extra.c:796 src/gnuwin32/extra.c:804
 msgid "invalid input in 'Rmbstowcs'"
 msgstr "entr�e incorrecte dans 'Rmbstowcs'"
 
-#: src/gnuwin32/extra.c:830 src/main/platform.c:1261
+#: src/gnuwin32/extra.c:827 src/main/platform.c:1336
 msgid "file choice cancelled"
 msgstr "choix de fichier annul�"
 
-#: src/gnuwin32/run.c:242
+#: src/gnuwin32/run.c:244
 #, c-format
 msgid "'CreateProcess' failed to run '%s'"
 msgstr "'CreateProcess' a �chou� au lancement de '%s'"
 
-#: src/gnuwin32/run.c:344
+#: src/gnuwin32/run.c:346
 msgid "Child process not responding.  R will terminate it."
 msgstr "Le processus fils ne r�pond pas, R va s'arr�ter."
 
-#: src/gnuwin32/run.c:402
+#: src/gnuwin32/run.c:404
 #, c-format
 msgid "Exit code was %d"
 msgstr "Le code de sortie est %d"
 
-#: src/gnuwin32/run.c:434
+#: src/gnuwin32/run.c:436
 msgid "Insufficient memory (rpipeOpen)"
 msgstr "M�moire insuffisante (rpipeOpen)"
 
-#: src/gnuwin32/run.c:648 src/main/dounzip.c:482
+#: src/gnuwin32/run.c:650 src/main/dounzip.c:481
 msgid "seek not enabled for this connection"
 msgstr "parcours interdit pour cette connexion"
 
-#: src/gnuwin32/run.c:654
+#: src/gnuwin32/run.c:656
 msgid "truncate not enabled for this connection"
 msgstr "troncature interdite pour cette connexion"
 
-#: src/gnuwin32/run.c:729 src/gnuwin32/run.c:733 src/gnuwin32/run.c:746
-#: src/gnuwin32/run.c:774 src/main/connections.c:1330
-#: src/main/connections.c:1334 src/main/connections.c:1340
-#: src/main/connections.c:1354
+#: src/gnuwin32/run.c:731 src/gnuwin32/run.c:735 src/gnuwin32/run.c:748
+#: src/gnuwin32/run.c:776 src/main/connections.c:1322
+#: src/main/connections.c:1326 src/main/connections.c:1332
+#: src/main/connections.c:1346
 msgid "allocation of pipe connection failed"
 msgstr "l'affectation de la conduite de connexion a �chou�"
 
-#: src/gnuwin32/run.c:788
+#: src/gnuwin32/run.c:790
 msgid "'names' is not a character vector"
 msgstr "'names' n'est pas un vecteur de caract�res"
 
-#: src/gnuwin32/sys-win32.c:182
+#: src/gnuwin32/sys-win32.c:180
 msgid "character string expected as first argument"
 msgstr "cha�ne de caract�res attendue comme premier argument"
 
-#: src/gnuwin32/sys-win32.c:191
+#: src/gnuwin32/sys-win32.c:189
 msgid "character string expected as third argument"
 msgstr "cha�ne de caract�res attendue comme troisi�me argument"
 
-#: src/gnuwin32/sys-win32.c:257 src/unix/sys-unix.c:299
+#: src/gnuwin32/sys-win32.c:255 src/unix/sys-unix.c:312
 #, c-format
 msgid "running command '%s' had status %d"
 msgstr "l'ex�cution de la commande '%s' renvoie un statut %d"
 
-#: src/gnuwin32/system.c:122 src/unix/sys-unix.c:427
+#: src/gnuwin32/system.c:121 src/unix/sys-unix.c:440
 msgid "reached session elapsed time limit"
 msgstr "la limite de temps de la session est atteinte"
 
-#: src/gnuwin32/system.c:124 src/unix/sys-unix.c:429
+#: src/gnuwin32/system.c:123 src/unix/sys-unix.c:442
 msgid "reached elapsed time limit"
 msgstr "la limite de temps est atteinte"
 
-#: src/gnuwin32/system.c:130 src/unix/sys-unix.c:435
+#: src/gnuwin32/system.c:129 src/unix/sys-unix.c:448
 msgid "reached session CPU time limit"
 msgstr "la limite de temps processeur est atteinte"
 
-#: src/gnuwin32/system.c:132 src/unix/sys-unix.c:437
+#: src/gnuwin32/system.c:131 src/unix/sys-unix.c:450
 msgid "reached CPU time limit"
 msgstr "limite de temps processeur atteinte"
 
-#: src/gnuwin32/system.c:157
+#: src/gnuwin32/system.c:156
 #, c-format
 msgid "Fatal error: %s\n"
 msgstr "Erreur fatale : %s\n"
 
-#: src/gnuwin32/system.c:335 src/unix/sys-std.c:863
+#: src/gnuwin32/system.c:334 src/unix/sys-std.c:866
 #, c-format
 msgid "encoding '%s' is not recognised"
 msgstr "l'encodage '%s' n'est pas reconnu"
 
-#: src/gnuwin32/system.c:341 src/unix/sys-std.c:869
+#: src/gnuwin32/system.c:340 src/unix/sys-std.c:872
 #, c-format
 msgid "<ERROR: re-encoding failure from encoding '%s'>\n"
 msgstr "<ERREUR : r�encodage erron� pour l'encodage '%s'>\n"
 
-#: src/gnuwin32/system.c:555 src/gnuwin32/system.c:1049
-#: src/gnuwin32/system.c:1061 src/main/connections.c:590
-#: src/main/connections.c:595 src/main/dounzip.c:177 src/main/saveload.c:1961
-#: src/main/serialize.c:2552 src/main/serialize.c:2557
-#: src/main/serialize.c:2642 src/main/serialize.c:2687 src/unix/system.c:323
-#: src/unix/system.c:343
+#: src/gnuwin32/system.c:562 src/gnuwin32/system.c:1058
+#: src/gnuwin32/system.c:1070 src/main/connections.c:581
+#: src/main/connections.c:586 src/main/dounzip.c:178 src/main/saveload.c:1963
+#: src/main/serialize.c:2598 src/main/serialize.c:2603
+#: src/main/serialize.c:2688 src/main/serialize.c:2733 src/unix/system.c:328
 #, c-format
 msgid "cannot open file '%s': %s"
 msgstr "impossible d'ouvrir le fichier '%s' : %s"
 
-#: src/gnuwin32/system.c:569
+#: src/gnuwin32/system.c:576
 #, c-format
 msgid "file.show(): file '%s' does not exist\n"
 msgstr "file.show() : fichier '%s' inexistant\n"
 
-#: src/gnuwin32/system.c:970
+#: src/gnuwin32/system.c:979
 #, c-format
 msgid "WARNING: R_MAX_MEM_SIZE value is invalid: ignored\n"
 msgstr "AVIS : valeur R_MAX_MEM_SIZE incorrecte : ignor�e\n"
 
-#: src/gnuwin32/system.c:1002
+#: src/gnuwin32/system.c:1011
 msgid "WARNING: no max-mem-size given\n"
 msgstr "AVIS : max-mem-size absent\n"
 
-#: src/gnuwin32/system.c:1009
+#: src/gnuwin32/system.c:1018
 #, c-format
 msgid "WARNING: --max-mem-size value is invalid: ignored\n"
 msgstr "AVIS : valeur --max-mem-size incorrecte : ignor�e\n"
 
-#: src/gnuwin32/system.c:1012
+#: src/gnuwin32/system.c:1021
 #, c-format
 msgid "WARNING: --max-mem-size=%lu%c: too large and ignored\n"
 msgstr "AVIS : --max-mem-size = %lu%c : trop grande et ignor�e\n"
 
-#: src/gnuwin32/system.c:1018
+#: src/gnuwin32/system.c:1027
 #, c-format
 msgid "WARNING: --max-mem-size=%4.1fM: too small and ignored\n"
 msgstr "AVIS : --max-mem-size = %4.1fM : trop petite et ignor�e\n"
 
-#: src/gnuwin32/system.c:1023
+#: src/gnuwin32/system.c:1032
 #, c-format
 msgid "WARNING: --max-mem-size=%4.0fM: too large and taken as %uM\n"
 msgstr "AVIS : --max-mem-size = %4.0fM : trop petite et consid�r�e comme %uM\n"
 
-#: src/gnuwin32/system.c:1039
+#: src/gnuwin32/system.c:1048
 #, c-format
 msgid "option '%s' requires an argument"
 msgstr "l'option '%s' n�cessite un argument"
 
-#: src/gnuwin32/system.c:1070
+#: src/gnuwin32/system.c:1079
 #, c-format
 msgid "option '%s' requires a non-empty argument"
 msgstr "l'option '%s' n�cessite un argument non vide"
 
-#: src/gnuwin32/system.c:1078 src/unix/system.c:362
+#: src/gnuwin32/system.c:1087 src/unix/system.c:347
 #, c-format
 msgid "WARNING: '-e %s' omitted as input is too long\n"
 msgstr "AVIS : '-e %s' omis comme entr�e trop longue\n"
 
-#: src/gnuwin32/system.c:1082 src/unix/system.c:375
+#: src/gnuwin32/system.c:1091 src/unix/system.c:360
 #, c-format
 msgid "WARNING: unknown option '%s'\n"
 msgstr "AVIS : option inconnue '%s'\n"
 
-#: src/gnuwin32/system.c:1104 src/unix/system.c:379
+#: src/gnuwin32/system.c:1113 src/unix/system.c:364
 #, c-format
 msgid "ARGUMENT '%s' __ignored__\n"
 msgstr "ARGUMENT '%s' __ignor�__\n"
 
-#: src/gnuwin32/system.c:1110 src/unix/system.c:386
+#: src/gnuwin32/system.c:1119 src/unix/system.c:371
 msgid "cannot use -e with -f or --file"
 msgstr "utilisation de -e avec -f ou --file interdite "
 
-#: src/gnuwin32/system.c:1128
+#: src/gnuwin32/system.c:1137
 msgid "creation of tmpfile failed -- set TMPDIR suitably?"
 msgstr "la cr�ation de tmpfile a �chou� -- red�finir TMPDIR ? "
 
-#: src/gnuwin32/system.c:1147 src/unix/system.c:437
+#: src/gnuwin32/system.c:1156 src/unix/system.c:422
 msgid "you must specify '--save', '--no-save' or '--vanilla'"
 msgstr "vous devez sp�cifier '--save', '--no-save' ou '--vanilla'"
 
-#: src/gnuwin32/system.c:1152
+#: src/gnuwin32/system.c:1161
 msgid ""
 "impossible to create 'reader thread'; you must free some system resources"
 msgstr ""
 "impossible de cr�er le 'reader thread' ; vous devez lib�rer des ressources "
 "syst�me"
 
-#: src/include/Errormsg.h:25 src/main/subscript.c:375 src/main/subscript.c:393
-#: src/main/subscript.c:417 src/main/subscript.c:456 src/main/subscript.c:584
-#: src/main/subscript.c:623 src/main/subscript.c:766
+#: src/include/Errormsg.h:27 src/main/subscript.c:383 src/main/subscript.c:401
+#: src/main/subscript.c:425 src/main/subscript.c:464 src/main/subscript.c:662
+#: src/main/subscript.c:701 src/main/subscript.c:844
 msgid "subscript out of bounds"
 msgstr "indice hors limites"
 
-#: src/include/Errormsg.h:26
+#: src/include/Errormsg.h:28
 #, c-format
 msgid "object of type '%s' is not subsettable"
 msgstr "objet de type '%s' non indi�able"
 
-#: src/main/CommandLineArgs.c:170
+#: src/main/CommandLineArgs.c:171
 msgid "WARNING: no value given for --encoding"
 msgstr "AVIS : aucune valeur donn�e pour --encoding"
 
-#: src/main/CommandLineArgs.c:195
+#: src/main/CommandLineArgs.c:196
 #, c-format
 msgid "WARNING: option '%s' no longer supported"
 msgstr "AVIS : l'option '%s' n'est plus disponible"
 
-#: src/main/CommandLineArgs.c:206
+#: src/main/CommandLineArgs.c:207
 #, c-format
 msgid "WARNING: no value given for '%s'"
 msgstr "AVIS : aucune valeur donn�e pour '%s'"
 
-#: src/main/CommandLineArgs.c:216
+#: src/main/CommandLineArgs.c:217
 #, c-format
 msgid "WARNING: '%s' value is invalid: ignored"
 msgstr "AVIS : valeur '%s' incorrecte : ignor�e"
 
-#: src/main/CommandLineArgs.c:220
+#: src/main/CommandLineArgs.c:221
 #, c-format
 msgid "WARNING: %s: too large and ignored"
 msgstr "AVIS : %s : trop grand et ignor�"
 
-#: src/main/CommandLineArgs.c:234
+#: src/main/CommandLineArgs.c:235
 msgid "WARNING: no value given for '--max-ppsize'"
 msgstr "AVIS : aucune valeur donn�e pour '--max-ppsize'"
 
-#: src/main/CommandLineArgs.c:239
+#: src/main/CommandLineArgs.c:240
 msgid "WARNING: '--max-ppsize' value is negative: ignored"
 msgstr "AVIS : valeur de '--max-ppsize' strictement n�gative : ignor�e"
 
-#: src/main/CommandLineArgs.c:241
+#: src/main/CommandLineArgs.c:242
 msgid "WARNING: '--max-ppsize' value is too small: ignored"
 msgstr "AVIS : valeur de '--max-ppsize' trop petite : ignor�e"
 
-#: src/main/CommandLineArgs.c:244
+#: src/main/CommandLineArgs.c:245
 msgid "WARNING: '--max-ppsize' value is too large: ignored"
 msgstr "AVIS : valeur de '--max-ppsize' trop grande : ignor�e"
 
-#: src/main/RNG.c:175
+#: src/main/RNG.c:176
 #, c-format
 msgid "unif_rand: unimplemented RNG kind %d"
 msgstr ""
 "unif_rand : type RNG (g�n�rateur de nombres pseudo-al�atoires) %d non "
 "impl�ment�"
 
-#: src/main/RNG.c:260
+#: src/main/RNG.c:261
 #, c-format
 msgid "FixupSeeds: unimplemented RNG kind %d"
 msgstr ""
 "FixupSeeds : type RNG (g�n�rateur de nombres pseudo-al�atoires) %d non "
 "impl�ment�"
 
-#: src/main/RNG.c:302
+#: src/main/RNG.c:301
 msgid "'user_unif_rand' not in load table"
 msgstr "'user_unif_rand' absent de la table de chargement"
 
-#: src/main/RNG.c:310
+#: src/main/RNG.c:309
 msgid "cannot read seeds unless 'user_unif_nseed' is supplied"
 msgstr ""
 "impossible de lire les valeurs d'initialisation tant que 'user_unif_nseed' "
 "n'est pas fourni"
 
-#: src/main/RNG.c:315
+#: src/main/RNG.c:314
 msgid "seed length must be in 0...625; ignored"
 msgstr ""
 "la longueur du vecteur de valeurs d'initialisation doit �tre comprise entre "
 "0 et 625 : ignor�"
 
-#: src/main/RNG.c:323
+#: src/main/RNG.c:322
 #, c-format
 msgid "RNG_Init: unimplemented RNG kind %d"
 msgstr ""
 "RNG_Init : type RNG (g�n�rateur de nombres pseudo-al�atoires) %d non "
 "impl�ment�"
 
-#: src/main/RNG.c:354
+#: src/main/RNG.c:351
 msgid "'.Random.seed' is a missing argument with no default"
 msgstr "'.Random.seed' est un argument absent sans valeur par d�faut"
 
-#: src/main/RNG.c:355
+#: src/main/RNG.c:352
 #, c-format
 msgid "'.Random.seed' is not an integer vector but of type '%s', so ignored"
 msgstr ""
 "'.Random.seed' n'est pas un vecteur d'entiers, mais est de type '%s', et "
 "sera donc ignor�"
 
-#: src/main/RNG.c:363
+#: src/main/RNG.c:360
 msgid "'.Random.seed[1]' is not a valid integer, so ignored"
 msgstr "'.Random.seed[1]' n'est pas un entier correct, et sera donc ignor�"
 
-#: src/main/RNG.c:369
+#: src/main/RNG.c:366
 msgid "'.Random.seed[1]' is not a valid Normal type, so ignored"
 msgstr ""
 "'.Random.seed[1]' n'est pas un type Normal correct, et sera donc ignor�"
 
-#: src/main/RNG.c:383
+#: src/main/RNG.c:380
 msgid "'.Random.seed[1] = 5' but no user-supplied generator, so ignored"
 msgstr ""
 "'.Random.seed[1] = 5' mais aucun g�n�rateur de nombres fourni par "
 "l'utilisateur, il sera donc ignor�"
 
-#: src/main/RNG.c:388
+#: src/main/RNG.c:385
 msgid "'.Random.seed[1]' is not a valid RNG kind so ignored"
 msgstr ""
 "'.Random.seed[1]' n'est pas un RNG (g�n�rateur de nombres pseudo-al�atoires) "
 "correct et sera donc ignor�"
 
-#: src/main/RNG.c:415
+#: src/main/RNG.c:412
 msgid "'.Random.seed' has wrong length"
 msgstr "'.Random.seed' de taille incorrecte"
 
-#: src/main/RNG.c:468
+#: src/main/RNG.c:465
 #, c-format
 msgid "RNGkind: unimplemented RNG kind %d"
 msgstr "RNGkind : type %d de RNG non impl�ment�"
 
-#: src/main/RNG.c:488
+#: src/main/RNG.c:485
 msgid "invalid Normal type in 'RNGkind'"
 msgstr "type Normal incorrect dans 'RNGkind'"
 
-#: src/main/RNG.c:491
+#: src/main/RNG.c:488
 msgid "'user_norm_rand' not in load table"
 msgstr "'user_norm_rand' absent de la table de chargement"
 
-#: src/main/RNG.c:535
+#: src/main/RNG.c:532
 msgid "supplied seed is not a valid integer"
 msgstr "la valeur d'initialisation fournie n'est pas un entier correct"
 
@@ -646,7 +628,7 @@ msgstr "Le nom de DLL '%s' est trop long"
 msgid "could not allocate space for 'name'"
 msgstr "impossible d'allouer de l'espace pour 'name'"
 
-#: src/main/Rdynload.c:881 src/main/Rdynload.c:897 src/main/util.c:698
+#: src/main/Rdynload.c:881 src/main/Rdynload.c:897 src/main/util.c:762
 msgid "character argument expected"
 msgstr "argument de type caract�re attendu"
 
@@ -665,35 +647,39 @@ msgid "shared object '%s' was not loaded"
 msgstr "l'objet partag� '%s' n'a pas �t� charg�"
 
 #: src/main/Rdynload.c:979
-#, c-format
-msgid "cannot allocate memory for registered native symbol (%d bytes)"
-msgstr ""
+#, fuzzy, c-format
+msgid "cannot allocate memory for registered native symbol (%d byte)"
+msgid_plural "cannot allocate memory for registered native symbol (%d bytes)"
+msgstr[0] ""
+"impossible d'allouer de la m�moire pour le symbole natif enregistr� (%d "
+"bytes)"
+msgstr[1] ""
 "impossible d'allouer de la m�moire pour le symbole natif enregistr� (%d "
 "bytes)"
 
-#: src/main/Rdynload.c:1100 src/main/Rdynload.c:1321
+#: src/main/Rdynload.c:1102 src/main/Rdynload.c:1323
 msgid "must pass package name or DllInfo reference"
 msgstr "le nom du package ou la r�f�rence DllInfo doit �tre fourni"
 
-#: src/main/Rdynload.c:1197
+#: src/main/Rdynload.c:1199
 #, c-format
 msgid "unimplemented type %d in 'createRSymbolObject'"
 msgstr "type %d non impl�ment� dans 'createRSymbolObject'"
 
-#: src/main/Rdynload.c:1279 src/main/Rdynload.c:1373
+#: src/main/Rdynload.c:1281 src/main/Rdynload.c:1375
 msgid "R_getRegisteredRoutines() expects a DllInfo reference"
 msgstr "R_getRegisteredRoutines() attend une r�f�rence DllInfo"
 
-#: src/main/Rdynload.c:1282 src/main/Rdynload.c:1376
+#: src/main/Rdynload.c:1284 src/main/Rdynload.c:1378
 msgid "NULL value passed for DllInfo"
 msgstr "valeur NULL pass�e pour DllInfo"
 
-#: src/main/Rdynload.c:1436
+#: src/main/Rdynload.c:1441
 #, c-format
 msgid "function '%s' not provided by package '%s'"
 msgstr "la fonction '%s' n'existe pas dans le package '%s'"
 
-#: src/main/Rdynload.c:1438
+#: src/main/Rdynload.c:1443
 msgid "table entry must be an external pointer"
 msgstr "l'entr�e de la table doit �tre un pointeur externe"
 
@@ -702,8 +688,9 @@ msgstr "l'entr
 msgid "problem in setting variable '%s' in Renviron"
 msgstr "probl�me lors de l'affectation de la variable '%s' dans Renviron"
 
-#: src/main/Renviron.c:311
-msgid "argument 'x' must be a character string"
+#: src/main/Renviron.c:311 src/main/objects.c:1174 src/main/raw.c:155
+#, fuzzy, c-format
+msgid "argument '%s' must be a character string"
 msgstr "l'argument 'x' doit �tre une cha�ne de caract�res"
 
 #: src/main/Renviron.c:315
@@ -711,100 +698,127 @@ msgstr "l'argument 'x' doit 
 msgid "file '%s' cannot be opened for reading"
 msgstr "le fichier '%s' ne peut �tre ouvert en lecture"
 
-#: src/main/Rstrptime.h:517 src/main/Rstrptime.h:984
+#: src/main/Rstrptime.h:524 src/main/Rstrptime.h:991
 #, c-format
 msgid "use of %s for input is not supported"
 msgstr "l'utilisation de %s pour entr�e n'est pas permise"
 
-#: src/main/Rstrptime.h:1242
+#: src/main/Rstrptime.h:1263
 msgid "input string is too long"
 msgstr "cha�ne de caract�res en entr�e trop longue"
 
-#: src/main/Rstrptime.h:1244
+#: src/main/Rstrptime.h:1265
 msgid "invalid multibyte input string"
 msgstr "cha�ne de caract�res multioctets incorrecte en entr�e"
 
-#: src/main/Rstrptime.h:1247
+#: src/main/Rstrptime.h:1268
 msgid "format string is too long"
 msgstr "cha�ne de caract�res de formattage trop longue"
 
-#: src/main/Rstrptime.h:1249
+#: src/main/Rstrptime.h:1270
 msgid "invalid multibyte format string"
 msgstr "cha�ne de caract�res multioctets incorrecte"
 
-#: src/main/agrep.c:133 src/main/agrep.c:777 src/main/character.c:1039
-#: src/main/character.c:1043 src/main/grep.c:769 src/main/grep.c:1512
-#: src/main/grep.c:1516 src/main/grep.c:2325 src/main/grep.c:2623
+#: src/main/agrep.c:133 src/main/agrep.c:778 src/main/character.c:1291
+#: src/main/character.c:1295 src/main/grep.c:782 src/main/grep.c:1530
+#: src/main/grep.c:1534 src/main/grep.c:2347 src/main/grep.c:2654
 #, c-format
 msgid "argument '%s' has length > 1 and only the first element will be used"
 msgstr ""
 "l'argument %s a une longueur > 1 et seul le premier �l�ment est utilis�"
 
-#: src/main/agrep.c:189 src/main/agrep.c:818
+#: src/main/agrep.c:190 src/main/agrep.c:820
 msgid "'pattern' must be a non-empty character string"
 msgstr "'pattern' doit �tre une cha�ne de caract�res non vide"
 
-#: src/main/agrep.c:200 src/main/agrep.c:827 src/main/grep.c:838
-#: src/main/grep.c:2381 src/main/grep.c:2662
+#: src/main/agrep.c:201 src/main/agrep.c:829 src/main/grep.c:853
+#: src/main/grep.c:2405 src/main/grep.c:2707
 msgid "regular expression is invalid in this locale"
 msgstr "expression r�guli�re incorrecte dans cet environnement linguistique"
 
-#: src/main/agrep.c:206 src/main/agrep.c:623
+#: src/main/agrep.c:207 src/main/agrep.c:624
 #, c-format
 msgid "regcomp error:  '%s'"
 msgstr "erreur rgcomp : '%s'"
 
-#: src/main/agrep.c:238 src/main/agrep.c:871 src/main/grep.c:227
-#: src/main/grep.c:315 src/main/grep.c:423 src/main/grep.c:578
-#: src/main/grep.c:889 src/main/grep.c:2480 src/main/grep.c:2548
-#: src/main/grep.c:2698
+#: src/main/agrep.c:239 src/main/agrep.c:874 src/main/grep.c:233
+#: src/main/grep.c:323 src/main/grep.c:434 src/main/grep.c:590
+#: src/main/grep.c:907 src/main/grep.c:2510 src/main/grep.c:2579
+#: src/main/grep.c:2744
 #, c-format
 msgid "input string %d is invalid in this locale"
 msgstr ""
 "la cha�ne de caract�res entr�e %d est incorrecte dans cet environnement "
 "linguistique"
 
-#: src/main/agrep.c:525 src/main/agrep.c:765 src/main/grep.c:155
-#: src/main/grep.c:760 src/main/grep.c:762 src/main/grep.c:1047
-#: src/main/grep.c:1055 src/main/grep.c:1503 src/main/grep.c:1505
-#: src/main/grep.c:2315 src/main/grep.c:2317 src/main/grep.c:2611
+#: src/main/agrep.c:526 src/main/agrep.c:766 src/main/grep.c:159
+#: src/main/grep.c:773 src/main/grep.c:775 src/main/grep.c:1065
+#: src/main/grep.c:1073 src/main/grep.c:1521 src/main/grep.c:1523
+#: src/main/grep.c:2337 src/main/grep.c:2339 src/main/grep.c:2642
 #, c-format
 msgid "argument '%s' will be ignored"
 msgstr "l'argument '%s' sera ignor�"
 
-#: src/main/agrep.c:614
+#: src/main/agrep.c:615
 #, c-format
 msgid "input string x[%d] is invalid in this locale"
 msgstr ""
 "la cha�ne de caract�res entr�e x[%d] est incorrecte dans cet environnement "
 "linguistique"
 
-#: src/main/agrep.c:660
+#: src/main/agrep.c:661
 #, c-format
 msgid "input string y[%d] is invalid in this locale"
 msgstr ""
 "la cha�ne de caract�res entr�e y[%d] est incorrecte dans cet environnement "
 "linguistique"
 
-#: src/main/agrep.c:833 src/main/grep.c:2668
+#: src/main/agrep.c:835 src/main/grep.c:2713
 #, c-format
 msgid "regcomp error: '%s'"
 msgstr "erreur regcomp : '%s'"
 
-#: src/main/apply.c:103
+#: src/main/apply.c:98
 msgid "'FUN.VALUE' must be a vector"
 msgstr "'FUN.VALUE' doit �tre un vecteur"
 
-#: src/main/apply.c:108 src/main/complex.c:758
+#: src/main/apply.c:100 src/main/array.c:506 src/main/character.c:847
+#: src/main/character.c:1655 src/main/connections.c:3551
+#: src/main/context.c:653 src/main/context.c:672 src/main/datetime.c:681
+#: src/main/datetime.c:783 src/main/datetime.c:1047 src/main/dotcode.c:222
+#: src/main/errors.c:910 src/main/errors.c:943 src/main/errors.c:1049
+#: src/main/errors.c:1074 src/main/errors.c:1079 src/main/errors.c:1349
+#: src/main/identical.c:66 src/main/identical.c:67 src/main/identical.c:68
+#: src/main/identical.c:69 src/main/identical.c:70 src/main/platform.c:2982
+#: src/main/seq.c:192 src/main/seq.c:343 src/main/seq.c:348 src/main/seq.c:352
+#: src/main/seq.c:397 src/main/seq.c:401 src/main/seq.c:405
+#: src/main/sort.c:1244 src/main/sort.c:1327 src/main/sort.c:1331
+#: src/main/sort.c:1338 src/main/source.c:225 src/main/summary.c:954
+#: src/main/sysutils.c:250 src/main/util.c:1051 src/main/util.c:1056
+#: src/main/util.c:1063 src/main/util.c:1066 src/main/util.c:2035
+#: src/modules/X11/devX11.c:3148 src/modules/X11/devX11.c:3175
+#: src/modules/X11/devX11.c:3180 src/modules/X11/devX11.c:3185
+#: src/modules/X11/devX11.c:3195 src/modules/X11/devX11.c:3200
+#: src/modules/X11/devX11.c:3204 src/modules/X11/devX11.c:3208
+#, c-format
+msgid "invalid '%s' value"
+msgstr "valeur '%s' incorrecte"
+
+#: src/main/apply.c:103 src/main/complex.c:753
 msgid "invalid length"
 msgstr "taille incorrecte"
 
-#: src/main/apply.c:113
+#: src/main/apply.c:108
 msgid "long vectors are not supported for matrix/array results"
 msgstr ""
 "les longs vecteurs ne sont pas support�s pour des r�sultats matrix/array"
 
-#: src/main/apply.c:162
+#: src/main/apply.c:115
+#, c-format
+msgid "type '%s' is not supported"
+msgstr "le type '%s' n'est pas support�"
+
+#: src/main/apply.c:163
 #, c-format
 msgid ""
 "values must be length %d,\n"
@@ -813,7 +827,7 @@ msgstr ""
 "les valeurs doivent �tre d'une longueur %d,\n"
 " mais FUN(X[[%d]]) a une longueur %d"
 
-#: src/main/apply.c:174
+#: src/main/apply.c:175
 #, c-format
 msgid ""
 "values must be type '%s',\n"
@@ -822,17 +836,12 @@ msgstr ""
 "les valeurs doivent �tre de type '%s',\n"
 " mais FUN(X[[%d]]) est de type '%s'"
 
-#: src/main/apply.c:193
-#, c-format
-msgid "type '%s' is not supported"
-msgstr "le type '%s' n'est pas support�"
-
-#: src/main/apply.c:225
+#: src/main/apply.c:252
 #, c-format
 msgid "dimnames(<value>) is neither NULL nor list of length %d"
 msgstr "dimnames(<valeur>) n'est ni NULL ni une liste de longueur %d"
 
-#: src/main/arithmetic.c:42
+#: src/main/arithmetic.c:42 src/main/eval.c:3633
 msgid "NaNs produced"
 msgstr "production de NaN"
 
@@ -840,112 +849,115 @@ msgstr "production de NaN"
 msgid "non-numeric argument to mathematical function"
 msgstr "argument non num�rique pour une fonction math�matique"
 
-#: src/main/arithmetic.c:187
+#: src/main/arithmetic.c:186
 msgid "probable complete loss of accuracy in modulus"
 msgstr "perte totale de pr�cision probable dans modulus"
 
-#: src/main/arithmetic.c:337
+#: src/main/arithmetic.c:298
 msgid "NAs produced by integer overflow"
 msgstr "NA produit par d�bordement d'entier par le haut"
 
-#: src/main/arithmetic.c:538
+#: src/main/arithmetic.c:499
 msgid "operator needs one or two arguments"
 msgstr "l'op�rateur a besoin d'un ou de deux arguments"
 
-#: src/main/arithmetic.c:554
+#: src/main/arithmetic.c:515
 msgid "non-numeric argument to binary operator"
 msgstr "argument non num�rique pour un op�rateur binaire"
 
-#: src/main/arithmetic.c:615 src/main/relop.c:227
+#: src/main/arithmetic.c:576 src/main/relop.c:221
 msgid "non-conformable arrays"
 msgstr "tableaux de tailles inad�quates"
 
-#: src/main/arithmetic.c:658
+#: src/main/arithmetic.c:619
 msgid "non-conformable time-series"
 msgstr "s�ries temporelles de tailles inad�quates"
 
-#: src/main/arithmetic.c:680 src/main/logic.c:143 src/main/relop.c:166
-#: src/main/relop.c:265
+#: src/main/arithmetic.c:641 src/main/logic.c:135 src/main/relop.c:160
+#: src/main/relop.c:259
 msgid "longer object length is not a multiple of shorter object length"
 msgstr ""
 "la taille d'un objet plus long n'est pas multiple de la taille d'un objet "
 "plus court"
 
-#: src/main/arithmetic.c:751
+#: src/main/arithmetic.c:712
 msgid "invalid argument to unary operator"
 msgstr "argument incorrect pour un op�rateur unitaire"
 
-#: src/main/arithmetic.c:780 src/main/arithmetic.c:805
-#: src/main/arithmetic.c:824
+#: src/main/arithmetic.c:741 src/main/arithmetic.c:766
+#: src/main/arithmetic.c:785
 msgid "invalid unary operator"
 msgstr "op�rateur unitaire incorrect"
 
-#: src/main/arithmetic.c:1241
+#: src/main/arithmetic.c:1191
 msgid "unimplemented real function of 1 argument"
 msgstr "fonction r�elle � un argument non impl�ment�e"
 
-#: src/main/arithmetic.c:1255 src/main/complex.c:648 src/main/complex.c:718
+#: src/main/arithmetic.c:1205 src/main/complex.c:638 src/main/complex.c:708
 msgid "unimplemented complex function"
 msgstr "fonction complexe non impl�ment�e"
 
-#: src/main/arithmetic.c:1526 src/main/arithmetic.c:1877
-#: src/main/arithmetic.c:2056 src/main/arithmetic.c:2168
+#: src/main/arithmetic.c:1484 src/main/arithmetic.c:1877
+#: src/main/arithmetic.c:2049 src/main/arithmetic.c:2152
 #, c-format
 msgid "unimplemented real function of %d numeric arguments"
 msgstr "fonction r�elle de %d arguments num�riques non impl�ment�e"
 
-#: src/main/arithmetic.c:1552
-#, c-format
-msgid "%d arguments passed to '%s' which requires 1 or 2"
-msgstr "%d arguments pass�s � '%s' qui en exige 1 ou 2"
+#: src/main/arithmetic.c:1511
+#, fuzzy, c-format
+msgid "%d argument passed to '%s' which requires 1 or 2 arguments"
+msgid_plural "%d arguments passed to '%s'which requires 1 or 2 arguments"
+msgstr[0] "%d arguments pass�s � '%s' qui en exige 1 ou 2"
+msgstr[1] "%d arguments pass�s � '%s' qui en exige 1 ou 2"
 
-#: src/main/arithmetic.c:1570
+#: src/main/arithmetic.c:1530
 msgid "invalid second argument of length 0"
 msgstr "second argument de taille nulle incorrect"
 
-#: src/main/arithmetic.c:1639
+#: src/main/arithmetic.c:1625 src/main/arithmetic.c:1643 src/main/envir.c:1464
+#: src/main/envir.c:1972 src/main/eval.c:630 src/main/eval.c:4237
+#, c-format
+msgid "argument \"%s\" is missing, with no default"
+msgstr "l'argument \"%s\" est manquant, avec aucune valeur par d�faut"
+
+#: src/main/arithmetic.c:1649
 msgid "invalid argument 'base' of length 0"
 msgstr "argument 'base' de taille nulle incorrect"
 
-#: src/main/arithmetic.c:1647
-#, c-format
-msgid "%d arguments passed to 'log' which requires 1 or 2"
-msgstr "%d arguments pass�s � 'log' qui en exige 1 ou 2"
-
-#: src/main/array.c:79 src/main/array.c:1441
+#: src/main/array.c:82 src/main/array.c:1591
 #, c-format
 msgid "'data' must be of a vector type, was '%s'"
 msgstr "'data' doit �tre de type vecteur, il �tait '%s'"
 
-#: src/main/array.c:94 src/main/array.c:102
+#: src/main/array.c:97 src/main/array.c:105
 msgid "non-numeric matrix extent"
 msgstr "plage non num�rique pour une matrice"
 
-#: src/main/array.c:97 src/main/array.c:1535
+#: src/main/array.c:100 src/main/array.c:1695
 msgid "invalid 'nrow' value (too large or NA)"
 msgstr "valeur 'nrow' incorrecte (trop grande ou NA)"
 
-#: src/main/array.c:99 src/main/array.c:1537
+#: src/main/array.c:102 src/main/array.c:1697
 msgid "invalid 'nrow' value (< 0)"
 msgstr "valeur 'nrow' incorrecte (< 0)"
 
-#: src/main/array.c:105 src/main/array.c:1540
+#: src/main/array.c:108 src/main/array.c:1700
 msgid "invalid 'ncol' value (too large or NA)"
 msgstr "valeur 'ncol' incorrecte (trop grande ou NA)"
 
-#: src/main/array.c:107 src/main/array.c:1542
+#: src/main/array.c:110 src/main/array.c:1702
 msgid "invalid 'ncol' value (< 0)"
 msgstr "valeur 'ncol' incorrecte (< 0)"
 
-#: src/main/array.c:116
+#: src/main/array.c:119
 msgid "nc = 0 for non-null data"
 msgstr "nc = 0 pour des donn�es non nulles"
 
-#: src/main/array.c:124
+#: src/main/array.c:127
 msgid "nr = 0 for non-null data"
 msgstr "nr = 0 pour des donn�es non nulles"
 
-#: src/main/array.c:135
+#: src/main/array.c:138
 #, c-format
 msgid ""
 "data length [%d] is not a sub-multiple or multiple of the number of rows [%d]"
@@ -953,7 +965,7 @@ msgstr ""
 "la longueur des donn�es [%d] n'est pas un diviseur ni un multiple du nombre "
 "de lignes [%d]"
 
-#: src/main/array.c:138
+#: src/main/array.c:141
 #, c-format
 msgid ""
 "data length [%d] is not a sub-multiple or multiple of the number of columns "
@@ -962,162 +974,172 @@ msgstr ""
 "la longueur des donn�es [%d] n'est pas un diviseur ni un multiple du nombre "
 "de colonnes [%d]"
 
-#: src/main/array.c:141
+#: src/main/array.c:144
 msgid "data length exceeds size of matrix"
 msgstr "la longueur des donn�es d�passe la taille de la matrice"
 
-#: src/main/array.c:147 src/main/array.c:1453 src/main/array.c:1549
+#: src/main/array.c:150 src/main/array.c:1603 src/main/array.c:1709
 msgid "too many elements specified"
 msgstr "trop d'�l�ments fournis"
 
-#: src/main/array.c:205
+#: src/main/array.c:208
 msgid "negative extents to matrix"
 msgstr "plage n�gative pour la matrice"
 
-#: src/main/array.c:208
+#: src/main/array.c:211
 msgid "allocMatrix: too many elements specified"
 msgstr "allocMatrix : trop d'�l�ments fournis"
 
-#: src/main/array.c:236
+#: src/main/array.c:239
 msgid "negative extents to 3D array"
 msgstr "plage n�gative pour une tableau 3D"
 
-#: src/main/array.c:239
+#: src/main/array.c:242
 msgid "'alloc3Darray': too many elements specified"
 msgstr "'alloc3Darray' : trop d'�l�ments fournis"
 
-#: src/main/array.c:264
+#: src/main/array.c:267
 msgid "'allocArray': too many elements specified by 'dims'"
 msgstr "'allocArray' : trop d'�l�ments fournis par 'dims'"
 
-#: src/main/array.c:448
+#: src/main/array.c:523
+#, fuzzy, c-format
+msgid "'%s' must be a list or atomic vector"
+msgstr "'x' doit �tre une list de vecteurs NULL ou \"raw\""
+
+#: src/main/array.c:561
 #, c-format
 msgid "a matrix-like object is required as argument to '%s'"
 msgstr ""
 "une objet de type matrice ou assimil� est n�cessaire comme argument pour '%s'"
 
-#: src/main/array.c:662
+#: src/main/array.c:776
 msgid "requires numeric/complex matrix/vector arguments"
 msgstr "n�cessite des arguments num�riques/complexes matrice/vecteur"
 
-#: src/main/array.c:752 src/main/array.c:756 src/main/array.c:760
+#: src/main/array.c:886 src/main/array.c:890 src/main/array.c:894
 msgid "non-conformable arguments"
 msgstr "arguments inad�quats"
 
-#: src/main/array.c:1058
+#: src/main/array.c:1193
 msgid "argument is not a matrix"
 msgstr "l'argument n'est pas une matrice"
 
-#: src/main/array.c:1093
+#: src/main/array.c:1228
 msgid "invalid first argument, must be an array"
 msgstr "premier argument incorrect, doit �tre un tableau"
 
-#: src/main/array.c:1107
+#: src/main/array.c:1242
 #, c-format
 msgid "'perm' is of wrong length %d (!= %d)"
 msgstr "'perm' est d'une mauvaise longueur %d (!= %d)"
 
-#: src/main/array.c:1112 src/main/array.c:1115
+#: src/main/array.c:1247 src/main/array.c:1250
 msgid "'a' does not have named dimnames"
 msgstr "'a' n'a pas de noms de dimensions"
 
-#: src/main/array.c:1122
+#: src/main/array.c:1257
 #, c-format
 msgid "'perm[%d]' does not match a dimension name"
 msgstr "'perm[%d]' ne correspond pas � une dimension de nom"
 
-#: src/main/array.c:1135
+#: src/main/array.c:1270
 msgid "value out of range in 'perm'"
 msgstr "valeur de 'perm' hors intervalle"
 
-#: src/main/array.c:1217
+#: src/main/array.c:1352
 msgid "'resize' must be TRUE or FALSE"
 msgstr "'resize' doit �tre TRUE ou FALSE"
 
-#: src/main/array.c:1275
+#: src/main/array.c:1422
 msgid "'x' must be numeric"
 msgstr "'x' doit �tre num�rique"
 
-#: src/main/array.c:1449
+#: src/main/array.c:1425
+#, fuzzy
+msgid "'x' is too short"
+msgstr "'object' est trop court"
+
+#: src/main/array.c:1599
 msgid "'dims' cannot be of length 0"
 msgstr "'dims' doit �tre de longueur 0"
 
-#: src/main/array.c:1545
+#: src/main/array.c:1705
 msgid "'x' must have positive length"
 msgstr "'x' doit avoir une longueur strictement positive"
 
-#: src/main/array.c:1605
+#: src/main/array.c:1771
 #, c-format
 msgid "singular matrix in 'backsolve'. First zero in diagonal [%d]"
 msgstr ""
 "matrice singuli�re dans 'backsolve'. Premier z�ro sur la diagonale [%d]"
 
-#: src/main/attrib.c:40 src/main/attrib.c:235 src/main/attrib.c:269
-#: src/main/attrib.c:291 src/main/attrib.c:405 src/main/attrib.c:452
-#: src/main/attrib.c:502
+#: src/main/attrib.c:40 src/main/attrib.c:231 src/main/attrib.c:265
+#: src/main/attrib.c:287 src/main/attrib.c:403 src/main/attrib.c:450
+#: src/main/attrib.c:501
 msgid "attempt to set an attribute on NULL"
 msgstr "tentative de changer un attribut en NULL"
 
-#: src/main/attrib.c:72
+#: src/main/attrib.c:77
 #, c-format
 msgid "row names must be 'character' or 'integer', not '%s'"
 msgstr ""
 "les noms de lignes doivent �tre un vecteur de caract�res ou d'entiers, pas "
 "'%s'"
 
-#: src/main/attrib.c:124
+#: src/main/attrib.c:130
 #, c-format
 msgid "getAttrib: invalid type (%s) for TAG"
 msgstr "getAttrib : type incorrect (%s) pour TAG"
 
-#: src/main/attrib.c:379
+#: src/main/attrib.c:377
 #, c-format
 msgid "invalid type (%s) for 'names': must be vector"
 msgstr "type incorrect (%s) pour 'names' : doit �tre un vecteur"
 
-#: src/main/attrib.c:382
+#: src/main/attrib.c:380
 #, c-format
 msgid "'names' attribute [%d] must be the same length as the vector [%d]"
 msgstr "attribut 'names' [%d] doit �tre de m�me longueur que le vecteur [%d]"
 
-#: src/main/attrib.c:387
+#: src/main/attrib.c:385
 msgid "names() applied to a non-vector"
 msgstr "names() appliqu� � un object autre qu'un vecteur"
 
-#: src/main/attrib.c:395
+#: src/main/attrib.c:393
 msgid "invalid time series parameters specified"
 msgstr "param�tres de s�rie temporelle fournis incorrects"
 
-#: src/main/attrib.c:409
+#: src/main/attrib.c:407
 msgid "'tsp' attribute must be numeric"
 msgstr "l'attribut 'tsp' doit �tre num�rique"
 
-#: src/main/attrib.c:415
+#: src/main/attrib.c:413
 msgid "'tsp' attribute must be numeric of length three"
 msgstr "l'attribut 'tsp' doit �tre num�rique de longueur 3"
 
-#: src/main/attrib.c:432
+#: src/main/attrib.c:430
 msgid "cannot assign 'tsp' to zero-length vector"
 msgstr "impossible d'affecter 'tsp' � un vecteur de longueur nulle"
 
-#: src/main/attrib.c:463
+#: src/main/attrib.c:461
 msgid "attempt to set invalid 'comment' attribute"
 msgstr "tentative de changer l'attribut 'comment' � une valeur incorrecte"
 
-#: src/main/attrib.c:511
+#: src/main/attrib.c:510
 msgid "adding class \"factor\" to an invalid object"
 msgstr "ajout d'une classe \"factor\" � un objet incorrect"
 
-#: src/main/attrib.c:519
+#: src/main/attrib.c:541
 msgid "attempt to set invalid 'class' attribute"
 msgstr "tentative de changer l'attribut 'class' � une valeur incorrecte"
 
-#: src/main/attrib.c:777
+#: src/main/attrib.c:872
 #, c-format
 msgid "class '%s' has no 'names' slot"
 msgstr "La classe '%s' n'a pas d  slot 'names'"
 
-#: src/main/attrib.c:779
+#: src/main/attrib.c:874
 #, c-format
 msgid ""
 "class '%s' has no 'names' slot; assigning a names attribute will create an "
@@ -1126,7 +1148,7 @@ msgstr ""
 "La classe '%s' n'a pas de slot 'names'; l'affectation d'un attribut 'names' "
 "cr�era un object incorrect"
 
-#: src/main/attrib.c:782
+#: src/main/attrib.c:877
 #, c-format
 msgid ""
 "invalid to use names()<- to set the 'names' slot in a non-vector class ('%s')"
@@ -1134,131 +1156,132 @@ msgstr ""
 "L'utilisation de names()<- pour changer le slot 'names' dans une classe non "
 "vectorielle ('%s') est interdite"
 
-#: src/main/attrib.c:812
+#: src/main/attrib.c:907
 msgid "incompatible 'names' argument"
 msgstr "argument 'names' incompatible"
 
-#: src/main/attrib.c:867
+#: src/main/attrib.c:962
 #, c-format
 msgid "invalid type (%s) to set 'names' attribute"
 msgstr "type incorrect (%s) pour l'attribut 'names'"
 
-#: src/main/attrib.c:938
+#: src/main/attrib.c:1035
 msgid "'dimnames' applied to non-array"
 msgstr "'dimnames' appliqu� � autre chose qu'un tableau"
 
-#: src/main/attrib.c:943
-msgid "'dimnames' must be a list"
-msgstr "'dimnames' doit �tre une liste"
+#: src/main/attrib.c:1040 src/main/coerce.c:2471
+#, fuzzy, c-format
+msgid "'%s' must be a list"
+msgstr "'%s' doit �tre une liste"
 
-#: src/main/attrib.c:946 src/main/attrib.c:974
+#: src/main/attrib.c:1043 src/main/attrib.c:1071
 #, c-format
 msgid "length of 'dimnames' [%d] must match that of 'dims' [%d]"
 msgstr ""
 "la longueur de 'dimnames' [%d] doit correspondre � celle de 'dims' [%d]"
 
-#: src/main/attrib.c:980
+#: src/main/attrib.c:1077
 #, c-format
 msgid "invalid type (%s) for 'dimnames' (must be a vector)"
 msgstr "type incorrect (%s) pour 'dimnames' (doit �tre un vecteur)"
 
-#: src/main/attrib.c:983
+#: src/main/attrib.c:1080
 #, c-format
 msgid "length of 'dimnames' [%d] not equal to array extent"
 msgstr "la longueur de 'dimnames' [%d] n'est pas �gale � l'�tendue du tableau"
 
-#: src/main/attrib.c:1055 src/main/builtin.c:75 src/main/builtin.c:112
-#: src/main/envir.c:1606 src/main/envir.c:1734 src/main/envir.c:1796
-#: src/main/envir.c:1918 src/main/paste.c:74 src/main/paste.c:293
-#: src/main/random.c:487 src/main/random.c:516 src/main/unique.c:1749
+#: src/main/attrib.c:1152 src/main/builtin.c:75 src/main/builtin.c:112
+#: src/main/envir.c:1740 src/main/envir.c:1868 src/main/envir.c:1928
+#: src/main/envir.c:2065 src/main/paste.c:74 src/main/paste.c:293
+#: src/main/random.c:479 src/main/random.c:508 src/main/unique.c:1746
 msgid "invalid first argument"
 msgstr "premier argument incorrect"
 
-#: src/main/attrib.c:1058
+#: src/main/attrib.c:1155
 msgid "invalid second argument"
 msgstr "second argument incorrect"
 
-#: src/main/attrib.c:1066
+#: src/main/attrib.c:1163
 msgid "length-0 dimension vector is invalid"
 msgstr "vecteur dimension de longueur nulle incorrect"
 
-#: src/main/attrib.c:1071
+#: src/main/attrib.c:1168
 msgid "the dims contain missing values"
 msgstr "les dimensions contiennent des valeurs manquantes"
 
-#: src/main/attrib.c:1073
+#: src/main/attrib.c:1170
 msgid "the dims contain negative values"
 msgstr "les dimensions contiennent des valeurs n�gatives"
 
-#: src/main/attrib.c:1078
+#: src/main/attrib.c:1175
 msgid "dims do not match the length of object"
 msgstr "dims ne correspond pas � la longueur de l'objet"
 
-#: src/main/attrib.c:1080
+#: src/main/attrib.c:1177
 #, c-format
 msgid "dims [product %d] do not match the length of object [%d]"
 msgstr "dims [produit %d] ne correspond pas � la longueur de l'objet [%d]"
 
-#: src/main/attrib.c:1177
+#: src/main/attrib.c:1284
 msgid "attributes must be a list or NULL"
 msgstr "les attributs doivent �tre dans une liste, ou alors la valeur 'NULL'"
 
-#: src/main/attrib.c:1182
+#: src/main/attrib.c:1289
 msgid "attributes must be named"
 msgstr "les attributs doivent �tre nomm�s"
 
-#: src/main/attrib.c:1186
+#: src/main/attrib.c:1293
 #, c-format
 msgid "all attributes must have names [%d does not]"
 msgstr "tous les attributs doivent �tre nomm�s [%d ne l'est pas]"
 
-#: src/main/attrib.c:1285
+#: src/main/attrib.c:1393
 msgid "'which' must be of mode character"
 msgstr "'which' doit �tre en mode caract�re"
 
-#: src/main/attrib.c:1287
+#: src/main/attrib.c:1395
 msgid "exactly one attribute 'which' must be given"
 msgstr "un et un seul attribut 'which' doit �tre fourni"
 
-#: src/main/attrib.c:1345 src/main/attrib.c:1368 src/main/subscript.c:240
-#: src/main/subscript.c:244 src/main/subset.c:1188 src/main/subset.c:1239
+#: src/main/attrib.c:1456 src/main/attrib.c:1479 src/main/subscript.c:245
+#: src/main/subscript.c:249 src/main/subset.c:1257 src/main/subset.c:1311
 #, c-format
 msgid "partial match of '%s' to '%s'"
 msgstr "correspondance partielle de '%s' en '%s'"
 
-#: src/main/attrib.c:1406
+#: src/main/attrib.c:1525
 #, c-format
 msgid "invalid type '%s' for slot name"
 msgstr "type incorrect '%s' pour le nom d'un slot"
 
-#: src/main/attrib.c:1444
+#: src/main/attrib.c:1563
 msgid "'name' must be non-null character string"
 msgstr "'name' doit �tre une cha�ne de caract�res non nulle"
 
-#: src/main/attrib.c:1568 src/main/attrib.c:1639 src/main/attrib.c:1676
+#: src/main/attrib.c:1688 src/main/attrib.c:1759 src/main/attrib.c:1797
 msgid "invalid type or length for slot name"
 msgstr "type ou longueur incorrect pour le nom d'un slot"
 
-#: src/main/attrib.c:1602
+#: src/main/attrib.c:1722
 #, c-format
 msgid "cannot get a slot (\"%s\") from an object of type \"%s\""
 msgstr "impossible d'obtenir un slot (\"%s\") d'un objet de type \"%s\""
 
-#: src/main/attrib.c:1613
+#: src/main/attrib.c:1733
 #, c-format
 msgid "no slot of name \"%s\" for this object of class \"%s\""
 msgstr "aucun slot de nom \"%s\" pour cet objet de la classe \"%s\""
 
-#: src/main/attrib.c:1630
+#: src/main/attrib.c:1750
 msgid "attempt to set slot on NULL object"
 msgstr "tentative de changer le slot d'un objet en NULL"
 
-#: src/main/attrib.c:1671
+#: src/main/attrib.c:1792
 msgid "formal classes cannot be used without the 'methods' package"
 msgstr ""
 "les classes formelles ne peuvent �tre utilis�es sans le package 'methods'"
 
-#: src/main/attrib.c:1683
+#: src/main/attrib.c:1804
 #, c-format
 msgid ""
 "trying to get slot \"%s\" from an object of a basic class (\"%s\") with no "
@@ -1267,7 +1290,7 @@ msgstr ""
 "tentative d'obtenir le slot \"%s\" d'un objet d'une classe �l�mentaire (\"%s"
 "\") sans slots"
 
-#: src/main/attrib.c:1687
+#: src/main/attrib.c:1808
 #, c-format
 msgid ""
 "trying to get slot \"%s\" from an object (class \"%s\") that is not an S4 "
@@ -1276,49 +1299,48 @@ msgstr ""
 "tentative d'obtenir le slot \"%s\" d'un objet (classe \"%s\") qui n'est pas "
 "un objet S4"
 
-#: src/main/bind.c:161
+#: src/main/bind.c:164
 #, c-format
 msgid "resulting vector exceeds vector length limit in '%s'"
 msgstr ""
 "le vecteur r�sultant � une taille sup�rieure � la valeur maximale permise "
 "dans '%s'"
 
-#: src/main/bind.c:291 src/main/bind.c:327 src/main/bind.c:376
-#: src/main/bind.c:449 src/main/bind.c:477
+#: src/main/bind.c:294 src/main/bind.c:330 src/main/bind.c:379
+#: src/main/bind.c:452 src/main/bind.c:480
 #, c-format
 msgid "type '%s' is unimplemented in '%s'"
 msgstr "type '%s' est indisponible dans '%s'"
 
-#: src/main/bind.c:685
+#: src/main/bind.c:688
 msgid "repeated formal argument 'recursive'"
 msgstr "argument formel 'recursive' r�p�t�"
 
-#: src/main/bind.c:696
+#: src/main/bind.c:699
 msgid "repeated formal argument 'use.names'"
 msgstr "argument formel 'use.names' r�p�t�"
 
-#: src/main/bind.c:894
+#: src/main/bind.c:900
 msgid "argument not a list"
 msgstr "l'argument n'est pas une liste"
 
-#: src/main/bind.c:1038 src/main/eval.c:2691 src/main/eval.c:2700
-#: src/main/objects.c:318 src/main/objects.c:354 src/main/objects.c:729
-#: src/main/objects.c:746 src/main/objects.c:753
+#: src/main/bind.c:1044 src/main/names.c:1273 src/main/names.c:1278
+#: src/main/names.c:1283 src/main/names.c:1288
 #, c-format
 msgid "class name too long in '%s'"
 msgstr "nom de classe trop long dans '%s'"
 
-#: src/main/bind.c:1114
+#: src/main/bind.c:1128
 #, c-format
 msgid "cannot create a matrix from type '%s'"
 msgstr "impossible de cr�er une matrice � partir de du type '%s'"
 
-#: src/main/bind.c:1185
+#: src/main/bind.c:1198
 #, c-format
 msgid "number of rows of matrices must match (see arg %d)"
 msgstr "le nombre de lignes des matrices doit correspondre (voir argument %d)"
 
-#: src/main/bind.c:1430
+#: src/main/bind.c:1455
 #, c-format
 msgid "number of columns of matrices must match (see arg %d)"
 msgstr ""
@@ -1328,119 +1350,134 @@ msgstr ""
 msgid "vector size cannot be NA"
 msgstr "la taille de vecteur ne peut �tre NA"
 
-#: src/main/builtin.c:49 src/main/builtin.c:57 src/main/sort.c:1303
+#: src/main/builtin.c:49 src/main/builtin.c:57 src/main/sort.c:1323
 msgid "vector size cannot be NA/NaN"
 msgstr "la taille de vecteur ne peut �tre NA/NaN"
 
-#: src/main/builtin.c:50 src/main/builtin.c:58 src/main/sort.c:1304
+#: src/main/builtin.c:50 src/main/builtin.c:58 src/main/sort.c:1324
 msgid "vector size cannot be infinite"
 msgstr "la longueur d'un vecteur ne peut �tre infinie"
 
-#: src/main/builtin.c:51 src/main/builtin.c:59 src/main/builtin.c:916
-#: src/main/sort.c:1305
+#: src/main/builtin.c:51 src/main/builtin.c:59 src/main/builtin.c:950
+#: src/main/sort.c:1325
 msgid "vector size specified is too large"
 msgstr "la longueur choisie pour le vecteur est trop grande"
 
-#: src/main/builtin.c:84 src/main/builtin.c:93 src/main/builtin.c:293
-#: src/main/builtin.c:326 src/main/builtin.c:365 src/main/builtin.c:375
-#: src/main/coerce.c:1537 src/main/connections.c:3066 src/main/engine.c:2967
-#: src/main/envir.c:993 src/main/envir.c:1046 src/main/envir.c:1136
-#: src/main/envir.c:1615 src/main/envir.c:1739 src/main/envir.c:1807
-#: src/main/envir.c:1925 src/main/envir.c:2582 src/main/envir.c:2642
-#: src/main/envir.c:2922 src/main/envir.c:2951 src/main/envir.c:2972
-#: src/main/envir.c:2995 src/main/envir.c:3030 src/main/envir.c:3051
-#: src/main/envir.c:3357 src/main/envir.c:3362 src/main/eval.c:5318
-#: src/main/objects.c:197 src/main/objects.c:203 src/main/saveload.c:2070
-#: src/main/saveload.c:2364 src/main/serialize.c:2709
+#: src/main/builtin.c:84 src/main/builtin.c:93 src/main/builtin.c:304
+#: src/main/builtin.c:337 src/main/builtin.c:394 src/main/builtin.c:408
+#: src/main/coerce.c:1536 src/main/connections.c:3062 src/main/engine.c:2987
+#: src/main/envir.c:1001 src/main/envir.c:1054 src/main/envir.c:1210
+#: src/main/envir.c:1749 src/main/envir.c:1873 src/main/envir.c:1939
+#: src/main/envir.c:2072 src/main/envir.c:2791 src/main/envir.c:2877
+#: src/main/envir.c:3182 src/main/envir.c:3211 src/main/envir.c:3232
+#: src/main/envir.c:3255 src/main/envir.c:3290 src/main/envir.c:3311
+#: src/main/envir.c:3632 src/main/envir.c:3637 src/main/eval.c:6251
+#: src/main/objects.c:191 src/main/objects.c:199 src/main/saveload.c:2072
+#: src/main/saveload.c:2364 src/main/serialize.c:2755
 msgid "use of NULL environment is defunct"
 msgstr "l'utilisation de l'environnement NULL n'est plus autoris�e"
 
-#: src/main/builtin.c:306
+#: src/main/builtin.c:250 src/main/builtin.c:263
+#, fuzzy
+msgid "argument is not a function"
+msgstr "l'argument ne peut pas �tre une fonction"
+
+#: src/main/builtin.c:317
 msgid "replacement object is not an environment"
 msgstr "l'objet de remplacement n'est pas un environnement"
 
-#: src/main/builtin.c:331
+#: src/main/builtin.c:342
 msgid "'enclos' must be an environment"
 msgstr "'enclos' doit �tre un environnement"
 
-#: src/main/builtin.c:352 src/main/builtin.c:370
+#: src/main/builtin.c:363 src/main/builtin.c:399
 msgid "argument is not an environment"
 msgstr "l'argument n'est pas un environnment"
 
-#: src/main/builtin.c:354
+#: src/main/builtin.c:365
 msgid "the empty environment has no parent"
 msgstr "l'environnement vide n'a pas de parent"
 
-#: src/main/builtin.c:372
+#: src/main/builtin.c:401
 msgid "can not set parent of the empty environment"
 msgstr "impossible de fixer le parent de l'environnement vide"
 
-#: src/main/builtin.c:380
+#: src/main/builtin.c:403
+#, fuzzy
+msgid "can not set the parent environment of a namespace"
+msgstr "impossible de fixer le parent de l'environnement vide"
+
+#: src/main/builtin.c:405
+#, fuzzy
+msgid "can not set the parent environment of package imports"
+msgstr "impossible de fixer le parent de l'environnement vide"
+
+#: src/main/builtin.c:413
 msgid "'parent' is not an environment"
 msgstr "'parent' n'est pas un environnement"
 
-#: src/main/builtin.c:521 src/main/connections.c:3691
-#: src/main/connections.c:4068 src/main/connections.c:4102
-#: src/main/connections.c:4480 src/main/connections.c:4550
-#: src/main/connections.c:4759 src/main/connections.c:4763
-#: src/main/connections.c:5124 src/main/deparse.c:360 src/main/deparse.c:446
-#: src/main/serialize.c:2006
+#: src/main/builtin.c:556 src/main/connections.c:3687
+#: src/main/connections.c:4079 src/main/connections.c:4113
+#: src/main/connections.c:4491 src/main/connections.c:4561
+#: src/main/connections.c:4772 src/main/connections.c:4776
+#: src/main/connections.c:5199 src/main/deparse.c:369 src/main/deparse.c:458
+#: src/main/serialize.c:2045
 msgid "cannot write to this connection"
 msgstr "impossible d'�crire vers cette connexion"
 
-#: src/main/builtin.c:526 src/main/builtin.c:556
+#: src/main/builtin.c:561 src/main/builtin.c:591
 #, c-format
 msgid "invalid '%s' specification"
 msgstr "sp�cification de '%s' incorrecte"
 
-#: src/main/builtin.c:543
+#: src/main/builtin.c:578
 msgid "non-positive 'fill' argument will be ignored"
 msgstr "l'argument 'fill' n�gatif ou nul sera ignor�"
 
-#: src/main/builtin.c:618
+#: src/main/builtin.c:653
 #, c-format
 msgid "argument %d (type '%s') cannot be handled by 'cat'"
 msgstr "argument %d (type '%s') pas encore trait� par cat"
 
-#: src/main/builtin.c:763
+#: src/main/builtin.c:797
 #, c-format
 msgid "vector: cannot make a vector of mode '%s'."
 msgstr "vector : impossible de cr�er un vecteur de mode '%s'"
 
-#: src/main/builtin.c:789
+#: src/main/builtin.c:823
 msgid "cannot set length of non-vector"
 msgstr "impossible de modifier la longueur d'un objet qui n'est pas un vecteur"
 
-#: src/main/builtin.c:897 src/main/builtin.c:907 src/main/options.c:637
+#: src/main/builtin.c:931 src/main/builtin.c:941 src/main/options.c:659
 msgid "invalid argument"
 msgstr "argument incorrect"
 
-#: src/main/builtin.c:899 src/main/builtin.c:909 src/main/builtin.c:911
-#: src/main/character.c:366 src/main/coerce.c:2765
+#: src/main/builtin.c:933 src/main/builtin.c:943 src/main/builtin.c:945
+#: src/main/character.c:525 src/main/coerce.c:2832
 msgid "invalid value"
 msgstr "valeur incorrecte"
 
-#: src/main/builtin.c:942 src/main/coerce.c:2478 src/main/coerce.c:2519
-#: src/main/eval.c:563 src/main/eval.c:683 src/main/eval.c:2099
-#: src/main/eval.c:2176 src/main/eval.c:2236 src/main/eval.c:2569
-#: src/main/eval.c:4694 src/main/eval.c:4814
+#: src/main/builtin.c:976 src/main/coerce.c:2541 src/main/coerce.c:2584
+#: src/main/eval.c:620 src/main/eval.c:740 src/main/eval.c:2266
+#: src/main/eval.c:2346 src/main/eval.c:2407 src/main/eval.c:2745
+#: src/main/eval.c:5584 src/main/eval.c:5701
 msgid "'...' used in an incorrect context"
 msgstr "'...' utilis� dans un contexte incorrect"
 
-#: src/main/builtin.c:963
+#: src/main/builtin.c:998
 #, c-format
 msgid "duplicate 'switch' defaults: '%s' and '%s'"
 msgstr "multiples valeurs par d�faut dans 'switch' : '%s' et ''%s'"
 
-#: src/main/builtin.c:996
+#: src/main/builtin.c:1031
 msgid "'EXPR' is missing"
 msgstr "'EXPR' est manquant"
 
-#: src/main/builtin.c:1000 src/main/eval.c:5155
+#: src/main/builtin.c:1035 src/main/eval.c:6056
 msgid "EXPR must be a length 1 vector"
 msgstr "EXPR doit �tre un vecteur de longueur 1"
 
-#: src/main/builtin.c:1003
+#: src/main/builtin.c:1038 src/main/eval.c:6059
 #, c-format
 msgid ""
 "EXPR is a \"factor\", treated as integer.\n"
@@ -1449,96 +1486,117 @@ msgstr ""
 "EXPR est une variable \"factor\", elle sera trait�e comme des entiers.\n"
 " Pensez � utiliser plut�t '%s'."
 
-#: src/main/character.c:105 src/main/character.c:108 src/main/character.c:132
-#: src/main/character.c:135
+#: src/main/builtin.c:1095 src/main/eval.c:6069 src/main/eval.c:6098
+#, fuzzy
+msgid "'switch' with no alternatives"
+msgstr "EXPR num�rique requise dans 'switch' sans alternatives nomm�es"
+
+#: src/main/character.c:103 src/main/character.c:224
+#, fuzzy, c-format
+msgid "%d argument passed to '%s' which requires %d to %d"
+msgid_plural "%d arguments passed to '%s' which requires %d to %d"
+msgstr[0] "%d argument pass�s � '%s' qui en exige %d"
+msgstr[1] "%d arguments pass�s � '%s' qui en exige %d"
+
+#: src/main/character.c:110 src/main/character.c:113 src/main/character.c:232
+#: src/main/character.c:235
 #, c-format
 msgid "'%s' requires a character vector"
 msgstr "'%s' exige un vecteur de caract�res comme argument"
 
-#: src/main/character.c:164
-#, c-format
-msgid ""
-"number of characters is not computable for element %d in \"bytes\" encoding"
+#: src/main/character.c:150 src/main/character.c:165 src/main/character.c:175
+#: src/main/character.c:203
+#, fuzzy, c-format
+msgid "invalid multibyte string, %s"
+msgstr "cha�ne de charact�res multioctets incorrecte %d"
+
+#: src/main/character.c:159
+#, fuzzy, c-format
+msgid "number of characters is not computable in \"bytes\" encoding, %s"
 msgstr ""
 "nombre de caract�res impossible � calculer pour l'�l�ment %d dans l'encodage "
 "\"bytes\""
 
-#: src/main/character.c:169 src/main/character.c:197 src/main/character.c:653
-#: src/main/character.c:750
-#, c-format
-msgid "invalid multibyte string %d"
-msgstr "cha�ne de charact�res multioctets incorrecte %d"
-
-#: src/main/character.c:185
-#, c-format
-msgid "width is not computable for element %d in \"bytes\" encoding"
+#: src/main/character.c:188
+#, fuzzy, c-format
+msgid "width is not computable for %s in \"bytes\" encoding"
 msgstr ""
 "largeur impossible � calculer pour l'�l�ment %d dans l'encodage \"bytes\""
 
-#: src/main/character.c:263
+#: src/main/character.c:311
 msgid "extracting substrings from a non-character object"
 msgstr "extraction d'une cha�ne d'un objet ne contenant pas des caract�res"
 
-#: src/main/character.c:268 src/main/character.c:363
+#: src/main/character.c:321 src/main/character.c:522
 msgid "invalid substring arguments"
 msgstr "arguments de type cha�ne incorrects"
 
-#: src/main/character.c:358
+#: src/main/character.c:361
+#, fuzzy
+msgid "non-character object(s)"
+msgstr "les noms ne sont pas des cha�nes de caract�res"
+
+#: src/main/character.c:517
 msgid "replacing substrings in a non-character object"
 msgstr "la cha�ne de remplacement n'est pas un objet constitu� de caract�res"
 
-#: src/main/character.c:551
+#: src/main/character.c:785
 msgid "the first argument must be a character vector"
 msgstr "le premier argument doit �tre un vecteur de caract�res"
 
-#: src/main/character.c:570
+#: src/main/character.c:822
 msgid "abbreviate used with non-ASCII chars"
 msgstr "abbreviate utilis� avec des caract�res non ASCII"
 
-#: src/main/character.c:591
+#: src/main/character.c:843
 msgid "non-character names"
 msgstr "les noms ne sont pas des cha�nes de caract�res"
 
-#: src/main/character.c:696 src/main/grep.c:159
+#: src/main/character.c:905 src/main/character.c:1002
+#, c-format
+msgid "invalid multibyte string %d"
+msgstr "cha�ne de charact�res multioctets incorrecte %d"
+
+#: src/main/character.c:948 src/main/grep.c:163
 msgid "non-character argument"
 msgstr "l'argument n'est pas une cha�ne de caract�res"
 
-#: src/main/character.c:805
+#: src/main/character.c:1057
 #, c-format
 msgid "decreasing range specification ('%lc-%lc')"
 msgstr "sp�cification de plage d�croissante ('%lc-%lc')"
 
-#: src/main/character.c:891
+#: src/main/character.c:1143
 #, c-format
 msgid "decreasing range specification ('%c-%c')"
 msgstr "sp�cification de plage d�croissante ('%c-%c')"
 
-#: src/main/character.c:1079
+#: src/main/character.c:1331
 msgid "invalid UTF-8 string 'old'"
 msgstr "cha�ne de charact�res UTF-8 'old' incorrecte"
 
-#: src/main/character.c:1085
+#: src/main/character.c:1337
 msgid "invalid multibyte string 'old'"
 msgstr "cha�ne de charact�res multioctets 'old' incorrecte"
 
-#: src/main/character.c:1098
+#: src/main/character.c:1350
 msgid "invalid UTF-8 string 'new'"
 msgstr "cha�ne de charact�res uTF-8 'new' incorrecte"
 
-#: src/main/character.c:1104
+#: src/main/character.c:1356
 msgid "invalid multibyte string 'new'"
 msgstr "cha�ne de charact�res multioctets 'new' incorrecte"
 
-#: src/main/character.c:1132 src/main/character.c:1221
+#: src/main/character.c:1384 src/main/character.c:1473
 msgid "'old' is longer than 'new'"
 msgstr "'old' est plus long que 'new'"
 
-#: src/main/character.c:1164
+#: src/main/character.c:1416
 #, c-format
 msgid "invalid input multibyte string %d"
 msgstr "cha�ne de caract�res multioctets %d incorrecte en entr�e"
 
-#: src/main/character.c:1271
+#: src/main/character.c:1523
 msgid "strtrim() requires a character vector"
 msgstr "strtrim() exige un vecteur de caract�res comme argument"
 
@@ -1550,15 +1608,16 @@ msgstr "argument 'mode' incorrect"
 msgid "applies only to lists and vectors"
 msgstr "ne s'applique qu'� des listes ou des vecteurs"
 
-#: src/main/coerce.c:77 src/main/errors.c:1208
+#: src/main/coerce.c:77 src/main/errors.c:1194
 msgid "NAs introduced by coercion"
 msgstr "NAs introduits lors de la conversion automatique"
 
-#: src/main/coerce.c:79 src/main/errors.c:1209
-msgid "inaccurate integer conversion in coercion"
-msgstr "conversion automatique d'entier approximative"
+#: src/main/coerce.c:79
+#, fuzzy
+msgid "NAs introduced by coercion to integer range"
+msgstr "NAs introduits lors de la conversion automatique"
 
-#: src/main/coerce.c:81 src/main/errors.c:1210
+#: src/main/coerce.c:81 src/main/errors.c:1196
 msgid "imaginary parts discarded in coercion"
 msgstr "les parties imaginaires sont perdues lors de la conversion automatique"
 
@@ -1568,61 +1627,65 @@ msgstr ""
 "valeurs hors plages trait�es comme 0 lors de la conversion automatique en "
 "type raw"
 
-#: src/main/coerce.c:414
+#: src/main/coerce.c:399
 #, c-format
 msgid "invalid data of mode '%s' (too short)"
 msgstr "donn�es incorrectes de mode '%s' (trop courtes)"
 
-#: src/main/coerce.c:1016
+#: src/main/coerce.c:1002
 #, c-format
 msgid "'pairlist' object cannot be coerced to type '%s'"
 msgstr ""
 "l'objet 'pairlist' ne peut �tre converti automatiquement en un type '%s'"
 
-#: src/main/coerce.c:1134
+#: src/main/coerce.c:1120
 #, c-format
 msgid "(list) object cannot be coerced to type '%s'"
 msgstr "l'objet (list) ne peut �tre converti automatiquement en un type '%s'"
 
-#: src/main/coerce.c:1157
+#: src/main/coerce.c:1143
 #, c-format
 msgid "(symbol) object cannot be coerced to type '%s'"
 msgstr "l'objet (symbol) ne peut �tre converti automatiquement en un type '%s'"
 
-#: src/main/coerce.c:1173 src/main/coerce.c:1485
+#: src/main/coerce.c:1159 src/main/coerce.c:1484
 msgid "no method for coercing this S4 class to a vector"
 msgstr ""
 "pas de m�thode pour convertir automatiquement cette classe S4 en vecteur"
 
-#: src/main/coerce.c:1232
+#: src/main/coerce.c:1222
 msgid "environments cannot be coerced to other types"
 msgstr "les environnements ne peuvent �tre convertis vers d'autres types"
 
-#: src/main/coerce.c:1379
+#: src/main/coerce.c:1374
 msgid "attempting to coerce non-factor"
 msgstr "tentative de conversion automatique d'autre chose qu'un facteur"
 
-#: src/main/coerce.c:1533
+#: src/main/coerce.c:1379 src/main/coerce.c:1389
+msgid "malformed factor"
+msgstr ""
+
+#: src/main/coerce.c:1532
 msgid "list argument expected"
 msgstr "liste d'arguments attendue"
 
-#: src/main/coerce.c:1541 src/main/eval.c:5322
+#: src/main/coerce.c:1540 src/main/eval.c:6255
 msgid "invalid environment"
 msgstr "environnement incorrect"
 
-#: src/main/coerce.c:1545
+#: src/main/coerce.c:1544
 msgid "argument must have length at least 1"
 msgstr "l'argument doit avoir une longueur d'au moins 1"
 
-#: src/main/coerce.c:1567
+#: src/main/coerce.c:1566
 msgid "invalid body for function"
 msgstr "corps de fonction incorrect"
 
-#: src/main/coerce.c:1590
+#: src/main/coerce.c:1589
 msgid "invalid length 0 argument"
 msgstr "argument de longueur nulle incorrect"
 
-#: src/main/coerce.c:1605
+#: src/main/coerce.c:1604
 msgid "invalid argument list"
 msgstr "liste d'arguments incorrect"
 
@@ -1634,50 +1697,47 @@ msgstr "type \"single\" non impl
 msgid "unimplemented predicate"
 msgstr "pr�dicat non impl�ment�"
 
-#: src/main/coerce.c:2069
+#: src/main/coerce.c:2070
 #, c-format
 msgid "%s() applied to non-(list or vector) of type '%s'"
 msgstr ""
 "%s() appliqu� � un objet de type '%s' qui n'est ni une liste, ni un vecteur"
 
-#: src/main/coerce.c:2212 src/main/coerce.c:2275 src/main/coerce.c:2343
+#: src/main/coerce.c:2267 src/main/coerce.c:2331 src/main/coerce.c:2403
 #, c-format
 msgid "default method not implemented for type '%s'"
 msgstr "m�thode par d�faut indisponible pour le type '%s'"
 
-#: src/main/coerce.c:2361
+#: src/main/coerce.c:2425
 msgid "'name' is missing"
 msgstr "'name' est manquant"
 
-#: src/main/coerce.c:2368
+#: src/main/coerce.c:2432
 msgid "first argument must be a character string"
 msgstr "le premier argument doit �tre une cha�ne de caract�res"
 
-#: src/main/coerce.c:2401
-msgid "'what' must be a character string or a function"
-msgstr "'what' doit �tre une cha�ne de caract�res ou une fonction"
+#: src/main/coerce.c:2464
+#, fuzzy
+msgid "'what' must be a function or character string"
+msgstr "'text' doit �tre une cha�ne de caract�res"
 
-#: src/main/coerce.c:2405
+#: src/main/coerce.c:2468
 msgid "'args' must be a list or expression"
 msgstr "'args' doit �tre une liste ou une expression"
 
-#: src/main/coerce.c:2408
-msgid "'args' must be a list"
-msgstr "'args' doit �tre une liste"
-
-#: src/main/coerce.c:2412
+#: src/main/coerce.c:2475 src/main/unique.c:1345
 msgid "'envir' must be an environment"
 msgstr "'envir' doit �tre un environnement"
 
-#: src/main/coerce.c:2567
+#: src/main/coerce.c:2634
 msgid "invalid environment specified"
 msgstr "environnement sp�cifi� incorrect"
 
-#: src/main/coerce.c:2633
+#: src/main/coerce.c:2700
 msgid "Setting class(x) to NULL;   result will no longer be an S4 object"
 msgstr "class(x) est mise � NULL ; le r�sultat ne sera plus un objet S4"
 
-#: src/main/coerce.c:2636
+#: src/main/coerce.c:2703
 #, c-format
 msgid ""
 "Setting class(x) to multiple strings (\"%s\", \"%s\", ...); result will no "
@@ -1686,7 +1746,7 @@ msgstr ""
 "class(x) est une cha�ne multiple (\"%s\", \"%s\", ...) ; le r�sultat ne sera "
 "plus un objet S4"
 
-#: src/main/coerce.c:2640
+#: src/main/coerce.c:2707
 #, c-format
 msgid ""
 "Setting class(x) to \"%s\" sets attribute to NULL; result will no longer be "
@@ -1695,12 +1755,12 @@ msgstr ""
 "class(x) chang�e vers \"%s\" et l'attribut devient NULL ; le r�sultat ne "
 "sera plus un objet S4"
 
-#: src/main/coerce.c:2673
+#: src/main/coerce.c:2740
 msgid "invalid replacement object to be a class string"
 msgstr ""
 "objet de remplacement incorrect, doit �tre de classe cha�ne de caract�res"
 
-#: src/main/coerce.c:2694
+#: src/main/coerce.c:2761
 #, c-format
 msgid ""
 "\"%s\" can only be set as the class if the object has this type; found \"%s\""
@@ -1708,7 +1768,7 @@ msgstr ""
 "\"%s\" peut �tre attribu� comme classe seulement si l'objet est de ce type ; "
 "type trouv� : \"%s\""
 
-#: src/main/coerce.c:2712
+#: src/main/coerce.c:2779
 #, c-format
 msgid ""
 "invalid to set the class to matrix unless the dimension attribute is of "
@@ -1717,657 +1777,661 @@ msgstr ""
 "impossible de d�finir la classe de l'objet comme matrice si son attribut de "
 "dimension n'est pas de longueur 2 (il est de %d)"
 
-#: src/main/coerce.c:2720
+#: src/main/coerce.c:2787
 msgid ""
 "cannot set class to \"array\" unless the dimension attribute has length > 0"
 msgstr ""
 "impossible de d�finir la classe de l'objet comme tableau, � moins que "
 "l'attribut de dimension ait une longueur > 0"
 
-#: src/main/coerce.c:2756
+#: src/main/coerce.c:2823
 msgid "'value' must be non-null character string"
 msgstr "'value' doit �tre une cha�ne de caract�res non nulle"
 
-#: src/main/coerce.c:2769
+#: src/main/coerce.c:2836
 msgid "invalid to change the storage mode of a factor"
 msgstr ""
 "la modification du mode de stockage d'un objet 'factor' n'est pas autoris�e"
 
-#: src/main/complex.c:126
+#: src/main/complex.c:123
 msgid "invalid complex unary operator"
 msgstr "op�rateur complexe unitaire incorrect"
 
-#: src/main/complex.c:261
+#: src/main/complex.c:251
 msgid "unimplemented complex operation"
 msgstr "op�ration complexe non impl�ment�e"
 
-#: src/main/complex.c:363
+#: src/main/complex.c:353
 msgid "non-numeric argument to function"
 msgstr "argument non num�rique pour une fonction"
 
-#: src/main/complex.c:827
+#: src/main/complex.c:822
 msgid "invalid polynomial coefficient"
 msgstr "coefficient de polyn�me incorrect"
 
-#: src/main/complex.c:832
+#: src/main/complex.c:827
 msgid "root finding code failed"
 msgstr "le code de recherche de z�ro a �chou�"
 
-#: src/main/connections.c:153
+#: src/main/connections.c:150
 msgid "all connections are in use"
 msgstr "toutes les connexions sont utilis�es"
 
-#: src/main/connections.c:164
+#: src/main/connections.c:161
 msgid "connection not found"
 msgstr "connexion non trouv�e"
 
-#: src/main/connections.c:175
+#: src/main/connections.c:172 src/main/connections.c:5213
 msgid "invalid connection"
 msgstr "connexion incorrecte"
 
-#: src/main/connections.c:207
+#: src/main/connections.c:204
 #, c-format
 msgid "closing unused connection %d (%s)\n"
 msgstr "fermeture de la connexion inutilis�e %d (%s)\n"
 
-#: src/main/connections.c:232 src/main/sysutils.c:619 src/main/sysutils.c:806
-#: src/main/sysutils.c:821 src/main/sysutils.c:912 src/main/sysutils.c:927
-#: src/main/sysutils.c:1023 src/main/sysutils.c:1096 src/main/sysutils.c:1106
-#: src/main/sysutils.c:1119 src/main/sysutils.c:1516
+#: src/main/connections.c:229 src/main/sysutils.c:631 src/main/sysutils.c:834
+#: src/main/sysutils.c:849 src/main/sysutils.c:978 src/main/sysutils.c:1051
+#: src/main/sysutils.c:1061 src/main/sysutils.c:1074 src/main/sysutils.c:1472
 #, c-format
 msgid "unsupported conversion from '%s' to '%s'"
 msgstr "conversion automatique indisponible de '%s' � '%s'"
 
-#: src/main/connections.c:288 src/main/connections.c:304
-#: src/main/connections.c:456 src/main/connections.c:462
-#: src/main/connections.c:468 src/main/connections.c:479
-#: src/main/connections.c:486
+#: src/main/connections.c:285 src/main/connections.c:300
+#: src/main/connections.c:451 src/main/connections.c:456
+#: src/main/connections.c:461 src/main/connections.c:472
+#: src/main/connections.c:478
 #, c-format
 msgid "%s not enabled for this connection"
 msgstr "%s interdit pour cette connexion"
 
-#: src/main/connections.c:335 src/main/connections.c:352
-#: src/main/connections.c:2916
+#: src/main/connections.c:330 src/main/connections.c:347
+#: src/main/connections.c:2910
 msgid "printing of extremely long output is truncated"
 msgstr "impression tronqu�e d'une sortie extr�mement longue"
 
-#: src/main/connections.c:375
+#: src/main/connections.c:370
 msgid "invalid char string in output conversion"
 msgstr "cha�ne de caract�res incorrecte dans la conversion de la sortie"
 
-#: src/main/connections.c:439
+#: src/main/connections.c:434
 #, c-format
 msgid "invalid input found on input connection '%s'"
 msgstr "entr�e incorrecte trouv�e dans la connexion en entr�e '%s'"
 
-#: src/main/connections.c:580
+#: src/main/connections.c:571
 #, c-format
 msgid "cannot open file '%ls': %s"
 msgstr "impossible d'ouvrir le fichier '%ls' : %s"
 
-#: src/main/connections.c:691
+#: src/main/connections.c:683
 msgid "connection is not open for reading"
 msgstr "connexion non ouverte en lecture"
 
-#: src/main/connections.c:696
+#: src/main/connections.c:688
 msgid "connection is not open for writing"
 msgstr "connexion non ouverte en �criture"
 
-#: src/main/connections.c:734 src/main/connections.c:2229
+#: src/main/connections.c:726 src/main/connections.c:2223
 msgid "can only truncate connections open for writing"
 msgstr ""
 "la troncature n'est possible que pour les connexions ouvertes en �criture"
 
-#: src/main/connections.c:738 src/main/connections.c:740
+#: src/main/connections.c:730 src/main/connections.c:732
 msgid "file truncation failed"
 msgstr "la troncature du fichier a �chou�"
 
-#: src/main/connections.c:742
+#: src/main/connections.c:734
 msgid "file truncation unavailable on this platform"
 msgstr "troncature de fichier indisponible sur cette architecture"
 
-#: src/main/connections.c:788 src/main/connections.c:792
-#: src/main/connections.c:798 src/main/connections.c:815
+#: src/main/connections.c:780 src/main/connections.c:784
+#: src/main/connections.c:790 src/main/connections.c:807
 msgid "allocation of file connection failed"
 msgstr "l'affectation d'une connexion sur fichier a �chou�"
 
-#: src/main/connections.c:866 src/main/connections.c:1044
+#: src/main/connections.c:858 src/main/connections.c:1035
 #, c-format
 msgid "cannot create fifo '%s', reason '%s'"
 msgstr "impossible de cr�er le fifo '%s', � cause de '%s'"
 
-#: src/main/connections.c:872
+#: src/main/connections.c:864
 #, c-format
 msgid "'%s' exists but is not a fifo"
 msgstr "'%s' existe, mais n'est pas un fifo"
 
-#: src/main/connections.c:886
+#: src/main/connections.c:878
 #, c-format
 msgid "fifo '%s' is not ready"
 msgstr "le fifo '%s' n'est pas pr�t"
 
-#: src/main/connections.c:887
+#: src/main/connections.c:879
 #, c-format
 msgid "cannot open fifo '%s'"
 msgstr "impossible d'ouvrir le fifo '%s'"
 
-#: src/main/connections.c:928 src/main/connections.c:939
-#: src/main/connections.c:1104 src/main/connections.c:1123
-#: src/main/connections.c:1531 src/main/connections.c:1541
-#: src/main/connections.c:1660 src/main/connections.c:1720
-#: src/main/connections.c:2246 src/main/connections.c:2263
-#: src/main/connections.c:2572 src/main/connections.c:5305
-#: src/main/connections.c:5369
+#: src/main/connections.c:920 src/main/connections.c:931
+#: src/main/connections.c:1095 src/main/connections.c:1114
+#: src/main/connections.c:1524 src/main/connections.c:1534
+#: src/main/connections.c:1653 src/main/connections.c:1713
+#: src/main/connections.c:2240 src/main/connections.c:2257
+#: src/main/connections.c:2566 src/main/connections.c:5385
+#: src/main/connections.c:5449
 msgid "too large a block specified"
 msgstr "bloc trop large fourni"
 
-#: src/main/connections.c:998 src/main/connections.c:1004
+#: src/main/connections.c:989 src/main/connections.c:995
 msgid "allocation of fifo name failed"
 msgstr "l'allocation dun nom d'une connexion fifo a �chou�"
 
-#: src/main/connections.c:1066
+#: src/main/connections.c:1057
 #, c-format
 msgid "cannot open fifo '%s', reason '%s'"
 msgstr "impossible d'ouvrir la connexion fifo '%s', � cause de '%s'"
 
-#: src/main/connections.c:1107 src/main/connections.c:1131
+#: src/main/connections.c:1098 src/main/connections.c:1122
 msgid "allocation of fifo buffer failed"
 msgstr "l'allocation d'un tampon pour une connexion fifo a �chou�"
 
-#: src/main/connections.c:1139
+#: src/main/connections.c:1130
 #, c-format
 msgid "cannot write FIFO '%s'"
 msgstr "impossible d'�crire dans la connexion FIFO '%s'"
 
-#: src/main/connections.c:1175 src/main/connections.c:1179
-#: src/main/connections.c:1185 src/main/connections.c:1201
+#: src/main/connections.c:1166 src/main/connections.c:1170
+#: src/main/connections.c:1176 src/main/connections.c:1192
 msgid "allocation of fifo connection failed"
 msgstr "l'allocation d'une connexion fifo a �chou�"
 
-#: src/main/connections.c:1219 src/main/connections.c:1377
-#: src/main/connections.c:1998 src/main/connections.c:3212
-#: src/main/connections.c:4967
+#: src/main/connections.c:1210 src/main/connections.c:1369
+#: src/main/connections.c:1991 src/main/connections.c:3205
+#: src/main/connections.c:4982
 msgid "only first element of 'description' argument used"
 msgstr "seul le premier �l�ment de l'argument 'description' est utilis�"
 
-#: src/main/connections.c:1236
+#: src/main/connections.c:1227
 msgid ""
 "fifo(\"\") only supports open = \"w+\" and open = \"w+b\": using the former"
 msgstr ""
 "fifo(\"\") accepte seulement open = \"w+\" et open = \"w+b\" : utilisation "
 "du premier"
 
-#: src/main/connections.c:1250 src/main/connections.c:1414
-#: src/main/connections.c:2064 src/main/connections.c:3179
-#: src/main/connections.c:3232 src/main/connections.c:3280
-#: src/main/connections.c:3567 src/main/connections.c:3683
-#: src/main/connections.c:3844 src/main/connections.c:4095
-#: src/main/connections.c:4423 src/main/connections.c:4543
-#: src/main/connections.c:4755 src/main/connections.c:5105 src/main/dcf.c:94
-#: src/main/deparse.c:352 src/main/deparse.c:438 src/main/saveload.c:2267
-#: src/main/saveload.c:2350 src/main/scan.c:933 src/main/serialize.c:2175
-#: src/main/serialize.c:2226 src/main/source.c:265
+#: src/main/connections.c:1242 src/main/connections.c:1407
+#: src/main/connections.c:2058 src/main/connections.c:3175
+#: src/main/connections.c:3226 src/main/connections.c:3274
+#: src/main/connections.c:3563 src/main/connections.c:3679
+#: src/main/connections.c:3841 src/main/connections.c:4106
+#: src/main/connections.c:4434 src/main/connections.c:4554
+#: src/main/connections.c:4768 src/main/connections.c:5180 src/main/dcf.c:93
+#: src/main/deparse.c:361 src/main/deparse.c:450 src/main/saveload.c:2269
+#: src/main/saveload.c:2350 src/main/scan.c:933 src/main/serialize.c:2216
+#: src/main/serialize.c:2267 src/main/source.c:270
 msgid "cannot open the connection"
 msgstr "impossible d'ouvrir la connexion"
 
-#: src/main/connections.c:1265
+#: src/main/connections.c:1257
 msgid "fifo connections are not available on this system"
 msgstr "les connexions fifo ne sont pas disponibles sur ce syst�me"
 
-#: src/main/connections.c:1295
+#: src/main/connections.c:1287
 #, c-format
 msgid "cannot pipe() cmd '%ls': %s"
 msgstr "impossible d'ouvrir la commande pipe() '%ls' : %s"
 
-#: src/main/connections.c:1302
+#: src/main/connections.c:1294
 #, c-format
 msgid "cannot open pipe() cmd '%s': %s"
 msgstr "impossible d'ouvrir la commande pipe() '%s' : %s"
 
-#: src/main/connections.c:1471 src/main/connections.c:1791
+#: src/main/connections.c:1464 src/main/connections.c:1784
 #, c-format
 msgid "cannot open compressed file '%s', probable reason '%s'"
 msgstr "impossible d'ouvrir le fichier compress� '%s', cause probable : '%s'"
 
-#: src/main/connections.c:1511
+#: src/main/connections.c:1504
 msgid "whence = \"end\" is not implemented for gzfile connections"
 msgstr "whence = \"end\" n'est pas impl�ment� pour les connexions gzfile"
 
-#: src/main/connections.c:1516
+#: src/main/connections.c:1509
 msgid "seek on a gzfile connection returned an internal error"
 msgstr ""
 "le mode d'acc�s al�atoire sur une connexion gzfile a renvoy� une erreur "
 "interne"
 
-#: src/main/connections.c:1550 src/main/connections.c:1554
-#: src/main/connections.c:1560 src/main/connections.c:1577
+#: src/main/connections.c:1543 src/main/connections.c:1547
+#: src/main/connections.c:1553 src/main/connections.c:1570
 msgid "allocation of gzfile connection failed"
 msgstr "l'allocation d'une connexion gzfile a �chou�"
 
-#: src/main/connections.c:1606
+#: src/main/connections.c:1599
 #, c-format
 msgid "cannot open bzip2-ed file '%s', probable reason '%s'"
 msgstr "impossible d'ouvrir le fichier bzip-2 '%s', cause probable : '%s'"
 
-#: src/main/connections.c:1615
+#: src/main/connections.c:1608
 #, c-format
 msgid "file '%s' appears not to be compressed by bzip2"
 msgstr "le fichier '%s' appara�t comme n'�tant pas compress� � l'aide de bzip2"
 
-#: src/main/connections.c:1624
+#: src/main/connections.c:1617
 #, c-format
 msgid "initializing bzip2 compression for file '%s' failed"
 msgstr "l'initialisation de la compression bzip2 pour le fichier '%s' a �chou�"
 
-#: src/main/connections.c:1678
+#: src/main/connections.c:1671
 msgid "allocation of overflow buffer for bzfile failed"
 msgstr "l'allocation du tampon de d�passement pour le fichier bzfile a �chou�"
 
-#: src/main/connections.c:1685
+#: src/main/connections.c:1678
 #, c-format
 msgid ""
 "file '%s' has trailing content that appears not to be compressed by bzip2"
 msgstr ""
 "le contenu de fin du fichier '%s' semble ne pas �tre compress� avec bzip2"
 
-#: src/main/connections.c:1731 src/main/connections.c:1735
-#: src/main/connections.c:1741 src/main/connections.c:1758
+#: src/main/connections.c:1724 src/main/connections.c:1728
+#: src/main/connections.c:1734 src/main/connections.c:1751
 msgid "allocation of bzfile connection failed"
 msgstr "l'allocation d'une connexion bzfile a �chou�"
 
-#: src/main/connections.c:1804 src/main/connections.c:5961
+#: src/main/connections.c:1797 src/main/connections.c:6046
 #, c-format
 msgid "cannot initialize lzma decoder, error %d"
 msgstr "impossible d'initialiser le d�codeur lzma, erreur %d"
 
-#: src/main/connections.c:1820
+#: src/main/connections.c:1813
 #, c-format
 msgid "cannot initialize lzma encoder, error %d"
 msgstr "impossible d'initialiser l'encodeur lzma, erreur %d"
 
-#: src/main/connections.c:1948 src/main/connections.c:1952
-#: src/main/connections.c:1958 src/main/connections.c:1976
+#: src/main/connections.c:1941 src/main/connections.c:1945
+#: src/main/connections.c:1951 src/main/connections.c:1969
 msgid "allocation of xzfile connection failed"
 msgstr "l'allocation d'une connexion gzfile a �chou�"
 
-#: src/main/connections.c:2035
+#: src/main/connections.c:2028
 #, c-format
 msgid "this is a %s-compressed file which this build of R does not support"
 msgstr ""
 "ceci est un fichier compress� par %s pour lequel cette version de R ne "
 "propose pas de support"
 
-#: src/main/connections.c:2130 src/modules/X11/devX11.c:3375
+#: src/main/connections.c:2124 src/modules/X11/devX11.c:3381
 msgid "memory allocation to copy clipboard failed"
 msgstr "l'allocation de m�moire pour une copie dans le presse-papier a �chou�"
 
-#: src/main/connections.c:2135 src/modules/X11/devX11.c:3354
-#: src/modules/X11/devX11.c:3359
+#: src/main/connections.c:2129 src/modules/X11/devX11.c:3360
+#: src/modules/X11/devX11.c:3365
 msgid "clipboard cannot be opened or contains no text"
 msgstr "presse-papier impossible � ouvrir ou ne contenant aucun texte"
 
-#: src/main/connections.c:2146
+#: src/main/connections.c:2140
 msgid "memory allocation to open clipboard failed"
 msgstr "l'allocation de m�moire pour ouvrir le presse-papier a �chou�"
 
-#: src/main/connections.c:2174
+#: src/main/connections.c:2168
 msgid "unable to open the clipboard"
 msgstr "Impossible d'ouvrir le presse-papier"
 
-#: src/main/connections.c:2178
+#: src/main/connections.c:2172
 msgid "unable to write to the clipboard"
 msgstr "Impossible d'�crire dans le presse-papier"
 
-#: src/main/connections.c:2218
+#: src/main/connections.c:2212
 msgid "attempt to seek outside the range of the clipboard"
 msgstr ""
 "tentative de recherche de donn�es en mode al�atoire en dehors des limites du "
 "presse-papier"
 
-#: src/main/connections.c:2261
+#: src/main/connections.c:2255
 msgid "clipboard connection is open for reading only"
 msgstr "la connexion presse-papier est ouverte en lecture seule"
 
-#: src/main/connections.c:2281
+#: src/main/connections.c:2275
 msgid "clipboard buffer is full and output lost"
 msgstr ""
 "le tampon du presse-papier est plein et des donn�es sont perdues en sortie"
 
-#: src/main/connections.c:2302
+#: src/main/connections.c:2296
 msgid "'mode' for the clipboard must be 'r' or 'w'"
 msgstr ""
 "le 'mode' pour le presse-papier doit �tre 'r' (lecture) ou 'w' (�criture)"
 
-#: src/main/connections.c:2305
+#: src/main/connections.c:2299
 msgid "'mode' for the clipboard must be 'r' on Unix"
 msgstr "le 'mode' pour le presse-papier doit �tre 'r' (lecture) sous Unix"
 
-#: src/main/connections.c:2308 src/main/connections.c:2314
-#: src/main/connections.c:2320 src/main/connections.c:2337
+#: src/main/connections.c:2302 src/main/connections.c:2308
+#: src/main/connections.c:2314 src/main/connections.c:2331
 msgid "allocation of clipboard connection failed"
 msgstr "l'allocation d'une connexion presse-papier a �chou�"
 
-#: src/main/connections.c:2406 src/main/connections.c:2410
-#: src/main/connections.c:2416
+#: src/main/connections.c:2400 src/main/connections.c:2404
+#: src/main/connections.c:2410
 msgid "allocation of terminal connection failed"
 msgstr "l'allocation d'une connexion terminal a �chou�"
 
-#: src/main/connections.c:2549
+#: src/main/connections.c:2543
 msgid "attempting to add too many elements to raw vector"
 msgstr "tentative d'ajout d'un trop grand nombre d'�l�ments � un vecteur 'raw'"
 
-#: src/main/connections.c:2601
+#: src/main/connections.c:2595
 msgid "attempt to seek outside the range of the raw connection"
 msgstr ""
 "tentative de recherche de donn�es en dehors des limites pour une connexion "
 "de type 'raw'"
 
-#: src/main/connections.c:2612 src/main/connections.c:2616
-#: src/main/connections.c:2622 src/main/connections.c:2648
+#: src/main/connections.c:2606 src/main/connections.c:2610
+#: src/main/connections.c:2616 src/main/connections.c:2642
 msgid "allocation of raw connection failed"
 msgstr "erreur d'allocation d'une connexion de type 'raw'"
 
-#: src/main/connections.c:2701
+#: src/main/connections.c:2695
 msgid "'con' is not a rawConnection"
 msgstr "'con' n'est pas une connexion 'rawConnection'"
 
-#: src/main/connections.c:2704
+#: src/main/connections.c:2698
 msgid "'con' is not an output rawConnection"
 msgstr "'con' n'est pas une connexion en sortie de type 'rawConnection'"
 
-#: src/main/connections.c:2742
+#: src/main/connections.c:2736
 msgid "too many characters for text connection"
 msgstr "trop de caract�res pour une connexion textuelle"
 
-#: src/main/connections.c:2747
+#: src/main/connections.c:2741
 msgid "cannot allocate memory for text connection"
 msgstr "impossible d'allouer de la m�moire pour une connexion textuelle"
 
-#: src/main/connections.c:2796
+#: src/main/connections.c:2790
 msgid "seek is not relevant for text connection"
 msgstr ""
 "le mode d'acc�s al�atoire n'est pas pertinent pour une connexion textuelle"
 
-#: src/main/connections.c:2804 src/main/connections.c:2808
-#: src/main/connections.c:2814 src/main/connections.c:2827
-#: src/main/connections.c:3012 src/main/connections.c:3016
-#: src/main/connections.c:3022 src/main/connections.c:3035
-#: src/main/connections.c:3041
+#: src/main/connections.c:2798 src/main/connections.c:2802
+#: src/main/connections.c:2808 src/main/connections.c:2821
+#: src/main/connections.c:3008 src/main/connections.c:3012
+#: src/main/connections.c:3018 src/main/connections.c:3031
+#: src/main/connections.c:3037
 msgid "allocation of text connection failed"
 msgstr "l'allocation d'une connexion textuelle a �chou�"
 
-#: src/main/connections.c:2989
+#: src/main/connections.c:2983
 msgid "text connection: appending to a non-existent char vector"
 msgstr "connexion textuelle : ajout � un vecteur de caract�res inexistant"
 
-#: src/main/connections.c:3093
+#: src/main/connections.c:3089
 msgid "unsupported mode"
 msgstr "mode indisponible"
 
-#: src/main/connections.c:3115
+#: src/main/connections.c:3111
 msgid "'con' is not a textConnection"
 msgstr "'con' n'est pas une connexion texte"
 
-#: src/main/connections.c:3118
+#: src/main/connections.c:3114
 msgid "'con' is not an output textConnection"
 msgstr "'con' n'est pas une connexion en sortie"
 
-#: src/main/connections.c:3192
-msgid "sockets are not available on this system"
-msgstr ""
-"les connecteurs logiciels (sockets) ne sont pas disponibles sur ce syst�me"
-
-#: src/main/connections.c:3260 src/main/connections.c:3309
-#: src/main/connections.c:3320 src/main/connections.c:3367
-#: src/main/connections.c:3392 src/main/connections.c:3415
-#: src/main/connections.c:3427 src/main/connections.c:3543
-#: src/main/connections.c:3668 src/main/connections.c:5408
+#: src/main/connections.c:3254 src/main/connections.c:3303
+#: src/main/connections.c:3314 src/main/connections.c:3361
+#: src/main/connections.c:3388 src/main/connections.c:3411
+#: src/main/connections.c:3423 src/main/connections.c:3539
+#: src/main/connections.c:3664 src/main/connections.c:5489
 msgid "'con' is not a connection"
 msgstr "'con' n'est pas une connexion"
 
-#: src/main/connections.c:3263
+#: src/main/connections.c:3257
 msgid "cannot open standard connections"
 msgstr "impossible d'ouvrir les connexions standards"
 
-#: src/main/connections.c:3265
+#: src/main/connections.c:3259
 msgid "connection is already open"
 msgstr "la connexion est d�j� ouverte"
 
-#: src/main/connections.c:3298
+#: src/main/connections.c:3292
 msgid "unknown 'rw' value"
 msgstr "valeur 'rw' inconnue"
 
-#: src/main/connections.c:3369
+#: src/main/connections.c:3363
 msgid "cannot close standard connections"
 msgstr "impossible de fermer les connexions standards"
 
-#: src/main/connections.c:3372
+#: src/main/connections.c:3366
 msgid "cannot close 'output' sink connection"
 msgstr "impossible de fermer la connexion 'output' en sortie"
 
-#: src/main/connections.c:3374
+#: src/main/connections.c:3368
 msgid "cannot close 'message' sink connection"
 msgstr "impossible de fermer la connexion 'message' en sortie"
 
-#: src/main/connections.c:3394 src/main/connections.c:5123
-#: src/main/connections.c:5131 src/main/serialize.c:1996
-#: src/main/serialize.c:2004
+#: src/main/connections.c:3390 src/main/connections.c:5198
+#: src/main/connections.c:5206 src/main/serialize.c:2035
+#: src/main/serialize.c:2043
 msgid "connection is not open"
 msgstr "connexion non ouverte"
 
-#: src/main/connections.c:3490 src/main/connections.c:3502
+#: src/main/connections.c:3486 src/main/connections.c:3498
 msgid "line longer than buffer size"
 msgstr "ligne plus longue que la taille du tampon"
 
-#: src/main/connections.c:3574 src/main/connections.c:3576
-#: src/main/connections.c:3852 src/main/connections.c:4406
-#: src/main/connections.c:4431 src/main/connections.c:5132 src/main/dcf.c:101
-#: src/main/scan.c:936 src/main/scan.c:940 src/main/serialize.c:1998
-#: src/main/source.c:272
+#: src/main/connections.c:3570 src/main/connections.c:3572
+#: src/main/connections.c:3849 src/main/connections.c:4417
+#: src/main/connections.c:4442 src/main/connections.c:5207 src/main/dcf.c:100
+#: src/main/scan.c:936 src/main/scan.c:940 src/main/serialize.c:2037
+#: src/main/source.c:277
 msgid "cannot read from this connection"
 msgstr "impossible de lire depuis la connexion"
 
-#: src/main/connections.c:3588 src/main/connections.c:3610
+#: src/main/connections.c:3584 src/main/connections.c:3606
 msgid "cannot allocate buffer in readLines"
 msgstr "impossible d'allouer un tampon dans readLines"
 
-#: src/main/connections.c:3623
+#: src/main/connections.c:3619
 #, c-format
 msgid "line %d appears to contain an embedded nul"
 msgstr "la ligne %d contient un caract�re nul"
 
-#: src/main/connections.c:3640
+#: src/main/connections.c:3636
 #, c-format
 msgid "incomplete final line found on '%s'"
 msgstr "ligne finale incompl�te trouv�e dans '%s'"
 
-#: src/main/connections.c:3646
+#: src/main/connections.c:3642
 msgid "too few lines read in readLines"
 msgstr "trop peu de lignes lues par readLines"
 
-#: src/main/connections.c:3749
+#: src/main/connections.c:3746
 msgid "incomplete string at end of file has been discarded"
 msgstr "la cha�ne de caract�res incompl�te � la fin du fichier a �t� �limin�e"
 
-#: src/main/connections.c:3755
+#: src/main/connections.c:3752
 msgid "null terminator not found: breaking string at 10000 bytes"
 msgstr "terminaison 'null' non trouv�e : coupure de la cha�ne � 10000 octets"
 
-#: src/main/connections.c:3820
+#: src/main/connections.c:3817
 msgid "can only read from a binary connection"
 msgstr "lecture seulement possible pour une connexion binaire"
 
-#: src/main/connections.c:3869 src/main/connections.c:4176
+#: src/main/connections.c:3866 src/main/connections.c:4187
 msgid "size changing is not supported for complex vectors"
 msgstr ""
 "changement de taille indisponible pour des vecteurs de nombres complexes"
 
-#: src/main/connections.c:3907 src/main/connections.c:3925
-#: src/main/connections.c:3951 src/main/connections.c:4010
-#: src/main/connections.c:4030 src/main/connections.c:4157
-#: src/main/connections.c:4170 src/main/connections.c:4229
-#: src/main/connections.c:4261
+#: src/main/connections.c:3905 src/main/connections.c:3923
+#: src/main/connections.c:3949 src/main/connections.c:3993
+#: src/main/connections.c:4024 src/main/connections.c:4044
+#: src/main/connections.c:4168 src/main/connections.c:4181
+#: src/main/connections.c:4240 src/main/connections.c:4272
 #, c-format
 msgid "size %d is unknown on this machine"
 msgstr "la taille %d est inconnue sur cette machine"
 
-#: src/main/connections.c:3936
+#: src/main/connections.c:3934
 msgid "raw is always of size 1"
 msgstr "raw est toujours de taille 1"
 
-#: src/main/connections.c:3959
+#: src/main/connections.c:3957
 msgid "'signed = FALSE' is only valid for integers of sizes 1 and 2"
 msgstr "'signed = FALSE' n'est autoris� que pour des entiers de taille 1 ou 2"
 
-#: src/main/connections.c:4060
+#: src/main/connections.c:4071
 msgid "'x' is not an atomic vector type"
 msgstr "'x' n'est pas un type de vecteur atomique"
 
-#: src/main/connections.c:4066
+#: src/main/connections.c:4077
 msgid "can only write to a binary connection"
 msgstr "l'�criture est seulement possible vers une connexion binaire"
 
-#: src/main/connections.c:4085
+#: src/main/connections.c:4096
 msgid "only 2^31-1 bytes can be written to a raw vector"
 msgstr "seuls 2^31-1 octets peuvent �tre �crits dans un vecteur 'raw'"
 
-#: src/main/connections.c:4087
+#: src/main/connections.c:4098
 msgid "only 2^31-1 bytes can be written in a single writeBin() call"
 msgstr ""
 "seuls 2^31-1 octets peuvent �tre �crits lors d'un appel unique writeBin()"
 
-#: src/main/connections.c:4136 src/main/connections.c:4289
-#: src/main/connections.c:4570 src/main/connections.c:4610
+#: src/main/connections.c:4147 src/main/connections.c:4300
+#: src/main/connections.c:4581 src/main/connections.c:4621
 msgid "problem writing to connection"
 msgstr "probl�me lors de l'�criture vers la connexion"
 
-#: src/main/connections.c:4181
+#: src/main/connections.c:4192
 msgid "size changing is not supported for raw vectors"
 msgstr "changement de taille indisponible pour des vecteurs de type raw"
 
-#: src/main/connections.c:4324 src/main/connections.c:4328
-#: src/main/connections.c:4367
+#: src/main/connections.c:4335 src/main/connections.c:4339
+#: src/main/connections.c:4378
 msgid "invalid UTF-8 input in readChar()"
 msgstr "entr�e UTF-8 incorrecte dans readChar()"
 
-#: src/main/connections.c:4434
+#: src/main/connections.c:4445
 msgid "can only read in bytes in a non-UTF-8 MBCS locale"
 msgstr ""
 "seuls des octets dand un environnement linguistique diff�rent de UTF-8 MBCS "
 "peuvent �tre lus"
 
-#: src/main/connections.c:4506
+#: src/main/connections.c:4517
 msgid "'object' is too short"
 msgstr "'object' est trop court"
 
-#: src/main/connections.c:4559
+#: src/main/connections.c:4570
 msgid "writeChar: more bytes requested than are in the string - will zero-pad"
 msgstr ""
 "writeChar : demande de plus de caract�res que ceux disponibles dans la "
 "cha�ne - comblement avec des z�ros"
 
-#: src/main/connections.c:4584
+#: src/main/connections.c:4595
 msgid ""
 "writeChar: more characters requested than are in the string - will zero-pad"
 msgstr ""
 "writeChar : demande de plus de caract�res que ceux disponibles dans la "
 "cha�ne - comblement avec des 0"
 
-#: src/main/connections.c:4638
+#: src/main/connections.c:4649
 msgid "maximum number of pushback lines exceeded"
 msgstr "nombre maximum de lignes en 'pushback' d�pass�"
 
-#: src/main/connections.c:4644 src/main/connections.c:4648
-#: src/main/connections.c:4685 src/main/connections.c:4693
+#: src/main/connections.c:4655 src/main/connections.c:4659
+#: src/main/connections.c:4696 src/main/connections.c:4704
 msgid "could not allocate space for pushback"
 msgstr "impossible d'allouer de l'espace pour pushBack"
 
-#: src/main/connections.c:4676
+#: src/main/connections.c:4687
 msgid "can only push back on open readable connections"
 msgstr "repoussage seulement possible sur des connexions ouvertes en lecture"
 
-#: src/main/connections.c:4678
+#: src/main/connections.c:4689
 msgid "can only push back on text-mode connections"
 msgstr "repoussage seulement possible sur des connexions en mode texte"
 
-#: src/main/connections.c:4740 src/main/connections.c:4810
+#: src/main/connections.c:4753 src/main/connections.c:4823
 msgid "sink stack is full"
 msgstr "la pile de la sortie par d�faut est pleine"
 
-#: src/main/connections.c:4743
+#: src/main/connections.c:4756
 msgid "cannot switch output to stdin"
 msgstr "impossible de diriger la sortie vers stdin"
 
-#: src/main/connections.c:4770
+#: src/main/connections.c:4783
 msgid "no sink to remove"
 msgstr "aucune sortie par d�faut � supprimer"
 
-#: src/main/connections.c:4892
+#: src/main/connections.c:4903
 msgid "there is no connection NA"
 msgstr "pas de connexion NA"
 
-#: src/main/connections.c:4894
+#: src/main/connections.c:4905
 #, c-format
 msgid "there is no connection %d"
 msgstr "pas de connexion %d"
 
-#: src/main/connections.c:5029
+#: src/main/connections.c:5039
+#, fuzzy
+msgid "method = \"wininet\" is only supported on Windows"
+msgstr "nsl() ne fonctionne pas sur cette architecture"
+
+#: src/main/connections.c:5103
 msgid ""
 "file(\"\") only supports open = \"w+\" and open = \"w+b\": using the former"
 msgstr ""
 "file(\"\") accepte seulement open = \"w+\" et open = \"w+b\" : utilisation "
 "du premier"
 
-#: src/main/connections.c:5083 src/modules/internet/internet.c:115
-#: src/modules/internet/internet.c:569
-msgid "unsupported URL scheme"
-msgstr "sch�ma URL non support�"
+#: src/main/connections.c:5157
+#, fuzzy
+msgid "URL scheme unsupported by this method"
+msgstr "ICU ne fonctionne pas dans cette compilation"
 
-#: src/main/connections.c:5173
+#: src/main/connections.c:5253
 msgid "file stream does not have gzip magic number"
 msgstr "le corps du fichier n'a pas le nombre magique de gzip"
 
-#: src/main/connections.c:5184
+#: src/main/connections.c:5264
 msgid "file stream does not have valid gzip header"
 msgstr "le corps du fichier n'a pas une ent�te gzip correcte"
 
-#: src/main/connections.c:5249
+#: src/main/connections.c:5329
 msgid "writing error whilst flushing 'gzcon' connection"
 msgstr "erreur d'�criture lors du vidage de tampon d'une connexion 'gzcon'"
 
-#: src/main/connections.c:5351
+#: src/main/connections.c:5431
 #, c-format
 msgid "crc error %x %x\n"
 msgstr "erreur CRC %x %x\n"
 
-#: src/main/connections.c:5378
+#: src/main/connections.c:5458
 msgid "write error on 'gzcon' connection"
 msgstr "erreur d'�criture sur une connexion 'gzcon'"
 
-#: src/main/connections.c:5412
+#: src/main/connections.c:5493
 msgid "'level' must be one of 0 ... 9"
 msgstr "'level' doit �tre une valeur parmi 0 ... 9"
 
-#: src/main/connections.c:5415
+#: src/main/connections.c:5496
 msgid "'allowNonCompression' must be TRUE or FALSE"
 msgstr "'allowNonCompression' doit �tre TRUE ou FALSE"
 
-#: src/main/connections.c:5418
+#: src/main/connections.c:5499
+#, fuzzy
+msgid "'text' must be TRUE or FALSE"
+msgstr "'all.x' doit �tre TRUE ou FALSE"
+
+#: src/main/connections.c:5502
 msgid "this is already a 'gzcon' connection"
 msgstr "ceci est d�j� une connexion 'gzcon'"
 
-#: src/main/connections.c:5424
+#: src/main/connections.c:5508
 msgid "can only use read- or write- binary connections"
 msgstr ""
 "seulement les connexions binaires en lecture ou �criture sont utilisables"
 
-#: src/main/connections.c:5427
+#: src/main/connections.c:5511
 msgid "using a text-mode 'file' connection may not work correctly"
 msgstr ""
 "l'utilisation d'un 'fichier' en mode texte peut ne pas fonctionner "
 "correctement"
 
-#: src/main/connections.c:5430
+#: src/main/connections.c:5514
 msgid ""
 "cannot create a 'gzcon' connection from a writable textConnection; maybe use "
 "rawConnection"
@@ -2375,76 +2439,72 @@ msgstr ""
 "impossible de cr�er une connexion 'gzcon' � partir d'une textConnection "
 "ouverte en �criture ; Essayez peut-�tre une rawConnection"
 
-#: src/main/connections.c:5433 src/main/connections.c:5437
-#: src/main/connections.c:5444 src/main/connections.c:5458
+#: src/main/connections.c:5517 src/main/connections.c:5521
+#: src/main/connections.c:5528 src/main/connections.c:5542
 msgid "allocation of 'gzcon' connection failed"
 msgstr "l'allocation d'une connexion 'gzcon' a �chou�"
 
-#: src/main/connections.c:5644
+#: src/main/connections.c:5729
 msgid "not a list of sockets"
 msgstr "ceci n'est pas une liste de connecteurs logiciels (sockets)"
 
-#: src/main/connections.c:5649
+#: src/main/connections.c:5734
 msgid "bad write indicators"
 msgstr "mauvais indicateurs d'�criture"
 
-#: src/main/connections.c:5660
+#: src/main/connections.c:5745
 msgid "not a socket connection"
 msgstr "ceci n'est pas un connecteur logiciel (socket)"
 
-#: src/main/connections.c:5905
+#: src/main/connections.c:5990
 msgid "unknown compression, assuming none"
 msgstr "mode de compression inconnu, consid�r� comme non compress�"
 
-#: src/main/connections.c:6023 src/main/connections.c:6027
-#: src/main/connections.c:6033
+#: src/main/connections.c:6108 src/main/connections.c:6112
+#: src/main/connections.c:6118
 #, c-format
 msgid "allocation of %s connection failed"
 msgstr "erreur d'allocation d'une connexion %s"
 
-#: src/main/context.c:282
+#: src/main/context.c:316
 msgid "no loop for break/next, jumping to top level"
 msgstr ""
 "aucune boucle d'o� sortir (break/next) ; saut vers le niveau le plus haut"
 
-#: src/main/context.c:290
+#: src/main/context.c:324
 msgid "no function to return from, jumping to top level"
 msgstr "aucune fonction d'o� sortir ; saut vers le niveau le plus haut"
 
-#: src/main/context.c:302
+#: src/main/context.c:339
 msgid "target context is not on the stack"
 msgstr "le contexte vis� n'est pas dans la pile"
 
-#: src/main/context.c:324 src/main/context.c:340 src/main/context.c:407
-#: src/main/context.c:428 src/main/context.c:440 src/main/context.c:452
+#: src/main/context.c:361 src/main/context.c:377 src/main/context.c:444
+#: src/main/context.c:465 src/main/context.c:477 src/main/context.c:489
 msgid "not that many frames on the stack"
 msgstr "il n'y a pas autant de trames dans la pile"
 
-#: src/main/context.c:357
+#: src/main/context.c:394
 msgid "only positive values of 'n' are allowed"
 msgstr "valeurs de 'n' strictement positives seules autoris�es"
 
-#: src/main/context.c:478
-msgid "no function to restart"
-msgstr "aucune function � relancer"
-
-#: src/main/context.c:515
+#: src/main/context.c:526
 msgid "number of contexts must be positive"
 msgstr "le nombre de contextes doit �tre positif"
 
-#: src/main/context.c:528
+#: src/main/context.c:539
 msgid "no browser context to query"
 msgstr "pas de contexte � interroger pour l'explorateur"
 
-#: src/main/context.c:546
+#: src/main/context.c:557
 msgid "not that many calls to browser are active"
 msgstr "il n'y a pas autant d'appels actifs � l'explorateur"
 
-#: src/main/context.c:560
+#: src/main/context.c:571
 msgid "not that many functions on the call stack"
 msgstr "il n'y a pas autant de fonctions dans la pile de trame"
 
-#: src/main/context.c:645
+#: src/main/context.c:656
 msgid "internal error in 'do_sys'"
 msgstr "erreur interne dans 'do_sys'"
 
@@ -2452,37 +2512,37 @@ msgstr "erreur interne dans 'do_sys'"
 msgid "integer overflow in 'cumsum'; use 'cumsum(as.numeric(.))'"
 msgstr "D�passement d'entier dans 'cumsum' ; utiliser 'cumsum(as.numeric(.))'"
 
-#: src/main/cum.c:178
-msgid "'cummin' not defined for complex numbers"
-msgstr "'cummin' non d�fini pour les nombres complexes"
-
-#: src/main/cum.c:181
+#: src/main/cum.c:179
 msgid "'cummax' not defined for complex numbers"
 msgstr "'cummax' non d�fini pour les nombres complexes"
 
-#: src/main/cum.c:206 src/main/cum.c:230
+#: src/main/cum.c:182
+msgid "'cummin' not defined for complex numbers"
+msgstr "'cummin' non d�fini pour les nombres complexes"
+
+#: src/main/cum.c:209 src/main/cum.c:236
 msgid "unknown cumxxx function"
 msgstr "fonction cumxxx inconnue"
 
-#: src/main/datetime.c:548 src/main/datetime.c:556 src/main/datetime.c:570
-#: src/main/datetime.c:575
+#: src/main/datetime.c:554 src/main/datetime.c:562 src/main/datetime.c:576
+#: src/main/datetime.c:581
 msgid "problem with setting timezone"
 msgstr "probl�me lors de la d�termination du fuseau horaire"
 
-#: src/main/datetime.c:560
+#: src/main/datetime.c:566
 msgid "cannot set timezones on this system"
 msgstr "impossible de d�finir le fuseau horaire sur ce syst�me"
 
-#: src/main/datetime.c:582 src/main/datetime.c:584
+#: src/main/datetime.c:588 src/main/datetime.c:590
 msgid "problem with unsetting timezone"
 msgstr "probl�me lors de la d�saffectation d'un fuseau horaire"
 
-#: src/main/datetime.c:804 src/main/datetime.c:806 src/main/datetime.c:901
-#: src/main/datetime.c:1240 src/main/datetime.c:1242
+#: src/main/datetime.c:810 src/main/datetime.c:812 src/main/datetime.c:908
+#: src/main/datetime.c:1258 src/main/datetime.c:1260
 msgid "zero-length component in non-empty \"POSIXlt\" structure"
 msgstr "composante de longueur nulle dans une structure \"POSIXlt\" non vide"
 
-#: src/main/dcf.c:113 src/main/dcf.c:181 src/main/dcf.c:253
+#: src/main/dcf.c:112 src/main/dcf.c:181 src/main/dcf.c:253
 msgid "could not allocate memory for 'read.dcf'"
 msgstr "impossible d'allouer de la m�moire pour 'read.dcf'"
 
@@ -2498,85 +2558,91 @@ msgstr ""
 msgid "Line starting '%s ...' is malformed!"
 msgstr "La ligne commen�ant par '%s...' est incorrecte !"
 
-#: src/main/debug.c:45
-msgid "argument must be a closure"
-msgstr "l'argument doit �tre une fermeture (closure)"
-
-#: src/main/debug.c:76
+#: src/main/debug.c:46 src/main/debug.c:76
 msgid "argument must be a function"
 msgstr "l'argument doit �tre une fonction"
 
-#: src/main/debug.c:132 src/main/debug.c:166 src/main/debug.c:224
+#: src/main/debug.c:111
+#, fuzzy, c-format
+msgid "Value for '%s' must be TRUE or FALSE"
+msgstr "'all.x' doit �tre TRUE ou FALSE"
+
+#: src/main/debug.c:139 src/main/debug.c:167 src/main/debug.c:241
 msgid "argument must not be a function"
 msgstr "l'argument ne peut pas �tre une fonction"
 
-#: src/main/debug.c:135
+#: src/main/debug.c:142
 msgid "cannot trace NULL"
 msgstr "impossible de tracer NULL"
 
-#: src/main/debug.c:139
+#: src/main/debug.c:146
 msgid "'tracemem' is not useful for promise and environment objects"
 msgstr ""
 "'tracemem' est inutilisable pour des objets de type 'promise' ou "
 "'environement'"
 
-#: src/main/debug.c:142
+#: src/main/debug.c:149
 msgid "'tracemem' is not useful for weak reference or external pointer objects"
 msgstr ""
 "'tracemem' est inutilisable pour des objets de type r�f�rence l�che ou "
 "pointeur externe"
 
-#: src/main/debug.c:148 src/main/debug.c:171
+#: src/main/debug.c:180 src/main/debug.c:187
 msgid "R was not compiled with support for memory profiling"
 msgstr "R n'a pas �t� compil� pour supporter le profilage de m�moire"
 
-#: src/main/deparse.c:152 src/main/sprintf.c:213 src/main/sprintf.c:245
+#: src/main/deparse.c:156 src/main/sprintf.c:216 src/main/sprintf.c:248
 msgid "too few arguments"
 msgstr "trop peu d'arguments"
 
-#: src/main/deparse.c:159
+#: src/main/deparse.c:163
 msgid "invalid 'cutoff' value for 'deparse', using default"
 msgstr "'cutoff' incorrect pour 'deparse', utilisation de la valeur par d�faut"
 
-#: src/main/deparse.c:247
+#: src/main/deparse.c:254
 msgid "deparse of an S4 object will not be source()able"
 msgstr ""
-"la reconstruction de code (deparse) d'un objet S4 n'est pas forc�ment source"
-"()able"
+"la reconstruction de code (deparse) d'un objet S4 n'est pas forc�ment "
+"source()able"
 
-#: src/main/deparse.c:249
+#: src/main/deparse.c:256
 msgid "deparse may be incomplete"
 msgstr "deparse est peut-�tre incomplet"
 
-#: src/main/deparse.c:251
+#: src/main/deparse.c:258
 msgid "deparse may be not be source()able in R < 2.7.0"
 msgstr ""
 "reconstruction de code (deparse) pas forc�ment source()able dans R < 2.7.0"
 
-#: src/main/deparse.c:369 src/main/deparse.c:461 src/main/deparse.c:467
+#: src/main/deparse.c:350 src/main/deparse.c:400 src/main/source.c:206
+#, fuzzy
+msgid "'file' must be a character string or connection"
+msgstr "'what' doit �tre une cha�ne de caract�res ou une fonction"
+
+#: src/main/deparse.c:378 src/main/deparse.c:473 src/main/deparse.c:479
 msgid "wrote too few characters"
 msgstr "�criture de trop peu de caract�res"
 
-#: src/main/deparse.c:391
+#: src/main/deparse.c:402
 msgid "character arguments expected"
 msgstr "arguments caract�res attendus"
 
-#: src/main/deparse.c:394
+#: src/main/deparse.c:405
 msgid "zero-length argument"
 msgstr "argument de longueur nulle"
 
-#: src/main/deparse.c:401
+#: src/main/deparse.c:412
 msgid "'opts' should be small non-negative integer"
 msgstr "'opts' doit �tre un petit entier positif ou nul"
 
-#: src/main/deparse.c:411 src/main/envir.c:1764 src/main/envir.c:1846
-#: src/main/eval.c:569 src/main/eval.c:1251 src/main/eval.c:3627
-#: src/main/saveload.c:1978 src/main/saveload.c:2309 src/main/serialize.c:2727
+#: src/main/deparse.c:422 src/main/envir.c:1898 src/main/envir.c:1983
+#: src/main/eval.c:626 src/main/eval.c:1423 src/main/eval.c:4246
+#: src/main/saveload.c:1980 src/main/saveload.c:2312 src/main/serialize.c:2773
 #, c-format
 msgid "object '%s' not found"
 msgstr "objet '%s' introuvable"
 
-#: src/main/deparse.c:1519
+#: src/main/deparse.c:1592
 msgid "badly formed function expression"
 msgstr "expression de fonction mal structur�e"
 
@@ -2584,257 +2650,239 @@ msgstr "expression de fonction mal structur
 msgid "the base graphics system is not registered"
 msgstr "le syst�me graphique de base n'est pas enregistr�"
 
-#: src/main/devices.c:165 src/main/devices.c:172
+#: src/main/devices.c:166 src/main/devices.c:174
 msgid "no active or default device"
 msgstr "pas de p�riph�rique actif ou par d�faut"
 
-#: src/main/devices.c:385 src/main/devices.c:447
+#: src/main/devices.c:388 src/main/devices.c:450
 msgid "too many open devices"
 msgstr "trop de p�riph�riques ouverts"
 
-#: src/main/devices.c:474
+#: src/main/devices.c:491
 msgid "not enough memory to allocate device (in GEcreateDevDesc)"
 msgstr ""
 "insuffisamment de m�moire � allouer au p�riph�rique (dans GEcreateDevDesc)"
 
-#: src/main/devices.c:515
+#: src/main/devices.c:532
 msgid "Hit <Return> to see next plot: "
 msgstr "Tapez <Entr�e> pour voir le graphique suivant :"
 
-#: src/main/dotcode.c:112 src/main/dotcode.c:142
+#: src/main/dotcode.c:127 src/main/dotcode.c:157
 msgid "NULL value passed as symbol address"
 msgstr "valeur NULL pass�e comme adresse symbolique"
 
-#: src/main/dotcode.c:133
+#: src/main/dotcode.c:148
 #, c-format
 msgid "Unimplemented type %d in createRSymbolObject"
 msgstr "Type %d non impl�ment� dans createRSymbolObject"
 
-#: src/main/dotcode.c:147 src/main/dotcode.c:237
+#: src/main/dotcode.c:162 src/main/dotcode.c:260
 #, c-format
 msgid "symbol '%s' is too long"
 msgstr "Le symbole '%s' est trop long"
 
-#: src/main/dotcode.c:159
+#: src/main/dotcode.c:174
 msgid ""
 "first argument must be a string (of length 1) or native symbol reference"
 msgstr ""
 "le premier argument doit �tre une cha�ne de caract�res (de longueur 1) ou "
 "une r�f�rence � un symbole natif"
 
-#: src/main/dotcode.c:201 src/main/dotcode.c:563
+#: src/main/dotcode.c:224 src/main/dotcode.c:1240
 msgid "too many arguments in foreign function call"
 msgstr "trop d'arguments dans l'appel de fonction externe"
 
-#: src/main/dotcode.c:213
+#: src/main/dotcode.c:236
 msgid "PACKAGE = \"\" is invalid"
 msgstr "PACKAGE = \"\" est incorrect"
 
-#: src/main/dotcode.c:269 src/main/dotcode.c:274 src/main/dotcode.c:279
-#: src/main/dotcode.c:284
+#: src/main/dotcode.c:292 src/main/dotcode.c:297 src/main/dotcode.c:302
+#: src/main/dotcode.c:307
 #, c-format
 msgid "\"%s\" not available for %s() for package \"%s\""
 msgstr "\"%s\" non disponible pour %s() pour le package\"%s\""
 
-#: src/main/dotcode.c:289
+#: src/main/dotcode.c:312
 #, c-format
 msgid "%s symbol name \"%s\" not in DLL for package \"%s\""
 msgstr ""
 "le nom %s de symbole \"%s\" est introuvable dans la DLL pour le package \"%s"
 "\""
 
-#: src/main/dotcode.c:294
+#: src/main/dotcode.c:317
 #, c-format
 msgid "%s symbol name \"%s\" not in load table"
 msgstr "point d'entr�e %s \"%s\" absent de la table de chargement"
 
-#: src/main/dotcode.c:348 src/main/dotcode.c:352 src/main/dotcode.c:362
-#: src/main/dotcode.c:427 src/main/dotcode.c:434
+#: src/main/dotcode.c:368 src/main/dotcode.c:370 src/main/dotcode.c:380
+#: src/main/dotcode.c:445 src/main/dotcode.c:452
 #, c-format
 msgid "'%s' used more than once"
 msgstr "'%s' utilis� plus d'une fois"
 
-#: src/main/dotcode.c:358
+#: src/main/dotcode.c:376
 msgid "DLL name is too long"
 msgstr "nom de DLL trop long"
 
-#: src/main/dotcode.c:403
+#: src/main/dotcode.c:421
 msgid "PACKAGE argument must be a single character string"
 msgstr "l'argument PACKAGE doit �tre une cha�ne de caract�res unique"
 
-#: src/main/dotcode.c:409
+#: src/main/dotcode.c:427
 msgid "PACKAGE argument is too long"
 msgstr "argument PACKAGE trop long"
 
-#: src/main/dotcode.c:474
+#: src/main/dotcode.c:492
 msgid "no arguments supplied"
 msgstr "aucun argument fourni"
 
-#: src/main/dotcode.c:475 src/main/seq.c:913
+#: src/main/dotcode.c:493 src/main/seq.c:911
 msgid "too many arguments"
 msgstr "trop d'arguments"
 
-#: src/main/dotcode.c:512 src/main/dotcode.c:554 src/main/dotcode.c:1397
+#: src/main/dotcode.c:530 src/main/dotcode.c:1232 src/main/dotcode.c:1420
 msgid "'.NAME' is missing"
 msgstr "'.NAME' est manquant"
 
-#: src/main/dotcode.c:521 src/main/dotcode.c:570 src/main/dotcode.c:1418
+#: src/main/dotcode.c:539 src/main/dotcode.c:1247 src/main/dotcode.c:1441
 #, c-format
 msgid "Incorrect number of arguments (%d), expecting %d for '%s'"
 msgstr "Nombre d'arguments incorrect (%d), attendu %d pour '%s'"
 
-#: src/main/dotcode.c:1227 src/main/dotcode.c:2276
+#: src/main/dotcode.c:1216 src/main/dotcode.c:2290
 msgid "too many arguments, sorry"
 msgstr "trop d'arguments, d�sol�"
 
-#: src/main/dotcode.c:1261 src/main/dotcode.c:1278 src/main/engine.c:2993
+#: src/main/dotcode.c:1284 src/main/dotcode.c:1301 src/main/engine.c:3013
 msgid "invalid graphics state"
 msgstr "�tat des graphiques incorrect"
 
-#: src/main/dotcode.c:1357
+#: src/main/dotcode.c:1380
 msgid "NULL value for DLLInfoReference when looking for DLL"
 msgstr "valeur NULL pour DLLInfoReference lors de la recherche de la DLL"
 
-#: src/main/dotcode.c:1458
+#: src/main/dotcode.c:1481
 #, c-format
 msgid "wrong type for argument %d in call to %s"
 msgstr "mauvais type pour l'argument %d dans l'appel � %s"
 
-#: src/main/dotcode.c:1470
-#, c-format
-msgid ""
-"explicit request not to duplicate arguments in call to '%s', but argument %d "
-"is of the wrong type (%d != %d)"
-msgstr ""
-"demande explicite de ne pas dupliquer les arguments dans l'appel � '%s', "
-"mais l'argument %d est du mauvais type (%d != %d)"
-
-#: src/main/dotcode.c:1493
+#: src/main/dotcode.c:1510
 #, c-format
 msgid "long vectors (argument %d) are not supported in %s"
 msgstr "les vecteurs longs (argument %d) ne sont pas support�s dans %s"
 
-#: src/main/dotcode.c:1524
+#: src/main/dotcode.c:1541
 #, c-format
 msgid "NAs in foreign function call (arg %d)"
 msgstr "NA dans un appel � une fonction externe (argument %d)"
 
-#: src/main/dotcode.c:1547
+#: src/main/dotcode.c:1564
 #, c-format
 msgid "NA/NaN/Inf in foreign function call (arg %d)"
 msgstr "NA/NaN/Inf dans un appel � une fonction externe (argument %d)"
 
-#: src/main/dotcode.c:1552
-msgid "single values not returned if not duplicated"
-msgstr ""
-"les valeurs uniques ne sont pas renvoy�es si elles ne sont pas dupliqu�es"
-
-#: src/main/dotcode.c:1578
+#: src/main/dotcode.c:1594
 #, c-format
 msgid "complex NA/NaN/Inf in foreign function call (arg %d)"
 msgstr ""
 "NA/NaN/Inf pour une valeur complexe dans l'appel d'une fonction externe "
 "(argument %d)"
 
-#: src/main/dotcode.c:1597
-msgid "character variables must be duplicated in .C/.Fortran"
-msgstr "les variables de caract�res doivent �tre dupliqu�es en .C / .Fortran"
-
-#: src/main/dotcode.c:1602
+#: src/main/dotcode.c:1616
 msgid "only first string in char vector used in .Fortran"
 msgstr ""
 "seule la premi�re cha�ne du vecteur de caract�res est utilis�e dans .Fortran"
 
-#: src/main/dotcode.c:1645 src/main/dotcode.c:1661 src/main/dotcode.c:1672
+#: src/main/dotcode.c:1659 src/main/dotcode.c:1675 src/main/dotcode.c:1686
 #, c-format
 msgid "invalid mode (%s) to pass to Fortran (arg %d)"
 msgstr "mode incorrect (%s) � passer vers le Fortran (argument %d)"
 
-#: src/main/dotcode.c:1666
+#: src/main/dotcode.c:1680
 #, c-format
 msgid "invalid mode (%s) to pass to C or Fortran (arg %d)"
 msgstr "mode incorrect (%s) � passer vers le C ou le Fortran (argument %d)"
 
-#: src/main/dotcode.c:1677
+#: src/main/dotcode.c:1691
 msgid "pairlists are passed as SEXP as from R 2.15.0"
 msgstr "les pairlists sont pass�es comme SEXP depuis R 2.15.0"
 
-#: src/main/dotcode.c:2499
+#: src/main/dotcode.c:2510
 #, c-format
 msgid "type \"%s\" not supported in interlanguage calls"
 msgstr "type \"%s\" indisponible dans les appels entre langages"
 
-#: src/main/dotcode.c:2604
+#: src/main/dotcode.c:2615
 #, c-format
 msgid "mode '%s' is not supported in call_R"
 msgstr "mode '%s' non support� dans call_R"
 
-#: src/main/dounzip.c:171
+#: src/main/dounzip.c:172
 #, c-format
 msgid " not overwriting file '%s"
 msgstr "pas d'�crasement du fichier '%s"
 
-#: src/main/dounzip.c:256
+#: src/main/dounzip.c:257
 #, c-format
 msgid "zip file '%s' cannot be opened"
 msgstr "le fichier zip '%s' ne peut �tre ouvert"
 
-#: src/main/dounzip.c:312
+#: src/main/dounzip.c:313
 msgid "invalid zip name argument"
 msgstr "argument nom de zip incorrect"
 
-#: src/main/dounzip.c:315 src/main/dounzip.c:409
+#: src/main/dounzip.c:316 src/main/dounzip.c:410
 msgid "zip path is too long"
 msgstr "le chemin zip est trop long"
 
-#: src/main/dounzip.c:332
+#: src/main/dounzip.c:333
 msgid "'exdir' is too long"
 msgstr "'exdir' est trop long"
 
-#: src/main/dounzip.c:335
+#: src/main/dounzip.c:336
 msgid "'exdir' does not exist"
 msgstr "'exdir' n'existe pas"
 
-#: src/main/dounzip.c:363
+#: src/main/dounzip.c:364
 msgid "requested file not found in the zip file"
 msgstr "le fichier demand� n'est pas trouv� dans le fichier zip"
 
-#: src/main/dounzip.c:366
+#: src/main/dounzip.c:367
 msgid "zip file is corrupt"
 msgstr "fichier zip corrompu"
 
-#: src/main/dounzip.c:369
+#: src/main/dounzip.c:370
 msgid "CRC error in zip file"
 msgstr "erreur CRC dans le fichier zip "
 
-#: src/main/dounzip.c:376
+#: src/main/dounzip.c:377
 msgid "write error in extracting from zip file"
 msgstr "erreur d'�criture lors de l'extraction d'un fichier zip"
 
-#: src/main/dounzip.c:379
+#: src/main/dounzip.c:380
 #, c-format
 msgid "error %d in extracting from zip file"
 msgstr "erreur %d lors de l'extraction d'un fichier zip"
 
-#: src/main/dounzip.c:404
+#: src/main/dounzip.c:405
 msgid "unz connections can only be opened for reading"
 msgstr "ouverture des connexions unz seulement possibles en lecture"
 
-#: src/main/dounzip.c:415
+#: src/main/dounzip.c:416
 msgid "invalid description of 'unz' connection"
 msgstr "description incorrecte pour une connexion 'unz'"
 
-#: src/main/dounzip.c:421
+#: src/main/dounzip.c:422
 #, c-format
 msgid "cannot open zip file '%s'"
 msgstr "impossible d'ouvrir le fichier zip '%s'"
 
-#: src/main/dounzip.c:425
+#: src/main/dounzip.c:426
 #, c-format
 msgid "cannot locate file '%s' in zip file '%s'"
 msgstr "impossible de trouver le fichier '%s' dans le fichier zip '%s'"
 
-#: src/main/dounzip.c:469
+#: src/main/dounzip.c:470
 msgid "printing not enabled for this connection"
 msgstr "impression interdite pour cette connexion"
 
@@ -2842,8 +2890,8 @@ msgstr "impression interdite pour cette connexion"
 msgid "write not enabled for this connection"
 msgstr "�criture interdite vers cette connexion"
 
-#: src/main/dounzip.c:496 src/main/dounzip.c:500 src/main/dounzip.c:506
-#: src/main/dounzip.c:523
+#: src/main/dounzip.c:494 src/main/dounzip.c:498 src/main/dounzip.c:504
+#: src/main/dounzip.c:521
 msgid "allocation of 'unz' connection failed"
 msgstr "l'allocation d'une connexion 'unz' a �chou�"
 
@@ -2859,7 +2907,7 @@ msgstr "argument formel invalide pour 'function'"
 msgid "invalid argument to edit()"
 msgstr "argument incorrect pour edit()"
 
-#: src/main/edit.c:121 src/main/saveload.c:2076
+#: src/main/edit.c:121 src/main/saveload.c:2078
 msgid "unable to open file"
 msgstr "ouverture de fichier impossible"
 
@@ -2923,12 +2971,12 @@ msgid "no graphics system to unregister"
 msgstr "aucun syst�me graphiques � enregistrer"
 
 #: src/main/engine.c:443 src/main/engine.c:448 src/main/engine.c:456
-#: src/main/engine.c:463 src/main/engine.c:477 src/modules/X11/devX11.c:1157
+#: src/main/engine.c:463 src/main/engine.c:477 src/modules/X11/devX11.c:1159
 msgid "invalid line end"
 msgstr "fin de ligne incorrecte"
 
 #: src/main/engine.c:508 src/main/engine.c:513 src/main/engine.c:521
-#: src/main/engine.c:528 src/main/engine.c:542 src/modules/X11/devX11.c:1175
+#: src/main/engine.c:528 src/main/engine.c:542 src/modules/X11/devX11.c:1177
 msgid "invalid line join"
 msgstr "jonction de ligne incorrecte"
 
@@ -2957,83 +3005,97 @@ msgstr "rendu en mode pixel (raster) non impl
 msgid "raster capture is not available for this device"
 msgstr "capture en mode point (raster) non disponible pour ce p�riph�rique"
 
-#: src/main/engine.c:1656
+#: src/main/engine.c:1662
 #, c-format
 msgid "font face %d not supported for font family '%s'"
 msgstr ""
 "la police de caract�re %d n'est pas disponible pour la famille de fontes '%s'"
 
-#: src/main/engine.c:1972
+#: src/main/engine.c:1978
 msgid "no graphics device is active"
 msgstr "aucun p�riph�rique graphiques actif"
 
-#: src/main/engine.c:2049
+#: src/main/engine.c:2055
 #, c-format
 msgid "pch value '%d' is invalid in this locale"
 msgstr "valeur pch '%d' incorrecte dans cet environnement linguistique"
 
-#: src/main/engine.c:2307
+#: src/main/engine.c:2313
 #, c-format
 msgid "unimplemented pch value '%d'"
 msgstr "valeur '%d' de pch non impl�ment�e"
 
-#: src/main/engine.c:2330
+#: src/main/engine.c:2336
 #, c-format
 msgid "invalid axis extents [GEPretty(.,.,n=%d)"
 msgstr "�tendue de l'axe incorrecte [GEPretty(.,.,n=%d)"
 
-#: src/main/engine.c:2334
+#: src/main/engine.c:2340
 #, c-format
 msgid "infinite axis extents [GEPretty(%g,%g,%d)]"
 msgstr "�tendue de l'axe infinie [GEPretty(%g,%g,%d)]"
 
-#: src/main/engine.c:2371
+#: src/main/engine.c:2377
 #, c-format
 msgid " .. GEPretty(.): new *lo = %g < %g = x1"
 msgstr " .. GEPretty(.) : nouveau *lo = %g < %g = x1"
 
-#: src/main/engine.c:2373
+#: src/main/engine.c:2379
 #, c-format
 msgid " .. GEPretty(.): new *up = %g > %g = x2"
 msgstr " .. GEPretty(.) : nouveau *up = %g > %g = x2"
 
-#: src/main/engine.c:2773
+#: src/main/engine.c:2784
 msgid "display list redraw incomplete"
 msgstr "liste de retra�age des affichages incompl�te"
 
-#: src/main/engine.c:2777
+#: src/main/engine.c:2788
 msgid "invalid display list"
 msgstr "liste de p�riph�riques d'affichages incorrecte"
 
-#: src/main/engine.c:2963
+#: src/main/engine.c:2900
+#, c-format
+msgid ""
+"snapshot recorded with different graphics engine version (pre 11 - this is "
+"version %d)"
+msgstr ""
+
+#: src/main/engine.c:2904
+#, c-format
+msgid ""
+"snapshot recorded with different graphics engine version (%d - this is "
+"version %d)"
+msgstr ""
+
+#: src/main/engine.c:2983
 msgid "'expr' argument must be an expression"
 msgstr "l'argument 'expr' doit �tre une expression"
 
-#: src/main/engine.c:2965
+#: src/main/engine.c:2985
 msgid "'list' argument must be a list"
 msgstr "l'argument 'list' doit �tre une liste"
 
-#: src/main/engine.c:2971
+#: src/main/engine.c:2991
 msgid "'env' argument must be an environment"
 msgstr "l'argument 'env' doit �tre un environnement"
 
-#: src/main/engine.c:3051 src/main/engine.c:3059
+#: src/main/engine.c:3071 src/main/engine.c:3079
 msgid "invalid multibyte char in pch=\"c\""
 msgstr "caract�re multioctet incorrect dans pch=\"c\""
 
-#: src/main/engine.c:3106
+#: src/main/engine.c:3126
 msgid "invalid hex digit in 'color' or 'lty'"
 msgstr "nombre hexad�cimal incorrect dans 'color' ou 'lty'"
 
-#: src/main/engine.c:3129
+#: src/main/engine.c:3149
 msgid "invalid line type: must be length 2, 4, 6 or 8"
 msgstr "type de ligne incorrect : doit �tre de longueur 2, 4, 6 ou 8"
 
-#: src/main/engine.c:3133
+#: src/main/engine.c:3153
 msgid "invalid line type: zeroes are not allowed"
 msgstr "type de ligne incorrect : les z�ros ne sont pas autoris�s"
 
-#: src/main/engine.c:3142 src/main/engine.c:3150 src/main/engine.c:3157
+#: src/main/engine.c:3162 src/main/engine.c:3170 src/main/engine.c:3177
 msgid "invalid line type"
 msgstr "type de ligne incorrect"
 
@@ -3042,443 +3104,447 @@ msgstr "type de ligne incorrect"
 msgid "cannot change value of locked binding for '%s'"
 msgstr "impossible de changer la valeur d'un lien verrouill� pour '%s'"
 
-#: src/main/envir.c:251 src/main/envir.c:1454
+#: src/main/envir.c:251 src/main/envir.c:1530
 msgid "cannot add bindings to a locked environment"
 msgstr "impossible d'ajouter des liens � un environnement verrouill�"
 
-#: src/main/envir.c:772
+#: src/main/envir.c:775
 msgid "invalid cached value in R_GetGlobalCache"
 msgstr "valeur cach�e en m�moire incorrecte dans R_GetGlobalCache"
 
-#: src/main/envir.c:830
+#: src/main/envir.c:836
 msgid "cannot unbind in the base namespace"
 msgstr "impossible de d�lier dans l'environnement de base"
 
-#: src/main/envir.c:832
+#: src/main/envir.c:838
 msgid "unbind in the base environment is unimplemented"
 msgstr ""
 "impossible de d�lier dans l'environnement de base (pas impl�ment� "
 "actuellement)"
 
-#: src/main/envir.c:834 src/main/envir.c:1684
+#: src/main/envir.c:840 src/main/envir.c:1818
 msgid "cannot remove bindings from a locked environment"
 msgstr "impossible d'�liminer les liens d'un environnement verrouill�"
 
-#: src/main/envir.c:1139
+#: src/main/envir.c:1213
 #, c-format
 msgid "argument to '%s' is not an environment"
 msgstr "l'argument � '%s' n'est pas un environnment"
 
-#: src/main/envir.c:1300
+#: src/main/envir.c:1374
 #, c-format
 msgid "the ... list does not contain %d elements"
 msgstr "la liste ... ne contient pas %d �l�ments"
 
-#: src/main/envir.c:1302
+#: src/main/envir.c:1376
 #, c-format
 msgid "..%d used in an incorrect context, no ... to look in"
 msgstr "..%d utilis� dans un mauvais contexte, aucun ... o� chercher"
 
-#: src/main/envir.c:1390 src/main/envir.c:1842 src/main/eval.c:573
-#: src/main/eval.c:3618
-#, c-format
-msgid "argument \"%s\" is missing, with no default"
-msgstr "l'argument \"%s\" est manquant, avec aucune valeur par d�faut"
-
-#: src/main/envir.c:1395
+#: src/main/envir.c:1469
 #, c-format
 msgid "could not find function \"%s\""
 msgstr "impossible de trouver la fonction \"%s\""
 
-#: src/main/envir.c:1418
+#: src/main/envir.c:1492
 msgid "cannot assign values in the empty environment"
 msgstr "impossible d'assigner des valeurs dans l'environnement vide"
 
-#: src/main/envir.c:1424 src/main/envir.c:1497
+#: src/main/envir.c:1498 src/main/envir.c:1628
 msgid "cannot assign variables to this database"
 msgstr "impossible d'affecter des variables � cette base de donn�es"
 
-#: src/main/envir.c:1580
+#: src/main/envir.c:1714
 #, c-format
 msgid "cannot add binding of '%s' to the base environment"
 msgstr "impossible d'ajouter des liens de '%s' � l'environnement de base"
 
-#: src/main/envir.c:1609
+#: src/main/envir.c:1743
 msgid "only the first element is used as variable name"
 msgstr "seulement le premier �l�ment est utilis� comme nom de variable"
 
-#: src/main/envir.c:1641
+#: src/main/envir.c:1775
 msgid "first argument must be a named list"
 msgstr "le premier argument doit �tre une liste nomm�e"
 
-#: src/main/envir.c:1646
+#: src/main/envir.c:1780
 msgid "names(x) must be a character vector of the same length as x"
 msgstr "names(x) doit �tre un vecteur de caract�res de la m�me longueur que x"
 
-#: src/main/envir.c:1649
+#: src/main/envir.c:1783
 msgid "'envir' argument must be an environment"
 msgstr "l'argument 'envir' doit �tre un environnement"
 
-#: src/main/envir.c:1678
+#: src/main/envir.c:1812
 msgid "cannot remove variables from base namespace"
 msgstr "impossible d'effacer des variables de l'espace de noms de base"
 
-#: src/main/envir.c:1680
+#: src/main/envir.c:1814
 msgid "cannot remove variables from the base environment"
 msgstr "impossible d'�liminer des variables de l'environnement de base"
 
-#: src/main/envir.c:1682
+#: src/main/envir.c:1816
 msgid "cannot remove variables from the empty environment"
 msgstr "impossible d'�liminer des variables de l'environnement vide"
 
-#: src/main/envir.c:1690
+#: src/main/envir.c:1824
 msgid "cannot remove variables from this database"
 msgstr "impossible d'�liminer des variables de cette base de donn�es"
 
-#: src/main/envir.c:1849
+#: src/main/envir.c:1985
 #, c-format
 msgid "object '%s' of mode '%s' was not found"
 msgstr "objet '%s' de mode '%s' introuvable"
 
-#: src/main/envir.c:1921
+#: src/main/envir.c:2068
 #, c-format
 msgid "invalid name in position %d"
 msgstr "nom incorrect � la position %d"
 
-#: src/main/envir.c:1927
+#: src/main/envir.c:2074
 msgid "second argument must be an environment"
 msgstr "le second argument doit �tre un environnement"
 
-#: src/main/envir.c:1935 src/main/envir.c:1943
+#: src/main/envir.c:2082 src/main/envir.c:2090
 #, c-format
 msgid "wrong length for '%s' argument"
 msgstr "mauvaise longueur pour l'argument '%s'"
 
-#: src/main/envir.c:2062
+#: src/main/envir.c:2221
 msgid "invalid use of 'missing'"
 msgstr "utilisation incorrecte de 'missing'"
 
-#: src/main/envir.c:2087
+#: src/main/envir.c:2247
 msgid "'missing' can only be used for arguments"
 msgstr "'missing' peut seulement �tre utilis� pour des arguments"
 
-#: src/main/envir.c:2168
+#: src/main/envir.c:2333
 msgid "'pos' must be an integer"
 msgstr "'pos' doit �tre un entier"
 
-#: src/main/envir.c:2182
+#: src/main/envir.c:2347
 msgid "all elements of a list must be named"
 msgstr "tous les �l�ments de la liste doivent �tre nomm�s"
 
-#: src/main/envir.c:2205
+#: src/main/envir.c:2370
 msgid "'attach' only works for lists, data frames and environments"
 msgstr ""
 "'attach' fonctionne seulement pour des listes, des tableaux de donn�es ou "
 "des environnements"
 
-#: src/main/envir.c:2288
+#: src/main/envir.c:2453
 msgid "detaching \"package:base\" is not allowed"
 msgstr "il est interdit de d�tacher \"package:base\""
 
-#: src/main/envir.c:2589 src/main/envir.c:2644
+#: src/main/envir.c:2798 src/main/envir.c:2879
 msgid "argument must be an environment"
 msgstr "l'argument doit �tre un environnement"
 
-#: src/main/envir.c:2648
+#: src/main/envir.c:2883
 msgid "arguments must be symbolic"
 msgstr "les arguments doivent �tre symboliques"
 
-#: src/main/envir.c:2772
+#: src/main/envir.c:3032
 msgid "no enclosing environment"
 msgstr "aucun environnement fermant (enclosing)"
 
-#: src/main/envir.c:2825
+#: src/main/envir.c:3085
 #, c-format
 msgid "no item called \"%s\" on the search list"
 msgstr "ancun �l�ment du nom de \"%s\" dans la liste de recherche"
 
-#: src/main/envir.c:2850
+#: src/main/envir.c:3110
 msgid "using 'as.environment(NULL)' is defunct"
 msgstr "l'utilisation de 'as.environment(NULL)' n'est plus autoris�e"
 
-#: src/main/envir.c:2856
+#: src/main/envir.c:3116
 msgid "S4 object does not extend class \"environment\""
 msgstr "les objets S4 n'�tendent pas la classe \"environment\""
 
-#: src/main/envir.c:2871
+#: src/main/envir.c:3131
 msgid "invalid object for 'as.environment'"
 msgstr "objet incorrect pour 'as.environment'"
 
-#: src/main/envir.c:2897 src/main/envir.c:2925 src/main/envir.c:2954
-#: src/main/envir.c:2975 src/main/envir.c:2998 src/main/envir.c:3033
-#: src/main/envir.c:3054
+#: src/main/envir.c:3157 src/main/envir.c:3185 src/main/envir.c:3214
+#: src/main/envir.c:3235 src/main/envir.c:3258 src/main/envir.c:3293
+#: src/main/envir.c:3314
 msgid "not an environment"
 msgstr "ceci n'est pas un environnement"
 
-#: src/main/envir.c:2949 src/main/envir.c:2970 src/main/envir.c:2991
-#: src/main/envir.c:3028 src/main/envir.c:3049 src/main/envir.c:3148
+#: src/main/envir.c:3209 src/main/envir.c:3230 src/main/envir.c:3251
+#: src/main/envir.c:3288 src/main/envir.c:3309 src/main/envir.c:3408
 msgid "not a symbol"
 msgstr "ceci n'est pas un symbole"
 
-#: src/main/envir.c:2962 src/main/envir.c:2983 src/main/envir.c:3041
-#: src/main/envir.c:3062
+#: src/main/envir.c:3222 src/main/envir.c:3243 src/main/envir.c:3301
+#: src/main/envir.c:3322
 #, c-format
 msgid "no binding for \"%s\""
 msgstr "aucun lien pour \"%s\""
 
-#: src/main/envir.c:2993
+#: src/main/envir.c:3253
 msgid "not a function"
 msgstr "ceci n'est pas une fonction"
 
-#: src/main/envir.c:3001 src/main/envir.c:3017
+#: src/main/envir.c:3261 src/main/envir.c:3277
 msgid "symbol already has a regular binding"
 msgstr "le symbole a d�j� un lien r�gulier"
 
-#: src/main/envir.c:3003 src/main/envir.c:3019
+#: src/main/envir.c:3263 src/main/envir.c:3279
 msgid "cannot change active binding if binding is locked"
 msgstr "impossible de changer un lien actif si le lien est verrouill�"
 
-#: src/main/envir.c:3107
+#: src/main/envir.c:3367 src/main/envir.c:3604
 msgid "unknown op"
 msgstr "op�ration inconnue"
 
-#: src/main/envir.c:3152
+#: src/main/envir.c:3412
 msgid "cannot unbind a locked binding"
 msgstr "impossible d'�liminer un lien verrouill�"
 
-#: src/main/envir.c:3154
+#: src/main/envir.c:3414
 msgid "cannot unbind an active binding"
 msgstr "impossible d'�liminer un lien actif"
 
-#: src/main/envir.c:3289
+#: src/main/envir.c:3555
 msgid "bad namespace name"
 msgstr "espace de nom erron�"
 
-#: src/main/envir.c:3301
+#: src/main/envir.c:3567
 msgid "namespace already registered"
 msgstr "espace de noms d�j� enregistr�"
 
-#: src/main/envir.c:3313
+#: src/main/envir.c:3579
 msgid "namespace not registered"
 msgstr "espace de noms non enregistr�"
 
-#: src/main/envir.c:3360
+#: src/main/envir.c:3635
 msgid "bad import environment argument"
 msgstr "argument d'environnement 'import' erron�"
 
-#: src/main/envir.c:3365
+#: src/main/envir.c:3640
 msgid "bad export environment argument"
 msgstr "argument d'environnement 'export' erron�"
 
-#: src/main/envir.c:3369
+#: src/main/envir.c:3644
 msgid "length of import and export names must match"
 msgstr "les longueurs de 'import' et 'export' doivent correspondre"
 
-#: src/main/envir.c:3392
+#: src/main/envir.c:3667
 #, c-format
 msgid "exported symbol '%s' has no value"
 msgstr "le symbole export� '%s' n'a pas de valeur associ�e"
 
-#: src/main/envir.c:3557
+#: src/main/envir.c:3833
 #, c-format
 msgid "unknown encoding: %d"
 msgstr "encodage inconnu : %d"
 
-#: src/main/envir.c:3577
+#: src/main/envir.c:3853
 #, c-format
 msgid "embedded nul in string: '%s'"
 msgstr "caract�re nul au milieu de la cha�ne : '%s'"
 
-#: src/main/errors.c:178 src/main/errors.c:215
+#: src/main/errors.c:163 src/main/errors.c:200
 msgid "interrupts suspended; signal ignored"
 msgstr "interruptions suspendues ; le signal est ignor�"
 
-#: src/main/errors.c:318
+#: src/main/errors.c:250
+msgid "[... truncated]"
+msgstr ""
+
+#: src/main/errors.c:310
 msgid "invalid option \"warning.expression\""
 msgstr "option incorrecte \"warning.expression\""
 
-#: src/main/errors.c:348
+#: src/main/errors.c:339
 #, c-format
 msgid "(converted from warning) %s"
 msgstr "(converti depuis l'avis) %s"
 
-#: src/main/errors.c:359
-#, c-format
-msgid "Warning: %s\n"
+#: src/main/errors.c:349
+#, fuzzy
+msgid "Warning:"
 msgstr "Avis : %s\n"
 
-#: src/main/errors.c:363
-#, c-format
-msgid "Warning in %s : %s\n"
+#: src/main/errors.c:351
+#, fuzzy, c-format
+msgid "Warning in %s :"
 msgstr "Avis dans %s : %s\n"
 
-#: src/main/errors.c:365
-#, c-format
-msgid ""
-"Warning in %s :\n"
-"  %s\n"
+#: src/main/errors.c:360 src/main/errors.c:374 src/main/errors.c:687
+msgid "Calls:"
 msgstr ""
-"Avis dans %s :\n"
-"  %s\n"
 
-#: src/main/errors.c:428 src/main/errors.c:447 src/main/errors.c:596
+#: src/main/errors.c:421 src/main/errors.c:440 src/main/errors.c:602
 msgid "Lost warning messages\n"
 msgstr "messages d'avis perdus\n"
 
-#: src/main/errors.c:459
-msgid "Warning message:\n"
-msgid_plural "Warning messages:\n"
+#: src/main/errors.c:452
+#, fuzzy
+msgid "Warning message:"
+msgid_plural "Warning messages:"
 msgstr[0] "Message d'avis :\n"
 msgstr[1] "Messages d'avis :\n"
 
-#: src/main/errors.c:514
+#: src/main/errors.c:462 src/main/errors.c:490
 #, c-format
-msgid "There were %d warnings (use warnings() to see them)\n"
-msgstr "Il y a eu %d avis (utilisez warnings() pour les visionner)\n"
+msgid "In %s :"
+msgstr ""
 
-#: src/main/errors.c:517
-#, c-format
-msgid "There were %d or more warnings (use warnings() to see the first %d)\n"
+#: src/main/errors.c:515
+#, fuzzy, c-format
+msgid "There was %d warning (use warnings() to see it)"
+msgid_plural "There were %d warnings (use warnings() to see them)"
+msgstr[0] "Il y a eu %d avis (utilisez warnings() pour les visionner)\n"
+msgstr[1] "Il y a eu %d avis (utilisez warnings() pour les visionner)\n"
+
+#: src/main/errors.c:520
+#, fuzzy, c-format
+msgid "There were %d or more warnings (use warnings() to see the first %d)"
 msgstr ""
 "Il y a eu %d avis ou plus (utilisez warnings() pour voir les %d premiers)\n"
 
-#: src/main/errors.c:587
+#: src/main/errors.c:593
 msgid "Error during wrapup: "
 msgstr "Erreur pendant l'emballage (wrapup) : "
 
-#: src/main/errors.c:612
+#: src/main/errors.c:618
 msgid "Error in "
 msgstr "Erreur dans "
 
-#: src/main/errors.c:613
-#, c-format
-msgid " (from %s) : "
+#: src/main/errors.c:640 src/main/errors.c:647
+#, fuzzy, c-format
+msgid "Error in %s (from %s) : "
 msgstr " (depuis %s) : "
 
-#: src/main/errors.c:664 src/main/errors.c:670
+#: src/main/errors.c:649
+#, fuzzy, c-format
+msgid "Error in %s : "
+msgstr "Erreur dans "
+
+#: src/main/errors.c:669 src/main/errors.c:675
 #, c-format
 msgid "Error: "
 msgstr "Erreur : "
 
-#: src/main/errors.c:690 src/main/errors.c:1319
+#: src/main/errors.c:696 src/main/errors.c:1300
 msgid "In addition: "
 msgstr "De plus : "
 
-#: src/main/errors.c:811
+#: src/main/errors.c:818
 msgid "invalid option \"error\"\n"
 msgstr "option \"error\" incorrecte\n"
 
-#: src/main/errors.c:893
-msgid "Execution halted\n"
-msgstr "Ex�cution arr�t�e\n"
-
-#: src/main/errors.c:1032
-msgid "'msg1' must be a character string"
-msgstr "'msg1' doit �tre une cha�ne de caract�res"
-
-#: src/main/errors.c:1034
-msgid "'msg2' must be a character string"
-msgstr "'msg2' doit �tre une cha�ne de caract�res"
+#: src/main/errors.c:1013 src/main/errors.c:1015 src/main/options.c:339
+#: src/main/unique.c:1638
+#, fuzzy, c-format
+msgid "'%s' must be a character string"
+msgstr "'sep' doit �tre une cha�ne de caract�res"
 
-#: src/main/errors.c:1131
+#: src/main/errors.c:1116
 msgid " [invalid string in stop(.)]"
 msgstr " [cha�ne incorrecte dans stop(.)]"
 
-#: src/main/errors.c:1162
+#: src/main/errors.c:1148
 msgid " [invalid string in warning(.)]"
 msgstr " [cha�ne incorrecte dans warning(.)]"
 
-#: src/main/errors.c:1178
+#: src/main/errors.c:1164
 #, c-format
 msgid "incorrect number of arguments to \"%s\""
 msgstr "nombre d'arguments incorrect pour \"%s\""
 
-#: src/main/errors.c:1184 src/main/errors.c:1199
+#: src/main/errors.c:1170 src/main/errors.c:1185
 #, c-format
 msgid "unimplemented feature in %s"
 msgstr "fonction non impl�ment�e dans %s"
 
-#: src/main/errors.c:1193
+#: src/main/errors.c:1179
 msgid "invalid number of arguments"
 msgstr "nombre d'arguments incorrect"
 
-#: src/main/errors.c:1194 src/main/logic.c:189
+#: src/main/errors.c:1180 src/main/logic.c:181
 msgid "invalid argument type"
 msgstr "type de l'argument incorrect"
 
-#: src/main/errors.c:1196
+#: src/main/errors.c:1182
 msgid "time-series/vector length mismatch"
 msgstr "longueurs incompatibles des s�ries temporelles / vecteurs"
 
-#: src/main/errors.c:1197
+#: src/main/errors.c:1183
 msgid "incompatible arguments"
 msgstr "arguments incompatibles"
 
-#: src/main/errors.c:1200
+#: src/main/errors.c:1186
 msgid "unknown error (report this!)"
 msgstr "erreur inconnue (veuillez signaler ceci aux d�veloppeurs !)"
 
-#: src/main/errors.c:1212
+#: src/main/errors.c:1195
+msgid "inaccurate integer conversion in coercion"
+msgstr "conversion automatique d'entier approximative"
+
+#: src/main/errors.c:1198
 msgid "unknown warning (report this!)"
 msgstr "avis inconnu (veuillez signaler ceci aux d�veloppeurs !)"
 
-#: src/main/errors.c:1283
+#: src/main/errors.c:1269
 msgid "No function to return from, jumping to top level"
 msgstr "Aucun function d'o� sortir, branchement vers le niveau le plus haut"
 
-#: src/main/errors.c:1299
+#: src/main/errors.c:1285
 msgid "top level inconsistency?"
 msgstr "niveau le plus haut incoh�rent ?"
 
-#: src/main/errors.c:1478
+#: src/main/errors.c:1459
 msgid "bad handler data"
 msgstr "mauvais manipulateur de donn�es"
 
-#: src/main/errors.c:1628
+#: src/main/errors.c:1613
 msgid "error message not a string"
 msgstr "le message d'erreur n'est pas une cha�ne de caract�res"
 
-#: src/main/errors.c:1703
+#: src/main/errors.c:1688
 msgid "handler or restart stack mismatch in old restart"
 msgstr ""
 "manipulateur de donn�es ou pile de red�marrage incoh�rent dans l'ancien "
 "red�marrage"
 
-#: src/main/errors.c:1729 src/main/errors.c:1745
+#: src/main/errors.c:1714 src/main/errors.c:1730
 msgid "bad error message"
 msgstr "mauvais message d'erreur"
 
-#: src/main/errors.c:1787
+#: src/main/errors.c:1771
 msgid "bad restart"
 msgstr "mauvais red�marrage"
 
-#: src/main/errors.c:1819
+#: src/main/errors.c:1803
 msgid "restart not on stack"
 msgstr "le red�marrage n'est pas dans la pile"
 
-#: src/main/errors.c:1836
+#: src/main/errors.c:1819
 msgid "not in a try context"
 msgstr "vous n'�tes pas dans un contexte 'try'"
 
-#: src/main/errors.c:1849
+#: src/main/errors.c:1832
 msgid "error message must be a character string"
 msgstr "le message d'erreur doit �tre une cha�ne de caract�res"
 
-#: src/main/eval.c:308
+#: src/main/eval.c:365
 #, c-format
 msgid "source files skipped by Rprof; please increase '%s'"
 msgstr "fichiers source �vit�s par Rprof ; veuillez augmenter '%s'"
 
-#: src/main/eval.c:328
+#: src/main/eval.c:385
 #, c-format
 msgid "Rprof: cannot open profile file '%s'"
 msgstr "Rprof : impossible d'ouvrir le fichier '%s'"
 
-#: src/main/eval.c:422
+#: src/main/eval.c:479
 msgid "R profiling is not available on this system"
 msgstr "'le profilage de R n'est pas disponible sur ce syst�me"
 
-#: src/main/eval.c:446
+#: src/main/eval.c:503
 msgid ""
 "promise already under evaluation: recursive default argument reference or "
 "earlier problems?"
@@ -3486,273 +3552,278 @@ msgstr ""
 "la promesse est d�j� en cours d'�valuation : r�f�rence r�cursive d'argument "
 "par d�faut ou probl�me ant�rieur ?"
 
-#: src/main/eval.c:448
+#: src/main/eval.c:505
 msgid "restarting interrupted promise evaluation"
 msgstr "red�marrage de l'�valuation d'une promesse interrompue"
 
-#: src/main/eval.c:544
+#: src/main/eval.c:601
 msgid ""
 "evaluation nested too deeply: infinite recursion / options(expressions=)?"
 msgstr ""
-"�valuations trop profond�ment imbriqu�es : r�cursion infinie / options"
-"(expressions=) ?"
+"�valuations trop profond�ment imbriqu�es : r�cursion infinie / "
+"options(expressions=) ?"
 
-#: src/main/eval.c:575 src/main/eval.c:3619
+#: src/main/eval.c:632 src/main/eval.c:4238
 msgid "argument is missing, with no default"
 msgstr "argument manquant, sans valeur associ�e par d�faut"
 
-#: src/main/eval.c:679 src/main/eval.c:4642
+#: src/main/eval.c:736 src/main/eval.c:1306 src/main/eval.c:5533
 msgid "attempt to apply non-function"
 msgstr "tentative d'appliquer un objet qui n'est pas une fonction"
 
-#: src/main/eval.c:702
+#: src/main/eval.c:759
 #, c-format
 msgid "%s at %s#%d: "
 msgstr "%s � %s#%d :"
 
-#: src/main/eval.c:1178
+#: src/main/eval.c:1298 src/main/eval.c:2271
+#, c-format
+msgid "argument %d is empty"
+msgstr "l'argument %d est vide"
+
+#: src/main/eval.c:1350
 #, c-format
 msgid "could not find symbol \"%s\" in environment of the generic function"
 msgstr ""
 "impossible de trouver le symbole \"%s\" dans l'environnement de la fonction "
 "g�n�rique"
 
-#: src/main/eval.c:1196
+#: src/main/eval.c:1368
 #, c-format
 msgid "symbol \"%s\" not in environment of method"
 msgstr "le symbole \"%s\" n'est pas dans l'environnement de la m�thode"
 
-#: src/main/eval.c:1308
+#: src/main/eval.c:1481
 msgid "the condition has length > 1 and only the first element will be used"
 msgstr "la condition a une longueur > 1 et seul le premier �l�ment est utilis�"
 
-#: src/main/eval.c:1325
+#: src/main/eval.c:1500
 msgid "missing value where TRUE/FALSE needed"
 msgstr "valeur manquante l� o� TRUE / FALSE est requis"
 
-#: src/main/eval.c:1326
+#: src/main/eval.c:1501
 msgid "argument is not interpretable as logical"
 msgstr "l'argument n'est pas interpr�table comme une valeur logique"
 
-#: src/main/eval.c:1327
+#: src/main/eval.c:1502
 msgid "argument is of length zero"
 msgstr "l'argument est de longueur nulle"
 
-#: src/main/eval.c:1418
+#: src/main/eval.c:1596
 msgid "non-symbol loop variable"
 msgstr "variable de boucle non symbolique"
 
-#: src/main/eval.c:1510 src/main/eval.c:4408
+#: src/main/eval.c:1687 src/main/eval.c:5301
 msgid "invalid for() loop sequence"
 msgstr "s�quence de boucle for() incorrecte"
 
-#: src/main/eval.c:1652
+#: src/main/eval.c:1826
 msgid "multi-argument returns are not permitted"
 msgstr "les renvois multi-arguments sont inderdits"
 
-#: src/main/eval.c:1701
+#: src/main/eval.c:1873
 msgid "invalid (NULL) left side of assignment"
 msgstr "partie gauche de l'assignation (NULL) incorrect"
 
-#: src/main/eval.c:1734
+#: src/main/eval.c:1907
 msgid "target of assignment expands to non-language object"
 msgstr "la cible de l'assignation est un objet n'appartenant pas au langage"
 
-#: src/main/eval.c:1817
+#: src/main/eval.c:1990
 #, c-format
 msgid "overlong name in '%s'"
 msgstr "nom trop long dans '%s'"
 
-#: src/main/eval.c:1915
+#: src/main/eval.c:2080
 msgid "cannot do complex assignments in base namespace"
 msgstr ""
 "impossible d'effectuer des assignations complexes dans l'espace de noms de "
 "base"
 
-#: src/main/eval.c:1917
+#: src/main/eval.c:2082
 msgid "cannot do complex assignments in base environment"
 msgstr ""
 "impossible d'effectuer des assignations complexes dans l'environnement de "
 "base"
 
-#: src/main/eval.c:1954 src/main/eval.c:1981
+#: src/main/eval.c:2121 src/main/eval.c:2148
 msgid "invalid function in complex assignment"
 msgstr "fonction incorrecte dans un assignation complexe"
 
-#: src/main/eval.c:2041
+#: src/main/eval.c:2208
 msgid "invalid (do_set) left-hand side to assignment"
 msgstr "membre gauche de l'assignation (do_set) incorrect"
 
-#: src/main/eval.c:2103
-#, c-format
-msgid "argument %d is empty"
-msgstr "l'argument %d est vide"
-
-#: src/main/eval.c:2116
+#: src/main/eval.c:2284
 #, c-format
 msgid "'%s' is missing"
 msgstr "'%s' est manquant"
 
-#: src/main/eval.c:2267
+#: src/main/eval.c:2439
 msgid "invalid formal argument list for \"function\""
 msgstr "liste d'arguments formels incorrecte pour \"function\""
 
-#: src/main/eval.c:2325 src/main/eval.c:2356 src/main/eval.c:2361
+#: src/main/eval.c:2497 src/main/eval.c:2528 src/main/eval.c:2533
 #, c-format
 msgid "invalid '%s' argument of type '%s'"
 msgstr "argument '%s' incorrect de type '%s'"
 
-#: src/main/eval.c:2353
+#: src/main/eval.c:2525
 msgid "numeric 'envir' arg not of length one"
 msgstr "argument num�rique 'envir' n'ayant une longueur unitaire"
 
-#: src/main/eval.c:2377 src/main/eval.c:2399
+#: src/main/eval.c:2549 src/main/eval.c:2573
 msgid "restarts not supported in 'eval'"
 msgstr "red�marrages non support�s dans 'eval'"
 
-#: src/main/eval.c:2456 src/main/eval.c:2469
+#: src/main/eval.c:2632 src/main/eval.c:2645
 msgid "'Recall' called from outside a closure"
 msgstr "'Recall' appel� en dehors d'une fermeture (closure)"
 
-#: src/main/eval.c:2562
+#: src/main/eval.c:2738
 msgid "value in '...' is not a promise"
 msgstr "la valeur dans '...' n'est pas une promesse (promise)"
 
-#: src/main/eval.c:2754 src/main/objects.c:720
-#, c-format
-msgid "call name too long in '%s'"
-msgstr "nom d'appel trop long dans '%s'"
-
-#: src/main/eval.c:2775
-#, c-format
-msgid "generic name too long in '%s'"
-msgstr "nom g�n�rique trop long dans '%s'"
-
-#: src/main/eval.c:2840
+#: src/main/eval.c:2999
 #, c-format
 msgid "Incompatible methods (\"%s\", \"%s\") for \"%s\""
 msgstr "M�thodes incompatibles (\"%s\", \"%s\") pour \"%s\""
 
-#: src/main/eval.c:2906
+#: src/main/eval.c:3048
 msgid "dispatch error in group dispatch"
 msgstr "erreur de branchement de m�thode du groupe"
 
-#: src/main/eval.c:3201
+#: src/main/eval.c:3532
 #, c-format
 msgid "\"%s\" is not a %s function"
 msgstr "\"%s\" n'est pas une fonction %s"
 
-#: src/main/eval.c:3430
+#: src/main/eval.c:4047
 msgid "node stack overflow"
 msgstr "pile de noeuds d�bord�e vers le haut"
 
-#: src/main/eval.c:3436
+#: src/main/eval.c:4053
 msgid "integer stack overflow"
 msgstr "pile d'entiers d�bord�e vers le haut"
 
-#: src/main/eval.c:3490
+#: src/main/eval.c:4107
 msgid "bad opcode"
 msgstr "mauvais code d'op�ration (opcode)"
 
-#: src/main/eval.c:4219
+#: src/main/eval.c:5083
 #, c-format
 msgid "invalid %s type in 'x %s y'"
 msgstr "type %s incorrect dans 'x %s y'"
 
-#: src/main/eval.c:4310
+#: src/main/eval.c:5195
 msgid "bytecode version mismatch; using eval"
 msgstr "incoh�rence de version de pseudo-code ; utilisation de eval"
 
-#: src/main/eval.c:4315
+#: src/main/eval.c:5200
 msgid "bytecode version is too old"
 msgstr "la version du pseudo-code est trop longue"
 
-#: src/main/eval.c:4316
+#: src/main/eval.c:5201
 msgid "bytecode version is too new"
 msgstr "la version du pseudo-code est trop r�cente"
 
-#: src/main/eval.c:4350
+#: src/main/eval.c:5235
 msgid "byte code version mismatch"
 msgstr "incoh�rence de versions du pseudo-code"
 
-#: src/main/eval.c:4477
+#: src/main/eval.c:5383
 msgid "invalid sequence argument in for loop"
 msgstr "s�quence d'arguments incorrecte dans une boucle for"
 
-#: src/main/eval.c:4624 src/main/names.c:1181
+#: src/main/eval.c:5522 src/main/names.c:1312
 #, c-format
 msgid "there is no .Internal function '%s'"
 msgstr "pas de fonction .Internal '%s'"
 
-#: src/main/eval.c:4731 src/main/eval.c:5077 src/main/eval.c:5119
+#: src/main/eval.c:5622 src/main/eval.c:5968 src/main/eval.c:6008
 msgid "bad function"
 msgstr "mauvaise fonction"
 
-#: src/main/eval.c:4746
+#: src/main/eval.c:5635
 msgid "not a BUILTIN function"
 msgstr "ce n'est pas une function BUILTIN"
 
-#: src/main/eval.c:5159
+#: src/main/eval.c:6066
+#, fuzzy
+msgid "bad numeric 'switch' offsets"
+msgstr "valeur de d�calage num�rique erron�e"
+
+#: src/main/eval.c:6072
 msgid "numeric EXPR required for 'switch' without named alternatives"
 msgstr "EXPR num�rique requise dans 'switch' sans alternatives nomm�es"
 
-#: src/main/eval.c:5255
+#: src/main/eval.c:6076
+#, fuzzy
+msgid "bad character 'switch' offsets"
+msgstr "valeur de d�calage caract�re erron�e"
+
+#: src/main/eval.c:6188
 msgid "cannot find index for threaded code address"
 msgstr "impossible de trouver l'indice pour l'adresse de code trait�e"
 
-#: src/main/eval.c:5315
+#: src/main/eval.c:6248
 msgid "invalid body"
 msgstr "corps (body) non valide"
 
-#: src/main/eval.c:5335
+#: src/main/eval.c:6268
 msgid "invalid symbol"
 msgstr "symbole non valide"
 
-#: src/main/eval.c:5379
+#: src/main/eval.c:6312
 msgid "argument is not a byte code object"
 msgstr "l'argument n'est pas un objet pseudo-code"
 
-#: src/main/eval.c:5400
+#: src/main/eval.c:6334
 msgid "bad file name"
 msgstr "mauvais nom de fichier"
 
-#: src/main/eval.c:5404 src/main/eval.c:5425
+#: src/main/eval.c:6338 src/main/eval.c:6359
 msgid "unable to open 'file'"
 msgstr "impossible d'ouvrir 'file'"
 
-#: src/main/eval.c:5419 src/main/saveload.c:1942
+#: src/main/eval.c:6353 src/main/saveload.c:1944
 msgid "'file' must be non-empty string"
 msgstr "'file' doit �tre une cha�ne de caract�res non vide"
 
-#: src/main/eval.c:5421 src/main/saveload.c:1944 src/main/saveload.c:2244
-#: src/main/serialize.c:2149
+#: src/main/eval.c:6355 src/main/saveload.c:1946 src/main/saveload.c:2246
+#: src/main/serialize.c:2189
 msgid "'ascii' must be logical"
 msgstr "'ascii' doit �tre une valeur logique"
 
-#: src/main/eval.c:5492 src/main/eval.c:5511 src/main/eval.c:5541
+#: src/main/eval.c:6426 src/main/eval.c:6445 src/main/eval.c:6475
 msgid "constant buffer must be a generic vector"
 msgstr "le tampon des constantes doit �tre un vecteur g�n�rique"
 
-#: src/main/eval.c:5543
+#: src/main/eval.c:6477
 msgid "bad constant count"
 msgstr "nombre de constantes erron�"
 
-#: src/main/eval.c:5579
+#: src/main/eval.c:6515
 msgid "profile timer in use"
 msgstr "temporisation de profilage en utilisation"
 
-#: src/main/eval.c:5581
+#: src/main/eval.c:6517
 msgid "already byte code profiling"
 msgstr "d�j� en train de profiler du pseudo-code"
 
-#: src/main/eval.c:5599
+#: src/main/eval.c:6535
 msgid "setting profile timer failed"
 msgstr "le d�marrage d'une temporisation de profilage a �chou�"
 
-#: src/main/eval.c:5616
+#: src/main/eval.c:6553
 msgid "not byte code profiling"
 msgstr "profilage d'autre chose que du pseudo-code"
 
+#: src/main/eval.c:6569 src/main/eval.c:6573 src/main/eval.c:6577
+#, fuzzy
+msgid "byte code profiling is not supported in this build"
+msgstr "ICU ne fonctionne pas dans cette compilation"
+
 #: src/main/gevents.c:43
 #, c-format
 msgid "'%s' events not supported in this device"
@@ -3766,26 +3837,26 @@ msgstr "erreur interne"
 msgid "this graphics device does not support event handling"
 msgstr "le p�riph�rique graphique ne supporte pas les �v�nements graphiques"
 
-#: src/main/gevents.c:136
+#: src/main/gevents.c:135
 msgid "invalid prompt"
 msgstr "invite de commande incorrecte (prompt)"
 
-#: src/main/gevents.c:148
+#: src/main/gevents.c:146
 msgid "recursive use of 'getGraphicsEvent' not supported"
 msgstr "l'utilisation r�cursive de 'getGraphicsEvent' n'est pas permise"
 
-#: src/main/gevents.c:158
+#: src/main/gevents.c:157
 msgid "no graphics event handlers set"
 msgstr "aucun manipulateur graphiques (handler) d�fini"
 
-#: src/main/gram.y:222 src/main/gram.y:237 src/main/gram.y:2222
-#: src/main/gram.y:2236
+#: src/main/gram.y:222 src/main/gram.y:237 src/main/gram.y:2245
+#: src/main/gram.y:2259
 #, c-format
 msgid "EOF whilst reading MBCS char at line %d"
 msgstr "EOF lors de la lecture de caract�res MBCS � la ligne %d"
 
-#: src/main/gram.y:226 src/main/gram.y:234 src/main/gram.y:2226
-#: src/main/gram.y:2233
+#: src/main/gram.y:226 src/main/gram.y:234 src/main/gram.y:2249
+#: src/main/gram.y:2256
 #, c-format
 msgid "invalid multibyte character in parser at line %d"
 msgstr ""
@@ -3802,129 +3873,144 @@ msgstr "d
 msgid "incorrect tag type at line %d"
 msgstr "type de marque incorrect � la ligne %d"
 
-#: src/main/gram.y:1653
+#: src/main/gram.y:1657
 msgid "contextstack overflow"
 msgstr "pile de noeuds d�bord�e vers le haut"
 
-#: src/main/gram.y:1890
-msgid "input"
-msgstr "entr�e"
+#: src/main/gram.y:1907 src/main/gram.y:1913
+#, fuzzy, c-format
+msgid "unexpected input"
+msgstr "%s inattendu(e)"
 
-#: src/main/gram.y:1891
-msgid "end of input"
+#: src/main/gram.y:1910 src/main/main.c:311
+#, fuzzy, c-format
+msgid "unexpected end of input"
 msgstr "fin d'entr�e"
 
-#: src/main/gram.y:1892
-msgid "string constant"
+#: src/main/gram.y:1916
+#, fuzzy, c-format
+msgid "unexpected string constant"
 msgstr "constante de type cha�ne de caract�res"
 
-#: src/main/gram.y:1893
-msgid "numeric constant"
+#: src/main/gram.y:1919
+#, fuzzy, c-format
+msgid "unexpected numeric constant"
 msgstr "constante num�rique"
 
-#: src/main/gram.y:1894
-msgid "symbol"
-msgstr "symbole"
+#: src/main/gram.y:1922
+#, fuzzy, c-format
+msgid "unexpected symbol"
+msgstr "%s inattendu(e)"
 
-#: src/main/gram.y:1895
-msgid "assignment"
-msgstr "affectation"
+#: src/main/gram.y:1925
+#, fuzzy, c-format
+msgid "unexpected assignment"
+msgstr "%s inattendu(e)"
 
-#: src/main/gram.y:1896
-msgid "end of line"
+#: src/main/gram.y:1928
+#, fuzzy, c-format
+msgid "unexpected end of line"
 msgstr "fin de ligne"
 
-#: src/main/gram.y:1910 src/main/gram.y:1916
+#: src/main/gram.y:1931 src/main/gram.y:1939
 #, c-format
 msgid "unexpected %s"
 msgstr "%s inattendu(e)"
 
-#: src/main/gram.y:1926
+#: src/main/gram.y:1951
 #, c-format
 msgid "repeated formal argument '%s' on line %d"
 msgstr "argument formel r�p�t� '%s' � la ligne %d"
 
-#: src/main/gram.y:2136
+#: src/main/gram.y:2161
 #, c-format
 msgid "integer literal %s contains decimal; using numeric value"
 msgstr ""
 "le litt�ral entier %s contient des d�cimales ; utilisation de la valeur "
 "num�rique"
 
-#: src/main/gram.y:2140
+#: src/main/gram.y:2164
 #, c-format
 msgid "non-integer value %s qualified with L; using numeric value"
 msgstr ""
 "la valeur non enti�re %s est qualifi�e avec L ; utilisation de la valeur "
 "num�rique"
 
-#: src/main/gram.y:2153
+#: src/main/gram.y:2176
 #, c-format
 msgid "integer literal %s contains unnecessary decimal point"
 msgstr "le litt�ral entier %s contient un s�parateur d�cimal inutile"
 
-#: src/main/gram.y:2185
+#: src/main/gram.y:2208
 #, c-format
 msgid "unable to allocate buffer for long string at line %d"
 msgstr ""
 "impossible d'allouer de la m�moire pour une longue cha�ne de caract�res � la "
 "ligne %d"
 
-#: src/main/gram.y:2338
+#: src/main/gram.y:2347 src/main/gram.y:2370 src/main/gram.y:2407
+#: src/main/gram.y:2443
+#, fuzzy, c-format
+msgid "nul character not allowed (line %d)"
+msgstr ""
+"caract�res multioctets incorrects dans l'analyse de code (parser) � la ligne "
+"%d"
+
+#: src/main/gram.y:2363
 #, c-format
 msgid "'\\x' used without hex digits in character string starting \"%s\""
 msgstr ""
 "'\\x' non suivi de chiffres hexad�cimaux dans la cha�ne de caract�res "
 "d�butant \"%s\""
 
-#: src/main/gram.y:2352
+#: src/main/gram.y:2379
 #, c-format
 msgid "\\uxxxx sequences not supported inside backticks (line %d)"
 msgstr "\\uxxxx s�quences non support�es dans les 'backticks' (ligne %d)"
 
-#: src/main/gram.y:2367
+#: src/main/gram.y:2394
 #, c-format
 msgid "'\\u' used without hex digits in character string starting \"%s\""
 msgstr ""
 "'\\u' non suivi de chiffres hexad�cimaux dans la cha�ne de caract�res "
 "d�butant \"%s\""
 
-#: src/main/gram.y:2375
+#: src/main/gram.y:2402
 #, c-format
 msgid "invalid \\u{xxxx} sequence (line %d)"
 msgstr "s�quence \\u{xxxx} incorrecte (ligne %d)"
 
-#: src/main/gram.y:2387
+#: src/main/gram.y:2416
 #, c-format
 msgid "\\Uxxxxxxxx sequences not supported inside backticks (line %d)"
 msgstr "\\Uxxxxxxxx s�quences non support�es dans les 'backticks' (ligne %d)"
 
-#: src/main/gram.y:2402
+#: src/main/gram.y:2431
 #, c-format
 msgid "'\\U' used without hex digits in character string starting \"%s\""
 msgstr ""
 "'\\U' non suivi de chiffres hexad�cimaux dans la cha�ne de caract�res "
 "d�butant \"%s\""
 
-#: src/main/gram.y:2410
+#: src/main/gram.y:2439
 #, c-format
 msgid "invalid \\U{xxxxxxxx} sequence (line %d)"
 msgstr "s�quence \\U{xxxxxxxx} incorrecte (ligne %d)"
 
-#: src/main/gram.y:2451
+#: src/main/gram.y:2482
 #, c-format
 msgid "'\\%c' is an unrecognized escape in character string starting \"%s\""
 msgstr ""
 "'\\%c' est un code escape non reconnu dans une cha�ne de caract�res d�butant "
 "\"%s\""
 
-#: src/main/gram.y:2510
+#: src/main/gram.y:2546
 msgid "mixing Unicode and octal/hex escapes in a string is not allowed"
 msgstr ""
 "le m�lange de texte Unicode et des caract�res � �chappement octaux ou "
 "d�cimaux n'est pas autoris�e dans une cha�ne de caract�res"
 
-#: src/main/gram.y:2514
+#: src/main/gram.y:2550
 #, c-format
 msgid ""
 "string at line %d containing Unicode escapes not in this locale\n"
@@ -3934,13 +4020,13 @@ msgstr ""
 "Unicode absents de cet environnement linguistique\n"
 "est trop longue (1000 caract�res maximum)"
 
-#: src/main/gram.y:3112 src/main/gram.y:3119 src/main/gram.y:3125
-#: src/main/gram.y:3132
+#: src/main/gram.y:3148 src/main/gram.y:3155 src/main/gram.y:3161
+#: src/main/gram.y:3168
 #, c-format
 msgid "contextstack overflow at line %d"
 msgstr "pile d'entiers d�bord�e vers le haut � la ligne %d"
 
-#: src/main/gram.y:3227
+#: src/main/gram.y:3263
 #, c-format
 msgid "internal parser error at line %d"
 msgstr "erreur interne de l'analyseur de code (parser) � la ligne %d"
@@ -3950,36 +4036,36 @@ msgstr "erreur interne de l'analyseur de code (parser) 
 msgid "relative range of values =%4.0f * EPS, is small (axis %d)"
 msgstr "plage relative des valeurs = %4.0f * EPS trop petite (axe %d)"
 
-#: src/main/grep.c:93
+#: src/main/grep.c:96
 #, c-format
 msgid "invalid regular expression '%s', reason '%s'"
 msgstr "expression r�guli�re '%s' incorrecte, � cause de '%s'"
 
-#: src/main/grep.c:95
+#: src/main/grep.c:98
 #, c-format
 msgid "invalid regular expression, reason '%s'"
 msgstr "expression r�guli�re incorrecte, � cause de '%s'"
 
-#: src/main/grep.c:220 src/main/grep.c:308 src/main/grep.c:416
-#: src/main/grep.c:883 src/main/grep.c:2473
+#: src/main/grep.c:225 src/main/grep.c:315 src/main/grep.c:426
+#: src/main/grep.c:900 src/main/grep.c:2502
 #, c-format
 msgid "input string %d is invalid UTF-8"
 msgstr "la cha�ne de caract�res entr�e %d est incorrecte comme encodage UTF-8"
 
-#: src/main/grep.c:286 src/main/grep.c:383
+#: src/main/grep.c:292 src/main/grep.c:391
 #, c-format
 msgid "'split' string %d is invalid UTF-8"
 msgstr "la cha�ne de caract�res 'split' %d est incorrecte comme encodage UTF-8"
 
-#: src/main/grep.c:290 src/main/grep.c:387 src/main/grep.c:560
+#: src/main/grep.c:296 src/main/grep.c:395 src/main/grep.c:571
 #, c-format
 msgid "'split' string %d is invalid in this locale"
 msgstr ""
 "la cha�ne de caract�res 'split' %d est incorrecte dans cet environnement "
 "linguistique"
 
-#: src/main/grep.c:395 src/main/grep.c:851 src/main/grep.c:1600
-#: src/main/grep.c:2394
+#: src/main/grep.c:404 src/main/grep.c:867 src/main/grep.c:1621
+#: src/main/grep.c:2419
 #, c-format
 msgid ""
 "PCRE pattern compilation error\n"
@@ -3990,13 +4076,13 @@ msgstr ""
 "\t'%s'\n"
 "\tat '%s'\n"
 
-#: src/main/grep.c:397
+#: src/main/grep.c:406
 #, c-format
 msgid "invalid split pattern '%s'"
 msgstr "motif de d�coupage '%s' incorrect"
 
-#: src/main/grep.c:401 src/main/grep.c:857 src/main/grep.c:1607
-#: src/main/grep.c:2401
+#: src/main/grep.c:410 src/main/grep.c:873 src/main/grep.c:1628
+#: src/main/grep.c:2426
 #, c-format
 msgid ""
 "PCRE pattern study error\n"
@@ -4005,47 +4091,47 @@ msgstr ""
 "Erreur d'analyse du motif PCRE\n"
 "\t'%s'\n"
 
-#: src/main/grep.c:834 src/main/grep.c:2377
+#: src/main/grep.c:849 src/main/grep.c:2401
 msgid "regular expression is invalid UTF-8"
 msgstr "expression r�guli�re incorrecte comme encodage UTF-8"
 
-#: src/main/grep.c:853 src/main/grep.c:1602 src/main/grep.c:2396
+#: src/main/grep.c:869 src/main/grep.c:1623 src/main/grep.c:2421
 #, c-format
 msgid "invalid regular expression '%s'"
 msgstr "expression r�guli�re incorrecte '%s'"
 
-#: src/main/grep.c:1264
+#: src/main/grep.c:1282
 msgid "pattern matches an empty string infinitely, returning first match only"
 msgstr ""
 "le motif correspond � une cha�ne vide infiniment, retourne la premi�re "
 "correspondance seulement"
 
-#: src/main/grep.c:1575
+#: src/main/grep.c:1595
 msgid "'pattern' is invalid UTF-8"
 msgstr "'pattern' est incorrect comme encodage UTF-8"
 
-#: src/main/grep.c:1577
+#: src/main/grep.c:1597
 msgid "'replacement' is invalid UTF-8"
 msgstr "'replacement' est incorrect comme encodage UTF-8"
 
-#: src/main/grep.c:1581
+#: src/main/grep.c:1601
 msgid "'pattern' is invalid in this locale"
 msgstr "'pattern' est incorrect dans cet environnement linguistique"
 
-#: src/main/grep.c:1584
+#: src/main/grep.c:1604
 msgid "'replacement' is invalid in this locale"
 msgstr "'replacement' est incorrect dans cet environnement linguistique"
 
-#: src/main/grep.c:1589
+#: src/main/grep.c:1609
 msgid "zero-length pattern"
 msgstr "motif de longueur nulle"
 
-#: src/main/grep.c:1732 src/main/grep.c:1748 src/main/grep.c:1796
-#: src/main/grep.c:1812 src/main/grep.c:1859 src/main/grep.c:1875
+#: src/main/grep.c:1753 src/main/grep.c:1769 src/main/grep.c:1817
+#: src/main/grep.c:1833 src/main/grep.c:1880 src/main/grep.c:1896
 msgid "result string is too long"
 msgstr "cha�ne de caract�res r�sultat trop longue"
 
-#: src/main/grep.c:2411
+#: src/main/grep.c:2436
 #, c-format
 msgid "'pcre_fullinfo' returned '%d' "
 msgstr "'pcre_fullinfo' a renvoy� '%d'"
@@ -4054,34 +4140,30 @@ msgstr "'pcre_fullinfo' a renvoy
 msgid "ignoring non-pairlist attributes"
 msgstr "les attributs qui ne sont pas des pairlists sont ignor�s"
 
-#: src/main/internet.c:92
+#: src/main/internet.c:83
 msgid "internet routines cannot be accessed in module"
 msgstr "les routines internet ne sont pas accessibles dans ce module"
 
-#: src/main/internet.c:103 src/main/internet.c:141 src/main/internet.c:154
-#: src/main/internet.c:165 src/main/internet.c:176 src/main/internet.c:187
-#: src/main/internet.c:196 src/main/internet.c:207 src/main/internet.c:218
-#: src/main/internet.c:227 src/main/internet.c:237
+#: src/main/internet.c:94 src/main/internet.c:106 src/main/internet.c:119
+#: src/main/internet.c:130 src/main/internet.c:141 src/main/internet.c:152
+#: src/main/internet.c:161 src/main/internet.c:172 src/main/internet.c:183
+#: src/main/internet.c:192 src/main/internet.c:202 src/main/internet.c:318
+#: src/main/internet.c:330 src/main/internet.c:342 src/main/internet.c:354
 msgid "internet routines cannot be loaded"
 msgstr "les routines internet ne peuvent pas �tre charg�es"
 
-#: src/main/internet.c:118 src/main/memory.c:3434 src/main/memory.c:3444
-#: src/main/memory.c:3456 src/main/memory.c:3470 src/main/memory.c:3487
-#: src/main/memory.c:3505
-msgid "bad value"
-msgstr "mauvaise valeur"
-
-#: src/main/internet.c:124
-msgid "internet routines were already initialized"
-msgstr "les routines internet ont d�j� �t� initialis�es"
-
-#: src/main/internet.c:251 src/main/internet.c:265 src/main/internet.c:281
-#: src/main/internet.c:293 src/main/internet.c:307 src/main/internet.c:327
-#: src/main/internet.c:340
+#: src/main/internet.c:216 src/main/internet.c:230 src/main/internet.c:247
+#: src/main/internet.c:259 src/main/internet.c:273 src/main/internet.c:293
+#: src/main/internet.c:306
 msgid "socket routines cannot be loaded"
 msgstr ""
 "les routines de connecteurs logiciels (sockets) ne peuvent pas �tre charg�es"
 
+#: src/main/internet.c:242
+#, fuzzy
+msgid "attempt to close invalid socket"
+msgstr "tentative de changer l'attribut 'comment' � une valeur incorrecte"
+
 #: src/main/lapack.c:39
 msgid "LAPACK routines cannot be accessed in module"
 msgstr "les routines LAPACK ne sont pas accessibles dans le module"
@@ -4090,44 +4172,40 @@ msgstr "les routines LAPACK ne sont pas accessibles dans le module"
 msgid "LAPACK routines cannot be loaded"
 msgstr "les routines LAPACK ne peuvent pas �tre charg�es"
 
-#: src/main/logic.c:70
-msgid "binary operations require two arguments"
-msgstr "les op�rations binaires n�cessitent deux arguments"
-
-#: src/main/logic.c:88 src/main/logic.c:150
+#: src/main/logic.c:80 src/main/logic.c:142
 msgid "operations are possible only for numeric, logical or complex types"
 msgstr ""
 "ces op�rations ne sont possibles que pour des types num�riques, logiques ou "
 "complexes"
 
-#: src/main/logic.c:98
+#: src/main/logic.c:90
 msgid "binary operation on non-conformable arrays"
 msgstr "op�ration binaire sur des tableaux de tailles non conformes"
 
-#: src/main/logic.c:124 src/main/relop.c:247
+#: src/main/logic.c:116 src/main/relop.c:241
 msgid "non-conformable time series"
 msgstr "s�ries temporelles de tailles non conformes"
 
-#: src/main/logic.c:254
+#: src/main/logic.c:247
 #, c-format
 msgid "'%s' operator requires 2 arguments"
 msgstr "l'op�rateur '%s' n�cessite deux arguments"
 
-#: src/main/logic.c:261
+#: src/main/logic.c:254
 #, c-format
 msgid "invalid 'x' type in 'x %s y'"
 msgstr "type 'x' incorrect dans 'x %s y'"
 
-#: src/main/logic.c:268
+#: src/main/logic.c:261
 #, c-format
 msgid "invalid 'y' type in 'x %s y'"
 msgstr "type 'y' incorrect dans 'x %s y'"
 
-#: src/main/logic.c:341
+#: src/main/logic.c:334
 msgid "Unary operator `!' called with two arguments"
 msgstr "L'op�ration unaire `!' est appel�e avec deux arguments"
 
-#: src/main/logic.c:448
+#: src/main/logic.c:439
 #, c-format
 msgid "coercing argument of type '%s' to logical"
 msgstr "conversion automatique d'un argument de type '%s' en bool�en (logical)"
@@ -4136,67 +4214,81 @@ msgstr "conversion automatique d'un argument de type '%s' en bool
 msgid "dummy - do not translate"
 msgstr "dummy - ne pas traduire"
 
-#: src/main/main.c:476
+#: src/main/main.c:329
+#, fuzzy
+msgid "error during cleanup\n"
+msgstr "Erreur pendant l'emballage (wrapup) : "
+
+#: src/main/main.c:336
+msgid "Execution halted\n"
+msgstr "Ex�cution arr�t�e\n"
+
+#: src/main/main.c:505
 msgid "Error: segfault from C stack overflow\n"
 msgstr "Erreur : pile C d�bord�e vers le haut\n"
 
-#: src/main/main.c:846
+#: src/main/main.c:888
 msgid "unable to open the base package\n"
 msgstr "impossible d'ouvrir le package 'base'\n"
 
-#: src/main/main.c:924
+#: src/main/main.c:971
 #, c-format
 msgid "unable to restore saved data in %s\n"
 msgstr "impossible de r�cup�rer les donn�es sauv�es dans %s\n"
 
-#: src/main/main.c:971
+#: src/main/main.c:1020
 msgid "During startup - "
 msgstr "Pendant le d�marrage - "
 
-#: src/main/main.c:1224
+#: src/main/main.c:1036
+#, fuzzy
+msgid "unable to initialize the JIT\n"
+msgstr "impossible d'ouvrir le fichier en lecture"
+
+#: src/main/main.c:1290
 msgid "cannot quit from browser"
 msgstr "impossible de sortir de l'explorateur"
 
-#: src/main/main.c:1228
+#: src/main/main.c:1294
 msgid "one of \"yes\", \"no\", \"ask\" or \"default\" expected."
 msgstr "r�ponse attendue parmi \"yes\", \"no\", \"ask\" ou \"default\""
 
-#: src/main/main.c:1233
+#: src/main/main.c:1299
 msgid "save=\"ask\" in non-interactive use: command-line default will be used"
 msgstr ""
 "save=\"ask\" en usage non interactif : valeur par d�faut de la ligne de "
 "commande utilis�e"
 
-#: src/main/main.c:1241
+#: src/main/main.c:1307
 msgid "unrecognized value of 'save'"
 msgstr "valeur de 'save' non reconnue"
 
-#: src/main/main.c:1244
+#: src/main/main.c:1310
 msgid "invalid 'status', 0 assumed"
 msgstr "'status' incorrect, 0 est utilis�"
 
-#: src/main/main.c:1249
+#: src/main/main.c:1315
 msgid "invalid 'runLast', FALSE assumed"
 msgstr "'runLast' incorrect, FALSE est utilis�"
 
-#: src/main/main.c:1280
+#: src/main/main.c:1346
 msgid "cannot allocate space for toplevel callback element"
 msgstr ""
 "impossible d'assigner de l'espace pour l'�l�ment de rappel (callback) de "
 "niveau le plus haut"
 
-#: src/main/main.c:1358
+#: src/main/main.c:1424
 msgid "negative index passed to R_removeTaskCallbackByIndex"
 msgstr "indice n�gatif pass� � R_removeTaskCallbackByIndex"
 
-#: src/main/main.c:1468
+#: src/main/main.c:1534
 #, c-format
 msgid "warning messages from top-level task callback '%s'\n"
 msgstr ""
 "messages d'avertissement du rappel (callback) de la t�che de niveau le plus "
 "haut '%s'\n"
 
-#: src/main/main.c:1524
+#: src/main/main.c:1591
 msgid "top-level task callback did not return a logical value"
 msgstr "la t�che de niveau le plus haut n'a pas renvoy� une valeur logique"
 
@@ -4219,201 +4311,212 @@ msgstr ""
 msgid "invalid partial string match"
 msgstr "correspondance partielle de cha�nes de caract�res incorrecte"
 
-#: src/main/match.c:228 src/main/match.c:268 src/main/objects.c:56
-#: src/main/objects.c:66
+#: src/main/match.c:228 src/main/match.c:266 src/main/objects.c:49
+#: src/main/objects.c:59
 #, c-format
 msgid "formal argument \"%s\" matched by multiple actual arguments"
 msgstr "argument formel \"%s\" correspondant � plusieurs arguments fournis"
 
-#: src/main/match.c:231 src/main/match.c:266
+#: src/main/match.c:231 src/main/match.c:264
 #, c-format
 msgid "argument %d matches multiple formal arguments"
 msgstr "l'argument %d correspond � plusieurs arguments formels"
 
-#: src/main/match.c:272
+#: src/main/match.c:270
 #, c-format
 msgid "partial argument match of '%s' to '%s'"
 msgstr "correspondance partielle d'argument de '%s' par rapport � '%s'"
 
-#: src/main/match.c:383
+#: src/main/match.c:380
 #, c-format
 msgid "unused argument %s"
 msgid_plural "unused arguments %s"
 msgstr[0] "argument inutilis� %s"
 msgstr[1] "arguments inutilis�s %s"
 
-#: src/main/memory.c:1232
+#: src/main/memory.c:1234
 msgid "can only weakly reference/finalize reference objects"
 msgstr "ne peut r�f�rencer des objets qu'avec une r�f�rence faible / finalis�e"
 
-#: src/main/memory.c:1266
+#: src/main/memory.c:1268
 msgid "finalizer must be a function or NULL"
 msgstr "le \"finalisateur\" doit �tre une fonction ou NULL"
 
-#: src/main/memory.c:1322 src/main/memory.c:1330 src/main/memory.c:1341
+#: src/main/memory.c:1324 src/main/memory.c:1332 src/main/memory.c:1343
 msgid "not a weak reference"
 msgstr "ce n'est pas une r�f�rence faible"
 
-#: src/main/memory.c:1472
+#: src/main/memory.c:1474
 msgid "first argument must be environment or external pointer"
 msgstr "le premier argument doit �tre un environnement ou un pointeur externe"
 
-#: src/main/memory.c:1474
+#: src/main/memory.c:1476
 msgid "second argument must be a function"
 msgstr "le second argument doit �tre une fonction"
 
-#: src/main/memory.c:1478
+#: src/main/memory.c:1480
 msgid "third argument must be 'TRUE' or 'FALSE'"
 msgstr "le troisi�me argument doit �tre 'TRUE' ou 'FALSE'"
 
-#: src/main/memory.c:1970
+#: src/main/memory.c:1979
 msgid "vector memory exhausted (limit reached?)"
 msgstr "vecteurs de m�moire �puis�s (limite atteinte ?)"
 
-#: src/main/memory.c:1976
+#: src/main/memory.c:1985
 msgid "cons memory exhausted (limit reached?)"
 msgstr "m�moires 'cons' �puis�es (limite atteinte ?)"
 
-#: src/main/memory.c:1981
+#: src/main/memory.c:1990
 msgid "memory exhausted (limit reached?)"
 msgstr "m�moire �puis�e (limite atteinte ?)"
 
-#: src/main/memory.c:2116
+#: src/main/memory.c:2126
 #, c-format
 msgid "cannot allocate memory block of size %0.f Tb"
 msgstr "impossible d'allouer un bloc de m�moire de taille %0.f Tb"
 
-#: src/main/memory.c:2121
+#: src/main/memory.c:2131
 #, c-format
 msgid "cannot allocate memory block of size %0.1f Gb"
 msgstr "impossible d'allouer un bloc de m�moire de taille %0.1f Go"
 
-#: src/main/memory.c:2442
+#: src/main/memory.c:2458
 msgid "vector is too large"
 msgstr "vecteur trop long"
 
-#: src/main/memory.c:2445
+#: src/main/memory.c:2461
 msgid "negative length vectors are not allowed"
 msgstr "longueur de vecteurs n�gative non permise"
 
-#: src/main/memory.c:2471 src/main/memory.c:2484 src/main/memory.c:2497
-#: src/main/memory.c:2512
+#: src/main/memory.c:2487 src/main/memory.c:2500 src/main/memory.c:2513
+#: src/main/memory.c:2528
 #, c-format
 msgid "cannot allocate vector of length %d"
 msgstr "impossible d'allouer un vecteur de longueur %d"
 
-#: src/main/memory.c:2533
+#: src/main/memory.c:2549
 #, c-format
 msgid "invalid type/length (%s/%d) in vector allocation"
 msgstr "type / longueur incorrect (%s / %d) dans l'allocation de vecteur"
 
-#: src/main/memory.c:2636
+#: src/main/memory.c:2648
 #, c-format
 msgid "cannot allocate vector of size %0.1f Gb"
 msgstr "impossible d'allouer un vecteur de taille %0.1f Go"
 
-#: src/main/memory.c:2640
+#: src/main/memory.c:2652
 #, c-format
 msgid "cannot allocate vector of size %0.1f Mb"
 msgstr "impossible d'allouer un vecteur de taille %0.1f Mo"
 
-#: src/main/memory.c:2644
+#: src/main/memory.c:2656
 #, c-format
 msgid "cannot allocate vector of size %0.f Kb"
 msgstr "impossible d'allouer un vecteur de taille %0.f Ko"
 
-#: src/main/memory.c:3001
+#: src/main/memory.c:3071
 msgid "protect(): protection stack overflow"
 msgstr "protect() : d�bordement vers le haut de protection de pile"
 
-#: src/main/memory.c:3008
-#, c-format
-msgid "unprotect(): only %d protected items"
-msgstr "unprotect() : seulement %d �l�ments prot�g�s"
+#: src/main/memory.c:3078
+#, fuzzy, c-format
+msgid "unprotect(): only %d protected item"
+msgid_plural "unprotect(): only %d protected items"
+msgstr[0] "unprotect() : seulement %d �l�ments prot�g�s"
+msgstr[1] "unprotect() : seulement %d �l�ments prot�g�s"
 
-#: src/main/memory.c:3041
+#: src/main/memory.c:3113
 msgid "unprotect_ptr: pointer not found"
 msgstr "unprotect_ptr : pointeur non trouv�"
 
-#: src/main/memory.c:3079
-#, c-format
-msgid "R_Reprotect: only %d protected items, can't reprotect index %d"
-msgstr ""
+#: src/main/memory.c:3151
+#, fuzzy, c-format
+msgid "R_Reprotect: only %d protected item, can't reprotect index %d"
+msgid_plural "R_Reprotect: only %d protected items, can't reprotect index %d"
+msgstr[0] ""
+"R_Reprotect : seulement %d �l�ments prot�g�s, impossible de reprot�ger "
+"l'indice %d"
+msgstr[1] ""
 "R_Reprotect : seulement %d �l�ments prot�g�s, impossible de reprot�ger "
 "l'indice %d"
 
-#: src/main/memory.c:3129
+#: src/main/memory.c:3203
 #, c-format
 msgid "'Calloc' could not allocate memory (%.0f of %u bytes)"
 msgstr "'Calloc' ne peut allouer de la m�moire (%.0f de %u octets)"
 
-#: src/main/memory.c:3140
+#: src/main/memory.c:3214
 #, c-format
 msgid "'Realloc' could not re-allocate memory (%.0f bytes)"
 msgstr "'Realloc' ne peut r�allouer de la m�moire (%.0f octets)"
 
-#: src/main/memory.c:3380
+#: src/main/memory.c:3460
 msgid "not safe to return vector pointer"
 msgstr "le renvoi d'un pointeur sur un vecteur n'est pas s�r"
 
-#: src/main/memory.c:3392
+#: src/main/memory.c:3471
 #, c-format
 msgid "attempt to set index %lu/%lu in SET_STRING_ELT"
 msgstr "tentative de modification de l'index %lu/%lu dans SET_STRING_ELT"
 
-#: src/main/memory.c:3408
+#: src/main/memory.c:3487
 #, c-format
 msgid "attempt to set index %lu/%lu in SET_VECTOR_ELT"
 msgstr "tentative de modification de l'index %lu/%lu dans SET_VECTOR_ELT"
 
-#: src/main/memory.c:3658
+#: src/main/memory.c:3514 src/main/memory.c:3524 src/main/memory.c:3536
+#: src/main/memory.c:3550 src/main/memory.c:3565 src/main/memory.c:3583
+msgid "bad value"
+msgstr "mauvaise valeur"
+
+#: src/main/memory.c:3746
 msgid "memory profiling is not available on this system"
 msgstr "le profilage de la m�moire n'est pas disponible sur ce syst�me"
 
-#: src/main/memory.c:3723
+#: src/main/memory.c:3810
 #, c-format
 msgid "Rprofmem: cannot open output file '%s'"
 msgstr "Rprofmem: impossible d'ouvrir le fichier '%s'"
 
-#: src/main/memory.c:3830
+#: src/main/memory.c:3915
 #, c-format
 msgid "long vectors not supported yet: %s:%d"
 msgstr "les vecteurs longs ne sont pas encore support�s : %s:%d"
 
-#: src/main/names.c:996
+#: src/main/names.c:1021
 msgid "string argument required"
 msgstr "argument cha�ne de caract�res requis"
 
-#: src/main/names.c:999
+#: src/main/names.c:1024
 msgid "no such primitive function"
 msgstr "une telle fonction primitive n'existe pas"
 
-#: src/main/names.c:1146
+#: src/main/names.c:1212 src/main/names.c:1242
 msgid "attempt to use zero-length variable name"
 msgstr "tentative d'utilisation de nom de variable de longueur nulle"
 
-#: src/main/names.c:1148
+#: src/main/names.c:1214 src/main/names.c:1244
 #, c-format
 msgid "variable names are limited to %d bytes"
 msgstr "les noms de variables sont limit�s � %d octets"
 
-#: src/main/names.c:1176 src/main/names.c:1179
+#: src/main/names.c:1307 src/main/names.c:1310
 msgid "invalid .Internal() argument"
 msgstr "argument .Internal() incorrect"
 
-#: src/main/objects.c:46
+#: src/main/objects.c:39
 msgid "generic 'function' is not a function"
 msgstr "le g�n�rique 'function' n'est pas une fonction"
 
-#: src/main/objects.c:201
+#: src/main/objects.c:193
 msgid "bad generic call environment"
 msgstr "mauvais environnement d'appel g�n�rique"
 
-#: src/main/objects.c:207
+#: src/main/objects.c:201
 msgid "bad generic definition environment"
 msgstr "mauvais environnement de d�finition g�n�rique"
 
-#: src/main/objects.c:246
+#: src/main/objects.c:249
 msgid ""
 "no '.S3MethodsClass' table, cannot use S4 objects with S3 methods ('methods' "
 "package not attached?)"
@@ -4421,138 +4524,121 @@ msgstr ""
 "pas de table '.S3MethodsClass', impossible d'utiliser des objets S4 avec des "
 "m�thodes S3 (le package 'methods' n'est pas attach� ?)"
 
-#: src/main/objects.c:270 src/main/objects.c:411
-msgid "'UseMethod' used in an inappropriate fashion"
-msgstr "'UseMethod' utilis� d'une mani�re inappropri�e"
-
-#: src/main/objects.c:290
-msgid "invalid generic function in 'usemethod'"
-msgstr "function g�n�rique incorrecte dans 'usemethod'"
-
-#: src/main/objects.c:399
+#: src/main/objects.c:415
 msgid "there must be a 'generic' argument"
 msgstr "un argument doit �tre 'generic'"
 
-#: src/main/objects.c:403
+#: src/main/objects.c:419
 msgid "'generic' argument must be a character string"
 msgstr "l'argument 'generic' doit �tre une cha�ne de caract�res"
 
-#: src/main/objects.c:440
-msgid "'UseMethod' called from outside a function"
-msgstr "'UseMethod' appel� en dehors d'une fonction"
-
-#: src/main/objects.c:447
-msgid "first argument must be a generic name"
-msgstr "le premier argument doit �tre un nom g�n�rique"
+#: src/main/objects.c:427
+msgid "'UseMethod' used in an inappropriate fashion"
+msgstr "'UseMethod' utilis� d'une mani�re inappropri�e"
 
 #: src/main/objects.c:472
 #, c-format
 msgid "no applicable method for '%s' applied to an object of class \"%s\""
 msgstr "pas de m�thode pour '%s' applicable pour un objet de classe \"%s\""
 
-#: src/main/objects.c:533
+#: src/main/objects.c:582
 msgid "'NextMethod' called from outside a function"
 msgstr "'NextMethod' appel� en dehors d'une fonction"
 
-#: src/main/objects.c:539
+#: src/main/objects.c:588
 msgid "'NextMethod' called from an anonymous function"
 msgstr "'NextMethod' appel� depuis une fonction anonyme"
 
-#: src/main/objects.c:563
+#: src/main/objects.c:609
 msgid "no calling generic was found: was a method called directly?"
 msgstr ""
 "aucun appel g�n�rique trouv� : est-ce qu'une m�thode a �t� appel�e "
 "directement ?"
 
-#: src/main/objects.c:566
+#: src/main/objects.c:612
 #, c-format
 msgid "'function' is not a function, but of type %d"
 msgstr "'function' n'est pas une fonction, mais est de type %d"
 
-#: src/main/objects.c:640
+#: src/main/objects.c:639
 msgid "wrong argument ..."
 msgstr "argument ... incorrect"
 
-#: src/main/objects.c:653
+#: src/main/objects.c:651
 msgid "object not specified"
 msgstr "objet non sp�cifi�"
 
-#: src/main/objects.c:663 src/main/objects.c:670
+#: src/main/objects.c:659 src/main/objects.c:666
 msgid "generic function not specified"
 msgstr "fonction g�n�rique non sp�cifi�e"
 
-#: src/main/objects.c:667
+#: src/main/objects.c:663
 msgid "invalid generic argument to 'NextMethod'"
 msgstr "argument g�n�rique incorrect pour 'NextMethod'"
 
-#: src/main/objects.c:680
+#: src/main/objects.c:675
 msgid "invalid 'group' argument found in 'NextMethod'"
 msgstr "argument 'group' incorrect d�couvert dans 'NextMethod'"
 
-#: src/main/objects.c:699
+#: src/main/objects.c:692
 msgid "wrong value for .Method"
 msgstr "mauvaise valeur pour .Method"
 
-#: src/main/objects.c:703 src/main/objects.c:712
-#, c-format
-msgid "method name too long in '%s'"
-msgstr "nom de m�thode trop long dans '%s'"
-
-#: src/main/objects.c:715
+#: src/main/objects.c:702
 msgid "Incompatible methods ignored"
 msgstr "M�thodes incompatibles et ignor�es"
 
-#: src/main/objects.c:775 src/main/objects.c:780
+#: src/main/objects.c:759 src/main/objects.c:766
 msgid "no method to invoke"
 msgstr "aucune m�thode ne peut �tre invoqu�e"
 
-#: src/main/objects.c:832
+#: src/main/objects.c:817
 msgid "cannot unclass an environment"
 msgstr "impossible de d�classer un environnement"
 
-#: src/main/objects.c:835
+#: src/main/objects.c:820
 msgid "cannot unclass an external pointer"
 msgstr "impossible de d�classer un pointeur externe"
 
-#: src/main/objects.c:872
+#: src/main/objects.c:856
 msgid "'what' must be a character vector"
 msgstr "'what' doit �tre un vecteur de cha�ne de caract�res"
 
-#: src/main/objects.c:876
+#: src/main/objects.c:860
 msgid "'which' must be a length 1 logical vector"
 msgstr "'which' doit �tre un vecteur logique de longueur 1"
 
-#: src/main/objects.c:882
+#: src/main/objects.c:866
 msgid "use 'is()' instead of 'inherits()' on S4 objects"
 msgstr "utilisez 'is()' � la place de 'inherits()' pour des objets S4"
 
-#: src/main/objects.c:1012
+#: src/main/objects.c:995
 msgid "could not find correct environment; please report!"
 msgstr ""
 "impossible de trouver un environnement correct ; Veuillez reporter ceci !"
 
-#: src/main/objects.c:1052
+#: src/main/objects.c:1039
 msgid "'onOff' must be TRUE or FALSE"
 msgstr "'onOff' doit �tre TRUE ou FALSE"
 
-#: src/main/objects.c:1119
+#: src/main/objects.c:1104
 #, c-format
 msgid "unable to find a non-generic version of function \"%s\""
 msgstr "impossible de trouver une version non g�n�rique de la fonction \"%s\""
 
-#: src/main/objects.c:1151
+#: src/main/objects.c:1136
 msgid ""
 "'standardGeneric' called without 'methods' dispatch enabled (will be ignored)"
 msgstr ""
 "'standardGeneric' appel� sans que le dispatcheur de 'methods' ne soit activ� "
 "(sera ignor�)"
 
-#: src/main/objects.c:1160
+#: src/main/objects.c:1145
 msgid "argument to 'standardGeneric' must be a non-empty character string"
 msgstr ""
 "l'argument � 'standardGeneric' doit �tre une cha�ne de caract�res non vide"
 
-#: src/main/objects.c:1165
+#: src/main/objects.c:1150
 #, c-format
 msgid ""
 "call to standardGeneric(\"%s\") apparently not from the body of that generic "
@@ -4561,11 +4647,7 @@ msgstr ""
 "l'appel � standardGeneric(\"%s\") n'est apparemment pas fait � partir du "
 "corps d'une fonction"
 
-#: src/main/objects.c:1189
-msgid "argument 'code' must be a character string"
-msgstr "l'argument 'code' doit �tre une cha�ne de caract�res"
-
-#: src/main/objects.c:1257
+#: src/main/objects.c:1249
 #, c-format
 msgid ""
 "invalid primitive methods code (\"%s\"): should be \"clear\", \"reset\", "
@@ -4574,11 +4656,11 @@ msgstr ""
 "code de m�thodes primitives incorrect (\"%s\") : doit �tre \"clear\", \"reset"
 "\", \"set\", ou \"suppress\""
 
-#: src/main/objects.c:1265
+#: src/main/objects.c:1257
 msgid "invalid object: must be a primitive function"
 msgstr "object incorrect : doit �tre une fonction primitive"
 
-#: src/main/objects.c:1312
+#: src/main/objects.c:1304
 #, c-format
 msgid ""
 "the formal definition of a primitive generic must be a function object (got "
@@ -4587,21 +4669,21 @@ msgstr ""
 "la d�finition formelle de la primitive g�n�rique doit �tre un objet de type "
 "fonction (le type est '%s')"
 
-#: src/main/objects.c:1342
+#: src/main/objects.c:1334
 #, c-format
 msgid "object returned as generic function \"%s\" does not appear to be one"
 msgstr ""
 "l'objet renvoy� comme fonction g�n�rique \"%s\" ne semble pas en �tre une"
 
-#: src/main/objects.c:1444
+#: src/main/objects.c:1439
 msgid "invalid primitive operation given for dispatch"
 msgstr "op�ration primitive incorrecte fournie pour le dispatcheur"
 
-#: src/main/objects.c:1470 src/main/objects.c:1489
+#: src/main/objects.c:1468 src/main/objects.c:1487
 msgid "dispatch error"
 msgstr "erreur de branchement de m�thode"
 
-#: src/main/objects.c:1483
+#: src/main/objects.c:1481
 #, c-format
 msgid ""
 "primitive function \"%s\" has been set for methods but no generic function "
@@ -4610,85 +4692,95 @@ msgstr ""
 "la fonction primitive \"%s\" est appliqu�e pour les m�thodes mais aucune "
 "fonction g�n�rique n'a �t� fournie"
 
-#: src/main/objects.c:1508
+#: src/main/objects.c:1506
 msgid "C level MAKE_CLASS macro called with NULL string pointer"
 msgstr ""
 "la macro de niveau C MAKE_CLASS est appel�e avec un pointeur de cha�ne NULL"
 
-#: src/main/objects.c:1524
+#: src/main/objects.c:1522
+#, fuzzy
+msgid "'methods' package not yet loaded"
+msgstr "impossible de charger les fontes Hershey "
+
+#: src/main/objects.c:1532
 msgid "R_getClassDef(.) called with NULL string pointer"
 msgstr "R_getClassDef(.) appel�e avec un pointeur de cha�ne NULL"
 
-#: src/main/objects.c:1546
+#: src/main/objects.c:1577
 msgid "C level NEW macro called with null class definition pointer"
 msgstr ""
 "la macro de niveau C NEW est appel�e avec un pointeur de d�finition de "
 "classe NULL"
 
-#: src/main/objects.c:1550
+#: src/main/objects.c:1581
 #, c-format
 msgid "trying to generate an object from a virtual class (\"%s\")"
 msgstr ""
 "essai de g�n�ration d'un objet � partir d'une classe virtuelle (\"%s\")"
 
-#: src/main/objects.c:1627
+#: src/main/objects.c:1663
 #, c-format
 msgid "object of class \"%s\" does not correspond to a valid S3 object"
 msgstr "l'objet de classe \"%s\" ne correspond pas � un objet S3 correct"
 
-#: src/main/options.c:120 src/main/options.c:180
+#: src/main/options.c:121 src/main/options.c:182
 msgid "corrupted options list"
 msgstr "liste d'options corrompue"
 
-#: src/main/options.c:130
+#: src/main/options.c:131
 msgid "invalid printing width, used 80"
 msgstr "largeur d'impression incorrecte, utilisation de 80"
 
-#: src/main/options.c:141
+#: src/main/options.c:142
 msgid "invalid printing digits, used 7"
 msgstr "nombre de chiffres � imprim�s incorrect, utilisation de 7"
 
-#: src/main/options.c:153
+#: src/main/options.c:154
 msgid "invalid 'deparse.cutoff', used 60"
 msgstr "'deparse.cutoff' incorrect, utilisation de 60"
 
-#: src/main/options.c:165
+#: src/main/options.c:166
 msgid "invalid value for \"device.ask.default\", using FALSE"
 msgstr "valeur non autoris�e pour \"device.ask.default\", utilisation de FALSE"
 
-#: src/main/options.c:401
+#: src/main/options.c:416
 msgid "list argument has no valid names"
 msgstr "l'argument liste n'a pas de noms valides"
 
-#: src/main/options.c:429
+#: src/main/options.c:445
 #, c-format
 msgid "invalid 'width' parameter, allowed %d...%d"
 msgstr "param�tre 'width' incorrect, valeurs autoris�es %d...%d"
 
-#: src/main/options.c:440
+#: src/main/options.c:456
 #, c-format
 msgid "invalid 'digits' parameter, allowed %d...%d"
 msgstr "param�tre 'digits' incorrect, valeurs autoris�es %d...%d"
 
-#: src/main/options.c:447
+#: src/main/options.c:463
 #, c-format
 msgid "'expressions' parameter invalid, allowed %d...%d"
 msgstr "param�tre 'expressions' incorrect, valeurs permises %d...%d"
 
-#: src/main/options.c:454 src/main/options.c:462 src/main/options.c:468
-#: src/main/options.c:476 src/main/options.c:483 src/main/options.c:488
-#: src/main/options.c:495 src/main/options.c:501 src/main/options.c:507
-#: src/main/options.c:512 src/main/options.c:517 src/main/options.c:526
-#: src/main/options.c:532 src/main/options.c:538 src/main/options.c:549
-#: src/main/options.c:556 src/main/options.c:562 src/main/options.c:570
-#: src/main/options.c:577 src/main/options.c:584 src/main/options.c:591
-#: src/main/options.c:598 src/main/options.c:606 src/main/options.c:615
-#: src/main/options.c:618 src/main/options.c:624
+#: src/main/options.c:470 src/main/options.c:478 src/main/options.c:484
+#: src/main/options.c:492 src/main/options.c:499 src/main/options.c:504
+#: src/main/options.c:511 src/main/options.c:517 src/main/options.c:523
+#: src/main/options.c:528 src/main/options.c:533 src/main/options.c:542
+#: src/main/options.c:548 src/main/options.c:554 src/main/options.c:564
+#: src/main/options.c:578 src/main/options.c:584 src/main/options.c:592
+#: src/main/options.c:599 src/main/options.c:606 src/main/options.c:613
+#: src/main/options.c:620 src/main/options.c:628 src/main/options.c:637
+#: src/main/options.c:640 src/main/options.c:646
 #, c-format
 msgid "invalid value for '%s'"
 msgstr "valeur incorrecte pour '%s'"
 
-#: src/main/options.c:611 src/main/options.c:640
+#: src/main/options.c:569
+#, fuzzy
+msgid "'OutDec' must be a string of one character"
+msgstr "'dec' doit �tre un seul caract�re"
+
+#: src/main/options.c:633 src/main/options.c:662
 msgid "\"par.ask.default\" has been replaced by \"device.ask.default\""
 msgstr "\"par.ask.default\" est remplac� par \"device.ask.default\""
 
@@ -4712,15 +4804,20 @@ msgstr ""
 "l'argument pass� � la fonction interne paste n'est pas une cha�ne de "
 "caract�res"
 
-#: src/main/paste.c:390
+#: src/main/paste.c:387
 msgid "first argument must be atomic"
 msgstr "le premier argument doit �tre atomique"
 
-#: src/main/paste.c:560
+#: src/main/paste.c:448
+#, fuzzy
+msgid "'decimal.mark' must be a string of one character"
+msgstr "'dec' doit �tre un seul caract�re"
+
+#: src/main/paste.c:579
 msgid "Impossible mode ( x )"
 msgstr "Mode impossible ( x )"
 
-#: src/main/paste.c:645
+#: src/main/paste.c:663
 msgid "atomic vector arguments only"
 msgstr "arguments vectoriels atomiques uniquement"
 
@@ -4728,215 +4825,198 @@ msgstr "arguments vectoriels atomiques uniquement"
 msgid "invalid filename specification"
 msgstr "choix de nom de fichier incorrect"
 
-#: src/main/platform.c:375 src/main/platform.c:419
+#: src/main/platform.c:375 src/main/platform.c:420
 msgid "write error during file append"
 msgstr "erreur en �criture lors de l'ajout a un fichier"
 
-#: src/main/platform.c:394
+#: src/main/platform.c:395
 msgid "nothing to append to"
 msgstr "rien � ajouter �"
 
-#: src/main/platform.c:448 src/main/platform.c:795
+#: src/main/platform.c:449 src/main/platform.c:797 src/main/platform.c:979
 msgid "invalid filename argument"
 msgstr "argument 'filename' incorrect"
 
-#: src/main/platform.c:460
+#: src/main/platform.c:461
 #, c-format
 msgid "cannot create file '%s', reason '%s'"
 msgstr "impossible de cr�er le fichier '%s', � cause de '%s'"
 
-#: src/main/platform.c:475 src/main/platform.c:545 src/main/platform.c:627
+#: src/main/platform.c:476 src/main/platform.c:546 src/main/platform.c:629
 msgid "invalid first filename"
 msgstr "premier nom de fichier incorrect"
 
-#: src/main/platform.c:487
+#: src/main/platform.c:488
 #, c-format
 msgid "cannot remove file '%s', reason '%s'"
 msgstr "impossible d'effacer le fichier '%s', � cause de '%s'"
 
-#: src/main/platform.c:547 src/main/platform.c:629
+#: src/main/platform.c:548 src/main/platform.c:631
 msgid "invalid second filename"
 msgstr "second nom de fichier incorrect"
 
-#: src/main/platform.c:549 src/main/platform.c:631
+#: src/main/platform.c:551 src/main/platform.c:634
 msgid "nothing to link"
 msgstr "rien � lier"
 
-#: src/main/platform.c:559
+#: src/main/platform.c:561
 msgid "symbolic links are not supported on this version of Windows"
 msgstr ""
 "les liens symboliques ne sont pas support�s sur cette version de Windows"
 
-#: src/main/platform.c:581
+#: src/main/platform.c:583
 #, c-format
 msgid "cannot symlink '%ls' to '%ls', reason '%s'"
 msgstr ""
 "impossible de cr�er un lien symbolique de '%ls' vers '%ls', � cause de '%s'"
 
-#: src/main/platform.c:601
+#: src/main/platform.c:603
 #, c-format
 msgid "cannot symlink '%s' to '%s', reason '%s'"
 msgstr ""
 "impossible de cr�er un lien symbolique de '%s' vers '%s', � cause de '%s'"
 
-#: src/main/platform.c:609
+#: src/main/platform.c:611
 msgid "symbolic links are not supported on this platform"
 msgstr "les liens symboliques ne sont pas support�s sur cette plateforme"
 
-#: src/main/platform.c:649
+#: src/main/platform.c:652
 #, c-format
 msgid "cannot link '%ls' to '%ls', reason '%s'"
 msgstr ""
 "impossible de cr�er un lien symbolique de '%ls' vers '%ls', � cause de '%s'"
 
-#: src/main/platform.c:669
+#: src/main/platform.c:672
 #, c-format
 msgid "cannot link '%s' to '%s', reason '%s'"
 msgstr ""
 "impossible de cr�er un lien symbolique de '%s' vers '%s', � cause de '%s'"
 
-#: src/main/platform.c:678
+#: src/main/platform.c:681
 msgid "(hard) links are not supported on this platform"
 msgstr "les liens mat�riels ne sont pas support�s sur cette architecture"
 
-#: src/main/platform.c:709
+#: src/main/platform.c:713
 msgid "'from' and 'to' are of different lengths"
 msgstr "'from' et 'to' sont de longueurs diff�rentes"
 
-#: src/main/platform.c:720 src/main/platform.c:730
+#: src/main/platform.c:724 src/main/platform.c:734
 msgid "expanded 'from' name too long"
 msgstr "nom de 'from' expans� trop long"
 
-#: src/main/platform.c:724 src/main/platform.c:734
+#: src/main/platform.c:728 src/main/platform.c:738
 msgid "expanded 'to' name too long"
 msgstr "nom de 'to' expans� trop long"
 
-#: src/main/platform.c:738
+#: src/main/platform.c:742
 #, c-format
 msgid "cannot rename file '%s' to '%s', reason '%s'"
 msgstr "impossible de renommer le fichier '%s' en '%s', � cause de '%s'"
 
-#: src/main/platform.c:1094
+#: src/main/platform.c:1168
 msgid "invalid 'pattern' regular expression"
 msgstr "expression r�guli�re 'pattern' incorrecte"
 
-#: src/main/platform.c:1211
+#: src/main/platform.c:1285
 msgid "unable to determine R home location"
 msgstr "incapable de localiser R home"
 
-#: src/main/platform.c:1263
+#: src/main/platform.c:1338
 msgid "file name too long"
 msgstr "nom de fichier trop long"
 
-#: src/main/platform.c:1511 src/main/platform.c:1558 src/main/sysutils.c:1850
-#: src/main/sysutils.c:1864
+#: src/main/platform.c:1586 src/main/platform.c:1633 src/main/sysutils.c:1806
+#: src/main/sysutils.c:1820
 msgid "internal out-of-memory condition"
 msgstr "condition interne, plus de m�moire disponible"
 
-#: src/main/platform.c:1554 src/main/sysutils.c:1860
+#: src/main/platform.c:1629 src/main/sysutils.c:1816
 #, c-format
 msgid "read error on '%s'"
 msgstr "erreur de lecture sur '%s'"
 
-#: src/main/platform.c:1722
+#: src/main/platform.c:1728
 msgid "setting 'LC_NUMERIC' may cause R to function strangely"
 msgstr "changer 'LC_NUMERIC' peut r�sulter en un fonctionnement �trange de R"
 
-#: src/main/platform.c:1736
+#: src/main/platform.c:1742
 msgid "LC_MESSAGES exists on Windows but is not operational"
 msgstr "LC_MESSAGES existe sous Windows mais n'y est pas op�rationel"
 
-#: src/main/platform.c:1763
+#: src/main/platform.c:1769
 #, c-format
 msgid "OS reports request to set locale to \"%s\" cannot be honored"
 msgstr ""
 "la requ�te OS pour sp�cifier la localisation � \"%s\" n'a pas pu �tre honor�e"
 
-#: src/main/platform.c:2065
-msgid "'hostname' must be a character vector of length 1"
-msgstr "'hostname' doit �tre un vecteur de caract�res de longueur 1"
-
-#: src/main/platform.c:2071
-#, c-format
-msgid "nsl() was unable to resolve host '%s'"
-msgstr "nsl() est incapable de r�soudre le nom de la machine hote '%s'"
-
-#: src/main/platform.c:2078
-msgid "unknown format returned by C function 'gethostbyname'"
-msgstr "format inconnu renvoy� par la fonction C 'gethostbyname'"
-
-#: src/main/platform.c:2087
-msgid "nsl() is not supported on this platform"
-msgstr "nsl() ne fonctionne pas sur cette architecture"
-
-#: src/main/platform.c:2158
+#: src/main/platform.c:2131
 #, c-format
 msgid "'%s' already exists"
 msgstr "'%s' existe d�j�"
 
-#: src/main/platform.c:2161
+#: src/main/platform.c:2134
 #, c-format
 msgid "cannot create dir '%s', reason '%s'"
 msgstr "impossible de cr�er le r�pertoire '%s', � cause de '%s'"
 
-#: src/main/platform.c:2207
+#: src/main/platform.c:2181
 #, c-format
 msgid "'%ls' already exists"
 msgstr "'%ls' existe d�j�"
 
-#: src/main/platform.c:2211
+#: src/main/platform.c:2183 src/main/platform.c:2189
 #, c-format
 msgid "cannot create dir '%ls', reason '%s'"
 msgstr "impossible de cr�er le r�pertoire '%ls', � cause de '%s'"
 
-#: src/main/platform.c:2245 src/main/platform.c:2449
+#: src/main/platform.c:2223 src/main/platform.c:2435
 msgid "too deep nesting"
 msgstr "imbrication trop profonde"
 
-#: src/main/platform.c:2253 src/main/platform.c:2266 src/main/platform.c:2284
+#: src/main/platform.c:2231 src/main/platform.c:2244 src/main/platform.c:2262
 msgid "over-long path"
 msgstr "chemin trop long"
 
-#: src/main/platform.c:2273
+#: src/main/platform.c:2251
 #, c-format
 msgid "problem creating directory %ls: %s"
 msgstr "probl�me lors de la cr�ation du r�pertoire %ls: %s"
 
-#: src/main/platform.c:2293
+#: src/main/platform.c:2271
 #, c-format
 msgid "problem reading dir %ls: %s"
 msgstr "probl�me lors de la lecture du r�pertoire %ls: %s"
 
-#: src/main/platform.c:2304 src/main/platform.c:2465 src/main/platform.c:2478
-#: src/main/platform.c:2498 src/main/platform.c:2520
+#: src/main/platform.c:2282 src/main/platform.c:2451 src/main/platform.c:2464
+#: src/main/platform.c:2484 src/main/platform.c:2506
 msgid "over-long path length"
 msgstr "chemin trop long"
 
-#: src/main/platform.c:2312
+#: src/main/platform.c:2290
 #, c-format
 msgid "problem copying %ls to %ls: %s"
 msgstr "probl�me lors de la copie de %ls vers %ls: %s"
 
-#: src/main/platform.c:2487
+#: src/main/platform.c:2473
 #, c-format
 msgid "problem creating directory %s: %s"
 msgstr "probl�me lors de la cr�ation du r�pertoire %s: %s"
 
-#: src/main/platform.c:2507
+#: src/main/platform.c:2493
 #, c-format
 msgid "problem reading directory %s: %s"
 msgstr "probl�me lors de la lecture du r�pertoire %s: %s"
 
-#: src/main/platform.c:2529
+#: src/main/platform.c:2515
 #, c-format
 msgid "problem copying %s to %s: %s"
 msgstr "probl�me lors de la copie de %s vers %s: %s"
 
-#: src/main/platform.c:2662
+#: src/main/platform.c:2653
 msgid "'mode' must be of length at least one"
 msgstr "'mode' doit �tre de longueur unitaire ou plus"
 
-#: src/main/platform.c:2729
+#: src/main/platform.c:2720
 msgid "insufficient OS support on this platform"
 msgstr "support de l'OS insuffisant sur cette plateforme"
 
@@ -4957,93 +5037,98 @@ msgstr "toutes les valeurs z sont NA"
 msgid "invalid math style encountered"
 msgstr "style math incorrect rencontr�"
 
-#: src/main/plotmath.c:1261 src/main/plotmath.c:1366 src/main/plotmath.c:2664
+#: src/main/plotmath.c:1260 src/main/plotmath.c:1365 src/main/plotmath.c:2654
 msgid "invalid mathematical annotation"
 msgstr "annotation math�matique incorrecte"
 
-#: src/main/plotmath.c:1670
+#: src/main/plotmath.c:1669
 msgid "invalid accent"
 msgstr "accent incorrect"
 
-#: src/main/plotmath.c:1964
+#: src/main/plotmath.c:1963
 msgid "invalid group delimiter"
 msgstr "d�limitateur de groupes incorrect"
 
-#: src/main/plotmath.c:1991 src/main/plotmath.c:2137
+#: src/main/plotmath.c:1990 src/main/plotmath.c:2127
 msgid "invalid group specification"
 msgstr "sp�cification de groupes incorrecte"
 
-#: src/main/plotmath.c:2062
+#: src/main/plotmath.c:2052
 msgid "group is incomplete"
 msgstr "groupe incomplet"
 
-#: src/main/plotmath.c:3190
+#: src/main/plotmath.c:3180
 msgid "Metric information not available for this family/device"
 msgstr "Information de m�trique indisponible pour cette famille / p�riph�rique"
 
-#: src/main/print.c:148 src/main/print.c:254
+#: src/main/print.c:140 src/main/print.c:247
 msgid "invalid 'na.print' specification"
 msgstr "choix de 'na.print' incorrect"
 
-#: src/main/print.c:157
+#: src/main/print.c:149
 msgid "invalid row labels"
 msgstr "�tiquettes de lignes incorrectes"
 
-#: src/main/print.c:159
+#: src/main/print.c:151
 msgid "invalid column labels"
 msgstr "�tiquettes de colonne incorrectes"
 
-#: src/main/print.c:183
+#: src/main/print.c:176
 msgid "non-function argument to .Internal(print.function(.))"
 msgstr ""
 "l'argument pass� � la fonction .Internal(print.function(.)) n'est pas une "
 "fonction"
 
-#: src/main/print.c:264
+#: src/main/print.c:257
 msgid "'gap' must be non-negative integer"
 msgstr "'gap' doit �tre un entier positif ou nul"
 
-#: src/main/print.c:289
+#: src/main/print.c:282
 msgid "invalid 'tryS4' internal argument"
 msgstr "argument interne 'tryS4' incorrect"
 
-#: src/main/print.c:1028
+#: src/main/print.c:851
+#, fuzzy
+msgid "print buffer overflow"
+msgstr "d�bordement vers le haut du tampon d'entr�e � la ligne %d"
+
+#: src/main/print.c:1043
 msgid "invalid character length in 'dblepr'"
 msgstr "taille de caract�re incorrecte dans 'dblepr'"
 
-#: src/main/print.c:1046
+#: src/main/print.c:1061
 msgid "invalid character length in 'intpr'"
 msgstr "taille de caract�re incorrecte dans 'intpr'"
 
-#: src/main/print.c:1065
+#: src/main/print.c:1080
 msgid "invalid character length in 'realpr'"
 msgstr "taille de caract�re incorrecte dans 'realpr'"
 
-#: src/main/print.c:1075
+#: src/main/print.c:1090
 msgid "memory allocation error in 'realpr'"
 msgstr "erreur d'affectation m�moire dans 'realpr'"
 
-#: src/main/print.c:1091
+#: src/main/print.c:1106
 #, c-format
 msgid "BLAS/LAPACK routine '%6s' gave error code %d"
 msgstr "la proc�dure BLAS/LAPACK '%6s' a produit le code d'erreur %d"
 
-#: src/main/printarray.c:453
+#: src/main/printarray.c:332
 msgid "too few row labels"
 msgstr "trop peu d'�tiquettes de lignes"
 
-#: src/main/printarray.c:455
+#: src/main/printarray.c:334
 msgid "too few column labels"
 msgstr "trop peu d'�tiquettes de colonnes"
 
-#: src/main/printarray.c:489
+#: src/main/printarray.c:368
 #, c-format
 msgid " [ reached getOption(\"max.print\") -- omitted %d row ]\n"
 msgid_plural " [ reached getOption(\"max.print\") -- omitted %d rows ]\n"
 msgstr[0] " [ getOption(\"max.print\") est atteint -- ligne %d omise ]\n"
 msgstr[1] " [ getOption(\"max.print\") est atteint -- %d lignes omises ]\n"
 
-#: src/main/printutils.c:613
+#: src/main/printutils.c:710
 msgid "it is not known that wchar_t is Unicode on this platform"
 msgstr "wchar_t ne devrait pas �tre Unicode sur cette plateforme"
 
@@ -5051,47 +5136,48 @@ msgstr "wchar_t ne devrait pas 
 msgid "argument is not a numeric vector"
 msgstr "l'argument n'est pas un vecteur num�rique"
 
-#: src/main/random.c:37
+#: src/main/random.c:39
 msgid "invalid arguments"
 msgstr "arguments incorrects"
 
-#: src/main/random.c:93 src/main/random.c:110 src/main/random.c:175
-#: src/main/random.c:201 src/main/random.c:274 src/main/random.c:288
+#: src/main/random.c:95 src/main/random.c:112 src/main/random.c:178
+#: src/main/random.c:204 src/main/random.c:277 src/main/random.c:291
 msgid "NAs produced"
 msgstr "production de NAs"
 
-#: src/main/random.c:445
+#: src/main/random.c:438
 msgid "NA in probability vector"
 msgstr "NA dans le vecteur de probabilit�s"
 
-#: src/main/random.c:447
-msgid "non-positive probability"
+#: src/main/random.c:440
+#, fuzzy
+msgid "negative probability"
 msgstr "probabilit� n�gative ou nulle"
 
-#: src/main/random.c:454
+#: src/main/random.c:447
 msgid "too few positive probabilities"
 msgstr "trop peu de probabilit�s strictement positives"
 
-#: src/main/random.c:491 src/main/random.c:519
+#: src/main/random.c:483 src/main/random.c:511
 msgid "cannot take a sample larger than the population when 'replace = FALSE'"
 msgstr ""
 "impossible de prendre un �chantillon plus grand que la population lorsque "
 "'replace = FALSE'"
 
-#: src/main/random.c:498
+#: src/main/random.c:490
 msgid "incorrect number of probabilities"
 msgstr "nombre de probabilit�s incorrect"
 
-#: src/main/random.c:537
+#: src/main/random.c:529
 msgid "n >= 2^31, replace = FALSE is only supported on 64-bit platforms"
 msgstr ""
 "n >= 2^31, replace = FALSE est seulement support� sur des plateformes 64-bit"
 
-#: src/main/raw.c:37 src/main/raw.c:273
+#: src/main/raw.c:37 src/main/raw.c:277
 msgid "argument must be a character vector of length 1"
 msgstr "l'argument doit �tre un vecteur de caract�res de longueur 1"
 
-#: src/main/raw.c:39 src/main/raw.c:275
+#: src/main/raw.c:39 src/main/raw.c:279
 msgid ""
 "argument should be a character vector of length 1\n"
 "all but the first element will be ignored"
@@ -5099,308 +5185,306 @@ msgstr ""
 "l'argument doit �tre une cha�ne de caract�res de longueur 1\n"
 "seul le premier �l�ment est utilis�"
 
-#: src/main/raw.c:53 src/main/raw.c:89 src/main/raw.c:110
+#: src/main/raw.c:53 src/main/raw.c:90 src/main/raw.c:113
 msgid "argument 'x' must be a raw vector"
 msgstr "l'argument 'x' doit �tre un vecteur raw"
 
-#: src/main/raw.c:56 src/main/raw.c:330
+#: src/main/raw.c:56 src/main/raw.c:336
 msgid "argument 'multiple' must be TRUE or FALSE"
 msgstr "l'argument 'multiple' doit �tre TRUE ou FALSE"
 
-#: src/main/raw.c:91
+#: src/main/raw.c:92
 msgid "argument 'shift' must be a small integer"
 msgstr "l'argument 'shift' doit �tre un petit entier"
 
-#: src/main/raw.c:129 src/main/raw.c:327
+#: src/main/raw.c:133 src/main/raw.c:333
 msgid "argument 'x' must be an integer vector"
 msgstr "l'argument 'x' doit �tre un vecteur d'entiers"
 
-#: src/main/raw.c:148
+#: src/main/raw.c:153
 msgid "argument 'x' must be raw, integer or logical"
 msgstr "l'argument 'x' doit �tre raw, entier ou de type logique"
 
-#: src/main/raw.c:150
-msgid "argument 'type' must be a character string"
-msgstr "l'argument 'type' doit �tre une cha�ne de caract�res"
-
-#: src/main/raw.c:154
+#: src/main/raw.c:159
 #, c-format
 msgid "argument 'x' must be a multiple of %d long"
 msgstr "l'argument 'x' doit �tre un multiple de %d long"
 
-#: src/main/raw.c:167 src/main/raw.c:181
+#: src/main/raw.c:172 src/main/raw.c:186
 msgid "argument 'x' must not contain NAs"
 msgstr "l'argument 'x' ne peut contenir de NAs"
 
-#: src/main/raw.c:285
+#: src/main/raw.c:291
 msgid "invalid UTF-8 string"
 msgstr "cha�ne de charact�res UTF-8 incorrecte"
 
-#: src/main/relop.c:202
+#: src/main/relop.c:196
 #, c-format
 msgid "comparison (%d) is possible only for atomic and list types"
 msgstr "comparaison (%d) possible seulement pour les types liste et atomique"
 
-#: src/main/relop.c:207
+#: src/main/relop.c:201
 msgid "comparison is not allowed for expressions"
 msgstr "comparaison interdite pour les expressions"
 
-#: src/main/relop.c:296
+#: src/main/relop.c:293
 msgid "comparison of these types is not implemented"
 msgstr "comparaison de ces types non impl�ment�e"
 
-#: src/main/relop.c:509
+#: src/main/relop.c:425
 msgid "invalid comparison with complex values"
 msgstr "comparaison incorrecte pour des valeurs complexes"
 
-#: src/main/relop.c:767
+#: src/main/relop.c:683
 msgid "'a' and 'b' must have the same type"
 msgstr "'a' et 'b' doivent �tre de m�me type"
 
-#: src/main/saveload.c:200 src/main/saveload.c:205 src/main/saveload.c:214
-#: src/main/saveload.c:223 src/main/saveload.c:232 src/main/saveload.c:241
-#: src/main/saveload.c:245 src/main/saveload.c:254 src/main/saveload.c:1381
-#: src/main/saveload.c:1386 src/main/saveload.c:1430 src/main/saveload.c:1498
-#: src/main/saveload.c:1507 src/main/serialize.c:331 src/main/serialize.c:338
-#: src/main/serialize.c:2388 src/main/serialize.c:2396
+#: src/main/saveload.c:202 src/main/saveload.c:207 src/main/saveload.c:216
+#: src/main/saveload.c:225 src/main/saveload.c:234 src/main/saveload.c:243
+#: src/main/saveload.c:247 src/main/saveload.c:256 src/main/saveload.c:1383
+#: src/main/saveload.c:1388 src/main/saveload.c:1432 src/main/saveload.c:1500
+#: src/main/saveload.c:1509 src/main/serialize.c:354 src/main/serialize.c:361
+#: src/main/serialize.c:374 src/main/serialize.c:378 src/main/serialize.c:405
+#: src/main/serialize.c:421 src/main/serialize.c:2429
+#: src/main/serialize.c:2437
 msgid "read error"
 msgstr "erreur de lecture"
 
-#: src/main/saveload.c:332
+#: src/main/saveload.c:334
 msgid "a I read error occurred"
 msgstr "erreur de lecture I"
 
-#: src/main/saveload.c:342
+#: src/main/saveload.c:344
 msgid "a R read error occurred"
 msgstr "erreur de lecture R"
 
-#: src/main/saveload.c:352
+#: src/main/saveload.c:354
 msgid "a C read error occurred"
 msgstr "erreur de lecture C"
 
-#: src/main/saveload.c:362
+#: src/main/saveload.c:364
 msgid "a S read error occurred"
 msgstr "erreur de lecture S"
 
-#: src/main/saveload.c:387 src/main/saveload.c:395 src/main/saveload.c:403
-#: src/main/saveload.c:1594 src/main/saveload.c:1602
+#: src/main/saveload.c:389 src/main/saveload.c:397 src/main/saveload.c:405
+#: src/main/saveload.c:1596 src/main/saveload.c:1604
 msgid "a read error occurred"
 msgstr "erreur de lecture"
 
-#: src/main/saveload.c:467
+#: src/main/saveload.c:469
 msgid "unresolved node during restore"
 msgstr "noeud non r�solu pendant la restauration"
 
-#: src/main/saveload.c:488
+#: src/main/saveload.c:490
 #, c-format
 msgid "restore compatibility error - no version %d compatibility"
 msgstr ""
 "erreur de compatibilit� de restauration - absence de compatibilit� avec la "
 "version %d"
 
-#: src/main/saveload.c:572 src/main/saveload.c:645
+#: src/main/saveload.c:574 src/main/saveload.c:647
 msgid "bad SEXP type in data file"
 msgstr "mauvais type SEXP dans le fichier de donn�es"
 
-#: src/main/saveload.c:586
+#: src/main/saveload.c:588
 msgid "mismatch on types"
 msgstr "incoh�rence de types"
 
-#: src/main/saveload.c:607 src/main/saveload.c:1270 src/main/serialize.c:1636
+#: src/main/saveload.c:609 src/main/saveload.c:1272 src/main/serialize.c:1675
 #, c-format
 msgid "unrecognized internal function name \"%s\""
 msgstr "impossible de trouver le nom de la fonction interne \"%s\""
 
-#: src/main/saveload.c:709
+#: src/main/saveload.c:711
 msgid "cannot save file position while restoring data"
 msgstr ""
 "impossible de sauvegarder la position dans le fichier lors de la "
 "restauration des donn�es"
 
-#: src/main/saveload.c:722
+#: src/main/saveload.c:724
 msgid "cannot restore file position while restoring data"
 msgstr ""
 "impossible de restaurer la position dans le fichier lors de la restauration "
 "des donn�es"
 
-#: src/main/saveload.c:915
+#: src/main/saveload.c:917
 msgid "base namespace is not preserved in version 1 workspaces"
 msgstr ""
 "espace de noms de base perdu dans la version 1 des environnements de travail"
 
-#: src/main/saveload.c:917
+#: src/main/saveload.c:919
 msgid "cannot save namespace in version 1 workspaces"
 msgstr ""
 "sauvegarde impossible des espaces de nom dans la version 1 des "
 "environnements de travail"
 
-#: src/main/saveload.c:919
+#: src/main/saveload.c:921
 msgid ""
 "cannot save environment with locked/active bindings in version 1 workspaces"
 msgstr ""
 "sauvegarde impossible de l'environnement avec des liens verrouill�s / actifs "
 "dans la version 1 des environnements de travail"
 
-#: src/main/saveload.c:943
+#: src/main/saveload.c:945
 msgid "cannot save weak references in version 1 workspaces"
 msgstr ""
 "sauvegarde impossible des r�f�rences l�g�res dans la version 1 des "
 "environnements de travail"
 
-#: src/main/saveload.c:1021
+#: src/main/saveload.c:1023
 msgid "NewWriteVec called with non-vector type"
 msgstr "NewWriteVec appel� avec un type non vectoriel"
 
-#: src/main/saveload.c:1084
+#: src/main/saveload.c:1086
 msgid "cannot save byte code objects in version 1 workspaces"
 msgstr ""
 "impossible de sauvegarder les objets en pseudo-code dans la version 1 des "
 "environnements de travail"
 
-#: src/main/saveload.c:1086
+#: src/main/saveload.c:1088
 #, c-format
 msgid "NewWriteItem: unknown type %i"
 msgstr "NewWriteItem : type %i inconnu"
 
-#: src/main/saveload.c:1216
+#: src/main/saveload.c:1218
 msgid "NewReadVec called with non-vector type"
 msgstr "NewReadVec appel� avec un type non vectoriel"
 
-#: src/main/saveload.c:1286
+#: src/main/saveload.c:1288
 msgid "cannot read byte code objects from version 1 workspaces"
 msgstr ""
 "lecture d'objets en pseudo-code impossible depuis la version 1 des "
 "environnements de travail"
 
-#: src/main/saveload.c:1288
+#: src/main/saveload.c:1290
 #, c-format
 msgid "NewReadItem: unknown type %i"
 msgstr "NewReadItem : type %i inconnu"
 
-#: src/main/saveload.c:1440
+#: src/main/saveload.c:1442
 msgid "out of memory reading ascii string"
 msgstr "m�moire satur�e en lisant une cha�ne ascii"
 
-#: src/main/saveload.c:1565
+#: src/main/saveload.c:1567
 msgid "a binary read error occurred"
 msgstr "erreur de lecture binaire"
 
-#: src/main/saveload.c:1580 src/main/saveload.c:1681
+#: src/main/saveload.c:1582 src/main/saveload.c:1683
 msgid "out of memory reading binary string"
 msgstr "m�moire satur�e en lisant une cha�ne binaire"
 
-#: src/main/saveload.c:1585
+#: src/main/saveload.c:1587
 msgid "a binary string read error occurred"
 msgstr "erreur de lecture d'une cha�ne binaire"
 
-#: src/main/saveload.c:1645
+#: src/main/saveload.c:1647
 msgid "an xdr integer data write error occurred"
 msgstr "erreur xdr d'�criture de donn�es d'entiers"
 
-#: src/main/saveload.c:1652
+#: src/main/saveload.c:1654
 msgid "an xdr integer data read error occurred"
 msgstr "erreur xdr de lecture de donn�es d'entiers"
 
-#: src/main/saveload.c:1667 src/main/saveload.c:1686
+#: src/main/saveload.c:1669 src/main/saveload.c:1688
 msgid "an xdr string data write error occurred"
 msgstr "erreur xdr d'�criture de donn�es cha�nes de caract�res"
 
-#: src/main/saveload.c:1694
+#: src/main/saveload.c:1696
 msgid "an xdr real data write error occurred"
 msgstr "erreur xdr d'�criture de donn�es de r�els"
 
-#: src/main/saveload.c:1701
+#: src/main/saveload.c:1703
 msgid "an xdr real data read error occurred"
 msgstr "erreur xdr de lecture de donn�es de r�els"
 
-#: src/main/saveload.c:1708
+#: src/main/saveload.c:1710
 msgid "an xdr complex data write error occurred"
 msgstr "erreur xdr d'�criture de donn�es de complexes"
 
-#: src/main/saveload.c:1715
+#: src/main/saveload.c:1717
 msgid "an xdr complex data read error occurred"
 msgstr "erreur xdr de lecture de donn�es de complexes"
 
-#: src/main/saveload.c:1783 src/main/serialize.c:1958
-#: src/main/serialize.c:2568 src/modules/internet/internet.c:351
-#: src/modules/internet/internet.c:409 src/modules/internet/internet.c:514
+#: src/main/saveload.c:1785 src/main/serialize.c:1997
+#: src/main/serialize.c:2614 src/modules/internet/internet.c:514
+#: src/modules/internet/internet.c:590 src/modules/internet/internet.c:701
 msgid "write failed"
 msgstr "�chec d'�criture"
 
-#: src/main/saveload.c:1910
+#: src/main/saveload.c:1912
 msgid "restore file may be empty -- no data loaded"
 msgstr "fichier de restauration peut-�tre vide -- aucune donn�e charg�e"
 
-#: src/main/saveload.c:1912
+#: src/main/saveload.c:1914
 msgid "restore file may be from a newer version of R -- no data loaded"
 msgstr ""
 "fichier de restauration peut-�tre d'une version plus r�cente de R -- aucune "
 "donn�e charg�e"
 
-#: src/main/saveload.c:1914
+#: src/main/saveload.c:1916
 msgid "bad restore file magic number (file may be corrupted) -- no data loaded"
 msgstr ""
 "mauvais num�ro magique de restauration de fichier (le fichier est peut �tre "
 "corrompu) -- aucune donn�e charg�e"
 
-#: src/main/saveload.c:1940 src/main/saveload.c:2238
+#: src/main/saveload.c:1942 src/main/saveload.c:2240
 msgid "first argument must be a character vector"
 msgstr "le premier argument doit �tre un vecteur de caract�res"
 
-#: src/main/saveload.c:2012
+#: src/main/saveload.c:2014
 msgid "not a valid named list"
 msgstr "liste nomm�e incorrecte"
 
-#: src/main/saveload.c:2019 src/main/saveload.c:2040
+#: src/main/saveload.c:2021 src/main/saveload.c:2042
 #, c-format
 msgid "'%s' looks like a pre-2.4.0 S4 object: please recreate it"
 msgstr ""
 "'%s' semble �tre un objet S4 ant�rieur � la version 2.4.0 : veuillez le "
 "recr�er"
 
-#: src/main/saveload.c:2027
+#: src/main/saveload.c:2029
 msgid "loaded data is not in pair list form"
 msgstr "les donn�es charg�es ne sont pas sous forme de listes appari�es"
 
-#: src/main/saveload.c:2063
+#: src/main/saveload.c:2065
 msgid "first argument must be a file name"
 msgstr "le premier argument doit �tre un nom de fichier"
 
-#: src/main/saveload.c:2108 src/main/saveload.c:2134 src/main/serialize.c:826
-#: src/main/serialize.c:863 src/main/serialize.c:901
+#: src/main/saveload.c:2110 src/main/saveload.c:2136 src/main/serialize.c:864
+#: src/main/serialize.c:901 src/main/serialize.c:939
 msgid "XDR write failed"
 msgstr "�chec d'�criture XDR"
 
-#: src/main/saveload.c:2121 src/main/saveload.c:2146 src/main/serialize.c:1362
-#: src/main/serialize.c:1398 src/main/serialize.c:1436
+#: src/main/saveload.c:2123 src/main/saveload.c:2148 src/main/serialize.c:1400
+#: src/main/serialize.c:1436 src/main/serialize.c:1474
 msgid "XDR read failed"
 msgstr "�chec de lecture XDR"
 
-#: src/main/saveload.c:2157
+#: src/main/saveload.c:2159
 #, c-format
 msgid "cannot save data -- unable to open '%s': %s"
 msgstr "impossible de sauvegarder les donn�es -- impossible d'ouvrir %s : %s"
 
-#: src/main/saveload.c:2254 src/main/serialize.c:2161
+#: src/main/saveload.c:2256 src/main/serialize.c:2202
 #, c-format
 msgid "cannot save to connections in version %d format"
 msgstr "sauvegarde impossible vers des connexions de version de format %d"
 
-#: src/main/saveload.c:2277 src/main/serialize.c:2186
+#: src/main/saveload.c:2279 src/main/serialize.c:2227
 msgid "connection not open for writing"
 msgstr "connexion non ouverte en �criture"
 
-#: src/main/saveload.c:2285
+#: src/main/saveload.c:2288
 msgid "cannot save XDR format to a text-mode connection"
 msgstr "sauvegarde impossible en format XDR vers une connexion en mode texte"
 
-#: src/main/saveload.c:2295 src/main/serialize.c:2066
-#: src/main/serialize.c:2080 src/main/serialize.c:2262
-#: src/main/serialize.c:2284
+#: src/main/saveload.c:2298 src/main/serialize.c:2105
+#: src/main/serialize.c:2119 src/main/serialize.c:2303
+#: src/main/serialize.c:2325
 msgid "error writing to connection"
 msgstr "erreur d'�criture vers la connexion"
 
-#: src/main/saveload.c:2359 src/main/serialize.c:2234
+#: src/main/saveload.c:2359 src/main/serialize.c:2275
 msgid "connection not open for reading"
 msgstr "connexion non ouverte en lecture"
 
@@ -5429,7 +5513,7 @@ msgstr "Fin de fichier (EOF) dans une cha
 msgid "scan() expected '%s', got '%s'"
 msgstr "scan() attendait '%s' et a re�u '%s'"
 
-#: src/main/scan.c:585 src/main/scan.c:732
+#: src/main/scan.c:585 src/main/scan.c:735
 msgid "too many items"
 msgstr "trop d'�l�ments"
 
@@ -5437,7 +5521,7 @@ msgstr "trop d'
 msgid "empty 'what' specified"
 msgstr "'what' fourni vide"
 
-#: src/main/scan.c:722
+#: src/main/scan.c:725
 #, c-format
 msgid "line %d did not have %d elements"
 msgstr "la ligne %d n'avait pas %d �l�ments"
@@ -5466,151 +5550,153 @@ msgstr "s
 msgid "invalid quote symbol set"
 msgstr "symbole de cha�ne de caract�res incorrect"
 
-#: src/main/scan.c:987
+#: src/main/scan.c:988
 msgid "embedded nul(s) found in input"
 msgstr "caract�re(s) 'nul' au milieu de l'entr�e"
 
-#: src/main/seq.c:48
+#: src/main/seq.c:49
 msgid "unequal factor lengths"
 msgstr "tailles de variables facteur in�gales"
 
-#: src/main/seq.c:100
+#: src/main/seq.c:101
 msgid "result would be too long a vector"
 msgstr "le r�sultat serait un vecteur trop long"
 
-#: src/main/seq.c:159
+#: src/main/seq.c:160
 msgid "argument of length 0"
 msgstr "l'argument est de longueur nulle"
 
-#: src/main/seq.c:161 src/main/seq.c:163
-#, c-format
-msgid "numerical expression has %d elements: only the first used"
-msgstr "l'expression num�rique a %d �l�ments : seul le premier est utilis�"
+#: src/main/seq.c:163 src/main/seq.c:168
+#, fuzzy, c-format
+msgid "numerical expression has %d element: only the first used"
+msgid_plural "numerical expression has %d elements: only the first used"
+msgstr[0] "l'expression num�rique a %d �l�ments : seul le premier est utilis�"
+msgstr[1] "l'expression num�rique a %d �l�ments : seul le premier est utilis�"
 
-#: src/main/seq.c:167
+#: src/main/seq.c:174
 msgid "NA/NaN argument"
 msgstr "argument NA / NaN"
 
-#: src/main/seq.c:331
+#: src/main/seq.c:333
 msgid "incorrect type for second argument"
 msgstr "type incorrect pour le second argument"
 
-#: src/main/seq.c:334
+#: src/main/seq.c:336
 #, c-format
 msgid "attempt to replicate an object of type '%s'"
 msgstr "tentative de dupliquer un objet de type '%s'"
 
-#: src/main/seq.c:387
+#: src/main/seq.c:393
 msgid "attempt to replicate non-vector"
 msgstr "tentative de dupliquer autre chose qu'un vecteur"
 
-#: src/main/seq.c:403
+#: src/main/seq.c:409
 msgid "cannot replicate NULL to a non-zero length"
 msgstr "impossible de r�pliquer NULL vers une longueur non nulle"
 
-#: src/main/seq.c:626 src/main/seq.c:633 src/main/seq.c:768 src/main/seq.c:979
+#: src/main/seq.c:630 src/main/seq.c:637 src/main/seq.c:766 src/main/seq.c:977
 #, c-format
 msgid "first element used of '%s' argument"
 msgstr "seul le premier �l�ment de l'argument '%s' est utilis�"
 
-#: src/main/seq.c:766
+#: src/main/seq.c:764
 msgid "'length.out' must be a non-negative number"
 msgstr "'length.out' doit �tre un entier positif ou nul"
 
-#: src/main/seq.c:790 src/main/seq.c:856 src/main/seq.c:873
+#: src/main/seq.c:788 src/main/seq.c:854 src/main/seq.c:871
 msgid "'from' must be finite"
 msgstr "'from' doit �tre fini"
 
-#: src/main/seq.c:792 src/main/seq.c:858 src/main/seq.c:895
+#: src/main/seq.c:790 src/main/seq.c:856 src/main/seq.c:893
 msgid "'to' must be finite"
 msgstr "'to' doit �tre fini"
 
-#: src/main/seq.c:804
+#: src/main/seq.c:802
 msgid "invalid '(to - from)/by' in 'seq'"
 msgstr "'(to - from)/by' incorrect dans 'seq'"
 
-#: src/main/seq.c:816
+#: src/main/seq.c:814
 msgid "'by' argument is much too small"
 msgstr "argument 'by' bien trop petit"
 
-#: src/main/seq.c:818
+#: src/main/seq.c:816
 msgid "wrong sign in 'by' argument"
 msgstr "signe incorrect pour l'argument 'by'"
 
-#: src/main/seq.c:875 src/main/seq.c:897
+#: src/main/seq.c:873 src/main/seq.c:895
 msgid "'by' must be finite"
 msgstr "'by' doit �tre fini"
 
-#: src/main/seq.c:985 src/main/seq.c:990
+#: src/main/seq.c:983 src/main/seq.c:988
 msgid "argument must be coercible to non-negative integer"
 msgstr ""
 "l'argument doit �tre convertible automatiquement en un entier non n�gatif"
 
-#: src/main/serialize.c:224 src/main/serialize.c:254 src/main/serialize.c:277
+#: src/main/serialize.c:228 src/main/serialize.c:275 src/main/serialize.c:299
 msgid "unknown or inappropriate output format"
 msgstr "format de sortie inconnu ou inadapt�"
 
-#: src/main/serialize.c:504
+#: src/main/serialize.c:542
 msgid "must specify ascii, binary, or xdr format"
 msgstr "sp�cifier le format ascii, binary ou xdr"
 
-#: src/main/serialize.c:505
+#: src/main/serialize.c:543
 msgid "unknown output format"
 msgstr "format de sortie inconnu"
 
-#: src/main/serialize.c:536
+#: src/main/serialize.c:574
 msgid "unknown input format"
 msgstr "format d'entr�e inconnu"
 
-#: src/main/serialize.c:541
+#: src/main/serialize.c:579
 msgid "input format does not match specified format"
 msgstr "le format d'entr�e ne correspond pas au format sp�cifi�"
 
-#: src/main/serialize.c:752
+#: src/main/serialize.c:790
 msgid "no restore method available"
 msgstr "aucune m�thode de restauration disponible"
 
-#: src/main/serialize.c:794
+#: src/main/serialize.c:832
 msgid "names in persistent strings are currently ignored"
 msgstr ""
 "noms ignor�s pour l'instant dans les cha�nes de caract�res persistantes"
 
-#: src/main/serialize.c:963
+#: src/main/serialize.c:1001
 #, c-format
 msgid "'%s' may not be available when loading"
 msgstr "'%s' peut-�tre indisponible lors du chargement"
 
-#: src/main/serialize.c:970
+#: src/main/serialize.c:1008
 msgid "namespaces may not be available when loading"
 msgstr "espaces de nom peut-�tre indisponibles pendant le chargement"
 
-#: src/main/serialize.c:1097
+#: src/main/serialize.c:1136
 #, c-format
 msgid "WriteItem: unknown type %i"
 msgstr "WriteItem : type %i inconnu"
 
-#: src/main/serialize.c:1273
+#: src/main/serialize.c:1312
 #, c-format
 msgid "version %d not supported"
 msgstr "version %d not supported"
 
-#: src/main/serialize.c:1305
+#: src/main/serialize.c:1343
 msgid "reference index out of range"
 msgstr "indice de r�f�rence hors intervalle"
 
-#: src/main/serialize.c:1335
+#: src/main/serialize.c:1373
 msgid "names in persistent strings are not supported yet"
 msgstr "les noms dans les cha�nes de caract�res ne sont pas encore support�es"
 
-#: src/main/serialize.c:1463
+#: src/main/serialize.c:1501
 msgid "negative serialized length for vector"
 msgstr "longueur n�gative � la s�rialisation du vecteur"
 
-#: src/main/serialize.c:1471
+#: src/main/serialize.c:1509
 msgid "invalid upper part of serialized vector length"
 msgstr "longueur de la partie sup�rieure du vecteur s�rialis� incorrecte"
 
-#: src/main/serialize.c:1476
+#: src/main/serialize.c:1514
 msgid ""
 "negative serialized vector length:\n"
 "perhaps long vector from 64-bit version of R?"
@@ -5618,22 +5704,22 @@ msgstr ""
 "longueur n�gative de vecteur s�rialis� :\n"
 "ce sont peut-�tre des vecteurs longs issus d'une version 64-bit de R ?"
 
-#: src/main/serialize.c:1707
+#: src/main/serialize.c:1746
 msgid "this version of R cannot read class references"
 msgstr "lecture de r�f�rences de classes impossible avec cette version de R"
 
-#: src/main/serialize.c:1709
+#: src/main/serialize.c:1748
 msgid "this version of R cannot read generic function references"
 msgstr "lecture de fonctions g�n�riques impossible avec cette version de R"
 
-#: src/main/serialize.c:1726
+#: src/main/serialize.c:1765
 #, c-format
 msgid "ReadItem: unknown type %i, perhaps written by later version of R"
 msgstr ""
 "ReadItem : type inconnu %i, peut-�tre �crit avec une version ult�rieure de "
 "R ?"
 
-#: src/main/serialize.c:1882
+#: src/main/serialize.c:1921
 #, c-format
 msgid ""
 "cannot read unreleased workspace version %d written by experimental R %d.%d."
@@ -5642,7 +5728,7 @@ msgstr ""
 "impossible de lire une version %d non publi�e d'un environnement de travail "
 "�crit par un R %d.%d.%d exp�rimental"
 
-#: src/main/serialize.c:1886
+#: src/main/serialize.c:1925
 #, c-format
 msgid ""
 "cannot read workspace version %d written by R %d.%d.%d; need R %d.%d.%d or "
@@ -5651,83 +5737,83 @@ msgstr ""
 "impossible de lire une version %d d'un environnement de travail �crit par R "
 "%d.%d.%d ; besoin d'un R %d.%d.%d ou plus r�cent"
 
-#: src/main/serialize.c:1965
+#: src/main/serialize.c:2004
 msgid "read failed"
 msgstr "�chec de lecture"
 
-#: src/main/serialize.c:2028
+#: src/main/serialize.c:2067
 msgid "error reading from ascii connection"
 msgstr "erreur de lecture de la connexion ascii"
 
-#: src/main/serialize.c:2030
+#: src/main/serialize.c:2069
 msgid "unexpected format in ascii connection"
 msgstr "format inattendu dans la connexion ascii"
 
-#: src/main/serialize.c:2035 src/main/serialize.c:2049
+#: src/main/serialize.c:2074 src/main/serialize.c:2088
 msgid "error reading from connection"
 msgstr "erreur de lecture de la connexion"
 
-#: src/main/serialize.c:2090
+#: src/main/serialize.c:2130
 msgid "only ascii format can be written to text mode connections"
 msgstr "seul le format ascii peut �tre �crit dans les connexions en mode texte"
 
-#: src/main/serialize.c:2104
+#: src/main/serialize.c:2144
 msgid "only ascii format can be read from text mode connections"
 msgstr "seul le format ascii peut �tre lu depuis les connexions en mode texte"
 
-#: src/main/serialize.c:2159 src/main/serialize.c:2312
-#: src/main/serialize.c:2461
+#: src/main/serialize.c:2200 src/main/serialize.c:2353
+#: src/main/serialize.c:2502
 msgid "bad version value"
 msgstr "mauvais num�ro de version"
 
-#: src/main/serialize.c:2184
+#: src/main/serialize.c:2225
 msgid "binary-mode connection required for ascii=FALSE"
 msgstr "connexion en mode binaire n�cessaire avec ascii=FALSE"
 
-#: src/main/serialize.c:2340 src/main/serialize.c:2377
-#: src/main/serialize.c:2440
+#: src/main/serialize.c:2381 src/main/serialize.c:2418
+#: src/main/serialize.c:2481
 msgid "serialization is too large to store in a raw vector"
 msgstr ""
 "la s�rialisation est trop large pour �tre stock�e dans un vecteur 'raw'"
 
-#: src/main/serialize.c:2357
+#: src/main/serialize.c:2398
 msgid "cannot allocate buffer"
 msgstr "impossible d'affecter le tampon"
 
-#: src/main/serialize.c:2546 src/main/serialize.c:2619
+#: src/main/serialize.c:2592 src/main/serialize.c:2665
 msgid "not a proper file name"
 msgstr "nom de fichier incorrect"
 
-#: src/main/serialize.c:2548
+#: src/main/serialize.c:2594
 msgid "not a proper raw vector"
 msgstr "ce n'est pas un vecteur 'raw'"
 
-#: src/main/serialize.c:2569
+#: src/main/serialize.c:2615
 msgid "could not determine file position"
 msgstr "impossible de d�terminer la position dans le fichier"
 
-#: src/main/serialize.c:2621
+#: src/main/serialize.c:2667
 msgid "bad offset/length argument"
 msgstr "mauvais argument 'offset' / 'length'"
 
-#: src/main/serialize.c:2645 src/main/serialize.c:2658
-#: src/main/serialize.c:2667 src/main/serialize.c:2677
-#: src/main/serialize.c:2690
+#: src/main/serialize.c:2691 src/main/serialize.c:2704
+#: src/main/serialize.c:2713 src/main/serialize.c:2723
+#: src/main/serialize.c:2736
 #, c-format
 msgid "seek failed on %s"
 msgstr "�chec de parcours en mode al�atoire dans %s"
 
-#: src/main/serialize.c:2662 src/main/serialize.c:2671
-#: src/main/serialize.c:2681 src/main/serialize.c:2694
+#: src/main/serialize.c:2708 src/main/serialize.c:2717
+#: src/main/serialize.c:2727 src/main/serialize.c:2740
 #, c-format
 msgid "read failed on %s"
 msgstr "�chec de lecture sur %s"
 
-#: src/main/serialize.c:2713
+#: src/main/serialize.c:2759
 msgid "bad environment"
 msgstr "mauvais environnement"
 
-#: src/main/serialize.c:2715
+#: src/main/serialize.c:2761
 msgid "bad variable names"
 msgstr "mauvais noms de variables"
 
@@ -5735,170 +5821,166 @@ msgstr "mauvais noms de variables"
 msgid "only atomic vectors can be tested to be sorted"
 msgstr "seuls les vecteurs atomiques peuvent �tre test�s pourle tri"
 
-#: src/main/sort.c:326 src/main/sort.c:1228 src/main/sort.c:1396
+#: src/main/sort.c:325 src/main/sort.c:1248
 msgid "'decreasing' must be TRUE or FALSE"
 msgstr "'decreasing' doit �tre TRUE ou FALSE"
 
-#: src/main/sort.c:329 src/main/sort.c:600
+#: src/main/sort.c:328 src/main/sort.c:599
 msgid "only atomic vectors can be sorted"
 msgstr "tri possible seulement pour les vecteurs atomiques"
 
-#: src/main/sort.c:331 src/main/sort.c:602 src/main/sort.c:1297
+#: src/main/sort.c:330 src/main/sort.c:601 src/main/sort.c:1317
 msgid "raw vectors cannot be sorted"
 msgstr "tri impossible pour les vecteurs de type raw"
 
-#: src/main/sort.c:613
+#: src/main/sort.c:612
 msgid "NA or infinite index"
 msgstr "NA ou indices infinis"
 
-#: src/main/sort.c:616
+#: src/main/sort.c:615
 #, c-format
 msgid "index %ld outside bounds"
 msgstr "indice  %ld en dehors des limites"
 
-#: src/main/sort.c:621 src/main/sort.c:634
+#: src/main/sort.c:620 src/main/sort.c:633
 msgid "NA index"
 msgstr "indice NA"
 
-#: src/main/sort.c:623 src/main/sort.c:636
+#: src/main/sort.c:622 src/main/sort.c:635
 #, c-format
 msgid "index %d outside bounds"
 msgstr "indice %d en dehors des limites"
 
-#: src/main/sort.c:1237
+#: src/main/sort.c:1257
 #, c-format
 msgid "argument %d is not a vector"
 msgstr "l'argument %d n'est pas un vecteur"
 
-#: src/main/sort.c:1239
+#: src/main/sort.c:1259
 msgid "argument lengths differ"
 msgstr "arguments de tailles diff�rentes"
 
-#: src/main/sort.c:1324
+#: src/main/sort.c:1344
 msgid "invalid ties.method for rank() [should never happen]"
 msgstr "ties.method incorrecte pour rank() [ne devrait jamais se produire]"
 
-#: src/main/sort.c:1429
-msgid "too large a range of values in 'x'"
-msgstr "intervalle de valeurs trop grand en 'x'"
-
-#: src/main/source.c:215
+#: src/main/source.c:220
 msgid "coercion of 'text' to character was unsuccessful"
 msgstr ""
 "la conversion automatique de 'text' vers une cha�ne de caract�res a �chou�"
 
-#: src/main/source.c:231
+#: src/main/source.c:236
 #, c-format
 msgid "argument '%s = \"%s\"' will be ignored"
 msgstr "l'argument '%s = \"%s\"' sera ignor�"
 
-#: src/main/split.c:38
+#: src/main/split.c:39
 msgid "first argument must be a vector"
 msgstr "le premier argument doit �tre un vecteur"
 
-#: src/main/split.c:40
+#: src/main/split.c:41
 msgid "second argument must be a factor"
 msgstr "le second argument doit �tre une variable facteur"
 
-#: src/main/split.c:45
+#: src/main/split.c:46
 msgid "group length is 0 but data length > 0"
 msgstr "La taille du groupe est 0 mais la taille des donn�es est > 0"
 
-#: src/main/split.c:47
+#: src/main/split.c:48
 msgid "data length is not a multiple of split variable"
 msgstr "la taille de donn�es n'est pas un multiple de la variable d�coup�e"
 
-#: src/main/split.c:56
+#: src/main/split.c:58
 msgid "factor has bad level"
 msgstr "la variable 'factor' a des niveaux erron�s"
 
-#: src/main/sprintf.c:94
+#: src/main/sprintf.c:97
 #, c-format
 msgid "required resulting string length %d is greater than maximal %d"
 msgstr ""
 "longueur de cha�ne r�sultante requise %d plus grande que la longueur "
 "maximale %d"
 
-#: src/main/sprintf.c:102
+#: src/main/sprintf.c:105
 msgid "'fmt' is not a character vector"
 msgstr "'fmt' n'est pas un vecteur de caract�res"
 
-#: src/main/sprintf.c:107
+#: src/main/sprintf.c:110
 #, c-format
 msgid "only %d arguments are allowed"
 msgstr "%d arguments possibles au maximum"
 
-#: src/main/sprintf.c:114
+#: src/main/sprintf.c:117
 #, c-format
 msgid "invalid type of argument[%d]: '%s'"
 msgstr "type d'argument[%d] incorrect : '%s'"
 
-#: src/main/sprintf.c:125 src/main/sprintf.c:128
+#: src/main/sprintf.c:128 src/main/sprintf.c:131
 msgid "arguments cannot be recycled to the same length"
 msgstr "les arguments ne peuvent �tre recycl�s � la m�me taille"
 
-#: src/main/sprintf.c:150 src/main/sprintf.c:257
+#: src/main/sprintf.c:153 src/main/sprintf.c:260
 #, c-format
 msgid "'fmt' length exceeds maximal format length %d"
 msgstr "taille de 'fmt' au-del� de la taille de format maximale %d"
 
-#: src/main/sprintf.c:169
+#: src/main/sprintf.c:172
 #, c-format
 msgid "unrecognised format specification '%s'"
 msgstr "sp�cification de format '%s' incorrecte"
 
-#: src/main/sprintf.c:180 src/main/sprintf.c:186 src/main/sprintf.c:199
-#: src/main/sprintf.c:206
+#: src/main/sprintf.c:183 src/main/sprintf.c:189 src/main/sprintf.c:202
+#: src/main/sprintf.c:209
 #, c-format
 msgid "reference to non-existent argument %d"
 msgstr "r�f�rence � un argument %d inexistant"
 
-#: src/main/sprintf.c:218
+#: src/main/sprintf.c:221
 msgid "at most one asterisk '*' is supported in each conversion specification"
 msgstr ""
 "un maximum d'une ast�risque '*' est support�e dans chaque sp�cification de "
 "conversion"
 
-#: src/main/sprintf.c:228
+#: src/main/sprintf.c:231
 msgid "argument for '*' conversion specification must be a number"
 msgstr "l'argument pour la sp�cification de conversion '*' doit �tre un nombre"
 
-#: src/main/sprintf.c:266
+#: src/main/sprintf.c:269
 msgid "coercion has changed vector length to 0"
 msgstr "la conversion automatique a chang� la taille du vecteur � 0"
 
-#: src/main/sprintf.c:339 src/main/sprintf.c:353 src/main/sprintf.c:367
-#: src/main/sprintf.c:402
+#: src/main/sprintf.c:343 src/main/sprintf.c:357 src/main/sprintf.c:371
+#: src/main/sprintf.c:406
 #, c-format
 msgid "invalid format '%s'; %s"
 msgstr "format incorrect '%s' ; %s"
 
-#: src/main/sprintf.c:340
+#: src/main/sprintf.c:344
 #, c-format
 msgid "use format %d or %i for logical objects"
 msgstr "utilisez les formats %d ou %i pour les objets bool�ens"
 
-#: src/main/sprintf.c:354
+#: src/main/sprintf.c:358
 #, c-format
 msgid "use format %d, %i, %o, %x or %X for integer objects"
 msgstr "utilisez les formats %d, %i, %o, %x ou %X pour les objets entiers"
 
-#: src/main/sprintf.c:368
+#: src/main/sprintf.c:372
 #, c-format
 msgid "use format %f, %e, %g or %a for numeric objects"
 msgstr "utilisez les formats %f, %e, %g ou %a pour les objets num�riques"
 
-#: src/main/sprintf.c:403
+#: src/main/sprintf.c:407
 #, c-format
 msgid "use format %s for character objects"
 msgstr "utilisez le format %s pour les objets caract�res"
 
-#: src/main/sprintf.c:408
+#: src/main/sprintf.c:412
 #, c-format
 msgid "likely truncation of character string to %d characters"
 msgstr "Troncature probable d'une cha�ne � %d caract�res"
 
-#: src/main/sprintf.c:417
+#: src/main/sprintf.c:421
 msgid "unsupported type"
 msgstr "type non g�r�"
 
@@ -5906,392 +5988,398 @@ msgstr "type non g
 msgid "R_LibraryFileName: buffer too small"
 msgstr "R_LibraryFileName : tampon trop petit"
 
-#: src/main/subassign.c:117
+#: src/main/subassign.c:118
 msgid "attempt to enlarge non-vector"
 msgstr "tentative d'extension d'autre chose qu'un vecteur"
 
-#: src/main/subassign.c:122
+#: src/main/subassign.c:123
 #, c-format
 msgid "assignment outside vector/list limits (extending from %d to %d)"
 msgstr ""
 "affectation en dehors des limites vecteur / liste (extension de %d vers %d)"
 
-#: src/main/subassign.c:367
+#: src/main/subassign.c:391
 #, c-format
 msgid "incompatible types (from %s to %s) in subassignment type fix"
 msgstr ""
 "types (de %s a %s) incompatibles dans l'ajustement d'affectation de type"
 
-#: src/main/subassign.c:502 src/main/subassign.c:782 src/main/subassign.c:785
-#: src/main/subassign.c:1076
+#: src/main/subassign.c:550 src/main/subassign.c:830 src/main/subassign.c:833
+#: src/main/subassign.c:1133
 msgid "NAs are not allowed in subscripted assignments"
 msgstr "NAs interdits dans les affectations indic�es"
 
-#: src/main/subassign.c:520 src/main/subassign.c:796 src/main/subassign.c:1068
-#: src/main/subassign.c:1641
+#: src/main/subassign.c:568 src/main/subassign.c:844 src/main/subassign.c:1125
+#: src/main/subassign.c:1705
 msgid "replacement has length zero"
 msgstr "l'argument de remplacement est de longueur nulle"
 
-#: src/main/subassign.c:522 src/main/subassign.c:798 src/main/subassign.c:1070
+#: src/main/subassign.c:570 src/main/subassign.c:846 src/main/subassign.c:1127
 msgid "number of items to replace is not a multiple of replacement length"
 msgstr ""
 "le nombre d'objets � remplacer n'est pas multiple de la taille du "
 "remplacement"
 
-#: src/main/subassign.c:766
+#: src/main/subassign.c:814
 msgid "incorrect number of subscripts on matrix"
 msgstr "nombre d'indices incorrect sur la matrice"
 
-#: src/main/subassign.c:1022
+#: src/main/subassign.c:1079
 #, c-format
 msgid "incompatible types (from %s to %s) in matrix subset assignment"
 msgstr ""
 "types incompatibles (de %s � %s) dans l'affectation d'un sous-ensemble de "
 "matrice"
 
-#: src/main/subassign.c:1038 src/main/subset.c:928
+#: src/main/subassign.c:1095 src/main/subset.c:957
 msgid "incorrect number of subscripts"
 msgstr "nombre d'indices incorrect"
 
-#: src/main/subassign.c:1214
+#: src/main/subassign.c:1272
 #, c-format
 msgid "incompatible types (from %s to %s) in array subset assignment"
 msgstr ""
 "types (de %s � %s) incompatibles dans l'affectation d'un sous-ensemble de "
 "tableau"
 
-#: src/main/subassign.c:1249 src/main/subassign.c:1270
+#: src/main/subassign.c:1308 src/main/subassign.c:1329
 msgid "invalid subscript in list assign"
 msgstr "nombre incorrect d'indices pour l'affectation d'une liste"
 
-#: src/main/subassign.c:1263
+#: src/main/subassign.c:1322
 msgid "invalid number of subscripts to list assign"
 msgstr "nombre incorrect d'indices pour l'affectation d'une liste"
 
-#: src/main/subassign.c:1361
+#: src/main/subassign.c:1421
 msgid "SubAssignArgs: invalid number of arguments"
 msgstr "SubAssignArgs : nombre d'arguments incorrect"
 
-#: src/main/subassign.c:1506
+#: src/main/subassign.c:1566
 msgid "result is zero-length and so cannot be a language object"
 msgstr ""
 "le r�sultat a une longueur nulle et donc, ne peut �tre un objet de language"
 
-#: src/main/subassign.c:1611
+#: src/main/subassign.c:1665
 msgid ""
 "[[<- defined for objects of type \"S4\" only for subclasses of environment"
 msgstr ""
 "[[<- d�fini pour des objets de type \"S4\" pour des sous-classes de "
 "l'environnement seulement"
 
-#: src/main/subassign.c:1617
+#: src/main/subassign.c:1677
 msgid "wrong args for environment subassignment"
 msgstr "mauvais arguments pour une affectation d'environnement"
 
-#: src/main/subassign.c:1643
+#: src/main/subassign.c:1707
 msgid "more elements supplied than there are to replace"
 msgstr "plus d'�l�ments fournis que d'�l�ments � remplacer"
 
-#: src/main/subassign.c:1645
+#: src/main/subassign.c:1709
 msgid "[[ ]] with missing subscript"
 msgstr "[[ ]] avec indice manquant"
 
-#: src/main/subassign.c:1657 src/main/subassign.c:1675
+#: src/main/subassign.c:1727 src/main/subassign.c:1745
 msgid "[[ ]] subscript out of bounds"
 msgstr "[[ ]] indice en dehors des limites"
 
-#: src/main/subassign.c:1663 src/main/subassign.c:1841
+#: src/main/subassign.c:1733 src/main/subassign.c:1914
 msgid "[[ ]] improper number of subscripts"
 msgstr "[[ ]] nombre d'indices incorrect"
 
-#: src/main/subassign.c:1808
+#: src/main/subassign.c:1879
 #, c-format
 msgid "incompatible types (from %s to %s) in [[ assignment"
 msgstr "types (de %s a %s) incompatibles dans l'affectation [["
 
-#: src/main/subassign.c:1852
+#: src/main/subassign.c:1925
 #, c-format
 msgid "[[ ]] subscript (%d) out of bounds"
 msgstr "[[ ]] indice (%d) en dehors des bornes"
 
-#: src/main/subassign.c:1905 src/main/subscript.c:143 src/main/subscript.c:145
-#: src/main/subscript.c:274 src/main/subscript.c:276 src/main/subscript.c:826
-#: src/main/subscript.c:828 src/main/subscript.c:919 src/main/subscript.c:921
-#: src/main/subset.c:1109
+#: src/main/subassign.c:1986 src/main/subscript.c:151 src/main/subscript.c:278
+#: src/main/subscript.c:903 src/main/subscript.c:996 src/main/subset.c:1176
 #, c-format
 msgid "invalid subscript type '%s'"
 msgstr "type '%s' d'indice incorrect"
 
-#: src/main/subassign.c:1950
+#: src/main/subassign.c:2037
 msgid "no method for assigning subsets of this S4 class"
 msgstr "pas de m�thode pour changer un sous-ensemble de cette classe S4"
 
-#: src/main/subassign.c:2008
+#: src/main/subassign.c:2095
 msgid "Coercing LHS to a list"
 msgstr "Conversion automatique de LHS en liste"
 
-#: src/main/subscript.c:53 src/main/subscript.c:75 src/main/subscript.c:180
-#: src/main/subscript.c:204
-msgid "attempt to select less than one element"
+#: src/main/subscript.c:59 src/main/subscript.c:81 src/main/subscript.c:185
+#: src/main/subscript.c:209
+#, fuzzy, c-format
+msgid "attempt to select less than one element in %s"
 msgstr "tentative de s�lectionner moins d'un �l�ment"
 
-#: src/main/subscript.c:57 src/main/subscript.c:72 src/main/subscript.c:178
-#: src/main/subscript.c:208 src/main/subscript.c:304
-msgid "attempt to select more than one element"
+#: src/main/subscript.c:63 src/main/subscript.c:78 src/main/subscript.c:183
+#: src/main/subscript.c:213 src/main/subscript.c:305
+#, fuzzy, c-format
+msgid "attempt to select more than one element in %s"
 msgstr "tentative de s�lectionner plus d'un �l�ment"
 
-#: src/main/subscript.c:184
+#: src/main/subscript.c:189
 msgid "internal error in use of recursive indexing"
 msgstr "erreur interne dans l'utilisation d'indi�age r�cursif"
 
-#: src/main/subscript.c:252
+#: src/main/subscript.c:257
 #, c-format
 msgid "further partial match of '%s' to '%s'"
 msgstr "autre correspondance partielle de '%s' par rapport � '%s'"
 
-#: src/main/subscript.c:302
+#: src/main/subscript.c:303
 #, c-format
 msgid "recursive indexing failed at level %d\n"
 msgstr "�chec d'indexation r�cursive au niveau %d\n"
 
-#: src/main/subscript.c:309
+#: src/main/subscript.c:313
 #, c-format
 msgid "no such index at level %d\n"
 msgstr "un tel index n'existe pas au niveau %d\n"
 
-#: src/main/subscript.c:352
+#: src/main/subscript.c:360
 msgid "incorrect number of columns in matrix subscript"
 msgstr "nombre de colonnes incorrect dans un indice de matrice"
 
-#: src/main/subscript.c:371 src/main/subscript.c:389 src/main/subscript.c:413
+#: src/main/subscript.c:379 src/main/subscript.c:397 src/main/subscript.c:421
 msgid "negative values are not allowed in a matrix subscript"
 msgstr "valeurs n�gatives interdites dans un indice de matrice"
 
-#: src/main/subscript.c:492
+#: src/main/subscript.c:500
 msgid "(subscript) logical subscript too long"
 msgstr "(subscript) indice logique trop long"
 
-#: src/main/subscript.c:590 src/main/subscript.c:645
+#: src/main/subscript.c:668 src/main/subscript.c:723
 msgid "only 0's may be mixed with negative subscripts"
 msgstr "les indices n�gatifs ne peuvent �tre m�lang�s qu'� des 0"
 
-#: src/main/subscript.c:618
+#: src/main/subscript.c:696
 msgid "subscript too large for 32-bit R"
 msgstr "indices subscript trop larges pour un R 32-bit"
 
-#: src/main/subscript.c:817
+#: src/main/subscript.c:895
 msgid "no 'dimnames' attribute for array"
 msgstr "aucun attribut 'dimnames' pour le tableau"
 
-#: src/main/subscript.c:857
+#: src/main/subscript.c:931
 msgid "subscripting on non-vector"
 msgstr "indi�age d'un �l�ment non vectoriel"
 
-#: src/main/subset.c:261
+#: src/main/subset.c:260
 msgid "dimensions would exceed maximum size of array"
 msgstr "les dimensions exc�deraient la taille maximale du tableau"
 
-#: src/main/subset.c:304 src/main/subset.c:333
+#: src/main/subset.c:304 src/main/subset.c:334
 msgid "matrix subscripting not handled for this type"
 msgstr "indi�age matriciel non g�r� pour ce type"
 
-#: src/main/subset.c:488
+#: src/main/subset.c:493
 msgid "array subscripting not handled for this type"
 msgstr "indi�age matriciel non g�r� pour ce type"
 
-#: src/main/subset.c:827
+#: src/main/subset.c:856
 msgid "incorrect number of dimensions"
 msgstr "nombre de dimensions incorrect"
 
-#: src/main/subset.c:924
+#: src/main/subset.c:953
 msgid "no index specified"
 msgstr "aucun indice sp�cifi�"
 
-#: src/main/subset.c:934
+#: src/main/subset.c:963
 msgid "this S4 class is not subsettable"
 msgstr "cette classe S4 n'est pas indi�able"
 
-#: src/main/subset.c:940
+#: src/main/subset.c:970
 msgid "wrong arguments for subsetting an environment"
 msgstr "mauvais arguments pour extraire une partie d'un environnement"
 
-#: src/main/summary.c:30
+#: src/main/summary.c:33
 #, c-format
 msgid "invalid 'type' (%s) of argument"
 msgstr "'type' (%s) de l'argument incorrect"
 
-#: src/main/summary.c:66 src/main/summary.c:78 src/main/summary.c:103
+#: src/main/summary.c:69 src/main/summary.c:81 src/main/summary.c:106
 msgid "integer overflow - use sum(as.numeric(.))"
 msgstr "d�passement d'entier - utiliser sum(as.numeric(.))"
 
-#: src/main/summary.c:522
+#: src/main/summary.c:526
 #, c-format
 msgid "internal error ('op = %d' in do_summary).\t Call a Guru"
 msgstr "erreur interne ('op = %d' in do_summary).\t Appelez un expert"
 
-#: src/main/summary.c:623
+#: src/main/summary.c:637
 msgid "Integer overflow - use sum(as.numeric(.))"
 msgstr "D�passement d'entier - utiliser sum(as.numeric(.))"
 
-#: src/main/summary.c:731
+#: src/main/summary.c:750
 msgid "no non-missing arguments, returning NA"
 msgstr "aucun argument sp�cifi� ; NA est renvoy�"
 
-#: src/main/summary.c:734
+#: src/main/summary.c:753
 msgid "no non-missing arguments to min; returning Inf"
 msgstr "aucun argument trouv� pour min ; Inf est renvoy�"
 
-#: src/main/summary.c:736
+#: src/main/summary.c:755
 msgid "no non-missing arguments to max; returning -Inf"
 msgstr "aucun argument pour max ; -Inf est renvoy�"
 
-#: src/main/summary.c:801
-msgid "non-numeric argument"
-msgstr "argument non num�rique"
-
-#: src/main/summary.c:845
+#: src/main/summary.c:913
 msgid "argument to 'which' is not logical"
 msgstr "l'argument 'which' doit �tre de type logique"
 
-#: src/main/summary.c:889
+#: src/main/summary.c:957
 msgid "no arguments"
 msgstr "pas d'arguments"
 
-#: src/main/summary.c:900 src/main/summary.c:917
+#: src/main/summary.c:968 src/main/summary.c:985
 msgid "invalid input type"
 msgstr "type d'entr�e incorrect"
 
-#: src/main/summary.c:934
+#: src/main/summary.c:1002
 msgid "an argument will be fractionally recycled"
 msgstr "un argument sera recycl� partiellement"
 
-#: src/main/sysutils.c:69 src/main/sysutils.c:83
+#: src/main/sysutils.c:68 src/main/sysutils.c:82
 #, c-format
 msgid "cannot determine file modification time of '%s'"
 msgstr "impossible de d�terminer la date de modification du fichier '%s'"
 
-#: src/main/sysutils.c:167
+#: src/main/sysutils.c:166
 msgid "encoding of a filename cannot be 'bytes'"
 msgstr "l'encodage d'un nom de fichier ne peut �tre 'bytes'"
 
-#: src/main/sysutils.c:170 src/main/sysutils.c:803 src/main/sysutils.c:818
-#: src/main/sysutils.c:909 src/main/sysutils.c:924 src/main/sysutils.c:1020
+#: src/main/sysutils.c:169 src/main/sysutils.c:831 src/main/sysutils.c:846
+#: src/main/sysutils.c:975
 #, c-format
 msgid "unsupported conversion from '%s' in codepage %d"
 msgstr "conversion de '%s' dans la page de code %d indisponible"
 
-#: src/main/sysutils.c:179
+#: src/main/sysutils.c:178
 msgid "file name conversion problem -- name too long?"
 msgstr "probl�me de conversion de nom de fichier -- nom trop long ?"
 
-#: src/main/sysutils.c:180
+#: src/main/sysutils.c:179
 msgid "file name conversion problem"
 msgstr "probl�me de conversion de nom de fichier"
 
-#: src/main/sysutils.c:249
+#: src/main/sysutils.c:248
 msgid "invalid filename pattern"
 msgstr "motif de nom de fichier incorrect"
 
-#: src/main/sysutils.c:253
+#: src/main/sysutils.c:252
 msgid "invalid file extension"
 msgstr "extension de fichier incorrecte"
 
-#: src/main/sysutils.c:255
+#: src/main/sysutils.c:254
 msgid "no 'pattern'"
 msgstr "aucun 'pattern'"
 
-#: src/main/sysutils.c:257
+#: src/main/sysutils.c:256
 msgid "no 'tempdir'"
 msgstr "aucun 'tempdir'"
 
-#: src/main/sysutils.c:259
+#: src/main/sysutils.c:258
 msgid "no 'fileext'"
 msgstr "aucun 'fileext'"
 
-#: src/main/sysutils.c:345 src/main/sysutils.c:348 src/main/sysutils.c:439
-#: src/main/sysutils.c:441 src/main/sysutils.c:477
+#: src/main/sysutils.c:328
+#, fuzzy, c-format
+msgid "system call failed: %s"
+msgstr "�chec de parcours en mode al�atoire dans %s"
+
+#: src/main/sysutils.c:357 src/main/sysutils.c:360 src/main/sysutils.c:451
+#: src/main/sysutils.c:453 src/main/sysutils.c:489
 msgid "wrong type for argument"
 msgstr "argument de type incorrect"
 
-#: src/main/sysutils.c:443
+#: src/main/sysutils.c:455
 msgid "wrong length for argument"
 msgstr "mauvaise longueur pour l'argument"
 
-#: src/main/sysutils.c:464
+#: src/main/sysutils.c:476
 msgid "'Sys.setenv' is not available on this system"
 msgstr "'Sys.setenv' indisponible sur ce syst�me"
 
-#: src/main/sysutils.c:508
+#: src/main/sysutils.c:520
 msgid "this system cannot unset environment variables: setting to \"\""
 msgstr ""
 "ce syst�me ne peut effacer des variables d'environnement : la valeur est "
 "mise � \"\""
 
-#: src/main/sysutils.c:519
+#: src/main/sysutils.c:531
 msgid "'Sys.unsetenv' is not available on this system"
 msgstr "'Sys.unsetenv' indisponible sur ce syst�me"
 
-#: src/main/sysutils.c:616
+#: src/main/sysutils.c:628
 #, c-format
 msgid "unsupported conversion from '%s' to '%s' in codepage %d"
 msgstr "conversion de '%s' vers '%s' dans la page de code %d indisponible"
 
-#: src/main/sysutils.c:631
+#: src/main/sysutils.c:643
 msgid "'x' must be a character vector"
 msgstr "'x' doit �tre un vecteur de caract�res"
 
-#: src/main/sysutils.c:646
-msgid "'x' must be a list of NULL or raw vectors"
+#: src/main/sysutils.c:658
+#, fuzzy
+msgid "'x' must be a character vector or a list of NULL or raw vectors"
 msgstr "'x' doit �tre une list de vecteurs NULL ou \"raw\""
 
-#: src/main/sysutils.c:724 src/main/sysutils.c:789 src/main/sysutils.c:895
-#: src/main/sysutils.c:994 src/main/sysutils.c:1010 src/main/sysutils.c:1087
+#: src/main/sysutils.c:736 src/main/sysutils.c:914 src/main/sysutils.c:932
+#: src/main/sysutils.c:949 src/main/sysutils.c:965 src/main/sysutils.c:1042
 #, c-format
 msgid "'%s' must be called on a CHARSXP"
 msgstr "'%s' doit �tre appel� sur un CHARSXP"
 
-#: src/main/sysutils.c:792 src/main/sysutils.c:898 src/main/sysutils.c:1015
-#: src/main/sysutils.c:1090
+#: src/main/sysutils.c:805 src/main/sysutils.c:970 src/main/sysutils.c:1045
 msgid "translating strings with \"bytes\" encoding is not allowed"
 msgstr ""
 "la traduction de cha�nes de caract�res dans l'encodage \"bytes\" n'est pas "
 "permis"
 
-#: src/main/sysutils.c:1116
+#: src/main/sysutils.c:818
+#, fuzzy
+msgid "internal error: no translation needed"
+msgstr "erreur interne dans le code unz"
+
+#: src/main/sysutils.c:1071
 #, c-format
 msgid "unsupported conversion to '%s' from codepage %d"
 msgstr "conversion vers '%s' depuis la page de code %d indisponible"
 
-#: src/main/sysutils.c:1530
+#: src/main/sysutils.c:1486
 #, c-format
 msgid "invalid Unicode point %u"
 msgstr "valeur Unicode incorrecte %u"
 
-#: src/main/sysutils.c:1632
+#: src/main/sysutils.c:1588
 msgid "cannot create 'R_TempDir'"
 msgstr "impossible de cr�er 'R_TempDir'"
 
-#: src/main/sysutils.c:1636 src/main/sysutils.c:1644 src/main/sysutils.c:1647
+#: src/main/sysutils.c:1592 src/main/sysutils.c:1600 src/main/sysutils.c:1603
 msgid "unable to set R_SESSION_TMPDIR"
 msgstr "sp�cification de R_SESSION_TMPDIR impossible"
 
-#: src/main/sysutils.c:1656
+#: src/main/sysutils.c:1612
 msgid "cannot allocate 'R_TempDir'"
 msgstr "impossible d'allouer 'R_TempDir'"
 
-#: src/main/sysutils.c:1693
+#: src/main/sysutils.c:1649
 msgid "temporary name too long"
 msgstr "nom temporaire trop long"
 
-#: src/main/sysutils.c:1708
+#: src/main/sysutils.c:1664
 msgid "cannot find unused tempfile name"
 msgstr "aucun nom de fichier temporaire disponible"
 
-#: src/main/sysutils.c:1711
+#: src/main/sysutils.c:1667
 msgid "allocation failed in R_tmpnam2"
 msgstr "erreur d'affectation m�moire dans R_tmpnam2"
 
-#: src/main/sysutils.c:1838
+#: src/main/sysutils.c:1794
 msgid "'dirmark = TRUE' is not supported on this platform"
 msgstr "'dirmark = TRUE' n'est pas support� sur cette architecture"
 
@@ -6301,195 +6389,200 @@ msgid "length %d is too large for hashing"
 msgstr "la longueur %d est trop grande pour le hachage"
 
 #: src/main/unique.c:490 src/main/unique.c:519 src/main/unique.c:549
-#: src/main/unique.c:575 src/main/unique.c:614
+#: src/main/unique.c:573 src/main/unique.c:612
 msgid "'duplicated' applies only to vectors"
 msgstr "'duplicated' s'applique seulement aux vecteurs"
 
-#: src/main/unique.c:619
+#: src/main/unique.c:617
 msgid "any_duplicated3(., <0-length incomp>)"
 msgstr "any_duplicated3(., <0-length incomp>)"
 
-#: src/main/unique.c:669
+#: src/main/unique.c:667
 msgid "'fromLast' must be length 1"
 msgstr "'fromLast' doit �tre de longueur 1"
 
-#: src/main/unique.c:672
+#: src/main/unique.c:670
 msgid "'fromLast' must be TRUE or FALSE"
 msgstr "'fromLast' doit �tre TRUE ou FALSE"
 
-#: src/main/unique.c:683
+#: src/main/unique.c:681
 #, c-format
 msgid "%s() applies only to vectors"
 msgstr "%s() s'applique seulement aux vecteurs"
 
-#: src/main/unique.c:690
+#: src/main/unique.c:688
 msgid "'nmax' must be positive"
 msgstr "'nmax' doit �tre strictement positif"
 
-#: src/main/unique.c:922
+#: src/main/unique.c:985
 msgid "'match' requires vector arguments"
 msgstr "'match' exige des arguments vectoriels"
 
-#: src/main/unique.c:970 src/main/unique.c:1125
+#: src/main/unique.c:1033 src/main/unique.c:1171
 msgid "argument is not of mode character"
 msgstr "argument n'est pas de mode caract�re"
 
-#: src/main/unique.c:1251
+#: src/main/unique.c:1296
 msgid "... used in a situation where it does not exist"
 msgstr "... utilis� dans une situation o� il n'existe pas"
 
-#: src/main/unique.c:1342
-msgid "unable to find a closure from within which 'match.call' was called"
-msgstr ""
-"impossible de trouver la fermeture (closure) � partir de laquelle 'match."
-"call' a �t� appel�"
+#: src/main/unique.c:1302
+#, fuzzy
+msgid "... is not a pairlist"
+msgstr "la valeur dans '...' n'est pas une promesse (promise)"
 
-#: src/main/unique.c:1536
+#: src/main/unique.c:1531
 msgid "non-numeric data frame in rowsum"
 msgstr "tableau de donn�es non num�riques dans rowsum"
 
-#: src/main/unique.c:1568
+#: src/main/unique.c:1563
 msgid "this cannot happen"
 msgstr "cela ne peut se produire"
 
-#: src/main/unique.c:1639
+#: src/main/unique.c:1634
 msgid "'names' must be a character vector"
 msgstr "'names' doit �tre un vecteur de caract�res"
 
-#: src/main/unique.c:1643
-msgid "'sep' must be a character string"
-msgstr "'sep' doit �tre une cha�ne de caract�res"
-
-#: src/main/util.c:88 src/main/util.c:106
+#: src/main/util.c:87 src/main/util.c:105
 msgid "object is not a matrix"
 msgstr "l'objet n'est pas une matrice"
 
-#: src/main/util.c:254 src/main/util.c:268 src/main/util.c:285
+#: src/main/util.c:303 src/main/util.c:315 src/main/util.c:326
+#: src/main/util.c:341
 #, c-format
 msgid "type %d is unimplemented in '%s'"
 msgstr "type %d est indisponible dans '%s'"
 
-#: src/main/util.c:297
+#: src/main/util.c:352
 #, c-format
 msgid "unimplemented type '%s' in '%s'\n"
 msgstr "type '%s' indisponible dans '%s'\n"
 
-#: src/main/util.c:299
+#: src/main/util.c:354
 #, c-format
 msgid "unimplemented type (%d) in '%s'\n"
 msgstr "type (%d) indisponible dans '%s'\n"
 
-#: src/main/util.c:424
+#: src/main/util.c:479
 msgid "invalid tag in name extraction"
 msgstr "�tiquette incorrecte dans l'extraction du nom"
 
-#: src/main/util.c:434
+#: src/main/util.c:489
 #, c-format
 msgid "%d argument passed to .Internal(%s) which requires %d"
 msgid_plural "%d arguments passed to .Internal(%s) which requires %d"
 msgstr[0] "%d arguments pass�s � .Internal(%s) qui en exige %d"
 msgstr[1] "%d arguments pass�s � .Internal(%s) qui en exige %d"
 
-#: src/main/util.c:440
+#: src/main/util.c:495
 #, c-format
 msgid "%d argument passed to '%s' which requires %d"
 msgid_plural "%d arguments passed to '%s' which requires %d"
 msgstr[0] "%d argument pass�s � '%s' qui en exige %d"
 msgstr[1] "%d arguments pass�s � '%s' qui en exige %d"
 
-#: src/main/util.c:455
+#: src/main/util.c:510
 #, c-format
 msgid "supplied argument name '%s' does not match '%s'"
 msgstr "le nom d'argument fourni '%s' ne correspond pas � '%s'"
 
-#: src/main/util.c:465
+#: src/main/util.c:520
 #, c-format
 msgid "'nthcdr' list shorter than %d"
 msgstr "liste 'nthcdr' plus courte que %d"
 
-#: src/main/util.c:470
+#: src/main/util.c:525
 msgid "'nthcdr' needs a list to CDR down"
 msgstr "'nthcdr' exige une liste pour CDR"
 
-#: src/main/util.c:586
+#: src/main/util.c:641
 msgid "'all.x' must be TRUE or FALSE"
 msgstr "'all.x' doit �tre TRUE ou FALSE"
 
-#: src/main/util.c:588
+#: src/main/util.c:643
 msgid "'all.y' must be TRUE or FALSE"
 msgstr "'all.y' doit �tre TRUE ou FALSE"
 
-#: src/main/util.c:700
+#: src/main/util.c:672
+msgid "number of rows in the result exceeds maximum vector length"
+msgstr ""
+
+#: src/main/util.c:764
 msgid "missing value is invalid"
 msgstr "valeur manquante non permise"
 
-#: src/main/util.c:709 src/main/util.c:716
+#: src/main/util.c:773 src/main/util.c:780
 msgid "cannot change working directory"
 msgstr "impossible de changer de r�pertoire de travail"
 
-#: src/main/util.c:735 src/main/util.c:769 src/main/util.c:810
-#: src/main/util.c:852 src/main/util.c:981 src/main/util.c:1040
-#: src/main/util.c:1063
+#: src/main/util.c:800 src/main/util.c:834 src/main/util.c:875
+#: src/main/util.c:917 src/main/util.c:1046 src/main/util.c:1105
+#: src/main/util.c:1128
 msgid "a character vector argument expected"
 msgstr "un argument de type vecteur de caract�res est attendu"
 
-#: src/main/util.c:742 src/main/util.c:777 src/main/util.c:819
-#: src/main/util.c:860
+#: src/main/util.c:807 src/main/util.c:842 src/main/util.c:884
+#: src/main/util.c:925
 msgid "path too long"
 msgstr "chemin trop long"
 
-#: src/main/util.c:995
+#: src/main/util.c:1060
 msgid "only the first character of 'quote' will be used"
 msgstr "seul le premier caract�re de 'quote' sera utilis�"
 
-#: src/main/util.c:1065
+#: src/main/util.c:1130
 msgid "a character vector 'value' expected"
 msgstr "un argument 'value' de type vecteur de caract�res est attendu"
 
-#: src/main/util.c:1068
+#: src/main/util.c:1133
 msgid "'value' must be of positive length"
 msgstr "'value' doit avoir une longueur strictement positive"
 
-#: src/main/util.c:1197 src/main/util.c:1205
+#: src/main/util.c:1262 src/main/util.c:1270
 #, c-format
 msgid "invalid input '%s' in 'utf8towcs'"
 msgstr "entr�e incorrecte '%s' dans 'utf8towcs'"
 
-#: src/main/util.c:1290
+#: src/main/util.c:1355
 #, c-format
 msgid "invalid multibyte string at '%s'"
 msgstr "cha�ne de charact�res multioctets incorrecte � '%s'"
 
-#: src/main/util.c:1399
+#: src/main/util.c:1497
 msgid "error message truncated to 255 chars"
 msgstr "message d'erreur tronqu� � 255 caract�res"
 
-#: src/main/util.c:1412
+#: src/main/util.c:1510
 msgid "warning message truncated to 255 chars"
 msgstr "message d'avertissement tronqu� � 255 caract�res"
 
-#: src/main/util.c:1819
+#: src/main/util.c:1659
+#, c-format
+msgid "accuracy loss in conversion from \"%s\" to numeric"
+msgstr ""
+
+#: src/main/util.c:1969
 msgid "all arguments must be named"
 msgstr "tous les arguments doivent �tre nomm�s"
 
-#: src/main/util.c:1893
+#: src/main/util.c:2091
 msgid "ICU is not supported on this build"
 msgstr "ICU ne fonctionne pas dans cette compilation"
 
-#: src/main/util.c:1954
+#: src/main/util.c:2158
 msgid "'breaks' is not sorted"
 msgstr "'breaks' n'est pas tri�"
 
-#: src/main/util.c:1988 src/main/util.c:2034
+#: src/main/util.c:2192 src/main/util.c:2242
 #, c-format
 msgid "long vector '%s' is not supported"
 msgstr "le vectuer long '%s' n'est pas support�"
 
-#: src/main/util.c:2087
+#: src/main/util.c:2296
 msgid "'eps.correct' must be 0, 1, or 2"
 msgstr "'eps.correct' doit �tre 0, 1, ou 2"
 
-#: src/main/util.c:2115
+#: src/main/util.c:2324
 msgid "'x' must be a vector"
 msgstr "'x' doit �tre un vecteur"
 
@@ -6529,14 +6622,6 @@ msgstr ""
 "Tapez 'q()' pour quitter R.\n"
 "\n"
 
-#: src/main/vfonts.c:50
-msgid "vfont routines cannot be accessed in module"
-msgstr "sous-programmes vfont inaccessibles dans le module"
-
-#: src/main/vfonts.c:67 src/main/vfonts.c:80 src/main/vfonts.c:98
-msgid "Hershey fonts cannot be loaded"
-msgstr "impossible de charger les fontes Hershey "
-
 #: src/main/xspline.c:60
 #, c-format
 msgid "add_point - reached MAXNUMPTS (%d)"
@@ -6558,7 +6643,7 @@ msgstr "Il doit y avoir au moins quatre points de contr
 msgid "There must be at least three control points"
 msgstr "Il doit y avoir au moins trois points de contr�le"
 
-#: src/modules/X11/dataentry.c:1871 src/modules/X11/devX11.c:1246
+#: src/modules/X11/dataentry.c:1874 src/modules/X11/devX11.c:1248
 #, c-format
 msgid "X11 protocol error: %s"
 msgstr "erreur de protocole X11 : %s"
@@ -6583,7 +6668,7 @@ msgstr ""
 "Erreur : X11 ne peut allouer d'autres couleurs.\n"
 "Essayez d'utiliser X11 avec colortype=\"pseudo.cube\" ou \"gray\"."
 
-#: src/modules/X11/devX11.c:1027
+#: src/modules/X11/devX11.c:1029
 msgid ""
 "could not find any X11 fonts\n"
 "Check that the Font Path is correct."
@@ -6591,18 +6676,18 @@ msgstr ""
 "impossible de trouver les polices X11\n"
 "V�rifiez que le chemin d'acc�s aux polices est correct."
 
-#: src/modules/X11/devX11.c:1087
+#: src/modules/X11/devX11.c:1089
 #, c-format
 msgid "X11 used font size %d when %d was requested"
 msgstr ""
 "X11 a utilis� la taille de police %d, alors que la taille demand�e �tait %d"
 
-#: src/modules/X11/devX11.c:1121
+#: src/modules/X11/devX11.c:1123
 #, c-format
 msgid "X11 font %s, face %d at size %d could not be loaded"
 msgstr "impossible de charger la police X11 %s, de face %d et de taille %d"
 
-#: src/modules/X11/devX11.c:1130
+#: src/modules/X11/devX11.c:1132
 msgid ""
 "semi-transparency is not supported on this device: reported only once per "
 "page"
@@ -6610,13 +6695,13 @@ msgstr ""
 "la semi-transparence n'est pas support�e sur ce p�riph�rique : signal� "
 "seulement une fois par page"
 
-#: src/modules/X11/devX11.c:1254
+#: src/modules/X11/devX11.c:1256
 #, c-format
 msgid "X11 I/O error while opening X11 connection to '%s'"
 msgstr ""
 "Erreur d'entr�e/sortie X11 lors de l'ouverture d'une connexion X11 vers '%s'"
 
-#: src/modules/X11/devX11.c:1272
+#: src/modules/X11/devX11.c:1273
 msgid "X11 fatal IO error: please save work and shut down R"
 msgstr "erreur d'E/S X11 fatale : enregistrez votre travail et fermez R"
 
@@ -6741,207 +6826,272 @@ msgstr "impossible de cr
 msgid "attempt to use the locator after dev.hold()"
 msgstr "tentative d'utilisation du localisateur (locator) apr�s dev.hold()"
 
-#: src/modules/X11/devX11.c:3111
+#: src/modules/X11/devX11.c:3117
 #, c-format
 msgid "unable to start device %s"
 msgstr "inpossible de d�marrer le p�riph�rique %s"
 
-#: src/modules/X11/devX11.c:3138
+#: src/modules/X11/devX11.c:3144
 msgid "invalid 'width' or 'height'"
 msgstr "'width' ou 'height' incorrecte"
 
-#: src/modules/X11/devX11.c:3145
+#: src/modules/X11/devX11.c:3151
 msgid "invalid colortype passed to X11 driver"
 msgstr "colorim�trie incorrecte pass�e au pilote X11"
 
-#: src/modules/X11/devX11.c:3159
+#: src/modules/X11/devX11.c:3165
 msgid "unknown X11 color/colour model -- using monochrome"
 msgstr "couleur / mod�le de couleur X11 inconnu -- monochrome utilis�"
 
-#: src/modules/X11/devX11.c:3249
+#: src/modules/X11/devX11.c:3255
 msgid "no plot on device to save"
 msgstr "aucun graphique disponible dans ce p�riph�rique pour la sauvegarde"
 
-#: src/modules/X11/devX11.c:3251
+#: src/modules/X11/devX11.c:3257
 msgid "not an open X11cairo device"
 msgstr "ceci n'est pas un p�riph�rique X11cairo ouvert"
 
-#: src/modules/X11/devX11.c:3260
+#: src/modules/X11/devX11.c:3266
 #, c-format
 msgid "cannot open file '%s'"
 msgstr "impossible d'ouvrir le fichier '%s'"
 
-#: src/modules/X11/devX11.c:3277
+#: src/modules/X11/devX11.c:3283
 msgid "savePlot() is not supported on this build"
 msgstr "savePlot() ne fonctionne pas dans cette compilation"
 
-#: src/modules/X11/devX11.c:3317
+#: src/modules/X11/devX11.c:3323
 msgid "unable to contact X11 display"
 msgstr "incapable de rentrer en contact avec l'affichage X11"
 
-#: src/modules/X11/devX11.c:3366
+#: src/modules/X11/devX11.c:3372
 #, c-format
 msgid "clipboard cannot be read (error code %d)"
 msgstr "presse-papier impossible � ouvrir en lecture (code d'erreur %d)"
 
-#: src/modules/X11/devX11.c:3397
+#: src/modules/X11/devX11.c:3408
 msgid "cannot allocate memory for X11Routines structure"
 msgstr "affectation m�moire impossible pour la structure X11Routines"
 
-#: src/modules/internet/internet.c:188 src/modules/internet/internet.c:192
-#: src/modules/internet/internet.c:198 src/modules/internet/internet.c:210
+#: src/modules/internet/internet.c:113
+msgid "for https:// URLs use method = \"wininet\""
+msgstr ""
+
+#: src/modules/internet/internet.c:153 src/modules/internet/internet.c:274
+#: src/modules/internet/internet.c:758
+#, fuzzy, c-format
+msgid "scheme not supported in URL '%s'"
+msgstr "red�marrages non support�s dans 'eval'"
+
+#: src/modules/internet/internet.c:348 src/modules/internet/internet.c:352
+#: src/modules/internet/internet.c:357 src/modules/internet/internet.c:381
+#: src/modules/internet/libcurl.c:791 src/modules/internet/libcurl.c:795
+#: src/modules/internet/libcurl.c:801 src/modules/internet/libcurl.c:814
+#: src/modules/internet/libcurl.c:822
 msgid "allocation of url connection failed"
 msgstr "erreur d'allocation d'une connexion URL"
 
-#: src/modules/internet/internet.c:286
+#: src/modules/internet/internet.c:455
 msgid "only first element of 'url' argument used"
 msgstr "seul le premier �l�ment de l'argument 'url' est utilis�"
 
-#: src/modules/internet/internet.c:292
+#: src/modules/internet/internet.c:461
 msgid "only first element of 'destfile' argument used"
 msgstr "seul le premier �l�ment de l'argument 'destfile' est utilis�"
 
-#: src/modules/internet/internet.c:317
+#: src/modules/internet/internet.c:480 src/modules/internet/libcurl.c:499
 msgid "Download progress"
 msgstr "Progression du t�l�chargement"
 
-#: src/modules/internet/internet.c:339
+#: src/modules/internet/internet.c:502
 #, c-format
 msgid "cannot open URL '%s', reason '%s'"
 msgstr "impossible d'ouvrir l'URL '%s', � cause de '%s'"
 
-#: src/modules/internet/internet.c:346 src/modules/internet/internet.c:372
-#: src/modules/internet/internet.c:474
+#: src/modules/internet/internet.c:509 src/modules/internet/internet.c:536
+#: src/modules/internet/internet.c:661
 #, c-format
 msgid "cannot open destfile '%s', reason '%s'"
 msgstr "impossible d'ouvrir le fichier de destination '%s', � cause de '%s'"
 
-#: src/modules/internet/internet.c:377 src/modules/internet/internet.c:479
+#: src/modules/internet/internet.c:541 src/modules/internet/internet.c:666
+#: src/modules/internet/libcurl.c:530
 #, c-format
 msgid "trying URL '%s'\n"
 msgstr "essai de l'URL '%s'\n"
 
-#: src/modules/internet/internet.c:384 src/modules/internet/internet.c:486
-msgid "opened URL\n"
-msgstr "URL ouverte\n"
-
-#: src/modules/internet/internet.c:455 src/modules/internet/internet.c:560
-#, c-format
-msgid "downloaded length %d != reported length %d"
+#: src/modules/internet/internet.c:640 src/modules/internet/internet.c:751
+#: src/modules/internet/libcurl.c:578
+#, fuzzy, c-format
+msgid "downloaded length %0.f != reported length %0.f"
 msgstr "taille t�l�charg�e %d != taille d�clar�e %d"
 
-#: src/modules/internet/internet.c:460 src/modules/internet/internet.c:565
+#: src/modules/internet/internet.c:645 src/modules/internet/internet.c:756
 #, c-format
 msgid "cannot open URL '%s'"
 msgstr "impossible d'ouvrir l'URL '%s'"
 
-#: src/modules/internet/internet.c:593 src/modules/internet/internet.c:828
-#, c-format
-msgid "cannot open: HTTP status was '%d %s'"
+#: src/modules/internet/internet.c:779 src/modules/internet/internet.c:944
+#, fuzzy, c-format
+msgid "cannot open URL '%s': HTTP status was '%d %s'"
 msgstr "ouverture impossible : le statut HTTP �tait '%d %s'"
 
-#: src/modules/internet/internet.c:772 src/modules/internet/internet.c:935
-msgid "InternetOpenUrl timed out"
-msgstr "d�lai d�pass� pour InternetOpenUrl"
-
-#: src/modules/internet/internet.c:799 src/modules/internet/internet.c:813
-#: src/modules/internet/internet.c:957 src/modules/internet/internet.c:966
+#: src/modules/internet/internet.c:915 src/modules/internet/internet.c:929
+#: src/modules/internet/internet.c:1019 src/modules/internet/internet.c:1028
 #, c-format
 msgid "InternetOpenUrl failed: '%s'"
 msgstr "�chec de InternetOpenUrl : '%s'"
 
-#: src/modules/internet/internet.c:870
-msgid "Internet read timed out"
-msgstr "D�lai de lecture d�pass� sur internet"
+#: src/modules/internet/libcurl.c:159
+#, fuzzy, c-format
+msgid "URL '%s': status was '%d %s'"
+msgstr "ouverture impossible : le statut HTTP �tait '%d %s'"
+
+#: src/modules/internet/libcurl.c:163
+#, c-format
+msgid "URL '%s': status was '%s'"
+msgstr ""
+
+#: src/modules/internet/libcurl.c:240
+#, fuzzy
+msgid "curlGetHeaders is not supported on this platform"
+msgstr "nsl() ne fonctionne pas sur cette architecture"
+
+#: src/modules/internet/libcurl.c:249 src/modules/internet/libcurl.c:252
+#, fuzzy, c-format
+msgid "invalid %s argument"
+msgstr "argument '%s' incorrect"
+
+#: src/modules/internet/libcurl.c:269
+#, c-format
+msgid ""
+"libcurl error code %d\n"
+"\t%s\n"
+msgstr ""
+
+#: src/modules/internet/libcurl.c:404
+#, fuzzy
+msgid "download.file(method = \"libcurl\") is not supported on this platform"
+msgstr "nsl() ne fonctionne pas sur cette architecture"
+
+#: src/modules/internet/libcurl.c:420
+#, fuzzy
+msgid "lengths of 'url' and 'destfile' must match"
+msgstr "les longueurs de 'import' et 'export' doivent correspondre"
+
+#: src/modules/internet/libcurl.c:481
+#, fuzzy, c-format
+msgid "URL %s: cannot open destfile '%s', reason '%s'"
+msgstr "impossible d'ouvrir le fichier de destination '%s', � cause de '%s'"
+
+#: src/modules/internet/libcurl.c:593
+#, fuzzy
+msgid "cannot download all files"
+msgstr "impossible d'ouvrir le fichier '%s'"
+
+#: src/modules/internet/libcurl.c:727
+#, fuzzy
+msgid "cannot read from connection"
+msgstr "impossible de lire depuis la connexion"
 
-#: src/modules/internet/nanoftp.c:288 src/modules/internet/nanoftp.c:301
-#: src/modules/internet/nanoftp.c:312 src/modules/internet/nanoftp.c:346
-#: src/modules/internet/nanoftp.c:356
+#: src/modules/internet/libcurl.c:763
+#, fuzzy
+msgid "cannot open connection"
+msgstr "impossible d'ouvrir la connexion"
+
+#: src/modules/internet/libcurl.c:826
+#, fuzzy
+msgid "url(method = \"libcurl\") is not supported on this platform"
+msgstr "nsl() ne fonctionne pas sur cette architecture"
+
+#: src/modules/internet/nanoftp.c:289 src/modules/internet/nanoftp.c:302
+#: src/modules/internet/nanoftp.c:313 src/modules/internet/nanoftp.c:347
+#: src/modules/internet/nanoftp.c:357
 msgid "RxmlNanoFTPScanURL: overlong (invalid?) URL"
 msgstr "RxmlNanoFTPScanURL : URL trop longue (incorrecte ?)"
 
-#: src/modules/internet/nanoftp.c:389
+#: src/modules/internet/nanoftp.c:390
 msgid "removing FTP proxy info"
 msgstr "suppression des informations de proxy FTP"
 
-#: src/modules/internet/nanoftp.c:391
+#: src/modules/internet/nanoftp.c:392
 #, c-format
 msgid "using FTP proxy '%s'"
 msgstr "utilisation du proxy FTP '%s'"
 
-#: src/modules/internet/nanoftp.c:402 src/modules/internet/nanoftp.c:431
+#: src/modules/internet/nanoftp.c:403 src/modules/internet/nanoftp.c:432
 msgid "RxmlNanoFTPScanProxy: overlong (invalid?) URL"
 msgstr "RxmlNanoFTPScanProxy : URL trop longue (incorrecte ?)"
 
-#: src/modules/internet/nanoftp.c:830
+#: src/modules/internet/nanoftp.c:833
 msgid "cannot resolve host"
 msgstr "impossible de r�soudre le nom d'h�te"
 
-#: src/modules/internet/nanoftp.c:860
+#: src/modules/internet/nanoftp.c:863
 msgid "failed to connect to server"
 msgstr "�chec de connexion au serveur"
 
-#: src/modules/internet/nanoftp.c:871
+#: src/modules/internet/nanoftp.c:874
 msgid "failed to get response from server"
 msgstr "aucune r�ponse du serveur"
 
-#: src/modules/internet/nanoftp.c:1134
+#: src/modules/internet/nanoftp.c:1137
 msgid "RxmlNanoFTPGetConnection: failed to create socket"
 msgstr ""
 "RxmlNanoFTPGetConnection : erreur de cr�ation de connecteur logiciel (socket)"
 
-#: src/modules/internet/nanoftp.c:1180
+#: src/modules/internet/nanoftp.c:1183
 msgid "failed to create a data connection"
 msgstr "�chec de cr�ation d'une connexion de donn�es"
 
-#: src/modules/internet/nanoftp.c:1188
+#: src/modules/internet/nanoftp.c:1191
 msgid "failed to bind a port"
 msgstr "�chec de liaison � un port"
 
-#: src/modules/internet/nanoftp.c:1195
+#: src/modules/internet/nanoftp.c:1198
 #, c-format
 msgid "could not listen on port %d"
 msgstr "�coute impossible sur le port %d"
 
-#: src/modules/internet/nanohttp.c:370 src/modules/internet/nanohttp.c:398
-#: src/modules/internet/nanohttp.c:407
+#: src/modules/internet/nanohttp.c:369 src/modules/internet/nanohttp.c:400
+#: src/modules/internet/nanohttp.c:412
 msgid "RxmlNanoHTTPScanURL: overlong (invalid?) URL"
 msgstr "RxmlNanoHTTPScanURL : URL trop longue (incorrecte ?)"
 
-#: src/modules/internet/nanohttp.c:441
+#: src/modules/internet/nanohttp.c:446
 msgid "removing HTTP proxy info"
 msgstr "suppression des informations de proxy HTTP"
 
-#: src/modules/internet/nanohttp.c:443
+#: src/modules/internet/nanohttp.c:448
 #, c-format
 msgid "using HTTP proxy '%s'"
 msgstr "utilisation du proxy HTTP '%s'"
 
-#: src/modules/internet/nanohttp.c:454 src/modules/internet/nanohttp.c:490
+#: src/modules/internet/nanohttp.c:459 src/modules/internet/nanohttp.c:497
 msgid "RxmlNanoHTTPScanProxy: overlong (invalid?) URL"
 msgstr "RxmlNanoHTTPScanProxy : URL trop longue (incorrecte ?)"
 
-#: src/modules/internet/nanohttp.c:1107
+#: src/modules/internet/nanohttp.c:1135
 #, c-format
 msgid "unable to resolve '%s'"
 msgstr "incapable de r�soudre '%s'"
 
-#: src/modules/internet/nanohttp.c:1134
+#: src/modules/internet/nanohttp.c:1168
 #, c-format
 msgid "connected to '%s' on port %d."
 msgstr "connexion � '%s' sur le port %d."
 
-#: src/modules/internet/nanohttp.c:1139
+#: src/modules/internet/nanohttp.c:1173
 #, c-format
 msgid "unable to connect to '%s' on port %d."
 msgstr "connexion � '%s' impossible sur le port %d."
 
-#: src/modules/internet/nanohttp.c:1443
+#: src/modules/internet/nanohttp.c:1477
 #, c-format
 msgid "redirect to: '%s'"
 msgstr "redirection vers : '%s'"
 
-#: src/modules/internet/nanohttp.c:1454
+#: src/modules/internet/nanohttp.c:1488
 msgid "too many redirects, aborting ..."
 msgstr "trop de redirections, annulation ..."
 
@@ -6977,11 +7127,11 @@ msgstr "l'argument type[1]='%s' doit 
 #: src/modules/lapack/Lapack.c:730 src/modules/lapack/Lapack.c:779
 #: src/modules/lapack/Lapack.c:786 src/modules/lapack/Lapack.c:834
 #: src/modules/lapack/Lapack.c:840 src/modules/lapack/Lapack.c:894
-#: src/modules/lapack/Lapack.c:900 src/modules/lapack/Lapack.c:1134
-#: src/modules/lapack/Lapack.c:1140 src/modules/lapack/Lapack.c:1188
-#: src/modules/lapack/Lapack.c:1195 src/modules/lapack/Lapack.c:1199
-#: src/modules/lapack/Lapack.c:1227 src/modules/lapack/Lapack.c:1234
-#: src/modules/lapack/Lapack.c:1254
+#: src/modules/lapack/Lapack.c:900 src/modules/lapack/Lapack.c:1135
+#: src/modules/lapack/Lapack.c:1141 src/modules/lapack/Lapack.c:1189
+#: src/modules/lapack/Lapack.c:1196 src/modules/lapack/Lapack.c:1200
+#: src/modules/lapack/Lapack.c:1228 src/modules/lapack/Lapack.c:1235
+#: src/modules/lapack/Lapack.c:1255
 #, c-format
 msgid "error code %d from Lapack routine '%s'"
 msgstr "code d'erreur %d dans le sous-programme Lapack '%s'"
@@ -7064,28 +7214,28 @@ msgstr "code d'erreur [%d] dans le sous-programme Lapack 'ztrcon()'"
 msgid "'a' must be a complex matrix"
 msgstr "'a' doit �tre une matrice complexe"
 
-#: src/modules/lapack/Lapack.c:535 src/modules/lapack/Lapack.c:1042
+#: src/modules/lapack/Lapack.c:535 src/modules/lapack/Lapack.c:1043
 msgid "'a' is 0-diml"
 msgstr "'a' est de dimension nulle"
 
-#: src/modules/lapack/Lapack.c:537 src/modules/lapack/Lapack.c:1044
+#: src/modules/lapack/Lapack.c:537 src/modules/lapack/Lapack.c:1045
 #, c-format
 msgid "'a' (%d x %d) must be square"
 msgstr "'a' (%d x %d) doit �tre carr�e"
 
-#: src/modules/lapack/Lapack.c:543 src/modules/lapack/Lapack.c:1050
+#: src/modules/lapack/Lapack.c:543 src/modules/lapack/Lapack.c:1051
 msgid "no right-hand side in 'b'"
 msgstr "aucun membre de droite dans 'b'"
 
 #: src/modules/lapack/Lapack.c:546 src/modules/lapack/Lapack.c:560
-#: src/modules/lapack/Lapack.c:1053 src/modules/lapack/Lapack.c:1069
+#: src/modules/lapack/Lapack.c:1054 src/modules/lapack/Lapack.c:1070
 #, c-format
 msgid "'b' (%d x %d) must be compatible with 'a' (%d x %d)"
 msgstr "'b' (%d x %d) doit �tre compatible avec 'a' (%d x %d)"
 
 #: src/modules/lapack/Lapack.c:581 src/modules/lapack/Lapack.c:948
-#: src/modules/lapack/Lapack.c:962 src/modules/lapack/Lapack.c:1017
-#: src/modules/lapack/Lapack.c:1091
+#: src/modules/lapack/Lapack.c:962 src/modules/lapack/Lapack.c:1018
+#: src/modules/lapack/Lapack.c:1092
 #, c-format
 msgid "argument %d of Lapack routine %s had invalid value"
 msgstr "valeur incorrecte pour l'argument %d du sous-programme Lapack %s"
@@ -7095,7 +7245,7 @@ msgid "'b' must be a complex matrix"
 msgstr "'b' doit �tre une matrice complexe"
 
 #: src/modules/lapack/Lapack.c:670 src/modules/lapack/Lapack.c:716
-#: src/modules/lapack/Lapack.c:1181 src/modules/lapack/Lapack.c:1220
+#: src/modules/lapack/Lapack.c:1182 src/modules/lapack/Lapack.c:1221
 #, c-format
 msgid "right-hand side should have %d not %d rows"
 msgstr "le membre de droite devrait avoir %d lignes et non %d"
@@ -7112,13 +7262,13 @@ msgstr "les matrices de 2^31 ou plus d'
 msgid "'x' must be a square complex matrix"
 msgstr "'x' doit �tre une matrice carr�e num�rique complexe"
 
-#: src/modules/lapack/Lapack.c:926 src/modules/lapack/Lapack.c:1000
-#: src/modules/lapack/Lapack.c:1039 src/modules/lapack/Lapack.c:1114
-#: src/modules/lapack/Lapack.c:1245
+#: src/modules/lapack/Lapack.c:926 src/modules/lapack/Lapack.c:1001
+#: src/modules/lapack/Lapack.c:1040 src/modules/lapack/Lapack.c:1115
+#: src/modules/lapack/Lapack.c:1246
 msgid "'a' must be a numeric matrix"
 msgstr "'a' doit �tre une matrice num�rique"
 
-#: src/modules/lapack/Lapack.c:933 src/modules/lapack/Lapack.c:1250
+#: src/modules/lapack/Lapack.c:933 src/modules/lapack/Lapack.c:1251
 msgid "'a' must be a square matrix"
 msgstr "'a' doit �tre une matrice carr�e"
 
@@ -7135,42 +7285,42 @@ msgstr "le mineur dominant d'ordre %d n'est pas d
 msgid "the matrix is either rank-deficient or indefinite"
 msgstr "la matrice n'est ni d�ficiente de rang ou ind�finie"
 
-#: src/modules/lapack/Lapack.c:987
+#: src/modules/lapack/Lapack.c:988
 msgid "'size' argument must be a positive integer"
 msgstr "l'argument 'size' doit �tre un entier strictement positif"
 
-#: src/modules/lapack/Lapack.c:1002
+#: src/modules/lapack/Lapack.c:1003
 #, c-format
 msgid "'size' cannot exceed ncol(x) = %d"
 msgstr "l'argument 'size' ne doit pas d�passer ncol(x) = %d"
 
-#: src/modules/lapack/Lapack.c:1003
+#: src/modules/lapack/Lapack.c:1004
 #, c-format
 msgid "'size' cannot exceed nrow(x) = %d"
 msgstr "l'argument 'size' ne doit pas d�passer nrow(x) = %d"
 
-#: src/modules/lapack/Lapack.c:1015
+#: src/modules/lapack/Lapack.c:1016
 #, c-format
 msgid "element (%d, %d) is zero, so the inverse cannot be computed"
 msgstr "l'�l�ment (%d, %d) est nul, donc l'inverse ne peut �tre calcul�"
 
-#: src/modules/lapack/Lapack.c:1094
+#: src/modules/lapack/Lapack.c:1095
 #, c-format
 msgid "Lapack routine %s: system is exactly singular: U[%d,%d] = 0"
 msgstr "routine Lapack %s : le syst�me est exactement singulier : U[%d,%d] = 0"
 
-#: src/modules/lapack/Lapack.c:1102
+#: src/modules/lapack/Lapack.c:1103
 #, c-format
 msgid "system is computationally singular: reciprocal condition number = %g"
 msgstr ""
 "le syst�me est num�riquement singulier : conditionnement de la r�ciproque = "
 "%g"
 
-#: src/modules/lapack/Lapack.c:1174 src/modules/lapack/Lapack.c:1212
+#: src/modules/lapack/Lapack.c:1175 src/modules/lapack/Lapack.c:1213
 msgid "'b' must be a numeric matrix"
 msgstr "'b' doit �tre une matrice num�rique"
 
-#: src/modules/lapack/Lapack.c:1246
+#: src/modules/lapack/Lapack.c:1247
 msgid "argument 'logarithm' must be logical"
 msgstr "l'argument 'logarithm' doit �tre de type logique"
 
@@ -7179,8 +7329,8 @@ msgid "bessel_i allocation error"
 msgstr "erreur d'allocation pour bessel_i"
 
 #: src/nmath/bessel_i.c:77 src/nmath/bessel_i.c:122
-#, c-format
-msgid "bessel_i(%g): ncalc (=%ld) != nb (=%ld); alpha=%g. Arg. out of range?\n"
+#, fuzzy, c-format
+msgid "bessel_i(%g): ncalc (=%d) != nb (=%d); alpha=%g. Arg. out of range?\n"
 msgstr ""
 "bessel_i(%g): ncalc (=%ld) != nb (=%ld); alpha=%g. Argument hors limites ?\n"
 
@@ -7189,18 +7339,23 @@ msgstr ""
 msgid "bessel_i(%g,nu=%g): precision lost in result\n"
 msgstr "bessel_i(%g,nu=%g) : perte de pr�cision dans le r�sultat\n"
 
-#: src/nmath/bessel_j.c:67
+#: src/nmath/bessel_j.c:64 src/nmath/bessel_j.c:118
+#, c-format
+msgid "besselJ(x, nu): nu=%g too large for bessel_j() algorithm"
+msgstr ""
+
+#: src/nmath/bessel_j.c:72
 msgid "bessel_j allocation error"
 msgstr "erreur d'allocation pour bessel_j"
 
-#: src/nmath/bessel_j.c:75 src/nmath/bessel_j.c:118
-#, c-format
-msgid "bessel_j(%g): ncalc (=%ld) != nb (=%ld); alpha=%g. Arg. out of range?\n"
+#: src/nmath/bessel_j.c:80 src/nmath/bessel_j.c:127
+#, fuzzy, c-format
+msgid "bessel_j(%g): ncalc (=%d) != nb (=%d); alpha=%g. Arg. out of range?\n"
 msgstr ""
 "bessel_j(%g) : ncalc (=%ld) != nb (=%ld) ; alpha=%g. Argument hors "
 "limites ?\n"
 
-#: src/nmath/bessel_j.c:78 src/nmath/bessel_j.c:121
+#: src/nmath/bessel_j.c:83 src/nmath/bessel_j.c:130
 #, c-format
 msgid "bessel_j(%g,nu=%g): precision lost in result\n"
 msgstr "bessel_j(%g,nu=%g) : perte de pr�cision dans le r�sultat\n"
@@ -7210,8 +7365,8 @@ msgid "bessel_k allocation error"
 msgstr "erreur d'allocation pour bessel_k"
 
 #: src/nmath/bessel_k.c:71 src/nmath/bessel_k.c:108
-#, c-format
-msgid "bessel_k(%g): ncalc (=%ld) != nb (=%ld); alpha=%g. Arg. out of range?\n"
+#, fuzzy, c-format
+msgid "bessel_k(%g): ncalc (=%d) != nb (=%d); alpha=%g. Arg. out of range?\n"
 msgstr ""
 "bessel_k(%g) : ncalc (=%ld) != nb (=%ld); alpha=%g. Argument hors limites ?\n"
 
@@ -7220,17 +7375,22 @@ msgstr ""
 msgid "bessel_k(%g,nu=%g): precision lost in result\n"
 msgstr "bessel_k(%g,nu=%g) : perte de pr�cision dans le r�sultat\n"
 
-#: src/nmath/bessel_y.c:66
+#: src/nmath/bessel_y.c:63 src/nmath/bessel_y.c:125
+#, c-format
+msgid "besselY(x, nu): nu=%g too large for bessel_y() algorithm"
+msgstr ""
+
+#: src/nmath/bessel_y.c:71
 msgid "bessel_y allocation error"
 msgstr "erreur d'allocation pour bessel_y"
 
-#: src/nmath/bessel_y.c:82 src/nmath/bessel_y.c:127
-#, c-format
-msgid "bessel_y(%g): ncalc (=%ld) != nb (=%ld); alpha=%g. Arg. out of range?\n"
+#: src/nmath/bessel_y.c:87 src/nmath/bessel_y.c:136
+#, fuzzy, c-format
+msgid "bessel_y(%g): ncalc (=%d) != nb (=%d); alpha=%g. Arg. out of range?\n"
 msgstr ""
 "bessel_y(%g) : ncalc (=%ld) != nb (=%ld); alpha=%g. Argument hors limites ?\n"
 
-#: src/nmath/bessel_y.c:85 src/nmath/bessel_y.c:130
+#: src/nmath/bessel_y.c:90 src/nmath/bessel_y.c:139
 #, c-format
 msgid "bessel_y(%g,nu=%g): precision lost in result\n"
 msgstr "bessel_y(%g,nu=%g) : perte de pr�cision dans le r�sultat\n"
@@ -7240,42 +7400,42 @@ msgstr "bessel_y(%g,nu=%g) : perte de pr
 msgid "'k' (%.2f) must be integer, rounded to %.0f"
 msgstr "'k' (%.2f) doit �tre entier, arrondi � %.0f"
 
-#: src/nmath/nmath.h:141
+#: src/nmath/nmath.h:156
 #, c-format
 msgid "argument out of domain in '%s'\n"
 msgstr "valeur d'argument hors domaine dans '%s'\n"
 
-#: src/nmath/nmath.h:144
+#: src/nmath/nmath.h:159
 #, c-format
 msgid "value out of range in '%s'\n"
 msgstr "valeur d'argument hors intervalle dans '%s'\n"
 
-#: src/nmath/nmath.h:147
+#: src/nmath/nmath.h:162
 #, c-format
 msgid "convergence failed in '%s'\n"
 msgstr "non convergence dans '%s'\n"
 
-#: src/nmath/nmath.h:150
+#: src/nmath/nmath.h:165
 #, c-format
 msgid "full precision may not have been achieved in '%s'\n"
 msgstr "la pr�cision compl�te ne sera peut �tre pas atteinte dans '%s'\n"
 
-#: src/nmath/nmath.h:153
+#: src/nmath/nmath.h:168
 #, c-format
 msgid "underflow occurred in '%s'\n"
 msgstr "d�passement de m�moire vers le bas dans '%s'\n"
 
-#: src/nmath/pbeta.c:48
-#, c-format
-msgid "pbeta_raw() -> bratio() gave error code %d"
+#: src/nmath/pbeta.c:64
+#, fuzzy, c-format
+msgid "pbeta_raw(%g, a=%g, b=%g, ..) -> bratio() gave error code %d"
 msgstr "pbeta_raw() -> bratio() a renvoy� le code d'erreur %d"
 
-#: src/nmath/pnbinom.c:79
+#: src/nmath/pnbinom.c:82
 #, c-format
 msgid "pnbinom_mu() -> bratio() gave error code %d"
 msgstr "pnbinom_mu() -> bratio() a renvoy� le code d'erreur %d"
 
-#: src/nmath/pnchisq.c:246
+#: src/nmath/pnchisq.c:295
 #, c-format
 msgid "pnchisq(x=%g, ..): not converged in %d iter."
 msgstr "pnchisq(x=%g, ..) : absence de convergence en %d it�rations."
@@ -7317,7 +7477,7 @@ msgstr "impossible d'acc
 msgid "X11 module cannot be loaded"
 msgstr "impossible de charger le module X11"
 
-#: src/unix/X11.c:126 src/unix/X11.c:132 src/unix/X11.c:138 src/unix/X11.c:144
+#: src/unix/X11.c:144 src/unix/X11.c:150 src/unix/X11.c:156 src/unix/X11.c:162
 msgid "X11 is not available"
 msgstr "X11 indisponible"
 
@@ -7351,7 +7511,7 @@ msgstr ""
 "Chargement dynamique partiel explicite indisponible sur cette architecture. "
 "Utilisation de la valeur par d�faut."
 
-#: src/unix/dynload.c:240
+#: src/unix/dynload.c:232
 msgid "cannot get working directory!"
 msgstr "impossible d'obtenir le r�pertoire de travail !"
 
@@ -7367,12 +7527,12 @@ msgstr ""
 "Une situation inhabituelle s'est produite dans l'imbrication des entr�es "
 "readline. Veuillez signaler l'anomalie � l'aide de bug.report()"
 
-#: src/unix/sys-std.c:1082 src/unix/sys-std.c:1249
+#: src/unix/sys-std.c:1085 src/unix/sys-std.c:1255
 #, c-format
 msgid "problem in saving the history file '%s'"
 msgstr "probl�me lors de la sauvegarde du fichier historique '%s'"
 
-#: src/unix/sys-std.c:1156
+#: src/unix/sys-std.c:1162
 #, c-format
 msgid ""
 "Cannot open file '%s': %s\n"
@@ -7381,89 +7541,219 @@ msgstr ""
 "impossible d'ouvrir le fichier '%s' : %s\n"
 "\n"
 
-#: src/unix/sys-std.c:1220 src/unix/sys-std.c:1243
+#: src/unix/sys-std.c:1226 src/unix/sys-std.c:1249
 msgid "'file' argument is too long"
 msgstr "argument 'file' trop long"
 
-#: src/unix/sys-std.c:1226 src/unix/sys-std.c:1228
+#: src/unix/sys-std.c:1232 src/unix/sys-std.c:1234
 msgid "no history mechanism available"
 msgstr "aucun m�canisme d'historique des commandes disponible"
 
-#: src/unix/sys-std.c:1255
+#: src/unix/sys-std.c:1261
 msgid "problem in truncating the history file"
 msgstr "probl�me lors de la troncature du fichier d'historique des commandes"
 
-#: src/unix/sys-std.c:1257 src/unix/sys-std.c:1259
+#: src/unix/sys-std.c:1263 src/unix/sys-std.c:1265
 msgid "no history available to save"
 msgstr "aucun historique des commandes disponible pour la sauvegarde"
 
-#: src/unix/sys-std.c:1271
+#: src/unix/sys-std.c:1277
 msgid "invalid timestamp"
 msgstr "marque (timestamp) incorrecte"
 
-#: src/unix/sys-unix.c:251
+#: src/unix/sys-unix.c:248
 msgid "non-empty character argument expected"
 msgstr "argument de taille non nulle et de type caract�re attendu"
 
-#: src/unix/sys-unix.c:254
+#: src/unix/sys-unix.c:251
 msgid "'intern' must be logical and not NA"
 msgstr "'intern' doit �tre une valeur logique et non NA"
 
-#: src/unix/sys-unix.c:266
+#: src/unix/sys-unix.c:269
 #, c-format
 msgid "cannot popen '%s', probable reason '%s'"
 msgstr "popen impossible pour '%s', cause probable : '%s'"
 
-#: src/unix/sys-unix.c:271
+#: src/unix/sys-unix.c:279
 #, c-format
 msgid "line %d may be truncated in call to system(, intern = TRUE)"
 msgstr ""
 "la ligne %d est probablement tronqu�e lors de l'appel � system(, intern = "
 "TRUE)"
 
-#: src/unix/sys-unix.c:288
+#: src/unix/sys-unix.c:301
 #, c-format
 msgid "error in running command: '%s'"
 msgstr "erreur lors de l'ex�cution de la commande : '%s'"
 
-#: src/unix/sys-unix.c:290
+#: src/unix/sys-unix.c:303
 msgid "error in running command"
 msgstr "erreur lors de l'ex�cution d'une commande"
 
-#: src/unix/sys-unix.c:294
+#: src/unix/sys-unix.c:307
 #, c-format
 msgid "running command '%s' had status %d and error message '%s'"
 msgstr ""
 "l'ex�cution de la commande '%s' renvoie un statut %d et le message d'erreur "
 "'%s'"
 
-#: src/unix/sys-unix.c:399
+#: src/unix/sys-unix.c:412
 msgid "Sys.info() is not implemented on this system"
 msgstr "Sys.info() n'est pas impl�ment� sur ce syst�me"
 
-#: src/unix/system.c:257
+#: src/unix/system.c:267
 #, c-format
 msgid "WARNING: --gui or -g without value ignored"
 msgstr "AVIS : l'utilisation de --gui ou -g sans fournir de valeur est ignor�e"
 
-#: src/unix/system.c:275
+#: src/unix/system.c:285
 #, c-format
 msgid "WARNING: unknown gui '%s', using X11\n"
 msgstr "AVIS : interface graphique '%s' inconnue, utilisation d'X11\n"
 
-#: src/unix/system.c:278
+#: src/unix/system.c:288
 #, c-format
 msgid "WARNING: unknown gui '%s', using none\n"
 msgstr "AVIS : interface graphique '%s' inconnue, aucune n'est utilis�e\n"
 
-#: src/unix/system.c:388
+#: src/unix/system.c:373
 msgid "creating temporary file for '-e' failed"
 msgstr "la cr�ation d'un fichier temporaire pour '-e' a �chou�"
 
-#: src/unix/system.c:469
+#: src/unix/system.c:454
 msgid "WARNING: Only editing the first in the list of files"
 msgstr "AVIS : �dition uniquement du premier fichier de la liste"
 
+#~ msgid "'what' must be a character string or a function"
+#~ msgstr "'what' doit �tre une cha�ne de caract�res ou une fonction"
+
+#~ msgid "sockets are not available on this system"
+#~ msgstr ""
+#~ "les connecteurs logiciels (sockets) ne sont pas disponibles sur ce syst�me"
+
+#~ msgid "no function to restart"
+#~ msgstr "aucune function � relancer"
+
+#~ msgid "argument must be a closure"
+#~ msgstr "l'argument doit �tre une fermeture (closure)"
+
+#~ msgid "'hostname' must be a character vector of length 1"
+#~ msgstr "'hostname' doit �tre un vecteur de caract�res de longueur 1"
+
+#~ msgid "nsl() was unable to resolve host '%s'"
+#~ msgstr "nsl() est incapable de r�soudre le nom de la machine hote '%s'"
+
+#~ msgid "unknown format returned by C function 'gethostbyname'"
+#~ msgstr "format inconnu renvoy� par la fonction C 'gethostbyname'"
+
+#~ msgid "nsl() is not supported on this platform"
+#~ msgstr "nsl() ne fonctionne pas sur cette architecture"
+
+#~ msgid "too large a range of values in 'x'"
+#~ msgstr "intervalle de valeurs trop grand en 'x'"
+
+#~ msgid "non-numeric argument"
+#~ msgstr "argument non num�rique"
+
+#~ msgid "unsupported URL scheme"
+#~ msgstr "sch�ma URL non support�"
+
+#~ msgid "'dimnames' must be a list"
+#~ msgstr "'dimnames' doit �tre une liste"
+
+#~ msgid "'args' must be a list"
+#~ msgstr "'args' doit �tre une liste"
+
+#~ msgid "binary operations require two arguments"
+#~ msgstr "les op�rations binaires n�cessitent deux arguments"
+
+#~ msgid "opened URL\n"
+#~ msgstr "URL ouverte\n"
+
+#~ msgid "internet routines were already initialized"
+#~ msgstr "les routines internet ont d�j� �t� initialis�es"
+
+#~ msgid "'msg1' must be a character string"
+#~ msgstr "'msg1' doit �tre une cha�ne de caract�res"
+
+#~ msgid "'msg2' must be a character string"
+#~ msgstr "'msg2' doit �tre une cha�ne de caract�res"
+
+#~ msgid "argument 'code' must be a character string"
+#~ msgstr "l'argument 'code' doit �tre une cha�ne de caract�res"
+
+#~ msgid "argument 'type' must be a character string"
+#~ msgstr "l'argument 'type' doit �tre une cha�ne de caract�res"
+
+#~ msgid "InternetOpenUrl timed out"
+#~ msgstr "d�lai d�pass� pour InternetOpenUrl"
+
+#~ msgid "Internet read timed out"
+#~ msgstr "D�lai de lecture d�pass� sur internet"
+
+#~ msgid "unable to find a closure from within which 'match.call' was called"
+#~ msgstr ""
+#~ "impossible de trouver la fermeture (closure) � partir de laquelle 'match."
+#~ "call' a �t� appel�"
+
+#~ msgid "vfont routines cannot be accessed in module"
+#~ msgstr "sous-programmes vfont inaccessibles dans le module"
+
+#~ msgid "Hershey fonts cannot be loaded"
+#~ msgstr "impossible de charger les fontes Hershey "
+
+#~ msgid "invalid generic function in 'usemethod'"
+#~ msgstr "function g�n�rique incorrecte dans 'usemethod'"
+
+#~ msgid "'UseMethod' called from outside a function"
+#~ msgstr "'UseMethod' appel� en dehors d'une fonction"
+
+#~ msgid "first argument must be a generic name"
+#~ msgstr "le premier argument doit �tre un nom g�n�rique"
+
+#~ msgid ""
+#~ "explicit request not to duplicate arguments in call to '%s', but argument "
+#~ "%d is of the wrong type (%d != %d)"
+#~ msgstr ""
+#~ "demande explicite de ne pas dupliquer les arguments dans l'appel � '%s', "
+#~ "mais l'argument %d est du mauvais type (%d != %d)"
+
+#~ msgid "single values not returned if not duplicated"
+#~ msgstr ""
+#~ "les valeurs uniques ne sont pas renvoy�es si elles ne sont pas dupliqu�es"
+
+#~ msgid "character variables must be duplicated in .C/.Fortran"
+#~ msgstr ""
+#~ "les variables de caract�res doivent �tre dupliqu�es en .C / .Fortran"
+
+#~ msgid "call name too long in '%s'"
+#~ msgstr "nom d'appel trop long dans '%s'"
+
+#~ msgid "generic name too long in '%s'"
+#~ msgstr "nom g�n�rique trop long dans '%s'"
+
+#~ msgid "method name too long in '%s'"
+#~ msgstr "nom de m�thode trop long dans '%s'"
+
+#~ msgid "%d arguments passed to 'log' which requires 1 or 2"
+#~ msgstr "%d arguments pass�s � 'log' qui en exige 1 ou 2"
+
+#~ msgid ""
+#~ "Warning in %s :\n"
+#~ "  %s\n"
+#~ msgstr ""
+#~ "Avis dans %s :\n"
+#~ "  %s\n"
+
+#~ msgid "input"
+#~ msgstr "entr�e"
+
+#~ msgid "symbol"
+#~ msgstr "symbole"
+
+#~ msgid "assignment"
+#~ msgstr "affectation"
+
 #~ msgid "negative value in 'x'"
 #~ msgstr "valeur strictement n�gative en 'x'"
 
@@ -7567,21 +7857,12 @@ msgstr "AVIS : 
 #~ msgid "invalid return value count in call_R"
 #~ msgstr "mauvais nombre de valeurs renvoy�es par call_R"
 
-#~ msgid "internal error in unz code"
-#~ msgstr "erreur interne dans le code unz"
-
 #~ msgid "can't use R profiling while byte code profiling"
 #~ msgstr "'profilage R inutilisable lorsque du pseudo-code est profil�"
 
-#~ msgid "bad character switch offsets"
-#~ msgstr "valeur de d�calage caract�re erron�e"
-
 #~ msgid "bad switch names"
 #~ msgstr "noms des options de branchage non appropri�s"
 
-#~ msgid "bad numeric switch offsets"
-#~ msgstr "valeur de d�calage num�rique erron�e"
-
 #~ msgid "constBuf must be a generic vector"
 #~ msgstr "constBuf code doit �tre un vecteur g�n�rique"
 
@@ -7749,15 +8030,9 @@ msgstr "AVIS : 
 #~ msgid "'title' must be a character string"
 #~ msgstr "'title' doit �tre une cha�ne de caract�res"
 
-#~ msgid "'text' must be a character string"
-#~ msgstr "'text' doit �tre une cha�ne de caract�res"
-
 #~ msgid "'%s' must be length 1"
 #~ msgstr "'%s' doit �tre de taille 1"
 
-#~ msgid "'%s' must be a list"
-#~ msgstr "'%s' doit �tre une liste"
-
 #~ msgid "'%s' element %d is not a window handle"
 #~ msgstr "'%s' �l�ment %d n'est pas un identifiant de fen�tre"
 
@@ -7787,9 +8062,6 @@ msgstr "AVIS : 
 #~ msgid "'file' is not a connection"
 #~ msgstr "'file' n'est pas une connexion"
 
-#~ msgid "'dec' must be a single character"
-#~ msgstr "'dec' doit �tre un seul caract�re"
-
 #~ msgid "corrupt data frame -- length of column %d does not not match nrows"
 #~ msgstr ""
 #~ "tableau de donn�es corrompu -- la taille de la colonne %d ne correspond "
diff --git a/src/library/base/po/it.po b/src/library/base/po/it.po
index 89cc171..bada4f1 100644
--- a/src/library/base/po/it.po
+++ b/src/library/base/po/it.po
@@ -13,8 +13,8 @@
 msgid ""
 msgstr ""
 "Project-Id-Version: R\n"
-"Report-Msgid-Bugs-To: bugs.r-project.org\n"
-"POT-Creation-Date: 2014-03-27 07:46+0000\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2016-04-01 10:28-0700\n"
 "PO-Revision-Date: 2006-01-16 09:11+0100\n"
 "Last-Translator: Daniele Medri <daniele.medri2 at unibo.it>\n"
 "Language-Team: Italian <tp at lists.linux.it>\n"
@@ -60,15 +60,15 @@ msgstr "La funzione non può essere calcolata per i parametri iniziali"
 msgid "unknown type in \"CG\" method of 'optim'"
 msgstr "tipo sconosciuto nel metodo CG di optim"
 
-#: src/appl/optim.c:665
+#: src/appl/optim.c:662
 msgid "REPORT must be > 0 (method = \"L-BFGS-B\")"
 msgstr "REPORT deve essere > 0 (method = \"L-BFGS-B\")"
 
-#: src/appl/optim.c:688
+#: src/appl/optim.c:685
 msgid "L-BFGS-B needs finite values of 'fn'"
 msgstr "L-BFGS-B necessita valori finiti di 'fn'"
 
-#: src/appl/optim.c:744
+#: src/appl/optim.c:741
 #, fuzzy
 msgid "trace, REPORT must be >= 0 (method = \"SANN\")"
 msgstr "REPORT deve esser > 0 (method = \"BFGS\")"
@@ -134,122 +134,127 @@ msgstr ""
 msgid "problem in displaying '%ls'"
 msgstr ""
 
-#: src/gnuwin32/extra.c:116 src/gnuwin32/extra.c:159 src/gnuwin32/extra.c:349
-#: src/gnuwin32/extra.c:577 src/gnuwin32/extra.c:602 src/main/agrep.c:131
-#: src/main/agrep.c:135 src/main/agrep.c:775 src/main/agrep.c:780
-#: src/main/apply.c:293 src/main/apply.c:295 src/main/apply.c:298
-#: src/main/array.c:87 src/main/array.c:1137 src/main/array.c:1263
-#: src/main/array.c:1265 src/main/array.c:1266 src/main/array.c:1592
-#: src/main/array.c:1594 src/main/array.c:1596 src/main/attrib.c:196
+#: src/gnuwin32/extra.c:116 src/gnuwin32/extra.c:158 src/gnuwin32/extra.c:348
+#: src/gnuwin32/extra.c:574 src/gnuwin32/extra.c:599 src/main/agrep.c:131
+#: src/main/agrep.c:135 src/main/agrep.c:776 src/main/agrep.c:781
+#: src/main/apply.c:330 src/main/apply.c:332 src/main/apply.c:335
+#: src/main/array.c:90 src/main/array.c:1272 src/main/array.c:1411
+#: src/main/array.c:1413 src/main/array.c:1414 src/main/array.c:1758
+#: src/main/array.c:1760 src/main/array.c:1762 src/main/attrib.c:190
 #: src/main/builtin.c:88 src/main/builtin.c:97 src/main/builtin.c:116
-#: src/main/builtin.c:118 src/main/builtin.c:147 src/main/builtin.c:534
-#: src/main/builtin.c:550 src/main/builtin.c:739 src/main/builtin.c:741
-#: src/main/builtin.c:743 src/main/character.c:139 src/main/character.c:142
-#: src/main/character.c:203 src/main/character.c:1037
-#: src/main/character.c:1041 src/main/character.c:1276
-#: src/main/character.c:1280 src/main/character.c:1341
-#: src/main/character.c:1344 src/main/connections.c:1217
-#: src/main/connections.c:1223 src/main/connections.c:1226
-#: src/main/connections.c:1230 src/main/connections.c:1375
-#: src/main/connections.c:1391 src/main/connections.c:1396
-#: src/main/connections.c:1996 src/main/connections.c:2002
-#: src/main/connections.c:2006 src/main/connections.c:2010
-#: src/main/connections.c:2015 src/main/connections.c:2665
-#: src/main/connections.c:2670 src/main/connections.c:2673
-#: src/main/connections.c:2676 src/main/connections.c:3057
-#: src/main/connections.c:3062 src/main/connections.c:3068
-#: src/main/connections.c:3071 src/main/connections.c:3075
-#: src/main/connections.c:3090 src/main/connections.c:3140
-#: src/main/connections.c:3145 src/main/connections.c:3149
-#: src/main/connections.c:3153 src/main/connections.c:3157
-#: src/main/connections.c:3163 src/main/connections.c:3210
-#: src/main/connections.c:3216 src/main/connections.c:3220
-#: src/main/connections.c:3270 src/main/connections.c:3273
-#: src/main/connections.c:3547 src/main/connections.c:3550
-#: src/main/connections.c:3553 src/main/connections.c:3559
-#: src/main/connections.c:3666 src/main/connections.c:3672
-#: src/main/connections.c:3675 src/main/connections.c:3826
-#: src/main/connections.c:3829 src/main/connections.c:3833
-#: src/main/connections.c:3836 src/main/connections.c:3956
-#: src/main/connections.c:4074 src/main/connections.c:4077
-#: src/main/connections.c:4414 src/main/connections.c:4439
-#: src/main/connections.c:4474 src/main/connections.c:4489
-#: src/main/connections.c:4497 src/main/connections.c:4523
-#: src/main/connections.c:4669 src/main/connections.c:4673
-#: src/main/connections.c:4801 src/main/connections.c:4803
-#: src/main/connections.c:4805 src/main/connections.c:4833
-#: src/main/connections.c:4965 src/main/connections.c:4991
-#: src/main/connections.c:4995 src/main/connections.c:4999
-#: src/main/connections.c:5003 src/main/context.c:596 src/main/context.c:605
-#: src/main/context.c:609 src/main/datetime.c:775 src/main/datetime.c:865
-#: src/main/datetime.c:867 src/main/datetime.c:871 src/main/datetime.c:1026
-#: src/main/datetime.c:1028 src/main/datetime.c:1232 src/main/debug.c:228
-#: src/main/deparse.c:397 src/main/dotcode.c:478 src/main/dotcode.c:482
-#: src/main/dotcode.c:487 src/main/dounzip.c:322 src/main/dounzip.c:329
-#: src/main/dounzip.c:339 src/main/dounzip.c:344 src/main/dounzip.c:348
-#: src/main/dounzip.c:352 src/main/envir.c:1618 src/main/envir.c:1621
-#: src/main/envir.c:1742 src/main/envir.c:1747 src/main/envir.c:1813
-#: src/main/envir.c:1829 src/main/envir.c:1835 src/main/envir.c:1932
-#: src/main/envir.c:1940 src/main/envir.c:1947 src/main/envir.c:1958
-#: src/main/envir.c:2172 src/main/envir.c:2293 src/main/envir.c:2552
-#: src/main/envir.c:2762 src/main/envir.c:2776 src/main/envir.c:2783
-#: src/main/envir.c:2799 src/main/envir.c:3367 src/main/errors.c:1030
-#: src/main/eval.c:397 src/main/eval.c:406 src/main/eval.c:409
-#: src/main/grep.c:767 src/main/grep.c:772 src/main/grep.c:1061
-#: src/main/grep.c:1063 src/main/grep.c:1065 src/main/grep.c:1510
-#: src/main/grep.c:1514 src/main/grep.c:1519 src/main/grep.c:2323
-#: src/main/grep.c:2328 src/main/grep.c:2621 src/main/grep.c:2626
-#: src/main/memory.c:3736 src/main/paste.c:96 src/main/paste.c:395
-#: src/main/paste.c:402 src/main/paste.c:409 src/main/paste.c:414
-#: src/main/paste.c:419 src/main/paste.c:424 src/main/paste.c:427
-#: src/main/paste.c:435 src/main/paste.c:601 src/main/paste.c:606
+#: src/main/builtin.c:118 src/main/builtin.c:149 src/main/builtin.c:569
+#: src/main/builtin.c:585 src/main/builtin.c:773 src/main/builtin.c:775
+#: src/main/builtin.c:777 src/main/character.c:239 src/main/character.c:242
+#: src/main/character.c:247 src/main/character.c:788 src/main/character.c:791
+#: src/main/character.c:1289 src/main/character.c:1293
+#: src/main/character.c:1528 src/main/character.c:1532
+#: src/main/character.c:1593 src/main/character.c:1596
+#: src/main/connections.c:1208 src/main/connections.c:1214
+#: src/main/connections.c:1217 src/main/connections.c:1221
+#: src/main/connections.c:1367 src/main/connections.c:1383
+#: src/main/connections.c:1388 src/main/connections.c:1989
+#: src/main/connections.c:1995 src/main/connections.c:1999
+#: src/main/connections.c:2003 src/main/connections.c:2008
+#: src/main/connections.c:2659 src/main/connections.c:2664
+#: src/main/connections.c:2667 src/main/connections.c:2670
+#: src/main/connections.c:3053 src/main/connections.c:3058
+#: src/main/connections.c:3064 src/main/connections.c:3067
+#: src/main/connections.c:3071 src/main/connections.c:3086
+#: src/main/connections.c:3135 src/main/connections.c:3140
+#: src/main/connections.c:3144 src/main/connections.c:3148
+#: src/main/connections.c:3152 src/main/connections.c:3158
+#: src/main/connections.c:3203 src/main/connections.c:3209
+#: src/main/connections.c:3213 src/main/connections.c:3264
+#: src/main/connections.c:3267 src/main/connections.c:3543
+#: src/main/connections.c:3546 src/main/connections.c:3549
+#: src/main/connections.c:3555 src/main/connections.c:3662
+#: src/main/connections.c:3668 src/main/connections.c:3671
+#: src/main/connections.c:3823 src/main/connections.c:3826
+#: src/main/connections.c:3830 src/main/connections.c:3833
+#: src/main/connections.c:3954 src/main/connections.c:4085
+#: src/main/connections.c:4088 src/main/connections.c:4425
+#: src/main/connections.c:4450 src/main/connections.c:4485
+#: src/main/connections.c:4500 src/main/connections.c:4508
+#: src/main/connections.c:4534 src/main/connections.c:4680
+#: src/main/connections.c:4684 src/main/connections.c:4814
+#: src/main/connections.c:4816 src/main/connections.c:4818
+#: src/main/connections.c:4846 src/main/connections.c:4980
+#: src/main/connections.c:5019 src/main/connections.c:5024
+#: src/main/connections.c:5029 src/main/connections.c:5050
+#: src/main/context.c:607 src/main/context.c:616 src/main/context.c:620
+#: src/main/datetime.c:781 src/main/datetime.c:869 src/main/datetime.c:872
+#: src/main/datetime.c:876 src/main/datetime.c:1043 src/main/datetime.c:1045
+#: src/main/datetime.c:1250 src/main/debug.c:245 src/main/deparse.c:408
+#: src/main/dotcode.c:496 src/main/dotcode.c:500 src/main/dotcode.c:505
+#: src/main/dounzip.c:323 src/main/dounzip.c:330 src/main/dounzip.c:340
+#: src/main/dounzip.c:345 src/main/dounzip.c:349 src/main/dounzip.c:353
+#: src/main/envir.c:1752 src/main/envir.c:1755 src/main/envir.c:1876
+#: src/main/envir.c:1881 src/main/envir.c:1945 src/main/envir.c:1961
+#: src/main/envir.c:1967 src/main/envir.c:2079 src/main/envir.c:2087
+#: src/main/envir.c:2094 src/main/envir.c:2105 src/main/envir.c:2337
+#: src/main/envir.c:2458 src/main/envir.c:2755 src/main/envir.c:3022
+#: src/main/envir.c:3036 src/main/envir.c:3043 src/main/envir.c:3059
+#: src/main/envir.c:3642 src/main/errors.c:1011 src/main/eval.c:454
+#: src/main/eval.c:463 src/main/eval.c:466 src/main/grep.c:780
+#: src/main/grep.c:785 src/main/grep.c:1079 src/main/grep.c:1081
+#: src/main/grep.c:1083 src/main/grep.c:1528 src/main/grep.c:1532
+#: src/main/grep.c:1537 src/main/grep.c:2345 src/main/grep.c:2350
+#: src/main/grep.c:2652 src/main/grep.c:2657 src/main/memory.c:3823
+#: src/main/paste.c:96 src/main/paste.c:392 src/main/paste.c:399
+#: src/main/paste.c:406 src/main/paste.c:411 src/main/paste.c:416
+#: src/main/paste.c:421 src/main/paste.c:424 src/main/paste.c:432
+#: src/main/paste.c:437 src/main/paste.c:619 src/main/paste.c:624
 #: src/main/platform.c:306 src/main/platform.c:308 src/main/platform.c:310
 #: src/main/platform.c:326 src/main/platform.c:337 src/main/platform.c:390
-#: src/main/platform.c:392 src/main/platform.c:705 src/main/platform.c:707
-#: src/main/platform.c:1064 src/main/platform.c:1070 src/main/platform.c:1073
-#: src/main/platform.c:1076 src/main/platform.c:1079 src/main/platform.c:1082
-#: src/main/platform.c:1085 src/main/platform.c:1088 src/main/platform.c:1185
-#: src/main/platform.c:1188 src/main/platform.c:1191 src/main/platform.c:1229
-#: src/main/platform.c:1286 src/main/platform.c:1289 src/main/platform.c:1498
-#: src/main/platform.c:1501 src/main/platform.c:1504 src/main/platform.c:1540
-#: src/main/platform.c:1543 src/main/platform.c:1546 src/main/platform.c:1629
-#: src/main/platform.c:1645 src/main/platform.c:1684 src/main/platform.c:1686
-#: src/main/platform.c:1757 src/main/platform.c:1841 src/main/platform.c:2116
-#: src/main/platform.c:2176 src/main/platform.c:2353 src/main/platform.c:2356
-#: src/main/platform.c:2359 src/main/platform.c:2362 src/main/platform.c:2365
-#: src/main/platform.c:2368 src/main/platform.c:2568 src/main/platform.c:2571
-#: src/main/platform.c:2574 src/main/platform.c:2577 src/main/platform.c:2580
-#: src/main/platform.c:2583 src/main/platform.c:2657 src/main/platform.c:2665
-#: src/main/platform.c:2701 src/main/platform.c:2751 src/main/print.c:242
-#: src/main/print.c:248 src/main/print.c:270 src/main/print.c:276
-#: src/main/print.c:283 src/main/random.c:478 src/main/random.c:482
-#: src/main/random.c:489 src/main/random.c:517 src/main/saveload.c:1950
-#: src/main/saveload.c:1953 src/main/saveload.c:1956 src/main/saveload.c:2072
-#: src/main/saveload.c:2252 src/main/saveload.c:2257 src/main/saveload.c:2260
+#: src/main/platform.c:392 src/main/platform.c:708 src/main/platform.c:710
+#: src/main/platform.c:800 src/main/platform.c:1138 src/main/platform.c:1144
+#: src/main/platform.c:1147 src/main/platform.c:1150 src/main/platform.c:1153
+#: src/main/platform.c:1156 src/main/platform.c:1159 src/main/platform.c:1162
+#: src/main/platform.c:1259 src/main/platform.c:1262 src/main/platform.c:1265
+#: src/main/platform.c:1303 src/main/platform.c:1361 src/main/platform.c:1364
+#: src/main/platform.c:1573 src/main/platform.c:1576 src/main/platform.c:1579
+#: src/main/platform.c:1615 src/main/platform.c:1618 src/main/platform.c:1621
+#: src/main/platform.c:1657 src/main/platform.c:1690 src/main/platform.c:1692
+#: src/main/platform.c:1763 src/main/platform.c:1848 src/main/platform.c:2089
+#: src/main/platform.c:2149 src/main/platform.c:2334 src/main/platform.c:2337
+#: src/main/platform.c:2340 src/main/platform.c:2343 src/main/platform.c:2346
+#: src/main/platform.c:2349 src/main/platform.c:2555 src/main/platform.c:2558
+#: src/main/platform.c:2561 src/main/platform.c:2564 src/main/platform.c:2567
+#: src/main/platform.c:2570 src/main/platform.c:2648 src/main/platform.c:2656
+#: src/main/platform.c:2692 src/main/platform.c:2742 src/main/print.c:235
+#: src/main/print.c:241 src/main/print.c:263 src/main/print.c:269
+#: src/main/print.c:276 src/main/random.c:470 src/main/random.c:474
+#: src/main/random.c:481 src/main/random.c:509 src/main/saveload.c:1952
+#: src/main/saveload.c:1955 src/main/saveload.c:1958 src/main/saveload.c:2074
+#: src/main/saveload.c:2254 src/main/saveload.c:2259 src/main/saveload.c:2262
 #: src/main/saveload.c:2366 src/main/scan.c:684 src/main/scan.c:853
 #: src/main/scan.c:867 src/main/scan.c:871 src/main/scan.c:873
 #: src/main/scan.c:884 src/main/scan.c:911 src/main/scan.c:914
-#: src/main/scan.c:917 src/main/scan.c:972 src/main/seq.c:618
-#: src/main/seq.c:623 src/main/seq.c:631 src/main/seq.c:662 src/main/seq.c:666
-#: src/main/seq.c:672 src/main/seq.c:680 src/main/sort.c:175
-#: src/main/sysutils.c:585 src/main/sysutils.c:589 src/main/sysutils.c:593
-#: src/main/sysutils.c:599 src/main/sysutils.c:603 src/main/sysutils.c:1831
-#: src/main/sysutils.c:1835 src/main/unique.c:966 src/main/unique.c:1289
-#: src/main/unique.c:1349 src/main/unique.c:1356 src/main/unique.c:1750
-#: src/main/util.c:581 src/main/util.c:584 src/main/util.c:1825
-#: src/main/util.c:1994 src/main/util.c:1995 src/main/util.c:1996
-#: src/main/util.c:2013 src/main/util.c:2037 src/main/util.c:2041
-#: src/main/util.c:2043 src/main/util.c:2068 src/main/util.c:2070
-#: src/main/util.c:2072 src/main/util.c:2075 src/main/util.c:2078
-#: src/main/util.c:2082 src/main/util.c:2084 src/modules/X11/devX11.c:3241
-#: src/modules/X11/devX11.c:3244 src/modules/X11/devX11.c:3247
-#: src/modules/X11/devX11.c:3271 src/modules/internet/internet.c:284
-#: src/modules/internet/internet.c:290 src/modules/internet/internet.c:296
-#: src/modules/internet/internet.c:299 src/modules/internet/internet.c:303
+#: src/main/scan.c:917 src/main/scan.c:972 src/main/seq.c:622
+#: src/main/seq.c:627 src/main/seq.c:635 src/main/seq.c:666 src/main/seq.c:670
+#: src/main/seq.c:676 src/main/seq.c:684 src/main/sort.c:175
+#: src/main/sysutils.c:597 src/main/sysutils.c:601 src/main/sysutils.c:605
+#: src/main/sysutils.c:611 src/main/sysutils.c:615 src/main/sysutils.c:1787
+#: src/main/sysutils.c:1791 src/main/unique.c:1029 src/main/unique.c:1337
+#: src/main/unique.c:1341 src/main/unique.c:1351 src/main/unique.c:1747
+#: src/main/util.c:636 src/main/util.c:639 src/main/util.c:1379
+#: src/main/util.c:1393 src/main/util.c:1975 src/main/util.c:2198
+#: src/main/util.c:2199 src/main/util.c:2200 src/main/util.c:2217
+#: src/main/util.c:2245 src/main/util.c:2249 src/main/util.c:2251
+#: src/main/util.c:2277 src/main/util.c:2279 src/main/util.c:2281
+#: src/main/util.c:2284 src/main/util.c:2287 src/main/util.c:2291
+#: src/main/util.c:2293 src/modules/X11/devX11.c:3247
+#: src/modules/X11/devX11.c:3250 src/modules/X11/devX11.c:3253
+#: src/modules/X11/devX11.c:3277 src/modules/internet/internet.c:453
+#: src/modules/internet/internet.c:459 src/modules/internet/internet.c:465
+#: src/modules/internet/internet.c:468 src/modules/internet/internet.c:472
+#: src/modules/internet/internet.c:477 src/modules/internet/libcurl.c:414
+#: src/modules/internet/libcurl.c:418 src/modules/internet/libcurl.c:423
+#: src/modules/internet/libcurl.c:426 src/modules/internet/libcurl.c:430
 #: src/modules/lapack/Lapack.c:155 src/modules/lapack/Lapack.c:261
 #: src/modules/lapack/Lapack.c:709 src/modules/lapack/Lapack.c:818
-#: src/modules/lapack/Lapack.c:880 src/modules/lapack/Lapack.c:1214
-#: src/unix/sys-std.c:1217 src/unix/sys-std.c:1240
+#: src/modules/lapack/Lapack.c:880 src/modules/lapack/Lapack.c:1215
+#: src/unix/sys-std.c:1223 src/unix/sys-std.c:1246
 #, c-format
 msgid "invalid '%s' argument"
 msgstr "argomento '%s' non valido"
@@ -259,385 +264,362 @@ msgstr "argomento '%s' non valido"
 msgid "unsupported version of Windows"
 msgstr "conversione non supportata"
 
-#: src/gnuwin32/extra.c:267 src/main/apply.c:105 src/main/character.c:595
-#: src/main/connections.c:3555 src/main/context.c:642 src/main/context.c:661
-#: src/main/datetime.c:675 src/main/datetime.c:777 src/main/datetime.c:1030
-#: src/main/dotcode.c:199 src/main/errors.c:929 src/main/errors.c:962
-#: src/main/errors.c:1065 src/main/errors.c:1090 src/main/errors.c:1095
-#: src/main/errors.c:1368 src/main/identical.c:66 src/main/identical.c:67
-#: src/main/identical.c:68 src/main/identical.c:69 src/main/identical.c:70
-#: src/main/seq.c:185 src/main/seq.c:341 src/main/seq.c:346 src/main/seq.c:350
-#: src/main/seq.c:391 src/main/seq.c:395 src/main/seq.c:399
-#: src/main/sort.c:1224 src/main/sort.c:1307 src/main/sort.c:1311
-#: src/main/sort.c:1318 src/main/sort.c:1393 src/main/source.c:220
-#: src/main/summary.c:886 src/main/sysutils.c:251 src/main/util.c:986
-#: src/main/util.c:991 src/main/util.c:998 src/main/util.c:1001
-#: src/modules/X11/devX11.c:3142 src/modules/X11/devX11.c:3169
-#: src/modules/X11/devX11.c:3174 src/modules/X11/devX11.c:3179
-#: src/modules/X11/devX11.c:3189 src/modules/X11/devX11.c:3194
-#: src/modules/X11/devX11.c:3198 src/modules/X11/devX11.c:3202
-#: src/unix/sys-std.c:1291
-#, c-format
-msgid "invalid '%s' value"
-msgstr "valore '%s' non valido"
-
-#: src/gnuwin32/extra.c:308 src/gnuwin32/extra.c:321
+#: src/gnuwin32/extra.c:313 src/gnuwin32/extra.c:324
 msgid "incorrect argument"
 msgstr "argomento non corretto"
 
-#: src/gnuwin32/extra.c:312
+#: src/gnuwin32/extra.c:316
 msgid "don't be silly!: your machine has a 4Gb address limit"
 msgstr "esagerato: la tua macchina ha un limite massimo di indirizzi di 4Gb"
 
-#: src/gnuwin32/extra.c:316
+#: src/gnuwin32/extra.c:320
 #, fuzzy
 msgid "cannot decrease memory limit: ignored"
 msgstr "impossibile diminuire il limite di memoria"
 
-#: src/gnuwin32/extra.c:428 src/gnuwin32/extra.c:529 src/main/util.c:897
+#: src/gnuwin32/extra.c:427 src/gnuwin32/extra.c:528 src/main/util.c:962
 msgid "'path' must be a character vector"
 msgstr "'path' deve essere un vettore di tipo character"
 
-#: src/gnuwin32/extra.c:579 src/gnuwin32/extra.c:581 src/gnuwin32/extra.c:604
-#: src/gnuwin32/extra.c:606 src/gnuwin32/extra.c:641 src/main/gevents.c:61
+#: src/gnuwin32/extra.c:576 src/gnuwin32/extra.c:578 src/gnuwin32/extra.c:601
+#: src/gnuwin32/extra.c:603 src/gnuwin32/extra.c:638 src/main/gevents.c:61
 #: src/main/gevents.c:98
 msgid "invalid device"
 msgstr "dispositivo non valido"
 
-#: src/gnuwin32/extra.c:582
+#: src/gnuwin32/extra.c:579
 msgid "requires SDI mode"
 msgstr "richiede modalità SDI"
 
-#: src/gnuwin32/extra.c:635 src/main/gevents.c:58 src/main/gevents.c:95
+#: src/gnuwin32/extra.c:632 src/main/gevents.c:58 src/main/gevents.c:95
 msgid "invalid graphical device number"
 msgstr "numero di dispositivo non valido"
 
-#: src/gnuwin32/extra.c:645
+#: src/gnuwin32/extra.c:642
 msgid "bad device"
 msgstr "dispositivo errato"
 
-#: src/gnuwin32/extra.c:799 src/gnuwin32/extra.c:807
+#: src/gnuwin32/extra.c:796 src/gnuwin32/extra.c:804
 #, fuzzy
 msgid "invalid input in 'Rmbstowcs'"
 msgstr "input non valido per Rmbstowcs"
 
-#: src/gnuwin32/extra.c:830 src/main/platform.c:1261
+#: src/gnuwin32/extra.c:827 src/main/platform.c:1336
 msgid "file choice cancelled"
 msgstr "scelta del file annullata"
 
-#: src/gnuwin32/run.c:242
+#: src/gnuwin32/run.c:244
 #, fuzzy, c-format
 msgid "'CreateProcess' failed to run '%s'"
 msgstr "lettura non riuscita su %s"
 
-#: src/gnuwin32/run.c:344
+#: src/gnuwin32/run.c:346
 msgid "Child process not responding.  R will terminate it."
 msgstr ""
 
-#: src/gnuwin32/run.c:402
+#: src/gnuwin32/run.c:404
 #, c-format
 msgid "Exit code was %d"
 msgstr ""
 
-#: src/gnuwin32/run.c:434
+#: src/gnuwin32/run.c:436
 msgid "Insufficient memory (rpipeOpen)"
 msgstr "Memoria insufficiente (rpipeOpen)"
 
-#: src/gnuwin32/run.c:648 src/main/dounzip.c:482
+#: src/gnuwin32/run.c:650 src/main/dounzip.c:481
 msgid "seek not enabled for this connection"
 msgstr "'seek' non abilitato per questa connessione"
 
-#: src/gnuwin32/run.c:654
+#: src/gnuwin32/run.c:656
 msgid "truncate not enabled for this connection"
 msgstr "'truncate' non abilitato per questa connessione"
 
-#: src/gnuwin32/run.c:729 src/gnuwin32/run.c:733 src/gnuwin32/run.c:746
-#: src/gnuwin32/run.c:774 src/main/connections.c:1330
-#: src/main/connections.c:1334 src/main/connections.c:1340
-#: src/main/connections.c:1354
+#: src/gnuwin32/run.c:731 src/gnuwin32/run.c:735 src/gnuwin32/run.c:748
+#: src/gnuwin32/run.c:776 src/main/connections.c:1322
+#: src/main/connections.c:1326 src/main/connections.c:1332
+#: src/main/connections.c:1346
 msgid "allocation of pipe connection failed"
 msgstr "allocazione della connessione 'pipe' fallita"
 
-#: src/gnuwin32/run.c:788
+#: src/gnuwin32/run.c:790
 #, fuzzy
 msgid "'names' is not a character vector"
 msgstr "'fmt' deve essere un vettore di caratteri non vuoto"
 
-#: src/gnuwin32/sys-win32.c:182
+#: src/gnuwin32/sys-win32.c:180
 msgid "character string expected as first argument"
 msgstr "il primo parametro deve essere una stringa di caratteri"
 
-#: src/gnuwin32/sys-win32.c:191
+#: src/gnuwin32/sys-win32.c:189
 msgid "character string expected as third argument"
 msgstr "il terzo parametro deve essere una stringa di caratteri"
 
-#: src/gnuwin32/sys-win32.c:257 src/unix/sys-unix.c:299
+#: src/gnuwin32/sys-win32.c:255 src/unix/sys-unix.c:312
 #, c-format
 msgid "running command '%s' had status %d"
 msgstr ""
 
-#: src/gnuwin32/system.c:122 src/unix/sys-unix.c:427
+#: src/gnuwin32/system.c:121 src/unix/sys-unix.c:440
 msgid "reached session elapsed time limit"
 msgstr ""
 
-#: src/gnuwin32/system.c:124 src/unix/sys-unix.c:429
+#: src/gnuwin32/system.c:123 src/unix/sys-unix.c:442
 msgid "reached elapsed time limit"
 msgstr ""
 
-#: src/gnuwin32/system.c:130 src/unix/sys-unix.c:435
+#: src/gnuwin32/system.c:129 src/unix/sys-unix.c:448
 msgid "reached session CPU time limit"
 msgstr ""
 
-#: src/gnuwin32/system.c:132 src/unix/sys-unix.c:437
+#: src/gnuwin32/system.c:131 src/unix/sys-unix.c:450
 msgid "reached CPU time limit"
 msgstr ""
 
-#: src/gnuwin32/system.c:157
+#: src/gnuwin32/system.c:156
 #, c-format
 msgid "Fatal error: %s\n"
 msgstr "Errore irreversibile: %s\n"
 
-#: src/gnuwin32/system.c:335 src/unix/sys-std.c:863
+#: src/gnuwin32/system.c:334 src/unix/sys-std.c:866
 #, c-format
 msgid "encoding '%s' is not recognised"
 msgstr "encoding '%s' non riconosciuto"
 
-#: src/gnuwin32/system.c:341 src/unix/sys-std.c:869
+#: src/gnuwin32/system.c:340 src/unix/sys-std.c:872
 #, fuzzy, c-format
 msgid "<ERROR: re-encoding failure from encoding '%s'>\n"
 msgstr "<ERRORE: input non valido per questo encoding> "
 
-#: src/gnuwin32/system.c:555 src/gnuwin32/system.c:1049
-#: src/gnuwin32/system.c:1061 src/main/connections.c:590
-#: src/main/connections.c:595 src/main/dounzip.c:177 src/main/saveload.c:1961
-#: src/main/serialize.c:2552 src/main/serialize.c:2557
-#: src/main/serialize.c:2642 src/main/serialize.c:2687 src/unix/system.c:323
-#: src/unix/system.c:343
+#: src/gnuwin32/system.c:562 src/gnuwin32/system.c:1058
+#: src/gnuwin32/system.c:1070 src/main/connections.c:581
+#: src/main/connections.c:586 src/main/dounzip.c:178 src/main/saveload.c:1963
+#: src/main/serialize.c:2598 src/main/serialize.c:2603
+#: src/main/serialize.c:2688 src/main/serialize.c:2733 src/unix/system.c:328
 #, fuzzy, c-format
 msgid "cannot open file '%s': %s"
 msgstr "impossibile aprire il file '%s'"
 
-#: src/gnuwin32/system.c:569
+#: src/gnuwin32/system.c:576
 #, c-format
 msgid "file.show(): file '%s' does not exist\n"
 msgstr "file.show(): il file %s non esiste\n"
 
-#: src/gnuwin32/system.c:970
+#: src/gnuwin32/system.c:979
 #, fuzzy, c-format
 msgid "WARNING: R_MAX_MEM_SIZE value is invalid: ignored\n"
 msgstr "ATTENZIONE: il valore %s non è valido: verrà ignorato\n"
 
-#: src/gnuwin32/system.c:1002
+#: src/gnuwin32/system.c:1011
 msgid "WARNING: no max-mem-size given\n"
 msgstr "ATTENZIONE: non è stato specificato un valore per max-mem-size\n"
 
-#: src/gnuwin32/system.c:1009
+#: src/gnuwin32/system.c:1018
 #, c-format
 msgid "WARNING: --max-mem-size value is invalid: ignored\n"
 msgstr "ATTENZIONE: valore non valido di  --max-mem-size: verrà ignorato\n"
 
-#: src/gnuwin32/system.c:1012
+#: src/gnuwin32/system.c:1021
 #, fuzzy, c-format
 msgid "WARNING: --max-mem-size=%lu%c: too large and ignored\n"
 msgstr ""
 "ATTENZIONE: valore di --max-mem-size=%lu'%c': troppo grande e quindi "
 "ignorato\n"
 
-#: src/gnuwin32/system.c:1018
+#: src/gnuwin32/system.c:1027
 #, fuzzy, c-format
 msgid "WARNING: --max-mem-size=%4.1fM: too small and ignored\n"
 msgstr ""
 "ATTENZIONE: valore di max-mem-size =%4.1fM troppo piccolo e quindi ignorato\n"
 
-#: src/gnuwin32/system.c:1023
+#: src/gnuwin32/system.c:1032
 #, fuzzy, c-format
 msgid "WARNING: --max-mem-size=%4.0fM: too large and taken as %uM\n"
 msgstr ""
 "ATTENZIONE: il valore di max-mem-size =%4.1fM è troppo grande e sarà "
 "considerato il limite di 3Gb\n"
 
-#: src/gnuwin32/system.c:1039
+#: src/gnuwin32/system.c:1048
 #, fuzzy, c-format
 msgid "option '%s' requires an argument"
 msgstr "operazioni binarie richiedono due argomenti"
 
-#: src/gnuwin32/system.c:1070
+#: src/gnuwin32/system.c:1079
 #, fuzzy, c-format
 msgid "option '%s' requires a non-empty argument"
 msgstr "operazioni binarie richiedono due argomenti"
 
-#: src/gnuwin32/system.c:1078 src/unix/system.c:362
+#: src/gnuwin32/system.c:1087 src/unix/system.c:347
 #, c-format
 msgid "WARNING: '-e %s' omitted as input is too long\n"
 msgstr ""
 
-#: src/gnuwin32/system.c:1082 src/unix/system.c:375
+#: src/gnuwin32/system.c:1091 src/unix/system.c:360
 #, c-format
 msgid "WARNING: unknown option '%s'\n"
 msgstr "ATTENZIONE: opzione %s sconosciuta\n"
 
-#: src/gnuwin32/system.c:1104 src/unix/system.c:379
+#: src/gnuwin32/system.c:1113 src/unix/system.c:364
 #, c-format
 msgid "ARGUMENT '%s' __ignored__\n"
 msgstr "ARGOMENTO '%s' __ignorato__\n"
 
-#: src/gnuwin32/system.c:1110 src/unix/system.c:386
+#: src/gnuwin32/system.c:1119 src/unix/system.c:371
 #, fuzzy
 msgid "cannot use -e with -f or --file"
 msgstr "impossibile impostare lunghezza di un oggetto non vector"
 
-#: src/gnuwin32/system.c:1128
+#: src/gnuwin32/system.c:1137
 msgid "creation of tmpfile failed -- set TMPDIR suitably?"
 msgstr ""
 
-#: src/gnuwin32/system.c:1147 src/unix/system.c:437
+#: src/gnuwin32/system.c:1156 src/unix/system.c:422
 msgid "you must specify '--save', '--no-save' or '--vanilla'"
 msgstr "si deve specificare '--save', '--no-save' oppure '--vanilla'"
 
-#: src/gnuwin32/system.c:1152
+#: src/gnuwin32/system.c:1161
 msgid ""
 "impossible to create 'reader thread'; you must free some system resources"
 msgstr ""
 "impossibile creare 'thread di lettura'; liberare qualche risorsa di sistema"
 
-#: src/include/Errormsg.h:25 src/main/subscript.c:375 src/main/subscript.c:393
-#: src/main/subscript.c:417 src/main/subscript.c:456 src/main/subscript.c:584
-#: src/main/subscript.c:623 src/main/subscript.c:766
+#: src/include/Errormsg.h:27 src/main/subscript.c:383 src/main/subscript.c:401
+#: src/main/subscript.c:425 src/main/subscript.c:464 src/main/subscript.c:662
+#: src/main/subscript.c:701 src/main/subscript.c:844
 msgid "subscript out of bounds"
 msgstr "indice fuori limite"
 
-#: src/include/Errormsg.h:26
+#: src/include/Errormsg.h:28
 #, fuzzy, c-format
 msgid "object of type '%s' is not subsettable"
 msgstr "questo oggetto non è indicizzabile"
 
-#: src/main/CommandLineArgs.c:170
+#: src/main/CommandLineArgs.c:171
 #, fuzzy
 msgid "WARNING: no value given for --encoding"
 msgstr "ATTENZIONE: nessun valore specificato per --encoding\n"
 
-#: src/main/CommandLineArgs.c:195
+#: src/main/CommandLineArgs.c:196
 #, fuzzy, c-format
 msgid "WARNING: option '%s' no longer supported"
 msgstr "ATTENZIONE: l'opzione %s non è più supportata\n"
 
-#: src/main/CommandLineArgs.c:206
+#: src/main/CommandLineArgs.c:207
 #, fuzzy, c-format
 msgid "WARNING: no value given for '%s'"
 msgstr "ATTENZIONE: nessun valore specificato per %s\n"
 
-#: src/main/CommandLineArgs.c:216
+#: src/main/CommandLineArgs.c:217
 #, fuzzy, c-format
 msgid "WARNING: '%s' value is invalid: ignored"
 msgstr "ATTENZIONE: il valore %s non è valido: verrà ignorato\n"
 
-#: src/main/CommandLineArgs.c:220
+#: src/main/CommandLineArgs.c:221
 #, fuzzy, c-format
 msgid "WARNING: %s: too large and ignored"
 msgstr "ATTENZIONE: %s=%lu'%c': tropo grande e quindi ingorato\n"
 
-#: src/main/CommandLineArgs.c:234
+#: src/main/CommandLineArgs.c:235
 #, fuzzy
 msgid "WARNING: no value given for '--max-ppsize'"
 msgstr "ATTENZIONE: nessun valore specificato per --max-ppsize\n"
 
-#: src/main/CommandLineArgs.c:239
+#: src/main/CommandLineArgs.c:240
 #, fuzzy
 msgid "WARNING: '--max-ppsize' value is negative: ignored"
 msgstr "ATTENZIONE: il valore di -max-ppsize è negativo: verrà ignorato\n"
 
-#: src/main/CommandLineArgs.c:241
+#: src/main/CommandLineArgs.c:242
 #, fuzzy
 msgid "WARNING: '--max-ppsize' value is too small: ignored"
 msgstr ""
 "ATTENZIONE: il valore di -max-ppsize è troppo piccolo: verrà ignorato\n"
 
-#: src/main/CommandLineArgs.c:244
+#: src/main/CommandLineArgs.c:245
 #, fuzzy
 msgid "WARNING: '--max-ppsize' value is too large: ignored"
 msgstr ""
 "ATTENZIONE: il valore di '-max-ppsize' è troppo grande: verrà ignorato\n"
 
-#: src/main/RNG.c:175
+#: src/main/RNG.c:176
 #, c-format
 msgid "unif_rand: unimplemented RNG kind %d"
 msgstr "unif_rand: RNG di tipo %d non implementato"
 
-#: src/main/RNG.c:260
+#: src/main/RNG.c:261
 #, c-format
 msgid "FixupSeeds: unimplemented RNG kind %d"
 msgstr "FixupSeeds: RNG di tipo %d non implementato"
 
-#: src/main/RNG.c:302
+#: src/main/RNG.c:301
 msgid "'user_unif_rand' not in load table"
 msgstr "'user_unif_rand' non presente nella tabella di caricamento"
 
-#: src/main/RNG.c:310
+#: src/main/RNG.c:309
 msgid "cannot read seeds unless 'user_unif_nseed' is supplied"
 msgstr ""
 "impossibile leggere i semi finché 'user_unif_nseed' non viene specificato"
 
-#: src/main/RNG.c:315
+#: src/main/RNG.c:314
 msgid "seed length must be in 0...625; ignored"
 msgstr ""
 "la lunghezza del seme deve essere nell'intervallo 0...625: verrà ignorata"
 
-#: src/main/RNG.c:323
+#: src/main/RNG.c:322
 #, c-format
 msgid "RNG_Init: unimplemented RNG kind %d"
 msgstr "RNG_Init: RNG di tipo %d non implementato"
 
-#: src/main/RNG.c:354
+#: src/main/RNG.c:351
 #, fuzzy
 msgid "'.Random.seed' is a missing argument with no default"
 msgstr ""
 "il parametro .Random.seed  non è specificato e non ha un valore predefinito"
 
-#: src/main/RNG.c:355
+#: src/main/RNG.c:352
 #, fuzzy, c-format
 msgid "'.Random.seed' is not an integer vector but of type '%s', so ignored"
 msgstr ".Random.seed non è un vettore"
 
-#: src/main/RNG.c:363
+#: src/main/RNG.c:360
 #, fuzzy
 msgid "'.Random.seed[1]' is not a valid integer, so ignored"
 msgstr ".Random.seed[1] non è un valore intero accettabile"
 
-#: src/main/RNG.c:369
+#: src/main/RNG.c:366
 #, fuzzy
 msgid "'.Random.seed[1]' is not a valid Normal type, so ignored"
 msgstr ".Random.seed[0] non è un tipo Normale valido"
 
-#: src/main/RNG.c:383
+#: src/main/RNG.c:380
 #, fuzzy
 msgid "'.Random.seed[1] = 5' but no user-supplied generator, so ignored"
 msgstr ".Random.seed[1] = 5 ma manca un generatore definito dall'utente"
 
-#: src/main/RNG.c:388
+#: src/main/RNG.c:385
 #, fuzzy
 msgid "'.Random.seed[1]' is not a valid RNG kind so ignored"
 msgstr ".Random.seed[1] non è un tipo di RNG ammissibile (code)"
 
-#: src/main/RNG.c:415
+#: src/main/RNG.c:412
 #, fuzzy
 msgid "'.Random.seed' has wrong length"
 msgstr ".Random.seed ha una lunghezza sbagliata"
 
-#: src/main/RNG.c:468
+#: src/main/RNG.c:465
 #, c-format
 msgid "RNGkind: unimplemented RNG kind %d"
 msgstr "RNGkind: RNG di tipo %d non implementato"
 
-#: src/main/RNG.c:488
+#: src/main/RNG.c:485
 #, fuzzy
 msgid "invalid Normal type in 'RNGkind'"
 msgstr "valore tipo Normale non accettabile in RNGkind"
 
-#: src/main/RNG.c:491
+#: src/main/RNG.c:488
 msgid "'user_norm_rand' not in load table"
 msgstr "'user_norm_rand' non presente nella tavola di caricamento"
 
-#: src/main/RNG.c:535
+#: src/main/RNG.c:532
 msgid "supplied seed is not a valid integer"
 msgstr "il seme specificato non è un numero intero valido"
 
@@ -664,7 +646,7 @@ msgstr "nome DLL '%s' troppo lungo"
 msgid "could not allocate space for 'name'"
 msgstr "non è possibile allocare memoria per 'name'"
 
-#: src/main/Rdynload.c:881 src/main/Rdynload.c:897 src/main/util.c:698
+#: src/main/Rdynload.c:881 src/main/Rdynload.c:897 src/main/util.c:762
 msgid "character argument expected"
 msgstr "richiesto argomento di tipo character"
 
@@ -684,32 +666,34 @@ msgstr "libreria dinamica '%s' non caricata"
 
 #: src/main/Rdynload.c:979
 #, fuzzy, c-format
-msgid "cannot allocate memory for registered native symbol (%d bytes)"
-msgstr "non è possibile allocare memoria per la struttura InternetRoutines"
+msgid "cannot allocate memory for registered native symbol (%d byte)"
+msgid_plural "cannot allocate memory for registered native symbol (%d bytes)"
+msgstr[0] "non è possibile allocare memoria per la struttura InternetRoutines"
+msgstr[1] "non è possibile allocare memoria per la struttura InternetRoutines"
 
-#: src/main/Rdynload.c:1100 src/main/Rdynload.c:1321
+#: src/main/Rdynload.c:1102 src/main/Rdynload.c:1323
 msgid "must pass package name or DllInfo reference"
 msgstr "specificare nome pacchetto o una referenza a DllInfo"
 
-#: src/main/Rdynload.c:1197
+#: src/main/Rdynload.c:1199
 #, fuzzy, c-format
 msgid "unimplemented type %d in 'createRSymbolObject'"
 msgstr "Tipo %d non implementato in createRSymbolObject"
 
-#: src/main/Rdynload.c:1279 src/main/Rdynload.c:1373
+#: src/main/Rdynload.c:1281 src/main/Rdynload.c:1375
 msgid "R_getRegisteredRoutines() expects a DllInfo reference"
 msgstr "R_getRegisteredRoutines() necessita di una referenza di tipo DllInfo"
 
-#: src/main/Rdynload.c:1282 src/main/Rdynload.c:1376
+#: src/main/Rdynload.c:1284 src/main/Rdynload.c:1378
 msgid "NULL value passed for DllInfo"
 msgstr "Valore NULL specificato al posto di DllInfo"
 
-#: src/main/Rdynload.c:1436
+#: src/main/Rdynload.c:1441
 #, c-format
 msgid "function '%s' not provided by package '%s'"
 msgstr ""
 
-#: src/main/Rdynload.c:1438
+#: src/main/Rdynload.c:1443
 #, fuzzy
 msgid "table entry must be an external pointer"
 msgstr "non posso de-classificare un puntatore esterno"
@@ -719,9 +703,9 @@ msgstr "non posso de-classificare un puntatore esterno"
 msgid "problem in setting variable '%s' in Renviron"
 msgstr "problema nello scrivere sulla connessione"
 
-#: src/main/Renviron.c:311
-#, fuzzy
-msgid "argument 'x' must be a character string"
+#: src/main/Renviron.c:311 src/main/objects.c:1174 src/main/raw.c:155
+#, fuzzy, c-format
+msgid "argument '%s' must be a character string"
 msgstr "l'argomento 'code' deve essere una stringa di tipo character"
 
 #: src/main/Renviron.c:315
@@ -729,119 +713,141 @@ msgstr "l'argomento 'code' deve essere una stringa di tipo character"
 msgid "file '%s' cannot be opened for reading"
 msgstr "le routine lapack non pososno essere caricate"
 
-#: src/main/Rstrptime.h:517 src/main/Rstrptime.h:984
+#: src/main/Rstrptime.h:524 src/main/Rstrptime.h:991
 #, fuzzy, c-format
 msgid "use of %s for input is not supported"
 msgstr "modalità '%s' non supportata in call_R"
 
-#: src/main/Rstrptime.h:1242
+#: src/main/Rstrptime.h:1263
 msgid "input string is too long"
 msgstr "stringa di input troppo lunga"
 
-#: src/main/Rstrptime.h:1244
+#: src/main/Rstrptime.h:1265
 msgid "invalid multibyte input string"
 msgstr "stringa multibyte in input non valida"
 
-#: src/main/Rstrptime.h:1247
+#: src/main/Rstrptime.h:1268
 msgid "format string is too long"
 msgstr "stringa formato troppo lunga"
 
-#: src/main/Rstrptime.h:1249
+#: src/main/Rstrptime.h:1270
 msgid "invalid multibyte format string"
 msgstr "stringa formato multibyte non valida"
 
-#: src/main/agrep.c:133 src/main/agrep.c:777 src/main/character.c:1039
-#: src/main/character.c:1043 src/main/grep.c:769 src/main/grep.c:1512
-#: src/main/grep.c:1516 src/main/grep.c:2325 src/main/grep.c:2623
+#: src/main/agrep.c:133 src/main/agrep.c:778 src/main/character.c:1291
+#: src/main/character.c:1295 src/main/grep.c:782 src/main/grep.c:1530
+#: src/main/grep.c:1534 src/main/grep.c:2347 src/main/grep.c:2654
 #, fuzzy, c-format
 msgid "argument '%s' has length > 1 and only the first element will be used"
 msgstr ""
 "la condizione la lunghezza > 1 e solo il promo elemento verrà utilizzato"
 
-#: src/main/agrep.c:189 src/main/agrep.c:818
+#: src/main/agrep.c:190 src/main/agrep.c:820
 #, fuzzy
 msgid "'pattern' must be a non-empty character string"
 msgstr "'title' deve essere una stringa di tipo character"
 
-#: src/main/agrep.c:200 src/main/agrep.c:827 src/main/grep.c:838
-#: src/main/grep.c:2381 src/main/grep.c:2662
+#: src/main/agrep.c:201 src/main/agrep.c:829 src/main/grep.c:853
+#: src/main/grep.c:2405 src/main/grep.c:2707
 msgid "regular expression is invalid in this locale"
 msgstr "l'espressione regolare non è valida in questo locale"
 
-#: src/main/agrep.c:206 src/main/agrep.c:623
+#: src/main/agrep.c:207 src/main/agrep.c:624
 #, fuzzy, c-format
 msgid "regcomp error:  '%s'"
 msgstr "errore di lettura"
 
-#: src/main/agrep.c:238 src/main/agrep.c:871 src/main/grep.c:227
-#: src/main/grep.c:315 src/main/grep.c:423 src/main/grep.c:578
-#: src/main/grep.c:889 src/main/grep.c:2480 src/main/grep.c:2548
-#: src/main/grep.c:2698
+#: src/main/agrep.c:239 src/main/agrep.c:874 src/main/grep.c:233
+#: src/main/grep.c:323 src/main/grep.c:434 src/main/grep.c:590
+#: src/main/grep.c:907 src/main/grep.c:2510 src/main/grep.c:2579
+#: src/main/grep.c:2744
 #, c-format
 msgid "input string %d is invalid in this locale"
 msgstr "stringa di input %d non valida in questo locale"
 
-#: src/main/agrep.c:525 src/main/agrep.c:765 src/main/grep.c:155
-#: src/main/grep.c:760 src/main/grep.c:762 src/main/grep.c:1047
-#: src/main/grep.c:1055 src/main/grep.c:1503 src/main/grep.c:1505
-#: src/main/grep.c:2315 src/main/grep.c:2317 src/main/grep.c:2611
+#: src/main/agrep.c:526 src/main/agrep.c:766 src/main/grep.c:159
+#: src/main/grep.c:773 src/main/grep.c:775 src/main/grep.c:1065
+#: src/main/grep.c:1073 src/main/grep.c:1521 src/main/grep.c:1523
+#: src/main/grep.c:2337 src/main/grep.c:2339 src/main/grep.c:2642
 #, fuzzy, c-format
 msgid "argument '%s' will be ignored"
 msgstr "gli argomenti successivi ai primi due vengono ignorati"
 
-#: src/main/agrep.c:614
+#: src/main/agrep.c:615
 #, fuzzy, c-format
 msgid "input string x[%d] is invalid in this locale"
 msgstr "stringa di input %d non valida in questo locale"
 
-#: src/main/agrep.c:660
+#: src/main/agrep.c:661
 #, fuzzy, c-format
 msgid "input string y[%d] is invalid in this locale"
 msgstr "stringa di input %d non valida in questo locale"
 
-#: src/main/agrep.c:833 src/main/grep.c:2668
+#: src/main/agrep.c:835 src/main/grep.c:2713
 #, fuzzy, c-format
 msgid "regcomp error: '%s'"
 msgstr "errore di lettura"
 
-#: src/main/apply.c:103
+#: src/main/apply.c:98
 #, fuzzy
 msgid "'FUN.VALUE' must be a vector"
 msgstr "code deve essere un vettore generico"
 
-#: src/main/apply.c:108 src/main/complex.c:758
+#: src/main/apply.c:100 src/main/array.c:506 src/main/character.c:847
+#: src/main/character.c:1655 src/main/connections.c:3551
+#: src/main/context.c:653 src/main/context.c:672 src/main/datetime.c:681
+#: src/main/datetime.c:783 src/main/datetime.c:1047 src/main/dotcode.c:222
+#: src/main/errors.c:910 src/main/errors.c:943 src/main/errors.c:1049
+#: src/main/errors.c:1074 src/main/errors.c:1079 src/main/errors.c:1349
+#: src/main/identical.c:66 src/main/identical.c:67 src/main/identical.c:68
+#: src/main/identical.c:69 src/main/identical.c:70 src/main/platform.c:2982
+#: src/main/seq.c:192 src/main/seq.c:343 src/main/seq.c:348 src/main/seq.c:352
+#: src/main/seq.c:397 src/main/seq.c:401 src/main/seq.c:405
+#: src/main/sort.c:1244 src/main/sort.c:1327 src/main/sort.c:1331
+#: src/main/sort.c:1338 src/main/source.c:225 src/main/summary.c:954
+#: src/main/sysutils.c:250 src/main/util.c:1051 src/main/util.c:1056
+#: src/main/util.c:1063 src/main/util.c:1066 src/main/util.c:2035
+#: src/modules/X11/devX11.c:3148 src/modules/X11/devX11.c:3175
+#: src/modules/X11/devX11.c:3180 src/modules/X11/devX11.c:3185
+#: src/modules/X11/devX11.c:3195 src/modules/X11/devX11.c:3200
+#: src/modules/X11/devX11.c:3204 src/modules/X11/devX11.c:3208
+#, c-format
+msgid "invalid '%s' value"
+msgstr "valore '%s' non valido"
+
+#: src/main/apply.c:103 src/main/complex.c:753
 msgid "invalid length"
 msgstr "lunghezza non valida"
 
-#: src/main/apply.c:113
+#: src/main/apply.c:108
 msgid "long vectors are not supported for matrix/array results"
 msgstr ""
 
-#: src/main/apply.c:162
+#: src/main/apply.c:115
+#, fuzzy, c-format
+msgid "type '%s' is not supported"
+msgstr "modalità '%s' non supportata in call_R"
+
+#: src/main/apply.c:163
 #, c-format
 msgid ""
 "values must be length %d,\n"
 " but FUN(X[[%d]]) result is length %d"
 msgstr ""
 
-#: src/main/apply.c:174
+#: src/main/apply.c:175
 #, c-format
 msgid ""
 "values must be type '%s',\n"
 " but FUN(X[[%d]]) result is type '%s'"
 msgstr ""
 
-#: src/main/apply.c:193
-#, fuzzy, c-format
-msgid "type '%s' is not supported"
-msgstr "modalità '%s' non supportata in call_R"
-
-#: src/main/apply.c:225
+#: src/main/apply.c:252
 #, c-format
 msgid "dimnames(<value>) is neither NULL nor list of length %d"
 msgstr ""
 
-#: src/main/arithmetic.c:42
+#: src/main/arithmetic.c:42 src/main/eval.c:3633
 msgid "NaNs produced"
 msgstr "Si è prodotto un NaN"
 
@@ -850,118 +856,121 @@ msgstr "Si è prodotto un NaN"
 msgid "non-numeric argument to mathematical function"
 msgstr "Argomento non numerico in una funzione matematica"
 
-#: src/main/arithmetic.c:187
+#: src/main/arithmetic.c:186
 msgid "probable complete loss of accuracy in modulus"
 msgstr "possibile perdita totale di precisione in modulo"
 
-#: src/main/arithmetic.c:337
+#: src/main/arithmetic.c:298
 msgid "NAs produced by integer overflow"
 msgstr "si è prodotto un NA per overflow di interi"
 
-#: src/main/arithmetic.c:538
+#: src/main/arithmetic.c:499
 msgid "operator needs one or two arguments"
 msgstr "l'operatore necessita di uno o due argomenti"
 
-#: src/main/arithmetic.c:554
+#: src/main/arithmetic.c:515
 msgid "non-numeric argument to binary operator"
 msgstr "argomento non numerico trasformato in operatore binario"
 
-#: src/main/arithmetic.c:615 src/main/relop.c:227
+#: src/main/arithmetic.c:576 src/main/relop.c:221
 msgid "non-conformable arrays"
 msgstr "array incompatibili"
 
-#: src/main/arithmetic.c:658
+#: src/main/arithmetic.c:619
 msgid "non-conformable time-series"
 msgstr "Serie storiche non compatibili"
 
-#: src/main/arithmetic.c:680 src/main/logic.c:143 src/main/relop.c:166
-#: src/main/relop.c:265
+#: src/main/arithmetic.c:641 src/main/logic.c:135 src/main/relop.c:160
+#: src/main/relop.c:259
 #, fuzzy
 msgid "longer object length is not a multiple of shorter object length"
 msgstr ""
 "la lunghezza dell'oggetto più lungo\n"
 "\tnon è un multipla di quella del più piccolo"
 
-#: src/main/arithmetic.c:751
+#: src/main/arithmetic.c:712
 msgid "invalid argument to unary operator"
 msgstr "argomento non valido per l'operatore"
 
-#: src/main/arithmetic.c:780 src/main/arithmetic.c:805
-#: src/main/arithmetic.c:824
+#: src/main/arithmetic.c:741 src/main/arithmetic.c:766
+#: src/main/arithmetic.c:785
 msgid "invalid unary operator"
 msgstr "operatore non valido"
 
-#: src/main/arithmetic.c:1241
+#: src/main/arithmetic.c:1191
 msgid "unimplemented real function of 1 argument"
 msgstr "funzione reale (di un argomento) non implementata"
 
-#: src/main/arithmetic.c:1255 src/main/complex.c:648 src/main/complex.c:718
+#: src/main/arithmetic.c:1205 src/main/complex.c:638 src/main/complex.c:708
 msgid "unimplemented complex function"
 msgstr "funzione complessa non implementata"
 
-#: src/main/arithmetic.c:1526 src/main/arithmetic.c:1877
-#: src/main/arithmetic.c:2056 src/main/arithmetic.c:2168
+#: src/main/arithmetic.c:1484 src/main/arithmetic.c:1877
+#: src/main/arithmetic.c:2049 src/main/arithmetic.c:2152
 #, c-format
 msgid "unimplemented real function of %d numeric arguments"
 msgstr "funzione reale di %d argomenti numerici non implementata"
 
-#: src/main/arithmetic.c:1552
+#: src/main/arithmetic.c:1511
 #, fuzzy, c-format
-msgid "%d arguments passed to '%s' which requires 1 or 2"
-msgstr "%d argomenti passati a 'log' che ne richiede 1 o 2"
+msgid "%d argument passed to '%s' which requires 1 or 2 arguments"
+msgid_plural "%d arguments passed to '%s'which requires 1 or 2 arguments"
+msgstr[0] "%d argomenti passati a 'log' che ne richiede 1 o 2"
+msgstr[1] "%d argomenti passati a 'log' che ne richiede 1 o 2"
 
-#: src/main/arithmetic.c:1570
+#: src/main/arithmetic.c:1530
 msgid "invalid second argument of length 0"
 msgstr "secondo argomento di lunghezza 0 non valido"
 
-#: src/main/arithmetic.c:1639
+#: src/main/arithmetic.c:1625 src/main/arithmetic.c:1643 src/main/envir.c:1464
+#: src/main/envir.c:1972 src/main/eval.c:630 src/main/eval.c:4237
+#, c-format
+msgid "argument \"%s\" is missing, with no default"
+msgstr "l'argomento \"%s\"  non è specificato e non ha un valore predefinito"
+
+#: src/main/arithmetic.c:1649
 #, fuzzy
 msgid "invalid argument 'base' of length 0"
 msgstr "secondo argomento di lunghezza 0 non valido"
 
-#: src/main/arithmetic.c:1647
-#, c-format
-msgid "%d arguments passed to 'log' which requires 1 or 2"
-msgstr "%d argomenti passati a 'log' che ne richiede 1 o 2"
-
-#: src/main/array.c:79 src/main/array.c:1441
+#: src/main/array.c:82 src/main/array.c:1591
 #, fuzzy, c-format
 msgid "'data' must be of a vector type, was '%s'"
 msgstr "'path' deve essere un vettore di tipo character"
 
-#: src/main/array.c:94 src/main/array.c:102
+#: src/main/array.c:97 src/main/array.c:105
 msgid "non-numeric matrix extent"
 msgstr "limite matrice non numerico"
 
-#: src/main/array.c:97 src/main/array.c:1535
+#: src/main/array.c:100 src/main/array.c:1695
 #, fuzzy
 msgid "invalid 'nrow' value (too large or NA)"
 msgstr "matrix: valore di 'nrow' non ammissibile (troppo grande o NA)"
 
-#: src/main/array.c:99 src/main/array.c:1537
+#: src/main/array.c:102 src/main/array.c:1697
 #, fuzzy
 msgid "invalid 'nrow' value (< 0)"
 msgstr "matrix:valore 'nrow' non valido (< 0)"
 
-#: src/main/array.c:105 src/main/array.c:1540
+#: src/main/array.c:108 src/main/array.c:1700
 #, fuzzy
 msgid "invalid 'ncol' value (too large or NA)"
 msgstr "matrix: valore di 'ncol' non ammissibile (troppo grande o NA)"
 
-#: src/main/array.c:107 src/main/array.c:1542
+#: src/main/array.c:110 src/main/array.c:1702
 #, fuzzy
 msgid "invalid 'ncol' value (< 0)"
 msgstr "matrix: valore 'ncol' non valido (< 0)"
 
-#: src/main/array.c:116
+#: src/main/array.c:119
 msgid "nc = 0 for non-null data"
 msgstr ""
 
-#: src/main/array.c:124
+#: src/main/array.c:127
 msgid "nr = 0 for non-null data"
 msgstr ""
 
-#: src/main/array.c:135
+#: src/main/array.c:138
 #, fuzzy, c-format
 msgid ""
 "data length [%d] is not a sub-multiple or multiple of the number of rows [%d]"
@@ -969,7 +978,7 @@ msgstr ""
 "la lunghezza [%d] dei dati non è un sottomultiplo o un multiplo del numerodi "
 "di righe [%d] in matrix"
 
-#: src/main/array.c:138
+#: src/main/array.c:141
 #, fuzzy, c-format
 msgid ""
 "data length [%d] is not a sub-multiple or multiple of the number of columns "
@@ -978,315 +987,326 @@ msgstr ""
 "la lunghezza [%d] dei dati non è un sottomultiplo o un multiplo del numero "
 "di colonne [%d] in matrix"
 
-#: src/main/array.c:141
+#: src/main/array.c:144
 msgid "data length exceeds size of matrix"
 msgstr "la lunghezza dei dati supera la dimensione della matrice"
 
-#: src/main/array.c:147 src/main/array.c:1453 src/main/array.c:1549
+#: src/main/array.c:150 src/main/array.c:1603 src/main/array.c:1709
 #, fuzzy
 msgid "too many elements specified"
 msgstr "matrix: troppi elementi specificati"
 
-#: src/main/array.c:205
+#: src/main/array.c:208
 msgid "negative extents to matrix"
 msgstr "limite negativo per matrix"
 
-#: src/main/array.c:208
+#: src/main/array.c:211
 msgid "allocMatrix: too many elements specified"
 msgstr "allocMatrix: troppi elementi specificati"
 
-#: src/main/array.c:236
+#: src/main/array.c:239
 #, fuzzy
 msgid "negative extents to 3D array"
 msgstr "limite negativo per matrix"
 
-#: src/main/array.c:239
+#: src/main/array.c:242
 #, fuzzy
 msgid "'alloc3Darray': too many elements specified"
 msgstr "allocMatrix: troppi elementi specificati"
 
-#: src/main/array.c:264
+#: src/main/array.c:267
 #, fuzzy
 msgid "'allocArray': too many elements specified by 'dims'"
 msgstr "allocArray: troppi elementi specificati in 'dims'"
 
-#: src/main/array.c:448
+#: src/main/array.c:523
+#, fuzzy, c-format
+msgid "'%s' must be a list or atomic vector"
+msgstr "'x' deve essere un vettore di tipo character"
+
+#: src/main/array.c:561
 #, fuzzy, c-format
 msgid "a matrix-like object is required as argument to '%s'"
 msgstr "'row/col' richiedono come argomento un oggetto matrix"
 
-#: src/main/array.c:662
+#: src/main/array.c:776
 #, fuzzy
 msgid "requires numeric/complex matrix/vector arguments"
 msgstr "richiesti argomenti numerici per matrix/vector"
 
-#: src/main/array.c:752 src/main/array.c:756 src/main/array.c:760
+#: src/main/array.c:886 src/main/array.c:890 src/main/array.c:894
 msgid "non-conformable arguments"
 msgstr "gli argomenti non sono compatibili"
 
-#: src/main/array.c:1058
+#: src/main/array.c:1193
 msgid "argument is not a matrix"
 msgstr "l'argomento non è di tipo matrix"
 
-#: src/main/array.c:1093
+#: src/main/array.c:1228
 msgid "invalid first argument, must be an array"
 msgstr "primo argomento non valido, deve essere di tipo array"
 
-#: src/main/array.c:1107
+#: src/main/array.c:1242
 #, fuzzy, c-format
 msgid "'perm' is of wrong length %d (!= %d)"
 msgstr "'perm' ha una lunghezza non ammissibile"
 
-#: src/main/array.c:1112 src/main/array.c:1115
+#: src/main/array.c:1247 src/main/array.c:1250
 msgid "'a' does not have named dimnames"
 msgstr ""
 
-#: src/main/array.c:1122
+#: src/main/array.c:1257
 #, c-format
 msgid "'perm[%d]' does not match a dimension name"
 msgstr ""
 
-#: src/main/array.c:1135
+#: src/main/array.c:1270
 msgid "value out of range in 'perm'"
 msgstr "valore fuori limite in 'perm'"
 
-#: src/main/array.c:1217
+#: src/main/array.c:1352
 #, fuzzy
 msgid "'resize' must be TRUE or FALSE"
 msgstr "'decreasing' deve essere TRUE o FALSE"
 
-#: src/main/array.c:1275
+#: src/main/array.c:1422
 msgid "'x' must be numeric"
 msgstr "'x' deve essere di tipo numeric"
 
-#: src/main/array.c:1449
+#: src/main/array.c:1425
+#, fuzzy
+msgid "'x' is too short"
+msgstr "questo oggetto non è indicizzabile"
+
+#: src/main/array.c:1599
 #, fuzzy
 msgid "'dims' cannot be of length 0"
 msgstr "'hadj' deve essere di lunghezza 1"
 
-#: src/main/array.c:1545
+#: src/main/array.c:1705
 #, fuzzy
 msgid "'x' must have positive length"
 msgstr "l'argomento deve avere lunghezza positiva"
 
-#: src/main/array.c:1605
+#: src/main/array.c:1771
 #, c-format
 msgid "singular matrix in 'backsolve'. First zero in diagonal [%d]"
 msgstr ""
 
-#: src/main/attrib.c:40 src/main/attrib.c:235 src/main/attrib.c:269
-#: src/main/attrib.c:291 src/main/attrib.c:405 src/main/attrib.c:452
-#: src/main/attrib.c:502
+#: src/main/attrib.c:40 src/main/attrib.c:231 src/main/attrib.c:265
+#: src/main/attrib.c:287 src/main/attrib.c:403 src/main/attrib.c:450
+#: src/main/attrib.c:501
 msgid "attempt to set an attribute on NULL"
 msgstr "tentativo di impostare un attributo a NULL"
 
-#: src/main/attrib.c:72
+#: src/main/attrib.c:77
 #, fuzzy, c-format
 msgid "row names must be 'character' or 'integer', not '%s'"
 msgstr "'hostname' deve essere una stringa di tipo character"
 
-#: src/main/attrib.c:124
+#: src/main/attrib.c:130
 #, fuzzy, c-format
 msgid "getAttrib: invalid type (%s) for TAG"
 msgstr "getAttrib: tipo di TAG non valido"
 
-#: src/main/attrib.c:379
+#: src/main/attrib.c:377
 #, fuzzy, c-format
 msgid "invalid type (%s) for 'names': must be vector"
 msgstr "tipo non valido per 'names': deve essere di tipo vector"
 
-#: src/main/attrib.c:382
+#: src/main/attrib.c:380
 #, c-format
 msgid "'names' attribute [%d] must be the same length as the vector [%d]"
 msgstr ""
 "l'attributo 'names' [%d] deve essere della stessa lunghezza del vettore [%d]"
 
-#: src/main/attrib.c:387
+#: src/main/attrib.c:385
 msgid "names() applied to a non-vector"
 msgstr "names() utilizzata su oggetto non vector"
 
-#: src/main/attrib.c:395
+#: src/main/attrib.c:393
 msgid "invalid time series parameters specified"
 msgstr "parametri della serie storica non validi"
 
-#: src/main/attrib.c:409
+#: src/main/attrib.c:407
 #, fuzzy
 msgid "'tsp' attribute must be numeric"
 msgstr "l'attributo 'tsp' deve essere di tipo numeric e di lunghezza 3"
 
-#: src/main/attrib.c:415
+#: src/main/attrib.c:413
 msgid "'tsp' attribute must be numeric of length three"
 msgstr "l'attributo 'tsp' deve essere di tipo numeric e di lunghezza 3"
 
-#: src/main/attrib.c:432
+#: src/main/attrib.c:430
 msgid "cannot assign 'tsp' to zero-length vector"
 msgstr "non è possibile attribuire 'tsp' a vettori di lunghezza nulla"
 
-#: src/main/attrib.c:463
+#: src/main/attrib.c:461
 msgid "attempt to set invalid 'comment' attribute"
 msgstr "tentativo di impostare un attributo 'comment' non ammissibile"
 
-#: src/main/attrib.c:511
+#: src/main/attrib.c:510
 msgid "adding class \"factor\" to an invalid object"
 msgstr ""
 
-#: src/main/attrib.c:519
+#: src/main/attrib.c:541
 msgid "attempt to set invalid 'class' attribute"
 msgstr "tentativo di assegnazione di un attributo 'class' non ammissibile"
 
-#: src/main/attrib.c:777
+#: src/main/attrib.c:872
 #, c-format
 msgid "class '%s' has no 'names' slot"
 msgstr ""
 
-#: src/main/attrib.c:779
+#: src/main/attrib.c:874
 #, c-format
 msgid ""
 "class '%s' has no 'names' slot; assigning a names attribute will create an "
 "invalid object"
 msgstr ""
 
-#: src/main/attrib.c:782
+#: src/main/attrib.c:877
 #, c-format
 msgid ""
 "invalid to use names()<- to set the 'names' slot in a non-vector class ('%s')"
 msgstr ""
 
-#: src/main/attrib.c:812
+#: src/main/attrib.c:907
 msgid "incompatible 'names' argument"
 msgstr "argomento 'names' incompatibile"
 
-#: src/main/attrib.c:867
+#: src/main/attrib.c:962
 #, fuzzy, c-format
 msgid "invalid type (%s) to set 'names' attribute"
 msgstr "tipo non valido per assegnare l'attributo 'names'"
 
-#: src/main/attrib.c:938
+#: src/main/attrib.c:1035
 msgid "'dimnames' applied to non-array"
 msgstr "'dimnames' usata su oggetti non array"
 
-#: src/main/attrib.c:943
-msgid "'dimnames' must be a list"
+#: src/main/attrib.c:1040 src/main/coerce.c:2471
+#, fuzzy, c-format
+msgid "'%s' must be a list"
 msgstr "'dimnames' deve essere di tipo list"
 
-#: src/main/attrib.c:946 src/main/attrib.c:974
+#: src/main/attrib.c:1043 src/main/attrib.c:1071
 #, c-format
 msgid "length of 'dimnames' [%d] must match that of 'dims' [%d]"
 msgstr "la lunghezza di 'dimnames' [%d] non coincide con quella di 'dims' [%d]"
 
-#: src/main/attrib.c:980
+#: src/main/attrib.c:1077
 #, fuzzy, c-format
 msgid "invalid type (%s) for 'dimnames' (must be a vector)"
 msgstr "tipo non valido per 'dimnames' (deve essere di tipo vector)"
 
-#: src/main/attrib.c:983
+#: src/main/attrib.c:1080
 #, c-format
 msgid "length of 'dimnames' [%d] not equal to array extent"
 msgstr ""
 "la lunghezza di 'dimnames' [%d] non coincide con l'estensione dell'array"
 
-#: src/main/attrib.c:1055 src/main/builtin.c:75 src/main/builtin.c:112
-#: src/main/envir.c:1606 src/main/envir.c:1734 src/main/envir.c:1796
-#: src/main/envir.c:1918 src/main/paste.c:74 src/main/paste.c:293
-#: src/main/random.c:487 src/main/random.c:516 src/main/unique.c:1749
+#: src/main/attrib.c:1152 src/main/builtin.c:75 src/main/builtin.c:112
+#: src/main/envir.c:1740 src/main/envir.c:1868 src/main/envir.c:1928
+#: src/main/envir.c:2065 src/main/paste.c:74 src/main/paste.c:293
+#: src/main/random.c:479 src/main/random.c:508 src/main/unique.c:1746
 msgid "invalid first argument"
 msgstr "primo argomento non valido"
 
-#: src/main/attrib.c:1058
+#: src/main/attrib.c:1155
 msgid "invalid second argument"
 msgstr "secondo argomento non valido"
 
-#: src/main/attrib.c:1066
+#: src/main/attrib.c:1163
 #, fuzzy
 msgid "length-0 dimension vector is invalid"
 msgstr "dim: vettori di dimensione di lunghezza 0 non ammissibili"
 
-#: src/main/attrib.c:1071
+#: src/main/attrib.c:1168
 msgid "the dims contain missing values"
 msgstr ""
 
-#: src/main/attrib.c:1073
+#: src/main/attrib.c:1170
 msgid "the dims contain negative values"
 msgstr ""
 
-#: src/main/attrib.c:1078
+#: src/main/attrib.c:1175
 #, fuzzy
 msgid "dims do not match the length of object"
 msgstr ""
 "dim<- : dims [prodotto %d] non conformi alla lunghezza dell'oggetto [%d]"
 
-#: src/main/attrib.c:1080
+#: src/main/attrib.c:1177
 #, fuzzy, c-format
 msgid "dims [product %d] do not match the length of object [%d]"
 msgstr ""
 "dim<- : dims [prodotto %d] non conformi alla lunghezza dell'oggetto [%d]"
 
-#: src/main/attrib.c:1177
+#: src/main/attrib.c:1284
 #, fuzzy
 msgid "attributes must be a list or NULL"
 msgstr "gli attributi devono essere un oggetto di tipo list"
 
-#: src/main/attrib.c:1182
+#: src/main/attrib.c:1289
 msgid "attributes must be named"
 msgstr "gli attributi devono avere un nome"
 
-#: src/main/attrib.c:1186
+#: src/main/attrib.c:1293
 #, c-format
 msgid "all attributes must have names [%d does not]"
 msgstr "tutti gli attributi devono avere dei nomi [%d non ce l'ha]"
 
-#: src/main/attrib.c:1285
+#: src/main/attrib.c:1393
 #, fuzzy
 msgid "'which' must be of mode character"
 msgstr "l'attributo 'name' deve essere in modalità character"
 
-#: src/main/attrib.c:1287
+#: src/main/attrib.c:1395
 #, fuzzy
 msgid "exactly one attribute 'which' must be given"
 msgstr "deve essere specificato solo un attributo 'name'"
 
-#: src/main/attrib.c:1345 src/main/attrib.c:1368 src/main/subscript.c:240
-#: src/main/subscript.c:244 src/main/subset.c:1188 src/main/subset.c:1239
+#: src/main/attrib.c:1456 src/main/attrib.c:1479 src/main/subscript.c:245
+#: src/main/subscript.c:249 src/main/subset.c:1257 src/main/subset.c:1311
 #, c-format
 msgid "partial match of '%s' to '%s'"
 msgstr ""
 
-#: src/main/attrib.c:1406
+#: src/main/attrib.c:1525
 #, fuzzy, c-format
 msgid "invalid type '%s' for slot name"
 msgstr "typo o lunghezza non ammissibile per il nome dello slot"
 
-#: src/main/attrib.c:1444
+#: src/main/attrib.c:1563
 #, fuzzy
 msgid "'name' must be non-null character string"
 msgstr "'name' deve essere un character non nullo"
 
-#: src/main/attrib.c:1568 src/main/attrib.c:1639 src/main/attrib.c:1676
+#: src/main/attrib.c:1688 src/main/attrib.c:1759 src/main/attrib.c:1797
 msgid "invalid type or length for slot name"
 msgstr "typo o lunghezza non ammissibile per il nome dello slot"
 
-#: src/main/attrib.c:1602
+#: src/main/attrib.c:1722
 #, c-format
 msgid "cannot get a slot (\"%s\") from an object of type \"%s\""
 msgstr "non è possibile ottenere lo slot (\"%s\") da un oggetto di tipo \"%s\""
 
-#: src/main/attrib.c:1613
+#: src/main/attrib.c:1733
 #, c-format
 msgid "no slot of name \"%s\" for this object of class \"%s\""
 msgstr "nessuno slot di nome \"%s\" per questo oggetto di classe \"%s\""
 
-#: src/main/attrib.c:1630
+#: src/main/attrib.c:1750
 #, fuzzy
 msgid "attempt to set slot on NULL object"
 msgstr "tentativo di impostare un attributo a NULL"
 
-#: src/main/attrib.c:1671
+#: src/main/attrib.c:1792
 #, fuzzy
 msgid "formal classes cannot be used without the 'methods' package"
 msgstr ""
 "classi formali non possono essere utilizzati senza il pacchetto methods"
 
-#: src/main/attrib.c:1683
+#: src/main/attrib.c:1804
 #, c-format
 msgid ""
 "trying to get slot \"%s\" from an object of a basic class (\"%s\") with no "
@@ -1295,7 +1315,7 @@ msgstr ""
 "tentativo di ottenre lo slot \"%s\" da un oggetto di classe base (\"%s\") "
 "senza slots"
 
-#: src/main/attrib.c:1687
+#: src/main/attrib.c:1808
 #, fuzzy, c-format
 msgid ""
 "trying to get slot \"%s\" from an object (class \"%s\") that is not an S4 "
@@ -1304,47 +1324,46 @@ msgstr ""
 "tentativo di ottere lo slot \"%s\" da un oggetto per il quale la classe (\"%s"
 "\") non è definita "
 
-#: src/main/bind.c:161
+#: src/main/bind.c:164
 #, c-format
 msgid "resulting vector exceeds vector length limit in '%s'"
 msgstr ""
 
-#: src/main/bind.c:291 src/main/bind.c:327 src/main/bind.c:376
-#: src/main/bind.c:449 src/main/bind.c:477
+#: src/main/bind.c:294 src/main/bind.c:330 src/main/bind.c:379
+#: src/main/bind.c:452 src/main/bind.c:480
 #, fuzzy, c-format
 msgid "type '%s' is unimplemented in '%s'"
 msgstr "tipo %d non è implementato in type2str"
 
-#: src/main/bind.c:685
+#: src/main/bind.c:688
 msgid "repeated formal argument 'recursive'"
 msgstr "argomento formale 'recursive' ripetuto"
 
-#: src/main/bind.c:696
+#: src/main/bind.c:699
 msgid "repeated formal argument 'use.names'"
 msgstr "argomento formale 'use.names' ripetuto"
 
-#: src/main/bind.c:894
+#: src/main/bind.c:900
 msgid "argument not a list"
 msgstr "l'argomento non è di tipo list"
 
-#: src/main/bind.c:1038 src/main/eval.c:2691 src/main/eval.c:2700
-#: src/main/objects.c:318 src/main/objects.c:354 src/main/objects.c:729
-#: src/main/objects.c:746 src/main/objects.c:753
+#: src/main/bind.c:1044 src/main/names.c:1273 src/main/names.c:1278
+#: src/main/names.c:1283 src/main/names.c:1288
 #, c-format
 msgid "class name too long in '%s'"
 msgstr "nome class troppo lungo in '%s'"
 
-#: src/main/bind.c:1114
+#: src/main/bind.c:1128
 #, fuzzy, c-format
 msgid "cannot create a matrix from type '%s'"
 msgstr "non posso creare una matrice a partire da questo tipo di dati"
 
-#: src/main/bind.c:1185
+#: src/main/bind.c:1198
 #, c-format
 msgid "number of rows of matrices must match (see arg %d)"
 msgstr "il numero di righe delle matrici deve coincidere (si veda arg %d)"
 
-#: src/main/bind.c:1430
+#: src/main/bind.c:1455
 #, c-format
 msgid "number of columns of matrices must match (see arg %d)"
 msgstr "il numero di colonne delle matrici deve coincidere (si veda arg %d)"
@@ -1353,223 +1372,258 @@ msgstr "il numero di colonne delle matrici deve coincidere (si veda arg %d)"
 msgid "vector size cannot be NA"
 msgstr "la dimensione del vettore no può essere NA"
 
-#: src/main/builtin.c:49 src/main/builtin.c:57 src/main/sort.c:1303
+#: src/main/builtin.c:49 src/main/builtin.c:57 src/main/sort.c:1323
 #, fuzzy
 msgid "vector size cannot be NA/NaN"
 msgstr "la dimensione del vettore no può essere NA"
 
-#: src/main/builtin.c:50 src/main/builtin.c:58 src/main/sort.c:1304
+#: src/main/builtin.c:50 src/main/builtin.c:58 src/main/sort.c:1324
 #, fuzzy
 msgid "vector size cannot be infinite"
 msgstr "la dimensione del vettore non può essere negativa"
 
-#: src/main/builtin.c:51 src/main/builtin.c:59 src/main/builtin.c:916
-#: src/main/sort.c:1305
+#: src/main/builtin.c:51 src/main/builtin.c:59 src/main/builtin.c:950
+#: src/main/sort.c:1325
 msgid "vector size specified is too large"
 msgstr "dimensione troppo grande per il vettore indicato"
 
-#: src/main/builtin.c:84 src/main/builtin.c:93 src/main/builtin.c:293
-#: src/main/builtin.c:326 src/main/builtin.c:365 src/main/builtin.c:375
-#: src/main/coerce.c:1537 src/main/connections.c:3066 src/main/engine.c:2967
-#: src/main/envir.c:993 src/main/envir.c:1046 src/main/envir.c:1136
-#: src/main/envir.c:1615 src/main/envir.c:1739 src/main/envir.c:1807
-#: src/main/envir.c:1925 src/main/envir.c:2582 src/main/envir.c:2642
-#: src/main/envir.c:2922 src/main/envir.c:2951 src/main/envir.c:2972
-#: src/main/envir.c:2995 src/main/envir.c:3030 src/main/envir.c:3051
-#: src/main/envir.c:3357 src/main/envir.c:3362 src/main/eval.c:5318
-#: src/main/objects.c:197 src/main/objects.c:203 src/main/saveload.c:2070
-#: src/main/saveload.c:2364 src/main/serialize.c:2709
+#: src/main/builtin.c:84 src/main/builtin.c:93 src/main/builtin.c:304
+#: src/main/builtin.c:337 src/main/builtin.c:394 src/main/builtin.c:408
+#: src/main/coerce.c:1536 src/main/connections.c:3062 src/main/engine.c:2987
+#: src/main/envir.c:1001 src/main/envir.c:1054 src/main/envir.c:1210
+#: src/main/envir.c:1749 src/main/envir.c:1873 src/main/envir.c:1939
+#: src/main/envir.c:2072 src/main/envir.c:2791 src/main/envir.c:2877
+#: src/main/envir.c:3182 src/main/envir.c:3211 src/main/envir.c:3232
+#: src/main/envir.c:3255 src/main/envir.c:3290 src/main/envir.c:3311
+#: src/main/envir.c:3632 src/main/envir.c:3637 src/main/eval.c:6251
+#: src/main/objects.c:191 src/main/objects.c:199 src/main/saveload.c:2072
+#: src/main/saveload.c:2364 src/main/serialize.c:2755
 msgid "use of NULL environment is defunct"
 msgstr ""
 
-#: src/main/builtin.c:306
+#: src/main/builtin.c:250 src/main/builtin.c:263
+#, fuzzy
+msgid "argument is not a function"
+msgstr "il secondo argomento deve essere una funzione"
+
+#: src/main/builtin.c:317
 msgid "replacement object is not an environment"
 msgstr "l'oggetto sostitutivo non è un environment"
 
-#: src/main/builtin.c:331
+#: src/main/builtin.c:342
 msgid "'enclos' must be an environment"
 msgstr "'enclos' deve essere un environment"
 
-#: src/main/builtin.c:352 src/main/builtin.c:370
+#: src/main/builtin.c:363 src/main/builtin.c:399
 msgid "argument is not an environment"
 msgstr "l'argomento non è un environment"
 
-#: src/main/builtin.c:354
+#: src/main/builtin.c:365
 #, fuzzy
 msgid "the empty environment has no parent"
 msgstr "argomento esportazione environment sbagliato"
 
-#: src/main/builtin.c:372
+#: src/main/builtin.c:401
 #, fuzzy
 msgid "can not set parent of the empty environment"
 msgstr "non posso rompere i legami nell'environment base"
 
-#: src/main/builtin.c:380
+#: src/main/builtin.c:403
+#, fuzzy
+msgid "can not set the parent environment of a namespace"
+msgstr "non posso rompere i legami nell'environment base"
+
+#: src/main/builtin.c:405
+#, fuzzy
+msgid "can not set the parent environment of package imports"
+msgstr "non posso rompere i legami nell'environment base"
+
+#: src/main/builtin.c:413
 msgid "'parent' is not an environment"
 msgstr "'parent' non è un environment"
 
-#: src/main/builtin.c:521 src/main/connections.c:3691
-#: src/main/connections.c:4068 src/main/connections.c:4102
-#: src/main/connections.c:4480 src/main/connections.c:4550
-#: src/main/connections.c:4759 src/main/connections.c:4763
-#: src/main/connections.c:5124 src/main/deparse.c:360 src/main/deparse.c:446
-#: src/main/serialize.c:2006
+#: src/main/builtin.c:556 src/main/connections.c:3687
+#: src/main/connections.c:4079 src/main/connections.c:4113
+#: src/main/connections.c:4491 src/main/connections.c:4561
+#: src/main/connections.c:4772 src/main/connections.c:4776
+#: src/main/connections.c:5199 src/main/deparse.c:369 src/main/deparse.c:458
+#: src/main/serialize.c:2045
 msgid "cannot write to this connection"
 msgstr "non posso scrivere su questa connessione"
 
-#: src/main/builtin.c:526 src/main/builtin.c:556
+#: src/main/builtin.c:561 src/main/builtin.c:591
 #, c-format
 msgid "invalid '%s' specification"
 msgstr "specificazione di '%s' non valida"
 
-#: src/main/builtin.c:543
+#: src/main/builtin.c:578
 msgid "non-positive 'fill' argument will be ignored"
 msgstr ""
 
-#: src/main/builtin.c:618
+#: src/main/builtin.c:653
 #, fuzzy, c-format
 msgid "argument %d (type '%s') cannot be handled by 'cat'"
 msgstr "l'argomento %d (type '%s') non ancora supportato da cat"
 
-#: src/main/builtin.c:763
+#: src/main/builtin.c:797
 #, fuzzy, c-format
 msgid "vector: cannot make a vector of mode '%s'."
 msgstr "vector: non posso creare un vettore in modalità \"%s\"."
 
-#: src/main/builtin.c:789
+#: src/main/builtin.c:823
 msgid "cannot set length of non-vector"
 msgstr "impossibile impostare lunghezza di un oggetto non vector"
 
-#: src/main/builtin.c:897 src/main/builtin.c:907 src/main/options.c:637
+#: src/main/builtin.c:931 src/main/builtin.c:941 src/main/options.c:659
 msgid "invalid argument"
 msgstr "argomento non valido"
 
-#: src/main/builtin.c:899 src/main/builtin.c:909 src/main/builtin.c:911
-#: src/main/character.c:366 src/main/coerce.c:2765
+#: src/main/builtin.c:933 src/main/builtin.c:943 src/main/builtin.c:945
+#: src/main/character.c:525 src/main/coerce.c:2832
 #, fuzzy
 msgid "invalid value"
 msgstr "valore '%s' non valido"
 
-#: src/main/builtin.c:942 src/main/coerce.c:2478 src/main/coerce.c:2519
-#: src/main/eval.c:563 src/main/eval.c:683 src/main/eval.c:2099
-#: src/main/eval.c:2176 src/main/eval.c:2236 src/main/eval.c:2569
-#: src/main/eval.c:4694 src/main/eval.c:4814
+#: src/main/builtin.c:976 src/main/coerce.c:2541 src/main/coerce.c:2584
+#: src/main/eval.c:620 src/main/eval.c:740 src/main/eval.c:2266
+#: src/main/eval.c:2346 src/main/eval.c:2407 src/main/eval.c:2745
+#: src/main/eval.c:5584 src/main/eval.c:5701
 msgid "'...' used in an incorrect context"
 msgstr "'...' usato in un contesto sbagliato"
 
-#: src/main/builtin.c:963
+#: src/main/builtin.c:998
 #, c-format
 msgid "duplicate 'switch' defaults: '%s' and '%s'"
 msgstr ""
 
-#: src/main/builtin.c:996
+#: src/main/builtin.c:1031
 msgid "'EXPR' is missing"
 msgstr ""
 
-#: src/main/builtin.c:1000 src/main/eval.c:5155
+#: src/main/builtin.c:1035 src/main/eval.c:6056
 #, fuzzy
 msgid "EXPR must be a length 1 vector"
 msgstr "switch: EXPR deve restituire un vettore di lunghezza 1"
 
-#: src/main/builtin.c:1003
+#: src/main/builtin.c:1038 src/main/eval.c:6059
 #, c-format
 msgid ""
 "EXPR is a \"factor\", treated as integer.\n"
 " Consider using '%s' instead."
 msgstr ""
 
-#: src/main/character.c:105 src/main/character.c:108 src/main/character.c:132
-#: src/main/character.c:135
+#: src/main/builtin.c:1095 src/main/eval.c:6069 src/main/eval.c:6098
+msgid "'switch' with no alternatives"
+msgstr ""
+
+#: src/main/character.c:103 src/main/character.c:224
+#, fuzzy, c-format
+msgid "%d argument passed to '%s' which requires %d to %d"
+msgid_plural "%d arguments passed to '%s' which requires %d to %d"
+msgstr[0] "%d argomenti passati a 'log' che ne richiede 1 o 2"
+msgstr[1] "%d argomenti passati a 'log' che ne richiede 1 o 2"
+
+#: src/main/character.c:110 src/main/character.c:113 src/main/character.c:232
+#: src/main/character.c:235
 #, fuzzy, c-format
 msgid "'%s' requires a character vector"
 msgstr "strstrim() necessita di un vettore di caratteri"
 
-#: src/main/character.c:164
-#, c-format
-msgid ""
-"number of characters is not computable for element %d in \"bytes\" encoding"
-msgstr ""
+#: src/main/character.c:150 src/main/character.c:165 src/main/character.c:175
+#: src/main/character.c:203
+#, fuzzy, c-format
+msgid "invalid multibyte string, %s"
+msgstr "stringa mulibyte %d non valida"
 
-#: src/main/character.c:169 src/main/character.c:197 src/main/character.c:653
-#: src/main/character.c:750
+#: src/main/character.c:159
 #, c-format
-msgid "invalid multibyte string %d"
-msgstr "stringa mulibyte %d non valida"
+msgid "number of characters is not computable in \"bytes\" encoding, %s"
+msgstr ""
 
-#: src/main/character.c:185
+#: src/main/character.c:188
 #, c-format
-msgid "width is not computable for element %d in \"bytes\" encoding"
+msgid "width is not computable for %s in \"bytes\" encoding"
 msgstr ""
 
-#: src/main/character.c:263
+#: src/main/character.c:311
 msgid "extracting substrings from a non-character object"
 msgstr "estraggo una sottostringa da un oggetto che non è di tipo character"
 
-#: src/main/character.c:268 src/main/character.c:363
+#: src/main/character.c:321 src/main/character.c:522
 #, fuzzy
 msgid "invalid substring arguments"
 msgstr "argomento stringa non valido"
 
-#: src/main/character.c:358
+#: src/main/character.c:361
+#, fuzzy
+msgid "non-character object(s)"
+msgstr "nomi non di tipo character"
+
+#: src/main/character.c:517
 msgid "replacing substrings in a non-character object"
 msgstr "rimpiazzo una sottostringa in un oggetto che non è di tipo character"
 
-#: src/main/character.c:551
+#: src/main/character.c:785
 #, fuzzy
 msgid "the first argument must be a character vector"
 msgstr "il primo argomento deve essere una vettore character"
 
-#: src/main/character.c:570
+#: src/main/character.c:822
 msgid "abbreviate used with non-ASCII chars"
 msgstr "abbreviazione usata con caratteri non ASCII"
 
-#: src/main/character.c:591
+#: src/main/character.c:843
 msgid "non-character names"
 msgstr "nomi non di tipo character"
 
-#: src/main/character.c:696 src/main/grep.c:159
+#: src/main/character.c:905 src/main/character.c:1002
+#, c-format
+msgid "invalid multibyte string %d"
+msgstr "stringa mulibyte %d non valida"
+
+#: src/main/character.c:948 src/main/grep.c:163
 #, fuzzy
 msgid "non-character argument"
 msgstr "nomi non di tipo character"
 
-#: src/main/character.c:805
+#: src/main/character.c:1057
 #, c-format
 msgid "decreasing range specification ('%lc-%lc')"
 msgstr "specificazione range decrescente ('%lc-%lc')"
 
-#: src/main/character.c:891
+#: src/main/character.c:1143
 #, c-format
 msgid "decreasing range specification ('%c-%c')"
 msgstr "specificazione range decrescente ('%c-%c')"
 
-#: src/main/character.c:1079
+#: src/main/character.c:1331
 #, fuzzy
 msgid "invalid UTF-8 string 'old'"
 msgstr "stringa multibyte non valido in 'old'"
 
-#: src/main/character.c:1085
+#: src/main/character.c:1337
 msgid "invalid multibyte string 'old'"
 msgstr "stringa multibyte non valido in 'old'"
 
-#: src/main/character.c:1098
+#: src/main/character.c:1350
 #, fuzzy
 msgid "invalid UTF-8 string 'new'"
 msgstr "stringa multibyte 'new' non valida"
 
-#: src/main/character.c:1104
+#: src/main/character.c:1356
 msgid "invalid multibyte string 'new'"
 msgstr "stringa multibyte 'new' non valida"
 
-#: src/main/character.c:1132 src/main/character.c:1221
+#: src/main/character.c:1384 src/main/character.c:1473
 msgid "'old' is longer than 'new'"
 msgstr "'old' è più lungo di 'new'"
 
-#: src/main/character.c:1164
+#: src/main/character.c:1416
 #, c-format
 msgid "invalid input multibyte string %d"
 msgstr "stringa input multibyte %d non valida"
 
-#: src/main/character.c:1271
+#: src/main/character.c:1523
 msgid "strtrim() requires a character vector"
 msgstr "strstrim() necessita di un vettore di caratteri"
 
@@ -1582,15 +1636,16 @@ msgstr "argomento '%s' non valido"
 msgid "applies only to lists and vectors"
 msgstr "si applica solo a liste e vettori"
 
-#: src/main/coerce.c:77 src/main/errors.c:1208
+#: src/main/coerce.c:77 src/main/errors.c:1194
 msgid "NAs introduced by coercion"
 msgstr "si è prodotto un NA per coercizione"
 
-#: src/main/coerce.c:79 src/main/errors.c:1209
-msgid "inaccurate integer conversion in coercion"
-msgstr "conversione intera non accurata durante la conversione"
+#: src/main/coerce.c:79
+#, fuzzy
+msgid "NAs introduced by coercion to integer range"
+msgstr "si è prodotto un NA per coercizione"
 
-#: src/main/coerce.c:81 src/main/errors.c:1210
+#: src/main/coerce.c:81 src/main/errors.c:1196
 msgid "imaginary parts discarded in coercion"
 msgstr "parti immaginarie eliminate durante la conversione"
 
@@ -1598,61 +1653,65 @@ msgstr "parti immaginarie eliminate durante la conversione"
 msgid "out-of-range values treated as 0 in coercion to raw"
 msgstr "valori fuori range trattati come 0 durante la conversione"
 
-#: src/main/coerce.c:414
+#: src/main/coerce.c:399
 #, fuzzy, c-format
 msgid "invalid data of mode '%s' (too short)"
 msgstr "dato in modalità \"%s\" non valido (troppo corto)"
 
-#: src/main/coerce.c:1016
+#: src/main/coerce.c:1002
 #, fuzzy, c-format
 msgid "'pairlist' object cannot be coerced to type '%s'"
 msgstr "l'oggetto 'pairlist' non può essere convertito in '%s'"
 
-#: src/main/coerce.c:1134
+#: src/main/coerce.c:1120
 #, fuzzy, c-format
 msgid "(list) object cannot be coerced to type '%s'"
 msgstr "oggetto (list) non può essere converito in '%s'"
 
-#: src/main/coerce.c:1157
+#: src/main/coerce.c:1143
 #, fuzzy, c-format
 msgid "(symbol) object cannot be coerced to type '%s'"
 msgstr "oggetto (list) non può essere converito in '%s'"
 
-#: src/main/coerce.c:1173 src/main/coerce.c:1485
+#: src/main/coerce.c:1159 src/main/coerce.c:1484
 msgid "no method for coercing this S4 class to a vector"
 msgstr ""
 
-#: src/main/coerce.c:1232
+#: src/main/coerce.c:1222
 msgid "environments cannot be coerced to other types"
 msgstr ""
 "gli environment non possono essere trasformati in altri tipi di oggetti"
 
-#: src/main/coerce.c:1379
+#: src/main/coerce.c:1374
 #, fuzzy
 msgid "attempting to coerce non-factor"
 msgstr "tentativo di ingrandire un non vettore"
 
-#: src/main/coerce.c:1533
+#: src/main/coerce.c:1379 src/main/coerce.c:1389
+msgid "malformed factor"
+msgstr ""
+
+#: src/main/coerce.c:1532
 msgid "list argument expected"
 msgstr "richiesto argomento di tipo list"
 
-#: src/main/coerce.c:1541 src/main/eval.c:5322
+#: src/main/coerce.c:1540 src/main/eval.c:6255
 msgid "invalid environment"
 msgstr "environment non valido"
 
-#: src/main/coerce.c:1545
+#: src/main/coerce.c:1544
 msgid "argument must have length at least 1"
 msgstr "l'argomento deve avere almeno lunghezza 1"
 
-#: src/main/coerce.c:1567
+#: src/main/coerce.c:1566
 msgid "invalid body for function"
 msgstr "corpo funzione non valido"
 
-#: src/main/coerce.c:1590
+#: src/main/coerce.c:1589
 msgid "invalid length 0 argument"
 msgstr "argomento di lunghezza 0 non valido"
 
-#: src/main/coerce.c:1605
+#: src/main/coerce.c:1604
 msgid "invalid argument list"
 msgstr "argomento di tipo list non valido"
 
@@ -1664,70 +1723,65 @@ msgstr "tipo \"single\" non implementato in R"
 msgid "unimplemented predicate"
 msgstr "predicato non implementato"
 
-#: src/main/coerce.c:2069
+#: src/main/coerce.c:2070
 #, fuzzy, c-format
 msgid "%s() applied to non-(list or vector) of type '%s'"
 msgstr "%s() applicato a una non-(lista o vettore)"
 
-#: src/main/coerce.c:2212 src/main/coerce.c:2275 src/main/coerce.c:2343
+#: src/main/coerce.c:2267 src/main/coerce.c:2331 src/main/coerce.c:2403
 #, fuzzy, c-format
 msgid "default method not implemented for type '%s'"
 msgstr "tipo '%s' non implementato in '%s'\n"
 
-#: src/main/coerce.c:2361
+#: src/main/coerce.c:2425
 msgid "'name' is missing"
 msgstr ""
 
-#: src/main/coerce.c:2368
+#: src/main/coerce.c:2432
 msgid "first argument must be a character string"
 msgstr "il primo argomento deve essere una stringa di tipo character"
 
-#: src/main/coerce.c:2401
+#: src/main/coerce.c:2464
 #, fuzzy
-msgid "'what' must be a character string or a function"
-msgstr "il primo argomento deve essere una stringa di caratteri o una funzione"
+msgid "'what' must be a function or character string"
+msgstr "'title' deve essere una stringa di tipo character"
 
-#: src/main/coerce.c:2405
+#: src/main/coerce.c:2468
 #, fuzzy
 msgid "'args' must be a list or expression"
 msgstr "'dimnames' deve essere di tipo list"
 
-#: src/main/coerce.c:2408
-#, fuzzy
-msgid "'args' must be a list"
-msgstr "'dimnames' deve essere di tipo list"
-
-#: src/main/coerce.c:2412
+#: src/main/coerce.c:2475 src/main/unique.c:1345
 msgid "'envir' must be an environment"
 msgstr "'envir' deve essere un environment"
 
-#: src/main/coerce.c:2567
+#: src/main/coerce.c:2634
 msgid "invalid environment specified"
 msgstr "environment specificato non valido"
 
-#: src/main/coerce.c:2633
+#: src/main/coerce.c:2700
 msgid "Setting class(x) to NULL;   result will no longer be an S4 object"
 msgstr ""
 
-#: src/main/coerce.c:2636
+#: src/main/coerce.c:2703
 #, c-format
 msgid ""
 "Setting class(x) to multiple strings (\"%s\", \"%s\", ...); result will no "
 "longer be an S4 object"
 msgstr ""
 
-#: src/main/coerce.c:2640
+#: src/main/coerce.c:2707
 #, c-format
 msgid ""
 "Setting class(x) to \"%s\" sets attribute to NULL; result will no longer be "
 "an S4 object"
 msgstr ""
 
-#: src/main/coerce.c:2673
+#: src/main/coerce.c:2740
 msgid "invalid replacement object to be a class string"
 msgstr "oggetto sostitutivo non valido per essere di classe stringa"
 
-#: src/main/coerce.c:2694
+#: src/main/coerce.c:2761
 #, c-format
 msgid ""
 "\"%s\" can only be set as the class if the object has this type; found \"%s\""
@@ -1735,7 +1789,7 @@ msgstr ""
 "\"%s\" può essere impostato come classe se l'oggetto è di questo tipo; ho "
 "trovato \"%s\""
 
-#: src/main/coerce.c:2712
+#: src/main/coerce.c:2779
 #, c-format
 msgid ""
 "invalid to set the class to matrix unless the dimension attribute is of "
@@ -1744,738 +1798,739 @@ msgstr ""
 "non è possibile impostare la classe a matrix  se l'attributo dimensione non "
 "ha lunghezza 2 (era %d)"
 
-#: src/main/coerce.c:2720
+#: src/main/coerce.c:2787
 msgid ""
 "cannot set class to \"array\" unless the dimension attribute has length > 0"
 msgstr ""
 "non è possibile impostare la classe ad \"array\"  se l'attributo dimensione "
 "non ha lunghezza > 0"
 
-#: src/main/coerce.c:2756
+#: src/main/coerce.c:2823
 #, fuzzy
 msgid "'value' must be non-null character string"
 msgstr "'name' deve essere un character non nullo"
 
-#: src/main/coerce.c:2769
+#: src/main/coerce.c:2836
 msgid "invalid to change the storage mode of a factor"
 msgstr ""
 
-#: src/main/complex.c:126
+#: src/main/complex.c:123
 msgid "invalid complex unary operator"
 msgstr "operatore complesso non valido"
 
-#: src/main/complex.c:261
+#: src/main/complex.c:251
 msgid "unimplemented complex operation"
 msgstr "operazione tra numeri complessi non implementata"
 
-#: src/main/complex.c:363
+#: src/main/complex.c:353
 msgid "non-numeric argument to function"
 msgstr "argomento non numerico alla funzione"
 
-#: src/main/complex.c:827
+#: src/main/complex.c:822
 msgid "invalid polynomial coefficient"
 msgstr "coefficiente polinomiale non valido"
 
-#: src/main/complex.c:832
+#: src/main/complex.c:827
 msgid "root finding code failed"
 msgstr "codice di ricerca della radice fallito"
 
-#: src/main/connections.c:153
+#: src/main/connections.c:150
 msgid "all connections are in use"
 msgstr "tutte le connessioni sono in uso"
 
-#: src/main/connections.c:164
+#: src/main/connections.c:161
 msgid "connection not found"
 msgstr "connessione non trovata"
 
-#: src/main/connections.c:175
+#: src/main/connections.c:172 src/main/connections.c:5213
 msgid "invalid connection"
 msgstr "connessione non valida"
 
-#: src/main/connections.c:207
+#: src/main/connections.c:204
 #, c-format
 msgid "closing unused connection %d (%s)\n"
 msgstr ""
 
-#: src/main/connections.c:232 src/main/sysutils.c:619 src/main/sysutils.c:806
-#: src/main/sysutils.c:821 src/main/sysutils.c:912 src/main/sysutils.c:927
-#: src/main/sysutils.c:1023 src/main/sysutils.c:1096 src/main/sysutils.c:1106
-#: src/main/sysutils.c:1119 src/main/sysutils.c:1516
+#: src/main/connections.c:229 src/main/sysutils.c:631 src/main/sysutils.c:834
+#: src/main/sysutils.c:849 src/main/sysutils.c:978 src/main/sysutils.c:1051
+#: src/main/sysutils.c:1061 src/main/sysutils.c:1074 src/main/sysutils.c:1472
 #, fuzzy, c-format
 msgid "unsupported conversion from '%s' to '%s'"
 msgstr "conversione non supportata"
 
-#: src/main/connections.c:288 src/main/connections.c:304
-#: src/main/connections.c:456 src/main/connections.c:462
-#: src/main/connections.c:468 src/main/connections.c:479
-#: src/main/connections.c:486
+#: src/main/connections.c:285 src/main/connections.c:300
+#: src/main/connections.c:451 src/main/connections.c:456
+#: src/main/connections.c:461 src/main/connections.c:472
+#: src/main/connections.c:478
 #, fuzzy, c-format
 msgid "%s not enabled for this connection"
 msgstr "'seek' non abilitato per questa connessione"
 
-#: src/main/connections.c:335 src/main/connections.c:352
-#: src/main/connections.c:2916
+#: src/main/connections.c:330 src/main/connections.c:347
+#: src/main/connections.c:2910
 msgid "printing of extremely long output is truncated"
 msgstr "la stampa di un output molto lungo è troncata"
 
-#: src/main/connections.c:375
+#: src/main/connections.c:370
 msgid "invalid char string in output conversion"
 msgstr "stringa carattere non valida nella conversione dell'output"
 
-#: src/main/connections.c:439
+#: src/main/connections.c:434
 #, c-format
 msgid "invalid input found on input connection '%s'"
 msgstr "input non valido trovato nella connessione di input '%s'"
 
-#: src/main/connections.c:580
+#: src/main/connections.c:571
 #, fuzzy, c-format
 msgid "cannot open file '%ls': %s"
 msgstr "impossibile aprire il file '%s'"
 
-#: src/main/connections.c:691
+#: src/main/connections.c:683
 msgid "connection is not open for reading"
 msgstr "connessione non aperta in lettura"
 
-#: src/main/connections.c:696
+#: src/main/connections.c:688
 msgid "connection is not open for writing"
 msgstr "connessione non aperta in scrittura"
 
-#: src/main/connections.c:734 src/main/connections.c:2229
+#: src/main/connections.c:726 src/main/connections.c:2223
 msgid "can only truncate connections open for writing"
 msgstr "è possibile troncare connessioni aperte in scrittura"
 
-#: src/main/connections.c:738 src/main/connections.c:740
+#: src/main/connections.c:730 src/main/connections.c:732
 msgid "file truncation failed"
 msgstr "troncamento del file fallito"
 
-#: src/main/connections.c:742
+#: src/main/connections.c:734
 msgid "file truncation unavailable on this platform"
 msgstr "troncamento del file non disponibile su questa piattaforma"
 
-#: src/main/connections.c:788 src/main/connections.c:792
-#: src/main/connections.c:798 src/main/connections.c:815
+#: src/main/connections.c:780 src/main/connections.c:784
+#: src/main/connections.c:790 src/main/connections.c:807
 msgid "allocation of file connection failed"
 msgstr "allocazione del 'file' della connessione fallita"
 
-#: src/main/connections.c:866 src/main/connections.c:1044
+#: src/main/connections.c:858 src/main/connections.c:1035
 #, c-format
 msgid "cannot create fifo '%s', reason '%s'"
 msgstr "impossibile creare fifo '%s' perché '%s'"
 
-#: src/main/connections.c:872
+#: src/main/connections.c:864
 #, c-format
 msgid "'%s' exists but is not a fifo"
 msgstr "'%s' esiste ma non è un fifo"
 
-#: src/main/connections.c:886
+#: src/main/connections.c:878
 #, c-format
 msgid "fifo '%s' is not ready"
 msgstr "fifo '%s' non pronto"
 
-#: src/main/connections.c:887
+#: src/main/connections.c:879
 #, c-format
 msgid "cannot open fifo '%s'"
 msgstr "impossibile aprire fifo '%s'"
 
-#: src/main/connections.c:928 src/main/connections.c:939
-#: src/main/connections.c:1104 src/main/connections.c:1123
-#: src/main/connections.c:1531 src/main/connections.c:1541
-#: src/main/connections.c:1660 src/main/connections.c:1720
-#: src/main/connections.c:2246 src/main/connections.c:2263
-#: src/main/connections.c:2572 src/main/connections.c:5305
-#: src/main/connections.c:5369
+#: src/main/connections.c:920 src/main/connections.c:931
+#: src/main/connections.c:1095 src/main/connections.c:1114
+#: src/main/connections.c:1524 src/main/connections.c:1534
+#: src/main/connections.c:1653 src/main/connections.c:1713
+#: src/main/connections.c:2240 src/main/connections.c:2257
+#: src/main/connections.c:2566 src/main/connections.c:5385
+#: src/main/connections.c:5449
 #, fuzzy
 msgid "too large a block specified"
 msgstr "matrix: troppi elementi specificati"
 
-#: src/main/connections.c:998 src/main/connections.c:1004
+#: src/main/connections.c:989 src/main/connections.c:995
 #, fuzzy
 msgid "allocation of fifo name failed"
 msgstr "allocazione della connessione 'fifo' fallita"
 
-#: src/main/connections.c:1066
+#: src/main/connections.c:1057
 #, fuzzy, c-format
 msgid "cannot open fifo '%s', reason '%s'"
 msgstr "impossibile aprire il file '%s' perché '%s'"
 
-#: src/main/connections.c:1107 src/main/connections.c:1131
+#: src/main/connections.c:1098 src/main/connections.c:1122
 #, fuzzy
 msgid "allocation of fifo buffer failed"
 msgstr "allocazione della connessione 'fifo' fallita"
 
-#: src/main/connections.c:1139
+#: src/main/connections.c:1130
 #, fuzzy, c-format
 msgid "cannot write FIFO '%s'"
 msgstr "impossibile aprire URL '%s'"
 
-#: src/main/connections.c:1175 src/main/connections.c:1179
-#: src/main/connections.c:1185 src/main/connections.c:1201
+#: src/main/connections.c:1166 src/main/connections.c:1170
+#: src/main/connections.c:1176 src/main/connections.c:1192
 msgid "allocation of fifo connection failed"
 msgstr "allocazione della connessione 'fifo' fallita"
 
-#: src/main/connections.c:1219 src/main/connections.c:1377
-#: src/main/connections.c:1998 src/main/connections.c:3212
-#: src/main/connections.c:4967
+#: src/main/connections.c:1210 src/main/connections.c:1369
+#: src/main/connections.c:1991 src/main/connections.c:3205
+#: src/main/connections.c:4982
 msgid "only first element of 'description' argument used"
 msgstr "solo il primo elemento del parametro 'descrizione' viene utilizzato"
 
-#: src/main/connections.c:1236
+#: src/main/connections.c:1227
 msgid ""
 "fifo(\"\") only supports open = \"w+\" and open = \"w+b\": using the former"
 msgstr ""
 
-#: src/main/connections.c:1250 src/main/connections.c:1414
-#: src/main/connections.c:2064 src/main/connections.c:3179
-#: src/main/connections.c:3232 src/main/connections.c:3280
-#: src/main/connections.c:3567 src/main/connections.c:3683
-#: src/main/connections.c:3844 src/main/connections.c:4095
-#: src/main/connections.c:4423 src/main/connections.c:4543
-#: src/main/connections.c:4755 src/main/connections.c:5105 src/main/dcf.c:94
-#: src/main/deparse.c:352 src/main/deparse.c:438 src/main/saveload.c:2267
-#: src/main/saveload.c:2350 src/main/scan.c:933 src/main/serialize.c:2175
-#: src/main/serialize.c:2226 src/main/source.c:265
+#: src/main/connections.c:1242 src/main/connections.c:1407
+#: src/main/connections.c:2058 src/main/connections.c:3175
+#: src/main/connections.c:3226 src/main/connections.c:3274
+#: src/main/connections.c:3563 src/main/connections.c:3679
+#: src/main/connections.c:3841 src/main/connections.c:4106
+#: src/main/connections.c:4434 src/main/connections.c:4554
+#: src/main/connections.c:4768 src/main/connections.c:5180 src/main/dcf.c:93
+#: src/main/deparse.c:361 src/main/deparse.c:450 src/main/saveload.c:2269
+#: src/main/saveload.c:2350 src/main/scan.c:933 src/main/serialize.c:2216
+#: src/main/serialize.c:2267 src/main/source.c:270
 msgid "cannot open the connection"
 msgstr "non posso aprire questa connessione"
 
-#: src/main/connections.c:1265
+#: src/main/connections.c:1257
 msgid "fifo connections are not available on this system"
 msgstr "connessioni fifo non disponibili su questo sistema"
 
-#: src/main/connections.c:1295
+#: src/main/connections.c:1287
 #, fuzzy, c-format
 msgid "cannot pipe() cmd '%ls': %s"
 msgstr "impossibile aprire pipe() cmd ''%s'"
 
-#: src/main/connections.c:1302
+#: src/main/connections.c:1294
 #, fuzzy, c-format
 msgid "cannot open pipe() cmd '%s': %s"
 msgstr "impossibile aprire pipe() cmd ''%s'"
 
-#: src/main/connections.c:1471 src/main/connections.c:1791
+#: src/main/connections.c:1464 src/main/connections.c:1784
 #, fuzzy, c-format
 msgid "cannot open compressed file '%s', probable reason '%s'"
 msgstr "impossibile aprire il file '%s' perché '%s'"
 
-#: src/main/connections.c:1511
+#: src/main/connections.c:1504
 msgid "whence = \"end\" is not implemented for gzfile connections"
 msgstr "da dove = \"end\" non è implementato per connessioni a file gz"
 
-#: src/main/connections.c:1516
+#: src/main/connections.c:1509
 msgid "seek on a gzfile connection returned an internal error"
 msgstr "la ricerca su un file gz ha restituito un errore interno"
 
-#: src/main/connections.c:1550 src/main/connections.c:1554
-#: src/main/connections.c:1560 src/main/connections.c:1577
+#: src/main/connections.c:1543 src/main/connections.c:1547
+#: src/main/connections.c:1553 src/main/connections.c:1570
 msgid "allocation of gzfile connection failed"
 msgstr "allocazione della connessione 'gxfile' fallita"
 
-#: src/main/connections.c:1606
+#: src/main/connections.c:1599
 #, fuzzy, c-format
 msgid "cannot open bzip2-ed file '%s', probable reason '%s'"
 msgstr "impossibile aprire il file '%s' perché '%s'"
 
-#: src/main/connections.c:1615
+#: src/main/connections.c:1608
 #, c-format
 msgid "file '%s' appears not to be compressed by bzip2"
 msgstr "il file '%s' sembra non essere compresso con bzip2"
 
-#: src/main/connections.c:1624
+#: src/main/connections.c:1617
 #, c-format
 msgid "initializing bzip2 compression for file '%s' failed"
 msgstr ""
 
-#: src/main/connections.c:1678
+#: src/main/connections.c:1671
 #, fuzzy
 msgid "allocation of overflow buffer for bzfile failed"
 msgstr "allocazione del 'file' della connessione fallita"
 
-#: src/main/connections.c:1685
+#: src/main/connections.c:1678
 #, fuzzy, c-format
 msgid ""
 "file '%s' has trailing content that appears not to be compressed by bzip2"
 msgstr "il file '%s' sembra non essere compresso con bzip2"
 
-#: src/main/connections.c:1731 src/main/connections.c:1735
-#: src/main/connections.c:1741 src/main/connections.c:1758
+#: src/main/connections.c:1724 src/main/connections.c:1728
+#: src/main/connections.c:1734 src/main/connections.c:1751
 msgid "allocation of bzfile connection failed"
 msgstr "allocazione della connessione 'bzfile' fallita"
 
-#: src/main/connections.c:1804 src/main/connections.c:5961
+#: src/main/connections.c:1797 src/main/connections.c:6046
 #, c-format
 msgid "cannot initialize lzma decoder, error %d"
 msgstr ""
 
-#: src/main/connections.c:1820
+#: src/main/connections.c:1813
 #, c-format
 msgid "cannot initialize lzma encoder, error %d"
 msgstr ""
 
-#: src/main/connections.c:1948 src/main/connections.c:1952
-#: src/main/connections.c:1958 src/main/connections.c:1976
+#: src/main/connections.c:1941 src/main/connections.c:1945
+#: src/main/connections.c:1951 src/main/connections.c:1969
 #, fuzzy
 msgid "allocation of xzfile connection failed"
 msgstr "allocazione della connessione 'gxfile' fallita"
 
-#: src/main/connections.c:2035
+#: src/main/connections.c:2028
 #, c-format
 msgid "this is a %s-compressed file which this build of R does not support"
 msgstr ""
 
-#: src/main/connections.c:2130 src/modules/X11/devX11.c:3375
+#: src/main/connections.c:2124 src/modules/X11/devX11.c:3381
 msgid "memory allocation to copy clipboard failed"
 msgstr "allocazione memoria appunti fallita"
 
-#: src/main/connections.c:2135 src/modules/X11/devX11.c:3354
-#: src/modules/X11/devX11.c:3359
+#: src/main/connections.c:2129 src/modules/X11/devX11.c:3360
+#: src/modules/X11/devX11.c:3365
 msgid "clipboard cannot be opened or contains no text"
 msgstr "la clipboard non può essere aperta o non contiene testo"
 
-#: src/main/connections.c:2146
+#: src/main/connections.c:2140
 msgid "memory allocation to open clipboard failed"
 msgstr "allocazione memoria per aprire gli appunti fallita"
 
-#: src/main/connections.c:2174
+#: src/main/connections.c:2168
 #, fuzzy
 msgid "unable to open the clipboard"
 msgstr "Non è possibile aprire gli appunti"
 
-#: src/main/connections.c:2178
+#: src/main/connections.c:2172
 #, fuzzy
 msgid "unable to write to the clipboard"
 msgstr "Impossibile scrivere negli appunti"
 
-#: src/main/connections.c:2218
+#: src/main/connections.c:2212
 msgid "attempt to seek outside the range of the clipboard"
 msgstr "tentativo di ricerca al di fuori della clipboard"
 
-#: src/main/connections.c:2261
+#: src/main/connections.c:2255
 msgid "clipboard connection is open for reading only"
 msgstr "la connessione alla clipboard è aperta in sola lettura"
 
-#: src/main/connections.c:2281
+#: src/main/connections.c:2275
 msgid "clipboard buffer is full and output lost"
 msgstr "il buffer della clipboard è saturo e l'output è stato perso"
 
-#: src/main/connections.c:2302
+#: src/main/connections.c:2296
 msgid "'mode' for the clipboard must be 'r' or 'w'"
 msgstr "parametro 'mode' per la clipboard deve essere 'r' o 'w'"
 
-#: src/main/connections.c:2305
+#: src/main/connections.c:2299
 msgid "'mode' for the clipboard must be 'r' on Unix"
 msgstr "parametro 'mode' per la clipboard deve essere 'r' in Unix"
 
-#: src/main/connections.c:2308 src/main/connections.c:2314
-#: src/main/connections.c:2320 src/main/connections.c:2337
+#: src/main/connections.c:2302 src/main/connections.c:2308
+#: src/main/connections.c:2314 src/main/connections.c:2331
 msgid "allocation of clipboard connection failed"
 msgstr "allocazione della connessione 'clipboard' fallita"
 
-#: src/main/connections.c:2406 src/main/connections.c:2410
-#: src/main/connections.c:2416
+#: src/main/connections.c:2400 src/main/connections.c:2404
+#: src/main/connections.c:2410
 msgid "allocation of terminal connection failed"
 msgstr "allocazione della connessione 'terminal' fallita"
 
-#: src/main/connections.c:2549
+#: src/main/connections.c:2543
 msgid "attempting to add too many elements to raw vector"
 msgstr ""
 
-#: src/main/connections.c:2601
+#: src/main/connections.c:2595
 #, fuzzy
 msgid "attempt to seek outside the range of the raw connection"
 msgstr "tentativo di ricerca al di fuori della clipboard"
 
-#: src/main/connections.c:2612 src/main/connections.c:2616
-#: src/main/connections.c:2622 src/main/connections.c:2648
+#: src/main/connections.c:2606 src/main/connections.c:2610
+#: src/main/connections.c:2616 src/main/connections.c:2642
 #, fuzzy
 msgid "allocation of raw connection failed"
 msgstr "allocazione della connessione 'url' fallita"
 
-#: src/main/connections.c:2701
+#: src/main/connections.c:2695
 #, fuzzy
 msgid "'con' is not a rawConnection"
 msgstr "'con' non è una connessione"
 
-#: src/main/connections.c:2704
+#: src/main/connections.c:2698
 #, fuzzy
 msgid "'con' is not an output rawConnection"
 msgstr "'con' non è una connessione"
 
-#: src/main/connections.c:2742
+#: src/main/connections.c:2736
 #, fuzzy
 msgid "too many characters for text connection"
 msgstr "non è possibile allocare memoria per la connessione 'text'"
 
-#: src/main/connections.c:2747
+#: src/main/connections.c:2741
 msgid "cannot allocate memory for text connection"
 msgstr "non è possibile allocare memoria per la connessione 'text'"
 
-#: src/main/connections.c:2796
+#: src/main/connections.c:2790
 msgid "seek is not relevant for text connection"
 msgstr "'seek' è irrilevante per una connessione 'text'"
 
-#: src/main/connections.c:2804 src/main/connections.c:2808
-#: src/main/connections.c:2814 src/main/connections.c:2827
-#: src/main/connections.c:3012 src/main/connections.c:3016
-#: src/main/connections.c:3022 src/main/connections.c:3035
-#: src/main/connections.c:3041
+#: src/main/connections.c:2798 src/main/connections.c:2802
+#: src/main/connections.c:2808 src/main/connections.c:2821
+#: src/main/connections.c:3008 src/main/connections.c:3012
+#: src/main/connections.c:3018 src/main/connections.c:3031
+#: src/main/connections.c:3037
 msgid "allocation of text connection failed"
 msgstr "allocazione della connessione 'text' fallita"
 
-#: src/main/connections.c:2989
+#: src/main/connections.c:2983
 msgid "text connection: appending to a non-existent char vector"
 msgstr "allocazione di testo: accodamento a un vettore char non esistente"
 
-#: src/main/connections.c:3093
+#: src/main/connections.c:3089
 msgid "unsupported mode"
 msgstr "modo non supportato"
 
-#: src/main/connections.c:3115
+#: src/main/connections.c:3111
 #, fuzzy
 msgid "'con' is not a textConnection"
 msgstr "'con' non è una connessione"
 
-#: src/main/connections.c:3118
+#: src/main/connections.c:3114
 #, fuzzy
 msgid "'con' is not an output textConnection"
 msgstr "'con' non è una connessione"
 
-#: src/main/connections.c:3192
-msgid "sockets are not available on this system"
-msgstr "i socket non sono disponibili su questo sistema"
-
-#: src/main/connections.c:3260 src/main/connections.c:3309
-#: src/main/connections.c:3320 src/main/connections.c:3367
-#: src/main/connections.c:3392 src/main/connections.c:3415
-#: src/main/connections.c:3427 src/main/connections.c:3543
-#: src/main/connections.c:3668 src/main/connections.c:5408
+#: src/main/connections.c:3254 src/main/connections.c:3303
+#: src/main/connections.c:3314 src/main/connections.c:3361
+#: src/main/connections.c:3388 src/main/connections.c:3411
+#: src/main/connections.c:3423 src/main/connections.c:3539
+#: src/main/connections.c:3664 src/main/connections.c:5489
 msgid "'con' is not a connection"
 msgstr "'con' non è una connessione"
 
-#: src/main/connections.c:3263
+#: src/main/connections.c:3257
 msgid "cannot open standard connections"
 msgstr "impossibile aprire connessioni standard"
 
-#: src/main/connections.c:3265
+#: src/main/connections.c:3259
 msgid "connection is already open"
 msgstr "connessione già aperta"
 
-#: src/main/connections.c:3298
+#: src/main/connections.c:3292
 msgid "unknown 'rw' value"
 msgstr "valore 'rw' ignoto"
 
-#: src/main/connections.c:3369
+#: src/main/connections.c:3363
 msgid "cannot close standard connections"
 msgstr "impossibile chiudere connessioni standard"
 
-#: src/main/connections.c:3372
+#: src/main/connections.c:3366
 #, fuzzy
 msgid "cannot close 'output' sink connection"
 msgstr "impossibile chiudere una connessione di sink dell'output"
 
-#: src/main/connections.c:3374
+#: src/main/connections.c:3368
 #, fuzzy
 msgid "cannot close 'message' sink connection"
 msgstr "impossibile chiudere una connessione di sink dei messaggi"
 
-#: src/main/connections.c:3394 src/main/connections.c:5123
-#: src/main/connections.c:5131 src/main/serialize.c:1996
-#: src/main/serialize.c:2004
+#: src/main/connections.c:3390 src/main/connections.c:5198
+#: src/main/connections.c:5206 src/main/serialize.c:2035
+#: src/main/serialize.c:2043
 msgid "connection is not open"
 msgstr "connessione non aperta"
 
-#: src/main/connections.c:3490 src/main/connections.c:3502
+#: src/main/connections.c:3486 src/main/connections.c:3498
 #, fuzzy
 msgid "line longer than buffer size"
 msgstr "Linea più lunga della dimensione del buffer"
 
-#: src/main/connections.c:3574 src/main/connections.c:3576
-#: src/main/connections.c:3852 src/main/connections.c:4406
-#: src/main/connections.c:4431 src/main/connections.c:5132 src/main/dcf.c:101
-#: src/main/scan.c:936 src/main/scan.c:940 src/main/serialize.c:1998
-#: src/main/source.c:272
+#: src/main/connections.c:3570 src/main/connections.c:3572
+#: src/main/connections.c:3849 src/main/connections.c:4417
+#: src/main/connections.c:4442 src/main/connections.c:5207 src/main/dcf.c:100
+#: src/main/scan.c:936 src/main/scan.c:940 src/main/serialize.c:2037
+#: src/main/source.c:277
 msgid "cannot read from this connection"
 msgstr "non posso leggere da questa connessione"
 
-#: src/main/connections.c:3588 src/main/connections.c:3610
+#: src/main/connections.c:3584 src/main/connections.c:3606
 msgid "cannot allocate buffer in readLines"
 msgstr "non posso allocare il buffer in readLines"
 
-#: src/main/connections.c:3623
+#: src/main/connections.c:3619
 #, c-format
 msgid "line %d appears to contain an embedded nul"
 msgstr ""
 
-#: src/main/connections.c:3640
+#: src/main/connections.c:3636
 #, fuzzy, c-format
 msgid "incomplete final line found on '%s'"
 msgstr "riga finale incompleta in readLines su '%s'"
 
-#: src/main/connections.c:3646
+#: src/main/connections.c:3642
 msgid "too few lines read in readLines"
 msgstr "troppo poche righe lette in readLines"
 
-#: src/main/connections.c:3749
+#: src/main/connections.c:3746
 msgid "incomplete string at end of file has been discarded"
 msgstr "la stringa incompleta trovata alla fine del file è stata tralasciata"
 
-#: src/main/connections.c:3755
+#: src/main/connections.c:3752
 #, fuzzy
 msgid "null terminator not found: breaking string at 10000 bytes"
 msgstr "terminatore nullo non trovato: taglio la stringa a 10000 caratteri"
 
-#: src/main/connections.c:3820
+#: src/main/connections.c:3817
 msgid "can only read from a binary connection"
 msgstr "posso leggere solo da una connessione binaria"
 
-#: src/main/connections.c:3869 src/main/connections.c:4176
+#: src/main/connections.c:3866 src/main/connections.c:4187
 msgid "size changing is not supported for complex vectors"
 msgstr "cambio di dimensione non supportato per vettori complessi"
 
-#: src/main/connections.c:3907 src/main/connections.c:3925
-#: src/main/connections.c:3951 src/main/connections.c:4010
-#: src/main/connections.c:4030 src/main/connections.c:4157
-#: src/main/connections.c:4170 src/main/connections.c:4229
-#: src/main/connections.c:4261
+#: src/main/connections.c:3905 src/main/connections.c:3923
+#: src/main/connections.c:3949 src/main/connections.c:3993
+#: src/main/connections.c:4024 src/main/connections.c:4044
+#: src/main/connections.c:4168 src/main/connections.c:4181
+#: src/main/connections.c:4240 src/main/connections.c:4272
 #, c-format
 msgid "size %d is unknown on this machine"
 msgstr "dimensione %d sconosciuta su questa macchina"
 
-#: src/main/connections.c:3936
+#: src/main/connections.c:3934
 msgid "raw is always of size 1"
 msgstr "dato grezzo è sempre di dimensione 1"
 
-#: src/main/connections.c:3959
+#: src/main/connections.c:3957
 msgid "'signed = FALSE' is only valid for integers of sizes 1 and 2"
 msgstr ""
 
-#: src/main/connections.c:4060
+#: src/main/connections.c:4071
 msgid "'x' is not an atomic vector type"
 msgstr "'x' non è un vettore di tipo atomico"
 
-#: src/main/connections.c:4066
+#: src/main/connections.c:4077
 msgid "can only write to a binary connection"
 msgstr "possono scrivere solo su una connessione binaria"
 
-#: src/main/connections.c:4085
+#: src/main/connections.c:4096
 #, fuzzy
 msgid "only 2^31-1 bytes can be written to a raw vector"
 msgstr ""
 "possono essere scritti solo i formati ascii su connessioni in modalità testo"
 
-#: src/main/connections.c:4087
+#: src/main/connections.c:4098
 #, fuzzy
 msgid "only 2^31-1 bytes can be written in a single writeBin() call"
 msgstr ""
 "possono essere scritti solo i formati ascii su connessioni in modalità testo"
 
-#: src/main/connections.c:4136 src/main/connections.c:4289
-#: src/main/connections.c:4570 src/main/connections.c:4610
+#: src/main/connections.c:4147 src/main/connections.c:4300
+#: src/main/connections.c:4581 src/main/connections.c:4621
 msgid "problem writing to connection"
 msgstr "problema nello scrivere sulla connessione"
 
-#: src/main/connections.c:4181
+#: src/main/connections.c:4192
 msgid "size changing is not supported for raw vectors"
 msgstr "cambio di dimensione non supportata per vettori elementari"
 
-#: src/main/connections.c:4324 src/main/connections.c:4328
-#: src/main/connections.c:4367
+#: src/main/connections.c:4335 src/main/connections.c:4339
+#: src/main/connections.c:4378
 msgid "invalid UTF-8 input in readChar()"
 msgstr "input UTF-8 non valido in readChar()"
 
-#: src/main/connections.c:4434
+#: src/main/connections.c:4445
 msgid "can only read in bytes in a non-UTF-8 MBCS locale"
 msgstr ""
 
-#: src/main/connections.c:4506
+#: src/main/connections.c:4517
 #, fuzzy
 msgid "'object' is too short"
 msgstr "questo oggetto non è indicizzabile"
 
-#: src/main/connections.c:4559
+#: src/main/connections.c:4570
 #, fuzzy
 msgid "writeChar: more bytes requested than are in the string - will zero-pad"
 msgstr ""
 "writeChar: sono necessari più caratteri di quelle presenti nella stringa - "
 "riempirò con spazi"
 
-#: src/main/connections.c:4584
+#: src/main/connections.c:4595
 msgid ""
 "writeChar: more characters requested than are in the string - will zero-pad"
 msgstr ""
 "writeChar: sono necessari più caratteri di quelle presenti nella stringa - "
 "riempirò con spazi"
 
-#: src/main/connections.c:4638
+#: src/main/connections.c:4649
 #, fuzzy
 msgid "maximum number of pushback lines exceeded"
 msgstr "numero massimo di colori superato"
 
-#: src/main/connections.c:4644 src/main/connections.c:4648
-#: src/main/connections.c:4685 src/main/connections.c:4693
+#: src/main/connections.c:4655 src/main/connections.c:4659
+#: src/main/connections.c:4696 src/main/connections.c:4704
 #, fuzzy
 msgid "could not allocate space for pushback"
 msgstr "non posso allocare spazio per pushBack"
 
-#: src/main/connections.c:4676
+#: src/main/connections.c:4687
 msgid "can only push back on open readable connections"
 msgstr "posso unicamente ripristinare connessioni leggibili e aperte"
 
-#: src/main/connections.c:4678
+#: src/main/connections.c:4689
 msgid "can only push back on text-mode connections"
 msgstr "posso riavvolgere solo connessione aperte in lettura"
 
-#: src/main/connections.c:4740 src/main/connections.c:4810
+#: src/main/connections.c:4753 src/main/connections.c:4823
 msgid "sink stack is full"
 msgstr "il sink stack è pieno"
 
-#: src/main/connections.c:4743
+#: src/main/connections.c:4756
 msgid "cannot switch output to stdin"
 msgstr "non posso dirigere l'output verso lo stdin"
 
-#: src/main/connections.c:4770
+#: src/main/connections.c:4783
 msgid "no sink to remove"
 msgstr "non c'è nulla da eliminare"
 
-#: src/main/connections.c:4892
+#: src/main/connections.c:4903
 #, fuzzy
 msgid "there is no connection NA"
 msgstr "'file' non è una connessione"
 
-#: src/main/connections.c:4894
+#: src/main/connections.c:4905
 #, fuzzy, c-format
 msgid "there is no connection %d"
 msgstr "'file' non è una connessione"
 
-#: src/main/connections.c:5029
+#: src/main/connections.c:5039
+#, fuzzy
+msgid "method = \"wininet\" is only supported on Windows"
+msgstr "nls() non è supportato in questa piattaforma"
+
+#: src/main/connections.c:5103
 msgid ""
 "file(\"\") only supports open = \"w+\" and open = \"w+b\": using the former"
 msgstr ""
 
-#: src/main/connections.c:5083 src/modules/internet/internet.c:115
-#: src/modules/internet/internet.c:569
-msgid "unsupported URL scheme"
-msgstr "schema URL non supportato"
+#: src/main/connections.c:5157
+#, fuzzy
+msgid "URL scheme unsupported by this method"
+msgstr "nls() non è supportato in questa piattaforma"
 
-#: src/main/connections.c:5173
+#: src/main/connections.c:5253
 msgid "file stream does not have gzip magic number"
 msgstr "il file non ha il numero magico di gzip"
 
-#: src/main/connections.c:5184
+#: src/main/connections.c:5264
 msgid "file stream does not have valid gzip header"
 msgstr "il file non ha un header di tipo gzip valido"
 
-#: src/main/connections.c:5249
+#: src/main/connections.c:5329
 msgid "writing error whilst flushing 'gzcon' connection"
 msgstr "errore di scrittura durante lo svuotamento della connessione 'gzcon'"
 
-#: src/main/connections.c:5351
+#: src/main/connections.c:5431
 #, c-format
 msgid "crc error %x %x\n"
 msgstr "errore crc %x %x\n"
 
-#: src/main/connections.c:5378
+#: src/main/connections.c:5458
 msgid "write error on 'gzcon' connection"
 msgstr "errore di scrittura sulla connessione 'gzcon'"
 
-#: src/main/connections.c:5412
+#: src/main/connections.c:5493
 msgid "'level' must be one of 0 ... 9"
 msgstr "'level' deve essere fra 0 ... 9"
 
-#: src/main/connections.c:5415
+#: src/main/connections.c:5496
 msgid "'allowNonCompression' must be TRUE or FALSE"
 msgstr "'allowNonCompression' deve essere TRUE o FALSE"
 
-#: src/main/connections.c:5418
+#: src/main/connections.c:5499
+#, fuzzy
+msgid "'text' must be TRUE or FALSE"
+msgstr "'all.x' deve essere TRUE o FALSE"
+
+#: src/main/connections.c:5502
 #, fuzzy
 msgid "this is already a 'gzcon' connection"
 msgstr "c'è già una connessione di tipo gzcon"
 
-#: src/main/connections.c:5424
+#: src/main/connections.c:5508
 msgid "can only use read- or write- binary connections"
 msgstr "è possibile usare soltanto connessioni binarie in scrittura o lettura"
 
-#: src/main/connections.c:5427
+#: src/main/connections.c:5511
 msgid "using a text-mode 'file' connection may not work correctly"
 msgstr ""
 
-#: src/main/connections.c:5430
+#: src/main/connections.c:5514
 msgid ""
 "cannot create a 'gzcon' connection from a writable textConnection; maybe use "
 "rawConnection"
 msgstr ""
 
-#: src/main/connections.c:5433 src/main/connections.c:5437
-#: src/main/connections.c:5444 src/main/connections.c:5458
+#: src/main/connections.c:5517 src/main/connections.c:5521
+#: src/main/connections.c:5528 src/main/connections.c:5542
 msgid "allocation of 'gzcon' connection failed"
 msgstr "allocazione della connessione 'gzcon' fallita"
 
-#: src/main/connections.c:5644
+#: src/main/connections.c:5729
 msgid "not a list of sockets"
 msgstr "non è una lista di sockets"
 
-#: src/main/connections.c:5649
+#: src/main/connections.c:5734
 msgid "bad write indicators"
 msgstr "indicatori errati di scrittura"
 
-#: src/main/connections.c:5660
+#: src/main/connections.c:5745
 msgid "not a socket connection"
 msgstr "non è una connessione socket"
 
-#: src/main/connections.c:5905
+#: src/main/connections.c:5990
 msgid "unknown compression, assuming none"
 msgstr ""
 
-#: src/main/connections.c:6023 src/main/connections.c:6027
-#: src/main/connections.c:6033
+#: src/main/connections.c:6108 src/main/connections.c:6112
+#: src/main/connections.c:6118
 #, fuzzy, c-format
 msgid "allocation of %s connection failed"
 msgstr "allocazione della connessione 'url' fallita"
 
-#: src/main/context.c:282
+#: src/main/context.c:316
 #, fuzzy
 msgid "no loop for break/next, jumping to top level"
 msgstr "non c'è alcun loop da cui uscire, salto al livello radice"
 
-#: src/main/context.c:290
+#: src/main/context.c:324
 msgid "no function to return from, jumping to top level"
 msgstr "non vi è alcuna funzione da cui uscire, salto al livello radice"
 
-#: src/main/context.c:302
+#: src/main/context.c:339
 msgid "target context is not on the stack"
 msgstr "il contesto obiettivo non è nello stack"
 
-#: src/main/context.c:324 src/main/context.c:340 src/main/context.c:407
-#: src/main/context.c:428 src/main/context.c:440 src/main/context.c:452
+#: src/main/context.c:361 src/main/context.c:377 src/main/context.c:444
+#: src/main/context.c:465 src/main/context.c:477 src/main/context.c:489
 msgid "not that many frames on the stack"
 msgstr "non così tanti frame nello stack"
 
-#: src/main/context.c:357
+#: src/main/context.c:394
 msgid "only positive values of 'n' are allowed"
 msgstr "sono permessi valori di 'n' positivi"
 
-#: src/main/context.c:478
-msgid "no function to restart"
-msgstr "nessuna funzione da far ripartire"
-
-#: src/main/context.c:515
+#: src/main/context.c:526
 #, fuzzy
 msgid "number of contexts must be positive"
 msgstr "'maxiter' deve essere positivo"
 
-#: src/main/context.c:528
+#: src/main/context.c:539
 msgid "no browser context to query"
 msgstr ""
 
-#: src/main/context.c:546
+#: src/main/context.c:557
 #, fuzzy
 msgid "not that many calls to browser are active"
 msgstr "non così tanti frame nello stack"
 
-#: src/main/context.c:560
+#: src/main/context.c:571
 #, fuzzy
 msgid "not that many functions on the call stack"
 msgstr "non così tanti frame nello stack"
 
-#: src/main/context.c:645
+#: src/main/context.c:656
 msgid "internal error in 'do_sys'"
 msgstr "errore interno in 'do_sys'"
 
@@ -2484,42 +2539,42 @@ msgstr "errore interno in 'do_sys'"
 msgid "integer overflow in 'cumsum'; use 'cumsum(as.numeric(.))'"
 msgstr "Overflow di interi in sum(.); usare sum(as.numeric(.))"
 
-#: src/main/cum.c:178
+#: src/main/cum.c:179
 #, fuzzy
-msgid "'cummin' not defined for complex numbers"
+msgid "'cummax' not defined for complex numbers"
 msgstr "min/max non sono definite per i numeri complessi"
 
-#: src/main/cum.c:181
+#: src/main/cum.c:182
 #, fuzzy
-msgid "'cummax' not defined for complex numbers"
+msgid "'cummin' not defined for complex numbers"
 msgstr "min/max non sono definite per i numeri complessi"
 
-#: src/main/cum.c:206 src/main/cum.c:230
+#: src/main/cum.c:209 src/main/cum.c:236
 msgid "unknown cumxxx function"
 msgstr "la funzione cumxxx è ignota"
 
-#: src/main/datetime.c:548 src/main/datetime.c:556 src/main/datetime.c:570
-#: src/main/datetime.c:575
+#: src/main/datetime.c:554 src/main/datetime.c:562 src/main/datetime.c:576
+#: src/main/datetime.c:581
 #, fuzzy
 msgid "problem with setting timezone"
 msgstr "problema nello scrivere sulla connessione"
 
-#: src/main/datetime.c:560
+#: src/main/datetime.c:566
 msgid "cannot set timezones on this system"
 msgstr "non è possibile istanziare timezones su questo sistema"
 
-#: src/main/datetime.c:582 src/main/datetime.c:584
+#: src/main/datetime.c:588 src/main/datetime.c:590
 #, fuzzy
 msgid "problem with unsetting timezone"
 msgstr "è sorto un problema nel lanciare l'editor %s"
 
-#: src/main/datetime.c:804 src/main/datetime.c:806 src/main/datetime.c:901
-#: src/main/datetime.c:1240 src/main/datetime.c:1242
+#: src/main/datetime.c:810 src/main/datetime.c:812 src/main/datetime.c:908
+#: src/main/datetime.c:1258 src/main/datetime.c:1260
 #, fuzzy
 msgid "zero-length component in non-empty \"POSIXlt\" structure"
 msgstr "un componente di lunghezza zero è nella struttura POSIXIt"
 
-#: src/main/dcf.c:113 src/main/dcf.c:181 src/main/dcf.c:253
+#: src/main/dcf.c:112 src/main/dcf.c:181 src/main/dcf.c:253
 msgid "could not allocate memory for 'read.dcf'"
 msgstr "non è possibile allocare memoria per 'read.dcf'"
 
@@ -2533,84 +2588,89 @@ msgstr ""
 msgid "Line starting '%s ...' is malformed!"
 msgstr ""
 
-#: src/main/debug.c:45
-#, fuzzy
-msgid "argument must be a closure"
-msgstr "il secondo argomento deve essere una funzione"
-
-#: src/main/debug.c:76
+#: src/main/debug.c:46 src/main/debug.c:76
 #, fuzzy
 msgid "argument must be a function"
 msgstr "il secondo argomento deve essere una funzione"
 
-#: src/main/debug.c:132 src/main/debug.c:166 src/main/debug.c:224
+#: src/main/debug.c:111
+#, fuzzy, c-format
+msgid "Value for '%s' must be TRUE or FALSE"
+msgstr "'all.x' deve essere TRUE o FALSE"
+
+#: src/main/debug.c:139 src/main/debug.c:167 src/main/debug.c:241
 #, fuzzy
 msgid "argument must not be a function"
 msgstr "il secondo argomento deve essere una funzione"
 
-#: src/main/debug.c:135
+#: src/main/debug.c:142
 msgid "cannot trace NULL"
 msgstr ""
 
-#: src/main/debug.c:139
+#: src/main/debug.c:146
 msgid "'tracemem' is not useful for promise and environment objects"
 msgstr ""
 
-#: src/main/debug.c:142
+#: src/main/debug.c:149
 msgid "'tracemem' is not useful for weak reference or external pointer objects"
 msgstr ""
 
-#: src/main/debug.c:148 src/main/debug.c:171
+#: src/main/debug.c:180 src/main/debug.c:187
 msgid "R was not compiled with support for memory profiling"
 msgstr ""
 
-#: src/main/deparse.c:152 src/main/sprintf.c:213 src/main/sprintf.c:245
+#: src/main/deparse.c:156 src/main/sprintf.c:216 src/main/sprintf.c:248
 msgid "too few arguments"
 msgstr "argomenti insufficienti"
 
-#: src/main/deparse.c:159
+#: src/main/deparse.c:163
 #, fuzzy
 msgid "invalid 'cutoff' value for 'deparse', using default"
 msgstr "'cutoff' non valido nel deparse, utilizzo il default"
 
-#: src/main/deparse.c:247
+#: src/main/deparse.c:254
 msgid "deparse of an S4 object will not be source()able"
 msgstr ""
 
-#: src/main/deparse.c:249
+#: src/main/deparse.c:256
 msgid "deparse may be incomplete"
 msgstr "la scomposizione può essere incompleta"
 
-#: src/main/deparse.c:251
+#: src/main/deparse.c:258
 msgid "deparse may be not be source()able in R < 2.7.0"
 msgstr ""
 
-#: src/main/deparse.c:369 src/main/deparse.c:461 src/main/deparse.c:467
+#: src/main/deparse.c:350 src/main/deparse.c:400 src/main/source.c:206
+#, fuzzy
+msgid "'file' must be a character string or connection"
+msgstr "il primo argomento deve essere una stringa di caratteri o una funzione"
+
+#: src/main/deparse.c:378 src/main/deparse.c:473 src/main/deparse.c:479
 msgid "wrote too few characters"
 msgstr "hai scritto troppi pochi caratteri"
 
-#: src/main/deparse.c:391
+#: src/main/deparse.c:402
 msgid "character arguments expected"
 msgstr "sono attesi argomenti di tipo character"
 
-#: src/main/deparse.c:394
+#: src/main/deparse.c:405
 #, fuzzy
 msgid "zero-length argument"
 msgstr "argomento di lunghezza zero"
 
-#: src/main/deparse.c:401
+#: src/main/deparse.c:412
 #, fuzzy
 msgid "'opts' should be small non-negative integer"
 msgstr "'gap' deve essere un intero non negativo"
 
-#: src/main/deparse.c:411 src/main/envir.c:1764 src/main/envir.c:1846
-#: src/main/eval.c:569 src/main/eval.c:1251 src/main/eval.c:3627
-#: src/main/saveload.c:1978 src/main/saveload.c:2309 src/main/serialize.c:2727
+#: src/main/deparse.c:422 src/main/envir.c:1898 src/main/envir.c:1983
+#: src/main/eval.c:626 src/main/eval.c:1423 src/main/eval.c:4246
+#: src/main/saveload.c:1980 src/main/saveload.c:2312 src/main/serialize.c:2773
 #, c-format
 msgid "object '%s' not found"
 msgstr "oggetto \"%s\" non trovato"
 
-#: src/main/deparse.c:1519
+#: src/main/deparse.c:1592
 msgid "badly formed function expression"
 msgstr "l'espressione della funzione è costruita male"
 
@@ -2619,255 +2679,238 @@ msgstr "l'espressione della funzione è costruita male"
 msgid "the base graphics system is not registered"
 msgstr "troppi sistemi grafici registrati"
 
-#: src/main/devices.c:165 src/main/devices.c:172
+#: src/main/devices.c:166 src/main/devices.c:174
 msgid "no active or default device"
 msgstr "nessun dispositivo attivo o di default"
 
-#: src/main/devices.c:385 src/main/devices.c:447
+#: src/main/devices.c:388 src/main/devices.c:450
 msgid "too many open devices"
 msgstr "troppi dispositivi aperti"
 
-#: src/main/devices.c:474
+#: src/main/devices.c:491
 #, fuzzy
 msgid "not enough memory to allocate device (in GEcreateDevDesc)"
 msgstr "memoria insufficiente per allocare il dispostivo (in addDevice)"
 
-#: src/main/devices.c:515
+#: src/main/devices.c:532
 msgid "Hit <Return> to see next plot: "
 msgstr "Premi <Invio> per vedere il prossimo grafico: "
 
-#: src/main/dotcode.c:112 src/main/dotcode.c:142
+#: src/main/dotcode.c:127 src/main/dotcode.c:157
 msgid "NULL value passed as symbol address"
 msgstr "valore NULL come indirizzo del simbolo"
 
-#: src/main/dotcode.c:133
+#: src/main/dotcode.c:148
 #, c-format
 msgid "Unimplemented type %d in createRSymbolObject"
 msgstr "Tipo %d non implementato in createRSymbolObject"
 
-#: src/main/dotcode.c:147 src/main/dotcode.c:237
+#: src/main/dotcode.c:162 src/main/dotcode.c:260
 #, fuzzy, c-format
 msgid "symbol '%s' is too long"
 msgstr "nome DLL '%s' troppo lungo"
 
-#: src/main/dotcode.c:159
+#: src/main/dotcode.c:174
 #, fuzzy
 msgid ""
 "first argument must be a string (of length 1) or native symbol reference"
 msgstr ""
 "'name' deve essere unsta stringa (di lunghezza 1) o un riferimento simbolico"
 
-#: src/main/dotcode.c:201 src/main/dotcode.c:563
+#: src/main/dotcode.c:224 src/main/dotcode.c:1240
 msgid "too many arguments in foreign function call"
 msgstr "troppi argomenti nella chiamata di funzione esterna"
 
-#: src/main/dotcode.c:213
+#: src/main/dotcode.c:236
 msgid "PACKAGE = \"\" is invalid"
 msgstr ""
 
-#: src/main/dotcode.c:269 src/main/dotcode.c:274 src/main/dotcode.c:279
-#: src/main/dotcode.c:284
+#: src/main/dotcode.c:292 src/main/dotcode.c:297 src/main/dotcode.c:302
+#: src/main/dotcode.c:307
 #, fuzzy, c-format
 msgid "\"%s\" not available for %s() for package \"%s\""
 msgstr "'truncation' non disponibile per questa connessione"
 
-#: src/main/dotcode.c:289
+#: src/main/dotcode.c:312
 #, fuzzy, c-format
 msgid "%s symbol name \"%s\" not in DLL for package \"%s\""
 msgstr "%s nome funzione \"%s%s\" non presente nella DLL del pacchetto '%s'"
 
-#: src/main/dotcode.c:294
+#: src/main/dotcode.c:317
 #, fuzzy, c-format
 msgid "%s symbol name \"%s\" not in load table"
 msgstr "%s nome funzione \"%s%s\" non presente nella tabella di caricamento"
 
-#: src/main/dotcode.c:348 src/main/dotcode.c:352 src/main/dotcode.c:362
-#: src/main/dotcode.c:427 src/main/dotcode.c:434
+#: src/main/dotcode.c:368 src/main/dotcode.c:370 src/main/dotcode.c:380
+#: src/main/dotcode.c:445 src/main/dotcode.c:452
 #, fuzzy, c-format
 msgid "'%s' used more than once"
 msgstr "DUP usato più volte"
 
-#: src/main/dotcode.c:358
+#: src/main/dotcode.c:376
 msgid "DLL name is too long"
 msgstr "nome DLL troppo lungo"
 
-#: src/main/dotcode.c:403
+#: src/main/dotcode.c:421
 msgid "PACKAGE argument must be a single character string"
 msgstr "l'argomento PACKAGE deve essere una stringa character"
 
-#: src/main/dotcode.c:409
+#: src/main/dotcode.c:427
 msgid "PACKAGE argument is too long"
 msgstr "argomento PACKAGE è troppo lungo"
 
-#: src/main/dotcode.c:474
+#: src/main/dotcode.c:492
 msgid "no arguments supplied"
 msgstr "nessun argomento specificato"
 
-#: src/main/dotcode.c:475 src/main/seq.c:913
+#: src/main/dotcode.c:493 src/main/seq.c:911
 msgid "too many arguments"
 msgstr "troppi argomenti"
 
-#: src/main/dotcode.c:512 src/main/dotcode.c:554 src/main/dotcode.c:1397
+#: src/main/dotcode.c:530 src/main/dotcode.c:1232 src/main/dotcode.c:1420
 msgid "'.NAME' is missing"
 msgstr ""
 
-#: src/main/dotcode.c:521 src/main/dotcode.c:570 src/main/dotcode.c:1418
+#: src/main/dotcode.c:539 src/main/dotcode.c:1247 src/main/dotcode.c:1441
 #, fuzzy, c-format
 msgid "Incorrect number of arguments (%d), expecting %d for '%s'"
 msgstr "Numero di argomenti errato (%d), ce ne vogliono %d per %s"
 
-#: src/main/dotcode.c:1227 src/main/dotcode.c:2276
+#: src/main/dotcode.c:1216 src/main/dotcode.c:2290
 msgid "too many arguments, sorry"
 msgstr "troppi argomenti, spiacente"
 
-#: src/main/dotcode.c:1261 src/main/dotcode.c:1278 src/main/engine.c:2993
+#: src/main/dotcode.c:1284 src/main/dotcode.c:1301 src/main/engine.c:3013
 msgid "invalid graphics state"
 msgstr "stato grafico non valido"
 
-#: src/main/dotcode.c:1357
+#: src/main/dotcode.c:1380
 msgid "NULL value for DLLInfoReference when looking for DLL"
 msgstr "valore NULL per DLLInfoReference mentre cercavo la DLL"
 
-#: src/main/dotcode.c:1458
+#: src/main/dotcode.c:1481
 #, fuzzy, c-format
 msgid "wrong type for argument %d in call to %s"
 msgstr "Tipo argomento %d non valido nella chiamata a %s"
 
-#: src/main/dotcode.c:1470
-#, c-format
-msgid ""
-"explicit request not to duplicate arguments in call to '%s', but argument %d "
-"is of the wrong type (%d != %d)"
-msgstr ""
-"richiesta esplicita di non duplicare gli argomenti nella chiamata a '%s', ma "
-"l'argomento %d è di tipo sbagliato (%d != %d)"
-
-#: src/main/dotcode.c:1493
+#: src/main/dotcode.c:1510
 #, fuzzy, c-format
 msgid "long vectors (argument %d) are not supported in %s"
 msgstr "symlink non supportati su questa piattaforma"
 
-#: src/main/dotcode.c:1524
+#: src/main/dotcode.c:1541
 #, c-format
 msgid "NAs in foreign function call (arg %d)"
 msgstr "NA nella chiamata a funzione esterna (arg %d)"
 
-#: src/main/dotcode.c:1547
+#: src/main/dotcode.c:1564
 #, c-format
 msgid "NA/NaN/Inf in foreign function call (arg %d)"
 msgstr "NA/NaN/Inf in chiamata a funzione esterna (arg %d)"
 
-#: src/main/dotcode.c:1552
-msgid "single values not returned if not duplicated"
-msgstr ""
-
-#: src/main/dotcode.c:1578
+#: src/main/dotcode.c:1594
 #, c-format
 msgid "complex NA/NaN/Inf in foreign function call (arg %d)"
 msgstr "NA/NaN/Inf complesso in chiamata a funzione esterna (arg %d)"
 
-#: src/main/dotcode.c:1597
-msgid "character variables must be duplicated in .C/.Fortran"
-msgstr "le variabili di tipo character devono essere duplicate in .C/.Fortran"
-
-#: src/main/dotcode.c:1602
+#: src/main/dotcode.c:1616
 msgid "only first string in char vector used in .Fortran"
 msgstr ""
 "solo la prima stringa del vettore di caratteri verrà utilizzata in .Fortran"
 
-#: src/main/dotcode.c:1645 src/main/dotcode.c:1661 src/main/dotcode.c:1672
+#: src/main/dotcode.c:1659 src/main/dotcode.c:1675 src/main/dotcode.c:1686
 #, fuzzy, c-format
 msgid "invalid mode (%s) to pass to Fortran (arg %d)"
 msgstr "modalità non valida da passare al Fortran (arg %d)"
 
-#: src/main/dotcode.c:1666
+#: src/main/dotcode.c:1680
 #, fuzzy, c-format
 msgid "invalid mode (%s) to pass to C or Fortran (arg %d)"
 msgstr "modalità non valida da passare al Fortran (arg %d)"
 
-#: src/main/dotcode.c:1677
+#: src/main/dotcode.c:1691
 msgid "pairlists are passed as SEXP as from R 2.15.0"
 msgstr ""
 
-#: src/main/dotcode.c:2499
+#: src/main/dotcode.c:2510
 #, c-format
 msgid "type \"%s\" not supported in interlanguage calls"
 msgstr "tipo \"%s\" non supportato in chiamate tra linguaggi diversi"
 
-#: src/main/dotcode.c:2604
+#: src/main/dotcode.c:2615
 #, c-format
 msgid "mode '%s' is not supported in call_R"
 msgstr "modalità '%s' non supportata in call_R"
 
-#: src/main/dounzip.c:171
+#: src/main/dounzip.c:172
 #, fuzzy, c-format
 msgid " not overwriting file '%s"
 msgstr "impossibile aprire il file '%s'"
 
-#: src/main/dounzip.c:256
+#: src/main/dounzip.c:257
 #, fuzzy, c-format
 msgid "zip file '%s' cannot be opened"
 msgstr "le routine lapack non pososno essere caricate"
 
-#: src/main/dounzip.c:312
+#: src/main/dounzip.c:313
 msgid "invalid zip name argument"
 msgstr "nome argomento 'zip' non valido"
 
-#: src/main/dounzip.c:315 src/main/dounzip.c:409
+#: src/main/dounzip.c:316 src/main/dounzip.c:410
 msgid "zip path is too long"
 msgstr "percorso file zip troppo lungo"
 
-#: src/main/dounzip.c:332
+#: src/main/dounzip.c:333
 #, fuzzy
 msgid "'exdir' is too long"
 msgstr "'destination' è troppo lungo"
 
-#: src/main/dounzip.c:335
+#: src/main/dounzip.c:336
 #, fuzzy
 msgid "'exdir' does not exist"
 msgstr "il menu non esiste"
 
-#: src/main/dounzip.c:363
+#: src/main/dounzip.c:364
 msgid "requested file not found in the zip file"
 msgstr "file non trovato all'interno dell'archivio zip"
 
-#: src/main/dounzip.c:366
+#: src/main/dounzip.c:367
 msgid "zip file is corrupt"
 msgstr "archivio zip danneggiato"
 
-#: src/main/dounzip.c:369
+#: src/main/dounzip.c:370
 msgid "CRC error in zip file"
 msgstr "error CRC nel file zip"
 
-#: src/main/dounzip.c:376
+#: src/main/dounzip.c:377
 msgid "write error in extracting from zip file"
 msgstr "errore di scrittura durante l'estrazione dall'archivio zip"
 
-#: src/main/dounzip.c:379
+#: src/main/dounzip.c:380
 #, c-format
 msgid "error %d in extracting from zip file"
 msgstr "errore %d durante l'estrazione dall'archivio zip"
 
-#: src/main/dounzip.c:404
+#: src/main/dounzip.c:405
 msgid "unz connections can only be opened for reading"
 msgstr "le connessioni unz si possono aprire in sola lettura"
 
-#: src/main/dounzip.c:415
+#: src/main/dounzip.c:416
 #, fuzzy
 msgid "invalid description of 'unz' connection"
 msgstr "descrizione della connessione 'unz' non valida"
 
-#: src/main/dounzip.c:421
+#: src/main/dounzip.c:422
 #, c-format
 msgid "cannot open zip file '%s'"
 msgstr "impossibile aprire il file '%s'"
 
-#: src/main/dounzip.c:425
+#: src/main/dounzip.c:426
 #, c-format
 msgid "cannot locate file '%s' in zip file '%s'"
 msgstr "non trovo il file '%s' nell'archivio zip '%s'"
 
-#: src/main/dounzip.c:469
+#: src/main/dounzip.c:470
 msgid "printing not enabled for this connection"
 msgstr "stampa non abilitata per questa connessione"
 
@@ -2875,8 +2918,8 @@ msgstr "stampa non abilitata per questa connessione"
 msgid "write not enabled for this connection"
 msgstr "scrittura non abilitata per questa connessione"
 
-#: src/main/dounzip.c:496 src/main/dounzip.c:500 src/main/dounzip.c:506
-#: src/main/dounzip.c:523
+#: src/main/dounzip.c:494 src/main/dounzip.c:498 src/main/dounzip.c:504
+#: src/main/dounzip.c:521
 #, fuzzy
 msgid "allocation of 'unz' connection failed"
 msgstr "allocazione della connessione 'unz' fallita"
@@ -2895,7 +2938,7 @@ msgstr "argomenti formali non validi per \"function\""
 msgid "invalid argument to edit()"
 msgstr "argomento non valido in edit()"
 
-#: src/main/edit.c:121 src/main/saveload.c:2076
+#: src/main/edit.c:121 src/main/saveload.c:2078
 msgid "unable to open file"
 msgstr "impossibile aprire file"
 
@@ -2959,12 +3002,12 @@ msgid "no graphics system to unregister"
 msgstr "nessun sistema grafico da eliminare"
 
 #: src/main/engine.c:443 src/main/engine.c:448 src/main/engine.c:456
-#: src/main/engine.c:463 src/main/engine.c:477 src/modules/X11/devX11.c:1157
+#: src/main/engine.c:463 src/main/engine.c:477 src/modules/X11/devX11.c:1159
 msgid "invalid line end"
 msgstr "'line end' non valida"
 
 #: src/main/engine.c:508 src/main/engine.c:513 src/main/engine.c:521
-#: src/main/engine.c:528 src/main/engine.c:542 src/modules/X11/devX11.c:1175
+#: src/main/engine.c:528 src/main/engine.c:542 src/modules/X11/devX11.c:1177
 msgid "invalid line join"
 msgstr "'line join' non valida"
 
@@ -2998,85 +3041,99 @@ msgstr "Sys.sleep non è implementata su questo sistema"
 msgid "raster capture is not available for this device"
 msgstr "'truncation' non disponibile per questa connessione"
 
-#: src/main/engine.c:1656
+#: src/main/engine.c:1662
 #, c-format
 msgid "font face %d not supported for font family '%s'"
 msgstr "font fact %d non supportata per la famiglia font '%s'"
 
-#: src/main/engine.c:1972
+#: src/main/engine.c:1978
 msgid "no graphics device is active"
 msgstr "nessuno dispositivo grafico attivo"
 
-#: src/main/engine.c:2049
+#: src/main/engine.c:2055
 #, fuzzy, c-format
 msgid "pch value '%d' is invalid in this locale"
 msgstr "'pattern' non valido per questo locale"
 
-#: src/main/engine.c:2307
+#: src/main/engine.c:2313
 #, c-format
 msgid "unimplemented pch value '%d'"
 msgstr "valore pch '%d' non implementato"
 
-#: src/main/engine.c:2330
+#: src/main/engine.c:2336
 #, c-format
 msgid "invalid axis extents [GEPretty(.,.,n=%d)"
 msgstr "estensione asse non valida [GEPretty(.,.,n=%d)"
 
-#: src/main/engine.c:2334
+#: src/main/engine.c:2340
 #, c-format
 msgid "infinite axis extents [GEPretty(%g,%g,%d)]"
 msgstr "estensione asse infinita [GEPretty(%g,%g,%d)]"
 
-#: src/main/engine.c:2371
+#: src/main/engine.c:2377
 #, c-format
 msgid " .. GEPretty(.): new *lo = %g < %g = x1"
 msgstr " .. GEPretty(.): nuovo  *lo = %g < %g = x1"
 
-#: src/main/engine.c:2373
+#: src/main/engine.c:2379
 #, c-format
 msgid " .. GEPretty(.): new *up = %g > %g = x2"
 msgstr " .. GEPretty(.): nuovo *up = %g > %g = x2"
 
-#: src/main/engine.c:2773
+#: src/main/engine.c:2784
 #, fuzzy
 msgid "display list redraw incomplete"
 msgstr "Aggiornamento del grafico incompleto"
 
-#: src/main/engine.c:2777
+#: src/main/engine.c:2788
 #, fuzzy
 msgid "invalid display list"
 msgstr "argomento di tipo list non valido"
 
-#: src/main/engine.c:2963
+#: src/main/engine.c:2900
+#, c-format
+msgid ""
+"snapshot recorded with different graphics engine version (pre 11 - this is "
+"version %d)"
+msgstr ""
+
+#: src/main/engine.c:2904
+#, c-format
+msgid ""
+"snapshot recorded with different graphics engine version (%d - this is "
+"version %d)"
+msgstr ""
+
+#: src/main/engine.c:2983
 msgid "'expr' argument must be an expression"
 msgstr "l'argomento 'expr' deve essere un'espressione"
 
-#: src/main/engine.c:2965
+#: src/main/engine.c:2985
 msgid "'list' argument must be a list"
 msgstr "l'argomento 'list' deve essere una lista"
 
-#: src/main/engine.c:2971
+#: src/main/engine.c:2991
 msgid "'env' argument must be an environment"
 msgstr "l'argomento 'env' deve essere un environment"
 
-#: src/main/engine.c:3051 src/main/engine.c:3059
+#: src/main/engine.c:3071 src/main/engine.c:3079
 msgid "invalid multibyte char in pch=\"c\""
 msgstr "carattere multibyte non valido in pch=\"c\""
 
-#: src/main/engine.c:3106
+#: src/main/engine.c:3126
 msgid "invalid hex digit in 'color' or 'lty'"
 msgstr "cifre esadecimali non valide in 'color' o 'lty'"
 
-#: src/main/engine.c:3129
+#: src/main/engine.c:3149
 msgid "invalid line type: must be length 2, 4, 6 or 8"
 msgstr "line type non valido: deve avere lunghezza 2, 4, 6 o 8"
 
-#: src/main/engine.c:3133
+#: src/main/engine.c:3153
 #, fuzzy
 msgid "invalid line type: zeroes are not allowed"
 msgstr "vettori di lunghezza negativa non ammessi"
 
-#: src/main/engine.c:3142 src/main/engine.c:3150 src/main/engine.c:3157
+#: src/main/engine.c:3162 src/main/engine.c:3170 src/main/engine.c:3177
 msgid "invalid line type"
 msgstr "line type non valido"
 
@@ -3085,728 +3142,736 @@ msgstr "line type non valido"
 msgid "cannot change value of locked binding for '%s'"
 msgstr "non posso cambiare un valore con un legame bloccato"
 
-#: src/main/envir.c:251 src/main/envir.c:1454
+#: src/main/envir.c:251 src/main/envir.c:1530
 msgid "cannot add bindings to a locked environment"
 msgstr "non posso aggiungere legami ad un environment bloccato"
 
-#: src/main/envir.c:772
+#: src/main/envir.c:775
 msgid "invalid cached value in R_GetGlobalCache"
 msgstr "valore di cache non valido in R_GetGlobalCache"
 
-#: src/main/envir.c:830
+#: src/main/envir.c:836
 msgid "cannot unbind in the base namespace"
 msgstr "non posso rompere i legami nel namespace base"
 
-#: src/main/envir.c:832
+#: src/main/envir.c:838
 #, fuzzy
 msgid "unbind in the base environment is unimplemented"
 msgstr "non posso rompere i legami nell'environment base"
 
-#: src/main/envir.c:834 src/main/envir.c:1684
+#: src/main/envir.c:840 src/main/envir.c:1818
 msgid "cannot remove bindings from a locked environment"
 msgstr "non posso rimuovere i legami da un environment bloccato"
 
-#: src/main/envir.c:1139
+#: src/main/envir.c:1213
 #, fuzzy, c-format
 msgid "argument to '%s' is not an environment"
 msgstr "l'argomento non è un environment"
 
-#: src/main/envir.c:1300
+#: src/main/envir.c:1374
 #, fuzzy, c-format
 msgid "the ... list does not contain %d elements"
 msgstr "La lista ... non contiene %d elementi"
 
-#: src/main/envir.c:1302
+#: src/main/envir.c:1376
 #, c-format
 msgid "..%d used in an incorrect context, no ... to look in"
 msgstr "..%d usato in un contesto sbagliato, nessun ... in cui cercare"
 
-#: src/main/envir.c:1390 src/main/envir.c:1842 src/main/eval.c:573
-#: src/main/eval.c:3618
-#, c-format
-msgid "argument \"%s\" is missing, with no default"
-msgstr "l'argomento \"%s\"  non è specificato e non ha un valore predefinito"
-
-#: src/main/envir.c:1395
+#: src/main/envir.c:1469
 #, c-format
 msgid "could not find function \"%s\""
 msgstr "non trovo la funzione \"%s\""
 
-#: src/main/envir.c:1418
+#: src/main/envir.c:1492
 #, fuzzy
 msgid "cannot assign values in the empty environment"
 msgstr "non posso rompere i legami nell'environment base"
 
-#: src/main/envir.c:1424 src/main/envir.c:1497
+#: src/main/envir.c:1498 src/main/envir.c:1628
 msgid "cannot assign variables to this database"
 msgstr "impossibile assegnare variabili a questo database"
 
-#: src/main/envir.c:1580
+#: src/main/envir.c:1714
 #, fuzzy, c-format
 msgid "cannot add binding of '%s' to the base environment"
 msgstr "non posso aggiungere legami ad un environment bloccato"
 
-#: src/main/envir.c:1609
+#: src/main/envir.c:1743
 msgid "only the first element is used as variable name"
 msgstr "solo il primo elemento è utilizzato come nome di variabile"
 
-#: src/main/envir.c:1641
+#: src/main/envir.c:1775
 #, fuzzy
 msgid "first argument must be a named list"
 msgstr "il primo parametro deve essere di tipo list"
 
-#: src/main/envir.c:1646
+#: src/main/envir.c:1780
 #, fuzzy
 msgid "names(x) must be a character vector of the same length as x"
 msgstr "'hostname' deve essere una stringa di tipo character"
 
-#: src/main/envir.c:1649
+#: src/main/envir.c:1783
 #, fuzzy
 msgid "'envir' argument must be an environment"
 msgstr "l'argomento 'env' deve essere un environment"
 
-#: src/main/envir.c:1678
+#: src/main/envir.c:1812
 msgid "cannot remove variables from base namespace"
 msgstr "impossibile rimuovere variabili dal namespace base"
 
-#: src/main/envir.c:1680
+#: src/main/envir.c:1814
 #, fuzzy
 msgid "cannot remove variables from the base environment"
 msgstr "impossibile rimuovere variabili da questo database"
 
-#: src/main/envir.c:1682
+#: src/main/envir.c:1816
 #, fuzzy
 msgid "cannot remove variables from the empty environment"
 msgstr "impossibile rimuovere variabili da questo database"
 
-#: src/main/envir.c:1690
+#: src/main/envir.c:1824
 msgid "cannot remove variables from this database"
 msgstr "impossibile rimuovere variabili da questo database"
 
-#: src/main/envir.c:1849
+#: src/main/envir.c:1985
 #, fuzzy, c-format
 msgid "object '%s' of mode '%s' was not found"
 msgstr "variabile \"%s\" in modalità \"%s\" non trovata"
 
-#: src/main/envir.c:1921
+#: src/main/envir.c:2068
 #, c-format
 msgid "invalid name in position %d"
 msgstr "nome non valido in posizione %d"
 
-#: src/main/envir.c:1927
+#: src/main/envir.c:2074
 msgid "second argument must be an environment"
 msgstr "il secondo argomento deve essere un environment"
 
-#: src/main/envir.c:1935 src/main/envir.c:1943
+#: src/main/envir.c:2082 src/main/envir.c:2090
 #, fuzzy, c-format
 msgid "wrong length for '%s' argument"
 msgstr "lunghezza sbagliata dell'argomento 'mode'"
 
-#: src/main/envir.c:2062
+#: src/main/envir.c:2221
 #, fuzzy
 msgid "invalid use of 'missing'"
 msgstr "uso di 'missing' non valido"
 
-#: src/main/envir.c:2087
+#: src/main/envir.c:2247
 #, fuzzy
 msgid "'missing' can only be used for arguments"
 msgstr "missing si può usare solo per gli argomenti"
 
-#: src/main/envir.c:2168
+#: src/main/envir.c:2333
 #, fuzzy
 msgid "'pos' must be an integer"
 msgstr "'a' e 'b' devono essere finiti"
 
-#: src/main/envir.c:2182
+#: src/main/envir.c:2347
 #, fuzzy
 msgid "all elements of a list must be named"
 msgstr "attach: tutti gli elementi devono avere un nome"
 
-#: src/main/envir.c:2205
+#: src/main/envir.c:2370
 #, fuzzy
 msgid "'attach' only works for lists, data frames and environments"
 msgstr "attach funziona solo per liste e data frames"
 
-#: src/main/envir.c:2288
+#: src/main/envir.c:2453
 msgid "detaching \"package:base\" is not allowed"
 msgstr "il detach di \"package:base\" non è permesso"
 
-#: src/main/envir.c:2589 src/main/envir.c:2644
+#: src/main/envir.c:2798 src/main/envir.c:2879
 msgid "argument must be an environment"
 msgstr "l'argomento deve essere di tipo environment"
 
-#: src/main/envir.c:2648
+#: src/main/envir.c:2883
 msgid "arguments must be symbolic"
 msgstr "l'argomento deve essere simbolico"
 
-#: src/main/envir.c:2772
+#: src/main/envir.c:3032
 msgid "no enclosing environment"
 msgstr "nessun environment di inclusione"
 
-#: src/main/envir.c:2825
+#: src/main/envir.c:3085
 #, c-format
 msgid "no item called \"%s\" on the search list"
 msgstr "nessun termine chiamato \"%s\" nella lista di ricerca"
 
-#: src/main/envir.c:2850
+#: src/main/envir.c:3110
 msgid "using 'as.environment(NULL)' is defunct"
 msgstr ""
 
-#: src/main/envir.c:2856
+#: src/main/envir.c:3116
 #, fuzzy
 msgid "S4 object does not extend class \"environment\""
 msgstr "l'oggetto sostitutivo non è un environment"
 
-#: src/main/envir.c:2871
+#: src/main/envir.c:3131
 #, fuzzy
 msgid "invalid object for 'as.environment'"
 msgstr "oggetto non valido per 'as.environment'"
 
-#: src/main/envir.c:2897 src/main/envir.c:2925 src/main/envir.c:2954
-#: src/main/envir.c:2975 src/main/envir.c:2998 src/main/envir.c:3033
-#: src/main/envir.c:3054
+#: src/main/envir.c:3157 src/main/envir.c:3185 src/main/envir.c:3214
+#: src/main/envir.c:3235 src/main/envir.c:3258 src/main/envir.c:3293
+#: src/main/envir.c:3314
 msgid "not an environment"
 msgstr "non è un environment"
 
-#: src/main/envir.c:2949 src/main/envir.c:2970 src/main/envir.c:2991
-#: src/main/envir.c:3028 src/main/envir.c:3049 src/main/envir.c:3148
+#: src/main/envir.c:3209 src/main/envir.c:3230 src/main/envir.c:3251
+#: src/main/envir.c:3288 src/main/envir.c:3309 src/main/envir.c:3408
 msgid "not a symbol"
 msgstr "non è un simbolo"
 
-#: src/main/envir.c:2962 src/main/envir.c:2983 src/main/envir.c:3041
-#: src/main/envir.c:3062
+#: src/main/envir.c:3222 src/main/envir.c:3243 src/main/envir.c:3301
+#: src/main/envir.c:3322
 #, c-format
 msgid "no binding for \"%s\""
 msgstr "nessun collegamento per \"%s\""
 
-#: src/main/envir.c:2993
+#: src/main/envir.c:3253
 msgid "not a function"
 msgstr "non è una funzione"
 
-#: src/main/envir.c:3001 src/main/envir.c:3017
+#: src/main/envir.c:3261 src/main/envir.c:3277
 msgid "symbol already has a regular binding"
 msgstr "il simbolo ha già un collegamento regolare"
 
-#: src/main/envir.c:3003 src/main/envir.c:3019
+#: src/main/envir.c:3263 src/main/envir.c:3279
 #, fuzzy
 msgid "cannot change active binding if binding is locked"
 msgstr "non posso cambiare un valore con un legame bloccato"
 
-#: src/main/envir.c:3107
+#: src/main/envir.c:3367 src/main/envir.c:3604
 msgid "unknown op"
 msgstr "op sconosciuto"
 
-#: src/main/envir.c:3152
+#: src/main/envir.c:3412
 msgid "cannot unbind a locked binding"
 msgstr "non posso sbloccare un collegamento bloccato"
 
-#: src/main/envir.c:3154
+#: src/main/envir.c:3414
 msgid "cannot unbind an active binding"
 msgstr "non posso scollegare un collegamento attivo"
 
-#: src/main/envir.c:3289
+#: src/main/envir.c:3555
 #, fuzzy
 msgid "bad namespace name"
 msgstr "nome namespace non valido"
 
-#: src/main/envir.c:3301
+#: src/main/envir.c:3567
 #, fuzzy
 msgid "namespace already registered"
 msgstr "namespace già registrato"
 
-#: src/main/envir.c:3313
+#: src/main/envir.c:3579
 #, fuzzy
 msgid "namespace not registered"
 msgstr "namespace non registrato"
 
-#: src/main/envir.c:3360
+#: src/main/envir.c:3635
 msgid "bad import environment argument"
 msgstr "argoment importazione environment sbagliato"
 
-#: src/main/envir.c:3365
+#: src/main/envir.c:3640
 msgid "bad export environment argument"
 msgstr "argomento esportazione environment sbagliato"
 
-#: src/main/envir.c:3369
+#: src/main/envir.c:3644
 msgid "length of import and export names must match"
 msgstr "le lunghezze dei nomi di import e export devono conincidere"
 
-#: src/main/envir.c:3392
+#: src/main/envir.c:3667
 #, c-format
 msgid "exported symbol '%s' has no value"
 msgstr "il simbolo esportato '%s' non ha un valore"
 
-#: src/main/envir.c:3557
+#: src/main/envir.c:3833
 #, fuzzy, c-format
 msgid "unknown encoding: %d"
 msgstr "codifica '%s' non supportata"
 
-#: src/main/envir.c:3577
+#: src/main/envir.c:3853
 #, c-format
 msgid "embedded nul in string: '%s'"
 msgstr ""
 
-#: src/main/errors.c:178 src/main/errors.c:215
+#: src/main/errors.c:163 src/main/errors.c:200
 msgid "interrupts suspended; signal ignored"
 msgstr "interrupt sospesi; segnale ignorato"
 
-#: src/main/errors.c:318
+#: src/main/errors.c:250
+msgid "[... truncated]"
+msgstr ""
+
+#: src/main/errors.c:310
 msgid "invalid option \"warning.expression\""
 msgstr "opzione  \"warning.expression\" non valida"
 
-#: src/main/errors.c:348
+#: src/main/errors.c:339
 #, c-format
 msgid "(converted from warning) %s"
 msgstr "(contertito da avviso) %s"
 
-#: src/main/errors.c:359
-#, fuzzy, c-format
-msgid "Warning: %s\n"
+#: src/main/errors.c:349
+#, fuzzy
+msgid "Warning:"
 msgstr "Avviso: "
 
-#: src/main/errors.c:363
+#: src/main/errors.c:351
 #, fuzzy, c-format
-msgid "Warning in %s : %s\n"
+msgid "Warning in %s :"
 msgstr "Avviso in %s : "
 
-#: src/main/errors.c:365
-#, fuzzy, c-format
-msgid ""
-"Warning in %s :\n"
-"  %s\n"
-msgstr "Avviso in %s : "
+#: src/main/errors.c:360 src/main/errors.c:374 src/main/errors.c:687
+msgid "Calls:"
+msgstr ""
 
-#: src/main/errors.c:428 src/main/errors.c:447 src/main/errors.c:596
+#: src/main/errors.c:421 src/main/errors.c:440 src/main/errors.c:602
 msgid "Lost warning messages\n"
 msgstr "Alcuni messaggi di avviso perduti\n"
 
-#: src/main/errors.c:459
+#: src/main/errors.c:452
 #, fuzzy
-msgid "Warning message:\n"
-msgid_plural "Warning messages:\n"
+msgid "Warning message:"
+msgid_plural "Warning messages:"
 msgstr[0] "Alcuni messaggi di avviso perduti\n"
 msgstr[1] "Alcuni messaggi di avviso perduti\n"
 
-#: src/main/errors.c:514
+#: src/main/errors.c:462 src/main/errors.c:490
 #, c-format
-msgid "There were %d warnings (use warnings() to see them)\n"
-msgstr "Ci sono %d avvisi (usare warnings() per leggerli)\n"
+msgid "In %s :"
+msgstr ""
+
+#: src/main/errors.c:515
+#, fuzzy, c-format
+msgid "There was %d warning (use warnings() to see it)"
+msgid_plural "There were %d warnings (use warnings() to see them)"
+msgstr[0] "Ci sono %d avvisi (usare warnings() per leggerli)\n"
+msgstr[1] "Ci sono %d avvisi (usare warnings() per leggerli)\n"
 
-#: src/main/errors.c:517
+#: src/main/errors.c:520
 #, fuzzy, c-format
-msgid "There were %d or more warnings (use warnings() to see the first %d)\n"
+msgid "There were %d or more warnings (use warnings() to see the first %d)"
 msgstr "Ci sono 50 o più avvisi (usare warnings() per leggere i primi 50)\n"
 
-#: src/main/errors.c:587
+#: src/main/errors.c:593
 msgid "Error during wrapup: "
 msgstr "Errore durante wrapup: "
 
-#: src/main/errors.c:612
+#: src/main/errors.c:618
 msgid "Error in "
 msgstr "Errore in "
 
-#: src/main/errors.c:613
+#: src/main/errors.c:640 src/main/errors.c:647
 #, c-format
-msgid " (from %s) : "
+msgid "Error in %s (from %s) : "
 msgstr ""
 
-#: src/main/errors.c:664 src/main/errors.c:670
+#: src/main/errors.c:649
+#, fuzzy, c-format
+msgid "Error in %s : "
+msgstr "Errore in "
+
+#: src/main/errors.c:669 src/main/errors.c:675
 #, c-format
 msgid "Error: "
 msgstr "Errore: "
 
-#: src/main/errors.c:690 src/main/errors.c:1319
+#: src/main/errors.c:696 src/main/errors.c:1300
 msgid "In addition: "
 msgstr "Inoltre: "
 
-#: src/main/errors.c:811
+#: src/main/errors.c:818
 msgid "invalid option \"error\"\n"
 msgstr "opzione \"error\" non valida\n"
 
-#: src/main/errors.c:893
-msgid "Execution halted\n"
-msgstr "Esecuzione interrotta\n"
-
-#: src/main/errors.c:1032
-msgid "'msg1' must be a character string"
-msgstr "'msg1' deve essere una stringa di tipo character"
-
-#: src/main/errors.c:1034
-msgid "'msg2' must be a character string"
-msgstr "'msg2' deve essere una stringa di tipo character"
+#: src/main/errors.c:1013 src/main/errors.c:1015 src/main/options.c:339
+#: src/main/unique.c:1638
+#, fuzzy, c-format
+msgid "'%s' must be a character string"
+msgstr "'sep' deve essere una stringa di tipo character"
 
-#: src/main/errors.c:1131
+#: src/main/errors.c:1116
 msgid " [invalid string in stop(.)]"
 msgstr " [stringa non valida in stop(.)]"
 
-#: src/main/errors.c:1162
+#: src/main/errors.c:1148
 msgid " [invalid string in warning(.)]"
 msgstr " [stringa non valida in warning(.)]"
 
-#: src/main/errors.c:1178
+#: src/main/errors.c:1164
 #, c-format
 msgid "incorrect number of arguments to \"%s\""
 msgstr "numero di argomenti non corretto per \"%s\""
 
-#: src/main/errors.c:1184 src/main/errors.c:1199
+#: src/main/errors.c:1170 src/main/errors.c:1185
 #, c-format
 msgid "unimplemented feature in %s"
 msgstr "funzionalità non implementata in %s"
 
-#: src/main/errors.c:1193
+#: src/main/errors.c:1179
 msgid "invalid number of arguments"
 msgstr "numero di argomenti non valido"
 
-#: src/main/errors.c:1194 src/main/logic.c:189
+#: src/main/errors.c:1180 src/main/logic.c:181
 msgid "invalid argument type"
 msgstr "tipo argomento non valido"
 
-#: src/main/errors.c:1196
+#: src/main/errors.c:1182
 msgid "time-series/vector length mismatch"
 msgstr "lunghezza serie storiche/vettore non concordante"
 
-#: src/main/errors.c:1197
+#: src/main/errors.c:1183
 msgid "incompatible arguments"
 msgstr "argomenti incompatibili"
 
-#: src/main/errors.c:1200
+#: src/main/errors.c:1186
 msgid "unknown error (report this!)"
 msgstr "errore sconosciuto (per piacere, segnalatecelo!)"
 
-#: src/main/errors.c:1212
+#: src/main/errors.c:1195
+msgid "inaccurate integer conversion in coercion"
+msgstr "conversione intera non accurata durante la conversione"
+
+#: src/main/errors.c:1198
 msgid "unknown warning (report this!)"
 msgstr "avviso sconosciuto (per piacere, segnalatecelo!)"
 
-#: src/main/errors.c:1283
+#: src/main/errors.c:1269
 msgid "No function to return from, jumping to top level"
 msgstr "non vi è alcuna funzione da cui uscire, salto al livello superiore"
 
-#: src/main/errors.c:1299
+#: src/main/errors.c:1285
 msgid "top level inconsistency?"
 msgstr "inconsitenza a livello superiore?"
 
-#: src/main/errors.c:1478
+#: src/main/errors.c:1459
 msgid "bad handler data"
 msgstr ""
 
-#: src/main/errors.c:1628
+#: src/main/errors.c:1613
 msgid "error message not a string"
 msgstr "il messaggio di errore non è una stringa"
 
-#: src/main/errors.c:1703
+#: src/main/errors.c:1688
 msgid "handler or restart stack mismatch in old restart"
 msgstr ""
 
-#: src/main/errors.c:1729 src/main/errors.c:1745
+#: src/main/errors.c:1714 src/main/errors.c:1730
 msgid "bad error message"
 msgstr "messaggio di errore sbagliato"
 
-#: src/main/errors.c:1787
+#: src/main/errors.c:1771
 msgid "bad restart"
 msgstr "riavvio non corretto"
 
-#: src/main/errors.c:1819
+#: src/main/errors.c:1803
 msgid "restart not on stack"
 msgstr "'restart' non è nello stack"
 
-#: src/main/errors.c:1836
+#: src/main/errors.c:1819
 msgid "not in a try context"
 msgstr "non è in un contesto di 'try'"
 
-#: src/main/errors.c:1849
+#: src/main/errors.c:1832
 #, fuzzy
 msgid "error message must be a character string"
 msgstr "'msg1' deve essere una stringa di tipo character"
 
-#: src/main/eval.c:308
+#: src/main/eval.c:365
 #, c-format
 msgid "source files skipped by Rprof; please increase '%s'"
 msgstr ""
 
-#: src/main/eval.c:328
+#: src/main/eval.c:385
 #, c-format
 msgid "Rprof: cannot open profile file '%s'"
 msgstr "Rprof: non posso aprire il file di profile '%s'"
 
-#: src/main/eval.c:422
+#: src/main/eval.c:479
 msgid "R profiling is not available on this system"
 msgstr "Il profiling di R non è disponibile su questo sistema"
 
-#: src/main/eval.c:446
+#: src/main/eval.c:503
 msgid ""
 "promise already under evaluation: recursive default argument reference or "
 "earlier problems?"
 msgstr ""
 
-#: src/main/eval.c:448
+#: src/main/eval.c:505
 #, fuzzy
 msgid "restarting interrupted promise evaluation"
 msgstr "riavvi non supportati in 'eval'"
 
-#: src/main/eval.c:544
+#: src/main/eval.c:601
 msgid ""
 "evaluation nested too deeply: infinite recursion / options(expressions=)?"
 msgstr ""
 "calcolo annidatato in un numero eccessivo di livelli: ricorsione infinita / "
 "options(expressions=)?"
 
-#: src/main/eval.c:575 src/main/eval.c:3619
+#: src/main/eval.c:632 src/main/eval.c:4238
 msgid "argument is missing, with no default"
 msgstr "argomento non specificato e senza un valore predefinito"
 
-#: src/main/eval.c:679 src/main/eval.c:4642
+#: src/main/eval.c:736 src/main/eval.c:1306 src/main/eval.c:5533
 msgid "attempt to apply non-function"
 msgstr "tentativo di applicare una non-funzione"
 
-#: src/main/eval.c:702
+#: src/main/eval.c:759
 #, c-format
 msgid "%s at %s#%d: "
 msgstr ""
 
-#: src/main/eval.c:1178
+#: src/main/eval.c:1298 src/main/eval.c:2271
+#, fuzzy, c-format
+msgid "argument %d is empty"
+msgstr "l'argomento %d non è di tipo vector"
+
+#: src/main/eval.c:1350
 #, c-format
 msgid "could not find symbol \"%s\" in environment of the generic function"
 msgstr "non trovo il simbolo \"%s\" nell'environment della funzione generica"
 
-#: src/main/eval.c:1196
+#: src/main/eval.c:1368
 #, c-format
 msgid "symbol \"%s\" not in environment of method"
 msgstr "il simbolo \"%s\" non è nell'environment del metodo"
 
-#: src/main/eval.c:1308
+#: src/main/eval.c:1481
 msgid "the condition has length > 1 and only the first element will be used"
 msgstr ""
 "la condizione la lunghezza > 1 e solo il promo elemento verrà utilizzato"
 
-#: src/main/eval.c:1325
+#: src/main/eval.c:1500
 msgid "missing value where TRUE/FALSE needed"
 msgstr "valore mancante dove è richiesto TRUE/FALSE"
 
-#: src/main/eval.c:1326
+#: src/main/eval.c:1501
 msgid "argument is not interpretable as logical"
 msgstr "l'argomento non può essere interpretato come logico"
 
-#: src/main/eval.c:1327
+#: src/main/eval.c:1502
 msgid "argument is of length zero"
 msgstr "l'argomento ha lunghezza zero"
 
-#: src/main/eval.c:1418
+#: src/main/eval.c:1596
 msgid "non-symbol loop variable"
 msgstr "variabile di ciclo non simbolica"
 
-#: src/main/eval.c:1510 src/main/eval.c:4408
+#: src/main/eval.c:1687 src/main/eval.c:5301
 msgid "invalid for() loop sequence"
 msgstr "sequenza ciclo for() non corretta"
 
-#: src/main/eval.c:1652
+#: src/main/eval.c:1826
 #, fuzzy
 msgid "multi-argument returns are not permitted"
 msgstr "return multi-argomento sono deprecati"
 
-#: src/main/eval.c:1701
+#: src/main/eval.c:1873
 msgid "invalid (NULL) left side of assignment"
 msgstr "membro di sinistra (NULL) dell'assegnazione non valido"
 
-#: src/main/eval.c:1734
+#: src/main/eval.c:1907
 msgid "target of assignment expands to non-language object"
 msgstr ""
 "la destinazione dell'assegnazione si espande in un oggetto non del linguaggio"
 
-#: src/main/eval.c:1817
+#: src/main/eval.c:1990
 #, c-format
 msgid "overlong name in '%s'"
 msgstr "nome troppo lungo in '%s'"
 
-#: src/main/eval.c:1915
+#: src/main/eval.c:2080
 msgid "cannot do complex assignments in base namespace"
 msgstr "non si possono fare assegnazioni complesse nel namespace base"
 
-#: src/main/eval.c:1917
+#: src/main/eval.c:2082
 msgid "cannot do complex assignments in base environment"
 msgstr "non si possono fare assegnazioni complesse nell'environment di base"
 
-#: src/main/eval.c:1954 src/main/eval.c:1981
+#: src/main/eval.c:2121 src/main/eval.c:2148
 msgid "invalid function in complex assignment"
 msgstr "funzione non ammissibile nell'assegnazione complessa"
 
-#: src/main/eval.c:2041
+#: src/main/eval.c:2208
 msgid "invalid (do_set) left-hand side to assignment"
 msgstr "il membro di sinistra dell'assegnazione (do_set) non è valido"
 
-#: src/main/eval.c:2103
-#, fuzzy, c-format
-msgid "argument %d is empty"
-msgstr "l'argomento %d non è di tipo vector"
-
-#: src/main/eval.c:2116
+#: src/main/eval.c:2284
 #, c-format
 msgid "'%s' is missing"
 msgstr ""
 
-#: src/main/eval.c:2267
+#: src/main/eval.c:2439
 msgid "invalid formal argument list for \"function\""
 msgstr "argomento formale list non valido per \"function\""
 
-#: src/main/eval.c:2325 src/main/eval.c:2356 src/main/eval.c:2361
+#: src/main/eval.c:2497 src/main/eval.c:2528 src/main/eval.c:2533
 #, fuzzy, c-format
 msgid "invalid '%s' argument of type '%s'"
 msgstr "argomento '%s' non valido"
 
-#: src/main/eval.c:2353
+#: src/main/eval.c:2525
 msgid "numeric 'envir' arg not of length one"
 msgstr "l'argomento di tipo numeric 'envir' non ha lunghezza uno"
 
-#: src/main/eval.c:2377 src/main/eval.c:2399
+#: src/main/eval.c:2549 src/main/eval.c:2573
 msgid "restarts not supported in 'eval'"
 msgstr "riavvi non supportati in 'eval'"
 
-#: src/main/eval.c:2456 src/main/eval.c:2469
+#: src/main/eval.c:2632 src/main/eval.c:2645
 msgid "'Recall' called from outside a closure"
 msgstr "'Recall' chiamato esternamente da una chiusura"
 
-#: src/main/eval.c:2562
+#: src/main/eval.c:2738
 msgid "value in '...' is not a promise"
 msgstr "valore in '...' non è una promessa"
 
-#: src/main/eval.c:2754 src/main/objects.c:720
-#, c-format
-msgid "call name too long in '%s'"
-msgstr "nome chiamata troppo lungo in '%s'"
-
-#: src/main/eval.c:2775
-#, c-format
-msgid "generic name too long in '%s'"
-msgstr "nome generico troppo lungo in '%s'"
-
-#: src/main/eval.c:2840
+#: src/main/eval.c:2999
 #, c-format
 msgid "Incompatible methods (\"%s\", \"%s\") for \"%s\""
 msgstr "Metodi incompatibili (\"%s\", \"%s\") per \"%s\""
 
-#: src/main/eval.c:2906
+#: src/main/eval.c:3048
 #, fuzzy
 msgid "dispatch error in group dispatch"
 msgstr "errore nel dispatch"
 
-#: src/main/eval.c:3201
+#: src/main/eval.c:3532
 #, fuzzy, c-format
 msgid "\"%s\" is not a %s function"
 msgstr "'%s' non è una funzione"
 
-#: src/main/eval.c:3430
+#: src/main/eval.c:4047
 msgid "node stack overflow"
 msgstr "overflow del node stack"
 
-#: src/main/eval.c:3436
+#: src/main/eval.c:4053
 msgid "integer stack overflow"
 msgstr "overflow dello stack interi"
 
-#: src/main/eval.c:3490
+#: src/main/eval.c:4107
 #, fuzzy
 msgid "bad opcode"
 msgstr "Opcode errato"
 
-#: src/main/eval.c:4219
+#: src/main/eval.c:5083
 #, fuzzy, c-format
 msgid "invalid %s type in 'x %s y'"
 msgstr "'x' non valido in 'x %s y'"
 
-#: src/main/eval.c:4310
+#: src/main/eval.c:5195
 msgid "bytecode version mismatch; using eval"
 msgstr "versione bytecode non corretta; uso eval"
 
-#: src/main/eval.c:4315
+#: src/main/eval.c:5200
 msgid "bytecode version is too old"
 msgstr "versione bytecode troppo vecchia"
 
-#: src/main/eval.c:4316
+#: src/main/eval.c:5201
 msgid "bytecode version is too new"
 msgstr "versione bytecode troppo nuova"
 
-#: src/main/eval.c:4350
+#: src/main/eval.c:5235
 msgid "byte code version mismatch"
 msgstr "versione bytecode non coincidente"
 
-#: src/main/eval.c:4477
+#: src/main/eval.c:5383
 msgid "invalid sequence argument in for loop"
 msgstr "argomento 'sequence' non valido nel ciclo 'for'"
 
-#: src/main/eval.c:4624 src/main/names.c:1181
+#: src/main/eval.c:5522 src/main/names.c:1312
 #, fuzzy, c-format
 msgid "there is no .Internal function '%s'"
 msgstr "nessuna funzione interna \"%s\""
 
-#: src/main/eval.c:4731 src/main/eval.c:5077 src/main/eval.c:5119
+#: src/main/eval.c:5622 src/main/eval.c:5968 src/main/eval.c:6008
 msgid "bad function"
 msgstr "funzione sbagliata"
 
-#: src/main/eval.c:4746
+#: src/main/eval.c:5635
 msgid "not a BUILTIN function"
 msgstr "non è una funzione BUILTIN"
 
-#: src/main/eval.c:5159
+#: src/main/eval.c:6066
+msgid "bad numeric 'switch' offsets"
+msgstr ""
+
+#: src/main/eval.c:6072
 msgid "numeric EXPR required for 'switch' without named alternatives"
 msgstr ""
 
-#: src/main/eval.c:5255
+#: src/main/eval.c:6076
+msgid "bad character 'switch' offsets"
+msgstr ""
+
+#: src/main/eval.c:6188
 msgid "cannot find index for threaded code address"
 msgstr ""
 
-#: src/main/eval.c:5315
+#: src/main/eval.c:6248
 #, fuzzy
 msgid "invalid body"
 msgstr "simbolo non valido"
 
-#: src/main/eval.c:5335
+#: src/main/eval.c:6268
 msgid "invalid symbol"
 msgstr "simbolo non valido"
 
-#: src/main/eval.c:5379
+#: src/main/eval.c:6312
 msgid "argument is not a byte code object"
 msgstr "l'argomento non è un oggetto bytecode"
 
-#: src/main/eval.c:5400
+#: src/main/eval.c:6334
 msgid "bad file name"
 msgstr "nome file sbagliato"
 
-#: src/main/eval.c:5404 src/main/eval.c:5425
+#: src/main/eval.c:6338 src/main/eval.c:6359
 msgid "unable to open 'file'"
 msgstr "impossibile aprire 'file'"
 
-#: src/main/eval.c:5419 src/main/saveload.c:1942
+#: src/main/eval.c:6353 src/main/saveload.c:1944
 msgid "'file' must be non-empty string"
 msgstr "'file' deve essere una stringa non vuota"
 
-#: src/main/eval.c:5421 src/main/saveload.c:1944 src/main/saveload.c:2244
-#: src/main/serialize.c:2149
+#: src/main/eval.c:6355 src/main/saveload.c:1946 src/main/saveload.c:2246
+#: src/main/serialize.c:2189
 msgid "'ascii' must be logical"
 msgstr "'ascii' deve essere di tipo logico"
 
-#: src/main/eval.c:5492 src/main/eval.c:5511 src/main/eval.c:5541
+#: src/main/eval.c:6426 src/main/eval.c:6445 src/main/eval.c:6475
 #, fuzzy
 msgid "constant buffer must be a generic vector"
 msgstr "code deve essere un vettore generico"
 
-#: src/main/eval.c:5543
+#: src/main/eval.c:6477
 msgid "bad constant count"
 msgstr ""
 
-#: src/main/eval.c:5579
+#: src/main/eval.c:6515
 msgid "profile timer in use"
 msgstr "timer di profile in uso"
 
-#: src/main/eval.c:5581
+#: src/main/eval.c:6517
 msgid "already byte code profiling"
 msgstr "sto già effettuando bytecode profiling"
 
-#: src/main/eval.c:5599
+#: src/main/eval.c:6535
 msgid "setting profile timer failed"
 msgstr "impostazione del profile timer non riuscita"
 
-#: src/main/eval.c:5616
+#: src/main/eval.c:6553
 msgid "not byte code profiling"
 msgstr "non sto effettuando profiling bytecode"
 
+#: src/main/eval.c:6569 src/main/eval.c:6573 src/main/eval.c:6577
+#, fuzzy
+msgid "byte code profiling is not supported in this build"
+msgstr "nls() non è supportato in questa piattaforma"
+
 #: src/main/gevents.c:43
 #, fuzzy, c-format
 msgid "'%s' events not supported in this device"
@@ -3822,28 +3887,28 @@ msgstr "errore interno in 'do_sys'"
 msgid "this graphics device does not support event handling"
 msgstr "il dispositivo grafico non support gli eventi grafici"
 
-#: src/main/gevents.c:136
+#: src/main/gevents.c:135
 msgid "invalid prompt"
 msgstr "prompt non valido"
 
-#: src/main/gevents.c:148
+#: src/main/gevents.c:146
 #, fuzzy
 msgid "recursive use of 'getGraphicsEvent' not supported"
 msgstr "modalità '%s' non supportata in call_R"
 
-#: src/main/gevents.c:158
+#: src/main/gevents.c:157
 #, fuzzy
 msgid "no graphics event handlers set"
 msgstr "nessuno dispositivo grafico attivo"
 
-#: src/main/gram.y:222 src/main/gram.y:237 src/main/gram.y:2222
-#: src/main/gram.y:2236
+#: src/main/gram.y:222 src/main/gram.y:237 src/main/gram.y:2245
+#: src/main/gram.y:2259
 #, fuzzy, c-format
 msgid "EOF whilst reading MBCS char at line %d"
 msgstr "EOF durante la lettura di un carattere MBCS"
 
-#: src/main/gram.y:226 src/main/gram.y:234 src/main/gram.y:2226
-#: src/main/gram.y:2233
+#: src/main/gram.y:226 src/main/gram.y:234 src/main/gram.y:2249
+#: src/main/gram.y:2256
 #, fuzzy, c-format
 msgid "invalid multibyte character in parser at line %d"
 msgstr "carattere multibyte non valido in mbcs_get_next"
@@ -3858,129 +3923,140 @@ msgstr "overflow buffer di input"
 msgid "incorrect tag type at line %d"
 msgstr "tipo tag non corretto"
 
-#: src/main/gram.y:1653
+#: src/main/gram.y:1657
 #, fuzzy
 msgid "contextstack overflow"
 msgstr "overflow del node stack"
 
-#: src/main/gram.y:1890
-msgid "input"
-msgstr ""
+#: src/main/gram.y:1907 src/main/gram.y:1913
+#, fuzzy, c-format
+msgid "unexpected input"
+msgstr "necessaria formula"
 
-#: src/main/gram.y:1891
-msgid "end of input"
-msgstr ""
+#: src/main/gram.y:1910 src/main/main.c:311
+#, fuzzy, c-format
+msgid "unexpected end of input"
+msgstr "necessaria formula"
 
-#: src/main/gram.y:1892
-msgid "string constant"
-msgstr ""
+#: src/main/gram.y:1916
+#, fuzzy, c-format
+msgid "unexpected string constant"
+msgstr "non posso leggere da questa connessione"
 
-#: src/main/gram.y:1893
-#, fuzzy
-msgid "numeric constant"
+#: src/main/gram.y:1919
+#, fuzzy, c-format
+msgid "unexpected numeric constant"
 msgstr "argomento non numerico"
 
-#: src/main/gram.y:1894
-#, fuzzy
-msgid "symbol"
-msgstr "non è un simbolo"
+#: src/main/gram.y:1922
+#, fuzzy, c-format
+msgid "unexpected symbol"
+msgstr "necessaria formula"
 
-#: src/main/gram.y:1895
-msgid "assignment"
-msgstr ""
+#: src/main/gram.y:1925
+#, fuzzy, c-format
+msgid "unexpected assignment"
+msgstr "necessaria formula"
 
-#: src/main/gram.y:1896
-msgid "end of line"
-msgstr ""
+#: src/main/gram.y:1928
+#, fuzzy, c-format
+msgid "unexpected end of line"
+msgstr "necessaria formula"
 
-#: src/main/gram.y:1910 src/main/gram.y:1916
+#: src/main/gram.y:1931 src/main/gram.y:1939
 #, fuzzy, c-format
 msgid "unexpected %s"
 msgstr "necessaria formula"
 
-#: src/main/gram.y:1926
+#: src/main/gram.y:1951
 #, fuzzy, c-format
 msgid "repeated formal argument '%s' on line %d"
 msgstr "Argomento formale ripetuto"
 
-#: src/main/gram.y:2136
+#: src/main/gram.y:2161
 #, c-format
 msgid "integer literal %s contains decimal; using numeric value"
 msgstr ""
 
-#: src/main/gram.y:2140
+#: src/main/gram.y:2164
 #, c-format
 msgid "non-integer value %s qualified with L; using numeric value"
 msgstr ""
 
-#: src/main/gram.y:2153
+#: src/main/gram.y:2176
 #, c-format
 msgid "integer literal %s contains unnecessary decimal point"
 msgstr ""
 
-#: src/main/gram.y:2185
+#: src/main/gram.y:2208
 #, fuzzy, c-format
 msgid "unable to allocate buffer for long string at line %d"
 msgstr "non è possibile allocare memoria (in GEregister)"
 
-#: src/main/gram.y:2338
+#: src/main/gram.y:2347 src/main/gram.y:2370 src/main/gram.y:2407
+#: src/main/gram.y:2443
+#, fuzzy, c-format
+msgid "nul character not allowed (line %d)"
+msgstr "carattere multibyte non valido in mbcs_get_next"
+
+#: src/main/gram.y:2363
 #, c-format
 msgid "'\\x' used without hex digits in character string starting \"%s\""
 msgstr ""
 
-#: src/main/gram.y:2352
+#: src/main/gram.y:2379
 #, fuzzy, c-format
 msgid "\\uxxxx sequences not supported inside backticks (line %d)"
 msgstr "'onMouseDown' non supportata"
 
-#: src/main/gram.y:2367
+#: src/main/gram.y:2394
 #, c-format
 msgid "'\\u' used without hex digits in character string starting \"%s\""
 msgstr ""
 
-#: src/main/gram.y:2375
+#: src/main/gram.y:2402
 #, fuzzy, c-format
 msgid "invalid \\u{xxxx} sequence (line %d)"
 msgstr "sequenza \\u{xxxx} non valida"
 
-#: src/main/gram.y:2387
+#: src/main/gram.y:2416
 #, fuzzy, c-format
 msgid "\\Uxxxxxxxx sequences not supported inside backticks (line %d)"
 msgstr "'onMouseDown' non supportata"
 
-#: src/main/gram.y:2402
+#: src/main/gram.y:2431
 #, c-format
 msgid "'\\U' used without hex digits in character string starting \"%s\""
 msgstr ""
 
-#: src/main/gram.y:2410
+#: src/main/gram.y:2439
 #, fuzzy, c-format
 msgid "invalid \\U{xxxxxxxx} sequence (line %d)"
 msgstr "sequenza \\U{xxxxxxxx} non valida"
 
-#: src/main/gram.y:2451
+#: src/main/gram.y:2482
 #, fuzzy, c-format
 msgid "'\\%c' is an unrecognized escape in character string starting \"%s\""
 msgstr "il primo argomento deve essere una stringa di tipo character"
 
-#: src/main/gram.y:2510
+#: src/main/gram.y:2546
 msgid "mixing Unicode and octal/hex escapes in a string is not allowed"
 msgstr ""
 
-#: src/main/gram.y:2514
+#: src/main/gram.y:2550
 #, c-format
 msgid ""
 "string at line %d containing Unicode escapes not in this locale\n"
 "is too long (max 10000 chars)"
 msgstr ""
 
-#: src/main/gram.y:3112 src/main/gram.y:3119 src/main/gram.y:3125
-#: src/main/gram.y:3132
+#: src/main/gram.y:3148 src/main/gram.y:3155 src/main/gram.y:3161
+#: src/main/gram.y:3168
 #, fuzzy, c-format
 msgid "contextstack overflow at line %d"
 msgstr "overflow dello stack interi"
 
-#: src/main/gram.y:3227
+#: src/main/gram.y:3263
 #, fuzzy, c-format
 msgid "internal parser error at line %d"
 msgstr "overflow buffer di input"
@@ -3990,34 +4066,34 @@ msgstr "overflow buffer di input"
 msgid "relative range of values =%4.0f * EPS, is small (axis %d)"
 msgstr "intervallo relativo di valori =%4.0f * EPS, troppo piccolo (asse %d)"
 
-#: src/main/grep.c:93
+#: src/main/grep.c:96
 #, fuzzy, c-format
 msgid "invalid regular expression '%s', reason '%s'"
 msgstr "espressione regolare '%s' non valida"
 
-#: src/main/grep.c:95
+#: src/main/grep.c:98
 #, fuzzy, c-format
 msgid "invalid regular expression, reason '%s'"
 msgstr "espressione regolare '%s' non valida"
 
-#: src/main/grep.c:220 src/main/grep.c:308 src/main/grep.c:416
-#: src/main/grep.c:883 src/main/grep.c:2473
+#: src/main/grep.c:225 src/main/grep.c:315 src/main/grep.c:426
+#: src/main/grep.c:900 src/main/grep.c:2502
 #, fuzzy, c-format
 msgid "input string %d is invalid UTF-8"
 msgstr "stringa di input %d non valida in questo locale"
 
-#: src/main/grep.c:286 src/main/grep.c:383
+#: src/main/grep.c:292 src/main/grep.c:391
 #, fuzzy, c-format
 msgid "'split' string %d is invalid UTF-8"
 msgstr "stringa di input %d non valida in questo locale"
 
-#: src/main/grep.c:290 src/main/grep.c:387 src/main/grep.c:560
+#: src/main/grep.c:296 src/main/grep.c:395 src/main/grep.c:571
 #, fuzzy, c-format
 msgid "'split' string %d is invalid in this locale"
 msgstr "stringa di input %d non valida in questo locale"
 
-#: src/main/grep.c:395 src/main/grep.c:851 src/main/grep.c:1600
-#: src/main/grep.c:2394
+#: src/main/grep.c:404 src/main/grep.c:867 src/main/grep.c:1621
+#: src/main/grep.c:2419
 #, c-format
 msgid ""
 "PCRE pattern compilation error\n"
@@ -4025,62 +4101,62 @@ msgid ""
 "\tat '%s'\n"
 msgstr ""
 
-#: src/main/grep.c:397
+#: src/main/grep.c:406
 #, c-format
 msgid "invalid split pattern '%s'"
 msgstr "pattern di split '%s' non valido"
 
-#: src/main/grep.c:401 src/main/grep.c:857 src/main/grep.c:1607
-#: src/main/grep.c:2401
+#: src/main/grep.c:410 src/main/grep.c:873 src/main/grep.c:1628
+#: src/main/grep.c:2426
 #, c-format
 msgid ""
 "PCRE pattern study error\n"
 "\t'%s'\n"
 msgstr ""
 
-#: src/main/grep.c:834 src/main/grep.c:2377
+#: src/main/grep.c:849 src/main/grep.c:2401
 #, fuzzy
 msgid "regular expression is invalid UTF-8"
 msgstr "l'espressione regolare non è valida in questo locale"
 
-#: src/main/grep.c:853 src/main/grep.c:1602 src/main/grep.c:2396
+#: src/main/grep.c:869 src/main/grep.c:1623 src/main/grep.c:2421
 #, c-format
 msgid "invalid regular expression '%s'"
 msgstr "espressione regolare '%s' non valida"
 
-#: src/main/grep.c:1264
+#: src/main/grep.c:1282
 msgid "pattern matches an empty string infinitely, returning first match only"
 msgstr ""
 
-#: src/main/grep.c:1575
+#: src/main/grep.c:1595
 #, fuzzy
 msgid "'pattern' is invalid UTF-8"
 msgstr "'pattern' non valido per questo locale"
 
-#: src/main/grep.c:1577
+#: src/main/grep.c:1597
 #, fuzzy
 msgid "'replacement' is invalid UTF-8"
 msgstr "'replacemente' non valido in questo locale"
 
-#: src/main/grep.c:1581
+#: src/main/grep.c:1601
 msgid "'pattern' is invalid in this locale"
 msgstr "'pattern' non valido per questo locale"
 
-#: src/main/grep.c:1584
+#: src/main/grep.c:1604
 msgid "'replacement' is invalid in this locale"
 msgstr "'replacemente' non valido in questo locale"
 
-#: src/main/grep.c:1589
+#: src/main/grep.c:1609
 msgid "zero-length pattern"
 msgstr "'pattern' di lunghezza zero"
 
-#: src/main/grep.c:1732 src/main/grep.c:1748 src/main/grep.c:1796
-#: src/main/grep.c:1812 src/main/grep.c:1859 src/main/grep.c:1875
+#: src/main/grep.c:1753 src/main/grep.c:1769 src/main/grep.c:1817
+#: src/main/grep.c:1833 src/main/grep.c:1880 src/main/grep.c:1896
 #, fuzzy
 msgid "result string is too long"
 msgstr "stringa di input troppo lunga"
 
-#: src/main/grep.c:2411
+#: src/main/grep.c:2436
 #, c-format
 msgid "'pcre_fullinfo' returned '%d' "
 msgstr ""
@@ -4089,34 +4165,29 @@ msgstr ""
 msgid "ignoring non-pairlist attributes"
 msgstr ""
 
-#: src/main/internet.c:92
+#: src/main/internet.c:83
 msgid "internet routines cannot be accessed in module"
 msgstr "le routine internet non sono accessibili dal modulo"
 
-#: src/main/internet.c:103 src/main/internet.c:141 src/main/internet.c:154
-#: src/main/internet.c:165 src/main/internet.c:176 src/main/internet.c:187
-#: src/main/internet.c:196 src/main/internet.c:207 src/main/internet.c:218
-#: src/main/internet.c:227 src/main/internet.c:237
+#: src/main/internet.c:94 src/main/internet.c:106 src/main/internet.c:119
+#: src/main/internet.c:130 src/main/internet.c:141 src/main/internet.c:152
+#: src/main/internet.c:161 src/main/internet.c:172 src/main/internet.c:183
+#: src/main/internet.c:192 src/main/internet.c:202 src/main/internet.c:318
+#: src/main/internet.c:330 src/main/internet.c:342 src/main/internet.c:354
 msgid "internet routines cannot be loaded"
 msgstr "le routine internet non possono essere caricate"
 
-#: src/main/internet.c:118 src/main/memory.c:3434 src/main/memory.c:3444
-#: src/main/memory.c:3456 src/main/memory.c:3470 src/main/memory.c:3487
-#: src/main/memory.c:3505
-msgid "bad value"
-msgstr "valore sbagliato"
-
-#: src/main/internet.c:124
-#, fuzzy
-msgid "internet routines were already initialized"
-msgstr "le routine internet non possono essere caricate"
-
-#: src/main/internet.c:251 src/main/internet.c:265 src/main/internet.c:281
-#: src/main/internet.c:293 src/main/internet.c:307 src/main/internet.c:327
-#: src/main/internet.c:340
+#: src/main/internet.c:216 src/main/internet.c:230 src/main/internet.c:247
+#: src/main/internet.c:259 src/main/internet.c:273 src/main/internet.c:293
+#: src/main/internet.c:306
 msgid "socket routines cannot be loaded"
 msgstr "le routine socket non possono essere caricate"
 
+#: src/main/internet.c:242
+#, fuzzy
+msgid "attempt to close invalid socket"
+msgstr "tentativo di impostare un attributo 'comment' non ammissibile"
+
 #: src/main/lapack.c:39
 #, fuzzy
 msgid "LAPACK routines cannot be accessed in module"
@@ -4127,43 +4198,39 @@ msgstr "Non è possibile accedere alle funzioni del modulo X11"
 msgid "LAPACK routines cannot be loaded"
 msgstr "le routine socket non possono essere caricate"
 
-#: src/main/logic.c:70
-msgid "binary operations require two arguments"
-msgstr "operazioni binarie richiedono due argomenti"
-
-#: src/main/logic.c:88 src/main/logic.c:150
+#: src/main/logic.c:80 src/main/logic.c:142
 #, fuzzy
 msgid "operations are possible only for numeric, logical or complex types"
 msgstr "le operazioni sono possibli solo per oggetti di tipo numeric o logical"
 
-#: src/main/logic.c:98
+#: src/main/logic.c:90
 msgid "binary operation on non-conformable arrays"
 msgstr "operazione binaria su array non conformi"
 
-#: src/main/logic.c:124 src/main/relop.c:247
+#: src/main/logic.c:116 src/main/relop.c:241
 msgid "non-conformable time series"
 msgstr "serie storiche non compatibili"
 
-#: src/main/logic.c:254
+#: src/main/logic.c:247
 #, c-format
 msgid "'%s' operator requires 2 arguments"
 msgstr "l'operatore '%s' richiede due argomenti"
 
-#: src/main/logic.c:261
+#: src/main/logic.c:254
 #, c-format
 msgid "invalid 'x' type in 'x %s y'"
 msgstr "'x' non valido in 'x %s y'"
 
-#: src/main/logic.c:268
+#: src/main/logic.c:261
 #, c-format
 msgid "invalid 'y' type in 'x %s y'"
 msgstr "tipo 'y' non valido in 'x %s y'"
 
-#: src/main/logic.c:341
+#: src/main/logic.c:334
 msgid "Unary operator `!' called with two arguments"
 msgstr "l'operatore `!' è stato usato con due argomenti"
 
-#: src/main/logic.c:448
+#: src/main/logic.c:439
 #, c-format
 msgid "coercing argument of type '%s' to logical"
 msgstr ""
@@ -4172,65 +4239,79 @@ msgstr ""
 msgid "dummy - do not translate"
 msgstr ""
 
-#: src/main/main.c:476
+#: src/main/main.c:329
+#, fuzzy
+msgid "error during cleanup\n"
+msgstr "Errore durante wrapup: "
+
+#: src/main/main.c:336
+msgid "Execution halted\n"
+msgstr "Esecuzione interrotta\n"
+
+#: src/main/main.c:505
 #, fuzzy
 msgid "Error: segfault from C stack overflow\n"
 msgstr "overflow dello stack interi"
 
-#: src/main/main.c:846
+#: src/main/main.c:888
 msgid "unable to open the base package\n"
 msgstr "impossibile aprire pacchetto base\n"
 
-#: src/main/main.c:924
+#: src/main/main.c:971
 #, fuzzy, c-format
 msgid "unable to restore saved data in %s\n"
 msgstr "impossibile ripristinare i dati registrati in .RData\n"
 
-#: src/main/main.c:971
+#: src/main/main.c:1020
 msgid "During startup - "
 msgstr "Durante l'avvio - "
 
-#: src/main/main.c:1224
+#: src/main/main.c:1036
+#, fuzzy
+msgid "unable to initialize the JIT\n"
+msgstr "impossibile aprire file in lettura"
+
+#: src/main/main.c:1290
 msgid "cannot quit from browser"
 msgstr "non posso uscire dal browser"
 
-#: src/main/main.c:1228
+#: src/main/main.c:1294
 msgid "one of \"yes\", \"no\", \"ask\" or \"default\" expected."
 msgstr "si ci aspetta una tra \"yes\", \"no\", \"ask\" o \"default\"."
 
-#: src/main/main.c:1233
+#: src/main/main.c:1299
 msgid "save=\"ask\" in non-interactive use: command-line default will be used"
 msgstr ""
 "save=\"ask\" in modalità non interattiva: viene usata la linea di comando di "
 "default"
 
-#: src/main/main.c:1241
+#: src/main/main.c:1307
 msgid "unrecognized value of 'save'"
 msgstr "valore sconosciuto di 'save'"
 
-#: src/main/main.c:1244
+#: src/main/main.c:1310
 msgid "invalid 'status', 0 assumed"
 msgstr "valore 'status' non valido, uso 0"
 
-#: src/main/main.c:1249
+#: src/main/main.c:1315
 msgid "invalid 'runLast', FALSE assumed"
 msgstr "argomento 'runLast' non valido, uso FALSE"
 
-#: src/main/main.c:1280
+#: src/main/main.c:1346
 msgid "cannot allocate space for toplevel callback element"
 msgstr ""
 "non posso allocare spazio per l'elemento di callback di livello superiore"
 
-#: src/main/main.c:1358
+#: src/main/main.c:1424
 msgid "negative index passed to R_removeTaskCallbackByIndex"
 msgstr "indice negativo passato a R_removeTaskCallbackByIndex"
 
-#: src/main/main.c:1468
+#: src/main/main.c:1534
 #, c-format
 msgid "warning messages from top-level task callback '%s'\n"
 msgstr "messaggio di avviso dal processo callback di livello superiore '%s'\n"
 
-#: src/main/main.c:1524
+#: src/main/main.c:1591
 msgid "top-level task callback did not return a logical value"
 msgstr ""
 "il processo callback di livello superiore restituisce un valore non logico"
@@ -4252,345 +4333,335 @@ msgstr ""
 msgid "invalid partial string match"
 msgstr "match stringa parziale non valido"
 
-#: src/main/match.c:228 src/main/match.c:268 src/main/objects.c:56
-#: src/main/objects.c:66
+#: src/main/match.c:228 src/main/match.c:266 src/main/objects.c:49
+#: src/main/objects.c:59
 #, c-format
 msgid "formal argument \"%s\" matched by multiple actual arguments"
 msgstr "l'argumento formale \"%s\" è associato a diversi argomenti passati"
 
-#: src/main/match.c:231 src/main/match.c:266
+#: src/main/match.c:231 src/main/match.c:264
 #, c-format
 msgid "argument %d matches multiple formal arguments"
 msgstr "l'argomento %d si associa a più argomenti formali"
 
-#: src/main/match.c:272
+#: src/main/match.c:270
 #, c-format
 msgid "partial argument match of '%s' to '%s'"
 msgstr ""
 
-#: src/main/match.c:383
+#: src/main/match.c:380
 #, fuzzy, c-format
 msgid "unused argument %s"
 msgid_plural "unused arguments %s"
 msgstr[0] "argomento(i) non usato (%s ...)"
 msgstr[1] "argomento(i) non usato (%s ...)"
 
-#: src/main/memory.c:1232
+#: src/main/memory.c:1234
 msgid "can only weakly reference/finalize reference objects"
 msgstr "posso solo creare un riferimento debole agli oggetti di tipo reference"
 
-#: src/main/memory.c:1266
+#: src/main/memory.c:1268
 msgid "finalizer must be a function or NULL"
 msgstr "il 'finalizer' deve essere una funzione o NULL"
 
-#: src/main/memory.c:1322 src/main/memory.c:1330 src/main/memory.c:1341
+#: src/main/memory.c:1324 src/main/memory.c:1332 src/main/memory.c:1343
 msgid "not a weak reference"
 msgstr "non è un riferimento debole"
 
-#: src/main/memory.c:1472
+#: src/main/memory.c:1474
 msgid "first argument must be environment or external pointer"
 msgstr "il primo argomento deve essere un environment o un puntatore esterno"
 
-#: src/main/memory.c:1474
+#: src/main/memory.c:1476
 msgid "second argument must be a function"
 msgstr "il secondo argomento deve essere una funzione"
 
-#: src/main/memory.c:1478
+#: src/main/memory.c:1480
 #, fuzzy
 msgid "third argument must be 'TRUE' or 'FALSE'"
 msgstr "l'argomento 'mutiple' deve essere TRUE o FALSE"
 
-#: src/main/memory.c:1970
+#: src/main/memory.c:1979
 msgid "vector memory exhausted (limit reached?)"
 msgstr "memoria 'vector' esaurita (raggiunto il limite?)"
 
-#: src/main/memory.c:1976
+#: src/main/memory.c:1985
 msgid "cons memory exhausted (limit reached?)"
 msgstr "memoria 'cons' esaurita (raggiunto il limite?)"
 
-#: src/main/memory.c:1981
+#: src/main/memory.c:1990
 #, fuzzy
 msgid "memory exhausted (limit reached?)"
 msgstr "memoria 'cons' esaurita (raggiunto il limite?)"
 
-#: src/main/memory.c:2116
+#: src/main/memory.c:2126
 #, fuzzy, c-format
 msgid "cannot allocate memory block of size %0.f Tb"
 msgstr "non posso allocare un blocco di memoria di dimensione %.0f"
 
-#: src/main/memory.c:2121
+#: src/main/memory.c:2131
 #, fuzzy, c-format
 msgid "cannot allocate memory block of size %0.1f Gb"
 msgstr "non posso allocare un blocco di memoria di dimensione %.0f"
 
-#: src/main/memory.c:2442
+#: src/main/memory.c:2458
 #, fuzzy
 msgid "vector is too large"
 msgstr "dimensione troppo grande per il vettore indicato"
 
-#: src/main/memory.c:2445
+#: src/main/memory.c:2461
 msgid "negative length vectors are not allowed"
 msgstr "vettori di lunghezza negativa non ammessi"
 
-#: src/main/memory.c:2471 src/main/memory.c:2484 src/main/memory.c:2497
-#: src/main/memory.c:2512
+#: src/main/memory.c:2487 src/main/memory.c:2500 src/main/memory.c:2513
+#: src/main/memory.c:2528
 #, c-format
 msgid "cannot allocate vector of length %d"
 msgstr "non è possibile allocare un vettore di lunghezza %d"
 
-#: src/main/memory.c:2533
+#: src/main/memory.c:2549
 #, fuzzy, c-format
 msgid "invalid type/length (%s/%d) in vector allocation"
 msgstr "tipo/lunghezza non valida (%d/%d) in allocazione di vettore"
 
-#: src/main/memory.c:2636
+#: src/main/memory.c:2648
 #, fuzzy, c-format
 msgid "cannot allocate vector of size %0.1f Gb"
 msgstr "non posso allocare un vettore di dimensione %lu Kb"
 
-#: src/main/memory.c:2640
+#: src/main/memory.c:2652
 #, fuzzy, c-format
 msgid "cannot allocate vector of size %0.1f Mb"
 msgstr "non posso allocare un vettore di dimensione %lu Kb"
 
-#: src/main/memory.c:2644
+#: src/main/memory.c:2656
 #, fuzzy, c-format
 msgid "cannot allocate vector of size %0.f Kb"
 msgstr "non posso allocare un vettore di dimensione %lu Kb"
 
-#: src/main/memory.c:3001
+#: src/main/memory.c:3071
 msgid "protect(): protection stack overflow"
 msgstr "protect(): overflow dello stack di protezione"
 
-#: src/main/memory.c:3008
+#: src/main/memory.c:3078
 #, c-format
-msgid "unprotect(): only %d protected items"
-msgstr ""
+msgid "unprotect(): only %d protected item"
+msgid_plural "unprotect(): only %d protected items"
+msgstr[0] ""
+msgstr[1] ""
 
-#: src/main/memory.c:3041
+#: src/main/memory.c:3113
 msgid "unprotect_ptr: pointer not found"
 msgstr "unprotect_ptr: puntatore non trovato"
 
-#: src/main/memory.c:3079
+#: src/main/memory.c:3151
 #, c-format
-msgid "R_Reprotect: only %d protected items, can't reprotect index %d"
-msgstr ""
+msgid "R_Reprotect: only %d protected item, can't reprotect index %d"
+msgid_plural "R_Reprotect: only %d protected items, can't reprotect index %d"
+msgstr[0] ""
+msgstr[1] ""
 
-#: src/main/memory.c:3129
+#: src/main/memory.c:3203
 #, fuzzy, c-format
 msgid "'Calloc' could not allocate memory (%.0f of %u bytes)"
 msgstr "Calloc non può allocare memoria (%d di %d)"
 
-#: src/main/memory.c:3140
+#: src/main/memory.c:3214
 #, fuzzy, c-format
 msgid "'Realloc' could not re-allocate memory (%.0f bytes)"
 msgstr "Realloc non può riallocare memoria (dimensione %d)"
 
-#: src/main/memory.c:3380
+#: src/main/memory.c:3460
 msgid "not safe to return vector pointer"
 msgstr "non è sicuro restituire puntatori vettoriali"
 
-#: src/main/memory.c:3392
+#: src/main/memory.c:3471
 #, c-format
 msgid "attempt to set index %lu/%lu in SET_STRING_ELT"
 msgstr ""
 
-#: src/main/memory.c:3408
+#: src/main/memory.c:3487
 #, c-format
 msgid "attempt to set index %lu/%lu in SET_VECTOR_ELT"
 msgstr ""
 
-#: src/main/memory.c:3658
+#: src/main/memory.c:3514 src/main/memory.c:3524 src/main/memory.c:3536
+#: src/main/memory.c:3550 src/main/memory.c:3565 src/main/memory.c:3583
+msgid "bad value"
+msgstr "valore sbagliato"
+
+#: src/main/memory.c:3746
 #, fuzzy
 msgid "memory profiling is not available on this system"
 msgstr "Il profiling di R non è disponibile su questo sistema"
 
-#: src/main/memory.c:3723
+#: src/main/memory.c:3810
 #, fuzzy, c-format
 msgid "Rprofmem: cannot open output file '%s'"
 msgstr "Rprof: non posso aprire il file di profile '%s'"
 
-#: src/main/memory.c:3830
+#: src/main/memory.c:3915
 #, c-format
 msgid "long vectors not supported yet: %s:%d"
 msgstr ""
 
-#: src/main/names.c:996
+#: src/main/names.c:1021
 msgid "string argument required"
 msgstr "necessario argomento stringa"
 
-#: src/main/names.c:999
+#: src/main/names.c:1024
 msgid "no such primitive function"
 msgstr "funzione primitiva non esistente"
 
-#: src/main/names.c:1146
+#: src/main/names.c:1212 src/main/names.c:1242
 msgid "attempt to use zero-length variable name"
 msgstr "tentativo di utilizzo di un nome variabile di lunghezza zero"
 
-#: src/main/names.c:1148
+#: src/main/names.c:1214 src/main/names.c:1244
 #, c-format
 msgid "variable names are limited to %d bytes"
 msgstr ""
 
-#: src/main/names.c:1176 src/main/names.c:1179
+#: src/main/names.c:1307 src/main/names.c:1310
 msgid "invalid .Internal() argument"
 msgstr "argomento .Internal() non valido"
 
-#: src/main/objects.c:46
+#: src/main/objects.c:39
 msgid "generic 'function' is not a function"
 msgstr "la 'function' generica non è una funzione"
 
-#: src/main/objects.c:201
+#: src/main/objects.c:193
 msgid "bad generic call environment"
 msgstr "chiamata generica environment errata"
 
-#: src/main/objects.c:207
+#: src/main/objects.c:201
 msgid "bad generic definition environment"
 msgstr "definizione generica environment errata"
 
-#: src/main/objects.c:246
+#: src/main/objects.c:249
 msgid ""
 "no '.S3MethodsClass' table, cannot use S4 objects with S3 methods ('methods' "
 "package not attached?)"
 msgstr ""
 
-#: src/main/objects.c:270 src/main/objects.c:411
-msgid "'UseMethod' used in an inappropriate fashion"
-msgstr "'UseMethod' usata in modo non appropriato"
-
-#: src/main/objects.c:290
-#, fuzzy
-msgid "invalid generic function in 'usemethod'"
-msgstr "funzione generica non valida per 'usemethod'"
-
-#: src/main/objects.c:399
+#: src/main/objects.c:415
 #, fuzzy
 msgid "there must be a 'generic' argument"
 msgstr "deve esserci un primo argomento"
 
-#: src/main/objects.c:403
+#: src/main/objects.c:419
 #, fuzzy
 msgid "'generic' argument must be a character string"
 msgstr "il secondo argomento deve essere una stringa di tipo character"
 
-#: src/main/objects.c:440
-#, fuzzy
-msgid "'UseMethod' called from outside a function"
-msgstr "'NextMethod' chiamato al di fuori di una chiusura"
-
-#: src/main/objects.c:447
-msgid "first argument must be a generic name"
-msgstr "il primo argomento deve essere un nome generico"
+#: src/main/objects.c:427
+msgid "'UseMethod' used in an inappropriate fashion"
+msgstr "'UseMethod' usata in modo non appropriato"
 
 #: src/main/objects.c:472
 #, fuzzy, c-format
 msgid "no applicable method for '%s' applied to an object of class \"%s\""
 msgstr "nessun metodo applicabile per \"%s\""
 
-#: src/main/objects.c:533
+#: src/main/objects.c:582
 msgid "'NextMethod' called from outside a function"
 msgstr "'NextMethod' chiamato al di fuori di una chiusura"
 
-#: src/main/objects.c:539
+#: src/main/objects.c:588
 msgid "'NextMethod' called from an anonymous function"
 msgstr "'NextMethod' chiamato da una funzione anonima"
 
-#: src/main/objects.c:563
+#: src/main/objects.c:609
 msgid "no calling generic was found: was a method called directly?"
 msgstr "nessuna chiamata generica: il metodo è stato chiamato direttamente?"
 
-#: src/main/objects.c:566
+#: src/main/objects.c:612
 #, c-format
 msgid "'function' is not a function, but of type %d"
 msgstr "'function' non è una funzione, ma di tipo %d"
 
-#: src/main/objects.c:640
+#: src/main/objects.c:639
 msgid "wrong argument ..."
 msgstr "argomento sbagliato ..."
 
-#: src/main/objects.c:653
+#: src/main/objects.c:651
 msgid "object not specified"
 msgstr "oggetto non specificato"
 
-#: src/main/objects.c:663 src/main/objects.c:670
+#: src/main/objects.c:659 src/main/objects.c:666
 msgid "generic function not specified"
 msgstr "funzione generica non specificata"
 
-#: src/main/objects.c:667
+#: src/main/objects.c:663
 #, fuzzy
 msgid "invalid generic argument to 'NextMethod'"
 msgstr "argomento genrico non valido in NextMethod"
 
-#: src/main/objects.c:680
+#: src/main/objects.c:675
 #, fuzzy
 msgid "invalid 'group' argument found in 'NextMethod'"
 msgstr "argomento 'group' non valido in NextMethod"
 
-#: src/main/objects.c:699
+#: src/main/objects.c:692
 msgid "wrong value for .Method"
 msgstr "valore non valido per .Method"
 
-#: src/main/objects.c:703 src/main/objects.c:712
-#, c-format
-msgid "method name too long in '%s'"
-msgstr "nome metodo troppo lungo in '%s'"
-
-#: src/main/objects.c:715
+#: src/main/objects.c:702
 msgid "Incompatible methods ignored"
 msgstr "metodi incompatibili ignorati"
 
-#: src/main/objects.c:775 src/main/objects.c:780
+#: src/main/objects.c:759 src/main/objects.c:766
 msgid "no method to invoke"
 msgstr "nessun metodo da invocare"
 
-#: src/main/objects.c:832
+#: src/main/objects.c:817
 msgid "cannot unclass an environment"
 msgstr "non posso applicare 'unclass' a un environment"
 
-#: src/main/objects.c:835
+#: src/main/objects.c:820
 msgid "cannot unclass an external pointer"
 msgstr "non posso de-classificare un puntatore esterno"
 
-#: src/main/objects.c:872
+#: src/main/objects.c:856
 msgid "'what' must be a character vector"
 msgstr "'what' deve essere un vettore di tipo character"
 
-#: src/main/objects.c:876
+#: src/main/objects.c:860
 msgid "'which' must be a length 1 logical vector"
 msgstr "'which' deve essere un vettore logico di lunghezza 1"
 
-#: src/main/objects.c:882
+#: src/main/objects.c:866
 msgid "use 'is()' instead of 'inherits()' on S4 objects"
 msgstr ""
 
-#: src/main/objects.c:1012
+#: src/main/objects.c:995
 msgid "could not find correct environment; please report!"
 msgstr ""
 
-#: src/main/objects.c:1052
+#: src/main/objects.c:1039
 #, fuzzy
 msgid "'onOff' must be TRUE or FALSE"
 msgstr "'all.x' deve essere TRUE o FALSE"
 
-#: src/main/objects.c:1119
+#: src/main/objects.c:1104
 #, c-format
 msgid "unable to find a non-generic version of function \"%s\""
 msgstr "non riesco a trovare una versione generica della funzione \"%s\""
 
-#: src/main/objects.c:1151
+#: src/main/objects.c:1136
 #, fuzzy
 msgid ""
 "'standardGeneric' called without 'methods' dispatch enabled (will be ignored)"
 msgstr "standardGeneric chiamato senza un dispatch abilitato (sarà ignorato)"
 
-#: src/main/objects.c:1160
+#: src/main/objects.c:1145
 #, fuzzy
 msgid "argument to 'standardGeneric' must be a non-empty character string"
 msgstr ""
 "l'argomento di standardGeneric deve essere una stringa di tipo character non "
 "vuota"
 
-#: src/main/objects.c:1165
+#: src/main/objects.c:1150
 #, c-format
 msgid ""
 "call to standardGeneric(\"%s\") apparently not from the body of that generic "
@@ -4599,11 +4670,7 @@ msgstr ""
 "chiamata di standardGeneric(\"%s\") apparentemente al di fuori del corpo di "
 "quella funzione generica"
 
-#: src/main/objects.c:1189
-msgid "argument 'code' must be a character string"
-msgstr "l'argomento 'code' deve essere una stringa di tipo character"
-
-#: src/main/objects.c:1257
+#: src/main/objects.c:1249
 #, c-format
 msgid ""
 "invalid primitive methods code (\"%s\"): should be \"clear\", \"reset\", "
@@ -4612,11 +4679,11 @@ msgstr ""
 "codice metodo primitiva (\"%s\") non valido : dovrebbe essere \"clear\", "
 "\"reset\", \"set\", o \"suppress\""
 
-#: src/main/objects.c:1265
+#: src/main/objects.c:1257
 msgid "invalid object: must be a primitive function"
 msgstr "oggetto non valido: deve essere una funzione primitiva"
 
-#: src/main/objects.c:1312
+#: src/main/objects.c:1304
 #, c-format
 msgid ""
 "the formal definition of a primitive generic must be a function object (got "
@@ -4625,20 +4692,20 @@ msgstr ""
 "la definzione formale di una primitiva generica deve essere un oggetto "
 "funzione invece è di tipo '%s')"
 
-#: src/main/objects.c:1342
+#: src/main/objects.c:1334
 #, c-format
 msgid "object returned as generic function \"%s\" does not appear to be one"
 msgstr ""
 
-#: src/main/objects.c:1444
+#: src/main/objects.c:1439
 msgid "invalid primitive operation given for dispatch"
 msgstr "operazione primitiva non valida fornita per il dispatch"
 
-#: src/main/objects.c:1470 src/main/objects.c:1489
+#: src/main/objects.c:1468 src/main/objects.c:1487
 msgid "dispatch error"
 msgstr "errore nel dispatch"
 
-#: src/main/objects.c:1483
+#: src/main/objects.c:1481
 #, c-format
 msgid ""
 "primitive function \"%s\" has been set for methods but no generic function "
@@ -4647,85 +4714,95 @@ msgstr ""
 "è stata impostata la funzione primitiva \"%s\" per i metodi ma non è stata "
 "fornita alcuna funzione generica"
 
-#: src/main/objects.c:1508
+#: src/main/objects.c:1506
 msgid "C level MAKE_CLASS macro called with NULL string pointer"
 msgstr "macro C MAKE_CLASS chiamata passando un puntatore stringa NULL"
 
-#: src/main/objects.c:1524
+#: src/main/objects.c:1522
+#, fuzzy
+msgid "'methods' package not yet loaded"
+msgstr "font Hershey non caricati"
+
+#: src/main/objects.c:1532
 #, fuzzy
 msgid "R_getClassDef(.) called with NULL string pointer"
 msgstr "macro C MAKE_CLASS chiamata passando un puntatore stringa NULL"
 
-#: src/main/objects.c:1546
+#: src/main/objects.c:1577
 msgid "C level NEW macro called with null class definition pointer"
 msgstr "macro C NEW chiamata con puntatore definizione di classe null"
 
-#: src/main/objects.c:1550
+#: src/main/objects.c:1581
 #, fuzzy, c-format
 msgid "trying to generate an object from a virtual class (\"%s\")"
 msgstr ""
 "provo a generare un oggetto in C a partire dalla classe virtuale (\"%s\")"
 
-#: src/main/objects.c:1627
+#: src/main/objects.c:1663
 #, c-format
 msgid "object of class \"%s\" does not correspond to a valid S3 object"
 msgstr ""
 
-#: src/main/options.c:120 src/main/options.c:180
+#: src/main/options.c:121 src/main/options.c:182
 msgid "corrupted options list"
 msgstr ""
 
-#: src/main/options.c:130
+#: src/main/options.c:131
 #, fuzzy
 msgid "invalid printing width, used 80"
 msgstr "match stringa parziale non valido"
 
-#: src/main/options.c:141
+#: src/main/options.c:142
 msgid "invalid printing digits, used 7"
 msgstr ""
 
-#: src/main/options.c:153
+#: src/main/options.c:154
 msgid "invalid 'deparse.cutoff', used 60"
 msgstr ""
 
-#: src/main/options.c:165
+#: src/main/options.c:166
 msgid "invalid value for \"device.ask.default\", using FALSE"
 msgstr ""
 
-#: src/main/options.c:401
+#: src/main/options.c:416
 #, fuzzy
 msgid "list argument has no valid names"
 msgstr "l'argomento non è un modello valido"
 
-#: src/main/options.c:429
+#: src/main/options.c:445
 #, fuzzy, c-format
 msgid "invalid 'width' parameter, allowed %d...%d"
 msgstr "parametro 'trans' non valido"
 
-#: src/main/options.c:440
+#: src/main/options.c:456
 #, fuzzy, c-format
 msgid "invalid 'digits' parameter, allowed %d...%d"
 msgstr "parametro 'trans' non valido"
 
-#: src/main/options.c:447
+#: src/main/options.c:463
 #, c-format
 msgid "'expressions' parameter invalid, allowed %d...%d"
 msgstr ""
 
-#: src/main/options.c:454 src/main/options.c:462 src/main/options.c:468
-#: src/main/options.c:476 src/main/options.c:483 src/main/options.c:488
-#: src/main/options.c:495 src/main/options.c:501 src/main/options.c:507
-#: src/main/options.c:512 src/main/options.c:517 src/main/options.c:526
-#: src/main/options.c:532 src/main/options.c:538 src/main/options.c:549
-#: src/main/options.c:556 src/main/options.c:562 src/main/options.c:570
-#: src/main/options.c:577 src/main/options.c:584 src/main/options.c:591
-#: src/main/options.c:598 src/main/options.c:606 src/main/options.c:615
-#: src/main/options.c:618 src/main/options.c:624
+#: src/main/options.c:470 src/main/options.c:478 src/main/options.c:484
+#: src/main/options.c:492 src/main/options.c:499 src/main/options.c:504
+#: src/main/options.c:511 src/main/options.c:517 src/main/options.c:523
+#: src/main/options.c:528 src/main/options.c:533 src/main/options.c:542
+#: src/main/options.c:548 src/main/options.c:554 src/main/options.c:564
+#: src/main/options.c:578 src/main/options.c:584 src/main/options.c:592
+#: src/main/options.c:599 src/main/options.c:606 src/main/options.c:613
+#: src/main/options.c:620 src/main/options.c:628 src/main/options.c:637
+#: src/main/options.c:640 src/main/options.c:646
 #, fuzzy, c-format
 msgid "invalid value for '%s'"
 msgstr "valore non valido per 'n'"
 
-#: src/main/options.c:611 src/main/options.c:640
+#: src/main/options.c:569
+#, fuzzy
+msgid "'OutDec' must be a string of one character"
+msgstr "'dec' deve un singolo carattere"
+
+#: src/main/options.c:633 src/main/options.c:662
 msgid "\"par.ask.default\" has been replaced by \"device.ask.default\""
 msgstr ""
 
@@ -4746,15 +4823,20 @@ msgstr ""
 msgid "non-string argument to Internal paste"
 msgstr "argomento non-stringa per 'incolla' interna"
 
-#: src/main/paste.c:390
+#: src/main/paste.c:387
 msgid "first argument must be atomic"
 msgstr "il primo argomento deve essere atomico"
 
-#: src/main/paste.c:560
+#: src/main/paste.c:448
+#, fuzzy
+msgid "'decimal.mark' must be a string of one character"
+msgstr "'dec' deve un singolo carattere"
+
+#: src/main/paste.c:579
 msgid "Impossible mode ( x )"
 msgstr "modalità ( x ) impossbile"
 
-#: src/main/paste.c:645
+#: src/main/paste.c:663
 msgid "atomic vector arguments only"
 msgstr "solo argomenti vettoriali"
 
@@ -4762,218 +4844,200 @@ msgstr "solo argomenti vettoriali"
 msgid "invalid filename specification"
 msgstr "specificazione del nome file non valida"
 
-#: src/main/platform.c:375 src/main/platform.c:419
+#: src/main/platform.c:375 src/main/platform.c:420
 msgid "write error during file append"
 msgstr "errore di scrittura durante file append"
 
-#: src/main/platform.c:394
+#: src/main/platform.c:395
 msgid "nothing to append to"
 msgstr "niente da accodare"
 
-#: src/main/platform.c:448 src/main/platform.c:795
+#: src/main/platform.c:449 src/main/platform.c:797 src/main/platform.c:979
 msgid "invalid filename argument"
 msgstr "argomento 'filename' non valido"
 
-#: src/main/platform.c:460
+#: src/main/platform.c:461
 #, fuzzy, c-format
 msgid "cannot create file '%s', reason '%s'"
 msgstr "impossibile creare fifo '%s' perché '%s'"
 
-#: src/main/platform.c:475 src/main/platform.c:545 src/main/platform.c:627
+#: src/main/platform.c:476 src/main/platform.c:546 src/main/platform.c:629
 msgid "invalid first filename"
 msgstr "il nome del primo file non è valido"
 
-#: src/main/platform.c:487
+#: src/main/platform.c:488
 #, fuzzy, c-format
 msgid "cannot remove file '%s', reason '%s'"
 msgstr "impossibile aprire il file '%s' perché '%s'"
 
-#: src/main/platform.c:547 src/main/platform.c:629
+#: src/main/platform.c:548 src/main/platform.c:631
 msgid "invalid second filename"
 msgstr "il nome del secondo file non è valido"
 
-#: src/main/platform.c:549 src/main/platform.c:631
+#: src/main/platform.c:551 src/main/platform.c:634
 msgid "nothing to link"
 msgstr "niente da collegare"
 
-#: src/main/platform.c:559
+#: src/main/platform.c:561
 #, fuzzy
 msgid "symbolic links are not supported on this version of Windows"
 msgstr "symlink non supportati su questa piattaforma"
 
-#: src/main/platform.c:581
+#: src/main/platform.c:583
 #, fuzzy, c-format
 msgid "cannot symlink '%ls' to '%ls', reason '%s'"
 msgstr "impossibile aprire il file '%s' perché '%s'"
 
-#: src/main/platform.c:601
+#: src/main/platform.c:603
 #, fuzzy, c-format
 msgid "cannot symlink '%s' to '%s', reason '%s'"
 msgstr "impossibile aprire il file '%s' perché '%s'"
 
-#: src/main/platform.c:609
+#: src/main/platform.c:611
 #, fuzzy
 msgid "symbolic links are not supported on this platform"
 msgstr "symlink non supportati su questa piattaforma"
 
-#: src/main/platform.c:649
+#: src/main/platform.c:652
 #, fuzzy, c-format
 msgid "cannot link '%ls' to '%ls', reason '%s'"
 msgstr "impossibile aprire il file '%s' perché '%s'"
 
-#: src/main/platform.c:669
+#: src/main/platform.c:672
 #, fuzzy, c-format
 msgid "cannot link '%s' to '%s', reason '%s'"
 msgstr "impossibile aprire il file '%s' perché '%s'"
 
-#: src/main/platform.c:678
+#: src/main/platform.c:681
 #, fuzzy
 msgid "(hard) links are not supported on this platform"
 msgstr "symlink non supportati su questa piattaforma"
 
-#: src/main/platform.c:709
+#: src/main/platform.c:713
 msgid "'from' and 'to' are of different lengths"
 msgstr ""
 
-#: src/main/platform.c:720 src/main/platform.c:730
+#: src/main/platform.c:724 src/main/platform.c:734
 #, fuzzy
 msgid "expanded 'from' name too long"
 msgstr "nome sorgente esteso troppo lungo"
 
-#: src/main/platform.c:724 src/main/platform.c:734
+#: src/main/platform.c:728 src/main/platform.c:738
 #, fuzzy
 msgid "expanded 'to' name too long"
 msgstr "nome sorgente esteso troppo lungo"
 
-#: src/main/platform.c:738
+#: src/main/platform.c:742
 #, fuzzy, c-format
 msgid "cannot rename file '%s' to '%s', reason '%s'"
 msgstr "impossibile creare fifo '%s' perché '%s'"
 
-#: src/main/platform.c:1094
+#: src/main/platform.c:1168
 msgid "invalid 'pattern' regular expression"
 msgstr "espressione regolare 'pattern' non valida"
 
-#: src/main/platform.c:1211
+#: src/main/platform.c:1285
 msgid "unable to determine R home location"
 msgstr "impossibile determinare posizione R home"
 
-#: src/main/platform.c:1263
+#: src/main/platform.c:1338
 msgid "file name too long"
 msgstr "nome del file troppo lungo"
 
-#: src/main/platform.c:1511 src/main/platform.c:1558 src/main/sysutils.c:1850
-#: src/main/sysutils.c:1864
+#: src/main/platform.c:1586 src/main/platform.c:1633 src/main/sysutils.c:1806
+#: src/main/sysutils.c:1820
 msgid "internal out-of-memory condition"
 msgstr ""
 
-#: src/main/platform.c:1554 src/main/sysutils.c:1860
+#: src/main/platform.c:1629 src/main/sysutils.c:1816
 #, fuzzy, c-format
 msgid "read error on '%s'"
 msgstr "errore di lettura"
 
-#: src/main/platform.c:1722
+#: src/main/platform.c:1728
 msgid "setting 'LC_NUMERIC' may cause R to function strangely"
 msgstr "l'impostazione 'LC_NUMERIC' può causare uno strano funzionamento di R"
 
-#: src/main/platform.c:1736
+#: src/main/platform.c:1742
 msgid "LC_MESSAGES exists on Windows but is not operational"
 msgstr ""
 
-#: src/main/platform.c:1763
+#: src/main/platform.c:1769
 #, fuzzy, c-format
 msgid "OS reports request to set locale to \"%s\" cannot be honored"
 msgstr "Il sistema operativo segnala che la richiesta non può essere esaudita"
 
-#: src/main/platform.c:2065
-msgid "'hostname' must be a character vector of length 1"
-msgstr "'hostname' deve essere una stringa di tipo character"
-
-#: src/main/platform.c:2071
-#, c-format
-msgid "nsl() was unable to resolve host '%s'"
-msgstr "nls() non riesce a identificare l'host '%s'"
-
-#: src/main/platform.c:2078
-#, fuzzy
-msgid "unknown format returned by C function 'gethostbyname'"
-msgstr "formato sconosciuto resituito da gethostbyname"
-
-#: src/main/platform.c:2087
-msgid "nsl() is not supported on this platform"
-msgstr "nls() non è supportato in questa piattaforma"
-
-#: src/main/platform.c:2158
+#: src/main/platform.c:2131
 #, c-format
 msgid "'%s' already exists"
 msgstr "'%s' già esistente"
 
-#: src/main/platform.c:2161
+#: src/main/platform.c:2134
 #, fuzzy, c-format
 msgid "cannot create dir '%s', reason '%s'"
 msgstr "impossibile creare fifo '%s' perché '%s'"
 
-#: src/main/platform.c:2207
+#: src/main/platform.c:2181
 #, fuzzy, c-format
 msgid "'%ls' already exists"
 msgstr "'%s' già esistente"
 
-#: src/main/platform.c:2211
+#: src/main/platform.c:2183 src/main/platform.c:2189
 #, fuzzy, c-format
 msgid "cannot create dir '%ls', reason '%s'"
 msgstr "impossibile creare fifo '%s' perché '%s'"
 
-#: src/main/platform.c:2245 src/main/platform.c:2449
+#: src/main/platform.c:2223 src/main/platform.c:2435
 msgid "too deep nesting"
 msgstr ""
 
-#: src/main/platform.c:2253 src/main/platform.c:2266 src/main/platform.c:2284
+#: src/main/platform.c:2231 src/main/platform.c:2244 src/main/platform.c:2262
 #, fuzzy
 msgid "over-long path"
 msgstr "'pattern' di lunghezza zero"
 
-#: src/main/platform.c:2273
+#: src/main/platform.c:2251
 #, fuzzy, c-format
 msgid "problem creating directory %ls: %s"
 msgstr "è sorto un problema nel lanciare l'editor %s"
 
-#: src/main/platform.c:2293
+#: src/main/platform.c:2271
 #, fuzzy, c-format
 msgid "problem reading dir %ls: %s"
 msgstr "è sorto un problema nel lanciare l'editor %s"
 
-#: src/main/platform.c:2304 src/main/platform.c:2465 src/main/platform.c:2478
-#: src/main/platform.c:2498 src/main/platform.c:2520
+#: src/main/platform.c:2282 src/main/platform.c:2451 src/main/platform.c:2464
+#: src/main/platform.c:2484 src/main/platform.c:2506
 #, fuzzy
 msgid "over-long path length"
 msgstr "'pattern' di lunghezza zero"
 
-#: src/main/platform.c:2312
+#: src/main/platform.c:2290
 #, c-format
 msgid "problem copying %ls to %ls: %s"
 msgstr ""
 
-#: src/main/platform.c:2487
+#: src/main/platform.c:2473
 #, fuzzy, c-format
 msgid "problem creating directory %s: %s"
 msgstr "è sorto un problema nel lanciare l'editor %s"
 
-#: src/main/platform.c:2507
+#: src/main/platform.c:2493
 #, fuzzy, c-format
 msgid "problem reading directory %s: %s"
 msgstr "è sorto un problema nel lanciare l'editor %s"
 
-#: src/main/platform.c:2529
+#: src/main/platform.c:2515
 #, c-format
 msgid "problem copying %s to %s: %s"
 msgstr ""
 
-#: src/main/platform.c:2662
+#: src/main/platform.c:2653
 #, fuzzy
 msgid "'mode' must be of length at least one"
 msgstr "'hadj' deve essere di lunghezza 1"
 
-#: src/main/platform.c:2729
+#: src/main/platform.c:2720
 #, fuzzy
 msgid "insufficient OS support on this platform"
 msgstr "nls() non è supportato in questa piattaforma"
@@ -4996,102 +5060,107 @@ msgstr "tutti i valori di z sono NA"
 msgid "invalid math style encountered"
 msgstr "numero asse %d non valido"
 
-#: src/main/plotmath.c:1261 src/main/plotmath.c:1366 src/main/plotmath.c:2664
+#: src/main/plotmath.c:1260 src/main/plotmath.c:1365 src/main/plotmath.c:2654
 #, fuzzy
 msgid "invalid mathematical annotation"
 msgstr "funzione interna non valida"
 
-#: src/main/plotmath.c:1670
+#: src/main/plotmath.c:1669
 #, fuzzy
 msgid "invalid accent"
 msgstr "argomento non valido"
 
-#: src/main/plotmath.c:1964
+#: src/main/plotmath.c:1963
 #, fuzzy
 msgid "invalid group delimiter"
 msgstr "limiti 'x' non validi"
 
-#: src/main/plotmath.c:1991 src/main/plotmath.c:2137
+#: src/main/plotmath.c:1990 src/main/plotmath.c:2127
 #, fuzzy
 msgid "invalid group specification"
 msgstr "specificazione font non valida"
 
-#: src/main/plotmath.c:2062
+#: src/main/plotmath.c:2052
 #, fuzzy
 msgid "group is incomplete"
 msgstr "Aggiornamento del grafico incompleto"
 
-#: src/main/plotmath.c:3190
+#: src/main/plotmath.c:3180
 #, fuzzy
 msgid "Metric information not available for this family/device"
 msgstr "'truncation' non disponibile per questa connessione"
 
-#: src/main/print.c:148 src/main/print.c:254
+#: src/main/print.c:140 src/main/print.c:247
 msgid "invalid 'na.print' specification"
 msgstr "psecificazione di 'na.print' non valida"
 
-#: src/main/print.c:157
+#: src/main/print.c:149
 msgid "invalid row labels"
 msgstr "etichette di riga non valide"
 
-#: src/main/print.c:159
+#: src/main/print.c:151
 msgid "invalid column labels"
 msgstr "etichette di colonna non valide"
 
-#: src/main/print.c:183
+#: src/main/print.c:176
 #, fuzzy
 msgid "non-function argument to .Internal(print.function(.))"
 msgstr "argomento non-stringa per 'incolla' interna"
 
-#: src/main/print.c:264
+#: src/main/print.c:257
 msgid "'gap' must be non-negative integer"
 msgstr "'gap' deve essere un intero non negativo"
 
-#: src/main/print.c:289
+#: src/main/print.c:282
 msgid "invalid 'tryS4' internal argument"
 msgstr "argomento interno 'tryS4' non valido"
 
-#: src/main/print.c:1028
+#: src/main/print.c:851
+#, fuzzy
+msgid "print buffer overflow"
+msgstr "overflow buffer di input"
+
+#: src/main/print.c:1043
 #, fuzzy
 msgid "invalid character length in 'dblepr'"
 msgstr "lunghezza carattere non valida in dblepr"
 
-#: src/main/print.c:1046
+#: src/main/print.c:1061
 #, fuzzy
 msgid "invalid character length in 'intpr'"
 msgstr "lunghezza carattere non valida in intpr"
 
-#: src/main/print.c:1065
+#: src/main/print.c:1080
 #, fuzzy
 msgid "invalid character length in 'realpr'"
 msgstr "lnghezza carattere non valida in realpr"
 
-#: src/main/print.c:1075
+#: src/main/print.c:1090
 #, fuzzy
 msgid "memory allocation error in 'realpr'"
 msgstr "errore di allocazione della memoria in realpr"
 
-#: src/main/print.c:1091
+#: src/main/print.c:1106
 #, c-format
 msgid "BLAS/LAPACK routine '%6s' gave error code %d"
 msgstr "la routine BLAS/LAPACK '%6s' ha restituito un codice errore %d"
 
-#: src/main/printarray.c:453
+#: src/main/printarray.c:332
 msgid "too few row labels"
 msgstr "etichette di riga insufficienti"
 
-#: src/main/printarray.c:455
+#: src/main/printarray.c:334
 msgid "too few column labels"
 msgstr "etichette di colonna insufficienti"
 
-#: src/main/printarray.c:489
+#: src/main/printarray.c:368
 #, c-format
 msgid " [ reached getOption(\"max.print\") -- omitted %d row ]\n"
 msgid_plural " [ reached getOption(\"max.print\") -- omitted %d rows ]\n"
 msgstr[0] ""
 msgstr[1] ""
 
-#: src/main/printutils.c:613
+#: src/main/printutils.c:710
 #, fuzzy
 msgid "it is not known that wchar_t is Unicode on this platform"
 msgstr "nls() non è supportato in questa piattaforma"
@@ -5100,49 +5169,50 @@ msgstr "nls() non è supportato in questa piattaforma"
 msgid "argument is not a numeric vector"
 msgstr "l'argomento non è un vettore di tipo numeric"
 
-#: src/main/random.c:37
+#: src/main/random.c:39
 msgid "invalid arguments"
 msgstr "argomenti non validi"
 
-#: src/main/random.c:93 src/main/random.c:110 src/main/random.c:175
-#: src/main/random.c:201 src/main/random.c:274 src/main/random.c:288
+#: src/main/random.c:95 src/main/random.c:112 src/main/random.c:178
+#: src/main/random.c:204 src/main/random.c:277 src/main/random.c:291
 msgid "NAs produced"
 msgstr "generati NA"
 
-#: src/main/random.c:445
+#: src/main/random.c:438
 msgid "NA in probability vector"
 msgstr "valori NA in un vettore di probabilità"
 
-#: src/main/random.c:447
-msgid "non-positive probability"
+#: src/main/random.c:440
+#, fuzzy
+msgid "negative probability"
 msgstr "probabilità non positiva"
 
-#: src/main/random.c:454
+#: src/main/random.c:447
 msgid "too few positive probabilities"
 msgstr "troppe poche probabilità positive"
 
-#: src/main/random.c:491 src/main/random.c:519
+#: src/main/random.c:483 src/main/random.c:511
 #, fuzzy
 msgid "cannot take a sample larger than the population when 'replace = FALSE'"
 msgstr ""
 "non posso estrarre un campione più grande dellapopolazione se 'replace = "
 "FALSE'"
 
-#: src/main/random.c:498
+#: src/main/random.c:490
 msgid "incorrect number of probabilities"
 msgstr "numero di probaibilità non corretto"
 
-#: src/main/random.c:537
+#: src/main/random.c:529
 #, fuzzy
 msgid "n >= 2^31, replace = FALSE is only supported on 64-bit platforms"
 msgstr "'recursive = TRUE' non è supportato su questa piattaforma"
 
-#: src/main/raw.c:37 src/main/raw.c:273
+#: src/main/raw.c:37 src/main/raw.c:277
 #, fuzzy
 msgid "argument must be a character vector of length 1"
 msgstr "'hostname' deve essere una stringa di tipo character"
 
-#: src/main/raw.c:39 src/main/raw.c:275
+#: src/main/raw.c:39 src/main/raw.c:279
 #, fuzzy
 msgid ""
 "argument should be a character vector of length 1\n"
@@ -5150,146 +5220,143 @@ msgid ""
 msgstr ""
 "la condizione la lunghezza > 1 e solo il promo elemento verrà utilizzato"
 
-#: src/main/raw.c:53 src/main/raw.c:89 src/main/raw.c:110
+#: src/main/raw.c:53 src/main/raw.c:90 src/main/raw.c:113
 #, fuzzy
 msgid "argument 'x' must be a raw vector"
 msgstr "il primo argomento deve essere un vettore"
 
-#: src/main/raw.c:56 src/main/raw.c:330
+#: src/main/raw.c:56 src/main/raw.c:336
 #, fuzzy
 msgid "argument 'multiple' must be TRUE or FALSE"
 msgstr "'decreasing' deve essere TRUE o FALSE"
 
-#: src/main/raw.c:91
+#: src/main/raw.c:92
 #, fuzzy
 msgid "argument 'shift' must be a small integer"
 msgstr "l'argomento 'size' deve essere un intero positivo"
 
-#: src/main/raw.c:129 src/main/raw.c:327
+#: src/main/raw.c:133 src/main/raw.c:333
 #, fuzzy
 msgid "argument 'x' must be an integer vector"
 msgstr "il primo argomento deve essere una vettore character"
 
-#: src/main/raw.c:148
+#: src/main/raw.c:153
 #, fuzzy
 msgid "argument 'x' must be raw, integer or logical"
 msgstr "l'argomento di 'logarithm' deve essere logico"
 
-#: src/main/raw.c:150
-#, fuzzy
-msgid "argument 'type' must be a character string"
-msgstr "l'argomento 'code' deve essere una stringa di tipo character"
-
-#: src/main/raw.c:154
+#: src/main/raw.c:159
 #, fuzzy, c-format
 msgid "argument 'x' must be a multiple of %d long"
 msgstr "il secondo argomento deve essere una funzione"
 
-#: src/main/raw.c:167 src/main/raw.c:181
+#: src/main/raw.c:172 src/main/raw.c:186
 #, fuzzy
 msgid "argument 'x' must not contain NAs"
 msgstr "il secondo argomento deve essere una funzione"
 
-#: src/main/raw.c:285
+#: src/main/raw.c:291
 #, fuzzy
 msgid "invalid UTF-8 string"
 msgstr "stringa multibyte non valido in 'old'"
 
-#: src/main/relop.c:202
+#: src/main/relop.c:196
 #, c-format
 msgid "comparison (%d) is possible only for atomic and list types"
 msgstr "confronto (%d) possibile solo per dati atomic o list"
 
-#: src/main/relop.c:207
+#: src/main/relop.c:201
 msgid "comparison is not allowed for expressions"
 msgstr "confronto tra espressioni non permesso"
 
-#: src/main/relop.c:296
+#: src/main/relop.c:293
 msgid "comparison of these types is not implemented"
 msgstr "confronto tra questi tipi non implementato"
 
-#: src/main/relop.c:509
+#: src/main/relop.c:425
 msgid "invalid comparison with complex values"
 msgstr "confronto tra valori complessi non ammissibile"
 
-#: src/main/relop.c:767
+#: src/main/relop.c:683
 #, fuzzy
 msgid "'a' and 'b' must have the same type"
 msgstr "'path' deve essere un vettore di tipo character"
 
-#: src/main/saveload.c:200 src/main/saveload.c:205 src/main/saveload.c:214
-#: src/main/saveload.c:223 src/main/saveload.c:232 src/main/saveload.c:241
-#: src/main/saveload.c:245 src/main/saveload.c:254 src/main/saveload.c:1381
-#: src/main/saveload.c:1386 src/main/saveload.c:1430 src/main/saveload.c:1498
-#: src/main/saveload.c:1507 src/main/serialize.c:331 src/main/serialize.c:338
-#: src/main/serialize.c:2388 src/main/serialize.c:2396
+#: src/main/saveload.c:202 src/main/saveload.c:207 src/main/saveload.c:216
+#: src/main/saveload.c:225 src/main/saveload.c:234 src/main/saveload.c:243
+#: src/main/saveload.c:247 src/main/saveload.c:256 src/main/saveload.c:1383
+#: src/main/saveload.c:1388 src/main/saveload.c:1432 src/main/saveload.c:1500
+#: src/main/saveload.c:1509 src/main/serialize.c:354 src/main/serialize.c:361
+#: src/main/serialize.c:374 src/main/serialize.c:378 src/main/serialize.c:405
+#: src/main/serialize.c:421 src/main/serialize.c:2429
+#: src/main/serialize.c:2437
 msgid "read error"
 msgstr "errore di lettura"
 
-#: src/main/saveload.c:332
+#: src/main/saveload.c:334
 msgid "a I read error occurred"
 msgstr "si è verificato un errore I in lettura"
 
-#: src/main/saveload.c:342
+#: src/main/saveload.c:344
 msgid "a R read error occurred"
 msgstr "si è verificato un errore R in lettura"
 
-#: src/main/saveload.c:352
+#: src/main/saveload.c:354
 msgid "a C read error occurred"
 msgstr "si è verificato un errore C in lettura"
 
-#: src/main/saveload.c:362
+#: src/main/saveload.c:364
 msgid "a S read error occurred"
 msgstr "si è verificato un errore S in lettura"
 
-#: src/main/saveload.c:387 src/main/saveload.c:395 src/main/saveload.c:403
-#: src/main/saveload.c:1594 src/main/saveload.c:1602
+#: src/main/saveload.c:389 src/main/saveload.c:397 src/main/saveload.c:405
+#: src/main/saveload.c:1596 src/main/saveload.c:1604
 msgid "a read error occurred"
 msgstr "si è verificato un errore in lettura"
 
-#: src/main/saveload.c:467
+#: src/main/saveload.c:469
 msgid "unresolved node during restore"
 msgstr "nodo non ricostruito durante la fase di ripristino"
 
-#: src/main/saveload.c:488
+#: src/main/saveload.c:490
 #, c-format
 msgid "restore compatibility error - no version %d compatibility"
 msgstr ""
 "errore di compatibilità in fase di ripristino - non c'è compatibilità con la "
 "versione %d"
 
-#: src/main/saveload.c:572 src/main/saveload.c:645
+#: src/main/saveload.c:574 src/main/saveload.c:647
 msgid "bad SEXP type in data file"
 msgstr "tipo SEXP errato nel file dei dati"
 
-#: src/main/saveload.c:586
+#: src/main/saveload.c:588
 msgid "mismatch on types"
 msgstr "disaccordo sui tipi"
 
-#: src/main/saveload.c:607 src/main/saveload.c:1270 src/main/serialize.c:1636
+#: src/main/saveload.c:609 src/main/saveload.c:1272 src/main/serialize.c:1675
 #, fuzzy, c-format
 msgid "unrecognized internal function name \"%s\""
 msgstr "non trovo la funzione \"%s\""
 
-#: src/main/saveload.c:709
+#: src/main/saveload.c:711
 msgid "cannot save file position while restoring data"
 msgstr ""
 "non possono registrare la posizione del file durante il ripristino dei dati"
 
-#: src/main/saveload.c:722
+#: src/main/saveload.c:724
 msgid "cannot restore file position while restoring data"
 msgstr ""
 "non posso rispristinare la posizione del file durante il ripristino dei dati"
 
-#: src/main/saveload.c:915
+#: src/main/saveload.c:917
 msgid "base namespace is not preserved in version 1 workspaces"
 msgstr "il namespace di base non viene conservato nei workspace versione 1"
 
-#: src/main/saveload.c:917
+#: src/main/saveload.c:919
 msgid "cannot save namespace in version 1 workspaces"
 msgstr "non posso salvare i namespace nella versione 1 dei workspace"
 
-#: src/main/saveload.c:919
+#: src/main/saveload.c:921
 #, fuzzy
 msgid ""
 "cannot save environment with locked/active bindings in version 1 workspaces"
@@ -5297,161 +5364,161 @@ msgstr ""
 "non posso registrare l'environment con legami bloccati/attivi nei workspace "
 "versione 1"
 
-#: src/main/saveload.c:943
+#: src/main/saveload.c:945
 msgid "cannot save weak references in version 1 workspaces"
 msgstr "non posso registrare riferimenti deboli nei workspace della versione 1"
 
-#: src/main/saveload.c:1021
+#: src/main/saveload.c:1023
 msgid "NewWriteVec called with non-vector type"
 msgstr "NewWriteVec chiamata con tipo non vettore"
 
-#: src/main/saveload.c:1084
+#: src/main/saveload.c:1086
 msgid "cannot save byte code objects in version 1 workspaces"
 msgstr "non posso salve oggetti byte code in workspace versione 1"
 
-#: src/main/saveload.c:1086
+#: src/main/saveload.c:1088
 #, c-format
 msgid "NewWriteItem: unknown type %i"
 msgstr "NewWriteItem: tipo %i sconosciuto"
 
-#: src/main/saveload.c:1216
+#: src/main/saveload.c:1218
 msgid "NewReadVec called with non-vector type"
 msgstr "NewReadVec chiamato con tipo non vettore"
 
-#: src/main/saveload.c:1286
+#: src/main/saveload.c:1288
 msgid "cannot read byte code objects from version 1 workspaces"
 msgstr "non posso leggere oggetti byte code in workspace versione 1"
 
-#: src/main/saveload.c:1288
+#: src/main/saveload.c:1290
 #, c-format
 msgid "NewReadItem: unknown type %i"
 msgstr "NewReadItem: tipo %i sconosciuto"
 
-#: src/main/saveload.c:1440
+#: src/main/saveload.c:1442
 msgid "out of memory reading ascii string"
 msgstr "memoria esaurita durante la lettura di una stringa ascii"
 
-#: src/main/saveload.c:1565
+#: src/main/saveload.c:1567
 msgid "a binary read error occurred"
 msgstr "si è verificato un errore in lettura binaria"
 
-#: src/main/saveload.c:1580 src/main/saveload.c:1681
+#: src/main/saveload.c:1582 src/main/saveload.c:1683
 msgid "out of memory reading binary string"
 msgstr "memoria esaurita durante la lettura di una stringa binaria"
 
-#: src/main/saveload.c:1585
+#: src/main/saveload.c:1587
 msgid "a binary string read error occurred"
 msgstr "si è erificato un errore durante la lettura di una stringa binaria"
 
-#: src/main/saveload.c:1645
+#: src/main/saveload.c:1647
 msgid "an xdr integer data write error occurred"
 msgstr "si è verificato un errore in scrittura di un intero in formato xdr"
 
-#: src/main/saveload.c:1652
+#: src/main/saveload.c:1654
 msgid "an xdr integer data read error occurred"
 msgstr "si è verificato un errore in lettura di un intero in formato xdr"
 
-#: src/main/saveload.c:1667 src/main/saveload.c:1686
+#: src/main/saveload.c:1669 src/main/saveload.c:1688
 msgid "an xdr string data write error occurred"
 msgstr "si è verificato un errore in scrittura di una stringa in formato xdr"
 
-#: src/main/saveload.c:1694
+#: src/main/saveload.c:1696
 msgid "an xdr real data write error occurred"
 msgstr ""
 "si è verificato un errore in scrittura di un numero reale in formato xdr"
 
-#: src/main/saveload.c:1701
+#: src/main/saveload.c:1703
 msgid "an xdr real data read error occurred"
 msgstr "si è verificato un errore in lettura di un numeor reale in formato xdr"
 
-#: src/main/saveload.c:1708
+#: src/main/saveload.c:1710
 msgid "an xdr complex data write error occurred"
 msgstr ""
 "si è verificato un errore in scrittura di un numero complesso in formato xdr"
 
-#: src/main/saveload.c:1715
+#: src/main/saveload.c:1717
 msgid "an xdr complex data read error occurred"
 msgstr ""
 "si è verificato un errore in lettura di un numero complesso in formato xdr"
 
-#: src/main/saveload.c:1783 src/main/serialize.c:1958
-#: src/main/serialize.c:2568 src/modules/internet/internet.c:351
-#: src/modules/internet/internet.c:409 src/modules/internet/internet.c:514
+#: src/main/saveload.c:1785 src/main/serialize.c:1997
+#: src/main/serialize.c:2614 src/modules/internet/internet.c:514
+#: src/modules/internet/internet.c:590 src/modules/internet/internet.c:701
 msgid "write failed"
 msgstr "scrittura non riuscita"
 
-#: src/main/saveload.c:1910
+#: src/main/saveload.c:1912
 msgid "restore file may be empty -- no data loaded"
 msgstr "il file di restore potrebbe essere vuoto - nessun dato caricato"
 
-#: src/main/saveload.c:1912
+#: src/main/saveload.c:1914
 msgid "restore file may be from a newer version of R -- no data loaded"
 msgstr ""
 "il file di ripristino potrebbe provenire da una versione troppo recente di R "
 "- dati non caricati"
 
-#: src/main/saveload.c:1914
+#: src/main/saveload.c:1916
 msgid "bad restore file magic number (file may be corrupted) -- no data loaded"
 msgstr ""
 "numero magico errato del file di ripristino (il file potrebbe essere "
 "danneggiato) - dati non caricati"
 
-#: src/main/saveload.c:1940 src/main/saveload.c:2238
+#: src/main/saveload.c:1942 src/main/saveload.c:2240
 msgid "first argument must be a character vector"
 msgstr "il primo argomento deve essere una vettore character"
 
-#: src/main/saveload.c:2012
+#: src/main/saveload.c:2014
 msgid "not a valid named list"
 msgstr "list con nomi non validi"
 
-#: src/main/saveload.c:2019 src/main/saveload.c:2040
+#: src/main/saveload.c:2021 src/main/saveload.c:2042
 #, c-format
 msgid "'%s' looks like a pre-2.4.0 S4 object: please recreate it"
 msgstr ""
 
-#: src/main/saveload.c:2027
+#: src/main/saveload.c:2029
 msgid "loaded data is not in pair list form"
 msgstr "i dati caricati non sono in formato lista appaiata"
 
-#: src/main/saveload.c:2063
+#: src/main/saveload.c:2065
 msgid "first argument must be a file name"
 msgstr "il primo argomento deve essere un nome file"
 
-#: src/main/saveload.c:2108 src/main/saveload.c:2134 src/main/serialize.c:826
-#: src/main/serialize.c:863 src/main/serialize.c:901
+#: src/main/saveload.c:2110 src/main/saveload.c:2136 src/main/serialize.c:864
+#: src/main/serialize.c:901 src/main/serialize.c:939
 msgid "XDR write failed"
 msgstr "scrittura XDR non avvenuta"
 
-#: src/main/saveload.c:2121 src/main/saveload.c:2146 src/main/serialize.c:1362
-#: src/main/serialize.c:1398 src/main/serialize.c:1436
+#: src/main/saveload.c:2123 src/main/saveload.c:2148 src/main/serialize.c:1400
+#: src/main/serialize.c:1436 src/main/serialize.c:1474
 msgid "XDR read failed"
 msgstr "lettura XDR non avvenuta"
 
-#: src/main/saveload.c:2157
+#: src/main/saveload.c:2159
 #, fuzzy, c-format
 msgid "cannot save data -- unable to open '%s': %s"
 msgstr "impossibile scrivere i dati - impossibile aprire %s"
 
-#: src/main/saveload.c:2254 src/main/serialize.c:2161
+#: src/main/saveload.c:2256 src/main/serialize.c:2202
 #, c-format
 msgid "cannot save to connections in version %d format"
 msgstr "non posso scrivere su una connessione in formato %d"
 
-#: src/main/saveload.c:2277 src/main/serialize.c:2186
+#: src/main/saveload.c:2279 src/main/serialize.c:2227
 msgid "connection not open for writing"
 msgstr "connessione non aperta in scrittura"
 
-#: src/main/saveload.c:2285
+#: src/main/saveload.c:2288
 msgid "cannot save XDR format to a text-mode connection"
 msgstr "non posso salvare in formato XDR su una connessione in modo 'text'"
 
-#: src/main/saveload.c:2295 src/main/serialize.c:2066
-#: src/main/serialize.c:2080 src/main/serialize.c:2262
-#: src/main/serialize.c:2284
+#: src/main/saveload.c:2298 src/main/serialize.c:2105
+#: src/main/serialize.c:2119 src/main/serialize.c:2303
+#: src/main/serialize.c:2325
 msgid "error writing to connection"
 msgstr "errore di scrittura sulla connessione"
 
-#: src/main/saveload.c:2359 src/main/serialize.c:2234
+#: src/main/saveload.c:2359 src/main/serialize.c:2275
 #, fuzzy
 msgid "connection not open for reading"
 msgstr "connessione non aperta in lettura"
@@ -5481,7 +5548,7 @@ msgstr ""
 msgid "scan() expected '%s', got '%s'"
 msgstr "scan() richiede '%s', invece risulta '%s'"
 
-#: src/main/scan.c:585 src/main/scan.c:732
+#: src/main/scan.c:585 src/main/scan.c:735
 #, fuzzy
 msgid "too many items"
 msgstr "troppi argomenti"
@@ -5490,7 +5557,7 @@ msgstr "troppi argomenti"
 msgid "empty 'what' specified"
 msgstr "specificato 'what' vuoto"
 
-#: src/main/scan.c:722
+#: src/main/scan.c:725
 #, c-format
 msgid "line %d did not have %d elements"
 msgstr "la riga %d non ha %d elementi"
@@ -5519,180 +5586,182 @@ msgstr "separatore decimali non valido"
 msgid "invalid quote symbol set"
 msgstr "simbolo di quote impostato non valido"
 
-#: src/main/scan.c:987
+#: src/main/scan.c:988
 msgid "embedded nul(s) found in input"
 msgstr ""
 
-#: src/main/seq.c:48
+#: src/main/seq.c:49
 msgid "unequal factor lengths"
 msgstr "lunghezza del fattore non equa"
 
-#: src/main/seq.c:100
+#: src/main/seq.c:101
 msgid "result would be too long a vector"
 msgstr "il risultato sarebbe un vettore troppo lungo"
 
-#: src/main/seq.c:159
+#: src/main/seq.c:160
 #, fuzzy
 msgid "argument of length 0"
 msgstr "l'argomento ha lunghezza zero"
 
-#: src/main/seq.c:161 src/main/seq.c:163
-#, c-format
-msgid "numerical expression has %d elements: only the first used"
-msgstr "l'espressione numerica ha %d elementi: solo il primo è utilizzato"
+#: src/main/seq.c:163 src/main/seq.c:168
+#, fuzzy, c-format
+msgid "numerical expression has %d element: only the first used"
+msgid_plural "numerical expression has %d elements: only the first used"
+msgstr[0] "l'espressione numerica ha %d elementi: solo il primo è utilizzato"
+msgstr[1] "l'espressione numerica ha %d elementi: solo il primo è utilizzato"
 
-#: src/main/seq.c:167
+#: src/main/seq.c:174
 msgid "NA/NaN argument"
 msgstr "argomento NA/NaN"
 
-#: src/main/seq.c:331
+#: src/main/seq.c:333
 #, fuzzy
 msgid "incorrect type for second argument"
 msgstr "rep() tipo del secondo argomento non valido"
 
-#: src/main/seq.c:334
+#: src/main/seq.c:336
 #, fuzzy, c-format
 msgid "attempt to replicate an object of type '%s'"
 msgstr "tentativo di replicare un non vettore"
 
-#: src/main/seq.c:387
+#: src/main/seq.c:393
 msgid "attempt to replicate non-vector"
 msgstr "tentativo di replicare un non vettore"
 
-#: src/main/seq.c:403
+#: src/main/seq.c:409
 #, fuzzy
 msgid "cannot replicate NULL to a non-zero length"
 msgstr "non è possibile allocare un vettore di lunghezza %d"
 
-#: src/main/seq.c:626 src/main/seq.c:633 src/main/seq.c:768 src/main/seq.c:979
+#: src/main/seq.c:630 src/main/seq.c:637 src/main/seq.c:766 src/main/seq.c:977
 #, fuzzy, c-format
 msgid "first element used of '%s' argument"
 msgstr "solo il primo elemento di 'url' viene utilizzato"
 
-#: src/main/seq.c:766
+#: src/main/seq.c:764
 #, fuzzy
 msgid "'length.out' must be a non-negative number"
 msgstr "'gap' deve essere un intero non negativo"
 
-#: src/main/seq.c:790 src/main/seq.c:856 src/main/seq.c:873
+#: src/main/seq.c:788 src/main/seq.c:854 src/main/seq.c:871
 #, fuzzy
 msgid "'from' must be finite"
 msgstr "'a' e 'b' devono essere finiti"
 
-#: src/main/seq.c:792 src/main/seq.c:858 src/main/seq.c:895
+#: src/main/seq.c:790 src/main/seq.c:856 src/main/seq.c:893
 #, fuzzy
 msgid "'to' must be finite"
 msgstr "'a' e 'b' devono essere finiti"
 
-#: src/main/seq.c:804
+#: src/main/seq.c:802
 msgid "invalid '(to - from)/by' in 'seq'"
 msgstr ""
 
-#: src/main/seq.c:816
+#: src/main/seq.c:814
 #, fuzzy
 msgid "'by' argument is much too small"
 msgstr "argomento 'file' troppo lungo"
 
-#: src/main/seq.c:818
+#: src/main/seq.c:816
 #, fuzzy
 msgid "wrong sign in 'by' argument"
 msgstr "lunghezza sbagliata dell'argomento 'mode'"
 
-#: src/main/seq.c:875 src/main/seq.c:897
+#: src/main/seq.c:873 src/main/seq.c:895
 #, fuzzy
 msgid "'by' must be finite"
 msgstr "'a' e 'b' devono essere finiti"
 
-#: src/main/seq.c:985 src/main/seq.c:990
+#: src/main/seq.c:983 src/main/seq.c:988
 #, fuzzy
 msgid "argument must be coercible to non-negative integer"
 msgstr "l'argomento deve essere di tipo environment"
 
-#: src/main/serialize.c:224 src/main/serialize.c:254 src/main/serialize.c:277
+#: src/main/serialize.c:228 src/main/serialize.c:275 src/main/serialize.c:299
 msgid "unknown or inappropriate output format"
 msgstr "risultato in formato sconosciuto o inappropriato"
 
-#: src/main/serialize.c:504
+#: src/main/serialize.c:542
 msgid "must specify ascii, binary, or xdr format"
 msgstr "si deve specificare un formato ascii, binary o xdr"
 
-#: src/main/serialize.c:505
+#: src/main/serialize.c:543
 msgid "unknown output format"
 msgstr "formato output sconosciuto"
 
-#: src/main/serialize.c:536
+#: src/main/serialize.c:574
 msgid "unknown input format"
 msgstr "formato input sconosciuto"
 
-#: src/main/serialize.c:541
+#: src/main/serialize.c:579
 msgid "input format does not match specified format"
 msgstr "il formato di input non coincide con quello specificato"
 
-#: src/main/serialize.c:752
+#: src/main/serialize.c:790
 msgid "no restore method available"
 msgstr "nessun metodo di restore disponibile"
 
-#: src/main/serialize.c:794
+#: src/main/serialize.c:832
 msgid "names in persistent strings are currently ignored"
 msgstr "i nomi nelle stringhe persistentivengon ignorati"
 
-#: src/main/serialize.c:963
+#: src/main/serialize.c:1001
 #, c-format
 msgid "'%s' may not be available when loading"
 msgstr "'%s' potrebbe non essre disponibile durante il caricamento"
 
-#: src/main/serialize.c:970
+#: src/main/serialize.c:1008
 msgid "namespaces may not be available when loading"
 msgstr "i namespace potrebbero non essere disponibili durante il caricamento"
 
-#: src/main/serialize.c:1097
+#: src/main/serialize.c:1136
 #, c-format
 msgid "WriteItem: unknown type %i"
 msgstr "WriteItem: tipo %i sconosciuto"
 
-#: src/main/serialize.c:1273
+#: src/main/serialize.c:1312
 #, c-format
 msgid "version %d not supported"
 msgstr "versione %d non supportata"
 
-#: src/main/serialize.c:1305
+#: src/main/serialize.c:1343
 msgid "reference index out of range"
 msgstr "indice di riferimento fuori dal campo di variazione"
 
-#: src/main/serialize.c:1335
+#: src/main/serialize.c:1373
 msgid "names in persistent strings are not supported yet"
 msgstr "i nomi delle stringhe persistenti non sono ancora supportati"
 
-#: src/main/serialize.c:1463
+#: src/main/serialize.c:1501
 #, fuzzy
 msgid "negative serialized length for vector"
 msgstr "impossibile impostare lunghezza di un oggetto non vector"
 
-#: src/main/serialize.c:1471
+#: src/main/serialize.c:1509
 #, fuzzy
 msgid "invalid upper part of serialized vector length"
 msgstr "lunghezza parametro non valida"
 
-#: src/main/serialize.c:1476
+#: src/main/serialize.c:1514
 msgid ""
 "negative serialized vector length:\n"
 "perhaps long vector from 64-bit version of R?"
 msgstr ""
 
-#: src/main/serialize.c:1707
+#: src/main/serialize.c:1746
 msgid "this version of R cannot read class references"
 msgstr "questa versione di R non può leggere riferimenti di classe"
 
-#: src/main/serialize.c:1709
+#: src/main/serialize.c:1748
 msgid "this version of R cannot read generic function references"
 msgstr "questa versione non può leggere riferimenti a funzioni generiche"
 
-#: src/main/serialize.c:1726
+#: src/main/serialize.c:1765
 #, c-format
 msgid "ReadItem: unknown type %i, perhaps written by later version of R"
 msgstr ""
 
-#: src/main/serialize.c:1882
+#: src/main/serialize.c:1921
 #, c-format
 msgid ""
 "cannot read unreleased workspace version %d written by experimental R %d.%d."
@@ -5701,7 +5770,7 @@ msgstr ""
 "impossibile leggere workspace versione non ancora ufficiale %d scritto dalla "
 "versione sperimentale di R %d.%d.%d"
 
-#: src/main/serialize.c:1886
+#: src/main/serialize.c:1925
 #, c-format
 msgid ""
 "cannot read workspace version %d written by R %d.%d.%d; need R %d.%d.%d or "
@@ -5710,89 +5779,89 @@ msgstr ""
 "impossibile leggere workspace versione %d scritto da R %d.%d.%d; necessaria "
 "R %d.%d.%d o superiore"
 
-#: src/main/serialize.c:1965
+#: src/main/serialize.c:2004
 #, fuzzy
 msgid "read failed"
 msgstr "lettura XDR non avvenuta"
 
-#: src/main/serialize.c:2028
+#: src/main/serialize.c:2067
 #, fuzzy
 msgid "error reading from ascii connection"
 msgstr "errore durante lettura sulla connessione"
 
-#: src/main/serialize.c:2030
+#: src/main/serialize.c:2069
 #, fuzzy
 msgid "unexpected format in ascii connection"
 msgstr "non posso leggere da questa connessione"
 
-#: src/main/serialize.c:2035 src/main/serialize.c:2049
+#: src/main/serialize.c:2074 src/main/serialize.c:2088
 msgid "error reading from connection"
 msgstr "errore durante lettura sulla connessione"
 
-#: src/main/serialize.c:2090
+#: src/main/serialize.c:2130
 msgid "only ascii format can be written to text mode connections"
 msgstr ""
 "possono essere scritti solo i formati ascii su connessioni in modalità testo"
 
-#: src/main/serialize.c:2104
+#: src/main/serialize.c:2144
 msgid "only ascii format can be read from text mode connections"
 msgstr ""
 "possono esser eletti solo formati ascii in connessioni in modalità testo"
 
-#: src/main/serialize.c:2159 src/main/serialize.c:2312
-#: src/main/serialize.c:2461
+#: src/main/serialize.c:2200 src/main/serialize.c:2353
+#: src/main/serialize.c:2502
 msgid "bad version value"
 msgstr "valore versione sbagliato"
 
-#: src/main/serialize.c:2184
+#: src/main/serialize.c:2225
 #, fuzzy
 msgid "binary-mode connection required for ascii=FALSE"
 msgstr "operazioni binarie richiedono due argomenti"
 
-#: src/main/serialize.c:2340 src/main/serialize.c:2377
-#: src/main/serialize.c:2440
+#: src/main/serialize.c:2381 src/main/serialize.c:2418
+#: src/main/serialize.c:2481
 msgid "serialization is too large to store in a raw vector"
 msgstr ""
 
-#: src/main/serialize.c:2357
+#: src/main/serialize.c:2398
 msgid "cannot allocate buffer"
 msgstr "impossibile allocare il buffer"
 
-#: src/main/serialize.c:2546 src/main/serialize.c:2619
+#: src/main/serialize.c:2592 src/main/serialize.c:2665
 msgid "not a proper file name"
 msgstr "non è un vero nome file"
 
-#: src/main/serialize.c:2548
+#: src/main/serialize.c:2594
 #, fuzzy
 msgid "not a proper raw vector"
 msgstr "non è un vettore semplice"
 
-#: src/main/serialize.c:2569
+#: src/main/serialize.c:2615
 msgid "could not determine file position"
 msgstr "impossibile determinare la posizione del file"
 
-#: src/main/serialize.c:2621
+#: src/main/serialize.c:2667
 msgid "bad offset/length argument"
 msgstr "argomento 'offset/length' errato"
 
-#: src/main/serialize.c:2645 src/main/serialize.c:2658
-#: src/main/serialize.c:2667 src/main/serialize.c:2677
-#: src/main/serialize.c:2690
+#: src/main/serialize.c:2691 src/main/serialize.c:2704
+#: src/main/serialize.c:2713 src/main/serialize.c:2723
+#: src/main/serialize.c:2736
 #, c-format
 msgid "seek failed on %s"
 msgstr "posizionamento non riuscito su %s"
 
-#: src/main/serialize.c:2662 src/main/serialize.c:2671
-#: src/main/serialize.c:2681 src/main/serialize.c:2694
+#: src/main/serialize.c:2708 src/main/serialize.c:2717
+#: src/main/serialize.c:2727 src/main/serialize.c:2740
 #, c-format
 msgid "read failed on %s"
 msgstr "lettura non riuscita su %s"
 
-#: src/main/serialize.c:2713
+#: src/main/serialize.c:2759
 msgid "bad environment"
 msgstr "errato environment"
 
-#: src/main/serialize.c:2715
+#: src/main/serialize.c:2761
 msgid "bad variable names"
 msgstr "nomi errati delle variabili"
 
@@ -5800,167 +5869,163 @@ msgstr "nomi errati delle variabili"
 msgid "only atomic vectors can be tested to be sorted"
 msgstr "è possibile eseguire un ordinamento solo su vettori atomici"
 
-#: src/main/sort.c:326 src/main/sort.c:1228 src/main/sort.c:1396
+#: src/main/sort.c:325 src/main/sort.c:1248
 msgid "'decreasing' must be TRUE or FALSE"
 msgstr "'decreasing' deve essere TRUE o FALSE"
 
-#: src/main/sort.c:329 src/main/sort.c:600
+#: src/main/sort.c:328 src/main/sort.c:599
 msgid "only atomic vectors can be sorted"
 msgstr "possono essere ordinati solo i vettori atomici"
 
-#: src/main/sort.c:331 src/main/sort.c:602 src/main/sort.c:1297
+#: src/main/sort.c:330 src/main/sort.c:601 src/main/sort.c:1317
 msgid "raw vectors cannot be sorted"
 msgstr "vettori raw non possono essere ordinati"
 
-#: src/main/sort.c:613
+#: src/main/sort.c:612
 msgid "NA or infinite index"
 msgstr ""
 
-#: src/main/sort.c:616
+#: src/main/sort.c:615
 #, fuzzy, c-format
 msgid "index %ld outside bounds"
 msgstr "indice %d fuori limite"
 
-#: src/main/sort.c:621 src/main/sort.c:634
+#: src/main/sort.c:620 src/main/sort.c:633
 msgid "NA index"
 msgstr "indice NA"
 
-#: src/main/sort.c:623 src/main/sort.c:636
+#: src/main/sort.c:622 src/main/sort.c:635
 #, c-format
 msgid "index %d outside bounds"
 msgstr "indice %d fuori limite"
 
-#: src/main/sort.c:1237
+#: src/main/sort.c:1257
 #, c-format
 msgid "argument %d is not a vector"
 msgstr "l'argomento %d non è di tipo vector"
 
-#: src/main/sort.c:1239
+#: src/main/sort.c:1259
 msgid "argument lengths differ"
 msgstr "la lunghezza degli argomenti differisce"
 
-#: src/main/sort.c:1324
+#: src/main/sort.c:1344
 msgid "invalid ties.method for rank() [should never happen]"
 msgstr "ties.method non valid in rank() [non dovrebbe mai accadere]"
 
-#: src/main/sort.c:1429
-msgid "too large a range of values in 'x'"
-msgstr "range dei valori di 'x' troppo grande"
-
-#: src/main/source.c:215
+#: src/main/source.c:220
 msgid "coercion of 'text' to character was unsuccessful"
 msgstr ""
 
-#: src/main/source.c:231
+#: src/main/source.c:236
 #, fuzzy, c-format
 msgid "argument '%s = \"%s\"' will be ignored"
 msgstr "gli argomenti successivi ai primi due vengono ignorati"
 
-#: src/main/split.c:38
+#: src/main/split.c:39
 msgid "first argument must be a vector"
 msgstr "il primo argomento deve essere un vettore"
 
-#: src/main/split.c:40
+#: src/main/split.c:41
 msgid "second argument must be a factor"
 msgstr "il secondo argomento deve essere di tipo factor"
 
-#: src/main/split.c:45
+#: src/main/split.c:46
 #, fuzzy
 msgid "group length is 0 but data length > 0"
 msgstr "La lunghezza di gruppo è 0 ma i dati hanno lunghezza > 0"
 
-#: src/main/split.c:47
+#: src/main/split.c:48
 msgid "data length is not a multiple of split variable"
 msgstr "la lunghezza dei dati non è un multiplo della variabile di split"
 
-#: src/main/split.c:56
+#: src/main/split.c:58
 msgid "factor has bad level"
 msgstr ""
 
-#: src/main/sprintf.c:94
+#: src/main/sprintf.c:97
 #, c-format
 msgid "required resulting string length %d is greater than maximal %d"
 msgstr ""
 
-#: src/main/sprintf.c:102
+#: src/main/sprintf.c:105
 #, fuzzy
 msgid "'fmt' is not a character vector"
 msgstr "'fmt' deve essere un vettore di caratteri non vuoto"
 
-#: src/main/sprintf.c:107
+#: src/main/sprintf.c:110
 #, fuzzy, c-format
 msgid "only %d arguments are allowed"
 msgstr "sono permessi solo 100 argomenti"
 
-#: src/main/sprintf.c:114
+#: src/main/sprintf.c:117
 #, fuzzy, c-format
 msgid "invalid type of argument[%d]: '%s'"
 msgstr "argomento 'mode' non valido"
 
-#: src/main/sprintf.c:125 src/main/sprintf.c:128
+#: src/main/sprintf.c:128 src/main/sprintf.c:131
 msgid "arguments cannot be recycled to the same length"
 msgstr "gli argomenti non possono essere riutilizzati alla stessa lunghezza"
 
-#: src/main/sprintf.c:150 src/main/sprintf.c:257
+#: src/main/sprintf.c:153 src/main/sprintf.c:260
 #, fuzzy, c-format
 msgid "'fmt' length exceeds maximal format length %d"
 msgstr "lunghezza 'fmt' eccede la lunghezza massima del buffer %d"
 
-#: src/main/sprintf.c:169
+#: src/main/sprintf.c:172
 #, fuzzy, c-format
 msgid "unrecognised format specification '%s'"
 msgstr "specificazione colore non valida"
 
-#: src/main/sprintf.c:180 src/main/sprintf.c:186 src/main/sprintf.c:199
-#: src/main/sprintf.c:206
+#: src/main/sprintf.c:183 src/main/sprintf.c:189 src/main/sprintf.c:202
+#: src/main/sprintf.c:209
 #, c-format
 msgid "reference to non-existent argument %d"
 msgstr "riferiment ad argomento non esistente %d"
 
-#: src/main/sprintf.c:218
+#: src/main/sprintf.c:221
 msgid "at most one asterisk '*' is supported in each conversion specification"
 msgstr ""
 
-#: src/main/sprintf.c:228
+#: src/main/sprintf.c:231
 msgid "argument for '*' conversion specification must be a number"
 msgstr ""
 
-#: src/main/sprintf.c:266
+#: src/main/sprintf.c:269
 msgid "coercion has changed vector length to 0"
 msgstr "la trasformazione ha cmabiato la lunghezza del vettore in 0"
 
-#: src/main/sprintf.c:339 src/main/sprintf.c:353 src/main/sprintf.c:367
-#: src/main/sprintf.c:402
+#: src/main/sprintf.c:343 src/main/sprintf.c:357 src/main/sprintf.c:371
+#: src/main/sprintf.c:406
 #, fuzzy, c-format
 msgid "invalid format '%s'; %s"
 msgstr "valore non valido per 'n'"
 
-#: src/main/sprintf.c:340
+#: src/main/sprintf.c:344
 #, c-format
 msgid "use format %d or %i for logical objects"
 msgstr "usare il formato %d o %i per oggetti di tipo logical"
 
-#: src/main/sprintf.c:354
+#: src/main/sprintf.c:358
 #, fuzzy, c-format
 msgid "use format %d, %i, %o, %x or %X for integer objects"
 msgstr "sare formato %d, %i, %x o %X per oggetti di tipo integer"
 
-#: src/main/sprintf.c:368
+#: src/main/sprintf.c:372
 #, fuzzy, c-format
 msgid "use format %f, %e, %g or %a for numeric objects"
 msgstr "usare il fomrato %f, %e o %g per oggetti di tipo numeric"
 
-#: src/main/sprintf.c:403
+#: src/main/sprintf.c:407
 #, c-format
 msgid "use format %s for character objects"
 msgstr "usare il formato %s per oggetti di tipo character"
 
-#: src/main/sprintf.c:408
+#: src/main/sprintf.c:412
 #, fuzzy, c-format
 msgid "likely truncation of character string to %d characters"
 msgstr "La stringa di caratteri verrà probabilmente troncata"
 
-#: src/main/sprintf.c:417
+#: src/main/sprintf.c:421
 msgid "unsupported type"
 msgstr "tipo non supportato"
 
@@ -5968,404 +6033,409 @@ msgstr "tipo non supportato"
 msgid "R_LibraryFileName: buffer too small"
 msgstr "R_LibraryFileName: buffer troppo piccolo"
 
-#: src/main/subassign.c:117
+#: src/main/subassign.c:118
 msgid "attempt to enlarge non-vector"
 msgstr "tentativo di ingrandire un non vettore"
 
-#: src/main/subassign.c:122
+#: src/main/subassign.c:123
 #, c-format
 msgid "assignment outside vector/list limits (extending from %d to %d)"
 msgstr "assegnazione oltre i limiti del vettore/lista (estendo da %d a %d)"
 
-#: src/main/subassign.c:367
+#: src/main/subassign.c:391
 #, c-format
 msgid "incompatible types (from %s to %s) in subassignment type fix"
 msgstr "tipi incompatibili (da %s a %s) in subassignment type fix"
 
-#: src/main/subassign.c:502 src/main/subassign.c:782 src/main/subassign.c:785
-#: src/main/subassign.c:1076
+#: src/main/subassign.c:550 src/main/subassign.c:830 src/main/subassign.c:833
+#: src/main/subassign.c:1133
 msgid "NAs are not allowed in subscripted assignments"
 msgstr "NA non si possono usare in indici di assegnazione"
 
-#: src/main/subassign.c:520 src/main/subassign.c:796 src/main/subassign.c:1068
-#: src/main/subassign.c:1641
+#: src/main/subassign.c:568 src/main/subassign.c:844 src/main/subassign.c:1125
+#: src/main/subassign.c:1705
 #, fuzzy
 msgid "replacement has length zero"
 msgstr "l'argomento ha lunghezza zero"
 
-#: src/main/subassign.c:522 src/main/subassign.c:798 src/main/subassign.c:1070
+#: src/main/subassign.c:570 src/main/subassign.c:846 src/main/subassign.c:1127
 msgid "number of items to replace is not a multiple of replacement length"
 msgstr ""
 "il numero di elementi da sostituire non è un multiplo della lunghezza di "
 "sostituzione"
 
-#: src/main/subassign.c:766
+#: src/main/subassign.c:814
 msgid "incorrect number of subscripts on matrix"
 msgstr "numero di indici non corretto su una matrice"
 
-#: src/main/subassign.c:1022
+#: src/main/subassign.c:1079
 #, c-format
 msgid "incompatible types (from %s to %s) in matrix subset assignment"
 msgstr ""
 "tipi incompatibili (da %s a %s) in assegnazioni per sottogruppi in matrix"
 
-#: src/main/subassign.c:1038 src/main/subset.c:928
+#: src/main/subassign.c:1095 src/main/subset.c:957
 msgid "incorrect number of subscripts"
 msgstr "numero di indici non corretto"
 
-#: src/main/subassign.c:1214
+#: src/main/subassign.c:1272
 #, c-format
 msgid "incompatible types (from %s to %s) in array subset assignment"
 msgstr ""
 "tipi incompatibili (da %s a %s) in assegnazioni per sottogruppi in array"
 
-#: src/main/subassign.c:1249 src/main/subassign.c:1270
+#: src/main/subassign.c:1308 src/main/subassign.c:1329
 #, fuzzy
 msgid "invalid subscript in list assign"
 msgstr "numero di indici non valido in assegnamento di lista"
 
-#: src/main/subassign.c:1263
+#: src/main/subassign.c:1322
 msgid "invalid number of subscripts to list assign"
 msgstr "numero di indici non valido in assegnamento di lista"
 
-#: src/main/subassign.c:1361
+#: src/main/subassign.c:1421
 msgid "SubAssignArgs: invalid number of arguments"
 msgstr "SubAssignArgs: numero argomenti non valido"
 
-#: src/main/subassign.c:1506
+#: src/main/subassign.c:1566
 msgid "result is zero-length and so cannot be a language object"
 msgstr ""
 
-#: src/main/subassign.c:1611
+#: src/main/subassign.c:1665
 msgid ""
 "[[<- defined for objects of type \"S4\" only for subclasses of environment"
 msgstr ""
 
-#: src/main/subassign.c:1617
+#: src/main/subassign.c:1677
 msgid "wrong args for environment subassignment"
 msgstr "argomenti errati in sottoassegnamenti di environment"
 
-#: src/main/subassign.c:1643
+#: src/main/subassign.c:1707
 msgid "more elements supplied than there are to replace"
 msgstr "più elementi forniti di quelli da sostituire"
 
-#: src/main/subassign.c:1645
+#: src/main/subassign.c:1709
 msgid "[[ ]] with missing subscript"
 msgstr "[[ ]]] con indici missing"
 
-#: src/main/subassign.c:1657 src/main/subassign.c:1675
+#: src/main/subassign.c:1727 src/main/subassign.c:1745
 msgid "[[ ]] subscript out of bounds"
 msgstr "[[ ]] indice fuori limiti"
 
-#: src/main/subassign.c:1663 src/main/subassign.c:1841
+#: src/main/subassign.c:1733 src/main/subassign.c:1914
 msgid "[[ ]] improper number of subscripts"
 msgstr "[[ ]] numero di indici non valido"
 
-#: src/main/subassign.c:1808
+#: src/main/subassign.c:1879
 #, c-format
 msgid "incompatible types (from %s to %s) in [[ assignment"
 msgstr "tipi incompatibili (da %s a %s) nell'assegnazione [["
 
-#: src/main/subassign.c:1852
+#: src/main/subassign.c:1925
 #, c-format
 msgid "[[ ]] subscript (%d) out of bounds"
 msgstr "[[ ]] indice (%d) fuori limiti"
 
-#: src/main/subassign.c:1905 src/main/subscript.c:143 src/main/subscript.c:145
-#: src/main/subscript.c:274 src/main/subscript.c:276 src/main/subscript.c:826
-#: src/main/subscript.c:828 src/main/subscript.c:919 src/main/subscript.c:921
-#: src/main/subset.c:1109
+#: src/main/subassign.c:1986 src/main/subscript.c:151 src/main/subscript.c:278
+#: src/main/subscript.c:903 src/main/subscript.c:996 src/main/subset.c:1176
 #, fuzzy, c-format
 msgid "invalid subscript type '%s'"
 msgstr "tipo di indice non valido"
 
-#: src/main/subassign.c:1950
+#: src/main/subassign.c:2037
 msgid "no method for assigning subsets of this S4 class"
 msgstr ""
 
-#: src/main/subassign.c:2008
+#: src/main/subassign.c:2095
 msgid "Coercing LHS to a list"
 msgstr "Trasformo il membro di sinistra in una lista"
 
-#: src/main/subscript.c:53 src/main/subscript.c:75 src/main/subscript.c:180
-#: src/main/subscript.c:204
-msgid "attempt to select less than one element"
+#: src/main/subscript.c:59 src/main/subscript.c:81 src/main/subscript.c:185
+#: src/main/subscript.c:209
+#, fuzzy, c-format
+msgid "attempt to select less than one element in %s"
 msgstr "tentativo di selezione meno di un elemento"
 
-#: src/main/subscript.c:57 src/main/subscript.c:72 src/main/subscript.c:178
-#: src/main/subscript.c:208 src/main/subscript.c:304
-msgid "attempt to select more than one element"
+#: src/main/subscript.c:63 src/main/subscript.c:78 src/main/subscript.c:183
+#: src/main/subscript.c:213 src/main/subscript.c:305
+#, fuzzy, c-format
+msgid "attempt to select more than one element in %s"
 msgstr "tentativo di selezionare più di un elemnto"
 
-#: src/main/subscript.c:184
+#: src/main/subscript.c:189
 msgid "internal error in use of recursive indexing"
 msgstr "errore interno nell'uso dell'indicizzazione ricorsiva"
 
-#: src/main/subscript.c:252
+#: src/main/subscript.c:257
 #, c-format
 msgid "further partial match of '%s' to '%s'"
 msgstr ""
 
-#: src/main/subscript.c:302
+#: src/main/subscript.c:303
 #, c-format
 msgid "recursive indexing failed at level %d\n"
 msgstr "indicizzazione ricorsiva non avvenuta a livello %d\n"
 
-#: src/main/subscript.c:309
+#: src/main/subscript.c:313
 #, c-format
 msgid "no such index at level %d\n"
 msgstr "indice non trovato a livello %d\n"
 
-#: src/main/subscript.c:352
+#: src/main/subscript.c:360
 msgid "incorrect number of columns in matrix subscript"
 msgstr "numero di colonne non valido nell'indice della matrice"
 
-#: src/main/subscript.c:371 src/main/subscript.c:389 src/main/subscript.c:413
+#: src/main/subscript.c:379 src/main/subscript.c:397 src/main/subscript.c:421
 msgid "negative values are not allowed in a matrix subscript"
 msgstr "valori negativi non ammessi come indici di matrice"
 
-#: src/main/subscript.c:492
+#: src/main/subscript.c:500
 msgid "(subscript) logical subscript too long"
 msgstr "(subscript) indice logicol troppo lungo"
 
-#: src/main/subscript.c:590 src/main/subscript.c:645
+#: src/main/subscript.c:668 src/main/subscript.c:723
 msgid "only 0's may be mixed with negative subscripts"
 msgstr "solo gli 0 si possono usare contemporaneamente con indici negativi"
 
-#: src/main/subscript.c:618
+#: src/main/subscript.c:696
 msgid "subscript too large for 32-bit R"
 msgstr ""
 
-#: src/main/subscript.c:817
+#: src/main/subscript.c:895
 msgid "no 'dimnames' attribute for array"
 msgstr "attributo 'dimnames' mancante per l'array"
 
-#: src/main/subscript.c:857
+#: src/main/subscript.c:931
 msgid "subscripting on non-vector"
 msgstr "indicizzazione su un non vettore"
 
-#: src/main/subset.c:261
+#: src/main/subset.c:260
 msgid "dimensions would exceed maximum size of array"
 msgstr ""
 
-#: src/main/subset.c:304 src/main/subset.c:333
+#: src/main/subset.c:304 src/main/subset.c:334
 msgid "matrix subscripting not handled for this type"
 msgstr "sottoindicizzazione matrice non valido per questo tipo"
 
-#: src/main/subset.c:488
+#: src/main/subset.c:493
 msgid "array subscripting not handled for this type"
 msgstr "sottoindicizzazione matrice non supportato per questo tipo"
 
-#: src/main/subset.c:827
+#: src/main/subset.c:856
 msgid "incorrect number of dimensions"
 msgstr "numero di dimensioni errato"
 
-#: src/main/subset.c:924
+#: src/main/subset.c:953
 msgid "no index specified"
 msgstr "nessun indice specificato"
 
-#: src/main/subset.c:934
+#: src/main/subset.c:963
 #, fuzzy
 msgid "this S4 class is not subsettable"
 msgstr "questo oggetto non è indicizzabile"
 
-#: src/main/subset.c:940
+#: src/main/subset.c:970
 msgid "wrong arguments for subsetting an environment"
 msgstr "argomenti sbagliati per sottoindicizzare un environment"
 
-#: src/main/summary.c:30
+#: src/main/summary.c:33
 #, fuzzy, c-format
 msgid "invalid 'type' (%s) of argument"
 msgstr "argomento 'mode' non valido"
 
-#: src/main/summary.c:66 src/main/summary.c:78 src/main/summary.c:103
+#: src/main/summary.c:69 src/main/summary.c:81 src/main/summary.c:106
 #, fuzzy
 msgid "integer overflow - use sum(as.numeric(.))"
 msgstr "Overflow di interi in sum(.); usare sum(as.numeric(.))"
 
-#: src/main/summary.c:522
+#: src/main/summary.c:526
 #, c-format
 msgid "internal error ('op = %d' in do_summary).\t Call a Guru"
 msgstr "errore interno ('op = %d' in do_summary).\t Chiama un Guru"
 
-#: src/main/summary.c:623
+#: src/main/summary.c:637
 #, fuzzy
 msgid "Integer overflow - use sum(as.numeric(.))"
 msgstr "Overflow di interi in sum(.); usare sum(as.numeric(.))"
 
-#: src/main/summary.c:731
+#: src/main/summary.c:750
 #, fuzzy
 msgid "no non-missing arguments, returning NA"
 msgstr "argomenti di min non finiti; restituisco Inf"
 
-#: src/main/summary.c:734
+#: src/main/summary.c:753
 #, fuzzy
 msgid "no non-missing arguments to min; returning Inf"
 msgstr "argomenti di min non finiti; restituisco Inf"
 
-#: src/main/summary.c:736
+#: src/main/summary.c:755
 #, fuzzy
 msgid "no non-missing arguments to max; returning -Inf"
 msgstr "argomenti non finiti in max; restituisco -Inf"
 
-#: src/main/summary.c:801
-msgid "non-numeric argument"
-msgstr "argomento non numerico"
-
-#: src/main/summary.c:845
+#: src/main/summary.c:913
 #, fuzzy
 msgid "argument to 'which' is not logical"
 msgstr "l'argomento di 'logarithm' deve essere logico"
 
-#: src/main/summary.c:889
+#: src/main/summary.c:957
 #, fuzzy
 msgid "no arguments"
 msgstr "argomenti insufficienti"
 
-#: src/main/summary.c:900 src/main/summary.c:917
+#: src/main/summary.c:968 src/main/summary.c:985
 #, fuzzy
 msgid "invalid input type"
 msgstr "line type non valido"
 
-#: src/main/summary.c:934
+#: src/main/summary.c:1002
 #, fuzzy
 msgid "an argument will be fractionally recycled"
 msgstr "gli argomenti successivi ai primi due vengono ignorati"
 
-#: src/main/sysutils.c:69 src/main/sysutils.c:83
+#: src/main/sysutils.c:68 src/main/sysutils.c:82
 #, c-format
 msgid "cannot determine file modification time of '%s'"
 msgstr "non posso verificare la data di modifica di '%s'"
 
-#: src/main/sysutils.c:167
+#: src/main/sysutils.c:166
 msgid "encoding of a filename cannot be 'bytes'"
 msgstr ""
 
-#: src/main/sysutils.c:170 src/main/sysutils.c:803 src/main/sysutils.c:818
-#: src/main/sysutils.c:909 src/main/sysutils.c:924 src/main/sysutils.c:1020
+#: src/main/sysutils.c:169 src/main/sysutils.c:831 src/main/sysutils.c:846
+#: src/main/sysutils.c:975
 #, fuzzy, c-format
 msgid "unsupported conversion from '%s' in codepage %d"
 msgstr "conversione non supportata"
 
-#: src/main/sysutils.c:179
+#: src/main/sysutils.c:178
 #, fuzzy
 msgid "file name conversion problem -- name too long?"
 msgstr "nome del file troppo lungo"
 
-#: src/main/sysutils.c:180
+#: src/main/sysutils.c:179
 #, fuzzy
 msgid "file name conversion problem"
 msgstr "nome del file troppo lungo"
 
-#: src/main/sysutils.c:249
+#: src/main/sysutils.c:248
 msgid "invalid filename pattern"
 msgstr "pattern nome file non valido"
 
-#: src/main/sysutils.c:253
+#: src/main/sysutils.c:252
 #, fuzzy
 msgid "invalid file extension"
 msgstr "Espressione regolare non valida"
 
-#: src/main/sysutils.c:255
+#: src/main/sysutils.c:254
 msgid "no 'pattern'"
 msgstr "nessun 'pattern'"
 
-#: src/main/sysutils.c:257
+#: src/main/sysutils.c:256
 msgid "no 'tempdir'"
 msgstr "nessuna 'tempdir'"
 
-#: src/main/sysutils.c:259
+#: src/main/sysutils.c:258
 msgid "no 'fileext'"
 msgstr ""
 
-#: src/main/sysutils.c:345 src/main/sysutils.c:348 src/main/sysutils.c:439
-#: src/main/sysutils.c:441 src/main/sysutils.c:477
+#: src/main/sysutils.c:328
+#, fuzzy, c-format
+msgid "system call failed: %s"
+msgstr "posizionamento non riuscito su %s"
+
+#: src/main/sysutils.c:357 src/main/sysutils.c:360 src/main/sysutils.c:451
+#: src/main/sysutils.c:453 src/main/sysutils.c:489
 msgid "wrong type for argument"
 msgstr "tipo errato per l'argomento"
 
-#: src/main/sysutils.c:443
+#: src/main/sysutils.c:455
 #, fuzzy
 msgid "wrong length for argument"
 msgstr "lunghezza sbagliata dell'argomento 'mode'"
 
-#: src/main/sysutils.c:464
+#: src/main/sysutils.c:476
 #, fuzzy
 msgid "'Sys.setenv' is not available on this system"
 msgstr "'putenv' non disponibile su questo sistema"
 
-#: src/main/sysutils.c:508
+#: src/main/sysutils.c:520
 msgid "this system cannot unset environment variables: setting to \"\""
 msgstr ""
 
-#: src/main/sysutils.c:519
+#: src/main/sysutils.c:531
 #, fuzzy
 msgid "'Sys.unsetenv' is not available on this system"
 msgstr "'putenv' non disponibile su questo sistema"
 
-#: src/main/sysutils.c:616
+#: src/main/sysutils.c:628
 #, fuzzy, c-format
 msgid "unsupported conversion from '%s' to '%s' in codepage %d"
 msgstr "conversione non supportata"
 
-#: src/main/sysutils.c:631
+#: src/main/sysutils.c:643
 msgid "'x' must be a character vector"
 msgstr "'x' deve essere un vettore di tipo character"
 
-#: src/main/sysutils.c:646
+#: src/main/sysutils.c:658
 #, fuzzy
-msgid "'x' must be a list of NULL or raw vectors"
+msgid "'x' must be a character vector or a list of NULL or raw vectors"
 msgstr "'x' deve essere un vettore di tipo character"
 
-#: src/main/sysutils.c:724 src/main/sysutils.c:789 src/main/sysutils.c:895
-#: src/main/sysutils.c:994 src/main/sysutils.c:1010 src/main/sysutils.c:1087
+#: src/main/sysutils.c:736 src/main/sysutils.c:914 src/main/sysutils.c:932
+#: src/main/sysutils.c:949 src/main/sysutils.c:965 src/main/sysutils.c:1042
 #, fuzzy, c-format
 msgid "'%s' must be called on a CHARSXP"
 msgstr "csduplicated non chiamato su un STRSXP"
 
-#: src/main/sysutils.c:792 src/main/sysutils.c:898 src/main/sysutils.c:1015
-#: src/main/sysutils.c:1090
+#: src/main/sysutils.c:805 src/main/sysutils.c:970 src/main/sysutils.c:1045
 msgid "translating strings with \"bytes\" encoding is not allowed"
 msgstr ""
 
-#: src/main/sysutils.c:1116
+#: src/main/sysutils.c:818
+#, fuzzy
+msgid "internal error: no translation needed"
+msgstr "errore interno in 'unz'"
+
+#: src/main/sysutils.c:1071
 #, fuzzy, c-format
 msgid "unsupported conversion to '%s' from codepage %d"
 msgstr "conversione non supportata"
 
-#: src/main/sysutils.c:1530
+#: src/main/sysutils.c:1486
 #, fuzzy, c-format
 msgid "invalid Unicode point %u"
 msgstr "'line join' non valida"
 
-#: src/main/sysutils.c:1632
+#: src/main/sysutils.c:1588
 #, fuzzy
 msgid "cannot create 'R_TempDir'"
 msgstr "non è possibile allocare memoria per R_TempDir"
 
-#: src/main/sysutils.c:1636 src/main/sysutils.c:1644 src/main/sysutils.c:1647
+#: src/main/sysutils.c:1592 src/main/sysutils.c:1600 src/main/sysutils.c:1603
 msgid "unable to set R_SESSION_TMPDIR"
 msgstr ""
 
-#: src/main/sysutils.c:1656
+#: src/main/sysutils.c:1612
 #, fuzzy
 msgid "cannot allocate 'R_TempDir'"
 msgstr "non è possibile allocare memoria per R_TempDir"
 
-#: src/main/sysutils.c:1693
+#: src/main/sysutils.c:1649
 #, fuzzy
 msgid "temporary name too long"
 msgstr "nome del file troppo lungo"
 
-#: src/main/sysutils.c:1708
+#: src/main/sysutils.c:1664
 msgid "cannot find unused tempfile name"
 msgstr "non è stato possibile trovare un nome tempfile non ancora utilizzato"
 
-#: src/main/sysutils.c:1711
+#: src/main/sysutils.c:1667
 #, fuzzy
 msgid "allocation failed in R_tmpnam2"
 msgstr "allocazione di memoria non riuscita in GVText"
 
-#: src/main/sysutils.c:1838
+#: src/main/sysutils.c:1794
 #, fuzzy
 msgid "'dirmark = TRUE' is not supported on this platform"
 msgstr "'recursive = TRUE' non è supportato su questa piattaforma"
@@ -6376,204 +6446,211 @@ msgid "length %d is too large for hashing"
 msgstr "la lunghezza %d è troppo lunga per l'indirizzamento"
 
 #: src/main/unique.c:490 src/main/unique.c:519 src/main/unique.c:549
-#: src/main/unique.c:575 src/main/unique.c:614
+#: src/main/unique.c:573 src/main/unique.c:612
 msgid "'duplicated' applies only to vectors"
 msgstr "'duplicated' si applica a non vettori"
 
-#: src/main/unique.c:619
+#: src/main/unique.c:617
 msgid "any_duplicated3(., <0-length incomp>)"
 msgstr ""
 
-#: src/main/unique.c:669
+#: src/main/unique.c:667
 #, fuzzy
 msgid "'fromLast' must be length 1"
 msgstr "'which' deve essere di lunghezza 1"
 
-#: src/main/unique.c:672
+#: src/main/unique.c:670
 #, fuzzy
 msgid "'fromLast' must be TRUE or FALSE"
 msgstr "'decreasing' deve essere TRUE o FALSE"
 
-#: src/main/unique.c:683
+#: src/main/unique.c:681
 #, c-format
 msgid "%s() applies only to vectors"
 msgstr "%s() si applica solo a vettori"
 
-#: src/main/unique.c:690
+#: src/main/unique.c:688
 #, fuzzy
 msgid "'nmax' must be positive"
 msgstr "l'argomento deve avere lunghezza positiva"
 
-#: src/main/unique.c:922
+#: src/main/unique.c:985
 msgid "'match' requires vector arguments"
 msgstr "'match' richiede argomenti vettoriali"
 
-#: src/main/unique.c:970 src/main/unique.c:1125
+#: src/main/unique.c:1033 src/main/unique.c:1171
 msgid "argument is not of mode character"
 msgstr "l'argomento non è in modalità carattere"
 
-#: src/main/unique.c:1251
+#: src/main/unique.c:1296
 #, fuzzy
 msgid "... used in a situation where it does not exist"
 msgstr "... usato in un contesto dove non esiste"
 
-#: src/main/unique.c:1342
-msgid "unable to find a closure from within which 'match.call' was called"
-msgstr ""
+#: src/main/unique.c:1302
+#, fuzzy
+msgid "... is not a pairlist"
+msgstr "valore in '...' non è una promessa"
 
-#: src/main/unique.c:1536
+#: src/main/unique.c:1531
 msgid "non-numeric data frame in rowsum"
 msgstr "data frame non numeri in rowsum"
 
-#: src/main/unique.c:1568
+#: src/main/unique.c:1563
 msgid "this cannot happen"
 msgstr "questo non deve accadere"
 
-#: src/main/unique.c:1639
+#: src/main/unique.c:1634
 msgid "'names' must be a character vector"
 msgstr "'names' deve essere un vettore di tipo character"
 
-#: src/main/unique.c:1643
-msgid "'sep' must be a character string"
-msgstr "'sep' deve essere una stringa di tipo character"
-
-#: src/main/util.c:88 src/main/util.c:106
+#: src/main/util.c:87 src/main/util.c:105
 msgid "object is not a matrix"
 msgstr "l'oggetto non è una matrice"
 
-#: src/main/util.c:254 src/main/util.c:268 src/main/util.c:285
+#: src/main/util.c:303 src/main/util.c:315 src/main/util.c:326
+#: src/main/util.c:341
 #, fuzzy, c-format
 msgid "type %d is unimplemented in '%s'"
 msgstr "tipo %d non è implementato in type2str"
 
-#: src/main/util.c:297
+#: src/main/util.c:352
 #, c-format
 msgid "unimplemented type '%s' in '%s'\n"
 msgstr "tipo '%s' non implementato in '%s'\n"
 
-#: src/main/util.c:299
+#: src/main/util.c:354
 #, c-format
 msgid "unimplemented type (%d) in '%s'\n"
 msgstr "tipo (%d) non implementato in '%s'\n"
 
-#: src/main/util.c:424
+#: src/main/util.c:479
 msgid "invalid tag in name extraction"
 msgstr "'tag' non valida nell'estrazione nome"
 
-#: src/main/util.c:434
+#: src/main/util.c:489
 #, fuzzy, c-format
 msgid "%d argument passed to .Internal(%s) which requires %d"
 msgid_plural "%d arguments passed to .Internal(%s) which requires %d"
 msgstr[0] "%d argomenti passati alla funzione 'atan' che ne richiede 1"
 msgstr[1] "%d argomenti passati alla funzione 'atan' che ne richiede 1"
 
-#: src/main/util.c:440
+#: src/main/util.c:495
 #, fuzzy, c-format
 msgid "%d argument passed to '%s' which requires %d"
 msgid_plural "%d arguments passed to '%s' which requires %d"
 msgstr[0] "%d argomenti passati a 'log' che ne richiede 1 o 2"
 msgstr[1] "%d argomenti passati a 'log' che ne richiede 1 o 2"
 
-#: src/main/util.c:455
+#: src/main/util.c:510
 #, c-format
 msgid "supplied argument name '%s' does not match '%s'"
 msgstr ""
 
-#: src/main/util.c:465
+#: src/main/util.c:520
 #, fuzzy, c-format
 msgid "'nthcdr' list shorter than %d"
 msgstr "la lista \"nthcdr\" è più piccola di %d"
 
-#: src/main/util.c:470
+#: src/main/util.c:525
 #, fuzzy
 msgid "'nthcdr' needs a list to CDR down"
 msgstr "\"nthcdr\" necessita una lista da CRN"
 
-#: src/main/util.c:586
+#: src/main/util.c:641
 msgid "'all.x' must be TRUE or FALSE"
 msgstr "'all.x' deve essere TRUE o FALSE"
 
-#: src/main/util.c:588
+#: src/main/util.c:643
 msgid "'all.y' must be TRUE or FALSE"
 msgstr "'all.y' deve essere TRUE o FALSE"
 
-#: src/main/util.c:700
+#: src/main/util.c:672
+msgid "number of rows in the result exceeds maximum vector length"
+msgstr ""
+
+#: src/main/util.c:764
 #, fuzzy
 msgid "missing value is invalid"
 msgstr "valori nulli nei parametri"
 
-#: src/main/util.c:709 src/main/util.c:716
+#: src/main/util.c:773 src/main/util.c:780
 msgid "cannot change working directory"
 msgstr "non posso cambiare la directory di lavoro"
 
-#: src/main/util.c:735 src/main/util.c:769 src/main/util.c:810
-#: src/main/util.c:852 src/main/util.c:981 src/main/util.c:1040
-#: src/main/util.c:1063
+#: src/main/util.c:800 src/main/util.c:834 src/main/util.c:875
+#: src/main/util.c:917 src/main/util.c:1046 src/main/util.c:1105
+#: src/main/util.c:1128
 msgid "a character vector argument expected"
 msgstr "richiesti argomenti di tipo vector"
 
-#: src/main/util.c:742 src/main/util.c:777 src/main/util.c:819
-#: src/main/util.c:860
+#: src/main/util.c:807 src/main/util.c:842 src/main/util.c:884
+#: src/main/util.c:925
 msgid "path too long"
 msgstr "percorso troppo lungo"
 
-#: src/main/util.c:995
+#: src/main/util.c:1060
 msgid "only the first character of 'quote' will be used"
 msgstr "solo il primo carattere di 'quote' verrà usato"
 
-#: src/main/util.c:1065
+#: src/main/util.c:1130
 #, fuzzy
 msgid "a character vector 'value' expected"
 msgstr "richiesti argomenti di tipo vector"
 
-#: src/main/util.c:1068
+#: src/main/util.c:1133
 #, fuzzy
 msgid "'value' must be of positive length"
 msgstr "l'argomento deve avere lunghezza positiva"
 
-#: src/main/util.c:1197 src/main/util.c:1205
+#: src/main/util.c:1262 src/main/util.c:1270
 #, fuzzy, c-format
 msgid "invalid input '%s' in 'utf8towcs'"
 msgstr "input non valido per Rmbstowcs"
 
-#: src/main/util.c:1290
+#: src/main/util.c:1355
 #, fuzzy, c-format
 msgid "invalid multibyte string at '%s'"
 msgstr "stringa mulibyte %d non valida"
 
-#: src/main/util.c:1399
+#: src/main/util.c:1497
 msgid "error message truncated to 255 chars"
 msgstr "messaggio di errore troncato a 255 caratteri"
 
-#: src/main/util.c:1412
+#: src/main/util.c:1510
 msgid "warning message truncated to 255 chars"
 msgstr "avviso troncato a 255 caratteri"
 
-#: src/main/util.c:1819
+#: src/main/util.c:1659
+#, c-format
+msgid "accuracy loss in conversion from \"%s\" to numeric"
+msgstr ""
+
+#: src/main/util.c:1969
 #, fuzzy
 msgid "all arguments must be named"
 msgstr "gli attributi devono avere un nome"
 
-#: src/main/util.c:1893
+#: src/main/util.c:2091
 #, fuzzy
 msgid "ICU is not supported on this build"
 msgstr "nls() non è supportato in questa piattaforma"
 
-#: src/main/util.c:1954
+#: src/main/util.c:2158
 #, fuzzy
 msgid "'breaks' is not sorted"
 msgstr "modalità '%s' non supportata in call_R"
 
-#: src/main/util.c:1988 src/main/util.c:2034
+#: src/main/util.c:2192 src/main/util.c:2242
 #, fuzzy, c-format
 msgid "long vector '%s' is not supported"
 msgstr "modalità '%s' non supportata in call_R"
 
-#: src/main/util.c:2087
+#: src/main/util.c:2296
 msgid "'eps.correct' must be 0, 1, or 2"
 msgstr ""
 
-#: src/main/util.c:2115
+#: src/main/util.c:2324
 #, fuzzy
 msgid "'x' must be a vector"
 msgstr "'x' deve essere un vettore di tipo character"
@@ -6614,14 +6691,6 @@ msgstr ""
 "Scrivi 'q()' per uscire da R.\n"
 "\n"
 
-#: src/main/vfonts.c:50
-msgid "vfont routines cannot be accessed in module"
-msgstr "le routine vfont non sono accessibili al modulo"
-
-#: src/main/vfonts.c:67 src/main/vfonts.c:80 src/main/vfonts.c:98
-msgid "Hershey fonts cannot be loaded"
-msgstr "font Hershey non caricati"
-
 #: src/main/xspline.c:60
 #, c-format
 msgid "add_point - reached MAXNUMPTS (%d)"
@@ -6646,7 +6715,7 @@ msgstr "deve esserci un primo argomento"
 msgid "There must be at least three control points"
 msgstr "deve esserci un primo argomento"
 
-#: src/modules/X11/dataentry.c:1871 src/modules/X11/devX11.c:1246
+#: src/modules/X11/dataentry.c:1874 src/modules/X11/devX11.c:1248
 #, c-format
 msgid "X11 protocol error: %s"
 msgstr "Errore di protocollo in X11: %s"
@@ -6672,7 +6741,7 @@ msgstr ""
 "Errore: X11 non può allocare colori grafici aggiuntivi.\n"
 "Si provi ad usare X11 con colortype=\"pseudo.cube\" o \"gray\"."
 
-#: src/modules/X11/devX11.c:1027
+#: src/modules/X11/devX11.c:1029
 msgid ""
 "could not find any X11 fonts\n"
 "Check that the Font Path is correct."
@@ -6680,28 +6749,28 @@ msgstr ""
 "non è possibile trovare alcun carattere X11\n"
 "Verificare che il percorso verso i caratteri sia correttamente impostato."
 
-#: src/modules/X11/devX11.c:1087
+#: src/modules/X11/devX11.c:1089
 #, c-format
 msgid "X11 used font size %d when %d was requested"
 msgstr "X11 ha usato un dimensione carattere di %d mentre era richiesta %d"
 
-#: src/modules/X11/devX11.c:1121
+#: src/modules/X11/devX11.c:1123
 #, fuzzy, c-format
 msgid "X11 font %s, face %d at size %d could not be loaded"
 msgstr "Il carattere X11 di dimensione %d non può essere caricato"
 
-#: src/modules/X11/devX11.c:1130
+#: src/modules/X11/devX11.c:1132
 msgid ""
 "semi-transparency is not supported on this device: reported only once per "
 "page"
 msgstr ""
 
-#: src/modules/X11/devX11.c:1254
+#: src/modules/X11/devX11.c:1256
 #, c-format
 msgid "X11 I/O error while opening X11 connection to '%s'"
 msgstr ""
 
-#: src/modules/X11/devX11.c:1272
+#: src/modules/X11/devX11.c:1273
 msgid "X11 fatal IO error: please save work and shut down R"
 msgstr ""
 "Errore irreversebilie di IO di X11: si prega di registrare il vostro lavoro "
@@ -6830,209 +6899,274 @@ msgstr "impossibile creare una pixmap"
 msgid "attempt to use the locator after dev.hold()"
 msgstr ""
 
-#: src/modules/X11/devX11.c:3111
+#: src/modules/X11/devX11.c:3117
 #, c-format
 msgid "unable to start device %s"
 msgstr "impossibile aprire dispositivo %s"
 
-#: src/modules/X11/devX11.c:3138
+#: src/modules/X11/devX11.c:3144
 msgid "invalid 'width' or 'height'"
 msgstr "'width' o 'height' non validi"
 
-#: src/modules/X11/devX11.c:3145
+#: src/modules/X11/devX11.c:3151
 msgid "invalid colortype passed to X11 driver"
 msgstr "tipo di colore non valido per il driver X11"
 
-#: src/modules/X11/devX11.c:3159
+#: src/modules/X11/devX11.c:3165
 msgid "unknown X11 color/colour model -- using monochrome"
 msgstr "modello colre X11 sconosciuto -- si utilizza quello monocromatico"
 
-#: src/modules/X11/devX11.c:3249
+#: src/modules/X11/devX11.c:3255
 #, fuzzy
 msgid "no plot on device to save"
 msgstr "nessuna history displonibile da salvare"
 
-#: src/modules/X11/devX11.c:3251
+#: src/modules/X11/devX11.c:3257
 #, fuzzy
 msgid "not an open X11cairo device"
 msgstr "troppi dispositivi aperti"
 
-#: src/modules/X11/devX11.c:3260
+#: src/modules/X11/devX11.c:3266
 #, c-format
 msgid "cannot open file '%s'"
 msgstr "impossibile aprire il file '%s'"
 
-#: src/modules/X11/devX11.c:3277
+#: src/modules/X11/devX11.c:3283
 #, fuzzy
 msgid "savePlot() is not supported on this build"
 msgstr "nls() non è supportato in questa piattaforma"
 
-#: src/modules/X11/devX11.c:3317
+#: src/modules/X11/devX11.c:3323
 msgid "unable to contact X11 display"
 msgstr "impossibile contattare un display X11"
 
-#: src/modules/X11/devX11.c:3366
+#: src/modules/X11/devX11.c:3372
 #, fuzzy, c-format
 msgid "clipboard cannot be read (error code %d)"
 msgstr "la clipboard non può essere aperta o non contiene testo"
 
-#: src/modules/X11/devX11.c:3397
+#: src/modules/X11/devX11.c:3408
 msgid "cannot allocate memory for X11Routines structure"
 msgstr "non è possibile allocare memoria per la struttura X11Routines"
 
-#: src/modules/internet/internet.c:188 src/modules/internet/internet.c:192
-#: src/modules/internet/internet.c:198 src/modules/internet/internet.c:210
+#: src/modules/internet/internet.c:113
+msgid "for https:// URLs use method = \"wininet\""
+msgstr ""
+
+#: src/modules/internet/internet.c:153 src/modules/internet/internet.c:274
+#: src/modules/internet/internet.c:758
+#, fuzzy, c-format
+msgid "scheme not supported in URL '%s'"
+msgstr "riavvi non supportati in 'eval'"
+
+#: src/modules/internet/internet.c:348 src/modules/internet/internet.c:352
+#: src/modules/internet/internet.c:357 src/modules/internet/internet.c:381
+#: src/modules/internet/libcurl.c:791 src/modules/internet/libcurl.c:795
+#: src/modules/internet/libcurl.c:801 src/modules/internet/libcurl.c:814
+#: src/modules/internet/libcurl.c:822
 msgid "allocation of url connection failed"
 msgstr "allocazione della connessione 'url' fallita"
 
-#: src/modules/internet/internet.c:286
+#: src/modules/internet/internet.c:455
 msgid "only first element of 'url' argument used"
 msgstr "solo il primo elemento di 'url' viene utilizzato"
 
-#: src/modules/internet/internet.c:292
+#: src/modules/internet/internet.c:461
 msgid "only first element of 'destfile' argument used"
 msgstr "solo il primo elemento di 'destifle' viene utilizzato"
 
-#: src/modules/internet/internet.c:317
+#: src/modules/internet/internet.c:480 src/modules/internet/libcurl.c:499
 msgid "Download progress"
 msgstr "Progressione caricamento"
 
-#: src/modules/internet/internet.c:339
+#: src/modules/internet/internet.c:502
 #, fuzzy, c-format
 msgid "cannot open URL '%s', reason '%s'"
 msgstr "impossibile aprire il file '%s' perché '%s'"
 
-#: src/modules/internet/internet.c:346 src/modules/internet/internet.c:372
-#: src/modules/internet/internet.c:474
+#: src/modules/internet/internet.c:509 src/modules/internet/internet.c:536
+#: src/modules/internet/internet.c:661
 #, fuzzy, c-format
 msgid "cannot open destfile '%s', reason '%s'"
 msgstr "impossibile aprire il file '%s' perché '%s'"
 
-#: src/modules/internet/internet.c:377 src/modules/internet/internet.c:479
+#: src/modules/internet/internet.c:541 src/modules/internet/internet.c:666
+#: src/modules/internet/libcurl.c:530
 #, c-format
 msgid "trying URL '%s'\n"
 msgstr "provo con l'URL '%s'\n"
 
-#: src/modules/internet/internet.c:384 src/modules/internet/internet.c:486
-msgid "opened URL\n"
-msgstr "URL aperto\n"
-
-#: src/modules/internet/internet.c:455 src/modules/internet/internet.c:560
-#, c-format
-msgid "downloaded length %d != reported length %d"
+#: src/modules/internet/internet.c:640 src/modules/internet/internet.c:751
+#: src/modules/internet/libcurl.c:578
+#, fuzzy, c-format
+msgid "downloaded length %0.f != reported length %0.f"
 msgstr "lunghezza caricamento %d != lunghezza prevista %d"
 
-#: src/modules/internet/internet.c:460 src/modules/internet/internet.c:565
+#: src/modules/internet/internet.c:645 src/modules/internet/internet.c:756
 #, c-format
 msgid "cannot open URL '%s'"
 msgstr "impossibile aprire URL '%s'"
 
-#: src/modules/internet/internet.c:593 src/modules/internet/internet.c:828
-#, c-format
-msgid "cannot open: HTTP status was '%d %s'"
+#: src/modules/internet/internet.c:779 src/modules/internet/internet.c:944
+#, fuzzy, c-format
+msgid "cannot open URL '%s': HTTP status was '%d %s'"
 msgstr "apertura non riuscita: stato HTTP '%d %s'"
 
-#: src/modules/internet/internet.c:772 src/modules/internet/internet.c:935
-msgid "InternetOpenUrl timed out"
-msgstr "InternetOpenUrl fuori tempo massimo"
-
-#: src/modules/internet/internet.c:799 src/modules/internet/internet.c:813
-#: src/modules/internet/internet.c:957 src/modules/internet/internet.c:966
+#: src/modules/internet/internet.c:915 src/modules/internet/internet.c:929
+#: src/modules/internet/internet.c:1019 src/modules/internet/internet.c:1028
 #, c-format
 msgid "InternetOpenUrl failed: '%s'"
 msgstr "InternetOpenUrl non riuscita: '%s'"
 
-#: src/modules/internet/internet.c:870
-msgid "Internet read timed out"
-msgstr "Lettura da Internet fuori tempo massimo"
+#: src/modules/internet/libcurl.c:159
+#, fuzzy, c-format
+msgid "URL '%s': status was '%d %s'"
+msgstr "apertura non riuscita: stato HTTP '%d %s'"
+
+#: src/modules/internet/libcurl.c:163
+#, c-format
+msgid "URL '%s': status was '%s'"
+msgstr ""
+
+#: src/modules/internet/libcurl.c:240
+#, fuzzy
+msgid "curlGetHeaders is not supported on this platform"
+msgstr "nls() non è supportato in questa piattaforma"
+
+#: src/modules/internet/libcurl.c:249 src/modules/internet/libcurl.c:252
+#, fuzzy, c-format
+msgid "invalid %s argument"
+msgstr "argomento '%s' non valido"
+
+#: src/modules/internet/libcurl.c:269
+#, c-format
+msgid ""
+"libcurl error code %d\n"
+"\t%s\n"
+msgstr ""
+
+#: src/modules/internet/libcurl.c:404
+#, fuzzy
+msgid "download.file(method = \"libcurl\") is not supported on this platform"
+msgstr "nls() non è supportato in questa piattaforma"
+
+#: src/modules/internet/libcurl.c:420
+#, fuzzy
+msgid "lengths of 'url' and 'destfile' must match"
+msgstr "le lunghezze dei nomi di import e export devono conincidere"
+
+#: src/modules/internet/libcurl.c:481
+#, fuzzy, c-format
+msgid "URL %s: cannot open destfile '%s', reason '%s'"
+msgstr "impossibile aprire il file '%s' perché '%s'"
+
+#: src/modules/internet/libcurl.c:593
+#, fuzzy
+msgid "cannot download all files"
+msgstr "impossibile aprire il file '%s'"
+
+#: src/modules/internet/libcurl.c:727
+#, fuzzy
+msgid "cannot read from connection"
+msgstr "non posso leggere da questa connessione"
+
+#: src/modules/internet/libcurl.c:763
+#, fuzzy
+msgid "cannot open connection"
+msgstr "non posso aprire questa connessione"
+
+#: src/modules/internet/libcurl.c:826
+#, fuzzy
+msgid "url(method = \"libcurl\") is not supported on this platform"
+msgstr "nls() non è supportato in questa piattaforma"
 
-#: src/modules/internet/nanoftp.c:288 src/modules/internet/nanoftp.c:301
-#: src/modules/internet/nanoftp.c:312 src/modules/internet/nanoftp.c:346
-#: src/modules/internet/nanoftp.c:356
+#: src/modules/internet/nanoftp.c:289 src/modules/internet/nanoftp.c:302
+#: src/modules/internet/nanoftp.c:313 src/modules/internet/nanoftp.c:347
+#: src/modules/internet/nanoftp.c:357
 msgid "RxmlNanoFTPScanURL: overlong (invalid?) URL"
 msgstr ""
 
-#: src/modules/internet/nanoftp.c:389
+#: src/modules/internet/nanoftp.c:390
 msgid "removing FTP proxy info"
 msgstr "elimino informazione proxy FTP"
 
-#: src/modules/internet/nanoftp.c:391
+#: src/modules/internet/nanoftp.c:392
 #, c-format
 msgid "using FTP proxy '%s'"
 msgstr "uso proxy FTP '%s'"
 
-#: src/modules/internet/nanoftp.c:402 src/modules/internet/nanoftp.c:431
+#: src/modules/internet/nanoftp.c:403 src/modules/internet/nanoftp.c:432
 msgid "RxmlNanoFTPScanProxy: overlong (invalid?) URL"
 msgstr ""
 
-#: src/modules/internet/nanoftp.c:830
+#: src/modules/internet/nanoftp.c:833
 msgid "cannot resolve host"
 msgstr "impossibile identificare host"
 
-#: src/modules/internet/nanoftp.c:860
+#: src/modules/internet/nanoftp.c:863
 msgid "failed to connect to server"
 msgstr "connessione al server non riuscita"
 
-#: src/modules/internet/nanoftp.c:871
+#: src/modules/internet/nanoftp.c:874
 msgid "failed to get response from server"
 msgstr "impossibile ottenere una risposta dal server"
 
-#: src/modules/internet/nanoftp.c:1134
+#: src/modules/internet/nanoftp.c:1137
 msgid "RxmlNanoFTPGetConnection: failed to create socket"
 msgstr "RxmlNanoFTPGetConnection: creazione socket non riuscita"
 
-#: src/modules/internet/nanoftp.c:1180
+#: src/modules/internet/nanoftp.c:1183
 msgid "failed to create a data connection"
 msgstr "impossibile creare una connessione dati"
 
-#: src/modules/internet/nanoftp.c:1188
+#: src/modules/internet/nanoftp.c:1191
 msgid "failed to bind a port"
 msgstr "collegamento ad una porta non avvenuto"
 
-#: src/modules/internet/nanoftp.c:1195
+#: src/modules/internet/nanoftp.c:1198
 #, c-format
 msgid "could not listen on port %d"
 msgstr "non è possibile leggere dalla porta %d"
 
-#: src/modules/internet/nanohttp.c:370 src/modules/internet/nanohttp.c:398
-#: src/modules/internet/nanohttp.c:407
+#: src/modules/internet/nanohttp.c:369 src/modules/internet/nanohttp.c:400
+#: src/modules/internet/nanohttp.c:412
 msgid "RxmlNanoHTTPScanURL: overlong (invalid?) URL"
 msgstr ""
 
-#: src/modules/internet/nanohttp.c:441
+#: src/modules/internet/nanohttp.c:446
 msgid "removing HTTP proxy info"
 msgstr "rimuovo l'informazione del proxy HTTP"
 
-#: src/modules/internet/nanohttp.c:443
+#: src/modules/internet/nanohttp.c:448
 #, c-format
 msgid "using HTTP proxy '%s'"
 msgstr "uso proxy HTTP '%s'"
 
-#: src/modules/internet/nanohttp.c:454 src/modules/internet/nanohttp.c:490
+#: src/modules/internet/nanohttp.c:459 src/modules/internet/nanohttp.c:497
 msgid "RxmlNanoHTTPScanProxy: overlong (invalid?) URL"
 msgstr ""
 
-#: src/modules/internet/nanohttp.c:1107
+#: src/modules/internet/nanohttp.c:1135
 #, fuzzy, c-format
 msgid "unable to resolve '%s'"
 msgstr "impossibile identificare '%s'."
 
-#: src/modules/internet/nanohttp.c:1134
+#: src/modules/internet/nanohttp.c:1168
 #, c-format
 msgid "connected to '%s' on port %d."
 msgstr "connesso a '%s' sulla porta %d."
 
-#: src/modules/internet/nanohttp.c:1139
+#: src/modules/internet/nanohttp.c:1173
 #, c-format
 msgid "unable to connect to '%s' on port %d."
 msgstr "impossibile collegarsi a '%s' sulla porta %d."
 
-#: src/modules/internet/nanohttp.c:1443
+#: src/modules/internet/nanohttp.c:1477
 #, c-format
 msgid "redirect to: '%s'"
 msgstr "reindirizzamento su: '%s'"
 
-#: src/modules/internet/nanohttp.c:1454
+#: src/modules/internet/nanohttp.c:1488
 msgid "too many redirects, aborting ..."
 msgstr "troppi reindirizzamenti, annullo..."
 
@@ -7065,11 +7199,11 @@ msgstr ""
 #: src/modules/lapack/Lapack.c:730 src/modules/lapack/Lapack.c:779
 #: src/modules/lapack/Lapack.c:786 src/modules/lapack/Lapack.c:834
 #: src/modules/lapack/Lapack.c:840 src/modules/lapack/Lapack.c:894
-#: src/modules/lapack/Lapack.c:900 src/modules/lapack/Lapack.c:1134
-#: src/modules/lapack/Lapack.c:1140 src/modules/lapack/Lapack.c:1188
-#: src/modules/lapack/Lapack.c:1195 src/modules/lapack/Lapack.c:1199
-#: src/modules/lapack/Lapack.c:1227 src/modules/lapack/Lapack.c:1234
-#: src/modules/lapack/Lapack.c:1254
+#: src/modules/lapack/Lapack.c:900 src/modules/lapack/Lapack.c:1135
+#: src/modules/lapack/Lapack.c:1141 src/modules/lapack/Lapack.c:1189
+#: src/modules/lapack/Lapack.c:1196 src/modules/lapack/Lapack.c:1200
+#: src/modules/lapack/Lapack.c:1228 src/modules/lapack/Lapack.c:1235
+#: src/modules/lapack/Lapack.c:1255
 #, c-format
 msgid "error code %d from Lapack routine '%s'"
 msgstr "codice errore %d nella routine Lapack '%s'"
@@ -7154,28 +7288,28 @@ msgstr "codice errore %d nella routine Lapack '%s'"
 msgid "'a' must be a complex matrix"
 msgstr "'a' deve essere una matrice di tipo complex"
 
-#: src/modules/lapack/Lapack.c:535 src/modules/lapack/Lapack.c:1042
+#: src/modules/lapack/Lapack.c:535 src/modules/lapack/Lapack.c:1043
 msgid "'a' is 0-diml"
 msgstr "'a' è 0-diml"
 
-#: src/modules/lapack/Lapack.c:537 src/modules/lapack/Lapack.c:1044
+#: src/modules/lapack/Lapack.c:537 src/modules/lapack/Lapack.c:1045
 #, c-format
 msgid "'a' (%d x %d) must be square"
 msgstr "'a' (%d x %d) deve essere quadrata"
 
-#: src/modules/lapack/Lapack.c:543 src/modules/lapack/Lapack.c:1050
+#: src/modules/lapack/Lapack.c:543 src/modules/lapack/Lapack.c:1051
 msgid "no right-hand side in 'b'"
 msgstr "nessun membro di destra in 'b'"
 
 #: src/modules/lapack/Lapack.c:546 src/modules/lapack/Lapack.c:560
-#: src/modules/lapack/Lapack.c:1053 src/modules/lapack/Lapack.c:1069
+#: src/modules/lapack/Lapack.c:1054 src/modules/lapack/Lapack.c:1070
 #, c-format
 msgid "'b' (%d x %d) must be compatible with 'a' (%d x %d)"
 msgstr "'b' (%d, %d) deve essere compatibile con 'a' (%d x %d)"
 
 #: src/modules/lapack/Lapack.c:581 src/modules/lapack/Lapack.c:948
-#: src/modules/lapack/Lapack.c:962 src/modules/lapack/Lapack.c:1017
-#: src/modules/lapack/Lapack.c:1091
+#: src/modules/lapack/Lapack.c:962 src/modules/lapack/Lapack.c:1018
+#: src/modules/lapack/Lapack.c:1092
 #, c-format
 msgid "argument %d of Lapack routine %s had invalid value"
 msgstr "l'argomento %d della routie Lapack %s ha un valore non valido"
@@ -7185,7 +7319,7 @@ msgid "'b' must be a complex matrix"
 msgstr "'b' deve essere una matrice di tipo complex"
 
 #: src/modules/lapack/Lapack.c:670 src/modules/lapack/Lapack.c:716
-#: src/modules/lapack/Lapack.c:1181 src/modules/lapack/Lapack.c:1220
+#: src/modules/lapack/Lapack.c:1182 src/modules/lapack/Lapack.c:1221
 #, c-format
 msgid "right-hand side should have %d not %d rows"
 msgstr "il membro di destra deve avere %d righe e non %d"
@@ -7204,13 +7338,13 @@ msgstr ""
 msgid "'x' must be a square complex matrix"
 msgstr "'x' deve essere una matrice quadrata di tipo numeric"
 
-#: src/modules/lapack/Lapack.c:926 src/modules/lapack/Lapack.c:1000
-#: src/modules/lapack/Lapack.c:1039 src/modules/lapack/Lapack.c:1114
-#: src/modules/lapack/Lapack.c:1245
+#: src/modules/lapack/Lapack.c:926 src/modules/lapack/Lapack.c:1001
+#: src/modules/lapack/Lapack.c:1040 src/modules/lapack/Lapack.c:1115
+#: src/modules/lapack/Lapack.c:1246
 msgid "'a' must be a numeric matrix"
 msgstr "'a' deve essere una matrice di tipo numeric"
 
-#: src/modules/lapack/Lapack.c:933 src/modules/lapack/Lapack.c:1250
+#: src/modules/lapack/Lapack.c:933 src/modules/lapack/Lapack.c:1251
 msgid "'a' must be a square matrix"
 msgstr "'a' deve essere una matrice quadrata"
 
@@ -7227,42 +7361,42 @@ msgstr "il minore principale di ordine %d non è definito positivo"
 msgid "the matrix is either rank-deficient or indefinite"
 msgstr ""
 
-#: src/modules/lapack/Lapack.c:987
+#: src/modules/lapack/Lapack.c:988
 msgid "'size' argument must be a positive integer"
 msgstr "l'argomento 'size' deve essere un intero positivo"
 
-#: src/modules/lapack/Lapack.c:1002
+#: src/modules/lapack/Lapack.c:1003
 #, c-format
 msgid "'size' cannot exceed ncol(x) = %d"
 msgstr "'size' non può superare ncol(x) = %d"
 
-#: src/modules/lapack/Lapack.c:1003
+#: src/modules/lapack/Lapack.c:1004
 #, c-format
 msgid "'size' cannot exceed nrow(x) = %d"
 msgstr "'size' non può superare nrow(x) = %d"
 
-#: src/modules/lapack/Lapack.c:1015
+#: src/modules/lapack/Lapack.c:1016
 #, c-format
 msgid "element (%d, %d) is zero, so the inverse cannot be computed"
 msgstr "l'elemento (%d, %d) è zero, quindi l'inversa non può essere calcolata"
 
-#: src/modules/lapack/Lapack.c:1094
+#: src/modules/lapack/Lapack.c:1095
 #, fuzzy, c-format
 msgid "Lapack routine %s: system is exactly singular: U[%d,%d] = 0"
 msgstr "Lapack routine dgesv: is sistema è esattamente singolare"
 
-#: src/modules/lapack/Lapack.c:1102
+#: src/modules/lapack/Lapack.c:1103
 #, c-format
 msgid "system is computationally singular: reciprocal condition number = %g"
 msgstr ""
 "il sistema è numericamente singolare: valore di condizione di reciprocità = "
 "%g"
 
-#: src/modules/lapack/Lapack.c:1174 src/modules/lapack/Lapack.c:1212
+#: src/modules/lapack/Lapack.c:1175 src/modules/lapack/Lapack.c:1213
 msgid "'b' must be a numeric matrix"
 msgstr "'b' deve essere una matrice di tipo numeric"
 
-#: src/modules/lapack/Lapack.c:1246
+#: src/modules/lapack/Lapack.c:1247
 msgid "argument 'logarithm' must be logical"
 msgstr "l'argomento di 'logarithm' deve essere logico"
 
@@ -7271,8 +7405,8 @@ msgid "bessel_i allocation error"
 msgstr "errore di allocazione in bessel_i"
 
 #: src/nmath/bessel_i.c:77 src/nmath/bessel_i.c:122
-#, c-format
-msgid "bessel_i(%g): ncalc (=%ld) != nb (=%ld); alpha=%g. Arg. out of range?\n"
+#, fuzzy, c-format
+msgid "bessel_i(%g): ncalc (=%d) != nb (=%d); alpha=%g. Arg. out of range?\n"
 msgstr "bessel_i(%g): ncalc (=%ld) != nb (=%ld); alpha=%g. Arg. fuori range?\n"
 
 #: src/nmath/bessel_i.c:80 src/nmath/bessel_i.c:125
@@ -7280,16 +7414,21 @@ msgstr "bessel_i(%g): ncalc (=%ld) != nb (=%ld); alpha=%g. Arg. fuori range?\n"
 msgid "bessel_i(%g,nu=%g): precision lost in result\n"
 msgstr "bessel_i(%g,nu=%g): perdita di precisione nel risultato\n"
 
-#: src/nmath/bessel_j.c:67
+#: src/nmath/bessel_j.c:64 src/nmath/bessel_j.c:118
+#, c-format
+msgid "besselJ(x, nu): nu=%g too large for bessel_j() algorithm"
+msgstr ""
+
+#: src/nmath/bessel_j.c:72
 msgid "bessel_j allocation error"
 msgstr "errore di allocazione in bessel_j"
 
-#: src/nmath/bessel_j.c:75 src/nmath/bessel_j.c:118
-#, c-format
-msgid "bessel_j(%g): ncalc (=%ld) != nb (=%ld); alpha=%g. Arg. out of range?\n"
+#: src/nmath/bessel_j.c:80 src/nmath/bessel_j.c:127
+#, fuzzy, c-format
+msgid "bessel_j(%g): ncalc (=%d) != nb (=%d); alpha=%g. Arg. out of range?\n"
 msgstr "bessel_j(%g): ncalc (=%ld) != nb (=%ld); alpha=%g. Arg. fuori range?\n"
 
-#: src/nmath/bessel_j.c:78 src/nmath/bessel_j.c:121
+#: src/nmath/bessel_j.c:83 src/nmath/bessel_j.c:130
 #, c-format
 msgid "bessel_j(%g,nu=%g): precision lost in result\n"
 msgstr "bessel_j(%g,nu=%g): perdiat di precisione nel risultato\n"
@@ -7299,8 +7438,8 @@ msgid "bessel_k allocation error"
 msgstr "errore di allocazione in bessel_k"
 
 #: src/nmath/bessel_k.c:71 src/nmath/bessel_k.c:108
-#, c-format
-msgid "bessel_k(%g): ncalc (=%ld) != nb (=%ld); alpha=%g. Arg. out of range?\n"
+#, fuzzy, c-format
+msgid "bessel_k(%g): ncalc (=%d) != nb (=%d); alpha=%g. Arg. out of range?\n"
 msgstr "bessel_k(%g): ncalc (=%ld) != nb (=%ld); alpha=%g. Arg. fuori range?\n"
 
 #: src/nmath/bessel_k.c:74 src/nmath/bessel_k.c:111
@@ -7308,16 +7447,21 @@ msgstr "bessel_k(%g): ncalc (=%ld) != nb (=%ld); alpha=%g. Arg. fuori range?\n"
 msgid "bessel_k(%g,nu=%g): precision lost in result\n"
 msgstr "bessel_k(%g,nu=%g): perdita di precision nel risultato\n"
 
-#: src/nmath/bessel_y.c:66
+#: src/nmath/bessel_y.c:63 src/nmath/bessel_y.c:125
+#, c-format
+msgid "besselY(x, nu): nu=%g too large for bessel_y() algorithm"
+msgstr ""
+
+#: src/nmath/bessel_y.c:71
 msgid "bessel_y allocation error"
 msgstr "errore di allocazione in bessel_y"
 
-#: src/nmath/bessel_y.c:82 src/nmath/bessel_y.c:127
-#, c-format
-msgid "bessel_y(%g): ncalc (=%ld) != nb (=%ld); alpha=%g. Arg. out of range?\n"
+#: src/nmath/bessel_y.c:87 src/nmath/bessel_y.c:136
+#, fuzzy, c-format
+msgid "bessel_y(%g): ncalc (=%d) != nb (=%d); alpha=%g. Arg. out of range?\n"
 msgstr "bessel_y(%g): ncalc (=%ld) != nb (=%ld); alpha=%g. Arg. fuori range?\n"
 
-#: src/nmath/bessel_y.c:85 src/nmath/bessel_y.c:130
+#: src/nmath/bessel_y.c:90 src/nmath/bessel_y.c:139
 #, c-format
 msgid "bessel_y(%g,nu=%g): precision lost in result\n"
 msgstr "bessel_y(%g,nu=%g): perdita di precisione nel risultato\n"
@@ -7327,42 +7471,42 @@ msgstr "bessel_y(%g,nu=%g): perdita di precisione nel risultato\n"
 msgid "'k' (%.2f) must be integer, rounded to %.0f"
 msgstr ""
 
-#: src/nmath/nmath.h:141
+#: src/nmath/nmath.h:156
 #, fuzzy, c-format
 msgid "argument out of domain in '%s'\n"
 msgstr "valore fuori limite in 'perm'"
 
-#: src/nmath/nmath.h:144
+#: src/nmath/nmath.h:159
 #, fuzzy, c-format
 msgid "value out of range in '%s'\n"
 msgstr "valore fuori limite in 'perm'"
 
-#: src/nmath/nmath.h:147
+#: src/nmath/nmath.h:162
 #, fuzzy, c-format
 msgid "convergence failed in '%s'\n"
 msgstr "apertura non riuscita su %s"
 
-#: src/nmath/nmath.h:150
+#: src/nmath/nmath.h:165
 #, c-format
 msgid "full precision may not have been achieved in '%s'\n"
 msgstr ""
 
-#: src/nmath/nmath.h:153
+#: src/nmath/nmath.h:168
 #, c-format
 msgid "underflow occurred in '%s'\n"
 msgstr ""
 
-#: src/nmath/pbeta.c:48
+#: src/nmath/pbeta.c:64
 #, c-format
-msgid "pbeta_raw() -> bratio() gave error code %d"
+msgid "pbeta_raw(%g, a=%g, b=%g, ..) -> bratio() gave error code %d"
 msgstr ""
 
-#: src/nmath/pnbinom.c:79
+#: src/nmath/pnbinom.c:82
 #, c-format
 msgid "pnbinom_mu() -> bratio() gave error code %d"
 msgstr ""
 
-#: src/nmath/pnchisq.c:246
+#: src/nmath/pnchisq.c:295
 #, c-format
 msgid "pnchisq(x=%g, ..): not converged in %d iter."
 msgstr "pnchisq(x=%g, ..): diverge nell'iterazione %d."
@@ -7404,7 +7548,7 @@ msgstr "Non è possibile accedere alle funzioni del modulo X11"
 msgid "X11 module cannot be loaded"
 msgstr "il modulo X11 non può essere caricato"
 
-#: src/unix/X11.c:126 src/unix/X11.c:132 src/unix/X11.c:138 src/unix/X11.c:144
+#: src/unix/X11.c:144 src/unix/X11.c:150 src/unix/X11.c:156 src/unix/X11.c:162
 msgid "X11 is not available"
 msgstr "X11 non disponibile"
 
@@ -7438,7 +7582,7 @@ msgstr ""
 "Lazy dynamic loading esplicito non supportato in questa piattaforma. Si "
 "utilizza quello predefinito."
 
-#: src/unix/dynload.c:240
+#: src/unix/dynload.c:232
 msgid "cannot get working directory!"
 msgstr "impossibile ottenere la directory di lavoro"
 
@@ -7454,12 +7598,12 @@ msgstr ""
 "Una circostanza inattesa si è verificata nell'annidamento dell'inout di "
 "readline.Si prega di riportare l'errore usando bug.report()"
 
-#: src/unix/sys-std.c:1082 src/unix/sys-std.c:1249
+#: src/unix/sys-std.c:1085 src/unix/sys-std.c:1255
 #, fuzzy, c-format
 msgid "problem in saving the history file '%s'"
 msgstr "è sorto un problema nel lanciare l'editor %s"
 
-#: src/unix/sys-std.c:1156
+#: src/unix/sys-std.c:1162
 #, fuzzy, c-format
 msgid ""
 "Cannot open file '%s': %s\n"
@@ -7468,90 +7612,213 @@ msgstr ""
 "impossibile aprire il file '%s'\n"
 "\n"
 
-#: src/unix/sys-std.c:1220 src/unix/sys-std.c:1243
+#: src/unix/sys-std.c:1226 src/unix/sys-std.c:1249
 msgid "'file' argument is too long"
 msgstr "argomento 'file' troppo lungo"
 
-#: src/unix/sys-std.c:1226 src/unix/sys-std.c:1228
+#: src/unix/sys-std.c:1232 src/unix/sys-std.c:1234
 msgid "no history mechanism available"
 msgstr "non esiste un meccanismo di gestione history"
 
-#: src/unix/sys-std.c:1255
+#: src/unix/sys-std.c:1261
 #, fuzzy
 msgid "problem in truncating the history file"
 msgstr "è sorto un problema nel lanciare l'editor %s"
 
-#: src/unix/sys-std.c:1257 src/unix/sys-std.c:1259
+#: src/unix/sys-std.c:1263 src/unix/sys-std.c:1265
 msgid "no history available to save"
 msgstr "nessuna history displonibile da salvare"
 
-#: src/unix/sys-std.c:1271
+#: src/unix/sys-std.c:1277
 #, fuzzy
 msgid "invalid timestamp"
 msgstr "'tag' non valido"
 
-#: src/unix/sys-unix.c:251
+#: src/unix/sys-unix.c:248
 msgid "non-empty character argument expected"
 msgstr "richiesti argomenti di tipo character non vuoti"
 
-#: src/unix/sys-unix.c:254
+#: src/unix/sys-unix.c:251
 #, fuzzy
 msgid "'intern' must be logical and not NA"
 msgstr "'ascii' deve essere di tipo logico"
 
-#: src/unix/sys-unix.c:266
+#: src/unix/sys-unix.c:269
 #, fuzzy, c-format
 msgid "cannot popen '%s', probable reason '%s'"
 msgstr "impossibile aprire il file '%s' perché '%s'"
 
-#: src/unix/sys-unix.c:271
+#: src/unix/sys-unix.c:279
 #, c-format
 msgid "line %d may be truncated in call to system(, intern = TRUE)"
 msgstr ""
 
-#: src/unix/sys-unix.c:288
+#: src/unix/sys-unix.c:301
 #, fuzzy, c-format
 msgid "error in running command: '%s'"
 msgstr "errore interno in 'unz'"
 
-#: src/unix/sys-unix.c:290
+#: src/unix/sys-unix.c:303
 #, fuzzy
 msgid "error in running command"
 msgstr "errore interno in 'unz'"
 
-#: src/unix/sys-unix.c:294
+#: src/unix/sys-unix.c:307
 #, c-format
 msgid "running command '%s' had status %d and error message '%s'"
 msgstr ""
 
-#: src/unix/sys-unix.c:399
+#: src/unix/sys-unix.c:412
 msgid "Sys.info() is not implemented on this system"
 msgstr "Sys.info() non è implementata su questo sistema"
 
-#: src/unix/system.c:257
+#: src/unix/system.c:267
 #, c-format
 msgid "WARNING: --gui or -g without value ignored"
 msgstr "ATTENZIONE: --gui o -g senza valore viene ignorata"
 
-#: src/unix/system.c:275
+#: src/unix/system.c:285
 #, c-format
 msgid "WARNING: unknown gui '%s', using X11\n"
 msgstr "ATTENZIONE: gui '%s' sconosciuta, verrà utilizzata X11\n"
 
-#: src/unix/system.c:278
+#: src/unix/system.c:288
 #, c-format
 msgid "WARNING: unknown gui '%s', using none\n"
 msgstr "ATTENZIONE: gui '%s' sconosciuta, non ne verrà utilizzata alcuna\n"
 
-#: src/unix/system.c:388
+#: src/unix/system.c:373
 #, fuzzy
 msgid "creating temporary file for '-e' failed"
 msgstr "impostazione del profile timer non riuscita"
 
-#: src/unix/system.c:469
+#: src/unix/system.c:454
 msgid "WARNING: Only editing the first in the list of files"
 msgstr "ATTENZIONE: Verrà editato solo il primo file della lista"
 
+#, fuzzy
+#~ msgid "'what' must be a character string or a function"
+#~ msgstr ""
+#~ "il primo argomento deve essere una stringa di caratteri o una funzione"
+
+#~ msgid "sockets are not available on this system"
+#~ msgstr "i socket non sono disponibili su questo sistema"
+
+#~ msgid "no function to restart"
+#~ msgstr "nessuna funzione da far ripartire"
+
+#, fuzzy
+#~ msgid "argument must be a closure"
+#~ msgstr "il secondo argomento deve essere una funzione"
+
+#~ msgid "'hostname' must be a character vector of length 1"
+#~ msgstr "'hostname' deve essere una stringa di tipo character"
+
+#~ msgid "nsl() was unable to resolve host '%s'"
+#~ msgstr "nls() non riesce a identificare l'host '%s'"
+
+#, fuzzy
+#~ msgid "unknown format returned by C function 'gethostbyname'"
+#~ msgstr "formato sconosciuto resituito da gethostbyname"
+
+#~ msgid "nsl() is not supported on this platform"
+#~ msgstr "nls() non è supportato in questa piattaforma"
+
+#~ msgid "too large a range of values in 'x'"
+#~ msgstr "range dei valori di 'x' troppo grande"
+
+#~ msgid "non-numeric argument"
+#~ msgstr "argomento non numerico"
+
+#~ msgid "unsupported URL scheme"
+#~ msgstr "schema URL non supportato"
+
+#~ msgid "'dimnames' must be a list"
+#~ msgstr "'dimnames' deve essere di tipo list"
+
+#, fuzzy
+#~ msgid "'args' must be a list"
+#~ msgstr "'dimnames' deve essere di tipo list"
+
+#~ msgid "binary operations require two arguments"
+#~ msgstr "operazioni binarie richiedono due argomenti"
+
+#~ msgid "opened URL\n"
+#~ msgstr "URL aperto\n"
+
+#, fuzzy
+#~ msgid "internet routines were already initialized"
+#~ msgstr "le routine internet non possono essere caricate"
+
+#~ msgid "'msg1' must be a character string"
+#~ msgstr "'msg1' deve essere una stringa di tipo character"
+
+#~ msgid "'msg2' must be a character string"
+#~ msgstr "'msg2' deve essere una stringa di tipo character"
+
+#~ msgid "argument 'code' must be a character string"
+#~ msgstr "l'argomento 'code' deve essere una stringa di tipo character"
+
+#, fuzzy
+#~ msgid "argument 'type' must be a character string"
+#~ msgstr "l'argomento 'code' deve essere una stringa di tipo character"
+
+#~ msgid "InternetOpenUrl timed out"
+#~ msgstr "InternetOpenUrl fuori tempo massimo"
+
+#~ msgid "Internet read timed out"
+#~ msgstr "Lettura da Internet fuori tempo massimo"
+
+#~ msgid "vfont routines cannot be accessed in module"
+#~ msgstr "le routine vfont non sono accessibili al modulo"
+
+#~ msgid "Hershey fonts cannot be loaded"
+#~ msgstr "font Hershey non caricati"
+
+#, fuzzy
+#~ msgid "invalid generic function in 'usemethod'"
+#~ msgstr "funzione generica non valida per 'usemethod'"
+
+#, fuzzy
+#~ msgid "'UseMethod' called from outside a function"
+#~ msgstr "'NextMethod' chiamato al di fuori di una chiusura"
+
+#~ msgid "first argument must be a generic name"
+#~ msgstr "il primo argomento deve essere un nome generico"
+
+#~ msgid ""
+#~ "explicit request not to duplicate arguments in call to '%s', but argument "
+#~ "%d is of the wrong type (%d != %d)"
+#~ msgstr ""
+#~ "richiesta esplicita di non duplicare gli argomenti nella chiamata a '%s', "
+#~ "ma l'argomento %d è di tipo sbagliato (%d != %d)"
+
+#~ msgid "character variables must be duplicated in .C/.Fortran"
+#~ msgstr ""
+#~ "le variabili di tipo character devono essere duplicate in .C/.Fortran"
+
+#~ msgid "call name too long in '%s'"
+#~ msgstr "nome chiamata troppo lungo in '%s'"
+
+#~ msgid "generic name too long in '%s'"
+#~ msgstr "nome generico troppo lungo in '%s'"
+
+#~ msgid "method name too long in '%s'"
+#~ msgstr "nome metodo troppo lungo in '%s'"
+
+#~ msgid "%d arguments passed to 'log' which requires 1 or 2"
+#~ msgstr "%d argomenti passati a 'log' che ne richiede 1 o 2"
+
+#, fuzzy
+#~ msgid ""
+#~ "Warning in %s :\n"
+#~ "  %s\n"
+#~ msgstr "Avviso in %s : "
+
+#, fuzzy
+#~ msgid "symbol"
+#~ msgstr "non è un simbolo"
+
 #~ msgid "negative value in 'x'"
 #~ msgstr "valore negativo in 'x'"
 
@@ -7646,9 +7913,6 @@ msgstr "ATTENZIONE: Verrà editato solo il primo file della lista"
 #~ msgid "invalid return value count in call_R"
 #~ msgstr "numero di valori restituiti non valido in call_R"
 
-#~ msgid "internal error in unz code"
-#~ msgstr "errore interno in 'unz'"
-
 #~ msgid "can't use R profiling while byte code profiling"
 #~ msgstr "non posso usare il profiling di R mentre è in atto quello byte code"
 
@@ -7830,18 +8094,10 @@ msgstr "ATTENZIONE: Verrà editato solo il primo file della lista"
 #~ msgstr "'title' deve essere una stringa di tipo character"
 
 #, fuzzy
-#~ msgid "'text' must be a character string"
-#~ msgstr "'title' deve essere una stringa di tipo character"
-
-#, fuzzy
 #~ msgid "'%s' must be length 1"
 #~ msgstr "'which' deve essere di lunghezza 1"
 
 #, fuzzy
-#~ msgid "'%s' must be a list"
-#~ msgstr "'dimnames' deve essere di tipo list"
-
-#, fuzzy
 #~ msgid "'%s' element %d is not a window handle"
 #~ msgstr "'%s' non è una chiamata valida"
 
@@ -7871,9 +8127,6 @@ msgstr "ATTENZIONE: Verrà editato solo il primo file della lista"
 #~ msgid "'file' is not a connection"
 #~ msgstr "'file' non è una connessione"
 
-#~ msgid "'dec' must be a single character"
-#~ msgstr "'dec' deve un singolo carattere"
-
 #~ msgid "corrupt data frame -- length of column %d does not not match nrows"
 #~ msgstr ""
 #~ "data frame danneggiato - la lunghezza della colonna %d non coincide con "
diff --git a/src/library/base/po/ja.po b/src/library/base/po/ja.po
index 3ee3883..356107d 100644
--- a/src/library/base/po/ja.po
+++ b/src/library/base/po/ja.po
@@ -5,9 +5,9 @@
 msgid ""
 msgstr ""
 "Project-Id-Version: R 2.5.0 \n"
-"Report-Msgid-Bugs-To: bugs.r-project.org\n"
-"POT-Creation-Date: 2014-03-27 07:46+0000\n"
-"PO-Revision-Date: 2014-03-26 13:54+0200 \n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2016-04-01 10:28-0700\n"
+"PO-Revision-Date: 2015-03-27 14:41+0900 \n"
 "Last-Translator: Masafumi  \n"
 "Language-Team: R-core <R-core at R-project.org> \n"
 "Language: ja \n"
@@ -15,7 +15,8 @@ msgstr ""
 "Content-Type: text/plain; charset=UTF-8 \n"
 "Content-Transfer-Encoding: 8bit \n"
 "Plural-Forms: nplurals=1; plural=0; \n"
-"X-Generator: Pootle 2.0.5 \n"
+"X-Generator: Pootle 2.5.1.1 \n"
+"X-POOTLE-MTIME: 1427434877.000000 \n"
 
 #: src/appl/optim.c:60
 msgid "non-finite value supplied by 'optim'"
@@ -50,15 +51,15 @@ msgstr " 初期パラメータで関数の評価ができません "
 msgid "unknown type in \"CG\" method of 'optim'"
 msgstr " 'optim' の \"CG\" 法のタイプが不明です "
 
-#: src/appl/optim.c:665
+#: src/appl/optim.c:662
 msgid "REPORT must be > 0 (method = \"L-BFGS-B\")"
 msgstr " REPORT は正の値でなければなりません (method = \"L-BFGS-B\") "
 
-#: src/appl/optim.c:688
+#: src/appl/optim.c:685
 msgid "L-BFGS-B needs finite values of 'fn'"
 msgstr " L-BFGS-B は有限な 'fn' の値を必要とします "
 
-#: src/appl/optim.c:744
+#: src/appl/optim.c:741
 msgid "trace, REPORT must be >= 0 (method = \"SANN\")"
 msgstr " REPORT は正の値でなければなりません (method = \"SANN\") "
 
@@ -123,122 +124,127 @@ msgstr " '%ls' へのアクセスが拒否されました "
 msgid "problem in displaying '%ls'"
 msgstr " '%ls' の表示に問題があります "
 
-#: src/gnuwin32/extra.c:116 src/gnuwin32/extra.c:159 src/gnuwin32/extra.c:349
-#: src/gnuwin32/extra.c:577 src/gnuwin32/extra.c:602 src/main/agrep.c:131
-#: src/main/agrep.c:135 src/main/agrep.c:775 src/main/agrep.c:780
-#: src/main/apply.c:293 src/main/apply.c:295 src/main/apply.c:298
-#: src/main/array.c:87 src/main/array.c:1137 src/main/array.c:1263
-#: src/main/array.c:1265 src/main/array.c:1266 src/main/array.c:1592
-#: src/main/array.c:1594 src/main/array.c:1596 src/main/attrib.c:196
+#: src/gnuwin32/extra.c:116 src/gnuwin32/extra.c:158 src/gnuwin32/extra.c:348
+#: src/gnuwin32/extra.c:574 src/gnuwin32/extra.c:599 src/main/agrep.c:131
+#: src/main/agrep.c:135 src/main/agrep.c:776 src/main/agrep.c:781
+#: src/main/apply.c:330 src/main/apply.c:332 src/main/apply.c:335
+#: src/main/array.c:90 src/main/array.c:1272 src/main/array.c:1411
+#: src/main/array.c:1413 src/main/array.c:1414 src/main/array.c:1758
+#: src/main/array.c:1760 src/main/array.c:1762 src/main/attrib.c:190
 #: src/main/builtin.c:88 src/main/builtin.c:97 src/main/builtin.c:116
-#: src/main/builtin.c:118 src/main/builtin.c:147 src/main/builtin.c:534
-#: src/main/builtin.c:550 src/main/builtin.c:739 src/main/builtin.c:741
-#: src/main/builtin.c:743 src/main/character.c:139 src/main/character.c:142
-#: src/main/character.c:203 src/main/character.c:1037
-#: src/main/character.c:1041 src/main/character.c:1276
-#: src/main/character.c:1280 src/main/character.c:1341
-#: src/main/character.c:1344 src/main/connections.c:1217
-#: src/main/connections.c:1223 src/main/connections.c:1226
-#: src/main/connections.c:1230 src/main/connections.c:1375
-#: src/main/connections.c:1391 src/main/connections.c:1396
-#: src/main/connections.c:1996 src/main/connections.c:2002
-#: src/main/connections.c:2006 src/main/connections.c:2010
-#: src/main/connections.c:2015 src/main/connections.c:2665
-#: src/main/connections.c:2670 src/main/connections.c:2673
-#: src/main/connections.c:2676 src/main/connections.c:3057
-#: src/main/connections.c:3062 src/main/connections.c:3068
-#: src/main/connections.c:3071 src/main/connections.c:3075
-#: src/main/connections.c:3090 src/main/connections.c:3140
-#: src/main/connections.c:3145 src/main/connections.c:3149
-#: src/main/connections.c:3153 src/main/connections.c:3157
-#: src/main/connections.c:3163 src/main/connections.c:3210
-#: src/main/connections.c:3216 src/main/connections.c:3220
-#: src/main/connections.c:3270 src/main/connections.c:3273
-#: src/main/connections.c:3547 src/main/connections.c:3550
-#: src/main/connections.c:3553 src/main/connections.c:3559
-#: src/main/connections.c:3666 src/main/connections.c:3672
-#: src/main/connections.c:3675 src/main/connections.c:3826
-#: src/main/connections.c:3829 src/main/connections.c:3833
-#: src/main/connections.c:3836 src/main/connections.c:3956
-#: src/main/connections.c:4074 src/main/connections.c:4077
-#: src/main/connections.c:4414 src/main/connections.c:4439
-#: src/main/connections.c:4474 src/main/connections.c:4489
-#: src/main/connections.c:4497 src/main/connections.c:4523
-#: src/main/connections.c:4669 src/main/connections.c:4673
-#: src/main/connections.c:4801 src/main/connections.c:4803
-#: src/main/connections.c:4805 src/main/connections.c:4833
-#: src/main/connections.c:4965 src/main/connections.c:4991
-#: src/main/connections.c:4995 src/main/connections.c:4999
-#: src/main/connections.c:5003 src/main/context.c:596 src/main/context.c:605
-#: src/main/context.c:609 src/main/datetime.c:775 src/main/datetime.c:865
-#: src/main/datetime.c:867 src/main/datetime.c:871 src/main/datetime.c:1026
-#: src/main/datetime.c:1028 src/main/datetime.c:1232 src/main/debug.c:228
-#: src/main/deparse.c:397 src/main/dotcode.c:478 src/main/dotcode.c:482
-#: src/main/dotcode.c:487 src/main/dounzip.c:322 src/main/dounzip.c:329
-#: src/main/dounzip.c:339 src/main/dounzip.c:344 src/main/dounzip.c:348
-#: src/main/dounzip.c:352 src/main/envir.c:1618 src/main/envir.c:1621
-#: src/main/envir.c:1742 src/main/envir.c:1747 src/main/envir.c:1813
-#: src/main/envir.c:1829 src/main/envir.c:1835 src/main/envir.c:1932
-#: src/main/envir.c:1940 src/main/envir.c:1947 src/main/envir.c:1958
-#: src/main/envir.c:2172 src/main/envir.c:2293 src/main/envir.c:2552
-#: src/main/envir.c:2762 src/main/envir.c:2776 src/main/envir.c:2783
-#: src/main/envir.c:2799 src/main/envir.c:3367 src/main/errors.c:1030
-#: src/main/eval.c:397 src/main/eval.c:406 src/main/eval.c:409
-#: src/main/grep.c:767 src/main/grep.c:772 src/main/grep.c:1061
-#: src/main/grep.c:1063 src/main/grep.c:1065 src/main/grep.c:1510
-#: src/main/grep.c:1514 src/main/grep.c:1519 src/main/grep.c:2323
-#: src/main/grep.c:2328 src/main/grep.c:2621 src/main/grep.c:2626
-#: src/main/memory.c:3736 src/main/paste.c:96 src/main/paste.c:395
-#: src/main/paste.c:402 src/main/paste.c:409 src/main/paste.c:414
-#: src/main/paste.c:419 src/main/paste.c:424 src/main/paste.c:427
-#: src/main/paste.c:435 src/main/paste.c:601 src/main/paste.c:606
+#: src/main/builtin.c:118 src/main/builtin.c:149 src/main/builtin.c:569
+#: src/main/builtin.c:585 src/main/builtin.c:773 src/main/builtin.c:775
+#: src/main/builtin.c:777 src/main/character.c:239 src/main/character.c:242
+#: src/main/character.c:247 src/main/character.c:788 src/main/character.c:791
+#: src/main/character.c:1289 src/main/character.c:1293
+#: src/main/character.c:1528 src/main/character.c:1532
+#: src/main/character.c:1593 src/main/character.c:1596
+#: src/main/connections.c:1208 src/main/connections.c:1214
+#: src/main/connections.c:1217 src/main/connections.c:1221
+#: src/main/connections.c:1367 src/main/connections.c:1383
+#: src/main/connections.c:1388 src/main/connections.c:1989
+#: src/main/connections.c:1995 src/main/connections.c:1999
+#: src/main/connections.c:2003 src/main/connections.c:2008
+#: src/main/connections.c:2659 src/main/connections.c:2664
+#: src/main/connections.c:2667 src/main/connections.c:2670
+#: src/main/connections.c:3053 src/main/connections.c:3058
+#: src/main/connections.c:3064 src/main/connections.c:3067
+#: src/main/connections.c:3071 src/main/connections.c:3086
+#: src/main/connections.c:3135 src/main/connections.c:3140
+#: src/main/connections.c:3144 src/main/connections.c:3148
+#: src/main/connections.c:3152 src/main/connections.c:3158
+#: src/main/connections.c:3203 src/main/connections.c:3209
+#: src/main/connections.c:3213 src/main/connections.c:3264
+#: src/main/connections.c:3267 src/main/connections.c:3543
+#: src/main/connections.c:3546 src/main/connections.c:3549
+#: src/main/connections.c:3555 src/main/connections.c:3662
+#: src/main/connections.c:3668 src/main/connections.c:3671
+#: src/main/connections.c:3823 src/main/connections.c:3826
+#: src/main/connections.c:3830 src/main/connections.c:3833
+#: src/main/connections.c:3954 src/main/connections.c:4085
+#: src/main/connections.c:4088 src/main/connections.c:4425
+#: src/main/connections.c:4450 src/main/connections.c:4485
+#: src/main/connections.c:4500 src/main/connections.c:4508
+#: src/main/connections.c:4534 src/main/connections.c:4680
+#: src/main/connections.c:4684 src/main/connections.c:4814
+#: src/main/connections.c:4816 src/main/connections.c:4818
+#: src/main/connections.c:4846 src/main/connections.c:4980
+#: src/main/connections.c:5019 src/main/connections.c:5024
+#: src/main/connections.c:5029 src/main/connections.c:5050
+#: src/main/context.c:607 src/main/context.c:616 src/main/context.c:620
+#: src/main/datetime.c:781 src/main/datetime.c:869 src/main/datetime.c:872
+#: src/main/datetime.c:876 src/main/datetime.c:1043 src/main/datetime.c:1045
+#: src/main/datetime.c:1250 src/main/debug.c:245 src/main/deparse.c:408
+#: src/main/dotcode.c:496 src/main/dotcode.c:500 src/main/dotcode.c:505
+#: src/main/dounzip.c:323 src/main/dounzip.c:330 src/main/dounzip.c:340
+#: src/main/dounzip.c:345 src/main/dounzip.c:349 src/main/dounzip.c:353
+#: src/main/envir.c:1752 src/main/envir.c:1755 src/main/envir.c:1876
+#: src/main/envir.c:1881 src/main/envir.c:1945 src/main/envir.c:1961
+#: src/main/envir.c:1967 src/main/envir.c:2079 src/main/envir.c:2087
+#: src/main/envir.c:2094 src/main/envir.c:2105 src/main/envir.c:2337
+#: src/main/envir.c:2458 src/main/envir.c:2755 src/main/envir.c:3022
+#: src/main/envir.c:3036 src/main/envir.c:3043 src/main/envir.c:3059
+#: src/main/envir.c:3642 src/main/errors.c:1011 src/main/eval.c:454
+#: src/main/eval.c:463 src/main/eval.c:466 src/main/grep.c:780
+#: src/main/grep.c:785 src/main/grep.c:1079 src/main/grep.c:1081
+#: src/main/grep.c:1083 src/main/grep.c:1528 src/main/grep.c:1532
+#: src/main/grep.c:1537 src/main/grep.c:2345 src/main/grep.c:2350
+#: src/main/grep.c:2652 src/main/grep.c:2657 src/main/memory.c:3823
+#: src/main/paste.c:96 src/main/paste.c:392 src/main/paste.c:399
+#: src/main/paste.c:406 src/main/paste.c:411 src/main/paste.c:416
+#: src/main/paste.c:421 src/main/paste.c:424 src/main/paste.c:432
+#: src/main/paste.c:437 src/main/paste.c:619 src/main/paste.c:624
 #: src/main/platform.c:306 src/main/platform.c:308 src/main/platform.c:310
 #: src/main/platform.c:326 src/main/platform.c:337 src/main/platform.c:390
-#: src/main/platform.c:392 src/main/platform.c:705 src/main/platform.c:707
-#: src/main/platform.c:1064 src/main/platform.c:1070 src/main/platform.c:1073
-#: src/main/platform.c:1076 src/main/platform.c:1079 src/main/platform.c:1082
-#: src/main/platform.c:1085 src/main/platform.c:1088 src/main/platform.c:1185
-#: src/main/platform.c:1188 src/main/platform.c:1191 src/main/platform.c:1229
-#: src/main/platform.c:1286 src/main/platform.c:1289 src/main/platform.c:1498
-#: src/main/platform.c:1501 src/main/platform.c:1504 src/main/platform.c:1540
-#: src/main/platform.c:1543 src/main/platform.c:1546 src/main/platform.c:1629
-#: src/main/platform.c:1645 src/main/platform.c:1684 src/main/platform.c:1686
-#: src/main/platform.c:1757 src/main/platform.c:1841 src/main/platform.c:2116
-#: src/main/platform.c:2176 src/main/platform.c:2353 src/main/platform.c:2356
-#: src/main/platform.c:2359 src/main/platform.c:2362 src/main/platform.c:2365
-#: src/main/platform.c:2368 src/main/platform.c:2568 src/main/platform.c:2571
-#: src/main/platform.c:2574 src/main/platform.c:2577 src/main/platform.c:2580
-#: src/main/platform.c:2583 src/main/platform.c:2657 src/main/platform.c:2665
-#: src/main/platform.c:2701 src/main/platform.c:2751 src/main/print.c:242
-#: src/main/print.c:248 src/main/print.c:270 src/main/print.c:276
-#: src/main/print.c:283 src/main/random.c:478 src/main/random.c:482
-#: src/main/random.c:489 src/main/random.c:517 src/main/saveload.c:1950
-#: src/main/saveload.c:1953 src/main/saveload.c:1956 src/main/saveload.c:2072
-#: src/main/saveload.c:2252 src/main/saveload.c:2257 src/main/saveload.c:2260
+#: src/main/platform.c:392 src/main/platform.c:708 src/main/platform.c:710
+#: src/main/platform.c:800 src/main/platform.c:1138 src/main/platform.c:1144
+#: src/main/platform.c:1147 src/main/platform.c:1150 src/main/platform.c:1153
+#: src/main/platform.c:1156 src/main/platform.c:1159 src/main/platform.c:1162
+#: src/main/platform.c:1259 src/main/platform.c:1262 src/main/platform.c:1265
+#: src/main/platform.c:1303 src/main/platform.c:1361 src/main/platform.c:1364
+#: src/main/platform.c:1573 src/main/platform.c:1576 src/main/platform.c:1579
+#: src/main/platform.c:1615 src/main/platform.c:1618 src/main/platform.c:1621
+#: src/main/platform.c:1657 src/main/platform.c:1690 src/main/platform.c:1692
+#: src/main/platform.c:1763 src/main/platform.c:1848 src/main/platform.c:2089
+#: src/main/platform.c:2149 src/main/platform.c:2334 src/main/platform.c:2337
+#: src/main/platform.c:2340 src/main/platform.c:2343 src/main/platform.c:2346
+#: src/main/platform.c:2349 src/main/platform.c:2555 src/main/platform.c:2558
+#: src/main/platform.c:2561 src/main/platform.c:2564 src/main/platform.c:2567
+#: src/main/platform.c:2570 src/main/platform.c:2648 src/main/platform.c:2656
+#: src/main/platform.c:2692 src/main/platform.c:2742 src/main/print.c:235
+#: src/main/print.c:241 src/main/print.c:263 src/main/print.c:269
+#: src/main/print.c:276 src/main/random.c:470 src/main/random.c:474
+#: src/main/random.c:481 src/main/random.c:509 src/main/saveload.c:1952
+#: src/main/saveload.c:1955 src/main/saveload.c:1958 src/main/saveload.c:2074
+#: src/main/saveload.c:2254 src/main/saveload.c:2259 src/main/saveload.c:2262
 #: src/main/saveload.c:2366 src/main/scan.c:684 src/main/scan.c:853
 #: src/main/scan.c:867 src/main/scan.c:871 src/main/scan.c:873
 #: src/main/scan.c:884 src/main/scan.c:911 src/main/scan.c:914
-#: src/main/scan.c:917 src/main/scan.c:972 src/main/seq.c:618
-#: src/main/seq.c:623 src/main/seq.c:631 src/main/seq.c:662 src/main/seq.c:666
-#: src/main/seq.c:672 src/main/seq.c:680 src/main/sort.c:175
-#: src/main/sysutils.c:585 src/main/sysutils.c:589 src/main/sysutils.c:593
-#: src/main/sysutils.c:599 src/main/sysutils.c:603 src/main/sysutils.c:1831
-#: src/main/sysutils.c:1835 src/main/unique.c:966 src/main/unique.c:1289
-#: src/main/unique.c:1349 src/main/unique.c:1356 src/main/unique.c:1750
-#: src/main/util.c:581 src/main/util.c:584 src/main/util.c:1825
-#: src/main/util.c:1994 src/main/util.c:1995 src/main/util.c:1996
-#: src/main/util.c:2013 src/main/util.c:2037 src/main/util.c:2041
-#: src/main/util.c:2043 src/main/util.c:2068 src/main/util.c:2070
-#: src/main/util.c:2072 src/main/util.c:2075 src/main/util.c:2078
-#: src/main/util.c:2082 src/main/util.c:2084 src/modules/X11/devX11.c:3241
-#: src/modules/X11/devX11.c:3244 src/modules/X11/devX11.c:3247
-#: src/modules/X11/devX11.c:3271 src/modules/internet/internet.c:284
-#: src/modules/internet/internet.c:290 src/modules/internet/internet.c:296
-#: src/modules/internet/internet.c:299 src/modules/internet/internet.c:303
+#: src/main/scan.c:917 src/main/scan.c:972 src/main/seq.c:622
+#: src/main/seq.c:627 src/main/seq.c:635 src/main/seq.c:666 src/main/seq.c:670
+#: src/main/seq.c:676 src/main/seq.c:684 src/main/sort.c:175
+#: src/main/sysutils.c:597 src/main/sysutils.c:601 src/main/sysutils.c:605
+#: src/main/sysutils.c:611 src/main/sysutils.c:615 src/main/sysutils.c:1787
+#: src/main/sysutils.c:1791 src/main/unique.c:1029 src/main/unique.c:1337
+#: src/main/unique.c:1341 src/main/unique.c:1351 src/main/unique.c:1747
+#: src/main/util.c:636 src/main/util.c:639 src/main/util.c:1379
+#: src/main/util.c:1393 src/main/util.c:1975 src/main/util.c:2198
+#: src/main/util.c:2199 src/main/util.c:2200 src/main/util.c:2217
+#: src/main/util.c:2245 src/main/util.c:2249 src/main/util.c:2251
+#: src/main/util.c:2277 src/main/util.c:2279 src/main/util.c:2281
+#: src/main/util.c:2284 src/main/util.c:2287 src/main/util.c:2291
+#: src/main/util.c:2293 src/modules/X11/devX11.c:3247
+#: src/modules/X11/devX11.c:3250 src/modules/X11/devX11.c:3253
+#: src/modules/X11/devX11.c:3277 src/modules/internet/internet.c:453
+#: src/modules/internet/internet.c:459 src/modules/internet/internet.c:465
+#: src/modules/internet/internet.c:468 src/modules/internet/internet.c:472
+#: src/modules/internet/internet.c:477 src/modules/internet/libcurl.c:414
+#: src/modules/internet/libcurl.c:418 src/modules/internet/libcurl.c:423
+#: src/modules/internet/libcurl.c:426 src/modules/internet/libcurl.c:430
 #: src/modules/lapack/Lapack.c:155 src/modules/lapack/Lapack.c:261
 #: src/modules/lapack/Lapack.c:709 src/modules/lapack/Lapack.c:818
-#: src/modules/lapack/Lapack.c:880 src/modules/lapack/Lapack.c:1214
-#: src/unix/sys-std.c:1217 src/unix/sys-std.c:1240
+#: src/modules/lapack/Lapack.c:880 src/modules/lapack/Lapack.c:1215
+#: src/unix/sys-std.c:1223 src/unix/sys-std.c:1246
 #, c-format
 msgid "invalid '%s' argument"
 msgstr " '%s' 引数が不正です "
@@ -247,367 +253,344 @@ msgstr " '%s' 引数が不正です "
 msgid "unsupported version of Windows"
 msgstr " このバージョンの Windows はサポートされていません "
 
-#: src/gnuwin32/extra.c:267 src/main/apply.c:105 src/main/character.c:595
-#: src/main/connections.c:3555 src/main/context.c:642 src/main/context.c:661
-#: src/main/datetime.c:675 src/main/datetime.c:777 src/main/datetime.c:1030
-#: src/main/dotcode.c:199 src/main/errors.c:929 src/main/errors.c:962
-#: src/main/errors.c:1065 src/main/errors.c:1090 src/main/errors.c:1095
-#: src/main/errors.c:1368 src/main/identical.c:66 src/main/identical.c:67
-#: src/main/identical.c:68 src/main/identical.c:69 src/main/identical.c:70
-#: src/main/seq.c:185 src/main/seq.c:341 src/main/seq.c:346 src/main/seq.c:350
-#: src/main/seq.c:391 src/main/seq.c:395 src/main/seq.c:399
-#: src/main/sort.c:1224 src/main/sort.c:1307 src/main/sort.c:1311
-#: src/main/sort.c:1318 src/main/sort.c:1393 src/main/source.c:220
-#: src/main/summary.c:886 src/main/sysutils.c:251 src/main/util.c:986
-#: src/main/util.c:991 src/main/util.c:998 src/main/util.c:1001
-#: src/modules/X11/devX11.c:3142 src/modules/X11/devX11.c:3169
-#: src/modules/X11/devX11.c:3174 src/modules/X11/devX11.c:3179
-#: src/modules/X11/devX11.c:3189 src/modules/X11/devX11.c:3194
-#: src/modules/X11/devX11.c:3198 src/modules/X11/devX11.c:3202
-#: src/unix/sys-std.c:1291
-#, c-format
-msgid "invalid '%s' value"
-msgstr " '%s' の値が不正です "
-
-#: src/gnuwin32/extra.c:308 src/gnuwin32/extra.c:321
+#: src/gnuwin32/extra.c:313 src/gnuwin32/extra.c:324
 msgid "incorrect argument"
 msgstr " 正しくない引数です "
 
-#: src/gnuwin32/extra.c:312
+#: src/gnuwin32/extra.c:316
 msgid "don't be silly!: your machine has a 4Gb address limit"
 msgstr " あらら!あなたのマシンのアドレス空間の上限は 4Gb です "
 
-#: src/gnuwin32/extra.c:316
+#: src/gnuwin32/extra.c:320
 msgid "cannot decrease memory limit: ignored"
 msgstr " メモリー限界を減らすことができません: 無視しました "
 
-#: src/gnuwin32/extra.c:428 src/gnuwin32/extra.c:529 src/main/util.c:897
+#: src/gnuwin32/extra.c:427 src/gnuwin32/extra.c:528 src/main/util.c:962
 msgid "'path' must be a character vector"
 msgstr " 'path' は文字ベクトルでなくてはなりません "
 
-#: src/gnuwin32/extra.c:579 src/gnuwin32/extra.c:581 src/gnuwin32/extra.c:604
-#: src/gnuwin32/extra.c:606 src/gnuwin32/extra.c:641 src/main/gevents.c:61
+#: src/gnuwin32/extra.c:576 src/gnuwin32/extra.c:578 src/gnuwin32/extra.c:601
+#: src/gnuwin32/extra.c:603 src/gnuwin32/extra.c:638 src/main/gevents.c:61
 #: src/main/gevents.c:98
 msgid "invalid device"
 msgstr " 不正な装置です "
 
-#: src/gnuwin32/extra.c:582
+#: src/gnuwin32/extra.c:579
 msgid "requires SDI mode"
 msgstr " SDI モードが要求されます "
 
-#: src/gnuwin32/extra.c:635 src/main/gevents.c:58 src/main/gevents.c:95
+#: src/gnuwin32/extra.c:632 src/main/gevents.c:58 src/main/gevents.c:95
 msgid "invalid graphical device number"
 msgstr " グラフィックスデバイス番号が不正です "
 
-#: src/gnuwin32/extra.c:645
+#: src/gnuwin32/extra.c:642
 msgid "bad device"
 msgstr " 不正な装置です "
 
-#: src/gnuwin32/extra.c:799 src/gnuwin32/extra.c:807
+#: src/gnuwin32/extra.c:796 src/gnuwin32/extra.c:804
 msgid "invalid input in 'Rmbstowcs'"
 msgstr " 'Rmbstowcs' への入力が不正です "
 
-#: src/gnuwin32/extra.c:830 src/main/platform.c:1261
+#: src/gnuwin32/extra.c:827 src/main/platform.c:1336
 msgid "file choice cancelled"
 msgstr " ファイルの選択がキャンセルされました "
 
-#: src/gnuwin32/run.c:242
+#: src/gnuwin32/run.c:244
 #, c-format
 msgid "'CreateProcess' failed to run '%s'"
 msgstr " 'CreateProcess' が '%s' を実行できませんでした "
 
-#: src/gnuwin32/run.c:344
+#: src/gnuwin32/run.c:346
 msgid "Child process not responding.  R will terminate it."
 msgstr " 子プロセスが応答しないため、強制終了させます。 "
 
-#: src/gnuwin32/run.c:402
+#: src/gnuwin32/run.c:404
 #, c-format
 msgid "Exit code was %d"
 msgstr " 終了コードは %d でした "
 
-#: src/gnuwin32/run.c:434
+#: src/gnuwin32/run.c:436
 msgid "Insufficient memory (rpipeOpen)"
 msgstr " メモリが不足しています (rpipeOpen) "
 
-#: src/gnuwin32/run.c:648 src/main/dounzip.c:482
+#: src/gnuwin32/run.c:650 src/main/dounzip.c:481
 msgid "seek not enabled for this connection"
 msgstr " このコネクションではシークが有効になっていません "
 
-#: src/gnuwin32/run.c:654
+#: src/gnuwin32/run.c:656
 msgid "truncate not enabled for this connection"
 msgstr " このコネクションでは切りつめは有効ではありません "
 
-#: src/gnuwin32/run.c:729 src/gnuwin32/run.c:733 src/gnuwin32/run.c:746
-#: src/gnuwin32/run.c:774 src/main/connections.c:1330
-#: src/main/connections.c:1334 src/main/connections.c:1340
-#: src/main/connections.c:1354
+#: src/gnuwin32/run.c:731 src/gnuwin32/run.c:735 src/gnuwin32/run.c:748
+#: src/gnuwin32/run.c:776 src/main/connections.c:1322
+#: src/main/connections.c:1326 src/main/connections.c:1332
+#: src/main/connections.c:1346
 msgid "allocation of pipe connection failed"
 msgstr " パイプ接続の割り当てに失敗しました "
 
-#: src/gnuwin32/run.c:788
+#: src/gnuwin32/run.c:790
 msgid "'names' is not a character vector"
 msgstr " 'names' は文字ベクトルではありません "
 
-#: src/gnuwin32/sys-win32.c:182
+#: src/gnuwin32/sys-win32.c:180
 msgid "character string expected as first argument"
 msgstr " 最初の引数には文字列が期待されています "
 
-#: src/gnuwin32/sys-win32.c:191
+#: src/gnuwin32/sys-win32.c:189
 msgid "character string expected as third argument"
 msgstr " 三番目の引数には文字列が期待されています "
 
-#: src/gnuwin32/sys-win32.c:257 src/unix/sys-unix.c:299
+#: src/gnuwin32/sys-win32.c:255 src/unix/sys-unix.c:312
 #, c-format
 msgid "running command '%s' had status %d"
 msgstr " 命令 '%s' の実行は状態 %d を持ちました "
 
-#: src/gnuwin32/system.c:122 src/unix/sys-unix.c:427
+#: src/gnuwin32/system.c:121 src/unix/sys-unix.c:440
 msgid "reached session elapsed time limit"
 msgstr " セッション時間が経過して上限に達しました "
 
-#: src/gnuwin32/system.c:124 src/unix/sys-unix.c:429
+#: src/gnuwin32/system.c:123 src/unix/sys-unix.c:442
 msgid "reached elapsed time limit"
 msgstr " 時間が経過して上限に達しました "
 
-#: src/gnuwin32/system.c:130 src/unix/sys-unix.c:435
+#: src/gnuwin32/system.c:129 src/unix/sys-unix.c:448
 msgid "reached session CPU time limit"
 msgstr " セッション CPU 時間が経過して上限に達しました "
 
-#: src/gnuwin32/system.c:132 src/unix/sys-unix.c:437
+#: src/gnuwin32/system.c:131 src/unix/sys-unix.c:450
 msgid "reached CPU time limit"
 msgstr " CPU 時間が経過して上限に達しました "
 
-#: src/gnuwin32/system.c:157
+#: src/gnuwin32/system.c:156
 #, c-format
 msgid "Fatal error: %s\n"
 msgstr " 致命的なエラーです: %s \n"
 
-#: src/gnuwin32/system.c:335 src/unix/sys-std.c:863
+#: src/gnuwin32/system.c:334 src/unix/sys-std.c:866
 #, c-format
 msgid "encoding '%s' is not recognised"
 msgstr " '%s' というエンコーディングは認識できません "
 
-#: src/gnuwin32/system.c:341 src/unix/sys-std.c:869
+#: src/gnuwin32/system.c:340 src/unix/sys-std.c:872
 #, c-format
 msgid "<ERROR: re-encoding failure from encoding '%s'>\n"
 msgstr ""
 " <エラー: エンコーディング '%s' からの再エンコーディングに失敗しました> \n"
 
-#: src/gnuwin32/system.c:555 src/gnuwin32/system.c:1049
-#: src/gnuwin32/system.c:1061 src/main/connections.c:590
-#: src/main/connections.c:595 src/main/dounzip.c:177 src/main/saveload.c:1961
-#: src/main/serialize.c:2552 src/main/serialize.c:2557
-#: src/main/serialize.c:2642 src/main/serialize.c:2687 src/unix/system.c:323
-#: src/unix/system.c:343
+#: src/gnuwin32/system.c:562 src/gnuwin32/system.c:1058
+#: src/gnuwin32/system.c:1070 src/main/connections.c:581
+#: src/main/connections.c:586 src/main/dounzip.c:178 src/main/saveload.c:1963
+#: src/main/serialize.c:2598 src/main/serialize.c:2603
+#: src/main/serialize.c:2688 src/main/serialize.c:2733 src/unix/system.c:328
 #, c-format
 msgid "cannot open file '%s': %s"
 msgstr " ファイル '%s' を開くことができません: %s "
 
-#: src/gnuwin32/system.c:569
+#: src/gnuwin32/system.c:576
 #, c-format
 msgid "file.show(): file '%s' does not exist\n"
 msgstr " file.show(): ファイル '%s' は存在しません \n"
 
-#: src/gnuwin32/system.c:970
+#: src/gnuwin32/system.c:979
 #, c-format
 msgid "WARNING: R_MAX_MEM_SIZE value is invalid: ignored\n"
 msgstr " 警告: R_MAX_MEM_SIZE 値が不正なので無視されました \n"
 
-#: src/gnuwin32/system.c:1002
+#: src/gnuwin32/system.c:1011
 msgid "WARNING: no max-mem-size given\n"
 msgstr " 警告: max-mem-size が与えられていません \n"
 
-#: src/gnuwin32/system.c:1009
+#: src/gnuwin32/system.c:1018
 #, c-format
 msgid "WARNING: --max-mem-size value is invalid: ignored\n"
 msgstr " 警告: --max-mem-size 値が不正です: 無視されました \n"
 
-#: src/gnuwin32/system.c:1012
+#: src/gnuwin32/system.c:1021
 #, c-format
 msgid "WARNING: --max-mem-size=%lu%c: too large and ignored\n"
 msgstr " 警告: --max-mem-size=%lu%c は大きすぎるので無視されました \n"
 
-#: src/gnuwin32/system.c:1018
+#: src/gnuwin32/system.c:1027
 #, c-format
 msgid "WARNING: --max-mem-size=%4.1fM: too small and ignored\n"
 msgstr " 警告: max-mem-size=%4.1fM は小さすぎるので無視されます \n"
 
-#: src/gnuwin32/system.c:1023
+#: src/gnuwin32/system.c:1032
 #, c-format
 msgid "WARNING: --max-mem-size=%4.0fM: too large and taken as %uM\n"
 msgstr " 警告: max-mem-size=%4.0fM は大きすぎるので %uM とされました \n"
 
-#: src/gnuwin32/system.c:1039
+#: src/gnuwin32/system.c:1048
 #, c-format
 msgid "option '%s' requires an argument"
 msgstr " オプション '%s' には引数が必要です "
 
-#: src/gnuwin32/system.c:1070
+#: src/gnuwin32/system.c:1079
 #, c-format
 msgid "option '%s' requires a non-empty argument"
 msgstr " オプション '%s' は空でない引数が必要です "
 
-#: src/gnuwin32/system.c:1078 src/unix/system.c:362
+#: src/gnuwin32/system.c:1087 src/unix/system.c:347
 #, c-format
 msgid "WARNING: '-e %s' omitted as input is too long\n"
 msgstr " 警告: 入力が長すぎるため, '-e %s' は省略されました \n"
 
-#: src/gnuwin32/system.c:1082 src/unix/system.c:375
+#: src/gnuwin32/system.c:1091 src/unix/system.c:360
 #, c-format
 msgid "WARNING: unknown option '%s'\n"
 msgstr " 警告: 未知の '%s' オプション \n"
 
-#: src/gnuwin32/system.c:1104 src/unix/system.c:379
+#: src/gnuwin32/system.c:1113 src/unix/system.c:364
 #, c-format
 msgid "ARGUMENT '%s' __ignored__\n"
 msgstr " 引数 '%s' は無視されました \n"
 
-#: src/gnuwin32/system.c:1110 src/unix/system.c:386
+#: src/gnuwin32/system.c:1119 src/unix/system.c:371
 msgid "cannot use -e with -f or --file"
 msgstr " -e は-f や --file と併用することはできません "
 
-#: src/gnuwin32/system.c:1128
+#: src/gnuwin32/system.c:1137
 msgid "creation of tmpfile failed -- set TMPDIR suitably?"
 msgstr ""
 " 一時ファイルの作成に失敗しました -- TMPDIRは正しく設定されていますか? "
 
-#: src/gnuwin32/system.c:1147 src/unix/system.c:437
+#: src/gnuwin32/system.c:1156 src/unix/system.c:422
 msgid "you must specify '--save', '--no-save' or '--vanilla'"
 msgstr " '--save' , '--no-save', '--vanilla' のいずれかを指定してください "
 
-#: src/gnuwin32/system.c:1152
+#: src/gnuwin32/system.c:1161
 msgid ""
 "impossible to create 'reader thread'; you must free some system resources"
 msgstr ""
 " 'reader thread' を作れません。システムのリソースを幾らか解放すべきです "
 
-#: src/include/Errormsg.h:25 src/main/subscript.c:375 src/main/subscript.c:393
-#: src/main/subscript.c:417 src/main/subscript.c:456 src/main/subscript.c:584
-#: src/main/subscript.c:623 src/main/subscript.c:766
+#: src/include/Errormsg.h:27 src/main/subscript.c:383 src/main/subscript.c:401
+#: src/main/subscript.c:425 src/main/subscript.c:464 src/main/subscript.c:662
+#: src/main/subscript.c:701 src/main/subscript.c:844
 msgid "subscript out of bounds"
 msgstr " 添え字が許される範囲外です "
 
-#: src/include/Errormsg.h:26
+#: src/include/Errormsg.h:28
 #, c-format
 msgid "object of type '%s' is not subsettable"
 msgstr " '%s' 型のオブジェクトは部分代入可能ではありません "
 
-#: src/main/CommandLineArgs.c:170
+#: src/main/CommandLineArgs.c:171
 msgid "WARNING: no value given for --encoding"
 msgstr " 警告: --encoding の値が与えられていません "
 
-#: src/main/CommandLineArgs.c:195
+#: src/main/CommandLineArgs.c:196
 #, c-format
 msgid "WARNING: option '%s' no longer supported"
 msgstr " 警告: '%s' オプションはもやはサポートされていません "
 
-#: src/main/CommandLineArgs.c:206
+#: src/main/CommandLineArgs.c:207
 #, c-format
 msgid "WARNING: no value given for '%s'"
 msgstr " 警告: '%s' の値が与えられていません "
 
-#: src/main/CommandLineArgs.c:216
+#: src/main/CommandLineArgs.c:217
 #, c-format
 msgid "WARNING: '%s' value is invalid: ignored"
 msgstr " 警告: '%s' 値が不正なので無視されました "
 
-#: src/main/CommandLineArgs.c:220
+#: src/main/CommandLineArgs.c:221
 #, c-format
 msgid "WARNING: %s: too large and ignored"
 msgstr " 警告: %s: 大きすぎるので無視されました "
 
-#: src/main/CommandLineArgs.c:234
+#: src/main/CommandLineArgs.c:235
 msgid "WARNING: no value given for '--max-ppsize'"
 msgstr " 警告: '--max-ppsize' の値が与えられていません "
 
-#: src/main/CommandLineArgs.c:239
+#: src/main/CommandLineArgs.c:240
 msgid "WARNING: '--max-ppsize' value is negative: ignored"
 msgstr " 警告: '--max-ppsize' 値が負なので無視されました "
 
-#: src/main/CommandLineArgs.c:241
+#: src/main/CommandLineArgs.c:242
 msgid "WARNING: '--max-ppsize' value is too small: ignored"
 msgstr " 警告: '--max-ppsize' 値が小さすぎるので無視されました "
 
-#: src/main/CommandLineArgs.c:244
+#: src/main/CommandLineArgs.c:245
 msgid "WARNING: '--max-ppsize' value is too large: ignored"
 msgstr " 警告: '--max-ppsize' 値が大きすぎるので無視されました "
 
-#: src/main/RNG.c:175
+#: src/main/RNG.c:176
 #, c-format
 msgid "unif_rand: unimplemented RNG kind %d"
 msgstr " unif_rand: 種類 %d の RNG は実装されていません "
 
-#: src/main/RNG.c:260
+#: src/main/RNG.c:261
 #, c-format
 msgid "FixupSeeds: unimplemented RNG kind %d"
 msgstr " FixupSeeds: 種類 %d の RNG は未実装です "
 
-#: src/main/RNG.c:302
+#: src/main/RNG.c:301
 msgid "'user_unif_rand' not in load table"
 msgstr " 'user_unif_rand' がロードテーブルにありません "
 
-#: src/main/RNG.c:310
+#: src/main/RNG.c:309
 msgid "cannot read seeds unless 'user_unif_nseed' is supplied"
 msgstr ""
 " 'user_unif_nseed' が供給されていないかぎり乱数のシードを読み取ることはできま"
 "せん "
 
-#: src/main/RNG.c:315
+#: src/main/RNG.c:314
 msgid "seed length must be in 0...625; ignored"
 msgstr " 乱数シード長は 0 から 625 の範囲でなくてはなりません; 無視されました "
 
-#: src/main/RNG.c:323
+#: src/main/RNG.c:322
 #, c-format
 msgid "RNG_Init: unimplemented RNG kind %d"
 msgstr " RNG_Init: RNG kind %d は未実装です "
 
-#: src/main/RNG.c:354
+#: src/main/RNG.c:351
 msgid "'.Random.seed' is a missing argument with no default"
 msgstr " 引数 '.Random.seed' の指定がなく、デフォルトの設定もありません "
 
-#: src/main/RNG.c:355
+#: src/main/RNG.c:352
 #, c-format
 msgid "'.Random.seed' is not an integer vector but of type '%s', so ignored"
 msgstr ""
 " '.Random.seed' が整数ベクトルではなくタイプ '%s' になっているため、無視され"
 "ました "
 
-#: src/main/RNG.c:363
+#: src/main/RNG.c:360
 msgid "'.Random.seed[1]' is not a valid integer, so ignored"
 msgstr " '.Random.seed[1]' が有効な整数値ではないため、無視されました "
 
-#: src/main/RNG.c:369
+#: src/main/RNG.c:366
 msgid "'.Random.seed[1]' is not a valid Normal type, so ignored"
 msgstr " '.Random.seed[1]' は有効な標準形ではないため、無視されました "
 
-#: src/main/RNG.c:383
+#: src/main/RNG.c:380
 msgid "'.Random.seed[1] = 5' but no user-supplied generator, so ignored"
 msgstr ""
 " '.Random.seed[1] = 5' ですが、ユーザ定義の乱数発生器がないため、無視されまし"
 "た "
 
-#: src/main/RNG.c:388
+#: src/main/RNG.c:385
 msgid "'.Random.seed[1]' is not a valid RNG kind so ignored"
 msgstr " '.Random.seed[1]' が有効な種類の RNGではないため、無視されました "
 
-#: src/main/RNG.c:415
+#: src/main/RNG.c:412
 msgid "'.Random.seed' has wrong length"
 msgstr " '.Random.seed' の長さが不正です "
 
-#: src/main/RNG.c:468
+#: src/main/RNG.c:465
 #, c-format
 msgid "RNGkind: unimplemented RNG kind %d"
 msgstr " RNGkind: RNG kind %d は未実装です "
 
-#: src/main/RNG.c:488
+#: src/main/RNG.c:485
 msgid "invalid Normal type in 'RNGkind'"
 msgstr " 'RNGkind' 中の正規乱数発生法が不正です "
 
-#: src/main/RNG.c:491
+#: src/main/RNG.c:488
 msgid "'user_norm_rand' not in load table"
 msgstr " 'user_norm_rand' がロードテーブルにありません "
 
-#: src/main/RNG.c:535
+#: src/main/RNG.c:532
 msgid "supplied seed is not a valid integer"
 msgstr " 与えられた seed は適切な整数ではありません "
 
@@ -632,7 +615,7 @@ msgstr " DLL の名前 '%s' が長すぎます "
 msgid "could not allocate space for 'name'"
 msgstr " 'name' のための領域を割り当てられませんでした "
 
-#: src/main/Rdynload.c:881 src/main/Rdynload.c:897 src/main/util.c:698
+#: src/main/Rdynload.c:881 src/main/Rdynload.c:897 src/main/util.c:762
 msgid "character argument expected"
 msgstr " 文字引数が期待されています "
 
@@ -652,34 +635,35 @@ msgstr " 共有ライブラリ '%s' はロードされていません "
 
 #: src/main/Rdynload.c:979
 #, c-format
-msgid "cannot allocate memory for registered native symbol (%d bytes)"
-msgstr ""
+msgid "cannot allocate memory for registered native symbol (%d byte)"
+msgid_plural "cannot allocate memory for registered native symbol (%d bytes)"
+msgstr[0] ""
 " 登録されたネイティブのシンボルのためのメモリを割り当てることができません。"
 "(%d バイト) "
 
-#: src/main/Rdynload.c:1100 src/main/Rdynload.c:1321
+#: src/main/Rdynload.c:1102 src/main/Rdynload.c:1323
 msgid "must pass package name or DllInfo reference"
 msgstr " パッケージ名か DllInfo の参照を渡すべきです "
 
-#: src/main/Rdynload.c:1197
+#: src/main/Rdynload.c:1199
 #, c-format
 msgid "unimplemented type %d in 'createRSymbolObject'"
 msgstr " 'createRSymbolObject' の型 %d は未実装です "
 
-#: src/main/Rdynload.c:1279 src/main/Rdynload.c:1373
+#: src/main/Rdynload.c:1281 src/main/Rdynload.c:1375
 msgid "R_getRegisteredRoutines() expects a DllInfo reference"
 msgstr " R_getRegisteredRoutines() はある DllInfo の参照が期待されます "
 
-#: src/main/Rdynload.c:1282 src/main/Rdynload.c:1376
+#: src/main/Rdynload.c:1284 src/main/Rdynload.c:1378
 msgid "NULL value passed for DllInfo"
 msgstr " DlInfo に NULL 値が渡されました "
 
-#: src/main/Rdynload.c:1436
+#: src/main/Rdynload.c:1441
 #, c-format
 msgid "function '%s' not provided by package '%s'"
 msgstr " 関数 '%s' はパッケージ '%s' では提供されていません "
 
-#: src/main/Rdynload.c:1438
+#: src/main/Rdynload.c:1443
 msgid "table entry must be an external pointer"
 msgstr " テーブルエントリは外部ポインタでなければなりません "
 
@@ -688,101 +672,129 @@ msgstr " テーブルエントリは外部ポインタでなければなりま
 msgid "problem in setting variable '%s' in Renviron"
 msgstr " Renviron における変数 '%s' の設定に問題があります "
 
-#: src/main/Renviron.c:311
-msgid "argument 'x' must be a character string"
-msgstr " 引数 'x' は文字列でなくてはなりません "
+#: src/main/Renviron.c:311 src/main/objects.c:1174 src/main/raw.c:155
+#, c-format
+msgid "argument '%s' must be a character string"
+msgstr " 引数 '%s' は文字列でなくてはなりません "
 
 #: src/main/Renviron.c:315
 #, c-format
 msgid "file '%s' cannot be opened for reading"
 msgstr " ファイル '%s' を開くことができません "
 
-#: src/main/Rstrptime.h:517 src/main/Rstrptime.h:984
+#: src/main/Rstrptime.h:524 src/main/Rstrptime.h:991
 #, c-format
 msgid "use of %s for input is not supported"
 msgstr " 入力に %s を使用することはサポートされていません "
 
-#: src/main/Rstrptime.h:1242
+#: src/main/Rstrptime.h:1263
 msgid "input string is too long"
 msgstr " 入力文字列が長すぎます "
 
-#: src/main/Rstrptime.h:1244
+#: src/main/Rstrptime.h:1265
 msgid "invalid multibyte input string"
 msgstr " マルチバイト文字列が不正です "
 
-#: src/main/Rstrptime.h:1247
+#: src/main/Rstrptime.h:1268
 msgid "format string is too long"
 msgstr " 'destination' が長すぎます "
 
-#: src/main/Rstrptime.h:1249
+#: src/main/Rstrptime.h:1270
 msgid "invalid multibyte format string"
 msgstr " マルチバイト文字列が不正です "
 
-#: src/main/agrep.c:133 src/main/agrep.c:777 src/main/character.c:1039
-#: src/main/character.c:1043 src/main/grep.c:769 src/main/grep.c:1512
-#: src/main/grep.c:1516 src/main/grep.c:2325 src/main/grep.c:2623
+#: src/main/agrep.c:133 src/main/agrep.c:778 src/main/character.c:1291
+#: src/main/character.c:1295 src/main/grep.c:782 src/main/grep.c:1530
+#: src/main/grep.c:1534 src/main/grep.c:2347 src/main/grep.c:2654
 #, c-format
 msgid "argument '%s' has length > 1 and only the first element will be used"
 msgstr " 引数 '%s' は 1 を超える長さなので、最初の要素だけが使われます "
 
-#: src/main/agrep.c:189 src/main/agrep.c:818
+#: src/main/agrep.c:190 src/main/agrep.c:820
 msgid "'pattern' must be a non-empty character string"
 msgstr " 'pattern' は空でない文字列でなければなりません "
 
-#: src/main/agrep.c:200 src/main/agrep.c:827 src/main/grep.c:838
-#: src/main/grep.c:2381 src/main/grep.c:2662
+#: src/main/agrep.c:201 src/main/agrep.c:829 src/main/grep.c:853
+#: src/main/grep.c:2405 src/main/grep.c:2707
 msgid "regular expression is invalid in this locale"
 msgstr " このロケールでは、正規表現は無効です "
 
-#: src/main/agrep.c:206 src/main/agrep.c:623
+#: src/main/agrep.c:207 src/main/agrep.c:624
 #, c-format
 msgid "regcomp error:  '%s'"
 msgstr " regcomp のエラー: '%s' "
 
-#: src/main/agrep.c:238 src/main/agrep.c:871 src/main/grep.c:227
-#: src/main/grep.c:315 src/main/grep.c:423 src/main/grep.c:578
-#: src/main/grep.c:889 src/main/grep.c:2480 src/main/grep.c:2548
-#: src/main/grep.c:2698
+#: src/main/agrep.c:239 src/main/agrep.c:874 src/main/grep.c:233
+#: src/main/grep.c:323 src/main/grep.c:434 src/main/grep.c:590
+#: src/main/grep.c:907 src/main/grep.c:2510 src/main/grep.c:2579
+#: src/main/grep.c:2744
 #, c-format
 msgid "input string %d is invalid in this locale"
 msgstr " 入力文字列 %d はこのロケールでは不適切です "
 
-#: src/main/agrep.c:525 src/main/agrep.c:765 src/main/grep.c:155
-#: src/main/grep.c:760 src/main/grep.c:762 src/main/grep.c:1047
-#: src/main/grep.c:1055 src/main/grep.c:1503 src/main/grep.c:1505
-#: src/main/grep.c:2315 src/main/grep.c:2317 src/main/grep.c:2611
+#: src/main/agrep.c:526 src/main/agrep.c:766 src/main/grep.c:159
+#: src/main/grep.c:773 src/main/grep.c:775 src/main/grep.c:1065
+#: src/main/grep.c:1073 src/main/grep.c:1521 src/main/grep.c:1523
+#: src/main/grep.c:2337 src/main/grep.c:2339 src/main/grep.c:2642
 #, c-format
 msgid "argument '%s' will be ignored"
 msgstr " 引数 '%s' は無視されます "
 
-#: src/main/agrep.c:614
+#: src/main/agrep.c:615
 #, c-format
 msgid "input string x[%d] is invalid in this locale"
 msgstr " 入力文字列 x[%d] はこのロケールでは不適切です "
 
-#: src/main/agrep.c:660
+#: src/main/agrep.c:661
 #, c-format
 msgid "input string y[%d] is invalid in this locale"
 msgstr " 入力文字列 y[%d] はこのロケールでは不適切です "
 
-#: src/main/agrep.c:833 src/main/grep.c:2668
+#: src/main/agrep.c:835 src/main/grep.c:2713
 #, c-format
 msgid "regcomp error: '%s'"
 msgstr " regcomp のエラー: '%s' "
 
-#: src/main/apply.c:103
+#: src/main/apply.c:98
 msgid "'FUN.VALUE' must be a vector"
 msgstr " 'FUN.VALUE' はベクトルでなければなりません "
 
-#: src/main/apply.c:108 src/main/complex.c:758
+#: src/main/apply.c:100 src/main/array.c:506 src/main/character.c:847
+#: src/main/character.c:1655 src/main/connections.c:3551
+#: src/main/context.c:653 src/main/context.c:672 src/main/datetime.c:681
+#: src/main/datetime.c:783 src/main/datetime.c:1047 src/main/dotcode.c:222
+#: src/main/errors.c:910 src/main/errors.c:943 src/main/errors.c:1049
+#: src/main/errors.c:1074 src/main/errors.c:1079 src/main/errors.c:1349
+#: src/main/identical.c:66 src/main/identical.c:67 src/main/identical.c:68
+#: src/main/identical.c:69 src/main/identical.c:70 src/main/platform.c:2982
+#: src/main/seq.c:192 src/main/seq.c:343 src/main/seq.c:348 src/main/seq.c:352
+#: src/main/seq.c:397 src/main/seq.c:401 src/main/seq.c:405
+#: src/main/sort.c:1244 src/main/sort.c:1327 src/main/sort.c:1331
+#: src/main/sort.c:1338 src/main/source.c:225 src/main/summary.c:954
+#: src/main/sysutils.c:250 src/main/util.c:1051 src/main/util.c:1056
+#: src/main/util.c:1063 src/main/util.c:1066 src/main/util.c:2035
+#: src/modules/X11/devX11.c:3148 src/modules/X11/devX11.c:3175
+#: src/modules/X11/devX11.c:3180 src/modules/X11/devX11.c:3185
+#: src/modules/X11/devX11.c:3195 src/modules/X11/devX11.c:3200
+#: src/modules/X11/devX11.c:3204 src/modules/X11/devX11.c:3208
+#, c-format
+msgid "invalid '%s' value"
+msgstr " '%s' の値が不正です "
+
+#: src/main/apply.c:103 src/main/complex.c:753
 msgid "invalid length"
 msgstr " 長さが不正です "
 
-#: src/main/apply.c:113
+#: src/main/apply.c:108
 msgid "long vectors are not supported for matrix/array results"
 msgstr " long vector は matrix/array の結果に対してサポートされていません "
 
-#: src/main/apply.c:162
+#: src/main/apply.c:115
+#, c-format
+msgid "type '%s' is not supported"
+msgstr " '%s' という型はサポートされていません "
+
+#: src/main/apply.c:163
 #, c-format
 msgid ""
 "values must be length %d,\n"
@@ -791,7 +803,7 @@ msgstr ""
 " 値の長さは %d でなければなりません、 \n"
 " しかし、FUN(X[[%d]]) の結果の長さが %d です "
 
-#: src/main/apply.c:174
+#: src/main/apply.c:175
 #, c-format
 msgid ""
 "values must be type '%s',\n"
@@ -800,17 +812,12 @@ msgstr ""
 " 値の型は '%s' でなければなりません、 \n"
 " しかし、FUN(X[[%d]]) の結果の型が '%s' です "
 
-#: src/main/apply.c:193
-#, c-format
-msgid "type '%s' is not supported"
-msgstr " '%s' という型はサポートされていません "
-
-#: src/main/apply.c:225
+#: src/main/apply.c:252
 #, c-format
 msgid "dimnames(<value>) is neither NULL nor list of length %d"
 msgstr " dimnames(<value>) は NULL でも長さ %d のリストでもありません "
 
-#: src/main/arithmetic.c:42
+#: src/main/arithmetic.c:42 src/main/eval.c:3633
 msgid "NaNs produced"
 msgstr " 計算結果が NaN になりました "
 
@@ -818,120 +825,120 @@ msgstr " 計算結果が NaN になりました "
 msgid "non-numeric argument to mathematical function"
 msgstr " 数学関数に数値でない引数が渡されました "
 
-#: src/main/arithmetic.c:187
+#: src/main/arithmetic.c:186
 msgid "probable complete loss of accuracy in modulus"
 msgstr " 絶対値で精度が完全に失われた可能性があります "
 
-#: src/main/arithmetic.c:337
+#: src/main/arithmetic.c:298
 msgid "NAs produced by integer overflow"
 msgstr " 整数の桁あふれにより NA が生成されました "
 
-#: src/main/arithmetic.c:538
+#: src/main/arithmetic.c:499
 msgid "operator needs one or two arguments"
 msgstr " 演算子は一つまたは二つの引数を必要とします "
 
-#: src/main/arithmetic.c:554
+#: src/main/arithmetic.c:515
 msgid "non-numeric argument to binary operator"
 msgstr " 二項演算子の引数が数値ではありません "
 
-#: src/main/arithmetic.c:615 src/main/relop.c:227
+#: src/main/arithmetic.c:576 src/main/relop.c:221
 msgid "non-conformable arrays"
 msgstr " 適切な配列ではありません "
 
-#: src/main/arithmetic.c:658
+#: src/main/arithmetic.c:619
 msgid "non-conformable time-series"
 msgstr " 整合した時系列ではありません "
 
-#: src/main/arithmetic.c:680 src/main/logic.c:143 src/main/relop.c:166
-#: src/main/relop.c:265
+#: src/main/arithmetic.c:641 src/main/logic.c:135 src/main/relop.c:160
+#: src/main/relop.c:259
 msgid "longer object length is not a multiple of shorter object length"
 msgstr " 長いオブジェクトの長さが短いオブジェクトの長さの倍数になっていません "
 
-#: src/main/arithmetic.c:751
+#: src/main/arithmetic.c:712
 msgid "invalid argument to unary operator"
 msgstr " 単項演算子に対する引数が不正です "
 
-#: src/main/arithmetic.c:780 src/main/arithmetic.c:805
-#: src/main/arithmetic.c:824
+#: src/main/arithmetic.c:741 src/main/arithmetic.c:766
+#: src/main/arithmetic.c:785
 msgid "invalid unary operator"
 msgstr " 不正な単項演算子です "
 
-#: src/main/arithmetic.c:1241
+#: src/main/arithmetic.c:1191
 msgid "unimplemented real function of 1 argument"
 msgstr " 1 個の引数を持つ未実装の数値関数 "
 
-#: src/main/arithmetic.c:1255 src/main/complex.c:648 src/main/complex.c:718
+#: src/main/arithmetic.c:1205 src/main/complex.c:638 src/main/complex.c:708
 msgid "unimplemented complex function"
 msgstr " 未実装の複素関数です "
 
-#: src/main/arithmetic.c:1526 src/main/arithmetic.c:1877
-#: src/main/arithmetic.c:2056 src/main/arithmetic.c:2168
+#: src/main/arithmetic.c:1484 src/main/arithmetic.c:1877
+#: src/main/arithmetic.c:2049 src/main/arithmetic.c:2152
 #, c-format
 msgid "unimplemented real function of %d numeric arguments"
 msgstr " %d 個の数値引数を持つ未実装の数値関数 "
 
-#: src/main/arithmetic.c:1552
+#: src/main/arithmetic.c:1511
 #, c-format
-msgid "%d arguments passed to '%s' which requires 1 or 2"
-msgstr ""
+msgid "%d argument passed to '%s' which requires 1 or 2 arguments"
+msgid_plural "%d arguments passed to '%s'which requires 1 or 2 arguments"
+msgstr[0] ""
 " %d 個の引数が '%s' に渡されましたが、1 つまたは 2 つが必要とされています "
 
-#: src/main/arithmetic.c:1570
+#: src/main/arithmetic.c:1530
 msgid "invalid second argument of length 0"
 msgstr " 二番目の長さ 0 の引数が不正です "
 
-#: src/main/arithmetic.c:1639
+#: src/main/arithmetic.c:1625 src/main/arithmetic.c:1643 src/main/envir.c:1464
+#: src/main/envir.c:1972 src/main/eval.c:630 src/main/eval.c:4237
+#, c-format
+msgid "argument \"%s\" is missing, with no default"
+msgstr " 引数 \"%s\" がありませんし、省略時既定値もありません "
+
+#: src/main/arithmetic.c:1649
 msgid "invalid argument 'base' of length 0"
 msgstr " 長さ 0 の 'base ' 引数です "
 
-#: src/main/arithmetic.c:1647
-#, c-format
-msgid "%d arguments passed to 'log' which requires 1 or 2"
-msgstr ""
-" 'log' 関数に %d 個の引数が渡されましたが、1 つまたは 2 つでなくてはなりませ"
-"ん "
-
-#: src/main/array.c:79 src/main/array.c:1441
+#: src/main/array.c:82 src/main/array.c:1591
 #, c-format
 msgid "'data' must be of a vector type, was '%s'"
 msgstr " 'data' はベクトル型でなくてはなりませんが、'%s' でした "
 
-#: src/main/array.c:94 src/main/array.c:102
+#: src/main/array.c:97 src/main/array.c:105
 msgid "non-numeric matrix extent"
 msgstr " 行列の大きさが数値ではありません "
 
-#: src/main/array.c:97 src/main/array.c:1535
+#: src/main/array.c:100 src/main/array.c:1695
 msgid "invalid 'nrow' value (too large or NA)"
 msgstr " 'nrow' の値が不正です (大きすぎるか NA です) "
 
-#: src/main/array.c:99 src/main/array.c:1537
+#: src/main/array.c:102 src/main/array.c:1697
 msgid "invalid 'nrow' value (< 0)"
 msgstr " 'nrow' の値が不正です (負の値です) "
 
-#: src/main/array.c:105 src/main/array.c:1540
+#: src/main/array.c:108 src/main/array.c:1700
 msgid "invalid 'ncol' value (too large or NA)"
 msgstr " 'ncol' の値が不正です (大きすぎるか NA です) "
 
-#: src/main/array.c:107 src/main/array.c:1542
+#: src/main/array.c:110 src/main/array.c:1702
 msgid "invalid 'ncol' value (< 0)"
 msgstr " 'ncol' の値が不正です (負の値です) "
 
-#: src/main/array.c:116
+#: src/main/array.c:119
 msgid "nc = 0 for non-null data"
 msgstr " 非NULLデータの列数が0です "
 
-#: src/main/array.c:124
+#: src/main/array.c:127
 msgid "nr = 0 for non-null data"
 msgstr " 非NULLデータの行数が0です "
 
-#: src/main/array.c:135
+#: src/main/array.c:138
 #, c-format
 msgid ""
 "data length [%d] is not a sub-multiple or multiple of the number of rows [%d]"
 msgstr ""
 " データ長 [%d] が行数 [%d] を整数で割った、もしくは掛けた値ではありません "
 
-#: src/main/array.c:138
+#: src/main/array.c:141
 #, c-format
 msgid ""
 "data length [%d] is not a sub-multiple or multiple of the number of columns "
@@ -939,162 +946,172 @@ msgid ""
 msgstr ""
 " データ長 [%d] が列数 [%d] を整数で割った、もしくは掛けた値ではありません "
 
-#: src/main/array.c:141
+#: src/main/array.c:144
 msgid "data length exceeds size of matrix"
 msgstr " データの長さが行列の大きさを超えています "
 
-#: src/main/array.c:147 src/main/array.c:1453 src/main/array.c:1549
+#: src/main/array.c:150 src/main/array.c:1603 src/main/array.c:1709
 msgid "too many elements specified"
 msgstr " 指定された要素数が多すぎます "
 
-#: src/main/array.c:205
+#: src/main/array.c:208
 msgid "negative extents to matrix"
 msgstr " 行列の大きさが負の値になっています "
 
-#: src/main/array.c:208
+#: src/main/array.c:211
 msgid "allocMatrix: too many elements specified"
 msgstr " allocMatrix において、指定された要素数が多すぎます "
 
-#: src/main/array.c:236
+#: src/main/array.c:239
 msgid "negative extents to 3D array"
 msgstr " 3 次元配列の大きさが負の値になっています "
 
-#: src/main/array.c:239
+#: src/main/array.c:242
 msgid "'alloc3Darray': too many elements specified"
 msgstr " 'alloc3Darray': 指定された要素数が多すぎます "
 
-#: src/main/array.c:264
+#: src/main/array.c:267
 msgid "'allocArray': too many elements specified by 'dims'"
 msgstr " 'allocArray': 'dims' によって指定された要素数が多すぎます "
 
-#: src/main/array.c:448
+#: src/main/array.c:523
+#, fuzzy, c-format
+msgid "'%s' must be a list or atomic vector"
+msgstr " 'x' は NULL または raw vector からなるリストでなくてはなりません "
+
+#: src/main/array.c:561
 #, c-format
 msgid "a matrix-like object is required as argument to '%s'"
 msgstr " '%s' の引数は行列のようなオブジェクトでなければなりません "
 
-#: src/main/array.c:662
+#: src/main/array.c:776
 msgid "requires numeric/complex matrix/vector arguments"
 msgstr " 数値/複素数/行列またはベクトルが要求されます "
 
-#: src/main/array.c:752 src/main/array.c:756 src/main/array.c:760
+#: src/main/array.c:886 src/main/array.c:890 src/main/array.c:894
 msgid "non-conformable arguments"
 msgstr " 適切な引数ではありません "
 
-#: src/main/array.c:1058
+#: src/main/array.c:1193
 msgid "argument is not a matrix"
 msgstr " 引数が行列ではありません "
 
-#: src/main/array.c:1093
+#: src/main/array.c:1228
 msgid "invalid first argument, must be an array"
 msgstr " 一番目の引数が不正です。配列でなくてはなりません "
 
-#: src/main/array.c:1107
+#: src/main/array.c:1242
 #, c-format
 msgid "'perm' is of wrong length %d (!= %d)"
 msgstr " 'perm' の長さ %d が誤っています (!= %d) "
 
-#: src/main/array.c:1112 src/main/array.c:1115
+#: src/main/array.c:1247 src/main/array.c:1250
 msgid "'a' does not have named dimnames"
 msgstr " 'a' は名前付きの次元名を持ちません "
 
-#: src/main/array.c:1122
+#: src/main/array.c:1257
 #, c-format
 msgid "'perm[%d]' does not match a dimension name"
 msgstr " 'perm[%d]' は次元名にマッチしません "
 
-#: src/main/array.c:1135
+#: src/main/array.c:1270
 msgid "value out of range in 'perm'"
 msgstr " 'perm' 中の値が範囲を超えています "
 
-#: src/main/array.c:1217
+#: src/main/array.c:1352
 msgid "'resize' must be TRUE or FALSE"
 msgstr " 'resize' は TRUE か FALSE でなければなりません "
 
-#: src/main/array.c:1275
+#: src/main/array.c:1422
 msgid "'x' must be numeric"
 msgstr " 'x' は数値でなければなりません "
 
-#: src/main/array.c:1449
+#: src/main/array.c:1425
+#, fuzzy
+msgid "'x' is too short"
+msgstr " 'object' が短すぎます "
+
+#: src/main/array.c:1599
 msgid "'dims' cannot be of length 0"
 msgstr " 'dims' は長さ 0 であってはなりません "
 
-#: src/main/array.c:1545
+#: src/main/array.c:1705
 msgid "'x' must have positive length"
 msgstr " 'x' は正の長さを持たなければなりません "
 
-#: src/main/array.c:1605
+#: src/main/array.c:1771
 #, c-format
 msgid "singular matrix in 'backsolve'. First zero in diagonal [%d]"
 msgstr ""
 " 'backsolve' 中に特異行列がありました。[%d] 番目の対角要素に最初の 0 がありま"
 "す。 "
 
-#: src/main/attrib.c:40 src/main/attrib.c:235 src/main/attrib.c:269
-#: src/main/attrib.c:291 src/main/attrib.c:405 src/main/attrib.c:452
-#: src/main/attrib.c:502
+#: src/main/attrib.c:40 src/main/attrib.c:231 src/main/attrib.c:265
+#: src/main/attrib.c:287 src/main/attrib.c:403 src/main/attrib.c:450
+#: src/main/attrib.c:501
 msgid "attempt to set an attribute on NULL"
 msgstr " NULL に対して属性を設定しようとしました "
 
-#: src/main/attrib.c:72
+#: src/main/attrib.c:77
 #, c-format
 msgid "row names must be 'character' or 'integer', not '%s'"
 msgstr ""
 " 列の名前は '%s' ではなく文字型 ('character') 又は整数型 ('integer') でなけれ"
 "ばなりません "
 
-#: src/main/attrib.c:124
+#: src/main/attrib.c:130
 #, c-format
 msgid "getAttrib: invalid type (%s) for TAG"
 msgstr " getAttrib: TAG に対する型 (%s) が不正です "
 
-#: src/main/attrib.c:379
+#: src/main/attrib.c:377
 #, c-format
 msgid "invalid type (%s) for 'names': must be vector"
 msgstr " 'names' の型 (%s) が不正です; ベクトルでなければなりません "
 
-#: src/main/attrib.c:382
+#: src/main/attrib.c:380
 #, c-format
 msgid "'names' attribute [%d] must be the same length as the vector [%d]"
 msgstr " 'names' 属性 [%d] はベクトル [%d] の長さと同じでなければなりません "
 
-#: src/main/attrib.c:387
+#: src/main/attrib.c:385
 msgid "names() applied to a non-vector"
 msgstr " names() 関数がベクトルでないものに適用されました "
 
-#: src/main/attrib.c:395
+#: src/main/attrib.c:393
 msgid "invalid time series parameters specified"
 msgstr " 不正な時系列パラメータが指定されました "
 
-#: src/main/attrib.c:409
+#: src/main/attrib.c:407
 msgid "'tsp' attribute must be numeric"
 msgstr " 'tsp' 属性は数値でなくてはなりません "
 
-#: src/main/attrib.c:415
+#: src/main/attrib.c:413
 msgid "'tsp' attribute must be numeric of length three"
 msgstr " 'tsp' 属性は長さ 3 の数値でなくてはなりません "
 
-#: src/main/attrib.c:432
+#: src/main/attrib.c:430
 msgid "cannot assign 'tsp' to zero-length vector"
 msgstr " 長さ 0 のベクトルには属性 'tsp' を与えられません "
 
-#: src/main/attrib.c:463
+#: src/main/attrib.c:461
 msgid "attempt to set invalid 'comment' attribute"
 msgstr " 不正な 'comment' 属性を設定しようとしました "
 
-#: src/main/attrib.c:511
+#: src/main/attrib.c:510
 msgid "adding class \"factor\" to an invalid object"
 msgstr " 無効のオブジェクトにクラス \"factor\" を追加 "
 
-#: src/main/attrib.c:519
+#: src/main/attrib.c:541
 msgid "attempt to set invalid 'class' attribute"
 msgstr " 不正な 'class' 属性を設定しようとしました "
 
-#: src/main/attrib.c:777
+#: src/main/attrib.c:872
 #, c-format
 msgid "class '%s' has no 'names' slot"
 msgstr " クラス '%s' には 'names' スロットがありません "
 
-#: src/main/attrib.c:779
+#: src/main/attrib.c:874
 #, c-format
 msgid ""
 "class '%s' has no 'names' slot; assigning a names attribute will create an "
@@ -1103,142 +1120,143 @@ msgstr ""
 " クラス '%s' には 'names' スロットがありません; names 属性を付加すると不正な"
 "オブジェクトが生成されます "
 
-#: src/main/attrib.c:782
+#: src/main/attrib.c:877
 #, c-format
 msgid ""
 "invalid to use names()<- to set the 'names' slot in a non-vector class ('%s')"
 msgstr ""
-" ベクタでないクラス ('%s') の 'names' スロットに値をセットするために names()"
-"<- を使うことはできません "
+" ベクタでないクラス ('%s') の 'names' スロットに値をセットするために "
+"names()<- を使うことはできません "
 
-#: src/main/attrib.c:812
+#: src/main/attrib.c:907
 msgid "incompatible 'names' argument"
 msgstr " 'names' 引数に互換性がありません "
 
-#: src/main/attrib.c:867
+#: src/main/attrib.c:962
 #, c-format
 msgid "invalid type (%s) to set 'names' attribute"
 msgstr " 'names' 属性として設定するには不正な型 (%s) です "
 
-#: src/main/attrib.c:938
+#: src/main/attrib.c:1035
 msgid "'dimnames' applied to non-array"
 msgstr " 'dimnames' が配列以外に適用されました "
 
-#: src/main/attrib.c:943
-msgid "'dimnames' must be a list"
-msgstr " 'dimnames' はリストでなくてはなりません "
+#: src/main/attrib.c:1040 src/main/coerce.c:2471
+#, c-format
+msgid "'%s' must be a list"
+msgstr " '%s' はリストでなければなりません "
 
-#: src/main/attrib.c:946 src/main/attrib.c:974
+#: src/main/attrib.c:1043 src/main/attrib.c:1071
 #, c-format
 msgid "length of 'dimnames' [%d] must match that of 'dims' [%d]"
 msgstr ""
 " 'dimnames' の長さ [%d] は 'dims' の長さ [%d] と同じでなくてはなりません "
 
-#: src/main/attrib.c:980
+#: src/main/attrib.c:1077
 #, c-format
 msgid "invalid type (%s) for 'dimnames' (must be a vector)"
 msgstr " 'dimnames' の型 (%s) が不正です (ベクトルでなければなりません) "
 
-#: src/main/attrib.c:983
+#: src/main/attrib.c:1080
 #, c-format
 msgid "length of 'dimnames' [%d] not equal to array extent"
 msgstr " 'dimnames' の長さ [%d] が配列の大きさと違っています "
 
-#: src/main/attrib.c:1055 src/main/builtin.c:75 src/main/builtin.c:112
-#: src/main/envir.c:1606 src/main/envir.c:1734 src/main/envir.c:1796
-#: src/main/envir.c:1918 src/main/paste.c:74 src/main/paste.c:293
-#: src/main/random.c:487 src/main/random.c:516 src/main/unique.c:1749
+#: src/main/attrib.c:1152 src/main/builtin.c:75 src/main/builtin.c:112
+#: src/main/envir.c:1740 src/main/envir.c:1868 src/main/envir.c:1928
+#: src/main/envir.c:2065 src/main/paste.c:74 src/main/paste.c:293
+#: src/main/random.c:479 src/main/random.c:508 src/main/unique.c:1746
 msgid "invalid first argument"
 msgstr " 一番目の引数が不正です "
 
-#: src/main/attrib.c:1058
+#: src/main/attrib.c:1155
 msgid "invalid second argument"
 msgstr " 二番目の引数が不正です "
 
-#: src/main/attrib.c:1066
+#: src/main/attrib.c:1163
 msgid "length-0 dimension vector is invalid"
 msgstr " 長さ 0 の次元のベクトルは無効です "
 
-#: src/main/attrib.c:1071
+#: src/main/attrib.c:1168
 msgid "the dims contain missing values"
 msgstr " dims 変数は欠損値を含みます "
 
-#: src/main/attrib.c:1073
+#: src/main/attrib.c:1170
 msgid "the dims contain negative values"
 msgstr " dims 変数は負の値を含みます "
 
-#: src/main/attrib.c:1078
+#: src/main/attrib.c:1175
 msgid "dims do not match the length of object"
 msgstr " dims はオブジェクトの長さに整合しません "
 
-#: src/main/attrib.c:1080
+#: src/main/attrib.c:1177
 #, c-format
 msgid "dims [product %d] do not match the length of object [%d]"
 msgstr " dims [product %d] はオブジェクト [%d] の長さに整合しません "
 
-#: src/main/attrib.c:1177
+#: src/main/attrib.c:1284
 msgid "attributes must be a list or NULL"
 msgstr " 属性はリストもしくは NULL でなければなりません "
 
-#: src/main/attrib.c:1182
+#: src/main/attrib.c:1289
 msgid "attributes must be named"
 msgstr " 属性は名前が付けられていなければなりません "
 
-#: src/main/attrib.c:1186
+#: src/main/attrib.c:1293
 #, c-format
 msgid "all attributes must have names [%d does not]"
 msgstr " 全ての属性は名前を持っていなければなりません [%d が持っていません] "
 
-#: src/main/attrib.c:1285
+#: src/main/attrib.c:1393
 msgid "'which' must be of mode character"
 msgstr " 'which' は文字列モードでなくてはなりません "
 
-#: src/main/attrib.c:1287
+#: src/main/attrib.c:1395
 msgid "exactly one attribute 'which' must be given"
 msgstr " 性格に一つの属性 'which' が与えらなければなりません "
 
-#: src/main/attrib.c:1345 src/main/attrib.c:1368 src/main/subscript.c:240
-#: src/main/subscript.c:244 src/main/subset.c:1188 src/main/subset.c:1239
+#: src/main/attrib.c:1456 src/main/attrib.c:1479 src/main/subscript.c:245
+#: src/main/subscript.c:249 src/main/subset.c:1257 src/main/subset.c:1311
 #, c-format
 msgid "partial match of '%s' to '%s'"
 msgstr " '%s' の '%s' への部分的マッチ "
 
-#: src/main/attrib.c:1406
+#: src/main/attrib.c:1525
 #, c-format
 msgid "invalid type '%s' for slot name"
 msgstr " スロット名に対する不正な型 '%s' です "
 
-#: src/main/attrib.c:1444
+#: src/main/attrib.c:1563
 msgid "'name' must be non-null character string"
 msgstr " 'name' は NULL でない文字列でなければなりません "
 
-#: src/main/attrib.c:1568 src/main/attrib.c:1639 src/main/attrib.c:1676
+#: src/main/attrib.c:1688 src/main/attrib.c:1759 src/main/attrib.c:1797
 msgid "invalid type or length for slot name"
 msgstr " スロット名の型または長さが不正です "
 
-#: src/main/attrib.c:1602
+#: src/main/attrib.c:1722
 #, c-format
 msgid "cannot get a slot (\"%s\") from an object of type \"%s\""
 msgstr ""
 " 型 \"%s\" のオブジェクトからはスロット (\"%s\") を得ることは出来ません "
 
-#: src/main/attrib.c:1613
+#: src/main/attrib.c:1733
 #, c-format
 msgid "no slot of name \"%s\" for this object of class \"%s\""
 msgstr ""
 " 名前 \"%s\" というスロットが、クラス \"%s\" のこのオブジェクトには存在しませ"
 "ん "
 
-#: src/main/attrib.c:1630
+#: src/main/attrib.c:1750
 msgid "attempt to set slot on NULL object"
 msgstr " NULL オブジェクトに対して スロットを設定しようとしました "
 
-#: src/main/attrib.c:1671
+#: src/main/attrib.c:1792
 msgid "formal classes cannot be used without the 'methods' package"
 msgstr ""
 " 'methods' パッケージなしにフォーマルクラス (formal class) は使用できません "
 
-#: src/main/attrib.c:1683
+#: src/main/attrib.c:1804
 #, c-format
 msgid ""
 "trying to get slot \"%s\" from an object of a basic class (\"%s\") with no "
@@ -1247,7 +1265,7 @@ msgstr ""
 " スロット \"%s\"を、スロットを持たない基本クラス (\"%s\") のオブジェクトから"
 "得ようとしました "
 
-#: src/main/attrib.c:1687
+#: src/main/attrib.c:1808
 #, c-format
 msgid ""
 "trying to get slot \"%s\" from an object (class \"%s\") that is not an S4 "
@@ -1256,47 +1274,46 @@ msgstr ""
 " スロット \"%s\" を S4 オブジェクトでは無い (クラス \"%s\") のオブジェクトか"
 "ら得ようとしました "
 
-#: src/main/bind.c:161
+#: src/main/bind.c:164
 #, c-format
 msgid "resulting vector exceeds vector length limit in '%s'"
 msgstr " '%s' で出力されるベクタは、ベクタの長さの上限を超えています "
 
-#: src/main/bind.c:291 src/main/bind.c:327 src/main/bind.c:376
-#: src/main/bind.c:449 src/main/bind.c:477
+#: src/main/bind.c:294 src/main/bind.c:330 src/main/bind.c:379
+#: src/main/bind.c:452 src/main/bind.c:480
 #, c-format
 msgid "type '%s' is unimplemented in '%s'"
 msgstr " '%s' 型 は '%s' 型には実装されていません "
 
-#: src/main/bind.c:685
+#: src/main/bind.c:688
 msgid "repeated formal argument 'recursive'"
 msgstr " 'recursive' 仮引数が繰り返されました "
 
-#: src/main/bind.c:696
+#: src/main/bind.c:699
 msgid "repeated formal argument 'use.names'"
 msgstr " 'use.names' 仮引数が繰り返されました "
 
-#: src/main/bind.c:894
+#: src/main/bind.c:900
 msgid "argument not a list"
 msgstr " 引数はリストではありません "
 
-#: src/main/bind.c:1038 src/main/eval.c:2691 src/main/eval.c:2700
-#: src/main/objects.c:318 src/main/objects.c:354 src/main/objects.c:729
-#: src/main/objects.c:746 src/main/objects.c:753
+#: src/main/bind.c:1044 src/main/names.c:1273 src/main/names.c:1278
+#: src/main/names.c:1283 src/main/names.c:1288
 #, c-format
 msgid "class name too long in '%s'"
 msgstr " '%s' のクラス名が長すぎます "
 
-#: src/main/bind.c:1114
+#: src/main/bind.c:1128
 #, c-format
 msgid "cannot create a matrix from type '%s'"
 msgstr " '%s' タイプからは行列を生成できません "
 
-#: src/main/bind.c:1185
+#: src/main/bind.c:1198
 #, c-format
 msgid "number of rows of matrices must match (see arg %d)"
 msgstr " 行列の行数は一致していなければなりません (%d 番目の引数を参照) "
 
-#: src/main/bind.c:1430
+#: src/main/bind.c:1455
 #, c-format
 msgid "number of columns of matrices must match (see arg %d)"
 msgstr " 行列の列数は一致していなければなりません (%d 番目の引数を参照) "
@@ -1305,119 +1322,132 @@ msgstr " 行列の列数は一致していなければなりません (%d 番目
 msgid "vector size cannot be NA"
 msgstr " ベクトルのサイズは NA ではありえません "
 
-#: src/main/builtin.c:49 src/main/builtin.c:57 src/main/sort.c:1303
+#: src/main/builtin.c:49 src/main/builtin.c:57 src/main/sort.c:1323
 msgid "vector size cannot be NA/NaN"
 msgstr " ベクトルのサイズは NA や NaN ではありえません "
 
-#: src/main/builtin.c:50 src/main/builtin.c:58 src/main/sort.c:1304
+#: src/main/builtin.c:50 src/main/builtin.c:58 src/main/sort.c:1324
 msgid "vector size cannot be infinite"
 msgstr " ベクトルのサイズは∞ではありえません "
 
-#: src/main/builtin.c:51 src/main/builtin.c:59 src/main/builtin.c:916
-#: src/main/sort.c:1305
+#: src/main/builtin.c:51 src/main/builtin.c:59 src/main/builtin.c:950
+#: src/main/sort.c:1325
 msgid "vector size specified is too large"
 msgstr " 指定されたベクトルのサイズが長すぎます "
 
-#: src/main/builtin.c:84 src/main/builtin.c:93 src/main/builtin.c:293
-#: src/main/builtin.c:326 src/main/builtin.c:365 src/main/builtin.c:375
-#: src/main/coerce.c:1537 src/main/connections.c:3066 src/main/engine.c:2967
-#: src/main/envir.c:993 src/main/envir.c:1046 src/main/envir.c:1136
-#: src/main/envir.c:1615 src/main/envir.c:1739 src/main/envir.c:1807
-#: src/main/envir.c:1925 src/main/envir.c:2582 src/main/envir.c:2642
-#: src/main/envir.c:2922 src/main/envir.c:2951 src/main/envir.c:2972
-#: src/main/envir.c:2995 src/main/envir.c:3030 src/main/envir.c:3051
-#: src/main/envir.c:3357 src/main/envir.c:3362 src/main/eval.c:5318
-#: src/main/objects.c:197 src/main/objects.c:203 src/main/saveload.c:2070
-#: src/main/saveload.c:2364 src/main/serialize.c:2709
+#: src/main/builtin.c:84 src/main/builtin.c:93 src/main/builtin.c:304
+#: src/main/builtin.c:337 src/main/builtin.c:394 src/main/builtin.c:408
+#: src/main/coerce.c:1536 src/main/connections.c:3062 src/main/engine.c:2987
+#: src/main/envir.c:1001 src/main/envir.c:1054 src/main/envir.c:1210
+#: src/main/envir.c:1749 src/main/envir.c:1873 src/main/envir.c:1939
+#: src/main/envir.c:2072 src/main/envir.c:2791 src/main/envir.c:2877
+#: src/main/envir.c:3182 src/main/envir.c:3211 src/main/envir.c:3232
+#: src/main/envir.c:3255 src/main/envir.c:3290 src/main/envir.c:3311
+#: src/main/envir.c:3632 src/main/envir.c:3637 src/main/eval.c:6251
+#: src/main/objects.c:191 src/main/objects.c:199 src/main/saveload.c:2072
+#: src/main/saveload.c:2364 src/main/serialize.c:2755
 msgid "use of NULL environment is defunct"
 msgstr " NULL環境の使用は廃要素です "
 
-#: src/main/builtin.c:306
+#: src/main/builtin.c:250 src/main/builtin.c:263
+#, fuzzy
+msgid "argument is not a function"
+msgstr " 引数は関数であってはなりません "
+
+#: src/main/builtin.c:317
 msgid "replacement object is not an environment"
 msgstr " 置き換えるオブジェクトが環境ではありません "
 
-#: src/main/builtin.c:331
+#: src/main/builtin.c:342
 msgid "'enclos' must be an environment"
 msgstr " 'enclos' は環境でなくてはなりません "
 
-#: src/main/builtin.c:352 src/main/builtin.c:370
+#: src/main/builtin.c:363 src/main/builtin.c:399
 msgid "argument is not an environment"
 msgstr " 引数が環境ではありません "
 
-#: src/main/builtin.c:354
+#: src/main/builtin.c:365
 msgid "the empty environment has no parent"
 msgstr " 空の環境は親を持ちません "
 
-#: src/main/builtin.c:372
+#: src/main/builtin.c:401
 msgid "can not set parent of the empty environment"
 msgstr " 空の環境の親は配置できません "
 
-#: src/main/builtin.c:380
+#: src/main/builtin.c:403
+msgid "can not set the parent environment of a namespace"
+msgstr " 名前空間の親の環境は設定できません "
+
+#: src/main/builtin.c:405
+msgid "can not set the parent environment of package imports"
+msgstr " パッケージのインポートの親の環境は設定できません "
+
+#: src/main/builtin.c:413
 msgid "'parent' is not an environment"
 msgstr " 'parent' は環境ではありません "
 
-#: src/main/builtin.c:521 src/main/connections.c:3691
-#: src/main/connections.c:4068 src/main/connections.c:4102
-#: src/main/connections.c:4480 src/main/connections.c:4550
-#: src/main/connections.c:4759 src/main/connections.c:4763
-#: src/main/connections.c:5124 src/main/deparse.c:360 src/main/deparse.c:446
-#: src/main/serialize.c:2006
+#: src/main/builtin.c:556 src/main/connections.c:3687
+#: src/main/connections.c:4079 src/main/connections.c:4113
+#: src/main/connections.c:4491 src/main/connections.c:4561
+#: src/main/connections.c:4772 src/main/connections.c:4776
+#: src/main/connections.c:5199 src/main/deparse.c:369 src/main/deparse.c:458
+#: src/main/serialize.c:2045
 msgid "cannot write to this connection"
 msgstr " このコネクションには書き出せません "
 
-#: src/main/builtin.c:526 src/main/builtin.c:556
+#: src/main/builtin.c:561 src/main/builtin.c:591
 #, c-format
 msgid "invalid '%s' specification"
 msgstr " '%s' の指定が不正です "
 
-#: src/main/builtin.c:543
+#: src/main/builtin.c:578
 msgid "non-positive 'fill' argument will be ignored"
 msgstr " 正でない 'fill' 引数は無視されます "
 
-#: src/main/builtin.c:618
+#: src/main/builtin.c:653
 #, c-format
 msgid "argument %d (type '%s') cannot be handled by 'cat'"
 msgstr " 引数 %d (タイプ '%s') は 'cat' で取り扱えません "
 
-#: src/main/builtin.c:763
+#: src/main/builtin.c:797
 #, c-format
 msgid "vector: cannot make a vector of mode '%s'."
 msgstr " ベクトル: モード '%s' のベクトルを作ることはできません。 "
 
-#: src/main/builtin.c:789
+#: src/main/builtin.c:823
 msgid "cannot set length of non-vector"
 msgstr " ベクトルでないものの長さは設定できません "
 
-#: src/main/builtin.c:897 src/main/builtin.c:907 src/main/options.c:637
+#: src/main/builtin.c:931 src/main/builtin.c:941 src/main/options.c:659
 msgid "invalid argument"
 msgstr " 引数が不正です "
 
-#: src/main/builtin.c:899 src/main/builtin.c:909 src/main/builtin.c:911
-#: src/main/character.c:366 src/main/coerce.c:2765
+#: src/main/builtin.c:933 src/main/builtin.c:943 src/main/builtin.c:945
+#: src/main/character.c:525 src/main/coerce.c:2832
 msgid "invalid value"
 msgstr " 値が不正です "
 
-#: src/main/builtin.c:942 src/main/coerce.c:2478 src/main/coerce.c:2519
-#: src/main/eval.c:563 src/main/eval.c:683 src/main/eval.c:2099
-#: src/main/eval.c:2176 src/main/eval.c:2236 src/main/eval.c:2569
-#: src/main/eval.c:4694 src/main/eval.c:4814
+#: src/main/builtin.c:976 src/main/coerce.c:2541 src/main/coerce.c:2584
+#: src/main/eval.c:620 src/main/eval.c:740 src/main/eval.c:2266
+#: src/main/eval.c:2346 src/main/eval.c:2407 src/main/eval.c:2745
+#: src/main/eval.c:5584 src/main/eval.c:5701
 msgid "'...' used in an incorrect context"
 msgstr " '...' が不適切な文脈で使われました "
 
-#: src/main/builtin.c:963
+#: src/main/builtin.c:998
 #, c-format
 msgid "duplicate 'switch' defaults: '%s' and '%s'"
 msgstr " 重複する 'switch' 既定値: '%s' と '%s' "
 
-#: src/main/builtin.c:996
+#: src/main/builtin.c:1031
 msgid "'EXPR' is missing"
 msgstr " 'EXPR' がありません "
 
-#: src/main/builtin.c:1000 src/main/eval.c:5155
+#: src/main/builtin.c:1035 src/main/eval.c:6056
 msgid "EXPR must be a length 1 vector"
 msgstr " EXPR は長さ 1 のベクトルでなければなりません "
 
-#: src/main/builtin.c:1003
+#: src/main/builtin.c:1038 src/main/eval.c:6059
 #, c-format
 msgid ""
 "EXPR is a \"factor\", treated as integer.\n"
@@ -1425,93 +1455,113 @@ msgid ""
 msgstr ""
 "EXPRはfactorで、整数として扱われます。代わりに'%s'の使用を検討してください "
 
-#: src/main/character.c:105 src/main/character.c:108 src/main/character.c:132
-#: src/main/character.c:135
+#: src/main/builtin.c:1095 src/main/eval.c:6069 src/main/eval.c:6098
+#, fuzzy
+msgid "'switch' with no alternatives"
+msgstr " 名前付きの代替値が無い 'switch' 関数には数値の EXPR が必要です "
+
+#: src/main/character.c:103 src/main/character.c:224
+#, fuzzy, c-format
+msgid "%d argument passed to '%s' which requires %d to %d"
+msgid_plural "%d arguments passed to '%s' which requires %d to %d"
+msgstr[0] " %d 個の引数が '%s' に渡されましたが、%d が必要とされています "
+
+#: src/main/character.c:110 src/main/character.c:113 src/main/character.c:232
+#: src/main/character.c:235
 #, c-format
 msgid "'%s' requires a character vector"
 msgstr " '%s' は文字ベクトルを要求します "
 
-#: src/main/character.c:164
-#, c-format
-msgid ""
-"number of characters is not computable for element %d in \"bytes\" encoding"
-msgstr " \"bytes\"でエンコードされた要素 %d の文字数が計算できません "
-
-#: src/main/character.c:169 src/main/character.c:197 src/main/character.c:653
-#: src/main/character.c:750
-#, c-format
-msgid "invalid multibyte string %d"
+#: src/main/character.c:150 src/main/character.c:165 src/main/character.c:175
+#: src/main/character.c:203
+#, fuzzy, c-format
+msgid "invalid multibyte string, %s"
 msgstr " %d は不正なマルチバイト文字です "
 
-#: src/main/character.c:185
-#, c-format
-msgid "width is not computable for element %d in \"bytes\" encoding"
+#: src/main/character.c:159
+#, fuzzy, c-format
+msgid "number of characters is not computable in \"bytes\" encoding, %s"
+msgstr " \"bytes\"でエンコードされた要素 %d の文字数が計算できません "
+
+#: src/main/character.c:188
+#, fuzzy, c-format
+msgid "width is not computable for %s in \"bytes\" encoding"
 msgstr " \"bytes\"でエンコードされた要素 %d の幅が計算できません "
 
-#: src/main/character.c:263
+#: src/main/character.c:311
 msgid "extracting substrings from a non-character object"
 msgstr " 文字列でないオブジェクトから部分文字列を抽出しようとしました "
 
-#: src/main/character.c:268 src/main/character.c:363
+#: src/main/character.c:321 src/main/character.c:522
 msgid "invalid substring arguments"
 msgstr " 部分文字列引数が不正です "
 
-#: src/main/character.c:358
+#: src/main/character.c:361
+#, fuzzy
+msgid "non-character object(s)"
+msgstr " 名前が文字列ではありません "
+
+#: src/main/character.c:517
 msgid "replacing substrings in a non-character object"
 msgstr " 文字列でないオブジェクトの部分文字列の置き換えです "
 
-#: src/main/character.c:551
+#: src/main/character.c:785
 msgid "the first argument must be a character vector"
 msgstr " 最初の引数は文字ベクトルでなくてはなりません "
 
-#: src/main/character.c:570
+#: src/main/character.c:822
 msgid "abbreviate used with non-ASCII chars"
 msgstr " ASCII 文字でないものが省略名として使われました "
 
-#: src/main/character.c:591
+#: src/main/character.c:843
 msgid "non-character names"
 msgstr " 名前が文字列ではありません "
 
-#: src/main/character.c:696 src/main/grep.c:159
+#: src/main/character.c:905 src/main/character.c:1002
+#, c-format
+msgid "invalid multibyte string %d"
+msgstr " %d は不正なマルチバイト文字です "
+
+#: src/main/character.c:948 src/main/grep.c:163
 msgid "non-character argument"
 msgstr " 文字列でない引数です "
 
-#: src/main/character.c:805
+#: src/main/character.c:1057
 #, c-format
 msgid "decreasing range specification ('%lc-%lc')"
 msgstr " 範囲指定を縮小します ('%lc-%lc') "
 
-#: src/main/character.c:891
+#: src/main/character.c:1143
 #, c-format
 msgid "decreasing range specification ('%c-%c')"
 msgstr " 範囲指定を縮小します ('%c-%c') "
 
-#: src/main/character.c:1079
+#: src/main/character.c:1331
 msgid "invalid UTF-8 string 'old'"
 msgstr " 'old' は不正な UTF-8 文字です "
 
-#: src/main/character.c:1085
+#: src/main/character.c:1337
 msgid "invalid multibyte string 'old'"
 msgstr " 'old' は不正なマルチバイト文字です "
 
-#: src/main/character.c:1098
+#: src/main/character.c:1350
 msgid "invalid UTF-8 string 'new'"
 msgstr " 'new' は不正な UTF-8 文字列です "
 
-#: src/main/character.c:1104
+#: src/main/character.c:1356
 msgid "invalid multibyte string 'new'"
 msgstr " 'new' は不正なマルチバイト文字です "
 
-#: src/main/character.c:1132 src/main/character.c:1221
+#: src/main/character.c:1384 src/main/character.c:1473
 msgid "'old' is longer than 'new'"
 msgstr " 'old' が 'new' より長いです "
 
-#: src/main/character.c:1164
+#: src/main/character.c:1416
 #, c-format
 msgid "invalid input multibyte string %d"
 msgstr " 不正なマルチバイト文字列入力 %d です "
 
-#: src/main/character.c:1271
+#: src/main/character.c:1523
 msgid "strtrim() requires a character vector"
 msgstr " strtrim() 関数は文字ベクトルを要求します "
 
@@ -1523,15 +1573,16 @@ msgstr " 'mode' 引数が不正です "
 msgid "applies only to lists and vectors"
 msgstr " リストとベクトルのみに適用できます "
 
-#: src/main/coerce.c:77 src/main/errors.c:1208
+#: src/main/coerce.c:77 src/main/errors.c:1194
 msgid "NAs introduced by coercion"
 msgstr " 強制変換により NA が生成されました "
 
-#: src/main/coerce.c:79 src/main/errors.c:1209
-msgid "inaccurate integer conversion in coercion"
-msgstr " 強制変換中に不正確な整数変換が行われました "
+#: src/main/coerce.c:79
+#, fuzzy
+msgid "NAs introduced by coercion to integer range"
+msgstr " 強制変換により NA が生成されました "
 
-#: src/main/coerce.c:81 src/main/errors.c:1210
+#: src/main/coerce.c:81 src/main/errors.c:1196
 msgid "imaginary parts discarded in coercion"
 msgstr " 複素数の虚部は、コネクションで捨てられました "
 
@@ -1539,59 +1590,63 @@ msgstr " 複素数の虚部は、コネクションで捨てられました "
 msgid "out-of-range values treated as 0 in coercion to raw"
 msgstr " raw コネクションで、範囲外の値は 0 として扱いました "
 
-#: src/main/coerce.c:414
+#: src/main/coerce.c:399
 #, c-format
 msgid "invalid data of mode '%s' (too short)"
 msgstr " 不正なモード '%s' のデータです (短すぎます) "
 
-#: src/main/coerce.c:1016
+#: src/main/coerce.c:1002
 #, c-format
 msgid "'pairlist' object cannot be coerced to type '%s'"
 msgstr " 'pairlist' オブジェクトは '%s' には変換できません "
 
-#: src/main/coerce.c:1134
+#: src/main/coerce.c:1120
 #, c-format
 msgid "(list) object cannot be coerced to type '%s'"
 msgstr " (list) オブジェクトは '%s' に変換できません "
 
-#: src/main/coerce.c:1157
+#: src/main/coerce.c:1143
 #, c-format
 msgid "(symbol) object cannot be coerced to type '%s'"
 msgstr " (symbol) オブジェクトは '%s' に変換できません "
 
-#: src/main/coerce.c:1173 src/main/coerce.c:1485
+#: src/main/coerce.c:1159 src/main/coerce.c:1484
 msgid "no method for coercing this S4 class to a vector"
 msgstr " この S4 クラスをベクトルに強制変換する方法はありません "
 
-#: src/main/coerce.c:1232
+#: src/main/coerce.c:1222
 msgid "environments cannot be coerced to other types"
 msgstr " 環境は他の型に変換することはできません "
 
-#: src/main/coerce.c:1379
+#: src/main/coerce.c:1374
 msgid "attempting to coerce non-factor"
 msgstr " 非因子へ強制変換しようとしています "
 
-#: src/main/coerce.c:1533
+#: src/main/coerce.c:1379 src/main/coerce.c:1389
+msgid "malformed factor"
+msgstr ""
+
+#: src/main/coerce.c:1532
 msgid "list argument expected"
 msgstr " リスト引数が期待されています "
 
-#: src/main/coerce.c:1541 src/main/eval.c:5322
+#: src/main/coerce.c:1540 src/main/eval.c:6255
 msgid "invalid environment"
 msgstr " 不正な環境です "
 
-#: src/main/coerce.c:1545
+#: src/main/coerce.c:1544
 msgid "argument must have length at least 1"
 msgstr " 引数は長さが 1 以上でなければいけません "
 
-#: src/main/coerce.c:1567
+#: src/main/coerce.c:1566
 msgid "invalid body for function"
 msgstr " 関数の内容が不正です "
 
-#: src/main/coerce.c:1590
+#: src/main/coerce.c:1589
 msgid "invalid length 0 argument"
 msgstr " 長さが 0 の引数は不正です "
 
-#: src/main/coerce.c:1605
+#: src/main/coerce.c:1604
 msgid "invalid argument list"
 msgstr " 引数リストが不正です "
 
@@ -1603,51 +1658,48 @@ msgstr " \"single\" 型は R には実装されていません "
 msgid "unimplemented predicate"
 msgstr " 未実装の「述語」です "
 
-#: src/main/coerce.c:2069
+#: src/main/coerce.c:2070
 #, c-format
 msgid "%s() applied to non-(list or vector) of type '%s'"
 msgstr " %s() は型 '%s' のベクトル、リスト以外に適用されます "
 
-#: src/main/coerce.c:2212 src/main/coerce.c:2275 src/main/coerce.c:2343
+#: src/main/coerce.c:2267 src/main/coerce.c:2331 src/main/coerce.c:2403
 #, c-format
 msgid "default method not implemented for type '%s'"
 msgstr " 型 '%s' のデフォルトメソッドは実装されていません "
 
-#: src/main/coerce.c:2361
+#: src/main/coerce.c:2425
 msgid "'name' is missing"
 msgstr " 'name' が見つかりません "
 
-#: src/main/coerce.c:2368
+#: src/main/coerce.c:2432
 msgid "first argument must be a character string"
 msgstr " 最初の引数は文字列でなくてはなりません "
 
-#: src/main/coerce.c:2401
-msgid "'what' must be a character string or a function"
-msgstr " 'what' は文字列または関数でなければなりません "
+#: src/main/coerce.c:2464
+#, fuzzy
+msgid "'what' must be a function or character string"
+msgstr " 'text' は文字列でなければなりません "
 
-#: src/main/coerce.c:2405
+#: src/main/coerce.c:2468
 msgid "'args' must be a list or expression"
 msgstr " 'args' はリストまたはexpressionでなければなりません "
 
-#: src/main/coerce.c:2408
-msgid "'args' must be a list"
-msgstr " 'args' はリストでなくてはなりません "
-
-#: src/main/coerce.c:2412
+#: src/main/coerce.c:2475 src/main/unique.c:1345
 msgid "'envir' must be an environment"
 msgstr " 'envir' は環境でなくてはなりません "
 
-#: src/main/coerce.c:2567
+#: src/main/coerce.c:2634
 msgid "invalid environment specified"
 msgstr " 不正な環境指定です "
 
-#: src/main/coerce.c:2633
+#: src/main/coerce.c:2700
 msgid "Setting class(x) to NULL;   result will no longer be an S4 object"
 msgstr ""
 " class(x) を NULL に設定しようとしています; 結果はもはや S4 オブジェクトでは"
 "なくなります "
 
-#: src/main/coerce.c:2636
+#: src/main/coerce.c:2703
 #, c-format
 msgid ""
 "Setting class(x) to multiple strings (\"%s\", \"%s\", ...); result will no "
@@ -1656,7 +1708,7 @@ msgstr ""
 " class(x) を多重文字列 (\"%s\", \"%s\", ...) に設定しようとしています; 結果は"
 "もはや S4 オブジェクトではなくなります "
 
-#: src/main/coerce.c:2640
+#: src/main/coerce.c:2707
 #, c-format
 msgid ""
 "Setting class(x) to \"%s\" sets attribute to NULL; result will no longer be "
@@ -1665,11 +1717,11 @@ msgstr ""
 " class(x) を \"%s\" に設定すると属性は NULL に設定されます; 結果はもはや S4 "
 "オブジェクトではなくなります "
 
-#: src/main/coerce.c:2673
+#: src/main/coerce.c:2740
 msgid "invalid replacement object to be a class string"
 msgstr " クラス文字列とするには不正な置き換えオブジェクトです "
 
-#: src/main/coerce.c:2694
+#: src/main/coerce.c:2761
 #, c-format
 msgid ""
 "\"%s\" can only be set as the class if the object has this type; found \"%s\""
@@ -1677,7 +1729,7 @@ msgstr ""
 " \"%s\" はオブジェクトがこの型を持つ時だけクラスとして設定できます。\"%s\" が"
 "見つかりました "
 
-#: src/main/coerce.c:2712
+#: src/main/coerce.c:2779
 #, c-format
 msgid ""
 "invalid to set the class to matrix unless the dimension attribute is of "
@@ -1686,636 +1738,639 @@ msgstr ""
 " 次元属性が長さ 2 でないかぎり (%d でした)、行列にクラスを設定するのは不正で"
 "す "
 
-#: src/main/coerce.c:2720
+#: src/main/coerce.c:2787
 msgid ""
 "cannot set class to \"array\" unless the dimension attribute has length > 0"
 msgstr " 次元属性が長さ > 0 でないかぎり、配列にクラスを設定できません "
 
-#: src/main/coerce.c:2756
+#: src/main/coerce.c:2823
 msgid "'value' must be non-null character string"
 msgstr " 'value' は NULL でない文字列でなければなりません "
 
-#: src/main/coerce.c:2769
+#: src/main/coerce.c:2836
 msgid "invalid to change the storage mode of a factor"
 msgstr " 因子保管モードを変更するのは不正です "
 
-#: src/main/complex.c:126
+#: src/main/complex.c:123
 msgid "invalid complex unary operator"
 msgstr " 不正な複素単項演算子です "
 
-#: src/main/complex.c:261
+#: src/main/complex.c:251
 msgid "unimplemented complex operation"
 msgstr " 未実装の複素演算です "
 
-#: src/main/complex.c:363
+#: src/main/complex.c:353
 msgid "non-numeric argument to function"
 msgstr " 関数の引数が数値ではありません "
 
-#: src/main/complex.c:827
+#: src/main/complex.c:822
 msgid "invalid polynomial coefficient"
 msgstr " 多項式の係数が不正です "
 
-#: src/main/complex.c:832
+#: src/main/complex.c:827
 msgid "root finding code failed"
 msgstr " 根を見つけるコードが失敗しました "
 
-#: src/main/connections.c:153
+#: src/main/connections.c:150
 msgid "all connections are in use"
 msgstr " 全てのコネクションが使用中です "
 
-#: src/main/connections.c:164
+#: src/main/connections.c:161
 msgid "connection not found"
 msgstr " コネクションがありません "
 
-#: src/main/connections.c:175
+#: src/main/connections.c:172 src/main/connections.c:5213
 msgid "invalid connection"
 msgstr " コネクションが不正です "
 
-#: src/main/connections.c:207
+#: src/main/connections.c:204
 #, c-format
 msgid "closing unused connection %d (%s)\n"
 msgstr " 使われていないコネクション %d (%s) を閉じます \n"
 
-#: src/main/connections.c:232 src/main/sysutils.c:619 src/main/sysutils.c:806
-#: src/main/sysutils.c:821 src/main/sysutils.c:912 src/main/sysutils.c:927
-#: src/main/sysutils.c:1023 src/main/sysutils.c:1096 src/main/sysutils.c:1106
-#: src/main/sysutils.c:1119 src/main/sysutils.c:1516
+#: src/main/connections.c:229 src/main/sysutils.c:631 src/main/sysutils.c:834
+#: src/main/sysutils.c:849 src/main/sysutils.c:978 src/main/sysutils.c:1051
+#: src/main/sysutils.c:1061 src/main/sysutils.c:1074 src/main/sysutils.c:1472
 #, c-format
 msgid "unsupported conversion from '%s' to '%s'"
 msgstr " '%s' から '%s' へのサポートされていない変換です "
 
-#: src/main/connections.c:288 src/main/connections.c:304
-#: src/main/connections.c:456 src/main/connections.c:462
-#: src/main/connections.c:468 src/main/connections.c:479
-#: src/main/connections.c:486
+#: src/main/connections.c:285 src/main/connections.c:300
+#: src/main/connections.c:451 src/main/connections.c:456
+#: src/main/connections.c:461 src/main/connections.c:472
+#: src/main/connections.c:478
 #, c-format
 msgid "%s not enabled for this connection"
 msgstr " このコネクションでは %s は有効になっていません "
 
-#: src/main/connections.c:335 src/main/connections.c:352
-#: src/main/connections.c:2916
+#: src/main/connections.c:330 src/main/connections.c:347
+#: src/main/connections.c:2910
 msgid "printing of extremely long output is truncated"
 msgstr " 出力が長過ぎるのでプリントは切りつめられました "
 
-#: src/main/connections.c:375
+#: src/main/connections.c:370
 msgid "invalid char string in output conversion"
 msgstr " 出力の変換中に不正な char 文字列があります "
 
-#: src/main/connections.c:439
+#: src/main/connections.c:434
 #, c-format
 msgid "invalid input found on input connection '%s'"
 msgstr " 入力コネクション '%s' に不正な入力がありました "
 
-#: src/main/connections.c:580
+#: src/main/connections.c:571
 #, c-format
 msgid "cannot open file '%ls': %s"
 msgstr " ファイル '%ls' を開くことができません: %s "
 
-#: src/main/connections.c:691
+#: src/main/connections.c:683
 msgid "connection is not open for reading"
 msgstr " コネクションは読み込みのために開かれていません "
 
-#: src/main/connections.c:696
+#: src/main/connections.c:688
 msgid "connection is not open for writing"
 msgstr " コネクションは書き出しのために開かれていません "
 
-#: src/main/connections.c:734 src/main/connections.c:2229
+#: src/main/connections.c:726 src/main/connections.c:2223
 msgid "can only truncate connections open for writing"
 msgstr " 書き出しのために開いているコネクションだけが切りつめられます "
 
-#: src/main/connections.c:738 src/main/connections.c:740
+#: src/main/connections.c:730 src/main/connections.c:732
 msgid "file truncation failed"
 msgstr " ファイルの切りつめに失敗しました "
 
-#: src/main/connections.c:742
+#: src/main/connections.c:734
 msgid "file truncation unavailable on this platform"
 msgstr " このプラットフォームではファイルの切りつめはできません "
 
-#: src/main/connections.c:788 src/main/connections.c:792
-#: src/main/connections.c:798 src/main/connections.c:815
+#: src/main/connections.c:780 src/main/connections.c:784
+#: src/main/connections.c:790 src/main/connections.c:807
 msgid "allocation of file connection failed"
 msgstr " ファイル接続の割り当てに失敗しました "
 
-#: src/main/connections.c:866 src/main/connections.c:1044
+#: src/main/connections.c:858 src/main/connections.c:1035
 #, c-format
 msgid "cannot create fifo '%s', reason '%s'"
 msgstr " fifo '%s' を作れません、理由は '%s' です "
 
-#: src/main/connections.c:872
+#: src/main/connections.c:864
 #, c-format
 msgid "'%s' exists but is not a fifo"
 msgstr " '%s' は存在しますが、fifo ではありません "
 
-#: src/main/connections.c:886
+#: src/main/connections.c:878
 #, c-format
 msgid "fifo '%s' is not ready"
 msgstr " fifo '%s' は準備ができていません "
 
-#: src/main/connections.c:887
+#: src/main/connections.c:879
 #, c-format
 msgid "cannot open fifo '%s'"
 msgstr " fifo '%s' を開くことができません "
 
-#: src/main/connections.c:928 src/main/connections.c:939
-#: src/main/connections.c:1104 src/main/connections.c:1123
-#: src/main/connections.c:1531 src/main/connections.c:1541
-#: src/main/connections.c:1660 src/main/connections.c:1720
-#: src/main/connections.c:2246 src/main/connections.c:2263
-#: src/main/connections.c:2572 src/main/connections.c:5305
-#: src/main/connections.c:5369
+#: src/main/connections.c:920 src/main/connections.c:931
+#: src/main/connections.c:1095 src/main/connections.c:1114
+#: src/main/connections.c:1524 src/main/connections.c:1534
+#: src/main/connections.c:1653 src/main/connections.c:1713
+#: src/main/connections.c:2240 src/main/connections.c:2257
+#: src/main/connections.c:2566 src/main/connections.c:5385
+#: src/main/connections.c:5449
 msgid "too large a block specified"
 msgstr " 指定されたブロックが大きすぎます "
 
-#: src/main/connections.c:998 src/main/connections.c:1004
+#: src/main/connections.c:989 src/main/connections.c:995
 msgid "allocation of fifo name failed"
 msgstr " fifo名の割付に失敗しました "
 
-#: src/main/connections.c:1066
+#: src/main/connections.c:1057
 #, c-format
 msgid "cannot open fifo '%s', reason '%s'"
 msgstr " URL '%s' を開くことができません、理由は '%s' です "
 
-#: src/main/connections.c:1107 src/main/connections.c:1131
+#: src/main/connections.c:1098 src/main/connections.c:1122
 msgid "allocation of fifo buffer failed"
 msgstr " fifoバッファの割付に失敗しました "
 
-#: src/main/connections.c:1139
+#: src/main/connections.c:1130
 #, c-format
 msgid "cannot write FIFO '%s'"
 msgstr "FIFO '%s' に書き込めません "
 
-#: src/main/connections.c:1175 src/main/connections.c:1179
-#: src/main/connections.c:1185 src/main/connections.c:1201
+#: src/main/connections.c:1166 src/main/connections.c:1170
+#: src/main/connections.c:1176 src/main/connections.c:1192
 msgid "allocation of fifo connection failed"
 msgstr " fifo 接続の割り当てに失敗しました "
 
-#: src/main/connections.c:1219 src/main/connections.c:1377
-#: src/main/connections.c:1998 src/main/connections.c:3212
-#: src/main/connections.c:4967
+#: src/main/connections.c:1210 src/main/connections.c:1369
+#: src/main/connections.c:1991 src/main/connections.c:3205
+#: src/main/connections.c:4982
 msgid "only first element of 'description' argument used"
 msgstr " 'description' 引数の最初の要素だけが使われました "
 
-#: src/main/connections.c:1236
+#: src/main/connections.c:1227
 msgid ""
 "fifo(\"\") only supports open = \"w+\" and open = \"w+b\": using the former"
 msgstr ""
 " fifo(\"\") は、open = \"w+\" と open = \"w+b\" だけをサポートします: 前者を"
 "使います "
 
-#: src/main/connections.c:1250 src/main/connections.c:1414
-#: src/main/connections.c:2064 src/main/connections.c:3179
-#: src/main/connections.c:3232 src/main/connections.c:3280
-#: src/main/connections.c:3567 src/main/connections.c:3683
-#: src/main/connections.c:3844 src/main/connections.c:4095
-#: src/main/connections.c:4423 src/main/connections.c:4543
-#: src/main/connections.c:4755 src/main/connections.c:5105 src/main/dcf.c:94
-#: src/main/deparse.c:352 src/main/deparse.c:438 src/main/saveload.c:2267
-#: src/main/saveload.c:2350 src/main/scan.c:933 src/main/serialize.c:2175
-#: src/main/serialize.c:2226 src/main/source.c:265
+#: src/main/connections.c:1242 src/main/connections.c:1407
+#: src/main/connections.c:2058 src/main/connections.c:3175
+#: src/main/connections.c:3226 src/main/connections.c:3274
+#: src/main/connections.c:3563 src/main/connections.c:3679
+#: src/main/connections.c:3841 src/main/connections.c:4106
+#: src/main/connections.c:4434 src/main/connections.c:4554
+#: src/main/connections.c:4768 src/main/connections.c:5180 src/main/dcf.c:93
+#: src/main/deparse.c:361 src/main/deparse.c:450 src/main/saveload.c:2269
+#: src/main/saveload.c:2350 src/main/scan.c:933 src/main/serialize.c:2216
+#: src/main/serialize.c:2267 src/main/source.c:270
 msgid "cannot open the connection"
 msgstr " コネクションを開くことができません "
 
-#: src/main/connections.c:1265
+#: src/main/connections.c:1257
 msgid "fifo connections are not available on this system"
 msgstr " このシステムでは fifo コネクションは利用できません "
 
-#: src/main/connections.c:1295
+#: src/main/connections.c:1287
 #, c-format
 msgid "cannot pipe() cmd '%ls': %s"
 msgstr " pipe() cmd '%ls' を開くことができません: %s "
 
-#: src/main/connections.c:1302
+#: src/main/connections.c:1294
 #, c-format
 msgid "cannot open pipe() cmd '%s': %s"
 msgstr " pipe() コマンド '%s' を開くことができません: %s "
 
-#: src/main/connections.c:1471 src/main/connections.c:1791
+#: src/main/connections.c:1464 src/main/connections.c:1784
 #, c-format
 msgid "cannot open compressed file '%s', probable reason '%s'"
 msgstr " 圧縮されたファイル '%s' を開くことができません, 理由は '%s' です "
 
-#: src/main/connections.c:1511
+#: src/main/connections.c:1504
 msgid "whence = \"end\" is not implemented for gzfile connections"
 msgstr " gzfile コネクションに対しては、whence = \"end\" は未実装です "
 
-#: src/main/connections.c:1516
+#: src/main/connections.c:1509
 msgid "seek on a gzfile connection returned an internal error"
 msgstr " gzfile コネクションをシーク中に内部エラーを検出しました "
 
-#: src/main/connections.c:1550 src/main/connections.c:1554
-#: src/main/connections.c:1560 src/main/connections.c:1577
+#: src/main/connections.c:1543 src/main/connections.c:1547
+#: src/main/connections.c:1553 src/main/connections.c:1570
 msgid "allocation of gzfile connection failed"
 msgstr " gzfile 接続の割り当てに失敗しました "
 
-#: src/main/connections.c:1606
+#: src/main/connections.c:1599
 #, c-format
 msgid "cannot open bzip2-ed file '%s', probable reason '%s'"
 msgstr ""
 " bzip2 により圧縮されたファイル '%s' を開くことができません、理由は '%s' で"
 "す "
 
-#: src/main/connections.c:1615
+#: src/main/connections.c:1608
 #, c-format
 msgid "file '%s' appears not to be compressed by bzip2"
 msgstr " ファイル '%s' は bzip2 で圧縮されていないようです "
 
-#: src/main/connections.c:1624
+#: src/main/connections.c:1617
 #, c-format
 msgid "initializing bzip2 compression for file '%s' failed"
 msgstr " ファイル '%s' に対する bzip2 圧縮の初期化に失敗しました "
 
-#: src/main/connections.c:1678
+#: src/main/connections.c:1671
 msgid "allocation of overflow buffer for bzfile failed"
 msgstr " bzfile のためのオーバーフローバッファの割り当ては失敗しました "
 
-#: src/main/connections.c:1685
+#: src/main/connections.c:1678
 #, c-format
 msgid ""
 "file '%s' has trailing content that appears not to be compressed by bzip2"
 msgstr " ファイル '%s' は bzip2 で圧縮されていないようです "
 
-#: src/main/connections.c:1731 src/main/connections.c:1735
-#: src/main/connections.c:1741 src/main/connections.c:1758
+#: src/main/connections.c:1724 src/main/connections.c:1728
+#: src/main/connections.c:1734 src/main/connections.c:1751
 msgid "allocation of bzfile connection failed"
 msgstr " bzfile 接続の割り当てに失敗しました "
 
-#: src/main/connections.c:1804 src/main/connections.c:5961
+#: src/main/connections.c:1797 src/main/connections.c:6046
 #, c-format
 msgid "cannot initialize lzma decoder, error %d"
 msgstr " lzma デコーダーを初期化できません、エラー %d "
 
-#: src/main/connections.c:1820
+#: src/main/connections.c:1813
 #, c-format
 msgid "cannot initialize lzma encoder, error %d"
 msgstr " lzma エンコーダーを初期化できません、エラー %d "
 
-#: src/main/connections.c:1948 src/main/connections.c:1952
-#: src/main/connections.c:1958 src/main/connections.c:1976
+#: src/main/connections.c:1941 src/main/connections.c:1945
+#: src/main/connections.c:1951 src/main/connections.c:1969
 msgid "allocation of xzfile connection failed"
 msgstr " xzfile 接続の割り当てに失敗しました "
 
-#: src/main/connections.c:2035
+#: src/main/connections.c:2028
 #, c-format
 msgid "this is a %s-compressed file which this build of R does not support"
 msgstr " これは R のこのビルトがサポートしていない %s-圧縮ファイルです。 "
 
-#: src/main/connections.c:2130 src/modules/X11/devX11.c:3375
+#: src/main/connections.c:2124 src/modules/X11/devX11.c:3381
 msgid "memory allocation to copy clipboard failed"
 msgstr " クリップボードのコピーでメモリ確保に失敗しました "
 
-#: src/main/connections.c:2135 src/modules/X11/devX11.c:3354
-#: src/modules/X11/devX11.c:3359
+#: src/main/connections.c:2129 src/modules/X11/devX11.c:3360
+#: src/modules/X11/devX11.c:3365
 msgid "clipboard cannot be opened or contains no text"
 msgstr " クリップボードを開くことができないか、中身がありません "
 
-#: src/main/connections.c:2146
+#: src/main/connections.c:2140
 msgid "memory allocation to open clipboard failed"
 msgstr " クリップボードのオープンでメモリ確保に失敗しました "
 
-#: src/main/connections.c:2174
+#: src/main/connections.c:2168
 msgid "unable to open the clipboard"
 msgstr " クリップボードを開くことができません "
 
-#: src/main/connections.c:2178
+#: src/main/connections.c:2172
 msgid "unable to write to the clipboard"
 msgstr " クリップボードに書き込めません "
 
-#: src/main/connections.c:2218
+#: src/main/connections.c:2212
 msgid "attempt to seek outside the range of the clipboard"
 msgstr " クリップボードの範囲を超えて探索しようとしました "
 
-#: src/main/connections.c:2261
+#: src/main/connections.c:2255
 msgid "clipboard connection is open for reading only"
 msgstr " クリップボードは読み取り専用で開かれました "
 
-#: src/main/connections.c:2281
+#: src/main/connections.c:2275
 msgid "clipboard buffer is full and output lost"
 msgstr " クリップボードのバッファが一杯なので、出力が失われました "
 
-#: src/main/connections.c:2302
+#: src/main/connections.c:2296
 msgid "'mode' for the clipboard must be 'r' or 'w'"
 msgstr " クリップボードの 'mode' は 'r' か 'w' でなければなりません "
 
-#: src/main/connections.c:2305
+#: src/main/connections.c:2299
 msgid "'mode' for the clipboard must be 'r' on Unix"
 msgstr " Unix ではクリップボードの 'mode' は 'r' でなければなりません "
 
-#: src/main/connections.c:2308 src/main/connections.c:2314
-#: src/main/connections.c:2320 src/main/connections.c:2337
+#: src/main/connections.c:2302 src/main/connections.c:2308
+#: src/main/connections.c:2314 src/main/connections.c:2331
 msgid "allocation of clipboard connection failed"
 msgstr " クリップボード接続の割り当てに失敗しました "
 
-#: src/main/connections.c:2406 src/main/connections.c:2410
-#: src/main/connections.c:2416
+#: src/main/connections.c:2400 src/main/connections.c:2404
+#: src/main/connections.c:2410
 msgid "allocation of terminal connection failed"
 msgstr " ターミナル接続の割り当てに失敗しました "
 
-#: src/main/connections.c:2549
+#: src/main/connections.c:2543
 msgid "attempting to add too many elements to raw vector"
 msgstr " ベクトルに追加しようとした要素が多すぎます "
 
-#: src/main/connections.c:2601
+#: src/main/connections.c:2595
 msgid "attempt to seek outside the range of the raw connection"
 msgstr " raw コネクションの範囲を超えて探索しようとしました "
 
-#: src/main/connections.c:2612 src/main/connections.c:2616
-#: src/main/connections.c:2622 src/main/connections.c:2648
+#: src/main/connections.c:2606 src/main/connections.c:2610
+#: src/main/connections.c:2616 src/main/connections.c:2642
 msgid "allocation of raw connection failed"
 msgstr " raw コネクションの割り当てに失敗しました "
 
-#: src/main/connections.c:2701
+#: src/main/connections.c:2695
 msgid "'con' is not a rawConnection"
 msgstr " 'con' は raw コネクションではありません "
 
-#: src/main/connections.c:2704
+#: src/main/connections.c:2698
 msgid "'con' is not an output rawConnection"
 msgstr " 'con' は出力 raw コネクションではありません "
 
-#: src/main/connections.c:2742
+#: src/main/connections.c:2736
 msgid "too many characters for text connection"
 msgstr " テキストコネクションに対して多すぎる文字列です "
 
-#: src/main/connections.c:2747
+#: src/main/connections.c:2741
 msgid "cannot allocate memory for text connection"
 msgstr " テキストコネクション用にメモリを割り当てることができません "
 
-#: src/main/connections.c:2796
+#: src/main/connections.c:2790
 msgid "seek is not relevant for text connection"
 msgstr " テキストコネクションにおいて seek は不適切です "
 
-#: src/main/connections.c:2804 src/main/connections.c:2808
-#: src/main/connections.c:2814 src/main/connections.c:2827
-#: src/main/connections.c:3012 src/main/connections.c:3016
-#: src/main/connections.c:3022 src/main/connections.c:3035
-#: src/main/connections.c:3041
+#: src/main/connections.c:2798 src/main/connections.c:2802
+#: src/main/connections.c:2808 src/main/connections.c:2821
+#: src/main/connections.c:3008 src/main/connections.c:3012
+#: src/main/connections.c:3018 src/main/connections.c:3031
+#: src/main/connections.c:3037
 msgid "allocation of text connection failed"
 msgstr " テキスト接続の割り当てに失敗しました "
 
-#: src/main/connections.c:2989
+#: src/main/connections.c:2983
 msgid "text connection: appending to a non-existent char vector"
 msgstr ""
 " テキストコネクション: 存在しない文字ベクトルに付加 (append) しようとしまし"
 "た "
 
-#: src/main/connections.c:3093
+#: src/main/connections.c:3089
 msgid "unsupported mode"
 msgstr " サポートされていないモードです "
 
-#: src/main/connections.c:3115
+#: src/main/connections.c:3111
 msgid "'con' is not a textConnection"
 msgstr " 'con' はテキストコネクションではありません "
 
-#: src/main/connections.c:3118
+#: src/main/connections.c:3114
 msgid "'con' is not an output textConnection"
 msgstr " 'con' は出力テキストコネクションではありません "
 
-#: src/main/connections.c:3192
-msgid "sockets are not available on this system"
-msgstr " このシステムではソケットは使えません "
-
-#: src/main/connections.c:3260 src/main/connections.c:3309
-#: src/main/connections.c:3320 src/main/connections.c:3367
-#: src/main/connections.c:3392 src/main/connections.c:3415
-#: src/main/connections.c:3427 src/main/connections.c:3543
-#: src/main/connections.c:3668 src/main/connections.c:5408
+#: src/main/connections.c:3254 src/main/connections.c:3303
+#: src/main/connections.c:3314 src/main/connections.c:3361
+#: src/main/connections.c:3388 src/main/connections.c:3411
+#: src/main/connections.c:3423 src/main/connections.c:3539
+#: src/main/connections.c:3664 src/main/connections.c:5489
 msgid "'con' is not a connection"
 msgstr " 'con' はコネクションではありません "
 
-#: src/main/connections.c:3263
+#: src/main/connections.c:3257
 msgid "cannot open standard connections"
 msgstr " 標準コネクションを開くことができません "
 
-#: src/main/connections.c:3265
+#: src/main/connections.c:3259
 msgid "connection is already open"
 msgstr " コネクションはすでに開かれています "
 
-#: src/main/connections.c:3298
+#: src/main/connections.c:3292
 msgid "unknown 'rw' value"
 msgstr " 未知の 'rw' 値です "
 
-#: src/main/connections.c:3369
+#: src/main/connections.c:3363
 msgid "cannot close standard connections"
 msgstr " 標準コネクションを閉じることができません "
 
-#: src/main/connections.c:3372
+#: src/main/connections.c:3366
 msgid "cannot close 'output' sink connection"
 msgstr " 'output' sink コネクションを閉じることができません "
 
-#: src/main/connections.c:3374
+#: src/main/connections.c:3368
 msgid "cannot close 'message' sink connection"
 msgstr " 'message' sink コネクションを閉じることができません "
 
-#: src/main/connections.c:3394 src/main/connections.c:5123
-#: src/main/connections.c:5131 src/main/serialize.c:1996
-#: src/main/serialize.c:2004
+#: src/main/connections.c:3390 src/main/connections.c:5198
+#: src/main/connections.c:5206 src/main/serialize.c:2035
+#: src/main/serialize.c:2043
 msgid "connection is not open"
 msgstr " コネクションは開かれていません "
 
-#: src/main/connections.c:3490 src/main/connections.c:3502
+#: src/main/connections.c:3486 src/main/connections.c:3498
 msgid "line longer than buffer size"
 msgstr " 行がバッファーサイズより長くなっています "
 
-#: src/main/connections.c:3574 src/main/connections.c:3576
-#: src/main/connections.c:3852 src/main/connections.c:4406
-#: src/main/connections.c:4431 src/main/connections.c:5132 src/main/dcf.c:101
-#: src/main/scan.c:936 src/main/scan.c:940 src/main/serialize.c:1998
-#: src/main/source.c:272
+#: src/main/connections.c:3570 src/main/connections.c:3572
+#: src/main/connections.c:3849 src/main/connections.c:4417
+#: src/main/connections.c:4442 src/main/connections.c:5207 src/main/dcf.c:100
+#: src/main/scan.c:936 src/main/scan.c:940 src/main/serialize.c:2037
+#: src/main/source.c:277
 msgid "cannot read from this connection"
 msgstr " このコネクションから読み込みできません "
 
-#: src/main/connections.c:3588 src/main/connections.c:3610
+#: src/main/connections.c:3584 src/main/connections.c:3606
 msgid "cannot allocate buffer in readLines"
 msgstr " readLines にバッファを割り当てることができません "
 
-#: src/main/connections.c:3623
+#: src/main/connections.c:3619
 #, c-format
 msgid "line %d appears to contain an embedded nul"
 msgstr " 行 %d は、埋め込まれたnulを含んでいるようです "
 
-#: src/main/connections.c:3640
+#: src/main/connections.c:3636
 #, c-format
 msgid "incomplete final line found on '%s'"
 msgstr " '%s' で不完全な最終行が見つかりました "
 
-#: src/main/connections.c:3646
+#: src/main/connections.c:3642
 msgid "too few lines read in readLines"
 msgstr " readLines で読み込む行が少なすぎます "
 
-#: src/main/connections.c:3749
+#: src/main/connections.c:3746
 msgid "incomplete string at end of file has been discarded"
 msgstr " ファイルの末尾の不完全な文字列は無視されています "
 
-#: src/main/connections.c:3755
+#: src/main/connections.c:3752
 msgid "null terminator not found: breaking string at 10000 bytes"
 msgstr " 終端 (null) がありません、10000 byte に切りつめました "
 
-#: src/main/connections.c:3820
+#: src/main/connections.c:3817
 msgid "can only read from a binary connection"
 msgstr " バイナリコネクションからのみ入力できます "
 
-#: src/main/connections.c:3869 src/main/connections.c:4176
+#: src/main/connections.c:3866 src/main/connections.c:4187
 msgid "size changing is not supported for complex vectors"
 msgstr " 複素ベクトルのサイズの変更はサポートされていません "
 
-#: src/main/connections.c:3907 src/main/connections.c:3925
-#: src/main/connections.c:3951 src/main/connections.c:4010
-#: src/main/connections.c:4030 src/main/connections.c:4157
-#: src/main/connections.c:4170 src/main/connections.c:4229
-#: src/main/connections.c:4261
+#: src/main/connections.c:3905 src/main/connections.c:3923
+#: src/main/connections.c:3949 src/main/connections.c:3993
+#: src/main/connections.c:4024 src/main/connections.c:4044
+#: src/main/connections.c:4168 src/main/connections.c:4181
+#: src/main/connections.c:4240 src/main/connections.c:4272
 #, c-format
 msgid "size %d is unknown on this machine"
 msgstr " このマシンでは %d というサイズは使われていません "
 
-#: src/main/connections.c:3936
+#: src/main/connections.c:3934
 msgid "raw is always of size 1"
 msgstr " raw 型オブジェクトのサイズはいつも 1 です "
 
-#: src/main/connections.c:3959
+#: src/main/connections.c:3957
 msgid "'signed = FALSE' is only valid for integers of sizes 1 and 2"
 msgstr " 'signed = FALSE' は、サイズ 1 および 2 の整数に対してのみ有効です "
 
-#: src/main/connections.c:4060
+#: src/main/connections.c:4071
 msgid "'x' is not an atomic vector type"
 msgstr " 'x' がアトミックベクトルタイプではありません "
 
-#: src/main/connections.c:4066
+#: src/main/connections.c:4077
 msgid "can only write to a binary connection"
 msgstr " バイナリコネクションにだけ書き込みできます "
 
-#: src/main/connections.c:4085
+#: src/main/connections.c:4096
 msgid "only 2^31-1 bytes can be written to a raw vector"
 msgstr " raw ベクトルには 2^31-1 バイトしか書き込みできません "
 
-#: src/main/connections.c:4087
+#: src/main/connections.c:4098
 msgid "only 2^31-1 bytes can be written in a single writeBin() call"
 msgstr " 一つの writeBin() 呼び出しには 2^31-1 バイトしか書き込みできません "
 
-#: src/main/connections.c:4136 src/main/connections.c:4289
-#: src/main/connections.c:4570 src/main/connections.c:4610
+#: src/main/connections.c:4147 src/main/connections.c:4300
+#: src/main/connections.c:4581 src/main/connections.c:4621
 msgid "problem writing to connection"
 msgstr " コネクションへの書き込みに問題があります "
 
-#: src/main/connections.c:4181
+#: src/main/connections.c:4192
 msgid "size changing is not supported for raw vectors"
 msgstr " raw ベクトルのサイズの変更はサポートされていません "
 
-#: src/main/connections.c:4324 src/main/connections.c:4328
-#: src/main/connections.c:4367
+#: src/main/connections.c:4335 src/main/connections.c:4339
+#: src/main/connections.c:4378
 msgid "invalid UTF-8 input in readChar()"
 msgstr " readChar() 関数への不正な UTF-8 入力です "
 
-#: src/main/connections.c:4434
+#: src/main/connections.c:4445
 msgid "can only read in bytes in a non-UTF-8 MBCS locale"
 msgstr " UTF-8 以外のマルチバイトロケールではバイト型でのみ読み込み可能です "
 
-#: src/main/connections.c:4506
+#: src/main/connections.c:4517
 msgid "'object' is too short"
 msgstr " 'object' が短すぎます "
 
-#: src/main/connections.c:4559
+#: src/main/connections.c:4570
 msgid "writeChar: more bytes requested than are in the string - will zero-pad"
 msgstr ""
 " writeChar: 文字列中に今ある以上のバイト数が要求されています-ゼロで埋めます "
 
-#: src/main/connections.c:4584
+#: src/main/connections.c:4595
 msgid ""
 "writeChar: more characters requested than are in the string - will zero-pad"
 msgstr ""
 " writeChar: 文字列中に今ある以上の文字が要求されています-ゼロで埋めます "
 
-#: src/main/connections.c:4638
+#: src/main/connections.c:4649
 msgid "maximum number of pushback lines exceeded"
 msgstr " pushback 行の最大値を超えてしまいました "
 
-#: src/main/connections.c:4644 src/main/connections.c:4648
-#: src/main/connections.c:4685 src/main/connections.c:4693
+#: src/main/connections.c:4655 src/main/connections.c:4659
+#: src/main/connections.c:4696 src/main/connections.c:4704
 msgid "could not allocate space for pushback"
 msgstr " pushback のための領域を割り当てられませんでした "
 
-#: src/main/connections.c:4676
+#: src/main/connections.c:4687
 msgid "can only push back on open readable connections"
 msgstr " 開いている読み込み可能コネクションへのみプッシュバックできます "
 
-#: src/main/connections.c:4678
+#: src/main/connections.c:4689
 msgid "can only push back on text-mode connections"
 msgstr " テキストモードのコネクションへのみプッシュバックできます "
 
-#: src/main/connections.c:4740 src/main/connections.c:4810
+#: src/main/connections.c:4753 src/main/connections.c:4823
 msgid "sink stack is full"
 msgstr " sink のスタックが溢れました "
 
-#: src/main/connections.c:4743
+#: src/main/connections.c:4756
 msgid "cannot switch output to stdin"
 msgstr " 出力を stdin へ切り替えることができません "
 
-#: src/main/connections.c:4770
+#: src/main/connections.c:4783
 msgid "no sink to remove"
 msgstr " 取り除くべき sink がありません "
 
-#: src/main/connections.c:4892
+#: src/main/connections.c:4903
 msgid "there is no connection NA"
 msgstr " NA というコネクションはありません "
 
-#: src/main/connections.c:4894
+#: src/main/connections.c:4905
 #, c-format
 msgid "there is no connection %d"
 msgstr " %d というコネクションはありません "
 
-#: src/main/connections.c:5029
+#: src/main/connections.c:5039
+msgid "method = \"wininet\" is only supported on Windows"
+msgstr " method = \"wininet\" はWindowsでのみサポートされます "
+
+#: src/main/connections.c:5103
 msgid ""
 "file(\"\") only supports open = \"w+\" and open = \"w+b\": using the former"
 msgstr ""
 " file(\"\") は、open = \"w+\" と open = \"w+b\" だけをサポートします: 前者を"
 "使います "
 
-#: src/main/connections.c:5083 src/modules/internet/internet.c:115
-#: src/modules/internet/internet.c:569
-msgid "unsupported URL scheme"
-msgstr " サポートされていないURLスキームです "
+#: src/main/connections.c:5157
+msgid "URL scheme unsupported by this method"
+msgstr " このメソッドではURLスキームはサポートされていません "
 
-#: src/main/connections.c:5173
+#: src/main/connections.c:5253
 msgid "file stream does not have gzip magic number"
 msgstr " ファイルストリームは gzip マジックナンバーを持っていません "
 
-#: src/main/connections.c:5184
+#: src/main/connections.c:5264
 msgid "file stream does not have valid gzip header"
 msgstr " ファイルストリームは適正な gzip ヘッダを持っていません "
 
-#: src/main/connections.c:5249
+#: src/main/connections.c:5329
 msgid "writing error whilst flushing 'gzcon' connection"
 msgstr " 'gzcon' コネクションのフラッシュ時に書き込みエラーが生じました "
 
-#: src/main/connections.c:5351
+#: src/main/connections.c:5431
 #, c-format
 msgid "crc error %x %x\n"
 msgstr " crc エラー %x %x \n"
 
-#: src/main/connections.c:5378
+#: src/main/connections.c:5458
 msgid "write error on 'gzcon' connection"
 msgstr " 'gzcon' コネクションに書き込みエラーが生じました "
 
-#: src/main/connections.c:5412
+#: src/main/connections.c:5493
 msgid "'level' must be one of 0 ... 9"
 msgstr " 'level' は 0~9 のいずれかでなくてはなりません "
 
-#: src/main/connections.c:5415
+#: src/main/connections.c:5496
 msgid "'allowNonCompression' must be TRUE or FALSE"
 msgstr " 'allowNonCompression' は TRUE または FALSE でなければなりません "
 
-#: src/main/connections.c:5418
+#: src/main/connections.c:5499
+#, fuzzy
+msgid "'text' must be TRUE or FALSE"
+msgstr " 'all.x' は TRUE または FALSE でなければなりません "
+
+#: src/main/connections.c:5502
 msgid "this is already a 'gzcon' connection"
 msgstr " これはすでに 'gzcon' コネクションです "
 
-#: src/main/connections.c:5424
+#: src/main/connections.c:5508
 msgid "can only use read- or write- binary connections"
 msgstr " 読み込み、または書き出しのためのバイナリコネクションのみが使えます "
 
-#: src/main/connections.c:5427
+#: src/main/connections.c:5511
 msgid "using a text-mode 'file' connection may not work correctly"
 msgstr ""
 " テキストモード 'file' コネクションの使用は正しく機能しないかもしれません "
 
-#: src/main/connections.c:5430
+#: src/main/connections.c:5514
 msgid ""
 "cannot create a 'gzcon' connection from a writable textConnection; maybe use "
 "rawConnection"
@@ -2323,115 +2378,111 @@ msgstr ""
 " 書き込み可能な textConnection からの 'gzcon' コネクションを作成できません; "
 "rawConnection を使うべきかもしれません "
 
-#: src/main/connections.c:5433 src/main/connections.c:5437
-#: src/main/connections.c:5444 src/main/connections.c:5458
+#: src/main/connections.c:5517 src/main/connections.c:5521
+#: src/main/connections.c:5528 src/main/connections.c:5542
 msgid "allocation of 'gzcon' connection failed"
 msgstr " 'gzcon' コネクションで割り当てに失敗しました "
 
-#: src/main/connections.c:5644
+#: src/main/connections.c:5729
 msgid "not a list of sockets"
 msgstr " ソケットのリストではありません "
 
-#: src/main/connections.c:5649
+#: src/main/connections.c:5734
 msgid "bad write indicators"
 msgstr " 不適切な書き込み指示子です "
 
-#: src/main/connections.c:5660
+#: src/main/connections.c:5745
 msgid "not a socket connection"
 msgstr " ソケットコネクションではありません "
 
-#: src/main/connections.c:5905
+#: src/main/connections.c:5990
 msgid "unknown compression, assuming none"
 msgstr " 未知の圧縮法です、何も仮定しません "
 
-#: src/main/connections.c:6023 src/main/connections.c:6027
-#: src/main/connections.c:6033
+#: src/main/connections.c:6108 src/main/connections.c:6112
+#: src/main/connections.c:6118
 #, c-format
 msgid "allocation of %s connection failed"
 msgstr " %s コネクションの割り当てに失敗しました "
 
-#: src/main/context.c:282
+#: src/main/context.c:316
 msgid "no loop for break/next, jumping to top level"
 msgstr " break/next に対応するループがないので、トップレベルにジャンプします "
 
-#: src/main/context.c:290
+#: src/main/context.c:324
 msgid "no function to return from, jumping to top level"
 msgstr " 戻るための関数がありません、トップレベルへジャンプします "
 
-#: src/main/context.c:302
+#: src/main/context.c:339
 msgid "target context is not on the stack"
 msgstr " 目標の文脈 (context) はスタック上にありません "
 
-#: src/main/context.c:324 src/main/context.c:340 src/main/context.c:407
-#: src/main/context.c:428 src/main/context.c:440 src/main/context.c:452
+#: src/main/context.c:361 src/main/context.c:377 src/main/context.c:444
+#: src/main/context.c:465 src/main/context.c:477 src/main/context.c:489
 msgid "not that many frames on the stack"
 msgstr " それはスタック上の多くのフレームではありません "
 
-#: src/main/context.c:357
+#: src/main/context.c:394
 msgid "only positive values of 'n' are allowed"
 msgstr " 'n' は正の値だけが許されます "
 
-#: src/main/context.c:478
-msgid "no function to restart"
-msgstr " 再実行のための関数がありません "
-
-#: src/main/context.c:515
+#: src/main/context.c:526
 msgid "number of contexts must be positive"
 msgstr " コンテキストの数は正でなくてはなりません "
 
-#: src/main/context.c:528
+#: src/main/context.c:539
 msgid "no browser context to query"
 msgstr " 問い合わせすべきブラウザーコンテキストがありません "
 
-#: src/main/context.c:546
+#: src/main/context.c:557
 msgid "not that many calls to browser are active"
 msgstr " そんなに多くのアクティブなブラウザーへの呼び出しはありません "
 
-#: src/main/context.c:560
+#: src/main/context.c:571
 msgid "not that many functions on the call stack"
 msgstr " 呼び出しスタック上にはそんなに多くの関数はありません "
 
-#: src/main/context.c:645
+#: src/main/context.c:656
 msgid "internal error in 'do_sys'"
 msgstr " 'do_sys' で内部エラーが起きました "
 
 #: src/main/cum.c:49
 msgid "integer overflow in 'cumsum'; use 'cumsum(as.numeric(.))'"
 msgstr ""
-" 'cumsum' 関数において整数のオーバーフローがありました。'cumsum(as.numeric"
-"(.))' を使って下さい "
-
-#: src/main/cum.c:178
-msgid "'cummin' not defined for complex numbers"
-msgstr " 複素数に対しては 'cummin' 関数は定義されていません "
+" 'cumsum' 関数において整数のオーバーフローがありました。'cumsum(as."
+"numeric(.))' を使って下さい "
 
-#: src/main/cum.c:181
+#: src/main/cum.c:179
 msgid "'cummax' not defined for complex numbers"
 msgstr " 複素数に対しては 'cummax' 関数は定義されていません "
 
-#: src/main/cum.c:206 src/main/cum.c:230
+#: src/main/cum.c:182
+msgid "'cummin' not defined for complex numbers"
+msgstr " 複素数に対しては 'cummin' 関数は定義されていません "
+
+#: src/main/cum.c:209 src/main/cum.c:236
 msgid "unknown cumxxx function"
 msgstr " 未知の cumxxx 関数です "
 
-#: src/main/datetime.c:548 src/main/datetime.c:556 src/main/datetime.c:570
-#: src/main/datetime.c:575
+#: src/main/datetime.c:554 src/main/datetime.c:562 src/main/datetime.c:576
+#: src/main/datetime.c:581
 msgid "problem with setting timezone"
 msgstr " タイムゾーンの設定に問題があります "
 
-#: src/main/datetime.c:560
+#: src/main/datetime.c:566
 msgid "cannot set timezones on this system"
 msgstr " このシステムではタイムゾーンは設定できません "
 
-#: src/main/datetime.c:582 src/main/datetime.c:584
+#: src/main/datetime.c:588 src/main/datetime.c:590
 msgid "problem with unsetting timezone"
 msgstr " タイムゾーンが未設定による問題です "
 
-#: src/main/datetime.c:804 src/main/datetime.c:806 src/main/datetime.c:901
-#: src/main/datetime.c:1240 src/main/datetime.c:1242
+#: src/main/datetime.c:810 src/main/datetime.c:812 src/main/datetime.c:908
+#: src/main/datetime.c:1258 src/main/datetime.c:1260
 msgid "zero-length component in non-empty \"POSIXlt\" structure"
 msgstr " 空ではない \"POSIXlt\" 構造の中に長さゼロの成分があります "
 
-#: src/main/dcf.c:113 src/main/dcf.c:181 src/main/dcf.c:253
+#: src/main/dcf.c:112 src/main/dcf.c:181 src/main/dcf.c:253
 msgid "could not allocate memory for 'read.dcf'"
 msgstr " 'read.dcf' のためのメモリを割り当てられませんでした "
 
@@ -2445,81 +2496,86 @@ msgstr " レコードの先頭で '%s ...' で始まっている継続行が見
 msgid "Line starting '%s ...' is malformed!"
 msgstr " '%s ...' で始まる行は不正です "
 
-#: src/main/debug.c:45
-msgid "argument must be a closure"
-msgstr " 引数はクロージャーでなければなりません "
-
-#: src/main/debug.c:76
+#: src/main/debug.c:46 src/main/debug.c:76
 msgid "argument must be a function"
 msgstr " 引数は関数でなければなりません "
 
-#: src/main/debug.c:132 src/main/debug.c:166 src/main/debug.c:224
+#: src/main/debug.c:111
+#, c-format
+msgid "Value for '%s' must be TRUE or FALSE"
+msgstr " '%s' の値は TRUE または FALSE でなければなりません "
+
+#: src/main/debug.c:139 src/main/debug.c:167 src/main/debug.c:241
 msgid "argument must not be a function"
 msgstr " 引数は関数であってはなりません "
 
-#: src/main/debug.c:135
+#: src/main/debug.c:142
 msgid "cannot trace NULL"
 msgstr " NULL をトレースできません "
 
-#: src/main/debug.c:139
+#: src/main/debug.c:146
 msgid "'tracemem' is not useful for promise and environment objects"
 msgstr " 'tracemem' は宣言と環境のオブジェクトに無力です "
 
-#: src/main/debug.c:142
+#: src/main/debug.c:149
 msgid "'tracemem' is not useful for weak reference or external pointer objects"
 msgstr " 'tracemem' は弱い参照または外部ポインターにたいしては役に立ちません "
 
-#: src/main/debug.c:148 src/main/debug.c:171
+#: src/main/debug.c:180 src/main/debug.c:187
 msgid "R was not compiled with support for memory profiling"
 msgstr ""
 " R がメモリプロファイリングのサポートを有効にしてコンパイルされていません "
 
-#: src/main/deparse.c:152 src/main/sprintf.c:213 src/main/sprintf.c:245
+#: src/main/deparse.c:156 src/main/sprintf.c:216 src/main/sprintf.c:248
 msgid "too few arguments"
 msgstr " 引数が少なすぎます "
 
-#: src/main/deparse.c:159
+#: src/main/deparse.c:163
 msgid "invalid 'cutoff' value for 'deparse', using default"
 msgstr " 'deparse' に対する不正な 'cutoff' 値です; 既定値を使います "
 
-#: src/main/deparse.c:247
+#: src/main/deparse.c:254
 msgid "deparse of an S4 object will not be source()able"
 msgstr " S4 オブジェクトの文字列化 (deparse) は source() できないでしょう "
 
-#: src/main/deparse.c:249
+#: src/main/deparse.c:256
 msgid "deparse may be incomplete"
 msgstr " 式の文字列化 (deparse) が不完全かも知れません "
 
-#: src/main/deparse.c:251
+#: src/main/deparse.c:258
 msgid "deparse may be not be source()able in R < 2.7.0"
 msgstr ""
 " R 2.7.0 より以前のバージョンで文字列化 (deparse) された式は source() できな"
 "いかもしれません "
 
-#: src/main/deparse.c:369 src/main/deparse.c:461 src/main/deparse.c:467
+#: src/main/deparse.c:350 src/main/deparse.c:400 src/main/source.c:206
+msgid "'file' must be a character string or connection"
+msgstr " 'file' は文字列またはコネクションでなければなりません "
+
+#: src/main/deparse.c:378 src/main/deparse.c:473 src/main/deparse.c:479
 msgid "wrote too few characters"
 msgstr " 書かれた文字が短すぎます "
 
-#: src/main/deparse.c:391
+#: src/main/deparse.c:402
 msgid "character arguments expected"
 msgstr " 文字引数 (複数) が期待されています "
 
-#: src/main/deparse.c:394
+#: src/main/deparse.c:405
 msgid "zero-length argument"
 msgstr " 長さゼロの引数です "
 
-#: src/main/deparse.c:401
+#: src/main/deparse.c:412
 msgid "'opts' should be small non-negative integer"
 msgstr " 'opts' は、小さな非負の整数でなくてはなりません "
 
-#: src/main/deparse.c:411 src/main/envir.c:1764 src/main/envir.c:1846
-#: src/main/eval.c:569 src/main/eval.c:1251 src/main/eval.c:3627
-#: src/main/saveload.c:1978 src/main/saveload.c:2309 src/main/serialize.c:2727
+#: src/main/deparse.c:422 src/main/envir.c:1898 src/main/envir.c:1983
+#: src/main/eval.c:626 src/main/eval.c:1423 src/main/eval.c:4246
+#: src/main/saveload.c:1980 src/main/saveload.c:2312 src/main/serialize.c:2773
 #, c-format
 msgid "object '%s' not found"
 msgstr " オブジェクト '%s' がありません "
 
-#: src/main/deparse.c:1519
+#: src/main/deparse.c:1592
 msgid "badly formed function expression"
 msgstr " 関数の構文が不適切です "
 
@@ -2527,251 +2583,234 @@ msgstr " 関数の構文が不適切です "
 msgid "the base graphics system is not registered"
 msgstr " 基本グラフィックスシステムが登録されていません "
 
-#: src/main/devices.c:165 src/main/devices.c:172
+#: src/main/devices.c:166 src/main/devices.c:174
 msgid "no active or default device"
 msgstr " アクティブまたはデフォルトデバイスがありません "
 
-#: src/main/devices.c:385 src/main/devices.c:447
+#: src/main/devices.c:388 src/main/devices.c:450
 msgid "too many open devices"
 msgstr " 開いたデバイスが多すぎます "
 
-#: src/main/devices.c:474
+#: src/main/devices.c:491
 msgid "not enough memory to allocate device (in GEcreateDevDesc)"
 msgstr " (GEcreateDevDesc 内で) デバイス割り当てに十分なメモリがありません "
 
-#: src/main/devices.c:515
+#: src/main/devices.c:532
 msgid "Hit <Return> to see next plot: "
 msgstr " 次の図を見るためには <Return> キーを押して下さい: "
 
-#: src/main/dotcode.c:112 src/main/dotcode.c:142
+#: src/main/dotcode.c:127 src/main/dotcode.c:157
 msgid "NULL value passed as symbol address"
 msgstr " シンボルのアドレスに対して NULL 値が渡されました "
 
-#: src/main/dotcode.c:133
+#: src/main/dotcode.c:148
 #, c-format
 msgid "Unimplemented type %d in createRSymbolObject"
 msgstr " createRSymbolObject には型 %d は未実装です "
 
-#: src/main/dotcode.c:147 src/main/dotcode.c:237
+#: src/main/dotcode.c:162 src/main/dotcode.c:260
 #, c-format
 msgid "symbol '%s' is too long"
 msgstr " シンボル '%s' が長すぎます "
 
-#: src/main/dotcode.c:159
+#: src/main/dotcode.c:174
 msgid ""
 "first argument must be a string (of length 1) or native symbol reference"
 msgstr ""
 " 最初の引数は (長さ 1 の) 文字列またはネイティブなシンボル参照でなければなり"
 "ません "
 
-#: src/main/dotcode.c:201 src/main/dotcode.c:563
+#: src/main/dotcode.c:224 src/main/dotcode.c:1240
 msgid "too many arguments in foreign function call"
 msgstr " 外部関数の呼び出しで引数が多すぎます "
 
-#: src/main/dotcode.c:213
+#: src/main/dotcode.c:236
 msgid "PACKAGE = \"\" is invalid"
 msgstr "PACKAGE = \"\" は不正です "
 
-#: src/main/dotcode.c:269 src/main/dotcode.c:274 src/main/dotcode.c:279
-#: src/main/dotcode.c:284
+#: src/main/dotcode.c:292 src/main/dotcode.c:297 src/main/dotcode.c:302
+#: src/main/dotcode.c:307
 #, c-format
 msgid "\"%s\" not available for %s() for package \"%s\""
 msgstr " \"%s\" は %s() に対しては (パッケージ \"%s\" に対して) 使えません "
 
-#: src/main/dotcode.c:289
+#: src/main/dotcode.c:312
 #, c-format
 msgid "%s symbol name \"%s\" not in DLL for package \"%s\""
 msgstr " %s シンボル名 \"%s\" はパッケージ \"%s\" の DLL の中にありません "
 
-#: src/main/dotcode.c:294
+#: src/main/dotcode.c:317
 #, c-format
 msgid "%s symbol name \"%s\" not in load table"
 msgstr " %s シンボル名 \"%s\" は load table にありません "
 
-#: src/main/dotcode.c:348 src/main/dotcode.c:352 src/main/dotcode.c:362
-#: src/main/dotcode.c:427 src/main/dotcode.c:434
+#: src/main/dotcode.c:368 src/main/dotcode.c:370 src/main/dotcode.c:380
+#: src/main/dotcode.c:445 src/main/dotcode.c:452
 #, c-format
 msgid "'%s' used more than once"
 msgstr " '%s' が二回以上使われました "
 
-#: src/main/dotcode.c:358
+#: src/main/dotcode.c:376
 msgid "DLL name is too long"
 msgstr " DLL の名前が長すぎます "
 
-#: src/main/dotcode.c:403
+#: src/main/dotcode.c:421
 msgid "PACKAGE argument must be a single character string"
 msgstr " PACKAGE 引数は単一の文字列でなければなりません "
 
-#: src/main/dotcode.c:409
+#: src/main/dotcode.c:427
 msgid "PACKAGE argument is too long"
 msgstr " PACKAGE 引数が長すぎます "
 
-#: src/main/dotcode.c:474
+#: src/main/dotcode.c:492
 msgid "no arguments supplied"
 msgstr " 引数が与えられていません "
 
-#: src/main/dotcode.c:475 src/main/seq.c:913
+#: src/main/dotcode.c:493 src/main/seq.c:911
 msgid "too many arguments"
 msgstr " 引数の数が多すぎます "
 
-#: src/main/dotcode.c:512 src/main/dotcode.c:554 src/main/dotcode.c:1397
+#: src/main/dotcode.c:530 src/main/dotcode.c:1232 src/main/dotcode.c:1420
 msgid "'.NAME' is missing"
 msgstr " '.NAME' がありません "
 
-#: src/main/dotcode.c:521 src/main/dotcode.c:570 src/main/dotcode.c:1418
+#: src/main/dotcode.c:539 src/main/dotcode.c:1247 src/main/dotcode.c:1441
 #, c-format
 msgid "Incorrect number of arguments (%d), expecting %d for '%s'"
 msgstr ""
 " 引数の数 (%1$d) が不正です。'%3$s' に対しては %2$d 個の引数が必要です "
 
-#: src/main/dotcode.c:1227 src/main/dotcode.c:2276
+#: src/main/dotcode.c:1216 src/main/dotcode.c:2290
 msgid "too many arguments, sorry"
 msgstr " 引数が多すぎます、すみません "
 
-#: src/main/dotcode.c:1261 src/main/dotcode.c:1278 src/main/engine.c:2993
+#: src/main/dotcode.c:1284 src/main/dotcode.c:1301 src/main/engine.c:3013
 msgid "invalid graphics state"
 msgstr " グラフィックスの状態が不正です "
 
-#: src/main/dotcode.c:1357
+#: src/main/dotcode.c:1380
 msgid "NULL value for DLLInfoReference when looking for DLL"
 msgstr " DLL を探している際に、DLLInfoReference に NULL 値が見つかりました "
 
-#: src/main/dotcode.c:1458
+#: src/main/dotcode.c:1481
 #, c-format
 msgid "wrong type for argument %d in call to %s"
 msgstr " %d 引数に対する不正な型です(%s への呼び出しにおいて) "
 
-#: src/main/dotcode.c:1470
-#, c-format
-msgid ""
-"explicit request not to duplicate arguments in call to '%s', but argument %d "
-"is of the wrong type (%d != %d)"
-msgstr ""
-" '%s' への呼出しで、引数を複製しないという明示的な要求ですが、引数 %d は誤っ"
-"たタイプです (%d != %d) "
-
-#: src/main/dotcode.c:1493
+#: src/main/dotcode.c:1510
 #, c-format
 msgid "long vectors (argument %d) are not supported in %s"
 msgstr " 長いベクトル (引数 %d) は %s ではサポートされていません "
 
-#: src/main/dotcode.c:1524
+#: src/main/dotcode.c:1541
 #, c-format
 msgid "NAs in foreign function call (arg %d)"
 msgstr " 外部関数呼出しの引数 %d が NA です "
 
-#: src/main/dotcode.c:1547
+#: src/main/dotcode.c:1564
 #, c-format
 msgid "NA/NaN/Inf in foreign function call (arg %d)"
 msgstr " 外部関数の呼び出し (引数 %d) 中に NA/NaN/Inf があります "
 
-#: src/main/dotcode.c:1552
-msgid "single values not returned if not duplicated"
-msgstr " 単一の値は重複しているのでなければ返されません "
-
-#: src/main/dotcode.c:1578
+#: src/main/dotcode.c:1594
 #, c-format
 msgid "complex NA/NaN/Inf in foreign function call (arg %d)"
 msgstr " 外部関数呼出し (引数 %d) 中に複素数の NA/NaN/Inf 値があります "
 
-#: src/main/dotcode.c:1597
-msgid "character variables must be duplicated in .C/.Fortran"
-msgstr " .C/.Fortran 中に文字列変数は重複していなければなりません "
-
-#: src/main/dotcode.c:1602
+#: src/main/dotcode.c:1616
 msgid "only first string in char vector used in .Fortran"
 msgstr " .Fortran に対する文字ベクトルとして、最初の文字列だけを使いました "
 
-#: src/main/dotcode.c:1645 src/main/dotcode.c:1661 src/main/dotcode.c:1672
+#: src/main/dotcode.c:1659 src/main/dotcode.c:1675 src/main/dotcode.c:1686
 #, c-format
 msgid "invalid mode (%s) to pass to Fortran (arg %d)"
 msgstr " Fortran に渡すには不正なモードです (%s) (arg %d) "
 
-#: src/main/dotcode.c:1666
+#: src/main/dotcode.c:1680
 #, c-format
 msgid "invalid mode (%s) to pass to C or Fortran (arg %d)"
 msgstr " Fortran もしくは C に渡すには不正なモード (%s) です (arg %d) "
 
-#: src/main/dotcode.c:1677
+#: src/main/dotcode.c:1691
 msgid "pairlists are passed as SEXP as from R 2.15.0"
 msgstr " ペアリストは R 2.15.0 以降では SEXP として引き渡されます "
 
-#: src/main/dotcode.c:2499
+#: src/main/dotcode.c:2510
 #, c-format
 msgid "type \"%s\" not supported in interlanguage calls"
 msgstr " 言語間呼び出しにおいて \"%s\" 型はサポートされていません "
 
-#: src/main/dotcode.c:2604
+#: src/main/dotcode.c:2615
 #, c-format
 msgid "mode '%s' is not supported in call_R"
 msgstr " call_R では '%s' というモードはサポートされていません "
 
-#: src/main/dounzip.c:171
+#: src/main/dounzip.c:172
 #, c-format
 msgid " not overwriting file '%s"
 msgstr " ファイル '%s' を上書きしません "
 
-#: src/main/dounzip.c:256
+#: src/main/dounzip.c:257
 #, c-format
 msgid "zip file '%s' cannot be opened"
 msgstr " zip ファイル '%s' を開くことができません "
 
-#: src/main/dounzip.c:312
+#: src/main/dounzip.c:313
 msgid "invalid zip name argument"
 msgstr " 引数 (zip 名) が不正です "
 
-#: src/main/dounzip.c:315 src/main/dounzip.c:409
+#: src/main/dounzip.c:316 src/main/dounzip.c:410
 msgid "zip path is too long"
 msgstr " zip ファイルのパスが長すぎます "
 
-#: src/main/dounzip.c:332
+#: src/main/dounzip.c:333
 msgid "'exdir' is too long"
 msgstr " 'exdir' が長すぎます "
 
-#: src/main/dounzip.c:335
+#: src/main/dounzip.c:336
 msgid "'exdir' does not exist"
 msgstr " 'exdir' がありません "
 
-#: src/main/dounzip.c:363
+#: src/main/dounzip.c:364
 msgid "requested file not found in the zip file"
 msgstr " zip ファイル中には、要求されたファイルは存在しません "
 
-#: src/main/dounzip.c:366
+#: src/main/dounzip.c:367
 msgid "zip file is corrupt"
 msgstr " zip ファイルが壊れています "
 
-#: src/main/dounzip.c:369
+#: src/main/dounzip.c:370
 msgid "CRC error in zip file"
 msgstr " zip ファイルに CRC エラーがありました "
 
-#: src/main/dounzip.c:376
+#: src/main/dounzip.c:377
 msgid "write error in extracting from zip file"
 msgstr " zip ファイルから抽出中に書き込みエラーが生じました "
 
-#: src/main/dounzip.c:379
+#: src/main/dounzip.c:380
 #, c-format
 msgid "error %d in extracting from zip file"
 msgstr " zip ファイルから抽出中にエラー %d が起こりました "
 
-#: src/main/dounzip.c:404
+#: src/main/dounzip.c:405
 msgid "unz connections can only be opened for reading"
 msgstr " unz コネクションは読み込みのためにだけオープンされます "
 
-#: src/main/dounzip.c:415
+#: src/main/dounzip.c:416
 msgid "invalid description of 'unz' connection"
 msgstr " 'unz' コネクションの記述が不正です "
 
-#: src/main/dounzip.c:421
+#: src/main/dounzip.c:422
 #, c-format
 msgid "cannot open zip file '%s'"
 msgstr " zip ファイル '%s' を開くことができません "
 
-#: src/main/dounzip.c:425
+#: src/main/dounzip.c:426
 #, c-format
 msgid "cannot locate file '%s' in zip file '%s'"
 msgstr " ファイル '%s' を zip ファイル '%s' に置くことができません "
 
-#: src/main/dounzip.c:469
+#: src/main/dounzip.c:470
 msgid "printing not enabled for this connection"
 msgstr " このコネクションに対してはプリントは利用可能になっていません "
 
@@ -2779,8 +2818,8 @@ msgstr " このコネクションに対してはプリントは利用可能に
 msgid "write not enabled for this connection"
 msgstr " このコネクションには書き込みは有効になっていません "
 
-#: src/main/dounzip.c:496 src/main/dounzip.c:500 src/main/dounzip.c:506
-#: src/main/dounzip.c:523
+#: src/main/dounzip.c:494 src/main/dounzip.c:498 src/main/dounzip.c:504
+#: src/main/dounzip.c:521
 msgid "allocation of 'unz' connection failed"
 msgstr " 'unz' 接続の割り当てに失敗しました "
 
@@ -2797,7 +2836,7 @@ msgstr " 'function' の本体引数 (body argument) が不正です "
 msgid "invalid argument to edit()"
 msgstr " edit() 関数の引数が不正です "
 
-#: src/main/edit.c:121 src/main/saveload.c:2076
+#: src/main/edit.c:121 src/main/saveload.c:2078
 msgid "unable to open file"
 msgstr " ファイルを開くことができません "
 
@@ -2860,12 +2899,12 @@ msgid "no graphics system to unregister"
 msgstr " 登録解除できるグラフィックスシステムがありません "
 
 #: src/main/engine.c:443 src/main/engine.c:448 src/main/engine.c:456
-#: src/main/engine.c:463 src/main/engine.c:477 src/modules/X11/devX11.c:1157
+#: src/main/engine.c:463 src/main/engine.c:477 src/modules/X11/devX11.c:1159
 msgid "invalid line end"
 msgstr " 行末が不正です "
 
 #: src/main/engine.c:508 src/main/engine.c:513 src/main/engine.c:521
-#: src/main/engine.c:528 src/main/engine.c:542 src/modules/X11/devX11.c:1175
+#: src/main/engine.c:528 src/main/engine.c:542 src/modules/X11/devX11.c:1177
 msgid "invalid line join"
 msgstr " 行をまとめられません "
 
@@ -2894,83 +2933,97 @@ msgstr " このデバイスに対してはラスタレンダリングは実装
 msgid "raster capture is not available for this device"
 msgstr " このデバイスではラスタ取り込みは使用できません "
 
-#: src/main/engine.c:1656
+#: src/main/engine.c:1662
 #, c-format
 msgid "font face %d not supported for font family '%s'"
 msgstr ""
 " フォントフェース %d はフォントファミリー '%s' ではサポートされていません "
 
-#: src/main/engine.c:1972
+#: src/main/engine.c:1978
 msgid "no graphics device is active"
 msgstr " 有効なグラフィックスデバイスがありません "
 
-#: src/main/engine.c:2049
+#: src/main/engine.c:2055
 #, c-format
 msgid "pch value '%d' is invalid in this locale"
 msgstr " pchの値 '%d' は現在のロケールでは不正です "
 
-#: src/main/engine.c:2307
+#: src/main/engine.c:2313
 #, c-format
 msgid "unimplemented pch value '%d'"
 msgstr " pch の値 '%d' は未実装です "
 
-#: src/main/engine.c:2330
+#: src/main/engine.c:2336
 #, c-format
 msgid "invalid axis extents [GEPretty(.,.,n=%d)"
 msgstr " 不正な軸範囲です [GEPretty(.,.,n=%d) "
 
-#: src/main/engine.c:2334
+#: src/main/engine.c:2340
 #, c-format
 msgid "infinite axis extents [GEPretty(%g,%g,%d)]"
 msgstr " 無限に軸が伸ばされています [GEPretty(%g,%g,%d)] "
 
-#: src/main/engine.c:2371
+#: src/main/engine.c:2377
 #, c-format
 msgid " .. GEPretty(.): new *lo = %g < %g = x1"
 msgstr " .. GEPretty(.): new *lo = %g < %g = x1 "
 
-#: src/main/engine.c:2373
+#: src/main/engine.c:2379
 #, c-format
 msgid " .. GEPretty(.): new *up = %g > %g = x2"
 msgstr " .. GEPretty(.): new *up = %g > %g = x2 "
 
-#: src/main/engine.c:2773
+#: src/main/engine.c:2784
 msgid "display list redraw incomplete"
 msgstr " ディスプレイリストが不完全に再描画されました "
 
-#: src/main/engine.c:2777
+#: src/main/engine.c:2788
 msgid "invalid display list"
 msgstr " ディスプレイリストが不正です "
 
-#: src/main/engine.c:2963
+#: src/main/engine.c:2900
+#, c-format
+msgid ""
+"snapshot recorded with different graphics engine version (pre 11 - this is "
+"version %d)"
+msgstr ""
+
+#: src/main/engine.c:2904
+#, c-format
+msgid ""
+"snapshot recorded with different graphics engine version (%d - this is "
+"version %d)"
+msgstr ""
+
+#: src/main/engine.c:2983
 msgid "'expr' argument must be an expression"
 msgstr " 'expr' 引数は式でなくてはなりません "
 
-#: src/main/engine.c:2965
+#: src/main/engine.c:2985
 msgid "'list' argument must be a list"
 msgstr " 'list' 引数はリストでなくてはなりません "
 
-#: src/main/engine.c:2971
+#: src/main/engine.c:2991
 msgid "'env' argument must be an environment"
 msgstr " 'env' 引数は環境でなくてはなりません "
 
-#: src/main/engine.c:3051 src/main/engine.c:3059
+#: src/main/engine.c:3071 src/main/engine.c:3079
 msgid "invalid multibyte char in pch=\"c\""
 msgstr " pch=\"c\" 中に不正なマルチバイトの char があります "
 
-#: src/main/engine.c:3106
+#: src/main/engine.c:3126
 msgid "invalid hex digit in 'color' or 'lty'"
 msgstr " 'color' または 'lty' 中の 16 進数が不正です "
 
-#: src/main/engine.c:3129
+#: src/main/engine.c:3149
 msgid "invalid line type: must be length 2, 4, 6 or 8"
 msgstr " 行のタイプが不正です: 行の長さは 2, 4, 6, 8 のいずれかにして下さい "
 
-#: src/main/engine.c:3133
+#: src/main/engine.c:3153
 msgid "invalid line type: zeroes are not allowed"
 msgstr " 不正な線種: ゼロは許されません "
 
-#: src/main/engine.c:3142 src/main/engine.c:3150 src/main/engine.c:3157
+#: src/main/engine.c:3162 src/main/engine.c:3170 src/main/engine.c:3177
 msgid "invalid line type"
 msgstr " 行のタイプが不正です "
 
@@ -2979,710 +3032,716 @@ msgstr " 行のタイプが不正です "
 msgid "cannot change value of locked binding for '%s'"
 msgstr " '%s' に対するロックされたバインディングの値は変更できません "
 
-#: src/main/envir.c:251 src/main/envir.c:1454
+#: src/main/envir.c:251 src/main/envir.c:1530
 msgid "cannot add bindings to a locked environment"
 msgstr " ロックされた環境にバインディングを追加することはできません "
 
-#: src/main/envir.c:772
+#: src/main/envir.c:775
 msgid "invalid cached value in R_GetGlobalCache"
 msgstr " R_GetGlobalCache 中に不正なキャッシュ値があります "
 
-#: src/main/envir.c:830
+#: src/main/envir.c:836
 msgid "cannot unbind in the base namespace"
 msgstr " 基本名前空間の中では切り離しはできません "
 
-#: src/main/envir.c:832
+#: src/main/envir.c:838
 msgid "unbind in the base environment is unimplemented"
 msgstr " 基本環境中の unbind は未実装です "
 
-#: src/main/envir.c:834 src/main/envir.c:1684
+#: src/main/envir.c:840 src/main/envir.c:1818
 msgid "cannot remove bindings from a locked environment"
 msgstr " ロックされた環境からはバインディングを取り除くことはできません "
 
-#: src/main/envir.c:1139
+#: src/main/envir.c:1213
 #, c-format
 msgid "argument to '%s' is not an environment"
 msgstr " '%s' に対する引数は環境ではありません "
 
-#: src/main/envir.c:1300
+#: src/main/envir.c:1374
 #, c-format
 msgid "the ... list does not contain %d elements"
 msgstr " ... リストは %d 個の要素を含んでいません "
 
-#: src/main/envir.c:1302
+#: src/main/envir.c:1376
 #, c-format
 msgid "..%d used in an incorrect context, no ... to look in"
 msgstr " ..%d は正しくない文脈で使われています、参照すべき ... がありません "
 
-#: src/main/envir.c:1390 src/main/envir.c:1842 src/main/eval.c:573
-#: src/main/eval.c:3618
-#, c-format
-msgid "argument \"%s\" is missing, with no default"
-msgstr " 引数 \"%s\" がありませんし、省略時既定値もありません "
-
-#: src/main/envir.c:1395
+#: src/main/envir.c:1469
 #, c-format
 msgid "could not find function \"%s\""
 msgstr " 関数 \"%s\" を見つけることができませんでした "
 
-#: src/main/envir.c:1418
+#: src/main/envir.c:1492
 msgid "cannot assign values in the empty environment"
 msgstr " 空の環境中における値を割り当てることができません "
 
-#: src/main/envir.c:1424 src/main/envir.c:1497
+#: src/main/envir.c:1498 src/main/envir.c:1628
 msgid "cannot assign variables to this database"
 msgstr " このデータベースに変数を代入できません "
 
-#: src/main/envir.c:1580
+#: src/main/envir.c:1714
 #, c-format
 msgid "cannot add binding of '%s' to the base environment"
 msgstr " ロックされた環境にバインディング '%s' を追加することはできません "
 
-#: src/main/envir.c:1609
+#: src/main/envir.c:1743
 msgid "only the first element is used as variable name"
 msgstr " 最初の要素だけが変数名として使われました "
 
-#: src/main/envir.c:1641
+#: src/main/envir.c:1775
 msgid "first argument must be a named list"
 msgstr " 最初の引数は名前付きリストでなくてはなりません "
 
-#: src/main/envir.c:1646
+#: src/main/envir.c:1780
 msgid "names(x) must be a character vector of the same length as x"
 msgstr " names(x) は x と同じ長さの文字ベクトルでなくてはなりません "
 
-#: src/main/envir.c:1649
+#: src/main/envir.c:1783
 msgid "'envir' argument must be an environment"
 msgstr " 'envir' 引数は環境でなくてはなりません "
 
-#: src/main/envir.c:1678
+#: src/main/envir.c:1812
 msgid "cannot remove variables from base namespace"
 msgstr " base 名前空間からは変数を取り除くことはできません "
 
-#: src/main/envir.c:1680
+#: src/main/envir.c:1814
 msgid "cannot remove variables from the base environment"
 msgstr " 空の環境中から変数を除去することができません "
 
-#: src/main/envir.c:1682
+#: src/main/envir.c:1816
 msgid "cannot remove variables from the empty environment"
 msgstr " 空の環境中から変数を除去することができません "
 
-#: src/main/envir.c:1690
+#: src/main/envir.c:1824
 msgid "cannot remove variables from this database"
 msgstr " このデータベースから変数を除去することができません "
 
-#: src/main/envir.c:1849
+#: src/main/envir.c:1985
 #, c-format
 msgid "object '%s' of mode '%s' was not found"
 msgstr " 変数 '%s' (モード '%s')は見つかりません "
 
-#: src/main/envir.c:1921
+#: src/main/envir.c:2068
 #, c-format
 msgid "invalid name in position %d"
 msgstr " 位置 %d に不正な名前があります "
 
-#: src/main/envir.c:1927
+#: src/main/envir.c:2074
 msgid "second argument must be an environment"
 msgstr " 二番目の引数は環境でなければなりません "
 
-#: src/main/envir.c:1935 src/main/envir.c:1943
+#: src/main/envir.c:2082 src/main/envir.c:2090
 #, c-format
 msgid "wrong length for '%s' argument"
 msgstr " '%s' 引数の長さが不正です "
 
-#: src/main/envir.c:2062
+#: src/main/envir.c:2221
 msgid "invalid use of 'missing'"
 msgstr " 'missing' の不正な使用です "
 
-#: src/main/envir.c:2087
+#: src/main/envir.c:2247
 msgid "'missing' can only be used for arguments"
 msgstr " 'missing' は引数に対してだけ使えます "
 
-#: src/main/envir.c:2168
+#: src/main/envir.c:2333
 msgid "'pos' must be an integer"
 msgstr " 'pos' は整数でなければなりません "
 
-#: src/main/envir.c:2182
+#: src/main/envir.c:2347
 msgid "all elements of a list must be named"
 msgstr " リスト中の全ての要素には名前が必要です "
 
-#: src/main/envir.c:2205
+#: src/main/envir.c:2370
 msgid "'attach' only works for lists, data frames and environments"
 msgstr " 'attach' はリスト、データフレーム、もしくは環境にのみ有効です "
 
-#: src/main/envir.c:2288
+#: src/main/envir.c:2453
 msgid "detaching \"package:base\" is not allowed"
 msgstr " \"package:base\" は切り離すことができません "
 
-#: src/main/envir.c:2589 src/main/envir.c:2644
+#: src/main/envir.c:2798 src/main/envir.c:2879
 msgid "argument must be an environment"
 msgstr " 引数は環境でなければなりません "
 
-#: src/main/envir.c:2648
+#: src/main/envir.c:2883
 msgid "arguments must be symbolic"
 msgstr " 引数はシンボルでなくてはいけません "
 
-#: src/main/envir.c:2772
+#: src/main/envir.c:3032
 msgid "no enclosing environment"
 msgstr " 上位 (enclosing) 環境がありません "
 
-#: src/main/envir.c:2825
+#: src/main/envir.c:3085
 #, c-format
 msgid "no item called \"%s\" on the search list"
 msgstr " 検索リストに \"%s\" という項目はありません "
 
-#: src/main/envir.c:2850
+#: src/main/envir.c:3110
 msgid "using 'as.environment(NULL)' is defunct"
 msgstr " 'as.environment(NULL)' の利用は廃止されました "
 
-#: src/main/envir.c:2856
+#: src/main/envir.c:3116
 msgid "S4 object does not extend class \"environment\""
 msgstr " S4 オブジェクトはクラス \"environment\" に拡張されません "
 
-#: src/main/envir.c:2871
+#: src/main/envir.c:3131
 msgid "invalid object for 'as.environment'"
 msgstr " 'as.environment' に対する不正なオブジェクトです "
 
-#: src/main/envir.c:2897 src/main/envir.c:2925 src/main/envir.c:2954
-#: src/main/envir.c:2975 src/main/envir.c:2998 src/main/envir.c:3033
-#: src/main/envir.c:3054
+#: src/main/envir.c:3157 src/main/envir.c:3185 src/main/envir.c:3214
+#: src/main/envir.c:3235 src/main/envir.c:3258 src/main/envir.c:3293
+#: src/main/envir.c:3314
 msgid "not an environment"
 msgstr " 環境ではありません "
 
-#: src/main/envir.c:2949 src/main/envir.c:2970 src/main/envir.c:2991
-#: src/main/envir.c:3028 src/main/envir.c:3049 src/main/envir.c:3148
+#: src/main/envir.c:3209 src/main/envir.c:3230 src/main/envir.c:3251
+#: src/main/envir.c:3288 src/main/envir.c:3309 src/main/envir.c:3408
 msgid "not a symbol"
 msgstr " シンボルではありません "
 
-#: src/main/envir.c:2962 src/main/envir.c:2983 src/main/envir.c:3041
-#: src/main/envir.c:3062
+#: src/main/envir.c:3222 src/main/envir.c:3243 src/main/envir.c:3301
+#: src/main/envir.c:3322
 #, c-format
 msgid "no binding for \"%s\""
 msgstr " \"%s\" にバインドされているものがありません。 "
 
-#: src/main/envir.c:2993
+#: src/main/envir.c:3253
 msgid "not a function"
 msgstr " 関数でありません "
 
-#: src/main/envir.c:3001 src/main/envir.c:3017
+#: src/main/envir.c:3261 src/main/envir.c:3277
 msgid "symbol already has a regular binding"
 msgstr " シンボルは既に regular binding を持っています "
 
-#: src/main/envir.c:3003 src/main/envir.c:3019
+#: src/main/envir.c:3263 src/main/envir.c:3279
 msgid "cannot change active binding if binding is locked"
 msgstr ""
 " バインディングがロックされているならば、アクティブなバインディングを変更する"
 "ことはできません "
 
-#: src/main/envir.c:3107
+#: src/main/envir.c:3367 src/main/envir.c:3604
 msgid "unknown op"
 msgstr " 未知の演算子です "
 
-#: src/main/envir.c:3152
+#: src/main/envir.c:3412
 msgid "cannot unbind a locked binding"
 msgstr " ロックされたバインディングを切り離せません "
 
-#: src/main/envir.c:3154
+#: src/main/envir.c:3414
 msgid "cannot unbind an active binding"
 msgstr " 現在使用中のバインディングを切り離すことはできません "
 
-#: src/main/envir.c:3289
+#: src/main/envir.c:3555
 msgid "bad namespace name"
 msgstr " 不正な名前空間名です "
 
-#: src/main/envir.c:3301
+#: src/main/envir.c:3567
 msgid "namespace already registered"
 msgstr " ネームスペースはすでに登録されています "
 
-#: src/main/envir.c:3313
+#: src/main/envir.c:3579
 msgid "namespace not registered"
 msgstr " ネームスペースは登録されていません "
 
-#: src/main/envir.c:3360
+#: src/main/envir.c:3635
 msgid "bad import environment argument"
 msgstr " インポートしようとしている環境引数が不正です "
 
-#: src/main/envir.c:3365
+#: src/main/envir.c:3640
 msgid "bad export environment argument"
 msgstr " エクスポートしようとしている環境引数が不正です "
 
-#: src/main/envir.c:3369
+#: src/main/envir.c:3644
 msgid "length of import and export names must match"
 msgstr " インポートとエクスポート名の長さは一致しなければなりません "
 
-#: src/main/envir.c:3392
+#: src/main/envir.c:3667
 #, c-format
 msgid "exported symbol '%s' has no value"
 msgstr " エクスポートされたシンボル '%s' が値を持っていません "
 
-#: src/main/envir.c:3557
+#: src/main/envir.c:3833
 #, c-format
 msgid "unknown encoding: %d"
 msgstr " 未知のエンコーディングです: %d "
 
-#: src/main/envir.c:3577
+#: src/main/envir.c:3853
 #, c-format
 msgid "embedded nul in string: '%s'"
 msgstr " 文字列の中に nul が埋め込まれています: '%s' "
 
-#: src/main/errors.c:178 src/main/errors.c:215
+#: src/main/errors.c:163 src/main/errors.c:200
 msgid "interrupts suspended; signal ignored"
 msgstr " 割り込みが中断されました; シグナルは無視されました "
 
-#: src/main/errors.c:318
+#: src/main/errors.c:250
+msgid "[... truncated]"
+msgstr " [... 省略] "
+
+#: src/main/errors.c:310
 msgid "invalid option \"warning.expression\""
 msgstr " オプション \"warnig.expression\" は不正です "
 
-#: src/main/errors.c:348
+#: src/main/errors.c:339
 #, c-format
 msgid "(converted from warning) %s"
 msgstr " (警告から変換されました) %s "
 
-#: src/main/errors.c:359
-#, c-format
-msgid "Warning: %s\n"
-msgstr " 警告: %s \n"
+#: src/main/errors.c:349
+msgid "Warning:"
+msgstr " 警告: "
 
-#: src/main/errors.c:363
+#: src/main/errors.c:351
 #, c-format
-msgid "Warning in %s : %s\n"
-msgstr " %s 中で警告がありました: %s \n"
+msgid "Warning in %s :"
+msgstr " %s で警告がありました: "
 
-#: src/main/errors.c:365
-#, c-format
-msgid ""
-"Warning in %s :\n"
-"  %s\n"
-msgstr ""
-" %s 中で警告がありました: \n"
-"  %s \n"
+#: src/main/errors.c:360 src/main/errors.c:374 src/main/errors.c:687
+msgid "Calls:"
+msgstr " 呼び出し: "
 
-#: src/main/errors.c:428 src/main/errors.c:447 src/main/errors.c:596
+#: src/main/errors.c:421 src/main/errors.c:440 src/main/errors.c:602
 msgid "Lost warning messages\n"
 msgstr " 警告メッセージが失われました \n"
 
-#: src/main/errors.c:459
-msgid "Warning message:\n"
-msgid_plural "Warning messages:\n"
-msgstr[0] " 警告メッセージ: \n"
+#: src/main/errors.c:452
+msgid "Warning message:"
+msgid_plural "Warning messages:"
+msgstr[0] " 警告メッセージ: "
 
-#: src/main/errors.c:514
+#: src/main/errors.c:462 src/main/errors.c:490
 #, c-format
-msgid "There were %d warnings (use warnings() to see them)\n"
-msgstr " %d 件の警告がありました (警告を見るには warnings() を使って下さい) \n"
+msgid "In %s :"
+msgstr " %s で: "
 
-#: src/main/errors.c:517
+#: src/main/errors.c:515
 #, c-format
-msgid "There were %d or more warnings (use warnings() to see the first %d)\n"
+msgid "There was %d warning (use warnings() to see it)"
+msgid_plural "There were %d warnings (use warnings() to see them)"
+msgstr[0] ""
+" %d 件の警告がありました (警告を見るには warnings() を使って下さい) "
+
+#: src/main/errors.c:520
+#, c-format
+msgid "There were %d or more warnings (use warnings() to see the first %d)"
 msgstr ""
 " %d 件以上の警告がありました (最初の %d 個の警告を見るには warnings() を使っ"
-"て下さい) \n"
+"て下さい) "
 
-#: src/main/errors.c:587
+#: src/main/errors.c:593
 msgid "Error during wrapup: "
 msgstr " wrapup 中にエラーが起こりました: "
 
-#: src/main/errors.c:612
+#: src/main/errors.c:618
 msgid "Error in "
 msgstr " 以下にエラー "
 
-#: src/main/errors.c:613
+#: src/main/errors.c:640 src/main/errors.c:647
+#, c-format
+msgid "Error in %s (from %s) : "
+msgstr " %s でエラー (%s から) : "
+
+#: src/main/errors.c:649
 #, c-format
-msgid " (from %s) : "
-msgstr " (%s から) : "
+msgid "Error in %s : "
+msgstr " %s でエラー: "
 
-#: src/main/errors.c:664 src/main/errors.c:670
+#: src/main/errors.c:669 src/main/errors.c:675
 #, c-format
 msgid "Error: "
 msgstr " エラー: "
 
-#: src/main/errors.c:690 src/main/errors.c:1319
+#: src/main/errors.c:696 src/main/errors.c:1300
 msgid "In addition: "
 msgstr " 追加情報: "
 
-#: src/main/errors.c:811
+#: src/main/errors.c:818
 msgid "invalid option \"error\"\n"
 msgstr " オプション \"error\" は不正です \n"
 
-#: src/main/errors.c:893
-msgid "Execution halted\n"
-msgstr " 実行が停止されました \n"
-
-#: src/main/errors.c:1032
-msgid "'msg1' must be a character string"
-msgstr " 'msg1' は文字列でなければなりません "
-
-#: src/main/errors.c:1034
-msgid "'msg2' must be a character string"
-msgstr " 'msg2' は文字列でなければなりません "
+#: src/main/errors.c:1013 src/main/errors.c:1015 src/main/options.c:339
+#: src/main/unique.c:1638
+#, c-format
+msgid "'%s' must be a character string"
+msgstr " '%s' は文字列でなければなりません "
 
-#: src/main/errors.c:1131
+#: src/main/errors.c:1116
 msgid " [invalid string in stop(.)]"
 msgstr " stop() 関数の引数が不正な文字列です "
 
-#: src/main/errors.c:1162
+#: src/main/errors.c:1148
 msgid " [invalid string in warning(.)]"
 msgstr " warning() 関数の引数が不正な文字列です "
 
-#: src/main/errors.c:1178
+#: src/main/errors.c:1164
 #, c-format
 msgid "incorrect number of arguments to \"%s\""
 msgstr " \"%s\" への引数の個数が正しくありません "
 
-#: src/main/errors.c:1184 src/main/errors.c:1199
+#: src/main/errors.c:1170 src/main/errors.c:1185
 #, c-format
 msgid "unimplemented feature in %s"
 msgstr " %s 中の未実装の機能です "
 
-#: src/main/errors.c:1193
+#: src/main/errors.c:1179
 msgid "invalid number of arguments"
 msgstr " 引数の個数が不正です "
 
-#: src/main/errors.c:1194 src/main/logic.c:189
+#: src/main/errors.c:1180 src/main/logic.c:181
 msgid "invalid argument type"
 msgstr " 引数の型が不正です "
 
-#: src/main/errors.c:1196
+#: src/main/errors.c:1182
 msgid "time-series/vector length mismatch"
 msgstr " 時系列またはベクトル の長さが合致しません "
 
-#: src/main/errors.c:1197
+#: src/main/errors.c:1183
 msgid "incompatible arguments"
 msgstr " 互換性のない引数です "
 
-#: src/main/errors.c:1200
+#: src/main/errors.c:1186
 msgid "unknown error (report this!)"
 msgstr " 未知のエラーです (報告してください!) "
 
-#: src/main/errors.c:1212
+#: src/main/errors.c:1195
+msgid "inaccurate integer conversion in coercion"
+msgstr " 強制変換中に不正確な整数変換が行われました "
+
+#: src/main/errors.c:1198
 msgid "unknown warning (report this!)"
 msgstr " 未知の警告です (報告してください!) "
 
-#: src/main/errors.c:1283
+#: src/main/errors.c:1269
 msgid "No function to return from, jumping to top level"
 msgstr " 戻るべき関数がないので、トップレベルへジャンプします "
 
-#: src/main/errors.c:1299
+#: src/main/errors.c:1285
 msgid "top level inconsistency?"
 msgstr " トップレベルの不整合? "
 
-#: src/main/errors.c:1478
+#: src/main/errors.c:1459
 msgid "bad handler data"
 msgstr " ハンドラーデータ (handler data) が不正です "
 
-#: src/main/errors.c:1628
+#: src/main/errors.c:1613
 msgid "error message not a string"
 msgstr " エラーメッセージが文字列ではありません "
 
-#: src/main/errors.c:1703
+#: src/main/errors.c:1688
 msgid "handler or restart stack mismatch in old restart"
 msgstr " handler stack か restart stack が、古い restart と一致しません "
 
-#: src/main/errors.c:1729 src/main/errors.c:1745
+#: src/main/errors.c:1714 src/main/errors.c:1730
 msgid "bad error message"
 msgstr " 不正なエラーメッセージです "
 
-#: src/main/errors.c:1787
+#: src/main/errors.c:1771
 msgid "bad restart"
 msgstr " 不正な再起動です "
 
-#: src/main/errors.c:1819
+#: src/main/errors.c:1803
 msgid "restart not on stack"
 msgstr " スタックからではない再実行です "
 
-#: src/main/errors.c:1836
+#: src/main/errors.c:1819
 msgid "not in a try context"
 msgstr " トライ (try) 文脈ではありません "
 
-#: src/main/errors.c:1849
+#: src/main/errors.c:1832
 msgid "error message must be a character string"
 msgstr " エラーメッセージは文字列であるに違いありません "
 
-#: src/main/eval.c:308
+#: src/main/eval.c:365
 #, c-format
 msgid "source files skipped by Rprof; please increase '%s'"
 msgstr ""
 " ソースファイルは Rprof によりスキップされました; '%s' を増やしてください "
 
-#: src/main/eval.c:328
+#: src/main/eval.c:385
 #, c-format
 msgid "Rprof: cannot open profile file '%s'"
 msgstr " Rprof: プロファイル・ファイル '%s' を開くことができません "
 
-#: src/main/eval.c:422
+#: src/main/eval.c:479
 msgid "R profiling is not available on this system"
 msgstr " R プロファイルはこのシステムでは使えません "
 
-#: src/main/eval.c:446
+#: src/main/eval.c:503
 msgid ""
 "promise already under evaluation: recursive default argument reference or "
 "earlier problems?"
 msgstr ""
 " プロミスは既に評価されています: 再帰的な引数既定値の参照か以前の問題? "
 
-#: src/main/eval.c:448
+#: src/main/eval.c:505
 msgid "restarting interrupted promise evaluation"
 msgstr " 中断されたプロミス評価を再開します "
 
-#: src/main/eval.c:544
+#: src/main/eval.c:601
 msgid ""
 "evaluation nested too deeply: infinite recursion / options(expressions=)?"
 msgstr ""
-" 評価があまりに深く入れ子になっています。無限の再帰か options"
-"(expressions=)? "
+" 評価があまりに深く入れ子になっています。無限の再帰か "
+"options(expressions=)? "
 
-#: src/main/eval.c:575 src/main/eval.c:3619
+#: src/main/eval.c:632 src/main/eval.c:4238
 msgid "argument is missing, with no default"
 msgstr " 引数がありませんし、省略時既定値もありません "
 
-#: src/main/eval.c:679 src/main/eval.c:4642
+#: src/main/eval.c:736 src/main/eval.c:1306 src/main/eval.c:5533
 msgid "attempt to apply non-function"
 msgstr " 関数でないものを適用しようとしました "
 
-#: src/main/eval.c:702
+#: src/main/eval.c:759
 #, c-format
 msgid "%s at %s#%d: "
 msgstr " %2$s#%3$d の %1$s: "
 
-#: src/main/eval.c:1178
+#: src/main/eval.c:1298 src/main/eval.c:2271
+#, c-format
+msgid "argument %d is empty"
+msgstr " 引数 %d が空です "
+
+#: src/main/eval.c:1350
 #, c-format
 msgid "could not find symbol \"%s\" in environment of the generic function"
 msgstr ""
 " ジエネリック関数の環境中に \"%s\" というシンボルが見つかりませんでした "
 
-#: src/main/eval.c:1196
+#: src/main/eval.c:1368
 #, c-format
 msgid "symbol \"%s\" not in environment of method"
 msgstr " シンボル \"%s\" がメソッドの環境の中にありません "
 
-#: src/main/eval.c:1308
+#: src/main/eval.c:1481
 msgid "the condition has length > 1 and only the first element will be used"
 msgstr " 条件が長さが 2 以上なので、最初の 1 つだけが使われます "
 
-#: src/main/eval.c:1325
+#: src/main/eval.c:1500
 msgid "missing value where TRUE/FALSE needed"
 msgstr " TRUE/FALSE が必要なところが欠損値です "
 
-#: src/main/eval.c:1326
+#: src/main/eval.c:1501
 msgid "argument is not interpretable as logical"
 msgstr " 引数が論理変数として解釈することができません "
 
-#: src/main/eval.c:1327
+#: src/main/eval.c:1502
 msgid "argument is of length zero"
 msgstr " 引数の長さが 0 です "
 
-#: src/main/eval.c:1418
+#: src/main/eval.c:1596
 msgid "non-symbol loop variable"
 msgstr " ループ変数がシンボルではありません "
 
-#: src/main/eval.c:1510 src/main/eval.c:4408
+#: src/main/eval.c:1687 src/main/eval.c:5301
 msgid "invalid for() loop sequence"
 msgstr " for() ループが不正です "
 
-#: src/main/eval.c:1652
+#: src/main/eval.c:1826
 msgid "multi-argument returns are not permitted"
 msgstr " 複数の結果を返す return は許されません "
 
-#: src/main/eval.c:1701
+#: src/main/eval.c:1873
 msgid "invalid (NULL) left side of assignment"
 msgstr " 代入の左辺が不正 (NULL) です "
 
-#: src/main/eval.c:1734
+#: src/main/eval.c:1907
 msgid "target of assignment expands to non-language object"
 msgstr " 付値対象は非言語オブジェクトに展開されます "
 
-#: src/main/eval.c:1817
+#: src/main/eval.c:1990
 #, c-format
 msgid "overlong name in '%s'"
 msgstr " '%s' の名前が長すぎます "
 
-#: src/main/eval.c:1915
+#: src/main/eval.c:2080
 msgid "cannot do complex assignments in base namespace"
 msgstr " base 名前空間においては複素数の代入はできません "
 
-#: src/main/eval.c:1917
+#: src/main/eval.c:2082
 msgid "cannot do complex assignments in base environment"
 msgstr " 基本環境においては複素数の代入はできません "
 
-#: src/main/eval.c:1954 src/main/eval.c:1981
+#: src/main/eval.c:2121 src/main/eval.c:2148
 msgid "invalid function in complex assignment"
 msgstr " 複素数の代入で、関数が不正です "
 
-#: src/main/eval.c:2041
+#: src/main/eval.c:2208
 msgid "invalid (do_set) left-hand side to assignment"
 msgstr " 代入の左辺が不正 (do_set) です "
 
-#: src/main/eval.c:2103
-#, c-format
-msgid "argument %d is empty"
-msgstr " 引数 %d が空です "
-
-#: src/main/eval.c:2116
+#: src/main/eval.c:2284
 #, c-format
 msgid "'%s' is missing"
 msgstr " '%s' が見つかりません "
 
-#: src/main/eval.c:2267
+#: src/main/eval.c:2439
 msgid "invalid formal argument list for \"function\""
 msgstr " \"function\" の仮引数リストが不正です "
 
-#: src/main/eval.c:2325 src/main/eval.c:2356 src/main/eval.c:2361
+#: src/main/eval.c:2497 src/main/eval.c:2528 src/main/eval.c:2533
 #, c-format
 msgid "invalid '%s' argument of type '%s'"
 msgstr " '%s' 引数 (型 '%s') が不正です "
 
-#: src/main/eval.c:2353
+#: src/main/eval.c:2525
 msgid "numeric 'envir' arg not of length one"
 msgstr " 数値の 'envir' 引数の長さが 1 ではありません "
 
-#: src/main/eval.c:2377 src/main/eval.c:2399
+#: src/main/eval.c:2549 src/main/eval.c:2573
 msgid "restarts not supported in 'eval'"
 msgstr " 再実行機能は 'eval' 関数に対してはサポートされていません "
 
-#: src/main/eval.c:2456 src/main/eval.c:2469
+#: src/main/eval.c:2632 src/main/eval.c:2645
 msgid "'Recall' called from outside a closure"
 msgstr " クロージャの外部から 'Recall' が呼び出されました。 "
 
-#: src/main/eval.c:2562
+#: src/main/eval.c:2738
 msgid "value in '...' is not a promise"
 msgstr " '...' の中の値は promise ではありません "
 
-#: src/main/eval.c:2754 src/main/objects.c:720
-#, c-format
-msgid "call name too long in '%s'"
-msgstr " '%s' 中の呼び出し名が長すぎます "
-
-#: src/main/eval.c:2775
-#, c-format
-msgid "generic name too long in '%s'"
-msgstr " '%s' の総称名が長すぎます "
-
-#: src/main/eval.c:2840
+#: src/main/eval.c:2999
 #, c-format
 msgid "Incompatible methods (\"%s\", \"%s\") for \"%s\""
 msgstr " メソッド (\"%s\", \"%s\") は \"%s\" に対しては矛盾しています "
 
-#: src/main/eval.c:2906
+#: src/main/eval.c:3048
 msgid "dispatch error in group dispatch"
 msgstr " グループディスパッチにディスパッチエラーがあります "
 
-#: src/main/eval.c:3201
+#: src/main/eval.c:3532
 #, c-format
 msgid "\"%s\" is not a %s function"
 msgstr " \"%s\" は %s 関数ではありません "
 
-#: src/main/eval.c:3430
+#: src/main/eval.c:4047
 msgid "node stack overflow"
 msgstr " ノードスタックが溢れました "
 
-#: src/main/eval.c:3436
+#: src/main/eval.c:4053
 msgid "integer stack overflow"
 msgstr " 整数スタックが溢れました "
 
-#: src/main/eval.c:3490
+#: src/main/eval.c:4107
 msgid "bad opcode"
 msgstr " opcode が不適当です "
 
-#: src/main/eval.c:4219
+#: src/main/eval.c:5083
 #, c-format
 msgid "invalid %s type in 'x %s y'"
 msgstr " 'x %s y' の %s の型が不正です "
 
-#: src/main/eval.c:4310
+#: src/main/eval.c:5195
 msgid "bytecode version mismatch; using eval"
 msgstr " バイトコードのバージョンが不一致です; eval を使います "
 
-#: src/main/eval.c:4315
+#: src/main/eval.c:5200
 msgid "bytecode version is too old"
 msgstr " バイトコードのバージョンが古すぎます "
 
-#: src/main/eval.c:4316
+#: src/main/eval.c:5201
 msgid "bytecode version is too new"
 msgstr " バイトコードのバージョンが新しすぎます "
 
-#: src/main/eval.c:4350
+#: src/main/eval.c:5235
 msgid "byte code version mismatch"
 msgstr " バイトコードのバージョンが不一致です "
 
-#: src/main/eval.c:4477
+#: src/main/eval.c:5383
 msgid "invalid sequence argument in for loop"
 msgstr " for ループの範囲引数が不正です "
 
-#: src/main/eval.c:4624 src/main/names.c:1181
+#: src/main/eval.c:5522 src/main/names.c:1312
 #, c-format
 msgid "there is no .Internal function '%s'"
 msgstr " .Internal 関数 '%s' がありません "
 
-#: src/main/eval.c:4731 src/main/eval.c:5077 src/main/eval.c:5119
+#: src/main/eval.c:5622 src/main/eval.c:5968 src/main/eval.c:6008
 msgid "bad function"
 msgstr " 不正な関数です "
 
-#: src/main/eval.c:4746
+#: src/main/eval.c:5635
 msgid "not a BUILTIN function"
 msgstr " BUILTIN 関数ではありません "
 
-#: src/main/eval.c:5159
+#: src/main/eval.c:6066
+#, fuzzy
+msgid "bad numeric 'switch' offsets"
+msgstr " 不正な数値スィッチオフセットです "
+
+#: src/main/eval.c:6072
 msgid "numeric EXPR required for 'switch' without named alternatives"
 msgstr " 名前付きの代替値が無い 'switch' 関数には数値の EXPR が必要です "
 
-#: src/main/eval.c:5255
+#: src/main/eval.c:6076
+#, fuzzy
+msgid "bad character 'switch' offsets"
+msgstr " 不正なな文字スィッチオフセットです "
+
+#: src/main/eval.c:6188
 msgid "cannot find index for threaded code address"
 msgstr ""
 " スレッデッド・コード・アドレス (threaded code address) のインデックスを見つ"
 "けることができません "
 
-#: src/main/eval.c:5315
+#: src/main/eval.c:6248
 msgid "invalid body"
 msgstr " 本体 (body) が不正です "
 
-#: src/main/eval.c:5335
+#: src/main/eval.c:6268
 msgid "invalid symbol"
 msgstr " シンボル記号が不正です "
 
-#: src/main/eval.c:5379
+#: src/main/eval.c:6312
 msgid "argument is not a byte code object"
 msgstr " 引数がバイトコードオブジェクトではありません "
 
-#: src/main/eval.c:5400
+#: src/main/eval.c:6334
 msgid "bad file name"
 msgstr " 不正なファイル名です "
 
-#: src/main/eval.c:5404 src/main/eval.c:5425
+#: src/main/eval.c:6338 src/main/eval.c:6359
 msgid "unable to open 'file'"
 msgstr " 'file' を開くことができません "
 
-#: src/main/eval.c:5419 src/main/saveload.c:1942
+#: src/main/eval.c:6353 src/main/saveload.c:1944
 msgid "'file' must be non-empty string"
 msgstr " 'file' は空でない文字列でなければいけません "
 
-#: src/main/eval.c:5421 src/main/saveload.c:1944 src/main/saveload.c:2244
-#: src/main/serialize.c:2149
+#: src/main/eval.c:6355 src/main/saveload.c:1946 src/main/saveload.c:2246
+#: src/main/serialize.c:2189
 msgid "'ascii' must be logical"
 msgstr " 'ascii' は論理値でなければなりません "
 
-#: src/main/eval.c:5492 src/main/eval.c:5511 src/main/eval.c:5541
+#: src/main/eval.c:6426 src/main/eval.c:6445 src/main/eval.c:6475
 msgid "constant buffer must be a generic vector"
 msgstr " 定数値バッファーは総称的なベクトルでなければなりません "
 
-#: src/main/eval.c:5543
+#: src/main/eval.c:6477
 msgid "bad constant count"
 msgstr " 不正な定数値カウントです "
 
-#: src/main/eval.c:5579
+#: src/main/eval.c:6515
 msgid "profile timer in use"
 msgstr " プロファイルタイマーは使用中です "
 
-#: src/main/eval.c:5581
+#: src/main/eval.c:6517
 msgid "already byte code profiling"
 msgstr " 既にバイトコードは分析されています "
 
-#: src/main/eval.c:5599
+#: src/main/eval.c:6535
 msgid "setting profile timer failed"
 msgstr " プロファイルタイマーの設定に失敗しました "
 
-#: src/main/eval.c:5616
+#: src/main/eval.c:6553
 msgid "not byte code profiling"
 msgstr " バイトコードのプロファイリングではありません "
 
+#: src/main/eval.c:6569 src/main/eval.c:6573 src/main/eval.c:6577
+msgid "byte code profiling is not supported in this build"
+msgstr " このビルドではバイトコードプロファイリングはサポートされていません "
+
 #: src/main/gevents.c:43
 #, c-format
 msgid "'%s' events not supported in this device"
@@ -3696,26 +3755,26 @@ msgstr " 内部エラー "
 msgid "this graphics device does not support event handling"
 msgstr " このグラフィックスデバイスは event handling をサポートしていません "
 
-#: src/main/gevents.c:136
+#: src/main/gevents.c:135
 msgid "invalid prompt"
 msgstr " プロンプトが不正です "
 
-#: src/main/gevents.c:148
+#: src/main/gevents.c:146
 msgid "recursive use of 'getGraphicsEvent' not supported"
 msgstr " 'getGrapshicsEvent' の再帰的使用はサポートされていません "
 
-#: src/main/gevents.c:158
+#: src/main/gevents.c:157
 msgid "no graphics event handlers set"
 msgstr " 設定されたグラフィックス event handler がありません "
 
-#: src/main/gram.y:222 src/main/gram.y:237 src/main/gram.y:2222
-#: src/main/gram.y:2236
+#: src/main/gram.y:222 src/main/gram.y:237 src/main/gram.y:2245
+#: src/main/gram.y:2259
 #, c-format
 msgid "EOF whilst reading MBCS char at line %d"
 msgstr " MBCS 文字を読んでいる途中に EOF に遭遇しました (%d 行) "
 
-#: src/main/gram.y:226 src/main/gram.y:234 src/main/gram.y:2226
-#: src/main/gram.y:2233
+#: src/main/gram.y:226 src/main/gram.y:234 src/main/gram.y:2249
+#: src/main/gram.y:2256
 #, c-format
 msgid "invalid multibyte character in parser at line %d"
 msgstr " 構文解析中に不正なマルチバイト文字列がありました (%d 行) "
@@ -3730,114 +3789,127 @@ msgstr " 入力バッファが溢れました (%d 行) "
 msgid "incorrect tag type at line %d"
 msgstr " tag の型が正しくありません (%d 行) "
 
-#: src/main/gram.y:1653
+#: src/main/gram.y:1657
 msgid "contextstack overflow"
 msgstr " コンテクストスタックが溢れました "
 
-#: src/main/gram.y:1890
-msgid "input"
-msgstr " 入力 "
+#: src/main/gram.y:1907 src/main/gram.y:1913
+#, c-format
+msgid "unexpected input"
+msgstr " 想定外の入力です "
 
-#: src/main/gram.y:1891
-msgid "end of input"
-msgstr " 入力の終り "
+#: src/main/gram.y:1910 src/main/main.c:311
+#, c-format
+msgid "unexpected end of input"
+msgstr " 想定外の入力の終端です "
 
-#: src/main/gram.y:1892
-msgid "string constant"
-msgstr " 文字列定数 "
+#: src/main/gram.y:1916
+#, c-format
+msgid "unexpected string constant"
+msgstr " 想定外の文字列定数です "
 
-#: src/main/gram.y:1893
-msgid "numeric constant"
-msgstr " 数値定数 "
+#: src/main/gram.y:1919
+#, c-format
+msgid "unexpected numeric constant"
+msgstr " 想定外の数値定数です "
 
-#: src/main/gram.y:1894
-msgid "symbol"
-msgstr " シンボル "
+#: src/main/gram.y:1922
+#, c-format
+msgid "unexpected symbol"
+msgstr " 想定外のシンボルです "
 
-#: src/main/gram.y:1895
-msgid "assignment"
-msgstr " 付値 "
+#: src/main/gram.y:1925
+#, c-format
+msgid "unexpected assignment"
+msgstr " 想定外の付値です "
 
-#: src/main/gram.y:1896
-msgid "end of line"
-msgstr " 行の終り "
+#: src/main/gram.y:1928
+#, c-format
+msgid "unexpected end of line"
+msgstr " 想定外の行末です "
 
-#: src/main/gram.y:1910 src/main/gram.y:1916
+#: src/main/gram.y:1931 src/main/gram.y:1939
 #, c-format
 msgid "unexpected %s"
 msgstr " 予想外の %s です "
 
-#: src/main/gram.y:1926
+#: src/main/gram.y:1951
 #, c-format
 msgid "repeated formal argument '%s' on line %d"
 msgstr " 形式的引数 '%s' が繰り返されています (%d 行において) "
 
-#: src/main/gram.y:2136
+#: src/main/gram.y:2161
 #, c-format
 msgid "integer literal %s contains decimal; using numeric value"
 msgstr " 整数リテラル %s は小数を含んでいます; 実数値を使用します "
 
-#: src/main/gram.y:2140
+#: src/main/gram.y:2164
 #, c-format
 msgid "non-integer value %s qualified with L; using numeric value"
 msgstr " 非整数値 %s に L がついています; 実数値を使用します "
 
-#: src/main/gram.y:2153
+#: src/main/gram.y:2176
 #, c-format
 msgid "integer literal %s contains unnecessary decimal point"
 msgstr " 整数リテラル %s は不要な小数点を含んでいます "
 
-#: src/main/gram.y:2185
+#: src/main/gram.y:2208
 #, c-format
 msgid "unable to allocate buffer for long string at line %d"
 msgstr " 文字列が長すぎるためメモリ確保ができません (%d 行) "
 
-#: src/main/gram.y:2338
+#: src/main/gram.y:2347 src/main/gram.y:2370 src/main/gram.y:2407
+#: src/main/gram.y:2443
+#, c-format
+msgid "nul character not allowed (line %d)"
+msgstr " ヌル文字は許されません (%d 行) "
+
+#: src/main/gram.y:2363
 #, c-format
 msgid "'\\x' used without hex digits in character string starting \"%s\""
 msgstr " \"%s\" で始まる文字列の中で 8 進文字なしに '\\x' が使われています "
 
-#: src/main/gram.y:2352
+#: src/main/gram.y:2379
 #, c-format
 msgid "\\uxxxx sequences not supported inside backticks (line %d)"
 msgstr " \\uxxxx シーケンスはバックチック内ではサポートされません (%d 行) "
 
-#: src/main/gram.y:2367
+#: src/main/gram.y:2394
 #, c-format
 msgid "'\\u' used without hex digits in character string starting \"%s\""
 msgstr " \"%s\" で始まる文字列の中で 8 進文字なしに '\\u' が使われています "
 
-#: src/main/gram.y:2375
+#: src/main/gram.y:2402
 #, c-format
 msgid "invalid \\u{xxxx} sequence (line %d)"
 msgstr " 不正な \\u{xxxx} 系列です (%d 行) "
 
-#: src/main/gram.y:2387
+#: src/main/gram.y:2416
 #, c-format
 msgid "\\Uxxxxxxxx sequences not supported inside backticks (line %d)"
 msgstr " \\Uxxxxxxxx シーケンスはバックチック内ではサポートされません (%d 行) "
 
-#: src/main/gram.y:2402
+#: src/main/gram.y:2431
 #, c-format
 msgid "'\\U' used without hex digits in character string starting \"%s\""
 msgstr " \"%s\" で始まる文字列の中で 8 進文字なしに '\\U' が使われています "
 
-#: src/main/gram.y:2410
+#: src/main/gram.y:2439
 #, c-format
 msgid "invalid \\U{xxxxxxxx} sequence (line %d)"
 msgstr " 不正な \\U{xxxxxxxx} 系列です (%d 行) "
 
-#: src/main/gram.y:2451
+#: src/main/gram.y:2482
 #, c-format
 msgid "'\\%c' is an unrecognized escape in character string starting \"%s\""
 msgstr ""
 " \"%2$s\" で始まる文字列の中で '\\%1$c' は文字列で認識されないエスケープです "
 
-#: src/main/gram.y:2510
+#: src/main/gram.y:2546
 msgid "mixing Unicode and octal/hex escapes in a string is not allowed"
 msgstr " 文字列中にユニコードや 8 進・16 進エスケープ文字は許されません "
 
-#: src/main/gram.y:2514
+#: src/main/gram.y:2550
 #, c-format
 msgid ""
 "string at line %d containing Unicode escapes not in this locale\n"
@@ -3846,13 +3918,13 @@ msgstr ""
 " このロケールにはない Unicode エスケープを含む %d 行の文字列は \n"
 " 長すぎます (最大 10000 文字です) "
 
-#: src/main/gram.y:3112 src/main/gram.y:3119 src/main/gram.y:3125
-#: src/main/gram.y:3132
+#: src/main/gram.y:3148 src/main/gram.y:3155 src/main/gram.y:3161
+#: src/main/gram.y:3168
 #, c-format
 msgid "contextstack overflow at line %d"
 msgstr " コンテクストスタックが溢れました (%d 行) "
 
-#: src/main/gram.y:3227
+#: src/main/gram.y:3263
 #, c-format
 msgid "internal parser error at line %d"
 msgstr " 内部パーサーエラー (%d 行) "
@@ -3862,34 +3934,34 @@ msgstr " 内部パーサーエラー (%d 行) "
 msgid "relative range of values =%4.0f * EPS, is small (axis %d)"
 msgstr " 値の相対範囲 =%4.0f * EPS は小さいです (軸 %d) "
 
-#: src/main/grep.c:93
+#: src/main/grep.c:96
 #, c-format
 msgid "invalid regular expression '%s', reason '%s'"
 msgstr " '%s' は不正な正則表現です、理由は '%s' "
 
-#: src/main/grep.c:95
+#: src/main/grep.c:98
 #, c-format
 msgid "invalid regular expression, reason '%s'"
 msgstr " 不正な正則表現です、理由は '%s' "
 
-#: src/main/grep.c:220 src/main/grep.c:308 src/main/grep.c:416
-#: src/main/grep.c:883 src/main/grep.c:2473
+#: src/main/grep.c:225 src/main/grep.c:315 src/main/grep.c:426
+#: src/main/grep.c:900 src/main/grep.c:2502
 #, c-format
 msgid "input string %d is invalid UTF-8"
 msgstr " 入力文字列 %d は不正な UTF-8 文字列です "
 
-#: src/main/grep.c:286 src/main/grep.c:383
+#: src/main/grep.c:292 src/main/grep.c:391
 #, c-format
 msgid "'split' string %d is invalid UTF-8"
 msgstr " '分割された' 文字列 %d は不正な UTF-8 文字列です "
 
-#: src/main/grep.c:290 src/main/grep.c:387 src/main/grep.c:560
+#: src/main/grep.c:296 src/main/grep.c:395 src/main/grep.c:571
 #, c-format
 msgid "'split' string %d is invalid in this locale"
 msgstr " '分割された' 文字列 %d はこのロケールでは不適切です "
 
-#: src/main/grep.c:395 src/main/grep.c:851 src/main/grep.c:1600
-#: src/main/grep.c:2394
+#: src/main/grep.c:404 src/main/grep.c:867 src/main/grep.c:1621
+#: src/main/grep.c:2419
 #, c-format
 msgid ""
 "PCRE pattern compilation error\n"
@@ -3900,13 +3972,13 @@ msgstr ""
 " \t'%s' \n"
 " \tat '%s' \n"
 
-#: src/main/grep.c:397
+#: src/main/grep.c:406
 #, c-format
 msgid "invalid split pattern '%s'"
 msgstr " 分割パターン '%s' が不正です "
 
-#: src/main/grep.c:401 src/main/grep.c:857 src/main/grep.c:1607
-#: src/main/grep.c:2401
+#: src/main/grep.c:410 src/main/grep.c:873 src/main/grep.c:1628
+#: src/main/grep.c:2426
 #, c-format
 msgid ""
 "PCRE pattern study error\n"
@@ -3915,47 +3987,47 @@ msgstr ""
 " PCRE パターンの学習エラー \n"
 " \t'%s' \n"
 
-#: src/main/grep.c:834 src/main/grep.c:2377
+#: src/main/grep.c:849 src/main/grep.c:2401
 msgid "regular expression is invalid UTF-8"
 msgstr " 正規表現は不正な UTF-8 文字列です "
 
-#: src/main/grep.c:853 src/main/grep.c:1602 src/main/grep.c:2396
+#: src/main/grep.c:869 src/main/grep.c:1623 src/main/grep.c:2421
 #, c-format
 msgid "invalid regular expression '%s'"
 msgstr " '%s' の正規表現が不正です "
 
-#: src/main/grep.c:1264
+#: src/main/grep.c:1282
 msgid "pattern matches an empty string infinitely, returning first match only"
 msgstr ""
 " パターンは空の文字列に何回でもマッチします、最初にマッチしたものだけを返しま"
 "す "
 
-#: src/main/grep.c:1575
+#: src/main/grep.c:1595
 msgid "'pattern' is invalid UTF-8"
 msgstr " 'pattern' は不正な UTF-8 文字列です "
 
-#: src/main/grep.c:1577
+#: src/main/grep.c:1597
 msgid "'replacement' is invalid UTF-8"
 msgstr " 'replacement' は不正な UTF-8 文字列です "
 
-#: src/main/grep.c:1581
+#: src/main/grep.c:1601
 msgid "'pattern' is invalid in this locale"
 msgstr " 'pattern' は現在のロケールでは不正です "
 
-#: src/main/grep.c:1584
+#: src/main/grep.c:1604
 msgid "'replacement' is invalid in this locale"
 msgstr " 'replacement' は現在のロケールでは不正です "
 
-#: src/main/grep.c:1589
+#: src/main/grep.c:1609
 msgid "zero-length pattern"
 msgstr " 長さゼロのパターン "
 
-#: src/main/grep.c:1732 src/main/grep.c:1748 src/main/grep.c:1796
-#: src/main/grep.c:1812 src/main/grep.c:1859 src/main/grep.c:1875
+#: src/main/grep.c:1753 src/main/grep.c:1769 src/main/grep.c:1817
+#: src/main/grep.c:1833 src/main/grep.c:1880 src/main/grep.c:1896
 msgid "result string is too long"
 msgstr " 結果の文字列が長すぎます "
 
-#: src/main/grep.c:2411
+#: src/main/grep.c:2436
 #, c-format
 msgid "'pcre_fullinfo' returned '%d' "
 msgstr " 'pcre_fullinfo' が '%d' を返しました "
@@ -3964,33 +4036,29 @@ msgstr " 'pcre_fullinfo' が '%d' を返しました "
 msgid "ignoring non-pairlist attributes"
 msgstr " ペアリストでない属性を無視します "
 
-#: src/main/internet.c:92
+#: src/main/internet.c:83
 msgid "internet routines cannot be accessed in module"
 msgstr " モジュール中でインターネットルーチンがアクセスできません "
 
-#: src/main/internet.c:103 src/main/internet.c:141 src/main/internet.c:154
-#: src/main/internet.c:165 src/main/internet.c:176 src/main/internet.c:187
-#: src/main/internet.c:196 src/main/internet.c:207 src/main/internet.c:218
-#: src/main/internet.c:227 src/main/internet.c:237
+#: src/main/internet.c:94 src/main/internet.c:106 src/main/internet.c:119
+#: src/main/internet.c:130 src/main/internet.c:141 src/main/internet.c:152
+#: src/main/internet.c:161 src/main/internet.c:172 src/main/internet.c:183
+#: src/main/internet.c:192 src/main/internet.c:202 src/main/internet.c:318
+#: src/main/internet.c:330 src/main/internet.c:342 src/main/internet.c:354
 msgid "internet routines cannot be loaded"
 msgstr " インターネットルーチンがロードできません "
 
-#: src/main/internet.c:118 src/main/memory.c:3434 src/main/memory.c:3444
-#: src/main/memory.c:3456 src/main/memory.c:3470 src/main/memory.c:3487
-#: src/main/memory.c:3505
-msgid "bad value"
-msgstr " 不適切な値です "
-
-#: src/main/internet.c:124
-msgid "internet routines were already initialized"
-msgstr " インターネットルーチンは既に初期化されています "
-
-#: src/main/internet.c:251 src/main/internet.c:265 src/main/internet.c:281
-#: src/main/internet.c:293 src/main/internet.c:307 src/main/internet.c:327
-#: src/main/internet.c:340
+#: src/main/internet.c:216 src/main/internet.c:230 src/main/internet.c:247
+#: src/main/internet.c:259 src/main/internet.c:273 src/main/internet.c:293
+#: src/main/internet.c:306
 msgid "socket routines cannot be loaded"
 msgstr " ソケットルーチンがロードできません "
 
+#: src/main/internet.c:242
+#, fuzzy
+msgid "attempt to close invalid socket"
+msgstr " 不正な 'comment' 属性を設定しようとしました "
+
 #: src/main/lapack.c:39
 msgid "LAPACK routines cannot be accessed in module"
 msgstr " LAPACK ルーチンはこのモジュールではアクセスできません "
@@ -3999,42 +4067,38 @@ msgstr " LAPACK ルーチンはこのモジュールではアクセスできま
 msgid "LAPACK routines cannot be loaded"
 msgstr " LAPCK ルーチンがロードできません "
 
-#: src/main/logic.c:70
-msgid "binary operations require two arguments"
-msgstr " 二項演算には二つの引数が必要です "
-
-#: src/main/logic.c:88 src/main/logic.c:150
+#: src/main/logic.c:80 src/main/logic.c:142
 msgid "operations are possible only for numeric, logical or complex types"
 msgstr " 演算が可能なのは数値、論理値、そして複素数型のみです "
 
-#: src/main/logic.c:98
+#: src/main/logic.c:90
 msgid "binary operation on non-conformable arrays"
 msgstr " 不整合な配列への二項演算です "
 
-#: src/main/logic.c:124 src/main/relop.c:247
+#: src/main/logic.c:116 src/main/relop.c:241
 msgid "non-conformable time series"
 msgstr " 整合した時系列ではありません "
 
-#: src/main/logic.c:254
+#: src/main/logic.c:247
 #, c-format
 msgid "'%s' operator requires 2 arguments"
 msgstr " '%s' 演算子には 2 つの引数が必要です "
 
-#: src/main/logic.c:261
+#: src/main/logic.c:254
 #, c-format
 msgid "invalid 'x' type in 'x %s y'"
 msgstr " 'x %s y' の 'x' の型が不正です "
 
-#: src/main/logic.c:268
+#: src/main/logic.c:261
 #, c-format
 msgid "invalid 'y' type in 'x %s y'"
 msgstr " 'x %s y' の 'y' の型が不正です "
 
-#: src/main/logic.c:341
+#: src/main/logic.c:334
 msgid "Unary operator `!' called with two arguments"
 msgstr " 単項演算子 '!' が 2 つの引数で呼び出されました "
 
-#: src/main/logic.c:448
+#: src/main/logic.c:439
 #, c-format
 msgid "coercing argument of type '%s' to logical"
 msgstr " '%s' 型の引数を論理型に変換します "
@@ -4043,63 +4107,77 @@ msgstr " '%s' 型の引数を論理型に変換します "
 msgid "dummy - do not translate"
 msgstr " ダミー、訳してはいけない (けど、訳してしまった) "
 
-#: src/main/main.c:476
+#: src/main/main.c:329
+#, fuzzy
+msgid "error during cleanup\n"
+msgstr " wrapup 中にエラーが起こりました: "
+
+#: src/main/main.c:336
+msgid "Execution halted\n"
+msgstr " 実行が停止されました \n"
+
+#: src/main/main.c:505
 msgid "Error: segfault from C stack overflow\n"
 msgstr " エラー: C スタック・オーバーフローによるセグメンテーション違反 \n"
 
-#: src/main/main.c:846
+#: src/main/main.c:888
 msgid "unable to open the base package\n"
 msgstr " base パッケージを開くことができません \n"
 
-#: src/main/main.c:924
+#: src/main/main.c:971
 #, c-format
 msgid "unable to restore saved data in %s\n"
 msgstr " %s に保存されたデータを復帰できません \n"
 
-#: src/main/main.c:971
+#: src/main/main.c:1020
 msgid "During startup - "
 msgstr " 起動準備中です - "
 
-#: src/main/main.c:1224
+#: src/main/main.c:1036
+#, fuzzy
+msgid "unable to initialize the JIT\n"
+msgstr " 読み込みのためにファイルを開くことができません "
+
+#: src/main/main.c:1290
 msgid "cannot quit from browser"
 msgstr " ブラウザを終了できません "
 
-#: src/main/main.c:1228
+#: src/main/main.c:1294
 msgid "one of \"yes\", \"no\", \"ask\" or \"default\" expected."
 msgstr ""
 " \"yes\", \"no\", \"ask\" または \"default\" のどれかが期待されています "
 
-#: src/main/main.c:1233
+#: src/main/main.c:1299
 msgid "save=\"ask\" in non-interactive use: command-line default will be used"
 msgstr ""
 " 非対話的な使用での save=\"ask\": コマンドラインでの既定動作が使用されます "
 
-#: src/main/main.c:1241
+#: src/main/main.c:1307
 msgid "unrecognized value of 'save'"
 msgstr " 'save' の値が認識できません "
 
-#: src/main/main.c:1244
+#: src/main/main.c:1310
 msgid "invalid 'status', 0 assumed"
 msgstr " 'status' が不正です。0 が仮定されました "
 
-#: src/main/main.c:1249
+#: src/main/main.c:1315
 msgid "invalid 'runLast', FALSE assumed"
 msgstr " 'runLast' が不正です。FALSE が仮定されました "
 
-#: src/main/main.c:1280
+#: src/main/main.c:1346
 msgid "cannot allocate space for toplevel callback element"
 msgstr " トップレベルの callback 要素に作業空間を割り当てることができません "
 
-#: src/main/main.c:1358
+#: src/main/main.c:1424
 msgid "negative index passed to R_removeTaskCallbackByIndex"
 msgstr " R_removeTaskCallbackByIndex に負の添字が渡されました "
 
-#: src/main/main.c:1468
+#: src/main/main.c:1534
 #, c-format
 msgid "warning messages from top-level task callback '%s'\n"
 msgstr " トップレベルの task callback '%s' からの警告メッセージ \n"
 
-#: src/main/main.c:1524
+#: src/main/main.c:1591
 msgid "top-level task callback did not return a logical value"
 msgstr " トップレベルの task callback が論理値を返していません "
 
@@ -4119,201 +4197,208 @@ msgstr " 長い引数の長さが短いほうの長さの倍数になってい
 msgid "invalid partial string match"
 msgstr " 文字列の部分的マッチが不正です "
 
-#: src/main/match.c:228 src/main/match.c:268 src/main/objects.c:56
-#: src/main/objects.c:66
+#: src/main/match.c:228 src/main/match.c:266 src/main/objects.c:49
+#: src/main/objects.c:59
 #, c-format
 msgid "formal argument \"%s\" matched by multiple actual arguments"
 msgstr " 仮引数 \"%s\" が複数の実引数にマッチしました "
 
-#: src/main/match.c:231 src/main/match.c:266
+#: src/main/match.c:231 src/main/match.c:264
 #, c-format
 msgid "argument %d matches multiple formal arguments"
 msgstr " 引数 %d が複数の仮引数に一致します "
 
-#: src/main/match.c:272
+#: src/main/match.c:270
 #, c-format
 msgid "partial argument match of '%s' to '%s'"
 msgstr " '%s' の '%s' への部分的な引数のマッチング "
 
-#: src/main/match.c:383
+#: src/main/match.c:380
 #, c-format
 msgid "unused argument %s"
 msgid_plural "unused arguments %s"
 msgstr[0] " 使われていない引数 %s "
 
-#: src/main/memory.c:1232
+#: src/main/memory.c:1234
 msgid "can only weakly reference/finalize reference objects"
 msgstr " 参照オブジェクトは曖昧にしか参照・完結できません "
 
-#: src/main/memory.c:1266
+#: src/main/memory.c:1268
 msgid "finalizer must be a function or NULL"
 msgstr " ファイナライザーは関数であるか NULL でなければなりません "
 
-#: src/main/memory.c:1322 src/main/memory.c:1330 src/main/memory.c:1341
+#: src/main/memory.c:1324 src/main/memory.c:1332 src/main/memory.c:1343
 msgid "not a weak reference"
 msgstr " 弱い (weak) 参照ではありません "
 
-#: src/main/memory.c:1472
+#: src/main/memory.c:1474
 msgid "first argument must be environment or external pointer"
 msgstr " 最初の引数は環境か外部ポインタでなくてはなりません "
 
-#: src/main/memory.c:1474
+#: src/main/memory.c:1476
 msgid "second argument must be a function"
 msgstr " 二番目の引数は関数でなければなりません "
 
-#: src/main/memory.c:1478
+#: src/main/memory.c:1480
 msgid "third argument must be 'TRUE' or 'FALSE'"
 msgstr " 三番目の引数は 'TRUE' か 'FALSE' でなくてはなりません "
 
-#: src/main/memory.c:1970
+#: src/main/memory.c:1979
 msgid "vector memory exhausted (limit reached?)"
 msgstr " ベクトルのメモリを使い切りました (上限に達した?) "
 
-#: src/main/memory.c:1976
+#: src/main/memory.c:1985
 msgid "cons memory exhausted (limit reached?)"
 msgstr " cons メモリが尽きました (限界に達したかも?) "
 
-#: src/main/memory.c:1981
+#: src/main/memory.c:1990
 msgid "memory exhausted (limit reached?)"
 msgstr " メモリが尽きました (限界に達したかも?) "
 
-#: src/main/memory.c:2116
+#: src/main/memory.c:2126
 #, c-format
 msgid "cannot allocate memory block of size %0.f Tb"
 msgstr " サイズ %0.f Tb のメモリブロックを割り当てることができません "
 
-#: src/main/memory.c:2121
+#: src/main/memory.c:2131
 #, c-format
 msgid "cannot allocate memory block of size %0.1f Gb"
 msgstr " サイズ %0.1f Gb のメモリブロックを割り当てることができません "
 
-#: src/main/memory.c:2442
+#: src/main/memory.c:2458
 msgid "vector is too large"
 msgstr " ベクトルのサイズが大き過ぎます "
 
-#: src/main/memory.c:2445
+#: src/main/memory.c:2461
 msgid "negative length vectors are not allowed"
 msgstr " 負の長さのベクトルは許されません "
 
-#: src/main/memory.c:2471 src/main/memory.c:2484 src/main/memory.c:2497
-#: src/main/memory.c:2512
+#: src/main/memory.c:2487 src/main/memory.c:2500 src/main/memory.c:2513
+#: src/main/memory.c:2528
 #, c-format
 msgid "cannot allocate vector of length %d"
 msgstr " 長さ %d のベクトルを割り当てることができません "
 
-#: src/main/memory.c:2533
+#: src/main/memory.c:2549
 #, c-format
 msgid "invalid type/length (%s/%d) in vector allocation"
 msgstr " ベクトル割り当てにおいて、型か長さ (%s か %d) が不正です "
 
-#: src/main/memory.c:2636
+#: src/main/memory.c:2648
 #, c-format
 msgid "cannot allocate vector of size %0.1f Gb"
 msgstr " サイズ %0.1f Gb のベクトルを割り当てることができません "
 
-#: src/main/memory.c:2640
+#: src/main/memory.c:2652
 #, c-format
 msgid "cannot allocate vector of size %0.1f Mb"
 msgstr " サイズ %0.1f Mb のベクトルを割り当てることができません "
 
-#: src/main/memory.c:2644
+#: src/main/memory.c:2656
 #, c-format
 msgid "cannot allocate vector of size %0.f Kb"
 msgstr " サイズ %0.f Kb のベクトルを割り当てることができません "
 
-#: src/main/memory.c:3001
+#: src/main/memory.c:3071
 msgid "protect(): protection stack overflow"
 msgstr " protect(): プロテクションスタックが溢れました "
 
-#: src/main/memory.c:3008
+#: src/main/memory.c:3078
 #, c-format
-msgid "unprotect(): only %d protected items"
-msgstr " unprotect(): %d 個の保護された項目 "
+msgid "unprotect(): only %d protected item"
+msgid_plural "unprotect(): only %d protected items"
+msgstr[0] " unprotect(): %d 個だけの保護された項目 "
 
-#: src/main/memory.c:3041
+#: src/main/memory.c:3113
 msgid "unprotect_ptr: pointer not found"
 msgstr " unprotect_ptr: ポインターがありません "
 
-#: src/main/memory.c:3079
+#: src/main/memory.c:3151
 #, c-format
-msgid "R_Reprotect: only %d protected items, can't reprotect index %d"
-msgstr ""
-" R_Reprotect: %d 個の保護された項目だけです、インデックス %d を再プロテクトで"
+msgid "R_Reprotect: only %d protected item, can't reprotect index %d"
+msgid_plural "R_Reprotect: only %d protected items, can't reprotect index %d"
+msgstr[0] ""
+" R_Reprotect: %d 個だけの保護された項目です、インデックス %d を再プロテクトで"
 "きません "
 
-#: src/main/memory.c:3129
+#: src/main/memory.c:3203
 #, c-format
 msgid "'Calloc' could not allocate memory (%.0f of %u bytes)"
 msgstr ""
 " 'Calloc' がメモリー (%.0f バイト、%u バイト中) を割りあてられませんでした "
 
-#: src/main/memory.c:3140
+#: src/main/memory.c:3214
 #, c-format
 msgid "'Realloc' could not re-allocate memory (%.0f bytes)"
 msgstr " 'Realloc' がメモリーを再確保できません (%.0f バイト) "
 
-#: src/main/memory.c:3380
+#: src/main/memory.c:3460
 msgid "not safe to return vector pointer"
 msgstr " ベクトルのポインタを返すのは安全ではありません "
 
-#: src/main/memory.c:3392
+#: src/main/memory.c:3471
 #, c-format
 msgid "attempt to set index %lu/%lu in SET_STRING_ELT"
 msgstr "SET_STRING_ELT 中で インデックス %lu/%lu を設定しようとしました "
 
-#: src/main/memory.c:3408
+#: src/main/memory.c:3487
 #, c-format
 msgid "attempt to set index %lu/%lu in SET_VECTOR_ELT"
 msgstr "SET_VECTOR_ELT中で インデックス %lu/%lu を設定しようとしました "
 
-#: src/main/memory.c:3658
+#: src/main/memory.c:3514 src/main/memory.c:3524 src/main/memory.c:3536
+#: src/main/memory.c:3550 src/main/memory.c:3565 src/main/memory.c:3583
+msgid "bad value"
+msgstr " 不適切な値です "
+
+#: src/main/memory.c:3746
 msgid "memory profiling is not available on this system"
 msgstr " メモリプロファリングはこのシステムでは使えません "
 
-#: src/main/memory.c:3723
+#: src/main/memory.c:3810
 #, c-format
 msgid "Rprofmem: cannot open output file '%s'"
 msgstr " Rprofmem: ファイル '%s' を開くことができません "
 
-#: src/main/memory.c:3830
+#: src/main/memory.c:3915
 #, c-format
 msgid "long vectors not supported yet: %s:%d"
 msgstr " 長いベクトルはまだサポートされていません: %s:%d "
 
-#: src/main/names.c:996
+#: src/main/names.c:1021
 msgid "string argument required"
 msgstr " 文字列引数が要求されています "
 
-#: src/main/names.c:999
+#: src/main/names.c:1024
 msgid "no such primitive function"
 msgstr " そのようなプリミティブ関数はありません "
 
-#: src/main/names.c:1146
+#: src/main/names.c:1212 src/main/names.c:1242
 msgid "attempt to use zero-length variable name"
 msgstr " 長さ 0 の変数名を使おうとしました "
 
-#: src/main/names.c:1148
+#: src/main/names.c:1214 src/main/names.c:1244
 #, c-format
 msgid "variable names are limited to %d bytes"
 msgstr " 変数名は %d バイトが上限です "
 
-#: src/main/names.c:1176 src/main/names.c:1179
+#: src/main/names.c:1307 src/main/names.c:1310
 msgid "invalid .Internal() argument"
 msgstr " .Internal() 引数が不正です "
 
-#: src/main/objects.c:46
+#: src/main/objects.c:39
 msgid "generic 'function' is not a function"
 msgstr " 総称的な 'function' は関数ではありません "
 
-#: src/main/objects.c:201
+#: src/main/objects.c:193
 msgid "bad generic call environment"
 msgstr " 不正な総称的呼び出し環境 (generic call environment) です "
 
-#: src/main/objects.c:207
+#: src/main/objects.c:201
 msgid "bad generic definition environment"
 msgstr " 不正な総称的定義環境 (generic definition environment) です "
 
-#: src/main/objects.c:246
+#: src/main/objects.c:249
 msgid ""
 "no '.S3MethodsClass' table, cannot use S4 objects with S3 methods ('methods' "
 "package not attached?)"
@@ -4321,29 +4406,17 @@ msgstr ""
 " '.S3MethodsClass' テーブルがありません。S3 メソッドを持つ S4 オブジェクトは"
 "使用できません ('methods' パッケージが付加されていない?) "
 
-#: src/main/objects.c:270 src/main/objects.c:411
-msgid "'UseMethod' used in an inappropriate fashion"
-msgstr " 'UseMethod' が不適切な仕方で使われています "
-
-#: src/main/objects.c:290
-msgid "invalid generic function in 'usemethod'"
-msgstr " 'usemethod' 中に不正な総称関数があります "
-
-#: src/main/objects.c:399
+#: src/main/objects.c:415
 msgid "there must be a 'generic' argument"
 msgstr " 'generic' 引数が必要です "
 
-#: src/main/objects.c:403
+#: src/main/objects.c:419
 msgid "'generic' argument must be a character string"
 msgstr " 'generic' 引数は文字列でなくてはなりません "
 
-#: src/main/objects.c:440
-msgid "'UseMethod' called from outside a function"
-msgstr " 'UseMethod' が関数の外から呼ばれました "
-
-#: src/main/objects.c:447
-msgid "first argument must be a generic name"
-msgstr " 最初の引数は総称名でなくてはなりません "
+#: src/main/objects.c:427
+msgid "'UseMethod' used in an inappropriate fashion"
+msgstr " 'UseMethod' が不適切な仕方で使われています "
 
 #: src/main/objects.c:472
 #, c-format
@@ -4351,105 +4424,100 @@ msgid "no applicable method for '%s' applied to an object of class \"%s\""
 msgstr ""
 " '%s' をクラス \"%s\" のオブジェクトに適用できるようなメソッドがありません "
 
-#: src/main/objects.c:533
+#: src/main/objects.c:582
 msgid "'NextMethod' called from outside a function"
 msgstr " 'NextMethod' が関数の外から呼ばれました "
 
-#: src/main/objects.c:539
+#: src/main/objects.c:588
 msgid "'NextMethod' called from an anonymous function"
 msgstr " 'NextMethod' が匿名関数から呼ばれました "
 
-#: src/main/objects.c:563
+#: src/main/objects.c:609
 msgid "no calling generic was found: was a method called directly?"
 msgstr " 呼出した総称関数が見つかりません。メソッドが直接呼び出されましたか? "
 
-#: src/main/objects.c:566
+#: src/main/objects.c:612
 #, c-format
 msgid "'function' is not a function, but of type %d"
 msgstr " 'function' は関数ではなく、単に %d 型です "
 
-#: src/main/objects.c:640
+#: src/main/objects.c:639
 msgid "wrong argument ..."
 msgstr " 誤った引数です... "
 
-#: src/main/objects.c:653
+#: src/main/objects.c:651
 msgid "object not specified"
 msgstr " オブジェクトが指定されていません "
 
-#: src/main/objects.c:663 src/main/objects.c:670
+#: src/main/objects.c:659 src/main/objects.c:666
 msgid "generic function not specified"
 msgstr " 総称的関数が指定されていません "
 
-#: src/main/objects.c:667
+#: src/main/objects.c:663
 msgid "invalid generic argument to 'NextMethod'"
 msgstr " 'NextMethod' への総称的引数が不正です "
 
-#: src/main/objects.c:680
+#: src/main/objects.c:675
 msgid "invalid 'group' argument found in 'NextMethod'"
 msgstr " 'NextMethod' 中に不正な 'group' 引数が見つかりました "
 
-#: src/main/objects.c:699
+#: src/main/objects.c:692
 msgid "wrong value for .Method"
 msgstr " .Method の値が不正です "
 
-#: src/main/objects.c:703 src/main/objects.c:712
-#, c-format
-msgid "method name too long in '%s'"
-msgstr " '%s' のメソッド名が長すぎます "
-
-#: src/main/objects.c:715
+#: src/main/objects.c:702
 msgid "Incompatible methods ignored"
 msgstr " 相容れないメソッドが無視されました "
 
-#: src/main/objects.c:775 src/main/objects.c:780
+#: src/main/objects.c:759 src/main/objects.c:766
 msgid "no method to invoke"
 msgstr " 起動すべきメソッドはありません "
 
-#: src/main/objects.c:832
+#: src/main/objects.c:817
 msgid "cannot unclass an environment"
 msgstr " 基本環境のクラス属性は取り除けません "
 
-#: src/main/objects.c:835
+#: src/main/objects.c:820
 msgid "cannot unclass an external pointer"
 msgstr " 外部ポインターのクラス属性は取り除けません "
 
-#: src/main/objects.c:872
+#: src/main/objects.c:856
 msgid "'what' must be a character vector"
 msgstr " 'what' は文字ベクトルでなくてはなりません "
 
-#: src/main/objects.c:876
+#: src/main/objects.c:860
 msgid "'which' must be a length 1 logical vector"
 msgstr " 'which' は長さ 1 の論理ベクトルでなくてはなりません "
 
-#: src/main/objects.c:882
+#: src/main/objects.c:866
 msgid "use 'is()' instead of 'inherits()' on S4 objects"
 msgstr " S4 オブジェクトには 'inherits()' でなく 'is()' を使ってください "
 
-#: src/main/objects.c:1012
+#: src/main/objects.c:995
 msgid "could not find correct environment; please report!"
 msgstr " 正しい環境を見つけられませんでした; 報告をお願いします! "
 
-#: src/main/objects.c:1052
+#: src/main/objects.c:1039
 msgid "'onOff' must be TRUE or FALSE"
 msgstr " 'onOff' は TRUE または FALSE でなければなりません "
 
-#: src/main/objects.c:1119
+#: src/main/objects.c:1104
 #, c-format
 msgid "unable to find a non-generic version of function \"%s\""
 msgstr " \"%s\" 関数の非総称的でないものが見つかりませんでした "
 
-#: src/main/objects.c:1151
+#: src/main/objects.c:1136
 msgid ""
 "'standardGeneric' called without 'methods' dispatch enabled (will be ignored)"
 msgstr ""
 " 'methods' の適用が有効とされること無しに 'standardGeneric' が呼び出されまし"
 "た (無視します) "
 
-#: src/main/objects.c:1160
+#: src/main/objects.c:1145
 msgid "argument to 'standardGeneric' must be a non-empty character string"
 msgstr " 'standardGeneric' に対する引数は空でない文字列でなければなりません "
 
-#: src/main/objects.c:1165
+#: src/main/objects.c:1150
 #, c-format
 msgid ""
 "call to standardGeneric(\"%s\") apparently not from the body of that generic "
@@ -4457,11 +4525,7 @@ msgid ""
 msgstr ""
 " 見たところ総称関数の本体からではない standardGeneric(\"%s\") の呼出しです "
 
-#: src/main/objects.c:1189
-msgid "argument 'code' must be a character string"
-msgstr " 引数 'code' は文字列でなくてはなりません "
-
-#: src/main/objects.c:1257
+#: src/main/objects.c:1249
 #, c-format
 msgid ""
 "invalid primitive methods code (\"%s\"): should be \"clear\", \"reset\", "
@@ -4470,11 +4534,11 @@ msgstr ""
 " 不正な primitive メソッドコード (\"%s\") です: \"clear\", \"reset\", \"set"
 "\" または \"suppress\" のいずれかでなければなりません "
 
-#: src/main/objects.c:1265
+#: src/main/objects.c:1257
 msgid "invalid object: must be a primitive function"
 msgstr " 不正なオブジェクトです: プリミティブな関数でなくてはなりません "
 
-#: src/main/objects.c:1312
+#: src/main/objects.c:1304
 #, c-format
 msgid ""
 "the formal definition of a primitive generic must be a function object (got "
@@ -4483,20 +4547,20 @@ msgstr ""
 " primitive な総称関数の形式的定義は関数オブジェクトでなければなりません (型 "
 "'%s' です) "
 
-#: src/main/objects.c:1342
+#: src/main/objects.c:1334
 #, c-format
 msgid "object returned as generic function \"%s\" does not appear to be one"
 msgstr " 総称的関数 \"%s\" として返されたオブジェクトが一つではないようです "
 
-#: src/main/objects.c:1444
+#: src/main/objects.c:1439
 msgid "invalid primitive operation given for dispatch"
 msgstr " ディスパッチ(dispatch)用に与えられた primitive 関数が不正です "
 
-#: src/main/objects.c:1470 src/main/objects.c:1489
+#: src/main/objects.c:1468 src/main/objects.c:1487
 msgid "dispatch error"
 msgstr " メソッド割り当てのエラーです "
 
-#: src/main/objects.c:1483
+#: src/main/objects.c:1481
 #, c-format
 msgid ""
 "primitive function \"%s\" has been set for methods but no generic function "
@@ -4505,84 +4569,93 @@ msgstr ""
 " primitive な関数 \"%s\" がメソッドに対して設定されましたが、総称関数が与えら"
 "れていません "
 
-#: src/main/objects.c:1508
+#: src/main/objects.c:1506
 msgid "C level MAKE_CLASS macro called with NULL string pointer"
 msgstr ""
 " C level MAKE_CLASS のマクロが、NULL 文字ポインタを伴って呼び出されました "
 
-#: src/main/objects.c:1524
+#: src/main/objects.c:1522
+msgid "'methods' package not yet loaded"
+msgstr " 'methods' パッケージがまだロードされていません "
+
+#: src/main/objects.c:1532
 msgid "R_getClassDef(.) called with NULL string pointer"
 msgstr " R_getClassDef(.) が NULL 文字ポインタを伴って呼び出されました "
 
-#: src/main/objects.c:1546
+#: src/main/objects.c:1577
 msgid "C level NEW macro called with null class definition pointer"
 msgstr ""
 " C レベルの NEW マクロが、null クラスの定義ポインタを伴って呼び出されました "
 
-#: src/main/objects.c:1550
+#: src/main/objects.c:1581
 #, c-format
 msgid "trying to generate an object from a virtual class (\"%s\")"
 msgstr " 仮想クラス (\"%s\") からオブジェクトを生成しようとしています "
 
-#: src/main/objects.c:1627
+#: src/main/objects.c:1663
 #, c-format
 msgid "object of class \"%s\" does not correspond to a valid S3 object"
 msgstr ""
 " クラス \"%s\" のオブジェクトは適正な S3 オブジェクトに対応していません "
 
-#: src/main/options.c:120 src/main/options.c:180
+#: src/main/options.c:121 src/main/options.c:182
 msgid "corrupted options list"
 msgstr " オプションリストが間違っています "
 
-#: src/main/options.c:130
+#: src/main/options.c:131
 msgid "invalid printing width, used 80"
 msgstr " 表示の幅が不正です: 80 にします "
 
-#: src/main/options.c:141
+#: src/main/options.c:142
 msgid "invalid printing digits, used 7"
 msgstr " 表示の桁数が不正です: 7 にします "
 
-#: src/main/options.c:153
+#: src/main/options.c:154
 msgid "invalid 'deparse.cutoff', used 60"
 msgstr " 不正な 'deparse.cutoff', 60 が使われました "
 
-#: src/main/options.c:165
+#: src/main/options.c:166
 msgid "invalid value for \"device.ask.default\", using FALSE"
 msgstr " \"device.ask.default\"に対して不正な値: FALSEを使います "
 
-#: src/main/options.c:401
+#: src/main/options.c:416
 msgid "list argument has no valid names"
 msgstr " 引数リストは有効な名前ではありません "
 
-#: src/main/options.c:429
+#: src/main/options.c:445
 #, c-format
 msgid "invalid 'width' parameter, allowed %d...%d"
 msgstr " 'width' パラメータが不正です: %d...%d が認められています "
 
-#: src/main/options.c:440
+#: src/main/options.c:456
 #, c-format
 msgid "invalid 'digits' parameter, allowed %d...%d"
 msgstr " 'digits' のパラメータが不正です: %d...%d が認められています "
 
-#: src/main/options.c:447
+#: src/main/options.c:463
 #, c-format
 msgid "'expressions' parameter invalid, allowed %d...%d"
 msgstr " 'expression' パラメータが不正です: %d...%d が認められています "
 
-#: src/main/options.c:454 src/main/options.c:462 src/main/options.c:468
-#: src/main/options.c:476 src/main/options.c:483 src/main/options.c:488
-#: src/main/options.c:495 src/main/options.c:501 src/main/options.c:507
-#: src/main/options.c:512 src/main/options.c:517 src/main/options.c:526
-#: src/main/options.c:532 src/main/options.c:538 src/main/options.c:549
-#: src/main/options.c:556 src/main/options.c:562 src/main/options.c:570
-#: src/main/options.c:577 src/main/options.c:584 src/main/options.c:591
-#: src/main/options.c:598 src/main/options.c:606 src/main/options.c:615
-#: src/main/options.c:618 src/main/options.c:624
+#: src/main/options.c:470 src/main/options.c:478 src/main/options.c:484
+#: src/main/options.c:492 src/main/options.c:499 src/main/options.c:504
+#: src/main/options.c:511 src/main/options.c:517 src/main/options.c:523
+#: src/main/options.c:528 src/main/options.c:533 src/main/options.c:542
+#: src/main/options.c:548 src/main/options.c:554 src/main/options.c:564
+#: src/main/options.c:578 src/main/options.c:584 src/main/options.c:592
+#: src/main/options.c:599 src/main/options.c:606 src/main/options.c:613
+#: src/main/options.c:620 src/main/options.c:628 src/main/options.c:637
+#: src/main/options.c:640 src/main/options.c:646
 #, c-format
 msgid "invalid value for '%s'"
 msgstr " '%s' の値が不正です "
 
-#: src/main/options.c:611 src/main/options.c:640
+#: src/main/options.c:569
+#, fuzzy
+msgid "'OutDec' must be a string of one character"
+msgstr " 'dec' は一文字でなければなりません "
+
+#: src/main/options.c:633 src/main/options.c:662
 msgid "\"par.ask.default\" has been replaced by \"device.ask.default\""
 msgstr " \"par.ask.default\" は \"device.ask.default\" で置き換えられました "
 
@@ -4602,15 +4675,20 @@ msgstr " 結果が 2^31-1 バイトを超えました "
 msgid "non-string argument to Internal paste"
 msgstr " 内部関数 paste への引数が文字列ではありません "
 
-#: src/main/paste.c:390
+#: src/main/paste.c:387
 msgid "first argument must be atomic"
 msgstr " 最初の引数はアトムでなくてはなりません "
 
-#: src/main/paste.c:560
+#: src/main/paste.c:448
+#, fuzzy
+msgid "'decimal.mark' must be a string of one character"
+msgstr " 'dec' は一文字でなければなりません "
+
+#: src/main/paste.c:579
 msgid "Impossible mode ( x )"
 msgstr " 不可能なモード (x) です "
 
-#: src/main/paste.c:645
+#: src/main/paste.c:663
 msgid "atomic vector arguments only"
 msgstr " 引数はアトムであるベクトルのみです "
 
@@ -4618,214 +4696,197 @@ msgstr " 引数はアトムであるベクトルのみです "
 msgid "invalid filename specification"
 msgstr " ファイル名の指定が不正です "
 
-#: src/main/platform.c:375 src/main/platform.c:419
+#: src/main/platform.c:375 src/main/platform.c:420
 msgid "write error during file append"
 msgstr " ファイル追加中に書き込みエラーが生じました "
 
-#: src/main/platform.c:394
+#: src/main/platform.c:395
 msgid "nothing to append to"
 msgstr " 付け足す (append) べきものがありません "
 
-#: src/main/platform.c:448 src/main/platform.c:795
+#: src/main/platform.c:449 src/main/platform.c:797 src/main/platform.c:979
 msgid "invalid filename argument"
 msgstr " ファイル名引数が不正です "
 
-#: src/main/platform.c:460
+#: src/main/platform.c:461
 #, c-format
 msgid "cannot create file '%s', reason '%s'"
 msgstr " fife '%s' を作れません、理由は '%s' です "
 
-#: src/main/platform.c:475 src/main/platform.c:545 src/main/platform.c:627
+#: src/main/platform.c:476 src/main/platform.c:546 src/main/platform.c:629
 msgid "invalid first filename"
 msgstr " 一番目のファイル名が不正です "
 
-#: src/main/platform.c:487
+#: src/main/platform.c:488
 #, c-format
 msgid "cannot remove file '%s', reason '%s'"
 msgstr " ファイル '%s' を削除できません、理由は '%s' です "
 
-#: src/main/platform.c:547 src/main/platform.c:629
+#: src/main/platform.c:548 src/main/platform.c:631
 msgid "invalid second filename"
 msgstr " 二番目のファイル名が不正です "
 
-#: src/main/platform.c:549 src/main/platform.c:631
+#: src/main/platform.c:551 src/main/platform.c:634
 msgid "nothing to link"
 msgstr " リンクすべきものがありません "
 
-#: src/main/platform.c:559
+#: src/main/platform.c:561
 msgid "symbolic links are not supported on this version of Windows"
 msgstr ""
 " この Windows のバージョンではシンボリックリンクはサポートされていません "
 
-#: src/main/platform.c:581
+#: src/main/platform.c:583
 #, c-format
 msgid "cannot symlink '%ls' to '%ls', reason '%s'"
 msgstr ""
 " シンボリックリンク '%ls' ('%ls' に対する) を作成できません、理由は '%s' で"
 "す "
 
-#: src/main/platform.c:601
+#: src/main/platform.c:603
 #, c-format
 msgid "cannot symlink '%s' to '%s', reason '%s'"
 msgstr ""
 " '%s' に対するシンボリックリンク '%s' を作成できません、理由は '%s' です "
 
-#: src/main/platform.c:609
+#: src/main/platform.c:611
 msgid "symbolic links are not supported on this platform"
 msgstr " このプラットフォームではシンボリックリンクはサポートされていません "
 
-#: src/main/platform.c:649
+#: src/main/platform.c:652
 #, c-format
 msgid "cannot link '%ls' to '%ls', reason '%s'"
 msgstr " '%ls' を '%ls' にリンクできません、理由は '%s' です "
 
-#: src/main/platform.c:669
+#: src/main/platform.c:672
 #, c-format
 msgid "cannot link '%s' to '%s', reason '%s'"
 msgstr " '%s' を '%s' にリンクできません、理由は '%s' です "
 
-#: src/main/platform.c:678
+#: src/main/platform.c:681
 msgid "(hard) links are not supported on this platform"
 msgstr " このプラットフォームでは (ハード) リンクはサポートされていません "
 
-#: src/main/platform.c:709
+#: src/main/platform.c:713
 msgid "'from' and 'to' are of different lengths"
 msgstr " 'from' と 'to' は異なった長さです "
 
-#: src/main/platform.c:720 src/main/platform.c:730
+#: src/main/platform.c:724 src/main/platform.c:734
 msgid "expanded 'from' name too long"
 msgstr " 展開された 'from' 名が長すぎます "
 
-#: src/main/platform.c:724 src/main/platform.c:734
+#: src/main/platform.c:728 src/main/platform.c:738
 msgid "expanded 'to' name too long"
 msgstr " 展開された 'to' 名が長すぎます "
 
-#: src/main/platform.c:738
+#: src/main/platform.c:742
 #, c-format
 msgid "cannot rename file '%s' to '%s', reason '%s'"
 msgstr " ファイル名を '%s' から '%s' に変更できません、理由は '%s' です "
 
-#: src/main/platform.c:1094
+#: src/main/platform.c:1168
 msgid "invalid 'pattern' regular expression"
 msgstr " 正規表現の 'pattern' が不正です "
 
-#: src/main/platform.c:1211
+#: src/main/platform.c:1285
 msgid "unable to determine R home location"
 msgstr " R のホームロケーションを決定できません "
 
-#: src/main/platform.c:1263
+#: src/main/platform.c:1338
 msgid "file name too long"
 msgstr " ファイル名が長すぎます "
 
-#: src/main/platform.c:1511 src/main/platform.c:1558 src/main/sysutils.c:1850
-#: src/main/sysutils.c:1864
+#: src/main/platform.c:1586 src/main/platform.c:1633 src/main/sysutils.c:1806
+#: src/main/sysutils.c:1820
 msgid "internal out-of-memory condition"
 msgstr " 内部でアウトオブメモリーが発生しています "
 
-#: src/main/platform.c:1554 src/main/sysutils.c:1860
+#: src/main/platform.c:1629 src/main/sysutils.c:1816
 #, c-format
 msgid "read error on '%s'"
 msgstr " '%s' の読み込みエラーです "
 
-#: src/main/platform.c:1722
+#: src/main/platform.c:1728
 msgid "setting 'LC_NUMERIC' may cause R to function strangely"
 msgstr " 'LC_NUMERIC' をセットすると、R は変に機能するかもしれません "
 
-#: src/main/platform.c:1736
+#: src/main/platform.c:1742
 msgid "LC_MESSAGES exists on Windows but is not operational"
 msgstr " LC_MESSAGES は Windows にも存在しますが、動作しません "
 
-#: src/main/platform.c:1763
+#: src/main/platform.c:1769
 #, c-format
 msgid "OS reports request to set locale to \"%s\" cannot be honored"
 msgstr ""
 " ロケールを \"%s\" に設定せよとの OS のレポート要求は受け入れられません "
 
-#: src/main/platform.c:2065
-msgid "'hostname' must be a character vector of length 1"
-msgstr " 'hostname' は長さ 1 の文字ベクトルでなくてはなりません "
-
-#: src/main/platform.c:2071
-#, c-format
-msgid "nsl() was unable to resolve host '%s'"
-msgstr " nsl() 関数はホスト '%s' を解決できませんでした "
-
-#: src/main/platform.c:2078
-msgid "unknown format returned by C function 'gethostbyname'"
-msgstr " C の関数 'gethostbyname' が未知の書式を返しました "
-
-#: src/main/platform.c:2087
-msgid "nsl() is not supported on this platform"
-msgstr " このプラットフォームでは nsl() 関数はサポートされていません "
-
-#: src/main/platform.c:2158
+#: src/main/platform.c:2131
 #, c-format
 msgid "'%s' already exists"
 msgstr " '%s' はすでに存在します "
 
-#: src/main/platform.c:2161
+#: src/main/platform.c:2134
 #, c-format
 msgid "cannot create dir '%s', reason '%s'"
 msgstr " ディレクトリ '%s' を作成できません、理由は '%s' です "
 
-#: src/main/platform.c:2207
+#: src/main/platform.c:2181
 #, c-format
 msgid "'%ls' already exists"
 msgstr " '%ls' はすでに存在します "
 
-#: src/main/platform.c:2211
+#: src/main/platform.c:2183 src/main/platform.c:2189
 #, c-format
 msgid "cannot create dir '%ls', reason '%s'"
 msgstr " ディレクトリ '%ls' を作成できません、理由は '%s' です "
 
-#: src/main/platform.c:2245 src/main/platform.c:2449
+#: src/main/platform.c:2223 src/main/platform.c:2435
 msgid "too deep nesting"
 msgstr " 入れ子が深すぎます "
 
-#: src/main/platform.c:2253 src/main/platform.c:2266 src/main/platform.c:2284
+#: src/main/platform.c:2231 src/main/platform.c:2244 src/main/platform.c:2262
 msgid "over-long path"
 msgstr " 長すぎるパス長 "
 
-#: src/main/platform.c:2273
+#: src/main/platform.c:2251
 #, c-format
 msgid "problem creating directory %ls: %s"
 msgstr " ディレクトリ %ls の作成に問題があります: %s "
 
-#: src/main/platform.c:2293
+#: src/main/platform.c:2271
 #, c-format
 msgid "problem reading dir %ls: %s"
 msgstr " ディレクトリ %ls の作成に問題があります: %s "
 
-#: src/main/platform.c:2304 src/main/platform.c:2465 src/main/platform.c:2478
-#: src/main/platform.c:2498 src/main/platform.c:2520
+#: src/main/platform.c:2282 src/main/platform.c:2451 src/main/platform.c:2464
+#: src/main/platform.c:2484 src/main/platform.c:2506
 msgid "over-long path length"
 msgstr " 長すぎるパス長 "
 
-#: src/main/platform.c:2312
+#: src/main/platform.c:2290
 #, c-format
 msgid "problem copying %ls to %ls: %s"
 msgstr " %ls の %ls へのコピーに問題があります: %s "
 
-#: src/main/platform.c:2487
+#: src/main/platform.c:2473
 #, c-format
 msgid "problem creating directory %s: %s"
 msgstr " ディレクトリ %s の作成に問題があります: %s "
 
-#: src/main/platform.c:2507
+#: src/main/platform.c:2493
 #, c-format
 msgid "problem reading directory %s: %s"
 msgstr " ディレクトリ %s の作成に問題があります: %s "
 
-#: src/main/platform.c:2529
+#: src/main/platform.c:2515
 #, c-format
 msgid "problem copying %s to %s: %s"
 msgstr " %s の %s へのコピーに問題があります: %s "
 
-#: src/main/platform.c:2662
+#: src/main/platform.c:2653
 msgid "'mode' must be of length at least one"
 msgstr " 'mode' の長さは 1 以上でなくてはなりません "
 
-#: src/main/platform.c:2729
+#: src/main/platform.c:2720
 msgid "insufficient OS support on this platform"
 msgstr " このプラットフォームでは不十分な OS のサポートです "
 
@@ -4846,90 +4907,95 @@ msgstr " z 変数の値が全部 NA です "
 msgid "invalid math style encountered"
 msgstr " 数式スタイルが不正です "
 
-#: src/main/plotmath.c:1261 src/main/plotmath.c:1366 src/main/plotmath.c:2664
+#: src/main/plotmath.c:1260 src/main/plotmath.c:1365 src/main/plotmath.c:2654
 msgid "invalid mathematical annotation"
 msgstr " 数式の注釈が不正です "
 
-#: src/main/plotmath.c:1670
+#: src/main/plotmath.c:1669
 msgid "invalid accent"
 msgstr " accent が不正です "
 
-#: src/main/plotmath.c:1964
+#: src/main/plotmath.c:1963
 msgid "invalid group delimiter"
 msgstr " 区切り (delimiter) が不正です "
 
-#: src/main/plotmath.c:1991 src/main/plotmath.c:2137
+#: src/main/plotmath.c:1990 src/main/plotmath.c:2127
 msgid "invalid group specification"
 msgstr " グループの指定が不正です "
 
-#: src/main/plotmath.c:2062
+#: src/main/plotmath.c:2052
 msgid "group is incomplete"
 msgstr " グループが不完全です "
 
-#: src/main/plotmath.c:3190
+#: src/main/plotmath.c:3180
 msgid "Metric information not available for this family/device"
 msgstr " この family/device に対してメトリック情報は利用できません "
 
-#: src/main/print.c:148 src/main/print.c:254
+#: src/main/print.c:140 src/main/print.c:247
 msgid "invalid 'na.print' specification"
 msgstr " 'na.print' の指定が不正です "
 
-#: src/main/print.c:157
+#: src/main/print.c:149
 msgid "invalid row labels"
 msgstr " 行ラベルが不正です "
 
-#: src/main/print.c:159
+#: src/main/print.c:151
 msgid "invalid column labels"
 msgstr " 列ラベルが不正です "
 
-#: src/main/print.c:183
+#: src/main/print.c:176
 msgid "non-function argument to .Internal(print.function(.))"
 msgstr " .Internal(print.function(.)) への関数でない引数です "
 
-#: src/main/print.c:264
+#: src/main/print.c:257
 msgid "'gap' must be non-negative integer"
 msgstr " 'gap' は,非負の整数でなくてはなりません "
 
-#: src/main/print.c:289
+#: src/main/print.c:282
 msgid "invalid 'tryS4' internal argument"
 msgstr " 'tryS4' 内部引数が不正です "
 
-#: src/main/print.c:1028
+#: src/main/print.c:851
+#, fuzzy
+msgid "print buffer overflow"
+msgstr " 入力バッファが溢れました (%d 行) "
+
+#: src/main/print.c:1043
 msgid "invalid character length in 'dblepr'"
 msgstr " 'dblepr' 中の文字列の長さが不正です "
 
-#: src/main/print.c:1046
+#: src/main/print.c:1061
 msgid "invalid character length in 'intpr'"
 msgstr " 'intpr' 中の文字列の長さが不正です "
 
-#: src/main/print.c:1065
+#: src/main/print.c:1080
 msgid "invalid character length in 'realpr'"
 msgstr " 'realpr' 中の文字列の長さが不正です "
 
-#: src/main/print.c:1075
+#: src/main/print.c:1090
 msgid "memory allocation error in 'realpr'"
 msgstr " 'realpr' 中でメモリ確保に失敗しました "
 
-#: src/main/print.c:1091
+#: src/main/print.c:1106
 #, c-format
 msgid "BLAS/LAPACK routine '%6s' gave error code %d"
 msgstr " BLAS/LAPACK 関数 '%6s' はエラーコード %d を返しました "
 
-#: src/main/printarray.c:453
+#: src/main/printarray.c:332
 msgid "too few row labels"
 msgstr " 行ラベルの数が少なすぎます "
 
-#: src/main/printarray.c:455
+#: src/main/printarray.c:334
 msgid "too few column labels"
 msgstr " 列ラベルの数が少なすぎます "
 
-#: src/main/printarray.c:489
+#: src/main/printarray.c:368
 #, c-format
 msgid " [ reached getOption(\"max.print\") -- omitted %d row ]\n"
 msgid_plural " [ reached getOption(\"max.print\") -- omitted %d rows ]\n"
 msgstr[0] " [ reached getOption(\"max.print\") -- %d 行を無視しました ] \n"
 
-#: src/main/printutils.c:613
+#: src/main/printutils.c:710
 msgid "it is not known that wchar_t is Unicode on this platform"
 msgstr ""
 " このプラットフォームでは wchar_t が Unicode であることは知られていません "
@@ -4938,47 +5004,47 @@ msgstr ""
 msgid "argument is not a numeric vector"
 msgstr " 引数が数値ベクトルではありません "
 
-#: src/main/random.c:37
+#: src/main/random.c:39
 msgid "invalid arguments"
 msgstr " 引数 (複数) が不正です "
 
-#: src/main/random.c:93 src/main/random.c:110 src/main/random.c:175
-#: src/main/random.c:201 src/main/random.c:274 src/main/random.c:288
+#: src/main/random.c:95 src/main/random.c:112 src/main/random.c:178
+#: src/main/random.c:204 src/main/random.c:277 src/main/random.c:291
 msgid "NAs produced"
 msgstr " NA が生成されました "
 
-#: src/main/random.c:445
+#: src/main/random.c:438
 msgid "NA in probability vector"
 msgstr " 確率ベクトルに NA が含まれています "
 
-#: src/main/random.c:447
-msgid "non-positive probability"
+#: src/main/random.c:440
+msgid "negative probability"
 msgstr " 確率値が正の値ではありません "
 
-#: src/main/random.c:454
+#: src/main/random.c:447
 msgid "too few positive probabilities"
 msgstr " 正の確率値が少なすぎます "
 
-#: src/main/random.c:491 src/main/random.c:519
+#: src/main/random.c:483 src/main/random.c:511
 msgid "cannot take a sample larger than the population when 'replace = FALSE'"
 msgstr ""
 " 'replace = FALSE' なので、母集団以上の大きさの標本は取ることができません "
 
-#: src/main/random.c:498
+#: src/main/random.c:490
 msgid "incorrect number of probabilities"
 msgstr " 確率値の個数が正しくありません "
 
-#: src/main/random.c:537
+#: src/main/random.c:529
 msgid "n >= 2^31, replace = FALSE is only supported on 64-bit platforms"
 msgstr ""
 " n >= 2^31, replace = FALSE は64ビットプラットフォームでのみサポートされてい"
 "ます "
 
-#: src/main/raw.c:37 src/main/raw.c:273
+#: src/main/raw.c:37 src/main/raw.c:277
 msgid "argument must be a character vector of length 1"
 msgstr " 引数は長さ 1 の文字ベクトルでなくてはなりません "
 
-#: src/main/raw.c:39 src/main/raw.c:275
+#: src/main/raw.c:39 src/main/raw.c:279
 msgid ""
 "argument should be a character vector of length 1\n"
 "all but the first element will be ignored"
@@ -4986,297 +5052,295 @@ msgstr ""
 " 引数は長さ 1 の文字ベクトルである必要があります \n"
 " 最初の要素以外は全て無視されます "
 
-#: src/main/raw.c:53 src/main/raw.c:89 src/main/raw.c:110
+#: src/main/raw.c:53 src/main/raw.c:90 src/main/raw.c:113
 msgid "argument 'x' must be a raw vector"
 msgstr " 引数 'x' は raw ベクトルでなくてはなりません "
 
-#: src/main/raw.c:56 src/main/raw.c:330
+#: src/main/raw.c:56 src/main/raw.c:336
 msgid "argument 'multiple' must be TRUE or FALSE"
 msgstr " 引数 'multiple' は TRUE または FALSE でなければなりません "
 
-#: src/main/raw.c:91
+#: src/main/raw.c:92
 msgid "argument 'shift' must be a small integer"
 msgstr " 引数 'shift' は小さい整数値でなければなりません "
 
-#: src/main/raw.c:129 src/main/raw.c:327
+#: src/main/raw.c:133 src/main/raw.c:333
 msgid "argument 'x' must be an integer vector"
 msgstr " 引数 'x' は整数ベクトルでなくてはなりません "
 
-#: src/main/raw.c:148
+#: src/main/raw.c:153
 msgid "argument 'x' must be raw, integer or logical"
 msgstr " 引数 'x' は raw, 整数もしくは論理型でなくてはなりません "
 
-#: src/main/raw.c:150
-msgid "argument 'type' must be a character string"
-msgstr " 引数 'type' は文字列でなくてはなりません "
-
-#: src/main/raw.c:154
+#: src/main/raw.c:159
 #, c-format
 msgid "argument 'x' must be a multiple of %d long"
 msgstr " 引数 'x' は %d 長の倍数でなければなりません "
 
-#: src/main/raw.c:167 src/main/raw.c:181
+#: src/main/raw.c:172 src/main/raw.c:186
 msgid "argument 'x' must not contain NAs"
 msgstr " 引数 'x' は NA を含んではいけません "
 
-#: src/main/raw.c:285
+#: src/main/raw.c:291
 msgid "invalid UTF-8 string"
 msgstr " 不正な UTF-8 文字列です "
 
-#: src/main/relop.c:202
+#: src/main/relop.c:196
 #, c-format
 msgid "comparison (%d) is possible only for atomic and list types"
 msgstr " 比較 (%d) はアトミックおよびリスト型に対してだけ可能です "
 
-#: src/main/relop.c:207
+#: src/main/relop.c:201
 msgid "comparison is not allowed for expressions"
 msgstr " 式の比較は許されていません "
 
-#: src/main/relop.c:296
+#: src/main/relop.c:293
 msgid "comparison of these types is not implemented"
 msgstr " これらの型の比較は未実装です "
 
-#: src/main/relop.c:509
+#: src/main/relop.c:425
 msgid "invalid comparison with complex values"
 msgstr " 不正な複素値との比較です "
 
-#: src/main/relop.c:767
+#: src/main/relop.c:683
 msgid "'a' and 'b' must have the same type"
 msgstr " 'a' と 'b' は同一の型でなくてはなりません "
 
-#: src/main/saveload.c:200 src/main/saveload.c:205 src/main/saveload.c:214
-#: src/main/saveload.c:223 src/main/saveload.c:232 src/main/saveload.c:241
-#: src/main/saveload.c:245 src/main/saveload.c:254 src/main/saveload.c:1381
-#: src/main/saveload.c:1386 src/main/saveload.c:1430 src/main/saveload.c:1498
-#: src/main/saveload.c:1507 src/main/serialize.c:331 src/main/serialize.c:338
-#: src/main/serialize.c:2388 src/main/serialize.c:2396
+#: src/main/saveload.c:202 src/main/saveload.c:207 src/main/saveload.c:216
+#: src/main/saveload.c:225 src/main/saveload.c:234 src/main/saveload.c:243
+#: src/main/saveload.c:247 src/main/saveload.c:256 src/main/saveload.c:1383
+#: src/main/saveload.c:1388 src/main/saveload.c:1432 src/main/saveload.c:1500
+#: src/main/saveload.c:1509 src/main/serialize.c:354 src/main/serialize.c:361
+#: src/main/serialize.c:374 src/main/serialize.c:378 src/main/serialize.c:405
+#: src/main/serialize.c:421 src/main/serialize.c:2429
+#: src/main/serialize.c:2437
 msgid "read error"
 msgstr " 読み込みエラーです "
 
-#: src/main/saveload.c:332
+#: src/main/saveload.c:334
 msgid "a I read error occurred"
 msgstr " 整数値の入力エラーが起きました "
 
-#: src/main/saveload.c:342
+#: src/main/saveload.c:344
 msgid "a R read error occurred"
 msgstr " 実数値の入力エラーが起きました "
 
-#: src/main/saveload.c:352
+#: src/main/saveload.c:354
 msgid "a C read error occurred"
 msgstr " 文字の入力エラーが起きました "
 
-#: src/main/saveload.c:362
+#: src/main/saveload.c:364
 msgid "a S read error occurred"
 msgstr " 文字列の入力エラーが起きました "
 
-#: src/main/saveload.c:387 src/main/saveload.c:395 src/main/saveload.c:403
-#: src/main/saveload.c:1594 src/main/saveload.c:1602
+#: src/main/saveload.c:389 src/main/saveload.c:397 src/main/saveload.c:405
+#: src/main/saveload.c:1596 src/main/saveload.c:1604
 msgid "a read error occurred"
 msgstr " 入力エラーが起きました "
 
-#: src/main/saveload.c:467
+#: src/main/saveload.c:469
 msgid "unresolved node during restore"
 msgstr " リストア中に解決できないノードがありました "
 
-#: src/main/saveload.c:488
+#: src/main/saveload.c:490
 #, c-format
 msgid "restore compatibility error - no version %d compatibility"
 msgstr " リストア互換性エラー、バージョン %d とは互換性がありません "
 
-#: src/main/saveload.c:572 src/main/saveload.c:645
+#: src/main/saveload.c:574 src/main/saveload.c:647
 msgid "bad SEXP type in data file"
 msgstr " データファイル中に不正な SEXP 型がありました "
 
-#: src/main/saveload.c:586
+#: src/main/saveload.c:588
 msgid "mismatch on types"
 msgstr " 型が一致しません "
 
-#: src/main/saveload.c:607 src/main/saveload.c:1270 src/main/serialize.c:1636
+#: src/main/saveload.c:609 src/main/saveload.c:1272 src/main/serialize.c:1675
 #, c-format
 msgid "unrecognized internal function name \"%s\""
 msgstr " 内部関数 \"%s\" を見つけることができませんでした "
 
-#: src/main/saveload.c:709
+#: src/main/saveload.c:711
 msgid "cannot save file position while restoring data"
 msgstr " データ restore 中はファイル位置をセーブすることはできません "
 
-#: src/main/saveload.c:722
+#: src/main/saveload.c:724
 msgid "cannot restore file position while restoring data"
 msgstr " データ restore 中は,ファイル位置を restore することはできません "
 
-#: src/main/saveload.c:915
+#: src/main/saveload.c:917
 msgid "base namespace is not preserved in version 1 workspaces"
 msgstr " 基本の namespace は version 1 のワークスペースに保存されません "
 
-#: src/main/saveload.c:917
+#: src/main/saveload.c:919
 msgid "cannot save namespace in version 1 workspaces"
 msgstr " バージョン 1 の作業スペースには namespace を保存できません "
 
-#: src/main/saveload.c:919
+#: src/main/saveload.c:921
 msgid ""
 "cannot save environment with locked/active bindings in version 1 workspaces"
 msgstr ""
 " バージョン 1 の作業スペースにはロックされていたり使用中の binding を含んだ作"
 "業環境を保存できません "
 
-#: src/main/saveload.c:943
+#: src/main/saveload.c:945
 msgid "cannot save weak references in version 1 workspaces"
 msgstr " バージョン 1 の作業スペースには weak reference を保存できません "
 
-#: src/main/saveload.c:1021
+#: src/main/saveload.c:1023
 msgid "NewWriteVec called with non-vector type"
 msgstr " ベクトル型でないものを用いて NewWriteVec が呼ばれました "
 
-#: src/main/saveload.c:1084
+#: src/main/saveload.c:1086
 msgid "cannot save byte code objects in version 1 workspaces"
 msgstr ""
 " バージョン 1 の作業スペースにはバイトコードのオブジェクトは保存できません "
 
-#: src/main/saveload.c:1086
+#: src/main/saveload.c:1088
 #, c-format
 msgid "NewWriteItem: unknown type %i"
 msgstr " NewWriteItem: 未知の型 %i です "
 
-#: src/main/saveload.c:1216
+#: src/main/saveload.c:1218
 msgid "NewReadVec called with non-vector type"
 msgstr " ベクトル型でないものを用いて NewReadVec が呼ばれました "
 
-#: src/main/saveload.c:1286
+#: src/main/saveload.c:1288
 msgid "cannot read byte code objects from version 1 workspaces"
 msgstr ""
 " varsion 1 のワークスペースからはバイトコードオブジェクトを読み込むことはでき"
 "ません "
 
-#: src/main/saveload.c:1288
+#: src/main/saveload.c:1290
 #, c-format
 msgid "NewReadItem: unknown type %i"
 msgstr " NewReadItem: 未知の型 %i です "
 
-#: src/main/saveload.c:1440
+#: src/main/saveload.c:1442
 msgid "out of memory reading ascii string"
 msgstr " ascii 文字列を読んでいる途中でメモリが尽きました "
 
-#: src/main/saveload.c:1565
+#: src/main/saveload.c:1567
 msgid "a binary read error occurred"
 msgstr " バイナリ値の入力エラーが起きました "
 
-#: src/main/saveload.c:1580 src/main/saveload.c:1681
+#: src/main/saveload.c:1582 src/main/saveload.c:1683
 msgid "out of memory reading binary string"
 msgstr " バイナリ文字列を読んでいる途中でメモリが尽きました "
 
-#: src/main/saveload.c:1585
+#: src/main/saveload.c:1587
 msgid "a binary string read error occurred"
 msgstr " バイナリ文字列の入力エラーが起きました "
 
-#: src/main/saveload.c:1645
+#: src/main/saveload.c:1647
 msgid "an xdr integer data write error occurred"
 msgstr " xdr 整数データの出力エラーが起きました "
 
-#: src/main/saveload.c:1652
+#: src/main/saveload.c:1654
 msgid "an xdr integer data read error occurred"
 msgstr " xdr 整数データの入力エラーが起きました "
 
-#: src/main/saveload.c:1667 src/main/saveload.c:1686
+#: src/main/saveload.c:1669 src/main/saveload.c:1688
 msgid "an xdr string data write error occurred"
 msgstr " xdr 文字列データの出力エラーが起きました "
 
-#: src/main/saveload.c:1694
+#: src/main/saveload.c:1696
 msgid "an xdr real data write error occurred"
 msgstr " xdr 実数データの出力エラーが起きました "
 
-#: src/main/saveload.c:1701
+#: src/main/saveload.c:1703
 msgid "an xdr real data read error occurred"
 msgstr " xdr 実数データの入力エラーが起きました "
 
-#: src/main/saveload.c:1708
+#: src/main/saveload.c:1710
 msgid "an xdr complex data write error occurred"
 msgstr " xdr 複素数データの出力エラーが起きました "
 
-#: src/main/saveload.c:1715
+#: src/main/saveload.c:1717
 msgid "an xdr complex data read error occurred"
 msgstr " xdr 複素数データの入力エラーが起きました "
 
-#: src/main/saveload.c:1783 src/main/serialize.c:1958
-#: src/main/serialize.c:2568 src/modules/internet/internet.c:351
-#: src/modules/internet/internet.c:409 src/modules/internet/internet.c:514
+#: src/main/saveload.c:1785 src/main/serialize.c:1997
+#: src/main/serialize.c:2614 src/modules/internet/internet.c:514
+#: src/modules/internet/internet.c:590 src/modules/internet/internet.c:701
 msgid "write failed"
 msgstr " 書き込みに失敗しました "
 
-#: src/main/saveload.c:1910
+#: src/main/saveload.c:1912
 msgid "restore file may be empty -- no data loaded"
 msgstr ""
 " リストアしようとしたファイルは空の可能性、データは読み込まれませんでした "
 
-#: src/main/saveload.c:1912
+#: src/main/saveload.c:1914
 msgid "restore file may be from a newer version of R -- no data loaded"
 msgstr ""
 " リストアしようとしたファイルは R の新しいバージョンのものと思われます。デー"
 "タは読み込まれません "
 
-#: src/main/saveload.c:1914
+#: src/main/saveload.c:1916
 msgid "bad restore file magic number (file may be corrupted) -- no data loaded"
 msgstr ""
 " ファイルのマジック・ナンバーが不正です (ファイルが壊れているかもしれませ"
 "ん)。データはロードされませんでした "
 
-#: src/main/saveload.c:1940 src/main/saveload.c:2238
+#: src/main/saveload.c:1942 src/main/saveload.c:2240
 msgid "first argument must be a character vector"
 msgstr " 最初の引数は文字ベクトルでなくてはなりません "
 
-#: src/main/saveload.c:2012
+#: src/main/saveload.c:2014
 msgid "not a valid named list"
 msgstr " 適切な名前付きリストではありません "
 
-#: src/main/saveload.c:2019 src/main/saveload.c:2040
+#: src/main/saveload.c:2021 src/main/saveload.c:2042
 #, c-format
 msgid "'%s' looks like a pre-2.4.0 S4 object: please recreate it"
 msgstr ""
 " '%s' はバージョン 2.4.0 以前の S4 オブジェクトのようですので作り直してくださ"
 "い "
 
-#: src/main/saveload.c:2027
+#: src/main/saveload.c:2029
 msgid "loaded data is not in pair list form"
 msgstr " ロードされたデータはペアリストの形式ではありません "
 
-#: src/main/saveload.c:2063
+#: src/main/saveload.c:2065
 msgid "first argument must be a file name"
 msgstr " 最初の引数はファイル名でなくてはなりません "
 
-#: src/main/saveload.c:2108 src/main/saveload.c:2134 src/main/serialize.c:826
-#: src/main/serialize.c:863 src/main/serialize.c:901
+#: src/main/saveload.c:2110 src/main/saveload.c:2136 src/main/serialize.c:864
+#: src/main/serialize.c:901 src/main/serialize.c:939
 msgid "XDR write failed"
 msgstr " XDR 書式での書き出しに失敗しました "
 
-#: src/main/saveload.c:2121 src/main/saveload.c:2146 src/main/serialize.c:1362
-#: src/main/serialize.c:1398 src/main/serialize.c:1436
+#: src/main/saveload.c:2123 src/main/saveload.c:2148 src/main/serialize.c:1400
+#: src/main/serialize.c:1436 src/main/serialize.c:1474
 msgid "XDR read failed"
 msgstr " XDR 書式での読み込みに失敗しました "
 
-#: src/main/saveload.c:2157
+#: src/main/saveload.c:2159
 #, c-format
 msgid "cannot save data -- unable to open '%s': %s"
 msgstr " データをセーブできません -- '%s' を開けません: %s "
 
-#: src/main/saveload.c:2254 src/main/serialize.c:2161
+#: src/main/saveload.c:2256 src/main/serialize.c:2202
 #, c-format
 msgid "cannot save to connections in version %d format"
 msgstr " バージョン %d 書式ではコネクションに保存できません "
 
-#: src/main/saveload.c:2277 src/main/serialize.c:2186
+#: src/main/saveload.c:2279 src/main/serialize.c:2227
 msgid "connection not open for writing"
 msgstr " コネクションは書き出しのために開かれていません "
 
-#: src/main/saveload.c:2285
+#: src/main/saveload.c:2288
 msgid "cannot save XDR format to a text-mode connection"
 msgstr " テキストモードのコネクションには XDR 書式では保存できません "
 
-#: src/main/saveload.c:2295 src/main/serialize.c:2066
-#: src/main/serialize.c:2080 src/main/serialize.c:2262
-#: src/main/serialize.c:2284
+#: src/main/saveload.c:2298 src/main/serialize.c:2105
+#: src/main/serialize.c:2119 src/main/serialize.c:2303
+#: src/main/serialize.c:2325
 msgid "error writing to connection"
 msgstr " コネクションへの書き込みエラーが発生しました "
 
-#: src/main/saveload.c:2359 src/main/serialize.c:2234
+#: src/main/saveload.c:2359 src/main/serialize.c:2275
 msgid "connection not open for reading"
 msgstr " コネクションは読み込みのために開かれていません "
 
@@ -5305,7 +5369,7 @@ msgstr " クオートで囲まれた文字列中にEOFがあります "
 msgid "scan() expected '%s', got '%s'"
 msgstr " scan() 関数は '%s' を期待したのに、得られたのは '%s' でした "
 
-#: src/main/scan.c:585 src/main/scan.c:732
+#: src/main/scan.c:585 src/main/scan.c:735
 msgid "too many items"
 msgstr " 項目の数が多すぎます "
 
@@ -5313,7 +5377,7 @@ msgstr " 項目の数が多すぎます "
 msgid "empty 'what' specified"
 msgstr " 空の 'what' が指定されました "
 
-#: src/main/scan.c:722
+#: src/main/scan.c:725
 #, c-format
 msgid "line %d did not have %d elements"
 msgstr " %d 行目には %d 個の要素がありません "
@@ -5342,149 +5406,150 @@ msgstr " 不正な小数点文字です "
 msgid "invalid quote symbol set"
 msgstr " 引用符が不正です "
 
-#: src/main/scan.c:987
+#: src/main/scan.c:988
 msgid "embedded nul(s) found in input"
 msgstr " 入力文字列の中に nul が埋め込まれています "
 
-#: src/main/seq.c:48
+#: src/main/seq.c:49
 msgid "unequal factor lengths"
 msgstr " 因子の長さが異なります "
 
-#: src/main/seq.c:100
+#: src/main/seq.c:101
 msgid "result would be too long a vector"
 msgstr " 結果のベクトルが長すぎます "
 
-#: src/main/seq.c:159
+#: src/main/seq.c:160
 msgid "argument of length 0"
 msgstr " 引数の長さが 0 です "
 
-#: src/main/seq.c:161 src/main/seq.c:163
+#: src/main/seq.c:163 src/main/seq.c:168
 #, c-format
-msgid "numerical expression has %d elements: only the first used"
-msgstr " 数値演算式は %d 個の要素を持っています: 最初の要素だけが使われました "
+msgid "numerical expression has %d element: only the first used"
+msgid_plural "numerical expression has %d elements: only the first used"
+msgstr[0] " 数値式は %d 個の要素を持っています: 最初の要素だけが使われました "
 
-#: src/main/seq.c:167
+#: src/main/seq.c:174
 msgid "NA/NaN argument"
 msgstr " 引数が NA/NaN です "
 
-#: src/main/seq.c:331
+#: src/main/seq.c:333
 msgid "incorrect type for second argument"
 msgstr " 二番目の引数の型が不正確です "
 
-#: src/main/seq.c:334
+#: src/main/seq.c:336
 #, c-format
 msgid "attempt to replicate an object of type '%s'"
 msgstr " 型 '%s' のオブジェクトを複製しようとしました "
 
-#: src/main/seq.c:387
+#: src/main/seq.c:393
 msgid "attempt to replicate non-vector"
 msgstr " ベクトルでないものを複製しようとしました "
 
-#: src/main/seq.c:403
+#: src/main/seq.c:409
 msgid "cannot replicate NULL to a non-zero length"
 msgstr " NULL をゼロ長でないものに複製できません "
 
-#: src/main/seq.c:626 src/main/seq.c:633 src/main/seq.c:768 src/main/seq.c:979
+#: src/main/seq.c:630 src/main/seq.c:637 src/main/seq.c:766 src/main/seq.c:977
 #, c-format
 msgid "first element used of '%s' argument"
 msgstr " '%s' 引数の最初の要素だけが使われました "
 
-#: src/main/seq.c:766
+#: src/main/seq.c:764
 msgid "'length.out' must be a non-negative number"
 msgstr " 'length.out' は非負の数値でなくてはなりません "
 
-#: src/main/seq.c:790 src/main/seq.c:856 src/main/seq.c:873
+#: src/main/seq.c:788 src/main/seq.c:854 src/main/seq.c:871
 msgid "'from' must be finite"
 msgstr " 'from' は有限な値でなければなりません "
 
-#: src/main/seq.c:792 src/main/seq.c:858 src/main/seq.c:895
+#: src/main/seq.c:790 src/main/seq.c:856 src/main/seq.c:893
 msgid "'to' must be finite"
 msgstr " 'to' は有限な値でなければなりません "
 
-#: src/main/seq.c:804
+#: src/main/seq.c:802
 msgid "invalid '(to - from)/by' in 'seq'"
 msgstr " 'seq' 中に不正な '(to - from)/by' "
 
-#: src/main/seq.c:816
+#: src/main/seq.c:814
 msgid "'by' argument is much too small"
 msgstr " 'by' 引数があまりに小さすぎます "
 
-#: src/main/seq.c:818
+#: src/main/seq.c:816
 msgid "wrong sign in 'by' argument"
 msgstr " 'by' 引数中に誤った符号 "
 
-#: src/main/seq.c:875 src/main/seq.c:897
+#: src/main/seq.c:873 src/main/seq.c:895
 msgid "'by' must be finite"
 msgstr " 'by' は有限でなければなりません "
 
-#: src/main/seq.c:985 src/main/seq.c:990
+#: src/main/seq.c:983 src/main/seq.c:988
 msgid "argument must be coercible to non-negative integer"
 msgstr " 引数は非負の整数に変換できなければなりません "
 
-#: src/main/serialize.c:224 src/main/serialize.c:254 src/main/serialize.c:277
+#: src/main/serialize.c:228 src/main/serialize.c:275 src/main/serialize.c:299
 msgid "unknown or inappropriate output format"
 msgstr " 未知または不適切な出力書式です "
 
-#: src/main/serialize.c:504
+#: src/main/serialize.c:542
 msgid "must specify ascii, binary, or xdr format"
 msgstr " ascii, binari または xdr 書式を指定して下さい "
 
-#: src/main/serialize.c:505
+#: src/main/serialize.c:543
 msgid "unknown output format"
 msgstr " 未知の出力書式です "
 
-#: src/main/serialize.c:536
+#: src/main/serialize.c:574
 msgid "unknown input format"
 msgstr " 未知の入力書式です "
 
-#: src/main/serialize.c:541
+#: src/main/serialize.c:579
 msgid "input format does not match specified format"
 msgstr " 指定された書式と入力書式がマッチしません "
 
-#: src/main/serialize.c:752
+#: src/main/serialize.c:790
 msgid "no restore method available"
 msgstr " 復帰のためのメソッドがありません "
 
-#: src/main/serialize.c:794
+#: src/main/serialize.c:832
 msgid "names in persistent strings are currently ignored"
 msgstr " 名前に対する永続的な文字列は、今のところ無視されます "
 
-#: src/main/serialize.c:963
+#: src/main/serialize.c:1001
 #, c-format
 msgid "'%s' may not be available when loading"
 msgstr " '%s' はロード時には使えない可能性があります "
 
-#: src/main/serialize.c:970
+#: src/main/serialize.c:1008
 msgid "namespaces may not be available when loading"
 msgstr " ロード中はネームスペースは使えないかもしれません "
 
-#: src/main/serialize.c:1097
+#: src/main/serialize.c:1136
 #, c-format
 msgid "WriteItem: unknown type %i"
 msgstr " WriteItem: 未知の型 %i です "
 
-#: src/main/serialize.c:1273
+#: src/main/serialize.c:1312
 #, c-format
 msgid "version %d not supported"
 msgstr " バージョン %d はサポートしていません "
 
-#: src/main/serialize.c:1305
+#: src/main/serialize.c:1343
 msgid "reference index out of range"
 msgstr " 参照添字が範囲外です "
 
-#: src/main/serialize.c:1335
+#: src/main/serialize.c:1373
 msgid "names in persistent strings are not supported yet"
 msgstr " 名前に対する永続的な文字列は、まだサポートされていません "
 
-#: src/main/serialize.c:1463
+#: src/main/serialize.c:1501
 msgid "negative serialized length for vector"
 msgstr " ベクトルのシリアル化長が負です "
 
-#: src/main/serialize.c:1471
+#: src/main/serialize.c:1509
 msgid "invalid upper part of serialized vector length"
 msgstr " 不正なシリアル化されたベクトル長の上部 "
 
-#: src/main/serialize.c:1476
+#: src/main/serialize.c:1514
 msgid ""
 "negative serialized vector length:\n"
 "perhaps long vector from 64-bit version of R?"
@@ -5492,20 +5557,20 @@ msgstr ""
 " 負のシリアル化ベクトル長: \n"
 " おそらく R の 64 ビット版からのロングベクトル? "
 
-#: src/main/serialize.c:1707
+#: src/main/serialize.c:1746
 msgid "this version of R cannot read class references"
 msgstr " このバージョンの R ではクラス参照は読めません "
 
-#: src/main/serialize.c:1709
+#: src/main/serialize.c:1748
 msgid "this version of R cannot read generic function references"
 msgstr " このバージョンの R では総称関数参照は読めません "
 
-#: src/main/serialize.c:1726
+#: src/main/serialize.c:1765
 #, c-format
 msgid "ReadItem: unknown type %i, perhaps written by later version of R"
 msgstr " ReadItem: 恐らく R の後のバージョンによって書かれた未知のタイプ%i "
 
-#: src/main/serialize.c:1882
+#: src/main/serialize.c:1921
 #, c-format
 msgid ""
 "cannot read unreleased workspace version %d written by experimental R %d.%d."
@@ -5514,7 +5579,7 @@ msgstr ""
 " 試行的な R %2$d.%3$d.%4$d で書かれた未公開バージョン %1$d の作業スペースを読"
 "み取ることができません "
 
-#: src/main/serialize.c:1886
+#: src/main/serialize.c:1925
 #, c-format
 msgid ""
 "cannot read workspace version %d written by R %d.%d.%d; need R %d.%d.%d or "
@@ -5523,83 +5588,83 @@ msgstr ""
 " R %2$d.%3$d.%4$d により書かれたバージョン %1$d のワークスペースを読み取るこ"
 "とができません。R %5$d.%6$d.%7$d もしくはそれ以上が必要です "
 
-#: src/main/serialize.c:1965
+#: src/main/serialize.c:2004
 msgid "read failed"
 msgstr " 読み込みに失敗しました "
 
-#: src/main/serialize.c:2028
+#: src/main/serialize.c:2067
 msgid "error reading from ascii connection"
 msgstr " ascii コネクションからの読み取りエラーが発生しました "
 
-#: src/main/serialize.c:2030
+#: src/main/serialize.c:2069
 msgid "unexpected format in ascii connection"
 msgstr " この ascii コネクションから読み込みできません "
 
-#: src/main/serialize.c:2035 src/main/serialize.c:2049
+#: src/main/serialize.c:2074 src/main/serialize.c:2088
 msgid "error reading from connection"
 msgstr " コネクションからの読み取りエラーが発生しました "
 
-#: src/main/serialize.c:2090
+#: src/main/serialize.c:2130
 msgid "only ascii format can be written to text mode connections"
 msgstr " テキストモードコネクションには ascii フォーマットだけが書き込めます "
 
-#: src/main/serialize.c:2104
+#: src/main/serialize.c:2144
 msgid "only ascii format can be read from text mode connections"
 msgstr ""
 " テキストモードコネクションからは ascii フォーマットだけが読み込めめます "
 
-#: src/main/serialize.c:2159 src/main/serialize.c:2312
-#: src/main/serialize.c:2461
+#: src/main/serialize.c:2200 src/main/serialize.c:2353
+#: src/main/serialize.c:2502
 msgid "bad version value"
 msgstr " 不適切なバージョン値です "
 
-#: src/main/serialize.c:2184
+#: src/main/serialize.c:2225
 msgid "binary-mode connection required for ascii=FALSE"
 msgstr " ascii=FALSE に大してはバイナリコネクションが必要です "
 
-#: src/main/serialize.c:2340 src/main/serialize.c:2377
-#: src/main/serialize.c:2440
+#: src/main/serialize.c:2381 src/main/serialize.c:2418
+#: src/main/serialize.c:2481
 msgid "serialization is too large to store in a raw vector"
 msgstr " 線形化 (serialization) は raw ベクトルに保管するには大きすぎます "
 
-#: src/main/serialize.c:2357
+#: src/main/serialize.c:2398
 msgid "cannot allocate buffer"
 msgstr " バッファを割り当てることができません "
 
-#: src/main/serialize.c:2546 src/main/serialize.c:2619
+#: src/main/serialize.c:2592 src/main/serialize.c:2665
 msgid "not a proper file name"
 msgstr " ファイル名が不適切です "
 
-#: src/main/serialize.c:2548
+#: src/main/serialize.c:2594
 msgid "not a proper raw vector"
 msgstr " 適正な raw ベクトルではありません "
 
-#: src/main/serialize.c:2569
+#: src/main/serialize.c:2615
 msgid "could not determine file position"
 msgstr " ファイルの位置を決定できませんでした "
 
-#: src/main/serialize.c:2621
+#: src/main/serialize.c:2667
 msgid "bad offset/length argument"
 msgstr " オフセット/長さ引数が不正です "
 
-#: src/main/serialize.c:2645 src/main/serialize.c:2658
-#: src/main/serialize.c:2667 src/main/serialize.c:2677
-#: src/main/serialize.c:2690
+#: src/main/serialize.c:2691 src/main/serialize.c:2704
+#: src/main/serialize.c:2713 src/main/serialize.c:2723
+#: src/main/serialize.c:2736
 #, c-format
 msgid "seek failed on %s"
 msgstr " %s でシークに失敗しました "
 
-#: src/main/serialize.c:2662 src/main/serialize.c:2671
-#: src/main/serialize.c:2681 src/main/serialize.c:2694
+#: src/main/serialize.c:2708 src/main/serialize.c:2717
+#: src/main/serialize.c:2727 src/main/serialize.c:2740
 #, c-format
 msgid "read failed on %s"
 msgstr " %s で読み込みに失敗しました "
 
-#: src/main/serialize.c:2713
+#: src/main/serialize.c:2759
 msgid "bad environment"
 msgstr " 不正な環境です "
 
-#: src/main/serialize.c:2715
+#: src/main/serialize.c:2761
 msgid "bad variable names"
 msgstr " 不適切な変数名です "
 
@@ -5607,167 +5672,163 @@ msgstr " 不適切な変数名です "
 msgid "only atomic vectors can be tested to be sorted"
 msgstr " 並べ替えできるか検査できるのはアトミックベクトルだけです "
 
-#: src/main/sort.c:326 src/main/sort.c:1228 src/main/sort.c:1396
+#: src/main/sort.c:325 src/main/sort.c:1248
 msgid "'decreasing' must be TRUE or FALSE"
 msgstr " 'decreasing' は TRUE か FALSE でなければなりません "
 
-#: src/main/sort.c:329 src/main/sort.c:600
+#: src/main/sort.c:328 src/main/sort.c:599
 msgid "only atomic vectors can be sorted"
 msgstr " 並べ替えできるのはアトミックベクトルだけです "
 
-#: src/main/sort.c:331 src/main/sort.c:602 src/main/sort.c:1297
+#: src/main/sort.c:330 src/main/sort.c:601 src/main/sort.c:1317
 msgid "raw vectors cannot be sorted"
 msgstr " raw 型オブジェクトのベクトルはソートできません "
 
-#: src/main/sort.c:613
+#: src/main/sort.c:612
 msgid "NA or infinite index"
 msgstr " 添え字が NA または無限大です "
 
-#: src/main/sort.c:616
+#: src/main/sort.c:615
 #, c-format
 msgid "index %ld outside bounds"
 msgstr " 添え字 %ld は範囲外です "
 
-#: src/main/sort.c:621 src/main/sort.c:634
+#: src/main/sort.c:620 src/main/sort.c:633
 msgid "NA index"
 msgstr " 添え字が NA です "
 
-#: src/main/sort.c:623 src/main/sort.c:636
+#: src/main/sort.c:622 src/main/sort.c:635
 #, c-format
 msgid "index %d outside bounds"
 msgstr " 添え字 %d が範囲外です "
 
-#: src/main/sort.c:1237
+#: src/main/sort.c:1257
 #, c-format
 msgid "argument %d is not a vector"
 msgstr " 引数 %d がベクトルではありません "
 
-#: src/main/sort.c:1239
+#: src/main/sort.c:1259
 msgid "argument lengths differ"
 msgstr " 引数の長さが異なります "
 
-#: src/main/sort.c:1324
+#: src/main/sort.c:1344
 msgid "invalid ties.method for rank() [should never happen]"
 msgstr ""
 " rank() 関数の ties.method が不正です [このようなことは決して起こらないはずで"
 "す] "
 
-#: src/main/sort.c:1429
-msgid "too large a range of values in 'x'"
-msgstr " 'x' 中の値の範囲が大きすぎます "
-
-#: src/main/source.c:215
+#: src/main/source.c:220
 msgid "coercion of 'text' to character was unsuccessful"
 msgstr " 'text' から文字列への変換に失敗しました "
 
-#: src/main/source.c:231
+#: src/main/source.c:236
 #, c-format
 msgid "argument '%s = \"%s\"' will be ignored"
 msgstr " 引数 '%s= \"%s\"' は無視されます "
 
-#: src/main/split.c:38
+#: src/main/split.c:39
 msgid "first argument must be a vector"
 msgstr " 最初の引数はベクトルでなくてはなりません "
 
-#: src/main/split.c:40
+#: src/main/split.c:41
 msgid "second argument must be a factor"
 msgstr " 二番目の引数は因子でなければなりません "
 
-#: src/main/split.c:45
+#: src/main/split.c:46
 msgid "group length is 0 but data length > 0"
 msgstr " グループ長が 0 ですが、データ長は > 0 です "
 
-#: src/main/split.c:47
+#: src/main/split.c:48
 msgid "data length is not a multiple of split variable"
 msgstr " データの長さが分割変数の倍数ではありません "
 
-#: src/main/split.c:56
+#: src/main/split.c:58
 msgid "factor has bad level"
 msgstr "  因子が不正な水準を持ちます "
 
-#: src/main/sprintf.c:94
+#: src/main/sprintf.c:97
 #, c-format
 msgid "required resulting string length %d is greater than maximal %d"
 msgstr " 要求された結果の文字列長 %d が上限 %d を超えています "
 
-#: src/main/sprintf.c:102
+#: src/main/sprintf.c:105
 msgid "'fmt' is not a character vector"
 msgstr " 'fmt' は文字ベクトルではありません "
 
-#: src/main/sprintf.c:107
+#: src/main/sprintf.c:110
 #, c-format
 msgid "only %d arguments are allowed"
 msgstr " %d 引数だけが許されます "
 
-#: src/main/sprintf.c:114
+#: src/main/sprintf.c:117
 #, c-format
 msgid "invalid type of argument[%d]: '%s'"
 msgstr " 不正な型の引数 [%d]: '%s' "
 
-#: src/main/sprintf.c:125 src/main/sprintf.c:128
+#: src/main/sprintf.c:128 src/main/sprintf.c:131
 msgid "arguments cannot be recycled to the same length"
 msgstr " 引数は同じ長さにリサイクルできません "
 
-#: src/main/sprintf.c:150 src/main/sprintf.c:257
+#: src/main/sprintf.c:153 src/main/sprintf.c:260
 #, c-format
 msgid "'fmt' length exceeds maximal format length %d"
 msgstr " 'fmt' の長さが書式の最大長 %d を超えました "
 
-#: src/main/sprintf.c:169
+#: src/main/sprintf.c:172
 #, c-format
 msgid "unrecognised format specification '%s'"
 msgstr " 理解不能なフォーマット指定 '%s' "
 
-#: src/main/sprintf.c:180 src/main/sprintf.c:186 src/main/sprintf.c:199
-#: src/main/sprintf.c:206
+#: src/main/sprintf.c:183 src/main/sprintf.c:189 src/main/sprintf.c:202
+#: src/main/sprintf.c:209
 #, c-format
 msgid "reference to non-existent argument %d"
 msgstr " 存在しない引数 %d を参照しました "
 
-#: src/main/sprintf.c:218
+#: src/main/sprintf.c:221
 msgid "at most one asterisk '*' is supported in each conversion specification"
 msgstr " それぞれの変換で指定できるアスタリスク'*'は最大でひとつです。 "
 
-#: src/main/sprintf.c:228
+#: src/main/sprintf.c:231
 msgid "argument for '*' conversion specification must be a number"
 msgstr " '*' 変換指定に対する引数は数値でなければなりません "
 
-#: src/main/sprintf.c:266
+#: src/main/sprintf.c:269
 msgid "coercion has changed vector length to 0"
 msgstr " 変換によりベクトルの長さが 0 になりました "
 
-#: src/main/sprintf.c:339 src/main/sprintf.c:353 src/main/sprintf.c:367
-#: src/main/sprintf.c:402
+#: src/main/sprintf.c:343 src/main/sprintf.c:357 src/main/sprintf.c:371
+#: src/main/sprintf.c:406
 #, c-format
 msgid "invalid format '%s'; %s"
 msgstr " 不正な書式 '%s'; %s "
 
-#: src/main/sprintf.c:340
+#: src/main/sprintf.c:344
 #, c-format
 msgid "use format %d or %i for logical objects"
 msgstr " 論理オブジェクトには %d か %i 書式を使ってください "
 
-#: src/main/sprintf.c:354
+#: src/main/sprintf.c:358
 #, c-format
 msgid "use format %d, %i, %o, %x or %X for integer objects"
 msgstr " 整数オブジェクトには %d, %i, %o, %x または %X 書式を使ってください "
 
-#: src/main/sprintf.c:368
+#: src/main/sprintf.c:372
 #, c-format
 msgid "use format %f, %e, %g or %a for numeric objects"
 msgstr " 数値オブジェクトには %f, %e, %g または %a 書式を使ってください "
 
-#: src/main/sprintf.c:403
+#: src/main/sprintf.c:407
 #, c-format
 msgid "use format %s for character objects"
 msgstr " 文字オブジェクトには %s 書式を使ってください "
 
-#: src/main/sprintf.c:408
+#: src/main/sprintf.c:412
 #, c-format
 msgid "likely truncation of character string to %d characters"
 msgstr " 文字列は %d 文字に丸められた可能性があります "
 
-#: src/main/sprintf.c:417
+#: src/main/sprintf.c:421
 msgid "unsupported type"
 msgstr " サポートされていないタイプです "
 
@@ -5775,383 +5836,388 @@ msgstr " サポートされていないタイプです "
 msgid "R_LibraryFileName: buffer too small"
 msgstr " R_LibraryFileName: バッファーが小さすぎます "
 
-#: src/main/subassign.c:117
+#: src/main/subassign.c:118
 msgid "attempt to enlarge non-vector"
 msgstr " ベクトルでないものを拡張しようとしました "
 
-#: src/main/subassign.c:122
+#: src/main/subassign.c:123
 #, c-format
 msgid "assignment outside vector/list limits (extending from %d to %d)"
 msgstr " ベクトル/リストの範囲外への付置 (%d から %d へ拡大) "
 
-#: src/main/subassign.c:367
+#: src/main/subassign.c:391
 #, c-format
 msgid "incompatible types (from %s to %s) in subassignment type fix"
 msgstr ""
 " 部分代入における型のフィックスにおいて,両立しない型です (%s から %s) "
 
-#: src/main/subassign.c:502 src/main/subassign.c:782 src/main/subassign.c:785
-#: src/main/subassign.c:1076
+#: src/main/subassign.c:550 src/main/subassign.c:830 src/main/subassign.c:833
+#: src/main/subassign.c:1133
 msgid "NAs are not allowed in subscripted assignments"
 msgstr " 添え字付きの付値で NA は許されていません "
 
-#: src/main/subassign.c:520 src/main/subassign.c:796 src/main/subassign.c:1068
-#: src/main/subassign.c:1641
+#: src/main/subassign.c:568 src/main/subassign.c:844 src/main/subassign.c:1125
+#: src/main/subassign.c:1705
 msgid "replacement has length zero"
 msgstr " replacement (置き換え) の長さが 0 です "
 
-#: src/main/subassign.c:522 src/main/subassign.c:798 src/main/subassign.c:1070
+#: src/main/subassign.c:570 src/main/subassign.c:846 src/main/subassign.c:1127
 msgid "number of items to replace is not a multiple of replacement length"
 msgstr " 置き換えるべき項目数が、置き換える数の倍数ではありませんでした "
 
-#: src/main/subassign.c:766
+#: src/main/subassign.c:814
 msgid "incorrect number of subscripts on matrix"
 msgstr " 行列への添え字の数が正しくありません "
 
-#: src/main/subassign.c:1022
+#: src/main/subassign.c:1079
 #, c-format
 msgid "incompatible types (from %s to %s) in matrix subset assignment"
 msgstr " 行列への部分代入で両立しない型です (%s から %s) "
 
-#: src/main/subassign.c:1038 src/main/subset.c:928
+#: src/main/subassign.c:1095 src/main/subset.c:957
 msgid "incorrect number of subscripts"
 msgstr " 添え字の数が正しくありません "
 
-#: src/main/subassign.c:1214
+#: src/main/subassign.c:1272
 #, c-format
 msgid "incompatible types (from %s to %s) in array subset assignment"
 msgstr " 配列の部分代入に両立しない型があります (%s から %s) "
 
-#: src/main/subassign.c:1249 src/main/subassign.c:1270
+#: src/main/subassign.c:1308 src/main/subassign.c:1329
 msgid "invalid subscript in list assign"
 msgstr " リストへの付値の添字が不正です "
 
-#: src/main/subassign.c:1263
+#: src/main/subassign.c:1322
 msgid "invalid number of subscripts to list assign"
 msgstr " リストへの付値の添字の個数が不正です "
 
-#: src/main/subassign.c:1361
+#: src/main/subassign.c:1421
 msgid "SubAssignArgs: invalid number of arguments"
 msgstr " SubAssignArgs: 引数の個数が違います "
 
-#: src/main/subassign.c:1506
+#: src/main/subassign.c:1566
 msgid "result is zero-length and so cannot be a language object"
 msgstr " 結果は、ゼロ長であり、言語オブジェクトではありません "
 
-#: src/main/subassign.c:1611
+#: src/main/subassign.c:1665
 msgid ""
 "[[<- defined for objects of type \"S4\" only for subclasses of environment"
 msgstr ""
 " 環境のサブクラスに対する [[<- は、\"S4\" 型のオブジェクトに対してのみ定義さ"
 "れています "
 
-#: src/main/subassign.c:1617
+#: src/main/subassign.c:1677
 msgid "wrong args for environment subassignment"
 msgstr " subassignment 環境に対する誤った引数です "
 
-#: src/main/subassign.c:1643
+#: src/main/subassign.c:1707
 msgid "more elements supplied than there are to replace"
 msgstr " 置き換えられる個数よりも多くの要素が与えられました "
 
-#: src/main/subassign.c:1645
+#: src/main/subassign.c:1709
 msgid "[[ ]] with missing subscript"
 msgstr " [[ ]] の添え字がありません "
 
-#: src/main/subassign.c:1657 src/main/subassign.c:1675
+#: src/main/subassign.c:1727 src/main/subassign.c:1745
 msgid "[[ ]] subscript out of bounds"
 msgstr " [[ ]] の添え字が範囲外です "
 
-#: src/main/subassign.c:1663 src/main/subassign.c:1841
+#: src/main/subassign.c:1733 src/main/subassign.c:1914
 msgid "[[ ]] improper number of subscripts"
 msgstr " [[ ]] の添え字の個数が不適切です "
 
-#: src/main/subassign.c:1808
+#: src/main/subassign.c:1879
 #, c-format
 msgid "incompatible types (from %s to %s) in [[ assignment"
 msgstr " [[ による代入に両立しない型があります(%s から %s) "
 
-#: src/main/subassign.c:1852
+#: src/main/subassign.c:1925
 #, c-format
 msgid "[[ ]] subscript (%d) out of bounds"
 msgstr " [[ ]] の添え字 (%d) が範囲外です "
 
-#: src/main/subassign.c:1905 src/main/subscript.c:143 src/main/subscript.c:145
-#: src/main/subscript.c:274 src/main/subscript.c:276 src/main/subscript.c:826
-#: src/main/subscript.c:828 src/main/subscript.c:919 src/main/subscript.c:921
-#: src/main/subset.c:1109
+#: src/main/subassign.c:1986 src/main/subscript.c:151 src/main/subscript.c:278
+#: src/main/subscript.c:903 src/main/subscript.c:996 src/main/subset.c:1176
 #, c-format
 msgid "invalid subscript type '%s'"
 msgstr " 添え字の型 '%s' が不正です "
 
-#: src/main/subassign.c:1950
+#: src/main/subassign.c:2037
 msgid "no method for assigning subsets of this S4 class"
 msgstr " この S4 クラスのサブセットを付値するメソッドはありません "
 
-#: src/main/subassign.c:2008
+#: src/main/subassign.c:2095
 msgid "Coercing LHS to a list"
 msgstr " 左辺をリストに変換しました "
 
-#: src/main/subscript.c:53 src/main/subscript.c:75 src/main/subscript.c:180
-#: src/main/subscript.c:204
-msgid "attempt to select less than one element"
+#: src/main/subscript.c:59 src/main/subscript.c:81 src/main/subscript.c:185
+#: src/main/subscript.c:209
+#, fuzzy, c-format
+msgid "attempt to select less than one element in %s"
 msgstr " 一つ未満の要素を選択しようとしました "
 
-#: src/main/subscript.c:57 src/main/subscript.c:72 src/main/subscript.c:178
-#: src/main/subscript.c:208 src/main/subscript.c:304
-msgid "attempt to select more than one element"
+#: src/main/subscript.c:63 src/main/subscript.c:78 src/main/subscript.c:183
+#: src/main/subscript.c:213 src/main/subscript.c:305
+#, fuzzy, c-format
+msgid "attempt to select more than one element in %s"
 msgstr " 二つ以上の要素を選択しようとしました "
 
-#: src/main/subscript.c:184
+#: src/main/subscript.c:189
 msgid "internal error in use of recursive indexing"
 msgstr " 再帰的インデックスの使用中に、内部エラーが起きました "
 
-#: src/main/subscript.c:252
+#: src/main/subscript.c:257
 #, c-format
 msgid "further partial match of '%s' to '%s'"
 msgstr " '%s' の '%s' への更なる部分マッチ "
 
-#: src/main/subscript.c:302
+#: src/main/subscript.c:303
 #, c-format
 msgid "recursive indexing failed at level %d\n"
 msgstr " 再帰的な添字操作がレベル %d で失敗しました \n"
 
-#: src/main/subscript.c:309
+#: src/main/subscript.c:313
 #, c-format
 msgid "no such index at level %d\n"
 msgstr " レベル %d にはそのようなインデックスはありません \n"
 
-#: src/main/subscript.c:352
+#: src/main/subscript.c:360
 msgid "incorrect number of columns in matrix subscript"
 msgstr " 添え字の数が正しくありません "
 
-#: src/main/subscript.c:371 src/main/subscript.c:389 src/main/subscript.c:413
+#: src/main/subscript.c:379 src/main/subscript.c:397 src/main/subscript.c:421
 msgid "negative values are not allowed in a matrix subscript"
 msgstr " 負の長さのベクトルは許されません "
 
-#: src/main/subscript.c:492
+#: src/main/subscript.c:500
 msgid "(subscript) logical subscript too long"
 msgstr " (subscript) 論理値添え字が長すぎます "
 
-#: src/main/subscript.c:590 src/main/subscript.c:645
+#: src/main/subscript.c:668 src/main/subscript.c:723
 msgid "only 0's may be mixed with negative subscripts"
 msgstr " 負の添字と混在できるのは 0 という添字だけです "
 
-#: src/main/subscript.c:618
+#: src/main/subscript.c:696
 msgid "subscript too large for 32-bit R"
 msgstr " 添え字が 32-bit R に対しては大きすぎます "
 
-#: src/main/subscript.c:817
+#: src/main/subscript.c:895
 msgid "no 'dimnames' attribute for array"
 msgstr " 配列に 'dimnames' 属性がありません "
 
-#: src/main/subscript.c:857
+#: src/main/subscript.c:931
 msgid "subscripting on non-vector"
 msgstr " ベクトルでないものへの添え字操作 "
 
-#: src/main/subset.c:261
+#: src/main/subset.c:260
 msgid "dimensions would exceed maximum size of array"
 msgstr " 次元が配列の最大サイズを超えたかもしれません "
 
-#: src/main/subset.c:304 src/main/subset.c:333
+#: src/main/subset.c:304 src/main/subset.c:334
 msgid "matrix subscripting not handled for this type"
 msgstr " このデータ型に対しては添え字は使えません "
 
-#: src/main/subset.c:488
+#: src/main/subset.c:493
 msgid "array subscripting not handled for this type"
 msgstr " このデータ型に対しては添え字は使えません "
 
-#: src/main/subset.c:827
+#: src/main/subset.c:856
 msgid "incorrect number of dimensions"
 msgstr " 次元数が正しくありません "
 
-#: src/main/subset.c:924
+#: src/main/subset.c:953
 msgid "no index specified"
 msgstr " 添字が指定されていません "
 
-#: src/main/subset.c:934
+#: src/main/subset.c:963
 msgid "this S4 class is not subsettable"
 msgstr " この S4 クラスは部分代入可能ではありません "
 
-#: src/main/subset.c:940
+#: src/main/subset.c:970
 msgid "wrong arguments for subsetting an environment"
 msgstr " 環境の subsetting に対する誤った引数です "
 
-#: src/main/summary.c:30
+#: src/main/summary.c:33
 #, c-format
 msgid "invalid 'type' (%s) of argument"
 msgstr " 引数 'type' (%s) が不正です "
 
-#: src/main/summary.c:66 src/main/summary.c:78 src/main/summary.c:103
+#: src/main/summary.c:69 src/main/summary.c:81 src/main/summary.c:106
 msgid "integer overflow - use sum(as.numeric(.))"
 msgstr " 整数のオーバーフローがありました。sum(as.numeric(.)) を使います "
 
-#: src/main/summary.c:522
+#: src/main/summary.c:526
 #, c-format
 msgid "internal error ('op = %d' in do_summary).\t Call a Guru"
 msgstr " 内部エラー (do_summary 中の 'op = %d')。\t R の達人に相談しましょう "
 
-#: src/main/summary.c:623
+#: src/main/summary.c:637
 msgid "Integer overflow - use sum(as.numeric(.))"
 msgstr " 整数のオーバーフローがありました。sum(as.numeric(.)) を使います "
 
-#: src/main/summary.c:731
+#: src/main/summary.c:750
 msgid "no non-missing arguments, returning NA"
 msgstr " 引数に有限な値がありません: NA を返します "
 
-#: src/main/summary.c:734
+#: src/main/summary.c:753
 msgid "no non-missing arguments to min; returning Inf"
 msgstr " min の引数に有限な値がありません: Inf を返します "
 
-#: src/main/summary.c:736
+#: src/main/summary.c:755
 msgid "no non-missing arguments to max; returning -Inf"
 msgstr " max の引数に有限な値がありません: -Inf を返します "
 
-#: src/main/summary.c:801
-msgid "non-numeric argument"
-msgstr " 引数が数値でありません "
-
-#: src/main/summary.c:845
+#: src/main/summary.c:913
 msgid "argument to 'which' is not logical"
 msgstr " 'which' へ渡す引数が論理型ではありません "
 
-#: src/main/summary.c:889
+#: src/main/summary.c:957
 msgid "no arguments"
 msgstr " 引数がありません "
 
-#: src/main/summary.c:900 src/main/summary.c:917
+#: src/main/summary.c:968 src/main/summary.c:985
 msgid "invalid input type"
 msgstr " 入力のタイプが不正です "
 
-#: src/main/summary.c:934
+#: src/main/summary.c:1002
 msgid "an argument will be fractionally recycled"
 msgstr " 引数は部分的に再利用されます "
 
-#: src/main/sysutils.c:69 src/main/sysutils.c:83
+#: src/main/sysutils.c:68 src/main/sysutils.c:82
 #, c-format
 msgid "cannot determine file modification time of '%s'"
 msgstr " '%s' のファイル変更時刻を確定できません "
 
-#: src/main/sysutils.c:167
+#: src/main/sysutils.c:166
 msgid "encoding of a filename cannot be 'bytes'"
 msgstr " ファイル名のエンコーディングは 'bytes' は許されません "
 
-#: src/main/sysutils.c:170 src/main/sysutils.c:803 src/main/sysutils.c:818
-#: src/main/sysutils.c:909 src/main/sysutils.c:924 src/main/sysutils.c:1020
+#: src/main/sysutils.c:169 src/main/sysutils.c:831 src/main/sysutils.c:846
+#: src/main/sysutils.c:975
 #, c-format
 msgid "unsupported conversion from '%s' in codepage %d"
 msgstr " '%s' からのサポートされていない変換がコードページ %d にあります "
 
-#: src/main/sysutils.c:179
+#: src/main/sysutils.c:178
 msgid "file name conversion problem -- name too long?"
 msgstr " ファイル名変換に問題があります -- 名前が長すぎませんか? "
 
-#: src/main/sysutils.c:180
+#: src/main/sysutils.c:179
 msgid "file name conversion problem"
 msgstr " ファイル名変換に問題があります "
 
-#: src/main/sysutils.c:249
+#: src/main/sysutils.c:248
 msgid "invalid filename pattern"
 msgstr " ファイル名のパターンが不正です "
 
-#: src/main/sysutils.c:253
+#: src/main/sysutils.c:252
 msgid "invalid file extension"
 msgstr " ファイルの拡張子が不正です "
 
-#: src/main/sysutils.c:255
+#: src/main/sysutils.c:254
 msgid "no 'pattern'"
 msgstr " 'pattern' がありません "
 
-#: src/main/sysutils.c:257
+#: src/main/sysutils.c:256
 msgid "no 'tempdir'"
 msgstr " 'tempdir' がありません "
 
-#: src/main/sysutils.c:259
+#: src/main/sysutils.c:258
 msgid "no 'fileext'"
 msgstr " 'fileext' がありません "
 
-#: src/main/sysutils.c:345 src/main/sysutils.c:348 src/main/sysutils.c:439
-#: src/main/sysutils.c:441 src/main/sysutils.c:477
+#: src/main/sysutils.c:328
+#, c-format
+msgid "system call failed: %s"
+msgstr " システムコールが失敗しました: %s "
+
+#: src/main/sysutils.c:357 src/main/sysutils.c:360 src/main/sysutils.c:451
+#: src/main/sysutils.c:453 src/main/sysutils.c:489
 msgid "wrong type for argument"
 msgstr " 引数の型が不正です "
 
-#: src/main/sysutils.c:443
+#: src/main/sysutils.c:455
 msgid "wrong length for argument"
 msgstr " 引数の長さが不正です "
 
-#: src/main/sysutils.c:464
+#: src/main/sysutils.c:476
 msgid "'Sys.setenv' is not available on this system"
 msgstr " 'Sys.setenv' はこのシステムでは使えません "
 
-#: src/main/sysutils.c:508
+#: src/main/sysutils.c:520
 msgid "this system cannot unset environment variables: setting to \"\""
 msgstr ""
 " このシステムは、\"\" とセットすることで、環境変数をセットしない状態にするこ"
 "とができません "
 
-#: src/main/sysutils.c:519
+#: src/main/sysutils.c:531
 msgid "'Sys.unsetenv' is not available on this system"
 msgstr " 'Sys.unsetenv' はこのシステムでは使えません "
 
-#: src/main/sysutils.c:616
+#: src/main/sysutils.c:628
 #, c-format
 msgid "unsupported conversion from '%s' to '%s' in codepage %d"
 msgstr ""
 " '%s' から '%s' へのサポートされていない変換がコードページ %d 中にあります "
 
-#: src/main/sysutils.c:631
+#: src/main/sysutils.c:643
 msgid "'x' must be a character vector"
 msgstr " 'x' は文字ベクトルでなくてはなりません "
 
-#: src/main/sysutils.c:646
-msgid "'x' must be a list of NULL or raw vectors"
+#: src/main/sysutils.c:658
+#, fuzzy
+msgid "'x' must be a character vector or a list of NULL or raw vectors"
 msgstr " 'x' は NULL または raw vector からなるリストでなくてはなりません "
 
-#: src/main/sysutils.c:724 src/main/sysutils.c:789 src/main/sysutils.c:895
-#: src/main/sysutils.c:994 src/main/sysutils.c:1010 src/main/sysutils.c:1087
+#: src/main/sysutils.c:736 src/main/sysutils.c:914 src/main/sysutils.c:932
+#: src/main/sysutils.c:949 src/main/sysutils.c:965 src/main/sysutils.c:1042
 #, c-format
 msgid "'%s' must be called on a CHARSXP"
 msgstr " '%s' は CHARSXP 上で呼び出されなければなりません "
 
-#: src/main/sysutils.c:792 src/main/sysutils.c:898 src/main/sysutils.c:1015
-#: src/main/sysutils.c:1090
+#: src/main/sysutils.c:805 src/main/sysutils.c:970 src/main/sysutils.c:1045
 msgid "translating strings with \"bytes\" encoding is not allowed"
 msgstr " エンコーディングが \"bytes\" の文字列の翻訳は許されません "
 
-#: src/main/sysutils.c:1116
+#: src/main/sysutils.c:818
+msgid "internal error: no translation needed"
+msgstr " internal error: no translation needed "
+
+#: src/main/sysutils.c:1071
 #, c-format
 msgid "unsupported conversion to '%s' from codepage %d"
 msgstr " '%s' へのサポートされていない変換がコードページ %d にあります "
 
-#: src/main/sysutils.c:1530
+#: src/main/sysutils.c:1486
 #, c-format
 msgid "invalid Unicode point %u"
 msgstr " 不正なユニコードポイント %u "
 
-#: src/main/sysutils.c:1632
+#: src/main/sysutils.c:1588
 msgid "cannot create 'R_TempDir'"
 msgstr " 'R_TempDir' を作成することができません "
 
-#: src/main/sysutils.c:1636 src/main/sysutils.c:1644 src/main/sysutils.c:1647
+#: src/main/sysutils.c:1592 src/main/sysutils.c:1600 src/main/sysutils.c:1603
 msgid "unable to set R_SESSION_TMPDIR"
 msgstr " R_SESSION_TMPDIR を設定することが出来ません "
 
-#: src/main/sysutils.c:1656
+#: src/main/sysutils.c:1612
 msgid "cannot allocate 'R_TempDir'"
 msgstr " 'R_TempDir' を割り当てることができません "
 
-#: src/main/sysutils.c:1693
+#: src/main/sysutils.c:1649
 msgid "temporary name too long"
 msgstr " 一時名が長すぎます "
 
-#: src/main/sysutils.c:1708
+#: src/main/sysutils.c:1664
 msgid "cannot find unused tempfile name"
 msgstr " 未使用の一時ファイル名を探すことができません "
 
-#: src/main/sysutils.c:1711
+#: src/main/sysutils.c:1667
 msgid "allocation failed in R_tmpnam2"
 msgstr " R_tmpnam2 においてメモリ割り当てが失敗しました "
 
-#: src/main/sysutils.c:1838
+#: src/main/sysutils.c:1794
 msgid "'dirmark = TRUE' is not supported on this platform"
 msgstr " 'dirmark = TRUE' はこのプラットフォームではサポートされていません "
 
@@ -6161,88 +6227,84 @@ msgid "length %d is too large for hashing"
 msgstr " 長さ %d は大きすぎてハッシュできません "
 
 #: src/main/unique.c:490 src/main/unique.c:519 src/main/unique.c:549
-#: src/main/unique.c:575 src/main/unique.c:614
+#: src/main/unique.c:573 src/main/unique.c:612
 msgid "'duplicated' applies only to vectors"
 msgstr " 'duplicated' はベクトルに対してだけ適用できます "
 
-#: src/main/unique.c:619
+#: src/main/unique.c:617
 msgid "any_duplicated3(., <0-length incomp>)"
 msgstr " any_duplicated3(., <0-length incomp>) "
 
-#: src/main/unique.c:669
+#: src/main/unique.c:667
 msgid "'fromLast' must be length 1"
 msgstr " 'fromLast' は長さ 1 でなければなりません "
 
-#: src/main/unique.c:672
+#: src/main/unique.c:670
 msgid "'fromLast' must be TRUE or FALSE"
 msgstr " 'fromLast' は TRUE か FALSE でなければなりません "
 
-#: src/main/unique.c:683
+#: src/main/unique.c:681
 #, c-format
 msgid "%s() applies only to vectors"
 msgstr " %s() はベクトルにのみ使用できます "
 
-#: src/main/unique.c:690
+#: src/main/unique.c:688
 msgid "'nmax' must be positive"
 msgstr " 'nmax' は正でなければなりません "
 
-#: src/main/unique.c:922
+#: src/main/unique.c:985
 msgid "'match' requires vector arguments"
 msgstr " 'match' はベクトル引数を必要とします "
 
-#: src/main/unique.c:970 src/main/unique.c:1125
+#: src/main/unique.c:1033 src/main/unique.c:1171
 msgid "argument is not of mode character"
 msgstr " 引数がモードを表す文字列ではありません "
 
-#: src/main/unique.c:1251
+#: src/main/unique.c:1296
 msgid "... used in a situation where it does not exist"
 msgstr " ... がそれが存在しない状況で使われました "
 
-#: src/main/unique.c:1342
-msgid "unable to find a closure from within which 'match.call' was called"
-msgstr ""
-" 'match.call' がその中から呼び出されたクロージャを見付けることができません "
+#: src/main/unique.c:1302
+msgid "... is not a pairlist"
+msgstr " ... はペアリストではありません "
 
-#: src/main/unique.c:1536
+#: src/main/unique.c:1531
 msgid "non-numeric data frame in rowsum"
 msgstr " rowsum の引数が数値データフレームではありません "
 
-#: src/main/unique.c:1568
+#: src/main/unique.c:1563
 msgid "this cannot happen"
 msgstr " このようなことは起き得ないはずです "
 
-#: src/main/unique.c:1639
+#: src/main/unique.c:1634
 msgid "'names' must be a character vector"
 msgstr " 'names' は文字ベクトルでなければなりません "
 
-#: src/main/unique.c:1643
-msgid "'sep' must be a character string"
-msgstr " 'sep' は文字列でなければなりません "
-
-#: src/main/util.c:88 src/main/util.c:106
+#: src/main/util.c:87 src/main/util.c:105
 msgid "object is not a matrix"
 msgstr " オブジェクトが行列ではありません "
 
-#: src/main/util.c:254 src/main/util.c:268 src/main/util.c:285
+#: src/main/util.c:303 src/main/util.c:315 src/main/util.c:326
+#: src/main/util.c:341
 #, c-format
 msgid "type %d is unimplemented in '%s'"
 msgstr " 型 %d は '%s' では未実装です "
 
-#: src/main/util.c:297
+#: src/main/util.c:352
 #, c-format
 msgid "unimplemented type '%s' in '%s'\n"
 msgstr " 型 '%s'('%s' における)は未実装です \n"
 
-#: src/main/util.c:299
+#: src/main/util.c:354
 #, c-format
 msgid "unimplemented type (%d) in '%s'\n"
 msgstr " 型 %d('%s' における)は未実装です \n"
 
-#: src/main/util.c:424
+#: src/main/util.c:479
 msgid "invalid tag in name extraction"
 msgstr " 名前の抽出においてタグが不正です "
 
-#: src/main/util.c:434
+#: src/main/util.c:489
 #, c-format
 msgid "%d argument passed to .Internal(%s) which requires %d"
 msgid_plural "%d arguments passed to .Internal(%s) which requires %d"
@@ -6250,105 +6312,114 @@ msgstr[0] ""
 " .Internal(%2$s) 関数に %1$d 個の引数が渡されましたが、%3$d 個でなくてはなり"
 "ません "
 
-#: src/main/util.c:440
+#: src/main/util.c:495
 #, c-format
 msgid "%d argument passed to '%s' which requires %d"
 msgid_plural "%d arguments passed to '%s' which requires %d"
 msgstr[0] " %d 個の引数が '%s' に渡されましたが、%d が必要とされています "
 
-#: src/main/util.c:455
+#: src/main/util.c:510
 #, c-format
 msgid "supplied argument name '%s' does not match '%s'"
 msgstr " 使われた引数名 '%s' が '%s' と一致しません "
 
-#: src/main/util.c:465
+#: src/main/util.c:520
 #, c-format
 msgid "'nthcdr' list shorter than %d"
 msgstr " 'nthcdr' リストが %d より短いです "
 
-#: src/main/util.c:470
+#: src/main/util.c:525
 msgid "'nthcdr' needs a list to CDR down"
 msgstr " 'nthcdr' は CDR down へのリストを必要とします "
 
-#: src/main/util.c:586
+#: src/main/util.c:641
 msgid "'all.x' must be TRUE or FALSE"
 msgstr " 'all.x' は TRUE または FALSE でなければなりません "
 
-#: src/main/util.c:588
+#: src/main/util.c:643
 msgid "'all.y' must be TRUE or FALSE"
 msgstr " 'all.y' は TRUEまたは FALSE でなければなりません "
 
-#: src/main/util.c:700
+#: src/main/util.c:672
+msgid "number of rows in the result exceeds maximum vector length"
+msgstr " 結果に含まれる行数がベクタの最大長を超えました "
+
+#: src/main/util.c:764
 msgid "missing value is invalid"
 msgstr " 欠損値は不正です "
 
-#: src/main/util.c:709 src/main/util.c:716
+#: src/main/util.c:773 src/main/util.c:780
 msgid "cannot change working directory"
 msgstr " 作業ディレクトリを変更できません "
 
-#: src/main/util.c:735 src/main/util.c:769 src/main/util.c:810
-#: src/main/util.c:852 src/main/util.c:981 src/main/util.c:1040
-#: src/main/util.c:1063
+#: src/main/util.c:800 src/main/util.c:834 src/main/util.c:875
+#: src/main/util.c:917 src/main/util.c:1046 src/main/util.c:1105
+#: src/main/util.c:1128
 msgid "a character vector argument expected"
 msgstr " 文字ベクトルの引数が期待されています "
 
-#: src/main/util.c:742 src/main/util.c:777 src/main/util.c:819
-#: src/main/util.c:860
+#: src/main/util.c:807 src/main/util.c:842 src/main/util.c:884
+#: src/main/util.c:925
 msgid "path too long"
 msgstr " パスが長すぎます "
 
-#: src/main/util.c:995
+#: src/main/util.c:1060
 msgid "only the first character of 'quote' will be used"
 msgstr " 'quote' の最初の文字だけが使われます "
 
-#: src/main/util.c:1065
+#: src/main/util.c:1130
 msgid "a character vector 'value' expected"
 msgstr " 文字ベクトルの 'value' が期待されています "
 
-#: src/main/util.c:1068
+#: src/main/util.c:1133
 msgid "'value' must be of positive length"
 msgstr " 'value' は正の長さを持たないといけません "
 
-#: src/main/util.c:1197 src/main/util.c:1205
+#: src/main/util.c:1262 src/main/util.c:1270
 #, c-format
 msgid "invalid input '%s' in 'utf8towcs'"
 msgstr " 'utf8towcs' 中に不正な入力 '%s' があります "
 
-#: src/main/util.c:1290
+#: src/main/util.c:1355
 #, c-format
 msgid "invalid multibyte string at '%s'"
 msgstr " '%s' に不正なマルチバイト文字があります "
 
-#: src/main/util.c:1399
+#: src/main/util.c:1497
 msgid "error message truncated to 255 chars"
 msgstr " エラーメッセージは 255 文字に切りつめられました "
 
-#: src/main/util.c:1412
+#: src/main/util.c:1510
 msgid "warning message truncated to 255 chars"
 msgstr " 警告メッセージは 255 文字に切り詰められました "
 
-#: src/main/util.c:1819
+#: src/main/util.c:1659
+#, c-format
+msgid "accuracy loss in conversion from \"%s\" to numeric"
+msgstr " \"%s\" を数値に変換する際に精度が損なわれました "
+
+#: src/main/util.c:1969
 msgid "all arguments must be named"
 msgstr " 全ての引数は名前が付けられていなければなりません "
 
-#: src/main/util.c:1893
+#: src/main/util.c:2091
 msgid "ICU is not supported on this build"
 msgstr " このビルドでは ICU はサポートされていません "
 
-#: src/main/util.c:1954
+#: src/main/util.c:2158
 msgid "'breaks' is not sorted"
 msgstr " 'breaks' がソートされていません "
 
-#: src/main/util.c:1988 src/main/util.c:2034
+#: src/main/util.c:2192 src/main/util.c:2242
 #, c-format
 msgid "long vector '%s' is not supported"
 msgstr " long vector '%s' はサポートされていません "
 
-#: src/main/util.c:2087
+#: src/main/util.c:2296
 msgid "'eps.correct' must be 0, 1, or 2"
 msgstr " 'eps.correct' は 0, 1, または 2 でなければなりません "
 
-#: src/main/util.c:2115
+#: src/main/util.c:2324
 msgid "'x' must be a vector"
 msgstr " 'x' はベクトルでなくてはなりません "
 
@@ -6360,8 +6431,8 @@ msgid ""
 "\n"
 msgstr ""
 "R は、自由なソフトウェアであり、「完全に無保証」です。 \n"
-" 一定の条件に従えば、自由にこれを再配布することができます。 \n"
-" 配布条件の詳細に関しては、'license()' あるいは 'licence()' と入力してくださ"
+"一定の条件に従えば、自由にこれを再配布することができます。 \n"
+"配布条件の詳細に関しては、'license()' あるいは 'licence()' と入力してくださ"
 "い。 \n"
 "\n"
 
@@ -6373,9 +6444,9 @@ msgid ""
 "\n"
 msgstr ""
 "R は多くの貢献者による共同プロジェクトです。 \n"
-" 詳しくは 'contributors()' と入力してください。 \n"
-" また、R や R のパッケージを出版物で引用する際の形式については \n"
-" 'citation()' と入力してください。 \n"
+"詳しくは 'contributors()' と入力してください。 \n"
+"また、R や R のパッケージを出版物で引用する際の形式については \n"
+"'citation()' と入力してください。 \n"
 "\n"
 
 #: src/main/version.c:43
@@ -6385,20 +6456,12 @@ msgid ""
 "Type 'q()' to quit R.\n"
 "\n"
 msgstr ""
-" 'demo()' と入力すればデモをみることができます。 \n"
-" 'help()' とすればオンラインヘルプが出ます。 \n"
-" 'help.start()' で HTML ブラウザによるヘルプがみられます。 \n"
-" 'q()' と入力すれば R を終了します。 \n"
+"'demo()' と入力すればデモをみることができます。 \n"
+"'help()' とすればオンラインヘルプが出ます。 \n"
+"'help.start()' で HTML ブラウザによるヘルプがみられます。 \n"
+"'q()' と入力すれば R を終了します。 \n"
 "\n"
 
-#: src/main/vfonts.c:50
-msgid "vfont routines cannot be accessed in module"
-msgstr " vfont ルーチンはモジュールの中でアクセスすることができません "
-
-#: src/main/vfonts.c:67 src/main/vfonts.c:80 src/main/vfonts.c:98
-msgid "Hershey fonts cannot be loaded"
-msgstr " Hershey フォントをロードできません "
-
 #: src/main/xspline.c:60
 #, c-format
 msgid "add_point - reached MAXNUMPTS (%d)"
@@ -6420,7 +6483,7 @@ msgstr " 少なくとも四つの制御点が必要です "
 msgid "There must be at least three control points"
 msgstr " 少なくとも三つの制御点が必要です "
 
-#: src/modules/X11/dataentry.c:1871 src/modules/X11/devX11.c:1246
+#: src/modules/X11/dataentry.c:1874 src/modules/X11/devX11.c:1248
 #, c-format
 msgid "X11 protocol error: %s"
 msgstr " X11 プロトコルエラー: %s "
@@ -6445,7 +6508,7 @@ msgstr ""
 " エラー: X11 は追加のグラフィックスカラーを用意できません。 \n"
 " X11 を colortype=\"pseudo.cube\" か \"grey\" で使うことを考えてみて下さい "
 
-#: src/modules/X11/devX11.c:1027
+#: src/modules/X11/devX11.c:1029
 msgid ""
 "could not find any X11 fonts\n"
 "Check that the Font Path is correct."
@@ -6453,17 +6516,17 @@ msgstr ""
 " いかなる X11 フォントも見つけられませんでした \n"
 " フォントパスが正しいかどうかチェックしましょう "
 
-#: src/modules/X11/devX11.c:1087
+#: src/modules/X11/devX11.c:1089
 #, c-format
 msgid "X11 used font size %d when %d was requested"
 msgstr " X11 はフォントサイズ %d を使いました(%d が要求されたのですが) "
 
-#: src/modules/X11/devX11.c:1121
+#: src/modules/X11/devX11.c:1123
 #, c-format
 msgid "X11 font %s, face %d at size %d could not be loaded"
 msgstr " X11 フォント %s (サイズ %d, フェイス %d) が読み込めません "
 
-#: src/modules/X11/devX11.c:1130
+#: src/modules/X11/devX11.c:1132
 msgid ""
 "semi-transparency is not supported on this device: reported only once per "
 "page"
@@ -6471,13 +6534,13 @@ msgstr ""
 " 半透過効果はこのデバイスに対してはサポートされていません: ページ毎に一度だけ"
 "レポートされます "
 
-#: src/modules/X11/devX11.c:1254
+#: src/modules/X11/devX11.c:1256
 #, c-format
 msgid "X11 I/O error while opening X11 connection to '%s'"
 msgstr ""
 " '%s' に対して X11 コネクションを開くのに X11 I/O エラーが発生しました "
 
-#: src/modules/X11/devX11.c:1272
+#: src/modules/X11/devX11.c:1273
 msgid "X11 fatal IO error: please save work and shut down R"
 msgstr " X11 の致命的 I/O エラーです、作業を保存して R を終了して下さい "
 
@@ -6600,206 +6663,273 @@ msgstr " XImage を作れません "
 msgid "attempt to use the locator after dev.hold()"
 msgstr " dev.hold() の実行後にロケーターを使おうとしました "
 
-#: src/modules/X11/devX11.c:3111
+#: src/modules/X11/devX11.c:3117
 #, c-format
 msgid "unable to start device %s"
 msgstr " デバイス %s を開始できません "
 
-#: src/modules/X11/devX11.c:3138
+#: src/modules/X11/devX11.c:3144
 msgid "invalid 'width' or 'height'"
 msgstr " 'width' または 'height' が不正です "
 
-#: src/modules/X11/devX11.c:3145
+#: src/modules/X11/devX11.c:3151
 msgid "invalid colortype passed to X11 driver"
 msgstr " 不正な色タイプが X11 ドライバーに引き渡されました "
 
-#: src/modules/X11/devX11.c:3159
+#: src/modules/X11/devX11.c:3165
 msgid "unknown X11 color/colour model -- using monochrome"
 msgstr " 未知の X11 カラーモデルです -- モノクロを使用します "
 
-#: src/modules/X11/devX11.c:3249
+#: src/modules/X11/devX11.c:3255
 msgid "no plot on device to save"
 msgstr " デバイス上に保存すべきプロットがありません "
 
-#: src/modules/X11/devX11.c:3251
+#: src/modules/X11/devX11.c:3257
 msgid "not an open X11cairo device"
 msgstr " X11cairo デバイスを開けません "
 
-#: src/modules/X11/devX11.c:3260
+#: src/modules/X11/devX11.c:3266
 #, c-format
 msgid "cannot open file '%s'"
 msgstr " ファイル '%s' を開くことができません "
 
-#: src/modules/X11/devX11.c:3277
+#: src/modules/X11/devX11.c:3283
 msgid "savePlot() is not supported on this build"
 msgstr " このビルドでは savePlot() はサポートされていません "
 
-#: src/modules/X11/devX11.c:3317
+#: src/modules/X11/devX11.c:3323
 msgid "unable to contact X11 display"
 msgstr " X11 ディスプレイに接続できません "
 
-#: src/modules/X11/devX11.c:3366
+#: src/modules/X11/devX11.c:3372
 #, c-format
 msgid "clipboard cannot be read (error code %d)"
 msgstr " クリップボードの内容を読み込めません (エラーコード %d) "
 
-#: src/modules/X11/devX11.c:3397
+#: src/modules/X11/devX11.c:3408
 msgid "cannot allocate memory for X11Routines structure"
 msgstr " X11Routines ストラクチャにメモリを割り当てることができません "
 
-#: src/modules/internet/internet.c:188 src/modules/internet/internet.c:192
-#: src/modules/internet/internet.c:198 src/modules/internet/internet.c:210
+#: src/modules/internet/internet.c:113
+#, fuzzy
+msgid "for https:// URLs use method = \"wininet\""
+msgstr " https:// のURLには、setInternet2(TRUE)を使用して下さい "
+
+#: src/modules/internet/internet.c:153 src/modules/internet/internet.c:274
+#: src/modules/internet/internet.c:758
+#, fuzzy, c-format
+msgid "scheme not supported in URL '%s'"
+msgstr " 再実行機能は 'eval' 関数に対してはサポートされていません "
+
+#: src/modules/internet/internet.c:348 src/modules/internet/internet.c:352
+#: src/modules/internet/internet.c:357 src/modules/internet/internet.c:381
+#: src/modules/internet/libcurl.c:791 src/modules/internet/libcurl.c:795
+#: src/modules/internet/libcurl.c:801 src/modules/internet/libcurl.c:814
+#: src/modules/internet/libcurl.c:822
 msgid "allocation of url connection failed"
 msgstr " url 接続の割り当てに失敗しました "
 
-#: src/modules/internet/internet.c:286
+#: src/modules/internet/internet.c:455
 msgid "only first element of 'url' argument used"
 msgstr " 'url' 引数の最初の要素だけが使われました "
 
-#: src/modules/internet/internet.c:292
+#: src/modules/internet/internet.c:461
 msgid "only first element of 'destfile' argument used"
 msgstr " 'destfile' 引数の最初の要素だけが使われました "
 
-#: src/modules/internet/internet.c:317
+#: src/modules/internet/internet.c:480 src/modules/internet/libcurl.c:499
 msgid "Download progress"
 msgstr " ダウンロード実行中です "
 
-#: src/modules/internet/internet.c:339
+#: src/modules/internet/internet.c:502
 #, c-format
 msgid "cannot open URL '%s', reason '%s'"
 msgstr " URL '%s' を開くことができません、理由は '%s' です "
 
-#: src/modules/internet/internet.c:346 src/modules/internet/internet.c:372
-#: src/modules/internet/internet.c:474
+#: src/modules/internet/internet.c:509 src/modules/internet/internet.c:536
+#: src/modules/internet/internet.c:661
 #, c-format
 msgid "cannot open destfile '%s', reason '%s'"
 msgstr " 目標ファイル '%s' を開くことができません、理由は '%s' です "
 
-#: src/modules/internet/internet.c:377 src/modules/internet/internet.c:479
+#: src/modules/internet/internet.c:541 src/modules/internet/internet.c:666
+#: src/modules/internet/libcurl.c:530
 #, c-format
 msgid "trying URL '%s'\n"
 msgstr " URL '%s' を試しています \n"
 
-#: src/modules/internet/internet.c:384 src/modules/internet/internet.c:486
-msgid "opened URL\n"
-msgstr " 開かれた URL \n"
-
-#: src/modules/internet/internet.c:455 src/modules/internet/internet.c:560
+#: src/modules/internet/internet.c:640 src/modules/internet/internet.c:751
+#: src/modules/internet/libcurl.c:578
 #, c-format
-msgid "downloaded length %d != reported length %d"
-msgstr " ダウンロードされた長さ %d != 報告された長さ %d です "
+msgid "downloaded length %0.f != reported length %0.f"
+msgstr " ダウンロードされた長さ %0.f != 報告された長さ %0.f です "
 
-#: src/modules/internet/internet.c:460 src/modules/internet/internet.c:565
+#: src/modules/internet/internet.c:645 src/modules/internet/internet.c:756
 #, c-format
 msgid "cannot open URL '%s'"
 msgstr " URL '%s' を開けません "
 
-#: src/modules/internet/internet.c:593 src/modules/internet/internet.c:828
-#, c-format
-msgid "cannot open: HTTP status was '%d %s'"
+#: src/modules/internet/internet.c:779 src/modules/internet/internet.c:944
+#, fuzzy, c-format
+msgid "cannot open URL '%s': HTTP status was '%d %s'"
 msgstr " 開けません: HTTP ステータスは '%d %s' です "
 
-#: src/modules/internet/internet.c:772 src/modules/internet/internet.c:935
-msgid "InternetOpenUrl timed out"
-msgstr " InternetOpenUrl はタイムアウトしました "
-
-#: src/modules/internet/internet.c:799 src/modules/internet/internet.c:813
-#: src/modules/internet/internet.c:957 src/modules/internet/internet.c:966
+#: src/modules/internet/internet.c:915 src/modules/internet/internet.c:929
+#: src/modules/internet/internet.c:1019 src/modules/internet/internet.c:1028
 #, c-format
 msgid "InternetOpenUrl failed: '%s'"
 msgstr " InternetOpenUrl の失敗: '%s' "
 
-#: src/modules/internet/internet.c:870
-msgid "Internet read timed out"
-msgstr " インターネット読み込みのタイムアウト "
+#: src/modules/internet/libcurl.c:159
+#, fuzzy, c-format
+msgid "URL '%s': status was '%d %s'"
+msgstr " 開けません: HTTP ステータスは '%d %s' です "
+
+#: src/modules/internet/libcurl.c:163
+#, c-format
+msgid "URL '%s': status was '%s'"
+msgstr ""
 
-#: src/modules/internet/nanoftp.c:288 src/modules/internet/nanoftp.c:301
-#: src/modules/internet/nanoftp.c:312 src/modules/internet/nanoftp.c:346
-#: src/modules/internet/nanoftp.c:356
+#: src/modules/internet/libcurl.c:240
+msgid "curlGetHeaders is not supported on this platform"
+msgstr " このプラットフォームでは curlGetHeaders はサポートされていません "
+
+#: src/modules/internet/libcurl.c:249 src/modules/internet/libcurl.c:252
+#, c-format
+msgid "invalid %s argument"
+msgstr " '%s' 引数が不正です "
+
+#: src/modules/internet/libcurl.c:269
+#, c-format
+msgid ""
+"libcurl error code %d\n"
+"\t%s\n"
+msgstr ""
+" libcurl エラーコード %d \n"
+" \t%s \n"
+
+#: src/modules/internet/libcurl.c:404
+msgid "download.file(method = \"libcurl\") is not supported on this platform"
+msgstr ""
+" このプラットフォームでは download.file(method = \"libcurl\") はサポートされ"
+"ていません "
+
+#: src/modules/internet/libcurl.c:420
+msgid "lengths of 'url' and 'destfile' must match"
+msgstr " 'url' と 'destfile' の長さは一致しなければなりません "
+
+#: src/modules/internet/libcurl.c:481
+#, fuzzy, c-format
+msgid "URL %s: cannot open destfile '%s', reason '%s'"
+msgstr " 目標ファイル '%s' を開くことができません、理由は '%s' です "
+
+#: src/modules/internet/libcurl.c:593
+#, fuzzy
+msgid "cannot download all files"
+msgstr " ファイル '%s' を開くことができません "
+
+#: src/modules/internet/libcurl.c:727
+#, fuzzy
+msgid "cannot read from connection"
+msgstr " このコネクションから読み込みできません "
+
+#: src/modules/internet/libcurl.c:763
+#, fuzzy
+msgid "cannot open connection"
+msgstr " コネクションを開くことができません "
+
+#: src/modules/internet/libcurl.c:826
+msgid "url(method = \"libcurl\") is not supported on this platform"
+msgstr ""
+" このプラットフォームでは url(method = \"libcurl\")はサポートされていません "
+
+#: src/modules/internet/nanoftp.c:289 src/modules/internet/nanoftp.c:302
+#: src/modules/internet/nanoftp.c:313 src/modules/internet/nanoftp.c:347
+#: src/modules/internet/nanoftp.c:357
 msgid "RxmlNanoFTPScanURL: overlong (invalid?) URL"
 msgstr " RxmlNanoFTPScanURL: 長すぎる (不正な?) URL "
 
-#: src/modules/internet/nanoftp.c:389
+#: src/modules/internet/nanoftp.c:390
 msgid "removing FTP proxy info"
 msgstr " FTP プロキシの情報を取り除いています "
 
-#: src/modules/internet/nanoftp.c:391
+#: src/modules/internet/nanoftp.c:392
 #, c-format
 msgid "using FTP proxy '%s'"
 msgstr " FTP プロキシ '%s' を使います "
 
-#: src/modules/internet/nanoftp.c:402 src/modules/internet/nanoftp.c:431
+#: src/modules/internet/nanoftp.c:403 src/modules/internet/nanoftp.c:432
 msgid "RxmlNanoFTPScanProxy: overlong (invalid?) URL"
 msgstr " RxmlNanoFTPScanProxy: 長すぎる (不正な?) URL "
 
-#: src/modules/internet/nanoftp.c:830
+#: src/modules/internet/nanoftp.c:833
 msgid "cannot resolve host"
 msgstr " ホストの名前解決が出来ません "
 
-#: src/modules/internet/nanoftp.c:860
+#: src/modules/internet/nanoftp.c:863
 msgid "failed to connect to server"
 msgstr " サーバーに接続することができませんでした "
 
-#: src/modules/internet/nanoftp.c:871
+#: src/modules/internet/nanoftp.c:874
 msgid "failed to get response from server"
 msgstr " サーバーからの応答を受け取れませんでした "
 
-#: src/modules/internet/nanoftp.c:1134
+#: src/modules/internet/nanoftp.c:1137
 msgid "RxmlNanoFTPGetConnection: failed to create socket"
 msgstr " RxmlNanoFTPGetConnection: ソケットの作成に失敗しました "
 
-#: src/modules/internet/nanoftp.c:1180
+#: src/modules/internet/nanoftp.c:1183
 msgid "failed to create a data connection"
 msgstr " データコネクションを作成できませんでした "
 
-#: src/modules/internet/nanoftp.c:1188
+#: src/modules/internet/nanoftp.c:1191
 msgid "failed to bind a port"
 msgstr " ポートのバインドに失敗しました "
 
-#: src/modules/internet/nanoftp.c:1195
+#: src/modules/internet/nanoftp.c:1198
 #, c-format
 msgid "could not listen on port %d"
 msgstr " ポート %d から listen できませんでした "
 
-#: src/modules/internet/nanohttp.c:370 src/modules/internet/nanohttp.c:398
-#: src/modules/internet/nanohttp.c:407
+#: src/modules/internet/nanohttp.c:369 src/modules/internet/nanohttp.c:400
+#: src/modules/internet/nanohttp.c:412
 msgid "RxmlNanoHTTPScanURL: overlong (invalid?) URL"
 msgstr " RxmlNanoHTTPScanURL: 長すぎる (不正な?) URL "
 
-#: src/modules/internet/nanohttp.c:441
+#: src/modules/internet/nanohttp.c:446
 msgid "removing HTTP proxy info"
 msgstr " HTTP プロキシの情報を取り除いています "
 
-#: src/modules/internet/nanohttp.c:443
+#: src/modules/internet/nanohttp.c:448
 #, c-format
 msgid "using HTTP proxy '%s'"
 msgstr " HTTP プロキシ '%s' を使います "
 
-#: src/modules/internet/nanohttp.c:454 src/modules/internet/nanohttp.c:490
+#: src/modules/internet/nanohttp.c:459 src/modules/internet/nanohttp.c:497
 msgid "RxmlNanoHTTPScanProxy: overlong (invalid?) URL"
 msgstr " RxmlNanoHTTPScanProxy: 長すぎる (不正な?) URL "
 
-#: src/modules/internet/nanohttp.c:1107
+#: src/modules/internet/nanohttp.c:1135
 #, c-format
 msgid "unable to resolve '%s'"
 msgstr " '%s' を解決することができません "
 
-#: src/modules/internet/nanohttp.c:1134
+#: src/modules/internet/nanohttp.c:1168
 #, c-format
 msgid "connected to '%s' on port %d."
 msgstr " '%s' にポート %d で接続しました "
 
-#: src/modules/internet/nanohttp.c:1139
+#: src/modules/internet/nanohttp.c:1173
 #, c-format
 msgid "unable to connect to '%s' on port %d."
 msgstr " '%s' をポート %d でコネクトできません "
 
-#: src/modules/internet/nanohttp.c:1443
+#: src/modules/internet/nanohttp.c:1477
 #, c-format
 msgid "redirect to: '%s'"
 msgstr " '%s' へリダイレクトされます "
 
-#: src/modules/internet/nanohttp.c:1454
+#: src/modules/internet/nanohttp.c:1488
 msgid "too many redirects, aborting ..."
 msgstr " リダイレクトの数が多すぎます、放棄します… "
 
@@ -6834,11 +6964,11 @@ msgstr " type[1]='%s' の引数は '1', 'O', 'I' のいずれかでなければ
 #: src/modules/lapack/Lapack.c:730 src/modules/lapack/Lapack.c:779
 #: src/modules/lapack/Lapack.c:786 src/modules/lapack/Lapack.c:834
 #: src/modules/lapack/Lapack.c:840 src/modules/lapack/Lapack.c:894
-#: src/modules/lapack/Lapack.c:900 src/modules/lapack/Lapack.c:1134
-#: src/modules/lapack/Lapack.c:1140 src/modules/lapack/Lapack.c:1188
-#: src/modules/lapack/Lapack.c:1195 src/modules/lapack/Lapack.c:1199
-#: src/modules/lapack/Lapack.c:1227 src/modules/lapack/Lapack.c:1234
-#: src/modules/lapack/Lapack.c:1254
+#: src/modules/lapack/Lapack.c:900 src/modules/lapack/Lapack.c:1135
+#: src/modules/lapack/Lapack.c:1141 src/modules/lapack/Lapack.c:1189
+#: src/modules/lapack/Lapack.c:1196 src/modules/lapack/Lapack.c:1200
+#: src/modules/lapack/Lapack.c:1228 src/modules/lapack/Lapack.c:1235
+#: src/modules/lapack/Lapack.c:1255
 #, c-format
 msgid "error code %d from Lapack routine '%s'"
 msgstr " エラーコード %d が Lapack ルーチン '%s' から返されました "
@@ -6919,28 +7049,28 @@ msgstr " Lapack ルーチン 'ztrcon()' からエラー [%d] が返されまし
 msgid "'a' must be a complex matrix"
 msgstr " 'a' は複素行列でなければなりません "
 
-#: src/modules/lapack/Lapack.c:535 src/modules/lapack/Lapack.c:1042
+#: src/modules/lapack/Lapack.c:535 src/modules/lapack/Lapack.c:1043
 msgid "'a' is 0-diml"
 msgstr " 'a' の次元が 0 です "
 
-#: src/modules/lapack/Lapack.c:537 src/modules/lapack/Lapack.c:1044
+#: src/modules/lapack/Lapack.c:537 src/modules/lapack/Lapack.c:1045
 #, c-format
 msgid "'a' (%d x %d) must be square"
 msgstr " 'a' (%d x %d) は正方行列である必要があります "
 
-#: src/modules/lapack/Lapack.c:543 src/modules/lapack/Lapack.c:1050
+#: src/modules/lapack/Lapack.c:543 src/modules/lapack/Lapack.c:1051
 msgid "no right-hand side in 'b'"
 msgstr " 'b' に右辺項がありません "
 
 #: src/modules/lapack/Lapack.c:546 src/modules/lapack/Lapack.c:560
-#: src/modules/lapack/Lapack.c:1053 src/modules/lapack/Lapack.c:1069
+#: src/modules/lapack/Lapack.c:1054 src/modules/lapack/Lapack.c:1070
 #, c-format
 msgid "'b' (%d x %d) must be compatible with 'a' (%d x %d)"
 msgstr " 'd' (%d x %d) は 'a' (%d x %d) と整合性をもたなければなりません "
 
 #: src/modules/lapack/Lapack.c:581 src/modules/lapack/Lapack.c:948
-#: src/modules/lapack/Lapack.c:962 src/modules/lapack/Lapack.c:1017
-#: src/modules/lapack/Lapack.c:1091
+#: src/modules/lapack/Lapack.c:962 src/modules/lapack/Lapack.c:1018
+#: src/modules/lapack/Lapack.c:1092
 #, c-format
 msgid "argument %d of Lapack routine %s had invalid value"
 msgstr " Lapack ルーチン %2$s の %1$d 引数が不正な値を持っています "
@@ -6950,7 +7080,7 @@ msgid "'b' must be a complex matrix"
 msgstr " 'b' は複素行列でなければなりません "
 
 #: src/modules/lapack/Lapack.c:670 src/modules/lapack/Lapack.c:716
-#: src/modules/lapack/Lapack.c:1181 src/modules/lapack/Lapack.c:1220
+#: src/modules/lapack/Lapack.c:1182 src/modules/lapack/Lapack.c:1221
 #, c-format
 msgid "right-hand side should have %d not %d rows"
 msgstr " 右辺は %d 個の行を持つべきです(%d 行ではなくて) "
@@ -6967,13 +7097,13 @@ msgstr " 要素数が 2^31 以上の行列はサポートされていません "
 msgid "'x' must be a square complex matrix"
 msgstr " 'x' は複素正方行列でなければなりません "
 
-#: src/modules/lapack/Lapack.c:926 src/modules/lapack/Lapack.c:1000
-#: src/modules/lapack/Lapack.c:1039 src/modules/lapack/Lapack.c:1114
-#: src/modules/lapack/Lapack.c:1245
+#: src/modules/lapack/Lapack.c:926 src/modules/lapack/Lapack.c:1001
+#: src/modules/lapack/Lapack.c:1040 src/modules/lapack/Lapack.c:1115
+#: src/modules/lapack/Lapack.c:1246
 msgid "'a' must be a numeric matrix"
 msgstr " 'a' は数値行列でなければなりません "
 
-#: src/modules/lapack/Lapack.c:933 src/modules/lapack/Lapack.c:1250
+#: src/modules/lapack/Lapack.c:933 src/modules/lapack/Lapack.c:1251
 msgid "'a' must be a square matrix"
 msgstr " 'a' は正方行列でなければなりません "
 
@@ -6990,40 +7120,40 @@ msgstr " 次数 %d の主対角行列が正定値ではありません "
 msgid "the matrix is either rank-deficient or indefinite"
 msgstr " 行列はランク落ちか不定です "
 
-#: src/modules/lapack/Lapack.c:987
+#: src/modules/lapack/Lapack.c:988
 msgid "'size' argument must be a positive integer"
 msgstr " 'size' 引数は正整数値でなければなりません "
 
-#: src/modules/lapack/Lapack.c:1002
+#: src/modules/lapack/Lapack.c:1003
 #, c-format
 msgid "'size' cannot exceed ncol(x) = %d"
 msgstr " 'size' は列数 ncol(x) = %d を超えることはできません "
 
-#: src/modules/lapack/Lapack.c:1003
+#: src/modules/lapack/Lapack.c:1004
 #, c-format
 msgid "'size' cannot exceed nrow(x) = %d"
 msgstr " 'size' は行数 nrow(x) = %d を超えることはできません "
 
-#: src/modules/lapack/Lapack.c:1015
+#: src/modules/lapack/Lapack.c:1016
 #, c-format
 msgid "element (%d, %d) is zero, so the inverse cannot be computed"
 msgstr " 要素 (%d, %d) が 0 であるため、逆数が計算できません "
 
-#: src/modules/lapack/Lapack.c:1094
+#: src/modules/lapack/Lapack.c:1095
 #, c-format
 msgid "Lapack routine %s: system is exactly singular: U[%d,%d] = 0"
 msgstr "Lapack routine %s: システムは正確に特異です: U[%d,%d] = 0 "
 
-#: src/modules/lapack/Lapack.c:1102
+#: src/modules/lapack/Lapack.c:1103
 #, c-format
 msgid "system is computationally singular: reciprocal condition number = %g"
 msgstr " システムは数値的に特異です: 条件数の逆数 = %g "
 
-#: src/modules/lapack/Lapack.c:1174 src/modules/lapack/Lapack.c:1212
+#: src/modules/lapack/Lapack.c:1175 src/modules/lapack/Lapack.c:1213
 msgid "'b' must be a numeric matrix"
 msgstr " 'b' は数値行列でなければなりません "
 
-#: src/modules/lapack/Lapack.c:1246
+#: src/modules/lapack/Lapack.c:1247
 msgid "argument 'logarithm' must be logical"
 msgstr " 引数 'logarithm' は論理型でなくてはなりません "
 
@@ -7032,8 +7162,8 @@ msgid "bessel_i allocation error"
 msgstr " bessel_i で割り当てエラーがありました "
 
 #: src/nmath/bessel_i.c:77 src/nmath/bessel_i.c:122
-#, c-format
-msgid "bessel_i(%g): ncalc (=%ld) != nb (=%ld); alpha=%g. Arg. out of range?\n"
+#, fuzzy, c-format
+msgid "bessel_i(%g): ncalc (=%d) != nb (=%d); alpha=%g. Arg. out of range?\n"
 msgstr " bessel_i(%g): ncalc (=%ld) != nb (=%ld); alpha=%g. 引数が範囲外? \n"
 
 #: src/nmath/bessel_i.c:80 src/nmath/bessel_i.c:125
@@ -7041,17 +7171,22 @@ msgstr " bessel_i(%g): ncalc (=%ld) != nb (=%ld); alpha=%g. 引数が範囲外
 msgid "bessel_i(%g,nu=%g): precision lost in result\n"
 msgstr " bessel_i(%g,nu=%g): 結果の精度が失われました \n"
 
-#: src/nmath/bessel_j.c:67
+#: src/nmath/bessel_j.c:64 src/nmath/bessel_j.c:118
+#, c-format
+msgid "besselJ(x, nu): nu=%g too large for bessel_j() algorithm"
+msgstr ""
+
+#: src/nmath/bessel_j.c:72
 msgid "bessel_j allocation error"
 msgstr " bessel_j で割り当てエラーがありました "
 
-#: src/nmath/bessel_j.c:75 src/nmath/bessel_j.c:118
-#, c-format
-msgid "bessel_j(%g): ncalc (=%ld) != nb (=%ld); alpha=%g. Arg. out of range?\n"
+#: src/nmath/bessel_j.c:80 src/nmath/bessel_j.c:127
+#, fuzzy, c-format
+msgid "bessel_j(%g): ncalc (=%d) != nb (=%d); alpha=%g. Arg. out of range?\n"
 msgstr ""
 " bessel_j(%g): ncalc (=%ld) != nb (=%ld); alpha=%g. 引数が範囲外か? \n"
 
-#: src/nmath/bessel_j.c:78 src/nmath/bessel_j.c:121
+#: src/nmath/bessel_j.c:83 src/nmath/bessel_j.c:130
 #, c-format
 msgid "bessel_j(%g,nu=%g): precision lost in result\n"
 msgstr " bessel_j(%g,nu=%g): 結果の精度が失われました \n"
@@ -7061,8 +7196,8 @@ msgid "bessel_k allocation error"
 msgstr " bessel_k で割り当てエラーがありました "
 
 #: src/nmath/bessel_k.c:71 src/nmath/bessel_k.c:108
-#, c-format
-msgid "bessel_k(%g): ncalc (=%ld) != nb (=%ld); alpha=%g. Arg. out of range?\n"
+#, fuzzy, c-format
+msgid "bessel_k(%g): ncalc (=%d) != nb (=%d); alpha=%g. Arg. out of range?\n"
 msgstr " bessel_k(%g): ncalc (=%ld) != nb (=%ld); alpha=%g. 範囲外の引数? \n"
 
 #: src/nmath/bessel_k.c:74 src/nmath/bessel_k.c:111
@@ -7070,16 +7205,21 @@ msgstr " bessel_k(%g): ncalc (=%ld) != nb (=%ld); alpha=%g. 範囲外の引数
 msgid "bessel_k(%g,nu=%g): precision lost in result\n"
 msgstr " bessel_k(%g,nu=%g): 結果の精度が失われました \n"
 
-#: src/nmath/bessel_y.c:66
+#: src/nmath/bessel_y.c:63 src/nmath/bessel_y.c:125
+#, c-format
+msgid "besselY(x, nu): nu=%g too large for bessel_y() algorithm"
+msgstr ""
+
+#: src/nmath/bessel_y.c:71
 msgid "bessel_y allocation error"
 msgstr " bessel_y で割り当てエラーがありました "
 
-#: src/nmath/bessel_y.c:82 src/nmath/bessel_y.c:127
-#, c-format
-msgid "bessel_y(%g): ncalc (=%ld) != nb (=%ld); alpha=%g. Arg. out of range?\n"
+#: src/nmath/bessel_y.c:87 src/nmath/bessel_y.c:136
+#, fuzzy, c-format
+msgid "bessel_y(%g): ncalc (=%d) != nb (=%d); alpha=%g. Arg. out of range?\n"
 msgstr " bessel_y(%g): ncalc (=%ld) != nb (=%ld); alpha=%g. 引数が範囲外? \n"
 
-#: src/nmath/bessel_y.c:85 src/nmath/bessel_y.c:130
+#: src/nmath/bessel_y.c:90 src/nmath/bessel_y.c:139
 #, c-format
 msgid "bessel_y(%g,nu=%g): precision lost in result\n"
 msgstr " bessel_y(%g,nu=%g): 結果の精度が失われました \n"
@@ -7089,42 +7229,43 @@ msgstr " bessel_y(%g,nu=%g): 結果の精度が失われました \n"
 msgid "'k' (%.2f) must be integer, rounded to %.0f"
 msgstr " 'k' (%.2f) は整数でなければなりません, %.0f に丸められました "
 
-#: src/nmath/nmath.h:141
+#: src/nmath/nmath.h:156
 #, c-format
 msgid "argument out of domain in '%s'\n"
 msgstr " '%s' の中で引数が範囲外です \n"
 
-#: src/nmath/nmath.h:144
+#: src/nmath/nmath.h:159
 #, c-format
 msgid "value out of range in '%s'\n"
 msgstr " '%s' 中の値が範囲を超えています \n"
 
-#: src/nmath/nmath.h:147
+#: src/nmath/nmath.h:162
 #, c-format
 msgid "convergence failed in '%s'\n"
 msgstr " '%s' の中で収束しませんでした \n"
 
-#: src/nmath/nmath.h:150
+#: src/nmath/nmath.h:165
 #, c-format
 msgid "full precision may not have been achieved in '%s'\n"
 msgstr " '%s' の中で最大限の精度は満たされないかもしれません \n"
 
-#: src/nmath/nmath.h:153
+#: src/nmath/nmath.h:168
 #, c-format
 msgid "underflow occurred in '%s'\n"
 msgstr " '%s' でアンダーフローが起こりました \n"
 
-#: src/nmath/pbeta.c:48
+#: src/nmath/pbeta.c:64
 #, c-format
-msgid "pbeta_raw() -> bratio() gave error code %d"
-msgstr " pbeta_raw() -> bratio() がエラーコード %d を返しました "
+msgid "pbeta_raw(%g, a=%g, b=%g, ..) -> bratio() gave error code %d"
+msgstr ""
+" pbeta_raw(%g, a=%g, b=%g, ..) -> bratio() がエラーコード %d を返しました "
 
-#: src/nmath/pnbinom.c:79
+#: src/nmath/pnbinom.c:82
 #, c-format
 msgid "pnbinom_mu() -> bratio() gave error code %d"
 msgstr " pnbinom_mu() -> bratio() がエラーコード %d を返しました "
 
-#: src/nmath/pnchisq.c:246
+#: src/nmath/pnchisq.c:295
 #, c-format
 msgid "pnchisq(x=%g, ..): not converged in %d iter."
 msgstr " pnchisq(x=%g, ..): %d 回の繰り返し計算で収束しませんでした "
@@ -7166,7 +7307,7 @@ msgstr " X11 ルーチンはこのモジュールではアクセスできませ
 msgid "X11 module cannot be loaded"
 msgstr " X11 モジュールをロードできません "
 
-#: src/unix/X11.c:126 src/unix/X11.c:132 src/unix/X11.c:138 src/unix/X11.c:144
+#: src/unix/X11.c:144 src/unix/X11.c:150 src/unix/X11.c:156 src/unix/X11.c:162
 msgid "X11 is not available"
 msgstr " X11 が利用できません "
 
@@ -7200,7 +7341,7 @@ msgstr ""
 " 明示的な遅延ダイナミックローディングはこのプラットフォームではサポートされて"
 "いません。既定動作を使います "
 
-#: src/unix/dynload.c:240
+#: src/unix/dynload.c:232
 msgid "cannot get working directory!"
 msgstr " 作業ディレクトリを得ることができません! "
 
@@ -7216,12 +7357,12 @@ msgstr ""
 " readline 入力のネスティング中に普通でない状況が起こりました。bug.report() 関"
 "数を使用して報告して下さい "
 
-#: src/unix/sys-std.c:1082 src/unix/sys-std.c:1249
+#: src/unix/sys-std.c:1085 src/unix/sys-std.c:1255
 #, c-format
 msgid "problem in saving the history file '%s'"
 msgstr " 履歴ファイル '%s' の保存に問題があります "
 
-#: src/unix/sys-std.c:1156
+#: src/unix/sys-std.c:1162
 #, c-format
 msgid ""
 "Cannot open file '%s': %s\n"
@@ -7230,87 +7371,216 @@ msgstr ""
 " ファイル '%s' を開くことができません: %s \n"
 " \n"
 
-#: src/unix/sys-std.c:1220 src/unix/sys-std.c:1243
+#: src/unix/sys-std.c:1226 src/unix/sys-std.c:1249
 msgid "'file' argument is too long"
 msgstr " 'file' 引数が長過ぎます "
 
-#: src/unix/sys-std.c:1226 src/unix/sys-std.c:1228
+#: src/unix/sys-std.c:1232 src/unix/sys-std.c:1234
 msgid "no history mechanism available"
 msgstr " 利用できる履歴機構がありません "
 
-#: src/unix/sys-std.c:1255
+#: src/unix/sys-std.c:1261
 msgid "problem in truncating the history file"
 msgstr " 履歴ファイルの切り詰め中に問題がおきました "
 
-#: src/unix/sys-std.c:1257 src/unix/sys-std.c:1259
+#: src/unix/sys-std.c:1263 src/unix/sys-std.c:1265
 msgid "no history available to save"
 msgstr " 保存すべき履歴がありません "
 
-#: src/unix/sys-std.c:1271
+#: src/unix/sys-std.c:1277
 msgid "invalid timestamp"
 msgstr " タイムスタンプが不正です "
 
-#: src/unix/sys-unix.c:251
+#: src/unix/sys-unix.c:248
 msgid "non-empty character argument expected"
 msgstr " 空でない文字引数が期待されています "
 
-#: src/unix/sys-unix.c:254
+#: src/unix/sys-unix.c:251
 msgid "'intern' must be logical and not NA"
 msgstr " 'intern' は論理値であり NA であってはなりません "
 
-#: src/unix/sys-unix.c:266
+#: src/unix/sys-unix.c:269
 #, c-format
 msgid "cannot popen '%s', probable reason '%s'"
 msgstr " '%s' を popen することができません。理由はおそらく '%s' です "
 
-#: src/unix/sys-unix.c:271
+#: src/unix/sys-unix.c:279
 #, c-format
 msgid "line %d may be truncated in call to system(, intern = TRUE)"
 msgstr ""
 " 線 %d は system(, intern = TRUE) への呼出しにおいて切り詰められたかもしれま"
 "せん "
 
-#: src/unix/sys-unix.c:288
+#: src/unix/sys-unix.c:301
 #, c-format
 msgid "error in running command: '%s'"
 msgstr " 以下の命令の実行中にエラーが起きました: '%s' "
 
-#: src/unix/sys-unix.c:290
+#: src/unix/sys-unix.c:303
 msgid "error in running command"
 msgstr " 命令の実行中にエラーが起きました "
 
-#: src/unix/sys-unix.c:294
+#: src/unix/sys-unix.c:307
 #, c-format
 msgid "running command '%s' had status %d and error message '%s'"
 msgstr " 命令 '%s' の実行は状態 %d とエラーメッセージ '%s' を持ちました "
 
-#: src/unix/sys-unix.c:399
+#: src/unix/sys-unix.c:412
 msgid "Sys.info() is not implemented on this system"
 msgstr " Sys.info() はこのシステムでは実装されていません "
 
-#: src/unix/system.c:257
+#: src/unix/system.c:267
 #, c-format
 msgid "WARNING: --gui or -g without value ignored"
 msgstr " 警告: --gui または -g で、値が指定されていないので無視されました "
 
-#: src/unix/system.c:275
+#: src/unix/system.c:285
 #, c-format
 msgid "WARNING: unknown gui '%s', using X11\n"
 msgstr " 警告: '%s' は未知の gui です。X11 を使います \n"
 
-#: src/unix/system.c:278
+#: src/unix/system.c:288
 #, c-format
 msgid "WARNING: unknown gui '%s', using none\n"
 msgstr " 警告: '%s' は未知の gui です。何も使いません \n"
 
-#: src/unix/system.c:388
+#: src/unix/system.c:373
 msgid "creating temporary file for '-e' failed"
 msgstr " '-e' に対して一時ファイルの作成は失敗しました "
 
-#: src/unix/system.c:469
+#: src/unix/system.c:454
 msgid "WARNING: Only editing the first in the list of files"
 msgstr " 警告: ファイルリストの最初のみを編集します "
 
+#~ msgid "'what' must be a character string or a function"
+#~ msgstr " 'what' は文字列または関数でなければなりません "
+
+#~ msgid "sockets are not available on this system"
+#~ msgstr " このシステムではソケットは使えません "
+
+#~ msgid "no function to restart"
+#~ msgstr " 再実行のための関数がありません "
+
+#~ msgid "argument must be a closure"
+#~ msgstr " 引数はクロージャーでなければなりません "
+
+#~ msgid "'hostname' must be a character vector of length 1"
+#~ msgstr " 'hostname' は長さ 1 の文字ベクトルでなくてはなりません "
+
+#~ msgid "nsl() was unable to resolve host '%s'"
+#~ msgstr " nsl() 関数はホスト '%s' を解決できませんでした "
+
+#~ msgid "unknown format returned by C function 'gethostbyname'"
+#~ msgstr " C の関数 'gethostbyname' が未知の書式を返しました "
+
+#~ msgid "nsl() is not supported on this platform"
+#~ msgstr " このプラットフォームでは nsl() 関数はサポートされていません "
+
+#~ msgid "too large a range of values in 'x'"
+#~ msgstr " 'x' 中の値の範囲が大きすぎます "
+
+#~ msgid "non-numeric argument"
+#~ msgstr " 引数が数値でありません "
+
+#~ msgid "unsupported URL scheme"
+#~ msgstr " サポートされていないURLスキームです "
+
+#~ msgid "'dimnames' must be a list"
+#~ msgstr " 'dimnames' はリストでなくてはなりません "
+
+#~ msgid "'args' must be a list"
+#~ msgstr " 'args' はリストでなくてはなりません "
+
+#~ msgid "binary operations require two arguments"
+#~ msgstr " 二項演算には二つの引数が必要です "
+
+#~ msgid "opened URL\n"
+#~ msgstr " 開かれた URL \n"
+
+#~ msgid "internet routines were already initialized"
+#~ msgstr " インターネットルーチンは既に初期化されています "
+
+#~ msgid "'msg1' must be a character string"
+#~ msgstr " 'msg1' は文字列でなければなりません "
+
+#~ msgid "'msg2' must be a character string"
+#~ msgstr " 'msg2' は文字列でなければなりません "
+
+#~ msgid "argument 'code' must be a character string"
+#~ msgstr " 引数 'code' は文字列でなくてはなりません "
+
+#~ msgid "argument 'type' must be a character string"
+#~ msgstr " 引数 'type' は文字列でなくてはなりません "
+
+#~ msgid "InternetOpenUrl timed out"
+#~ msgstr " InternetOpenUrl はタイムアウトしました "
+
+#~ msgid "Internet read timed out"
+#~ msgstr " インターネット読み込みのタイムアウト "
+
+#~ msgid "unable to find a closure from within which 'match.call' was called"
+#~ msgstr ""
+#~ " 'match.call' がその中から呼び出されたクロージャを見付けることができませ"
+#~ "ん "
+
+#~ msgid "vfont routines cannot be accessed in module"
+#~ msgstr " vfont ルーチンはモジュールの中でアクセスすることができません "
+
+#~ msgid "Hershey fonts cannot be loaded"
+#~ msgstr " Hershey フォントをロードできません "
+
+#~ msgid "invalid generic function in 'usemethod'"
+#~ msgstr " 'usemethod' 中に不正な総称関数があります "
+
+#~ msgid "'UseMethod' called from outside a function"
+#~ msgstr " 'UseMethod' が関数の外から呼ばれました "
+
+#~ msgid "first argument must be a generic name"
+#~ msgstr " 最初の引数は総称名でなくてはなりません "
+
+#~ msgid ""
+#~ "explicit request not to duplicate arguments in call to '%s', but argument "
+#~ "%d is of the wrong type (%d != %d)"
+#~ msgstr ""
+#~ " '%s' への呼出しで、引数を複製しないという明示的な要求ですが、引数 %d は"
+#~ "誤ったタイプです (%d != %d) "
+
+#~ msgid "single values not returned if not duplicated"
+#~ msgstr " 単一の値は重複しているのでなければ返されません "
+
+#~ msgid "character variables must be duplicated in .C/.Fortran"
+#~ msgstr " .C/.Fortran 中に文字列変数は重複していなければなりません "
+
+#~ msgid "call name too long in '%s'"
+#~ msgstr " '%s' 中の呼び出し名が長すぎます "
+
+#~ msgid "generic name too long in '%s'"
+#~ msgstr " '%s' の総称名が長すぎます "
+
+#~ msgid "method name too long in '%s'"
+#~ msgstr " '%s' のメソッド名が長すぎます "
+
+#~ msgid "%d arguments passed to 'log' which requires 1 or 2"
+#~ msgstr ""
+#~ " 'log' 関数に %d 個の引数が渡されましたが、1 つまたは 2 つでなくてはなりま"
+#~ "せん "
+
+#~ msgid ""
+#~ "Warning in %s :\n"
+#~ "  %s\n"
+#~ msgstr ""
+#~ " %s 中で警告がありました: \n"
+#~ "  %s \n"
+
+#~ msgid "input"
+#~ msgstr " 入力 "
+
+#~ msgid "symbol"
+#~ msgstr " シンボル "
+
+#~ msgid "assignment"
+#~ msgstr " 付値 "
+
 #~ msgid "negative value in 'x'"
 #~ msgstr " 'x' 中に負の値があります "
 
@@ -7412,22 +7682,13 @@ msgstr " 警告: ファイルリストの最初のみを編集します "
 #~ msgid "invalid return value count in call_R"
 #~ msgstr " call_R の戻り値の個数が不正です "
 
-#~ msgid "internal error in unz code"
-#~ msgstr " unz コードで内部エラーが起きました "
-
 #~ msgid "can't use R profiling while byte code profiling"
 #~ msgstr ""
 #~ " バイトコードのプロファイリング中では R のプロファイル機能は使えません "
 
-#~ msgid "bad character switch offsets"
-#~ msgstr " 不正なな文字スィッチオフセットです "
-
 #~ msgid "bad switch names"
 #~ msgstr " 不正なスィッチ名です "
 
-#~ msgid "bad numeric switch offsets"
-#~ msgstr " 不正な数値スィッチオフセットです "
-
 #~ msgid "constBuf must be a generic vector"
 #~ msgstr " constBuf は総称的なベクトルでなければなりません "
 
@@ -7593,15 +7854,9 @@ msgstr " 警告: ファイルリストの最初のみを編集します "
 #~ msgid "'title' must be a character string"
 #~ msgstr " 'title' は文字列でなければなりません "
 
-#~ msgid "'text' must be a character string"
-#~ msgstr " 'text' は文字列でなければなりません "
-
 #~ msgid "'%s' must be length 1"
 #~ msgstr " '%s' は長さ1でなければなりません "
 
-#~ msgid "'%s' must be a list"
-#~ msgstr " '%s' はリストでなければなりません "
-
 #~ msgid "'%s' element %d is not a window handle"
 #~ msgstr "  %2$d の '%1$s' 要素はウィンドウハンドルではありません "
 
@@ -7629,9 +7884,6 @@ msgstr " 警告: ファイルリストの最初のみを編集します "
 #~ msgid "'file' is not a connection"
 #~ msgstr " 'file' はコネクションではありません "
 
-#~ msgid "'dec' must be a single character"
-#~ msgstr " 'dec' は一文字でなければなりません "
-
 #~ msgid "corrupt data frame -- length of column %d does not not match nrows"
 #~ msgstr ""
 #~ " データフレームが壊れています(列数 %d が nrows と適合していません) "
diff --git a/src/library/base/po/ko.po b/src/library/base/po/ko.po
index bda00d5..30b3289 100644
--- a/src/library/base/po/ko.po
+++ b/src/library/base/po/ko.po
@@ -1,28 +1,40 @@
 # Korean translation for R base package
-# src/library/base/po/ko.po
-# Copyright (C) 1995-2014 The R Core Team
+# ./base/po/ko.po
+#
+# Copyright (C) 1995-2016 The R Core Team
+#
 # This file is distributed under the same license as the R base package.
-# Chel Hee Lee <chl948 at mail.usask.ca>, 2008-2014.
+# Maintained by Chel Hee Lee <chl948 at mail.usask.ca>, 2008-2016.
+# Contact: Chel Hee Lee <gnustats at gmail.com>
+#
+# Notes:
+# Under development (unstable) starting from 31-MAR-2016 for R-3.3.1 - QC: TBA
+# Freezed on 10-APR-2016 for R-3.3.0 - QC: PASS
+# Freezed on 30-MAR-2015 for R-3.2.0 - QC: PASS
+# Freezed on 06-FEB-2015 for R-3.1.3 - QC: PASS
+# Freezed on 13-AUG-2013 for R-3.1.0 - QC: PASS
+# Freezed on 08-MAR-2012 for R-2.15.0 - QC: PASS
+# Freezed on 20-APR-2010 for R-2.11.0 (25-MAR-2010 as well)
+# Freezed on 14-FEB-2010 for R-2.10.0 - QC: PASS
+# Freezed on 25-JAN-2009 for R-
 #
 msgid ""
 msgstr ""
-"Project-Id-Version: R 3.1.0\n"
+"Project-Id-Version: R-3.3.0\n"
 "Report-Msgid-Bugs-To: bugs.r-project.org\n"
-"POT-Creation-Date: 2014-03-27 07:46+0000\n"
-"PO-Revision-Date: 2014-03-27 08:58-0600\n"
+"POT-Creation-Date: 2016-04-01 10:28-0700\n"
+"PO-Revision-Date: 2016-04-11 13:08-0600\n"
 "Last-Translator: Chel Hee Lee <chl948 at mail.usask.ca>\n"
-"Language-Team:  <chl948 at mail.usask.ca>\n"
+"Language-Team: Chel Hee Lee <chl948 at mail.usask.ca>\n"
 "Language: ko\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
 "Plural-Forms: nplurals=1; plural=0;\n"
-"X-Poedit-SourceCharset: UTF-8\n"
-"X-Generator: Poedit 1.5.4\n"
 
 #: src/appl/optim.c:60
 msgid "non-finite value supplied by 'optim'"
-msgstr "'optim'으로부터 유한하지 않은 값이 생성되었습니다"
+msgstr "'optim'에서 유한(finite)하지 않은 값이 반환되었습니다."
 
 #: src/appl/optim.c:67
 #, c-format
@@ -53,19 +65,17 @@ msgstr "파라미터의 초기값으로 함수를 계산할 수는 없습니다"
 msgid "unknown type in \"CG\" method of 'optim'"
 msgstr "'optim'에서 사용하는 \"CG\"라는 method에서 지원하는 타입이 아닙니다"
 
-#: src/appl/optim.c:665
+#: src/appl/optim.c:662
 msgid "REPORT must be > 0 (method = \"L-BFGS-B\")"
 msgstr "method에 \"L-BFGS-B\"가 사용될 때, REPORT는 반드시 0보다 커야 합니다"
 
-#: src/appl/optim.c:688
+#: src/appl/optim.c:685
 msgid "L-BFGS-B needs finite values of 'fn'"
 msgstr "L-BFGS-B는 유한한 'fn'의 값들을 필요로 합니다"
 
-#: src/appl/optim.c:744
+#: src/appl/optim.c:741
 msgid "trace, REPORT must be >= 0 (method = \"SANN\")"
-msgstr ""
-"trace, method에 \"SANN\"이 사용될때, REPORT는 반드시 0보다 크거나 같아야 합니"
-"다"
+msgstr "trace, method에 \"SANN\"이 사용될때, REPORT는 반드시 0보다 크거나 같아야 합니다"
 
 #: src/appl/pretty.c:111
 msgid "Internal(pretty()): very small range.. corrected"
@@ -128,487 +138,463 @@ msgstr "'%ls'에 접근이 거부되었습니다"
 msgid "problem in displaying '%ls'"
 msgstr "'%ls'를 표시하는데 문제가 발생했습니다"
 
-#: src/gnuwin32/extra.c:116 src/gnuwin32/extra.c:159 src/gnuwin32/extra.c:349
-#: src/gnuwin32/extra.c:577 src/gnuwin32/extra.c:602 src/main/agrep.c:131
-#: src/main/agrep.c:135 src/main/agrep.c:775 src/main/agrep.c:780
-#: src/main/apply.c:293 src/main/apply.c:295 src/main/apply.c:298
-#: src/main/array.c:87 src/main/array.c:1137 src/main/array.c:1263
-#: src/main/array.c:1265 src/main/array.c:1266 src/main/array.c:1592
-#: src/main/array.c:1594 src/main/array.c:1596 src/main/attrib.c:196
+#: src/gnuwin32/extra.c:116 src/gnuwin32/extra.c:158 src/gnuwin32/extra.c:348
+#: src/gnuwin32/extra.c:574 src/gnuwin32/extra.c:599 src/main/agrep.c:131
+#: src/main/agrep.c:135 src/main/agrep.c:776 src/main/agrep.c:781
+#: src/main/apply.c:330 src/main/apply.c:332 src/main/apply.c:335
+#: src/main/array.c:90 src/main/array.c:1272 src/main/array.c:1411
+#: src/main/array.c:1413 src/main/array.c:1414 src/main/array.c:1758
+#: src/main/array.c:1760 src/main/array.c:1762 src/main/attrib.c:190
 #: src/main/builtin.c:88 src/main/builtin.c:97 src/main/builtin.c:116
-#: src/main/builtin.c:118 src/main/builtin.c:147 src/main/builtin.c:534
-#: src/main/builtin.c:550 src/main/builtin.c:739 src/main/builtin.c:741
-#: src/main/builtin.c:743 src/main/character.c:139 src/main/character.c:142
-#: src/main/character.c:203 src/main/character.c:1037
-#: src/main/character.c:1041 src/main/character.c:1276
-#: src/main/character.c:1280 src/main/character.c:1341
-#: src/main/character.c:1344 src/main/connections.c:1217
-#: src/main/connections.c:1223 src/main/connections.c:1226
-#: src/main/connections.c:1230 src/main/connections.c:1375
-#: src/main/connections.c:1391 src/main/connections.c:1396
-#: src/main/connections.c:1996 src/main/connections.c:2002
-#: src/main/connections.c:2006 src/main/connections.c:2010
-#: src/main/connections.c:2015 src/main/connections.c:2665
-#: src/main/connections.c:2670 src/main/connections.c:2673
-#: src/main/connections.c:2676 src/main/connections.c:3057
-#: src/main/connections.c:3062 src/main/connections.c:3068
-#: src/main/connections.c:3071 src/main/connections.c:3075
-#: src/main/connections.c:3090 src/main/connections.c:3140
-#: src/main/connections.c:3145 src/main/connections.c:3149
-#: src/main/connections.c:3153 src/main/connections.c:3157
-#: src/main/connections.c:3163 src/main/connections.c:3210
-#: src/main/connections.c:3216 src/main/connections.c:3220
-#: src/main/connections.c:3270 src/main/connections.c:3273
-#: src/main/connections.c:3547 src/main/connections.c:3550
-#: src/main/connections.c:3553 src/main/connections.c:3559
-#: src/main/connections.c:3666 src/main/connections.c:3672
-#: src/main/connections.c:3675 src/main/connections.c:3826
-#: src/main/connections.c:3829 src/main/connections.c:3833
-#: src/main/connections.c:3836 src/main/connections.c:3956
-#: src/main/connections.c:4074 src/main/connections.c:4077
-#: src/main/connections.c:4414 src/main/connections.c:4439
-#: src/main/connections.c:4474 src/main/connections.c:4489
-#: src/main/connections.c:4497 src/main/connections.c:4523
-#: src/main/connections.c:4669 src/main/connections.c:4673
-#: src/main/connections.c:4801 src/main/connections.c:4803
-#: src/main/connections.c:4805 src/main/connections.c:4833
-#: src/main/connections.c:4965 src/main/connections.c:4991
-#: src/main/connections.c:4995 src/main/connections.c:4999
-#: src/main/connections.c:5003 src/main/context.c:596 src/main/context.c:605
-#: src/main/context.c:609 src/main/datetime.c:775 src/main/datetime.c:865
-#: src/main/datetime.c:867 src/main/datetime.c:871 src/main/datetime.c:1026
-#: src/main/datetime.c:1028 src/main/datetime.c:1232 src/main/debug.c:228
-#: src/main/deparse.c:397 src/main/dotcode.c:478 src/main/dotcode.c:482
-#: src/main/dotcode.c:487 src/main/dounzip.c:322 src/main/dounzip.c:329
-#: src/main/dounzip.c:339 src/main/dounzip.c:344 src/main/dounzip.c:348
-#: src/main/dounzip.c:352 src/main/envir.c:1618 src/main/envir.c:1621
-#: src/main/envir.c:1742 src/main/envir.c:1747 src/main/envir.c:1813
-#: src/main/envir.c:1829 src/main/envir.c:1835 src/main/envir.c:1932
-#: src/main/envir.c:1940 src/main/envir.c:1947 src/main/envir.c:1958
-#: src/main/envir.c:2172 src/main/envir.c:2293 src/main/envir.c:2552
-#: src/main/envir.c:2762 src/main/envir.c:2776 src/main/envir.c:2783
-#: src/main/envir.c:2799 src/main/envir.c:3367 src/main/errors.c:1030
-#: src/main/eval.c:397 src/main/eval.c:406 src/main/eval.c:409
-#: src/main/grep.c:767 src/main/grep.c:772 src/main/grep.c:1061
-#: src/main/grep.c:1063 src/main/grep.c:1065 src/main/grep.c:1510
-#: src/main/grep.c:1514 src/main/grep.c:1519 src/main/grep.c:2323
-#: src/main/grep.c:2328 src/main/grep.c:2621 src/main/grep.c:2626
-#: src/main/memory.c:3736 src/main/paste.c:96 src/main/paste.c:395
-#: src/main/paste.c:402 src/main/paste.c:409 src/main/paste.c:414
-#: src/main/paste.c:419 src/main/paste.c:424 src/main/paste.c:427
-#: src/main/paste.c:435 src/main/paste.c:601 src/main/paste.c:606
+#: src/main/builtin.c:118 src/main/builtin.c:149 src/main/builtin.c:569
+#: src/main/builtin.c:585 src/main/builtin.c:773 src/main/builtin.c:775
+#: src/main/builtin.c:777 src/main/character.c:239 src/main/character.c:242
+#: src/main/character.c:247 src/main/character.c:788 src/main/character.c:791
+#: src/main/character.c:1289 src/main/character.c:1293
+#: src/main/character.c:1528 src/main/character.c:1532
+#: src/main/character.c:1593 src/main/character.c:1596
+#: src/main/connections.c:1208 src/main/connections.c:1214
+#: src/main/connections.c:1217 src/main/connections.c:1221
+#: src/main/connections.c:1367 src/main/connections.c:1383
+#: src/main/connections.c:1388 src/main/connections.c:1989
+#: src/main/connections.c:1995 src/main/connections.c:1999
+#: src/main/connections.c:2003 src/main/connections.c:2008
+#: src/main/connections.c:2659 src/main/connections.c:2664
+#: src/main/connections.c:2667 src/main/connections.c:2670
+#: src/main/connections.c:3053 src/main/connections.c:3058
+#: src/main/connections.c:3064 src/main/connections.c:3067
+#: src/main/connections.c:3071 src/main/connections.c:3086
+#: src/main/connections.c:3135 src/main/connections.c:3140
+#: src/main/connections.c:3144 src/main/connections.c:3148
+#: src/main/connections.c:3152 src/main/connections.c:3158
+#: src/main/connections.c:3203 src/main/connections.c:3209
+#: src/main/connections.c:3213 src/main/connections.c:3264
+#: src/main/connections.c:3267 src/main/connections.c:3543
+#: src/main/connections.c:3546 src/main/connections.c:3549
+#: src/main/connections.c:3555 src/main/connections.c:3662
+#: src/main/connections.c:3668 src/main/connections.c:3671
+#: src/main/connections.c:3823 src/main/connections.c:3826
+#: src/main/connections.c:3830 src/main/connections.c:3833
+#: src/main/connections.c:3954 src/main/connections.c:4085
+#: src/main/connections.c:4088 src/main/connections.c:4425
+#: src/main/connections.c:4450 src/main/connections.c:4485
+#: src/main/connections.c:4500 src/main/connections.c:4508
+#: src/main/connections.c:4534 src/main/connections.c:4680
+#: src/main/connections.c:4684 src/main/connections.c:4814
+#: src/main/connections.c:4816 src/main/connections.c:4818
+#: src/main/connections.c:4846 src/main/connections.c:4980
+#: src/main/connections.c:5019 src/main/connections.c:5024
+#: src/main/connections.c:5029 src/main/connections.c:5050
+#: src/main/context.c:607 src/main/context.c:616 src/main/context.c:620
+#: src/main/datetime.c:781 src/main/datetime.c:869 src/main/datetime.c:872
+#: src/main/datetime.c:876 src/main/datetime.c:1043 src/main/datetime.c:1045
+#: src/main/datetime.c:1250 src/main/debug.c:245 src/main/deparse.c:408
+#: src/main/dotcode.c:496 src/main/dotcode.c:500 src/main/dotcode.c:505
+#: src/main/dounzip.c:323 src/main/dounzip.c:330 src/main/dounzip.c:340
+#: src/main/dounzip.c:345 src/main/dounzip.c:349 src/main/dounzip.c:353
+#: src/main/envir.c:1752 src/main/envir.c:1755 src/main/envir.c:1876
+#: src/main/envir.c:1881 src/main/envir.c:1945 src/main/envir.c:1961
+#: src/main/envir.c:1967 src/main/envir.c:2079 src/main/envir.c:2087
+#: src/main/envir.c:2094 src/main/envir.c:2105 src/main/envir.c:2337
+#: src/main/envir.c:2458 src/main/envir.c:2755 src/main/envir.c:3022
+#: src/main/envir.c:3036 src/main/envir.c:3043 src/main/envir.c:3059
+#: src/main/envir.c:3642 src/main/errors.c:1011 src/main/eval.c:454
+#: src/main/eval.c:463 src/main/eval.c:466 src/main/grep.c:780
+#: src/main/grep.c:785 src/main/grep.c:1079 src/main/grep.c:1081
+#: src/main/grep.c:1083 src/main/grep.c:1528 src/main/grep.c:1532
+#: src/main/grep.c:1537 src/main/grep.c:2345 src/main/grep.c:2350
+#: src/main/grep.c:2652 src/main/grep.c:2657 src/main/memory.c:3823
+#: src/main/paste.c:96 src/main/paste.c:392 src/main/paste.c:399
+#: src/main/paste.c:406 src/main/paste.c:411 src/main/paste.c:416
+#: src/main/paste.c:421 src/main/paste.c:424 src/main/paste.c:432
+#: src/main/paste.c:437 src/main/paste.c:619 src/main/paste.c:624
 #: src/main/platform.c:306 src/main/platform.c:308 src/main/platform.c:310
 #: src/main/platform.c:326 src/main/platform.c:337 src/main/platform.c:390
-#: src/main/platform.c:392 src/main/platform.c:705 src/main/platform.c:707
-#: src/main/platform.c:1064 src/main/platform.c:1070 src/main/platform.c:1073
-#: src/main/platform.c:1076 src/main/platform.c:1079 src/main/platform.c:1082
-#: src/main/platform.c:1085 src/main/platform.c:1088 src/main/platform.c:1185
-#: src/main/platform.c:1188 src/main/platform.c:1191 src/main/platform.c:1229
-#: src/main/platform.c:1286 src/main/platform.c:1289 src/main/platform.c:1498
-#: src/main/platform.c:1501 src/main/platform.c:1504 src/main/platform.c:1540
-#: src/main/platform.c:1543 src/main/platform.c:1546 src/main/platform.c:1629
-#: src/main/platform.c:1645 src/main/platform.c:1684 src/main/platform.c:1686
-#: src/main/platform.c:1757 src/main/platform.c:1841 src/main/platform.c:2116
-#: src/main/platform.c:2176 src/main/platform.c:2353 src/main/platform.c:2356
-#: src/main/platform.c:2359 src/main/platform.c:2362 src/main/platform.c:2365
-#: src/main/platform.c:2368 src/main/platform.c:2568 src/main/platform.c:2571
-#: src/main/platform.c:2574 src/main/platform.c:2577 src/main/platform.c:2580
-#: src/main/platform.c:2583 src/main/platform.c:2657 src/main/platform.c:2665
-#: src/main/platform.c:2701 src/main/platform.c:2751 src/main/print.c:242
-#: src/main/print.c:248 src/main/print.c:270 src/main/print.c:276
-#: src/main/print.c:283 src/main/random.c:478 src/main/random.c:482
-#: src/main/random.c:489 src/main/random.c:517 src/main/saveload.c:1950
-#: src/main/saveload.c:1953 src/main/saveload.c:1956 src/main/saveload.c:2072
-#: src/main/saveload.c:2252 src/main/saveload.c:2257 src/main/saveload.c:2260
+#: src/main/platform.c:392 src/main/platform.c:708 src/main/platform.c:710
+#: src/main/platform.c:800 src/main/platform.c:1138 src/main/platform.c:1144
+#: src/main/platform.c:1147 src/main/platform.c:1150 src/main/platform.c:1153
+#: src/main/platform.c:1156 src/main/platform.c:1159 src/main/platform.c:1162
+#: src/main/platform.c:1259 src/main/platform.c:1262 src/main/platform.c:1265
+#: src/main/platform.c:1303 src/main/platform.c:1361 src/main/platform.c:1364
+#: src/main/platform.c:1573 src/main/platform.c:1576 src/main/platform.c:1579
+#: src/main/platform.c:1615 src/main/platform.c:1618 src/main/platform.c:1621
+#: src/main/platform.c:1657 src/main/platform.c:1690 src/main/platform.c:1692
+#: src/main/platform.c:1763 src/main/platform.c:1848 src/main/platform.c:2089
+#: src/main/platform.c:2149 src/main/platform.c:2334 src/main/platform.c:2337
+#: src/main/platform.c:2340 src/main/platform.c:2343 src/main/platform.c:2346
+#: src/main/platform.c:2349 src/main/platform.c:2555 src/main/platform.c:2558
+#: src/main/platform.c:2561 src/main/platform.c:2564 src/main/platform.c:2567
+#: src/main/platform.c:2570 src/main/platform.c:2648 src/main/platform.c:2656
+#: src/main/platform.c:2692 src/main/platform.c:2742 src/main/print.c:235
+#: src/main/print.c:241 src/main/print.c:263 src/main/print.c:269
+#: src/main/print.c:276 src/main/random.c:470 src/main/random.c:474
+#: src/main/random.c:481 src/main/random.c:509 src/main/saveload.c:1952
+#: src/main/saveload.c:1955 src/main/saveload.c:1958 src/main/saveload.c:2074
+#: src/main/saveload.c:2254 src/main/saveload.c:2259 src/main/saveload.c:2262
 #: src/main/saveload.c:2366 src/main/scan.c:684 src/main/scan.c:853
 #: src/main/scan.c:867 src/main/scan.c:871 src/main/scan.c:873
 #: src/main/scan.c:884 src/main/scan.c:911 src/main/scan.c:914
-#: src/main/scan.c:917 src/main/scan.c:972 src/main/seq.c:618
-#: src/main/seq.c:623 src/main/seq.c:631 src/main/seq.c:662 src/main/seq.c:666
-#: src/main/seq.c:672 src/main/seq.c:680 src/main/sort.c:175
-#: src/main/sysutils.c:585 src/main/sysutils.c:589 src/main/sysutils.c:593
-#: src/main/sysutils.c:599 src/main/sysutils.c:603 src/main/sysutils.c:1831
-#: src/main/sysutils.c:1835 src/main/unique.c:966 src/main/unique.c:1289
-#: src/main/unique.c:1349 src/main/unique.c:1356 src/main/unique.c:1750
-#: src/main/util.c:581 src/main/util.c:584 src/main/util.c:1825
-#: src/main/util.c:1994 src/main/util.c:1995 src/main/util.c:1996
-#: src/main/util.c:2013 src/main/util.c:2037 src/main/util.c:2041
-#: src/main/util.c:2043 src/main/util.c:2068 src/main/util.c:2070
-#: src/main/util.c:2072 src/main/util.c:2075 src/main/util.c:2078
-#: src/main/util.c:2082 src/main/util.c:2084 src/modules/X11/devX11.c:3241
-#: src/modules/X11/devX11.c:3244 src/modules/X11/devX11.c:3247
-#: src/modules/X11/devX11.c:3271 src/modules/internet/internet.c:284
-#: src/modules/internet/internet.c:290 src/modules/internet/internet.c:296
-#: src/modules/internet/internet.c:299 src/modules/internet/internet.c:303
+#: src/main/scan.c:917 src/main/scan.c:972 src/main/seq.c:622
+#: src/main/seq.c:627 src/main/seq.c:635 src/main/seq.c:666 src/main/seq.c:670
+#: src/main/seq.c:676 src/main/seq.c:684 src/main/sort.c:175
+#: src/main/sysutils.c:597 src/main/sysutils.c:601 src/main/sysutils.c:605
+#: src/main/sysutils.c:611 src/main/sysutils.c:615 src/main/sysutils.c:1787
+#: src/main/sysutils.c:1791 src/main/unique.c:1029 src/main/unique.c:1337
+#: src/main/unique.c:1341 src/main/unique.c:1351 src/main/unique.c:1747
+#: src/main/util.c:636 src/main/util.c:639 src/main/util.c:1379
+#: src/main/util.c:1393 src/main/util.c:1975 src/main/util.c:2198
+#: src/main/util.c:2199 src/main/util.c:2200 src/main/util.c:2217
+#: src/main/util.c:2245 src/main/util.c:2249 src/main/util.c:2251
+#: src/main/util.c:2277 src/main/util.c:2279 src/main/util.c:2281
+#: src/main/util.c:2284 src/main/util.c:2287 src/main/util.c:2291
+#: src/main/util.c:2293 src/modules/X11/devX11.c:3247
+#: src/modules/X11/devX11.c:3250 src/modules/X11/devX11.c:3253
+#: src/modules/X11/devX11.c:3277 src/modules/internet/internet.c:453
+#: src/modules/internet/internet.c:459 src/modules/internet/internet.c:465
+#: src/modules/internet/internet.c:468 src/modules/internet/internet.c:472
+#: src/modules/internet/internet.c:477 src/modules/internet/libcurl.c:414
+#: src/modules/internet/libcurl.c:418 src/modules/internet/libcurl.c:423
+#: src/modules/internet/libcurl.c:426 src/modules/internet/libcurl.c:430
 #: src/modules/lapack/Lapack.c:155 src/modules/lapack/Lapack.c:261
 #: src/modules/lapack/Lapack.c:709 src/modules/lapack/Lapack.c:818
-#: src/modules/lapack/Lapack.c:880 src/modules/lapack/Lapack.c:1214
-#: src/unix/sys-std.c:1217 src/unix/sys-std.c:1240
+#: src/modules/lapack/Lapack.c:880 src/modules/lapack/Lapack.c:1215
+#: src/unix/sys-std.c:1223 src/unix/sys-std.c:1246
 #, c-format
 msgid "invalid '%s' argument"
-msgstr "'%s' 인자가 잘못되었습니다"
+msgstr "인자 '%s'가 올바르지 않습니다."
 
 #: src/gnuwin32/extra.c:183
 msgid "unsupported version of Windows"
-msgstr "지원되지 않는 윈도우즈 버전입니다"
-
-#: src/gnuwin32/extra.c:267 src/main/apply.c:105 src/main/character.c:595
-#: src/main/connections.c:3555 src/main/context.c:642 src/main/context.c:661
-#: src/main/datetime.c:675 src/main/datetime.c:777 src/main/datetime.c:1030
-#: src/main/dotcode.c:199 src/main/errors.c:929 src/main/errors.c:962
-#: src/main/errors.c:1065 src/main/errors.c:1090 src/main/errors.c:1095
-#: src/main/errors.c:1368 src/main/identical.c:66 src/main/identical.c:67
-#: src/main/identical.c:68 src/main/identical.c:69 src/main/identical.c:70
-#: src/main/seq.c:185 src/main/seq.c:341 src/main/seq.c:346 src/main/seq.c:350
-#: src/main/seq.c:391 src/main/seq.c:395 src/main/seq.c:399
-#: src/main/sort.c:1224 src/main/sort.c:1307 src/main/sort.c:1311
-#: src/main/sort.c:1318 src/main/sort.c:1393 src/main/source.c:220
-#: src/main/summary.c:886 src/main/sysutils.c:251 src/main/util.c:986
-#: src/main/util.c:991 src/main/util.c:998 src/main/util.c:1001
-#: src/modules/X11/devX11.c:3142 src/modules/X11/devX11.c:3169
-#: src/modules/X11/devX11.c:3174 src/modules/X11/devX11.c:3179
-#: src/modules/X11/devX11.c:3189 src/modules/X11/devX11.c:3194
-#: src/modules/X11/devX11.c:3198 src/modules/X11/devX11.c:3202
-#: src/unix/sys-std.c:1291
-#, c-format
-msgid "invalid '%s' value"
-msgstr "'%s'의 값이 잘못되었습니다"
+msgstr "지원되지 않는 Windows (윈도우즈) 버전입니다."
 
-#: src/gnuwin32/extra.c:308 src/gnuwin32/extra.c:321
+#: src/gnuwin32/extra.c:313 src/gnuwin32/extra.c:324
 msgid "incorrect argument"
-msgstr "잘못된 인자입니다"
+msgstr "올바르지 않은 인자입니다."
 
-#: src/gnuwin32/extra.c:312
+#: src/gnuwin32/extra.c:316
 msgid "don't be silly!: your machine has a 4Gb address limit"
-msgstr "사용자 컴퓨터 주소공간의 한계는 4Gb입니다"
+msgstr "don't be silly!: 사용자 컴퓨터 주소공간의 한계는 4Gb입니다."
 
-#: src/gnuwin32/extra.c:316
+#: src/gnuwin32/extra.c:320
 msgid "cannot decrease memory limit: ignored"
-msgstr "메모리 한계를 줄일 수 없기 때문에 무시되었습니다"
+msgstr "메모리의 한계를 줄일 수 없으므로 실행되지 않습니다."
 
-#: src/gnuwin32/extra.c:428 src/gnuwin32/extra.c:529 src/main/util.c:897
+#: src/gnuwin32/extra.c:427 src/gnuwin32/extra.c:528 src/main/util.c:962
 msgid "'path' must be a character vector"
-msgstr "'path'는 반드시 문자형 벡터이어야 합니다"
+msgstr "'path'는 반드시 문자형 벡터이어야 합니다."
 
-#: src/gnuwin32/extra.c:579 src/gnuwin32/extra.c:581 src/gnuwin32/extra.c:604
-#: src/gnuwin32/extra.c:606 src/gnuwin32/extra.c:641 src/main/gevents.c:61
+#: src/gnuwin32/extra.c:576 src/gnuwin32/extra.c:578 src/gnuwin32/extra.c:601
+#: src/gnuwin32/extra.c:603 src/gnuwin32/extra.c:638 src/main/gevents.c:61
 #: src/main/gevents.c:98
 msgid "invalid device"
-msgstr "유효한 장치가 아닙니다"
+msgstr "사용할 수 없는 장치입니다."
 
-#: src/gnuwin32/extra.c:582
+#: src/gnuwin32/extra.c:579
 msgid "requires SDI mode"
-msgstr "SDI 모드가 요구됩니다"
+msgstr "SDI 모드가 필요합니다."
 
-#: src/gnuwin32/extra.c:635 src/main/gevents.c:58 src/main/gevents.c:95
+#: src/gnuwin32/extra.c:632 src/main/gevents.c:58 src/main/gevents.c:95
 msgid "invalid graphical device number"
-msgstr "그래픽 장치번호가 유효하지 않습니다"
+msgstr "그래픽 장치번호가 올바르지 않습니다."
 
-#: src/gnuwin32/extra.c:645
+#: src/gnuwin32/extra.c:642
 msgid "bad device"
-msgstr "잘못된 장치입니다"
+msgstr "사용할 수 없는 장치입니다."
 
-#: src/gnuwin32/extra.c:799 src/gnuwin32/extra.c:807
+#: src/gnuwin32/extra.c:796 src/gnuwin32/extra.c:804
 msgid "invalid input in 'Rmbstowcs'"
-msgstr "'Rmbstowcs'에 올바른 입력이 아닙니다"
+msgstr "'Rmbstowcs'에 입력이 올바르지 않습니다."
 
-#: src/gnuwin32/extra.c:830 src/main/platform.c:1261
+#: src/gnuwin32/extra.c:827 src/main/platform.c:1336
 msgid "file choice cancelled"
-msgstr "파일선택이 취소되었습니다"
+msgstr "파일선택이 취소되었습니다."
 
-#: src/gnuwin32/run.c:242
+#: src/gnuwin32/run.c:244
 #, c-format
 msgid "'CreateProcess' failed to run '%s'"
 msgstr "'%s'를 실행하기 위한 'CreateProcess'가 실패했습니다"
 
-#: src/gnuwin32/run.c:344
+#: src/gnuwin32/run.c:346
 msgid "Child process not responding.  R will terminate it."
 msgstr "자식프로세스가 응답하지 않습니다.  R은 이를 강제종료 시킬 것입니다."
 
-#: src/gnuwin32/run.c:402
+#: src/gnuwin32/run.c:404
 #, c-format
 msgid "Exit code was %d"
 msgstr "종료코드는 %d이었습니다"
 
-#: src/gnuwin32/run.c:434
+#: src/gnuwin32/run.c:436
 msgid "Insufficient memory (rpipeOpen)"
 msgstr "메모리가 부족합니다 (rpipeOpen)"
 
-#: src/gnuwin32/run.c:648 src/main/dounzip.c:482
+#: src/gnuwin32/run.c:650 src/main/dounzip.c:481
 msgid "seek not enabled for this connection"
 msgstr ""
 
-#: src/gnuwin32/run.c:654
+#: src/gnuwin32/run.c:656
 msgid "truncate not enabled for this connection"
 msgstr ""
 
-#: src/gnuwin32/run.c:729 src/gnuwin32/run.c:733 src/gnuwin32/run.c:746
-#: src/gnuwin32/run.c:774 src/main/connections.c:1330
-#: src/main/connections.c:1334 src/main/connections.c:1340
-#: src/main/connections.c:1354
+#: src/gnuwin32/run.c:731 src/gnuwin32/run.c:735 src/gnuwin32/run.c:748
+#: src/gnuwin32/run.c:776 src/main/connections.c:1322
+#: src/main/connections.c:1326 src/main/connections.c:1332
+#: src/main/connections.c:1346
 msgid "allocation of pipe connection failed"
 msgstr "파이프 연결 할당을 할 수 없습니다"
 
-#: src/gnuwin32/run.c:788
+#: src/gnuwin32/run.c:790
 msgid "'names' is not a character vector"
 msgstr "'names'는 문자형 벡터가 아닙니다"
 
-#: src/gnuwin32/sys-win32.c:182
+#: src/gnuwin32/sys-win32.c:180
 msgid "character string expected as first argument"
 msgstr "첫번째 인자에는 문자열이 입력되어야 합니다"
 
-#: src/gnuwin32/sys-win32.c:191
+#: src/gnuwin32/sys-win32.c:189
 msgid "character string expected as third argument"
 msgstr "세번째 인자에는 문자열이 입력되어야 합니다"
 
-#: src/gnuwin32/sys-win32.c:257 src/unix/sys-unix.c:299
+#: src/gnuwin32/sys-win32.c:255 src/unix/sys-unix.c:312
 #, c-format
 msgid "running command '%s' had status %d"
 msgstr "명령 '%s'의 실행으로 상태 %d가 되었습니다"
 
-#: src/gnuwin32/system.c:122 src/unix/sys-unix.c:427
+#: src/gnuwin32/system.c:121 src/unix/sys-unix.c:440
 msgid "reached session elapsed time limit"
 msgstr "세션경과 시간제한에 도달했습니다"
 
-#: src/gnuwin32/system.c:124 src/unix/sys-unix.c:429
+#: src/gnuwin32/system.c:123 src/unix/sys-unix.c:442
 msgid "reached elapsed time limit"
 msgstr "경과시간제한에 도달했습니다"
 
-#: src/gnuwin32/system.c:130 src/unix/sys-unix.c:435
+#: src/gnuwin32/system.c:129 src/unix/sys-unix.c:448
 msgid "reached session CPU time limit"
 msgstr "세션 CPU 시간제한에 도달했습니다"
 
-#: src/gnuwin32/system.c:132 src/unix/sys-unix.c:437
+#: src/gnuwin32/system.c:131 src/unix/sys-unix.c:450
 msgid "reached CPU time limit"
 msgstr "CPU 시간제한에 도달했습니다"
 
-#: src/gnuwin32/system.c:157
+#: src/gnuwin32/system.c:156
 #, c-format
 msgid "Fatal error: %s\n"
 msgstr "치명적 에러: %s\n"
 
-#: src/gnuwin32/system.c:335 src/unix/sys-std.c:863
+#: src/gnuwin32/system.c:334 src/unix/sys-std.c:866
 #, c-format
 msgid "encoding '%s' is not recognised"
 msgstr "인코딩 '%s'를 인식하지 못합니다"
 
-#: src/gnuwin32/system.c:341 src/unix/sys-std.c:869
+#: src/gnuwin32/system.c:340 src/unix/sys-std.c:872
 #, c-format
 msgid "<ERROR: re-encoding failure from encoding '%s'>\n"
 msgstr "<에러: 인코딩 '%s'으로부터 재인코딩에 실패했습니다>\n"
 
-#: src/gnuwin32/system.c:555 src/gnuwin32/system.c:1049
-#: src/gnuwin32/system.c:1061 src/main/connections.c:590
-#: src/main/connections.c:595 src/main/dounzip.c:177 src/main/saveload.c:1961
-#: src/main/serialize.c:2552 src/main/serialize.c:2557
-#: src/main/serialize.c:2642 src/main/serialize.c:2687 src/unix/system.c:323
-#: src/unix/system.c:343
+#: src/gnuwin32/system.c:562 src/gnuwin32/system.c:1058
+#: src/gnuwin32/system.c:1070 src/main/connections.c:581
+#: src/main/connections.c:586 src/main/dounzip.c:178 src/main/saveload.c:1963
+#: src/main/serialize.c:2598 src/main/serialize.c:2603
+#: src/main/serialize.c:2688 src/main/serialize.c:2733 src/unix/system.c:328
 #, c-format
 msgid "cannot open file '%s': %s"
 msgstr "파일 '%1$s'를 여는데 실패했습니다: %2$s"
 
-#: src/gnuwin32/system.c:569
+#: src/gnuwin32/system.c:576
 #, c-format
 msgid "file.show(): file '%s' does not exist\n"
 msgstr "file.show(): 파일 '%s'는 존재하지 않습니다\n"
 
-#: src/gnuwin32/system.c:970
+#: src/gnuwin32/system.c:979
 #, c-format
 msgid "WARNING: R_MAX_MEM_SIZE value is invalid: ignored\n"
 msgstr "경고: R_MAX_MEM_SIZE 값이 유효하지 않아 무시됩니다\n"
 
-#: src/gnuwin32/system.c:1002
+#: src/gnuwin32/system.c:1011
 msgid "WARNING: no max-mem-size given\n"
 msgstr "경고: max-mem-size이 주어지지 않았습니다\n"
 
-#: src/gnuwin32/system.c:1009
+#: src/gnuwin32/system.c:1018
 #, c-format
 msgid "WARNING: --max-mem-size value is invalid: ignored\n"
 msgstr "경고: --max-mem-size이 유효하지 않아 무시됩니다\n"
 
-#: src/gnuwin32/system.c:1012
+#: src/gnuwin32/system.c:1021
 #, c-format
 msgid "WARNING: --max-mem-size=%lu%c: too large and ignored\n"
 msgstr "경고: --max-mem-size=%lu%c: 너무 커서 무시됩니다\n"
 
-#: src/gnuwin32/system.c:1018
+#: src/gnuwin32/system.c:1027
 #, c-format
 msgid "WARNING: --max-mem-size=%4.1fM: too small and ignored\n"
 msgstr "경고: --max-mem-size=%4.1fM: 너무 작아 무시됩니다\n"
 
-#: src/gnuwin32/system.c:1023
+#: src/gnuwin32/system.c:1032
 #, c-format
 msgid "WARNING: --max-mem-size=%4.0fM: too large and taken as %uM\n"
 msgstr "경고: --max-mem-size=%4.0fM: 너무 커서 %uM으로 변경되었습니다\n"
 
-#: src/gnuwin32/system.c:1039
+#: src/gnuwin32/system.c:1048
 #, c-format
 msgid "option '%s' requires an argument"
 msgstr "옵션 '%s'은 인자를 필요로 합니다"
 
-#: src/gnuwin32/system.c:1070
+#: src/gnuwin32/system.c:1079
 #, c-format
 msgid "option '%s' requires a non-empty argument"
 msgstr "옵션 '%s'은 비어있지 않은 인자를 필요로 합니다"
 
-#: src/gnuwin32/system.c:1078 src/unix/system.c:362
+#: src/gnuwin32/system.c:1087 src/unix/system.c:347
 #, c-format
 msgid "WARNING: '-e %s' omitted as input is too long\n"
 msgstr "경고: 입력이 너무 길어 '-e %s'가 생략되었습니다\n"
 
-#: src/gnuwin32/system.c:1082 src/unix/system.c:375
+#: src/gnuwin32/system.c:1091 src/unix/system.c:360
 #, c-format
 msgid "WARNING: unknown option '%s'\n"
 msgstr "경고: 알 수 없는 옵션 '%s'입니다\n"
 
-#: src/gnuwin32/system.c:1104 src/unix/system.c:379
+#: src/gnuwin32/system.c:1113 src/unix/system.c:364
 #, c-format
 msgid "ARGUMENT '%s' __ignored__\n"
 msgstr "인자 '%s'는 무시되었습니다\n"
 
-#: src/gnuwin32/system.c:1110 src/unix/system.c:386
+#: src/gnuwin32/system.c:1119 src/unix/system.c:371
 msgid "cannot use -e with -f or --file"
 msgstr "-e는 -f 또는 --file와 함께 사용될 수 없습니다"
 
-#: src/gnuwin32/system.c:1128
+#: src/gnuwin32/system.c:1137
 msgid "creation of tmpfile failed -- set TMPDIR suitably?"
 msgstr "tmpfile 생성에 실패했습니다 -- TMPDIR 를 올바르게 지정했나요?"
 
-#: src/gnuwin32/system.c:1147 src/unix/system.c:437
+#: src/gnuwin32/system.c:1156 src/unix/system.c:422
 msgid "you must specify '--save', '--no-save' or '--vanilla'"
 msgstr "'--save', '--no-save' 또는 '--vanilla'를 반드시 지정해주어야 합니다"
 
-#: src/gnuwin32/system.c:1152
-msgid ""
-"impossible to create 'reader thread'; you must free some system resources"
-msgstr ""
-"'reader thread'의 생성이 불가능합니다. 일부 시스템 리소스의 사용을 중단해야 "
-"합니다"
+#: src/gnuwin32/system.c:1161
+msgid "impossible to create 'reader thread'; you must free some system resources"
+msgstr "'reader thread'의 생성이 불가능합니다. 일부 시스템 리소스의 사용을 중단해야 합니다"
 
-#: src/include/Errormsg.h:25 src/main/subscript.c:375 src/main/subscript.c:393
-#: src/main/subscript.c:417 src/main/subscript.c:456 src/main/subscript.c:584
-#: src/main/subscript.c:623 src/main/subscript.c:766
+#: src/include/Errormsg.h:27 src/main/subscript.c:383 src/main/subscript.c:401
+#: src/main/subscript.c:425 src/main/subscript.c:464 src/main/subscript.c:662
+#: src/main/subscript.c:701 src/main/subscript.c:844
 msgid "subscript out of bounds"
 msgstr "첨자의 허용 범위를 벗어났습니다"
 
-#: src/include/Errormsg.h:26
+#: src/include/Errormsg.h:28
 #, c-format
 msgid "object of type '%s' is not subsettable"
 msgstr "객체의 타입 '%s'는 부분대입할 수 없습니다"
 
-#: src/main/CommandLineArgs.c:170
+#: src/main/CommandLineArgs.c:171
 msgid "WARNING: no value given for --encoding"
 msgstr "경고: --encoding에 주어진 값이 없습니다"
 
-#: src/main/CommandLineArgs.c:195
+#: src/main/CommandLineArgs.c:196
 #, c-format
 msgid "WARNING: option '%s' no longer supported"
 msgstr "경고: 옵션 '%s'는 더 이상 지원되지 않습니다"
 
-#: src/main/CommandLineArgs.c:206
+#: src/main/CommandLineArgs.c:207
 #, c-format
 msgid "WARNING: no value given for '%s'"
 msgstr "경고: '%s'에 주어진 값이 없습니다"
 
-#: src/main/CommandLineArgs.c:216
+#: src/main/CommandLineArgs.c:217
 #, c-format
 msgid "WARNING: '%s' value is invalid: ignored"
 msgstr "경고: '%s'의 값이 유효하지 않아 무시됩니다"
 
-#: src/main/CommandLineArgs.c:220
+#: src/main/CommandLineArgs.c:221
 #, c-format
 msgid "WARNING: %s: too large and ignored"
 msgstr "경고: %s: 너무 커서 무시됩니다"
 
-#: src/main/CommandLineArgs.c:234
+#: src/main/CommandLineArgs.c:235
 msgid "WARNING: no value given for '--max-ppsize'"
 msgstr "경고: '--max-ppsize'에 주어진 값이 없습니다"
 
-#: src/main/CommandLineArgs.c:239
+#: src/main/CommandLineArgs.c:240
 msgid "WARNING: '--max-ppsize' value is negative: ignored"
 msgstr "경고: '--max-ppsize'의 값이 음수이므로 무시됩니다"
 
-#: src/main/CommandLineArgs.c:241
+#: src/main/CommandLineArgs.c:242
 msgid "WARNING: '--max-ppsize' value is too small: ignored"
 msgstr "경고: '--max-ppsize'의 값이 너무 작아 무시됩니다"
 
-#: src/main/CommandLineArgs.c:244
+#: src/main/CommandLineArgs.c:245
 msgid "WARNING: '--max-ppsize' value is too large: ignored"
 msgstr "경고: '--max-ppsize'의 값이 너무 커서 무시됩니다"
 
-#: src/main/RNG.c:175
+#: src/main/RNG.c:176
 #, c-format
 msgid "unif_rand: unimplemented RNG kind %d"
 msgstr "unif_rand: %d는 구현되지 않은 난수발생기의 종류입니다"
 
-#: src/main/RNG.c:260
+#: src/main/RNG.c:261
 #, c-format
 msgid "FixupSeeds: unimplemented RNG kind %d"
 msgstr "FixupSeeds: %d는 구현되지 않은 난수발생기의 종류입니다"
 
-#: src/main/RNG.c:302
+#: src/main/RNG.c:301
 msgid "'user_unif_rand' not in load table"
 msgstr "'user_unif_rand'는 로드테이블에 없습니다"
 
-#: src/main/RNG.c:310
+#: src/main/RNG.c:309
 msgid "cannot read seeds unless 'user_unif_nseed' is supplied"
 msgstr "만약 'user_unif_nseed'가 주어지지 않는다면, 시드를 읽을 수 없습니다"
 
-#: src/main/RNG.c:315
+#: src/main/RNG.c:314
 msgid "seed length must be in 0...625; ignored"
 msgstr "시드의 길이는 반드시 0 에서 625 사이의 값을 가져야 하므로 무시됩니다"
 
-#: src/main/RNG.c:323
+#: src/main/RNG.c:322
 #, c-format
 msgid "RNG_Init: unimplemented RNG kind %d"
 msgstr "RNG_Init: %d는 구현되지 않은 난수발생기의 종류입니다"
 
-#: src/main/RNG.c:354
+#: src/main/RNG.c:351
 msgid "'.Random.seed' is a missing argument with no default"
 msgstr "'.Random.seed'는 디폴트 없이 누락된 인자입니다"
 
-#: src/main/RNG.c:355
+#: src/main/RNG.c:352
 #, c-format
 msgid "'.Random.seed' is not an integer vector but of type '%s', so ignored"
 msgstr "'.Random.seed'는 정수형 벡터가 아니라 타입 '%s'이므로 무시되어집니다"
 
-#: src/main/RNG.c:363
+#: src/main/RNG.c:360
 msgid "'.Random.seed[1]' is not a valid integer, so ignored"
 msgstr "'.Random.seed[1]'는 유효한 정수가 아니므로 무시됩니다"
 
-#: src/main/RNG.c:369
+#: src/main/RNG.c:366
 msgid "'.Random.seed[1]' is not a valid Normal type, so ignored"
 msgstr "'.Random.seed[1]'는 유효한 정규분포형이 아니기 때문에 무시되어집니다"
 
-#: src/main/RNG.c:383
+#: src/main/RNG.c:380
 msgid "'.Random.seed[1] = 5' but no user-supplied generator, so ignored"
-msgstr ""
-"'.Random.seed[1] = 5' 이자만 사용자에 의하여 제공된 생성기가 아니므로 무시되"
-"어집니다"
+msgstr "'.Random.seed[1] = 5' 이자만 사용자에 의하여 제공된 생성기가 아니므로 무시되어집니다"
 
-#: src/main/RNG.c:388
+#: src/main/RNG.c:385
 msgid "'.Random.seed[1]' is not a valid RNG kind so ignored"
-msgstr ""
-"'.Random.seed[1]'는 올바른 난수생성 발생기의 종류가 아니므로 무시되어집니다"
+msgstr "'.Random.seed[1]'는 올바른 난수생성 발생기의 종류가 아니므로 무시되어집니다"
 
-#: src/main/RNG.c:415
+#: src/main/RNG.c:412
 msgid "'.Random.seed' has wrong length"
 msgstr "'.Random.seed'는 잘못된 길이를 가지고 있습니다"
 
-#: src/main/RNG.c:468
+#: src/main/RNG.c:465
 #, c-format
 msgid "RNGkind: unimplemented RNG kind %d"
 msgstr "RNGkind: %d는 구현되지 않은 난수생성기 종류입니다"
 
-#: src/main/RNG.c:488
+#: src/main/RNG.c:485
 msgid "invalid Normal type in 'RNGkind'"
 msgstr "'RNGkind'에 유효하지 않은 Normal 타입입니다"
 
-#: src/main/RNG.c:491
+#: src/main/RNG.c:488
 msgid "'user_norm_rand' not in load table"
 msgstr "'user_norm_rand'은 로드테이블에 없습니다"
 
-#: src/main/RNG.c:535
+#: src/main/RNG.c:532
 msgid "supplied seed is not a valid integer"
 msgstr "제공된 시드는 유효하지 않은 정수입니다"
 
@@ -633,7 +619,7 @@ msgstr "DLLname '%s'는 너무 깁니다"
 msgid "could not allocate space for 'name'"
 msgstr "'name'에 공간을 할당할 수 없습니다"
 
-#: src/main/Rdynload.c:881 src/main/Rdynload.c:897 src/main/util.c:698
+#: src/main/Rdynload.c:881 src/main/Rdynload.c:897 src/main/util.c:762
 msgid "character argument expected"
 msgstr "문자형 인자가 필요합니다"
 
@@ -653,32 +639,33 @@ msgstr "공유된 객체 '%s'는 로드되지 않았습니다"
 
 #: src/main/Rdynload.c:979
 #, c-format
-msgid "cannot allocate memory for registered native symbol (%d bytes)"
-msgstr "%d 바이트가 필요한 등록된 네이티브 심볼에 메모리를 할당할 수 없습니다"
+msgid "cannot allocate memory for registered native symbol (%d byte)"
+msgid_plural "cannot allocate memory for registered native symbol (%d bytes)"
+msgstr[0] "%d 바이트가 필요한 등록된 고유기호(registered native symbol)에 메모리를 할당할 수 없습니다."
 
-#: src/main/Rdynload.c:1100 src/main/Rdynload.c:1321
+#: src/main/Rdynload.c:1102 src/main/Rdynload.c:1323
 msgid "must pass package name or DllInfo reference"
 msgstr "반드시 패키지명 혹은 DllInfo에 대한 참조를 전달해야만 합니다"
 
-#: src/main/Rdynload.c:1197
+#: src/main/Rdynload.c:1199
 #, c-format
 msgid "unimplemented type %d in 'createRSymbolObject'"
 msgstr "'createRSymbolObject'에 아직 구현되지 않은 타입 %d가 있습니다"
 
-#: src/main/Rdynload.c:1279 src/main/Rdynload.c:1373
+#: src/main/Rdynload.c:1281 src/main/Rdynload.c:1375
 msgid "R_getRegisteredRoutines() expects a DllInfo reference"
 msgstr "R_getRegisteredRoutines()는 DllInfo에 대한 참조를 필요로 합니다"
 
-#: src/main/Rdynload.c:1282 src/main/Rdynload.c:1376
+#: src/main/Rdynload.c:1284 src/main/Rdynload.c:1378
 msgid "NULL value passed for DllInfo"
 msgstr "DllInfo에 NULL 값이 전달되었습니다"
 
-#: src/main/Rdynload.c:1436
+#: src/main/Rdynload.c:1441
 #, c-format
 msgid "function '%s' not provided by package '%s'"
 msgstr "함수 '%s'는 패키지 '%s'에서 제공된 것이 아닙니다"
 
-#: src/main/Rdynload.c:1438
+#: src/main/Rdynload.c:1443
 msgid "table entry must be an external pointer"
 msgstr "테이블 항목은 반드시 외부포인터이어야 합니다"
 
@@ -687,103 +674,129 @@ msgstr "테이블 항목은 반드시 외부포인터이어야 합니다"
 msgid "problem in setting variable '%s' in Renviron"
 msgstr "Renviron 내에 변수 '%s'를 지정하는데 문제가 발생했습니다"
 
-#: src/main/Renviron.c:311
-msgid "argument 'x' must be a character string"
-msgstr "인자 'x'는 반드시 문자열이어야 합니다"
+#: src/main/Renviron.c:311 src/main/objects.c:1174 src/main/raw.c:155
+#, c-format
+msgid "argument '%s' must be a character string"
+msgstr "인자 '%s'는 반드시 문자열(character string)이어야 합니다."
 
 #: src/main/Renviron.c:315
 #, c-format
 msgid "file '%s' cannot be opened for reading"
 msgstr "파일 '%s'를 열 수 없습니다"
 
-#: src/main/Rstrptime.h:517 src/main/Rstrptime.h:984
+#: src/main/Rstrptime.h:524 src/main/Rstrptime.h:991
 #, c-format
 msgid "use of %s for input is not supported"
 msgstr "입력을 위한 %s의 사용은 지원되지 않습니다"
 
-#: src/main/Rstrptime.h:1242
+#: src/main/Rstrptime.h:1263
 msgid "input string is too long"
 msgstr "입력문자열이 너무 깁니다"
 
-#: src/main/Rstrptime.h:1244
+#: src/main/Rstrptime.h:1265
 msgid "invalid multibyte input string"
 msgstr "멀티바이트 형식의 입력문자열이 유효하지 않습니다"
 
-#: src/main/Rstrptime.h:1247
+#: src/main/Rstrptime.h:1268
 msgid "format string is too long"
 msgstr "포맷문자열이 너무 깁니다"
 
-#: src/main/Rstrptime.h:1249
+#: src/main/Rstrptime.h:1270
 msgid "invalid multibyte format string"
 msgstr "멀티바이트 형식의 포맷문자열이 유효하지 않습니다"
 
-#: src/main/agrep.c:133 src/main/agrep.c:777 src/main/character.c:1039
-#: src/main/character.c:1043 src/main/grep.c:769 src/main/grep.c:1512
-#: src/main/grep.c:1516 src/main/grep.c:2325 src/main/grep.c:2623
+#: src/main/agrep.c:133 src/main/agrep.c:778 src/main/character.c:1291
+#: src/main/character.c:1295 src/main/grep.c:782 src/main/grep.c:1530
+#: src/main/grep.c:1534 src/main/grep.c:2347 src/main/grep.c:2654
 #, c-format
 msgid "argument '%s' has length > 1 and only the first element will be used"
-msgstr ""
-"인자 '%s'는 반드시 길이가 1 보다 커야 하고, 오로지 첫번째 요소만이 사용될 것"
-"입니다"
+msgstr "인자 '%s'는 반드시 길이가 1 보다 커야 하고, 오로지 첫번째 요소만이 사용될 것입니다"
 
-#: src/main/agrep.c:189 src/main/agrep.c:818
+#: src/main/agrep.c:190 src/main/agrep.c:820
 msgid "'pattern' must be a non-empty character string"
 msgstr "'pattern'은 반드시 비어있지 않은 문자열이어야 합니다"
 
-#: src/main/agrep.c:200 src/main/agrep.c:827 src/main/grep.c:838
-#: src/main/grep.c:2381 src/main/grep.c:2662
+#: src/main/agrep.c:201 src/main/agrep.c:829 src/main/grep.c:853
+#: src/main/grep.c:2405 src/main/grep.c:2707
 msgid "regular expression is invalid in this locale"
 msgstr "이 로케일에서는 정규표현식이 유효하지 않습니다"
 
-#: src/main/agrep.c:206 src/main/agrep.c:623
+#: src/main/agrep.c:207 src/main/agrep.c:624
 #, c-format
 msgid "regcomp error:  '%s'"
 msgstr "regcomp 에러:  '%s'"
 
-#: src/main/agrep.c:238 src/main/agrep.c:871 src/main/grep.c:227
-#: src/main/grep.c:315 src/main/grep.c:423 src/main/grep.c:578
-#: src/main/grep.c:889 src/main/grep.c:2480 src/main/grep.c:2548
-#: src/main/grep.c:2698
+#: src/main/agrep.c:239 src/main/agrep.c:874 src/main/grep.c:233
+#: src/main/grep.c:323 src/main/grep.c:434 src/main/grep.c:590
+#: src/main/grep.c:907 src/main/grep.c:2510 src/main/grep.c:2579
+#: src/main/grep.c:2744
 #, c-format
 msgid "input string %d is invalid in this locale"
 msgstr "이 로케일에서는 입력문자열 %d는 유효하지 않습니다"
 
-#: src/main/agrep.c:525 src/main/agrep.c:765 src/main/grep.c:155
-#: src/main/grep.c:760 src/main/grep.c:762 src/main/grep.c:1047
-#: src/main/grep.c:1055 src/main/grep.c:1503 src/main/grep.c:1505
-#: src/main/grep.c:2315 src/main/grep.c:2317 src/main/grep.c:2611
+#: src/main/agrep.c:526 src/main/agrep.c:766 src/main/grep.c:159
+#: src/main/grep.c:773 src/main/grep.c:775 src/main/grep.c:1065
+#: src/main/grep.c:1073 src/main/grep.c:1521 src/main/grep.c:1523
+#: src/main/grep.c:2337 src/main/grep.c:2339 src/main/grep.c:2642
 #, c-format
 msgid "argument '%s' will be ignored"
 msgstr "인자 '%s'는 무시될 것입니다"
 
-#: src/main/agrep.c:614
+#: src/main/agrep.c:615
 #, c-format
 msgid "input string x[%d] is invalid in this locale"
 msgstr "이 로케일에서 입력문자열 x[%d]는 유효하지 않습니다"
 
-#: src/main/agrep.c:660
+#: src/main/agrep.c:661
 #, c-format
 msgid "input string y[%d] is invalid in this locale"
 msgstr "이 로케일에서 입력문자열 y[%d]는 유효하지 않습니다"
 
-#: src/main/agrep.c:833 src/main/grep.c:2668
+#: src/main/agrep.c:835 src/main/grep.c:2713
 #, c-format
 msgid "regcomp error: '%s'"
 msgstr "regcomp 에러: '%s'"
 
-#: src/main/apply.c:103
+#: src/main/apply.c:98
 msgid "'FUN.VALUE' must be a vector"
 msgstr "'FUN.VALUE'는 반드시 벡터이어야 합니다"
 
-#: src/main/apply.c:108 src/main/complex.c:758
+#: src/main/apply.c:100 src/main/array.c:506 src/main/character.c:847
+#: src/main/character.c:1655 src/main/connections.c:3551
+#: src/main/context.c:653 src/main/context.c:672 src/main/datetime.c:681
+#: src/main/datetime.c:783 src/main/datetime.c:1047 src/main/dotcode.c:222
+#: src/main/errors.c:910 src/main/errors.c:943 src/main/errors.c:1049
+#: src/main/errors.c:1074 src/main/errors.c:1079 src/main/errors.c:1349
+#: src/main/identical.c:66 src/main/identical.c:67 src/main/identical.c:68
+#: src/main/identical.c:69 src/main/identical.c:70 src/main/platform.c:2982
+#: src/main/seq.c:192 src/main/seq.c:343 src/main/seq.c:348 src/main/seq.c:352
+#: src/main/seq.c:397 src/main/seq.c:401 src/main/seq.c:405
+#: src/main/sort.c:1244 src/main/sort.c:1327 src/main/sort.c:1331
+#: src/main/sort.c:1338 src/main/source.c:225 src/main/summary.c:954
+#: src/main/sysutils.c:250 src/main/util.c:1051 src/main/util.c:1056
+#: src/main/util.c:1063 src/main/util.c:1066 src/main/util.c:2035
+#: src/modules/X11/devX11.c:3148 src/modules/X11/devX11.c:3175
+#: src/modules/X11/devX11.c:3180 src/modules/X11/devX11.c:3185
+#: src/modules/X11/devX11.c:3195 src/modules/X11/devX11.c:3200
+#: src/modules/X11/devX11.c:3204 src/modules/X11/devX11.c:3208
+#, c-format
+msgid "invalid '%s' value"
+msgstr "'%s'의 값이 잘못되었습니다"
+
+#: src/main/apply.c:103 src/main/complex.c:753
 msgid "invalid length"
 msgstr "유효하지 않은 길이입니다"
 
-#: src/main/apply.c:113
+#: src/main/apply.c:108
 msgid "long vectors are not supported for matrix/array results"
 msgstr "행렬/배열의 결과에 긴벡터들은 지원되지 않습니다"
 
-#: src/main/apply.c:162
+#: src/main/apply.c:115
+#, c-format
+msgid "type '%s' is not supported"
+msgstr "타입 '%s'는 지원되지 않습니다"
+
+#: src/main/apply.c:163
 #, c-format
 msgid ""
 "values must be length %d,\n"
@@ -792,7 +805,7 @@ msgstr ""
 "길이가 반드시 %d이어야 하지만,\n"
 "FUN(X[[%d]])의 결과는 길이 %d 입니다"
 
-#: src/main/apply.c:174
+#: src/main/apply.c:175
 #, c-format
 msgid ""
 "values must be type '%s',\n"
@@ -801,17 +814,12 @@ msgstr ""
 "값들이 반드시 타입 '%s'이어야 하지만,\n"
 "FUN(X[[%d]])의 결과는 타입 '%s'입니다"
 
-#: src/main/apply.c:193
-#, c-format
-msgid "type '%s' is not supported"
-msgstr "타입 '%s'는 지원되지 않습니다"
-
-#: src/main/apply.c:225
+#: src/main/apply.c:252
 #, c-format
 msgid "dimnames(<value>) is neither NULL nor list of length %d"
 msgstr "dimnames(<value>)은 NULL도 아니고 길이가 %d인 리스트도 아닙니다"
 
-#: src/main/arithmetic.c:42
+#: src/main/arithmetic.c:42 src/main/eval.c:3633
 msgid "NaNs produced"
 msgstr "NaN이 생성되었습니다"
 
@@ -819,603 +827,597 @@ msgstr "NaN이 생성되었습니다"
 msgid "non-numeric argument to mathematical function"
 msgstr "수학함수에 숫자가 아닌 인자가 전달되었습니다"
 
-#: src/main/arithmetic.c:187
+#: src/main/arithmetic.c:186
 msgid "probable complete loss of accuracy in modulus"
 msgstr ""
 
-#: src/main/arithmetic.c:337
+#: src/main/arithmetic.c:298
 msgid "NAs produced by integer overflow"
 msgstr "정수형 오버플로우에 의하여 생성된 NA입니다"
 
-#: src/main/arithmetic.c:538
+#: src/main/arithmetic.c:499
 msgid "operator needs one or two arguments"
 msgstr "연산자는 하나 또는 두개의 인자를 필요로 합니다"
 
-#: src/main/arithmetic.c:554
+#: src/main/arithmetic.c:515
 msgid "non-numeric argument to binary operator"
 msgstr "이항연산자에 수치가 아닌 인수입니다"
 
-#: src/main/arithmetic.c:615 src/main/relop.c:227
+#: src/main/arithmetic.c:576 src/main/relop.c:221
 msgid "non-conformable arrays"
 msgstr "배열의 크기가 올바르지 않습니다"
 
-#: src/main/arithmetic.c:658
+#: src/main/arithmetic.c:619
 msgid "non-conformable time-series"
 msgstr "시계열의 크기가 올바르지 않습니다"
 
-#: src/main/arithmetic.c:680 src/main/logic.c:143 src/main/relop.c:166
-#: src/main/relop.c:265
+#: src/main/arithmetic.c:641 src/main/logic.c:135 src/main/relop.c:160
+#: src/main/relop.c:259
 msgid "longer object length is not a multiple of shorter object length"
 msgstr "두 객체의 길이가 서로 배수관계에 있지 않습니다"
 
-#: src/main/arithmetic.c:751
+#: src/main/arithmetic.c:712
 msgid "invalid argument to unary operator"
 msgstr "단항연산자에 유효한 인자가 아닙니다"
 
-#: src/main/arithmetic.c:780 src/main/arithmetic.c:805
-#: src/main/arithmetic.c:824
+#: src/main/arithmetic.c:741 src/main/arithmetic.c:766
+#: src/main/arithmetic.c:785
 msgid "invalid unary operator"
 msgstr "유효하지 않은 단항연산자입니다"
 
-#: src/main/arithmetic.c:1241
+#: src/main/arithmetic.c:1191
 msgid "unimplemented real function of 1 argument"
 msgstr "1개의 인수를 받는 실수형 함수이나 구현되지 않았습니다"
 
-#: src/main/arithmetic.c:1255 src/main/complex.c:648 src/main/complex.c:718
+#: src/main/arithmetic.c:1205 src/main/complex.c:638 src/main/complex.c:708
 msgid "unimplemented complex function"
 msgstr "구현되지 않은 복소함수입니다"
 
-#: src/main/arithmetic.c:1526 src/main/arithmetic.c:1877
-#: src/main/arithmetic.c:2056 src/main/arithmetic.c:2168
+#: src/main/arithmetic.c:1484 src/main/arithmetic.c:1877
+#: src/main/arithmetic.c:2049 src/main/arithmetic.c:2152
 #, c-format
 msgid "unimplemented real function of %d numeric arguments"
 msgstr "%d개의 수치형 인수를 가지는 실수형함수이나 구현되지 않았습니다"
 
-#: src/main/arithmetic.c:1552
+#: src/main/arithmetic.c:1511
 #, c-format
-msgid "%d arguments passed to '%s' which requires 1 or 2"
-msgstr ""
-"'%2$s'는 1 또는 2개의 인자만을 필요로하지만 %1$d개의 인자들이 전달되었습니다"
+msgid "%d argument passed to '%s' which requires 1 or 2 arguments"
+msgid_plural "%d arguments passed to '%s'which requires 1 or 2 arguments"
+msgstr[0] "'1 또는 2개의 인자들을 필요로 하는 '%2$s'에 %1$d개의 인자들이 전달되었습니다."
 
-#: src/main/arithmetic.c:1570
+#: src/main/arithmetic.c:1530
 msgid "invalid second argument of length 0"
 msgstr "길이를 0으로 가지는 두번째 인자는 유효하지 않습니다"
 
-#: src/main/arithmetic.c:1639
+#: src/main/arithmetic.c:1625 src/main/arithmetic.c:1643 src/main/envir.c:1464
+#: src/main/envir.c:1972 src/main/eval.c:630 src/main/eval.c:4237
+#, c-format
+msgid "argument \"%s\" is missing, with no default"
+msgstr "기본값이 없는 인수 \"%s\"가 누락되어 있습니다"
+
+#: src/main/arithmetic.c:1649
 msgid "invalid argument 'base' of length 0"
 msgstr "길이가 0인 인자 'base'는 유효하지 않습니다"
 
-#: src/main/arithmetic.c:1647
-#, c-format
-msgid "%d arguments passed to 'log' which requires 1 or 2"
-msgstr ""
-"'log'함수는 1개 혹은 2개의 인자들을 필요로 하지만 %d개의 인자들이 전달되었습"
-"니다"
-
-#: src/main/array.c:79 src/main/array.c:1441
+#: src/main/array.c:82 src/main/array.c:1591
 #, c-format
 msgid "'data' must be of a vector type, was '%s'"
 msgstr "'data'는 반드시 벡터형이어야 하지만 '%s'입니다"
 
-#: src/main/array.c:94 src/main/array.c:102
+#: src/main/array.c:97 src/main/array.c:105
 msgid "non-numeric matrix extent"
 msgstr "행렬의 크기가 숫자로 지정되지 않았습니다"
 
-#: src/main/array.c:97 src/main/array.c:1535
+#: src/main/array.c:100 src/main/array.c:1695
 msgid "invalid 'nrow' value (too large or NA)"
 msgstr "'nrow'의 값이 유효하지 않습니다 (너무 크거나 NA입니다)"
 
-#: src/main/array.c:99 src/main/array.c:1537
+#: src/main/array.c:102 src/main/array.c:1697
 msgid "invalid 'nrow' value (< 0)"
 msgstr "'nrow'의 값이 유효하지 않습니다 (0보다 작습니다)"
 
-#: src/main/array.c:105 src/main/array.c:1540
+#: src/main/array.c:108 src/main/array.c:1700
 msgid "invalid 'ncol' value (too large or NA)"
 msgstr "'ncol'의 값이 유효하지 않습니다 (너무 크거나 NA입니다)"
 
-#: src/main/array.c:107 src/main/array.c:1542
+#: src/main/array.c:110 src/main/array.c:1702
 msgid "invalid 'ncol' value (< 0)"
 msgstr "'ncol'의 값이 유효하지 않습니다 (0보다 작습니다)"
 
-#: src/main/array.c:116
+#: src/main/array.c:119
 msgid "nc = 0 for non-null data"
 msgstr "null이 아닌 데이터에 열의 수가 0 입니다"
 
-#: src/main/array.c:124
+#: src/main/array.c:127
 msgid "nr = 0 for non-null data"
 msgstr "null이 아닌 데이터에 행의 수가 0입니다"
 
-#: src/main/array.c:135
+#: src/main/array.c:138
 #, c-format
-msgid ""
-"data length [%d] is not a sub-multiple or multiple of the number of rows [%d]"
+msgid "data length [%d] is not a sub-multiple or multiple of the number of rows [%d]"
 msgstr "데이터의 길이[%d]가 행의 개수[%d]의 배수가 되지 않습니다"
 
-#: src/main/array.c:138
+#: src/main/array.c:141
 #, c-format
-msgid ""
-"data length [%d] is not a sub-multiple or multiple of the number of columns "
-"[%d]"
+msgid "data length [%d] is not a sub-multiple or multiple of the number of columns [%d]"
 msgstr "데이터의 길이[%d]가 열의 개수[%d]의 배수가 되지 않습니다"
 
-#: src/main/array.c:141
+#: src/main/array.c:144
 msgid "data length exceeds size of matrix"
 msgstr "데이터의 길이가 행렬의 사이즈를 초과합니다"
 
-#: src/main/array.c:147 src/main/array.c:1453 src/main/array.c:1549
+#: src/main/array.c:150 src/main/array.c:1603 src/main/array.c:1709
 msgid "too many elements specified"
 msgstr "지정된 요소들의 개수가 너무 많습니다"
 
-#: src/main/array.c:205
+#: src/main/array.c:208
 msgid "negative extents to matrix"
 msgstr "행렬의 크기가 음수입니다"
 
-#: src/main/array.c:208
+#: src/main/array.c:211
 msgid "allocMatrix: too many elements specified"
 msgstr "allocMatrix: 지정된 요소들의 개수가 너무 많습니다"
 
-#: src/main/array.c:236
+#: src/main/array.c:239
 msgid "negative extents to 3D array"
 msgstr "3차원 배열의 크기가 음수입니다"
 
-#: src/main/array.c:239
+#: src/main/array.c:242
 msgid "'alloc3Darray': too many elements specified"
 msgstr "'alloc3Darray': 지정된 요소들의 개수가 너무 많습니다"
 
-#: src/main/array.c:264
+#: src/main/array.c:267
 msgid "'allocArray': too many elements specified by 'dims'"
 msgstr "'allocArray': 'dims'에 의하여 지정된 요소들의 개수가 너무 많습니다"
 
-#: src/main/array.c:448
+#: src/main/array.c:523
+#, c-format
+msgid "'%s' must be a list or atomic vector"
+msgstr "'%s'는 반드시 리스트(list) 또는 원형벡터(atomic vector)이어야 합니다. "
+
+#: src/main/array.c:561
 #, c-format
 msgid "a matrix-like object is required as argument to '%s'"
 msgstr "행렬과 같은 객체가 인자로서 '%s'에 전달되어져야 합니다"
 
-#: src/main/array.c:662
+#: src/main/array.c:776
 msgid "requires numeric/complex matrix/vector arguments"
 msgstr "수치 또는 복소수형태의 행렬 혹은 벡터 인자가 요구됩니다"
 
-#: src/main/array.c:752 src/main/array.c:756 src/main/array.c:760
+#: src/main/array.c:886 src/main/array.c:890 src/main/array.c:894
 msgid "non-conformable arguments"
 msgstr "적합한 인자들이 아닙니다"
 
-#: src/main/array.c:1058
+#: src/main/array.c:1193
 msgid "argument is not a matrix"
 msgstr "인자가 행렬을 가지지 않습니다"
 
-#: src/main/array.c:1093
+#: src/main/array.c:1228
 msgid "invalid first argument, must be an array"
 msgstr "첫번째 인자가 유효하지 않습니다.  반드시 배열이어야만 합니다"
 
-#: src/main/array.c:1107
+#: src/main/array.c:1242
 #, c-format
 msgid "'perm' is of wrong length %d (!= %d)"
 msgstr "'perm'의 길이는 %2$d이어야 하는데 %1$d입니다"
 
-#: src/main/array.c:1112 src/main/array.c:1115
+#: src/main/array.c:1247 src/main/array.c:1250
 msgid "'a' does not have named dimnames"
 msgstr "'a'는 이름이 주어진 dimnames를 가지고 있지 않습니다"
 
-#: src/main/array.c:1122
+#: src/main/array.c:1257
 #, c-format
 msgid "'perm[%d]' does not match a dimension name"
 msgstr "'perm[%d]'이 차원의 이름과 일치하지 않습니다"
 
-#: src/main/array.c:1135
+#: src/main/array.c:1270
 msgid "value out of range in 'perm'"
 msgstr "'perm'내에서 허용하는 범위외의 값입니다"
 
-#: src/main/array.c:1217
+#: src/main/array.c:1352
 msgid "'resize' must be TRUE or FALSE"
 msgstr "'resize'는 반드시 TRUE 또는 FALSE 이어야 합니다"
 
-#: src/main/array.c:1275
+#: src/main/array.c:1422
 msgid "'x' must be numeric"
 msgstr "'x'는 반드시 수치형이어야 합니다"
 
-#: src/main/array.c:1449
+#: src/main/array.c:1425
+msgid "'x' is too short"
+msgstr "'x'의 길이가 너무 짧습니다."
+
+#: src/main/array.c:1599
 msgid "'dims' cannot be of length 0"
 msgstr "'dims'의 길이가 0이 될 수 없습니다"
 
-#: src/main/array.c:1545
+#: src/main/array.c:1705
 msgid "'x' must have positive length"
 msgstr "'x'의 길이는 반드시 양수이어야 합니다"
 
-#: src/main/array.c:1605
+#: src/main/array.c:1771
 #, c-format
 msgid "singular matrix in 'backsolve'. First zero in diagonal [%d]"
-msgstr ""
-"'backsolve'에 비가역행렬이 있습니다.  대각행렬 [%d]의 첫번째가 제로입니다"
+msgstr "'backsolve'에 비가역행렬이 있습니다.  대각행렬 [%d]의 첫번째가 제로입니다"
 
-#: src/main/attrib.c:40 src/main/attrib.c:235 src/main/attrib.c:269
-#: src/main/attrib.c:291 src/main/attrib.c:405 src/main/attrib.c:452
-#: src/main/attrib.c:502
+#: src/main/attrib.c:40 src/main/attrib.c:231 src/main/attrib.c:265
+#: src/main/attrib.c:287 src/main/attrib.c:403 src/main/attrib.c:450
+#: src/main/attrib.c:501
 msgid "attempt to set an attribute on NULL"
 msgstr "NULL 객체에 속성부여를 시도했습니다"
 
-#: src/main/attrib.c:72
+#: src/main/attrib.c:77
 #, c-format
 msgid "row names must be 'character' or 'integer', not '%s'"
 msgstr "행 이름은 반드시 '문자형' 또는 '정수형'이어야 하는데 '%s'입니다"
 
-#: src/main/attrib.c:124
+#: src/main/attrib.c:130
 #, c-format
 msgid "getAttrib: invalid type (%s) for TAG"
 msgstr "getAttrib: TAG에 유효한 타입 %s가 아닙니다"
 
-#: src/main/attrib.c:379
+#: src/main/attrib.c:377
 #, c-format
 msgid "invalid type (%s) for 'names': must be vector"
-msgstr ""
-"'names'는 반드시 벡터이어야 하는데 유효하지 않은 타입 %s를 가지고 있습니다"
+msgstr "'names'는 반드시 벡터이어야 하는데 유효하지 않은 타입 %s를 가지고 있습니다"
 
-#: src/main/attrib.c:382
+#: src/main/attrib.c:380
 #, c-format
 msgid "'names' attribute [%d] must be the same length as the vector [%d]"
 msgstr "'names' 속성 [%d]는 반드시 벡터 [%d]와 같은 길이를 가져야 합니다"
 
-#: src/main/attrib.c:387
+#: src/main/attrib.c:385
 msgid "names() applied to a non-vector"
 msgstr "names()가 벡터가 아닌 객체에 적용되었습니다"
 
-#: src/main/attrib.c:395
+#: src/main/attrib.c:393
 msgid "invalid time series parameters specified"
 msgstr "유효한 시계열 파라미터가 지정되지 않았습니다"
 
-#: src/main/attrib.c:409
+#: src/main/attrib.c:407
 msgid "'tsp' attribute must be numeric"
 msgstr "'tsp'의 속성은 반드시 숫자이어야 합니다"
 
-#: src/main/attrib.c:415
+#: src/main/attrib.c:413
 msgid "'tsp' attribute must be numeric of length three"
 msgstr "'tsp'의 속성은 반드시 길이가 3인 숫자들로 이루어져야 합니다"
 
-#: src/main/attrib.c:432
+#: src/main/attrib.c:430
 msgid "cannot assign 'tsp' to zero-length vector"
 msgstr "길이가 0인 벡터에 'tsp'를 부여할 수 없습니다"
 
-#: src/main/attrib.c:463
+#: src/main/attrib.c:461
 msgid "attempt to set invalid 'comment' attribute"
 msgstr "유효하지 않은 'comment' 속성을 지정하려고 시도합니다"
 
-#: src/main/attrib.c:511
+#: src/main/attrib.c:510
 msgid "adding class \"factor\" to an invalid object"
 msgstr "유효하지 않은 객체에 클래스 \"factor\"를 추가하고 있습니다"
 
-#: src/main/attrib.c:519
+#: src/main/attrib.c:541
 msgid "attempt to set invalid 'class' attribute"
 msgstr "유효하지 않은 'class' 속성을 지정하려고 시도합니다"
 
-#: src/main/attrib.c:777
+#: src/main/attrib.c:872
 #, c-format
 msgid "class '%s' has no 'names' slot"
 msgstr "클래스 '%s'는 'names' 슬롯을 가지고 있지 않습니다"
 
-#: src/main/attrib.c:779
+#: src/main/attrib.c:874
 #, c-format
-msgid ""
-"class '%s' has no 'names' slot; assigning a names attribute will create an "
-"invalid object"
-msgstr ""
-"클래스 '%s'는 아무런 'names' 슬롯을 가지지 않기 때문에 names 속성을 부여하는 "
-"것은 유효하지 않은 객체를 생성하게 할 것입니다"
+msgid "class '%s' has no 'names' slot; assigning a names attribute will create an invalid object"
+msgstr "클래스 '%s'는 아무런 'names' 슬롯을 가지지 않기 때문에 names 속성을 부여하는 것은 유효하지 않은 객체를 생성하게 할 것입니다"
 
-#: src/main/attrib.c:782
+#: src/main/attrib.c:877
 #, c-format
-msgid ""
-"invalid to use names()<- to set the 'names' slot in a non-vector class ('%s')"
-msgstr ""
-"벡터가 아닌 클래스 ('%s')에 있는 'names' 슬롯을 지정하기 위해서 names()<- 와 "
-"같은 구문을 이용하는 것은 유효하지 않습니다"
+msgid "invalid to use names()<- to set the 'names' slot in a non-vector class ('%s')"
+msgstr "벡터가 아닌 클래스 ('%s')에 있는 'names' 슬롯을 지정하기 위해서 names()<- 와 같은 구문을 이용하는 것은 유효하지 않습니다"
 
-#: src/main/attrib.c:812
+#: src/main/attrib.c:907
 msgid "incompatible 'names' argument"
 msgstr "'names' 인자는 함께 사용될 수 없습니다"
 
-#: src/main/attrib.c:867
+#: src/main/attrib.c:962
 #, c-format
 msgid "invalid type (%s) to set 'names' attribute"
 msgstr "%s는 'names' 속성을 지정하는데 유효한 타입이 아닙니다"
 
-#: src/main/attrib.c:938
+#: src/main/attrib.c:1035
 msgid "'dimnames' applied to non-array"
 msgstr "'dimnames'가 배열이 아닌 객체에 적용되었습니다"
 
-#: src/main/attrib.c:943
-msgid "'dimnames' must be a list"
-msgstr "'dimnames'은 반드시 리스트이어야 합니다"
+#: src/main/attrib.c:1040 src/main/coerce.c:2471
+#, c-format
+msgid "'%s' must be a list"
+msgstr "'%s'는 반드시 리스트(list)이어야 합니다. "
 
-#: src/main/attrib.c:946 src/main/attrib.c:974
+#: src/main/attrib.c:1043 src/main/attrib.c:1071
 #, c-format
 msgid "length of 'dimnames' [%d] must match that of 'dims' [%d]"
 msgstr "'dimnames'의 길이 [%d]는 반드시 'dims'의 길이 [%d]와 같아야 합니다"
 
-#: src/main/attrib.c:980
+#: src/main/attrib.c:1077
 #, c-format
 msgid "invalid type (%s) for 'dimnames' (must be a vector)"
-msgstr ""
-"%s는 'dimnames'에 유효한 유형이 아닙니다 (이는 반드시 벡터이어야 합니다)"
+msgstr "%s는 'dimnames'에 유효한 유형이 아닙니다 (이는 반드시 벡터이어야 합니다)"
 
-#: src/main/attrib.c:983
+#: src/main/attrib.c:1080
 #, c-format
 msgid "length of 'dimnames' [%d] not equal to array extent"
 msgstr "'dimnames'의 길이 [%d]가 배열의 크기와 같지 않습니다"
 
-#: src/main/attrib.c:1055 src/main/builtin.c:75 src/main/builtin.c:112
-#: src/main/envir.c:1606 src/main/envir.c:1734 src/main/envir.c:1796
-#: src/main/envir.c:1918 src/main/paste.c:74 src/main/paste.c:293
-#: src/main/random.c:487 src/main/random.c:516 src/main/unique.c:1749
+#: src/main/attrib.c:1152 src/main/builtin.c:75 src/main/builtin.c:112
+#: src/main/envir.c:1740 src/main/envir.c:1868 src/main/envir.c:1928
+#: src/main/envir.c:2065 src/main/paste.c:74 src/main/paste.c:293
+#: src/main/random.c:479 src/main/random.c:508 src/main/unique.c:1746
 msgid "invalid first argument"
 msgstr "첫번째 인자가 유효하지 않습니다"
 
-#: src/main/attrib.c:1058
+#: src/main/attrib.c:1155
 msgid "invalid second argument"
 msgstr "두번째 인자가 유효하지 않습니다"
 
-#: src/main/attrib.c:1066
+#: src/main/attrib.c:1163
 msgid "length-0 dimension vector is invalid"
 msgstr "차원벡터의 길이가 0인 것은 유효하지 않습니다"
 
-#: src/main/attrib.c:1071
+#: src/main/attrib.c:1168
 msgid "the dims contain missing values"
 msgstr "dims에 누락된 값들이 있습니다"
 
-#: src/main/attrib.c:1073
+#: src/main/attrib.c:1170
 msgid "the dims contain negative values"
 msgstr "dims에 음수값들이 포함되어 있습니다"
 
-#: src/main/attrib.c:1078
+#: src/main/attrib.c:1175
 msgid "dims do not match the length of object"
 msgstr "dims가 객체의 길이와 일치하지 않습니다"
 
-#: src/main/attrib.c:1080
+#: src/main/attrib.c:1177
 #, c-format
 msgid "dims [product %d] do not match the length of object [%d]"
 msgstr "dims [product %d]가 객체 [%d]의 길이와 일치하지 않습니다"
 
-#: src/main/attrib.c:1177
+#: src/main/attrib.c:1284
 msgid "attributes must be a list or NULL"
 msgstr "속성들은 반드시 리스트 또는 NULL이어야 합니다"
 
-#: src/main/attrib.c:1182
+#: src/main/attrib.c:1289
 msgid "attributes must be named"
 msgstr "속성들은 반드시 이름이 주어져야 합니다"
 
-#: src/main/attrib.c:1186
+#: src/main/attrib.c:1293
 #, c-format
 msgid "all attributes must have names [%d does not]"
-msgstr ""
-"모든 속성들은 반드시 이름을 가지고 있어야 합니다 [그러나 %d는 그렇지 않습니"
-"다]"
+msgstr "모든 속성들은 반드시 이름을 가지고 있어야 합니다 [그러나 %d는 그렇지 않습니다]"
 
-#: src/main/attrib.c:1285
+#: src/main/attrib.c:1393
 msgid "'which' must be of mode character"
 msgstr "'which'는 반드시 문자형 모드이어야 합니다"
 
-#: src/main/attrib.c:1287
+#: src/main/attrib.c:1395
 msgid "exactly one attribute 'which' must be given"
 msgstr "오로지 한개의 속성만이 'which'에 주어질 수 있습니다"
 
-#: src/main/attrib.c:1345 src/main/attrib.c:1368 src/main/subscript.c:240
-#: src/main/subscript.c:244 src/main/subset.c:1188 src/main/subset.c:1239
+#: src/main/attrib.c:1456 src/main/attrib.c:1479 src/main/subscript.c:245
+#: src/main/subscript.c:249 src/main/subset.c:1257 src/main/subset.c:1311
 #, c-format
 msgid "partial match of '%s' to '%s'"
 msgstr "'%s'는 '%s'에 부분적으로만 일치합니다"
 
-#: src/main/attrib.c:1406
+#: src/main/attrib.c:1525
 #, c-format
 msgid "invalid type '%s' for slot name"
 msgstr "'%s'는 슬롯이름에 유효한 타입이 아닙니다"
 
-#: src/main/attrib.c:1444
+#: src/main/attrib.c:1563
 msgid "'name' must be non-null character string"
 msgstr "'name'은 반드시 NULL이 아닌 문자열이어야 합니다"
 
-#: src/main/attrib.c:1568 src/main/attrib.c:1639 src/main/attrib.c:1676
+#: src/main/attrib.c:1688 src/main/attrib.c:1759 src/main/attrib.c:1797
 msgid "invalid type or length for slot name"
 msgstr "슬롯이름의 유형 또는 길이가 잘못되었습니다"
 
-#: src/main/attrib.c:1602
+#: src/main/attrib.c:1722
 #, c-format
 msgid "cannot get a slot (\"%s\") from an object of type \"%s\""
 msgstr "유형 \"%2$s\"를 가지는 객체로부터 슬롯 (\"%1$s\")를 얻을 수 없습니다"
 
-#: src/main/attrib.c:1613
+#: src/main/attrib.c:1733
 #, c-format
 msgid "no slot of name \"%s\" for this object of class \"%s\""
-msgstr ""
-"클래스 \"%2$s\"를 가지는 이 객체에는 \"%1$s\" 이름을 가진 슬롯이 없습니다"
+msgstr "클래스 \"%2$s\"를 가지는 이 객체에는 \"%1$s\" 이름을 가진 슬롯이 없습니다"
 
-#: src/main/attrib.c:1630
+#: src/main/attrib.c:1750
 msgid "attempt to set slot on NULL object"
 msgstr "NULL 객체에 슬롯을 지정하려고 했습니다"
 
-#: src/main/attrib.c:1671
+#: src/main/attrib.c:1792
 msgid "formal classes cannot be used without the 'methods' package"
 msgstr "'methods' 패키지없이 formal classes를 사용할 수 없습니다"
 
-#: src/main/attrib.c:1683
+#: src/main/attrib.c:1804
 #, c-format
-msgid ""
-"trying to get slot \"%s\" from an object of a basic class (\"%s\") with no "
-"slots"
-msgstr ""
-"슬롯이 없는 기본 클래스 (\"%2$s\")로부터 슬롯 \"%1$s\"를 가져오려 했습니다"
+msgid "trying to get slot \"%s\" from an object of a basic class (\"%s\") with no slots"
+msgstr "슬롯이 없는 기본 클래스 (\"%2$s\")로부터 슬롯 \"%1$s\"를 가져오려 했습니다"
 
-#: src/main/attrib.c:1687
+#: src/main/attrib.c:1808
 #, c-format
-msgid ""
-"trying to get slot \"%s\" from an object (class \"%s\") that is not an S4 "
-"object "
-msgstr ""
-"S4 객체가 아닌 클래스 \"%2$s\"인 객체로부터 슬롯 \"%1$s\"를 가져오려했습니다"
+msgid "trying to get slot \"%s\" from an object (class \"%s\") that is not an S4 object "
+msgstr "S4 객체가 아닌 클래스 \"%2$s\"인 객체로부터 슬롯 \"%1$s\"를 가져오려했습니다"
 
-#: src/main/bind.c:161
+#: src/main/bind.c:164
 #, c-format
 msgid "resulting vector exceeds vector length limit in '%s'"
 msgstr "'%s'내에서 초래된 벡터는 벡터의 길이제한을 넘어섭니다"
 
-#: src/main/bind.c:291 src/main/bind.c:327 src/main/bind.c:376
-#: src/main/bind.c:449 src/main/bind.c:477
+#: src/main/bind.c:294 src/main/bind.c:330 src/main/bind.c:379
+#: src/main/bind.c:452 src/main/bind.c:480
 #, c-format
 msgid "type '%s' is unimplemented in '%s'"
 msgstr "타입 '%s'는 아직 '%s'에서 구현되지 않았습니다"
 
-#: src/main/bind.c:685
+#: src/main/bind.c:688
 msgid "repeated formal argument 'recursive'"
 msgstr "형식인자 'recursive'가 반복됩니다"
 
-#: src/main/bind.c:696
+#: src/main/bind.c:699
 msgid "repeated formal argument 'use.names'"
 msgstr "형식인자 'use.names'가 반복됩니다"
 
-#: src/main/bind.c:894
+#: src/main/bind.c:900
 msgid "argument not a list"
 msgstr "리스트가 아닌 인자입니다"
 
-#: src/main/bind.c:1038 src/main/eval.c:2691 src/main/eval.c:2700
-#: src/main/objects.c:318 src/main/objects.c:354 src/main/objects.c:729
-#: src/main/objects.c:746 src/main/objects.c:753
+#: src/main/bind.c:1044 src/main/names.c:1273 src/main/names.c:1278
+#: src/main/names.c:1283 src/main/names.c:1288
 #, c-format
 msgid "class name too long in '%s'"
 msgstr "'%s'내에 있는 클래스명이 너무 깁니다"
 
-#: src/main/bind.c:1114
+#: src/main/bind.c:1128
 #, c-format
 msgid "cannot create a matrix from type '%s'"
 msgstr "타입 '%s'으로부터 행렬을 생성할 수 없습니다"
 
-#: src/main/bind.c:1185
+#: src/main/bind.c:1198
 #, c-format
 msgid "number of rows of matrices must match (see arg %d)"
-msgstr ""
-"각각의 행렬이 가진 행의 개수는 반드시 서로 일치해야 합니다 (인자 %d를 참고하"
-"세요)"
+msgstr "각각의 행렬이 가진 행의 개수는 반드시 서로 일치해야 합니다 (인자 %d를 참고하세요)"
 
-#: src/main/bind.c:1430
+#: src/main/bind.c:1455
 #, c-format
 msgid "number of columns of matrices must match (see arg %d)"
-msgstr ""
-"각각의 행렬이 가진 열의 개수는 반드시 서로 일치해야 합니다 (인자 %d를 참고하"
-"세요)"
+msgstr "각각의 행렬이 가진 열의 개수는 반드시 서로 일치해야 합니다 (인자 %d를 참고하세요)"
 
 #: src/main/builtin.c:43
 msgid "vector size cannot be NA"
 msgstr "벡터의 크기는 NA일 수 없습니다"
 
-#: src/main/builtin.c:49 src/main/builtin.c:57 src/main/sort.c:1303
+#: src/main/builtin.c:49 src/main/builtin.c:57 src/main/sort.c:1323
 msgid "vector size cannot be NA/NaN"
 msgstr "벡터의 크기는 NA 또는 NaN 일 수 없습니다"
 
-#: src/main/builtin.c:50 src/main/builtin.c:58 src/main/sort.c:1304
+#: src/main/builtin.c:50 src/main/builtin.c:58 src/main/sort.c:1324
 msgid "vector size cannot be infinite"
 msgstr "벡터의 크기는 무한할 수 없습니다"
 
-#: src/main/builtin.c:51 src/main/builtin.c:59 src/main/builtin.c:916
-#: src/main/sort.c:1305
+#: src/main/builtin.c:51 src/main/builtin.c:59 src/main/builtin.c:950
+#: src/main/sort.c:1325
 msgid "vector size specified is too large"
 msgstr "지정된 벡터의 크기가 너무 큽니다"
 
-#: src/main/builtin.c:84 src/main/builtin.c:93 src/main/builtin.c:293
-#: src/main/builtin.c:326 src/main/builtin.c:365 src/main/builtin.c:375
-#: src/main/coerce.c:1537 src/main/connections.c:3066 src/main/engine.c:2967
-#: src/main/envir.c:993 src/main/envir.c:1046 src/main/envir.c:1136
-#: src/main/envir.c:1615 src/main/envir.c:1739 src/main/envir.c:1807
-#: src/main/envir.c:1925 src/main/envir.c:2582 src/main/envir.c:2642
-#: src/main/envir.c:2922 src/main/envir.c:2951 src/main/envir.c:2972
-#: src/main/envir.c:2995 src/main/envir.c:3030 src/main/envir.c:3051
-#: src/main/envir.c:3357 src/main/envir.c:3362 src/main/eval.c:5318
-#: src/main/objects.c:197 src/main/objects.c:203 src/main/saveload.c:2070
-#: src/main/saveload.c:2364 src/main/serialize.c:2709
+#: src/main/builtin.c:84 src/main/builtin.c:93 src/main/builtin.c:304
+#: src/main/builtin.c:337 src/main/builtin.c:394 src/main/builtin.c:408
+#: src/main/coerce.c:1536 src/main/connections.c:3062 src/main/engine.c:2987
+#: src/main/envir.c:1001 src/main/envir.c:1054 src/main/envir.c:1210
+#: src/main/envir.c:1749 src/main/envir.c:1873 src/main/envir.c:1939
+#: src/main/envir.c:2072 src/main/envir.c:2791 src/main/envir.c:2877
+#: src/main/envir.c:3182 src/main/envir.c:3211 src/main/envir.c:3232
+#: src/main/envir.c:3255 src/main/envir.c:3290 src/main/envir.c:3311
+#: src/main/envir.c:3632 src/main/envir.c:3637 src/main/eval.c:6251
+#: src/main/objects.c:191 src/main/objects.c:199 src/main/saveload.c:2072
+#: src/main/saveload.c:2364 src/main/serialize.c:2755
 msgid "use of NULL environment is defunct"
 msgstr "NULL 인바이런먼트의 사용은 더이상 지원되지 않습니다"
 
-#: src/main/builtin.c:306
+#: src/main/builtin.c:250 src/main/builtin.c:263
+msgid "argument is not a function"
+msgstr "함수를 인자로 받지 않았습니다."
+
+#: src/main/builtin.c:317
 msgid "replacement object is not an environment"
 msgstr "대체객체는 인바이런먼트가 아닙니다"
 
-#: src/main/builtin.c:331
+#: src/main/builtin.c:342
 msgid "'enclos' must be an environment"
 msgstr "'enclos'는 반드시 인바이런먼트이어야 합니다"
 
-#: src/main/builtin.c:352 src/main/builtin.c:370
+#: src/main/builtin.c:363 src/main/builtin.c:399
 msgid "argument is not an environment"
 msgstr "인자는 인바이런먼트이 아닙니다"
 
-#: src/main/builtin.c:354
+#: src/main/builtin.c:365
 msgid "the empty environment has no parent"
 msgstr "비어있는 인바이런먼트는 모체를 가지지 않습니다"
 
-#: src/main/builtin.c:372
+#: src/main/builtin.c:401
 msgid "can not set parent of the empty environment"
 msgstr "비어있는 인바이런먼트는 모체를 지정할 수 없습니다"
 
-#: src/main/builtin.c:380
+#: src/main/builtin.c:403
+msgid "can not set the parent environment of a namespace"
+msgstr ""
+
+#: src/main/builtin.c:405
+msgid "can not set the parent environment of package imports"
+msgstr ""
+
+#: src/main/builtin.c:413
 msgid "'parent' is not an environment"
 msgstr "'parent'는 인바이런먼트가 아닙니다"
 
-#: src/main/builtin.c:521 src/main/connections.c:3691
-#: src/main/connections.c:4068 src/main/connections.c:4102
-#: src/main/connections.c:4480 src/main/connections.c:4550
-#: src/main/connections.c:4759 src/main/connections.c:4763
-#: src/main/connections.c:5124 src/main/deparse.c:360 src/main/deparse.c:446
-#: src/main/serialize.c:2006
+#: src/main/builtin.c:556 src/main/connections.c:3687
+#: src/main/connections.c:4079 src/main/connections.c:4113
+#: src/main/connections.c:4491 src/main/connections.c:4561
+#: src/main/connections.c:4772 src/main/connections.c:4776
+#: src/main/connections.c:5199 src/main/deparse.c:369 src/main/deparse.c:458
+#: src/main/serialize.c:2045
 msgid "cannot write to this connection"
 msgstr "이 연결에 쓰기를 할 수 없습니다"
 
-#: src/main/builtin.c:526 src/main/builtin.c:556
+#: src/main/builtin.c:561 src/main/builtin.c:591
 #, c-format
 msgid "invalid '%s' specification"
 msgstr "'%s' 지정이 유효하지 않습니다"
 
-#: src/main/builtin.c:543
+#: src/main/builtin.c:578
 msgid "non-positive 'fill' argument will be ignored"
 msgstr "양수가 아닌 'fill' 인자는 무시되어질 것입니다"
 
-#: src/main/builtin.c:618
+#: src/main/builtin.c:653
 #, c-format
 msgid "argument %d (type '%s') cannot be handled by 'cat'"
 msgstr "타입 '%2$s'인 인자 %1$d는 'cat'에 의하여 다루어 질 수 없습니다"
 
-#: src/main/builtin.c:763
+#: src/main/builtin.c:797
 #, c-format
 msgid "vector: cannot make a vector of mode '%s'."
 msgstr "벡터: 모드가 '%s'인 벡터를 만들 수 없습니다."
 
-#: src/main/builtin.c:789
+#: src/main/builtin.c:823
 msgid "cannot set length of non-vector"
 msgstr "벡터가 아닌 것은 길이를 지정할 수 없습니다"
 
-#: src/main/builtin.c:897 src/main/builtin.c:907 src/main/options.c:637
+#: src/main/builtin.c:931 src/main/builtin.c:941 src/main/options.c:659
 msgid "invalid argument"
 msgstr "유효하지 않은 인자입니다"
 
-#: src/main/builtin.c:899 src/main/builtin.c:909 src/main/builtin.c:911
-#: src/main/character.c:366 src/main/coerce.c:2765
+#: src/main/builtin.c:933 src/main/builtin.c:943 src/main/builtin.c:945
+#: src/main/character.c:525 src/main/coerce.c:2832
 msgid "invalid value"
 msgstr "유효하지 않은 값입니다"
 
-#: src/main/builtin.c:942 src/main/coerce.c:2478 src/main/coerce.c:2519
-#: src/main/eval.c:563 src/main/eval.c:683 src/main/eval.c:2099
-#: src/main/eval.c:2176 src/main/eval.c:2236 src/main/eval.c:2569
-#: src/main/eval.c:4694 src/main/eval.c:4814
+#: src/main/builtin.c:976 src/main/coerce.c:2541 src/main/coerce.c:2584
+#: src/main/eval.c:620 src/main/eval.c:740 src/main/eval.c:2266
+#: src/main/eval.c:2346 src/main/eval.c:2407 src/main/eval.c:2745
+#: src/main/eval.c:5584 src/main/eval.c:5701
 msgid "'...' used in an incorrect context"
 msgstr "'...'가 잘못된 맥락에서 사용되었습니다"
 
-#: src/main/builtin.c:963
+#: src/main/builtin.c:998
 #, c-format
 msgid "duplicate 'switch' defaults: '%s' and '%s'"
 msgstr "'switch'의 기본값으로 '%1$s'와 '%2$s'가 중복됩니다"
 
-#: src/main/builtin.c:996
+#: src/main/builtin.c:1031
 msgid "'EXPR' is missing"
 msgstr "'EXPR'이 없습니다"
 
-#: src/main/builtin.c:1000 src/main/eval.c:5155
+#: src/main/builtin.c:1035 src/main/eval.c:6056
 msgid "EXPR must be a length 1 vector"
 msgstr "EXPR은 반드시 길이가 1인 벡터이어야 합니다"
 
-#: src/main/builtin.c:1003
+#: src/main/builtin.c:1038 src/main/eval.c:6059
 #, c-format
 msgid ""
 "EXPR is a \"factor\", treated as integer.\n"
@@ -1424,94 +1426,111 @@ msgstr ""
 "EXPR는 정수로서 다루어지는 \"factor\"입니다.\n"
 " 대신 '%s'을 사용해보세요."
 
-#: src/main/character.c:105 src/main/character.c:108 src/main/character.c:132
-#: src/main/character.c:135
+#: src/main/builtin.c:1095 src/main/eval.c:6069 src/main/eval.c:6098
+msgid "'switch' with no alternatives"
+msgstr ""
+
+#: src/main/character.c:103 src/main/character.c:224
+#, c-format
+msgid "%d argument passed to '%s' which requires %d to %d"
+msgid_plural "%d arguments passed to '%s' which requires %d to %d"
+msgstr[0] ""
+
+#: src/main/character.c:110 src/main/character.c:113 src/main/character.c:232
+#: src/main/character.c:235
 #, c-format
 msgid "'%s' requires a character vector"
 msgstr "'%s'은 문자형 벡터를 필요로 합니다"
 
-#: src/main/character.c:164
+#: src/main/character.c:150 src/main/character.c:165 src/main/character.c:175
+#: src/main/character.c:203
 #, c-format
-msgid ""
-"number of characters is not computable for element %d in \"bytes\" encoding"
+msgid "invalid multibyte string, %s"
 msgstr ""
-"요소 %d에 대한 글자의 개수를 \"bytes\" 인코딩으로는 계산을 할 수 없습니다"
 
-#: src/main/character.c:169 src/main/character.c:197 src/main/character.c:653
-#: src/main/character.c:750
+#: src/main/character.c:159
 #, c-format
-msgid "invalid multibyte string %d"
-msgstr "유효하지 않은 멀티바이트 문자열 %d입니다"
+msgid "number of characters is not computable in \"bytes\" encoding, %s"
+msgstr ""
 
-#: src/main/character.c:185
+#: src/main/character.c:188
 #, c-format
-msgid "width is not computable for element %d in \"bytes\" encoding"
-msgstr "요소 %d에 대한 너비를 \"bytes\" 인코딩으로는 계산을 할 수 없습니다"
+msgid "width is not computable for %s in \"bytes\" encoding"
+msgstr ""
 
-#: src/main/character.c:263
+#: src/main/character.c:311
 msgid "extracting substrings from a non-character object"
 msgstr "문자형이 아닌 객체로부터 부분문자열들을 추출하려고 했습니다"
 
-#: src/main/character.c:268 src/main/character.c:363
+#: src/main/character.c:321 src/main/character.c:522
 msgid "invalid substring arguments"
 msgstr "유효하지 않은 부분문자열 인자들입니다"
 
-#: src/main/character.c:358
+#: src/main/character.c:361
+msgid "non-character object(s)"
+msgstr "문자형 객체(들)가 아닙니다."
+
+#: src/main/character.c:517
 msgid "replacing substrings in a non-character object"
 msgstr "문자형이 아닌 객체에서 부분문자열들을 대체합니다"
 
-#: src/main/character.c:551
+#: src/main/character.c:785
 msgid "the first argument must be a character vector"
 msgstr "첫번째 인자는 반드시 문자형 벡터이어야 합니다"
 
-#: src/main/character.c:570
+#: src/main/character.c:822
 msgid "abbreviate used with non-ASCII chars"
 msgstr "아스키 문자가 아닌 것을 사용한 약어입니다"
 
-#: src/main/character.c:591
+#: src/main/character.c:843
 msgid "non-character names"
 msgstr "문자로 이루어지지 않은 이름들입니다"
 
-#: src/main/character.c:696 src/main/grep.c:159
+#: src/main/character.c:905 src/main/character.c:1002
+#, c-format
+msgid "invalid multibyte string %d"
+msgstr "유효하지 않은 멀티바이트 문자열 %d입니다"
+
+#: src/main/character.c:948 src/main/grep.c:163
 msgid "non-character argument"
 msgstr "문자형을 가지지 않는 인자입니다"
 
-#: src/main/character.c:805
+#: src/main/character.c:1057
 #, c-format
 msgid "decreasing range specification ('%lc-%lc')"
 msgstr "범위지정을 축소합니다 ('%lc-%lc')"
 
-#: src/main/character.c:891
+#: src/main/character.c:1143
 #, c-format
 msgid "decreasing range specification ('%c-%c')"
 msgstr "범위지정을 축소합니다 ('%c-%c')"
 
-#: src/main/character.c:1079
+#: src/main/character.c:1331
 msgid "invalid UTF-8 string 'old'"
 msgstr "유효하지 않은 UTF-8 문자열 'old'입니다"
 
-#: src/main/character.c:1085
+#: src/main/character.c:1337
 msgid "invalid multibyte string 'old'"
 msgstr "유효하지 않은 멀티바이트 문자열 'old'입니다"
 
-#: src/main/character.c:1098
+#: src/main/character.c:1350
 msgid "invalid UTF-8 string 'new'"
 msgstr "유효하지 않은 UTF-8 문자열 'new'입니다"
 
-#: src/main/character.c:1104
+#: src/main/character.c:1356
 msgid "invalid multibyte string 'new'"
 msgstr "유효하지 않은 멀티바이트 문자열 'new'입니다"
 
-#: src/main/character.c:1132 src/main/character.c:1221
+#: src/main/character.c:1384 src/main/character.c:1473
 msgid "'old' is longer than 'new'"
 msgstr "'old'의 길이가 'new'의 길이보다 깁니다"
 
-#: src/main/character.c:1164
+#: src/main/character.c:1416
 #, c-format
 msgid "invalid input multibyte string %d"
 msgstr "유효하지 않은 멀티바이트 문자열 %d가 입력되었습니다"
 
-#: src/main/character.c:1271
+#: src/main/character.c:1523
 msgid "strtrim() requires a character vector"
 msgstr "strtrim()는 문자형 벡터를 필요로 합니다"
 
@@ -1523,15 +1542,15 @@ msgstr "유효하지 않은 'mode' 인자입니다"
 msgid "applies only to lists and vectors"
 msgstr "오로지 리스트와 벡터에만 적용됩니다"
 
-#: src/main/coerce.c:77 src/main/errors.c:1208
+#: src/main/coerce.c:77 src/main/errors.c:1194
 msgid "NAs introduced by coercion"
 msgstr "강제형변환에 의해 생성된 NA 입니다"
 
-#: src/main/coerce.c:79 src/main/errors.c:1209
-msgid "inaccurate integer conversion in coercion"
-msgstr "강제형변환중 부정확한 정수변환이 발생했습니다"
+#: src/main/coerce.c:79
+msgid "NAs introduced by coercion to integer range"
+msgstr ""
 
-#: src/main/coerce.c:81 src/main/errors.c:1210
+#: src/main/coerce.c:81 src/main/errors.c:1196
 msgid "imaginary parts discarded in coercion"
 msgstr "강제형변환중에 허수부분이 버려졌습니다"
 
@@ -1539,59 +1558,63 @@ msgstr "강제형변환중에 허수부분이 버려졌습니다"
 msgid "out-of-range values treated as 0 in coercion to raw"
 msgstr "강제형변환중 범위밖의 값들은 0으로 처리됩니다"
 
-#: src/main/coerce.c:414
+#: src/main/coerce.c:399
 #, c-format
 msgid "invalid data of mode '%s' (too short)"
 msgstr "유효하지 않은 데이터의 모드 '%s'입니다 (너무 짧습니다)"
 
-#: src/main/coerce.c:1016
+#: src/main/coerce.c:1002
 #, c-format
 msgid "'pairlist' object cannot be coerced to type '%s'"
 msgstr "'pairlist' 객체는 유형 '%s'로 강제형변환될 수 없습니다"
 
-#: src/main/coerce.c:1134
+#: src/main/coerce.c:1120
 #, c-format
 msgid "(list) object cannot be coerced to type '%s'"
 msgstr "(리스트) 객체는 유형 '%s'로 강제형변환 될 수 없습니다"
 
-#: src/main/coerce.c:1157
+#: src/main/coerce.c:1143
 #, c-format
 msgid "(symbol) object cannot be coerced to type '%s'"
 msgstr "(기호) 객체는 유형 '%s'로 강제형변환 될 수 없습니다"
 
-#: src/main/coerce.c:1173 src/main/coerce.c:1485
+#: src/main/coerce.c:1159 src/main/coerce.c:1484
 msgid "no method for coercing this S4 class to a vector"
 msgstr "본 S4 클래스를 벡터로 강제형변환하는 방법은 없습니다"
 
-#: src/main/coerce.c:1232
+#: src/main/coerce.c:1222
 msgid "environments cannot be coerced to other types"
 msgstr "인바이런먼트들은 다른 유형으로 강제형변환될 수 없습니다"
 
-#: src/main/coerce.c:1379
+#: src/main/coerce.c:1374
 msgid "attempting to coerce non-factor"
 msgstr "요인이 아닌 것으로 강제형변환을 시도하고 있습니다"
 
-#: src/main/coerce.c:1533
+#: src/main/coerce.c:1379 src/main/coerce.c:1389
+msgid "malformed factor"
+msgstr "잘못된 요소"
+
+#: src/main/coerce.c:1532
 msgid "list argument expected"
 msgstr "리스트 인자가 와야합니다"
 
-#: src/main/coerce.c:1541 src/main/eval.c:5322
+#: src/main/coerce.c:1540 src/main/eval.c:6255
 msgid "invalid environment"
 msgstr "유효하지 않은 인바이런먼트입니다"
 
-#: src/main/coerce.c:1545
+#: src/main/coerce.c:1544
 msgid "argument must have length at least 1"
 msgstr "인자는 반드시 길이가 최소 1 이어야 합니다"
 
-#: src/main/coerce.c:1567
+#: src/main/coerce.c:1566
 msgid "invalid body for function"
 msgstr "함수에 대한 내용이 유효하지 않습니다"
 
-#: src/main/coerce.c:1590
+#: src/main/coerce.c:1589
 msgid "invalid length 0 argument"
 msgstr "길이가 0인 유효하지 않은 인자입니다"
 
-#: src/main/coerce.c:1605
+#: src/main/coerce.c:1604
 msgid "invalid argument list"
 msgstr "인자 목록이 유효하지 않습니다"
 
@@ -1601,836 +1624,792 @@ msgstr "타입 \"single\"은 R에서 구현되지 않았습니다"
 
 #: src/main/coerce.c:1918
 msgid "unimplemented predicate"
-msgstr ""
+msgstr "구현되지 않은 조건자"
 
-#: src/main/coerce.c:2069
+#: src/main/coerce.c:2070
 #, c-format
 msgid "%s() applied to non-(list or vector) of type '%s'"
 msgstr "%s()는 유형이 '%s'인 (리스트 또는 벡터)가 아닌 것에 적용되었습니다"
 
-#: src/main/coerce.c:2212 src/main/coerce.c:2275 src/main/coerce.c:2343
+#: src/main/coerce.c:2267 src/main/coerce.c:2331 src/main/coerce.c:2403
 #, c-format
 msgid "default method not implemented for type '%s'"
 msgstr "유형 '%s'에 대한 기본메소드는 구현되지 않았습니다"
 
-#: src/main/coerce.c:2361
+#: src/main/coerce.c:2425
 msgid "'name' is missing"
 msgstr "'name'이 없습니다"
 
-#: src/main/coerce.c:2368
+#: src/main/coerce.c:2432
 msgid "first argument must be a character string"
 msgstr "첫번째 인자는 반드시 문자열이어야 합니다"
 
-#: src/main/coerce.c:2401
-msgid "'what' must be a character string or a function"
-msgstr "'what'은 반드시 문자열 또는 함수이어야 합니다"
+#: src/main/coerce.c:2464
+msgid "'what' must be a function or character string"
+msgstr "'what'은 반드시 함수이거나 문자열이어야 합니다."
 
-#: src/main/coerce.c:2405
+#: src/main/coerce.c:2468
 msgid "'args' must be a list or expression"
 msgstr "'args'는 반드시 리스트 또는 익스프레이션이어야 합니다"
 
-#: src/main/coerce.c:2408
-msgid "'args' must be a list"
-msgstr "'args'는 반드시 리스트이어야 합니다"
-
-#: src/main/coerce.c:2412
+#: src/main/coerce.c:2475 src/main/unique.c:1345
 msgid "'envir' must be an environment"
 msgstr "'envir'는 반드시 인바이런먼트이어야 합니다"
 
-#: src/main/coerce.c:2567
+#: src/main/coerce.c:2634
 msgid "invalid environment specified"
 msgstr "지정된 인바이런먼트는 유효하지 않습니다"
 
-#: src/main/coerce.c:2633
+#: src/main/coerce.c:2700
 msgid "Setting class(x) to NULL;   result will no longer be an S4 object"
 msgstr "class(x)를 NULL로 설정했기 때문에 결과는 더이상 S4 객체가 아닙니다"
 
-#: src/main/coerce.c:2636
+#: src/main/coerce.c:2703
 #, c-format
-msgid ""
-"Setting class(x) to multiple strings (\"%s\", \"%s\", ...); result will no "
-"longer be an S4 object"
-msgstr ""
-"class(x)를 다중문자열 (\"%s\", \"%s\", ...)로 설정했기 때문에 결과는 더이상 "
-"S4 객체가 아닙니다"
+msgid "Setting class(x) to multiple strings (\"%s\", \"%s\", ...); result will no longer be an S4 object"
+msgstr "class(x)를 다중문자열 (\"%s\", \"%s\", ...)로 설정했기 때문에 결과는 더이상 S4 객체가 아닙니다"
 
-#: src/main/coerce.c:2640
+#: src/main/coerce.c:2707
 #, c-format
-msgid ""
-"Setting class(x) to \"%s\" sets attribute to NULL; result will no longer be "
-"an S4 object"
-msgstr ""
-"\"%s\"에 class(x)를 설정하는 것은 속성을 NULL로 변경하는 것이므로, 결과는 더"
-"이상 S4 객체가 아닙니다"
+msgid "Setting class(x) to \"%s\" sets attribute to NULL; result will no longer be an S4 object"
+msgstr "\"%s\"에 class(x)를 설정하는 것은 속성을 NULL로 변경하는 것이므로, 결과는 더이상 S4 객체가 아닙니다"
 
-#: src/main/coerce.c:2673
+#: src/main/coerce.c:2740
 msgid "invalid replacement object to be a class string"
 msgstr "클래스 문자열에 대체할 객체가 유효하지 않습니다"
 
-#: src/main/coerce.c:2694
+#: src/main/coerce.c:2761
 #, c-format
-msgid ""
-"\"%s\" can only be set as the class if the object has this type; found \"%s\""
-msgstr ""
-"\"%s\"는 오로지 객체가 이 유형을 가지고 있을 때만 클래스로서 설정되지만, 유"
-"형 \"%s\"입니다"
+msgid "\"%s\" can only be set as the class if the object has this type; found \"%s\""
+msgstr "\"%s\"는 오로지 객체가 이 유형을 가지고 있을 때만 클래스로서 설정되지만, 유형 \"%s\"입니다"
 
-#: src/main/coerce.c:2712
+#: src/main/coerce.c:2779
 #, c-format
-msgid ""
-"invalid to set the class to matrix unless the dimension attribute is of "
-"length 2 (was %d)"
-msgstr ""
-"차원속성이 길이가 2가 아닌이상은 행렬에 클래스를 부여할 수 없는데, %d 입니다"
+msgid "invalid to set the class to matrix unless the dimension attribute is of length 2 (was %d)"
+msgstr "차원속성이 길이가 2가 아닌이상은 행렬에 클래스를 부여할 수 없는데, %d 입니다"
 
-#: src/main/coerce.c:2720
-msgid ""
-"cannot set class to \"array\" unless the dimension attribute has length > 0"
-msgstr ""
-"차원속성의 길이가 0 보다 크지 않다면 배열에 클래스를 설정할 수 없습니다"
+#: src/main/coerce.c:2787
+msgid "cannot set class to \"array\" unless the dimension attribute has length > 0"
+msgstr "차원속성의 길이가 0 보다 크지 않다면 배열에 클래스를 설정할 수 없습니다"
 
-#: src/main/coerce.c:2756
+#: src/main/coerce.c:2823
 msgid "'value' must be non-null character string"
 msgstr "'value'는 반드시 NULL 문자열이 아니여야 합니다"
 
-#: src/main/coerce.c:2769
+#: src/main/coerce.c:2836
 msgid "invalid to change the storage mode of a factor"
 msgstr "요인에 대한 저장모드 변경이 유효하지 않습니다"
 
-#: src/main/complex.c:126
+#: src/main/complex.c:123
 msgid "invalid complex unary operator"
 msgstr "유효하지 않은 복소수 단항 연산자입니다"
 
-#: src/main/complex.c:261
+#: src/main/complex.c:251
 msgid "unimplemented complex operation"
 msgstr "구현되지 않은 복소수 연산입니다"
 
-#: src/main/complex.c:363
+#: src/main/complex.c:353
 msgid "non-numeric argument to function"
 msgstr "함수에 수치가 아닌 인자가 주어졌습니다"
 
-#: src/main/complex.c:827
+#: src/main/complex.c:822
 msgid "invalid polynomial coefficient"
 msgstr "유효하지 않은 다항계수입니다"
 
-#: src/main/complex.c:832
+#: src/main/complex.c:827
 msgid "root finding code failed"
 msgstr "근을 찾는 코드에 문제가 있습니다"
 
-#: src/main/connections.c:153
+#: src/main/connections.c:150
 msgid "all connections are in use"
 msgstr "모든 커넥션들이 사용중입니다"
 
-#: src/main/connections.c:164
+#: src/main/connections.c:161
 msgid "connection not found"
 msgstr "커넥션을 찾을 수 없습니다"
 
-#: src/main/connections.c:175
+#: src/main/connections.c:172 src/main/connections.c:5213
 msgid "invalid connection"
 msgstr "유효하지 않은 커넥션입니다"
 
-#: src/main/connections.c:207
+#: src/main/connections.c:204
 #, c-format
 msgid "closing unused connection %d (%s)\n"
 msgstr "사용되지 않는 커넥션 %d (%s)를 닫습니다\n"
 
-#: src/main/connections.c:232 src/main/sysutils.c:619 src/main/sysutils.c:806
-#: src/main/sysutils.c:821 src/main/sysutils.c:912 src/main/sysutils.c:927
-#: src/main/sysutils.c:1023 src/main/sysutils.c:1096 src/main/sysutils.c:1106
-#: src/main/sysutils.c:1119 src/main/sysutils.c:1516
+#: src/main/connections.c:229 src/main/sysutils.c:631 src/main/sysutils.c:834
+#: src/main/sysutils.c:849 src/main/sysutils.c:978 src/main/sysutils.c:1051
+#: src/main/sysutils.c:1061 src/main/sysutils.c:1074 src/main/sysutils.c:1472
 #, c-format
 msgid "unsupported conversion from '%s' to '%s'"
 msgstr "'%1$s'에서 '%2$s'로의 변환은 지원되지 않습니다"
 
-#: src/main/connections.c:288 src/main/connections.c:304
-#: src/main/connections.c:456 src/main/connections.c:462
-#: src/main/connections.c:468 src/main/connections.c:479
-#: src/main/connections.c:486
+#: src/main/connections.c:285 src/main/connections.c:300
+#: src/main/connections.c:451 src/main/connections.c:456
+#: src/main/connections.c:461 src/main/connections.c:472
+#: src/main/connections.c:478
 #, c-format
 msgid "%s not enabled for this connection"
 msgstr "이 커넥션에서 %s를 할 수 없습니다"
 
-#: src/main/connections.c:335 src/main/connections.c:352
-#: src/main/connections.c:2916
+#: src/main/connections.c:330 src/main/connections.c:347
+#: src/main/connections.c:2910
 msgid "printing of extremely long output is truncated"
 msgstr "너무 긴 결과물의 출력은 잘려지게 됩니다"
 
-#: src/main/connections.c:375
+#: src/main/connections.c:370
 msgid "invalid char string in output conversion"
 msgstr "출력변환에서 유효하지 않은 문자열이 있습니다"
 
-#: src/main/connections.c:439
+#: src/main/connections.c:434
 #, c-format
 msgid "invalid input found on input connection '%s'"
 msgstr "입력 커넥션 '%s'에서 유효하지 않은 입력을 찾았습니다"
 
-#: src/main/connections.c:580
+#: src/main/connections.c:571
 #, c-format
 msgid "cannot open file '%ls': %s"
 msgstr "파일 '%ls'를 열 수 없습니다: %s"
 
-#: src/main/connections.c:691
+#: src/main/connections.c:683
 msgid "connection is not open for reading"
 msgstr "커넥션이 읽기 위해서 열려있지 않습니다"
 
-#: src/main/connections.c:696
+#: src/main/connections.c:688
 msgid "connection is not open for writing"
 msgstr "커넥션이 쓰기 위하여 열려있지 않습니다"
 
-#: src/main/connections.c:734 src/main/connections.c:2229
+#: src/main/connections.c:726 src/main/connections.c:2223
 msgid "can only truncate connections open for writing"
 msgstr "쓰기를 위한 목적으로만 열린 커넥션을 중단할 수 있습니다"
 
-#: src/main/connections.c:738 src/main/connections.c:740
+#: src/main/connections.c:730 src/main/connections.c:732
 msgid "file truncation failed"
 msgstr "파일잘라내기에 실패했습니다"
 
-#: src/main/connections.c:742
+#: src/main/connections.c:734
 msgid "file truncation unavailable on this platform"
 msgstr "이 플랫폼에서는 파일 잘라내기를 할 수 없습니다"
 
-#: src/main/connections.c:788 src/main/connections.c:792
-#: src/main/connections.c:798 src/main/connections.c:815
+#: src/main/connections.c:780 src/main/connections.c:784
+#: src/main/connections.c:790 src/main/connections.c:807
 msgid "allocation of file connection failed"
 msgstr "파일 커넥션 할당을 할 수 없습니다"
 
-#: src/main/connections.c:866 src/main/connections.c:1044
+#: src/main/connections.c:858 src/main/connections.c:1035
 #, c-format
 msgid "cannot create fifo '%s', reason '%s'"
 msgstr "fifo '%s'를 생성할 수 없는데, 이유는 '%s'입니다"
 
-#: src/main/connections.c:872
+#: src/main/connections.c:864
 #, c-format
 msgid "'%s' exists but is not a fifo"
 msgstr "'%s'는 존재하지만 fifo이 아닙니다"
 
-#: src/main/connections.c:886
+#: src/main/connections.c:878
 #, c-format
 msgid "fifo '%s' is not ready"
 msgstr "fifo '%s'가 준비되어 있지 않습니다"
 
-#: src/main/connections.c:887
+#: src/main/connections.c:879
 #, c-format
 msgid "cannot open fifo '%s'"
 msgstr "fifo '%s'를 열 수 없습니다"
 
-#: src/main/connections.c:928 src/main/connections.c:939
-#: src/main/connections.c:1104 src/main/connections.c:1123
-#: src/main/connections.c:1531 src/main/connections.c:1541
-#: src/main/connections.c:1660 src/main/connections.c:1720
-#: src/main/connections.c:2246 src/main/connections.c:2263
-#: src/main/connections.c:2572 src/main/connections.c:5305
-#: src/main/connections.c:5369
+#: src/main/connections.c:920 src/main/connections.c:931
+#: src/main/connections.c:1095 src/main/connections.c:1114
+#: src/main/connections.c:1524 src/main/connections.c:1534
+#: src/main/connections.c:1653 src/main/connections.c:1713
+#: src/main/connections.c:2240 src/main/connections.c:2257
+#: src/main/connections.c:2566 src/main/connections.c:5385
+#: src/main/connections.c:5449
 msgid "too large a block specified"
 msgstr "지정된 블록이 너무 큽니다"
 
-#: src/main/connections.c:998 src/main/connections.c:1004
+#: src/main/connections.c:989 src/main/connections.c:995
 msgid "allocation of fifo name failed"
 msgstr "fifo 이름의 할당에 실패했습니다"
 
-#: src/main/connections.c:1066
+#: src/main/connections.c:1057
 #, c-format
 msgid "cannot open fifo '%s', reason '%s'"
 msgstr "fifo '%s'를 열 수 없는데, 이유는 '%s'입니다"
 
-#: src/main/connections.c:1107 src/main/connections.c:1131
+#: src/main/connections.c:1098 src/main/connections.c:1122
 msgid "allocation of fifo buffer failed"
 msgstr "fifo 버퍼의 할당에 실패했습니다"
 
-#: src/main/connections.c:1139
+#: src/main/connections.c:1130
 #, c-format
 msgid "cannot write FIFO '%s'"
 msgstr "FIFO '%s'를 기록할 수 없습니다"
 
-#: src/main/connections.c:1175 src/main/connections.c:1179
-#: src/main/connections.c:1185 src/main/connections.c:1201
+#: src/main/connections.c:1166 src/main/connections.c:1170
+#: src/main/connections.c:1176 src/main/connections.c:1192
 msgid "allocation of fifo connection failed"
 msgstr "fifo 커넥션 할당을 할 수 없습니다"
 
-#: src/main/connections.c:1219 src/main/connections.c:1377
-#: src/main/connections.c:1998 src/main/connections.c:3212
-#: src/main/connections.c:4967
+#: src/main/connections.c:1210 src/main/connections.c:1369
+#: src/main/connections.c:1991 src/main/connections.c:3205
+#: src/main/connections.c:4982
 msgid "only first element of 'description' argument used"
 msgstr "'description' 인자의 첫번째 요소만이 사용되었습니다"
 
-#: src/main/connections.c:1236
-msgid ""
-"fifo(\"\") only supports open = \"w+\" and open = \"w+b\": using the former"
-msgstr ""
-"fifo(\"\")는 오로지 open = \"w+\"와 open = \"w+b\"만을 지원합니다.  전자를 사"
-"용합니다"
-
-#: src/main/connections.c:1250 src/main/connections.c:1414
-#: src/main/connections.c:2064 src/main/connections.c:3179
-#: src/main/connections.c:3232 src/main/connections.c:3280
-#: src/main/connections.c:3567 src/main/connections.c:3683
-#: src/main/connections.c:3844 src/main/connections.c:4095
-#: src/main/connections.c:4423 src/main/connections.c:4543
-#: src/main/connections.c:4755 src/main/connections.c:5105 src/main/dcf.c:94
-#: src/main/deparse.c:352 src/main/deparse.c:438 src/main/saveload.c:2267
-#: src/main/saveload.c:2350 src/main/scan.c:933 src/main/serialize.c:2175
-#: src/main/serialize.c:2226 src/main/source.c:265
+#: src/main/connections.c:1227
+msgid "fifo(\"\") only supports open = \"w+\" and open = \"w+b\": using the former"
+msgstr "fifo(\"\")는 오로지 open = \"w+\"와 open = \"w+b\"만을 지원합니다.  전자를 사용합니다"
+
+#: src/main/connections.c:1242 src/main/connections.c:1407
+#: src/main/connections.c:2058 src/main/connections.c:3175
+#: src/main/connections.c:3226 src/main/connections.c:3274
+#: src/main/connections.c:3563 src/main/connections.c:3679
+#: src/main/connections.c:3841 src/main/connections.c:4106
+#: src/main/connections.c:4434 src/main/connections.c:4554
+#: src/main/connections.c:4768 src/main/connections.c:5180 src/main/dcf.c:93
+#: src/main/deparse.c:361 src/main/deparse.c:450 src/main/saveload.c:2269
+#: src/main/saveload.c:2350 src/main/scan.c:933 src/main/serialize.c:2216
+#: src/main/serialize.c:2267 src/main/source.c:270
 msgid "cannot open the connection"
 msgstr "커넥션을 열 수 없습니다"
 
-#: src/main/connections.c:1265
+#: src/main/connections.c:1257
 msgid "fifo connections are not available on this system"
 msgstr "이 시스템에서 fifo 커넥션들은 사용가능하지 않습니다"
 
-#: src/main/connections.c:1295
+#: src/main/connections.c:1287
 #, c-format
 msgid "cannot pipe() cmd '%ls': %s"
 msgstr "pipe() 명령 '%ls'를 할 수 없습니다: %s"
 
-#: src/main/connections.c:1302
+#: src/main/connections.c:1294
 #, c-format
 msgid "cannot open pipe() cmd '%s': %s"
 msgstr "pipe() 명령 '%s'를 열 수 없습니다: %s"
 
-#: src/main/connections.c:1471 src/main/connections.c:1791
+#: src/main/connections.c:1464 src/main/connections.c:1784
 #, c-format
 msgid "cannot open compressed file '%s', probable reason '%s'"
 msgstr "압축된 파일 '%s'를 열 수 없습니다.  그 이유는 아마도 '%s'입니다"
 
-#: src/main/connections.c:1511
+#: src/main/connections.c:1504
 msgid "whence = \"end\" is not implemented for gzfile connections"
 msgstr "whence = \"end\"는 gzfile 커넥션에 대해서는 구현되지 않았습니다"
 
-#: src/main/connections.c:1516
+#: src/main/connections.c:1509
 msgid "seek on a gzfile connection returned an internal error"
 msgstr "gzfile 커넥션을 탐색하는 동안 내부에러가 발생했습니다"
 
-#: src/main/connections.c:1550 src/main/connections.c:1554
-#: src/main/connections.c:1560 src/main/connections.c:1577
+#: src/main/connections.c:1543 src/main/connections.c:1547
+#: src/main/connections.c:1553 src/main/connections.c:1570
 msgid "allocation of gzfile connection failed"
 msgstr "gzfile 커넥션 할당을 할 수 없습니다"
 
-#: src/main/connections.c:1606
+#: src/main/connections.c:1599
 #, c-format
 msgid "cannot open bzip2-ed file '%s', probable reason '%s'"
 msgstr "bzip2으로 된 파일 '%s'를 열 수 없습니다, 아마도 '%s'때문입니다"
 
-#: src/main/connections.c:1615
+#: src/main/connections.c:1608
 #, c-format
 msgid "file '%s' appears not to be compressed by bzip2"
 msgstr "파일 '%s'는 bzip2로 압축되지 않은 것 같습니다"
 
-#: src/main/connections.c:1624
+#: src/main/connections.c:1617
 #, c-format
 msgid "initializing bzip2 compression for file '%s' failed"
 msgstr "파일 '%s'를 bzip2 압축에 대한 초기설정을 하는데 실패했습니다"
 
-#: src/main/connections.c:1678
+#: src/main/connections.c:1671
 msgid "allocation of overflow buffer for bzfile failed"
 msgstr "bzfile에 대한 오버플로우 버퍼할당을 할 수 없습니다"
 
-#: src/main/connections.c:1685
+#: src/main/connections.c:1678
 #, c-format
-msgid ""
-"file '%s' has trailing content that appears not to be compressed by bzip2"
-msgstr ""
-"파일 '%s'는 bzip2로 압축되지 않은 것 같은 긴 분량의 내용을 가지고 있습니다"
+msgid "file '%s' has trailing content that appears not to be compressed by bzip2"
+msgstr "파일 '%s'는 bzip2로 압축되지 않은 것 같은 긴 분량의 내용을 가지고 있습니다"
 
-#: src/main/connections.c:1731 src/main/connections.c:1735
-#: src/main/connections.c:1741 src/main/connections.c:1758
+#: src/main/connections.c:1724 src/main/connections.c:1728
+#: src/main/connections.c:1734 src/main/connections.c:1751
 msgid "allocation of bzfile connection failed"
 msgstr "bzfile 커넥션 할당을 할 수 없습니다"
 
-#: src/main/connections.c:1804 src/main/connections.c:5961
+#: src/main/connections.c:1797 src/main/connections.c:6046
 #, c-format
 msgid "cannot initialize lzma decoder, error %d"
 msgstr "lzma 디코더를 초기화 할 수 없습니다, 에러 %d입니다"
 
-#: src/main/connections.c:1820
+#: src/main/connections.c:1813
 #, c-format
 msgid "cannot initialize lzma encoder, error %d"
 msgstr "lzma 인코더를 초기화 할 수 없습니다, 에러 %d입니다"
 
-#: src/main/connections.c:1948 src/main/connections.c:1952
-#: src/main/connections.c:1958 src/main/connections.c:1976
+#: src/main/connections.c:1941 src/main/connections.c:1945
+#: src/main/connections.c:1951 src/main/connections.c:1969
 msgid "allocation of xzfile connection failed"
 msgstr "xzfile 커넥션 할당을 할 수 없습니다"
 
-#: src/main/connections.c:2035
+#: src/main/connections.c:2028
 #, c-format
 msgid "this is a %s-compressed file which this build of R does not support"
 msgstr "이것은 이 빌드의 R이 지원하지 않는 %s로 압축된 파일입니다"
 
-#: src/main/connections.c:2130 src/modules/X11/devX11.c:3375
+#: src/main/connections.c:2124 src/modules/X11/devX11.c:3381
 msgid "memory allocation to copy clipboard failed"
 msgstr "클립보드에 복사하는 필요한 메모리 할당에 실패했습니다"
 
-#: src/main/connections.c:2135 src/modules/X11/devX11.c:3354
-#: src/modules/X11/devX11.c:3359
+#: src/main/connections.c:2129 src/modules/X11/devX11.c:3360
+#: src/modules/X11/devX11.c:3365
 msgid "clipboard cannot be opened or contains no text"
 msgstr "클리보드를 열 수 없거나 아무런 텍스트도 포함하고 있지 않습니다"
 
-#: src/main/connections.c:2146
+#: src/main/connections.c:2140
 msgid "memory allocation to open clipboard failed"
 msgstr "클립보드를 열기 위한 메모리 할당에 실패했습니다"
 
-#: src/main/connections.c:2174
+#: src/main/connections.c:2168
 msgid "unable to open the clipboard"
 msgstr "클립보드를 열 수 없습니다"
 
-#: src/main/connections.c:2178
+#: src/main/connections.c:2172
 msgid "unable to write to the clipboard"
 msgstr "클립보드에 기록을 할 수 없습니다"
 
-#: src/main/connections.c:2218
+#: src/main/connections.c:2212
 msgid "attempt to seek outside the range of the clipboard"
 msgstr "클립보드의 범위를 넘어 검색을 시도합니다"
 
-#: src/main/connections.c:2261
+#: src/main/connections.c:2255
 msgid "clipboard connection is open for reading only"
 msgstr "클립보드 커넥션이 읽기 전용으로 열려 있습니다"
 
-#: src/main/connections.c:2281
+#: src/main/connections.c:2275
 msgid "clipboard buffer is full and output lost"
 msgstr "클립보드 버퍼가 가득차서 출력이 손실되었습니다"
 
-#: src/main/connections.c:2302
+#: src/main/connections.c:2296
 msgid "'mode' for the clipboard must be 'r' or 'w'"
 msgstr "클립보드에 대한 'mode'는 반드시 'r' 또는 'w'이어야 합니다"
 
-#: src/main/connections.c:2305
+#: src/main/connections.c:2299
 msgid "'mode' for the clipboard must be 'r' on Unix"
 msgstr "Unix에서 클립보드에 대한 'mode'는 반드시 'r'이어야 합니다"
 
-#: src/main/connections.c:2308 src/main/connections.c:2314
-#: src/main/connections.c:2320 src/main/connections.c:2337
+#: src/main/connections.c:2302 src/main/connections.c:2308
+#: src/main/connections.c:2314 src/main/connections.c:2331
 msgid "allocation of clipboard connection failed"
 msgstr "클립보드 커넥션 할당을 할 수 없습니다"
 
-#: src/main/connections.c:2406 src/main/connections.c:2410
-#: src/main/connections.c:2416
+#: src/main/connections.c:2400 src/main/connections.c:2404
+#: src/main/connections.c:2410
 msgid "allocation of terminal connection failed"
 msgstr "터미널 커넥션 할당을 할 수 없습니다"
 
-#: src/main/connections.c:2549
+#: src/main/connections.c:2543
 msgid "attempting to add too many elements to raw vector"
 msgstr "원래의 벡터에 너무 많은 요소들을 추가하려고 합니다"
 
-#: src/main/connections.c:2601
+#: src/main/connections.c:2595
 msgid "attempt to seek outside the range of the raw connection"
 msgstr "원래 커넥션의 범위를 넘어 검색을 시도합니다"
 
-#: src/main/connections.c:2612 src/main/connections.c:2616
-#: src/main/connections.c:2622 src/main/connections.c:2648
+#: src/main/connections.c:2606 src/main/connections.c:2610
+#: src/main/connections.c:2616 src/main/connections.c:2642
 msgid "allocation of raw connection failed"
-msgstr ""
+msgstr "원시 커넥션의 할당 실패"
 
-#: src/main/connections.c:2701
+#: src/main/connections.c:2695
 msgid "'con' is not a rawConnection"
 msgstr "'con'은 rawConnection이 아닙니다"
 
-#: src/main/connections.c:2704
+#: src/main/connections.c:2698
 msgid "'con' is not an output rawConnection"
 msgstr "'con'은 출력 rawConnection이 아닙니다"
 
-#: src/main/connections.c:2742
+#: src/main/connections.c:2736
 msgid "too many characters for text connection"
 msgstr "텍스트 커넥션에 너무 많은 문자들이 있습니다"
 
-#: src/main/connections.c:2747
+#: src/main/connections.c:2741
 msgid "cannot allocate memory for text connection"
 msgstr "텍스트 커넥션에 메모리를 할당 할 수 없습니다"
 
-#: src/main/connections.c:2796
+#: src/main/connections.c:2790
 msgid "seek is not relevant for text connection"
 msgstr "시크는 텍스트 커넥션과 관련이 없습니다"
 
-#: src/main/connections.c:2804 src/main/connections.c:2808
-#: src/main/connections.c:2814 src/main/connections.c:2827
-#: src/main/connections.c:3012 src/main/connections.c:3016
-#: src/main/connections.c:3022 src/main/connections.c:3035
-#: src/main/connections.c:3041
+#: src/main/connections.c:2798 src/main/connections.c:2802
+#: src/main/connections.c:2808 src/main/connections.c:2821
+#: src/main/connections.c:3008 src/main/connections.c:3012
+#: src/main/connections.c:3018 src/main/connections.c:3031
+#: src/main/connections.c:3037
 msgid "allocation of text connection failed"
 msgstr "텍스트 커넥션 할당을 할 수 없습니다"
 
-#: src/main/connections.c:2989
+#: src/main/connections.c:2983
 msgid "text connection: appending to a non-existent char vector"
 msgstr "텍스트 커넥션: 존재하지 않는 문자형 벡터에 추가하려고 합니다"
 
-#: src/main/connections.c:3093
+#: src/main/connections.c:3089
 msgid "unsupported mode"
 msgstr "지원되지 않는 모드입니다"
 
-#: src/main/connections.c:3115
+#: src/main/connections.c:3111
 msgid "'con' is not a textConnection"
 msgstr "'con'은 textConnection이 아닙니다"
 
-#: src/main/connections.c:3118
+#: src/main/connections.c:3114
 msgid "'con' is not an output textConnection"
 msgstr "'con'은 출력 textConnection이 아닙니다"
 
-#: src/main/connections.c:3192
-msgid "sockets are not available on this system"
-msgstr "이 시스템에서는 소켓을 사용할 수 없습니다"
-
-#: src/main/connections.c:3260 src/main/connections.c:3309
-#: src/main/connections.c:3320 src/main/connections.c:3367
-#: src/main/connections.c:3392 src/main/connections.c:3415
-#: src/main/connections.c:3427 src/main/connections.c:3543
-#: src/main/connections.c:3668 src/main/connections.c:5408
+#: src/main/connections.c:3254 src/main/connections.c:3303
+#: src/main/connections.c:3314 src/main/connections.c:3361
+#: src/main/connections.c:3388 src/main/connections.c:3411
+#: src/main/connections.c:3423 src/main/connections.c:3539
+#: src/main/connections.c:3664 src/main/connections.c:5489
 msgid "'con' is not a connection"
 msgstr "'con'은 연결이 아닙니다"
 
-#: src/main/connections.c:3263
+#: src/main/connections.c:3257
 msgid "cannot open standard connections"
 msgstr "표준 커넥션들을 열 수 없습니다"
 
-#: src/main/connections.c:3265
+#: src/main/connections.c:3259
 msgid "connection is already open"
 msgstr "커넥션은 이미 열려 있습니다"
 
-#: src/main/connections.c:3298
+#: src/main/connections.c:3292
 msgid "unknown 'rw' value"
 msgstr "알 수 없는 'rw' 값입니다"
 
-#: src/main/connections.c:3369
+#: src/main/connections.c:3363
 msgid "cannot close standard connections"
 msgstr "표준 커넥션들을 닫을 수 없습니다"
 
-#: src/main/connections.c:3372
+#: src/main/connections.c:3366
 msgid "cannot close 'output' sink connection"
 msgstr "'output' sink 커넥션을 닫을 수 없습니다"
 
-#: src/main/connections.c:3374
+#: src/main/connections.c:3368
 msgid "cannot close 'message' sink connection"
 msgstr "'message' sink 커넥션을 닫을 수 없습니다"
 
-#: src/main/connections.c:3394 src/main/connections.c:5123
-#: src/main/connections.c:5131 src/main/serialize.c:1996
-#: src/main/serialize.c:2004
+#: src/main/connections.c:3390 src/main/connections.c:5198
+#: src/main/connections.c:5206 src/main/serialize.c:2035
+#: src/main/serialize.c:2043
 msgid "connection is not open"
 msgstr "커넥션이 열려 있지 않습니다"
 
-#: src/main/connections.c:3490 src/main/connections.c:3502
+#: src/main/connections.c:3486 src/main/connections.c:3498
 msgid "line longer than buffer size"
 msgstr "행이 버퍼사이즈보다 길어지고 있습니다"
 
-#: src/main/connections.c:3574 src/main/connections.c:3576
-#: src/main/connections.c:3852 src/main/connections.c:4406
-#: src/main/connections.c:4431 src/main/connections.c:5132 src/main/dcf.c:101
-#: src/main/scan.c:936 src/main/scan.c:940 src/main/serialize.c:1998
-#: src/main/source.c:272
+#: src/main/connections.c:3570 src/main/connections.c:3572
+#: src/main/connections.c:3849 src/main/connections.c:4417
+#: src/main/connections.c:4442 src/main/connections.c:5207 src/main/dcf.c:100
+#: src/main/scan.c:936 src/main/scan.c:940 src/main/serialize.c:2037
+#: src/main/source.c:277
 msgid "cannot read from this connection"
 msgstr "이 커넥션으로부터 읽을수 없습니다"
 
-#: src/main/connections.c:3588 src/main/connections.c:3610
+#: src/main/connections.c:3584 src/main/connections.c:3606
 msgid "cannot allocate buffer in readLines"
 msgstr "readLines내에서 버퍼를 할당할 수 없습니다"
 
-#: src/main/connections.c:3623
+#: src/main/connections.c:3619
 #, c-format
 msgid "line %d appears to contain an embedded nul"
 msgstr "라인 %d에서 nul 을 포함하는 것으로 보여집니다"
 
-#: src/main/connections.c:3640
+#: src/main/connections.c:3636
 #, c-format
 msgid "incomplete final line found on '%s'"
 msgstr "'%s'에서 불완전한 마지막 행이 발견되었습니다"
 
-#: src/main/connections.c:3646
+#: src/main/connections.c:3642
 msgid "too few lines read in readLines"
 msgstr "readLines로 불러들이는 행의 수가 너무 적습니다"
 
-#: src/main/connections.c:3749
+#: src/main/connections.c:3746
 msgid "incomplete string at end of file has been discarded"
 msgstr "파일의 끝에 있는 완전하지 않은 문자열이 제거되었습니다"
 
-#: src/main/connections.c:3755
+#: src/main/connections.c:3752
 msgid "null terminator not found: breaking string at 10000 bytes"
-msgstr ""
-"널 터미네이터를 찾을수 없습니다: 따라서 10000 바이트에서 문자열을 자릅니다"
+msgstr "널 터미네이터를 찾을수 없습니다: 따라서 10000 바이트에서 문자열을 자릅니다"
 
-#: src/main/connections.c:3820
+#: src/main/connections.c:3817
 msgid "can only read from a binary connection"
 msgstr "바이너리 커넥션으로는 오로지 읽을 수 밖에 없습니다"
 
-#: src/main/connections.c:3869 src/main/connections.c:4176
+#: src/main/connections.c:3866 src/main/connections.c:4187
 msgid "size changing is not supported for complex vectors"
 msgstr "복소수형 벡터들의 크기 변경은 지원되지 않습니다"
 
-#: src/main/connections.c:3907 src/main/connections.c:3925
-#: src/main/connections.c:3951 src/main/connections.c:4010
-#: src/main/connections.c:4030 src/main/connections.c:4157
-#: src/main/connections.c:4170 src/main/connections.c:4229
-#: src/main/connections.c:4261
+#: src/main/connections.c:3905 src/main/connections.c:3923
+#: src/main/connections.c:3949 src/main/connections.c:3993
+#: src/main/connections.c:4024 src/main/connections.c:4044
+#: src/main/connections.c:4168 src/main/connections.c:4181
+#: src/main/connections.c:4240 src/main/connections.c:4272
 #, c-format
 msgid "size %d is unknown on this machine"
 msgstr "이 시스템에서 크기 %d를 알 수 없습니다"
 
-#: src/main/connections.c:3936
+#: src/main/connections.c:3934
 msgid "raw is always of size 1"
 msgstr "raw는 항상 사이즈가 1 입니다"
 
-#: src/main/connections.c:3959
+#: src/main/connections.c:3957
 msgid "'signed = FALSE' is only valid for integers of sizes 1 and 2"
 msgstr "'signed = FALSE'는 사이즈가 1과 2인 정수들에 대해서만 유효합니다"
 
-#: src/main/connections.c:4060
+#: src/main/connections.c:4071
 msgid "'x' is not an atomic vector type"
 msgstr "'x'는 atomic 벡터유형이 아닙니다"
 
-#: src/main/connections.c:4066
+#: src/main/connections.c:4077
 msgid "can only write to a binary connection"
 msgstr "바이너리 커넥션에 쓰기만을 할 수 있습니다"
 
-#: src/main/connections.c:4085
+#: src/main/connections.c:4096
 msgid "only 2^31-1 bytes can be written to a raw vector"
 msgstr "오직 2^31-1 바이트만이 raw 벡터에 쓰여질 수 있습니다"
 
-#: src/main/connections.c:4087
+#: src/main/connections.c:4098
 msgid "only 2^31-1 bytes can be written in a single writeBin() call"
 msgstr "오직 2^31-1 바이트만이 한 번의 writeBin() 호출에 쓰여질 수 있습니다"
 
-#: src/main/connections.c:4136 src/main/connections.c:4289
-#: src/main/connections.c:4570 src/main/connections.c:4610
+#: src/main/connections.c:4147 src/main/connections.c:4300
+#: src/main/connections.c:4581 src/main/connections.c:4621
 msgid "problem writing to connection"
 msgstr "커녁센에 쓰기 문제가 발생했습니다"
 
-#: src/main/connections.c:4181
+#: src/main/connections.c:4192
 msgid "size changing is not supported for raw vectors"
 msgstr "raw 벡터들에 대해서 크기변경은 지원되지 않습니다"
 
-#: src/main/connections.c:4324 src/main/connections.c:4328
-#: src/main/connections.c:4367
+#: src/main/connections.c:4335 src/main/connections.c:4339
+#: src/main/connections.c:4378
 msgid "invalid UTF-8 input in readChar()"
 msgstr "readChar()에 유효하지 않은 UTF-8 입력입니다"
 
-#: src/main/connections.c:4434
+#: src/main/connections.c:4445
 msgid "can only read in bytes in a non-UTF-8 MBCS locale"
 msgstr "UTF-8가 아닌 MBCS 로케일에서만 바이트로만 읽을 수 있습니다"
 
-#: src/main/connections.c:4506
+#: src/main/connections.c:4517
 msgid "'object' is too short"
-msgstr "'object'가 너무 짧습니다"
+msgstr "'object'의 길이가 너무 짧습니다."
 
-#: src/main/connections.c:4559
+#: src/main/connections.c:4570
 msgid "writeChar: more bytes requested than are in the string - will zero-pad"
-msgstr ""
-"writeChar: 문자열내에 있는 것보다 더 많은 바이트가 요구되어 집니다 - will "
-"zero-pad"
+msgstr "writeChar: 문자열내에 있는 것보다 더 많은 바이트가 요구되어 집니다 - will zero-pad"
 
-#: src/main/connections.c:4584
-msgid ""
-"writeChar: more characters requested than are in the string - will zero-pad"
-msgstr ""
-"writeChar: 문자열내에 있는 것보다 더 많은 문자들이 요구되어 집니다 - will "
-"zero-pad"
+#: src/main/connections.c:4595
+msgid "writeChar: more characters requested than are in the string - will zero-pad"
+msgstr "writeChar: 문자열내에 있는 것보다 더 많은 문자들이 요구되어 집니다 - will zero-pad"
 
-#: src/main/connections.c:4638
+#: src/main/connections.c:4649
 msgid "maximum number of pushback lines exceeded"
 msgstr "푸쉬백 라인들의 최대값을 초과했습니다"
 
-#: src/main/connections.c:4644 src/main/connections.c:4648
-#: src/main/connections.c:4685 src/main/connections.c:4693
+#: src/main/connections.c:4655 src/main/connections.c:4659
+#: src/main/connections.c:4696 src/main/connections.c:4704
 msgid "could not allocate space for pushback"
 msgstr "푸쉬백을 위한 공간을 할당할 수 없습니다"
 
-#: src/main/connections.c:4676
+#: src/main/connections.c:4687
 msgid "can only push back on open readable connections"
 msgstr "읽기가 가능한 열린 커넥션에서만 푸쉬백을 할 수 있습니다"
 
-#: src/main/connections.c:4678
+#: src/main/connections.c:4689
 msgid "can only push back on text-mode connections"
 msgstr "텍스트 모드 커넥션에서만 푸쉬백을 할 수 있습니다"
 
-#: src/main/connections.c:4740 src/main/connections.c:4810
+#: src/main/connections.c:4753 src/main/connections.c:4823
 msgid "sink stack is full"
 msgstr "sink 스택이 꽉 찼습니다"
 
-#: src/main/connections.c:4743
+#: src/main/connections.c:4756
 msgid "cannot switch output to stdin"
 msgstr "출력을 stdin으로 전환할 수 없습니다"
 
-#: src/main/connections.c:4770
+#: src/main/connections.c:4783
 msgid "no sink to remove"
 msgstr "제거할 sink가 없습니다"
 
-#: src/main/connections.c:4892
+#: src/main/connections.c:4903
 msgid "there is no connection NA"
 msgstr "NA이라는 커넥션은 없습니다"
 
-#: src/main/connections.c:4894
+#: src/main/connections.c:4905
 #, c-format
 msgid "there is no connection %d"
 msgstr "%d라는 커넥션은 없습니다"
 
-#: src/main/connections.c:5029
-msgid ""
-"file(\"\") only supports open = \"w+\" and open = \"w+b\": using the former"
-msgstr ""
-"파일(\"\")은 오로지 open = \"w+\"과 open = \"w+b\"만을 지원합니다: 전자의 것"
-"을 사용합니다"
+#: src/main/connections.c:5039
+msgid "method = \"wininet\" is only supported on Windows"
+msgstr "메소드 \"wininet\"은 윈도우즈에서만 지원됩니다."
+
+#: src/main/connections.c:5103
+msgid "file(\"\") only supports open = \"w+\" and open = \"w+b\": using the former"
+msgstr "파일(\"\")은 오로지 open = \"w+\"과 open = \"w+b\"만을 지원합니다: 전자의 것을 사용합니다"
 
-#: src/main/connections.c:5083 src/modules/internet/internet.c:115
-#: src/modules/internet/internet.c:569
-msgid "unsupported URL scheme"
-msgstr "지원되지 않는 URG scheme입니다"
+#: src/main/connections.c:5157
+msgid "URL scheme unsupported by this method"
+msgstr "이 메소드에 의하여 지원되는 URL scheme이 아닙니다."
 
-#: src/main/connections.c:5173
+#: src/main/connections.c:5253
 msgid "file stream does not have gzip magic number"
 msgstr "파일 스트림은 gzip 매직넘버를 가지고 있지 않습니다"
 
-#: src/main/connections.c:5184
+#: src/main/connections.c:5264
 msgid "file stream does not have valid gzip header"
 msgstr "파일 스트림은 유효한 gzip 헤더를 가지고 있지 않습니다"
 
-#: src/main/connections.c:5249
+#: src/main/connections.c:5329
 msgid "writing error whilst flushing 'gzcon' connection"
 msgstr "'gzcon' 커넥션을 플러싱 하는 동안에 쓰기 에러가 발생했습니다"
 
-#: src/main/connections.c:5351
+#: src/main/connections.c:5431
 #, c-format
 msgid "crc error %x %x\n"
 msgstr "crc 에러 %x %x\n"
 
-#: src/main/connections.c:5378
+#: src/main/connections.c:5458
 msgid "write error on 'gzcon' connection"
 msgstr "'gzcon' 커넥션에 쓰기 에러가 발생했습니다"
 
-#: src/main/connections.c:5412
+#: src/main/connections.c:5493
 msgid "'level' must be one of 0 ... 9"
 msgstr "'level'은 반드시 0 ... 9 중 하나이어야 합니다"
 
-#: src/main/connections.c:5415
+#: src/main/connections.c:5496
 msgid "'allowNonCompression' must be TRUE or FALSE"
 msgstr "'allowNonCompression'은 반드시 TRUE 또는 FALSE이어야 합니다"
 
-#: src/main/connections.c:5418
+#: src/main/connections.c:5499
+msgid "'text' must be TRUE or FALSE"
+msgstr "'text'는 반드시 TRUE 또는 FALSE이어야 합니다."
+
+#: src/main/connections.c:5502
 msgid "this is already a 'gzcon' connection"
 msgstr "이미 'gzcon' 커넥션입니다"
 
-#: src/main/connections.c:5424
+#: src/main/connections.c:5508
 msgid "can only use read- or write- binary connections"
 msgstr "읽기 또는 쓰기를 위한 바이너리 커넥션들만을 사용할 수 있습니다"
 
-#: src/main/connections.c:5427
+#: src/main/connections.c:5511
 msgid "using a text-mode 'file' connection may not work correctly"
-msgstr ""
-"텍스트 모드 'file' 커넥션을 이용하는 것은 제대로 작동하지 않을 수 있습니다"
+msgstr "텍스트 모드 'file' 커넥션을 이용하는 것은 제대로 작동하지 않을 수 있습니다"
 
-#: src/main/connections.c:5430
-msgid ""
-"cannot create a 'gzcon' connection from a writable textConnection; maybe use "
-"rawConnection"
-msgstr ""
-"쓰기가 가능한 textConnection으로부터 'gzcon' 커넥션을 생성할 수 없습니다.  아"
-"마도 rawConnection을 사용해야 할 것 같습니다"
+#: src/main/connections.c:5514
+msgid "cannot create a 'gzcon' connection from a writable textConnection; maybe use rawConnection"
+msgstr "쓰기가 가능한 textConnection으로부터 'gzcon' 커넥션을 생성할 수 없습니다.  아마도 rawConnection을 사용해야 할 것 같습니다"
 
-#: src/main/connections.c:5433 src/main/connections.c:5437
-#: src/main/connections.c:5444 src/main/connections.c:5458
+#: src/main/connections.c:5517 src/main/connections.c:5521
+#: src/main/connections.c:5528 src/main/connections.c:5542
 msgid "allocation of 'gzcon' connection failed"
 msgstr "'gzcon' 커넥션 할당을 할 수 없습니다"
 
-#: src/main/connections.c:5644
+#: src/main/connections.c:5729
 msgid "not a list of sockets"
 msgstr "소켓들의 목록이 아닙니다"
 
-#: src/main/connections.c:5649
+#: src/main/connections.c:5734
 msgid "bad write indicators"
 msgstr "잘못된 쓰기 지시자들입니다"
 
-#: src/main/connections.c:5660
+#: src/main/connections.c:5745
 msgid "not a socket connection"
 msgstr "소켓 커넥션이 아닙니다"
 
-#: src/main/connections.c:5905
+#: src/main/connections.c:5990
 msgid "unknown compression, assuming none"
-msgstr ""
-"알 수 없는 종류의 압축이 사용되었으므로 압축되지 않을 것으로 가정합니다"
+msgstr "알 수 없는 종류의 압축이 사용되었으므로 압축되지 않을 것으로 가정합니다"
 
-#: src/main/connections.c:6023 src/main/connections.c:6027
-#: src/main/connections.c:6033
+#: src/main/connections.c:6108 src/main/connections.c:6112
+#: src/main/connections.c:6118
 #, c-format
 msgid "allocation of %s connection failed"
 msgstr "%s 커넥션의 할당이 실패했습니다"
 
-#: src/main/context.c:282
+#: src/main/context.c:316
 msgid "no loop for break/next, jumping to top level"
 msgstr "break/next에 대한 루프가 없으므로 최상위레벨로 이동합니다"
 
-#: src/main/context.c:290
+#: src/main/context.c:324
 msgid "no function to return from, jumping to top level"
 msgstr "되돌아가야 할 함수가 없으므로 최상위레벨로 이동합니다"
 
-#: src/main/context.c:302
+#: src/main/context.c:339
 msgid "target context is not on the stack"
 msgstr "타겟 컨텍스트가 스택에 존재하지 않습니다"
 
-#: src/main/context.c:324 src/main/context.c:340 src/main/context.c:407
-#: src/main/context.c:428 src/main/context.c:440 src/main/context.c:452
+#: src/main/context.c:361 src/main/context.c:377 src/main/context.c:444
+#: src/main/context.c:465 src/main/context.c:477 src/main/context.c:489
 msgid "not that many frames on the stack"
 msgstr "스택에 그렇게 많은 프레임들이 있지 않습니다"
 
-#: src/main/context.c:357
+#: src/main/context.c:394
 msgid "only positive values of 'n' are allowed"
 msgstr "'n'에는 오로지 양의 값들만이 허용됩니다"
 
-#: src/main/context.c:478
-msgid "no function to restart"
-msgstr "재시작을 할 함수가 없습니다"
-
-#: src/main/context.c:515
+#: src/main/context.c:526
 msgid "number of contexts must be positive"
 msgstr "컨텍스트의 개수는 반드시 양수이어야 합니다"
 
-#: src/main/context.c:528
+#: src/main/context.c:539
 msgid "no browser context to query"
 msgstr "쿼리를 위한 브라우저 컨텍스트가 없습니다"
 
-#: src/main/context.c:546
+#: src/main/context.c:557
 msgid "not that many calls to browser are active"
-msgstr ""
+msgstr "활성화된 브라우저 호출이 많지는 않습니다. "
 
-#: src/main/context.c:560
+#: src/main/context.c:571
 msgid "not that many functions on the call stack"
 msgstr "호출 스택에 그렇게 많은 함수들이 있지는 않습니다"
 
-#: src/main/context.c:645
+#: src/main/context.c:656
 msgid "internal error in 'do_sys'"
 msgstr "'do_sys'에서 내부오류가 발생했습니다"
 
 #: src/main/cum.c:49
 msgid "integer overflow in 'cumsum'; use 'cumsum(as.numeric(.))'"
-msgstr ""
-"'cumsum'에서 정수형 오버플로우가 발생했으므로 'cumsum(as.numeric(.))'을 사용"
-"해주세요"
-
-#: src/main/cum.c:178
-msgid "'cummin' not defined for complex numbers"
-msgstr "복소수들에 대해서는 'cummin'이 정의되어 있지 않습니다"
+msgstr "'cumsum'에서 정수형 오버플로우가 발생했으므로 'cumsum(as.numeric(.))'을 사용해주세요"
 
-#: src/main/cum.c:181
+#: src/main/cum.c:179
 msgid "'cummax' not defined for complex numbers"
 msgstr "복소수들에 대해서는 'cummax'가 정의되어 있지 않습니다"
 
-#: src/main/cum.c:206 src/main/cum.c:230
+#: src/main/cum.c:182
+msgid "'cummin' not defined for complex numbers"
+msgstr "복소수들에 대해서는 'cummin'이 정의되어 있지 않습니다"
+
+#: src/main/cum.c:209 src/main/cum.c:236
 msgid "unknown cumxxx function"
 msgstr "알 수 없는 cumxxx 함수입니다"
 
-#: src/main/datetime.c:548 src/main/datetime.c:556 src/main/datetime.c:570
-#: src/main/datetime.c:575
+#: src/main/datetime.c:554 src/main/datetime.c:562 src/main/datetime.c:576
+#: src/main/datetime.c:581
 msgid "problem with setting timezone"
 msgstr "시간대를 설정하는 도중 문제가 발생했습니다"
 
-#: src/main/datetime.c:560
+#: src/main/datetime.c:566
 msgid "cannot set timezones on this system"
 msgstr "이 시스템에서는 시간대를 설정할 수 없습니다"
 
-#: src/main/datetime.c:582 src/main/datetime.c:584
+#: src/main/datetime.c:588 src/main/datetime.c:590
 msgid "problem with unsetting timezone"
 msgstr "시간대가 설정되어 있지 않아서 생긴 문제입니다"
 
-#: src/main/datetime.c:804 src/main/datetime.c:806 src/main/datetime.c:901
-#: src/main/datetime.c:1240 src/main/datetime.c:1242
+#: src/main/datetime.c:810 src/main/datetime.c:812 src/main/datetime.c:908
+#: src/main/datetime.c:1258 src/main/datetime.c:1260
 msgid "zero-length component in non-empty \"POSIXlt\" structure"
 msgstr "비어있지 않은 \"POSIXlt\" 스트럭쳐에 길이가 영인 구성요소가 있습니다"
 
-#: src/main/dcf.c:113 src/main/dcf.c:181 src/main/dcf.c:253
+#: src/main/dcf.c:112 src/main/dcf.c:181 src/main/dcf.c:253
 msgid "could not allocate memory for 'read.dcf'"
 msgstr "'read.dcf'에 메모리를 할당할 수 없습니다"
 
@@ -2444,81 +2423,83 @@ msgstr "레코드의 시작에서 '%s ...'로 시작하는 컨티뉴에이션 
 msgid "Line starting '%s ...' is malformed!"
 msgstr "'%s ...'로 시작하는 줄은 잘 못 되었습니다"
 
-#: src/main/debug.c:45
-msgid "argument must be a closure"
-msgstr "인자는 반드시 클로우져이어야 합니다"
-
-#: src/main/debug.c:76
+#: src/main/debug.c:46 src/main/debug.c:76
 msgid "argument must be a function"
 msgstr "인자는 반드시 함수이어야 합니다"
 
-#: src/main/debug.c:132 src/main/debug.c:166 src/main/debug.c:224
+#: src/main/debug.c:111
+#, c-format
+msgid "Value for '%s' must be TRUE or FALSE"
+msgstr "'%s'에 대한 값은 반드시 TRUE 또는 FALSE 이어야 합니다."
+
+#: src/main/debug.c:139 src/main/debug.c:167 src/main/debug.c:241
 msgid "argument must not be a function"
 msgstr "인자는 반드시 함수가 아니어야 합니다"
 
-#: src/main/debug.c:135
+#: src/main/debug.c:142
 msgid "cannot trace NULL"
 msgstr "NULL을 추적할 수는 없습니다"
 
-#: src/main/debug.c:139
+#: src/main/debug.c:146
 msgid "'tracemem' is not useful for promise and environment objects"
-msgstr ""
-"'tracemem'은 promise와 인바이런먼트 객체들에 대해서는 유용하지 않습니다"
+msgstr "'tracemem'은 promise와 인바이런먼트 객체들에 대해서는 유용하지 않습니다"
 
-#: src/main/debug.c:142
+#: src/main/debug.c:149
 msgid "'tracemem' is not useful for weak reference or external pointer objects"
-msgstr ""
-"'tracemem'은 weak reference 또는 외부 포인터 객체들에 대해서는 유용하지 않습"
-"니다"
+msgstr "'tracemem'은 weak reference 또는 외부 포인터 객체들에 대해서는 유용하지 않습니다"
 
-#: src/main/debug.c:148 src/main/debug.c:171
+#: src/main/debug.c:180 src/main/debug.c:187
 msgid "R was not compiled with support for memory profiling"
 msgstr "R이 메모리 프로파일 지원기능과 함께 컴파일 되지 않았었습니다"
 
-#: src/main/deparse.c:152 src/main/sprintf.c:213 src/main/sprintf.c:245
+#: src/main/deparse.c:156 src/main/sprintf.c:216 src/main/sprintf.c:248
 msgid "too few arguments"
 msgstr "인자들의 수가 너무 적습니다"
 
-#: src/main/deparse.c:159
+#: src/main/deparse.c:163
 msgid "invalid 'cutoff' value for 'deparse', using default"
 msgstr "'deparse'에 대한 'cutoff'의 값이 유효하지 않으므로 기본값을 이용합니다"
 
-#: src/main/deparse.c:247
+#: src/main/deparse.c:254
 msgid "deparse of an S4 object will not be source()able"
 msgstr "S4객체의 deparse는 source() 할 수 없는 것 같습니다"
 
-#: src/main/deparse.c:249
+#: src/main/deparse.c:256
 msgid "deparse may be incomplete"
 msgstr "deparse는 아마도 불완전한 것 같습니다"
 
-#: src/main/deparse.c:251
+#: src/main/deparse.c:258
 msgid "deparse may be not be source()able in R < 2.7.0"
 msgstr "deparse는 R < 2.7.0 에서는 source()할 수 없는 것 같습니다"
 
-#: src/main/deparse.c:369 src/main/deparse.c:461 src/main/deparse.c:467
+#: src/main/deparse.c:350 src/main/deparse.c:400 src/main/source.c:206
+msgid "'file' must be a character string or connection"
+msgstr "'file'은 반드시 문자열(character string) 또는 커넥션(connection)이어야 합니다."
+
+#: src/main/deparse.c:378 src/main/deparse.c:473 src/main/deparse.c:479
 msgid "wrote too few characters"
 msgstr "너무 적은 문자들을 기록했습니다"
 
-#: src/main/deparse.c:391
+#: src/main/deparse.c:402
 msgid "character arguments expected"
 msgstr "문자형 인자들이 와야 합니다"
 
-#: src/main/deparse.c:394
+#: src/main/deparse.c:405
 msgid "zero-length argument"
 msgstr "길이가 0인 인수입니다"
 
-#: src/main/deparse.c:401
+#: src/main/deparse.c:412
 msgid "'opts' should be small non-negative integer"
 msgstr "'opts'는 반드시 음이 아닌 작은 정수이어야 합니다"
 
-#: src/main/deparse.c:411 src/main/envir.c:1764 src/main/envir.c:1846
-#: src/main/eval.c:569 src/main/eval.c:1251 src/main/eval.c:3627
-#: src/main/saveload.c:1978 src/main/saveload.c:2309 src/main/serialize.c:2727
+#: src/main/deparse.c:422 src/main/envir.c:1898 src/main/envir.c:1983
+#: src/main/eval.c:626 src/main/eval.c:1423 src/main/eval.c:4246
+#: src/main/saveload.c:1980 src/main/saveload.c:2312 src/main/serialize.c:2773
 #, c-format
 msgid "object '%s' not found"
 msgstr "객체 '%s'를 찾을 수 없습니다"
 
-#: src/main/deparse.c:1519
+#: src/main/deparse.c:1592
 msgid "badly formed function expression"
 msgstr "좋지 않게 구성된 함수의 익스프레이션입니다"
 
@@ -2526,250 +2507,230 @@ msgstr "좋지 않게 구성된 함수의 익스프레이션입니다"
 msgid "the base graphics system is not registered"
 msgstr "base 그래픽스 시스템이 등록되지 않았습니다"
 
-#: src/main/devices.c:165 src/main/devices.c:172
+#: src/main/devices.c:166 src/main/devices.c:174
 msgid "no active or default device"
 msgstr "활성화 된 장치가 없거나 기본 장치가 없습니다"
 
-#: src/main/devices.c:385 src/main/devices.c:447
+#: src/main/devices.c:388 src/main/devices.c:450
 msgid "too many open devices"
 msgstr "너무 많은 장치들이 열려 있습니다"
 
-#: src/main/devices.c:474
+#: src/main/devices.c:491
 msgid "not enough memory to allocate device (in GEcreateDevDesc)"
 msgstr "(GEcreateDevDesc에서) 장치 분배에 할당할 충분한 메모리가 없습니다"
 
-#: src/main/devices.c:515
+#: src/main/devices.c:532
 msgid "Hit <Return> to see next plot: "
 msgstr "다음 플랏을 보기 위해서는 <Return>키를 치세요"
 
-#: src/main/dotcode.c:112 src/main/dotcode.c:142
+#: src/main/dotcode.c:127 src/main/dotcode.c:157
 msgid "NULL value passed as symbol address"
 msgstr "NULL 값이 심볼주소로서 전달됐습니다"
 
-#: src/main/dotcode.c:133
+#: src/main/dotcode.c:148
 #, c-format
 msgid "Unimplemented type %d in createRSymbolObject"
 msgstr "createRSymbolObject에 구현되지 않은 타입 %d가 있습니다"
 
-#: src/main/dotcode.c:147 src/main/dotcode.c:237
+#: src/main/dotcode.c:162 src/main/dotcode.c:260
 #, c-format
 msgid "symbol '%s' is too long"
 msgstr "심볼 '%s'는 너무 깁니다"
 
-#: src/main/dotcode.c:159
-msgid ""
-"first argument must be a string (of length 1) or native symbol reference"
-msgstr ""
-"첫번째 인자는 반드시 길이가 1인 문자열이거나 native symbol reference 이어야 "
-"합니다"
+#: src/main/dotcode.c:174
+msgid "first argument must be a string (of length 1) or native symbol reference"
+msgstr "첫번째 인자는 반드시 길이가 1인 문자열이거나 native symbol reference 이어야 합니다"
 
-#: src/main/dotcode.c:201 src/main/dotcode.c:563
+#: src/main/dotcode.c:224 src/main/dotcode.c:1240
 msgid "too many arguments in foreign function call"
 msgstr "외부 함수호출에서 너무 많은 인수들이 있습니다"
 
-#: src/main/dotcode.c:213
+#: src/main/dotcode.c:236
 msgid "PACKAGE = \"\" is invalid"
 msgstr "PACKAGE = \"\"는 유효하지 않습니다"
 
-#: src/main/dotcode.c:269 src/main/dotcode.c:274 src/main/dotcode.c:279
-#: src/main/dotcode.c:284
+#: src/main/dotcode.c:292 src/main/dotcode.c:297 src/main/dotcode.c:302
+#: src/main/dotcode.c:307
 #, c-format
 msgid "\"%s\" not available for %s() for package \"%s\""
 msgstr "패키지 \"%3$s\"에서 \"%1$s\"는 %2$s() 목적으로 사용가능하지 않습니다"
 
-#: src/main/dotcode.c:289
+#: src/main/dotcode.c:312
 #, c-format
 msgid "%s symbol name \"%s\" not in DLL for package \"%s\""
 msgstr "패키지 \"%3$s\"에는 %1$s 심볼 이름 \"%2$s\"가 DLL에 없습니다 "
 
-#: src/main/dotcode.c:294
+#: src/main/dotcode.c:317
 #, c-format
 msgid "%s symbol name \"%s\" not in load table"
 msgstr "%1$s 심볼 이름 \"%2$s\"은 로드테이블에 없습니다"
 
-#: src/main/dotcode.c:348 src/main/dotcode.c:352 src/main/dotcode.c:362
-#: src/main/dotcode.c:427 src/main/dotcode.c:434
+#: src/main/dotcode.c:368 src/main/dotcode.c:370 src/main/dotcode.c:380
+#: src/main/dotcode.c:445 src/main/dotcode.c:452
 #, c-format
 msgid "'%s' used more than once"
 msgstr "'%s'는 한번이상 사용되었습니다"
 
-#: src/main/dotcode.c:358
+#: src/main/dotcode.c:376
 msgid "DLL name is too long"
 msgstr "DLL 이름이 너무 깁니다"
 
-#: src/main/dotcode.c:403
+#: src/main/dotcode.c:421
 msgid "PACKAGE argument must be a single character string"
 msgstr "패키지 인자는 반드시 한개의 문자열이어야 합니다"
 
-#: src/main/dotcode.c:409
+#: src/main/dotcode.c:427
 msgid "PACKAGE argument is too long"
 msgstr "패키지 인자가 너무 깁니다"
 
-#: src/main/dotcode.c:474
+#: src/main/dotcode.c:492
 msgid "no arguments supplied"
 msgstr "제공된 인자가 없습니다"
 
-#: src/main/dotcode.c:475 src/main/seq.c:913
+#: src/main/dotcode.c:493 src/main/seq.c:911
 msgid "too many arguments"
 msgstr "너무 많은 인자들이 있습니다"
 
-#: src/main/dotcode.c:512 src/main/dotcode.c:554 src/main/dotcode.c:1397
+#: src/main/dotcode.c:530 src/main/dotcode.c:1232 src/main/dotcode.c:1420
 msgid "'.NAME' is missing"
 msgstr "'.NAME'이 없습니다"
 
-#: src/main/dotcode.c:521 src/main/dotcode.c:570 src/main/dotcode.c:1418
+#: src/main/dotcode.c:539 src/main/dotcode.c:1247 src/main/dotcode.c:1441
 #, c-format
 msgid "Incorrect number of arguments (%d), expecting %d for '%s'"
 msgstr "'%3$s'에 대해서는 인수의 개수가 %2$d이어야 하는데 %1$d개입니다"
 
-#: src/main/dotcode.c:1227 src/main/dotcode.c:2276
+#: src/main/dotcode.c:1216 src/main/dotcode.c:2290
 msgid "too many arguments, sorry"
 msgstr "인자가 너무 많습니다"
 
-#: src/main/dotcode.c:1261 src/main/dotcode.c:1278 src/main/engine.c:2993
+#: src/main/dotcode.c:1284 src/main/dotcode.c:1301 src/main/engine.c:3013
 msgid "invalid graphics state"
 msgstr "그래픽 상태가 올바르지 않습니다"
 
-#: src/main/dotcode.c:1357
+#: src/main/dotcode.c:1380
 msgid "NULL value for DLLInfoReference when looking for DLL"
 msgstr "DLL을 찾는 도중에 DLLInfoReference에서 NULL 값이 발견되었습니다"
 
-#: src/main/dotcode.c:1458
+#: src/main/dotcode.c:1481
 #, c-format
 msgid "wrong type for argument %d in call to %s"
 msgstr "%2$s를 호출할때 인자 %1$d의 타입이 잘못되었습니다"
 
-#: src/main/dotcode.c:1470
-#, c-format
-msgid ""
-"explicit request not to duplicate arguments in call to '%s', but argument %d "
-"is of the wrong type (%d != %d)"
-msgstr ""
-"'%1$s' 호출시에 중복된 인자들을 사용하지 말라는 요청에도 불구하고, 인자 %2$d"
-"의 타입이 잘못되었습니다 (%3$d != %4$d)"
-
-#: src/main/dotcode.c:1493
+#: src/main/dotcode.c:1510
 #, c-format
 msgid "long vectors (argument %d) are not supported in %s"
 msgstr "길이가 긴 벡터들 (인자 %d)은 %s에서 지원되지 않습니다"
 
-#: src/main/dotcode.c:1524
+#: src/main/dotcode.c:1541
 #, c-format
 msgid "NAs in foreign function call (arg %d)"
 msgstr "외부함수 호출시 NA들이 있습니다 (인자 %d)"
 
-#: src/main/dotcode.c:1547
+#: src/main/dotcode.c:1564
 #, c-format
 msgid "NA/NaN/Inf in foreign function call (arg %d)"
 msgstr "외부 함수 호출시 NA/NaN/Inf가 있습니다 (인자 %d)"
 
-#: src/main/dotcode.c:1552
-msgid "single values not returned if not duplicated"
-msgstr ""
-
-#: src/main/dotcode.c:1578
+#: src/main/dotcode.c:1594
 #, c-format
 msgid "complex NA/NaN/Inf in foreign function call (arg %d)"
 msgstr "외부함수 호출수 복소수형 NA/NaN/Inf가 있습니다 (인자 %d)"
 
-#: src/main/dotcode.c:1597
-msgid "character variables must be duplicated in .C/.Fortran"
-msgstr "문자 변수들이 .C/.Fortran 내에서 중복되었음에 틀림없습니다"
-
-#: src/main/dotcode.c:1602
+#: src/main/dotcode.c:1616
 msgid "only first string in char vector used in .Fortran"
 msgstr ".Fortran 내에서 사용된 문자형 벡터내에 있는 오로지 첫번째 문자열"
 
-#: src/main/dotcode.c:1645 src/main/dotcode.c:1661 src/main/dotcode.c:1672
+#: src/main/dotcode.c:1659 src/main/dotcode.c:1675 src/main/dotcode.c:1686
 #, c-format
 msgid "invalid mode (%s) to pass to Fortran (arg %d)"
 msgstr "Fortran (인자 %2$d)에 전달되는 모드 (%1$s)가 잘못되었습니다"
 
-#: src/main/dotcode.c:1666
+#: src/main/dotcode.c:1680
 #, c-format
 msgid "invalid mode (%s) to pass to C or Fortran (arg %d)"
 msgstr "C 또는 Fortran (인자 %2$d)에 전달되는 모드 (%1$s)가 잘못되었습니다"
 
-#: src/main/dotcode.c:1677
+#: src/main/dotcode.c:1691
 msgid "pairlists are passed as SEXP as from R 2.15.0"
 msgstr "R 2.15.0부터는 pairlists는 SEXP으로서 전달되어집니다"
 
-#: src/main/dotcode.c:2499
+#: src/main/dotcode.c:2510
 #, c-format
 msgid "type \"%s\" not supported in interlanguage calls"
 msgstr "인터랭귀지 호출시에 지원되지 않는 유형 \"%s\"입니다"
 
-#: src/main/dotcode.c:2604
+#: src/main/dotcode.c:2615
 #, c-format
 msgid "mode '%s' is not supported in call_R"
 msgstr "모드 '%s'는 call_R에서 지원되지 않습니다"
 
-#: src/main/dounzip.c:171
+#: src/main/dounzip.c:172
 #, c-format
 msgid " not overwriting file '%s"
 msgstr "파일 '%s을 오버라이딩하지 않습니다"
 
-#: src/main/dounzip.c:256
+#: src/main/dounzip.c:257
 #, c-format
 msgid "zip file '%s' cannot be opened"
 msgstr "zip 파일 '%s'를 열 수 없습니다"
 
-#: src/main/dounzip.c:312
+#: src/main/dounzip.c:313
 msgid "invalid zip name argument"
 msgstr "zip 이름 인수가 유효하지 않습니다"
 
-#: src/main/dounzip.c:315 src/main/dounzip.c:409
+#: src/main/dounzip.c:316 src/main/dounzip.c:410
 msgid "zip path is too long"
 msgstr "zip 경로가 너무 깁니다"
 
-#: src/main/dounzip.c:332
+#: src/main/dounzip.c:333
 msgid "'exdir' is too long"
 msgstr "'exdir'이 너무 깁니다"
 
-#: src/main/dounzip.c:335
+#: src/main/dounzip.c:336
 msgid "'exdir' does not exist"
 msgstr "'exdir'이 존재하지 않습니다"
 
-#: src/main/dounzip.c:363
+#: src/main/dounzip.c:364
 msgid "requested file not found in the zip file"
 msgstr "요청된 파일을 zip 파일로부터 찾을 수 없습니다"
 
-#: src/main/dounzip.c:366
+#: src/main/dounzip.c:367
 msgid "zip file is corrupt"
 msgstr "손상된 zip 파일입니다"
 
-#: src/main/dounzip.c:369
+#: src/main/dounzip.c:370
 msgid "CRC error in zip file"
 msgstr "zip 파일에서 CRC 에러입니다"
 
-#: src/main/dounzip.c:376
+#: src/main/dounzip.c:377
 msgid "write error in extracting from zip file"
 msgstr "zip 파일로부터 추출중 쓰기 에러가 발생했습니다"
 
-#: src/main/dounzip.c:379
+#: src/main/dounzip.c:380
 #, c-format
 msgid "error %d in extracting from zip file"
 msgstr "zip 파일로부터 추출중 에러 %d가 발생했습니다"
 
-#: src/main/dounzip.c:404
+#: src/main/dounzip.c:405
 msgid "unz connections can only be opened for reading"
 msgstr "unz 커넥션은 오로지 읽기위해서만 열립니다"
 
-#: src/main/dounzip.c:415
+#: src/main/dounzip.c:416
 msgid "invalid description of 'unz' connection"
 msgstr "'unz' 커넥션의 설명이 유효하지 않습니다"
 
-#: src/main/dounzip.c:421
+#: src/main/dounzip.c:422
 #, c-format
 msgid "cannot open zip file '%s'"
 msgstr "zip 파일 '%s'를 열 수 없습니다"
 
-#: src/main/dounzip.c:425
+#: src/main/dounzip.c:426
 #, c-format
 msgid "cannot locate file '%s' in zip file '%s'"
 msgstr "zip 파일 '%2$s'내에 파일 '%1$s'를 위치시킬 수 없습니다"
 
-#: src/main/dounzip.c:469
+#: src/main/dounzip.c:470
 msgid "printing not enabled for this connection"
 msgstr "이 커넥션에서는 프린팅을 사용할 수 없습니다"
 
@@ -2777,8 +2738,8 @@ msgstr "이 커넥션에서는 프린팅을 사용할 수 없습니다"
 msgid "write not enabled for this connection"
 msgstr "이 커넥션에서는 쓰기를 할 수 없습니다"
 
-#: src/main/dounzip.c:496 src/main/dounzip.c:500 src/main/dounzip.c:506
-#: src/main/dounzip.c:523
+#: src/main/dounzip.c:494 src/main/dounzip.c:498 src/main/dounzip.c:504
+#: src/main/dounzip.c:521
 msgid "allocation of 'unz' connection failed"
 msgstr "'unz' 커넥션 할당을 할 수 없습니다"
 
@@ -2788,13 +2749,13 @@ msgstr "'function'에 대한 formal arguments들이 유효하지 않습니다"
 
 #: src/main/dstruct.c:100
 msgid "invalid body argument for 'function'"
-msgstr ""
+msgstr "함수에 대한 유효하지 않은 body 인자"
 
 #: src/main/edit.c:110
 msgid "invalid argument to edit()"
 msgstr "edit()에 전달되는 인수가 유효하지 않습니다"
 
-#: src/main/edit.c:121 src/main/saveload.c:2076
+#: src/main/edit.c:121 src/main/saveload.c:2078
 msgid "unable to open file"
 msgstr "파일을 열 수 없습니다"
 
@@ -2858,14 +2819,14 @@ msgid "no graphics system to unregister"
 msgstr "등록을 해제할 그래픽 시스템이 없습니다"
 
 #: src/main/engine.c:443 src/main/engine.c:448 src/main/engine.c:456
-#: src/main/engine.c:463 src/main/engine.c:477 src/modules/X11/devX11.c:1157
+#: src/main/engine.c:463 src/main/engine.c:477 src/modules/X11/devX11.c:1159
 msgid "invalid line end"
 msgstr "라인의 끝이 잘못되었습니다"
 
 #: src/main/engine.c:508 src/main/engine.c:513 src/main/engine.c:521
-#: src/main/engine.c:528 src/main/engine.c:542 src/modules/X11/devX11.c:1175
+#: src/main/engine.c:528 src/main/engine.c:542 src/modules/X11/devX11.c:1177
 msgid "invalid line join"
-msgstr ""
+msgstr "유효하지 않은 줄 결합 "
 
 #: src/main/engine.c:761 src/main/engine.c:865 src/main/engine.c:1098
 #: src/main/engine.c:1205 src/main/engine.c:1328 src/main/engine.c:1392
@@ -2892,83 +2853,92 @@ msgstr "이 장치에서는 래스터 렌더링이 구현되지 않았습니다"
 msgid "raster capture is not available for this device"
 msgstr "이 장치에서는 래스터 캡쳐가 사용가능하지 않습니다"
 
-#: src/main/engine.c:1656
+#: src/main/engine.c:1662
 #, c-format
 msgid "font face %d not supported for font family '%s'"
 msgstr "폰트 페이스 %d는 폰트 페밀리 '%s'에서 지원되지 않습니다"
 
-#: src/main/engine.c:1972
+#: src/main/engine.c:1978
 msgid "no graphics device is active"
 msgstr "활성화된 그래픽 장치가 없습니다"
 
-#: src/main/engine.c:2049
+#: src/main/engine.c:2055
 #, c-format
 msgid "pch value '%d' is invalid in this locale"
 msgstr "이 로케일에서 pch의 값 '%d'은 유효하지 않습니다"
 
-#: src/main/engine.c:2307
+#: src/main/engine.c:2313
 #, c-format
 msgid "unimplemented pch value '%d'"
 msgstr "pch의 값 '%d'는 구현되지 않았습니다"
 
-#: src/main/engine.c:2330
+#: src/main/engine.c:2336
 #, c-format
 msgid "invalid axis extents [GEPretty(.,.,n=%d)"
 msgstr "축의 범위가 유효하지 않습니다 [GEPretty(.,.,n=%d)"
 
-#: src/main/engine.c:2334
+#: src/main/engine.c:2340
 #, c-format
 msgid "infinite axis extents [GEPretty(%g,%g,%d)]"
 msgstr "축의 범위가 무한합니다 [GEPretty(%g,%g,%d)]"
 
-#: src/main/engine.c:2371
+#: src/main/engine.c:2377
 #, c-format
 msgid " .. GEPretty(.): new *lo = %g < %g = x1"
 msgstr " .. GEPretty(.): new *lo = %g < %g = x1"
 
-#: src/main/engine.c:2373
+#: src/main/engine.c:2379
 #, c-format
 msgid " .. GEPretty(.): new *up = %g > %g = x2"
 msgstr " .. GEPretty(.): new *up = %g > %g = x2"
 
-#: src/main/engine.c:2773
+#: src/main/engine.c:2784
 msgid "display list redraw incomplete"
-msgstr ""
+msgstr "디스플레이 목록의 재호출이 불완전합니다."
 
-#: src/main/engine.c:2777
+#: src/main/engine.c:2788
 msgid "invalid display list"
 msgstr "디스플레이 목록이 올바르지 않습니다"
 
-#: src/main/engine.c:2963
+#: src/main/engine.c:2900
+#, c-format
+msgid "snapshot recorded with different graphics engine version (pre 11 - this is version %d)"
+msgstr ""
+
+#: src/main/engine.c:2904
+#, c-format
+msgid "snapshot recorded with different graphics engine version (%d - this is version %d)"
+msgstr ""
+
+#: src/main/engine.c:2983
 msgid "'expr' argument must be an expression"
 msgstr "'expr' 인자는 반드시 표현식이어야 합니다"
 
-#: src/main/engine.c:2965
+#: src/main/engine.c:2985
 msgid "'list' argument must be a list"
 msgstr "'list' 인자는 반드시 리스트이어야 합니다"
 
-#: src/main/engine.c:2971
+#: src/main/engine.c:2991
 msgid "'env' argument must be an environment"
 msgstr "'env' 인자는 반드시 인바이런먼트이어야 합니다"
 
-#: src/main/engine.c:3051 src/main/engine.c:3059
+#: src/main/engine.c:3071 src/main/engine.c:3079
 msgid "invalid multibyte char in pch=\"c\""
 msgstr "pch=\"c\"에 유효하지 않은 멀티바이트 문자가 있습니다"
 
-#: src/main/engine.c:3106
+#: src/main/engine.c:3126
 msgid "invalid hex digit in 'color' or 'lty'"
 msgstr "'color' 또는 'lty'에 유효하지 않은 16진수가 있습니다"
 
-#: src/main/engine.c:3129
+#: src/main/engine.c:3149
 msgid "invalid line type: must be length 2, 4, 6 or 8"
-msgstr ""
-"라인 타입이 유효하지 않습니다: 반드시 길이가 2, 4, 6 또는 8 이어야 합니다"
+msgstr "라인 타입이 유효하지 않습니다: 반드시 길이가 2, 4, 6 또는 8 이어야 합니다"
 
-#: src/main/engine.c:3133
+#: src/main/engine.c:3153
 msgid "invalid line type: zeroes are not allowed"
 msgstr "라인 타입이 유효하지 않습니다: 0의 값은 허용되지 않습니다"
 
-#: src/main/engine.c:3142 src/main/engine.c:3150 src/main/engine.c:3157
+#: src/main/engine.c:3162 src/main/engine.c:3170 src/main/engine.c:3177
 msgid "invalid line type"
 msgstr "라인 타입이 유효하지 않습니다"
 
@@ -2977,706 +2947,699 @@ msgstr "라인 타입이 유효하지 않습니다"
 msgid "cannot change value of locked binding for '%s'"
 msgstr "'%s'에 대해서 잠긴 바인딩의 값은 변경할 수 없습니다"
 
-#: src/main/envir.c:251 src/main/envir.c:1454
+#: src/main/envir.c:251 src/main/envir.c:1530
 msgid "cannot add bindings to a locked environment"
 msgstr "잠겨있는 인바이런먼트에 바인딩을 추가할 수 없습니다"
 
-#: src/main/envir.c:772
+#: src/main/envir.c:775
 msgid "invalid cached value in R_GetGlobalCache"
 msgstr "R_GetGlobalCache에는 유효하지 않은 캐쉬된 값이 있습니다"
 
-#: src/main/envir.c:830
+#: src/main/envir.c:836
 msgid "cannot unbind in the base namespace"
-msgstr ""
+msgstr "베이스 네임스페이스에 바인딩할 수 없습니다."
 
-#: src/main/envir.c:832
+#: src/main/envir.c:838
 msgid "unbind in the base environment is unimplemented"
-msgstr ""
+msgstr "기본 환경 언바인드가 수행되지 않았습니다."
 
-#: src/main/envir.c:834 src/main/envir.c:1684
+#: src/main/envir.c:840 src/main/envir.c:1818
 msgid "cannot remove bindings from a locked environment"
 msgstr "잠겨있는 인바이런먼트로부터 바인딩을 제거할 수 없습니다"
 
-#: src/main/envir.c:1139
+#: src/main/envir.c:1213
 #, c-format
 msgid "argument to '%s' is not an environment"
 msgstr "'%s'에 대한 인자는 인바이런먼트가 아닙니다"
 
-#: src/main/envir.c:1300
+#: src/main/envir.c:1374
 #, c-format
 msgid "the ... list does not contain %d elements"
 msgstr "... 목록은 %d개의 구성요소들을 가지고 있지 않습니다"
 
-#: src/main/envir.c:1302
+#: src/main/envir.c:1376
 #, c-format
 msgid "..%d used in an incorrect context, no ... to look in"
-msgstr ""
+msgstr "부정확한 콘텍스트에서 사용된 %d,  안을 볼 수 없는 "
 
-#: src/main/envir.c:1390 src/main/envir.c:1842 src/main/eval.c:573
-#: src/main/eval.c:3618
-#, c-format
-msgid "argument \"%s\" is missing, with no default"
-msgstr "기본값이 없는 인수 \"%s\"가 누락되어 있습니다"
-
-#: src/main/envir.c:1395
+#: src/main/envir.c:1469
 #, c-format
 msgid "could not find function \"%s\""
 msgstr "함수 \"%s\"를 찾을 수 없습니다"
 
-#: src/main/envir.c:1418
+#: src/main/envir.c:1492
 msgid "cannot assign values in the empty environment"
 msgstr "비어있는 인바이런먼트에는 값을 부여할 수 없습니다"
 
-#: src/main/envir.c:1424 src/main/envir.c:1497
+#: src/main/envir.c:1498 src/main/envir.c:1628
 msgid "cannot assign variables to this database"
 msgstr "이 데이터베이스에 변수를 부여할 수 없습니다"
 
-#: src/main/envir.c:1580
+#: src/main/envir.c:1714
 #, c-format
 msgid "cannot add binding of '%s' to the base environment"
 msgstr "바인딩 '%s'를 베이스 인바이런먼트에 추가할 수 없습니다"
 
-#: src/main/envir.c:1609
+#: src/main/envir.c:1743
 msgid "only the first element is used as variable name"
 msgstr "오로지 첫번째 요소만이 변수명으로 사용됩니다"
 
-#: src/main/envir.c:1641
+#: src/main/envir.c:1775
 msgid "first argument must be a named list"
 msgstr "첫번째 인자는 반드시 named list이어야 합니다"
 
-#: src/main/envir.c:1646
+#: src/main/envir.c:1780
 msgid "names(x) must be a character vector of the same length as x"
 msgstr "names(x)는 반드시 x와 같은 길이를 가지는 문자형 벡터이어야 합니다"
 
-#: src/main/envir.c:1649
+#: src/main/envir.c:1783
 msgid "'envir' argument must be an environment"
 msgstr "'envir' 인자는 반드시 인바이런먼트이어야 합니다"
 
-#: src/main/envir.c:1678
+#: src/main/envir.c:1812
 msgid "cannot remove variables from base namespace"
 msgstr "base 네임스페이스로부터 변수들을 제거 할 수 없습니다"
 
-#: src/main/envir.c:1680
+#: src/main/envir.c:1814
 msgid "cannot remove variables from the base environment"
 msgstr "베이스 인바이런먼트로부터 변수들을 제거 할 수 없습니다"
 
-#: src/main/envir.c:1682
+#: src/main/envir.c:1816
 msgid "cannot remove variables from the empty environment"
 msgstr "비어 있는 인바이런먼트로부터 변수들을 제거 할 수 없습니다"
 
-#: src/main/envir.c:1690
+#: src/main/envir.c:1824
 msgid "cannot remove variables from this database"
 msgstr "이 데이터베이스로부터 변수들을 제거 할 수 없습니다"
 
-#: src/main/envir.c:1849
+#: src/main/envir.c:1985
 #, c-format
 msgid "object '%s' of mode '%s' was not found"
 msgstr "모드 '%2$s'를 가지는 객체 '%1$s'를 찾을 수 없습니다"
 
-#: src/main/envir.c:1921
+#: src/main/envir.c:2068
 #, c-format
 msgid "invalid name in position %d"
 msgstr "위치 %d에 유효하지 않은 이름이 존재합니다"
 
-#: src/main/envir.c:1927
+#: src/main/envir.c:2074
 msgid "second argument must be an environment"
 msgstr "두번째 인자는 반드시 인바이런먼트이어야 합니다"
 
-#: src/main/envir.c:1935 src/main/envir.c:1943
+#: src/main/envir.c:2082 src/main/envir.c:2090
 #, c-format
 msgid "wrong length for '%s' argument"
 msgstr "'%s' 인수의 길이가 잘못되었습니다"
 
-#: src/main/envir.c:2062
+#: src/main/envir.c:2221
 msgid "invalid use of 'missing'"
 msgstr "'missing'의 사용이 올바르지 않습니다"
 
-#: src/main/envir.c:2087
+#: src/main/envir.c:2247
 msgid "'missing' can only be used for arguments"
 msgstr "'missing'은 인자들에 대해서만 사용할 수 있습니다"
 
-#: src/main/envir.c:2168
+#: src/main/envir.c:2333
 msgid "'pos' must be an integer"
 msgstr "'pos'는 반드시 정수이어야 합니다"
 
-#: src/main/envir.c:2182
+#: src/main/envir.c:2347
 msgid "all elements of a list must be named"
 msgstr "리스트의 모든 구성요소들에는 반드시 이름이 주어져야 합니다"
 
-#: src/main/envir.c:2205
+#: src/main/envir.c:2370
 msgid "'attach' only works for lists, data frames and environments"
-msgstr ""
-"'attach'는 리스트, 데이터프레임, 그리고 인바이런먼트에서만 작동하도록 되어 있"
-"습니다"
+msgstr "'attach'는 리스트, 데이터프레임, 그리고 인바이런먼트에서만 작동하도록 되어 있습니다"
 
-#: src/main/envir.c:2288
+#: src/main/envir.c:2453
 msgid "detaching \"package:base\" is not allowed"
 msgstr "\"package:base\"를 분리해 내는 것은 허용되지 않습니다"
 
-#: src/main/envir.c:2589 src/main/envir.c:2644
+#: src/main/envir.c:2798 src/main/envir.c:2879
 msgid "argument must be an environment"
 msgstr "인자는 반드시 인바이런먼트이어야 합니다"
 
-#: src/main/envir.c:2648
+#: src/main/envir.c:2883
 msgid "arguments must be symbolic"
 msgstr "인자들은 반드시 심볼릭이어야 합니다"
 
-#: src/main/envir.c:2772
+#: src/main/envir.c:3032
 msgid "no enclosing environment"
 msgstr "둘러싸고 있는 인바이런먼트가 없습니다"
 
-#: src/main/envir.c:2825
+#: src/main/envir.c:3085
 #, c-format
 msgid "no item called \"%s\" on the search list"
 msgstr "\"%s\"라고 하는 항목은 검색목록에 없습니다"
 
-#: src/main/envir.c:2850
+#: src/main/envir.c:3110
 msgid "using 'as.environment(NULL)' is defunct"
 msgstr "'as.environment(NULL)'의 사용은 더 이상 지원하지 않습니다"
 
-#: src/main/envir.c:2856
+#: src/main/envir.c:3116
 msgid "S4 object does not extend class \"environment\""
 msgstr "S4 객체는 클래스 \"environment\"를 확장하지 않습니다"
 
-#: src/main/envir.c:2871
+#: src/main/envir.c:3131
 msgid "invalid object for 'as.environment'"
 msgstr "'as.environment'에 유효하지 않은 객체입니다"
 
-#: src/main/envir.c:2897 src/main/envir.c:2925 src/main/envir.c:2954
-#: src/main/envir.c:2975 src/main/envir.c:2998 src/main/envir.c:3033
-#: src/main/envir.c:3054
+#: src/main/envir.c:3157 src/main/envir.c:3185 src/main/envir.c:3214
+#: src/main/envir.c:3235 src/main/envir.c:3258 src/main/envir.c:3293
+#: src/main/envir.c:3314
 msgid "not an environment"
 msgstr "인바이런먼트가 아닙니다"
 
-#: src/main/envir.c:2949 src/main/envir.c:2970 src/main/envir.c:2991
-#: src/main/envir.c:3028 src/main/envir.c:3049 src/main/envir.c:3148
+#: src/main/envir.c:3209 src/main/envir.c:3230 src/main/envir.c:3251
+#: src/main/envir.c:3288 src/main/envir.c:3309 src/main/envir.c:3408
 msgid "not a symbol"
 msgstr "심볼이 아닙니다"
 
-#: src/main/envir.c:2962 src/main/envir.c:2983 src/main/envir.c:3041
-#: src/main/envir.c:3062
+#: src/main/envir.c:3222 src/main/envir.c:3243 src/main/envir.c:3301
+#: src/main/envir.c:3322
 #, c-format
 msgid "no binding for \"%s\""
-msgstr ""
+msgstr "\"%s\"에 대한 바인딩이 아님 "
 
-#: src/main/envir.c:2993
+#: src/main/envir.c:3253
 msgid "not a function"
 msgstr "함수가 아닙니다"
 
-#: src/main/envir.c:3001 src/main/envir.c:3017
+#: src/main/envir.c:3261 src/main/envir.c:3277
 msgid "symbol already has a regular binding"
-msgstr ""
+msgstr "심볼은 이미 규칙적 바인딩을 가집니다."
 
-#: src/main/envir.c:3003 src/main/envir.c:3019
+#: src/main/envir.c:3263 src/main/envir.c:3279
 msgid "cannot change active binding if binding is locked"
 msgstr "바인딩이 잠겨있다면 활성화 되어 있는 바인딩을 변경할 수 없습니다"
 
-#: src/main/envir.c:3107
+#: src/main/envir.c:3367 src/main/envir.c:3604
 msgid "unknown op"
 msgstr "알 수 없는 op입니다"
 
-#: src/main/envir.c:3152
+#: src/main/envir.c:3412
 msgid "cannot unbind a locked binding"
 msgstr "잠겨있는 바인딩을 떼어낼 수 없습니다"
 
-#: src/main/envir.c:3154
+#: src/main/envir.c:3414
 msgid "cannot unbind an active binding"
 msgstr "활성화 되어 있는 바인딩을 떼어낼 수 없습니다"
 
-#: src/main/envir.c:3289
+#: src/main/envir.c:3555
 msgid "bad namespace name"
 msgstr "잘못된 네임스페이스명입니다"
 
-#: src/main/envir.c:3301
+#: src/main/envir.c:3567
 msgid "namespace already registered"
 msgstr "이미 등록되어 있는 네임스페이스입니다"
 
-#: src/main/envir.c:3313
+#: src/main/envir.c:3579
 msgid "namespace not registered"
 msgstr "등록되어 있지 않은 네임스페이스입니다1"
 
-#: src/main/envir.c:3360
+#: src/main/envir.c:3635
 msgid "bad import environment argument"
 msgstr "불러오기 인바이런먼트 인자가 잘못되었습니다"
 
-#: src/main/envir.c:3365
+#: src/main/envir.c:3640
 msgid "bad export environment argument"
 msgstr "내보내기 인바이런먼트 인자가 잘못되었습니다"
 
-#: src/main/envir.c:3369
+#: src/main/envir.c:3644
 msgid "length of import and export names must match"
 msgstr "불러오기와 내보내기의 이름들의 길이는 반드시 일치해야 합니다"
 
-#: src/main/envir.c:3392
+#: src/main/envir.c:3667
 #, c-format
 msgid "exported symbol '%s' has no value"
 msgstr "내보내어진 심볼 '%s'이 값을 가지고 있지 않습니다"
 
-#: src/main/envir.c:3557
+#: src/main/envir.c:3833
 #, c-format
 msgid "unknown encoding: %d"
 msgstr "알수없는 인코딩입니다: %d"
 
-#: src/main/envir.c:3577
+#: src/main/envir.c:3853
 #, c-format
 msgid "embedded nul in string: '%s'"
 msgstr "문자열에 nul이 포함되어 있습니다: '%s'"
 
-#: src/main/errors.c:178 src/main/errors.c:215
+#: src/main/errors.c:163 src/main/errors.c:200
 msgid "interrupts suspended; signal ignored"
-msgstr ""
+msgstr "중지 연기됨, 신호가 무시됩니다."
 
-#: src/main/errors.c:318
+#: src/main/errors.c:250
+msgid "[... truncated]"
+msgstr "[... 잘려짐]"
+
+#: src/main/errors.c:310
 msgid "invalid option \"warning.expression\""
 msgstr "유효하지 않은 옵션 \"warning.expression\"입니다"
 
-#: src/main/errors.c:348
+#: src/main/errors.c:339
 #, c-format
 msgid "(converted from warning) %s"
-msgstr ""
+msgstr "(경고에서 변환) %s"
 
-#: src/main/errors.c:359
-#, c-format
-msgid "Warning: %s\n"
-msgstr "경고: %s\n"
+#: src/main/errors.c:349
+msgid "Warning:"
+msgstr "경고:"
 
-#: src/main/errors.c:363
+#: src/main/errors.c:351
 #, c-format
-msgid "Warning in %s : %s\n"
-msgstr "%1$s에서 경고가 발생했습니다 : %2$s\n"
+msgid "Warning in %s :"
+msgstr "%s에서 경고가 발생했습니다 : "
 
-#: src/main/errors.c:365
-#, c-format
-msgid ""
-"Warning in %s :\n"
-"  %s\n"
-msgstr ""
-"%s에서 다음과 같은 경고가 발생했습니다 :\n"
-"  %s\n"
+#: src/main/errors.c:360 src/main/errors.c:374 src/main/errors.c:687
+msgid "Calls:"
+msgstr "호출:"
 
-#: src/main/errors.c:428 src/main/errors.c:447 src/main/errors.c:596
+#: src/main/errors.c:421 src/main/errors.c:440 src/main/errors.c:602
 msgid "Lost warning messages\n"
 msgstr "경고메시지들이 손실되었습니다\n"
 
-#: src/main/errors.c:459
-msgid "Warning message:\n"
-msgid_plural "Warning messages:\n"
-msgstr[0] "경고메시지:\n"
+#: src/main/errors.c:452
+msgid "Warning message:"
+msgid_plural "Warning messages:"
+msgstr[0] "경고메시지(들): "
 
-#: src/main/errors.c:514
+#: src/main/errors.c:462 src/main/errors.c:490
 #, c-format
-msgid "There were %d warnings (use warnings() to see them)\n"
-msgstr ""
-"%d건의 경고들이 있습니다 (이들을 확인하기 위해서는 warnings()를 이용하세요)\n"
+msgid "In %s :"
+msgstr "%s에서:"
 
-#: src/main/errors.c:517
+#: src/main/errors.c:515
 #, c-format
-msgid "There were %d or more warnings (use warnings() to see the first %d)\n"
-msgstr ""
-"%d건 이상의 경고들이 있습니다 (처음 %d건의 경고들을 확인하기 위해서는 "
-"warnings()를 이용하세요)\n"
+msgid "There was %d warning (use warnings() to see it)"
+msgid_plural "There were %d warnings (use warnings() to see them)"
+msgstr[0] "%d건의 경고들이 발견되었습니다 (이를 확인하기 위해서는 warnings()를 이용하시길 바랍니다)."
+
+#: src/main/errors.c:520
+#, c-format
+msgid "There were %d or more warnings (use warnings() to see the first %d)"
+msgstr "%d건 이상의 경고들을 발견되었습니다 (이들 중 처음 %d건을 확인하기 위해서는 warnings()를 이용하시길 바랍니다)."
 
-#: src/main/errors.c:587
+#: src/main/errors.c:593
 msgid "Error during wrapup: "
 msgstr ""
 
-#: src/main/errors.c:612
+#: src/main/errors.c:618
 msgid "Error in "
 msgstr "다음에 오류가 있습니다"
 
-#: src/main/errors.c:613
+#: src/main/errors.c:640 src/main/errors.c:647
 #, c-format
-msgid " (from %s) : "
-msgstr " (%s로부터) : "
+msgid "Error in %s (from %s) : "
+msgstr ""
 
-#: src/main/errors.c:664 src/main/errors.c:670
+#: src/main/errors.c:649
+#, c-format
+msgid "Error in %s : "
+msgstr "%s에서 다음과 같은 에러가 발생했습니다:"
+
+#: src/main/errors.c:669 src/main/errors.c:675
 #, c-format
 msgid "Error: "
 msgstr "에러: "
 
-#: src/main/errors.c:690 src/main/errors.c:1319
+#: src/main/errors.c:696 src/main/errors.c:1300
 msgid "In addition: "
 msgstr "추가정보: "
 
-#: src/main/errors.c:811
+#: src/main/errors.c:818
 msgid "invalid option \"error\"\n"
 msgstr "유효하지 않은 옵션 \"error\"입니다\n"
 
-#: src/main/errors.c:893
-msgid "Execution halted\n"
-msgstr "실행이 정지되었습니다\n"
-
-#: src/main/errors.c:1032
-msgid "'msg1' must be a character string"
-msgstr "'msg1'은 반드시 문자열이어야 합니다"
-
-#: src/main/errors.c:1034
-msgid "'msg2' must be a character string"
-msgstr "'msg2'는 반드시 문자열이어야 합니다"
+#: src/main/errors.c:1013 src/main/errors.c:1015 src/main/options.c:339
+#: src/main/unique.c:1638
+#, c-format
+msgid "'%s' must be a character string"
+msgstr "'%s'는 반드시 문자열(character string)이어야 합니다."
 
-#: src/main/errors.c:1131
+#: src/main/errors.c:1116
 msgid " [invalid string in stop(.)]"
 msgstr " [유효하지 않은 문자열이 stop(.)내에 있습니다]"
 
-#: src/main/errors.c:1162
+#: src/main/errors.c:1148
 msgid " [invalid string in warning(.)]"
 msgstr " [유효하지 않은 문자열이 warning(.)내에 있습니다]"
 
-#: src/main/errors.c:1178
+#: src/main/errors.c:1164
 #, c-format
 msgid "incorrect number of arguments to \"%s\""
 msgstr "\"%s\"에 인자의 개수가 잘못되었습니다"
 
-#: src/main/errors.c:1184 src/main/errors.c:1199
+#: src/main/errors.c:1170 src/main/errors.c:1185
 #, c-format
 msgid "unimplemented feature in %s"
 msgstr "%s에서는 구현되지 않은 기능입니다"
 
-#: src/main/errors.c:1193
+#: src/main/errors.c:1179
 msgid "invalid number of arguments"
 msgstr "인수의 개수가 잘못되었습니다"
 
-#: src/main/errors.c:1194 src/main/logic.c:189
+#: src/main/errors.c:1180 src/main/logic.c:181
 msgid "invalid argument type"
 msgstr "잘못된 인자의 유형입니다"
 
-#: src/main/errors.c:1196
+#: src/main/errors.c:1182
 msgid "time-series/vector length mismatch"
 msgstr "시계열/벡터의 길이가 일치하지 않습니다"
 
-#: src/main/errors.c:1197
+#: src/main/errors.c:1183
 msgid "incompatible arguments"
 msgstr "적합하지 않은 인자들입니다"
 
-#: src/main/errors.c:1200
+#: src/main/errors.c:1186
 msgid "unknown error (report this!)"
 msgstr "알 수 없는 에러입니다 (이것을 보고해주세요!)"
 
-#: src/main/errors.c:1212
+#: src/main/errors.c:1195
+msgid "inaccurate integer conversion in coercion"
+msgstr "강제형변환중 부정확한 정수변환이 발생했습니다"
+
+#: src/main/errors.c:1198
 msgid "unknown warning (report this!)"
 msgstr "알 수 없는 경고입니다 (이것을 보고해주세요!)"
 
-#: src/main/errors.c:1283
+#: src/main/errors.c:1269
 msgid "No function to return from, jumping to top level"
 msgstr "반환될 함수가 없기 때문에 최상위레벨로 이동합니다"
 
-#: src/main/errors.c:1299
+#: src/main/errors.c:1285
 msgid "top level inconsistency?"
 msgstr ""
 
-#: src/main/errors.c:1478
+#: src/main/errors.c:1459
 msgid "bad handler data"
 msgstr ""
 
-#: src/main/errors.c:1628
+#: src/main/errors.c:1613
 msgid "error message not a string"
 msgstr "에러메시지가 문자열이 아닙니다"
 
-#: src/main/errors.c:1703
+#: src/main/errors.c:1688
 msgid "handler or restart stack mismatch in old restart"
 msgstr ""
 
-#: src/main/errors.c:1729 src/main/errors.c:1745
+#: src/main/errors.c:1714 src/main/errors.c:1730
 msgid "bad error message"
 msgstr "잘못된 에러 메시지입니다"
 
-#: src/main/errors.c:1787
+#: src/main/errors.c:1771
 msgid "bad restart"
 msgstr "잘못된 재시작입니다"
 
-#: src/main/errors.c:1819
+#: src/main/errors.c:1803
 msgid "restart not on stack"
 msgstr ""
 
-#: src/main/errors.c:1836
+#: src/main/errors.c:1819
 msgid "not in a try context"
 msgstr ""
 
-#: src/main/errors.c:1849
+#: src/main/errors.c:1832
 msgid "error message must be a character string"
 msgstr "에러메시지는 반드시 문자열이어야 합니다"
 
-#: src/main/eval.c:308
+#: src/main/eval.c:365
 #, c-format
 msgid "source files skipped by Rprof; please increase '%s'"
 msgstr "Rprof에 의해서 건너뛴 소스파일들이므로 '%s'를 증가시켜주세요"
 
-#: src/main/eval.c:328
+#: src/main/eval.c:385
 #, c-format
 msgid "Rprof: cannot open profile file '%s'"
 msgstr "Rprof: 프로필 파일 '%s'를 열 수 없습니다"
 
-#: src/main/eval.c:422
+#: src/main/eval.c:479
 msgid "R profiling is not available on this system"
 msgstr "이 시스템에서는 R 프로파일링을 사용할 수 없습니다"
 
-#: src/main/eval.c:446
-msgid ""
-"promise already under evaluation: recursive default argument reference or "
-"earlier problems?"
+#: src/main/eval.c:503
+msgid "promise already under evaluation: recursive default argument reference or earlier problems?"
 msgstr ""
 
-#: src/main/eval.c:448
+#: src/main/eval.c:505
 msgid "restarting interrupted promise evaluation"
 msgstr ""
 
-#: src/main/eval.c:544
-msgid ""
-"evaluation nested too deeply: infinite recursion / options(expressions=)?"
+#: src/main/eval.c:601
+msgid "evaluation nested too deeply: infinite recursion / options(expressions=)?"
 msgstr ""
 
-#: src/main/eval.c:575 src/main/eval.c:3619
+#: src/main/eval.c:632 src/main/eval.c:4238
 msgid "argument is missing, with no default"
 msgstr "기본값이 없는 인수가 누락되어 있습니다"
 
-#: src/main/eval.c:679 src/main/eval.c:4642
+#: src/main/eval.c:736 src/main/eval.c:1306 src/main/eval.c:5533
 msgid "attempt to apply non-function"
 msgstr "함수가 아닌것에 적용하려고 합니다"
 
-#: src/main/eval.c:702
+#: src/main/eval.c:759
 #, c-format
 msgid "%s at %s#%d: "
 msgstr ""
 
-#: src/main/eval.c:1178
+#: src/main/eval.c:1298 src/main/eval.c:2271
+#, c-format
+msgid "argument %d is empty"
+msgstr "인자 %d는 비어있습니다"
+
+#: src/main/eval.c:1350
 #, c-format
 msgid "could not find symbol \"%s\" in environment of the generic function"
 msgstr "제네릭 함수의 인바이런먼트 내에서 심볼 \"%s\"를 찾을 수 없습니다"
 
-#: src/main/eval.c:1196
+#: src/main/eval.c:1368
 #, c-format
 msgid "symbol \"%s\" not in environment of method"
 msgstr "메소드의 인바이런먼트 내에서 심볼 \"%s\"를 찾을 수 없습니다"
 
-#: src/main/eval.c:1308
+#: src/main/eval.c:1481
 msgid "the condition has length > 1 and only the first element will be used"
 msgstr "length > 1 이라는 조건이 있고, 첫번째 요소만이 사용될 것입니다"
 
-#: src/main/eval.c:1325
+#: src/main/eval.c:1500
 msgid "missing value where TRUE/FALSE needed"
 msgstr "TRUE/FALSE가 필요한 곳에 값이 없습니다"
 
-#: src/main/eval.c:1326
+#: src/main/eval.c:1501
 msgid "argument is not interpretable as logical"
 msgstr ""
 
-#: src/main/eval.c:1327
+#: src/main/eval.c:1502
 msgid "argument is of length zero"
 msgstr "인자의 길이가 0입니다"
 
-#: src/main/eval.c:1418
+#: src/main/eval.c:1596
 msgid "non-symbol loop variable"
 msgstr "심볼이 아닌 루프 변수입니다"
 
-#: src/main/eval.c:1510 src/main/eval.c:4408
+#: src/main/eval.c:1687 src/main/eval.c:5301
 msgid "invalid for() loop sequence"
 msgstr "유효한 for() 루프 시퀀스가 아닙니다"
 
-#: src/main/eval.c:1652
+#: src/main/eval.c:1826
 msgid "multi-argument returns are not permitted"
 msgstr "다중인자 반환은 허용되지 않습니다"
 
-#: src/main/eval.c:1701
+#: src/main/eval.c:1873
 msgid "invalid (NULL) left side of assignment"
 msgstr "할당문의 좌변이 유효하지 않습니다 (NULL입니다)"
 
-#: src/main/eval.c:1734
+#: src/main/eval.c:1907
 msgid "target of assignment expands to non-language object"
 msgstr "대입의 대상이 비언어적 객체로 확장됩니다"
 
-#: src/main/eval.c:1817
+#: src/main/eval.c:1990
 #, c-format
 msgid "overlong name in '%s'"
 msgstr "'%s'에 너무 긴 이름이 있습니다"
 
-#: src/main/eval.c:1915
+#: src/main/eval.c:2080
 msgid "cannot do complex assignments in base namespace"
 msgstr "base 네임스페이스에서는 복소수 대입을 할 수 없습니다"
 
-#: src/main/eval.c:1917
+#: src/main/eval.c:2082
 msgid "cannot do complex assignments in base environment"
 msgstr "베이스 인바이런먼트 내에서는 복소수 대입을 할 수 없습니다"
 
-#: src/main/eval.c:1954 src/main/eval.c:1981
+#: src/main/eval.c:2121 src/main/eval.c:2148
 msgid "invalid function in complex assignment"
 msgstr "복소수 대입에 유효하지 않은 함수가 있습니다"
 
-#: src/main/eval.c:2041
+#: src/main/eval.c:2208
 msgid "invalid (do_set) left-hand side to assignment"
 msgstr "대입에 유효하지 않은 (do_set) 좌변입니다"
 
-#: src/main/eval.c:2103
-#, c-format
-msgid "argument %d is empty"
-msgstr "인자 %d는 비어있습니다"
-
-#: src/main/eval.c:2116
+#: src/main/eval.c:2284
 #, c-format
 msgid "'%s' is missing"
 msgstr "'%s'가 누락되어 있습니다"
 
-#: src/main/eval.c:2267
+#: src/main/eval.c:2439
 msgid "invalid formal argument list for \"function\""
 msgstr "\"function\"에 유효하지 않은 formal argument 목록입니다"
 
-#: src/main/eval.c:2325 src/main/eval.c:2356 src/main/eval.c:2361
+#: src/main/eval.c:2497 src/main/eval.c:2528 src/main/eval.c:2533
 #, c-format
 msgid "invalid '%s' argument of type '%s'"
 msgstr "타입이 '%2$s'인 유효하지 않은 인자 '%1$s'입니다"
 
-#: src/main/eval.c:2353
+#: src/main/eval.c:2525
 msgid "numeric 'envir' arg not of length one"
 msgstr "길이가 1이 아닌 수치형 'envir' 인자입니다"
 
-#: src/main/eval.c:2377 src/main/eval.c:2399
+#: src/main/eval.c:2549 src/main/eval.c:2573
 msgid "restarts not supported in 'eval'"
 msgstr "'eval'에서 지원되는 재실행기능이 아닙니다"
 
-#: src/main/eval.c:2456 src/main/eval.c:2469
+#: src/main/eval.c:2632 src/main/eval.c:2645
 msgid "'Recall' called from outside a closure"
 msgstr "클로저 외부로부터 호출된 'Recall'입니다"
 
-#: src/main/eval.c:2562
+#: src/main/eval.c:2738
 msgid "value in '...' is not a promise"
 msgstr ""
 
-#: src/main/eval.c:2754 src/main/objects.c:720
-#, c-format
-msgid "call name too long in '%s'"
-msgstr "'%s'에 있는 호출명이 너무 깁니다"
-
-#: src/main/eval.c:2775
-#, c-format
-msgid "generic name too long in '%s'"
-msgstr "'%s'에 있는 제네릭 이름이 너무 깁니다"
-
-#: src/main/eval.c:2840
+#: src/main/eval.c:2999
 #, c-format
 msgid "Incompatible methods (\"%s\", \"%s\") for \"%s\""
 msgstr "\"%3$s\"에 호환되는 메소드들이 아닙니다 (\"%1$s\", \"%2$s\")"
 
-#: src/main/eval.c:2906
+#: src/main/eval.c:3048
 msgid "dispatch error in group dispatch"
 msgstr ""
 
-#: src/main/eval.c:3201
+#: src/main/eval.c:3532
 #, c-format
 msgid "\"%s\" is not a %s function"
 msgstr "\"%s\"는 %s 함수가 아닙니다"
 
-#: src/main/eval.c:3430
+#: src/main/eval.c:4047
 msgid "node stack overflow"
 msgstr "노드 스택 오버플로우입니다"
 
-#: src/main/eval.c:3436
+#: src/main/eval.c:4053
 msgid "integer stack overflow"
 msgstr "정수형 스택 오버플로우입니다"
 
-#: src/main/eval.c:3490
+#: src/main/eval.c:4107
 msgid "bad opcode"
 msgstr "잘못된 opcode입니다"
 
-#: src/main/eval.c:4219
+#: src/main/eval.c:5083
 #, c-format
 msgid "invalid %s type in 'x %s y'"
 msgstr "'x %s y'에 유효하지 않은 %s 타입입니다"
 
-#: src/main/eval.c:4310
+#: src/main/eval.c:5195
 msgid "bytecode version mismatch; using eval"
 msgstr "바이트코드 버전이 일치하지 않으므로 eval을 사용합니다"
 
-#: src/main/eval.c:4315
+#: src/main/eval.c:5200
 msgid "bytecode version is too old"
 msgstr "바이트코드 버전이 너무 오래되었습니다"
 
-#: src/main/eval.c:4316
+#: src/main/eval.c:5201
 msgid "bytecode version is too new"
 msgstr "바이트코드 버전이 너무 앞서 있습니다"
 
-#: src/main/eval.c:4350
+#: src/main/eval.c:5235
 msgid "byte code version mismatch"
 msgstr "바이트 코드 버전이 불일치합니다"
 
-#: src/main/eval.c:4477
+#: src/main/eval.c:5383
 msgid "invalid sequence argument in for loop"
 msgstr "for 루프에 유효하지 않은 시퀀스 인자가 있습니다"
 
-#: src/main/eval.c:4624 src/main/names.c:1181
+#: src/main/eval.c:5522 src/main/names.c:1312
 #, c-format
 msgid "there is no .Internal function '%s'"
 msgstr ".Internal 함수 '%s'는 없습니다"
 
-#: src/main/eval.c:4731 src/main/eval.c:5077 src/main/eval.c:5119
+#: src/main/eval.c:5622 src/main/eval.c:5968 src/main/eval.c:6008
 msgid "bad function"
 msgstr "잘못된 함수입니다"
 
-#: src/main/eval.c:4746
+#: src/main/eval.c:5635
 msgid "not a BUILTIN function"
 msgstr "BUILTIN 함수가 아닙니다"
 
-#: src/main/eval.c:5159
+#: src/main/eval.c:6066
+msgid "bad numeric 'switch' offsets"
+msgstr ""
+
+#: src/main/eval.c:6072
 msgid "numeric EXPR required for 'switch' without named alternatives"
+msgstr "'switch'문에 케이스에 대하여 이름을 사용하지 않는다면 수치형 표현식을 이용해야 합니다"
+
+#: src/main/eval.c:6076
+msgid "bad character 'switch' offsets"
 msgstr ""
-"'switch'문에 케이스에 대하여 이름을 사용하지 않는다면 수치형 표현식을 이용해"
-"야 합니다"
 
-#: src/main/eval.c:5255
+#: src/main/eval.c:6188
 msgid "cannot find index for threaded code address"
 msgstr ""
 
-#: src/main/eval.c:5315
+#: src/main/eval.c:6248
 msgid "invalid body"
 msgstr "본체가 올바르지 않습니다"
 
-#: src/main/eval.c:5335
+#: src/main/eval.c:6268
 msgid "invalid symbol"
 msgstr "심볼이 올바르지 않습니다"
 
-#: src/main/eval.c:5379
+#: src/main/eval.c:6312
 msgid "argument is not a byte code object"
 msgstr "인자가 바이트코드 객체가 아닙니다"
 
-#: src/main/eval.c:5400
+#: src/main/eval.c:6334
 msgid "bad file name"
 msgstr "잘못된 파일이름입니다"
 
-#: src/main/eval.c:5404 src/main/eval.c:5425
+#: src/main/eval.c:6338 src/main/eval.c:6359
 msgid "unable to open 'file'"
 msgstr "'file'을 열 수 없습니다"
 
-#: src/main/eval.c:5419 src/main/saveload.c:1942
+#: src/main/eval.c:6353 src/main/saveload.c:1944
 msgid "'file' must be non-empty string"
 msgstr "'file'은 반드시 비어있지 않은 문자열이어야 합니다"
 
-#: src/main/eval.c:5421 src/main/saveload.c:1944 src/main/saveload.c:2244
-#: src/main/serialize.c:2149
+#: src/main/eval.c:6355 src/main/saveload.c:1946 src/main/saveload.c:2246
+#: src/main/serialize.c:2189
 msgid "'ascii' must be logical"
 msgstr "'ascii'는 반드시 논리적이어야 합니다"
 
-#: src/main/eval.c:5492 src/main/eval.c:5511 src/main/eval.c:5541
+#: src/main/eval.c:6426 src/main/eval.c:6445 src/main/eval.c:6475
 msgid "constant buffer must be a generic vector"
 msgstr ""
 
-#: src/main/eval.c:5543
+#: src/main/eval.c:6477
 msgid "bad constant count"
 msgstr ""
 
-#: src/main/eval.c:5579
+#: src/main/eval.c:6515
 msgid "profile timer in use"
 msgstr "프로파일 타이머가 사용중입니다"
 
-#: src/main/eval.c:5581
+#: src/main/eval.c:6517
 msgid "already byte code profiling"
 msgstr ""
 
-#: src/main/eval.c:5599
+#: src/main/eval.c:6535
 msgid "setting profile timer failed"
 msgstr ""
 
-#: src/main/eval.c:5616
+#: src/main/eval.c:6553
 msgid "not byte code profiling"
 msgstr ""
 
+#: src/main/eval.c:6569 src/main/eval.c:6573 src/main/eval.c:6577
+msgid "byte code profiling is not supported in this build"
+msgstr "이 빌드에서는 바이트 코드 프로파일링(byte code profiling)이 지원되지 않습니다."
+
 #: src/main/gevents.c:43
 #, c-format
 msgid "'%s' events not supported in this device"
@@ -3690,26 +3653,26 @@ msgstr "내부에러"
 msgid "this graphics device does not support event handling"
 msgstr "이 그래픽 장치는 이벤트 핸들링을 지원하지 않습니다"
 
-#: src/main/gevents.c:136
+#: src/main/gevents.c:135
 msgid "invalid prompt"
 msgstr "유효하지 않은 프롬프트입니다"
 
-#: src/main/gevents.c:148
+#: src/main/gevents.c:146
 msgid "recursive use of 'getGraphicsEvent' not supported"
 msgstr "'getGraphicsEvent'의 재귀적 사용은 지원되지 않습니다"
 
-#: src/main/gevents.c:158
+#: src/main/gevents.c:157
 msgid "no graphics event handlers set"
 msgstr "설정된 그래픽 이벤트 핸들러가 없습니다"
 
-#: src/main/gram.y:222 src/main/gram.y:237 src/main/gram.y:2222
-#: src/main/gram.y:2236
+#: src/main/gram.y:222 src/main/gram.y:237 src/main/gram.y:2245
+#: src/main/gram.y:2259
 #, c-format
 msgid "EOF whilst reading MBCS char at line %d"
 msgstr "MBCS 문자를 읽고 있는 동안에 라인 %d에서 EOF를 발견했습니다"
 
-#: src/main/gram.y:226 src/main/gram.y:234 src/main/gram.y:2226
-#: src/main/gram.y:2233
+#: src/main/gram.y:226 src/main/gram.y:234 src/main/gram.y:2249
+#: src/main/gram.y:2256
 #, c-format
 msgid "invalid multibyte character in parser at line %d"
 msgstr "구문분석중 라인 %d에서 유효하지 않은 멀티바이트 문자를 찾았습니다"
@@ -3724,115 +3687,126 @@ msgstr "라인 %d에서 입력버퍼 오버플로우가 발생했습니다"
 msgid "incorrect tag type at line %d"
 msgstr "라인 %d에서 잘못된 태그 타입을 발견했습니다"
 
-#: src/main/gram.y:1653
+#: src/main/gram.y:1657
 msgid "contextstack overflow"
 msgstr ""
 
-#: src/main/gram.y:1890
-msgid "input"
-msgstr "입력"
+#: src/main/gram.y:1907 src/main/gram.y:1913
+#, c-format
+msgid "unexpected input"
+msgstr "예상하지 못한 입력입니다."
 
-#: src/main/gram.y:1891
-msgid "end of input"
-msgstr "입력의 끝입니다"
+#: src/main/gram.y:1910 src/main/main.c:311
+#, c-format
+msgid "unexpected end of input"
+msgstr "예상하지 못한 입력의 끝(end of input)입니다."
 
-#: src/main/gram.y:1892
-msgid "string constant"
-msgstr "문자열 상수"
+#: src/main/gram.y:1916
+#, c-format
+msgid "unexpected string constant"
+msgstr "예상하지 못한 문자열 상수(string constant)입니다."
 
-#: src/main/gram.y:1893
-msgid "numeric constant"
-msgstr "숫자형 상수"
+#: src/main/gram.y:1919
+#, c-format
+msgid "unexpected numeric constant"
+msgstr "예상하지 못한 수치형 상수(numeric constant)입니다."
 
-#: src/main/gram.y:1894
-msgid "symbol"
-msgstr "심볼"
+#: src/main/gram.y:1922
+#, c-format
+msgid "unexpected symbol"
+msgstr "예상하지 못한 기호(symbol)입니다."
 
-#: src/main/gram.y:1895
-msgid "assignment"
-msgstr "대입"
+#: src/main/gram.y:1925
+#, c-format
+msgid "unexpected assignment"
+msgstr "예상하지 못한 할당(assignment)입니다."
 
-#: src/main/gram.y:1896
-msgid "end of line"
-msgstr "라인의 끝"
+#: src/main/gram.y:1928
+#, c-format
+msgid "unexpected end of line"
+msgstr "예상하지 못한 라인의 끝(end of line)입니다."
 
-#: src/main/gram.y:1910 src/main/gram.y:1916
+#: src/main/gram.y:1931 src/main/gram.y:1939
 #, c-format
 msgid "unexpected %s"
 msgstr "예기치 않은 %s입니다"
 
-#: src/main/gram.y:1926
+#: src/main/gram.y:1951
 #, c-format
 msgid "repeated formal argument '%s' on line %d"
 msgstr "라인 %2$d에서 formal argument '%1$s'가 반복됩니다"
 
-#: src/main/gram.y:2136
+#: src/main/gram.y:2161
 #, c-format
 msgid "integer literal %s contains decimal; using numeric value"
 msgstr ""
 
-#: src/main/gram.y:2140
+#: src/main/gram.y:2164
 #, c-format
 msgid "non-integer value %s qualified with L; using numeric value"
 msgstr ""
 
-#: src/main/gram.y:2153
+#: src/main/gram.y:2176
 #, c-format
 msgid "integer literal %s contains unnecessary decimal point"
 msgstr ""
 
-#: src/main/gram.y:2185
+#: src/main/gram.y:2208
 #, c-format
 msgid "unable to allocate buffer for long string at line %d"
 msgstr ""
 
-#: src/main/gram.y:2338
+#: src/main/gram.y:2347 src/main/gram.y:2370 src/main/gram.y:2407
+#: src/main/gram.y:2443
+#, c-format
+msgid "nul character not allowed (line %d)"
+msgstr "(라인 %d) 널 문자(nul character)는 사용할 수 없습니다."
+
+#: src/main/gram.y:2363
 #, c-format
 msgid "'\\x' used without hex digits in character string starting \"%s\""
 msgstr "\"%s\"로 시작하는 문자열 가운데 16진수가 아닌 '\\x'가 사용되었습니다"
 
-#: src/main/gram.y:2352
+#: src/main/gram.y:2379
 #, c-format
 msgid "\\uxxxx sequences not supported inside backticks (line %d)"
 msgstr "backticks 내부에서 지원하는 \\uxxxx 시퀀스들이 아닙니다 (라인 %d)"
 
-#: src/main/gram.y:2367
+#: src/main/gram.y:2394
 #, c-format
 msgid "'\\u' used without hex digits in character string starting \"%s\""
 msgstr "\"%s\"로 시작하는 문자열 가운데 16진수가 아닌 '\\u'이 사용되었습니다"
 
-#: src/main/gram.y:2375
+#: src/main/gram.y:2402
 #, c-format
 msgid "invalid \\u{xxxx} sequence (line %d)"
 msgstr "유효하지 않은 \\u{xxxx} 시퀀스입니다 (라인 %d)"
 
-#: src/main/gram.y:2387
+#: src/main/gram.y:2416
 #, c-format
 msgid "\\Uxxxxxxxx sequences not supported inside backticks (line %d)"
 msgstr "backticks 내부에서 지원하는 \\Uxxxxxxxx 시퀀스들이 아닙니다 (라인 %d)"
 
-#: src/main/gram.y:2402
+#: src/main/gram.y:2431
 #, c-format
 msgid "'\\U' used without hex digits in character string starting \"%s\""
 msgstr "\"%s\"로 시작하는 문자열들 가운데 16진수가 아닌 '\\U'가 사용되었습니다"
 
-#: src/main/gram.y:2410
+#: src/main/gram.y:2439
 #, c-format
 msgid "invalid \\U{xxxxxxxx} sequence (line %d)"
 msgstr "유효한 \\U{xxxxxxxx} 시퀀스가 아닙니다 (라인 %d)"
 
-#: src/main/gram.y:2451
+#: src/main/gram.y:2482
 #, c-format
 msgid "'\\%c' is an unrecognized escape in character string starting \"%s\""
-msgstr ""
-"\"%2$s\"로 시작하는 문자열 중에서 '\\%1$c'는 인식할 수 없는 이스케이프입니다"
+msgstr "\"%2$s\"로 시작하는 문자열 중에서 '\\%1$c'는 인식할 수 없는 이스케이프입니다"
 
-#: src/main/gram.y:2510
+#: src/main/gram.y:2546
 msgid "mixing Unicode and octal/hex escapes in a string is not allowed"
-msgstr ""
-"문자열에서 유니코드와 8진수/16진수 이스케이프의 혼용은 허용되지 않습니다"
+msgstr "문자열에서 유니코드와 8진수/16진수 이스케이프의 혼용은 허용되지 않습니다"
 
-#: src/main/gram.y:2514
+#: src/main/gram.y:2550
 #, c-format
 msgid ""
 "string at line %d containing Unicode escapes not in this locale\n"
@@ -3841,13 +3815,13 @@ msgstr ""
 "이 로케일에서 라인 %d에 있는 유니코드 이스케이프를 포함하는 문자열이\n"
 "너무 깁니다 (최대 10000자까지입니다)"
 
-#: src/main/gram.y:3112 src/main/gram.y:3119 src/main/gram.y:3125
-#: src/main/gram.y:3132
+#: src/main/gram.y:3148 src/main/gram.y:3155 src/main/gram.y:3161
+#: src/main/gram.y:3168
 #, c-format
 msgid "contextstack overflow at line %d"
 msgstr ""
 
-#: src/main/gram.y:3227
+#: src/main/gram.y:3263
 #, c-format
 msgid "internal parser error at line %d"
 msgstr "라인 %d에서 내부 구문분석 에러입니다"
@@ -3857,34 +3831,34 @@ msgstr "라인 %d에서 내부 구문분석 에러입니다"
 msgid "relative range of values =%4.0f * EPS, is small (axis %d)"
 msgstr ""
 
-#: src/main/grep.c:93
+#: src/main/grep.c:96
 #, c-format
 msgid "invalid regular expression '%s', reason '%s'"
 msgstr "'%1$s'은 잘못된 정규표현식입니다, 그 이유는 '%2$s'입니다"
 
-#: src/main/grep.c:95
+#: src/main/grep.c:98
 #, c-format
 msgid "invalid regular expression, reason '%s'"
 msgstr "잘못된 정규표현식입니다, 그 이유는 '%s'입니다"
 
-#: src/main/grep.c:220 src/main/grep.c:308 src/main/grep.c:416
-#: src/main/grep.c:883 src/main/grep.c:2473
+#: src/main/grep.c:225 src/main/grep.c:315 src/main/grep.c:426
+#: src/main/grep.c:900 src/main/grep.c:2502
 #, c-format
 msgid "input string %d is invalid UTF-8"
 msgstr "입력된 문자열 %d는 유효하지 않은 UTF-8입니다"
 
-#: src/main/grep.c:286 src/main/grep.c:383
+#: src/main/grep.c:292 src/main/grep.c:391
 #, c-format
 msgid "'split' string %d is invalid UTF-8"
 msgstr "'split' 문자열 %d는 유효하지 않은 UTF-8입니다"
 
-#: src/main/grep.c:290 src/main/grep.c:387 src/main/grep.c:560
+#: src/main/grep.c:296 src/main/grep.c:395 src/main/grep.c:571
 #, c-format
 msgid "'split' string %d is invalid in this locale"
 msgstr "이 로케일에서 'split' 문자열 %d는 유효하지 않습니다"
 
-#: src/main/grep.c:395 src/main/grep.c:851 src/main/grep.c:1600
-#: src/main/grep.c:2394
+#: src/main/grep.c:404 src/main/grep.c:867 src/main/grep.c:1621
+#: src/main/grep.c:2419
 #, c-format
 msgid ""
 "PCRE pattern compilation error\n"
@@ -3892,59 +3866,58 @@ msgid ""
 "\tat '%s'\n"
 msgstr ""
 
-#: src/main/grep.c:397
+#: src/main/grep.c:406
 #, c-format
 msgid "invalid split pattern '%s'"
 msgstr "유효하지 않은 분할패턴 '%s'입니다"
 
-#: src/main/grep.c:401 src/main/grep.c:857 src/main/grep.c:1607
-#: src/main/grep.c:2401
+#: src/main/grep.c:410 src/main/grep.c:873 src/main/grep.c:1628
+#: src/main/grep.c:2426
 #, c-format
 msgid ""
 "PCRE pattern study error\n"
 "\t'%s'\n"
 msgstr ""
 
-#: src/main/grep.c:834 src/main/grep.c:2377
+#: src/main/grep.c:849 src/main/grep.c:2401
 msgid "regular expression is invalid UTF-8"
 msgstr "정규표현식이 유효한지 않은 UTF-8로 되어 있습니다"
 
-#: src/main/grep.c:853 src/main/grep.c:1602 src/main/grep.c:2396
+#: src/main/grep.c:869 src/main/grep.c:1623 src/main/grep.c:2421
 #, c-format
 msgid "invalid regular expression '%s'"
 msgstr "유효하지 않은 정규표현식 '%s'입니다"
 
-#: src/main/grep.c:1264
+#: src/main/grep.c:1282
 msgid "pattern matches an empty string infinitely, returning first match only"
-msgstr ""
-"패턴이 비어있는 문자열과 무한히 매칭되기 때문에 가장 처음의 매칭을 돌려줍니다"
+msgstr "패턴이 비어있는 문자열과 무한히 매칭되기 때문에 가장 처음의 매칭을 돌려줍니다"
 
-#: src/main/grep.c:1575
+#: src/main/grep.c:1595
 msgid "'pattern' is invalid UTF-8"
 msgstr "'pattern'이 유효하지 않은 UTF-8로 되어 있습니다"
 
-#: src/main/grep.c:1577
+#: src/main/grep.c:1597
 msgid "'replacement' is invalid UTF-8"
 msgstr "'replacement'가 유효하지 않는 UTF-8로 되어 있습니다"
 
-#: src/main/grep.c:1581
+#: src/main/grep.c:1601
 msgid "'pattern' is invalid in this locale"
 msgstr "이 로케일에서 'pattern'은 유효하지 않습니다"
 
-#: src/main/grep.c:1584
+#: src/main/grep.c:1604
 msgid "'replacement' is invalid in this locale"
 msgstr "이 로케일에서 'replacement'는 유효하지 않습니다"
 
-#: src/main/grep.c:1589
+#: src/main/grep.c:1609
 msgid "zero-length pattern"
 msgstr "길이가 0인 패턴입니다"
 
-#: src/main/grep.c:1732 src/main/grep.c:1748 src/main/grep.c:1796
-#: src/main/grep.c:1812 src/main/grep.c:1859 src/main/grep.c:1875
+#: src/main/grep.c:1753 src/main/grep.c:1769 src/main/grep.c:1817
+#: src/main/grep.c:1833 src/main/grep.c:1880 src/main/grep.c:1896
 msgid "result string is too long"
 msgstr "초래된 문자열이 너무 깁니다"
 
-#: src/main/grep.c:2411
+#: src/main/grep.c:2436
 #, c-format
 msgid "'pcre_fullinfo' returned '%d' "
 msgstr "'pcre_fullinfo'가 '%d'를 되돌려줬습니다"
@@ -3953,33 +3926,28 @@ msgstr "'pcre_fullinfo'가 '%d'를 되돌려줬습니다"
 msgid "ignoring non-pairlist attributes"
 msgstr ""
 
-#: src/main/internet.c:92
+#: src/main/internet.c:83
 msgid "internet routines cannot be accessed in module"
 msgstr "이 모듈에서는 인터넷 루틴들에 접근할 수 없습니다"
 
-#: src/main/internet.c:103 src/main/internet.c:141 src/main/internet.c:154
-#: src/main/internet.c:165 src/main/internet.c:176 src/main/internet.c:187
-#: src/main/internet.c:196 src/main/internet.c:207 src/main/internet.c:218
-#: src/main/internet.c:227 src/main/internet.c:237
+#: src/main/internet.c:94 src/main/internet.c:106 src/main/internet.c:119
+#: src/main/internet.c:130 src/main/internet.c:141 src/main/internet.c:152
+#: src/main/internet.c:161 src/main/internet.c:172 src/main/internet.c:183
+#: src/main/internet.c:192 src/main/internet.c:202 src/main/internet.c:318
+#: src/main/internet.c:330 src/main/internet.c:342 src/main/internet.c:354
 msgid "internet routines cannot be loaded"
 msgstr "인터넷 루틴들을 로드할 수 없습니다"
 
-#: src/main/internet.c:118 src/main/memory.c:3434 src/main/memory.c:3444
-#: src/main/memory.c:3456 src/main/memory.c:3470 src/main/memory.c:3487
-#: src/main/memory.c:3505
-msgid "bad value"
-msgstr "잘못된 값입니다"
-
-#: src/main/internet.c:124
-msgid "internet routines were already initialized"
-msgstr "인터넷 루틴들은 이미 초기화되어 있었습니다"
-
-#: src/main/internet.c:251 src/main/internet.c:265 src/main/internet.c:281
-#: src/main/internet.c:293 src/main/internet.c:307 src/main/internet.c:327
-#: src/main/internet.c:340
+#: src/main/internet.c:216 src/main/internet.c:230 src/main/internet.c:247
+#: src/main/internet.c:259 src/main/internet.c:273 src/main/internet.c:293
+#: src/main/internet.c:306
 msgid "socket routines cannot be loaded"
 msgstr "소켓 루틴들을 로드할 수 없습니다"
 
+#: src/main/internet.c:242
+msgid "attempt to close invalid socket"
+msgstr ""
+
 #: src/main/lapack.c:39
 msgid "LAPACK routines cannot be accessed in module"
 msgstr "이 모듈에서는 LAPACK 루틴들에 접근할 수 없습니다"
@@ -3988,42 +3956,38 @@ msgstr "이 모듈에서는 LAPACK 루틴들에 접근할 수 없습니다"
 msgid "LAPACK routines cannot be loaded"
 msgstr "LAPACK 루틴들을 로드할 수 없습니다"
 
-#: src/main/logic.c:70
-msgid "binary operations require two arguments"
-msgstr "바이너리 연산자는 두개의 인수들을 필요로 합니다"
-
-#: src/main/logic.c:88 src/main/logic.c:150
+#: src/main/logic.c:80 src/main/logic.c:142
 msgid "operations are possible only for numeric, logical or complex types"
 msgstr "오로지 숫자, 논리, 또는 복소수 유형에 대한 연산들만 가능합니다"
 
-#: src/main/logic.c:98
+#: src/main/logic.c:90
 msgid "binary operation on non-conformable arrays"
 msgstr ""
 
-#: src/main/logic.c:124 src/main/relop.c:247
+#: src/main/logic.c:116 src/main/relop.c:241
 msgid "non-conformable time series"
 msgstr ""
 
-#: src/main/logic.c:254
+#: src/main/logic.c:247
 #, c-format
 msgid "'%s' operator requires 2 arguments"
 msgstr "'%s' 연산자는 2개의 인자들을 필요로 합니다"
 
-#: src/main/logic.c:261
+#: src/main/logic.c:254
 #, c-format
 msgid "invalid 'x' type in 'x %s y'"
 msgstr "'x' 유형은 'x %s y'에 유효하지 않습니다"
 
-#: src/main/logic.c:268
+#: src/main/logic.c:261
 #, c-format
 msgid "invalid 'y' type in 'x %s y'"
 msgstr "'y' 유형은 'x %s y'에 유효하지 않습니다"
 
-#: src/main/logic.c:341
+#: src/main/logic.c:334
 msgid "Unary operator `!' called with two arguments"
 msgstr "두개의 인자와 함께 호출된 단항연산자 `!'입니다"
 
-#: src/main/logic.c:448
+#: src/main/logic.c:439
 #, c-format
 msgid "coercing argument of type '%s' to logical"
 msgstr "유형 '%s'인 인자를 논리형으로 강제형변환을 수행합니다"
@@ -4032,61 +3996,73 @@ msgstr "유형 '%s'인 인자를 논리형으로 강제형변환을 수행합니
 msgid "dummy - do not translate"
 msgstr ""
 
-#: src/main/main.c:476
+#: src/main/main.c:329
+msgid "error during cleanup\n"
+msgstr ""
+
+#: src/main/main.c:336
+msgid "Execution halted\n"
+msgstr "실행이 정지되었습니다\n"
+
+#: src/main/main.c:505
 msgid "Error: segfault from C stack overflow\n"
 msgstr ""
 
-#: src/main/main.c:846
+#: src/main/main.c:888
 msgid "unable to open the base package\n"
 msgstr "base 패키지를 열 수 없습니다\n"
 
-#: src/main/main.c:924
+#: src/main/main.c:971
 #, c-format
 msgid "unable to restore saved data in %s\n"
 msgstr "%s에 저장되어 있는 데이터를 복구 할 수 없습니다\n"
 
-#: src/main/main.c:971
+#: src/main/main.c:1020
 msgid "During startup - "
 msgstr "스타트업을 하는 동안 - "
 
-#: src/main/main.c:1224
+#: src/main/main.c:1036
+msgid "unable to initialize the JIT\n"
+msgstr ""
+
+#: src/main/main.c:1290
 msgid "cannot quit from browser"
 msgstr "브라우저로부터 빠져나올 수 없습니다"
 
-#: src/main/main.c:1228
+#: src/main/main.c:1294
 msgid "one of \"yes\", \"no\", \"ask\" or \"default\" expected."
 msgstr "\"yes\", \"no\", \"ask\" 또는 \"default\" 중 하나가 입력되어야 합니다"
 
-#: src/main/main.c:1233
+#: src/main/main.c:1299
 msgid "save=\"ask\" in non-interactive use: command-line default will be used"
 msgstr "save=\"ask\"은 비대화식 사용이므로 커맨드라인 디폴트가 사용될 것입니다"
 
-#: src/main/main.c:1241
+#: src/main/main.c:1307
 msgid "unrecognized value of 'save'"
 msgstr "'save'의 값을 인식할 수 없습니다"
 
-#: src/main/main.c:1244
+#: src/main/main.c:1310
 msgid "invalid 'status', 0 assumed"
 msgstr "'status'가 유효하지 않아 0으로 가정됩니다"
 
-#: src/main/main.c:1249
+#: src/main/main.c:1315
 msgid "invalid 'runLast', FALSE assumed"
 msgstr "'runLast'가 유효하지 않아 FALSE로 가정됩니다"
 
-#: src/main/main.c:1280
+#: src/main/main.c:1346
 msgid "cannot allocate space for toplevel callback element"
 msgstr "최상위 callback 요소에 공간을 할당할 수 없습니다"
 
-#: src/main/main.c:1358
+#: src/main/main.c:1424
 msgid "negative index passed to R_removeTaskCallbackByIndex"
 msgstr "R_removeTaskCallbackByIndex에 음수를 가지는 인덱스가 전달되었습니다"
 
-#: src/main/main.c:1468
+#: src/main/main.c:1534
 #, c-format
 msgid "warning messages from top-level task callback '%s'\n"
 msgstr "최상위 작업 callback '%s'로부터 나온 경고메시지입니다\n"
 
-#: src/main/main.c:1524
+#: src/main/main.c:1591
 msgid "top-level task callback did not return a logical value"
 msgstr "최상위 작업 callback이 논리값을 반환하지 않았습니다"
 
@@ -4106,464 +4082,435 @@ msgstr "인자들의 길이가 서로 배수관계에 있지 않습니다"
 msgid "invalid partial string match"
 msgstr "유효한 부분 문자열 매치가 아닙니다"
 
-#: src/main/match.c:228 src/main/match.c:268 src/main/objects.c:56
-#: src/main/objects.c:66
+#: src/main/match.c:228 src/main/match.c:266 src/main/objects.c:49
+#: src/main/objects.c:59
 #, c-format
 msgid "formal argument \"%s\" matched by multiple actual arguments"
 msgstr ""
 
-#: src/main/match.c:231 src/main/match.c:266
+#: src/main/match.c:231 src/main/match.c:264
 #, c-format
 msgid "argument %d matches multiple formal arguments"
 msgstr ""
 
-#: src/main/match.c:272
+#: src/main/match.c:270
 #, c-format
 msgid "partial argument match of '%s' to '%s'"
 msgstr ""
 
-#: src/main/match.c:383
+#: src/main/match.c:380
 #, c-format
 msgid "unused argument %s"
 msgid_plural "unused arguments %s"
 msgstr[0] "사용되지 않은 인자 %s"
 
-#: src/main/memory.c:1232
+#: src/main/memory.c:1234
 msgid "can only weakly reference/finalize reference objects"
 msgstr ""
 
-#: src/main/memory.c:1266
+#: src/main/memory.c:1268
 msgid "finalizer must be a function or NULL"
 msgstr "파이널라이저는 반드시 함수 또는 NULL이어야 합니다"
 
-#: src/main/memory.c:1322 src/main/memory.c:1330 src/main/memory.c:1341
+#: src/main/memory.c:1324 src/main/memory.c:1332 src/main/memory.c:1343
 msgid "not a weak reference"
 msgstr "weak reference가 아닙니다"
 
-#: src/main/memory.c:1472
+#: src/main/memory.c:1474
 msgid "first argument must be environment or external pointer"
 msgstr "첫번째 인자는 반드시 인바이런먼트 또는 외부포인터이어야 합니다"
 
-#: src/main/memory.c:1474
+#: src/main/memory.c:1476
 msgid "second argument must be a function"
 msgstr "두번째 인자는 반드시 함수이어야 합니다"
 
-#: src/main/memory.c:1478
+#: src/main/memory.c:1480
 msgid "third argument must be 'TRUE' or 'FALSE'"
 msgstr "세번째 인자는 반드시 'TRUE' 또는 'FALSE'이어야 합니다"
 
-#: src/main/memory.c:1970
+#: src/main/memory.c:1979
 msgid "vector memory exhausted (limit reached?)"
 msgstr "벡터 메모리가 모두 사용되었습니다 (한계에 도달했나요?)"
 
-#: src/main/memory.c:1976
+#: src/main/memory.c:1985
 msgid "cons memory exhausted (limit reached?)"
 msgstr "cons 메모리가 모두 사용되었습니다 (한계에 도달했나요?)"
 
-#: src/main/memory.c:1981
+#: src/main/memory.c:1990
 msgid "memory exhausted (limit reached?)"
 msgstr "메모리가 모두 사용되었습니다 (한계에 도달했나요?)"
 
-#: src/main/memory.c:2116
+#: src/main/memory.c:2126
 #, c-format
 msgid "cannot allocate memory block of size %0.f Tb"
 msgstr "크기가 %0.f Tb인 메모리 블락을 할당할 수 없습니다"
 
-#: src/main/memory.c:2121
+#: src/main/memory.c:2131
 #, c-format
 msgid "cannot allocate memory block of size %0.1f Gb"
 msgstr "크기가 %0.1f GB인 메모리 블락을 할당할 수 없습니다"
 
-#: src/main/memory.c:2442
+#: src/main/memory.c:2458
 msgid "vector is too large"
 msgstr "벡터가 너무 큽니다"
 
-#: src/main/memory.c:2445
+#: src/main/memory.c:2461
 msgid "negative length vectors are not allowed"
 msgstr "길이가 음수인 벡터는 허용되지 않습니다"
 
-#: src/main/memory.c:2471 src/main/memory.c:2484 src/main/memory.c:2497
-#: src/main/memory.c:2512
+#: src/main/memory.c:2487 src/main/memory.c:2500 src/main/memory.c:2513
+#: src/main/memory.c:2528
 #, c-format
 msgid "cannot allocate vector of length %d"
 msgstr "길이가 %d인 벡터를 할당할 수 없습니다"
 
-#: src/main/memory.c:2533
+#: src/main/memory.c:2549
 #, c-format
 msgid "invalid type/length (%s/%d) in vector allocation"
 msgstr "벡터할당에 유효한 타입/길이 (%s/%d)가 아닙니다"
 
-#: src/main/memory.c:2636
+#: src/main/memory.c:2648
 #, c-format
 msgid "cannot allocate vector of size %0.1f Gb"
 msgstr "크기가 %0.1f Gb인 벡터를 할당할 수 없습니다"
 
-#: src/main/memory.c:2640
+#: src/main/memory.c:2652
 #, c-format
 msgid "cannot allocate vector of size %0.1f Mb"
 msgstr "크기가 %0.1f Mb인 벡터를 할당할 수 없습니다"
 
-#: src/main/memory.c:2644
+#: src/main/memory.c:2656
 #, c-format
 msgid "cannot allocate vector of size %0.f Kb"
 msgstr "크기가 %0.f Kb인 벡터를 할당할 수 없습니다"
 
-#: src/main/memory.c:3001
+#: src/main/memory.c:3071
 msgid "protect(): protection stack overflow"
 msgstr "protect(): 프로텍션 스택 오버플로우입니다"
 
-#: src/main/memory.c:3008
+#: src/main/memory.c:3078
 #, c-format
-msgid "unprotect(): only %d protected items"
-msgstr ""
+msgid "unprotect(): only %d protected item"
+msgid_plural "unprotect(): only %d protected items"
+msgstr[0] ""
 
-#: src/main/memory.c:3041
+#: src/main/memory.c:3113
 msgid "unprotect_ptr: pointer not found"
 msgstr "unprotect_ptr: 포인터를 찾을 수 없습니다"
 
-#: src/main/memory.c:3079
+#: src/main/memory.c:3151
 #, c-format
-msgid "R_Reprotect: only %d protected items, can't reprotect index %d"
-msgstr ""
+msgid "R_Reprotect: only %d protected item, can't reprotect index %d"
+msgid_plural "R_Reprotect: only %d protected items, can't reprotect index %d"
+msgstr[0] ""
 
-#: src/main/memory.c:3129
+#: src/main/memory.c:3203
 #, c-format
 msgid "'Calloc' could not allocate memory (%.0f of %u bytes)"
 msgstr "'Calloc'은 메모리 (%.0f of %u 바이트)를 할당할 수 없습니다"
 
-#: src/main/memory.c:3140
+#: src/main/memory.c:3214
 #, c-format
 msgid "'Realloc' could not re-allocate memory (%.0f bytes)"
 msgstr "'Realloc'은 메모리 (%.0f 바이트)를 재할당 할 수 없습니다"
 
-#: src/main/memory.c:3380
+#: src/main/memory.c:3460
 msgid "not safe to return vector pointer"
 msgstr "벡터포인터를 반환하기에 안전하지 않습니다"
 
-#: src/main/memory.c:3392
+#: src/main/memory.c:3471
 #, c-format
 msgid "attempt to set index %lu/%lu in SET_STRING_ELT"
 msgstr ""
 
-#: src/main/memory.c:3408
+#: src/main/memory.c:3487
 #, c-format
 msgid "attempt to set index %lu/%lu in SET_VECTOR_ELT"
 msgstr ""
 
-#: src/main/memory.c:3658
+#: src/main/memory.c:3514 src/main/memory.c:3524 src/main/memory.c:3536
+#: src/main/memory.c:3550 src/main/memory.c:3565 src/main/memory.c:3583
+msgid "bad value"
+msgstr "잘못된 값입니다"
+
+#: src/main/memory.c:3746
 msgid "memory profiling is not available on this system"
 msgstr "이 시스템에서는 메모리 프로파일링 기능을 이용가능하지 않습니다"
 
-#: src/main/memory.c:3723
+#: src/main/memory.c:3810
 #, c-format
 msgid "Rprofmem: cannot open output file '%s'"
 msgstr "Rprofmem: 출력파일 '%s'을 열 수 없습니다"
 
-#: src/main/memory.c:3830
+#: src/main/memory.c:3915
 #, c-format
 msgid "long vectors not supported yet: %s:%d"
 msgstr "아직까지는 지원되지 않는 긴 벡터들입니다: %s:%d"
 
-#: src/main/names.c:996
+#: src/main/names.c:1021
 msgid "string argument required"
 msgstr "문자열 인수가 요구되어 집니다"
 
-#: src/main/names.c:999
+#: src/main/names.c:1024
 msgid "no such primitive function"
 msgstr "그러한 프리미티브 함수는 없습니다"
 
-#: src/main/names.c:1146
+#: src/main/names.c:1212 src/main/names.c:1242
 msgid "attempt to use zero-length variable name"
 msgstr "길이가 0인 변수명을 사용하려고 시도했습니다"
 
-#: src/main/names.c:1148
+#: src/main/names.c:1214 src/main/names.c:1244
 #, c-format
 msgid "variable names are limited to %d bytes"
 msgstr "변수명들은 최대 %d 바이트까지 허용됩니다"
 
-#: src/main/names.c:1176 src/main/names.c:1179
+#: src/main/names.c:1307 src/main/names.c:1310
 msgid "invalid .Internal() argument"
 msgstr "유효하지 않은 .Internal() 인자입니다"
 
-#: src/main/objects.c:46
+#: src/main/objects.c:39
 msgid "generic 'function' is not a function"
 msgstr "제네릭 'function'은 함수가 아닙니다"
 
-#: src/main/objects.c:201
+#: src/main/objects.c:193
 msgid "bad generic call environment"
 msgstr "제네릭 호출 인바이런먼트가 잘못되었습니다"
 
-#: src/main/objects.c:207
+#: src/main/objects.c:201
 msgid "bad generic definition environment"
 msgstr "제네릭 정의 인바이런먼트가 잘못되었습니다"
 
-#: src/main/objects.c:246
-msgid ""
-"no '.S3MethodsClass' table, cannot use S4 objects with S3 methods ('methods' "
-"package not attached?)"
-msgstr ""
-"'.S3MethodsClass' 테이블이 없어 S4 객체들을 S3 메소드들과 함께 사용할 수 없습"
-"니다 ('methods' 패키지가 연결되었나요?)"
-
-#: src/main/objects.c:270 src/main/objects.c:411
-msgid "'UseMethod' used in an inappropriate fashion"
-msgstr "올바르지 않은 방법으로 사용된 'UseMethod'입니다"
-
-#: src/main/objects.c:290
-msgid "invalid generic function in 'usemethod'"
-msgstr "'usemethod'에 유효하지 않은 제네릭 함수가 있습니다"
+#: src/main/objects.c:249
+msgid "no '.S3MethodsClass' table, cannot use S4 objects with S3 methods ('methods' package not attached?)"
+msgstr "'.S3MethodsClass' 테이블이 없어 S4 객체들을 S3 메소드들과 함께 사용할 수 없습니다 ('methods' 패키지가 연결되었나요?)"
 
-#: src/main/objects.c:399
+#: src/main/objects.c:415
 msgid "there must be a 'generic' argument"
 msgstr "반드시 'generic' 인자이어야 합니다"
 
-#: src/main/objects.c:403
+#: src/main/objects.c:419
 msgid "'generic' argument must be a character string"
 msgstr "'generic' 인자는 반드시 문자열이어야 합니다"
 
-#: src/main/objects.c:440
-msgid "'UseMethod' called from outside a function"
-msgstr "함수 외부로부터 호출된 'UseMethod'입니다"
-
-#: src/main/objects.c:447
-msgid "first argument must be a generic name"
-msgstr "첫번째 인자는 반드시 제네릭명이어야 합니다"
+#: src/main/objects.c:427
+msgid "'UseMethod' used in an inappropriate fashion"
+msgstr "올바르지 않은 방법으로 사용된 'UseMethod'입니다"
 
 #: src/main/objects.c:472
 #, c-format
 msgid "no applicable method for '%s' applied to an object of class \"%s\""
-msgstr ""
-"클래스 \"%2$s\"의 객체에 적용된 '%1$s'에 사용할수 있는 메소드가 없습니다"
+msgstr "클래스 \"%2$s\"의 객체에 적용된 '%1$s'에 사용할수 있는 메소드가 없습니다"
 
-#: src/main/objects.c:533
+#: src/main/objects.c:582
 msgid "'NextMethod' called from outside a function"
 msgstr "함수 외부로부터 호출된 'NextMethod'입니다"
 
-#: src/main/objects.c:539
+#: src/main/objects.c:588
 msgid "'NextMethod' called from an anonymous function"
 msgstr "익명의 함수외부로부터 호출된 'NextMethod'입니다"
 
-#: src/main/objects.c:563
+#: src/main/objects.c:609
 msgid "no calling generic was found: was a method called directly?"
 msgstr "호출된 제네릭을 찾을 수 없습니다:  메소드가 직접적으로 호출되었나요?"
 
-#: src/main/objects.c:566
+#: src/main/objects.c:612
 #, c-format
 msgid "'function' is not a function, but of type %d"
 msgstr "'function'은 함수가 아니라, 타입 %d입니다"
 
-#: src/main/objects.c:640
+#: src/main/objects.c:639
 msgid "wrong argument ..."
 msgstr "잘못된 인자 ..."
 
-#: src/main/objects.c:653
+#: src/main/objects.c:651
 msgid "object not specified"
 msgstr "지정된 객체가 없습니다"
 
-#: src/main/objects.c:663 src/main/objects.c:670
+#: src/main/objects.c:659 src/main/objects.c:666
 msgid "generic function not specified"
 msgstr "지정된 제네릭 함수가 없습니다"
 
-#: src/main/objects.c:667
+#: src/main/objects.c:663
 msgid "invalid generic argument to 'NextMethod'"
 msgstr "'NextMethod'에 유효하지 않은 인자가 있습니다"
 
-#: src/main/objects.c:680
+#: src/main/objects.c:675
 msgid "invalid 'group' argument found in 'NextMethod'"
 msgstr "'NextMethod'에서 유효하지 않은 'group' 인자가 발견되었습니다"
 
-#: src/main/objects.c:699
+#: src/main/objects.c:692
 msgid "wrong value for .Method"
 msgstr ".Method의 값이 잘못되었습니다"
 
-#: src/main/objects.c:703 src/main/objects.c:712
-#, c-format
-msgid "method name too long in '%s'"
-msgstr "'%s'에 있는 메소드명이 너무 깁니다"
-
-#: src/main/objects.c:715
+#: src/main/objects.c:702
 msgid "Incompatible methods ignored"
 msgstr ""
 
-#: src/main/objects.c:775 src/main/objects.c:780
+#: src/main/objects.c:759 src/main/objects.c:766
 msgid "no method to invoke"
 msgstr "실행할 수 있는 메소드가 없습니다"
 
-#: src/main/objects.c:832
+#: src/main/objects.c:817
 msgid "cannot unclass an environment"
 msgstr "인바이런먼트의 클래스 속성을 해제할 수 없습니다"
 
-#: src/main/objects.c:835
+#: src/main/objects.c:820
 msgid "cannot unclass an external pointer"
 msgstr "외부포인터의 클래스 속성을 해제할 수 없습니다"
 
-#: src/main/objects.c:872
+#: src/main/objects.c:856
 msgid "'what' must be a character vector"
 msgstr "'what'은 반드시 문자형 벡터이어야 합니다"
 
-#: src/main/objects.c:876
+#: src/main/objects.c:860
 msgid "'which' must be a length 1 logical vector"
 msgstr "'which'는 반드시 길이가 1인 논리형 벡터이어야 합니다"
 
-#: src/main/objects.c:882
+#: src/main/objects.c:866
 msgid "use 'is()' instead of 'inherits()' on S4 objects"
 msgstr "S4 객체들에 대해서는 'inherits()' 보다는 'is()'를 사용해주세요"
 
-#: src/main/objects.c:1012
+#: src/main/objects.c:995
 msgid "could not find correct environment; please report!"
 msgstr "올바른 인바이런먼트를 찾을 수 없으므로 꼭 보고해주세요!"
 
-#: src/main/objects.c:1052
+#: src/main/objects.c:1039
 msgid "'onOff' must be TRUE or FALSE"
 msgstr "'onOff'는 반드시 TRUE 또는 FALSE이어야 합니다"
 
-#: src/main/objects.c:1119
+#: src/main/objects.c:1104
 #, c-format
 msgid "unable to find a non-generic version of function \"%s\""
 msgstr "제네릭 버전이 아닌 함수 \"%s\"를 찾을 수 없습니다"
 
-#: src/main/objects.c:1151
-msgid ""
-"'standardGeneric' called without 'methods' dispatch enabled (will be ignored)"
-msgstr ""
-"'methods' 디스패치 없이 호출된 'standardGeneric'이 사용중이므로 무시될 것입니"
-"다"
+#: src/main/objects.c:1136
+msgid "'standardGeneric' called without 'methods' dispatch enabled (will be ignored)"
+msgstr "'methods' 디스패치 없이 호출된 'standardGeneric'이 사용중이므로 무시될 것입니다"
 
-#: src/main/objects.c:1160
+#: src/main/objects.c:1145
 msgid "argument to 'standardGeneric' must be a non-empty character string"
-msgstr ""
-"'standardGeneric'에 전달되는 인자는 반드시 비어있지 않은 문자열이어야 합니다"
+msgstr "'standardGeneric'에 전달되는 인자는 반드시 비어있지 않은 문자열이어야 합니다"
 
-#: src/main/objects.c:1165
+#: src/main/objects.c:1150
 #, c-format
-msgid ""
-"call to standardGeneric(\"%s\") apparently not from the body of that generic "
-"function"
-msgstr ""
-"제네릭 함수의 본체로부터 이루어지지 않은 standardGeneric(\"%s\")에 대한 호출"
-"입니다"
+msgid "call to standardGeneric(\"%s\") apparently not from the body of that generic function"
+msgstr "제네릭 함수의 본체로부터 이루어지지 않은 standardGeneric(\"%s\")에 대한 호출입니다"
 
-#: src/main/objects.c:1189
-msgid "argument 'code' must be a character string"
-msgstr "인자 'code'는 반드시 문자형이어야 합니다"
-
-#: src/main/objects.c:1257
+#: src/main/objects.c:1249
 #, c-format
-msgid ""
-"invalid primitive methods code (\"%s\"): should be \"clear\", \"reset\", "
-"\"set\", or \"suppress\""
-msgstr ""
-"유효하지 않은 프리미티브 메소드 코드 (\"%s\")입니다: \"clear\", \"reset\", "
-"\"set\", 또는 \"suppress\" 이어야 합니다"
+msgid "invalid primitive methods code (\"%s\"): should be \"clear\", \"reset\", \"set\", or \"suppress\""
+msgstr "유효하지 않은 프리미티브 메소드 코드 (\"%s\")입니다: \"clear\", \"reset\", \"set\", 또는 \"suppress\" 이어야 합니다"
 
-#: src/main/objects.c:1265
+#: src/main/objects.c:1257
 msgid "invalid object: must be a primitive function"
 msgstr "유효하지 않은 객체입니다: 반드시 프리미티브 함수이어야 합니다"
 
-#: src/main/objects.c:1312
+#: src/main/objects.c:1304
 #, c-format
-msgid ""
-"the formal definition of a primitive generic must be a function object (got "
-"type '%s')"
-msgstr ""
-"프리미티브 제네릭의 formal definition은 반드시 타입 '%s'을 가지는 함수객체이"
-"어야 합니다"
+msgid "the formal definition of a primitive generic must be a function object (got type '%s')"
+msgstr "프리미티브 제네릭의 formal definition은 반드시 타입 '%s'을 가지는 함수객체이어야 합니다"
 
-#: src/main/objects.c:1342
+#: src/main/objects.c:1334
 #, c-format
 msgid "object returned as generic function \"%s\" does not appear to be one"
 msgstr "제네릭 함수 \"%s\"로부터 반환된 객체가 하나가 아닌 것 같습니다"
 
-#: src/main/objects.c:1444
+#: src/main/objects.c:1439
 msgid "invalid primitive operation given for dispatch"
 msgstr "디스패치에 주어진 유효한 프리미티브 오퍼레이션이 아닙니다"
 
-#: src/main/objects.c:1470 src/main/objects.c:1489
+#: src/main/objects.c:1468 src/main/objects.c:1487
 msgid "dispatch error"
 msgstr "디스패치 에러"
 
-#: src/main/objects.c:1483
+#: src/main/objects.c:1481
 #, c-format
-msgid ""
-"primitive function \"%s\" has been set for methods but no generic function "
-"supplied"
+msgid "primitive function \"%s\" has been set for methods but no generic function supplied"
 msgstr ""
 
-#: src/main/objects.c:1508
+#: src/main/objects.c:1506
 msgid "C level MAKE_CLASS macro called with NULL string pointer"
 msgstr "C 레벨 MAKE_CLASS 매크로가 NULL 문자열 포인터와 함께 호출되었습니다"
 
-#: src/main/objects.c:1524
+#: src/main/objects.c:1522
+msgid "'methods' package not yet loaded"
+msgstr "아직 로드되지 않은 'methods' 패키지입니다."
+
+#: src/main/objects.c:1532
 msgid "R_getClassDef(.) called with NULL string pointer"
 msgstr "R_getClassDef(.)가 NULL 문자열 포인터와 함께 호출되었습니다"
 
-#: src/main/objects.c:1546
+#: src/main/objects.c:1577
 msgid "C level NEW macro called with null class definition pointer"
 msgstr "C 레벨 NEW 매크로가 null 클래스 데피니션 포인터와 함께 호출되었습니다"
 
-#: src/main/objects.c:1550
+#: src/main/objects.c:1581
 #, c-format
 msgid "trying to generate an object from a virtual class (\"%s\")"
 msgstr "가상의 클래스 \"%s\"로부터 객체를 생성하려고 시도합니다"
 
-#: src/main/objects.c:1627
+#: src/main/objects.c:1663
 #, c-format
 msgid "object of class \"%s\" does not correspond to a valid S3 object"
 msgstr "클래스 \"%s\"의 객체는 유효한 S3 객체가 아닙니다"
 
-#: src/main/options.c:120 src/main/options.c:180
+#: src/main/options.c:121 src/main/options.c:182
 msgid "corrupted options list"
 msgstr ""
 
-#: src/main/options.c:130
+#: src/main/options.c:131
 msgid "invalid printing width, used 80"
 msgstr "유효하지 않은 프린팅 너비이므로 80이 사용되었습니다"
 
-#: src/main/options.c:141
+#: src/main/options.c:142
 msgid "invalid printing digits, used 7"
 msgstr "유효하지 않은 프린팅 자릿수이므로 7이 사용되었습니다"
 
-#: src/main/options.c:153
+#: src/main/options.c:154
 msgid "invalid 'deparse.cutoff', used 60"
 msgstr "유효하지 않은 'deparse.cutoff'이므로 60이 사용되었습니다"
 
-#: src/main/options.c:165
+#: src/main/options.c:166
 msgid "invalid value for \"device.ask.default\", using FALSE"
 msgstr "\"device.ask.default\"에 대한 값이 유효하지 않아 FALSE를 사용합니다"
 
-#: src/main/options.c:401
+#: src/main/options.c:416
 msgid "list argument has no valid names"
 msgstr ""
 
-#: src/main/options.c:429
+#: src/main/options.c:445
 #, c-format
 msgid "invalid 'width' parameter, allowed %d...%d"
 msgstr "유효하지 않은 'width' 파라미터입니다.  오로지 %d...%d만을 허용합니다"
 
-#: src/main/options.c:440
+#: src/main/options.c:456
 #, c-format
 msgid "invalid 'digits' parameter, allowed %d...%d"
 msgstr "유효하지 않은 'digits' 파라미터입니다. %d...%d만을 허용합니다"
 
-#: src/main/options.c:447
+#: src/main/options.c:463
 #, c-format
 msgid "'expressions' parameter invalid, allowed %d...%d"
 msgstr "유효하지 않은 'expression' 파라미터입니다.  %d...%d만을 허용합니다"
 
-#: src/main/options.c:454 src/main/options.c:462 src/main/options.c:468
-#: src/main/options.c:476 src/main/options.c:483 src/main/options.c:488
-#: src/main/options.c:495 src/main/options.c:501 src/main/options.c:507
-#: src/main/options.c:512 src/main/options.c:517 src/main/options.c:526
-#: src/main/options.c:532 src/main/options.c:538 src/main/options.c:549
-#: src/main/options.c:556 src/main/options.c:562 src/main/options.c:570
-#: src/main/options.c:577 src/main/options.c:584 src/main/options.c:591
-#: src/main/options.c:598 src/main/options.c:606 src/main/options.c:615
-#: src/main/options.c:618 src/main/options.c:624
+#: src/main/options.c:470 src/main/options.c:478 src/main/options.c:484
+#: src/main/options.c:492 src/main/options.c:499 src/main/options.c:504
+#: src/main/options.c:511 src/main/options.c:517 src/main/options.c:523
+#: src/main/options.c:528 src/main/options.c:533 src/main/options.c:542
+#: src/main/options.c:548 src/main/options.c:554 src/main/options.c:564
+#: src/main/options.c:578 src/main/options.c:584 src/main/options.c:592
+#: src/main/options.c:599 src/main/options.c:606 src/main/options.c:613
+#: src/main/options.c:620 src/main/options.c:628 src/main/options.c:637
+#: src/main/options.c:640 src/main/options.c:646
 #, c-format
 msgid "invalid value for '%s'"
 msgstr "'%s'의 값이 유효하지 않습니다"
 
-#: src/main/options.c:611 src/main/options.c:640
+#: src/main/options.c:569
+msgid "'OutDec' must be a string of one character"
+msgstr ""
+
+#: src/main/options.c:633 src/main/options.c:662
 msgid "\"par.ask.default\" has been replaced by \"device.ask.default\""
 msgstr "\"par.ask.default\"은 \"device.ask.default\"로 변경되었습니다"
 
@@ -4583,15 +4530,19 @@ msgstr "결과가 아마도 2^31-1 바이트를 초과할 것입니다"
 msgid "non-string argument to Internal paste"
 msgstr "문자가 아닌 인자가 내부 paste에 전달되었습니다"
 
-#: src/main/paste.c:390
+#: src/main/paste.c:387
 msgid "first argument must be atomic"
 msgstr "첫번째 인자는 반드시 atomic이어야 합니다"
 
-#: src/main/paste.c:560
+#: src/main/paste.c:448
+msgid "'decimal.mark' must be a string of one character"
+msgstr ""
+
+#: src/main/paste.c:579
 msgid "Impossible mode ( x )"
 msgstr ""
 
-#: src/main/paste.c:645
+#: src/main/paste.c:663
 msgid "atomic vector arguments only"
 msgstr ""
 
@@ -4599,216 +4550,192 @@ msgstr ""
 msgid "invalid filename specification"
 msgstr "유효한 파일명 지정이 아닙니다"
 
-#: src/main/platform.c:375 src/main/platform.c:419
+#: src/main/platform.c:375 src/main/platform.c:420
 msgid "write error during file append"
 msgstr ""
 
-#: src/main/platform.c:394
+#: src/main/platform.c:395
 msgid "nothing to append to"
 msgstr "다음에 추가할 것이 아무것도 없습니다"
 
-#: src/main/platform.c:448 src/main/platform.c:795
+#: src/main/platform.c:449 src/main/platform.c:797 src/main/platform.c:979
 msgid "invalid filename argument"
 msgstr "파일명 인자가 유효하지 않습니다"
 
-#: src/main/platform.c:460
+#: src/main/platform.c:461
 #, c-format
 msgid "cannot create file '%s', reason '%s'"
 msgstr "파일 '%s'을 생성할 수 없습니다, 그 이유는 '%s'입니다"
 
-#: src/main/platform.c:475 src/main/platform.c:545 src/main/platform.c:627
+#: src/main/platform.c:476 src/main/platform.c:546 src/main/platform.c:629
 msgid "invalid first filename"
 msgstr "유효하지 않은 첫번째 파일명입니다"
 
-#: src/main/platform.c:487
+#: src/main/platform.c:488
 #, c-format
 msgid "cannot remove file '%s', reason '%s'"
 msgstr "파일 '%s'을 지울 수 없습니다, 그 이유는 '%s'입니다"
 
-#: src/main/platform.c:547 src/main/platform.c:629
+#: src/main/platform.c:548 src/main/platform.c:631
 msgid "invalid second filename"
 msgstr "유효하지 않은 두번째 파일명입니다"
 
-#: src/main/platform.c:549 src/main/platform.c:631
+#: src/main/platform.c:551 src/main/platform.c:634
 msgid "nothing to link"
 msgstr "연결할 것이 없습니다"
 
-#: src/main/platform.c:559
+#: src/main/platform.c:561
 msgid "symbolic links are not supported on this version of Windows"
 msgstr "이 버전의 윈도우즈에서는 심볼릭 링크를 지원하지 않습니다"
 
-#: src/main/platform.c:581
+#: src/main/platform.c:583
 #, c-format
 msgid "cannot symlink '%ls' to '%ls', reason '%s'"
-msgstr ""
-"'%1$ls'에 대한 심볼릭링크 '%2$ls'를 만들 수 없습니다. 그 이유는 '%3$s' 때문입"
-"니다"
+msgstr "'%1$ls'에 대한 심볼릭링크 '%2$ls'를 만들 수 없습니다. 그 이유는 '%3$s' 때문입니다"
 
-#: src/main/platform.c:601
+#: src/main/platform.c:603
 #, c-format
 msgid "cannot symlink '%s' to '%s', reason '%s'"
-msgstr ""
-"'%1$s'에 대한 심볼릭링크 '%2$s'를 만들 수 없습니다. 그 이유는 '%3$s' 때문입니"
-"다"
+msgstr "'%1$s'에 대한 심볼릭링크 '%2$s'를 만들 수 없습니다. 그 이유는 '%3$s' 때문입니다"
 
-#: src/main/platform.c:609
+#: src/main/platform.c:611
 msgid "symbolic links are not supported on this platform"
 msgstr "이 플랫폼에서 심볼릭링크가 지원되지 않습니다"
 
-#: src/main/platform.c:649
+#: src/main/platform.c:652
 #, c-format
 msgid "cannot link '%ls' to '%ls', reason '%s'"
 msgstr "'%1$ls'를 '%2$ls'에 연결할 수 없습니다.  그 이유는 '%3$s' 때문입니다"
 
-#: src/main/platform.c:669
+#: src/main/platform.c:672
 #, c-format
 msgid "cannot link '%s' to '%s', reason '%s'"
 msgstr "'%1$s'를 '%2$s'에 연결할 수 없습니다.  그 이유는 '%3$s' 때문입니다"
 
-#: src/main/platform.c:678
+#: src/main/platform.c:681
 msgid "(hard) links are not supported on this platform"
 msgstr "이 플랫폼에서는 (하드) 링크가 지원되지 않습니다"
 
-#: src/main/platform.c:709
+#: src/main/platform.c:713
 msgid "'from' and 'to' are of different lengths"
 msgstr "'from'과 'to'의 길이가 다릅니다"
 
-#: src/main/platform.c:720 src/main/platform.c:730
+#: src/main/platform.c:724 src/main/platform.c:734
 msgid "expanded 'from' name too long"
 msgstr "전개된 'from'의 이름이 너무 깁니다"
 
-#: src/main/platform.c:724 src/main/platform.c:734
+#: src/main/platform.c:728 src/main/platform.c:738
 msgid "expanded 'to' name too long"
 msgstr "전개된 'to'의 이름이 너무 깁니다"
 
-#: src/main/platform.c:738
+#: src/main/platform.c:742
 #, c-format
 msgid "cannot rename file '%s' to '%s', reason '%s'"
-msgstr ""
-"파일명을 '%1$s'에서 '%2$s'로 바꿀 수 없습니다.  그 이유는 '%3$s' 때문입니다"
+msgstr "파일명을 '%1$s'에서 '%2$s'로 바꿀 수 없습니다.  그 이유는 '%3$s' 때문입니다"
 
-#: src/main/platform.c:1094
+#: src/main/platform.c:1168
 msgid "invalid 'pattern' regular expression"
 msgstr "유효하지 않은 정규표현식 'pattern'입니다"
 
-#: src/main/platform.c:1211
+#: src/main/platform.c:1285
 msgid "unable to determine R home location"
 msgstr "R HOME의 위치를 확인할 수 없습니다"
 
-#: src/main/platform.c:1263
+#: src/main/platform.c:1338
 msgid "file name too long"
 msgstr "파일명이 너무 깁니다"
 
-#: src/main/platform.c:1511 src/main/platform.c:1558 src/main/sysutils.c:1850
-#: src/main/sysutils.c:1864
+#: src/main/platform.c:1586 src/main/platform.c:1633 src/main/sysutils.c:1806
+#: src/main/sysutils.c:1820
 msgid "internal out-of-memory condition"
 msgstr "내부 메모리 부족 상태입니다"
 
-#: src/main/platform.c:1554 src/main/sysutils.c:1860
+#: src/main/platform.c:1629 src/main/sysutils.c:1816
 #, c-format
 msgid "read error on '%s'"
 msgstr "'%s'에서 읽기 오류가 발생했습니다"
 
-#: src/main/platform.c:1722
+#: src/main/platform.c:1728
 msgid "setting 'LC_NUMERIC' may cause R to function strangely"
 msgstr "'LC_NUMERIC'을 조정하는 것은 R이 이상하게 작동하게 할 수도 있습니다"
 
-#: src/main/platform.c:1736
+#: src/main/platform.c:1742
 msgid "LC_MESSAGES exists on Windows but is not operational"
 msgstr "LC_MESSAGES는 윈도우에 있지만, 이는 사용가능하지 않습니다"
 
-#: src/main/platform.c:1763
+#: src/main/platform.c:1769
 #, c-format
 msgid "OS reports request to set locale to \"%s\" cannot be honored"
-msgstr ""
-"OS는 로케일을 \"%s\"로 설정하기 위한 요청이 받아들일 수 없다고 보고합니다"
-
-#: src/main/platform.c:2065
-msgid "'hostname' must be a character vector of length 1"
-msgstr "'hostname'은 반드시 길이가 1인 문자형 벡터이어야 합니다"
-
-#: src/main/platform.c:2071
-#, c-format
-msgid "nsl() was unable to resolve host '%s'"
-msgstr ""
-
-#: src/main/platform.c:2078
-msgid "unknown format returned by C function 'gethostbyname'"
-msgstr ""
-"알수 없는 형식이 C로 작성된 함수 'gethostbyname'에 의하여 반환되었습니다"
-
-#: src/main/platform.c:2087
-msgid "nsl() is not supported on this platform"
-msgstr "이 플랫폼에서는 nsl()가 지원되지 않습니다"
+msgstr "OS는 로케일을 \"%s\"로 설정하기 위한 요청이 받아들일 수 없다고 보고합니다"
 
-#: src/main/platform.c:2158
+#: src/main/platform.c:2131
 #, c-format
 msgid "'%s' already exists"
 msgstr "'%s'는 이미 존재합니다"
 
-#: src/main/platform.c:2161
+#: src/main/platform.c:2134
 #, c-format
 msgid "cannot create dir '%s', reason '%s'"
 msgstr "디렉토리 '%s'를 만들 수 없습니다. 그 이유는 '%s'입니다"
 
-#: src/main/platform.c:2207
+#: src/main/platform.c:2181
 #, c-format
 msgid "'%ls' already exists"
 msgstr "'%ls'은 이미 존재합니다"
 
-#: src/main/platform.c:2211
+#: src/main/platform.c:2183 src/main/platform.c:2189
 #, c-format
 msgid "cannot create dir '%ls', reason '%s'"
 msgstr "디렉토리 '%ls'를 만들 수 없습니다. 그 이유는 '%s'입니다. "
 
-#: src/main/platform.c:2245 src/main/platform.c:2449
+#: src/main/platform.c:2223 src/main/platform.c:2435
 msgid "too deep nesting"
 msgstr ""
 
-#: src/main/platform.c:2253 src/main/platform.c:2266 src/main/platform.c:2284
+#: src/main/platform.c:2231 src/main/platform.c:2244 src/main/platform.c:2262
 msgid "over-long path"
 msgstr "패스의 길이가 너무 깁니다"
 
-#: src/main/platform.c:2273
+#: src/main/platform.c:2251
 #, c-format
 msgid "problem creating directory %ls: %s"
 msgstr "디렉토리 %ls를 생성하는데 문제가 발생했습니다: %s"
 
-#: src/main/platform.c:2293
+#: src/main/platform.c:2271
 #, c-format
 msgid "problem reading dir %ls: %s"
 msgstr "디렉토리 %ls를 읽는데 문제가 발생했습니다: %s"
 
-#: src/main/platform.c:2304 src/main/platform.c:2465 src/main/platform.c:2478
-#: src/main/platform.c:2498 src/main/platform.c:2520
+#: src/main/platform.c:2282 src/main/platform.c:2451 src/main/platform.c:2464
+#: src/main/platform.c:2484 src/main/platform.c:2506
 msgid "over-long path length"
 msgstr ""
 
-#: src/main/platform.c:2312
+#: src/main/platform.c:2290
 #, c-format
 msgid "problem copying %ls to %ls: %s"
 msgstr "%ls를 %ls로 복사하는데 문제가 발생했습니다: %s"
 
-#: src/main/platform.c:2487
+#: src/main/platform.c:2473
 #, c-format
 msgid "problem creating directory %s: %s"
 msgstr "디렉토리 %s를 생성하는데 문제가 발생했습니다: %s"
 
-#: src/main/platform.c:2507
+#: src/main/platform.c:2493
 #, c-format
 msgid "problem reading directory %s: %s"
 msgstr "디렉토리 %s를 읽는데 문제가 발생했습니다: %s"
 
-#: src/main/platform.c:2529
+#: src/main/platform.c:2515
 #, c-format
 msgid "problem copying %s to %s: %s"
 msgstr "%1$s를 %2$s로 복사하는데 문제가 발생했습니다: %3$s"
 
-#: src/main/platform.c:2662
+#: src/main/platform.c:2653
 msgid "'mode' must be of length at least one"
 msgstr "'mode'의 길이는 반드시 최소한 1이상이어야 합니다"
 
-#: src/main/platform.c:2729
+#: src/main/platform.c:2720
 msgid "insufficient OS support on this platform"
 msgstr "이 플랫폼에서는 OS지원이 충분하지 않습니다"
 
@@ -4829,91 +4756,94 @@ msgstr "모든 z 값들이 NA입니다"
 msgid "invalid math style encountered"
 msgstr "유효하지 않은 수학적 스타일을 접했습니다"
 
-#: src/main/plotmath.c:1261 src/main/plotmath.c:1366 src/main/plotmath.c:2664
+#: src/main/plotmath.c:1260 src/main/plotmath.c:1365 src/main/plotmath.c:2654
 msgid "invalid mathematical annotation"
 msgstr "수학적 주석이 잘못되었습니다"
 
-#: src/main/plotmath.c:1670
+#: src/main/plotmath.c:1669
 msgid "invalid accent"
 msgstr "엑센트가 잘못되었습니다"
 
-#: src/main/plotmath.c:1964
+#: src/main/plotmath.c:1963
 msgid "invalid group delimiter"
 msgstr "유효한 그룹 구분자가 아닙니다"
 
-#: src/main/plotmath.c:1991 src/main/plotmath.c:2137
+#: src/main/plotmath.c:1990 src/main/plotmath.c:2127
 msgid "invalid group specification"
 msgstr "유효한 그룹 지정이 아닙니다"
 
-#: src/main/plotmath.c:2062
+#: src/main/plotmath.c:2052
 msgid "group is incomplete"
 msgstr "불완전한 그룹입니다"
 
-#: src/main/plotmath.c:3190
+#: src/main/plotmath.c:3180
 msgid "Metric information not available for this family/device"
 msgstr "이 페밀리/장치에 대한 메트릭 정보가 이용가능하지 않습니다"
 
-#: src/main/print.c:148 src/main/print.c:254
+#: src/main/print.c:140 src/main/print.c:247
 msgid "invalid 'na.print' specification"
 msgstr "유효하지 않은 'na.print' 지정입니다"
 
-#: src/main/print.c:157
+#: src/main/print.c:149
 msgid "invalid row labels"
 msgstr "유효하지 않은 행 레이블입니다"
 
-#: src/main/print.c:159
+#: src/main/print.c:151
 msgid "invalid column labels"
 msgstr "유효하지 않은 열 레이블입니다"
 
-#: src/main/print.c:183
+#: src/main/print.c:176
 msgid "non-function argument to .Internal(print.function(.))"
 msgstr ".Internal(print.function(.))에 함수가 아닌 인자가 전달되었습니다"
 
-#: src/main/print.c:264
+#: src/main/print.c:257
 msgid "'gap' must be non-negative integer"
 msgstr "'gap'은 반드시 음이 아닌 정수이어야 합니다"
 
-#: src/main/print.c:289
+#: src/main/print.c:282
 msgid "invalid 'tryS4' internal argument"
 msgstr "유효한 'tryS4' 내부 인자가 아닙니다"
 
-#: src/main/print.c:1028
+#: src/main/print.c:851
+msgid "print buffer overflow"
+msgstr ""
+
+#: src/main/print.c:1043
 msgid "invalid character length in 'dblepr'"
 msgstr "'dblepr' 내에 문자의 길이가 올바르지 않습니다"
 
-#: src/main/print.c:1046
+#: src/main/print.c:1061
 msgid "invalid character length in 'intpr'"
 msgstr "'intpr' 내에 문자의 길이가 올바르지 않습니다"
 
-#: src/main/print.c:1065
+#: src/main/print.c:1080
 msgid "invalid character length in 'realpr'"
 msgstr "'realpr' 내에 문자의 길이가 올바르지 않습니다"
 
-#: src/main/print.c:1075
+#: src/main/print.c:1090
 msgid "memory allocation error in 'realpr'"
 msgstr "'realpr' 내에 메모리 할당 에러입니다"
 
-#: src/main/print.c:1091
+#: src/main/print.c:1106
 #, c-format
 msgid "BLAS/LAPACK routine '%6s' gave error code %d"
 msgstr "BLAS/LAPACK 루틴 '%6s'이 에러코드 %d를 주었습니다"
 
-#: src/main/printarray.c:453
+#: src/main/printarray.c:332
 msgid "too few row labels"
 msgstr "행 레이블의 수가 너무 적습니다"
 
-#: src/main/printarray.c:455
+#: src/main/printarray.c:334
 msgid "too few column labels"
 msgstr "열 레이블의 수가 너무 적습니다"
 
-#: src/main/printarray.c:489
+#: src/main/printarray.c:368
 #, c-format
 msgid " [ reached getOption(\"max.print\") -- omitted %d row ]\n"
 msgid_plural " [ reached getOption(\"max.print\") -- omitted %d rows ]\n"
-msgstr[0] ""
-" [ getOption(\"max.print\") 에 도달했습니다 -- %d 행들을 생략합니다 ]\n"
+msgstr[0] " [ getOption(\"max.print\") 에 도달했습니다 -- %d 행들을 생략합니다 ]\n"
 
-#: src/main/printutils.c:613
+#: src/main/printutils.c:710
 msgid "it is not known that wchar_t is Unicode on this platform"
 msgstr "이 플랫폼에서는 wchar_t가 유니코드인지 알 수 없습니다"
 
@@ -4921,46 +4851,44 @@ msgstr "이 플랫폼에서는 wchar_t가 유니코드인지 알 수 없습니
 msgid "argument is not a numeric vector"
 msgstr "인자가 수치형 벡터가 아닙니다"
 
-#: src/main/random.c:37
+#: src/main/random.c:39
 msgid "invalid arguments"
 msgstr "유효하지 않은 인자들입니다"
 
-#: src/main/random.c:93 src/main/random.c:110 src/main/random.c:175
-#: src/main/random.c:201 src/main/random.c:274 src/main/random.c:288
+#: src/main/random.c:95 src/main/random.c:112 src/main/random.c:178
+#: src/main/random.c:204 src/main/random.c:277 src/main/random.c:291
 msgid "NAs produced"
 msgstr "NA가 생성되었습니다"
 
-#: src/main/random.c:445
+#: src/main/random.c:438
 msgid "NA in probability vector"
 msgstr "확률벡터에 NA가 있습니다"
 
-#: src/main/random.c:447
-msgid "non-positive probability"
-msgstr "확률값이 양수가 아닙니다"
+#: src/main/random.c:440
+msgid "negative probability"
+msgstr "확률값이 음수입니다."
 
-#: src/main/random.c:454
+#: src/main/random.c:447
 msgid "too few positive probabilities"
 msgstr "양의 값을 가지는 확률들이 너무 적습니다"
 
-#: src/main/random.c:491 src/main/random.c:519
+#: src/main/random.c:483 src/main/random.c:511
 msgid "cannot take a sample larger than the population when 'replace = FALSE'"
 msgstr "'replace = FALSE' 일때는 모집단보다 큰 샘플을 가질 수 없습니다"
 
-#: src/main/random.c:498
+#: src/main/random.c:490
 msgid "incorrect number of probabilities"
 msgstr "확률값의 개수가 잘못되었습니다"
 
-#: src/main/random.c:537
+#: src/main/random.c:529
 msgid "n >= 2^31, replace = FALSE is only supported on 64-bit platforms"
-msgstr ""
-"n의 값이 2^31보다 크거나 같습니다. replace = FALSE 는 오로지 64 비트 플랫폼에"
-"서만 지원됩니다"
+msgstr "n의 값이 2^31보다 크거나 같습니다. replace = FALSE 는 오로지 64 비트 플랫폼에서만 지원됩니다"
 
-#: src/main/raw.c:37 src/main/raw.c:273
+#: src/main/raw.c:37 src/main/raw.c:277
 msgid "argument must be a character vector of length 1"
 msgstr "인자는 반드시 길이가 1인 문자형 벡터이어야 합니다"
 
-#: src/main/raw.c:39 src/main/raw.c:275
+#: src/main/raw.c:39 src/main/raw.c:279
 msgid ""
 "argument should be a character vector of length 1\n"
 "all but the first element will be ignored"
@@ -4968,291 +4896,282 @@ msgstr ""
 "인자는 반드시 길이가 1인 문자형 벡터이어야 합니다\n"
 "첫번째 구성요소를 제외한 나머지는 모두 무시될 것입니다"
 
-#: src/main/raw.c:53 src/main/raw.c:89 src/main/raw.c:110
+#: src/main/raw.c:53 src/main/raw.c:90 src/main/raw.c:113
 msgid "argument 'x' must be a raw vector"
 msgstr "인자 'x'는 반드시 raw 벡터이어야 합니다"
 
-#: src/main/raw.c:56 src/main/raw.c:330
+#: src/main/raw.c:56 src/main/raw.c:336
 msgid "argument 'multiple' must be TRUE or FALSE"
 msgstr "인자 'multiple'은 반드시 TRUE 또는 FALSE이어야 합니다"
 
-#: src/main/raw.c:91
+#: src/main/raw.c:92
 msgid "argument 'shift' must be a small integer"
 msgstr "인자 'shift'는 반드시 작은 값의 정수이어야 합니다"
 
-#: src/main/raw.c:129 src/main/raw.c:327
+#: src/main/raw.c:133 src/main/raw.c:333
 msgid "argument 'x' must be an integer vector"
 msgstr "인자 'x'는 반드시 정수형 벡터이어야 합니다"
 
-#: src/main/raw.c:148
+#: src/main/raw.c:153
 msgid "argument 'x' must be raw, integer or logical"
 msgstr "인자 'x'는 반드시 raw, 정수 또는 논리값이어야 합니다"
 
-#: src/main/raw.c:150
-msgid "argument 'type' must be a character string"
-msgstr "인자 'type'은 반드시 문자열이어야 합니다"
-
-#: src/main/raw.c:154
+#: src/main/raw.c:159
 #, c-format
 msgid "argument 'x' must be a multiple of %d long"
 msgstr "인자 'x'는 반드시 %d의 배수이어야 합니다"
 
-#: src/main/raw.c:167 src/main/raw.c:181
+#: src/main/raw.c:172 src/main/raw.c:186
 msgid "argument 'x' must not contain NAs"
 msgstr "인자 'x'는 반드시 NA를 포함해서는 안됩니다"
 
-#: src/main/raw.c:285
+#: src/main/raw.c:291
 msgid "invalid UTF-8 string"
 msgstr "잘못된 UTF-8 문자열입니다"
 
-#: src/main/relop.c:202
+#: src/main/relop.c:196
 #, c-format
 msgid "comparison (%d) is possible only for atomic and list types"
 msgstr "atomic과 리스트 타입들에 대해서만 비교(%d)가 가능합니다"
 
-#: src/main/relop.c:207
+#: src/main/relop.c:201
 msgid "comparison is not allowed for expressions"
 msgstr "표현식에 대해서는 비교가 가능하지 않습니다"
 
-#: src/main/relop.c:296
+#: src/main/relop.c:293
 msgid "comparison of these types is not implemented"
 msgstr "이러한 유형들에 대한 비교는 구현되지 않았습니다"
 
-#: src/main/relop.c:509
+#: src/main/relop.c:425
 msgid "invalid comparison with complex values"
 msgstr "복소수들에 대한 비교는 유효하지 않습니다"
 
-#: src/main/relop.c:767
+#: src/main/relop.c:683
 msgid "'a' and 'b' must have the same type"
 msgstr "'a'와 'b'는 반드시 같은 유형이어야 합니다"
 
-#: src/main/saveload.c:200 src/main/saveload.c:205 src/main/saveload.c:214
-#: src/main/saveload.c:223 src/main/saveload.c:232 src/main/saveload.c:241
-#: src/main/saveload.c:245 src/main/saveload.c:254 src/main/saveload.c:1381
-#: src/main/saveload.c:1386 src/main/saveload.c:1430 src/main/saveload.c:1498
-#: src/main/saveload.c:1507 src/main/serialize.c:331 src/main/serialize.c:338
-#: src/main/serialize.c:2388 src/main/serialize.c:2396
+#: src/main/saveload.c:202 src/main/saveload.c:207 src/main/saveload.c:216
+#: src/main/saveload.c:225 src/main/saveload.c:234 src/main/saveload.c:243
+#: src/main/saveload.c:247 src/main/saveload.c:256 src/main/saveload.c:1383
+#: src/main/saveload.c:1388 src/main/saveload.c:1432 src/main/saveload.c:1500
+#: src/main/saveload.c:1509 src/main/serialize.c:354 src/main/serialize.c:361
+#: src/main/serialize.c:374 src/main/serialize.c:378 src/main/serialize.c:405
+#: src/main/serialize.c:421 src/main/serialize.c:2429
+#: src/main/serialize.c:2437
 msgid "read error"
 msgstr "읽기 오류입니다"
 
-#: src/main/saveload.c:332
+#: src/main/saveload.c:334
 msgid "a I read error occurred"
 msgstr "정수값 I를 읽는데 에러가 발생했습니다"
 
-#: src/main/saveload.c:342
+#: src/main/saveload.c:344
 msgid "a R read error occurred"
 msgstr "실수값 R을 읽는데 에러가 발생했습니다"
 
-#: src/main/saveload.c:352
+#: src/main/saveload.c:354
 msgid "a C read error occurred"
 msgstr "문자 C를 읽는데 에러가 발생했습니다"
 
-#: src/main/saveload.c:362
+#: src/main/saveload.c:364
 msgid "a S read error occurred"
 msgstr "문자열 S를 읽는데 에러가 발생했습니다"
 
-#: src/main/saveload.c:387 src/main/saveload.c:395 src/main/saveload.c:403
-#: src/main/saveload.c:1594 src/main/saveload.c:1602
+#: src/main/saveload.c:389 src/main/saveload.c:397 src/main/saveload.c:405
+#: src/main/saveload.c:1596 src/main/saveload.c:1604
 msgid "a read error occurred"
 msgstr "읽기 에러가 발생했습니다"
 
-#: src/main/saveload.c:467
+#: src/main/saveload.c:469
 msgid "unresolved node during restore"
 msgstr ""
 
-#: src/main/saveload.c:488
+#: src/main/saveload.c:490
 #, c-format
 msgid "restore compatibility error - no version %d compatibility"
 msgstr "복원 호환성 에러입니다 - 버전 %d와 호환되지 않습니다0"
 
-#: src/main/saveload.c:572 src/main/saveload.c:645
+#: src/main/saveload.c:574 src/main/saveload.c:647
 msgid "bad SEXP type in data file"
 msgstr "데이터파일에 잘못된 SEXP 유형이 있습니다"
 
-#: src/main/saveload.c:586
+#: src/main/saveload.c:588
 msgid "mismatch on types"
 msgstr "타입들이 일치하지 않습니다"
 
-#: src/main/saveload.c:607 src/main/saveload.c:1270 src/main/serialize.c:1636
+#: src/main/saveload.c:609 src/main/saveload.c:1272 src/main/serialize.c:1675
 #, c-format
 msgid "unrecognized internal function name \"%s\""
 msgstr "인식할 수 없는 인터널 함수명 \"%s\"입니다"
 
-#: src/main/saveload.c:709
+#: src/main/saveload.c:711
 msgid "cannot save file position while restoring data"
 msgstr "데이터를 복원중에는 파일의 위치를 저장할 수 없습니다"
 
-#: src/main/saveload.c:722
+#: src/main/saveload.c:724
 msgid "cannot restore file position while restoring data"
 msgstr "데이터를 복원하는 중에는 파일의 위치를 복원할 수 없습니다"
 
-#: src/main/saveload.c:915
+#: src/main/saveload.c:917
 msgid "base namespace is not preserved in version 1 workspaces"
 msgstr ""
 
-#: src/main/saveload.c:917
+#: src/main/saveload.c:919
 msgid "cannot save namespace in version 1 workspaces"
 msgstr "버전 1의 워크스페이스에 네임스페이스를 저장할 수 없습니다"
 
-#: src/main/saveload.c:919
-msgid ""
-"cannot save environment with locked/active bindings in version 1 workspaces"
-msgstr ""
-"버전 1의 워크스페이스에 잠겨있거나 활성중인 바인딩이 있는 인바이런먼트는 저장"
-"할 수 없습니다"
+#: src/main/saveload.c:921
+msgid "cannot save environment with locked/active bindings in version 1 workspaces"
+msgstr "버전 1의 워크스페이스에 잠겨있거나 활성중인 바인딩이 있는 인바이런먼트는 저장할 수 없습니다"
 
-#: src/main/saveload.c:943
+#: src/main/saveload.c:945
 msgid "cannot save weak references in version 1 workspaces"
 msgstr "버전 1 워크스페이스에서는 weak reference들을 저장할 수 없습니다"
 
-#: src/main/saveload.c:1021
+#: src/main/saveload.c:1023
 msgid "NewWriteVec called with non-vector type"
 msgstr "벡터가 아닌 타입과 함께 호출된 NewWriteVec 입니다"
 
-#: src/main/saveload.c:1084
+#: src/main/saveload.c:1086
 msgid "cannot save byte code objects in version 1 workspaces"
 msgstr "버전 1 워크스페이스에서는 바이트 코드 객체들을 저장할 수 없습니다"
 
-#: src/main/saveload.c:1086
+#: src/main/saveload.c:1088
 #, c-format
 msgid "NewWriteItem: unknown type %i"
 msgstr "NewWriteItem: %i는 알 수 없는 유형입니다"
 
-#: src/main/saveload.c:1216
+#: src/main/saveload.c:1218
 msgid "NewReadVec called with non-vector type"
 msgstr "벡터가 아닌 타입과 함께 호출된 NewReadVec입니다"
 
-#: src/main/saveload.c:1286
+#: src/main/saveload.c:1288
 msgid "cannot read byte code objects from version 1 workspaces"
 msgstr "버전 1 워크스페이스로부터 바이트코드 객체들을 읽을 수 없습니다"
 
-#: src/main/saveload.c:1288
+#: src/main/saveload.c:1290
 #, c-format
 msgid "NewReadItem: unknown type %i"
 msgstr "NewReadItem: %i는 알 수 없는 유형입니다"
 
-#: src/main/saveload.c:1440
+#: src/main/saveload.c:1442
 msgid "out of memory reading ascii string"
 msgstr "ascii 문자열을 읽는데 메모리가 부족합니다"
 
-#: src/main/saveload.c:1565
+#: src/main/saveload.c:1567
 msgid "a binary read error occurred"
 msgstr "바이너리 읽기 에러가 발생했습니다"
 
-#: src/main/saveload.c:1580 src/main/saveload.c:1681
+#: src/main/saveload.c:1582 src/main/saveload.c:1683
 msgid "out of memory reading binary string"
 msgstr "바이너리 문자열을 읽는데 메모리가 부족합니다"
 
-#: src/main/saveload.c:1585
+#: src/main/saveload.c:1587
 msgid "a binary string read error occurred"
 msgstr "바이너리 문자열 읽기 에러가 발생했습니다"
 
-#: src/main/saveload.c:1645
+#: src/main/saveload.c:1647
 msgid "an xdr integer data write error occurred"
 msgstr "xdr 정수 데이터 쓰기 에러가 발생했습니다"
 
-#: src/main/saveload.c:1652
+#: src/main/saveload.c:1654
 msgid "an xdr integer data read error occurred"
 msgstr "xdr 정수 데이터 읽기 에러가 발생했습니다"
 
-#: src/main/saveload.c:1667 src/main/saveload.c:1686
+#: src/main/saveload.c:1669 src/main/saveload.c:1688
 msgid "an xdr string data write error occurred"
 msgstr "xdr 문자열 데이터 쓰기 에러가 발생했습니다"
 
-#: src/main/saveload.c:1694
+#: src/main/saveload.c:1696
 msgid "an xdr real data write error occurred"
 msgstr "xdr 실수형 데이터 쓰기 에러가 발생했습니다"
 
-#: src/main/saveload.c:1701
+#: src/main/saveload.c:1703
 msgid "an xdr real data read error occurred"
 msgstr "xdr 실수형 데이터 읽기 에러가 발생했습니다"
 
-#: src/main/saveload.c:1708
+#: src/main/saveload.c:1710
 msgid "an xdr complex data write error occurred"
 msgstr "xdr 복소수형 데이터 쓰기 에러가 발생했습니다"
 
-#: src/main/saveload.c:1715
+#: src/main/saveload.c:1717
 msgid "an xdr complex data read error occurred"
 msgstr "xdr 복소수형 데이터 읽기 에러가 발생했습니다"
 
-#: src/main/saveload.c:1783 src/main/serialize.c:1958
-#: src/main/serialize.c:2568 src/modules/internet/internet.c:351
-#: src/modules/internet/internet.c:409 src/modules/internet/internet.c:514
+#: src/main/saveload.c:1785 src/main/serialize.c:1997
+#: src/main/serialize.c:2614 src/modules/internet/internet.c:514
+#: src/modules/internet/internet.c:590 src/modules/internet/internet.c:701
 msgid "write failed"
 msgstr "쓰기에 실패했습니다"
 
-#: src/main/saveload.c:1910
+#: src/main/saveload.c:1912
 msgid "restore file may be empty -- no data loaded"
 msgstr "복원하려는 파일이 비어있는 것 같습니다 -- 로드된 데이터가 없습니다"
 
-#: src/main/saveload.c:1912
+#: src/main/saveload.c:1914
 msgid "restore file may be from a newer version of R -- no data loaded"
-msgstr ""
-"복원하려는 파일이 더 최신버전의 R에서 생성되었을 수 있습니다 -- 로드된 데이터"
-"가 없습니다"
+msgstr "복원하려는 파일이 더 최신버전의 R에서 생성되었을 수 있습니다 -- 로드된 데이터가 없습니다"
 
-#: src/main/saveload.c:1914
+#: src/main/saveload.c:1916
 msgid "bad restore file magic number (file may be corrupted) -- no data loaded"
-msgstr ""
-"잘못된 파일 복원 매직넘버입니다 (파일이 아마도 손상된듯 합니다) -- 로드할 데"
-"이터가 없습니다"
+msgstr "잘못된 파일 복원 매직넘버입니다 (파일이 아마도 손상된듯 합니다) -- 로드할 데이터가 없습니다"
 
-#: src/main/saveload.c:1940 src/main/saveload.c:2238
+#: src/main/saveload.c:1942 src/main/saveload.c:2240
 msgid "first argument must be a character vector"
 msgstr "첫번째 인자는 반드시 문자형 벡터이어야 합니다"
 
-#: src/main/saveload.c:2012
+#: src/main/saveload.c:2014
 msgid "not a valid named list"
 msgstr ""
 
-#: src/main/saveload.c:2019 src/main/saveload.c:2040
+#: src/main/saveload.c:2021 src/main/saveload.c:2042
 #, c-format
 msgid "'%s' looks like a pre-2.4.0 S4 object: please recreate it"
 msgstr "'%s'는 마치 2.4.0 이전의 S4 객체로 보이므로, 이를 다시 생성해 주세요"
 
-#: src/main/saveload.c:2027
+#: src/main/saveload.c:2029
 msgid "loaded data is not in pair list form"
 msgstr ""
 
-#: src/main/saveload.c:2063
+#: src/main/saveload.c:2065
 msgid "first argument must be a file name"
 msgstr "첫번째 인자는 반드시 파일이름이어야 합니다"
 
-#: src/main/saveload.c:2108 src/main/saveload.c:2134 src/main/serialize.c:826
-#: src/main/serialize.c:863 src/main/serialize.c:901
+#: src/main/saveload.c:2110 src/main/saveload.c:2136 src/main/serialize.c:864
+#: src/main/serialize.c:901 src/main/serialize.c:939
 msgid "XDR write failed"
 msgstr "XDR 쓰기에 실패했습니다"
 
-#: src/main/saveload.c:2121 src/main/saveload.c:2146 src/main/serialize.c:1362
-#: src/main/serialize.c:1398 src/main/serialize.c:1436
+#: src/main/saveload.c:2123 src/main/saveload.c:2148 src/main/serialize.c:1400
+#: src/main/serialize.c:1436 src/main/serialize.c:1474
 msgid "XDR read failed"
 msgstr "XDR 읽기에 실패했습니다"
 
-#: src/main/saveload.c:2157
+#: src/main/saveload.c:2159
 #, c-format
 msgid "cannot save data -- unable to open '%s': %s"
 msgstr "데이터를 저장할 수 없습니다 -- '%1$s'를 열 수 없습니다: %2$s"
 
-#: src/main/saveload.c:2254 src/main/serialize.c:2161
+#: src/main/saveload.c:2256 src/main/serialize.c:2202
 #, c-format
 msgid "cannot save to connections in version %d format"
 msgstr ""
 
-#: src/main/saveload.c:2277 src/main/serialize.c:2186
+#: src/main/saveload.c:2279 src/main/serialize.c:2227
 msgid "connection not open for writing"
 msgstr "쓰기를 위해서 열린 커넥션이 아닙니다"
 
-#: src/main/saveload.c:2285
+#: src/main/saveload.c:2288
 msgid "cannot save XDR format to a text-mode connection"
 msgstr "텍스트 모드 커넥션에 XDR형식을 저장할 수 없습니다"
 
-#: src/main/saveload.c:2295 src/main/serialize.c:2066
-#: src/main/serialize.c:2080 src/main/serialize.c:2262
-#: src/main/serialize.c:2284
+#: src/main/saveload.c:2298 src/main/serialize.c:2105
+#: src/main/serialize.c:2119 src/main/serialize.c:2303
+#: src/main/serialize.c:2325
 msgid "error writing to connection"
 msgstr ""
 
-#: src/main/saveload.c:2359 src/main/serialize.c:2234
+#: src/main/saveload.c:2359 src/main/serialize.c:2275
 msgid "connection not open for reading"
 msgstr "읽기위해서 열린 커넥션이 아닙니다"
 
@@ -5265,11 +5184,8 @@ msgid "no input is available"
 msgstr "입력이 없습니다"
 
 #: src/main/saveload.c:2383
-msgid ""
-"the input does not start with a magic number compatible with loading from a "
-"connection"
-msgstr ""
-"입력은 커넥션으로부터 로딩되면서 호환이 되는 매직넘버로 시작하지 않습니다"
+msgid "the input does not start with a magic number compatible with loading from a connection"
+msgstr "입력은 커넥션으로부터 로딩되면서 호환이 되는 매직넘버로 시작하지 않습니다"
 
 #: src/main/scan.c:364 src/main/scan.c:414
 msgid "EOF within quoted string"
@@ -5280,7 +5196,7 @@ msgstr "따옴표로 묶인 문자열내에 EOF가 있습니다"
 msgid "scan() expected '%s', got '%s'"
 msgstr "scan()은 '%s'를 입력받아야 하는데, '%s'를 받았습니다"
 
-#: src/main/scan.c:585 src/main/scan.c:732
+#: src/main/scan.c:585 src/main/scan.c:735
 msgid "too many items"
 msgstr "항목들이 너무 많습니다"
 
@@ -5288,7 +5204,7 @@ msgstr "항목들이 너무 많습니다"
 msgid "empty 'what' specified"
 msgstr "비어있는 'what'이 지정되었습니다"
 
-#: src/main/scan.c:722
+#: src/main/scan.c:725
 #, c-format
 msgid "line %d did not have %d elements"
 msgstr "라인 %1$d는 %2$d개의 구성요소들을 가지고 있지 않습니다"
@@ -5317,263 +5233,254 @@ msgstr "유효하지 않은 소수점 구분자입니다"
 msgid "invalid quote symbol set"
 msgstr "유효하지 않은 인용부호 묶음 입니다"
 
-#: src/main/scan.c:987
+#: src/main/scan.c:988
 msgid "embedded nul(s) found in input"
 msgstr "입력에 nul(s)이 포함되어 있습니다"
 
-#: src/main/seq.c:48
+#: src/main/seq.c:49
 msgid "unequal factor lengths"
 msgstr ""
 
-#: src/main/seq.c:100
+#: src/main/seq.c:101
 msgid "result would be too long a vector"
 msgstr "결과적으로 너무 긴 벡터일 것입니다"
 
-#: src/main/seq.c:159
+#: src/main/seq.c:160
 msgid "argument of length 0"
-msgstr "길이가 0인 인자입니다"
+msgstr "인자의 길이가 0입니다."
 
-#: src/main/seq.c:161 src/main/seq.c:163
+#: src/main/seq.c:163 src/main/seq.c:168
 #, c-format
-msgid "numerical expression has %d elements: only the first used"
-msgstr ""
-"수치형 표현식은 %d개의 구성요소들을 가지고 있으나, 오로지 첫번째것만 사용됩니"
-"다"
+msgid "numerical expression has %d element: only the first used"
+msgid_plural "numerical expression has %d elements: only the first used"
+msgstr[0] "수치형 표현식(numerical expression)은 %d개의 구성요소들을 가지고 있기 때문에 오로지 첫번째 것만을 사용합니다."
 
-#: src/main/seq.c:167
+#: src/main/seq.c:174
 msgid "NA/NaN argument"
-msgstr "NA/NaN 인자입니다"
+msgstr "인자의 값이 NA/NaN 입니다."
 
-#: src/main/seq.c:331
+#: src/main/seq.c:333
 msgid "incorrect type for second argument"
 msgstr "두번째 인자에 대한 형식이 잘못되었습니다"
 
-#: src/main/seq.c:334
+#: src/main/seq.c:336
 #, c-format
 msgid "attempt to replicate an object of type '%s'"
 msgstr "객체의 타입 '%s'를 복제하려고 시도합니다"
 
-#: src/main/seq.c:387
+#: src/main/seq.c:393
 msgid "attempt to replicate non-vector"
 msgstr "벡터가 아닌 것을 복제하려고 시도합니다 "
 
-#: src/main/seq.c:403
+#: src/main/seq.c:409
 msgid "cannot replicate NULL to a non-zero length"
 msgstr "NULL을 길이가 0인 객체에 복제할 수 없습니다"
 
-#: src/main/seq.c:626 src/main/seq.c:633 src/main/seq.c:768 src/main/seq.c:979
+#: src/main/seq.c:630 src/main/seq.c:637 src/main/seq.c:766 src/main/seq.c:977
 #, c-format
 msgid "first element used of '%s' argument"
 msgstr ""
 
-#: src/main/seq.c:766
+#: src/main/seq.c:764
 msgid "'length.out' must be a non-negative number"
 msgstr "'length.out'은 반드시 음이 아닌 숫자이어야 합니다"
 
-#: src/main/seq.c:790 src/main/seq.c:856 src/main/seq.c:873
+#: src/main/seq.c:788 src/main/seq.c:854 src/main/seq.c:871
 msgid "'from' must be finite"
 msgstr "'from'은 반드시 유한값을 가지고 있어야 합니다"
 
-#: src/main/seq.c:792 src/main/seq.c:858 src/main/seq.c:895
+#: src/main/seq.c:790 src/main/seq.c:856 src/main/seq.c:893
 msgid "'to' must be finite"
 msgstr "'to'는 반드시 유한값을 가지고 있어야 합니다"
 
-#: src/main/seq.c:804
+#: src/main/seq.c:802
 msgid "invalid '(to - from)/by' in 'seq'"
 msgstr "'seq'에 유효하지 않은 '(to - from)/by'입니다"
 
-#: src/main/seq.c:816
+#: src/main/seq.c:814
 msgid "'by' argument is much too small"
 msgstr "'by' 인자가 너무 작습니다"
 
-#: src/main/seq.c:818
+#: src/main/seq.c:816
 msgid "wrong sign in 'by' argument"
 msgstr "'by' 인자에 잘못된 부호가 있습니다"
 
-#: src/main/seq.c:875 src/main/seq.c:897
+#: src/main/seq.c:873 src/main/seq.c:895
 msgid "'by' must be finite"
 msgstr "'by'는 반드시 유한값을 가지고 있어야 합니다"
 
-#: src/main/seq.c:985 src/main/seq.c:990
+#: src/main/seq.c:983 src/main/seq.c:988
 msgid "argument must be coercible to non-negative integer"
 msgstr "인자는 반드시 음이 아닌 정수로 강제형변환할 수 있어야 합니다"
 
-#: src/main/serialize.c:224 src/main/serialize.c:254 src/main/serialize.c:277
+#: src/main/serialize.c:228 src/main/serialize.c:275 src/main/serialize.c:299
 msgid "unknown or inappropriate output format"
 msgstr "알 수 없거나 올바르지 않은 출력포맷입니다"
 
-#: src/main/serialize.c:504
+#: src/main/serialize.c:542
 msgid "must specify ascii, binary, or xdr format"
 msgstr "반드시 ascii, binary, 또는 xdr 포맷을 지정해야 합니다"
 
-#: src/main/serialize.c:505
+#: src/main/serialize.c:543
 msgid "unknown output format"
 msgstr "알 수 없는 출력 포맷입니다"
 
-#: src/main/serialize.c:536
+#: src/main/serialize.c:574
 msgid "unknown input format"
 msgstr "알 수 없는 입력 포맷입니다"
 
-#: src/main/serialize.c:541
+#: src/main/serialize.c:579
 msgid "input format does not match specified format"
 msgstr "입력 포맷이 지정된 포맷에 부합하지 않습니다"
 
-#: src/main/serialize.c:752
+#: src/main/serialize.c:790
 msgid "no restore method available"
 msgstr "이용가능한 복구방법이 없습니다"
 
-#: src/main/serialize.c:794
+#: src/main/serialize.c:832
 msgid "names in persistent strings are currently ignored"
 msgstr ""
 
-#: src/main/serialize.c:963
+#: src/main/serialize.c:1001
 #, c-format
 msgid "'%s' may not be available when loading"
 msgstr "로딩시에는 '%s'는 아마 이용가능하지 않을 수도 있습니다"
 
-#: src/main/serialize.c:970
+#: src/main/serialize.c:1008
 msgid "namespaces may not be available when loading"
 msgstr "로딩시에는 네임스페이스가 이용가능하지 않을 수도 있습니다"
 
-#: src/main/serialize.c:1097
+#: src/main/serialize.c:1136
 #, c-format
 msgid "WriteItem: unknown type %i"
 msgstr "WriteItem: 알 수 없는 타입 %i입니다"
 
-#: src/main/serialize.c:1273
+#: src/main/serialize.c:1312
 #, c-format
 msgid "version %d not supported"
 msgstr "지원되지 않는 버전 %d입니다"
 
-#: src/main/serialize.c:1305
+#: src/main/serialize.c:1343
 msgid "reference index out of range"
 msgstr ""
 
-#: src/main/serialize.c:1335
+#: src/main/serialize.c:1373
 msgid "names in persistent strings are not supported yet"
 msgstr ""
 
-#: src/main/serialize.c:1463
+#: src/main/serialize.c:1501
 msgid "negative serialized length for vector"
 msgstr ""
 
-#: src/main/serialize.c:1471
+#: src/main/serialize.c:1509
 msgid "invalid upper part of serialized vector length"
 msgstr ""
 
-#: src/main/serialize.c:1476
+#: src/main/serialize.c:1514
 msgid ""
 "negative serialized vector length:\n"
 "perhaps long vector from 64-bit version of R?"
 msgstr ""
 
-#: src/main/serialize.c:1707
+#: src/main/serialize.c:1746
 msgid "this version of R cannot read class references"
 msgstr "이 버전의 R은 클래스 레퍼런스를 읽을 수 없습니다"
 
-#: src/main/serialize.c:1709
+#: src/main/serialize.c:1748
 msgid "this version of R cannot read generic function references"
 msgstr "이 버전의 R은 제네릭 함수 레퍼런스를 읽을 수 없습니다"
 
-#: src/main/serialize.c:1726
+#: src/main/serialize.c:1765
 #, c-format
 msgid "ReadItem: unknown type %i, perhaps written by later version of R"
-msgstr ""
-"ReadItem: 알 수 없는 타입 %i입니다.  아마도 R의 이후버전에 의해서 작성된 것 "
-"같습니다"
+msgstr "ReadItem: 알 수 없는 타입 %i입니다.  아마도 R의 이후버전에 의해서 작성된 것 같습니다"
 
-#: src/main/serialize.c:1882
+#: src/main/serialize.c:1921
 #, c-format
-msgid ""
-"cannot read unreleased workspace version %d written by experimental R %d.%d."
-"%d"
+msgid "cannot read unreleased workspace version %d written by experimental R %d.%d.%d"
 msgstr ""
 
-#: src/main/serialize.c:1886
+#: src/main/serialize.c:1925
 #, c-format
-msgid ""
-"cannot read workspace version %d written by R %d.%d.%d; need R %d.%d.%d or "
-"newer"
-msgstr ""
-"R %2$d.%3$d.%4$d에 의해 작성된 워크스페이스 버전 %1$d을 읽을 수 없습니다; 따"
-"라서, R %5$d.%6$d.%7$d 또는 그 이후의 버전이 필요합니다"
+msgid "cannot read workspace version %d written by R %d.%d.%d; need R %d.%d.%d or newer"
+msgstr "R %2$d.%3$d.%4$d에 의해 작성된 워크스페이스 버전 %1$d을 읽을 수 없습니다; 따라서, R %5$d.%6$d.%7$d 또는 그 이후의 버전이 필요합니다"
 
-#: src/main/serialize.c:1965
+#: src/main/serialize.c:2004
 msgid "read failed"
 msgstr "읽기 실패입니다"
 
-#: src/main/serialize.c:2028
+#: src/main/serialize.c:2067
 msgid "error reading from ascii connection"
 msgstr "ascii 커넥션으로부터 읽기 에러가 발생했습니다"
 
-#: src/main/serialize.c:2030
+#: src/main/serialize.c:2069
 msgid "unexpected format in ascii connection"
 msgstr "ascii 커넥션으로부터 예상치 못한 포맷을 발견했습니다"
 
-#: src/main/serialize.c:2035 src/main/serialize.c:2049
+#: src/main/serialize.c:2074 src/main/serialize.c:2088
 msgid "error reading from connection"
 msgstr "커넥션으로부터 읽기 에러가 발생했습니다"
 
-#: src/main/serialize.c:2090
+#: src/main/serialize.c:2130
 msgid "only ascii format can be written to text mode connections"
 msgstr "텍스트 모드 커넥션에 ascii 포맷만을 쓸 수 있습니다"
 
-#: src/main/serialize.c:2104
+#: src/main/serialize.c:2144
 msgid "only ascii format can be read from text mode connections"
 msgstr "텍스트 모드 커넥션으로부터 ascii 포맷만을 읽어올 수 있습니다"
 
-#: src/main/serialize.c:2159 src/main/serialize.c:2312
-#: src/main/serialize.c:2461
+#: src/main/serialize.c:2200 src/main/serialize.c:2353
+#: src/main/serialize.c:2502
 msgid "bad version value"
 msgstr "잘못된 버전정보입니다"
 
-#: src/main/serialize.c:2184
+#: src/main/serialize.c:2225
 msgid "binary-mode connection required for ascii=FALSE"
 msgstr "ascii=FALSE에는 바이너리 모드 커넥션이 요구됩니다"
 
-#: src/main/serialize.c:2340 src/main/serialize.c:2377
-#: src/main/serialize.c:2440
+#: src/main/serialize.c:2381 src/main/serialize.c:2418
+#: src/main/serialize.c:2481
 msgid "serialization is too large to store in a raw vector"
 msgstr ""
 
-#: src/main/serialize.c:2357
+#: src/main/serialize.c:2398
 msgid "cannot allocate buffer"
 msgstr "버퍼를 할당할 수 없습니다"
 
-#: src/main/serialize.c:2546 src/main/serialize.c:2619
+#: src/main/serialize.c:2592 src/main/serialize.c:2665
 msgid "not a proper file name"
 msgstr "적합한 파일명이 아닙니다"
 
-#: src/main/serialize.c:2548
+#: src/main/serialize.c:2594
 msgid "not a proper raw vector"
 msgstr ""
 
-#: src/main/serialize.c:2569
+#: src/main/serialize.c:2615
 msgid "could not determine file position"
 msgstr "파일위치를 알 수 없습니다"
 
-#: src/main/serialize.c:2621
+#: src/main/serialize.c:2667
 msgid "bad offset/length argument"
 msgstr ""
 
-#: src/main/serialize.c:2645 src/main/serialize.c:2658
-#: src/main/serialize.c:2667 src/main/serialize.c:2677
-#: src/main/serialize.c:2690
+#: src/main/serialize.c:2691 src/main/serialize.c:2704
+#: src/main/serialize.c:2713 src/main/serialize.c:2723
+#: src/main/serialize.c:2736
 #, c-format
 msgid "seek failed on %s"
 msgstr "%s에서 시크가 실패했습니다"
 
-#: src/main/serialize.c:2662 src/main/serialize.c:2671
-#: src/main/serialize.c:2681 src/main/serialize.c:2694
+#: src/main/serialize.c:2708 src/main/serialize.c:2717
+#: src/main/serialize.c:2727 src/main/serialize.c:2740
 #, c-format
 msgid "read failed on %s"
 msgstr "%s에서 읽기가 실패했습니다"
 
-#: src/main/serialize.c:2713
+#: src/main/serialize.c:2759
 msgid "bad environment"
 msgstr "잘못된 인바이런먼트입니다"
 
-#: src/main/serialize.c:2715
+#: src/main/serialize.c:2761
 msgid "bad variable names"
 msgstr "변수명들이 잘못되었습니다"
 
@@ -5581,167 +5488,161 @@ msgstr "변수명들이 잘못되었습니다"
 msgid "only atomic vectors can be tested to be sorted"
 msgstr "atomic 벡터들만이 테스트되고 저장될 수 있습니다"
 
-#: src/main/sort.c:326 src/main/sort.c:1228 src/main/sort.c:1396
+#: src/main/sort.c:325 src/main/sort.c:1248
 msgid "'decreasing' must be TRUE or FALSE"
 msgstr "'decreasing'은 반드시 TRUE 또는 FALSE이어야 합니다"
 
-#: src/main/sort.c:329 src/main/sort.c:600
+#: src/main/sort.c:328 src/main/sort.c:599
 msgid "only atomic vectors can be sorted"
 msgstr "atomic 벡터들만이 저장될 수 있습니다"
 
-#: src/main/sort.c:331 src/main/sort.c:602 src/main/sort.c:1297
+#: src/main/sort.c:330 src/main/sort.c:601 src/main/sort.c:1317
 msgid "raw vectors cannot be sorted"
 msgstr "raw 벡터들은 정렬될 수 없습니다"
 
-#: src/main/sort.c:613
+#: src/main/sort.c:612
 msgid "NA or infinite index"
 msgstr ""
 
-#: src/main/sort.c:616
+#: src/main/sort.c:615
 #, c-format
 msgid "index %ld outside bounds"
 msgstr ""
 
-#: src/main/sort.c:621 src/main/sort.c:634
+#: src/main/sort.c:620 src/main/sort.c:633
 msgid "NA index"
 msgstr ""
 
-#: src/main/sort.c:623 src/main/sort.c:636
+#: src/main/sort.c:622 src/main/sort.c:635
 #, c-format
 msgid "index %d outside bounds"
 msgstr ""
 
-#: src/main/sort.c:1237
+#: src/main/sort.c:1257
 #, c-format
 msgid "argument %d is not a vector"
 msgstr "인자 %d는 벡터가 아닙니다"
 
-#: src/main/sort.c:1239
+#: src/main/sort.c:1259
 msgid "argument lengths differ"
 msgstr "인자의 길이가 서로 다릅니다"
 
-#: src/main/sort.c:1324
+#: src/main/sort.c:1344
 msgid "invalid ties.method for rank() [should never happen]"
-msgstr ""
-"rank()에 대해서 유효하지 않은 ties.method입니다 [일어나서는 안되는 경우입니"
-"다]"
-
-#: src/main/sort.c:1429
-msgid "too large a range of values in 'x'"
-msgstr ""
+msgstr "rank()에 대해서 유효하지 않은 ties.method입니다 [일어나서는 안되는 경우입니다]"
 
-#: src/main/source.c:215
+#: src/main/source.c:220
 msgid "coercion of 'text' to character was unsuccessful"
 msgstr "문자로의 'text'의 강제형변환은 성공하지 못했습니다"
 
-#: src/main/source.c:231
+#: src/main/source.c:236
 #, c-format
 msgid "argument '%s = \"%s\"' will be ignored"
 msgstr "인자 '%1$s = \"%2$s\"'는 무시될 것입니다"
 
-#: src/main/split.c:38
+#: src/main/split.c:39
 msgid "first argument must be a vector"
 msgstr "첫번째 인자는 반드시 벡터이어야 합니다"
 
-#: src/main/split.c:40
+#: src/main/split.c:41
 msgid "second argument must be a factor"
 msgstr "두번째 인자는 반드시 요인이어야 합니다"
 
-#: src/main/split.c:45
+#: src/main/split.c:46
 msgid "group length is 0 but data length > 0"
 msgstr "그룹의 길이가 0인데, 데이터의 길이는 0 보다 큽니다"
 
-#: src/main/split.c:47
+#: src/main/split.c:48
 msgid "data length is not a multiple of split variable"
 msgstr ""
 
-#: src/main/split.c:56
+#: src/main/split.c:58
 msgid "factor has bad level"
 msgstr "요인이 올바른 수준을 가지고 있지 않습니다"
 
-#: src/main/sprintf.c:94
+#: src/main/sprintf.c:97
 #, c-format
 msgid "required resulting string length %d is greater than maximal %d"
 msgstr ""
 
-#: src/main/sprintf.c:102
+#: src/main/sprintf.c:105
 msgid "'fmt' is not a character vector"
 msgstr "'fmt'은 문자형 벡터가 아닙니다"
 
-#: src/main/sprintf.c:107
+#: src/main/sprintf.c:110
 #, c-format
 msgid "only %d arguments are allowed"
 msgstr "오직 %d 인자들만이 허용됩니다"
 
-#: src/main/sprintf.c:114
+#: src/main/sprintf.c:117
 #, c-format
 msgid "invalid type of argument[%d]: '%s'"
 msgstr "유효하지 않은 타입의 인수[%d]: '%s'"
 
-#: src/main/sprintf.c:125 src/main/sprintf.c:128
+#: src/main/sprintf.c:128 src/main/sprintf.c:131
 msgid "arguments cannot be recycled to the same length"
 msgstr ""
 
-#: src/main/sprintf.c:150 src/main/sprintf.c:257
+#: src/main/sprintf.c:153 src/main/sprintf.c:260
 #, c-format
 msgid "'fmt' length exceeds maximal format length %d"
 msgstr "'fmt'의 길이가 최대 포맷길이 %d를 초과합니다"
 
-#: src/main/sprintf.c:169
+#: src/main/sprintf.c:172
 #, c-format
 msgid "unrecognised format specification '%s'"
 msgstr "알 수 없는 포맷지정 '%s'입니다"
 
-#: src/main/sprintf.c:180 src/main/sprintf.c:186 src/main/sprintf.c:199
-#: src/main/sprintf.c:206
+#: src/main/sprintf.c:183 src/main/sprintf.c:189 src/main/sprintf.c:202
+#: src/main/sprintf.c:209
 #, c-format
 msgid "reference to non-existent argument %d"
 msgstr ""
 
-#: src/main/sprintf.c:218
+#: src/main/sprintf.c:221
 msgid "at most one asterisk '*' is supported in each conversion specification"
 msgstr ""
 
-#: src/main/sprintf.c:228
+#: src/main/sprintf.c:231
 msgid "argument for '*' conversion specification must be a number"
 msgstr ""
 
-#: src/main/sprintf.c:266
+#: src/main/sprintf.c:269
 msgid "coercion has changed vector length to 0"
 msgstr "강제형변환에 의하여 벡터의 길이가 0이 되었습니다"
 
-#: src/main/sprintf.c:339 src/main/sprintf.c:353 src/main/sprintf.c:367
-#: src/main/sprintf.c:402
+#: src/main/sprintf.c:343 src/main/sprintf.c:357 src/main/sprintf.c:371
+#: src/main/sprintf.c:406
 #, c-format
 msgid "invalid format '%s'; %s"
 msgstr "'%1$s'는 유효하지 않은 포맷입니다; %2$s"
 
-#: src/main/sprintf.c:340
+#: src/main/sprintf.c:344
 #, c-format
 msgid "use format %d or %i for logical objects"
 msgstr "논리형 객체들에 대해서는 포맷 %d 또는 %i를 사용해주세요"
 
-#: src/main/sprintf.c:354
+#: src/main/sprintf.c:358
 #, c-format
 msgid "use format %d, %i, %o, %x or %X for integer objects"
 msgstr "정수형 객체들에는 포맷 %d, %i, %o, %x 또는 %X을 사용해 주세요"
 
-#: src/main/sprintf.c:368
+#: src/main/sprintf.c:372
 #, c-format
 msgid "use format %f, %e, %g or %a for numeric objects"
 msgstr "수치형 객체들에는 포맷 %f, %e, %g 또는 %a를 사용해 주세요"
 
-#: src/main/sprintf.c:403
+#: src/main/sprintf.c:407
 #, c-format
 msgid "use format %s for character objects"
 msgstr "문자형 객체들에는 포맷 %s를 사용해주세요"
 
-#: src/main/sprintf.c:408
+#: src/main/sprintf.c:412
 #, c-format
 msgid "likely truncation of character string to %d characters"
 msgstr ""
 
-#: src/main/sprintf.c:417
+#: src/main/sprintf.c:421
 msgid "unsupported type"
 msgstr "지원되지 않는 타입입니다"
 
@@ -5749,377 +5650,380 @@ msgstr "지원되지 않는 타입입니다"
 msgid "R_LibraryFileName: buffer too small"
 msgstr "R_LibraryFileName: 버퍼가 너무 작습니다"
 
-#: src/main/subassign.c:117
+#: src/main/subassign.c:118
 msgid "attempt to enlarge non-vector"
 msgstr ""
 
-#: src/main/subassign.c:122
+#: src/main/subassign.c:123
 #, c-format
 msgid "assignment outside vector/list limits (extending from %d to %d)"
 msgstr ""
 
-#: src/main/subassign.c:367
+#: src/main/subassign.c:391
 #, c-format
 msgid "incompatible types (from %s to %s) in subassignment type fix"
 msgstr ""
 
-#: src/main/subassign.c:502 src/main/subassign.c:782 src/main/subassign.c:785
-#: src/main/subassign.c:1076
+#: src/main/subassign.c:550 src/main/subassign.c:830 src/main/subassign.c:833
+#: src/main/subassign.c:1133
 msgid "NAs are not allowed in subscripted assignments"
 msgstr ""
 
-#: src/main/subassign.c:520 src/main/subassign.c:796 src/main/subassign.c:1068
-#: src/main/subassign.c:1641
+#: src/main/subassign.c:568 src/main/subassign.c:844 src/main/subassign.c:1125
+#: src/main/subassign.c:1705
 msgid "replacement has length zero"
 msgstr ""
 
-#: src/main/subassign.c:522 src/main/subassign.c:798 src/main/subassign.c:1070
+#: src/main/subassign.c:570 src/main/subassign.c:846 src/main/subassign.c:1127
 msgid "number of items to replace is not a multiple of replacement length"
 msgstr ""
 
-#: src/main/subassign.c:766
+#: src/main/subassign.c:814
 msgid "incorrect number of subscripts on matrix"
 msgstr "행렬에 있는 첨자의 개수가 올바르지 않습니다"
 
-#: src/main/subassign.c:1022
+#: src/main/subassign.c:1079
 #, c-format
 msgid "incompatible types (from %s to %s) in matrix subset assignment"
 msgstr ""
 
-#: src/main/subassign.c:1038 src/main/subset.c:928
+#: src/main/subassign.c:1095 src/main/subset.c:957
 msgid "incorrect number of subscripts"
 msgstr "첨자들의 개수가 올바르지 않습니다"
 
-#: src/main/subassign.c:1214
+#: src/main/subassign.c:1272
 #, c-format
 msgid "incompatible types (from %s to %s) in array subset assignment"
 msgstr ""
 
-#: src/main/subassign.c:1249 src/main/subassign.c:1270
+#: src/main/subassign.c:1308 src/main/subassign.c:1329
 msgid "invalid subscript in list assign"
 msgstr ""
 
-#: src/main/subassign.c:1263
+#: src/main/subassign.c:1322
 msgid "invalid number of subscripts to list assign"
 msgstr ""
 
-#: src/main/subassign.c:1361
+#: src/main/subassign.c:1421
 msgid "SubAssignArgs: invalid number of arguments"
 msgstr ""
 
-#: src/main/subassign.c:1506
+#: src/main/subassign.c:1566
 msgid "result is zero-length and so cannot be a language object"
 msgstr ""
 
-#: src/main/subassign.c:1611
-msgid ""
-"[[<- defined for objects of type \"S4\" only for subclasses of environment"
+#: src/main/subassign.c:1665
+msgid "[[<- defined for objects of type \"S4\" only for subclasses of environment"
 msgstr ""
 
-#: src/main/subassign.c:1617
+#: src/main/subassign.c:1677
 msgid "wrong args for environment subassignment"
 msgstr ""
 
-#: src/main/subassign.c:1643
+#: src/main/subassign.c:1707
 msgid "more elements supplied than there are to replace"
 msgstr ""
 
-#: src/main/subassign.c:1645
+#: src/main/subassign.c:1709
 msgid "[[ ]] with missing subscript"
 msgstr ""
 
-#: src/main/subassign.c:1657 src/main/subassign.c:1675
+#: src/main/subassign.c:1727 src/main/subassign.c:1745
 msgid "[[ ]] subscript out of bounds"
 msgstr ""
 
-#: src/main/subassign.c:1663 src/main/subassign.c:1841
+#: src/main/subassign.c:1733 src/main/subassign.c:1914
 msgid "[[ ]] improper number of subscripts"
 msgstr ""
 
-#: src/main/subassign.c:1808
+#: src/main/subassign.c:1879
 #, c-format
 msgid "incompatible types (from %s to %s) in [[ assignment"
 msgstr ""
 
-#: src/main/subassign.c:1852
+#: src/main/subassign.c:1925
 #, c-format
 msgid "[[ ]] subscript (%d) out of bounds"
 msgstr ""
 
-#: src/main/subassign.c:1905 src/main/subscript.c:143 src/main/subscript.c:145
-#: src/main/subscript.c:274 src/main/subscript.c:276 src/main/subscript.c:826
-#: src/main/subscript.c:828 src/main/subscript.c:919 src/main/subscript.c:921
-#: src/main/subset.c:1109
+#: src/main/subassign.c:1986 src/main/subscript.c:151 src/main/subscript.c:278
+#: src/main/subscript.c:903 src/main/subscript.c:996 src/main/subset.c:1176
 #, c-format
 msgid "invalid subscript type '%s'"
 msgstr "유효하지 않은 첨자의 타입 '%s'입니다"
 
-#: src/main/subassign.c:1950
+#: src/main/subassign.c:2037
 msgid "no method for assigning subsets of this S4 class"
 msgstr ""
 
-#: src/main/subassign.c:2008
+#: src/main/subassign.c:2095
 msgid "Coercing LHS to a list"
 msgstr "좌변을 리스트로 강제형변환합니다"
 
-#: src/main/subscript.c:53 src/main/subscript.c:75 src/main/subscript.c:180
-#: src/main/subscript.c:204
-msgid "attempt to select less than one element"
+#: src/main/subscript.c:59 src/main/subscript.c:81 src/main/subscript.c:185
+#: src/main/subscript.c:209
+#, c-format
+msgid "attempt to select less than one element in %s"
 msgstr ""
 
-#: src/main/subscript.c:57 src/main/subscript.c:72 src/main/subscript.c:178
-#: src/main/subscript.c:208 src/main/subscript.c:304
-msgid "attempt to select more than one element"
-msgstr "한 개 이상의 구성요소 선택을 시도합니다"
+#: src/main/subscript.c:63 src/main/subscript.c:78 src/main/subscript.c:183
+#: src/main/subscript.c:213 src/main/subscript.c:305
+#, c-format
+msgid "attempt to select more than one element in %s"
+msgstr ""
 
-#: src/main/subscript.c:184
+#: src/main/subscript.c:189
 msgid "internal error in use of recursive indexing"
 msgstr ""
 
-#: src/main/subscript.c:252
+#: src/main/subscript.c:257
 #, c-format
 msgid "further partial match of '%s' to '%s'"
 msgstr ""
 
-#: src/main/subscript.c:302
+#: src/main/subscript.c:303
 #, c-format
 msgid "recursive indexing failed at level %d\n"
 msgstr ""
 
-#: src/main/subscript.c:309
+#: src/main/subscript.c:313
 #, c-format
 msgid "no such index at level %d\n"
 msgstr ""
 
-#: src/main/subscript.c:352
+#: src/main/subscript.c:360
 msgid "incorrect number of columns in matrix subscript"
 msgstr ""
 
-#: src/main/subscript.c:371 src/main/subscript.c:389 src/main/subscript.c:413
+#: src/main/subscript.c:379 src/main/subscript.c:397 src/main/subscript.c:421
 msgid "negative values are not allowed in a matrix subscript"
 msgstr ""
 
-#: src/main/subscript.c:492
+#: src/main/subscript.c:500
 msgid "(subscript) logical subscript too long"
 msgstr ""
 
-#: src/main/subscript.c:590 src/main/subscript.c:645
+#: src/main/subscript.c:668 src/main/subscript.c:723
 msgid "only 0's may be mixed with negative subscripts"
 msgstr ""
 
-#: src/main/subscript.c:618
+#: src/main/subscript.c:696
 msgid "subscript too large for 32-bit R"
 msgstr "32 비트의 R에서는 너무 큰 첨자입니다"
 
-#: src/main/subscript.c:817
+#: src/main/subscript.c:895
 msgid "no 'dimnames' attribute for array"
 msgstr ""
 
-#: src/main/subscript.c:857
+#: src/main/subscript.c:931
 msgid "subscripting on non-vector"
 msgstr ""
 
-#: src/main/subset.c:261
+#: src/main/subset.c:260
 msgid "dimensions would exceed maximum size of array"
 msgstr ""
 
-#: src/main/subset.c:304 src/main/subset.c:333
+#: src/main/subset.c:304 src/main/subset.c:334
 msgid "matrix subscripting not handled for this type"
 msgstr ""
 
-#: src/main/subset.c:488
+#: src/main/subset.c:493
 msgid "array subscripting not handled for this type"
 msgstr ""
 
-#: src/main/subset.c:827
+#: src/main/subset.c:856
 msgid "incorrect number of dimensions"
 msgstr ""
 
-#: src/main/subset.c:924
+#: src/main/subset.c:953
 msgid "no index specified"
 msgstr "지정된 인덱스가 없습니다"
 
-#: src/main/subset.c:934
+#: src/main/subset.c:963
 msgid "this S4 class is not subsettable"
 msgstr ""
 
-#: src/main/subset.c:940
+#: src/main/subset.c:970
 msgid "wrong arguments for subsetting an environment"
 msgstr ""
 
-#: src/main/summary.c:30
+#: src/main/summary.c:33
 #, c-format
 msgid "invalid 'type' (%s) of argument"
 msgstr "인자의 'type' (%s)이 올바르지 않습니다"
 
-#: src/main/summary.c:66 src/main/summary.c:78 src/main/summary.c:103
+#: src/main/summary.c:69 src/main/summary.c:81 src/main/summary.c:106
 msgid "integer overflow - use sum(as.numeric(.))"
 msgstr ""
 
-#: src/main/summary.c:522
+#: src/main/summary.c:526
 #, c-format
 msgid "internal error ('op = %d' in do_summary).\t Call a Guru"
 msgstr ""
 
-#: src/main/summary.c:623
+#: src/main/summary.c:637
 msgid "Integer overflow - use sum(as.numeric(.))"
 msgstr ""
 
-#: src/main/summary.c:731
+#: src/main/summary.c:750
 msgid "no non-missing arguments, returning NA"
 msgstr "누락된 인자들이 있어 NA를 반환합니다"
 
-#: src/main/summary.c:734
+#: src/main/summary.c:753
 msgid "no non-missing arguments to min; returning Inf"
 msgstr "min에 전달되는 인자들 중 누락이 있어 Inf를 반환합니다"
 
-#: src/main/summary.c:736
+#: src/main/summary.c:755
 msgid "no non-missing arguments to max; returning -Inf"
 msgstr "max에 전달되는 인자들 중 누락이 있어 -Inf를 반환합니다"
 
-#: src/main/summary.c:801
-msgid "non-numeric argument"
-msgstr "수치형 인자가 아닙니다"
-
-#: src/main/summary.c:845
+#: src/main/summary.c:913
 msgid "argument to 'which' is not logical"
 msgstr "'which'에 전달되는 인자가 논리형이 아닙니다"
 
-#: src/main/summary.c:889
+#: src/main/summary.c:957
 msgid "no arguments"
 msgstr "인자들이 없습니다"
 
-#: src/main/summary.c:900 src/main/summary.c:917
+#: src/main/summary.c:968 src/main/summary.c:985
 msgid "invalid input type"
 msgstr "유효하지 않은 입력 유형입니다"
 
-#: src/main/summary.c:934
+#: src/main/summary.c:1002
 msgid "an argument will be fractionally recycled"
 msgstr ""
 
-#: src/main/sysutils.c:69 src/main/sysutils.c:83
+#: src/main/sysutils.c:68 src/main/sysutils.c:82
 #, c-format
 msgid "cannot determine file modification time of '%s'"
 msgstr "'%s'의 파일수정시간을 알수 없습니다"
 
-#: src/main/sysutils.c:167
+#: src/main/sysutils.c:166
 msgid "encoding of a filename cannot be 'bytes'"
 msgstr "파일명의 인코딩이 'bytes'일 수 없습니다"
 
-#: src/main/sysutils.c:170 src/main/sysutils.c:803 src/main/sysutils.c:818
-#: src/main/sysutils.c:909 src/main/sysutils.c:924 src/main/sysutils.c:1020
+#: src/main/sysutils.c:169 src/main/sysutils.c:831 src/main/sysutils.c:846
+#: src/main/sysutils.c:975
 #, c-format
 msgid "unsupported conversion from '%s' in codepage %d"
 msgstr ""
 
-#: src/main/sysutils.c:179
+#: src/main/sysutils.c:178
 msgid "file name conversion problem -- name too long?"
 msgstr "파일명 전환에 문제가 있습니다 -- 이름이 너무 긴가요?"
 
-#: src/main/sysutils.c:180
+#: src/main/sysutils.c:179
 msgid "file name conversion problem"
 msgstr "파일명 전환에 문제가 있습니다"
 
-#: src/main/sysutils.c:249
+#: src/main/sysutils.c:248
 msgid "invalid filename pattern"
 msgstr "올바르지 않은 파일명 패턴입니다"
 
-#: src/main/sysutils.c:253
+#: src/main/sysutils.c:252
 msgid "invalid file extension"
 msgstr "유효하지 않은 파일 확장자입니다"
 
-#: src/main/sysutils.c:255
+#: src/main/sysutils.c:254
 msgid "no 'pattern'"
 msgstr "'pattern'이 없습니다"
 
-#: src/main/sysutils.c:257
+#: src/main/sysutils.c:256
 msgid "no 'tempdir'"
 msgstr "'tempdir'가 없습니다"
 
-#: src/main/sysutils.c:259
+#: src/main/sysutils.c:258
 msgid "no 'fileext'"
 msgstr "'fileext'가 없습니다"
 
-#: src/main/sysutils.c:345 src/main/sysutils.c:348 src/main/sysutils.c:439
-#: src/main/sysutils.c:441 src/main/sysutils.c:477
+#: src/main/sysutils.c:328
+#, c-format
+msgid "system call failed: %s"
+msgstr "시스템 호출에 실패했습니다: %s"
+
+#: src/main/sysutils.c:357 src/main/sysutils.c:360 src/main/sysutils.c:451
+#: src/main/sysutils.c:453 src/main/sysutils.c:489
 msgid "wrong type for argument"
 msgstr "인자에 대한 타입이 올바르지 않습니다"
 
-#: src/main/sysutils.c:443
+#: src/main/sysutils.c:455
 msgid "wrong length for argument"
 msgstr "인자에 대한 길이가 올바르지 않습니다"
 
-#: src/main/sysutils.c:464
+#: src/main/sysutils.c:476
 msgid "'Sys.setenv' is not available on this system"
 msgstr "이 시스템에서는 'Sys.setenv'을 사용할 수 없습니다"
 
-#: src/main/sysutils.c:508
+#: src/main/sysutils.c:520
 msgid "this system cannot unset environment variables: setting to \"\""
 msgstr ""
 
-#: src/main/sysutils.c:519
+#: src/main/sysutils.c:531
 msgid "'Sys.unsetenv' is not available on this system"
 msgstr "이 시스템에서는 'Sys.unsetenv'를 사용할 수 없습니다"
 
-#: src/main/sysutils.c:616
+#: src/main/sysutils.c:628
 #, c-format
 msgid "unsupported conversion from '%s' to '%s' in codepage %d"
 msgstr ""
 
-#: src/main/sysutils.c:631
+#: src/main/sysutils.c:643
 msgid "'x' must be a character vector"
 msgstr "'x'는 반드시 문자형 벡터이어야 합니다"
 
-#: src/main/sysutils.c:646
-msgid "'x' must be a list of NULL or raw vectors"
-msgstr "'x'는 반드시 NULL 또는 벡터들로 구성된 리스트이어야 합니다"
+#: src/main/sysutils.c:658
+msgid "'x' must be a character vector or a list of NULL or raw vectors"
+msgstr "'x'는 반드시 문자형 벡터 또는 NULL로 된 리스트 또는 raw 벡터이어야 합니다. "
 
-#: src/main/sysutils.c:724 src/main/sysutils.c:789 src/main/sysutils.c:895
-#: src/main/sysutils.c:994 src/main/sysutils.c:1010 src/main/sysutils.c:1087
+#: src/main/sysutils.c:736 src/main/sysutils.c:914 src/main/sysutils.c:932
+#: src/main/sysutils.c:949 src/main/sysutils.c:965 src/main/sysutils.c:1042
 #, c-format
 msgid "'%s' must be called on a CHARSXP"
 msgstr "'%s'는 반드시 CHARSXP 상에서 호출되어야 합니다"
 
-#: src/main/sysutils.c:792 src/main/sysutils.c:898 src/main/sysutils.c:1015
-#: src/main/sysutils.c:1090
+#: src/main/sysutils.c:805 src/main/sysutils.c:970 src/main/sysutils.c:1045
 msgid "translating strings with \"bytes\" encoding is not allowed"
 msgstr "\"bytes\" 인코딩으로 된 문자열을 번역하는 것은 허용되지 않습니다"
 
-#: src/main/sysutils.c:1116
+#: src/main/sysutils.c:818
+msgid "internal error: no translation needed"
+msgstr "내부오류: 번역이 필요하지 않습니다."
+
+#: src/main/sysutils.c:1071
 #, c-format
 msgid "unsupported conversion to '%s' from codepage %d"
-msgstr ""
+msgstr "코드페이지(codepage) %2$d로부터 '%1$s'는 지원되지 않는 변환입니다."
 
-#: src/main/sysutils.c:1530
+#: src/main/sysutils.c:1486
 #, c-format
 msgid "invalid Unicode point %u"
-msgstr "유니코드 %u가 올바르지 않습니다"
+msgstr "유니코드 %u는 올바르지 않습니다"
 
-#: src/main/sysutils.c:1632
+#: src/main/sysutils.c:1588
 msgid "cannot create 'R_TempDir'"
 msgstr "'R_TempDir'을 생성할 수 없습니다"
 
-#: src/main/sysutils.c:1636 src/main/sysutils.c:1644 src/main/sysutils.c:1647
+#: src/main/sysutils.c:1592 src/main/sysutils.c:1600 src/main/sysutils.c:1603
 msgid "unable to set R_SESSION_TMPDIR"
 msgstr "R_SESSION_TMPDIR을 지정할 수 없습니다"
 
-#: src/main/sysutils.c:1656
+#: src/main/sysutils.c:1612
 msgid "cannot allocate 'R_TempDir'"
 msgstr "'R_TempDir'을 할당할 수 없습니다"
 
-#: src/main/sysutils.c:1693
+#: src/main/sysutils.c:1649
 msgid "temporary name too long"
 msgstr ""
 
-#: src/main/sysutils.c:1708
+#: src/main/sysutils.c:1664
 msgid "cannot find unused tempfile name"
 msgstr "사용되지 않은 임시파일명을 찾을 수 없습니다"
 
-#: src/main/sysutils.c:1711
+#: src/main/sysutils.c:1667
 msgid "allocation failed in R_tmpnam2"
 msgstr "R_tmpnam2내에 할당이 실패했습니다"
 
-#: src/main/sysutils.c:1838
+#: src/main/sysutils.c:1794
 msgid "'dirmark = TRUE' is not supported on this platform"
 msgstr "이 플랫폼에서는 'dirmark = TRUE'이 지원되지 않습니다"
 
@@ -6129,191 +6033,197 @@ msgid "length %d is too large for hashing"
 msgstr "해싱을 하기에는 길이 %d가 너무 큽니다"
 
 #: src/main/unique.c:490 src/main/unique.c:519 src/main/unique.c:549
-#: src/main/unique.c:575 src/main/unique.c:614
+#: src/main/unique.c:573 src/main/unique.c:612
 msgid "'duplicated' applies only to vectors"
 msgstr ""
 
-#: src/main/unique.c:619
+#: src/main/unique.c:617
 msgid "any_duplicated3(., <0-length incomp>)"
 msgstr ""
 
-#: src/main/unique.c:669
+#: src/main/unique.c:667
 msgid "'fromLast' must be length 1"
 msgstr "'fromLast'는 반드시 길이가 1 이어야 합니다"
 
-#: src/main/unique.c:672
+#: src/main/unique.c:670
 msgid "'fromLast' must be TRUE or FALSE"
 msgstr "'fromLast'은 반드시 TRUE 또는 FALSE이어야 합니다"
 
-#: src/main/unique.c:683
+#: src/main/unique.c:681
 #, c-format
 msgid "%s() applies only to vectors"
 msgstr "%s()는 오로지 벡터들에만 적용됩니다"
 
-#: src/main/unique.c:690
+#: src/main/unique.c:688
 msgid "'nmax' must be positive"
 msgstr "'nmax'는 반드시 양수이어야 합니다"
 
-#: src/main/unique.c:922
+#: src/main/unique.c:985
 msgid "'match' requires vector arguments"
 msgstr "'match'는 벡터형 인자들을 필요로 합니다"
 
-#: src/main/unique.c:970 src/main/unique.c:1125
+#: src/main/unique.c:1033 src/main/unique.c:1171
 msgid "argument is not of mode character"
 msgstr "인자가 캐릭터 모드가 아닙니다"
 
-#: src/main/unique.c:1251
+#: src/main/unique.c:1296
 msgid "... used in a situation where it does not exist"
 msgstr "... 가 존재하지 않는 경우에 사용되었습니다"
 
-#: src/main/unique.c:1342
-msgid "unable to find a closure from within which 'match.call' was called"
-msgstr ""
+#: src/main/unique.c:1302
+msgid "... is not a pairlist"
+msgstr "...는 pairlist가 아닙니다."
 
-#: src/main/unique.c:1536
+#: src/main/unique.c:1531
 msgid "non-numeric data frame in rowsum"
 msgstr ""
 
-#: src/main/unique.c:1568
+#: src/main/unique.c:1563
 msgid "this cannot happen"
 msgstr "이것은 일어날 수 없는 경우입니다"
 
-#: src/main/unique.c:1639
+#: src/main/unique.c:1634
 msgid "'names' must be a character vector"
 msgstr "'names' must be a character vector"
 
-#: src/main/unique.c:1643
-msgid "'sep' must be a character string"
-msgstr "'sep'는 반드시 문자열이어야 합니다"
-
-#: src/main/util.c:88 src/main/util.c:106
+#: src/main/util.c:87 src/main/util.c:105
 msgid "object is not a matrix"
 msgstr "객체가 행렬이 아닙니다"
 
-#: src/main/util.c:254 src/main/util.c:268 src/main/util.c:285
+#: src/main/util.c:303 src/main/util.c:315 src/main/util.c:326
+#: src/main/util.c:341
 #, c-format
 msgid "type %d is unimplemented in '%s'"
 msgstr "%d는 '%s'에서 구현되지 않은 유형입니다"
 
-#: src/main/util.c:297
+#: src/main/util.c:352
 #, c-format
 msgid "unimplemented type '%s' in '%s'\n"
 msgstr "'%s'은 '%s'에서 구현되지 않은 유형입니다\n"
 
-#: src/main/util.c:299
+#: src/main/util.c:354
 #, c-format
 msgid "unimplemented type (%d) in '%s'\n"
 msgstr "%d은 '%s'에서 구현되지 않은 유형입니다\n"
 
-#: src/main/util.c:424
+#: src/main/util.c:479
 msgid "invalid tag in name extraction"
 msgstr ""
 
-#: src/main/util.c:434
+#: src/main/util.c:489
 #, c-format
 msgid "%d argument passed to .Internal(%s) which requires %d"
 msgid_plural "%d arguments passed to .Internal(%s) which requires %d"
 msgstr[0] "%3$d를 필요로 하는 .Internal(%2$s)에 인자 %1$d가 전달되었습니다"
 
-#: src/main/util.c:440
+#: src/main/util.c:495
 #, c-format
 msgid "%d argument passed to '%s' which requires %d"
 msgid_plural "%d arguments passed to '%s' which requires %d"
 msgstr[0] "%3$d를 필요로 하는 '%2$s'에 인자 %1$d가 전달되었습니다"
 
-#: src/main/util.c:455
+#: src/main/util.c:510
 #, c-format
 msgid "supplied argument name '%s' does not match '%s'"
 msgstr "주어진 인자명 '%s'이 '%s'에 매치되지 않습니다"
 
-#: src/main/util.c:465
+#: src/main/util.c:520
 #, c-format
 msgid "'nthcdr' list shorter than %d"
 msgstr ""
 
-#: src/main/util.c:470
+#: src/main/util.c:525
 msgid "'nthcdr' needs a list to CDR down"
 msgstr ""
 
-#: src/main/util.c:586
+#: src/main/util.c:641
 msgid "'all.x' must be TRUE or FALSE"
 msgstr "'all.x'는 반드시 TRUE 또는 FALSE이어야 합니다"
 
-#: src/main/util.c:588
+#: src/main/util.c:643
 msgid "'all.y' must be TRUE or FALSE"
 msgstr "'all.y'는 반드시 TRUE 또는 FALSE이어야 합니다"
 
-#: src/main/util.c:700
+#: src/main/util.c:672
+msgid "number of rows in the result exceeds maximum vector length"
+msgstr ""
+
+#: src/main/util.c:764
 msgid "missing value is invalid"
 msgstr ""
 
-#: src/main/util.c:709 src/main/util.c:716
+#: src/main/util.c:773 src/main/util.c:780
 msgid "cannot change working directory"
 msgstr "작업디렉토리를 변경할 수 없습니다"
 
-#: src/main/util.c:735 src/main/util.c:769 src/main/util.c:810
-#: src/main/util.c:852 src/main/util.c:981 src/main/util.c:1040
-#: src/main/util.c:1063
+#: src/main/util.c:800 src/main/util.c:834 src/main/util.c:875
+#: src/main/util.c:917 src/main/util.c:1046 src/main/util.c:1105
+#: src/main/util.c:1128
 msgid "a character vector argument expected"
 msgstr "문자형 벡터 인자가 와야합니다"
 
-#: src/main/util.c:742 src/main/util.c:777 src/main/util.c:819
-#: src/main/util.c:860
+#: src/main/util.c:807 src/main/util.c:842 src/main/util.c:884
+#: src/main/util.c:925
 msgid "path too long"
 msgstr "경로가 너무 깁니다"
 
-#: src/main/util.c:995
+#: src/main/util.c:1060
 msgid "only the first character of 'quote' will be used"
 msgstr "오로지 'quote'의 첫번째 문자만이 사용될 것입니다"
 
-#: src/main/util.c:1065
+#: src/main/util.c:1130
 msgid "a character vector 'value' expected"
 msgstr "문자형 벡터 'value'가 와야합니다"
 
-#: src/main/util.c:1068
+#: src/main/util.c:1133
 msgid "'value' must be of positive length"
 msgstr "'value'는 반드시 길이가 양수이어야 합니다"
 
-#: src/main/util.c:1197 src/main/util.c:1205
+#: src/main/util.c:1262 src/main/util.c:1270
 #, c-format
 msgid "invalid input '%s' in 'utf8towcs'"
 msgstr "'utf8towcs'내에 입력 '%s'이 잘못되었습니다"
 
-#: src/main/util.c:1290
+#: src/main/util.c:1355
 #, c-format
 msgid "invalid multibyte string at '%s'"
 msgstr "'%s'에서 유효하지 않은 멀티바이트 문자열이 있습니다"
 
-#: src/main/util.c:1399
+#: src/main/util.c:1497
 msgid "error message truncated to 255 chars"
 msgstr "에러메시지가 255 문자까지 보여집니다"
 
-#: src/main/util.c:1412
+#: src/main/util.c:1510
 msgid "warning message truncated to 255 chars"
 msgstr "경고메시지가 255 문자까지 보여집니다"
 
-#: src/main/util.c:1819
+#: src/main/util.c:1659
+#, c-format
+msgid "accuracy loss in conversion from \"%s\" to numeric"
+msgstr ""
+
+#: src/main/util.c:1969
 msgid "all arguments must be named"
 msgstr "모든 인자들에는 반드시 이름이 주어져야 합니다"
 
-#: src/main/util.c:1893
+#: src/main/util.c:2091
 msgid "ICU is not supported on this build"
 msgstr "이 빌드에서는 ICU는 지원되지 않습니다"
 
-#: src/main/util.c:1954
+#: src/main/util.c:2158
 msgid "'breaks' is not sorted"
 msgstr "'breaks'가 정렬되지 않았습니다"
 
-#: src/main/util.c:1988 src/main/util.c:2034
+#: src/main/util.c:2192 src/main/util.c:2242
 #, c-format
 msgid "long vector '%s' is not supported"
 msgstr "긴 벡터 '%s'는 지원되지 않습니다"
 
-#: src/main/util.c:2087
+#: src/main/util.c:2296
 msgid "'eps.correct' must be 0, 1, or 2"
 msgstr "'eps.correct'는 반드시 0, 1, 또는 2 이어야 합니다"
 
-#: src/main/util.c:2115
+#: src/main/util.c:2324
 msgid "'x' must be a vector"
 msgstr "'x'는 반드시 벡터이어야 합니다"
 
@@ -6326,8 +6236,7 @@ msgid ""
 msgstr ""
 "R은 자유 소프트웨어이며, 어떠한 형태의 보증없이 배포됩니다.\n"
 "또한, 일정한 조건하에서 이것을 재배포 할 수 있습니다.\n"
-"배포와 관련된 상세한 내용은 'license()' 또는 'licence()'을 통하여 확인할 수 "
-"있습니다.\n"
+"배포와 관련된 상세한 내용은 'license()' 또는 'licence()'을 통하여 확인할 수 있습니다.\n"
 "\n"
 
 #: src/main/version.c:40
@@ -6338,10 +6247,8 @@ msgid ""
 "\n"
 msgstr ""
 "R은 많은 기여자들이 참여하는 공동프로젝트입니다.\n"
-"'contributors()'라고 입력하시면 이에 대한 더 많은 정보를 확인하실 수 있습니"
-"다.\n"
-"그리고, R 또는 R 패키지들을 출판물에 인용하는 방법에 대해서는 'citation()'을 "
-"통해 확인하시길 부탁드립니다.\n"
+"'contributors()'라고 입력하시면 이에 대한 더 많은 정보를 확인하실 수 있습니다.\n"
+"그리고, R 또는 R 패키지들을 출판물에 인용하는 방법에 대해서는 'citation()'을 통해 확인하시길 부탁드립니다.\n"
 "\n"
 
 #: src/main/version.c:43
@@ -6351,21 +6258,11 @@ msgid ""
 "Type 'q()' to quit R.\n"
 "\n"
 msgstr ""
-"'demo()'를 입력하신다면 몇가지 데모를 보실 수 있으며, 'help()'를 입력하시면 "
-"온라인 도움말을 이용하실 수 있습니다.\n"
-"또한, 'help.start()'의 입력을 통하여 HTML 브라우저에 의한 도움말을 사용하실"
-"수 있습니다\n"
+"'demo()'를 입력하신다면 몇가지 데모를 보실 수 있으며, 'help()'를 입력하시면 온라인 도움말을 이용하실 수 있습니다.\n"
+"또한, 'help.start()'의 입력을 통하여 HTML 브라우저에 의한 도움말을 사용하실수 있습니다\n"
 "R의 종료를 원하시면 'q()'을 입력해주세요.\n"
 "\n"
 
-#: src/main/vfonts.c:50
-msgid "vfont routines cannot be accessed in module"
-msgstr "vfont 루틴들은 이 모듈내에서 접근되어질 수 없습니다"
-
-#: src/main/vfonts.c:67 src/main/vfonts.c:80 src/main/vfonts.c:98
-msgid "Hershey fonts cannot be loaded"
-msgstr "Hershey 글꼴들은 로드되어질 수 없습니다"
-
 #: src/main/xspline.c:60
 #, c-format
 msgid "add_point - reached MAXNUMPTS (%d)"
@@ -6387,7 +6284,7 @@ msgstr "최소한 네개의 컨트롤 포인트들이 필요합니다"
 msgid "There must be at least three control points"
 msgstr "최소한 세개의 컨트롤 포인트들이 필요합니다"
 
-#: src/modules/X11/dataentry.c:1871 src/modules/X11/devX11.c:1246
+#: src/modules/X11/dataentry.c:1874 src/modules/X11/devX11.c:1248
 #, c-format
 msgid "X11 protocol error: %s"
 msgstr ""
@@ -6408,34 +6305,32 @@ msgid ""
 "Consider using X11 with colortype=\"pseudo.cube\" or \"gray\"."
 msgstr ""
 
-#: src/modules/X11/devX11.c:1027
+#: src/modules/X11/devX11.c:1029
 msgid ""
 "could not find any X11 fonts\n"
 "Check that the Font Path is correct."
 msgstr ""
 
-#: src/modules/X11/devX11.c:1087
+#: src/modules/X11/devX11.c:1089
 #, c-format
 msgid "X11 used font size %d when %d was requested"
 msgstr "%2$d가 요청되었을 때 X11은 글꼴 크기 %1$d를 이용합니다"
 
-#: src/modules/X11/devX11.c:1121
+#: src/modules/X11/devX11.c:1123
 #, c-format
 msgid "X11 font %s, face %d at size %d could not be loaded"
 msgstr ""
 
-#: src/modules/X11/devX11.c:1130
-msgid ""
-"semi-transparency is not supported on this device: reported only once per "
-"page"
+#: src/modules/X11/devX11.c:1132
+msgid "semi-transparency is not supported on this device: reported only once per page"
 msgstr ""
 
-#: src/modules/X11/devX11.c:1254
+#: src/modules/X11/devX11.c:1256
 #, c-format
 msgid "X11 I/O error while opening X11 connection to '%s'"
 msgstr "'%s'에 연결된 X11을 여는 동안에 X11 I/O 에러가 발생했습니다"
 
-#: src/modules/X11/devX11.c:1272
+#: src/modules/X11/devX11.c:1273
 msgid "X11 fatal IO error: please save work and shut down R"
 msgstr ""
 
@@ -6556,206 +6451,264 @@ msgstr "XImage를 생성할 수 없습니다"
 msgid "attempt to use the locator after dev.hold()"
 msgstr ""
 
-#: src/modules/X11/devX11.c:3111
+#: src/modules/X11/devX11.c:3117
 #, c-format
 msgid "unable to start device %s"
 msgstr "장치 %s를 시작할 수 없습니다"
 
-#: src/modules/X11/devX11.c:3138
+#: src/modules/X11/devX11.c:3144
 msgid "invalid 'width' or 'height'"
 msgstr "'width' 또는 'height'가 잘못되었습니다"
 
-#: src/modules/X11/devX11.c:3145
+#: src/modules/X11/devX11.c:3151
 msgid "invalid colortype passed to X11 driver"
 msgstr "올바르지 않은 컬러타입이 X11 장치에 전달되었습니다"
 
-#: src/modules/X11/devX11.c:3159
+#: src/modules/X11/devX11.c:3165
 msgid "unknown X11 color/colour model -- using monochrome"
 msgstr "알 수 없는 X11 색상모델입니다 -- 모노크롬을 이용합니다"
 
-#: src/modules/X11/devX11.c:3249
+#: src/modules/X11/devX11.c:3255
 msgid "no plot on device to save"
 msgstr "장치에 저장할 플랏이 없습니다"
 
-#: src/modules/X11/devX11.c:3251
+#: src/modules/X11/devX11.c:3257
 msgid "not an open X11cairo device"
 msgstr "X11cairo 장치를 열 수 없습니다"
 
-#: src/modules/X11/devX11.c:3260
+#: src/modules/X11/devX11.c:3266
 #, c-format
 msgid "cannot open file '%s'"
 msgstr "파일 '%s'를 열 수 없습니다"
 
-#: src/modules/X11/devX11.c:3277
+#: src/modules/X11/devX11.c:3283
 msgid "savePlot() is not supported on this build"
 msgstr "이 빌드에서는 savePlot()가 지원되지 않습니다"
 
-#: src/modules/X11/devX11.c:3317
+#: src/modules/X11/devX11.c:3323
 msgid "unable to contact X11 display"
 msgstr ""
 
-#: src/modules/X11/devX11.c:3366
+#: src/modules/X11/devX11.c:3372
 #, c-format
 msgid "clipboard cannot be read (error code %d)"
 msgstr "클립보드를 읽을 수 없습니다 (에러코드 %d입니다)"
 
-#: src/modules/X11/devX11.c:3397
+#: src/modules/X11/devX11.c:3408
 msgid "cannot allocate memory for X11Routines structure"
 msgstr "X11루틴 스트럭쳐들을 위한 메모리를 할당할 수 없습니다"
 
-#: src/modules/internet/internet.c:188 src/modules/internet/internet.c:192
-#: src/modules/internet/internet.c:198 src/modules/internet/internet.c:210
+#: src/modules/internet/internet.c:113
+msgid "for https:// URLs use method = \"wininet\""
+msgstr ""
+
+#: src/modules/internet/internet.c:153 src/modules/internet/internet.c:274
+#: src/modules/internet/internet.c:758
+#, c-format
+msgid "scheme not supported in URL '%s'"
+msgstr ""
+
+#: src/modules/internet/internet.c:348 src/modules/internet/internet.c:352
+#: src/modules/internet/internet.c:357 src/modules/internet/internet.c:381
+#: src/modules/internet/libcurl.c:791 src/modules/internet/libcurl.c:795
+#: src/modules/internet/libcurl.c:801 src/modules/internet/libcurl.c:814
+#: src/modules/internet/libcurl.c:822
 msgid "allocation of url connection failed"
 msgstr "url 커넥션 할당을 할 수 없습니다"
 
-#: src/modules/internet/internet.c:286
+#: src/modules/internet/internet.c:455
 msgid "only first element of 'url' argument used"
 msgstr "'url' 인자에서 오로지 첫번째 구성요소만이 사용되었습니다"
 
-#: src/modules/internet/internet.c:292
+#: src/modules/internet/internet.c:461
 msgid "only first element of 'destfile' argument used"
 msgstr "'destfile' 인자에서 오로지 첫번째 구성요소만이 사용되었습니다"
 
-#: src/modules/internet/internet.c:317
+#: src/modules/internet/internet.c:480 src/modules/internet/libcurl.c:499
 msgid "Download progress"
 msgstr "다운로드 진행"
 
-#: src/modules/internet/internet.c:339
+#: src/modules/internet/internet.c:502
 #, c-format
 msgid "cannot open URL '%s', reason '%s'"
 msgstr "URL '%s'를 열 수 없습니다.  그 이유는 '%s'입니다"
 
-#: src/modules/internet/internet.c:346 src/modules/internet/internet.c:372
-#: src/modules/internet/internet.c:474
+#: src/modules/internet/internet.c:509 src/modules/internet/internet.c:536
+#: src/modules/internet/internet.c:661
 #, c-format
 msgid "cannot open destfile '%s', reason '%s'"
 msgstr "'%1$s' 파일을 '%2$s' 이유로 열 수 없습니다"
 
-#: src/modules/internet/internet.c:377 src/modules/internet/internet.c:479
+#: src/modules/internet/internet.c:541 src/modules/internet/internet.c:666
+#: src/modules/internet/libcurl.c:530
 #, c-format
 msgid "trying URL '%s'\n"
 msgstr "URL '%s'을 시도합니다\n"
 
-#: src/modules/internet/internet.c:384 src/modules/internet/internet.c:486
-msgid "opened URL\n"
-msgstr "URL을 열었습니다\n"
-
-#: src/modules/internet/internet.c:455 src/modules/internet/internet.c:560
+#: src/modules/internet/internet.c:640 src/modules/internet/internet.c:751
+#: src/modules/internet/libcurl.c:578
 #, c-format
-msgid "downloaded length %d != reported length %d"
+msgid "downloaded length %0.f != reported length %0.f"
 msgstr ""
 
-#: src/modules/internet/internet.c:460 src/modules/internet/internet.c:565
+#: src/modules/internet/internet.c:645 src/modules/internet/internet.c:756
 #, c-format
 msgid "cannot open URL '%s'"
 msgstr "URL '%s'를 열 수 없습니다"
 
-#: src/modules/internet/internet.c:593 src/modules/internet/internet.c:828
+#: src/modules/internet/internet.c:779 src/modules/internet/internet.c:944
 #, c-format
-msgid "cannot open: HTTP status was '%d %s'"
+msgid "cannot open URL '%s': HTTP status was '%d %s'"
 msgstr ""
 
-#: src/modules/internet/internet.c:772 src/modules/internet/internet.c:935
-msgid "InternetOpenUrl timed out"
+#: src/modules/internet/internet.c:915 src/modules/internet/internet.c:929
+#: src/modules/internet/internet.c:1019 src/modules/internet/internet.c:1028
+#, c-format
+msgid "InternetOpenUrl failed: '%s'"
 msgstr ""
 
-#: src/modules/internet/internet.c:799 src/modules/internet/internet.c:813
-#: src/modules/internet/internet.c:957 src/modules/internet/internet.c:966
+#: src/modules/internet/libcurl.c:159
 #, c-format
-msgid "InternetOpenUrl failed: '%s'"
+msgid "URL '%s': status was '%d %s'"
+msgstr ""
+
+#: src/modules/internet/libcurl.c:163
+#, c-format
+msgid "URL '%s': status was '%s'"
+msgstr ""
+
+#: src/modules/internet/libcurl.c:240
+msgid "curlGetHeaders is not supported on this platform"
+msgstr "이 플랫폼에서는 curlGetHeaders를 사용할 수 없습니다."
+
+#: src/modules/internet/libcurl.c:249 src/modules/internet/libcurl.c:252
+#, c-format
+msgid "invalid %s argument"
+msgstr "인자 '%s'가 올바르지 않습니다."
+
+#: src/modules/internet/libcurl.c:269
+#, c-format
+msgid ""
+"libcurl error code %d\n"
+"\t%s\n"
 msgstr ""
 
-#: src/modules/internet/internet.c:870
-msgid "Internet read timed out"
+#: src/modules/internet/libcurl.c:404
+msgid "download.file(method = \"libcurl\") is not supported on this platform"
+msgstr "이 플랫폼에서는 download.file(method = \"libcurl\")를 사용할 수 없습니다."
+
+#: src/modules/internet/libcurl.c:420
+msgid "lengths of 'url' and 'destfile' must match"
+msgstr "'url'의 길이와 'destfile'의 길이는 일치해야 합니다."
+
+#: src/modules/internet/libcurl.c:481
+#, c-format
+msgid "URL %s: cannot open destfile '%s', reason '%s'"
 msgstr ""
 
-#: src/modules/internet/nanoftp.c:288 src/modules/internet/nanoftp.c:301
-#: src/modules/internet/nanoftp.c:312 src/modules/internet/nanoftp.c:346
-#: src/modules/internet/nanoftp.c:356
+#: src/modules/internet/libcurl.c:593
+msgid "cannot download all files"
+msgstr "모든 파일들을 다운로드 할 수 없습니다. "
+
+#: src/modules/internet/libcurl.c:727
+msgid "cannot read from connection"
+msgstr "이 커넥션으로부터 읽어올 수 없습니다."
+
+#: src/modules/internet/libcurl.c:763
+msgid "cannot open connection"
+msgstr "커넥션을 열 수 없습니다."
+
+#: src/modules/internet/libcurl.c:826
+msgid "url(method = \"libcurl\") is not supported on this platform"
+msgstr "이 플랫폼에서는 url(method = \"libcurl\")를 사용할 수 없습니다."
+
+#: src/modules/internet/nanoftp.c:289 src/modules/internet/nanoftp.c:302
+#: src/modules/internet/nanoftp.c:313 src/modules/internet/nanoftp.c:347
+#: src/modules/internet/nanoftp.c:357
 msgid "RxmlNanoFTPScanURL: overlong (invalid?) URL"
 msgstr ""
 
-#: src/modules/internet/nanoftp.c:389
+#: src/modules/internet/nanoftp.c:390
 msgid "removing FTP proxy info"
 msgstr "FTP proxy 정보를 제거합니다"
 
-#: src/modules/internet/nanoftp.c:391
+#: src/modules/internet/nanoftp.c:392
 #, c-format
 msgid "using FTP proxy '%s'"
 msgstr "FTP proxy '%s'를 이용합니다"
 
-#: src/modules/internet/nanoftp.c:402 src/modules/internet/nanoftp.c:431
+#: src/modules/internet/nanoftp.c:403 src/modules/internet/nanoftp.c:432
 msgid "RxmlNanoFTPScanProxy: overlong (invalid?) URL"
 msgstr ""
 
-#: src/modules/internet/nanoftp.c:830
+#: src/modules/internet/nanoftp.c:833
 msgid "cannot resolve host"
 msgstr ""
 
-#: src/modules/internet/nanoftp.c:860
+#: src/modules/internet/nanoftp.c:863
 msgid "failed to connect to server"
 msgstr "서버 접속에 실패했습니다"
 
-#: src/modules/internet/nanoftp.c:871
+#: src/modules/internet/nanoftp.c:874
 msgid "failed to get response from server"
 msgstr "서버로부터 응답을 받는데 실패했습니다"
 
-#: src/modules/internet/nanoftp.c:1134
+#: src/modules/internet/nanoftp.c:1137
 msgid "RxmlNanoFTPGetConnection: failed to create socket"
 msgstr ""
 
-#: src/modules/internet/nanoftp.c:1180
+#: src/modules/internet/nanoftp.c:1183
 msgid "failed to create a data connection"
 msgstr "데이터 커넥션 생성에 실패했습니다"
 
-#: src/modules/internet/nanoftp.c:1188
+#: src/modules/internet/nanoftp.c:1191
 msgid "failed to bind a port"
 msgstr "포트를 바인드 하는데 실패했습니다"
 
-#: src/modules/internet/nanoftp.c:1195
+#: src/modules/internet/nanoftp.c:1198
 #, c-format
 msgid "could not listen on port %d"
 msgstr ""
 
-#: src/modules/internet/nanohttp.c:370 src/modules/internet/nanohttp.c:398
-#: src/modules/internet/nanohttp.c:407
+#: src/modules/internet/nanohttp.c:369 src/modules/internet/nanohttp.c:400
+#: src/modules/internet/nanohttp.c:412
 msgid "RxmlNanoHTTPScanURL: overlong (invalid?) URL"
 msgstr ""
 
-#: src/modules/internet/nanohttp.c:441
+#: src/modules/internet/nanohttp.c:446
 msgid "removing HTTP proxy info"
 msgstr "HTTP proxy 정보를 제거합니다"
 
-#: src/modules/internet/nanohttp.c:443
+#: src/modules/internet/nanohttp.c:448
 #, c-format
 msgid "using HTTP proxy '%s'"
 msgstr "HTTP proxy '%s'를 이용합니다"
 
-#: src/modules/internet/nanohttp.c:454 src/modules/internet/nanohttp.c:490
+#: src/modules/internet/nanohttp.c:459 src/modules/internet/nanohttp.c:497
 msgid "RxmlNanoHTTPScanProxy: overlong (invalid?) URL"
 msgstr ""
 
-#: src/modules/internet/nanohttp.c:1107
+#: src/modules/internet/nanohttp.c:1135
 #, c-format
 msgid "unable to resolve '%s'"
 msgstr ""
 
-#: src/modules/internet/nanohttp.c:1134
+#: src/modules/internet/nanohttp.c:1168
 #, c-format
 msgid "connected to '%s' on port %d."
 msgstr "포트 %2$d에서 '%1$s'에 연결했습니다."
 
-#: src/modules/internet/nanohttp.c:1139
+#: src/modules/internet/nanohttp.c:1173
 #, c-format
 msgid "unable to connect to '%s' on port %d."
 msgstr "포트 %2$d에서 '%1$s' 연결 할 수 없습니다."
 
-#: src/modules/internet/nanohttp.c:1443
+#: src/modules/internet/nanohttp.c:1477
 #, c-format
 msgid "redirect to: '%s'"
 msgstr "다음으로 리다이렉트 합니다: '%s'"
 
-#: src/modules/internet/nanohttp.c:1454
+#: src/modules/internet/nanohttp.c:1488
 msgid "too many redirects, aborting ..."
 msgstr "너무 많은 리다이렉션이 있어, 다음 ...을 중단합니다"
 
@@ -6772,8 +6725,7 @@ msgstr "인자 type[1]='%s' 은 반드시 길이가 1인 문자열이어야 합
 #: src/modules/lapack/Lapack.c:56
 #, c-format
 msgid "argument type[1]='%s' must be one of 'M','1','O','I','F' or 'E'"
-msgstr ""
-"인자 type[1]='%s'은 반드시 'M','1','O','I','F' 또는 'E' 중 하나이어야 합니다"
+msgstr "인자 type[1]='%s'은 반드시 'M','1','O','I','F' 또는 'E' 중 하나이어야 합니다"
 
 #: src/modules/lapack/Lapack.c:73
 #, c-format
@@ -6789,11 +6741,11 @@ msgstr "인자 type[1]='%s'는 반드시 '1','O', 또는 'I' 하나 이어야 
 #: src/modules/lapack/Lapack.c:730 src/modules/lapack/Lapack.c:779
 #: src/modules/lapack/Lapack.c:786 src/modules/lapack/Lapack.c:834
 #: src/modules/lapack/Lapack.c:840 src/modules/lapack/Lapack.c:894
-#: src/modules/lapack/Lapack.c:900 src/modules/lapack/Lapack.c:1134
-#: src/modules/lapack/Lapack.c:1140 src/modules/lapack/Lapack.c:1188
-#: src/modules/lapack/Lapack.c:1195 src/modules/lapack/Lapack.c:1199
-#: src/modules/lapack/Lapack.c:1227 src/modules/lapack/Lapack.c:1234
-#: src/modules/lapack/Lapack.c:1254
+#: src/modules/lapack/Lapack.c:900 src/modules/lapack/Lapack.c:1135
+#: src/modules/lapack/Lapack.c:1141 src/modules/lapack/Lapack.c:1189
+#: src/modules/lapack/Lapack.c:1196 src/modules/lapack/Lapack.c:1200
+#: src/modules/lapack/Lapack.c:1228 src/modules/lapack/Lapack.c:1235
+#: src/modules/lapack/Lapack.c:1255
 #, c-format
 msgid "error code %d from Lapack routine '%s'"
 msgstr ""
@@ -6873,28 +6825,28 @@ msgstr "Lapack의 함수 'ztrcon()'로부터 에러 [%d]가 발생했습니다"
 msgid "'a' must be a complex matrix"
 msgstr "'a'는 반드시 복소수 행렬이어야 합니다"
 
-#: src/modules/lapack/Lapack.c:535 src/modules/lapack/Lapack.c:1042
+#: src/modules/lapack/Lapack.c:535 src/modules/lapack/Lapack.c:1043
 msgid "'a' is 0-diml"
 msgstr ""
 
-#: src/modules/lapack/Lapack.c:537 src/modules/lapack/Lapack.c:1044
+#: src/modules/lapack/Lapack.c:537 src/modules/lapack/Lapack.c:1045
 #, c-format
 msgid "'a' (%d x %d) must be square"
 msgstr "'a'은 반드시 %d 행 %d열의 정방행렬이어야 합니다"
 
-#: src/modules/lapack/Lapack.c:543 src/modules/lapack/Lapack.c:1050
+#: src/modules/lapack/Lapack.c:543 src/modules/lapack/Lapack.c:1051
 msgid "no right-hand side in 'b'"
 msgstr "'b'에 우변이 없습니다"
 
 #: src/modules/lapack/Lapack.c:546 src/modules/lapack/Lapack.c:560
-#: src/modules/lapack/Lapack.c:1053 src/modules/lapack/Lapack.c:1069
+#: src/modules/lapack/Lapack.c:1054 src/modules/lapack/Lapack.c:1070
 #, c-format
 msgid "'b' (%d x %d) must be compatible with 'a' (%d x %d)"
 msgstr "'b' (%d x %d) 는 반드시 'a' (%d x %d) 와 호환되어야 합니다"
 
 #: src/modules/lapack/Lapack.c:581 src/modules/lapack/Lapack.c:948
-#: src/modules/lapack/Lapack.c:962 src/modules/lapack/Lapack.c:1017
-#: src/modules/lapack/Lapack.c:1091
+#: src/modules/lapack/Lapack.c:962 src/modules/lapack/Lapack.c:1018
+#: src/modules/lapack/Lapack.c:1092
 #, c-format
 msgid "argument %d of Lapack routine %s had invalid value"
 msgstr ""
@@ -6904,7 +6856,7 @@ msgid "'b' must be a complex matrix"
 msgstr "'b'는 반드시 복소수 행렬이어야 합니다"
 
 #: src/modules/lapack/Lapack.c:670 src/modules/lapack/Lapack.c:716
-#: src/modules/lapack/Lapack.c:1181 src/modules/lapack/Lapack.c:1220
+#: src/modules/lapack/Lapack.c:1182 src/modules/lapack/Lapack.c:1221
 #, c-format
 msgid "right-hand side should have %d not %d rows"
 msgstr ""
@@ -6921,13 +6873,13 @@ msgstr "2^31 이상의 구성원소를 가지는 행렬은 지원되지 않습
 msgid "'x' must be a square complex matrix"
 msgstr "'x'은 반드시 복소수형 정방행렬이어야 합니다"
 
-#: src/modules/lapack/Lapack.c:926 src/modules/lapack/Lapack.c:1000
-#: src/modules/lapack/Lapack.c:1039 src/modules/lapack/Lapack.c:1114
-#: src/modules/lapack/Lapack.c:1245
+#: src/modules/lapack/Lapack.c:926 src/modules/lapack/Lapack.c:1001
+#: src/modules/lapack/Lapack.c:1040 src/modules/lapack/Lapack.c:1115
+#: src/modules/lapack/Lapack.c:1246
 msgid "'a' must be a numeric matrix"
 msgstr "'a'는 수치형 행렬이어야 합니다"
 
-#: src/modules/lapack/Lapack.c:933 src/modules/lapack/Lapack.c:1250
+#: src/modules/lapack/Lapack.c:933 src/modules/lapack/Lapack.c:1251
 msgid "'a' must be a square matrix"
 msgstr "'a'는 반드시 정방행렬이어야 합니다"
 
@@ -6944,40 +6896,40 @@ msgstr ""
 msgid "the matrix is either rank-deficient or indefinite"
 msgstr ""
 
-#: src/modules/lapack/Lapack.c:987
+#: src/modules/lapack/Lapack.c:988
 msgid "'size' argument must be a positive integer"
 msgstr "'size' 인자는 반드시 양의 정수이어야 합니다"
 
-#: src/modules/lapack/Lapack.c:1002
+#: src/modules/lapack/Lapack.c:1003
 #, c-format
 msgid "'size' cannot exceed ncol(x) = %d"
 msgstr "'size'는 열의 개수 %d를 초과할 수 없습니다"
 
-#: src/modules/lapack/Lapack.c:1003
+#: src/modules/lapack/Lapack.c:1004
 #, c-format
 msgid "'size' cannot exceed nrow(x) = %d"
 msgstr "'size'는 행의 개수 %d를 초과할 수 없습니다"
 
-#: src/modules/lapack/Lapack.c:1015
+#: src/modules/lapack/Lapack.c:1016
 #, c-format
 msgid "element (%d, %d) is zero, so the inverse cannot be computed"
 msgstr "구성요소 (%d, %d)는 영이기 때문에 인버스를 계산할 수 없습니다"
 
-#: src/modules/lapack/Lapack.c:1094
+#: src/modules/lapack/Lapack.c:1095
 #, c-format
 msgid "Lapack routine %s: system is exactly singular: U[%d,%d] = 0"
 msgstr ""
 
-#: src/modules/lapack/Lapack.c:1102
+#: src/modules/lapack/Lapack.c:1103
 #, c-format
 msgid "system is computationally singular: reciprocal condition number = %g"
 msgstr ""
 
-#: src/modules/lapack/Lapack.c:1174 src/modules/lapack/Lapack.c:1212
+#: src/modules/lapack/Lapack.c:1175 src/modules/lapack/Lapack.c:1213
 msgid "'b' must be a numeric matrix"
 msgstr "'b'는 반드시 수치형 행렬이어야 합니다"
 
-#: src/modules/lapack/Lapack.c:1246
+#: src/modules/lapack/Lapack.c:1247
 msgid "argument 'logarithm' must be logical"
 msgstr "'logarithm' 인자는 반드시 논리적이어야 합니다"
 
@@ -6987,27 +6939,29 @@ msgstr "bessel_i 할당 에러입니다"
 
 #: src/nmath/bessel_i.c:77 src/nmath/bessel_i.c:122
 #, c-format
-msgid "bessel_i(%g): ncalc (=%ld) != nb (=%ld); alpha=%g. Arg. out of range?\n"
+msgid "bessel_i(%g): ncalc (=%d) != nb (=%d); alpha=%g. Arg. out of range?\n"
 msgstr ""
-"bessel_i(%g): ncalc (=%ld) != nb (=%ld); alpha=%g. 인자가 범위 밖에 있나요?\n"
 
 #: src/nmath/bessel_i.c:80 src/nmath/bessel_i.c:125
 #, c-format
 msgid "bessel_i(%g,nu=%g): precision lost in result\n"
 msgstr "bessel_i(%g,nu=%g): 결과가 정밀하지 않습니다\n"
 
-#: src/nmath/bessel_j.c:67
+#: src/nmath/bessel_j.c:64 src/nmath/bessel_j.c:118
+#, c-format
+msgid "besselJ(x, nu): nu=%g too large for bessel_j() algorithm"
+msgstr ""
+
+#: src/nmath/bessel_j.c:72
 msgid "bessel_j allocation error"
 msgstr "bessel_j 할당 에러입니다"
 
-#: src/nmath/bessel_j.c:75 src/nmath/bessel_j.c:118
+#: src/nmath/bessel_j.c:80 src/nmath/bessel_j.c:127
 #, c-format
-msgid "bessel_j(%g): ncalc (=%ld) != nb (=%ld); alpha=%g. Arg. out of range?\n"
+msgid "bessel_j(%g): ncalc (=%d) != nb (=%d); alpha=%g. Arg. out of range?\n"
 msgstr ""
-"bessel_j(%g): ncalc (=%ld) != nb (=%ld); alpha=%g. Arg. 인자가 범위 밖에 있나"
-"요?\n"
 
-#: src/nmath/bessel_j.c:78 src/nmath/bessel_j.c:121
+#: src/nmath/bessel_j.c:83 src/nmath/bessel_j.c:130
 #, c-format
 msgid "bessel_j(%g,nu=%g): precision lost in result\n"
 msgstr "bessel_j(%g,nu=%g): 결과가 정밀하지 않습니다\n"
@@ -7018,26 +6972,29 @@ msgstr "bessel_k 할당 에러"
 
 #: src/nmath/bessel_k.c:71 src/nmath/bessel_k.c:108
 #, c-format
-msgid "bessel_k(%g): ncalc (=%ld) != nb (=%ld); alpha=%g. Arg. out of range?\n"
+msgid "bessel_k(%g): ncalc (=%d) != nb (=%d); alpha=%g. Arg. out of range?\n"
 msgstr ""
-"bessel_k(%g): ncalc (=%ld) != nb (=%ld); alpha=%g. 인자가 범위 밖에 있나요?\n"
 
 #: src/nmath/bessel_k.c:74 src/nmath/bessel_k.c:111
 #, c-format
 msgid "bessel_k(%g,nu=%g): precision lost in result\n"
 msgstr "bessel_k(%g,nu=%g): 결과가 정밀하지 않습니다\n"
 
-#: src/nmath/bessel_y.c:66
+#: src/nmath/bessel_y.c:63 src/nmath/bessel_y.c:125
+#, c-format
+msgid "besselY(x, nu): nu=%g too large for bessel_y() algorithm"
+msgstr ""
+
+#: src/nmath/bessel_y.c:71
 msgid "bessel_y allocation error"
 msgstr "bessel_y 할당 에러입니다"
 
-#: src/nmath/bessel_y.c:82 src/nmath/bessel_y.c:127
+#: src/nmath/bessel_y.c:87 src/nmath/bessel_y.c:136
 #, c-format
-msgid "bessel_y(%g): ncalc (=%ld) != nb (=%ld); alpha=%g. Arg. out of range?\n"
+msgid "bessel_y(%g): ncalc (=%d) != nb (=%d); alpha=%g. Arg. out of range?\n"
 msgstr ""
-"bessel_y(%g): ncalc (=%ld) != nb (=%ld); alpha=%g. 인자가 범위 밖에 있나요?\n"
 
-#: src/nmath/bessel_y.c:85 src/nmath/bessel_y.c:130
+#: src/nmath/bessel_y.c:90 src/nmath/bessel_y.c:139
 #, c-format
 msgid "bessel_y(%g,nu=%g): precision lost in result\n"
 msgstr "bessel_y(%g,nu=%g): 결과가 정밀하지 않습니다\n"
@@ -7047,55 +7004,59 @@ msgstr "bessel_y(%g,nu=%g): 결과가 정밀하지 않습니다\n"
 msgid "'k' (%.2f) must be integer, rounded to %.0f"
 msgstr "'k' (%.2f)는 반드시 정수이어야 하므로, %.0f로 반올림되었습니다"
 
-#: src/nmath/nmath.h:141
+#: src/nmath/nmath.h:156
 #, c-format
 msgid "argument out of domain in '%s'\n"
 msgstr ""
 
-#: src/nmath/nmath.h:144
+#: src/nmath/nmath.h:159
 #, c-format
 msgid "value out of range in '%s'\n"
 msgstr ""
 
-#: src/nmath/nmath.h:147
+#: src/nmath/nmath.h:162
 #, c-format
 msgid "convergence failed in '%s'\n"
 msgstr ""
 
-#: src/nmath/nmath.h:150
+#: src/nmath/nmath.h:165
 #, c-format
 msgid "full precision may not have been achieved in '%s'\n"
 msgstr ""
 
-#: src/nmath/nmath.h:153
+#: src/nmath/nmath.h:168
 #, c-format
 msgid "underflow occurred in '%s'\n"
 msgstr "'%s'에서 언더플로우가 발생했습니다\n"
 
-#: src/nmath/pbeta.c:48
+# added on 28-MAR-2013
+#: src/nmath/pbeta.c:64
 #, c-format
-msgid "pbeta_raw() -> bratio() gave error code %d"
-msgstr ""
+msgid "pbeta_raw(%g, a=%g, b=%g, ..) -> bratio() gave error code %d"
+msgstr "pbeta_raw(%g, a=%g, b=%g, ..) -> bratio()은 에러코드 %d를 주었습니다."
 
-#: src/nmath/pnbinom.c:79
+# added on 28-MAR-2013
+#: src/nmath/pnbinom.c:82
 #, c-format
 msgid "pnbinom_mu() -> bratio() gave error code %d"
-msgstr ""
+msgstr "pnbinom_mu() -> bratio()는 에러코드 %d를 주었습니다."
 
-#: src/nmath/pnchisq.c:246
+#: src/nmath/pnchisq.c:295
 #, c-format
 msgid "pnchisq(x=%g, ..): not converged in %d iter."
 msgstr "pnchisq(x=%g, ..): %d 번째 반복에서 수렴하지 않습니다."
 
+# added on 28-MAR-2013
 #: src/nmath/polygamma.c:499
 #, c-format
 msgid "deriv = %d > %d (= n_max)\n"
-msgstr ""
+msgstr "deriv = %d > %d (= n_max)\n"
 
+# added on 28-MAR-2013
 #: src/nmath/rmultinom.c:78
 #, c-format
 msgid "rbinom: probability sum should be 1, but is %g"
-msgstr ""
+msgstr "rbinom: 모든 확률값들의 합은 1이어야 하는데 %g 입니다."
 
 #: src/nmath/signrank.c:77
 msgid "signrank allocation error"
@@ -7112,9 +7073,10 @@ msgstr ""
 msgid "wilcox allocation error %d"
 msgstr ""
 
+# updated on 28-MAR-2013
 #: src/unix/X11.c:54
 msgid "X11 module is not available under this GUI"
-msgstr "X11 모듈은 현재의 GUI 내에서는 이용할 수 없습니다"
+msgstr "X11 모듈은 현재 이용중인 그래픽 사용자 인터페이스에서는 사용할 수 없습니다."
 
 #: src/unix/X11.c:60
 msgid "X11 routines cannot be accessed in module"
@@ -7124,33 +7086,27 @@ msgstr "X11 루틴들이 이 모듈내에서는 접근되어질 수 없습니다
 msgid "X11 module cannot be loaded"
 msgstr "X11 모듈이 로드되어질 수 없습니다"
 
-#: src/unix/X11.c:126 src/unix/X11.c:132 src/unix/X11.c:138 src/unix/X11.c:144
+#: src/unix/X11.c:144 src/unix/X11.c:150 src/unix/X11.c:156 src/unix/X11.c:162
 msgid "X11 is not available"
 msgstr "X11을 사용할 수 없습니다"
 
 #: src/unix/dynload.c:143
-msgid ""
-"Explicit local dynamic loading not supported on this platform. Using default."
+msgid "Explicit local dynamic loading not supported on this platform. Using default."
 msgstr ""
 
 #: src/unix/dynload.c:144
-msgid ""
-"Explicit global dynamic loading not supported on this platform. Using "
-"default."
+msgid "Explicit global dynamic loading not supported on this platform. Using default."
 msgstr ""
 
 #: src/unix/dynload.c:145
-msgid ""
-"Explicit non-lazy dynamic loading not supported on this platform. Using "
-"default."
+msgid "Explicit non-lazy dynamic loading not supported on this platform. Using default."
 msgstr ""
 
 #: src/unix/dynload.c:146
-msgid ""
-"Explicit lazy dynamic loading not supported on this platform. Using default."
+msgid "Explicit lazy dynamic loading not supported on this platform. Using default."
 msgstr ""
 
-#: src/unix/dynload.c:240
+#: src/unix/dynload.c:232
 msgid "cannot get working directory!"
 msgstr "작업 디렉토리를 얻을 수 없습니다!"
 
@@ -7159,17 +7115,15 @@ msgid "interrupt handler must not return"
 msgstr ""
 
 #: src/unix/sys-std.c:521
-msgid ""
-"An unusual circumstance has arisen in the nesting of readline input. Please "
-"report using bug.report()"
+msgid "An unusual circumstance has arisen in the nesting of readline input. Please report using bug.report()"
 msgstr ""
 
-#: src/unix/sys-std.c:1082 src/unix/sys-std.c:1249
+#: src/unix/sys-std.c:1085 src/unix/sys-std.c:1255
 #, c-format
 msgid "problem in saving the history file '%s'"
 msgstr "작업기록 파일 '%s'를 저장하는데 문제가 발생했습니다"
 
-#: src/unix/sys-std.c:1156
+#: src/unix/sys-std.c:1162
 #, c-format
 msgid ""
 "Cannot open file '%s': %s\n"
@@ -7178,84 +7132,214 @@ msgstr ""
 "파일 '%s'를 열 수 없습니다: %s\n"
 "\n"
 
-#: src/unix/sys-std.c:1220 src/unix/sys-std.c:1243
+#: src/unix/sys-std.c:1226 src/unix/sys-std.c:1249
 msgid "'file' argument is too long"
 msgstr "'file' 인자가 너무 깁니다"
 
-#: src/unix/sys-std.c:1226 src/unix/sys-std.c:1228
+#: src/unix/sys-std.c:1232 src/unix/sys-std.c:1234
 msgid "no history mechanism available"
 msgstr "히스토리 메카니즘을 이용할 수 없습니다"
 
-#: src/unix/sys-std.c:1255
+#: src/unix/sys-std.c:1261
 msgid "problem in truncating the history file"
 msgstr "히스토리 파일을 잘라내는 도중 문제가 발생했습니다"
 
-#: src/unix/sys-std.c:1257 src/unix/sys-std.c:1259
+#: src/unix/sys-std.c:1263 src/unix/sys-std.c:1265
 msgid "no history available to save"
 msgstr "저장할 히스토리가 없습니다"
 
-#: src/unix/sys-std.c:1271
+#: src/unix/sys-std.c:1277
 msgid "invalid timestamp"
 msgstr "타임스탬프가 잘못되었습니다"
 
-#: src/unix/sys-unix.c:251
+#: src/unix/sys-unix.c:248
 msgid "non-empty character argument expected"
 msgstr "비어있지 않은 문자형 인자가 와야합니다"
 
-#: src/unix/sys-unix.c:254
+#: src/unix/sys-unix.c:251
 msgid "'intern' must be logical and not NA"
 msgstr "'intern'은 반드시 논리적이어야 하며 NA이어서는 안됩니다"
 
-#: src/unix/sys-unix.c:266
+#: src/unix/sys-unix.c:269
 #, c-format
 msgid "cannot popen '%s', probable reason '%s'"
 msgstr "'%s'을 열 수 없습니다, 아마도 '%s'이기 때문입니다"
 
-#: src/unix/sys-unix.c:271
+#: src/unix/sys-unix.c:279
 #, c-format
 msgid "line %d may be truncated in call to system(, intern = TRUE)"
 msgstr ""
 
-#: src/unix/sys-unix.c:288
+# QC: PASS
+#: src/unix/sys-unix.c:301
 #, c-format
 msgid "error in running command: '%s'"
-msgstr "다음 명령어를 실행하는데 에러가 발생하였습니다: '%s'"
+msgstr "다음의 명령을 실행하는 도중 에러가 발생했습니다: '%s'"
 
-#: src/unix/sys-unix.c:290
+#: src/unix/sys-unix.c:303
 msgid "error in running command"
-msgstr "명령을 실행하는 도중 에러가 발생하였습니다"
+msgstr "명령을 실행하는 도중 에러가 발생하였습니다."
 
-#: src/unix/sys-unix.c:294
+#: src/unix/sys-unix.c:307
 #, c-format
 msgid "running command '%s' had status %d and error message '%s'"
 msgstr "명령 '%s'의 실행으로 상태 %d가 되고, 에러 메시지 '%s'를 가집니다"
 
-#: src/unix/sys-unix.c:399
+#: src/unix/sys-unix.c:412
 msgid "Sys.info() is not implemented on this system"
 msgstr "이 시스템에서 Sys.info()는 구현되지 않았습니다"
 
-#: src/unix/system.c:257
+#: src/unix/system.c:267
 #, c-format
 msgid "WARNING: --gui or -g without value ignored"
 msgstr ""
 
-#: src/unix/system.c:275
+# updated on 28-MAR-2013
+#: src/unix/system.c:285
 #, c-format
 msgid "WARNING: unknown gui '%s', using X11\n"
-msgstr "경고: 알수없는 gui '%s'이므로 X11을 사용합니다\n"
+msgstr "경고: '%s'는 알 수 없는 그래픽 사용자 인터페이스 (gui)이므로 X11을 사용합니다.\n"
 
-#: src/unix/system.c:278
+# updated on 28-MAR-2013
+#: src/unix/system.c:288
 #, c-format
 msgid "WARNING: unknown gui '%s', using none\n"
-msgstr "경고: 알 수 없는 gui '%s'이므로, 아무것도 사용하지 않습니다\n"
+msgstr "경고: '%s'는 알 수 없는 그래픽 사용자 인터페이스 (gui)이므로 아무것도 사용하지 않습니다.\n"
 
-#: src/unix/system.c:388
+#: src/unix/system.c:373
 msgid "creating temporary file for '-e' failed"
 msgstr ""
 
-#: src/unix/system.c:469
+#: src/unix/system.c:454
 msgid "WARNING: Only editing the first in the list of files"
 msgstr "경고: 파일들의 목록에서 오로지 첫번째 것만을 편집합니다"
 
+#~ msgid "number of characters is not computable for element %d in \"bytes\" encoding"
+#~ msgstr "요소 %d에 대한 글자의 개수를 \"bytes\" 인코딩으로는 계산을 할 수 없습니다"
+
+#~ msgid "width is not computable for element %d in \"bytes\" encoding"
+#~ msgstr "요소 %d에 대한 너비를 \"bytes\" 인코딩으로는 계산을 할 수 없습니다"
+
+#~ msgid "'what' must be a character string or a function"
+#~ msgstr "'what'은 반드시 문자열 또는 함수이어야 합니다"
+
+#~ msgid "sockets are not available on this system"
+#~ msgstr "이 시스템에서는 소켓을 사용할 수 없습니다"
+
+#~ msgid "no function to restart"
+#~ msgstr "재시작을 할 함수가 없습니다"
+
+#~ msgid "argument must be a closure"
+#~ msgstr "인자는 반드시 클로우져이어야 합니다"
+
+#~ msgid "'hostname' must be a character vector of length 1"
+#~ msgstr "'hostname'은 반드시 길이가 1인 문자형 벡터이어야 합니다"
+
+#~ msgid "unknown format returned by C function 'gethostbyname'"
+#~ msgstr "알수 없는 형식이 C로 작성된 함수 'gethostbyname'에 의하여 반환되었습니다"
+
+#~ msgid "nsl() is not supported on this platform"
+#~ msgstr "이 플랫폼에서는 nsl()가 지원되지 않습니다"
+
+#~ msgid "attempt to select more than one element"
+#~ msgstr "한 개 이상의 구성요소 선택을 시도합니다"
+
+#~ msgid "non-numeric argument"
+#~ msgstr "수치형 인자가 아닙니다"
+
+#~ msgid "'x' must be a list of NULL or raw vectors"
+#~ msgstr "'x'는 반드시 NULL 또는 벡터들로 구성된 리스트이어야 합니다"
+
+#~ msgid "unsupported URL scheme"
+#~ msgstr "지원되지 않는 URG scheme입니다"
+
+#~ msgid "bessel_i(%g): ncalc (=%ld) != nb (=%ld); alpha=%g. Arg. out of range?\n"
+#~ msgstr "bessel_i(%g): ncalc (=%ld) != nb (=%ld); alpha=%g. 인자가 범위 밖에 있나요?\n"
+
+#~ msgid "bessel_j(%g): ncalc (=%ld) != nb (=%ld); alpha=%g. Arg. out of range?\n"
+#~ msgstr "bessel_j(%g): ncalc (=%ld) != nb (=%ld); alpha=%g. Arg. 인자가 범위 밖에 있나요?\n"
+
+#~ msgid "bessel_k(%g): ncalc (=%ld) != nb (=%ld); alpha=%g. Arg. out of range?\n"
+#~ msgstr "bessel_k(%g): ncalc (=%ld) != nb (=%ld); alpha=%g. 인자가 범위 밖에 있나요?\n"
+
+#~ msgid "bessel_y(%g): ncalc (=%ld) != nb (=%ld); alpha=%g. Arg. out of range?\n"
+#~ msgstr "bessel_y(%g): ncalc (=%ld) != nb (=%ld); alpha=%g. 인자가 범위 밖에 있나요?\n"
+
+#~ msgid "'dimnames' must be a list"
+#~ msgstr "'dimnames'은 반드시 리스트이어야 합니다"
+
+#~ msgid "'args' must be a list"
+#~ msgstr "'args'는 반드시 리스트이어야 합니다"
+
+#~ msgid "binary operations require two arguments"
+#~ msgstr "바이너리 연산자는 두개의 인수들을 필요로 합니다"
+
+#~ msgid "opened URL\n"
+#~ msgstr "URL을 열었습니다\n"
+
+#~ msgid "internet routines were already initialized"
+#~ msgstr "인터넷 루틴들은 이미 초기화되어 있었습니다"
+
+#~ msgid "'msg1' must be a character string"
+#~ msgstr "'msg1'은 반드시 문자열이어야 합니다"
+
+#~ msgid "'msg2' must be a character string"
+#~ msgstr "'msg2'는 반드시 문자열이어야 합니다"
+
+#~ msgid "argument 'code' must be a character string"
+#~ msgstr "인자 'code'는 반드시 문자형이어야 합니다"
+
+#~ msgid "argument 'type' must be a character string"
+#~ msgstr "인자 'type'은 반드시 문자열이어야 합니다"
+
+#~ msgid "vfont routines cannot be accessed in module"
+#~ msgstr "vfont 루틴들은 이 모듈내에서 접근되어질 수 없습니다"
+
+#~ msgid "Hershey fonts cannot be loaded"
+#~ msgstr "Hershey 글꼴들은 로드되어질 수 없습니다"
+
+#~ msgid "invalid generic function in 'usemethod'"
+#~ msgstr "'usemethod'에 유효하지 않은 제네릭 함수가 있습니다"
+
+#~ msgid "'UseMethod' called from outside a function"
+#~ msgstr "함수 외부로부터 호출된 'UseMethod'입니다"
+
+#~ msgid "first argument must be a generic name"
+#~ msgstr "첫번째 인자는 반드시 제네릭명이어야 합니다"
+
+#~ msgid "explicit request not to duplicate arguments in call to '%s', but argument %d is of the wrong type (%d != %d)"
+#~ msgstr "'%1$s' 호출시에 중복된 인자들을 사용하지 말라는 요청에도 불구하고, 인자 %2$d의 타입이 잘못되었습니다 (%3$d != %4$d)"
+
+#~ msgid "character variables must be duplicated in .C/.Fortran"
+#~ msgstr "문자 변수들이 .C/.Fortran 내에서 중복되었음에 틀림없습니다"
+
+#~ msgid "call name too long in '%s'"
+#~ msgstr "'%s'에 있는 호출명이 너무 깁니다"
+
+#~ msgid "generic name too long in '%s'"
+#~ msgstr "'%s'에 있는 제네릭 이름이 너무 깁니다"
+
+#~ msgid "method name too long in '%s'"
+#~ msgstr "'%s'에 있는 메소드명이 너무 깁니다"
+
+#~ msgid "%d arguments passed to 'log' which requires 1 or 2"
+#~ msgstr "'log'함수는 1개 혹은 2개의 인자들을 필요로 하지만 %d개의 인자들이 전달되었습니다"
+
+#~ msgid ""
+#~ "Warning in %s :\n"
+#~ "  %s\n"
+#~ msgstr ""
+#~ "%s에서 다음과 같은 경고가 발생했습니다 :\n"
+#~ "  %s\n"
+
+#~ msgid "input"
+#~ msgstr "입력"
+
+#~ msgid "symbol"
+#~ msgstr "심볼"
+
+#~ msgid "assignment"
+#~ msgstr "대입"
+
 #~ msgid "negative value in 'x'"
 #~ msgstr "'x'에 음수의 값이 주어졌습니다"
diff --git a/src/library/base/po/nn.po b/src/library/base/po/nn.po
index d2e38ca..0df27c9 100644
--- a/src/library/base/po/nn.po
+++ b/src/library/base/po/nn.po
@@ -6,8 +6,8 @@
 msgid ""
 msgstr ""
 "Project-Id-Version: nn\n"
-"Report-Msgid-Bugs-To: bugs.r-project.org\n"
-"POT-Creation-Date: 2014-03-27 07:46+0000\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2016-04-01 10:28-0700\n"
 "PO-Revision-Date: 2011-02-18 09:09+0100\n"
 "Last-Translator: Karl Ove Hufthammer <karl at huftis.org>\n"
 "Language-Team: Norwegian Nynorsk <i18n-nn at lister.ping.uio.no>\n"
@@ -54,15 +54,15 @@ msgstr "Funksjonen kan ikkje evaluerast med startverdiane"
 msgid "unknown type in \"CG\" method of 'optim'"
 msgstr "ukjend type i CG-metoden til optim"
 
-#: src/appl/optim.c:665
+#: src/appl/optim.c:662
 msgid "REPORT must be > 0 (method = \"L-BFGS-B\")"
 msgstr "REPORT må vera positiv (method = \"L-BFGS-B\")"
 
-#: src/appl/optim.c:688
+#: src/appl/optim.c:685
 msgid "L-BFGS-B needs finite values of 'fn'"
 msgstr "L-BFGS-B krev endelege verdiar av «fn»"
 
-#: src/appl/optim.c:744
+#: src/appl/optim.c:741
 msgid "trace, REPORT must be >= 0 (method = \"SANN\")"
 msgstr "trace, REPORT må vera størren enn 0 (method = \"SANN\")"
 
@@ -127,122 +127,127 @@ msgstr "nekta tilgang til «%ls»"
 msgid "problem in displaying '%ls'"
 msgstr "feil ved vising av «%ls»"
 
-#: src/gnuwin32/extra.c:116 src/gnuwin32/extra.c:159 src/gnuwin32/extra.c:349
-#: src/gnuwin32/extra.c:577 src/gnuwin32/extra.c:602 src/main/agrep.c:131
-#: src/main/agrep.c:135 src/main/agrep.c:775 src/main/agrep.c:780
-#: src/main/apply.c:293 src/main/apply.c:295 src/main/apply.c:298
-#: src/main/array.c:87 src/main/array.c:1137 src/main/array.c:1263
-#: src/main/array.c:1265 src/main/array.c:1266 src/main/array.c:1592
-#: src/main/array.c:1594 src/main/array.c:1596 src/main/attrib.c:196
+#: src/gnuwin32/extra.c:116 src/gnuwin32/extra.c:158 src/gnuwin32/extra.c:348
+#: src/gnuwin32/extra.c:574 src/gnuwin32/extra.c:599 src/main/agrep.c:131
+#: src/main/agrep.c:135 src/main/agrep.c:776 src/main/agrep.c:781
+#: src/main/apply.c:330 src/main/apply.c:332 src/main/apply.c:335
+#: src/main/array.c:90 src/main/array.c:1272 src/main/array.c:1411
+#: src/main/array.c:1413 src/main/array.c:1414 src/main/array.c:1758
+#: src/main/array.c:1760 src/main/array.c:1762 src/main/attrib.c:190
 #: src/main/builtin.c:88 src/main/builtin.c:97 src/main/builtin.c:116
-#: src/main/builtin.c:118 src/main/builtin.c:147 src/main/builtin.c:534
-#: src/main/builtin.c:550 src/main/builtin.c:739 src/main/builtin.c:741
-#: src/main/builtin.c:743 src/main/character.c:139 src/main/character.c:142
-#: src/main/character.c:203 src/main/character.c:1037
-#: src/main/character.c:1041 src/main/character.c:1276
-#: src/main/character.c:1280 src/main/character.c:1341
-#: src/main/character.c:1344 src/main/connections.c:1217
-#: src/main/connections.c:1223 src/main/connections.c:1226
-#: src/main/connections.c:1230 src/main/connections.c:1375
-#: src/main/connections.c:1391 src/main/connections.c:1396
-#: src/main/connections.c:1996 src/main/connections.c:2002
-#: src/main/connections.c:2006 src/main/connections.c:2010
-#: src/main/connections.c:2015 src/main/connections.c:2665
-#: src/main/connections.c:2670 src/main/connections.c:2673
-#: src/main/connections.c:2676 src/main/connections.c:3057
-#: src/main/connections.c:3062 src/main/connections.c:3068
-#: src/main/connections.c:3071 src/main/connections.c:3075
-#: src/main/connections.c:3090 src/main/connections.c:3140
-#: src/main/connections.c:3145 src/main/connections.c:3149
-#: src/main/connections.c:3153 src/main/connections.c:3157
-#: src/main/connections.c:3163 src/main/connections.c:3210
-#: src/main/connections.c:3216 src/main/connections.c:3220
-#: src/main/connections.c:3270 src/main/connections.c:3273
-#: src/main/connections.c:3547 src/main/connections.c:3550
-#: src/main/connections.c:3553 src/main/connections.c:3559
-#: src/main/connections.c:3666 src/main/connections.c:3672
-#: src/main/connections.c:3675 src/main/connections.c:3826
-#: src/main/connections.c:3829 src/main/connections.c:3833
-#: src/main/connections.c:3836 src/main/connections.c:3956
-#: src/main/connections.c:4074 src/main/connections.c:4077
-#: src/main/connections.c:4414 src/main/connections.c:4439
-#: src/main/connections.c:4474 src/main/connections.c:4489
-#: src/main/connections.c:4497 src/main/connections.c:4523
-#: src/main/connections.c:4669 src/main/connections.c:4673
-#: src/main/connections.c:4801 src/main/connections.c:4803
-#: src/main/connections.c:4805 src/main/connections.c:4833
-#: src/main/connections.c:4965 src/main/connections.c:4991
-#: src/main/connections.c:4995 src/main/connections.c:4999
-#: src/main/connections.c:5003 src/main/context.c:596 src/main/context.c:605
-#: src/main/context.c:609 src/main/datetime.c:775 src/main/datetime.c:865
-#: src/main/datetime.c:867 src/main/datetime.c:871 src/main/datetime.c:1026
-#: src/main/datetime.c:1028 src/main/datetime.c:1232 src/main/debug.c:228
-#: src/main/deparse.c:397 src/main/dotcode.c:478 src/main/dotcode.c:482
-#: src/main/dotcode.c:487 src/main/dounzip.c:322 src/main/dounzip.c:329
-#: src/main/dounzip.c:339 src/main/dounzip.c:344 src/main/dounzip.c:348
-#: src/main/dounzip.c:352 src/main/envir.c:1618 src/main/envir.c:1621
-#: src/main/envir.c:1742 src/main/envir.c:1747 src/main/envir.c:1813
-#: src/main/envir.c:1829 src/main/envir.c:1835 src/main/envir.c:1932
-#: src/main/envir.c:1940 src/main/envir.c:1947 src/main/envir.c:1958
-#: src/main/envir.c:2172 src/main/envir.c:2293 src/main/envir.c:2552
-#: src/main/envir.c:2762 src/main/envir.c:2776 src/main/envir.c:2783
-#: src/main/envir.c:2799 src/main/envir.c:3367 src/main/errors.c:1030
-#: src/main/eval.c:397 src/main/eval.c:406 src/main/eval.c:409
-#: src/main/grep.c:767 src/main/grep.c:772 src/main/grep.c:1061
-#: src/main/grep.c:1063 src/main/grep.c:1065 src/main/grep.c:1510
-#: src/main/grep.c:1514 src/main/grep.c:1519 src/main/grep.c:2323
-#: src/main/grep.c:2328 src/main/grep.c:2621 src/main/grep.c:2626
-#: src/main/memory.c:3736 src/main/paste.c:96 src/main/paste.c:395
-#: src/main/paste.c:402 src/main/paste.c:409 src/main/paste.c:414
-#: src/main/paste.c:419 src/main/paste.c:424 src/main/paste.c:427
-#: src/main/paste.c:435 src/main/paste.c:601 src/main/paste.c:606
+#: src/main/builtin.c:118 src/main/builtin.c:149 src/main/builtin.c:569
+#: src/main/builtin.c:585 src/main/builtin.c:773 src/main/builtin.c:775
+#: src/main/builtin.c:777 src/main/character.c:239 src/main/character.c:242
+#: src/main/character.c:247 src/main/character.c:788 src/main/character.c:791
+#: src/main/character.c:1289 src/main/character.c:1293
+#: src/main/character.c:1528 src/main/character.c:1532
+#: src/main/character.c:1593 src/main/character.c:1596
+#: src/main/connections.c:1208 src/main/connections.c:1214
+#: src/main/connections.c:1217 src/main/connections.c:1221
+#: src/main/connections.c:1367 src/main/connections.c:1383
+#: src/main/connections.c:1388 src/main/connections.c:1989
+#: src/main/connections.c:1995 src/main/connections.c:1999
+#: src/main/connections.c:2003 src/main/connections.c:2008
+#: src/main/connections.c:2659 src/main/connections.c:2664
+#: src/main/connections.c:2667 src/main/connections.c:2670
+#: src/main/connections.c:3053 src/main/connections.c:3058
+#: src/main/connections.c:3064 src/main/connections.c:3067
+#: src/main/connections.c:3071 src/main/connections.c:3086
+#: src/main/connections.c:3135 src/main/connections.c:3140
+#: src/main/connections.c:3144 src/main/connections.c:3148
+#: src/main/connections.c:3152 src/main/connections.c:3158
+#: src/main/connections.c:3203 src/main/connections.c:3209
+#: src/main/connections.c:3213 src/main/connections.c:3264
+#: src/main/connections.c:3267 src/main/connections.c:3543
+#: src/main/connections.c:3546 src/main/connections.c:3549
+#: src/main/connections.c:3555 src/main/connections.c:3662
+#: src/main/connections.c:3668 src/main/connections.c:3671
+#: src/main/connections.c:3823 src/main/connections.c:3826
+#: src/main/connections.c:3830 src/main/connections.c:3833
+#: src/main/connections.c:3954 src/main/connections.c:4085
+#: src/main/connections.c:4088 src/main/connections.c:4425
+#: src/main/connections.c:4450 src/main/connections.c:4485
+#: src/main/connections.c:4500 src/main/connections.c:4508
+#: src/main/connections.c:4534 src/main/connections.c:4680
+#: src/main/connections.c:4684 src/main/connections.c:4814
+#: src/main/connections.c:4816 src/main/connections.c:4818
+#: src/main/connections.c:4846 src/main/connections.c:4980
+#: src/main/connections.c:5019 src/main/connections.c:5024
+#: src/main/connections.c:5029 src/main/connections.c:5050
+#: src/main/context.c:607 src/main/context.c:616 src/main/context.c:620
+#: src/main/datetime.c:781 src/main/datetime.c:869 src/main/datetime.c:872
+#: src/main/datetime.c:876 src/main/datetime.c:1043 src/main/datetime.c:1045
+#: src/main/datetime.c:1250 src/main/debug.c:245 src/main/deparse.c:408
+#: src/main/dotcode.c:496 src/main/dotcode.c:500 src/main/dotcode.c:505
+#: src/main/dounzip.c:323 src/main/dounzip.c:330 src/main/dounzip.c:340
+#: src/main/dounzip.c:345 src/main/dounzip.c:349 src/main/dounzip.c:353
+#: src/main/envir.c:1752 src/main/envir.c:1755 src/main/envir.c:1876
+#: src/main/envir.c:1881 src/main/envir.c:1945 src/main/envir.c:1961
+#: src/main/envir.c:1967 src/main/envir.c:2079 src/main/envir.c:2087
+#: src/main/envir.c:2094 src/main/envir.c:2105 src/main/envir.c:2337
+#: src/main/envir.c:2458 src/main/envir.c:2755 src/main/envir.c:3022
+#: src/main/envir.c:3036 src/main/envir.c:3043 src/main/envir.c:3059
+#: src/main/envir.c:3642 src/main/errors.c:1011 src/main/eval.c:454
+#: src/main/eval.c:463 src/main/eval.c:466 src/main/grep.c:780
+#: src/main/grep.c:785 src/main/grep.c:1079 src/main/grep.c:1081
+#: src/main/grep.c:1083 src/main/grep.c:1528 src/main/grep.c:1532
+#: src/main/grep.c:1537 src/main/grep.c:2345 src/main/grep.c:2350
+#: src/main/grep.c:2652 src/main/grep.c:2657 src/main/memory.c:3823
+#: src/main/paste.c:96 src/main/paste.c:392 src/main/paste.c:399
+#: src/main/paste.c:406 src/main/paste.c:411 src/main/paste.c:416
+#: src/main/paste.c:421 src/main/paste.c:424 src/main/paste.c:432
+#: src/main/paste.c:437 src/main/paste.c:619 src/main/paste.c:624
 #: src/main/platform.c:306 src/main/platform.c:308 src/main/platform.c:310
 #: src/main/platform.c:326 src/main/platform.c:337 src/main/platform.c:390
-#: src/main/platform.c:392 src/main/platform.c:705 src/main/platform.c:707
-#: src/main/platform.c:1064 src/main/platform.c:1070 src/main/platform.c:1073
-#: src/main/platform.c:1076 src/main/platform.c:1079 src/main/platform.c:1082
-#: src/main/platform.c:1085 src/main/platform.c:1088 src/main/platform.c:1185
-#: src/main/platform.c:1188 src/main/platform.c:1191 src/main/platform.c:1229
-#: src/main/platform.c:1286 src/main/platform.c:1289 src/main/platform.c:1498
-#: src/main/platform.c:1501 src/main/platform.c:1504 src/main/platform.c:1540
-#: src/main/platform.c:1543 src/main/platform.c:1546 src/main/platform.c:1629
-#: src/main/platform.c:1645 src/main/platform.c:1684 src/main/platform.c:1686
-#: src/main/platform.c:1757 src/main/platform.c:1841 src/main/platform.c:2116
-#: src/main/platform.c:2176 src/main/platform.c:2353 src/main/platform.c:2356
-#: src/main/platform.c:2359 src/main/platform.c:2362 src/main/platform.c:2365
-#: src/main/platform.c:2368 src/main/platform.c:2568 src/main/platform.c:2571
-#: src/main/platform.c:2574 src/main/platform.c:2577 src/main/platform.c:2580
-#: src/main/platform.c:2583 src/main/platform.c:2657 src/main/platform.c:2665
-#: src/main/platform.c:2701 src/main/platform.c:2751 src/main/print.c:242
-#: src/main/print.c:248 src/main/print.c:270 src/main/print.c:276
-#: src/main/print.c:283 src/main/random.c:478 src/main/random.c:482
-#: src/main/random.c:489 src/main/random.c:517 src/main/saveload.c:1950
-#: src/main/saveload.c:1953 src/main/saveload.c:1956 src/main/saveload.c:2072
-#: src/main/saveload.c:2252 src/main/saveload.c:2257 src/main/saveload.c:2260
+#: src/main/platform.c:392 src/main/platform.c:708 src/main/platform.c:710
+#: src/main/platform.c:800 src/main/platform.c:1138 src/main/platform.c:1144
+#: src/main/platform.c:1147 src/main/platform.c:1150 src/main/platform.c:1153
+#: src/main/platform.c:1156 src/main/platform.c:1159 src/main/platform.c:1162
+#: src/main/platform.c:1259 src/main/platform.c:1262 src/main/platform.c:1265
+#: src/main/platform.c:1303 src/main/platform.c:1361 src/main/platform.c:1364
+#: src/main/platform.c:1573 src/main/platform.c:1576 src/main/platform.c:1579
+#: src/main/platform.c:1615 src/main/platform.c:1618 src/main/platform.c:1621
+#: src/main/platform.c:1657 src/main/platform.c:1690 src/main/platform.c:1692
+#: src/main/platform.c:1763 src/main/platform.c:1848 src/main/platform.c:2089
+#: src/main/platform.c:2149 src/main/platform.c:2334 src/main/platform.c:2337
+#: src/main/platform.c:2340 src/main/platform.c:2343 src/main/platform.c:2346
+#: src/main/platform.c:2349 src/main/platform.c:2555 src/main/platform.c:2558
+#: src/main/platform.c:2561 src/main/platform.c:2564 src/main/platform.c:2567
+#: src/main/platform.c:2570 src/main/platform.c:2648 src/main/platform.c:2656
+#: src/main/platform.c:2692 src/main/platform.c:2742 src/main/print.c:235
+#: src/main/print.c:241 src/main/print.c:263 src/main/print.c:269
+#: src/main/print.c:276 src/main/random.c:470 src/main/random.c:474
+#: src/main/random.c:481 src/main/random.c:509 src/main/saveload.c:1952
+#: src/main/saveload.c:1955 src/main/saveload.c:1958 src/main/saveload.c:2074
+#: src/main/saveload.c:2254 src/main/saveload.c:2259 src/main/saveload.c:2262
 #: src/main/saveload.c:2366 src/main/scan.c:684 src/main/scan.c:853
 #: src/main/scan.c:867 src/main/scan.c:871 src/main/scan.c:873
 #: src/main/scan.c:884 src/main/scan.c:911 src/main/scan.c:914
-#: src/main/scan.c:917 src/main/scan.c:972 src/main/seq.c:618
-#: src/main/seq.c:623 src/main/seq.c:631 src/main/seq.c:662 src/main/seq.c:666
-#: src/main/seq.c:672 src/main/seq.c:680 src/main/sort.c:175
-#: src/main/sysutils.c:585 src/main/sysutils.c:589 src/main/sysutils.c:593
-#: src/main/sysutils.c:599 src/main/sysutils.c:603 src/main/sysutils.c:1831
-#: src/main/sysutils.c:1835 src/main/unique.c:966 src/main/unique.c:1289
-#: src/main/unique.c:1349 src/main/unique.c:1356 src/main/unique.c:1750
-#: src/main/util.c:581 src/main/util.c:584 src/main/util.c:1825
-#: src/main/util.c:1994 src/main/util.c:1995 src/main/util.c:1996
-#: src/main/util.c:2013 src/main/util.c:2037 src/main/util.c:2041
-#: src/main/util.c:2043 src/main/util.c:2068 src/main/util.c:2070
-#: src/main/util.c:2072 src/main/util.c:2075 src/main/util.c:2078
-#: src/main/util.c:2082 src/main/util.c:2084 src/modules/X11/devX11.c:3241
-#: src/modules/X11/devX11.c:3244 src/modules/X11/devX11.c:3247
-#: src/modules/X11/devX11.c:3271 src/modules/internet/internet.c:284
-#: src/modules/internet/internet.c:290 src/modules/internet/internet.c:296
-#: src/modules/internet/internet.c:299 src/modules/internet/internet.c:303
+#: src/main/scan.c:917 src/main/scan.c:972 src/main/seq.c:622
+#: src/main/seq.c:627 src/main/seq.c:635 src/main/seq.c:666 src/main/seq.c:670
+#: src/main/seq.c:676 src/main/seq.c:684 src/main/sort.c:175
+#: src/main/sysutils.c:597 src/main/sysutils.c:601 src/main/sysutils.c:605
+#: src/main/sysutils.c:611 src/main/sysutils.c:615 src/main/sysutils.c:1787
+#: src/main/sysutils.c:1791 src/main/unique.c:1029 src/main/unique.c:1337
+#: src/main/unique.c:1341 src/main/unique.c:1351 src/main/unique.c:1747
+#: src/main/util.c:636 src/main/util.c:639 src/main/util.c:1379
+#: src/main/util.c:1393 src/main/util.c:1975 src/main/util.c:2198
+#: src/main/util.c:2199 src/main/util.c:2200 src/main/util.c:2217
+#: src/main/util.c:2245 src/main/util.c:2249 src/main/util.c:2251
+#: src/main/util.c:2277 src/main/util.c:2279 src/main/util.c:2281
+#: src/main/util.c:2284 src/main/util.c:2287 src/main/util.c:2291
+#: src/main/util.c:2293 src/modules/X11/devX11.c:3247
+#: src/modules/X11/devX11.c:3250 src/modules/X11/devX11.c:3253
+#: src/modules/X11/devX11.c:3277 src/modules/internet/internet.c:453
+#: src/modules/internet/internet.c:459 src/modules/internet/internet.c:465
+#: src/modules/internet/internet.c:468 src/modules/internet/internet.c:472
+#: src/modules/internet/internet.c:477 src/modules/internet/libcurl.c:414
+#: src/modules/internet/libcurl.c:418 src/modules/internet/libcurl.c:423
+#: src/modules/internet/libcurl.c:426 src/modules/internet/libcurl.c:430
 #: src/modules/lapack/Lapack.c:155 src/modules/lapack/Lapack.c:261
 #: src/modules/lapack/Lapack.c:709 src/modules/lapack/Lapack.c:818
-#: src/modules/lapack/Lapack.c:880 src/modules/lapack/Lapack.c:1214
-#: src/unix/sys-std.c:1217 src/unix/sys-std.c:1240
+#: src/modules/lapack/Lapack.c:880 src/modules/lapack/Lapack.c:1215
+#: src/unix/sys-std.c:1223 src/unix/sys-std.c:1246
 #, c-format
 msgid "invalid '%s' argument"
 msgstr "ugyldig «%s»-argument"
@@ -251,379 +256,356 @@ msgstr "ugyldig «%s»-argument"
 msgid "unsupported version of Windows"
 msgstr "denne Windows-versjonen er ikkje støtta"
 
-#: src/gnuwin32/extra.c:267 src/main/apply.c:105 src/main/character.c:595
-#: src/main/connections.c:3555 src/main/context.c:642 src/main/context.c:661
-#: src/main/datetime.c:675 src/main/datetime.c:777 src/main/datetime.c:1030
-#: src/main/dotcode.c:199 src/main/errors.c:929 src/main/errors.c:962
-#: src/main/errors.c:1065 src/main/errors.c:1090 src/main/errors.c:1095
-#: src/main/errors.c:1368 src/main/identical.c:66 src/main/identical.c:67
-#: src/main/identical.c:68 src/main/identical.c:69 src/main/identical.c:70
-#: src/main/seq.c:185 src/main/seq.c:341 src/main/seq.c:346 src/main/seq.c:350
-#: src/main/seq.c:391 src/main/seq.c:395 src/main/seq.c:399
-#: src/main/sort.c:1224 src/main/sort.c:1307 src/main/sort.c:1311
-#: src/main/sort.c:1318 src/main/sort.c:1393 src/main/source.c:220
-#: src/main/summary.c:886 src/main/sysutils.c:251 src/main/util.c:986
-#: src/main/util.c:991 src/main/util.c:998 src/main/util.c:1001
-#: src/modules/X11/devX11.c:3142 src/modules/X11/devX11.c:3169
-#: src/modules/X11/devX11.c:3174 src/modules/X11/devX11.c:3179
-#: src/modules/X11/devX11.c:3189 src/modules/X11/devX11.c:3194
-#: src/modules/X11/devX11.c:3198 src/modules/X11/devX11.c:3202
-#: src/unix/sys-std.c:1291
-#, c-format
-msgid "invalid '%s' value"
-msgstr "ugyldig «%s»-verdi"
-
-#: src/gnuwin32/extra.c:308 src/gnuwin32/extra.c:321
+#: src/gnuwin32/extra.c:313 src/gnuwin32/extra.c:324
 msgid "incorrect argument"
 msgstr "ugyldig argument"
 
-#: src/gnuwin32/extra.c:312
+#: src/gnuwin32/extra.c:316
 msgid "don't be silly!: your machine has a 4Gb address limit"
 msgstr "Ikkje ver tåpeleg! Maskina di har ei adressegrense på 4 GiB."
 
-#: src/gnuwin32/extra.c:316
+#: src/gnuwin32/extra.c:320
 msgid "cannot decrease memory limit: ignored"
 msgstr "kan ikkje redusera minnegrensa: ignorert"
 
-#: src/gnuwin32/extra.c:428 src/gnuwin32/extra.c:529 src/main/util.c:897
+#: src/gnuwin32/extra.c:427 src/gnuwin32/extra.c:528 src/main/util.c:962
 msgid "'path' must be a character vector"
 msgstr "«path» må vera ein teiknvektor"
 
-#: src/gnuwin32/extra.c:579 src/gnuwin32/extra.c:581 src/gnuwin32/extra.c:604
-#: src/gnuwin32/extra.c:606 src/gnuwin32/extra.c:641 src/main/gevents.c:61
+#: src/gnuwin32/extra.c:576 src/gnuwin32/extra.c:578 src/gnuwin32/extra.c:601
+#: src/gnuwin32/extra.c:603 src/gnuwin32/extra.c:638 src/main/gevents.c:61
 #: src/main/gevents.c:98
 msgid "invalid device"
 msgstr "ugyldig eining"
 
-#: src/gnuwin32/extra.c:582
+#: src/gnuwin32/extra.c:579
 msgid "requires SDI mode"
 msgstr "krev SDI-modus"
 
-#: src/gnuwin32/extra.c:635 src/main/gevents.c:58 src/main/gevents.c:95
+#: src/gnuwin32/extra.c:632 src/main/gevents.c:58 src/main/gevents.c:95
 msgid "invalid graphical device number"
 msgstr "ugyldig nummer på grafisk eining"
 
-#: src/gnuwin32/extra.c:645
+#: src/gnuwin32/extra.c:642
 msgid "bad device"
 msgstr "ubrukbar eining"
 
-#: src/gnuwin32/extra.c:799 src/gnuwin32/extra.c:807
+#: src/gnuwin32/extra.c:796 src/gnuwin32/extra.c:804
 #, fuzzy
 msgid "invalid input in 'Rmbstowcs'"
 msgstr "ugyldig inndata i «Rmbstowcs»"
 
-#: src/gnuwin32/extra.c:830 src/main/platform.c:1261
+#: src/gnuwin32/extra.c:827 src/main/platform.c:1336
 msgid "file choice cancelled"
 msgstr "filval avbrote"
 
-#: src/gnuwin32/run.c:242
+#: src/gnuwin32/run.c:244
 #, fuzzy, c-format
 msgid "'CreateProcess' failed to run '%s'"
 msgstr "CreateProcess klarte ikkje køyra «%s»"
 
-#: src/gnuwin32/run.c:344
+#: src/gnuwin32/run.c:346
 msgid "Child process not responding.  R will terminate it."
 msgstr "Barneprosessen svarar ikkje. R vil derfor avslutta han."
 
-#: src/gnuwin32/run.c:402
+#: src/gnuwin32/run.c:404
 #, c-format
 msgid "Exit code was %d"
 msgstr "Avsluttingskoden var %d"
 
-#: src/gnuwin32/run.c:434
+#: src/gnuwin32/run.c:436
 msgid "Insufficient memory (rpipeOpen)"
 msgstr "Ikkje nok minne («rpipeOpen»)"
 
-#: src/gnuwin32/run.c:648 src/main/dounzip.c:482
+#: src/gnuwin32/run.c:650 src/main/dounzip.c:481
 msgid "seek not enabled for this connection"
 msgstr "«seek» er ikkje slått på for dette sambandet"
 
-#: src/gnuwin32/run.c:654
+#: src/gnuwin32/run.c:656
 msgid "truncate not enabled for this connection"
 msgstr "«truncate» er ikkje slått på for dette sambandet"
 
-#: src/gnuwin32/run.c:729 src/gnuwin32/run.c:733 src/gnuwin32/run.c:746
-#: src/gnuwin32/run.c:774 src/main/connections.c:1330
-#: src/main/connections.c:1334 src/main/connections.c:1340
-#: src/main/connections.c:1354
+#: src/gnuwin32/run.c:731 src/gnuwin32/run.c:735 src/gnuwin32/run.c:748
+#: src/gnuwin32/run.c:776 src/main/connections.c:1322
+#: src/main/connections.c:1326 src/main/connections.c:1332
+#: src/main/connections.c:1346
 msgid "allocation of pipe connection failed"
 msgstr "klarte ikkje reservera røyrsamband"
 
-#: src/gnuwin32/run.c:788
+#: src/gnuwin32/run.c:790
 #, fuzzy
 msgid "'names' is not a character vector"
 msgstr "«fmt» må vera ein teiknvektor"
 
-#: src/gnuwin32/sys-win32.c:182
+#: src/gnuwin32/sys-win32.c:180
 msgid "character string expected as first argument"
 msgstr "venta teiknstreng som førsteargument"
 
-#: src/gnuwin32/sys-win32.c:191
+#: src/gnuwin32/sys-win32.c:189
 msgid "character string expected as third argument"
 msgstr "venta teiknstreng som tredjeargument"
 
-#: src/gnuwin32/sys-win32.c:257 src/unix/sys-unix.c:299
+#: src/gnuwin32/sys-win32.c:255 src/unix/sys-unix.c:312
 #, c-format
 msgid "running command '%s' had status %d"
 msgstr "køyring av kommandoen «%s» gav statusen %d"
 
-#: src/gnuwin32/system.c:122 src/unix/sys-unix.c:427
+#: src/gnuwin32/system.c:121 src/unix/sys-unix.c:440
 msgid "reached session elapsed time limit"
 msgstr "nådde tidsgrensa for økta"
 
-#: src/gnuwin32/system.c:124 src/unix/sys-unix.c:429
+#: src/gnuwin32/system.c:123 src/unix/sys-unix.c:442
 msgid "reached elapsed time limit"
 msgstr "nådde tidsgrensa"
 
-#: src/gnuwin32/system.c:130 src/unix/sys-unix.c:435
+#: src/gnuwin32/system.c:129 src/unix/sys-unix.c:448
 msgid "reached session CPU time limit"
 msgstr "nådde CPU-tidsgrensa for økta"
 
-#: src/gnuwin32/system.c:132 src/unix/sys-unix.c:437
+#: src/gnuwin32/system.c:131 src/unix/sys-unix.c:450
 msgid "reached CPU time limit"
 msgstr "nådde CPU-tidsgrensa"
 
-#: src/gnuwin32/system.c:157
+#: src/gnuwin32/system.c:156
 #, c-format
 msgid "Fatal error: %s\n"
 msgstr "Kritisk feil: %s\n"
 
-#: src/gnuwin32/system.c:335 src/unix/sys-std.c:863
+#: src/gnuwin32/system.c:334 src/unix/sys-std.c:866
 #, c-format
 msgid "encoding '%s' is not recognised"
 msgstr "kjenner ikkje teiknkodinga «%s»"
 
-#: src/gnuwin32/system.c:341 src/unix/sys-std.c:869
+#: src/gnuwin32/system.c:340 src/unix/sys-std.c:872
 #, c-format
 msgid "<ERROR: re-encoding failure from encoding '%s'>\n"
 msgstr "<FEIL: Feil ved omkoding frå teiknkodinga «%s»>\n"
 
-#: src/gnuwin32/system.c:555 src/gnuwin32/system.c:1049
-#: src/gnuwin32/system.c:1061 src/main/connections.c:590
-#: src/main/connections.c:595 src/main/dounzip.c:177 src/main/saveload.c:1961
-#: src/main/serialize.c:2552 src/main/serialize.c:2557
-#: src/main/serialize.c:2642 src/main/serialize.c:2687 src/unix/system.c:323
-#: src/unix/system.c:343
+#: src/gnuwin32/system.c:562 src/gnuwin32/system.c:1058
+#: src/gnuwin32/system.c:1070 src/main/connections.c:581
+#: src/main/connections.c:586 src/main/dounzip.c:178 src/main/saveload.c:1963
+#: src/main/serialize.c:2598 src/main/serialize.c:2603
+#: src/main/serialize.c:2688 src/main/serialize.c:2733 src/unix/system.c:328
 #, c-format
 msgid "cannot open file '%s': %s"
 msgstr "klarte ikkje opna fila «%s»: %s"
 
-#: src/gnuwin32/system.c:569
+#: src/gnuwin32/system.c:576
 #, c-format
 msgid "file.show(): file '%s' does not exist\n"
 msgstr "file.show(): fila «%s» finst ikkje\n"
 
-#: src/gnuwin32/system.c:970
+#: src/gnuwin32/system.c:979
 #, fuzzy, c-format
 msgid "WARNING: R_MAX_MEM_SIZE value is invalid: ignored\n"
 msgstr "ÅTVARING: «%s»-verdien er ugyldig, og vert ikkje brukt\n"
 
-#: src/gnuwin32/system.c:1002
+#: src/gnuwin32/system.c:1011
 msgid "WARNING: no max-mem-size given\n"
 msgstr "ÅTVARING: ingen «max-mem-size» vald\n"
 
-#: src/gnuwin32/system.c:1009
+#: src/gnuwin32/system.c:1018
 #, c-format
 msgid "WARNING: --max-mem-size value is invalid: ignored\n"
 msgstr "ÅTVARING: «--max-mem-size»-verdien er ugyldig, og vert ikkje brukt\n"
 
-#: src/gnuwin32/system.c:1012
+#: src/gnuwin32/system.c:1021
 #, c-format
 msgid "WARNING: --max-mem-size=%lu%c: too large and ignored\n"
 msgstr ""
 "ÅTVARING: «--max-mem-size=%lu%c»-verdien er for høg, og vert ikkje brukt\n"
 
-#: src/gnuwin32/system.c:1018
+#: src/gnuwin32/system.c:1027
 #, c-format
 msgid "WARNING: --max-mem-size=%4.1fM: too small and ignored\n"
 msgstr ""
 "ÅTVARING: «--max-mem-size=%4.1fM»-verdien er for låg, og vert ikkje brukt\n"
 
-#: src/gnuwin32/system.c:1023
+#: src/gnuwin32/system.c:1032
 #, c-format
 msgid "WARNING: --max-mem-size=%4.0fM: too large and taken as %uM\n"
 msgstr ""
 "ÅTVARING: «--max-mem-size=%4.0fM»-verdien er for låg, og %uM vert brukt i "
 "staden for\n"
 
-#: src/gnuwin32/system.c:1039
+#: src/gnuwin32/system.c:1048
 #, fuzzy, c-format
 msgid "option '%s' requires an argument"
 msgstr "binæroperasjonar krev to argument"
 
-#: src/gnuwin32/system.c:1070
+#: src/gnuwin32/system.c:1079
 #, fuzzy, c-format
 msgid "option '%s' requires a non-empty argument"
 msgstr "binæroperasjonar krev to argument"
 
-#: src/gnuwin32/system.c:1078 src/unix/system.c:362
+#: src/gnuwin32/system.c:1087 src/unix/system.c:347
 #, c-format
 msgid "WARNING: '-e %s' omitted as input is too long\n"
 msgstr "ÅTVARING: «-e %s»-argumentet utelate, sidan inndata er for stor\n"
 
-#: src/gnuwin32/system.c:1082 src/unix/system.c:375
+#: src/gnuwin32/system.c:1091 src/unix/system.c:360
 #, c-format
 msgid "WARNING: unknown option '%s'\n"
 msgstr "ÅTVARING: ukjent val («%s»)\n"
 
-#: src/gnuwin32/system.c:1104 src/unix/system.c:379
+#: src/gnuwin32/system.c:1113 src/unix/system.c:364
 #, c-format
 msgid "ARGUMENT '%s' __ignored__\n"
 msgstr "ARGUMENTET «%s» __ikkje brukt__\n"
 
-#: src/gnuwin32/system.c:1110 src/unix/system.c:386
+#: src/gnuwin32/system.c:1119 src/unix/system.c:371
 msgid "cannot use -e with -f or --file"
 msgstr "kan ikkje bruka «-e» med «-f» eller «--file»"
 
-#: src/gnuwin32/system.c:1128
+#: src/gnuwin32/system.c:1137
 msgid "creation of tmpfile failed -- set TMPDIR suitably?"
 msgstr "klarte ikkje lagra «tmpfile». Prøv å definera «TMPDIR»."
 
-#: src/gnuwin32/system.c:1147 src/unix/system.c:437
+#: src/gnuwin32/system.c:1156 src/unix/system.c:422
 msgid "you must specify '--save', '--no-save' or '--vanilla'"
 msgstr "du må velja «--save», «--no-save» eller «--vanilla»"
 
-#: src/gnuwin32/system.c:1152
+#: src/gnuwin32/system.c:1161
 msgid ""
 "impossible to create 'reader thread'; you must free some system resources"
 msgstr ""
 "klarte ikkje laga «reader thread». Du må frigjera nokre systemressursar."
 
-#: src/include/Errormsg.h:25 src/main/subscript.c:375 src/main/subscript.c:393
-#: src/main/subscript.c:417 src/main/subscript.c:456 src/main/subscript.c:584
-#: src/main/subscript.c:623 src/main/subscript.c:766
+#: src/include/Errormsg.h:27 src/main/subscript.c:383 src/main/subscript.c:401
+#: src/main/subscript.c:425 src/main/subscript.c:464 src/main/subscript.c:662
+#: src/main/subscript.c:701 src/main/subscript.c:844
 msgid "subscript out of bounds"
 msgstr "indeksen ligg utanfor grensene"
 
-#: src/include/Errormsg.h:26
+#: src/include/Errormsg.h:28
 #, c-format
 msgid "object of type '%s' is not subsettable"
 msgstr "kan ikkje trekkja ut delmengd av objekt som er av typen «%s»"
 
-#: src/main/CommandLineArgs.c:170
+#: src/main/CommandLineArgs.c:171
 #, fuzzy
 msgid "WARNING: no value given for --encoding"
 msgstr "ÅTVARING: ingen verdi vald for «--encoding»\n"
 
-#: src/main/CommandLineArgs.c:195
+#: src/main/CommandLineArgs.c:196
 #, fuzzy, c-format
 msgid "WARNING: option '%s' no longer supported"
 msgstr "ÅTVARING: valet «%s» er ikkje lenger støtta\n"
 
-#: src/main/CommandLineArgs.c:206
+#: src/main/CommandLineArgs.c:207
 #, fuzzy, c-format
 msgid "WARNING: no value given for '%s'"
 msgstr "ÅTVARING: ingen verdi vald for «%s»\n"
 
-#: src/main/CommandLineArgs.c:216
+#: src/main/CommandLineArgs.c:217
 #, fuzzy, c-format
 msgid "WARNING: '%s' value is invalid: ignored"
 msgstr "ÅTVARING: «%s»-verdien er ugyldig, og vert ikkje brukt\n"
 
-#: src/main/CommandLineArgs.c:220
+#: src/main/CommandLineArgs.c:221
 #, fuzzy, c-format
 msgid "WARNING: %s: too large and ignored"
 msgstr "ÅTVARING: «%s»-verdien er for stor, og vert ikkje brukt\n"
 
-#: src/main/CommandLineArgs.c:234
+#: src/main/CommandLineArgs.c:235
 #, fuzzy
 msgid "WARNING: no value given for '--max-ppsize'"
 msgstr "ÅTVARING: ingen verdi vald for «--max-ppsize»\n"
 
-#: src/main/CommandLineArgs.c:239
+#: src/main/CommandLineArgs.c:240
 #, fuzzy
 msgid "WARNING: '--max-ppsize' value is negative: ignored"
 msgstr "ÅTVARING: «--max-ppsize»-verdien er negativ, og vert ikkje brukt\n"
 
-#: src/main/CommandLineArgs.c:241
+#: src/main/CommandLineArgs.c:242
 #, fuzzy
 msgid "WARNING: '--max-ppsize' value is too small: ignored"
 msgstr "ÅTVARING: «--max-ppsize»-verdien er for låg, og vert ikkje brukt\n"
 
-#: src/main/CommandLineArgs.c:244
+#: src/main/CommandLineArgs.c:245
 #, fuzzy
 msgid "WARNING: '--max-ppsize' value is too large: ignored"
 msgstr "ÅTVARING: «--max-ppsize»-verdien er for høg, og vert ikkje brukt\n"
 
-#: src/main/RNG.c:175
+#: src/main/RNG.c:176
 #, c-format
 msgid "unif_rand: unimplemented RNG kind %d"
 msgstr "unif_rand: RND-typen «%d» er ikkje implementert"
 
-#: src/main/RNG.c:260
+#: src/main/RNG.c:261
 #, c-format
 msgid "FixupSeeds: unimplemented RNG kind %d"
 msgstr "FixupSeeds: RNG-typen «%d» er ikkje implementert"
 
-#: src/main/RNG.c:302
+#: src/main/RNG.c:301
 msgid "'user_unif_rand' not in load table"
 msgstr "«user_unif_rand» finst ikkje i lastetabellen"
 
-#: src/main/RNG.c:310
+#: src/main/RNG.c:309
 msgid "cannot read seeds unless 'user_unif_nseed' is supplied"
 msgstr "kan ikkje lesa frø med mindre «user_unif_nseed» er oppgjeven"
 
-#: src/main/RNG.c:315
+#: src/main/RNG.c:314
 msgid "seed length must be in 0...625; ignored"
 msgstr ""
 "frølengda må vera mellom 0 og 625, inklusiv (oppgjeven verdi vert ikkje "
 "brukt)"
 
-#: src/main/RNG.c:323
+#: src/main/RNG.c:322
 #, c-format
 msgid "RNG_Init: unimplemented RNG kind %d"
 msgstr "RNG_Init: RNG-typen «%d» er ikkje implementert"
 
-#: src/main/RNG.c:354
+#: src/main/RNG.c:351
 #, fuzzy
 msgid "'.Random.seed' is a missing argument with no default"
 msgstr ".Random.seed er eit manglande argument utan nokon standardverdi"
 
-#: src/main/RNG.c:355
+#: src/main/RNG.c:352
 #, fuzzy, c-format
 msgid "'.Random.seed' is not an integer vector but of type '%s', so ignored"
 msgstr ".Random.seed er ikkje ein heiltalsvektor, men av typen «%s»"
 
-#: src/main/RNG.c:363
+#: src/main/RNG.c:360
 #, fuzzy
 msgid "'.Random.seed[1]' is not a valid integer, so ignored"
 msgstr ".Random.seed[1] er ikkje eit gyldig heiltal"
 
-#: src/main/RNG.c:369
+#: src/main/RNG.c:366
 #, fuzzy
 msgid "'.Random.seed[1]' is not a valid Normal type, so ignored"
 msgstr ".Random.seed[0] er ikkje ein gyldig «Normal»-type"
 
-#: src/main/RNG.c:383
+#: src/main/RNG.c:380
 #, fuzzy
 msgid "'.Random.seed[1] = 5' but no user-supplied generator, so ignored"
 msgstr ".Random.seed[1] er 5, men ingen generator er oppgjeven"
 
-#: src/main/RNG.c:388
+#: src/main/RNG.c:385
 #, fuzzy
 msgid "'.Random.seed[1]' is not a valid RNG kind so ignored"
 msgstr ".Random.seed[1] er ikkje ein gyldig RNG-type (kode)"
 
-#: src/main/RNG.c:415
+#: src/main/RNG.c:412
 #, fuzzy
 msgid "'.Random.seed' has wrong length"
 msgstr ".Random.seed har feil lengd"
 
-#: src/main/RNG.c:468
+#: src/main/RNG.c:465
 #, c-format
 msgid "RNGkind: unimplemented RNG kind %d"
 msgstr "RNGkind: RNG-typen «%d» er ikkje implementert"
 
-#: src/main/RNG.c:488
+#: src/main/RNG.c:485
 #, fuzzy
 msgid "invalid Normal type in 'RNGkind'"
 msgstr "ugyldig «Normal»-type i RNGkind"
 
-#: src/main/RNG.c:491
+#: src/main/RNG.c:488
 msgid "'user_norm_rand' not in load table"
 msgstr "«user_norm_rand» finst ikkje i lastetabellen"
 
-#: src/main/RNG.c:535
+#: src/main/RNG.c:532
 msgid "supplied seed is not a valid integer"
 msgstr "det oppgjevne frøet er ikkje eit gyldig heiltal"
 
@@ -649,7 +631,7 @@ msgstr "DLLname «%s» er for langt"
 msgid "could not allocate space for 'name'"
 msgstr "fann ikkje ledig plass til «name»"
 
-#: src/main/Rdynload.c:881 src/main/Rdynload.c:897 src/main/util.c:698
+#: src/main/Rdynload.c:881 src/main/Rdynload.c:897 src/main/util.c:762
 msgid "character argument expected"
 msgstr "venta teiknargument"
 
@@ -668,33 +650,37 @@ msgid "shared object '%s' was not loaded"
 msgstr "det delte objektet «%s» vart ikkje lasta"
 
 #: src/main/Rdynload.c:979
-#, c-format
-msgid "cannot allocate memory for registered native symbol (%d bytes)"
-msgstr "klarte ikkje setja av minne til registrert innebygd symbol (%d byte)"
-
-#: src/main/Rdynload.c:1100 src/main/Rdynload.c:1321
+#, fuzzy, c-format
+msgid "cannot allocate memory for registered native symbol (%d byte)"
+msgid_plural "cannot allocate memory for registered native symbol (%d bytes)"
+msgstr[0] ""
+"klarte ikkje setja av minne til registrert innebygd symbol (%d byte)"
+msgstr[1] ""
+"klarte ikkje setja av minne til registrert innebygd symbol (%d byte)"
+
+#: src/main/Rdynload.c:1102 src/main/Rdynload.c:1323
 msgid "must pass package name or DllInfo reference"
 msgstr "må senda med pakkenamn eller DllInfo-referanse"
 
-#: src/main/Rdynload.c:1197
+#: src/main/Rdynload.c:1199
 #, fuzzy, c-format
 msgid "unimplemented type %d in 'createRSymbolObject'"
 msgstr "Ikkje-implementert type «%d» i createRSymbolObject"
 
-#: src/main/Rdynload.c:1279 src/main/Rdynload.c:1373
+#: src/main/Rdynload.c:1281 src/main/Rdynload.c:1375
 msgid "R_getRegisteredRoutines() expects a DllInfo reference"
 msgstr "R_getRegisteredRoutines() ventar ein DllInfo-referanse"
 
-#: src/main/Rdynload.c:1282 src/main/Rdynload.c:1376
+#: src/main/Rdynload.c:1284 src/main/Rdynload.c:1378
 msgid "NULL value passed for DllInfo"
 msgstr "NULL-verdi send for DllInfo"
 
-#: src/main/Rdynload.c:1436
+#: src/main/Rdynload.c:1441
 #, c-format
 msgid "function '%s' not provided by package '%s'"
 msgstr "funksjonen «%s» finst ikkje i pakken «%s»"
 
-#: src/main/Rdynload.c:1438
+#: src/main/Rdynload.c:1443
 msgid "table entry must be an external pointer"
 msgstr "tabelloppføringa må vera ein ekstern peikar"
 
@@ -703,9 +689,9 @@ msgstr "tabelloppføringa må vera ein ekstern peikar"
 msgid "problem in setting variable '%s' in Renviron"
 msgstr "feil ved setjing av tidssone"
 
-#: src/main/Renviron.c:311
-#, fuzzy
-msgid "argument 'x' must be a character string"
+#: src/main/Renviron.c:311 src/main/objects.c:1174 src/main/raw.c:155
+#, fuzzy, c-format
+msgid "argument '%s' must be a character string"
 msgstr "argumentet «code» må vera ein teiknstreng"
 
 #: src/main/Renviron.c:315
@@ -713,95 +699,122 @@ msgstr "argumentet «code» må vera ein teiknstreng"
 msgid "file '%s' cannot be opened for reading"
 msgstr "zip-fila «%s» kan ikkje opnast"
 
-#: src/main/Rstrptime.h:517 src/main/Rstrptime.h:984
+#: src/main/Rstrptime.h:524 src/main/Rstrptime.h:991
 #, c-format
 msgid "use of %s for input is not supported"
 msgstr "bruk av «%s» i inndata er ikkje støtta"
 
-#: src/main/Rstrptime.h:1242
+#: src/main/Rstrptime.h:1263
 msgid "input string is too long"
 msgstr "innteksten er for lang"
 
-#: src/main/Rstrptime.h:1244
+#: src/main/Rstrptime.h:1265
 msgid "invalid multibyte input string"
 msgstr "ugyldig multibyte-inntekst"
 
-#: src/main/Rstrptime.h:1247
+#: src/main/Rstrptime.h:1268
 msgid "format string is too long"
 msgstr "formateringsteksten er for lang"
 
-#: src/main/Rstrptime.h:1249
+#: src/main/Rstrptime.h:1270
 msgid "invalid multibyte format string"
 msgstr "ugyldig multibyte-formateringstekst"
 
-#: src/main/agrep.c:133 src/main/agrep.c:777 src/main/character.c:1039
-#: src/main/character.c:1043 src/main/grep.c:769 src/main/grep.c:1512
-#: src/main/grep.c:1516 src/main/grep.c:2325 src/main/grep.c:2623
+#: src/main/agrep.c:133 src/main/agrep.c:778 src/main/character.c:1291
+#: src/main/character.c:1295 src/main/grep.c:782 src/main/grep.c:1530
+#: src/main/grep.c:1534 src/main/grep.c:2347 src/main/grep.c:2654
 #, c-format
 msgid "argument '%s' has length > 1 and only the first element will be used"
 msgstr ""
 "argumentet «%s» har lengd større enn 1 (berre første elementet vert brukt)"
 
-#: src/main/agrep.c:189 src/main/agrep.c:818
+#: src/main/agrep.c:190 src/main/agrep.c:820
 #, fuzzy
 msgid "'pattern' must be a non-empty character string"
 msgstr "«title» må vera ein teiknstreng"
 
-#: src/main/agrep.c:200 src/main/agrep.c:827 src/main/grep.c:838
-#: src/main/grep.c:2381 src/main/grep.c:2662
+#: src/main/agrep.c:201 src/main/agrep.c:829 src/main/grep.c:853
+#: src/main/grep.c:2405 src/main/grep.c:2707
 msgid "regular expression is invalid in this locale"
 msgstr "det regulære uttrykket er ugyldig i dette lokalet"
 
-#: src/main/agrep.c:206 src/main/agrep.c:623
+#: src/main/agrep.c:207 src/main/agrep.c:624
 #, c-format
 msgid "regcomp error:  '%s'"
 msgstr "regcomp-feil: «%s»"
 
-#: src/main/agrep.c:238 src/main/agrep.c:871 src/main/grep.c:227
-#: src/main/grep.c:315 src/main/grep.c:423 src/main/grep.c:578
-#: src/main/grep.c:889 src/main/grep.c:2480 src/main/grep.c:2548
-#: src/main/grep.c:2698
+#: src/main/agrep.c:239 src/main/agrep.c:874 src/main/grep.c:233
+#: src/main/grep.c:323 src/main/grep.c:434 src/main/grep.c:590
+#: src/main/grep.c:907 src/main/grep.c:2510 src/main/grep.c:2579
+#: src/main/grep.c:2744
 #, c-format
 msgid "input string %d is invalid in this locale"
 msgstr "innteksten «%d» er ugyldig i dette lokalet"
 
-#: src/main/agrep.c:525 src/main/agrep.c:765 src/main/grep.c:155
-#: src/main/grep.c:760 src/main/grep.c:762 src/main/grep.c:1047
-#: src/main/grep.c:1055 src/main/grep.c:1503 src/main/grep.c:1505
-#: src/main/grep.c:2315 src/main/grep.c:2317 src/main/grep.c:2611
+#: src/main/agrep.c:526 src/main/agrep.c:766 src/main/grep.c:159
+#: src/main/grep.c:773 src/main/grep.c:775 src/main/grep.c:1065
+#: src/main/grep.c:1073 src/main/grep.c:1521 src/main/grep.c:1523
+#: src/main/grep.c:2337 src/main/grep.c:2339 src/main/grep.c:2642
 #, c-format
 msgid "argument '%s' will be ignored"
 msgstr "argumentet «%s» vert ikkje brukt"
 
-#: src/main/agrep.c:614
+#: src/main/agrep.c:615
 #, fuzzy, c-format
 msgid "input string x[%d] is invalid in this locale"
 msgstr "innteksten «%d» er ugyldig i dette lokalet"
 
-#: src/main/agrep.c:660
+#: src/main/agrep.c:661
 #, fuzzy, c-format
 msgid "input string y[%d] is invalid in this locale"
 msgstr "innteksten «%d» er ugyldig i dette lokalet"
 
-#: src/main/agrep.c:833 src/main/grep.c:2668
+#: src/main/agrep.c:835 src/main/grep.c:2713
 #, fuzzy, c-format
 msgid "regcomp error: '%s'"
 msgstr "regcomp-feil: «%s»"
 
-#: src/main/apply.c:103
+#: src/main/apply.c:98
 #, fuzzy
 msgid "'FUN.VALUE' must be a vector"
 msgstr "«FUN.VALUE» må vera ein vektor"
 
-#: src/main/apply.c:108 src/main/complex.c:758
+#: src/main/apply.c:100 src/main/array.c:506 src/main/character.c:847
+#: src/main/character.c:1655 src/main/connections.c:3551
+#: src/main/context.c:653 src/main/context.c:672 src/main/datetime.c:681
+#: src/main/datetime.c:783 src/main/datetime.c:1047 src/main/dotcode.c:222
+#: src/main/errors.c:910 src/main/errors.c:943 src/main/errors.c:1049
+#: src/main/errors.c:1074 src/main/errors.c:1079 src/main/errors.c:1349
+#: src/main/identical.c:66 src/main/identical.c:67 src/main/identical.c:68
+#: src/main/identical.c:69 src/main/identical.c:70 src/main/platform.c:2982
+#: src/main/seq.c:192 src/main/seq.c:343 src/main/seq.c:348 src/main/seq.c:352
+#: src/main/seq.c:397 src/main/seq.c:401 src/main/seq.c:405
+#: src/main/sort.c:1244 src/main/sort.c:1327 src/main/sort.c:1331
+#: src/main/sort.c:1338 src/main/source.c:225 src/main/summary.c:954
+#: src/main/sysutils.c:250 src/main/util.c:1051 src/main/util.c:1056
+#: src/main/util.c:1063 src/main/util.c:1066 src/main/util.c:2035
+#: src/modules/X11/devX11.c:3148 src/modules/X11/devX11.c:3175
+#: src/modules/X11/devX11.c:3180 src/modules/X11/devX11.c:3185
+#: src/modules/X11/devX11.c:3195 src/modules/X11/devX11.c:3200
+#: src/modules/X11/devX11.c:3204 src/modules/X11/devX11.c:3208
+#, c-format
+msgid "invalid '%s' value"
+msgstr "ugyldig «%s»-verdi"
+
+#: src/main/apply.c:103 src/main/complex.c:753
 msgid "invalid length"
 msgstr "ugyldig lengd"
 
-#: src/main/apply.c:113
+#: src/main/apply.c:108
 msgid "long vectors are not supported for matrix/array results"
 msgstr ""
 
-#: src/main/apply.c:162
+#: src/main/apply.c:115
+#, c-format
+msgid "type '%s' is not supported"
+msgstr "typen «%s» er ikkje støtta"
+
+#: src/main/apply.c:163
 #, c-format
 msgid ""
 "values must be length %d,\n"
@@ -810,7 +823,7 @@ msgstr ""
 "verdiar må ha lengda %d,\n"
 " men resultatet av «FUN(X[[%d]])» har lengd %d"
 
-#: src/main/apply.c:174
+#: src/main/apply.c:175
 #, c-format
 msgid ""
 "values must be type '%s',\n"
@@ -819,17 +832,12 @@ msgstr ""
 "verdiar må ha typen «%s»,\n"
 " men resultatet av «FUN(X[[%d]])» har typen «%s»"
 
-#: src/main/apply.c:193
-#, c-format
-msgid "type '%s' is not supported"
-msgstr "typen «%s» er ikkje støtta"
-
-#: src/main/apply.c:225
+#: src/main/apply.c:252
 #, c-format
 msgid "dimnames(<value>) is neither NULL nor list of length %d"
 msgstr ""
 
-#: src/main/arithmetic.c:42
+#: src/main/arithmetic.c:42 src/main/eval.c:3633
 msgid "NaNs produced"
 msgstr "NaN-verdiar vart laga"
 
@@ -838,112 +846,115 @@ msgstr "NaN-verdiar vart laga"
 msgid "non-numeric argument to mathematical function"
 msgstr "ikkje-numerisk argument til matematisk funksjon"
 
-#: src/main/arithmetic.c:187
+#: src/main/arithmetic.c:186
 msgid "probable complete loss of accuracy in modulus"
 msgstr "truleg fullstendig tap av nøyaktigheit ved modulus-operasjon"
 
-#: src/main/arithmetic.c:337
+#: src/main/arithmetic.c:298
 msgid "NAs produced by integer overflow"
 msgstr "NA-verdiar produsert av heiltalsoverflyt"
 
-#: src/main/arithmetic.c:538
+#: src/main/arithmetic.c:499
 msgid "operator needs one or two arguments"
 msgstr "operatoren treng eitt eller to argument"
 
-#: src/main/arithmetic.c:554
+#: src/main/arithmetic.c:515
 msgid "non-numeric argument to binary operator"
 msgstr "ikkje-numerisk argument til binæroperator"
 
-#: src/main/arithmetic.c:615 src/main/relop.c:227
+#: src/main/arithmetic.c:576 src/main/relop.c:221
 msgid "non-conformable arrays"
 msgstr "array-objekt av ikkje-samsvarande storleikar"
 
-#: src/main/arithmetic.c:658
+#: src/main/arithmetic.c:619
 msgid "non-conformable time-series"
 msgstr "tidsrekkjer av ikkje-samsvarande storleikar"
 
-#: src/main/arithmetic.c:680 src/main/logic.c:143 src/main/relop.c:166
-#: src/main/relop.c:265
+#: src/main/arithmetic.c:641 src/main/logic.c:135 src/main/relop.c:160
+#: src/main/relop.c:259
 msgid "longer object length is not a multiple of shorter object length"
 msgstr ""
 "lengda til det lengste objektet er ikkje eit multiplum av lengda til det "
 "kortaste"
 
-#: src/main/arithmetic.c:751
+#: src/main/arithmetic.c:712
 msgid "invalid argument to unary operator"
 msgstr "ugyldig argument til unæroperator"
 
-#: src/main/arithmetic.c:780 src/main/arithmetic.c:805
-#: src/main/arithmetic.c:824
+#: src/main/arithmetic.c:741 src/main/arithmetic.c:766
+#: src/main/arithmetic.c:785
 msgid "invalid unary operator"
 msgstr "ugyldig unæroperator"
 
-#: src/main/arithmetic.c:1241
+#: src/main/arithmetic.c:1191
 msgid "unimplemented real function of 1 argument"
 msgstr "ikkje-implementert reell funksjon med 1 argument"
 
-#: src/main/arithmetic.c:1255 src/main/complex.c:648 src/main/complex.c:718
+#: src/main/arithmetic.c:1205 src/main/complex.c:638 src/main/complex.c:708
 msgid "unimplemented complex function"
 msgstr "ikkje-implementert kompleks funksjon"
 
-#: src/main/arithmetic.c:1526 src/main/arithmetic.c:1877
-#: src/main/arithmetic.c:2056 src/main/arithmetic.c:2168
+#: src/main/arithmetic.c:1484 src/main/arithmetic.c:1877
+#: src/main/arithmetic.c:2049 src/main/arithmetic.c:2152
 #, c-format
 msgid "unimplemented real function of %d numeric arguments"
 msgstr "ikkje-implementert reell funksjon med %d numeriske argument"
 
-#: src/main/arithmetic.c:1552
-#, c-format
-msgid "%d arguments passed to '%s' which requires 1 or 2"
-msgstr "%d argument sende til «%s», som tek 1 eller 2 argument"
+#: src/main/arithmetic.c:1511
+#, fuzzy, c-format
+msgid "%d argument passed to '%s' which requires 1 or 2 arguments"
+msgid_plural "%d arguments passed to '%s'which requires 1 or 2 arguments"
+msgstr[0] "%d argument sende til «%s», som tek 1 eller 2 argument"
+msgstr[1] "%d argument sende til «%s», som tek 1 eller 2 argument"
 
-#: src/main/arithmetic.c:1570
+#: src/main/arithmetic.c:1530
 msgid "invalid second argument of length 0"
 msgstr "ugyldig andreargument av lengd 0"
 
-#: src/main/arithmetic.c:1639
+#: src/main/arithmetic.c:1625 src/main/arithmetic.c:1643 src/main/envir.c:1464
+#: src/main/envir.c:1972 src/main/eval.c:630 src/main/eval.c:4237
+#, c-format
+msgid "argument \"%s\" is missing, with no default"
+msgstr "argumentet «%s» manglar, og har ingen standardverdi"
+
+#: src/main/arithmetic.c:1649
 msgid "invalid argument 'base' of length 0"
 msgstr "ugyldig argument «base» av lengd 0"
 
-#: src/main/arithmetic.c:1647
-#, c-format
-msgid "%d arguments passed to 'log' which requires 1 or 2"
-msgstr "%d argument sende til «log», som tek 1 eller 2 argument"
-
-#: src/main/array.c:79 src/main/array.c:1441
+#: src/main/array.c:82 src/main/array.c:1591
 #, fuzzy, c-format
 msgid "'data' must be of a vector type, was '%s'"
 msgstr "«path» må vera ein teiknvektor"
 
-#: src/main/array.c:94 src/main/array.c:102
+#: src/main/array.c:97 src/main/array.c:105
 msgid "non-numeric matrix extent"
 msgstr "ikkje-numerisk matrisestorleik"
 
-#: src/main/array.c:97 src/main/array.c:1535
+#: src/main/array.c:100 src/main/array.c:1695
 msgid "invalid 'nrow' value (too large or NA)"
 msgstr "ugyldig «nrow»-verdi (for stor eller NA)"
 
-#: src/main/array.c:99 src/main/array.c:1537
+#: src/main/array.c:102 src/main/array.c:1697
 msgid "invalid 'nrow' value (< 0)"
 msgstr "negativ «nrow»-verdi"
 
-#: src/main/array.c:105 src/main/array.c:1540
+#: src/main/array.c:108 src/main/array.c:1700
 msgid "invalid 'ncol' value (too large or NA)"
 msgstr "ugyldig «ncol»-verdi (for stor eller NA)"
 
-#: src/main/array.c:107 src/main/array.c:1542
+#: src/main/array.c:110 src/main/array.c:1702
 msgid "invalid 'ncol' value (< 0)"
 msgstr "negativ «ncol»-verdi"
 
-#: src/main/array.c:116
+#: src/main/array.c:119
 msgid "nc = 0 for non-null data"
 msgstr ""
 
-#: src/main/array.c:124
+#: src/main/array.c:127
 msgid "nr = 0 for non-null data"
 msgstr ""
 
-#: src/main/array.c:135
+#: src/main/array.c:138
 #, c-format
 msgid ""
 "data length [%d] is not a sub-multiple or multiple of the number of rows [%d]"
@@ -951,7 +962,7 @@ msgstr ""
 "datalengda [%d] er ikkje ein faktor eller eit multiplum av talet på rader "
 "[%d]"
 
-#: src/main/array.c:138
+#: src/main/array.c:141
 #, c-format
 msgid ""
 "data length [%d] is not a sub-multiple or multiple of the number of columns "
@@ -959,302 +970,313 @@ msgid ""
 msgstr ""
 "datalengda [%d] er ikkje ein faktor eller multiplum av talet på kolonnar [%d]"
 
-#: src/main/array.c:141
+#: src/main/array.c:144
 msgid "data length exceeds size of matrix"
 msgstr "datalengda er større enn matrisa"
 
-#: src/main/array.c:147 src/main/array.c:1453 src/main/array.c:1549
+#: src/main/array.c:150 src/main/array.c:1603 src/main/array.c:1709
 msgid "too many elements specified"
 msgstr "for mange oppgjevne element"
 
-#: src/main/array.c:205
+#: src/main/array.c:208
 msgid "negative extents to matrix"
 msgstr "negativ matrisestorleik"
 
-#: src/main/array.c:208
+#: src/main/array.c:211
 msgid "allocMatrix: too many elements specified"
 msgstr "allocMatrix: for mange oppgjevne element"
 
-#: src/main/array.c:236
+#: src/main/array.c:239
 msgid "negative extents to 3D array"
 msgstr "negativ storleik på 3D-array"
 
-#: src/main/array.c:239
+#: src/main/array.c:242
 #, fuzzy
 msgid "'alloc3Darray': too many elements specified"
 msgstr "alloc3Darray: for mange oppgjevne element"
 
-#: src/main/array.c:264
+#: src/main/array.c:267
 #, fuzzy
 msgid "'allocArray': too many elements specified by 'dims'"
 msgstr "allocArray: for mange element oppgjevne i «dims»"
 
-#: src/main/array.c:448
+#: src/main/array.c:523
+#, fuzzy, c-format
+msgid "'%s' must be a list or atomic vector"
+msgstr "«x» må vera ein teiknvektor"
+
+#: src/main/array.c:561
 #, fuzzy, c-format
 msgid "a matrix-like object is required as argument to '%s'"
 msgstr "«row» og «col» tek berre matriseliknande element"
 
-#: src/main/array.c:662
+#: src/main/array.c:776
 msgid "requires numeric/complex matrix/vector arguments"
 msgstr "tek berre numeriske eller komplekse matrise- og vektorargument"
 
-#: src/main/array.c:752 src/main/array.c:756 src/main/array.c:760
+#: src/main/array.c:886 src/main/array.c:890 src/main/array.c:894
 msgid "non-conformable arguments"
 msgstr "ikkje-samsvarande argument"
 
-#: src/main/array.c:1058
+#: src/main/array.c:1193
 msgid "argument is not a matrix"
 msgstr "argumentet er ikkje ei matrise"
 
-#: src/main/array.c:1093
+#: src/main/array.c:1228
 msgid "invalid first argument, must be an array"
 msgstr "førsteargumentet må vera eit array"
 
-#: src/main/array.c:1107
+#: src/main/array.c:1242
 #, fuzzy, c-format
 msgid "'perm' is of wrong length %d (!= %d)"
 msgstr "«perm» har feil lengd"
 
-#: src/main/array.c:1112 src/main/array.c:1115
+#: src/main/array.c:1247 src/main/array.c:1250
 msgid "'a' does not have named dimnames"
 msgstr "«a» har ikkje «dimnames»-namn"
 
-#: src/main/array.c:1122
+#: src/main/array.c:1257
 #, fuzzy, c-format
 msgid "'perm[%d]' does not match a dimension name"
 msgstr "«perm[%d]» er ikkje i samsvar med eit dimensjonsnamn"
 
-#: src/main/array.c:1135
+#: src/main/array.c:1270
 msgid "value out of range in 'perm'"
 msgstr "verdien til «perm» er utanfor gyldig verdiområde"
 
-#: src/main/array.c:1217
+#: src/main/array.c:1352
 msgid "'resize' must be TRUE or FALSE"
 msgstr "«resize» må vera TRUE eller FALSE"
 
-#: src/main/array.c:1275
+#: src/main/array.c:1422
 msgid "'x' must be numeric"
 msgstr "«x» må vera numerisk"
 
-#: src/main/array.c:1449
+#: src/main/array.c:1425
+#, fuzzy
+msgid "'x' is too short"
+msgstr "«object» er for kort"
+
+#: src/main/array.c:1599
 #, fuzzy
 msgid "'dims' cannot be of length 0"
 msgstr "«hadj» må ha lengd 1"
 
-#: src/main/array.c:1545
+#: src/main/array.c:1705
 #, fuzzy
 msgid "'x' must have positive length"
 msgstr "«value» må ha positiv lengd"
 
-#: src/main/array.c:1605
+#: src/main/array.c:1771
 #, c-format
 msgid "singular matrix in 'backsolve'. First zero in diagonal [%d]"
 msgstr ""
 
-#: src/main/attrib.c:40 src/main/attrib.c:235 src/main/attrib.c:269
-#: src/main/attrib.c:291 src/main/attrib.c:405 src/main/attrib.c:452
-#: src/main/attrib.c:502
+#: src/main/attrib.c:40 src/main/attrib.c:231 src/main/attrib.c:265
+#: src/main/attrib.c:287 src/main/attrib.c:403 src/main/attrib.c:450
+#: src/main/attrib.c:501
 msgid "attempt to set an attribute on NULL"
 msgstr "prøvde å setja attributt på NULL"
 
-#: src/main/attrib.c:72
+#: src/main/attrib.c:77
 #, c-format
 msgid "row names must be 'character' or 'integer', not '%s'"
 msgstr ""
 "radnamn må vera av typen «character» (tekst) eller «integer» (heiltal), "
 "ikkje «%s»"
 
-#: src/main/attrib.c:124
+#: src/main/attrib.c:130
 #, c-format
 msgid "getAttrib: invalid type (%s) for TAG"
 msgstr "getAttrib: ugyldig type (%s) for TAG"
 
-#: src/main/attrib.c:379
+#: src/main/attrib.c:377
 #, c-format
 msgid "invalid type (%s) for 'names': must be vector"
 msgstr "ugyldig type (%s) for «names»: må vera ein vektor"
 
-#: src/main/attrib.c:382
+#: src/main/attrib.c:380
 #, c-format
 msgid "'names' attribute [%d] must be the same length as the vector [%d]"
 msgstr "«names»-attributtet [%d] må ha same lengd som vektoren [%d]"
 
-#: src/main/attrib.c:387
+#: src/main/attrib.c:385
 msgid "names() applied to a non-vector"
 msgstr "names() brukt på ikkje-vektor"
 
-#: src/main/attrib.c:395
+#: src/main/attrib.c:393
 msgid "invalid time series parameters specified"
 msgstr "ugyldig tidsrekkjeparametrar oppgjevne"
 
-#: src/main/attrib.c:409
+#: src/main/attrib.c:407
 msgid "'tsp' attribute must be numeric"
 msgstr "«tsp»-attributtet må vera numerisk"
 
-#: src/main/attrib.c:415
+#: src/main/attrib.c:413
 msgid "'tsp' attribute must be numeric of length three"
 msgstr "«tsp»-attributtet må vera numerisk av lengd tre"
 
-#: src/main/attrib.c:432
+#: src/main/attrib.c:430
 msgid "cannot assign 'tsp' to zero-length vector"
 msgstr "kan ikkje tildela «tsp» til vektor av lengd null"
 
-#: src/main/attrib.c:463
+#: src/main/attrib.c:461
 msgid "attempt to set invalid 'comment' attribute"
 msgstr "prøvde å definera eit ugyldig «comment»-attributt"
 
-#: src/main/attrib.c:511
+#: src/main/attrib.c:510
 msgid "adding class \"factor\" to an invalid object"
 msgstr "legg klassen «factor» til eit ugyldig objekt"
 
-#: src/main/attrib.c:519
+#: src/main/attrib.c:541
 msgid "attempt to set invalid 'class' attribute"
 msgstr "prøvde å definera eit ugyldig «class»-attributt"
 
-#: src/main/attrib.c:777
+#: src/main/attrib.c:872
 #, c-format
 msgid "class '%s' has no 'names' slot"
 msgstr ""
 
-#: src/main/attrib.c:779
+#: src/main/attrib.c:874
 #, c-format
 msgid ""
 "class '%s' has no 'names' slot; assigning a names attribute will create an "
 "invalid object"
 msgstr ""
 
-#: src/main/attrib.c:782
+#: src/main/attrib.c:877
 #, c-format
 msgid ""
 "invalid to use names()<- to set the 'names' slot in a non-vector class ('%s')"
 msgstr ""
 
-#: src/main/attrib.c:812
+#: src/main/attrib.c:907
 msgid "incompatible 'names' argument"
 msgstr "ikkje-kompatibelt «names»-argument"
 
-#: src/main/attrib.c:867
+#: src/main/attrib.c:962
 #, c-format
 msgid "invalid type (%s) to set 'names' attribute"
 msgstr "ugyldig type (%s) for å setja «names»-attributt"
 
-#: src/main/attrib.c:938
+#: src/main/attrib.c:1035
 msgid "'dimnames' applied to non-array"
 msgstr "«dimnames» brukt på ikkje-array"
 
-#: src/main/attrib.c:943
-msgid "'dimnames' must be a list"
-msgstr "«dimnames» må vera ei liste"
+#: src/main/attrib.c:1040 src/main/coerce.c:2471
+#, fuzzy, c-format
+msgid "'%s' must be a list"
+msgstr "«%s» må vera ei liste"
 
-#: src/main/attrib.c:946 src/main/attrib.c:974
+#: src/main/attrib.c:1043 src/main/attrib.c:1071
 #, c-format
 msgid "length of 'dimnames' [%d] must match that of 'dims' [%d]"
 msgstr "lengda til «dimnames» [%d] må vera i samsvar med «dims» [%d]"
 
-#: src/main/attrib.c:980
+#: src/main/attrib.c:1077
 #, c-format
 msgid "invalid type (%s) for 'dimnames' (must be a vector)"
 msgstr "ugyldig type (%s) for «dimnames» (må vera ein vektor)"
 
-#: src/main/attrib.c:983
+#: src/main/attrib.c:1080
 #, c-format
 msgid "length of 'dimnames' [%d] not equal to array extent"
 msgstr "lengda til «dimnames» [%d] er ikkje lik array-storleiken"
 
-#: src/main/attrib.c:1055 src/main/builtin.c:75 src/main/builtin.c:112
-#: src/main/envir.c:1606 src/main/envir.c:1734 src/main/envir.c:1796
-#: src/main/envir.c:1918 src/main/paste.c:74 src/main/paste.c:293
-#: src/main/random.c:487 src/main/random.c:516 src/main/unique.c:1749
+#: src/main/attrib.c:1152 src/main/builtin.c:75 src/main/builtin.c:112
+#: src/main/envir.c:1740 src/main/envir.c:1868 src/main/envir.c:1928
+#: src/main/envir.c:2065 src/main/paste.c:74 src/main/paste.c:293
+#: src/main/random.c:479 src/main/random.c:508 src/main/unique.c:1746
 msgid "invalid first argument"
 msgstr "ugyldig førsteargument"
 
-#: src/main/attrib.c:1058
+#: src/main/attrib.c:1155
 msgid "invalid second argument"
 msgstr "ugyldig andreargument"
 
-#: src/main/attrib.c:1066
+#: src/main/attrib.c:1163
 msgid "length-0 dimension vector is invalid"
 msgstr "dimensjonsvektoren kan ikkje ha lengd 0"
 
-#: src/main/attrib.c:1071
+#: src/main/attrib.c:1168
 msgid "the dims contain missing values"
 msgstr "dimensjonane inneheld manglande verdiar"
 
-#: src/main/attrib.c:1073
+#: src/main/attrib.c:1170
 msgid "the dims contain negative values"
 msgstr "dimensjonane inneheld negative verdiar"
 
-#: src/main/attrib.c:1078
+#: src/main/attrib.c:1175
 #, fuzzy
 msgid "dims do not match the length of object"
 msgstr "«dims» [produkt %d] er ikkje i samsvar med lengda av objektet [%d]"
 
-#: src/main/attrib.c:1080
+#: src/main/attrib.c:1177
 #, c-format
 msgid "dims [product %d] do not match the length of object [%d]"
 msgstr "«dims» [produkt %d] er ikkje i samsvar med lengda av objektet [%d]"
 
-#: src/main/attrib.c:1177
+#: src/main/attrib.c:1284
 msgid "attributes must be a list or NULL"
 msgstr "attributta må vera ei liste eller NULL"
 
-#: src/main/attrib.c:1182
+#: src/main/attrib.c:1289
 msgid "attributes must be named"
 msgstr "attributta må ha namn"
 
-#: src/main/attrib.c:1186
+#: src/main/attrib.c:1293
 #, c-format
 msgid "all attributes must have names [%d does not]"
 msgstr "alle attributta må ha namn (%d har ikkje det)"
 
-#: src/main/attrib.c:1285
+#: src/main/attrib.c:1393
 msgid "'which' must be of mode character"
 msgstr "«which» må ha modus «character»"
 
-#: src/main/attrib.c:1287
+#: src/main/attrib.c:1395
 msgid "exactly one attribute 'which' must be given"
 msgstr "nøyaktig eitt «which»-attributt må vera oppgjeve"
 
-#: src/main/attrib.c:1345 src/main/attrib.c:1368 src/main/subscript.c:240
-#: src/main/subscript.c:244 src/main/subset.c:1188 src/main/subset.c:1239
+#: src/main/attrib.c:1456 src/main/attrib.c:1479 src/main/subscript.c:245
+#: src/main/subscript.c:249 src/main/subset.c:1257 src/main/subset.c:1311
 #, c-format
 msgid "partial match of '%s' to '%s'"
 msgstr "«%s» vert tolka som «%s»"
 
-#: src/main/attrib.c:1406
+#: src/main/attrib.c:1525
 #, fuzzy, c-format
 msgid "invalid type '%s' for slot name"
 msgstr "ugyldig type eller lengd på slot-namn"
 
-#: src/main/attrib.c:1444
+#: src/main/attrib.c:1563
 msgid "'name' must be non-null character string"
 msgstr "«name» må vera ein teiknstreng ulik null"
 
-#: src/main/attrib.c:1568 src/main/attrib.c:1639 src/main/attrib.c:1676
+#: src/main/attrib.c:1688 src/main/attrib.c:1759 src/main/attrib.c:1797
 msgid "invalid type or length for slot name"
 msgstr "ugyldig type eller lengd på slot-namn"
 
-#: src/main/attrib.c:1602
+#: src/main/attrib.c:1722
 #, c-format
 msgid "cannot get a slot (\"%s\") from an object of type \"%s\""
 msgstr "klarte ikkje henta slot («%s») frå eit objekt av typen «%s»"
 
-#: src/main/attrib.c:1613
+#: src/main/attrib.c:1733
 #, c-format
 msgid "no slot of name \"%s\" for this object of class \"%s\""
 msgstr ""
 "det finst ikkje ein slot med namnet «%s» for dette objektet av klassen «%s»"
 
-#: src/main/attrib.c:1630
+#: src/main/attrib.c:1750
 msgid "attempt to set slot on NULL object"
 msgstr "prøvde å setja slot på eit NULL-objekt"
 
-#: src/main/attrib.c:1671
+#: src/main/attrib.c:1792
 #, fuzzy
 msgid "formal classes cannot be used without the 'methods' package"
 msgstr "formelle klassar kan ikkje brukast utan «methods»-pakken"
 
-#: src/main/attrib.c:1683
+#: src/main/attrib.c:1804
 #, c-format
 msgid ""
 "trying to get slot \"%s\" from an object of a basic class (\"%s\") with no "
@@ -1263,7 +1285,7 @@ msgstr ""
 "prøver å henta slot «%s» frå eit objekt av ein grunnklasse («%s») utan slot-"
 "ar"
 
-#: src/main/attrib.c:1687
+#: src/main/attrib.c:1808
 #, c-format
 msgid ""
 "trying to get slot \"%s\" from an object (class \"%s\") that is not an S4 "
@@ -1272,47 +1294,46 @@ msgstr ""
 "prøver å henta slot «%s» frå eit objekt (klasse «%s») som ikkje er eit S4-"
 "objekt"
 
-#: src/main/bind.c:161
+#: src/main/bind.c:164
 #, c-format
 msgid "resulting vector exceeds vector length limit in '%s'"
 msgstr ""
 
-#: src/main/bind.c:291 src/main/bind.c:327 src/main/bind.c:376
-#: src/main/bind.c:449 src/main/bind.c:477
+#: src/main/bind.c:294 src/main/bind.c:330 src/main/bind.c:379
+#: src/main/bind.c:452 src/main/bind.c:480
 #, c-format
 msgid "type '%s' is unimplemented in '%s'"
 msgstr "typen «%s» er ikkje implementert i «%s»"
 
-#: src/main/bind.c:685
+#: src/main/bind.c:688
 msgid "repeated formal argument 'recursive'"
 msgstr "gjenteke formelt argument: «recursive»"
 
-#: src/main/bind.c:696
+#: src/main/bind.c:699
 msgid "repeated formal argument 'use.names'"
 msgstr "gjenteke formelt argument: «use.names»"
 
-#: src/main/bind.c:894
+#: src/main/bind.c:900
 msgid "argument not a list"
 msgstr "argumentet er ikkje ei liste"
 
-#: src/main/bind.c:1038 src/main/eval.c:2691 src/main/eval.c:2700
-#: src/main/objects.c:318 src/main/objects.c:354 src/main/objects.c:729
-#: src/main/objects.c:746 src/main/objects.c:753
+#: src/main/bind.c:1044 src/main/names.c:1273 src/main/names.c:1278
+#: src/main/names.c:1283 src/main/names.c:1288
 #, c-format
 msgid "class name too long in '%s'"
 msgstr "klassenamnet er for langt i «%s»"
 
-#: src/main/bind.c:1114
+#: src/main/bind.c:1128
 #, fuzzy, c-format
 msgid "cannot create a matrix from type '%s'"
 msgstr "kan ikkje laga matrise frå desse typane"
 
-#: src/main/bind.c:1185
+#: src/main/bind.c:1198
 #, c-format
 msgid "number of rows of matrices must match (see arg %d)"
 msgstr "talet på rader i matrisene må vera like (sjå argument %d)"
 
-#: src/main/bind.c:1430
+#: src/main/bind.c:1455
 #, c-format
 msgid "number of columns of matrices must match (see arg %d)"
 msgstr "talet på kolonnar i matrisene må vera like (sjå argument %d)"
@@ -1321,213 +1342,248 @@ msgstr "talet på kolonnar i matrisene må vera like (sjå argument %d)"
 msgid "vector size cannot be NA"
 msgstr "vektorstorleiken kan ikkje vera NA"
 
-#: src/main/builtin.c:49 src/main/builtin.c:57 src/main/sort.c:1303
+#: src/main/builtin.c:49 src/main/builtin.c:57 src/main/sort.c:1323
 msgid "vector size cannot be NA/NaN"
 msgstr "vektorstorleiken kan ikkje vera NA/NaN"
 
-#: src/main/builtin.c:50 src/main/builtin.c:58 src/main/sort.c:1304
+#: src/main/builtin.c:50 src/main/builtin.c:58 src/main/sort.c:1324
 msgid "vector size cannot be infinite"
 msgstr "vektorstorleiken kan ikkje vera uendeleg"
 
-#: src/main/builtin.c:51 src/main/builtin.c:59 src/main/builtin.c:916
-#: src/main/sort.c:1305
+#: src/main/builtin.c:51 src/main/builtin.c:59 src/main/builtin.c:950
+#: src/main/sort.c:1325
 msgid "vector size specified is too large"
 msgstr "den oppgjevne vektorstorleiken er for stor"
 
-#: src/main/builtin.c:84 src/main/builtin.c:93 src/main/builtin.c:293
-#: src/main/builtin.c:326 src/main/builtin.c:365 src/main/builtin.c:375
-#: src/main/coerce.c:1537 src/main/connections.c:3066 src/main/engine.c:2967
-#: src/main/envir.c:993 src/main/envir.c:1046 src/main/envir.c:1136
-#: src/main/envir.c:1615 src/main/envir.c:1739 src/main/envir.c:1807
-#: src/main/envir.c:1925 src/main/envir.c:2582 src/main/envir.c:2642
-#: src/main/envir.c:2922 src/main/envir.c:2951 src/main/envir.c:2972
-#: src/main/envir.c:2995 src/main/envir.c:3030 src/main/envir.c:3051
-#: src/main/envir.c:3357 src/main/envir.c:3362 src/main/eval.c:5318
-#: src/main/objects.c:197 src/main/objects.c:203 src/main/saveload.c:2070
-#: src/main/saveload.c:2364 src/main/serialize.c:2709
+#: src/main/builtin.c:84 src/main/builtin.c:93 src/main/builtin.c:304
+#: src/main/builtin.c:337 src/main/builtin.c:394 src/main/builtin.c:408
+#: src/main/coerce.c:1536 src/main/connections.c:3062 src/main/engine.c:2987
+#: src/main/envir.c:1001 src/main/envir.c:1054 src/main/envir.c:1210
+#: src/main/envir.c:1749 src/main/envir.c:1873 src/main/envir.c:1939
+#: src/main/envir.c:2072 src/main/envir.c:2791 src/main/envir.c:2877
+#: src/main/envir.c:3182 src/main/envir.c:3211 src/main/envir.c:3232
+#: src/main/envir.c:3255 src/main/envir.c:3290 src/main/envir.c:3311
+#: src/main/envir.c:3632 src/main/envir.c:3637 src/main/eval.c:6251
+#: src/main/objects.c:191 src/main/objects.c:199 src/main/saveload.c:2072
+#: src/main/saveload.c:2364 src/main/serialize.c:2755
 msgid "use of NULL environment is defunct"
 msgstr "bruk av NULL-omgjevnaden er ikkje lenger mogleg"
 
-#: src/main/builtin.c:306
+#: src/main/builtin.c:250 src/main/builtin.c:263
+#, fuzzy
+msgid "argument is not a function"
+msgstr "argumentet kan ikkje vera ein funksjon"
+
+#: src/main/builtin.c:317
 msgid "replacement object is not an environment"
 msgstr "erstattingsobjektet er ikkje ein omgjevnad"
 
-#: src/main/builtin.c:331
+#: src/main/builtin.c:342
 msgid "'enclos' must be an environment"
 msgstr "«enclos» må vera ein omgjevnad"
 
-#: src/main/builtin.c:352 src/main/builtin.c:370
+#: src/main/builtin.c:363 src/main/builtin.c:399
 msgid "argument is not an environment"
 msgstr "argumentet er ikkje ein omgjevnad"
 
-#: src/main/builtin.c:354
+#: src/main/builtin.c:365
 msgid "the empty environment has no parent"
 msgstr "den tomme omgjevnaden har ikkje nokon forelder"
 
-#: src/main/builtin.c:372
+#: src/main/builtin.c:401
 msgid "can not set parent of the empty environment"
 msgstr "kan ikkje definera forelderen til den tomme omgjevnaden"
 
-#: src/main/builtin.c:380
+#: src/main/builtin.c:403
+#, fuzzy
+msgid "can not set the parent environment of a namespace"
+msgstr "kan ikkje definera forelderen til den tomme omgjevnaden"
+
+#: src/main/builtin.c:405
+#, fuzzy
+msgid "can not set the parent environment of package imports"
+msgstr "kan ikkje definera forelderen til den tomme omgjevnaden"
+
+#: src/main/builtin.c:413
 msgid "'parent' is not an environment"
 msgstr "«parent» er ikkje ein omgjevnad"
 
-#: src/main/builtin.c:521 src/main/connections.c:3691
-#: src/main/connections.c:4068 src/main/connections.c:4102
-#: src/main/connections.c:4480 src/main/connections.c:4550
-#: src/main/connections.c:4759 src/main/connections.c:4763
-#: src/main/connections.c:5124 src/main/deparse.c:360 src/main/deparse.c:446
-#: src/main/serialize.c:2006
+#: src/main/builtin.c:556 src/main/connections.c:3687
+#: src/main/connections.c:4079 src/main/connections.c:4113
+#: src/main/connections.c:4491 src/main/connections.c:4561
+#: src/main/connections.c:4772 src/main/connections.c:4776
+#: src/main/connections.c:5199 src/main/deparse.c:369 src/main/deparse.c:458
+#: src/main/serialize.c:2045
 msgid "cannot write to this connection"
 msgstr "klarte ikkje skriva til sambandet"
 
-#: src/main/builtin.c:526 src/main/builtin.c:556
+#: src/main/builtin.c:561 src/main/builtin.c:591
 #, c-format
 msgid "invalid '%s' specification"
 msgstr "ugyldig «%s»-format"
 
-#: src/main/builtin.c:543
+#: src/main/builtin.c:578
 msgid "non-positive 'fill' argument will be ignored"
 msgstr "ikkje-positivt «fill»-argument vert ikkje brukt"
 
-#: src/main/builtin.c:618
+#: src/main/builtin.c:653
 #, c-format
 msgid "argument %d (type '%s') cannot be handled by 'cat'"
 msgstr "«cat» kan ikkje handtera argument %d (type «%s»)"
 
-#: src/main/builtin.c:763
+#: src/main/builtin.c:797
 #, c-format
 msgid "vector: cannot make a vector of mode '%s'."
 msgstr "vector: kan ikkje laga vektor av modus «%s»"
 
-#: src/main/builtin.c:789
+#: src/main/builtin.c:823
 msgid "cannot set length of non-vector"
 msgstr "kan ikkje setja lengda til ikkje-vektor"
 
-#: src/main/builtin.c:897 src/main/builtin.c:907 src/main/options.c:637
+#: src/main/builtin.c:931 src/main/builtin.c:941 src/main/options.c:659
 msgid "invalid argument"
 msgstr "ugyldig argument"
 
-#: src/main/builtin.c:899 src/main/builtin.c:909 src/main/builtin.c:911
-#: src/main/character.c:366 src/main/coerce.c:2765
+#: src/main/builtin.c:933 src/main/builtin.c:943 src/main/builtin.c:945
+#: src/main/character.c:525 src/main/coerce.c:2832
 msgid "invalid value"
 msgstr "ugyldig verdi"
 
-#: src/main/builtin.c:942 src/main/coerce.c:2478 src/main/coerce.c:2519
-#: src/main/eval.c:563 src/main/eval.c:683 src/main/eval.c:2099
-#: src/main/eval.c:2176 src/main/eval.c:2236 src/main/eval.c:2569
-#: src/main/eval.c:4694 src/main/eval.c:4814
+#: src/main/builtin.c:976 src/main/coerce.c:2541 src/main/coerce.c:2584
+#: src/main/eval.c:620 src/main/eval.c:740 src/main/eval.c:2266
+#: src/main/eval.c:2346 src/main/eval.c:2407 src/main/eval.c:2745
+#: src/main/eval.c:5584 src/main/eval.c:5701
 msgid "'...' used in an incorrect context"
 msgstr "«...» brukt i feil samanheng"
 
-#: src/main/builtin.c:963
+#: src/main/builtin.c:998
 #, fuzzy, c-format
 msgid "duplicate 'switch' defaults: '%s' and '%s'"
 msgstr "duplikat standardverdi i «switch»: «%s» og «%s»"
 
-#: src/main/builtin.c:996
+#: src/main/builtin.c:1031
 msgid "'EXPR' is missing"
 msgstr "«EXPR» manglar"
 
-#: src/main/builtin.c:1000 src/main/eval.c:5155
+#: src/main/builtin.c:1035 src/main/eval.c:6056
 msgid "EXPR must be a length 1 vector"
 msgstr "«EXPR» må vera ein vektor av lengd 1"
 
-#: src/main/builtin.c:1003
+#: src/main/builtin.c:1038 src/main/eval.c:6059
 #, c-format
 msgid ""
 "EXPR is a \"factor\", treated as integer.\n"
 " Consider using '%s' instead."
 msgstr ""
 
-#: src/main/character.c:105 src/main/character.c:108 src/main/character.c:132
-#: src/main/character.c:135
+#: src/main/builtin.c:1095 src/main/eval.c:6069 src/main/eval.c:6098
+msgid "'switch' with no alternatives"
+msgstr ""
+
+#: src/main/character.c:103 src/main/character.c:224
+#, fuzzy, c-format
+msgid "%d argument passed to '%s' which requires %d to %d"
+msgid_plural "%d arguments passed to '%s' which requires %d to %d"
+msgstr[0] "%d argument sendt til «%s», som tek %d argument"
+msgstr[1] "%d argument sende til «%s», som tek %d argument"
+
+#: src/main/character.c:110 src/main/character.c:113 src/main/character.c:232
+#: src/main/character.c:235
 #, c-format
 msgid "'%s' requires a character vector"
 msgstr "«%s» tek berre ein teiknvektor"
 
-#: src/main/character.c:164
-#, c-format
-msgid ""
-"number of characters is not computable for element %d in \"bytes\" encoding"
-msgstr ""
+#: src/main/character.c:150 src/main/character.c:165 src/main/character.c:175
+#: src/main/character.c:203
+#, fuzzy, c-format
+msgid "invalid multibyte string, %s"
+msgstr "ugyldig multibyte-streng: %d"
 
-#: src/main/character.c:169 src/main/character.c:197 src/main/character.c:653
-#: src/main/character.c:750
+#: src/main/character.c:159
 #, c-format
-msgid "invalid multibyte string %d"
-msgstr "ugyldig multibyte-streng: %d"
+msgid "number of characters is not computable in \"bytes\" encoding, %s"
+msgstr ""
 
-#: src/main/character.c:185
+#: src/main/character.c:188
 #, c-format
-msgid "width is not computable for element %d in \"bytes\" encoding"
+msgid "width is not computable for %s in \"bytes\" encoding"
 msgstr ""
 
-#: src/main/character.c:263
+#: src/main/character.c:311
 msgid "extracting substrings from a non-character object"
 msgstr "hentar ut delstrengar frå ikkjeteikn-objekt"
 
-#: src/main/character.c:268 src/main/character.c:363
+#: src/main/character.c:321 src/main/character.c:522
 #, fuzzy
 msgid "invalid substring arguments"
 msgstr "ugyldig(e) delstreng-argument"
 
-#: src/main/character.c:358
+#: src/main/character.c:361
+#, fuzzy
+msgid "non-character object(s)"
+msgstr "ikkjeteikn-namn"
+
+#: src/main/character.c:517
 msgid "replacing substrings in a non-character object"
 msgstr "byt ut delstrengar i ikkjeteikn-objekt"
 
-#: src/main/character.c:551
+#: src/main/character.c:785
 msgid "the first argument must be a character vector"
 msgstr "det første argumentet må vera ein teiknvektor"
 
-#: src/main/character.c:570
+#: src/main/character.c:822
 msgid "abbreviate used with non-ASCII chars"
 msgstr "abbreviate() brukt på ikkje-ASCII-data"
 
-#: src/main/character.c:591
+#: src/main/character.c:843
 msgid "non-character names"
 msgstr "ikkjeteikn-namn"
 
-#: src/main/character.c:696 src/main/grep.c:159
+#: src/main/character.c:905 src/main/character.c:1002
+#, c-format
+msgid "invalid multibyte string %d"
+msgstr "ugyldig multibyte-streng: %d"
+
+#: src/main/character.c:948 src/main/grep.c:163
 msgid "non-character argument"
 msgstr "ikkjeteikn-argument"
 
-#: src/main/character.c:805
+#: src/main/character.c:1057
 #, c-format
 msgid "decreasing range specification ('%lc-%lc')"
 msgstr "minkande område valt («%lc-%lc»)"
 
-#: src/main/character.c:891
+#: src/main/character.c:1143
 #, c-format
 msgid "decreasing range specification ('%c-%c')"
 msgstr "minkande område valt («%c-%c»)"
 
-#: src/main/character.c:1079
+#: src/main/character.c:1331
 msgid "invalid UTF-8 string 'old'"
 msgstr "ugyldig UTF-8-streng: «old»"
 
-#: src/main/character.c:1085
+#: src/main/character.c:1337
 msgid "invalid multibyte string 'old'"
 msgstr "ugyldig multibyte-streng: «old»"
 
-#: src/main/character.c:1098
+#: src/main/character.c:1350
 msgid "invalid UTF-8 string 'new'"
 msgstr "ugyldig UTF-8-streng: «new»"
 
-#: src/main/character.c:1104
+#: src/main/character.c:1356
 msgid "invalid multibyte string 'new'"
 msgstr "ugyldig multibyte-streng: «new»"
 
-#: src/main/character.c:1132 src/main/character.c:1221
+#: src/main/character.c:1384 src/main/character.c:1473
 msgid "'old' is longer than 'new'"
 msgstr "«old» er lengre enn «new»"
 
-#: src/main/character.c:1164
+#: src/main/character.c:1416
 #, c-format
 msgid "invalid input multibyte string %d"
 msgstr "ugyldig multibyte-inntekst %d"
 
-#: src/main/character.c:1271
+#: src/main/character.c:1523
 msgid "strtrim() requires a character vector"
 msgstr "strtrim() tek berre ein teiknvektor"
 
@@ -1539,15 +1595,16 @@ msgstr "ugyldig «modus»-argument"
 msgid "applies only to lists and vectors"
 msgstr "kan berre brukast på lister og vektorar"
 
-#: src/main/coerce.c:77 src/main/errors.c:1208
+#: src/main/coerce.c:77 src/main/errors.c:1194
 msgid "NAs introduced by coercion"
 msgstr "det oppstod NA-verdiar ved typeomgjering"
 
-#: src/main/coerce.c:79 src/main/errors.c:1209
-msgid "inaccurate integer conversion in coercion"
-msgstr "unøyaktig heiltalsomgjering ved typeomgjering"
+#: src/main/coerce.c:79
+#, fuzzy
+msgid "NAs introduced by coercion to integer range"
+msgstr "det oppstod NA-verdiar ved typeomgjering"
 
-#: src/main/coerce.c:81 src/main/errors.c:1210
+#: src/main/coerce.c:81 src/main/errors.c:1196
 msgid "imaginary parts discarded in coercion"
 msgstr "imaginærdel forkasta ved talomgjering"
 
@@ -1555,59 +1612,63 @@ msgstr "imaginærdel forkasta ved talomgjering"
 msgid "out-of-range values treated as 0 in coercion to raw"
 msgstr "verdiar utanfor gyldig talområde vart 0 ved omgjering til råverdiar"
 
-#: src/main/coerce.c:414
+#: src/main/coerce.c:399
 #, c-format
 msgid "invalid data of mode '%s' (too short)"
 msgstr "ugyldig data av modus «%s» (for kort)"
 
-#: src/main/coerce.c:1016
+#: src/main/coerce.c:1002
 #, c-format
 msgid "'pairlist' object cannot be coerced to type '%s'"
 msgstr "«pairlist»-objekt kan ikkje gjerast om til typen «%s»"
 
-#: src/main/coerce.c:1134
+#: src/main/coerce.c:1120
 #, c-format
 msgid "(list) object cannot be coerced to type '%s'"
 msgstr "(liste-)objekt kan ikkje gjerast om til typen «%s»"
 
-#: src/main/coerce.c:1157
+#: src/main/coerce.c:1143
 #, c-format
 msgid "(symbol) object cannot be coerced to type '%s'"
 msgstr "(symbol-)objekt kan ikkje gjerast om til typen «%s»"
 
-#: src/main/coerce.c:1173 src/main/coerce.c:1485
+#: src/main/coerce.c:1159 src/main/coerce.c:1484
 msgid "no method for coercing this S4 class to a vector"
 msgstr "manglar metode for å gjera denne S4-klassen om til ein vektor"
 
-#: src/main/coerce.c:1232
+#: src/main/coerce.c:1222
 msgid "environments cannot be coerced to other types"
 msgstr "omgjevnader kan ikkje gjerast om til andre typar"
 
-#: src/main/coerce.c:1379
+#: src/main/coerce.c:1374
 msgid "attempting to coerce non-factor"
 msgstr "prøvde å gjera om ein ikkje-faktor"
 
-#: src/main/coerce.c:1533
+#: src/main/coerce.c:1379 src/main/coerce.c:1389
+msgid "malformed factor"
+msgstr ""
+
+#: src/main/coerce.c:1532
 msgid "list argument expected"
 msgstr "venta listeargument"
 
-#: src/main/coerce.c:1541 src/main/eval.c:5322
+#: src/main/coerce.c:1540 src/main/eval.c:6255
 msgid "invalid environment"
 msgstr "ugyldig omgjevnad"
 
-#: src/main/coerce.c:1545
+#: src/main/coerce.c:1544
 msgid "argument must have length at least 1"
 msgstr "argumentet må ha lengd større enn 0"
 
-#: src/main/coerce.c:1567
+#: src/main/coerce.c:1566
 msgid "invalid body for function"
 msgstr "ugyldig funksjonskropp"
 
-#: src/main/coerce.c:1590
+#: src/main/coerce.c:1589
 msgid "invalid length 0 argument"
 msgstr "ugyldig argument av lengd 0"
 
-#: src/main/coerce.c:1605
+#: src/main/coerce.c:1604
 msgid "invalid argument list"
 msgstr "ugyldig argumentliste"
 
@@ -1619,50 +1680,47 @@ msgstr "typen «single» er ikkje implementert i R"
 msgid "unimplemented predicate"
 msgstr "ikkje-implementert predikat"
 
-#: src/main/coerce.c:2069
+#: src/main/coerce.c:2070
 #, c-format
 msgid "%s() applied to non-(list or vector) of type '%s'"
 msgstr "%s() brukt på ikkje-(liste eller vektor) av typen «%s»"
 
-#: src/main/coerce.c:2212 src/main/coerce.c:2275 src/main/coerce.c:2343
+#: src/main/coerce.c:2267 src/main/coerce.c:2331 src/main/coerce.c:2403
 #, fuzzy, c-format
 msgid "default method not implemented for type '%s'"
 msgstr "ikkje-implementert type «%s» i «%s»\n"
 
-#: src/main/coerce.c:2361
+#: src/main/coerce.c:2425
 msgid "'name' is missing"
 msgstr "«name» manglar"
 
-#: src/main/coerce.c:2368
+#: src/main/coerce.c:2432
 msgid "first argument must be a character string"
 msgstr "det første argumentet må vera ein teiknstreng"
 
-#: src/main/coerce.c:2401
-msgid "'what' must be a character string or a function"
-msgstr "«what» må vera ein teiknstreng eller ein funksjon"
+#: src/main/coerce.c:2464
+#, fuzzy
+msgid "'what' must be a function or character string"
+msgstr "«text» må vera ein teiknstreng"
 
-#: src/main/coerce.c:2405
+#: src/main/coerce.c:2468
 #, fuzzy
 msgid "'args' must be a list or expression"
 msgstr "«args» må vera ei liste"
 
-#: src/main/coerce.c:2408
-msgid "'args' must be a list"
-msgstr "«args» må vera ei liste"
-
-#: src/main/coerce.c:2412
+#: src/main/coerce.c:2475 src/main/unique.c:1345
 msgid "'envir' must be an environment"
 msgstr "«envir» må vera ein omgjevnad"
 
-#: src/main/coerce.c:2567
+#: src/main/coerce.c:2634
 msgid "invalid environment specified"
 msgstr "ugyldig omgjevnad oppgjeven"
 
-#: src/main/coerce.c:2633
+#: src/main/coerce.c:2700
 msgid "Setting class(x) to NULL;   result will no longer be an S4 object"
 msgstr "Set class(x) til NULL. Resultatet vil ikkje lenger vera eit S4-objekt."
 
-#: src/main/coerce.c:2636
+#: src/main/coerce.c:2703
 #, c-format
 msgid ""
 "Setting class(x) to multiple strings (\"%s\", \"%s\", ...); result will no "
@@ -1671,7 +1729,7 @@ msgstr ""
 "Set class(x) til fleire teiknstrengar («%s», «%s», ...). Resultatet vil "
 "ikkje lenger vera eit S4-objekt."
 
-#: src/main/coerce.c:2640
+#: src/main/coerce.c:2707
 #, c-format
 msgid ""
 "Setting class(x) to \"%s\" sets attribute to NULL; result will no longer be "
@@ -1680,18 +1738,18 @@ msgstr ""
 "Ved å setja class(x) til «%s», vert attributtet sett til NULL. Resultatet "
 "vil ikkje lenger vera eit S4-objekt."
 
-#: src/main/coerce.c:2673
+#: src/main/coerce.c:2740
 msgid "invalid replacement object to be a class string"
 msgstr "ugyldig erstattingsobjekt for å vera ein klassestreng"
 
-#: src/main/coerce.c:2694
+#: src/main/coerce.c:2761
 #, c-format
 msgid ""
 "\"%s\" can only be set as the class if the object has this type; found \"%s\""
 msgstr ""
 "«%s» kan berre setjast som klasse viss objektet har denne typen (fann «%s»)"
 
-#: src/main/coerce.c:2712
+#: src/main/coerce.c:2779
 #, c-format
 msgid ""
 "invalid to set the class to matrix unless the dimension attribute is of "
@@ -1700,650 +1758,655 @@ msgstr ""
 "kan ikkje setja klassen til «matrix» med mindre dimensjonsattributtet er av "
 "lengd 2 (var %d)"
 
-#: src/main/coerce.c:2720
+#: src/main/coerce.c:2787
 msgid ""
 "cannot set class to \"array\" unless the dimension attribute has length > 0"
 msgstr ""
 "kan ikkje setja klassen til «array» med mindre dimensjonsattributtet har "
 "lengd > 0"
 
-#: src/main/coerce.c:2756
+#: src/main/coerce.c:2823
 msgid "'value' must be non-null character string"
 msgstr "«value» må vera ein teiknstreng ulik null"
 
-#: src/main/coerce.c:2769
+#: src/main/coerce.c:2836
 msgid "invalid to change the storage mode of a factor"
 msgstr "kan ikkje endra lagringsmodus til ein faktor"
 
-#: src/main/complex.c:126
+#: src/main/complex.c:123
 msgid "invalid complex unary operator"
 msgstr "ugyldig kompleks unæroperator"
 
-#: src/main/complex.c:261
+#: src/main/complex.c:251
 msgid "unimplemented complex operation"
 msgstr "ikkje-implementert kompleks operasjon"
 
-#: src/main/complex.c:363
+#: src/main/complex.c:353
 msgid "non-numeric argument to function"
 msgstr "ikkje-numerisk argument til funksjon"
 
-#: src/main/complex.c:827
+#: src/main/complex.c:822
 msgid "invalid polynomial coefficient"
 msgstr "ugyldig polynomkoeffisient"
 
-#: src/main/complex.c:832
+#: src/main/complex.c:827
 msgid "root finding code failed"
 msgstr "feil ved rotfinning"
 
-#: src/main/connections.c:153
+#: src/main/connections.c:150
 msgid "all connections are in use"
 msgstr "alle sambanda er i bruk"
 
-#: src/main/connections.c:164
+#: src/main/connections.c:161
 msgid "connection not found"
 msgstr "fann ikkje samband"
 
-#: src/main/connections.c:175
+#: src/main/connections.c:172 src/main/connections.c:5213
 msgid "invalid connection"
 msgstr "ugyldig samband"
 
-#: src/main/connections.c:207
+#: src/main/connections.c:204
 #, c-format
 msgid "closing unused connection %d (%s)\n"
 msgstr "lukka ubrukt samband (%d) (%s)\n"
 
-#: src/main/connections.c:232 src/main/sysutils.c:619 src/main/sysutils.c:806
-#: src/main/sysutils.c:821 src/main/sysutils.c:912 src/main/sysutils.c:927
-#: src/main/sysutils.c:1023 src/main/sysutils.c:1096 src/main/sysutils.c:1106
-#: src/main/sysutils.c:1119 src/main/sysutils.c:1516
+#: src/main/connections.c:229 src/main/sysutils.c:631 src/main/sysutils.c:834
+#: src/main/sysutils.c:849 src/main/sysutils.c:978 src/main/sysutils.c:1051
+#: src/main/sysutils.c:1061 src/main/sysutils.c:1074 src/main/sysutils.c:1472
 #, c-format
 msgid "unsupported conversion from '%s' to '%s'"
 msgstr "ikkje-støtta omgjering frå «%s» til «%s»"
 
-#: src/main/connections.c:288 src/main/connections.c:304
-#: src/main/connections.c:456 src/main/connections.c:462
-#: src/main/connections.c:468 src/main/connections.c:479
-#: src/main/connections.c:486
+#: src/main/connections.c:285 src/main/connections.c:300
+#: src/main/connections.c:451 src/main/connections.c:456
+#: src/main/connections.c:461 src/main/connections.c:472
+#: src/main/connections.c:478
 #, c-format
 msgid "%s not enabled for this connection"
 msgstr "%s er ikkje slått på for dette sambandet"
 
-#: src/main/connections.c:335 src/main/connections.c:352
-#: src/main/connections.c:2916
+#: src/main/connections.c:330 src/main/connections.c:347
+#: src/main/connections.c:2910
 msgid "printing of extremely long output is truncated"
 msgstr "vising av veldig lang tekst vart trunkert"
 
-#: src/main/connections.c:375
+#: src/main/connections.c:370
 msgid "invalid char string in output conversion"
 msgstr "ugyldig teiknstreng i uttekstomgjering"
 
-#: src/main/connections.c:439
+#: src/main/connections.c:434
 #, c-format
 msgid "invalid input found on input connection '%s'"
 msgstr "fann ugyldig inndata på sambandet «%s»"
 
-#: src/main/connections.c:580
+#: src/main/connections.c:571
 #, fuzzy, c-format
 msgid "cannot open file '%ls': %s"
 msgstr "klarte ikkje opna fila «%s»: %s"
 
-#: src/main/connections.c:691
+#: src/main/connections.c:683
 msgid "connection is not open for reading"
 msgstr "samband ikkje ope for lesing"
 
-#: src/main/connections.c:696
+#: src/main/connections.c:688
 msgid "connection is not open for writing"
 msgstr "samband ikkje ope for skriving"
 
-#: src/main/connections.c:734 src/main/connections.c:2229
+#: src/main/connections.c:726 src/main/connections.c:2223
 msgid "can only truncate connections open for writing"
 msgstr "kan berre trunkera samband som er opne for skriving"
 
-#: src/main/connections.c:738 src/main/connections.c:740
+#: src/main/connections.c:730 src/main/connections.c:732
 msgid "file truncation failed"
 msgstr "feil ved filtrunkering"
 
-#: src/main/connections.c:742
+#: src/main/connections.c:734
 msgid "file truncation unavailable on this platform"
 msgstr "filtrunkering er ikkje tilgjengeleg på denne plattforma"
 
-#: src/main/connections.c:788 src/main/connections.c:792
-#: src/main/connections.c:798 src/main/connections.c:815
+#: src/main/connections.c:780 src/main/connections.c:784
+#: src/main/connections.c:790 src/main/connections.c:807
 msgid "allocation of file connection failed"
 msgstr "feil ved reservering av filsamband"
 
-#: src/main/connections.c:866 src/main/connections.c:1044
+#: src/main/connections.c:858 src/main/connections.c:1035
 #, c-format
 msgid "cannot create fifo '%s', reason '%s'"
 msgstr "klarte ikkje laga fifo-en «%s», av grunnen «%s»"
 
-#: src/main/connections.c:872
+#: src/main/connections.c:864
 #, c-format
 msgid "'%s' exists but is not a fifo"
 msgstr "«%s» finst, men er ikkje ein fifo"
 
-#: src/main/connections.c:886
+#: src/main/connections.c:878
 #, c-format
 msgid "fifo '%s' is not ready"
 msgstr "fifo-en «%s» er ikkje klar"
 
-#: src/main/connections.c:887
+#: src/main/connections.c:879
 #, c-format
 msgid "cannot open fifo '%s'"
 msgstr "klarte ikkje opna fifo-en «%s»"
 
-#: src/main/connections.c:928 src/main/connections.c:939
-#: src/main/connections.c:1104 src/main/connections.c:1123
-#: src/main/connections.c:1531 src/main/connections.c:1541
-#: src/main/connections.c:1660 src/main/connections.c:1720
-#: src/main/connections.c:2246 src/main/connections.c:2263
-#: src/main/connections.c:2572 src/main/connections.c:5305
-#: src/main/connections.c:5369
+#: src/main/connections.c:920 src/main/connections.c:931
+#: src/main/connections.c:1095 src/main/connections.c:1114
+#: src/main/connections.c:1524 src/main/connections.c:1534
+#: src/main/connections.c:1653 src/main/connections.c:1713
+#: src/main/connections.c:2240 src/main/connections.c:2257
+#: src/main/connections.c:2566 src/main/connections.c:5385
+#: src/main/connections.c:5449
 msgid "too large a block specified"
 msgstr "for stor blokk oppgjeven"
 
-#: src/main/connections.c:998 src/main/connections.c:1004
+#: src/main/connections.c:989 src/main/connections.c:995
 #, fuzzy
 msgid "allocation of fifo name failed"
 msgstr "feil ved reservering av fifo-samband"
 
-#: src/main/connections.c:1066
+#: src/main/connections.c:1057
 #, fuzzy, c-format
 msgid "cannot open fifo '%s', reason '%s'"
 msgstr "klarte ikkje opna adressa «%s», av grunnen «%s»"
 
-#: src/main/connections.c:1107 src/main/connections.c:1131
+#: src/main/connections.c:1098 src/main/connections.c:1122
 #, fuzzy
 msgid "allocation of fifo buffer failed"
 msgstr "feil ved reservering av fifo-samband"
 
-#: src/main/connections.c:1139
+#: src/main/connections.c:1130
 #, fuzzy, c-format
 msgid "cannot write FIFO '%s'"
 msgstr "klarte ikkje opna adressa «%s»"
 
-#: src/main/connections.c:1175 src/main/connections.c:1179
-#: src/main/connections.c:1185 src/main/connections.c:1201
+#: src/main/connections.c:1166 src/main/connections.c:1170
+#: src/main/connections.c:1176 src/main/connections.c:1192
 msgid "allocation of fifo connection failed"
 msgstr "feil ved reservering av fifo-samband"
 
-#: src/main/connections.c:1219 src/main/connections.c:1377
-#: src/main/connections.c:1998 src/main/connections.c:3212
-#: src/main/connections.c:4967
+#: src/main/connections.c:1210 src/main/connections.c:1369
+#: src/main/connections.c:1991 src/main/connections.c:3205
+#: src/main/connections.c:4982
 msgid "only first element of 'description' argument used"
 msgstr "berre det første elementet i «description»-argumentet vert brukt"
 
-#: src/main/connections.c:1236
+#: src/main/connections.c:1227
 msgid ""
 "fifo(\"\") only supports open = \"w+\" and open = \"w+b\": using the former"
 msgstr ""
 "fifo(\"\") støttar berre «open = \"w+\"» og «open = \"w+b\"» (brukar "
 "sistnemnde)"
 
-#: src/main/connections.c:1250 src/main/connections.c:1414
-#: src/main/connections.c:2064 src/main/connections.c:3179
-#: src/main/connections.c:3232 src/main/connections.c:3280
-#: src/main/connections.c:3567 src/main/connections.c:3683
-#: src/main/connections.c:3844 src/main/connections.c:4095
-#: src/main/connections.c:4423 src/main/connections.c:4543
-#: src/main/connections.c:4755 src/main/connections.c:5105 src/main/dcf.c:94
-#: src/main/deparse.c:352 src/main/deparse.c:438 src/main/saveload.c:2267
-#: src/main/saveload.c:2350 src/main/scan.c:933 src/main/serialize.c:2175
-#: src/main/serialize.c:2226 src/main/source.c:265
+#: src/main/connections.c:1242 src/main/connections.c:1407
+#: src/main/connections.c:2058 src/main/connections.c:3175
+#: src/main/connections.c:3226 src/main/connections.c:3274
+#: src/main/connections.c:3563 src/main/connections.c:3679
+#: src/main/connections.c:3841 src/main/connections.c:4106
+#: src/main/connections.c:4434 src/main/connections.c:4554
+#: src/main/connections.c:4768 src/main/connections.c:5180 src/main/dcf.c:93
+#: src/main/deparse.c:361 src/main/deparse.c:450 src/main/saveload.c:2269
+#: src/main/saveload.c:2350 src/main/scan.c:933 src/main/serialize.c:2216
+#: src/main/serialize.c:2267 src/main/source.c:270
 msgid "cannot open the connection"
 msgstr "klarte ikkje opna sambandet"
 
-#: src/main/connections.c:1265
+#: src/main/connections.c:1257
 msgid "fifo connections are not available on this system"
 msgstr "fifo-samband er ikkje tilgjengelege på dette systemet"
 
-#: src/main/connections.c:1295
+#: src/main/connections.c:1287
 #, fuzzy, c-format
 msgid "cannot pipe() cmd '%ls': %s"
 msgstr "klarte ikkje opna pipe()-kommandoen «%s»: %s"
 
-#: src/main/connections.c:1302
+#: src/main/connections.c:1294
 #, c-format
 msgid "cannot open pipe() cmd '%s': %s"
 msgstr "klarte ikkje opna pipe()-kommandoen «%s»: %s"
 
-#: src/main/connections.c:1471 src/main/connections.c:1791
+#: src/main/connections.c:1464 src/main/connections.c:1784
 #, c-format
 msgid "cannot open compressed file '%s', probable reason '%s'"
 msgstr "klarte ikkje opna den komprimerte fila «%s», truleg av grunnen «%s»"
 
-#: src/main/connections.c:1511
+#: src/main/connections.c:1504
 msgid "whence = \"end\" is not implemented for gzfile connections"
 msgstr "«whence = \"end\"» er ikkje implementert for gzfile-samband"
 
-#: src/main/connections.c:1516
+#: src/main/connections.c:1509
 msgid "seek on a gzfile connection returned an internal error"
 msgstr "søking i eit gzfile-samband gav ein intern feil"
 
-#: src/main/connections.c:1550 src/main/connections.c:1554
-#: src/main/connections.c:1560 src/main/connections.c:1577
+#: src/main/connections.c:1543 src/main/connections.c:1547
+#: src/main/connections.c:1553 src/main/connections.c:1570
 msgid "allocation of gzfile connection failed"
 msgstr "feil ved reservering av gzfile-samband"
 
-#: src/main/connections.c:1606
+#: src/main/connections.c:1599
 #, c-format
 msgid "cannot open bzip2-ed file '%s', probable reason '%s'"
 msgstr "klarte ikkje opna bzip2-komprimert fil «%s», truleg av grunnen «%s»"
 
-#: src/main/connections.c:1615
+#: src/main/connections.c:1608
 #, c-format
 msgid "file '%s' appears not to be compressed by bzip2"
 msgstr "fila «%s» ser ikkje ut til å vera komprimert med bzip2"
 
-#: src/main/connections.c:1624
+#: src/main/connections.c:1617
 #, c-format
 msgid "initializing bzip2 compression for file '%s' failed"
 msgstr "klarte ikkje starta bzip2-komprimering av fila «%s»"
 
-#: src/main/connections.c:1678
+#: src/main/connections.c:1671
 #, fuzzy
 msgid "allocation of overflow buffer for bzfile failed"
 msgstr "feil ved reservering av filsamband"
 
-#: src/main/connections.c:1685
+#: src/main/connections.c:1678
 #, fuzzy, c-format
 msgid ""
 "file '%s' has trailing content that appears not to be compressed by bzip2"
 msgstr "fila «%s» ser ikkje ut til å vera komprimert med bzip2"
 
-#: src/main/connections.c:1731 src/main/connections.c:1735
-#: src/main/connections.c:1741 src/main/connections.c:1758
+#: src/main/connections.c:1724 src/main/connections.c:1728
+#: src/main/connections.c:1734 src/main/connections.c:1751
 msgid "allocation of bzfile connection failed"
 msgstr "feil ved reservering av bzfile-samband"
 
-#: src/main/connections.c:1804 src/main/connections.c:5961
+#: src/main/connections.c:1797 src/main/connections.c:6046
 #, c-format
 msgid "cannot initialize lzma decoder, error %d"
 msgstr "klarte ikkje starta lzma-dekodaren (feil %d)"
 
-#: src/main/connections.c:1820
+#: src/main/connections.c:1813
 #, c-format
 msgid "cannot initialize lzma encoder, error %d"
 msgstr "klarte ikkje starta lzma-kodaren (feil %d)"
 
-#: src/main/connections.c:1948 src/main/connections.c:1952
-#: src/main/connections.c:1958 src/main/connections.c:1976
+#: src/main/connections.c:1941 src/main/connections.c:1945
+#: src/main/connections.c:1951 src/main/connections.c:1969
 msgid "allocation of xzfile connection failed"
 msgstr "feil ved reservering av xzfile-samband"
 
-#: src/main/connections.c:2035
+#: src/main/connections.c:2028
 #, c-format
 msgid "this is a %s-compressed file which this build of R does not support"
 msgstr ""
 "dette er ei %s-komprimert fil, som denne byggversjonen av R ikkje støttar"
 
-#: src/main/connections.c:2130 src/modules/X11/devX11.c:3375
+#: src/main/connections.c:2124 src/modules/X11/devX11.c:3381
 msgid "memory allocation to copy clipboard failed"
 msgstr "feil ved minnereservering til kopiering til utklippstavla"
 
-#: src/main/connections.c:2135 src/modules/X11/devX11.c:3354
-#: src/modules/X11/devX11.c:3359
+#: src/main/connections.c:2129 src/modules/X11/devX11.c:3360
+#: src/modules/X11/devX11.c:3365
 msgid "clipboard cannot be opened or contains no text"
 msgstr "utklippstavla kan ikkje opnast, eller inneheld ikkje noko tekst"
 
-#: src/main/connections.c:2146
+#: src/main/connections.c:2140
 msgid "memory allocation to open clipboard failed"
 msgstr "feil ved minnereservering til ope utklippstavle"
 
-#: src/main/connections.c:2174
+#: src/main/connections.c:2168
 #, fuzzy
 msgid "unable to open the clipboard"
 msgstr "Klarte ikkje opna utklippstavla"
 
-#: src/main/connections.c:2178
+#: src/main/connections.c:2172
 #, fuzzy
 msgid "unable to write to the clipboard"
 msgstr "Klarte ikkje skriva til utklippstavla"
 
-#: src/main/connections.c:2218
+#: src/main/connections.c:2212
 msgid "attempt to seek outside the range of the clipboard"
 msgstr "prøvde å søkja utanfor området til utklippstavla"
 
-#: src/main/connections.c:2261
+#: src/main/connections.c:2255
 msgid "clipboard connection is open for reading only"
 msgstr "utklippstavlesambandet er berre ope for lesing"
 
-#: src/main/connections.c:2281
+#: src/main/connections.c:2275
 msgid "clipboard buffer is full and output lost"
 msgstr "utklippstavlebufferen er full, og utdata gjekk tapt"
 
-#: src/main/connections.c:2302
+#: src/main/connections.c:2296
 msgid "'mode' for the clipboard must be 'r' or 'w'"
 msgstr "«mode» for utklippstavla må vera «r» eller «w»"
 
-#: src/main/connections.c:2305
+#: src/main/connections.c:2299
 msgid "'mode' for the clipboard must be 'r' on Unix"
 msgstr "«mode» for utklippstavla må vera «r» på Unix"
 
-#: src/main/connections.c:2308 src/main/connections.c:2314
-#: src/main/connections.c:2320 src/main/connections.c:2337
+#: src/main/connections.c:2302 src/main/connections.c:2308
+#: src/main/connections.c:2314 src/main/connections.c:2331
 msgid "allocation of clipboard connection failed"
 msgstr "feil ved reservering av utklippstavlesamband"
 
-#: src/main/connections.c:2406 src/main/connections.c:2410
-#: src/main/connections.c:2416
+#: src/main/connections.c:2400 src/main/connections.c:2404
+#: src/main/connections.c:2410
 msgid "allocation of terminal connection failed"
 msgstr "feil ved reservering av terminalsamband"
 
-#: src/main/connections.c:2549
+#: src/main/connections.c:2543
 msgid "attempting to add too many elements to raw vector"
 msgstr "prøvde å leggja for mange element til ein råvektor"
 
-#: src/main/connections.c:2601
+#: src/main/connections.c:2595
 msgid "attempt to seek outside the range of the raw connection"
 msgstr "prøvde å søkja utanfor området til råsambandet"
 
-#: src/main/connections.c:2612 src/main/connections.c:2616
-#: src/main/connections.c:2622 src/main/connections.c:2648
+#: src/main/connections.c:2606 src/main/connections.c:2610
+#: src/main/connections.c:2616 src/main/connections.c:2642
 msgid "allocation of raw connection failed"
 msgstr "feil ved reservering av råsamband"
 
-#: src/main/connections.c:2701
+#: src/main/connections.c:2695
 msgid "'con' is not a rawConnection"
 msgstr "«con» er ikkje eit rawConnection-samband"
 
-#: src/main/connections.c:2704
+#: src/main/connections.c:2698
 msgid "'con' is not an output rawConnection"
 msgstr "«con» er ikkje ein ut-«rawConnection»"
 
-#: src/main/connections.c:2742
+#: src/main/connections.c:2736
 #, fuzzy
 msgid "too many characters for text connection"
 msgstr "klarte ikkje reservera minne til tekstsamband"
 
-#: src/main/connections.c:2747
+#: src/main/connections.c:2741
 msgid "cannot allocate memory for text connection"
 msgstr "klarte ikkje reservera minne til tekstsamband"
 
-#: src/main/connections.c:2796
+#: src/main/connections.c:2790
 msgid "seek is not relevant for text connection"
 msgstr "«seek» er ikkje relevant for tekstsamband"
 
-#: src/main/connections.c:2804 src/main/connections.c:2808
-#: src/main/connections.c:2814 src/main/connections.c:2827
-#: src/main/connections.c:3012 src/main/connections.c:3016
-#: src/main/connections.c:3022 src/main/connections.c:3035
-#: src/main/connections.c:3041
+#: src/main/connections.c:2798 src/main/connections.c:2802
+#: src/main/connections.c:2808 src/main/connections.c:2821
+#: src/main/connections.c:3008 src/main/connections.c:3012
+#: src/main/connections.c:3018 src/main/connections.c:3031
+#: src/main/connections.c:3037
 msgid "allocation of text connection failed"
 msgstr "feil ved reservering av tekstsamband"
 
-#: src/main/connections.c:2989
+#: src/main/connections.c:2983
 msgid "text connection: appending to a non-existent char vector"
 msgstr "tekstsamband: legg til på ein teiknvektor som ikkje finst"
 
-#: src/main/connections.c:3093
+#: src/main/connections.c:3089
 msgid "unsupported mode"
 msgstr "ikkje-støtta modus"
 
-#: src/main/connections.c:3115
+#: src/main/connections.c:3111
 msgid "'con' is not a textConnection"
 msgstr "«con» er ikkje ein «textConnection»"
 
-#: src/main/connections.c:3118
+#: src/main/connections.c:3114
 msgid "'con' is not an output textConnection"
 msgstr "«con» er ikkje ein ut-«textConnection»"
 
-#: src/main/connections.c:3192
-msgid "sockets are not available on this system"
-msgstr "soklar er ikkje tilgjengelege på dette systemet"
-
-#: src/main/connections.c:3260 src/main/connections.c:3309
-#: src/main/connections.c:3320 src/main/connections.c:3367
-#: src/main/connections.c:3392 src/main/connections.c:3415
-#: src/main/connections.c:3427 src/main/connections.c:3543
-#: src/main/connections.c:3668 src/main/connections.c:5408
+#: src/main/connections.c:3254 src/main/connections.c:3303
+#: src/main/connections.c:3314 src/main/connections.c:3361
+#: src/main/connections.c:3388 src/main/connections.c:3411
+#: src/main/connections.c:3423 src/main/connections.c:3539
+#: src/main/connections.c:3664 src/main/connections.c:5489
 msgid "'con' is not a connection"
 msgstr "«con» er ikkje eit samband"
 
-#: src/main/connections.c:3263
+#: src/main/connections.c:3257
 msgid "cannot open standard connections"
 msgstr "klarte ikkje opna standardsamband"
 
-#: src/main/connections.c:3265
+#: src/main/connections.c:3259
 msgid "connection is already open"
 msgstr "sambandet er alt ope"
 
-#: src/main/connections.c:3298
+#: src/main/connections.c:3292
 msgid "unknown 'rw' value"
 msgstr "ukjend «rw»-verdi"
 
-#: src/main/connections.c:3369
+#: src/main/connections.c:3363
 msgid "cannot close standard connections"
 msgstr "klarte ikkje lukka standardsambanda"
 
-#: src/main/connections.c:3372
+#: src/main/connections.c:3366
 #, fuzzy
 msgid "cannot close 'output' sink connection"
 msgstr "klarte ikkje lukka utsink-samband"
 
-#: src/main/connections.c:3374
+#: src/main/connections.c:3368
 #, fuzzy
 msgid "cannot close 'message' sink connection"
 msgstr "klarte ikkje lukka meldingssink-samband"
 
-#: src/main/connections.c:3394 src/main/connections.c:5123
-#: src/main/connections.c:5131 src/main/serialize.c:1996
-#: src/main/serialize.c:2004
+#: src/main/connections.c:3390 src/main/connections.c:5198
+#: src/main/connections.c:5206 src/main/serialize.c:2035
+#: src/main/serialize.c:2043
 msgid "connection is not open"
 msgstr "sambandet er ikkje ope"
 
-#: src/main/connections.c:3490 src/main/connections.c:3502
+#: src/main/connections.c:3486 src/main/connections.c:3498
 #, fuzzy
 msgid "line longer than buffer size"
 msgstr "Linja er lengre enn bufferstorleiken"
 
-#: src/main/connections.c:3574 src/main/connections.c:3576
-#: src/main/connections.c:3852 src/main/connections.c:4406
-#: src/main/connections.c:4431 src/main/connections.c:5132 src/main/dcf.c:101
-#: src/main/scan.c:936 src/main/scan.c:940 src/main/serialize.c:1998
-#: src/main/source.c:272
+#: src/main/connections.c:3570 src/main/connections.c:3572
+#: src/main/connections.c:3849 src/main/connections.c:4417
+#: src/main/connections.c:4442 src/main/connections.c:5207 src/main/dcf.c:100
+#: src/main/scan.c:936 src/main/scan.c:940 src/main/serialize.c:2037
+#: src/main/source.c:277
 msgid "cannot read from this connection"
 msgstr "klarte ikkje lesa frå dette sambandet"
 
-#: src/main/connections.c:3588 src/main/connections.c:3610
+#: src/main/connections.c:3584 src/main/connections.c:3606
 msgid "cannot allocate buffer in readLines"
 msgstr "klarte ikkje reservera buffer i readLines"
 
-#: src/main/connections.c:3623
+#: src/main/connections.c:3619
 #, c-format
 msgid "line %d appears to contain an embedded nul"
 msgstr ""
 
-#: src/main/connections.c:3640
+#: src/main/connections.c:3636
 #, c-format
 msgid "incomplete final line found on '%s'"
 msgstr "fann ufullstendig sluttlinje på «%s»"
 
-#: src/main/connections.c:3646
+#: src/main/connections.c:3642
 msgid "too few lines read in readLines"
 msgstr "for få linjer å lesa i readLines"
 
-#: src/main/connections.c:3749
+#: src/main/connections.c:3746
 msgid "incomplete string at end of file has been discarded"
 msgstr "forkasta ufullstendig streng på slutten av fila"
 
-#: src/main/connections.c:3755
+#: src/main/connections.c:3752
 msgid "null terminator not found: breaking string at 10000 bytes"
 msgstr "fann ingen nullterminator: bryt strengen etter 10 000 byte"
 
-#: src/main/connections.c:3820
+#: src/main/connections.c:3817
 msgid "can only read from a binary connection"
 msgstr "kan berre lesa frå eit binærsamband"
 
-#: src/main/connections.c:3869 src/main/connections.c:4176
+#: src/main/connections.c:3866 src/main/connections.c:4187
 msgid "size changing is not supported for complex vectors"
 msgstr "endring av storleik er ikkje støtta for komplekse vektorar"
 
-#: src/main/connections.c:3907 src/main/connections.c:3925
-#: src/main/connections.c:3951 src/main/connections.c:4010
-#: src/main/connections.c:4030 src/main/connections.c:4157
-#: src/main/connections.c:4170 src/main/connections.c:4229
-#: src/main/connections.c:4261
+#: src/main/connections.c:3905 src/main/connections.c:3923
+#: src/main/connections.c:3949 src/main/connections.c:3993
+#: src/main/connections.c:4024 src/main/connections.c:4044
+#: src/main/connections.c:4168 src/main/connections.c:4181
+#: src/main/connections.c:4240 src/main/connections.c:4272
 #, c-format
 msgid "size %d is unknown on this machine"
 msgstr "storleiken %d er ukjend på denne maskina"
 
-#: src/main/connections.c:3936
+#: src/main/connections.c:3934
 msgid "raw is always of size 1"
 msgstr "raw er alltid av storleik 1"
 
-#: src/main/connections.c:3959
+#: src/main/connections.c:3957
 msgid "'signed = FALSE' is only valid for integers of sizes 1 and 2"
 msgstr ""
 
-#: src/main/connections.c:4060
+#: src/main/connections.c:4071
 msgid "'x' is not an atomic vector type"
 msgstr "«x» er ikkje ein atomsk vektortype"
 
-#: src/main/connections.c:4066
+#: src/main/connections.c:4077
 msgid "can only write to a binary connection"
 msgstr "kan berre skriva til binærsamband"
 
-#: src/main/connections.c:4085
+#: src/main/connections.c:4096
 msgid "only 2^31-1 bytes can be written to a raw vector"
 msgstr "berre 2³¹ − 1 byte kan skrivast til ein råvektor"
 
-#: src/main/connections.c:4087
+#: src/main/connections.c:4098
 #, fuzzy
 msgid "only 2^31-1 bytes can be written in a single writeBin() call"
 msgstr "berre 2³¹ − 1 byte kan skrivast i eit einskild «readBin()»-kall"
 
-#: src/main/connections.c:4136 src/main/connections.c:4289
-#: src/main/connections.c:4570 src/main/connections.c:4610
+#: src/main/connections.c:4147 src/main/connections.c:4300
+#: src/main/connections.c:4581 src/main/connections.c:4621
 msgid "problem writing to connection"
 msgstr "feil ved skriving til samband"
 
-#: src/main/connections.c:4181
+#: src/main/connections.c:4192
 msgid "size changing is not supported for raw vectors"
 msgstr "endring av storleik er ikkje støtta for råvektorar"
 
-#: src/main/connections.c:4324 src/main/connections.c:4328
-#: src/main/connections.c:4367
+#: src/main/connections.c:4335 src/main/connections.c:4339
+#: src/main/connections.c:4378
 msgid "invalid UTF-8 input in readChar()"
 msgstr "ugyldig UTF-8-data i readChar()"
 
-#: src/main/connections.c:4434
+#: src/main/connections.c:4445
 msgid "can only read in bytes in a non-UTF-8 MBCS locale"
 msgstr "kan berre lesa i byte i eit ikkje-UTF-8-basert MBCS-lokale"
 
-#: src/main/connections.c:4506
+#: src/main/connections.c:4517
 msgid "'object' is too short"
 msgstr "«object» er for kort"
 
-#: src/main/connections.c:4559
+#: src/main/connections.c:4570
 msgid "writeChar: more bytes requested than are in the string - will zero-pad"
 msgstr ""
 "writeChar: ba om fleire byte enn det er i strengen (nullverdiar vert lagde "
 "til på slutten)"
 
-#: src/main/connections.c:4584
+#: src/main/connections.c:4595
 msgid ""
 "writeChar: more characters requested than are in the string - will zero-pad"
 msgstr ""
 "writeChar: ba om fleire teikn enn det er i strengen (nullverdiar vert lagde "
 "til på slutten)"
 
-#: src/main/connections.c:4638
+#: src/main/connections.c:4649
 #, fuzzy
 msgid "maximum number of pushback lines exceeded"
 msgstr "meir enn maks tal på fargar brukt"
 
-#: src/main/connections.c:4644 src/main/connections.c:4648
-#: src/main/connections.c:4685 src/main/connections.c:4693
+#: src/main/connections.c:4655 src/main/connections.c:4659
+#: src/main/connections.c:4696 src/main/connections.c:4704
 #, fuzzy
 msgid "could not allocate space for pushback"
 msgstr "klarte ikkje reservera plass til pushBack"
 
-#: src/main/connections.c:4676
+#: src/main/connections.c:4687
 msgid "can only push back on open readable connections"
 msgstr "kan berre gjera «push back» på opne leselege samband"
 
-#: src/main/connections.c:4678
+#: src/main/connections.c:4689
 msgid "can only push back on text-mode connections"
 msgstr "kan berre gjera «push back» på tekstmodus-samband"
 
-#: src/main/connections.c:4740 src/main/connections.c:4810
+#: src/main/connections.c:4753 src/main/connections.c:4823
 msgid "sink stack is full"
 msgstr "sink-stakken er full"
 
-#: src/main/connections.c:4743
+#: src/main/connections.c:4756
 msgid "cannot switch output to stdin"
 msgstr "klarte ikkje byta utdata til stdin"
 
-#: src/main/connections.c:4770
+#: src/main/connections.c:4783
 msgid "no sink to remove"
 msgstr "ingen sink å fjerna"
 
-#: src/main/connections.c:4892
+#: src/main/connections.c:4903
 #, fuzzy
 msgid "there is no connection NA"
 msgstr "sambandet %d finst ikkje"
 
-#: src/main/connections.c:4894
+#: src/main/connections.c:4905
 #, c-format
 msgid "there is no connection %d"
 msgstr "sambandet %d finst ikkje"
 
-#: src/main/connections.c:5029
+#: src/main/connections.c:5039
+#, fuzzy
+msgid "method = \"wininet\" is only supported on Windows"
+msgstr "nsl() er ikkje støtta på denne plattforma"
+
+#: src/main/connections.c:5103
 msgid ""
 "file(\"\") only supports open = \"w+\" and open = \"w+b\": using the former"
 msgstr ""
 "file(\"\") støttar berre «open = \"w+\"» og «open = \"w+b\"» (brukar "
 "førstnemnde)"
 
-#: src/main/connections.c:5083 src/modules/internet/internet.c:115
-#: src/modules/internet/internet.c:569
-msgid "unsupported URL scheme"
-msgstr "ikkje-støtta URL-skjema"
+#: src/main/connections.c:5157
+#, fuzzy
+msgid "URL scheme unsupported by this method"
+msgstr "ICU er ikkje støtte på dette bygget"
 
-#: src/main/connections.c:5173
+#: src/main/connections.c:5253
 msgid "file stream does not have gzip magic number"
 msgstr "filstraumen har ikkje det magiske talet til gzip"
 
-#: src/main/connections.c:5184
+#: src/main/connections.c:5264
 msgid "file stream does not have valid gzip header"
 msgstr "filstraumen har ikkje eit gyldig gzip-hovud"
 
-#: src/main/connections.c:5249
+#: src/main/connections.c:5329
 msgid "writing error whilst flushing 'gzcon' connection"
 msgstr "feil ved tømming av gzon-samband"
 
-#: src/main/connections.c:5351
+#: src/main/connections.c:5431
 #, c-format
 msgid "crc error %x %x\n"
 msgstr "CRC-feil %x %x\n"
 
-#: src/main/connections.c:5378
+#: src/main/connections.c:5458
 msgid "write error on 'gzcon' connection"
 msgstr "feil ved skriving til gzcon-samband"
 
-#: src/main/connections.c:5412
+#: src/main/connections.c:5493
 msgid "'level' must be one of 0 ... 9"
 msgstr "«level» må vera éin av 0, 1, ..., 9"
 
-#: src/main/connections.c:5415
+#: src/main/connections.c:5496
 msgid "'allowNonCompression' must be TRUE or FALSE"
 msgstr "«allowNonCompression» må vera «TRUE» (sann) eller «FALSE» (usann)"
 
-#: src/main/connections.c:5418
+#: src/main/connections.c:5499
+#, fuzzy
+msgid "'text' must be TRUE or FALSE"
+msgstr "«all.x» må vera TRUE eller FALSE"
+
+#: src/main/connections.c:5502
 #, fuzzy
 msgid "this is already a 'gzcon' connection"
 msgstr "dette er alt eit gzcon-samband"
 
-#: src/main/connections.c:5424
+#: src/main/connections.c:5508
 msgid "can only use read- or write- binary connections"
 msgstr "kan berre bruka lese- eller skrive-binærsamband"
 
-#: src/main/connections.c:5427
+#: src/main/connections.c:5511
 msgid "using a text-mode 'file' connection may not work correctly"
 msgstr "bruk av tekstmodus-«file»-samband vil kanskje ikkje fungera skikkeleg"
 
-#: src/main/connections.c:5430
+#: src/main/connections.c:5514
 #, fuzzy
 msgid ""
 "cannot create a 'gzcon' connection from a writable textConnection; maybe use "
@@ -2352,76 +2415,72 @@ msgstr ""
 "kan ikkje oppretta eit gzcon-samband frå ein skrivar «textConnection» (du "
 "kan prøva å bruka «rawConnection»)"
 
-#: src/main/connections.c:5433 src/main/connections.c:5437
-#: src/main/connections.c:5444 src/main/connections.c:5458
+#: src/main/connections.c:5517 src/main/connections.c:5521
+#: src/main/connections.c:5528 src/main/connections.c:5542
 msgid "allocation of 'gzcon' connection failed"
 msgstr "feil ved reservering av gzcon-samband"
 
-#: src/main/connections.c:5644
+#: src/main/connections.c:5729
 msgid "not a list of sockets"
 msgstr "ikkje ei liste over soklar"
 
-#: src/main/connections.c:5649
+#: src/main/connections.c:5734
 msgid "bad write indicators"
 msgstr "ugyldig skriveindikatorar"
 
-#: src/main/connections.c:5660
+#: src/main/connections.c:5745
 msgid "not a socket connection"
 msgstr "ikkje eit sokkelsamband"
 
-#: src/main/connections.c:5905
+#: src/main/connections.c:5990
 msgid "unknown compression, assuming none"
 msgstr "ukjend komprimering – antek ukomprimerte data"
 
-#: src/main/connections.c:6023 src/main/connections.c:6027
-#: src/main/connections.c:6033
+#: src/main/connections.c:6108 src/main/connections.c:6112
+#: src/main/connections.c:6118
 #, fuzzy, c-format
 msgid "allocation of %s connection failed"
 msgstr "feil ved reservering av råsamband"
 
-#: src/main/context.c:282
+#: src/main/context.c:316
 #, fuzzy
 msgid "no loop for break/next, jumping to top level"
 msgstr "inga lykkje å bryta ut av (hoppar til toppnivå)"
 
-#: src/main/context.c:290
+#: src/main/context.c:324
 msgid "no function to return from, jumping to top level"
 msgstr "ingen funksjon å returnera frå (hoppar til toppnivå)"
 
-#: src/main/context.c:302
+#: src/main/context.c:339
 msgid "target context is not on the stack"
 msgstr "målkonteksten er ikkje på stakken"
 
-#: src/main/context.c:324 src/main/context.c:340 src/main/context.c:407
-#: src/main/context.c:428 src/main/context.c:440 src/main/context.c:452
+#: src/main/context.c:361 src/main/context.c:377 src/main/context.c:444
+#: src/main/context.c:465 src/main/context.c:477 src/main/context.c:489
 msgid "not that many frames on the stack"
 msgstr "så mange rammer finst ikkje på stakken"
 
-#: src/main/context.c:357
+#: src/main/context.c:394
 msgid "only positive values of 'n' are allowed"
 msgstr "berre positive verdiar av «n» er tilletne"
 
-#: src/main/context.c:478
-msgid "no function to restart"
-msgstr "ingen funksjon å starta på nytt"
-
-#: src/main/context.c:515
+#: src/main/context.c:526
 msgid "number of contexts must be positive"
 msgstr "talet på kontekstar må vera positiv"
 
-#: src/main/context.c:528
+#: src/main/context.c:539
 msgid "no browser context to query"
 msgstr "manglar browser-kontekst å spørja"
 
-#: src/main/context.c:546
+#: src/main/context.c:557
 msgid "not that many calls to browser are active"
 msgstr "ikkje så mange kall til browser er aktive"
 
-#: src/main/context.c:560
+#: src/main/context.c:571
 msgid "not that many functions on the call stack"
 msgstr "så mange funksjonar finst ikkje på stakken"
 
-#: src/main/context.c:645
+#: src/main/context.c:656
 msgid "internal error in 'do_sys'"
 msgstr "intern feil i «do_sys»"
 
@@ -2430,40 +2489,40 @@ msgstr "intern feil i «do_sys»"
 msgid "integer overflow in 'cumsum'; use 'cumsum(as.numeric(.))'"
 msgstr "Heiltalsoverflyt i «cumsum». Bruk «cumsum(as.numeric(.))»."
 
-#: src/main/cum.c:178
+#: src/main/cum.c:179
 #, fuzzy
-msgid "'cummin' not defined for complex numbers"
+msgid "'cummax' not defined for complex numbers"
 msgstr "min/max er ikkje definert for komplekse tal"
 
-#: src/main/cum.c:181
+#: src/main/cum.c:182
 #, fuzzy
-msgid "'cummax' not defined for complex numbers"
+msgid "'cummin' not defined for complex numbers"
 msgstr "min/max er ikkje definert for komplekse tal"
 
-#: src/main/cum.c:206 src/main/cum.c:230
+#: src/main/cum.c:209 src/main/cum.c:236
 msgid "unknown cumxxx function"
 msgstr "ukjend cumxxx-funksjon"
 
-#: src/main/datetime.c:548 src/main/datetime.c:556 src/main/datetime.c:570
-#: src/main/datetime.c:575
+#: src/main/datetime.c:554 src/main/datetime.c:562 src/main/datetime.c:576
+#: src/main/datetime.c:581
 msgid "problem with setting timezone"
 msgstr "feil ved setjing av tidssone"
 
-#: src/main/datetime.c:560
+#: src/main/datetime.c:566
 msgid "cannot set timezones on this system"
 msgstr "kan ikkje setja tidssonar på dette systemet"
 
-#: src/main/datetime.c:582 src/main/datetime.c:584
+#: src/main/datetime.c:588 src/main/datetime.c:590
 msgid "problem with unsetting timezone"
 msgstr "feil ved avsetjing av tidssone"
 
-#: src/main/datetime.c:804 src/main/datetime.c:806 src/main/datetime.c:901
-#: src/main/datetime.c:1240 src/main/datetime.c:1242
+#: src/main/datetime.c:810 src/main/datetime.c:812 src/main/datetime.c:908
+#: src/main/datetime.c:1258 src/main/datetime.c:1260
 #, fuzzy
 msgid "zero-length component in non-empty \"POSIXlt\" structure"
 msgstr "komponent av lengd null i ikkje-tom POSIXlt-struktur"
 
-#: src/main/dcf.c:113 src/main/dcf.c:181 src/main/dcf.c:253
+#: src/main/dcf.c:112 src/main/dcf.c:181 src/main/dcf.c:253
 msgid "could not allocate memory for 'read.dcf'"
 msgstr "klarte ikkje reservera minne til «read.dcf»"
 
@@ -2477,81 +2536,87 @@ msgstr "Fann framhaldslinje som startar med «%s ...» på starten av posten."
 msgid "Line starting '%s ...' is malformed!"
 msgstr "Linja som startar med «%s ...» har feil format."
 
-#: src/main/debug.c:45
-msgid "argument must be a closure"
-msgstr "argumentet må vera ei omslutting"
-
-#: src/main/debug.c:76
+#: src/main/debug.c:46 src/main/debug.c:76
 msgid "argument must be a function"
 msgstr "argumentet må vera ein funksjon"
 
-#: src/main/debug.c:132 src/main/debug.c:166 src/main/debug.c:224
+#: src/main/debug.c:111
+#, fuzzy, c-format
+msgid "Value for '%s' must be TRUE or FALSE"
+msgstr "«all.x» må vera TRUE eller FALSE"
+
+#: src/main/debug.c:139 src/main/debug.c:167 src/main/debug.c:241
 msgid "argument must not be a function"
 msgstr "argumentet kan ikkje vera ein funksjon"
 
-#: src/main/debug.c:135
+#: src/main/debug.c:142
 msgid "cannot trace NULL"
 msgstr "kan ikkje spora NULL"
 
-#: src/main/debug.c:139
+#: src/main/debug.c:146
 msgid "'tracemem' is not useful for promise and environment objects"
 msgstr "«tracemem» er ikkje nyttig for promise- og omgjevnadsobjekt"
 
-#: src/main/debug.c:142
+#: src/main/debug.c:149
 msgid "'tracemem' is not useful for weak reference or external pointer objects"
 msgstr ""
 "«tracemem» er ikkje nyttig for svake referansar eller eksternpeikar-objekt"
 
-#: src/main/debug.c:148 src/main/debug.c:171
+#: src/main/debug.c:180 src/main/debug.c:187
 msgid "R was not compiled with support for memory profiling"
 msgstr "R vart ikkje kompilert med støtte for minneprofilering"
 
-#: src/main/deparse.c:152 src/main/sprintf.c:213 src/main/sprintf.c:245
+#: src/main/deparse.c:156 src/main/sprintf.c:216 src/main/sprintf.c:248
 msgid "too few arguments"
 msgstr "for få argument"
 
-#: src/main/deparse.c:159
+#: src/main/deparse.c:163
 #, fuzzy
 msgid "invalid 'cutoff' value for 'deparse', using default"
 msgstr "ugyldig «cutoff» for deparse (brukar standardverdien)"
 
-#: src/main/deparse.c:247
+#: src/main/deparse.c:254
 msgid "deparse of an S4 object will not be source()able"
 msgstr "deparse på S4-objekt kan ikkje seinare source()-ast"
 
-#: src/main/deparse.c:249
+#: src/main/deparse.c:256
 msgid "deparse may be incomplete"
 msgstr "deparse-resultatet kan vera ufullstendig"
 
-#: src/main/deparse.c:251
+#: src/main/deparse.c:258
 msgid "deparse may be not be source()able in R < 2.7.0"
 msgstr "deparse-resultatet kan kanskje ikkje source()-ast på R < 2.7.0"
 
-#: src/main/deparse.c:369 src/main/deparse.c:461 src/main/deparse.c:467
+#: src/main/deparse.c:350 src/main/deparse.c:400 src/main/source.c:206
+#, fuzzy
+msgid "'file' must be a character string or connection"
+msgstr "«what» må vera ein teiknstreng eller ein funksjon"
+
+#: src/main/deparse.c:378 src/main/deparse.c:473 src/main/deparse.c:479
 msgid "wrote too few characters"
 msgstr "skreiv for få teikn"
 
-#: src/main/deparse.c:391
+#: src/main/deparse.c:402
 msgid "character arguments expected"
 msgstr "venta teiknargument"
 
-#: src/main/deparse.c:394
+#: src/main/deparse.c:405
 #, fuzzy
 msgid "zero-length argument"
 msgstr "argument av lengd null"
 
-#: src/main/deparse.c:401
+#: src/main/deparse.c:412
 msgid "'opts' should be small non-negative integer"
 msgstr "«opts» må vera eit lite, ikkje-negativt tal"
 
-#: src/main/deparse.c:411 src/main/envir.c:1764 src/main/envir.c:1846
-#: src/main/eval.c:569 src/main/eval.c:1251 src/main/eval.c:3627
-#: src/main/saveload.c:1978 src/main/saveload.c:2309 src/main/serialize.c:2727
+#: src/main/deparse.c:422 src/main/envir.c:1898 src/main/envir.c:1983
+#: src/main/eval.c:626 src/main/eval.c:1423 src/main/eval.c:4246
+#: src/main/saveload.c:1980 src/main/saveload.c:2312 src/main/serialize.c:2773
 #, c-format
 msgid "object '%s' not found"
 msgstr "fann ikkje objektet «%s»"
 
-#: src/main/deparse.c:1519
+#: src/main/deparse.c:1592
 msgid "badly formed function expression"
 msgstr "feilutforma funksjonsuttrykk"
 
@@ -2560,251 +2625,234 @@ msgstr "feilutforma funksjonsuttrykk"
 msgid "the base graphics system is not registered"
 msgstr "for mange grafikksystem registrerte"
 
-#: src/main/devices.c:165 src/main/devices.c:172
+#: src/main/devices.c:166 src/main/devices.c:174
 msgid "no active or default device"
 msgstr "inga verksam eller standard eining"
 
-#: src/main/devices.c:385 src/main/devices.c:447
+#: src/main/devices.c:388 src/main/devices.c:450
 msgid "too many open devices"
 msgstr "for mange opne einingar"
 
-#: src/main/devices.c:474
+#: src/main/devices.c:491
 msgid "not enough memory to allocate device (in GEcreateDevDesc)"
 msgstr "ikkje nok minne å tildela eininga (i GEcreateDevDesc)"
 
-#: src/main/devices.c:515
+#: src/main/devices.c:532
 msgid "Hit <Return> to see next plot: "
 msgstr "Trykk «Enter» for å sjå det neste plottet: "
 
-#: src/main/dotcode.c:112 src/main/dotcode.c:142
+#: src/main/dotcode.c:127 src/main/dotcode.c:157
 msgid "NULL value passed as symbol address"
 msgstr "NULL-verdi send som symboladresse"
 
-#: src/main/dotcode.c:133
+#: src/main/dotcode.c:148
 #, c-format
 msgid "Unimplemented type %d in createRSymbolObject"
 msgstr "Ikkje-implementert type «%d» i createRSymbolObject"
 
-#: src/main/dotcode.c:147 src/main/dotcode.c:237
+#: src/main/dotcode.c:162 src/main/dotcode.c:260
 #, c-format
 msgid "symbol '%s' is too long"
 msgstr "symbolet «%s» er for langt"
 
-#: src/main/dotcode.c:159
+#: src/main/dotcode.c:174
 #, fuzzy
 msgid ""
 "first argument must be a string (of length 1) or native symbol reference"
 msgstr "«name» må vera ein streng (av lengd 1) eller ein symbolreferanse"
 
-#: src/main/dotcode.c:201 src/main/dotcode.c:563
+#: src/main/dotcode.c:224 src/main/dotcode.c:1240
 msgid "too many arguments in foreign function call"
 msgstr "for mange argument i eksternt funksjonskall"
 
-#: src/main/dotcode.c:213
+#: src/main/dotcode.c:236
 msgid "PACKAGE = \"\" is invalid"
 msgstr ""
 
-#: src/main/dotcode.c:269 src/main/dotcode.c:274 src/main/dotcode.c:279
-#: src/main/dotcode.c:284
+#: src/main/dotcode.c:292 src/main/dotcode.c:297 src/main/dotcode.c:302
+#: src/main/dotcode.c:307
 #, fuzzy, c-format
 msgid "\"%s\" not available for %s() for package \"%s\""
 msgstr "%s er ikkje tilgjengeleg for eininga"
 
-#: src/main/dotcode.c:289
+#: src/main/dotcode.c:312
 #, c-format
 msgid "%s symbol name \"%s\" not in DLL for package \"%s\""
 msgstr "%s symbolnamnet «%s» finst ikkje i DLL-fila for pakken «%s»"
 
-#: src/main/dotcode.c:294
+#: src/main/dotcode.c:317
 #, c-format
 msgid "%s symbol name \"%s\" not in load table"
 msgstr "%s symbolnamnet «%s» finst ikkje i lastetabellen"
 
-#: src/main/dotcode.c:348 src/main/dotcode.c:352 src/main/dotcode.c:362
-#: src/main/dotcode.c:427 src/main/dotcode.c:434
+#: src/main/dotcode.c:368 src/main/dotcode.c:370 src/main/dotcode.c:380
+#: src/main/dotcode.c:445 src/main/dotcode.c:452
 #, fuzzy, c-format
 msgid "'%s' used more than once"
 msgstr "DUP brukt meir enn éin gong"
 
-#: src/main/dotcode.c:358
+#: src/main/dotcode.c:376
 msgid "DLL name is too long"
 msgstr "DLL-namnet er for langt"
 
-#: src/main/dotcode.c:403
+#: src/main/dotcode.c:421
 msgid "PACKAGE argument must be a single character string"
 msgstr "PACKAGE-argumentet må vera ein einskild tekststreng"
 
-#: src/main/dotcode.c:409
+#: src/main/dotcode.c:427
 msgid "PACKAGE argument is too long"
 msgstr "PACKAGE-argumentet er for langt"
 
-#: src/main/dotcode.c:474
+#: src/main/dotcode.c:492
 msgid "no arguments supplied"
 msgstr "ingen argument oppgjevne"
 
-#: src/main/dotcode.c:475 src/main/seq.c:913
+#: src/main/dotcode.c:493 src/main/seq.c:911
 msgid "too many arguments"
 msgstr "for mange argument"
 
-#: src/main/dotcode.c:512 src/main/dotcode.c:554 src/main/dotcode.c:1397
+#: src/main/dotcode.c:530 src/main/dotcode.c:1232 src/main/dotcode.c:1420
 #, fuzzy
 msgid "'.NAME' is missing"
 msgstr "«EXPR» manglar"
 
-#: src/main/dotcode.c:521 src/main/dotcode.c:570 src/main/dotcode.c:1418
+#: src/main/dotcode.c:539 src/main/dotcode.c:1247 src/main/dotcode.c:1441
 #, fuzzy, c-format
 msgid "Incorrect number of arguments (%d), expecting %d for '%s'"
 msgstr "Feil tal på argument (%d). Venta %d for %s."
 
-#: src/main/dotcode.c:1227 src/main/dotcode.c:2276
+#: src/main/dotcode.c:1216 src/main/dotcode.c:2290
 msgid "too many arguments, sorry"
 msgstr "for mange argument"
 
-#: src/main/dotcode.c:1261 src/main/dotcode.c:1278 src/main/engine.c:2993
+#: src/main/dotcode.c:1284 src/main/dotcode.c:1301 src/main/engine.c:3013
 msgid "invalid graphics state"
 msgstr "ugyldig grafikktilstand"
 
-#: src/main/dotcode.c:1357
+#: src/main/dotcode.c:1380
 msgid "NULL value for DLLInfoReference when looking for DLL"
 msgstr "NULL-verdi for DLLInfoReference ved opning av DLL"
 
-#: src/main/dotcode.c:1458
+#: src/main/dotcode.c:1481
 #, fuzzy, c-format
 msgid "wrong type for argument %d in call to %s"
 msgstr "Feil type for argument %d i kall til %s"
 
-#: src/main/dotcode.c:1470
-#, c-format
-msgid ""
-"explicit request not to duplicate arguments in call to '%s', but argument %d "
-"is of the wrong type (%d != %d)"
-msgstr ""
-"direkte førespurnad om å ikkje duplisera argument i kall til «%s», men "
-"argumentet %d har feil type (%d != %d)"
-
-#: src/main/dotcode.c:1493
+#: src/main/dotcode.c:1510
 #, fuzzy, c-format
 msgid "long vectors (argument %d) are not supported in %s"
 msgstr "symbolske lenkjer er ikkje støtta på denne plattforma"
 
-#: src/main/dotcode.c:1524
+#: src/main/dotcode.c:1541
 #, c-format
 msgid "NAs in foreign function call (arg %d)"
 msgstr "NA-verdiar i kall av ekstern funksjon (argument %d)"
 
-#: src/main/dotcode.c:1547
+#: src/main/dotcode.c:1564
 #, c-format
 msgid "NA/NaN/Inf in foreign function call (arg %d)"
 msgstr "NA-/NaN/Inf-verdiar i kall av ekstern funksjon (argument %d)"
 
-#: src/main/dotcode.c:1552
-msgid "single values not returned if not duplicated"
-msgstr ""
-
-#: src/main/dotcode.c:1578
+#: src/main/dotcode.c:1594
 #, c-format
 msgid "complex NA/NaN/Inf in foreign function call (arg %d)"
 msgstr "komplekse NA-/NaN/Inf-verdiar i kall av ekstern funksjon (argument %d)"
 
-#: src/main/dotcode.c:1597
-msgid "character variables must be duplicated in .C/.Fortran"
-msgstr "teiknvariablar må dupliserast i .C/.Fortran"
-
-#: src/main/dotcode.c:1602
+#: src/main/dotcode.c:1616
 msgid "only first string in char vector used in .Fortran"
 msgstr "berre den første strengen i ein teiknvektor vert brukt i .Fortran"
 
-#: src/main/dotcode.c:1645 src/main/dotcode.c:1661 src/main/dotcode.c:1672
+#: src/main/dotcode.c:1659 src/main/dotcode.c:1675 src/main/dotcode.c:1686
 #, fuzzy, c-format
 msgid "invalid mode (%s) to pass to Fortran (arg %d)"
 msgstr "ugyldig modus å senda til Fortran (argument %d)"
 
-#: src/main/dotcode.c:1666
+#: src/main/dotcode.c:1680
 #, fuzzy, c-format
 msgid "invalid mode (%s) to pass to C or Fortran (arg %d)"
 msgstr "ugyldig modus å senda til Fortran (argument %d)"
 
-#: src/main/dotcode.c:1677
+#: src/main/dotcode.c:1691
 msgid "pairlists are passed as SEXP as from R 2.15.0"
 msgstr ""
 
-#: src/main/dotcode.c:2499
+#: src/main/dotcode.c:2510
 #, c-format
 msgid "type \"%s\" not supported in interlanguage calls"
 msgstr "typen «%s» er ikkje støtta i kall på tvers av språk"
 
-#: src/main/dotcode.c:2604
+#: src/main/dotcode.c:2615
 #, c-format
 msgid "mode '%s' is not supported in call_R"
 msgstr "modusen «%s» er ikkje støtta i call_R"
 
-#: src/main/dounzip.c:171
+#: src/main/dounzip.c:172
 #, c-format
 msgid " not overwriting file '%s"
 msgstr " skriv ikkje over fila «%s»"
 
-#: src/main/dounzip.c:256
+#: src/main/dounzip.c:257
 #, c-format
 msgid "zip file '%s' cannot be opened"
 msgstr "zip-fila «%s» kan ikkje opnast"
 
-#: src/main/dounzip.c:312
+#: src/main/dounzip.c:313
 msgid "invalid zip name argument"
 msgstr "ugyldig zip-namneargument"
 
-#: src/main/dounzip.c:315 src/main/dounzip.c:409
+#: src/main/dounzip.c:316 src/main/dounzip.c:410
 msgid "zip path is too long"
 msgstr "zip-adressa er for lang"
 
-#: src/main/dounzip.c:332
+#: src/main/dounzip.c:333
 msgid "'exdir' is too long"
 msgstr "«exdir» er for lang"
 
-#: src/main/dounzip.c:335
+#: src/main/dounzip.c:336
 msgid "'exdir' does not exist"
 msgstr "«exdir» finst ikkje"
 
-#: src/main/dounzip.c:363
+#: src/main/dounzip.c:364
 msgid "requested file not found in the zip file"
 msgstr "fann ikkje den oppgjevne fila i zip-fila"
 
-#: src/main/dounzip.c:366
+#: src/main/dounzip.c:367
 msgid "zip file is corrupt"
 msgstr "zip-fila er øydelagd"
 
-#: src/main/dounzip.c:369
+#: src/main/dounzip.c:370
 msgid "CRC error in zip file"
 msgstr "CRC-feil i zip-fil"
 
-#: src/main/dounzip.c:376
+#: src/main/dounzip.c:377
 msgid "write error in extracting from zip file"
 msgstr "skrivefeil ved utpakking av zip-fil"
 
-#: src/main/dounzip.c:379
+#: src/main/dounzip.c:380
 #, c-format
 msgid "error %d in extracting from zip file"
 msgstr "feil %d ved utpakking av zip-fil"
 
-#: src/main/dounzip.c:404
+#: src/main/dounzip.c:405
 msgid "unz connections can only be opened for reading"
 msgstr "unz-samband kan berre opnast for lesing"
 
-#: src/main/dounzip.c:415
+#: src/main/dounzip.c:416
 #, fuzzy
 msgid "invalid description of 'unz' connection"
 msgstr "ugyldig skildring av unz-samband"
 
-#: src/main/dounzip.c:421
+#: src/main/dounzip.c:422
 #, c-format
 msgid "cannot open zip file '%s'"
 msgstr "kan ikkje opna zip-fila «%s»"
 
-#: src/main/dounzip.c:425
+#: src/main/dounzip.c:426
 #, c-format
 msgid "cannot locate file '%s' in zip file '%s'"
 msgstr "finn ikkje fila «%s» i zip-fila «%s»"
 
-#: src/main/dounzip.c:469
+#: src/main/dounzip.c:470
 msgid "printing not enabled for this connection"
 msgstr "kan ikkje visa tekst med dette sambandet"
 
@@ -2812,8 +2860,8 @@ msgstr "kan ikkje visa tekst med dette sambandet"
 msgid "write not enabled for this connection"
 msgstr "kan ikkje skriva med dette sambandet"
 
-#: src/main/dounzip.c:496 src/main/dounzip.c:500 src/main/dounzip.c:506
-#: src/main/dounzip.c:523
+#: src/main/dounzip.c:494 src/main/dounzip.c:498 src/main/dounzip.c:504
+#: src/main/dounzip.c:521
 #, fuzzy
 msgid "allocation of 'unz' connection failed"
 msgstr "feil ved reservering av unz-samband"
@@ -2832,7 +2880,7 @@ msgstr "ugyldige formelle argument for «function»"
 msgid "invalid argument to edit()"
 msgstr "ugyldig argument til edit()"
 
-#: src/main/edit.c:121 src/main/saveload.c:2076
+#: src/main/edit.c:121 src/main/saveload.c:2078
 msgid "unable to open file"
 msgstr "klarte ikkje opna fila"
 
@@ -2896,12 +2944,12 @@ msgid "no graphics system to unregister"
 msgstr "ingen grafikksystem å avregistrera"
 
 #: src/main/engine.c:443 src/main/engine.c:448 src/main/engine.c:456
-#: src/main/engine.c:463 src/main/engine.c:477 src/modules/X11/devX11.c:1157
+#: src/main/engine.c:463 src/main/engine.c:477 src/modules/X11/devX11.c:1159
 msgid "invalid line end"
 msgstr "ugyldig linjeslutt"
 
 #: src/main/engine.c:508 src/main/engine.c:513 src/main/engine.c:521
-#: src/main/engine.c:528 src/main/engine.c:542 src/modules/X11/devX11.c:1175
+#: src/main/engine.c:528 src/main/engine.c:542 src/modules/X11/devX11.c:1177
 msgid "invalid line join"
 msgstr "ugyldig linjesamanslåing"
 
@@ -2934,84 +2982,98 @@ msgstr "Sys.sleep er ikkje implementert på dette systemet"
 msgid "raster capture is not available for this device"
 msgstr "%s er ikkje tilgjengeleg for eininga"
 
-#: src/main/engine.c:1656
+#: src/main/engine.c:1662
 #, c-format
 msgid "font face %d not supported for font family '%s'"
 msgstr "skriftsnittet «%d» er ikkje støtta for skrifta «%s»"
 
-#: src/main/engine.c:1972
+#: src/main/engine.c:1978
 msgid "no graphics device is active"
 msgstr "ingen verksame grafikkeiningar"
 
-#: src/main/engine.c:2049
+#: src/main/engine.c:2055
 #, c-format
 msgid "pch value '%d' is invalid in this locale"
 msgstr "pch-verdien «%d» er ugyldig i dette lokalet"
 
-#: src/main/engine.c:2307
+#: src/main/engine.c:2313
 #, c-format
 msgid "unimplemented pch value '%d'"
 msgstr "ikkje-implementert pch-verdi «%d»"
 
-#: src/main/engine.c:2330
+#: src/main/engine.c:2336
 #, c-format
 msgid "invalid axis extents [GEPretty(.,.,n=%d)"
 msgstr "ugyldig aksestorleik [GEPretty(.,.,n=%d)"
 
-#: src/main/engine.c:2334
+#: src/main/engine.c:2340
 #, c-format
 msgid "infinite axis extents [GEPretty(%g,%g,%d)]"
 msgstr "uendeleg aksestorleik [GEPretty(%g,%g,%d)]"
 
-#: src/main/engine.c:2371
+#: src/main/engine.c:2377
 #, c-format
 msgid " .. GEPretty(.): new *lo = %g < %g = x1"
 msgstr " .. GEPretty(.): new *lo = %g < %g = x1"
 
-#: src/main/engine.c:2373
+#: src/main/engine.c:2379
 #, c-format
 msgid " .. GEPretty(.): new *up = %g > %g = x2"
 msgstr " .. GEPretty(.): new *up = %g > %g = x2"
 
-#: src/main/engine.c:2773
+#: src/main/engine.c:2784
 #, fuzzy
 msgid "display list redraw incomplete"
 msgstr "Ufullstendig oppteikning av visingsliste"
 
-#: src/main/engine.c:2777
+#: src/main/engine.c:2788
 #, fuzzy
 msgid "invalid display list"
 msgstr "ugyldig argumentliste"
 
-#: src/main/engine.c:2963
+#: src/main/engine.c:2900
+#, c-format
+msgid ""
+"snapshot recorded with different graphics engine version (pre 11 - this is "
+"version %d)"
+msgstr ""
+
+#: src/main/engine.c:2904
+#, c-format
+msgid ""
+"snapshot recorded with different graphics engine version (%d - this is "
+"version %d)"
+msgstr ""
+
+#: src/main/engine.c:2983
 msgid "'expr' argument must be an expression"
 msgstr "«expr»-argumentet må vera eit uttrykk"
 
-#: src/main/engine.c:2965
+#: src/main/engine.c:2985
 msgid "'list' argument must be a list"
 msgstr "«list»-argumentet må vera ei liste"
 
-#: src/main/engine.c:2971
+#: src/main/engine.c:2991
 msgid "'env' argument must be an environment"
 msgstr "«env»-argumentet må vera ein omgjevnad"
 
-#: src/main/engine.c:3051 src/main/engine.c:3059
+#: src/main/engine.c:3071 src/main/engine.c:3079
 msgid "invalid multibyte char in pch=\"c\""
 msgstr "ugyldig multibyte-teikn i pch=\"c\""
 
-#: src/main/engine.c:3106
+#: src/main/engine.c:3126
 msgid "invalid hex digit in 'color' or 'lty'"
 msgstr "ugyldig heksadesimal-siffer i «color» eller «lty»"
 
-#: src/main/engine.c:3129
+#: src/main/engine.c:3149
 msgid "invalid line type: must be length 2, 4, 6 or 8"
 msgstr "ugyldig linjetype: må ha lengd 2,4 6 eller 8"
 
-#: src/main/engine.c:3133
+#: src/main/engine.c:3153
 msgid "invalid line type: zeroes are not allowed"
 msgstr "ugyldig linjetype: nullar er ikkje tilletne"
 
-#: src/main/engine.c:3142 src/main/engine.c:3150 src/main/engine.c:3157
+#: src/main/engine.c:3162 src/main/engine.c:3170 src/main/engine.c:3177
 msgid "invalid line type"
 msgstr "ugyldig linjetype"
 
@@ -3020,442 +3082,446 @@ msgstr "ugyldig linjetype"
 msgid "cannot change value of locked binding for '%s'"
 msgstr "kan ikkje endra verdi på låst binding for «%s»"
 
-#: src/main/envir.c:251 src/main/envir.c:1454
+#: src/main/envir.c:251 src/main/envir.c:1530
 msgid "cannot add bindings to a locked environment"
 msgstr "kan ikkje leggja bindingar til ein låst omgjevnad"
 
-#: src/main/envir.c:772
+#: src/main/envir.c:775
 msgid "invalid cached value in R_GetGlobalCache"
 msgstr "ugyldig cache-verdi i R_GetGlobalCache"
 
-#: src/main/envir.c:830
+#: src/main/envir.c:836
 msgid "cannot unbind in the base namespace"
 msgstr "klarte ikkje avbinda i namnerommet «base»"
 
-#: src/main/envir.c:832
+#: src/main/envir.c:838
 msgid "unbind in the base environment is unimplemented"
 msgstr "avbinding er ikkje implementert for namnerommet «base»"
 
-#: src/main/envir.c:834 src/main/envir.c:1684
+#: src/main/envir.c:840 src/main/envir.c:1818
 msgid "cannot remove bindings from a locked environment"
 msgstr "kan ikkje fjerna bindingar frå ein låst omgjevnad"
 
-#: src/main/envir.c:1139
+#: src/main/envir.c:1213
 #, c-format
 msgid "argument to '%s' is not an environment"
 msgstr "argumentet til «%s» er ikkje ein omgjevnad"
 
-#: src/main/envir.c:1300
+#: src/main/envir.c:1374
 #, fuzzy, c-format
 msgid "the ... list does not contain %d elements"
 msgstr "Lista «...» inneheld ikkje %d element"
 
-#: src/main/envir.c:1302
+#: src/main/envir.c:1376
 #, c-format
 msgid "..%d used in an incorrect context, no ... to look in"
 msgstr "..%d er brukt i feil samanheng: ingen «...» å sjå i"
 
-#: src/main/envir.c:1390 src/main/envir.c:1842 src/main/eval.c:573
-#: src/main/eval.c:3618
-#, c-format
-msgid "argument \"%s\" is missing, with no default"
-msgstr "argumentet «%s» manglar, og har ingen standardverdi"
-
-#: src/main/envir.c:1395
+#: src/main/envir.c:1469
 #, c-format
 msgid "could not find function \"%s\""
 msgstr "fann ikkje funksjonen «%s»"
 
-#: src/main/envir.c:1418
+#: src/main/envir.c:1492
 msgid "cannot assign values in the empty environment"
 msgstr "kan ikkje tildela verdiar i den tomme omgjevnaden"
 
-#: src/main/envir.c:1424 src/main/envir.c:1497
+#: src/main/envir.c:1498 src/main/envir.c:1628
 msgid "cannot assign variables to this database"
 msgstr "kan ikkje tildela verdiar til databasen"
 
-#: src/main/envir.c:1580
+#: src/main/envir.c:1714
 #, c-format
 msgid "cannot add binding of '%s' to the base environment"
 msgstr "kan ikkje leggja binding av «%s» til omgjevnaden «base»"
 
-#: src/main/envir.c:1609
+#: src/main/envir.c:1743
 msgid "only the first element is used as variable name"
 msgstr "berre det første elementet vert brukt som variabelnamn"
 
-#: src/main/envir.c:1641
+#: src/main/envir.c:1775
 msgid "first argument must be a named list"
 msgstr "det første argumentet må vera ei namna liste"
 
-#: src/main/envir.c:1646
+#: src/main/envir.c:1780
 msgid "names(x) must be a character vector of the same length as x"
 msgstr "names(x) må vera ein teiknvektor av same lengd som x«xosm"
 
-#: src/main/envir.c:1649
+#: src/main/envir.c:1783
 #, fuzzy
 msgid "'envir' argument must be an environment"
 msgstr "«env»-argumentet må vera ein omgjevnad"
 
-#: src/main/envir.c:1678
+#: src/main/envir.c:1812
 msgid "cannot remove variables from base namespace"
 msgstr "kan ikkje fjerna variablar frå namnerommet «base»"
 
-#: src/main/envir.c:1680
+#: src/main/envir.c:1814
 msgid "cannot remove variables from the base environment"
 msgstr "kan ikkje fjerna variablar frå omgjevnaden «base»"
 
-#: src/main/envir.c:1682
+#: src/main/envir.c:1816
 msgid "cannot remove variables from the empty environment"
 msgstr "kan ikkje fjerna variablar frå den tomme omgjevnaden"
 
-#: src/main/envir.c:1690
+#: src/main/envir.c:1824
 msgid "cannot remove variables from this database"
 msgstr "kan ikkje fjerna variablar frå denne databasen"
 
-#: src/main/envir.c:1849
+#: src/main/envir.c:1985
 #, c-format
 msgid "object '%s' of mode '%s' was not found"
 msgstr "fann ikkje objektet «%s» av modus «%s»"
 
-#: src/main/envir.c:1921
+#: src/main/envir.c:2068
 #, c-format
 msgid "invalid name in position %d"
 msgstr "ugyldig namn i posisjon %d"
 
-#: src/main/envir.c:1927
+#: src/main/envir.c:2074
 msgid "second argument must be an environment"
 msgstr "det andre argumentet må vera ein omgjevnad"
 
-#: src/main/envir.c:1935 src/main/envir.c:1943
+#: src/main/envir.c:2082 src/main/envir.c:2090
 #, c-format
 msgid "wrong length for '%s' argument"
 msgstr "feil lengd på «%s»-argumentet"
 
-#: src/main/envir.c:2062
+#: src/main/envir.c:2221
 msgid "invalid use of 'missing'"
 msgstr "ugyldig bruk av «missing»"
 
-#: src/main/envir.c:2087
+#: src/main/envir.c:2247
 msgid "'missing' can only be used for arguments"
 msgstr "«missing» kan berre brukast på argument"
 
-#: src/main/envir.c:2168
+#: src/main/envir.c:2333
 msgid "'pos' must be an integer"
 msgstr "«pos» må vera eit heiltal"
 
-#: src/main/envir.c:2182
+#: src/main/envir.c:2347
 msgid "all elements of a list must be named"
 msgstr "all elementa i ei liste må ha namn"
 
-#: src/main/envir.c:2205
+#: src/main/envir.c:2370
 msgid "'attach' only works for lists, data frames and environments"
 msgstr "«attach» fungerer berre for lister, datarammer og omgjevnader"
 
-#: src/main/envir.c:2288
+#: src/main/envir.c:2453
 msgid "detaching \"package:base\" is not allowed"
 msgstr "kan ikkje kopla laus «package:base»"
 
-#: src/main/envir.c:2589 src/main/envir.c:2644
+#: src/main/envir.c:2798 src/main/envir.c:2879
 msgid "argument must be an environment"
 msgstr "argumentet må vera ein omgjevnad"
 
-#: src/main/envir.c:2648
+#: src/main/envir.c:2883
 msgid "arguments must be symbolic"
 msgstr "argumenta må vera symbolske"
 
-#: src/main/envir.c:2772
+#: src/main/envir.c:3032
 msgid "no enclosing environment"
 msgstr "inga omslutnande omgjevnad"
 
-#: src/main/envir.c:2825
+#: src/main/envir.c:3085
 #, c-format
 msgid "no item called \"%s\" on the search list"
 msgstr "elementet «%s» finst ikkje i søkjelista"
 
-#: src/main/envir.c:2850
+#: src/main/envir.c:3110
 msgid "using 'as.environment(NULL)' is defunct"
 msgstr "bruk av «as.environment(NULL)» er ikkje lenger mogleg"
 
-#: src/main/envir.c:2856
+#: src/main/envir.c:3116
 msgid "S4 object does not extend class \"environment\""
 msgstr "S4-objekt utvidar ikkje klassen «environment»"
 
-#: src/main/envir.c:2871
+#: src/main/envir.c:3131
 msgid "invalid object for 'as.environment'"
 msgstr "ugyldig objekt til «as.environment»"
 
-#: src/main/envir.c:2897 src/main/envir.c:2925 src/main/envir.c:2954
-#: src/main/envir.c:2975 src/main/envir.c:2998 src/main/envir.c:3033
-#: src/main/envir.c:3054
+#: src/main/envir.c:3157 src/main/envir.c:3185 src/main/envir.c:3214
+#: src/main/envir.c:3235 src/main/envir.c:3258 src/main/envir.c:3293
+#: src/main/envir.c:3314
 msgid "not an environment"
 msgstr "ikkje ein omgjevnad"
 
-#: src/main/envir.c:2949 src/main/envir.c:2970 src/main/envir.c:2991
-#: src/main/envir.c:3028 src/main/envir.c:3049 src/main/envir.c:3148
+#: src/main/envir.c:3209 src/main/envir.c:3230 src/main/envir.c:3251
+#: src/main/envir.c:3288 src/main/envir.c:3309 src/main/envir.c:3408
 msgid "not a symbol"
 msgstr "ikkje eit symbol"
 
-#: src/main/envir.c:2962 src/main/envir.c:2983 src/main/envir.c:3041
-#: src/main/envir.c:3062
+#: src/main/envir.c:3222 src/main/envir.c:3243 src/main/envir.c:3301
+#: src/main/envir.c:3322
 #, c-format
 msgid "no binding for \"%s\""
 msgstr "inga binding for «%s»"
 
-#: src/main/envir.c:2993
+#: src/main/envir.c:3253
 msgid "not a function"
 msgstr "ikkje ein funksjon"
 
-#: src/main/envir.c:3001 src/main/envir.c:3017
+#: src/main/envir.c:3261 src/main/envir.c:3277
 msgid "symbol already has a regular binding"
 msgstr "symbolet har alt ei vanleg binding"
 
-#: src/main/envir.c:3003 src/main/envir.c:3019
+#: src/main/envir.c:3263 src/main/envir.c:3279
 msgid "cannot change active binding if binding is locked"
 msgstr "kan ikkje endra verksam binding viss binding er låst"
 
-#: src/main/envir.c:3107
+#: src/main/envir.c:3367 src/main/envir.c:3604
 msgid "unknown op"
 msgstr "ukjend op"
 
-#: src/main/envir.c:3152
+#: src/main/envir.c:3412
 msgid "cannot unbind a locked binding"
 msgstr "kan ikkje avbinda ei låst binding"
 
-#: src/main/envir.c:3154
+#: src/main/envir.c:3414
 msgid "cannot unbind an active binding"
 msgstr "kan ikkje avbinda ei aktiv binding"
 
-#: src/main/envir.c:3289
+#: src/main/envir.c:3555
 #, fuzzy
 msgid "bad namespace name"
 msgstr "ugyldig namn på namnerom"
 
-#: src/main/envir.c:3301
+#: src/main/envir.c:3567
 #, fuzzy
 msgid "namespace already registered"
 msgstr "namnerommet er alt registrert"
 
-#: src/main/envir.c:3313
+#: src/main/envir.c:3579
 #, fuzzy
 msgid "namespace not registered"
 msgstr "namnerommet er ikkje registrert"
 
-#: src/main/envir.c:3360
+#: src/main/envir.c:3635
 msgid "bad import environment argument"
 msgstr "ugyldig argument til importeringsomgjevnad"
 
-#: src/main/envir.c:3365
+#: src/main/envir.c:3640
 msgid "bad export environment argument"
 msgstr "ugyldig argument til eksporteringsomgjevnad"
 
-#: src/main/envir.c:3369
+#: src/main/envir.c:3644
 msgid "length of import and export names must match"
 msgstr "importerings- og eksporteringsnamna må vera like lange"
 
-#: src/main/envir.c:3392
+#: src/main/envir.c:3667
 #, c-format
 msgid "exported symbol '%s' has no value"
 msgstr "det eksporterte symbolet «%s» har ikkje nokon verdi"
 
-#: src/main/envir.c:3557
+#: src/main/envir.c:3833
 #, c-format
 msgid "unknown encoding: %d"
 msgstr "ukjend koding: %d"
 
-#: src/main/envir.c:3577
+#: src/main/envir.c:3853
 #, c-format
 msgid "embedded nul in string: '%s'"
 msgstr "nul inni streng: «%s»"
 
-#: src/main/errors.c:178 src/main/errors.c:215
+#: src/main/errors.c:163 src/main/errors.c:200
 msgid "interrupts suspended; signal ignored"
 msgstr "uverksame avbrot – signal ignorert"
 
-#: src/main/errors.c:318
+#: src/main/errors.c:250
+msgid "[... truncated]"
+msgstr ""
+
+#: src/main/errors.c:310
 msgid "invalid option \"warning.expression\""
 msgstr "ugyldig val «warning.expression»"
 
-#: src/main/errors.c:348
+#: src/main/errors.c:339
 #, c-format
 msgid "(converted from warning) %s"
 msgstr "(gjord om frå åtvaring) %s"
 
-#: src/main/errors.c:359
-#, c-format
-msgid "Warning: %s\n"
+#: src/main/errors.c:349
+#, fuzzy
+msgid "Warning:"
 msgstr "Åtvaring: %s\n"
 
-#: src/main/errors.c:363
-#, c-format
-msgid "Warning in %s : %s\n"
+#: src/main/errors.c:351
+#, fuzzy, c-format
+msgid "Warning in %s :"
 msgstr "Åtvaring in %s: %s\n"
 
-#: src/main/errors.c:365
-#, c-format
-msgid ""
-"Warning in %s :\n"
-"  %s\n"
+#: src/main/errors.c:360 src/main/errors.c:374 src/main/errors.c:687
+msgid "Calls:"
 msgstr ""
-"Åtvaring i %s:\n"
-"  %s\n"
 
-#: src/main/errors.c:428 src/main/errors.c:447 src/main/errors.c:596
+#: src/main/errors.c:421 src/main/errors.c:440 src/main/errors.c:602
 msgid "Lost warning messages\n"
 msgstr "Tapt åtvaringsmelding\n"
 
-#: src/main/errors.c:459
-msgid "Warning message:\n"
-msgid_plural "Warning messages:\n"
+#: src/main/errors.c:452
+#, fuzzy
+msgid "Warning message:"
+msgid_plural "Warning messages:"
 msgstr[0] "Åtvaring:\n"
 msgstr[1] "Åtvaringar:\n"
 
-#: src/main/errors.c:514
+#: src/main/errors.c:462 src/main/errors.c:490
 #, c-format
-msgid "There were %d warnings (use warnings() to see them)\n"
-msgstr "Det oppstod %d åtvaringar (bruk «warnings()» for å sjå dei)\n"
+msgid "In %s :"
+msgstr ""
+
+#: src/main/errors.c:515
+#, fuzzy, c-format
+msgid "There was %d warning (use warnings() to see it)"
+msgid_plural "There were %d warnings (use warnings() to see them)"
+msgstr[0] "Det oppstod %d åtvaringar (bruk «warnings()» for å sjå dei)\n"
+msgstr[1] "Det oppstod %d åtvaringar (bruk «warnings()» for å sjå dei)\n"
 
-#: src/main/errors.c:517
+#: src/main/errors.c:520
 #, fuzzy, c-format
-msgid "There were %d or more warnings (use warnings() to see the first %d)\n"
+msgid "There were %d or more warnings (use warnings() to see the first %d)"
 msgstr ""
 "Det oppstod 50 eller fleire åtvaringar (bruk «warnings()» for å sjå dei 50 "
 "første)\n"
 
-#: src/main/errors.c:587
+#: src/main/errors.c:593
 msgid "Error during wrapup: "
 msgstr "Feil ved wrapup: "
 
-#: src/main/errors.c:612
+#: src/main/errors.c:618
 msgid "Error in "
 msgstr "Feil i "
 
-#: src/main/errors.c:613
+#: src/main/errors.c:640 src/main/errors.c:647
 #, c-format
-msgid " (from %s) : "
+msgid "Error in %s (from %s) : "
 msgstr ""
 
-#: src/main/errors.c:664 src/main/errors.c:670
+#: src/main/errors.c:649
+#, fuzzy, c-format
+msgid "Error in %s : "
+msgstr "Feil i "
+
+#: src/main/errors.c:669 src/main/errors.c:675
 #, c-format
 msgid "Error: "
 msgstr "Feil: "
 
-#: src/main/errors.c:690 src/main/errors.c:1319
+#: src/main/errors.c:696 src/main/errors.c:1300
 msgid "In addition: "
 msgstr "I tillegg: "
 
-#: src/main/errors.c:811
+#: src/main/errors.c:818
 msgid "invalid option \"error\"\n"
 msgstr "ugyldig val «error»\n"
 
-#: src/main/errors.c:893
-msgid "Execution halted\n"
-msgstr "Stoppa køyring\n"
-
-#: src/main/errors.c:1032
-msgid "'msg1' must be a character string"
-msgstr "«msg1» må vera ein teiknstreng"
-
-#: src/main/errors.c:1034
-msgid "'msg2' must be a character string"
-msgstr "«msg2» må vera ein teiknstreng"
+#: src/main/errors.c:1013 src/main/errors.c:1015 src/main/options.c:339
+#: src/main/unique.c:1638
+#, fuzzy, c-format
+msgid "'%s' must be a character string"
+msgstr "«sep» må vera ein teiknvektor"
 
-#: src/main/errors.c:1131
+#: src/main/errors.c:1116
 msgid " [invalid string in stop(.)]"
 msgstr " [ugyldig streng i stop(.)]"
 
-#: src/main/errors.c:1162
+#: src/main/errors.c:1148
 msgid " [invalid string in warning(.)]"
 msgstr " [ugyldig streng i warning(.)]"
 
-#: src/main/errors.c:1178
+#: src/main/errors.c:1164
 #, c-format
 msgid "incorrect number of arguments to \"%s\""
 msgstr "feil tal på argument til «%s»"
 
-#: src/main/errors.c:1184 src/main/errors.c:1199
+#: src/main/errors.c:1170 src/main/errors.c:1185
 #, c-format
 msgid "unimplemented feature in %s"
 msgstr "ikkje-implementert funksjon i %s"
 
-#: src/main/errors.c:1193
+#: src/main/errors.c:1179
 msgid "invalid number of arguments"
 msgstr "ugyldig tal på argument"
 
-#: src/main/errors.c:1194 src/main/logic.c:189
+#: src/main/errors.c:1180 src/main/logic.c:181
 msgid "invalid argument type"
 msgstr "ugyldig argumentstype"
 
-#: src/main/errors.c:1196
+#: src/main/errors.c:1182
 msgid "time-series/vector length mismatch"
 msgstr "ikkje samsvarande lengd på tidsrekkje/vektor"
 
-#: src/main/errors.c:1197
+#: src/main/errors.c:1183
 msgid "incompatible arguments"
 msgstr "ikkje-kompatible argument"
 
-#: src/main/errors.c:1200
+#: src/main/errors.c:1186
 msgid "unknown error (report this!)"
 msgstr "ukjend feil (meld frå om dette!)"
 
-#: src/main/errors.c:1212
+#: src/main/errors.c:1195
+msgid "inaccurate integer conversion in coercion"
+msgstr "unøyaktig heiltalsomgjering ved typeomgjering"
+
+#: src/main/errors.c:1198
 msgid "unknown warning (report this!)"
 msgstr "ukjend åtvaring (meld frå om dette!)"
 
-#: src/main/errors.c:1283
+#: src/main/errors.c:1269
 msgid "No function to return from, jumping to top level"
 msgstr "Ingen funksjon å venda tilbake frå. Hoppar til toppnivå."
 
-#: src/main/errors.c:1299
+#: src/main/errors.c:1285
 msgid "top level inconsistency?"
 msgstr "Inkonsistens på toppnivå"
 
-#: src/main/errors.c:1478
+#: src/main/errors.c:1459
 msgid "bad handler data"
 msgstr "ugyldig handteringsdata"
 
-#: src/main/errors.c:1628
+#: src/main/errors.c:1613
 msgid "error message not a string"
 msgstr "feilmeldinga er ikkje ein teiknstreng"
 
-#: src/main/errors.c:1703
+#: src/main/errors.c:1688
 msgid "handler or restart stack mismatch in old restart"
 msgstr "ikkje samsvar i handterings- eller omstartstakk i gammal omstart"
 
-#: src/main/errors.c:1729 src/main/errors.c:1745
+#: src/main/errors.c:1714 src/main/errors.c:1730
 msgid "bad error message"
 msgstr "ugyldig feilmelding"
 
-#: src/main/errors.c:1787
+#: src/main/errors.c:1771
 msgid "bad restart"
 msgstr "ugyldig omstart"
 
-#: src/main/errors.c:1819
+#: src/main/errors.c:1803
 msgid "restart not on stack"
 msgstr "omstart ikkje på stakk"
 
-#: src/main/errors.c:1836
+#: src/main/errors.c:1819
 msgid "not in a try context"
 msgstr "er ikkje i ein «try»-samanheng"
 
-#: src/main/errors.c:1849
+#: src/main/errors.c:1832
 msgid "error message must be a character string"
 msgstr "feilmeldinga må vera ein teiknstreng"
 
-#: src/main/eval.c:308
+#: src/main/eval.c:365
 #, c-format
 msgid "source files skipped by Rprof; please increase '%s'"
 msgstr ""
 
-#: src/main/eval.c:328
+#: src/main/eval.c:385
 #, c-format
 msgid "Rprof: cannot open profile file '%s'"
 msgstr "Rprof: klarte ikkje opna profilfila «%s»"
 
-#: src/main/eval.c:422
+#: src/main/eval.c:479
 msgid "R profiling is not available on this system"
 msgstr "R-profilering er ikkje tilgjengeleg på dette systemet"
 
-#: src/main/eval.c:446
+#: src/main/eval.c:503
 msgid ""
 "promise already under evaluation: recursive default argument reference or "
 "earlier problems?"
@@ -3463,268 +3529,271 @@ msgstr ""
 "promise held allereie på å verta evaluert: rekursiv standardargument-"
 "referanse eller tidlegare problem?"
 
-#: src/main/eval.c:448
+#: src/main/eval.c:505
 msgid "restarting interrupted promise evaluation"
 msgstr "startar avbroten promise-evaluering på nytt"
 
-#: src/main/eval.c:544
+#: src/main/eval.c:601
 msgid ""
 "evaluation nested too deeply: infinite recursion / options(expressions=)?"
 msgstr "for djup evaluering: uendeleg rekursjon / options(expressions=)?"
 
-#: src/main/eval.c:575 src/main/eval.c:3619
+#: src/main/eval.c:632 src/main/eval.c:4238
 msgid "argument is missing, with no default"
 msgstr "argumentet manglar (og har ikkje nokon standardverdi)"
 
-#: src/main/eval.c:679 src/main/eval.c:4642
+#: src/main/eval.c:736 src/main/eval.c:1306 src/main/eval.c:5533
 msgid "attempt to apply non-function"
 msgstr "prøvde å køyra ikkje-funksjon"
 
-#: src/main/eval.c:702
+#: src/main/eval.c:759
 #, c-format
 msgid "%s at %s#%d: "
 msgstr "%s på %s#%d: "
 
-#: src/main/eval.c:1178
+#: src/main/eval.c:1298 src/main/eval.c:2271
+#, c-format
+msgid "argument %d is empty"
+msgstr "argumentet %d er tomt"
+
+#: src/main/eval.c:1350
 #, c-format
 msgid "could not find symbol \"%s\" in environment of the generic function"
 msgstr "fann ikkje symbolet «%s» i omgjevnaden til den generiske funksjonen"
 
-#: src/main/eval.c:1196
+#: src/main/eval.c:1368
 #, c-format
 msgid "symbol \"%s\" not in environment of method"
 msgstr "symbolet «%s» finst ikkje i omgjevnaden til metoden"
 
-#: src/main/eval.c:1308
+#: src/main/eval.c:1481
 msgid "the condition has length > 1 and only the first element will be used"
 msgstr "vilkåret har lengd større 1 enn (berre første elementet vert brukt)"
 
-#: src/main/eval.c:1325
+#: src/main/eval.c:1500
 msgid "missing value where TRUE/FALSE needed"
 msgstr "manglar verdi der TRUE/FALSE (sann/usann) trengst"
 
-#: src/main/eval.c:1326
+#: src/main/eval.c:1501
 msgid "argument is not interpretable as logical"
 msgstr "argumentet kan ikkje tolkast som ein logisk verdi"
 
-#: src/main/eval.c:1327
+#: src/main/eval.c:1502
 msgid "argument is of length zero"
 msgstr "argumentet har lengd null"
 
-#: src/main/eval.c:1418
+#: src/main/eval.c:1596
 msgid "non-symbol loop variable"
 msgstr "lykkje-variabel som ikkje er eit symbol"
 
-#: src/main/eval.c:1510 src/main/eval.c:4408
+#: src/main/eval.c:1687 src/main/eval.c:5301
 msgid "invalid for() loop sequence"
 msgstr "ugyldig for()-lykkje"
 
-#: src/main/eval.c:1652
+#: src/main/eval.c:1826
 msgid "multi-argument returns are not permitted"
 msgstr "fleire returverdiar er ikkje mogleg"
 
-#: src/main/eval.c:1701
+#: src/main/eval.c:1873
 msgid "invalid (NULL) left side of assignment"
 msgstr "ugyldig venstreside (NULL) i tildeling"
 
-#: src/main/eval.c:1734
+#: src/main/eval.c:1907
 msgid "target of assignment expands to non-language object"
 msgstr "målet i tildelinga vert utvida til eit ikkje-språksobjekt"
 
-#: src/main/eval.c:1817
+#: src/main/eval.c:1990
 #, c-format
 msgid "overlong name in '%s'"
 msgstr "for langt namn i «%s»"
 
-#: src/main/eval.c:1915
+#: src/main/eval.c:2080
 msgid "cannot do complex assignments in base namespace"
 msgstr "kan ikkje utføra komplekse tildelingar namnerommet «base»"
 
-#: src/main/eval.c:1917
+#: src/main/eval.c:2082
 msgid "cannot do complex assignments in base environment"
 msgstr "kan ikkje utføra komplekse tildelingar omgjevnaden «base»"
 
-#: src/main/eval.c:1954 src/main/eval.c:1981
+#: src/main/eval.c:2121 src/main/eval.c:2148
 msgid "invalid function in complex assignment"
 msgstr "ugyldig funksjon i kompleks tildeling"
 
-#: src/main/eval.c:2041
+#: src/main/eval.c:2208
 msgid "invalid (do_set) left-hand side to assignment"
 msgstr "ugyldig (do_set) venstreside i tildeling"
 
-#: src/main/eval.c:2103
-#, c-format
-msgid "argument %d is empty"
-msgstr "argumentet %d er tomt"
-
-#: src/main/eval.c:2116
+#: src/main/eval.c:2284
 #, c-format
 msgid "'%s' is missing"
 msgstr "«%s» manglar"
 
-#: src/main/eval.c:2267
+#: src/main/eval.c:2439
 msgid "invalid formal argument list for \"function\""
 msgstr "ugyldig formell argumentliste til «function»"
 
-#: src/main/eval.c:2325 src/main/eval.c:2356 src/main/eval.c:2361
+#: src/main/eval.c:2497 src/main/eval.c:2528 src/main/eval.c:2533
 #, fuzzy, c-format
 msgid "invalid '%s' argument of type '%s'"
 msgstr "ugyldig «%s»-argument"
 
-#: src/main/eval.c:2353
+#: src/main/eval.c:2525
 msgid "numeric 'envir' arg not of length one"
 msgstr "numerisk «envir»-argument ikkje av lengd 1"
 
-#: src/main/eval.c:2377 src/main/eval.c:2399
+#: src/main/eval.c:2549 src/main/eval.c:2573
 msgid "restarts not supported in 'eval'"
 msgstr "omstartar er ikkje støtta i «eval»"
 
-#: src/main/eval.c:2456 src/main/eval.c:2469
+#: src/main/eval.c:2632 src/main/eval.c:2645
 msgid "'Recall' called from outside a closure"
 msgstr "«Recall» kalla utanfrå ei omslutting"
 
-#: src/main/eval.c:2562
+#: src/main/eval.c:2738
 msgid "value in '...' is not a promise"
 msgstr "verdien i «...» er ikkje eit «promise»"
 
-#: src/main/eval.c:2754 src/main/objects.c:720
-#, c-format
-msgid "call name too long in '%s'"
-msgstr "kallnamn for langt i «%s»"
-
-#: src/main/eval.c:2775
-#, c-format
-msgid "generic name too long in '%s'"
-msgstr "generisk namn for langt i «%s»"
-
-#: src/main/eval.c:2840
+#: src/main/eval.c:2999
 #, c-format
 msgid "Incompatible methods (\"%s\", \"%s\") for \"%s\""
 msgstr "Ikkje-kompatible metodar («%s», «%s») for «%s»"
 
-#: src/main/eval.c:2906
+#: src/main/eval.c:3048
 msgid "dispatch error in group dispatch"
 msgstr "avsendingsfeil i gruppeavsending"
 
-#: src/main/eval.c:3201
+#: src/main/eval.c:3532
 #, fuzzy, c-format
 msgid "\"%s\" is not a %s function"
 msgstr "«fn» er ikkje ein funksjon"
 
-#: src/main/eval.c:3430
+#: src/main/eval.c:4047
 msgid "node stack overflow"
 msgstr "overflytsfeil i nodestakk"
 
-#: src/main/eval.c:3436
+#: src/main/eval.c:4053
 msgid "integer stack overflow"
 msgstr "overflytsfeil i heiltalsstakk"
 
-#: src/main/eval.c:3490
+#: src/main/eval.c:4107
 #, fuzzy
 msgid "bad opcode"
 msgstr "Ugyldig opcode"
 
-#: src/main/eval.c:4219
+#: src/main/eval.c:5083
 #, c-format
 msgid "invalid %s type in 'x %s y'"
 msgstr "ugyldig %s-type i «x %s y»"
 
-#: src/main/eval.c:4310
+#: src/main/eval.c:5195
 msgid "bytecode version mismatch; using eval"
 msgstr "feil bytekode-versjon (brukar eval)"
 
-#: src/main/eval.c:4315
+#: src/main/eval.c:5200
 msgid "bytecode version is too old"
 msgstr "bytekode-versjonen er for gammal"
 
-#: src/main/eval.c:4316
+#: src/main/eval.c:5201
 msgid "bytecode version is too new"
 msgstr "bytekode-versjonen er for ny"
 
-#: src/main/eval.c:4350
+#: src/main/eval.c:5235
 msgid "byte code version mismatch"
 msgstr "feil i bytekode-versjon"
 
-#: src/main/eval.c:4477
+#: src/main/eval.c:5383
 msgid "invalid sequence argument in for loop"
 msgstr "ugyldig følgjeargument i for-lykkje"
 
-#: src/main/eval.c:4624 src/main/names.c:1181
+#: src/main/eval.c:5522 src/main/names.c:1312
 #, fuzzy, c-format
 msgid "there is no .Internal function '%s'"
 msgstr "internfunksjonen «%s» finst ikkje"
 
-#: src/main/eval.c:4731 src/main/eval.c:5077 src/main/eval.c:5119
+#: src/main/eval.c:5622 src/main/eval.c:5968 src/main/eval.c:6008
 msgid "bad function"
 msgstr "ugyldig funksjon"
 
-#: src/main/eval.c:4746
+#: src/main/eval.c:5635
 msgid "not a BUILTIN function"
 msgstr "ikkje ein BUIILTIN-funksjon"
 
-#: src/main/eval.c:5159
+#: src/main/eval.c:6066
+msgid "bad numeric 'switch' offsets"
+msgstr ""
+
+#: src/main/eval.c:6072
 msgid "numeric EXPR required for 'switch' without named alternatives"
 msgstr ""
 
-#: src/main/eval.c:5255
+#: src/main/eval.c:6076
+msgid "bad character 'switch' offsets"
+msgstr ""
+
+#: src/main/eval.c:6188
 msgid "cannot find index for threaded code address"
 msgstr "finn ikkje indeks for tråda kodeadresse"
 
-#: src/main/eval.c:5315
+#: src/main/eval.c:6248
 #, fuzzy
 msgid "invalid body"
 msgstr "ugyldig symbol"
 
-#: src/main/eval.c:5335
+#: src/main/eval.c:6268
 msgid "invalid symbol"
 msgstr "ugyldig symbol"
 
-#: src/main/eval.c:5379
+#: src/main/eval.c:6312
 msgid "argument is not a byte code object"
 msgstr "argumentet er ikkje eit bytekode-objekt"
 
-#: src/main/eval.c:5400
+#: src/main/eval.c:6334
 msgid "bad file name"
 msgstr "ugyldig filnamn"
 
-#: src/main/eval.c:5404 src/main/eval.c:5425
+#: src/main/eval.c:6338 src/main/eval.c:6359
 msgid "unable to open 'file'"
 msgstr "klarte ikkje opna «file»"
 
-#: src/main/eval.c:5419 src/main/saveload.c:1942
+#: src/main/eval.c:6353 src/main/saveload.c:1944
 msgid "'file' must be non-empty string"
 msgstr "«file» må vera ein ikkje-tom teiknstreng"
 
-#: src/main/eval.c:5421 src/main/saveload.c:1944 src/main/saveload.c:2244
-#: src/main/serialize.c:2149
+#: src/main/eval.c:6355 src/main/saveload.c:1946 src/main/saveload.c:2246
+#: src/main/serialize.c:2189
 msgid "'ascii' must be logical"
 msgstr "«ascii» må vera ein logisk verdi"
 
-#: src/main/eval.c:5492 src/main/eval.c:5511 src/main/eval.c:5541
+#: src/main/eval.c:6426 src/main/eval.c:6445 src/main/eval.c:6475
 #, fuzzy
 msgid "constant buffer must be a generic vector"
 msgstr "«code» må vera ein generisk vektor"
 
-#: src/main/eval.c:5543
+#: src/main/eval.c:6477
 msgid "bad constant count"
 msgstr ""
 
-#: src/main/eval.c:5579
+#: src/main/eval.c:6515
 msgid "profile timer in use"
 msgstr "profiltidtakar i bruk"
 
-#: src/main/eval.c:5581
+#: src/main/eval.c:6517
 msgid "already byte code profiling"
 msgstr "profilerer alt bytekode"
 
-#: src/main/eval.c:5599
+#: src/main/eval.c:6535
 msgid "setting profile timer failed"
 msgstr "klarte ikkje velja profiltidtakar"
 
-#: src/main/eval.c:5616
+#: src/main/eval.c:6553
 msgid "not byte code profiling"
 msgstr "profilerer ikkje bytekode"
 
+#: src/main/eval.c:6569 src/main/eval.c:6573 src/main/eval.c:6577
+#, fuzzy
+msgid "byte code profiling is not supported in this build"
+msgstr "ICU er ikkje støtte på dette bygget"
+
 #: src/main/gevents.c:43
 #, c-format
 msgid "'%s' events not supported in this device"
@@ -3738,27 +3807,27 @@ msgstr "intern feil"
 msgid "this graphics device does not support event handling"
 msgstr "grafikkeininga støttar ikkje hendingshandsaming"
 
-#: src/main/gevents.c:136
+#: src/main/gevents.c:135
 msgid "invalid prompt"
 msgstr "ugyldig spørjing"
 
-#: src/main/gevents.c:148
+#: src/main/gevents.c:146
 #, fuzzy
 msgid "recursive use of 'getGraphicsEvent' not supported"
 msgstr "rekursiv bruk av «getGraphicsEvent» er ikkje støtta"
 
-#: src/main/gevents.c:158
+#: src/main/gevents.c:157
 msgid "no graphics event handlers set"
 msgstr "ingen grafikkhendingshandsamarar definerte"
 
-#: src/main/gram.y:222 src/main/gram.y:237 src/main/gram.y:2222
-#: src/main/gram.y:2236
+#: src/main/gram.y:222 src/main/gram.y:237 src/main/gram.y:2245
+#: src/main/gram.y:2259
 #, c-format
 msgid "EOF whilst reading MBCS char at line %d"
 msgstr "Nådde slutten av fila ved lesing av MBCS-teikn på linje %d"
 
-#: src/main/gram.y:226 src/main/gram.y:234 src/main/gram.y:2226
-#: src/main/gram.y:2233
+#: src/main/gram.y:226 src/main/gram.y:234 src/main/gram.y:2249
+#: src/main/gram.y:2256
 #, c-format
 msgid "invalid multibyte character in parser at line %d"
 msgstr "Ugyldig multibyte-teikn i tolkar på linje %d"
@@ -3773,116 +3842,129 @@ msgstr "overflyt i inndatabuffer på linje %d"
 msgid "incorrect tag type at line %d"
 msgstr "ugyldig merkelapptype på linje %d"
 
-#: src/main/gram.y:1653
+#: src/main/gram.y:1657
 msgid "contextstack overflow"
 msgstr "contextstack-overflyt"
 
-#: src/main/gram.y:1890
-msgid "input"
-msgstr "inndata"
+#: src/main/gram.y:1907 src/main/gram.y:1913
+#, fuzzy, c-format
+msgid "unexpected input"
+msgstr "uventa %s"
 
-#: src/main/gram.y:1891
-msgid "end of input"
+#: src/main/gram.y:1910 src/main/main.c:311
+#, fuzzy, c-format
+msgid "unexpected end of input"
 msgstr "slutt på inndata"
 
-#: src/main/gram.y:1892
-msgid "string constant"
+#: src/main/gram.y:1916
+#, fuzzy, c-format
+msgid "unexpected string constant"
 msgstr "teiknkonstant"
 
-#: src/main/gram.y:1893
-msgid "numeric constant"
+#: src/main/gram.y:1919
+#, fuzzy, c-format
+msgid "unexpected numeric constant"
 msgstr "numerisk konstant"
 
-#: src/main/gram.y:1894
-msgid "symbol"
-msgstr "symbol"
+#: src/main/gram.y:1922
+#, fuzzy, c-format
+msgid "unexpected symbol"
+msgstr "uventa %s"
 
-#: src/main/gram.y:1895
-msgid "assignment"
-msgstr "tildeling"
+#: src/main/gram.y:1925
+#, fuzzy, c-format
+msgid "unexpected assignment"
+msgstr "uventa %s"
 
-#: src/main/gram.y:1896
-msgid "end of line"
+#: src/main/gram.y:1928
+#, fuzzy, c-format
+msgid "unexpected end of line"
 msgstr "linjeskift"
 
-#: src/main/gram.y:1910 src/main/gram.y:1916
+#: src/main/gram.y:1931 src/main/gram.y:1939
 #, c-format
 msgid "unexpected %s"
 msgstr "uventa %s"
 
-#: src/main/gram.y:1926
+#: src/main/gram.y:1951
 #, fuzzy, c-format
 msgid "repeated formal argument '%s' on line %d"
 msgstr "Gjenteke formelt argument «%s» på linje %d"
 
-#: src/main/gram.y:2136
+#: src/main/gram.y:2161
 #, fuzzy, c-format
 msgid "integer literal %s contains decimal; using numeric value"
 msgstr ""
 "heiltalsliteralen %sL inneheld ein desimalverdi (brukar flyttalsverdien)"
 
-#: src/main/gram.y:2140
+#: src/main/gram.y:2164
 #, c-format
 msgid "non-integer value %s qualified with L; using numeric value"
 msgstr "flyttalsverdien %s kvalifisert med L (brukar flyttalsverdien)"
 
-#: src/main/gram.y:2153
+#: src/main/gram.y:2176
 #, fuzzy, c-format
 msgid "integer literal %s contains unnecessary decimal point"
 msgstr "heiltalsverdien %sL inneheld eit unødvendig desimalpunktum"
 
-#: src/main/gram.y:2185
+#: src/main/gram.y:2208
 #, c-format
 msgid "unable to allocate buffer for long string at line %d"
 msgstr "klarte ikkje reservera buffer til lang streng på linje %d"
 
-#: src/main/gram.y:2338
+#: src/main/gram.y:2347 src/main/gram.y:2370 src/main/gram.y:2407
+#: src/main/gram.y:2443
+#, fuzzy, c-format
+msgid "nul character not allowed (line %d)"
+msgstr "Ugyldig multibyte-teikn i tolkar på linje %d"
+
+#: src/main/gram.y:2363
 #, c-format
 msgid "'\\x' used without hex digits in character string starting \"%s\""
 msgstr "«\\x» brukt utan heksadesimalsiffer i teiknstreng som startar med «%s»"
 
-#: src/main/gram.y:2352
+#: src/main/gram.y:2379
 #, c-format
 msgid "\\uxxxx sequences not supported inside backticks (line %d)"
 msgstr "\\uxxxx-følgjer er ikkje støtta mellom `-teikn (linje %d)"
 
-#: src/main/gram.y:2367
+#: src/main/gram.y:2394
 #, c-format
 msgid "'\\u' used without hex digits in character string starting \"%s\""
 msgstr "«\\u» brukt utan heksadesimalsiffer i teiknstreng som startar med «%s»"
 
-#: src/main/gram.y:2375
+#: src/main/gram.y:2402
 #, c-format
 msgid "invalid \\u{xxxx} sequence (line %d)"
 msgstr "ugyldig \\u{xxxx}-følgje (linje %d)"
 
-#: src/main/gram.y:2387
+#: src/main/gram.y:2416
 #, c-format
 msgid "\\Uxxxxxxxx sequences not supported inside backticks (line %d)"
 msgstr "\\Uxxxxxxxx-følgjer er ikkje støtta mellom `-teikn (linje %d)"
 
-#: src/main/gram.y:2402
+#: src/main/gram.y:2431
 #, c-format
 msgid "'\\U' used without hex digits in character string starting \"%s\""
 msgstr "«\\U» brukt utan heksadesimalsiffer i teiknstreng som startar med «%s»"
 
-#: src/main/gram.y:2410
+#: src/main/gram.y:2439
 #, c-format
 msgid "invalid \\U{xxxxxxxx} sequence (line %d)"
 msgstr "ugyldig \\U{xxxxxxxx}-følgje (linje %d)"
 
-#: src/main/gram.y:2451
+#: src/main/gram.y:2482
 #, c-format
 msgid "'\\%c' is an unrecognized escape in character string starting \"%s\""
 msgstr "«\\%c» er eit ukjent verneteikn i tekststreng som startar med «%s»"
 
-#: src/main/gram.y:2510
+#: src/main/gram.y:2546
 msgid "mixing Unicode and octal/hex escapes in a string is not allowed"
 msgstr ""
 "det er ikkje mogleg å blanda Unicode og oktal- eller heksadesimal-koding i "
 "tekststrengar"
 
-#: src/main/gram.y:2514
+#: src/main/gram.y:2550
 #, c-format
 msgid ""
 "string at line %d containing Unicode escapes not in this locale\n"
@@ -3891,13 +3973,13 @@ msgstr ""
 "strengen på linje %d som inneheld Unicode-verneteikn som\n"
 "ikkje finst i dette lokalet er for lang (maks 10000 teikn)"
 
-#: src/main/gram.y:3112 src/main/gram.y:3119 src/main/gram.y:3125
-#: src/main/gram.y:3132
+#: src/main/gram.y:3148 src/main/gram.y:3155 src/main/gram.y:3161
+#: src/main/gram.y:3168
 #, c-format
 msgid "contextstack overflow at line %d"
 msgstr "contextstack-overflyt på linje %d"
 
-#: src/main/gram.y:3227
+#: src/main/gram.y:3263
 #, fuzzy, c-format
 msgid "internal parser error at line %d"
 msgstr "overflyt i inndatabuffer på linje %d"
@@ -3907,34 +3989,34 @@ msgstr "overflyt i inndatabuffer på linje %d"
 msgid "relative range of values =%4.0f * EPS, is small (axis %d)"
 msgstr "relativt verdiområde = %4.0f × EPS er lite (akse %d)"
 
-#: src/main/grep.c:93
+#: src/main/grep.c:96
 #, fuzzy, c-format
 msgid "invalid regular expression '%s', reason '%s'"
 msgstr "ugyldig regulært uttrykk: %s"
 
-#: src/main/grep.c:95
+#: src/main/grep.c:98
 #, fuzzy, c-format
 msgid "invalid regular expression, reason '%s'"
 msgstr "ugyldig regulært uttrykk: %s"
 
-#: src/main/grep.c:220 src/main/grep.c:308 src/main/grep.c:416
-#: src/main/grep.c:883 src/main/grep.c:2473
+#: src/main/grep.c:225 src/main/grep.c:315 src/main/grep.c:426
+#: src/main/grep.c:900 src/main/grep.c:2502
 #, c-format
 msgid "input string %d is invalid UTF-8"
 msgstr "innteksten «%d» er ugyldig UTF-8"
 
-#: src/main/grep.c:286 src/main/grep.c:383
+#: src/main/grep.c:292 src/main/grep.c:391
 #, c-format
 msgid "'split' string %d is invalid UTF-8"
 msgstr "«split»-teksten «%d» er ugyldig UTF-8"
 
-#: src/main/grep.c:290 src/main/grep.c:387 src/main/grep.c:560
+#: src/main/grep.c:296 src/main/grep.c:395 src/main/grep.c:571
 #, c-format
 msgid "'split' string %d is invalid in this locale"
 msgstr "«split»-teksten «%d» er ugyldig i dette lokalet"
 
-#: src/main/grep.c:395 src/main/grep.c:851 src/main/grep.c:1600
-#: src/main/grep.c:2394
+#: src/main/grep.c:404 src/main/grep.c:867 src/main/grep.c:1621
+#: src/main/grep.c:2419
 #, c-format
 msgid ""
 "PCRE pattern compilation error\n"
@@ -3945,13 +4027,13 @@ msgstr ""
 "\t«%s»\n"
 "\tved «%s»\n"
 
-#: src/main/grep.c:397
+#: src/main/grep.c:406
 #, c-format
 msgid "invalid split pattern '%s'"
 msgstr "ugyldig oppdelingsmønster: %s"
 
-#: src/main/grep.c:401 src/main/grep.c:857 src/main/grep.c:1607
-#: src/main/grep.c:2401
+#: src/main/grep.c:410 src/main/grep.c:873 src/main/grep.c:1628
+#: src/main/grep.c:2426
 #, c-format
 msgid ""
 "PCRE pattern study error\n"
@@ -3960,45 +4042,45 @@ msgstr ""
 "studiefeil i PCRE-mønster\n"
 "\t«%s»\n"
 
-#: src/main/grep.c:834 src/main/grep.c:2377
+#: src/main/grep.c:849 src/main/grep.c:2401
 msgid "regular expression is invalid UTF-8"
 msgstr "det regulære uttrykket er ugyldig UTF-8"
 
-#: src/main/grep.c:853 src/main/grep.c:1602 src/main/grep.c:2396
+#: src/main/grep.c:869 src/main/grep.c:1623 src/main/grep.c:2421
 #, c-format
 msgid "invalid regular expression '%s'"
 msgstr "ugyldig regulært uttrykk: %s"
 
-#: src/main/grep.c:1264
+#: src/main/grep.c:1282
 msgid "pattern matches an empty string infinitely, returning first match only"
 msgstr ""
 
-#: src/main/grep.c:1575
+#: src/main/grep.c:1595
 msgid "'pattern' is invalid UTF-8"
 msgstr "«pattern» er ugyldig UTF-8"
 
-#: src/main/grep.c:1577
+#: src/main/grep.c:1597
 msgid "'replacement' is invalid UTF-8"
 msgstr "«replacement» er ugyldig UTF-8"
 
-#: src/main/grep.c:1581
+#: src/main/grep.c:1601
 msgid "'pattern' is invalid in this locale"
 msgstr "«pattern» er ugyldig i dette lokalet"
 
-#: src/main/grep.c:1584
+#: src/main/grep.c:1604
 msgid "'replacement' is invalid in this locale"
 msgstr "«replacement» er ugyldig i dette lokalet"
 
-#: src/main/grep.c:1589
+#: src/main/grep.c:1609
 msgid "zero-length pattern"
 msgstr "mønster av lengd 0"
 
-#: src/main/grep.c:1732 src/main/grep.c:1748 src/main/grep.c:1796
-#: src/main/grep.c:1812 src/main/grep.c:1859 src/main/grep.c:1875
+#: src/main/grep.c:1753 src/main/grep.c:1769 src/main/grep.c:1817
+#: src/main/grep.c:1833 src/main/grep.c:1880 src/main/grep.c:1896
 msgid "result string is too long"
 msgstr "resultatteksten er for lang"
 
-#: src/main/grep.c:2411
+#: src/main/grep.c:2436
 #, c-format
 msgid "'pcre_fullinfo' returned '%d' "
 msgstr ""
@@ -4007,33 +4089,29 @@ msgstr ""
 msgid "ignoring non-pairlist attributes"
 msgstr ""
 
-#: src/main/internet.c:92
+#: src/main/internet.c:83
 msgid "internet routines cannot be accessed in module"
 msgstr "kan ikkje bruka Internett-rutinar i modul"
 
-#: src/main/internet.c:103 src/main/internet.c:141 src/main/internet.c:154
-#: src/main/internet.c:165 src/main/internet.c:176 src/main/internet.c:187
-#: src/main/internet.c:196 src/main/internet.c:207 src/main/internet.c:218
-#: src/main/internet.c:227 src/main/internet.c:237
+#: src/main/internet.c:94 src/main/internet.c:106 src/main/internet.c:119
+#: src/main/internet.c:130 src/main/internet.c:141 src/main/internet.c:152
+#: src/main/internet.c:161 src/main/internet.c:172 src/main/internet.c:183
+#: src/main/internet.c:192 src/main/internet.c:202 src/main/internet.c:318
+#: src/main/internet.c:330 src/main/internet.c:342 src/main/internet.c:354
 msgid "internet routines cannot be loaded"
 msgstr "kan ikkje lasta Internett-rutinar"
 
-#: src/main/internet.c:118 src/main/memory.c:3434 src/main/memory.c:3444
-#: src/main/memory.c:3456 src/main/memory.c:3470 src/main/memory.c:3487
-#: src/main/memory.c:3505
-msgid "bad value"
-msgstr "ugyldig verdi"
-
-#: src/main/internet.c:124
-msgid "internet routines were already initialized"
-msgstr "Internett-rutinane er alt starta"
-
-#: src/main/internet.c:251 src/main/internet.c:265 src/main/internet.c:281
-#: src/main/internet.c:293 src/main/internet.c:307 src/main/internet.c:327
-#: src/main/internet.c:340
+#: src/main/internet.c:216 src/main/internet.c:230 src/main/internet.c:247
+#: src/main/internet.c:259 src/main/internet.c:273 src/main/internet.c:293
+#: src/main/internet.c:306
 msgid "socket routines cannot be loaded"
 msgstr "kan ikkje lasta sokkelrutinar"
 
+#: src/main/internet.c:242
+#, fuzzy
+msgid "attempt to close invalid socket"
+msgstr "prøvde å definera eit ugyldig «comment»-attributt"
+
 #: src/main/lapack.c:39
 #, fuzzy
 msgid "LAPACK routines cannot be accessed in module"
@@ -4044,43 +4122,39 @@ msgstr "X11-rutinar kan ikkje brukast i modul"
 msgid "LAPACK routines cannot be loaded"
 msgstr "kan ikkje lasta sokkelrutinar"
 
-#: src/main/logic.c:70
-msgid "binary operations require two arguments"
-msgstr "binæroperasjonar krev to argument"
-
-#: src/main/logic.c:88 src/main/logic.c:150
+#: src/main/logic.c:80 src/main/logic.c:142
 msgid "operations are possible only for numeric, logical or complex types"
 msgstr ""
 "operasjonane kan berre brukast på numeriske, logiske eller komplekse typar"
 
-#: src/main/logic.c:98
+#: src/main/logic.c:90
 msgid "binary operation on non-conformable arrays"
 msgstr "binæroperasjon på array-ar av ikkje-samsvarande storleikar"
 
-#: src/main/logic.c:124 src/main/relop.c:247
+#: src/main/logic.c:116 src/main/relop.c:241
 msgid "non-conformable time series"
 msgstr "tidsrekkjer av ikkje-samsvarande storleikar"
 
-#: src/main/logic.c:254
+#: src/main/logic.c:247
 #, c-format
 msgid "'%s' operator requires 2 arguments"
 msgstr "«%s»-operatoren tek nøyaktig 2 argument"
 
-#: src/main/logic.c:261
+#: src/main/logic.c:254
 #, c-format
 msgid "invalid 'x' type in 'x %s y'"
 msgstr "ugyldig «x»-type i «x %s y»"
 
-#: src/main/logic.c:268
+#: src/main/logic.c:261
 #, c-format
 msgid "invalid 'y' type in 'x %s y'"
 msgstr "ugyldig «y»-type i «x %s y»"
 
-#: src/main/logic.c:341
+#: src/main/logic.c:334
 msgid "Unary operator `!' called with two arguments"
 msgstr "kalla unæroperatoren «!» med to argument"
 
-#: src/main/logic.c:448
+#: src/main/logic.c:439
 #, c-format
 msgid "coercing argument of type '%s' to logical"
 msgstr "gjer om argument av typen «%s» til logisk verdi"
@@ -4089,62 +4163,76 @@ msgstr "gjer om argument av typen «%s» til logisk verdi"
 msgid "dummy - do not translate"
 msgstr ""
 
-#: src/main/main.c:476
+#: src/main/main.c:329
+#, fuzzy
+msgid "error during cleanup\n"
+msgstr "Feil ved wrapup: "
+
+#: src/main/main.c:336
+msgid "Execution halted\n"
+msgstr "Stoppa køyring\n"
+
+#: src/main/main.c:505
 msgid "Error: segfault from C stack overflow\n"
 msgstr "Feil: Minnepeikarfeil frå C-stakkoverflyt\n"
 
-#: src/main/main.c:846
+#: src/main/main.c:888
 msgid "unable to open the base package\n"
 msgstr "klarte ikkje opna pakken «base»\n"
 
-#: src/main/main.c:924
+#: src/main/main.c:971
 #, fuzzy, c-format
 msgid "unable to restore saved data in %s\n"
 msgstr "klarte ikkje gjenoppretta lagra data i «.RData»\n"
 
-#: src/main/main.c:971
+#: src/main/main.c:1020
 msgid "During startup - "
 msgstr "Ved oppstart – "
 
-#: src/main/main.c:1224
+#: src/main/main.c:1036
+#, fuzzy
+msgid "unable to initialize the JIT\n"
+msgstr "klarte ikkje opna fila å lesa"
+
+#: src/main/main.c:1290
 msgid "cannot quit from browser"
 msgstr "klarte ikkje avslutta browser"
 
-#: src/main/main.c:1228
+#: src/main/main.c:1294
 msgid "one of \"yes\", \"no\", \"ask\" or \"default\" expected."
 msgstr "venta anten «yes», «no», «ask» eller «default»"
 
-#: src/main/main.c:1233
+#: src/main/main.c:1299
 msgid "save=\"ask\" in non-interactive use: command-line default will be used"
 msgstr ""
 "save=\"ask\" i ikkje-interaktiv bruk: kommandolinjestandardverdien vert brukt"
 
-#: src/main/main.c:1241
+#: src/main/main.c:1307
 msgid "unrecognized value of 'save'"
 msgstr "ukjend «save»-verdi"
 
-#: src/main/main.c:1244
+#: src/main/main.c:1310
 msgid "invalid 'status', 0 assumed"
 msgstr "ugyldig «status» (brukar 0)"
 
-#: src/main/main.c:1249
+#: src/main/main.c:1315
 msgid "invalid 'runLast', FALSE assumed"
 msgstr "ugyldig «runLast» (brukar FALSE)"
 
-#: src/main/main.c:1280
+#: src/main/main.c:1346
 msgid "cannot allocate space for toplevel callback element"
 msgstr "klarte ikkje reservera plass til tilbakekall-element på toppnivå"
 
-#: src/main/main.c:1358
+#: src/main/main.c:1424
 msgid "negative index passed to R_removeTaskCallbackByIndex"
 msgstr "negativ indeks send til R_removeTaskCallbackByIndex"
 
-#: src/main/main.c:1468
+#: src/main/main.c:1534
 #, c-format
 msgid "warning messages from top-level task callback '%s'\n"
 msgstr "åtvaringsmeldingar frå oppgåve-tilbakekall «%s» på toppnivå\n"
 
-#: src/main/main.c:1524
+#: src/main/main.c:1591
 msgid "top-level task callback did not return a logical value"
 msgstr "oppgåve-tilbakekall på toppnivå returnerte ikkje ein logisk verdi"
 
@@ -4166,200 +4254,209 @@ msgstr ""
 msgid "invalid partial string match"
 msgstr "ugyldig delvis strengsamvar"
 
-#: src/main/match.c:228 src/main/match.c:268 src/main/objects.c:56
-#: src/main/objects.c:66
+#: src/main/match.c:228 src/main/match.c:266 src/main/objects.c:49
+#: src/main/objects.c:59
 #, c-format
 msgid "formal argument \"%s\" matched by multiple actual arguments"
 msgstr "fleire argument passar til det formelle argumentet «%s»"
 
-#: src/main/match.c:231 src/main/match.c:266
+#: src/main/match.c:231 src/main/match.c:264
 #, c-format
 msgid "argument %d matches multiple formal arguments"
 msgstr "argument nummer %d passar til fleire formelle argument"
 
-#: src/main/match.c:272
+#: src/main/match.c:270
 #, c-format
 msgid "partial argument match of '%s' to '%s'"
 msgstr "delvis argumentsamsvar av «%s» til «%s»"
 
-#: src/main/match.c:383
+#: src/main/match.c:380
 #, fuzzy, c-format
 msgid "unused argument %s"
 msgid_plural "unused arguments %s"
 msgstr[0] "ubrukt(e) argument %s"
 msgstr[1] "ubrukt(e) argument %s"
 
-#: src/main/memory.c:1232
+#: src/main/memory.c:1234
 msgid "can only weakly reference/finalize reference objects"
 msgstr "kan berre svakt referera/finalisera referanseobjekt"
 
-#: src/main/memory.c:1266
+#: src/main/memory.c:1268
 msgid "finalizer must be a function or NULL"
 msgstr "finalisatoren må vera ein funksjon eller NULL"
 
-#: src/main/memory.c:1322 src/main/memory.c:1330 src/main/memory.c:1341
+#: src/main/memory.c:1324 src/main/memory.c:1332 src/main/memory.c:1343
 msgid "not a weak reference"
 msgstr "ikkje ein svak referanse"
 
-#: src/main/memory.c:1472
+#: src/main/memory.c:1474
 msgid "first argument must be environment or external pointer"
 msgstr "det første argumentet må vera ein omgjevnad eller ein ekstern peikar"
 
-#: src/main/memory.c:1474
+#: src/main/memory.c:1476
 msgid "second argument must be a function"
 msgstr "det andre argumentet må vera ein funksjon"
 
-#: src/main/memory.c:1478
+#: src/main/memory.c:1480
 msgid "third argument must be 'TRUE' or 'FALSE'"
 msgstr "det tredje argumentet må vera «TRUE» (sann) eller «FALSE» (usann)"
 
-#: src/main/memory.c:1970
+#: src/main/memory.c:1979
 msgid "vector memory exhausted (limit reached?)"
 msgstr "ikkje nok vektorminne (nådde grensa?)"
 
-#: src/main/memory.c:1976
+#: src/main/memory.c:1985
 msgid "cons memory exhausted (limit reached?)"
 msgstr "ikkje nok konstantminne (nådde grensa?)"
 
-#: src/main/memory.c:1981
+#: src/main/memory.c:1990
 msgid "memory exhausted (limit reached?)"
 msgstr "ikkje nok minne (nådde grensa?)"
 
-#: src/main/memory.c:2116
+#: src/main/memory.c:2126
 #, fuzzy, c-format
 msgid "cannot allocate memory block of size %0.f Tb"
 msgstr "klarte ikkje reservera minneblokk av storleik %0.1f Gb"
 
-#: src/main/memory.c:2121
+#: src/main/memory.c:2131
 #, c-format
 msgid "cannot allocate memory block of size %0.1f Gb"
 msgstr "klarte ikkje reservera minneblokk av storleik %0.1f Gb"
 
-#: src/main/memory.c:2442
+#: src/main/memory.c:2458
 #, fuzzy
 msgid "vector is too large"
 msgstr "den oppgjevne vektorstorleiken er for stor"
 
-#: src/main/memory.c:2445
+#: src/main/memory.c:2461
 msgid "negative length vectors are not allowed"
 msgstr "kan ikkje ha vektorar av negativ lengd"
 
-#: src/main/memory.c:2471 src/main/memory.c:2484 src/main/memory.c:2497
-#: src/main/memory.c:2512
+#: src/main/memory.c:2487 src/main/memory.c:2500 src/main/memory.c:2513
+#: src/main/memory.c:2528
 #, c-format
 msgid "cannot allocate vector of length %d"
 msgstr "kan ikkje reservera vektor av lengd %d"
 
-#: src/main/memory.c:2533
+#: src/main/memory.c:2549
 #, c-format
 msgid "invalid type/length (%s/%d) in vector allocation"
 msgstr "ugyldig type/lengd (%s/%d) ved vektorreservering"
 
-#: src/main/memory.c:2636
+#: src/main/memory.c:2648
 #, c-format
 msgid "cannot allocate vector of size %0.1f Gb"
 msgstr "kan ikkje reservera vektor av storleik %0.1f Gb"
 
-#: src/main/memory.c:2640
+#: src/main/memory.c:2652
 #, c-format
 msgid "cannot allocate vector of size %0.1f Mb"
 msgstr "kan ikkje reservera vektor av storleik %0.1f Mb"
 
-#: src/main/memory.c:2644
+#: src/main/memory.c:2656
 #, c-format
 msgid "cannot allocate vector of size %0.f Kb"
 msgstr "kan ikkje reservera vektor av storleik %0.f Kb"
 
-#: src/main/memory.c:3001
+#: src/main/memory.c:3071
 msgid "protect(): protection stack overflow"
 msgstr "protect(): vern av stakkoverflyt"
 
-#: src/main/memory.c:3008
-#, c-format
-msgid "unprotect(): only %d protected items"
-msgstr "unprotect(): berre %d verna objekt"
+#: src/main/memory.c:3078
+#, fuzzy, c-format
+msgid "unprotect(): only %d protected item"
+msgid_plural "unprotect(): only %d protected items"
+msgstr[0] "unprotect(): berre %d verna objekt"
+msgstr[1] "unprotect(): berre %d verna objekt"
 
-#: src/main/memory.c:3041
+#: src/main/memory.c:3113
 msgid "unprotect_ptr: pointer not found"
 msgstr "unprotect_ptr: fann ikkje peikar"
 
-#: src/main/memory.c:3079
+#: src/main/memory.c:3151
 #, fuzzy, c-format
-msgid "R_Reprotect: only %d protected items, can't reprotect index %d"
-msgstr "unprotect(): berre %d verna objekt"
+msgid "R_Reprotect: only %d protected item, can't reprotect index %d"
+msgid_plural "R_Reprotect: only %d protected items, can't reprotect index %d"
+msgstr[0] "unprotect(): berre %d verna objekt"
+msgstr[1] "unprotect(): berre %d verna objekt"
 
-#: src/main/memory.c:3129
+#: src/main/memory.c:3203
 #, fuzzy, c-format
 msgid "'Calloc' could not allocate memory (%.0f of %u bytes)"
 msgstr "Calloc klarte ikkje reservera (%u av %u) minne"
 
-#: src/main/memory.c:3140
+#: src/main/memory.c:3214
 #, fuzzy, c-format
 msgid "'Realloc' could not re-allocate memory (%.0f bytes)"
 msgstr "Realloc klarte ikkje endra storleik (%u) på reservert minne"
 
-#: src/main/memory.c:3380
+#: src/main/memory.c:3460
 msgid "not safe to return vector pointer"
 msgstr "ikkje trygt å returnera vektorpeikar"
 
-#: src/main/memory.c:3392
+#: src/main/memory.c:3471
 #, c-format
 msgid "attempt to set index %lu/%lu in SET_STRING_ELT"
 msgstr ""
 
-#: src/main/memory.c:3408
+#: src/main/memory.c:3487
 #, c-format
 msgid "attempt to set index %lu/%lu in SET_VECTOR_ELT"
 msgstr ""
 
-#: src/main/memory.c:3658
+#: src/main/memory.c:3514 src/main/memory.c:3524 src/main/memory.c:3536
+#: src/main/memory.c:3550 src/main/memory.c:3565 src/main/memory.c:3583
+msgid "bad value"
+msgstr "ugyldig verdi"
+
+#: src/main/memory.c:3746
 msgid "memory profiling is not available on this system"
 msgstr "minneprofilering er ikkje tilgjengeleg på dette systemet"
 
-#: src/main/memory.c:3723
+#: src/main/memory.c:3810
 #, c-format
 msgid "Rprofmem: cannot open output file '%s'"
 msgstr "Rprofmem: klarte ikkje opna utfila «%s»"
 
-#: src/main/memory.c:3830
+#: src/main/memory.c:3915
 #, c-format
 msgid "long vectors not supported yet: %s:%d"
 msgstr ""
 
-#: src/main/names.c:996
+#: src/main/names.c:1021
 msgid "string argument required"
 msgstr "krev strengargument"
 
-#: src/main/names.c:999
+#: src/main/names.c:1024
 msgid "no such primitive function"
 msgstr "primitivfunksjonen finst ikkje"
 
-#: src/main/names.c:1146
+#: src/main/names.c:1212 src/main/names.c:1242
 msgid "attempt to use zero-length variable name"
 msgstr "variabelnamn av lengd null"
 
-#: src/main/names.c:1148
+#: src/main/names.c:1214 src/main/names.c:1244
 #, c-format
 msgid "variable names are limited to %d bytes"
 msgstr "variabelnamn må vera mindre enn %d byte"
 
-#: src/main/names.c:1176 src/main/names.c:1179
+#: src/main/names.c:1307 src/main/names.c:1310
 msgid "invalid .Internal() argument"
 msgstr "ugyldig .Internal()-argument"
 
-#: src/main/objects.c:46
+#: src/main/objects.c:39
 msgid "generic 'function' is not a function"
 msgstr "generisk «function» er ikkje ein funksjon"
 
-#: src/main/objects.c:201
+#: src/main/objects.c:193
 msgid "bad generic call environment"
 msgstr "ugyldig generisk kallomgjevnad"
 
-#: src/main/objects.c:207
+#: src/main/objects.c:201
 msgid "bad generic definition environment"
 msgstr "ugyldig generisk definisjonsomgjevnad"
 
-#: src/main/objects.c:246
+#: src/main/objects.c:249
 #, fuzzy
 msgid ""
 "no '.S3MethodsClass' table, cannot use S4 objects with S3 methods ('methods' "
@@ -4368,140 +4465,121 @@ msgstr ""
 "Manglar «.S3MethodsClass»-tabell. Kan ikkje bruka S4-objekt med S3-metodar "
 "(er ikkje «methods»-pakken lasta?)"
 
-#: src/main/objects.c:270 src/main/objects.c:411
-msgid "'UseMethod' used in an inappropriate fashion"
-msgstr "«UseMethod» brukt på feil måte"
-
-#: src/main/objects.c:290
-#, fuzzy
-msgid "invalid generic function in 'usemethod'"
-msgstr "Ugyldig generisk funksjon i «usemethod»"
-
-#: src/main/objects.c:399
+#: src/main/objects.c:415
 msgid "there must be a 'generic' argument"
 msgstr "det må vera eit «generic»-argument"
 
-#: src/main/objects.c:403
+#: src/main/objects.c:419
 msgid "'generic' argument must be a character string"
 msgstr "«generic»-argumentet må vera ein tekststreng"
 
-#: src/main/objects.c:440
-#, fuzzy
-msgid "'UseMethod' called from outside a function"
-msgstr "«NextMethod» kalla utanfrå ein funksjon"
-
-#: src/main/objects.c:447
-msgid "first argument must be a generic name"
-msgstr "det første argumentet må vera eit generisk namn"
+#: src/main/objects.c:427
+msgid "'UseMethod' used in an inappropriate fashion"
+msgstr "«UseMethod» brukt på feil måte"
 
 #: src/main/objects.c:472
 #, c-format
 msgid "no applicable method for '%s' applied to an object of class \"%s\""
 msgstr "ingen samsvarande metode for «%s» brukt på eit objekt av klassen «%s»"
 
-#: src/main/objects.c:533
+#: src/main/objects.c:582
 msgid "'NextMethod' called from outside a function"
 msgstr "«NextMethod» kalla utanfrå ein funksjon"
 
-#: src/main/objects.c:539
+#: src/main/objects.c:588
 msgid "'NextMethod' called from an anonymous function"
 msgstr "«NextMethod» kalla frå ein anonym funksjon"
 
-#: src/main/objects.c:563
+#: src/main/objects.c:609
 msgid "no calling generic was found: was a method called directly?"
 msgstr "fann ikkje noko generisk kall: vart metoden kalla direkte?"
 
-#: src/main/objects.c:566
+#: src/main/objects.c:612
 #, c-format
 msgid "'function' is not a function, but of type %d"
 msgstr "«function» er ikkje ein funksjon men av typen %d"
 
-#: src/main/objects.c:640
+#: src/main/objects.c:639
 msgid "wrong argument ..."
 msgstr "feil argument ..."
 
-#: src/main/objects.c:653
+#: src/main/objects.c:651
 msgid "object not specified"
 msgstr "ikkje valt objekt"
 
-#: src/main/objects.c:663 src/main/objects.c:670
+#: src/main/objects.c:659 src/main/objects.c:666
 msgid "generic function not specified"
 msgstr "ikkje valt generisk funksjon"
 
-#: src/main/objects.c:667
+#: src/main/objects.c:663
 #, fuzzy
 msgid "invalid generic argument to 'NextMethod'"
 msgstr "ugyldig generisk argument til NextMethod"
 
-#: src/main/objects.c:680
+#: src/main/objects.c:675
 #, fuzzy
 msgid "invalid 'group' argument found in 'NextMethod'"
 msgstr "fann ugyldig «group»-argument i NextMethod"
 
-#: src/main/objects.c:699
+#: src/main/objects.c:692
 msgid "wrong value for .Method"
 msgstr "feil verdi for «.Method»"
 
-#: src/main/objects.c:703 src/main/objects.c:712
-#, c-format
-msgid "method name too long in '%s'"
-msgstr "metodenamnet i «%s» er for langt"
-
-#: src/main/objects.c:715
+#: src/main/objects.c:702
 msgid "Incompatible methods ignored"
 msgstr "ikkje-kompatible metodar ignorerte"
 
-#: src/main/objects.c:775 src/main/objects.c:780
+#: src/main/objects.c:759 src/main/objects.c:766
 msgid "no method to invoke"
 msgstr "ingen metode å bruka"
 
-#: src/main/objects.c:832
+#: src/main/objects.c:817
 msgid "cannot unclass an environment"
 msgstr "kan ikkje fjerna klasse frå ein omgjevnad"
 
-#: src/main/objects.c:835
+#: src/main/objects.c:820
 msgid "cannot unclass an external pointer"
 msgstr "kan ikkje fjerna klasse frå ein ekstern peikar"
 
-#: src/main/objects.c:872
+#: src/main/objects.c:856
 msgid "'what' must be a character vector"
 msgstr "«what» må vera ein teiknvektor"
 
-#: src/main/objects.c:876
+#: src/main/objects.c:860
 msgid "'which' must be a length 1 logical vector"
 msgstr "«which» må vera ein logisk vektor av lengd 1"
 
-#: src/main/objects.c:882
+#: src/main/objects.c:866
 msgid "use 'is()' instead of 'inherits()' on S4 objects"
 msgstr "bruk «is» i staden for «inherits()» på S4-objekt"
 
-#: src/main/objects.c:1012
+#: src/main/objects.c:995
 msgid "could not find correct environment; please report!"
 msgstr ""
 
-#: src/main/objects.c:1052
+#: src/main/objects.c:1039
 #, fuzzy
 msgid "'onOff' must be TRUE or FALSE"
 msgstr "«all.x» må vera TRUE eller FALSE"
 
-#: src/main/objects.c:1119
+#: src/main/objects.c:1104
 #, c-format
 msgid "unable to find a non-generic version of function \"%s\""
 msgstr "klarte ikkje finna ein ikkje-generisk versjon av funksjonen «%s»"
 
-#: src/main/objects.c:1151
+#: src/main/objects.c:1136
 #, fuzzy
 msgid ""
 "'standardGeneric' called without 'methods' dispatch enabled (will be ignored)"
 msgstr ""
 "standardGeneric vart kalla utan metodeavsending slått på (vert ignorert)"
 
-#: src/main/objects.c:1160
+#: src/main/objects.c:1145
 #, fuzzy
 msgid "argument to 'standardGeneric' must be a non-empty character string"
 msgstr "argument til standardGeneric må vera ein ikkjetom teiknstreng"
 
-#: src/main/objects.c:1165
+#: src/main/objects.c:1150
 #, c-format
 msgid ""
 "call to standardGeneric(\"%s\") apparently not from the body of that generic "
@@ -4510,11 +4588,7 @@ msgstr ""
 "kall til standardGeneric(\"%s\") ikkje frå funksjonskroppen til den "
 "generiske funksjonen"
 
-#: src/main/objects.c:1189
-msgid "argument 'code' must be a character string"
-msgstr "argumentet «code» må vera ein teiknstreng"
-
-#: src/main/objects.c:1257
+#: src/main/objects.c:1249
 #, c-format
 msgid ""
 "invalid primitive methods code (\"%s\"): should be \"clear\", \"reset\", "
@@ -4523,11 +4597,11 @@ msgstr ""
 "ugyldig primitivmetode-kode («%s») (må vera «clear», «reset», «set» eller "
 "«suppress»)"
 
-#: src/main/objects.c:1265
+#: src/main/objects.c:1257
 msgid "invalid object: must be a primitive function"
 msgstr "ugyldig objekt: må vera ein primitiv funksjon"
 
-#: src/main/objects.c:1312
+#: src/main/objects.c:1304
 #, c-format
 msgid ""
 "the formal definition of a primitive generic must be a function object (got "
@@ -4536,22 +4610,22 @@ msgstr ""
 "den formelle definisjonen av ein primitiv generisk må vera eit "
 "funksjonsobjekt (typen er «%s»)"
 
-#: src/main/objects.c:1342
+#: src/main/objects.c:1334
 #, fuzzy, c-format
 msgid "object returned as generic function \"%s\" does not appear to be one"
 msgstr ""
 "objekt returnert som den generiske funksjonen «%s» ser ikkje ut til å vera "
 "ein generisk funksjon"
 
-#: src/main/objects.c:1444
+#: src/main/objects.c:1439
 msgid "invalid primitive operation given for dispatch"
 msgstr "ugyldig primitivoperasjon gjeven for avsending"
 
-#: src/main/objects.c:1470 src/main/objects.c:1489
+#: src/main/objects.c:1468 src/main/objects.c:1487
 msgid "dispatch error"
 msgstr "avsendingsfeil"
 
-#: src/main/objects.c:1483
+#: src/main/objects.c:1481
 #, c-format
 msgid ""
 "primitive function \"%s\" has been set for methods but no generic function "
@@ -4560,81 +4634,91 @@ msgstr ""
 "primitivfunksjonen «%s» er sett for metodar, men ingen generisk funksjon er "
 "oppgjeven"
 
-#: src/main/objects.c:1508
+#: src/main/objects.c:1506
 msgid "C level MAKE_CLASS macro called with NULL string pointer"
 msgstr "MAKE_CLASS-makro på C-nivå kalla med NULL-strengpeikar"
 
-#: src/main/objects.c:1524
+#: src/main/objects.c:1522
+#, fuzzy
+msgid "'methods' package not yet loaded"
+msgstr "Hershey-skriftene kan ikkje lastast"
+
+#: src/main/objects.c:1532
 msgid "R_getClassDef(.) called with NULL string pointer"
 msgstr "R_getClassDef(.) kalla med NULL-strengpeikar"
 
-#: src/main/objects.c:1546
+#: src/main/objects.c:1577
 msgid "C level NEW macro called with null class definition pointer"
 msgstr "NEW-makro på C-nivå kalla med NULL-klassedefinisjonspeikar"
 
-#: src/main/objects.c:1550
+#: src/main/objects.c:1581
 #, c-format
 msgid "trying to generate an object from a virtual class (\"%s\")"
 msgstr "prøver å generera objekt frå virtuell klasse («%s»)"
 
-#: src/main/objects.c:1627
+#: src/main/objects.c:1663
 #, fuzzy, c-format
 msgid "object of class \"%s\" does not correspond to a valid S3 object"
 msgstr "Objekt av klassen «%s» svarar ikkje til eit gyldig S3-objekt"
 
-#: src/main/options.c:120 src/main/options.c:180
+#: src/main/options.c:121 src/main/options.c:182
 msgid "corrupted options list"
 msgstr "øydelagd valliste"
 
-#: src/main/options.c:130
+#: src/main/options.c:131
 msgid "invalid printing width, used 80"
 msgstr "ugyldig tekstbreidd (brukar 80)"
 
-#: src/main/options.c:141
+#: src/main/options.c:142
 msgid "invalid printing digits, used 7"
 msgstr "ugyldig tal på siffer (brukar 7)"
 
-#: src/main/options.c:153
+#: src/main/options.c:154
 msgid "invalid 'deparse.cutoff', used 60"
 msgstr ""
 
-#: src/main/options.c:165
+#: src/main/options.c:166
 msgid "invalid value for \"device.ask.default\", using FALSE"
 msgstr "ugyldig verdi for «device.ask.default» (brukar FALSE)"
 
-#: src/main/options.c:401
+#: src/main/options.c:416
 msgid "list argument has no valid names"
 msgstr "listeargumentet har ikkje nokon gyldige namn"
 
-#: src/main/options.c:429
+#: src/main/options.c:445
 #, c-format
 msgid "invalid 'width' parameter, allowed %d...%d"
 msgstr "ugyldig «width»-parameter (bruk verdiar frå %d til %d)"
 
-#: src/main/options.c:440
+#: src/main/options.c:456
 #, c-format
 msgid "invalid 'digits' parameter, allowed %d...%d"
 msgstr "ugyldig «digits»-parameter (bruk verdiar frå %d til %d)"
 
-#: src/main/options.c:447
+#: src/main/options.c:463
 #, c-format
 msgid "'expressions' parameter invalid, allowed %d...%d"
 msgstr "ugyldig «expressions»-parameter (bruk verdiar frå %d til %d)"
 
-#: src/main/options.c:454 src/main/options.c:462 src/main/options.c:468
-#: src/main/options.c:476 src/main/options.c:483 src/main/options.c:488
-#: src/main/options.c:495 src/main/options.c:501 src/main/options.c:507
-#: src/main/options.c:512 src/main/options.c:517 src/main/options.c:526
-#: src/main/options.c:532 src/main/options.c:538 src/main/options.c:549
-#: src/main/options.c:556 src/main/options.c:562 src/main/options.c:570
-#: src/main/options.c:577 src/main/options.c:584 src/main/options.c:591
-#: src/main/options.c:598 src/main/options.c:606 src/main/options.c:615
-#: src/main/options.c:618 src/main/options.c:624
+#: src/main/options.c:470 src/main/options.c:478 src/main/options.c:484
+#: src/main/options.c:492 src/main/options.c:499 src/main/options.c:504
+#: src/main/options.c:511 src/main/options.c:517 src/main/options.c:523
+#: src/main/options.c:528 src/main/options.c:533 src/main/options.c:542
+#: src/main/options.c:548 src/main/options.c:554 src/main/options.c:564
+#: src/main/options.c:578 src/main/options.c:584 src/main/options.c:592
+#: src/main/options.c:599 src/main/options.c:606 src/main/options.c:613
+#: src/main/options.c:620 src/main/options.c:628 src/main/options.c:637
+#: src/main/options.c:640 src/main/options.c:646
 #, c-format
 msgid "invalid value for '%s'"
 msgstr "ugyldig verdi for «%s»"
 
-#: src/main/options.c:611 src/main/options.c:640
+#: src/main/options.c:569
+#, fuzzy
+msgid "'OutDec' must be a string of one character"
+msgstr "«dec» må vera eitt teikn"
+
+#: src/main/options.c:633 src/main/options.c:662
 msgid "\"par.ask.default\" has been replaced by \"device.ask.default\""
 msgstr "«par.ask.default» er bytt ut med «device.ask.default»"
 
@@ -4655,15 +4739,20 @@ msgstr ""
 msgid "non-string argument to Internal paste"
 msgstr "ikkje-strengsargument til intern paste"
 
-#: src/main/paste.c:390
+#: src/main/paste.c:387
 msgid "first argument must be atomic"
 msgstr "det første argumentet må vera atomisk"
 
-#: src/main/paste.c:560
+#: src/main/paste.c:448
+#, fuzzy
+msgid "'decimal.mark' must be a string of one character"
+msgstr "«dec» må vera eitt teikn"
+
+#: src/main/paste.c:579
 msgid "Impossible mode ( x )"
 msgstr "umogleg modus (x)"
 
-#: src/main/paste.c:645
+#: src/main/paste.c:663
 msgid "atomic vector arguments only"
 msgstr "berre atomske vektorargument"
 
@@ -4671,217 +4760,199 @@ msgstr "berre atomske vektorargument"
 msgid "invalid filename specification"
 msgstr "ugyldig filnamnspesifikasjon"
 
-#: src/main/platform.c:375 src/main/platform.c:419
+#: src/main/platform.c:375 src/main/platform.c:420
 msgid "write error during file append"
 msgstr "skrivefeil ved tilføying"
 
-#: src/main/platform.c:394
+#: src/main/platform.c:395
 msgid "nothing to append to"
 msgstr "ingenting å tilføya til"
 
-#: src/main/platform.c:448 src/main/platform.c:795
+#: src/main/platform.c:449 src/main/platform.c:797 src/main/platform.c:979
 msgid "invalid filename argument"
 msgstr "ugyldig filnamnargument"
 
-#: src/main/platform.c:460
+#: src/main/platform.c:461
 #, c-format
 msgid "cannot create file '%s', reason '%s'"
 msgstr "kan ikkje oppretta fila «%s», av grunnen «%s»"
 
-#: src/main/platform.c:475 src/main/platform.c:545 src/main/platform.c:627
+#: src/main/platform.c:476 src/main/platform.c:546 src/main/platform.c:629
 msgid "invalid first filename"
 msgstr "ugyldig første filnamn"
 
-#: src/main/platform.c:487
+#: src/main/platform.c:488
 #, c-format
 msgid "cannot remove file '%s', reason '%s'"
 msgstr "kan ikkje fjerna fila «%s», av grunnen «%s»"
 
-#: src/main/platform.c:547 src/main/platform.c:629
+#: src/main/platform.c:548 src/main/platform.c:631
 msgid "invalid second filename"
 msgstr "ugyldig andre filnamn"
 
-#: src/main/platform.c:549 src/main/platform.c:631
+#: src/main/platform.c:551 src/main/platform.c:634
 msgid "nothing to link"
 msgstr "ingenting å lenkja"
 
-#: src/main/platform.c:559
+#: src/main/platform.c:561
 #, fuzzy
 msgid "symbolic links are not supported on this version of Windows"
 msgstr "symbolske lenkjer er ikkje støtta på denne plattforma"
 
-#: src/main/platform.c:581
+#: src/main/platform.c:583
 #, fuzzy, c-format
 msgid "cannot symlink '%ls' to '%ls', reason '%s'"
 msgstr "kan ikkje laga symbolsk lenkje av «%s» til «%s», av grunnen «%s»"
 
-#: src/main/platform.c:601
+#: src/main/platform.c:603
 #, c-format
 msgid "cannot symlink '%s' to '%s', reason '%s'"
 msgstr "kan ikkje laga symbolsk lenkje av «%s» til «%s», av grunnen «%s»"
 
-#: src/main/platform.c:609
+#: src/main/platform.c:611
 #, fuzzy
 msgid "symbolic links are not supported on this platform"
 msgstr "symbolske lenkjer er ikkje støtta på denne plattforma"
 
-#: src/main/platform.c:649
+#: src/main/platform.c:652
 #, fuzzy, c-format
 msgid "cannot link '%ls' to '%ls', reason '%s'"
 msgstr "kan ikkje laga symbolsk lenkje av «%s» til «%s», av grunnen «%s»"
 
-#: src/main/platform.c:669
+#: src/main/platform.c:672
 #, fuzzy, c-format
 msgid "cannot link '%s' to '%s', reason '%s'"
 msgstr "kan ikkje laga symbolsk lenkje av «%s» til «%s», av grunnen «%s»"
 
-#: src/main/platform.c:678
+#: src/main/platform.c:681
 #, fuzzy
 msgid "(hard) links are not supported on this platform"
 msgstr "symbolske lenkjer er ikkje støtta på denne plattforma"
 
-#: src/main/platform.c:709
+#: src/main/platform.c:713
 msgid "'from' and 'to' are of different lengths"
 msgstr ""
 
-#: src/main/platform.c:720 src/main/platform.c:730
+#: src/main/platform.c:724 src/main/platform.c:734
 #, fuzzy
 msgid "expanded 'from' name too long"
 msgstr "det utvida kjeldenamnet er for langt"
 
-#: src/main/platform.c:724 src/main/platform.c:734
+#: src/main/platform.c:728 src/main/platform.c:738
 #, fuzzy
 msgid "expanded 'to' name too long"
 msgstr "det utvida kjeldenamnet er for langt"
 
-#: src/main/platform.c:738
+#: src/main/platform.c:742
 #, c-format
 msgid "cannot rename file '%s' to '%s', reason '%s'"
 msgstr "kan ikkje byta namnet på fila «%s» til «%s», av grunnen «%s»"
 
-#: src/main/platform.c:1094
+#: src/main/platform.c:1168
 msgid "invalid 'pattern' regular expression"
 msgstr "ugyldig «pattern» i regulært uttrykk"
 
-#: src/main/platform.c:1211
+#: src/main/platform.c:1285
 msgid "unable to determine R home location"
 msgstr "klarte ikkje fastsetja heimeadressa til R"
 
-#: src/main/platform.c:1263
+#: src/main/platform.c:1338
 msgid "file name too long"
 msgstr "filnamnet er for langt"
 
-#: src/main/platform.c:1511 src/main/platform.c:1558 src/main/sysutils.c:1850
-#: src/main/sysutils.c:1864
+#: src/main/platform.c:1586 src/main/platform.c:1633 src/main/sysutils.c:1806
+#: src/main/sysutils.c:1820
 msgid "internal out-of-memory condition"
 msgstr "intern «ikkje nok minne»-feil"
 
-#: src/main/platform.c:1554 src/main/sysutils.c:1860
+#: src/main/platform.c:1629 src/main/sysutils.c:1816
 #, c-format
 msgid "read error on '%s'"
 msgstr "lesefeil på «%s»"
 
-#: src/main/platform.c:1722
+#: src/main/platform.c:1728
 msgid "setting 'LC_NUMERIC' may cause R to function strangely"
 msgstr "viss du set «LC_NUMERIC», kan R oppføra seg merkeleg"
 
-#: src/main/platform.c:1736
+#: src/main/platform.c:1742
 msgid "LC_MESSAGES exists on Windows but is not operational"
 msgstr ""
 
-#: src/main/platform.c:1763
+#: src/main/platform.c:1769
 #, c-format
 msgid "OS reports request to set locale to \"%s\" cannot be honored"
 msgstr "OS-førespurnad om å setja lokalet til «%s» kan ikkje følgjast"
 
-#: src/main/platform.c:2065
-msgid "'hostname' must be a character vector of length 1"
-msgstr "«hostnamne» må vera ein teiknvektor av lengd 1"
-
-#: src/main/platform.c:2071
-#, c-format
-msgid "nsl() was unable to resolve host '%s'"
-msgstr "nsl() klarte ikkje utføra namneoppslag for verten «%s»"
-
-#: src/main/platform.c:2078
-#, fuzzy
-msgid "unknown format returned by C function 'gethostbyname'"
-msgstr "ukjend format returnert av gethostbyname"
-
-#: src/main/platform.c:2087
-msgid "nsl() is not supported on this platform"
-msgstr "nsl() er ikkje støtta på denne plattforma"
-
-#: src/main/platform.c:2158
+#: src/main/platform.c:2131
 #, c-format
 msgid "'%s' already exists"
 msgstr "«%s» finst alt"
 
-#: src/main/platform.c:2161
+#: src/main/platform.c:2134
 #, c-format
 msgid "cannot create dir '%s', reason '%s'"
 msgstr "kan ikkje oppretta mappa «%s», av grunnen «%s»"
 
-#: src/main/platform.c:2207
+#: src/main/platform.c:2181
 #, c-format
 msgid "'%ls' already exists"
 msgstr "«%ls» finst alt"
 
-#: src/main/platform.c:2211
+#: src/main/platform.c:2183 src/main/platform.c:2189
 #, fuzzy, c-format
 msgid "cannot create dir '%ls', reason '%s'"
 msgstr "kan ikkje oppretta mappa «%s», av grunnen «%s»"
 
-#: src/main/platform.c:2245 src/main/platform.c:2449
+#: src/main/platform.c:2223 src/main/platform.c:2435
 msgid "too deep nesting"
 msgstr ""
 
-#: src/main/platform.c:2253 src/main/platform.c:2266 src/main/platform.c:2284
+#: src/main/platform.c:2231 src/main/platform.c:2244 src/main/platform.c:2262
 #, fuzzy
 msgid "over-long path"
 msgstr "mønster av lengd 0"
 
-#: src/main/platform.c:2273
+#: src/main/platform.c:2251
 #, fuzzy, c-format
 msgid "problem creating directory %ls: %s"
 msgstr "feil ved køyring av skriveprogrammet %s"
 
-#: src/main/platform.c:2293
+#: src/main/platform.c:2271
 #, fuzzy, c-format
 msgid "problem reading dir %ls: %s"
 msgstr "feil ved køyring av skriveprogrammet %s"
 
-#: src/main/platform.c:2304 src/main/platform.c:2465 src/main/platform.c:2478
-#: src/main/platform.c:2498 src/main/platform.c:2520
+#: src/main/platform.c:2282 src/main/platform.c:2451 src/main/platform.c:2464
+#: src/main/platform.c:2484 src/main/platform.c:2506
 #, fuzzy
 msgid "over-long path length"
 msgstr "mønster av lengd 0"
 
-#: src/main/platform.c:2312
+#: src/main/platform.c:2290
 #, c-format
 msgid "problem copying %ls to %ls: %s"
 msgstr ""
 
-#: src/main/platform.c:2487
+#: src/main/platform.c:2473
 #, fuzzy, c-format
 msgid "problem creating directory %s: %s"
 msgstr "feil ved køyring av skriveprogrammet %s"
 
-#: src/main/platform.c:2507
+#: src/main/platform.c:2493
 #, fuzzy, c-format
 msgid "problem reading directory %s: %s"
 msgstr "feil ved køyring av skriveprogrammet %s"
 
-#: src/main/platform.c:2529
+#: src/main/platform.c:2515
 #, c-format
 msgid "problem copying %s to %s: %s"
 msgstr ""
 
-#: src/main/platform.c:2662
+#: src/main/platform.c:2653
 msgid "'mode' must be of length at least one"
 msgstr "«mode» må ha minst eitt element"
 
-#: src/main/platform.c:2729
+#: src/main/platform.c:2720
 msgid "insufficient OS support on this platform"
 msgstr "ikkje nok OS-støtte på denne plattforma"
 
@@ -4902,95 +4973,100 @@ msgstr "alle z-verdiane er NA-verdiar"
 msgid "invalid math style encountered"
 msgstr "oppdaga ugyldig mattestil"
 
-#: src/main/plotmath.c:1261 src/main/plotmath.c:1366 src/main/plotmath.c:2664
+#: src/main/plotmath.c:1260 src/main/plotmath.c:1365 src/main/plotmath.c:2654
 msgid "invalid mathematical annotation"
 msgstr "ugyldig mattemerknad"
 
-#: src/main/plotmath.c:1670
+#: src/main/plotmath.c:1669
 msgid "invalid accent"
 msgstr "ugyldig aksentteikn"
 
-#: src/main/plotmath.c:1964
+#: src/main/plotmath.c:1963
 msgid "invalid group delimiter"
 msgstr "ugyldig gruppeskiljeteikn"
 
-#: src/main/plotmath.c:1991 src/main/plotmath.c:2137
+#: src/main/plotmath.c:1990 src/main/plotmath.c:2127
 msgid "invalid group specification"
 msgstr "ugyldig gruppespesifikasjon"
 
-#: src/main/plotmath.c:2062
+#: src/main/plotmath.c:2052
 msgid "group is incomplete"
 msgstr "gruppa er ufullstendig"
 
-#: src/main/plotmath.c:3190
+#: src/main/plotmath.c:3180
 msgid "Metric information not available for this family/device"
 msgstr "Metrikkinformasjon ikkje tilgjengeleg for denne familien/eininga"
 
-#: src/main/print.c:148 src/main/print.c:254
+#: src/main/print.c:140 src/main/print.c:247
 msgid "invalid 'na.print' specification"
 msgstr "ugyldig «na.print»-val"
 
-#: src/main/print.c:157
+#: src/main/print.c:149
 msgid "invalid row labels"
 msgstr "ugyldige radnamn"
 
-#: src/main/print.c:159
+#: src/main/print.c:151
 msgid "invalid column labels"
 msgstr "ugyldige kolonnenamn"
 
-#: src/main/print.c:183
+#: src/main/print.c:176
 msgid "non-function argument to .Internal(print.function(.))"
 msgstr "ikkje-funksjonsargument til .Internal(print.function(.))"
 
-#: src/main/print.c:264
+#: src/main/print.c:257
 msgid "'gap' must be non-negative integer"
 msgstr "«gap» må vera eit heiltal større enn null"
 
-#: src/main/print.c:289
+#: src/main/print.c:282
 msgid "invalid 'tryS4' internal argument"
 msgstr "ugyldig «tryS4» internt argument"
 
-#: src/main/print.c:1028
+#: src/main/print.c:851
+#, fuzzy
+msgid "print buffer overflow"
+msgstr "overflyt i inndatabuffer på linje %d"
+
+#: src/main/print.c:1043
 #, fuzzy
 msgid "invalid character length in 'dblepr'"
 msgstr "ugyldig teiknlengd i dblepr"
 
-#: src/main/print.c:1046
+#: src/main/print.c:1061
 #, fuzzy
 msgid "invalid character length in 'intpr'"
 msgstr "ugyldig teiknlengd i intpr"
 
-#: src/main/print.c:1065
+#: src/main/print.c:1080
 #, fuzzy
 msgid "invalid character length in 'realpr'"
 msgstr "ugyldig teiknlengd i realpr"
 
-#: src/main/print.c:1075
+#: src/main/print.c:1090
 #, fuzzy
 msgid "memory allocation error in 'realpr'"
 msgstr "minnereserveringsfeil i realpr"
 
-#: src/main/print.c:1091
+#: src/main/print.c:1106
 #, c-format
 msgid "BLAS/LAPACK routine '%6s' gave error code %d"
 msgstr "BLAS/LAPACK-rutinen «%6s» gav feilkoden %d"
 
-#: src/main/printarray.c:453
+#: src/main/printarray.c:332
 msgid "too few row labels"
 msgstr "for få radnamn"
 
-#: src/main/printarray.c:455
+#: src/main/printarray.c:334
 msgid "too few column labels"
 msgstr "for få kolonnenamn"
 
-#: src/main/printarray.c:489
+#: src/main/printarray.c:368
 #, fuzzy, c-format
 msgid " [ reached getOption(\"max.print\") -- omitted %d row ]\n"
 msgid_plural " [ reached getOption(\"max.print\") -- omitted %d rows ]\n"
 msgstr[0] " [ nådde getOption(\"max.print\") – hoppa over siste rad ]]\n"
 msgstr[1] " [ nådde getOption(\"max.print\") – hoppa over siste %d rader ]]\n"
 
-#: src/main/printutils.c:613
+#: src/main/printutils.c:710
 #, fuzzy
 msgid "it is not known that wchar_t is Unicode on this platform"
 msgstr "nsl() er ikkje støtta på denne plattforma"
@@ -4999,47 +5075,48 @@ msgstr "nsl() er ikkje støtta på denne plattforma"
 msgid "argument is not a numeric vector"
 msgstr "argument er ikkje ein numerisk vektor"
 
-#: src/main/random.c:37
+#: src/main/random.c:39
 msgid "invalid arguments"
 msgstr "ugyldige argument"
 
-#: src/main/random.c:93 src/main/random.c:110 src/main/random.c:175
-#: src/main/random.c:201 src/main/random.c:274 src/main/random.c:288
+#: src/main/random.c:95 src/main/random.c:112 src/main/random.c:178
+#: src/main/random.c:204 src/main/random.c:277 src/main/random.c:291
 msgid "NAs produced"
 msgstr "NA-verdiar produserte"
 
-#: src/main/random.c:445
+#: src/main/random.c:438
 msgid "NA in probability vector"
 msgstr "NA-verdiar i sannsynsvektor"
 
-#: src/main/random.c:447
-msgid "non-positive probability"
+#: src/main/random.c:440
+#, fuzzy
+msgid "negative probability"
 msgstr "ikkje-positivt sannsyn"
 
-#: src/main/random.c:454
+#: src/main/random.c:447
 msgid "too few positive probabilities"
 msgstr "for få positive sannsyn"
 
-#: src/main/random.c:491 src/main/random.c:519
+#: src/main/random.c:483 src/main/random.c:511
 msgid "cannot take a sample larger than the population when 'replace = FALSE'"
 msgstr ""
 "kan ikkje trekkja eit utval større enn populasjonen når «replace =FALSE»"
 
-#: src/main/random.c:498
+#: src/main/random.c:490
 msgid "incorrect number of probabilities"
 msgstr "feil tal på sannsynsverdiar"
 
-#: src/main/random.c:537
+#: src/main/random.c:529
 #, fuzzy
 msgid "n >= 2^31, replace = FALSE is only supported on 64-bit platforms"
 msgstr "«dirmark = TRUE» er ikkje støtta på denne plattforma"
 
-#: src/main/raw.c:37 src/main/raw.c:273
+#: src/main/raw.c:37 src/main/raw.c:277
 #, fuzzy
 msgid "argument must be a character vector of length 1"
 msgstr "«hostnamne» må vera ein teiknvektor av lengd 1"
 
-#: src/main/raw.c:39 src/main/raw.c:275
+#: src/main/raw.c:39 src/main/raw.c:279
 #, fuzzy
 msgid ""
 "argument should be a character vector of length 1\n"
@@ -5047,300 +5124,297 @@ msgid ""
 msgstr ""
 "argumentet «%s» har lengd større enn 1 (berre første elementet vert brukt)"
 
-#: src/main/raw.c:53 src/main/raw.c:89 src/main/raw.c:110
+#: src/main/raw.c:53 src/main/raw.c:90 src/main/raw.c:113
 #, fuzzy
 msgid "argument 'x' must be a raw vector"
 msgstr "det første argumentet må vera ein vektor"
 
-#: src/main/raw.c:56 src/main/raw.c:330
+#: src/main/raw.c:56 src/main/raw.c:336
 #, fuzzy
 msgid "argument 'multiple' must be TRUE or FALSE"
 msgstr "«resize» må vera TRUE eller FALSE"
 
-#: src/main/raw.c:91
+#: src/main/raw.c:92
 #, fuzzy
 msgid "argument 'shift' must be a small integer"
 msgstr "«size»-argumentet må vera eit positivt heiltal"
 
-#: src/main/raw.c:129 src/main/raw.c:327
+#: src/main/raw.c:133 src/main/raw.c:333
 #, fuzzy
 msgid "argument 'x' must be an integer vector"
 msgstr "det første argumentet må vera ein teiknvektor"
 
-#: src/main/raw.c:148
+#: src/main/raw.c:153
 #, fuzzy
 msgid "argument 'x' must be raw, integer or logical"
 msgstr "argumentet «logarithm» må vera logisk"
 
-#: src/main/raw.c:150
-#, fuzzy
-msgid "argument 'type' must be a character string"
-msgstr "argumentet «code» må vera ein teiknstreng"
-
-#: src/main/raw.c:154
+#: src/main/raw.c:159
 #, fuzzy, c-format
 msgid "argument 'x' must be a multiple of %d long"
 msgstr "argumentet må vera ein funksjon"
 
-#: src/main/raw.c:167 src/main/raw.c:181
+#: src/main/raw.c:172 src/main/raw.c:186
 #, fuzzy
 msgid "argument 'x' must not contain NAs"
 msgstr "argumentet kan ikkje vera ein funksjon"
 
-#: src/main/raw.c:285
+#: src/main/raw.c:291
 #, fuzzy
 msgid "invalid UTF-8 string"
 msgstr "ugyldig UTF-8-streng: «old»"
 
-#: src/main/relop.c:202
+#: src/main/relop.c:196
 #, c-format
 msgid "comparison (%d) is possible only for atomic and list types"
 msgstr "samanlikning (%d) er berre mogleg for atomske og liste-typar"
 
-#: src/main/relop.c:207
+#: src/main/relop.c:201
 msgid "comparison is not allowed for expressions"
 msgstr "samanlikning er ikkje mogleg for uttrykk"
 
-#: src/main/relop.c:296
+#: src/main/relop.c:293
 msgid "comparison of these types is not implemented"
 msgstr "samanlikning er ikkje implementert for desse typane"
 
-#: src/main/relop.c:509
+#: src/main/relop.c:425
 msgid "invalid comparison with complex values"
 msgstr "ugyldig samanlikning med komplekse verdiar"
 
-#: src/main/relop.c:767
+#: src/main/relop.c:683
 #, fuzzy
 msgid "'a' and 'b' must have the same type"
 msgstr "«path» må vera ein teiknvektor"
 
-#: src/main/saveload.c:200 src/main/saveload.c:205 src/main/saveload.c:214
-#: src/main/saveload.c:223 src/main/saveload.c:232 src/main/saveload.c:241
-#: src/main/saveload.c:245 src/main/saveload.c:254 src/main/saveload.c:1381
-#: src/main/saveload.c:1386 src/main/saveload.c:1430 src/main/saveload.c:1498
-#: src/main/saveload.c:1507 src/main/serialize.c:331 src/main/serialize.c:338
-#: src/main/serialize.c:2388 src/main/serialize.c:2396
+#: src/main/saveload.c:202 src/main/saveload.c:207 src/main/saveload.c:216
+#: src/main/saveload.c:225 src/main/saveload.c:234 src/main/saveload.c:243
+#: src/main/saveload.c:247 src/main/saveload.c:256 src/main/saveload.c:1383
+#: src/main/saveload.c:1388 src/main/saveload.c:1432 src/main/saveload.c:1500
+#: src/main/saveload.c:1509 src/main/serialize.c:354 src/main/serialize.c:361
+#: src/main/serialize.c:374 src/main/serialize.c:378 src/main/serialize.c:405
+#: src/main/serialize.c:421 src/main/serialize.c:2429
+#: src/main/serialize.c:2437
 msgid "read error"
 msgstr "lesefeil"
 
-#: src/main/saveload.c:332
+#: src/main/saveload.c:334
 msgid "a I read error occurred"
 msgstr "det oppstod ein I-lesefeil"
 
-#: src/main/saveload.c:342
+#: src/main/saveload.c:344
 msgid "a R read error occurred"
 msgstr "det oppstod ein R-lesefeil"
 
-#: src/main/saveload.c:352
+#: src/main/saveload.c:354
 msgid "a C read error occurred"
 msgstr "det oppstod ein C-lesefeil"
 
-#: src/main/saveload.c:362
+#: src/main/saveload.c:364
 msgid "a S read error occurred"
 msgstr "det oppstod ein S-lesefeil"
 
-#: src/main/saveload.c:387 src/main/saveload.c:395 src/main/saveload.c:403
-#: src/main/saveload.c:1594 src/main/saveload.c:1602
+#: src/main/saveload.c:389 src/main/saveload.c:397 src/main/saveload.c:405
+#: src/main/saveload.c:1596 src/main/saveload.c:1604
 msgid "a read error occurred"
 msgstr "det oppstod ein lesefeil"
 
-#: src/main/saveload.c:467
+#: src/main/saveload.c:469
 msgid "unresolved node during restore"
 msgstr "uløyst node ved gjenoppretting"
 
-#: src/main/saveload.c:488
+#: src/main/saveload.c:490
 #, c-format
 msgid "restore compatibility error - no version %d compatibility"
 msgstr "kompatiblitetsfeil ved gjenoppretting – versjon %d ikkje støtta"
 
-#: src/main/saveload.c:572 src/main/saveload.c:645
+#: src/main/saveload.c:574 src/main/saveload.c:647
 msgid "bad SEXP type in data file"
 msgstr "ugyldig SEXP-type i datafil"
 
-#: src/main/saveload.c:586
+#: src/main/saveload.c:588
 msgid "mismatch on types"
 msgstr "ulike typar"
 
-#: src/main/saveload.c:607 src/main/saveload.c:1270 src/main/serialize.c:1636
+#: src/main/saveload.c:609 src/main/saveload.c:1272 src/main/serialize.c:1675
 #, fuzzy, c-format
 msgid "unrecognized internal function name \"%s\""
 msgstr "fann ikkje funksjonen «%s»"
 
-#: src/main/saveload.c:709
+#: src/main/saveload.c:711
 msgid "cannot save file position while restoring data"
 msgstr "kan ikkje lagra filplassering ved gjenoppretting av data"
 
-#: src/main/saveload.c:722
+#: src/main/saveload.c:724
 msgid "cannot restore file position while restoring data"
 msgstr "kan ikkje gjenoppretta filplassering ved gjenoppretting av data"
 
-#: src/main/saveload.c:915
+#: src/main/saveload.c:917
 msgid "base namespace is not preserved in version 1 workspaces"
 msgstr "«base»-namnerom ikkje bevart i versjon 1-arbeidsområde"
 
-#: src/main/saveload.c:917
+#: src/main/saveload.c:919
 msgid "cannot save namespace in version 1 workspaces"
 msgstr "kan ikkje lagra namneområde i versjon 1-arbeidsområde"
 
-#: src/main/saveload.c:919
+#: src/main/saveload.c:921
 #, fuzzy
 msgid ""
 "cannot save environment with locked/active bindings in version 1 workspaces"
 msgstr ""
 "kan ikkje lagra omgjevnad med låste/verksame bindingar i versjon 1-namnerom"
 
-#: src/main/saveload.c:943
+#: src/main/saveload.c:945
 msgid "cannot save weak references in version 1 workspaces"
 msgstr "kan ikkje lagra svak referanse i versjon 1-arbeidsområde"
 
-#: src/main/saveload.c:1021
+#: src/main/saveload.c:1023
 msgid "NewWriteVec called with non-vector type"
 msgstr "NewWriteVec kalla med type som ikkje er vektor"
 
-#: src/main/saveload.c:1084
+#: src/main/saveload.c:1086
 msgid "cannot save byte code objects in version 1 workspaces"
 msgstr "kan ikkje lagra bytekode-objekt i versjon 1-namneområde"
 
-#: src/main/saveload.c:1086
+#: src/main/saveload.c:1088
 #, c-format
 msgid "NewWriteItem: unknown type %i"
 msgstr "NewWriteItem: ukjend type %i"
 
-#: src/main/saveload.c:1216
+#: src/main/saveload.c:1218
 msgid "NewReadVec called with non-vector type"
 msgstr "NewReadVec kalla med type som ikkje er vektor"
 
-#: src/main/saveload.c:1286
+#: src/main/saveload.c:1288
 msgid "cannot read byte code objects from version 1 workspaces"
 msgstr "kan ikkje lesa bytekode-objekt frå versjon 1-namneområde"
 
-#: src/main/saveload.c:1288
+#: src/main/saveload.c:1290
 #, c-format
 msgid "NewReadItem: unknown type %i"
 msgstr "NewReadItem: ukjend type %i"
 
-#: src/main/saveload.c:1440
+#: src/main/saveload.c:1442
 msgid "out of memory reading ascii string"
 msgstr "slapp opp for minne ved lesing av ASCII-streng"
 
-#: src/main/saveload.c:1565
+#: src/main/saveload.c:1567
 msgid "a binary read error occurred"
 msgstr "det oppstod ein binærlesefeil"
 
-#: src/main/saveload.c:1580 src/main/saveload.c:1681
+#: src/main/saveload.c:1582 src/main/saveload.c:1683
 msgid "out of memory reading binary string"
 msgstr "slapp opp for minne ved lesing av binærstreng"
 
-#: src/main/saveload.c:1585
+#: src/main/saveload.c:1587
 msgid "a binary string read error occurred"
 msgstr "det oppstod ein feil ved lesing av binærstreng"
 
-#: src/main/saveload.c:1645
+#: src/main/saveload.c:1647
 msgid "an xdr integer data write error occurred"
 msgstr "det oppstod ein skrivefeil ved lagring av xdr-heiltalsdata"
 
-#: src/main/saveload.c:1652
+#: src/main/saveload.c:1654
 msgid "an xdr integer data read error occurred"
 msgstr "det oppstod ein lesefeil ved lesing av xdr-heiltalsdata"
 
-#: src/main/saveload.c:1667 src/main/saveload.c:1686
+#: src/main/saveload.c:1669 src/main/saveload.c:1688
 msgid "an xdr string data write error occurred"
 msgstr "det oppstod ein skrivefeil ved lagring av xdr-strengdata"
 
-#: src/main/saveload.c:1694
+#: src/main/saveload.c:1696
 msgid "an xdr real data write error occurred"
 msgstr "det oppstod ein skrivefeil ved lagring av xdr-realdata"
 
-#: src/main/saveload.c:1701
+#: src/main/saveload.c:1703
 msgid "an xdr real data read error occurred"
 msgstr "det oppstod ein lesefeil ved lesing av xdr-heiltalsdata"
 
-#: src/main/saveload.c:1708
+#: src/main/saveload.c:1710
 msgid "an xdr complex data write error occurred"
 msgstr "det oppstod ein skrivefeil ved lagring av xdr-kompleksdata"
 
-#: src/main/saveload.c:1715
+#: src/main/saveload.c:1717
 msgid "an xdr complex data read error occurred"
 msgstr "det oppstod ein lesing ved lesing av xdr-kompleksdata"
 
-#: src/main/saveload.c:1783 src/main/serialize.c:1958
-#: src/main/serialize.c:2568 src/modules/internet/internet.c:351
-#: src/modules/internet/internet.c:409 src/modules/internet/internet.c:514
+#: src/main/saveload.c:1785 src/main/serialize.c:1997
+#: src/main/serialize.c:2614 src/modules/internet/internet.c:514
+#: src/modules/internet/internet.c:590 src/modules/internet/internet.c:701
 msgid "write failed"
 msgstr "feil ved skriving"
 
-#: src/main/saveload.c:1910
+#: src/main/saveload.c:1912
 msgid "restore file may be empty -- no data loaded"
 msgstr "gjenopprettingsfila kan vera tom – ingen data lasta"
 
-#: src/main/saveload.c:1912
+#: src/main/saveload.c:1914
 msgid "restore file may be from a newer version of R -- no data loaded"
 msgstr ""
 "gjenopprettingsfila kan vera frå ein nyare versjon av R – ingen data lasta"
 
-#: src/main/saveload.c:1914
+#: src/main/saveload.c:1916
 msgid "bad restore file magic number (file may be corrupted) -- no data loaded"
 msgstr ""
 "ugyldig magisk tal i gjenoppretingsfil (fila kan vera øydelagd) – ingen data "
 "lasta"
 
-#: src/main/saveload.c:1940 src/main/saveload.c:2238
+#: src/main/saveload.c:1942 src/main/saveload.c:2240
 msgid "first argument must be a character vector"
 msgstr "det første argumentet må vera ein teiknvektor"
 
-#: src/main/saveload.c:2012
+#: src/main/saveload.c:2014
 msgid "not a valid named list"
 msgstr "ikkje ei gyldig liste med namn"
 
-#: src/main/saveload.c:2019 src/main/saveload.c:2040
+#: src/main/saveload.c:2021 src/main/saveload.c:2042
 #, c-format
 msgid "'%s' looks like a pre-2.4.0 S4 object: please recreate it"
 msgstr ""
 "«%s» ser ut til å vera eit S4-objekt frå før R 2.4.0. Du må laga det på nytt."
 
-#: src/main/saveload.c:2027
+#: src/main/saveload.c:2029
 msgid "loaded data is not in pair list form"
 msgstr "lasta data er ikkje i para listeform"
 
-#: src/main/saveload.c:2063
+#: src/main/saveload.c:2065
 msgid "first argument must be a file name"
 msgstr "det første argumentet må vera eit filnamn"
 
-#: src/main/saveload.c:2108 src/main/saveload.c:2134 src/main/serialize.c:826
-#: src/main/serialize.c:863 src/main/serialize.c:901
+#: src/main/saveload.c:2110 src/main/saveload.c:2136 src/main/serialize.c:864
+#: src/main/serialize.c:901 src/main/serialize.c:939
 msgid "XDR write failed"
 msgstr "feil ved XDR-skriving"
 
-#: src/main/saveload.c:2121 src/main/saveload.c:2146 src/main/serialize.c:1362
-#: src/main/serialize.c:1398 src/main/serialize.c:1436
+#: src/main/saveload.c:2123 src/main/saveload.c:2148 src/main/serialize.c:1400
+#: src/main/serialize.c:1436 src/main/serialize.c:1474
 msgid "XDR read failed"
 msgstr "feil ved XDR-lesing"
 
-#: src/main/saveload.c:2157
+#: src/main/saveload.c:2159
 #, c-format
 msgid "cannot save data -- unable to open '%s': %s"
 msgstr "klarte ikkje lagra data – klarte ikkje opna «%s»: %s"
 
-#: src/main/saveload.c:2254 src/main/serialize.c:2161
+#: src/main/saveload.c:2256 src/main/serialize.c:2202
 #, c-format
 msgid "cannot save to connections in version %d format"
 msgstr "klarte ikkje lagra til samband i versjon %d-format"
 
-#: src/main/saveload.c:2277 src/main/serialize.c:2186
+#: src/main/saveload.c:2279 src/main/serialize.c:2227
 msgid "connection not open for writing"
 msgstr "samband ikkje ope for skriving"
 
-#: src/main/saveload.c:2285
+#: src/main/saveload.c:2288
 msgid "cannot save XDR format to a text-mode connection"
 msgstr "klarte ikkje lagra XDR-format til tekstmodussamband"
 
-#: src/main/saveload.c:2295 src/main/serialize.c:2066
-#: src/main/serialize.c:2080 src/main/serialize.c:2262
-#: src/main/serialize.c:2284
+#: src/main/saveload.c:2298 src/main/serialize.c:2105
+#: src/main/serialize.c:2119 src/main/serialize.c:2303
+#: src/main/serialize.c:2325
 msgid "error writing to connection"
 msgstr "feil ved skriving til samband"
 
-#: src/main/saveload.c:2359 src/main/serialize.c:2234
+#: src/main/saveload.c:2359 src/main/serialize.c:2275
 msgid "connection not open for reading"
 msgstr "samband ikkje ope for lesing"
 
@@ -5369,7 +5443,7 @@ msgstr ""
 msgid "scan() expected '%s', got '%s'"
 msgstr "scan() venta «%s», men fekk «%s»"
 
-#: src/main/scan.c:585 src/main/scan.c:732
+#: src/main/scan.c:585 src/main/scan.c:735
 #, fuzzy
 msgid "too many items"
 msgstr "for mange argument"
@@ -5378,7 +5452,7 @@ msgstr "for mange argument"
 msgid "empty 'what' specified"
 msgstr "tom «what» vald"
 
-#: src/main/scan.c:722
+#: src/main/scan.c:725
 #, c-format
 msgid "line %d did not have %d elements"
 msgstr "linje %d har ikkje %d element"
@@ -5407,172 +5481,174 @@ msgstr "ugyldig desimalskiljeteikn"
 msgid "invalid quote symbol set"
 msgstr "ugyldig quote-symbolmengd"
 
-#: src/main/scan.c:987
+#: src/main/scan.c:988
 #, fuzzy
 msgid "embedded nul(s) found in input"
 msgstr "nul inni streng: «%s»"
 
-#: src/main/seq.c:48
+#: src/main/seq.c:49
 msgid "unequal factor lengths"
 msgstr "ulike faktorlengder"
 
-#: src/main/seq.c:100
+#: src/main/seq.c:101
 msgid "result would be too long a vector"
 msgstr "resultatet ville vera ein lang vektor"
 
-#: src/main/seq.c:159
+#: src/main/seq.c:160
 msgid "argument of length 0"
 msgstr "argumentet har lengd null"
 
-#: src/main/seq.c:161 src/main/seq.c:163
-#, c-format
-msgid "numerical expression has %d elements: only the first used"
-msgstr "det numeriske uttrykket har %d element: berre det først vart brukt"
+#: src/main/seq.c:163 src/main/seq.c:168
+#, fuzzy, c-format
+msgid "numerical expression has %d element: only the first used"
+msgid_plural "numerical expression has %d elements: only the first used"
+msgstr[0] "det numeriske uttrykket har %d element: berre det først vart brukt"
+msgstr[1] "det numeriske uttrykket har %d element: berre det først vart brukt"
 
-#: src/main/seq.c:167
+#: src/main/seq.c:174
 msgid "NA/NaN argument"
 msgstr "NA/NaN-argument"
 
-#: src/main/seq.c:331
+#: src/main/seq.c:333
 msgid "incorrect type for second argument"
 msgstr "ugyldig type for andre argument"
 
-#: src/main/seq.c:334
+#: src/main/seq.c:336
 #, fuzzy, c-format
 msgid "attempt to replicate an object of type '%s'"
 msgstr "prøvde å replikera ikkje-vektor"
 
-#: src/main/seq.c:387
+#: src/main/seq.c:393
 msgid "attempt to replicate non-vector"
 msgstr "prøvde å replikera ikkje-vektor"
 
-#: src/main/seq.c:403
+#: src/main/seq.c:409
 #, fuzzy
 msgid "cannot replicate NULL to a non-zero length"
 msgstr "kan ikkje reservera vektor av lengd %d"
 
-#: src/main/seq.c:626 src/main/seq.c:633 src/main/seq.c:768 src/main/seq.c:979
+#: src/main/seq.c:630 src/main/seq.c:637 src/main/seq.c:766 src/main/seq.c:977
 #, c-format
 msgid "first element used of '%s' argument"
 msgstr "berre det første elementet i «%s»-argumentet vert brukt"
 
-#: src/main/seq.c:766
+#: src/main/seq.c:764
 msgid "'length.out' must be a non-negative number"
 msgstr "«length.out» må vera eit ikkje-negativt tal"
 
-#: src/main/seq.c:790 src/main/seq.c:856 src/main/seq.c:873
+#: src/main/seq.c:788 src/main/seq.c:854 src/main/seq.c:871
 msgid "'from' must be finite"
 msgstr "«from» må vera endeleg"
 
-#: src/main/seq.c:792 src/main/seq.c:858 src/main/seq.c:895
+#: src/main/seq.c:790 src/main/seq.c:856 src/main/seq.c:893
 msgid "'to' must be finite"
 msgstr "«to» må vera endeleg"
 
-#: src/main/seq.c:804
+#: src/main/seq.c:802
 msgid "invalid '(to - from)/by' in 'seq'"
 msgstr "ugyldig «(to - from)/by» i «seq»"
 
-#: src/main/seq.c:816
+#: src/main/seq.c:814
 msgid "'by' argument is much too small"
 msgstr "«by»-argumentet er for lite"
 
-#: src/main/seq.c:818
+#: src/main/seq.c:816
 msgid "wrong sign in 'by' argument"
 msgstr "feil forteikn i «by»-argument"
 
-#: src/main/seq.c:875 src/main/seq.c:897
+#: src/main/seq.c:873 src/main/seq.c:895
 msgid "'by' must be finite"
 msgstr "«by» må vera endeleg"
 
-#: src/main/seq.c:985 src/main/seq.c:990
+#: src/main/seq.c:983 src/main/seq.c:988
 msgid "argument must be coercible to non-negative integer"
 msgstr "argumentet må kunna gjerast om til eit ikkje-negativt heiltal"
 
-#: src/main/serialize.c:224 src/main/serialize.c:254 src/main/serialize.c:277
+#: src/main/serialize.c:228 src/main/serialize.c:275 src/main/serialize.c:299
 msgid "unknown or inappropriate output format"
 msgstr "ukjent eller feil utformat"
 
-#: src/main/serialize.c:504
+#: src/main/serialize.c:542
 msgid "must specify ascii, binary, or xdr format"
 msgstr "må velja ascii-, binary- eller xdr-format"
 
-#: src/main/serialize.c:505
+#: src/main/serialize.c:543
 msgid "unknown output format"
 msgstr "ukjent utformat"
 
-#: src/main/serialize.c:536
+#: src/main/serialize.c:574
 msgid "unknown input format"
 msgstr "ukjent innformat"
 
-#: src/main/serialize.c:541
+#: src/main/serialize.c:579
 msgid "input format does not match specified format"
 msgstr "innformatet er ikkje i samsvar med det valde formatet"
 
-#: src/main/serialize.c:752
+#: src/main/serialize.c:790
 msgid "no restore method available"
 msgstr "ingen gjenopprettingsmetode tilgjengelege"
 
-#: src/main/serialize.c:794
+#: src/main/serialize.c:832
 msgid "names in persistent strings are currently ignored"
 msgstr "namn i faste strengar vert for tida ignorert"
 
-#: src/main/serialize.c:963
+#: src/main/serialize.c:1001
 #, c-format
 msgid "'%s' may not be available when loading"
 msgstr "«%s» er kanskje ikkje tilgjengeleg ved lasting"
 
-#: src/main/serialize.c:970
+#: src/main/serialize.c:1008
 msgid "namespaces may not be available when loading"
 msgstr "namneromma er kanskje ikkje tilgjengelege ved lasting"
 
-#: src/main/serialize.c:1097
+#: src/main/serialize.c:1136
 #, c-format
 msgid "WriteItem: unknown type %i"
 msgstr "WriteItem: ukjend type %i"
 
-#: src/main/serialize.c:1273
+#: src/main/serialize.c:1312
 #, c-format
 msgid "version %d not supported"
 msgstr "versjon %d er ikkje støtta"
 
-#: src/main/serialize.c:1305
+#: src/main/serialize.c:1343
 msgid "reference index out of range"
 msgstr "referanseindeks utanfor verdiområdet"
 
-#: src/main/serialize.c:1335
+#: src/main/serialize.c:1373
 msgid "names in persistent strings are not supported yet"
 msgstr "namn i faste strengar er ikkje støtta enno"
 
-#: src/main/serialize.c:1463
+#: src/main/serialize.c:1501
 #, fuzzy
 msgid "negative serialized length for vector"
 msgstr "kan ikkje setja lengda til ikkje-vektor"
 
-#: src/main/serialize.c:1471
+#: src/main/serialize.c:1509
 #, fuzzy
 msgid "invalid upper part of serialized vector length"
 msgstr "ugyldig parameterlengd"
 
-#: src/main/serialize.c:1476
+#: src/main/serialize.c:1514
 msgid ""
 "negative serialized vector length:\n"
 "perhaps long vector from 64-bit version of R?"
 msgstr ""
 
-#: src/main/serialize.c:1707
+#: src/main/serialize.c:1746
 msgid "this version of R cannot read class references"
 msgstr "denne versjonen av R kan ikkje lesa klassereferansar"
 
-#: src/main/serialize.c:1709
+#: src/main/serialize.c:1748
 msgid "this version of R cannot read generic function references"
 msgstr "denne versjonen av R kan ikkje lesa generiske funksjonsreferansar"
 
-#: src/main/serialize.c:1726
+#: src/main/serialize.c:1765
 #, c-format
 msgid "ReadItem: unknown type %i, perhaps written by later version of R"
 msgstr "ReadItem: kjend type %i, kanskje skriven av ein seinare versjon av R"
 
-#: src/main/serialize.c:1882
+#: src/main/serialize.c:1921
 #, c-format
 msgid ""
 "cannot read unreleased workspace version %d written by experimental R %d.%d."
@@ -5581,7 +5657,7 @@ msgstr ""
 "klarte ikkje lesa ikkje-offentleg arbeidsområde versjon %d, skriven av "
 "eksperimentell R %d.%d.%d"
 
-#: src/main/serialize.c:1886
+#: src/main/serialize.c:1925
 #, c-format
 msgid ""
 "cannot read workspace version %d written by R %d.%d.%d; need R %d.%d.%d or "
@@ -5590,83 +5666,83 @@ msgstr ""
 "klarte ikkje lesa arbeidsområde versjon %d, skriven av R %d.%d.%d (treng R "
 "%d.%d.%d eller nyare)"
 
-#: src/main/serialize.c:1965
+#: src/main/serialize.c:2004
 msgid "read failed"
 msgstr "feil ved lesing"
 
-#: src/main/serialize.c:2028
+#: src/main/serialize.c:2067
 msgid "error reading from ascii connection"
 msgstr "klarte ikkje lesa frå ASCII-samband"
 
-#: src/main/serialize.c:2030
+#: src/main/serialize.c:2069
 msgid "unexpected format in ascii connection"
 msgstr "uventa format i ASCII-samband"
 
-#: src/main/serialize.c:2035 src/main/serialize.c:2049
+#: src/main/serialize.c:2074 src/main/serialize.c:2088
 msgid "error reading from connection"
 msgstr "feil ved lesing frå samband"
 
-#: src/main/serialize.c:2090
+#: src/main/serialize.c:2130
 msgid "only ascii format can be written to text mode connections"
 msgstr "berre ASCII-formatet kan skrivast til tekstmodussamband"
 
-#: src/main/serialize.c:2104
+#: src/main/serialize.c:2144
 msgid "only ascii format can be read from text mode connections"
 msgstr "berre ASCII-formatet kan lesast frå tekstmodussamband"
 
-#: src/main/serialize.c:2159 src/main/serialize.c:2312
-#: src/main/serialize.c:2461
+#: src/main/serialize.c:2200 src/main/serialize.c:2353
+#: src/main/serialize.c:2502
 msgid "bad version value"
 msgstr "ugyldig versjonsverdi"
 
-#: src/main/serialize.c:2184
+#: src/main/serialize.c:2225
 #, fuzzy
 msgid "binary-mode connection required for ascii=FALSE"
 msgstr "binæroperasjonar krev to argument"
 
-#: src/main/serialize.c:2340 src/main/serialize.c:2377
-#: src/main/serialize.c:2440
+#: src/main/serialize.c:2381 src/main/serialize.c:2418
+#: src/main/serialize.c:2481
 msgid "serialization is too large to store in a raw vector"
 msgstr "serialiseringa er for stor for lagring i råvektor"
 
-#: src/main/serialize.c:2357
+#: src/main/serialize.c:2398
 msgid "cannot allocate buffer"
 msgstr "klarte ikkje reservera buffer"
 
-#: src/main/serialize.c:2546 src/main/serialize.c:2619
+#: src/main/serialize.c:2592 src/main/serialize.c:2665
 msgid "not a proper file name"
 msgstr "ikkje eit gyldig filnamn"
 
-#: src/main/serialize.c:2548
+#: src/main/serialize.c:2594
 msgid "not a proper raw vector"
 msgstr "ikkje ein gyldig råvektor"
 
-#: src/main/serialize.c:2569
+#: src/main/serialize.c:2615
 msgid "could not determine file position"
 msgstr "klarte ikkje fastsetja filplassering"
 
-#: src/main/serialize.c:2621
+#: src/main/serialize.c:2667
 msgid "bad offset/length argument"
 msgstr "ugyldig forskyving/lengd-argument"
 
-#: src/main/serialize.c:2645 src/main/serialize.c:2658
-#: src/main/serialize.c:2667 src/main/serialize.c:2677
-#: src/main/serialize.c:2690
+#: src/main/serialize.c:2691 src/main/serialize.c:2704
+#: src/main/serialize.c:2713 src/main/serialize.c:2723
+#: src/main/serialize.c:2736
 #, c-format
 msgid "seek failed on %s"
 msgstr "feil ved søking på %s"
 
-#: src/main/serialize.c:2662 src/main/serialize.c:2671
-#: src/main/serialize.c:2681 src/main/serialize.c:2694
+#: src/main/serialize.c:2708 src/main/serialize.c:2717
+#: src/main/serialize.c:2727 src/main/serialize.c:2740
 #, c-format
 msgid "read failed on %s"
 msgstr "feil ved lesing på %s"
 
-#: src/main/serialize.c:2713
+#: src/main/serialize.c:2759
 msgid "bad environment"
 msgstr "ugyldig omgjevnad"
 
-#: src/main/serialize.c:2715
+#: src/main/serialize.c:2761
 msgid "bad variable names"
 msgstr "ugyldige variabelnamn"
 
@@ -5674,167 +5750,163 @@ msgstr "ugyldige variabelnamn"
 msgid "only atomic vectors can be tested to be sorted"
 msgstr "berre atomske vektorar kan testast for sortering"
 
-#: src/main/sort.c:326 src/main/sort.c:1228 src/main/sort.c:1396
+#: src/main/sort.c:325 src/main/sort.c:1248
 msgid "'decreasing' must be TRUE or FALSE"
 msgstr "«decreasing» må vera TRUE eller FALSE"
 
-#: src/main/sort.c:329 src/main/sort.c:600
+#: src/main/sort.c:328 src/main/sort.c:599
 msgid "only atomic vectors can be sorted"
 msgstr "berre atomske vektorar kan sorterast"
 
-#: src/main/sort.c:331 src/main/sort.c:602 src/main/sort.c:1297
+#: src/main/sort.c:330 src/main/sort.c:601 src/main/sort.c:1317
 msgid "raw vectors cannot be sorted"
 msgstr "råvektorar kan ikkje sorterast"
 
-#: src/main/sort.c:613
+#: src/main/sort.c:612
 msgid "NA or infinite index"
 msgstr ""
 
-#: src/main/sort.c:616
+#: src/main/sort.c:615
 #, fuzzy, c-format
 msgid "index %ld outside bounds"
 msgstr "indeksen %d ligg utanfor gyldig verdiområde"
 
-#: src/main/sort.c:621 src/main/sort.c:634
+#: src/main/sort.c:620 src/main/sort.c:633
 msgid "NA index"
 msgstr "NA-indeks"
 
-#: src/main/sort.c:623 src/main/sort.c:636
+#: src/main/sort.c:622 src/main/sort.c:635
 #, c-format
 msgid "index %d outside bounds"
 msgstr "indeksen %d ligg utanfor gyldig verdiområde"
 
-#: src/main/sort.c:1237
+#: src/main/sort.c:1257
 #, c-format
 msgid "argument %d is not a vector"
 msgstr "argumentet %d er ikkje ein vektor"
 
-#: src/main/sort.c:1239
+#: src/main/sort.c:1259
 msgid "argument lengths differ"
 msgstr "argumentlengda er forskjellige"
 
-#: src/main/sort.c:1324
+#: src/main/sort.c:1344
 msgid "invalid ties.method for rank() [should never happen]"
 msgstr "ugyldig ties.method for rank() [skal aldri skje]"
 
-#: src/main/sort.c:1429
-msgid "too large a range of values in 'x'"
-msgstr "for stort verdiområde i «x»"
-
-#: src/main/source.c:215
+#: src/main/source.c:220
 msgid "coercion of 'text' to character was unsuccessful"
 msgstr "klarte ikkje gjera «text» om til ein tekststreng"
 
-#: src/main/source.c:231
+#: src/main/source.c:236
 #, c-format
 msgid "argument '%s = \"%s\"' will be ignored"
 msgstr "argumentet «%s = \"%s\"» vert ikkje brukt"
 
-#: src/main/split.c:38
+#: src/main/split.c:39
 msgid "first argument must be a vector"
 msgstr "det første argumentet må vera ein vektor"
 
-#: src/main/split.c:40
+#: src/main/split.c:41
 msgid "second argument must be a factor"
 msgstr "det andre argumentet må vera ein vektor"
 
-#: src/main/split.c:45
+#: src/main/split.c:46
 #, fuzzy
 msgid "group length is 0 but data length > 0"
 msgstr "Gruppelengda er 0, men datalengda er > 0"
 
-#: src/main/split.c:47
+#: src/main/split.c:48
 msgid "data length is not a multiple of split variable"
 msgstr "datalegnda er ikkje eit multiplum av splittvariabelen"
 
-#: src/main/split.c:56
+#: src/main/split.c:58
 msgid "factor has bad level"
 msgstr "faktoren har ugyldige nivå"
 
-#: src/main/sprintf.c:94
+#: src/main/sprintf.c:97
 #, fuzzy, c-format
 msgid "required resulting string length %d is greater than maximal %d"
 msgstr ""
 "strenglengd til resultatstrengen er %d, som er større enn maksverdien %d"
 
-#: src/main/sprintf.c:102
+#: src/main/sprintf.c:105
 msgid "'fmt' is not a character vector"
 msgstr "«fmt» må vera ein teiknvektor"
 
-#: src/main/sprintf.c:107
+#: src/main/sprintf.c:110
 #, c-format
 msgid "only %d arguments are allowed"
 msgstr "berre %d argument er tillatne"
 
-#: src/main/sprintf.c:114
+#: src/main/sprintf.c:117
 #, c-format
 msgid "invalid type of argument[%d]: '%s'"
 msgstr "ugyldig «type»-argument[%d]: «%s»"
 
-#: src/main/sprintf.c:125 src/main/sprintf.c:128
+#: src/main/sprintf.c:128 src/main/sprintf.c:131
 msgid "arguments cannot be recycled to the same length"
 msgstr "argumenta kan ikkje resirkulerast til same lengd"
 
-#: src/main/sprintf.c:150 src/main/sprintf.c:257
+#: src/main/sprintf.c:153 src/main/sprintf.c:260
 #, c-format
 msgid "'fmt' length exceeds maximal format length %d"
 msgstr "«fmt» er større enn makslengda til formatet, %d"
 
-#: src/main/sprintf.c:169
+#: src/main/sprintf.c:172
 #, c-format
 msgid "unrecognised format specification '%s'"
 msgstr "ikkje attkjend formatspesifisering: %s"
 
-#: src/main/sprintf.c:180 src/main/sprintf.c:186 src/main/sprintf.c:199
-#: src/main/sprintf.c:206
+#: src/main/sprintf.c:183 src/main/sprintf.c:189 src/main/sprintf.c:202
+#: src/main/sprintf.c:209
 #, c-format
 msgid "reference to non-existent argument %d"
 msgstr "referanse til ikkje-eksisterande argument %d"
 
-#: src/main/sprintf.c:218
+#: src/main/sprintf.c:221
 msgid "at most one asterisk '*' is supported in each conversion specification"
 msgstr "høgst éin asterisk «*» er støtta i kvar konverteringsspesifikasjon"
 
-#: src/main/sprintf.c:228
+#: src/main/sprintf.c:231
 msgid "argument for '*' conversion specification must be a number"
 msgstr "argumentet til «*» konverteringsspesifikasjon må vera eit tal"
 
-#: src/main/sprintf.c:266
+#: src/main/sprintf.c:269
 msgid "coercion has changed vector length to 0"
 msgstr "typeomgjeringa har endra vektorlengda til 0"
 
-#: src/main/sprintf.c:339 src/main/sprintf.c:353 src/main/sprintf.c:367
-#: src/main/sprintf.c:402
+#: src/main/sprintf.c:343 src/main/sprintf.c:357 src/main/sprintf.c:371
+#: src/main/sprintf.c:406
 #, c-format
 msgid "invalid format '%s'; %s"
 msgstr "ugyldig format «%s»: %s"
 
-#: src/main/sprintf.c:340
+#: src/main/sprintf.c:344
 #, c-format
 msgid "use format %d or %i for logical objects"
 msgstr "bruk formatet %d eller %i for logiske objekt"
 
-#: src/main/sprintf.c:354
+#: src/main/sprintf.c:358
 #, c-format
 msgid "use format %d, %i, %o, %x or %X for integer objects"
 msgstr "bruk formatet %d, %i, %o, %x eller %X for heiltalsobjekt"
 
-#: src/main/sprintf.c:368
+#: src/main/sprintf.c:372
 #, c-format
 msgid "use format %f, %e, %g or %a for numeric objects"
 msgstr "bruk formatet %f, %e, %g eller %a for heiltalsobjekt"
 
-#: src/main/sprintf.c:403
+#: src/main/sprintf.c:407
 #, c-format
 msgid "use format %s for character objects"
 msgstr "bruk formatet %s for teiknobjekt"
 
-#: src/main/sprintf.c:408
+#: src/main/sprintf.c:412
 #, c-format
 msgid "likely truncation of character string to %d characters"
 msgstr "truleg trunkering av teiknstreng til %d teikn"
 
-#: src/main/sprintf.c:417
+#: src/main/sprintf.c:421
 msgid "unsupported type"
 msgstr "ikkje-støtta type"
 
@@ -5842,386 +5914,391 @@ msgstr "ikkje-støtta type"
 msgid "R_LibraryFileName: buffer too small"
 msgstr "R_LibraryFileName: for liten buffer"
 
-#: src/main/subassign.c:117
+#: src/main/subassign.c:118
 msgid "attempt to enlarge non-vector"
 msgstr "prøvde å gjera ikkje-vektor lengre"
 
-#: src/main/subassign.c:122
+#: src/main/subassign.c:123
 #, c-format
 msgid "assignment outside vector/list limits (extending from %d to %d)"
 msgstr "tildeling utanfor grense til vektor/liste (utvidar frå %d til %d)"
 
-#: src/main/subassign.c:367
+#: src/main/subassign.c:391
 #, c-format
 msgid "incompatible types (from %s to %s) in subassignment type fix"
 msgstr "ikkje-kompatible typar (frå %s til %s) i undertildelings-typefiks"
 
-#: src/main/subassign.c:502 src/main/subassign.c:782 src/main/subassign.c:785
-#: src/main/subassign.c:1076
+#: src/main/subassign.c:550 src/main/subassign.c:830 src/main/subassign.c:833
+#: src/main/subassign.c:1133
 msgid "NAs are not allowed in subscripted assignments"
 msgstr "NA-verdiar er ikkje tillatne i indeks-tildelingar"
 
-#: src/main/subassign.c:520 src/main/subassign.c:796 src/main/subassign.c:1068
-#: src/main/subassign.c:1641
+#: src/main/subassign.c:568 src/main/subassign.c:844 src/main/subassign.c:1125
+#: src/main/subassign.c:1705
 msgid "replacement has length zero"
 msgstr "«replacement» har lengd null"
 
-#: src/main/subassign.c:522 src/main/subassign.c:798 src/main/subassign.c:1070
+#: src/main/subassign.c:570 src/main/subassign.c:846 src/main/subassign.c:1127
 msgid "number of items to replace is not a multiple of replacement length"
 msgstr "talet på element å byta ut er ikkje eit multiplum av ubytingslengda"
 
-#: src/main/subassign.c:766
+#: src/main/subassign.c:814
 msgid "incorrect number of subscripts on matrix"
 msgstr "feil tal på indeks i matrise"
 
-#: src/main/subassign.c:1022
+#: src/main/subassign.c:1079
 #, c-format
 msgid "incompatible types (from %s to %s) in matrix subset assignment"
 msgstr "ikkje-kompatible typar (frå %s til %s) i delmatrise-tildeling"
 
-#: src/main/subassign.c:1038 src/main/subset.c:928
+#: src/main/subassign.c:1095 src/main/subset.c:957
 msgid "incorrect number of subscripts"
 msgstr "feil tal på indeksar"
 
-#: src/main/subassign.c:1214
+#: src/main/subassign.c:1272
 #, c-format
 msgid "incompatible types (from %s to %s) in array subset assignment"
 msgstr "ikkje-kompatible typar (frå %s til %s) i delarray-tildeling"
 
-#: src/main/subassign.c:1249 src/main/subassign.c:1270
+#: src/main/subassign.c:1308 src/main/subassign.c:1329
 msgid "invalid subscript in list assign"
 msgstr "ugyldig tal på indeks i listetildeling"
 
-#: src/main/subassign.c:1263
+#: src/main/subassign.c:1322
 msgid "invalid number of subscripts to list assign"
 msgstr "ugyldig tal på indeks i listetildeling"
 
-#: src/main/subassign.c:1361
+#: src/main/subassign.c:1421
 msgid "SubAssignArgs: invalid number of arguments"
 msgstr "SubAssignArgs: ugyldig tal på argument"
 
-#: src/main/subassign.c:1506
+#: src/main/subassign.c:1566
 msgid "result is zero-length and so cannot be a language object"
 msgstr "resultatet har lengd null, og kan derfor ikkje vera eit språkobjekt"
 
-#: src/main/subassign.c:1611
+#: src/main/subassign.c:1665
 #, fuzzy
 msgid ""
 "[[<- defined for objects of type \"S4\" only for subclasses of environment"
 msgstr "[[<- for S4-objekt er berre definert for underklassar av omgjevnad"
 
-#: src/main/subassign.c:1617
+#: src/main/subassign.c:1677
 msgid "wrong args for environment subassignment"
 msgstr "feil argument for omgjevnads-deltildeling"
 
-#: src/main/subassign.c:1643
+#: src/main/subassign.c:1707
 msgid "more elements supplied than there are to replace"
 msgstr "fleire element oppgjevne enn det er element å byta ut"
 
-#: src/main/subassign.c:1645
+#: src/main/subassign.c:1709
 msgid "[[ ]] with missing subscript"
 msgstr "[[ ]] med manglande indeks"
 
-#: src/main/subassign.c:1657 src/main/subassign.c:1675
+#: src/main/subassign.c:1727 src/main/subassign.c:1745
 msgid "[[ ]] subscript out of bounds"
 msgstr "[[ ]] indeks utanfor gyldig verdiområde"
 
-#: src/main/subassign.c:1663 src/main/subassign.c:1841
+#: src/main/subassign.c:1733 src/main/subassign.c:1914
 msgid "[[ ]] improper number of subscripts"
 msgstr "[[ ]] feil tal på indeksar"
 
-#: src/main/subassign.c:1808
+#: src/main/subassign.c:1879
 #, c-format
 msgid "incompatible types (from %s to %s) in [[ assignment"
 msgstr "ikkje-kompatible typar (frå %s til %s) i [[-tildeling"
 
-#: src/main/subassign.c:1852
+#: src/main/subassign.c:1925
 #, c-format
 msgid "[[ ]] subscript (%d) out of bounds"
 msgstr "[[ ]] indeks (%d) utanfor gyldig verdiområde"
 
-#: src/main/subassign.c:1905 src/main/subscript.c:143 src/main/subscript.c:145
-#: src/main/subscript.c:274 src/main/subscript.c:276 src/main/subscript.c:826
-#: src/main/subscript.c:828 src/main/subscript.c:919 src/main/subscript.c:921
-#: src/main/subset.c:1109
+#: src/main/subassign.c:1986 src/main/subscript.c:151 src/main/subscript.c:278
+#: src/main/subscript.c:903 src/main/subscript.c:996 src/main/subset.c:1176
 #, c-format
 msgid "invalid subscript type '%s'"
 msgstr "ugyldig indekstype «%s»"
 
-#: src/main/subassign.c:1950
+#: src/main/subassign.c:2037
 msgid "no method for assigning subsets of this S4 class"
 msgstr "ingen metode for tildeling av delmengder av denne S4-klassen"
 
-#: src/main/subassign.c:2008
+#: src/main/subassign.c:2095
 msgid "Coercing LHS to a list"
 msgstr "Gjer om venstresida til ei liste"
 
-#: src/main/subscript.c:53 src/main/subscript.c:75 src/main/subscript.c:180
-#: src/main/subscript.c:204
-msgid "attempt to select less than one element"
+#: src/main/subscript.c:59 src/main/subscript.c:81 src/main/subscript.c:185
+#: src/main/subscript.c:209
+#, fuzzy, c-format
+msgid "attempt to select less than one element in %s"
 msgstr "prøvde å velja mindre enn eitt element"
 
-#: src/main/subscript.c:57 src/main/subscript.c:72 src/main/subscript.c:178
-#: src/main/subscript.c:208 src/main/subscript.c:304
-msgid "attempt to select more than one element"
+#: src/main/subscript.c:63 src/main/subscript.c:78 src/main/subscript.c:183
+#: src/main/subscript.c:213 src/main/subscript.c:305
+#, fuzzy, c-format
+msgid "attempt to select more than one element in %s"
 msgstr "prøvde å velja meir enn eitt element"
 
-#: src/main/subscript.c:184
+#: src/main/subscript.c:189
 msgid "internal error in use of recursive indexing"
 msgstr "intern feil ved bruk av rekursiv indeksering"
 
-#: src/main/subscript.c:252
+#: src/main/subscript.c:257
 #, c-format
 msgid "further partial match of '%s' to '%s'"
 msgstr "fleire delvise treff av «%s» til «%s»"
 
-#: src/main/subscript.c:302
+#: src/main/subscript.c:303
 #, c-format
 msgid "recursive indexing failed at level %d\n"
 msgstr "feil ved rekursiv indeksering på nivå %d\n"
 
-#: src/main/subscript.c:309
+#: src/main/subscript.c:313
 #, c-format
 msgid "no such index at level %d\n"
 msgstr "indeks manglar på nivå %d\n"
 
-#: src/main/subscript.c:352
+#: src/main/subscript.c:360
 msgid "incorrect number of columns in matrix subscript"
 msgstr "feil tal på kolonnar i matriseindeks"
 
-#: src/main/subscript.c:371 src/main/subscript.c:389 src/main/subscript.c:413
+#: src/main/subscript.c:379 src/main/subscript.c:397 src/main/subscript.c:421
 msgid "negative values are not allowed in a matrix subscript"
 msgstr "negative verdiar ikkje tillatne i matriseindeks"
 
-#: src/main/subscript.c:492
+#: src/main/subscript.c:500
 msgid "(subscript) logical subscript too long"
 msgstr "(subscript) logisk indeks for lang"
 
-#: src/main/subscript.c:590 src/main/subscript.c:645
+#: src/main/subscript.c:668 src/main/subscript.c:723
 msgid "only 0's may be mixed with negative subscripts"
 msgstr "berre 0-verdiar kan blandast med negative indeksar"
 
-#: src/main/subscript.c:618
+#: src/main/subscript.c:696
 msgid "subscript too large for 32-bit R"
 msgstr ""
 
-#: src/main/subscript.c:817
+#: src/main/subscript.c:895
 msgid "no 'dimnames' attribute for array"
 msgstr "manglar «dimnamnes»-attributt for array"
 
-#: src/main/subscript.c:857
+#: src/main/subscript.c:931
 msgid "subscripting on non-vector"
 msgstr "delmengduttrekking på ikkje-vektor"
 
-#: src/main/subset.c:261
+#: src/main/subset.c:260
 msgid "dimensions would exceed maximum size of array"
 msgstr ""
 
-#: src/main/subset.c:304 src/main/subset.c:333
+#: src/main/subset.c:304 src/main/subset.c:334
 msgid "matrix subscripting not handled for this type"
 msgstr "matriseindeksering ikkje handtert for denne typen"
 
-#: src/main/subset.c:488
+#: src/main/subset.c:493
 msgid "array subscripting not handled for this type"
 msgstr "arrayindeksering ikkje handtert for denne typen"
 
-#: src/main/subset.c:827
+#: src/main/subset.c:856
 msgid "incorrect number of dimensions"
 msgstr "feil tal på dimensjonar"
 
-#: src/main/subset.c:924
+#: src/main/subset.c:953
 msgid "no index specified"
 msgstr "ingen indeks vald"
 
-#: src/main/subset.c:934
+#: src/main/subset.c:963
 msgid "this S4 class is not subsettable"
 msgstr "kan ikkje trekkja ut delmengder denne S4-klassen"
 
-#: src/main/subset.c:940
+#: src/main/subset.c:970
 msgid "wrong arguments for subsetting an environment"
 msgstr "feil argument for uttrekkjing av delmengder av omgjevnad"
 
-#: src/main/summary.c:30
+#: src/main/summary.c:33
 #, c-format
 msgid "invalid 'type' (%s) of argument"
 msgstr "ugyldig «type»-argument (%s)"
 
-#: src/main/summary.c:66 src/main/summary.c:78 src/main/summary.c:103
+#: src/main/summary.c:69 src/main/summary.c:81 src/main/summary.c:106
 #, fuzzy
 msgid "integer overflow - use sum(as.numeric(.))"
 msgstr "Heiltalsoverfly – bruk sum(as.numeric(.))"
 
-#: src/main/summary.c:522
+#: src/main/summary.c:526
 #, c-format
 msgid "internal error ('op = %d' in do_summary).\t Call a Guru"
 msgstr "internfeil («op = %d» i do_summary).\t Ta kontakt med ein Guru."
 
-#: src/main/summary.c:623
+#: src/main/summary.c:637
 msgid "Integer overflow - use sum(as.numeric(.))"
 msgstr "Heiltalsoverfly – bruk sum(as.numeric(.))"
 
-#: src/main/summary.c:731
+#: src/main/summary.c:750
 msgid "no non-missing arguments, returning NA"
 msgstr "ingen ikkje-manglande argument – returnerer NA"
 
-#: src/main/summary.c:734
+#: src/main/summary.c:753
 msgid "no non-missing arguments to min; returning Inf"
 msgstr "ingen ikkje-manglande argument til min – returnerer Inf"
 
-#: src/main/summary.c:736
+#: src/main/summary.c:755
 msgid "no non-missing arguments to max; returning -Inf"
 msgstr "ingen ikkje-manglande argument til max – returnerer -Inf"
 
-#: src/main/summary.c:801
-msgid "non-numeric argument"
-msgstr "ikkje-numerisk argument"
-
-#: src/main/summary.c:845
+#: src/main/summary.c:913
 msgid "argument to 'which' is not logical"
 msgstr "argumentet til «which» må vera logisk"
 
-#: src/main/summary.c:889
+#: src/main/summary.c:957
 msgid "no arguments"
 msgstr "ingen argument"
 
-#: src/main/summary.c:900 src/main/summary.c:917
+#: src/main/summary.c:968 src/main/summary.c:985
 msgid "invalid input type"
 msgstr "ugyldig inndatatype"
 
-#: src/main/summary.c:934
+#: src/main/summary.c:1002
 #, fuzzy
 msgid "an argument will be fractionally recycled"
 msgstr "argumentet «%s» vert ikkje brukt"
 
-#: src/main/sysutils.c:69 src/main/sysutils.c:83
+#: src/main/sysutils.c:68 src/main/sysutils.c:82
 #, c-format
 msgid "cannot determine file modification time of '%s'"
 msgstr "klarte ikkje fastsetja siste endringstidspunkt til «%s»"
 
-#: src/main/sysutils.c:167
+#: src/main/sysutils.c:166
 msgid "encoding of a filename cannot be 'bytes'"
 msgstr ""
 
-#: src/main/sysutils.c:170 src/main/sysutils.c:803 src/main/sysutils.c:818
-#: src/main/sysutils.c:909 src/main/sysutils.c:924 src/main/sysutils.c:1020
+#: src/main/sysutils.c:169 src/main/sysutils.c:831 src/main/sysutils.c:846
+#: src/main/sysutils.c:975
 #, fuzzy, c-format
 msgid "unsupported conversion from '%s' in codepage %d"
 msgstr "ikkje-støtta omgjering frå «%s» til «%s»"
 
-#: src/main/sysutils.c:179
+#: src/main/sysutils.c:178
 msgid "file name conversion problem -- name too long?"
 msgstr "feil ved filnamnkonvertering – er namnet for langt?"
 
-#: src/main/sysutils.c:180
+#: src/main/sysutils.c:179
 msgid "file name conversion problem"
 msgstr "feil ved filnamnkonvertering"
 
-#: src/main/sysutils.c:249
+#: src/main/sysutils.c:248
 msgid "invalid filename pattern"
 msgstr "ugyldig filnamnmønster"
 
-#: src/main/sysutils.c:253
+#: src/main/sysutils.c:252
 #, fuzzy
 msgid "invalid file extension"
 msgstr "ugyldig regulært uttrykk: %s"
 
-#: src/main/sysutils.c:255
+#: src/main/sysutils.c:254
 msgid "no 'pattern'"
 msgstr "manglar «pattern»"
 
-#: src/main/sysutils.c:257
+#: src/main/sysutils.c:256
 msgid "no 'tempdir'"
 msgstr "manglar «tempdir»"
 
-#: src/main/sysutils.c:259
+#: src/main/sysutils.c:258
 msgid "no 'fileext'"
 msgstr ""
 
-#: src/main/sysutils.c:345 src/main/sysutils.c:348 src/main/sysutils.c:439
-#: src/main/sysutils.c:441 src/main/sysutils.c:477
+#: src/main/sysutils.c:328
+#, fuzzy, c-format
+msgid "system call failed: %s"
+msgstr "feil ved søking på %s"
+
+#: src/main/sysutils.c:357 src/main/sysutils.c:360 src/main/sysutils.c:451
+#: src/main/sysutils.c:453 src/main/sysutils.c:489
 msgid "wrong type for argument"
 msgstr "feil type for argument"
 
-#: src/main/sysutils.c:443
+#: src/main/sysutils.c:455
 msgid "wrong length for argument"
 msgstr "feil lengd på argument"
 
-#: src/main/sysutils.c:464
+#: src/main/sysutils.c:476
 msgid "'Sys.setenv' is not available on this system"
 msgstr "«Sys.setenv» er ikkje tilgjengeleg på dette systemet"
 
-#: src/main/sysutils.c:508
+#: src/main/sysutils.c:520
 msgid "this system cannot unset environment variables: setting to \"\""
 msgstr "dette systemet kan ikkje avdefinera omgjevnadsvariablar: set til \"\""
 
-#: src/main/sysutils.c:519
+#: src/main/sysutils.c:531
 msgid "'Sys.unsetenv' is not available on this system"
 msgstr "«Sys.unsetenv» er ikkje tilgjengeleg på dette systemet"
 
-#: src/main/sysutils.c:616
+#: src/main/sysutils.c:628
 #, fuzzy, c-format
 msgid "unsupported conversion from '%s' to '%s' in codepage %d"
 msgstr "ikkje-støtta omgjering frå «%s» til «%s»"
 
-#: src/main/sysutils.c:631
+#: src/main/sysutils.c:643
 msgid "'x' must be a character vector"
 msgstr "«x» må vera ein teiknvektor"
 
-#: src/main/sysutils.c:646
+#: src/main/sysutils.c:658
 #, fuzzy
-msgid "'x' must be a list of NULL or raw vectors"
+msgid "'x' must be a character vector or a list of NULL or raw vectors"
 msgstr "«x» må vera ein teiknvektor"
 
-#: src/main/sysutils.c:724 src/main/sysutils.c:789 src/main/sysutils.c:895
-#: src/main/sysutils.c:994 src/main/sysutils.c:1010 src/main/sysutils.c:1087
+#: src/main/sysutils.c:736 src/main/sysutils.c:914 src/main/sysutils.c:932
+#: src/main/sysutils.c:949 src/main/sysutils.c:965 src/main/sysutils.c:1042
 #, c-format
 msgid "'%s' must be called on a CHARSXP"
 msgstr "«%s» må kallast på ein CHARSXP"
 
-#: src/main/sysutils.c:792 src/main/sysutils.c:898 src/main/sysutils.c:1015
-#: src/main/sysutils.c:1090
+#: src/main/sysutils.c:805 src/main/sysutils.c:970 src/main/sysutils.c:1045
 msgid "translating strings with \"bytes\" encoding is not allowed"
 msgstr ""
 
-#: src/main/sysutils.c:1116
+#: src/main/sysutils.c:818
+#, fuzzy
+msgid "internal error: no translation needed"
+msgstr "intern feil i unz-kode"
+
+#: src/main/sysutils.c:1071
 #, fuzzy, c-format
 msgid "unsupported conversion to '%s' from codepage %d"
 msgstr "ikkje-støtta omgjering frå «%s» til «%s»"
 
-#: src/main/sysutils.c:1530
+#: src/main/sysutils.c:1486
 #, fuzzy, c-format
 msgid "invalid Unicode point %u"
 msgstr "ugyldig linjesamanslåing"
 
-#: src/main/sysutils.c:1632
+#: src/main/sysutils.c:1588
 #, fuzzy
 msgid "cannot create 'R_TempDir'"
 msgstr "klarte ikkje reservera R_TempDir"
 
-#: src/main/sysutils.c:1636 src/main/sysutils.c:1644 src/main/sysutils.c:1647
+#: src/main/sysutils.c:1592 src/main/sysutils.c:1600 src/main/sysutils.c:1603
 msgid "unable to set R_SESSION_TMPDIR"
 msgstr "klarte ikkje definera R_SESSION_TMPDIR"
 
-#: src/main/sysutils.c:1656
+#: src/main/sysutils.c:1612
 #, fuzzy
 msgid "cannot allocate 'R_TempDir'"
 msgstr "klarte ikkje reservera R_TempDir"
 
-#: src/main/sysutils.c:1693
+#: src/main/sysutils.c:1649
 #, fuzzy
 msgid "temporary name too long"
 msgstr "filnamnet er for langt"
 
-#: src/main/sysutils.c:1708
+#: src/main/sysutils.c:1664
 msgid "cannot find unused tempfile name"
 msgstr "finn ikkje ubrukt «tempfile»-namn"
 
-#: src/main/sysutils.c:1711
+#: src/main/sysutils.c:1667
 #, fuzzy
 msgid "allocation failed in R_tmpnam2"
 msgstr "reserveringsfeil i «R_tmpnam»"
 
-#: src/main/sysutils.c:1838
+#: src/main/sysutils.c:1794
 msgid "'dirmark = TRUE' is not supported on this platform"
 msgstr "«dirmark = TRUE» er ikkje støtta på denne plattforma"
 
@@ -6231,199 +6308,206 @@ msgid "length %d is too large for hashing"
 msgstr "lengda %d er for lang for hashing"
 
 #: src/main/unique.c:490 src/main/unique.c:519 src/main/unique.c:549
-#: src/main/unique.c:575 src/main/unique.c:614
+#: src/main/unique.c:573 src/main/unique.c:612
 msgid "'duplicated' applies only to vectors"
 msgstr "«duplicated» gjeld berre vektorar"
 
-#: src/main/unique.c:619
+#: src/main/unique.c:617
 msgid "any_duplicated3(., <0-length incomp>)"
 msgstr "any_duplicated3(., <0-length incomp>)"
 
-#: src/main/unique.c:669
+#: src/main/unique.c:667
 #, fuzzy
 msgid "'fromLast' must be length 1"
 msgstr "«%s» må ha lengd 1"
 
-#: src/main/unique.c:672
+#: src/main/unique.c:670
 #, fuzzy
 msgid "'fromLast' must be TRUE or FALSE"
 msgstr "«resize» må vera TRUE eller FALSE"
 
-#: src/main/unique.c:683
+#: src/main/unique.c:681
 #, c-format
 msgid "%s() applies only to vectors"
 msgstr "%s() gjeld berre vektorar"
 
-#: src/main/unique.c:690
+#: src/main/unique.c:688
 #, fuzzy
 msgid "'nmax' must be positive"
 msgstr "«value» må ha positiv lengd"
 
-#: src/main/unique.c:922
+#: src/main/unique.c:985
 msgid "'match' requires vector arguments"
 msgstr "«match» tek berre vektorargument"
 
-#: src/main/unique.c:970 src/main/unique.c:1125
+#: src/main/unique.c:1033 src/main/unique.c:1171
 msgid "argument is not of mode character"
 msgstr "argumentet har ikkje modus «character»"
 
-#: src/main/unique.c:1251
+#: src/main/unique.c:1296
 #, fuzzy
 msgid "... used in a situation where it does not exist"
 msgstr "... brukt i ein situasjon der han ikkje eksisterer"
 
-#: src/main/unique.c:1342
-msgid "unable to find a closure from within which 'match.call' was called"
-msgstr "klarte ikkje finna omslutting innanfrå der «match.call» vart kalla"
+#: src/main/unique.c:1302
+#, fuzzy
+msgid "... is not a pairlist"
+msgstr "verdien i «...» er ikkje eit «promise»"
 
-#: src/main/unique.c:1536
+#: src/main/unique.c:1531
 msgid "non-numeric data frame in rowsum"
 msgstr "ikkje-numerisk data i rowsum"
 
-#: src/main/unique.c:1568
+#: src/main/unique.c:1563
 msgid "this cannot happen"
 msgstr "dette kan ikkje skje"
 
-#: src/main/unique.c:1639
+#: src/main/unique.c:1634
 msgid "'names' must be a character vector"
 msgstr "«names» må vera ein teiknvektor"
 
-#: src/main/unique.c:1643
-msgid "'sep' must be a character string"
-msgstr "«sep» må vera ein teiknvektor"
-
-#: src/main/util.c:88 src/main/util.c:106
+#: src/main/util.c:87 src/main/util.c:105
 msgid "object is not a matrix"
 msgstr "objektet er ikkje ei matrise"
 
-#: src/main/util.c:254 src/main/util.c:268 src/main/util.c:285
+#: src/main/util.c:303 src/main/util.c:315 src/main/util.c:326
+#: src/main/util.c:341
 #, c-format
 msgid "type %d is unimplemented in '%s'"
 msgstr "typen %d er ikkje implementert i «%s»"
 
-#: src/main/util.c:297
+#: src/main/util.c:352
 #, c-format
 msgid "unimplemented type '%s' in '%s'\n"
 msgstr "ikkje-implementert type «%s» i «%s»\n"
 
-#: src/main/util.c:299
+#: src/main/util.c:354
 #, c-format
 msgid "unimplemented type (%d) in '%s'\n"
 msgstr "ikkje-implementert type (%d) i «%s»\n"
 
-#: src/main/util.c:424
+#: src/main/util.c:479
 msgid "invalid tag in name extraction"
 msgstr "ugyldig merkelapp i namneuttrekk"
 
-#: src/main/util.c:434
+#: src/main/util.c:489
 #, c-format
 msgid "%d argument passed to .Internal(%s) which requires %d"
 msgid_plural "%d arguments passed to .Internal(%s) which requires %d"
 msgstr[0] "%d argument sendt til «.Internal(%s)», som tek %d argument"
 msgstr[1] "%d argument sende til «.Internal(%s)», som tek %d argument"
 
-#: src/main/util.c:440
+#: src/main/util.c:495
 #, c-format
 msgid "%d argument passed to '%s' which requires %d"
 msgid_plural "%d arguments passed to '%s' which requires %d"
 msgstr[0] "%d argument sendt til «%s», som tek %d argument"
 msgstr[1] "%d argument sende til «%s», som tek %d argument"
 
-#: src/main/util.c:455
+#: src/main/util.c:510
 #, c-format
 msgid "supplied argument name '%s' does not match '%s'"
 msgstr "den oppgjevne argumentnamnet «%s» passar ikkje til «%s»"
 
-#: src/main/util.c:465
+#: src/main/util.c:520
 #, c-format
 msgid "'nthcdr' list shorter than %d"
 msgstr "«nthcdr»-lista er kortare enn %d"
 
-#: src/main/util.c:470
+#: src/main/util.c:525
 msgid "'nthcdr' needs a list to CDR down"
 msgstr "«nthcdr» treng ei liste til CDR ned"
 
-#: src/main/util.c:586
+#: src/main/util.c:641
 msgid "'all.x' must be TRUE or FALSE"
 msgstr "«all.x» må vera TRUE eller FALSE"
 
-#: src/main/util.c:588
+#: src/main/util.c:643
 msgid "'all.y' must be TRUE or FALSE"
 msgstr "«all.y» må vera TRUE eller FALSE"
 
-#: src/main/util.c:700
+#: src/main/util.c:672
+msgid "number of rows in the result exceeds maximum vector length"
+msgstr ""
+
+#: src/main/util.c:764
 msgid "missing value is invalid"
 msgstr "manglande verdi er ugyldig"
 
-#: src/main/util.c:709 src/main/util.c:716
+#: src/main/util.c:773 src/main/util.c:780
 msgid "cannot change working directory"
 msgstr "klarte ikkje endra arbeidsmappe"
 
-#: src/main/util.c:735 src/main/util.c:769 src/main/util.c:810
-#: src/main/util.c:852 src/main/util.c:981 src/main/util.c:1040
-#: src/main/util.c:1063
+#: src/main/util.c:800 src/main/util.c:834 src/main/util.c:875
+#: src/main/util.c:917 src/main/util.c:1046 src/main/util.c:1105
+#: src/main/util.c:1128
 msgid "a character vector argument expected"
 msgstr "venta eit teiknvektorargument"
 
-#: src/main/util.c:742 src/main/util.c:777 src/main/util.c:819
-#: src/main/util.c:860
+#: src/main/util.c:807 src/main/util.c:842 src/main/util.c:884
+#: src/main/util.c:925
 msgid "path too long"
 msgstr "adressa er for lang"
 
-#: src/main/util.c:995
+#: src/main/util.c:1060
 msgid "only the first character of 'quote' will be used"
 msgstr "berre det første teiknet i «quote» vert brukt"
 
-#: src/main/util.c:1065
+#: src/main/util.c:1130
 msgid "a character vector 'value' expected"
 msgstr "venta ein teiknvektor «value»"
 
-#: src/main/util.c:1068
+#: src/main/util.c:1133
 msgid "'value' must be of positive length"
 msgstr "«value» må ha positiv lengd"
 
-#: src/main/util.c:1197 src/main/util.c:1205
+#: src/main/util.c:1262 src/main/util.c:1270
 #, c-format
 msgid "invalid input '%s' in 'utf8towcs'"
 msgstr "ugyldig inndata «%s» i «utf8towcs»"
 
-#: src/main/util.c:1290
+#: src/main/util.c:1355
 #, c-format
 msgid "invalid multibyte string at '%s'"
 msgstr "ugyldig multibyte-streng i «%s»"
 
-#: src/main/util.c:1399
+#: src/main/util.c:1497
 msgid "error message truncated to 255 chars"
 msgstr "feilmelding trunkert til 255 teikn"
 
-#: src/main/util.c:1412
+#: src/main/util.c:1510
 msgid "warning message truncated to 255 chars"
 msgstr "åtvaring trunkert til 255 teikn"
 
-#: src/main/util.c:1819
+#: src/main/util.c:1659
+#, c-format
+msgid "accuracy loss in conversion from \"%s\" to numeric"
+msgstr ""
+
+#: src/main/util.c:1969
 #, fuzzy
 msgid "all arguments must be named"
 msgstr "attributta må ha namn"
 
-#: src/main/util.c:1893
+#: src/main/util.c:2091
 msgid "ICU is not supported on this build"
 msgstr "ICU er ikkje støtte på dette bygget"
 
-#: src/main/util.c:1954
+#: src/main/util.c:2158
 #, fuzzy
 msgid "'breaks' is not sorted"
 msgstr "typen «%s» er ikkje støtta"
 
-#: src/main/util.c:1988 src/main/util.c:2034
+#: src/main/util.c:2192 src/main/util.c:2242
 #, fuzzy, c-format
 msgid "long vector '%s' is not supported"
 msgstr "typen «%s» er ikkje støtta"
 
-#: src/main/util.c:2087
+#: src/main/util.c:2296
 msgid "'eps.correct' must be 0, 1, or 2"
 msgstr ""
 
-#: src/main/util.c:2115
+#: src/main/util.c:2324
 #, fuzzy
 msgid "'x' must be a vector"
 msgstr "«x» må vera ein teiknvektor"
@@ -6466,14 +6550,6 @@ msgstr ""
 "Skriv «q()» for å avslutta R.\n"
 "\n"
 
-#: src/main/vfonts.c:50
-msgid "vfont routines cannot be accessed in module"
-msgstr "vfont-rutinane kan ikkje brukast i modul"
-
-#: src/main/vfonts.c:67 src/main/vfonts.c:80 src/main/vfonts.c:98
-msgid "Hershey fonts cannot be loaded"
-msgstr "Hershey-skriftene kan ikkje lastast"
-
 #: src/main/xspline.c:60
 #, c-format
 msgid "add_point - reached MAXNUMPTS (%d)"
@@ -6497,7 +6573,7 @@ msgstr "Det må vera minst fire kontrollpunkt"
 msgid "There must be at least three control points"
 msgstr "Det må vera minst tre kontrollpunkt"
 
-#: src/modules/X11/dataentry.c:1871 src/modules/X11/devX11.c:1246
+#: src/modules/X11/dataentry.c:1874 src/modules/X11/devX11.c:1248
 #, c-format
 msgid "X11 protocol error: %s"
 msgstr "X11-protokollfeil: %s"
@@ -6522,7 +6598,7 @@ msgstr ""
 "Feil: X11 kan ikkje tildela fleire grafikkfargar.\n"
 "Prøv å bruka X11 med colortype=\"pseudo.cube\" eller \"gray\"."
 
-#: src/modules/X11/devX11.c:1027
+#: src/modules/X11/devX11.c:1029
 msgid ""
 "could not find any X11 fonts\n"
 "Check that the Font Path is correct."
@@ -6530,17 +6606,17 @@ msgstr ""
 "fann ikkje nokon X11-skrifter.\n"
 "Kontroller at skriftadressa er rett."
 
-#: src/modules/X11/devX11.c:1087
+#: src/modules/X11/devX11.c:1089
 #, c-format
 msgid "X11 used font size %d when %d was requested"
 msgstr "X11 brukte skriftstorleiken %d ved førespurnad om %d"
 
-#: src/modules/X11/devX11.c:1121
+#: src/modules/X11/devX11.c:1123
 #, c-format
 msgid "X11 font %s, face %d at size %d could not be loaded"
 msgstr "klarte ikkje lasta X11-skrifta %s, snitt %d ved storleik %d"
 
-#: src/modules/X11/devX11.c:1130
+#: src/modules/X11/devX11.c:1132
 msgid ""
 "semi-transparency is not supported on this device: reported only once per "
 "page"
@@ -6548,12 +6624,12 @@ msgstr ""
 "halvgjennomsikt er ikkje støtta på denne eininga (berre meldt frå om éin "
 "gong per side)"
 
-#: src/modules/X11/devX11.c:1254
+#: src/modules/X11/devX11.c:1256
 #, c-format
 msgid "X11 I/O error while opening X11 connection to '%s'"
 msgstr "X11 I/O-feil ved opning av X11-samband til «%s»"
 
-#: src/modules/X11/devX11.c:1272
+#: src/modules/X11/devX11.c:1273
 msgid "X11 fatal IO error: please save work and shut down R"
 msgstr "X11 kritisk IO-feil: lagra arbeidet ditt og avslutt R"
 
@@ -6674,206 +6750,271 @@ msgstr "klarte ikkje laga XImage"
 msgid "attempt to use the locator after dev.hold()"
 msgstr ""
 
-#: src/modules/X11/devX11.c:3111
+#: src/modules/X11/devX11.c:3117
 #, c-format
 msgid "unable to start device %s"
 msgstr "klarte ikkje starta eininga %s"
 
-#: src/modules/X11/devX11.c:3138
+#: src/modules/X11/devX11.c:3144
 msgid "invalid 'width' or 'height'"
 msgstr "ugyldig «breidd» eller «høgd»"
 
-#: src/modules/X11/devX11.c:3145
+#: src/modules/X11/devX11.c:3151
 msgid "invalid colortype passed to X11 driver"
 msgstr "ugyldig colortype sendt til X11-drivaren"
 
-#: src/modules/X11/devX11.c:3159
+#: src/modules/X11/devX11.c:3165
 msgid "unknown X11 color/colour model -- using monochrome"
 msgstr "ukjend X11 color/colour-modell – brukar monochrome"
 
-#: src/modules/X11/devX11.c:3249
+#: src/modules/X11/devX11.c:3255
 msgid "no plot on device to save"
 msgstr "inga plott på eininga å lagra"
 
-#: src/modules/X11/devX11.c:3251
+#: src/modules/X11/devX11.c:3257
 msgid "not an open X11cairo device"
 msgstr "ikkje ei open X11cairo-eining"
 
-#: src/modules/X11/devX11.c:3260
+#: src/modules/X11/devX11.c:3266
 #, c-format
 msgid "cannot open file '%s'"
 msgstr "klarte ikkje opna fila «%s»"
 
-#: src/modules/X11/devX11.c:3277
+#: src/modules/X11/devX11.c:3283
 msgid "savePlot() is not supported on this build"
 msgstr "savePlot() er ikkje støtta på denne bygginga"
 
-#: src/modules/X11/devX11.c:3317
+#: src/modules/X11/devX11.c:3323
 msgid "unable to contact X11 display"
 msgstr "fekk ikkje kontakt med X11-display"
 
-#: src/modules/X11/devX11.c:3366
+#: src/modules/X11/devX11.c:3372
 #, c-format
 msgid "clipboard cannot be read (error code %d)"
 msgstr "utklippstavla kan ikkje opnast (feilkode: %d)"
 
-#: src/modules/X11/devX11.c:3397
+#: src/modules/X11/devX11.c:3408
 msgid "cannot allocate memory for X11Routines structure"
 msgstr "klarte ikkje reservera minne for X11Routines-struktur"
 
-#: src/modules/internet/internet.c:188 src/modules/internet/internet.c:192
-#: src/modules/internet/internet.c:198 src/modules/internet/internet.c:210
+#: src/modules/internet/internet.c:113
+msgid "for https:// URLs use method = \"wininet\""
+msgstr ""
+
+#: src/modules/internet/internet.c:153 src/modules/internet/internet.c:274
+#: src/modules/internet/internet.c:758
+#, fuzzy, c-format
+msgid "scheme not supported in URL '%s'"
+msgstr "omstartar er ikkje støtta i «eval»"
+
+#: src/modules/internet/internet.c:348 src/modules/internet/internet.c:352
+#: src/modules/internet/internet.c:357 src/modules/internet/internet.c:381
+#: src/modules/internet/libcurl.c:791 src/modules/internet/libcurl.c:795
+#: src/modules/internet/libcurl.c:801 src/modules/internet/libcurl.c:814
+#: src/modules/internet/libcurl.c:822
 msgid "allocation of url connection failed"
 msgstr "klarte ikkje reservera url-samband"
 
-#: src/modules/internet/internet.c:286
+#: src/modules/internet/internet.c:455
 msgid "only first element of 'url' argument used"
 msgstr "berre det første elementet i «url»-argumentet vert brukt"
 
-#: src/modules/internet/internet.c:292
+#: src/modules/internet/internet.c:461
 msgid "only first element of 'destfile' argument used"
 msgstr "berre det første elementet i «destfile»-argumentet vert brukt"
 
-#: src/modules/internet/internet.c:317
+#: src/modules/internet/internet.c:480 src/modules/internet/libcurl.c:499
 msgid "Download progress"
 msgstr "Lastar ned"
 
-#: src/modules/internet/internet.c:339
+#: src/modules/internet/internet.c:502
 #, c-format
 msgid "cannot open URL '%s', reason '%s'"
 msgstr "klarte ikkje opna adressa «%s», av grunnen «%s»"
 
-#: src/modules/internet/internet.c:346 src/modules/internet/internet.c:372
-#: src/modules/internet/internet.c:474
+#: src/modules/internet/internet.c:509 src/modules/internet/internet.c:536
+#: src/modules/internet/internet.c:661
 #, c-format
 msgid "cannot open destfile '%s', reason '%s'"
 msgstr "klarte ikkje opna målfila «%s», av grunnen «%s»"
 
-#: src/modules/internet/internet.c:377 src/modules/internet/internet.c:479
+#: src/modules/internet/internet.c:541 src/modules/internet/internet.c:666
+#: src/modules/internet/libcurl.c:530
 #, c-format
 msgid "trying URL '%s'\n"
 msgstr "prøver adressa «%s»\n"
 
-#: src/modules/internet/internet.c:384 src/modules/internet/internet.c:486
-msgid "opened URL\n"
-msgstr "opna adressa\n"
-
-#: src/modules/internet/internet.c:455 src/modules/internet/internet.c:560
-#, c-format
-msgid "downloaded length %d != reported length %d"
+#: src/modules/internet/internet.c:640 src/modules/internet/internet.c:751
+#: src/modules/internet/libcurl.c:578
+#, fuzzy, c-format
+msgid "downloaded length %0.f != reported length %0.f"
 msgstr "nedlastingslengda %d var ikkje lik den rapporterte lengda %d"
 
-#: src/modules/internet/internet.c:460 src/modules/internet/internet.c:565
+#: src/modules/internet/internet.c:645 src/modules/internet/internet.c:756
 #, c-format
 msgid "cannot open URL '%s'"
 msgstr "klarte ikkje opna adressa «%s»"
 
-#: src/modules/internet/internet.c:593 src/modules/internet/internet.c:828
-#, c-format
-msgid "cannot open: HTTP status was '%d %s'"
+#: src/modules/internet/internet.c:779 src/modules/internet/internet.c:944
+#, fuzzy, c-format
+msgid "cannot open URL '%s': HTTP status was '%d %s'"
 msgstr "klarte ikkje opna: HTTP-statusmeldinga var «%d %s»"
 
-#: src/modules/internet/internet.c:772 src/modules/internet/internet.c:935
-msgid "InternetOpenUrl timed out"
-msgstr "tidsavbrot ved InternetOpenUrl"
-
-#: src/modules/internet/internet.c:799 src/modules/internet/internet.c:813
-#: src/modules/internet/internet.c:957 src/modules/internet/internet.c:966
+#: src/modules/internet/internet.c:915 src/modules/internet/internet.c:929
+#: src/modules/internet/internet.c:1019 src/modules/internet/internet.c:1028
 #, c-format
 msgid "InternetOpenUrl failed: '%s'"
 msgstr "feil ved InternetOpenUrl: «%s»"
 
-#: src/modules/internet/internet.c:870
-msgid "Internet read timed out"
-msgstr "tidsavbrot ved lesing frå nettet"
+#: src/modules/internet/libcurl.c:159
+#, fuzzy, c-format
+msgid "URL '%s': status was '%d %s'"
+msgstr "klarte ikkje opna: HTTP-statusmeldinga var «%d %s»"
+
+#: src/modules/internet/libcurl.c:163
+#, c-format
+msgid "URL '%s': status was '%s'"
+msgstr ""
+
+#: src/modules/internet/libcurl.c:240
+#, fuzzy
+msgid "curlGetHeaders is not supported on this platform"
+msgstr "nsl() er ikkje støtta på denne plattforma"
+
+#: src/modules/internet/libcurl.c:249 src/modules/internet/libcurl.c:252
+#, fuzzy, c-format
+msgid "invalid %s argument"
+msgstr "ugyldig «%s»-argument"
+
+#: src/modules/internet/libcurl.c:269
+#, c-format
+msgid ""
+"libcurl error code %d\n"
+"\t%s\n"
+msgstr ""
+
+#: src/modules/internet/libcurl.c:404
+#, fuzzy
+msgid "download.file(method = \"libcurl\") is not supported on this platform"
+msgstr "nsl() er ikkje støtta på denne plattforma"
+
+#: src/modules/internet/libcurl.c:420
+#, fuzzy
+msgid "lengths of 'url' and 'destfile' must match"
+msgstr "importerings- og eksporteringsnamna må vera like lange"
+
+#: src/modules/internet/libcurl.c:481
+#, fuzzy, c-format
+msgid "URL %s: cannot open destfile '%s', reason '%s'"
+msgstr "klarte ikkje opna målfila «%s», av grunnen «%s»"
+
+#: src/modules/internet/libcurl.c:593
+#, fuzzy
+msgid "cannot download all files"
+msgstr "klarte ikkje opna fila «%s»"
+
+#: src/modules/internet/libcurl.c:727
+#, fuzzy
+msgid "cannot read from connection"
+msgstr "klarte ikkje lesa frå dette sambandet"
+
+#: src/modules/internet/libcurl.c:763
+#, fuzzy
+msgid "cannot open connection"
+msgstr "klarte ikkje opna sambandet"
+
+#: src/modules/internet/libcurl.c:826
+#, fuzzy
+msgid "url(method = \"libcurl\") is not supported on this platform"
+msgstr "nsl() er ikkje støtta på denne plattforma"
 
-#: src/modules/internet/nanoftp.c:288 src/modules/internet/nanoftp.c:301
-#: src/modules/internet/nanoftp.c:312 src/modules/internet/nanoftp.c:346
-#: src/modules/internet/nanoftp.c:356
+#: src/modules/internet/nanoftp.c:289 src/modules/internet/nanoftp.c:302
+#: src/modules/internet/nanoftp.c:313 src/modules/internet/nanoftp.c:347
+#: src/modules/internet/nanoftp.c:357
 msgid "RxmlNanoFTPScanURL: overlong (invalid?) URL"
 msgstr "RxmlNanoFTPScanURL: for lang (ugyldig?) adresse"
 
-#: src/modules/internet/nanoftp.c:389
+#: src/modules/internet/nanoftp.c:390
 msgid "removing FTP proxy info"
 msgstr "fjernar FTP-mellomtenarinfo"
 
-#: src/modules/internet/nanoftp.c:391
+#: src/modules/internet/nanoftp.c:392
 #, c-format
 msgid "using FTP proxy '%s'"
 msgstr "brukar FTP-mellomtenaren «%s»"
 
-#: src/modules/internet/nanoftp.c:402 src/modules/internet/nanoftp.c:431
+#: src/modules/internet/nanoftp.c:403 src/modules/internet/nanoftp.c:432
 msgid "RxmlNanoFTPScanProxy: overlong (invalid?) URL"
 msgstr "RxmlNanoFTPScanProxy: for lang (ugyldig?) adresse"
 
-#: src/modules/internet/nanoftp.c:830
+#: src/modules/internet/nanoftp.c:833
 msgid "cannot resolve host"
 msgstr "feil ved namneoppslag"
 
-#: src/modules/internet/nanoftp.c:860
+#: src/modules/internet/nanoftp.c:863
 msgid "failed to connect to server"
 msgstr "klarte ikkje kopla til tenaren"
 
-#: src/modules/internet/nanoftp.c:871
+#: src/modules/internet/nanoftp.c:874
 msgid "failed to get response from server"
 msgstr "fekk ikkje svar frå tenaren"
 
-#: src/modules/internet/nanoftp.c:1134
+#: src/modules/internet/nanoftp.c:1137
 msgid "RxmlNanoFTPGetConnection: failed to create socket"
 msgstr "RxmlNanoFTPGetConnection: klarte ikkje oppretta sokkel"
 
-#: src/modules/internet/nanoftp.c:1180
+#: src/modules/internet/nanoftp.c:1183
 msgid "failed to create a data connection"
 msgstr "klarte ikkje oppretta datasamband"
 
-#: src/modules/internet/nanoftp.c:1188
+#: src/modules/internet/nanoftp.c:1191
 msgid "failed to bind a port"
 msgstr "klarte ikkje binda til port"
 
-#: src/modules/internet/nanoftp.c:1195
+#: src/modules/internet/nanoftp.c:1198
 #, c-format
 msgid "could not listen on port %d"
 msgstr "klarte ikkje lytta på porten %d"
 
-#: src/modules/internet/nanohttp.c:370 src/modules/internet/nanohttp.c:398
-#: src/modules/internet/nanohttp.c:407
+#: src/modules/internet/nanohttp.c:369 src/modules/internet/nanohttp.c:400
+#: src/modules/internet/nanohttp.c:412
 msgid "RxmlNanoHTTPScanURL: overlong (invalid?) URL"
 msgstr "RxmlNanoHTTPScanURL: for lang (ugyldig?) adresse"
 
-#: src/modules/internet/nanohttp.c:441
+#: src/modules/internet/nanohttp.c:446
 msgid "removing HTTP proxy info"
 msgstr "fjernar HTTP-mellomtenarinfo"
 
-#: src/modules/internet/nanohttp.c:443
+#: src/modules/internet/nanohttp.c:448
 #, c-format
 msgid "using HTTP proxy '%s'"
 msgstr "brukar HTTP-mellomtenaren «%s»"
 
-#: src/modules/internet/nanohttp.c:454 src/modules/internet/nanohttp.c:490
+#: src/modules/internet/nanohttp.c:459 src/modules/internet/nanohttp.c:497
 msgid "RxmlNanoHTTPScanProxy: overlong (invalid?) URL"
 msgstr "RxmlNanoHTTPScanProxy: for lang (ugyldig?) adresse"
 
-#: src/modules/internet/nanohttp.c:1107
+#: src/modules/internet/nanohttp.c:1135
 #, c-format
 msgid "unable to resolve '%s'"
 msgstr "feil ved namneoppslag på «%s»"
 
-#: src/modules/internet/nanohttp.c:1134
+#: src/modules/internet/nanohttp.c:1168
 #, c-format
 msgid "connected to '%s' on port %d."
 msgstr "kopla til «%s» på port %d."
 
-#: src/modules/internet/nanohttp.c:1139
+#: src/modules/internet/nanohttp.c:1173
 #, c-format
 msgid "unable to connect to '%s' on port %d."
 msgstr "klarte ikkje kopla til «%s» på port %d."
 
-#: src/modules/internet/nanohttp.c:1443
+#: src/modules/internet/nanohttp.c:1477
 #, c-format
 msgid "redirect to: '%s'"
 msgstr "vidaresend til «%s»"
 
-#: src/modules/internet/nanohttp.c:1454
+#: src/modules/internet/nanohttp.c:1488
 msgid "too many redirects, aborting ..."
 msgstr "for mange vidaresendingar – avbryt"
 
@@ -6906,11 +7047,11 @@ msgstr "argumentet type[1]='%s' må vera «1», «O» eller «I»"
 #: src/modules/lapack/Lapack.c:730 src/modules/lapack/Lapack.c:779
 #: src/modules/lapack/Lapack.c:786 src/modules/lapack/Lapack.c:834
 #: src/modules/lapack/Lapack.c:840 src/modules/lapack/Lapack.c:894
-#: src/modules/lapack/Lapack.c:900 src/modules/lapack/Lapack.c:1134
-#: src/modules/lapack/Lapack.c:1140 src/modules/lapack/Lapack.c:1188
-#: src/modules/lapack/Lapack.c:1195 src/modules/lapack/Lapack.c:1199
-#: src/modules/lapack/Lapack.c:1227 src/modules/lapack/Lapack.c:1234
-#: src/modules/lapack/Lapack.c:1254
+#: src/modules/lapack/Lapack.c:900 src/modules/lapack/Lapack.c:1135
+#: src/modules/lapack/Lapack.c:1141 src/modules/lapack/Lapack.c:1189
+#: src/modules/lapack/Lapack.c:1196 src/modules/lapack/Lapack.c:1200
+#: src/modules/lapack/Lapack.c:1228 src/modules/lapack/Lapack.c:1235
+#: src/modules/lapack/Lapack.c:1255
 #, c-format
 msgid "error code %d from Lapack routine '%s'"
 msgstr "feilkode %d frå Lapack-rutinen «%s»"
@@ -6992,28 +7133,28 @@ msgstr "feil [%d] frå «ztrcon()» i Lapack"
 msgid "'a' must be a complex matrix"
 msgstr "«a» må vera ei kompleks matrise"
 
-#: src/modules/lapack/Lapack.c:535 src/modules/lapack/Lapack.c:1042
+#: src/modules/lapack/Lapack.c:535 src/modules/lapack/Lapack.c:1043
 msgid "'a' is 0-diml"
 msgstr "«a» er 0-dimensjonal"
 
-#: src/modules/lapack/Lapack.c:537 src/modules/lapack/Lapack.c:1044
+#: src/modules/lapack/Lapack.c:537 src/modules/lapack/Lapack.c:1045
 #, c-format
 msgid "'a' (%d x %d) must be square"
 msgstr "«a» (%d × %d) må vera kvadratisk"
 
-#: src/modules/lapack/Lapack.c:543 src/modules/lapack/Lapack.c:1050
+#: src/modules/lapack/Lapack.c:543 src/modules/lapack/Lapack.c:1051
 msgid "no right-hand side in 'b'"
 msgstr "inga høgreside i «b»"
 
 #: src/modules/lapack/Lapack.c:546 src/modules/lapack/Lapack.c:560
-#: src/modules/lapack/Lapack.c:1053 src/modules/lapack/Lapack.c:1069
+#: src/modules/lapack/Lapack.c:1054 src/modules/lapack/Lapack.c:1070
 #, c-format
 msgid "'b' (%d x %d) must be compatible with 'a' (%d x %d)"
 msgstr "«a» (%d × %d) må vera kompatibel med «a» (%d × %d)"
 
 #: src/modules/lapack/Lapack.c:581 src/modules/lapack/Lapack.c:948
-#: src/modules/lapack/Lapack.c:962 src/modules/lapack/Lapack.c:1017
-#: src/modules/lapack/Lapack.c:1091
+#: src/modules/lapack/Lapack.c:962 src/modules/lapack/Lapack.c:1018
+#: src/modules/lapack/Lapack.c:1092
 #, c-format
 msgid "argument %d of Lapack routine %s had invalid value"
 msgstr "argumentet %d i Lapack-rutinen %s har ein ugyldig verdi"
@@ -7023,7 +7164,7 @@ msgid "'b' must be a complex matrix"
 msgstr "«b» må vera ei kompleks matrise"
 
 #: src/modules/lapack/Lapack.c:670 src/modules/lapack/Lapack.c:716
-#: src/modules/lapack/Lapack.c:1181 src/modules/lapack/Lapack.c:1220
+#: src/modules/lapack/Lapack.c:1182 src/modules/lapack/Lapack.c:1221
 #, c-format
 msgid "right-hand side should have %d not %d rows"
 msgstr "høgresida må ha %d, ikkje %d rader"
@@ -7042,13 +7183,13 @@ msgstr ""
 msgid "'x' must be a square complex matrix"
 msgstr "«x» må vera ei kvadratisk, numerisk matrise"
 
-#: src/modules/lapack/Lapack.c:926 src/modules/lapack/Lapack.c:1000
-#: src/modules/lapack/Lapack.c:1039 src/modules/lapack/Lapack.c:1114
-#: src/modules/lapack/Lapack.c:1245
+#: src/modules/lapack/Lapack.c:926 src/modules/lapack/Lapack.c:1001
+#: src/modules/lapack/Lapack.c:1040 src/modules/lapack/Lapack.c:1115
+#: src/modules/lapack/Lapack.c:1246
 msgid "'a' must be a numeric matrix"
 msgstr "«a» må vera ei numerisk matrise"
 
-#: src/modules/lapack/Lapack.c:933 src/modules/lapack/Lapack.c:1250
+#: src/modules/lapack/Lapack.c:933 src/modules/lapack/Lapack.c:1251
 msgid "'a' must be a square matrix"
 msgstr "«a» må vera ei kvadratisk matrise"
 
@@ -7065,40 +7206,40 @@ msgstr "den leiande minoren av orden %d er ikkje positivt definitt"
 msgid "the matrix is either rank-deficient or indefinite"
 msgstr ""
 
-#: src/modules/lapack/Lapack.c:987
+#: src/modules/lapack/Lapack.c:988
 msgid "'size' argument must be a positive integer"
 msgstr "«size»-argumentet må vera eit positivt heiltal"
 
-#: src/modules/lapack/Lapack.c:1002
+#: src/modules/lapack/Lapack.c:1003
 #, c-format
 msgid "'size' cannot exceed ncol(x) = %d"
 msgstr "«size» kan ikkje vera større enn ncol(x) = %d"
 
-#: src/modules/lapack/Lapack.c:1003
+#: src/modules/lapack/Lapack.c:1004
 #, c-format
 msgid "'size' cannot exceed nrow(x) = %d"
 msgstr "«size» kan ikkje vera større enn nrow(x) = %d"
 
-#: src/modules/lapack/Lapack.c:1015
+#: src/modules/lapack/Lapack.c:1016
 #, c-format
 msgid "element (%d, %d) is zero, so the inverse cannot be computed"
 msgstr "elementet (%d, %d) er null, så inversen kan ikkje reknast ut"
 
-#: src/modules/lapack/Lapack.c:1094
+#: src/modules/lapack/Lapack.c:1095
 #, fuzzy, c-format
 msgid "Lapack routine %s: system is exactly singular: U[%d,%d] = 0"
 msgstr "Lapack-rutinen dgesv: systemet er nøyaktig singulært"
 
-#: src/modules/lapack/Lapack.c:1102
+#: src/modules/lapack/Lapack.c:1103
 #, c-format
 msgid "system is computationally singular: reciprocal condition number = %g"
 msgstr "systemet er reknemessig singulært: det resiproke kondisjonstalet er %g"
 
-#: src/modules/lapack/Lapack.c:1174 src/modules/lapack/Lapack.c:1212
+#: src/modules/lapack/Lapack.c:1175 src/modules/lapack/Lapack.c:1213
 msgid "'b' must be a numeric matrix"
 msgstr "«b» må vera ei numerisk matrise"
 
-#: src/modules/lapack/Lapack.c:1246
+#: src/modules/lapack/Lapack.c:1247
 msgid "argument 'logarithm' must be logical"
 msgstr "argumentet «logarithm» må vera logisk"
 
@@ -7107,8 +7248,8 @@ msgid "bessel_i allocation error"
 msgstr "bessel_i-reserveringsfeil"
 
 #: src/nmath/bessel_i.c:77 src/nmath/bessel_i.c:122
-#, c-format
-msgid "bessel_i(%g): ncalc (=%ld) != nb (=%ld); alpha=%g. Arg. out of range?\n"
+#, fuzzy, c-format
+msgid "bessel_i(%g): ncalc (=%d) != nb (=%d); alpha=%g. Arg. out of range?\n"
 msgstr ""
 "bessel_i(%g): ncalc (=%ld) != nb (=%ld); alpha=%g. Argument utanfor gyldig "
 "verdiområde?\n"
@@ -7118,18 +7259,23 @@ msgstr ""
 msgid "bessel_i(%g,nu=%g): precision lost in result\n"
 msgstr "bessel_i(%g,nu=%g): tapt presisjon i resultatet\n"
 
-#: src/nmath/bessel_j.c:67
+#: src/nmath/bessel_j.c:64 src/nmath/bessel_j.c:118
+#, c-format
+msgid "besselJ(x, nu): nu=%g too large for bessel_j() algorithm"
+msgstr ""
+
+#: src/nmath/bessel_j.c:72
 msgid "bessel_j allocation error"
 msgstr "bessel_j-reserveringsfeil"
 
-#: src/nmath/bessel_j.c:75 src/nmath/bessel_j.c:118
-#, c-format
-msgid "bessel_j(%g): ncalc (=%ld) != nb (=%ld); alpha=%g. Arg. out of range?\n"
+#: src/nmath/bessel_j.c:80 src/nmath/bessel_j.c:127
+#, fuzzy, c-format
+msgid "bessel_j(%g): ncalc (=%d) != nb (=%d); alpha=%g. Arg. out of range?\n"
 msgstr ""
 "bessel_j(%g): ncalc (=%ld) != nb (=%ld); alpha=%g. Argumetn utanfor gyldig "
 "verdiområde?\n"
 
-#: src/nmath/bessel_j.c:78 src/nmath/bessel_j.c:121
+#: src/nmath/bessel_j.c:83 src/nmath/bessel_j.c:130
 #, c-format
 msgid "bessel_j(%g,nu=%g): precision lost in result\n"
 msgstr "bessel_j(%g,nu=%g): tapt presisjon i resultat\n"
@@ -7139,8 +7285,8 @@ msgid "bessel_k allocation error"
 msgstr "bessel_k-reserveringsfeil"
 
 #: src/nmath/bessel_k.c:71 src/nmath/bessel_k.c:108
-#, c-format
-msgid "bessel_k(%g): ncalc (=%ld) != nb (=%ld); alpha=%g. Arg. out of range?\n"
+#, fuzzy, c-format
+msgid "bessel_k(%g): ncalc (=%d) != nb (=%d); alpha=%g. Arg. out of range?\n"
 msgstr ""
 "bessel_k(%g): ncalc (=%ld) != nb (=%ld); alpha=%g. Argument utanfor gyldig "
 "verdiområde?\n"
@@ -7150,18 +7296,23 @@ msgstr ""
 msgid "bessel_k(%g,nu=%g): precision lost in result\n"
 msgstr "bessel_k(%g,nu=%g): tapt presisjon i resultat\n"
 
-#: src/nmath/bessel_y.c:66
+#: src/nmath/bessel_y.c:63 src/nmath/bessel_y.c:125
+#, c-format
+msgid "besselY(x, nu): nu=%g too large for bessel_y() algorithm"
+msgstr ""
+
+#: src/nmath/bessel_y.c:71
 msgid "bessel_y allocation error"
 msgstr "bessel_y-reserveringsfeil"
 
-#: src/nmath/bessel_y.c:82 src/nmath/bessel_y.c:127
-#, c-format
-msgid "bessel_y(%g): ncalc (=%ld) != nb (=%ld); alpha=%g. Arg. out of range?\n"
+#: src/nmath/bessel_y.c:87 src/nmath/bessel_y.c:136
+#, fuzzy, c-format
+msgid "bessel_y(%g): ncalc (=%d) != nb (=%d); alpha=%g. Arg. out of range?\n"
 msgstr ""
 "bessel_y(%g): ncalc (=%ld) != nb (=%ld); alpha=%g. Argument utanfor gyldig "
 "verdiområde?\n"
 
-#: src/nmath/bessel_y.c:85 src/nmath/bessel_y.c:130
+#: src/nmath/bessel_y.c:90 src/nmath/bessel_y.c:139
 #, c-format
 msgid "bessel_y(%g,nu=%g): precision lost in result\n"
 msgstr "bessel_y(%g,nu=%g): tapt presisjon i resultat\n"
@@ -7171,42 +7322,42 @@ msgstr "bessel_y(%g,nu=%g): tapt presisjon i resultat\n"
 msgid "'k' (%.2f) must be integer, rounded to %.0f"
 msgstr ""
 
-#: src/nmath/nmath.h:141
+#: src/nmath/nmath.h:156
 #, c-format
 msgid "argument out of domain in '%s'\n"
 msgstr "argumentet er utanfor gyldig definisjonområde i «%s»\n"
 
-#: src/nmath/nmath.h:144
+#: src/nmath/nmath.h:159
 #, c-format
 msgid "value out of range in '%s'\n"
 msgstr "verdien til «%s» er utanfor gyldig verdiområde\n"
 
-#: src/nmath/nmath.h:147
+#: src/nmath/nmath.h:162
 #, c-format
 msgid "convergence failed in '%s'\n"
 msgstr "konvergerte ikkje i «%s»\n"
 
-#: src/nmath/nmath.h:150
+#: src/nmath/nmath.h:165
 #, c-format
 msgid "full precision may not have been achieved in '%s'\n"
 msgstr "full presisjon vart kanskje ikkje oppnådd i «%s»\n"
 
-#: src/nmath/nmath.h:153
+#: src/nmath/nmath.h:168
 #, c-format
 msgid "underflow occurred in '%s'\n"
 msgstr "det oppstod underflyt i «%s»\n"
 
-#: src/nmath/pbeta.c:48
+#: src/nmath/pbeta.c:64
 #, c-format
-msgid "pbeta_raw() -> bratio() gave error code %d"
+msgid "pbeta_raw(%g, a=%g, b=%g, ..) -> bratio() gave error code %d"
 msgstr ""
 
-#: src/nmath/pnbinom.c:79
+#: src/nmath/pnbinom.c:82
 #, c-format
 msgid "pnbinom_mu() -> bratio() gave error code %d"
 msgstr ""
 
-#: src/nmath/pnchisq.c:246
+#: src/nmath/pnchisq.c:295
 #, c-format
 msgid "pnchisq(x=%g, ..): not converged in %d iter."
 msgstr "pnchisq(x=%g, ..): ikkje konvergert etter %d iterasjonar."
@@ -7248,7 +7399,7 @@ msgstr "X11-rutinar kan ikkje brukast i modul"
 msgid "X11 module cannot be loaded"
 msgstr "X11-modulen kan ikkje lastast"
 
-#: src/unix/X11.c:126 src/unix/X11.c:132 src/unix/X11.c:138 src/unix/X11.c:144
+#: src/unix/X11.c:144 src/unix/X11.c:150 src/unix/X11.c:156 src/unix/X11.c:162
 msgid "X11 is not available"
 msgstr "X11 er ikkje tilgjengeleg"
 
@@ -7282,7 +7433,7 @@ msgstr ""
 "Eksplisitt lat dynamisk lasting er ikkje støtta på denne plattforma. Brukar "
 "standard."
 
-#: src/unix/dynload.c:240
+#: src/unix/dynload.c:232
 msgid "cannot get working directory!"
 msgstr "fekk ikkje tilgang til arbeidsmappa"
 
@@ -7298,12 +7449,12 @@ msgstr ""
 "Det oppstod eit uvanleg tilfelle i nøsting av readline-inndata. Meld frå om "
 "dette med bug.report()."
 
-#: src/unix/sys-std.c:1082 src/unix/sys-std.c:1249
+#: src/unix/sys-std.c:1085 src/unix/sys-std.c:1255
 #, c-format
 msgid "problem in saving the history file '%s'"
 msgstr "feil ved lagring av historiefila «%s»"
 
-#: src/unix/sys-std.c:1156
+#: src/unix/sys-std.c:1162
 #, c-format
 msgid ""
 "Cannot open file '%s': %s\n"
@@ -7312,85 +7463,211 @@ msgstr ""
 "Klarte ikkje opna fila «%s»: %s\n"
 "\n"
 
-#: src/unix/sys-std.c:1220 src/unix/sys-std.c:1243
+#: src/unix/sys-std.c:1226 src/unix/sys-std.c:1249
 msgid "'file' argument is too long"
 msgstr "argumentet «file» er for langt"
 
-#: src/unix/sys-std.c:1226 src/unix/sys-std.c:1228
+#: src/unix/sys-std.c:1232 src/unix/sys-std.c:1234
 msgid "no history mechanism available"
 msgstr "ingen historiemekanisme er tilgjengeleg"
 
-#: src/unix/sys-std.c:1255
+#: src/unix/sys-std.c:1261
 msgid "problem in truncating the history file"
 msgstr "feil ved trunkering av historiefila"
 
-#: src/unix/sys-std.c:1257 src/unix/sys-std.c:1259
+#: src/unix/sys-std.c:1263 src/unix/sys-std.c:1265
 msgid "no history available to save"
 msgstr "ingen historie er klar for lagring"
 
-#: src/unix/sys-std.c:1271
+#: src/unix/sys-std.c:1277
 msgid "invalid timestamp"
 msgstr "ugyldig tidsstempel"
 
-#: src/unix/sys-unix.c:251
+#: src/unix/sys-unix.c:248
 msgid "non-empty character argument expected"
 msgstr "venta ikkje-tom teiknargument"
 
-#: src/unix/sys-unix.c:254
+#: src/unix/sys-unix.c:251
 msgid "'intern' must be logical and not NA"
 msgstr "«intern» må vera logisk og ikkje NA"
 
-#: src/unix/sys-unix.c:266
+#: src/unix/sys-unix.c:269
 #, c-format
 msgid "cannot popen '%s', probable reason '%s'"
 msgstr "klarte ikkje køyra «popen» på «%s», truleg av grunnen «%s»"
 
-#: src/unix/sys-unix.c:271
+#: src/unix/sys-unix.c:279
 #, c-format
 msgid "line %d may be truncated in call to system(, intern = TRUE)"
 msgstr "linje %d kan vera trunkert i kall til system(, intern = TRUE)"
 
-#: src/unix/sys-unix.c:288
+#: src/unix/sys-unix.c:301
 #, c-format
 msgid "error in running command: '%s'"
 msgstr "feil ved køyring av kommando: «%s»"
 
-#: src/unix/sys-unix.c:290
+#: src/unix/sys-unix.c:303
 msgid "error in running command"
 msgstr "feil ved køyring av kommando"
 
-#: src/unix/sys-unix.c:294
+#: src/unix/sys-unix.c:307
 #, c-format
 msgid "running command '%s' had status %d and error message '%s'"
 msgstr "køyring av kommandoen «%s» gav statusen %d og feilmeldinga «%s»"
 
-#: src/unix/sys-unix.c:399
+#: src/unix/sys-unix.c:412
 msgid "Sys.info() is not implemented on this system"
 msgstr "Sys.info() er ikkje implementert på dette systemet"
 
-#: src/unix/system.c:257
+#: src/unix/system.c:267
 #, c-format
 msgid "WARNING: --gui or -g without value ignored"
 msgstr "ÅTVARING: --gui eller -g utan verdi ignorert"
 
-#: src/unix/system.c:275
+#: src/unix/system.c:285
 #, c-format
 msgid "WARNING: unknown gui '%s', using X11\n"
 msgstr "ÅTVARING: ukjend gui «%s» (brukar X11)\n"
 
-#: src/unix/system.c:278
+#: src/unix/system.c:288
 #, c-format
 msgid "WARNING: unknown gui '%s', using none\n"
 msgstr "ÅTVARING: ukjend gui «%s» (brukar ingen)\n"
 
-#: src/unix/system.c:388
+#: src/unix/system.c:373
 msgid "creating temporary file for '-e' failed"
 msgstr "feil ved oppretting av mellombels fil for «-e»"
 
-#: src/unix/system.c:469
+#: src/unix/system.c:454
 msgid "WARNING: Only editing the first in the list of files"
 msgstr "ÅTVARING: Redigerer berre den første i lista over filer"
 
+#~ msgid "'what' must be a character string or a function"
+#~ msgstr "«what» må vera ein teiknstreng eller ein funksjon"
+
+#~ msgid "sockets are not available on this system"
+#~ msgstr "soklar er ikkje tilgjengelege på dette systemet"
+
+#~ msgid "no function to restart"
+#~ msgstr "ingen funksjon å starta på nytt"
+
+#~ msgid "argument must be a closure"
+#~ msgstr "argumentet må vera ei omslutting"
+
+#~ msgid "'hostname' must be a character vector of length 1"
+#~ msgstr "«hostnamne» må vera ein teiknvektor av lengd 1"
+
+#~ msgid "nsl() was unable to resolve host '%s'"
+#~ msgstr "nsl() klarte ikkje utføra namneoppslag for verten «%s»"
+
+#, fuzzy
+#~ msgid "unknown format returned by C function 'gethostbyname'"
+#~ msgstr "ukjend format returnert av gethostbyname"
+
+#~ msgid "nsl() is not supported on this platform"
+#~ msgstr "nsl() er ikkje støtta på denne plattforma"
+
+#~ msgid "too large a range of values in 'x'"
+#~ msgstr "for stort verdiområde i «x»"
+
+#~ msgid "non-numeric argument"
+#~ msgstr "ikkje-numerisk argument"
+
+#~ msgid "unsupported URL scheme"
+#~ msgstr "ikkje-støtta URL-skjema"
+
+#~ msgid "'dimnames' must be a list"
+#~ msgstr "«dimnames» må vera ei liste"
+
+#~ msgid "'args' must be a list"
+#~ msgstr "«args» må vera ei liste"
+
+#~ msgid "binary operations require two arguments"
+#~ msgstr "binæroperasjonar krev to argument"
+
+#~ msgid "opened URL\n"
+#~ msgstr "opna adressa\n"
+
+#~ msgid "internet routines were already initialized"
+#~ msgstr "Internett-rutinane er alt starta"
+
+#~ msgid "'msg1' must be a character string"
+#~ msgstr "«msg1» må vera ein teiknstreng"
+
+#~ msgid "'msg2' must be a character string"
+#~ msgstr "«msg2» må vera ein teiknstreng"
+
+#~ msgid "argument 'code' must be a character string"
+#~ msgstr "argumentet «code» må vera ein teiknstreng"
+
+#, fuzzy
+#~ msgid "argument 'type' must be a character string"
+#~ msgstr "argumentet «code» må vera ein teiknstreng"
+
+#~ msgid "InternetOpenUrl timed out"
+#~ msgstr "tidsavbrot ved InternetOpenUrl"
+
+#~ msgid "Internet read timed out"
+#~ msgstr "tidsavbrot ved lesing frå nettet"
+
+#~ msgid "unable to find a closure from within which 'match.call' was called"
+#~ msgstr "klarte ikkje finna omslutting innanfrå der «match.call» vart kalla"
+
+#~ msgid "vfont routines cannot be accessed in module"
+#~ msgstr "vfont-rutinane kan ikkje brukast i modul"
+
+#~ msgid "Hershey fonts cannot be loaded"
+#~ msgstr "Hershey-skriftene kan ikkje lastast"
+
+#, fuzzy
+#~ msgid "invalid generic function in 'usemethod'"
+#~ msgstr "Ugyldig generisk funksjon i «usemethod»"
+
+#, fuzzy
+#~ msgid "'UseMethod' called from outside a function"
+#~ msgstr "«NextMethod» kalla utanfrå ein funksjon"
+
+#~ msgid "first argument must be a generic name"
+#~ msgstr "det første argumentet må vera eit generisk namn"
+
+#~ msgid ""
+#~ "explicit request not to duplicate arguments in call to '%s', but argument "
+#~ "%d is of the wrong type (%d != %d)"
+#~ msgstr ""
+#~ "direkte førespurnad om å ikkje duplisera argument i kall til «%s», men "
+#~ "argumentet %d har feil type (%d != %d)"
+
+#~ msgid "character variables must be duplicated in .C/.Fortran"
+#~ msgstr "teiknvariablar må dupliserast i .C/.Fortran"
+
+#~ msgid "call name too long in '%s'"
+#~ msgstr "kallnamn for langt i «%s»"
+
+#~ msgid "generic name too long in '%s'"
+#~ msgstr "generisk namn for langt i «%s»"
+
+#~ msgid "method name too long in '%s'"
+#~ msgstr "metodenamnet i «%s» er for langt"
+
+#~ msgid "%d arguments passed to 'log' which requires 1 or 2"
+#~ msgstr "%d argument sende til «log», som tek 1 eller 2 argument"
+
+#~ msgid ""
+#~ "Warning in %s :\n"
+#~ "  %s\n"
+#~ msgstr ""
+#~ "Åtvaring i %s:\n"
+#~ "  %s\n"
+
+#~ msgid "input"
+#~ msgstr "inndata"
+
+#~ msgid "symbol"
+#~ msgstr "symbol"
+
+#~ msgid "assignment"
+#~ msgstr "tildeling"
+
 #~ msgid "negative value in 'x'"
 #~ msgstr "negativ verdi i «x»"
 
@@ -7489,9 +7766,6 @@ msgstr "ÅTVARING: Redigerer berre den første i lista over filer"
 #~ msgid "invalid return value count in call_R"
 #~ msgstr "ugyldig returverdi i call_R"
 
-#~ msgid "internal error in unz code"
-#~ msgstr "intern feil i unz-kode"
-
 #~ msgid "can't use R profiling while byte code profiling"
 #~ msgstr "kan ikkje bruka R-profilering under bytecode-profilering"
 
@@ -7666,15 +7940,9 @@ msgstr "ÅTVARING: Redigerer berre den første i lista over filer"
 #~ msgid "'title' must be a character string"
 #~ msgstr "«title» må vera ein teiknstreng"
 
-#~ msgid "'text' must be a character string"
-#~ msgstr "«text» må vera ein teiknstreng"
-
 #~ msgid "'%s' must be length 1"
 #~ msgstr "«%s» må ha lengd 1"
 
-#~ msgid "'%s' must be a list"
-#~ msgstr "«%s» må vera ei liste"
-
 #~ msgid "'%s' element %d is not a window handle"
 #~ msgstr "«%s» element %d er ikkje eit vindaugshandtak"
 
@@ -7702,9 +7970,6 @@ msgstr "ÅTVARING: Redigerer berre den første i lista over filer"
 #~ msgid "'file' is not a connection"
 #~ msgstr "«file» er ikkje eit samband"
 
-#~ msgid "'dec' must be a single character"
-#~ msgstr "«dec» må vera eitt teikn"
-
 #~ msgid "corrupt data frame -- length of column %d does not not match nrows"
 #~ msgstr "øydelagd dataramme – lengda til kolonne %d er ikkje lik nrows"
 
diff --git a/src/library/base/po/pl.po b/src/library/base/po/pl.po
index e8a0117..7315894 100644
--- a/src/library/base/po/pl.po
+++ b/src/library/base/po/pl.po
@@ -1,8 +1,8 @@
 msgid ""
 msgstr ""
-"Project-Id-Version: R 3.1.0\n"
-"Report-Msgid-Bugs-To: bugs.r-project.org\n"
-"POT-Creation-Date: 2014-03-27 07:46+0000\n"
+"Project-Id-Version: R 3.4.0\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2016-04-04 08:15+0200\n"
 "PO-Revision-Date: \n"
 "Last-Translator: Łukasz Daniel <lukasz.daniel at gmail.com>\n"
 "Language-Team: Łukasz Daniel <lukasz.daniel at gmail.com>\n"
@@ -13,1879 +13,619 @@ msgstr ""
 "na-Revision-Date: 2012-05-29 07:55+0100\n"
 "Plural-Forms: nplurals=3; plural=(n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 "
 "|| n%100>=20) ? 1 : 2);\n"
-"X-Poedit-SourceCharset: iso-8859-1\n"
-"X-Generator: Poedit 1.5.4\n"
+"X-Poedit-SourceCharset: UTF-8\n"
+"X-Generator: Poedit 1.8.7\n"
 "X-Poedit-Bookmarks: -1,736,-1,-1,-1,-1,-1,-1,-1,-1\n"
 
-# src/appl/optim.c: 60
-# error(_("non-finite value supplied by 'optim'"))
 #: src/appl/optim.c:60
 msgid "non-finite value supplied by 'optim'"
 msgstr "nieskończona wartość dostarczona przez 'optim'"
 
-# src/appl/optim.c: 67
-# error(_("candidate point in 'optim' evaluated to length %d not %d"),
-# 		  LENGTH(s), n)
 #: src/appl/optim.c:67
 #, c-format
 msgid "candidate point in 'optim' evaluated to length %d not %d"
 msgstr "punkt kandydat w 'optim' obliczony do długości %d, a nie %d"
 
-# src/appl/optim.c: 136
-# error(_("REPORT must be > 0 (method = \"BFGS\")"))
 #: src/appl/optim.c:136
 msgid "REPORT must be > 0 (method = \"BFGS\")"
 msgstr "'REPORT' musi być > 0 (metoda = \"BFGS\")"
 
-# src/appl/optim.c: 147
-# error(_("initial value in 'vmmin' is not finite"))
 #: src/appl/optim.c:147
 msgid "initial value in 'vmmin' is not finite"
 msgstr "początkowa wartość w 'vmmin' nie jest skończona"
 
-# src/appl/optim.c: 297
-# error(_("function cannot be evaluated at initial parameters"))
 #: src/appl/optim.c:297
 msgid "function cannot be evaluated at initial parameters"
 msgstr "funkcja nie może być obliczona przy parametrach początkowych"
 
-# src/appl/optim.c: 497
-# error(_("unknown 'type' in \"CG\" method of 'optim'"))
 #: src/appl/optim.c:497
 msgid "unknown 'type' in \"CG\" method of 'optim'"
 msgstr "nieznany typ w metodzie \"CG\" 'optim'"
 
-# src/appl/optim.c: 510
-# error(_("Function cannot be evaluated at initial parameters"))
 #: src/appl/optim.c:510
 msgid "Function cannot be evaluated at initial parameters"
 msgstr "funkcja nie może być obliczona przy parametrach początkowych"
 
-# src/appl/optim.c: 565
-# error(_("unknown type in \"CG\" method of 'optim'"))
 #: src/appl/optim.c:565
 msgid "unknown type in \"CG\" method of 'optim'"
 msgstr "nieznany typ w metodzie \"CG\" 'optim'"
 
-# src/appl/optim.c: 665
-# error(_("REPORT must be > 0 (method = \"L-BFGS-B\")"))
-#: src/appl/optim.c:665
+#: src/appl/optim.c:662
 msgid "REPORT must be > 0 (method = \"L-BFGS-B\")"
 msgstr "'REPORT' musi być > 0 (metoda = \"L-BFGS-B\")"
 
-# src/appl/optim.c: 688
-# error(_("L-BFGS-B needs finite values of 'fn'"))
-#: src/appl/optim.c:688
+#: src/appl/optim.c:685
 msgid "L-BFGS-B needs finite values of 'fn'"
 msgstr "metoda 'L-BFGS-B' potrzebuje skończonych wartości 'fn'"
 
-# src/appl/optim.c: 744
-# error(_("trace, REPORT must be >= 0 (method = \"SANN\")"))
-#: src/appl/optim.c:744
+#: src/appl/optim.c:741
 msgid "trace, REPORT must be >= 0 (method = \"SANN\")"
 msgstr "'trace' oraz 'REPORT' muszą być >= 0 (metoda = \"SANN\")"
 
-# src/appl/pretty.c: 111
-# warning(_("Internal(pretty()): very small range.. corrected"))
 #: src/appl/pretty.c:111
 msgid "Internal(pretty()): very small range.. corrected"
 msgstr "Internal(pretty()): bardzo mały zakres.. poprawiono"
 
-# src/appl/pretty.c: 114
-# warning(_("Internal(pretty()): very large range.. corrected"))
 #: src/appl/pretty.c:114
 msgid "Internal(pretty()): very large range.. corrected"
 msgstr "Internal(pretty()): bardzo duży zakres.. poprawiono"
 
-# src/gnuwin32/dynload.c: 162
-# warning(_("DLL attempted to change FPU control word from %x to %x"),
-# 		    rcw,dllcw)
 #: src/gnuwin32/dynload.c:162
 #, c-format
 msgid "DLL attempted to change FPU control word from %x to %x"
 msgstr "DLL starało się zmienić słowo kontrolne FPU z %x na %x"
 
-# src/gnuwin32/dynload.c: 203
-#  _("cannot get working directory")
 #: src/gnuwin32/dynload.c:203
 msgid "cannot get working directory"
 msgstr "nie można uzyskać dostępu do katalogu roboczego"
 
-# src/gnuwin32/extra.c: 61
-# error(_("R_HOME not set"))
-# src/gnuwin32/extra.c: 89
-# error(_("R_HOME not set"))
-# src/gnuwin32/extra.c: 128
-# error(_("R_HOME not set"))
 #: src/gnuwin32/extra.c:61 src/gnuwin32/extra.c:89 src/gnuwin32/extra.c:128
 msgid "R_HOME not set"
 msgstr "R_HOME nie jest ustawiony"
 
-# src/gnuwin32/extra.c: 68
-# error(_("'%s' not found"), file)
 #: src/gnuwin32/extra.c:68
 #, c-format
 msgid "'%s' not found"
 msgstr "plik '%s' nie został znaleziony"
 
-# src/gnuwin32/extra.c: 70
-# error(_("file association for '%s' not available or invalid"),
-# 		  file)
 #: src/gnuwin32/extra.c:70
 #, c-format
 msgid "file association for '%s' not available or invalid"
 msgstr "powiązanie pliku dla pliku '%s' nie jest dostępne lub jest niepoprawne"
 
-# src/gnuwin32/extra.c: 73
-# error(_("access to '%s' denied"), file)
 #: src/gnuwin32/extra.c:73
 #, c-format
 msgid "access to '%s' denied"
 msgstr "dostęp do pliku '%s' jest zabroniony"
 
-# src/gnuwin32/extra.c: 74
-# error(_("problem in displaying '%s'"), file)
 #: src/gnuwin32/extra.c:74
 #, c-format
 msgid "problem in displaying '%s'"
 msgstr "problem z wyświetleniem pliku '%s'"
 
-# src/gnuwin32/extra.c: 99
-# error(_("'%ls' not found"), file)
 #: src/gnuwin32/extra.c:99
 #, c-format
 msgid "'%ls' not found"
 msgstr "plik '%ls' nie został znaleziony"
 
-# src/gnuwin32/extra.c: 101
-# error(_("file association for '%ls' not available or invalid"),
-# 		  file)
 #: src/gnuwin32/extra.c:101
 #, c-format
 msgid "file association for '%ls' not available or invalid"
 msgstr ""
 "powiązanie pliku dla pliku '%ls' nie jest dostępne lub jest niepoprawne"
 
-# src/gnuwin32/extra.c: 104
-# error(_("access to '%ls' denied"), file)
 #: src/gnuwin32/extra.c:104
 #, c-format
 msgid "access to '%ls' denied"
 msgstr "dostęp do pliku '%ls' jest zabroniony"
 
-# src/gnuwin32/extra.c: 105
-# error(_("problem in displaying '%ls'"), file)
 #: src/gnuwin32/extra.c:105
 #, c-format
 msgid "problem in displaying '%ls'"
 msgstr "problem z wyświetleniem pliku '%ls'"
 
-# src/modules/internet/internet.c: 284
-# error(_("invalid '%s' argument"), "url")
-# src/modules/internet/internet.c: 290
-# error(_("invalid '%s' argument"), "destfile")
-# src/modules/internet/internet.c: 296
-# error(_("invalid '%s' argument"), "quiet")
-# src/modules/internet/internet.c: 299
-# error(_("invalid '%s' argument"), "mode")
-# src/modules/internet/internet.c: 303
-# error(_("invalid '%s' argument"), "cacheOK")
-# src/modules/lapack/Lapack.c: 155
-# error(_("invalid '%s' argument"), "only.values")
-# src/modules/lapack/Lapack.c: 261
-# error(_("invalid '%s' argument"), "only.values")
-# src/modules/lapack/Lapack.c: 709
-# error(_("invalid '%s' argument"), "trans")
-# src/modules/lapack/Lapack.c: 817
-# error(_("invalid '%s' argument"), "only.values")
-# src/modules/lapack/Lapack.c: 879
-# error(_("invalid '%s' argument"), "only.values")
-# src/modules/lapack/Lapack.c: 1213
-# error(_("invalid '%s' argument"), "trans")
-# src/modules/X11/devX11.c: 3241
-# error(_("invalid '%s' argument"), "filename")
-# src/modules/X11/devX11.c: 3244
-# error(_("invalid '%s' argument"), "type")
-# src/modules/X11/devX11.c: 3247
-# error(_("invalid '%s' argument"), "device")
-# src/modules/X11/devX11.c: 3271
-# error(_("invalid '%s' argument"), "type")
-# src/unix/sys-std.c: 1217
-#  _("invalid '%s' argument")
-# src/unix/sys-std.c: 1240
-#  _("invalid '%s' argument")
-# src/gnuwin32/extra.c: 116
-#  _("invalid '%s' argument")
-# src/gnuwin32/extra.c: 159
-# error(_("invalid '%s' argument"), "file")
-# src/gnuwin32/extra.c: 349
-#  _("invalid '%s' argument")
-# src/gnuwin32/extra.c: 577
-# error(_("invalid '%s' argument"), "which")
-# src/gnuwin32/extra.c: 602
-# error(_("invalid '%s' argument"), "which")
-# src/library/tools/src/install.c: 112
-# error(_("invalid '%s' argument"), "dir")
-# src/library/tools/src/install.c: 133
-# error(_("invalid '%s' argument"), "file1")
-# src/library/tools/src/install.c: 135
-# error(_("invalid '%s' argument"), "file2")
-# src/library/graphics/src/stem.c: 158
-# error(_("invalid '%s' argument"), "x")
-# src/library/graphics/src/stem.c: 159
-# error(_("invalid '%s' argument"), "width")
-# src/library/graphics/src/stem.c: 161
-# error(_("invalid '%s' argument"), "scale")
-# src/library/graphics/src/stem.c: 162
-# error(_("invalid '%s' argument"), "atom")
-# src/library/graphics/src/stem.c: 208
-# error(_("invalid '%s' argument"), "right")
-# src/library/graphics/src/stem.c: 209
-# error(_("invalid '%s' argument"), "include.lowest")
-# src/library/graphics/src/plot3d.c: 1085
-# error(_("invalid '%s' argument"), "x")
-# src/library/graphics/src/plot3d.c: 1089
-# error(_("invalid '%s' argument"), "y")
-# src/library/graphics/src/plot3d.c: 1094
-# error(_("invalid '%s' argument"), "z")
-# src/library/graphics/src/plot3d.c: 1098
-# error(_("invalid '%s' argument"), "xlim")
-# src/library/graphics/src/plot3d.c: 1102
-# error(_("invalid '%s' argument"), "ylim")
-# src/library/graphics/src/plot3d.c: 1106
-# error(_("invalid '%s' argument"), "zlim")
-# src/library/graphics/src/plot.c: 2927
-# error(_("invalid '%s' argument"), "which")
-# src/library/graphics/src/plot.c: 4024
-# error("invalid '%s' argument", "x1")
-# src/library/graphics/src/plot.c: 4027
-# error("invalid '%s' argument", "x2")
-# src/library/graphics/src/plot.c: 4030
-# error("invalid '%s' argument", "y1")
-# src/library/graphics/src/plot.c: 4033
-# error("invalid '%s' argument", "y2")
-# src/library/graphics/src/plot.c: 4053
-# error(_("invalid '%s' argument"), "x")
-# src/library/graphics/src/plot.c: 4057
-# error(_("invalid '%s' argument"), "from")
-# src/library/graphics/src/plot.c: 4060
-# error(_("invalid '%s' argument"), "to")
-# src/library/graphics/src/plot.c: 4080
-# error(_("invalid '%s' argument"), "x")
-# src/library/graphics/src/plot.c: 4084
-# error(_("invalid '%s' argument"), "from")
-# src/library/graphics/src/plot.c: 4087
-# error(_("invalid '%s' argument"), "to")
-# src/library/grDevices/src/stubs.c: 99
-# error(_("invalid '%s' argument"), "ask")
-# src/library/grDevices/src/cairo/cairoBM.c: 480
-# error(_("invalid '%s' argument"), "filename")
-# src/library/grDevices/src/cairo/cairoBM.c: 485
-# error(_("invalid '%s' argument"), "type")
-# src/library/grDevices/src/cairo/cairoBM.c: 489
-# error(_("invalid '%s' argument"), "width")
-# src/library/grDevices/src/cairo/cairoBM.c: 493
-# error(_("invalid '%s' argument"), "height")
-# src/library/grDevices/src/cairo/cairoBM.c: 497
-# error(_("invalid '%s' argument"), "pointsize")
-# src/library/grDevices/src/cairo/cairoBM.c: 508
-# error(_("invalid '%s' argument"), "antialias")
-# src/library/grDevices/src/cairo/cairoBM.c: 512
-# error(_("invalid '%s' argument"), "quality")
-# src/library/grDevices/src/cairo/cairoBM.c: 515
-# error(_("invalid '%s' argument"), "family")
-# src/library/stats/src/optim.c: 197
-# error(_("invalid '%s' argument"), "method")
-# src/library/stats/src/model.c: 369
-# error(_("invalid '%s' argument"), "terms")
-# src/library/stats/src/model.c: 377
-# error(_("invalid '%s' argument"), "terms")
-# src/library/stats/src/massdist.c: 41
-# error("invalid '%s' argument", "n")
-# src/library/utils/src/io.c: 328
-# error(_("invalid '%s' argument"), "comment.char")
-# src/library/utils/src/io.c: 332
-# error(_("invalid '%s' argument"), "comment.char")
-# src/library/utils/src/io.c: 342
-# error(_("invalid '%s' argument"), "sep")
-# src/library/utils/src/io.c: 571
-# error(_("invalid '%s' argument"), "na.strings")
-# src/library/utils/src/io.c: 752
-# error(_("invalid '%s' argument"), "choices")
-# src/library/utils/src/io.c: 805
-# error(_("invalid '%s' argument"), "nlines")
-# src/library/utils/src/io.c: 817
-# error(_("invalid '%s' argument"), "comment.char")
-# src/library/utils/src/io.c: 821
-# error(_("invalid '%s' argument"), "comment.char")
-# src/library/utils/src/io.c: 827
-# error(_("invalid '%s' argument"), "sep")
-# src/library/utils/src/io.c: 828
-# error(_("invalid '%s' argument"), "skipNul")
-# src/library/utils/src/io.c: 1052
-# error(_("invalid '%s' argument"), "nr")
-# src/library/utils/src/io.c: 1053
-# error(_("invalid '%s' argument"), "nc")
-# src/library/utils/src/io.c: 1055
-# error(_("invalid '%s' argument"), "rnames")
-# src/library/utils/src/io.c: 1056
-# error(_("invalid '%s' argument"), "sep")
-# src/library/utils/src/io.c: 1057
-# error(_("invalid '%s' argument"), "eol")
-# src/library/utils/src/io.c: 1058
-# error(_("invalid '%s' argument"), "na")
-# src/library/utils/src/io.c: 1059
-# error(_("invalid '%s' argument"), "dec")
-# src/library/utils/src/io.c: 1060
-# error(_("invalid '%s' argument"), "qmethod")
-# src/library/utils/src/windows/dialogs.c: 170
-# error(_("invalid '%s' argument"), "message")
-# src/library/utils/src/windows/dialogs.c: 195
-# error(_("invalid '%s' argument"), "message")
-# src/library/utils/src/windows/dialogs.c: 198
-# error(_("invalid '%s' argument"), "default")
-# src/library/utils/src/windows/dialogs.c: 242
-# error(_("invalid '%s' argument"), "menuname")
-# src/library/utils/src/windows/dialogs.c: 279
-# error(_("invalid '%s' argument"), "menuname")
-# src/library/utils/src/windows/dialogs.c: 290
-# error(_("invalid '%s' argument"), "itemname")
-# src/library/utils/src/windows/dialogs.c: 314
-# error(_("invalid '%s' argument"), "menuname")
-# src/library/utils/src/windows/dialogs.c: 322
-# error(_("invalid '%s' argument"), "itemname")
-# src/library/utils/src/windows/widgets.c: 78
-# error(_("invalid '%s' argument"), "choices")
-# src/library/utils/src/windows/widgets.c: 81
-# error(_("invalid '%s' argument"), "preselect")
-# src/library/utils/src/windows/widgets.c: 86
-# error(_("invalid '%s' argument"), "preselect")
-# src/library/utils/src/windows/util.c: 111
-# error(_("invalid '%s' argument"), "path")
-# src/library/utils/src/stubs.c: 48
-#  _("invalid '%s' argument")
-# src/library/utils/src/stubs.c: 68
-#  _("invalid '%s' argument")
-# src/main/objects.c: 1581
-# error("invalid '%s' argument", "flag")
-# src/main/objects.c: 1583
-# error("invalid '%s' argument", "complete")
-# src/main/dotcode.c: 478
-# error(_("invalid '%s' argument"), "symbol")
-# src/main/dotcode.c: 482
-# error(_("invalid '%s' argument"), "PACKAGE")
-# src/main/dotcode.c: 487
-# error(_("invalid '%s' argument"), "type")
-# src/main/paste.c: 96
-# error(_("invalid '%s' argument"), "collapse")
-# src/main/paste.c: 395
-# error(_("invalid '%s' argument"), "trim")
-# src/main/paste.c: 402
-# error(_("invalid '%s' argument"), "digits")
-# src/main/paste.c: 409
-# error(_("invalid '%s' argument"), "nsmall")
-# src/main/paste.c: 414
-# error(_("invalid '%s' argument"), "width")
-# src/main/paste.c: 419
-# error(_("invalid '%s' argument"), "justify")
-# src/main/paste.c: 424
-# error(_("invalid '%s' argument"), "na.encode")
-# src/main/paste.c: 427
-# error(_("invalid '%s' argument"), "scientific")
-# src/main/paste.c: 435
-# error(_("invalid '%s' argument"), "scientific")
-# src/main/paste.c: 601
-# error(_("invalid '%s' argument"), "digits")
-# src/main/paste.c: 606
-# error(_("invalid '%s' argument"), "nsmall")
-# src/main/attrib.c: 196
-# error(_("invalid '%s' argument"), "type")
-# src/main/saveload.c: 1950
-# error(_("invalid '%s' argument"), "version")
-# src/main/saveload.c: 1953
-# error(_("invalid '%s' argument"), "environment")
-# src/main/saveload.c: 1956
-# error(_("invalid '%s' argument"), "eval.promises")
-# src/main/saveload.c: 2072
-# error(_("invalid '%s' argument"), "envir")
-# src/main/saveload.c: 2252
-# error(_("invalid '%s' argument"), "version")
-# src/main/saveload.c: 2257
-# error(_("invalid '%s' argument"), "environment")
-# src/main/saveload.c: 2260
-# error(_("invalid '%s' argument"), "eval.promises")
-# src/main/saveload.c: 2366
-# error(_("invalid '%s' argument"), "envir")
-# src/main/array.c: 87
-# error(_("invalid '%s' argument"), "byrow")
-# src/main/array.c: 1137
-# error(_("invalid '%s' argument"), "perm")
-# src/main/array.c: 1263
-# error(_("invalid '%s' argument"), "n")
-# src/main/array.c: 1265
-# error(_("invalid '%s' argument"), "p")
-# src/main/array.c: 1266
-# error(_("invalid '%s' argument"), "na.rm")
-# src/main/array.c: 1592
-# error(_("invalid '%s' argument"), "k")
-# src/main/array.c: 1594
-# error(_("invalid '%s' argument"), "upper.tri")
-# src/main/array.c: 1596
-# error(_("invalid '%s' argument"), "transpose")
-# src/main/memory.c: 3736
-# error(_("invalid '%s' argument"), "filename")
-# src/main/unique.c: 966
-# error(_("invalid '%s' argument"), "duplicates.ok")
-# src/main/unique.c: 1289
-# error(_("invalid '%s' argument"), "call")
-# src/main/unique.c: 1349
-# error(_("invalid '%s' argument"), "definition")
-# src/main/unique.c: 1356
-# error(_("invalid '%s' argument"), "expand.dots")
-# src/main/unique.c: 1750
-# error(_("invalid '%s' argument"), "size")
-# src/main/grep.c: 767
-# error(_("invalid '%s' argument"), "pattern")
-# src/main/grep.c: 772
-# error(_("invalid '%s' argument"), "text")
-# src/main/grep.c: 1061
-# error(_("invalid '%s' argument"), "offset")
-# src/main/grep.c: 1063
-# error(_("invalid '%s' argument"), "pattern")
-# src/main/grep.c: 1065
-# error(_("invalid '%s' argument"), "text")
-# src/main/grep.c: 1510
-# error(_("invalid '%s' argument"), "pattern")
-# src/main/grep.c: 1514
-# error(_("invalid '%s' argument"), "replacement")
-# src/main/grep.c: 1519
-# error(_("invalid '%s' argument"), "text")
-# src/main/grep.c: 2323
-# error(_("invalid '%s' argument"), "pattern")
-# src/main/grep.c: 2328
-# error(_("invalid '%s' argument"), "text")
-# src/main/grep.c: 2621
-# error(_("invalid '%s' argument"), "pattern")
-# src/main/grep.c: 2626
-# error(_("invalid '%s' argument"), "text")
-# src/main/random.c: 478
-# error(_("invalid '%s' argument"), "replace")
-# src/main/random.c: 482
-# error(_("invalid '%s' argument"), "replace")
-# src/main/random.c: 489
-# error(_("invalid '%s' argument"), "size")
-# src/main/random.c: 517
-# error(_("invalid '%s' argument"), "size")
-# src/main/platform.c: 306
-# error(_("invalid '%s' argument"), "headers")
-# src/main/platform.c: 308
-# error(_("invalid '%s' argument"), "title")
-# src/main/platform.c: 310
-# error(_("invalid '%s' argument"), "pager")
-# src/main/platform.c: 326
-# error(_("invalid '%s' argument"), "headers")
-# src/main/platform.c: 337
-# error(_("invalid '%s' argument"), "pager")
-# src/main/platform.c: 390
-# error(_("invalid '%s' argument"), "file1")
-# src/main/platform.c: 392
-# error(_("invalid '%s' argument"), "file2")
-# src/main/platform.c: 705
-# error(_("invalid '%s' argument"), "from")
-# src/main/platform.c: 707
-# error(_("invalid '%s' argument"), "to")
-# src/main/platform.c: 1064
-# error(_("invalid '%s' argument"), "path")
-# src/main/platform.c: 1070
-# error(_("invalid '%s' argument"), "pattern")
-# src/main/platform.c: 1073
-# error(_("invalid '%s' argument"), "all.files")
-# src/main/platform.c: 1076
-# error(_("invalid '%s' argument"), "full.names")
-# src/main/platform.c: 1079
-# error(_("invalid '%s' argument"), "recursive")
-# src/main/platform.c: 1082
-# error(_("invalid '%s' argument"), "ignore.case")
-# src/main/platform.c: 1085
-# error(_("invalid '%s' argument"), "include.dirs")
-# src/main/platform.c: 1088
-# error(_("invalid '%s' argument"), "no..")
-# src/main/platform.c: 1185
-# error(_("invalid '%s' argument"), "directory")
-# src/main/platform.c: 1188
-# error(_("invalid '%s' argument"), "full.names")
-# src/main/platform.c: 1191
-# error(_("invalid '%s' argument"), "recursive")
-# src/main/platform.c: 1229
-# error(_("invalid '%s' argument"), "file")
-# src/main/platform.c: 1286
-# error(_("invalid '%s' argument"), "names")
-# src/main/platform.c: 1289
-# error(_("invalid '%s' argument"), "mode")
-# src/main/platform.c: 1498
-# error(_("invalid '%s' argument"), "x")
-# src/main/platform.c: 1501
-# error(_("invalid '%s' argument"), "recursive")
-# src/main/platform.c: 1504
-# error(_("invalid '%s' argument"), "force")
-# src/main/platform.c: 1540
-# error(_("invalid '%s' argument"), "x")
-# src/main/platform.c: 1543
-# error(_("invalid '%s' argument"), "recursive")
-# src/main/platform.c: 1546
-# error(_("invalid '%s' argument"), "force")
-# src/main/platform.c: 1629
-# error(_("invalid '%s' argument"), "dir")
-# src/main/platform.c: 1645
-# error(_("invalid '%s' argument"), "category")
-# src/main/platform.c: 1684
-# error(_("invalid '%s' argument"), "category")
-# src/main/platform.c: 1686
-# error(_("invalid '%s' argument"), "locale")
-# src/main/platform.c: 1757
-# error(_("invalid '%s' argument"), "category")
-# src/main/platform.c: 1841
-# error(_("invalid '%s' argument"), "path")
-# src/main/platform.c: 2116
-# error(_("invalid '%s' argument"), "path")
-# src/main/platform.c: 2176
-# error(_("invalid '%s' argument"), "path")
-# src/main/platform.c: 2353
-# error(_("invalid '%s' argument"), "from")
-# src/main/platform.c: 2356
-# error(_("invalid '%s' argument"), "to")
-# src/main/platform.c: 2359
-# error(_("invalid '%s' argument"), "over")
-# src/main/platform.c: 2362
-# error(_("invalid '%s' argument"), "recursive")
-# src/main/platform.c: 2365
-# error(_("invalid '%s' argument"), "copy.mode")
-# src/main/platform.c: 2368
-# error(_("invalid '%s' argument"), "copy.dates")
-# src/main/platform.c: 2568
-# error(_("invalid '%s' argument"), "from")
-# src/main/platform.c: 2571
-# error(_("invalid '%s' argument"), "to")
-# src/main/platform.c: 2574
-# error(_("invalid '%s' argument"), "over")
-# src/main/platform.c: 2577
-# error(_("invalid '%s' argument"), "recursive")
-# src/main/platform.c: 2580
-# error(_("invalid '%s' argument"), "copy.mode")
-# src/main/platform.c: 2583
-# error(_("invalid '%s' argument"), "copy.dates")
-# src/main/platform.c: 2657
-# error(_("invalid '%s' argument"), "paths")
-# src/main/platform.c: 2665
-# error(_("invalid '%s' argument"), "use_umask")
-# src/main/platform.c: 2701
-# error(_("invalid '%s' argument"), "paths")
-# src/main/platform.c: 2751
-# error(_("invalid '%s' argument"), "paths")
-# src/main/debug.c: 228
-#  _("invalid '%s' argument")
-# src/main/print.c: 242
-# error(_("invalid '%s' argument"), "digits")
-# src/main/print.c: 248
-# error(_("invalid '%s' argument"), "quote")
-# src/main/print.c: 270
-# error(_("invalid '%s' argument"), "right")
-# src/main/print.c: 276
-# error(_("invalid '%s' argument"), "max")
-# src/main/print.c: 283
-# error(_("invalid '%s' argument"), "useSource")
-# src/main/apply.c: 293
-# error(_("invalid '%s' argument"), "f")
-# src/main/apply.c: 295
-# error(_("invalid '%s' argument"), "classes")
-# src/main/apply.c: 298
-# error(_("invalid '%s' argument"), "how")
-# src/main/envir.c: 1618
-# error(_("invalid '%s' argument"), "envir")
-# src/main/envir.c: 1621
-# error(_("invalid '%s' argument"), "inherits")
-# src/main/envir.c: 1742
-# error(_("invalid '%s' argument"), "envir")
-# src/main/envir.c: 1747
-# error(_("invalid '%s' argument"), "inherits")
-# src/main/envir.c: 1813
-# error(_("invalid '%s' argument"), "envir")
-# src/main/envir.c: 1829
-# error(_("invalid '%s' argument"), "mode")
-# src/main/envir.c: 1835
-# error(_("invalid '%s' argument"), "inherits")
-# src/main/envir.c: 1932
-# error(_("invalid '%s' argument"), "mode")
-# src/main/envir.c: 1940
-# error(_("invalid '%s' argument"), "ifnotfound")
-# src/main/envir.c: 1947
-# error(_("invalid '%s' argument"), "inherits")
-# src/main/envir.c: 1958
-# error(_("invalid '%s' argument"), "mode")
-# src/main/envir.c: 2172
-# error(_("invalid '%s' argument"), "name")
-# src/main/envir.c: 2293
-# error(_("invalid '%s' argument"), "pos")
-# src/main/envir.c: 2552
-# error(_("invalid '%s' argument"), "envir")
-# src/main/envir.c: 2762
-#  _("invalid '%s' argument")
-# src/main/envir.c: 2776
-#  _("invalid '%s' argument")
-# src/main/envir.c: 2783
-#  _("invalid '%s' argument")
-# src/main/envir.c: 2799
-#  _("invalid '%s' argument")
-# src/main/envir.c: 3367
-# error(_("invalid '%s' argument"), "names")
-# src/main/builtin.c: 88
-#  _("invalid '%s' argument")
-# src/main/builtin.c: 97
-#  _("invalid '%s' argument")
-# src/main/builtin.c: 116
-# error(_("invalid '%s' argument"), "eval.env")
-# src/main/builtin.c: 118
-# error(_("invalid '%s' argument"), "assign.env")
-# src/main/builtin.c: 147
-#  _("invalid '%s' argument")
-# src/main/builtin.c: 534
-# error(_("invalid '%s' argument"), "fill")
-# src/main/builtin.c: 550
-# error(_("invalid '%s' argument"), "labels")
-# src/main/builtin.c: 739
-# error(_("invalid '%s' argument"), "length")
-# src/main/builtin.c: 741
-# error(_("invalid '%s' argument"), "length")
-# src/main/builtin.c: 743
-# error(_("invalid '%s' argument"), "mode")
-# src/main/datetime.c: 775
-# error(_("invalid '%s' argument"), "x")
-# src/main/datetime.c: 865
-# error(_("invalid '%s' argument"), "x")
-# src/main/datetime.c: 867
-# error(_("invalid '%s' argument"), "format")
-# src/main/datetime.c: 871
-# error(_("invalid '%s' argument"), "usetz")
-# src/main/datetime.c: 1026
-# error(_("invalid '%s' argument"), "x")
-# src/main/datetime.c: 1028
-# error(_("invalid '%s' argument"), "x")
-# src/main/datetime.c: 1232
-# error(_("invalid '%s' argument"), "x")
-# src/main/scan.c: 684
-# error(_("invalid '%s' argument"), "what")
-# src/main/scan.c: 853
-# error(_("invalid '%s' argument"), "encoding")
-# src/main/scan.c: 867
-# error(_("invalid '%s' argument"), "strip.white")
-# src/main/scan.c: 871
-# error(_("invalid '%s' argument"), "na.strings")
-# src/main/scan.c: 873
-# error(_("invalid '%s' argument"), "comment.char")
-# src/main/scan.c: 884
-# error(_("invalid '%s' argument"), "sep")
-# src/main/scan.c: 911
-# error(_("invalid '%s' argument"), "comment.char")
-# src/main/scan.c: 914
-# error(_("invalid '%s' argument"), "allowEscapes")
-# src/main/scan.c: 917
-# error(_("invalid '%s' argument"), "skipNul")
-# src/main/scan.c: 972
-# error(_("invalid '%s' argument"), "what")
-# src/main/deparse.c: 397
-# error(_("invalid '%s' argument"), "envir")
-# src/main/character.c: 139
-# error(_("invalid '%s' argument"), "type")
-# src/main/character.c: 142
-# error(_("invalid '%s' argument"), "type")
-# src/main/character.c: 203
-# error(_("invalid '%s' argument"), "type")
-# src/main/character.c: 1037
-# error(_("invalid '%s' argument"), "old")
-# src/main/character.c: 1041
-# error(_("invalid '%s' argument"), "new")
-# src/main/character.c: 1044
-# error("invalid '%s' argument", "x")
-# src/main/character.c: 1276
-# error(_("invalid '%s' argument"), "width")
-# src/main/character.c: 1280
-# error(_("invalid '%s' argument"), "width")
-# src/main/character.c: 1341
-# error(_("invalid '%s' argument"), "base")
-# src/main/character.c: 1344
-# error(_("invalid '%s' argument"), "base")
-# src/main/context.c: 596
-# error(_("invalid '%s' argument"), "n")
-# src/main/context.c: 605
-# error(_("invalid '%s' argument"), "which")
-# src/main/context.c: 609
-# error(_("invalid '%s' argument"), "which")
-# src/main/agrep.c: 131
-# error(_("invalid '%s' argument"), "pattern")
-# src/main/agrep.c: 135
-# error(_("invalid '%s' argument"), "x")
-# src/main/agrep.c: 775
-# error(_("invalid '%s' argument"), "pattern")
-# src/main/agrep.c: 780
-# error(_("invalid '%s' argument"), "text")
-# src/main/connections.c: 1217
-# error(_("invalid '%s' argument"), "description")
-# src/main/connections.c: 1223
-# error(_("invalid '%s' argument"), "open")
-# src/main/connections.c: 1226
-# error(_("invalid '%s' argument"), "block")
-# src/main/connections.c: 1230
-# error(_("invalid '%s' argument"), "encoding")
-# src/main/connections.c: 1375
-# error(_("invalid '%s' argument"), "description")
-# src/main/connections.c: 1391
-# error(_("invalid '%s' argument"), "open")
-# src/main/connections.c: 1396
-# error(_("invalid '%s' argument"), "encoding")
-# src/main/connections.c: 1996
-# error(_("invalid '%s' argument"), "description")
-# src/main/connections.c: 2002
-# error(_("invalid '%s' argument"), "open")
-# src/main/connections.c: 2006
-# error(_("invalid '%s' argument"), "encoding")
-# src/main/connections.c: 2010
-# error(_("invalid '%s' argument"), "compress")
-# src/main/connections.c: 2015
-# error(_("invalid '%s' argument"), "compress")
-# src/main/connections.c: 2665
-# error(_("invalid '%s' argument"), "description")
-# src/main/connections.c: 2670
-# error(_("invalid '%s' argument"), "open")
-# src/main/connections.c: 2673
-# error(_("invalid '%s' argument"), "open")
-# src/main/connections.c: 2676
-# error(_("invalid '%s' argument"), "raw")
-# src/main/connections.c: 3057
-# error(_("invalid '%s' argument"), "description")
-# src/main/connections.c: 3062
-# error(_("invalid '%s' argument"), "open")
-# src/main/connections.c: 3068
-# error(_("invalid '%s' argument"), "environment")
-# src/main/connections.c: 3071
-# error(_("invalid '%s' argument"), "encoding")
-# src/main/connections.c: 3075
-# error(_("invalid '%s' argument"), "text")
-# src/main/connections.c: 3090
-# error(_("invalid '%s' argument"), "text")
-# src/main/connections.c: 3140
-# error(_("invalid '%s' argument"), "host")
-# src/main/connections.c: 3145
-# error(_("invalid '%s' argument"), "port")
-# src/main/connections.c: 3149
-# error(_("invalid '%s' argument"), "server")
-# src/main/connections.c: 3153
-# error(_("invalid '%s' argument"), "blocking")
-# src/main/connections.c: 3157
-# error(_("invalid '%s' argument"), "open")
-# src/main/connections.c: 3163
-# error(_("invalid '%s' argument"), "encoding")
-# src/main/connections.c: 3210
-# error(_("invalid '%s' argument"), "description")
-# src/main/connections.c: 3216
-# error(_("invalid '%s' argument"), "open")
-# src/main/connections.c: 3220
-# error(_("invalid '%s' argument"), "encoding")
-# src/main/connections.c: 3270
-# error(_("invalid '%s' argument"), "open")
-# src/main/connections.c: 3273
-# error(_("invalid '%s' argument"), "blocking")
-# src/main/connections.c: 3547
-# error(_("invalid '%s' argument"), "n")
-# src/main/connections.c: 3550
-# error(_("invalid '%s' argument"), "ok")
-# src/main/connections.c: 3553
-# error(_("invalid '%s' argument"), "warn")
-# src/main/connections.c: 3559
-# error(_("invalid '%s' argument"), "skipNul")
-# src/main/connections.c: 3666
-# error(_("invalid '%s' argument"), "text")
-# src/main/connections.c: 3672
-# error(_("invalid '%s' argument"), "sep")
-# src/main/connections.c: 3675
-# error(_("invalid '%s' argument"), "useBytes")
-# src/main/connections.c: 3826
-# error(_("invalid '%s' argument"), "what")
-# src/main/connections.c: 3829
-# error(_("invalid '%s' argument"), "n")
-# src/main/connections.c: 3833
-# error(_("invalid '%s' argument"), "signed")
-# src/main/connections.c: 3836
-# error(_("invalid '%s' argument"), "swap")
-# src/main/connections.c: 3956
-# error(_("invalid '%s' argument"), "what")
-# src/main/connections.c: 4074
-# error(_("invalid '%s' argument"), "swap")
-# src/main/connections.c: 4077
-# error(_("invalid '%s' argument"), "useBytes")
-# src/main/connections.c: 4414
-# error(_("invalid '%s' argument"), "useBytes")
-# src/main/connections.c: 4439
-# error(_("invalid '%s' argument"), "nchars")
-# src/main/connections.c: 4474
-# error(_("invalid '%s' argument"), "object")
-# src/main/connections.c: 4489
-# error(_("invalid '%s' argument"), "useBytes")
-# src/main/connections.c: 4497
-# error(_("invalid '%s' argument"), "sep")
-# src/main/connections.c: 4523
-# error(_("invalid '%s' argument"), "nchars")
-# src/main/connections.c: 4669
-# error(_("invalid '%s' argument"), "data")
-# src/main/connections.c: 4673
-# error(_("invalid '%s' argument"), "newLine")
-# src/main/connections.c: 4801
-# error(_("invalid '%s' argument"), "closeOnExit")
-# src/main/connections.c: 4803
-# error(_("invalid '%s' argument"), "type")
-# src/main/connections.c: 4805
-# error(_("invalid '%s' argument"), "split")
-# src/main/connections.c: 4833
-# error(_("invalid '%s' argument"), "type")
-# src/main/connections.c: 4965
-# error(_("invalid '%s' argument"), "description")
-# src/main/connections.c: 4991
-# error(_("invalid '%s' argument"), "open")
-# src/main/connections.c: 4995
-# error(_("invalid '%s' argument"), "block")
-# src/main/connections.c: 4999
-# error(_("invalid '%s' argument"), "encoding")
-# src/main/connections.c: 5003
-# error(_("invalid '%s' argument"), "raw")
-# src/main/errors.c: 1030
-# error(_("invalid '%s' argument"), "n")
-# src/main/eval.c: 397
-# error(_("invalid '%s' argument"), "filename")
-# src/main/eval.c: 406
-# error(_("invalid '%s' argument"), "numfiles")
-# src/main/eval.c: 409
-# error(_("invalid '%s' argument"), "bufsize")
-# src/main/util.c: 577
-# error(_("invalid '%s' argument"), "xinds")
-# src/main/util.c: 580
-# error(_("invalid '%s' argument"), "yinds")
-# src/main/util.c: 1821
-# error(_("invalid '%s' argument"), this)
-# src/main/util.c: 1990
-# error(_("invalid '%s' argument"), "breaks")
-# src/main/util.c: 1991
-# error(_("invalid '%s' argument"), "right")
-# src/main/util.c: 1992
-# error(_("invalid '%s' argument"), "include.lowest")
-# src/main/util.c: 2009
-# error(_("invalid '%s' argument"), "nbin")
-# src/main/util.c: 2033
-# error(_("invalid '%s' argument"), "vec")
-# src/main/util.c: 2037
-# error(_("invalid '%s' argument"), "rightmost.closed")
-# src/main/util.c: 2039
-# error(_("invalid '%s' argument"), "all.inside")
-# src/main/util.c: 2064
-# error(_("invalid '%s' argument"), "l")
-# src/main/util.c: 2066
-# error(_("invalid '%s' argument"), "u")
-# src/main/util.c: 2068
-# error(_("invalid '%s' argument"), "n")
-# src/main/util.c: 2071
-# error(_("invalid '%s' argument"), "min.n")
-# src/main/util.c: 2074
-# error(_("invalid '%s' argument"), "shrink.sml")
-# src/main/util.c: 2078
-# error(_("invalid '%s' argument"), "high.u.bias")
-# src/main/util.c: 2080
-# error(_("invalid '%s' argument"), "u5.bias")
-# src/main/sort.c: 175
-#  _("invalid '%s' argument")
-# src/main/seq.c: 618
-#  _("invalid '%s' argument")
-# src/main/seq.c: 623
-#  _("invalid '%s' argument")
-# src/main/seq.c: 631
-#  _("invalid '%s' argument")
-# src/main/seq.c: 662
-#  _("invalid '%s' argument")
-# src/main/seq.c: 666
-#  _("invalid '%s' argument")
-# src/main/seq.c: 672
-#  _("invalid '%s' argument")
-# src/main/seq.c: 680
-#  _("invalid '%s' argument")
-# src/main/dounzip.c: 322
-# error(_("invalid '%s' argument"), "files")
-# src/main/dounzip.c: 329
-# error(_("invalid '%s' argument"), "exdir")
-# src/main/dounzip.c: 339
-# error(_("invalid '%s' argument"), "list")
-# src/main/dounzip.c: 344
-# error(_("invalid '%s' argument"), "overwrite")
-# src/main/dounzip.c: 348
-# error(_("invalid '%s' argument"), "junkpaths")
-# src/main/dounzip.c: 352
-# error(_("invalid '%s' argument"), "setTime")
-# src/main/sysutils.c: 585
-# error(_("invalid '%s' argument"), "from")
-# src/main/sysutils.c: 589
-# error(_("invalid '%s' argument"), "to")
-# src/main/sysutils.c: 593
-# error(_("invalid '%s' argument"), "sub")
-# src/main/sysutils.c: 599
-# error(_("invalid '%s' argument"), "mark")
-# src/main/sysutils.c: 603
-# error(_("invalid '%s' argument"), "toRaw")
-# src/main/sysutils.c: 1831
-# error(_("invalid '%s' argument"), "paths")
-# src/main/sysutils.c: 1835
-# error(_("invalid '%s' argument"), "dirmark")
-#: src/gnuwin32/extra.c:116 src/gnuwin32/extra.c:159 src/gnuwin32/extra.c:349
-#: src/gnuwin32/extra.c:577 src/gnuwin32/extra.c:602 src/main/agrep.c:131
-#: src/main/agrep.c:135 src/main/agrep.c:775 src/main/agrep.c:780
-#: src/main/apply.c:293 src/main/apply.c:295 src/main/apply.c:298
-#: src/main/array.c:87 src/main/array.c:1137 src/main/array.c:1263
-#: src/main/array.c:1265 src/main/array.c:1266 src/main/array.c:1592
-#: src/main/array.c:1594 src/main/array.c:1596 src/main/attrib.c:196
+#: src/gnuwin32/extra.c:116 src/gnuwin32/extra.c:158 src/gnuwin32/extra.c:348
+#: src/gnuwin32/extra.c:574 src/gnuwin32/extra.c:599 src/main/agrep.c:131
+#: src/main/agrep.c:135 src/main/agrep.c:776 src/main/agrep.c:781
+#: src/main/apply.c:330 src/main/apply.c:332 src/main/apply.c:335
+#: src/main/array.c:90 src/main/array.c:1272 src/main/array.c:1411
+#: src/main/array.c:1413 src/main/array.c:1414 src/main/array.c:1758
+#: src/main/array.c:1760 src/main/array.c:1762 src/main/attrib.c:190
 #: src/main/builtin.c:88 src/main/builtin.c:97 src/main/builtin.c:116
-#: src/main/builtin.c:118 src/main/builtin.c:147 src/main/builtin.c:534
-#: src/main/builtin.c:550 src/main/builtin.c:739 src/main/builtin.c:741
-#: src/main/builtin.c:743 src/main/character.c:139 src/main/character.c:142
-#: src/main/character.c:203 src/main/character.c:1037
-#: src/main/character.c:1041 src/main/character.c:1276
-#: src/main/character.c:1280 src/main/character.c:1341
-#: src/main/character.c:1344 src/main/connections.c:1217
-#: src/main/connections.c:1223 src/main/connections.c:1226
-#: src/main/connections.c:1230 src/main/connections.c:1375
-#: src/main/connections.c:1391 src/main/connections.c:1396
-#: src/main/connections.c:1996 src/main/connections.c:2002
-#: src/main/connections.c:2006 src/main/connections.c:2010
-#: src/main/connections.c:2015 src/main/connections.c:2665
-#: src/main/connections.c:2670 src/main/connections.c:2673
-#: src/main/connections.c:2676 src/main/connections.c:3057
-#: src/main/connections.c:3062 src/main/connections.c:3068
-#: src/main/connections.c:3071 src/main/connections.c:3075
-#: src/main/connections.c:3090 src/main/connections.c:3140
-#: src/main/connections.c:3145 src/main/connections.c:3149
-#: src/main/connections.c:3153 src/main/connections.c:3157
-#: src/main/connections.c:3163 src/main/connections.c:3210
-#: src/main/connections.c:3216 src/main/connections.c:3220
-#: src/main/connections.c:3270 src/main/connections.c:3273
-#: src/main/connections.c:3547 src/main/connections.c:3550
-#: src/main/connections.c:3553 src/main/connections.c:3559
-#: src/main/connections.c:3666 src/main/connections.c:3672
-#: src/main/connections.c:3675 src/main/connections.c:3826
-#: src/main/connections.c:3829 src/main/connections.c:3833
-#: src/main/connections.c:3836 src/main/connections.c:3956
-#: src/main/connections.c:4074 src/main/connections.c:4077
-#: src/main/connections.c:4414 src/main/connections.c:4439
-#: src/main/connections.c:4474 src/main/connections.c:4489
-#: src/main/connections.c:4497 src/main/connections.c:4523
-#: src/main/connections.c:4669 src/main/connections.c:4673
-#: src/main/connections.c:4801 src/main/connections.c:4803
-#: src/main/connections.c:4805 src/main/connections.c:4833
-#: src/main/connections.c:4965 src/main/connections.c:4991
-#: src/main/connections.c:4995 src/main/connections.c:4999
-#: src/main/connections.c:5003 src/main/context.c:596 src/main/context.c:605
-#: src/main/context.c:609 src/main/datetime.c:775 src/main/datetime.c:865
-#: src/main/datetime.c:867 src/main/datetime.c:871 src/main/datetime.c:1026
-#: src/main/datetime.c:1028 src/main/datetime.c:1232 src/main/debug.c:228
-#: src/main/deparse.c:397 src/main/dotcode.c:478 src/main/dotcode.c:482
-#: src/main/dotcode.c:487 src/main/dounzip.c:322 src/main/dounzip.c:329
-#: src/main/dounzip.c:339 src/main/dounzip.c:344 src/main/dounzip.c:348
-#: src/main/dounzip.c:352 src/main/envir.c:1618 src/main/envir.c:1621
-#: src/main/envir.c:1742 src/main/envir.c:1747 src/main/envir.c:1813
-#: src/main/envir.c:1829 src/main/envir.c:1835 src/main/envir.c:1932
-#: src/main/envir.c:1940 src/main/envir.c:1947 src/main/envir.c:1958
-#: src/main/envir.c:2172 src/main/envir.c:2293 src/main/envir.c:2552
-#: src/main/envir.c:2762 src/main/envir.c:2776 src/main/envir.c:2783
-#: src/main/envir.c:2799 src/main/envir.c:3367 src/main/errors.c:1030
-#: src/main/eval.c:397 src/main/eval.c:406 src/main/eval.c:409
-#: src/main/grep.c:767 src/main/grep.c:772 src/main/grep.c:1061
-#: src/main/grep.c:1063 src/main/grep.c:1065 src/main/grep.c:1510
-#: src/main/grep.c:1514 src/main/grep.c:1519 src/main/grep.c:2323
-#: src/main/grep.c:2328 src/main/grep.c:2621 src/main/grep.c:2626
-#: src/main/memory.c:3736 src/main/paste.c:96 src/main/paste.c:395
-#: src/main/paste.c:402 src/main/paste.c:409 src/main/paste.c:414
-#: src/main/paste.c:419 src/main/paste.c:424 src/main/paste.c:427
-#: src/main/paste.c:435 src/main/paste.c:601 src/main/paste.c:606
+#: src/main/builtin.c:118 src/main/builtin.c:149 src/main/builtin.c:569
+#: src/main/builtin.c:585 src/main/builtin.c:773 src/main/builtin.c:775
+#: src/main/builtin.c:777 src/main/character.c:237 src/main/character.c:240
+#: src/main/character.c:245 src/main/character.c:786 src/main/character.c:789
+#: src/main/character.c:1287 src/main/character.c:1291
+#: src/main/character.c:1526 src/main/character.c:1530
+#: src/main/character.c:1591 src/main/character.c:1594
+#: src/main/connections.c:1208 src/main/connections.c:1214
+#: src/main/connections.c:1217 src/main/connections.c:1221
+#: src/main/connections.c:1367 src/main/connections.c:1383
+#: src/main/connections.c:1388 src/main/connections.c:1989
+#: src/main/connections.c:1995 src/main/connections.c:1999
+#: src/main/connections.c:2003 src/main/connections.c:2008
+#: src/main/connections.c:2659 src/main/connections.c:2664
+#: src/main/connections.c:2667 src/main/connections.c:2670
+#: src/main/connections.c:3053 src/main/connections.c:3058
+#: src/main/connections.c:3064 src/main/connections.c:3067
+#: src/main/connections.c:3071 src/main/connections.c:3086
+#: src/main/connections.c:3135 src/main/connections.c:3140
+#: src/main/connections.c:3144 src/main/connections.c:3148
+#: src/main/connections.c:3152 src/main/connections.c:3158
+#: src/main/connections.c:3203 src/main/connections.c:3209
+#: src/main/connections.c:3213 src/main/connections.c:3264
+#: src/main/connections.c:3267 src/main/connections.c:3543
+#: src/main/connections.c:3546 src/main/connections.c:3549
+#: src/main/connections.c:3555 src/main/connections.c:3662
+#: src/main/connections.c:3668 src/main/connections.c:3671
+#: src/main/connections.c:3823 src/main/connections.c:3826
+#: src/main/connections.c:3830 src/main/connections.c:3833
+#: src/main/connections.c:3954 src/main/connections.c:4085
+#: src/main/connections.c:4088 src/main/connections.c:4425
+#: src/main/connections.c:4450 src/main/connections.c:4485
+#: src/main/connections.c:4500 src/main/connections.c:4508
+#: src/main/connections.c:4534 src/main/connections.c:4680
+#: src/main/connections.c:4684 src/main/connections.c:4814
+#: src/main/connections.c:4816 src/main/connections.c:4818
+#: src/main/connections.c:4846 src/main/connections.c:4980
+#: src/main/connections.c:5019 src/main/connections.c:5024
+#: src/main/connections.c:5029 src/main/connections.c:5050
+#: src/main/context.c:607 src/main/context.c:616 src/main/context.c:620
+#: src/main/datetime.c:781 src/main/datetime.c:869 src/main/datetime.c:872
+#: src/main/datetime.c:876 src/main/datetime.c:1043 src/main/datetime.c:1045
+#: src/main/datetime.c:1250 src/main/debug.c:245 src/main/deparse.c:408
+#: src/main/dotcode.c:496 src/main/dotcode.c:500 src/main/dotcode.c:505
+#: src/main/dounzip.c:323 src/main/dounzip.c:330 src/main/dounzip.c:340
+#: src/main/dounzip.c:345 src/main/dounzip.c:349 src/main/dounzip.c:353
+#: src/main/envir.c:1752 src/main/envir.c:1755 src/main/envir.c:1876
+#: src/main/envir.c:1881 src/main/envir.c:1945 src/main/envir.c:1961
+#: src/main/envir.c:1967 src/main/envir.c:2079 src/main/envir.c:2087
+#: src/main/envir.c:2094 src/main/envir.c:2105 src/main/envir.c:2337
+#: src/main/envir.c:2458 src/main/envir.c:2755 src/main/envir.c:3022
+#: src/main/envir.c:3036 src/main/envir.c:3043 src/main/envir.c:3059
+#: src/main/envir.c:3642 src/main/errors.c:1011 src/main/eval.c:454
+#: src/main/eval.c:463 src/main/eval.c:466 src/main/grep.c:780
+#: src/main/grep.c:785 src/main/grep.c:1079 src/main/grep.c:1081
+#: src/main/grep.c:1083 src/main/grep.c:1528 src/main/grep.c:1532
+#: src/main/grep.c:1537 src/main/grep.c:2345 src/main/grep.c:2350
+#: src/main/grep.c:2652 src/main/grep.c:2657 src/main/memory.c:3823
+#: src/main/paste.c:96 src/main/paste.c:392 src/main/paste.c:399
+#: src/main/paste.c:406 src/main/paste.c:411 src/main/paste.c:416
+#: src/main/paste.c:421 src/main/paste.c:424 src/main/paste.c:432
+#: src/main/paste.c:437 src/main/paste.c:619 src/main/paste.c:624
 #: src/main/platform.c:306 src/main/platform.c:308 src/main/platform.c:310
 #: src/main/platform.c:326 src/main/platform.c:337 src/main/platform.c:390
-#: src/main/platform.c:392 src/main/platform.c:705 src/main/platform.c:707
-#: src/main/platform.c:1064 src/main/platform.c:1070 src/main/platform.c:1073
-#: src/main/platform.c:1076 src/main/platform.c:1079 src/main/platform.c:1082
-#: src/main/platform.c:1085 src/main/platform.c:1088 src/main/platform.c:1185
-#: src/main/platform.c:1188 src/main/platform.c:1191 src/main/platform.c:1229
-#: src/main/platform.c:1286 src/main/platform.c:1289 src/main/platform.c:1498
-#: src/main/platform.c:1501 src/main/platform.c:1504 src/main/platform.c:1540
-#: src/main/platform.c:1543 src/main/platform.c:1546 src/main/platform.c:1629
-#: src/main/platform.c:1645 src/main/platform.c:1684 src/main/platform.c:1686
-#: src/main/platform.c:1757 src/main/platform.c:1841 src/main/platform.c:2116
-#: src/main/platform.c:2176 src/main/platform.c:2353 src/main/platform.c:2356
-#: src/main/platform.c:2359 src/main/platform.c:2362 src/main/platform.c:2365
-#: src/main/platform.c:2368 src/main/platform.c:2568 src/main/platform.c:2571
-#: src/main/platform.c:2574 src/main/platform.c:2577 src/main/platform.c:2580
-#: src/main/platform.c:2583 src/main/platform.c:2657 src/main/platform.c:2665
-#: src/main/platform.c:2701 src/main/platform.c:2751 src/main/print.c:242
-#: src/main/print.c:248 src/main/print.c:270 src/main/print.c:276
-#: src/main/print.c:283 src/main/random.c:478 src/main/random.c:482
-#: src/main/random.c:489 src/main/random.c:517 src/main/saveload.c:1950
-#: src/main/saveload.c:1953 src/main/saveload.c:1956 src/main/saveload.c:2072
-#: src/main/saveload.c:2252 src/main/saveload.c:2257 src/main/saveload.c:2260
+#: src/main/platform.c:392 src/main/platform.c:708 src/main/platform.c:710
+#: src/main/platform.c:800 src/main/platform.c:1138 src/main/platform.c:1144
+#: src/main/platform.c:1147 src/main/platform.c:1150 src/main/platform.c:1153
+#: src/main/platform.c:1156 src/main/platform.c:1159 src/main/platform.c:1162
+#: src/main/platform.c:1259 src/main/platform.c:1262 src/main/platform.c:1265
+#: src/main/platform.c:1303 src/main/platform.c:1361 src/main/platform.c:1364
+#: src/main/platform.c:1573 src/main/platform.c:1576 src/main/platform.c:1579
+#: src/main/platform.c:1615 src/main/platform.c:1618 src/main/platform.c:1621
+#: src/main/platform.c:1657 src/main/platform.c:1690 src/main/platform.c:1692
+#: src/main/platform.c:1763 src/main/platform.c:1848 src/main/platform.c:2089
+#: src/main/platform.c:2149 src/main/platform.c:2334 src/main/platform.c:2337
+#: src/main/platform.c:2340 src/main/platform.c:2343 src/main/platform.c:2346
+#: src/main/platform.c:2349 src/main/platform.c:2555 src/main/platform.c:2558
+#: src/main/platform.c:2561 src/main/platform.c:2564 src/main/platform.c:2567
+#: src/main/platform.c:2570 src/main/platform.c:2648 src/main/platform.c:2656
+#: src/main/platform.c:2692 src/main/platform.c:2742 src/main/print.c:235
+#: src/main/print.c:241 src/main/print.c:263 src/main/print.c:269
+#: src/main/print.c:276 src/main/random.c:470 src/main/random.c:474
+#: src/main/random.c:481 src/main/random.c:509 src/main/saveload.c:1952
+#: src/main/saveload.c:1955 src/main/saveload.c:1958 src/main/saveload.c:2074
+#: src/main/saveload.c:2254 src/main/saveload.c:2259 src/main/saveload.c:2262
 #: src/main/saveload.c:2366 src/main/scan.c:684 src/main/scan.c:853
 #: src/main/scan.c:867 src/main/scan.c:871 src/main/scan.c:873
 #: src/main/scan.c:884 src/main/scan.c:911 src/main/scan.c:914
-#: src/main/scan.c:917 src/main/scan.c:972 src/main/seq.c:618
-#: src/main/seq.c:623 src/main/seq.c:631 src/main/seq.c:662 src/main/seq.c:666
-#: src/main/seq.c:672 src/main/seq.c:680 src/main/sort.c:175
-#: src/main/sysutils.c:585 src/main/sysutils.c:589 src/main/sysutils.c:593
-#: src/main/sysutils.c:599 src/main/sysutils.c:603 src/main/sysutils.c:1831
-#: src/main/sysutils.c:1835 src/main/unique.c:966 src/main/unique.c:1289
-#: src/main/unique.c:1349 src/main/unique.c:1356 src/main/unique.c:1750
-#: src/main/util.c:581 src/main/util.c:584 src/main/util.c:1825
-#: src/main/util.c:1994 src/main/util.c:1995 src/main/util.c:1996
-#: src/main/util.c:2013 src/main/util.c:2037 src/main/util.c:2041
-#: src/main/util.c:2043 src/main/util.c:2068 src/main/util.c:2070
-#: src/main/util.c:2072 src/main/util.c:2075 src/main/util.c:2078
-#: src/main/util.c:2082 src/main/util.c:2084 src/modules/X11/devX11.c:3241
-#: src/modules/X11/devX11.c:3244 src/modules/X11/devX11.c:3247
-#: src/modules/X11/devX11.c:3271 src/modules/internet/internet.c:284
-#: src/modules/internet/internet.c:290 src/modules/internet/internet.c:296
-#: src/modules/internet/internet.c:299 src/modules/internet/internet.c:303
+#: src/main/scan.c:917 src/main/scan.c:972 src/main/seq.c:615
+#: src/main/seq.c:620 src/main/seq.c:628 src/main/seq.c:659 src/main/seq.c:663
+#: src/main/seq.c:669 src/main/seq.c:677 src/main/sort.c:175
+#: src/main/sysutils.c:597 src/main/sysutils.c:601 src/main/sysutils.c:605
+#: src/main/sysutils.c:611 src/main/sysutils.c:615 src/main/sysutils.c:1787
+#: src/main/sysutils.c:1791 src/main/unique.c:1029 src/main/unique.c:1337
+#: src/main/unique.c:1341 src/main/unique.c:1351 src/main/unique.c:1747
+#: src/main/util.c:636 src/main/util.c:639 src/main/util.c:1379
+#: src/main/util.c:1393 src/main/util.c:1975 src/main/util.c:2198
+#: src/main/util.c:2199 src/main/util.c:2200 src/main/util.c:2217
+#: src/main/util.c:2245 src/main/util.c:2249 src/main/util.c:2251
+#: src/main/util.c:2277 src/main/util.c:2279 src/main/util.c:2281
+#: src/main/util.c:2284 src/main/util.c:2287 src/main/util.c:2291
+#: src/main/util.c:2293 src/modules/X11/devX11.c:3247
+#: src/modules/X11/devX11.c:3250 src/modules/X11/devX11.c:3253
+#: src/modules/X11/devX11.c:3277 src/modules/internet/internet.c:453
+#: src/modules/internet/internet.c:459 src/modules/internet/internet.c:465
+#: src/modules/internet/internet.c:468 src/modules/internet/internet.c:472
+#: src/modules/internet/internet.c:477 src/modules/internet/libcurl.c:414
+#: src/modules/internet/libcurl.c:418 src/modules/internet/libcurl.c:423
+#: src/modules/internet/libcurl.c:426 src/modules/internet/libcurl.c:430
 #: src/modules/lapack/Lapack.c:155 src/modules/lapack/Lapack.c:261
 #: src/modules/lapack/Lapack.c:709 src/modules/lapack/Lapack.c:818
-#: src/modules/lapack/Lapack.c:880 src/modules/lapack/Lapack.c:1214
-#: src/unix/sys-std.c:1217 src/unix/sys-std.c:1240
+#: src/modules/lapack/Lapack.c:880 src/modules/lapack/Lapack.c:1215
+#: src/unix/sys-std.c:1223 src/unix/sys-std.c:1246
 #, c-format
 msgid "invalid '%s' argument"
 msgstr "niepoprawny argument '%s'"
 
-# src/gnuwin32/extra.c: 183
-# error(_("unsupported version of Windows"))
-# src/library/utils/src/windows/util.c: 41
-# error(_("unsupported version of Windows"))
 #: src/gnuwin32/extra.c:183
 msgid "unsupported version of Windows"
 msgstr "niewspierana wersja systemu Windows"
 
-# src/modules/lapack/Lapack.c: 939
-# error("invalid '%s' value", "pivot")
-# src/modules/X11/devX11.c: 3142
-#  _("invalid '%s' value")
-# src/modules/X11/devX11.c: 3169
-#  _("invalid '%s' value")
-# src/modules/X11/devX11.c: 3174
-#  _("invalid '%s' value")
-# src/modules/X11/devX11.c: 3179
-#  _("invalid '%s' value")
-# src/modules/X11/devX11.c: 3189
-#  _("invalid '%s' value")
-# src/modules/X11/devX11.c: 3194
-#  _("invalid '%s' value")
-# src/modules/X11/devX11.c: 3198
-#  _("invalid '%s' value")
-# src/modules/X11/devX11.c: 3202
-#  _("invalid '%s' value")
-# src/unix/sys-std.c: 1291
-#  _("invalid '%s' value")
-# src/gnuwin32/extra.c: 267
-#  _("invalid '%s' value")
-# src/library/tools/src/gramLatex.c: 2684
-# error(_("invalid '%s' value"), "verbose")
-# src/library/tools/src/gramRd.y: 1795
-# error(_("invalid '%s' value"), "verbose")
-# src/library/tools/src/gramRd.y: 1801
-# error(_("invalid '%s' value"), "warningCalls")
-# src/library/tools/src/gramLatex.y: 922
-# error(_("invalid '%s' value"), "verbose")
-# src/library/tools/src/gramRd.c: 4652
-# error(_("invalid '%s' value"), "verbose")
-# src/library/tools/src/gramRd.c: 4658
-# error(_("invalid '%s' value"), "warningCalls")
-# src/library/graphics/src/plot3d.c: 1163
-# error(_("invalid '%s' value"), "expand")
-# src/library/graphics/src/plot3d.c: 1167
-# error(_("invalid '%s' value"), "nticks")
-# src/library/graphics/src/plot3d.c: 1169
-# error(_("invalid '%s' value"), "ticktype")
-# src/library/graphics/src/plot3d.c: 1903
-# error(_("invalid '%s' value"), "method")
-# src/library/graphics/src/plot.c: 276
-# error(_("invalid '%s' value"), "cex")
-# src/library/graphics/src/plot.c: 290
-# error(_("invalid '%s' value"), "vfont")
-# src/library/graphics/src/plot.c: 481
-# error(_("invalid '%s' value"), "xlim")
-# src/library/graphics/src/plot.c: 486
-# error(_("invalid '%s' value"), "ylim")
-# src/library/graphics/src/plot.c: 2114
-# error(_("invalid '%s' value"), "adj")
-# src/library/graphics/src/plot.c: 2121
-# error(_("invalid '%s' value"), "pos")
-# src/library/graphics/src/plot.c: 3143
-# error(_("invalid '%s' value"), "tolerance")
-# src/library/graphics/src/plot.c: 3145
-# error(_("invalid '%s' value"), "plot")
-# src/library/graphics/src/plot.c: 3147
-# error(_("invalid '%s' value"), "atpen")
-# src/library/graphics/src/plot.c: 3302
-# error(_("invalid '%s' value"), "cex")
-# src/library/grDevices/src/colors.c: 537
-# error(_("invalid '%s' value"), "alpha")
-# src/library/grDevices/src/cairo/cairoBM.c: 501
-# error(_("invalid '%s' value"), "bg")
-# src/library/stats/src/optimize.c: 259
-# error(_("invalid '%s' value"), "xmin")
-# src/library/stats/src/optimize.c: 266
-# error(_("invalid '%s' value"), "xmax")
-# src/library/stats/src/optimize.c: 275
-# error(_("invalid '%s' value"), "tol")
-# src/library/stats/src/optimize.c: 355
-# error(_("invalid '%s' value"), "xmin")
-# src/library/stats/src/optimize.c: 360
-# error(_("invalid '%s' value"), "xmax")
-# src/library/stats/src/optimize.c: 376
-# error(_("invalid '%s' value"), "tol")
-# src/library/utils/src/windows/registry.c: 73
-# error(_("invalid '%s' value"),  "hive")
-# src/library/utils/src/windows/registry.c: 248
-# error(_("invalid '%s' value"),  "key")
-# src/library/utils/src/windows/registry.c: 251
-# error(_("invalid '%s' value"),  "hive")
-# src/library/utils/src/windows/registry.c: 254
-# error(_("invalid '%s' value"),  "maxdepth")
-# src/main/identical.c: 66
-# error(_("invalid '%s' value"), "num.eq")
-# src/main/identical.c: 67
-# error(_("invalid '%s' value"), "single.NA")
-# src/main/identical.c: 68
-# error(_("invalid '%s' value"), "attrib.as.set")
-# src/main/identical.c: 69
-# error(_("invalid '%s' value"), "ignore.bytecode")
-# src/main/identical.c: 70
-# error(_("invalid '%s' value"), "ignore.environment")
-# src/main/dotcode.c: 199
-#  _("invalid '%s' value")
-# src/main/apply.c: 105
-# error(_("invalid '%s' value"), "USE.NAMES")
-# src/main/datetime.c: 675
-# error(_("invalid '%s' value"), "tz")
-# src/main/datetime.c: 777
-# error(_("invalid '%s' value"), "tz")
-# src/main/datetime.c: 1030
-# error(_("invalid '%s' value"), "tz")
-# src/main/character.c: 595
-# error(_("invalid '%s' value"), "allow_")
-# src/main/context.c: 642
-# error(_("invalid '%s' value"), "which")
-# src/main/context.c: 661
-# error(_("invalid '%s' value"), "n")
-# src/main/connections.c: 3555
-# error(_("invalid '%s' value"), "encoding")
-# src/main/errors.c: 929
-#  _("invalid '%s' value")
-# src/main/errors.c: 962
-#  _("invalid '%s' value")
-# src/main/errors.c: 1065
-#  _("invalid '%s' value")
-# src/main/errors.c: 1090
-#  _("invalid '%s' value")
-# src/main/errors.c: 1095
-#  _("invalid '%s' value")
-# src/main/errors.c: 1368
-# error(_("invalid '%s' value"), "skip")
-# src/main/summary.c: 886
-# error(_("invalid '%s' value"), "na.rm")
-# src/main/util.c: 982
-# error(_("invalid '%s' value"), "width")
-# src/main/util.c: 987
-# error(_("invalid '%s' value"), "quote")
-# src/main/util.c: 994
-# error(_("invalid '%s' value"), "justify")
-# src/main/util.c: 997
-# error(_("invalid '%s' value"), "na.encode")
-# src/main/sort.c: 1224
-# error(_("invalid '%s' value"), "na.last")
-# src/main/sort.c: 1307
-# error(_("invalid '%s' value"), "length(xx)")
-# src/main/sort.c: 1311
-# error(_("invalid '%s' value"), "length(xx)")
-# src/main/sort.c: 1318
-# error(_("invalid '%s' value"), "length(xx)")
-# src/main/sort.c: 1393
-# error(_("invalid '%s' value"), "na.last")
-# src/main/seq.c: 185
-# error(_("invalid '%s' value"), "times")
-# src/main/seq.c: 341
-# error(_("invalid '%s' value"), "times")
-# src/main/seq.c: 346
-# error(_("invalid '%s' value"), "times")
-# src/main/seq.c: 350
-# error(_("invalid '%s' value"), "times")
-# src/main/seq.c: 391
-# error(_("invalid '%s' value"), "length.out")
-# src/main/seq.c: 395
-# error(_("invalid '%s' value"), "length.out")
-# src/main/seq.c: 399
-# error(_("invalid '%s' value"), "length.out")
-# src/main/source.c: 220
-# error(_("invalid '%s' value"), "encoding")
-# src/main/sysutils.c: 251
-# error(_("invalid '%s' value"), "tempdir")
-#: src/gnuwin32/extra.c:267 src/main/apply.c:105 src/main/character.c:595
-#: src/main/connections.c:3555 src/main/context.c:642 src/main/context.c:661
-#: src/main/datetime.c:675 src/main/datetime.c:777 src/main/datetime.c:1030
-#: src/main/dotcode.c:199 src/main/errors.c:929 src/main/errors.c:962
-#: src/main/errors.c:1065 src/main/errors.c:1090 src/main/errors.c:1095
-#: src/main/errors.c:1368 src/main/identical.c:66 src/main/identical.c:67
-#: src/main/identical.c:68 src/main/identical.c:69 src/main/identical.c:70
-#: src/main/seq.c:185 src/main/seq.c:341 src/main/seq.c:346 src/main/seq.c:350
-#: src/main/seq.c:391 src/main/seq.c:395 src/main/seq.c:399
-#: src/main/sort.c:1224 src/main/sort.c:1307 src/main/sort.c:1311
-#: src/main/sort.c:1318 src/main/sort.c:1393 src/main/source.c:220
-#: src/main/summary.c:886 src/main/sysutils.c:251 src/main/util.c:986
-#: src/main/util.c:991 src/main/util.c:998 src/main/util.c:1001
-#: src/modules/X11/devX11.c:3142 src/modules/X11/devX11.c:3169
-#: src/modules/X11/devX11.c:3174 src/modules/X11/devX11.c:3179
-#: src/modules/X11/devX11.c:3189 src/modules/X11/devX11.c:3194
-#: src/modules/X11/devX11.c:3198 src/modules/X11/devX11.c:3202
-#: src/unix/sys-std.c:1291
-#, c-format
-msgid "invalid '%s' value"
-msgstr "niepoprawna wartość '%s'"
-
-# src/gnuwin32/extra.c: 308
-# error(_("incorrect argument"))
-# src/gnuwin32/extra.c: 321
-# error(_("incorrect argument"))
-#: src/gnuwin32/extra.c:308 src/gnuwin32/extra.c:321
+#: src/gnuwin32/extra.c:313 src/gnuwin32/extra.c:324
 msgid "incorrect argument"
 msgstr "niepoprawny argument"
 
-# src/gnuwin32/extra.c: 312
-# error(_("don't be silly!: your machine has a 4Gb address limit"))
-#: src/gnuwin32/extra.c:312
+#: src/gnuwin32/extra.c:316
 msgid "don't be silly!: your machine has a 4Gb address limit"
 msgstr "nie bądź niemądry!: twoja maszyna posiada limit 4Gb pamięci adresowej"
 
-# src/gnuwin32/extra.c: 316
-# warning(_("cannot decrease memory limit: ignored"))
-#: src/gnuwin32/extra.c:316
+#: src/gnuwin32/extra.c:320
 msgid "cannot decrease memory limit: ignored"
 msgstr "nie można zmniejszyć limitu pamięci: zignorowano"
 
-# src/gnuwin32/extra.c: 428
-#  _("'path' must be a character vector")
-# src/gnuwin32/extra.c: 529
-# error(_("'path' must be a character vector"))
-# src/main/util.c: 893
-# error(_("'path' must be a character vector"))
-#: src/gnuwin32/extra.c:428 src/gnuwin32/extra.c:529 src/main/util.c:897
+#: src/gnuwin32/extra.c:427 src/gnuwin32/extra.c:528 src/main/util.c:962
 msgid "'path' must be a character vector"
 msgstr "'path' musi być wektorem tekstowym"
 
-# src/gnuwin32/extra.c: 579
-# error(_("invalid device"))
-# src/gnuwin32/extra.c: 581
-# error(_("invalid device"))
-# src/gnuwin32/extra.c: 604
-# error(_("invalid device"))
-# src/gnuwin32/extra.c: 606
-# error(_("invalid device"))
-# src/gnuwin32/extra.c: 641
-# error(_("invalid device"))
-# src/library/utils/src/windows/dataentry.c: 282
-# error(G_("invalid device"))
-# src/library/utils/src/windows/dataentry.c: 1891
-# error(G_("invalid device"))
-# src/main/gevents.c: 61
-#  _("invalid device")
-# src/main/gevents.c: 98
-#  _("invalid device")
-#: src/gnuwin32/extra.c:579 src/gnuwin32/extra.c:581 src/gnuwin32/extra.c:604
-#: src/gnuwin32/extra.c:606 src/gnuwin32/extra.c:641 src/main/gevents.c:61
+#: src/gnuwin32/extra.c:576 src/gnuwin32/extra.c:578 src/gnuwin32/extra.c:601
+#: src/gnuwin32/extra.c:603 src/gnuwin32/extra.c:638 src/main/gevents.c:61
 #: src/main/gevents.c:98
 msgid "invalid device"
 msgstr "niepoprawne urządzenie"
 
-# src/gnuwin32/extra.c: 582
-# error(_("requires SDI mode"))
-#: src/gnuwin32/extra.c:582
+#: src/gnuwin32/extra.c:579
 msgid "requires SDI mode"
 msgstr "tryb SDI jest wymagany"
 
-# src/gnuwin32/extra.c: 635
-# error(_("invalid graphical device number"))
-# src/main/gevents.c: 58
-# error(_("invalid graphical device number"))
-# src/main/gevents.c: 95
-# error(_("invalid graphical device number"))
-#: src/gnuwin32/extra.c:635 src/main/gevents.c:58 src/main/gevents.c:95
+#: src/gnuwin32/extra.c:632 src/main/gevents.c:58 src/main/gevents.c:95
 msgid "invalid graphical device number"
 msgstr "niepoprawny numer urządzenia graficznego"
 
-# src/gnuwin32/extra.c: 645
-# error(_("bad device"))
-#: src/gnuwin32/extra.c:645
+#: src/gnuwin32/extra.c:642
 msgid "bad device"
 msgstr "złe urządzenie"
 
-# src/gnuwin32/extra.c: 799
-# error(_("invalid input in 'Rmbstowcs'"))
-# src/gnuwin32/extra.c: 807
-# error(_("invalid input in 'Rmbstowcs'"))
-#: src/gnuwin32/extra.c:799 src/gnuwin32/extra.c:807
+#: src/gnuwin32/extra.c:796 src/gnuwin32/extra.c:804
 msgid "invalid input in 'Rmbstowcs'"
 msgstr "niepoprawne wejście w 'Rmbstowcs'"
 
-# src/gnuwin32/extra.c: 830
-# error(_("file choice cancelled"))
-# src/main/platform.c: 1261
-# error(_("file choice cancelled"))
-#: src/gnuwin32/extra.c:830 src/main/platform.c:1261
+#: src/gnuwin32/extra.c:827 src/main/platform.c:1336
 msgid "file choice cancelled"
 msgstr "anulowano wybór pliku"
 
-# src/gnuwin32/run.c: 242
-#  _("'CreateProcess' failed to run '%s'")
-#: src/gnuwin32/run.c:242
+#: src/gnuwin32/run.c:244
 #, c-format
 msgid "'CreateProcess' failed to run '%s'"
 msgstr "'CreateProcess' nie potrafił uruchomić '%s'"
 
-# src/gnuwin32/run.c: 344
-# (_("Child process not responding.  R will terminate it."))
-#: src/gnuwin32/run.c:344
+#: src/gnuwin32/run.c:346
 msgid "Child process not responding.  R will terminate it."
 msgstr "Proces pochodny nie odpowiada. R przerwie go."
 
-# src/gnuwin32/run.c: 402
-#  _("Exit code was %d")
-#: src/gnuwin32/run.c:402
+#: src/gnuwin32/run.c:404
 #, c-format
 msgid "Exit code was %d"
 msgstr "Kodem wyjścia była wartość %d"
 
-# src/gnuwin32/run.c: 434
-#  _("Insufficient memory (rpipeOpen)")
-#: src/gnuwin32/run.c:434
+#: src/gnuwin32/run.c:436
 msgid "Insufficient memory (rpipeOpen)"
 msgstr "Niewystarczająca ilość pamięci (rpipeOpen)"
 
-# src/gnuwin32/run.c: 648
-# error(_("seek not enabled for this connection"))
-# src/main/dounzip.c: 482
-# error(_("seek not enabled for this connection"))
-#: src/gnuwin32/run.c:648 src/main/dounzip.c:482
+#: src/gnuwin32/run.c:650 src/main/dounzip.c:481
 msgid "seek not enabled for this connection"
 msgstr "przeszukwanie nie jest udostępnione dla tego połączenia"
 
-# src/gnuwin32/run.c: 654
-# error(_("truncate not enabled for this connection"))
-#: src/gnuwin32/run.c:654
+#: src/gnuwin32/run.c:656
 msgid "truncate not enabled for this connection"
 msgstr "obcięcie nie jest udostępnione dla tego połączenia"
 
-# src/gnuwin32/run.c: 729
-# error(_("allocation of pipe connection failed"))
-# src/gnuwin32/run.c: 733
-# error(_("allocation of pipe connection failed"))
-# src/gnuwin32/run.c: 746
-# error(_("allocation of pipe connection failed"))
-# src/gnuwin32/run.c: 774
-# error(_("allocation of pipe connection failed"))
-# src/main/connections.c: 1330
-# error(_("allocation of pipe connection failed"))
-# src/main/connections.c: 1334
-# error(_("allocation of pipe connection failed"))
-# src/main/connections.c: 1340
-# error(_("allocation of pipe connection failed"))
-# src/main/connections.c: 1354
-# error(_("allocation of pipe connection failed"))
-#: src/gnuwin32/run.c:729 src/gnuwin32/run.c:733 src/gnuwin32/run.c:746
-#: src/gnuwin32/run.c:774 src/main/connections.c:1330
-#: src/main/connections.c:1334 src/main/connections.c:1340
-#: src/main/connections.c:1354
+#: src/gnuwin32/run.c:731 src/gnuwin32/run.c:735 src/gnuwin32/run.c:748
+#: src/gnuwin32/run.c:776 src/main/connections.c:1322
+#: src/main/connections.c:1326 src/main/connections.c:1332
+#: src/main/connections.c:1346
 msgid "allocation of pipe connection failed"
 msgstr "przydział połączenia potokowego nie powiódł się"
 
-# src/gnuwin32/run.c: 788
-# error(_("'names' is not a character vector"))
-#: src/gnuwin32/run.c:788
+#: src/gnuwin32/run.c:790
 msgid "'names' is not a character vector"
 msgstr "argument 'names' nie jest wektorem tekstowym"
 
-# src/gnuwin32/sys-win32.c: 182
-#  _("character string expected as first argument")
-#: src/gnuwin32/sys-win32.c:182
+#: src/gnuwin32/sys-win32.c:180
 msgid "character string expected as first argument"
 msgstr "oczekiwano łańcucha tekstowego jako pierwszego argumentu"
 
-# src/gnuwin32/sys-win32.c: 191
-#  _("character string expected as third argument")
-#: src/gnuwin32/sys-win32.c:191
+#: src/gnuwin32/sys-win32.c:189
 msgid "character string expected as third argument"
 msgstr "oczekiwano łańcucha tekstowego jako trzeciego argumentu"
 
-# src/unix/sys-unix.c: 298
-# warningcall(R_NilValue, 
-# 			    _("running command '%s' had status %d"), 
-# 			    cmd, res)
-# src/gnuwin32/sys-win32.c: 256
-# warningcall(R_NilValue, 
-# 		    _("running command '%s' had status %d"), 
-# 		    CHAR(STRING_ELT(cmd, 0)), ll)
-#: src/gnuwin32/sys-win32.c:257 src/unix/sys-unix.c:299
+#: src/gnuwin32/sys-win32.c:255 src/unix/sys-unix.c:312
 #, c-format
 msgid "running command '%s' had status %d"
 msgstr "uruchomione polecenie '%s' otrzymało status %d"
 
-# src/unix/sys-unix.c: 427
-# error(_("reached session elapsed time limit"))
-# src/gnuwin32/system.c: 122
-# error(_("reached session elapsed time limit"))
-#: src/gnuwin32/system.c:122 src/unix/sys-unix.c:427
+#: src/gnuwin32/system.c:121 src/unix/sys-unix.c:440
 msgid "reached session elapsed time limit"
 msgstr "osiągnięto limit czasu sesji"
 
-# src/unix/sys-unix.c: 429
-# error(_("reached elapsed time limit"))
-# src/gnuwin32/system.c: 124
-# error(_("reached elapsed time limit"))
-#: src/gnuwin32/system.c:124 src/unix/sys-unix.c:429
+#: src/gnuwin32/system.c:123 src/unix/sys-unix.c:442
 msgid "reached elapsed time limit"
 msgstr "osiągnięto limit czasu"
 
-# src/unix/sys-unix.c: 435
-# error(_("reached session CPU time limit"))
-# src/gnuwin32/system.c: 130
-# error(_("reached session CPU time limit"))
-#: src/gnuwin32/system.c:130 src/unix/sys-unix.c:435
+#: src/gnuwin32/system.c:129 src/unix/sys-unix.c:448
 msgid "reached session CPU time limit"
 msgstr "osiągnięto limit czasu sesji CPU"
 
-# src/unix/sys-unix.c: 437
-# error(_("reached CPU time limit"))
-# src/gnuwin32/system.c: 132
-# error(_("reached CPU time limit"))
-#: src/gnuwin32/system.c:132 src/unix/sys-unix.c:437
+#: src/gnuwin32/system.c:131 src/unix/sys-unix.c:450
 msgid "reached CPU time limit"
 msgstr "osiągnięto limit czasu CPU"
 
-#: src/gnuwin32/system.c:157
+#: src/gnuwin32/system.c:156
 #, c-format
 msgid "Fatal error: %s\n"
 msgstr "Błąd krytyczny: %s\n"
 
-# src/unix/sys-std.c: 863
-# error(_("encoding '%s' is not recognised"), R_StdinEnc)
-# src/gnuwin32/system.c: 335
-# error(_("encoding '%s' is not recognised"), R_StdinEnc)
-#: src/gnuwin32/system.c:335 src/unix/sys-std.c:863
+#: src/gnuwin32/system.c:334 src/unix/sys-std.c:866
 #, c-format
 msgid "encoding '%s' is not recognised"
 msgstr "kodowanie '%s' nie zostało rozpoznane"
 
-#: src/gnuwin32/system.c:341 src/unix/sys-std.c:869
+#: src/gnuwin32/system.c:340 src/unix/sys-std.c:872
 #, c-format
 msgid "<ERROR: re-encoding failure from encoding '%s'>\n"
 msgstr "<BŁĄD: ponowne kodowanie nie powiodło się dla kodowania '%s'>\n"
 
-# src/unix/system.c: 323
-#  _("cannot open file '%s': %s")
-# src/unix/system.c: 343
-#  _("cannot open file '%s': %s")
-# src/gnuwin32/system.c: 555
-#  _("cannot open file '%s': %s")
-# src/gnuwin32/system.c: 1049
-#  _("cannot open file '%s': %s")
-# src/gnuwin32/system.c: 1061
-#  _("cannot open file '%s': %s")
-# src/main/saveload.c: 1961
-# error(_("cannot open file '%s': %s"), cfile, strerror(errno))
-# src/main/serialize.c: 2552
-# error( _("cannot open file '%s': %s"), CHAR(STRING_ELT(file, 0)),
-# 	       strerror(errno))
-# src/main/serialize.c: 2557
-# error( _("cannot open file '%s': %s"), CHAR(STRING_ELT(file, 0)),
-# 	       strerror(errno))
-# src/main/serialize.c: 2642
-# error(_("cannot open file '%s': %s"), cfile, strerror(errno))
-# src/main/serialize.c: 2687
-# error(_("cannot open file '%s': %s"), cfile, strerror(errno))
-# src/main/connections.c: 590
-# warning(_("cannot open file '%s': %s"), name,
-# 		"fdopen is not supported on this platform")
-# src/main/connections.c: 595
-# warning(_("cannot open file '%s': %s"), name, strerror(errno))
-# src/main/dounzip.c: 177
-# error(_("cannot open file '%s': %s"), outname, strerror(serrno))
-#: src/gnuwin32/system.c:555 src/gnuwin32/system.c:1049
-#: src/gnuwin32/system.c:1061 src/main/connections.c:590
-#: src/main/connections.c:595 src/main/dounzip.c:177 src/main/saveload.c:1961
-#: src/main/serialize.c:2552 src/main/serialize.c:2557
-#: src/main/serialize.c:2642 src/main/serialize.c:2687 src/unix/system.c:323
-#: src/unix/system.c:343
+#: src/gnuwin32/system.c:562 src/gnuwin32/system.c:1058
+#: src/gnuwin32/system.c:1070 src/main/connections.c:581
+#: src/main/connections.c:586 src/main/dounzip.c:178 src/main/saveload.c:1963
+#: src/main/serialize.c:2598 src/main/serialize.c:2603
+#: src/main/serialize.c:2688 src/main/serialize.c:2733 src/unix/system.c:328
 #, c-format
 msgid "cannot open file '%s': %s"
 msgstr "nie można otworzyć pliku '%s': %s"
 
-#: src/gnuwin32/system.c:569
+#: src/gnuwin32/system.c:576
 #, c-format
 msgid "file.show(): file '%s' does not exist\n"
 msgstr "file.show(): plik '%s' nie istnieje\n"
 
-#: src/gnuwin32/system.c:970
+#: src/gnuwin32/system.c:979
 #, c-format
 msgid "WARNING: R_MAX_MEM_SIZE value is invalid: ignored\n"
 msgstr "OSTRZEŻENIE: wartość R_MAX_MEM_SIZE jest niepoprawna: zignorowano\n"
 
-#: src/gnuwin32/system.c:1002
+#: src/gnuwin32/system.c:1011
 msgid "WARNING: no max-mem-size given\n"
 msgstr "OSTRZEŻENIE: nie podano max-mem-size\n"
 
-#: src/gnuwin32/system.c:1009
+#: src/gnuwin32/system.c:1018
 #, c-format
 msgid "WARNING: --max-mem-size value is invalid: ignored\n"
 msgstr "OSTRZEŻENIE: wartość --max-mem-size jest niepoprawna: zignorowano\n"
 
-#: src/gnuwin32/system.c:1012
+#: src/gnuwin32/system.c:1021
 #, c-format
 msgid "WARNING: --max-mem-size=%lu%c: too large and ignored\n"
 msgstr ""
 "OSTRZEŻENIE: --max-mem-size=%lu%c: wartość zbyt duża została zignorowana\n"
 
-#: src/gnuwin32/system.c:1018
+#: src/gnuwin32/system.c:1027
 #, c-format
 msgid "WARNING: --max-mem-size=%4.1fM: too small and ignored\n"
 msgstr ""
 "OSTRZEŻENIE: --max-mem-size=%4.1fM: wartość zbyt mała została zignorowano\n"
 
-#: src/gnuwin32/system.c:1023
+#: src/gnuwin32/system.c:1032
 #, c-format
 msgid "WARNING: --max-mem-size=%4.0fM: too large and taken as %uM\n"
 msgstr ""
 "OSTRZEŻENIE: --max-mem-size=%4.0fM: wartość zbyt duża została wzięta jako "
 "%uM\n"
 
-# src/gnuwin32/system.c: 1039
-#  _("option '%s' requires an argument")
-#: src/gnuwin32/system.c:1039
+#: src/gnuwin32/system.c:1048
 #, c-format
 msgid "option '%s' requires an argument"
 msgstr "opcja '%s' wymaga argumentu"
 
-# src/gnuwin32/system.c: 1070
-#  _("option '%s' requires a non-empty argument")
-#: src/gnuwin32/system.c:1070
+#: src/gnuwin32/system.c:1079
 #, c-format
 msgid "option '%s' requires a non-empty argument"
 msgstr "opcja '%s' wymaga niepustego argumentu"
 
-#: src/gnuwin32/system.c:1078 src/unix/system.c:362
+#: src/gnuwin32/system.c:1087 src/unix/system.c:347
 #, c-format
 msgid "WARNING: '-e %s' omitted as input is too long\n"
 msgstr "OSTRZEŻENIE: '-e %s' pominięto ponieważ wejście jest zbyt długie\n"
 
-#: src/gnuwin32/system.c:1082 src/unix/system.c:375
+#: src/gnuwin32/system.c:1091 src/unix/system.c:360
 #, c-format
 msgid "WARNING: unknown option '%s'\n"
 msgstr "OSTRZEŻENIE: nieznana opcja '%s'\n"
 
-#: src/gnuwin32/system.c:1104 src/unix/system.c:379
+#: src/gnuwin32/system.c:1113 src/unix/system.c:364
 #, c-format
 msgid "ARGUMENT '%s' __ignored__\n"
 msgstr "ARGUMENT '%s' __zignorowano__\n"
 
-# src/unix/system.c: 386
-# (_("cannot use -e with -f or --file"))
-# src/gnuwin32/system.c: 1110
-# (_("cannot use -e with -f or --file"))
-#: src/gnuwin32/system.c:1110 src/unix/system.c:386
+#: src/gnuwin32/system.c:1119 src/unix/system.c:371
 msgid "cannot use -e with -f or --file"
 msgstr "nie można użyć -e razem z -f lub --file"
 
-# src/gnuwin32/system.c: 1128
-# (_("creation of tmpfile failed -- set TMPDIR suitably?"))
-#: src/gnuwin32/system.c:1128
+#: src/gnuwin32/system.c:1137
 msgid "creation of tmpfile failed -- set TMPDIR suitably?"
 msgstr ""
 "utworzenie pliku 'tmpfile' nie powiodło się -- ustawić 'TMPDIR' odpowiednio?"
 
-# src/unix/system.c: 437
-# (_("you must specify '--save', '--no-save' or '--vanilla'"))
-# src/gnuwin32/system.c: 1147
-# (_("you must specify '--save', '--no-save' or '--vanilla'"))
-#: src/gnuwin32/system.c:1147 src/unix/system.c:437
+#: src/gnuwin32/system.c:1156 src/unix/system.c:422
 msgid "you must specify '--save', '--no-save' or '--vanilla'"
 msgstr "musisz określić '--save', '--no-save' lub '--vanilla'"
 
-# src/gnuwin32/system.c: 1152
-# (_("impossible to create 'reader thread'; you must free some system resources"))
-#: src/gnuwin32/system.c:1152
+#: src/gnuwin32/system.c:1161
 msgid ""
 "impossible to create 'reader thread'; you must free some system resources"
 msgstr ""
 "nie można utworzyć 'reader thread'; musisz zwolnić część zasobów systemowych"
 
-# src/include/Errormsg.h: 25
-# 	_("subscript out of bounds")
-# src/library/utils/R/citation.R: 567
-# warning("subscript out of bounds")
-# src/main/subscript.c: 375
-#  _("subscript out of bounds")
-# src/main/subscript.c: 393
-#  _("subscript out of bounds")
-# src/main/subscript.c: 417
-#  _("subscript out of bounds")
-# src/main/subscript.c: 456
-#  _("subscript out of bounds")
-# src/main/subscript.c: 584
-#  _("subscript out of bounds")
-# src/main/subscript.c: 623
-#  _("subscript out of bounds")
-# src/main/subscript.c: 766
-#  _("subscript out of bounds")
-#: src/include/Errormsg.h:25 src/main/subscript.c:375 src/main/subscript.c:393
-#: src/main/subscript.c:417 src/main/subscript.c:456 src/main/subscript.c:584
-#: src/main/subscript.c:623 src/main/subscript.c:766
+#: src/include/Errormsg.h:27 src/main/subscript.c:383 src/main/subscript.c:401
+#: src/main/subscript.c:425 src/main/subscript.c:464 src/main/subscript.c:662
+#: src/main/subscript.c:701 src/main/subscript.c:844
 msgid "subscript out of bounds"
 msgstr "indeks jest poza granicami"
 
-# src/include/Errormsg.h: 26
-#  _("object of type '%s' is not subsettable")
-#: src/include/Errormsg.h:26
+#: src/include/Errormsg.h:28
 #, c-format
 msgid "object of type '%s' is not subsettable"
 msgstr "obiekt typu '%s' nie jest ustawialny"
 
-# src/main/CommandLineArgs.c: 170
-# (_("WARNING: no value given for --encoding"))
-#: src/main/CommandLineArgs.c:170
+#: src/main/CommandLineArgs.c:171
 msgid "WARNING: no value given for --encoding"
 msgstr "OSTRZEŻENIE: nie podano wartości dla --encoding"
 
-# src/main/CommandLineArgs.c: 195
-#  _("WARNING: option '%s' no longer supported")
-#: src/main/CommandLineArgs.c:195
+#: src/main/CommandLineArgs.c:196
 #, c-format
 msgid "WARNING: option '%s' no longer supported"
 msgstr "OSTRZEŻENIE: opcja '%s' nie jest już wspierana"
 
-# src/main/CommandLineArgs.c: 206
-#  _("WARNING: no value given for '%s'")
-#: src/main/CommandLineArgs.c:206
+#: src/main/CommandLineArgs.c:207
 #, c-format
 msgid "WARNING: no value given for '%s'"
 msgstr "OSTRZEŻENIE: nie podano wartości dla '%s'"
 
-# src/main/CommandLineArgs.c: 216
-#  _("WARNING: '%s' value is invalid: ignored")
-#: src/main/CommandLineArgs.c:216
+#: src/main/CommandLineArgs.c:217
 #, c-format
 msgid "WARNING: '%s' value is invalid: ignored"
 msgstr "OSTRZEŻENIE: wartość '%s' jest niepoprawna: zignorowano"
 
-# src/main/CommandLineArgs.c: 219
-# sprintf(msg,
-# 				_("WARNING: %s: too large and ignored"),
-# 				*av)
-#: src/main/CommandLineArgs.c:220
+#: src/main/CommandLineArgs.c:221
 #, c-format
 msgid "WARNING: %s: too large and ignored"
 msgstr "OSTRZEŻENIE: %s: zignorowano zbyt dużą wartość"
 
-# src/main/CommandLineArgs.c: 234
-# (_("WARNING: no value given for '--max-ppsize'"))
-#: src/main/CommandLineArgs.c:234
+#: src/main/CommandLineArgs.c:235
 msgid "WARNING: no value given for '--max-ppsize'"
 msgstr "OSTRZEŻENIE: nie podano wartości dla '--max-ppsize'"
 
-# src/main/CommandLineArgs.c: 239
-# (_("WARNING: '--max-ppsize' value is negative: ignored"))
-#: src/main/CommandLineArgs.c:239
+#: src/main/CommandLineArgs.c:240
 msgid "WARNING: '--max-ppsize' value is negative: ignored"
 msgstr "OSTRZEŻENIE: wartość '--max-ppsize' jest ujemna: zignorowano"
 
-# src/main/CommandLineArgs.c: 241
-# (_("WARNING: '--max-ppsize' value is too small: ignored"))
-#: src/main/CommandLineArgs.c:241
+#: src/main/CommandLineArgs.c:242
 msgid "WARNING: '--max-ppsize' value is too small: ignored"
 msgstr "OSTRZEŻENIE: wartość '--max-ppsize' jest zbyt mała: zignorowano"
 
-# src/main/CommandLineArgs.c: 244
-# (_("WARNING: '--max-ppsize' value is too large: ignored"))
-#: src/main/CommandLineArgs.c:244
+#: src/main/CommandLineArgs.c:245
 msgid "WARNING: '--max-ppsize' value is too large: ignored"
 msgstr "OSTRZEŻENIE: wartość '--max-ppsize' jest zbyt duża: zignorowano"
 
-# src/main/RNG.c: 175
-# error(_("unif_rand: unimplemented RNG kind %d"), RNG_kind)
-#: src/main/RNG.c:175
+#: src/main/RNG.c:176
 #, c-format
 msgid "unif_rand: unimplemented RNG kind %d"
 msgstr "unif_rand: niezaimplementowany rodzaj %d RNG"
 
-# src/main/RNG.c: 260
-# error(_("FixupSeeds: unimplemented RNG kind %d"), RNG_kind)
-#: src/main/RNG.c:260
+#: src/main/RNG.c:261
 #, c-format
 msgid "FixupSeeds: unimplemented RNG kind %d"
 msgstr "FixupSeeds: niezaimplementowany rodzaj %d RNG"
 
-# src/main/RNG.c: 302
-# error(_("'user_unif_rand' not in load table"))
-#: src/main/RNG.c:302
+#: src/main/RNG.c:301
 msgid "'user_unif_rand' not in load table"
 msgstr "'user_unif_rand' nie jest w tabeli startowej"
 
-# src/main/RNG.c: 310
-# warning(_("cannot read seeds unless 'user_unif_nseed' is supplied"))
-#: src/main/RNG.c:310
+#: src/main/RNG.c:309
 msgid "cannot read seeds unless 'user_unif_nseed' is supplied"
 msgstr ""
 "nie można odczytać ziaren dopóki 'user_unif_nseed' nie jest dostarczone"
 
-# src/main/RNG.c: 315
-# warning(_("seed length must be in 0...625; ignored"))
-#: src/main/RNG.c:315
+#: src/main/RNG.c:314
 msgid "seed length must be in 0...625; ignored"
 msgstr "długość 'seed' musi być pomiędzy 0...625; zignorowano"
 
-# src/main/RNG.c: 323
-# error(_("RNG_Init: unimplemented RNG kind %d"), kind)
-#: src/main/RNG.c:323
+#: src/main/RNG.c:322
 #, c-format
 msgid "RNG_Init: unimplemented RNG kind %d"
 msgstr "RNG_Init: niezaimplementowany rodzaj %d RNG"
 
-# src/main/RNG.c: 354
-# error(_("'.Random.seed' is a missing argument with no default"))
-#: src/main/RNG.c:354
+#: src/main/RNG.c:351
 msgid "'.Random.seed' is a missing argument with no default"
 msgstr ""
 "brakuje argumentu 'Random.seed', a nie ma określonej wartości domyślnej"
 
-# src/main/RNG.c: 355
-# warning(_("'.Random.seed' is not an integer vector but of type '%s', so ignored"),
-# 		type2char(TYPEOF(seeds)))
-#: src/main/RNG.c:355
+#: src/main/RNG.c:352
 #, c-format
 msgid "'.Random.seed' is not an integer vector but of type '%s', so ignored"
 msgstr ""
 "'.Random.seed' nie jest wektorem typu liczb całkowitych lecz typu '%s', tak "
 "więc został zignorowany"
 
-# src/main/RNG.c: 363
-# warning(_("'.Random.seed[1]' is not a valid integer, so ignored"))
-#: src/main/RNG.c:363
+#: src/main/RNG.c:360
 msgid "'.Random.seed[1]' is not a valid integer, so ignored"
 msgstr ""
 "'.Random.seed[1]' nie jest poprawną liczbą całkowitą, więc został zignorowany"
 
-# src/main/RNG.c: 369
-# warning(_("'.Random.seed[1]' is not a valid Normal type, so ignored"))
-#: src/main/RNG.c:369
+#: src/main/RNG.c:366
 msgid "'.Random.seed[1]' is not a valid Normal type, so ignored"
 msgstr ""
 "'.Random.seed[1]' nie jest poprawnym typem Normal, więc został zignorowany"
 
-# src/main/RNG.c: 383
-# warning(_("'.Random.seed[1] = 5' but no user-supplied generator, so ignored"))
-#: src/main/RNG.c:383
+#: src/main/RNG.c:380
 msgid "'.Random.seed[1] = 5' but no user-supplied generator, so ignored"
 msgstr ""
 "'.Random.seed[1] = 5', ale brak generatora dostarczonego przez użytkownika, "
 "więc został zignorowany"
 
-# src/main/RNG.c: 388
-# warning(_("'.Random.seed[1]' is not a valid RNG kind so ignored"))
-#: src/main/RNG.c:388
+#: src/main/RNG.c:385
 msgid "'.Random.seed[1]' is not a valid RNG kind so ignored"
 msgstr ""
 "'.Random.seed[1]' nie jest poprawnym rodzajem RNG (kod), więc został "
 "zignorowany"
 
-# src/main/RNG.c: 415
-# error(_("'.Random.seed' has wrong length"))
-#: src/main/RNG.c:415
+#: src/main/RNG.c:412
 msgid "'.Random.seed' has wrong length"
 msgstr "'.Random.seed' posiada złą długość"
 
-# src/main/RNG.c: 468
-# error(_("RNGkind: unimplemented RNG kind %d"), newkind)
-#: src/main/RNG.c:468
+#: src/main/RNG.c:465
 #, c-format
 msgid "RNGkind: unimplemented RNG kind %d"
 msgstr "RNGkind: niezaimplementowany rodzaj %d RNG"
 
-# src/main/RNG.c: 488
-# error(_("invalid Normal type in 'RNGkind'"))
-#: src/main/RNG.c:488
+#: src/main/RNG.c:485
 msgid "invalid Normal type in 'RNGkind'"
 msgstr "niepoprawny typ Normal w 'RNGkind'"
 
-# src/main/RNG.c: 491
-# error(_("'user_norm_rand' not in load table"))
-#: src/main/RNG.c:491
+#: src/main/RNG.c:488
 msgid "'user_norm_rand' not in load table"
 msgstr "'user_norm_rand' nie jest w tablicy startowej"
 
-# src/main/RNG.c: 535
-# error(_("supplied seed is not a valid integer"))
-#: src/main/RNG.c:535
+#: src/main/RNG.c:532
 msgid "supplied seed is not a valid integer"
 msgstr "podane ziarno nie jest poprawną liczbą całkowitą"
 
-# src/main/Rdynload.c: 248
-# error(_("R_RegisterRoutines called with invalid DllInfo object."))
 #: src/main/Rdynload.c:248
 msgid "R_RegisterRoutines called with invalid DllInfo object."
 msgstr "R_RegisterRoutines wezwane z niepoprawnym obiektem DllInfo."
 
-# src/main/Rdynload.c: 533
-#  _("`maximal number of DLLs reached...")
 #: src/main/Rdynload.c:533
 msgid "`maximal number of DLLs reached..."
 msgstr "osiągnięto maksymalną liczbę plików DLL..."
 
-# src/main/Rdynload.c: 590
-#  _("could not allocate space for 'path'")
 #: src/main/Rdynload.c:590
 msgid "could not allocate space for 'path'"
 msgstr "nie można przydzielić miejsca dla 'path'"
 
-# src/main/Rdynload.c: 602
-# error(_("DLLname '%s' is too long"), p)
 #: src/main/Rdynload.c:602
 #, c-format
 msgid "DLLname '%s' is too long"
 msgstr "Nazwa pliku DLL '%s' jest zbyt długa"
 
-# src/main/Rdynload.c: 623
-#  _("could not allocate space for 'name'")
 #: src/main/Rdynload.c:623
 msgid "could not allocate space for 'name'"
 msgstr "nie można przydzielić miejsca dla 'name'"
 
-# src/main/Rdynload.c: 881
-# error(_("character argument expected"))
-# src/main/Rdynload.c: 897
-# error(_("character argument expected"))
-# src/main/util.c: 694
-# error(_("character argument expected"))
-#: src/main/Rdynload.c:881 src/main/Rdynload.c:897 src/main/util.c:698
+#: src/main/Rdynload.c:881 src/main/Rdynload.c:897 src/main/util.c:762
 msgid "character argument expected"
 msgstr "oczekiwano argumentu tekstowego"
 
-# src/main/Rdynload.c: 887
-# error(_("unable to load shared object '%s':\n  %s"), buf, DLLerror)
-# src/main/Rdynload.c: 919
-# warning(_("unable to load shared object '%s':\n  %s"),
-# 		dllpath, DLLerror)
-# src/main/Rdynload.c: 939
-# warning(_("unable to load shared object '%s':\n  %s"),
-# 		dllpath, DLLerror)
 #: src/main/Rdynload.c:887 src/main/Rdynload.c:919 src/main/Rdynload.c:939
 #, c-format
 msgid ""
@@ -1895,544 +635,318 @@ msgstr ""
 "nie można załadować współdzielonego obiektu  '%s':\n"
 "  %s"
 
-# src/main/Rdynload.c: 900
-# error(_("shared object '%s\' was not loaded"), buf)
 #: src/main/Rdynload.c:900
 #, c-format
 msgid "shared object '%s' was not loaded"
 msgstr "współdzielony obiekt '%s' nie został załadowany"
 
-# src/main/Rdynload.c: 979
-# error(_("cannot allocate memory for registered native symbol (%d bytes)"),
-# 	      (int) sizeof(R_RegisteredNativeSymbol))
 #: src/main/Rdynload.c:979
 #, c-format
-msgid "cannot allocate memory for registered native symbol (%d bytes)"
-msgstr ""
-"nie można przydzielić pamięci dla zarejestrowanego naturalnego znaku "
-"(bajtów: %d)"
-
-# src/main/Rdynload.c: 1100
-# error(_("must pass package name or DllInfo reference"))
-# src/main/Rdynload.c: 1321
-# error(_("must pass package name or DllInfo reference"))
-#: src/main/Rdynload.c:1100 src/main/Rdynload.c:1321
+msgid "cannot allocate memory for registered native symbol (%d byte)"
+msgid_plural "cannot allocate memory for registered native symbol (%d bytes)"
+msgstr[0] ""
+"nie można przydzielić pamięci dla zarejestrowanego naturalnego znaku (%d "
+"bajt)"
+msgstr[1] ""
+"nie można przydzielić pamięci dla zarejestrowanego naturalnego znaku (%d "
+"bajty)"
+msgstr[2] ""
+"nie można przydzielić pamięci dla zarejestrowanego naturalnego znaku (%d "
+"bajtów)"
+
+#: src/main/Rdynload.c:1102 src/main/Rdynload.c:1323
 msgid "must pass package name or DllInfo reference"
 msgstr "potrzeba przekazać nazwę pakietu lub łącze do DllInfo"
 
-# src/main/Rdynload.c: 1197
-# error(_("unimplemented type %d in 'createRSymbolObject'"),
-# 		  symbol->type)
-#: src/main/Rdynload.c:1197
+#: src/main/Rdynload.c:1199
 #, c-format
 msgid "unimplemented type %d in 'createRSymbolObject'"
 msgstr "niezaimplementowany typ %d w 'createRSymbolObject'"
 
-# src/main/Rdynload.c: 1279
-# error(_("R_getRegisteredRoutines() expects a DllInfo reference"))
-# src/main/Rdynload.c: 1373
-# error(_("R_getRegisteredRoutines() expects a DllInfo reference"))
-#: src/main/Rdynload.c:1279 src/main/Rdynload.c:1373
+#: src/main/Rdynload.c:1281 src/main/Rdynload.c:1375
 msgid "R_getRegisteredRoutines() expects a DllInfo reference"
 msgstr "R_getRegisteredRoutines() oczekuje łącza DllInfo"
 
-# src/main/Rdynload.c: 1282
-# error(_("NULL value passed for DllInfo"))
-# src/main/Rdynload.c: 1376
-# error(_("NULL value passed for DllInfo"))
-#: src/main/Rdynload.c:1282 src/main/Rdynload.c:1376
+#: src/main/Rdynload.c:1284 src/main/Rdynload.c:1378
 msgid "NULL value passed for DllInfo"
 msgstr "wartość NULL przekazana do DllInfo"
 
-# src/main/Rdynload.c: 1436
-# error(_("function '%s' not provided by package '%s'"), name, package)
-#: src/main/Rdynload.c:1436
+#: src/main/Rdynload.c:1441
 #, c-format
 msgid "function '%s' not provided by package '%s'"
 msgstr "funkcja '%s' nie jest dostarczona przez pakiet '%s'"
 
-# src/main/Rdynload.c: 1438
-# error(_("table entry must be an external pointer"))
-#: src/main/Rdynload.c:1438
+#: src/main/Rdynload.c:1443
 msgid "table entry must be an external pointer"
 msgstr "wpis w tabeli musi być wskaźnikiem zewnętrznym"
 
-# src/main/Renviron.c: 158
-# warningcall(R_NilValue,
-# 		    _("problem in setting variable '%s' in Renviron"), a)
-# src/main/Renviron.c: 163
-# warningcall(R_NilValue,
-# 		    _("problem in setting variable '%s' in Renviron"), a)
 #: src/main/Renviron.c:159 src/main/Renviron.c:164
 #, c-format
 msgid "problem in setting variable '%s' in Renviron"
 msgstr "problem z ustawieniem zmiennej '%s' w środowisku R"
 
-# src/main/Renviron.c: 311
-#  _("argument 'x' must be a character string")
-#: src/main/Renviron.c:311
-msgid "argument 'x' must be a character string"
-msgstr "argument 'x' musi być łańcuchem tekstowym"
+#: src/main/Renviron.c:311 src/main/objects.c:1174 src/main/raw.c:155
+#, c-format
+msgid "argument '%s' must be a character string"
+msgstr "argument '%s' musi być łańcuchem tekstowym"
 
-# src/main/Renviron.c: 315
-# warningcall(call, _("file '%s' cannot be opened for reading"), fn)
 #: src/main/Renviron.c:315
 #, c-format
 msgid "file '%s' cannot be opened for reading"
 msgstr "plik '%s' nie może zostać otwarty do odczytu"
 
-# src/main/Rstrptime.h: 517
-# error(_("use of %s for input is not supported"), "%Z")
-# src/main/Rstrptime.h: 984
-# error(_("use of %s for input is not supported"), "%Z")
-#: src/main/Rstrptime.h:517 src/main/Rstrptime.h:984
+#: src/main/Rstrptime.h:524 src/main/Rstrptime.h:991
 #, c-format
 msgid "use of %s for input is not supported"
 msgstr "użycie '%s' jako wejścia nie jest wspierane"
 
-# src/main/Rstrptime.h: 1242
-# error(_("input string is too long"))
-#: src/main/Rstrptime.h:1242
+#: src/main/Rstrptime.h:1263
 msgid "input string is too long"
 msgstr "łąńcuch wejściowy jest zbyt długi"
 
-# src/main/Rstrptime.h: 1244
-# error(_("invalid multibyte input string"))
-#: src/main/Rstrptime.h:1244
+#: src/main/Rstrptime.h:1265
 msgid "invalid multibyte input string"
 msgstr "niepoprawny wielobajtowy łańcuch wejściowy"
 
-# src/main/Rstrptime.h: 1247
-# error(_("format string is too long"))
-#: src/main/Rstrptime.h:1247
+#: src/main/Rstrptime.h:1268
 msgid "format string is too long"
 msgstr "łańcuch formatujący jest zbyt długi"
 
-# src/main/Rstrptime.h: 1249
-# error(_("invalid multibyte format string"))
-#: src/main/Rstrptime.h:1249
+#: src/main/Rstrptime.h:1270
 msgid "invalid multibyte format string"
 msgstr "niepoprawny wielobajtowy łańcuch formatujący"
 
-# src/main/grep.c: 769
-# warning(_("argument '%s' has length > 1 and only the first element will be used"), "pattern")
-# src/main/grep.c: 1512
-# warning(_("argument '%s' has length > 1 and only the first element will be used"), "pattern")
-# src/main/grep.c: 1516
-# warning(_("argument '%s' has length > 1 and only the first element will be used"), "replacement")
-# src/main/grep.c: 2325
-# warning(_("argument '%s' has length > 1 and only the first element will be used"), "pattern")
-# src/main/grep.c: 2623
-# warning(_("argument '%s' has length > 1 and only the first element will be used"), "pattern")
-# src/main/character.c: 1039
-# warning(_("argument '%s' has length > 1 and only the first element will be used"), "old")
-# src/main/character.c: 1043
-# warning(_("argument '%s' has length > 1 and only the first element will be used"), "new")
-# src/main/agrep.c: 133
-# warning(_("argument '%s' has length > 1 and only the first element will be used"), "pattern")
-# src/main/agrep.c: 777
-# warning(_("argument '%s' has length > 1 and only the first element will be used"), "pattern")
-#: src/main/agrep.c:133 src/main/agrep.c:777 src/main/character.c:1039
-#: src/main/character.c:1043 src/main/grep.c:769 src/main/grep.c:1512
-#: src/main/grep.c:1516 src/main/grep.c:2325 src/main/grep.c:2623
+#: src/main/agrep.c:133 src/main/agrep.c:778 src/main/character.c:1289
+#: src/main/character.c:1293 src/main/grep.c:782 src/main/grep.c:1530
+#: src/main/grep.c:1534 src/main/grep.c:2347 src/main/grep.c:2654
 #, c-format
 msgid "argument '%s' has length > 1 and only the first element will be used"
 msgstr "argument '%s' ma długość > 1 i tylko pierwszy element zostanie użyty"
 
-# src/main/agrep.c: 189
-# error(_("'pattern' must be a non-empty character string"))
-# src/main/agrep.c: 818
-# error(_("'pattern' must be a non-empty character string"))
-#: src/main/agrep.c:189 src/main/agrep.c:818
+#: src/main/agrep.c:190 src/main/agrep.c:820
 msgid "'pattern' must be a non-empty character string"
 msgstr "argument 'pattern' musi być niepustym łańcuchem tekstowym"
 
-# src/main/grep.c: 838
-# error(_("regular expression is invalid in this locale"))
-# src/main/grep.c: 2381
-# error(_("regular expression is invalid in this locale"))
-# src/main/grep.c: 2662
-# error(_("regular expression is invalid in this locale"))
-# src/main/agrep.c: 200
-# error(_("regular expression is invalid in this locale"))
-# src/main/agrep.c: 827
-# error(_("regular expression is invalid in this locale"))
-#: src/main/agrep.c:200 src/main/agrep.c:827 src/main/grep.c:838
-#: src/main/grep.c:2381 src/main/grep.c:2662
+#: src/main/agrep.c:201 src/main/agrep.c:829 src/main/grep.c:853
+#: src/main/grep.c:2405 src/main/grep.c:2707
 msgid "regular expression is invalid in this locale"
 msgstr "niepoprawne wyrażenie regularne w lokalizacji"
 
-# src/main/grep.c: 2668
-# error(_("regcomp error: '%s'"), errbuf)
-# src/main/agrep.c: 206
-# error(_("regcomp error:  '%s'"), errbuf)
-# src/main/agrep.c: 623
-# error(_("regcomp error:  '%s'"), errbuf)
-# src/main/agrep.c: 833
-# error(_("regcomp error: '%s'"), errbuf)
-#: src/main/agrep.c:206 src/main/agrep.c:623
+#: src/main/agrep.c:207 src/main/agrep.c:624
 #, c-format
 msgid "regcomp error:  '%s'"
 msgstr "błąd regcomp:  '%s'"
 
-# src/main/grep.c: 227
-# warning(_("input string %d is invalid in this locale"), i+1)
-# src/main/grep.c: 315
-# warning(_("input string %d is invalid in this locale"), i+1)
-# src/main/grep.c: 423
-# warning(_("input string %d is invalid in this locale"), i+1)
-# src/main/grep.c: 578
-# warning(_("input string %d is invalid in this locale"), i+1)
-# src/main/grep.c: 889
-# warning(_("input string %d is invalid in this locale"), i+1)
-# src/main/grep.c: 1644
-# error(("input string %d is invalid in this locale"), i+1)
-# src/main/grep.c: 2480
-# warning(_("input string %d is invalid in this locale"), i+1)
-# src/main/grep.c: 2548
-# warning(_("input string %d is invalid in this locale"),
-# 				i+1)
-# src/main/grep.c: 2698
-# error(_("input string %d is invalid in this locale"),
-# 			  i + 1)
-# src/main/agrep.c: 238
-# error(_("input string %d is invalid in this locale"), i+1)
-# src/main/agrep.c: 871
-# error(_("input string %d is invalid in this locale"),
-# 			  i + 1)
-#: src/main/agrep.c:238 src/main/agrep.c:871 src/main/grep.c:227
-#: src/main/grep.c:315 src/main/grep.c:423 src/main/grep.c:578
-#: src/main/grep.c:889 src/main/grep.c:2480 src/main/grep.c:2548
-#: src/main/grep.c:2698
+#: src/main/agrep.c:239 src/main/agrep.c:874 src/main/grep.c:233
+#: src/main/grep.c:323 src/main/grep.c:434 src/main/grep.c:590
+#: src/main/grep.c:907 src/main/grep.c:2510 src/main/grep.c:2579
+#: src/main/grep.c:2744
 #, c-format
 msgid "input string %d is invalid in this locale"
 msgstr "niepoprawny łańcuch wejściowy %d w lokalizacji"
 
-# src/main/grep.c: 155
-# warning(_("argument '%s' will be ignored"), "perl = TRUE")
-# src/main/grep.c: 760
-# warning(_("argument '%s' will be ignored"), "ignore.case = TRUE")
-# src/main/grep.c: 762
-# warning(_("argument '%s' will be ignored"), "perl = TRUE")
-# src/main/grep.c: 1047
-# warning(_("argument '%s' will be ignored"), "ignore.case = TRUE")
-# src/main/grep.c: 1055
-# warning(_("argument '%s' will be ignored"), "invert = TRUE")
-# src/main/grep.c: 1503
-# warning(_("argument '%s' will be ignored"), "ignore.case = TRUE")
-# src/main/grep.c: 1505
-# warning(_("argument '%s' will be ignored"), "perl = TRUE")
-# src/main/grep.c: 2315
-# warning(_("argument '%s' will be ignored"), "ignore.case = TRUE")
-# src/main/grep.c: 2317
-# warning(_("argument '%s' will be ignored"), "perl = TRUE")
-# src/main/grep.c: 2611
-# warning(_("argument '%s' will be ignored"),
-# 		"ignore.case = TRUE")
-# src/main/agrep.c: 525
-# warning(_("argument '%s' will be ignored"), "partial = FALSE")
-# src/main/agrep.c: 765
-# warning(_("argument '%s' will be ignored"),
-# 		"ignore.case = TRUE")
-#: src/main/agrep.c:525 src/main/agrep.c:765 src/main/grep.c:155
-#: src/main/grep.c:760 src/main/grep.c:762 src/main/grep.c:1047
-#: src/main/grep.c:1055 src/main/grep.c:1503 src/main/grep.c:1505
-#: src/main/grep.c:2315 src/main/grep.c:2317 src/main/grep.c:2611
+#: src/main/agrep.c:526 src/main/agrep.c:766 src/main/grep.c:159
+#: src/main/grep.c:773 src/main/grep.c:775 src/main/grep.c:1065
+#: src/main/grep.c:1073 src/main/grep.c:1521 src/main/grep.c:1523
+#: src/main/grep.c:2337 src/main/grep.c:2339 src/main/grep.c:2642
 #, c-format
 msgid "argument '%s' will be ignored"
 msgstr "argument '%s' zostanie zignorowany"
 
-# src/main/agrep.c: 614
-# error(_("input string x[%d] is invalid in this locale"),
-# 			  i + 1)
-#: src/main/agrep.c:614
+#: src/main/agrep.c:615
 #, c-format
 msgid "input string x[%d] is invalid in this locale"
 msgstr "wejściowy łańcuch tekstowy x[%d] jest niepoprawny w lokalizacji"
 
-# src/main/agrep.c: 660
-# error(_("input string y[%d] is invalid in this locale"),
-# 				  j + 1)
-#: src/main/agrep.c:660
+#: src/main/agrep.c:661
 #, c-format
 msgid "input string y[%d] is invalid in this locale"
 msgstr "wejściowy łańcuch tekstowy y[%d] jest niepoprawny w lokalizacji"
 
-# src/main/grep.c: 2668
-# error(_("regcomp error: '%s'"), errbuf)
-# src/main/agrep.c: 206
-# error(_("regcomp error:  '%s'"), errbuf)
-# src/main/agrep.c: 623
-# error(_("regcomp error:  '%s'"), errbuf)
-# src/main/agrep.c: 833
-# error(_("regcomp error: '%s'"), errbuf)
-#: src/main/agrep.c:833 src/main/grep.c:2668
+#: src/main/agrep.c:835 src/main/grep.c:2713
 #, c-format
 msgid "regcomp error: '%s'"
 msgstr "błąd regcomp: '%s'"
 
-# src/main/apply.c: 103
-# error(_("'FUN.VALUE' must be a vector"))
-#: src/main/apply.c:103
+#: src/main/apply.c:98
 msgid "'FUN.VALUE' must be a vector"
 msgstr "'FUN.VALUE' musi być wektorem"
 
-# src/main/apply.c: 108
-# error(_("invalid length"))
-# src/main/complex.c: 758
-# error(_("invalid length"))
-#: src/main/apply.c:108 src/main/complex.c:758
+#: src/main/apply.c:100 src/main/array.c:506 src/main/character.c:845
+#: src/main/character.c:1653 src/main/connections.c:3551 src/main/context.c:653
+#: src/main/context.c:672 src/main/datetime.c:681 src/main/datetime.c:783
+#: src/main/datetime.c:1047 src/main/dotcode.c:222 src/main/errors.c:910
+#: src/main/errors.c:943 src/main/errors.c:1049 src/main/errors.c:1074
+#: src/main/errors.c:1079 src/main/errors.c:1349 src/main/identical.c:66
+#: src/main/identical.c:67 src/main/identical.c:68 src/main/identical.c:69
+#: src/main/identical.c:70 src/main/platform.c:2982 src/main/seq.c:192
+#: src/main/seq.c:340 src/main/seq.c:345 src/main/seq.c:349 src/main/seq.c:390
+#: src/main/seq.c:394 src/main/seq.c:398 src/main/sort.c:1244
+#: src/main/sort.c:1327 src/main/sort.c:1331 src/main/sort.c:1338
+#: src/main/source.c:225 src/main/summary.c:954 src/main/sysutils.c:250
+#: src/main/util.c:1051 src/main/util.c:1056 src/main/util.c:1063
+#: src/main/util.c:1066 src/main/util.c:2035 src/modules/X11/devX11.c:3148
+#: src/modules/X11/devX11.c:3175 src/modules/X11/devX11.c:3180
+#: src/modules/X11/devX11.c:3185 src/modules/X11/devX11.c:3195
+#: src/modules/X11/devX11.c:3200 src/modules/X11/devX11.c:3204
+#: src/modules/X11/devX11.c:3208
+#, c-format
+msgid "invalid '%s' value"
+msgstr "niepoprawna wartość '%s'"
+
+#: src/main/apply.c:103 src/main/complex.c:753
 msgid "invalid length"
 msgstr "niepoprawna długość"
 
-# src/main/apply.c: 113
-# error(_("long vectors are not supported for matrix/array results"))
-#: src/main/apply.c:113
+#: src/main/apply.c:108
 msgid "long vectors are not supported for matrix/array results"
 msgstr "długie wektory nie są wspierane przez wyniki macierzy/tablicy"
 
-# src/main/apply.c: 162
-# error(_("values must be length %d,\n but FUN(X[[%d]]) result is length %d"),
-# 	               commonLen, i+1, length(val))
-#: src/main/apply.c:162
+#: src/main/apply.c:115
+#, c-format
+msgid "type '%s' is not supported"
+msgstr "typ '%s' nie jest wspierany"
+
+#: src/main/apply.c:163
 #, c-format
 msgid ""
 "values must be length %d,\n"
 " but FUN(X[[%d]]) result is length %d"
 msgstr "wartości muszą mieć długość %d, ale wynik FUN (X [[%d]]) ma długość %d"
 
-# src/main/apply.c: 174
-# error(_("values must be type '%s',\n but FUN(X[[%d]]) result is type '%s'"),
-# 	            	  type2char(commonType), i+1, type2char(valType))
-#: src/main/apply.c:174
+#: src/main/apply.c:175
 #, c-format
 msgid ""
 "values must be type '%s',\n"
 " but FUN(X[[%d]]) result is type '%s'"
 msgstr "wartości muszą być typu '%s', ale wynik FUN(X[[%d]]) jest typu '%s'"
 
-# src/main/apply.c: 193
-# error(_("type '%s' is not supported"), type2char(commonType))
-#: src/main/apply.c:193
-#, c-format
-msgid "type '%s' is not supported"
-msgstr "typ '%s' nie jest wspierany"
-
-# src/main/apply.c: 225
-# error(_("dimnames(<value>) is neither NULL nor list of length %d"),
-# 			      rnk_v)
-#: src/main/apply.c:225
+#: src/main/apply.c:252
 #, c-format
 msgid "dimnames(<value>) is neither NULL nor list of length %d"
 msgstr "dimnames(<value>) nie jest wartością NULL ani też listą o długości %d"
 
-# src/library/stats/src/distn.c: 41
-# 	_("NaNs produced")
-# src/main/arithmetic.c: 42
-# 	_("NaNs produced")
-#: src/main/arithmetic.c:42
+#: src/main/arithmetic.c:42 src/main/eval.c:3633
 msgid "NaNs produced"
 msgstr "wyprodukowano wartości NaN"
 
-# src/main/arithmetic.c: 43
-#  _("non-numeric argument to mathematical function")
 #: src/main/arithmetic.c:43
 msgid "non-numeric argument to mathematical function"
 msgstr "argument nieliczbowy przekazany do funkcji matematycznej"
 
-# src/main/arithmetic.c: 187
-# warning(_("probable complete loss of accuracy in modulus"))
-#: src/main/arithmetic.c:187
+#: src/main/arithmetic.c:186
 msgid "probable complete loss of accuracy in modulus"
 msgstr "prawdopodobna całkowita utrata precyzji w module"
 
-# src/main/arithmetic.c: 337
-#  _("NAs produced by integer overflow")
-#: src/main/arithmetic.c:337
+#: src/main/arithmetic.c:298
 msgid "NAs produced by integer overflow"
 msgstr ""
 "wyprodukowano wartości NA na skutek przepełnienia zakresu liczb całkowitych"
 
-#: src/main/arithmetic.c:538
+#: src/main/arithmetic.c:499
 msgid "operator needs one or two arguments"
 msgstr "operator wymaga jednego lub dwóch argumentów"
 
-# src/main/arithmetic.c: 554
-#  _("non-numeric argument to binary operator")
-#: src/main/arithmetic.c:554
+#: src/main/arithmetic.c:515
 msgid "non-numeric argument to binary operator"
 msgstr "argument nieliczbowy przekazany do operatora dwuargumentowego"
 
-# src/main/relop.c: 227
-#  _("non-conformable arrays")
-# src/main/arithmetic.c: 615
-#  _("non-conformable arrays")
-#: src/main/arithmetic.c:615 src/main/relop.c:227
+#: src/main/arithmetic.c:576 src/main/relop.c:230
 msgid "non-conformable arrays"
 msgstr "niezgodne tablice"
 
-# src/main/arithmetic.c: 658
-#  _("non-conformable time-series")
-#: src/main/arithmetic.c:658
+#: src/main/arithmetic.c:619
 msgid "non-conformable time-series"
 msgstr "niezgodne szeregi czasowe"
 
-# src/main/relop.c: 265
-# warningcall(call, _("longer object length is not a multiple of shorter object length"))
-# src/main/logic.c: 142
-# warningcall(call,
-# 		    _("longer object length is not a multiple of shorter object length"))
-# src/main/arithmetic.c: 679
-# warningcall(lcall,
-# 		    _("longer object length is not a multiple of shorter object length"))
-#: src/main/arithmetic.c:680 src/main/logic.c:143 src/main/relop.c:166
-#: src/main/relop.c:265
+#: src/main/arithmetic.c:641 src/main/logic.c:135 src/main/relop.c:169
+#: src/main/relop.c:268
 msgid "longer object length is not a multiple of shorter object length"
 msgstr ""
 "długość dłuszego obiektu nie jest wielokrotnością długości krótszego obiektu"
 
-# src/main/arithmetic.c: 751
-#  _("invalid argument to unary operator")
-#: src/main/arithmetic.c:751
+#: src/main/arithmetic.c:712
 msgid "invalid argument to unary operator"
 msgstr "niepoprawny argument przekazany do operatora jednoargumentowego"
 
-# src/main/arithmetic.c: 780
-#  _("invalid unary operator")
-# src/main/arithmetic.c: 805
-#  _("invalid unary operator")
-# src/main/arithmetic.c: 824
-#  _("invalid unary operator")
-#: src/main/arithmetic.c:780 src/main/arithmetic.c:805
-#: src/main/arithmetic.c:824
+#: src/main/arithmetic.c:741 src/main/arithmetic.c:766
+#: src/main/arithmetic.c:785
 msgid "invalid unary operator"
 msgstr "niepoprawny operator jednoargumentowy"
 
-# src/main/arithmetic.c: 1241
-#  _("unimplemented real function of 1 argument")
-#: src/main/arithmetic.c:1241
+#: src/main/arithmetic.c:1191
 msgid "unimplemented real function of 1 argument"
 msgstr "niezaimplementowana rzeczywista funkcja jednego argumentu"
 
-# src/main/arithmetic.c: 1255
-#  _("unimplemented complex function")
-# src/main/complex.c: 648
-#  _("unimplemented complex function")
-# src/main/complex.c: 718
-# errorcall_return(call, _("unimplemented complex function"))
-#: src/main/arithmetic.c:1255 src/main/complex.c:648 src/main/complex.c:718
+#: src/main/arithmetic.c:1205 src/main/complex.c:638 src/main/complex.c:708
 msgid "unimplemented complex function"
 msgstr "niezaimplementowana funkcja zespolona"
 
-# src/main/arithmetic.c: 1526
-#  _("unimplemented real function of %d numeric arguments")
-# src/main/arithmetic.c: 1877
-#  _("unimplemented real function of %d numeric arguments")
-# src/main/arithmetic.c: 2056
-#  _("unimplemented real function of %d numeric arguments")
-# src/main/arithmetic.c: 2168
-#  _("unimplemented real function of %d numeric arguments")
-#: src/main/arithmetic.c:1526 src/main/arithmetic.c:1877
-#: src/main/arithmetic.c:2056 src/main/arithmetic.c:2168
+#: src/main/arithmetic.c:1484 src/main/arithmetic.c:1877
+#: src/main/arithmetic.c:2049 src/main/arithmetic.c:2152
 #, c-format
 msgid "unimplemented real function of %d numeric arguments"
 msgstr "niezaimplementowana rzeczywista funkcja %d argumentów liczbowych"
 
-# src/main/arithmetic.c: 1552
-# error(_("%d arguments passed to '%s' which requires 1 or 2"),
-# 	      n, PRIMNAME(op))
-#: src/main/arithmetic.c:1552
+#: src/main/arithmetic.c:1511
 #, c-format
-msgid "%d arguments passed to '%s' which requires 1 or 2"
-msgstr ""
-"argumenty (%d) przekazano do funkcji '%s', która wymaga 1 lub 2 argumentów"
+msgid "%d argument passed to '%s' which requires 1 or 2 arguments"
+msgid_plural "%d arguments passed to '%s'which requires 1 or 2 arguments"
+msgstr[0] ""
+"%d argument przekazano do funkcji '%s', która wymaga 1 lub 2 argumentów"
+msgstr[1] ""
+"%d argumenty przekazano do funkcji '%s', która wymaga 1 lub 2 argumentów"
+msgstr[2] ""
+"%d argumentów przekazano do funkcji '%s', która wymaga 1 lub 2 argumentów"
 
-# src/main/arithmetic.c: 1570
-#  _("invalid second argument of length 0")
-#: src/main/arithmetic.c:1570
+#: src/main/arithmetic.c:1530
 msgid "invalid second argument of length 0"
 msgstr "niepoprawny drugi argument o długości 0"
 
-# src/main/arithmetic.c: 1639
-#  _("invalid argument 'base' of length 0")
-#: src/main/arithmetic.c:1639
+#: src/main/arithmetic.c:1625 src/main/arithmetic.c:1643 src/main/envir.c:1464
+#: src/main/envir.c:1972 src/main/eval.c:630 src/main/eval.c:4237
+#, c-format
+msgid "argument \"%s\" is missing, with no default"
+msgstr "brakuje argumentu '%s', a nie ma określonej wartości domyślnej"
+
+#: src/main/arithmetic.c:1649
 msgid "invalid argument 'base' of length 0"
 msgstr "niepoprawny argument 'base' o zerowej długości"
 
-# src/main/arithmetic.c: 1647
-# error(_("%d arguments passed to 'log' which requires 1 or 2"), n)
-#: src/main/arithmetic.c:1647
-#, c-format
-msgid "%d arguments passed to 'log' which requires 1 or 2"
-msgstr ""
-"argumenty (%d) przekazano do funkcji 'log()', która wymaga 1 lub 2 argumentów"
-
-# src/main/array.c: 79
-# error(_("'data' must be of a vector type, was '%s'"),
-# 		type2char(TYPEOF(vals)))
-# src/main/array.c: 1441
-# error(_("'data' must be of a vector type, was '%s'"),
-# 		type2char(TYPEOF(vals)))
-#: src/main/array.c:79 src/main/array.c:1441
+#: src/main/array.c:82 src/main/array.c:1591
 #, c-format
 msgid "'data' must be of a vector type, was '%s'"
 msgstr "'data' musi być typu wektor, było '%s'"
 
-# src/main/array.c: 94
-# error(_("non-numeric matrix extent"))
-# src/main/array.c: 102
-# error(_("non-numeric matrix extent"))
-#: src/main/array.c:94 src/main/array.c:102
+#: src/main/array.c:97 src/main/array.c:105
 msgid "non-numeric matrix extent"
 msgstr "nieliczbowy stopień macierzy"
 
-# src/main/array.c: 97
-# error(_("invalid 'nrow' value (too large or NA)"))
-# src/main/array.c: 1535
-# error(_("invalid 'nrow' value (too large or NA)"))
-#: src/main/array.c:97 src/main/array.c:1535
+#: src/main/array.c:100 src/main/array.c:1695
 msgid "invalid 'nrow' value (too large or NA)"
 msgstr "niepoprawna wartość 'nrow' (zbyt duża lub wartość NA)"
 
-# src/main/array.c: 99
-# error(_("invalid 'nrow' value (< 0)"))
-# src/main/array.c: 1537
-# error(_("invalid 'nrow' value (< 0)"))
-#: src/main/array.c:99 src/main/array.c:1537
+#: src/main/array.c:102 src/main/array.c:1697
 msgid "invalid 'nrow' value (< 0)"
 msgstr "niepoprawna wartość 'nrow' (< 0)"
 
-# src/main/array.c: 105
-# error(_("invalid 'ncol' value (too large or NA)"))
-# src/main/array.c: 1540
-# error(_("invalid 'ncol' value (too large or NA)"))
-#: src/main/array.c:105 src/main/array.c:1540
+#: src/main/array.c:108 src/main/array.c:1700
 msgid "invalid 'ncol' value (too large or NA)"
 msgstr "niepoprawna wartość 'ncol' (zbyt duża lub wartość NA)"
 
-# src/main/array.c: 107
-# error(_("invalid 'ncol' value (< 0)"))
-# src/main/array.c: 1542
-# error(_("invalid 'ncol' value (< 0)"))
-#: src/main/array.c:107 src/main/array.c:1542
+#: src/main/array.c:110 src/main/array.c:1702
 msgid "invalid 'ncol' value (< 0)"
 msgstr "niepoprawna wartość 'ncol' (< 0)"
 
-# src/main/array.c: 116
-# error(_("nc = 0 for non-null data"))
-#: src/main/array.c:116
+#: src/main/array.c:119
 msgid "nc = 0 for non-null data"
 msgstr "'nc = 0' dla niepustych danych"
 
-# src/main/array.c: 124
-# error(_("nr = 0 for non-null data"))
-#: src/main/array.c:124
+#: src/main/array.c:127
 msgid "nr = 0 for non-null data"
 msgstr "'nr = 0' dla niepustych danych"
 
-# src/main/array.c: 135
-# warning(_("data length [%d] is not a sub-multiple or multiple of the number of rows [%d]"), lendat, nr)
-#: src/main/array.c:135
+#: src/main/array.c:138
 #, c-format
 msgid ""
 "data length [%d] is not a sub-multiple or multiple of the number of rows [%d]"
@@ -2440,9 +954,7 @@ msgstr ""
 "długość danych [%d] nie jest pod-wielokrotnością lub wielokrotnością liczby "
 "wierszy [%d]"
 
-# src/main/array.c: 138
-# warning(_("data length [%d] is not a sub-multiple or multiple of the number of columns [%d]"), lendat, nc)
-#: src/main/array.c:138
+#: src/main/array.c:141
 #, c-format
 msgid ""
 "data length [%d] is not a sub-multiple or multiple of the number of columns "
@@ -2451,291 +963,168 @@ msgstr ""
 "długość danych [%d] nie jest pod-wielokrotnością lub wielokrotnością liczby "
 "kolumn [%d]"
 
-# src/main/array.c: 141
-# warning(_("data length exceeds size of matrix"))
-#: src/main/array.c:141
+#: src/main/array.c:144
 msgid "data length exceeds size of matrix"
 msgstr "długość danych przewyższa rozmiar macierzy"
 
-# src/main/array.c: 147
-# error(_("too many elements specified"))
-# src/main/array.c: 1453
-# error(_("too many elements specified"))
-# src/main/array.c: 1549
-# error(_("too many elements specified"))
-#: src/main/array.c:147 src/main/array.c:1453 src/main/array.c:1549
+#: src/main/array.c:150 src/main/array.c:1603 src/main/array.c:1709
 msgid "too many elements specified"
 msgstr "określono zbyt dużo elementów"
 
-# src/main/array.c: 205
-# error(_("negative extents to matrix"))
-#: src/main/array.c:205
+#: src/main/array.c:208
 msgid "negative extents to matrix"
 msgstr "ujemne wymiary przekazane do macierzy"
 
-# src/main/array.c: 208
-# error(_("allocMatrix: too many elements specified"))
-#: src/main/array.c:208
+#: src/main/array.c:211
 msgid "allocMatrix: too many elements specified"
 msgstr "allocMatrix: określono zbyt wiele elementów"
 
-# src/main/array.c: 236
-# error(_("negative extents to 3D array"))
-#: src/main/array.c:236
+#: src/main/array.c:239
 msgid "negative extents to 3D array"
 msgstr "ujemne wymiary przekazane do tablicy 3D"
 
-# src/main/array.c: 239
-# error(_("'alloc3Darray': too many elements specified"))
-#: src/main/array.c:239
+#: src/main/array.c:242
 msgid "'alloc3Darray': too many elements specified"
 msgstr "'alloc3Darray': określono zbyt wiele elementów"
 
-# src/main/array.c: 264
-# error(_("'allocArray': too many elements specified by 'dims'"))
-#: src/main/array.c:264
+#: src/main/array.c:267
 msgid "'allocArray': too many elements specified by 'dims'"
 msgstr "'allocArray': zbyt wiele elementów określono poprzez argument 'dims'"
 
-# src/main/array.c: 448
-# error(_("a matrix-like object is required as argument to '%s'"),
-# 	      (PRIMVAL(op) == 2) ? "col" : "row")
-#: src/main/array.c:448
+#: src/main/array.c:523
+#, c-format
+msgid "'%s' must be a list or atomic vector"
+msgstr "argument '%s' musi być listą lub atomowym wektorem"
+
+#: src/main/array.c:561
 #, c-format
 msgid "a matrix-like object is required as argument to '%s'"
 msgstr ""
 "obiekt macierzopodobny jest wymagany jako argument przekazywany do '%s'"
 
-# src/main/array.c: 662
-#  _("requires numeric/complex matrix/vector arguments")
-#: src/main/array.c:662
+#: src/main/array.c:776
 msgid "requires numeric/complex matrix/vector arguments"
 msgstr "wymagane są liczbowe/zespolone argumenty macierzy/wektorów"
 
-# src/main/array.c: 752
-#  _("non-conformable arguments")
-# src/main/array.c: 756
-# error(_("non-conformable arguments"))
-# src/main/array.c: 760
-# error(_("non-conformable arguments"))
-#: src/main/array.c:752 src/main/array.c:756 src/main/array.c:760
+#: src/main/array.c:886 src/main/array.c:890 src/main/array.c:894
 msgid "non-conformable arguments"
 msgstr "niezgodne argumenty"
 
-# src/main/array.c: 1058
-# error(_("argument is not a matrix"))
-#: src/main/array.c:1058
+#: src/main/array.c:1193
 msgid "argument is not a matrix"
 msgstr "argument nie jest macierzą"
 
-# src/main/array.c: 1093
-# error(_("invalid first argument, must be an array"))
-#: src/main/array.c:1093
+#: src/main/array.c:1228
 msgid "invalid first argument, must be an array"
 msgstr "niepoprawny pierwszy argument, musi być tablicą"
 
-# src/main/array.c: 1107
-# error(_("'perm' is of wrong length %d (!= %d)"),
-# 		  LENGTH(perm), n)
-#: src/main/array.c:1107
+#: src/main/array.c:1242
 #, c-format
 msgid "'perm' is of wrong length %d (!= %d)"
 msgstr "'perm' posiada błędną długość %d (!= %d)"
 
-# src/main/array.c: 1112
-# error(_("'a' does not have named dimnames"))
-# src/main/array.c: 1115
-# error(_("'a' does not have named dimnames"))
-#: src/main/array.c:1112 src/main/array.c:1115
+#: src/main/array.c:1247 src/main/array.c:1250
 msgid "'a' does not have named dimnames"
 msgstr "'a' nie ma nazwanych wymiarów"
 
-# src/main/array.c: 1122
-# error(_("'perm[%d]' does not match a dimension name"), i+1)
-#: src/main/array.c:1122
+#: src/main/array.c:1257
 #, c-format
 msgid "'perm[%d]' does not match a dimension name"
 msgstr "'perm[%d]' nie jest zgodne z nazwą wymiaru"
 
-# src/main/array.c: 1135
-# error(_("value out of range in 'perm'"))
-#: src/main/array.c:1135
+#: src/main/array.c:1270
 msgid "value out of range in 'perm'"
 msgstr "wartość w 'perm' jest poza zakresem"
 
-# src/main/array.c: 1217
-# error(_("'resize' must be TRUE or FALSE"))
-#: src/main/array.c:1217
+#: src/main/array.c:1352
 msgid "'resize' must be TRUE or FALSE"
 msgstr "argument 'resize' musi posiadać wartość TRUE lub FALSE"
 
-# src/library/graphics/R/stem.R: 21
-# stop("'x' must be numeric")
-# src/library/graphics/R/hist.R: 33
-# stop("'x' must be numeric")
-# src/library/stats/R/wilcox.test.R: 37
-# stop("'x' must be numeric")
-# src/library/stats/R/StructTS.R: 85
-# stop("'x' must be numeric")
-# src/library/stats/R/ar.R: 53
-# stop("'x' must be numeric")
-# src/library/stats/R/ar.R: 266
-# stop("'x' must be numeric")
-# src/library/stats/R/ar.R: 344
-# stop("'x' must be numeric")
-# src/library/stats/R/cor.R: 35
-# stop("'x' must be numeric")
-# src/library/stats/R/arma0.R: 63
-# stop("'x' must be numeric")
-# src/library/stats/R/arima.R: 112
-# stop("'x' must be numeric")
-# src/library/stats/R/acf.R: 36
-# stop("'x' must be numeric")
-# src/library/stats/R/acf.R: 68
-# stop("'x' must be numeric")
-# src/library/base/R/cut.R: 25
-# stop("'x' must be numeric")
-# src/library/base/R/rowsum.R: 23
-# stop("'x' must be numeric")
-# src/library/base/R/jitter.R: 28
-# stop("'x' must be numeric")
-# src/main/array.c: 1275
-# error(_("'x' must be numeric"))
-#: src/main/array.c:1275
+#: src/main/array.c:1422
 msgid "'x' must be numeric"
 msgstr "argument 'x' musi być liczbą"
 
-# src/library/base/R/array.R: 29
-# stop("'dims' cannot be of length 0")
-# src/main/array.c: 1449
-# error(_("'dims' cannot be of length 0"))
-#: src/main/array.c:1449
+#: src/main/array.c:1425
+msgid "'x' is too short"
+msgstr "argument 'x' jest zbyt krótki"
+
+#: src/main/array.c:1599
 msgid "'dims' cannot be of length 0"
 msgstr "argument 'dims' nie może posiadać długości 0"
 
-# src/main/array.c: 1545
-# error(_("'x' must have positive length"))
-#: src/main/array.c:1545
+#: src/main/array.c:1705
 msgid "'x' must have positive length"
 msgstr "argument 'x' musi posiadać dodatnią długość"
 
-# src/main/array.c: 1605
-# error(_("singular matrix in 'backsolve'. First zero in diagonal [%d]"),
-# 		  i + 1)
-#: src/main/array.c:1605
+#: src/main/array.c:1771
 #, c-format
 msgid "singular matrix in 'backsolve'. First zero in diagonal [%d]"
 msgstr "osobliwa macierz w 'backsolve()'. Pierwsze zero na diagonali [%d]"
 
-# src/main/attrib.c: 40
-# error(_("attempt to set an attribute on NULL"))
-# src/main/attrib.c: 235
-# error(_("attempt to set an attribute on NULL"))
-# src/main/attrib.c: 269
-# error(_("attempt to set an attribute on NULL"))
-# src/main/attrib.c: 291
-# error(_("attempt to set an attribute on NULL"))
-# src/main/attrib.c: 405
-# error(_("attempt to set an attribute on NULL"))
-# src/main/attrib.c: 452
-# error(_("attempt to set an attribute on NULL"))
-# src/main/attrib.c: 502
-# error(_("attempt to set an attribute on NULL"))
-#: src/main/attrib.c:40 src/main/attrib.c:235 src/main/attrib.c:269
-#: src/main/attrib.c:291 src/main/attrib.c:405 src/main/attrib.c:452
-#: src/main/attrib.c:502
+#: src/main/attrib.c:40 src/main/attrib.c:231 src/main/attrib.c:265
+#: src/main/attrib.c:287 src/main/attrib.c:403 src/main/attrib.c:450
+#: src/main/attrib.c:501
 msgid "attempt to set an attribute on NULL"
 msgstr "próba ustawienia atrybutu na wartości NULL"
 
-# src/main/attrib.c: 72
-# error(_("row names must be 'character' or 'integer', not '%s'"),
-# 	      type2char(TYPEOF(val)))
-#: src/main/attrib.c:72
+#: src/main/attrib.c:77
 #, c-format
 msgid "row names must be 'character' or 'integer', not '%s'"
 msgstr "nazwy wierszy muszą być typu 'character' lub 'integer', nie '%s'"
 
-# src/main/attrib.c: 124
-# error(_("getAttrib: invalid type (%s) for TAG"),
-# 			  type2char(TYPEOF(TAG(vec))))
-#: src/main/attrib.c:124
+#: src/main/attrib.c:130
 #, c-format
 msgid "getAttrib: invalid type (%s) for TAG"
 msgstr "getAttrib: niepoprawny typ (%s) dla TAG"
 
-# src/main/attrib.c: 379
-# error(_("invalid type (%s) for 'names': must be vector"),
-# 		  type2char(TYPEOF(s)))
-#: src/main/attrib.c:379
+#: src/main/attrib.c:377
 #, c-format
 msgid "invalid type (%s) for 'names': must be vector"
 msgstr "niepoprawny typ (%s) dla 'names': musi być wektor"
 
-# src/main/attrib.c: 382
-# error(_("'names' attribute [%d] must be the same length as the vector [%d]"), length(s), length(x))
-#: src/main/attrib.c:382
+#: src/main/attrib.c:380
 #, c-format
 msgid "'names' attribute [%d] must be the same length as the vector [%d]"
 msgstr "atrybut 'names' [%d] musi mieć tę samą długość co wektor [%d]"
 
-# src/main/attrib.c: 387
-# error(_("names() applied to a non-vector"))
-#: src/main/attrib.c:387
+#: src/main/attrib.c:385
 msgid "names() applied to a non-vector"
 msgstr "funkcja 'names()' zastosowana do nie-wektora"
 
-# src/main/attrib.c: 395
-# error(_("invalid time series parameters specified"))
-#: src/main/attrib.c:395
+#: src/main/attrib.c:393
 msgid "invalid time series parameters specified"
 msgstr "niepoprawnie określone parametry szeregu czasowego"
 
-# src/main/attrib.c: 409
-# error(_("'tsp' attribute must be numeric"))
-#: src/main/attrib.c:409
+#: src/main/attrib.c:407
 msgid "'tsp' attribute must be numeric"
 msgstr "atrybut 'tsp' musi być liczbą"
 
-# src/main/attrib.c: 415
-# error(_("'tsp' attribute must be numeric of length three"))
-#: src/main/attrib.c:415
+#: src/main/attrib.c:413
 msgid "'tsp' attribute must be numeric of length three"
 msgstr "atrybut 'tsp' musi być liczbowy o długości trzy"
 
-# src/main/attrib.c: 432
-# error(_("cannot assign 'tsp' to zero-length vector"))
-#: src/main/attrib.c:432
+#: src/main/attrib.c:430
 msgid "cannot assign 'tsp' to zero-length vector"
 msgstr "nie można przypisać 'tsp' do wektora o zerowej długości"
 
-# src/main/attrib.c: 463
-# error(_("attempt to set invalid 'comment' attribute"))
-#: src/main/attrib.c:463
+#: src/main/attrib.c:461
 msgid "attempt to set invalid 'comment' attribute"
 msgstr "próba ustawienia niepoprawnego atrybutu 'comment' "
 
-# src/main/attrib.c: 511
-# error(_("adding class \"factor\" to an invalid object"))
-#: src/main/attrib.c:511
+#: src/main/attrib.c:510
 msgid "adding class \"factor\" to an invalid object"
 msgstr "dodawanie klasy \"factor\" do niepoprawnego obiektu"
 
-# src/main/attrib.c: 519
-# error(_("attempt to set invalid 'class' attribute"))
-#: src/main/attrib.c:519
+#: src/main/attrib.c:541
 msgid "attempt to set invalid 'class' attribute"
 msgstr "próba ustawienia niepoprawnego atrybutu 'class'"
 
-# src/main/attrib.c: 777
-# error(_("class '%s' has no 'names' slot"), klass)
-#: src/main/attrib.c:777
+#: src/main/attrib.c:872
 #, c-format
 msgid "class '%s' has no 'names' slot"
 msgstr "klasa \"%s\" nie ma gniazda 'names'"
 
-# src/main/attrib.c: 779
-# warning(_("class '%s' has no 'names' slot; assigning a names attribute will create an invalid object"), klass)
-#: src/main/attrib.c:779
+#: src/main/attrib.c:874
 #, c-format
 msgid ""
 "class '%s' has no 'names' slot; assigning a names attribute will create an "
@@ -2744,9 +1133,7 @@ msgstr ""
 "klasa \"%s\" nie ma gniazda 'names'; przypisanie atrybutu 'names' spowoduje "
 "utworzenie niepoprawnego obiektu"
 
-# src/main/attrib.c: 782
-# error(_("invalid to use names()<- to set the 'names' slot in a non-vector class ('%s')"), klass)
-#: src/main/attrib.c:782
+#: src/main/attrib.c:877
 #, c-format
 msgid ""
 "invalid to use names()<- to set the 'names' slot in a non-vector class ('%s')"
@@ -2754,254 +1141,130 @@ msgstr ""
 "nie wolno użyć names()<- w celu ustawienia gniazda 'names' w nie-wektorowej "
 "klasie (\"%s\")"
 
-# src/main/attrib.c: 812
-# error(_("incompatible 'names' argument"))
-#: src/main/attrib.c:812
+#: src/main/attrib.c:907
 msgid "incompatible 'names' argument"
 msgstr "niezgodny argument 'names'"
 
-# src/main/attrib.c: 867
-# error(_("invalid type (%s) to set 'names' attribute"),
-# 	      type2char(TYPEOF(vec)))
-#: src/main/attrib.c:867
+#: src/main/attrib.c:962
 #, c-format
 msgid "invalid type (%s) to set 'names' attribute"
 msgstr "niepoprawny typ (%s) do ustawienia atrybutu 'names'"
 
-# src/main/attrib.c: 938
-# error(_("'dimnames' applied to non-array"))
-#: src/main/attrib.c:938
+#: src/main/attrib.c:1035
 msgid "'dimnames' applied to non-array"
 msgstr "'dimnames()' zastosowane do nie-tablicy"
 
-# src/main/attrib.c: 943
-# error(_("'dimnames' must be a list"))
-#: src/main/attrib.c:943
-msgid "'dimnames' must be a list"
-msgstr "'dimnames' musi być listą"
+#: src/main/attrib.c:1040 src/main/coerce.c:2471
+#, c-format
+msgid "'%s' must be a list"
+msgstr "argument '%s' musi być listą"
 
-# src/main/attrib.c: 946
-# error(_("length of 'dimnames' [%d] must match that of 'dims' [%d]"),
-# 	      length(val), k)
-# src/main/attrib.c: 974
-# error(_("length of 'dimnames' [%d] must match that of 'dims' [%d]"),
-# 	      length(val), k)
-#: src/main/attrib.c:946 src/main/attrib.c:974
+#: src/main/attrib.c:1043 src/main/attrib.c:1071
 #, c-format
 msgid "length of 'dimnames' [%d] must match that of 'dims' [%d]"
 msgstr "długość 'dimnames' [%d] musi zgadzać się z tą dla 'dims' [%d]"
 
-# src/main/attrib.c: 980
-# error(_("invalid type (%s) for 'dimnames' (must be a vector)"),
-# 		      type2char(TYPEOF(_this)))
-#: src/main/attrib.c:980
+#: src/main/attrib.c:1077
 #, c-format
 msgid "invalid type (%s) for 'dimnames' (must be a vector)"
 msgstr "niepoprawny typ (%s) dla 'dimnames' (musi być wektor)"
 
-# src/main/attrib.c: 983
-# error(_("length of 'dimnames' [%d] not equal to array extent"),
-# 		      i+1)
-#: src/main/attrib.c:983
+#: src/main/attrib.c:1080
 #, c-format
 msgid "length of 'dimnames' [%d] not equal to array extent"
 msgstr "długość 'dimnames' [%d] nie jest równa stopniowi tablicy"
 
-# src/library/graphics/src/plot.c: 1576
-# error(_("invalid first argument"))
-# src/library/graphics/R/stripchart.R: 36
-# stop("invalid first argument")
-# src/library/graphics/R/boxplot.R: 35
-# stop("invalid first argument")
-# src/library/graphics/R/boxplot.R: 186
-# stop("invalid first argument")
-# src/library/grDevices/R/xyz.coords.R: 33
-# stop("invalid first argument")
-# src/main/paste.c: 74
-# error(_("invalid first argument"))
-# src/main/paste.c: 293
-# error(_("invalid first argument"))
-# src/main/attrib.c: 1055
-# error(_("invalid first argument"))
-# src/main/unique.c: 1749
-# error(_("invalid first argument"))
-# src/main/random.c: 487
-# error(_("invalid first argument"))
-# src/main/random.c: 516
-# error(_("invalid first argument"))
-# src/main/envir.c: 1606
-# error(_("invalid first argument"))
-# src/main/envir.c: 1734
-# error(_("invalid first argument"))
-# src/main/envir.c: 1796
-# error(_("invalid first argument"))
-# src/main/envir.c: 1918
-# error(_("invalid first argument"))
-# src/main/builtin.c: 75
-# error(_("invalid first argument"))
-# src/main/builtin.c: 112
-# error(_("invalid first argument"))
-#: src/main/attrib.c:1055 src/main/builtin.c:75 src/main/builtin.c:112
-#: src/main/envir.c:1606 src/main/envir.c:1734 src/main/envir.c:1796
-#: src/main/envir.c:1918 src/main/paste.c:74 src/main/paste.c:293
-#: src/main/random.c:487 src/main/random.c:516 src/main/unique.c:1749
+#: src/main/attrib.c:1152 src/main/builtin.c:75 src/main/builtin.c:112
+#: src/main/envir.c:1740 src/main/envir.c:1868 src/main/envir.c:1928
+#: src/main/envir.c:2065 src/main/paste.c:74 src/main/paste.c:293
+#: src/main/random.c:479 src/main/random.c:508 src/main/unique.c:1746
 msgid "invalid first argument"
 msgstr "niepoprawny pierwszy argument"
 
-# src/library/graphics/src/plot.c: 1583
-# error(_("invalid second argument"))
-# src/main/attrib.c: 1058
-# error(_("invalid second argument"))
-#: src/main/attrib.c:1058
+#: src/main/attrib.c:1155
 msgid "invalid second argument"
 msgstr "niepoprawny drugi argument"
 
-# src/main/attrib.c: 1066
-# error(_("length-0 dimension vector is invalid"))
-#: src/main/attrib.c:1066
+#: src/main/attrib.c:1163
 msgid "length-0 dimension vector is invalid"
 msgstr "wektor wymiaru zerowej długości jest niepoprawny"
 
-# src/main/attrib.c: 1071
-# error(_("the dims contain missing values"))
-#: src/main/attrib.c:1071
+#: src/main/attrib.c:1168
 msgid "the dims contain missing values"
 msgstr "wymiary zawierają brakujące wartości"
 
-# src/main/attrib.c: 1073
-# error(_("the dims contain negative values"))
-#: src/main/attrib.c:1073
+#: src/main/attrib.c:1170
 msgid "the dims contain negative values"
 msgstr "wymiary zawierają ujemne wartości"
 
-# src/main/attrib.c: 1078
-# error(_("dims do not match the length of object"), total, len)
-#: src/main/attrib.c:1078
+#: src/main/attrib.c:1175
 msgid "dims do not match the length of object"
 msgstr "wymiary nie zgadzają się z długością obiektu"
 
-# src/main/attrib.c: 1080
-# error(_("dims [product %d] do not match the length of object [%d]"), total, len)
-#: src/main/attrib.c:1080
+#: src/main/attrib.c:1177
 #, c-format
 msgid "dims [product %d] do not match the length of object [%d]"
 msgstr "wymiary [produkt %d] nie odpowiadają długości obiektu [%d]"
 
-# src/main/attrib.c: 1182
-# error(_("attributes must be a list or NULL"))
-#: src/main/attrib.c:1177
+#: src/main/attrib.c:1284
 msgid "attributes must be a list or NULL"
 msgstr "atrybuty muszą być listą lub wartością NULL"
 
-# src/main/attrib.c: 1187
-# error(_("attributes must be named"))
-#: src/main/attrib.c:1182
+#: src/main/attrib.c:1289
 msgid "attributes must be named"
 msgstr "atrybuty muszą być nazwane"
 
-# src/main/attrib.c: 1191
-# error(_("all attributes must have names [%d does not]"), i+1)
-#: src/main/attrib.c:1186
+#: src/main/attrib.c:1293
 #, c-format
 msgid "all attributes must have names [%d does not]"
 msgstr "wszystkie atrybuty muszą mieć nazwę [atrybut nr %d takiej nie ma]"
 
-# src/main/attrib.c: 1290
-#  _("'which' must be of mode character")
-#: src/main/attrib.c:1285
+#: src/main/attrib.c:1393
 msgid "'which' must be of mode character"
 msgstr "atrybut 'which' musi być trybu tekstowego"
 
-# src/main/attrib.c: 1292
-#  _("exactly one attribute 'which' must be given")
-#: src/main/attrib.c:1287
+#: src/main/attrib.c:1395
 msgid "exactly one attribute 'which' must be given"
 msgstr "dokładnie jeden atrybut 'which' musi zostać podany"
 
-# src/main/attrib.c: 1350
-# warningcall(call, _("partial match of '%s' to '%s'"), str,
-# 			    CHAR(PRINTNAME(tag)))
-# src/main/attrib.c: 1373
-# warningcall(call, _("partial match of '%s' to '%s'"), str,
-# 		    CHAR(PRINTNAME(tag)))
-# src/main/subset.c: 1188
-# warningcall(call, _("partial match of '%s' to '%s'"),
-# 			    translateChar(input), st)
-# src/main/subset.c: 1239
-# warningcall(call, _("partial match of '%s' to '%s'"),
-# 			    translateChar(input), st)
-# src/main/subscript.c: 240
-# warning(_("partial match of '%s' to '%s'"),
-# 					    ss, cur_name)
-# src/main/subscript.c: 243
-# warningcall(call,
-# 						_("partial match of '%s' to '%s'"),
-# 						ss, cur_name)
-#: src/main/attrib.c:1345 src/main/attrib.c:1368 src/main/subscript.c:240
-#: src/main/subscript.c:244 src/main/subset.c:1188 src/main/subset.c:1239
+#: src/main/attrib.c:1456 src/main/attrib.c:1479 src/main/subscript.c:245
+#: src/main/subscript.c:249 src/main/subset.c:1257 src/main/subset.c:1311
 #, c-format
 msgid "partial match of '%s' to '%s'"
 msgstr "częściowa zgodność między '%s' a '%s'"
 
-# src/main/attrib.c: 1411
-# error(_("invalid type '%s' for slot name"), 
-# 		  type2char(TYPEOF(nlist)))
-#: src/main/attrib.c:1406
+#: src/main/attrib.c:1525
 #, c-format
 msgid "invalid type '%s' for slot name"
 msgstr "niepoprawny typ '%s' dla nazwy gniazda"
 
-# src/main/attrib.c: 1449
-# error(_("'name' must be non-null character string"))
-#: src/main/attrib.c:1444
+#: src/main/attrib.c:1563
 msgid "'name' must be non-null character string"
 msgstr "'name' musi być niepustym łańcuchem tekstowym"
 
-# src/main/attrib.c: 1573
-# error(_("invalid type or length for slot name"))
-# src/main/attrib.c: 1644
-# error(_("invalid type or length for slot name"))
-# src/main/attrib.c: 1681
-# error(_("invalid type or length for slot name"))
-#: src/main/attrib.c:1568 src/main/attrib.c:1639 src/main/attrib.c:1676
+#: src/main/attrib.c:1688 src/main/attrib.c:1759 src/main/attrib.c:1797
 msgid "invalid type or length for slot name"
 msgstr "niepoprawny typ lub długość dla nazwy gniazda"
 
-# src/main/attrib.c: 1607
-# error(_("cannot get a slot (\"%s\") from an object of type \"%s\""),
-# 			  translateChar(asChar(input)),
-# 			  CHAR(type2str(TYPEOF(obj))))
-#: src/main/attrib.c:1602
+#: src/main/attrib.c:1722
 #, c-format
 msgid "cannot get a slot (\"%s\") from an object of type \"%s\""
 msgstr "nie można pobrać gniazda (\"%s\") z obiektu o typie \"%s\""
 
-# src/main/attrib.c: 1618
-# error(_("no slot of name \"%s\" for this object of class \"%s\""),
-# 		  translateChar(asChar(input)),
-# 		  translateChar(asChar(classString)))
-#: src/main/attrib.c:1613
+#: src/main/attrib.c:1733
 #, c-format
 msgid "no slot of name \"%s\" for this object of class \"%s\""
 msgstr "brak gniazda o nazwie \"%s\" dla tego obiektu klasy \"%s\""
 
-# src/main/attrib.c: 1635
-# error(_("attempt to set slot on NULL object"))
-#: src/main/attrib.c:1630
+#: src/main/attrib.c:1750
 msgid "attempt to set slot on NULL object"
 msgstr "próba ustawienia gniazda na obiekt NULL"
 
-# src/main/attrib.c: 1676
-# error(_("formal classes cannot be used without the 'methods' package"))
-#: src/main/attrib.c:1671
+#: src/main/attrib.c:1792
 msgid "formal classes cannot be used without the 'methods' package"
 msgstr "formalne klasy nie mogą być używane bez pakietu 'methods'"
 
-# src/main/attrib.c: 1688
-# error(_("trying to get slot \"%s\" from an object of a basic class (\"%s\") with no slots"),
-# 		  CHAR(PRINTNAME(nlist)),
-# 		  CHAR(STRING_ELT(R_data_class(object, FALSE), 0)))
-#: src/main/attrib.c:1683
+#: src/main/attrib.c:1804
 #, c-format
 msgid ""
 "trying to get slot \"%s\" from an object of a basic class (\"%s\") with no "
@@ -3009,11 +1272,7 @@ msgid ""
 msgstr ""
 "próba pobrania gniazda \"%s\" z obiektu klasy podstawowej (\"%s\") bez gniazd"
 
-# src/main/attrib.c: 1692
-# error(_("trying to get slot \"%s\" from an object (class \"%s\") that is not an S4 object "),
-# 		  CHAR(PRINTNAME(nlist)),
-# 		  translateChar(STRING_ELT(klass, 0)))
-#: src/main/attrib.c:1687
+#: src/main/attrib.c:1808
 #, c-format
 msgid ""
 "trying to get slot \"%s\" from an object (class \"%s\") that is not an S4 "
@@ -3022,425 +1281,179 @@ msgstr ""
 "próba pobrania gniazda \"%s\" z obiektu (klasa \"%s\"), który nie jest "
 "obiektem S4"
 
-# src/main/bind.c: 161
-#  _("resulting vector exceeds vector length limit in '%s'")
-#: src/main/bind.c:161
+#: src/main/bind.c:164
 #, c-format
 msgid "resulting vector exceeds vector length limit in '%s'"
 msgstr "wektor wynikowy przekracza graniczną długość wektora w '%s'"
 
-# src/main/bind.c: 291
-#  _("type '%s' is unimplemented in '%s'")
-# src/main/bind.c: 327
-#  _("type '%s' is unimplemented in '%s'")
-# src/main/bind.c: 376
-#  _("type '%s' is unimplemented in '%s'")
-# src/main/bind.c: 449
-#  _("type '%s' is unimplemented in '%s'")
-# src/main/bind.c: 477
-#  _("type '%s' is unimplemented in '%s'")
-#: src/main/bind.c:291 src/main/bind.c:327 src/main/bind.c:376
-#: src/main/bind.c:449 src/main/bind.c:477
+#: src/main/bind.c:294 src/main/bind.c:330 src/main/bind.c:379
+#: src/main/bind.c:452 src/main/bind.c:480
 #, c-format
 msgid "type '%s' is unimplemented in '%s'"
 msgstr "typ '%s' nie jest zaimplementowany w '%s'"
 
-# src/main/bind.c: 685
-#  _("repeated formal argument 'recursive'")
-#: src/main/bind.c:685
+#: src/main/bind.c:688
 msgid "repeated formal argument 'recursive'"
 msgstr "powtórzony formalny argument 'recursive'"
 
-# src/main/bind.c: 696
-#  _("repeated formal argument 'use.names'")
-#: src/main/bind.c:696
+#: src/main/bind.c:699
 msgid "repeated formal argument 'use.names'"
 msgstr "powtórzony formalny argument 'use.names'"
 
-# src/main/bind.c: 894
-# error(_("argument not a list"))
-#: src/main/bind.c:894
+#: src/main/bind.c:900
 msgid "argument not a list"
 msgstr "argument nie jest listą"
 
-# src/main/objects.c: 318
-# error(_("class name too long in '%s'"), generic)
-# src/main/objects.c: 354
-# error(_("class name too long in '%s'"), generic)
-# src/main/objects.c: 729
-# error(_("class name too long in '%s'"), sb)
-# src/main/objects.c: 746
-# error(_("class name too long in '%s'"), sg)
-# src/main/objects.c: 753
-# error(_("class name too long in '%s'"), sb)
-# src/main/eval.c: 2691
-# error(_("class name too long in '%s'"), generic)
-# src/main/eval.c: 2700
-# error(_("class name too long in '%s'"), group)
-# src/main/bind.c: 1038
-# error(_("class name too long in '%s'"), generic)
-#: src/main/bind.c:1038 src/main/eval.c:2691 src/main/eval.c:2700
-#: src/main/objects.c:318 src/main/objects.c:354 src/main/objects.c:729
-#: src/main/objects.c:746 src/main/objects.c:753
+#: src/main/bind.c:1044 src/main/names.c:1273 src/main/names.c:1278
+#: src/main/names.c:1283 src/main/names.c:1288
 #, c-format
 msgid "class name too long in '%s'"
 msgstr "nazwa klasy w '%s' jest zbyt długa"
 
-# src/main/bind.c: 1114
-# error(_("cannot create a matrix from type '%s'"),
-# 	      type2char(mode))
-#: src/main/bind.c:1114
+#: src/main/bind.c:1128
 #, c-format
 msgid "cannot create a matrix from type '%s'"
 msgstr "nie można utworzyć macierzy z type '%s'"
 
-# src/main/bind.c: 1185
-# error(_("number of rows of matrices must match (see arg %d)"),
-# 		      na + 1)
-#: src/main/bind.c:1185
+#: src/main/bind.c:1198
 #, c-format
 msgid "number of rows of matrices must match (see arg %d)"
 msgstr "liczby wierszy macierzy muszą być zgodne (zobacz argument %d)"
 
-# src/main/bind.c: 1430
-# error(_("number of columns of matrices must match (see arg %d)"),
-# 		      na + 1)
-#: src/main/bind.c:1430
+#: src/main/bind.c:1455
 #, c-format
 msgid "number of columns of matrices must match (see arg %d)"
 msgstr "liczby kolumn macierzy muszą być zgodne (zobacz argument %d)"
 
-# src/main/builtin.c: 43
-# error(_("vector size cannot be NA"))
 #: src/main/builtin.c:43
 msgid "vector size cannot be NA"
 msgstr "rozmiar wektora nie może mieć wartości NA"
 
-# src/main/builtin.c: 49
-# error(_("vector size cannot be NA/NaN"))
-# src/main/builtin.c: 57
-# error(_("vector size cannot be NA/NaN"))
-# src/main/sort.c: 1303
-# error(_("vector size cannot be NA/NaN"))
-#: src/main/builtin.c:49 src/main/builtin.c:57 src/main/sort.c:1303
+#: src/main/builtin.c:49 src/main/builtin.c:57 src/main/sort.c:1323
 msgid "vector size cannot be NA/NaN"
 msgstr "rozmiar wektora nie może mieć wartości NA/NaN"
 
-# src/main/builtin.c: 50
-# error(_("vector size cannot be infinite"))
-# src/main/builtin.c: 58
-# error(_("vector size cannot be infinite"))
-# src/main/sort.c: 1304
-# error(_("vector size cannot be infinite"))
-#: src/main/builtin.c:50 src/main/builtin.c:58 src/main/sort.c:1304
+#: src/main/builtin.c:50 src/main/builtin.c:58 src/main/sort.c:1324
 msgid "vector size cannot be infinite"
 msgstr "rozmiar wektora nie może być nieskończony"
 
-# src/main/builtin.c: 51
-# error(_("vector size specified is too large"))
-# src/main/builtin.c: 59
-# error(_("vector size specified is too large"))
-# src/main/builtin.c: 916
-# error(_("vector size specified is too large"))
-# src/main/sort.c: 1305
-# error(_("vector size specified is too large"))
-#: src/main/builtin.c:51 src/main/builtin.c:59 src/main/builtin.c:916
-#: src/main/sort.c:1305
+#: src/main/builtin.c:51 src/main/builtin.c:59 src/main/builtin.c:950
+#: src/main/sort.c:1325
 msgid "vector size specified is too large"
 msgstr "podany rozmiar wektora jest zbyt duży"
 
-# src/library/methods/src/methods_list_dispatch.c: 545
-# error(_("use of NULL environment is defunct"))
-# src/library/stats/src/nls.c: 290
-# error(_("use of NULL environment is defunct"))
-# src/library/stats/src/port.c: 375
-# error(_("use of NULL environment is defunct"))
-# src/main/objects.c: 197
-# error(_("use of NULL environment is defunct"))
-# src/main/objects.c: 203
-# error(_("use of NULL environment is defunct"))
-# src/main/engine.c: 2967
-# error(_("use of NULL environment is defunct"))
-# src/main/saveload.c: 2070
-# error(_("use of NULL environment is defunct"))
-# src/main/saveload.c: 2364
-# error(_("use of NULL environment is defunct"))
-# src/main/serialize.c: 2709
-# error(_("use of NULL environment is defunct"))
-# src/main/coerce.c: 1537
-# error(_("use of NULL environment is defunct"))
-# src/main/envir.c: 993
-# error(_("use of NULL environment is defunct"))
-# src/main/envir.c: 1046
-# error(_("use of NULL environment is defunct"))
-# src/main/envir.c: 1136
-# error(_("use of NULL environment is defunct"))
-# src/main/envir.c: 1615
-# error(_("use of NULL environment is defunct"))
-# src/main/envir.c: 1739
-# error(_("use of NULL environment is defunct"))
-# src/main/envir.c: 1807
-# error(_("use of NULL environment is defunct"))
-# src/main/envir.c: 1925
-# error(_("use of NULL environment is defunct"))
-# src/main/envir.c: 2582
-# error(_("use of NULL environment is defunct"))
-# src/main/envir.c: 2642
-# error(_("use of NULL environment is defunct"))
-# src/main/envir.c: 2922
-# error(_("use of NULL environment is defunct"))
-# src/main/envir.c: 2951
-# error(_("use of NULL environment is defunct"))
-# src/main/envir.c: 2972
-# error(_("use of NULL environment is defunct"))
-# src/main/envir.c: 2995
-# error(_("use of NULL environment is defunct"))
-# src/main/envir.c: 3030
-# error(_("use of NULL environment is defunct"))
-# src/main/envir.c: 3051
-# error(_("use of NULL environment is defunct"))
-# src/main/envir.c: 3357
-# error(_("use of NULL environment is defunct"))
-# src/main/envir.c: 3362
-# error(_("use of NULL environment is defunct"))
-# src/main/builtin.c: 84
-# error(_("use of NULL environment is defunct"))
-# src/main/builtin.c: 93
-# error(_("use of NULL environment is defunct"))
-# src/main/builtin.c: 293
-# error(_("use of NULL environment is defunct"))
-# src/main/builtin.c: 326
-# error(_("use of NULL environment is defunct"))
-# src/main/builtin.c: 365
-# error(_("use of NULL environment is defunct"))
-# src/main/builtin.c: 375
-# error(_("use of NULL environment is defunct"))
-# src/main/connections.c: 3066
-# error(_("use of NULL environment is defunct"))
-# src/main/eval.c: 5318
-# error(_("use of NULL environment is defunct"))
-#: src/main/builtin.c:84 src/main/builtin.c:93 src/main/builtin.c:293
-#: src/main/builtin.c:326 src/main/builtin.c:365 src/main/builtin.c:375
-#: src/main/coerce.c:1537 src/main/connections.c:3066 src/main/engine.c:2967
-#: src/main/envir.c:993 src/main/envir.c:1046 src/main/envir.c:1136
-#: src/main/envir.c:1615 src/main/envir.c:1739 src/main/envir.c:1807
-#: src/main/envir.c:1925 src/main/envir.c:2582 src/main/envir.c:2642
-#: src/main/envir.c:2922 src/main/envir.c:2951 src/main/envir.c:2972
-#: src/main/envir.c:2995 src/main/envir.c:3030 src/main/envir.c:3051
-#: src/main/envir.c:3357 src/main/envir.c:3362 src/main/eval.c:5318
-#: src/main/objects.c:197 src/main/objects.c:203 src/main/saveload.c:2070
-#: src/main/saveload.c:2364 src/main/serialize.c:2709
+#: src/main/builtin.c:84 src/main/builtin.c:93 src/main/builtin.c:304
+#: src/main/builtin.c:337 src/main/builtin.c:394 src/main/builtin.c:408
+#: src/main/coerce.c:1536 src/main/connections.c:3062 src/main/engine.c:2987
+#: src/main/envir.c:1001 src/main/envir.c:1054 src/main/envir.c:1210
+#: src/main/envir.c:1749 src/main/envir.c:1873 src/main/envir.c:1939
+#: src/main/envir.c:2072 src/main/envir.c:2791 src/main/envir.c:2877
+#: src/main/envir.c:3182 src/main/envir.c:3211 src/main/envir.c:3232
+#: src/main/envir.c:3255 src/main/envir.c:3290 src/main/envir.c:3311
+#: src/main/envir.c:3632 src/main/envir.c:3637 src/main/eval.c:6251
+#: src/main/objects.c:191 src/main/objects.c:199 src/main/saveload.c:2072
+#: src/main/saveload.c:2364 src/main/serialize.c:2755
 msgid "use of NULL environment is defunct"
 msgstr "użycie środowiska NULL jest przestarzałe"
 
-# src/main/builtin.c: 306
-# error(_("replacement object is not an environment"))
-#: src/main/builtin.c:306
+#: src/main/builtin.c:250 src/main/builtin.c:263
+msgid "argument is not a function"
+msgstr "argument nie jest funkcją"
+
+#: src/main/builtin.c:317
 msgid "replacement object is not an environment"
 msgstr "zastępujący obiekt nie jest środowiskiem"
 
-# src/main/builtin.c: 331
-# error(_("'enclos' must be an environment"))
-#: src/main/builtin.c:331
+#: src/main/builtin.c:342
 msgid "'enclos' must be an environment"
 msgstr "'enclos' musi być środowiskiem"
 
-# src/main/builtin.c: 352
-# error( _("argument is not an environment"))
-# src/main/builtin.c: 370
-# error(_("argument is not an environment"))
-#: src/main/builtin.c:352 src/main/builtin.c:370
+#: src/main/builtin.c:363 src/main/builtin.c:399
 msgid "argument is not an environment"
 msgstr "argument nie jest środowiskiem"
 
-# src/main/builtin.c: 354
-# error(_("the empty environment has no parent"))
-#: src/main/builtin.c:354
+#: src/main/builtin.c:365
 msgid "the empty environment has no parent"
 msgstr "puste środowisko nie posiada rodzica"
 
-# src/main/builtin.c: 372
-# error(_("can not set parent of the empty environment"))
-#: src/main/builtin.c:372
+#: src/main/builtin.c:401
 msgid "can not set parent of the empty environment"
 msgstr "nie można ustawić rodzica pustego środowiska"
 
-# src/main/builtin.c: 380
-# error(_("'parent' is not an environment"))
-#: src/main/builtin.c:380
+#: src/main/builtin.c:403
+msgid "can not set the parent environment of a namespace"
+msgstr "nie można ustawić nadrzędnego środowiska przestrzeni nazw"
+
+#: src/main/builtin.c:405
+msgid "can not set the parent environment of package imports"
+msgstr "nie można ustawić nadrzędnego środowiska importów pakietu"
+
+#: src/main/builtin.c:413
 msgid "'parent' is not an environment"
 msgstr "'parent' nie jest środowiskiem"
 
-# src/library/utils/src/io.c: 1036
-# error(_("cannot write to this connection"))
-# src/main/serialize.c: 2006
-# error(_("cannot write to this connection"))
-# src/main/builtin.c: 521
-# error(_("cannot write to this connection"))
-# src/main/deparse.c: 360
-# error(_("cannot write to this connection"))
-# src/main/deparse.c: 446
-# error(_("cannot write to this connection"))
-# src/main/connections.c: 3691
-# error(_("cannot write to this connection"))
-# src/main/connections.c: 4068
-# error(_("cannot write to this connection"))
-# src/main/connections.c: 4102
-# error(_("cannot write to this connection"))
-# src/main/connections.c: 4480
-# error(_("cannot write to this connection"))
-# src/main/connections.c: 4550
-# error(_("cannot write to this connection"))
-# src/main/connections.c: 4759
-# error(_("cannot write to this connection"))
-# src/main/connections.c: 4763
-# error(_("cannot write to this connection"))
-# src/main/connections.c: 5124
-# error(_("cannot write to this connection"))
-#: src/main/builtin.c:521 src/main/connections.c:3691
-#: src/main/connections.c:4068 src/main/connections.c:4102
-#: src/main/connections.c:4480 src/main/connections.c:4550
-#: src/main/connections.c:4759 src/main/connections.c:4763
-#: src/main/connections.c:5124 src/main/deparse.c:360 src/main/deparse.c:446
-#: src/main/serialize.c:2006
+#: src/main/builtin.c:556 src/main/connections.c:3687
+#: src/main/connections.c:4079 src/main/connections.c:4113
+#: src/main/connections.c:4491 src/main/connections.c:4561
+#: src/main/connections.c:4772 src/main/connections.c:4776
+#: src/main/connections.c:5199 src/main/deparse.c:369 src/main/deparse.c:458
+#: src/main/serialize.c:2045
 msgid "cannot write to this connection"
 msgstr "nie można zapisywać w tym połączeniu"
 
-# src/library/graphics/src/plot3d.c: 1179
-# error(_("invalid '%s' specification"), "col")
-# src/library/graphics/src/plot3d.c: 1183
-# error(_("invalid '%s' specification"), "border")
-# src/library/utils/src/stubs.c: 249
-# error(_("invalid '%s' specification"), "editor")
-# src/library/utils/src/stubs.c: 252
-# error(_("invalid '%s' specification"), "filename")
-# src/main/builtin.c: 526
-# error(_("invalid '%s' specification"), "sep")
-# src/main/builtin.c: 556
-# error(_("invalid '%s' specification"), "append")
-#: src/main/builtin.c:526 src/main/builtin.c:556
+#: src/main/builtin.c:561 src/main/builtin.c:591
 #, c-format
 msgid "invalid '%s' specification"
 msgstr "niepoprawna specyfikacja '%s'"
 
-# src/main/builtin.c: 543
-# warning(_("non-positive 'fill' argument will be ignored"))
-#: src/main/builtin.c:543
+#: src/main/builtin.c:578
 msgid "non-positive 'fill' argument will be ignored"
 msgstr "niedodatni argument 'fill' będzie zignorowany"
 
-# src/main/builtin.c: 618
-#  _("argument %d (type '%s') cannot be handled by 'cat'")
-#: src/main/builtin.c:618
+#: src/main/builtin.c:653
 #, c-format
 msgid "argument %d (type '%s') cannot be handled by 'cat'"
 msgstr "argument %d (typ '%s') nie może zostać obsłużony przez 'cat'"
 
-# src/main/builtin.c: 763
-# error(_("vector: cannot make a vector of mode '%s'."),
-# 	      translateChar(STRING_ELT(s, 0)))
-#: src/main/builtin.c:763
+#: src/main/builtin.c:797
 #, c-format
 msgid "vector: cannot make a vector of mode '%s'."
 msgstr "wektor: nie można utworzyć wektora trybu '%s'."
 
-# src/main/builtin.c: 789
-# error(_("cannot set length of non-vector"))
-#: src/main/builtin.c:789
+#: src/main/builtin.c:823
 msgid "cannot set length of non-vector"
 msgstr "nie można ustawić długości nie-wektora"
 
-# src/library/grDevices/src/devices.c: 60
-# error(_("invalid argument"))
-# src/library/tcltk/src/tcltk.c: 197
-# error(_("invalid argument"))
-# src/library/tcltk/src/tcltk.c: 742
-# error(_("invalid argument"))
-# src/library/utils/src/windows/dataentry.c: 223
-# error(G_("invalid argument"))
-# src/library/utils/src/windows/dataentry.c: 1850
-# error(G_("invalid argument"))
-# src/library/utils/src/windows/dataentry.c: 1853
-# error(G_("invalid argument"))
-# src/library/utils/src/windows/dataentry.c: 1884
-# error(G_("invalid argument"))
-# src/main/builtin.c: 897
-# error(_("invalid argument"))
-# src/main/builtin.c: 907
-# error(_("invalid argument"))
-# src/main/options.c: 637
-# error(_("invalid argument"))
-#: src/main/builtin.c:897 src/main/builtin.c:907 src/main/options.c:637
+#: src/main/builtin.c:931 src/main/builtin.c:941 src/main/options.c:659
 msgid "invalid argument"
 msgstr "niepoprawny argument"
 
-# src/main/coerce.c: 2772
-# error(_("invalid value"))
-# src/main/builtin.c: 899
-# error(_("invalid value"))
-# src/main/builtin.c: 909
-# error(_("invalid value"))
-# src/main/builtin.c: 911
-# error(_("invalid value"))
-# src/main/character.c: 366
-# error(_("invalid value"))
-#: src/main/builtin.c:899 src/main/builtin.c:909 src/main/builtin.c:911
-#: src/main/character.c:366 src/main/coerce.c:2765
+#: src/main/builtin.c:933 src/main/builtin.c:943 src/main/builtin.c:945
+#: src/main/character.c:523 src/main/coerce.c:2832
 msgid "invalid value"
 msgstr "niepoprawna wartość"
 
-# src/main/coerce.c: 2485
-# error(_("'...' used in an incorrect context"))
-# src/main/coerce.c: 2526
-# error(_("'...' used in an incorrect context"))
-# src/main/builtin.c: 942
-# error(_("'...' used in an incorrect context"))
-# src/main/eval.c: 563
-# error(_("'...' used in an incorrect context"))
-# src/main/eval.c: 683
-# error(_("'...' used in an incorrect context"))
-# src/main/eval.c: 2099
-# error(_("'...' used in an incorrect context"))
-# src/main/eval.c: 2176
-# error(_("'...' used in an incorrect context"))
-# src/main/eval.c: 2236
-# error(_("'...' used in an incorrect context"))
-# src/main/eval.c: 2569
-# error(_("'...' used in an incorrect context"))
-# src/main/eval.c: 4694
-# error(_("'...' used in an incorrect context"))
-# src/main/eval.c: 4814
-# error(_("'...' used in an incorrect context"))
-#: src/main/builtin.c:942 src/main/coerce.c:2478 src/main/coerce.c:2519
-#: src/main/eval.c:563 src/main/eval.c:683 src/main/eval.c:2099
-#: src/main/eval.c:2176 src/main/eval.c:2236 src/main/eval.c:2569
-#: src/main/eval.c:4694 src/main/eval.c:4814
+#: src/main/builtin.c:976 src/main/coerce.c:2541 src/main/coerce.c:2584
+#: src/main/eval.c:620 src/main/eval.c:740 src/main/eval.c:2266
+#: src/main/eval.c:2346 src/main/eval.c:2407 src/main/eval.c:2745
+#: src/main/eval.c:5584 src/main/eval.c:5701
 msgid "'...' used in an incorrect context"
 msgstr "'...' użyte w złym kontekście"
 
-# src/main/builtin.c: 963
-# error(_("duplicate 'switch' defaults: '%s' and '%s'"),
-# 	      CHAR(STRING_ELT(dflt1, 0)), CHAR(STRING_ELT(dflt2, 0)))
-#: src/main/builtin.c:963
+#: src/main/builtin.c:998
 #, c-format
 msgid "duplicate 'switch' defaults: '%s' and '%s'"
 msgstr "powtórzone wartości domyślne w 'switch': '%s' oraz '%s'"
 
-# src/main/builtin.c: 996
-#  _("'EXPR' is missing")
-#: src/main/builtin.c:996
+#: src/main/builtin.c:1031
 msgid "'EXPR' is missing"
 msgstr "brakuje 'EXPR'"
 
-# src/main/builtin.c: 1000
-#  _("EXPR must be a length 1 vector")
-# src/main/eval.c: 5155
-#  _("EXPR must be a length 1 vector")
-#: src/main/builtin.c:1000 src/main/eval.c:5155
+#: src/main/builtin.c:1035 src/main/eval.c:6056
 msgid "EXPR must be a length 1 vector"
 msgstr "EXPR musi być wektorem o długości 1"
 
-#: src/main/builtin.c:1003
+#: src/main/builtin.c:1038 src/main/eval.c:6059
 #, c-format
 msgid ""
 "EXPR is a \"factor\", treated as integer.\n"
@@ -3449,375 +1462,250 @@ msgstr ""
 "'EXPR' jest obiektem klasy \"factor\", traktowanym jako liczba całkowita.\n"
 " Rozważ użycie '%s' w zamian."
 
-# src/main/character.c: 105
-# error(_("'%s' requires a character vector"), "nzchar()")
-# src/main/character.c: 108
-# error(_("'%s' requires a character vector"), "nzchar()")
-# src/main/character.c: 132
-# error(_("'%s' requires a character vector"), "nchar()")
-# src/main/character.c: 135
-# error(_("'%s' requires a character vector"), "nchar()")
-#: src/main/character.c:105 src/main/character.c:108 src/main/character.c:132
-#: src/main/character.c:135
+#: src/main/builtin.c:1095 src/main/eval.c:6069 src/main/eval.c:6098
+msgid "'switch' with no alternatives"
+msgstr "funkcja 'switch()' bez żadnych alternatyw"
+
+#: src/main/character.c:103 src/main/character.c:224
+#, c-format
+msgid "%d argument passed to '%s' which requires %d to %d"
+msgid_plural "%d arguments passed to '%s' which requires %d to %d"
+msgstr[0] "%d argument przekazano do funkcji '%s', która wymaga od %d do %d"
+msgstr[1] "%d argumenty przekazano do funkcji '%s', która wymaga od %d do %d"
+msgstr[2] "%d argumentów przekazano do funkcji '%s', która wymaga od %d do %d"
+
+#: src/main/character.c:110 src/main/character.c:113 src/main/character.c:230
+#: src/main/character.c:233
 #, c-format
 msgid "'%s' requires a character vector"
 msgstr "'%s' wymaga wektora tekstowego"
 
-# src/main/character.c: 164
-# error(_("number of characters is not computable for element %d in \"bytes\" encoding"), i+1)
-#: src/main/character.c:164
+#: src/main/character.c:150 src/main/character.c:165 src/main/character.c:175
+#: src/main/character.c:203
 #, c-format
-msgid ""
-"number of characters is not computable for element %d in \"bytes\" encoding"
-msgstr ""
-"liczba znaków nie jest obliczalna dla elementu %d w kodowaniu \"bytes\""
+msgid "invalid multibyte string, %s"
+msgstr "niepoprawny wielobajtowy łańcuch, %s"
 
-# src/main/character.c: 169
-# error(_("invalid multibyte string %d"), i+1)
-# src/main/character.c: 197
-# error(_("invalid multibyte string %d"), i+1)
-# src/main/character.c: 653
-# error(_("invalid multibyte string %d"), i+1)
-# src/main/character.c: 750
-# error(_("invalid multibyte string %d"), i+1)
-#: src/main/character.c:169 src/main/character.c:197 src/main/character.c:653
-#: src/main/character.c:750
+#: src/main/character.c:159
 #, c-format
-msgid "invalid multibyte string %d"
-msgstr "niepoprawny wielobajtowy łańcuch %d"
+msgid "number of characters is not computable in \"bytes\" encoding, %s"
+msgstr "liczba znaków nie jest obliczalna w kodowaniu \"bytes\", %s"
 
-# src/main/character.c: 185
-# error(_("width is not computable for element %d in \"bytes\" encoding"), i+1)
-#: src/main/character.c:185
+#: src/main/character.c:188
 #, c-format
-msgid "width is not computable for element %d in \"bytes\" encoding"
-msgstr "szerokość nie jest obliczalna dla elementu %d w kodowaniu \"bytes\""
+msgid "width is not computable for %s in \"bytes\" encoding"
+msgstr "szerokość nie jest obliczalna dla elementu %s w kodowaniu \"bytes\""
 
-# src/main/character.c: 263
-# error(_("extracting substrings from a non-character object"))
-#: src/main/character.c:263
+#: src/main/character.c:309
 msgid "extracting substrings from a non-character object"
 msgstr "wyodrębnianie podłańcuchów z nietekstowego obiektu"
 
-# src/main/character.c: 268
-# error(_("invalid substring arguments"))
-# src/main/character.c: 363
-# error(_("invalid substring arguments"))
-#: src/main/character.c:268 src/main/character.c:363
+#: src/main/character.c:319 src/main/character.c:520
 msgid "invalid substring arguments"
 msgstr "niepoprawne argumenty podłańcucha"
 
-# src/main/character.c: 358
-# error(_("replacing substrings in a non-character object"))
-#: src/main/character.c:358
+#: src/main/character.c:359
+msgid "non-character object(s)"
+msgstr "nietekstowe obiekty"
+
+#: src/main/character.c:515
 msgid "replacing substrings in a non-character object"
 msgstr "zastępowanie podłańcuchów w nietekstowym obiekcie"
 
-# src/main/character.c: 551
-# error(_("the first argument must be a character vector"))
-#: src/main/character.c:551
+#: src/main/character.c:783
 msgid "the first argument must be a character vector"
 msgstr "pierwszy argument musi być wektorem tekstowym"
 
-# src/main/character.c: 570
-# warning(_("abbreviate used with non-ASCII chars"))
-#: src/main/character.c:570
+#: src/main/character.c:820
 msgid "abbreviate used with non-ASCII chars"
 msgstr "'abbreviate' użyte ze znakami nie będącymi ASCII"
 
-# src/main/character.c: 591
-# error(_("non-character names"))
-#: src/main/character.c:591
+#: src/main/character.c:841
 msgid "non-character names"
 msgstr "nazwy nietekstowe"
 
-# src/main/grep.c: 159
-# error(_("non-character argument"))
-# src/main/character.c: 696
-# error(_("non-character argument"))
-#: src/main/character.c:696 src/main/grep.c:159
+#: src/main/character.c:903 src/main/character.c:1000
+#, c-format
+msgid "invalid multibyte string %d"
+msgstr "niepoprawny wielobajtowy łańcuch %d"
+
+#: src/main/character.c:946 src/main/grep.c:163
 msgid "non-character argument"
 msgstr "argument nietekstowy"
 
-# src/main/character.c: 805
-# error(_("decreasing range specification ('%lc-%lc')"),
-# 		      s[i], s[i + 2])
-#: src/main/character.c:805
+#: src/main/character.c:1055
 #, c-format
 msgid "decreasing range specification ('%lc-%lc')"
 msgstr "określenie zmniejszenia zakresu ('%lc-%lc')"
 
-# src/main/character.c: 891
-# error(_("decreasing range specification ('%c-%c')"),
-# 		      s[i], s[i + 2])
-#: src/main/character.c:891
+#: src/main/character.c:1141
 #, c-format
 msgid "decreasing range specification ('%c-%c')"
 msgstr "określenie zmniejszenia zakresu ('%c-%c')"
 
-# src/main/character.c: 1079
-# error(_("invalid UTF-8 string 'old'"))
-#: src/main/character.c:1079
+#: src/main/character.c:1329
 msgid "invalid UTF-8 string 'old'"
 msgstr "niepoprawny łańcuch UTF-8 'old'"
 
-# src/main/character.c: 1085
-# error(_("invalid multibyte string 'old'"))
-#: src/main/character.c:1085
+#: src/main/character.c:1335
 msgid "invalid multibyte string 'old'"
 msgstr "niepoprawny wielobajtowy łańcuch 'old'"
 
-# src/main/character.c: 1098
-# error(_("invalid UTF-8 string 'new'"))
-#: src/main/character.c:1098
+#: src/main/character.c:1348
 msgid "invalid UTF-8 string 'new'"
 msgstr "niepoprawny łańcuch UTF-8 'new'"
 
-# src/main/character.c: 1104
-# error(_("invalid multibyte string 'new'"))
-#: src/main/character.c:1104
+#: src/main/character.c:1354
 msgid "invalid multibyte string 'new'"
 msgstr "niepoprawny wielobajtowy łańcuch 'new'"
 
-# src/main/character.c: 1132
-# error(_("'old' is longer than 'new'"))
-# src/main/character.c: 1221
-# error(_("'old' is longer than 'new'"))
-#: src/main/character.c:1132 src/main/character.c:1221
+#: src/main/character.c:1382 src/main/character.c:1471
 msgid "'old' is longer than 'new'"
 msgstr "'old' jest dłuższe niż 'new'"
 
-# src/main/character.c: 1164
-# error(_("invalid input multibyte string %d"), i+1)
-#: src/main/character.c:1164
+#: src/main/character.c:1414
 #, c-format
 msgid "invalid input multibyte string %d"
 msgstr "niepoprawny wielobajtowy łańcuch wejściowy %d"
 
-# src/main/character.c: 1271
-# error(_("strtrim() requires a character vector"))
-#: src/main/character.c:1271
+#: src/main/character.c:1521
 msgid "strtrim() requires a character vector"
 msgstr "'strtrim()' wymaga wektora tekstowego"
 
-# src/main/coerce.c: 32
-# 	_("invalid 'mode' argument")
 #: src/main/coerce.c:32
 msgid "invalid 'mode' argument"
 msgstr "niepoprawny argument 'mode'"
 
-# src/main/coerce.c: 33
-# 	_("applies only to lists and vectors")
 #: src/main/coerce.c:33
 msgid "applies only to lists and vectors"
 msgstr "ma zastosowanie jedynie do list oraz wektorów"
 
-# src/main/coerce.c: 77
-# warning(_("NAs introduced by coercion"))
-# src/main/errors.c: 1208
-# N_("NAs introduced by coercion")
-#: src/main/coerce.c:77 src/main/errors.c:1208
+#: src/main/coerce.c:77 src/main/errors.c:1194
 msgid "NAs introduced by coercion"
 msgstr "pojawiły się wartości NA na skutek przekształcenia"
 
-# src/main/coerce.c: 79
-# warning(_("inaccurate integer conversion in coercion"))
-# src/main/errors.c: 1209
-# N_("inaccurate integer conversion in coercion")
-#: src/main/coerce.c:79 src/main/errors.c:1209
-msgid "inaccurate integer conversion in coercion"
-msgstr "niedokładna konwersja liczby całkowitej w przekształceniu"
+#: src/main/coerce.c:79
+msgid "NAs introduced by coercion to integer range"
+msgstr ""
+"pojawiły się wartości NA na skutek przekształcenia do liczby całkowitej"
 
-# src/main/coerce.c: 81
-# warning(_("imaginary parts discarded in coercion"))
-# src/main/errors.c: 1210
-# N_("imaginary parts discarded in coercion")
-#: src/main/coerce.c:81 src/main/errors.c:1210
+#: src/main/coerce.c:81 src/main/errors.c:1196
 msgid "imaginary parts discarded in coercion"
 msgstr "części urojone odrzucone na skutek przekształcenia"
 
-# src/main/coerce.c: 83
-# warning(_("out-of-range values treated as 0 in coercion to raw"))
 #: src/main/coerce.c:83
 msgid "out-of-range values treated as 0 in coercion to raw"
 msgstr ""
 "wartości poza zakresem będą traktowane jako 0 podczas przekształcenia do "
 "typu prostego"
 
-# src/main/coerce.c: 414
-# error(_("invalid data of mode '%s' (too short)"),
-# 	      type2char(TYPEOF(v)))
-#: src/main/coerce.c:414
+#: src/main/coerce.c:399
 #, c-format
 msgid "invalid data of mode '%s' (too short)"
 msgstr "niepoprawne dane trybu '%s' (zbyt krótkie)"
 
-# src/main/coerce.c: 1016
-# error(_("'pairlist' object cannot be coerced to type '%s'"),
-# 	      type2char(type))
-#: src/main/coerce.c:1016
+#: src/main/coerce.c:1002
 #, c-format
 msgid "'pairlist' object cannot be coerced to type '%s'"
 msgstr "obiekt 'pairlist' nie może zostać przekształcony na typ '%s'"
 
-# src/main/coerce.c: 1134
-# error(_("(list) object cannot be coerced to type '%s'"),
-# 	      type2char(type))
-#: src/main/coerce.c:1134
+#: src/main/coerce.c:1120
 #, c-format
 msgid "(list) object cannot be coerced to type '%s'"
 msgstr "obiekt (lista) nie może zostać przekształcony na typ '%s'"
 
-# src/main/coerce.c: 1157
-# warning(_("(symbol) object cannot be coerced to type '%s'"),
-# 		type2char(type))
-#: src/main/coerce.c:1157
+#: src/main/coerce.c:1143
 #, c-format
 msgid "(symbol) object cannot be coerced to type '%s'"
 msgstr "obiekt (symbol) nie może zostać przekształcony na typ '%s'"
 
-# src/main/coerce.c: 1173
-# error(_("no method for coercing this S4 class to a vector"))
-# src/main/coerce.c: 1485
-# error(_("no method for coercing this S4 class to a vector"))
-#: src/main/coerce.c:1173 src/main/coerce.c:1485
+#: src/main/coerce.c:1159 src/main/coerce.c:1484
 msgid "no method for coercing this S4 class to a vector"
 msgstr "brak metody dla przekształcenia tej klasy S4 na wektor"
 
-# src/main/coerce.c: 1232
-# error(_("environments cannot be coerced to other types"))
-#: src/main/coerce.c:1232
+#: src/main/coerce.c:1222
 msgid "environments cannot be coerced to other types"
 msgstr "środowiska nie mogą zostać przekształcone na inne typy"
 
-# src/main/coerce.c: 1379
-# error(_("attempting to coerce non-factor"))
-#: src/main/coerce.c:1379
+#: src/main/coerce.c:1374
 msgid "attempting to coerce non-factor"
 msgstr "próba przekonwertowania nie-czynnika"
 
-# src/main/coerce.c: 1533
-#  _("list argument expected")
-#: src/main/coerce.c:1533
+#: src/main/coerce.c:1379 src/main/coerce.c:1389
+msgid "malformed factor"
+msgstr "uszkodzony czynnik"
+
+#: src/main/coerce.c:1532
 msgid "list argument expected"
 msgstr "oczekiwano listy argumentów"
 
-# src/main/coerce.c: 1541
-#  _("invalid environment")
-# src/main/eval.c: 5322
-#  _("invalid environment")
-#: src/main/coerce.c:1541 src/main/eval.c:5322
+#: src/main/coerce.c:1540 src/main/eval.c:6255
 msgid "invalid environment"
 msgstr "niepoprawne środowisko"
 
-# src/main/coerce.c: 1545
-#  _("argument must have length at least 1")
-#: src/main/coerce.c:1545
+#: src/main/coerce.c:1544
 msgid "argument must have length at least 1"
 msgstr "argument musi mieć długość przynajmniej 1"
 
-# src/main/coerce.c: 1567
-#  _("invalid body for function")
-#: src/main/coerce.c:1567
+#: src/main/coerce.c:1566
 msgid "invalid body for function"
 msgstr "niepoprawne ciało dla funkcji"
 
-# src/main/coerce.c: 1590
-#  _("invalid length 0 argument")
-#: src/main/coerce.c:1590
+#: src/main/coerce.c:1589
 msgid "invalid length 0 argument"
 msgstr "niepoprawny argument o długości 0"
 
-# src/main/coerce.c: 1605
-#  _("invalid argument list")
-#: src/main/coerce.c:1605
+#: src/main/coerce.c:1604
 msgid "invalid argument list"
 msgstr "niepoprawna lista argumentów"
 
-# src/main/coerce.c: 1916
-#  _("type \"single\" unimplemented in R")
 #: src/main/coerce.c:1916
 msgid "type \"single\" unimplemented in R"
 msgstr "typ \"single\" nie jest zaimplementowany w R"
 
-# src/main/coerce.c: 1918
-#  _("unimplemented predicate")
 #: src/main/coerce.c:1918
 msgid "unimplemented predicate"
 msgstr "niezaimplementowany predykat (is.xxx)"
 
-# src/main/coerce.c: 2069
-# warningcall(call, _("%s() applied to non-(list or vector) of type '%s'"),
-# 		    "is.na", type2char(TYPEOF(x)))
-#: src/main/coerce.c:2069
+#: src/main/coerce.c:2070
 #, c-format
 msgid "%s() applied to non-(list or vector) of type '%s'"
 msgstr "'%s()' zastosowane do nie-listy lub nie-wektora typu '%s'"
 
-# src/main/coerce.c: 2219
-#  _("default method not implemented for type '%s'")
-# src/main/coerce.c: 2282
-#  _("default method not implemented for type '%s'")
-# src/main/coerce.c: 2350
-#  _("default method not implemented for type '%s'")
-#: src/main/coerce.c:2212 src/main/coerce.c:2275 src/main/coerce.c:2343
+#: src/main/coerce.c:2267 src/main/coerce.c:2331 src/main/coerce.c:2403
 #, c-format
 msgid "default method not implemented for type '%s'"
 msgstr "domyślna metoda nie jest zaimplementowana dla typu '%s'"
 
-# src/main/coerce.c: 2368
-#  _("'name' is missing")
-#: src/main/coerce.c:2361
+#: src/main/coerce.c:2425
 msgid "'name' is missing"
 msgstr "brakuje 'name'"
 
-# src/main/coerce.c: 2375
-# errorcall_return(call, _("first argument must be a character string"))
-#: src/main/coerce.c:2368
+#: src/main/coerce.c:2432
 msgid "first argument must be a character string"
 msgstr "pierwszy argument musi być łańcuchem tekstowym"
 
-# src/main/coerce.c: 2408
-# error(_("'what' must be a character string or a function"))
-#: src/main/coerce.c:2401
-msgid "'what' must be a character string or a function"
+#: src/main/coerce.c:2464
+msgid "'what' must be a function or character string"
 msgstr "argument 'what' musi być łańcuchem tekstowym lub funkcją"
 
-# src/main/coerce.c: 2412
-# error(_("'args' must be a list or expression"))
-#: src/main/coerce.c:2405
+#: src/main/coerce.c:2468
 msgid "'args' must be a list or expression"
 msgstr "'args' musi być listą lub wyrażeniem"
 
-# src/main/coerce.c: 2415
-# error(_("'args' must be a list"))
-#: src/main/coerce.c:2408
-msgid "'args' must be a list"
-msgstr "'args' musi być listą"
-
-# src/main/coerce.c: 2419
-# error(_("'envir' must be an environment"))
-#: src/main/coerce.c:2412
+#: src/main/coerce.c:2475 src/main/unique.c:1345
 msgid "'envir' must be an environment"
 msgstr "'envir' musi być środowiskiem"
 
-# src/main/coerce.c: 2574
-#  _("invalid environment specified")
-#: src/main/coerce.c:2567
+#: src/main/coerce.c:2634
 msgid "invalid environment specified"
 msgstr "określono niepoprawne środowisko"
 
-# src/main/coerce.c: 2640
-# warning(_("Setting class(x) to NULL;   result will no longer be an S4 object"))
-#: src/main/coerce.c:2633
+#: src/main/coerce.c:2700
 msgid "Setting class(x) to NULL;   result will no longer be an S4 object"
 msgstr "Ustawianie class(x) na NULL. Wynik nie będzie już dłużej obiektem S4"
 
-# src/main/coerce.c: 2643
-# warning(_("Setting class(x) to multiple strings (\"%s\", \"%s\", ...); result will no longer be an S4 object"),
-# 	    translateChar(STRING_ELT(newClass, 0)),
-# 	    translateChar(STRING_ELT(newClass, 1)))
-#: src/main/coerce.c:2636
+#: src/main/coerce.c:2703
 #, c-format
 msgid ""
 "Setting class(x) to multiple strings (\"%s\", \"%s\", ...); result will no "
@@ -3826,10 +1714,7 @@ msgstr ""
 "Ustawianie class(x) w wiele łańcuchów (\"%s\", \"%s\", ...). Wynik nie "
 "będzie już dłużej obiektem S4"
 
-# src/main/coerce.c: 2647
-# warning(_("Setting class(x) to \"%s\" sets attribute to NULL; result will no longer be an S4 object"),
-# 	    CHAR(asChar(newClass)))
-#: src/main/coerce.c:2640
+#: src/main/coerce.c:2707
 #, c-format
 msgid ""
 "Setting class(x) to \"%s\" sets attribute to NULL; result will no longer be "
@@ -3838,16 +1723,11 @@ msgstr ""
 "Ustawianie class(x) na \"%s\" ustawia atrybut na NULL. Wynik nie będzie już "
 "dłużej obiektem S4"
 
-# src/main/coerce.c: 2680
-# error(_("invalid replacement object to be a class string"))
-#: src/main/coerce.c:2673
+#: src/main/coerce.c:2740
 msgid "invalid replacement object to be a class string"
 msgstr "niepoprawny zastępujący obiekt na miejsce łańcucha klasy"
 
-# src/main/coerce.c: 2701
-# error(_("\"%s\" can only be set as the class if the object has this type; found \"%s\""),
-# 		      valueString, type2char(TYPEOF(obj)))
-#: src/main/coerce.c:2694
+#: src/main/coerce.c:2761
 #, c-format
 msgid ""
 "\"%s\" can only be set as the class if the object has this type; found \"%s\""
@@ -3855,10 +1735,7 @@ msgstr ""
 "\"%s\" można ustawić jako klasę jeśli obiekt posiada ten typ; znaleziono \"%s"
 "\""
 
-# src/main/coerce.c: 2719
-# error(_("invalid to set the class to matrix unless the dimension attribute is of length 2 (was %d)"),
-# 		 length(getAttrib(obj, R_DimSymbol)))
-#: src/main/coerce.c:2712
+#: src/main/coerce.c:2779
 #, c-format
 msgid ""
 "invalid to set the class to matrix unless the dimension attribute is of "
@@ -3867,523 +1744,248 @@ msgstr ""
 "niepoprawne ustawienie klasy na macierz chyba, że atrybut wymiaru jest "
 "długości 2 (było %d)"
 
-# src/main/coerce.c: 2727
-# error(_("cannot set class to \"array\" unless the dimension attribute has length > 0"))
-#: src/main/coerce.c:2720
+#: src/main/coerce.c:2787
 msgid ""
 "cannot set class to \"array\" unless the dimension attribute has length > 0"
 msgstr ""
 "nie można ustawić klasy na \"array\" chyba, że atrybut wymiaru ma długość > 0"
 
-# src/main/coerce.c: 2763
-# error(_("'value' must be non-null character string"))
-#: src/main/coerce.c:2756
+#: src/main/coerce.c:2823
 msgid "'value' must be non-null character string"
 msgstr "'value' musi być niepustym łańcuchem tekstowym"
 
-# src/library/base/R/mode.R: 37
-# stop("invalid to change the storage mode of a factor")
-# src/main/coerce.c: 2776
-# error(_("invalid to change the storage mode of a factor"))
-#: src/main/coerce.c:2769
+#: src/main/coerce.c:2836
 msgid "invalid to change the storage mode of a factor"
 msgstr "niepoprawna zmiana trybu przechowywania czynnika"
 
-# src/main/complex.c: 126
-#  _("invalid complex unary operator")
-#: src/main/complex.c:126
+#: src/main/complex.c:123
 msgid "invalid complex unary operator"
 msgstr "niepoprawny zespolony operator jednoargumentowy"
 
-# src/main/complex.c: 261
-# error(_("unimplemented complex operation"))
-#: src/main/complex.c:261
+#: src/main/complex.c:251
 msgid "unimplemented complex operation"
 msgstr "niezaimplementowana operacja zespolona"
 
-# src/main/complex.c: 363
-#  _("non-numeric argument to function")
-#: src/main/complex.c:363
+#: src/main/complex.c:353
 msgid "non-numeric argument to function"
 msgstr "argument nieliczbowy przekazany do funkcji"
 
-# src/main/complex.c: 827
-# error(_("invalid polynomial coefficient"))
-#: src/main/complex.c:827
+#: src/main/complex.c:822
 msgid "invalid polynomial coefficient"
 msgstr "niepoprawny współczynnik wielomianu"
 
-# src/main/complex.c: 832
-# error(_("root finding code failed"))
-#: src/main/complex.c:832
+#: src/main/complex.c:827
 msgid "root finding code failed"
 msgstr "kod znajdujący pierwiastki zawiódł"
 
-# src/main/connections.c: 153
-# error(_("all connections are in use"))
-#: src/main/connections.c:153
+#: src/main/connections.c:150
 msgid "all connections are in use"
 msgstr "wszystkie połączenia są w użyciu"
 
-# src/main/connections.c: 164
-# error(_("connection not found"))
-#: src/main/connections.c:164
+#: src/main/connections.c:161
 msgid "connection not found"
 msgstr "połączenie nie zostało znalezione"
 
-# src/main/connections.c: 175
-# error(_("invalid connection"))
-#: src/main/connections.c:175
+#: src/main/connections.c:172 src/main/connections.c:5213
 msgid "invalid connection"
 msgstr "niepoprawne połączenie"
 
-#: src/main/connections.c:207
+#: src/main/connections.c:204
 #, c-format
 msgid "closing unused connection %d (%s)\n"
 msgstr "zamykanie nieużywanego połączenia %d (%s)\n"
 
-# src/main/connections.c: 232
-#  _("unsupported conversion from '%s' to '%s'")
-# src/main/sysutils.c: 619
-# error(_("unsupported conversion from '%s' to '%s'"), from, to)
-# src/main/sysutils.c: 806
-# error(_("unsupported conversion from '%s' to '%s'"),
-# 		      "latin1", "")
-# src/main/sysutils.c: 821
-# error(_("unsupported conversion from '%s' to '%s'"),
-# 		      "latin1", "")
-# src/main/sysutils.c: 912
-# error(_("unsupported conversion from '%s' to '%s'"),
-# 		      "latin1", "")
-# src/main/sysutils.c: 927
-# error(_("unsupported conversion from '%s' to '%s'"),
-# 		      "latin1", "")
-# src/main/sysutils.c: 1023
-# error(_("unsupported conversion from '%s' to '%s'"), "latin1", "UTF-8")
-# src/main/sysutils.c: 1096
-# error(_("unsupported conversion from '%s' to '%s'"),
-# 		      "latin1", TO_WCHAR)
-# src/main/sysutils.c: 1106
-# error(_("unsupported conversion from '%s' to '%s'"),
-# 		      "latin1", TO_WCHAR)
-# src/main/sysutils.c: 1119
-# error(_("unsupported conversion from '%s' to '%s'"), "", TO_WCHAR)
-# src/main/sysutils.c: 1516
-# error(_("unsupported conversion from '%s' to '%s'"),
-# 		  UNICODE, "UTF-8")
-#: src/main/connections.c:232 src/main/sysutils.c:619 src/main/sysutils.c:806
-#: src/main/sysutils.c:821 src/main/sysutils.c:912 src/main/sysutils.c:927
-#: src/main/sysutils.c:1023 src/main/sysutils.c:1096 src/main/sysutils.c:1106
-#: src/main/sysutils.c:1119 src/main/sysutils.c:1516
+#: src/main/connections.c:229 src/main/sysutils.c:631 src/main/sysutils.c:834
+#: src/main/sysutils.c:849 src/main/sysutils.c:978 src/main/sysutils.c:1051
+#: src/main/sysutils.c:1061 src/main/sysutils.c:1074 src/main/sysutils.c:1472
 #, c-format
 msgid "unsupported conversion from '%s' to '%s'"
 msgstr "niewspierana konwersja z '%s' na '%s'"
 
-# src/main/connections.c: 288
-# error(_("%s not enabled for this connection"), "open")
-# src/main/connections.c: 304
-# error(_("%s not enabled for this connection"), "printing")
-# src/main/connections.c: 456
-# error(_("%s not enabled for this connection"), "'getc'")
-# src/main/connections.c: 462
-# error(_("%s not enabled for this connection"), "'seek'")
-# src/main/connections.c: 468
-# error(_("%s not enabled for this connection"), "truncation")
-# src/main/connections.c: 479
-# error(_("%s not enabled for this connection"), "'read'")
-# src/main/connections.c: 486
-# error(_("%s not enabled for this connection"), "'write'")
-#: src/main/connections.c:288 src/main/connections.c:304
-#: src/main/connections.c:456 src/main/connections.c:462
-#: src/main/connections.c:468 src/main/connections.c:479
-#: src/main/connections.c:486
+#: src/main/connections.c:285 src/main/connections.c:300
+#: src/main/connections.c:451 src/main/connections.c:456
+#: src/main/connections.c:461 src/main/connections.c:472
+#: src/main/connections.c:478
 #, c-format
 msgid "%s not enabled for this connection"
 msgstr "%s nie jest udostępnione dla tego połączenia"
 
-# src/gnuwin32/run.c: 715
-# warning("printing of extremely long output is truncated")
-# src/main/printutils.c: 773
-# warning("printing of extremely long output is truncated")
-# src/main/printutils.c: 787
-# warning("printing of extremely long output is truncated")
-# src/main/connections.c: 335
-# warning(_("printing of extremely long output is truncated"))
-# src/main/connections.c: 352
-# warning(_("printing of extremely long output is truncated"))
-# src/main/connections.c: 2916
-# warning(_("printing of extremely long output is truncated"))
-#: src/main/connections.c:335 src/main/connections.c:352
-#: src/main/connections.c:2916
+#: src/main/connections.c:330 src/main/connections.c:347
+#: src/main/connections.c:2910
 msgid "printing of extremely long output is truncated"
 msgstr "drukowanie wyjątkowo długiego wyjścia zostało przycięte"
 
-# src/main/connections.c: 375
-# warning(_("invalid char string in output conversion"))
-#: src/main/connections.c:375
+#: src/main/connections.c:370
 msgid "invalid char string in output conversion"
 msgstr "niepoprawny łańcuch znaków w wyjściowej konwersji"
 
-# src/main/connections.c: 439
-# warning(_("invalid input found on input connection '%s'"),
-# 			    con->description)
-#: src/main/connections.c:439
+#: src/main/connections.c:434
 #, c-format
 msgid "invalid input found on input connection '%s'"
 msgstr "znaleziono nieznane wejście w połączeniu wejściowym '%s'"
 
-# src/main/connections.c: 580
-# warning(_("cannot open file '%ls': %s"), wname, strerror(errno))
-#: src/main/connections.c:580
+#: src/main/connections.c:571
 #, c-format
 msgid "cannot open file '%ls': %s"
 msgstr "nie można otworzyć pliku '%ls': %s"
 
-# src/main/connections.c: 691
-# error(_("connection is not open for reading"))
-#: src/main/connections.c:691
+#: src/main/connections.c:683
 msgid "connection is not open for reading"
 msgstr "połączenie nie jest otwarte do odczytu"
 
-# src/main/connections.c: 696
-# error(_("connection is not open for writing"))
-#: src/main/connections.c:696
+#: src/main/connections.c:688
 msgid "connection is not open for writing"
 msgstr "połączenie nie jest otwarte do zapisu"
 
-# src/main/connections.c: 734
-# error(_("can only truncate connections open for writing"))
-# src/main/connections.c: 2229
-# error(_("can only truncate connections open for writing"))
-#: src/main/connections.c:734 src/main/connections.c:2229
+#: src/main/connections.c:726 src/main/connections.c:2223
 msgid "can only truncate connections open for writing"
 msgstr "można przyciąć tylko połączenia otwarte do zapisu"
 
-# src/main/connections.c: 738
-# error(_("file truncation failed"))
-# src/main/connections.c: 740
-# error(_("file truncation failed"))
-#: src/main/connections.c:738 src/main/connections.c:740
+#: src/main/connections.c:730 src/main/connections.c:732
 msgid "file truncation failed"
 msgstr "przycięcie pliku nie powiodło się"
 
-# src/main/connections.c: 742
-# error(_("file truncation unavailable on this platform"))
-#: src/main/connections.c:742
+#: src/main/connections.c:734
 msgid "file truncation unavailable on this platform"
 msgstr "obcięcie pliku nie jest dostępne na tej platformie"
 
-# src/main/connections.c: 788
-# error(_("allocation of file connection failed"))
-# src/main/connections.c: 792
-# error(_("allocation of file connection failed"))
-# src/main/connections.c: 798
-# error(_("allocation of file connection failed"))
-# src/main/connections.c: 815
-# error(_("allocation of file connection failed"))
-#: src/main/connections.c:788 src/main/connections.c:792
-#: src/main/connections.c:798 src/main/connections.c:815
+#: src/main/connections.c:780 src/main/connections.c:784
+#: src/main/connections.c:790 src/main/connections.c:807
 msgid "allocation of file connection failed"
 msgstr "przydział połączenia plikowego nie powiódł się"
 
-# src/main/connections.c: 866
-# warning(_("cannot create fifo '%s', reason '%s'"), name,
-# 			strerror(errno))
-# src/main/connections.c: 1044
-# warning(_("cannot create fifo '%s', reason '%s'"), 
-# 			hch_pipename, hch_err_msg)
-#: src/main/connections.c:866 src/main/connections.c:1044
+#: src/main/connections.c:858 src/main/connections.c:1035
 #, c-format
 msgid "cannot create fifo '%s', reason '%s'"
 msgstr "nie można utworzyć połączenia fifo '%s', powód '%s'"
 
-# src/main/connections.c: 872
-# warning(_("'%s' exists but is not a fifo"), name)
-#: src/main/connections.c:872
+#: src/main/connections.c:864
 #, c-format
 msgid "'%s' exists but is not a fifo"
 msgstr "'%s' istnieje, ale nie jest połączeniem fifo"
 
-# src/main/connections.c: 886
-# warning(_("fifo '%s' is not ready"), name)
-#: src/main/connections.c:886
+#: src/main/connections.c:878
 #, c-format
 msgid "fifo '%s' is not ready"
 msgstr "połączenie fifo '%s' nie jest gotowe"
 
-# src/main/connections.c: 887
-# warning(_("cannot open fifo '%s'"), name)
-#: src/main/connections.c:887
+#: src/main/connections.c:879
 #, c-format
 msgid "cannot open fifo '%s'"
 msgstr "nie można otworzyć kolejki fifo '%s'"
 
-# src/main/connections.c: 928
-# error(_("too large a block specified"))
-# src/main/connections.c: 939
-# error(_("too large a block specified"))
-# src/main/connections.c: 1104
-# error(_("too large a block specified"))
-# src/main/connections.c: 1123
-# error(_("too large a block specified"))
-# src/main/connections.c: 1531
-# error(_("too large a block specified"))
-# src/main/connections.c: 1541
-# error(_("too large a block specified"))
-# src/main/connections.c: 1660
-# error(_("too large a block specified"))
-# src/main/connections.c: 1720
-# error(_("too large a block specified"))
-# src/main/connections.c: 2246
-# error(_("too large a block specified"))
-# src/main/connections.c: 2263
-# error(_("too large a block specified"))
-# src/main/connections.c: 2572
-# error(_("too large a block specified"))
-# src/main/connections.c: 5305
-# error(_("too large a block specified"))
-# src/main/connections.c: 5369
-# error(_("too large a block specified"))
-#: src/main/connections.c:928 src/main/connections.c:939
-#: src/main/connections.c:1104 src/main/connections.c:1123
-#: src/main/connections.c:1531 src/main/connections.c:1541
-#: src/main/connections.c:1660 src/main/connections.c:1720
-#: src/main/connections.c:2246 src/main/connections.c:2263
-#: src/main/connections.c:2572 src/main/connections.c:5305
-#: src/main/connections.c:5369
+#: src/main/connections.c:920 src/main/connections.c:931
+#: src/main/connections.c:1095 src/main/connections.c:1114
+#: src/main/connections.c:1524 src/main/connections.c:1534
+#: src/main/connections.c:1653 src/main/connections.c:1713
+#: src/main/connections.c:2240 src/main/connections.c:2257
+#: src/main/connections.c:2566 src/main/connections.c:5385
+#: src/main/connections.c:5449
 msgid "too large a block specified"
 msgstr "określono zbyt duży blok"
 
-# src/main/connections.c: 998
-# error(_("allocation of fifo name failed"))
-# src/main/connections.c: 1004
-# error(_("allocation of fifo name failed"))
-#: src/main/connections.c:998 src/main/connections.c:1004
+#: src/main/connections.c:989 src/main/connections.c:995
 msgid "allocation of fifo name failed"
 msgstr "przydział nazwy fifo nie powiódł się"
 
-# src/main/connections.c: 1066
-# warning(_("cannot open fifo '%s', reason '%s'"), 
-# 		    hch_pipename, hch_err_msg)
-#: src/main/connections.c:1066
+#: src/main/connections.c:1057
 #, c-format
 msgid "cannot open fifo '%s', reason '%s'"
 msgstr "nie można otworzyć połączenia fifo '%s', powód '%s'"
 
-# src/main/connections.c: 1107
-# error(_("allocation of fifo buffer failed"))
-# src/main/connections.c: 1131
-# error(_("allocation of fifo buffer failed"))
-#: src/main/connections.c:1107 src/main/connections.c:1131
+#: src/main/connections.c:1098 src/main/connections.c:1122
 msgid "allocation of fifo buffer failed"
 msgstr "przydział bufora fifo nie powiódł się"
 
-# src/main/connections.c: 1139
-# warning(_("cannot write FIFO '%s'"), hch_err_msg)
-#: src/main/connections.c:1139
+#: src/main/connections.c:1130
 #, c-format
 msgid "cannot write FIFO '%s'"
 msgstr "nie można zapisać fifo '%s'"
 
-# src/main/connections.c: 1175
-# error(_("allocation of fifo connection failed"))
-# src/main/connections.c: 1179
-# error(_("allocation of fifo connection failed"))
-# src/main/connections.c: 1185
-# error(_("allocation of fifo connection failed"))
-# src/main/connections.c: 1201
-# error(_("allocation of fifo connection failed"))
-#: src/main/connections.c:1175 src/main/connections.c:1179
-#: src/main/connections.c:1185 src/main/connections.c:1201
+#: src/main/connections.c:1166 src/main/connections.c:1170
+#: src/main/connections.c:1176 src/main/connections.c:1192
 msgid "allocation of fifo connection failed"
 msgstr "przydział połączenia fifo nie powiódł się"
 
-# src/main/connections.c: 1219
-# warning(_("only first element of 'description' argument used"))
-# src/main/connections.c: 1377
-# warning(_("only first element of 'description' argument used"))
-# src/main/connections.c: 1998
-# warning(_("only first element of 'description' argument used"))
-# src/main/connections.c: 3212
-# warning(_("only first element of 'description' argument used"))
-# src/main/connections.c: 4967
-# warning(_("only first element of 'description' argument used"))
-#: src/main/connections.c:1219 src/main/connections.c:1377
-#: src/main/connections.c:1998 src/main/connections.c:3212
-#: src/main/connections.c:4967
+#: src/main/connections.c:1210 src/main/connections.c:1369
+#: src/main/connections.c:1991 src/main/connections.c:3205
+#: src/main/connections.c:4982
 msgid "only first element of 'description' argument used"
 msgstr "tylko pierwszy element argumentu 'description' został użyty"
 
-# src/main/connections.c: 1236
-# warning(_("fifo(\"\") only supports open = \"w+\" and open = \"w+b\": using the former"))
-#: src/main/connections.c:1236
+#: src/main/connections.c:1227
 msgid ""
 "fifo(\"\") only supports open = \"w+\" and open = \"w+b\": using the former"
 msgstr ""
 "'fifo(\"\")' wspiera tylko 'open = \"w+\"' oraz 'open = \"w+b\"': używanie "
 "pierwszego"
 
-# src/library/tools/src/gramRd.y: 1806
-# error(_("cannot open the connection"))
-# src/library/tools/src/gramRd.c: 4663
-# error(_("cannot open the connection"))
-# src/library/utils/src/io.c: 363
-# error(_("cannot open the connection"))
-# src/library/utils/src/io.c: 837
-# error(_("cannot open the connection"))
-# src/library/utils/src/io.c: 1040
-# error(_("cannot open the connection"))
-# src/main/saveload.c: 2267
-# error(_("cannot open the connection"))
-# src/main/saveload.c: 2350
-# error(_("cannot open the connection"))
-# src/main/dcf.c: 94
-# error(_("cannot open the connection"))
-# src/main/serialize.c: 2175
-# error(_("cannot open the connection"))
-# src/main/serialize.c: 2226
-# error(_("cannot open the connection"))
-# src/main/scan.c: 933
-# error(_("cannot open the connection"))
-# src/main/deparse.c: 352
-# error(_("cannot open the connection"))
-# src/main/deparse.c: 438
-# error(_("cannot open the connection"))
-# src/main/connections.c: 1250
-# error(_("cannot open the connection"))
-# src/main/connections.c: 1414
-# error(_("cannot open the connection"))
-# src/main/connections.c: 2064
-# error(_("cannot open the connection"))
-# src/main/connections.c: 3179
-# error(_("cannot open the connection"))
-# src/main/connections.c: 3232
-# error(_("cannot open the connection"))
-# src/main/connections.c: 3280
-# error(_("cannot open the connection"))
-# src/main/connections.c: 3567
-# error(_("cannot open the connection"))
-# src/main/connections.c: 3683
-# error(_("cannot open the connection"))
-# src/main/connections.c: 3844
-# error(_("cannot open the connection"))
-# src/main/connections.c: 4095
-# error(_("cannot open the connection"))
-# src/main/connections.c: 4423
-# error(_("cannot open the connection"))
-# src/main/connections.c: 4543
-# error(_("cannot open the connection"))
-# src/main/connections.c: 4755
-# error(_("cannot open the connection"))
-# src/main/connections.c: 5105
-# error(_("cannot open the connection"))
-# src/main/source.c: 265
-# error(_("cannot open the connection"))
-#: src/main/connections.c:1250 src/main/connections.c:1414
-#: src/main/connections.c:2064 src/main/connections.c:3179
-#: src/main/connections.c:3232 src/main/connections.c:3280
-#: src/main/connections.c:3567 src/main/connections.c:3683
-#: src/main/connections.c:3844 src/main/connections.c:4095
-#: src/main/connections.c:4423 src/main/connections.c:4543
-#: src/main/connections.c:4755 src/main/connections.c:5105 src/main/dcf.c:94
-#: src/main/deparse.c:352 src/main/deparse.c:438 src/main/saveload.c:2267
-#: src/main/saveload.c:2350 src/main/scan.c:933 src/main/serialize.c:2175
-#: src/main/serialize.c:2226 src/main/source.c:265
+#: src/main/connections.c:1242 src/main/connections.c:1407
+#: src/main/connections.c:2058 src/main/connections.c:3175
+#: src/main/connections.c:3226 src/main/connections.c:3274
+#: src/main/connections.c:3563 src/main/connections.c:3679
+#: src/main/connections.c:3841 src/main/connections.c:4106
+#: src/main/connections.c:4434 src/main/connections.c:4554
+#: src/main/connections.c:4768 src/main/connections.c:5180 src/main/dcf.c:93
+#: src/main/deparse.c:361 src/main/deparse.c:450 src/main/saveload.c:2269
+#: src/main/saveload.c:2350 src/main/scan.c:933 src/main/serialize.c:2216
+#: src/main/serialize.c:2267 src/main/source.c:270
 msgid "cannot open the connection"
 msgstr "nie można otworzyć połączenia"
 
-# src/main/connections.c: 1265
-# error(_("fifo connections are not available on this system"))
-#: src/main/connections.c:1265
+#: src/main/connections.c:1257
 msgid "fifo connections are not available on this system"
 msgstr "połączenia fifo nie są dostępne w tym systemie"
 
-# src/main/connections.c: 1295
-# warning(_("cannot pipe() cmd '%ls': %s"), wname, strerror(errno))
-#: src/main/connections.c:1295
+#: src/main/connections.c:1287
 #, c-format
 msgid "cannot pipe() cmd '%ls': %s"
 msgstr "nie można otworzyć 'pipe()' polecenie '%ls': %s"
 
-# src/main/connections.c: 1302
-# warning(_("cannot open pipe() cmd '%s': %s"), con->description,
-# 		strerror(errno))
-#: src/main/connections.c:1302
+#: src/main/connections.c:1294
 #, c-format
 msgid "cannot open pipe() cmd '%s': %s"
 msgstr "nie można otworzyć 'pipe()' polecenie '%s': %s"
 
-# src/main/connections.c: 1471
-# warning(_("cannot open compressed file '%s', probable reason '%s'"),
-# 		R_ExpandFileName(con->description), strerror(errno))
-# src/main/connections.c: 1791
-# warning(_("cannot open compressed file '%s', probable reason '%s'"),
-# 		R_ExpandFileName(con->description), strerror(errno))
-#: src/main/connections.c:1471 src/main/connections.c:1791
+#: src/main/connections.c:1464 src/main/connections.c:1784
 #, c-format
 msgid "cannot open compressed file '%s', probable reason '%s'"
 msgstr ""
 "nie można otworzyć skompresowanego pliku '%s', prawdopodobny powód '%s'"
 
-# src/main/connections.c: 1511
-# error(_("whence = \"end\" is not implemented for gzfile connections"))
-#: src/main/connections.c:1511
+#: src/main/connections.c:1504
 msgid "whence = \"end\" is not implemented for gzfile connections"
 msgstr "'whence = \"end\"' nie jest zaimplementowane dla połączeń gzfile"
 
-# src/main/connections.c: 1516
-# warning(_("seek on a gzfile connection returned an internal error"))
-#: src/main/connections.c:1516
+#: src/main/connections.c:1509
 msgid "seek on a gzfile connection returned an internal error"
 msgstr "przeszukiwanie połączenia gzfile zwróciło błąd wewnętrzny"
 
-# src/main/connections.c: 1550
-# error(_("allocation of gzfile connection failed"))
-# src/main/connections.c: 1554
-# error(_("allocation of gzfile connection failed"))
-# src/main/connections.c: 1560
-# error(_("allocation of gzfile connection failed"))
-# src/main/connections.c: 1577
-# error(_("allocation of gzfile connection failed"))
-#: src/main/connections.c:1550 src/main/connections.c:1554
-#: src/main/connections.c:1560 src/main/connections.c:1577
+#: src/main/connections.c:1543 src/main/connections.c:1547
+#: src/main/connections.c:1553 src/main/connections.c:1570
 msgid "allocation of gzfile connection failed"
 msgstr "przydział połączenia gzfile nie powiódł się"
 
-# src/main/connections.c: 1606
-# warning(_("cannot open bzip2-ed file '%s', probable reason '%s'"),
-# 		R_ExpandFileName(con->description), strerror(errno))
-#: src/main/connections.c:1606
+#: src/main/connections.c:1599
 #, c-format
 msgid "cannot open bzip2-ed file '%s', probable reason '%s'"
 msgstr "nie można otworzyć pliku bzip2 '%s', prawdopodobny powód '%s'"
 
-# src/main/connections.c: 1615
-# warning(_("file '%s' appears not to be compressed by bzip2"),
-# 		    R_ExpandFileName(con->description))
-#: src/main/connections.c:1615
+#: src/main/connections.c:1608
 #, c-format
 msgid "file '%s' appears not to be compressed by bzip2"
 msgstr "plik '%s' wydaje się nie być skompresowany przez bzip2"
 
-# src/main/connections.c: 1624
-# warning(_("initializing bzip2 compression for file '%s' failed"),
-# 		    R_ExpandFileName(con->description))
-#: src/main/connections.c:1624
+#: src/main/connections.c:1617
 #, c-format
 msgid "initializing bzip2 compression for file '%s' failed"
 msgstr "inicjowanie kompresji bzip2 dla pliku '%s' nie powiodło się"
 
-# src/main/connections.c: 1678
-# error(_("allocation of overflow buffer for bzfile failed"))
-#: src/main/connections.c:1678
+#: src/main/connections.c:1671
 msgid "allocation of overflow buffer for bzfile failed"
 msgstr "przydział bufora przepełnienia dla bzfile nie powiódł się"
 
-# src/main/connections.c: 1685
-# warning(_("file '%s' has trailing content that appears not to be compressed by bzip2"),
-# 				R_ExpandFileName(con->description))
-#: src/main/connections.c:1685
+#: src/main/connections.c:1678
 #, c-format
 msgid ""
 "file '%s' has trailing content that appears not to be compressed by bzip2"
@@ -4391,714 +1993,392 @@ msgstr ""
 "Plik '%s' posiada końcową treść, która wydaje się nie być skompresowana "
 "przez bzip2"
 
-# src/main/connections.c: 1731
-# error(_("allocation of bzfile connection failed"))
-# src/main/connections.c: 1735
-# error(_("allocation of bzfile connection failed"))
-# src/main/connections.c: 1741
-# error(_("allocation of bzfile connection failed"))
-# src/main/connections.c: 1758
-# error(_("allocation of bzfile connection failed"))
-#: src/main/connections.c:1731 src/main/connections.c:1735
-#: src/main/connections.c:1741 src/main/connections.c:1758
+#: src/main/connections.c:1724 src/main/connections.c:1728
+#: src/main/connections.c:1734 src/main/connections.c:1751
 msgid "allocation of bzfile connection failed"
 msgstr "przydział połączenia bzfile nie powiódł się"
 
-# src/main/connections.c: 1804
-# warning(_("cannot initialize lzma decoder, error %d"), ret)
-# src/main/connections.c: 5961
-# error(_("cannot initialize lzma decoder, error %d"), ret)
-#: src/main/connections.c:1804 src/main/connections.c:5961
+#: src/main/connections.c:1797 src/main/connections.c:6046
 #, c-format
 msgid "cannot initialize lzma decoder, error %d"
 msgstr "nie można zainicjować dekodera lzma, błąd %d"
 
-# src/main/connections.c: 1820
-# warning(_("cannot initialize lzma encoder, error %d"), ret)
-#: src/main/connections.c:1820
+#: src/main/connections.c:1813
 #, c-format
 msgid "cannot initialize lzma encoder, error %d"
 msgstr "nie można zainicjować enkodera lzma, błąd %d"
 
-# src/main/connections.c: 1948
-# error(_("allocation of xzfile connection failed"))
-# src/main/connections.c: 1952
-# error(_("allocation of xzfile connection failed"))
-# src/main/connections.c: 1958
-# error(_("allocation of xzfile connection failed"))
-# src/main/connections.c: 1976
-# error(_("allocation of xzfile connection failed"))
-#: src/main/connections.c:1948 src/main/connections.c:1952
-#: src/main/connections.c:1958 src/main/connections.c:1976
+#: src/main/connections.c:1941 src/main/connections.c:1945
+#: src/main/connections.c:1951 src/main/connections.c:1969
 msgid "allocation of xzfile connection failed"
 msgstr "przydział połączenia xcfile nie powiódł się"
 
-# src/main/connections.c: 2035
-# error(_("this is a %s-compressed file which this build of R does not support"), "lzop")
-#: src/main/connections.c:2035
+#: src/main/connections.c:2028
 #, c-format
 msgid "this is a %s-compressed file which this build of R does not support"
 msgstr "to jest plik skompresowany metodą '%s', której ta wersja R nie wspiera"
 
-# src/modules/X11/devX11.c: 3375
-# warning(_("memory allocation to copy clipboard failed"))
-# src/main/connections.c: 2130
-# warning(_("memory allocation to copy clipboard failed"))
-#: src/main/connections.c:2130 src/modules/X11/devX11.c:3375
+#: src/main/connections.c:2124 src/modules/X11/devX11.c:3381
 msgid "memory allocation to copy clipboard failed"
 msgstr "przydział pamięci do skopowiania zawartości schowka nie powiódł się"
 
-# src/modules/X11/devX11.c: 3354
-# warning(_("clipboard cannot be opened or contains no text"))
-# src/modules/X11/devX11.c: 3359
-# warning(_("clipboard cannot be opened or contains no text"))
-# src/main/connections.c: 2135
-# warning(_("clipboard cannot be opened or contains no text"))
-#: src/main/connections.c:2135 src/modules/X11/devX11.c:3354
-#: src/modules/X11/devX11.c:3359
+#: src/main/connections.c:2129 src/modules/X11/devX11.c:3360
+#: src/modules/X11/devX11.c:3365
 msgid "clipboard cannot be opened or contains no text"
 msgstr "schowek nie może zostać otworzony lub nie zawiera tekstu"
 
-# src/main/connections.c: 2146
-# warning(_("memory allocation to open clipboard failed"))
-#: src/main/connections.c:2146
+#: src/main/connections.c:2140
 msgid "memory allocation to open clipboard failed"
 msgstr "przydział pamięci aby otworzyć schowek nie powiódł się"
 
-# src/library/utils/src/windows/util.c: 312
-# warning(_("unable to open the clipboard"))
-# src/main/connections.c: 2174
-# warning(_("unable to open the clipboard"))
-#: src/main/connections.c:2174
+#: src/main/connections.c:2168
 msgid "unable to open the clipboard"
 msgstr "nie można otworzyć schowka"
 
-# src/library/utils/src/windows/util.c: 317
-# warning(_("unable to write to the clipboard"))
-# src/main/connections.c: 2178
-# warning(_("unable to write to the clipboard"))
-#: src/main/connections.c:2178
+#: src/main/connections.c:2172
 msgid "unable to write to the clipboard"
 msgstr "nie można zapisać do schowka"
 
-# src/main/connections.c: 2218
-# error(_("attempt to seek outside the range of the clipboard"))
-#: src/main/connections.c:2218
+#: src/main/connections.c:2212
 msgid "attempt to seek outside the range of the clipboard"
 msgstr "próbowa przeszukiwania poza zakresem schowka"
 
-# src/main/connections.c: 2261
-# error(_("clipboard connection is open for reading only"))
-#: src/main/connections.c:2261
+#: src/main/connections.c:2255
 msgid "clipboard connection is open for reading only"
 msgstr "połączenie ze schowkiem jest otwarte tylko do odczytu"
 
-# src/main/connections.c: 2281
-# warning(_("clipboard buffer is full and output lost"))
-#: src/main/connections.c:2281
+#: src/main/connections.c:2275
 msgid "clipboard buffer is full and output lost"
 msgstr "bufor schowka jest pełny oraz utracono wyjście"
 
-# src/main/connections.c: 2302
-# error(_("'mode' for the clipboard must be 'r' or 'w'"))
-#: src/main/connections.c:2302
+#: src/main/connections.c:2296
 msgid "'mode' for the clipboard must be 'r' or 'w'"
 msgstr "'mode' dla schowka musi być 'r' lub 'w'"
 
-# src/main/connections.c: 2305
-# error(_("'mode' for the clipboard must be 'r' on Unix"))
-#: src/main/connections.c:2305
+#: src/main/connections.c:2299
 msgid "'mode' for the clipboard must be 'r' on Unix"
 msgstr "'mode' dla schowka musi być 'r' w systemie Unix"
 
-# src/main/connections.c: 2308
-# error(_("allocation of clipboard connection failed"))
-# src/main/connections.c: 2314
-# error(_("allocation of clipboard connection failed"))
-# src/main/connections.c: 2320
-# error(_("allocation of clipboard connection failed"))
-# src/main/connections.c: 2337
-# error(_("allocation of clipboard connection failed"))
-#: src/main/connections.c:2308 src/main/connections.c:2314
-#: src/main/connections.c:2320 src/main/connections.c:2337
+#: src/main/connections.c:2302 src/main/connections.c:2308
+#: src/main/connections.c:2314 src/main/connections.c:2331
 msgid "allocation of clipboard connection failed"
 msgstr "przydział połączenia schowka nie powiódł się"
 
-# src/main/connections.c: 2406
-# error(_("allocation of terminal connection failed"))
-# src/main/connections.c: 2410
-# error(_("allocation of terminal connection failed"))
-# src/main/connections.c: 2416
-# error(_("allocation of terminal connection failed"))
-#: src/main/connections.c:2406 src/main/connections.c:2410
-#: src/main/connections.c:2416
+#: src/main/connections.c:2400 src/main/connections.c:2404
+#: src/main/connections.c:2410
 msgid "allocation of terminal connection failed"
 msgstr "przydział połączenia terminalu nie powiódł się"
 
-# src/main/connections.c: 2549
-# error(_("attempting to add too many elements to raw vector"))
-#: src/main/connections.c:2549
+#: src/main/connections.c:2543
 msgid "attempting to add too many elements to raw vector"
 msgstr "próba dodania zbyt wielu elementów do prostego wektora"
 
-# src/main/connections.c: 2601
-# error(_("attempt to seek outside the range of the raw connection"))
-#: src/main/connections.c:2601
+#: src/main/connections.c:2595
 msgid "attempt to seek outside the range of the raw connection"
 msgstr "próba przeszukiwania poza zakresem prostego połączenia"
 
-# src/main/connections.c: 2612
-# error(_("allocation of raw connection failed"))
-# src/main/connections.c: 2616
-# error(_("allocation of raw connection failed"))
-# src/main/connections.c: 2622
-# error(_("allocation of raw connection failed"))
-# src/main/connections.c: 2648
-# error(_("allocation of raw connection failed"))
-#: src/main/connections.c:2612 src/main/connections.c:2616
-#: src/main/connections.c:2622 src/main/connections.c:2648
+#: src/main/connections.c:2606 src/main/connections.c:2610
+#: src/main/connections.c:2616 src/main/connections.c:2642
 msgid "allocation of raw connection failed"
 msgstr "przydział prostego połączenia nie powiódł się"
 
-# src/main/connections.c: 2701
-# error(_("'con' is not a rawConnection"))
-#: src/main/connections.c:2701
+#: src/main/connections.c:2695
 msgid "'con' is not a rawConnection"
 msgstr "'con' nie jest rawConnection"
 
-# src/main/connections.c: 2704
-# error(_("'con' is not an output rawConnection"))
-#: src/main/connections.c:2704
+#: src/main/connections.c:2698
 msgid "'con' is not an output rawConnection"
 msgstr "'con' nie jest wyjściem rawConnection"
 
-# src/main/connections.c: 2742
-# error(_("too many characters for text connection"))
-#: src/main/connections.c:2742
+#: src/main/connections.c:2736
 msgid "too many characters for text connection"
 msgstr "zbyt dużo znaków dla połączenia tekstowego"
 
-# src/main/connections.c: 2747
-# error(_("cannot allocate memory for text connection"))
-#: src/main/connections.c:2747
+#: src/main/connections.c:2741
 msgid "cannot allocate memory for text connection"
 msgstr "nie można przydzielić pamięci dla połączenia tekstowego"
 
-# src/main/connections.c: 2796
-# error(_("seek is not relevant for text connection"))
-#: src/main/connections.c:2796
+#: src/main/connections.c:2790
 msgid "seek is not relevant for text connection"
 msgstr "przeszukiwanie nie jest właściwe dla połączenia tekstowego"
 
-# src/main/connections.c: 2804
-# error(_("allocation of text connection failed"))
-# src/main/connections.c: 2808
-# error(_("allocation of text connection failed"))
-# src/main/connections.c: 2814
-# error(_("allocation of text connection failed"))
-# src/main/connections.c: 2827
-# error(_("allocation of text connection failed"))
-# src/main/connections.c: 3012
-# error(_("allocation of text connection failed"))
-# src/main/connections.c: 3016
-# error(_("allocation of text connection failed"))
-# src/main/connections.c: 3022
-# error(_("allocation of text connection failed"))
-# src/main/connections.c: 3035
-# error(_("allocation of text connection failed"))
-# src/main/connections.c: 3041
-# error(_("allocation of text connection failed"))
-#: src/main/connections.c:2804 src/main/connections.c:2808
-#: src/main/connections.c:2814 src/main/connections.c:2827
-#: src/main/connections.c:3012 src/main/connections.c:3016
-#: src/main/connections.c:3022 src/main/connections.c:3035
-#: src/main/connections.c:3041
+#: src/main/connections.c:2798 src/main/connections.c:2802
+#: src/main/connections.c:2808 src/main/connections.c:2821
+#: src/main/connections.c:3008 src/main/connections.c:3012
+#: src/main/connections.c:3018 src/main/connections.c:3031
+#: src/main/connections.c:3037
 msgid "allocation of text connection failed"
 msgstr "przydział połączenia tekstowego nie powiódł się"
 
-# src/main/connections.c: 2989
-# warning(_("text connection: appending to a non-existent char vector"))
-#: src/main/connections.c:2989
+#: src/main/connections.c:2983
 msgid "text connection: appending to a non-existent char vector"
 msgstr "połączenie tekstowe: dołączanie do nieistniejącego wektora tekstowego"
 
-# src/main/connections.c: 3093
-# error(_("unsupported mode"))
-#: src/main/connections.c:3093
+#: src/main/connections.c:3089
 msgid "unsupported mode"
 msgstr "niewspierany tryb"
 
-# src/main/connections.c: 3115
-# error(_("'con' is not a textConnection"))
-#: src/main/connections.c:3115
+#: src/main/connections.c:3111
 msgid "'con' is not a textConnection"
 msgstr "'con' nie jest textConnection"
 
-# src/main/connections.c: 3118
-# error(_("'con' is not an output textConnection"))
-#: src/main/connections.c:3118
+#: src/main/connections.c:3114
 msgid "'con' is not an output textConnection"
 msgstr "'con' nie jest wyjściem textConnection"
 
-# src/main/connections.c: 3192
-# error(_("sockets are not available on this system"))
-#: src/main/connections.c:3192
-msgid "sockets are not available on this system"
-msgstr "gniazda nie są dostępne w tym systemie"
-
-# src/main/connections.c: 3260
-# error(_("'con' is not a connection"))
-# src/main/connections.c: 3309
-# error(_("'con' is not a connection"))
-# src/main/connections.c: 3320
-# error(_("'con' is not a connection"))
-# src/main/connections.c: 3367
-# error(_("'con' is not a connection"))
-# src/main/connections.c: 3392
-# error(_("'con' is not a connection"))
-# src/main/connections.c: 3415
-# error(_("'con' is not a connection"))
-# src/main/connections.c: 3427
-# error(_("'con' is not a connection"))
-# src/main/connections.c: 3543
-# error(_("'con' is not a connection"))
-# src/main/connections.c: 3668
-# error(_("'con' is not a connection"))
-# src/main/connections.c: 5408
-# error(_("'con' is not a connection"))
-#: src/main/connections.c:3260 src/main/connections.c:3309
-#: src/main/connections.c:3320 src/main/connections.c:3367
-#: src/main/connections.c:3392 src/main/connections.c:3415
-#: src/main/connections.c:3427 src/main/connections.c:3543
-#: src/main/connections.c:3668 src/main/connections.c:5408
+#: src/main/connections.c:3254 src/main/connections.c:3303
+#: src/main/connections.c:3314 src/main/connections.c:3361
+#: src/main/connections.c:3388 src/main/connections.c:3411
+#: src/main/connections.c:3423 src/main/connections.c:3539
+#: src/main/connections.c:3664 src/main/connections.c:5489
 msgid "'con' is not a connection"
 msgstr "'con' nie jest połączeniem"
 
-# src/main/connections.c: 3263
-# error(_("cannot open standard connections"))
-#: src/main/connections.c:3263
+#: src/main/connections.c:3257
 msgid "cannot open standard connections"
 msgstr "nie można otworzyć standardowych połączeń"
 
-# src/main/connections.c: 3265
-# warning(_("connection is already open"))
-#: src/main/connections.c:3265
+#: src/main/connections.c:3259
 msgid "connection is already open"
 msgstr "połączenie jest już otwarte"
 
-# src/main/connections.c: 3298
-# error(_("unknown 'rw' value"))
-#: src/main/connections.c:3298
+#: src/main/connections.c:3292
 msgid "unknown 'rw' value"
 msgstr "nieznana wartość 'rw'"
 
-# src/main/connections.c: 3369
-# error(_("cannot close standard connections"))
-#: src/main/connections.c:3369
+#: src/main/connections.c:3363
 msgid "cannot close standard connections"
 msgstr "nie można zamknąć standardowych połączeń"
 
-# src/main/connections.c: 3372
-# error(_("cannot close 'output' sink connection"))
-#: src/main/connections.c:3372
+#: src/main/connections.c:3366
 msgid "cannot close 'output' sink connection"
 msgstr "nie można zamknąć połączenia sink 'output'"
 
-# src/main/connections.c: 3374
-# error(_("cannot close 'message' sink connection"))
-#: src/main/connections.c:3374
+#: src/main/connections.c:3368
 msgid "cannot close 'message' sink connection"
 msgstr "nie można zamknąć połączenia sink 'message'"
 
-# src/main/serialize.c: 1996
-# error(_("connection is not open"))
-# src/main/serialize.c: 2004
-# error(_("connection is not open"))
-# src/main/connections.c: 3394
-# error(_("connection is not open"))
-# src/main/connections.c: 5123
-# error(_("connection is not open"))
-# src/main/connections.c: 5131
-# error(_("connection is not open"))
-#: src/main/connections.c:3394 src/main/connections.c:5123
-#: src/main/connections.c:5131 src/main/serialize.c:1996
-#: src/main/serialize.c:2004
+#: src/main/connections.c:3390 src/main/connections.c:5198
+#: src/main/connections.c:5206 src/main/serialize.c:2035
+#: src/main/serialize.c:2043
 msgid "connection is not open"
 msgstr "połączenie nie jest otwarte"
 
-# src/main/connections.c: 3490
-# error(_("line longer than buffer size"))
-# src/main/connections.c: 3502
-# error(_("line longer than buffer size"))
-#: src/main/connections.c:3490 src/main/connections.c:3502
+#: src/main/connections.c:3486 src/main/connections.c:3498
 msgid "line longer than buffer size"
 msgstr "linia jest dłuższa niż rozmiar bufora"
 
-# src/library/tools/src/gramRd.y: 1813
-# error(_("cannot read from this connection"))
-# src/library/tools/src/gramRd.c: 4670
-# error(_("cannot read from this connection"))
-# src/library/utils/src/io.c: 366
-# error(_("cannot read from this connection"))
-# src/library/utils/src/io.c: 370
-# error(_("cannot read from this connection"))
-# src/main/dcf.c: 101
-# error(_("cannot read from this connection"))
-# src/main/serialize.c: 1998
-# error(_("cannot read from this connection"))
-# src/main/scan.c: 936
-# error(_("cannot read from this connection"))
-# src/main/scan.c: 940
-# error(_("cannot read from this connection"))
-# src/main/connections.c: 3574
-# error(_("cannot read from this connection"))
-# src/main/connections.c: 3576
-# error(_("cannot read from this connection"))
-# src/main/connections.c: 3852
-# error(_("cannot read from this connection"))
-# src/main/connections.c: 4406
-# error(_("cannot read from this connection"))
-# src/main/connections.c: 4431
-# error(_("cannot read from this connection"))
-# src/main/connections.c: 5132
-# error(_("cannot read from this connection"))
-# src/main/source.c: 272
-# error(_("cannot read from this connection"))
-#: src/main/connections.c:3574 src/main/connections.c:3576
-#: src/main/connections.c:3852 src/main/connections.c:4406
-#: src/main/connections.c:4431 src/main/connections.c:5132 src/main/dcf.c:101
-#: src/main/scan.c:936 src/main/scan.c:940 src/main/serialize.c:1998
-#: src/main/source.c:272
+#: src/main/connections.c:3570 src/main/connections.c:3572
+#: src/main/connections.c:3849 src/main/connections.c:4417
+#: src/main/connections.c:4442 src/main/connections.c:5207 src/main/dcf.c:100
+#: src/main/scan.c:936 src/main/scan.c:940 src/main/serialize.c:2037
+#: src/main/source.c:277
 msgid "cannot read from this connection"
 msgstr "nie można czytać z tego połączenia"
 
-# src/main/connections.c: 3588
-# error(_("cannot allocate buffer in readLines"))
-# src/main/connections.c: 3610
-# error(_("cannot allocate buffer in readLines"))
-#: src/main/connections.c:3588 src/main/connections.c:3610
+#: src/main/connections.c:3584 src/main/connections.c:3606
 msgid "cannot allocate buffer in readLines"
 msgstr "nie można przydzielić bufora w 'readlines'"
 
-# src/main/connections.c: 3623
-# warning(_("line %d appears to contain an embedded nul"), nread + 1)
-#: src/main/connections.c:3623
+#: src/main/connections.c:3619
 #, c-format
 msgid "line %d appears to contain an embedded nul"
 msgstr "wygląda na to, że %d linia zawiera osadzony znak null"
 
-# src/main/connections.c: 3640
-# warning(_("incomplete final line found on '%s'"),
-# 			con->description)
-#: src/main/connections.c:3640
+#: src/main/connections.c:3636
 #, c-format
 msgid "incomplete final line found on '%s'"
 msgstr "niekompletna końcowa linia znaleziona w '%s'"
 
-# src/main/connections.c: 3646
-# error(_("too few lines read in readLines"))
-#: src/main/connections.c:3646
+#: src/main/connections.c:3642
 msgid "too few lines read in readLines"
 msgstr "zbyt mało linii odczytanych w 'readLines()'"
 
-# src/main/connections.c: 3749
-# warning(_("incomplete string at end of file has been discarded"))
-#: src/main/connections.c:3749
+#: src/main/connections.c:3746
 msgid "incomplete string at end of file has been discarded"
 msgstr "niekompletny łańcuch na końcu pliku został odrzucony"
 
-# src/main/connections.c: 3755
-# warning(_("null terminator not found: breaking string at 10000 bytes"))
-#: src/main/connections.c:3755
+#: src/main/connections.c:3752
 msgid "null terminator not found: breaking string at 10000 bytes"
 msgstr ""
 "ogranicznik 'null' nie został znaleziony: przerywanie łańcucha po 10000 "
 "bajtów"
 
-# src/main/connections.c: 3820
-# error(_("can only read from a binary connection"))
-#: src/main/connections.c:3820
+#: src/main/connections.c:3817
 msgid "can only read from a binary connection"
 msgstr "można czytać tylko z połączenia binarnego"
 
-# src/main/connections.c: 3869
-# error(_("size changing is not supported for complex vectors"))
-# src/main/connections.c: 4176
-# error(_("size changing is not supported for complex vectors"))
-#: src/main/connections.c:3869 src/main/connections.c:4176
+#: src/main/connections.c:3866 src/main/connections.c:4187
 msgid "size changing is not supported for complex vectors"
 msgstr "zmiana rozmiaru nie jest wspierana dla wektorów zespolonych"
 
-# src/main/connections.c: 3907
-# error(_("size %d is unknown on this machine"), size)
-# src/main/connections.c: 3925
-# error(_("size %d is unknown on this machine"), size)
-# src/main/connections.c: 3951
-# error(_("size %d is unknown on this machine"), size)
-# src/main/connections.c: 4010
-# error(_("size %d is unknown on this machine"), size)
-# src/main/connections.c: 4029
-# error(
-# 				  _("size %d is unknown on this machine"),
-# 				  size)
-# src/main/connections.c: 4157
-# error(_("size %d is unknown on this machine"), size)
-# src/main/connections.c: 4170
-# error(_("size %d is unknown on this machine"), size)
-# src/main/connections.c: 4229
-# error(_("size %d is unknown on this machine"), size)
-# src/main/connections.c: 4261
-# error(_("size %d is unknown on this machine"), size)
-#: src/main/connections.c:3907 src/main/connections.c:3925
-#: src/main/connections.c:3951 src/main/connections.c:4010
-#: src/main/connections.c:4030 src/main/connections.c:4157
-#: src/main/connections.c:4170 src/main/connections.c:4229
-#: src/main/connections.c:4261
+#: src/main/connections.c:3905 src/main/connections.c:3923
+#: src/main/connections.c:3949 src/main/connections.c:3993
+#: src/main/connections.c:4024 src/main/connections.c:4044
+#: src/main/connections.c:4168 src/main/connections.c:4181
+#: src/main/connections.c:4240 src/main/connections.c:4272
 #, c-format
 msgid "size %d is unknown on this machine"
 msgstr "rozmiar %d jest nieznany na tej maszynie"
 
-# src/main/connections.c: 3936
-# error(_("raw is always of size 1"))
-#: src/main/connections.c:3936
+#: src/main/connections.c:3934
 msgid "raw is always of size 1"
 msgstr "pusty obiekt zawsze posiada rozmiar 1"
 
-# src/main/connections.c: 3959
-# warning(_("'signed = FALSE' is only valid for integers of sizes 1 and 2"))
-#: src/main/connections.c:3959
+#: src/main/connections.c:3957
 msgid "'signed = FALSE' is only valid for integers of sizes 1 and 2"
 msgstr ""
 "'signed = FALSE' jest poprawny jedynie dla liczb całkowitych o rozmiarach 1 "
 "oraz 2"
 
-# src/main/connections.c: 4060
-# error(_("'x' is not an atomic vector type"))
-#: src/main/connections.c:4060
+#: src/main/connections.c:4071
 msgid "'x' is not an atomic vector type"
 msgstr "argument 'x' nie jest typem atomowego wektora"
 
-# src/main/connections.c: 4066
-# error(_("can only write to a binary connection"))
-#: src/main/connections.c:4066
+#: src/main/connections.c:4077
 msgid "can only write to a binary connection"
 msgstr "można zapisać tylko do połączenia binarnego"
 
-# src/main/connections.c: 4085
-# error(_("only 2^31-1 bytes can be written to a raw vector"))
-#: src/main/connections.c:4085
+#: src/main/connections.c:4096
 msgid "only 2^31-1 bytes can be written to a raw vector"
 msgstr "tylko 2^31-1 bajtów może być zapisane do prostego wektora"
 
-# src/main/connections.c: 4087
-# error(_("only 2^31-1 bytes can be written in a single writeBin() call"))
-#: src/main/connections.c:4087
+#: src/main/connections.c:4098
 msgid "only 2^31-1 bytes can be written in a single writeBin() call"
 msgstr "tylko 2^31-1 bajtów może być zapisane w jednym wywołaniu 'writeBin()'"
 
-# src/main/connections.c: 4136
-# warning(_("problem writing to connection"))
-# src/main/connections.c: 4289
-# warning(_("problem writing to connection"))
-# src/main/connections.c: 4570
-# warning(_("problem writing to connection"))
-# src/main/connections.c: 4610
-# warning(_("problem writing to connection"))
-#: src/main/connections.c:4136 src/main/connections.c:4289
-#: src/main/connections.c:4570 src/main/connections.c:4610
+#: src/main/connections.c:4147 src/main/connections.c:4300
+#: src/main/connections.c:4581 src/main/connections.c:4621
 msgid "problem writing to connection"
 msgstr "problem z zapisywaniem do połączenia"
 
-# src/main/connections.c: 4181
-# error(_("size changing is not supported for raw vectors"))
-#: src/main/connections.c:4181
+#: src/main/connections.c:4192
 msgid "size changing is not supported for raw vectors"
 msgstr "zmiana rozmiaru nie jest wspierana dla prostych wektorów"
 
-# src/main/connections.c: 4324
-# error(_("invalid UTF-8 input in readChar()"))
-# src/main/connections.c: 4328
-# error(_("invalid UTF-8 input in readChar()"))
-# src/main/connections.c: 4367
-# error(_("invalid UTF-8 input in readChar()"))
-#: src/main/connections.c:4324 src/main/connections.c:4328
-#: src/main/connections.c:4367
+#: src/main/connections.c:4335 src/main/connections.c:4339
+#: src/main/connections.c:4378
 msgid "invalid UTF-8 input in readChar()"
 msgstr "niepoprawne wejście UTF-8 w 'readChar()'"
 
-# src/main/connections.c: 4434
-# warning(_("can only read in bytes in a non-UTF-8 MBCS locale" ))
-#: src/main/connections.c:4434
+#: src/main/connections.c:4445
 msgid "can only read in bytes in a non-UTF-8 MBCS locale"
 msgstr "można czytać w bajtach jedynie w kodowaniu nie-UTF-8 MBCS"
 
-# src/main/connections.c: 4506
-# error(_("'object' is too short"))
-#: src/main/connections.c:4506
+#: src/main/connections.c:4517
 msgid "'object' is too short"
 msgstr "argument 'object' jest zbyt krótki"
 
-# src/main/connections.c: 4559
-# warning(_("writeChar: more bytes requested than are in the string - will zero-pad"))
-#: src/main/connections.c:4559
+#: src/main/connections.c:4570
 msgid "writeChar: more bytes requested than are in the string - will zero-pad"
 msgstr ""
 "writeChar: zażądano więcej bajtów niż jest w łańcuchu - zostaną wyzerowane"
 
-# src/main/connections.c: 4584
-# warning(_("writeChar: more characters requested than are in the string - will zero-pad"))
-#: src/main/connections.c:4584
+#: src/main/connections.c:4595
 msgid ""
 "writeChar: more characters requested than are in the string - will zero-pad"
 msgstr ""
 "writeChar: zażądano więcej znaków niż jest w łańcuchu - zostaną wyzerowane"
 
-# src/main/connections.c: 4638
-# error(_("maximum number of pushback lines exceeded"))
-#: src/main/connections.c:4638
+#: src/main/connections.c:4649
 msgid "maximum number of pushback lines exceeded"
 msgstr "przekroczono maksymalną liczbę zepchniętych linii"
 
-# src/main/connections.c: 4644
-# error(_("could not allocate space for pushback"))
-# src/main/connections.c: 4648
-# error(_("could not allocate space for pushback"))
-# src/main/connections.c: 4685
-# error(_("could not allocate space for pushback"))
-# src/main/connections.c: 4693
-# error(_("could not allocate space for pushback"))
-#: src/main/connections.c:4644 src/main/connections.c:4648
-#: src/main/connections.c:4685 src/main/connections.c:4693
+#: src/main/connections.c:4655 src/main/connections.c:4659
+#: src/main/connections.c:4696 src/main/connections.c:4704
 msgid "could not allocate space for pushback"
 msgstr "nie można przydzielić miejsca dla zepchnięcia"
 
-# src/main/connections.c: 4676
-# error(_("can only push back on open readable connections"))
-#: src/main/connections.c:4676
+#: src/main/connections.c:4687
 msgid "can only push back on open readable connections"
 msgstr "można zepchnąć tylko dla otwartych odczytywalnych połączeń"
 
-# src/main/connections.c: 4678
-# error(_("can only push back on text-mode connections"))
-#: src/main/connections.c:4678
+#: src/main/connections.c:4689
 msgid "can only push back on text-mode connections"
 msgstr "można zepchnąć tylko dla połączeń w trybie tekstowym"
 
-# src/main/connections.c: 4740
-# error(_("sink stack is full"))
-# src/main/connections.c: 4810
-# error(_("sink stack is full"))
-#: src/main/connections.c:4740 src/main/connections.c:4810
+#: src/main/connections.c:4753 src/main/connections.c:4823
 msgid "sink stack is full"
 msgstr "stos 'sink' jest pełny"
 
-# src/main/connections.c: 4743
-# error(_("cannot switch output to stdin"))
-#: src/main/connections.c:4743
+#: src/main/connections.c:4756
 msgid "cannot switch output to stdin"
 msgstr "nie można przełączyć wyjścia na 'stdin'"
 
-# src/main/connections.c: 4770
-# warning(_("no sink to remove"))
-#: src/main/connections.c:4770
+#: src/main/connections.c:4783
 msgid "no sink to remove"
 msgstr "brak 'sink' do usunięcia"
 
-# src/main/connections.c: 4892
-# error(_("there is no connection NA"))
-#: src/main/connections.c:4892
+#: src/main/connections.c:4903
 msgid "there is no connection NA"
 msgstr "brak połączenia NA"
 
-# src/main/connections.c: 4894
-# error(_("there is no connection %d"), what)
-#: src/main/connections.c:4894
+#: src/main/connections.c:4905
 #, c-format
 msgid "there is no connection %d"
 msgstr "brak połączenia %d"
 
-# src/main/connections.c: 5029
-# warning(_("file(\"\") only supports open = \"w+\" and open = \"w+b\": using the former"))
-#: src/main/connections.c:5029
+#: src/main/connections.c:5039
+msgid "method = \"wininet\" is only supported on Windows"
+msgstr "opcja 'method = \"wininet\"' jest wspierana tylko w systemie Windows"
+
+#: src/main/connections.c:5103
 msgid ""
 "file(\"\") only supports open = \"w+\" and open = \"w+b\": using the former"
 msgstr ""
 "'file(\"\")' wspiera tylko 'open = \"w+\"' oraz 'open = \"w+b\"': używanie "
 "pierwszego"
 
-# src/modules/internet/internet.c: 115
-# warning(_("unsupported URL scheme"))
-# src/modules/internet/internet.c: 569
-# error(_("unsupported URL scheme"))
-# src/main/connections.c: 5083
-# error(_("unsupported URL scheme"))
-#: src/main/connections.c:5083 src/modules/internet/internet.c:115
-#: src/modules/internet/internet.c:569
-msgid "unsupported URL scheme"
-msgstr "niewspierany schemat adresu URL"
-
-# src/main/connections.c: 5173
-# warning(_("file stream does not have gzip magic number"))
-#: src/main/connections.c:5173
+#: src/main/connections.c:5157
+msgid "URL scheme unsupported by this method"
+msgstr "schemat URL nie jest wspierany przez tę metodę"
+
+#: src/main/connections.c:5253
 msgid "file stream does not have gzip magic number"
 msgstr "strumień plikowy nie posiada magicznej liczby gzip"
 
-# src/main/connections.c: 5184
-# warning(_("file stream does not have valid gzip header"))
-#: src/main/connections.c:5184
+#: src/main/connections.c:5264
 msgid "file stream does not have valid gzip header"
 msgstr "strumień plikowy nie posiada poprawnego nagłówka gzip"
 
-# src/main/connections.c: 5249
-# error(_("writing error whilst flushing 'gzcon' connection"))
-#: src/main/connections.c:5249
+#: src/main/connections.c:5329
 msgid "writing error whilst flushing 'gzcon' connection"
 msgstr "błąd zapisu podczas czyszczenia połączenia gzcon"
 
-#: src/main/connections.c:5351
+#: src/main/connections.c:5431
 #, c-format
 msgid "crc error %x %x\n"
 msgstr "błąd crc %x %x\n"
 
-# src/main/connections.c: 5378
-# warning(_("write error on 'gzcon' connection"))
-#: src/main/connections.c:5378
+#: src/main/connections.c:5458
 msgid "write error on 'gzcon' connection"
 msgstr "błąd zapisu w połączeniu gzcon"
 
-# src/main/connections.c: 5412
-# error(_("'level' must be one of 0 ... 9"))
-#: src/main/connections.c:5412
+#: src/main/connections.c:5493
 msgid "'level' must be one of 0 ... 9"
 msgstr "argument 'level' musi być liczbą z zakresu 0 ... 9"
 
-# src/main/connections.c: 5415
-# error(_("'allowNonCompression' must be TRUE or FALSE"))
-#: src/main/connections.c:5415
+#: src/main/connections.c:5496
 msgid "'allowNonCompression' must be TRUE or FALSE"
 msgstr "argument 'allowNonCompression' musi być TRUE lub FALSE"
 
-# src/main/connections.c: 5418
-# warning(_("this is already a 'gzcon' connection"))
-#: src/main/connections.c:5418
+#: src/main/connections.c:5499
+msgid "'text' must be TRUE or FALSE"
+msgstr "argument 'text' musi mieć wartość TRUE lub FALSE"
+
+#: src/main/connections.c:5502
 msgid "this is already a 'gzcon' connection"
 msgstr "to już jest połączenie gzcon"
 
-# src/main/connections.c: 5424
-# error(_("can only use read- or write- binary connections"))
-#: src/main/connections.c:5424
+#: src/main/connections.c:5508
 msgid "can only use read- or write- binary connections"
 msgstr "można użyć tylko odczytywalnych lub zapisywalnych połączeń binarnych"
 
-# src/main/connections.c: 5427
-# warning(_("using a text-mode 'file' connection may not work correctly"))
-#: src/main/connections.c:5427
+#: src/main/connections.c:5511
 msgid "using a text-mode 'file' connection may not work correctly"
 msgstr "użycie trybu tekstowego połączenia 'file' może nie działać poprawnie"
 
-# src/main/connections.c: 5430
-# error(_("cannot create a 'gzcon' connection from a writable textConnection; maybe use rawConnection"))
-#: src/main/connections.c:5430
+#: src/main/connections.c:5514
 msgid ""
 "cannot create a 'gzcon' connection from a writable textConnection; maybe use "
 "rawConnection"
@@ -5106,218 +2386,117 @@ msgstr ""
 "nie można utworzyć połączenia gzcon z zapisywalnego połączenia "
 "'textConnection'; użyj być może 'rawConnection'"
 
-# src/main/connections.c: 5433
-# error(_("allocation of 'gzcon' connection failed"))
-# src/main/connections.c: 5437
-# error(_("allocation of 'gzcon' connection failed"))
-# src/main/connections.c: 5444
-# error(_("allocation of 'gzcon' connection failed"))
-# src/main/connections.c: 5458
-# error(_("allocation of 'gzcon' connection failed"))
-#: src/main/connections.c:5433 src/main/connections.c:5437
-#: src/main/connections.c:5444 src/main/connections.c:5458
+#: src/main/connections.c:5517 src/main/connections.c:5521
+#: src/main/connections.c:5528 src/main/connections.c:5542
 msgid "allocation of 'gzcon' connection failed"
 msgstr "przydział połączenia gzcon nie powiódł się"
 
-# src/main/connections.c: 5644
-# error(_("not a list of sockets"))
-#: src/main/connections.c:5644
+#: src/main/connections.c:5729
 msgid "not a list of sockets"
 msgstr "argument 'socklist' nie jest listą gniazd"
 
-# src/main/connections.c: 5649
-# error(_("bad write indicators"))
-#: src/main/connections.c:5649
+#: src/main/connections.c:5734
 msgid "bad write indicators"
 msgstr "błędne wskaźniki zapisu"
 
-# src/main/connections.c: 5660
-# error(_("not a socket connection"))
-#: src/main/connections.c:5660
+#: src/main/connections.c:5745
 msgid "not a socket connection"
 msgstr "to nie jest połączenie socket"
 
-# src/main/connections.c: 5905
-# warning(_("unknown compression, assuming none"))
-#: src/main/connections.c:5905
+#: src/main/connections.c:5990
 msgid "unknown compression, assuming none"
 msgstr "nieznana kompresja, zakładam brak"
 
-# src/main/connections.c: 6023
-# error(_("allocation of %s connection failed"), class_name)
-# src/main/connections.c: 6027
-# error(_("allocation of %s connection failed"), class_name)
-# src/main/connections.c: 6033
-# error(_("allocation of %s connection failed"), class_name)
-#: src/main/connections.c:6023 src/main/connections.c:6027
-#: src/main/connections.c:6033
+#: src/main/connections.c:6108 src/main/connections.c:6112
+#: src/main/connections.c:6118
 #, c-format
 msgid "allocation of %s connection failed"
 msgstr "przydział połączenia %s nie powiódł się"
 
-# src/main/context.c: 282
-# error(_("no loop for break/next, jumping to top level"))
-#: src/main/context.c:282
+#: src/main/context.c:316
 msgid "no loop for break/next, jumping to top level"
 msgstr ""
 "brak pętli do przerwania/przejścia dalej, przeskakiwanie do najwyższego "
 "poziomu"
 
-# src/main/context.c: 290
-# error(_("no function to return from, jumping to top level"))
-#: src/main/context.c:290
+#: src/main/context.c:324
 msgid "no function to return from, jumping to top level"
 msgstr ""
 "brak funkcji z której można powrócić, przeskakiwanie do najwyższego poziomu"
 
-# src/main/context.c: 302
-# error(_("target context is not on the stack"))
-#: src/main/context.c:302
+#: src/main/context.c:339
 msgid "target context is not on the stack"
 msgstr "kontekst celu nie jest na stosie"
 
-# src/main/context.c: 324
-#  _("not that many frames on the stack")
-# src/main/context.c: 340
-#  _("not that many frames on the stack")
-# src/main/context.c: 407
-#  _("not that many frames on the stack")
-# src/main/context.c: 428
-#  _("not that many frames on the stack")
-# src/main/context.c: 440
-#  _("not that many frames on the stack")
-# src/main/context.c: 452
-#  _("not that many frames on the stack")
-#: src/main/context.c:324 src/main/context.c:340 src/main/context.c:407
-#: src/main/context.c:428 src/main/context.c:440 src/main/context.c:452
+#: src/main/context.c:361 src/main/context.c:377 src/main/context.c:444
+#: src/main/context.c:465 src/main/context.c:477 src/main/context.c:489
 msgid "not that many frames on the stack"
 msgstr "nie tak wiele ramek na stosie"
 
-# src/main/context.c: 357
-#  _("only positive values of 'n' are allowed")
-#: src/main/context.c:357
+#: src/main/context.c:394
 msgid "only positive values of 'n' are allowed"
 msgstr "tylko dodatnie wartości 'n' są dozwolone"
 
-# src/main/context.c: 478
-# error(_("no function to restart"))
-#: src/main/context.c:478
-msgid "no function to restart"
-msgstr "brak funkcji którą można zrestartować"
-
-# src/main/context.c: 515
-# error(_("number of contexts must be positive"))
-#: src/main/context.c:515
+#: src/main/context.c:526
 msgid "number of contexts must be positive"
 msgstr "liczba kontekstów musi by dodatnia"
 
-# src/main/context.c: 528
-# error(_("no browser context to query"))
-#: src/main/context.c:528
+#: src/main/context.c:539
 msgid "no browser context to query"
 msgstr "brak kontekstu przeglądania zapytania"
 
-# src/main/context.c: 546
-# error(_("not that many calls to browser are active"))
-#: src/main/context.c:546
+#: src/main/context.c:557
 msgid "not that many calls to browser are active"
 msgstr "nie tak wiele aktywnych połączeń z przeglądarką"
 
-# src/main/context.c: 560
-# error(_("not that many functions on the call stack"))
-#: src/main/context.c:560
+#: src/main/context.c:571
 msgid "not that many functions on the call stack"
 msgstr "nie tak dużo funkcji na stosie wywołania"
 
-# src/main/context.c: 645
-# error(_("internal error in 'do_sys'"))
-#: src/main/context.c:645
+#: src/main/context.c:656
 msgid "internal error in 'do_sys'"
 msgstr "błąd wewnętrzny w 'do_sys'"
 
-# src/main/cum.c: 49
-# warning(_("integer overflow in 'cumsum'; use 'cumsum(as.numeric(.))'"))
 #: src/main/cum.c:49
 msgid "integer overflow in 'cumsum'; use 'cumsum(as.numeric(.))'"
 msgstr ""
-"przepełnienie całkowitoliczbowe w funkcji 'cumsum()'; użyj cumsum(as.numeric"
-"(.))'"
-
-# src/main/cum.c: 178
-#  _("'cummin' not defined for complex numbers")
-#: src/main/cum.c:178
-msgid "'cummin' not defined for complex numbers"
-msgstr "funkcja 'cummin()' nie jest określona dla liczb zespolonych"
+"przepełnienie całkowitoliczbowe w funkcji 'cumsum()'; użyj cumsum(as."
+"numeric(.))'"
 
-# src/main/cum.c: 181
-#  _("'cummax' not defined for complex numbers")
-#: src/main/cum.c:181
+#: src/main/cum.c:179
 msgid "'cummax' not defined for complex numbers"
 msgstr "funkcja 'cummax()' nie jest określona dla liczb zespolonych"
 
-# src/main/cum.c: 206
-#  _("unknown cumxxx function")
-# src/main/cum.c: 230
-#  _("unknown cumxxx function")
-#: src/main/cum.c:206 src/main/cum.c:230
+#: src/main/cum.c:182
+msgid "'cummin' not defined for complex numbers"
+msgstr "funkcja 'cummin()' nie jest określona dla liczb zespolonych"
+
+#: src/main/cum.c:209 src/main/cum.c:236
 msgid "unknown cumxxx function"
 msgstr "nieznana funkcja 'cumxxx()'"
 
-# src/main/datetime.c: 548
-# warning(_("problem with setting timezone"))
-# src/main/datetime.c: 556
-# warning(_("problem with setting timezone"))
-# src/main/datetime.c: 570
-# warning(_("problem with setting timezone"))
-# src/main/datetime.c: 575
-# warning(_("problem with setting timezone"))
-#: src/main/datetime.c:548 src/main/datetime.c:556 src/main/datetime.c:570
-#: src/main/datetime.c:575
+#: src/main/datetime.c:554 src/main/datetime.c:562 src/main/datetime.c:576
+#: src/main/datetime.c:581
 msgid "problem with setting timezone"
 msgstr "problem z ustawieniem strefy czasowej"
 
-# src/main/datetime.c: 560
-# warning(_("cannot set timezones on this system"))
-#: src/main/datetime.c:560
+#: src/main/datetime.c:566
 msgid "cannot set timezones on this system"
 msgstr "nie można ustawić stref czasowych na tym systemie"
 
-# src/main/datetime.c: 582
-# warning(_("problem with unsetting timezone"))
-# src/main/datetime.c: 584
-# warning(_("problem with unsetting timezone"))
-#: src/main/datetime.c:582 src/main/datetime.c:584
+#: src/main/datetime.c:588 src/main/datetime.c:590
 msgid "problem with unsetting timezone"
 msgstr "problem z wyłączeniem strefy czasowej"
 
-# src/main/datetime.c: 804
-# error(_("zero-length component in non-empty \"POSIXlt\" structure"))
-# src/main/datetime.c: 806
-# error(_("zero-length component in non-empty \"POSIXlt\" structure"))
-# src/main/datetime.c: 901
-# error(_("zero-length component in non-empty \"POSIXlt\" structure"))
-# src/main/datetime.c: 1240
-# error(_("zero-length component in non-empty \"POSIXlt\" structure"))
-# src/main/datetime.c: 1242
-# error(_("zero-length component in non-empty \"POSIXlt\" structure"))
-#: src/main/datetime.c:804 src/main/datetime.c:806 src/main/datetime.c:901
-#: src/main/datetime.c:1240 src/main/datetime.c:1242
+#: src/main/datetime.c:810 src/main/datetime.c:812 src/main/datetime.c:908
+#: src/main/datetime.c:1258 src/main/datetime.c:1260
 msgid "zero-length component in non-empty \"POSIXlt\" structure"
 msgstr "komponent o zerowej długości w niepustej strukturze \"POSIXlt\""
 
-# src/main/dcf.c: 113
-# error(_("could not allocate memory for 'read.dcf'"))
-# src/main/dcf.c: 181
-# error(_("could not allocate memory for 'read.dcf'"))
-# src/main/dcf.c: 253
-# error(_("could not allocate memory for 'read.dcf'"))
-#: src/main/dcf.c:113 src/main/dcf.c:181 src/main/dcf.c:253
+#: src/main/dcf.c:112 src/main/dcf.c:181 src/main/dcf.c:253
 msgid "could not allocate memory for 'read.dcf'"
 msgstr "nie można przydzielić pamięci dla 'read.dcf'"
 
-# src/main/dcf.c: 156
-# error(_("Found continuation line starting '%s ...' at begin of record."),
-# 			  line)
 #: src/main/dcf.c:156
 #, c-format
 msgid "Found continuation line starting '%s ...' at begin of record."
@@ -5325,720 +2504,388 @@ msgstr ""
 "Znaleziono linię kontynuacyjną rozpoczynającą się od '%s ...' na początku "
 "wiersza."
 
-# src/main/dcf.c: 282
-# error(_("Line starting '%s ...' is malformed!"), line)
 #: src/main/dcf.c:282
 #, c-format
 msgid "Line starting '%s ...' is malformed!"
 msgstr "Linia rozpoczynająca się od '%s ...' jest uszkodzona!"
 
-# src/main/debug.c: 45
-#  _("argument must be a closure")
-#: src/main/debug.c:45
-msgid "argument must be a closure"
-msgstr "argument musi być zamknięciem"
-
-# src/main/debug.c: 76
-#  _("argument must be a function")
-#: src/main/debug.c:76
+#: src/main/debug.c:46 src/main/debug.c:76
 msgid "argument must be a function"
 msgstr "argument musi być funkcją"
 
-# src/main/debug.c: 132
-#  _("argument must not be a function")
-# src/main/debug.c: 166
-#  _("argument must not be a function")
-# src/main/debug.c: 224
-#  _("argument must not be a function")
-#: src/main/debug.c:132 src/main/debug.c:166 src/main/debug.c:224
+#: src/main/debug.c:111
+#, c-format
+msgid "Value for '%s' must be TRUE or FALSE"
+msgstr "Wartość '%s' musi być TRUE lub FALSE"
+
+#: src/main/debug.c:139 src/main/debug.c:167 src/main/debug.c:241
 msgid "argument must not be a function"
 msgstr "argument nie może być funkcją"
 
-# src/main/debug.c: 135
-#  _("cannot trace NULL")
-#: src/main/debug.c:135
+#: src/main/debug.c:142
 msgid "cannot trace NULL"
 msgstr "nie można przypisać wartości NULL"
 
-# src/main/debug.c: 139
-#  _("'tracemem' is not useful for promise and environment objects")
-#: src/main/debug.c:139
+#: src/main/debug.c:146
 msgid "'tracemem' is not useful for promise and environment objects"
 msgstr "'tracemem' jest nieprzydatny dla obietnicy oraz obiektów środowiska"
 
-# src/main/debug.c: 142
-#  _("'tracemem' is not useful for weak reference or external pointer objects")
-#: src/main/debug.c:142
+#: src/main/debug.c:149
 msgid "'tracemem' is not useful for weak reference or external pointer objects"
 msgstr ""
 "'tracemem' jest nieprzydatny dla słabych referencji lub zewnętrznych "
 "wskaźników"
 
-# src/main/debug.c: 148
-#  _("R was not compiled with support for memory profiling")
-# src/main/debug.c: 171
-#  _("R was not compiled with support for memory profiling")
-#: src/main/debug.c:148 src/main/debug.c:171
+#: src/main/debug.c:180 src/main/debug.c:187
 msgid "R was not compiled with support for memory profiling"
 msgstr "R nie został skompilowany z obsługą profilowania pamięci"
 
-# src/library/graphics/src/plot3d.c: 1872
-# error(_("too few arguments"))
-# src/library/graphics/src/plot.c: 765
-# error(_("too few arguments"))
-# src/library/graphics/src/plot.c: 1298
-# error(_("too few arguments"))
-# src/library/graphics/src/plot.c: 1621
-# error(_("too few arguments"))
-# src/library/graphics/src/plot.c: 1686
-# error(_("too few arguments"))
-# src/library/graphics/src/plot.c: 1761
-# error(_("too few arguments"))
-# src/library/graphics/src/plot.c: 1827
-# error(_("too few arguments"))
-# src/library/graphics/src/plot.c: 1903
-# error(_("too few arguments"))
-# src/library/graphics/src/plot.c: 1998
-# error(_("too few arguments"))
-# src/library/graphics/src/plot.c: 2074
-# error(_("too few arguments"))
-# src/library/graphics/src/plot.c: 2352
-# error(_("too few arguments"))
-# src/library/graphics/src/plot.c: 2526
-# error(_("too few arguments"))
-# src/library/graphics/src/plot.c: 2742
-# error(_("too few arguments"))
-# src/library/graphics/src/plot.c: 3284
-# error(_("too few arguments"))
-# src/library/graphics/src/plot.c: 3411
-# error(_("too few arguments"))
-# src/library/graphics/src/plot.c: 3487
-# error(_("too few arguments"))
-# src/library/graphics/src/plot.c: 3653
-# error(_("too few arguments"))
-# src/library/graphics/src/plot.c: 3933
-# error(_("too few arguments"))
-# src/main/sprintf.c: 213
-# error(_("too few arguments"))
-# src/main/sprintf.c: 245
-# error(_("too few arguments"))
-# src/main/deparse.c: 152
-# error(_("too few arguments"))
-#: src/main/deparse.c:152 src/main/sprintf.c:213 src/main/sprintf.c:245
+#: src/main/deparse.c:156 src/main/sprintf.c:216 src/main/sprintf.c:248
 msgid "too few arguments"
 msgstr "zbyt mało argumentów"
 
-# src/main/deparse.c: 159
-# warning(_("invalid 'cutoff' value for 'deparse', using default"))
-#: src/main/deparse.c:159
+#: src/main/deparse.c:163
 msgid "invalid 'cutoff' value for 'deparse', using default"
 msgstr ""
 "niepoprawna wartość 'cutoff' w metodzie 'deparse()', używanie domyślnej "
 "wartości"
 
-# src/main/deparse.c: 247
-# warning(_("deparse of an S4 object will not be source()able"))
-#: src/main/deparse.c:247
+#: src/main/deparse.c:254
 msgid "deparse of an S4 object will not be source()able"
 msgstr ""
 "wynik konwersji wyrażenia na łańcuch tekstowy na obiekcie S4 nie będzie "
 "dostępny dla metody 'source()'"
 
-# src/main/deparse.c: 249
-# warning(_("deparse may be incomplete"))
-#: src/main/deparse.c:249
+#: src/main/deparse.c:256
 msgid "deparse may be incomplete"
 msgstr "konwersja wyrażenia na łańcuch może być niekompletna"
 
-# src/main/deparse.c: 251
-# warning(_("deparse may be not be source()able in R < 2.7.0"))
-#: src/main/deparse.c:251
+#: src/main/deparse.c:258
 msgid "deparse may be not be source()able in R < 2.7.0"
 msgstr ""
 "wynik konwersji wyrażenia na łańcuch tekstowy może być niedostępny dla "
 "metody 'source()' w R < 2.7.0"
 
-# src/main/deparse.c: 369
-# warning(_("wrote too few characters"))
-# src/main/deparse.c: 461
-# warning(_("wrote too few characters"))
-# src/main/deparse.c: 467
-# warning(_("wrote too few characters"))
-#: src/main/deparse.c:369 src/main/deparse.c:461 src/main/deparse.c:467
+#: src/main/deparse.c:350 src/main/deparse.c:400 src/main/source.c:206
+msgid "'file' must be a character string or connection"
+msgstr "argument 'file' musi być łańcuchem tekstowym lub połączeniem"
+
+#: src/main/deparse.c:378 src/main/deparse.c:473 src/main/deparse.c:479
 msgid "wrote too few characters"
 msgstr "zapisano zbyt mało znaków"
 
-# src/main/deparse.c: 391
-# error( _("character arguments expected"))
-#: src/main/deparse.c:391
+#: src/main/deparse.c:402
 msgid "character arguments expected"
 msgstr "oczekiwano argumentów tekstowych"
 
-# src/main/deparse.c: 394
-# error(_("zero-length argument"))
-#: src/main/deparse.c:394
+#: src/main/deparse.c:405
 msgid "zero-length argument"
 msgstr "argument o zerowej długości"
 
-# src/main/deparse.c: 401
-#  _("'opts' should be small non-negative integer")
-#: src/main/deparse.c:401
+#: src/main/deparse.c:412
 msgid "'opts' should be small non-negative integer"
 msgstr "argument 'opts' powinien być małą nieujemną liczbą całkowitą"
 
-# src/library/utils/R/package.skeleton.R: 71
-# warning(sprintf(ngettext(sum(!have),
-#                                  "object '%s' not found",
-#                                  "objects '%s' not found"),
-#                         paste(sQuote(list[!have]), collapse=", ")),
-#                 domain = NA)
-# src/main/saveload.c: 1978
-# error(_("object '%s' not found"), EncodeChar(PRINTNAME(TAG(t))))
-# src/main/saveload.c: 2309
-# error(_("object '%s' not found"), EncodeChar(PRINTNAME(TAG(t))))
-# src/main/serialize.c: 2727
-# error(_("object '%s' not found"), EncodeChar(STRING_ELT(vars, i)))
-# src/main/envir.c: 1764
-# warning(_("object '%s' not found"),
-# 		    EncodeChar(PRINTNAME(tsym)))
-# src/main/envir.c: 1846
-# error(_("object '%s' not found"),
-# 		      EncodeChar(PRINTNAME(t1)))
-# src/main/deparse.c: 411
-# warning(_("object '%s' not found"), EncodeChar(PRINTNAME(TAG(o))))
-# src/main/eval.c: 569
-# error(_("object '%s' not found"), EncodeChar(PRINTNAME(e)))
-# src/main/eval.c: 1251
-# error(_("object '%s' not found"), EncodeChar(PRINTNAME(symbol)))
-# src/main/eval.c: 3627
-# error(_("object '%s' not found"), EncodeChar(PRINTNAME(symbol)))
-#: src/main/deparse.c:411 src/main/envir.c:1764 src/main/envir.c:1846
-#: src/main/eval.c:569 src/main/eval.c:1251 src/main/eval.c:3627
-#: src/main/saveload.c:1978 src/main/saveload.c:2309 src/main/serialize.c:2727
+#: src/main/deparse.c:422 src/main/envir.c:1898 src/main/envir.c:1983
+#: src/main/eval.c:626 src/main/eval.c:1423 src/main/eval.c:4246
+#: src/main/saveload.c:1980 src/main/saveload.c:2312 src/main/serialize.c:2773
 #, c-format
 msgid "object '%s' not found"
 msgstr "nie znaleziono obiektu '%s'"
 
-# src/main/deparse.c: 1519
-# error(_("badly formed function expression"))
-#: src/main/deparse.c:1519
+#: src/main/deparse.c:1592
 msgid "badly formed function expression"
 msgstr "źle sformułowane wyrażenie dla funkcji"
 
-# src/library/graphics/src/base.c: 335
-# error(_("the base graphics system is not registered"))
-# src/library/graphics/src/base.c: 342
-# error(_("the base graphics system is not registered"))
-# src/library/graphics/src/base.c: 350
-# error(_("the base graphics system is not registered"))
-# src/main/devices.c: 44
-# error(_("the base graphics system is not registered"))
 #: src/main/devices.c:44
 msgid "the base graphics system is not registered"
 msgstr "bazowy system graficzny nie jest zarejestrowany"
 
-# src/main/devices.c: 165
-# error(_("no active or default device"))
-# src/main/devices.c: 172
-# error(_("no active or default device"))
-#: src/main/devices.c:165 src/main/devices.c:172
+#: src/main/devices.c:166 src/main/devices.c:174
 msgid "no active or default device"
 msgstr "brak aktywnego lub domyślnego urządzenia"
 
-# src/main/devices.c: 385
-# error(_("too many open devices"))
-# src/main/devices.c: 447
-# error(_("too many open devices"))
-#: src/main/devices.c:385 src/main/devices.c:447
+#: src/main/devices.c:388 src/main/devices.c:450
 msgid "too many open devices"
 msgstr "zbyt dużo otwartych urzadzeń"
 
-# src/main/devices.c: 474
-# error(_("not enough memory to allocate device (in GEcreateDevDesc)"))
-#: src/main/devices.c:474
+#: src/main/devices.c:491
 msgid "not enough memory to allocate device (in GEcreateDevDesc)"
 msgstr "zbyt mało pamięci aby przydzielić urządzenie (w GEcreateDevDesc)"
 
-# src/main/devices.c: 515
-# (_("Hit <Return> to see next plot: "), buf, 1024, 0)
-#: src/main/devices.c:515
+#: src/main/devices.c:532
 msgid "Hit <Return> to see next plot: "
 msgstr "Naciśnij <Enter> aby zobaczyć kolejny wykres: "
 
-# src/main/dotcode.c: 112
-#  _("NULL value passed as symbol address")
-# src/main/dotcode.c: 142
-#  _("NULL value passed as symbol address")
-#: src/main/dotcode.c:112 src/main/dotcode.c:142
+#: src/main/dotcode.c:127 src/main/dotcode.c:157
 msgid "NULL value passed as symbol address"
 msgstr "wartość NULL przekazana jako adres symbolu"
 
-# src/main/dotcode.c: 133
-#  _("Unimplemented type %d in createRSymbolObject")
-#: src/main/dotcode.c:133
+#: src/main/dotcode.c:148
 #, c-format
 msgid "Unimplemented type %d in createRSymbolObject"
 msgstr "Niezaimplementowany typ %d w 'createRSymbolObject'"
 
-# src/main/dotcode.c: 147
-# error(_("symbol '%s' is too long"), p)
-# src/main/dotcode.c: 237
-# error(_("symbol '%s' is too long"), p)
-#: src/main/dotcode.c:147 src/main/dotcode.c:237
+#: src/main/dotcode.c:162 src/main/dotcode.c:260
 #, c-format
 msgid "symbol '%s' is too long"
 msgstr "symbol '%s' jest zbyt długi"
 
-# src/main/dotcode.c: 159
-#  _("first argument must be a string (of length 1) or native symbol reference")
-#: src/main/dotcode.c:159
+#: src/main/dotcode.c:174
 msgid ""
 "first argument must be a string (of length 1) or native symbol reference"
 msgstr ""
 "pierwszy argument musi być łańcuchem (o długości 1) lub naturalnym "
 "symbolicznym powiązaniem"
 
-# src/main/dotcode.c: 201
-#  _("too many arguments in foreign function call")
-# src/main/dotcode.c: 563
-#  _("too many arguments in foreign function call")
-#: src/main/dotcode.c:201 src/main/dotcode.c:563
+#: src/main/dotcode.c:224 src/main/dotcode.c:1240
 msgid "too many arguments in foreign function call"
 msgstr "zbyt wiele argumentów w obcym wywołaniu funkcji"
 
-# src/main/dotcode.c: 213
-#  _("PACKAGE = \"\" is invalid")
-#: src/main/dotcode.c:213
+#: src/main/dotcode.c:236
 msgid "PACKAGE = \"\" is invalid"
 msgstr "'PACKAGE = \"\"' jest nieprawidłowe"
 
-# src/main/dotcode.c: 269
-#  _("\"%s\" not available for %s() for package \"%s\"")
-# src/main/dotcode.c: 274
-#  _("\"%s\" not available for %s() for package \"%s\"")
-# src/main/dotcode.c: 279
-#  _("\"%s\" not available for %s() for package \"%s\"")
-# src/main/dotcode.c: 284
-#  _("\"%s\" not available for %s() for package \"%s\"")
-#: src/main/dotcode.c:269 src/main/dotcode.c:274 src/main/dotcode.c:279
-#: src/main/dotcode.c:284
+#: src/main/dotcode.c:292 src/main/dotcode.c:297 src/main/dotcode.c:302
+#: src/main/dotcode.c:307
 #, c-format
 msgid "\"%s\" not available for %s() for package \"%s\""
 msgstr "\"%s\" nie jest dostępne dla metody '%s' w pakiecie '%s'"
 
-# src/main/dotcode.c: 289
-#  _("%s symbol name \"%s\" not in DLL for package \"%s\"")
-#: src/main/dotcode.c:289
+#: src/main/dotcode.c:312
 #, c-format
 msgid "%s symbol name \"%s\" not in DLL for package \"%s\""
 msgstr "nazwa symbolu '%s' \"%s\" nie jest w pliku DLL pakietu '%s'"
 
-# src/main/dotcode.c: 294
-#  _("%s symbol name \"%s\" not in load table")
-#: src/main/dotcode.c:294
+#: src/main/dotcode.c:317
 #, c-format
 msgid "%s symbol name \"%s\" not in load table"
 msgstr "nazwa symbolu '%s' \"%s\" nie jest w tablicy startowej"
 
-# src/main/dotcode.c: 348
-# warning(_("'%s' used more than once"), "NAOK")
-# src/main/dotcode.c: 352
-# warning(_("'%s' used more than once"), "DUP")
-# src/main/dotcode.c: 362
-# warning(_("'%s' used more than once"), "PACKAGE")
-# src/main/dotcode.c: 427
-# warning(_("'%s' used more than once"), "PACKAGE")
-# src/main/dotcode.c: 434
-# warning(_("'%s' used more than once"), "PACKAGE")
-#: src/main/dotcode.c:348 src/main/dotcode.c:352 src/main/dotcode.c:362
-#: src/main/dotcode.c:427 src/main/dotcode.c:434
+#: src/main/dotcode.c:368 src/main/dotcode.c:370 src/main/dotcode.c:380
+#: src/main/dotcode.c:445 src/main/dotcode.c:452
 #, c-format
 msgid "'%s' used more than once"
 msgstr "'%s został użyty więcej niż raz"
 
-# src/main/dotcode.c: 358
-# error(_("DLL name is too long"))
-#: src/main/dotcode.c:358
+#: src/main/dotcode.c:376
 msgid "DLL name is too long"
 msgstr "nazwa DLL jest zbyt długa"
 
-# src/main/dotcode.c: 403
-# error(_("PACKAGE argument must be a single character string"))
-#: src/main/dotcode.c:403
+#: src/main/dotcode.c:421
 msgid "PACKAGE argument must be a single character string"
 msgstr "argument PACKAGE musi być jednoznakowym łańcuchem tekstowym"
 
-# src/main/dotcode.c: 409
-# error(_("PACKAGE argument is too long"))
-#: src/main/dotcode.c:409
+#: src/main/dotcode.c:427
 msgid "PACKAGE argument is too long"
 msgstr "argument PACKAGE jest zbyt długi"
 
-# src/main/dotcode.c: 474
-# error(_("no arguments supplied"))
-#: src/main/dotcode.c:474
+#: src/main/dotcode.c:492
 msgid "no arguments supplied"
 msgstr "nie dostarczono argumentów"
 
-# src/library/base/R/seq.R: 105
-# stop("too many arguments")
-# src/main/dotcode.c: 475
-# error(_("too many arguments"))
-# src/main/seq.c: 913
-#  _("too many arguments")
-#: src/main/dotcode.c:475 src/main/seq.c:913
+#: src/main/dotcode.c:493 src/main/seq.c:904
 msgid "too many arguments"
 msgstr "zbyt dużo argumentów"
 
-# src/main/dotcode.c: 512
-#  _("'.NAME' is missing")
-# src/main/dotcode.c: 554
-#  _("'.NAME' is missing")
-# src/main/dotcode.c: 1397
-#  _("'.NAME' is missing")
-#: src/main/dotcode.c:512 src/main/dotcode.c:554 src/main/dotcode.c:1397
+#: src/main/dotcode.c:530 src/main/dotcode.c:1232 src/main/dotcode.c:1420
 msgid "'.NAME' is missing"
 msgstr "brakuje '.NAME'"
 
-# src/main/dotcode.c: 521
-#  _("Incorrect number of arguments (%d), expecting %d for '%s'")
-# src/main/dotcode.c: 570
-#  _("Incorrect number of arguments (%d), expecting %d for '%s'")
-# src/main/dotcode.c: 1418
-#  _("Incorrect number of arguments (%d), expecting %d for '%s'")
-#: src/main/dotcode.c:521 src/main/dotcode.c:570 src/main/dotcode.c:1418
+#: src/main/dotcode.c:539 src/main/dotcode.c:1247 src/main/dotcode.c:1441
 #, c-format
 msgid "Incorrect number of arguments (%d), expecting %d for '%s'"
 msgstr "Niepoprawna liczba argumentów (%d), oczekiwano %d dla '%s' "
 
-# src/main/dotcode.c: 1227
-#  _("too many arguments, sorry")
-# src/main/dotcode.c: 2276
-#  _("too many arguments, sorry")
-#: src/main/dotcode.c:1227 src/main/dotcode.c:2276
+#: src/main/dotcode.c:1216 src/main/dotcode.c:2290
 msgid "too many arguments, sorry"
 msgstr "zbyt dużo argumentów, przykro mi"
 
-# src/library/graphics/src/graphics.c: 2413
-# error(_("invalid graphics state"))
-# src/main/engine.c: 2993
-# error(_("invalid graphics state"))
-# src/main/dotcode.c: 1261
-#  _("invalid graphics state")
-# src/main/dotcode.c: 1278
-#  _("invalid graphics state")
-#: src/main/dotcode.c:1261 src/main/dotcode.c:1278 src/main/engine.c:2993
+#: src/main/dotcode.c:1284 src/main/dotcode.c:1301 src/main/engine.c:3013
 msgid "invalid graphics state"
 msgstr "niepoprawny stan grafiki"
 
-# src/main/dotcode.c: 1357
-# error(_("NULL value for DLLInfoReference when looking for DLL"))
-#: src/main/dotcode.c:1357
+#: src/main/dotcode.c:1380
 msgid "NULL value for DLLInfoReference when looking for DLL"
 msgstr "wartość NULL dla 'DLLInfoReference' gdy szukano DLL"
 
-# src/main/dotcode.c: 1458
-#  _("wrong type for argument %d in call to %s")
-#: src/main/dotcode.c:1458
+#: src/main/dotcode.c:1481
 #, c-format
 msgid "wrong type for argument %d in call to %s"
 msgstr "błędny typ dla argumentu %d przy odwołaniu do '%s'"
 
-# src/main/dotcode.c: 1470
-# error(_("explicit request not to duplicate arguments in call to '%s', but argument %d is of the wrong type (%d != %d)"),
-# 		      symName, na + 1, targetType, TYPEOF(s))
-#: src/main/dotcode.c:1470
-#, c-format
-msgid ""
-"explicit request not to duplicate arguments in call to '%s', but argument %d "
-"is of the wrong type (%d != %d)"
-msgstr ""
-"ścisłe żadanie aby nie powtarzać argumentów w wywołaniu '%s', ale argument "
-"%d posiada niepoprawny typ (%d != %d)"
-
-# src/main/dotcode.c: 1493
-# error(_("long vectors (argument %d) are not supported in %s"), 
-# 		  na + 1, Fort ? ".C" : ".Fortran")
-#: src/main/dotcode.c:1493
+#: src/main/dotcode.c:1510
 #, c-format
 msgid "long vectors (argument %d) are not supported in %s"
 msgstr "długie wektory (argument %d) nie są wspierane w %s"
 
-# src/main/dotcode.c: 1524
-# error(_("NAs in foreign function call (arg %d)"), na + 1)
-#: src/main/dotcode.c:1524
+#: src/main/dotcode.c:1541
 #, c-format
 msgid "NAs in foreign function call (arg %d)"
 msgstr "wartości NA w wywołaniu obcej funkcji (argument %d)"
 
-# src/main/dotcode.c: 1547
-# error(_("NA/NaN/Inf in foreign function call (arg %d)"), na + 1)
-#: src/main/dotcode.c:1547
+#: src/main/dotcode.c:1564
 #, c-format
 msgid "NA/NaN/Inf in foreign function call (arg %d)"
 msgstr "wartość NA/NaN/Inf w wywołaniu obcej funcji (argument %d)"
 
-# src/main/dotcode.c: 1552
-# warning(_("single values not returned if not duplicated"))
-#: src/main/dotcode.c:1552
-msgid "single values not returned if not duplicated"
-msgstr "pojedyncze wartości nie zostały zwrócone o ile nie są powtórzone"
-
-# src/main/dotcode.c: 1578
-# error(_("complex NA/NaN/Inf in foreign function call (arg %d)"), na + 1)
-#: src/main/dotcode.c:1578
+#: src/main/dotcode.c:1594
 #, c-format
 msgid "complex NA/NaN/Inf in foreign function call (arg %d)"
 msgstr "złożone wartości NA/NaN/Inf w wywołaniu obcej funkcji (argument %d)"
 
-# src/main/dotcode.c: 1597
-# error(_("character variables must be duplicated in .C/.Fortran"))
-#: src/main/dotcode.c:1597
-msgid "character variables must be duplicated in .C/.Fortran"
-msgstr "zmienne tekstowe muszą być powtórzone w  '.C/.Fortran'"
-
-# src/main/dotcode.c: 1602
-# warning(_("only first string in char vector used in .Fortran"))
-#: src/main/dotcode.c:1602
+#: src/main/dotcode.c:1616
 msgid "only first string in char vector used in .Fortran"
 msgstr "tylko pierwszy łańcuch w wektorze tekstowym został użyty w '.Fortran'"
 
-# src/main/dotcode.c: 1645
-# error(_("invalid mode (%s) to pass to Fortran (arg %d)"),
-# 			    type2char(t), na + 1)
-# src/main/dotcode.c: 1661
-# error(_("invalid mode (%s) to pass to Fortran (arg %d)"), 
-# 			    type2char(t), na + 1)
-# src/main/dotcode.c: 1672
-# error(_("invalid mode (%s) to pass to Fortran (arg %d)"), 
-# 			    type2char(t), na + 1)
-#: src/main/dotcode.c:1645 src/main/dotcode.c:1661 src/main/dotcode.c:1672
+#: src/main/dotcode.c:1659 src/main/dotcode.c:1675 src/main/dotcode.c:1686
 #, c-format
 msgid "invalid mode (%s) to pass to Fortran (arg %d)"
 msgstr "niepoprawny tryb (%s) do przekazania do Fortran (argument %d)"
 
-# src/main/dotcode.c: 1666
-# error(_("invalid mode (%s) to pass to C or Fortran (arg %d)"), 
-# 		  type2char(t), na + 1)
-#: src/main/dotcode.c:1666
+#: src/main/dotcode.c:1680
 #, c-format
 msgid "invalid mode (%s) to pass to C or Fortran (arg %d)"
 msgstr "niepoprawny tryb (%s) do przekazania do C lub Fortran (argument %d)"
 
-# src/main/dotcode.c: 1677
-# warning(_("pairlists are passed as SEXP as from R 2.15.0"))
-#: src/main/dotcode.c:1677
+#: src/main/dotcode.c:1691
 msgid "pairlists are passed as SEXP as from R 2.15.0"
 msgstr "sparowane listy, od wersji R 2.15.0, są przekazywane jako SEXP"
 
-# src/main/dotcode.c: 2499
-# error(_("type \"%s\" not supported in interlanguage calls"), s)
-#: src/main/dotcode.c:2499
+#: src/main/dotcode.c:2510
 #, c-format
 msgid "type \"%s\" not supported in interlanguage calls"
 msgstr "typ '%s' nie wspierany w wywołaniach międzyjęzykowych"
 
-# src/main/dotcode.c: 2604
-# error(_("mode '%s' is not supported in call_R"), modes[i])
-#: src/main/dotcode.c:2604
+#: src/main/dotcode.c:2615
 #, c-format
 msgid "mode '%s' is not supported in call_R"
 msgstr "tryb '%s' nie jest wspierany w 'call_R()'"
 
-# src/main/dounzip.c: 171
-# warning(_(" not overwriting file '%s"), outname)
-#: src/main/dounzip.c:171
+#: src/main/dounzip.c:172
 #, c-format
 msgid " not overwriting file '%s"
 msgstr "plik '%s' nie jest nadpisywany"
 
-# src/main/dounzip.c: 256
-# error(_("zip file '%s' cannot be opened"), zipname)
-#: src/main/dounzip.c:256
+#: src/main/dounzip.c:257
 #, c-format
 msgid "zip file '%s' cannot be opened"
 msgstr "plik zip '%s' nie może zostać otwarty"
 
-# src/main/dounzip.c: 312
-# error(_("invalid zip name argument"))
-#: src/main/dounzip.c:312
+#: src/main/dounzip.c:313
 msgid "invalid zip name argument"
 msgstr "niepoprawny argument nazwy pliku zip"
 
-# src/main/dounzip.c: 315
-# error(_("zip path is too long"))
-# src/main/dounzip.c: 409
-# warning(_("zip path is too long"))
-#: src/main/dounzip.c:315 src/main/dounzip.c:409
+#: src/main/dounzip.c:316 src/main/dounzip.c:410
 msgid "zip path is too long"
 msgstr "ścieżka do pliku zip jest zbyt długa"
 
-# src/main/dounzip.c: 332
-# error(_("'exdir' is too long"))
-#: src/main/dounzip.c:332
+#: src/main/dounzip.c:333
 msgid "'exdir' is too long"
 msgstr "'exdir' jest zbyt długi"
 
-# src/main/dounzip.c: 335
-# error(_("'exdir' does not exist"))
-#: src/main/dounzip.c:335
+#: src/main/dounzip.c:336
 msgid "'exdir' does not exist"
 msgstr "'exdir' nie istnieje"
 
-# src/main/dounzip.c: 363
-# warning(_("requested file not found in the zip file"))
-#: src/main/dounzip.c:363
+#: src/main/dounzip.c:364
 msgid "requested file not found in the zip file"
 msgstr "żądany plik nie został znaleziony w pliku zip"
 
-# src/main/dounzip.c: 366
-# warning(_("zip file is corrupt"))
-#: src/main/dounzip.c:366
+#: src/main/dounzip.c:367
 msgid "zip file is corrupt"
 msgstr "plik zip jest uszkodzony"
 
-# src/main/dounzip.c: 369
-# warning(_("CRC error in zip file"))
-#: src/main/dounzip.c:369
+#: src/main/dounzip.c:370
 msgid "CRC error in zip file"
 msgstr "błąd CRC w pliku zip"
 
-# src/main/dounzip.c: 376
-# warning(_("write error in extracting from zip file"))
-#: src/main/dounzip.c:376
+#: src/main/dounzip.c:377
 msgid "write error in extracting from zip file"
 msgstr "błąd zapisu podczas rozpakowywania pliku zip"
 
-# src/main/dounzip.c: 379
-# warning(_("error %d in extracting from zip file"), rc)
-#: src/main/dounzip.c:379
+#: src/main/dounzip.c:380
 #, c-format
 msgid "error %d in extracting from zip file"
 msgstr "błąd %d podczas rozpakowywania pliku zip"
 
-# src/main/dounzip.c: 404
-# warning(_("unz connections can only be opened for reading"))
-#: src/main/dounzip.c:404
+#: src/main/dounzip.c:405
 msgid "unz connections can only be opened for reading"
 msgstr "połączenia 'unz' mogą być otwarte tylko do odczytu"
 
-# src/main/dounzip.c: 415
-# warning(_("invalid description of 'unz' connection"))
-#: src/main/dounzip.c:415
+#: src/main/dounzip.c:416
 msgid "invalid description of 'unz' connection"
 msgstr "niepoprawny opis połączenia 'unz'"
 
-# src/main/dounzip.c: 421
-# warning(_("cannot open zip file '%s'"), path)
-#: src/main/dounzip.c:421
+#: src/main/dounzip.c:422
 #, c-format
 msgid "cannot open zip file '%s'"
 msgstr "nie można otworzyć pliku zip '%s'"
 
-# src/main/dounzip.c: 425
-# warning(_("cannot locate file '%s' in zip file '%s'"), p+1, path)
-#: src/main/dounzip.c:425
+#: src/main/dounzip.c:426
 #, c-format
 msgid "cannot locate file '%s' in zip file '%s'"
 msgstr "nie można znaleźć pliku '%s' w pliku zip '%s'"
 
-# src/main/dounzip.c: 469
-# error(_("printing not enabled for this connection"))
-#: src/main/dounzip.c:469
+#: src/main/dounzip.c:470
 msgid "printing not enabled for this connection"
 msgstr "drukowanie dla tego połączenia jest niedostępne"
 
-# src/main/dounzip.c: 476
-# error(_("write not enabled for this connection"))
 #: src/main/dounzip.c:476
 msgid "write not enabled for this connection"
 msgstr "zapis nie jest dostępny dla tego połączenia"
 
-# src/main/dounzip.c: 496
-# error(_("allocation of 'unz' connection failed"))
-# src/main/dounzip.c: 500
-# error(_("allocation of 'unz' connection failed"))
-# src/main/dounzip.c: 506
-# error(_("allocation of 'unz' connection failed"))
-# src/main/dounzip.c: 523
-# error(_("allocation of 'unz' connection failed"))
-#: src/main/dounzip.c:496 src/main/dounzip.c:500 src/main/dounzip.c:506
-#: src/main/dounzip.c:523
+#: src/main/dounzip.c:494 src/main/dounzip.c:498 src/main/dounzip.c:504
+#: src/main/dounzip.c:521
 msgid "allocation of 'unz' connection failed"
 msgstr "przydział połączenia 'unz' nie powiódł się"
 
-# src/main/dstruct.c: 90
-# error(_("invalid formal arguments for 'function'"))
 #: src/main/dstruct.c:90
 msgid "invalid formal arguments for 'function'"
 msgstr "niepoprawne formalne argumenty dla 'function'"
 
-# src/main/dstruct.c: 100
-# error(_("invalid body argument for 'function'"))
 #: src/main/dstruct.c:100
 msgid "invalid body argument for 'function'"
 msgstr "nieprawidłowe argumenty w ciele dla 'function'"
 
-# src/main/edit.c: 110
-# error(_("invalid argument to edit()"))
 #: src/main/edit.c:110
 msgid "invalid argument to edit()"
 msgstr "niepoprawny argument przekazany do 'edit()'"
 
-# src/main/edit.c: 121
-#  _("unable to open file")
-# src/main/saveload.c: 2076
-# error(_("unable to open file"))
-#: src/main/edit.c:121 src/main/saveload.c:2076
+#: src/main/edit.c:121 src/main/saveload.c:2078
 msgid "unable to open file"
 msgstr "nie można otworzyć pliku"
 
-# src/main/edit.c: 134
-#  _("argument 'editor' type not valid")
 #: src/main/edit.c:134
 msgid "argument 'editor' type not valid"
 msgstr "typ argumentu 'editor' nie jest poprawny"
 
-# src/main/edit.c: 136
-#  _("argument 'editor' is not set")
 #: src/main/edit.c:136
 msgid "argument 'editor' is not set"
 msgstr "argument 'editor' nie jest ustawiony"
 
-# src/main/edit.c: 141
-# error(_("'title' must be a string"))
 #: src/main/edit.c:141
 msgid "'title' must be a string"
 msgstr "'title' musi być łańcuchem tekstowym"
 
-# src/main/edit.c: 159
-#  _("unable to run editor '%s'")
 #: src/main/edit.c:159
 #, c-format
 msgid "unable to run editor '%s'"
 msgstr "nie można uruchomić edytora '%s'"
 
-# src/main/edit.c: 161
-# warningcall(call, _("editor ran but returned error status"))
 #: src/main/edit.c:161
 msgid "editor ran but returned error status"
 msgstr "edytor uruchomił się, ale zwrócił status błędu"
 
-# src/main/edit.c: 171
-#  _("problem with running editor %s")
 #: src/main/edit.c:171
 #, c-format
 msgid "problem with running editor %s"
 msgstr "problem z uruchomieniem edytora %s"
 
-# src/main/edit.c: 189
-#  _("unable to open file to read")
 #: src/main/edit.c:189
 msgid "unable to open file to read"
 msgstr "nie można otworzyć pliku do odczytu"
 
-# src/main/edit.c: 196
-#  _("%s occurred on line %d\n use a command like\n x <- edit()\n to recover")
 #: src/main/edit.c:196
 #, c-format
 msgid ""
@@ -6052,956 +2899,594 @@ msgstr ""
 " x <- edit()\n"
 " aby odzyskać"
 
-# src/main/engine.c: 40
-# error(_("Graphics API version mismatch"))
 #: src/main/engine.c:40
 msgid "Graphics API version mismatch"
 msgstr "Niezgodność wersji API grafiki"
 
-# src/main/engine.c: 113
-# error(_("unable to allocate memory (in GEregister)"))
-# src/main/engine.c: 118
-# error(_("unable to allocate memory (in GEregister)"))
-# src/main/engine.c: 182
-# error(_("unable to allocate memory (in GEregister)"))
 #: src/main/engine.c:113 src/main/engine.c:118 src/main/engine.c:182
 msgid "unable to allocate memory (in GEregister)"
 msgstr "nie można przydzielić pamięci (w 'GEregister')"
 
-# src/main/engine.c: 153
-# error(_("too many graphics systems registered"))
 #: src/main/engine.c:153
 msgid "too many graphics systems registered"
 msgstr "zbyt dużo zarejestrowanych systemów graficznych"
 
-# src/main/engine.c: 206
-# warning(_("no graphics system to unregister"))
 #: src/main/engine.c:206
 msgid "no graphics system to unregister"
 msgstr "niegraficzny system dla wyrejestrowania"
 
-# src/modules/X11/devX11.c: 1157
-# error(_("invalid line end"))
-# src/library/grDevices/src/devWindows.c: 784
-# error(_("invalid line end"))
-# src/library/grDevices/src/devPS.c: 2638
-# error(_("invalid line end"))
-# src/library/grDevices/src/devPS.c: 6409
-# error(_("invalid line end"))
-# src/main/engine.c: 443
-# error(_("invalid line end"))
-# src/main/engine.c: 448
-# error(_("invalid line end"))
-# src/main/engine.c: 456
-# error(_("invalid line end"))
-# src/main/engine.c: 463
-# error(_("invalid line end"))
-# src/main/engine.c: 477
-# error(_("invalid line end"))
 #: src/main/engine.c:443 src/main/engine.c:448 src/main/engine.c:456
-#: src/main/engine.c:463 src/main/engine.c:477 src/modules/X11/devX11.c:1157
+#: src/main/engine.c:463 src/main/engine.c:477 src/modules/X11/devX11.c:1159
 msgid "invalid line end"
 msgstr "niepoprawne zakończenie linii"
 
-# src/modules/X11/devX11.c: 1175
-# error(_("invalid line join"))
-# src/library/grDevices/src/devWindows.c: 797
-# error(_("invalid line join"))
-# src/library/grDevices/src/devPS.c: 2657
-# error(_("invalid line join"))
-# src/library/grDevices/src/devPS.c: 6428
-# error(_("invalid line join"))
-# src/main/engine.c: 508
-# error(_("invalid line join"))
-# src/main/engine.c: 513
-# error(_("invalid line join"))
-# src/main/engine.c: 521
-# error(_("invalid line join"))
-# src/main/engine.c: 528
-# error(_("invalid line join"))
-# src/main/engine.c: 542
-# error(_("invalid line join"))
 #: src/main/engine.c:508 src/main/engine.c:513 src/main/engine.c:521
-#: src/main/engine.c:528 src/main/engine.c:542 src/modules/X11/devX11.c:1175
+#: src/main/engine.c:528 src/main/engine.c:542 src/modules/X11/devX11.c:1177
 msgid "invalid line join"
 msgstr "niepoprawny łącznik linii"
 
-# src/main/engine.c: 761
-# error(_("'lwd' must be non-negative and finite"))
-# src/main/engine.c: 865
-# error(_("'lwd' must be non-negative and finite"))
-# src/main/engine.c: 1098
-# error(_("'lwd' must be non-negative and finite"))
-# src/main/engine.c: 1205
-# error(_("'lwd' must be non-negative and finite"))
-# src/main/engine.c: 1328
-# error(_("'lwd' must be non-negative and finite"))
-# src/main/engine.c: 1392
-# error(_("'lwd' must be non-negative and finite"))
 #: src/main/engine.c:761 src/main/engine.c:865 src/main/engine.c:1098
 #: src/main/engine.c:1205 src/main/engine.c:1328 src/main/engine.c:1392
 msgid "'lwd' must be non-negative and finite"
 msgstr "argument 'lwd' musi być skończoną nieujemną liczbą"
 
-# src/main/engine.c: 798
-# error(_("out of memory while clipping polyline"))
 #: src/main/engine.c:798
 msgid "out of memory while clipping polyline"
 msgstr "zabrakło pamięci podczas obcinania krzywej łamanej"
 
-# src/main/engine.c: 1386
-# warning(_("path rendering is not implemented for this device"))
 #: src/main/engine.c:1386
 msgid "path rendering is not implemented for this device"
 msgstr "renderowanie ścieżki nie jest zaimplementowane dla tego urządzenia"
 
-# src/main/engine.c: 1406
-# error(_("Invalid graphics path"))
 #: src/main/engine.c:1406
 msgid "Invalid graphics path"
 msgstr "Niepoprawna ścieżka grafiki"
 
-# src/main/engine.c: 1425
-# warning(_("raster rendering is not implemented for this device"))
 #: src/main/engine.c:1425
 msgid "raster rendering is not implemented for this device"
 msgstr "renderowanie rastrowe nie jest zaimplementowane dla tego urządzenia"
 
-# src/main/engine.c: 1449
-# warning(_("raster capture is not available for this device"))
 #: src/main/engine.c:1449
 msgid "raster capture is not available for this device"
 msgstr "przechwytywanie rastrowe nie jest dostępne dla tego urządzenia"
 
-# src/main/engine.c: 1656
-# error(_("font face %d not supported for font family '%s'"),
-# 		  fontface, VFontTable[familycode].name)
-#: src/main/engine.c:1656
+#: src/main/engine.c:1662
 #, c-format
 msgid "font face %d not supported for font family '%s'"
 msgstr "krój czcionki %d nie jest wspierany dla rodziny czcionek '%s'"
 
-# src/library/graphics/src/graphics.c: 2216
-# error(_("no graphics device is active"))
-# src/main/engine.c: 1972
-# error(_("no graphics device is active"))
-#: src/main/engine.c:1972
+#: src/main/engine.c:1978
 msgid "no graphics device is active"
 msgstr "brak aktywnego urządzenia graficznego"
 
-# src/main/engine.c: 2049
-# warning(_("pch value '%d' is invalid in this locale"), pch)
-#: src/main/engine.c:2049
+#: src/main/engine.c:2055
 #, c-format
 msgid "pch value '%d' is invalid in this locale"
 msgstr "niepoprawna wartość '%d' 'pch' w tej lokalizacji"
 
-# src/main/engine.c: 2307
-# warning(_("unimplemented pch value '%d'"), pch)
-#: src/main/engine.c:2307
+#: src/main/engine.c:2313
 #, c-format
 msgid "unimplemented pch value '%d'"
 msgstr "niezaimplementowana wartość '%d' 'pch'"
 
-# src/main/engine.c: 2330
-# error(_("invalid axis extents [GEPretty(.,.,n=%d)"), *ndiv)
-#: src/main/engine.c:2330
+#: src/main/engine.c:2336
 #, c-format
 msgid "invalid axis extents [GEPretty(.,.,n=%d)"
 msgstr "niepoprawne długości osi '[GEPretty(.,.,n=%d)]'"
 
-# src/main/engine.c: 2334
-# error(_("infinite axis extents [GEPretty(%g,%g,%d)]"), *lo, *up, *ndiv)
-#: src/main/engine.c:2334
+#: src/main/engine.c:2340
 #, c-format
 msgid "infinite axis extents [GEPretty(%g,%g,%d)]"
 msgstr "nieskończone długości osi '[GEPretty(%g,%g,%d)]'"
 
-# src/main/engine.c: 2371
-# warning(_(" .. GEPretty(.): new *lo = %g < %g = x1"), *lo, x1)
-#: src/main/engine.c:2371
+#: src/main/engine.c:2377
 #, c-format
 msgid " .. GEPretty(.): new *lo = %g < %g = x1"
 msgstr " .. 'GEPretty(.)': nowy *lo = %g < %g = x1"
 
-# src/main/engine.c: 2373
-# warning(_(" .. GEPretty(.): new *up = %g > %g = x2"), *up, x2)
-#: src/main/engine.c:2373
+#: src/main/engine.c:2379
 #, c-format
 msgid " .. GEPretty(.): new *up = %g > %g = x2"
 msgstr " .. 'GEPretty(.)': nowy *up = %g > %g = x2"
 
-# src/main/engine.c: 2773
-# warning(_("display list redraw incomplete"))
-#: src/main/engine.c:2773
+#: src/main/engine.c:2784
 msgid "display list redraw incomplete"
 msgstr "ponowne rozrysowanie wyświetlanej listy jest niekompletne"
 
-# src/main/engine.c: 2777
-# warning(_("invalid display list"))
-#: src/main/engine.c:2777
+#: src/main/engine.c:2788
 msgid "invalid display list"
 msgstr "niepoprawna lista wyświetleń"
 
-# src/main/engine.c: 2963
-# error(_("'expr' argument must be an expression"))
-#: src/main/engine.c:2963
+#: src/main/engine.c:2900
+#, c-format
+msgid ""
+"snapshot recorded with different graphics engine version (pre 11 - this is "
+"version %d)"
+msgstr ""
+"zrzut zapisany z inną wersją silnika grafiki (przed wersją 11 - to jest "
+"wersja %d)"
+
+#: src/main/engine.c:2904
+#, c-format
+msgid ""
+"snapshot recorded with different graphics engine version (%d - this is "
+"version %d)"
+msgstr "zrzut zapisany z inną wersją silnika grafiki (%d - to jest wersja %d)"
+
+#: src/main/engine.c:2983
 msgid "'expr' argument must be an expression"
 msgstr "argument 'expr' musi być wyrażeniem"
 
-# src/main/engine.c: 2965
-# error(_("'list' argument must be a list"))
-#: src/main/engine.c:2965
+#: src/main/engine.c:2985
 msgid "'list' argument must be a list"
 msgstr "argument 'list' musi być listą"
 
-# src/main/engine.c: 2971
-# error(_("'env' argument must be an environment"))
-#: src/main/engine.c:2971
+#: src/main/engine.c:2991
 msgid "'env' argument must be an environment"
 msgstr "argument 'env' musi być środowiskiem"
 
-# src/main/engine.c: 3051
-# error(_("invalid multibyte char in pch=\"c\""))
-# src/main/engine.c: 3059
-# error(_("invalid multibyte char in pch=\"c\""))
-#: src/main/engine.c:3051 src/main/engine.c:3059
+#: src/main/engine.c:3071 src/main/engine.c:3079
 msgid "invalid multibyte char in pch=\"c\""
 msgstr "niepoprawny znak wielobajtowy w 'pch=\"c\"'"
 
-# src/library/grDevices/src/colors.c: 1329
-# error(_("invalid hex digit in 'color' or 'lty'"))
-# src/main/engine.c: 3106
-# error(_("invalid hex digit in 'color' or 'lty'"))
-#: src/main/engine.c:3106
+#: src/main/engine.c:3126
 msgid "invalid hex digit in 'color' or 'lty'"
 msgstr "niepoprawna liczba szestnastkowa w argumencie 'color' lub 'lty'"
 
-# src/main/engine.c: 3129
-# error(_("invalid line type: must be length 2, 4, 6 or 8"))
-#: src/main/engine.c:3129
+#: src/main/engine.c:3149
 msgid "invalid line type: must be length 2, 4, 6 or 8"
 msgstr "niepoprawny typ linii: musi być długości 2, 4, 6 lub 8"
 
-# src/main/engine.c: 3133
-# error(_("invalid line type: zeroes are not allowed"))
-#: src/main/engine.c:3133
+#: src/main/engine.c:3153
 msgid "invalid line type: zeroes are not allowed"
 msgstr "niepoprawny typ linii: zera nie są dozwolone"
 
-# src/main/engine.c: 3142
-# error(_("invalid line type"))
-# src/main/engine.c: 3150
-# error(_("invalid line type"))
-# src/main/engine.c: 3157
-# error(_("invalid line type"))
-#: src/main/engine.c:3142 src/main/engine.c:3150 src/main/engine.c:3157
+#: src/main/engine.c:3162 src/main/engine.c:3170 src/main/engine.c:3177
 msgid "invalid line type"
 msgstr "niepoprawny typ linii"
 
-# src/main/envir.c: 120
-# error(_("cannot change value of locked binding for '%s'"), CHAR(PRINTNAME(TAG(__b__))))
-# src/main/envir.c: 132
-# error(_("cannot change value of locked binding for '%s'"), CHAR(PRINTNAME(__sym__)))
 #: src/main/envir.c:120 src/main/envir.c:132
 #, c-format
 msgid "cannot change value of locked binding for '%s'"
 msgstr "nie można zmienić wartości zablokowanego połączenia dla '%s'"
 
-# src/main/envir.c: 251
-# error(_("cannot add bindings to a locked environment"))
-# src/main/envir.c: 1454
-# error(_("cannot add bindings to a locked environment"))
-#: src/main/envir.c:251 src/main/envir.c:1454
+#: src/main/envir.c:251 src/main/envir.c:1530
 msgid "cannot add bindings to a locked environment"
 msgstr "nie można dodać powiązań do zablokowanego środowiska"
 
-# src/main/envir.c: 772
-# error(_("invalid cached value in R_GetGlobalCache"))
-#: src/main/envir.c:772
+#: src/main/envir.c:775
 msgid "invalid cached value in R_GetGlobalCache"
 msgstr "niepoprawna wartość cache w 'R_GetGlobalCache()'"
 
-# src/main/envir.c: 830
-# error(_("cannot unbind in the base namespace"))
-#: src/main/envir.c:830
+#: src/main/envir.c:836
 msgid "cannot unbind in the base namespace"
 msgstr "nie można odpiąć w bazowej przestrzeni nazw"
 
-# src/main/envir.c: 832
-# error(_("unbind in the base environment is unimplemented"))
-#: src/main/envir.c:832
+#: src/main/envir.c:838
 msgid "unbind in the base environment is unimplemented"
 msgstr "odpinanie w bazowym środowisku jest niezaimplementowane"
 
-# src/main/envir.c: 834
-# error(_("cannot remove bindings from a locked environment"))
-# src/main/envir.c: 1684
-# error(_("cannot remove bindings from a locked environment"))
-#: src/main/envir.c:834 src/main/envir.c:1684
+#: src/main/envir.c:840 src/main/envir.c:1818
 msgid "cannot remove bindings from a locked environment"
 msgstr "nie można usunąć powiązań z zablokowanego środowiska"
 
-# src/main/envir.c: 1139
-# error(_("argument to '%s' is not an environment"), "findVar")
-#: src/main/envir.c:1139
+#: src/main/envir.c:1213
 #, c-format
 msgid "argument to '%s' is not an environment"
 msgstr "argument przekazywany do '%s' nie jest środowiskiem"
 
-# src/main/envir.c: 1300
-# error(_("the ... list does not contain %d elements"), i)
-#: src/main/envir.c:1300
+#: src/main/envir.c:1374
 #, c-format
 msgid "the ... list does not contain %d elements"
 msgstr "lista '...' nie zawiera %d elementów"
 
-# src/main/envir.c: 1302
-# error(_("..%d used in an incorrect context, no ... to look in"), i)
-#: src/main/envir.c:1302
+#: src/main/envir.c:1376
 #, c-format
 msgid "..%d used in an incorrect context, no ... to look in"
 msgstr "..%d użyte w niepoprawnym znaczeniu, brak '...' do szukania"
 
-# src/main/envir.c: 1390
-# error(_("argument \"%s\" is missing, with no default"),
-# 		      CHAR(PRINTNAME(symbol)))
-# src/main/envir.c: 1842
-# error(_("argument \"%s\" is missing, with no default"),
-# 		  CHAR(PRINTNAME(t1)))
-# src/main/eval.c: 573
-# error(_("argument \"%s\" is missing, with no default"),
-# 			 CHAR(PRINTNAME(e)))
-# src/main/eval.c: 3618
-# error(_("argument \"%s\" is missing, with no default"), n)
-#: src/main/envir.c:1390 src/main/envir.c:1842 src/main/eval.c:573
-#: src/main/eval.c:3618
-#, c-format
-msgid "argument \"%s\" is missing, with no default"
-msgstr "brakuje argumentu '%s', a nie ma określonej wartości domyślnej"
-
-# src/main/envir.c: 1395
-# error(_("could not find function \"%s\""), EncodeChar(PRINTNAME(symbol)))
-#: src/main/envir.c:1395
+#: src/main/envir.c:1469
 #, c-format
 msgid "could not find function \"%s\""
 msgstr "nie udało się znaleźć funkcji '%s'"
 
-# src/main/envir.c: 1418
-# error(_("cannot assign values in the empty environment"))
-#: src/main/envir.c:1418
+#: src/main/envir.c:1492
 msgid "cannot assign values in the empty environment"
 msgstr "nie można przypisać wartości w pustym środowisku"
 
-# src/main/envir.c: 1424
-# error(_("cannot assign variables to this database"))
-# src/main/envir.c: 1497
-# error(_("cannot assign variables to this database"))
-#: src/main/envir.c:1424 src/main/envir.c:1497
+#: src/main/envir.c:1498 src/main/envir.c:1628
 msgid "cannot assign variables to this database"
 msgstr "nie można przypisać zmiennej do tej bazy danych"
 
-# src/main/envir.c: 1580
-# error(_("cannot add binding of '%s' to the base environment"),
-# 		  CHAR(PRINTNAME(symbol)))
-#: src/main/envir.c:1580
+#: src/main/envir.c:1714
 #, c-format
 msgid "cannot add binding of '%s' to the base environment"
 msgstr "nie można dodać powiązania '%s' do bazowego środowiska"
 
-# src/library/stats/src/deriv.c: 642
-# warning(_("only the first element is used as variable name"))
-# src/main/envir.c: 1609
-# warning(_("only the first element is used as variable name"))
-#: src/main/envir.c:1609
+#: src/main/envir.c:1743
 msgid "only the first element is used as variable name"
 msgstr "tylko pierwszy element jest używany jako nazwa zmiennej"
 
-# src/main/envir.c: 1641
-# error(_("first argument must be a named list"))
-#: src/main/envir.c:1641
+#: src/main/envir.c:1775
 msgid "first argument must be a named list"
 msgstr "pierwszy argument musi być nazwaną listą"
 
-# src/main/envir.c: 1646
-# error(_("names(x) must be a character vector of the same length as x"))
-#: src/main/envir.c:1646
+#: src/main/envir.c:1780
 msgid "names(x) must be a character vector of the same length as x"
 msgstr "'names(x)' musi być wektorem tekstowym tej samej długości co 'x'"
 
-# src/main/envir.c: 1649
-# error(_("'envir' argument must be an environment"))
-#: src/main/envir.c:1649
+#: src/main/envir.c:1783
 msgid "'envir' argument must be an environment"
 msgstr "argument 'envir' musi być środowiskiem"
 
-# src/main/envir.c: 1678
-# error(_("cannot remove variables from base namespace"))
-#: src/main/envir.c:1678
+#: src/main/envir.c:1812
 msgid "cannot remove variables from base namespace"
 msgstr "nie można usunąć zmiennych z bazowej przestrzeni nazw"
 
-# src/main/envir.c: 1680
-# error(_("cannot remove variables from the base environment"))
-#: src/main/envir.c:1680
+#: src/main/envir.c:1814
 msgid "cannot remove variables from the base environment"
 msgstr "nie można usunąć zmiennych z bazowego środowiska"
 
-# src/main/envir.c: 1682
-# error(_("cannot remove variables from the empty environment"))
-#: src/main/envir.c:1682
+#: src/main/envir.c:1816
 msgid "cannot remove variables from the empty environment"
 msgstr "nie można usunąć zmiennych z pustego środowiska"
 
-# src/main/envir.c: 1690
-# error(_("cannot remove variables from this database"))
-#: src/main/envir.c:1690
+#: src/main/envir.c:1824
 msgid "cannot remove variables from this database"
 msgstr "nie można usunąć zmiennych z tej bazy danych"
 
-# src/main/envir.c: 1849
-# error(_("object '%s' of mode '%s' was not found"),
-# 		      CHAR(PRINTNAME(t1)),
-# 		      CHAR(STRING_ELT(CAR(CDDR(args)), 0)))
-#: src/main/envir.c:1849
+#: src/main/envir.c:1985
 #, c-format
 msgid "object '%s' of mode '%s' was not found"
 msgstr "obiekt '%s' typu '%s' nie został znaleziony"
 
-# src/main/envir.c: 1921
-# error(_("invalid name in position %d"), i+1)
-#: src/main/envir.c:1921
+#: src/main/envir.c:2068
 #, c-format
 msgid "invalid name in position %d"
 msgstr "niepoprawna nazwa w pozycji %d"
 
-# src/main/envir.c: 1927
-# error(_("second argument must be an environment"))
-#: src/main/envir.c:1927
+#: src/main/envir.c:2074
 msgid "second argument must be an environment"
 msgstr "drugi argument musi być środowiskiem"
 
-# src/main/envir.c: 1935
-# error(_("wrong length for '%s' argument"), "mode")
-# src/main/envir.c: 1943
-# error(_("wrong length for '%s' argument"), "ifnotfound")
-#: src/main/envir.c:1935 src/main/envir.c:1943
+#: src/main/envir.c:2082 src/main/envir.c:2090
 #, c-format
 msgid "wrong length for '%s' argument"
 msgstr "błędna długość dla argumentu '%s'"
 
-# src/main/envir.c: 2062
-#  _("invalid use of 'missing'")
-#: src/main/envir.c:2062
+#: src/main/envir.c:2221
 msgid "invalid use of 'missing'"
 msgstr "niepoprawne użycie 'missing'"
 
-# src/main/envir.c: 2087
-#  _("'missing' can only be used for arguments")
-#: src/main/envir.c:2087
+#: src/main/envir.c:2247
 msgid "'missing' can only be used for arguments"
 msgstr "'missing' można użyć jedynie dla argumentów"
 
-# src/main/envir.c: 2168
-# error(_("'pos' must be an integer"))
-#: src/main/envir.c:2168
+#: src/main/envir.c:2333
 msgid "'pos' must be an integer"
 msgstr "'pos' musi być liczbą całkowitą"
 
-# src/main/envir.c: 2182
-# error(_("all elements of a list must be named"))
-#: src/main/envir.c:2182
+#: src/main/envir.c:2347
 msgid "all elements of a list must be named"
 msgstr "wszystkie elementy listy muszą być nazwane"
 
-# src/main/envir.c: 2205
-# error(_("'attach' only works for lists, data frames and environments"))
-#: src/main/envir.c:2205
+#: src/main/envir.c:2370
 msgid "'attach' only works for lists, data frames and environments"
 msgstr "'attach()' działa tylko dla list, ramek danych oraz środowisk"
 
-# src/main/envir.c: 2288
-# error(_("detaching \"package:base\" is not allowed"))
-#: src/main/envir.c:2288
+#: src/main/envir.c:2453
 msgid "detaching \"package:base\" is not allowed"
 msgstr "odłączenie \"package:base\" nie jest dozwolone"
 
-# src/main/envir.c: 2589
-# error(_("argument must be an environment"))
-# src/main/envir.c: 2644
-# error(_("argument must be an environment"))
-#: src/main/envir.c:2589 src/main/envir.c:2644
+#: src/main/envir.c:2798 src/main/envir.c:2879
 msgid "argument must be an environment"
 msgstr "argument musi być środowiskiem"
 
-# src/main/envir.c: 2648
-# error(_("arguments must be symbolic"))
-#: src/main/envir.c:2648
+#: src/main/envir.c:2883
 msgid "arguments must be symbolic"
 msgstr "argumenty muszą być symboliczne"
 
-# src/main/envir.c: 2772
-#  _("no enclosing environment")
-#: src/main/envir.c:2772
+#: src/main/envir.c:3032
 msgid "no enclosing environment"
 msgstr "brak wbudowanego środowiska"
 
-# src/main/envir.c: 2825
-#  _("no item called \"%s\" on the search list")
-#: src/main/envir.c:2825
+#: src/main/envir.c:3085
 #, c-format
 msgid "no item called \"%s\" on the search list"
 msgstr "brak pozycji o nazwie '%s' na liście wyszukiwania"
 
-#: src/main/envir.c:2850
+#: src/main/envir.c:3110
 msgid "using 'as.environment(NULL)' is defunct"
 msgstr "użycie 'as.environment(NULL)' jest przestarzałe"
 
-# src/main/envir.c: 2856
-#  _("S4 object does not extend class \"environment\"")
-#: src/main/envir.c:2856
+#: src/main/envir.c:3116
 msgid "S4 object does not extend class \"environment\""
 msgstr "obiekt S4 nie rozszerza klasy \"environment\""
 
-# src/main/envir.c: 2871
-#  _("invalid object for 'as.environment'")
-#: src/main/envir.c:2871
+#: src/main/envir.c:3131
 msgid "invalid object for 'as.environment'"
 msgstr "niepoprawny obiekt dla 'as.environment()'"
 
-# src/main/envir.c: 2897
-# error(_("not an environment"))
-# src/main/envir.c: 2925
-# error(_("not an environment"))
-# src/main/envir.c: 2954
-# error(_("not an environment"))
-# src/main/envir.c: 2975
-# error(_("not an environment"))
-# src/main/envir.c: 2998
-# error(_("not an environment"))
-# src/main/envir.c: 3033
-# error(_("not an environment"))
-# src/main/envir.c: 3054
-# error(_("not an environment"))
-#: src/main/envir.c:2897 src/main/envir.c:2925 src/main/envir.c:2954
-#: src/main/envir.c:2975 src/main/envir.c:2998 src/main/envir.c:3033
-#: src/main/envir.c:3054
+#: src/main/envir.c:3157 src/main/envir.c:3185 src/main/envir.c:3214
+#: src/main/envir.c:3235 src/main/envir.c:3258 src/main/envir.c:3293
+#: src/main/envir.c:3314
 msgid "not an environment"
 msgstr "atrybut nie jest środowiskiem"
 
-# src/main/envir.c: 2949
-# error(_("not a symbol"))
-# src/main/envir.c: 2970
-# error(_("not a symbol"))
-# src/main/envir.c: 2991
-# error(_("not a symbol"))
-# src/main/envir.c: 3028
-# error(_("not a symbol"))
-# src/main/envir.c: 3049
-# error(_("not a symbol"))
-# src/main/envir.c: 3148
-# error(_("not a symbol"))
-#: src/main/envir.c:2949 src/main/envir.c:2970 src/main/envir.c:2991
-#: src/main/envir.c:3028 src/main/envir.c:3049 src/main/envir.c:3148
+#: src/main/envir.c:3209 src/main/envir.c:3230 src/main/envir.c:3251
+#: src/main/envir.c:3288 src/main/envir.c:3309 src/main/envir.c:3408
 msgid "not a symbol"
 msgstr "argument nie jest symbolem"
 
-# src/main/envir.c: 2962
-# error(_("no binding for \"%s\""), EncodeChar(PRINTNAME(sym)))
-# src/main/envir.c: 2983
-# error(_("no binding for \"%s\""), EncodeChar(PRINTNAME(sym)))
-# src/main/envir.c: 3041
-# error(_("no binding for \"%s\""), EncodeChar(PRINTNAME(sym)))
-# src/main/envir.c: 3062
-# error(_("no binding for \"%s\""), EncodeChar(PRINTNAME(sym)))
-#: src/main/envir.c:2962 src/main/envir.c:2983 src/main/envir.c:3041
-#: src/main/envir.c:3062
+#: src/main/envir.c:3222 src/main/envir.c:3243 src/main/envir.c:3301
+#: src/main/envir.c:3322
 #, c-format
 msgid "no binding for \"%s\""
 msgstr "brak połączenia dla '%s'"
 
-# src/main/envir.c: 2993
-# error(_("not a function"))
-#: src/main/envir.c:2993
+#: src/main/envir.c:3253
 msgid "not a function"
 msgstr "argument 'fun' nie jest funkcją"
 
-# src/main/envir.c: 3001
-# error(_("symbol already has a regular binding"))
-# src/main/envir.c: 3017
-# error(_("symbol already has a regular binding"))
-#: src/main/envir.c:3001 src/main/envir.c:3017
+#: src/main/envir.c:3261 src/main/envir.c:3277
 msgid "symbol already has a regular binding"
 msgstr "symbol posiada już regularne powiązanie"
 
-# src/main/envir.c: 3003
-# error(_("cannot change active binding if binding is locked"))
-# src/main/envir.c: 3019
-# error(_("cannot change active binding if binding is locked"))
-#: src/main/envir.c:3003 src/main/envir.c:3019
+#: src/main/envir.c:3263 src/main/envir.c:3279
 msgid "cannot change active binding if binding is locked"
 msgstr ""
 "nie można zmienić aktywnego powiązania jeśli powiązanie jest zablokowane"
 
-# src/main/envir.c: 3107
-# error(_("unknown op"))
-#: src/main/envir.c:3107
+#: src/main/envir.c:3367 src/main/envir.c:3604
 msgid "unknown op"
 msgstr "nieznana opcja"
 
-# src/main/envir.c: 3152
-# error(_("cannot unbind a locked binding"))
-#: src/main/envir.c:3152
+#: src/main/envir.c:3412
 msgid "cannot unbind a locked binding"
 msgstr "nie można zwolnić zablokowanego łącza"
 
-# src/main/envir.c: 3154
-# error(_("cannot unbind an active binding"))
-#: src/main/envir.c:3154
+#: src/main/envir.c:3414
 msgid "cannot unbind an active binding"
 msgstr "nie można zwolnić aktywnego łącza"
 
-# src/main/envir.c: 3289
-#  _("bad namespace name")
-#: src/main/envir.c:3289
+#: src/main/envir.c:3555
 msgid "bad namespace name"
 msgstr "zła nazwa przestrzeni nazw"
 
-# src/main/envir.c: 3301
-#  _("namespace already registered")
-#: src/main/envir.c:3301
+#: src/main/envir.c:3567
 msgid "namespace already registered"
 msgstr "przestrzeń nazw jest już zarejestrowana"
 
-# src/main/envir.c: 3313
-#  _("namespace not registered")
-#: src/main/envir.c:3313
+#: src/main/envir.c:3579
 msgid "namespace not registered"
 msgstr "przestrzeń nazw nie została zarejestrowana"
 
-# src/main/envir.c: 3360
-# error(_("bad import environment argument"))
-#: src/main/envir.c:3360
+#: src/main/envir.c:3635
 msgid "bad import environment argument"
 msgstr "niepoprawny argument importu środowiska"
 
-# src/main/envir.c: 3365
-# error(_("bad export environment argument"))
-#: src/main/envir.c:3365
+#: src/main/envir.c:3640
 msgid "bad export environment argument"
 msgstr "niepoprawny argument eksportu środowiska"
 
-# src/main/envir.c: 3369
-# error(_("length of import and export names must match"))
-#: src/main/envir.c:3369
+#: src/main/envir.c:3644
 msgid "length of import and export names must match"
 msgstr "długości nazw importu oraz eksportu muszą się zgadzać"
 
-# src/main/envir.c: 3392
-# error(_("exported symbol '%s' has no value"),
-# 		      CHAR(PRINTNAME(expsym)))
-#: src/main/envir.c:3392
+#: src/main/envir.c:3667
 #, c-format
 msgid "exported symbol '%s' has no value"
 msgstr "eksportowny symbol '%s' nie ma wartości"
 
-# src/main/envir.c: 3557
-# error(_("unknown encoding: %d"), enc)
-#: src/main/envir.c:3557
+#: src/main/envir.c:3833
 #, c-format
 msgid "unknown encoding: %d"
 msgstr "nieznana strona kodowa: %d"
 
-# src/main/envir.c: 3577
-# error(_("embedded nul in string: '%s'"),
-# 	      EncodeString(c, 0, 0, Rprt_adj_none))
-#: src/main/envir.c:3577
+#: src/main/envir.c:3853
 #, c-format
 msgid "embedded nul in string: '%s'"
 msgstr "osadzony znak null w łańcuchu: '%s'"
 
-# src/main/errors.c: 178
-# (_("interrupts suspended; signal ignored"))
-# src/main/errors.c: 215
-# (_("interrupts suspended; signal ignored"))
-#: src/main/errors.c:178 src/main/errors.c:215
+#: src/main/errors.c:163 src/main/errors.c:200
 msgid "interrupts suspended; signal ignored"
 msgstr "przerwania zawieszone; sygnał został zignorowany"
 
-# src/main/errors.c: 318
-# error(_("invalid option \"warning.expression\""))
-#: src/main/errors.c:318
+#: src/main/errors.c:250
+msgid "[... truncated]"
+msgstr " [... przycięte]"
+
+#: src/main/errors.c:310
 msgid "invalid option \"warning.expression\""
 msgstr "niepoprawna opcja \"warning.expression\""
 
-# src/main/errors.c: 348
-#  _("(converted from warning) %s")
-#: src/main/errors.c:348
+#: src/main/errors.c:339
 #, c-format
 msgid "(converted from warning) %s"
 msgstr "(przetworzone z ostrzeżenia) %s"
 
-#: src/main/errors.c:359
-#, c-format
-msgid "Warning: %s\n"
-msgstr "Ostrzeżenie: %s\n"
+#: src/main/errors.c:349
+msgid "Warning:"
+msgstr "Ostrzeżenie:"
 
-#: src/main/errors.c:363
+#: src/main/errors.c:351
 #, c-format
-msgid "Warning in %s : %s\n"
-msgstr "Ostrzeżenie w poleceniu '%s': %s\n"
+msgid "Warning in %s :"
+msgstr "Ostrzeżenie w poleceniu '%s':"
 
-# src/main/errors.c: 365
-# (_("Warning in %s :\n  %s\n"), dcall, buf)
-#: src/main/errors.c:365
-#, c-format
-msgid ""
-"Warning in %s :\n"
-"  %s\n"
-msgstr ""
-"Ostrzeżenie w poleceniu '%s':\n"
-"  %s\n"
+#: src/main/errors.c:360 src/main/errors.c:374 src/main/errors.c:687
+msgid "Calls:"
+msgstr "Wywołania:"
 
-#: src/main/errors.c:428 src/main/errors.c:447 src/main/errors.c:596
+#: src/main/errors.c:421 src/main/errors.c:440 src/main/errors.c:602
 msgid "Lost warning messages\n"
 msgstr "Utracono komunikaty ostrzegawcze\n"
 
-#: src/main/errors.c:459
-msgid "Warning message:\n"
-msgid_plural "Warning messages:\n"
-msgstr[0] "Komunikat ostrzegawczy:\n"
-msgstr[1] "Komunikaty ostrzegawcze:\n"
-msgstr[2] "Komunikaty ostrzegawcze:\n"
+#: src/main/errors.c:452
+msgid "Warning message:"
+msgid_plural "Warning messages:"
+msgstr[0] "Komunikat ostrzegawczy:"
+msgstr[1] "Komunikaty ostrzegawcze:"
+msgstr[2] "Komunikaty ostrzegawcze:"
 
-#: src/main/errors.c:514
+#: src/main/errors.c:462 src/main/errors.c:490
 #, c-format
-msgid "There were %d warnings (use warnings() to see them)\n"
-msgstr "Było %d ostrzeżenie (użyj 'warnings()' aby je zobaczyć)\n"
+msgid "In %s :"
+msgstr "W poleceniu '%s':"
 
-#: src/main/errors.c:517
+#: src/main/errors.c:515
 #, c-format
-msgid "There were %d or more warnings (use warnings() to see the first %d)\n"
+msgid "There was %d warning (use warnings() to see it)"
+msgid_plural "There were %d warnings (use warnings() to see them)"
+msgstr[0] "Było %d ostrzeżenie (użyj 'warnings()' aby je zobaczyć)"
+msgstr[1] "Były %d ostrzeżenia (użyj 'warnings()' aby je zobaczyć)"
+msgstr[2] "Było %d ostrzeżenie (użyj 'warnings()' aby je zobaczyć)"
+
+#: src/main/errors.c:520
+#, c-format
+msgid "There were %d or more warnings (use warnings() to see the first %d)"
 msgstr ""
-"Było %d lub więcej ostrzeżeń (użyj 'warnings()' aby zobaczyć pierwsze %d)\n"
+"Było %d lub więcej ostrzeżeń (użyj 'warnings()' aby zobaczyć pierwsze %d)"
 
-# src/main/errors.c: 587
-# (_("Error during wrapup: "))
-#: src/main/errors.c:587
+#: src/main/errors.c:593
 msgid "Error during wrapup: "
 msgstr "Błąd podczas tworzenia skrótów:"
 
-# src/main/errors.c: 612
-#  _("Error in ")
-#: src/main/errors.c:612
+#: src/main/errors.c:618
 msgid "Error in "
 msgstr "Błąd w"
 
-# src/main/errors.c: 613
-#  _(" (from %s) : ")
-#: src/main/errors.c:613
+#: src/main/errors.c:640 src/main/errors.c:647
+#, c-format
+msgid "Error in %s (from %s) : "
+msgstr "Błąd w poleceniu '%s' (z %s): "
+
+#: src/main/errors.c:649
 #, c-format
-msgid " (from %s) : "
-msgstr "(z %s):"
+msgid "Error in %s : "
+msgstr "Błąd w poleceniu '%s':"
 
-# src/main/errors.c: 664
-#  _("Error: ")
-# src/main/errors.c: 670
-#  _("Error: ")
-#: src/main/errors.c:664 src/main/errors.c:670
+#: src/main/errors.c:669 src/main/errors.c:675
 #, c-format
 msgid "Error: "
 msgstr "BŁĄD: "
 
-# src/main/errors.c: 690
-# (_("In addition: "))
-# src/main/errors.c: 1319
-# (_("In addition: "))
-#: src/main/errors.c:690 src/main/errors.c:1319
+#: src/main/errors.c:696 src/main/errors.c:1300
 msgid "In addition: "
 msgstr "Dodatkowo: "
 
-#: src/main/errors.c:811
+#: src/main/errors.c:818
 msgid "invalid option \"error\"\n"
 msgstr "niepoprawna opcja \"error\"\n"
 
-#: src/main/errors.c:893
-msgid "Execution halted\n"
-msgstr "Wykonywanie wstrzymane\n"
-
-# src/main/errors.c: 1032
-# error(_("'msg1' must be a character string"))
-#: src/main/errors.c:1032
-msgid "'msg1' must be a character string"
-msgstr "'msg1' musi być łańcuchem tekstowym"
-
-# src/main/errors.c: 1034
-# error(_("'msg2' must be a character string"))
-#: src/main/errors.c:1034
-msgid "'msg2' must be a character string"
-msgstr "'msg2' musi być łańcuchem tekstowym"
+#: src/main/errors.c:1013 src/main/errors.c:1015 src/main/options.c:339
+#: src/main/unique.c:1638
+#, c-format
+msgid "'%s' must be a character string"
+msgstr "'%s' musi być łańcuchem tekstowym"
 
-#: src/main/errors.c:1131
+#: src/main/errors.c:1116
 msgid " [invalid string in stop(.)]"
 msgstr " [niepoprawny łańcuch tekstowy w 'stop()']"
 
-#: src/main/errors.c:1162
+#: src/main/errors.c:1148
 msgid " [invalid string in warning(.)]"
 msgstr " [niepoprawny łańcuch w 'warning()']"
 
-# src/main/errors.c: 1178
-# error(_("incorrect number of arguments to \"%s\""), s)
-#: src/main/errors.c:1178
+#: src/main/errors.c:1164
 #, c-format
 msgid "incorrect number of arguments to \"%s\""
 msgstr "niepoprawna liczba argumentów przekazanych do \"%s\""
 
-# src/main/errors.c: 1184
-# error(_("unimplemented feature in %s"), s)
-# src/main/errors.c: 1199
-# N_("unimplemented feature in %s")
-#: src/main/errors.c:1184 src/main/errors.c:1199
+#: src/main/errors.c:1170 src/main/errors.c:1185
 #, c-format
 msgid "unimplemented feature in %s"
 msgstr "niezaimplementowana cecha w '%s'"
 
-# src/main/errors.c: 1193
-# N_("invalid number of arguments")
-#: src/main/errors.c:1193
+#: src/main/errors.c:1179
 msgid "invalid number of arguments"
 msgstr "niepoprawna liczba argumentów"
 
-# src/library/tools/src/text.c: 66
-# error(_("invalid argument type"))
-# src/library/grDevices/src/colors.c: 1484
-# error(_("invalid argument type"))
-# src/library/stats/src/arima.c: 81
-# error(_("invalid argument type"))
-# src/library/stats/src/arima.c: 192
-# error(_("invalid argument type"))
-# src/library/stats/src/arima.c: 377
-# error(_("invalid argument type"))
-# src/library/stats/src/arima.c: 608
-# error(_("invalid argument type"))
-# src/main/errors.c: 1194
-# N_("invalid argument type")
-# src/main/logic.c: 189
-#  _("invalid argument type")
-#: src/main/errors.c:1194 src/main/logic.c:189
+#: src/main/errors.c:1180 src/main/logic.c:181
 msgid "invalid argument type"
 msgstr "niepoprawny typ argumentu"
 
-# src/main/errors.c: 1196
-# N_("time-series/vector length mismatch")
-#: src/main/errors.c:1196
+#: src/main/errors.c:1182
 msgid "time-series/vector length mismatch"
 msgstr "niezgodność długości szeregu czasowego/wektora"
 
-# src/main/errors.c: 1197
-# N_("incompatible arguments")
-#: src/main/errors.c:1197
+#: src/main/errors.c:1183
 msgid "incompatible arguments"
 msgstr "niezgodne argumenty"
 
-# src/main/errors.c: 1200
-# N_("unknown error (report this!)")
-#: src/main/errors.c:1200
+#: src/main/errors.c:1186
 msgid "unknown error (report this!)"
 msgstr "nieznany błąd (zgłoś raport!)"
 
-# src/main/errors.c: 1212
-# N_("unknown warning (report this!)")
-#: src/main/errors.c:1212
+#: src/main/errors.c:1195
+msgid "inaccurate integer conversion in coercion"
+msgstr "niedokładna konwersja liczby całkowitej w przekształceniu"
+
+#: src/main/errors.c:1198
 msgid "unknown warning (report this!)"
 msgstr "nieznane ostrzeżenie (zgłoś raport!)"
 
-# src/main/errors.c: 1283
-# error(_("No function to return from, jumping to top level"))
-#: src/main/errors.c:1283
+#: src/main/errors.c:1269
 msgid "No function to return from, jumping to top level"
 msgstr ""
 "Brak funkcji z której można powrócić, przeskakiwanie do najwyższego poziomu"
 
-# src/main/errors.c: 1299
-# warning(_("top level inconsistency?"))
-#: src/main/errors.c:1299
+#: src/main/errors.c:1285
 msgid "top level inconsistency?"
 msgstr "niezgodność na najwyższym poziomie?"
 
-# src/main/errors.c: 1478
-# error(_("bad handler data"))
-#: src/main/errors.c:1478
+#: src/main/errors.c:1459
 msgid "bad handler data"
 msgstr "błędne dane programu obsługi"
 
-# src/main/errors.c: 1628
-# error(_("error message not a string"))
-#: src/main/errors.c:1628
+#: src/main/errors.c:1613
 msgid "error message not a string"
 msgstr "komunikat błędu nie jest łańcuchem"
 
-# src/main/errors.c: 1703
-# error(_("handler or restart stack mismatch in old restart"))
-#: src/main/errors.c:1703
+#: src/main/errors.c:1688
 msgid "handler or restart stack mismatch in old restart"
 msgstr "niezgodność obsługi lub restart stosu w starym restarcie"
 
-# src/main/errors.c: 1729
-# error(_("bad error message"))
-# src/main/errors.c: 1745
-# error(_("bad error message"))
-#: src/main/errors.c:1729 src/main/errors.c:1745
+#: src/main/errors.c:1714 src/main/errors.c:1730
 msgid "bad error message"
 msgstr "błędny komunikat błędu"
 
-# src/main/errors.c: 1787
-# error(_("bad restart"))
-#: src/main/errors.c:1787
+#: src/main/errors.c:1771
 msgid "bad restart"
 msgstr "błędny restart"
 
-# src/main/errors.c: 1819
-# error(_("restart not on stack"))
-#: src/main/errors.c:1819
+#: src/main/errors.c:1803
 msgid "restart not on stack"
 msgstr "restart nie jest na stosie"
 
-# src/main/errors.c: 1836
-#  _("not in a try context")
-#: src/main/errors.c:1836
+#: src/main/errors.c:1819
 msgid "not in a try context"
 msgstr "to nie jest w kontekście 'try'"
 
-# src/main/errors.c: 1849
-# error(_("error message must be a character string"))
-#: src/main/errors.c:1849
+#: src/main/errors.c:1832
 msgid "error message must be a character string"
 msgstr "komunikat błędu musi być łańcuchem tekstowym"
 
-# src/main/eval.c: 308
-# warning(_("source files skipped by Rprof; please increase '%s'"),
-# 		R_Profiling_Error == 1 ? "numfiles" : "bufsize")
-#: src/main/eval.c:308
+#: src/main/eval.c:365
 #, c-format
 msgid "source files skipped by Rprof; please increase '%s'"
 msgstr "pliki źródłowe pominięte przez Rprof; proszę zwiększyć '%s'"
 
-# src/main/eval.c: 328
-# error(_("Rprof: cannot open profile file '%s'"),
-# 	      translateChar(filename))
-#: src/main/eval.c:328
+#: src/main/eval.c:385
 #, c-format
 msgid "Rprof: cannot open profile file '%s'"
 msgstr "Rprof: nie można otworzyć pliku profilu '%s'"
 
-# src/main/eval.c: 422
-# error(_("R profiling is not available on this system"))
-#: src/main/eval.c:422
+#: src/main/eval.c:479
 msgid "R profiling is not available on this system"
 msgstr "profilowanie R nie jest dostępne na tym systemie"
 
-# src/main/eval.c: 446
-#  _("promise already under evaluation: recursive default argument reference or earlier problems?")
-#: src/main/eval.c:446
+#: src/main/eval.c:503
 msgid ""
 "promise already under evaluation: recursive default argument reference or "
 "earlier problems?"
@@ -7009,802 +3494,452 @@ msgstr ""
 "obietnica jest już w trakcie obliczania: rekursywne domyślne odwołanie do "
 "argumentu lub wcześniejsze problemy?"
 
-# src/main/eval.c: 447
-# warningcall(R_GlobalContext->call,
-# 			     _("restarting interrupted promise evaluation"))
-#: src/main/eval.c:448
+#: src/main/eval.c:505
 msgid "restarting interrupted promise evaluation"
 msgstr "restartowanie przerwało obliczanie obietnicy"
 
-# src/main/eval.c: 544
-#  _("evaluation nested too deeply: infinite recursion / options(expressions=)?")
-#: src/main/eval.c:544
+#: src/main/eval.c:601
 msgid ""
 "evaluation nested too deeply: infinite recursion / options(expressions=)?"
 msgstr ""
-"obliczanie jest zagnieżdżone zbyt głęboko: nieskończona rekurencja / options"
-"(expressions=)?"
+"obliczanie jest zagnieżdżone zbyt głęboko: nieskończona rekurencja / "
+"options(expressions=)?"
 
-# src/main/eval.c: 575
-# error(_("argument is missing, with no default"))
-# src/main/eval.c: 3619
-# error(_("argument is missing, with no default"))
-#: src/main/eval.c:575 src/main/eval.c:3619
+#: src/main/eval.c:632 src/main/eval.c:4238
 msgid "argument is missing, with no default"
 msgstr "brakuje argumentu, a nie ma określonej wartości domyślnej"
 
-# src/main/eval.c: 679
-# error(_("attempt to apply non-function"))
-# src/main/eval.c: 4642
-# error(_("attempt to apply non-function"))
-#: src/main/eval.c:679 src/main/eval.c:4642
+#: src/main/eval.c:736 src/main/eval.c:1306 src/main/eval.c:5533
 msgid "attempt to apply non-function"
 msgstr "próba zastosowania nie-funkcji"
 
-# src/main/eval.c: 702
-# (_("%s at %s#%d: "), prefix, CHAR(STRING_ELT(filename, 0)),
-# 					    asInteger(srcref))
-#: src/main/eval.c:702
+#: src/main/eval.c:759
 #, c-format
 msgid "%s at %s#%d: "
 msgstr "'%s' w %s#%d: "
 
-# src/main/eval.c: 1178
-# error(_("could not find symbol \"%s\" in environment of the generic function"),
-# 		  CHAR(PRINTNAME(symbol)))
-#: src/main/eval.c:1178
+#: src/main/eval.c:1298 src/main/eval.c:2271
+#, c-format
+msgid "argument %d is empty"
+msgstr "argument %d jest pusty"
+
+#: src/main/eval.c:1350
 #, c-format
 msgid "could not find symbol \"%s\" in environment of the generic function"
 msgstr "nie udało się znaleźć symbolu \"%s\" w środowisku ogólnej funkcji"
 
-# src/main/eval.c: 1196
-# error(_("symbol \"%s\" not in environment of method"),
-# 			  CHAR(PRINTNAME(symbol)))
-#: src/main/eval.c:1196
+#: src/main/eval.c:1368
 #, c-format
 msgid "symbol \"%s\" not in environment of method"
 msgstr "symbol '%s' nie jest w środowisku metody"
 
-# src/main/eval.c: 1307
-# warningcall(call,
-# 		    _("the condition has length > 1 and only the first element will be used"))
-#: src/main/eval.c:1308
+#: src/main/eval.c:1481
 msgid "the condition has length > 1 and only the first element will be used"
 msgstr "warunek posiada długość > 1 i tylko pierwszy element będzie użyty"
 
-# src/main/eval.c: 1325
-#  _("missing value where TRUE/FALSE needed")
-#: src/main/eval.c:1325
+#: src/main/eval.c:1500
 msgid "missing value where TRUE/FALSE needed"
 msgstr "brakuje wartości tam, gdzie wymagane jest TRUE/FALSE"
 
-# src/main/eval.c: 1326
-#  _("argument is not interpretable as logical")
-#: src/main/eval.c:1326
+#: src/main/eval.c:1501
 msgid "argument is not interpretable as logical"
 msgstr "argument nie jest interpretowany jako logiczny"
 
-# src/main/eval.c: 1327
-#  _("argument is of length zero")
-#: src/main/eval.c:1327
+#: src/main/eval.c:1502
 msgid "argument is of length zero"
 msgstr "argument jest długości zero"
 
-# src/main/eval.c: 1418
-#  _("non-symbol loop variable")
-#: src/main/eval.c:1418
+#: src/main/eval.c:1596
 msgid "non-symbol loop variable"
 msgstr "niesymboliczna zmienna pętli"
 
-# src/main/eval.c: 1510
-#  _("invalid for() loop sequence")
-# src/main/eval.c: 4408
-#  _("invalid for() loop sequence")
-#: src/main/eval.c:1510 src/main/eval.c:4408
+#: src/main/eval.c:1687 src/main/eval.c:5301
 msgid "invalid for() loop sequence"
 msgstr "niepoprawna sekwencja pętli 'for()'"
 
-# src/main/eval.c: 1652
-#  _("multi-argument returns are not permitted")
-#: src/main/eval.c:1652
+#: src/main/eval.c:1826
 msgid "multi-argument returns are not permitted"
 msgstr "zwracania wielu argumentów nie są dozwolone"
 
-# src/main/eval.c: 1701
-# error(_("invalid (NULL) left side of assignment"))
-#: src/main/eval.c:1701
+#: src/main/eval.c:1873
 msgid "invalid (NULL) left side of assignment"
 msgstr "niepoprawna (NULL) lewa strona przypisania"
 
-# src/main/eval.c: 1734
-# error(_("target of assignment expands to non-language object"))
-#: src/main/eval.c:1734
+#: src/main/eval.c:1907
 msgid "target of assignment expands to non-language object"
 msgstr "docelowe przypisanie rozszerza się na nie-języczny obiekt"
 
-# src/main/eval.c: 1817
-# error(_("overlong name in '%s'"), EncodeChar(PRINTNAME(fun)))
-#: src/main/eval.c:1817
+#: src/main/eval.c:1990
 #, c-format
 msgid "overlong name in '%s'"
 msgstr "nazwa jest zbyt długa w '%s'"
 
-# src/main/eval.c: 1915
-#  _("cannot do complex assignments in base namespace")
-#: src/main/eval.c:1915
+#: src/main/eval.c:2080
 msgid "cannot do complex assignments in base namespace"
 msgstr "nie można wykonać złożonych przypisać w bazowej przestrzeni nazw"
 
-# src/main/eval.c: 1917
-#  _("cannot do complex assignments in base environment")
-#: src/main/eval.c:1917
+#: src/main/eval.c:2082
 msgid "cannot do complex assignments in base environment"
 msgstr "nie można wykonać złożonych przypisań w bazowym środowisku"
 
-# src/library/compiler/noweb/compiler.nw: 1207
-# gettext("invalid function in complex assignment")
-# src/library/compiler/noweb/compiler.nw: 3994
-# stop(gettext("invalid function in complex assignment"))
-# src/library/compiler/R/cmp.R: 1494
-# stop(gettext("invalid function in complex assignment"))
-# src/library/compiler/R/cmp.R: 2529
-# gettext("invalid function in complex assignment")
-# src/main/eval.c: 1954
-# error(_("invalid function in complex assignment"))
-# src/main/eval.c: 1981
-# error(_("invalid function in complex assignment"))
-#: src/main/eval.c:1954 src/main/eval.c:1981
+#: src/main/eval.c:2121 src/main/eval.c:2148
 msgid "invalid function in complex assignment"
 msgstr "niepoprawna funkcja w złożonym przypisaniu"
 
-# src/main/eval.c: 2041
-#  _("invalid (do_set) left-hand side to assignment")
-#: src/main/eval.c:2041
+#: src/main/eval.c:2208
 msgid "invalid (do_set) left-hand side to assignment"
 msgstr "niepoprawna (do_set) lewa strona do przypisania"
 
-# src/main/eval.c: 2103
-#  _("argument %d is empty")
-#: src/main/eval.c:2103
-#, c-format
-msgid "argument %d is empty"
-msgstr "argument %d jest pusty"
-
-# src/main/eval.c: 2116
-#  _("'%s' is missing")
-#: src/main/eval.c:2116
+#: src/main/eval.c:2284
 #, c-format
 msgid "'%s' is missing"
 msgstr "brakuje '%s'"
 
-# src/main/eval.c: 2267
-# error(_("invalid formal argument list for \"function\""))
-#: src/main/eval.c:2267
+#: src/main/eval.c:2439
 msgid "invalid formal argument list for \"function\""
 msgstr "niepoprawna lista formalnych argumentów dla \"function\""
 
-# src/main/eval.c: 2325
-# error(_("invalid '%s' argument of type '%s'"),
-# 	      "enclos", type2char(tEncl))
-# src/main/eval.c: 2356
-# error(_("invalid '%s' argument of type '%s'"),
-# 		  "envir", type2char(TYPEOF(env)))
-# src/main/eval.c: 2361
-# error(_("invalid '%s' argument of type '%s'"),
-# 	      "envir", type2char(TYPEOF(env)))
-#: src/main/eval.c:2325 src/main/eval.c:2356 src/main/eval.c:2361
+#: src/main/eval.c:2497 src/main/eval.c:2528 src/main/eval.c:2533
 #, c-format
 msgid "invalid '%s' argument of type '%s'"
 msgstr "niepoprawny argument '%s' typu '%s'"
 
-# src/main/eval.c: 2353
-# error(_("numeric 'envir' arg not of length one"))
-#: src/main/eval.c:2353
+#: src/main/eval.c:2525
 msgid "numeric 'envir' arg not of length one"
 msgstr "liczbowy argument 'envir' nie posiada długości 1"
 
-# src/main/eval.c: 2377
-# error(_("restarts not supported in 'eval'"))
-# src/main/eval.c: 2399
-# error(_("restarts not supported in 'eval'"))
-#: src/main/eval.c:2377 src/main/eval.c:2399
+#: src/main/eval.c:2549 src/main/eval.c:2573
 msgid "restarts not supported in 'eval'"
 msgstr "restartowania nie są obsługiwane w 'eval'"
 
-# src/main/eval.c: 2456
-# error(_("'Recall' called from outside a closure"))
-# src/main/eval.c: 2469
-# error(_("'Recall' called from outside a closure"))
-#: src/main/eval.c:2456 src/main/eval.c:2469
+#: src/main/eval.c:2632 src/main/eval.c:2645
 msgid "'Recall' called from outside a closure"
 msgstr "'Recall' wywołane spoza zamknięcia"
 
-# src/main/eval.c: 2562
-# error(_("value in '...' is not a promise"))
-#: src/main/eval.c:2562
+#: src/main/eval.c:2738
 msgid "value in '...' is not a promise"
 msgstr "wartość w '...' nie jest obietnicą"
 
-# src/main/objects.c: 720
-# error(_("call name too long in '%s'"),
-# 		 EncodeChar(PRINTNAME(CAR(cptr->call))))
-# src/main/eval.c: 2754
-# error(_("call name too long in '%s'"), EncodeChar(PRINTNAME(CAR(call))))
-#: src/main/eval.c:2754 src/main/objects.c:720
-#, c-format
-msgid "call name too long in '%s'"
-msgstr "nazwa wywołania jest zbyt długa w '%s'"
-
-# src/main/eval.c: 2775
-# error(_("generic name too long in '%s'"), PRIMNAME(op))
-#: src/main/eval.c:2775
-#, c-format
-msgid "generic name too long in '%s'"
-msgstr "ogólna nazwa jest zbyt długa w '%s'"
-
-# src/main/eval.c: 2840
-# warning(_("Incompatible methods (\"%s\", \"%s\") for \"%s\""),
-# 			lname, rname, generic)
-#: src/main/eval.c:2840
+#: src/main/eval.c:2999
 #, c-format
 msgid "Incompatible methods (\"%s\", \"%s\") for \"%s\""
 msgstr "Niezgodne metody (\"%s\", \"%s\") w \"%s\""
 
-# src/main/eval.c: 2906
-# error(_("dispatch error in group dispatch"))
-#: src/main/eval.c:2906
+#: src/main/eval.c:3048
 msgid "dispatch error in group dispatch"
 msgstr "błąd wysyłania w grupowej wysyłce"
 
-# src/main/eval.c: 3201
-# error(_("\"%s\" is not a %s function"),
-# 		  CHAR(PRINTNAME(symbol)),
-# 		  type == BUILTINSXP ? "BUILTIN" : "SPECIAL")
-#: src/main/eval.c:3201
+#: src/main/eval.c:3532
 #, c-format
 msgid "\"%s\" is not a %s function"
 msgstr "'%s' nie jest funkcją '%s'"
 
-# src/main/eval.c: 3430
-# error(_("node stack overflow"))
-#: src/main/eval.c:3430
+#: src/main/eval.c:4047
 msgid "node stack overflow"
 msgstr "przepełnienie stosu strony"
 
-# src/main/eval.c: 3436
-# error(_("integer stack overflow"))
-#: src/main/eval.c:3436
+#: src/main/eval.c:4053
 msgid "integer stack overflow"
 msgstr "przepełnienie stosu liczb całkowitych"
 
-# src/main/eval.c: 3490
-# error(_("bad opcode"))
-#: src/main/eval.c:3490
+#: src/main/eval.c:4107
 msgid "bad opcode"
 msgstr "błędny kod operacji"
 
-# src/main/eval.c: 4219
-#  _("invalid %s type in 'x %s y'")
-#: src/main/eval.c:4219
+#: src/main/eval.c:5083
 #, c-format
 msgid "invalid %s type in 'x %s y'"
 msgstr "błędny typ '%s' w 'x %s y'"
 
-# src/main/eval.c: 4310
-# warning(_("bytecode version mismatch; using eval"))
-#: src/main/eval.c:4310
+#: src/main/eval.c:5195
 msgid "bytecode version mismatch; using eval"
 msgstr "niezgodność wersji kodu bajtowego; używanie 'eval'"
 
-# src/main/eval.c: 4315
-# error(_("bytecode version is too old"))
-#: src/main/eval.c:4315
+#: src/main/eval.c:5200
 msgid "bytecode version is too old"
 msgstr "wersja kodu bajtowego jest zbyt stara"
 
-# src/main/eval.c: 4316
-# error(_("bytecode version is too new"))
-#: src/main/eval.c:4316
+#: src/main/eval.c:5201
 msgid "bytecode version is too new"
 msgstr "wersja kodu bajtowego jest zbyt nowa"
 
-# src/main/eval.c: 4350
-# error(_("byte code version mismatch"))
-#: src/main/eval.c:4350
+#: src/main/eval.c:5235
 msgid "byte code version mismatch"
 msgstr "niezgodność wersji kodu bajtowego"
 
-# src/main/eval.c: 4477
-# error(_("invalid sequence argument in for loop"))
-#: src/main/eval.c:4477
+#: src/main/eval.c:5383
 msgid "invalid sequence argument in for loop"
 msgstr "niepoprawny argument sekwencji w pętli 'for()'"
 
-# src/main/names.c: 1181
-#  _("there is no .Internal function '%s'")
-# src/main/eval.c: 4624
-# error(_("there is no .Internal function '%s'"),
-# 		CHAR(PRINTNAME(symbol)))
-#: src/main/eval.c:4624 src/main/names.c:1181
+#: src/main/eval.c:5522 src/main/names.c:1312
 #, c-format
 msgid "there is no .Internal function '%s'"
 msgstr "brak wewnętrznej (.Internal) funkcji '%s'"
 
-# src/main/eval.c: 4731
-# error(_("bad function"))
-# src/main/eval.c: 5077
-# error(_("bad function"))
-# src/main/eval.c: 5119
-# error(_("bad function"))
-#: src/main/eval.c:4731 src/main/eval.c:5077 src/main/eval.c:5119
+#: src/main/eval.c:5622 src/main/eval.c:5968 src/main/eval.c:6008
 msgid "bad function"
 msgstr "zła funkcja"
 
-# src/main/eval.c: 4746
-# error(_("not a BUILTIN function"))
-#: src/main/eval.c:4746
+#: src/main/eval.c:5635
 msgid "not a BUILTIN function"
 msgstr "to nie jest funkcja 'BUILTIN'"
 
-# src/main/eval.c: 5159
-#  _("numeric EXPR required for 'switch' without named alternatives")
-#: src/main/eval.c:5159
+#: src/main/eval.c:6066
+msgid "bad numeric 'switch' offsets"
+msgstr "błędne przesunięcia liczbowe w funkcji 'switch()'"
+
+#: src/main/eval.c:6072
 msgid "numeric EXPR required for 'switch' without named alternatives"
 msgstr ""
 "wyrażenie regularne 'EXPR' wymagane przez 'switch()' bez nazwanych alternatyw"
 
-# src/main/eval.c: 5255
-# error(_("cannot find index for threaded code address"))
-#: src/main/eval.c:5255
+#: src/main/eval.c:6076
+msgid "bad character 'switch' offsets"
+msgstr "błędne przesunięcia znakowe 'switch()'"
+
+#: src/main/eval.c:6188
 msgid "cannot find index for threaded code address"
 msgstr "nie można znaleźć indeksu dla wątkowego adresu kodu"
 
-# src/main/eval.c: 5315
-#  _("invalid body")
-#: src/main/eval.c:5315
+#: src/main/eval.c:6248
 msgid "invalid body"
 msgstr "niepoprawne ciało"
 
-# src/main/eval.c: 5335
-#  _("invalid symbol")
-#: src/main/eval.c:5335
+#: src/main/eval.c:6268
 msgid "invalid symbol"
 msgstr "niepoprawny symbol"
 
-# src/main/eval.c: 5379
-#  _("argument is not a byte code object")
-#: src/main/eval.c:5379
+#: src/main/eval.c:6312
 msgid "argument is not a byte code object"
 msgstr "argument 'code' nie jest obiektem kodu bajtowego"
 
-# src/main/eval.c: 5400
-#  _("bad file name")
-#: src/main/eval.c:5400
+#: src/main/eval.c:6334
 msgid "bad file name"
 msgstr "zła nazwa pliku"
 
-# src/main/eval.c: 5404
-#  _("unable to open 'file'")
-# src/main/eval.c: 5425
-#  _("unable to open 'file'")
-#: src/main/eval.c:5404 src/main/eval.c:5425
+#: src/main/eval.c:6338 src/main/eval.c:6359
 msgid "unable to open 'file'"
 msgstr "nie można otworzyć 'file'"
 
-# src/library/base/R/load.R: 93
-# stop("'file' must be non-empty string")
-# src/library/base/R/load.R: 132
-# stop("'file' must be non-empty string")
-# src/library/base/R/serialize.R: 24
-# stop("'file' must be non-empty string")
-# src/main/saveload.c: 1942
-# error(_("'file' must be non-empty string"))
-# src/main/eval.c: 5419
-#  _("'file' must be non-empty string")
-#: src/main/eval.c:5419 src/main/saveload.c:1942
+#: src/main/eval.c:6353 src/main/saveload.c:1944
 msgid "'file' must be non-empty string"
 msgstr "'file' musi być niepustym łańcuchem tekstowym"
 
-# src/main/saveload.c: 1944
-# error(_("'ascii' must be logical"))
-# src/main/saveload.c: 2244
-# error(_("'ascii' must be logical"))
-# src/main/serialize.c: 2149
-# error(_("'ascii' must be logical"))
-# src/main/eval.c: 5421
-#  _("'ascii' must be logical")
-#: src/main/eval.c:5421 src/main/saveload.c:1944 src/main/saveload.c:2244
-#: src/main/serialize.c:2149
+#: src/main/eval.c:6355 src/main/saveload.c:1946 src/main/saveload.c:2246
+#: src/main/serialize.c:2189
 msgid "'ascii' must be logical"
 msgstr "'ascii' musi być logiczne"
 
-# src/main/eval.c: 5492
-# error(_("constant buffer must be a generic vector"))
-# src/main/eval.c: 5511
-# error(_("constant buffer must be a generic vector"))
-# src/main/eval.c: 5541
-# error(_("constant buffer must be a generic vector"))
-#: src/main/eval.c:5492 src/main/eval.c:5511 src/main/eval.c:5541
+#: src/main/eval.c:6426 src/main/eval.c:6445 src/main/eval.c:6475
 msgid "constant buffer must be a generic vector"
 msgstr "stały bufor musi być ogólnym wektorem"
 
-# src/main/eval.c: 5543
-# error(_("bad constant count"))
-#: src/main/eval.c:5543
+#: src/main/eval.c:6477
 msgid "bad constant count"
 msgstr "zła liczba stałych"
 
-# src/main/eval.c: 5579
-# error(_("profile timer in use"))
-#: src/main/eval.c:5579
+#: src/main/eval.c:6515
 msgid "profile timer in use"
 msgstr "czasomierz profilu jest w użyciu"
 
-# src/main/eval.c: 5581
-# error(_("already byte code profiling"))
-#: src/main/eval.c:5581
+#: src/main/eval.c:6517
 msgid "already byte code profiling"
 msgstr "profilowanie kodu bajtowego jest w trakcie"
 
-# src/main/eval.c: 5599
-# error(_("setting profile timer failed"))
-#: src/main/eval.c:5599
+#: src/main/eval.c:6535
 msgid "setting profile timer failed"
 msgstr "ustawienie czasomierza profilu nie powiodło się"
 
-# src/main/eval.c: 5616
-# error(_("not byte code profiling"))
-#: src/main/eval.c:5616
+#: src/main/eval.c:6553
 msgid "not byte code profiling"
 msgstr "brak profilowania kodu bajtowego"
 
-# src/main/gevents.c: 43
-# warning(_("'%s' events not supported in this device"), name)
+#: src/main/eval.c:6569 src/main/eval.c:6573 src/main/eval.c:6577
+msgid "byte code profiling is not supported in this build"
+msgstr "profilowanie kodu bajtowego nie jest wspierane w tej kompilacji"
+
 #: src/main/gevents.c:43
 #, c-format
 msgid "'%s' events not supported in this device"
 msgstr "zdarzenia '%s' nie są wspierane na tym urządzeniu"
 
-# src/library/tools/R/parseLatex.R: 199
-# stop("internal error", domain = NA)
-# src/library/stats/R/power.anova.test.R: 57
-# stop("internal error", domain = NA)
-# src/library/stats/R/power.R: 63
-# stop("internal error", domain = NA)
-# src/library/stats/R/power.R: 130
-# stop("internal error", domain = NA)
-# src/main/gevents.c: 67
-# error(_("internal error"))
 #: src/main/gevents.c:67
 msgid "internal error"
 msgstr "błąd wewnętrzny"
 
-# src/main/gevents.c: 73
-# error(_("this graphics device does not support event handling"))
 #: src/main/gevents.c:73
 msgid "this graphics device does not support event handling"
 msgstr "to graficzne urządzenie nie wspiera obsługi zdarzeń"
 
-# src/main/gevents.c: 136
-# error(_("invalid prompt"))
-#: src/main/gevents.c:136
+#: src/main/gevents.c:135
 msgid "invalid prompt"
 msgstr "niepoprawne zapytanie"
 
-# src/main/gevents.c: 148
-# error(_("recursive use of 'getGraphicsEvent' not supported"))
-#: src/main/gevents.c:148
+#: src/main/gevents.c:146
 msgid "recursive use of 'getGraphicsEvent' not supported"
 msgstr "rekursywne użycie 'getGraphicsEvent' nie jest wspierane"
 
-# src/main/gevents.c: 158
-# error(_("no graphics event handlers set"))
-#: src/main/gevents.c:158
+#: src/main/gevents.c:157
 msgid "no graphics event handlers set"
 msgstr "nie ustawiono obsługi zdarzeń grafiki"
 
-# src/main/gram.y: 222
-# error(_("EOF whilst reading MBCS char at line %d"), ParseState.xxlineno)
-# src/main/gram.y: 237
-# error(_("EOF whilst reading MBCS char at line %d"), ParseState.xxlineno)
-# src/main/gram.y: 2222
-# error(_("EOF whilst reading MBCS char at line %d"), ParseState.xxlineno)
-# src/main/gram.y: 2236
-# error(_("EOF whilst reading MBCS char at line %d"), ParseState.xxlineno)
-# src/main/gram.c: 288
-# error(_("EOF whilst reading MBCS char at line %d"), ParseState.xxlineno)
-# src/main/gram.c: 303
-# error(_("EOF whilst reading MBCS char at line %d"), ParseState.xxlineno)
-# src/main/gram.c: 4603
-# error(_("EOF whilst reading MBCS char at line %d"), ParseState.xxlineno)
-# src/main/gram.c: 4617
-# error(_("EOF whilst reading MBCS char at line %d"), ParseState.xxlineno)
-#: src/main/gram.y:222 src/main/gram.y:237 src/main/gram.y:2222
-#: src/main/gram.y:2236
+#: src/main/gram.y:222 src/main/gram.y:237 src/main/gram.y:2245
+#: src/main/gram.y:2259
 #, c-format
 msgid "EOF whilst reading MBCS char at line %d"
 msgstr "znak końca pliku (EOF) podczas czytania znaku MBCS w linii %d"
 
-# src/main/gram.y: 226
-# error(_("invalid multibyte character in parser at line %d"), ParseState.xxlineno)
-# src/main/gram.y: 234
-# error(_("invalid multibyte character in parser at line %d"), ParseState.xxlineno)
-# src/main/gram.y: 2226
-# error(_("invalid multibyte character in parser at line %d"), ParseState.xxlineno)
-# src/main/gram.y: 2233
-# error(_("invalid multibyte character in parser at line %d"), ParseState.xxlineno)
-# src/main/gram.c: 292
-# error(_("invalid multibyte character in parser at line %d"), ParseState.xxlineno)
-# src/main/gram.c: 300
-# error(_("invalid multibyte character in parser at line %d"), ParseState.xxlineno)
-# src/main/gram.c: 4607
-# error(_("invalid multibyte character in parser at line %d"), ParseState.xxlineno)
-# src/main/gram.c: 4614
-# error(_("invalid multibyte character in parser at line %d"), ParseState.xxlineno)
-#: src/main/gram.y:226 src/main/gram.y:234 src/main/gram.y:2226
-#: src/main/gram.y:2233
+#: src/main/gram.y:226 src/main/gram.y:234 src/main/gram.y:2249
+#: src/main/gram.y:2256
 #, c-format
 msgid "invalid multibyte character in parser at line %d"
 msgstr "niepoprawny wielobajtowy znak w parserze w linii %d"
 
-# src/main/gram.y: 466
-# error(_("input buffer overflow at line %d"), ParseState.xxlineno)
-# src/main/gram.c: 2847
-# error(_("input buffer overflow at line %d"), ParseState.xxlineno)
 #: src/main/gram.y:466
 #, c-format
 msgid "input buffer overflow at line %d"
 msgstr "przepełnienie bufora wejściowego w linii %d"
 
-# src/main/gram.y: 1050
-# error(_("incorrect tag type at line %d"), lloc->first_line)
-# src/main/gram.c: 3431
-# error(_("incorrect tag type at line %d"), lloc->first_line)
 #: src/main/gram.y:1050
 #, c-format
 msgid "incorrect tag type at line %d"
 msgstr "niepoprawny typ tagu w linii %d"
 
-# src/main/gram.y: 1653
-# error(_("contextstack overflow"))
-# src/main/gram.c: 4034
-# error(_("contextstack overflow"))
-#: src/main/gram.y:1653
+#: src/main/gram.y:1657
 msgid "contextstack overflow"
 msgstr "przepełniony stos kontekstu"
 
-# src/main/gram.y: 1890
-#  _("input")
-# src/main/gram.c: 4271
-#  _("input")
-#: src/main/gram.y:1890
-msgid "input"
-msgstr "wejście"
-
-# src/main/gram.y: 1891
-#  _("end of input")
-# src/main/gram.c: 4272
-#  _("end of input")
-#: src/main/gram.y:1891
-msgid "end of input"
-msgstr "koniec wejścia"
-
-# src/main/gram.y: 1892
-#  _("string constant")
-# src/main/gram.c: 4273
-#  _("string constant")
-#: src/main/gram.y:1892
-msgid "string constant"
-msgstr "stała tekstowa"
-
-# src/main/gram.y: 1893
-#  _("numeric constant")
-# src/main/gram.c: 4274
-#  _("numeric constant")
-#: src/main/gram.y:1893
-msgid "numeric constant"
-msgstr "stała liczbowa"
-
-# src/main/dotcode.c: 478
-# error(_("invalid '%s' argument"), "symbol")
-# src/main/gram.y: 1894
-#  _("symbol")
-# src/main/gram.c: 4275
-#  _("symbol")
-#: src/main/gram.y:1894
-msgid "symbol"
-msgstr "symbol"
-
-# src/main/gram.y: 1895
-#  _("assignment")
-# src/main/gram.c: 4276
-#  _("assignment")
-#: src/main/gram.y:1895
-msgid "assignment"
-msgstr "przypisanie"
-
-# src/main/gram.y: 1896
-#  _("end of line")
-# src/main/gram.c: 4277
-#  _("end of line")
-#: src/main/gram.y:1896
-msgid "end of line"
-msgstr "koniec linii"
-
-# src/main/gram.y: 1910
-# sprintf(R_ParseErrorMsg, _("unexpected %s"),
-# 		    i/2 < YYENGLISH ? _(yytname_translations[i+1])
-# 				    : yytname_translations[i+1])
-# src/main/gram.y: 1916
-# sprintf(R_ParseErrorMsg, _("unexpected %s"), s + sizeof yyunexpected - 1)
-# src/main/gram.c: 4291
-# sprintf(R_ParseErrorMsg, _("unexpected %s"),
-# 		    i/2 < YYENGLISH ? _(yytname_translations[i+1])
-# 				    : yytname_translations[i+1])
-# src/main/gram.c: 4297
-# sprintf(R_ParseErrorMsg, _("unexpected %s"), s + sizeof yyunexpected - 1)
-#: src/main/gram.y:1910 src/main/gram.y:1916
+#: src/main/gram.y:1907 src/main/gram.y:1913
+#, c-format
+msgid "unexpected input"
+msgstr "nieoczekiwane wejście"
+
+#: src/main/gram.y:1910 src/main/main.c:311
+#, c-format
+msgid "unexpected end of input"
+msgstr "nieoczekiwany koniec wejścia"
+
+#: src/main/gram.y:1916
+#, c-format
+msgid "unexpected string constant"
+msgstr "nieoczekiwana stała tekstowa"
+
+#: src/main/gram.y:1919
+#, c-format
+msgid "unexpected numeric constant"
+msgstr "nieoczekiwana stała liczbowa"
+
+#: src/main/gram.y:1922
+#, c-format
+msgid "unexpected symbol"
+msgstr "nieoczekiwany symbol"
+
+#: src/main/gram.y:1925
+#, c-format
+msgid "unexpected assignment"
+msgstr "nieoczekiwane przypisanie"
+
+#: src/main/gram.y:1928
+#, c-format
+msgid "unexpected end of line"
+msgstr "nieoczekiwany koniec linii"
+
+#: src/main/gram.y:1931 src/main/gram.y:1939
 #, c-format
 msgid "unexpected %s"
 msgstr "nieoczekiwane %s"
 
-# src/main/gram.y: 1926
-# error(_("repeated formal argument '%s' on line %d"), EncodeChar(PRINTNAME(_new)),
-# 								 lloc->first_line)
-# src/main/gram.c: 4307
-# error(_("repeated formal argument '%s' on line %d"), EncodeChar(PRINTNAME(_new)),
-# 								 lloc->first_line)
-#: src/main/gram.y:1926
+#: src/main/gram.y:1951
 #, c-format
 msgid "repeated formal argument '%s' on line %d"
 msgstr "powtórzony formalny argument '%s' w linii %d"
 
-# src/main/gram.y: 2136
-# warning(_("integer literal %s contains decimal; using numeric value"), yytext)
-# src/main/gram.c: 4517
-# warning(_("integer literal %s contains decimal; using numeric value"), yytext)
-#: src/main/gram.y:2136
+#: src/main/gram.y:2161
 #, c-format
 msgid "integer literal %s contains decimal; using numeric value"
 msgstr "stały literał %s zawiera część dziesiętną; używanie wartości liczbowej"
 
-# src/main/gram.y: 2140
-# warning(_("non-integer value %s qualified with L; using numeric value"), yytext)
-# src/main/gram.c: 4521
-# warning(_("non-integer value %s qualified with L; using numeric value"), yytext)
-#: src/main/gram.y:2140
+#: src/main/gram.y:2164
 #, c-format
 msgid "non-integer value %s qualified with L; using numeric value"
 msgstr ""
 "niecałkowita wartość %s zakwalifikowana z L; używanie wartości liczbowej"
 
-# src/main/gram.y: 2153
-# warning(_("integer literal %s contains unnecessary decimal point"), yytext)
-# src/main/gram.c: 4534
-# warning(_("integer literal %s contains unnecessary decimal point"), yytext)
-#: src/main/gram.y:2153
+#: src/main/gram.y:2176
 #, c-format
 msgid "integer literal %s contains unnecessary decimal point"
 msgstr "stały literał %s zawiera niepotrzebny separator dziesiętny"
 
-# src/library/tools/src/gramLatex.c: 2447
-# error(_("unable to allocate buffer for long string at line %d"), parseState.xxlineno)
-# src/library/tools/src/gramRd.y: 1307
-# error(_("unable to allocate buffer for long string at line %d"), parseState.xxlineno)
-# src/library/tools/src/gramLatex.y: 685
-# error(_("unable to allocate buffer for long string at line %d"), parseState.xxlineno)
-# src/library/tools/src/gramRd.c: 4164
-# error(_("unable to allocate buffer for long string at line %d"), parseState.xxlineno)
-# src/main/gram.y: 2185
-# error(_("unable to allocate buffer for long string at line %d"), ParseState.xxlineno)
-# src/main/gram.c: 4566
-# error(_("unable to allocate buffer for long string at line %d"), ParseState.xxlineno)
-#: src/main/gram.y:2185
+#: src/main/gram.y:2208
 #, c-format
 msgid "unable to allocate buffer for long string at line %d"
 msgstr "nie można przydzielić bufora dla długiego łańcucha w linii %d"
 
-# src/main/gram.y: 2338
-#  _("'\\x' used without hex digits in character string starting \"%s\"")
-# src/main/gram.c: 4719
-#  _("'\\x' used without hex digits in character string starting \"%s\"")
-#: src/main/gram.y:2338
+#: src/main/gram.y:2347 src/main/gram.y:2370 src/main/gram.y:2407
+#: src/main/gram.y:2443
+#, c-format
+msgid "nul character not allowed (line %d)"
+msgstr "znak 'nul' nie jest dozwolony (linia %d)"
+
+#: src/main/gram.y:2363
 #, c-format
 msgid "'\\x' used without hex digits in character string starting \"%s\""
 msgstr ""
 "'\\x' użyte bez szestnastkowych cyfr w łańcuchu tekstowym rozpoczynającym "
 "\"%s\""
 
-# src/main/gram.y: 2352
-# error(_("\\uxxxx sequences not supported inside backticks (line %d)"), ParseState.xxlineno)
-# src/main/gram.c: 4733
-# error(_("\\uxxxx sequences not supported inside backticks (line %d)"), ParseState.xxlineno)
-#: src/main/gram.y:2352
+#: src/main/gram.y:2379
 #, c-format
 msgid "\\uxxxx sequences not supported inside backticks (line %d)"
 msgstr ""
 "sekwencja \\uxxxxxxxx nie jest wspierana wewnątrz odwrotnych cudzysłowiów "
 "(``) (linia %d)"
 
-# src/main/gram.y: 2367
-#  _("'\\u' used without hex digits in character string starting \"%s\"")
-# src/main/gram.c: 4748
-#  _("'\\u' used without hex digits in character string starting \"%s\"")
-#: src/main/gram.y:2367
+#: src/main/gram.y:2394
 #, c-format
 msgid "'\\u' used without hex digits in character string starting \"%s\""
 msgstr ""
 "'\\u' użyte bez szestnastkowych cyfr w łańcuchu tekstowym rozpoczynającym "
 "\"%s\""
 
-# src/main/gram.y: 2375
-# error(_("invalid \\u{xxxx} sequence (line %d)"),
-# 			      ParseState.xxlineno)
-# src/main/gram.c: 4756
-# error(_("invalid \\u{xxxx} sequence (line %d)"),
-# 			      ParseState.xxlineno)
-#: src/main/gram.y:2375
+#: src/main/gram.y:2402
 #, c-format
 msgid "invalid \\u{xxxx} sequence (line %d)"
 msgstr "niepoprawna sekwencja \\u{xxxx} (linia %d)"
 
-# src/main/gram.y: 2387
-# error(_("\\Uxxxxxxxx sequences not supported inside backticks (line %d)"), ParseState.xxlineno)
-# src/main/gram.c: 4768
-# error(_("\\Uxxxxxxxx sequences not supported inside backticks (line %d)"), ParseState.xxlineno)
-#: src/main/gram.y:2387
+#: src/main/gram.y:2416
 #, c-format
 msgid "\\Uxxxxxxxx sequences not supported inside backticks (line %d)"
 msgstr ""
 "sekwencja \\Uxxxxxxxx nie jest wspierana wewnątrz odwrotnych cudzysłowiów "
 "(``) (linia %d)"
 
-# src/main/gram.y: 2402
-#  _("'\\U' used without hex digits in character string starting \"%s\"")
-# src/main/gram.c: 4783
-#  _("'\\U' used without hex digits in character string starting \"%s\"")
-#: src/main/gram.y:2402
+#: src/main/gram.y:2431
 #, c-format
 msgid "'\\U' used without hex digits in character string starting \"%s\""
 msgstr ""
 "'\\U' użyte bez szestnastkowych cyfr w łańcuchu tekstowym rozpoczynającym "
 "\"%s\""
 
-# src/main/gram.y: 2410
-# error(_("invalid \\U{xxxxxxxx} sequence (line %d)"), ParseState.xxlineno)
-# src/main/gram.c: 4791
-# error(_("invalid \\U{xxxxxxxx} sequence (line %d)"), ParseState.xxlineno)
-#: src/main/gram.y:2410
+#: src/main/gram.y:2439
 #, c-format
 msgid "invalid \\U{xxxxxxxx} sequence (line %d)"
 msgstr "niepoprawna sekwencja \\U{xxxxxxxx} (linia %d)"
 
-# src/main/gram.y: 2451
-#  _("'\\%c' is an unrecognized escape in character string starting \"%s\"")
-# src/main/gram.c: 4832
-#  _("'\\%c' is an unrecognized escape in character string starting \"%s\"")
-#: src/main/gram.y:2451
+#: src/main/gram.y:2482
 #, c-format
 msgid "'\\%c' is an unrecognized escape in character string starting \"%s\""
 msgstr ""
 "'\\%c' jest nierozponanym znakiem modyfikacji w łańcuchu tekstowym "
 "rozpoczynającym \"%s\""
 
-# src/main/gram.y: 2510
-# error(_("mixing Unicode and octal/hex escapes in a string is not allowed"))
-# src/main/gram.c: 4891
-# error(_("mixing Unicode and octal/hex escapes in a string is not allowed"))
-#: src/main/gram.y:2510
+#: src/main/gram.y:2546
 msgid "mixing Unicode and octal/hex escapes in a string is not allowed"
 msgstr ""
 "mieszanie znaków Unicode oraz ósemkowych/szestnastkowych znaków modyfikacji "
 "w łańcuchu jest niedozwolone"
 
-# src/main/gram.y: 2514
-# error(_("string at line %d containing Unicode escapes not in this locale\nis too long (max 10000 chars)"), ParseState.xxlineno)
-# src/main/gram.c: 4895
-# error(_("string at line %d containing Unicode escapes not in this locale\nis too long (max 10000 chars)"), ParseState.xxlineno)
-#: src/main/gram.y:2514
+#: src/main/gram.y:2550
 #, c-format
 msgid ""
 "string at line %d containing Unicode escapes not in this locale\n"
@@ -7814,113 +3949,50 @@ msgstr ""
 "lokalizacji\n"
 "jest zbyt długi (maksymalnie 10000 znaków)"
 
-# src/main/gram.y: 3112
-# error(_("contextstack overflow at line %d"), ParseState.xxlineno)
-# src/main/gram.y: 3119
-# error(_("contextstack overflow at line %d"), ParseState.xxlineno)
-# src/main/gram.y: 3125
-# error(_("contextstack overflow at line %d"), ParseState.xxlineno)
-# src/main/gram.y: 3132
-# error(_("contextstack overflow at line %d"), ParseState.xxlineno)
-# src/main/gram.c: 5493
-# error(_("contextstack overflow at line %d"), ParseState.xxlineno)
-# src/main/gram.c: 5500
-# error(_("contextstack overflow at line %d"), ParseState.xxlineno)
-# src/main/gram.c: 5506
-# error(_("contextstack overflow at line %d"), ParseState.xxlineno)
-# src/main/gram.c: 5513
-# error(_("contextstack overflow at line %d"), ParseState.xxlineno)
-#: src/main/gram.y:3112 src/main/gram.y:3119 src/main/gram.y:3125
-#: src/main/gram.y:3132
+#: src/main/gram.y:3148 src/main/gram.y:3155 src/main/gram.y:3161
+#: src/main/gram.y:3168
 #, c-format
 msgid "contextstack overflow at line %d"
 msgstr "przepełnienie stosu kontekstu w linii %d"
 
-# src/main/gram.y: 3227
-# error(_("internal parser error at line %d"),  ParseState.xxlineno)
-# src/main/gram.c: 5608
-# error(_("internal parser error at line %d"),  ParseState.xxlineno)
-#: src/main/gram.y:3227
+#: src/main/gram.y:3263
 #, c-format
 msgid "internal parser error at line %d"
 msgstr "wewnętrzny błąd parsera w linii %d"
 
-# src/main/graphics.c: 67
-# warning(_("relative range of values =%4.0f * EPS, is small (axis %d)")
-# 		/*"to compute accurately"*/,
-# 		fabs(*max - *min) / (t_*DBL_EPSILON), axis)
 #: src/main/graphics.c:67
 #, c-format
 msgid "relative range of values =%4.0f * EPS, is small (axis %d)"
 msgstr "względny zakres wartości =%4.0f * EPS jest mały (oś %d)"
 
-# src/main/grep.c: 93
-# error(_("invalid regular expression '%s', reason '%s'"), pat, errbuf)
-#: src/main/grep.c:93
+#: src/main/grep.c:96
 #, c-format
 msgid "invalid regular expression '%s', reason '%s'"
 msgstr "niepoprawne wyrażenie regularne '%s', powód '%s'"
 
-# src/main/grep.c: 95
-# error(_("invalid regular expression, reason '%s'"), errbuf)
-#: src/main/grep.c:95
+#: src/main/grep.c:98
 #, c-format
 msgid "invalid regular expression, reason '%s'"
 msgstr "niepoprawne wyrażenie regularne, powód '%s'"
 
-# src/main/grep.c: 220
-# warning(_("input string %d is invalid UTF-8"), i+1)
-# src/main/grep.c: 308
-# warning(_("input string %d is invalid UTF-8"), i+1)
-# src/main/grep.c: 416
-# warning(_("input string %d is invalid UTF-8"), i+1)
-# src/main/grep.c: 883
-# warning(_("input string %d is invalid UTF-8"), i+1)
-# src/main/grep.c: 1640
-# error(("input string %d is invalid UTF-8"), i+1)
-# src/main/grep.c: 2473
-# warning(_("input string %d is invalid UTF-8"), i+1)
-#: src/main/grep.c:220 src/main/grep.c:308 src/main/grep.c:416
-#: src/main/grep.c:883 src/main/grep.c:2473
+#: src/main/grep.c:225 src/main/grep.c:315 src/main/grep.c:426
+#: src/main/grep.c:900 src/main/grep.c:2502
 #, c-format
 msgid "input string %d is invalid UTF-8"
 msgstr "wejściowy łańcuch %d to niepoprawny UTF-8"
 
-# src/main/grep.c: 286
-# error(_("'split' string %d is invalid UTF-8"), itok+1)
-# src/main/grep.c: 383
-# error(_("'split' string %d is invalid UTF-8"), itok+1)
-#: src/main/grep.c:286 src/main/grep.c:383
+#: src/main/grep.c:292 src/main/grep.c:391
 #, c-format
 msgid "'split' string %d is invalid UTF-8"
 msgstr "łańcuch 'split' %d to niepoprawny UTF-8"
 
-# src/main/grep.c: 290
-# error(_("'split' string %d is invalid in this locale"), 
-# 			  itok+1)
-# src/main/grep.c: 387
-# error(_("'split' string %d is invalid in this locale"), itok+1)
-# src/main/grep.c: 560
-# error(_("'split' string %d is invalid in this locale"), itok+1)
-#: src/main/grep.c:290 src/main/grep.c:387 src/main/grep.c:560
+#: src/main/grep.c:296 src/main/grep.c:395 src/main/grep.c:571
 #, c-format
 msgid "'split' string %d is invalid in this locale"
 msgstr "łańcuch 'split' %d jest niepoprawny w tej lokalizacji"
 
-# src/main/grep.c: 395
-# warning(_("PCRE pattern compilation error\n\t'%s'\n\tat '%s'\n"),
-# 			    errorptr, split+erroffset)
-# src/main/grep.c: 851
-# warning(_("PCRE pattern compilation error\n\t'%s'\n\tat '%s'\n"),
-# 			errorptr, spat+erroffset)
-# src/main/grep.c: 1600
-# warning(_("PCRE pattern compilation error\n\t'%s'\n\tat '%s'\n"),
-# 			errorptr, spat+erroffset)
-# src/main/grep.c: 2394
-# warning(_("PCRE pattern compilation error\n\t'%s'\n\tat '%s'\n"),
-# 			errorptr, spat+erroffset)
-#: src/main/grep.c:395 src/main/grep.c:851 src/main/grep.c:1600
-#: src/main/grep.c:2394
+#: src/main/grep.c:404 src/main/grep.c:867 src/main/grep.c:1621
+#: src/main/grep.c:2419
 #, c-format
 msgid ""
 "PCRE pattern compilation error\n"
@@ -7931,23 +4003,13 @@ msgstr ""
 "\t'%s'\n"
 "\tw '%s'\n"
 
-# src/main/grep.c: 397
-# error(_("invalid split pattern '%s'"), split)
-#: src/main/grep.c:397
+#: src/main/grep.c:406
 #, c-format
 msgid "invalid split pattern '%s'"
 msgstr "niepoprawny wzór '%s' rozdzielenia"
 
-# src/main/grep.c: 401
-# warning(_("PCRE pattern study error\n\t'%s'\n"), errorptr)
-# src/main/grep.c: 857
-# warning(_("PCRE pattern study error\n\t'%s'\n"), errorptr)
-# src/main/grep.c: 1607
-# warning(_("PCRE pattern study error\n\t'%s'\n"), errorptr)
-# src/main/grep.c: 2401
-# warning(_("PCRE pattern study error\n\t'%s'\n"), errorptr)
-#: src/main/grep.c:401 src/main/grep.c:857 src/main/grep.c:1607
-#: src/main/grep.c:2401
+#: src/main/grep.c:410 src/main/grep.c:873 src/main/grep.c:1628
+#: src/main/grep.c:2426
 #, c-format
 msgid ""
 "PCRE pattern study error\n"
@@ -7956,408 +4018,235 @@ msgstr ""
 "Błąd analizy wzorca PCRE\n"
 "\t'%s'\n"
 
-# src/main/grep.c: 834
-# error(_("regular expression is invalid UTF-8"))
-# src/main/grep.c: 2377
-# error(_("regular expression is invalid UTF-8"))
-#: src/main/grep.c:834 src/main/grep.c:2377
+#: src/main/grep.c:849 src/main/grep.c:2401
 msgid "regular expression is invalid UTF-8"
 msgstr "wyrażenie regularne to niepoprawny UTF-8"
 
-# src/main/grep.c: 853
-# error(_("invalid regular expression '%s'"), spat)
-# src/main/grep.c: 1602
-# error(_("invalid regular expression '%s'"), spat)
-# src/main/grep.c: 2396
-# error(_("invalid regular expression '%s'"), spat)
-#: src/main/grep.c:853 src/main/grep.c:1602 src/main/grep.c:2396
+#: src/main/grep.c:869 src/main/grep.c:1623 src/main/grep.c:2421
 #, c-format
 msgid "invalid regular expression '%s'"
 msgstr "niepoprawne wyrażenie regularne '%s'"
 
-# src/main/grep.c: 1264
-# warning(_("pattern matches an empty string infinitely, returning first match only"))
-#: src/main/grep.c:1264
+#: src/main/grep.c:1282
 msgid "pattern matches an empty string infinitely, returning first match only"
 msgstr ""
 "wzorzec dopasowuje pusty łańcuch w nieskończoność, zwracane jest tylko "
 "pierwsze dopasowanie"
 
-# src/main/grep.c: 1575
-# error(_("'pattern' is invalid UTF-8"))
-#: src/main/grep.c:1575
+#: src/main/grep.c:1595
 msgid "'pattern' is invalid UTF-8"
 msgstr "'pattern' to niepoprawny UTF-8"
 
-# src/main/grep.c: 1577
-# error(_("'replacement' is invalid UTF-8"))
-#: src/main/grep.c:1577
+#: src/main/grep.c:1597
 msgid "'replacement' is invalid UTF-8"
 msgstr "'replacement' to niepoprawny UTF-8"
 
-# src/main/grep.c: 1581
-# error(_("'pattern' is invalid in this locale"))
-#: src/main/grep.c:1581
+#: src/main/grep.c:1601
 msgid "'pattern' is invalid in this locale"
 msgstr "niepoprawny 'pattern' w tej lokalizacji"
 
-# src/main/grep.c: 1584
-# error(_("'replacement' is invalid in this locale"))
-#: src/main/grep.c:1584
+#: src/main/grep.c:1604
 msgid "'replacement' is invalid in this locale"
 msgstr "niepoprawny 'replacement' w tej lokalizacji"
 
-# src/main/grep.c: 1589
-# error(_("zero-length pattern"))
-#: src/main/grep.c:1589
+#: src/main/grep.c:1609
 msgid "zero-length pattern"
 msgstr "ścieżka o długości zero"
 
-# src/main/grep.c: 1732
-# error(_("result string is too long"))
-# src/main/grep.c: 1748
-# error(_("result string is too long"))
-# src/main/grep.c: 1796
-# error(_("result string is too long"))
-# src/main/grep.c: 1812
-# error(_("result string is too long"))
-# src/main/grep.c: 1859
-# error(_("result string is too long"))
-# src/main/grep.c: 1875
-# error(_("result string is too long"))
-#: src/main/grep.c:1732 src/main/grep.c:1748 src/main/grep.c:1796
-#: src/main/grep.c:1812 src/main/grep.c:1859 src/main/grep.c:1875
+#: src/main/grep.c:1753 src/main/grep.c:1769 src/main/grep.c:1817
+#: src/main/grep.c:1833 src/main/grep.c:1880 src/main/grep.c:1896
 msgid "result string is too long"
 msgstr "wynikowy łańcuch jest zbyt długi"
 
-# src/main/grep.c: 2411
-# error(_("'pcre_fullinfo' returned '%d' "), info_code)
-#: src/main/grep.c:2411
+#: src/main/grep.c:2436
 #, c-format
 msgid "'pcre_fullinfo' returned '%d' "
 msgstr "'pcre_fullinfo' zwrócił '%d' "
 
-# src/main/identical.c: 121
-# warning(_("ignoring non-pairlist attributes"))
 #: src/main/identical.c:121
 msgid "ignoring non-pairlist attributes"
 msgstr "ignorowanie atrybutów nie-pairlist"
 
-# src/main/internet.c: 92
-# error(_("internet routines cannot be accessed in module"))
-#: src/main/internet.c:92
+#: src/main/internet.c:83
 msgid "internet routines cannot be accessed in module"
 msgstr "procedury internetowe nie są dostępne w module"
 
-# src/main/internet.c: 103
-# error(_("internet routines cannot be loaded"))
-# src/main/internet.c: 141
-# error(_("internet routines cannot be loaded"))
-# src/main/internet.c: 154
-# error(_("internet routines cannot be loaded"))
-# src/main/internet.c: 165
-# error(_("internet routines cannot be loaded"))
-# src/main/internet.c: 176
-# error(_("internet routines cannot be loaded"))
-# src/main/internet.c: 187
-# error(_("internet routines cannot be loaded"))
-# src/main/internet.c: 196
-# error(_("internet routines cannot be loaded"))
-# src/main/internet.c: 207
-# error(_("internet routines cannot be loaded"))
-# src/main/internet.c: 218
-# error(_("internet routines cannot be loaded"))
-# src/main/internet.c: 227
-# error(_("internet routines cannot be loaded"))
-# src/main/internet.c: 237
-# error(_("internet routines cannot be loaded"))
-#: src/main/internet.c:103 src/main/internet.c:141 src/main/internet.c:154
-#: src/main/internet.c:165 src/main/internet.c:176 src/main/internet.c:187
-#: src/main/internet.c:196 src/main/internet.c:207 src/main/internet.c:218
-#: src/main/internet.c:227 src/main/internet.c:237
+#: src/main/internet.c:94 src/main/internet.c:106 src/main/internet.c:119
+#: src/main/internet.c:130 src/main/internet.c:141 src/main/internet.c:152
+#: src/main/internet.c:161 src/main/internet.c:172 src/main/internet.c:183
+#: src/main/internet.c:192 src/main/internet.c:202 src/main/internet.c:318
+#: src/main/internet.c:330 src/main/internet.c:342 src/main/internet.c:354
 msgid "internet routines cannot be loaded"
 msgstr "procedury internetowe nie mogą zostać załadowane"
 
-# src/main/internet.c: 118
-# error(_("bad value"))
-# src/main/memory.c: 3434
-# error(_("bad value"))
-# src/main/memory.c: 3444
-# error(_("bad value"))
-# src/main/memory.c: 3456
-# error(_("bad value"))
-# src/main/memory.c: 3470
-# error(_("bad value"))
-# src/main/memory.c: 3487
-# error(_("bad value"))
-# src/main/memory.c: 3505
-# error(_("bad value"))
-#: src/main/internet.c:118 src/main/memory.c:3434 src/main/memory.c:3444
-#: src/main/memory.c:3456 src/main/memory.c:3470 src/main/memory.c:3487
-#: src/main/memory.c:3505
-msgid "bad value"
-msgstr "niepoprawna wartość"
-
-# src/main/internet.c: 124
-# warning(_("internet routines were already initialized"))
-#: src/main/internet.c:124
-msgid "internet routines were already initialized"
-msgstr "procedury internetowe zostały już zainicjowane"
-
-# src/main/internet.c: 251
-# error(_("socket routines cannot be loaded"))
-# src/main/internet.c: 265
-# error(_("socket routines cannot be loaded"))
-# src/main/internet.c: 281
-# error(_("socket routines cannot be loaded"))
-# src/main/internet.c: 293
-# error(_("socket routines cannot be loaded"))
-# src/main/internet.c: 307
-# error(_("socket routines cannot be loaded"))
-# src/main/internet.c: 327
-# error(_("socket routines cannot be loaded"))
-# src/main/internet.c: 340
-# error(_("socket routines cannot be loaded"))
-#: src/main/internet.c:251 src/main/internet.c:265 src/main/internet.c:281
-#: src/main/internet.c:293 src/main/internet.c:307 src/main/internet.c:327
-#: src/main/internet.c:340
+#: src/main/internet.c:216 src/main/internet.c:230 src/main/internet.c:247
+#: src/main/internet.c:259 src/main/internet.c:273 src/main/internet.c:293
+#: src/main/internet.c:306
 msgid "socket routines cannot be loaded"
 msgstr "procedury 'socket' nie mogą zostać załadowane"
 
-# src/main/lapack.c: 39
-# error(_("LAPACK routines cannot be accessed in module"))
+#: src/main/internet.c:242
+msgid "attempt to close invalid socket"
+msgstr "próba zamknięcia niepoprawnego gniazda"
+
 #: src/main/lapack.c:39
 msgid "LAPACK routines cannot be accessed in module"
 msgstr "procedury LAPACK nie są dostępne w module"
 
-# src/main/lapack.c: 53
-# error(_("LAPACK routines cannot be loaded"))
 #: src/main/lapack.c:53
 msgid "LAPACK routines cannot be loaded"
 msgstr "procedury LAPACK nie mogą zostać załadowane"
 
-# src/main/logic.c: 70
-# error(_("binary operations require two arguments"))
-#: src/main/logic.c:70
-msgid "binary operations require two arguments"
-msgstr "operacje dwuargumentowe wymagają dwóch argumentów"
-
-# src/main/logic.c: 88
-#  _("operations are possible only for numeric, logical or complex types")
-# src/main/logic.c: 150
-#  _("operations are possible only for numeric, logical or complex types")
-#: src/main/logic.c:88 src/main/logic.c:150
+#: src/main/logic.c:80 src/main/logic.c:142
 msgid "operations are possible only for numeric, logical or complex types"
 msgstr ""
 "operacje są możliwe jedynie dla typów liczbowych, logicznych oraz zespolonych"
 
-# src/main/logic.c: 98
-# error(_("binary operation on non-conformable arrays"))
-#: src/main/logic.c:98
+#: src/main/logic.c:90
 msgid "binary operation on non-conformable arrays"
 msgstr "operacja dwuargumentowa na niezgodnych tablicach"
 
-# src/main/relop.c: 247
-#  _("non-conformable time series")
-# src/main/logic.c: 124
-#  _("non-conformable time series")
-#: src/main/logic.c:124 src/main/relop.c:247
+#: src/main/logic.c:116 src/main/relop.c:250
 msgid "non-conformable time series"
 msgstr "niezgodne szeregi czasowe"
 
-# src/main/logic.c: 254
-# error(_("'%s' operator requires 2 arguments"),
-# 	      PRIMVAL(op) == 1 ? "&&" : "||")
-#: src/main/logic.c:254
+#: src/main/logic.c:247
 #, c-format
 msgid "'%s' operator requires 2 arguments"
 msgstr "operator '%s' wymaga 2 argumentów"
 
-# src/main/logic.c: 261
-#  _("invalid 'x' type in 'x %s y'")
-#: src/main/logic.c:261
+#: src/main/logic.c:254
 #, c-format
 msgid "invalid 'x' type in 'x %s y'"
 msgstr "błędny typ 'x' w 'x %s y'"
 
-# src/main/logic.c: 268
-#  _("invalid 'y' type in 'x %s y'")
-#: src/main/logic.c:268
+#: src/main/logic.c:261
 #, c-format
 msgid "invalid 'y' type in 'x %s y'"
 msgstr "błędny typ 'y' w 'x %s y'"
 
-# src/main/logic.c: 341
-# error(_("Unary operator `!' called with two arguments"))
-#: src/main/logic.c:341
+#: src/main/logic.c:334
 msgid "Unary operator `!' called with two arguments"
 msgstr "Operator jednoargumentowy '!' wywołany z dwoma argumentami"
 
-# src/main/logic.c: 447
-# warningcall(call,
-# 			    _("coercing argument of type '%s' to logical"),
-# 			    type2char(TYPEOF(t)))
-#: src/main/logic.c:448
+#: src/main/logic.c:439
 #, c-format
 msgid "coercing argument of type '%s' to logical"
 msgstr "przekształcenie argumentu typu '%s' w logiczny"
 
-# src/main/main.c: 49
-# gettext("R", "dummy - do not translate")
 #: src/main/main.c:49
 msgid "dummy - do not translate"
 msgstr "wydmuszka - nie tłumacz tego"
 
-#: src/main/main.c:476
+#: src/main/main.c:329
+msgid "error during cleanup\n"
+msgstr "błąd podczas czyszczenia\n"
+
+#: src/main/main.c:336
+msgid "Execution halted\n"
+msgstr "Wykonywanie wstrzymane\n"
+
+#: src/main/main.c:505
 msgid "Error: segfault from C stack overflow\n"
 msgstr "Błąd: błąd segmentacji z przepełnionego stosu C\n"
 
-#: src/main/main.c:846
+#: src/main/main.c:888
 msgid "unable to open the base package\n"
 msgstr "nie można otworzyć bazowego pakietu\n"
 
-#: src/main/main.c:924
+#: src/main/main.c:971
 #, c-format
 msgid "unable to restore saved data in %s\n"
 msgstr "nie można odtworzyć zapisanych danych w '%s'\n"
 
-# src/main/main.c: 971
-# (_("During startup - "))
-#: src/main/main.c:971
+#: src/main/main.c:1020
 msgid "During startup - "
 msgstr "Podczas startu - "
 
-# src/main/main.c: 1224
-# warning(_("cannot quit from browser"))
-#: src/main/main.c:1224
+#: src/main/main.c:1036
+msgid "unable to initialize the JIT\n"
+msgstr "nie można zainicjować JIT\n"
+
+#: src/main/main.c:1290
 msgid "cannot quit from browser"
 msgstr "nie można wyjść z przeglądarki"
 
-# src/main/main.c: 1228
-#  _("one of \"yes\", \"no\", \"ask\" or \"default\" expected.")
-#: src/main/main.c:1228
+#: src/main/main.c:1294
 msgid "one of \"yes\", \"no\", \"ask\" or \"default\" expected."
 msgstr "oczekiwano wartości jednej z \"yes\", \"no\", \"ask\" lub \"default\"."
 
-# src/main/main.c: 1233
-# warning(_("save=\"ask\" in non-interactive use: command-line default will be used"))
-#: src/main/main.c:1233
+#: src/main/main.c:1299
 msgid "save=\"ask\" in non-interactive use: command-line default will be used"
 msgstr ""
 "'save=\"ask\"' jest w nieinteraktywnym użyciu: zostanie użyty domyślny "
 "wiersz poleceń"
 
-# src/main/main.c: 1241
-#  _("unrecognized value of 'save'")
-#: src/main/main.c:1241
+#: src/main/main.c:1307
 msgid "unrecognized value of 'save'"
 msgstr "nierozpoznana wartość argumentu 'save'"
 
-# src/main/main.c: 1244
-# warning(_("invalid 'status', 0 assumed"))
-#: src/main/main.c:1244
+#: src/main/main.c:1310
 msgid "invalid 'status', 0 assumed"
 msgstr "niepoprawny argument 'status', założono wartość 0"
 
-# src/main/main.c: 1249
-# warning(_("invalid 'runLast', FALSE assumed"))
-#: src/main/main.c:1249
+#: src/main/main.c:1315
 msgid "invalid 'runLast', FALSE assumed"
 msgstr "niepoprawny argument 'runLast', przyjęto FALSE"
 
-# src/main/main.c: 1280
-# error(_("cannot allocate space for toplevel callback element"))
-#: src/main/main.c:1280
+#: src/main/main.c:1346
 msgid "cannot allocate space for toplevel callback element"
 msgstr ""
 "nie można przydzielić miejsca dla elementu 'callback' najwyższego poziomu"
 
-# src/main/main.c: 1358
-# error(_("negative index passed to R_removeTaskCallbackByIndex"))
-#: src/main/main.c:1358
+#: src/main/main.c:1424
 msgid "negative index passed to R_removeTaskCallbackByIndex"
 msgstr "ujemny indeks przekazany do 'R_removeTaskCallbackByIndex()'"
 
-#: src/main/main.c:1468
+#: src/main/main.c:1534
 #, c-format
 msgid "warning messages from top-level task callback '%s'\n"
 msgstr ""
 "komunikaty ostrzegawcze z zadania 'callback' najwyższego poziomu '%s'\n"
 
-# src/main/main.c: 1524
-# warning(_("top-level task callback did not return a logical value"))
-#: src/main/main.c:1524
+#: src/main/main.c:1591
 msgid "top-level task callback did not return a logical value"
 msgstr "zadanie 'callback' najwyższego poziomu nie zwróciło wartości logicznej"
 
-# src/library/parallel/R/clusterApply.R: 106
-# stop("zero-length inputs cannot be mixed with those of non-zero length")
-# src/main/mapply.c: 58
-# error(_("zero-length inputs cannot be mixed with those of non-zero length"))
 #: src/main/mapply.c:58
 msgid "zero-length inputs cannot be mixed with those of non-zero length"
 msgstr ""
 "wejścia o zerowej długości nie mogą być pomieszane z tymi o niezerowej "
 "długości"
 
-# src/main/mapply.c: 76
-# error(_("argument 'MoreArgs' of 'mapply' is not a list"))
 #: src/main/mapply.c:76
 msgid "argument 'MoreArgs' of 'mapply' is not a list"
 msgstr "argument 'MoreArgs' w 'mapply()' nie jest listą"
 
-# src/main/mapply.c: 113
-# warning(_("longer argument not a multiple of length of shorter"))
 #: src/main/mapply.c:113
 msgid "longer argument not a multiple of length of shorter"
 msgstr "dłuższy argument nie jest wielokrotnością długości krótszego"
 
-# src/main/match.c: 111
-# error(_("invalid partial string match"))
 #: src/main/match.c:111
 msgid "invalid partial string match"
 msgstr "niepoprawna częściowa zgodność łańcucha"
 
-# src/main/objects.c: 56
-# error(_("formal argument \"%s\" matched by multiple actual arguments"), tag)
-# src/main/objects.c: 66
-# error(_("formal argument \"%s\" matched by multiple actual arguments"), tag)
-# src/main/match.c: 228
-# error(_("formal argument \"%s\" matched by multiple actual arguments"),
-# 			      CHAR(PRINTNAME(TAG(f))))
-# src/main/match.c: 268
-# error(_("formal argument \"%s\" matched by multiple actual arguments"),
-# 				  CHAR(PRINTNAME(TAG(f))))
-#: src/main/match.c:228 src/main/match.c:268 src/main/objects.c:56
-#: src/main/objects.c:66
+#: src/main/match.c:228 src/main/match.c:266 src/main/objects.c:49
+#: src/main/objects.c:59
 #, c-format
 msgid "formal argument \"%s\" matched by multiple actual arguments"
 msgstr "formalny argument \"%s\" dopasowany przez wiele aktualnych argumentów"
 
-# src/main/match.c: 231
-# error(_("argument %d matches multiple formal arguments"), i)
-# src/main/match.c: 266
-# error(_("argument %d matches multiple formal arguments"), i)
-#: src/main/match.c:231 src/main/match.c:266
+#: src/main/match.c:231 src/main/match.c:264
 #, c-format
 msgid "argument %d matches multiple formal arguments"
 msgstr "argument %d pasuje do wielu formalnych argumentów"
 
-# src/main/match.c: 271
-# warningcall(call,
-# 					_("partial argument match of '%s' to '%s'"),
-# 					CHAR(PRINTNAME(TAG(b))),
-# 					CHAR(PRINTNAME(TAG(f))) )
-#: src/main/match.c:272
+#: src/main/match.c:270
 #, c-format
 msgid "partial argument match of '%s' to '%s'"
 msgstr "częściowa zgodność pomiędzy argumentami '%s' oraz '%s'"
 
-# src/main/match.c: 383
-# ngettext("unused argument %s",
-# 			       "unused arguments %s",
-# 			       (unsigned long) length(unusedForError))
-#: src/main/match.c:383
+#: src/main/match.c:380
 #, c-format
 msgid "unused argument %s"
 msgid_plural "unused arguments %s"
@@ -8365,276 +4254,193 @@ msgstr[0] "nieużywany argument %s"
 msgstr[1] "nieużywane argumenty %s"
 msgstr[2] "nieużywane argumenty %s"
 
-# src/main/memory.c: 1232
-# error(_("can only weakly reference/finalize reference objects"))
-#: src/main/memory.c:1232
+#: src/main/memory.c:1234
 msgid "can only weakly reference/finalize reference objects"
 msgstr "można jedynie słabo odwoływać/ finalizować obiekty referencyjne"
 
-# src/main/memory.c: 1266
-# error(_("finalizer must be a function or NULL"))
-#: src/main/memory.c:1266
+#: src/main/memory.c:1268
 msgid "finalizer must be a function or NULL"
 msgstr "finalizator musi być funkcją lub wartością NULL"
 
-# src/main/memory.c: 1322
-# error(_("not a weak reference"))
-# src/main/memory.c: 1330
-# error(_("not a weak reference"))
-# src/main/memory.c: 1341
-# error(_("not a weak reference"))
-#: src/main/memory.c:1322 src/main/memory.c:1330 src/main/memory.c:1341
+#: src/main/memory.c:1324 src/main/memory.c:1332 src/main/memory.c:1343
 msgid "not a weak reference"
 msgstr "to nie jest słaba referencja"
 
-# src/main/memory.c: 1472
-# error(_("first argument must be environment or external pointer"))
-#: src/main/memory.c:1472
+#: src/main/memory.c:1474
 msgid "first argument must be environment or external pointer"
 msgstr "pierwszy argument musi być środowiskiem lub zewnętrznym wskaźnikiem"
 
-# src/main/memory.c: 1474
-# error(_("second argument must be a function"))
-#: src/main/memory.c:1474
+#: src/main/memory.c:1476
 msgid "second argument must be a function"
 msgstr "drugi argument musi być funkcją"
 
-# src/main/memory.c: 1478
-# error(_("third argument must be 'TRUE' or 'FALSE'"))
-#: src/main/memory.c:1478
+#: src/main/memory.c:1480
 msgid "third argument must be 'TRUE' or 'FALSE'"
 msgstr "trzeci argument musi być 'TRUE' lub 'FALSE'"
 
-# src/main/memory.c: 1970
-#  _("vector memory exhausted (limit reached?)")
-#: src/main/memory.c:1970
+#: src/main/memory.c:1979
 msgid "vector memory exhausted (limit reached?)"
 msgstr "wektorowa pamięć wyczerpana (osiągnięto limit?)"
 
-# src/main/memory.c: 1976
-#  _("cons memory exhausted (limit reached?)")
-#: src/main/memory.c:1976
+#: src/main/memory.c:1985
 msgid "cons memory exhausted (limit reached?)"
 msgstr "pamięć 'cons' wyczerpana (osiągnięto limit?)"
 
-# src/main/memory.c: 1981
-#  _("memory exhausted (limit reached?)")
-#: src/main/memory.c:1981
+#: src/main/memory.c:1990
 msgid "memory exhausted (limit reached?)"
 msgstr "pamięć wyczerpana (osiągnięto limit?)"
 
-# src/main/memory.c: 2116
-# error(_("cannot allocate memory block of size %0.f Tb"),
-# 		  dsize/R_pow_di(1024.0, 4))
-#: src/main/memory.c:2116
+#: src/main/memory.c:2126
 #, c-format
 msgid "cannot allocate memory block of size %0.f Tb"
 msgstr "nie można przydzielić bloku pamięci o rozmiarze %0.f Tb"
 
-# src/main/memory.c: 2121
-# error(_("cannot allocate memory block of size %0.1f Gb"),
-# 		  dsize/R_pow_di(1024.0, 3))
-#: src/main/memory.c:2121
+#: src/main/memory.c:2131
 #, c-format
 msgid "cannot allocate memory block of size %0.1f Gb"
 msgstr "nie można przydzielić bloku pamięci o rozmiarze %0.1f Gb"
 
-# src/main/memory.c: 2442
-#  _("vector is too large")
-#: src/main/memory.c:2442
+#: src/main/memory.c:2458
 msgid "vector is too large"
 msgstr "wektor jest zbyt duży"
 
-# src/main/memory.c: 2445
-#  _("negative length vectors are not allowed")
-#: src/main/memory.c:2445
+#: src/main/memory.c:2461
 msgid "negative length vectors are not allowed"
 msgstr "wektory o ujemnej długości nie są dozwolone"
 
-# src/main/memory.c: 2471
-#  _("cannot allocate vector of length %d")
-# src/main/memory.c: 2484
-#  _("cannot allocate vector of length %d")
-# src/main/memory.c: 2497
-#  _("cannot allocate vector of length %d")
-# src/main/memory.c: 2512
-#  _("cannot allocate vector of length %d")
-#: src/main/memory.c:2471 src/main/memory.c:2484 src/main/memory.c:2497
-#: src/main/memory.c:2512
+#: src/main/memory.c:2487 src/main/memory.c:2500 src/main/memory.c:2513
+#: src/main/memory.c:2528
 #, c-format
 msgid "cannot allocate vector of length %d"
 msgstr "nie można przydzielić wektora o długości %d"
 
-# src/main/memory.c: 2533
-# error(_("invalid type/length (%s/%d) in vector allocation"),
-# 	      type2char(type), length)
-#: src/main/memory.c:2533
+#: src/main/memory.c:2549
 #, c-format
 msgid "invalid type/length (%s/%d) in vector allocation"
 msgstr "niepoprawny typ/długość (%s/%d) dla przydziału wektora"
 
-# src/main/memory.c: 2636
-#  _("cannot allocate vector of size %0.1f Gb")
-#: src/main/memory.c:2636
+#: src/main/memory.c:2648
 #, c-format
 msgid "cannot allocate vector of size %0.1f Gb"
 msgstr "nie można przydzielić wektora o rozmiarze %0.1f Gb"
 
-# src/main/memory.c: 2640
-#  _("cannot allocate vector of size %0.1f Mb")
-#: src/main/memory.c:2640
+#: src/main/memory.c:2652
 #, c-format
 msgid "cannot allocate vector of size %0.1f Mb"
 msgstr "nie można przydzielić wektora o rozmiarze %0.1f Mb"
 
-# src/main/memory.c: 2644
-#  _("cannot allocate vector of size %0.f Kb")
-#: src/main/memory.c:2644
+#: src/main/memory.c:2656
 #, c-format
 msgid "cannot allocate vector of size %0.f Kb"
 msgstr "nie można przydzielić wektora o rozmiarze %0.f Kb"
 
-# src/main/memory.c: 3001
-#  _("protect(): protection stack overflow")
-#: src/main/memory.c:3001
+#: src/main/memory.c:3071
 msgid "protect(): protection stack overflow"
 msgstr "protect(): zabezpieczenie stosu przed przepełnieniem"
 
-# src/main/memory.c: 3008
-# error(_("unprotect(): only %d protected items"), R_PPStackTop)
-#: src/main/memory.c:3008
+#: src/main/memory.c:3078
 #, c-format
-msgid "unprotect(): only %d protected items"
-msgstr "unprotect(): zabezpieczonych pozycji: %d"
+msgid "unprotect(): only %d protected item"
+msgid_plural "unprotect(): only %d protected items"
+msgstr[0] "unprotect(): tylko %d zabezpieczona pozycja"
+msgstr[1] "unprotect(): tylko %d zabezpieczone pozycje"
+msgstr[2] "unprotect(): tylko %d zabezpieczonych pozycji"
 
-# src/main/memory.c: 3041
-# error(_("unprotect_ptr: pointer not found"))
-#: src/main/memory.c:3041
+#: src/main/memory.c:3113
 msgid "unprotect_ptr: pointer not found"
 msgstr "unprotect_ptr: wskaźnik nie został znaleziony"
 
-# src/main/memory.c: 3079
-# error(_("R_Reprotect: only %d protected items, can't reprotect index %d"),
-# 	  R_PPStackTop, i)
-#: src/main/memory.c:3079
+#: src/main/memory.c:3151
 #, c-format
-msgid "R_Reprotect: only %d protected items, can't reprotect index %d"
-msgstr ""
-"R_Reprotect: zabezpieczonych pozycji: %d. Nie można ponownie zabezpieczyć "
+msgid "R_Reprotect: only %d protected item, can't reprotect index %d"
+msgid_plural "R_Reprotect: only %d protected items, can't reprotect index %d"
+msgstr[0] ""
+"R_Reprotect: tylko %d zabezpieczona pozycja. Nie można ponownie zabezpieczyć "
 "indeksu %d"
+msgstr[1] ""
+"R_Reprotect: tylko %d zabezpieczone pozycje. Nie można ponownie zabezpieczyć "
+"indeksu %d"
+msgstr[2] ""
+"R_Reprotect: tylko %d zabezpieczonych pozycji. Nie można ponownie "
+"zabezpieczyć indeksu %d"
 
-# src/main/memory.c: 3129
-# error(_("'Calloc' could not allocate memory (%.0f of %u bytes)"),
-# 	      (double) nelem, elsize)
-#: src/main/memory.c:3129
+#: src/main/memory.c:3203
 #, c-format
 msgid "'Calloc' could not allocate memory (%.0f of %u bytes)"
 msgstr "'Calloc' nie mógł przydzielić pamięci (%.0f z %u bajtów)"
 
-# src/main/memory.c: 3140
-# error(_("'Realloc' could not re-allocate memory (%.0f bytes)"), 
-# 	      (double) size)
-#: src/main/memory.c:3140
+#: src/main/memory.c:3214
 #, c-format
 msgid "'Realloc' could not re-allocate memory (%.0f bytes)"
 msgstr "'Realloc' nie mógł ponownie przydzielić pamięci (%.0f bajtów)"
 
-# src/main/memory.c: 3380
-# error(_("not safe to return vector pointer"))
-#: src/main/memory.c:3380
+#: src/main/memory.c:3460
 msgid "not safe to return vector pointer"
 msgstr "nie jest bezpiecznie zwracać wskaźnik wektora"
 
-# src/main/memory.c: 3392
-# error(_("attempt to set index %lu/%lu in SET_STRING_ELT"),
-# 	      i, XLENGTH(x))
-#: src/main/memory.c:3392
+#: src/main/memory.c:3471
 #, c-format
 msgid "attempt to set index %lu/%lu in SET_STRING_ELT"
 msgstr "próba ustawienia indeksu %lu/%lu w SET_STRING_ELT"
 
-# src/main/memory.c: 3408
-# error(_("attempt to set index %lu/%lu in SET_VECTOR_ELT"), 
-# 	      i, XLENGTH(x))
-#: src/main/memory.c:3408
+#: src/main/memory.c:3487
 #, c-format
 msgid "attempt to set index %lu/%lu in SET_VECTOR_ELT"
 msgstr "próba ustawienia indeksu %lu/%lu w SET_VECTOR_ELT"
 
-# src/main/memory.c: 3658
-# error(_("memory profiling is not available on this system"))
-#: src/main/memory.c:3658
+#: src/main/memory.c:3514 src/main/memory.c:3524 src/main/memory.c:3536
+#: src/main/memory.c:3550 src/main/memory.c:3565 src/main/memory.c:3583
+msgid "bad value"
+msgstr "niepoprawna wartość"
+
+#: src/main/memory.c:3746
 msgid "memory profiling is not available on this system"
 msgstr "profilowanie pamięci nie jest dostępne na tym systemie"
 
-# src/main/memory.c: 3723
-# error(_("Rprofmem: cannot open output file '%s'"), filename)
-#: src/main/memory.c:3723
+#: src/main/memory.c:3810
 #, c-format
 msgid "Rprofmem: cannot open output file '%s'"
 msgstr "Rprofmem: nie można otworzyć pliku wyjściowego '%s'"
 
-# src/main/memory.c: 3830
-# error(_("long vectors not supported yet: %s:%d"), file, line)
-#: src/main/memory.c:3830
+#: src/main/memory.c:3915
 #, c-format
 msgid "long vectors not supported yet: %s:%d"
 msgstr "długie wektory nie są jeszcze wspierane: %s:%d"
 
-# src/main/names.c: 996
-#  _("string argument required")
-#: src/main/names.c:996
+#: src/main/names.c:1021
 msgid "string argument required"
 msgstr "wymagany jest argument łańcucha"
 
-# src/main/names.c: 999
-#  _("no such primitive function")
-#: src/main/names.c:999
+#: src/main/names.c:1024
 msgid "no such primitive function"
 msgstr "brak takiej prymitywnej funkcji"
 
-# src/main/names.c: 1146
-# error(_("attempt to use zero-length variable name"))
-#: src/main/names.c:1146
+#: src/main/names.c:1212 src/main/names.c:1242
 msgid "attempt to use zero-length variable name"
 msgstr "próba użycia nazwy zmiennej o zerowej długości"
 
-# src/main/names.c: 1148
-# error(_("variable names are limited to %d bytes"), MAXIDSIZE)
-#: src/main/names.c:1148
+#: src/main/names.c:1214 src/main/names.c:1244
 #, c-format
 msgid "variable names are limited to %d bytes"
 msgstr "nazwy zmiennych są ograniczone do %d bajtów"
 
-# src/main/names.c: 1176
-#  _("invalid .Internal() argument")
-# src/main/names.c: 1179
-#  _("invalid .Internal() argument")
-#: src/main/names.c:1176 src/main/names.c:1179
+#: src/main/names.c:1307 src/main/names.c:1310
 msgid "invalid .Internal() argument"
 msgstr "niepoprawny argument '.Internal()'"
 
-# src/main/objects.c: 46
-# error(_("generic 'function' is not a function"))
-#: src/main/objects.c:46
+#: src/main/objects.c:39
 msgid "generic 'function' is not a function"
 msgstr "ogólny argument 'function' nie jest funkcją"
 
-# src/main/objects.c: 201
-# error(_("bad generic call environment"))
-#: src/main/objects.c:201
+#: src/main/objects.c:193
 msgid "bad generic call environment"
 msgstr "niepoprawne ogólne wywołanie środowiska"
 
-# src/main/objects.c: 207
-# error(_("bad generic definition environment"))
-#: src/main/objects.c:207
+#: src/main/objects.c:201
 msgid "bad generic definition environment"
 msgstr "niepoprawna ogólna definicja środowiska"
 
-# src/main/objects.c: 246
-# error(_("no '.S3MethodsClass' table, cannot use S4 objects with S3 methods ('methods' package not attached?)"))
-#: src/main/objects.c:246
+#: src/main/objects.c:249
 msgid ""
 "no '.S3MethodsClass' table, cannot use S4 objects with S3 methods ('methods' "
 "package not attached?)"
@@ -8642,208 +4448,119 @@ msgstr ""
 "brak tabeli '.S3MethodsClass', nie można użyć obiektów S4 z metodami S3 "
 "(pakiet 'methods' nie został dołączony?)"
 
-# src/main/objects.c: 270
-# error(_("'UseMethod' used in an inappropriate fashion"))
-# src/main/objects.c: 411
-#  _("'UseMethod' used in an inappropriate fashion")
-#: src/main/objects.c:270 src/main/objects.c:411
-msgid "'UseMethod' used in an inappropriate fashion"
-msgstr "'UseMethod' użyta w niepoprawny sposób"
-
-# src/main/objects.c: 290
-# error(_("invalid generic function in 'usemethod'"))
-#: src/main/objects.c:290
-msgid "invalid generic function in 'usemethod'"
-msgstr "niepoprawna ogólna funkcja w 'usemethod'"
-
-# src/main/objects.c: 399
-#  _("there must be a 'generic' argument")
-#: src/main/objects.c:399
+#: src/main/objects.c:415
 msgid "there must be a 'generic' argument"
 msgstr "argument 'generic' musi być podany"
 
-# src/main/objects.c: 403
-#  _("'generic' argument must be a character string")
-#: src/main/objects.c:403
+#: src/main/objects.c:419
 msgid "'generic' argument must be a character string"
 msgstr "argument 'generic' musi być łańcuchem tekstowym"
 
-# src/main/objects.c: 440
-#  _("'UseMethod' called from outside a function")
-#: src/main/objects.c:440
-msgid "'UseMethod' called from outside a function"
-msgstr "'UseMethod()' wywołana spoza funkcji"
-
-# src/main/objects.c: 447
-#  _("first argument must be a generic name")
-#: src/main/objects.c:447
-msgid "first argument must be a generic name"
-msgstr "pierwszy argument musi być ogólną nazwą"
+#: src/main/objects.c:427
+msgid "'UseMethod' used in an inappropriate fashion"
+msgstr "'UseMethod' użyta w niepoprawny sposób"
 
-# src/main/objects.c: 472
-#  _("no applicable method for '%s' applied to an object of class \"%s\"")
 #: src/main/objects.c:472
 #, c-format
 msgid "no applicable method for '%s' applied to an object of class \"%s\""
 msgstr "niestosowalna metoda dla '%s' zastosowana do obiektu klasy \"%s\""
 
-# src/main/objects.c: 533
-# error(_("'NextMethod' called from outside a function"))
-#: src/main/objects.c:533
+#: src/main/objects.c:582
 msgid "'NextMethod' called from outside a function"
 msgstr "'NextMethod()' wywołana spoza funkcji"
 
-# src/main/objects.c: 539
-# error(_("'NextMethod' called from an anonymous function"))
-#: src/main/objects.c:539
+#: src/main/objects.c:588
 msgid "'NextMethod' called from an anonymous function"
 msgstr "'NextMethod()' wywołana z anonimowej funkcji"
 
-# src/main/objects.c: 563
-# error(_("no calling generic was found: was a method called directly?"))
-#: src/main/objects.c:563
+#: src/main/objects.c:609
 msgid "no calling generic was found: was a method called directly?"
 msgstr "nie znaleziono ogólnego wywołania: czy metoda wywołana bezpośrednio?"
 
-# src/main/objects.c: 566
-#  _("'function' is not a function, but of type %d")
-#: src/main/objects.c:566
+#: src/main/objects.c:612
 #, c-format
 msgid "'function' is not a function, but of type %d"
 msgstr "'function' nie jest funkcją, lecz typem '%d'"
 
-# src/main/objects.c: 640
-# error(_("wrong argument ..."))
-#: src/main/objects.c:640
+#: src/main/objects.c:639
 msgid "wrong argument ..."
 msgstr "błędny argument ..."
 
-# src/main/objects.c: 653
-# error(_("object not specified"))
-#: src/main/objects.c:653
+#: src/main/objects.c:651
 msgid "object not specified"
 msgstr "nie określono obiektu"
 
-# src/main/objects.c: 663
-# error(_("generic function not specified"))
-# src/main/objects.c: 670
-# error(_("generic function not specified"))
-#: src/main/objects.c:663 src/main/objects.c:670
+#: src/main/objects.c:659 src/main/objects.c:666
 msgid "generic function not specified"
 msgstr "ogólna funkcja nie jest określona"
 
-# src/main/objects.c: 667
-# error(_("invalid generic argument to 'NextMethod'"))
-#: src/main/objects.c:667
+#: src/main/objects.c:663
 msgid "invalid generic argument to 'NextMethod'"
 msgstr "niepoprawny ogólny argument przekazany do 'NextMethod()'"
 
-# src/main/objects.c: 680
-# error(_("invalid 'group' argument found in 'NextMethod'"))
-#: src/main/objects.c:680
+#: src/main/objects.c:675
 msgid "invalid 'group' argument found in 'NextMethod'"
 msgstr "niepoprawny argument 'group' znaleziony w 'NextMethod()'"
 
-# src/main/objects.c: 699
-# error(_("wrong value for .Method"))
-#: src/main/objects.c:699
+#: src/main/objects.c:692
 msgid "wrong value for .Method"
 msgstr "błędna wartość dla '.Method'"
 
-# src/main/objects.c: 703
-# error(_("method name too long in '%s'"), ss)
-# src/main/objects.c: 712
-# error(_("method name too long in '%s'"), ss)
-#: src/main/objects.c:703 src/main/objects.c:712
-#, c-format
-msgid "method name too long in '%s'"
-msgstr "nazwa metody w '%s' jest zbyt długa"
-
-# src/main/objects.c: 715
-# warning(_("Incompatible methods ignored"))
-#: src/main/objects.c:715
+#: src/main/objects.c:702
 msgid "Incompatible methods ignored"
 msgstr "Niezgodne metody zostały zignorowane"
 
-# src/main/objects.c: 775
-# error(_("no method to invoke"))
-# src/main/objects.c: 780
-# error(_("no method to invoke"))
-#: src/main/objects.c:775 src/main/objects.c:780
+#: src/main/objects.c:759 src/main/objects.c:766
 msgid "no method to invoke"
 msgstr "brak metody do wywołania"
 
-# src/main/objects.c: 832
-#  _("cannot unclass an environment")
-#: src/main/objects.c:832
+#: src/main/objects.c:817
 msgid "cannot unclass an environment"
 msgstr "nie można zdjąć klasy ze środowiska"
 
-# src/main/objects.c: 835
-#  _("cannot unclass an external pointer")
-#: src/main/objects.c:835
+#: src/main/objects.c:820
 msgid "cannot unclass an external pointer"
 msgstr "nie można zdjąć klasy z zewnętrznego wskaźnika"
 
-# src/main/objects.c: 872
-# error(_("'what' must be a character vector"))
-#: src/main/objects.c:872
+#: src/main/objects.c:856
 msgid "'what' must be a character vector"
 msgstr "'what' musi być wektorem tekstowym"
 
-# src/main/objects.c: 876
-# error(_("'which' must be a length 1 logical vector"))
-#: src/main/objects.c:876
+#: src/main/objects.c:860
 msgid "'which' must be a length 1 logical vector"
 msgstr "argument 'which' musi być wektorem logicznym o długości 1"
 
-# src/main/objects.c: 882
-# warning(_("use 'is()' instead of 'inherits()' on S4 objects"))
-#: src/main/objects.c:882
+#: src/main/objects.c:866
 msgid "use 'is()' instead of 'inherits()' on S4 objects"
 msgstr "użyj 'is()' zamiast 'inherits()' dla obiektów S4"
 
-# src/main/objects.c: 1012
-# error(_("could not find correct environment; please report!"))
-#: src/main/objects.c:1012
+#: src/main/objects.c:995
 msgid "could not find correct environment; please report!"
 msgstr "nie udało się znaleźć poprawnego środowiska; proszę zgłosić raport!"
 
-# src/main/objects.c: 1052
-# error(_("'onOff' must be TRUE or FALSE"))
-#: src/main/objects.c:1052
+#: src/main/objects.c:1039
 msgid "'onOff' must be TRUE or FALSE"
 msgstr "'onOff' musi być TRUE lub FALSE"
 
-# src/main/objects.c: 1119
-# error(_("unable to find a non-generic version of function \"%s\""),
-# 	      translateChar(asChar(name)))
-#: src/main/objects.c:1119
+#: src/main/objects.c:1104
 #, c-format
 msgid "unable to find a non-generic version of function \"%s\""
 msgstr "nie można znaleźć nie-ogólnej wersji funkcji \"%s\""
 
-# src/main/objects.c: 1150
-# warningcall(call,
-# 		    _("'standardGeneric' called without 'methods' dispatch enabled (will be ignored)"))
-#: src/main/objects.c:1151
+#: src/main/objects.c:1136
 msgid ""
 "'standardGeneric' called without 'methods' dispatch enabled (will be ignored)"
 msgstr ""
 "'standardGeneric' wywołane bez włączonego wysyłania 'methods' (będzie "
 "zignorowane)"
 
-# src/main/objects.c: 1160
-#  _("argument to 'standardGeneric' must be a non-empty character string")
-#: src/main/objects.c:1160
+#: src/main/objects.c:1145
 msgid "argument to 'standardGeneric' must be a non-empty character string"
 msgstr ""
 "argument przekazywany do 'standardGeneric()' musi być niepustym łańcuchem "
 "tekstowym"
 
-# src/main/objects.c: 1165
-# error(_("call to standardGeneric(\"%s\") apparently not from the body of that generic function"), translateChar(STRING_ELT(arg, 0)))
-#: src/main/objects.c:1165
+#: src/main/objects.c:1150
 #, c-format
 msgid ""
 "call to standardGeneric(\"%s\") apparently not from the body of that generic "
@@ -8852,15 +4569,7 @@ msgstr ""
 "wywołanie dla 'standardGeneric' (\"%s\") najwyraźniej nie zostało wysłane z "
 "ciała funkcji ogólnej"
 
-# src/main/objects.c: 1189
-# error(_("argument 'code' must be a character string"))
-#: src/main/objects.c:1189
-msgid "argument 'code' must be a character string"
-msgstr "argument 'code' musi być łańcuchem tekstowym"
-
-# src/main/objects.c: 1257
-# error(_("invalid primitive methods code (\"%s\"): should be \"clear\", \"reset\", \"set\", or \"suppress\""), code_string)
-#: src/main/objects.c:1257
+#: src/main/objects.c:1249
 #, c-format
 msgid ""
 "invalid primitive methods code (\"%s\"): should be \"clear\", \"reset\", "
@@ -8869,16 +4578,11 @@ msgstr ""
 "niepoprawny kod prymitywnej metody (\"%s\"): musi być \"clear\", \"reset\", "
 "\"set\", lub \"suppress\""
 
-# src/main/objects.c: 1265
-# error(_("invalid object: must be a primitive function"))
-#: src/main/objects.c:1265
+#: src/main/objects.c:1257
 msgid "invalid object: must be a primitive function"
 msgstr "niepoprawny obiekt: musi być prymitywną funkcją"
 
-# src/main/objects.c: 1312
-# error(_("the formal definition of a primitive generic must be a function object (got type '%s')"),
-# 		  type2char(TYPEOF(fundef)))
-#: src/main/objects.c:1312
+#: src/main/objects.c:1304
 #, c-format
 msgid ""
 "the formal definition of a primitive generic must be a function object (got "
@@ -8887,31 +4591,20 @@ msgstr ""
 "formalna definicja prymitywnej ogólnej metody musi być obiektem funkcyjnym "
 "(otrzymano typ '%s')"
 
-# src/main/objects.c: 1342
-# error(_("object returned as generic function \"%s\" does not appear to be one"), PRIMNAME(op))
-#: src/main/objects.c:1342
+#: src/main/objects.c:1334
 #, c-format
 msgid "object returned as generic function \"%s\" does not appear to be one"
 msgstr "obiekt zwrócony jako ogólna funkcja '%s' nie wygląda na taką"
 
-# src/main/objects.c: 1444
-# error(_("invalid primitive operation given for dispatch"))
-#: src/main/objects.c:1444
+#: src/main/objects.c:1439
 msgid "invalid primitive operation given for dispatch"
 msgstr "podano niepoprawną prymitywną operację dla wysyłania"
 
-# src/main/objects.c: 1470
-# error(_("dispatch error"))
-# src/main/objects.c: 1489
-# error(_("dispatch error"))
-#: src/main/objects.c:1470 src/main/objects.c:1489
+#: src/main/objects.c:1468 src/main/objects.c:1487
 msgid "dispatch error"
 msgstr "błąd wysyłania"
 
-# src/main/objects.c: 1483
-# error(_("primitive function \"%s\" has been set for methods but no generic function supplied"),
-# 	      PRIMNAME(op))
-#: src/main/objects.c:1483
+#: src/main/objects.c:1481
 #, c-format
 msgid ""
 "primitive function \"%s\" has been set for methods but no generic function "
@@ -8920,751 +4613,420 @@ msgstr ""
 "prymitywna funkcja '%s' została ustawiona dla metod, ale nie dostarczono "
 "funkcji ogólnej"
 
-# src/main/objects.c: 1508
-# error(_("C level MAKE_CLASS macro called with NULL string pointer"))
-#: src/main/objects.c:1508
+#: src/main/objects.c:1506
 msgid "C level MAKE_CLASS macro called with NULL string pointer"
 msgstr ""
 "makro MAKE_CLASS poziomu C wywołane ze wskaźnikiem łańcucha ustawionym na "
 "NULL"
 
-# src/main/objects.c: 1524
-# error(_("R_getClassDef(.) called with NULL string pointer"))
-#: src/main/objects.c:1524
+#: src/main/objects.c:1522
+msgid "'methods' package not yet loaded"
+msgstr "pakiet 'methods' nie został jeszcze załadowany"
+
+#: src/main/objects.c:1532
 msgid "R_getClassDef(.) called with NULL string pointer"
 msgstr "'R_getClassDef(.)' wywołane ze wskaźnikiem łańcucha ustawionym na NULL"
 
-# src/main/objects.c: 1546
-# error(_("C level NEW macro called with null class definition pointer"))
-#: src/main/objects.c:1546
+#: src/main/objects.c:1577
 msgid "C level NEW macro called with null class definition pointer"
 msgstr "makro NEW poziomu C wywołane z pustym wskaźnikiem definicji klasy"
 
-# src/main/objects.c: 1550
-# error(_("trying to generate an object from a virtual class (\"%s\")"),
-# 	      translateChar(asChar(e)))
-#: src/main/objects.c:1550
+#: src/main/objects.c:1581
 #, c-format
 msgid "trying to generate an object from a virtual class (\"%s\")"
 msgstr "próba wygenerowania obiektu z klasy wirtualnej (\"%s\")"
 
-# src/main/objects.c: 1627
-# error(_("object of class \"%s\" does not correspond to a valid S3 object"),
-# 		      CHAR(STRING_ELT(R_data_class(s, FALSE), 0)))
-#: src/main/objects.c:1627
+#: src/main/objects.c:1663
 #, c-format
 msgid "object of class \"%s\" does not correspond to a valid S3 object"
 msgstr "obiekt klasy \"%s\" nie odpowiada poprawnemu obiektowi klasy S3"
 
-# src/main/options.c: 120
-# error(_("corrupted options list"))
-# src/main/options.c: 180
-# error(_("corrupted options list"))
-#: src/main/options.c:120 src/main/options.c:180
+#: src/main/options.c:121 src/main/options.c:182
 msgid "corrupted options list"
 msgstr "uszkodzona lista opcji"
 
-# src/main/options.c: 130
-# warning(_("invalid printing width, used 80"))
-#: src/main/options.c:130
+#: src/main/options.c:131
 msgid "invalid printing width, used 80"
 msgstr "niepoprawna szerokość druku, użyto 80"
 
-# src/main/options.c: 141
-# warning(_("invalid printing digits, used 7"))
-#: src/main/options.c:141
+#: src/main/options.c:142
 msgid "invalid printing digits, used 7"
 msgstr "niepoprawna liczba cyfr po przecinku, użyto 7"
 
-# src/main/options.c: 153
-# warning(_("invalid 'deparse.cutoff', used 60"))
-#: src/main/options.c:153
+#: src/main/options.c:154
 msgid "invalid 'deparse.cutoff', used 60"
 msgstr "niepoprawne 'deparse.cutoff', użyto 60"
 
-# src/main/options.c: 165
-# warning(_("invalid value for \"device.ask.default\", using FALSE"))
-#: src/main/options.c:165
+#: src/main/options.c:166
 msgid "invalid value for \"device.ask.default\", using FALSE"
 msgstr "niepoprawna wartość dla \"device.ask.default\", używanie FALSE"
 
-# src/main/options.c: 401
-# error(_("list argument has no valid names"))
-#: src/main/options.c:401
+#: src/main/options.c:416
 msgid "list argument has no valid names"
 msgstr "argument listy nie ma poprawnych nazw"
 
-# src/main/options.c: 429
-# error(_("invalid 'width' parameter, allowed %d...%d"),
-# 			  R_MIN_WIDTH_OPT, R_MAX_WIDTH_OPT)
-#: src/main/options.c:429
+#: src/main/options.c:445
 #, c-format
 msgid "invalid 'width' parameter, allowed %d...%d"
 msgstr "niepoprawny parametr 'width', dozwolone %d...%d"
 
-# src/main/options.c: 440
-# error(_("invalid 'digits' parameter, allowed %d...%d"),
-# 			  R_MIN_DIGITS_OPT, R_MAX_DIGITS_OPT)
-#: src/main/options.c:440
+#: src/main/options.c:456
 #, c-format
 msgid "invalid 'digits' parameter, allowed %d...%d"
 msgstr "niepoprawny parametr 'digits', dozwolone %d...%d"
 
-# src/main/options.c: 447
-# error(_("'expressions' parameter invalid, allowed %d...%d"),
-# 			  R_MIN_EXPRESSIONS_OPT, R_MAX_EXPRESSIONS_OPT)
-#: src/main/options.c:447
+#: src/main/options.c:463
 #, c-format
 msgid "'expressions' parameter invalid, allowed %d...%d"
 msgstr "niepoprawny parametr 'expressions', dozwolone %d...%d"
 
-# src/main/options.c: 454
-# error(_("invalid value for '%s'"), CHAR(namei))
-# src/main/options.c: 462
-# error(_("invalid value for '%s'"), CHAR(namei))
-# src/main/options.c: 468
-# error(_("invalid value for '%s'"), CHAR(namei))
-# src/main/options.c: 476
-# error(_("invalid value for '%s'"), CHAR(namei))
-# src/main/options.c: 483
-# error(_("invalid value for '%s'"), CHAR(namei))
-# src/main/options.c: 488
-# error(_("invalid value for '%s'"), CHAR(namei))
-# src/main/options.c: 495
-# error(_("invalid value for '%s'"), CHAR(namei))
-# src/main/options.c: 501
-# error(_("invalid value for '%s'"), CHAR(namei))
-# src/main/options.c: 507
-# error(_("invalid value for '%s'"), CHAR(namei))
-# src/main/options.c: 512
-# error(_("invalid value for '%s'"), CHAR(namei))
-# src/main/options.c: 517
-# error(_("invalid value for '%s'"), CHAR(namei))
-# src/main/options.c: 526
-# error(_("invalid value for '%s'"), CHAR(namei))
-# src/main/options.c: 532
-# error(_("invalid value for '%s'"), CHAR(namei))
-# src/main/options.c: 538
-# error(_("invalid value for '%s'"), CHAR(namei))
-# src/main/options.c: 549
-# error(_("invalid value for '%s'"), CHAR(namei))
-# src/main/options.c: 556
-# error(_("invalid value for '%s'"), CHAR(namei))
-# src/main/options.c: 562
-# error(_("invalid value for '%s'"), CHAR(namei))
-# src/main/options.c: 570
-# error(_("invalid value for '%s'"), CHAR(namei))
-# src/main/options.c: 577
-# error(_("invalid value for '%s'"), CHAR(namei))
-# src/main/options.c: 584
-# error(_("invalid value for '%s'"), CHAR(namei))
-# src/main/options.c: 591
-# error(_("invalid value for '%s'"), CHAR(namei))
-# src/main/options.c: 598
-# error(_("invalid value for '%s'"), CHAR(namei))
-# src/main/options.c: 606
-# error(_("invalid value for '%s'"), CHAR(namei))
-# src/main/options.c: 615
-# error(_("invalid value for '%s'"), CHAR(namei))
-# src/main/options.c: 618
-# error(_("invalid value for '%s'"), CHAR(namei))
-# src/main/options.c: 624
-# error(_("invalid value for '%s'"), CHAR(namei))
-#: src/main/options.c:454 src/main/options.c:462 src/main/options.c:468
-#: src/main/options.c:476 src/main/options.c:483 src/main/options.c:488
-#: src/main/options.c:495 src/main/options.c:501 src/main/options.c:507
-#: src/main/options.c:512 src/main/options.c:517 src/main/options.c:526
-#: src/main/options.c:532 src/main/options.c:538 src/main/options.c:549
-#: src/main/options.c:556 src/main/options.c:562 src/main/options.c:570
-#: src/main/options.c:577 src/main/options.c:584 src/main/options.c:591
-#: src/main/options.c:598 src/main/options.c:606 src/main/options.c:615
-#: src/main/options.c:618 src/main/options.c:624
+#: src/main/options.c:470 src/main/options.c:478 src/main/options.c:484
+#: src/main/options.c:492 src/main/options.c:499 src/main/options.c:504
+#: src/main/options.c:511 src/main/options.c:517 src/main/options.c:523
+#: src/main/options.c:528 src/main/options.c:533 src/main/options.c:542
+#: src/main/options.c:548 src/main/options.c:554 src/main/options.c:564
+#: src/main/options.c:578 src/main/options.c:584 src/main/options.c:592
+#: src/main/options.c:599 src/main/options.c:606 src/main/options.c:613
+#: src/main/options.c:620 src/main/options.c:628 src/main/options.c:637
+#: src/main/options.c:640 src/main/options.c:646
 #, c-format
 msgid "invalid value for '%s'"
 msgstr "niepoprawna wartość w '%s'"
 
-# src/main/options.c: 611
-# error(_("\"par.ask.default\" has been replaced by \"device.ask.default\""))
-# src/main/options.c: 640
-# error(_("\"par.ask.default\" has been replaced by \"device.ask.default\""))
-#: src/main/options.c:611 src/main/options.c:640
+#: src/main/options.c:569
+msgid "'OutDec' must be a string of one character"
+msgstr "argument 'OutDec' musi być jednym znakiem"
+
+#: src/main/options.c:633 src/main/options.c:662
 msgid "\"par.ask.default\" has been replaced by \"device.ask.default\""
 msgstr "\"par.ask.default\" został zastąpiony przez \"device.ask.default\""
 
-# src/main/paste.c: 80
-# error(_("invalid separator"))
-# src/main/paste.c: 300
-# error(_("invalid separator"))
 #: src/main/paste.c:80 src/main/paste.c:300
 msgid "invalid separator"
 msgstr "niepoprawny separator"
 
-# src/main/paste.c: 118
-# error(_("non-string argument to internal 'paste'"))
 #: src/main/paste.c:118
 msgid "non-string argument to internal 'paste'"
 msgstr "argument niełańcuchowy przekazany do wewnętrznej funkcji 'paste()'"
 
-# src/main/paste.c: 174
-# error(_("result would exceed 2^31-1 bytes"))
-# src/main/paste.c: 244
-# error(_("result would exceed 2^31-1 bytes"))
 #: src/main/paste.c:174 src/main/paste.c:244
 msgid "result would exceed 2^31-1 bytes"
 msgstr "wynik przekroczyłby 2^31-1 bajtów"
 
-# src/main/paste.c: 321
-# error(_("non-string argument to Internal paste"))
 #: src/main/paste.c:321
 msgid "non-string argument to Internal paste"
 msgstr "argument niełańcuchowy przekazany do wewnętrznej funkcji 'paste'"
 
-# src/main/paste.c: 390
-# error(_("first argument must be atomic"))
-#: src/main/paste.c:390
+#: src/main/paste.c:387
 msgid "first argument must be atomic"
 msgstr "pierwszy argument musi być atomowy"
 
-# src/main/paste.c: 560
-# error(_("Impossible mode ( x )"))
-#: src/main/paste.c:560
+#: src/main/paste.c:448
+msgid "'decimal.mark' must be a string of one character"
+msgstr "argument 'decimal.mark' musi być jednym znakiem"
+
+#: src/main/paste.c:579
 msgid "Impossible mode ( x )"
 msgstr "Niemożliwy tryb ( x )"
 
-# src/main/paste.c: 645
-# error(_("atomic vector arguments only"))
-#: src/main/paste.c:645
+#: src/main/paste.c:663
 msgid "atomic vector arguments only"
 msgstr "tylko argumenty o typie atomowych wektorów"
 
-# src/main/platform.c: 304
-# error(_("invalid filename specification"))
-# src/main/platform.c: 322
-# error(_("invalid filename specification"))
 #: src/main/platform.c:304 src/main/platform.c:322
 msgid "invalid filename specification"
 msgstr "niepoprawne określenie nazwy pliku"
 
-# src/library/tools/src/install.c: 163
-# warning(_("write error during file append"))
-# src/main/platform.c: 375
-# warning(_("write error during file append"))
-# src/main/platform.c: 419
-# warning(_("write error during file append"))
-#: src/main/platform.c:375 src/main/platform.c:419
+#: src/main/platform.c:375 src/main/platform.c:420
 msgid "write error during file append"
 msgstr "błąd zapisu podczas dołączania pliku"
 
-# src/main/platform.c: 394
-# error(_("nothing to append to"))
-#: src/main/platform.c:394
+#: src/main/platform.c:395
 msgid "nothing to append to"
 msgstr "nie ma do czego dołączyć"
 
-# src/main/platform.c: 448
-# error(_("invalid filename argument"))
-# src/main/platform.c: 795
-# error(_("invalid filename argument"))
-#: src/main/platform.c:448 src/main/platform.c:795
+#: src/main/platform.c:449 src/main/platform.c:797 src/main/platform.c:979
 msgid "invalid filename argument"
 msgstr "niepoprawny argument nazwy pliku"
 
-# src/main/platform.c: 460
-# warning(_("cannot create file '%s', reason '%s'"),
-# 		    translateChar(STRING_ELT(fn, i)), strerror(errno))
-#: src/main/platform.c:460
+#: src/main/platform.c:461
 #, c-format
 msgid "cannot create file '%s', reason '%s'"
 msgstr "nie można utworzyć pliku '%s', powód: '%s'"
 
-# src/main/platform.c: 475
-# error(_("invalid first filename"))
-# src/main/platform.c: 545
-# error(_("invalid first filename"))
-# src/main/platform.c: 627
-# error(_("invalid first filename"))
-#: src/main/platform.c:475 src/main/platform.c:545 src/main/platform.c:627
+#: src/main/platform.c:476 src/main/platform.c:546 src/main/platform.c:629
 msgid "invalid first filename"
 msgstr "błędna nazwa pierwszego pliku"
 
-# src/main/platform.c: 487
-# warning(_("cannot remove file '%s', reason '%s'"),
-# 			translateChar(STRING_ELT(f, i)), strerror(errno))
-#: src/main/platform.c:487
+#: src/main/platform.c:488
 #, c-format
 msgid "cannot remove file '%s', reason '%s'"
 msgstr "nie można usunąć pliku '%s', powód '%s'"
 
-# src/main/platform.c: 547
-# error(_("invalid second filename"))
-# src/main/platform.c: 629
-# error(_("invalid second filename"))
-#: src/main/platform.c:547 src/main/platform.c:629
+#: src/main/platform.c:548 src/main/platform.c:631
 msgid "invalid second filename"
 msgstr "niepoprawna nazwa drugiego pliku"
 
-# src/main/platform.c: 549
-# error(_("nothing to link"))
-# src/main/platform.c: 631
-# error(_("nothing to link"))
-#: src/main/platform.c:549 src/main/platform.c:631
+#: src/main/platform.c:551 src/main/platform.c:634
 msgid "nothing to link"
 msgstr "nie ma do czego łączyć"
 
-# src/main/platform.c: 559
-# error(_("symbolic links are not supported on this version of Windows"))
-#: src/main/platform.c:559
+#: src/main/platform.c:561
 msgid "symbolic links are not supported on this version of Windows"
 msgstr "symboliczne połączenia nie są wspierane w tej wersji systemu Windows"
 
-# src/main/platform.c: 581
-# warning(_("cannot symlink '%ls' to '%ls', reason '%s'"),
-# 			from, to, formatError(GetLastError()))
-#: src/main/platform.c:581
+#: src/main/platform.c:583
 #, c-format
 msgid "cannot symlink '%ls' to '%ls', reason '%s'"
 msgstr "nie można utworzyć symbolicznego połączenia '%ls' z '%ls', powód '%s'"
 
-# src/main/platform.c: 601
-# warning(_("cannot symlink '%s' to '%s', reason '%s'"),
-# 			from, to, strerror(errno))
-#: src/main/platform.c:601
+#: src/main/platform.c:603
 #, c-format
 msgid "cannot symlink '%s' to '%s', reason '%s'"
 msgstr "nie można utworzyć symbolicznego połączenia '%s' z '%s', powód '%s'"
 
-# src/main/platform.c: 609
-# warning(_("symbolic links are not supported on this platform"))
-#: src/main/platform.c:609
+#: src/main/platform.c:611
 msgid "symbolic links are not supported on this platform"
 msgstr "symboliczne połączenia nie są wspierane na tej platformie"
 
-# src/main/platform.c: 649
-# warning(_("cannot link '%ls' to '%ls', reason '%s'"),
-# 			from, to, formatError(GetLastError()))
-#: src/main/platform.c:649
+#: src/main/platform.c:652
 #, c-format
 msgid "cannot link '%ls' to '%ls', reason '%s'"
 msgstr "nie można połączyć '%ls' z '%ls', powód '%s'"
 
-# src/main/platform.c: 669
-# warning(_("cannot link '%s' to '%s', reason '%s'"),
-# 			from, to, strerror(errno))
-#: src/main/platform.c:669
+#: src/main/platform.c:672
 #, c-format
 msgid "cannot link '%s' to '%s', reason '%s'"
 msgstr "nie można połączyć '%s' z '%s', powód '%s'"
 
-# src/main/platform.c: 678
-# warning(_("(hard) links are not supported on this platform"))
-#: src/main/platform.c:678
+#: src/main/platform.c:681
 msgid "(hard) links are not supported on this platform"
 msgstr "(twarde) połączenia nie są wspierane na tej platformie"
 
-# src/main/platform.c: 709
-# error(_("'from' and 'to' are of different lengths"))
-#: src/main/platform.c:709
+#: src/main/platform.c:713
 msgid "'from' and 'to' are of different lengths"
 msgstr "argumenty 'from' oraz 'to' są różnej długości"
 
-# src/main/platform.c: 720
-# error(_("expanded 'from' name too long"))
-# src/main/platform.c: 730
-# error(_("expanded 'from' name too long"))
-#: src/main/platform.c:720 src/main/platform.c:730
+#: src/main/platform.c:724 src/main/platform.c:734
 msgid "expanded 'from' name too long"
 msgstr "rozszerzona nazwa 'from' jest zbyt długa"
 
-# src/main/platform.c: 724
-# error(_("expanded 'to' name too long"))
-# src/main/platform.c: 734
-# error(_("expanded 'to' name too long"))
-#: src/main/platform.c:724 src/main/platform.c:734
+#: src/main/platform.c:728 src/main/platform.c:738
 msgid "expanded 'to' name too long"
 msgstr "rozszerzona nazwa 'to' jest zbyt długa"
 
-# src/main/platform.c: 738
-# warning(_("cannot rename file '%s' to '%s', reason '%s'"),
-# 		    from, to, strerror(errno))
-#: src/main/platform.c:738
+#: src/main/platform.c:742
 #, c-format
 msgid "cannot rename file '%s' to '%s', reason '%s'"
 msgstr "nie można zmienić nazwy pliku z '%s' na '%s', powód '%s'"
 
-# src/main/platform.c: 1094
-# error(_("invalid 'pattern' regular expression"))
-#: src/main/platform.c:1094
+#: src/main/platform.c:1168
 msgid "invalid 'pattern' regular expression"
 msgstr "niepoprawne wyrażenie regularne 'pattern'"
 
-# src/main/platform.c: 1211
-# error(_("unable to determine R home location"))
-#: src/main/platform.c:1211
+#: src/main/platform.c:1285
 msgid "unable to determine R home location"
 msgstr "nie można określić bazowego położenia R"
 
-# src/main/platform.c: 1263
-# error(_("file name too long"))
-#: src/main/platform.c:1263
+#: src/main/platform.c:1338
 msgid "file name too long"
 msgstr "nazwa pliku jest zbyt długa"
 
-# src/main/platform.c: 1511
-# error(_("internal out-of-memory condition"))
-# src/main/platform.c: 1558
-# error(_("internal out-of-memory condition"))
-# src/main/sysutils.c: 1850
-# error(_("internal out-of-memory condition"))
-# src/main/sysutils.c: 1864
-# error(_("internal out-of-memory condition"))
-#: src/main/platform.c:1511 src/main/platform.c:1558 src/main/sysutils.c:1850
-#: src/main/sysutils.c:1864
+#: src/main/platform.c:1586 src/main/platform.c:1633 src/main/sysutils.c:1806
+#: src/main/sysutils.c:1820
 msgid "internal out-of-memory condition"
 msgstr "wewnętrzny warunek braku pamięci"
 
-# src/main/platform.c: 1554
-# warning(_("read error on '%s'"), names)
-# src/main/sysutils.c: 1860
-# warning(_("read error on '%s'"), translateChar(el))
-#: src/main/platform.c:1554 src/main/sysutils.c:1860
+#: src/main/platform.c:1629 src/main/sysutils.c:1816
 #, c-format
 msgid "read error on '%s'"
 msgstr "błąd odczytu w '%s'"
 
-# src/main/platform.c: 1722
-# warning(_("setting 'LC_NUMERIC' may cause R to function strangely"))
-#: src/main/platform.c:1722
+#: src/main/platform.c:1728
 msgid "setting 'LC_NUMERIC' may cause R to function strangely"
 msgstr "ustawienie 'LC_NUMERIC' może spowodować, że R będzie dziwnie działał"
 
-# src/main/platform.c: 1736
-# warning(_("LC_MESSAGES exists on Windows but is not operational"))
-#: src/main/platform.c:1736
+#: src/main/platform.c:1742
 msgid "LC_MESSAGES exists on Windows but is not operational"
 msgstr "'LC_MESSAGES' istnieje w systemie Windows, ale nie jest operacyjne"
 
-# src/main/platform.c: 1763
-# warning(_("OS reports request to set locale to \"%s\" cannot be honored"),
-# 		CHAR(STRING_ELT(locale, 0)))
-#: src/main/platform.c:1763
+#: src/main/platform.c:1769
 #, c-format
 msgid "OS reports request to set locale to \"%s\" cannot be honored"
 msgstr ""
 "Żądania raportów OS aby ustawić lokalizację na \"%s\" nie mogą zostać "
 "wykonane"
 
-# src/library/utils/src/utils.c: 83
-# error(_("'hostname' must be a character vector of length 1"))
-# src/main/platform.c: 2065
-# error(_("'hostname' must be a character vector of length 1"))
-#: src/main/platform.c:2065
-msgid "'hostname' must be a character vector of length 1"
-msgstr "argument 'hostname' musi być wektorem tekstowym o długości 1"
-
-# src/library/utils/src/utils.c: 89
-# warning(_("nsl() was unable to resolve host '%s'"), name)
-# src/main/platform.c: 2071
-# warning(_("nsl() was unable to resolve host '%s'"), name)
-#: src/main/platform.c:2071
-#, c-format
-msgid "nsl() was unable to resolve host '%s'"
-msgstr "'nsl()' nie był w stanie nawiązać połączenia z hostem '%s'"
-
-# src/main/platform.c: 2078
-# warning(_("unknown format returned by C function 'gethostbyname'"))
-#: src/main/platform.c:2078
-msgid "unknown format returned by C function 'gethostbyname'"
-msgstr "nieznany format zwrócony przez funkcję C 'gethostbyname()'"
-
-# src/library/utils/src/utils.c: 105
-# warning(_("nsl() is not supported on this platform"))
-# src/main/platform.c: 2087
-# warning(_("nsl() is not supported on this platform"))
-#: src/main/platform.c:2087
-msgid "nsl() is not supported on this platform"
-msgstr "'nsl()' nie jest obsługiwany na tej platformie"
-
-# src/main/platform.c: 2158
-# warning(_("'%s' already exists"), dir)
-#: src/main/platform.c:2158
+#: src/main/platform.c:2131
 #, c-format
 msgid "'%s' already exists"
 msgstr "katalog '%s' już istnieje"
 
-# src/main/platform.c: 2161
-# warning(_("cannot create dir '%s', reason '%s'"), dir,
-# 		strerror(serrno))
-#: src/main/platform.c:2161
+#: src/main/platform.c:2134
 #, c-format
 msgid "cannot create dir '%s', reason '%s'"
 msgstr "nie można utworzyć katalogu '%s', powód '%s'"
 
-# src/main/platform.c: 2207
-# warning(_("'%ls' already exists"), dir)
-#: src/main/platform.c:2207
+#: src/main/platform.c:2181
 #, c-format
 msgid "'%ls' already exists"
 msgstr "katalog '%ls' już istnieje"
 
-# src/main/platform.c: 2211
-# warning(_("cannot create dir '%ls', reason '%s'"), dir,
-# 		strerror(serrno))
-#: src/main/platform.c:2211
+#: src/main/platform.c:2183 src/main/platform.c:2189
 #, c-format
 msgid "cannot create dir '%ls', reason '%s'"
 msgstr "nie można utworzyć katalogu '%ls', powód '%s'"
 
-# src/main/platform.c: 2245
-# warning(_("too deep nesting"))
-# src/main/platform.c: 2449
-# warning(_("too deep nesting"))
-#: src/main/platform.c:2245 src/main/platform.c:2449
+#: src/main/platform.c:2223 src/main/platform.c:2435
 msgid "too deep nesting"
 msgstr "zbyt głębokie zagnieżdżenie"
 
-# src/main/platform.c: 2253
-# warning(_("over-long path"))
-# src/main/platform.c: 2266
-# warning(_("over-long path"))
-# src/main/platform.c: 2284
-# warning(_("over-long path"))
-#: src/main/platform.c:2253 src/main/platform.c:2266 src/main/platform.c:2284
+#: src/main/platform.c:2231 src/main/platform.c:2244 src/main/platform.c:2262
 msgid "over-long path"
 msgstr "zbyt długa ścieżka"
 
-# src/main/platform.c: 2273
-# warning(_("problem creating directory %ls: %s"),
-# 		    dest, strerror(errno))
-#: src/main/platform.c:2273
+#: src/main/platform.c:2251
 #, c-format
 msgid "problem creating directory %ls: %s"
 msgstr "problem z utworzeniem katalogu %ls: %s "
 
-# src/main/platform.c: 2293
-# warning(_("problem reading dir %ls: %s"), this, strerror(errno))
-#: src/main/platform.c:2293
+#: src/main/platform.c:2271
 #, c-format
 msgid "problem reading dir %ls: %s"
 msgstr "problem z czytaniem katalogu %ls: %s"
 
-# src/main/platform.c: 2304
-# warning(_("over-long path length"))
-# src/main/platform.c: 2465
-# warning(_("over-long path length"))
-# src/main/platform.c: 2478
-# warning(_("over-long path length"))
-# src/main/platform.c: 2498
-# warning(_("over-long path length"))
-# src/main/platform.c: 2520
-# warning(_("over-long path length"))
-#: src/main/platform.c:2304 src/main/platform.c:2465 src/main/platform.c:2478
-#: src/main/platform.c:2498 src/main/platform.c:2520
+#: src/main/platform.c:2282 src/main/platform.c:2451 src/main/platform.c:2464
+#: src/main/platform.c:2484 src/main/platform.c:2506
 msgid "over-long path length"
 msgstr "zbyt długa ścieżka"
 
-# src/main/platform.c: 2312
-# warning(_("problem copying %ls to %ls: %s"),
-# 			this, dest, strerror(errno))
-#: src/main/platform.c:2312
+#: src/main/platform.c:2290
 #, c-format
 msgid "problem copying %ls to %ls: %s"
 msgstr "problem z kopiowaniem %ls do %ls: %s"
 
-# src/main/platform.c: 2487
-# warning(_("problem creating directory %s: %s"),
-# 		    this, strerror(errno))
-#: src/main/platform.c:2487
+#: src/main/platform.c:2473
 #, c-format
 msgid "problem creating directory %s: %s"
 msgstr "problem z utworzeniem katalogu %s: %s"
 
-# src/main/platform.c: 2507
-# warning(_("problem reading directory %s: %s"),
-# 		    this, strerror(errno))
-#: src/main/platform.c:2507
+#: src/main/platform.c:2493
 #, c-format
 msgid "problem reading directory %s: %s"
 msgstr "problem z czytaniem katalogu %s: %s"
 
-# src/main/platform.c: 2529
-# warning(_("problem copying %s to %s: %s"),
-# 			this, dest, strerror(errno))
-#: src/main/platform.c:2529
+#: src/main/platform.c:2515
 #, c-format
 msgid "problem copying %s to %s: %s"
 msgstr "problem z kopiowaniem %s do %s: %s"
 
-# src/main/platform.c: 2662
-# error(_("'mode' must be of length at least one"))
-#: src/main/platform.c:2662
+#: src/main/platform.c:2653
 msgid "'mode' must be of length at least one"
 msgstr "argument 'mode' musi mieć długość co najmniej 1"
 
-# src/main/platform.c: 2703
-# warning("insufficient OS support on this platform")
-# src/main/platform.c: 2729
-# warning(_("insufficient OS support on this platform"))
-#: src/main/platform.c:2729
+#: src/main/platform.c:2720
 msgid "insufficient OS support on this platform"
 msgstr "niewystarczające wsparcie OS na tej platformie"
 
-# src/library/graphics/src/plot3d.c: 1529
-# warning(_("contour(): circular/long seglist -- set %s > %d?"), 
-# 		        "options(\"max.contour.segments\")", max_contour_segments)
-# src/main/plot3d.c: 118
-# warning(_("contour(): circular/long seglist -- set %s > %d?"), 
-# 		            "options(\"max.contour.segments\")", max_contour_segments)
 #: src/main/plot3d.c:118
 #, c-format
 msgid "contour(): circular/long seglist -- set %s > %d?"
 msgstr "contour(): kołowa/ długa lista segmentów -- ustawić '%s' > %d?"
 
-# src/library/graphics/src/plot3d.c: 1965
-# warning(_("all z values are equal"))
-# src/main/plot3d.c: 196
-# warning(_("all z values are equal"))
 #: src/main/plot3d.c:196
 msgid "all z values are equal"
 msgstr "wszystkie wartości 'z' są równe"
 
-# src/library/graphics/src/plot3d.c: 1967
-# warning(_("all z values are NA"))
-# src/main/plot3d.c: 198
-# warning(_("all z values are NA"))
 #: src/main/plot3d.c:198
 msgid "all z values are NA"
 msgstr "wszystkie wartości 'z' to wartości NA"
 
-# src/main/plotmath.c: 333
-# error(_("invalid math style encountered"))
 #: src/main/plotmath.c:333
 msgid "invalid math style encountered"
 msgstr "napotkano niepoprawny styl matematyczny"
 
-# src/main/plotmath.c: 1261
-# error(_("invalid mathematical annotation"))
-# src/main/plotmath.c: 1366
-# error(_("invalid mathematical annotation"))
-# src/main/plotmath.c: 2664
-# error(_("invalid mathematical annotation"))
-#: src/main/plotmath.c:1261 src/main/plotmath.c:1366 src/main/plotmath.c:2664
+#: src/main/plotmath.c:1260 src/main/plotmath.c:1365 src/main/plotmath.c:2654
 msgid "invalid mathematical annotation"
 msgstr "niepoprawna adnotacja matematyczna"
 
-# src/main/plotmath.c: 1670
-#  _("invalid accent")
-#: src/main/plotmath.c:1670
+#: src/main/plotmath.c:1669
 msgid "invalid accent"
 msgstr "niepoprawny akcent"
 
-# src/main/plotmath.c: 1964
-#  _("invalid group delimiter")
-#: src/main/plotmath.c:1964
+#: src/main/plotmath.c:1963
 msgid "invalid group delimiter"
 msgstr "niepoprawny separator grupy"
 
-# src/main/plotmath.c: 1991
-#  _("invalid group specification")
-# src/main/plotmath.c: 2137
-#  _("invalid group specification")
-#: src/main/plotmath.c:1991 src/main/plotmath.c:2137
+#: src/main/plotmath.c:1990 src/main/plotmath.c:2127
 msgid "invalid group specification"
 msgstr "niepoprawne określenie grupy"
 
-# src/main/plotmath.c: 2062
-# error(_("group is incomplete"))
-#: src/main/plotmath.c:2062
+#: src/main/plotmath.c:2052
 msgid "group is incomplete"
 msgstr "grupa jest niekompletna"
 
-# src/main/plotmath.c: 3190
-# error(_("Metric information not available for this family/device"))
-#: src/main/plotmath.c:3190
+#: src/main/plotmath.c:3180
 msgid "Metric information not available for this family/device"
 msgstr "Informacje metryczne nie są dostępne dla tej rodziny/urządzenia"
 
-# src/main/print.c: 148
-# error(_("invalid 'na.print' specification"))
-# src/main/print.c: 254
-# error(_("invalid 'na.print' specification"))
-#: src/main/print.c:148 src/main/print.c:254
+#: src/main/print.c:140 src/main/print.c:247
 msgid "invalid 'na.print' specification"
 msgstr "niepoprawne określenie 'na.print'"
 
-# src/main/print.c: 157
-# error(_("invalid row labels"))
-#: src/main/print.c:157
+#: src/main/print.c:149
 msgid "invalid row labels"
 msgstr "niepoprawne etykiety wierszy"
 
-# src/main/print.c: 159
-# error(_("invalid column labels"))
-#: src/main/print.c:159
+#: src/main/print.c:151
 msgid "invalid column labels"
 msgstr "niepoprawne etykiety kolumn"
 
-# src/main/print.c: 183
-#  _("non-function argument to .Internal(print.function(.))")
-#: src/main/print.c:183
+#: src/main/print.c:176
 msgid "non-function argument to .Internal(print.function(.))"
 msgstr "argument niefunkcyjny przekazany do '.Internal(print.function(.))'"
 
-# src/main/print.c: 264
-# error(_("'gap' must be non-negative integer"))
-#: src/main/print.c:264
+#: src/main/print.c:257
 msgid "'gap' must be non-negative integer"
 msgstr "'gap' musi być nieujemną liczbą całkowitą"
 
-# src/main/print.c: 289
-# error(_("invalid 'tryS4' internal argument"))
-#: src/main/print.c:289
+#: src/main/print.c:282
 msgid "invalid 'tryS4' internal argument"
 msgstr "niepoprawny wewnętrzny argument 'tryS4' "
 
-# src/main/print.c: 1028
-# warning(_("invalid character length in 'dblepr'"))
-#: src/main/print.c:1028
+#: src/main/print.c:851
+msgid "print buffer overflow"
+msgstr "przepełnienie bufora druku"
+
+#: src/main/print.c:1043
 msgid "invalid character length in 'dblepr'"
 msgstr "niepoprawna długość tekstu w 'dblepr'"
 
-# src/main/print.c: 1046
-# warning(_("invalid character length in 'intpr'"))
-#: src/main/print.c:1046
+#: src/main/print.c:1061
 msgid "invalid character length in 'intpr'"
 msgstr "niepoprawna długość tekstu w 'intpr'"
 
-# src/main/print.c: 1065
-# warning(_("invalid character length in 'realpr'"))
-#: src/main/print.c:1065
+#: src/main/print.c:1080
 msgid "invalid character length in 'realpr'"
 msgstr "niepoprawna długość tekstu w 'realpr'"
 
-# src/main/print.c: 1075
-# error(_("memory allocation error in 'realpr'"))
-#: src/main/print.c:1075
+#: src/main/print.c:1090
 msgid "memory allocation error in 'realpr'"
 msgstr "błąd przydziału pamięci w 'realpr'"
 
-# src/main/print.c: 1091
-# error(_("BLAS/LAPACK routine '%6s' gave error code %d"), buf, -(*info))
-#: src/main/print.c:1091
+#: src/main/print.c:1106
 #, c-format
 msgid "BLAS/LAPACK routine '%6s' gave error code %d"
 msgstr "procedura BLAS/LAPACK '%6s' zwróciła kod %d błędu"
 
-# src/main/printarray.c: 453
-# error(_("too few row labels"))
-#: src/main/printarray.c:453
+#: src/main/printarray.c:332
 msgid "too few row labels"
 msgstr "zbyt mało etykiet wierszy"
 
-# src/main/printarray.c: 455
-# error(_("too few column labels"))
-#: src/main/printarray.c:455
+#: src/main/printarray.c:334
 msgid "too few column labels"
 msgstr "zbyt mało etykiet kolumn"
 
-#: src/main/printarray.c:489
+#: src/main/printarray.c:368
 #, c-format
 msgid " [ reached getOption(\"max.print\") -- omitted %d row ]\n"
 msgid_plural " [ reached getOption(\"max.print\") -- omitted %d rows ]\n"
@@ -9672,133 +5034,55 @@ msgstr[0] " [ osiągnięto getOption(\"max.print\") -- pominięto %d wiersz]\n"
 msgstr[1] " [ osiągnięto getOption(\"max.print\") -- pominięto %d wiersze]\n"
 msgstr[2] " [ osiągnięto getOption(\"max.print\") -- pominięto %d wierszy]\n"
 
-# src/main/printutils.c: 613
-# warning(_("it is not known that wchar_t is Unicode on this platform"))
-#: src/main/printutils.c:613
+#: src/main/printutils.c:710
 msgid "it is not known that wchar_t is Unicode on this platform"
 msgstr ""
 "nie jest jest wiadome, że wchar_t jest symbolem Unicode na tej platformie"
 
-# src/main/qsort.c: 55
-# error(_("argument is not a numeric vector"))
 #: src/main/qsort.c:55
 msgid "argument is not a numeric vector"
 msgstr "argument nie jest wektorem liczbowym"
 
-# src/library/stats/src/random.c: 66
-# error(_("invalid arguments"))
-# src/library/stats/src/random.c: 70
-# error(_("invalid arguments"))
-# src/library/stats/src/random.c: 75
-# error(_("invalid arguments"))
-# src/library/stats/src/random.c: 80
-# error(_("invalid arguments"))
-# src/library/stats/src/random.c: 161
-# error(_("invalid arguments"))
-# src/library/stats/src/random.c: 167
-# error(_("invalid arguments"))
-# src/library/stats/src/random.c: 172
-# error(_("invalid arguments"))
-# src/library/stats/src/random.c: 177
-# error(_("invalid arguments"))
-# src/library/stats/src/random.c: 240
-# error(_("invalid arguments"))
-# src/library/stats/src/random.c: 245
-# error(_("invalid arguments"))
-# src/library/stats/src/random.c: 250
-# error(_("invalid arguments"))
-# src/library/stats/src/random.c: 264
-# error(_("invalid arguments"))
-# src/library/stats/src/random.c: 355
-# error(_("invalid arguments"))
-# src/main/random.c: 37
-# error(_("invalid arguments"))
-#: src/main/random.c:37
+#: src/main/random.c:39
 msgid "invalid arguments"
 msgstr "niepoprawne argumenty"
 
-# src/library/stats/src/random.c: 95
-# warning(_("NAs produced"))
-# src/library/stats/src/random.c: 121
-# warning(_("NAs produced"))
-# src/library/stats/src/random.c: 194
-# warning(_("NAs produced"))
-# src/library/stats/src/random.c: 222
-# warning(_("NAs produced"))
-# src/library/stats/src/random.c: 270
-# warning(_("NAs produced"))
-# src/library/stats/src/random.c: 289
-# warning(_("NAs produced"))
-# src/main/random.c: 93
-# warning(_("NAs produced"))
-# src/main/random.c: 110
-# warning(_("NAs produced"))
-# src/main/random.c: 175
-# warning(_("NAs produced"))
-# src/main/random.c: 201
-# warning(_("NAs produced"))
-# src/main/random.c: 274
-# warning(_("NAs produced"))
-# src/main/random.c: 288
-# warning(_("NAs produced"))
-#: src/main/random.c:93 src/main/random.c:110 src/main/random.c:175
-#: src/main/random.c:201 src/main/random.c:274 src/main/random.c:288
+#: src/main/random.c:95 src/main/random.c:112 src/main/random.c:178
+#: src/main/random.c:204 src/main/random.c:277 src/main/random.c:291
 msgid "NAs produced"
 msgstr "wyprodukowano wartości Na"
 
-# src/main/random.c: 445
-# error(_("NA in probability vector"))
-#: src/main/random.c:445
+#: src/main/random.c:438
 msgid "NA in probability vector"
 msgstr "wartość NA w wektorze prawdopodobieństwa"
 
-# src/main/random.c: 447
-# error(_("non-positive probability"))
-#: src/main/random.c:447
-msgid "non-positive probability"
-msgstr "niedodatnie prawdopodobieństwo"
+#: src/main/random.c:440
+msgid "negative probability"
+msgstr "ujemne prawdopodobieństwo"
 
-# src/main/random.c: 454
-# error(_("too few positive probabilities"))
-#: src/main/random.c:454
+#: src/main/random.c:447
 msgid "too few positive probabilities"
 msgstr "zbyt mało dodatnich prawdopodobieństw"
 
-# src/main/random.c: 491
-# error(_("cannot take a sample larger than the population when 'replace = FALSE'"))
-# src/main/random.c: 519
-# error(_("cannot take a sample larger than the population when 'replace = FALSE'"))
-#: src/main/random.c:491 src/main/random.c:519
+#: src/main/random.c:483 src/main/random.c:511
 msgid "cannot take a sample larger than the population when 'replace = FALSE'"
 msgstr ""
 "nie można wziąć próby większej niż rozmiar populacji gdy 'replace = FALSE'"
 
-# src/main/random.c: 498
-# error(_("incorrect number of probabilities"))
-#: src/main/random.c:498
+#: src/main/random.c:490
 msgid "incorrect number of probabilities"
 msgstr "niepoprawna liczba prawdopodobieństw"
 
-# src/main/random.c: 537
-# error(_("n >= 2^31, replace = FALSE is only supported on 64-bit platforms"))
-#: src/main/random.c:537
+#: src/main/random.c:529
 msgid "n >= 2^31, replace = FALSE is only supported on 64-bit platforms"
 msgstr ""
 "n >= 2^31, replace = FALSE jest wspierane jedynie na platformach 64-bitowych"
 
-# src/main/raw.c: 37
-# error(_("argument must be a character vector of length 1"))
-# src/main/raw.c: 273
-# error(_("argument must be a character vector of length 1"))
-#: src/main/raw.c:37 src/main/raw.c:273
+#: src/main/raw.c:37 src/main/raw.c:277
 msgid "argument must be a character vector of length 1"
 msgstr "argument musi być wektorem tekstowym o długości 1"
 
-# src/main/raw.c: 39
-# warning(_("argument should be a character vector of length 1\nall but the first element will be ignored"))
-# src/main/raw.c: 275
-# warning(_("argument should be a character vector of length 1\nall but the first element will be ignored"))
-#: src/main/raw.c:39 src/main/raw.c:275
+#: src/main/raw.c:39 src/main/raw.c:279
 msgid ""
 "argument should be a character vector of length 1\n"
 "all but the first element will be ignored"
@@ -9806,562 +5090,300 @@ msgstr ""
 "argument powinien być wektorem tekstowym o długości 1.\n"
 "Wszystkie elementy poza pierwszym zostaną zignorowane"
 
-# src/main/raw.c: 53
-# error(_("argument 'x' must be a raw vector"))
-# src/main/raw.c: 89
-# error(_("argument 'x' must be a raw vector"))
-# src/main/raw.c: 110
-# error(_("argument 'x' must be a raw vector"))
-#: src/main/raw.c:53 src/main/raw.c:89 src/main/raw.c:110
+#: src/main/raw.c:53 src/main/raw.c:90 src/main/raw.c:113
 msgid "argument 'x' must be a raw vector"
 msgstr "argument 'x' musi być pustym wektorem"
 
-# src/main/raw.c: 56
-# error(_("argument 'multiple' must be TRUE or FALSE"))
-# src/main/raw.c: 330
-# error(_("argument 'multiple' must be TRUE or FALSE"))
-#: src/main/raw.c:56 src/main/raw.c:330
+#: src/main/raw.c:56 src/main/raw.c:336
 msgid "argument 'multiple' must be TRUE or FALSE"
 msgstr "argument 'multiple' musi posiadać wartość TRUE lub FALSE"
 
-# src/main/raw.c: 91
-# error(_("argument 'shift' must be a small integer"))
-#: src/main/raw.c:91
+#: src/main/raw.c:92
 msgid "argument 'shift' must be a small integer"
 msgstr "argument 'shift' musi być małą liczbą całkowitą"
 
-# src/main/raw.c: 129
-# error(_("argument 'x' must be an integer vector"))
-# src/main/raw.c: 327
-# error(_("argument 'x' must be an integer vector"))
-#: src/main/raw.c:129 src/main/raw.c:327
+#: src/main/raw.c:133 src/main/raw.c:333
 msgid "argument 'x' must be an integer vector"
 msgstr "argument 'x' musi być wektorem liczb całkowitych"
 
-# src/main/raw.c: 148
-# error(_("argument 'x' must be raw, integer or logical"))
-#: src/main/raw.c:148
+#: src/main/raw.c:153
 msgid "argument 'x' must be raw, integer or logical"
 msgstr "argument 'x' musi być typem pustym, logicznym lub liczbą całkowitą"
 
-# src/main/raw.c: 150
-# error(_("argument 'type' must be a character string"))
-#: src/main/raw.c:150
-msgid "argument 'type' must be a character string"
-msgstr "argument 'type' musi być łańcuchem tekstowym"
-
-# src/main/raw.c: 154
-# error(_("argument 'x' must be a multiple of %d long"), fac)
-#: src/main/raw.c:154
+#: src/main/raw.c:159
 #, c-format
 msgid "argument 'x' must be a multiple of %d long"
 msgstr "argument 'x' musi być wielokrotnością długości %d"
 
-# src/main/raw.c: 167
-# error(_("argument 'x' must not contain NAs"))
-# src/main/raw.c: 181
-# error(_("argument 'x' must not contain NAs"))
-#: src/main/raw.c:167 src/main/raw.c:181
+#: src/main/raw.c:172 src/main/raw.c:186
 msgid "argument 'x' must not contain NAs"
 msgstr "argument 'x' nie może zawierać wartości NA"
 
-# src/main/raw.c: 285
-# error(_("invalid UTF-8 string"))
-#: src/main/raw.c:285
+#: src/main/raw.c:291
 msgid "invalid UTF-8 string"
 msgstr "niepoprawny łańcuch UTF-8"
 
-# src/main/relop.c: 202
-#  _("comparison (%d) is possible only for atomic and list types")
-#: src/main/relop.c:202
+#: src/main/relop.c:205
 #, c-format
 msgid "comparison (%d) is possible only for atomic and list types"
 msgstr "porównanie (%d) jest możliwe jedynie dla typów atomowych oraz list"
 
-# src/main/relop.c: 207
-#  _("comparison is not allowed for expressions")
-#: src/main/relop.c:207
+#: src/main/relop.c:210
 msgid "comparison is not allowed for expressions"
 msgstr "porównanie nie jest dozwolone dla wyrażeń"
 
-# src/main/relop.c: 296
-#  _("comparison of these types is not implemented")
-#: src/main/relop.c:296
+#: src/main/relop.c:299
 msgid "comparison of these types is not implemented"
 msgstr "porównanie tych typów nie jest zaimplementowane"
 
-# src/main/relop.c: 509
-#  _("invalid comparison with complex values")
-#: src/main/relop.c:509
+#: src/main/relop.c:503
 msgid "invalid comparison with complex values"
 msgstr "niepoprawne porównanie wartości zespolonych"
 
-# src/main/relop.c: 767
-# error(_("'a' and 'b' must have the same type"))
-#: src/main/relop.c:767
+#: src/main/relop.c:761
 msgid "'a' and 'b' must have the same type"
 msgstr "'A' oraz 'B' muszą mieć ten sam typ"
 
-# src/main/saveload.c: 200
-# error(_("read error"))
-# src/main/saveload.c: 205
-# error(_("read error"))
-# src/main/saveload.c: 214
-# error(_("read error"))
-# src/main/saveload.c: 223
-# error(_("read error"))
-# src/main/saveload.c: 232
-# error(_("read error"))
-# src/main/saveload.c: 241
-# error(_("read error"))
-# src/main/saveload.c: 245
-# error(_("read error"))
-# src/main/saveload.c: 254
-# error(_("read error"))
-# src/main/saveload.c: 1381
-# error(_("read error"))
-# src/main/saveload.c: 1386
-# error(_("read error"))
-# src/main/saveload.c: 1430
-# error(_("read error"))
-# src/main/saveload.c: 1498
-# error(_("read error"))
-# src/main/saveload.c: 1507
-# error(_("read error"))
-# src/main/serialize.c: 331
-# error(_("read error"))
-# src/main/serialize.c: 338
-# error(_("read error"))
-# src/main/serialize.c: 2388
-# error(_("read error"))
-# src/main/serialize.c: 2396
-# error(_("read error"))
-#: src/main/saveload.c:200 src/main/saveload.c:205 src/main/saveload.c:214
-#: src/main/saveload.c:223 src/main/saveload.c:232 src/main/saveload.c:241
-#: src/main/saveload.c:245 src/main/saveload.c:254 src/main/saveload.c:1381
-#: src/main/saveload.c:1386 src/main/saveload.c:1430 src/main/saveload.c:1498
-#: src/main/saveload.c:1507 src/main/serialize.c:331 src/main/serialize.c:338
-#: src/main/serialize.c:2388 src/main/serialize.c:2396
+#: src/main/saveload.c:202 src/main/saveload.c:207 src/main/saveload.c:216
+#: src/main/saveload.c:225 src/main/saveload.c:234 src/main/saveload.c:243
+#: src/main/saveload.c:247 src/main/saveload.c:256 src/main/saveload.c:1383
+#: src/main/saveload.c:1388 src/main/saveload.c:1432 src/main/saveload.c:1500
+#: src/main/saveload.c:1509 src/main/serialize.c:354 src/main/serialize.c:361
+#: src/main/serialize.c:374 src/main/serialize.c:378 src/main/serialize.c:405
+#: src/main/serialize.c:421 src/main/serialize.c:2429 src/main/serialize.c:2437
 msgid "read error"
 msgstr "błąd odczytu"
 
-# src/main/saveload.c: 332
-# error(_("a I read error occurred"))
-#: src/main/saveload.c:332
+#: src/main/saveload.c:334
 msgid "a I read error occurred"
 msgstr "nastąpił błąd odczytu 'I'"
 
-# src/main/saveload.c: 342
-# error(_("a R read error occurred"))
-#: src/main/saveload.c:342
+#: src/main/saveload.c:344
 msgid "a R read error occurred"
 msgstr "nastąpił błąd odczytu 'R'"
 
-# src/main/saveload.c: 352
-# error(_("a C read error occurred"))
-#: src/main/saveload.c:352
+#: src/main/saveload.c:354
 msgid "a C read error occurred"
 msgstr "nastąpił błąd odczytu 'C'"
 
-# src/main/saveload.c: 362
-# error(_("a S read error occurred"))
-#: src/main/saveload.c:362
+#: src/main/saveload.c:364
 msgid "a S read error occurred"
 msgstr "nastąpił błąd odczytu 'S'"
 
-# src/main/saveload.c: 387
-# error(_("a read error occurred"))
-# src/main/saveload.c: 395
-# error(_("a read error occurred"))
-# src/main/saveload.c: 403
-# error(_("a read error occurred"))
-# src/main/saveload.c: 1594
-# error(_("a read error occurred"))
-# src/main/saveload.c: 1602
-# error(_("a read error occurred"))
-#: src/main/saveload.c:387 src/main/saveload.c:395 src/main/saveload.c:403
-#: src/main/saveload.c:1594 src/main/saveload.c:1602
+#: src/main/saveload.c:389 src/main/saveload.c:397 src/main/saveload.c:405
+#: src/main/saveload.c:1596 src/main/saveload.c:1604
 msgid "a read error occurred"
 msgstr "nastąpił błąd odczytu"
 
-# src/main/saveload.c: 467
-# warning(_("unresolved node during restore"))
-#: src/main/saveload.c:467
+#: src/main/saveload.c:469
 msgid "unresolved node during restore"
 msgstr "nierozwiązany węzeł podczas przywracania"
 
-# src/main/saveload.c: 488
-# error(_("restore compatibility error - no version %d compatibility"),
-# 		  VersionId)
-#: src/main/saveload.c:488
+#: src/main/saveload.c:490
 #, c-format
 msgid "restore compatibility error - no version %d compatibility"
 msgstr "błąd przywrócenia zgodności -- brak zgodnościi dla wersji %d"
 
-# src/main/saveload.c: 572
-# error(_("bad SEXP type in data file"))
-# src/main/saveload.c: 645
-# error(_("bad SEXP type in data file"))
-#: src/main/saveload.c:572 src/main/saveload.c:645
+#: src/main/saveload.c:574 src/main/saveload.c:647
 msgid "bad SEXP type in data file"
 msgstr "niepoprawny typ 'SEXP' w pliku danych"
 
-# src/main/saveload.c: 586
-# error(_("mismatch on types"))
-#: src/main/saveload.c:586
+#: src/main/saveload.c:588
 msgid "mismatch on types"
 msgstr "niezgodność typów"
 
-# src/main/saveload.c: 607
-# warning(_("unrecognized internal function name \"%s\""), d->buffer.data)
-# src/main/saveload.c: 1270
-# warning(_("unrecognized internal function name \"%s\""), d->buffer.data)
-# src/main/serialize.c: 1636
-# warning(_("unrecognized internal function name \"%s\""), cbuf)
-#: src/main/saveload.c:607 src/main/saveload.c:1270 src/main/serialize.c:1636
+#: src/main/saveload.c:609 src/main/saveload.c:1272 src/main/serialize.c:1675
 #, c-format
 msgid "unrecognized internal function name \"%s\""
 msgstr "nierozpoznana nazwa wewnętrznej funkcji \"%s\""
 
-# src/main/saveload.c: 709
-# (_("cannot save file position while restoring data"),
-# 		     startup)
-#: src/main/saveload.c:709
+#: src/main/saveload.c:711
 msgid "cannot save file position while restoring data"
 msgstr "nie można zachować położenia pliku podczas przywracania danych"
 
-# src/main/saveload.c: 722
-# (_("cannot restore file position while restoring data"),
-# 		     startup)
-#: src/main/saveload.c:722
+#: src/main/saveload.c:724
 msgid "cannot restore file position while restoring data"
 msgstr "nie można przywrócić położenia pliku podczas przywracania danych"
 
-# src/main/saveload.c: 915
-# warning(_("base namespace is not preserved in version 1 workspaces"))
-#: src/main/saveload.c:915
+#: src/main/saveload.c:917
 msgid "base namespace is not preserved in version 1 workspaces"
 msgstr ""
 "bazowa przestrzeń nazw nie jest zachowywana w obszarze roboczym w wersji 1"
 
-# src/main/saveload.c: 917
-# error(_("cannot save namespace in version 1 workspaces"))
-#: src/main/saveload.c:917
+#: src/main/saveload.c:919
 msgid "cannot save namespace in version 1 workspaces"
 msgstr "nie można zachować przestrzeni nazw w obszarze roboczym w wersji 1"
 
-# src/main/saveload.c: 919
-# error(_("cannot save environment with locked/active bindings in version 1 workspaces"))
-#: src/main/saveload.c:919
+#: src/main/saveload.c:921
 msgid ""
 "cannot save environment with locked/active bindings in version 1 workspaces"
 msgstr ""
 "nie można zachować środowiska z zablokowanymi/aktwnymi wiązaniami w obszarze "
 "roboczym w wersji 1"
 
-# src/main/saveload.c: 943
-# error(_("cannot save weak references in version 1 workspaces"))
-#: src/main/saveload.c:943
+#: src/main/saveload.c:945
 msgid "cannot save weak references in version 1 workspaces"
 msgstr "nie można zachować słabej referencji w obszarze roboczym w wersji 1"
 
-# src/main/saveload.c: 1021
-# error(_("NewWriteVec called with non-vector type"))
-#: src/main/saveload.c:1021
+#: src/main/saveload.c:1023
 msgid "NewWriteVec called with non-vector type"
 msgstr "'NewWriteVec' wywołane z typem nie-wektora"
 
-# src/main/saveload.c: 1084
-# error(_("cannot save byte code objects in version 1 workspaces"))
-#: src/main/saveload.c:1084
+#: src/main/saveload.c:1086
 msgid "cannot save byte code objects in version 1 workspaces"
 msgstr ""
 "nie można zachować obiektów kodu bajtowego w obszarze roboczym w wersji 1"
 
-# src/main/saveload.c: 1086
-# error(_("NewWriteItem: unknown type %i"), TYPEOF(s))
-#: src/main/saveload.c:1086
+#: src/main/saveload.c:1088
 #, c-format
 msgid "NewWriteItem: unknown type %i"
 msgstr "'NewWriteItem': nieznany typ %i"
 
-# src/main/saveload.c: 1216
-# error(_("NewReadVec called with non-vector type"))
-#: src/main/saveload.c:1216
+#: src/main/saveload.c:1218
 msgid "NewReadVec called with non-vector type"
 msgstr "'NewReadVec' wywołane z typem nie-wektora"
 
-# src/main/saveload.c: 1286
-# error(_("cannot read byte code objects from version 1 workspaces"))
-#: src/main/saveload.c:1286
+#: src/main/saveload.c:1288
 msgid "cannot read byte code objects from version 1 workspaces"
 msgstr ""
 "nie można czytać obiektów kodu bajtowego z obszaru roboczego w wersji 1"
 
-# src/main/saveload.c: 1288
-# error(_("NewReadItem: unknown type %i"), type)
-#: src/main/saveload.c:1288
+#: src/main/saveload.c:1290
 #, c-format
 msgid "NewReadItem: unknown type %i"
 msgstr "NewReadItem: nieznany typ %i"
 
-# src/main/saveload.c: 1440
-# error(_("out of memory reading ascii string"))
-#: src/main/saveload.c:1440
+#: src/main/saveload.c:1442
 msgid "out of memory reading ascii string"
 msgstr "zabrakło pamięci podczas czytania łańcucha ASCII"
 
-# src/main/saveload.c: 1565
-# error(_("a binary read error occurred"))
-#: src/main/saveload.c:1565
+#: src/main/saveload.c:1567
 msgid "a binary read error occurred"
 msgstr "nastąpił błąd odczytu danych binarnych"
 
-# src/main/saveload.c: 1580
-# error(_("out of memory reading binary string"))
-# src/main/saveload.c: 1681
-# error(_("out of memory reading binary string"))
-#: src/main/saveload.c:1580 src/main/saveload.c:1681
+#: src/main/saveload.c:1582 src/main/saveload.c:1683
 msgid "out of memory reading binary string"
 msgstr "zabrakło pamięci podczas czytania łańcucha binarnego"
 
-# src/main/saveload.c: 1585
-# error(_("a binary string read error occurred"))
-#: src/main/saveload.c:1585
+#: src/main/saveload.c:1587
 msgid "a binary string read error occurred"
 msgstr "nastąpił błąd odczytu łańcucha binarnego"
 
-# src/main/saveload.c: 1645
-# error(_("an xdr integer data write error occurred"))
-#: src/main/saveload.c:1645
+#: src/main/saveload.c:1647
 msgid "an xdr integer data write error occurred"
 msgstr "pojawił się błąd zapisu danych liczby całkowitej w xdr"
 
-# src/main/saveload.c: 1652
-# error(_("an xdr integer data read error occurred"))
-#: src/main/saveload.c:1652
+#: src/main/saveload.c:1654
 msgid "an xdr integer data read error occurred"
 msgstr "pojawił się błąd odczytu danych liczby całkowitej w xdr"
 
-# src/main/saveload.c: 1667
-# error(_("an xdr string data write error occurred"))
-# src/main/saveload.c: 1686
-# error(_("an xdr string data write error occurred"))
-#: src/main/saveload.c:1667 src/main/saveload.c:1686
+#: src/main/saveload.c:1669 src/main/saveload.c:1688
 msgid "an xdr string data write error occurred"
 msgstr "pojawił się błąd zapisu danych łańcucha w xdr"
 
-# src/main/saveload.c: 1694
-# error(_("an xdr real data write error occurred"))
-#: src/main/saveload.c:1694
+#: src/main/saveload.c:1696
 msgid "an xdr real data write error occurred"
 msgstr "pojawił się błąd zapisu danych liczby rzeczywistej w xdr"
 
-# src/main/saveload.c: 1701
-# error(_("an xdr real data read error occurred"))
-#: src/main/saveload.c:1701
+#: src/main/saveload.c:1703
 msgid "an xdr real data read error occurred"
 msgstr "pojawił się błąd odczytu danych liczby rzeczywistej w xdr"
 
-# src/main/saveload.c: 1708
-# error(_("an xdr complex data write error occurred"))
-#: src/main/saveload.c:1708
+#: src/main/saveload.c:1710
 msgid "an xdr complex data write error occurred"
 msgstr "pojawił się błąd zapisu danych liczby zespolonej w xdr"
 
-# src/main/saveload.c: 1715
-# error(_("an xdr complex data read error occurred"))
-#: src/main/saveload.c:1715
+#: src/main/saveload.c:1717
 msgid "an xdr complex data read error occurred"
 msgstr "pojawił się błąd odczytu danych liczby zespolonej w xdr"
 
-# src/modules/internet/internet.c: 351
-# error(_("write failed"))
-# src/modules/internet/internet.c: 409
-# error(_("write failed"))
-# src/modules/internet/internet.c: 514
-# error(_("write failed"))
-# src/library/grDevices/src/devPS.c: 5028
-# error(_("write failed"))
-# src/library/grDevices/src/devPS.c: 5080
-# error(_("write failed"))
-# src/library/grDevices/src/devPS.c: 5658
-# error(_("write failed"))
-# src/library/grDevices/src/devPS.c: 5702
-# error(_("write failed"))
-# src/library/grDevices/src/devPS.c: 7120
-# error(_("write failed"))
-# src/main/saveload.c: 1783
-# error(_("write failed"))
-# src/main/serialize.c: 1958
-# error(_("write failed"))
-# src/main/serialize.c: 2568
-# error(_("write failed"))
-#: src/main/saveload.c:1783 src/main/serialize.c:1958
-#: src/main/serialize.c:2568 src/modules/internet/internet.c:351
-#: src/modules/internet/internet.c:409 src/modules/internet/internet.c:514
+#: src/main/saveload.c:1785 src/main/serialize.c:1997 src/main/serialize.c:2614
+#: src/modules/internet/internet.c:514 src/modules/internet/internet.c:590
+#: src/modules/internet/internet.c:701
 msgid "write failed"
 msgstr "zapis nie powiódł się"
 
-# src/main/saveload.c: 1910
-# error(_("restore file may be empty -- no data loaded"))
-#: src/main/saveload.c:1910
+#: src/main/saveload.c:1912
 msgid "restore file may be empty -- no data loaded"
 msgstr "przywrócony plik może być pusty -- nie załadowano danych"
 
-# src/main/saveload.c: 1912
-# error(_("restore file may be from a newer version of R -- no data loaded"))
-#: src/main/saveload.c:1912
+#: src/main/saveload.c:1914
 msgid "restore file may be from a newer version of R -- no data loaded"
 msgstr "przywrócony plik może być z nowszej wersji R -- nie załadowano danych"
 
-# src/main/saveload.c: 1914
-# error(_("bad restore file magic number (file may be corrupted) -- no data loaded"))
-#: src/main/saveload.c:1914
+#: src/main/saveload.c:1916
 msgid "bad restore file magic number (file may be corrupted) -- no data loaded"
 msgstr ""
 "niepoprawna magiczna liczba przywracanego pliku (plik może być uszkodzony) "
 "-- nie załadowano danych"
 
-# src/main/saveload.c: 1940
-# error(_("first argument must be a character vector"))
-# src/main/saveload.c: 2238
-# error(_("first argument must be a character vector"))
-#: src/main/saveload.c:1940 src/main/saveload.c:2238
+#: src/main/saveload.c:1942 src/main/saveload.c:2240
 msgid "first argument must be a character vector"
 msgstr "pierwszy argument musi być wektorem tekstowym"
 
-# src/main/saveload.c: 2012
-# error(_("not a valid named list"))
-#: src/main/saveload.c:2012
+#: src/main/saveload.c:2014
 msgid "not a valid named list"
 msgstr "to nie jest niepoprawnie nazwana lista"
 
-# src/main/saveload.c: 2018
-# warningcall(R_NilValue,
-# 			    _("'%s' looks like a pre-2.4.0 S4 object: please recreate it"),
-# 			    CHAR(STRING_ELT(names, i)))
-# src/main/saveload.c: 2039
-# warningcall(R_NilValue,
-# 			_("'%s' looks like a pre-2.4.0 S4 object: please recreate it"),
-# 			CHAR(PRINTNAME(TAG(a))))
-#: src/main/saveload.c:2019 src/main/saveload.c:2040
+#: src/main/saveload.c:2021 src/main/saveload.c:2042
 #, c-format
 msgid "'%s' looks like a pre-2.4.0 S4 object: please recreate it"
 msgstr ""
 "'%s' wygląda na obiekt S4 sprzed wersji 2.4.0: proszę go ponownie utworzyć"
 
-# src/main/saveload.c: 2027
-# error(_("loaded data is not in pair list form"))
-#: src/main/saveload.c:2027
+#: src/main/saveload.c:2029
 msgid "loaded data is not in pair list form"
 msgstr "załadowane dane nie są w postaci listy par"
 
-# src/main/saveload.c: 2063
-# error(_("first argument must be a file name"))
-#: src/main/saveload.c:2063
+#: src/main/saveload.c:2065
 msgid "first argument must be a file name"
 msgstr "pierwszy argument musi być nazwą pliku"
 
-# src/main/saveload.c: 2108
-# error(_("XDR write failed"))
-# src/main/saveload.c: 2134
-# error(_("XDR write failed"))
-# src/main/serialize.c: 826
-# error(_("XDR write failed"))
-# src/main/serialize.c: 863
-# error(_("XDR write failed"))
-# src/main/serialize.c: 901
-# error(_("XDR write failed"))
-#: src/main/saveload.c:2108 src/main/saveload.c:2134 src/main/serialize.c:826
-#: src/main/serialize.c:863 src/main/serialize.c:901
+#: src/main/saveload.c:2110 src/main/saveload.c:2136 src/main/serialize.c:864
+#: src/main/serialize.c:901 src/main/serialize.c:939
 msgid "XDR write failed"
 msgstr "zapis 'XDR' nie powiódł się"
 
-# src/main/saveload.c: 2121
-# error(_("XDR read failed"))
-# src/main/saveload.c: 2146
-# error(_("XDR read failed"))
-# src/main/serialize.c: 1362
-# error(_("XDR read failed"))
-# src/main/serialize.c: 1398
-# error(_("XDR read failed"))
-# src/main/serialize.c: 1436
-# error(_("XDR read failed"))
-#: src/main/saveload.c:2121 src/main/saveload.c:2146 src/main/serialize.c:1362
-#: src/main/serialize.c:1398 src/main/serialize.c:1436
+#: src/main/saveload.c:2123 src/main/saveload.c:2148 src/main/serialize.c:1400
+#: src/main/serialize.c:1436 src/main/serialize.c:1474
 msgid "XDR read failed"
 msgstr "odczyt 'XDR' nie powiódł się"
 
-# src/main/saveload.c: 2157
-# error(_("cannot save data -- unable to open '%s': %s"),
-# 		  name, strerror(errno))
-#: src/main/saveload.c:2157
+#: src/main/saveload.c:2159
 #, c-format
 msgid "cannot save data -- unable to open '%s': %s"
 msgstr "nie można zapisać danych -- nie można otworzyć '%s': %s"
 
-# src/main/saveload.c: 2254
-# error(_("cannot save to connections in version %d format"), version)
-# src/main/serialize.c: 2161
-# error(_("cannot save to connections in version %d format"), version)
-#: src/main/saveload.c:2254 src/main/serialize.c:2161
+#: src/main/saveload.c:2256 src/main/serialize.c:2202
 #, c-format
 msgid "cannot save to connections in version %d format"
 msgstr "nie można zapisać w połączeniach w formacie w wersji %d"
 
-# src/main/saveload.c: 2277
-# error(_("connection not open for writing"))
-# src/main/serialize.c: 2186
-# error(_("connection not open for writing"))
-#: src/main/saveload.c:2277 src/main/serialize.c:2186
+#: src/main/saveload.c:2279 src/main/serialize.c:2227
 msgid "connection not open for writing"
 msgstr "połączenie nie jest otwarte do zapisu"
 
-# src/main/saveload.c: 2285
-# error(_("cannot save XDR format to a text-mode connection"))
-#: src/main/saveload.c:2285
+#: src/main/saveload.c:2288
 msgid "cannot save XDR format to a text-mode connection"
 msgstr "nie można zapisać formatu XDR w połączeniu w trybie tekstowym"
 
-# src/main/saveload.c: 2295
-# error(_("error writing to connection"))
-# src/main/serialize.c: 2066
-# error(_("error writing to connection"))
-# src/main/serialize.c: 2080
-# error(_("error writing to connection"))
-# src/main/serialize.c: 2262
-# error(_("error writing to connection"))
-# src/main/serialize.c: 2284
-# error(_("error writing to connection"))
-#: src/main/saveload.c:2295 src/main/serialize.c:2066
-#: src/main/serialize.c:2080 src/main/serialize.c:2262
-#: src/main/serialize.c:2284
+#: src/main/saveload.c:2298 src/main/serialize.c:2105 src/main/serialize.c:2119
+#: src/main/serialize.c:2303 src/main/serialize.c:2325
 msgid "error writing to connection"
 msgstr "błąd zapisu do połączenia"
 
-# src/main/saveload.c: 2359
-# error(_("connection not open for reading"))
-# src/main/serialize.c: 2234
-# error(_("connection not open for reading"))
-#: src/main/saveload.c:2359 src/main/serialize.c:2234
+#: src/main/saveload.c:2359 src/main/serialize.c:2275
 msgid "connection not open for reading"
 msgstr "połączenie nie jest otwarte do odczytu"
 
-# src/main/saveload.c: 2360
-# error(_("can only load() from a binary connection"))
 #: src/main/saveload.c:2360
 msgid "can only load() from a binary connection"
 msgstr "można ładować jedynie z połączenia binarnego"
 
-# src/main/saveload.c: 2371
-# error(_("no input is available"))
 #: src/main/saveload.c:2371
 msgid "no input is available"
 msgstr "brak dostępnego wejścia"
 
-# src/main/saveload.c: 2383
-# error(_("the input does not start with a magic number compatible with loading from a connection"))
 #: src/main/saveload.c:2383
 msgid ""
 "the input does not start with a magic number compatible with loading from a "
@@ -10369,331 +5391,198 @@ msgid ""
 msgstr ""
 "wejście nie rozpoczyna się magiczną liczbą zgodną z ładowniem z połączenia"
 
-# src/main/scan.c: 364
-# warning(_("EOF within quoted string"))
-# src/main/scan.c: 414
-# warning(_("EOF within quoted string"))
 #: src/main/scan.c:364 src/main/scan.c:414
 msgid "EOF within quoted string"
 msgstr "Koniec pliku wewnątrz cudzysłowia"
 
-# src/main/scan.c: 484
-# error(_("scan() expected '%s', got '%s'"), what, got)
 #: src/main/scan.c:484
 #, c-format
 msgid "scan() expected '%s', got '%s'"
 msgstr "'scan()' oczekiwał '%s', dostał '%s'"
 
-# src/main/scan.c: 585
-# error(_("too many items"))
-# src/main/scan.c: 732
-# error(_("too many items"))
-# src/main/connections.c: 3595
-# error("too many items")
-#: src/main/scan.c:585 src/main/scan.c:732
+#: src/main/scan.c:585 src/main/scan.c:735
 msgid "too many items"
 msgstr "zbyt dużo pozycji"
 
-# src/main/scan.c: 671
-# error(_("empty 'what' specified"))
 #: src/main/scan.c:671
 msgid "empty 'what' specified"
 msgstr "określono pusty 'what'"
 
-# src/main/scan.c: 722
-# error(_("line %d did not have %d elements"), badline, nc)
-#: src/main/scan.c:722
+#: src/main/scan.c:725
 #, c-format
 msgid "line %d did not have %d elements"
 msgstr "linia %d nie miała %d elementów"
 
-# src/main/scan.c: 775
-# warning(_("number of items read is not a multiple of the number of columns"))
 #: src/main/scan.c:775
 msgid "number of items read is not a multiple of the number of columns"
 msgstr "ilość odczytanych pozycji nie jest wielokrotnością liczby kolumn"
 
-# src/main/scan.c: 869
-# error(_("invalid 'strip.white' length"))
 #: src/main/scan.c:869
 msgid "invalid 'strip.white' length"
 msgstr "niepoprawna długość 'strip.white'"
 
-# src/main/scan.c: 880
-# error(_("invalid 'sep' value: must be one byte"))
 #: src/main/scan.c:880
 msgid "invalid 'sep' value: must be one byte"
 msgstr "niepoprawna wartość 'sep': musi być jednobajtowa"
 
-# src/main/scan.c: 892
-# error(_("invalid decimal separator: must be one byte"))
 #: src/main/scan.c:892
 msgid "invalid decimal separator: must be one byte"
 msgstr "niepoprawny separator dziesiętny: musi być jednobajtowy"
 
-# src/main/scan.c: 897
-# error(_("invalid decimal separator"))
 #: src/main/scan.c:897
 msgid "invalid decimal separator"
 msgstr "niepoprawny separator dziesiętny"
 
-# src/library/utils/src/io.c: 351
-# error(_("invalid quote symbol set"))
-# src/library/utils/src/io.c: 814
-# error(_("invalid quote symbol set"))
-# src/main/scan.c: 906
-# error(_("invalid quote symbol set"))
 #: src/main/scan.c:906
 msgid "invalid quote symbol set"
 msgstr "niepoprawne ustawiony symbol cudzysłowiu"
 
-# src/main/scan.c: 987
-# warning(_("embedded nul(s) found in input"))
-#: src/main/scan.c:987
+#: src/main/scan.c:988
 msgid "embedded nul(s) found in input"
 msgstr "znaleziono osadzony znak znak null na wejściu"
 
-# src/main/seq.c: 48
-#  _("unequal factor lengths")
-#: src/main/seq.c:48
+#: src/main/seq.c:49
 msgid "unequal factor lengths"
 msgstr "nierówne długości czynników"
 
-# src/main/seq.c: 100
-#  _("result would be too long a vector")
-#: src/main/seq.c:100
+#: src/main/seq.c:101
 msgid "result would be too long a vector"
 msgstr "wynikiem byłby zbyt długi wektor"
 
-# src/main/seq.c: 159
-#  _("argument of length 0")
-#: src/main/seq.c:159
+#: src/main/seq.c:160
 msgid "argument of length 0"
 msgstr "argument ma długość 0"
 
-# src/main/seq.c: 161
-# warningcall(call, _("numerical expression has %d elements: only the first used"), (int) n1)
-# src/main/seq.c: 163
-# warningcall(call, _("numerical expression has %d elements: only the first used"), (int) n2)
-#: src/main/seq.c:161 src/main/seq.c:163
+#: src/main/seq.c:163 src/main/seq.c:168
 #, c-format
-msgid "numerical expression has %d elements: only the first used"
-msgstr ""
-"wyrażenie liczbowe posiada kilka (%d) elementów: użyto tylko pierwszego"
+msgid "numerical expression has %d element: only the first used"
+msgid_plural "numerical expression has %d elements: only the first used"
+msgstr[0] "wyrażenie liczbowe posiada %d element: użyto tylko pierwszego"
+msgstr[1] "wyrażenie liczbowe posiada %d elementy: użyto tylko pierwszego"
+msgstr[2] "wyrażenie liczbowe posiada %d elementów: użyto tylko pierwszego"
 
-# src/main/seq.c: 167
-#  _("NA/NaN argument")
-#: src/main/seq.c:167
+#: src/main/seq.c:174
 msgid "NA/NaN argument"
 msgstr "argument o wartości NA/NaN"
 
-# src/main/seq.c: 331
-# error(_("incorrect type for second argument"))
-#: src/main/seq.c:331
+#: src/main/seq.c:330
 msgid "incorrect type for second argument"
 msgstr "niepoprawny typ dla drugiego argumentu"
 
-# src/main/seq.c: 334
-# error(_("attempt to replicate an object of type '%s'"), 
-# 	      type2char(TYPEOF(s)))
-#: src/main/seq.c:334
+#: src/main/seq.c:333
 #, c-format
 msgid "attempt to replicate an object of type '%s'"
 msgstr "próba powielenia obiektu typu '%s'"
 
-# src/main/seq.c: 387
-# error(_("attempt to replicate non-vector"))
-#: src/main/seq.c:387
+#: src/main/seq.c:386
 msgid "attempt to replicate non-vector"
 msgstr "próba powielenia nie-wektora"
 
-# src/main/seq.c: 403
-# error(_("cannot replicate NULL to a non-zero length"))
-#: src/main/seq.c:403
+#: src/main/seq.c:402
 msgid "cannot replicate NULL to a non-zero length"
 msgstr "nie można powielać wartości NULL do niezerowej długości"
 
-# src/main/seq.c: 626
-# warningcall(call, _("first element used of '%s' argument"), 
-# 		    "length.out")
-# src/main/seq.c: 633
-# warningcall(call, _("first element used of '%s' argument"), "each")
-# src/main/seq.c: 768
-# warningcall(call, _("first element used of '%s' argument"), 
-# 			"length.out")
-# src/main/seq.c: 979
-# warningcall(call, _("first element used of '%s' argument"),
-# 		    "length.out")
-#: src/main/seq.c:626 src/main/seq.c:633 src/main/seq.c:768 src/main/seq.c:979
+#: src/main/seq.c:623 src/main/seq.c:630 src/main/seq.c:759 src/main/seq.c:970
 #, c-format
 msgid "first element used of '%s' argument"
 msgstr "użyto pierwszego elementu argumentu '%s'"
 
-# src/main/seq.c: 766
-#  _("'length.out' must be a non-negative number")
-#: src/main/seq.c:766
+#: src/main/seq.c:757
 msgid "'length.out' must be a non-negative number"
 msgstr "argument 'length.out' musi być liczbą nieujemną"
 
-# src/main/seq.c: 790
-#  _("'from' must be finite")
-# src/main/seq.c: 856
-#  _("'from' must be finite")
-# src/main/seq.c: 873
-#  _("'from' must be finite")
-#: src/main/seq.c:790 src/main/seq.c:856 src/main/seq.c:873
+#: src/main/seq.c:781 src/main/seq.c:847 src/main/seq.c:864
 msgid "'from' must be finite"
 msgstr "'from' musi być skończone"
 
-# src/main/seq.c: 792
-#  _("'to' must be finite")
-# src/main/seq.c: 858
-#  _("'to' must be finite")
-# src/main/seq.c: 895
-#  _("'to' must be finite")
-#: src/main/seq.c:792 src/main/seq.c:858 src/main/seq.c:895
+#: src/main/seq.c:783 src/main/seq.c:849 src/main/seq.c:886
 msgid "'to' must be finite"
 msgstr "'to' musi być skończone"
 
-# src/main/seq.c: 804
-#  _("invalid '(to - from)/by' in 'seq'")
-#: src/main/seq.c:804
+#: src/main/seq.c:795
 msgid "invalid '(to - from)/by' in 'seq'"
 msgstr "niepoprawne '(to - from)/by' w 'seq()'"
 
-# src/library/base/R/seq.R: 72
-# stop("'by' argument is much too small")
-# src/main/seq.c: 816
-#  _("'by' argument is much too small")
-#: src/main/seq.c:816
+#: src/main/seq.c:807
 msgid "'by' argument is much too small"
 msgstr "argument 'by' jest znacznie za mały"
 
-# src/library/base/R/seq.R: 70
-# stop("wrong sign in 'by' argument")
-# src/main/seq.c: 818
-#  _("wrong sign in 'by' argument")
-#: src/main/seq.c:818
+#: src/main/seq.c:809
 msgid "wrong sign in 'by' argument"
 msgstr "błędny znak w argumencie 'by'"
 
-# src/main/seq.c: 875
-#  _("'by' must be finite")
-# src/main/seq.c: 897
-#  _("'by' must be finite")
-#: src/main/seq.c:875 src/main/seq.c:897
+#: src/main/seq.c:866 src/main/seq.c:888
 msgid "'by' must be finite"
 msgstr "'by' musi być skończone"
 
-# src/main/seq.c: 985
-#  _("argument must be coercible to non-negative integer")
-# src/main/seq.c: 990
-#  _("argument must be coercible to non-negative integer")
-#: src/main/seq.c:985 src/main/seq.c:990
+#: src/main/seq.c:976 src/main/seq.c:981
 msgid "argument must be coercible to non-negative integer"
 msgstr "argument musi być przekształcalny do nieujemnej liczby całkowitej"
 
-# src/main/serialize.c: 224
-# error(_("unknown or inappropriate output format"))
-# src/main/serialize.c: 254
-# error(_("unknown or inappropriate output format"))
-# src/main/serialize.c: 277
-# error(_("unknown or inappropriate output format"))
-#: src/main/serialize.c:224 src/main/serialize.c:254 src/main/serialize.c:277
+#: src/main/serialize.c:228 src/main/serialize.c:275 src/main/serialize.c:299
 msgid "unknown or inappropriate output format"
 msgstr "nieznany lub nieodpowiedni format wyjścia"
 
-# src/main/serialize.c: 504
-# error(_("must specify ascii, binary, or xdr format"))
-#: src/main/serialize.c:504
+#: src/main/serialize.c:542
 msgid "must specify ascii, binary, or xdr format"
 msgstr "musisz określić format ascii, binarny, lub xdr"
 
-# src/main/serialize.c: 505
-# error(_("unknown output format"))
-#: src/main/serialize.c:505
+#: src/main/serialize.c:543
 msgid "unknown output format"
 msgstr "nieznany format wyjścia"
 
-# src/main/serialize.c: 536
-# error(_("unknown input format"))
-#: src/main/serialize.c:536
+#: src/main/serialize.c:574
 msgid "unknown input format"
 msgstr "nieznany format wejścia"
 
-# src/main/serialize.c: 541
-# error(_("input format does not match specified format"))
-#: src/main/serialize.c:541
+#: src/main/serialize.c:579
 msgid "input format does not match specified format"
 msgstr "format wejściowy nie zgadza się z określonym formatem"
 
-# src/main/serialize.c: 752
-# error(_("no restore method available"))
-#: src/main/serialize.c:752
+#: src/main/serialize.c:790
 msgid "no restore method available"
 msgstr "brak dostępnej metody przywracania"
 
-# src/main/serialize.c: 794
-# warning(_("names in persistent strings are currently ignored"))
-#: src/main/serialize.c:794
+#: src/main/serialize.c:832
 msgid "names in persistent strings are currently ignored"
 msgstr "nazwy w persystentych łańcuchach są aktualnie ignorowane"
 
-# src/main/serialize.c: 963
-# warning(_("'%s' may not be available when loading"),
-# 		    CHAR(STRING_ELT(name, 0)))
-#: src/main/serialize.c:963
+#: src/main/serialize.c:1001
 #, c-format
 msgid "'%s' may not be available when loading"
 msgstr "'%s' może nie być dostępne podczas ładowania"
 
-# src/main/serialize.c: 970
-# warning(_("namespaces may not be available when loading"))
-#: src/main/serialize.c:970
+#: src/main/serialize.c:1008
 msgid "namespaces may not be available when loading"
 msgstr "przestrzeń nazw może nie być dostępna podczas ładowania"
 
-# src/main/serialize.c: 1097
-# error(_("WriteItem: unknown type %i"), TYPEOF(s))
-#: src/main/serialize.c:1097
+#: src/main/serialize.c:1136
 #, c-format
 msgid "WriteItem: unknown type %i"
 msgstr "'WriteItem': nieznany typ %i"
 
-# src/main/serialize.c: 1273
-# error(_("version %d not supported"), version)
-#: src/main/serialize.c:1273
+#: src/main/serialize.c:1312
 #, c-format
 msgid "version %d not supported"
 msgstr "wersja %d nie jest wspierana"
 
-# src/main/serialize.c: 1305
-# error(_("reference index out of range"))
-#: src/main/serialize.c:1305
+#: src/main/serialize.c:1343
 msgid "reference index out of range"
 msgstr "indeks referencyjny poza zasięgiem"
 
-# src/main/serialize.c: 1335
-# error(_("names in persistent strings are not supported yet"))
-#: src/main/serialize.c:1335
+#: src/main/serialize.c:1373
 msgid "names in persistent strings are not supported yet"
 msgstr "nazwy w persystentnych łańcuchach nie są jeszcze wspierane"
 
-# src/main/serialize.c: 1463
-# error(_("negative serialized length for vector"))
-#: src/main/serialize.c:1463
+#: src/main/serialize.c:1501
 msgid "negative serialized length for vector"
 msgstr "ujemna zserializowana długość wektora"
 
-# src/main/serialize.c: 1471
-# (_("invalid upper part of serialized vector length"))
-#: src/main/serialize.c:1471
+#: src/main/serialize.c:1509
 msgid "invalid upper part of serialized vector length"
 msgstr "niepoprawna górna część długości zserializowanego wektora"
 
-# src/main/serialize.c: 1476
-# error(_("negative serialized vector length:\nperhaps long vector from 64-bit version of R?"))
-#: src/main/serialize.c:1476
+#: src/main/serialize.c:1514
 msgid ""
 "negative serialized vector length:\n"
 "perhaps long vector from 64-bit version of R?"
@@ -10701,28 +5590,20 @@ msgstr ""
 "ujemna długość zserializowanego wektora:\n"
 "być może długi wektor z 64-bitowej wersji R?"
 
-# src/main/serialize.c: 1707
-# error(_("this version of R cannot read class references"))
-#: src/main/serialize.c:1707
+#: src/main/serialize.c:1746
 msgid "this version of R cannot read class references"
 msgstr "ta wersja R nie może czytać referencji klasy"
 
-# src/main/serialize.c: 1709
-# error(_("this version of R cannot read generic function references"))
-#: src/main/serialize.c:1709
+#: src/main/serialize.c:1748
 msgid "this version of R cannot read generic function references"
 msgstr "ta wersja R nie może czytać referencji ogólnej funkcji"
 
-# src/main/serialize.c: 1726
-# error(_("ReadItem: unknown type %i, perhaps written by later version of R"), type)
-#: src/main/serialize.c:1726
+#: src/main/serialize.c:1765
 #, c-format
 msgid "ReadItem: unknown type %i, perhaps written by later version of R"
 msgstr "ReadItem: nieznany typ %i, być może zapisany przez późniejszą wersję R"
 
-# src/main/serialize.c: 1882
-# error(_("cannot read unreleased workspace version %d written by experimental R %d.%d.%d"), version, vw, pw, sw)
-#: src/main/serialize.c:1882
+#: src/main/serialize.c:1921
 #, c-format
 msgid ""
 "cannot read unreleased workspace version %d written by experimental R %d.%d."
@@ -10731,10 +5612,7 @@ msgstr ""
 "nie można czytać niewydanego obszaru roboczego w wersji %d zapisanej przez "
 "eksperymentalny R %d.%d.%d"
 
-# src/main/serialize.c: 1886
-# error(_("cannot read workspace version %d written by R %d.%d.%d; need R %d.%d.%d or newer"),
-# 		      version, vw, pw, sw, vm, pm, sm)
-#: src/main/serialize.c:1886
+#: src/main/serialize.c:1925
 #, c-format
 msgid ""
 "cannot read workspace version %d written by R %d.%d.%d; need R %d.%d.%d or "
@@ -10743,1294 +5621,725 @@ msgstr ""
 "nie można czytać obszaru roboczego w wersji %d zapisanej przez R %d.%d.%d; "
 "potrzeba R %d.%d.%d lub nowszego"
 
-# src/main/serialize.c: 1965
-# error(_("read failed"))
-#: src/main/serialize.c:1965
+#: src/main/serialize.c:2004
 msgid "read failed"
 msgstr "odczyt nie powiódł się"
 
-# src/main/serialize.c: 2028
-# error(_("error reading from ascii connection"))
-#: src/main/serialize.c:2028
+#: src/main/serialize.c:2067
 msgid "error reading from ascii connection"
 msgstr "błąd czytania z połączenia ASCII"
 
-# src/main/serialize.c: 2030
-# error(_("unexpected format in ascii connection"))
-#: src/main/serialize.c:2030
+#: src/main/serialize.c:2069
 msgid "unexpected format in ascii connection"
 msgstr "nieoczekiwany format w połączeniu ASCII"
 
-# src/main/serialize.c: 2035
-# error(_("error reading from connection"))
-# src/main/serialize.c: 2049
-# error(_("error reading from connection"))
-#: src/main/serialize.c:2035 src/main/serialize.c:2049
+#: src/main/serialize.c:2074 src/main/serialize.c:2088
 msgid "error reading from connection"
 msgstr "błąd czytania z połączenia"
 
-# src/main/serialize.c: 2090
-# error(_("only ascii format can be written to text mode connections"))
-#: src/main/serialize.c:2090
+#: src/main/serialize.c:2130
 msgid "only ascii format can be written to text mode connections"
 msgstr ""
 "jedynie format ASCII może być zapisany w połączeniach w trybie tekstowym"
 
-# src/main/serialize.c: 2104
-# error(_("only ascii format can be read from text mode connections"))
-#: src/main/serialize.c:2104
+#: src/main/serialize.c:2144
 msgid "only ascii format can be read from text mode connections"
 msgstr ""
 "jedynie format ASCII może być odczytany w połączeniach w trybie tekstowym"
 
-# src/main/serialize.c: 2159
-# error(_("bad version value"))
-# src/main/serialize.c: 2312
-# error(_("bad version value"))
-# src/main/serialize.c: 2461
-# error(_("bad version value"))
-#: src/main/serialize.c:2159 src/main/serialize.c:2312
-#: src/main/serialize.c:2461
+#: src/main/serialize.c:2200 src/main/serialize.c:2353
+#: src/main/serialize.c:2502
 msgid "bad version value"
 msgstr "błędna wartość wersji"
 
-# src/main/serialize.c: 2184
-# error(_("binary-mode connection required for ascii=FALSE"))
-#: src/main/serialize.c:2184
+#: src/main/serialize.c:2225
 msgid "binary-mode connection required for ascii=FALSE"
 msgstr "połączenie w trybie binarnym wymagane jest dla 'ascii=FALSE'"
 
-# src/main/serialize.c: 2340
-# error(_("serialization is too large to store in a raw vector"))
-# src/main/serialize.c: 2377
-# error(_("serialization is too large to store in a raw vector"))
-# src/main/serialize.c: 2440
-# error(_("serialization is too large to store in a raw vector"))
-#: src/main/serialize.c:2340 src/main/serialize.c:2377
-#: src/main/serialize.c:2440
+#: src/main/serialize.c:2381 src/main/serialize.c:2418
+#: src/main/serialize.c:2481
 msgid "serialization is too large to store in a raw vector"
 msgstr "serializacja jest zbyt duża aby ją przechowywać w pustym wektorze"
 
-# src/main/serialize.c: 2357
-# error(_("cannot allocate buffer"))
-#: src/main/serialize.c:2357
+#: src/main/serialize.c:2398
 msgid "cannot allocate buffer"
 msgstr "nie można przydzielić bufora"
 
-# src/main/serialize.c: 2546
-# error(_("not a proper file name"))
-# src/main/serialize.c: 2619
-# error(_("not a proper file name"))
-#: src/main/serialize.c:2546 src/main/serialize.c:2619
+#: src/main/serialize.c:2592 src/main/serialize.c:2665
 msgid "not a proper file name"
 msgstr "niepoprawna nazwa pliku"
 
-# src/main/serialize.c: 2548
-# error(_("not a proper raw vector"))
-#: src/main/serialize.c:2548
+#: src/main/serialize.c:2594
 msgid "not a proper raw vector"
 msgstr "nie jest poprawnym pustym wektorem"
 
-# src/main/serialize.c: 2569
-# error(_("could not determine file position"))
-#: src/main/serialize.c:2569
+#: src/main/serialize.c:2615
 msgid "could not determine file position"
 msgstr "nie udało się określić położenia pliku"
 
-# src/main/serialize.c: 2621
-# error(_("bad offset/length argument"))
-#: src/main/serialize.c:2621
+#: src/main/serialize.c:2667
 msgid "bad offset/length argument"
 msgstr "niepoprawny argument przesunięcia/długości"
 
-# src/main/serialize.c: 2645
-# error(_("seek failed on %s"), cfile)
-# src/main/serialize.c: 2658
-# error(_("seek failed on %s"), cfile)
-# src/main/serialize.c: 2667
-# error(_("seek failed on %s"), cfile)
-# src/main/serialize.c: 2677
-# error(_("seek failed on %s"), cfile)
-# src/main/serialize.c: 2690
-# error(_("seek failed on %s"), cfile)
-#: src/main/serialize.c:2645 src/main/serialize.c:2658
-#: src/main/serialize.c:2667 src/main/serialize.c:2677
-#: src/main/serialize.c:2690
+#: src/main/serialize.c:2691 src/main/serialize.c:2704
+#: src/main/serialize.c:2713 src/main/serialize.c:2723
+#: src/main/serialize.c:2736
 #, c-format
 msgid "seek failed on %s"
 msgstr "przeszukiwanie nie powiodło się dla '%s'"
 
-# src/main/serialize.c: 2662
-# error(_("read failed on %s"), cfile)
-# src/main/serialize.c: 2671
-# error(_("read failed on %s"), cfile)
-# src/main/serialize.c: 2681
-# error(_("read failed on %s"), cfile)
-# src/main/serialize.c: 2694
-# error(_("read failed on %s"), cfile)
-#: src/main/serialize.c:2662 src/main/serialize.c:2671
-#: src/main/serialize.c:2681 src/main/serialize.c:2694
+#: src/main/serialize.c:2708 src/main/serialize.c:2717
+#: src/main/serialize.c:2727 src/main/serialize.c:2740
 #, c-format
 msgid "read failed on %s"
 msgstr "odczytywanie nie powiodło się dla '%s'"
 
-# src/main/serialize.c: 2713
-# error(_("bad environment"))
-#: src/main/serialize.c:2713
+#: src/main/serialize.c:2759
 msgid "bad environment"
 msgstr "złe środowisko"
 
-# src/main/serialize.c: 2715
-# error(_("bad variable names"))
-#: src/main/serialize.c:2715
+#: src/main/serialize.c:2761
 msgid "bad variable names"
 msgstr "błędne nazwy zmiennej"
 
-# src/main/sort.c: 88
-# error(_("only atomic vectors can be tested to be sorted"))
 #: src/main/sort.c:88
 msgid "only atomic vectors can be tested to be sorted"
 msgstr ""
 "tylko atomowe wektory mogą być testowane pod kątem możliwości ich sortowania"
 
-# src/main/sort.c: 326
-# error(_("'decreasing' must be TRUE or FALSE"))
-# src/main/sort.c: 1228
-# error(_("'decreasing' must be TRUE or FALSE"))
-# src/main/sort.c: 1396
-# error(_("'decreasing' must be TRUE or FALSE"))
-#: src/main/sort.c:326 src/main/sort.c:1228 src/main/sort.c:1396
+#: src/main/sort.c:325 src/main/sort.c:1248
 msgid "'decreasing' must be TRUE or FALSE"
 msgstr "'decreasing' musi być TRUE lub FALSE"
 
-# src/main/sort.c: 329
-# error(_("only atomic vectors can be sorted"))
-# src/main/sort.c: 600
-# error(_("only atomic vectors can be sorted"))
-#: src/main/sort.c:329 src/main/sort.c:600
+#: src/main/sort.c:328 src/main/sort.c:599
 msgid "only atomic vectors can be sorted"
 msgstr "tylko atomowe wektory mogą być sortowane"
 
-# src/main/sort.c: 331
-# error(_("raw vectors cannot be sorted"))
-# src/main/sort.c: 602
-# error(_("raw vectors cannot be sorted"))
-# src/main/sort.c: 1297
-# error(_("raw vectors cannot be sorted"))
-#: src/main/sort.c:331 src/main/sort.c:602 src/main/sort.c:1297
+#: src/main/sort.c:330 src/main/sort.c:601 src/main/sort.c:1317
 msgid "raw vectors cannot be sorted"
 msgstr "puste wektory nie mogą być sortowane"
 
-# src/main/sort.c: 613
-# error(_("NA or infinite index"))
-#: src/main/sort.c:613
+#: src/main/sort.c:612
 msgid "NA or infinite index"
 msgstr "wartość NA lub nieskończony indeks"
 
-# src/main/sort.c: 616
-# error(_("index %ld outside bounds"), l[i])
-#: src/main/sort.c:616
+#: src/main/sort.c:615
 #, c-format
 msgid "index %ld outside bounds"
 msgstr "indeks %ld jest poza granicami"
 
-# src/main/sort.c: 621
-# error(_("NA index"))
-# src/main/sort.c: 634
-# error(_("NA index"))
-#: src/main/sort.c:621 src/main/sort.c:634
+#: src/main/sort.c:620 src/main/sort.c:633
 msgid "NA index"
 msgstr "Indeks ma wartość NA"
 
-# src/main/sort.c: 623
-# error(_("index %d outside bounds"), il[i])
-# src/main/sort.c: 636
-# error(_("index %d outside bounds"), l[i])
-#: src/main/sort.c:623 src/main/sort.c:636
+#: src/main/sort.c:622 src/main/sort.c:635
 #, c-format
 msgid "index %d outside bounds"
 msgstr "indeks %d jest poza zakresem"
 
-# src/main/sort.c: 1237
-# error(_("argument %d is not a vector"), narg + 1)
-#: src/main/sort.c:1237
+#: src/main/sort.c:1257
 #, c-format
 msgid "argument %d is not a vector"
 msgstr "argument %d nie jest wektorem"
 
-# src/library/base/R/sort.R: 115
-# stop("argument lengths differ")
-# src/main/sort.c: 1239
-# error(_("argument lengths differ"))
-#: src/main/sort.c:1239
+#: src/main/sort.c:1259
 msgid "argument lengths differ"
 msgstr "długości argumentów różnią się"
 
-# src/main/sort.c: 1324
-# error(_("invalid ties.method for rank() [should never happen]"))
-#: src/main/sort.c:1324
+#: src/main/sort.c:1344
 msgid "invalid ties.method for rank() [should never happen]"
 msgstr "niepoprawny 'ties.method' dla 'rank()' [nie powinien się zdarzyć]"
 
-# src/main/sort.c: 1429
-# error(_("too large a range of values in 'x'"))
-#: src/main/sort.c:1429
-msgid "too large a range of values in 'x'"
-msgstr "zbyt duży zakres wartości w 'x'"
-
-# src/main/source.c: 215
-#  _("coercion of 'text' to character was unsuccessful")
-#: src/main/source.c:215
+#: src/main/source.c:220
 msgid "coercion of 'text' to character was unsuccessful"
 msgstr "przekształcenie 'text' w znak nie powiodło się"
 
-# src/main/source.c: 231
-# warning(_("argument '%s = \"%s\"' will be ignored"), "encoding", encoding)
-#: src/main/source.c:231
+#: src/main/source.c:236
 #, c-format
 msgid "argument '%s = \"%s\"' will be ignored"
 msgstr "argument '%s = \"%s\"' zostanie zignorowany"
 
-# src/main/split.c: 38
-# error(_("first argument must be a vector"))
-#: src/main/split.c:38
+#: src/main/split.c:39
 msgid "first argument must be a vector"
 msgstr "pierwszy argument musi być wektorem"
 
-# src/main/split.c: 40
-# error(_("second argument must be a factor"))
-#: src/main/split.c:40
+#: src/main/split.c:41
 msgid "second argument must be a factor"
 msgstr "drugi argument musi być czynnikiem"
 
-# src/main/split.c: 45
-# error(_("group length is 0 but data length > 0"))
-#: src/main/split.c:45
+#: src/main/split.c:46
 msgid "group length is 0 but data length > 0"
 msgstr "długość grupy wynosi 0 ale długość danych > 0"
 
-# src/main/split.c: 47
-# warning(_("data length is not a multiple of split variable"))
-#: src/main/split.c:47
+#: src/main/split.c:48
 msgid "data length is not a multiple of split variable"
 msgstr "długość danych nie jest wielokrotnością zmiennej rozdzielającej"
 
-# src/main/split.c: 56
-# error(_("factor has bad level"))
-#: src/main/split.c:56
+#: src/main/split.c:58
 msgid "factor has bad level"
 msgstr "czynnik posiada błędny poziom"
 
-# src/main/sprintf.c: 94
-# error(_("required resulting string length %d is greater than maximal %d"), nc, MAXLINE)
-#: src/main/sprintf.c:94
+#: src/main/sprintf.c:97
 #, c-format
 msgid "required resulting string length %d is greater than maximal %d"
 msgstr "wymagana długość %d wynikowego łańcucha jest większa niż maksymalna %d"
 
-# src/library/tools/src/getfmts.c: 66
-# error(_("'fmt' is not a character vector"))
-# src/main/sprintf.c: 102
-# error(_("'fmt' is not a character vector"))
-#: src/main/sprintf.c:102
+#: src/main/sprintf.c:105
 msgid "'fmt' is not a character vector"
 msgstr "'fmt' nie jest wektorem tekstowym"
 
-# src/library/tools/src/getfmts.c: 61
-# error(_("only %d arguments are allowed"), MAXNARGS)
-# src/main/sprintf.c: 107
-# error(_("only %d arguments are allowed"), MAXNARGS)
-#: src/main/sprintf.c:107
+#: src/main/sprintf.c:110
 #, c-format
 msgid "only %d arguments are allowed"
 msgstr "tylko %d argumentów jest dozwolonych"
 
-# src/main/sprintf.c: 114
-# error(_("invalid type of argument[%d]: '%s'"),
-# 		  i+1, CHAR(type2str(t_ai)))
-#: src/main/sprintf.c:114
+#: src/main/sprintf.c:117
 #, c-format
 msgid "invalid type of argument[%d]: '%s'"
 msgstr "niepoprawny typ argumentu[%d]: '%s'"
 
-# src/main/sprintf.c: 125
-# error(_("arguments cannot be recycled to the same length"))
-# src/main/sprintf.c: 128
-# error(_("arguments cannot be recycled to the same length"))
-#: src/main/sprintf.c:125 src/main/sprintf.c:128
+#: src/main/sprintf.c:128 src/main/sprintf.c:131
 msgid "arguments cannot be recycled to the same length"
 msgstr "argumenty nie mogą być cyklicznie powtórzone do tej samej długości"
 
-# src/library/tools/src/getfmts.c: 75
-# error(_("'fmt' length exceeds maximal format length %d"), MAXLINE)
-# src/main/sprintf.c: 150
-# error(_("'fmt' length exceeds maximal format length %d"), MAXLINE)
-# src/main/sprintf.c: 257
-# error(_("'fmt' length exceeds maximal format length %d"),
-# 				      MAXLINE)
-#: src/main/sprintf.c:150 src/main/sprintf.c:257
+#: src/main/sprintf.c:153 src/main/sprintf.c:260
 #, c-format
 msgid "'fmt' length exceeds maximal format length %d"
 msgstr "długość 'fmt' przekracza maksymalną długość %d formatu"
 
-# src/library/tools/src/getfmts.c: 96
-# error(_("unrecognised format specification '%s'"), curFormat)
-# src/main/sprintf.c: 169
-# error(_("unrecognised format specification '%s'"), curFormat)
-#: src/main/sprintf.c:169
+#: src/main/sprintf.c:172
 #, c-format
 msgid "unrecognised format specification '%s'"
 msgstr "nierozpoznane określenie formatu '%s'"
 
-# src/main/sprintf.c: 180
-# error(_("reference to non-existent argument %d"), v)
-# src/main/sprintf.c: 186
-# error(_("reference to non-existent argument %d"), v)
-# src/main/sprintf.c: 199
-# error(_("reference to non-existent argument %d"), v)
-# src/main/sprintf.c: 206
-# error(_("reference to non-existent argument %d"), v)
-#: src/main/sprintf.c:180 src/main/sprintf.c:186 src/main/sprintf.c:199
-#: src/main/sprintf.c:206
+#: src/main/sprintf.c:183 src/main/sprintf.c:189 src/main/sprintf.c:202
+#: src/main/sprintf.c:209
 #, c-format
 msgid "reference to non-existent argument %d"
 msgstr "referencja do nieistniejącego argumentu %d"
 
-# src/library/tools/src/getfmts.c: 136
-# error(_("at most one asterisk '*' is supported in each conversion specification"))
-# src/main/sprintf.c: 218
-# error(_("at most one asterisk '*' is supported in each conversion specification"))
-#: src/main/sprintf.c:218
+#: src/main/sprintf.c:221
 msgid "at most one asterisk '*' is supported in each conversion specification"
 msgstr ""
 "najwyżej jedna gwiazdka '*' jest wspierana w każdej specyfikacji konwersji"
 
-# src/main/sprintf.c: 228
-# error(_("argument for '*' conversion specification must be a number"))
-#: src/main/sprintf.c:228
+#: src/main/sprintf.c:231
 msgid "argument for '*' conversion specification must be a number"
 msgstr "argument dla specyfikacji konwersji '*' musi być liczbą"
 
-# src/main/sprintf.c: 266
-# error(_("coercion has changed vector length to 0"))
-#: src/main/sprintf.c:266
+#: src/main/sprintf.c:269
 msgid "coercion has changed vector length to 0"
 msgstr "konwersja zmieniła długość wektora na 0"
 
-# src/main/sprintf.c: 339
-# error(_("invalid format '%s'; %s"), fmtp,
-# 					  _("use format %d or %i for logical objects"))
-# src/main/sprintf.c: 353
-# error(_("invalid format '%s'; %s"), fmtp,
-# 					  _("use format %d, %i, %o, %x or %X for integer objects"))
-# src/main/sprintf.c: 367
-# error(_("invalid format '%s'; %s"), fmtp,
-# 					  _("use format %f, %e, %g or %a for numeric objects"))
-# src/main/sprintf.c: 402
-# error(_("invalid format '%s'; %s"), fmtp,
-# 				      _("use format %s for character objects"))
-#: src/main/sprintf.c:339 src/main/sprintf.c:353 src/main/sprintf.c:367
-#: src/main/sprintf.c:402
+#: src/main/sprintf.c:343 src/main/sprintf.c:357 src/main/sprintf.c:371
+#: src/main/sprintf.c:406
 #, c-format
 msgid "invalid format '%s'; %s"
 msgstr "niepoprawny format '%s'; %s"
 
-# src/main/sprintf.c: 339
-# error(_("invalid format '%s'; %s"), fmtp,
-# 					  _("use format %d or %i for logical objects"))
-#: src/main/sprintf.c:340
+#: src/main/sprintf.c:344
 #, c-format
 msgid "use format %d or %i for logical objects"
 msgstr "użyj formatu %d lub %i dla obiektów logicznych"
 
-# src/main/sprintf.c: 353
-# error(_("invalid format '%s'; %s"), fmtp,
-# 					  _("use format %d, %i, %o, %x or %X for integer objects"))
-#: src/main/sprintf.c:354
+#: src/main/sprintf.c:358
 #, c-format
 msgid "use format %d, %i, %o, %x or %X for integer objects"
 msgstr "użyj formatu %d, %i, %o, %x lub %X dla liczb całkowitych"
 
-# src/main/sprintf.c: 367
-# error(_("invalid format '%s'; %s"), fmtp,
-# 					  _("use format %f, %e, %g or %a for numeric objects"))
-#: src/main/sprintf.c:368
+#: src/main/sprintf.c:372
 #, c-format
 msgid "use format %f, %e, %g or %a for numeric objects"
 msgstr "użyj formatu %f, %e, %g lub %a dla liczb rzeczywistych"
 
-# src/main/sprintf.c: 402
-# error(_("invalid format '%s'; %s"), fmtp,
-# 				      _("use format %s for character objects"))
-#: src/main/sprintf.c:403
+#: src/main/sprintf.c:407
 #, c-format
 msgid "use format %s for character objects"
 msgstr "użyj formatu '%s' dla obiektu tekstowego"
 
-# src/main/sprintf.c: 408
-# warning(_("likely truncation of character string to %d characters"),
-# 					    MAXLINE-1)
-#: src/main/sprintf.c:408
+#: src/main/sprintf.c:412
 #, c-format
 msgid "likely truncation of character string to %d characters"
 msgstr "prawdopodobne przycięcie łańcucha tekstowego do %d znaków"
 
-# src/main/sprintf.c: 417
-# error(_("unsupported type"))
-# src/main/util.c: 2130
-# error("unsupported type ")
-#: src/main/sprintf.c:417
+#: src/main/sprintf.c:421
 msgid "unsupported type"
 msgstr "niewspierany typ"
 
-# src/main/startup.c: 65
-# error(_("R_LibraryFileName: buffer too small"))
 #: src/main/startup.c:65
 msgid "R_LibraryFileName: buffer too small"
 msgstr "'R_LibraryFileName': bufor jest zbyt mały"
 
-# src/main/subassign.c: 117
-# error(_("attempt to enlarge non-vector"))
-#: src/main/subassign.c:117
+#: src/main/subassign.c:118
 msgid "attempt to enlarge non-vector"
 msgstr "próba powiększenia nie-wektora"
 
-# src/main/subassign.c: 122
-# warning(_("assignment outside vector/list limits (extending from %d to %d)"),
-# 		len, newlen)
-#: src/main/subassign.c:122
+#: src/main/subassign.c:123
 #, c-format
 msgid "assignment outside vector/list limits (extending from %d to %d)"
 msgstr "przypisanie poza granicami wektora/listy (rozciąganie od %d do %d)"
 
-# src/main/subassign.c: 367
-# error(_("incompatible types (from %s to %s) in subassignment type fix"),
-# 	      type2char(which%100), type2char(which/100))
-#: src/main/subassign.c:367
+#: src/main/subassign.c:391
 #, c-format
 msgid "incompatible types (from %s to %s) in subassignment type fix"
 msgstr "niezgodne typy (z %s do %s) w przypisaniu w typie 'fix'"
 
-# src/main/subassign.c: 502
-# error(_("NAs are not allowed in subscripted assignments"))
-# src/main/subassign.c: 782
-# error(_("NAs are not allowed in subscripted assignments"))
-# src/main/subassign.c: 785
-# error(_("NAs are not allowed in subscripted assignments"))
-# src/main/subassign.c: 1076
-# error(_("NAs are not allowed in subscripted assignments"))
-#: src/main/subassign.c:502 src/main/subassign.c:782 src/main/subassign.c:785
-#: src/main/subassign.c:1076
+#: src/main/subassign.c:550 src/main/subassign.c:830 src/main/subassign.c:833
+#: src/main/subassign.c:1133
 msgid "NAs are not allowed in subscripted assignments"
 msgstr "wartości NA nie są dozwolone w przypisaniach indeksowych"
 
-# src/main/subassign.c: 520
-# error(_("replacement has length zero"))
-# src/main/subassign.c: 796
-# error(_("replacement has length zero"))
-# src/main/subassign.c: 1068
-# error(_("replacement has length zero"))
-# src/main/subassign.c: 1641
-# error(_("replacement has length zero"))
-#: src/main/subassign.c:520 src/main/subassign.c:796 src/main/subassign.c:1068
-#: src/main/subassign.c:1641
+#: src/main/subassign.c:568 src/main/subassign.c:844 src/main/subassign.c:1125
+#: src/main/subassign.c:1705
 msgid "replacement has length zero"
 msgstr "zamiana ma długość zero"
 
-# src/library/base/R/dataframe.R: 741
-# warning("number of items to replace is not a multiple of replacement length")
-# src/main/subassign.c: 522
-# warning(_("number of items to replace is not a multiple of replacement length"))
-# src/main/subassign.c: 798
-# error(_("number of items to replace is not a multiple of replacement length"))
-# src/main/subassign.c: 1070
-# error(_("number of items to replace is not a multiple of replacement length"))
-#: src/main/subassign.c:522 src/main/subassign.c:798 src/main/subassign.c:1070
+#: src/main/subassign.c:570 src/main/subassign.c:846 src/main/subassign.c:1127
 msgid "number of items to replace is not a multiple of replacement length"
 msgstr ""
 "liczba pozycji do zastąpienia nie jest wielokrotnością długości zamiany"
 
-# src/main/subassign.c: 766
-# error(_("incorrect number of subscripts on matrix"))
-#: src/main/subassign.c:766
+#: src/main/subassign.c:814
 msgid "incorrect number of subscripts on matrix"
 msgstr "niepoprawna liczba indeksów w macierzy"
 
-# src/main/subassign.c: 1022
-# error(_("incompatible types (from %s to %s) in matrix subset assignment"),
-# 		  type2char(which%100), type2char(which/100))
-#: src/main/subassign.c:1022
+#: src/main/subassign.c:1079
 #, c-format
 msgid "incompatible types (from %s to %s) in matrix subset assignment"
 msgstr "niezgodne typy (z %s do %s) w przypisaniu w podgrupie macierzy"
 
-# src/main/subset.c: 928
-#  _("incorrect number of subscripts")
-# src/main/subassign.c: 1038
-# error(_("incorrect number of subscripts"))
-#: src/main/subassign.c:1038 src/main/subset.c:928
+#: src/main/subassign.c:1095 src/main/subset.c:957
 msgid "incorrect number of subscripts"
 msgstr "niepoprawna liczba indeksów"
 
-# src/main/subassign.c: 1214
-# error(_("incompatible types (from %s to %s) in array subset assignment"),
-# 		  type2char(which%100), type2char(which/100))
-#: src/main/subassign.c:1214
+#: src/main/subassign.c:1272
 #, c-format
 msgid "incompatible types (from %s to %s) in array subset assignment"
 msgstr "niezgodne typy (z %s do %s) w przypisaniu w podgrupie tablicy"
 
-# src/main/subassign.c: 1249
-# error(_("invalid subscript in list assign"))
-# src/main/subassign.c: 1270
-# error(_("invalid subscript in list assign"))
-#: src/main/subassign.c:1249 src/main/subassign.c:1270
+#: src/main/subassign.c:1308 src/main/subassign.c:1329
 msgid "invalid subscript in list assign"
 msgstr "niepoprawny indeks w przypisaniu listy"
 
-# src/main/subassign.c: 1263
-# error(_("invalid number of subscripts to list assign"))
-#: src/main/subassign.c:1263
+#: src/main/subassign.c:1322
 msgid "invalid number of subscripts to list assign"
 msgstr "niepoprawna liczba indeksów w przypisaniu listy"
 
-# src/main/subassign.c: 1361
-# error(_("SubAssignArgs: invalid number of arguments"))
-#: src/main/subassign.c:1361
+#: src/main/subassign.c:1421
 msgid "SubAssignArgs: invalid number of arguments"
 msgstr "'SubAssignArgs': niepoprawna liczba argumentów"
 
-# src/main/subassign.c: 1506
-# error(_("result is zero-length and so cannot be a language object"))
-#: src/main/subassign.c:1506
+#: src/main/subassign.c:1566
 msgid "result is zero-length and so cannot be a language object"
 msgstr "wynik posiada zerową długość tak więc nie może być obiektem językowym"
 
-# src/main/subassign.c: 1611
-#  _("[[<- defined for objects of type \"S4\" only for subclasses of environment")
-#: src/main/subassign.c:1611
+#: src/main/subassign.c:1665
 msgid ""
 "[[<- defined for objects of type \"S4\" only for subclasses of environment"
 msgstr ""
 "[[<- zdefiniowane dla obiektów typu \"S4\" tylko dla podklas środowiska"
 
-# src/main/subassign.c: 1617
-# error(_("wrong args for environment subassignment"))
-#: src/main/subassign.c:1617
+#: src/main/subassign.c:1677
 msgid "wrong args for environment subassignment"
 msgstr "niepoprawne argumenty dla przypisania środowiska"
 
-# src/main/subassign.c: 1643
-# error(_("more elements supplied than there are to replace"))
-#: src/main/subassign.c:1643
+#: src/main/subassign.c:1707
 msgid "more elements supplied than there are to replace"
 msgstr "dostarczono więcej elementów niż jest do zastąpienia"
 
-# src/main/subassign.c: 1645
-# error(_("[[ ]] with missing subscript"))
-#: src/main/subassign.c:1645
+#: src/main/subassign.c:1709
 msgid "[[ ]] with missing subscript"
 msgstr "[[ ]] z brakującymi indeksami"
 
-# src/main/subassign.c: 1657
-# error(_("[[ ]] subscript out of bounds"))
-# src/main/subassign.c: 1675
-# error(_("[[ ]] subscript out of bounds"))
-#: src/main/subassign.c:1657 src/main/subassign.c:1675
+#: src/main/subassign.c:1727 src/main/subassign.c:1745
 msgid "[[ ]] subscript out of bounds"
 msgstr "[[ ]] indeks poza granicami"
 
-# src/main/subassign.c: 1663
-# error(_("[[ ]] improper number of subscripts"))
-# src/main/subassign.c: 1841
-# error(_("[[ ]] improper number of subscripts"))
-#: src/main/subassign.c:1663 src/main/subassign.c:1841
+#: src/main/subassign.c:1733 src/main/subassign.c:1914
 msgid "[[ ]] improper number of subscripts"
 msgstr "[[ ]] niepoprawna liczba indeksów"
 
-# src/main/subassign.c: 1808
-# error(_("incompatible types (from %s to %s) in [[ assignment"),
-# 		  type2char(which%100), type2char(which/100))
-#: src/main/subassign.c:1808
+#: src/main/subassign.c:1879
 #, c-format
 msgid "incompatible types (from %s to %s) in [[ assignment"
 msgstr "niezgodne typy (z %s do %s) w przypisaniu [["
 
-# src/main/subassign.c: 1852
-# error(_("[[ ]] subscript (%d) out of bounds"), i+1)
-#: src/main/subassign.c:1852
+#: src/main/subassign.c:1925
 #, c-format
 msgid "[[ ]] subscript (%d) out of bounds"
 msgstr "indeks [[ ]] (%d) poza granicami"
 
-# src/main/subscript.c: 143
-# error(_("invalid subscript type '%s'"), type2char(TYPEOF(s)))
-# src/main/subscript.c: 145
-#  _("invalid subscript type '%s'")
-# src/main/subscript.c: 274
-# error(_("invalid subscript type '%s'"), type2char(TYPEOF(s)))
-# src/main/subscript.c: 276
-#  _("invalid subscript type '%s'")
-# src/main/subscript.c: 826
-# error(_("invalid subscript type '%s'"), type2char(TYPEOF(s)))
-# src/main/subscript.c: 828
-#  _("invalid subscript type '%s'")
-# src/main/subscript.c: 919
-# error(_("invalid subscript type '%s'"), type2char(TYPEOF(s)))
-# src/main/subscript.c: 921
-#  _("invalid subscript type '%s'")
-# src/main/subassign.c: 1905
-# error(_("invalid subscript type '%s'"), type2char(TYPEOF(nlist)))
-#: src/main/subassign.c:1905 src/main/subscript.c:143 src/main/subscript.c:145
-#: src/main/subscript.c:274 src/main/subscript.c:276 src/main/subscript.c:826
-#: src/main/subscript.c:828 src/main/subscript.c:919 src/main/subscript.c:921
-#: src/main/subset.c:1109
+#: src/main/subassign.c:1986 src/main/subscript.c:151 src/main/subscript.c:278
+#: src/main/subscript.c:903 src/main/subscript.c:996 src/main/subset.c:1176
 #, c-format
 msgid "invalid subscript type '%s'"
 msgstr "niepoprawny typ '%s' indeksu"
 
-# src/main/subassign.c: 1950
-#  _("no method for assigning subsets of this S4 class")
-#: src/main/subassign.c:1950
+#: src/main/subassign.c:2037
 msgid "no method for assigning subsets of this S4 class"
 msgstr "brak metody do przypisywania podgrup tej klasy S4"
 
-# src/main/subassign.c: 2008
-# warning(_("Coercing LHS to a list"))
-#: src/main/subassign.c:2008
+#: src/main/subassign.c:2095
 msgid "Coercing LHS to a list"
 msgstr "Przekształcenie wyrażenia po lewej strony w listę"
 
-# src/main/subscript.c: 53
-#  _("attempt to select less than one element")
-# src/main/subscript.c: 75
-#  _("attempt to select less than one element")
-# src/main/subscript.c: 180
-#  _("attempt to select less than one element")
-# src/main/subscript.c: 204
-#  _("attempt to select less than one element")
-#: src/main/subscript.c:53 src/main/subscript.c:75 src/main/subscript.c:180
-#: src/main/subscript.c:204
-msgid "attempt to select less than one element"
-msgstr "próba wybrania mniej niż jednego elementu"
-
-# src/main/subscript.c: 57
-#  _("attempt to select more than one element")
-# src/main/subscript.c: 72
-#  _("attempt to select more than one element")
-# src/main/subscript.c: 178
-#  _("attempt to select more than one element")
-# src/main/subscript.c: 208
-#  _("attempt to select more than one element")
-# src/main/subscript.c: 304
-#  _("attempt to select more than one element")
-#: src/main/subscript.c:57 src/main/subscript.c:72 src/main/subscript.c:178
-#: src/main/subscript.c:208 src/main/subscript.c:304
-msgid "attempt to select more than one element"
-msgstr "próba wybrania więcej niż jednego elementu"
-
-# src/main/subscript.c: 184
-#  _("internal error in use of recursive indexing")
-#: src/main/subscript.c:184
+#: src/main/subscript.c:59 src/main/subscript.c:81 src/main/subscript.c:185
+#: src/main/subscript.c:209
+#, c-format
+msgid "attempt to select less than one element in %s"
+msgstr "próba wybrania mniej niż jednego elementu w %s"
+
+#: src/main/subscript.c:63 src/main/subscript.c:78 src/main/subscript.c:183
+#: src/main/subscript.c:213 src/main/subscript.c:305
+#, c-format
+msgid "attempt to select more than one element in %s"
+msgstr "próba wybrania więcej niż jednego elementu w %s"
+
+#: src/main/subscript.c:189
 msgid "internal error in use of recursive indexing"
 msgstr "wewnętrzny błąd w używaniu rekursywnego indeksowania"
 
-# src/main/subscript.c: 251
-# warningcall(R_NilValue,
-# 					    _("further partial match of '%s' to '%s'"),
-# 					    ss, cur_name)
-#: src/main/subscript.c:252
+#: src/main/subscript.c:257
 #, c-format
 msgid "further partial match of '%s' to '%s'"
 msgstr "dalsza częściowa zgodność '%s' z '%s'"
 
-#: src/main/subscript.c:302
+#: src/main/subscript.c:303
 #, c-format
 msgid "recursive indexing failed at level %d\n"
 msgstr "rekursywne indeksowanie nie powiodło się na poziomie %d\n"
 
-#: src/main/subscript.c:309
+#: src/main/subscript.c:313
 #, c-format
 msgid "no such index at level %d\n"
 msgstr "brak takiego indeksu na poziomie %d\n"
 
-# src/main/subscript.c: 352
-#  _("incorrect number of columns in matrix subscript")
-#: src/main/subscript.c:352
+#: src/main/subscript.c:360
 msgid "incorrect number of columns in matrix subscript"
 msgstr "niepoprawna liczba kolumn w indeksie macierzy"
 
-# src/main/subscript.c: 371
-#  _("negative values are not allowed in a matrix subscript")
-# src/main/subscript.c: 389
-#  _("negative values are not allowed in a matrix subscript")
-# src/main/subscript.c: 413
-#  _("negative values are not allowed in a matrix subscript")
-#: src/main/subscript.c:371 src/main/subscript.c:389 src/main/subscript.c:413
+#: src/main/subscript.c:379 src/main/subscript.c:397 src/main/subscript.c:421
 msgid "negative values are not allowed in a matrix subscript"
 msgstr "ujemne wartości nie są dozwolone w indeksie macierzy"
 
-# src/main/subscript.c: 492
-#  _("(subscript) logical subscript too long")
-#: src/main/subscript.c:492
+#: src/main/subscript.c:500
 msgid "(subscript) logical subscript too long"
 msgstr "(indeks) logiczny indeks jest zbyt długi"
 
-# src/main/subscript.c: 590
-#  _("only 0's may be mixed with negative subscripts")
-# src/main/subscript.c: 645
-#  _("only 0's may be mixed with negative subscripts")
-#: src/main/subscript.c:590 src/main/subscript.c:645
+#: src/main/subscript.c:668 src/main/subscript.c:723
 msgid "only 0's may be mixed with negative subscripts"
 msgstr "tylko zera mogą być mieszane z ujemnymi indeksami"
 
-# src/main/subscript.c: 618
-#  _("subscript too large for 32-bit R")
-#: src/main/subscript.c:618
+#: src/main/subscript.c:696
 msgid "subscript too large for 32-bit R"
 msgstr "indeks jest zbyt duży dla R w wersji 32-bitowej"
 
-# src/main/subscript.c: 817
-#  _("no 'dimnames' attribute for array")
-#: src/main/subscript.c:817
+#: src/main/subscript.c:895
 msgid "no 'dimnames' attribute for array"
 msgstr "brak atrybutu 'dimnames' dla tablicy"
 
-# src/main/subscript.c: 857
-#  _("subscripting on non-vector")
-#: src/main/subscript.c:857
+#: src/main/subscript.c:931
 msgid "subscripting on non-vector"
 msgstr "indeksowanie na nie-wektorze"
 
-# src/main/subset.c: 261
-# error(_("dimensions would exceed maximum size of array"))
-#: src/main/subset.c:261
+#: src/main/subset.c:260
 msgid "dimensions would exceed maximum size of array"
 msgstr "wymiary przekroczyłyby maksymalny rozmiar tablicy"
 
-# src/main/subset.c: 304
-#  _("matrix subscripting not handled for this type")
-# src/main/subset.c: 333
-#  _("matrix subscripting not handled for this type")
-#: src/main/subset.c:304 src/main/subset.c:333
+#: src/main/subset.c:304 src/main/subset.c:334
 msgid "matrix subscripting not handled for this type"
 msgstr "indeksowanie macierzy nie jest obsługiwane dla tego typu"
 
-# src/main/subset.c: 488
-#  _("array subscripting not handled for this type")
-#: src/main/subset.c:488
+#: src/main/subset.c:493
 msgid "array subscripting not handled for this type"
 msgstr "indeksowanie tablic nie jest obsługiwane dla tego typu"
 
-# src/main/subset.c: 827
-#  _("incorrect number of dimensions")
-#: src/main/subset.c:827
+#: src/main/subset.c:856
 msgid "incorrect number of dimensions"
 msgstr "niepoprawna liczba wymiarów"
 
-# src/main/subset.c: 924
-#  _("no index specified")
-#: src/main/subset.c:924
+#: src/main/subset.c:953
 msgid "no index specified"
 msgstr "nie określono indeksu"
 
-# src/main/subset.c: 934
-#  _("this S4 class is not subsettable")
-#: src/main/subset.c:934
+#: src/main/subset.c:963
 msgid "this S4 class is not subsettable"
 msgstr "ta klasa S4 nie jest podstawialna"
 
-# src/main/subset.c: 940
-#  _("wrong arguments for subsetting an environment")
-#: src/main/subset.c:940
+#: src/main/subset.c:970
 msgid "wrong arguments for subsetting an environment"
 msgstr "nieprawidłowe argumenty do podstawienia w środowisku"
 
-# src/library/stats/src/complete_cases.c: 26
-# 	_("invalid 'type' (%s) of argument")
-# src/main/summary.c: 30
-# 	_("invalid 'type' (%s) of argument")
-#: src/main/summary.c:30
+#: src/main/summary.c:33
 #, c-format
 msgid "invalid 'type' (%s) of argument"
 msgstr "niepoprawny 'type' (%s) argumentu"
 
-# src/main/summary.c: 66
-# warningcall(call, _("integer overflow - use sum(as.numeric(.))"))
-# src/main/summary.c: 78
-# warningcall(call, _("integer overflow - use sum(as.numeric(.))"))
-# src/main/summary.c: 103
-# warningcall(call, _("integer overflow - use sum(as.numeric(.))"))
-#: src/main/summary.c:66 src/main/summary.c:78 src/main/summary.c:103
+#: src/main/summary.c:69 src/main/summary.c:81 src/main/summary.c:106
 msgid "integer overflow - use sum(as.numeric(.))"
 msgstr "przepełnienie całkowitoliczbowe - użyj 'sum(as.numeric(.))'"
 
-# src/main/summary.c: 522
-#  _("internal error ('op = %d' in do_summary).\t Call a Guru")
-#: src/main/summary.c:522
+#: src/main/summary.c:526
 #, c-format
 msgid "internal error ('op = %d' in do_summary).\t Call a Guru"
 msgstr "wewnętrzny błąd ('op = %d' w 'do_summary').\t Wezwij Guru"
 
-# src/main/summary.c: 623
-# warningcall(call,_("Integer overflow - use sum(as.numeric(.))"))
-#: src/main/summary.c:623
+#: src/main/summary.c:637
 msgid "Integer overflow - use sum(as.numeric(.))"
 msgstr "Przepełnienie całkowitoliczbowe - użyj 'sum(as.numeric(.))'"
 
-# src/main/summary.c: 731
-# warningcall(call, _("no non-missing arguments, returning NA"))
-#: src/main/summary.c:731
+#: src/main/summary.c:750
 msgid "no non-missing arguments, returning NA"
 msgstr "brak argumentów; zwracanie wartości NA"
 
-# src/main/summary.c: 734
-# warningcall(call, _("no non-missing arguments to min; returning Inf"))
-#: src/main/summary.c:734
+#: src/main/summary.c:753
 msgid "no non-missing arguments to min; returning Inf"
 msgstr "brak argumentów w min; zwracanie wartości Inf"
 
-# src/main/summary.c: 736
-# warningcall(call, _("no non-missing arguments to max; returning -Inf"))
-#: src/main/summary.c:736
+#: src/main/summary.c:755
 msgid "no non-missing arguments to max; returning -Inf"
 msgstr "brak argumentów w max; zwracanie wartości -Inf"
 
-# src/library/stats/src/fourier.c: 66
-# error(_("non-numeric argument"))
-# src/library/stats/src/fourier.c: 161
-# error(_("non-numeric argument"))
-# src/main/summary.c: 801
-# error(_("non-numeric argument"))
-#: src/main/summary.c:801
-msgid "non-numeric argument"
-msgstr "argument nieliczbowy"
-
-# src/main/summary.c: 845
-# error(_("argument to 'which' is not logical"))
-#: src/main/summary.c:845
+#: src/main/summary.c:913
 msgid "argument to 'which' is not logical"
 msgstr "argument przekazany do 'which' nie jest argumentem logicznym"
 
-# src/library/base/R/pmax.R: 25
-# stop("no arguments")
-# src/library/base/R/pmax.R: 63
-# stop("no arguments")
-# src/main/summary.c: 889
-# error(_("no arguments"))
-#: src/main/summary.c:889
+#: src/main/summary.c:957
 msgid "no arguments"
 msgstr "brak argumentów"
 
-# src/main/summary.c: 900
-# error(_("invalid input type"))
-# src/main/summary.c: 917
-# error(_("invalid input type"))
-#: src/main/summary.c:900 src/main/summary.c:917
+#: src/main/summary.c:968 src/main/summary.c:985
 msgid "invalid input type"
 msgstr "niepoprawny typ wejściowy"
 
-# src/library/base/R/pmax.R: 38
-# warning("an argument will be fractionally recycled")
-# src/library/base/R/pmax.R: 42
-# warning("an argument will be fractionally recycled")
-# src/library/base/R/pmax.R: 75
-# warning("an argument will be fractionally recycled")
-# src/library/base/R/pmax.R: 79
-# warning("an argument will be fractionally recycled")
-# src/main/summary.c: 934
-# warning(_("an argument will be fractionally recycled"))
-#: src/main/summary.c:934
+#: src/main/summary.c:1002
 msgid "an argument will be fractionally recycled"
 msgstr "argument zostanie częściowo powtórzony"
 
-# src/main/sysutils.c: 69
-# error(_("cannot determine file modification time of '%s'"), path)
-# src/main/sysutils.c: 83
-# error(_("cannot determine file modification time of '%s'"), path)
-#: src/main/sysutils.c:69 src/main/sysutils.c:83
+#: src/main/sysutils.c:68 src/main/sysutils.c:82
 #, c-format
 msgid "cannot determine file modification time of '%s'"
 msgstr "nie można określić czasu modyfikacji pliku '%s'"
 
-# src/main/sysutils.c: 167
-# error(_("encoding of a filename cannot be 'bytes'"))
-#: src/main/sysutils.c:167
+#: src/main/sysutils.c:166
 msgid "encoding of a filename cannot be 'bytes'"
 msgstr "strona kodowa nazwy pliku nie może być ustawiona na 'bytes'"
 
-# src/main/sysutils.c: 170
-# error(_("unsupported conversion from '%s' in codepage %d"), 
-# 	      from, localeCP)
-# src/main/sysutils.c: 803
-# error(_("unsupported conversion from '%s' in codepage %d"),
-# 		      "latin1", localeCP)
-# src/main/sysutils.c: 818
-# error(_("unsupported conversion from '%s' in codepage %d"),
-# 		      "latin1", localeCP)
-# src/main/sysutils.c: 909
-# error(_("unsupported conversion from '%s' in codepage %d"),
-# 		      "latin1", localeCP)
-# src/main/sysutils.c: 924
-# error(_("unsupported conversion from '%s' in codepage %d"),
-# 		      "latin1", localeCP)
-# src/main/sysutils.c: 1020
-# error(_("unsupported conversion from '%s' in codepage %d"),
-# 	      "latin1", localeCP)
-#: src/main/sysutils.c:170 src/main/sysutils.c:803 src/main/sysutils.c:818
-#: src/main/sysutils.c:909 src/main/sysutils.c:924 src/main/sysutils.c:1020
+#: src/main/sysutils.c:169 src/main/sysutils.c:831 src/main/sysutils.c:846
+#: src/main/sysutils.c:975
 #, c-format
 msgid "unsupported conversion from '%s' in codepage %d"
 msgstr "niewspierana konwersja z '%s' w stronie kodowej '%d'"
 
-# src/main/sysutils.c: 179
-# error(_("file name conversion problem -- name too long?"))
-#: src/main/sysutils.c:179
+#: src/main/sysutils.c:178
 msgid "file name conversion problem -- name too long?"
 msgstr "problem konwersji nazwy pliku -- nazwa jest zbyt długa?"
 
-# src/main/sysutils.c: 180
-# error(_("file name conversion problem"))
-#: src/main/sysutils.c:180
+#: src/main/sysutils.c:179
 msgid "file name conversion problem"
 msgstr "problem z konwersją nazwy pliku"
 
-# src/main/sysutils.c: 249
-# error(_("invalid filename pattern"))
-#: src/main/sysutils.c:249
+#: src/main/sysutils.c:248
 msgid "invalid filename pattern"
 msgstr "niepoprawny wzorzec nazwy pliku"
 
-# src/main/sysutils.c: 253
-# error(_("invalid file extension"))
-#: src/main/sysutils.c:253
+#: src/main/sysutils.c:252
 msgid "invalid file extension"
 msgstr "niepoprawne rozszerzenie pliku"
 
-# src/main/sysutils.c: 255
-# error(_("no 'pattern'"))
-#: src/main/sysutils.c:255
+#: src/main/sysutils.c:254
 msgid "no 'pattern'"
 msgstr "brak 'pattern'"
 
-# src/main/sysutils.c: 257
-# error(_("no 'tempdir'"))
-#: src/main/sysutils.c:257
+#: src/main/sysutils.c:256
 msgid "no 'tempdir'"
 msgstr "brak 'tempdir'"
 
-# src/main/sysutils.c: 259
-# error(_("no 'fileext'"))
-#: src/main/sysutils.c:259
+#: src/main/sysutils.c:258
 msgid "no 'fileext'"
 msgstr "brak 'fileext'"
 
-# src/main/sysutils.c: 345
-# error(_("wrong type for argument"))
-# src/main/sysutils.c: 348
-# error(_("wrong type for argument"))
-# src/main/sysutils.c: 439
-# error(_("wrong type for argument"))
-# src/main/sysutils.c: 441
-# error(_("wrong type for argument"))
-# src/main/sysutils.c: 477
-# error(_("wrong type for argument"))
-#: src/main/sysutils.c:345 src/main/sysutils.c:348 src/main/sysutils.c:439
-#: src/main/sysutils.c:441 src/main/sysutils.c:477
+#: src/main/sysutils.c:328
+#, c-format
+msgid "system call failed: %s"
+msgstr "wywołanie systemowe powiodło się: %s"
+
+#: src/main/sysutils.c:357 src/main/sysutils.c:360 src/main/sysutils.c:451
+#: src/main/sysutils.c:453 src/main/sysutils.c:489
 msgid "wrong type for argument"
 msgstr "błędny typ argumentu"
 
-# src/main/sysutils.c: 443
-# error(_("wrong length for argument"))
-#: src/main/sysutils.c:443
+#: src/main/sysutils.c:455
 msgid "wrong length for argument"
 msgstr "błędna długość argumentu"
 
-# src/main/sysutils.c: 464
-# error(_("'Sys.setenv' is not available on this system"))
-#: src/main/sysutils.c:464
+#: src/main/sysutils.c:476
 msgid "'Sys.setenv' is not available on this system"
 msgstr "'Sys.setenv' nie jest dostępne w tym systemie"
 
-# src/main/sysutils.c: 508
-# warning(_("this system cannot unset environment variables: setting to \"\""))
-#: src/main/sysutils.c:508
+#: src/main/sysutils.c:520
 msgid "this system cannot unset environment variables: setting to \"\""
 msgstr ""
 "ten system nie może usunąć ustawienia zmiennych środowiskowych: ustawianie "
 "na \"\""
 
-# src/main/sysutils.c: 519
-# warning(_("'Sys.unsetenv' is not available on this system"))
-#: src/main/sysutils.c:519
+#: src/main/sysutils.c:531
 msgid "'Sys.unsetenv' is not available on this system"
 msgstr "'Sys.unsetenv' nie jest dostępny na tym systemie"
 
-# src/main/sysutils.c: 616
-# error(_("unsupported conversion from '%s' to '%s' in codepage %d"), 
-# 		  from, to, localeCP)
-#: src/main/sysutils.c:616
+#: src/main/sysutils.c:628
 #, c-format
 msgid "unsupported conversion from '%s' to '%s' in codepage %d"
 msgstr "niewspierana konwersja z '%s' do '%s' w stronie kodowej %d"
 
-# src/main/sysutils.c: 631
-# error(_("'x' must be a character vector"))
-#: src/main/sysutils.c:631
+#: src/main/sysutils.c:643
 msgid "'x' must be a character vector"
 msgstr "'x' musi być wektorem tekstowym"
 
-# src/main/sysutils.c: 646
-# error(_("'x' must be a list of NULL or raw vectors"))
-#: src/main/sysutils.c:646
-msgid "'x' must be a list of NULL or raw vectors"
-msgstr "argument 'x' musi być listą z wartościami NULL lub pustymi wektorami"
-
-# src/main/sysutils.c: 724
-# error(_("'%s' must be called on a CHARSXP"), "getCharCE")
-# src/main/sysutils.c: 789
-# error(_("'%s' must be called on a CHARSXP"), "translateChar")
-# src/main/sysutils.c: 895
-# error(_("'%s' must be called on a CHARSXP"), "translateChar")
-# src/main/sysutils.c: 994
-# error(_("'%s' must be called on a CHARSXP"), "translateChar0")
-# src/main/sysutils.c: 1010
-# error(_("'%s' must be called on a CHARSXP"), "translateCharUTF8")
-# src/main/sysutils.c: 1087
-# error(_("'%s' must be called on a CHARSXP"), "wtransChar")
-#: src/main/sysutils.c:724 src/main/sysutils.c:789 src/main/sysutils.c:895
-#: src/main/sysutils.c:994 src/main/sysutils.c:1010 src/main/sysutils.c:1087
+#: src/main/sysutils.c:658
+msgid "'x' must be a character vector or a list of NULL or raw vectors"
+msgstr ""
+"argument 'x' musi być wektorem tekstowym lub listą z wartościami NULL lub "
+"pustymi wektorami"
+
+#: src/main/sysutils.c:736 src/main/sysutils.c:914 src/main/sysutils.c:932
+#: src/main/sysutils.c:949 src/main/sysutils.c:965 src/main/sysutils.c:1042
 #, c-format
 msgid "'%s' must be called on a CHARSXP"
 msgstr "'%s' musi być wywołany w 'CHARSXP'"
 
-# src/main/sysutils.c: 792
-# error(_("translating strings with \"bytes\" encoding is not allowed"))
-# src/main/sysutils.c: 898
-# error(_("translating strings with \"bytes\" encoding is not allowed"))
-# src/main/sysutils.c: 1015
-# error(_("translating strings with \"bytes\" encoding is not allowed"))
-# src/main/sysutils.c: 1090
-# error(_("translating strings with \"bytes\" encoding is not allowed"))
-#: src/main/sysutils.c:792 src/main/sysutils.c:898 src/main/sysutils.c:1015
-#: src/main/sysutils.c:1090
+#: src/main/sysutils.c:805 src/main/sysutils.c:970 src/main/sysutils.c:1045
 msgid "translating strings with \"bytes\" encoding is not allowed"
 msgstr ""
 "tłumaczenie łańcuchów tekstowych ze stroną kodową \"bytes\" nie jest "
 "dozwolone"
 
-# src/main/sysutils.c: 1116
-# error(_("unsupported conversion to '%s' from codepage %d"),
-# 		  TO_WCHAR, localeCP)
-#: src/main/sysutils.c:1116
+#: src/main/sysutils.c:818
+msgid "internal error: no translation needed"
+msgstr "błąd wewnętrzny: translacja nie jest konieczna"
+
+#: src/main/sysutils.c:1071
 #, c-format
 msgid "unsupported conversion to '%s' from codepage %d"
 msgstr "niewspierana konwersja do '%s' ze strony kodowej %d"
 
-# src/main/sysutils.c: 1530
-# error(_("invalid Unicode point %u"), wc)
-#: src/main/sysutils.c:1530
+#: src/main/sysutils.c:1486
 #, c-format
 msgid "invalid Unicode point %u"
 msgstr "niepoprawny punkt Unicode %u"
 
-# src/main/sysutils.c: 1632
-# (_("cannot create 'R_TempDir'"))
-#: src/main/sysutils.c:1632
+#: src/main/sysutils.c:1588
 msgid "cannot create 'R_TempDir'"
 msgstr "nie można utworzyć 'R_TempDir'"
 
-# src/main/sysutils.c: 1636
-#  _("unable to set R_SESSION_TMPDIR")
-# src/main/sysutils.c: 1644
-#  _("unable to set R_SESSION_TMPDIR")
-# src/main/sysutils.c: 1647
-#  _("unable to set R_SESSION_TMPDIR")
-#: src/main/sysutils.c:1636 src/main/sysutils.c:1644 src/main/sysutils.c:1647
+#: src/main/sysutils.c:1592 src/main/sysutils.c:1600 src/main/sysutils.c:1603
 msgid "unable to set R_SESSION_TMPDIR"
 msgstr "nie można ustawić R_SESSION_TMPDIR"
 
-# src/main/sysutils.c: 1656
-# (_("cannot allocate 'R_TempDir'"))
-#: src/main/sysutils.c:1656
+#: src/main/sysutils.c:1612
 msgid "cannot allocate 'R_TempDir'"
 msgstr "nie można przydzielić 'R_TempDir'"
 
-# src/main/sysutils.c: 1693
-# error(_("temporary name too long"))
-#: src/main/sysutils.c:1693
+#: src/main/sysutils.c:1649
 msgid "temporary name too long"
 msgstr "nazwa tymczasowa jest zbyt długa"
 
-# src/main/sysutils.c: 1708
-# error(_("cannot find unused tempfile name"))
-#: src/main/sysutils.c:1708
+#: src/main/sysutils.c:1664
 msgid "cannot find unused tempfile name"
 msgstr "nie można znaleźć nieużytej nazwy tymczasowego pliku"
 
-# src/main/sysutils.c: 1711
-# error(_("allocation failed in R_tmpnam2"))
-#: src/main/sysutils.c:1711
+#: src/main/sysutils.c:1667
 msgid "allocation failed in R_tmpnam2"
 msgstr "przydział w 'R_tmpnam2' nie powiódł się"
 
-# src/main/sysutils.c: 1838
-# error(_("'dirmark = TRUE' is not supported on this platform"))
-#: src/main/sysutils.c:1838
+#: src/main/sysutils.c:1794
 msgid "'dirmark = TRUE' is not supported on this platform"
 msgstr "'dirmarke = TRUE' nie jest wspierany na tej platformie"
 
-# src/main/unique.c: 321
-# error(_("length %d is too large for hashing"), n)
-# src/main/unique.c: 324
-# error(_("length %d is too large for hashing"), n)
 #: src/main/unique.c:321 src/main/unique.c:324
 #, c-format
 msgid "length %d is too large for hashing"
 msgstr "długość %d jest zbyt duża do haszowania"
 
-# src/main/unique.c: 490
-# error(_("'duplicated' applies only to vectors"))
-# src/main/unique.c: 519
-# error(_("'duplicated' applies only to vectors"))
-# src/main/unique.c: 549
-# error(_("'duplicated' applies only to vectors"))
-# src/main/unique.c: 575
-# error(_("'duplicated' applies only to vectors"))
-# src/main/unique.c: 614
-# error(_("'duplicated' applies only to vectors"))
 #: src/main/unique.c:490 src/main/unique.c:519 src/main/unique.c:549
-#: src/main/unique.c:575 src/main/unique.c:614
+#: src/main/unique.c:573 src/main/unique.c:612
 msgid "'duplicated' applies only to vectors"
 msgstr "'duplicated' stosuje się tylko do wektorów"
 
-# src/main/unique.c: 619
-# error(_("any_duplicated3(., <0-length incomp>)"))
-#: src/main/unique.c:619
+#: src/main/unique.c:617
 msgid "any_duplicated3(., <0-length incomp>)"
 msgstr "any_duplicated3(., <0-length incomp>)"
 
-# src/main/unique.c: 669
-# error(_("'fromLast' must be length 1"))
-#: src/main/unique.c:669
+#: src/main/unique.c:667
 msgid "'fromLast' must be length 1"
 msgstr "'fromLast' musi mieć długość 1"
 
-# src/main/unique.c: 672
-# error(_("'fromLast' must be TRUE or FALSE"))
-#: src/main/unique.c:672
+#: src/main/unique.c:670
 msgid "'fromLast' must be TRUE or FALSE"
 msgstr "'fromLast' musi być TRUE lub FALSE"
 
-# src/main/unique.c: 683
-# error(_("%s() applies only to vectors"),
-# 	      (PRIMVAL(op) == 0 ? "duplicated" :
-# 	       (PRIMVAL(op) == 1 ? "unique" : /* 2 */ "anyDuplicated")))
-#: src/main/unique.c:683
+#: src/main/unique.c:681
 #, c-format
 msgid "%s() applies only to vectors"
 msgstr "funkcja '%s()' ma zastosowanie jedynie do wektorów"
 
-# src/main/unique.c: 690
-# error(_("'nmax' must be positive"))
-#: src/main/unique.c:690
+#: src/main/unique.c:688
 msgid "'nmax' must be positive"
 msgstr "'nmax' musi być dodatnie"
 
-# src/main/unique.c: 922
-# error(_("'match' requires vector arguments"))
-#: src/main/unique.c:922
+#: src/main/unique.c:985
 msgid "'match' requires vector arguments"
 msgstr "'match' wymaga wektorów jako argumentów"
 
-# src/main/unique.c: 970
-# error(_("argument is not of mode character"))
-# src/main/unique.c: 1125
-# error(_("argument is not of mode character"))
-#: src/main/unique.c:970 src/main/unique.c:1125
+#: src/main/unique.c:1033 src/main/unique.c:1171
 msgid "argument is not of mode character"
 msgstr "argument nie jest trybem tekstowym"
 
-# src/main/unique.c: 1251
-# error(_("... used in a situation where it does not exist"))
-#: src/main/unique.c:1251
+#: src/main/unique.c:1296
 msgid "... used in a situation where it does not exist"
 msgstr "... użyte w sytuacji w której nie istnieje"
 
-# src/main/unique.c: 1342
-# error(_("unable to find a closure from within which 'match.call' was called"))
-#: src/main/unique.c:1342
-msgid "unable to find a closure from within which 'match.call' was called"
-msgstr ""
-"nie można znaleźć zamknięcia z wewnątrz którego 'match.call' zostało wywołane"
+#: src/main/unique.c:1302
+msgid "... is not a pairlist"
+msgstr "wartość w '...' nie jest obiektem klasy \"pairlist\""
 
-# src/main/unique.c: 1536
-# error(_("non-numeric data frame in rowsum"))
-#: src/main/unique.c:1536
+#: src/main/unique.c:1531
 msgid "non-numeric data frame in rowsum"
 msgstr "nieliczbowa ramka w 'rowsum()'"
 
-# src/main/unique.c: 1568
-# error(_("this cannot happen"))
-#: src/main/unique.c:1568
+#: src/main/unique.c:1563
 msgid "this cannot happen"
 msgstr "to nie może się stać"
 
-# src/main/unique.c: 1639
-# error(_("'names' must be a character vector"))
-#: src/main/unique.c:1639
+#: src/main/unique.c:1634
 msgid "'names' must be a character vector"
 msgstr "'names' musi być wektorem tekstowym"
 
-# src/library/stats/R/reshape.R: 31
-# stop("'sep' must be a character string")
-# src/main/unique.c: 1643
-# error(_("'sep' must be a character string"))
-#: src/main/unique.c:1643
-msgid "'sep' must be a character string"
-msgstr "'sep' musi być łańcuchem tekstowym"
-
-# src/main/util.c: 88
-# error(_("object is not a matrix"))
-# src/main/util.c: 106
-# error(_("object is not a matrix"))
-#: src/main/util.c:88 src/main/util.c:106
+#: src/main/util.c:87 src/main/util.c:105
 msgid "object is not a matrix"
 msgstr "obiekt nie jest macierzą"
 
-# src/main/util.c: 254
-# error(_("type %d is unimplemented in '%s'"), t, "type2str")
-# src/main/util.c: 266
-# error(_("type %d is unimplemented in '%s'"), t, "type2char")
-# src/main/util.c: 281
-# error(_("type %d is unimplemented in '%s'"), t, "type2symbol")
-#: src/main/util.c:254 src/main/util.c:268 src/main/util.c:285
+#: src/main/util.c:303 src/main/util.c:315 src/main/util.c:326
+#: src/main/util.c:341
 #, c-format
 msgid "type %d is unimplemented in '%s'"
 msgstr "niezaimplementowany typ %d w '%s'"
 
-#: src/main/util.c:297
+#: src/main/util.c:352
 #, c-format
 msgid "unimplemented type '%s' in '%s'\n"
 msgstr "niezaimplementowany typ '%s' w '%s'\n"
 
-#: src/main/util.c:299
+#: src/main/util.c:354
 #, c-format
 msgid "unimplemented type (%d) in '%s'\n"
 msgstr "niezaimplementowany typ (%d) w '%s'\n"
 
-# src/main/util.c: 420
-# error(_("invalid tag in name extraction"))
-#: src/main/util.c:424
+#: src/main/util.c:479
 msgid "invalid tag in name extraction"
 msgstr "niepoprawna etykieta w ekstrakcji nazwy"
 
-# src/main/util.c: 430
-# error(ngettext("%d argument passed to .Internal(%s) which requires %d",
-# 		     "%d arguments passed to .Internal(%s) which requires %d",
-# 			   (unsigned long) length(args)),
-# 		  length(args), PRIMNAME(op), PRIMARITY(op))
-#: src/main/util.c:434
+#: src/main/util.c:489
 #, c-format
 msgid "%d argument passed to .Internal(%s) which requires %d"
 msgid_plural "%d arguments passed to .Internal(%s) which requires %d"
@@ -12038,11 +6347,7 @@ msgstr[0] "%d argument przekazano do '.Internal(%s)' który wymaga %d"
 msgstr[1] "%d argumenty przekazano do '.Internal(%s)' który wymaga %d"
 msgstr[2] "%d argumentów przekazano do '.Internal(%s)' który wymaga %d"
 
-# src/main/util.c: 436
-# ngettext("%d argument passed to '%s' which requires %d",
-# 			       "%d arguments passed to '%s' which requires %d",
-# 			       (unsigned long) length(args))
-#: src/main/util.c:440
+#: src/main/util.c:495
 #, c-format
 msgid "%d argument passed to '%s' which requires %d"
 msgid_plural "%d arguments passed to '%s' which requires %d"
@@ -12050,176 +6355,111 @@ msgstr[0] "%d argument przekazano do funkcji '%s', która wymaga %d"
 msgstr[1] "%d argumenty przekazano do funkcji '%s', która wymaga %d"
 msgstr[2] "%d argumentów przekazano do funkcji '%s', która wymaga %d"
 
-# src/main/util.c: 451
-#  _("supplied argument name '%s' does not match '%s'")
-#: src/main/util.c:455
+#: src/main/util.c:510
 #, c-format
 msgid "supplied argument name '%s' does not match '%s'"
 msgstr "dostarczona nazwa '%s' argumentu nie pasuje do '%s'"
 
-# src/main/util.c: 461
-# error(_("'nthcdr' list shorter than %d"), n)
-#: src/main/util.c:465
+#: src/main/util.c:520
 #, c-format
 msgid "'nthcdr' list shorter than %d"
 msgstr "lista 'nthcdr' jest krótsza niż %d"
 
-# src/main/util.c: 466
-# error(_("'nthcdr' needs a list to CDR down"))
-#: src/main/util.c:470
+#: src/main/util.c:525
 msgid "'nthcdr' needs a list to CDR down"
 msgstr "'nthcdr' potrzebuje listy aby prześledzić w dół listy elementów"
 
-# src/main/util.c: 582
-# error(_("'all.x' must be TRUE or FALSE"))
-#: src/main/util.c:586
+#: src/main/util.c:641
 msgid "'all.x' must be TRUE or FALSE"
 msgstr "'all.x' musi być TRUE lub FALSE"
 
-# src/main/util.c: 584
-# error(_("'all.y' must be TRUE or FALSE"))
-#: src/main/util.c:588
+#: src/main/util.c:643
 msgid "'all.y' must be TRUE or FALSE"
 msgstr "'all.y' musi być TRUE lub FALSE"
 
-# src/main/util.c: 696
-# error(_("missing value is invalid"))
-#: src/main/util.c:700
+#: src/main/util.c:672
+msgid "number of rows in the result exceeds maximum vector length"
+msgstr "liczba wierszy wyniku przekracza maksymalną długość wektora"
+
+#: src/main/util.c:764
 msgid "missing value is invalid"
 msgstr "brakująca wartość jest niepoprawna"
 
-# src/main/util.c: 705
-# error(_("cannot change working directory"))
-# src/main/util.c: 712
-# error(_("cannot change working directory"))
-#: src/main/util.c:709 src/main/util.c:716
+#: src/main/util.c:773 src/main/util.c:780
 msgid "cannot change working directory"
 msgstr "nie można zmienić katalogu roboczego"
 
-# src/main/util.c: 731
-# error(_("a character vector argument expected"))
-# src/main/util.c: 765
-# error(_("a character vector argument expected"))
-# src/main/util.c: 806
-# error(_("a character vector argument expected"))
-# src/main/util.c: 848
-# error(_("a character vector argument expected"))
-# src/main/util.c: 977
-# error(_("a character vector argument expected"))
-# src/main/util.c: 1036
-# error(_("a character vector argument expected"))
-# src/main/util.c: 1059
-# error(_("a character vector argument expected"))
-#: src/main/util.c:735 src/main/util.c:769 src/main/util.c:810
-#: src/main/util.c:852 src/main/util.c:981 src/main/util.c:1040
-#: src/main/util.c:1063
+#: src/main/util.c:800 src/main/util.c:834 src/main/util.c:875
+#: src/main/util.c:917 src/main/util.c:1046 src/main/util.c:1105
+#: src/main/util.c:1128
 msgid "a character vector argument expected"
 msgstr "oczekiwano wektora tekstowego jako argumentu"
 
-# src/main/util.c: 738
-# error(_("path too long"))
-# src/main/util.c: 773
-# error(_("path too long"))
-# src/main/util.c: 815
-# error(_("path too long"))
-# src/main/util.c: 856
-# error(_("path too long"))
-#: src/main/util.c:742 src/main/util.c:777 src/main/util.c:819
-#: src/main/util.c:860
+#: src/main/util.c:807 src/main/util.c:842 src/main/util.c:884
+#: src/main/util.c:925
 msgid "path too long"
 msgstr "ścieżka jest zbyt długa"
 
-# src/main/util.c: 991
-# warning(_("only the first character of 'quote' will be used"))
-#: src/main/util.c:995
+#: src/main/util.c:1060
 msgid "only the first character of 'quote' will be used"
 msgstr "tylko pierwszy znak argumentu 'quote' zostanie użyty"
 
-# src/main/util.c: 1061
-# error(_("a character vector 'value' expected"))
-#: src/main/util.c:1065
+#: src/main/util.c:1130
 msgid "a character vector 'value' expected"
 msgstr "oczekiwano tekstowego wektora 'value'"
 
-# src/main/util.c: 1064
-# error(_("'value' must be of positive length"))
-#: src/main/util.c:1068
+#: src/main/util.c:1133
 msgid "'value' must be of positive length"
 msgstr "argument 'value' musi posiadać dodatnią długość"
 
-# src/main/util.c: 1193
-# error(_("invalid input '%s' in 'utf8towcs'"), s)
-# src/main/util.c: 1201
-# error(_("invalid input '%s' in 'utf8towcs'"), s)
-#: src/main/util.c:1197 src/main/util.c:1205
+#: src/main/util.c:1262 src/main/util.c:1270
 #, c-format
 msgid "invalid input '%s' in 'utf8towcs'"
 msgstr "niepoprawne wejście '%s' w funkcji 'utf8towcs()'"
 
-# src/main/util.c: 1286
-# error(_("invalid multibyte string at '%s'"), err)
-#: src/main/util.c:1290
+#: src/main/util.c:1355
 #, c-format
 msgid "invalid multibyte string at '%s'"
 msgstr "niepoprawny wielobajtowy łańcuch w '%s'"
 
-# src/main/util.c: 1395
-# warning(_("error message truncated to 255 chars"))
-#: src/main/util.c:1399
+#: src/main/util.c:1497
 msgid "error message truncated to 255 chars"
 msgstr "komunikat błędu przycięty do 255 znaków"
 
-# src/main/util.c: 1408
-# warning(_("warning message truncated to 255 chars"))
-#: src/main/util.c:1412
+#: src/main/util.c:1510
 msgid "warning message truncated to 255 chars"
 msgstr "komunikat ostrzegawczy przycięty do 255 znaków"
 
-# src/library/base/R/getenv.R: 45
-# stop("all arguments must be named")
-# src/main/util.c: 1815
-# error(_("all arguments must be named"))
-#: src/main/util.c:1819
+#: src/main/util.c:1659
+#, c-format
+msgid "accuracy loss in conversion from \"%s\" to numeric"
+msgstr "utracono precyzję podczas konwersji z \"%s\" do liczby"
+
+#: src/main/util.c:1969
 msgid "all arguments must be named"
 msgstr "wszystkie argumenty muszą być nazwane"
 
-# src/main/util.c: 1889
-# warning(_("ICU is not supported on this build"))
-#: src/main/util.c:1893
+#: src/main/util.c:2091
 msgid "ICU is not supported on this build"
 msgstr "ICU nie jest wspierany w tej kompilacji"
 
-# src/main/util.c: 1950
-# error(_("'breaks' is not sorted"))
-#: src/main/util.c:1954
+#: src/main/util.c:2158
 msgid "'breaks' is not sorted"
 msgstr "argument 'breaks' nie jest posortowany"
 
-# src/library/graphics/src/stem.c: 155
-# error(_("long vector '%s' is not supported"), "x")
-# src/main/util.c: 1984
-# error(_("long vector '%s' is not supported"), "breaks")
-# src/main/util.c: 2030
-# error(_("long vector '%s' is not supported"), "vec")
-#: src/main/util.c:1988 src/main/util.c:2034
+#: src/main/util.c:2192 src/main/util.c:2242
 #, c-format
 msgid "long vector '%s' is not supported"
 msgstr "długi wektor '%s' nie jest wspierany"
 
-# src/main/util.c: 2083
-# error(_("'eps.correct' must be 0, 1, or 2"))
-#: src/main/util.c:2087
+#: src/main/util.c:2296
 msgid "'eps.correct' must be 0, 1, or 2"
 msgstr "'eps.correct' musi być 0, 1, lub 2"
 
-# src/main/util.c: 2111
-# error(_("'x' must be a vector"))
-#: src/main/util.c:2115
+#: src/main/util.c:2324
 msgid "'x' must be a vector"
 msgstr "'x' musi być wektorem"
 
-# src/main/version.c: 37
-# (_("R is free software and comes with ABSOLUTELY NO WARRANTY.\nYou are welcome to redistribute it under certain conditions.\nType 'license()' or 'licence()' for distribution details.\n\n"))
 #: src/main/version.c:37
 msgid ""
 "R is free software and comes with ABSOLUTELY NO WARRANTY.\n"
@@ -12233,8 +6473,6 @@ msgstr ""
 "Wpisz 'license()' lub 'licence()' aby uzyskać szczegóły dystrybucji.\n"
 "\n"
 
-# src/main/version.c: 40
-# (_("R is a collaborative project with many contributors.\nType 'contributors()' for more information and\n'citation()' on how to cite R or R packages in publications.\n\n"))
 #: src/main/version.c:40
 msgid ""
 "R is a collaborative project with many contributors.\n"
@@ -12247,8 +6485,6 @@ msgstr ""
 "'citation()' aby dowiedzieć się jak cytować R lub pakiety R w publikacjach.\n"
 "\n"
 
-# src/main/version.c: 43
-# (_("Type 'demo()' for some demos, 'help()' for on-line help, or\n'help.start()' for an HTML browser interface to help.\nType 'q()' to quit R.\n\n"))
 #: src/main/version.c:43
 msgid ""
 "Type 'demo()' for some demos, 'help()' for on-line help, or\n"
@@ -12261,70 +6497,36 @@ msgstr ""
 "Wpisz 'q()' aby wyjść z R.\n"
 "\n"
 
-# src/main/vfonts.c: 50
-# error(_("vfont routines cannot be accessed in module"))
-#: src/main/vfonts.c:50
-msgid "vfont routines cannot be accessed in module"
-msgstr "procedury 'vfont' nie są dostępne w tym module"
-
-# src/main/vfonts.c: 67
-# error(_("Hershey fonts cannot be loaded"))
-# src/main/vfonts.c: 80
-# error(_("Hershey fonts cannot be loaded"))
-# src/main/vfonts.c: 98
-# error(_("Hershey fonts cannot be loaded"))
-#: src/main/vfonts.c:67 src/main/vfonts.c:80 src/main/vfonts.c:98
-msgid "Hershey fonts cannot be loaded"
-msgstr "czcionki Hershey'a nie mogą zostać załadowane"
-
-# src/main/xspline.c: 60
-# error(_("add_point - reached MAXNUMPTS (%d)"),tmp_n)
 #: src/main/xspline.c:60
 #, c-format
 msgid "add_point - reached MAXNUMPTS (%d)"
 msgstr "add_point -- osiągnięto MAXNUMPTS (%d)"
 
-# src/main/xspline.c: 74
-# error(_("insufficient memory to allocate point array"))
 #: src/main/xspline.c:74
 msgid "insufficient memory to allocate point array"
 msgstr "brak wystarczającej pamięci aby przydzielić punktową tablicę"
 
-# src/main/xspline.c: 472
-# error(_("there must be at least two control points"))
 #: src/main/xspline.c:472
 msgid "there must be at least two control points"
 msgstr "muszą być przynajmniej dwa punkty kontrolne"
 
-# src/main/xspline.c: 474
-# error(_("there must be at least four control points"))
 #: src/main/xspline.c:474
 msgid "there must be at least four control points"
 msgstr "muszą być przynajmniej cztery punkty kontrolne"
 
-# src/main/xspline.c: 534
-# error(_("There must be at least three control points"))
 #: src/main/xspline.c:534
 msgid "There must be at least three control points"
 msgstr "Muszą być przynajmniej trzy punkty kontrolne"
 
-# src/modules/X11/devX11.c: 1246
-# warning(_("X11 protocol error: %s"), buff)
-# src/modules/X11/dataentry.c: 1871
-# warning(_("X11 protocol error: %s"), buff)
-#: src/modules/X11/dataentry.c:1871 src/modules/X11/devX11.c:1246
+#: src/modules/X11/dataentry.c:1874 src/modules/X11/devX11.c:1248
 #, c-format
 msgid "X11 protocol error: %s"
 msgstr "błąd protokołu X11: %s"
 
-# src/modules/X11/devX11.c: 460
-# warning(_("cannot set grayscale: reverting to monochrome"))
 #: src/modules/X11/devX11.c:460
 msgid "cannot set grayscale: reverting to monochrome"
 msgstr "nie można ustawić skali szarości: powracanie do monochromatyczności"
 
-# src/modules/X11/devX11.c: 546
-# warning(_("X11 driver unable to obtain color cube\n  reverting to monochrome"))
 #: src/modules/X11/devX11.c:546
 msgid ""
 "X11 driver unable to obtain color cube\n"
@@ -12333,8 +6535,6 @@ msgstr ""
 "sterownik X11 nie może uzyskać kolorowego sześcianu. Powracanie do "
 "monochromatyczności"
 
-# src/modules/X11/devX11.c: 594
-# error(_("Error: X11 cannot allocate additional graphics colors.\nConsider using X11 with colortype=\"pseudo.cube\" or \"gray\"."))
 #: src/modules/X11/devX11.c:594
 msgid ""
 "Error: X11 cannot allocate additional graphics colors.\n"
@@ -12343,9 +6543,7 @@ msgstr ""
 "Błąd: X11 nie może przydzielić dodatkowych kolorów grafiki.\n"
 "Rozważ użycie X11 z colortype=\"pseudo.cube\" lub \"gray\"."
 
-# src/modules/X11/devX11.c: 1027
-# error(_("could not find any X11 fonts\nCheck that the Font Path is correct."))
-#: src/modules/X11/devX11.c:1027
+#: src/modules/X11/devX11.c:1029
 msgid ""
 "could not find any X11 fonts\n"
 "Check that the Font Path is correct."
@@ -12353,31 +6551,17 @@ msgstr ""
 "nie można znaleźć żadnych czcionek X11. Sprawdź, czy ścieżka do czcionek "
 "jest poprawna."
 
-# src/modules/X11/devX11.c: 1087
-# warning(_("X11 used font size %d when %d was requested"),
-# 		    pixelsize, size)
-#: src/modules/X11/devX11.c:1087
+#: src/modules/X11/devX11.c:1089
 #, c-format
 msgid "X11 used font size %d when %d was requested"
 msgstr "X11 użył rozmiaru czcionki %d podczas gdy żądano %d"
 
-# src/modules/X11/devX11.c: 1121
-# error(_("X11 font %s, face %d at size %d could not be loaded"),
-# 		  family, face, size)
-#: src/modules/X11/devX11.c:1121
+#: src/modules/X11/devX11.c:1123
 #, c-format
 msgid "X11 font %s, face %d at size %d could not be loaded"
 msgstr "czcionka X11 %s, krój %d o rozmiarze %d nie mogła zostać załadowana"
 
-# src/modules/X11/devX11.c: 1130
-# warning(_("semi-transparency is not supported on this device: reported only once per page"))
-# src/library/grDevices/src/devWindows.c: 2341
-# warning(_("semi-transparency is not supported on this device: reported only once per page"))
-# src/library/grDevices/src/devPS.c: 3455
-# warning(_("semi-transparency is not supported on this device: reported only once per page"))
-# src/library/grDevices/src/devPS.c: 4568
-# warning(_("semi-transparency is not supported on this device: reported only once per page"))
-#: src/modules/X11/devX11.c:1130
+#: src/modules/X11/devX11.c:1132
 msgid ""
 "semi-transparency is not supported on this device: reported only once per "
 "page"
@@ -12385,674 +6569,424 @@ msgstr ""
 "półprzezroczystość nie jest wspierana na tym urządzeniu: zaraportowane tylko "
 "raz na stronę"
 
-# src/modules/X11/devX11.c: 1254
-# error(_("X11 I/O error while opening X11 connection to '%s'"), dn)
-#: src/modules/X11/devX11.c:1254
+#: src/modules/X11/devX11.c:1256
 #, c-format
 msgid "X11 I/O error while opening X11 connection to '%s'"
 msgstr "błąd X11 wejścia/wyjścia podczas otwierania połączenia X11 z '%s'"
 
-# src/modules/X11/devX11.c: 1272
-# error(_("X11 fatal IO error: please save work and shut down R"))
-# src/modules/X11/dataentry.c: 1878
-# error("X11 fatal IO error: please save work and shut down R")
-#: src/modules/X11/devX11.c:1272
+#: src/modules/X11/devX11.c:1273
 msgid "X11 fatal IO error: please save work and shut down R"
 msgstr ""
 "krytyczny błąd X11 wejścia/wyjścia: proszę zapisać pracę po czym zamknąć R"
 
-# src/modules/X11/devX11.c: 1328
-# warning(_("locale not supported by Xlib: some X ops will operate in C locale"))
-# src/modules/X11/dataentry.c: 1904
-# warning("locale not supported by Xlib: some X ops will operate in C locale")
 #: src/modules/X11/devX11.c:1328
 msgid "locale not supported by Xlib: some X ops will operate in C locale"
 msgstr ""
 "lokalizacja nie jest wspierana przez 'Xlib': niektóre opcje X będą operowały "
 "w lokalizacji C"
 
-# src/modules/X11/devX11.c: 1329
-# warning(_("X cannot set locale modifiers"))
-# src/modules/X11/dataentry.c: 1905
-# warning("X cannot set locale modifiers")
 #: src/modules/X11/devX11.c:1329
 msgid "X cannot set locale modifiers"
 msgstr "X nie może ustawić modyfikatorów lokalizacji"
 
-# src/modules/X11/devX11.c: 1333
-# warning(_("no png support in this version of R"))
 #: src/modules/X11/devX11.c:1333
 msgid "no png support in this version of R"
 msgstr "brak wsparcia 'png' w tej wersji R"
 
-# src/modules/X11/devX11.c: 1339
-# error(_("filename too long in png() call"))
 #: src/modules/X11/devX11.c:1339
 msgid "filename too long in png() call"
 msgstr "nazwa pliku jest zbyt długa w wywołaniu 'png()'"
 
-# src/modules/X11/devX11.c: 1343
-# warning(_("could not open PNG file '%s'"), buf)
 #: src/modules/X11/devX11.c:1343
 #, c-format
 msgid "could not open PNG file '%s'"
 msgstr "nie udało się otworzyć pliku PNG '%s'"
 
-# src/modules/X11/devX11.c: 1355
-# warning(_("no jpeg support in this version of R"))
 #: src/modules/X11/devX11.c:1355
 msgid "no jpeg support in this version of R"
 msgstr "brak wsparcia 'jpeg' w tej wersji R"
 
-# src/modules/X11/devX11.c: 1365
-# error(_("filename too long in jpeg() call"))
-# src/library/grDevices/src/devWindows.c: 1843
-# error(_("filename too long in jpeg() call"))
 #: src/modules/X11/devX11.c:1365
 msgid "filename too long in jpeg() call"
 msgstr "nazwa pliku jest zbyt długa w wywołaniu 'jpeg()'"
 
-# src/modules/X11/devX11.c: 1369
-# warning(_("could not open JPEG file '%s'"), buf)
 #: src/modules/X11/devX11.c:1369
 #, c-format
 msgid "could not open JPEG file '%s'"
 msgstr "nie udało się otworzyć pliku JPEG '%s'"
 
-# src/modules/X11/devX11.c: 1381
-# warning(_("no tiff support in this version of R"))
 #: src/modules/X11/devX11.c:1381
 msgid "no tiff support in this version of R"
 msgstr "brak wsparcia 'tiff' w tej wersji R"
 
-# src/modules/X11/devX11.c: 1389
-# error(_("filename too long in tiff() call"))
-# src/library/grDevices/src/devWindows.c: 1877
-# error(_("filename too long in tiff() call"))
 #: src/modules/X11/devX11.c:1389
 msgid "filename too long in tiff() call"
 msgstr "nazwa pliku jest zbyt długa w wywołaniu 'tiff()'"
 
-# src/modules/X11/devX11.c: 1401
-# error(_("filename too long in bmp() call"))
 #: src/modules/X11/devX11.c:1401
 msgid "filename too long in bmp() call"
 msgstr "nazwa pliku jest zbyt długa w wywołaniu 'bmp()'"
 
-# src/modules/X11/devX11.c: 1405
-# warning(_("could not open BMP file '%s'"), buf)
 #: src/modules/X11/devX11.c:1405
 #, c-format
 msgid "could not open BMP file '%s'"
 msgstr "nie udało się otworzyć pliku BMP '%s'"
 
-# src/modules/X11/devX11.c: 1435
-# warning(_("unable to open connection to X11 display '%s'"), p)
 #: src/modules/X11/devX11.c:1435
 #, c-format
 msgid "unable to open connection to X11 display '%s'"
 msgstr "nie można otworzyć połączenia z oknem X11 '%s'"
 
-# src/modules/X11/devX11.c: 1445
-# warning(_("ignoring 'display' argument as an X11 device is already open"))
 #: src/modules/X11/devX11.c:1445
 msgid "ignoring 'display' argument as an X11 device is already open"
 msgstr ""
 "ignorowanie argumentu 'display' ponieważ urządzenie X11 jest już otwarte"
 
-# src/modules/X11/devX11.c: 1451
-# warning(_("cairo-based types may only work correctly on TrueColor visuals"))
 #: src/modules/X11/devX11.c:1451
 msgid "cairo-based types may only work correctly on TrueColor visuals"
 msgstr ""
 "typy oparte na 'cairo' mogą działać poprawnie jedynie na wyświetlaczach "
 "'TrueColor'"
 
-# src/modules/X11/devX11.c: 1461
-# warning(_("jpeg() does not support transparency: using white bg"))
 #: src/modules/X11/devX11.c:1461
 msgid "jpeg() does not support transparency: using white bg"
 msgstr "funkcja 'jpeg()' nie wspiera przezroczystości: używanie białego tła"
 
-# src/modules/X11/devX11.c: 1566
-# warning(_("unable to obtain information on display '%s'"),
-# 			    dsp)
 #: src/modules/X11/devX11.c:1566
 #, c-format
 msgid "unable to obtain information on display '%s'"
 msgstr "nie można uzyskać informacji z ekranu '%s'"
 
-# src/modules/X11/devX11.c: 1584
-# warning(_("unable to create X11 window"))
 #: src/modules/X11/devX11.c:1584
 msgid "unable to create X11 window"
 msgstr "nie można utworzyć okna X11"
 
-# src/modules/X11/devX11.c: 1719
-# warning(_("'width=%d, height=%d' are unlikely values in pixels"),
-# 		    iw, ih)
-# src/library/grDevices/src/devWindows.c: 1807
-# warning(_("'width=%d, height=%d' are unlikely values in pixels"),
-# 		    (int)w, (int) h)
-# src/library/grDevices/src/devWindows.c: 1846
-# warning(_("'width=%d, height=%d' are unlikely values in pixels"),
-# 		    (int)w, (int) h)
-# src/library/grDevices/src/devWindows.c: 1880
-# warning(_("'width=%d, height=%d' are unlikely values in pixels"),
-# 		    (int) w, (int) h)
 #: src/modules/X11/devX11.c:1719
 #, c-format
 msgid "'width=%d, height=%d' are unlikely values in pixels"
 msgstr "'width=%d, height=%d' są mało prawdopodobnymi wartościami w pikselach"
 
-# src/modules/X11/devX11.c: 1724
-# warning(_("unable to create pixmap"))
 #: src/modules/X11/devX11.c:1724
 msgid "unable to create pixmap"
 msgstr "nie można utworzyć 'pixmap'"
 
-# src/modules/X11/devX11.c: 1755
-# error(_("invalid font specification"))
-# src/library/graphics/src/plot.c: 217
-# error(_("invalid font specification"))
-# src/library/grDevices/src/devWindows.c: 604
-# error(_("invalid font specification"))
 #: src/modules/X11/devX11.c:1755
 msgid "invalid font specification"
 msgstr "niepoprawne określenie czcionki"
 
-# src/modules/X11/devX11.c: 1795
-# warning(_("font family not found in X11 font database"))
 #: src/modules/X11/devX11.c:1795
 msgid "font family not found in X11 font database"
 msgstr "nie znaleziono czcionki w bazie czcionek X11"
 
-# src/modules/X11/devX11.c: 1834
-# error(_("invalid use of %d < 0 in '%s'"), c, "X11_MetricInfo")
 #: src/modules/X11/devX11.c:1834
 #, c-format
 msgid "invalid use of %d < 0 in '%s'"
 msgstr "błędne użycie %d < 0 w '%s'"
 
-# src/modules/X11/devX11.c: 1955
-# error(_("could not open file '%s'"), buf)
-# src/library/grDevices/src/cairo/cairoBM.c: 196
-# error(_("could not open file '%s'"), buf)
 #: src/modules/X11/devX11.c:1955
 #, c-format
 msgid "could not open file '%s'"
 msgstr "nie udało się otworzyć pliku '%s'"
 
-# src/modules/X11/devX11.c: 2185
-# warning(_("%s not available for this device"), "Path drawing")
 #: src/modules/X11/devX11.c:2185
 #, c-format
 msgid "%s not available for this device"
 msgstr "%s nie jest dostępne dla tego urządzenia"
 
-# src/modules/X11/devX11.c: 2330
-# error(_("Unable to create XImage"))
 #: src/modules/X11/devX11.c:2330
 msgid "Unable to create XImage"
 msgstr "Nie można utworzyć XImage"
 
-# src/modules/X11/devX11.c: 2529
-# error(_("attempt to use the locator after dev.hold()"))
-# src/library/grDevices/src/devWindows.c: 3126
-# error(_("attempt to use the locator after dev.hold()"))
 #: src/modules/X11/devX11.c:2529
 msgid "attempt to use the locator after dev.hold()"
 msgstr "próba użycia lokalizatora po 'dev.hold()'"
 
-# src/modules/X11/devX11.c: 3111
-#  _("unable to start device %s")
-#: src/modules/X11/devX11.c:3111
+#: src/modules/X11/devX11.c:3117
 #, c-format
 msgid "unable to start device %s"
 msgstr "nie można uruchomić urządzenia '%s'"
 
-# src/modules/X11/devX11.c: 3138
-#  _("invalid 'width' or 'height'")
-# src/library/grDevices/src/devWindows.c: 3641
-# error(_("invalid 'width' or 'height'"))
-#: src/modules/X11/devX11.c:3138
+#: src/modules/X11/devX11.c:3144
 msgid "invalid 'width' or 'height'"
 msgstr "niepoprawne argumenty 'width' lub 'height'"
 
-# src/modules/X11/devX11.c: 3145
-# error(_("invalid colortype passed to X11 driver"))
-#: src/modules/X11/devX11.c:3145
+#: src/modules/X11/devX11.c:3151
 msgid "invalid colortype passed to X11 driver"
 msgstr "niepoprawny argument 'colortype' przekazany do sterownika X11"
 
-# src/modules/X11/devX11.c: 3158
-# warningcall(call,
-# 		    _("unknown X11 color/colour model -- using monochrome"))
-#: src/modules/X11/devX11.c:3159
+#: src/modules/X11/devX11.c:3165
 msgid "unknown X11 color/colour model -- using monochrome"
 msgstr "nieznany model koloru/ kolor X11 -- używanie monochromatycznego"
 
-# src/modules/X11/devX11.c: 3249
-# error(_("no plot on device to save"))
-#: src/modules/X11/devX11.c:3249
+#: src/modules/X11/devX11.c:3255
 msgid "no plot on device to save"
 msgstr "brak wykresu na urządzeniu, który można zapisać"
 
-# src/modules/X11/devX11.c: 3251
-# error(_("not an open X11cairo device"))
-#: src/modules/X11/devX11.c:3251
+#: src/modules/X11/devX11.c:3257
 msgid "not an open X11cairo device"
 msgstr "nie ma otwartego urządzenia 'X11cairo'"
 
-# src/modules/X11/devX11.c: 3260
-# error(_("cannot open file '%s'"), fn)
-# src/library/grDevices/src/qdPDF.c: 98
-# warning(_("cannot open file '%s'"), par->file)
-# src/library/grDevices/src/devPS.c: 3581
-# error(_("cannot open file '%s'"), buf)
-# src/library/grDevices/src/devPS.c: 4971
-# error(_("cannot open file '%s'"), buf)
-# src/library/grDevices/src/devPS.c: 4982
-# error(_("cannot open file '%s'"), pd->tmpname)
-# src/library/grDevices/src/devPS.c: 7060
-# error(_("cannot open file '%s'"), buf)
-#: src/modules/X11/devX11.c:3260
+#: src/modules/X11/devX11.c:3266
 #, c-format
 msgid "cannot open file '%s'"
 msgstr "nie można otworzyć pliku '%s'"
 
-# src/modules/X11/devX11.c: 3277
-# error(_("savePlot() is not supported on this build"))
-#: src/modules/X11/devX11.c:3277
+#: src/modules/X11/devX11.c:3283
 msgid "savePlot() is not supported on this build"
 msgstr "'savePlot()' nie jest wspierane w tej kompilacji"
 
-# src/modules/X11/devX11.c: 3317
-# warning(_("unable to contact X11 display"))
-#: src/modules/X11/devX11.c:3317
+#: src/modules/X11/devX11.c:3323
 msgid "unable to contact X11 display"
 msgstr "nie można połączyć się z ekranem X11"
 
-# src/modules/X11/devX11.c: 3366
-# warning(_("clipboard cannot be read (error code %d)"), ret)
-#: src/modules/X11/devX11.c:3366
+#: src/modules/X11/devX11.c:3372
 #, c-format
 msgid "clipboard cannot be read (error code %d)"
 msgstr "nie można odczytać zawartości schowka (kod błędu %d)"
 
-# src/modules/X11/devX11.c: 3397
-# error(_("cannot allocate memory for X11Routines structure"))
-#: src/modules/X11/devX11.c:3397
+#: src/modules/X11/devX11.c:3408
 msgid "cannot allocate memory for X11Routines structure"
 msgstr "nie można przydzielić pamięci dla struktury 'X11Routines'"
 
-# src/modules/internet/internet.c: 188
-# error(_("allocation of url connection failed"))
-# src/modules/internet/internet.c: 192
-# error(_("allocation of url connection failed"))
-# src/modules/internet/internet.c: 198
-# error(_("allocation of url connection failed"))
-# src/modules/internet/internet.c: 210
-# error(_("allocation of url connection failed"))
-#: src/modules/internet/internet.c:188 src/modules/internet/internet.c:192
-#: src/modules/internet/internet.c:198 src/modules/internet/internet.c:210
+#: src/modules/internet/internet.c:113
+msgid "for https:// URLs use method = \"wininet\""
+msgstr "dla adresów https:// użyj opcji 'method = \"wininet\"'"
+
+#: src/modules/internet/internet.c:153 src/modules/internet/internet.c:274
+#: src/modules/internet/internet.c:758
+#, c-format
+msgid "scheme not supported in URL '%s'"
+msgstr "schemat nie jest wspierany w URL '%s'"
+
+#: src/modules/internet/internet.c:348 src/modules/internet/internet.c:352
+#: src/modules/internet/internet.c:357 src/modules/internet/internet.c:381
+#: src/modules/internet/libcurl.c:791 src/modules/internet/libcurl.c:795
+#: src/modules/internet/libcurl.c:801 src/modules/internet/libcurl.c:814
+#: src/modules/internet/libcurl.c:822
 msgid "allocation of url connection failed"
 msgstr "przydział połączenia url nie powiódł się"
 
-# src/modules/internet/internet.c: 286
-# warning(_("only first element of 'url' argument used"))
-#: src/modules/internet/internet.c:286
+#: src/modules/internet/internet.c:455
 msgid "only first element of 'url' argument used"
 msgstr "tylko pierwszy element argumentu 'url' został użyty"
 
-# src/modules/internet/internet.c: 292
-# warning(_("only first element of 'destfile' argument used"))
-#: src/modules/internet/internet.c:292
+#: src/modules/internet/internet.c:461
 msgid "only first element of 'destfile' argument used"
 msgstr "tylko pierwszy element argumentu 'destfile' został użyty"
 
-# src/modules/internet/internet.c: 317
-# (_("Download progress"), rect(0, 0, 540, 100),
-# 			       Titlebar | Centered)
-#: src/modules/internet/internet.c:317
+#: src/modules/internet/internet.c:480 src/modules/internet/libcurl.c:499
 msgid "Download progress"
 msgstr "Postęp pobierania"
 
-# src/modules/internet/internet.c: 339
-# error(_("cannot open URL '%s', reason '%s'"),
-# 		  url, strerror(errno))
-#: src/modules/internet/internet.c:339
+#: src/modules/internet/internet.c:502
 #, c-format
 msgid "cannot open URL '%s', reason '%s'"
 msgstr "nie można otworzyć URL '%s', powód '%s'"
 
-# src/modules/internet/internet.c: 346
-# error(_("cannot open destfile '%s', reason '%s'"),
-# 		  file, strerror(errno))
-# src/modules/internet/internet.c: 372
-# error(_("cannot open destfile '%s', reason '%s'"),
-# 		  file, strerror(errno))
-# src/modules/internet/internet.c: 474
-# error(_("cannot open destfile '%s', reason '%s'"),
-# 		  file, strerror(errno))
-#: src/modules/internet/internet.c:346 src/modules/internet/internet.c:372
-#: src/modules/internet/internet.c:474
+#: src/modules/internet/internet.c:509 src/modules/internet/internet.c:536
+#: src/modules/internet/internet.c:661
 #, c-format
 msgid "cannot open destfile '%s', reason '%s'"
 msgstr "nie można otworzyć docelowego pliku '%s', powód '%s'"
 
-#: src/modules/internet/internet.c:377 src/modules/internet/internet.c:479
+#: src/modules/internet/internet.c:541 src/modules/internet/internet.c:666
+#: src/modules/internet/libcurl.c:530
 #, c-format
 msgid "trying URL '%s'\n"
 msgstr "próbowanie adresu URL '%s'\n"
 
-#: src/modules/internet/internet.c:384 src/modules/internet/internet.c:486
-msgid "opened URL\n"
-msgstr "otwarty adres URL\n"
-
-# src/modules/internet/internet.c: 455
-# warning(_("downloaded length %d != reported length %d"),
-# 			nbytes, total)
-# src/modules/internet/internet.c: 560
-# warning(_("downloaded length %d != reported length %d"),
-# 			nbytes, total)
-#: src/modules/internet/internet.c:455 src/modules/internet/internet.c:560
-#, c-format
-msgid "downloaded length %d != reported length %d"
-msgstr "pobrana długość %d != zgłoszona długość %d"
-
-# src/modules/internet/internet.c: 98
-# error("cannot open URL '%s'", url)
-# src/modules/internet/internet.c: 109
-# error("cannot open URL '%s'", url)
-# src/modules/internet/internet.c: 460
-# error(_("cannot open URL '%s'"), url)
-# src/modules/internet/internet.c: 565
-# error(_("cannot open URL '%s'"), url)
-#: src/modules/internet/internet.c:460 src/modules/internet/internet.c:565
+#: src/modules/internet/internet.c:640 src/modules/internet/internet.c:751
+#: src/modules/internet/libcurl.c:578
+#, c-format
+msgid "downloaded length %0.f != reported length %0.f"
+msgstr "pobrana długość %0.f != zgłoszona długość %0.f"
+
+#: src/modules/internet/internet.c:645 src/modules/internet/internet.c:756
 #, c-format
 msgid "cannot open URL '%s'"
 msgstr "nie można otworzyć adresu URL '%s'"
 
-# src/modules/internet/internet.c: 593
-# warning(_("cannot open: HTTP status was '%d %s'"), rc,
-# 		    RxmlNanoHTTPStatusMsg(ctxt))
-# src/modules/internet/internet.c: 828
-# warning(_("cannot open: HTTP status was '%d %s'"), status, buf)
-#: src/modules/internet/internet.c:593 src/modules/internet/internet.c:828
-#, c-format
-msgid "cannot open: HTTP status was '%d %s'"
-msgstr "nie można otworzyć: uzyskany status HTTP to '%d %s'"
-
-# src/modules/internet/internet.c: 772
-# warning(_("InternetOpenUrl timed out"))
-# src/modules/internet/internet.c: 935
-# warning(_("InternetOpenUrl timed out"))
-#: src/modules/internet/internet.c:772 src/modules/internet/internet.c:935
-msgid "InternetOpenUrl timed out"
-msgstr "przekroczono czas oczekiwania na połączenie z 'InternetOpenUrl'"
-
-# src/modules/internet/internet.c: 799
-# warning(_("InternetOpenUrl failed: '%s'"), buf)
-# src/modules/internet/internet.c: 813
-# warning(_("InternetOpenUrl failed: '%s'"), buf)
-# src/modules/internet/internet.c: 957
-# warning(_("InternetOpenUrl failed: '%s'"), buf)
-# src/modules/internet/internet.c: 966
-# warning(_("InternetOpenUrl failed: '%s'"), buf)
-#: src/modules/internet/internet.c:799 src/modules/internet/internet.c:813
-#: src/modules/internet/internet.c:957 src/modules/internet/internet.c:966
+#: src/modules/internet/internet.c:779 src/modules/internet/internet.c:944
+#, c-format
+msgid "cannot open URL '%s': HTTP status was '%d %s'"
+msgstr "nie można otworzyć adresu URL '%s': status HTTP '%d %s'"
+
+#: src/modules/internet/internet.c:915 src/modules/internet/internet.c:929
+#: src/modules/internet/internet.c:1019 src/modules/internet/internet.c:1028
 #, c-format
 msgid "InternetOpenUrl failed: '%s'"
 msgstr "'InternetOpenUrl' nie powiódł się: '%s'"
 
-# src/modules/internet/internet.c: 870
-# warning(_("Internet read timed out"))
-#: src/modules/internet/internet.c:870
-msgid "Internet read timed out"
-msgstr "przekroczono czas odczytu z sieci Internet"
-
-# src/modules/internet/nanoftp.c: 288
-#  _("RxmlNanoFTPScanURL: overlong (invalid?) URL")
-# src/modules/internet/nanoftp.c: 301
-#  _("RxmlNanoFTPScanURL: overlong (invalid?) URL")
-# src/modules/internet/nanoftp.c: 312
-#  _("RxmlNanoFTPScanURL: overlong (invalid?) URL")
-# src/modules/internet/nanoftp.c: 346
-#  _("RxmlNanoFTPScanURL: overlong (invalid?) URL")
-# src/modules/internet/nanoftp.c: 356
-#  _("RxmlNanoFTPScanURL: overlong (invalid?) URL")
-#: src/modules/internet/nanoftp.c:288 src/modules/internet/nanoftp.c:301
-#: src/modules/internet/nanoftp.c:312 src/modules/internet/nanoftp.c:346
-#: src/modules/internet/nanoftp.c:356
+#: src/modules/internet/libcurl.c:159
+#, c-format
+msgid "URL '%s': status was '%d %s'"
+msgstr "Adres URL '%s': status '%d %s'"
+
+#: src/modules/internet/libcurl.c:163
+#, c-format
+msgid "URL '%s': status was '%s'"
+msgstr "Adres URL '%s': status '%s'"
+
+#: src/modules/internet/libcurl.c:240
+msgid "curlGetHeaders is not supported on this platform"
+msgstr "metoda 'curlGetHeaders()' nie jest obsługiwana na tej platformie"
+
+#: src/modules/internet/libcurl.c:249 src/modules/internet/libcurl.c:252
+#, c-format
+msgid "invalid %s argument"
+msgstr "niepoprawny argument '%s'"
+
+#: src/modules/internet/libcurl.c:269
+#, c-format
+msgid ""
+"libcurl error code %d\n"
+"\t%s\n"
+msgstr ""
+"kod %d błędu libcurl\n"
+"\t%s\n"
+
+#: src/modules/internet/libcurl.c:404
+msgid "download.file(method = \"libcurl\") is not supported on this platform"
+msgstr ""
+"metoda 'download.file(method = \"libcurl\")' nie jest obsługiwana na tej "
+"platformie"
+
+#: src/modules/internet/libcurl.c:420
+msgid "lengths of 'url' and 'destfile' must match"
+msgstr "długości argumentów 'url' oraz 'destfile' muszą się zgadzać"
+
+#: src/modules/internet/libcurl.c:481
+#, c-format
+msgid "URL %s: cannot open destfile '%s', reason '%s'"
+msgstr "Adres URL %s: nie można otworzyć docelowego pliku '%s', powód '%s'"
+
+#: src/modules/internet/libcurl.c:593
+msgid "cannot download all files"
+msgstr "nie można pobrać wszystkich plików"
+
+#: src/modules/internet/libcurl.c:727
+msgid "cannot read from connection"
+msgstr "nie można czytać z połączenia"
+
+#: src/modules/internet/libcurl.c:763
+msgid "cannot open connection"
+msgstr "nie można otworzyć połączenia"
+
+#: src/modules/internet/libcurl.c:826
+msgid "url(method = \"libcurl\") is not supported on this platform"
+msgstr ""
+"metoda 'url(method = \"libcurl\")' nie jest obsługiwana na tej platformie"
+
+#: src/modules/internet/nanoftp.c:289 src/modules/internet/nanoftp.c:302
+#: src/modules/internet/nanoftp.c:313 src/modules/internet/nanoftp.c:347
+#: src/modules/internet/nanoftp.c:357
 msgid "RxmlNanoFTPScanURL: overlong (invalid?) URL"
 msgstr "RxmlNanoFTPScanURL: zbyt długi (niepoprawny?) URL"
 
-# src/modules/internet/nanoftp.c: 389
-#  _("removing FTP proxy info")
-#: src/modules/internet/nanoftp.c:389
+#: src/modules/internet/nanoftp.c:390
 msgid "removing FTP proxy info"
 msgstr "usuwanie informacji o proxy FTP"
 
-# src/modules/internet/nanoftp.c: 391
-#  _("using FTP proxy '%s'")
-#: src/modules/internet/nanoftp.c:391
+#: src/modules/internet/nanoftp.c:392
 #, c-format
 msgid "using FTP proxy '%s'"
 msgstr "używanie proxy FTP '%s'"
 
-# src/modules/internet/nanoftp.c: 402
-#  _("RxmlNanoFTPScanProxy: overlong (invalid?) URL")
-# src/modules/internet/nanoftp.c: 431
-#  _("RxmlNanoFTPScanProxy: overlong (invalid?) URL")
-#: src/modules/internet/nanoftp.c:402 src/modules/internet/nanoftp.c:431
+#: src/modules/internet/nanoftp.c:403 src/modules/internet/nanoftp.c:432
 msgid "RxmlNanoFTPScanProxy: overlong (invalid?) URL"
 msgstr "RxmlNanoFTPScanProxy: zbyt długi (niepoprawny?) URL"
 
-# src/modules/internet/nanoftp.c: 830
-#  _("cannot resolve host")
-#: src/modules/internet/nanoftp.c:830
+#: src/modules/internet/nanoftp.c:833
 msgid "cannot resolve host"
 msgstr "nie można określić adresu hosta"
 
-# src/modules/internet/nanoftp.c: 860
-#  _("failed to connect to server")
-#: src/modules/internet/nanoftp.c:860
+#: src/modules/internet/nanoftp.c:863
 msgid "failed to connect to server"
 msgstr "nie udało się połączyć z serwerem"
 
-# src/modules/internet/nanoftp.c: 871
-#  _("failed to get response from server")
-#: src/modules/internet/nanoftp.c:871
+#: src/modules/internet/nanoftp.c:874
 msgid "failed to get response from server"
 msgstr "nie udało się uzyskać odpowiedzi z serwera"
 
-# src/modules/internet/nanoftp.c: 1134
-#  _("RxmlNanoFTPGetConnection: failed to create socket")
-#: src/modules/internet/nanoftp.c:1134
+#: src/modules/internet/nanoftp.c:1137
 msgid "RxmlNanoFTPGetConnection: failed to create socket"
 msgstr "'RxmlNanoFTPGetConnection': nie udało się utworzyć gniazda"
 
-# src/modules/internet/nanoftp.c: 1180
-#  _("failed to create a data connection")
-#: src/modules/internet/nanoftp.c:1180
+#: src/modules/internet/nanoftp.c:1183
 msgid "failed to create a data connection"
 msgstr "nie udało się utworzyć połączenia danych"
 
-# src/modules/internet/nanoftp.c: 1188
-#  _("failed to bind a port")
-#: src/modules/internet/nanoftp.c:1188
+#: src/modules/internet/nanoftp.c:1191
 msgid "failed to bind a port"
 msgstr "nie udało się powiązać portu"
 
-# src/modules/internet/nanoftp.c: 1195
-#  _("could not listen on port %d")
-#: src/modules/internet/nanoftp.c:1195
+#: src/modules/internet/nanoftp.c:1198
 #, c-format
 msgid "could not listen on port %d"
 msgstr "nie udało się nasłuchiwać na porcie %d"
 
-# src/modules/internet/nanohttp.c: 370
-#  _("RxmlNanoHTTPScanURL: overlong (invalid?) URL")
-# src/modules/internet/nanohttp.c: 398
-#  _("RxmlNanoHTTPScanURL: overlong (invalid?) URL")
-# src/modules/internet/nanohttp.c: 407
-#  _("RxmlNanoHTTPScanURL: overlong (invalid?) URL")
-#: src/modules/internet/nanohttp.c:370 src/modules/internet/nanohttp.c:398
-#: src/modules/internet/nanohttp.c:407
+#: src/modules/internet/nanohttp.c:369 src/modules/internet/nanohttp.c:400
+#: src/modules/internet/nanohttp.c:412
 msgid "RxmlNanoHTTPScanURL: overlong (invalid?) URL"
 msgstr "RxmlNanoHTTPScanURL: zbyt długi (niepoprawny?) URL"
 
-# src/modules/internet/nanohttp.c: 441
-#  _("removing HTTP proxy info")
-#: src/modules/internet/nanohttp.c:441
+#: src/modules/internet/nanohttp.c:446
 msgid "removing HTTP proxy info"
 msgstr "usuwanie informacji o proxy HTTP"
 
-# src/modules/internet/nanohttp.c: 443
-#  _("using HTTP proxy '%s'")
-#: src/modules/internet/nanohttp.c:443
+#: src/modules/internet/nanohttp.c:448
 #, c-format
 msgid "using HTTP proxy '%s'"
 msgstr "używanie proxy HTTP '%s'"
 
-# src/modules/internet/nanohttp.c: 454
-#  _("RxmlNanoHTTPScanProxy: overlong (invalid?) URL")
-# src/modules/internet/nanohttp.c: 490
-#  _("RxmlNanoHTTPScanProxy: overlong (invalid?) URL")
-#: src/modules/internet/nanohttp.c:454 src/modules/internet/nanohttp.c:490
+#: src/modules/internet/nanohttp.c:459 src/modules/internet/nanohttp.c:497
 msgid "RxmlNanoHTTPScanProxy: overlong (invalid?) URL"
 msgstr "RxmlNanoHTTPScanProxy: zbyt długi (niepoprawny?) URL"
 
-# src/modules/internet/nanohttp.c: 1107
-#  _("unable to resolve '%s'")
-#: src/modules/internet/nanohttp.c:1107
+#: src/modules/internet/nanohttp.c:1135
 #, c-format
 msgid "unable to resolve '%s'"
 msgstr "nie można rozwiązać '%s'"
 
-# src/modules/internet/nanohttp.c: 1134
-#  _("connected to '%s' on port %d.")
-#: src/modules/internet/nanohttp.c:1134
+#: src/modules/internet/nanohttp.c:1168
 #, c-format
 msgid "connected to '%s' on port %d."
 msgstr "połączono z '%s' na porcie %d."
 
-# src/modules/internet/nanohttp.c: 1139
-#  _("unable to connect to '%s' on port %d.")
-#: src/modules/internet/nanohttp.c:1139
+#: src/modules/internet/nanohttp.c:1173
 #, c-format
 msgid "unable to connect to '%s' on port %d."
 msgstr "nie można połączyć się z '%s' na porcie %d."
 
-# src/modules/internet/nanohttp.c: 1443
-#  _("redirect to: '%s'")
-#: src/modules/internet/nanohttp.c:1443
+#: src/modules/internet/nanohttp.c:1477
 #, c-format
 msgid "redirect to: '%s'"
 msgstr "przekieruj do: '%s'"
 
-# src/modules/internet/nanohttp.c: 1454
-#  _("too many redirects, aborting ...")
-#: src/modules/internet/nanohttp.c:1454
+#: src/modules/internet/nanohttp.c:1488
 msgid "too many redirects, aborting ..."
 msgstr "zbyt dużo przekierowań, przerywanie ..."
 
-# src/modules/internet/sockconn.c: 177
-# error(_("allocation of socket connection failed"))
-# src/modules/internet/sockconn.c: 181
-# error(_("allocation of socket connection failed"))
-# src/modules/internet/sockconn.c: 187
-# error(_("allocation of socket connection failed"))
-# src/modules/internet/sockconn.c: 200
-# error(_("allocation of socket connection failed"))
 #: src/modules/internet/sockconn.c:177 src/modules/internet/sockconn.c:181
 #: src/modules/internet/sockconn.c:187 src/modules/internet/sockconn.c:200
 msgid "allocation of socket connection failed"
 msgstr "przydział połączenia socket nie powiódł się"
 
-# src/modules/lapack/Lapack.c: 47
-# error(
-# 	    _("argument type[1]='%s' must be a character string of string length 1"),
-# 	    typstr)
-# src/modules/lapack/Lapack.c: 67
-# error(_("argument type[1]='%s' must be a character string of string length 1"),
-# 	      typstr)
 #: src/modules/lapack/Lapack.c:48 src/modules/lapack/Lapack.c:67
 #, c-format
 msgid "argument type[1]='%s' must be a character string of string length 1"
 msgstr "argument type[1]='%s' musi być łańcuchem tekstowym o długości 1"
 
-# src/modules/lapack/Lapack.c: 56
-# error(_("argument type[1]='%s' must be one of 'M','1','O','I','F' or 'E'"),
-# 	      typstr)
 #: src/modules/lapack/Lapack.c:56
 #, c-format
 msgid "argument type[1]='%s' must be one of 'M','1','O','I','F' or 'E'"
 msgstr "argument type[1]='%s' musi być jednym z 'M','1','O','I','F' lub 'E'"
 
-# src/modules/lapack/Lapack.c: 73
-# error(_("argument type[1]='%s' must be one of '1','O', or 'I'"),
-# 	      typstr)
 #: src/modules/lapack/Lapack.c:73
 #, c-format
 msgid "argument type[1]='%s' must be one of '1','O', or 'I'"
 msgstr "argument type[1]='%s' musi być jednym z '1','O', lub 'I'"
 
-# src/modules/lapack/Lapack.c: 116
-# error(_("error code %d from Lapack routine '%s'"), info, "dgesdd")
-# src/modules/lapack/Lapack.c: 123
-# error(_("error code %d from Lapack routine '%s'"), info, "dgesdd")
-# src/modules/lapack/Lapack.c: 182
-# error(_("error code %d from Lapack routine '%s'"), info, "dsyevr")
-# src/modules/lapack/Lapack.c: 193
-# error(_("error code %d from Lapack routine '%s'"), info, "dsyevr")
-# src/modules/lapack/Lapack.c: 275
-# error(_("error code %d from Lapack routine '%s'"), info, "dgeev")
-# src/modules/lapack/Lapack.c: 281
-# error(_("error code %d from Lapack routine '%s'"), info, "dgeev")
-# src/modules/lapack/Lapack.c: 617
-# error(_("error code %d from Lapack routine '%s'"), info, "zgeqp3")
-# src/modules/lapack/Lapack.c: 623
-# error(_("error code %d from Lapack routine '%s'"), info, "zgeqp3")
-# src/modules/lapack/Lapack.c: 677
-# error(_("error code %d from Lapack routine '%s'"), info, "zunmqr")
-# src/modules/lapack/Lapack.c: 684
-# error(_("error code %d from Lapack routine '%s'"), info, "zunmqr")
-# src/modules/lapack/Lapack.c: 688
-# error(_("error code %d from Lapack routine '%s'"), info, "ztrtrs")
-# src/modules/lapack/Lapack.c: 723
-# error(_("error code %d from Lapack routine '%s'"), info, "zunmqr")
-# src/modules/lapack/Lapack.c: 730
-# error(_("error code %d from Lapack routine '%s'"), info, "zunmqr")
-# src/modules/lapack/Lapack.c: 778
-# error(_("error code %d from Lapack routine '%s'"), info, "zgesdd")
-# src/modules/lapack/Lapack.c: 785
-# error(_("error code %d from Lapack routine '%s'"), info, "zgesdd")
-# src/modules/lapack/Lapack.c: 833
-# error(_("error code %d from Lapack routine '%s'"), info, "zheev")
-# src/modules/lapack/Lapack.c: 839
-# error(_("error code %d from Lapack routine '%s'"), info, "zheev")
-# src/modules/lapack/Lapack.c: 893
-# error(_("error code %d from Lapack routine '%s'"), info, "zgeev")
-# src/modules/lapack/Lapack.c: 899
-# error(_("error code %d from Lapack routine '%s'"), info, "zgeev")
-# src/modules/lapack/Lapack.c: 1133
-# error(_("error code %d from Lapack routine '%s'"), info, "dgeqp3")
-# src/modules/lapack/Lapack.c: 1139
-# error(_("error code %d from Lapack routine '%s'"), info, "dgeqp3")
-# src/modules/lapack/Lapack.c: 1187
-# error(_("error code %d from Lapack routine '%s'"), info, "dormqr")
-# src/modules/lapack/Lapack.c: 1194
-# error(_("error code %d from Lapack routine '%s'"), info, "dormqr")
-# src/modules/lapack/Lapack.c: 1198
-# error(_("error code %d from Lapack routine '%s'"), info, "dtrtrs")
-# src/modules/lapack/Lapack.c: 1226
-# error(_("error code %d from Lapack routine '%s'"), info, "dormqr")
-# src/modules/lapack/Lapack.c: 1233
-# error(_("error code %d from Lapack routine '%s'"), info, "dormqr")
-# src/modules/lapack/Lapack.c: 1253
-# error(_("error code %d from Lapack routine '%s'"), info, "dgetrf")
 #: src/modules/lapack/Lapack.c:116 src/modules/lapack/Lapack.c:123
 #: src/modules/lapack/Lapack.c:182 src/modules/lapack/Lapack.c:193
 #: src/modules/lapack/Lapack.c:275 src/modules/lapack/Lapack.c:281
@@ -13062,139 +6996,74 @@ msgstr "argument type[1]='%s' musi być jednym z '1','O', lub 'I'"
 #: src/modules/lapack/Lapack.c:730 src/modules/lapack/Lapack.c:779
 #: src/modules/lapack/Lapack.c:786 src/modules/lapack/Lapack.c:834
 #: src/modules/lapack/Lapack.c:840 src/modules/lapack/Lapack.c:894
-#: src/modules/lapack/Lapack.c:900 src/modules/lapack/Lapack.c:1134
-#: src/modules/lapack/Lapack.c:1140 src/modules/lapack/Lapack.c:1188
-#: src/modules/lapack/Lapack.c:1195 src/modules/lapack/Lapack.c:1199
-#: src/modules/lapack/Lapack.c:1227 src/modules/lapack/Lapack.c:1234
-#: src/modules/lapack/Lapack.c:1254
+#: src/modules/lapack/Lapack.c:900 src/modules/lapack/Lapack.c:1135
+#: src/modules/lapack/Lapack.c:1141 src/modules/lapack/Lapack.c:1189
+#: src/modules/lapack/Lapack.c:1196 src/modules/lapack/Lapack.c:1200
+#: src/modules/lapack/Lapack.c:1228 src/modules/lapack/Lapack.c:1235
+#: src/modules/lapack/Lapack.c:1255
 #, c-format
 msgid "error code %d from Lapack routine '%s'"
 msgstr "kod błędu %d w procedurze 'Lapack' '%s'"
 
-# src/modules/lapack/Lapack.c: 153
-# error(_("'x' must be a square numeric matrix"))
-# src/modules/lapack/Lapack.c: 248
-# error(_("'x' must be a square numeric matrix"))
-# src/modules/lapack/Lapack.c: 873
-# error(_("'x' must be a square numeric matrix"))
 #: src/modules/lapack/Lapack.c:153 src/modules/lapack/Lapack.c:248
 #: src/modules/lapack/Lapack.c:874
 msgid "'x' must be a square numeric matrix"
 msgstr "'x' musi być kwadratową macierzą liczbową"
 
-# src/modules/lapack/Lapack.c: 325
-# error(_("'A' must be a numeric matrix"))
-# src/modules/lapack/Lapack.c: 355
-# error(_("'A' must be a numeric matrix"))
-# src/modules/lapack/Lapack.c: 404
-# error(_("'A' must be a numeric matrix"))
 #: src/modules/lapack/Lapack.c:325 src/modules/lapack/Lapack.c:355
 #: src/modules/lapack/Lapack.c:404
 msgid "'A' must be a numeric matrix"
 msgstr "'A' musi być macierzą liczbową"
 
-# src/modules/lapack/Lapack.c: 327
-# error(_("'type' must be a character string"))
 #: src/modules/lapack/Lapack.c:327
 msgid "'type' must be a character string"
 msgstr "'type' musi być łańcuchem tekstowym"
 
-# src/modules/lapack/Lapack.c: 357
-# error(_("'norm' must be a character string"))
-# src/modules/lapack/Lapack.c: 405
-# error(_("'norm' must be a character string"))
-# src/modules/lapack/Lapack.c: 441
-# error(_("'norm' must be a character string"))
-# src/modules/lapack/Lapack.c: 498
-# error(_("'norm' must be a character string"))
 #: src/modules/lapack/Lapack.c:357 src/modules/lapack/Lapack.c:405
 #: src/modules/lapack/Lapack.c:441 src/modules/lapack/Lapack.c:498
 msgid "'norm' must be a character string"
 msgstr "'norm' musi być łańcuchem tekstowym"
 
-# src/modules/lapack/Lapack.c: 377
-# error(_("error [%d] from Lapack 'dgetrf()'"), info)
 #: src/modules/lapack/Lapack.c:377
 #, c-format
 msgid "error [%d] from Lapack 'dgetrf()'"
 msgstr "błąd [%d] w funkcji Lapack 'dgetrf()'"
 
-# src/modules/lapack/Lapack.c: 382
-# warning(_("exact singularity: U[%d,%d] = 0 in LU-decomposition {Lapack 'dgetrf()'}"),
-# 		    info,info)
 #: src/modules/lapack/Lapack.c:382
 #, c-format
 msgid "exact singularity: U[%d,%d] = 0 in LU-decomposition {Lapack 'dgetrf()'}"
 msgstr ""
 "dokładna osobliwość: U[%d,%d] = 0 w dekompozycji LU {Lapack 'dgetrf()'}"
 
-# src/modules/lapack/Lapack.c: 394
-# error(_("error [%d] from Lapack 'dgecon()'"), info)
 #: src/modules/lapack/Lapack.c:394
 #, c-format
 msgid "error [%d] from Lapack 'dgecon()'"
 msgstr "błąd [%d] w funkcji Lapack 'dgecon()'"
 
-# src/modules/lapack/Lapack.c: 414
-# error(_("'A' must be a *square* matrix"))
-# src/modules/lapack/Lapack.c: 446
-# error(_("'A' must be a *square* matrix"))
-# src/modules/lapack/Lapack.c: 504
-# error(_("'A' must be a *square* matrix"))
 #: src/modules/lapack/Lapack.c:414 src/modules/lapack/Lapack.c:446
 #: src/modules/lapack/Lapack.c:504
 msgid "'A' must be a *square* matrix"
 msgstr "'A' musi być macierzą *kwadratową*"
 
-# src/modules/lapack/Lapack.c: 428
-# error(_("error [%d] from Lapack 'dtrcon()'"), info)
 #: src/modules/lapack/Lapack.c:428
 #, c-format
 msgid "error [%d] from Lapack 'dtrcon()'"
 msgstr "błąd [%d] w funkcji Lapack 'dtrcon()'"
 
-# src/modules/lapack/Lapack.c: 443
-# error(_("'A' must be a complex matrix"))
-# src/modules/lapack/Lapack.c: 500
-# error(_("'A' must be a complex matrix"))
 #: src/modules/lapack/Lapack.c:443 src/modules/lapack/Lapack.c:500
 msgid "'A' must be a complex matrix"
 msgstr "'A' musi być macierzą zespoloną"
 
-# src/modules/lapack/Lapack.c: 465
-# error(_("error [%d] from Lapack 'zgetrf()'"), info)
-# src/modules/lapack/Lapack.c: 472
-# error(_("error [%d] from Lapack 'zgetrf()'"), info)
 #: src/modules/lapack/Lapack.c:465 src/modules/lapack/Lapack.c:472
 #, c-format
 msgid "error [%d] from Lapack 'zgetrf()'"
 msgstr "błąd [%d] w funkcji Lapack 'zgetrf()'"
 
-# src/modules/lapack/Lapack.c: 480
-# error(_("error [%d] from Lapack 'zgecon()'"), info)
 #: src/modules/lapack/Lapack.c:480
 #, c-format
 msgid "error [%d] from Lapack 'zgecon()'"
 msgstr "błąd [%d] w funkcji Lapack 'zgecon()'"
 
-# src/modules/lapack/Lapack.c: 484
-# error(_("Fortran complex functions are not available on this platform"))
-# src/modules/lapack/Lapack.c: 519
-# error(_("Fortran complex functions are not available on this platform"))
-# src/modules/lapack/Lapack.c: 588
-# error(_("Fortran complex functions are not available on this platform"))
-# src/modules/lapack/Lapack.c: 648
-# error(_("Fortran complex functions are not available on this platform"))
-# src/modules/lapack/Lapack.c: 692
-# error(_("Fortran complex functions are not available on this platform"))
-# src/modules/lapack/Lapack.c: 734
-# error(_("Fortran complex functions are not available on this platform"))
-# src/modules/lapack/Lapack.c: 799
-# error(_("Fortran complex functions are not available on this platform"))
-# src/modules/lapack/Lapack.c: 856
-# error(_("Fortran complex functions are not available on this platform"))
-# src/modules/lapack/Lapack.c: 916
-# error(_("Fortran complex functions are not available on this platform"))
 #: src/modules/lapack/Lapack.c:484 src/modules/lapack/Lapack.c:519
 #: src/modules/lapack/Lapack.c:588 src/modules/lapack/Lapack.c:648
 #: src/modules/lapack/Lapack.c:692 src/modules/lapack/Lapack.c:734
@@ -13203,351 +7072,235 @@ msgstr "błąd [%d] w funkcji Lapack 'zgecon()'"
 msgid "Fortran complex functions are not available on this platform"
 msgstr "funkcje zespolone w języku Fortran nie są dozwolone na tej platformie"
 
-# src/modules/lapack/Lapack.c: 516
-# error(_("error [%d] from Lapack 'ztrcon()'"), info)
 #: src/modules/lapack/Lapack.c:516
 #, c-format
 msgid "error [%d] from Lapack 'ztrcon()'"
 msgstr "błąd [%d] w funkcji Lapack 'ztrcon()'"
 
-# src/modules/lapack/Lapack.c: 532
-# error(_("'a' must be a complex matrix"))
-# src/modules/lapack/Lapack.c: 602
-# error(_("'a' must be a complex matrix"))
 #: src/modules/lapack/Lapack.c:532 src/modules/lapack/Lapack.c:602
 msgid "'a' must be a complex matrix"
 msgstr "'a' musi być macierzą zespoloną"
 
-# src/modules/lapack/Lapack.c: 535
-# error(_("'a' is 0-diml"))
-# src/modules/lapack/Lapack.c: 1041
-# error(_("'a' is 0-diml"))
-#: src/modules/lapack/Lapack.c:535 src/modules/lapack/Lapack.c:1042
+#: src/modules/lapack/Lapack.c:535 src/modules/lapack/Lapack.c:1043
 msgid "'a' is 0-diml"
 msgstr "'a' jest 0-wymiarowe"
 
-# src/modules/lapack/Lapack.c: 537
-# error(_("'a' (%d x %d) must be square"), n, n2)
-# src/modules/lapack/Lapack.c: 1043
-# error(_("'a' (%d x %d) must be square"), n, n2)
-#: src/modules/lapack/Lapack.c:537 src/modules/lapack/Lapack.c:1044
+#: src/modules/lapack/Lapack.c:537 src/modules/lapack/Lapack.c:1045
 #, c-format
 msgid "'a' (%d x %d) must be square"
 msgstr "'A' (%d x %d) musi być macierzą kwadratową"
 
-# src/modules/lapack/Lapack.c: 543
-# error(_("no right-hand side in 'b'"))
-# src/modules/lapack/Lapack.c: 1049
-# error(_("no right-hand side in 'b'"))
-#: src/modules/lapack/Lapack.c:543 src/modules/lapack/Lapack.c:1050
+#: src/modules/lapack/Lapack.c:543 src/modules/lapack/Lapack.c:1051
 msgid "no right-hand side in 'b'"
 msgstr "brak prawej strony w 'b'"
 
-# src/modules/lapack/Lapack.c: 546
-# error(_("'b' (%d x %d) must be compatible with 'a' (%d x %d)"),
-# 		  p2, p, n, n)
-# src/modules/lapack/Lapack.c: 560
-# error(_("'b' (%d x %d) must be compatible with 'a' (%d x %d)"),
-# 		  length(Bin), p, n, n)
-# src/modules/lapack/Lapack.c: 1052
-# error(_("'b' (%d x %d) must be compatible with 'a' (%d x %d)"),
-# 		  p2, p, n, n)
-# src/modules/lapack/Lapack.c: 1068
-# error(_("'b' (%d x %d) must be compatible with 'a' (%d x %d)"),
-# 		  length(Bin), p, n, n)
 #: src/modules/lapack/Lapack.c:546 src/modules/lapack/Lapack.c:560
-#: src/modules/lapack/Lapack.c:1053 src/modules/lapack/Lapack.c:1069
+#: src/modules/lapack/Lapack.c:1054 src/modules/lapack/Lapack.c:1070
 #, c-format
 msgid "'b' (%d x %d) must be compatible with 'a' (%d x %d)"
 msgstr "macierz 'B' (%d x %d) musi być zgodna z macierzą 'A' (%d x %d)"
 
-# src/modules/lapack/Lapack.c: 581
-# error(_("argument %d of Lapack routine %s had invalid value"),
-# 	      -info, "zgesv")
-# src/modules/lapack/Lapack.c: 947
-# error(_("argument %d of Lapack routine %s had invalid value"),
-# 		  -info, "dpotrf")
-# src/modules/lapack/Lapack.c: 961
-# error(_("argument %d of Lapack routine %s had invalid value"),
-# 		      -info, "dpstrf")
-# src/modules/lapack/Lapack.c: 1016
-# error(_("argument %d of Lapack routine %s had invalid value"),
-# 		  -info, "dpotri")
-# src/modules/lapack/Lapack.c: 1090
-# error(_("argument %d of Lapack routine %s had invalid value"),
-# 	      -info, "dgesv")
 #: src/modules/lapack/Lapack.c:581 src/modules/lapack/Lapack.c:948
-#: src/modules/lapack/Lapack.c:962 src/modules/lapack/Lapack.c:1017
-#: src/modules/lapack/Lapack.c:1091
+#: src/modules/lapack/Lapack.c:962 src/modules/lapack/Lapack.c:1018
+#: src/modules/lapack/Lapack.c:1092
 #, c-format
 msgid "argument %d of Lapack routine %s had invalid value"
 msgstr "argument %d procedury 'Lapack' '%s' posiadał niepoprawną wartość"
 
-# src/modules/lapack/Lapack.c: 662
-# error(_("'b' must be a complex matrix"))
-# src/modules/lapack/Lapack.c: 707
-# error(_("'b' must be a complex matrix"))
 #: src/modules/lapack/Lapack.c:662 src/modules/lapack/Lapack.c:707
 msgid "'b' must be a complex matrix"
 msgstr "'b' musi być macierzą zespoloną"
 
-# src/modules/lapack/Lapack.c: 670
-# error(_("right-hand side should have %d not %d rows"), n, Bdims[0])
-# src/modules/lapack/Lapack.c: 716
-# error(_("right-hand side should have %d not %d rows"), n, Bdims[0])
-# src/modules/lapack/Lapack.c: 1180
-# error(_("right-hand side should have %d not %d rows"), n, Bdims[0])
-# src/modules/lapack/Lapack.c: 1219
-# error(_("right-hand side should have %d not %d rows"), n, Bdims[0])
 #: src/modules/lapack/Lapack.c:670 src/modules/lapack/Lapack.c:716
-#: src/modules/lapack/Lapack.c:1181 src/modules/lapack/Lapack.c:1220
+#: src/modules/lapack/Lapack.c:1182 src/modules/lapack/Lapack.c:1221
 #, c-format
 msgid "right-hand side should have %d not %d rows"
 msgstr "prawa strona powinna mieć %d wierszy, a nie %d "
 
-# src/modules/lapack/Lapack.c: 84
-# error("'jobu' must be a character string")
-# src/modules/lapack/Lapack.c: 743
-# error(_("'jobu' must be a character string"))
 #: src/modules/lapack/Lapack.c:743
 msgid "'jobu' must be a character string"
 msgstr "argument 'jobu' musi być łańcuchem tekstowym"
 
-# src/modules/lapack/Lapack.c: 751
-# error(_("matrices of 2^31 or more elements are not supported"))
 #: src/modules/lapack/Lapack.c:751
 msgid "matrices of 2^31 or more elements are not supported"
 msgstr "macierze o 2^31 lub większej liczbie elementów nie są wpierane"
 
-# src/modules/lapack/Lapack.c: 815
-# error(_("'x' must be a square complex matrix"))
 #: src/modules/lapack/Lapack.c:816
 msgid "'x' must be a square complex matrix"
 msgstr "'x' musi być kwadratową macierzą zespoloną"
 
-# src/modules/lapack/Lapack.c: 925
-# error(_("'a' must be a numeric matrix"))
-# src/modules/lapack/Lapack.c: 999
-# error(_("'a' must be a numeric matrix"))
-# src/modules/lapack/Lapack.c: 1038
-# error(_("'a' must be a numeric matrix"))
-# src/modules/lapack/Lapack.c: 1113
-# error(_("'a' must be a numeric matrix"))
-# src/modules/lapack/Lapack.c: 1244
-# error(_("'a' must be a numeric matrix"))
-#: src/modules/lapack/Lapack.c:926 src/modules/lapack/Lapack.c:1000
-#: src/modules/lapack/Lapack.c:1039 src/modules/lapack/Lapack.c:1114
-#: src/modules/lapack/Lapack.c:1245
+#: src/modules/lapack/Lapack.c:926 src/modules/lapack/Lapack.c:1001
+#: src/modules/lapack/Lapack.c:1040 src/modules/lapack/Lapack.c:1115
+#: src/modules/lapack/Lapack.c:1246
 msgid "'a' must be a numeric matrix"
 msgstr "'a' musi być macierzą liczbową"
 
-# src/modules/lapack/Lapack.c: 932
-# error(_("'a' must be a square matrix"))
-# src/modules/lapack/Lapack.c: 1249
-# error(_("'a' must be a square matrix"))
-#: src/modules/lapack/Lapack.c:933 src/modules/lapack/Lapack.c:1250
+#: src/modules/lapack/Lapack.c:933 src/modules/lapack/Lapack.c:1251
 msgid "'a' must be a square matrix"
 msgstr "'a' musi być macierzą kwadratową"
 
-# src/modules/lapack/Lapack.c: 933
-# error(_("'a' must have dims > 0"))
 #: src/modules/lapack/Lapack.c:934
 msgid "'a' must have dims > 0"
 msgstr "macierz 'A' musi mieć wymiary > 0"
 
-# src/modules/lapack/Lapack.c: 945
-# error(_("the leading minor of order %d is not positive definite"),
-# 		      info)
 #: src/modules/lapack/Lapack.c:946
 #, c-format
 msgid "the leading minor of order %d is not positive definite"
 msgstr "wiodący minor rzędu %d nie jest dodatnio określony"
 
-# src/modules/lapack/Lapack.c: 959
-# warning(_("the matrix is either rank-deficient or indefinite"))
 #: src/modules/lapack/Lapack.c:960
 msgid "the matrix is either rank-deficient or indefinite"
 msgstr "macierzy brakuje rang lub też jest nieokreślona"
 
-# src/modules/lapack/Lapack.c: 986
-# error(_("'size' argument must be a positive integer"))
-#: src/modules/lapack/Lapack.c:987
+#: src/modules/lapack/Lapack.c:988
 msgid "'size' argument must be a positive integer"
 msgstr "argument 'size' musi być dodatnią liczbą całkowitą"
 
-# src/modules/lapack/Lapack.c: 1001
-# error(_("'size' cannot exceed ncol(x) = %d"), n)
-#: src/modules/lapack/Lapack.c:1002
+#: src/modules/lapack/Lapack.c:1003
 #, c-format
 msgid "'size' cannot exceed ncol(x) = %d"
 msgstr "'size' nie może przewyższyć ncol(x) = %d"
 
-# src/modules/lapack/Lapack.c: 1002
-# error(_("'size' cannot exceed nrow(x) = %d"), m)
-#: src/modules/lapack/Lapack.c:1003
+#: src/modules/lapack/Lapack.c:1004
 #, c-format
 msgid "'size' cannot exceed nrow(x) = %d"
 msgstr "'size' nie może przewyższyć nrow(x) = %d"
 
-# src/modules/lapack/Lapack.c: 1014
-# error(_("element (%d, %d) is zero, so the inverse cannot be computed"),
-# 		      info, info)
-#: src/modules/lapack/Lapack.c:1015
+#: src/modules/lapack/Lapack.c:1016
 #, c-format
 msgid "element (%d, %d) is zero, so the inverse cannot be computed"
 msgstr ""
 "element (%d, %d) jest zerem, tak więc odwrotność nie może zostać wyliczona"
 
-# src/modules/lapack/Lapack.c: 1093
-# error(_("Lapack routine %s: system is exactly singular: U[%d,%d] = 0"),
-# 	      "dgesv", info, info)
-#: src/modules/lapack/Lapack.c:1094
+#: src/modules/lapack/Lapack.c:1095
 #, c-format
 msgid "Lapack routine %s: system is exactly singular: U[%d,%d] = 0"
 msgstr "procedura Lapack %s: system jest dokładnie osobliwy: U[%d,%d] = 0"
 
-# src/modules/lapack/Lapack.c: 1101
-# error(_("system is computationally singular: reciprocal condition number = %g"),
-# 		  rcond)
-#: src/modules/lapack/Lapack.c:1102
+#: src/modules/lapack/Lapack.c:1103
 #, c-format
 msgid "system is computationally singular: reciprocal condition number = %g"
 msgstr "system jest obliczeniowo osobliwy: numer odwrotnego warunku = %g"
 
-# src/modules/lapack/Lapack.c: 1173
-# error(_("'b' must be a numeric matrix"))
-# src/modules/lapack/Lapack.c: 1211
-# error(_("'b' must be a numeric matrix"))
-#: src/modules/lapack/Lapack.c:1174 src/modules/lapack/Lapack.c:1212
+#: src/modules/lapack/Lapack.c:1175 src/modules/lapack/Lapack.c:1213
 msgid "'b' must be a numeric matrix"
 msgstr "'b' musi być macierzą liczbową"
 
-# src/modules/lapack/Lapack.c: 1245
-# error(_("argument 'logarithm' must be logical"))
-#: src/modules/lapack/Lapack.c:1246
+#: src/modules/lapack/Lapack.c:1247
 msgid "argument 'logarithm' must be logical"
 msgstr "argument 'logarithm' musi być logiczny"
 
-# src/nmath/bessel_i.c: 69
-#  _("bessel_i allocation error")
 #: src/nmath/bessel_i.c:69
 msgid "bessel_i allocation error"
 msgstr "błąd przydziału 'bessel_i'"
 
 #: src/nmath/bessel_i.c:77 src/nmath/bessel_i.c:122
 #, c-format
-msgid "bessel_i(%g): ncalc (=%ld) != nb (=%ld); alpha=%g. Arg. out of range?\n"
+msgid "bessel_i(%g): ncalc (=%d) != nb (=%d); alpha=%g. Arg. out of range?\n"
 msgstr ""
-"bessel_i(%g): ncalc (=%ld) != nb (=%ld); alpha=%g. Argument poza zakresem?\n"
+"bessel_i(%g): ncalc (=%d) != nb (=%d); alpha=%g. Argument poza zakresem?\n"
 
 #: src/nmath/bessel_i.c:80 src/nmath/bessel_i.c:125
 #, c-format
 msgid "bessel_i(%g,nu=%g): precision lost in result\n"
 msgstr "bessel_i(%g,nu=%g): precyzja utracona w wyniku\n"
 
-# src/nmath/bessel_j.c: 67
-#  _("bessel_j allocation error")
-#: src/nmath/bessel_j.c:67
+#: src/nmath/bessel_j.c:64 src/nmath/bessel_j.c:118
+#, c-format
+msgid "besselJ(x, nu): nu=%g too large for bessel_j() algorithm"
+msgstr "'besselJ(x, nu)': 'nu=%g' jest zbyt duże dla algorytmu 'bessel_j()'"
+
+#: src/nmath/bessel_j.c:72
 msgid "bessel_j allocation error"
 msgstr "błąd przydziału 'bessel_j'"
 
-#: src/nmath/bessel_j.c:75 src/nmath/bessel_j.c:118
+#: src/nmath/bessel_j.c:80 src/nmath/bessel_j.c:127
 #, c-format
-msgid "bessel_j(%g): ncalc (=%ld) != nb (=%ld); alpha=%g. Arg. out of range?\n"
+msgid "bessel_j(%g): ncalc (=%d) != nb (=%d); alpha=%g. Arg. out of range?\n"
 msgstr ""
-"bessel_j(%g): ncalc (=%ld) != nb (=%ld); alpha=%g. Argument poza zakresem?\n"
+"bessel_j(%g): ncalc (=%d) != nb (=%d); alpha=%g. Argument poza zakresem?\n"
 
-#: src/nmath/bessel_j.c:78 src/nmath/bessel_j.c:121
+#: src/nmath/bessel_j.c:83 src/nmath/bessel_j.c:130
 #, c-format
 msgid "bessel_j(%g,nu=%g): precision lost in result\n"
 msgstr "bessel_j(%g,nu=%g): precyzja utracona w wyniku\n"
 
-# src/nmath/bessel_k.c: 63
-#  _("bessel_k allocation error")
 #: src/nmath/bessel_k.c:63
 msgid "bessel_k allocation error"
 msgstr "błąd przydziału 'bessel_k'"
 
 #: src/nmath/bessel_k.c:71 src/nmath/bessel_k.c:108
 #, c-format
-msgid "bessel_k(%g): ncalc (=%ld) != nb (=%ld); alpha=%g. Arg. out of range?\n"
+msgid "bessel_k(%g): ncalc (=%d) != nb (=%d); alpha=%g. Arg. out of range?\n"
 msgstr ""
-"bessel_k(%g): ncalc (=%ld) != nb (=%ld); alpha=%g. Argument poza zakresem?\n"
+"bessel_k(%g): ncalc (=%d) != nb (=%d); alpha=%g. Argument poza zakresem?\n"
 
 #: src/nmath/bessel_k.c:74 src/nmath/bessel_k.c:111
 #, c-format
 msgid "bessel_k(%g,nu=%g): precision lost in result\n"
 msgstr "bessel_k(%g,nu=%g): precyzja utracona w wyniku\n"
 
-# src/nmath/bessel_y.c: 66
-#  _("bessel_y allocation error")
-#: src/nmath/bessel_y.c:66
+#: src/nmath/bessel_y.c:63 src/nmath/bessel_y.c:125
+#, c-format
+msgid "besselY(x, nu): nu=%g too large for bessel_y() algorithm"
+msgstr "'besselY(x, nu)': 'nu=%g' jest zbyt duże dla algorytmu 'bessel_y()'"
+
+#: src/nmath/bessel_y.c:71
 msgid "bessel_y allocation error"
 msgstr "błąd przydziału 'bessel_y'"
 
-#: src/nmath/bessel_y.c:82 src/nmath/bessel_y.c:127
+#: src/nmath/bessel_y.c:87 src/nmath/bessel_y.c:136
 #, c-format
-msgid "bessel_y(%g): ncalc (=%ld) != nb (=%ld); alpha=%g. Arg. out of range?\n"
+msgid "bessel_y(%g): ncalc (=%d) != nb (=%d); alpha=%g. Arg. out of range?\n"
 msgstr ""
-"bessel_y(%g): ncalc (=%ld) != nb (=%ld); alpha=%g. Argument poza zakresem?\n"
+"bessel_y(%g): ncalc (=%d) != nb (=%d); alpha=%g. Argument poza zakresem?\n"
 
-#: src/nmath/bessel_y.c:85 src/nmath/bessel_y.c:130
+#: src/nmath/bessel_y.c:90 src/nmath/bessel_y.c:139
 #, c-format
 msgid "bessel_y(%g,nu=%g): precision lost in result\n"
 msgstr "bessel_y(%g,nu=%g): precyzja utracona w wyniku\n"
 
-# src/nmath/choose.c: 79
-# (_("'k' (%.2f) must be integer, rounded to %.0f"), k0, k)
-# src/nmath/choose.c: 122
-# (_("'k' (%.2f) must be integer, rounded to %.0f"), k0, k)
 #: src/nmath/choose.c:79 src/nmath/choose.c:122
 #, c-format
 msgid "'k' (%.2f) must be integer, rounded to %.0f"
 msgstr "'k' (%.2f) musi być liczbą całkowitą, zaokrągloną do %.0f"
 
-#: src/nmath/nmath.h:141
+#: src/nmath/nmath.h:156
 #, c-format
 msgid "argument out of domain in '%s'\n"
 msgstr "argument spoza dziedziny w '%s'\n"
 
-#: src/nmath/nmath.h:144
+#: src/nmath/nmath.h:159
 #, c-format
 msgid "value out of range in '%s'\n"
 msgstr "wartość poza zakresem w '%s'\n"
 
-#: src/nmath/nmath.h:147
+#: src/nmath/nmath.h:162
 #, c-format
 msgid "convergence failed in '%s'\n"
 msgstr "uzbieżnienie nie powiodło się w '%s'\n"
 
-#: src/nmath/nmath.h:150
+#: src/nmath/nmath.h:165
 #, c-format
 msgid "full precision may not have been achieved in '%s'\n"
 msgstr "pełna precyzja może nie zostać osiągnięta w '%s'\n"
 
-#: src/nmath/nmath.h:153
+#: src/nmath/nmath.h:168
 #, c-format
 msgid "underflow occurred in '%s'\n"
 msgstr "wystąpił niedomiar w '%s'\n"
 
-# src/nmath/pbeta.c: 48
-# (_("pbeta_raw() -> bratio() gave error code %d"), ierr)
-#: src/nmath/pbeta.c:48
+#: src/nmath/pbeta.c:64
 #, c-format
-msgid "pbeta_raw() -> bratio() gave error code %d"
-msgstr "pbeta_raw() -> bratio() zwróciło kod błędu %d"
+msgid "pbeta_raw(%g, a=%g, b=%g, ..) -> bratio() gave error code %d"
+msgstr "pbeta_raw(%g, a=%g, b=%g, ..) -> bratio() zwróciło kod błędu %d"
 
-# src/nmath/pnbinom.c: 79
-# (_("pnbinom_mu() -> bratio() gave error code %d"), ierr)
-#: src/nmath/pnbinom.c:79
+#: src/nmath/pnbinom.c:82
 #, c-format
 msgid "pnbinom_mu() -> bratio() gave error code %d"
 msgstr "pnbinom_mu() -> bratio() zwróciło kod błędu %d"
 
-# src/nmath/pnchisq.c: 246
-# (_("pnchisq(x=%g, ..): not converged in %d iter."),
-# 			 x, itrmax)
-#: src/nmath/pnchisq.c:246
+#: src/nmath/pnchisq.c:295
 #, c-format
 msgid "pnchisq(x=%g, ..): not converged in %d iter."
 msgstr "pnchisq(x=%g, ..): nie uzbieżnił się w %d iteracjach."
@@ -13557,16 +7310,11 @@ msgstr "pnchisq(x=%g, ..): nie uzbieżnił się w %d iteracjach."
 msgid "deriv = %d > %d (= n_max)\n"
 msgstr "pochodna = %d > %d (= n_max)\n"
 
-# src/nmath/rmultinom.c: 78
-# (_("rbinom: probability sum should be 1, but is %g"), 
-# 		      (double) p_tot)
 #: src/nmath/rmultinom.c:78
 #, c-format
 msgid "rbinom: probability sum should be 1, but is %g"
 msgstr "rbinom: suma prawdopodobieństw powinna wynosić 1, a wynosi %g"
 
-# src/nmath/signrank.c: 77
-#  _("signrank allocation error")
 #: src/nmath/signrank.c:77
 msgid "signrank allocation error"
 msgstr "błąd przydziału 'signrank'"
@@ -13576,64 +7324,28 @@ msgstr "błąd przydziału 'signrank'"
 msgid "norm_rand(): invalid N01_kind: %d\n"
 msgstr "'norm_rand()': niepoprawny 'N01_kind': %d\n"
 
-# src/nmath/wilcox.c: 85
-# (_("wilcox allocation error %d"), 1)
-# src/nmath/wilcox.c: 95
-# (_("wilcox allocation error %d"), 2)
-# src/nmath/wilcox.c: 148
-# (_("wilcox allocation error %d"), 3)
-# src/nmath/wilcox.c: 313
-# (_("wilcox allocation error %d"), 4)
 #: src/nmath/wilcox.c:85 src/nmath/wilcox.c:95 src/nmath/wilcox.c:148
 #: src/nmath/wilcox.c:313
 #, c-format
 msgid "wilcox allocation error %d"
 msgstr "błąd %d przydziału 'wilcox'"
 
-# src/unix/X11.c: 54
-# warning(_("X11 module is not available under this GUI"))
 #: src/unix/X11.c:54
 msgid "X11 module is not available under this GUI"
 msgstr "moduł X11 nie jest dostępny w tym GUI"
 
-# src/unix/X11.c: 60
-# error(_("X11 routines cannot be accessed in module"))
 #: src/unix/X11.c:60
 msgid "X11 routines cannot be accessed in module"
 msgstr "procedury X11 nie są dostępne w module"
 
-# src/unix/X11.c: 78
-# error(_("X11 module cannot be loaded"))
-# src/unix/X11.c: 90
-# error(_("X11 module cannot be loaded"))
-# src/unix/X11.c: 102
-# error(_("X11 module cannot be loaded"))
-# src/unix/X11.c: 113
-# error(_("X11 module cannot be loaded"))
 #: src/unix/X11.c:78 src/unix/X11.c:90 src/unix/X11.c:102 src/unix/X11.c:113
 msgid "X11 module cannot be loaded"
 msgstr "moduł X11 nie może zostać załadowany"
 
-# src/unix/X11.c: 126
-# error(_("X11 is not available"))
-# src/unix/X11.c: 132
-# error(_("X11 is not available"))
-# src/unix/X11.c: 138
-# error(_("X11 is not available"))
-# src/unix/X11.c: 144
-# error(_("X11 is not available"))
-# src/library/utils/src/stubs.c: 156
-# warning(_("X11 is not available"))
-# src/library/utils/src/stubs.c: 185
-# error(_("X11 is not available"))
-# src/library/utils/src/stubs.c: 191
-# error(_("X11 is not available"))
-#: src/unix/X11.c:126 src/unix/X11.c:132 src/unix/X11.c:138 src/unix/X11.c:144
+#: src/unix/X11.c:144 src/unix/X11.c:150 src/unix/X11.c:156 src/unix/X11.c:162
 msgid "X11 is not available"
 msgstr "X11 nie jest dostępne"
 
-# src/unix/dynload.c: 143
-# N_("Explicit local dynamic loading not supported on this platform. Using default.")
 #: src/unix/dynload.c:143
 msgid ""
 "Explicit local dynamic loading not supported on this platform. Using default."
@@ -13641,8 +7353,6 @@ msgstr ""
 "Jawne lokalne dynamiczne ładowanie nie jest obsługiwane na tej platformie. "
 "Używanie domyślnego."
 
-# src/unix/dynload.c: 144
-# N_("Explicit global dynamic loading not supported on this platform. Using default.")
 #: src/unix/dynload.c:144
 msgid ""
 "Explicit global dynamic loading not supported on this platform. Using "
@@ -13651,8 +7361,6 @@ msgstr ""
 "Jawne globalne dynamiczne ładowanie nie jest obsługiwane na tej platformie. "
 "Używanie domyślnego."
 
-# src/unix/dynload.c: 145
-# N_("Explicit non-lazy dynamic loading not supported on this platform. Using default.")
 #: src/unix/dynload.c:145
 msgid ""
 "Explicit non-lazy dynamic loading not supported on this platform. Using "
@@ -13661,8 +7369,6 @@ msgstr ""
 "Jawne nieleniwe dynamiczne ładowanie nie jest obsługiwane na tej platformie. "
 "Używanie domyślnego."
 
-# src/unix/dynload.c: 146
-# N_("Explicit lazy dynamic loading not supported on this platform. Using default.")
 #: src/unix/dynload.c:146
 msgid ""
 "Explicit lazy dynamic loading not supported on this platform. Using default."
@@ -13670,20 +7376,14 @@ msgstr ""
 "Jawne leniwe dynamiczne ładowanie nie jest obsługiwane na tej platformie. "
 "Używanie domyślnego."
 
-# src/unix/dynload.c: 240
-#  _("cannot get working directory!")
-#: src/unix/dynload.c:240
+#: src/unix/dynload.c:232
 msgid "cannot get working directory!"
 msgstr "nie można uzyskać dostępu do katalogu roboczego"
 
-# src/unix/sys-std.c: 131
-# error(_("interrupt handler must not return"))
 #: src/unix/sys-std.c:131
 msgid "interrupt handler must not return"
 msgstr "obsługa przerwań nie może zwracać"
 
-# src/unix/sys-std.c: 521
-# warning(_("An unusual circumstance has arisen in the nesting of readline input. Please report using bug.report()"))
 #: src/unix/sys-std.c:521
 msgid ""
 "An unusual circumstance has arisen in the nesting of readline input. Please "
@@ -13692,19 +7392,12 @@ msgstr ""
 "Pojawił się niezwykły przypadek podczas zagnieżdżania wejścia 'readline'. "
 "Proszę zgłosić raport używając bug.report()"
 
-# src/unix/sys-std.c: 1082
-# warning(_("problem in saving the history file '%s'"), 
-# 			    R_HistoryFile)
-# src/unix/sys-std.c: 1249
-# error(_("problem in saving the history file '%s'"), file)
-#: src/unix/sys-std.c:1082 src/unix/sys-std.c:1249
+#: src/unix/sys-std.c:1085 src/unix/sys-std.c:1255
 #, c-format
 msgid "problem in saving the history file '%s'"
 msgstr "problem z zapisaniem pliku historii '%s'"
 
-# src/unix/sys-std.c: 1156
-#  _("Cannot open file '%s': %s\n\n")
-#: src/unix/sys-std.c:1156
+#: src/unix/sys-std.c:1162
 #, c-format
 msgid ""
 "Cannot open file '%s': %s\n"
@@ -13713,131 +7406,238 @@ msgstr ""
 "Nie można otworzyć pliku '%s': %s\n"
 "\n"
 
-# src/unix/sys-std.c: 1220
-#  _("'file' argument is too long")
-# src/unix/sys-std.c: 1243
-#  _("'file' argument is too long")
-#: src/unix/sys-std.c:1220 src/unix/sys-std.c:1243
+#: src/unix/sys-std.c:1226 src/unix/sys-std.c:1249
 msgid "'file' argument is too long"
 msgstr "argument 'file' jest zbyt długi"
 
-# src/unix/sys-std.c: 1226
-#  _("no history mechanism available")
-# src/unix/sys-std.c: 1228
-#  _("no history mechanism available")
-#: src/unix/sys-std.c:1226 src/unix/sys-std.c:1228
+#: src/unix/sys-std.c:1232 src/unix/sys-std.c:1234
 msgid "no history mechanism available"
 msgstr "brak dostępnego mechanizmu historii"
 
-# src/unix/sys-std.c: 1255
-# warning(_("problem in truncating the history file"))
-#: src/unix/sys-std.c:1255
+#: src/unix/sys-std.c:1261
 msgid "problem in truncating the history file"
 msgstr "problem z przycięciem pliku historii"
 
-# src/unix/sys-std.c: 1257
-#  _("no history available to save")
-# src/unix/sys-std.c: 1259
-#  _("no history available to save")
-#: src/unix/sys-std.c:1257 src/unix/sys-std.c:1259
+#: src/unix/sys-std.c:1263 src/unix/sys-std.c:1265
 msgid "no history available to save"
 msgstr "brak dostępnej historii do zapisania"
 
-# src/unix/sys-std.c: 1271
-#  _("invalid timestamp")
-# src/library/utils/src/stubs.c: 86
-#  _("invalid timestamp")
-#: src/unix/sys-std.c:1271
+#: src/unix/sys-std.c:1277
 msgid "invalid timestamp"
 msgstr "niepoprawna sygnatura czasu"
 
-# src/unix/sys-unix.c: 251
-# error(_("non-empty character argument expected"))
-#: src/unix/sys-unix.c:251
+#: src/unix/sys-unix.c:248
 msgid "non-empty character argument expected"
 msgstr "oczekiwano niepustego argumentu tekstowego"
 
-# src/unix/sys-unix.c: 254
-# error(_("'intern' must be logical and not NA"))
-#: src/unix/sys-unix.c:254
+#: src/unix/sys-unix.c:251
 msgid "'intern' must be logical and not NA"
 msgstr "'intern' musi być wartością logiczną oraz nie może być wartością NA"
 
-# src/unix/sys-unix.c: 266
-# error(_("cannot popen '%s', probable reason '%s'"),
-# 		  cmd, strerror(errno))
-#: src/unix/sys-unix.c:266
+#: src/unix/sys-unix.c:269
 #, c-format
 msgid "cannot popen '%s', probable reason '%s'"
 msgstr "nie można otworzyć '%s', prawdopodobny powód '%s'"
 
-# src/unix/sys-unix.c: 271
-# warning(_("line %d may be truncated in call to system(, intern = TRUE)"), i + 1)
-#: src/unix/sys-unix.c:271
+#: src/unix/sys-unix.c:279
 #, c-format
 msgid "line %d may be truncated in call to system(, intern = TRUE)"
 msgstr ""
 "linia %d może zostać przycięta w wywołaniu w systemie (, intern = TRUE)"
 
-# src/unix/sys-unix.c: 288
-# error(_("error in running command: '%s'"), strerror(errno))
-#: src/unix/sys-unix.c:288
+#: src/unix/sys-unix.c:301
 #, c-format
 msgid "error in running command: '%s'"
 msgstr "błąd w uruchamianym poleceniu: '%s'"
 
-# src/unix/sys-unix.c: 290
-# error(_("error in running command"))
-#: src/unix/sys-unix.c:290
+#: src/unix/sys-unix.c:303
 msgid "error in running command"
 msgstr "błąd podczas uruchamiania polecenia"
 
-# src/unix/sys-unix.c: 293
-# warningcall(R_NilValue, 
-# 			    _("running command '%s' had status %d and error message '%s'"), 
-# 			    cmd, res, 
-# 			    strerror(errno))
-#: src/unix/sys-unix.c:294
+#: src/unix/sys-unix.c:307
 #, c-format
 msgid "running command '%s' had status %d and error message '%s'"
 msgstr ""
 "działające polecenie '%s' otrzymało status %d oraz komunikat błędu '%s'"
 
-# src/unix/sys-unix.c: 399
-# warning(_("Sys.info() is not implemented on this system"))
-#: src/unix/sys-unix.c:399
+#: src/unix/sys-unix.c:412
 msgid "Sys.info() is not implemented on this system"
 msgstr "'Sys.info()' nie jest zaimplementowane w tym systemie"
 
-# src/unix/system.c: 257
-#  _("WARNING: --gui or -g without value ignored")
-#: src/unix/system.c:257
+#: src/unix/system.c:267
 #, c-format
 msgid "WARNING: --gui or -g without value ignored"
 msgstr "OSTRZEŻENIE: zignorowano --gui lub -g bez wartości"
 
-#: src/unix/system.c:275
+#: src/unix/system.c:285
 #, c-format
 msgid "WARNING: unknown gui '%s', using X11\n"
 msgstr "OSTRZEŻENIE: nieznane gui '%s', używanie X11\n"
 
-#: src/unix/system.c:278
+#: src/unix/system.c:288
 #, c-format
 msgid "WARNING: unknown gui '%s', using none\n"
 msgstr "OSTRZEŻENIE: nieznane gui '%s', nie używam żadnego\n"
 
-# src/unix/system.c: 388
-# (_("creating temporary file for '-e' failed"))
-#: src/unix/system.c:388
+#: src/unix/system.c:373
 msgid "creating temporary file for '-e' failed"
 msgstr "tworzenie pliku tymczasowego dla '-e' nie powiodło się"
 
-# src/unix/system.c: 469
-# (_("WARNING: Only editing the first in the list of files"))
-#: src/unix/system.c:469
+#: src/unix/system.c:454
 msgid "WARNING: Only editing the first in the list of files"
 msgstr "OSTRZEŻENIE: Edytowanie tylko pierwszego pliku na liście"
 
+#~ msgid "'what' must be a character string or a function"
+#~ msgstr "argument 'what' musi być łańcuchem tekstowym lub funkcją"
+
+#~ msgid "sockets are not available on this system"
+#~ msgstr "gniazda nie są dostępne w tym systemie"
+
+#~ msgid "no function to restart"
+#~ msgstr "brak funkcji którą można zrestartować"
+
+#~ msgid "argument must be a closure"
+#~ msgstr "argument musi być zamknięciem"
+
+#~ msgid "'hostname' must be a character vector of length 1"
+#~ msgstr "argument 'hostname' musi być wektorem tekstowym o długości 1"
+
+#~ msgid "nsl() was unable to resolve host '%s'"
+#~ msgstr "'nsl()' nie był w stanie nawiązać połączenia z hostem '%s'"
+
+#~ msgid "unknown format returned by C function 'gethostbyname'"
+#~ msgstr "nieznany format zwrócony przez funkcję C 'gethostbyname()'"
+
+#~ msgid "nsl() is not supported on this platform"
+#~ msgstr "'nsl()' nie jest obsługiwany na tej platformie"
+
+#~ msgid "too large a range of values in 'x'"
+#~ msgstr "zbyt duży zakres wartości w 'x'"
+
+#~ msgid "non-numeric argument"
+#~ msgstr "argument nieliczbowy"
+
+#~ msgid "unsupported URL scheme"
+#~ msgstr "niewspierany schemat adresu URL"
+
+#~ msgid "'dimnames' must be a list"
+#~ msgstr "'dimnames' musi być listą"
+
+#~ msgid "'args' must be a list"
+#~ msgstr "'args' musi być listą"
+
+#~ msgid "binary operations require two arguments"
+#~ msgstr "operacje dwuargumentowe wymagają dwóch argumentów"
+
+#~ msgid "opened URL\n"
+#~ msgstr "otwarty adres URL\n"
+
+#~ msgid "internet routines were already initialized"
+#~ msgstr "procedury internetowe zostały już zainicjowane"
+
+#~ msgid "'msg1' must be a character string"
+#~ msgstr "'msg1' musi być łańcuchem tekstowym"
+
+#~ msgid "'msg2' must be a character string"
+#~ msgstr "'msg2' musi być łańcuchem tekstowym"
+
+#~ msgid "argument 'code' must be a character string"
+#~ msgstr "argument 'code' musi być łańcuchem tekstowym"
+
+#~ msgid "argument 'type' must be a character string"
+#~ msgstr "argument 'type' musi być łańcuchem tekstowym"
+
+#~ msgid "'sep' must be a character string"
+#~ msgstr "'sep' musi być łańcuchem tekstowym"
+
+#~ msgid "InternetOpenUrl timed out"
+#~ msgstr "przekroczono czas oczekiwania na połączenie z 'InternetOpenUrl'"
+
+#~ msgid "Internet read timed out"
+#~ msgstr "przekroczono czas odczytu z sieci Internet"
+
+#~ msgid "unable to find a closure from within which 'match.call' was called"
+#~ msgstr ""
+#~ "nie można znaleźć zamknięcia z wewnątrz którego 'match.call' zostało "
+#~ "wywołane"
+
+#~ msgid "vfont routines cannot be accessed in module"
+#~ msgstr "procedury 'vfont' nie są dostępne w tym module"
+
+#~ msgid "Hershey fonts cannot be loaded"
+#~ msgstr "czcionki Hershey'a nie mogą zostać załadowane"
+
+#~ msgid "invalid generic function in 'usemethod'"
+#~ msgstr "niepoprawna ogólna funkcja w 'usemethod'"
+
+#~ msgid "'UseMethod' called from outside a function"
+#~ msgstr "'UseMethod()' wywołana spoza funkcji"
+
+#~ msgid "first argument must be a generic name"
+#~ msgstr "pierwszy argument musi być ogólną nazwą"
+
+#~ msgid ""
+#~ "explicit request not to duplicate arguments in call to '%s', but argument "
+#~ "%d is of the wrong type (%d != %d)"
+#~ msgstr ""
+#~ "ścisłe żadanie aby nie powtarzać argumentów w wywołaniu '%s', ale "
+#~ "argument %d posiada niepoprawny typ (%d != %d)"
+
+#~ msgid "single values not returned if not duplicated"
+#~ msgstr "pojedyncze wartości nie zostały zwrócone o ile nie są powtórzone"
+
+#~ msgid "character variables must be duplicated in .C/.Fortran"
+#~ msgstr "zmienne tekstowe muszą być powtórzone w  '.C/.Fortran'"
+
+#~ msgid "call name too long in '%s'"
+#~ msgstr "nazwa wywołania jest zbyt długa w '%s'"
+
+#~ msgid "generic name too long in '%s'"
+#~ msgstr "ogólna nazwa jest zbyt długa w '%s'"
+
+#~ msgid "method name too long in '%s'"
+#~ msgstr "nazwa metody w '%s' jest zbyt długa"
+
+#~ msgid "%d arguments passed to '%s' which requires 1 or 2"
+#~ msgstr ""
+#~ "argumenty (%d) przekazano do funkcji '%s', która wymaga 1 lub 2 argumentów"
+
+#~ msgid "%d arguments passed to 'log' which requires 1 or 2"
+#~ msgstr ""
+#~ "argumenty (%d) przekazano do funkcji 'log()', która wymaga 1 lub 2 "
+#~ "argumentów"
+
+#~ msgid ""
+#~ "Warning in %s :\n"
+#~ "  %s\n"
+#~ msgstr ""
+#~ "Ostrzeżenie w poleceniu '%s':\n"
+#~ "  %s\n"
+
+#~ msgid " (from %s) : "
+#~ msgstr "(z %s):"
+
+#~ msgid "input"
+#~ msgstr "wejście"
+
+#~ msgid "end of input"
+#~ msgstr "koniec wejścia"
+
+#~ msgid "string constant"
+#~ msgstr "stała tekstowa"
+
+#~ msgid "numeric constant"
+#~ msgstr "stała liczbowa"
+
+#~ msgid "symbol"
+#~ msgstr "symbol"
+
+#~ msgid "assignment"
+#~ msgstr "przypisanie"
+
+#~ msgid "end of line"
+#~ msgstr "koniec linii"
+
 #~ msgid "invalid assignment left-hand side"
 #~ msgstr "niepoprawne przypisanie lewej strony"
 
@@ -14173,9 +7973,6 @@ msgstr "OSTRZEŻENIE: Edytowanie tylko pierwszego pliku na liście"
 #~ "założenie '%s' nie powiodło się w wywoływaniu wyrażenia regularnego: plik "
 #~ "'%s', linia %d\n"
 
-#~ msgid "internal error in trio library"
-#~ msgstr "błąd wewnętrzny w bibliotece 'trio'"
-
 #~ msgid "End of file"
 #~ msgstr "koniec linii"
 
@@ -14201,9 +7998,6 @@ msgstr "OSTRZEŻENIE: Edytowanie tylko pierwszego pliku na liście"
 #~ "nie można zidentyfikować bieżącej strefy czasowej '%s':\n"
 #~ "proszę ustawić zmienną środowiskową 'TZ'"
 
-#~ msgid "[... truncated]"
-#~ msgstr " [... przycięte]"
-
 #~ msgid "Page %d"
 #~ msgstr "Strona %d"
 
@@ -14410,11 +8204,6 @@ msgstr "OSTRZEŻENIE: Edytowanie tylko pierwszego pliku na liście"
 #~ msgid "class name is too long in '%s'"
 #~ msgstr "nazwa klasy w '%s' jest zbyt długa"
 
-#~ msgid "number of rows of result is not a multiple of vector length (arg %d)"
-#~ msgstr ""
-#~ "liczba wierszy wyniku nie jest wielokrotnością długości wektora (argument "
-#~ "%d)"
-
 #~ msgid ""
 #~ "number of columns of result is not a multiple of vector length (arg %d)"
 #~ msgstr ""
@@ -14436,9 +8225,6 @@ msgstr "OSTRZEŻENIE: Edytowanie tylko pierwszego pliku na liście"
 #~ msgid "invalid multibyte input string %d"
 #~ msgstr "niepoprawny wielobajtowy łańcuch wejściowy %d"
 
-#~ msgid "invalid multibyte string '%s'"
-#~ msgstr "niepoprawny wielobajtowy łańcuch '%s'"
-
 #~ msgid "NA values introduced by coercion"
 #~ msgstr "pojawiły się wartości NA na skutek przekształcenia"
 
@@ -14586,9 +8372,6 @@ msgstr "OSTRZEŻENIE: Edytowanie tylko pierwszego pliku na liście"
 #~ msgid "'%s' argument must be a function"
 #~ msgstr "argument '%s' musi być funkcją"
 
-#~ msgid "Value for tracingState must be TRUE or FALSE"
-#~ msgstr "Wartość 'tracingState' musi być TRUE lub FALSE"
-
 #~ msgid "object '%s' was not found"
 #~ msgstr "obiekt '%s' nie został znaleziony"
 
@@ -14693,9 +8476,6 @@ msgstr "OSTRZEŻENIE: Edytowanie tylko pierwszego pliku na liście"
 #~ msgid "Warning in command '%s':"
 #~ msgstr "Ostrzeżenie w poleceniu '%s':"
 
-#~ msgid "Calls:"
-#~ msgstr "Wywołania:"
-
 #~ msgid "Additional warning message:"
 #~ msgid_plural "Additional warning messages:"
 #~ msgstr[0] "Dodatkowy komunikat ostrzegawczy:"
@@ -14714,9 +8494,6 @@ msgstr "OSTRZEŻENIE: Edytowanie tylko pierwszego pliku na liście"
 #~ msgid "Error in command:"
 #~ msgstr "Błąd w poleceniu:"
 
-#~ msgid "Error in command '%s' (from %s): "
-#~ msgstr "Błąd w poleceniu '%s' (z %s): "
-
 #~ msgid "Error in command '%s': "
 #~ msgstr "Błąd w poleceniu '%s': "
 
@@ -14774,15 +8551,9 @@ msgstr "OSTRZEŻENIE: Edytowanie tylko pierwszego pliku na liście"
 #~ msgid "there is no '.Internal' function '%s'"
 #~ msgstr "brak wewnętrznej (.Internal) funkcji '%s'"
 
-#~ msgid "bad character 'switch()' offsets"
-#~ msgstr "błędne przesunięcia znakowe 'switch()'"
-
 #~ msgid "bad 'switch()' names"
 #~ msgstr "niepoprawne nazwy 'switch()'"
 
-#~ msgid "bad numeric 'switch()' offsets"
-#~ msgstr "błędne przesunięcia liczbowe w funkcji 'switch()'"
-
 #~ msgid "unknown instruction code"
 #~ msgstr "nieznany kod instrukcji"
 
@@ -14801,27 +8572,6 @@ msgstr "OSTRZEŻENIE: Edytowanie tylko pierwszego pliku na liście"
 #~ msgid "Reducing stack by rule %d (line %lu):\n"
 #~ msgstr "Zmniejszanie stosu poprzez regułę %d (linia %lu):\n"
 
-#~ msgid "unexpected input"
-#~ msgstr "nieoczekiwane wejście"
-
-#~ msgid "unexpected end of input"
-#~ msgstr "nieoczekiwany koniec wejścia"
-
-#~ msgid "unexpected string constant"
-#~ msgstr "nieoczekiwana stała tekstowa"
-
-#~ msgid "unexpected numeric constant"
-#~ msgstr "nieoczekiwana stała liczbowa"
-
-#~ msgid "unexpected symbol"
-#~ msgstr "nieoczekiwany symbol"
-
-#~ msgid "unexpected assignment"
-#~ msgstr "nieoczekiwane przypisanie"
-
-#~ msgid "unexpected end of line"
-#~ msgstr "nieoczekiwany koniec linii"
-
 #~ msgid "'%s' used without hex digits in character string starting \"%s\""
 #~ msgstr ""
 #~ "'%s' użyte bez szestnastkowych cyfr w łańcuchu tekstowym rozpoczynającym "
@@ -16037,15 +9787,6 @@ msgstr "OSTRZEŻENIE: Edytowanie tylko pierwszego pliku na liście"
 #~ msgid "assertion '%s' failed: file `%s', line %d\n"
 #~ msgstr "założenie '%s' nie powiodło się: plik '%s', linia %d\n"
 
-#~ msgid "%d argument passed to '%s' which requires 1 or 2 arguments"
-#~ msgid_plural "%d arguments passed to '%s' which requires 1 or 2 arguments"
-#~ msgstr[0] ""
-#~ "%d argument przekazano do funkcji '%s', która wymaga 1 lub 2 argumentów"
-#~ msgstr[1] ""
-#~ "%d argumenty przekazano do funkcji '%s', która wymaga 1 lub 2 argumentów"
-#~ msgstr[2] ""
-#~ "%d argumentów przekazano do funkcji '%s', która wymaga 1 lub 2 argumentów"
-
 #~ msgid "'%s' argument must be a length 1 vector"
 #~ msgstr "argument '%s' musi być wektorem o długości 1"
 
@@ -16136,11 +9877,6 @@ msgstr "OSTRZEŻENIE: Edytowanie tylko pierwszego pliku na liście"
 #~ msgid "unknown type in '%s'"
 #~ msgstr "nieznany typ w '%s'"
 
-#~ msgid "In %s:  %s\n"
-#~ msgstr ""
-#~ "W funkcji '%s':\n"
-#~ "  %s\n"
-
 #~ msgid "In %s:%s%s\n"
 #~ msgstr "W funkcji '%s':%s%s\n"
 
@@ -16204,9 +9940,6 @@ msgstr "OSTRZEŻENIE: Edytowanie tylko pierwszego pliku na liście"
 #~ msgid "'%s' must be an environment"
 #~ msgstr "'%s' musi być środowiskiem"
 
-#~ msgid "'%s' must be a character string"
-#~ msgstr "'%s' musi być łańcuchem tekstowym"
-
 #~ msgid "'EXPR' must be a length 1 vector"
 #~ msgstr "'EXPR' musi być wektorem o długości 1"
 
@@ -16238,8 +9971,8 @@ msgstr "OSTRZEŻENIE: Edytowanie tylko pierwszego pliku na liście"
 
 #, fuzzy
 #~ msgid ""
-#~ "first argument ('table') is not of type 'ENVSXP', from 'R_HashVector2Hash"
-#~ "()'"
+#~ "first argument ('table') is not of type 'ENVSXP', from "
+#~ "'R_HashVector2Hash()'"
 #~ msgstr ""
 #~ "pierwszy argument ('table') nie jest typu ENVSXP, z R_HashVector2Hash"
 
diff --git a/src/library/base/po/pt_BR.po b/src/library/base/po/pt_BR.po
index eb3755f..fe21345 100644
--- a/src/library/base/po/pt_BR.po
+++ b/src/library/base/po/pt_BR.po
@@ -5,8 +5,8 @@
 msgid ""
 msgstr ""
 "Project-Id-Version: R 2.1.0\n"
-"Report-Msgid-Bugs-To: bugs.r-project.org\n"
-"POT-Creation-Date: 2014-03-27 07:46+0000\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2016-04-01 10:28-0700\n"
 "PO-Revision-Date: 2011-03-26 08:56-0300\n"
 "Last-Translator: Fernando Henrique <pessoal at fernandohrosa.com.br>\n"
 "Language-Team: http://www.feferraz.net/br/P/Projeto_Traducao_R_Portugues\n"
@@ -55,15 +55,15 @@ msgstr "Função não pode ser calculada nos parâmetros iniciais"
 msgid "unknown type in \"CG\" method of 'optim'"
 msgstr "tipo desconhecido no método CG de optim"
 
-#: src/appl/optim.c:665
+#: src/appl/optim.c:662
 msgid "REPORT must be > 0 (method = \"L-BFGS-B\")"
 msgstr "REPORT deve ser > 0 (method = \"L-BFGS-B\")"
 
-#: src/appl/optim.c:688
+#: src/appl/optim.c:685
 msgid "L-BFGS-B needs finite values of 'fn'"
 msgstr "L-BFGS-B precisa de fn com valores finitos"
 
-#: src/appl/optim.c:744
+#: src/appl/optim.c:741
 msgid "trace, REPORT must be >= 0 (method = \"SANN\")"
 msgstr "trace, REPORT deve ser >= 0 (method = \"SANN\")"
 
@@ -128,122 +128,127 @@ msgstr "acesso a '%ls' negado"
 msgid "problem in displaying '%ls'"
 msgstr "problema ao mostrar '%ls'"
 
-#: src/gnuwin32/extra.c:116 src/gnuwin32/extra.c:159 src/gnuwin32/extra.c:349
-#: src/gnuwin32/extra.c:577 src/gnuwin32/extra.c:602 src/main/agrep.c:131
-#: src/main/agrep.c:135 src/main/agrep.c:775 src/main/agrep.c:780
-#: src/main/apply.c:293 src/main/apply.c:295 src/main/apply.c:298
-#: src/main/array.c:87 src/main/array.c:1137 src/main/array.c:1263
-#: src/main/array.c:1265 src/main/array.c:1266 src/main/array.c:1592
-#: src/main/array.c:1594 src/main/array.c:1596 src/main/attrib.c:196
+#: src/gnuwin32/extra.c:116 src/gnuwin32/extra.c:158 src/gnuwin32/extra.c:348
+#: src/gnuwin32/extra.c:574 src/gnuwin32/extra.c:599 src/main/agrep.c:131
+#: src/main/agrep.c:135 src/main/agrep.c:776 src/main/agrep.c:781
+#: src/main/apply.c:330 src/main/apply.c:332 src/main/apply.c:335
+#: src/main/array.c:90 src/main/array.c:1272 src/main/array.c:1411
+#: src/main/array.c:1413 src/main/array.c:1414 src/main/array.c:1758
+#: src/main/array.c:1760 src/main/array.c:1762 src/main/attrib.c:190
 #: src/main/builtin.c:88 src/main/builtin.c:97 src/main/builtin.c:116
-#: src/main/builtin.c:118 src/main/builtin.c:147 src/main/builtin.c:534
-#: src/main/builtin.c:550 src/main/builtin.c:739 src/main/builtin.c:741
-#: src/main/builtin.c:743 src/main/character.c:139 src/main/character.c:142
-#: src/main/character.c:203 src/main/character.c:1037
-#: src/main/character.c:1041 src/main/character.c:1276
-#: src/main/character.c:1280 src/main/character.c:1341
-#: src/main/character.c:1344 src/main/connections.c:1217
-#: src/main/connections.c:1223 src/main/connections.c:1226
-#: src/main/connections.c:1230 src/main/connections.c:1375
-#: src/main/connections.c:1391 src/main/connections.c:1396
-#: src/main/connections.c:1996 src/main/connections.c:2002
-#: src/main/connections.c:2006 src/main/connections.c:2010
-#: src/main/connections.c:2015 src/main/connections.c:2665
-#: src/main/connections.c:2670 src/main/connections.c:2673
-#: src/main/connections.c:2676 src/main/connections.c:3057
-#: src/main/connections.c:3062 src/main/connections.c:3068
-#: src/main/connections.c:3071 src/main/connections.c:3075
-#: src/main/connections.c:3090 src/main/connections.c:3140
-#: src/main/connections.c:3145 src/main/connections.c:3149
-#: src/main/connections.c:3153 src/main/connections.c:3157
-#: src/main/connections.c:3163 src/main/connections.c:3210
-#: src/main/connections.c:3216 src/main/connections.c:3220
-#: src/main/connections.c:3270 src/main/connections.c:3273
-#: src/main/connections.c:3547 src/main/connections.c:3550
-#: src/main/connections.c:3553 src/main/connections.c:3559
-#: src/main/connections.c:3666 src/main/connections.c:3672
-#: src/main/connections.c:3675 src/main/connections.c:3826
-#: src/main/connections.c:3829 src/main/connections.c:3833
-#: src/main/connections.c:3836 src/main/connections.c:3956
-#: src/main/connections.c:4074 src/main/connections.c:4077
-#: src/main/connections.c:4414 src/main/connections.c:4439
-#: src/main/connections.c:4474 src/main/connections.c:4489
-#: src/main/connections.c:4497 src/main/connections.c:4523
-#: src/main/connections.c:4669 src/main/connections.c:4673
-#: src/main/connections.c:4801 src/main/connections.c:4803
-#: src/main/connections.c:4805 src/main/connections.c:4833
-#: src/main/connections.c:4965 src/main/connections.c:4991
-#: src/main/connections.c:4995 src/main/connections.c:4999
-#: src/main/connections.c:5003 src/main/context.c:596 src/main/context.c:605
-#: src/main/context.c:609 src/main/datetime.c:775 src/main/datetime.c:865
-#: src/main/datetime.c:867 src/main/datetime.c:871 src/main/datetime.c:1026
-#: src/main/datetime.c:1028 src/main/datetime.c:1232 src/main/debug.c:228
-#: src/main/deparse.c:397 src/main/dotcode.c:478 src/main/dotcode.c:482
-#: src/main/dotcode.c:487 src/main/dounzip.c:322 src/main/dounzip.c:329
-#: src/main/dounzip.c:339 src/main/dounzip.c:344 src/main/dounzip.c:348
-#: src/main/dounzip.c:352 src/main/envir.c:1618 src/main/envir.c:1621
-#: src/main/envir.c:1742 src/main/envir.c:1747 src/main/envir.c:1813
-#: src/main/envir.c:1829 src/main/envir.c:1835 src/main/envir.c:1932
-#: src/main/envir.c:1940 src/main/envir.c:1947 src/main/envir.c:1958
-#: src/main/envir.c:2172 src/main/envir.c:2293 src/main/envir.c:2552
-#: src/main/envir.c:2762 src/main/envir.c:2776 src/main/envir.c:2783
-#: src/main/envir.c:2799 src/main/envir.c:3367 src/main/errors.c:1030
-#: src/main/eval.c:397 src/main/eval.c:406 src/main/eval.c:409
-#: src/main/grep.c:767 src/main/grep.c:772 src/main/grep.c:1061
-#: src/main/grep.c:1063 src/main/grep.c:1065 src/main/grep.c:1510
-#: src/main/grep.c:1514 src/main/grep.c:1519 src/main/grep.c:2323
-#: src/main/grep.c:2328 src/main/grep.c:2621 src/main/grep.c:2626
-#: src/main/memory.c:3736 src/main/paste.c:96 src/main/paste.c:395
-#: src/main/paste.c:402 src/main/paste.c:409 src/main/paste.c:414
-#: src/main/paste.c:419 src/main/paste.c:424 src/main/paste.c:427
-#: src/main/paste.c:435 src/main/paste.c:601 src/main/paste.c:606
+#: src/main/builtin.c:118 src/main/builtin.c:149 src/main/builtin.c:569
+#: src/main/builtin.c:585 src/main/builtin.c:773 src/main/builtin.c:775
+#: src/main/builtin.c:777 src/main/character.c:239 src/main/character.c:242
+#: src/main/character.c:247 src/main/character.c:788 src/main/character.c:791
+#: src/main/character.c:1289 src/main/character.c:1293
+#: src/main/character.c:1528 src/main/character.c:1532
+#: src/main/character.c:1593 src/main/character.c:1596
+#: src/main/connections.c:1208 src/main/connections.c:1214
+#: src/main/connections.c:1217 src/main/connections.c:1221
+#: src/main/connections.c:1367 src/main/connections.c:1383
+#: src/main/connections.c:1388 src/main/connections.c:1989
+#: src/main/connections.c:1995 src/main/connections.c:1999
+#: src/main/connections.c:2003 src/main/connections.c:2008
+#: src/main/connections.c:2659 src/main/connections.c:2664
+#: src/main/connections.c:2667 src/main/connections.c:2670
+#: src/main/connections.c:3053 src/main/connections.c:3058
+#: src/main/connections.c:3064 src/main/connections.c:3067
+#: src/main/connections.c:3071 src/main/connections.c:3086
+#: src/main/connections.c:3135 src/main/connections.c:3140
+#: src/main/connections.c:3144 src/main/connections.c:3148
+#: src/main/connections.c:3152 src/main/connections.c:3158
+#: src/main/connections.c:3203 src/main/connections.c:3209
+#: src/main/connections.c:3213 src/main/connections.c:3264
+#: src/main/connections.c:3267 src/main/connections.c:3543
+#: src/main/connections.c:3546 src/main/connections.c:3549
+#: src/main/connections.c:3555 src/main/connections.c:3662
+#: src/main/connections.c:3668 src/main/connections.c:3671
+#: src/main/connections.c:3823 src/main/connections.c:3826
+#: src/main/connections.c:3830 src/main/connections.c:3833
+#: src/main/connections.c:3954 src/main/connections.c:4085
+#: src/main/connections.c:4088 src/main/connections.c:4425
+#: src/main/connections.c:4450 src/main/connections.c:4485
+#: src/main/connections.c:4500 src/main/connections.c:4508
+#: src/main/connections.c:4534 src/main/connections.c:4680
+#: src/main/connections.c:4684 src/main/connections.c:4814
+#: src/main/connections.c:4816 src/main/connections.c:4818
+#: src/main/connections.c:4846 src/main/connections.c:4980
+#: src/main/connections.c:5019 src/main/connections.c:5024
+#: src/main/connections.c:5029 src/main/connections.c:5050
+#: src/main/context.c:607 src/main/context.c:616 src/main/context.c:620
+#: src/main/datetime.c:781 src/main/datetime.c:869 src/main/datetime.c:872
+#: src/main/datetime.c:876 src/main/datetime.c:1043 src/main/datetime.c:1045
+#: src/main/datetime.c:1250 src/main/debug.c:245 src/main/deparse.c:408
+#: src/main/dotcode.c:496 src/main/dotcode.c:500 src/main/dotcode.c:505
+#: src/main/dounzip.c:323 src/main/dounzip.c:330 src/main/dounzip.c:340
+#: src/main/dounzip.c:345 src/main/dounzip.c:349 src/main/dounzip.c:353
+#: src/main/envir.c:1752 src/main/envir.c:1755 src/main/envir.c:1876
+#: src/main/envir.c:1881 src/main/envir.c:1945 src/main/envir.c:1961
+#: src/main/envir.c:1967 src/main/envir.c:2079 src/main/envir.c:2087
+#: src/main/envir.c:2094 src/main/envir.c:2105 src/main/envir.c:2337
+#: src/main/envir.c:2458 src/main/envir.c:2755 src/main/envir.c:3022
+#: src/main/envir.c:3036 src/main/envir.c:3043 src/main/envir.c:3059
+#: src/main/envir.c:3642 src/main/errors.c:1011 src/main/eval.c:454
+#: src/main/eval.c:463 src/main/eval.c:466 src/main/grep.c:780
+#: src/main/grep.c:785 src/main/grep.c:1079 src/main/grep.c:1081
+#: src/main/grep.c:1083 src/main/grep.c:1528 src/main/grep.c:1532
+#: src/main/grep.c:1537 src/main/grep.c:2345 src/main/grep.c:2350
+#: src/main/grep.c:2652 src/main/grep.c:2657 src/main/memory.c:3823
+#: src/main/paste.c:96 src/main/paste.c:392 src/main/paste.c:399
+#: src/main/paste.c:406 src/main/paste.c:411 src/main/paste.c:416
+#: src/main/paste.c:421 src/main/paste.c:424 src/main/paste.c:432
+#: src/main/paste.c:437 src/main/paste.c:619 src/main/paste.c:624
 #: src/main/platform.c:306 src/main/platform.c:308 src/main/platform.c:310
 #: src/main/platform.c:326 src/main/platform.c:337 src/main/platform.c:390
-#: src/main/platform.c:392 src/main/platform.c:705 src/main/platform.c:707
-#: src/main/platform.c:1064 src/main/platform.c:1070 src/main/platform.c:1073
-#: src/main/platform.c:1076 src/main/platform.c:1079 src/main/platform.c:1082
-#: src/main/platform.c:1085 src/main/platform.c:1088 src/main/platform.c:1185
-#: src/main/platform.c:1188 src/main/platform.c:1191 src/main/platform.c:1229
-#: src/main/platform.c:1286 src/main/platform.c:1289 src/main/platform.c:1498
-#: src/main/platform.c:1501 src/main/platform.c:1504 src/main/platform.c:1540
-#: src/main/platform.c:1543 src/main/platform.c:1546 src/main/platform.c:1629
-#: src/main/platform.c:1645 src/main/platform.c:1684 src/main/platform.c:1686
-#: src/main/platform.c:1757 src/main/platform.c:1841 src/main/platform.c:2116
-#: src/main/platform.c:2176 src/main/platform.c:2353 src/main/platform.c:2356
-#: src/main/platform.c:2359 src/main/platform.c:2362 src/main/platform.c:2365
-#: src/main/platform.c:2368 src/main/platform.c:2568 src/main/platform.c:2571
-#: src/main/platform.c:2574 src/main/platform.c:2577 src/main/platform.c:2580
-#: src/main/platform.c:2583 src/main/platform.c:2657 src/main/platform.c:2665
-#: src/main/platform.c:2701 src/main/platform.c:2751 src/main/print.c:242
-#: src/main/print.c:248 src/main/print.c:270 src/main/print.c:276
-#: src/main/print.c:283 src/main/random.c:478 src/main/random.c:482
-#: src/main/random.c:489 src/main/random.c:517 src/main/saveload.c:1950
-#: src/main/saveload.c:1953 src/main/saveload.c:1956 src/main/saveload.c:2072
-#: src/main/saveload.c:2252 src/main/saveload.c:2257 src/main/saveload.c:2260
+#: src/main/platform.c:392 src/main/platform.c:708 src/main/platform.c:710
+#: src/main/platform.c:800 src/main/platform.c:1138 src/main/platform.c:1144
+#: src/main/platform.c:1147 src/main/platform.c:1150 src/main/platform.c:1153
+#: src/main/platform.c:1156 src/main/platform.c:1159 src/main/platform.c:1162
+#: src/main/platform.c:1259 src/main/platform.c:1262 src/main/platform.c:1265
+#: src/main/platform.c:1303 src/main/platform.c:1361 src/main/platform.c:1364
+#: src/main/platform.c:1573 src/main/platform.c:1576 src/main/platform.c:1579
+#: src/main/platform.c:1615 src/main/platform.c:1618 src/main/platform.c:1621
+#: src/main/platform.c:1657 src/main/platform.c:1690 src/main/platform.c:1692
+#: src/main/platform.c:1763 src/main/platform.c:1848 src/main/platform.c:2089
+#: src/main/platform.c:2149 src/main/platform.c:2334 src/main/platform.c:2337
+#: src/main/platform.c:2340 src/main/platform.c:2343 src/main/platform.c:2346
+#: src/main/platform.c:2349 src/main/platform.c:2555 src/main/platform.c:2558
+#: src/main/platform.c:2561 src/main/platform.c:2564 src/main/platform.c:2567
+#: src/main/platform.c:2570 src/main/platform.c:2648 src/main/platform.c:2656
+#: src/main/platform.c:2692 src/main/platform.c:2742 src/main/print.c:235
+#: src/main/print.c:241 src/main/print.c:263 src/main/print.c:269
+#: src/main/print.c:276 src/main/random.c:470 src/main/random.c:474
+#: src/main/random.c:481 src/main/random.c:509 src/main/saveload.c:1952
+#: src/main/saveload.c:1955 src/main/saveload.c:1958 src/main/saveload.c:2074
+#: src/main/saveload.c:2254 src/main/saveload.c:2259 src/main/saveload.c:2262
 #: src/main/saveload.c:2366 src/main/scan.c:684 src/main/scan.c:853
 #: src/main/scan.c:867 src/main/scan.c:871 src/main/scan.c:873
 #: src/main/scan.c:884 src/main/scan.c:911 src/main/scan.c:914
-#: src/main/scan.c:917 src/main/scan.c:972 src/main/seq.c:618
-#: src/main/seq.c:623 src/main/seq.c:631 src/main/seq.c:662 src/main/seq.c:666
-#: src/main/seq.c:672 src/main/seq.c:680 src/main/sort.c:175
-#: src/main/sysutils.c:585 src/main/sysutils.c:589 src/main/sysutils.c:593
-#: src/main/sysutils.c:599 src/main/sysutils.c:603 src/main/sysutils.c:1831
-#: src/main/sysutils.c:1835 src/main/unique.c:966 src/main/unique.c:1289
-#: src/main/unique.c:1349 src/main/unique.c:1356 src/main/unique.c:1750
-#: src/main/util.c:581 src/main/util.c:584 src/main/util.c:1825
-#: src/main/util.c:1994 src/main/util.c:1995 src/main/util.c:1996
-#: src/main/util.c:2013 src/main/util.c:2037 src/main/util.c:2041
-#: src/main/util.c:2043 src/main/util.c:2068 src/main/util.c:2070
-#: src/main/util.c:2072 src/main/util.c:2075 src/main/util.c:2078
-#: src/main/util.c:2082 src/main/util.c:2084 src/modules/X11/devX11.c:3241
-#: src/modules/X11/devX11.c:3244 src/modules/X11/devX11.c:3247
-#: src/modules/X11/devX11.c:3271 src/modules/internet/internet.c:284
-#: src/modules/internet/internet.c:290 src/modules/internet/internet.c:296
-#: src/modules/internet/internet.c:299 src/modules/internet/internet.c:303
+#: src/main/scan.c:917 src/main/scan.c:972 src/main/seq.c:622
+#: src/main/seq.c:627 src/main/seq.c:635 src/main/seq.c:666 src/main/seq.c:670
+#: src/main/seq.c:676 src/main/seq.c:684 src/main/sort.c:175
+#: src/main/sysutils.c:597 src/main/sysutils.c:601 src/main/sysutils.c:605
+#: src/main/sysutils.c:611 src/main/sysutils.c:615 src/main/sysutils.c:1787
+#: src/main/sysutils.c:1791 src/main/unique.c:1029 src/main/unique.c:1337
+#: src/main/unique.c:1341 src/main/unique.c:1351 src/main/unique.c:1747
+#: src/main/util.c:636 src/main/util.c:639 src/main/util.c:1379
+#: src/main/util.c:1393 src/main/util.c:1975 src/main/util.c:2198
+#: src/main/util.c:2199 src/main/util.c:2200 src/main/util.c:2217
+#: src/main/util.c:2245 src/main/util.c:2249 src/main/util.c:2251
+#: src/main/util.c:2277 src/main/util.c:2279 src/main/util.c:2281
+#: src/main/util.c:2284 src/main/util.c:2287 src/main/util.c:2291
+#: src/main/util.c:2293 src/modules/X11/devX11.c:3247
+#: src/modules/X11/devX11.c:3250 src/modules/X11/devX11.c:3253
+#: src/modules/X11/devX11.c:3277 src/modules/internet/internet.c:453
+#: src/modules/internet/internet.c:459 src/modules/internet/internet.c:465
+#: src/modules/internet/internet.c:468 src/modules/internet/internet.c:472
+#: src/modules/internet/internet.c:477 src/modules/internet/libcurl.c:414
+#: src/modules/internet/libcurl.c:418 src/modules/internet/libcurl.c:423
+#: src/modules/internet/libcurl.c:426 src/modules/internet/libcurl.c:430
 #: src/modules/lapack/Lapack.c:155 src/modules/lapack/Lapack.c:261
 #: src/modules/lapack/Lapack.c:709 src/modules/lapack/Lapack.c:818
-#: src/modules/lapack/Lapack.c:880 src/modules/lapack/Lapack.c:1214
-#: src/unix/sys-std.c:1217 src/unix/sys-std.c:1240
+#: src/modules/lapack/Lapack.c:880 src/modules/lapack/Lapack.c:1215
+#: src/unix/sys-std.c:1223 src/unix/sys-std.c:1246
 #, c-format
 msgid "invalid '%s' argument"
 msgstr "argumento '%s' inválido"
@@ -252,375 +257,352 @@ msgstr "argumento '%s' inválido"
 msgid "unsupported version of Windows"
 msgstr "versão do Windows não suportada"
 
-#: src/gnuwin32/extra.c:267 src/main/apply.c:105 src/main/character.c:595
-#: src/main/connections.c:3555 src/main/context.c:642 src/main/context.c:661
-#: src/main/datetime.c:675 src/main/datetime.c:777 src/main/datetime.c:1030
-#: src/main/dotcode.c:199 src/main/errors.c:929 src/main/errors.c:962
-#: src/main/errors.c:1065 src/main/errors.c:1090 src/main/errors.c:1095
-#: src/main/errors.c:1368 src/main/identical.c:66 src/main/identical.c:67
-#: src/main/identical.c:68 src/main/identical.c:69 src/main/identical.c:70
-#: src/main/seq.c:185 src/main/seq.c:341 src/main/seq.c:346 src/main/seq.c:350
-#: src/main/seq.c:391 src/main/seq.c:395 src/main/seq.c:399
-#: src/main/sort.c:1224 src/main/sort.c:1307 src/main/sort.c:1311
-#: src/main/sort.c:1318 src/main/sort.c:1393 src/main/source.c:220
-#: src/main/summary.c:886 src/main/sysutils.c:251 src/main/util.c:986
-#: src/main/util.c:991 src/main/util.c:998 src/main/util.c:1001
-#: src/modules/X11/devX11.c:3142 src/modules/X11/devX11.c:3169
-#: src/modules/X11/devX11.c:3174 src/modules/X11/devX11.c:3179
-#: src/modules/X11/devX11.c:3189 src/modules/X11/devX11.c:3194
-#: src/modules/X11/devX11.c:3198 src/modules/X11/devX11.c:3202
-#: src/unix/sys-std.c:1291
-#, c-format
-msgid "invalid '%s' value"
-msgstr "valor de '%s' inválido"
-
-#: src/gnuwin32/extra.c:308 src/gnuwin32/extra.c:321
+#: src/gnuwin32/extra.c:313 src/gnuwin32/extra.c:324
 msgid "incorrect argument"
 msgstr "argumento incorreto"
 
-#: src/gnuwin32/extra.c:312
+#: src/gnuwin32/extra.c:316
 msgid "don't be silly!: your machine has a 4Gb address limit"
 msgstr "não seja tolo!: seu computador tem um limite de endereçamento de 4Gb"
 
-#: src/gnuwin32/extra.c:316
+#: src/gnuwin32/extra.c:320
 msgid "cannot decrease memory limit: ignored"
 msgstr "não foi possível diminuir o limite de memória: ignorado"
 
-#: src/gnuwin32/extra.c:428 src/gnuwin32/extra.c:529 src/main/util.c:897
+#: src/gnuwin32/extra.c:427 src/gnuwin32/extra.c:528 src/main/util.c:962
 msgid "'path' must be a character vector"
 msgstr "'path' deve ser um vetor de caracteres"
 
-#: src/gnuwin32/extra.c:579 src/gnuwin32/extra.c:581 src/gnuwin32/extra.c:604
-#: src/gnuwin32/extra.c:606 src/gnuwin32/extra.c:641 src/main/gevents.c:61
+#: src/gnuwin32/extra.c:576 src/gnuwin32/extra.c:578 src/gnuwin32/extra.c:601
+#: src/gnuwin32/extra.c:603 src/gnuwin32/extra.c:638 src/main/gevents.c:61
 #: src/main/gevents.c:98
 msgid "invalid device"
 msgstr "dispositivo inválido"
 
-#: src/gnuwin32/extra.c:582
+#: src/gnuwin32/extra.c:579
 msgid "requires SDI mode"
 msgstr "modo SDI requerido"
 
-#: src/gnuwin32/extra.c:635 src/main/gevents.c:58 src/main/gevents.c:95
+#: src/gnuwin32/extra.c:632 src/main/gevents.c:58 src/main/gevents.c:95
 msgid "invalid graphical device number"
 msgstr "número de dispositivo gráfico inválido"
 
-#: src/gnuwin32/extra.c:645
+#: src/gnuwin32/extra.c:642
 msgid "bad device"
 msgstr "dispositivo defeituoso"
 
-#: src/gnuwin32/extra.c:799 src/gnuwin32/extra.c:807
+#: src/gnuwin32/extra.c:796 src/gnuwin32/extra.c:804
 #, fuzzy
 msgid "invalid input in 'Rmbstowcs'"
 msgstr "entrada inválida em Rmbstowcs"
 
-#: src/gnuwin32/extra.c:830 src/main/platform.c:1261
+#: src/gnuwin32/extra.c:827 src/main/platform.c:1336
 msgid "file choice cancelled"
 msgstr "escolha de arquivo cancelada"
 
-#: src/gnuwin32/run.c:242
+#: src/gnuwin32/run.c:244
 #, fuzzy, c-format
 msgid "'CreateProcess' failed to run '%s'"
 msgstr "CreateProcess falhou em executar '%s'"
 
-#: src/gnuwin32/run.c:344
+#: src/gnuwin32/run.c:346
 msgid "Child process not responding.  R will terminate it."
 msgstr "Processo filho não respondendo. O R irá encerrá-lo."
 
-#: src/gnuwin32/run.c:402
+#: src/gnuwin32/run.c:404
 #, c-format
 msgid "Exit code was %d"
 msgstr "Código de saída foi %d"
 
-#: src/gnuwin32/run.c:434
+#: src/gnuwin32/run.c:436
 msgid "Insufficient memory (rpipeOpen)"
 msgstr "Memória insuficiente (rpipeOpen)"
 
-#: src/gnuwin32/run.c:648 src/main/dounzip.c:482
+#: src/gnuwin32/run.c:650 src/main/dounzip.c:481
 msgid "seek not enabled for this connection"
 msgstr "procura não habilitada para essa conexão"
 
-#: src/gnuwin32/run.c:654
+#: src/gnuwin32/run.c:656
 msgid "truncate not enabled for this connection"
 msgstr "truncamento não habilitado para essa conexão"
 
-#: src/gnuwin32/run.c:729 src/gnuwin32/run.c:733 src/gnuwin32/run.c:746
-#: src/gnuwin32/run.c:774 src/main/connections.c:1330
-#: src/main/connections.c:1334 src/main/connections.c:1340
-#: src/main/connections.c:1354
+#: src/gnuwin32/run.c:731 src/gnuwin32/run.c:735 src/gnuwin32/run.c:748
+#: src/gnuwin32/run.c:776 src/main/connections.c:1322
+#: src/main/connections.c:1326 src/main/connections.c:1332
+#: src/main/connections.c:1346
 msgid "allocation of pipe connection failed"
 msgstr "alocação de conexão pipe falhou"
 
-#: src/gnuwin32/run.c:788
+#: src/gnuwin32/run.c:790
 #, fuzzy
 msgid "'names' is not a character vector"
 msgstr "'fmt' não é um vetor de caracteres"
 
-#: src/gnuwin32/sys-win32.c:182
+#: src/gnuwin32/sys-win32.c:180
 msgid "character string expected as first argument"
 msgstr "cadeia de caracteres esperada como primeiro argumento"
 
-#: src/gnuwin32/sys-win32.c:191
+#: src/gnuwin32/sys-win32.c:189
 msgid "character string expected as third argument"
 msgstr "cadeia de caracteres esperada como terceiro argumento"
 
-#: src/gnuwin32/sys-win32.c:257 src/unix/sys-unix.c:299
+#: src/gnuwin32/sys-win32.c:255 src/unix/sys-unix.c:312
 #, c-format
 msgid "running command '%s' had status %d"
 msgstr "execução do comando '%s' teve status %d"
 
-#: src/gnuwin32/system.c:122 src/unix/sys-unix.c:427
+#: src/gnuwin32/system.c:121 src/unix/sys-unix.c:440
 msgid "reached session elapsed time limit"
 msgstr "período da sessão atingiu tempo limite"
 
-#: src/gnuwin32/system.c:124 src/unix/sys-unix.c:429
+#: src/gnuwin32/system.c:123 src/unix/sys-unix.c:442
 msgid "reached elapsed time limit"
 msgstr "tempo limite atingido"
 
-#: src/gnuwin32/system.c:130 src/unix/sys-unix.c:435
+#: src/gnuwin32/system.c:129 src/unix/sys-unix.c:448
 msgid "reached session CPU time limit"
 msgstr "tempo limite de sessão na CPU atingido"
 
-#: src/gnuwin32/system.c:132 src/unix/sys-unix.c:437
+#: src/gnuwin32/system.c:131 src/unix/sys-unix.c:450
 msgid "reached CPU time limit"
 msgstr "tempo limite da CPU atingido"
 
-#: src/gnuwin32/system.c:157
+#: src/gnuwin32/system.c:156
 #, c-format
 msgid "Fatal error: %s\n"
 msgstr "Erro fatal: %s\n"
 
-#: src/gnuwin32/system.c:335 src/unix/sys-std.c:863
+#: src/gnuwin32/system.c:334 src/unix/sys-std.c:866
 #, c-format
 msgid "encoding '%s' is not recognised"
 msgstr "codificação '%s' não reconhecida"
 
-#: src/gnuwin32/system.c:341 src/unix/sys-std.c:869
+#: src/gnuwin32/system.c:340 src/unix/sys-std.c:872
 #, c-format
 msgid "<ERROR: re-encoding failure from encoding '%s'>\n"
 msgstr "<ERRO: re-codificação falhou a partir da codificação '%s'> \n"
 
-#: src/gnuwin32/system.c:555 src/gnuwin32/system.c:1049
-#: src/gnuwin32/system.c:1061 src/main/connections.c:590
-#: src/main/connections.c:595 src/main/dounzip.c:177 src/main/saveload.c:1961
-#: src/main/serialize.c:2552 src/main/serialize.c:2557
-#: src/main/serialize.c:2642 src/main/serialize.c:2687 src/unix/system.c:323
-#: src/unix/system.c:343
+#: src/gnuwin32/system.c:562 src/gnuwin32/system.c:1058
+#: src/gnuwin32/system.c:1070 src/main/connections.c:581
+#: src/main/connections.c:586 src/main/dounzip.c:178 src/main/saveload.c:1963
+#: src/main/serialize.c:2598 src/main/serialize.c:2603
+#: src/main/serialize.c:2688 src/main/serialize.c:2733 src/unix/system.c:328
 #, c-format
 msgid "cannot open file '%s': %s"
 msgstr "não foi possível abrir o arquivo '%s': %s"
 
-#: src/gnuwin32/system.c:569
+#: src/gnuwin32/system.c:576
 #, c-format
 msgid "file.show(): file '%s' does not exist\n"
 msgstr "file.show(): arquivo '%s' não existe\n"
 
-#: src/gnuwin32/system.c:970
+#: src/gnuwin32/system.c:979
 #, fuzzy, c-format
 msgid "WARNING: R_MAX_MEM_SIZE value is invalid: ignored\n"
 msgstr "ATENÇÃO: valor '%s' é inválido: ignorado\n"
 
-#: src/gnuwin32/system.c:1002
+#: src/gnuwin32/system.c:1011
 msgid "WARNING: no max-mem-size given\n"
 msgstr "ATENÇÃO: faltando argumento max-mem-size\n"
 
-#: src/gnuwin32/system.c:1009
+#: src/gnuwin32/system.c:1018
 #, c-format
 msgid "WARNING: --max-mem-size value is invalid: ignored\n"
 msgstr "ATENÇÃO: valor de --max-mem-size é inválido: ignorado\n"
 
-#: src/gnuwin32/system.c:1012
+#: src/gnuwin32/system.c:1021
 #, c-format
 msgid "WARNING: --max-mem-size=%lu%c: too large and ignored\n"
 msgstr "ATENÇÃO: --max-mem-size=%lu'%c': muito grande e ignorado\n"
 
-#: src/gnuwin32/system.c:1018
+#: src/gnuwin32/system.c:1027
 #, c-format
 msgid "WARNING: --max-mem-size=%4.1fM: too small and ignored\n"
 msgstr "ATENÇÃO: max-mem-size =%4.1fM muito pequeno e ignorado\n"
 
-#: src/gnuwin32/system.c:1023
+#: src/gnuwin32/system.c:1032
 #, c-format
 msgid "WARNING: --max-mem-size=%4.0fM: too large and taken as %uM\n"
 msgstr "ATENÇÃO: max-mem-size =%4.0fM muito grande e tomando como %uM\n"
 
-#: src/gnuwin32/system.c:1039
+#: src/gnuwin32/system.c:1048
 #, fuzzy, c-format
 msgid "option '%s' requires an argument"
 msgstr "operações binárias requerem dois argumentos"
 
-#: src/gnuwin32/system.c:1070
+#: src/gnuwin32/system.c:1079
 #, fuzzy, c-format
 msgid "option '%s' requires a non-empty argument"
 msgstr "operações binárias requerem dois argumentos"
 
-#: src/gnuwin32/system.c:1078 src/unix/system.c:362
+#: src/gnuwin32/system.c:1087 src/unix/system.c:347
 #, c-format
 msgid "WARNING: '-e %s' omitted as input is too long\n"
 msgstr "ATENÇÃO: '-e %s' omitido na entrada é muito grande\n"
 
-#: src/gnuwin32/system.c:1082 src/unix/system.c:375
+#: src/gnuwin32/system.c:1091 src/unix/system.c:360
 #, c-format
 msgid "WARNING: unknown option '%s'\n"
 msgstr "ATENÇÃO: opção desconhecida '%s'\n"
 
-#: src/gnuwin32/system.c:1104 src/unix/system.c:379
+#: src/gnuwin32/system.c:1113 src/unix/system.c:364
 #, c-format
 msgid "ARGUMENT '%s' __ignored__\n"
 msgstr "ARGUMENTO '%s' __ignorado__\n"
 
-#: src/gnuwin32/system.c:1110 src/unix/system.c:386
+#: src/gnuwin32/system.c:1119 src/unix/system.c:371
 msgid "cannot use -e with -f or --file"
 msgstr "não é possível usar -e com -f ou --file"
 
-#: src/gnuwin32/system.c:1128
+#: src/gnuwin32/system.c:1137
 msgid "creation of tmpfile failed -- set TMPDIR suitably?"
 msgstr "criação de tmpfile falho -- tente definir TMPDIR adequadamente?"
 
-#: src/gnuwin32/system.c:1147 src/unix/system.c:437
+#: src/gnuwin32/system.c:1156 src/unix/system.c:422
 msgid "you must specify '--save', '--no-save' or '--vanilla'"
 msgstr "você deve especificar '--save', '--no-save' ou '--vanilla'"
 
-#: src/gnuwin32/system.c:1152
+#: src/gnuwin32/system.c:1161
 msgid ""
 "impossible to create 'reader thread'; you must free some system resources"
 msgstr ""
 "impossível criar 'reader thread'; você deve liberar algum recurso do sistema"
 
-#: src/include/Errormsg.h:25 src/main/subscript.c:375 src/main/subscript.c:393
-#: src/main/subscript.c:417 src/main/subscript.c:456 src/main/subscript.c:584
-#: src/main/subscript.c:623 src/main/subscript.c:766
+#: src/include/Errormsg.h:27 src/main/subscript.c:383 src/main/subscript.c:401
+#: src/main/subscript.c:425 src/main/subscript.c:464 src/main/subscript.c:662
+#: src/main/subscript.c:701 src/main/subscript.c:844
 msgid "subscript out of bounds"
 msgstr "índice fora de limites"
 
-#: src/include/Errormsg.h:26
+#: src/include/Errormsg.h:28
 #, c-format
 msgid "object of type '%s' is not subsettable"
 msgstr "objeto de tipo '%s' não possível dividir em subconjuntos"
 
-#: src/main/CommandLineArgs.c:170
+#: src/main/CommandLineArgs.c:171
 #, fuzzy
 msgid "WARNING: no value given for --encoding"
 msgstr "ATENÇÃO: nenhum valor especificado para --encoding\n"
 
-#: src/main/CommandLineArgs.c:195
+#: src/main/CommandLineArgs.c:196
 #, fuzzy, c-format
 msgid "WARNING: option '%s' no longer supported"
 msgstr "ATENÇÃO: opção '%s' não mais suportada\n"
 
-#: src/main/CommandLineArgs.c:206
+#: src/main/CommandLineArgs.c:207
 #, fuzzy, c-format
 msgid "WARNING: no value given for '%s'"
 msgstr "ATENÇÃO: nenhum valor especificado para '%s'\n"
 
-#: src/main/CommandLineArgs.c:216
+#: src/main/CommandLineArgs.c:217
 #, fuzzy, c-format
 msgid "WARNING: '%s' value is invalid: ignored"
 msgstr "ATENÇÃO: valor '%s' é inválido: ignorado\n"
 
-#: src/main/CommandLineArgs.c:220
+#: src/main/CommandLineArgs.c:221
 #, fuzzy, c-format
 msgid "WARNING: %s: too large and ignored"
 msgstr "ATENÇÃO: %s: muito grande e ignorado\n"
 
-#: src/main/CommandLineArgs.c:234
+#: src/main/CommandLineArgs.c:235
 #, fuzzy
 msgid "WARNING: no value given for '--max-ppsize'"
 msgstr "ATENÇÃO: nenhum valor especificado para '--max-ppsize'\n"
 
-#: src/main/CommandLineArgs.c:239
+#: src/main/CommandLineArgs.c:240
 #, fuzzy
 msgid "WARNING: '--max-ppsize' value is negative: ignored"
 msgstr "ATENÇÃO: valor de '--max-ppsize' negativo: ignorado\n"
 
-#: src/main/CommandLineArgs.c:241
+#: src/main/CommandLineArgs.c:242
 #, fuzzy
 msgid "WARNING: '--max-ppsize' value is too small: ignored"
 msgstr "ATENÇÃO: valor de '--max-ppsize' é muito pequeno: ignorado\n"
 
-#: src/main/CommandLineArgs.c:244
+#: src/main/CommandLineArgs.c:245
 #, fuzzy
 msgid "WARNING: '--max-ppsize' value is too large: ignored"
 msgstr "ATENÇÃO: valor de '--max-ppsize' é muito grande: ignorado\n"
 
-#: src/main/RNG.c:175
+#: src/main/RNG.c:176
 #, c-format
 msgid "unif_rand: unimplemented RNG kind %d"
 msgstr "unif_rand: tipo RNG não implementado %d"
 
-#: src/main/RNG.c:260
+#: src/main/RNG.c:261
 #, c-format
 msgid "FixupSeeds: unimplemented RNG kind %d"
 msgstr "FixupSeeds: tipo RNG não implementado %d"
 
-#: src/main/RNG.c:302
+#: src/main/RNG.c:301
 msgid "'user_unif_rand' not in load table"
 msgstr "'user_unif_rand' não está na tabela de carregamento"
 
-#: src/main/RNG.c:310
+#: src/main/RNG.c:309
 msgid "cannot read seeds unless 'user_unif_nseed' is supplied"
 msgstr ""
 "não é possível ler as sementes a não ser que 'user_unif_nseed' seja "
 "especificado"
 
-#: src/main/RNG.c:315
+#: src/main/RNG.c:314
 msgid "seed length must be in 0...625; ignored"
 msgstr "comprimento da semente deve estar em 0...625; ignorado"
 
-#: src/main/RNG.c:323
+#: src/main/RNG.c:322
 #, c-format
 msgid "RNG_Init: unimplemented RNG kind %d"
 msgstr "RNG_Init: tipo RNG não implementado %d"
 
-#: src/main/RNG.c:354
+#: src/main/RNG.c:351
 #, fuzzy
 msgid "'.Random.seed' is a missing argument with no default"
 msgstr "argumento .Random.seed ausente, sem padrão"
 
-#: src/main/RNG.c:355
+#: src/main/RNG.c:352
 #, fuzzy, c-format
 msgid "'.Random.seed' is not an integer vector but of type '%s', so ignored"
 msgstr ".Random.seed não é um vetor inteiro mas sim do tipo '%s'"
 
-#: src/main/RNG.c:363
+#: src/main/RNG.c:360
 #, fuzzy
 msgid "'.Random.seed[1]' is not a valid integer, so ignored"
 msgstr ".Random.seed[1] não é um inteiro válido"
 
-#: src/main/RNG.c:369
+#: src/main/RNG.c:366
 #, fuzzy
 msgid "'.Random.seed[1]' is not a valid Normal type, so ignored"
 msgstr ".Random.seed[0] não é um tipo Normal válido"
 
-#: src/main/RNG.c:383
+#: src/main/RNG.c:380
 #, fuzzy
 msgid "'.Random.seed[1] = 5' but no user-supplied generator, so ignored"
 msgstr ".Random.seed[1] = 5 mas não foi especificado um gerador do usuário"
 
-#: src/main/RNG.c:388
+#: src/main/RNG.c:385
 #, fuzzy
 msgid "'.Random.seed[1]' is not a valid RNG kind so ignored"
 msgstr ".Random.seed[1] não é um tipo RNG válido (código)"
 
-#: src/main/RNG.c:415
+#: src/main/RNG.c:412
 #, fuzzy
 msgid "'.Random.seed' has wrong length"
 msgstr ".Random.seed com comprimento inválido"
 
-#: src/main/RNG.c:468
+#: src/main/RNG.c:465
 #, c-format
 msgid "RNGkind: unimplemented RNG kind %d"
 msgstr "RNGkind: tipo RNG não implementado %d"
 
-#: src/main/RNG.c:488
+#: src/main/RNG.c:485
 #, fuzzy
 msgid "invalid Normal type in 'RNGkind'"
 msgstr "tipo Normal inválido em RNGkind"
 
-#: src/main/RNG.c:491
+#: src/main/RNG.c:488
 msgid "'user_norm_rand' not in load table"
 msgstr "'user_norm_rand' não está na tabela de carregamento"
 
-#: src/main/RNG.c:535
+#: src/main/RNG.c:532
 msgid "supplied seed is not a valid integer"
 msgstr "semente especificada não é um inteiro válido"
 
@@ -646,7 +628,7 @@ msgstr "DLLname '%s' é muito longo"
 msgid "could not allocate space for 'name'"
 msgstr "não foi possível alocar espaço para 'name'"
 
-#: src/main/Rdynload.c:881 src/main/Rdynload.c:897 src/main/util.c:698
+#: src/main/Rdynload.c:881 src/main/Rdynload.c:897 src/main/util.c:762
 msgid "character argument expected"
 msgstr "esperado um argumento caractere"
 
@@ -665,34 +647,37 @@ msgid "shared object '%s' was not loaded"
 msgstr "objeto compartilhado '%s' não foi carregado"
 
 #: src/main/Rdynload.c:979
-#, c-format
-msgid "cannot allocate memory for registered native symbol (%d bytes)"
-msgstr ""
+#, fuzzy, c-format
+msgid "cannot allocate memory for registered native symbol (%d byte)"
+msgid_plural "cannot allocate memory for registered native symbol (%d bytes)"
+msgstr[0] ""
+"não foi possível alocar memória para símbolo nativo registrado (%d bytes)"
+msgstr[1] ""
 "não foi possível alocar memória para símbolo nativo registrado (%d bytes)"
 
-#: src/main/Rdynload.c:1100 src/main/Rdynload.c:1321
+#: src/main/Rdynload.c:1102 src/main/Rdynload.c:1323
 msgid "must pass package name or DllInfo reference"
 msgstr "deve ser passado um nome de pacote ou referência para DllInfo"
 
-#: src/main/Rdynload.c:1197
+#: src/main/Rdynload.c:1199
 #, fuzzy, c-format
 msgid "unimplemented type %d in 'createRSymbolObject'"
 msgstr "Tipo não implementado %d em createRSymbolObject"
 
-#: src/main/Rdynload.c:1279 src/main/Rdynload.c:1373
+#: src/main/Rdynload.c:1281 src/main/Rdynload.c:1375
 msgid "R_getRegisteredRoutines() expects a DllInfo reference"
 msgstr "R_getRegisteredRoutines() espera uma referência para DllInfo"
 
-#: src/main/Rdynload.c:1282 src/main/Rdynload.c:1376
+#: src/main/Rdynload.c:1284 src/main/Rdynload.c:1378
 msgid "NULL value passed for DllInfo"
 msgstr "valor NULL passado para DllInfo"
 
-#: src/main/Rdynload.c:1436
+#: src/main/Rdynload.c:1441
 #, c-format
 msgid "function '%s' not provided by package '%s'"
 msgstr "pacote '%s' não oferece a função '%s'"
 
-#: src/main/Rdynload.c:1438
+#: src/main/Rdynload.c:1443
 msgid "table entry must be an external pointer"
 msgstr "entrada da tabela deve ser um ponteiro externo"
 
@@ -701,9 +686,9 @@ msgstr "entrada da tabela deve ser um ponteiro externo"
 msgid "problem in setting variable '%s' in Renviron"
 msgstr "problema ao definir fuso horário"
 
-#: src/main/Renviron.c:311
-#, fuzzy
-msgid "argument 'x' must be a character string"
+#: src/main/Renviron.c:311 src/main/objects.c:1174 src/main/raw.c:155
+#, fuzzy, c-format
+msgid "argument '%s' must be a character string"
 msgstr "argumento 'code' deve ser uma string de caracteres"
 
 #: src/main/Renviron.c:315
@@ -711,95 +696,122 @@ msgstr "argumento 'code' deve ser uma string de caracteres"
 msgid "file '%s' cannot be opened for reading"
 msgstr "arquivo zip '%s' não pode ser aberto"
 
-#: src/main/Rstrptime.h:517 src/main/Rstrptime.h:984
+#: src/main/Rstrptime.h:524 src/main/Rstrptime.h:991
 #, c-format
 msgid "use of %s for input is not supported"
 msgstr "uso de %s como entrada não é suportado"
 
-#: src/main/Rstrptime.h:1242
+#: src/main/Rstrptime.h:1263
 msgid "input string is too long"
 msgstr "string de entrada é muito longa"
 
-#: src/main/Rstrptime.h:1244
+#: src/main/Rstrptime.h:1265
 msgid "invalid multibyte input string"
 msgstr "string de entrada multibyte inválida"
 
-#: src/main/Rstrptime.h:1247
+#: src/main/Rstrptime.h:1268
 msgid "format string is too long"
 msgstr "string de formato é muito longa"
 
-#: src/main/Rstrptime.h:1249
+#: src/main/Rstrptime.h:1270
 msgid "invalid multibyte format string"
 msgstr "string de formato multibyte inválida"
 
-#: src/main/agrep.c:133 src/main/agrep.c:777 src/main/character.c:1039
-#: src/main/character.c:1043 src/main/grep.c:769 src/main/grep.c:1512
-#: src/main/grep.c:1516 src/main/grep.c:2325 src/main/grep.c:2623
+#: src/main/agrep.c:133 src/main/agrep.c:778 src/main/character.c:1291
+#: src/main/character.c:1295 src/main/grep.c:782 src/main/grep.c:1530
+#: src/main/grep.c:1534 src/main/grep.c:2347 src/main/grep.c:2654
 #, c-format
 msgid "argument '%s' has length > 1 and only the first element will be used"
 msgstr ""
 "argumento '%s' tem comprimento > 1 e somente o primeiro elemento será usado"
 
-#: src/main/agrep.c:189 src/main/agrep.c:818
+#: src/main/agrep.c:190 src/main/agrep.c:820
 #, fuzzy
 msgid "'pattern' must be a non-empty character string"
 msgstr "'title' deve ser uma string de caracteres"
 
-#: src/main/agrep.c:200 src/main/agrep.c:827 src/main/grep.c:838
-#: src/main/grep.c:2381 src/main/grep.c:2662
+#: src/main/agrep.c:201 src/main/agrep.c:829 src/main/grep.c:853
+#: src/main/grep.c:2405 src/main/grep.c:2707
 msgid "regular expression is invalid in this locale"
 msgstr "expressão regular é inválida nesse locale"
 
-#: src/main/agrep.c:206 src/main/agrep.c:623
+#: src/main/agrep.c:207 src/main/agrep.c:624
 #, c-format
 msgid "regcomp error:  '%s'"
 msgstr "erro regcomp:  '%s'"
 
-#: src/main/agrep.c:238 src/main/agrep.c:871 src/main/grep.c:227
-#: src/main/grep.c:315 src/main/grep.c:423 src/main/grep.c:578
-#: src/main/grep.c:889 src/main/grep.c:2480 src/main/grep.c:2548
-#: src/main/grep.c:2698
+#: src/main/agrep.c:239 src/main/agrep.c:874 src/main/grep.c:233
+#: src/main/grep.c:323 src/main/grep.c:434 src/main/grep.c:590
+#: src/main/grep.c:907 src/main/grep.c:2510 src/main/grep.c:2579
+#: src/main/grep.c:2744
 #, c-format
 msgid "input string %d is invalid in this locale"
 msgstr "string de entrada %d é inválida nesse locale"
 
-#: src/main/agrep.c:525 src/main/agrep.c:765 src/main/grep.c:155
-#: src/main/grep.c:760 src/main/grep.c:762 src/main/grep.c:1047
-#: src/main/grep.c:1055 src/main/grep.c:1503 src/main/grep.c:1505
-#: src/main/grep.c:2315 src/main/grep.c:2317 src/main/grep.c:2611
+#: src/main/agrep.c:526 src/main/agrep.c:766 src/main/grep.c:159
+#: src/main/grep.c:773 src/main/grep.c:775 src/main/grep.c:1065
+#: src/main/grep.c:1073 src/main/grep.c:1521 src/main/grep.c:1523
+#: src/main/grep.c:2337 src/main/grep.c:2339 src/main/grep.c:2642
 #, c-format
 msgid "argument '%s' will be ignored"
 msgstr "argumento '%s' será ignorado"
 
-#: src/main/agrep.c:614
+#: src/main/agrep.c:615
 #, fuzzy, c-format
 msgid "input string x[%d] is invalid in this locale"
 msgstr "string de entrada %d é inválida nesse locale"
 
-#: src/main/agrep.c:660
+#: src/main/agrep.c:661
 #, fuzzy, c-format
 msgid "input string y[%d] is invalid in this locale"
 msgstr "string de entrada %d é inválida nesse locale"
 
-#: src/main/agrep.c:833 src/main/grep.c:2668
+#: src/main/agrep.c:835 src/main/grep.c:2713
 #, fuzzy, c-format
 msgid "regcomp error: '%s'"
 msgstr "erro regcomp:  '%s'"
 
-#: src/main/apply.c:103
+#: src/main/apply.c:98
 #, fuzzy
 msgid "'FUN.VALUE' must be a vector"
 msgstr "FUN.VALUE deve ser um vetor"
 
-#: src/main/apply.c:108 src/main/complex.c:758
+#: src/main/apply.c:100 src/main/array.c:506 src/main/character.c:847
+#: src/main/character.c:1655 src/main/connections.c:3551
+#: src/main/context.c:653 src/main/context.c:672 src/main/datetime.c:681
+#: src/main/datetime.c:783 src/main/datetime.c:1047 src/main/dotcode.c:222
+#: src/main/errors.c:910 src/main/errors.c:943 src/main/errors.c:1049
+#: src/main/errors.c:1074 src/main/errors.c:1079 src/main/errors.c:1349
+#: src/main/identical.c:66 src/main/identical.c:67 src/main/identical.c:68
+#: src/main/identical.c:69 src/main/identical.c:70 src/main/platform.c:2982
+#: src/main/seq.c:192 src/main/seq.c:343 src/main/seq.c:348 src/main/seq.c:352
+#: src/main/seq.c:397 src/main/seq.c:401 src/main/seq.c:405
+#: src/main/sort.c:1244 src/main/sort.c:1327 src/main/sort.c:1331
+#: src/main/sort.c:1338 src/main/source.c:225 src/main/summary.c:954
+#: src/main/sysutils.c:250 src/main/util.c:1051 src/main/util.c:1056
+#: src/main/util.c:1063 src/main/util.c:1066 src/main/util.c:2035
+#: src/modules/X11/devX11.c:3148 src/modules/X11/devX11.c:3175
+#: src/modules/X11/devX11.c:3180 src/modules/X11/devX11.c:3185
+#: src/modules/X11/devX11.c:3195 src/modules/X11/devX11.c:3200
+#: src/modules/X11/devX11.c:3204 src/modules/X11/devX11.c:3208
+#, c-format
+msgid "invalid '%s' value"
+msgstr "valor de '%s' inválido"
+
+#: src/main/apply.c:103 src/main/complex.c:753
 msgid "invalid length"
 msgstr "comprimento inválido"
 
-#: src/main/apply.c:113
+#: src/main/apply.c:108
 msgid "long vectors are not supported for matrix/array results"
 msgstr ""
 
-#: src/main/apply.c:162
+#: src/main/apply.c:115
+#, c-format
+msgid "type '%s' is not supported"
+msgstr "tipo '%s' não é suportado"
+
+#: src/main/apply.c:163
 #, c-format
 msgid ""
 "values must be length %d,\n"
@@ -808,7 +820,7 @@ msgstr ""
 "valores devem ser de comprimento %d,\n"
 " mas o resultado de FUN(X[[%d]]) tem comprimento %d"
 
-#: src/main/apply.c:174
+#: src/main/apply.c:175
 #, c-format
 msgid ""
 "values must be type '%s',\n"
@@ -817,17 +829,12 @@ msgstr ""
 "valores devem ser do tipo '%s',\n"
 " mas o resultado de FUN(X[[%d]]) é de tipo '%s'"
 
-#: src/main/apply.c:193
-#, c-format
-msgid "type '%s' is not supported"
-msgstr "tipo '%s' não é suportado"
-
-#: src/main/apply.c:225
+#: src/main/apply.c:252
 #, c-format
 msgid "dimnames(<value>) is neither NULL nor list of length %d"
 msgstr "dimnames(<value>) não é NULL nem uma lista de comprimento %d"
 
-#: src/main/arithmetic.c:42
+#: src/main/arithmetic.c:42 src/main/eval.c:3633
 msgid "NaNs produced"
 msgstr "NaNs produzidos"
 
@@ -836,111 +843,114 @@ msgstr "NaNs produzidos"
 msgid "non-numeric argument to mathematical function"
 msgstr "Argumento não-numérico para função matemática"
 
-#: src/main/arithmetic.c:187
+#: src/main/arithmetic.c:186
 msgid "probable complete loss of accuracy in modulus"
 msgstr "provável perda completa de precisão no módulo"
 
-#: src/main/arithmetic.c:337
+#: src/main/arithmetic.c:298
 msgid "NAs produced by integer overflow"
 msgstr "NAs produzidos por estouro de inteiro"
 
-#: src/main/arithmetic.c:538
+#: src/main/arithmetic.c:499
 msgid "operator needs one or two arguments"
 msgstr "operador precisa de um ou dois argumentos"
 
-#: src/main/arithmetic.c:554
+#: src/main/arithmetic.c:515
 msgid "non-numeric argument to binary operator"
 msgstr "argumento não-numérico para operador binário"
 
-#: src/main/arithmetic.c:615 src/main/relop.c:227
+#: src/main/arithmetic.c:576 src/main/relop.c:221
 msgid "non-conformable arrays"
 msgstr "arrays de dimensão não compatível"
 
-#: src/main/arithmetic.c:658
+#: src/main/arithmetic.c:619
 msgid "non-conformable time-series"
 msgstr "séries temporais não compatíveis"
 
-#: src/main/arithmetic.c:680 src/main/logic.c:143 src/main/relop.c:166
-#: src/main/relop.c:265
+#: src/main/arithmetic.c:641 src/main/logic.c:135 src/main/relop.c:160
+#: src/main/relop.c:259
 msgid "longer object length is not a multiple of shorter object length"
 msgstr ""
 "comprimento do objeto maior não é múltiplo do comprimento do objeto menor"
 
-#: src/main/arithmetic.c:751
+#: src/main/arithmetic.c:712
 msgid "invalid argument to unary operator"
 msgstr "argumento inválido para operador unário"
 
-#: src/main/arithmetic.c:780 src/main/arithmetic.c:805
-#: src/main/arithmetic.c:824
+#: src/main/arithmetic.c:741 src/main/arithmetic.c:766
+#: src/main/arithmetic.c:785
 msgid "invalid unary operator"
 msgstr "operador unário ilegal"
 
-#: src/main/arithmetic.c:1241
+#: src/main/arithmetic.c:1191
 msgid "unimplemented real function of 1 argument"
 msgstr "função real de 1 argumento não implementada"
 
-#: src/main/arithmetic.c:1255 src/main/complex.c:648 src/main/complex.c:718
+#: src/main/arithmetic.c:1205 src/main/complex.c:638 src/main/complex.c:708
 msgid "unimplemented complex function"
 msgstr "função complexa não implementada"
 
-#: src/main/arithmetic.c:1526 src/main/arithmetic.c:1877
-#: src/main/arithmetic.c:2056 src/main/arithmetic.c:2168
+#: src/main/arithmetic.c:1484 src/main/arithmetic.c:1877
+#: src/main/arithmetic.c:2049 src/main/arithmetic.c:2152
 #, c-format
 msgid "unimplemented real function of %d numeric arguments"
 msgstr "função real de %d argumentos numéricos não implementada"
 
-#: src/main/arithmetic.c:1552
-#, c-format
-msgid "%d arguments passed to '%s' which requires 1 or 2"
-msgstr "%d argumentos passados para '%s', que requer 1 ou 2"
+#: src/main/arithmetic.c:1511
+#, fuzzy, c-format
+msgid "%d argument passed to '%s' which requires 1 or 2 arguments"
+msgid_plural "%d arguments passed to '%s'which requires 1 or 2 arguments"
+msgstr[0] "%d argumentos passados para '%s', que requer 1 ou 2"
+msgstr[1] "%d argumentos passados para '%s', que requer 1 ou 2"
 
-#: src/main/arithmetic.c:1570
+#: src/main/arithmetic.c:1530
 msgid "invalid second argument of length 0"
 msgstr "segundo argumento inválido com comprimento zero"
 
-#: src/main/arithmetic.c:1639
+#: src/main/arithmetic.c:1625 src/main/arithmetic.c:1643 src/main/envir.c:1464
+#: src/main/envir.c:1972 src/main/eval.c:630 src/main/eval.c:4237
+#, c-format
+msgid "argument \"%s\" is missing, with no default"
+msgstr "argumento \"%s\" ausente, sem padrão"
+
+#: src/main/arithmetic.c:1649
 msgid "invalid argument 'base' of length 0"
 msgstr "argumento 'base' inválido com comprimento zero"
 
-#: src/main/arithmetic.c:1647
-#, c-format
-msgid "%d arguments passed to 'log' which requires 1 or 2"
-msgstr "%d argumentos passados para 'log', que requer 1 ou 2"
-
-#: src/main/array.c:79 src/main/array.c:1441
+#: src/main/array.c:82 src/main/array.c:1591
 #, fuzzy, c-format
 msgid "'data' must be of a vector type, was '%s'"
 msgstr "'data' deve ser de tipo vetor"
 
-#: src/main/array.c:94 src/main/array.c:102
+#: src/main/array.c:97 src/main/array.c:105
 msgid "non-numeric matrix extent"
 msgstr "extensão matricial não numérica"
 
-#: src/main/array.c:97 src/main/array.c:1535
+#: src/main/array.c:100 src/main/array.c:1695
 msgid "invalid 'nrow' value (too large or NA)"
 msgstr "valor de 'nrow' inválido (muito grande ou NA)"
 
-#: src/main/array.c:99 src/main/array.c:1537
+#: src/main/array.c:102 src/main/array.c:1697
 msgid "invalid 'nrow' value (< 0)"
 msgstr "valor 'nrow' inválido (< 0)"
 
-#: src/main/array.c:105 src/main/array.c:1540
+#: src/main/array.c:108 src/main/array.c:1700
 msgid "invalid 'ncol' value (too large or NA)"
 msgstr "valor de 'ncol' inválido (muito grande ou NA)"
 
-#: src/main/array.c:107 src/main/array.c:1542
+#: src/main/array.c:110 src/main/array.c:1702
 msgid "invalid 'ncol' value (< 0)"
 msgstr "valor de 'ncol' inválido (< 0)"
 
-#: src/main/array.c:116
+#: src/main/array.c:119
 msgid "nc = 0 for non-null data"
 msgstr ""
 
-#: src/main/array.c:124
+#: src/main/array.c:127
 msgid "nr = 0 for non-null data"
 msgstr ""
 
-#: src/main/array.c:135
+#: src/main/array.c:138
 #, c-format
 msgid ""
 "data length [%d] is not a sub-multiple or multiple of the number of rows [%d]"
@@ -948,7 +958,7 @@ msgstr ""
 "comprimento dos dados [%d] não é um submúltiplo ou múltiplo do número de "
 "linhas [%d]"
 
-#: src/main/array.c:138
+#: src/main/array.c:141
 #, c-format
 msgid ""
 "data length [%d] is not a sub-multiple or multiple of the number of columns "
@@ -957,300 +967,311 @@ msgstr ""
 "comprimento dos dados [%d] não é um submúltiplo ou múltiplo do número de "
 "colunas [%d]"
 
-#: src/main/array.c:141
+#: src/main/array.c:144
 msgid "data length exceeds size of matrix"
 msgstr "comprimento dos dados excede o tamanho da matrix"
 
-#: src/main/array.c:147 src/main/array.c:1453 src/main/array.c:1549
+#: src/main/array.c:150 src/main/array.c:1603 src/main/array.c:1709
 msgid "too many elements specified"
 msgstr "elementos demais especificados"
 
-#: src/main/array.c:205
+#: src/main/array.c:208
 msgid "negative extents to matrix"
 msgstr "extensão negativa para matrix"
 
-#: src/main/array.c:208
+#: src/main/array.c:211
 msgid "allocMatrix: too many elements specified"
 msgstr "allocMatrix: muitos elementos especificados"
 
-#: src/main/array.c:236
+#: src/main/array.c:239
 msgid "negative extents to 3D array"
 msgstr "extensão negativa para array 3D"
 
-#: src/main/array.c:239
+#: src/main/array.c:242
 #, fuzzy
 msgid "'alloc3Darray': too many elements specified"
 msgstr "alloc3Darray: muitos elementos especificados"
 
-#: src/main/array.c:264
+#: src/main/array.c:267
 #, fuzzy
 msgid "'allocArray': too many elements specified by 'dims'"
 msgstr "allocArray: muitos elementos especificados pelas 'dims'"
 
-#: src/main/array.c:448
+#: src/main/array.c:523
+#, fuzzy, c-format
+msgid "'%s' must be a list or atomic vector"
+msgstr "'x' deve ser um vetor de caracteres"
+
+#: src/main/array.c:561
 #, fuzzy, c-format
 msgid "a matrix-like object is required as argument to '%s'"
 msgstr "um objeto do tipo matriz é requerida como argumento para 'row/col'"
 
-#: src/main/array.c:662
+#: src/main/array.c:776
 msgid "requires numeric/complex matrix/vector arguments"
 msgstr "requer argumentos numéricos/complexos matriz/vetor"
 
-#: src/main/array.c:752 src/main/array.c:756 src/main/array.c:760
+#: src/main/array.c:886 src/main/array.c:890 src/main/array.c:894
 msgid "non-conformable arguments"
 msgstr "argumentos não compatíveis"
 
-#: src/main/array.c:1058
+#: src/main/array.c:1193
 msgid "argument is not a matrix"
 msgstr "argumento não é uma matriz"
 
-#: src/main/array.c:1093
+#: src/main/array.c:1228
 msgid "invalid first argument, must be an array"
 msgstr "primeiro argumento inválido: deve ser um array"
 
-#: src/main/array.c:1107
+#: src/main/array.c:1242
 #, fuzzy, c-format
 msgid "'perm' is of wrong length %d (!= %d)"
 msgstr "'perm' tem comprimento errado"
 
-#: src/main/array.c:1112 src/main/array.c:1115
+#: src/main/array.c:1247 src/main/array.c:1250
 msgid "'a' does not have named dimnames"
 msgstr "'a' não tem nomes de dimensões"
 
-#: src/main/array.c:1122
+#: src/main/array.c:1257
 #, fuzzy, c-format
 msgid "'perm[%d]' does not match a dimension name"
 msgstr "perm[%d] não corresponde a um nome de dimensão"
 
-#: src/main/array.c:1135
+#: src/main/array.c:1270
 msgid "value out of range in 'perm'"
 msgstr "valor fora de limites em 'perm'"
 
-#: src/main/array.c:1217
+#: src/main/array.c:1352
 msgid "'resize' must be TRUE or FALSE"
 msgstr "'resize' deve ser TRUE ou FALSE"
 
-#: src/main/array.c:1275
+#: src/main/array.c:1422
 msgid "'x' must be numeric"
 msgstr "'x' deve ser numérico"
 
-#: src/main/array.c:1449
+#: src/main/array.c:1425
+#, fuzzy
+msgid "'x' is too short"
+msgstr "'object' é muito curto"
+
+#: src/main/array.c:1599
 #, fuzzy
 msgid "'dims' cannot be of length 0"
 msgstr "'hadj' deve ter comprimento 1"
 
-#: src/main/array.c:1545
+#: src/main/array.c:1705
 #, fuzzy
 msgid "'x' must have positive length"
 msgstr "'value' deve ter comprimento positivo"
 
-#: src/main/array.c:1605
+#: src/main/array.c:1771
 #, c-format
 msgid "singular matrix in 'backsolve'. First zero in diagonal [%d]"
 msgstr ""
 
-#: src/main/attrib.c:40 src/main/attrib.c:235 src/main/attrib.c:269
-#: src/main/attrib.c:291 src/main/attrib.c:405 src/main/attrib.c:452
-#: src/main/attrib.c:502
+#: src/main/attrib.c:40 src/main/attrib.c:231 src/main/attrib.c:265
+#: src/main/attrib.c:287 src/main/attrib.c:403 src/main/attrib.c:450
+#: src/main/attrib.c:501
 msgid "attempt to set an attribute on NULL"
 msgstr "tentativa de especificar um atributo em um NULL"
 
-#: src/main/attrib.c:72
+#: src/main/attrib.c:77
 #, c-format
 msgid "row names must be 'character' or 'integer', not '%s'"
 msgstr "'row.names' deve ser caracter ou inteiro, não '%s'"
 
-#: src/main/attrib.c:124
+#: src/main/attrib.c:130
 #, c-format
 msgid "getAttrib: invalid type (%s) for TAG"
 msgstr "getAttrib: tipo inválido (%s) para TAG"
 
-#: src/main/attrib.c:379
+#: src/main/attrib.c:377
 #, c-format
 msgid "invalid type (%s) for 'names': must be vector"
 msgstr "tipo inválido (%s) para 'names': deve ser um vetor"
 
-#: src/main/attrib.c:382
+#: src/main/attrib.c:380
 #, c-format
 msgid "'names' attribute [%d] must be the same length as the vector [%d]"
 msgstr "atributo 'names' [%d] deve ter o mesmo comprimento que o vetor [%d]"
 
-#: src/main/attrib.c:387
+#: src/main/attrib.c:385
 msgid "names() applied to a non-vector"
 msgstr "names() aplicado a um objeto diferente de vetor"
 
-#: src/main/attrib.c:395
+#: src/main/attrib.c:393
 msgid "invalid time series parameters specified"
 msgstr "parâmetro de séries temporais inválido"
 
-#: src/main/attrib.c:409
+#: src/main/attrib.c:407
 msgid "'tsp' attribute must be numeric"
 msgstr "atributo 'tsp' deve ser numérico"
 
-#: src/main/attrib.c:415
+#: src/main/attrib.c:413
 msgid "'tsp' attribute must be numeric of length three"
 msgstr "atributo 'tsp' deve ser numérico de comprimento três"
 
-#: src/main/attrib.c:432
+#: src/main/attrib.c:430
 msgid "cannot assign 'tsp' to zero-length vector"
 msgstr "não é possível atribuir 'tsp' a um vetor de comprimento 0"
 
-#: src/main/attrib.c:463
+#: src/main/attrib.c:461
 msgid "attempt to set invalid 'comment' attribute"
 msgstr "tentativa de especificar um atributo 'comment' inválido"
 
-#: src/main/attrib.c:511
+#: src/main/attrib.c:510
 msgid "adding class \"factor\" to an invalid object"
 msgstr "adicionando classe \"factor\" a um objeto inválido"
 
-#: src/main/attrib.c:519
+#: src/main/attrib.c:541
 msgid "attempt to set invalid 'class' attribute"
 msgstr "tentativa de especificar um atributo 'class' inválido"
 
-#: src/main/attrib.c:777
+#: src/main/attrib.c:872
 #, c-format
 msgid "class '%s' has no 'names' slot"
 msgstr ""
 
-#: src/main/attrib.c:779
+#: src/main/attrib.c:874
 #, c-format
 msgid ""
 "class '%s' has no 'names' slot; assigning a names attribute will create an "
 "invalid object"
 msgstr ""
 
-#: src/main/attrib.c:782
+#: src/main/attrib.c:877
 #, c-format
 msgid ""
 "invalid to use names()<- to set the 'names' slot in a non-vector class ('%s')"
 msgstr ""
 
-#: src/main/attrib.c:812
+#: src/main/attrib.c:907
 msgid "incompatible 'names' argument"
 msgstr "argumento 'names' incompatível"
 
-#: src/main/attrib.c:867
+#: src/main/attrib.c:962
 #, c-format
 msgid "invalid type (%s) to set 'names' attribute"
 msgstr "tipo inválido (%s) para especificar atributo 'names'"
 
-#: src/main/attrib.c:938
+#: src/main/attrib.c:1035
 msgid "'dimnames' applied to non-array"
 msgstr "'dimnames' aplicado a um objeto diferente de array"
 
-#: src/main/attrib.c:943
-msgid "'dimnames' must be a list"
-msgstr "'dimnames' deve ser uma lista"
+#: src/main/attrib.c:1040 src/main/coerce.c:2471
+#, fuzzy, c-format
+msgid "'%s' must be a list"
+msgstr "'%s' deve ser uma lista"
 
-#: src/main/attrib.c:946 src/main/attrib.c:974
+#: src/main/attrib.c:1043 src/main/attrib.c:1071
 #, c-format
 msgid "length of 'dimnames' [%d] must match that of 'dims' [%d]"
 msgstr "comprimento de 'dimnames' [%d] deve ser o mesmo de 'dims' [%d]"
 
-#: src/main/attrib.c:980
+#: src/main/attrib.c:1077
 #, c-format
 msgid "invalid type (%s) for 'dimnames' (must be a vector)"
 msgstr "tipo inválido (%s) para 'dimnames' (deve ser um vetor)"
 
-#: src/main/attrib.c:983
+#: src/main/attrib.c:1080
 #, c-format
 msgid "length of 'dimnames' [%d] not equal to array extent"
 msgstr "comprimento de 'dimnames' [%d] não é igual ao tamanho do array"
 
-#: src/main/attrib.c:1055 src/main/builtin.c:75 src/main/builtin.c:112
-#: src/main/envir.c:1606 src/main/envir.c:1734 src/main/envir.c:1796
-#: src/main/envir.c:1918 src/main/paste.c:74 src/main/paste.c:293
-#: src/main/random.c:487 src/main/random.c:516 src/main/unique.c:1749
+#: src/main/attrib.c:1152 src/main/builtin.c:75 src/main/builtin.c:112
+#: src/main/envir.c:1740 src/main/envir.c:1868 src/main/envir.c:1928
+#: src/main/envir.c:2065 src/main/paste.c:74 src/main/paste.c:293
+#: src/main/random.c:479 src/main/random.c:508 src/main/unique.c:1746
 msgid "invalid first argument"
 msgstr "primeiro argumento inválido"
 
-#: src/main/attrib.c:1058
+#: src/main/attrib.c:1155
 msgid "invalid second argument"
 msgstr "segundo argumento inválido"
 
-#: src/main/attrib.c:1066
+#: src/main/attrib.c:1163
 msgid "length-0 dimension vector is invalid"
 msgstr "vetor de dimensões de comprimento 0 é inválido"
 
-#: src/main/attrib.c:1071
+#: src/main/attrib.c:1168
 msgid "the dims contain missing values"
 msgstr "as dimensões contem valores faltantes"
 
-#: src/main/attrib.c:1073
+#: src/main/attrib.c:1170
 msgid "the dims contain negative values"
 msgstr "as dimensões contem valores negativos"
 
-#: src/main/attrib.c:1078
+#: src/main/attrib.c:1175
 #, fuzzy
 msgid "dims do not match the length of object"
 msgstr "dims [produto %d] não corresponde ao comprimento do objeto [%d]"
 
-#: src/main/attrib.c:1080
+#: src/main/attrib.c:1177
 #, c-format
 msgid "dims [product %d] do not match the length of object [%d]"
 msgstr "dims [produto %d] não corresponde ao comprimento do objeto [%d]"
 
-#: src/main/attrib.c:1177
+#: src/main/attrib.c:1284
 msgid "attributes must be a list or NULL"
 msgstr "atributos devem ser uma lista ou NULL"
 
-#: src/main/attrib.c:1182
+#: src/main/attrib.c:1289
 msgid "attributes must be named"
 msgstr "os atributos devem ter nome"
 
-#: src/main/attrib.c:1186
+#: src/main/attrib.c:1293
 #, c-format
 msgid "all attributes must have names [%d does not]"
 msgstr "todos os atributos devem ter nome [%d não tem]"
 
-#: src/main/attrib.c:1285
+#: src/main/attrib.c:1393
 msgid "'which' must be of mode character"
 msgstr "atributo 'which' deve ser de modo caractere"
 
-#: src/main/attrib.c:1287
+#: src/main/attrib.c:1395
 msgid "exactly one attribute 'which' must be given"
 msgstr "exatamente 1 atributo 'which' deve ser especificado"
 
-#: src/main/attrib.c:1345 src/main/attrib.c:1368 src/main/subscript.c:240
-#: src/main/subscript.c:244 src/main/subset.c:1188 src/main/subset.c:1239
+#: src/main/attrib.c:1456 src/main/attrib.c:1479 src/main/subscript.c:245
+#: src/main/subscript.c:249 src/main/subset.c:1257 src/main/subset.c:1311
 #, c-format
 msgid "partial match of '%s' to '%s'"
 msgstr "correspondência parcial de '%s' para '%s'"
 
-#: src/main/attrib.c:1406
+#: src/main/attrib.c:1525
 #, fuzzy, c-format
 msgid "invalid type '%s' for slot name"
 msgstr "tipo ou compriento inválido para nome de slot"
 
-#: src/main/attrib.c:1444
+#: src/main/attrib.c:1563
 msgid "'name' must be non-null character string"
 msgstr "'name' deve ser uma cadeia de caracteres não nula"
 
-#: src/main/attrib.c:1568 src/main/attrib.c:1639 src/main/attrib.c:1676
+#: src/main/attrib.c:1688 src/main/attrib.c:1759 src/main/attrib.c:1797
 msgid "invalid type or length for slot name"
 msgstr "tipo ou compriento inválido para nome de slot"
 
-#: src/main/attrib.c:1602
+#: src/main/attrib.c:1722
 #, c-format
 msgid "cannot get a slot (\"%s\") from an object of type \"%s\""
 msgstr ""
 "não é possível conseguir um slot (\"%s\") para um objeto do tipo \"%s\""
 
-#: src/main/attrib.c:1613
+#: src/main/attrib.c:1733
 #, c-format
 msgid "no slot of name \"%s\" for this object of class \"%s\""
 msgstr "nenhum slot de nome \"%s\" para esse objeto de classe \"%s\""
 
-#: src/main/attrib.c:1630
+#: src/main/attrib.c:1750
 msgid "attempt to set slot on NULL object"
 msgstr "tentativa de especificar um slot em um objeto NULL"
 
-#: src/main/attrib.c:1671
+#: src/main/attrib.c:1792
 #, fuzzy
 msgid "formal classes cannot be used without the 'methods' package"
 msgstr "classes formais não podem ser utilizadas sem o pacote methods"
 
-#: src/main/attrib.c:1683
+#: src/main/attrib.c:1804
 #, c-format
 msgid ""
 "trying to get slot \"%s\" from an object of a basic class (\"%s\") with no "
@@ -1259,7 +1280,7 @@ msgstr ""
 "tentativa de obter um slot \"%s\" de um objeto de uma classe básica (\"%s\") "
 "sem slots"
 
-#: src/main/attrib.c:1687
+#: src/main/attrib.c:1808
 #, c-format
 msgid ""
 "trying to get slot \"%s\" from an object (class \"%s\") that is not an S4 "
@@ -1268,47 +1289,46 @@ msgstr ""
 "tentativa de obter um slot \"%s\" de um objeto cuja classe (\"%s\") não é um "
 "objeto S4 "
 
-#: src/main/bind.c:161
+#: src/main/bind.c:164
 #, c-format
 msgid "resulting vector exceeds vector length limit in '%s'"
 msgstr ""
 
-#: src/main/bind.c:291 src/main/bind.c:327 src/main/bind.c:376
-#: src/main/bind.c:449 src/main/bind.c:477
+#: src/main/bind.c:294 src/main/bind.c:330 src/main/bind.c:379
+#: src/main/bind.c:452 src/main/bind.c:480
 #, c-format
 msgid "type '%s' is unimplemented in '%s'"
 msgstr "tipo '%s' não está implementado em '%s'"
 
-#: src/main/bind.c:685
+#: src/main/bind.c:688
 msgid "repeated formal argument 'recursive'"
 msgstr "argumento formal repetido 'recursive'"
 
-#: src/main/bind.c:696
+#: src/main/bind.c:699
 msgid "repeated formal argument 'use.names'"
 msgstr "argumento formal repetido 'use.names'"
 
-#: src/main/bind.c:894
+#: src/main/bind.c:900
 msgid "argument not a list"
 msgstr "argumento não é uma lista"
 
-#: src/main/bind.c:1038 src/main/eval.c:2691 src/main/eval.c:2700
-#: src/main/objects.c:318 src/main/objects.c:354 src/main/objects.c:729
-#: src/main/objects.c:746 src/main/objects.c:753
+#: src/main/bind.c:1044 src/main/names.c:1273 src/main/names.c:1278
+#: src/main/names.c:1283 src/main/names.c:1288
 #, c-format
 msgid "class name too long in '%s'"
 msgstr "nome da classe muito longo em '%s'"
 
-#: src/main/bind.c:1114
+#: src/main/bind.c:1128
 #, fuzzy, c-format
 msgid "cannot create a matrix from type '%s'"
 msgstr "não é possível criar uma matriz a partir desses tipos"
 
-#: src/main/bind.c:1185
+#: src/main/bind.c:1198
 #, c-format
 msgid "number of rows of matrices must match (see arg %d)"
 msgstr "número de linhas das matrizes devem ser iguais (veja arg %d)"
 
-#: src/main/bind.c:1430
+#: src/main/bind.c:1455
 #, c-format
 msgid "number of columns of matrices must match (see arg %d)"
 msgstr "números de colunas das matrizes devem ser iguais (veja arg %d)"
@@ -1317,217 +1337,254 @@ msgstr "números de colunas das matrizes devem ser iguais (veja arg %d)"
 msgid "vector size cannot be NA"
 msgstr "tamanho de vetor não pode ser NA"
 
-#: src/main/builtin.c:49 src/main/builtin.c:57 src/main/sort.c:1303
+#: src/main/builtin.c:49 src/main/builtin.c:57 src/main/sort.c:1323
 msgid "vector size cannot be NA/NaN"
 msgstr "tamanho de vetor não pode ser NA/NaN"
 
-#: src/main/builtin.c:50 src/main/builtin.c:58 src/main/sort.c:1304
+#: src/main/builtin.c:50 src/main/builtin.c:58 src/main/sort.c:1324
 msgid "vector size cannot be infinite"
 msgstr "tamanho de vetor não pode ser infinito"
 
-#: src/main/builtin.c:51 src/main/builtin.c:59 src/main/builtin.c:916
-#: src/main/sort.c:1305
+#: src/main/builtin.c:51 src/main/builtin.c:59 src/main/builtin.c:950
+#: src/main/sort.c:1325
 msgid "vector size specified is too large"
 msgstr "tamanho de vetor especificado é muito grande"
 
-#: src/main/builtin.c:84 src/main/builtin.c:93 src/main/builtin.c:293
-#: src/main/builtin.c:326 src/main/builtin.c:365 src/main/builtin.c:375
-#: src/main/coerce.c:1537 src/main/connections.c:3066 src/main/engine.c:2967
-#: src/main/envir.c:993 src/main/envir.c:1046 src/main/envir.c:1136
-#: src/main/envir.c:1615 src/main/envir.c:1739 src/main/envir.c:1807
-#: src/main/envir.c:1925 src/main/envir.c:2582 src/main/envir.c:2642
-#: src/main/envir.c:2922 src/main/envir.c:2951 src/main/envir.c:2972
-#: src/main/envir.c:2995 src/main/envir.c:3030 src/main/envir.c:3051
-#: src/main/envir.c:3357 src/main/envir.c:3362 src/main/eval.c:5318
-#: src/main/objects.c:197 src/main/objects.c:203 src/main/saveload.c:2070
-#: src/main/saveload.c:2364 src/main/serialize.c:2709
+#: src/main/builtin.c:84 src/main/builtin.c:93 src/main/builtin.c:304
+#: src/main/builtin.c:337 src/main/builtin.c:394 src/main/builtin.c:408
+#: src/main/coerce.c:1536 src/main/connections.c:3062 src/main/engine.c:2987
+#: src/main/envir.c:1001 src/main/envir.c:1054 src/main/envir.c:1210
+#: src/main/envir.c:1749 src/main/envir.c:1873 src/main/envir.c:1939
+#: src/main/envir.c:2072 src/main/envir.c:2791 src/main/envir.c:2877
+#: src/main/envir.c:3182 src/main/envir.c:3211 src/main/envir.c:3232
+#: src/main/envir.c:3255 src/main/envir.c:3290 src/main/envir.c:3311
+#: src/main/envir.c:3632 src/main/envir.c:3637 src/main/eval.c:6251
+#: src/main/objects.c:191 src/main/objects.c:199 src/main/saveload.c:2072
+#: src/main/saveload.c:2364 src/main/serialize.c:2755
 msgid "use of NULL environment is defunct"
 msgstr "uso do ambiente NULL não é mais permitido"
 
-#: src/main/builtin.c:306
+#: src/main/builtin.c:250 src/main/builtin.c:263
+#, fuzzy
+msgid "argument is not a function"
+msgstr "argumento não deve ser uma função"
+
+#: src/main/builtin.c:317
 msgid "replacement object is not an environment"
 msgstr "objeto substituto não é um ambiente"
 
-#: src/main/builtin.c:331
+#: src/main/builtin.c:342
 msgid "'enclos' must be an environment"
 msgstr "'enclos' deve ser um ambiente"
 
-#: src/main/builtin.c:352 src/main/builtin.c:370
+#: src/main/builtin.c:363 src/main/builtin.c:399
 msgid "argument is not an environment"
 msgstr "argumento não é um ambiente"
 
-#: src/main/builtin.c:354
+#: src/main/builtin.c:365
 msgid "the empty environment has no parent"
 msgstr "o ambiente vazio não tem pai"
 
-#: src/main/builtin.c:372
+#: src/main/builtin.c:401
 msgid "can not set parent of the empty environment"
 msgstr "não é possível ajustar o pai do ambiente vazio"
 
-#: src/main/builtin.c:380
+#: src/main/builtin.c:403
+#, fuzzy
+msgid "can not set the parent environment of a namespace"
+msgstr "não é possível ajustar o pai do ambiente vazio"
+
+#: src/main/builtin.c:405
+#, fuzzy
+msgid "can not set the parent environment of package imports"
+msgstr "não é possível ajustar o pai do ambiente vazio"
+
+#: src/main/builtin.c:413
 msgid "'parent' is not an environment"
 msgstr "'parent' não é um ambiente"
 
-#: src/main/builtin.c:521 src/main/connections.c:3691
-#: src/main/connections.c:4068 src/main/connections.c:4102
-#: src/main/connections.c:4480 src/main/connections.c:4550
-#: src/main/connections.c:4759 src/main/connections.c:4763
-#: src/main/connections.c:5124 src/main/deparse.c:360 src/main/deparse.c:446
-#: src/main/serialize.c:2006
+#: src/main/builtin.c:556 src/main/connections.c:3687
+#: src/main/connections.c:4079 src/main/connections.c:4113
+#: src/main/connections.c:4491 src/main/connections.c:4561
+#: src/main/connections.c:4772 src/main/connections.c:4776
+#: src/main/connections.c:5199 src/main/deparse.c:369 src/main/deparse.c:458
+#: src/main/serialize.c:2045
 msgid "cannot write to this connection"
 msgstr "não é possível escrever nessa conexão"
 
-#: src/main/builtin.c:526 src/main/builtin.c:556
+#: src/main/builtin.c:561 src/main/builtin.c:591
 #, c-format
 msgid "invalid '%s' specification"
 msgstr "especificação '%s' inválida"
 
-#: src/main/builtin.c:543
+#: src/main/builtin.c:578
 msgid "non-positive 'fill' argument will be ignored"
 msgstr "argumento 'fill' não positivo será ignorado"
 
-#: src/main/builtin.c:618
+#: src/main/builtin.c:653
 #, c-format
 msgid "argument %d (type '%s') cannot be handled by 'cat'"
 msgstr "argumento %d (tipo '%s') não suportado por 'cat'"
 
-#: src/main/builtin.c:763
+#: src/main/builtin.c:797
 #, c-format
 msgid "vector: cannot make a vector of mode '%s'."
 msgstr "vector: não é possível criar um vetor de modo '%s'."
 
-#: src/main/builtin.c:789
+#: src/main/builtin.c:823
 msgid "cannot set length of non-vector"
 msgstr ""
 "não é possível especificar o comprimento de um objeto que não seja vetor"
 
-#: src/main/builtin.c:897 src/main/builtin.c:907 src/main/options.c:637
+#: src/main/builtin.c:931 src/main/builtin.c:941 src/main/options.c:659
 msgid "invalid argument"
 msgstr "argumento inválido"
 
-#: src/main/builtin.c:899 src/main/builtin.c:909 src/main/builtin.c:911
-#: src/main/character.c:366 src/main/coerce.c:2765
+#: src/main/builtin.c:933 src/main/builtin.c:943 src/main/builtin.c:945
+#: src/main/character.c:525 src/main/coerce.c:2832
 msgid "invalid value"
 msgstr "valor inválido"
 
-#: src/main/builtin.c:942 src/main/coerce.c:2478 src/main/coerce.c:2519
-#: src/main/eval.c:563 src/main/eval.c:683 src/main/eval.c:2099
-#: src/main/eval.c:2176 src/main/eval.c:2236 src/main/eval.c:2569
-#: src/main/eval.c:4694 src/main/eval.c:4814
+#: src/main/builtin.c:976 src/main/coerce.c:2541 src/main/coerce.c:2584
+#: src/main/eval.c:620 src/main/eval.c:740 src/main/eval.c:2266
+#: src/main/eval.c:2346 src/main/eval.c:2407 src/main/eval.c:2745
+#: src/main/eval.c:5584 src/main/eval.c:5701
 msgid "'...' used in an incorrect context"
 msgstr "'...' usado em um contexto incorreto"
 
-#: src/main/builtin.c:963
+#: src/main/builtin.c:998
 #, fuzzy, c-format
 msgid "duplicate 'switch' defaults: '%s' and '%s'"
 msgstr "padrões de alternação duplicados: '%s' e '%s'"
 
-#: src/main/builtin.c:996
+#: src/main/builtin.c:1031
 msgid "'EXPR' is missing"
 msgstr "'EXPR' faltante"
 
-#: src/main/builtin.c:1000 src/main/eval.c:5155
+#: src/main/builtin.c:1035 src/main/eval.c:6056
 msgid "EXPR must be a length 1 vector"
 msgstr "EXPR deve ser um vetor de comprimento 1"
 
-#: src/main/builtin.c:1003
+#: src/main/builtin.c:1038 src/main/eval.c:6059
 #, c-format
 msgid ""
 "EXPR is a \"factor\", treated as integer.\n"
 " Consider using '%s' instead."
 msgstr ""
 
-#: src/main/character.c:105 src/main/character.c:108 src/main/character.c:132
-#: src/main/character.c:135
+#: src/main/builtin.c:1095 src/main/eval.c:6069 src/main/eval.c:6098
+#, fuzzy
+msgid "'switch' with no alternatives"
+msgstr ""
+"expressão numérica (EXPR) requerida para switch() sem alternativas nomeadas"
+
+#: src/main/character.c:103 src/main/character.c:224
+#, fuzzy, c-format
+msgid "%d argument passed to '%s' which requires %d to %d"
+msgid_plural "%d arguments passed to '%s' which requires %d to %d"
+msgstr[0] "%d argumentos passados para '%s', que requer %d"
+msgstr[1] "%d argumentos passados para '%s', que requer %d"
+
+#: src/main/character.c:110 src/main/character.c:113 src/main/character.c:232
+#: src/main/character.c:235
 #, c-format
 msgid "'%s' requires a character vector"
 msgstr "'%s' requer um vetor de caracteres"
 
-#: src/main/character.c:164
-#, c-format
-msgid ""
-"number of characters is not computable for element %d in \"bytes\" encoding"
+#: src/main/character.c:150 src/main/character.c:165 src/main/character.c:175
+#: src/main/character.c:203
+#, fuzzy, c-format
+msgid "invalid multibyte string, %s"
+msgstr "string multibyte inválida %d"
+
+#: src/main/character.c:159
+#, fuzzy, c-format
+msgid "number of characters is not computable in \"bytes\" encoding, %s"
 msgstr ""
 "número de caracteres não é computável para elemento %d em codificação \"bytes"
 "\""
 
-#: src/main/character.c:169 src/main/character.c:197 src/main/character.c:653
-#: src/main/character.c:750
-#, c-format
-msgid "invalid multibyte string %d"
-msgstr "string multibyte inválida %d"
-
-#: src/main/character.c:185
-#, c-format
-msgid "width is not computable for element %d in \"bytes\" encoding"
+#: src/main/character.c:188
+#, fuzzy, c-format
+msgid "width is not computable for %s in \"bytes\" encoding"
 msgstr "width não é computável para elemento %d em codificação \"bytes\""
 
-#: src/main/character.c:263
+#: src/main/character.c:311
 msgid "extracting substrings from a non-character object"
 msgstr ""
 "tentativa de extrair substrings de um objeto de modo diferente de caractere"
 
-#: src/main/character.c:268 src/main/character.c:363
+#: src/main/character.c:321 src/main/character.c:522
 #, fuzzy
 msgid "invalid substring arguments"
 msgstr "argumento de substring inválido"
 
-#: src/main/character.c:358
+#: src/main/character.c:361
+#, fuzzy
+msgid "non-character object(s)"
+msgstr "nomes de modo não caractere"
+
+#: src/main/character.c:517
 msgid "replacing substrings in a non-character object"
 msgstr "substituição de substrings em um objeto de modo diferente de caractere"
 
-#: src/main/character.c:551
+#: src/main/character.c:785
 msgid "the first argument must be a character vector"
 msgstr "primeiro argumento deve ser um vetor de caracteres"
 
-#: src/main/character.c:570
+#: src/main/character.c:822
 msgid "abbreviate used with non-ASCII chars"
 msgstr "abbreaviate usado com caracteres não-ASCII"
 
-#: src/main/character.c:591
+#: src/main/character.c:843
 msgid "non-character names"
 msgstr "nomes de modo não caractere"
 
-#: src/main/character.c:696 src/main/grep.c:159
+#: src/main/character.c:905 src/main/character.c:1002
+#, c-format
+msgid "invalid multibyte string %d"
+msgstr "string multibyte inválida %d"
+
+#: src/main/character.c:948 src/main/grep.c:163
 msgid "non-character argument"
 msgstr "argumento modo não caractere"
 
-#: src/main/character.c:805
+#: src/main/character.c:1057
 #, c-format
 msgid "decreasing range specification ('%lc-%lc')"
 msgstr "especificação de intervalo decrescente ('%lc-%lc')"
 
-#: src/main/character.c:891
+#: src/main/character.c:1143
 #, c-format
 msgid "decreasing range specification ('%c-%c')"
 msgstr "especificação de intervalo decrescente ('%c-%c')"
 
-#: src/main/character.c:1079
+#: src/main/character.c:1331
 msgid "invalid UTF-8 string 'old'"
 msgstr "string UTF-8 'old' inválida "
 
-#: src/main/character.c:1085
+#: src/main/character.c:1337
 msgid "invalid multibyte string 'old'"
 msgstr "string multibyte inválida 'old'"
 
-#: src/main/character.c:1098
+#: src/main/character.c:1350
 msgid "invalid UTF-8 string 'new'"
 msgstr "string UTF-8 'new' inválida"
 
-#: src/main/character.c:1104
+#: src/main/character.c:1356
 msgid "invalid multibyte string 'new'"
 msgstr "string multibyte inválida 'new'"
 
-#: src/main/character.c:1132 src/main/character.c:1221
+#: src/main/character.c:1384 src/main/character.c:1473
 msgid "'old' is longer than 'new'"
 msgstr "'old' é maior que 'new'"
 
-#: src/main/character.c:1164
+#: src/main/character.c:1416
 #, c-format
 msgid "invalid input multibyte string %d"
 msgstr "string de entrada multibyte %d inválida"
 
-#: src/main/character.c:1271
+#: src/main/character.c:1523
 msgid "strtrim() requires a character vector"
 msgstr "strtrim() requer um vetor de caracteres"
 
@@ -1539,15 +1596,16 @@ msgstr "argumento 'mode' inválido"
 msgid "applies only to lists and vectors"
 msgstr "se aplica somente a listas e vetores"
 
-#: src/main/coerce.c:77 src/main/errors.c:1208
+#: src/main/coerce.c:77 src/main/errors.c:1194
 msgid "NAs introduced by coercion"
 msgstr "NAs introduzidos por coerção"
 
-#: src/main/coerce.c:79 src/main/errors.c:1209
-msgid "inaccurate integer conversion in coercion"
-msgstr "conversão inteira inacurada na coerção"
+#: src/main/coerce.c:79
+#, fuzzy
+msgid "NAs introduced by coercion to integer range"
+msgstr "NAs introduzidos por coerção"
 
-#: src/main/coerce.c:81 src/main/errors.c:1210
+#: src/main/coerce.c:81 src/main/errors.c:1196
 msgid "imaginary parts discarded in coercion"
 msgstr "partes imaginárias descartadas na coerção"
 
@@ -1555,59 +1613,63 @@ msgstr "partes imaginárias descartadas na coerção"
 msgid "out-of-range values treated as 0 in coercion to raw"
 msgstr "valores fora do limite considerados como 0 na coerção para tipo raw"
 
-#: src/main/coerce.c:414
+#: src/main/coerce.c:399
 #, c-format
 msgid "invalid data of mode '%s' (too short)"
 msgstr "dado inválido de modo '%s' (muito curto)"
 
-#: src/main/coerce.c:1016
+#: src/main/coerce.c:1002
 #, c-format
 msgid "'pairlist' object cannot be coerced to type '%s'"
 msgstr "objeto do tipo 'pairlist' não é coercível para tipo '%s'"
 
-#: src/main/coerce.c:1134
+#: src/main/coerce.c:1120
 #, c-format
 msgid "(list) object cannot be coerced to type '%s'"
 msgstr "objeto (list) não é coercível para tipo '%s'"
 
-#: src/main/coerce.c:1157
+#: src/main/coerce.c:1143
 #, c-format
 msgid "(symbol) object cannot be coerced to type '%s'"
 msgstr "objeto (symbol) não é coercível para tipo '%s'"
 
-#: src/main/coerce.c:1173 src/main/coerce.c:1485
+#: src/main/coerce.c:1159 src/main/coerce.c:1484
 msgid "no method for coercing this S4 class to a vector"
 msgstr "nenhum método para coerção desta classe S4 para vetor"
 
-#: src/main/coerce.c:1232
+#: src/main/coerce.c:1222
 msgid "environments cannot be coerced to other types"
 msgstr "ambientes não são coercíveis para outros tipos"
 
-#: src/main/coerce.c:1379
+#: src/main/coerce.c:1374
 msgid "attempting to coerce non-factor"
 msgstr "tentativa de fazer coerção de objeto não-fator"
 
-#: src/main/coerce.c:1533
+#: src/main/coerce.c:1379 src/main/coerce.c:1389
+msgid "malformed factor"
+msgstr ""
+
+#: src/main/coerce.c:1532
 msgid "list argument expected"
 msgstr "lista esperada como argumento"
 
-#: src/main/coerce.c:1541 src/main/eval.c:5322
+#: src/main/coerce.c:1540 src/main/eval.c:6255
 msgid "invalid environment"
 msgstr "ambiente inválido"
 
-#: src/main/coerce.c:1545
+#: src/main/coerce.c:1544
 msgid "argument must have length at least 1"
 msgstr "argumento deve ter comprimento de pelo menos 1"
 
-#: src/main/coerce.c:1567
+#: src/main/coerce.c:1566
 msgid "invalid body for function"
 msgstr "corpo inválido para função"
 
-#: src/main/coerce.c:1590
+#: src/main/coerce.c:1589
 msgid "invalid length 0 argument"
 msgstr "argumento de comprimento 0 inválido"
 
-#: src/main/coerce.c:1605
+#: src/main/coerce.c:1604
 msgid "invalid argument list"
 msgstr "argumento lista inválido"
 
@@ -1619,50 +1681,47 @@ msgstr "tipo \"single\" não implementado em R"
 msgid "unimplemented predicate"
 msgstr "predicativo não implementado"
 
-#: src/main/coerce.c:2069
+#: src/main/coerce.c:2070
 #, c-format
 msgid "%s() applied to non-(list or vector) of type '%s'"
 msgstr "%s() aplicado a um objeto diferente de lista ou vetor de tipo '%s'"
 
-#: src/main/coerce.c:2212 src/main/coerce.c:2275 src/main/coerce.c:2343
+#: src/main/coerce.c:2267 src/main/coerce.c:2331 src/main/coerce.c:2403
 #, fuzzy, c-format
 msgid "default method not implemented for type '%s'"
 msgstr "tipo não implementado '%s' em '%s'\n"
 
-#: src/main/coerce.c:2361
+#: src/main/coerce.c:2425
 msgid "'name' is missing"
 msgstr "'name' ausente"
 
-#: src/main/coerce.c:2368
+#: src/main/coerce.c:2432
 msgid "first argument must be a character string"
 msgstr "primeiro argumento deve ser uma string de caracteres"
 
-#: src/main/coerce.c:2401
-msgid "'what' must be a character string or a function"
-msgstr "'what' deve ser uma cadeia de caracteres ou uma função"
+#: src/main/coerce.c:2464
+#, fuzzy
+msgid "'what' must be a function or character string"
+msgstr "'title' deve ser uma cadeia de caracteres"
 
-#: src/main/coerce.c:2405
+#: src/main/coerce.c:2468
 #, fuzzy
 msgid "'args' must be a list or expression"
 msgstr "'args' deve ser uma lista"
 
-#: src/main/coerce.c:2408
-msgid "'args' must be a list"
-msgstr "'args' deve ser uma lista"
-
-#: src/main/coerce.c:2412
+#: src/main/coerce.c:2475 src/main/unique.c:1345
 msgid "'envir' must be an environment"
 msgstr "'envir' deve ser um ambiente"
 
-#: src/main/coerce.c:2567
+#: src/main/coerce.c:2634
 msgid "invalid environment specified"
 msgstr "ambiente inválido especificado"
 
-#: src/main/coerce.c:2633
+#: src/main/coerce.c:2700
 msgid "Setting class(x) to NULL;   result will no longer be an S4 object"
 msgstr "Definindo class(x) para NULL;   resultado não será mais um objeto S4"
 
-#: src/main/coerce.c:2636
+#: src/main/coerce.c:2703
 #, c-format
 msgid ""
 "Setting class(x) to multiple strings (\"%s\", \"%s\", ...); result will no "
@@ -1671,7 +1730,7 @@ msgstr ""
 "Definindo class(x) para múltiplas strings (\"%s\", \"%s\", ...); resultado "
 "não será mais um objeto S4"
 
-#: src/main/coerce.c:2640
+#: src/main/coerce.c:2707
 #, c-format
 msgid ""
 "Setting class(x) to \"%s\" sets attribute to NULL; result will no longer be "
@@ -1680,11 +1739,11 @@ msgstr ""
 "Definindo class(x) para \"%s\" define o atributo como NULL; resultado não "
 "será mais um objeto S4"
 
-#: src/main/coerce.c:2673
+#: src/main/coerce.c:2740
 msgid "invalid replacement object to be a class string"
 msgstr "objeto substituto inválido para ser da classe string"
 
-#: src/main/coerce.c:2694
+#: src/main/coerce.c:2761
 #, c-format
 msgid ""
 "\"%s\" can only be set as the class if the object has this type; found \"%s\""
@@ -1692,7 +1751,7 @@ msgstr ""
 "\"%s\" só pode ser especificada como classe se o objeto tiver esse tipo;"
 "encontrado \"%s\""
 
-#: src/main/coerce.c:2712
+#: src/main/coerce.c:2779
 #, c-format
 msgid ""
 "invalid to set the class to matrix unless the dimension attribute is of "
@@ -1701,252 +1760,251 @@ msgstr ""
 "inválido especificar a classe como matriz a não ser que o atributo de "
 "dimensão tenha comprimento 2 (%d encontrado)"
 
-#: src/main/coerce.c:2720
+#: src/main/coerce.c:2787
 msgid ""
 "cannot set class to \"array\" unless the dimension attribute has length > 0"
 msgstr ""
 "impossível especificar a classe como \"array\" a não ser que o atributo de "
 "dimensão tenha comprimento > 0"
 
-#: src/main/coerce.c:2756
+#: src/main/coerce.c:2823
 msgid "'value' must be non-null character string"
 msgstr "'value' deve ser um caractere não nulo"
 
-#: src/main/coerce.c:2769
+#: src/main/coerce.c:2836
 msgid "invalid to change the storage mode of a factor"
 msgstr "inválido mudar o modo de armazenamento de um fator"
 
-#: src/main/complex.c:126
+#: src/main/complex.c:123
 msgid "invalid complex unary operator"
 msgstr "operador complexo unário inválido"
 
-#: src/main/complex.c:261
+#: src/main/complex.c:251
 msgid "unimplemented complex operation"
 msgstr "operação complexa não implementada"
 
-#: src/main/complex.c:363
+#: src/main/complex.c:353
 msgid "non-numeric argument to function"
 msgstr "argumento não numérico para função"
 
-#: src/main/complex.c:827
+#: src/main/complex.c:822
 msgid "invalid polynomial coefficient"
 msgstr "coeficiente polinomial inválido"
 
-#: src/main/complex.c:832
+#: src/main/complex.c:827
 msgid "root finding code failed"
 msgstr "código para encontrar a raiz falhou"
 
-#: src/main/connections.c:153
+#: src/main/connections.c:150
 msgid "all connections are in use"
 msgstr "todas as conexões estão em uso"
 
-#: src/main/connections.c:164
+#: src/main/connections.c:161
 msgid "connection not found"
 msgstr "conexão não encontrada"
 
-#: src/main/connections.c:175
+#: src/main/connections.c:172 src/main/connections.c:5213
 msgid "invalid connection"
 msgstr "conexão inválida"
 
-#: src/main/connections.c:207
+#: src/main/connections.c:204
 #, c-format
 msgid "closing unused connection %d (%s)\n"
 msgstr "encerrando conexão não utilizada %d (%s)\n"
 
-#: src/main/connections.c:232 src/main/sysutils.c:619 src/main/sysutils.c:806
-#: src/main/sysutils.c:821 src/main/sysutils.c:912 src/main/sysutils.c:927
-#: src/main/sysutils.c:1023 src/main/sysutils.c:1096 src/main/sysutils.c:1106
-#: src/main/sysutils.c:1119 src/main/sysutils.c:1516
+#: src/main/connections.c:229 src/main/sysutils.c:631 src/main/sysutils.c:834
+#: src/main/sysutils.c:849 src/main/sysutils.c:978 src/main/sysutils.c:1051
+#: src/main/sysutils.c:1061 src/main/sysutils.c:1074 src/main/sysutils.c:1472
 #, c-format
 msgid "unsupported conversion from '%s' to '%s'"
 msgstr "conversão não suportada de '%s' para '%s'"
 
-#: src/main/connections.c:288 src/main/connections.c:304
-#: src/main/connections.c:456 src/main/connections.c:462
-#: src/main/connections.c:468 src/main/connections.c:479
-#: src/main/connections.c:486
+#: src/main/connections.c:285 src/main/connections.c:300
+#: src/main/connections.c:451 src/main/connections.c:456
+#: src/main/connections.c:461 src/main/connections.c:472
+#: src/main/connections.c:478
 #, c-format
 msgid "%s not enabled for this connection"
 msgstr "'%s' não habilitado para essa conexão"
 
-#: src/main/connections.c:335 src/main/connections.c:352
-#: src/main/connections.c:2916
+#: src/main/connections.c:330 src/main/connections.c:347
+#: src/main/connections.c:2910
 msgid "printing of extremely long output is truncated"
 msgstr "impressão de saída extremamente longa truncada"
 
-#: src/main/connections.c:375
+#: src/main/connections.c:370
 msgid "invalid char string in output conversion"
 msgstr "string de caracteres inválidas na conversão de saída"
 
-#: src/main/connections.c:439
+#: src/main/connections.c:434
 #, c-format
 msgid "invalid input found on input connection '%s'"
 msgstr "entrada inválida na conexão de entrada '%s'"
 
-#: src/main/connections.c:580
+#: src/main/connections.c:571
 #, fuzzy, c-format
 msgid "cannot open file '%ls': %s"
 msgstr "não foi possível abrir o arquivo '%s': %s"
 
-#: src/main/connections.c:691
+#: src/main/connections.c:683
 msgid "connection is not open for reading"
 msgstr "conexão não está aberta para leitura"
 
-#: src/main/connections.c:696
+#: src/main/connections.c:688
 msgid "connection is not open for writing"
 msgstr "conexão não está aberta para escrita"
 
-#: src/main/connections.c:734 src/main/connections.c:2229
+#: src/main/connections.c:726 src/main/connections.c:2223
 msgid "can only truncate connections open for writing"
 msgstr "só é possível truncar conexões abertas para escrita"
 
-#: src/main/connections.c:738 src/main/connections.c:740
+#: src/main/connections.c:730 src/main/connections.c:732
 msgid "file truncation failed"
 msgstr "truncamento de arquivo falhou"
 
-#: src/main/connections.c:742
+#: src/main/connections.c:734
 msgid "file truncation unavailable on this platform"
 msgstr "truncamento de arquivo não está disponível nessa plataforma"
 
-#: src/main/connections.c:788 src/main/connections.c:792
-#: src/main/connections.c:798 src/main/connections.c:815
+#: src/main/connections.c:780 src/main/connections.c:784
+#: src/main/connections.c:790 src/main/connections.c:807
 msgid "allocation of file connection failed"
 msgstr "alocação de conexão de arquivo falhou"
 
-#: src/main/connections.c:866 src/main/connections.c:1044
+#: src/main/connections.c:858 src/main/connections.c:1035
 #, c-format
 msgid "cannot create fifo '%s', reason '%s'"
 msgstr "não foi possível criar fifo '%s', motivo '%s'"
 
-#: src/main/connections.c:872
+#: src/main/connections.c:864
 #, c-format
 msgid "'%s' exists but is not a fifo"
 msgstr "'%s' existe mas não é um fifo"
 
-#: src/main/connections.c:886
+#: src/main/connections.c:878
 #, c-format
 msgid "fifo '%s' is not ready"
 msgstr "fifo '%s' não está pronto"
 
-#: src/main/connections.c:887
+#: src/main/connections.c:879
 #, c-format
 msgid "cannot open fifo '%s'"
 msgstr "não foi possível abrir fifo '%s'"
 
-#: src/main/connections.c:928 src/main/connections.c:939
-#: src/main/connections.c:1104 src/main/connections.c:1123
-#: src/main/connections.c:1531 src/main/connections.c:1541
-#: src/main/connections.c:1660 src/main/connections.c:1720
-#: src/main/connections.c:2246 src/main/connections.c:2263
-#: src/main/connections.c:2572 src/main/connections.c:5305
-#: src/main/connections.c:5369
+#: src/main/connections.c:920 src/main/connections.c:931
+#: src/main/connections.c:1095 src/main/connections.c:1114
+#: src/main/connections.c:1524 src/main/connections.c:1534
+#: src/main/connections.c:1653 src/main/connections.c:1713
+#: src/main/connections.c:2240 src/main/connections.c:2257
+#: src/main/connections.c:2566 src/main/connections.c:5385
+#: src/main/connections.c:5449
 msgid "too large a block specified"
 msgstr "bloco especificado é muito grande"
 
-#: src/main/connections.c:998 src/main/connections.c:1004
+#: src/main/connections.c:989 src/main/connections.c:995
 #, fuzzy
 msgid "allocation of fifo name failed"
 msgstr "alocação de conexão fifo falhou"
 
-#: src/main/connections.c:1066
+#: src/main/connections.c:1057
 #, fuzzy, c-format
 msgid "cannot open fifo '%s', reason '%s'"
 msgstr "não foi possível abrir a URL '%s', motivo '%s'"
 
-#: src/main/connections.c:1107 src/main/connections.c:1131
+#: src/main/connections.c:1098 src/main/connections.c:1122
 #, fuzzy
 msgid "allocation of fifo buffer failed"
 msgstr "alocação de conexão fifo falhou"
 
-#: src/main/connections.c:1139
+#: src/main/connections.c:1130
 #, fuzzy, c-format
 msgid "cannot write FIFO '%s'"
 msgstr "não foi possível abrir a URL '%s'"
 
-#: src/main/connections.c:1175 src/main/connections.c:1179
-#: src/main/connections.c:1185 src/main/connections.c:1201
+#: src/main/connections.c:1166 src/main/connections.c:1170
+#: src/main/connections.c:1176 src/main/connections.c:1192
 msgid "allocation of fifo connection failed"
 msgstr "alocação de conexão fifo falhou"
 
-#: src/main/connections.c:1219 src/main/connections.c:1377
-#: src/main/connections.c:1998 src/main/connections.c:3212
-#: src/main/connections.c:4967
+#: src/main/connections.c:1210 src/main/connections.c:1369
+#: src/main/connections.c:1991 src/main/connections.c:3205
+#: src/main/connections.c:4982
 msgid "only first element of 'description' argument used"
 msgstr "somente o primeiro elemento de 'description' foi utilizado"
 
-#: src/main/connections.c:1236
+#: src/main/connections.c:1227
 msgid ""
 "fifo(\"\") only supports open = \"w+\" and open = \"w+b\": using the former"
 msgstr ""
 "file(\"\") permite somente open = \"w+\" e open = \"w+b\": usando a opção "
 "anterior"
 
-#: src/main/connections.c:1250 src/main/connections.c:1414
-#: src/main/connections.c:2064 src/main/connections.c:3179
-#: src/main/connections.c:3232 src/main/connections.c:3280
-#: src/main/connections.c:3567 src/main/connections.c:3683
-#: src/main/connections.c:3844 src/main/connections.c:4095
-#: src/main/connections.c:4423 src/main/connections.c:4543
-#: src/main/connections.c:4755 src/main/connections.c:5105 src/main/dcf.c:94
-#: src/main/deparse.c:352 src/main/deparse.c:438 src/main/saveload.c:2267
-#: src/main/saveload.c:2350 src/main/scan.c:933 src/main/serialize.c:2175
-#: src/main/serialize.c:2226 src/main/source.c:265
+#: src/main/connections.c:1242 src/main/connections.c:1407
+#: src/main/connections.c:2058 src/main/connections.c:3175
+#: src/main/connections.c:3226 src/main/connections.c:3274
+#: src/main/connections.c:3563 src/main/connections.c:3679
+#: src/main/connections.c:3841 src/main/connections.c:4106
+#: src/main/connections.c:4434 src/main/connections.c:4554
+#: src/main/connections.c:4768 src/main/connections.c:5180 src/main/dcf.c:93
+#: src/main/deparse.c:361 src/main/deparse.c:450 src/main/saveload.c:2269
+#: src/main/saveload.c:2350 src/main/scan.c:933 src/main/serialize.c:2216
+#: src/main/serialize.c:2267 src/main/source.c:270
 msgid "cannot open the connection"
 msgstr "não é possível abrir a conexão"
 
-#: src/main/connections.c:1265
+#: src/main/connections.c:1257
 msgid "fifo connections are not available on this system"
 msgstr "conexões fifo não estão disponíveis neste sistema"
 
-#: src/main/connections.c:1295
+#: src/main/connections.c:1287
 #, fuzzy, c-format
 msgid "cannot pipe() cmd '%ls': %s"
 msgstr "não foi possível abrir pipe() com o comando '%s': %s"
 
-#: src/main/connections.c:1302
+#: src/main/connections.c:1294
 #, c-format
 msgid "cannot open pipe() cmd '%s': %s"
 msgstr "não foi possível abrir pipe() com o comando '%s': %s"
 
-#: src/main/connections.c:1471 src/main/connections.c:1791
+#: src/main/connections.c:1464 src/main/connections.c:1784
 #, c-format
 msgid "cannot open compressed file '%s', probable reason '%s'"
 msgstr "não foi possível abrir o arquivo comprimido '%s', motivo provável '%s'"
 
-#: src/main/connections.c:1511
+#: src/main/connections.c:1504
 msgid "whence = \"end\" is not implemented for gzfile connections"
 msgstr "whence = \"end\" não está implementado para conexões gzfile"
 
-#: src/main/connections.c:1516
+#: src/main/connections.c:1509
 msgid "seek on a gzfile connection returned an internal error"
 msgstr "procura em uma conexão gzfile retornou um erro interno"
 
-#: src/main/connections.c:1550 src/main/connections.c:1554
-#: src/main/connections.c:1560 src/main/connections.c:1577
+#: src/main/connections.c:1543 src/main/connections.c:1547
+#: src/main/connections.c:1553 src/main/connections.c:1570
 msgid "allocation of gzfile connection failed"
 msgstr "alocação de conexão gzfile falhou"
 
-#: src/main/connections.c:1606
+#: src/main/connections.c:1599
 #, c-format
 msgid "cannot open bzip2-ed file '%s', probable reason '%s'"
 msgstr ""
 "não foi possível abrir o arquivo comprimido bzip2 '%s', motivo provável '%s'"
 
-#: src/main/connections.c:1615
+#: src/main/connections.c:1608
 #, c-format
 msgid "file '%s' appears not to be compressed by bzip2"
 msgstr "arquivo '%s' parece não ter sido comprimido por bzip2"
 
-#: src/main/connections.c:1624
+#: src/main/connections.c:1617
 #, c-format
 msgid "initializing bzip2 compression for file '%s' failed"
 msgstr "inicialização de compressão bzip2 para o arquivo '%s' falhou"
 
-#: src/main/connections.c:1678
+#: src/main/connections.c:1671
 msgid "allocation of overflow buffer for bzfile failed"
 msgstr "alocação de buffer de estouro para bzfile falhou"
 
-#: src/main/connections.c:1685
+#: src/main/connections.c:1678
 #, c-format
 msgid ""
 "file '%s' has trailing content that appears not to be compressed by bzip2"
@@ -1954,400 +2012,406 @@ msgstr ""
 "arquivo '%s' tem conteúdo no final que não parece ter sido comprimido pelo "
 "bzip2"
 
-#: src/main/connections.c:1731 src/main/connections.c:1735
-#: src/main/connections.c:1741 src/main/connections.c:1758
+#: src/main/connections.c:1724 src/main/connections.c:1728
+#: src/main/connections.c:1734 src/main/connections.c:1751
 msgid "allocation of bzfile connection failed"
 msgstr "alocação de conexão bzfile falhou"
 
-#: src/main/connections.c:1804 src/main/connections.c:5961
+#: src/main/connections.c:1797 src/main/connections.c:6046
 #, c-format
 msgid "cannot initialize lzma decoder, error %d"
 msgstr "não foi possível inicializar decodificador lzma, erro %d"
 
-#: src/main/connections.c:1820
+#: src/main/connections.c:1813
 #, c-format
 msgid "cannot initialize lzma encoder, error %d"
 msgstr "não foi possível inicializar codificador lzma, erro %d"
 
-#: src/main/connections.c:1948 src/main/connections.c:1952
-#: src/main/connections.c:1958 src/main/connections.c:1976
+#: src/main/connections.c:1941 src/main/connections.c:1945
+#: src/main/connections.c:1951 src/main/connections.c:1969
 msgid "allocation of xzfile connection failed"
 msgstr "alocação de conexão xzfile falhou"
 
-#: src/main/connections.c:2035
+#: src/main/connections.c:2028
 #, c-format
 msgid "this is a %s-compressed file which this build of R does not support"
 msgstr ""
 "este é um arquivo comprimido %s que não é compatível com esta versão do R"
 
-#: src/main/connections.c:2130 src/modules/X11/devX11.c:3375
+#: src/main/connections.c:2124 src/modules/X11/devX11.c:3381
 msgid "memory allocation to copy clipboard failed"
 msgstr "alocação de memória para cópia da área de transferência falhou"
 
-#: src/main/connections.c:2135 src/modules/X11/devX11.c:3354
-#: src/modules/X11/devX11.c:3359
+#: src/main/connections.c:2129 src/modules/X11/devX11.c:3360
+#: src/modules/X11/devX11.c:3365
 msgid "clipboard cannot be opened or contains no text"
 msgstr "área de transferência não pode ser aberta ou não contem texto"
 
-#: src/main/connections.c:2146
+#: src/main/connections.c:2140
 msgid "memory allocation to open clipboard failed"
 msgstr "alocação de memória para abrir área de transferência falhou"
 
-#: src/main/connections.c:2174
+#: src/main/connections.c:2168
 #, fuzzy
 msgid "unable to open the clipboard"
 msgstr "impossível abrir a área de transferência"
 
-#: src/main/connections.c:2178
+#: src/main/connections.c:2172
 #, fuzzy
 msgid "unable to write to the clipboard"
 msgstr "impossível escrever na área de transferência"
 
-#: src/main/connections.c:2218
+#: src/main/connections.c:2212
 msgid "attempt to seek outside the range of the clipboard"
 msgstr "tentativa de procurar fora dos limites da área de transferência"
 
-#: src/main/connections.c:2261
+#: src/main/connections.c:2255
 msgid "clipboard connection is open for reading only"
 msgstr "área de transferência está aberta para somente leitura"
 
-#: src/main/connections.c:2281
+#: src/main/connections.c:2275
 msgid "clipboard buffer is full and output lost"
 msgstr "buffer da área de transferência está cheio e a saída foi perdida"
 
-#: src/main/connections.c:2302
+#: src/main/connections.c:2296
 msgid "'mode' for the clipboard must be 'r' or 'w'"
 msgstr "'mode' para área de transferência deve ser 'r' ou 'w'"
 
-#: src/main/connections.c:2305
+#: src/main/connections.c:2299
 msgid "'mode' for the clipboard must be 'r' on Unix"
 msgstr "'mode' para a área de transferência deve ser 'r' em Unix"
 
-#: src/main/connections.c:2308 src/main/connections.c:2314
-#: src/main/connections.c:2320 src/main/connections.c:2337
+#: src/main/connections.c:2302 src/main/connections.c:2308
+#: src/main/connections.c:2314 src/main/connections.c:2331
 msgid "allocation of clipboard connection failed"
 msgstr "alocação de conexão para área de transferência falhou"
 
-#: src/main/connections.c:2406 src/main/connections.c:2410
-#: src/main/connections.c:2416
+#: src/main/connections.c:2400 src/main/connections.c:2404
+#: src/main/connections.c:2410
 msgid "allocation of terminal connection failed"
 msgstr "alocação de conexão terminal falhou"
 
-#: src/main/connections.c:2549
+#: src/main/connections.c:2543
 msgid "attempting to add too many elements to raw vector"
 msgstr "tentativa de adicionar elementos demais a um vetor raw"
 
-#: src/main/connections.c:2601
+#: src/main/connections.c:2595
 msgid "attempt to seek outside the range of the raw connection"
 msgstr "tentativa de procurar fora dos limites da conexão raw"
 
-#: src/main/connections.c:2612 src/main/connections.c:2616
-#: src/main/connections.c:2622 src/main/connections.c:2648
+#: src/main/connections.c:2606 src/main/connections.c:2610
+#: src/main/connections.c:2616 src/main/connections.c:2642
 msgid "allocation of raw connection failed"
 msgstr "alocação de conexão raw falhou"
 
-#: src/main/connections.c:2701
+#: src/main/connections.c:2695
 msgid "'con' is not a rawConnection"
 msgstr "'con' não é uma conexão raw"
 
-#: src/main/connections.c:2704
+#: src/main/connections.c:2698
 msgid "'con' is not an output rawConnection"
 msgstr "'con' não é uma conexão de saída raw"
 
-#: src/main/connections.c:2742
+#: src/main/connections.c:2736
 #, fuzzy
 msgid "too many characters for text connection"
 msgstr "não foi possível alocar memória para conexão texto"
 
-#: src/main/connections.c:2747
+#: src/main/connections.c:2741
 msgid "cannot allocate memory for text connection"
 msgstr "não foi possível alocar memória para conexão texto"
 
-#: src/main/connections.c:2796
+#: src/main/connections.c:2790
 msgid "seek is not relevant for text connection"
 msgstr "procura não é relevante para conexão texto"
 
-#: src/main/connections.c:2804 src/main/connections.c:2808
-#: src/main/connections.c:2814 src/main/connections.c:2827
-#: src/main/connections.c:3012 src/main/connections.c:3016
-#: src/main/connections.c:3022 src/main/connections.c:3035
-#: src/main/connections.c:3041
+#: src/main/connections.c:2798 src/main/connections.c:2802
+#: src/main/connections.c:2808 src/main/connections.c:2821
+#: src/main/connections.c:3008 src/main/connections.c:3012
+#: src/main/connections.c:3018 src/main/connections.c:3031
+#: src/main/connections.c:3037
 msgid "allocation of text connection failed"
 msgstr "alocação de conexão texto falhou"
 
-#: src/main/connections.c:2989
+#: src/main/connections.c:2983
 msgid "text connection: appending to a non-existent char vector"
 msgstr "conexão texto: acrescentando a um vetor de caracteres não existente"
 
-#: src/main/connections.c:3093
+#: src/main/connections.c:3089
 msgid "unsupported mode"
 msgstr "modo não suportado"
 
-#: src/main/connections.c:3115
+#: src/main/connections.c:3111
 msgid "'con' is not a textConnection"
 msgstr "'con' não é uma conexão texto"
 
-#: src/main/connections.c:3118
+#: src/main/connections.c:3114
 msgid "'con' is not an output textConnection"
 msgstr "'con' não é uma conexão de saída textConnection"
 
-#: src/main/connections.c:3192
-msgid "sockets are not available on this system"
-msgstr "soquetes não estão disponíveis nesse sistema"
-
-#: src/main/connections.c:3260 src/main/connections.c:3309
-#: src/main/connections.c:3320 src/main/connections.c:3367
-#: src/main/connections.c:3392 src/main/connections.c:3415
-#: src/main/connections.c:3427 src/main/connections.c:3543
-#: src/main/connections.c:3668 src/main/connections.c:5408
+#: src/main/connections.c:3254 src/main/connections.c:3303
+#: src/main/connections.c:3314 src/main/connections.c:3361
+#: src/main/connections.c:3388 src/main/connections.c:3411
+#: src/main/connections.c:3423 src/main/connections.c:3539
+#: src/main/connections.c:3664 src/main/connections.c:5489
 msgid "'con' is not a connection"
 msgstr "'con' não é uma conexão"
 
-#: src/main/connections.c:3263
+#: src/main/connections.c:3257
 msgid "cannot open standard connections"
 msgstr "não é possível abrir conexões padrão"
 
-#: src/main/connections.c:3265
+#: src/main/connections.c:3259
 msgid "connection is already open"
 msgstr "conexão já está aberta"
 
-#: src/main/connections.c:3298
+#: src/main/connections.c:3292
 msgid "unknown 'rw' value"
 msgstr "valor 'rw' desconhecido"
 
-#: src/main/connections.c:3369
+#: src/main/connections.c:3363
 msgid "cannot close standard connections"
 msgstr "não foi possível fechar conexões padrão"
 
-#: src/main/connections.c:3372
+#: src/main/connections.c:3366
 #, fuzzy
 msgid "cannot close 'output' sink connection"
 msgstr "não foi possível fechar conexão de saída sink"
 
-#: src/main/connections.c:3374
+#: src/main/connections.c:3368
 #, fuzzy
 msgid "cannot close 'message' sink connection"
 msgstr "não foi possível fechar mensagens de conexão sink"
 
-#: src/main/connections.c:3394 src/main/connections.c:5123
-#: src/main/connections.c:5131 src/main/serialize.c:1996
-#: src/main/serialize.c:2004
+#: src/main/connections.c:3390 src/main/connections.c:5198
+#: src/main/connections.c:5206 src/main/serialize.c:2035
+#: src/main/serialize.c:2043
 msgid "connection is not open"
 msgstr "conexão não está aberta"
 
-#: src/main/connections.c:3490 src/main/connections.c:3502
+#: src/main/connections.c:3486 src/main/connections.c:3498
 #, fuzzy
 msgid "line longer than buffer size"
 msgstr "Linha mais longa que o tamanho do buffer"
 
-#: src/main/connections.c:3574 src/main/connections.c:3576
-#: src/main/connections.c:3852 src/main/connections.c:4406
-#: src/main/connections.c:4431 src/main/connections.c:5132 src/main/dcf.c:101
-#: src/main/scan.c:936 src/main/scan.c:940 src/main/serialize.c:1998
-#: src/main/source.c:272
+#: src/main/connections.c:3570 src/main/connections.c:3572
+#: src/main/connections.c:3849 src/main/connections.c:4417
+#: src/main/connections.c:4442 src/main/connections.c:5207 src/main/dcf.c:100
+#: src/main/scan.c:936 src/main/scan.c:940 src/main/serialize.c:2037
+#: src/main/source.c:277
 msgid "cannot read from this connection"
 msgstr "não é possível ler a partir desta conexão"
 
-#: src/main/connections.c:3588 src/main/connections.c:3610
+#: src/main/connections.c:3584 src/main/connections.c:3606
 msgid "cannot allocate buffer in readLines"
 msgstr "não foi possível alocar buffer em readLines"
 
-#: src/main/connections.c:3623
+#: src/main/connections.c:3619
 #, c-format
 msgid "line %d appears to contain an embedded nul"
 msgstr ""
 
-#: src/main/connections.c:3640
+#: src/main/connections.c:3636
 #, c-format
 msgid "incomplete final line found on '%s'"
 msgstr "linha final incompleta encontrada em '%s'"
 
-#: src/main/connections.c:3646
+#: src/main/connections.c:3642
 msgid "too few lines read in readLines"
 msgstr "muito poucas linhas lidas em readLines"
 
-#: src/main/connections.c:3749
+#: src/main/connections.c:3746
 msgid "incomplete string at end of file has been discarded"
 msgstr "string incompleta no final do arquivo foi descartada"
 
-#: src/main/connections.c:3755
+#: src/main/connections.c:3752
 msgid "null terminator not found: breaking string at 10000 bytes"
 msgstr ""
 "terminador nulo não encontrado: quebrando a string depois de 10.000 bytes"
 
-#: src/main/connections.c:3820
+#: src/main/connections.c:3817
 msgid "can only read from a binary connection"
 msgstr "só é possível ler a partir de uma conexão binária"
 
-#: src/main/connections.c:3869 src/main/connections.c:4176
+#: src/main/connections.c:3866 src/main/connections.c:4187
 msgid "size changing is not supported for complex vectors"
 msgstr "mudança de tamanho não é suportada para vetores complexos"
 
-#: src/main/connections.c:3907 src/main/connections.c:3925
-#: src/main/connections.c:3951 src/main/connections.c:4010
-#: src/main/connections.c:4030 src/main/connections.c:4157
-#: src/main/connections.c:4170 src/main/connections.c:4229
-#: src/main/connections.c:4261
+#: src/main/connections.c:3905 src/main/connections.c:3923
+#: src/main/connections.c:3949 src/main/connections.c:3993
+#: src/main/connections.c:4024 src/main/connections.c:4044
+#: src/main/connections.c:4168 src/main/connections.c:4181
+#: src/main/connections.c:4240 src/main/connections.c:4272
 #, c-format
 msgid "size %d is unknown on this machine"
 msgstr "tamanho %d é desconhecido nessa máquina"
 
-#: src/main/connections.c:3936
+#: src/main/connections.c:3934
 msgid "raw is always of size 1"
 msgstr "raw é sempre de tamanho 1"
 
-#: src/main/connections.c:3959
+#: src/main/connections.c:3957
 msgid "'signed = FALSE' is only valid for integers of sizes 1 and 2"
 msgstr ""
 
-#: src/main/connections.c:4060
+#: src/main/connections.c:4071
 msgid "'x' is not an atomic vector type"
 msgstr "'x' não é um vetor do tipo atômico"
 
-#: src/main/connections.c:4066
+#: src/main/connections.c:4077
 msgid "can only write to a binary connection"
 msgstr "só é possível escrever em uma conexão binária"
 
-#: src/main/connections.c:4085
+#: src/main/connections.c:4096
 msgid "only 2^31-1 bytes can be written to a raw vector"
 msgstr "somente 2^31-1 bytes podem ser escritos em um vetor raw"
 
-#: src/main/connections.c:4087
+#: src/main/connections.c:4098
 #, fuzzy
 msgid "only 2^31-1 bytes can be written in a single writeBin() call"
 msgstr "somente 2^31-1 bytes podem ser escritos em uma única chamada readBin()"
 
-#: src/main/connections.c:4136 src/main/connections.c:4289
-#: src/main/connections.c:4570 src/main/connections.c:4610
+#: src/main/connections.c:4147 src/main/connections.c:4300
+#: src/main/connections.c:4581 src/main/connections.c:4621
 msgid "problem writing to connection"
 msgstr "problema escrevendo na conexão"
 
-#: src/main/connections.c:4181
+#: src/main/connections.c:4192
 msgid "size changing is not supported for raw vectors"
 msgstr "mudança de tamanho não é suportada para vetores de tipo raw"
 
-#: src/main/connections.c:4324 src/main/connections.c:4328
-#: src/main/connections.c:4367
+#: src/main/connections.c:4335 src/main/connections.c:4339
+#: src/main/connections.c:4378
 msgid "invalid UTF-8 input in readChar()"
 msgstr "entrada UTF-8 inválida em readChar()"
 
-#: src/main/connections.c:4434
+#: src/main/connections.c:4445
 msgid "can only read in bytes in a non-UTF-8 MBCS locale"
 msgstr "somente possível ler bytes em um locale não UTF-8 MBCS"
 
-#: src/main/connections.c:4506
+#: src/main/connections.c:4517
 msgid "'object' is too short"
 msgstr "'object' é muito curto"
 
-#: src/main/connections.c:4559
+#: src/main/connections.c:4570
 msgid "writeChar: more bytes requested than are in the string - will zero-pad"
 msgstr ""
 "writeChar: mais bytes requeridos do que presentes na string - será "
 "preenchida com zeros"
 
-#: src/main/connections.c:4584
+#: src/main/connections.c:4595
 msgid ""
 "writeChar: more characters requested than are in the string - will zero-pad"
 msgstr ""
 "writeChar: mais caracteres requeridos do que presentes na string - será "
 "preenchida com zeros"
 
-#: src/main/connections.c:4638
+#: src/main/connections.c:4649
 #, fuzzy
 msgid "maximum number of pushback lines exceeded"
 msgstr "número máximo de cores atingido"
 
-#: src/main/connections.c:4644 src/main/connections.c:4648
-#: src/main/connections.c:4685 src/main/connections.c:4693
+#: src/main/connections.c:4655 src/main/connections.c:4659
+#: src/main/connections.c:4696 src/main/connections.c:4704
 #, fuzzy
 msgid "could not allocate space for pushback"
 msgstr "não foi possível alocar espaço para pushBack"
 
-#: src/main/connections.c:4676
+#: src/main/connections.c:4687
 msgid "can only push back on open readable connections"
 msgstr "só é possível voltar atrás em conexões abertas para leitura"
 
-#: src/main/connections.c:4678
+#: src/main/connections.c:4689
 msgid "can only push back on text-mode connections"
 msgstr "só é possível voltar atrás em conexões de modo texto"
 
-#: src/main/connections.c:4740 src/main/connections.c:4810
+#: src/main/connections.c:4753 src/main/connections.c:4823
 msgid "sink stack is full"
 msgstr "pilha sink cheia"
 
-#: src/main/connections.c:4743
+#: src/main/connections.c:4756
 msgid "cannot switch output to stdin"
 msgstr "não é possível trocar saída para stdin"
 
-#: src/main/connections.c:4770
+#: src/main/connections.c:4783
 msgid "no sink to remove"
 msgstr "nenhum sink para remover"
 
-#: src/main/connections.c:4892
+#: src/main/connections.c:4903
 #, fuzzy
 msgid "there is no connection NA"
 msgstr "não há conexão %d"
 
-#: src/main/connections.c:4894
+#: src/main/connections.c:4905
 #, c-format
 msgid "there is no connection %d"
 msgstr "não há conexão %d"
 
-#: src/main/connections.c:5029
+#: src/main/connections.c:5039
+#, fuzzy
+msgid "method = \"wininet\" is only supported on Windows"
+msgstr "nsl() não é suportado nessa plataforma"
+
+#: src/main/connections.c:5103
 msgid ""
 "file(\"\") only supports open = \"w+\" and open = \"w+b\": using the former"
 msgstr ""
 "file(\"\") permite somente open = \"w+\" e open = \"w+b\": usando a segunda "
 "opção"
 
-#: src/main/connections.c:5083 src/modules/internet/internet.c:115
-#: src/modules/internet/internet.c:569
-msgid "unsupported URL scheme"
-msgstr "esquema de URL não suportado"
+#: src/main/connections.c:5157
+#, fuzzy
+msgid "URL scheme unsupported by this method"
+msgstr "ICU não é suportado nessa plataforma"
 
-#: src/main/connections.c:5173
+#: src/main/connections.c:5253
 msgid "file stream does not have gzip magic number"
 msgstr "fluxo de arquivo não contém o número mágico gzip"
 
-#: src/main/connections.c:5184
+#: src/main/connections.c:5264
 msgid "file stream does not have valid gzip header"
 msgstr "fluxo de arquivo não contem um cabeçalho gzip válido"
 
-#: src/main/connections.c:5249
+#: src/main/connections.c:5329
 msgid "writing error whilst flushing 'gzcon' connection"
 msgstr "erro na escrita enquanto esvaziando conexão 'gzcon'"
 
-#: src/main/connections.c:5351
+#: src/main/connections.c:5431
 #, c-format
 msgid "crc error %x %x\n"
 msgstr "erro crc %x %x\n"
 
-#: src/main/connections.c:5378
+#: src/main/connections.c:5458
 msgid "write error on 'gzcon' connection"
 msgstr "erro de escrita na conexão 'gzcon'"
 
-#: src/main/connections.c:5412
+#: src/main/connections.c:5493
 msgid "'level' must be one of 0 ... 9"
 msgstr "'level' deve estar em 0 ... 9"
 
-#: src/main/connections.c:5415
+#: src/main/connections.c:5496
 msgid "'allowNonCompression' must be TRUE or FALSE"
 msgstr "'allowNonCompression' deve ser TRUE ou FALSE"
 
-#: src/main/connections.c:5418
+#: src/main/connections.c:5499
+#, fuzzy
+msgid "'text' must be TRUE or FALSE"
+msgstr "'all.x' deve ser TRUE ou FALSE"
+
+#: src/main/connections.c:5502
 #, fuzzy
 msgid "this is already a 'gzcon' connection"
 msgstr "esta já é uma conexão gzcon"
 
-#: src/main/connections.c:5424
+#: src/main/connections.c:5508
 msgid "can only use read- or write- binary connections"
 msgstr "só é possível usar conexões binárias read- ou write-"
 
-#: src/main/connections.c:5427
+#: src/main/connections.c:5511
 msgid "using a text-mode 'file' connection may not work correctly"
 msgstr "uso de uma conexão 'file' em modo texto pode não funcionar"
 
-#: src/main/connections.c:5430
+#: src/main/connections.c:5514
 #, fuzzy
 msgid ""
 "cannot create a 'gzcon' connection from a writable textConnection; maybe use "
@@ -2356,76 +2420,72 @@ msgstr ""
 "não é possível criar uma conexão gzcon a partir de uma conexão de texto do "
 "tipo escrita; talvez use rawConnection"
 
-#: src/main/connections.c:5433 src/main/connections.c:5437
-#: src/main/connections.c:5444 src/main/connections.c:5458
+#: src/main/connections.c:5517 src/main/connections.c:5521
+#: src/main/connections.c:5528 src/main/connections.c:5542
 msgid "allocation of 'gzcon' connection failed"
 msgstr "alocação de conexão 'gzcon' falhou"
 
-#: src/main/connections.c:5644
+#: src/main/connections.c:5729
 msgid "not a list of sockets"
 msgstr "não é uma lista de soquetes"
 
-#: src/main/connections.c:5649
+#: src/main/connections.c:5734
 msgid "bad write indicators"
 msgstr "indicadores de escrita defeituosos"
 
-#: src/main/connections.c:5660
+#: src/main/connections.c:5745
 msgid "not a socket connection"
 msgstr "não é uma conexão soquete"
 
-#: src/main/connections.c:5905
+#: src/main/connections.c:5990
 msgid "unknown compression, assuming none"
 msgstr "compressão desconhecida, assumindo nenhuma"
 
-#: src/main/connections.c:6023 src/main/connections.c:6027
-#: src/main/connections.c:6033
+#: src/main/connections.c:6108 src/main/connections.c:6112
+#: src/main/connections.c:6118
 #, fuzzy, c-format
 msgid "allocation of %s connection failed"
 msgstr "alocação de conexão raw falhou"
 
-#: src/main/context.c:282
+#: src/main/context.c:316
 #, fuzzy
 msgid "no loop for break/next, jumping to top level"
 msgstr "nenhum loop de onde escapar, pulando para o nível superior"
 
-#: src/main/context.c:290
+#: src/main/context.c:324
 msgid "no function to return from, jumping to top level"
 msgstr "nenhuma função da qual retornar, pulando para o nível superior"
 
-#: src/main/context.c:302
+#: src/main/context.c:339
 msgid "target context is not on the stack"
 msgstr "contexto de destino não está na pilha"
 
-#: src/main/context.c:324 src/main/context.c:340 src/main/context.c:407
-#: src/main/context.c:428 src/main/context.c:440 src/main/context.c:452
+#: src/main/context.c:361 src/main/context.c:377 src/main/context.c:444
+#: src/main/context.c:465 src/main/context.c:477 src/main/context.c:489
 msgid "not that many frames on the stack"
 msgstr "não há tantas estruturas na pilha"
 
-#: src/main/context.c:357
+#: src/main/context.c:394
 msgid "only positive values of 'n' are allowed"
 msgstr "somente valores positivos são permitidos para 'n'"
 
-#: src/main/context.c:478
-msgid "no function to restart"
-msgstr "nenhuma função para reiniciar"
-
-#: src/main/context.c:515
+#: src/main/context.c:526
 msgid "number of contexts must be positive"
 msgstr "número de contextos deve ser positivo"
 
-#: src/main/context.c:528
+#: src/main/context.c:539
 msgid "no browser context to query"
 msgstr "nenhum contexto do navegador para consultar"
 
-#: src/main/context.c:546
+#: src/main/context.c:557
 msgid "not that many calls to browser are active"
 msgstr "não há tantas chamadas para o navegador ativas"
 
-#: src/main/context.c:560
+#: src/main/context.c:571
 msgid "not that many functions on the call stack"
 msgstr "não há tantas funções na pilha de chamada"
 
-#: src/main/context.c:645
+#: src/main/context.c:656
 msgid "internal error in 'do_sys'"
 msgstr "erro interno em 'do_sys'"
 
@@ -2435,40 +2495,40 @@ msgid "integer overflow in 'cumsum'; use 'cumsum(as.numeric(.))'"
 msgstr ""
 "Estouro da capacidade de inteiro em 'cumsum'; use cumsum(as.numeric(.))"
 
-#: src/main/cum.c:178
+#: src/main/cum.c:179
 #, fuzzy
-msgid "'cummin' not defined for complex numbers"
+msgid "'cummax' not defined for complex numbers"
 msgstr "min/max não definido para números complexos"
 
-#: src/main/cum.c:181
+#: src/main/cum.c:182
 #, fuzzy
-msgid "'cummax' not defined for complex numbers"
+msgid "'cummin' not defined for complex numbers"
 msgstr "min/max não definido para números complexos"
 
-#: src/main/cum.c:206 src/main/cum.c:230
+#: src/main/cum.c:209 src/main/cum.c:236
 msgid "unknown cumxxx function"
 msgstr "função cumxxx desconhecida"
 
-#: src/main/datetime.c:548 src/main/datetime.c:556 src/main/datetime.c:570
-#: src/main/datetime.c:575
+#: src/main/datetime.c:554 src/main/datetime.c:562 src/main/datetime.c:576
+#: src/main/datetime.c:581
 msgid "problem with setting timezone"
 msgstr "problema ao definir fuso horário"
 
-#: src/main/datetime.c:560
+#: src/main/datetime.c:566
 msgid "cannot set timezones on this system"
 msgstr "não é possível especificar fuso horários nesse sistema"
 
-#: src/main/datetime.c:582 src/main/datetime.c:584
+#: src/main/datetime.c:588 src/main/datetime.c:590
 msgid "problem with unsetting timezone"
 msgstr "problema ao remover fuso horário"
 
-#: src/main/datetime.c:804 src/main/datetime.c:806 src/main/datetime.c:901
-#: src/main/datetime.c:1240 src/main/datetime.c:1242
+#: src/main/datetime.c:810 src/main/datetime.c:812 src/main/datetime.c:908
+#: src/main/datetime.c:1258 src/main/datetime.c:1260
 #, fuzzy
 msgid "zero-length component in non-empty \"POSIXlt\" structure"
 msgstr "componente de comprimento zero em estrutura POSIXlt não vazia"
 
-#: src/main/dcf.c:113 src/main/dcf.c:181 src/main/dcf.c:253
+#: src/main/dcf.c:112 src/main/dcf.c:181 src/main/dcf.c:253
 msgid "could not allocate memory for 'read.dcf'"
 msgstr "não foi possível alocar memória para 'read.dcf'"
 
@@ -2483,81 +2543,87 @@ msgstr ""
 msgid "Line starting '%s ...' is malformed!"
 msgstr "Linha começando com '%s ...' está mal formada!"
 
-#: src/main/debug.c:45
-msgid "argument must be a closure"
-msgstr "argumento deve ser um objeto do tipo closure"
-
-#: src/main/debug.c:76
+#: src/main/debug.c:46 src/main/debug.c:76
 msgid "argument must be a function"
 msgstr "argumento deve ser uma função"
 
-#: src/main/debug.c:132 src/main/debug.c:166 src/main/debug.c:224
+#: src/main/debug.c:111
+#, fuzzy, c-format
+msgid "Value for '%s' must be TRUE or FALSE"
+msgstr "'all.x' deve ser TRUE ou FALSE"
+
+#: src/main/debug.c:139 src/main/debug.c:167 src/main/debug.c:241
 msgid "argument must not be a function"
 msgstr "argumento não deve ser uma função"
 
-#: src/main/debug.c:135
+#: src/main/debug.c:142
 msgid "cannot trace NULL"
 msgstr "não é possível rastrear NULL"
 
-#: src/main/debug.c:139
+#: src/main/debug.c:146
 msgid "'tracemem' is not useful for promise and environment objects"
 msgstr "'tracemem' não é útil para promessas e objetos de ambiente"
 
-#: src/main/debug.c:142
+#: src/main/debug.c:149
 msgid "'tracemem' is not useful for weak reference or external pointer objects"
 msgstr ""
 "'tracemem' não é útil para referências fracas ou objetos de ponteiro externos"
 
-#: src/main/debug.c:148 src/main/debug.c:171
+#: src/main/debug.c:180 src/main/debug.c:187
 msgid "R was not compiled with support for memory profiling"
 msgstr "R não foi compilado com suporte a perfilamento de memória"
 
-#: src/main/deparse.c:152 src/main/sprintf.c:213 src/main/sprintf.c:245
+#: src/main/deparse.c:156 src/main/sprintf.c:216 src/main/sprintf.c:248
 msgid "too few arguments"
 msgstr "muitos poucos argumentos"
 
-#: src/main/deparse.c:159
+#: src/main/deparse.c:163
 #, fuzzy
 msgid "invalid 'cutoff' value for 'deparse', using default"
 msgstr "'cutoff' inválido para deparse, usando o padrão"
 
-#: src/main/deparse.c:247
+#: src/main/deparse.c:254
 msgid "deparse of an S4 object will not be source()able"
 msgstr "análise de objeto S4 não pode ser carregado com source()"
 
-#: src/main/deparse.c:249
+#: src/main/deparse.c:256
 msgid "deparse may be incomplete"
 msgstr "deparse pode ser incompleto"
 
-#: src/main/deparse.c:251
+#: src/main/deparse.c:258
 msgid "deparse may be not be source()able in R < 2.7.0"
 msgstr "análise não pode ser carregada com source() no R < 2.7.0"
 
-#: src/main/deparse.c:369 src/main/deparse.c:461 src/main/deparse.c:467
+#: src/main/deparse.c:350 src/main/deparse.c:400 src/main/source.c:206
+#, fuzzy
+msgid "'file' must be a character string or connection"
+msgstr "'what' deve ser uma cadeia de caracteres ou uma função"
+
+#: src/main/deparse.c:378 src/main/deparse.c:473 src/main/deparse.c:479
 msgid "wrote too few characters"
 msgstr "muito poucos caracteres escritos"
 
-#: src/main/deparse.c:391
+#: src/main/deparse.c:402
 msgid "character arguments expected"
 msgstr "argumentos do tipo caractere esperados"
 
-#: src/main/deparse.c:394
+#: src/main/deparse.c:405
 #, fuzzy
 msgid "zero-length argument"
 msgstr "argumento de comprimento zero"
 
-#: src/main/deparse.c:401
+#: src/main/deparse.c:412
 msgid "'opts' should be small non-negative integer"
 msgstr "'opts' deve ser um inteiro pequeno não negativo"
 
-#: src/main/deparse.c:411 src/main/envir.c:1764 src/main/envir.c:1846
-#: src/main/eval.c:569 src/main/eval.c:1251 src/main/eval.c:3627
-#: src/main/saveload.c:1978 src/main/saveload.c:2309 src/main/serialize.c:2727
+#: src/main/deparse.c:422 src/main/envir.c:1898 src/main/envir.c:1983
+#: src/main/eval.c:626 src/main/eval.c:1423 src/main/eval.c:4246
+#: src/main/saveload.c:1980 src/main/saveload.c:2312 src/main/serialize.c:2773
 #, c-format
 msgid "object '%s' not found"
 msgstr "objeto '%s' não encontrado"
 
-#: src/main/deparse.c:1519
+#: src/main/deparse.c:1592
 msgid "badly formed function expression"
 msgstr "expressão funcional mal formada"
 
@@ -2566,37 +2632,37 @@ msgstr "expressão funcional mal formada"
 msgid "the base graphics system is not registered"
 msgstr "muitos sistemas gráficos registrados"
 
-#: src/main/devices.c:165 src/main/devices.c:172
+#: src/main/devices.c:166 src/main/devices.c:174
 msgid "no active or default device"
 msgstr "nenhum dispositivo ativo ou padrão"
 
-#: src/main/devices.c:385 src/main/devices.c:447
+#: src/main/devices.c:388 src/main/devices.c:450
 msgid "too many open devices"
 msgstr "muitos dispositivos abertos"
 
-#: src/main/devices.c:474
+#: src/main/devices.c:491
 msgid "not enough memory to allocate device (in GEcreateDevDesc)"
 msgstr "não há memória suficiente para alocar dispositivo (em GEcreateDevDesc)"
 
-#: src/main/devices.c:515
+#: src/main/devices.c:532
 msgid "Hit <Return> to see next plot: "
 msgstr "Aperte <Enter> para ver o próximo gráfico: "
 
-#: src/main/dotcode.c:112 src/main/dotcode.c:142
+#: src/main/dotcode.c:127 src/main/dotcode.c:157
 msgid "NULL value passed as symbol address"
 msgstr "valor NULL passado como um endereço simbólico"
 
-#: src/main/dotcode.c:133
+#: src/main/dotcode.c:148
 #, c-format
 msgid "Unimplemented type %d in createRSymbolObject"
 msgstr "Tipo não implementado %d em createRSymbolObject"
 
-#: src/main/dotcode.c:147 src/main/dotcode.c:237
+#: src/main/dotcode.c:162 src/main/dotcode.c:260
 #, c-format
 msgid "symbol '%s' is too long"
 msgstr "symbol '%s' é muito longo"
 
-#: src/main/dotcode.c:159
+#: src/main/dotcode.c:174
 #, fuzzy
 msgid ""
 "first argument must be a string (of length 1) or native symbol reference"
@@ -2604,215 +2670,198 @@ msgstr ""
 "'name' deve ser uma string (de comprimento 1) ou uma referência nativa "
 "simbólica"
 
-#: src/main/dotcode.c:201 src/main/dotcode.c:563
+#: src/main/dotcode.c:224 src/main/dotcode.c:1240
 msgid "too many arguments in foreign function call"
 msgstr "argumentos demais na chamada de função externa"
 
-#: src/main/dotcode.c:213
+#: src/main/dotcode.c:236
 msgid "PACKAGE = \"\" is invalid"
 msgstr ""
 
-#: src/main/dotcode.c:269 src/main/dotcode.c:274 src/main/dotcode.c:279
-#: src/main/dotcode.c:284
+#: src/main/dotcode.c:292 src/main/dotcode.c:297 src/main/dotcode.c:302
+#: src/main/dotcode.c:307
 #, fuzzy, c-format
 msgid "\"%s\" not available for %s() for package \"%s\""
 msgstr "%s não está disponível para este dispositivo"
 
-#: src/main/dotcode.c:289
+#: src/main/dotcode.c:312
 #, c-format
 msgid "%s symbol name \"%s\" not in DLL for package \"%s\""
 msgstr "nome de símbolo %s \"%s\" não está na DLL do pacote \"%s\""
 
-#: src/main/dotcode.c:294
+#: src/main/dotcode.c:317
 #, c-format
 msgid "%s symbol name \"%s\" not in load table"
 msgstr "nome de símbolo %s \"%s\" não está na tabela de carregamento"
 
-#: src/main/dotcode.c:348 src/main/dotcode.c:352 src/main/dotcode.c:362
-#: src/main/dotcode.c:427 src/main/dotcode.c:434
+#: src/main/dotcode.c:368 src/main/dotcode.c:370 src/main/dotcode.c:380
+#: src/main/dotcode.c:445 src/main/dotcode.c:452
 #, fuzzy, c-format
 msgid "'%s' used more than once"
 msgstr "DUP usado mais de uma vez"
 
-#: src/main/dotcode.c:358
+#: src/main/dotcode.c:376
 msgid "DLL name is too long"
 msgstr "nome da DLL é muito longo"
 
-#: src/main/dotcode.c:403
+#: src/main/dotcode.c:421
 msgid "PACKAGE argument must be a single character string"
 msgstr "argumento PACKAGE deve ser uma única string de caracteres"
 
-#: src/main/dotcode.c:409
+#: src/main/dotcode.c:427
 msgid "PACKAGE argument is too long"
 msgstr "argumento PACKAGE é longo demais"
 
-#: src/main/dotcode.c:474
+#: src/main/dotcode.c:492
 msgid "no arguments supplied"
 msgstr "nenhum argumento fornecido"
 
-#: src/main/dotcode.c:475 src/main/seq.c:913
+#: src/main/dotcode.c:493 src/main/seq.c:911
 msgid "too many arguments"
 msgstr "argumentos demais"
 
-#: src/main/dotcode.c:512 src/main/dotcode.c:554 src/main/dotcode.c:1397
+#: src/main/dotcode.c:530 src/main/dotcode.c:1232 src/main/dotcode.c:1420
 #, fuzzy
 msgid "'.NAME' is missing"
 msgstr "'EXPR' faltante"
 
-#: src/main/dotcode.c:521 src/main/dotcode.c:570 src/main/dotcode.c:1418
+#: src/main/dotcode.c:539 src/main/dotcode.c:1247 src/main/dotcode.c:1441
 #, c-format
 msgid "Incorrect number of arguments (%d), expecting %d for '%s'"
 msgstr "Número incorreto de argumentos (%d), esperando %d para '%s'"
 
-#: src/main/dotcode.c:1227 src/main/dotcode.c:2276
+#: src/main/dotcode.c:1216 src/main/dotcode.c:2290
 msgid "too many arguments, sorry"
 msgstr "argumentos de mais, desculpe"
 
-#: src/main/dotcode.c:1261 src/main/dotcode.c:1278 src/main/engine.c:2993
+#: src/main/dotcode.c:1284 src/main/dotcode.c:1301 src/main/engine.c:3013
 msgid "invalid graphics state"
 msgstr "estado gráfico inválido"
 
-#: src/main/dotcode.c:1357
+#: src/main/dotcode.c:1380
 msgid "NULL value for DLLInfoReference when looking for DLL"
 msgstr "valor NULL para DLLInfoReference quando procurando por DLL"
 
-#: src/main/dotcode.c:1458
+#: src/main/dotcode.c:1481
 #, fuzzy, c-format
 msgid "wrong type for argument %d in call to %s"
 msgstr "Tipo errado para o argumento %d na chamada de %s"
 
-#: src/main/dotcode.c:1470
-#, c-format
-msgid ""
-"explicit request not to duplicate arguments in call to '%s', but argument %d "
-"is of the wrong type (%d != %d)"
-msgstr ""
-"requerimento explicito para não duplicação de argumentos na chamada de '%s', "
-"mas o argumento %d é do tipo errado (%d != %d)"
-
-#: src/main/dotcode.c:1493
+#: src/main/dotcode.c:1510
 #, fuzzy, c-format
 msgid "long vectors (argument %d) are not supported in %s"
 msgstr "links simbólicos não são suportados nessa plataforma"
 
-#: src/main/dotcode.c:1524
+#: src/main/dotcode.c:1541
 #, c-format
 msgid "NAs in foreign function call (arg %d)"
 msgstr "NAs em chamada de função externa (argumento %d)"
 
-#: src/main/dotcode.c:1547
+#: src/main/dotcode.c:1564
 #, c-format
 msgid "NA/NaN/Inf in foreign function call (arg %d)"
 msgstr "NA/NaN/Inf em chamada de função externa (argumento %d)"
 
-#: src/main/dotcode.c:1552
-msgid "single values not returned if not duplicated"
-msgstr ""
-
-#: src/main/dotcode.c:1578
+#: src/main/dotcode.c:1594
 #, c-format
 msgid "complex NA/NaN/Inf in foreign function call (arg %d)"
 msgstr "NA/NaN/Inf complexo em chamada de função externa (argumento %d)"
 
-#: src/main/dotcode.c:1597
-msgid "character variables must be duplicated in .C/.Fortran"
-msgstr "variáveis do tipo caractere devem ser duplicadas em .C/.Fortran"
-
-#: src/main/dotcode.c:1602
+#: src/main/dotcode.c:1616
 msgid "only first string in char vector used in .Fortran"
 msgstr "apenas primeira string do vetor de caracteres usada em .Fortran"
 
-#: src/main/dotcode.c:1645 src/main/dotcode.c:1661 src/main/dotcode.c:1672
+#: src/main/dotcode.c:1659 src/main/dotcode.c:1675 src/main/dotcode.c:1686
 #, fuzzy, c-format
 msgid "invalid mode (%s) to pass to Fortran (arg %d)"
 msgstr "modo inválido para passar para Fortran (argumento %d)"
 
-#: src/main/dotcode.c:1666
+#: src/main/dotcode.c:1680
 #, fuzzy, c-format
 msgid "invalid mode (%s) to pass to C or Fortran (arg %d)"
 msgstr "modo inválido para passar para Fortran (argumento %d)"
 
-#: src/main/dotcode.c:1677
+#: src/main/dotcode.c:1691
 msgid "pairlists are passed as SEXP as from R 2.15.0"
 msgstr ""
 
-#: src/main/dotcode.c:2499
+#: src/main/dotcode.c:2510
 #, c-format
 msgid "type \"%s\" not supported in interlanguage calls"
 msgstr "tipo \"%s\" não suportado em chamadas entre linguagens"
 
-#: src/main/dotcode.c:2604
+#: src/main/dotcode.c:2615
 #, c-format
 msgid "mode '%s' is not supported in call_R"
 msgstr "modo '%s' não é suportado em call_R"
 
-#: src/main/dounzip.c:171
+#: src/main/dounzip.c:172
 #, c-format
 msgid " not overwriting file '%s"
 msgstr " não foi possível sobrescrever o arquivo  '%s"
 
-#: src/main/dounzip.c:256
+#: src/main/dounzip.c:257
 #, c-format
 msgid "zip file '%s' cannot be opened"
 msgstr "arquivo zip '%s' não pode ser aberto"
 
-#: src/main/dounzip.c:312
+#: src/main/dounzip.c:313
 msgid "invalid zip name argument"
 msgstr "argumento zip inválido"
 
-#: src/main/dounzip.c:315 src/main/dounzip.c:409
+#: src/main/dounzip.c:316 src/main/dounzip.c:410
 msgid "zip path is too long"
 msgstr "caminho do zip é muito longo"
 
-#: src/main/dounzip.c:332
+#: src/main/dounzip.c:333
 msgid "'exdir' is too long"
 msgstr "'exdir' é muito grande"
 
-#: src/main/dounzip.c:335
+#: src/main/dounzip.c:336
 msgid "'exdir' does not exist"
 msgstr "'exdir' não existe"
 
-#: src/main/dounzip.c:363
+#: src/main/dounzip.c:364
 msgid "requested file not found in the zip file"
 msgstr "arquivo requisitado não encontrado no arquivo zip"
 
-#: src/main/dounzip.c:366
+#: src/main/dounzip.c:367
 msgid "zip file is corrupt"
 msgstr "arquivo zip está corrupto"
 
-#: src/main/dounzip.c:369
+#: src/main/dounzip.c:370
 msgid "CRC error in zip file"
 msgstr "erro CRC no arquivo zip"
 
-#: src/main/dounzip.c:376
+#: src/main/dounzip.c:377
 msgid "write error in extracting from zip file"
 msgstr "erro de escrita na extração a partir de arquivo zip"
 
-#: src/main/dounzip.c:379
+#: src/main/dounzip.c:380
 #, c-format
 msgid "error %d in extracting from zip file"
 msgstr "erro %d na extração a partir de arquivo zip"
 
-#: src/main/dounzip.c:404
+#: src/main/dounzip.c:405
 msgid "unz connections can only be opened for reading"
 msgstr "conexões unz só podem ser abertas para leitura"
 
-#: src/main/dounzip.c:415
+#: src/main/dounzip.c:416
 #, fuzzy
 msgid "invalid description of 'unz' connection"
 msgstr "descrição inválida de conexão unz"
 
-#: src/main/dounzip.c:421
+#: src/main/dounzip.c:422
 #, c-format
 msgid "cannot open zip file '%s'"
 msgstr "não é possível abrir arquivo zip '%s'"
 
-#: src/main/dounzip.c:425
+#: src/main/dounzip.c:426
 #, c-format
 msgid "cannot locate file '%s' in zip file '%s'"
 msgstr "não foi possível localizar arquivo '%s' no arquivo zip '%s'"
 
-#: src/main/dounzip.c:469
+#: src/main/dounzip.c:470
 msgid "printing not enabled for this connection"
 msgstr "impressão não habilitada para essa conexão"
 
@@ -2820,8 +2869,8 @@ msgstr "impressão não habilitada para essa conexão"
 msgid "write not enabled for this connection"
 msgstr "write não habilitado para essa conexão"
 
-#: src/main/dounzip.c:496 src/main/dounzip.c:500 src/main/dounzip.c:506
-#: src/main/dounzip.c:523
+#: src/main/dounzip.c:494 src/main/dounzip.c:498 src/main/dounzip.c:504
+#: src/main/dounzip.c:521
 #, fuzzy
 msgid "allocation of 'unz' connection failed"
 msgstr "alocação de conexão unz falhou"
@@ -2840,7 +2889,7 @@ msgstr "argumentos formais inválidos para \"function\""
 msgid "invalid argument to edit()"
 msgstr "argumento inválido para edit()"
 
-#: src/main/edit.c:121 src/main/saveload.c:2076
+#: src/main/edit.c:121 src/main/saveload.c:2078
 msgid "unable to open file"
 msgstr "não é possível abrir arquivo"
 
@@ -2904,12 +2953,12 @@ msgid "no graphics system to unregister"
 msgstr "nenhum sistema gráfico para desregistrar"
 
 #: src/main/engine.c:443 src/main/engine.c:448 src/main/engine.c:456
-#: src/main/engine.c:463 src/main/engine.c:477 src/modules/X11/devX11.c:1157
+#: src/main/engine.c:463 src/main/engine.c:477 src/modules/X11/devX11.c:1159
 msgid "invalid line end"
 msgstr "terminador de linha inválido"
 
 #: src/main/engine.c:508 src/main/engine.c:513 src/main/engine.c:521
-#: src/main/engine.c:528 src/main/engine.c:542 src/modules/X11/devX11.c:1175
+#: src/main/engine.c:528 src/main/engine.c:542 src/modules/X11/devX11.c:1177
 msgid "invalid line join"
 msgstr "junção de linha inválida"
 
@@ -2942,84 +2991,98 @@ msgstr "Sys.sleep não está implementado nesse sistema"
 msgid "raster capture is not available for this device"
 msgstr "%s não está disponível para este dispositivo"
 
-#: src/main/engine.c:1656
+#: src/main/engine.c:1662
 #, c-format
 msgid "font face %d not supported for font family '%s'"
 msgstr "face de fonte %d não suportada para a família de fonte '%s'"
 
-#: src/main/engine.c:1972
+#: src/main/engine.c:1978
 msgid "no graphics device is active"
 msgstr "nenhum dispositivo gráfico está ativo"
 
-#: src/main/engine.c:2049
+#: src/main/engine.c:2055
 #, c-format
 msgid "pch value '%d' is invalid in this locale"
 msgstr "valor pch '%d' é inválido nesse locale"
 
-#: src/main/engine.c:2307
+#: src/main/engine.c:2313
 #, c-format
 msgid "unimplemented pch value '%d'"
 msgstr "valor pch '%d' não implementado"
 
-#: src/main/engine.c:2330
+#: src/main/engine.c:2336
 #, c-format
 msgid "invalid axis extents [GEPretty(.,.,n=%d)"
 msgstr "extensão para eixos inválida [GEPretty(.,.,n=%d)"
 
-#: src/main/engine.c:2334
+#: src/main/engine.c:2340
 #, c-format
 msgid "infinite axis extents [GEPretty(%g,%g,%d)]"
 msgstr "extensão infinita para eixos [GEPretty(%g,%g,%d)]"
 
-#: src/main/engine.c:2371
+#: src/main/engine.c:2377
 #, c-format
 msgid " .. GEPretty(.): new *lo = %g < %g = x1"
 msgstr " .. GEPretty(.): new *lo = %g < %g = x1"
 
-#: src/main/engine.c:2373
+#: src/main/engine.c:2379
 #, c-format
 msgid " .. GEPretty(.): new *up = %g > %g = x2"
 msgstr " .. GEPretty(.): new *up = %g > %g = x2"
 
-#: src/main/engine.c:2773
+#: src/main/engine.c:2784
 #, fuzzy
 msgid "display list redraw incomplete"
 msgstr "Exibição do redesenho da lista incompleta"
 
-#: src/main/engine.c:2777
+#: src/main/engine.c:2788
 #, fuzzy
 msgid "invalid display list"
 msgstr "argumento lista inválido"
 
-#: src/main/engine.c:2963
+#: src/main/engine.c:2900
+#, c-format
+msgid ""
+"snapshot recorded with different graphics engine version (pre 11 - this is "
+"version %d)"
+msgstr ""
+
+#: src/main/engine.c:2904
+#, c-format
+msgid ""
+"snapshot recorded with different graphics engine version (%d - this is "
+"version %d)"
+msgstr ""
+
+#: src/main/engine.c:2983
 msgid "'expr' argument must be an expression"
 msgstr "argumento 'expr' deve ser uma expressão"
 
-#: src/main/engine.c:2965
+#: src/main/engine.c:2985
 msgid "'list' argument must be a list"
 msgstr "argumento 'list' deve ser uma lista"
 
-#: src/main/engine.c:2971
+#: src/main/engine.c:2991
 msgid "'env' argument must be an environment"
 msgstr "argumento 'env' deve ser um ambiente"
 
-#: src/main/engine.c:3051 src/main/engine.c:3059
+#: src/main/engine.c:3071 src/main/engine.c:3079
 msgid "invalid multibyte char in pch=\"c\""
 msgstr "caractere multibyte inválido em pch=\"c\""
 
-#: src/main/engine.c:3106
+#: src/main/engine.c:3126
 msgid "invalid hex digit in 'color' or 'lty'"
 msgstr "valor de dígito hexa inválido em 'color' ou 'lty'"
 
-#: src/main/engine.c:3129
+#: src/main/engine.c:3149
 msgid "invalid line type: must be length 2, 4, 6 or 8"
 msgstr "linha de tipo inválida: deve ter comprimento 2, 4, 6 ou 8"
 
-#: src/main/engine.c:3133
+#: src/main/engine.c:3153
 msgid "invalid line type: zeroes are not allowed"
 msgstr "tipo de linha inválida: zeros não são permitidos"
 
-#: src/main/engine.c:3142 src/main/engine.c:3150 src/main/engine.c:3157
+#: src/main/engine.c:3162 src/main/engine.c:3170 src/main/engine.c:3177
 msgid "invalid line type"
 msgstr "linha de tipo inválido"
 
@@ -3028,442 +3091,446 @@ msgstr "linha de tipo inválido"
 msgid "cannot change value of locked binding for '%s'"
 msgstr "não é possível mudar o valor de vinculo bloqueado para '%s'"
 
-#: src/main/envir.c:251 src/main/envir.c:1454
+#: src/main/envir.c:251 src/main/envir.c:1530
 msgid "cannot add bindings to a locked environment"
 msgstr "não é possível adicionar vinculações a um ambiente bloqueado"
 
-#: src/main/envir.c:772
+#: src/main/envir.c:775
 msgid "invalid cached value in R_GetGlobalCache"
 msgstr "valor em cache inválido em R_GetGlobalCache"
 
-#: src/main/envir.c:830
+#: src/main/envir.c:836
 msgid "cannot unbind in the base namespace"
 msgstr "não é possível desvincular no espaço de nomes base"
 
-#: src/main/envir.c:832
+#: src/main/envir.c:838
 msgid "unbind in the base environment is unimplemented"
 msgstr "desvincular no ambiente base não está implementado"
 
-#: src/main/envir.c:834 src/main/envir.c:1684
+#: src/main/envir.c:840 src/main/envir.c:1818
 msgid "cannot remove bindings from a locked environment"
 msgstr "não é possível desfazer vinculações de um ambiente bloqueado"
 
-#: src/main/envir.c:1139
+#: src/main/envir.c:1213
 #, c-format
 msgid "argument to '%s' is not an environment"
 msgstr "argumento para '%s' não é um ambiente"
 
-#: src/main/envir.c:1300
+#: src/main/envir.c:1374
 #, fuzzy, c-format
 msgid "the ... list does not contain %d elements"
 msgstr "A lista ... não contém %d elementos"
 
-#: src/main/envir.c:1302
+#: src/main/envir.c:1376
 #, c-format
 msgid "..%d used in an incorrect context, no ... to look in"
 msgstr "..%d usado em um contexto incorreto, nenhum ... para procurar"
 
-#: src/main/envir.c:1390 src/main/envir.c:1842 src/main/eval.c:573
-#: src/main/eval.c:3618
-#, c-format
-msgid "argument \"%s\" is missing, with no default"
-msgstr "argumento \"%s\" ausente, sem padrão"
-
-#: src/main/envir.c:1395
+#: src/main/envir.c:1469
 #, c-format
 msgid "could not find function \"%s\""
 msgstr "não foi possível encontrar a função \"%s\""
 
-#: src/main/envir.c:1418
+#: src/main/envir.c:1492
 msgid "cannot assign values in the empty environment"
 msgstr "não é possível atribuir valores no ambiente vazio"
 
-#: src/main/envir.c:1424 src/main/envir.c:1497
+#: src/main/envir.c:1498 src/main/envir.c:1628
 msgid "cannot assign variables to this database"
 msgstr "não é possível atribuir variáveis a essa base de dados"
 
-#: src/main/envir.c:1580
+#: src/main/envir.c:1714
 #, c-format
 msgid "cannot add binding of '%s' to the base environment"
 msgstr "não é possível adicionar vinculação de '%s' ao ambiente base"
 
-#: src/main/envir.c:1609
+#: src/main/envir.c:1743
 msgid "only the first element is used as variable name"
 msgstr "apenas o primeiro elemento é usado como nome da variável"
 
-#: src/main/envir.c:1641
+#: src/main/envir.c:1775
 msgid "first argument must be a named list"
 msgstr "primeiro argumento deve ser uma lista nomeada"
 
-#: src/main/envir.c:1646
+#: src/main/envir.c:1780
 msgid "names(x) must be a character vector of the same length as x"
 msgstr "names(x) deve ser um vetor de caracter de mesmo comprimento que x"
 
-#: src/main/envir.c:1649
+#: src/main/envir.c:1783
 #, fuzzy
 msgid "'envir' argument must be an environment"
 msgstr "argumento 'env' deve ser um ambiente"
 
-#: src/main/envir.c:1678
+#: src/main/envir.c:1812
 msgid "cannot remove variables from base namespace"
 msgstr "não é possível remover variáveis do espaço de nomes base"
 
-#: src/main/envir.c:1680
+#: src/main/envir.c:1814
 msgid "cannot remove variables from the base environment"
 msgstr "não é possível remover variáveis do ambiente base"
 
-#: src/main/envir.c:1682
+#: src/main/envir.c:1816
 msgid "cannot remove variables from the empty environment"
 msgstr "não é possível remover variáveis do ambiente vazio"
 
-#: src/main/envir.c:1690
+#: src/main/envir.c:1824
 msgid "cannot remove variables from this database"
 msgstr "não é possível remover variáveis dessa base de dados"
 
-#: src/main/envir.c:1849
+#: src/main/envir.c:1985
 #, c-format
 msgid "object '%s' of mode '%s' was not found"
 msgstr "objeto '%s' de modo '%s'  não foi encontrado"
 
-#: src/main/envir.c:1921
+#: src/main/envir.c:2068
 #, c-format
 msgid "invalid name in position %d"
 msgstr "nome inválido na posição %d"
 
-#: src/main/envir.c:1927
+#: src/main/envir.c:2074
 msgid "second argument must be an environment"
 msgstr "segundo argumento deve ser um ambiente"
 
-#: src/main/envir.c:1935 src/main/envir.c:1943
+#: src/main/envir.c:2082 src/main/envir.c:2090
 #, c-format
 msgid "wrong length for '%s' argument"
 msgstr "comprimento errado para argumento '%s'"
 
-#: src/main/envir.c:2062
+#: src/main/envir.c:2221
 msgid "invalid use of 'missing'"
 msgstr "uso inválido de 'missing'"
 
-#: src/main/envir.c:2087
+#: src/main/envir.c:2247
 msgid "'missing' can only be used for arguments"
 msgstr "'missing' só pode ser usado para argumentos"
 
-#: src/main/envir.c:2168
+#: src/main/envir.c:2333
 msgid "'pos' must be an integer"
 msgstr "'pos' deve ser um inteiro"
 
-#: src/main/envir.c:2182
+#: src/main/envir.c:2347
 msgid "all elements of a list must be named"
 msgstr "todos os elementos de uma lista devem ser nomeados"
 
-#: src/main/envir.c:2205
+#: src/main/envir.c:2370
 msgid "'attach' only works for lists, data frames and environments"
 msgstr "'attach' só funciona para listas, data frames e ambientes"
 
-#: src/main/envir.c:2288
+#: src/main/envir.c:2453
 msgid "detaching \"package:base\" is not allowed"
 msgstr "detach de \"package:base\" não é permitido"
 
-#: src/main/envir.c:2589 src/main/envir.c:2644
+#: src/main/envir.c:2798 src/main/envir.c:2879
 msgid "argument must be an environment"
 msgstr "argumento deve ser um ambiente"
 
-#: src/main/envir.c:2648
+#: src/main/envir.c:2883
 msgid "arguments must be symbolic"
 msgstr "argumentos devem ser simbólicos"
 
-#: src/main/envir.c:2772
+#: src/main/envir.c:3032
 msgid "no enclosing environment"
 msgstr "nenhum ambiente abrangente"
 
-#: src/main/envir.c:2825
+#: src/main/envir.c:3085
 #, c-format
 msgid "no item called \"%s\" on the search list"
 msgstr "nenhum item \"%s\" na lista de procura"
 
-#: src/main/envir.c:2850
+#: src/main/envir.c:3110
 msgid "using 'as.environment(NULL)' is defunct"
 msgstr "uso de 'as.environment(NULL)' não é mais permitido"
 
-#: src/main/envir.c:2856
+#: src/main/envir.c:3116
 msgid "S4 object does not extend class \"environment\""
 msgstr "objeto S4 não estende classe \"environment\""
 
-#: src/main/envir.c:2871
+#: src/main/envir.c:3131
 msgid "invalid object for 'as.environment'"
 msgstr "objeto inválido para 'as.environment'"
 
-#: src/main/envir.c:2897 src/main/envir.c:2925 src/main/envir.c:2954
-#: src/main/envir.c:2975 src/main/envir.c:2998 src/main/envir.c:3033
-#: src/main/envir.c:3054
+#: src/main/envir.c:3157 src/main/envir.c:3185 src/main/envir.c:3214
+#: src/main/envir.c:3235 src/main/envir.c:3258 src/main/envir.c:3293
+#: src/main/envir.c:3314
 msgid "not an environment"
 msgstr "não é um ambiente"
 
-#: src/main/envir.c:2949 src/main/envir.c:2970 src/main/envir.c:2991
-#: src/main/envir.c:3028 src/main/envir.c:3049 src/main/envir.c:3148
+#: src/main/envir.c:3209 src/main/envir.c:3230 src/main/envir.c:3251
+#: src/main/envir.c:3288 src/main/envir.c:3309 src/main/envir.c:3408
 msgid "not a symbol"
 msgstr "não é um símbolo"
 
-#: src/main/envir.c:2962 src/main/envir.c:2983 src/main/envir.c:3041
-#: src/main/envir.c:3062
+#: src/main/envir.c:3222 src/main/envir.c:3243 src/main/envir.c:3301
+#: src/main/envir.c:3322
 #, c-format
 msgid "no binding for \"%s\""
 msgstr "nenhuma vinculação para \"%s\""
 
-#: src/main/envir.c:2993
+#: src/main/envir.c:3253
 msgid "not a function"
 msgstr "não é uma função"
 
-#: src/main/envir.c:3001 src/main/envir.c:3017
+#: src/main/envir.c:3261 src/main/envir.c:3277
 msgid "symbol already has a regular binding"
 msgstr "símbolo já tem uma vinculação regular"
 
-#: src/main/envir.c:3003 src/main/envir.c:3019
+#: src/main/envir.c:3263 src/main/envir.c:3279
 msgid "cannot change active binding if binding is locked"
 msgstr "não é possível mudar a vinculação ativa se o vínculo estiver bloqueado"
 
-#: src/main/envir.c:3107
+#: src/main/envir.c:3367 src/main/envir.c:3604
 msgid "unknown op"
 msgstr "operador não conhecido"
 
-#: src/main/envir.c:3152
+#: src/main/envir.c:3412
 msgid "cannot unbind a locked binding"
 msgstr "não é possível desvincular uma vinculação bloqueada"
 
-#: src/main/envir.c:3154
+#: src/main/envir.c:3414
 msgid "cannot unbind an active binding"
 msgstr "não é possível desvincular uma vinculação ativa"
 
-#: src/main/envir.c:3289
+#: src/main/envir.c:3555
 #, fuzzy
 msgid "bad namespace name"
 msgstr "nome de espaço de nomes inválido"
 
-#: src/main/envir.c:3301
+#: src/main/envir.c:3567
 #, fuzzy
 msgid "namespace already registered"
 msgstr "espaço de nomes já registrado"
 
-#: src/main/envir.c:3313
+#: src/main/envir.c:3579
 #, fuzzy
 msgid "namespace not registered"
 msgstr "espaço de nomes não registrado"
 
-#: src/main/envir.c:3360
+#: src/main/envir.c:3635
 msgid "bad import environment argument"
 msgstr "argumento de importação de ambiente inválido"
 
-#: src/main/envir.c:3365
+#: src/main/envir.c:3640
 msgid "bad export environment argument"
 msgstr "argumento de exportação de ambiente inválido"
 
-#: src/main/envir.c:3369
+#: src/main/envir.c:3644
 msgid "length of import and export names must match"
 msgstr "comprimentos dos nomes de importação e exportação devem ser iguais"
 
-#: src/main/envir.c:3392
+#: src/main/envir.c:3667
 #, c-format
 msgid "exported symbol '%s' has no value"
 msgstr "símbolo exportado '%s' não tem valor"
 
-#: src/main/envir.c:3557
+#: src/main/envir.c:3833
 #, c-format
 msgid "unknown encoding: %d"
 msgstr "codificação não suportada: %d"
 
-#: src/main/envir.c:3577
+#: src/main/envir.c:3853
 #, c-format
 msgid "embedded nul in string: '%s'"
 msgstr "cadeia de caracteres com nul incluso: '%s'"
 
-#: src/main/errors.c:178 src/main/errors.c:215
+#: src/main/errors.c:163 src/main/errors.c:200
 msgid "interrupts suspended; signal ignored"
 msgstr "interrupções suspendidas; sinal ignorado"
 
-#: src/main/errors.c:318
+#: src/main/errors.c:250
+msgid "[... truncated]"
+msgstr ""
+
+#: src/main/errors.c:310
 msgid "invalid option \"warning.expression\""
 msgstr "opção inválida \"warning.expression\""
 
-#: src/main/errors.c:348
+#: src/main/errors.c:339
 #, c-format
 msgid "(converted from warning) %s"
 msgstr "(convertido do aviso) %s"
 
-#: src/main/errors.c:359
-#, c-format
-msgid "Warning: %s\n"
+#: src/main/errors.c:349
+#, fuzzy
+msgid "Warning:"
 msgstr "Aviso: %s\n"
 
-#: src/main/errors.c:363
-#, c-format
-msgid "Warning in %s : %s\n"
+#: src/main/errors.c:351
+#, fuzzy, c-format
+msgid "Warning in %s :"
 msgstr "Aviso em %s : %s\n"
 
-#: src/main/errors.c:365
-#, c-format
-msgid ""
-"Warning in %s :\n"
-"  %s\n"
+#: src/main/errors.c:360 src/main/errors.c:374 src/main/errors.c:687
+msgid "Calls:"
 msgstr ""
-"Aviso em %s :\n"
-"  %s\n"
 
-#: src/main/errors.c:428 src/main/errors.c:447 src/main/errors.c:596
+#: src/main/errors.c:421 src/main/errors.c:440 src/main/errors.c:602
 msgid "Lost warning messages\n"
 msgstr "Mensagens de aviso perdidas\n"
 
-#: src/main/errors.c:459
-msgid "Warning message:\n"
-msgid_plural "Warning messages:\n"
+#: src/main/errors.c:452
+#, fuzzy
+msgid "Warning message:"
+msgid_plural "Warning messages:"
 msgstr[0] "Mensagens de aviso perdidas:\n"
 msgstr[1] "Mensagens de aviso perdidas:\n"
 
-#: src/main/errors.c:514
+#: src/main/errors.c:462 src/main/errors.c:490
 #, c-format
-msgid "There were %d warnings (use warnings() to see them)\n"
-msgstr "Houve %d avisos (use warnings() para vê-los)\n"
+msgid "In %s :"
+msgstr ""
+
+#: src/main/errors.c:515
+#, fuzzy, c-format
+msgid "There was %d warning (use warnings() to see it)"
+msgid_plural "There were %d warnings (use warnings() to see them)"
+msgstr[0] "Houve %d avisos (use warnings() para vê-los)\n"
+msgstr[1] "Houve %d avisos (use warnings() para vê-los)\n"
 
-#: src/main/errors.c:517
+#: src/main/errors.c:520
 #, fuzzy, c-format
-msgid "There were %d or more warnings (use warnings() to see the first %d)\n"
+msgid "There were %d or more warnings (use warnings() to see the first %d)"
 msgstr "Houve 50 ou mais avisos (use warnings() para ver os primeiros 50)\n"
 
-#: src/main/errors.c:587
+#: src/main/errors.c:593
 msgid "Error during wrapup: "
 msgstr "Erros durante o embrulho: "
 
-#: src/main/errors.c:612
+#: src/main/errors.c:618
 msgid "Error in "
 msgstr "Erro em "
 
-#: src/main/errors.c:613
+#: src/main/errors.c:640 src/main/errors.c:647
 #, c-format
-msgid " (from %s) : "
+msgid "Error in %s (from %s) : "
 msgstr ""
 
-#: src/main/errors.c:664 src/main/errors.c:670
+#: src/main/errors.c:649
+#, fuzzy, c-format
+msgid "Error in %s : "
+msgstr "Erro em "
+
+#: src/main/errors.c:669 src/main/errors.c:675
 #, c-format
 msgid "Error: "
 msgstr "Erro: "
 
-#: src/main/errors.c:690 src/main/errors.c:1319
+#: src/main/errors.c:696 src/main/errors.c:1300
 msgid "In addition: "
 msgstr "Além disso: "
 
-#: src/main/errors.c:811
+#: src/main/errors.c:818
 msgid "invalid option \"error\"\n"
 msgstr "opção inválida \"error\"\n"
 
-#: src/main/errors.c:893
-msgid "Execution halted\n"
-msgstr "Execução interrompida\n"
-
-#: src/main/errors.c:1032
-msgid "'msg1' must be a character string"
-msgstr "'msg1' deve ser uma string de caracteres"
-
-#: src/main/errors.c:1034
-msgid "'msg2' must be a character string"
-msgstr "'msg2' deve ser uma string de caracteres"
+#: src/main/errors.c:1013 src/main/errors.c:1015 src/main/options.c:339
+#: src/main/unique.c:1638
+#, fuzzy, c-format
+msgid "'%s' must be a character string"
+msgstr "'sep' deve ser uma string de caracteres"
 
-#: src/main/errors.c:1131
+#: src/main/errors.c:1116
 msgid " [invalid string in stop(.)]"
 msgstr " [string inválida em stop(.)]"
 
-#: src/main/errors.c:1162
+#: src/main/errors.c:1148
 msgid " [invalid string in warning(.)]"
 msgstr " [string inválida em warning(.)]"
 
-#: src/main/errors.c:1178
+#: src/main/errors.c:1164
 #, c-format
 msgid "incorrect number of arguments to \"%s\""
 msgstr "número de argumentos inválidos para \"%s\""
 
-#: src/main/errors.c:1184 src/main/errors.c:1199
+#: src/main/errors.c:1170 src/main/errors.c:1185
 #, c-format
 msgid "unimplemented feature in %s"
 msgstr "recurso não implementado em %s"
 
-#: src/main/errors.c:1193
+#: src/main/errors.c:1179
 msgid "invalid number of arguments"
 msgstr "número inválido de argumentos"
 
-#: src/main/errors.c:1194 src/main/logic.c:189
+#: src/main/errors.c:1180 src/main/logic.c:181
 msgid "invalid argument type"
 msgstr "argumento de tipo inválido"
 
-#: src/main/errors.c:1196
+#: src/main/errors.c:1182
 msgid "time-series/vector length mismatch"
 msgstr "comprimento de séries temporais/vetor incompatível"
 
-#: src/main/errors.c:1197
+#: src/main/errors.c:1183
 msgid "incompatible arguments"
 msgstr "argumentos incompatíveis"
 
-#: src/main/errors.c:1200
+#: src/main/errors.c:1186
 msgid "unknown error (report this!)"
 msgstr "erro desconhecido (avise isso!)"
 
-#: src/main/errors.c:1212
+#: src/main/errors.c:1195
+msgid "inaccurate integer conversion in coercion"
+msgstr "conversão inteira inacurada na coerção"
+
+#: src/main/errors.c:1198
 msgid "unknown warning (report this!)"
 msgstr "aviso desconhecido (avise isso!)"
 
-#: src/main/errors.c:1283
+#: src/main/errors.c:1269
 msgid "No function to return from, jumping to top level"
 msgstr "Nenhuma função de onde retornar, pulando para o nível superior"
 
-#: src/main/errors.c:1299
+#: src/main/errors.c:1285
 msgid "top level inconsistency?"
 msgstr "nível superior inconsistente?"
 
-#: src/main/errors.c:1478
+#: src/main/errors.c:1459
 msgid "bad handler data"
 msgstr "manipulador de dados defeituoso"
 
-#: src/main/errors.c:1628
+#: src/main/errors.c:1613
 msgid "error message not a string"
 msgstr "mensagem de erro não é uma string"
 
-#: src/main/errors.c:1703
+#: src/main/errors.c:1688
 msgid "handler or restart stack mismatch in old restart"
 msgstr ""
 "incompatibilidade no manipulador ou pilha de reinício durante o reinício "
 "antigo"
 
-#: src/main/errors.c:1729 src/main/errors.c:1745
+#: src/main/errors.c:1714 src/main/errors.c:1730
 msgid "bad error message"
 msgstr "mensagem de erro inválida"
 
-#: src/main/errors.c:1787
+#: src/main/errors.c:1771
 msgid "bad restart"
 msgstr "reinício defeituoso"
 
-#: src/main/errors.c:1819
+#: src/main/errors.c:1803
 msgid "restart not on stack"
 msgstr "reínicio não está na pilha"
 
-#: src/main/errors.c:1836
+#: src/main/errors.c:1819
 msgid "not in a try context"
 msgstr "não está em um contexto try"
 
-#: src/main/errors.c:1849
+#: src/main/errors.c:1832
 msgid "error message must be a character string"
 msgstr "mensagem de erro deve ser uma cadeia de caracteres"
 
-#: src/main/eval.c:308
+#: src/main/eval.c:365
 #, c-format
 msgid "source files skipped by Rprof; please increase '%s'"
 msgstr ""
 
-#: src/main/eval.c:328
+#: src/main/eval.c:385
 #, c-format
 msgid "Rprof: cannot open profile file '%s'"
 msgstr "Rprof: não é possível abrir o arquivo de perfil '%s'"
 
-#: src/main/eval.c:422
+#: src/main/eval.c:479
 msgid "R profiling is not available on this system"
 msgstr "Verificação de desempenho do R não está disponível nesse sistema"
 
-#: src/main/eval.c:446
+#: src/main/eval.c:503
 msgid ""
 "promise already under evaluation: recursive default argument reference or "
 "earlier problems?"
@@ -3471,272 +3538,275 @@ msgstr ""
 "promessa já está sendo avaliada: referência de argumento padrão recursivo ou "
 "problemas anteriores?"
 
-#: src/main/eval.c:448
+#: src/main/eval.c:505
 msgid "restarting interrupted promise evaluation"
 msgstr "reiniciando promessa interrompida de avaliação"
 
-#: src/main/eval.c:544
+#: src/main/eval.c:601
 msgid ""
 "evaluation nested too deeply: infinite recursion / options(expressions=)?"
 msgstr "avaliação aninhada demais; recursão infinita / options(expressions=)?"
 
-#: src/main/eval.c:575 src/main/eval.c:3619
+#: src/main/eval.c:632 src/main/eval.c:4238
 msgid "argument is missing, with no default"
 msgstr "argumento ausente, sem padrão"
 
-#: src/main/eval.c:679 src/main/eval.c:4642
+#: src/main/eval.c:736 src/main/eval.c:1306 src/main/eval.c:5533
 msgid "attempt to apply non-function"
 msgstr "tentativa de aplicar uma não-função"
 
-#: src/main/eval.c:702
+#: src/main/eval.c:759
 #, c-format
 msgid "%s at %s#%d: "
 msgstr "%s em %s#%d: "
 
-#: src/main/eval.c:1178
+#: src/main/eval.c:1298 src/main/eval.c:2271
+#, c-format
+msgid "argument %d is empty"
+msgstr "argumento %d está vazio"
+
+#: src/main/eval.c:1350
 #, c-format
 msgid "could not find symbol \"%s\" in environment of the generic function"
 msgstr ""
 "não foi possível encontrar o símbolo \"%s\" no ambiente da função genérica"
 
-#: src/main/eval.c:1196
+#: src/main/eval.c:1368
 #, c-format
 msgid "symbol \"%s\" not in environment of method"
 msgstr "símbolo \"%s\" não está no ambiente do método"
 
-#: src/main/eval.c:1308
+#: src/main/eval.c:1481
 msgid "the condition has length > 1 and only the first element will be used"
 msgstr ""
 "a condição tem comprimento > 1 e somente o primeiro elemento será usado"
 
-#: src/main/eval.c:1325
+#: src/main/eval.c:1500
 msgid "missing value where TRUE/FALSE needed"
 msgstr "valor ausente onde TRUE/FALSE necessário"
 
-#: src/main/eval.c:1326
+#: src/main/eval.c:1501
 msgid "argument is not interpretable as logical"
 msgstr "argumento não é interpretável como lógico"
 
-#: src/main/eval.c:1327
+#: src/main/eval.c:1502
 msgid "argument is of length zero"
 msgstr "argumento tem comprimento zero"
 
-#: src/main/eval.c:1418
+#: src/main/eval.c:1596
 msgid "non-symbol loop variable"
 msgstr "variável loop não simbólica"
 
-#: src/main/eval.c:1510 src/main/eval.c:4408
+#: src/main/eval.c:1687 src/main/eval.c:5301
 msgid "invalid for() loop sequence"
 msgstr "seqüência de loop for() inválida"
 
-#: src/main/eval.c:1652
+#: src/main/eval.c:1826
 msgid "multi-argument returns are not permitted"
 msgstr "retornos com múltiplos argumentos não são permitidos"
 
-#: src/main/eval.c:1701
+#: src/main/eval.c:1873
 msgid "invalid (NULL) left side of assignment"
 msgstr "lado esquerdo de atribuição inválido (NULL)"
 
-#: src/main/eval.c:1734
+#: src/main/eval.c:1907
 msgid "target of assignment expands to non-language object"
 msgstr "destino da atribuição expande para um objeto fora da linguagem"
 
-#: src/main/eval.c:1817
+#: src/main/eval.c:1990
 #, c-format
 msgid "overlong name in '%s'"
 msgstr "nome longo demais em '%s'"
 
-#: src/main/eval.c:1915
+#: src/main/eval.c:2080
 msgid "cannot do complex assignments in base namespace"
 msgstr "não é possível fazer atribuições complexas no espaço de nomes base"
 
-#: src/main/eval.c:1917
+#: src/main/eval.c:2082
 msgid "cannot do complex assignments in base environment"
 msgstr "não é possível fazer atribuições complexas no ambiente base"
 
-#: src/main/eval.c:1954 src/main/eval.c:1981
+#: src/main/eval.c:2121 src/main/eval.c:2148
 msgid "invalid function in complex assignment"
 msgstr "função inválida em uma atribuição complexa"
 
-#: src/main/eval.c:2041
+#: src/main/eval.c:2208
 msgid "invalid (do_set) left-hand side to assignment"
 msgstr "lado esquerdo da atribuição inválida (do_set)"
 
-#: src/main/eval.c:2103
-#, c-format
-msgid "argument %d is empty"
-msgstr "argumento %d está vazio"
-
-#: src/main/eval.c:2116
+#: src/main/eval.c:2284
 #, c-format
 msgid "'%s' is missing"
 msgstr "'%s' faltante"
 
-#: src/main/eval.c:2267
+#: src/main/eval.c:2439
 msgid "invalid formal argument list for \"function\""
 msgstr "lista de argumento formal inválida para \"function\""
 
-#: src/main/eval.c:2325 src/main/eval.c:2356 src/main/eval.c:2361
+#: src/main/eval.c:2497 src/main/eval.c:2528 src/main/eval.c:2533
 #, fuzzy, c-format
 msgid "invalid '%s' argument of type '%s'"
 msgstr "argumento '%s' inválido"
 
-#: src/main/eval.c:2353
+#: src/main/eval.c:2525
 msgid "numeric 'envir' arg not of length one"
 msgstr "argumento 'envir' numérico não tem comprimento um"
 
-#: src/main/eval.c:2377 src/main/eval.c:2399
+#: src/main/eval.c:2549 src/main/eval.c:2573
 msgid "restarts not supported in 'eval'"
 msgstr "reinícios não suportados em 'eval'"
 
-#: src/main/eval.c:2456 src/main/eval.c:2469
+#: src/main/eval.c:2632 src/main/eval.c:2645
 msgid "'Recall' called from outside a closure"
 msgstr "'Recall' chamada fora de um fechamento"
 
-#: src/main/eval.c:2562
+#: src/main/eval.c:2738
 msgid "value in '...' is not a promise"
 msgstr "valor em '...' não é uma promessa"
 
-#: src/main/eval.c:2754 src/main/objects.c:720
-#, c-format
-msgid "call name too long in '%s'"
-msgstr "nome de chamada muito longo em '%s'"
-
-#: src/main/eval.c:2775
-#, c-format
-msgid "generic name too long in '%s'"
-msgstr "nome genérico muito longo em '%s'"
-
-#: src/main/eval.c:2840
+#: src/main/eval.c:2999
 #, c-format
 msgid "Incompatible methods (\"%s\", \"%s\") for \"%s\""
 msgstr "Métodos incompatíveis (\"%s\", \"%s\") para \"%s\""
 
-#: src/main/eval.c:2906
+#: src/main/eval.c:3048
 msgid "dispatch error in group dispatch"
 msgstr "erro de despacho no despacho em grupo"
 
-#: src/main/eval.c:3201
+#: src/main/eval.c:3532
 #, c-format
 msgid "\"%s\" is not a %s function"
 msgstr "'%s' não é uma função %s"
 
-#: src/main/eval.c:3430
+#: src/main/eval.c:4047
 msgid "node stack overflow"
 msgstr "estouro da pilha de nós"
 
-#: src/main/eval.c:3436
+#: src/main/eval.c:4053
 msgid "integer stack overflow"
 msgstr "estouro da pilha de inteiros"
 
-#: src/main/eval.c:3490
+#: src/main/eval.c:4107
 #, fuzzy
 msgid "bad opcode"
 msgstr "Código de operador defeituoso"
 
-#: src/main/eval.c:4219
+#: src/main/eval.c:5083
 #, c-format
 msgid "invalid %s type in 'x %s y'"
 msgstr "tipo '%s' inválido em 'x %s y'"
 
-#: src/main/eval.c:4310
+#: src/main/eval.c:5195
 msgid "bytecode version mismatch; using eval"
 msgstr "incompatibilidade da versão bytecode; usando eval"
 
-#: src/main/eval.c:4315
+#: src/main/eval.c:5200
 msgid "bytecode version is too old"
 msgstr "versão bytecode é muito velha"
 
-#: src/main/eval.c:4316
+#: src/main/eval.c:5201
 msgid "bytecode version is too new"
 msgstr "versão bytecode é muito nova"
 
-#: src/main/eval.c:4350
+#: src/main/eval.c:5235
 msgid "byte code version mismatch"
 msgstr "incompatibilidade da versão bytecode"
 
-#: src/main/eval.c:4477
+#: src/main/eval.c:5383
 msgid "invalid sequence argument in for loop"
 msgstr "seqüência de argumentos inválida em loop for"
 
-#: src/main/eval.c:4624 src/main/names.c:1181
+#: src/main/eval.c:5522 src/main/names.c:1312
 #, fuzzy, c-format
 msgid "there is no .Internal function '%s'"
 msgstr "nenhuma função interna \"%s\""
 
-#: src/main/eval.c:4731 src/main/eval.c:5077 src/main/eval.c:5119
+#: src/main/eval.c:5622 src/main/eval.c:5968 src/main/eval.c:6008
 msgid "bad function"
 msgstr "função defeituosa"
 
-#: src/main/eval.c:4746
+#: src/main/eval.c:5635
 msgid "not a BUILTIN function"
 msgstr "não é uma função NATIVA"
 
-#: src/main/eval.c:5159
+#: src/main/eval.c:6066
+msgid "bad numeric 'switch' offsets"
+msgstr ""
+
+#: src/main/eval.c:6072
 #, fuzzy
 msgid "numeric EXPR required for 'switch' without named alternatives"
 msgstr ""
 "expressão numérica (EXPR) requerida para switch() sem alternativas nomeadas"
 
-#: src/main/eval.c:5255
+#: src/main/eval.c:6076
+msgid "bad character 'switch' offsets"
+msgstr ""
+
+#: src/main/eval.c:6188
 msgid "cannot find index for threaded code address"
 msgstr "não é possível encontrar um índice para código de endereço encadeado"
 
-#: src/main/eval.c:5315
+#: src/main/eval.c:6248
 #, fuzzy
 msgid "invalid body"
 msgstr "símbolo inválido"
 
-#: src/main/eval.c:5335
+#: src/main/eval.c:6268
 msgid "invalid symbol"
 msgstr "símbolo inválido"
 
-#: src/main/eval.c:5379
+#: src/main/eval.c:6312
 msgid "argument is not a byte code object"
 msgstr "argumento não é um objeto bytecode"
 
-#: src/main/eval.c:5400
+#: src/main/eval.c:6334
 msgid "bad file name"
 msgstr "nome de arquivo inválido"
 
-#: src/main/eval.c:5404 src/main/eval.c:5425
+#: src/main/eval.c:6338 src/main/eval.c:6359
 msgid "unable to open 'file'"
 msgstr "não é possível abrir 'file'"
 
-#: src/main/eval.c:5419 src/main/saveload.c:1942
+#: src/main/eval.c:6353 src/main/saveload.c:1944
 msgid "'file' must be non-empty string"
 msgstr "'file' deve ser uma string não vazia"
 
-#: src/main/eval.c:5421 src/main/saveload.c:1944 src/main/saveload.c:2244
-#: src/main/serialize.c:2149
+#: src/main/eval.c:6355 src/main/saveload.c:1946 src/main/saveload.c:2246
+#: src/main/serialize.c:2189
 msgid "'ascii' must be logical"
 msgstr "'ascii' deve ser um valor lógico"
 
-#: src/main/eval.c:5492 src/main/eval.c:5511 src/main/eval.c:5541
+#: src/main/eval.c:6426 src/main/eval.c:6445 src/main/eval.c:6475
 #, fuzzy
 msgid "constant buffer must be a generic vector"
 msgstr "code deve ser um vetor genérico"
 
-#: src/main/eval.c:5543
+#: src/main/eval.c:6477
 msgid "bad constant count"
 msgstr ""
 
-#: src/main/eval.c:5579
+#: src/main/eval.c:6515
 msgid "profile timer in use"
 msgstr "cronômetro de desempenho em uso"
 
-#: src/main/eval.c:5581
+#: src/main/eval.c:6517
 msgid "already byte code profiling"
 msgstr "análise de desempenho byte code já em andamento"
 
-#: src/main/eval.c:5599
+#: src/main/eval.c:6535
 msgid "setting profile timer failed"
 msgstr "especificação de um cronômetro de desempenho falhou"
 
-#: src/main/eval.c:5616
+#: src/main/eval.c:6553
 msgid "not byte code profiling"
 msgstr "análise de desempenho bytecode não está em andamento"
 
+#: src/main/eval.c:6569 src/main/eval.c:6573 src/main/eval.c:6577
+#, fuzzy
+msgid "byte code profiling is not supported in this build"
+msgstr "ICU não é suportado nessa plataforma"
+
 #: src/main/gevents.c:43
 #, c-format
 msgid "'%s' events not supported in this device"
@@ -3750,27 +3820,27 @@ msgstr "erro interno"
 msgid "this graphics device does not support event handling"
 msgstr "este dispositivo gráfico não suporta gerenciamento de eventos"
 
-#: src/main/gevents.c:136
+#: src/main/gevents.c:135
 msgid "invalid prompt"
 msgstr "prompt inválido"
 
-#: src/main/gevents.c:148
+#: src/main/gevents.c:146
 #, fuzzy
 msgid "recursive use of 'getGraphicsEvent' not supported"
 msgstr "uso recursivo de getGraphicsEvent não suportado"
 
-#: src/main/gevents.c:158
+#: src/main/gevents.c:157
 msgid "no graphics event handlers set"
 msgstr "nenhum evento gráfico definido"
 
-#: src/main/gram.y:222 src/main/gram.y:237 src/main/gram.y:2222
-#: src/main/gram.y:2236
+#: src/main/gram.y:222 src/main/gram.y:237 src/main/gram.y:2245
+#: src/main/gram.y:2259
 #, c-format
 msgid "EOF whilst reading MBCS char at line %d"
 msgstr "EOF enquanto lendo caractere MBCS na linha %d"
 
-#: src/main/gram.y:226 src/main/gram.y:234 src/main/gram.y:2226
-#: src/main/gram.y:2233
+#: src/main/gram.y:226 src/main/gram.y:234 src/main/gram.y:2249
+#: src/main/gram.y:2256
 #, c-format
 msgid "invalid multibyte character in parser at line %d"
 msgstr "caractere multibyte inválido na análise na linha %d"
@@ -3785,124 +3855,137 @@ msgstr "estouro do buffer de entrada na linha %d"
 msgid "incorrect tag type at line %d"
 msgstr "etiqueta de tipo incorreto na linha %d"
 
-#: src/main/gram.y:1653
+#: src/main/gram.y:1657
 msgid "contextstack overflow"
 msgstr "estouro da pilha de contexto"
 
-#: src/main/gram.y:1890
-msgid "input"
-msgstr "entrada"
+#: src/main/gram.y:1907 src/main/gram.y:1913
+#, fuzzy, c-format
+msgid "unexpected input"
+msgstr "%s inesperado"
 
-#: src/main/gram.y:1891
-msgid "end of input"
+#: src/main/gram.y:1910 src/main/main.c:311
+#, fuzzy, c-format
+msgid "unexpected end of input"
 msgstr "fim da entrada"
 
-#: src/main/gram.y:1892
-msgid "string constant"
+#: src/main/gram.y:1916
+#, fuzzy, c-format
+msgid "unexpected string constant"
 msgstr "cadeia de caracter constante"
 
-#: src/main/gram.y:1893
-msgid "numeric constant"
+#: src/main/gram.y:1919
+#, fuzzy, c-format
+msgid "unexpected numeric constant"
 msgstr "constante numérica"
 
-#: src/main/gram.y:1894
-msgid "symbol"
-msgstr "símbolo"
+#: src/main/gram.y:1922
+#, fuzzy, c-format
+msgid "unexpected symbol"
+msgstr "%s inesperado"
 
-#: src/main/gram.y:1895
-msgid "assignment"
-msgstr "atribuição"
+#: src/main/gram.y:1925
+#, fuzzy, c-format
+msgid "unexpected assignment"
+msgstr "%s inesperado"
 
-#: src/main/gram.y:1896
-msgid "end of line"
+#: src/main/gram.y:1928
+#, fuzzy, c-format
+msgid "unexpected end of line"
 msgstr "fim da linha"
 
-#: src/main/gram.y:1910 src/main/gram.y:1916
+#: src/main/gram.y:1931 src/main/gram.y:1939
 #, c-format
 msgid "unexpected %s"
 msgstr "%s inesperado"
 
-#: src/main/gram.y:1926
+#: src/main/gram.y:1951
 #, fuzzy, c-format
 msgid "repeated formal argument '%s' on line %d"
 msgstr "Argumento formal repetido '%s' na linha %d"
 
-#: src/main/gram.y:2136
+#: src/main/gram.y:2161
 #, fuzzy, c-format
 msgid "integer literal %s contains decimal; using numeric value"
 msgstr "inteiro literal %sL contém decimal; usando valor numérico"
 
-#: src/main/gram.y:2140
+#: src/main/gram.y:2164
 #, c-format
 msgid "non-integer value %s qualified with L; using numeric value"
 msgstr "valor não-inteiro %s qualificado com L; usando valor numérico"
 
-#: src/main/gram.y:2153
+#: src/main/gram.y:2176
 #, fuzzy, c-format
 msgid "integer literal %s contains unnecessary decimal point"
 msgstr "inteiro literal %sL contém ponto decimal desnecessário"
 
-#: src/main/gram.y:2185
+#: src/main/gram.y:2208
 #, c-format
 msgid "unable to allocate buffer for long string at line %d"
 msgstr ""
 "não foi possível alocar memória para cadeia de caracteres longa na linha %d"
 
-#: src/main/gram.y:2338
+#: src/main/gram.y:2347 src/main/gram.y:2370 src/main/gram.y:2407
+#: src/main/gram.y:2443
+#, fuzzy, c-format
+msgid "nul character not allowed (line %d)"
+msgstr "caractere multibyte inválido na análise na linha %d"
+
+#: src/main/gram.y:2363
 #, c-format
 msgid "'\\x' used without hex digits in character string starting \"%s\""
 msgstr "'\\x' usado sem dígitos hex em cadeia de caracter começando com \"%s\""
 
-#: src/main/gram.y:2352
+#: src/main/gram.y:2379
 #, c-format
 msgid "\\uxxxx sequences not supported inside backticks (line %d)"
 msgstr ""
 "seqüências \\uxxxx não são suportadas dentro de aspas simples (linha %d)"
 
-#: src/main/gram.y:2367
+#: src/main/gram.y:2394
 #, c-format
 msgid "'\\u' used without hex digits in character string starting \"%s\""
 msgstr ""
 "'\\u' usado sem dígitos hexadecimais em cadeia de caracter começando com \"%s"
 "\""
 
-#: src/main/gram.y:2375
+#: src/main/gram.y:2402
 #, c-format
 msgid "invalid \\u{xxxx} sequence (line %d)"
 msgstr "seqüência \\u{xxxx} inválida (linha %d)"
 
-#: src/main/gram.y:2387
+#: src/main/gram.y:2416
 #, c-format
 msgid "\\Uxxxxxxxx sequences not supported inside backticks (line %d)"
 msgstr ""
 "seqüências \\Uxxxxxxxx não são suportadas dentro de aspas simples (linha %d)"
 
-#: src/main/gram.y:2402
+#: src/main/gram.y:2431
 #, c-format
 msgid "'\\U' used without hex digits in character string starting \"%s\""
 msgstr ""
 "'\\U' usado sem dígitos hexadecimais em cadeia de caracter começando com \"%s"
 "\""
 
-#: src/main/gram.y:2410
+#: src/main/gram.y:2439
 #, c-format
 msgid "invalid \\U{xxxxxxxx} sequence (line %d)"
 msgstr "seqüência \\U{xxxxxxxx} inválida (linha %d)"
 
-#: src/main/gram.y:2451
+#: src/main/gram.y:2482
 #, c-format
 msgid "'\\%c' is an unrecognized escape in character string starting \"%s\""
 msgstr ""
 "'\\%c'  é uma seqüência de escape não reconhecida na cadeia de caracteres "
 "começando com \"%s\""
 
-#: src/main/gram.y:2510
+#: src/main/gram.y:2546
 msgid "mixing Unicode and octal/hex escapes in a string is not allowed"
 msgstr ""
 "mistura de códigos de escape Unicode e octal/hexadecimal em uma cadeia de "
 "caracteres não é permitido"
 
-#: src/main/gram.y:2514
+#: src/main/gram.y:2550
 #, c-format
 msgid ""
 "string at line %d containing Unicode escapes not in this locale\n"
@@ -3912,13 +3995,13 @@ msgstr ""
 "neste locale\n"
 "é muito grande (máximo 10000 caracteres)"
 
-#: src/main/gram.y:3112 src/main/gram.y:3119 src/main/gram.y:3125
-#: src/main/gram.y:3132
+#: src/main/gram.y:3148 src/main/gram.y:3155 src/main/gram.y:3161
+#: src/main/gram.y:3168
 #, c-format
 msgid "contextstack overflow at line %d"
 msgstr "estouro da pilha de contexto na linha %d"
 
-#: src/main/gram.y:3227
+#: src/main/gram.y:3263
 #, fuzzy, c-format
 msgid "internal parser error at line %d"
 msgstr "estouro do buffer de entrada na linha %d"
@@ -3928,34 +4011,34 @@ msgstr "estouro do buffer de entrada na linha %d"
 msgid "relative range of values =%4.0f * EPS, is small (axis %d)"
 msgstr "limite relativo dos valores =%4.0f * EPS, é pequeno (eixo %d)"
 
-#: src/main/grep.c:93
+#: src/main/grep.c:96
 #, c-format
 msgid "invalid regular expression '%s', reason '%s'"
 msgstr "expressão regular inválida '%s', razão '%s'"
 
-#: src/main/grep.c:95
+#: src/main/grep.c:98
 #, fuzzy, c-format
 msgid "invalid regular expression, reason '%s'"
 msgstr "expressão regular inválida '%s'"
 
-#: src/main/grep.c:220 src/main/grep.c:308 src/main/grep.c:416
-#: src/main/grep.c:883 src/main/grep.c:2473
+#: src/main/grep.c:225 src/main/grep.c:315 src/main/grep.c:426
+#: src/main/grep.c:900 src/main/grep.c:2502
 #, c-format
 msgid "input string %d is invalid UTF-8"
 msgstr "string de entrada %d é inválida em UTF-8"
 
-#: src/main/grep.c:286 src/main/grep.c:383
+#: src/main/grep.c:292 src/main/grep.c:391
 #, c-format
 msgid "'split' string %d is invalid UTF-8"
 msgstr "string 'split' %d é UTF-8 inválido"
 
-#: src/main/grep.c:290 src/main/grep.c:387 src/main/grep.c:560
+#: src/main/grep.c:296 src/main/grep.c:395 src/main/grep.c:571
 #, c-format
 msgid "'split' string %d is invalid in this locale"
 msgstr "string de 'split' %d é inválida nesse locale"
 
-#: src/main/grep.c:395 src/main/grep.c:851 src/main/grep.c:1600
-#: src/main/grep.c:2394
+#: src/main/grep.c:404 src/main/grep.c:867 src/main/grep.c:1621
+#: src/main/grep.c:2419
 #, c-format
 msgid ""
 "PCRE pattern compilation error\n"
@@ -3966,13 +4049,13 @@ msgstr ""
 "\t'%s'\n"
 "\tat '%s'\n"
 
-#: src/main/grep.c:397
+#: src/main/grep.c:406
 #, c-format
 msgid "invalid split pattern '%s'"
 msgstr "padrão split inválido '%s'"
 
-#: src/main/grep.c:401 src/main/grep.c:857 src/main/grep.c:1607
-#: src/main/grep.c:2401
+#: src/main/grep.c:410 src/main/grep.c:873 src/main/grep.c:1628
+#: src/main/grep.c:2426
 #, c-format
 msgid ""
 "PCRE pattern study error\n"
@@ -3981,45 +4064,45 @@ msgstr ""
 "erro no estudo do padrão PCRE\n"
 "\t'%s'\n"
 
-#: src/main/grep.c:834 src/main/grep.c:2377
+#: src/main/grep.c:849 src/main/grep.c:2401
 msgid "regular expression is invalid UTF-8"
 msgstr "expressão regular é inválida em UTF-8"
 
-#: src/main/grep.c:853 src/main/grep.c:1602 src/main/grep.c:2396
+#: src/main/grep.c:869 src/main/grep.c:1623 src/main/grep.c:2421
 #, c-format
 msgid "invalid regular expression '%s'"
 msgstr "expressão regular inválida '%s'"
 
-#: src/main/grep.c:1264
+#: src/main/grep.c:1282
 msgid "pattern matches an empty string infinitely, returning first match only"
 msgstr ""
 
-#: src/main/grep.c:1575
+#: src/main/grep.c:1595
 msgid "'pattern' is invalid UTF-8"
 msgstr "'pattern' é inválido em UTF-8"
 
-#: src/main/grep.c:1577
+#: src/main/grep.c:1597
 msgid "'replacement' is invalid UTF-8"
 msgstr "'replacement' é inválido em UTF-8"
 
-#: src/main/grep.c:1581
+#: src/main/grep.c:1601
 msgid "'pattern' is invalid in this locale"
 msgstr "'pattern' é inválido nesse locale"
 
-#: src/main/grep.c:1584
+#: src/main/grep.c:1604
 msgid "'replacement' is invalid in this locale"
 msgstr "'replacement' é inválido nesse locale"
 
-#: src/main/grep.c:1589
+#: src/main/grep.c:1609
 msgid "zero-length pattern"
 msgstr "padrão de comprimento 0"
 
-#: src/main/grep.c:1732 src/main/grep.c:1748 src/main/grep.c:1796
-#: src/main/grep.c:1812 src/main/grep.c:1859 src/main/grep.c:1875
+#: src/main/grep.c:1753 src/main/grep.c:1769 src/main/grep.c:1817
+#: src/main/grep.c:1833 src/main/grep.c:1880 src/main/grep.c:1896
 msgid "result string is too long"
 msgstr "string de resultado é muito longa"
 
-#: src/main/grep.c:2411
+#: src/main/grep.c:2436
 #, c-format
 msgid "'pcre_fullinfo' returned '%d' "
 msgstr ""
@@ -4028,33 +4111,29 @@ msgstr ""
 msgid "ignoring non-pairlist attributes"
 msgstr ""
 
-#: src/main/internet.c:92
+#: src/main/internet.c:83
 msgid "internet routines cannot be accessed in module"
 msgstr "rotinas de internet não podem ser acessadas dentro do módulo"
 
-#: src/main/internet.c:103 src/main/internet.c:141 src/main/internet.c:154
-#: src/main/internet.c:165 src/main/internet.c:176 src/main/internet.c:187
-#: src/main/internet.c:196 src/main/internet.c:207 src/main/internet.c:218
-#: src/main/internet.c:227 src/main/internet.c:237
+#: src/main/internet.c:94 src/main/internet.c:106 src/main/internet.c:119
+#: src/main/internet.c:130 src/main/internet.c:141 src/main/internet.c:152
+#: src/main/internet.c:161 src/main/internet.c:172 src/main/internet.c:183
+#: src/main/internet.c:192 src/main/internet.c:202 src/main/internet.c:318
+#: src/main/internet.c:330 src/main/internet.c:342 src/main/internet.c:354
 msgid "internet routines cannot be loaded"
 msgstr "rotinas de internet não podem ser carregadas"
 
-#: src/main/internet.c:118 src/main/memory.c:3434 src/main/memory.c:3444
-#: src/main/memory.c:3456 src/main/memory.c:3470 src/main/memory.c:3487
-#: src/main/memory.c:3505
-msgid "bad value"
-msgstr "valor inválido"
-
-#: src/main/internet.c:124
-msgid "internet routines were already initialized"
-msgstr "rotinas de internet já foram inicializadas"
-
-#: src/main/internet.c:251 src/main/internet.c:265 src/main/internet.c:281
-#: src/main/internet.c:293 src/main/internet.c:307 src/main/internet.c:327
-#: src/main/internet.c:340
+#: src/main/internet.c:216 src/main/internet.c:230 src/main/internet.c:247
+#: src/main/internet.c:259 src/main/internet.c:273 src/main/internet.c:293
+#: src/main/internet.c:306
 msgid "socket routines cannot be loaded"
 msgstr "rotinas de soquete não podem ser carregadas"
 
+#: src/main/internet.c:242
+#, fuzzy
+msgid "attempt to close invalid socket"
+msgstr "tentativa de especificar um atributo 'comment' inválido"
+
 #: src/main/lapack.c:39
 #, fuzzy
 msgid "LAPACK routines cannot be accessed in module"
@@ -4065,43 +4144,39 @@ msgstr "rotinas X11 não podem ser acessadas em módulo"
 msgid "LAPACK routines cannot be loaded"
 msgstr "rotinas de soquete não podem ser carregadas"
 
-#: src/main/logic.c:70
-msgid "binary operations require two arguments"
-msgstr "operações binárias requerem dois argumentos"
-
-#: src/main/logic.c:88 src/main/logic.c:150
+#: src/main/logic.c:80 src/main/logic.c:142
 msgid "operations are possible only for numeric, logical or complex types"
 msgstr ""
 "operações são possíveis somente para tipos numéricos, lógicos ou complexos"
 
-#: src/main/logic.c:98
+#: src/main/logic.c:90
 msgid "binary operation on non-conformable arrays"
 msgstr "operação binária em array de dimensão incompatível"
 
-#: src/main/logic.c:124 src/main/relop.c:247
+#: src/main/logic.c:116 src/main/relop.c:241
 msgid "non-conformable time series"
 msgstr "série temporal não compatível"
 
-#: src/main/logic.c:254
+#: src/main/logic.c:247
 #, c-format
 msgid "'%s' operator requires 2 arguments"
 msgstr "operador '%s' requer 2 argumentos"
 
-#: src/main/logic.c:261
+#: src/main/logic.c:254
 #, c-format
 msgid "invalid 'x' type in 'x %s y'"
 msgstr "tipo de 'x' inválido em 'x %s y'"
 
-#: src/main/logic.c:268
+#: src/main/logic.c:261
 #, c-format
 msgid "invalid 'y' type in 'x %s y'"
 msgstr "tipo de 'y' inválido em 'x %s y'"
 
-#: src/main/logic.c:341
+#: src/main/logic.c:334
 msgid "Unary operator `!' called with two arguments"
 msgstr "Operador unário `!' chamado com dois argumentos"
 
-#: src/main/logic.c:448
+#: src/main/logic.c:439
 #, c-format
 msgid "coercing argument of type '%s' to logical"
 msgstr "coerção de argumento de tipo '%s' para lógico"
@@ -4110,65 +4185,79 @@ msgstr "coerção de argumento de tipo '%s' para lógico"
 msgid "dummy - do not translate"
 msgstr "dummy"
 
-#: src/main/main.c:476
+#: src/main/main.c:329
+#, fuzzy
+msgid "error during cleanup\n"
+msgstr "Erros durante o embrulho: "
+
+#: src/main/main.c:336
+msgid "Execution halted\n"
+msgstr "Execução interrompida\n"
+
+#: src/main/main.c:505
 msgid "Error: segfault from C stack overflow\n"
 msgstr "Erro: falha de segmentação na pilha C\n"
 
-#: src/main/main.c:846
+#: src/main/main.c:888
 msgid "unable to open the base package\n"
 msgstr "não foi possível abrir o pacote base\n"
 
-#: src/main/main.c:924
+#: src/main/main.c:971
 #, fuzzy, c-format
 msgid "unable to restore saved data in %s\n"
 msgstr "não foi possível restaurar os dados presentes em .RData\n"
 
-#: src/main/main.c:971
+#: src/main/main.c:1020
 msgid "During startup - "
 msgstr "Durante a inicialização - "
 
-#: src/main/main.c:1224
+#: src/main/main.c:1036
+#, fuzzy
+msgid "unable to initialize the JIT\n"
+msgstr "não foi possível abrir o arquivo para leitura"
+
+#: src/main/main.c:1290
 msgid "cannot quit from browser"
 msgstr "não é possível sair do navegador"
 
-#: src/main/main.c:1228
+#: src/main/main.c:1294
 msgid "one of \"yes\", \"no\", \"ask\" or \"default\" expected."
 msgstr ""
 "uma das respostas a seguir esperada: \"yes\", \"no\", \"ask\" ou \"default\""
 
-#: src/main/main.c:1233
+#: src/main/main.c:1299
 msgid "save=\"ask\" in non-interactive use: command-line default will be used"
 msgstr ""
 "save=\"ask\" em uso não-interativo: padrão da linha de comando será utilizado"
 
-#: src/main/main.c:1241
+#: src/main/main.c:1307
 msgid "unrecognized value of 'save'"
 msgstr "valor de 'save' não reconhecido"
 
-#: src/main/main.c:1244
+#: src/main/main.c:1310
 msgid "invalid 'status', 0 assumed"
 msgstr "'status' inválido, suposto 0"
 
-#: src/main/main.c:1249
+#: src/main/main.c:1315
 msgid "invalid 'runLast', FALSE assumed"
 msgstr "'runLast' inválido, suposto FALSE"
 
-#: src/main/main.c:1280
+#: src/main/main.c:1346
 msgid "cannot allocate space for toplevel callback element"
 msgstr ""
 "não foi possível alocar espaço para elemento do retorno de chamada de nível "
 "superior"
 
-#: src/main/main.c:1358
+#: src/main/main.c:1424
 msgid "negative index passed to R_removeTaskCallbackByIndex"
 msgstr "índice negativo passado para R_removeTaskCallbackByIndex"
 
-#: src/main/main.c:1468
+#: src/main/main.c:1534
 #, c-format
 msgid "warning messages from top-level task callback '%s'\n"
 msgstr "mensagens de aviso da chamada de tarefa de nível superior '%s'\n"
 
-#: src/main/main.c:1524
+#: src/main/main.c:1591
 msgid "top-level task callback did not return a logical value"
 msgstr "chamada de tarefa de nível superior não retornou um valor lógico"
 
@@ -4188,202 +4277,211 @@ msgstr "argumento longo não é múltiplo do comprimento do curto"
 msgid "invalid partial string match"
 msgstr "correspondência parcial de string inválida"
 
-#: src/main/match.c:228 src/main/match.c:268 src/main/objects.c:56
-#: src/main/objects.c:66
+#: src/main/match.c:228 src/main/match.c:266 src/main/objects.c:49
+#: src/main/objects.c:59
 #, c-format
 msgid "formal argument \"%s\" matched by multiple actual arguments"
 msgstr ""
 "argumento formal \"%s\" corresponde a múltiplos argumentos especificados"
 
-#: src/main/match.c:231 src/main/match.c:266
+#: src/main/match.c:231 src/main/match.c:264
 #, c-format
 msgid "argument %d matches multiple formal arguments"
 msgstr "argumento %d corresponde a múltiplos argumentos formais"
 
-#: src/main/match.c:272
+#: src/main/match.c:270
 #, c-format
 msgid "partial argument match of '%s' to '%s'"
 msgstr "correspondência parcial de argumento de '%s' para '%s'"
 
-#: src/main/match.c:383
+#: src/main/match.c:380
 #, fuzzy, c-format
 msgid "unused argument %s"
 msgid_plural "unused arguments %s"
 msgstr[0] "argumento(s) não utilizado(s) %s"
 msgstr[1] "argumento(s) não utilizado(s) %s"
 
-#: src/main/memory.c:1232
+#: src/main/memory.c:1234
 msgid "can only weakly reference/finalize reference objects"
 msgstr ""
 "só é possível referenciar/finalizar objetos de referência de forma fraca"
 
-#: src/main/memory.c:1266
+#: src/main/memory.c:1268
 msgid "finalizer must be a function or NULL"
 msgstr "finalizador deve ser uma função ou NULL"
 
-#: src/main/memory.c:1322 src/main/memory.c:1330 src/main/memory.c:1341
+#: src/main/memory.c:1324 src/main/memory.c:1332 src/main/memory.c:1343
 msgid "not a weak reference"
 msgstr "não é uma referência fraca"
 
-#: src/main/memory.c:1472
+#: src/main/memory.c:1474
 msgid "first argument must be environment or external pointer"
 msgstr "primeiro argumento deve ser um ambiente ou ponteiro externo"
 
-#: src/main/memory.c:1474
+#: src/main/memory.c:1476
 msgid "second argument must be a function"
 msgstr "segundo argumento deve ser uma função"
 
-#: src/main/memory.c:1478
+#: src/main/memory.c:1480
 msgid "third argument must be 'TRUE' or 'FALSE'"
 msgstr "terceiro argumento deve ser 'TRUE' ou 'FALSE'"
 
-#: src/main/memory.c:1970
+#: src/main/memory.c:1979
 msgid "vector memory exhausted (limit reached?)"
 msgstr "memória vetorial esgotada (limite atingido?)"
 
-#: src/main/memory.c:1976
+#: src/main/memory.c:1985
 msgid "cons memory exhausted (limit reached?)"
 msgstr "memória do tipo cons esgotada (limite atingido?)"
 
-#: src/main/memory.c:1981
+#: src/main/memory.c:1990
 msgid "memory exhausted (limit reached?)"
 msgstr "memória esgotada (limite atingido?)"
 
-#: src/main/memory.c:2116
+#: src/main/memory.c:2126
 #, fuzzy, c-format
 msgid "cannot allocate memory block of size %0.f Tb"
 msgstr "não foi possível alocar um bloco de memória de tamanho %0.1f Gb"
 
-#: src/main/memory.c:2121
+#: src/main/memory.c:2131
 #, c-format
 msgid "cannot allocate memory block of size %0.1f Gb"
 msgstr "não foi possível alocar um bloco de memória de tamanho %0.1f Gb"
 
-#: src/main/memory.c:2442
+#: src/main/memory.c:2458
 #, fuzzy
 msgid "vector is too large"
 msgstr "tamanho de vetor especificado é muito grande"
 
-#: src/main/memory.c:2445
+#: src/main/memory.c:2461
 msgid "negative length vectors are not allowed"
 msgstr "vetores de comprimento negativo não são permitidos"
 
-#: src/main/memory.c:2471 src/main/memory.c:2484 src/main/memory.c:2497
-#: src/main/memory.c:2512
+#: src/main/memory.c:2487 src/main/memory.c:2500 src/main/memory.c:2513
+#: src/main/memory.c:2528
 #, c-format
 msgid "cannot allocate vector of length %d"
 msgstr "não foi possível alocar vetor de comprimento %d"
 
-#: src/main/memory.c:2533
+#: src/main/memory.c:2549
 #, c-format
 msgid "invalid type/length (%s/%d) in vector allocation"
 msgstr "tipo/comprimento inválido (%s/%d) na alocação de vetor"
 
-#: src/main/memory.c:2636
+#: src/main/memory.c:2648
 #, c-format
 msgid "cannot allocate vector of size %0.1f Gb"
 msgstr "não é possível alocar vetor de tamanho %0.1f Gb"
 
-#: src/main/memory.c:2640
+#: src/main/memory.c:2652
 #, c-format
 msgid "cannot allocate vector of size %0.1f Mb"
 msgstr "não é possível alocar vetor de tamanho %0.1f Mb"
 
-#: src/main/memory.c:2644
+#: src/main/memory.c:2656
 #, c-format
 msgid "cannot allocate vector of size %0.f Kb"
 msgstr "não é possível alocar vetor de tamanho %0.f Kb"
 
-#: src/main/memory.c:3001
+#: src/main/memory.c:3071
 msgid "protect(): protection stack overflow"
 msgstr "protect(): estouro da proteção de pilha"
 
-#: src/main/memory.c:3008
-#, c-format
-msgid "unprotect(): only %d protected items"
-msgstr "unprotect(): somente %d itens protegidos"
+#: src/main/memory.c:3078
+#, fuzzy, c-format
+msgid "unprotect(): only %d protected item"
+msgid_plural "unprotect(): only %d protected items"
+msgstr[0] "unprotect(): somente %d itens protegidos"
+msgstr[1] "unprotect(): somente %d itens protegidos"
 
-#: src/main/memory.c:3041
+#: src/main/memory.c:3113
 msgid "unprotect_ptr: pointer not found"
 msgstr "unprotect_ptr: ponteiro não encontrado"
 
-#: src/main/memory.c:3079
+#: src/main/memory.c:3151
 #, fuzzy, c-format
-msgid "R_Reprotect: only %d protected items, can't reprotect index %d"
-msgstr "unprotect(): somente %d itens protegidos"
+msgid "R_Reprotect: only %d protected item, can't reprotect index %d"
+msgid_plural "R_Reprotect: only %d protected items, can't reprotect index %d"
+msgstr[0] "unprotect(): somente %d itens protegidos"
+msgstr[1] "unprotect(): somente %d itens protegidos"
 
-#: src/main/memory.c:3129
+#: src/main/memory.c:3203
 #, fuzzy, c-format
 msgid "'Calloc' could not allocate memory (%.0f of %u bytes)"
 msgstr "Calloc não pôde alocar memória (%.0f de %u bytes)"
 
-#: src/main/memory.c:3140
+#: src/main/memory.c:3214
 #, fuzzy, c-format
 msgid "'Realloc' could not re-allocate memory (%.0f bytes)"
 msgstr "Realloc não pôde re-alocar memória (%.0f bytes)"
 
-#: src/main/memory.c:3380
+#: src/main/memory.c:3460
 msgid "not safe to return vector pointer"
 msgstr "não é seguro retornar um ponteiro de vetor"
 
-#: src/main/memory.c:3392
+#: src/main/memory.c:3471
 #, c-format
 msgid "attempt to set index %lu/%lu in SET_STRING_ELT"
 msgstr ""
 
-#: src/main/memory.c:3408
+#: src/main/memory.c:3487
 #, c-format
 msgid "attempt to set index %lu/%lu in SET_VECTOR_ELT"
 msgstr ""
 
-#: src/main/memory.c:3658
+#: src/main/memory.c:3514 src/main/memory.c:3524 src/main/memory.c:3536
+#: src/main/memory.c:3550 src/main/memory.c:3565 src/main/memory.c:3583
+msgid "bad value"
+msgstr "valor inválido"
+
+#: src/main/memory.c:3746
 msgid "memory profiling is not available on this system"
 msgstr "avaliação do perfil de memória não está disponível nesse sistema"
 
-#: src/main/memory.c:3723
+#: src/main/memory.c:3810
 #, c-format
 msgid "Rprofmem: cannot open output file '%s'"
 msgstr "Rprofmem: não é possível abrir o arquivo de perfil '%s'"
 
-#: src/main/memory.c:3830
+#: src/main/memory.c:3915
 #, c-format
 msgid "long vectors not supported yet: %s:%d"
 msgstr ""
 
-#: src/main/names.c:996
+#: src/main/names.c:1021
 msgid "string argument required"
 msgstr "argumento string requerido"
 
-#: src/main/names.c:999
+#: src/main/names.c:1024
 msgid "no such primitive function"
 msgstr "não existe tal função primitiva"
 
-#: src/main/names.c:1146
+#: src/main/names.c:1212 src/main/names.c:1242
 msgid "attempt to use zero-length variable name"
 msgstr "tentativa de usar um nome de variável com comprimento zero"
 
-#: src/main/names.c:1148
+#: src/main/names.c:1214 src/main/names.c:1244
 #, c-format
 msgid "variable names are limited to %d bytes"
 msgstr "nomes de variáveis são limitados a %d bytes"
 
-#: src/main/names.c:1176 src/main/names.c:1179
+#: src/main/names.c:1307 src/main/names.c:1310
 msgid "invalid .Internal() argument"
 msgstr "argumento .Internal() inválido"
 
-#: src/main/objects.c:46
+#: src/main/objects.c:39
 msgid "generic 'function' is not a function"
 msgstr "'função' genérica não é uma função"
 
-#: src/main/objects.c:201
+#: src/main/objects.c:193
 msgid "bad generic call environment"
 msgstr "ambiente de chamada genérico defeituoso"
 
-#: src/main/objects.c:207
+#: src/main/objects.c:201
 msgid "bad generic definition environment"
 msgstr "ambiente de definição genérico defeituoso"
 
-#: src/main/objects.c:246
+#: src/main/objects.c:249
 #, fuzzy
 msgid ""
 "no '.S3MethodsClass' table, cannot use S4 objects with S3 methods ('methods' "
@@ -4392,142 +4490,123 @@ msgstr ""
 "Nenhuma tabela de S3MethodsClass, não é possível usar objetos S4 com métodos "
 "S3 (pacote methods não está carregado?)"
 
-#: src/main/objects.c:270 src/main/objects.c:411
-msgid "'UseMethod' used in an inappropriate fashion"
-msgstr "'UseMethod' usado de uma maneira inapropriada"
-
-#: src/main/objects.c:290
-#, fuzzy
-msgid "invalid generic function in 'usemethod'"
-msgstr "Função genérica inválida em 'usemethod'"
-
-#: src/main/objects.c:399
+#: src/main/objects.c:415
 msgid "there must be a 'generic' argument"
 msgstr "deve haver um argumento 'generic'"
 
-#: src/main/objects.c:403
+#: src/main/objects.c:419
 msgid "'generic' argument must be a character string"
 msgstr "argumento 'generic' deve ser uma cadeia de caracteres"
 
-#: src/main/objects.c:440
-#, fuzzy
-msgid "'UseMethod' called from outside a function"
-msgstr "'NextMethod' chamado fora de uma função"
-
-#: src/main/objects.c:447
-msgid "first argument must be a generic name"
-msgstr "primeiro argumento deve ser um nome genérico"
+#: src/main/objects.c:427
+msgid "'UseMethod' used in an inappropriate fashion"
+msgstr "'UseMethod' usado de uma maneira inapropriada"
 
 #: src/main/objects.c:472
 #, c-format
 msgid "no applicable method for '%s' applied to an object of class \"%s\""
 msgstr "método não aplicável para '%s' aplicado a um objeto de classe \"%s\""
 
-#: src/main/objects.c:533
+#: src/main/objects.c:582
 msgid "'NextMethod' called from outside a function"
 msgstr "'NextMethod' chamado fora de uma função"
 
-#: src/main/objects.c:539
+#: src/main/objects.c:588
 msgid "'NextMethod' called from an anonymous function"
 msgstr "'NextMethod' chamado a partir de uma função anônima"
 
-#: src/main/objects.c:563
+#: src/main/objects.c:609
 msgid "no calling generic was found: was a method called directly?"
 msgstr ""
 "nenhuma chamada genérica foi encontrada: um método foi chamado diretamente?"
 
-#: src/main/objects.c:566
+#: src/main/objects.c:612
 #, c-format
 msgid "'function' is not a function, but of type %d"
 msgstr "'function' não é uma função, mas do tipo %d"
 
-#: src/main/objects.c:640
+#: src/main/objects.c:639
 msgid "wrong argument ..."
 msgstr "argumento ... errado"
 
-#: src/main/objects.c:653
+#: src/main/objects.c:651
 msgid "object not specified"
 msgstr "objeto não especificado"
 
-#: src/main/objects.c:663 src/main/objects.c:670
+#: src/main/objects.c:659 src/main/objects.c:666
 msgid "generic function not specified"
 msgstr "função genérica não especificada"
 
-#: src/main/objects.c:667
+#: src/main/objects.c:663
 #, fuzzy
 msgid "invalid generic argument to 'NextMethod'"
 msgstr "argumento genérico inválido para NextMethod"
 
-#: src/main/objects.c:680
+#: src/main/objects.c:675
 #, fuzzy
 msgid "invalid 'group' argument found in 'NextMethod'"
 msgstr "argumento 'group' inválido em NextMethod"
 
-#: src/main/objects.c:699
+#: src/main/objects.c:692
 msgid "wrong value for .Method"
 msgstr "valor errado para .Method"
 
-#: src/main/objects.c:703 src/main/objects.c:712
-#, c-format
-msgid "method name too long in '%s'"
-msgstr "nome do método muito longo em '%s'"
-
-#: src/main/objects.c:715
+#: src/main/objects.c:702
 msgid "Incompatible methods ignored"
 msgstr "Métodos incompatíveis ignorados"
 
-#: src/main/objects.c:775 src/main/objects.c:780
+#: src/main/objects.c:759 src/main/objects.c:766
 msgid "no method to invoke"
 msgstr "nenhum método para invocar"
 
-#: src/main/objects.c:832
+#: src/main/objects.c:817
 msgid "cannot unclass an environment"
 msgstr "não é possível remover a classe de um ambiente"
 
-#: src/main/objects.c:835
+#: src/main/objects.c:820
 msgid "cannot unclass an external pointer"
 msgstr "não é possível remover a classe de um ponteiro externo"
 
-#: src/main/objects.c:872
+#: src/main/objects.c:856
 msgid "'what' must be a character vector"
 msgstr "'what' deve ser um vetor de caracteres"
 
-#: src/main/objects.c:876
+#: src/main/objects.c:860
 msgid "'which' must be a length 1 logical vector"
 msgstr "'which' deve ser um vetor lógico de comprimento 1"
 
-#: src/main/objects.c:882
+#: src/main/objects.c:866
 msgid "use 'is()' instead of 'inherits()' on S4 objects"
 msgstr "use 'is()' ao invés de 'inherits()' em objetos S4"
 
-#: src/main/objects.c:1012
+#: src/main/objects.c:995
 msgid "could not find correct environment; please report!"
 msgstr ""
 
-#: src/main/objects.c:1052
+#: src/main/objects.c:1039
 #, fuzzy
 msgid "'onOff' must be TRUE or FALSE"
 msgstr "'all.x' deve ser TRUE ou FALSE"
 
-#: src/main/objects.c:1119
+#: src/main/objects.c:1104
 #, c-format
 msgid "unable to find a non-generic version of function \"%s\""
 msgstr "impossível encontrar uma versão não genérica da função \"%s\""
 
-#: src/main/objects.c:1151
+#: src/main/objects.c:1136
 #, fuzzy
 msgid ""
 "'standardGeneric' called without 'methods' dispatch enabled (will be ignored)"
 msgstr ""
 "standardGeneric chamada sem métodos de despacho habilitados (será ignorada)"
 
-#: src/main/objects.c:1160
+#: src/main/objects.c:1145
 #, fuzzy
 msgid "argument to 'standardGeneric' must be a non-empty character string"
 msgstr ""
 "argumento para standardGeneric deve ser uma string de caracteres não vazia"
 
-#: src/main/objects.c:1165
+#: src/main/objects.c:1150
 #, c-format
 msgid ""
 "call to standardGeneric(\"%s\") apparently not from the body of that generic "
@@ -4536,11 +4615,7 @@ msgstr ""
 "chamada de standardGeneric(\"%s\") aparentemente não originada do corpo de "
 "uma função genérica"
 
-#: src/main/objects.c:1189
-msgid "argument 'code' must be a character string"
-msgstr "argumento 'code' deve ser uma string de caracteres"
-
-#: src/main/objects.c:1257
+#: src/main/objects.c:1249
 #, c-format
 msgid ""
 "invalid primitive methods code (\"%s\"): should be \"clear\", \"reset\", "
@@ -4549,11 +4624,11 @@ msgstr ""
 "código de métodos primitivos inválido (\"%s\"): deve ser \"clear\", \"reset"
 "\", \"set\", ou \"suppress\""
 
-#: src/main/objects.c:1265
+#: src/main/objects.c:1257
 msgid "invalid object: must be a primitive function"
 msgstr "objeto inválido: deve ser uma função primitiva"
 
-#: src/main/objects.c:1312
+#: src/main/objects.c:1304
 #, c-format
 msgid ""
 "the formal definition of a primitive generic must be a function object (got "
@@ -4562,20 +4637,20 @@ msgstr ""
 "a definição formal de uma genérica primitiva deve ser um objeto do tipo "
 "função (tipo %s obtido)"
 
-#: src/main/objects.c:1342
+#: src/main/objects.c:1334
 #, fuzzy, c-format
 msgid "object returned as generic function \"%s\" does not appear to be one"
 msgstr "objeto \"%s\", retornado como função genérica, não parece ser tal"
 
-#: src/main/objects.c:1444
+#: src/main/objects.c:1439
 msgid "invalid primitive operation given for dispatch"
 msgstr "operação primitiva inválida para despacho"
 
-#: src/main/objects.c:1470 src/main/objects.c:1489
+#: src/main/objects.c:1468 src/main/objects.c:1487
 msgid "dispatch error"
 msgstr "erro de despacho"
 
-#: src/main/objects.c:1483
+#: src/main/objects.c:1481
 #, c-format
 msgid ""
 "primitive function \"%s\" has been set for methods but no generic function "
@@ -4584,81 +4659,91 @@ msgstr ""
 "função primitiva \"%s\" foi especificada para métodos mas nenhuma função "
 "genérica foi fornecida"
 
-#: src/main/objects.c:1508
+#: src/main/objects.c:1506
 msgid "C level MAKE_CLASS macro called with NULL string pointer"
 msgstr "macro MAKE_CLASS em C foi chamada com um ponteiro NULL para string"
 
-#: src/main/objects.c:1524
+#: src/main/objects.c:1522
+#, fuzzy
+msgid "'methods' package not yet loaded"
+msgstr "fontes Hershey não podem ser carregadas"
+
+#: src/main/objects.c:1532
 msgid "R_getClassDef(.) called with NULL string pointer"
 msgstr "R_getClassDef(.) chamada com pointeiro NULL para string"
 
-#: src/main/objects.c:1546
+#: src/main/objects.c:1577
 msgid "C level NEW macro called with null class definition pointer"
 msgstr "macro NEW em C foi chamada com um ponteiro de definição de classe nulo"
 
-#: src/main/objects.c:1550
+#: src/main/objects.c:1581
 #, c-format
 msgid "trying to generate an object from a virtual class (\"%s\")"
 msgstr "tentando gerar um objeto a partir de uma classe virtual (\"%s\")"
 
-#: src/main/objects.c:1627
+#: src/main/objects.c:1663
 #, fuzzy, c-format
 msgid "object of class \"%s\" does not correspond to a valid S3 object"
 msgstr "Objeto de classe \"%s\" não corresponde a um objeto S3 válido"
 
-#: src/main/options.c:120 src/main/options.c:180
+#: src/main/options.c:121 src/main/options.c:182
 msgid "corrupted options list"
 msgstr "lista de opções corrompida"
 
-#: src/main/options.c:130
+#: src/main/options.c:131
 msgid "invalid printing width, used 80"
 msgstr "largura de impressão inválida, usando 80"
 
-#: src/main/options.c:141
+#: src/main/options.c:142
 msgid "invalid printing digits, used 7"
 msgstr "dígitos para impressão inválidos, usando 7"
 
-#: src/main/options.c:153
+#: src/main/options.c:154
 msgid "invalid 'deparse.cutoff', used 60"
 msgstr ""
 
-#: src/main/options.c:165
+#: src/main/options.c:166
 msgid "invalid value for \"device.ask.default\", using FALSE"
 msgstr "valor inválido para \"device.ask.default\", usando FALSE"
 
-#: src/main/options.c:401
+#: src/main/options.c:416
 msgid "list argument has no valid names"
 msgstr "lista de argumentos não têm nomes válidos"
 
-#: src/main/options.c:429
+#: src/main/options.c:445
 #, c-format
 msgid "invalid 'width' parameter, allowed %d...%d"
 msgstr "parâmetro 'width' inválido, permitido %d... %d"
 
-#: src/main/options.c:440
+#: src/main/options.c:456
 #, c-format
 msgid "invalid 'digits' parameter, allowed %d...%d"
 msgstr "parâmetro 'digits' inválido, permitido %d... %d"
 
-#: src/main/options.c:447
+#: src/main/options.c:463
 #, c-format
 msgid "'expressions' parameter invalid, allowed %d...%d"
 msgstr "parâmetro 'expressions' inválido, permitido %d... %d"
 
-#: src/main/options.c:454 src/main/options.c:462 src/main/options.c:468
-#: src/main/options.c:476 src/main/options.c:483 src/main/options.c:488
-#: src/main/options.c:495 src/main/options.c:501 src/main/options.c:507
-#: src/main/options.c:512 src/main/options.c:517 src/main/options.c:526
-#: src/main/options.c:532 src/main/options.c:538 src/main/options.c:549
-#: src/main/options.c:556 src/main/options.c:562 src/main/options.c:570
-#: src/main/options.c:577 src/main/options.c:584 src/main/options.c:591
-#: src/main/options.c:598 src/main/options.c:606 src/main/options.c:615
-#: src/main/options.c:618 src/main/options.c:624
+#: src/main/options.c:470 src/main/options.c:478 src/main/options.c:484
+#: src/main/options.c:492 src/main/options.c:499 src/main/options.c:504
+#: src/main/options.c:511 src/main/options.c:517 src/main/options.c:523
+#: src/main/options.c:528 src/main/options.c:533 src/main/options.c:542
+#: src/main/options.c:548 src/main/options.c:554 src/main/options.c:564
+#: src/main/options.c:578 src/main/options.c:584 src/main/options.c:592
+#: src/main/options.c:599 src/main/options.c:606 src/main/options.c:613
+#: src/main/options.c:620 src/main/options.c:628 src/main/options.c:637
+#: src/main/options.c:640 src/main/options.c:646
 #, c-format
 msgid "invalid value for '%s'"
 msgstr "valor inválido para '%s'"
 
-#: src/main/options.c:611 src/main/options.c:640
+#: src/main/options.c:569
+#, fuzzy
+msgid "'OutDec' must be a string of one character"
+msgstr "'dec' deve ser um único caractere"
+
+#: src/main/options.c:633 src/main/options.c:662
 msgid "\"par.ask.default\" has been replaced by \"device.ask.default\""
 msgstr "\"par.ask.default\" foi substituído por \"device.ask.default\""
 
@@ -4679,15 +4764,20 @@ msgstr ""
 msgid "non-string argument to Internal paste"
 msgstr "argumento diferente de string para paste interno"
 
-#: src/main/paste.c:390
+#: src/main/paste.c:387
 msgid "first argument must be atomic"
 msgstr "primeiro argumento deve ser atômico"
 
-#: src/main/paste.c:560
+#: src/main/paste.c:448
+#, fuzzy
+msgid "'decimal.mark' must be a string of one character"
+msgstr "'dec' deve ser um único caractere"
+
+#: src/main/paste.c:579
 msgid "Impossible mode ( x )"
 msgstr "Modo impossível ( x )"
 
-#: src/main/paste.c:645
+#: src/main/paste.c:663
 msgid "atomic vector arguments only"
 msgstr "somente argumentos vetoriais atômicos permitidos"
 
@@ -4695,219 +4785,201 @@ msgstr "somente argumentos vetoriais atômicos permitidos"
 msgid "invalid filename specification"
 msgstr "especificação de nome de arquivo inválido"
 
-#: src/main/platform.c:375 src/main/platform.c:419
+#: src/main/platform.c:375 src/main/platform.c:420
 msgid "write error during file append"
 msgstr "erro na escrita durante acréscimo a arquivo"
 
-#: src/main/platform.c:394
+#: src/main/platform.c:395
 msgid "nothing to append to"
 msgstr "nada para acrescentar"
 
-#: src/main/platform.c:448 src/main/platform.c:795
+#: src/main/platform.c:449 src/main/platform.c:797 src/main/platform.c:979
 msgid "invalid filename argument"
 msgstr "argumento nome de arquivo inválido"
 
-#: src/main/platform.c:460
+#: src/main/platform.c:461
 #, c-format
 msgid "cannot create file '%s', reason '%s'"
 msgstr "não foi possível criar arquivo '%s', motivo '%s'"
 
-#: src/main/platform.c:475 src/main/platform.c:545 src/main/platform.c:627
+#: src/main/platform.c:476 src/main/platform.c:546 src/main/platform.c:629
 msgid "invalid first filename"
 msgstr "primeiro nome de arquivo inválido"
 
-#: src/main/platform.c:487
+#: src/main/platform.c:488
 #, c-format
 msgid "cannot remove file '%s', reason '%s'"
 msgstr "não foi possível remover o arquivo '%s', motivo '%s'"
 
-#: src/main/platform.c:547 src/main/platform.c:629
+#: src/main/platform.c:548 src/main/platform.c:631
 msgid "invalid second filename"
 msgstr "segundo nome de arquivo inválido"
 
-#: src/main/platform.c:549 src/main/platform.c:631
+#: src/main/platform.c:551 src/main/platform.c:634
 msgid "nothing to link"
 msgstr "nada para vincular"
 
-#: src/main/platform.c:559
+#: src/main/platform.c:561
 #, fuzzy
 msgid "symbolic links are not supported on this version of Windows"
 msgstr "links simbólicos não são suportados nessa plataforma"
 
-#: src/main/platform.c:581
+#: src/main/platform.c:583
 #, fuzzy, c-format
 msgid "cannot symlink '%ls' to '%ls', reason '%s'"
 msgstr "não foi possível criar o link simbólico de '%s' para '%s', motivo '%s'"
 
-#: src/main/platform.c:601
+#: src/main/platform.c:603
 #, c-format
 msgid "cannot symlink '%s' to '%s', reason '%s'"
 msgstr "não foi possível criar o link simbólico de '%s' para '%s', motivo '%s'"
 
-#: src/main/platform.c:609
+#: src/main/platform.c:611
 #, fuzzy
 msgid "symbolic links are not supported on this platform"
 msgstr "links simbólicos não são suportados nessa plataforma"
 
-#: src/main/platform.c:649
+#: src/main/platform.c:652
 #, c-format
 msgid "cannot link '%ls' to '%ls', reason '%s'"
 msgstr "não foi possível criar o link de '%ls' para '%ls', motivo '%s'"
 
-#: src/main/platform.c:669
+#: src/main/platform.c:672
 #, fuzzy, c-format
 msgid "cannot link '%s' to '%s', reason '%s'"
 msgstr "não foi possível criar o link simbólico de '%s' para '%s', motivo '%s'"
 
-#: src/main/platform.c:678
+#: src/main/platform.c:681
 #, fuzzy
 msgid "(hard) links are not supported on this platform"
 msgstr "links simbólicos não são suportados nessa plataforma"
 
-#: src/main/platform.c:709
+#: src/main/platform.c:713
 msgid "'from' and 'to' are of different lengths"
 msgstr ""
 
-#: src/main/platform.c:720 src/main/platform.c:730
+#: src/main/platform.c:724 src/main/platform.c:734
 #, fuzzy
 msgid "expanded 'from' name too long"
 msgstr "nome da origem extendido muito longo"
 
-#: src/main/platform.c:724 src/main/platform.c:734
+#: src/main/platform.c:728 src/main/platform.c:738
 #, fuzzy
 msgid "expanded 'to' name too long"
 msgstr "nome da origem extendido muito longo"
 
-#: src/main/platform.c:738
+#: src/main/platform.c:742
 #, c-format
 msgid "cannot rename file '%s' to '%s', reason '%s'"
 msgstr "não foi possível renomear o arquivo '%s' para '%s', motivo '%s'"
 
-#: src/main/platform.c:1094
+#: src/main/platform.c:1168
 msgid "invalid 'pattern' regular expression"
 msgstr "expressão regular inválida em 'pattern'"
 
-#: src/main/platform.c:1211
+#: src/main/platform.c:1285
 msgid "unable to determine R home location"
 msgstr "não foi possível determinar a localização do diretório inicial do R"
 
-#: src/main/platform.c:1263
+#: src/main/platform.c:1338
 msgid "file name too long"
 msgstr "nome de arquivo muito longo"
 
-#: src/main/platform.c:1511 src/main/platform.c:1558 src/main/sysutils.c:1850
-#: src/main/sysutils.c:1864
+#: src/main/platform.c:1586 src/main/platform.c:1633 src/main/sysutils.c:1806
+#: src/main/sysutils.c:1820
 msgid "internal out-of-memory condition"
 msgstr "condição de falta de memória interna"
 
-#: src/main/platform.c:1554 src/main/sysutils.c:1860
+#: src/main/platform.c:1629 src/main/sysutils.c:1816
 #, c-format
 msgid "read error on '%s'"
 msgstr "erro de leitura em '%s'"
 
-#: src/main/platform.c:1722
+#: src/main/platform.c:1728
 msgid "setting 'LC_NUMERIC' may cause R to function strangely"
 msgstr "espeficação de 'LC_NUMERIC' pode fazer o R funcionar de forma estranha"
 
-#: src/main/platform.c:1736
+#: src/main/platform.c:1742
 msgid "LC_MESSAGES exists on Windows but is not operational"
 msgstr ""
 
-#: src/main/platform.c:1763
+#: src/main/platform.c:1769
 #, c-format
 msgid "OS reports request to set locale to \"%s\" cannot be honored"
 msgstr ""
 "SO informa que a requisição para definir o locale como '%s' não pode ser "
 "honrada"
 
-#: src/main/platform.c:2065
-msgid "'hostname' must be a character vector of length 1"
-msgstr "'hostname' deve ser um vetor de caracteres de comprimento 1"
-
-#: src/main/platform.c:2071
-#, c-format
-msgid "nsl() was unable to resolve host '%s'"
-msgstr "resolução de máquina '%s' impossível em nsl()"
-
-#: src/main/platform.c:2078
-#, fuzzy
-msgid "unknown format returned by C function 'gethostbyname'"
-msgstr "formato desconhecido retornado por gethostbyname"
-
-#: src/main/platform.c:2087
-msgid "nsl() is not supported on this platform"
-msgstr "nsl() não é suportado nessa plataforma"
-
-#: src/main/platform.c:2158
+#: src/main/platform.c:2131
 #, c-format
 msgid "'%s' already exists"
 msgstr "'%s' já existe"
 
-#: src/main/platform.c:2161
+#: src/main/platform.c:2134
 #, c-format
 msgid "cannot create dir '%s', reason '%s'"
 msgstr "não foi possível criar o diretório '%s', motivo '%s'"
 
-#: src/main/platform.c:2207
+#: src/main/platform.c:2181
 #, c-format
 msgid "'%ls' already exists"
 msgstr "'%ls' já existe"
 
-#: src/main/platform.c:2211
+#: src/main/platform.c:2183 src/main/platform.c:2189
 #, c-format
 msgid "cannot create dir '%ls', reason '%s'"
 msgstr "não foi possível criar o diretório '%ls', motivo '%s'"
 
-#: src/main/platform.c:2245 src/main/platform.c:2449
+#: src/main/platform.c:2223 src/main/platform.c:2435
 msgid "too deep nesting"
 msgstr ""
 
-#: src/main/platform.c:2253 src/main/platform.c:2266 src/main/platform.c:2284
+#: src/main/platform.c:2231 src/main/platform.c:2244 src/main/platform.c:2262
 #, fuzzy
 msgid "over-long path"
 msgstr "padrão de comprimento 0"
 
-#: src/main/platform.c:2273
+#: src/main/platform.c:2251
 #, c-format
 msgid "problem creating directory %ls: %s"
 msgstr ""
 
-#: src/main/platform.c:2293
+#: src/main/platform.c:2271
 #, c-format
 msgid "problem reading dir %ls: %s"
 msgstr ""
 
-#: src/main/platform.c:2304 src/main/platform.c:2465 src/main/platform.c:2478
-#: src/main/platform.c:2498 src/main/platform.c:2520
+#: src/main/platform.c:2282 src/main/platform.c:2451 src/main/platform.c:2464
+#: src/main/platform.c:2484 src/main/platform.c:2506
 #, fuzzy
 msgid "over-long path length"
 msgstr "padrão de comprimento 0"
 
-#: src/main/platform.c:2312
+#: src/main/platform.c:2290
 #, c-format
 msgid "problem copying %ls to %ls: %s"
 msgstr ""
 
-#: src/main/platform.c:2487
+#: src/main/platform.c:2473
 #, c-format
 msgid "problem creating directory %s: %s"
 msgstr ""
 
-#: src/main/platform.c:2507
+#: src/main/platform.c:2493
 #, c-format
 msgid "problem reading directory %s: %s"
 msgstr ""
 
-#: src/main/platform.c:2529
+#: src/main/platform.c:2515
 #, c-format
 msgid "problem copying %s to %s: %s"
 msgstr ""
 
-#: src/main/platform.c:2662
+#: src/main/platform.c:2653
 msgid "'mode' must be of length at least one"
 msgstr "'mode' deve ser de comprimento pelo menos um"
 
-#: src/main/platform.c:2729
+#: src/main/platform.c:2720
 msgid "insufficient OS support on this platform"
 msgstr "suporte do SO insuficiente nesta plataforma"
 
@@ -4928,88 +5000,93 @@ msgstr "todos os valore de z são NA"
 msgid "invalid math style encountered"
 msgstr "estilo math inválido encontrado"
 
-#: src/main/plotmath.c:1261 src/main/plotmath.c:1366 src/main/plotmath.c:2664
+#: src/main/plotmath.c:1260 src/main/plotmath.c:1365 src/main/plotmath.c:2654
 msgid "invalid mathematical annotation"
 msgstr "anotação matemática inválida"
 
-#: src/main/plotmath.c:1670
+#: src/main/plotmath.c:1669
 msgid "invalid accent"
 msgstr "acento inválido"
 
-#: src/main/plotmath.c:1964
+#: src/main/plotmath.c:1963
 msgid "invalid group delimiter"
 msgstr "delimitador de grupo inválido"
 
-#: src/main/plotmath.c:1991 src/main/plotmath.c:2137
+#: src/main/plotmath.c:1990 src/main/plotmath.c:2127
 msgid "invalid group specification"
 msgstr "especificação de grupo inválida"
 
-#: src/main/plotmath.c:2062
+#: src/main/plotmath.c:2052
 msgid "group is incomplete"
 msgstr "grupo incompleto"
 
-#: src/main/plotmath.c:3190
+#: src/main/plotmath.c:3180
 msgid "Metric information not available for this family/device"
 msgstr "Informação métrica não está disponível para esta família/dispositivo"
 
-#: src/main/print.c:148 src/main/print.c:254
+#: src/main/print.c:140 src/main/print.c:247
 msgid "invalid 'na.print' specification"
 msgstr "especificação de 'na.print' inválida"
 
-#: src/main/print.c:157
+#: src/main/print.c:149
 msgid "invalid row labels"
 msgstr "rótulos de linhas inválidos"
 
-#: src/main/print.c:159
+#: src/main/print.c:151
 msgid "invalid column labels"
 msgstr "rótulos de colunas inválidos"
 
-#: src/main/print.c:183
+#: src/main/print.c:176
 msgid "non-function argument to .Internal(print.function(.))"
 msgstr "argumento não função para .Internal(print.function(.))"
 
-#: src/main/print.c:264
+#: src/main/print.c:257
 msgid "'gap' must be non-negative integer"
 msgstr "'gap' deve ser um inteiro não negativo"
 
-#: src/main/print.c:289
+#: src/main/print.c:282
 msgid "invalid 'tryS4' internal argument"
 msgstr "argumento interno 'tryS4' inválido"
 
-#: src/main/print.c:1028
+#: src/main/print.c:851
+#, fuzzy
+msgid "print buffer overflow"
+msgstr "estouro do buffer de entrada na linha %d"
+
+#: src/main/print.c:1043
 #, fuzzy
 msgid "invalid character length in 'dblepr'"
 msgstr "comprimento de caractere inválido em dblepr"
 
-#: src/main/print.c:1046
+#: src/main/print.c:1061
 #, fuzzy
 msgid "invalid character length in 'intpr'"
 msgstr "comprimento de caractere inválido em intpr"
 
-#: src/main/print.c:1065
+#: src/main/print.c:1080
 #, fuzzy
 msgid "invalid character length in 'realpr'"
 msgstr "comprimento de caractere inválido em realpr"
 
-#: src/main/print.c:1075
+#: src/main/print.c:1090
 #, fuzzy
 msgid "memory allocation error in 'realpr'"
 msgstr "erro de alocação de memória em realpr"
 
-#: src/main/print.c:1091
+#: src/main/print.c:1106
 #, c-format
 msgid "BLAS/LAPACK routine '%6s' gave error code %d"
 msgstr "rotina BLAS/LAPACK '%6s' teve um erro de código %d"
 
-#: src/main/printarray.c:453
+#: src/main/printarray.c:332
 msgid "too few row labels"
 msgstr "muitos poucos rótulos de linhas"
 
-#: src/main/printarray.c:455
+#: src/main/printarray.c:334
 msgid "too few column labels"
 msgstr "muitos poucos rótulos de colunas"
 
-#: src/main/printarray.c:489
+#: src/main/printarray.c:368
 #, fuzzy, c-format
 msgid " [ reached getOption(\"max.print\") -- omitted %d row ]\n"
 msgid_plural " [ reached getOption(\"max.print\") -- omitted %d rows ]\n"
@@ -5017,7 +5094,7 @@ msgstr[0] " [ atingido getOption(\"max.print\") -- última linha omitida ]]\n"
 msgstr[1] ""
 " [ atingido getOption(\"max.print\") -- últimas %d linhas omitidas ]]\n"
 
-#: src/main/printutils.c:613
+#: src/main/printutils.c:710
 #, fuzzy
 msgid "it is not known that wchar_t is Unicode on this platform"
 msgstr "nsl() não é suportado nessa plataforma"
@@ -5026,47 +5103,48 @@ msgstr "nsl() não é suportado nessa plataforma"
 msgid "argument is not a numeric vector"
 msgstr "argumento não é um vetor numérico"
 
-#: src/main/random.c:37
+#: src/main/random.c:39
 msgid "invalid arguments"
 msgstr "argumentos inválidos"
 
-#: src/main/random.c:93 src/main/random.c:110 src/main/random.c:175
-#: src/main/random.c:201 src/main/random.c:274 src/main/random.c:288
+#: src/main/random.c:95 src/main/random.c:112 src/main/random.c:178
+#: src/main/random.c:204 src/main/random.c:277 src/main/random.c:291
 msgid "NAs produced"
 msgstr "NAs produzidos"
 
-#: src/main/random.c:445
+#: src/main/random.c:438
 msgid "NA in probability vector"
 msgstr "NA em vetor de probabilidades"
 
-#: src/main/random.c:447
-msgid "non-positive probability"
+#: src/main/random.c:440
+#, fuzzy
+msgid "negative probability"
 msgstr "probabilidade não positiva"
 
-#: src/main/random.c:454
+#: src/main/random.c:447
 msgid "too few positive probabilities"
 msgstr "muito poucas probabilidades positivas"
 
-#: src/main/random.c:491 src/main/random.c:519
+#: src/main/random.c:483 src/main/random.c:511
 msgid "cannot take a sample larger than the population when 'replace = FALSE'"
 msgstr ""
 "impossível tomar uma amostra maior que a população quando 'replace = FALSE'"
 
-#: src/main/random.c:498
+#: src/main/random.c:490
 msgid "incorrect number of probabilities"
 msgstr "número de probabilidades incorreto"
 
-#: src/main/random.c:537
+#: src/main/random.c:529
 #, fuzzy
 msgid "n >= 2^31, replace = FALSE is only supported on 64-bit platforms"
 msgstr "'dirmark = TRUE' não é suportado nessa plataforma"
 
-#: src/main/raw.c:37 src/main/raw.c:273
+#: src/main/raw.c:37 src/main/raw.c:277
 #, fuzzy
 msgid "argument must be a character vector of length 1"
 msgstr "'hostname' deve ser um vetor de caracteres de comprimento 1"
 
-#: src/main/raw.c:39 src/main/raw.c:275
+#: src/main/raw.c:39 src/main/raw.c:279
 #, fuzzy
 msgid ""
 "argument should be a character vector of length 1\n"
@@ -5074,144 +5152,141 @@ msgid ""
 msgstr ""
 "argumento '%s' tem comprimento > 1 e somente o primeiro elemento será usado"
 
-#: src/main/raw.c:53 src/main/raw.c:89 src/main/raw.c:110
+#: src/main/raw.c:53 src/main/raw.c:90 src/main/raw.c:113
 #, fuzzy
 msgid "argument 'x' must be a raw vector"
 msgstr "primeiro argumento deve ser um vetor"
 
-#: src/main/raw.c:56 src/main/raw.c:330
+#: src/main/raw.c:56 src/main/raw.c:336
 #, fuzzy
 msgid "argument 'multiple' must be TRUE or FALSE"
 msgstr "'resize' deve ser TRUE ou FALSE"
 
-#: src/main/raw.c:91
+#: src/main/raw.c:92
 #, fuzzy
 msgid "argument 'shift' must be a small integer"
 msgstr "argumento 'size' deve ser um inteiro positivo"
 
-#: src/main/raw.c:129 src/main/raw.c:327
+#: src/main/raw.c:133 src/main/raw.c:333
 #, fuzzy
 msgid "argument 'x' must be an integer vector"
 msgstr "primeiro argumento deve ser um vetor de caracteres"
 
-#: src/main/raw.c:148
+#: src/main/raw.c:153
 #, fuzzy
 msgid "argument 'x' must be raw, integer or logical"
 msgstr "argumento 'logarithm' deve ser lógico"
 
-#: src/main/raw.c:150
-#, fuzzy
-msgid "argument 'type' must be a character string"
-msgstr "argumento 'code' deve ser uma string de caracteres"
-
-#: src/main/raw.c:154
+#: src/main/raw.c:159
 #, fuzzy, c-format
 msgid "argument 'x' must be a multiple of %d long"
 msgstr "argumento deve ser uma função"
 
-#: src/main/raw.c:167 src/main/raw.c:181
+#: src/main/raw.c:172 src/main/raw.c:186
 #, fuzzy
 msgid "argument 'x' must not contain NAs"
 msgstr "argumento não deve ser uma função"
 
-#: src/main/raw.c:285
+#: src/main/raw.c:291
 #, fuzzy
 msgid "invalid UTF-8 string"
 msgstr "string UTF-8 'old' inválida "
 
-#: src/main/relop.c:202
+#: src/main/relop.c:196
 #, c-format
 msgid "comparison (%d) is possible only for atomic and list types"
 msgstr "comparação (%d) é possível apenas para tipos lista ou atômicos"
 
-#: src/main/relop.c:207
+#: src/main/relop.c:201
 msgid "comparison is not allowed for expressions"
 msgstr "comparação não é permitida para expressões"
 
-#: src/main/relop.c:296
+#: src/main/relop.c:293
 msgid "comparison of these types is not implemented"
 msgstr "comparação desses tipos não está implementada"
 
-#: src/main/relop.c:509
+#: src/main/relop.c:425
 msgid "invalid comparison with complex values"
 msgstr "comparação inválida com valores complexos"
 
-#: src/main/relop.c:767
+#: src/main/relop.c:683
 #, fuzzy
 msgid "'a' and 'b' must have the same type"
 msgstr "'data' deve ser de tipo vetor"
 
-#: src/main/saveload.c:200 src/main/saveload.c:205 src/main/saveload.c:214
-#: src/main/saveload.c:223 src/main/saveload.c:232 src/main/saveload.c:241
-#: src/main/saveload.c:245 src/main/saveload.c:254 src/main/saveload.c:1381
-#: src/main/saveload.c:1386 src/main/saveload.c:1430 src/main/saveload.c:1498
-#: src/main/saveload.c:1507 src/main/serialize.c:331 src/main/serialize.c:338
-#: src/main/serialize.c:2388 src/main/serialize.c:2396
+#: src/main/saveload.c:202 src/main/saveload.c:207 src/main/saveload.c:216
+#: src/main/saveload.c:225 src/main/saveload.c:234 src/main/saveload.c:243
+#: src/main/saveload.c:247 src/main/saveload.c:256 src/main/saveload.c:1383
+#: src/main/saveload.c:1388 src/main/saveload.c:1432 src/main/saveload.c:1500
+#: src/main/saveload.c:1509 src/main/serialize.c:354 src/main/serialize.c:361
+#: src/main/serialize.c:374 src/main/serialize.c:378 src/main/serialize.c:405
+#: src/main/serialize.c:421 src/main/serialize.c:2429
+#: src/main/serialize.c:2437
 msgid "read error"
 msgstr "erro de leitura"
 
-#: src/main/saveload.c:332
+#: src/main/saveload.c:334
 msgid "a I read error occurred"
 msgstr "um erro de leitura I ocorreu"
 
-#: src/main/saveload.c:342
+#: src/main/saveload.c:344
 msgid "a R read error occurred"
 msgstr "um erro de leitura R ocorreu"
 
-#: src/main/saveload.c:352
+#: src/main/saveload.c:354
 msgid "a C read error occurred"
 msgstr "um erro de leitura C ocorreu"
 
-#: src/main/saveload.c:362
+#: src/main/saveload.c:364
 msgid "a S read error occurred"
 msgstr "um erro de leitura S ocorreu"
 
-#: src/main/saveload.c:387 src/main/saveload.c:395 src/main/saveload.c:403
-#: src/main/saveload.c:1594 src/main/saveload.c:1602
+#: src/main/saveload.c:389 src/main/saveload.c:397 src/main/saveload.c:405
+#: src/main/saveload.c:1596 src/main/saveload.c:1604
 msgid "a read error occurred"
 msgstr "um erro de leitura ocorreu"
 
-#: src/main/saveload.c:467
+#: src/main/saveload.c:469
 msgid "unresolved node during restore"
 msgstr "nó não resolvido durante restauração"
 
-#: src/main/saveload.c:488
+#: src/main/saveload.c:490
 #, c-format
 msgid "restore compatibility error - no version %d compatibility"
 msgstr ""
 "erro de compatibilidade de restauração - sem compatibilidade com versão %d"
 
-#: src/main/saveload.c:572 src/main/saveload.c:645
+#: src/main/saveload.c:574 src/main/saveload.c:647
 msgid "bad SEXP type in data file"
 msgstr "tipo SEXP defeituoso no arquivo de dados"
 
-#: src/main/saveload.c:586
+#: src/main/saveload.c:588
 msgid "mismatch on types"
 msgstr "incompatibilidade de tipos"
 
-#: src/main/saveload.c:607 src/main/saveload.c:1270 src/main/serialize.c:1636
+#: src/main/saveload.c:609 src/main/saveload.c:1272 src/main/serialize.c:1675
 #, fuzzy, c-format
 msgid "unrecognized internal function name \"%s\""
 msgstr "não foi possível encontrar a função \"%s\""
 
-#: src/main/saveload.c:709
+#: src/main/saveload.c:711
 msgid "cannot save file position while restoring data"
 msgstr "não é possível salvar a posição do arquivo enquanto restaurando dados"
 
-#: src/main/saveload.c:722
+#: src/main/saveload.c:724
 msgid "cannot restore file position while restoring data"
 msgstr ""
 "não é possível restaurar a posição do arquivo enquanto restaurando dados"
 
-#: src/main/saveload.c:915
+#: src/main/saveload.c:917
 msgid "base namespace is not preserved in version 1 workspaces"
 msgstr "espaço de nomes não é preservado em áreas de trabalho versão 1"
 
-#: src/main/saveload.c:917
+#: src/main/saveload.c:919
 msgid "cannot save namespace in version 1 workspaces"
 msgstr "não é possível salvar nomes de espaço em áreas de trabalho versão 1"
 
-#: src/main/saveload.c:919
+#: src/main/saveload.c:921
 #, fuzzy
 msgid ""
 "cannot save environment with locked/active bindings in version 1 workspaces"
@@ -5219,162 +5294,162 @@ msgstr ""
 "não é possível salvar ambiente com vínculos bloqueados/ativos em áreas de "
 "trabalho versão 1"
 
-#: src/main/saveload.c:943
+#: src/main/saveload.c:945
 msgid "cannot save weak references in version 1 workspaces"
 msgstr "não é possível salvar referências fracas em áreas de trabalho versão 1"
 
-#: src/main/saveload.c:1021
+#: src/main/saveload.c:1023
 msgid "NewWriteVec called with non-vector type"
 msgstr "NewWriteVec chamado com um tipo não vetorial"
 
-#: src/main/saveload.c:1084
+#: src/main/saveload.c:1086
 msgid "cannot save byte code objects in version 1 workspaces"
 msgstr ""
 "não é possível salvar objetos do tipo códigos de byte em áreas de trabalho "
 "versão 1"
 
-#: src/main/saveload.c:1086
+#: src/main/saveload.c:1088
 #, c-format
 msgid "NewWriteItem: unknown type %i"
 msgstr "NewWriteItem: tipo desconhecido %i"
 
-#: src/main/saveload.c:1216
+#: src/main/saveload.c:1218
 msgid "NewReadVec called with non-vector type"
 msgstr "NewReadVec chamado com um tipo não vetorial"
 
-#: src/main/saveload.c:1286
+#: src/main/saveload.c:1288
 msgid "cannot read byte code objects from version 1 workspaces"
 msgstr ""
 "não é possível ler objetos do tipo códigos de byte a partir de áreas de "
 "trabalho versão 1"
 
-#: src/main/saveload.c:1288
+#: src/main/saveload.c:1290
 #, c-format
 msgid "NewReadItem: unknown type %i"
 msgstr "NewReadItem: tipo desconhecido %i"
 
-#: src/main/saveload.c:1440
+#: src/main/saveload.c:1442
 msgid "out of memory reading ascii string"
 msgstr "memória insuficiente na leitura de string ascii"
 
-#: src/main/saveload.c:1565
+#: src/main/saveload.c:1567
 msgid "a binary read error occurred"
 msgstr "um erro de leitura binário ocorreu"
 
-#: src/main/saveload.c:1580 src/main/saveload.c:1681
+#: src/main/saveload.c:1582 src/main/saveload.c:1683
 msgid "out of memory reading binary string"
 msgstr "memória insuficiente na leitura de string binária"
 
-#: src/main/saveload.c:1585
+#: src/main/saveload.c:1587
 msgid "a binary string read error occurred"
 msgstr "um erro de leitura de string binária ocorreu"
 
-#: src/main/saveload.c:1645
+#: src/main/saveload.c:1647
 msgid "an xdr integer data write error occurred"
 msgstr "um erro de escrita de inteiro xdr ocorreu"
 
-#: src/main/saveload.c:1652
+#: src/main/saveload.c:1654
 msgid "an xdr integer data read error occurred"
 msgstr "um erro de leitura de inteiro xdr ocorreu"
 
-#: src/main/saveload.c:1667 src/main/saveload.c:1686
+#: src/main/saveload.c:1669 src/main/saveload.c:1688
 msgid "an xdr string data write error occurred"
 msgstr "um erro de escrita de string xdr ocorreu"
 
-#: src/main/saveload.c:1694
+#: src/main/saveload.c:1696
 msgid "an xdr real data write error occurred"
 msgstr "um erro de escrita de real xdr ocorreu"
 
-#: src/main/saveload.c:1701
+#: src/main/saveload.c:1703
 msgid "an xdr real data read error occurred"
 msgstr "um erro de leitura de inteiro xdr ocorreu"
 
-#: src/main/saveload.c:1708
+#: src/main/saveload.c:1710
 msgid "an xdr complex data write error occurred"
 msgstr "um erro de escrita de complexos xdr ocorreu"
 
-#: src/main/saveload.c:1715
+#: src/main/saveload.c:1717
 msgid "an xdr complex data read error occurred"
 msgstr "um erro de leitura de complexos xdr ocorreu"
 
-#: src/main/saveload.c:1783 src/main/serialize.c:1958
-#: src/main/serialize.c:2568 src/modules/internet/internet.c:351
-#: src/modules/internet/internet.c:409 src/modules/internet/internet.c:514
+#: src/main/saveload.c:1785 src/main/serialize.c:1997
+#: src/main/serialize.c:2614 src/modules/internet/internet.c:514
+#: src/modules/internet/internet.c:590 src/modules/internet/internet.c:701
 msgid "write failed"
 msgstr "falha de escrita"
 
-#: src/main/saveload.c:1910
+#: src/main/saveload.c:1912
 msgid "restore file may be empty -- no data loaded"
 msgstr "arquivo de restauração pode estar vazio -- nenhum dado carregado"
 
-#: src/main/saveload.c:1912
+#: src/main/saveload.c:1914
 msgid "restore file may be from a newer version of R -- no data loaded"
 msgstr ""
 "arquivo de restauração pode ser de uma versão mais nova do R -- nenhum dado "
 "carregado"
 
-#: src/main/saveload.c:1914
+#: src/main/saveload.c:1916
 msgid "bad restore file magic number (file may be corrupted) -- no data loaded"
 msgstr ""
 "número mágico do arquivo de restauração inválido (arquivo pode estar "
 "corrompido) -- nenhum dado carregado"
 
-#: src/main/saveload.c:1940 src/main/saveload.c:2238
+#: src/main/saveload.c:1942 src/main/saveload.c:2240
 msgid "first argument must be a character vector"
 msgstr "primeiro argumento deve ser um vetor de caracteres"
 
-#: src/main/saveload.c:2012
+#: src/main/saveload.c:2014
 msgid "not a valid named list"
 msgstr "não é uma lista com nomes válida"
 
-#: src/main/saveload.c:2019 src/main/saveload.c:2040
+#: src/main/saveload.c:2021 src/main/saveload.c:2042
 #, c-format
 msgid "'%s' looks like a pre-2.4.0 S4 object: please recreate it"
 msgstr "'%s' parece um objeto S4 pre-2.4.0 S4: por favor recrie-o"
 
-#: src/main/saveload.c:2027
+#: src/main/saveload.c:2029
 msgid "loaded data is not in pair list form"
 msgstr "dados carregados não estão em forma de lista pareada"
 
-#: src/main/saveload.c:2063
+#: src/main/saveload.c:2065
 msgid "first argument must be a file name"
 msgstr "primeiro argumento deve ser um nome de arquivo"
 
-#: src/main/saveload.c:2108 src/main/saveload.c:2134 src/main/serialize.c:826
-#: src/main/serialize.c:863 src/main/serialize.c:901
+#: src/main/saveload.c:2110 src/main/saveload.c:2136 src/main/serialize.c:864
+#: src/main/serialize.c:901 src/main/serialize.c:939
 msgid "XDR write failed"
 msgstr "escrita XDR falhou"
 
-#: src/main/saveload.c:2121 src/main/saveload.c:2146 src/main/serialize.c:1362
-#: src/main/serialize.c:1398 src/main/serialize.c:1436
+#: src/main/saveload.c:2123 src/main/saveload.c:2148 src/main/serialize.c:1400
+#: src/main/serialize.c:1436 src/main/serialize.c:1474
 msgid "XDR read failed"
 msgstr "leitura XDR falhou"
 
-#: src/main/saveload.c:2157
+#: src/main/saveload.c:2159
 #, c-format
 msgid "cannot save data -- unable to open '%s': %s"
 msgstr "não é possível salvar os dados -- não foi possível abrir '%s': %s"
 
-#: src/main/saveload.c:2254 src/main/serialize.c:2161
+#: src/main/saveload.c:2256 src/main/serialize.c:2202
 #, c-format
 msgid "cannot save to connections in version %d format"
 msgstr "não é possível salvar para conexões em formato de versão %d"
 
-#: src/main/saveload.c:2277 src/main/serialize.c:2186
+#: src/main/saveload.c:2279 src/main/serialize.c:2227
 msgid "connection not open for writing"
 msgstr "conexão não aberta para leitura"
 
-#: src/main/saveload.c:2285
+#: src/main/saveload.c:2288
 msgid "cannot save XDR format to a text-mode connection"
 msgstr "não é possível salvar em formato XDR para uma conexão de modo texto"
 
-#: src/main/saveload.c:2295 src/main/serialize.c:2066
-#: src/main/serialize.c:2080 src/main/serialize.c:2262
-#: src/main/serialize.c:2284
+#: src/main/saveload.c:2298 src/main/serialize.c:2105
+#: src/main/serialize.c:2119 src/main/serialize.c:2303
+#: src/main/serialize.c:2325
 msgid "error writing to connection"
 msgstr "erro ao escrever na conexão"
 
-#: src/main/saveload.c:2359 src/main/serialize.c:2234
+#: src/main/saveload.c:2359 src/main/serialize.c:2275
 msgid "connection not open for reading"
 msgstr "conexão não está aberta para leitura"
 
@@ -5404,7 +5479,7 @@ msgstr ""
 msgid "scan() expected '%s', got '%s'"
 msgstr "scan() esperava '%s', obteve '%s'"
 
-#: src/main/scan.c:585 src/main/scan.c:732
+#: src/main/scan.c:585 src/main/scan.c:735
 #, fuzzy
 msgid "too many items"
 msgstr "argumentos demais"
@@ -5413,7 +5488,7 @@ msgstr "argumentos demais"
 msgid "empty 'what' specified"
 msgstr "especificação vazia de 'what='"
 
-#: src/main/scan.c:722
+#: src/main/scan.c:725
 #, c-format
 msgid "line %d did not have %d elements"
 msgstr "linha %d não tinha %d elementos"
@@ -5442,175 +5517,177 @@ msgstr "separador decimal inválido"
 msgid "invalid quote symbol set"
 msgstr "símbolo de citação inválido especificado"
 
-#: src/main/scan.c:987
+#: src/main/scan.c:988
 #, fuzzy
 msgid "embedded nul(s) found in input"
 msgstr "cadeia de caracteres com nul incluso: '%s'"
 
-#: src/main/seq.c:48
+#: src/main/seq.c:49
 msgid "unequal factor lengths"
 msgstr "comprimentos diferentes de fatores"
 
-#: src/main/seq.c:100
+#: src/main/seq.c:101
 msgid "result would be too long a vector"
 msgstr "resultado seria um vetor muito longo"
 
-#: src/main/seq.c:159
+#: src/main/seq.c:160
 msgid "argument of length 0"
 msgstr "argumento de comprimento zero"
 
-#: src/main/seq.c:161 src/main/seq.c:163
-#, c-format
-msgid "numerical expression has %d elements: only the first used"
-msgstr "expressão numérica tem %d elementos: somente o primeiro usado"
+#: src/main/seq.c:163 src/main/seq.c:168
+#, fuzzy, c-format
+msgid "numerical expression has %d element: only the first used"
+msgid_plural "numerical expression has %d elements: only the first used"
+msgstr[0] "expressão numérica tem %d elementos: somente o primeiro usado"
+msgstr[1] "expressão numérica tem %d elementos: somente o primeiro usado"
 
-#: src/main/seq.c:167
+#: src/main/seq.c:174
 msgid "NA/NaN argument"
 msgstr "Argumento NA/NaN"
 
-#: src/main/seq.c:331
+#: src/main/seq.c:333
 msgid "incorrect type for second argument"
 msgstr "tipo inválido para o segundo argumento"
 
-#: src/main/seq.c:334
+#: src/main/seq.c:336
 #, fuzzy, c-format
 msgid "attempt to replicate an object of type '%s'"
 msgstr "tentativa de replicar um objeto diferente de vetor"
 
-#: src/main/seq.c:387
+#: src/main/seq.c:393
 msgid "attempt to replicate non-vector"
 msgstr "tentativa de replicar um objeto diferente de vetor"
 
-#: src/main/seq.c:403
+#: src/main/seq.c:409
 #, fuzzy
 msgid "cannot replicate NULL to a non-zero length"
 msgstr "não foi possível alocar vetor de comprimento %d"
 
-#: src/main/seq.c:626 src/main/seq.c:633 src/main/seq.c:768 src/main/seq.c:979
+#: src/main/seq.c:630 src/main/seq.c:637 src/main/seq.c:766 src/main/seq.c:977
 #, c-format
 msgid "first element used of '%s' argument"
 msgstr ""
 
-#: src/main/seq.c:766
+#: src/main/seq.c:764
 msgid "'length.out' must be a non-negative number"
 msgstr "'length.out' deve ser um número não-negativo"
 
-#: src/main/seq.c:790 src/main/seq.c:856 src/main/seq.c:873
+#: src/main/seq.c:788 src/main/seq.c:854 src/main/seq.c:871
 msgid "'from' must be finite"
 msgstr "'from' deve ser finito"
 
-#: src/main/seq.c:792 src/main/seq.c:858 src/main/seq.c:895
+#: src/main/seq.c:790 src/main/seq.c:856 src/main/seq.c:893
 msgid "'to' must be finite"
 msgstr "'to' deve ser finito"
 
-#: src/main/seq.c:804
+#: src/main/seq.c:802
 msgid "invalid '(to - from)/by' in 'seq'"
 msgstr "'(to - from)/by' inválido em 'seq'"
 
-#: src/main/seq.c:816
+#: src/main/seq.c:814
 msgid "'by' argument is much too small"
 msgstr "argumento 'by' é muito pequeno"
 
-#: src/main/seq.c:818
+#: src/main/seq.c:816
 msgid "wrong sign in 'by' argument"
 msgstr "sinal errado para argumento 'by'"
 
-#: src/main/seq.c:875 src/main/seq.c:897
+#: src/main/seq.c:873 src/main/seq.c:895
 msgid "'by' must be finite"
 msgstr "'by' deve ser finito"
 
-#: src/main/seq.c:985 src/main/seq.c:990
+#: src/main/seq.c:983 src/main/seq.c:988
 msgid "argument must be coercible to non-negative integer"
 msgstr "argumento deve ser coercível para um inteiro não-negativo"
 
-#: src/main/serialize.c:224 src/main/serialize.c:254 src/main/serialize.c:277
+#: src/main/serialize.c:228 src/main/serialize.c:275 src/main/serialize.c:299
 msgid "unknown or inappropriate output format"
 msgstr "formato de saída inapropriado ou desconhecido"
 
-#: src/main/serialize.c:504
+#: src/main/serialize.c:542
 msgid "must specify ascii, binary, or xdr format"
 msgstr "formato deve ser do tipo ascii, binário ou xdr"
 
-#: src/main/serialize.c:505
+#: src/main/serialize.c:543
 msgid "unknown output format"
 msgstr "formato de saída desconhecido"
 
-#: src/main/serialize.c:536
+#: src/main/serialize.c:574
 msgid "unknown input format"
 msgstr "formato de entrada desconhecido"
 
-#: src/main/serialize.c:541
+#: src/main/serialize.c:579
 msgid "input format does not match specified format"
 msgstr "formato de entrada não corresponde ao formato especificado"
 
-#: src/main/serialize.c:752
+#: src/main/serialize.c:790
 msgid "no restore method available"
 msgstr "nenhum método de restauração disponível"
 
-#: src/main/serialize.c:794
+#: src/main/serialize.c:832
 msgid "names in persistent strings are currently ignored"
 msgstr "nomes em strings persistentes são atualmente ignorados"
 
-#: src/main/serialize.c:963
+#: src/main/serialize.c:1001
 #, c-format
 msgid "'%s' may not be available when loading"
 msgstr "'%s' pode não estar disponível ao carregar"
 
-#: src/main/serialize.c:970
+#: src/main/serialize.c:1008
 msgid "namespaces may not be available when loading"
 msgstr "espaços de nomes podem não estar disponíveis quando carregando"
 
-#: src/main/serialize.c:1097
+#: src/main/serialize.c:1136
 #, c-format
 msgid "WriteItem: unknown type %i"
 msgstr "WriteItem: tipo %i desconhecido"
 
-#: src/main/serialize.c:1273
+#: src/main/serialize.c:1312
 #, c-format
 msgid "version %d not supported"
 msgstr "versão %d não suportada"
 
-#: src/main/serialize.c:1305
+#: src/main/serialize.c:1343
 msgid "reference index out of range"
 msgstr "índice de referência fora de limites"
 
-#: src/main/serialize.c:1335
+#: src/main/serialize.c:1373
 msgid "names in persistent strings are not supported yet"
 msgstr "nomes em strings persistentes não são suportados ainda"
 
-#: src/main/serialize.c:1463
+#: src/main/serialize.c:1501
 #, fuzzy
 msgid "negative serialized length for vector"
 msgstr ""
 "não é possível especificar o comprimento de um objeto que não seja vetor"
 
-#: src/main/serialize.c:1471
+#: src/main/serialize.c:1509
 #, fuzzy
 msgid "invalid upper part of serialized vector length"
 msgstr "parâmetro de comprimento inválido"
 
-#: src/main/serialize.c:1476
+#: src/main/serialize.c:1514
 msgid ""
 "negative serialized vector length:\n"
 "perhaps long vector from 64-bit version of R?"
 msgstr ""
 
-#: src/main/serialize.c:1707
+#: src/main/serialize.c:1746
 msgid "this version of R cannot read class references"
 msgstr "essa versão do R não pode ler referências de classes"
 
-#: src/main/serialize.c:1709
+#: src/main/serialize.c:1748
 msgid "this version of R cannot read generic function references"
 msgstr "essa versão do R não pode ler referências de funções genéricas"
 
-#: src/main/serialize.c:1726
+#: src/main/serialize.c:1765
 #, c-format
 msgid "ReadItem: unknown type %i, perhaps written by later version of R"
 msgstr ""
 "ReadItem: tipo desconhecido %i, talvez escrito por uma versão mais recente "
 "do R"
 
-#: src/main/serialize.c:1882
+#: src/main/serialize.c:1921
 #, c-format
 msgid ""
 "cannot read unreleased workspace version %d written by experimental R %d.%d."
@@ -5619,7 +5696,7 @@ msgstr ""
 "não é possível ler espaço de trabalho não lançado versão %d escrito pelo R "
 "experimental %d.%d.%d"
 
-#: src/main/serialize.c:1886
+#: src/main/serialize.c:1925
 #, c-format
 msgid ""
 "cannot read workspace version %d written by R %d.%d.%d; need R %d.%d.%d or "
@@ -5628,82 +5705,82 @@ msgstr ""
 "não é possível ler espaço de trabalho versão %d escrito pelo R %d.%d.%d;  R "
 "%d.%d.%d ou mais novo necessário"
 
-#: src/main/serialize.c:1965
+#: src/main/serialize.c:2004
 msgid "read failed"
 msgstr "leitura falhou"
 
-#: src/main/serialize.c:2028
+#: src/main/serialize.c:2067
 msgid "error reading from ascii connection"
 msgstr "erro ao ler a partir de conexão ascii"
 
-#: src/main/serialize.c:2030
+#: src/main/serialize.c:2069
 msgid "unexpected format in ascii connection"
 msgstr "formato inesperado em conexão ascii"
 
-#: src/main/serialize.c:2035 src/main/serialize.c:2049
+#: src/main/serialize.c:2074 src/main/serialize.c:2088
 msgid "error reading from connection"
 msgstr "erro ao ler a partir de conexão"
 
-#: src/main/serialize.c:2090
+#: src/main/serialize.c:2130
 msgid "only ascii format can be written to text mode connections"
 msgstr "somente formato ascii pode ser escrito em conexões de modo texto"
 
-#: src/main/serialize.c:2104
+#: src/main/serialize.c:2144
 msgid "only ascii format can be read from text mode connections"
 msgstr "somente formato ascii pode ser lido a partir de conexões de modo texto"
 
-#: src/main/serialize.c:2159 src/main/serialize.c:2312
-#: src/main/serialize.c:2461
+#: src/main/serialize.c:2200 src/main/serialize.c:2353
+#: src/main/serialize.c:2502
 msgid "bad version value"
 msgstr "valor de versão inválido"
 
-#: src/main/serialize.c:2184
+#: src/main/serialize.c:2225
 msgid "binary-mode connection required for ascii=FALSE"
 msgstr ""
 
-#: src/main/serialize.c:2340 src/main/serialize.c:2377
-#: src/main/serialize.c:2440
+#: src/main/serialize.c:2381 src/main/serialize.c:2418
+#: src/main/serialize.c:2481
 msgid "serialization is too large to store in a raw vector"
 msgstr "serialização é muito grande para armazenar em vetor do tipo raw"
 
-#: src/main/serialize.c:2357
+#: src/main/serialize.c:2398
 msgid "cannot allocate buffer"
 msgstr "não é possível alocar buffer"
 
-#: src/main/serialize.c:2546 src/main/serialize.c:2619
+#: src/main/serialize.c:2592 src/main/serialize.c:2665
 msgid "not a proper file name"
 msgstr "não é um nome de arquivo válido"
 
-#: src/main/serialize.c:2548
+#: src/main/serialize.c:2594
 msgid "not a proper raw vector"
 msgstr "não é um vetor simples apropriado"
 
-#: src/main/serialize.c:2569
+#: src/main/serialize.c:2615
 msgid "could not determine file position"
 msgstr "não foi possível determinar a posição do arquivo"
 
-#: src/main/serialize.c:2621
+#: src/main/serialize.c:2667
 msgid "bad offset/length argument"
 msgstr "comprimento/deslocamento do argumento inválido"
 
-#: src/main/serialize.c:2645 src/main/serialize.c:2658
-#: src/main/serialize.c:2667 src/main/serialize.c:2677
-#: src/main/serialize.c:2690
+#: src/main/serialize.c:2691 src/main/serialize.c:2704
+#: src/main/serialize.c:2713 src/main/serialize.c:2723
+#: src/main/serialize.c:2736
 #, c-format
 msgid "seek failed on %s"
 msgstr "falha na procura em %s"
 
-#: src/main/serialize.c:2662 src/main/serialize.c:2671
-#: src/main/serialize.c:2681 src/main/serialize.c:2694
+#: src/main/serialize.c:2708 src/main/serialize.c:2717
+#: src/main/serialize.c:2727 src/main/serialize.c:2740
 #, c-format
 msgid "read failed on %s"
 msgstr "falha na leitura em %s"
 
-#: src/main/serialize.c:2713
+#: src/main/serialize.c:2759
 msgid "bad environment"
 msgstr "ambiente inválido"
 
-#: src/main/serialize.c:2715
+#: src/main/serialize.c:2761
 msgid "bad variable names"
 msgstr "nomes de variáveis inválidos"
 
@@ -5711,168 +5788,164 @@ msgstr "nomes de variáveis inválidos"
 msgid "only atomic vectors can be tested to be sorted"
 msgstr "somente vetores atômicos podem ser testados para ordenação"
 
-#: src/main/sort.c:326 src/main/sort.c:1228 src/main/sort.c:1396
+#: src/main/sort.c:325 src/main/sort.c:1248
 msgid "'decreasing' must be TRUE or FALSE"
 msgstr "'decreasing' deve ser TRUE ou FALSE"
 
-#: src/main/sort.c:329 src/main/sort.c:600
+#: src/main/sort.c:328 src/main/sort.c:599
 msgid "only atomic vectors can be sorted"
 msgstr "somente vetores atômicos podem ser ordenados"
 
-#: src/main/sort.c:331 src/main/sort.c:602 src/main/sort.c:1297
+#: src/main/sort.c:330 src/main/sort.c:601 src/main/sort.c:1317
 msgid "raw vectors cannot be sorted"
 msgstr "vetores raw não podem ser ordenados"
 
-#: src/main/sort.c:613
+#: src/main/sort.c:612
 msgid "NA or infinite index"
 msgstr ""
 
-#: src/main/sort.c:616
+#: src/main/sort.c:615
 #, fuzzy, c-format
 msgid "index %ld outside bounds"
 msgstr "índice %d fora de limites"
 
-#: src/main/sort.c:621 src/main/sort.c:634
+#: src/main/sort.c:620 src/main/sort.c:633
 msgid "NA index"
 msgstr "índice NA"
 
-#: src/main/sort.c:623 src/main/sort.c:636
+#: src/main/sort.c:622 src/main/sort.c:635
 #, c-format
 msgid "index %d outside bounds"
 msgstr "índice %d fora de limites"
 
-#: src/main/sort.c:1237
+#: src/main/sort.c:1257
 #, c-format
 msgid "argument %d is not a vector"
 msgstr "argumento %d não é um vetor"
 
-#: src/main/sort.c:1239
+#: src/main/sort.c:1259
 msgid "argument lengths differ"
 msgstr "comprimentos de argumentos difererem"
 
-#: src/main/sort.c:1324
+#: src/main/sort.c:1344
 msgid "invalid ties.method for rank() [should never happen]"
 msgstr "ties.method inválido para rank() [nunca deveria acontecer]"
 
-#: src/main/sort.c:1429
-msgid "too large a range of values in 'x'"
-msgstr "intervalo de valores muito grande em 'x'"
-
-#: src/main/source.c:215
+#: src/main/source.c:220
 msgid "coercion of 'text' to character was unsuccessful"
 msgstr "coerção de 'text' para modo caractere não teve êxito"
 
-#: src/main/source.c:231
+#: src/main/source.c:236
 #, c-format
 msgid "argument '%s = \"%s\"' will be ignored"
 msgstr "argumento '%s = \"%s\"' será ignorado"
 
-#: src/main/split.c:38
+#: src/main/split.c:39
 msgid "first argument must be a vector"
 msgstr "primeiro argumento deve ser um vetor"
 
-#: src/main/split.c:40
+#: src/main/split.c:41
 msgid "second argument must be a factor"
 msgstr "segundo argumento deve ser um fator"
 
-#: src/main/split.c:45
+#: src/main/split.c:46
 #, fuzzy
 msgid "group length is 0 but data length > 0"
 msgstr ""
 "Comprimento do grupo é zero mas o comprimento dos dados é maior que zero"
 
-#: src/main/split.c:47
+#: src/main/split.c:48
 msgid "data length is not a multiple of split variable"
 msgstr "comprimento dos dados não é múltiplo da variável de separação"
 
-#: src/main/split.c:56
+#: src/main/split.c:58
 msgid "factor has bad level"
 msgstr "fator tem um nível com problema"
 
-#: src/main/sprintf.c:94
+#: src/main/sprintf.c:97
 #, fuzzy, c-format
 msgid "required resulting string length %d is greater than maximal %d"
 msgstr "string de resultado com comprimento %d é maior que o máximo %d"
 
-#: src/main/sprintf.c:102
+#: src/main/sprintf.c:105
 msgid "'fmt' is not a character vector"
 msgstr "'fmt' não é um vetor de caracteres"
 
-#: src/main/sprintf.c:107
+#: src/main/sprintf.c:110
 #, c-format
 msgid "only %d arguments are allowed"
 msgstr "somente %d argumentos são permitidos"
 
-#: src/main/sprintf.c:114
+#: src/main/sprintf.c:117
 #, c-format
 msgid "invalid type of argument[%d]: '%s'"
 msgstr "tipo de argumento inválido[%d]: '%s'"
 
-#: src/main/sprintf.c:125 src/main/sprintf.c:128
+#: src/main/sprintf.c:128 src/main/sprintf.c:131
 msgid "arguments cannot be recycled to the same length"
 msgstr "argumentos não podem ser reciclados para o mesmo tamanho"
 
-#: src/main/sprintf.c:150 src/main/sprintf.c:257
+#: src/main/sprintf.c:153 src/main/sprintf.c:260
 #, c-format
 msgid "'fmt' length exceeds maximal format length %d"
 msgstr "comprimento de 'fmt' excede o comprimento máximo do formato %d"
 
-#: src/main/sprintf.c:169
+#: src/main/sprintf.c:172
 #, c-format
 msgid "unrecognised format specification '%s'"
 msgstr "especificação de formato não reconhecida '%s'"
 
-#: src/main/sprintf.c:180 src/main/sprintf.c:186 src/main/sprintf.c:199
-#: src/main/sprintf.c:206
+#: src/main/sprintf.c:183 src/main/sprintf.c:189 src/main/sprintf.c:202
+#: src/main/sprintf.c:209
 #, c-format
 msgid "reference to non-existent argument %d"
 msgstr "referência a um argumento não existente %d"
 
-#: src/main/sprintf.c:218
+#: src/main/sprintf.c:221
 msgid "at most one asterisk '*' is supported in each conversion specification"
 msgstr ""
 "no máximo um asterisco `*' é suportado em cada especificação de conversão"
 
-#: src/main/sprintf.c:228
+#: src/main/sprintf.c:231
 msgid "argument for '*' conversion specification must be a number"
 msgstr "argumento para especificação de conversão `*' deve ser um número"
 
-#: src/main/sprintf.c:266
+#: src/main/sprintf.c:269
 msgid "coercion has changed vector length to 0"
 msgstr "coerção mudou o comprimento do vetor para 0"
 
-#: src/main/sprintf.c:339 src/main/sprintf.c:353 src/main/sprintf.c:367
-#: src/main/sprintf.c:402
+#: src/main/sprintf.c:343 src/main/sprintf.c:357 src/main/sprintf.c:371
+#: src/main/sprintf.c:406
 #, c-format
 msgid "invalid format '%s'; %s"
 msgstr "formato inválido'%s'; %s"
 
-#: src/main/sprintf.c:340
+#: src/main/sprintf.c:344
 #, c-format
 msgid "use format %d or %i for logical objects"
 msgstr "use o formato %d ou %i para objetos lógicos"
 
-#: src/main/sprintf.c:354
+#: src/main/sprintf.c:358
 #, c-format
 msgid "use format %d, %i, %o, %x or %X for integer objects"
 msgstr "use o formato %d, %i, %o, %x ou %X para objetos inteiros"
 
-#: src/main/sprintf.c:368
+#: src/main/sprintf.c:372
 #, c-format
 msgid "use format %f, %e, %g or %a for numeric objects"
 msgstr "use o formato %f, %e, %g ou %a para objetos numéricos"
 
-#: src/main/sprintf.c:403
+#: src/main/sprintf.c:407
 #, c-format
 msgid "use format %s for character objects"
 msgstr "use o formato %s para objetos caractere"
 
-#: src/main/sprintf.c:408
+#: src/main/sprintf.c:412
 #, c-format
 msgid "likely truncation of character string to %d characters"
 msgstr "provável truncamento de string de caracteres para %d caracteres"
 
-#: src/main/sprintf.c:417
+#: src/main/sprintf.c:421
 msgid "unsupported type"
 msgstr "tipo não suportado"
 
@@ -5880,74 +5953,74 @@ msgstr "tipo não suportado"
 msgid "R_LibraryFileName: buffer too small"
 msgstr "R_LibraryFileName: buffer muito pequeno"
 
-#: src/main/subassign.c:117
+#: src/main/subassign.c:118
 msgid "attempt to enlarge non-vector"
 msgstr "tentativa de alargar um objeto diferente de vetor"
 
-#: src/main/subassign.c:122
+#: src/main/subassign.c:123
 #, c-format
 msgid "assignment outside vector/list limits (extending from %d to %d)"
 msgstr "atribuição fora dos limites do vetor/lista (extendendo de %d até %d)"
 
-#: src/main/subassign.c:367
+#: src/main/subassign.c:391
 #, c-format
 msgid "incompatible types (from %s to %s) in subassignment type fix"
 msgstr "tipos incompatíveis (de %s para %s) em correção de tipo subatribuição"
 
-#: src/main/subassign.c:502 src/main/subassign.c:782 src/main/subassign.c:785
-#: src/main/subassign.c:1076
+#: src/main/subassign.c:550 src/main/subassign.c:830 src/main/subassign.c:833
+#: src/main/subassign.c:1133
 msgid "NAs are not allowed in subscripted assignments"
 msgstr "NAs não são permitidos em atribuições por subscritos"
 
-#: src/main/subassign.c:520 src/main/subassign.c:796 src/main/subassign.c:1068
-#: src/main/subassign.c:1641
+#: src/main/subassign.c:568 src/main/subassign.c:844 src/main/subassign.c:1125
+#: src/main/subassign.c:1705
 msgid "replacement has length zero"
 msgstr "substituto tem comprimento zero"
 
-#: src/main/subassign.c:522 src/main/subassign.c:798 src/main/subassign.c:1070
+#: src/main/subassign.c:570 src/main/subassign.c:846 src/main/subassign.c:1127
 msgid "number of items to replace is not a multiple of replacement length"
 msgstr ""
 "número de itens para para substituir não é um múltiplo do comprimento do "
 "substituto"
 
-#: src/main/subassign.c:766
+#: src/main/subassign.c:814
 msgid "incorrect number of subscripts on matrix"
 msgstr "número de subscritos incorretos na matriz"
 
-#: src/main/subassign.c:1022
+#: src/main/subassign.c:1079
 #, c-format
 msgid "incompatible types (from %s to %s) in matrix subset assignment"
 msgstr ""
 "tipos incompatíveis (de %s para %s) em atribuição de subconjunto de matriz"
 
-#: src/main/subassign.c:1038 src/main/subset.c:928
+#: src/main/subassign.c:1095 src/main/subset.c:957
 msgid "incorrect number of subscripts"
 msgstr "número de índices incorretos"
 
-#: src/main/subassign.c:1214
+#: src/main/subassign.c:1272
 #, c-format
 msgid "incompatible types (from %s to %s) in array subset assignment"
 msgstr ""
 "tipos incompatíveis (de %s para %s) em atribuição de subconjunto de array"
 
-#: src/main/subassign.c:1249 src/main/subassign.c:1270
+#: src/main/subassign.c:1308 src/main/subassign.c:1329
 msgid "invalid subscript in list assign"
 msgstr "número de subscritos inválidos em atribuição de lista"
 
-#: src/main/subassign.c:1263
+#: src/main/subassign.c:1322
 msgid "invalid number of subscripts to list assign"
 msgstr "número de subscritos inválidos em atribuição de lista"
 
-#: src/main/subassign.c:1361
+#: src/main/subassign.c:1421
 msgid "SubAssignArgs: invalid number of arguments"
 msgstr "SubAssignArgs: número de argumentos inválidos"
 
-#: src/main/subassign.c:1506
+#: src/main/subassign.c:1566
 msgid "result is zero-length and so cannot be a language object"
 msgstr ""
 "resultado tem comprimento zero e por isso não pode ser um objeto de linguagem"
 
-#: src/main/subassign.c:1611
+#: src/main/subassign.c:1665
 #, fuzzy
 msgid ""
 "[[<- defined for objects of type \"S4\" only for subclasses of environment"
@@ -5955,319 +6028,324 @@ msgstr ""
 "[[<- definido somente para objetos de tipo \"S4\" somente para subclasses de "
 "um ambiente"
 
-#: src/main/subassign.c:1617
+#: src/main/subassign.c:1677
 msgid "wrong args for environment subassignment"
 msgstr "argumentos inválidos para subatribuição de ambiente"
 
-#: src/main/subassign.c:1643
+#: src/main/subassign.c:1707
 msgid "more elements supplied than there are to replace"
 msgstr "mais elementos fornecidos do que podem ser substituidos"
 
-#: src/main/subassign.c:1645
+#: src/main/subassign.c:1709
 msgid "[[ ]] with missing subscript"
 msgstr "[[ ]] com subscrito ausente"
 
-#: src/main/subassign.c:1657 src/main/subassign.c:1675
+#: src/main/subassign.c:1727 src/main/subassign.c:1745
 msgid "[[ ]] subscript out of bounds"
 msgstr "subscrito [[ ]] fora de limites"
 
-#: src/main/subassign.c:1663 src/main/subassign.c:1841
+#: src/main/subassign.c:1733 src/main/subassign.c:1914
 msgid "[[ ]] improper number of subscripts"
 msgstr "número inadequado de subscritos em [[ ]]"
 
-#: src/main/subassign.c:1808
+#: src/main/subassign.c:1879
 #, c-format
 msgid "incompatible types (from %s to %s) in [[ assignment"
 msgstr "tipos incompatíveis (de %s para %s) em atribuição [["
 
-#: src/main/subassign.c:1852
+#: src/main/subassign.c:1925
 #, c-format
 msgid "[[ ]] subscript (%d) out of bounds"
 msgstr "subscrito (%d) em [[ ]] fora de limites"
 
-#: src/main/subassign.c:1905 src/main/subscript.c:143 src/main/subscript.c:145
-#: src/main/subscript.c:274 src/main/subscript.c:276 src/main/subscript.c:826
-#: src/main/subscript.c:828 src/main/subscript.c:919 src/main/subscript.c:921
-#: src/main/subset.c:1109
+#: src/main/subassign.c:1986 src/main/subscript.c:151 src/main/subscript.c:278
+#: src/main/subscript.c:903 src/main/subscript.c:996 src/main/subset.c:1176
 #, c-format
 msgid "invalid subscript type '%s'"
 msgstr "tipo de subscrito inválido '%s'"
 
-#: src/main/subassign.c:1950
+#: src/main/subassign.c:2037
 msgid "no method for assigning subsets of this S4 class"
 msgstr "nenhum método para atribuir subconjuntos dessa classe S4"
 
-#: src/main/subassign.c:2008
+#: src/main/subassign.c:2095
 msgid "Coercing LHS to a list"
 msgstr "Realizando coerção de LHD para uma lista"
 
-#: src/main/subscript.c:53 src/main/subscript.c:75 src/main/subscript.c:180
-#: src/main/subscript.c:204
-msgid "attempt to select less than one element"
+#: src/main/subscript.c:59 src/main/subscript.c:81 src/main/subscript.c:185
+#: src/main/subscript.c:209
+#, fuzzy, c-format
+msgid "attempt to select less than one element in %s"
 msgstr "tentativa de selecionar menos de um elemento"
 
-#: src/main/subscript.c:57 src/main/subscript.c:72 src/main/subscript.c:178
-#: src/main/subscript.c:208 src/main/subscript.c:304
-msgid "attempt to select more than one element"
+#: src/main/subscript.c:63 src/main/subscript.c:78 src/main/subscript.c:183
+#: src/main/subscript.c:213 src/main/subscript.c:305
+#, fuzzy, c-format
+msgid "attempt to select more than one element in %s"
 msgstr "tentativa de selecionar mais de um elemento"
 
-#: src/main/subscript.c:184
+#: src/main/subscript.c:189
 msgid "internal error in use of recursive indexing"
 msgstr "erro interno no uso de indexação recursiva"
 
-#: src/main/subscript.c:252
+#: src/main/subscript.c:257
 #, c-format
 msgid "further partial match of '%s' to '%s'"
 msgstr "correspondência parcial de '%s' para '%s'"
 
-#: src/main/subscript.c:302
+#: src/main/subscript.c:303
 #, c-format
 msgid "recursive indexing failed at level %d\n"
 msgstr "indexação recursiva falhou no nível %d\n"
 
-#: src/main/subscript.c:309
+#: src/main/subscript.c:313
 #, c-format
 msgid "no such index at level %d\n"
 msgstr "nenhum índice no nível %d\n"
 
-#: src/main/subscript.c:352
+#: src/main/subscript.c:360
 msgid "incorrect number of columns in matrix subscript"
 msgstr "número incorreto de colunas na subscrição de matriz"
 
-#: src/main/subscript.c:371 src/main/subscript.c:389 src/main/subscript.c:413
+#: src/main/subscript.c:379 src/main/subscript.c:397 src/main/subscript.c:421
 msgid "negative values are not allowed in a matrix subscript"
 msgstr "valores negativos não são permitidos na subscrição de matriz"
 
-#: src/main/subscript.c:492
+#: src/main/subscript.c:500
 msgid "(subscript) logical subscript too long"
 msgstr "(subscript) subscrito lógico muito longo"
 
-#: src/main/subscript.c:590 src/main/subscript.c:645
+#: src/main/subscript.c:668 src/main/subscript.c:723
 msgid "only 0's may be mixed with negative subscripts"
 msgstr "somente 0's podem ser usados junto com subscritos negativos"
 
-#: src/main/subscript.c:618
+#: src/main/subscript.c:696
 msgid "subscript too large for 32-bit R"
 msgstr ""
 
-#: src/main/subscript.c:817
+#: src/main/subscript.c:895
 msgid "no 'dimnames' attribute for array"
 msgstr "array sem atributo 'dimnames'"
 
-#: src/main/subscript.c:857
+#: src/main/subscript.c:931
 msgid "subscripting on non-vector"
 msgstr "tentativa de usar um subscrito em um objeto diferente de vetor"
 
-#: src/main/subset.c:261
+#: src/main/subset.c:260
 msgid "dimensions would exceed maximum size of array"
 msgstr ""
 
-#: src/main/subset.c:304 src/main/subset.c:333
+#: src/main/subset.c:304 src/main/subset.c:334
 msgid "matrix subscripting not handled for this type"
 msgstr "uso de subscritos em matrizes não suportados para esse tipo"
 
-#: src/main/subset.c:488
+#: src/main/subset.c:493
 msgid "array subscripting not handled for this type"
 msgstr "uso de subscritos em arrays não disponíveis para esse tipo"
 
-#: src/main/subset.c:827
+#: src/main/subset.c:856
 msgid "incorrect number of dimensions"
 msgstr "número incorreto de dimensões"
 
-#: src/main/subset.c:924
+#: src/main/subset.c:953
 msgid "no index specified"
 msgstr "nenhum índice especificado"
 
-#: src/main/subset.c:934
+#: src/main/subset.c:963
 msgid "this S4 class is not subsettable"
 msgstr "não é possível dividir essa classe S4 em subconjuntos"
 
-#: src/main/subset.c:940
+#: src/main/subset.c:970
 msgid "wrong arguments for subsetting an environment"
 msgstr "argumentos errados para obtenção de subconjuntos de um ambiente"
 
-#: src/main/summary.c:30
+#: src/main/summary.c:33
 #, c-format
 msgid "invalid 'type' (%s) of argument"
 msgstr "'type' inválido (%s) do argumento"
 
-#: src/main/summary.c:66 src/main/summary.c:78 src/main/summary.c:103
+#: src/main/summary.c:69 src/main/summary.c:81 src/main/summary.c:106
 #, fuzzy
 msgid "integer overflow - use sum(as.numeric(.))"
 msgstr "Estouro da capacidade de inteiro - use sum(as.numeric(.))"
 
-#: src/main/summary.c:522
+#: src/main/summary.c:526
 #, c-format
 msgid "internal error ('op = %d' in do_summary).\t Call a Guru"
 msgstr "erro interno ('op = %d' em do_summary).\t Chame um guru"
 
-#: src/main/summary.c:623
+#: src/main/summary.c:637
 msgid "Integer overflow - use sum(as.numeric(.))"
 msgstr "Estouro da capacidade de inteiro - use sum(as.numeric(.))"
 
-#: src/main/summary.c:731
+#: src/main/summary.c:750
 msgid "no non-missing arguments, returning NA"
 msgstr "nenhum argumento não faltante; retornando NA"
 
-#: src/main/summary.c:734
+#: src/main/summary.c:753
 msgid "no non-missing arguments to min; returning Inf"
 msgstr "nenhum argumento não faltante para min; retornando Inf"
 
-#: src/main/summary.c:736
+#: src/main/summary.c:755
 msgid "no non-missing arguments to max; returning -Inf"
 msgstr "nenhum argumento não faltante para max; retornando -Inf"
 
-#: src/main/summary.c:801
-msgid "non-numeric argument"
-msgstr "argumento não numérico"
-
-#: src/main/summary.c:845
+#: src/main/summary.c:913
 msgid "argument to 'which' is not logical"
 msgstr "argumento 'which' não é lógico"
 
-#: src/main/summary.c:889
+#: src/main/summary.c:957
 msgid "no arguments"
 msgstr "nenhum argumento"
 
-#: src/main/summary.c:900 src/main/summary.c:917
+#: src/main/summary.c:968 src/main/summary.c:985
 msgid "invalid input type"
 msgstr "tipo de entrada inválido"
 
-#: src/main/summary.c:934
+#: src/main/summary.c:1002
 #, fuzzy
 msgid "an argument will be fractionally recycled"
 msgstr "argumento '%s' será ignorado"
 
-#: src/main/sysutils.c:69 src/main/sysutils.c:83
+#: src/main/sysutils.c:68 src/main/sysutils.c:82
 #, c-format
 msgid "cannot determine file modification time of '%s'"
 msgstr "não é possível determinar a data de modificação do arquivo '%s'"
 
-#: src/main/sysutils.c:167
+#: src/main/sysutils.c:166
 msgid "encoding of a filename cannot be 'bytes'"
 msgstr ""
 
-#: src/main/sysutils.c:170 src/main/sysutils.c:803 src/main/sysutils.c:818
-#: src/main/sysutils.c:909 src/main/sysutils.c:924 src/main/sysutils.c:1020
+#: src/main/sysutils.c:169 src/main/sysutils.c:831 src/main/sysutils.c:846
+#: src/main/sysutils.c:975
 #, c-format
 msgid "unsupported conversion from '%s' in codepage %d"
 msgstr ""
 
-#: src/main/sysutils.c:179
+#: src/main/sysutils.c:178
 msgid "file name conversion problem -- name too long?"
 msgstr "problema na conversão do nome de arquivo -- nome muito longo?"
 
-#: src/main/sysutils.c:180
+#: src/main/sysutils.c:179
 msgid "file name conversion problem"
 msgstr "problema na conversão do nome de arquivo"
 
-#: src/main/sysutils.c:249
+#: src/main/sysutils.c:248
 msgid "invalid filename pattern"
 msgstr "padrão de nome de arquivo inválido"
 
-#: src/main/sysutils.c:253
+#: src/main/sysutils.c:252
 #, fuzzy
 msgid "invalid file extension"
 msgstr "padrão de nome de arquivo inválido"
 
-#: src/main/sysutils.c:255
+#: src/main/sysutils.c:254
 msgid "no 'pattern'"
 msgstr "'pattern' não especificado"
 
-#: src/main/sysutils.c:257
+#: src/main/sysutils.c:256
 msgid "no 'tempdir'"
 msgstr "'tempdir' não especificado"
 
-#: src/main/sysutils.c:259
+#: src/main/sysutils.c:258
 msgid "no 'fileext'"
 msgstr ""
 
-#: src/main/sysutils.c:345 src/main/sysutils.c:348 src/main/sysutils.c:439
-#: src/main/sysutils.c:441 src/main/sysutils.c:477
+#: src/main/sysutils.c:328
+#, fuzzy, c-format
+msgid "system call failed: %s"
+msgstr "falha na procura em %s"
+
+#: src/main/sysutils.c:357 src/main/sysutils.c:360 src/main/sysutils.c:451
+#: src/main/sysutils.c:453 src/main/sysutils.c:489
 msgid "wrong type for argument"
 msgstr "argumento de tipo inválido"
 
-#: src/main/sysutils.c:443
+#: src/main/sysutils.c:455
 msgid "wrong length for argument"
 msgstr "comprimento errado para argumento"
 
-#: src/main/sysutils.c:464
+#: src/main/sysutils.c:476
 msgid "'Sys.setenv' is not available on this system"
 msgstr "'Sys.setenv' não está disponível nesse sistema"
 
-#: src/main/sysutils.c:508
+#: src/main/sysutils.c:520
 msgid "this system cannot unset environment variables: setting to \"\""
 msgstr ""
 "esse sistema não pode desvincular variáveis de ambiente: definindo como \"\""
 
-#: src/main/sysutils.c:519
+#: src/main/sysutils.c:531
 msgid "'Sys.unsetenv' is not available on this system"
 msgstr "'Sys.unsetenv' não está disponível nesse sistema"
 
-#: src/main/sysutils.c:616
+#: src/main/sysutils.c:628
 #, c-format
 msgid "unsupported conversion from '%s' to '%s' in codepage %d"
 msgstr ""
 
-#: src/main/sysutils.c:631
+#: src/main/sysutils.c:643
 msgid "'x' must be a character vector"
 msgstr "'x' deve ser um vetor de caracteres"
 
-#: src/main/sysutils.c:646
+#: src/main/sysutils.c:658
 #, fuzzy
-msgid "'x' must be a list of NULL or raw vectors"
+msgid "'x' must be a character vector or a list of NULL or raw vectors"
 msgstr "'x' deve ser um vetor de caracteres"
 
-#: src/main/sysutils.c:724 src/main/sysutils.c:789 src/main/sysutils.c:895
-#: src/main/sysutils.c:994 src/main/sysutils.c:1010 src/main/sysutils.c:1087
+#: src/main/sysutils.c:736 src/main/sysutils.c:914 src/main/sysutils.c:932
+#: src/main/sysutils.c:949 src/main/sysutils.c:965 src/main/sysutils.c:1042
 #, c-format
 msgid "'%s' must be called on a CHARSXP"
 msgstr "'%s' deve ser chamado em uma CHARSXP"
 
-#: src/main/sysutils.c:792 src/main/sysutils.c:898 src/main/sysutils.c:1015
-#: src/main/sysutils.c:1090
+#: src/main/sysutils.c:805 src/main/sysutils.c:970 src/main/sysutils.c:1045
 msgid "translating strings with \"bytes\" encoding is not allowed"
 msgstr ""
 
-#: src/main/sysutils.c:1116
+#: src/main/sysutils.c:818
+#, fuzzy
+msgid "internal error: no translation needed"
+msgstr "erro interno no código unz"
+
+#: src/main/sysutils.c:1071
 #, c-format
 msgid "unsupported conversion to '%s' from codepage %d"
 msgstr ""
 
-#: src/main/sysutils.c:1530
+#: src/main/sysutils.c:1486
 #, fuzzy, c-format
 msgid "invalid Unicode point %u"
 msgstr "junção de linha inválida"
 
-#: src/main/sysutils.c:1632
+#: src/main/sysutils.c:1588
 #, fuzzy
 msgid "cannot create 'R_TempDir'"
 msgstr "não é possível alocar R_TempDir"
 
-#: src/main/sysutils.c:1636 src/main/sysutils.c:1644 src/main/sysutils.c:1647
+#: src/main/sysutils.c:1592 src/main/sysutils.c:1600 src/main/sysutils.c:1603
 msgid "unable to set R_SESSION_TMPDIR"
 msgstr "impossível definir R_SESSION_TMPDIR"
 
-#: src/main/sysutils.c:1656
+#: src/main/sysutils.c:1612
 #, fuzzy
 msgid "cannot allocate 'R_TempDir'"
 msgstr "não é possível alocar R_TempDir"
 
-#: src/main/sysutils.c:1693
+#: src/main/sysutils.c:1649
 #, fuzzy
 msgid "temporary name too long"
 msgstr "nome de arquivo muito longo"
 
-#: src/main/sysutils.c:1708
+#: src/main/sysutils.c:1664
 msgid "cannot find unused tempfile name"
 msgstr ""
 "não foi possivel encontrar um nome não utilizado para arquivo temporário."
 
-#: src/main/sysutils.c:1711
+#: src/main/sysutils.c:1667
 msgid "allocation failed in R_tmpnam2"
 msgstr "falha de alocação em R_tmpnam2"
 
-#: src/main/sysutils.c:1838
+#: src/main/sysutils.c:1794
 msgid "'dirmark = TRUE' is not supported on this platform"
 msgstr "'dirmark = TRUE' não é suportado nessa plataforma"
 
@@ -6277,199 +6355,204 @@ msgid "length %d is too large for hashing"
 msgstr "comprimento %d é muito grande para uso de hash"
 
 #: src/main/unique.c:490 src/main/unique.c:519 src/main/unique.c:549
-#: src/main/unique.c:575 src/main/unique.c:614
+#: src/main/unique.c:573 src/main/unique.c:612
 msgid "'duplicated' applies only to vectors"
 msgstr "'duplicated' pode ser aplicada somente a vetores"
 
-#: src/main/unique.c:619
+#: src/main/unique.c:617
 msgid "any_duplicated3(., <0-length incomp>)"
 msgstr "any_duplicated3(., <0-length incomp>)"
 
-#: src/main/unique.c:669
+#: src/main/unique.c:667
 msgid "'fromLast' must be length 1"
 msgstr "'fromLast' deve ter comprimento 1"
 
-#: src/main/unique.c:672
+#: src/main/unique.c:670
 msgid "'fromLast' must be TRUE or FALSE"
 msgstr "'fromLast' deve ser TRUE ou FALSE"
 
-#: src/main/unique.c:683
+#: src/main/unique.c:681
 #, c-format
 msgid "%s() applies only to vectors"
 msgstr "%s() pode ser aplicada somente a vetores"
 
-#: src/main/unique.c:690
+#: src/main/unique.c:688
 #, fuzzy
 msgid "'nmax' must be positive"
 msgstr "'value' deve ter comprimento positivo"
 
-#: src/main/unique.c:922
+#: src/main/unique.c:985
 msgid "'match' requires vector arguments"
 msgstr "'match' requer argumentos vetoriais"
 
-#: src/main/unique.c:970 src/main/unique.c:1125
+#: src/main/unique.c:1033 src/main/unique.c:1171
 msgid "argument is not of mode character"
 msgstr "argumento não é de modo caractere"
 
-#: src/main/unique.c:1251
+#: src/main/unique.c:1296
 #, fuzzy
 msgid "... used in a situation where it does not exist"
 msgstr "... usado em uma situação onde ele não existe"
 
-#: src/main/unique.c:1342
-msgid "unable to find a closure from within which 'match.call' was called"
-msgstr ""
-"não foi possível encontrar o fechamento de onde a chamada 'match.call' foi "
-"iniciada"
+#: src/main/unique.c:1302
+#, fuzzy
+msgid "... is not a pairlist"
+msgstr "valor em '...' não é uma promessa"
 
-#: src/main/unique.c:1536
+#: src/main/unique.c:1531
 msgid "non-numeric data frame in rowsum"
 msgstr "data frame não numérico em rowsum"
 
-#: src/main/unique.c:1568
+#: src/main/unique.c:1563
 msgid "this cannot happen"
 msgstr "isso não pode acontecer"
 
-#: src/main/unique.c:1639
+#: src/main/unique.c:1634
 msgid "'names' must be a character vector"
 msgstr "'names' deve ser um vetor de caracteres"
 
-#: src/main/unique.c:1643
-msgid "'sep' must be a character string"
-msgstr "'sep' deve ser uma string de caracteres"
-
-#: src/main/util.c:88 src/main/util.c:106
+#: src/main/util.c:87 src/main/util.c:105
 msgid "object is not a matrix"
 msgstr "objeto não é uma matriz"
 
-#: src/main/util.c:254 src/main/util.c:268 src/main/util.c:285
+#: src/main/util.c:303 src/main/util.c:315 src/main/util.c:326
+#: src/main/util.c:341
 #, c-format
 msgid "type %d is unimplemented in '%s'"
 msgstr "tipo %d não está implementado em '%s'"
 
-#: src/main/util.c:297
+#: src/main/util.c:352
 #, c-format
 msgid "unimplemented type '%s' in '%s'\n"
 msgstr "tipo não implementado '%s' em '%s'\n"
 
-#: src/main/util.c:299
+#: src/main/util.c:354
 #, c-format
 msgid "unimplemented type (%d) in '%s'\n"
 msgstr "tipo não implementado (%d) em '%s'\n"
 
-#: src/main/util.c:424
+#: src/main/util.c:479
 msgid "invalid tag in name extraction"
 msgstr "etiqueta inválida durante a extração de nomes"
 
-#: src/main/util.c:434
+#: src/main/util.c:489
 #, c-format
 msgid "%d argument passed to .Internal(%s) which requires %d"
 msgid_plural "%d arguments passed to .Internal(%s) which requires %d"
 msgstr[0] "%d argumento passado para .Internal(%s), que requer %d"
 msgstr[1] "%d argumentos passados para .Internal(%s), que requer %d"
 
-#: src/main/util.c:440
+#: src/main/util.c:495
 #, c-format
 msgid "%d argument passed to '%s' which requires %d"
 msgid_plural "%d arguments passed to '%s' which requires %d"
 msgstr[0] "%d argumentos passados para '%s', que requer %d"
 msgstr[1] "%d argumentos passados para '%s', que requer %d"
 
-#: src/main/util.c:455
+#: src/main/util.c:510
 #, c-format
 msgid "supplied argument name '%s' does not match '%s'"
 msgstr "nome de argumento fornecido '%s' não corresponde a '%s'"
 
-#: src/main/util.c:465
+#: src/main/util.c:520
 #, c-format
 msgid "'nthcdr' list shorter than %d"
 msgstr "lista 'nthcdr' é menor que %d"
 
-#: src/main/util.c:470
+#: src/main/util.c:525
 msgid "'nthcdr' needs a list to CDR down"
 msgstr "'nthcdr' requer uma lista para aplicar o CDR"
 
-#: src/main/util.c:586
+#: src/main/util.c:641
 msgid "'all.x' must be TRUE or FALSE"
 msgstr "'all.x' deve ser TRUE ou FALSE"
 
-#: src/main/util.c:588
+#: src/main/util.c:643
 msgid "'all.y' must be TRUE or FALSE"
 msgstr "'all.y' deve ser TRUE ou FALSE"
 
-#: src/main/util.c:700
+#: src/main/util.c:672
+msgid "number of rows in the result exceeds maximum vector length"
+msgstr ""
+
+#: src/main/util.c:764
 msgid "missing value is invalid"
 msgstr "valor faltante é inválido"
 
-#: src/main/util.c:709 src/main/util.c:716
+#: src/main/util.c:773 src/main/util.c:780
 msgid "cannot change working directory"
 msgstr "não é possível mudar o diretório de trabalho"
 
-#: src/main/util.c:735 src/main/util.c:769 src/main/util.c:810
-#: src/main/util.c:852 src/main/util.c:981 src/main/util.c:1040
-#: src/main/util.c:1063
+#: src/main/util.c:800 src/main/util.c:834 src/main/util.c:875
+#: src/main/util.c:917 src/main/util.c:1046 src/main/util.c:1105
+#: src/main/util.c:1128
 msgid "a character vector argument expected"
 msgstr "vetor de caracteres esperado como argumento"
 
-#: src/main/util.c:742 src/main/util.c:777 src/main/util.c:819
-#: src/main/util.c:860
+#: src/main/util.c:807 src/main/util.c:842 src/main/util.c:884
+#: src/main/util.c:925
 msgid "path too long"
 msgstr "caminho muito longo"
 
-#: src/main/util.c:995
+#: src/main/util.c:1060
 msgid "only the first character of 'quote' will be used"
 msgstr "apenas o primeiro caractere"
 
-#: src/main/util.c:1065
+#: src/main/util.c:1130
 msgid "a character vector 'value' expected"
 msgstr "vetor de caracteres vector.'value' esperado"
 
-#: src/main/util.c:1068
+#: src/main/util.c:1133
 msgid "'value' must be of positive length"
 msgstr "'value' deve ter comprimento positivo"
 
-#: src/main/util.c:1197 src/main/util.c:1205
+#: src/main/util.c:1262 src/main/util.c:1270
 #, c-format
 msgid "invalid input '%s' in 'utf8towcs'"
 msgstr "entrada inválida '%s' em 'utf8towcs'"
 
-#: src/main/util.c:1290
+#: src/main/util.c:1355
 #, c-format
 msgid "invalid multibyte string at '%s'"
 msgstr "string multibyte inválida em '%s'"
 
-#: src/main/util.c:1399
+#: src/main/util.c:1497
 msgid "error message truncated to 255 chars"
 msgstr "mensagem de erro truncada para 255 caracteres"
 
-#: src/main/util.c:1412
+#: src/main/util.c:1510
 msgid "warning message truncated to 255 chars"
 msgstr "mensagem de aviso truncada para 255 caracteres"
 
-#: src/main/util.c:1819
+#: src/main/util.c:1659
+#, c-format
+msgid "accuracy loss in conversion from \"%s\" to numeric"
+msgstr ""
+
+#: src/main/util.c:1969
 #, fuzzy
 msgid "all arguments must be named"
 msgstr "os atributos devem ter nome"
 
-#: src/main/util.c:1893
+#: src/main/util.c:2091
 msgid "ICU is not supported on this build"
 msgstr "ICU não é suportado nessa plataforma"
 
-#: src/main/util.c:1954
+#: src/main/util.c:2158
 #, fuzzy
 msgid "'breaks' is not sorted"
 msgstr "tipo '%s' não é suportado"
 
-#: src/main/util.c:1988 src/main/util.c:2034
+#: src/main/util.c:2192 src/main/util.c:2242
 #, fuzzy, c-format
 msgid "long vector '%s' is not supported"
 msgstr "tipo '%s' não é suportado"
 
-#: src/main/util.c:2087
+#: src/main/util.c:2296
 msgid "'eps.correct' must be 0, 1, or 2"
 msgstr ""
 
-#: src/main/util.c:2115
+#: src/main/util.c:2324
 #, fuzzy
 msgid "'x' must be a vector"
 msgstr "'x' deve ser um vetor de caracteres"
@@ -6511,14 +6594,6 @@ msgstr ""
 "Digite 'q()' para sair do R.\n"
 "\n"
 
-#: src/main/vfonts.c:50
-msgid "vfont routines cannot be accessed in module"
-msgstr "rotinas vfont não podem ser acessadas no módulo"
-
-#: src/main/vfonts.c:67 src/main/vfonts.c:80 src/main/vfonts.c:98
-msgid "Hershey fonts cannot be loaded"
-msgstr "fontes Hershey não podem ser carregadas"
-
 #: src/main/xspline.c:60
 #, c-format
 msgid "add_point - reached MAXNUMPTS (%d)"
@@ -6542,7 +6617,7 @@ msgstr "Deve haver pelo menos quatro pontos de controle"
 msgid "There must be at least three control points"
 msgstr "Deve haver pelo menos três pontos de controle"
 
-#: src/modules/X11/dataentry.c:1871 src/modules/X11/devX11.c:1246
+#: src/modules/X11/dataentry.c:1874 src/modules/X11/devX11.c:1248
 #, c-format
 msgid "X11 protocol error: %s"
 msgstr "Erro no protocolo X11: %s"
@@ -6568,7 +6643,7 @@ msgstr ""
 "Erro: X11 não pode alocar cores adicionais.\n"
 "Considere usar o X11 com a opção colortype=\"pseudo.cube\" ou \"gray\""
 
-#: src/modules/X11/devX11.c:1027
+#: src/modules/X11/devX11.c:1029
 msgid ""
 "could not find any X11 fonts\n"
 "Check that the Font Path is correct."
@@ -6576,17 +6651,17 @@ msgstr ""
 "não foi possível achar nenhuma fonte X11\n"
 "Verifique se o caminho de fontes está correto."
 
-#: src/modules/X11/devX11.c:1087
+#: src/modules/X11/devX11.c:1089
 #, c-format
 msgid "X11 used font size %d when %d was requested"
 msgstr "X11 utilizou o tamanho de fonte %d ao invés do %d pedido"
 
-#: src/modules/X11/devX11.c:1121
+#: src/modules/X11/devX11.c:1123
 #, c-format
 msgid "X11 font %s, face %d at size %d could not be loaded"
 msgstr "fonte X11 %s, face %d e tamanho %d não pôde ser carregada"
 
-#: src/modules/X11/devX11.c:1130
+#: src/modules/X11/devX11.c:1132
 msgid ""
 "semi-transparency is not supported on this device: reported only once per "
 "page"
@@ -6594,12 +6669,12 @@ msgstr ""
 "semi-transparência não é suportada por este dispositivo: reportada somente "
 "uma vez por página"
 
-#: src/modules/X11/devX11.c:1254
+#: src/modules/X11/devX11.c:1256
 #, c-format
 msgid "X11 I/O error while opening X11 connection to '%s'"
 msgstr "Erro de E/S X11 enquanto abrindo conexão X11 para '%s'"
 
-#: src/modules/X11/devX11.c:1272
+#: src/modules/X11/devX11.c:1273
 msgid "X11 fatal IO error: please save work and shut down R"
 msgstr "Erro de E/S: por favor salve o seu trabalho atual e feche o R"
 
@@ -6722,206 +6797,271 @@ msgstr "impossível criar Ximage"
 msgid "attempt to use the locator after dev.hold()"
 msgstr ""
 
-#: src/modules/X11/devX11.c:3111
+#: src/modules/X11/devX11.c:3117
 #, c-format
 msgid "unable to start device %s"
 msgstr "não foi possível iniciar o dispositivo %s"
 
-#: src/modules/X11/devX11.c:3138
+#: src/modules/X11/devX11.c:3144
 msgid "invalid 'width' or 'height'"
 msgstr "'width' ou 'height' inválidos"
 
-#: src/modules/X11/devX11.c:3145
+#: src/modules/X11/devX11.c:3151
 msgid "invalid colortype passed to X11 driver"
 msgstr "tipo de cor inválido passado para o driver X11"
 
-#: src/modules/X11/devX11.c:3159
+#: src/modules/X11/devX11.c:3165
 msgid "unknown X11 color/colour model -- using monochrome"
 msgstr "modo de cor X11 desconhecido -- usando modo monocromático"
 
-#: src/modules/X11/devX11.c:3249
+#: src/modules/X11/devX11.c:3255
 msgid "no plot on device to save"
 msgstr "nenhum histórico de gráfico disponível pra salvar"
 
-#: src/modules/X11/devX11.c:3251
+#: src/modules/X11/devX11.c:3257
 msgid "not an open X11cairo device"
 msgstr "não existe um dispositivo X11cairo aberto"
 
-#: src/modules/X11/devX11.c:3260
+#: src/modules/X11/devX11.c:3266
 #, c-format
 msgid "cannot open file '%s'"
 msgstr "não foi possível abrir o arquivo '%s'"
 
-#: src/modules/X11/devX11.c:3277
+#: src/modules/X11/devX11.c:3283
 msgid "savePlot() is not supported on this build"
 msgstr "savePlot() não está suportado nesta compilação"
 
-#: src/modules/X11/devX11.c:3317
+#: src/modules/X11/devX11.c:3323
 msgid "unable to contact X11 display"
 msgstr "não foi possível abrir conexão com o dispositivo X11"
 
-#: src/modules/X11/devX11.c:3366
+#: src/modules/X11/devX11.c:3372
 #, c-format
 msgid "clipboard cannot be read (error code %d)"
 msgstr "área de transferência não pode ser lida (código de erro %d)"
 
-#: src/modules/X11/devX11.c:3397
+#: src/modules/X11/devX11.c:3408
 msgid "cannot allocate memory for X11Routines structure"
 msgstr "não foi possível alocar memória para estrutura do tipo X11Routines"
 
-#: src/modules/internet/internet.c:188 src/modules/internet/internet.c:192
-#: src/modules/internet/internet.c:198 src/modules/internet/internet.c:210
+#: src/modules/internet/internet.c:113
+msgid "for https:// URLs use method = \"wininet\""
+msgstr ""
+
+#: src/modules/internet/internet.c:153 src/modules/internet/internet.c:274
+#: src/modules/internet/internet.c:758
+#, fuzzy, c-format
+msgid "scheme not supported in URL '%s'"
+msgstr "reinícios não suportados em 'eval'"
+
+#: src/modules/internet/internet.c:348 src/modules/internet/internet.c:352
+#: src/modules/internet/internet.c:357 src/modules/internet/internet.c:381
+#: src/modules/internet/libcurl.c:791 src/modules/internet/libcurl.c:795
+#: src/modules/internet/libcurl.c:801 src/modules/internet/libcurl.c:814
+#: src/modules/internet/libcurl.c:822
 msgid "allocation of url connection failed"
 msgstr "alocação de conexão url falhou"
 
-#: src/modules/internet/internet.c:286
+#: src/modules/internet/internet.c:455
 msgid "only first element of 'url' argument used"
 msgstr "apenas o primeiro elemento do argumento 'url' foi utilizado"
 
-#: src/modules/internet/internet.c:292
+#: src/modules/internet/internet.c:461
 msgid "only first element of 'destfile' argument used"
 msgstr "apenas o primeiro elemento do argumento 'destfile' foi utilizado"
 
-#: src/modules/internet/internet.c:317
+#: src/modules/internet/internet.c:480 src/modules/internet/libcurl.c:499
 msgid "Download progress"
 msgstr "Download em progresso"
 
-#: src/modules/internet/internet.c:339
+#: src/modules/internet/internet.c:502
 #, c-format
 msgid "cannot open URL '%s', reason '%s'"
 msgstr "não foi possível abrir a URL '%s', motivo '%s'"
 
-#: src/modules/internet/internet.c:346 src/modules/internet/internet.c:372
-#: src/modules/internet/internet.c:474
+#: src/modules/internet/internet.c:509 src/modules/internet/internet.c:536
+#: src/modules/internet/internet.c:661
 #, c-format
 msgid "cannot open destfile '%s', reason '%s'"
 msgstr "não foi possível abrir o arquivo de destino '%s', motivo '%s'"
 
-#: src/modules/internet/internet.c:377 src/modules/internet/internet.c:479
+#: src/modules/internet/internet.c:541 src/modules/internet/internet.c:666
+#: src/modules/internet/libcurl.c:530
 #, c-format
 msgid "trying URL '%s'\n"
 msgstr "tentando a URL '%s'\n"
 
-#: src/modules/internet/internet.c:384 src/modules/internet/internet.c:486
-msgid "opened URL\n"
-msgstr "URL aberta\n"
-
-#: src/modules/internet/internet.c:455 src/modules/internet/internet.c:560
-#, c-format
-msgid "downloaded length %d != reported length %d"
+#: src/modules/internet/internet.c:640 src/modules/internet/internet.c:751
+#: src/modules/internet/libcurl.c:578
+#, fuzzy, c-format
+msgid "downloaded length %0.f != reported length %0.f"
 msgstr "comprimento baixado %d != comprimento informado %d"
 
-#: src/modules/internet/internet.c:460 src/modules/internet/internet.c:565
+#: src/modules/internet/internet.c:645 src/modules/internet/internet.c:756
 #, c-format
 msgid "cannot open URL '%s'"
 msgstr "não foi possível abrir a URL '%s'"
 
-#: src/modules/internet/internet.c:593 src/modules/internet/internet.c:828
-#, c-format
-msgid "cannot open: HTTP status was '%d %s'"
+#: src/modules/internet/internet.c:779 src/modules/internet/internet.c:944
+#, fuzzy, c-format
+msgid "cannot open URL '%s': HTTP status was '%d %s'"
 msgstr "não foi possível abrir: status HTTP foi '%d %s'"
 
-#: src/modules/internet/internet.c:772 src/modules/internet/internet.c:935
-msgid "InternetOpenUrl timed out"
-msgstr "Tempo limite esgotado em InternetOpenUrl"
-
-#: src/modules/internet/internet.c:799 src/modules/internet/internet.c:813
-#: src/modules/internet/internet.c:957 src/modules/internet/internet.c:966
+#: src/modules/internet/internet.c:915 src/modules/internet/internet.c:929
+#: src/modules/internet/internet.c:1019 src/modules/internet/internet.c:1028
 #, c-format
 msgid "InternetOpenUrl failed: '%s'"
 msgstr "falha em InternetOpenUrl: '%s'"
 
-#: src/modules/internet/internet.c:870
-msgid "Internet read timed out"
-msgstr "Tempo limite esgotado na leitura via Internet"
+#: src/modules/internet/libcurl.c:159
+#, fuzzy, c-format
+msgid "URL '%s': status was '%d %s'"
+msgstr "não foi possível abrir: status HTTP foi '%d %s'"
+
+#: src/modules/internet/libcurl.c:163
+#, c-format
+msgid "URL '%s': status was '%s'"
+msgstr ""
+
+#: src/modules/internet/libcurl.c:240
+#, fuzzy
+msgid "curlGetHeaders is not supported on this platform"
+msgstr "nsl() não é suportado nessa plataforma"
+
+#: src/modules/internet/libcurl.c:249 src/modules/internet/libcurl.c:252
+#, fuzzy, c-format
+msgid "invalid %s argument"
+msgstr "argumento '%s' inválido"
+
+#: src/modules/internet/libcurl.c:269
+#, c-format
+msgid ""
+"libcurl error code %d\n"
+"\t%s\n"
+msgstr ""
+
+#: src/modules/internet/libcurl.c:404
+#, fuzzy
+msgid "download.file(method = \"libcurl\") is not supported on this platform"
+msgstr "nsl() não é suportado nessa plataforma"
+
+#: src/modules/internet/libcurl.c:420
+#, fuzzy
+msgid "lengths of 'url' and 'destfile' must match"
+msgstr "comprimentos dos nomes de importação e exportação devem ser iguais"
 
-#: src/modules/internet/nanoftp.c:288 src/modules/internet/nanoftp.c:301
-#: src/modules/internet/nanoftp.c:312 src/modules/internet/nanoftp.c:346
-#: src/modules/internet/nanoftp.c:356
+#: src/modules/internet/libcurl.c:481
+#, fuzzy, c-format
+msgid "URL %s: cannot open destfile '%s', reason '%s'"
+msgstr "não foi possível abrir o arquivo de destino '%s', motivo '%s'"
+
+#: src/modules/internet/libcurl.c:593
+#, fuzzy
+msgid "cannot download all files"
+msgstr "não foi possível abrir o arquivo '%s'"
+
+#: src/modules/internet/libcurl.c:727
+#, fuzzy
+msgid "cannot read from connection"
+msgstr "não é possível ler a partir desta conexão"
+
+#: src/modules/internet/libcurl.c:763
+#, fuzzy
+msgid "cannot open connection"
+msgstr "não é possível abrir a conexão"
+
+#: src/modules/internet/libcurl.c:826
+#, fuzzy
+msgid "url(method = \"libcurl\") is not supported on this platform"
+msgstr "nsl() não é suportado nessa plataforma"
+
+#: src/modules/internet/nanoftp.c:289 src/modules/internet/nanoftp.c:302
+#: src/modules/internet/nanoftp.c:313 src/modules/internet/nanoftp.c:347
+#: src/modules/internet/nanoftp.c:357
 msgid "RxmlNanoFTPScanURL: overlong (invalid?) URL"
 msgstr "RxmlNanoFTPScanURL: URL longa de mais (inválida?)"
 
-#: src/modules/internet/nanoftp.c:389
+#: src/modules/internet/nanoftp.c:390
 msgid "removing FTP proxy info"
 msgstr "removendo informação de proxy FTP"
 
-#: src/modules/internet/nanoftp.c:391
+#: src/modules/internet/nanoftp.c:392
 #, c-format
 msgid "using FTP proxy '%s'"
 msgstr "usando proxy FTP '%s'"
 
-#: src/modules/internet/nanoftp.c:402 src/modules/internet/nanoftp.c:431
+#: src/modules/internet/nanoftp.c:403 src/modules/internet/nanoftp.c:432
 msgid "RxmlNanoFTPScanProxy: overlong (invalid?) URL"
 msgstr "RxmlNanoFTPScanProxy: URL longa de mais (inválida?)"
 
-#: src/modules/internet/nanoftp.c:830
+#: src/modules/internet/nanoftp.c:833
 msgid "cannot resolve host"
 msgstr "não foi possível resolver o servidor"
 
-#: src/modules/internet/nanoftp.c:860
+#: src/modules/internet/nanoftp.c:863
 msgid "failed to connect to server"
 msgstr "falha na conexão com servidor"
 
-#: src/modules/internet/nanoftp.c:871
+#: src/modules/internet/nanoftp.c:874
 msgid "failed to get response from server"
 msgstr "falha ao obter resposta do servidor"
 
-#: src/modules/internet/nanoftp.c:1134
+#: src/modules/internet/nanoftp.c:1137
 msgid "RxmlNanoFTPGetConnection: failed to create socket"
 msgstr "RxmlNanoFTPGetConnection: falha ao criar soquete"
 
-#: src/modules/internet/nanoftp.c:1180
+#: src/modules/internet/nanoftp.c:1183
 msgid "failed to create a data connection"
 msgstr "falha ao criar conexão de dados"
 
-#: src/modules/internet/nanoftp.c:1188
+#: src/modules/internet/nanoftp.c:1191
 msgid "failed to bind a port"
 msgstr "falha ao vincular uma porta"
 
-#: src/modules/internet/nanoftp.c:1195
+#: src/modules/internet/nanoftp.c:1198
 #, c-format
 msgid "could not listen on port %d"
 msgstr "não foi possível escutar na porta %d"
 
-#: src/modules/internet/nanohttp.c:370 src/modules/internet/nanohttp.c:398
-#: src/modules/internet/nanohttp.c:407
+#: src/modules/internet/nanohttp.c:369 src/modules/internet/nanohttp.c:400
+#: src/modules/internet/nanohttp.c:412
 msgid "RxmlNanoHTTPScanURL: overlong (invalid?) URL"
 msgstr "RxmlNanoHTTPScanURL: URL longa de mais (inválida?)"
 
-#: src/modules/internet/nanohttp.c:441
+#: src/modules/internet/nanohttp.c:446
 msgid "removing HTTP proxy info"
 msgstr "removendo informação sobre proxy HTTP"
 
-#: src/modules/internet/nanohttp.c:443
+#: src/modules/internet/nanohttp.c:448
 #, c-format
 msgid "using HTTP proxy '%s'"
 msgstr "usando proxy HTTP '%s'"
 
-#: src/modules/internet/nanohttp.c:454 src/modules/internet/nanohttp.c:490
+#: src/modules/internet/nanohttp.c:459 src/modules/internet/nanohttp.c:497
 msgid "RxmlNanoHTTPScanProxy: overlong (invalid?) URL"
 msgstr "RxmlNanoHTTPScanProxy: URL longa de mais (inválida?)"
 
-#: src/modules/internet/nanohttp.c:1107
+#: src/modules/internet/nanohttp.c:1135
 #, c-format
 msgid "unable to resolve '%s'"
 msgstr "não foi possível resolver '%s'"
 
-#: src/modules/internet/nanohttp.c:1134
+#: src/modules/internet/nanohttp.c:1168
 #, c-format
 msgid "connected to '%s' on port %d."
 msgstr "conectado a '%s' na porta %d."
 
-#: src/modules/internet/nanohttp.c:1139
+#: src/modules/internet/nanohttp.c:1173
 #, c-format
 msgid "unable to connect to '%s' on port %d."
 msgstr "não foi possível conectar a '%s' na porta %d."
 
-#: src/modules/internet/nanohttp.c:1443
+#: src/modules/internet/nanohttp.c:1477
 #, c-format
 msgid "redirect to: '%s'"
 msgstr "redirecionamento para: '%s'"
 
-#: src/modules/internet/nanohttp.c:1454
+#: src/modules/internet/nanohttp.c:1488
 msgid "too many redirects, aborting ..."
 msgstr "muitos redirecionamentos, abortando ..."
 
@@ -6956,11 +7096,11 @@ msgstr "tipo de argumento type[1]='%s' deve ser '1','O', ou 'I'"
 #: src/modules/lapack/Lapack.c:730 src/modules/lapack/Lapack.c:779
 #: src/modules/lapack/Lapack.c:786 src/modules/lapack/Lapack.c:834
 #: src/modules/lapack/Lapack.c:840 src/modules/lapack/Lapack.c:894
-#: src/modules/lapack/Lapack.c:900 src/modules/lapack/Lapack.c:1134
-#: src/modules/lapack/Lapack.c:1140 src/modules/lapack/Lapack.c:1188
-#: src/modules/lapack/Lapack.c:1195 src/modules/lapack/Lapack.c:1199
-#: src/modules/lapack/Lapack.c:1227 src/modules/lapack/Lapack.c:1234
-#: src/modules/lapack/Lapack.c:1254
+#: src/modules/lapack/Lapack.c:900 src/modules/lapack/Lapack.c:1135
+#: src/modules/lapack/Lapack.c:1141 src/modules/lapack/Lapack.c:1189
+#: src/modules/lapack/Lapack.c:1196 src/modules/lapack/Lapack.c:1200
+#: src/modules/lapack/Lapack.c:1228 src/modules/lapack/Lapack.c:1235
+#: src/modules/lapack/Lapack.c:1255
 #, c-format
 msgid "error code %d from Lapack routine '%s'"
 msgstr "erro de código %d na rotina Lapack '%s'"
@@ -7041,28 +7181,28 @@ msgstr "erro de código [%d] na rotina Lapack 'ztrcon()'"
 msgid "'a' must be a complex matrix"
 msgstr "'a' deve ser uma matriz complexa"
 
-#: src/modules/lapack/Lapack.c:535 src/modules/lapack/Lapack.c:1042
+#: src/modules/lapack/Lapack.c:535 src/modules/lapack/Lapack.c:1043
 msgid "'a' is 0-diml"
 msgstr "'a' tem dimensão 0"
 
-#: src/modules/lapack/Lapack.c:537 src/modules/lapack/Lapack.c:1044
+#: src/modules/lapack/Lapack.c:537 src/modules/lapack/Lapack.c:1045
 #, c-format
 msgid "'a' (%d x %d) must be square"
 msgstr "'a' (%d x %d) deve ser quadrada"
 
-#: src/modules/lapack/Lapack.c:543 src/modules/lapack/Lapack.c:1050
+#: src/modules/lapack/Lapack.c:543 src/modules/lapack/Lapack.c:1051
 msgid "no right-hand side in 'b'"
 msgstr "sem lado direito em 'b'"
 
 #: src/modules/lapack/Lapack.c:546 src/modules/lapack/Lapack.c:560
-#: src/modules/lapack/Lapack.c:1053 src/modules/lapack/Lapack.c:1069
+#: src/modules/lapack/Lapack.c:1054 src/modules/lapack/Lapack.c:1070
 #, c-format
 msgid "'b' (%d x %d) must be compatible with 'a' (%d x %d)"
 msgstr "'b' (%d x %d) deve ser compatível com 'a' (%d x %d)"
 
 #: src/modules/lapack/Lapack.c:581 src/modules/lapack/Lapack.c:948
-#: src/modules/lapack/Lapack.c:962 src/modules/lapack/Lapack.c:1017
-#: src/modules/lapack/Lapack.c:1091
+#: src/modules/lapack/Lapack.c:962 src/modules/lapack/Lapack.c:1018
+#: src/modules/lapack/Lapack.c:1092
 #, c-format
 msgid "argument %d of Lapack routine %s had invalid value"
 msgstr "argumento %d da rotina Lapack '%s' teve um valor inválido"
@@ -7072,7 +7212,7 @@ msgid "'b' must be a complex matrix"
 msgstr "'b' deve ser uma matriz complexa"
 
 #: src/modules/lapack/Lapack.c:670 src/modules/lapack/Lapack.c:716
-#: src/modules/lapack/Lapack.c:1181 src/modules/lapack/Lapack.c:1220
+#: src/modules/lapack/Lapack.c:1182 src/modules/lapack/Lapack.c:1221
 #, c-format
 msgid "right-hand side should have %d not %d rows"
 msgstr "termo do lado direito deve ter %d e não %d linhas"
@@ -7091,13 +7231,13 @@ msgstr ""
 msgid "'x' must be a square complex matrix"
 msgstr "'x' deve ser uma matriz quadrada numérica"
 
-#: src/modules/lapack/Lapack.c:926 src/modules/lapack/Lapack.c:1000
-#: src/modules/lapack/Lapack.c:1039 src/modules/lapack/Lapack.c:1114
-#: src/modules/lapack/Lapack.c:1245
+#: src/modules/lapack/Lapack.c:926 src/modules/lapack/Lapack.c:1001
+#: src/modules/lapack/Lapack.c:1040 src/modules/lapack/Lapack.c:1115
+#: src/modules/lapack/Lapack.c:1246
 msgid "'a' must be a numeric matrix"
 msgstr "'a' deve ser uma matriz numérica"
 
-#: src/modules/lapack/Lapack.c:933 src/modules/lapack/Lapack.c:1250
+#: src/modules/lapack/Lapack.c:933 src/modules/lapack/Lapack.c:1251
 msgid "'a' must be a square matrix"
 msgstr "'a' deve ser uma matriz quadrada"
 
@@ -7114,40 +7254,40 @@ msgstr "a submatriz de ordem %d não é positiva definida"
 msgid "the matrix is either rank-deficient or indefinite"
 msgstr ""
 
-#: src/modules/lapack/Lapack.c:987
+#: src/modules/lapack/Lapack.c:988
 msgid "'size' argument must be a positive integer"
 msgstr "argumento 'size' deve ser um inteiro positivo"
 
-#: src/modules/lapack/Lapack.c:1002
+#: src/modules/lapack/Lapack.c:1003
 #, c-format
 msgid "'size' cannot exceed ncol(x) = %d"
 msgstr "'size' não pode exceder ncol(x) = %d"
 
-#: src/modules/lapack/Lapack.c:1003
+#: src/modules/lapack/Lapack.c:1004
 #, c-format
 msgid "'size' cannot exceed nrow(x) = %d"
 msgstr "'size' não pode exceder nrow(x) = %d"
 
-#: src/modules/lapack/Lapack.c:1015
+#: src/modules/lapack/Lapack.c:1016
 #, c-format
 msgid "element (%d, %d) is zero, so the inverse cannot be computed"
 msgstr "elemento (%d,%d) é zero, e portanto a inversa não pode ser calculada"
 
-#: src/modules/lapack/Lapack.c:1094
+#: src/modules/lapack/Lapack.c:1095
 #, fuzzy, c-format
 msgid "Lapack routine %s: system is exactly singular: U[%d,%d] = 0"
 msgstr "rotina Lapack dgesv: sistema é exatamente singular"
 
-#: src/modules/lapack/Lapack.c:1102
+#: src/modules/lapack/Lapack.c:1103
 #, c-format
 msgid "system is computationally singular: reciprocal condition number = %g"
 msgstr "sistema é computacionalmente singular: condição recíproca número = %g"
 
-#: src/modules/lapack/Lapack.c:1174 src/modules/lapack/Lapack.c:1212
+#: src/modules/lapack/Lapack.c:1175 src/modules/lapack/Lapack.c:1213
 msgid "'b' must be a numeric matrix"
 msgstr "'b' deve ser uma matriz numérica"
 
-#: src/modules/lapack/Lapack.c:1246
+#: src/modules/lapack/Lapack.c:1247
 msgid "argument 'logarithm' must be logical"
 msgstr "argumento 'logarithm' deve ser lógico"
 
@@ -7156,8 +7296,8 @@ msgid "bessel_i allocation error"
 msgstr "erro de alocação em bessel_i"
 
 #: src/nmath/bessel_i.c:77 src/nmath/bessel_i.c:122
-#, c-format
-msgid "bessel_i(%g): ncalc (=%ld) != nb (=%ld); alpha=%g. Arg. out of range?\n"
+#, fuzzy, c-format
+msgid "bessel_i(%g): ncalc (=%d) != nb (=%d); alpha=%g. Arg. out of range?\n"
 msgstr ""
 "bessel_i(%g): ncalc (=%ld) != nb (=%ld); alpha=%g. Argumento fora de "
 "limites?\n"
@@ -7167,18 +7307,23 @@ msgstr ""
 msgid "bessel_i(%g,nu=%g): precision lost in result\n"
 msgstr "bessel_i(%g,nu=%g): precisão perdida no resultado\n"
 
-#: src/nmath/bessel_j.c:67
+#: src/nmath/bessel_j.c:64 src/nmath/bessel_j.c:118
+#, c-format
+msgid "besselJ(x, nu): nu=%g too large for bessel_j() algorithm"
+msgstr ""
+
+#: src/nmath/bessel_j.c:72
 msgid "bessel_j allocation error"
 msgstr "erro de alocação em bessel_j"
 
-#: src/nmath/bessel_j.c:75 src/nmath/bessel_j.c:118
-#, c-format
-msgid "bessel_j(%g): ncalc (=%ld) != nb (=%ld); alpha=%g. Arg. out of range?\n"
+#: src/nmath/bessel_j.c:80 src/nmath/bessel_j.c:127
+#, fuzzy, c-format
+msgid "bessel_j(%g): ncalc (=%d) != nb (=%d); alpha=%g. Arg. out of range?\n"
 msgstr ""
 "bessel_j(%g): ncalc (=%ld) != nb (=%ld); alpha=%g. Argumento fora de "
 "limites?\n"
 
-#: src/nmath/bessel_j.c:78 src/nmath/bessel_j.c:121
+#: src/nmath/bessel_j.c:83 src/nmath/bessel_j.c:130
 #, c-format
 msgid "bessel_j(%g,nu=%g): precision lost in result\n"
 msgstr "bessel_j(%g,nu=%g): precisão perdida no resultado\n"
@@ -7188,8 +7333,8 @@ msgid "bessel_k allocation error"
 msgstr "erro de alocação em bessel_k"
 
 #: src/nmath/bessel_k.c:71 src/nmath/bessel_k.c:108
-#, c-format
-msgid "bessel_k(%g): ncalc (=%ld) != nb (=%ld); alpha=%g. Arg. out of range?\n"
+#, fuzzy, c-format
+msgid "bessel_k(%g): ncalc (=%d) != nb (=%d); alpha=%g. Arg. out of range?\n"
 msgstr ""
 "bessel_k(%g): ncalc (=%ld) != nb (=%ld); alpha=%g. Argumento fora de "
 "limites?\n"
@@ -7199,18 +7344,23 @@ msgstr ""
 msgid "bessel_k(%g,nu=%g): precision lost in result\n"
 msgstr "bessel_k(%g,nu=%g): precisão perdida no resultado\n"
 
-#: src/nmath/bessel_y.c:66
+#: src/nmath/bessel_y.c:63 src/nmath/bessel_y.c:125
+#, c-format
+msgid "besselY(x, nu): nu=%g too large for bessel_y() algorithm"
+msgstr ""
+
+#: src/nmath/bessel_y.c:71
 msgid "bessel_y allocation error"
 msgstr "erro de alocação em bessel_y"
 
-#: src/nmath/bessel_y.c:82 src/nmath/bessel_y.c:127
-#, c-format
-msgid "bessel_y(%g): ncalc (=%ld) != nb (=%ld); alpha=%g. Arg. out of range?\n"
+#: src/nmath/bessel_y.c:87 src/nmath/bessel_y.c:136
+#, fuzzy, c-format
+msgid "bessel_y(%g): ncalc (=%d) != nb (=%d); alpha=%g. Arg. out of range?\n"
 msgstr ""
 "bessel_y(%g): ncalc (=%ld) != nb (=%ld); alpha=%g. Argumento fora de "
 "limites?\n"
 
-#: src/nmath/bessel_y.c:85 src/nmath/bessel_y.c:130
+#: src/nmath/bessel_y.c:90 src/nmath/bessel_y.c:139
 #, c-format
 msgid "bessel_y(%g,nu=%g): precision lost in result\n"
 msgstr "bessel_y(%g,nu=%g): precisão perdida no resultado\n"
@@ -7220,42 +7370,42 @@ msgstr "bessel_y(%g,nu=%g): precisão perdida no resultado\n"
 msgid "'k' (%.2f) must be integer, rounded to %.0f"
 msgstr ""
 
-#: src/nmath/nmath.h:141
+#: src/nmath/nmath.h:156
 #, c-format
 msgid "argument out of domain in '%s'\n"
 msgstr "argumento fora de domínio em '%s'\n"
 
-#: src/nmath/nmath.h:144
+#: src/nmath/nmath.h:159
 #, c-format
 msgid "value out of range in '%s'\n"
 msgstr "valor fora de limites em '%s'\n"
 
-#: src/nmath/nmath.h:147
+#: src/nmath/nmath.h:162
 #, c-format
 msgid "convergence failed in '%s'\n"
 msgstr "convergência falhou em '%s'\n"
 
-#: src/nmath/nmath.h:150
+#: src/nmath/nmath.h:165
 #, c-format
 msgid "full precision may not have been achieved in '%s'\n"
 msgstr "precisão completa pode não ser conseguida em '%s'\n"
 
-#: src/nmath/nmath.h:153
+#: src/nmath/nmath.h:168
 #, c-format
 msgid "underflow occurred in '%s'\n"
 msgstr "transbordamento ocorreu em '%s'\n"
 
-#: src/nmath/pbeta.c:48
+#: src/nmath/pbeta.c:64
 #, c-format
-msgid "pbeta_raw() -> bratio() gave error code %d"
+msgid "pbeta_raw(%g, a=%g, b=%g, ..) -> bratio() gave error code %d"
 msgstr ""
 
-#: src/nmath/pnbinom.c:79
+#: src/nmath/pnbinom.c:82
 #, c-format
 msgid "pnbinom_mu() -> bratio() gave error code %d"
 msgstr ""
 
-#: src/nmath/pnchisq.c:246
+#: src/nmath/pnchisq.c:295
 #, c-format
 msgid "pnchisq(x=%g, ..): not converged in %d iter."
 msgstr "pnchisq(x=%g, ..): não houve convergência em %d iterações"
@@ -7297,7 +7447,7 @@ msgstr "rotinas X11 não podem ser acessadas em módulo"
 msgid "X11 module cannot be loaded"
 msgstr "módulo X11 não pode ser carregado"
 
-#: src/unix/X11.c:126 src/unix/X11.c:132 src/unix/X11.c:138 src/unix/X11.c:144
+#: src/unix/X11.c:144 src/unix/X11.c:150 src/unix/X11.c:156 src/unix/X11.c:162
 msgid "X11 is not available"
 msgstr "X11 não está disponível"
 
@@ -7331,7 +7481,7 @@ msgstr ""
 "Carregamento dinâmico preguiçoso explícito não suportado nessa plataforma. "
 "Usando padrão."
 
-#: src/unix/dynload.c:240
+#: src/unix/dynload.c:232
 msgid "cannot get working directory!"
 msgstr "não foi possível obter o diretório de trabalho!"
 
@@ -7347,12 +7497,12 @@ msgstr ""
 "Uma circunstância rara ocorreu no aninhamento da entrada readline. Por favor "
 "informe usando bug.report()"
 
-#: src/unix/sys-std.c:1082 src/unix/sys-std.c:1249
+#: src/unix/sys-std.c:1085 src/unix/sys-std.c:1255
 #, c-format
 msgid "problem in saving the history file '%s'"
 msgstr "problema ao salvar o arquivo de histórico '%s'"
 
-#: src/unix/sys-std.c:1156
+#: src/unix/sys-std.c:1162
 #, c-format
 msgid ""
 "Cannot open file '%s': %s\n"
@@ -7361,85 +7511,213 @@ msgstr ""
 "Não foi possível abrir o arquivo '%s': %s\n"
 "\n"
 
-#: src/unix/sys-std.c:1220 src/unix/sys-std.c:1243
+#: src/unix/sys-std.c:1226 src/unix/sys-std.c:1249
 msgid "'file' argument is too long"
 msgstr "argumento 'file' é muito longo"
 
-#: src/unix/sys-std.c:1226 src/unix/sys-std.c:1228
+#: src/unix/sys-std.c:1232 src/unix/sys-std.c:1234
 msgid "no history mechanism available"
 msgstr "nenhum mecanismo de histórico disponível"
 
-#: src/unix/sys-std.c:1255
+#: src/unix/sys-std.c:1261
 msgid "problem in truncating the history file"
 msgstr "problema no truncamento do arquivo de histórico"
 
-#: src/unix/sys-std.c:1257 src/unix/sys-std.c:1259
+#: src/unix/sys-std.c:1263 src/unix/sys-std.c:1265
 msgid "no history available to save"
 msgstr "nenhum histórico disponível pra salvar"
 
-#: src/unix/sys-std.c:1271
+#: src/unix/sys-std.c:1277
 msgid "invalid timestamp"
 msgstr "etiqueta de tempo inválida"
 
-#: src/unix/sys-unix.c:251
+#: src/unix/sys-unix.c:248
 msgid "non-empty character argument expected"
 msgstr "argumento caractere não vazio esperado"
 
-#: src/unix/sys-unix.c:254
+#: src/unix/sys-unix.c:251
 msgid "'intern' must be logical and not NA"
 msgstr "'intern' deve ser um valor lógico e não NA"
 
-#: src/unix/sys-unix.c:266
+#: src/unix/sys-unix.c:269
 #, c-format
 msgid "cannot popen '%s', probable reason '%s'"
 msgstr "não foi possível abrir o arquivo '%s', motivo '%s'"
 
-#: src/unix/sys-unix.c:271
+#: src/unix/sys-unix.c:279
 #, c-format
 msgid "line %d may be truncated in call to system(, intern = TRUE)"
 msgstr "linha %d pode ser truncada na chamada de system(, intern = TRUE)"
 
-#: src/unix/sys-unix.c:288
+#: src/unix/sys-unix.c:301
 #, c-format
 msgid "error in running command: '%s'"
 msgstr "erro ao executar o comando: '%s'"
 
-#: src/unix/sys-unix.c:290
+#: src/unix/sys-unix.c:303
 msgid "error in running command"
 msgstr "erro ao executar comando"
 
-#: src/unix/sys-unix.c:294
+#: src/unix/sys-unix.c:307
 #, c-format
 msgid "running command '%s' had status %d and error message '%s'"
 msgstr "execução do comando '%s' deve status %d e mensagem de erro '%s'"
 
-#: src/unix/sys-unix.c:399
+#: src/unix/sys-unix.c:412
 msgid "Sys.info() is not implemented on this system"
 msgstr "Sys.info() não está implementado nesse sistema"
 
-#: src/unix/system.c:257
+#: src/unix/system.c:267
 #, c-format
 msgid "WARNING: --gui or -g without value ignored"
 msgstr "ATENÇÃO: --gui ou -g sem especificação e ignorado"
 
-#: src/unix/system.c:275
+#: src/unix/system.c:285
 #, c-format
 msgid "WARNING: unknown gui '%s', using X11\n"
 msgstr "ATENÇÃO: interface gráfica desconhecida '%s', usando X11\n"
 
-#: src/unix/system.c:278
+#: src/unix/system.c:288
 #, c-format
 msgid "WARNING: unknown gui '%s', using none\n"
 msgstr "ATENÇÃO: interface gráfica '%s' desconhecida, usando nenhuma\n"
 
-#: src/unix/system.c:388
+#: src/unix/system.c:373
 msgid "creating temporary file for '-e' failed"
 msgstr "criação de arquivo temporário para '-e' falhou"
 
-#: src/unix/system.c:469
+#: src/unix/system.c:454
 msgid "WARNING: Only editing the first in the list of files"
 msgstr "ATENÇÃO: Somente editando o primeiro arquivo da lista"
 
+#~ msgid "'what' must be a character string or a function"
+#~ msgstr "'what' deve ser uma cadeia de caracteres ou uma função"
+
+#~ msgid "sockets are not available on this system"
+#~ msgstr "soquetes não estão disponíveis nesse sistema"
+
+#~ msgid "no function to restart"
+#~ msgstr "nenhuma função para reiniciar"
+
+#~ msgid "argument must be a closure"
+#~ msgstr "argumento deve ser um objeto do tipo closure"
+
+#~ msgid "'hostname' must be a character vector of length 1"
+#~ msgstr "'hostname' deve ser um vetor de caracteres de comprimento 1"
+
+#~ msgid "nsl() was unable to resolve host '%s'"
+#~ msgstr "resolução de máquina '%s' impossível em nsl()"
+
+#, fuzzy
+#~ msgid "unknown format returned by C function 'gethostbyname'"
+#~ msgstr "formato desconhecido retornado por gethostbyname"
+
+#~ msgid "nsl() is not supported on this platform"
+#~ msgstr "nsl() não é suportado nessa plataforma"
+
+#~ msgid "too large a range of values in 'x'"
+#~ msgstr "intervalo de valores muito grande em 'x'"
+
+#~ msgid "non-numeric argument"
+#~ msgstr "argumento não numérico"
+
+#~ msgid "unsupported URL scheme"
+#~ msgstr "esquema de URL não suportado"
+
+#~ msgid "'dimnames' must be a list"
+#~ msgstr "'dimnames' deve ser uma lista"
+
+#~ msgid "'args' must be a list"
+#~ msgstr "'args' deve ser uma lista"
+
+#~ msgid "binary operations require two arguments"
+#~ msgstr "operações binárias requerem dois argumentos"
+
+#~ msgid "opened URL\n"
+#~ msgstr "URL aberta\n"
+
+#~ msgid "internet routines were already initialized"
+#~ msgstr "rotinas de internet já foram inicializadas"
+
+#~ msgid "'msg1' must be a character string"
+#~ msgstr "'msg1' deve ser uma string de caracteres"
+
+#~ msgid "'msg2' must be a character string"
+#~ msgstr "'msg2' deve ser uma string de caracteres"
+
+#~ msgid "argument 'code' must be a character string"
+#~ msgstr "argumento 'code' deve ser uma string de caracteres"
+
+#, fuzzy
+#~ msgid "argument 'type' must be a character string"
+#~ msgstr "argumento 'code' deve ser uma string de caracteres"
+
+#~ msgid "InternetOpenUrl timed out"
+#~ msgstr "Tempo limite esgotado em InternetOpenUrl"
+
+#~ msgid "Internet read timed out"
+#~ msgstr "Tempo limite esgotado na leitura via Internet"
+
+#~ msgid "unable to find a closure from within which 'match.call' was called"
+#~ msgstr ""
+#~ "não foi possível encontrar o fechamento de onde a chamada 'match.call' "
+#~ "foi iniciada"
+
+#~ msgid "vfont routines cannot be accessed in module"
+#~ msgstr "rotinas vfont não podem ser acessadas no módulo"
+
+#~ msgid "Hershey fonts cannot be loaded"
+#~ msgstr "fontes Hershey não podem ser carregadas"
+
+#, fuzzy
+#~ msgid "invalid generic function in 'usemethod'"
+#~ msgstr "Função genérica inválida em 'usemethod'"
+
+#, fuzzy
+#~ msgid "'UseMethod' called from outside a function"
+#~ msgstr "'NextMethod' chamado fora de uma função"
+
+#~ msgid "first argument must be a generic name"
+#~ msgstr "primeiro argumento deve ser um nome genérico"
+
+#~ msgid ""
+#~ "explicit request not to duplicate arguments in call to '%s', but argument "
+#~ "%d is of the wrong type (%d != %d)"
+#~ msgstr ""
+#~ "requerimento explicito para não duplicação de argumentos na chamada de "
+#~ "'%s', mas o argumento %d é do tipo errado (%d != %d)"
+
+#~ msgid "character variables must be duplicated in .C/.Fortran"
+#~ msgstr "variáveis do tipo caractere devem ser duplicadas em .C/.Fortran"
+
+#~ msgid "call name too long in '%s'"
+#~ msgstr "nome de chamada muito longo em '%s'"
+
+#~ msgid "generic name too long in '%s'"
+#~ msgstr "nome genérico muito longo em '%s'"
+
+#~ msgid "method name too long in '%s'"
+#~ msgstr "nome do método muito longo em '%s'"
+
+#~ msgid "%d arguments passed to 'log' which requires 1 or 2"
+#~ msgstr "%d argumentos passados para 'log', que requer 1 ou 2"
+
+#~ msgid ""
+#~ "Warning in %s :\n"
+#~ "  %s\n"
+#~ msgstr ""
+#~ "Aviso em %s :\n"
+#~ "  %s\n"
+
+#~ msgid "input"
+#~ msgstr "entrada"
+
+#~ msgid "symbol"
+#~ msgstr "símbolo"
+
+#~ msgid "assignment"
+#~ msgstr "atribuição"
+
 #~ msgid "negative value in 'x'"
 #~ msgstr "valor negativo em 'x'"
 
@@ -7538,9 +7816,6 @@ msgstr "ATENÇÃO: Somente editando o primeiro arquivo da lista"
 #~ msgid "invalid return value count in call_R"
 #~ msgstr "contagem de valor de retorno inválida em call_R"
 
-#~ msgid "internal error in unz code"
-#~ msgstr "erro interno no código unz"
-
 #~ msgid "can't use R profiling while byte code profiling"
 #~ msgstr ""
 #~ "não é possível usar o verificador de desempenho do R enquanto fazendo "
@@ -7714,15 +7989,9 @@ msgstr "ATENÇÃO: Somente editando o primeiro arquivo da lista"
 #~ msgid "'title' must be a character string"
 #~ msgstr "'title' deve ser uma string de caracteres"
 
-#~ msgid "'text' must be a character string"
-#~ msgstr "'title' deve ser uma cadeia de caracteres"
-
 #~ msgid "'%s' must be length 1"
 #~ msgstr "'%s' deve ter comprimento 1"
 
-#~ msgid "'%s' must be a list"
-#~ msgstr "'%s' deve ser uma lista"
-
 #~ msgid "'%s' element %d is not a window handle"
 #~ msgstr "'%s' elemento %d não é um identificador de janela válido"
 
@@ -7750,9 +8019,6 @@ msgstr "ATENÇÃO: Somente editando o primeiro arquivo da lista"
 #~ msgid "'file' is not a connection"
 #~ msgstr "'file' não é uma conexão"
 
-#~ msgid "'dec' must be a single character"
-#~ msgstr "'dec' deve ser um único caractere"
-
 #~ msgid "corrupt data frame -- length of column %d does not not match nrows"
 #~ msgstr ""
 #~ "data frame corrupto -- comprimento da coluna %d não corresponde a nrows"
diff --git a/src/library/base/po/ru.po b/src/library/base/po/ru.po
index e31b474..eefa38c 100644
--- a/src/library/base/po/ru.po
+++ b/src/library/base/po/ru.po
@@ -10,17 +10,16 @@ msgid ""
 msgstr ""
 "Project-Id-Version: R 2.11.0\n"
 "Report-Msgid-Bugs-To: bugs.r-project.org\n"
-"POT-Creation-Date: 2014-03-27 07:46+0000\n"
-"PO-Revision-Date: 2014-03-11 10:26-0600\n"
+"POT-Creation-Date: 2015-06-06 13:51+0100\n"
+"PO-Revision-Date: 2016-04-05 18:20-0600\n"
 "Last-Translator: Alexey Shipunov <dactylorhiza at gmail.com>\n"
 "Language-Team: Russian\n"
-"Language: \n"
+"Language: ru\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
 "First-Translator: Dmitri I GOULIAEV <dmitri.gouliaev at telkel.net\n"
-"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n"
-"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
+"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
 
 #: src/appl/optim.c:60
 msgid "non-finite value supplied by 'optim'"
@@ -55,15 +54,15 @@ msgstr "Yе могу вычислить значение функции при 
 msgid "unknown type in \"CG\" method of 'optim'"
 msgstr "неизвестный тип в \"CG\"-методе 'optim'"
 
-#: src/appl/optim.c:665
+#: src/appl/optim.c:662
 msgid "REPORT must be > 0 (method = \"L-BFGS-B\")"
 msgstr "'REPORT' должен быть > 0 (method = \"L-BFGS-B\")"
 
-#: src/appl/optim.c:688
+#: src/appl/optim.c:685
 msgid "L-BFGS-B needs finite values of 'fn'"
 msgstr "для 'L-BFGS-B' нужны конечные значения 'fn'"
 
-#: src/appl/optim.c:744
+#: src/appl/optim.c:741
 msgid "trace, REPORT must be >= 0 (method = \"SANN\")"
 msgstr "'trace', 'REPORT' должен быть >= 0 (method = \"SANN\")"
 
@@ -84,7 +83,9 @@ msgstr "DLL пыталась изменить контрольное слово
 msgid "cannot get working directory"
 msgstr "не могу попасть в рабочую папку"
 
-#: src/gnuwin32/extra.c:61 src/gnuwin32/extra.c:89 src/gnuwin32/extra.c:128
+#: src/gnuwin32/extra.c:61
+#: src/gnuwin32/extra.c:89
+#: src/gnuwin32/extra.c:128
 msgid "R_HOME not set"
 msgstr "R_HOME не установлен"
 
@@ -128,257 +129,455 @@ msgstr "в доступе к '%ls' отказано"
 msgid "problem in displaying '%ls'"
 msgstr "проблема при отображении '%ls'"
 
-#: src/gnuwin32/extra.c:116 src/gnuwin32/extra.c:159 src/gnuwin32/extra.c:349
-#: src/gnuwin32/extra.c:577 src/gnuwin32/extra.c:602 src/main/agrep.c:131
-#: src/main/agrep.c:135 src/main/agrep.c:775 src/main/agrep.c:780
-#: src/main/apply.c:293 src/main/apply.c:295 src/main/apply.c:298
-#: src/main/array.c:87 src/main/array.c:1137 src/main/array.c:1263
-#: src/main/array.c:1265 src/main/array.c:1266 src/main/array.c:1592
-#: src/main/array.c:1594 src/main/array.c:1596 src/main/attrib.c:196
-#: src/main/builtin.c:88 src/main/builtin.c:97 src/main/builtin.c:116
-#: src/main/builtin.c:118 src/main/builtin.c:147 src/main/builtin.c:534
-#: src/main/builtin.c:550 src/main/builtin.c:739 src/main/builtin.c:741
-#: src/main/builtin.c:743 src/main/character.c:139 src/main/character.c:142
-#: src/main/character.c:203 src/main/character.c:1037
-#: src/main/character.c:1041 src/main/character.c:1276
-#: src/main/character.c:1280 src/main/character.c:1341
-#: src/main/character.c:1344 src/main/connections.c:1217
-#: src/main/connections.c:1223 src/main/connections.c:1226
-#: src/main/connections.c:1230 src/main/connections.c:1375
-#: src/main/connections.c:1391 src/main/connections.c:1396
-#: src/main/connections.c:1996 src/main/connections.c:2002
-#: src/main/connections.c:2006 src/main/connections.c:2010
-#: src/main/connections.c:2015 src/main/connections.c:2665
-#: src/main/connections.c:2670 src/main/connections.c:2673
-#: src/main/connections.c:2676 src/main/connections.c:3057
-#: src/main/connections.c:3062 src/main/connections.c:3068
-#: src/main/connections.c:3071 src/main/connections.c:3075
-#: src/main/connections.c:3090 src/main/connections.c:3140
-#: src/main/connections.c:3145 src/main/connections.c:3149
-#: src/main/connections.c:3153 src/main/connections.c:3157
-#: src/main/connections.c:3163 src/main/connections.c:3210
-#: src/main/connections.c:3216 src/main/connections.c:3220
-#: src/main/connections.c:3270 src/main/connections.c:3273
-#: src/main/connections.c:3547 src/main/connections.c:3550
-#: src/main/connections.c:3553 src/main/connections.c:3559
-#: src/main/connections.c:3666 src/main/connections.c:3672
-#: src/main/connections.c:3675 src/main/connections.c:3826
-#: src/main/connections.c:3829 src/main/connections.c:3833
-#: src/main/connections.c:3836 src/main/connections.c:3956
-#: src/main/connections.c:4074 src/main/connections.c:4077
-#: src/main/connections.c:4414 src/main/connections.c:4439
-#: src/main/connections.c:4474 src/main/connections.c:4489
-#: src/main/connections.c:4497 src/main/connections.c:4523
-#: src/main/connections.c:4669 src/main/connections.c:4673
-#: src/main/connections.c:4801 src/main/connections.c:4803
-#: src/main/connections.c:4805 src/main/connections.c:4833
-#: src/main/connections.c:4965 src/main/connections.c:4991
-#: src/main/connections.c:4995 src/main/connections.c:4999
-#: src/main/connections.c:5003 src/main/context.c:596 src/main/context.c:605
-#: src/main/context.c:609 src/main/datetime.c:775 src/main/datetime.c:865
-#: src/main/datetime.c:867 src/main/datetime.c:871 src/main/datetime.c:1026
-#: src/main/datetime.c:1028 src/main/datetime.c:1232 src/main/debug.c:228
-#: src/main/deparse.c:397 src/main/dotcode.c:478 src/main/dotcode.c:482
-#: src/main/dotcode.c:487 src/main/dounzip.c:322 src/main/dounzip.c:329
-#: src/main/dounzip.c:339 src/main/dounzip.c:344 src/main/dounzip.c:348
-#: src/main/dounzip.c:352 src/main/envir.c:1618 src/main/envir.c:1621
-#: src/main/envir.c:1742 src/main/envir.c:1747 src/main/envir.c:1813
-#: src/main/envir.c:1829 src/main/envir.c:1835 src/main/envir.c:1932
-#: src/main/envir.c:1940 src/main/envir.c:1947 src/main/envir.c:1958
-#: src/main/envir.c:2172 src/main/envir.c:2293 src/main/envir.c:2552
-#: src/main/envir.c:2762 src/main/envir.c:2776 src/main/envir.c:2783
-#: src/main/envir.c:2799 src/main/envir.c:3367 src/main/errors.c:1030
-#: src/main/eval.c:397 src/main/eval.c:406 src/main/eval.c:409
-#: src/main/grep.c:767 src/main/grep.c:772 src/main/grep.c:1061
-#: src/main/grep.c:1063 src/main/grep.c:1065 src/main/grep.c:1510
-#: src/main/grep.c:1514 src/main/grep.c:1519 src/main/grep.c:2323
-#: src/main/grep.c:2328 src/main/grep.c:2621 src/main/grep.c:2626
-#: src/main/memory.c:3736 src/main/paste.c:96 src/main/paste.c:395
-#: src/main/paste.c:402 src/main/paste.c:409 src/main/paste.c:414
-#: src/main/paste.c:419 src/main/paste.c:424 src/main/paste.c:427
-#: src/main/paste.c:435 src/main/paste.c:601 src/main/paste.c:606
-#: src/main/platform.c:306 src/main/platform.c:308 src/main/platform.c:310
-#: src/main/platform.c:326 src/main/platform.c:337 src/main/platform.c:390
-#: src/main/platform.c:392 src/main/platform.c:705 src/main/platform.c:707
-#: src/main/platform.c:1064 src/main/platform.c:1070 src/main/platform.c:1073
-#: src/main/platform.c:1076 src/main/platform.c:1079 src/main/platform.c:1082
-#: src/main/platform.c:1085 src/main/platform.c:1088 src/main/platform.c:1185
-#: src/main/platform.c:1188 src/main/platform.c:1191 src/main/platform.c:1229
-#: src/main/platform.c:1286 src/main/platform.c:1289 src/main/platform.c:1498
-#: src/main/platform.c:1501 src/main/platform.c:1504 src/main/platform.c:1540
-#: src/main/platform.c:1543 src/main/platform.c:1546 src/main/platform.c:1629
-#: src/main/platform.c:1645 src/main/platform.c:1684 src/main/platform.c:1686
-#: src/main/platform.c:1757 src/main/platform.c:1841 src/main/platform.c:2116
-#: src/main/platform.c:2176 src/main/platform.c:2353 src/main/platform.c:2356
-#: src/main/platform.c:2359 src/main/platform.c:2362 src/main/platform.c:2365
-#: src/main/platform.c:2368 src/main/platform.c:2568 src/main/platform.c:2571
-#: src/main/platform.c:2574 src/main/platform.c:2577 src/main/platform.c:2580
-#: src/main/platform.c:2583 src/main/platform.c:2657 src/main/platform.c:2665
-#: src/main/platform.c:2701 src/main/platform.c:2751 src/main/print.c:242
-#: src/main/print.c:248 src/main/print.c:270 src/main/print.c:276
-#: src/main/print.c:283 src/main/random.c:478 src/main/random.c:482
-#: src/main/random.c:489 src/main/random.c:517 src/main/saveload.c:1950
-#: src/main/saveload.c:1953 src/main/saveload.c:1956 src/main/saveload.c:2072
-#: src/main/saveload.c:2252 src/main/saveload.c:2257 src/main/saveload.c:2260
-#: src/main/saveload.c:2366 src/main/scan.c:684 src/main/scan.c:853
-#: src/main/scan.c:867 src/main/scan.c:871 src/main/scan.c:873
-#: src/main/scan.c:884 src/main/scan.c:911 src/main/scan.c:914
-#: src/main/scan.c:917 src/main/scan.c:972 src/main/seq.c:618
-#: src/main/seq.c:623 src/main/seq.c:631 src/main/seq.c:662 src/main/seq.c:666
-#: src/main/seq.c:672 src/main/seq.c:680 src/main/sort.c:175
-#: src/main/sysutils.c:585 src/main/sysutils.c:589 src/main/sysutils.c:593
-#: src/main/sysutils.c:599 src/main/sysutils.c:603 src/main/sysutils.c:1831
-#: src/main/sysutils.c:1835 src/main/unique.c:966 src/main/unique.c:1289
-#: src/main/unique.c:1349 src/main/unique.c:1356 src/main/unique.c:1750
-#: src/main/util.c:581 src/main/util.c:584 src/main/util.c:1825
-#: src/main/util.c:1994 src/main/util.c:1995 src/main/util.c:1996
-#: src/main/util.c:2013 src/main/util.c:2037 src/main/util.c:2041
-#: src/main/util.c:2043 src/main/util.c:2068 src/main/util.c:2070
-#: src/main/util.c:2072 src/main/util.c:2075 src/main/util.c:2078
-#: src/main/util.c:2082 src/main/util.c:2084 src/modules/X11/devX11.c:3241
-#: src/modules/X11/devX11.c:3244 src/modules/X11/devX11.c:3247
-#: src/modules/X11/devX11.c:3271 src/modules/internet/internet.c:284
-#: src/modules/internet/internet.c:290 src/modules/internet/internet.c:296
-#: src/modules/internet/internet.c:299 src/modules/internet/internet.c:303
-#: src/modules/lapack/Lapack.c:155 src/modules/lapack/Lapack.c:261
-#: src/modules/lapack/Lapack.c:709 src/modules/lapack/Lapack.c:818
-#: src/modules/lapack/Lapack.c:880 src/modules/lapack/Lapack.c:1214
-#: src/unix/sys-std.c:1217 src/unix/sys-std.c:1240
+#: src/gnuwin32/extra.c:116
+#: src/gnuwin32/extra.c:158
+#: src/gnuwin32/extra.c:334
+#: src/gnuwin32/extra.c:560
+#: src/gnuwin32/extra.c:585
+#: src/main/agrep.c:131
+#: src/main/agrep.c:135
+#: src/main/agrep.c:776
+#: src/main/agrep.c:781
+#: src/main/apply.c:330
+#: src/main/apply.c:332
+#: src/main/apply.c:335
+#: src/main/array.c:87
+#: src/main/array.c:1241
+#: src/main/array.c:1367
+#: src/main/array.c:1369
+#: src/main/array.c:1370
+#: src/main/array.c:1713
+#: src/main/array.c:1715
+#: src/main/array.c:1717
+#: src/main/attrib.c:190
+#: src/main/builtin.c:88
+#: src/main/builtin.c:97
+#: src/main/builtin.c:116
+#: src/main/builtin.c:118
+#: src/main/builtin.c:148
+#: src/main/builtin.c:559
+#: src/main/builtin.c:575
+#: src/main/builtin.c:764
+#: src/main/builtin.c:766
+#: src/main/builtin.c:768
+#: src/main/character.c:159
+#: src/main/character.c:162
+#: src/main/character.c:167
+#: src/main/character.c:1086
+#: src/main/character.c:1090
+#: src/main/character.c:1325
+#: src/main/character.c:1329
+#: src/main/character.c:1390
+#: src/main/character.c:1393
+#: src/main/connections.c:1208
+#: src/main/connections.c:1214
+#: src/main/connections.c:1217
+#: src/main/connections.c:1221
+#: src/main/connections.c:1367
+#: src/main/connections.c:1383
+#: src/main/connections.c:1388
+#: src/main/connections.c:1989
+#: src/main/connections.c:1995
+#: src/main/connections.c:1999
+#: src/main/connections.c:2003
+#: src/main/connections.c:2008
+#: src/main/connections.c:2659
+#: src/main/connections.c:2664
+#: src/main/connections.c:2667
+#: src/main/connections.c:2670
+#: src/main/connections.c:3053
+#: src/main/connections.c:3058
+#: src/main/connections.c:3064
+#: src/main/connections.c:3067
+#: src/main/connections.c:3071
+#: src/main/connections.c:3086
+#: src/main/connections.c:3136
+#: src/main/connections.c:3141
+#: src/main/connections.c:3145
+#: src/main/connections.c:3149
+#: src/main/connections.c:3153
+#: src/main/connections.c:3159
+#: src/main/connections.c:3207
+#: src/main/connections.c:3213
+#: src/main/connections.c:3217
+#: src/main/connections.c:3268
+#: src/main/connections.c:3271
+#: src/main/connections.c:3545
+#: src/main/connections.c:3548
+#: src/main/connections.c:3551
+#: src/main/connections.c:3557
+#: src/main/connections.c:3664
+#: src/main/connections.c:3670
+#: src/main/connections.c:3673
+#: src/main/connections.c:3825
+#: src/main/connections.c:3828
+#: src/main/connections.c:3832
+#: src/main/connections.c:3835
+#: src/main/connections.c:3956
+#: src/main/connections.c:4078
+#: src/main/connections.c:4081
+#: src/main/connections.c:4418
+#: src/main/connections.c:4443
+#: src/main/connections.c:4478
+#: src/main/connections.c:4493
+#: src/main/connections.c:4501
+#: src/main/connections.c:4527
+#: src/main/connections.c:4673
+#: src/main/connections.c:4677
+#: src/main/connections.c:4805
+#: src/main/connections.c:4807
+#: src/main/connections.c:4809
+#: src/main/connections.c:4837
+#: src/main/connections.c:4975
+#: src/main/connections.c:5004
+#: src/main/connections.c:5008
+#: src/main/connections.c:5012
+#: src/main/connections.c:5016
+#: src/main/context.c:611
+#: src/main/context.c:620
+#: src/main/context.c:624
+#: src/main/datetime.c:785
+#: src/main/datetime.c:875
+#: src/main/datetime.c:877
+#: src/main/datetime.c:881
+#: src/main/datetime.c:1042
+#: src/main/datetime.c:1044
+#: src/main/datetime.c:1249
+#: src/main/debug.c:241
+#: src/main/deparse.c:407
+#: src/main/dotcode.c:496
+#: src/main/dotcode.c:500
+#: src/main/dotcode.c:505
+#: src/main/dounzip.c:323
+#: src/main/dounzip.c:330
+#: src/main/dounzip.c:340
+#: src/main/dounzip.c:345
+#: src/main/dounzip.c:349
+#: src/main/dounzip.c:353
+#: src/main/envir.c:1750
+#: src/main/envir.c:1753
+#: src/main/envir.c:1874
+#: src/main/envir.c:1879
+#: src/main/envir.c:1943
+#: src/main/envir.c:1959
+#: src/main/envir.c:1965
+#: src/main/envir.c:2077
+#: src/main/envir.c:2085
+#: src/main/envir.c:2092
+#: src/main/envir.c:2103
+#: src/main/envir.c:2335
+#: src/main/envir.c:2456
+#: src/main/envir.c:2753
+#: src/main/envir.c:3007
+#: src/main/envir.c:3021
+#: src/main/envir.c:3028
+#: src/main/envir.c:3044
+#: src/main/envir.c:3627
+#: src/main/errors.c:1044
+#: src/main/eval.c:396
+#: src/main/eval.c:405
+#: src/main/eval.c:408
+#: src/main/grep.c:780
+#: src/main/grep.c:785
+#: src/main/grep.c:1079
+#: src/main/grep.c:1081
+#: src/main/grep.c:1083
+#: src/main/grep.c:1528
+#: src/main/grep.c:1532
+#: src/main/grep.c:1537
+#: src/main/grep.c:2345
+#: src/main/grep.c:2350
+#: src/main/grep.c:2649
+#: src/main/grep.c:2654
+#: src/main/memory.c:3799
+#: src/main/paste.c:96
+#: src/main/paste.c:392
+#: src/main/paste.c:399
+#: src/main/paste.c:406
+#: src/main/paste.c:411
+#: src/main/paste.c:416
+#: src/main/paste.c:421
+#: src/main/paste.c:424
+#: src/main/paste.c:432
+#: src/main/paste.c:599
+#: src/main/paste.c:604
+#: src/main/platform.c:306
+#: src/main/platform.c:308
+#: src/main/platform.c:310
+#: src/main/platform.c:326
+#: src/main/platform.c:337
+#: src/main/platform.c:390
+#: src/main/platform.c:392
+#: src/main/platform.c:705
+#: src/main/platform.c:707
+#: src/main/platform.c:796
+#: src/main/platform.c:1134
+#: src/main/platform.c:1140
+#: src/main/platform.c:1143
+#: src/main/platform.c:1146
+#: src/main/platform.c:1149
+#: src/main/platform.c:1152
+#: src/main/platform.c:1155
+#: src/main/platform.c:1158
+#: src/main/platform.c:1255
+#: src/main/platform.c:1258
+#: src/main/platform.c:1261
+#: src/main/platform.c:1299
+#: src/main/platform.c:1357
+#: src/main/platform.c:1360
+#: src/main/platform.c:1569
+#: src/main/platform.c:1572
+#: src/main/platform.c:1575
+#: src/main/platform.c:1611
+#: src/main/platform.c:1614
+#: src/main/platform.c:1617
+#: src/main/platform.c:1700
+#: src/main/platform.c:1716
+#: src/main/platform.c:1749
+#: src/main/platform.c:1751
+#: src/main/platform.c:1822
+#: src/main/platform.c:1906
+#: src/main/platform.c:2199
+#: src/main/platform.c:2259
+#: src/main/platform.c:2436
+#: src/main/platform.c:2439
+#: src/main/platform.c:2442
+#: src/main/platform.c:2445
+#: src/main/platform.c:2448
+#: src/main/platform.c:2451
+#: src/main/platform.c:2656
+#: src/main/platform.c:2659
+#: src/main/platform.c:2662
+#: src/main/platform.c:2665
+#: src/main/platform.c:2668
+#: src/main/platform.c:2671
+#: src/main/platform.c:2749
+#: src/main/platform.c:2757
+#: src/main/platform.c:2793
+#: src/main/platform.c:2843
+#: src/main/print.c:242
+#: src/main/print.c:248
+#: src/main/print.c:270
+#: src/main/print.c:276
+#: src/main/print.c:283
+#: src/main/random.c:467
+#: src/main/random.c:471
+#: src/main/random.c:478
+#: src/main/random.c:506
+#: src/main/saveload.c:1950
+#: src/main/saveload.c:1953
+#: src/main/saveload.c:1956
+#: src/main/saveload.c:2072
+#: src/main/saveload.c:2252
+#: src/main/saveload.c:2257
+#: src/main/saveload.c:2260
+#: src/main/saveload.c:2364
+#: src/main/scan.c:684
+#: src/main/scan.c:853
+#: src/main/scan.c:867
+#: src/main/scan.c:871
+#: src/main/scan.c:873
+#: src/main/scan.c:884
+#: src/main/scan.c:911
+#: src/main/scan.c:914
+#: src/main/scan.c:917
+#: src/main/scan.c:972
+#: src/main/seq.c:622
+#: src/main/seq.c:627
+#: src/main/seq.c:635
+#: src/main/seq.c:666
+#: src/main/seq.c:670
+#: src/main/seq.c:676
+#: src/main/seq.c:684
+#: src/main/sort.c:175
+#: src/main/sysutils.c:591
+#: src/main/sysutils.c:595
+#: src/main/sysutils.c:599
+#: src/main/sysutils.c:605
+#: src/main/sysutils.c:609
+#: src/main/sysutils.c:1781
+#: src/main/sysutils.c:1785
+#: src/main/unique.c:969
+#: src/main/unique.c:1277
+#: src/main/unique.c:1281
+#: src/main/unique.c:1291
+#: src/main/unique.c:1685
+#: src/main/util.c:636
+#: src/main/util.c:639
+#: src/main/util.c:1375
+#: src/main/util.c:1389
+#: src/main/util.c:1971
+#: src/main/util.c:2192
+#: src/main/util.c:2193
+#: src/main/util.c:2194
+#: src/main/util.c:2211
+#: src/main/util.c:2235
+#: src/main/util.c:2239
+#: src/main/util.c:2241
+#: src/main/util.c:2266
+#: src/main/util.c:2268
+#: src/main/util.c:2270
+#: src/main/util.c:2273
+#: src/main/util.c:2276
+#: src/main/util.c:2280
+#: src/main/util.c:2282
+#: src/modules/X11/devX11.c:3241
+#: src/modules/X11/devX11.c:3244
+#: src/modules/X11/devX11.c:3247
+#: src/modules/X11/devX11.c:3271
+#: src/modules/internet/internet.c:453
+#: src/modules/internet/internet.c:459
+#: src/modules/internet/internet.c:465
+#: src/modules/internet/internet.c:468
+#: src/modules/internet/internet.c:472
+#: src/modules/internet/internet.c:476
+#: src/modules/internet/libcurl.c:316
+#: src/modules/internet/libcurl.c:320
+#: src/modules/internet/libcurl.c:325
+#: src/modules/internet/libcurl.c:328
+#: src/modules/internet/libcurl.c:332
+#: src/modules/lapack/Lapack.c:155
+#: src/modules/lapack/Lapack.c:261
+#: src/modules/lapack/Lapack.c:709
+#: src/modules/lapack/Lapack.c:818
+#: src/modules/lapack/Lapack.c:880
+#: src/modules/lapack/Lapack.c:1215
+#: src/unix/sys-std.c:1220
+#: src/unix/sys-std.c:1243
 #, c-format
 msgid "invalid '%s' argument"
 msgstr "неправильный аргумент '%s'"
 
-#: src/gnuwin32/extra.c:183
+#: src/gnuwin32/extra.c:182
 msgid "unsupported version of Windows"
 msgstr "неподдерживаемая версия Windows"
 
-#: src/gnuwin32/extra.c:267 src/main/apply.c:105 src/main/character.c:595
-#: src/main/connections.c:3555 src/main/context.c:642 src/main/context.c:661
-#: src/main/datetime.c:675 src/main/datetime.c:777 src/main/datetime.c:1030
-#: src/main/dotcode.c:199 src/main/errors.c:929 src/main/errors.c:962
-#: src/main/errors.c:1065 src/main/errors.c:1090 src/main/errors.c:1095
-#: src/main/errors.c:1368 src/main/identical.c:66 src/main/identical.c:67
-#: src/main/identical.c:68 src/main/identical.c:69 src/main/identical.c:70
-#: src/main/seq.c:185 src/main/seq.c:341 src/main/seq.c:346 src/main/seq.c:350
-#: src/main/seq.c:391 src/main/seq.c:395 src/main/seq.c:399
-#: src/main/sort.c:1224 src/main/sort.c:1307 src/main/sort.c:1311
-#: src/main/sort.c:1318 src/main/sort.c:1393 src/main/source.c:220
-#: src/main/summary.c:886 src/main/sysutils.c:251 src/main/util.c:986
-#: src/main/util.c:991 src/main/util.c:998 src/main/util.c:1001
-#: src/modules/X11/devX11.c:3142 src/modules/X11/devX11.c:3169
-#: src/modules/X11/devX11.c:3174 src/modules/X11/devX11.c:3179
-#: src/modules/X11/devX11.c:3189 src/modules/X11/devX11.c:3194
-#: src/modules/X11/devX11.c:3198 src/modules/X11/devX11.c:3202
-#: src/unix/sys-std.c:1291
-#, c-format
-msgid "invalid '%s' value"
-msgstr "неправильное значение '%s'"
-
-#: src/gnuwin32/extra.c:308 src/gnuwin32/extra.c:321
+#: src/gnuwin32/extra.c:299
+#: src/gnuwin32/extra.c:310
 msgid "incorrect argument"
 msgstr "неправильный аргумент"
 
-#: src/gnuwin32/extra.c:312
+#: src/gnuwin32/extra.c:302
 msgid "don't be silly!: your machine has a 4Gb address limit"
 msgstr "не делайте глупости: у Вашей машины лимит адресов 4Gb!"
 
-#: src/gnuwin32/extra.c:316
+#: src/gnuwin32/extra.c:306
 msgid "cannot decrease memory limit: ignored"
 msgstr "не могу уменьшить предел памяти: пропущено"
 
-#: src/gnuwin32/extra.c:428 src/gnuwin32/extra.c:529 src/main/util.c:897
+#: src/gnuwin32/extra.c:413
+#: src/gnuwin32/extra.c:514
+#: src/main/util.c:958
 msgid "'path' must be a character vector"
 msgstr "'path' должен быть текстовым вектором"
 
-#: src/gnuwin32/extra.c:579 src/gnuwin32/extra.c:581 src/gnuwin32/extra.c:604
-#: src/gnuwin32/extra.c:606 src/gnuwin32/extra.c:641 src/main/gevents.c:61
+#: src/gnuwin32/extra.c:562
+#: src/gnuwin32/extra.c:564
+#: src/gnuwin32/extra.c:587
+#: src/gnuwin32/extra.c:589
+#: src/gnuwin32/extra.c:624
+#: src/main/gevents.c:61
 #: src/main/gevents.c:98
 msgid "invalid device"
 msgstr "неправильное устройство"
 
-#: src/gnuwin32/extra.c:582
+#: src/gnuwin32/extra.c:565
 msgid "requires SDI mode"
 msgstr "требует SDI-вида"
 
-#: src/gnuwin32/extra.c:635 src/main/gevents.c:58 src/main/gevents.c:95
+#: src/gnuwin32/extra.c:618
+#: src/main/gevents.c:58
+#: src/main/gevents.c:95
 msgid "invalid graphical device number"
 msgstr "неправильный номер графического устройства"
 
-#: src/gnuwin32/extra.c:645
+#: src/gnuwin32/extra.c:628
 msgid "bad device"
 msgstr "плохое устройство"
 
-#: src/gnuwin32/extra.c:799 src/gnuwin32/extra.c:807
+#: src/gnuwin32/extra.c:782
+#: src/gnuwin32/extra.c:790
 msgid "invalid input in 'Rmbstowcs'"
 msgstr "неправильный ввод в 'Rmbstowcs'"
 
-#: src/gnuwin32/extra.c:830 src/main/platform.c:1261
+#: src/gnuwin32/extra.c:813
+#: src/main/platform.c:1332
 msgid "file choice cancelled"
 msgstr "выбор файла отменен"
 
-#: src/gnuwin32/run.c:242
+#: src/gnuwin32/run.c:244
 #, c-format
 msgid "'CreateProcess' failed to run '%s'"
 msgstr "'CreateProcess' не удалось запустить '%s'"
 
-#: src/gnuwin32/run.c:344
+#: src/gnuwin32/run.c:346
 msgid "Child process not responding.  R will terminate it."
 msgstr "Дочерний процесс не отвечает. R закроет его."
 
-#: src/gnuwin32/run.c:402
+#: src/gnuwin32/run.c:404
 #, c-format
 msgid "Exit code was %d"
 msgstr "Код выхода был %d"
 
-#: src/gnuwin32/run.c:434
+#: src/gnuwin32/run.c:436
 msgid "Insufficient memory (rpipeOpen)"
 msgstr "Недостаточно памяти (rpipeOpen)"
 
-#: src/gnuwin32/run.c:648 src/main/dounzip.c:482
+#: src/gnuwin32/run.c:650
+#: src/main/dounzip.c:481
 msgid "seek not enabled for this connection"
 msgstr "поиск для этого соединения не разрешен"
 
-#: src/gnuwin32/run.c:654
+#: src/gnuwin32/run.c:656
 msgid "truncate not enabled for this connection"
 msgstr "укорочение для этого соединения не разрешено"
 
-#: src/gnuwin32/run.c:729 src/gnuwin32/run.c:733 src/gnuwin32/run.c:746
-#: src/gnuwin32/run.c:774 src/main/connections.c:1330
-#: src/main/connections.c:1334 src/main/connections.c:1340
-#: src/main/connections.c:1354
+#: src/gnuwin32/run.c:731
+#: src/gnuwin32/run.c:735
+#: src/gnuwin32/run.c:748
+#: src/gnuwin32/run.c:776
+#: src/main/connections.c:1322
+#: src/main/connections.c:1326
+#: src/main/connections.c:1332
+#: src/main/connections.c:1346
 msgid "allocation of pipe connection failed"
 msgstr "выделение соединения по каналу не удалось"
 
-#: src/gnuwin32/run.c:788
+#: src/gnuwin32/run.c:790
 msgid "'names' is not a character vector"
 msgstr "'names' не является текстовым вектором"
 
-#: src/gnuwin32/sys-win32.c:182
+#: src/gnuwin32/sys-win32.c:179
 msgid "character string expected as first argument"
 msgstr "первый аргумент должен быть текстовой строкой"
 
-#: src/gnuwin32/sys-win32.c:191
+#: src/gnuwin32/sys-win32.c:188
 msgid "character string expected as third argument"
 msgstr "третий аргумент должен быть текстовой строкой"
 
-#: src/gnuwin32/sys-win32.c:257 src/unix/sys-unix.c:299
+#: src/gnuwin32/sys-win32.c:254
+#: src/unix/sys-unix.c:295
 #, c-format
 msgid "running command '%s' had status %d"
 msgstr "работающая команда '%s' имеет статус %d"
 
-#: src/gnuwin32/system.c:122 src/unix/sys-unix.c:427
+#: src/gnuwin32/system.c:122
+#: src/unix/sys-unix.c:423
 msgid "reached session elapsed time limit"
 msgstr "достигнуто сессионное ограничение времени операции"
 
-#: src/gnuwin32/system.c:124 src/unix/sys-unix.c:429
+#: src/gnuwin32/system.c:124
+#: src/unix/sys-unix.c:425
 msgid "reached elapsed time limit"
 msgstr "достигнуто ограничение времени операции"
 
-#: src/gnuwin32/system.c:130 src/unix/sys-unix.c:435
+#: src/gnuwin32/system.c:130
+#: src/unix/sys-unix.c:431
 msgid "reached session CPU time limit"
 msgstr "достигнуто сессионное ограничение времени ЦПУ"
 
-#: src/gnuwin32/system.c:132 src/unix/sys-unix.c:437
+#: src/gnuwin32/system.c:132
+#: src/unix/sys-unix.c:433
 msgid "reached CPU time limit"
 msgstr "достигнуто ограничение времени ЦПУ"
 
@@ -387,22 +586,30 @@ msgstr "достигнуто ограничение времени ЦПУ"
 msgid "Fatal error: %s\n"
 msgstr "Фатальная ошибка: %s\n"
 
-#: src/gnuwin32/system.c:335 src/unix/sys-std.c:863
+#: src/gnuwin32/system.c:335
+#: src/unix/sys-std.c:866
 #, c-format
 msgid "encoding '%s' is not recognised"
 msgstr "кодировка '%s' не распознана"
 
-#: src/gnuwin32/system.c:341 src/unix/sys-std.c:869
+#: src/gnuwin32/system.c:341
+#: src/unix/sys-std.c:872
 #, c-format
 msgid "<ERROR: re-encoding failure from encoding '%s'>\n"
 msgstr "<ОШИБКА: неудачная перекодировка из '%s'>\n"
 
-#: src/gnuwin32/system.c:555 src/gnuwin32/system.c:1049
-#: src/gnuwin32/system.c:1061 src/main/connections.c:590
-#: src/main/connections.c:595 src/main/dounzip.c:177 src/main/saveload.c:1961
-#: src/main/serialize.c:2552 src/main/serialize.c:2557
-#: src/main/serialize.c:2642 src/main/serialize.c:2687 src/unix/system.c:323
-#: src/unix/system.c:343
+#: src/gnuwin32/system.c:555
+#: src/gnuwin32/system.c:1047
+#: src/gnuwin32/system.c:1059
+#: src/main/connections.c:581
+#: src/main/connections.c:586
+#: src/main/dounzip.c:178
+#: src/main/saveload.c:1961
+#: src/main/serialize.c:2598
+#: src/main/serialize.c:2603
+#: src/main/serialize.c:2688
+#: src/main/serialize.c:2733
+#: src/unix/system.c:328
 #, c-format
 msgid "cannot open file '%s': %s"
 msgstr "не могу открыть файл '%s': %s"
@@ -412,82 +619,89 @@ msgstr "не могу открыть файл '%s': %s"
 msgid "file.show(): file '%s' does not exist\n"
 msgstr "file.show(): файл '%s' не существует\n"
 
-#: src/gnuwin32/system.c:970
+#: src/gnuwin32/system.c:968
 #, c-format
 msgid "WARNING: R_MAX_MEM_SIZE value is invalid: ignored\n"
 msgstr "ВНИМАНИЕ: R_MAX_MEM_SIZE значение неправильное: пропущено\n"
 
-#: src/gnuwin32/system.c:1002
+#: src/gnuwin32/system.c:1000
 msgid "WARNING: no max-mem-size given\n"
 msgstr "ВНИМАНИЕ: не задан max-mem-size\n"
 
-#: src/gnuwin32/system.c:1009
+#: src/gnuwin32/system.c:1007
 #, c-format
 msgid "WARNING: --max-mem-size value is invalid: ignored\n"
 msgstr "ВНИМАНИЕ: значение --max-mem-size неверное: пропущено\n"
 
-#: src/gnuwin32/system.c:1012
+#: src/gnuwin32/system.c:1010
 #, c-format
 msgid "WARNING: --max-mem-size=%lu%c: too large and ignored\n"
 msgstr "ВНИМАНИЕ: --max-mem-size=%lu%c: слишком велик и пропущен\n"
 
-#: src/gnuwin32/system.c:1018
+#: src/gnuwin32/system.c:1016
 #, c-format
 msgid "WARNING: --max-mem-size=%4.1fM: too small and ignored\n"
 msgstr "ВНИМАНИЕ: --max-mem-size =%4.1fM слишком мал и пропущен\n"
 
-#: src/gnuwin32/system.c:1023
+#: src/gnuwin32/system.c:1021
 #, c-format
 msgid "WARNING: --max-mem-size=%4.0fM: too large and taken as %uM\n"
 msgstr "ВНИМАНИЕ: --max-mem-size =%4.0fM: слишком велик, установлен в %uM\n"
 
-#: src/gnuwin32/system.c:1039
-#, fuzzy, c-format
+#: src/gnuwin32/system.c:1037
+#, c-format
 msgid "option '%s' requires an argument"
-msgstr "бинарные операторы требуют два аргумента"
+msgstr "опция '%s' требует аргумент"
 
-#: src/gnuwin32/system.c:1070
-#, fuzzy, c-format
+#: src/gnuwin32/system.c:1068
+#, c-format
 msgid "option '%s' requires a non-empty argument"
-msgstr "бинарные операторы требуют два аргумента"
+msgstr "опция '%s' требует непустой аргумент"
 
-#: src/gnuwin32/system.c:1078 src/unix/system.c:362
+#: src/gnuwin32/system.c:1076
+#: src/unix/system.c:347
 #, c-format
 msgid "WARNING: '-e %s' omitted as input is too long\n"
 msgstr "WARNING: '-e %s', пропущенная при вводе, слишком длинная\n"
 
-#: src/gnuwin32/system.c:1082 src/unix/system.c:375
+#: src/gnuwin32/system.c:1080
+#: src/unix/system.c:360
 #, c-format
 msgid "WARNING: unknown option '%s'\n"
 msgstr "ВНИМАНИЕ: неизвестный параметр '%s'\n"
 
-#: src/gnuwin32/system.c:1104 src/unix/system.c:379
+#: src/gnuwin32/system.c:1102
+#: src/unix/system.c:364
 #, c-format
 msgid "ARGUMENT '%s' __ignored__\n"
 msgstr "АРГУМЕНТ '%s' __пропущен__\n"
 
-#: src/gnuwin32/system.c:1110 src/unix/system.c:386
+#: src/gnuwin32/system.c:1108
+#: src/unix/system.c:371
 msgid "cannot use -e with -f or --file"
 msgstr "не могу использовать -e вместе с -f или --file"
 
-#: src/gnuwin32/system.c:1128
+#: src/gnuwin32/system.c:1126
 msgid "creation of tmpfile failed -- set TMPDIR suitably?"
 msgstr "создание временного файла не удалось -- установить подходящую TMPDIR?"
 
-#: src/gnuwin32/system.c:1147 src/unix/system.c:437
+#: src/gnuwin32/system.c:1145
+#: src/unix/system.c:422
 msgid "you must specify '--save', '--no-save' or '--vanilla'"
 msgstr "Вы должны задать '--save', '--no-save' или '--vanilla'"
 
-#: src/gnuwin32/system.c:1152
-msgid ""
-"impossible to create 'reader thread'; you must free some system resources"
-msgstr ""
-"невозможно создать 'reader thread'; Вы должны освободить какие-нибудь "
-"системные ресурсы"
-
-#: src/include/Errormsg.h:25 src/main/subscript.c:375 src/main/subscript.c:393
-#: src/main/subscript.c:417 src/main/subscript.c:456 src/main/subscript.c:584
-#: src/main/subscript.c:623 src/main/subscript.c:766
+#: src/gnuwin32/system.c:1150
+msgid "impossible to create 'reader thread'; you must free some system resources"
+msgstr "невозможно создать 'reader thread'; Вы должны освободить какие-нибудь системные ресурсы"
+
+#: src/include/Errormsg.h:25
+#: src/main/subscript.c:390
+#: src/main/subscript.c:408
+#: src/main/subscript.c:432
+#: src/main/subscript.c:471
+#: src/main/subscript.c:652
+#: src/main/subscript.c:691
+#: src/main/subscript.c:834
 msgid "subscript out of bounds"
 msgstr "подгруппа выходит за пределы"
 
@@ -536,80 +750,76 @@ msgstr "ВНИМАНИЕ: значение '--max-ppsize' слишком мал
 msgid "WARNING: '--max-ppsize' value is too large: ignored"
 msgstr "ВНИМАНИЕ: значение '--max-ppsize' слишком велико: пропущено"
 
-#: src/main/RNG.c:175
+#: src/main/RNG.c:176
 #, c-format
 msgid "unif_rand: unimplemented RNG kind %d"
 msgstr "unif_rand: нереализованный вид RNG %d"
 
-#: src/main/RNG.c:260
+#: src/main/RNG.c:261
 #, c-format
 msgid "FixupSeeds: unimplemented RNG kind %d"
 msgstr "FixupSeeds: нереализованный вид RNG %d"
 
-#: src/main/RNG.c:302
+#: src/main/RNG.c:301
 msgid "'user_unif_rand' not in load table"
 msgstr "'user_unif_rand' отсутствует в таблице загрузки"
 
-#: src/main/RNG.c:310
+#: src/main/RNG.c:309
 msgid "cannot read seeds unless 'user_unif_nseed' is supplied"
 msgstr "не могу прочитать seed пока не задано 'user_unif_nseed'"
 
-#: src/main/RNG.c:315
+#: src/main/RNG.c:314
 msgid "seed length must be in 0...625; ignored"
 msgstr "длина 'seed' должна быть в пределах 0...625; пропущено"
 
-#: src/main/RNG.c:323
+#: src/main/RNG.c:322
 #, c-format
 msgid "RNG_Init: unimplemented RNG kind %d"
 msgstr "RNG_Init: нереализованный вид RNG %d"
 
-#: src/main/RNG.c:354
+#: src/main/RNG.c:351
 msgid "'.Random.seed' is a missing argument with no default"
 msgstr "'.Random.seed': пропущенный аргумент без умолчания"
 
-#: src/main/RNG.c:355
-#, fuzzy, c-format
+#: src/main/RNG.c:352
+#, c-format
 msgid "'.Random.seed' is not an integer vector but of type '%s', so ignored"
-msgstr "'.Random.seed' не является целочисленным вектором, он типа '%s'"
+msgstr "'.Random.seed' не является целочисленным вектором, он типа '%s', и поэтому пропущен"
 
-#: src/main/RNG.c:363
-#, fuzzy
+#: src/main/RNG.c:360
 msgid "'.Random.seed[1]' is not a valid integer, so ignored"
-msgstr "'.Random.seed[1]' не является правильным целым числом"
+msgstr "'.Random.seed[1]' не является правильным целым числом, и поэтому пропущен"
 
-#: src/main/RNG.c:369
-#, fuzzy
+#: src/main/RNG.c:366
 msgid "'.Random.seed[1]' is not a valid Normal type, so ignored"
-msgstr "'.Random.seed[0]' неправильного Normal типа"
+msgstr "'.Random.seed[1]' неправильного Normal типа, и поэтому пропущен"
 
-#: src/main/RNG.c:383
-#, fuzzy
+#: src/main/RNG.c:380
 msgid "'.Random.seed[1] = 5' but no user-supplied generator, so ignored"
-msgstr "'.Random.seed[1] = 5', но нет пользовательского генератора"
+msgstr "'.Random.seed[1] = 5', но нет пользовательского генератора, и поэтому пропущен"
 
-#: src/main/RNG.c:388
-#, fuzzy
+#: src/main/RNG.c:385
 msgid "'.Random.seed[1]' is not a valid RNG kind so ignored"
-msgstr "'.Random.seed[1]' не является правильным видом RNG"
+msgstr "'.Random.seed[1]' не является правильным видом RNG, и поэтому пропущен"
 
-#: src/main/RNG.c:415
+#: src/main/RNG.c:412
 msgid "'.Random.seed' has wrong length"
 msgstr "'.Random.seed' имеет неправильную длину"
 
-#: src/main/RNG.c:468
+#: src/main/RNG.c:465
 #, c-format
 msgid "RNGkind: unimplemented RNG kind %d"
 msgstr "RNGkind: нереализованный вид RNG %d"
 
-#: src/main/RNG.c:488
+#: src/main/RNG.c:485
 msgid "invalid Normal type in 'RNGkind'"
 msgstr "у 'RNGkind' неправильный Normal тип"
 
-#: src/main/RNG.c:491
+#: src/main/RNG.c:488
 msgid "'user_norm_rand' not in load table"
 msgstr "'user_norm_rand' отсутствует в таблице загрузки"
 
-#: src/main/RNG.c:535
+#: src/main/RNG.c:532
 msgid "supplied seed is not a valid integer"
 msgstr "представленный 'seed' не является правильным целым числом"
 
@@ -634,11 +844,15 @@ msgstr "имя DLL '%s' слишком длинное"
 msgid "could not allocate space for 'name'"
 msgstr "не могу выделить место под 'имя'"
 
-#: src/main/Rdynload.c:881 src/main/Rdynload.c:897 src/main/util.c:698
+#: src/main/Rdynload.c:881
+#: src/main/Rdynload.c:897
+#: src/main/util.c:758
 msgid "character argument expected"
 msgstr "нужен текстовый аргумент"
 
-#: src/main/Rdynload.c:887 src/main/Rdynload.c:919 src/main/Rdynload.c:939
+#: src/main/Rdynload.c:887
+#: src/main/Rdynload.c:919
+#: src/main/Rdynload.c:939
 #, c-format
 msgid ""
 "unable to load shared object '%s':\n"
@@ -654,136 +868,233 @@ msgstr "разделяемый объект '%s' не был загружен"
 
 #: src/main/Rdynload.c:979
 #, c-format
-msgid "cannot allocate memory for registered native symbol (%d bytes)"
-msgstr ""
-"не могу разместить память для зарегистрированного native символа (%d байт)"
+msgid "cannot allocate memory for registered native symbol (%d byte)"
+msgid_plural "cannot allocate memory for registered native symbol (%d bytes)"
+msgstr[0] "не могу разместить память для зарегистрированного native символа (%d байт)"
+msgstr[1] "не могу разместить память для зарегистрированного native символа (%d байта)"
+msgstr[2] "не могу разместить память для зарегистрированного native символа (%d байтов)"
 
-#: src/main/Rdynload.c:1100 src/main/Rdynload.c:1321
+#: src/main/Rdynload.c:1102
+#: src/main/Rdynload.c:1323
 msgid "must pass package name or DllInfo reference"
 msgstr "должен передать имя пакета или ссылку DllInfo"
 
-#: src/main/Rdynload.c:1197
+#: src/main/Rdynload.c:1199
 #, c-format
 msgid "unimplemented type %d in 'createRSymbolObject'"
 msgstr "нереализованный тип %d у 'createRSymbolObject'"
 
-#: src/main/Rdynload.c:1279 src/main/Rdynload.c:1373
+#: src/main/Rdynload.c:1281
+#: src/main/Rdynload.c:1375
 msgid "R_getRegisteredRoutines() expects a DllInfo reference"
 msgstr "R_getRegisteredRoutines() ожидает ссылку DllInfo"
 
-#: src/main/Rdynload.c:1282 src/main/Rdynload.c:1376
+#: src/main/Rdynload.c:1284
+#: src/main/Rdynload.c:1378
 msgid "NULL value passed for DllInfo"
 msgstr "значение NULL передано для DllInfo"
 
-#: src/main/Rdynload.c:1436
+#: src/main/Rdynload.c:1441
 #, c-format
 msgid "function '%s' not provided by package '%s'"
 msgstr "функция '%s' не предусмотрена в пакете '%s'"
 
-#: src/main/Rdynload.c:1438
+#: src/main/Rdynload.c:1443
 msgid "table entry must be an external pointer"
 msgstr "вход таблицы должен быть внешним указателем"
 
-#: src/main/Renviron.c:159 src/main/Renviron.c:164
+#: src/main/Renviron.c:159
+#: src/main/Renviron.c:164
 #, c-format
 msgid "problem in setting variable '%s' in Renviron"
 msgstr "проблема установки переманной '%s' в Renviron"
 
 #: src/main/Renviron.c:311
-msgid "argument 'x' must be a character string"
-msgstr "аргумент 'x' должен быть текстовой строкой"
+#: src/main/objects.c:1147
+#: src/main/raw.c:150
+#, c-format
+msgid "argument '%s' must be a character string"
+msgstr "аргумент '%s' должен быть текстовой строкой"
 
 #: src/main/Renviron.c:315
 #, c-format
 msgid "file '%s' cannot be opened for reading"
 msgstr "файл '%s' не может быть открыт для чтения"
 
-#: src/main/Rstrptime.h:517 src/main/Rstrptime.h:984
+#: src/main/Rstrptime.h:524
+#: src/main/Rstrptime.h:991
 #, c-format
 msgid "use of %s for input is not supported"
 msgstr "использование '%s' для ввода не поддерживается"
 
-#: src/main/Rstrptime.h:1242
+#: src/main/Rstrptime.h:1263
 msgid "input string is too long"
 msgstr "введенная строка слишком длинна"
 
-#: src/main/Rstrptime.h:1244
+#: src/main/Rstrptime.h:1265
 msgid "invalid multibyte input string"
 msgstr "неправильная многобайтная строка"
 
-#: src/main/Rstrptime.h:1247
+#: src/main/Rstrptime.h:1268
 msgid "format string is too long"
 msgstr "форматированная строка слишком длинна"
 
-#: src/main/Rstrptime.h:1249
+#: src/main/Rstrptime.h:1270
 msgid "invalid multibyte format string"
 msgstr "неправильная многобайтная строка"
 
-#: src/main/agrep.c:133 src/main/agrep.c:777 src/main/character.c:1039
-#: src/main/character.c:1043 src/main/grep.c:769 src/main/grep.c:1512
-#: src/main/grep.c:1516 src/main/grep.c:2325 src/main/grep.c:2623
+#: src/main/agrep.c:133
+#: src/main/agrep.c:778
+#: src/main/character.c:1088
+#: src/main/character.c:1092
+#: src/main/grep.c:782
+#: src/main/grep.c:1530
+#: src/main/grep.c:1534
+#: src/main/grep.c:2347
+#: src/main/grep.c:2651
 #, c-format
 msgid "argument '%s' has length > 1 and only the first element will be used"
 msgstr "длина аргумента '%s' > 1, будет использован только первый элемент"
 
-#: src/main/agrep.c:189 src/main/agrep.c:818
+#: src/main/agrep.c:190
+#: src/main/agrep.c:820
 msgid "'pattern' must be a non-empty character string"
 msgstr "'pattern' должен быть непустой текстовой строкой"
 
-#: src/main/agrep.c:200 src/main/agrep.c:827 src/main/grep.c:838
-#: src/main/grep.c:2381 src/main/grep.c:2662
+#: src/main/agrep.c:201
+#: src/main/agrep.c:829
+#: src/main/grep.c:853
+#: src/main/grep.c:2405
+#: src/main/grep.c:2704
 msgid "regular expression is invalid in this locale"
 msgstr "неправильное регулярное выражение для этой локали"
 
-#: src/main/agrep.c:206 src/main/agrep.c:623
+#: src/main/agrep.c:207
+#: src/main/agrep.c:624
 #, c-format
 msgid "regcomp error:  '%s'"
 msgstr "ошибка regcomp: '%s'"
 
-#: src/main/agrep.c:238 src/main/agrep.c:871 src/main/grep.c:227
-#: src/main/grep.c:315 src/main/grep.c:423 src/main/grep.c:578
-#: src/main/grep.c:889 src/main/grep.c:2480 src/main/grep.c:2548
-#: src/main/grep.c:2698
+#: src/main/agrep.c:239
+#: src/main/agrep.c:874
+#: src/main/grep.c:233
+#: src/main/grep.c:323
+#: src/main/grep.c:434
+#: src/main/grep.c:590
+#: src/main/grep.c:907
+#: src/main/grep.c:2507
+#: src/main/grep.c:2576
+#: src/main/grep.c:2741
 #, c-format
 msgid "input string %d is invalid in this locale"
 msgstr "неправильная входная строка %d для этой локали"
 
-#: src/main/agrep.c:525 src/main/agrep.c:765 src/main/grep.c:155
-#: src/main/grep.c:760 src/main/grep.c:762 src/main/grep.c:1047
-#: src/main/grep.c:1055 src/main/grep.c:1503 src/main/grep.c:1505
-#: src/main/grep.c:2315 src/main/grep.c:2317 src/main/grep.c:2611
+#: src/main/agrep.c:526
+#: src/main/agrep.c:766
+#: src/main/grep.c:159
+#: src/main/grep.c:773
+#: src/main/grep.c:775
+#: src/main/grep.c:1065
+#: src/main/grep.c:1073
+#: src/main/grep.c:1521
+#: src/main/grep.c:1523
+#: src/main/grep.c:2337
+#: src/main/grep.c:2339
+#: src/main/grep.c:2639
 #, c-format
 msgid "argument '%s' will be ignored"
 msgstr "аргумент '%s' будет проигнорирован"
 
-#: src/main/agrep.c:614
+#: src/main/agrep.c:615
 #, c-format
 msgid "input string x[%d] is invalid in this locale"
 msgstr "неправильная входная строка x[%d] для этой локали"
 
-#: src/main/agrep.c:660
+#: src/main/agrep.c:661
 #, c-format
 msgid "input string y[%d] is invalid in this locale"
 msgstr "неправильная входная строка y[%d] для этой локали"
 
-#: src/main/agrep.c:833 src/main/grep.c:2668
+#: src/main/agrep.c:835
+#: src/main/grep.c:2710
 #, c-format
 msgid "regcomp error: '%s'"
 msgstr "ошибка regcomp: '%s'"
 
-#: src/main/apply.c:103
+#: src/main/apply.c:98
 msgid "'FUN.VALUE' must be a vector"
 msgstr "'FUN.VALUE' должно быть вектором"
 
-#: src/main/apply.c:108 src/main/complex.c:758
+#: src/main/apply.c:100
+#: src/main/array.c:480
+#: src/main/character.c:644
+#: src/main/character.c:1453
+#: src/main/connections.c:3553
+#: src/main/context.c:657
+#: src/main/context.c:676
+#: src/main/datetime.c:685
+#: src/main/datetime.c:787
+#: src/main/datetime.c:1046
+#: src/main/dotcode.c:222
+#: src/main/errors.c:943
+#: src/main/errors.c:976
+#: src/main/errors.c:1079
+#: src/main/errors.c:1104
+#: src/main/errors.c:1109
+#: src/main/errors.c:1382
+#: src/main/identical.c:66
+#: src/main/identical.c:67
+#: src/main/identical.c:68
+#: src/main/identical.c:69
+#: src/main/identical.c:70
+#: src/main/platform.c:3083
+#: src/main/seq.c:191
+#: src/main/seq.c:347
+#: src/main/seq.c:352
+#: src/main/seq.c:356
+#: src/main/seq.c:397
+#: src/main/seq.c:401
+#: src/main/seq.c:405
+#: src/main/sort.c:1224
+#: src/main/sort.c:1307
+#: src/main/sort.c:1311
+#: src/main/sort.c:1318
+#: src/main/sort.c:1393
+#: src/main/source.c:225
+#: src/main/summary.c:901
+#: src/main/sysutils.c:250
+#: src/main/util.c:1047
+#: src/main/util.c:1052
+#: src/main/util.c:1059
+#: src/main/util.c:1062
+#: src/main/util.c:2031
+#: src/modules/X11/devX11.c:3142
+#: src/modules/X11/devX11.c:3169
+#: src/modules/X11/devX11.c:3174
+#: src/modules/X11/devX11.c:3179
+#: src/modules/X11/devX11.c:3189
+#: src/modules/X11/devX11.c:3194
+#: src/modules/X11/devX11.c:3198
+#: src/modules/X11/devX11.c:3202
+#, c-format
+msgid "invalid '%s' value"
+msgstr "неправильное значение '%s'"
+
+#: src/main/apply.c:103
+#: src/main/complex.c:761
 msgid "invalid length"
 msgstr "неправильная длина"
 
-#: src/main/apply.c:113
+#: src/main/apply.c:108
 msgid "long vectors are not supported for matrix/array results"
 msgstr "длинные вектора не поддерживаются в результатах matrix/array"
 
-#: src/main/apply.c:162
+#: src/main/apply.c:115
+#, c-format
+msgid "type '%s' is not supported"
+msgstr "тип '%s' не поддерживается"
+
+#: src/main/apply.c:163
 #, c-format
 msgid ""
 "values must be length %d,\n"
@@ -792,7 +1103,7 @@ msgstr ""
 "значения должны иметь длину %d,\n"
 " но результат FUN(X[[%d]]) имеет длину %d"
 
-#: src/main/apply.c:174
+#: src/main/apply.c:175
 #, c-format
 msgid ""
 "values must be type '%s',\n"
@@ -801,12 +1112,7 @@ msgstr ""
 "начения должны иметь тип '%s',\n"
 " но результат FUN(X[[%d]]) имеет тип '%s'"
 
-#: src/main/apply.c:193
-#, c-format
-msgid "type '%s' is not supported"
-msgstr "тип '%s' не поддерживается"
-
-#: src/main/apply.c:225
+#: src/main/apply.c:252
 #, c-format
 msgid "dimnames(<value>) is neither NULL nor list of length %d"
 msgstr "dimnames(<value>) не является ни NULL, ни списком длины %d"
@@ -819,128 +1125,148 @@ msgstr "созданы NaN"
 msgid "non-numeric argument to mathematical function"
 msgstr "нечисловой аргумент для математической функции"
 
-#: src/main/arithmetic.c:187
+#: src/main/arithmetic.c:186
 msgid "probable complete loss of accuracy in modulus"
 msgstr "возможна полная потеря точности остатка от деления"
 
-#: src/main/arithmetic.c:337
+#: src/main/arithmetic.c:294
 msgid "NAs produced by integer overflow"
 msgstr "целочисленное переполнение привело к созданию NA"
 
-#: src/main/arithmetic.c:538
+#: src/main/arithmetic.c:495
 msgid "operator needs one or two arguments"
 msgstr "оператору нужен один или два аргумента"
 
-#: src/main/arithmetic.c:554
+#: src/main/arithmetic.c:511
 msgid "non-numeric argument to binary operator"
 msgstr "нечисловой аргумент для бинарного оператора"
 
-#: src/main/arithmetic.c:615 src/main/relop.c:227
+#: src/main/arithmetic.c:572
+#: src/main/relop.c:227
 msgid "non-conformable arrays"
 msgstr "неподобные многомерные матрицы"
 
-#: src/main/arithmetic.c:658
+#: src/main/arithmetic.c:615
 msgid "non-conformable time-series"
 msgstr "неподобные временные ряды"
 
-#: src/main/arithmetic.c:680 src/main/logic.c:143 src/main/relop.c:166
+#: src/main/arithmetic.c:637
+#: src/main/logic.c:134
+#: src/main/relop.c:166
 #: src/main/relop.c:265
 msgid "longer object length is not a multiple of shorter object length"
-msgstr ""
-"длина большего объекта не является произведением длины меньшего объекта"
+msgstr "длина большего объекта не является произведением длины меньшего объекта"
 
-#: src/main/arithmetic.c:751
+#: src/main/arithmetic.c:708
 msgid "invalid argument to unary operator"
 msgstr "неправильный аргумент для унарного оператора"
 
-#: src/main/arithmetic.c:780 src/main/arithmetic.c:805
-#: src/main/arithmetic.c:824
+#: src/main/arithmetic.c:737
+#: src/main/arithmetic.c:762
+#: src/main/arithmetic.c:781
 msgid "invalid unary operator"
 msgstr "неправильный унарный оператор"
 
-#: src/main/arithmetic.c:1241
+#: src/main/arithmetic.c:1193
 msgid "unimplemented real function of 1 argument"
 msgstr "нереализованная действительная функция 1 аргумента"
 
-#: src/main/arithmetic.c:1255 src/main/complex.c:648 src/main/complex.c:718
+#: src/main/arithmetic.c:1207
+#: src/main/complex.c:648
+#: src/main/complex.c:718
 msgid "unimplemented complex function"
 msgstr "нереализованная комплексная функция"
 
-#: src/main/arithmetic.c:1526 src/main/arithmetic.c:1877
-#: src/main/arithmetic.c:2056 src/main/arithmetic.c:2168
+#: src/main/arithmetic.c:1486
+#: src/main/arithmetic.c:1885
+#: src/main/arithmetic.c:2064
+#: src/main/arithmetic.c:2176
 #, c-format
 msgid "unimplemented real function of %d numeric arguments"
 msgstr "нереализованная действительная функция %d числовых аргументов"
 
-#: src/main/arithmetic.c:1552
+#: src/main/arithmetic.c:1513
 #, c-format
-msgid "%d arguments passed to '%s' which requires 1 or 2"
-msgstr "%d аргументов передано '%s', а требуется 1 или 2"
+msgid "%d argument passed to '%s' which requires 1 or 2 arguments"
+msgid_plural "%d arguments passed to '%s'which requires 1 or 2 arguments"
+msgstr[0] "%d аргументов передано '%s', а требуется 1 или 2"
+msgstr[1] "%d аргумента переданы '%s', а требуется 1 или 2"
+msgstr[2] "%d аргументов переданы '%s', а требуется 1 или 2"
 
-#: src/main/arithmetic.c:1570
+#: src/main/arithmetic.c:1532
 msgid "invalid second argument of length 0"
 msgstr "неправильный второй аргумент нулевой длины"
 
-#: src/main/arithmetic.c:1639
+#: src/main/arithmetic.c:1627
+#: src/main/arithmetic.c:1645
+#: src/main/envir.c:1462
+#: src/main/envir.c:1970
+#: src/main/eval.c:572
+#: src/main/eval.c:4118
+#, c-format
+msgid "argument \"%s\" is missing, with no default"
+msgstr "аргумент \"%s\" пропущен, умолчаний нет"
+
+#: src/main/arithmetic.c:1651
 msgid "invalid argument 'base' of length 0"
 msgstr "неправильный аргумент 'base' нулевой длины"
 
-#: src/main/arithmetic.c:1647
-#, c-format
-msgid "%d arguments passed to 'log' which requires 1 or 2"
-msgstr "%d аргумента передано 'log', а требуется 1 или 2"
-
-#: src/main/array.c:79 src/main/array.c:1441
+#: src/main/array.c:79
+#: src/main/array.c:1547
 #, c-format
 msgid "'data' must be of a vector type, was '%s'"
 msgstr "'data' должен быть вектором, а была '%s'"
 
-#: src/main/array.c:94 src/main/array.c:102
+#: src/main/array.c:94
+#: src/main/array.c:102
 msgid "non-numeric matrix extent"
 msgstr "нечисловая протяженность матрицы"
 
-#: src/main/array.c:97 src/main/array.c:1535
+#: src/main/array.c:97
+#: src/main/array.c:1656
 msgid "invalid 'nrow' value (too large or NA)"
 msgstr "неправильное значение 'nrow' (слишком велико или NA)"
 
-#: src/main/array.c:99 src/main/array.c:1537
+#: src/main/array.c:99
+#: src/main/array.c:1658
 msgid "invalid 'nrow' value (< 0)"
 msgstr "неправильное значение 'nrow' (< 0)"
 
-#: src/main/array.c:105 src/main/array.c:1540
+#: src/main/array.c:105
+#: src/main/array.c:1661
 msgid "invalid 'ncol' value (too large or NA)"
 msgstr "неправильное значение 'ncol' (слишком велико или NA)"
 
-#: src/main/array.c:107 src/main/array.c:1542
+#: src/main/array.c:107
+#: src/main/array.c:1663
 msgid "invalid 'ncol' value (< 0)"
 msgstr "неправильное значение 'ncol' (< 0)"
 
 #: src/main/array.c:116
 msgid "nc = 0 for non-null data"
-msgstr ""
+msgstr "nc = 0 для ненулевых данных"
 
 #: src/main/array.c:124
 msgid "nr = 0 for non-null data"
-msgstr ""
+msgstr "nr = 0 для ненулевых данных"
 
 #: src/main/array.c:135
 #, c-format
-msgid ""
-"data length [%d] is not a sub-multiple or multiple of the number of rows [%d]"
+msgid "data length [%d] is not a sub-multiple or multiple of the number of rows [%d]"
 msgstr "длина данных [%d] не является множителем количества строк [%d]"
 
 #: src/main/array.c:138
 #, c-format
-msgid ""
-"data length [%d] is not a sub-multiple or multiple of the number of columns "
-"[%d]"
+msgid "data length [%d] is not a sub-multiple or multiple of the number of columns [%d]"
 msgstr "длина данных [%d] не является множителем количества столбцов [%d]"
 
 #: src/main/array.c:141
 msgid "data length exceeds size of matrix"
 msgstr "длина данных превышает размер матрицы"
 
-#: src/main/array.c:147 src/main/array.c:1453 src/main/array.c:1549
+#: src/main/array.c:147
+#: src/main/array.c:1559
+#: src/main/array.c:1670
 msgid "too many elements specified"
 msgstr "задано слишком много элементов"
 
@@ -964,292 +1290,314 @@ msgstr "'alloc3Darray': задано слишком много элементо
 msgid "'allocArray': too many elements specified by 'dims'"
 msgstr "'allocArray': при помощи 'dims' задано слишком много элементов"
 
-#: src/main/array.c:448
+#: src/main/array.c:493
+#, c-format
+msgid "'%s' must be a list or atomic vector"
+msgstr "'%s' должен быть списком из простых векторов"
+
+#: src/main/array.c:531
 #, c-format
 msgid "a matrix-like object is required as argument to '%s'"
 msgstr "аргументом '%s' должен быть матрицеподобный объект"
 
-#: src/main/array.c:662
+#: src/main/array.c:745
 msgid "requires numeric/complex matrix/vector arguments"
 msgstr "требует числовых/комплексных матричных/векторных аргументов"
 
-#: src/main/array.c:752 src/main/array.c:756 src/main/array.c:760
+#: src/main/array.c:855
+#: src/main/array.c:859
+#: src/main/array.c:863
 msgid "non-conformable arguments"
 msgstr "неподобные аргументы"
 
-#: src/main/array.c:1058
+#: src/main/array.c:1162
 msgid "argument is not a matrix"
 msgstr "аргумент не является матрицей"
 
-#: src/main/array.c:1093
+#: src/main/array.c:1197
 msgid "invalid first argument, must be an array"
 msgstr "неправильный первый аргумент, должна быть многомерная матрица"
 
-#: src/main/array.c:1107
+#: src/main/array.c:1211
 #, c-format
 msgid "'perm' is of wrong length %d (!= %d)"
 msgstr "'perm' неправильной длины %d (!= %d)"
 
-#: src/main/array.c:1112 src/main/array.c:1115
+#: src/main/array.c:1216
+#: src/main/array.c:1219
 msgid "'a' does not have named dimnames"
 msgstr "'a' не имеет именованных измерений"
 
-#: src/main/array.c:1122
+#: src/main/array.c:1226
 #, c-format
 msgid "'perm[%d]' does not match a dimension name"
 msgstr "'perm[%d]' не соответствует имени измерения"
 
-#: src/main/array.c:1135
+#: src/main/array.c:1239
 msgid "value out of range in 'perm'"
 msgstr "'perm': значение за пределами"
 
-#: src/main/array.c:1217
+#: src/main/array.c:1321
 msgid "'resize' must be TRUE or FALSE"
 msgstr "'resize' должен быть TRUE или FALSE"
 
-#: src/main/array.c:1275
+#: src/main/array.c:1378
 msgid "'x' must be numeric"
 msgstr "'x' должен быть числом"
 
-#: src/main/array.c:1449
+#: src/main/array.c:1381
+msgid "'x' is too short"
+msgstr "'x' слишком короткий"
+
+#: src/main/array.c:1555
 msgid "'dims' cannot be of length 0"
 msgstr "'dims' не может быть нулевой длины"
 
-#: src/main/array.c:1545
+#: src/main/array.c:1666
 msgid "'x' must have positive length"
 msgstr "'x' должно иметь положительную длину"
 
-#: src/main/array.c:1605
+#: src/main/array.c:1726
 #, c-format
 msgid "singular matrix in 'backsolve'. First zero in diagonal [%d]"
 msgstr "вырожденная матрица 'backsolve'. Первый нуль в диагонали [%d]"
 
-#: src/main/attrib.c:40 src/main/attrib.c:235 src/main/attrib.c:269
-#: src/main/attrib.c:291 src/main/attrib.c:405 src/main/attrib.c:452
-#: src/main/attrib.c:502
+#: src/main/attrib.c:40
+#: src/main/attrib.c:231
+#: src/main/attrib.c:265
+#: src/main/attrib.c:287
+#: src/main/attrib.c:403
+#: src/main/attrib.c:450
+#: src/main/attrib.c:501
 msgid "attempt to set an attribute on NULL"
 msgstr "попытка присвоения атрибута на NULL"
 
-#: src/main/attrib.c:72
+#: src/main/attrib.c:77
 #, c-format
 msgid "row names must be 'character' or 'integer', not '%s'"
 msgstr "имена строк должны быть текстом или целыми числами, а не '%s'"
 
-#: src/main/attrib.c:124
+#: src/main/attrib.c:130
 #, c-format
 msgid "getAttrib: invalid type (%s) for TAG"
 msgstr "getAttrib: неправильный (%s) тип TAG"
 
-#: src/main/attrib.c:379
+#: src/main/attrib.c:377
 #, c-format
 msgid "invalid type (%s) for 'names': must be vector"
 msgstr "неправильный тип (%s) для 'names': должен быть вектор"
 
-#: src/main/attrib.c:382
+#: src/main/attrib.c:380
 #, c-format
 msgid "'names' attribute [%d] must be the same length as the vector [%d]"
 msgstr "атрибут 'names' [%d] должен быть той же длины, что и вектор [%d]"
 
-#: src/main/attrib.c:387
+#: src/main/attrib.c:385
 msgid "names() applied to a non-vector"
 msgstr "names() применен к не-вектору"
 
-#: src/main/attrib.c:395
+#: src/main/attrib.c:393
 msgid "invalid time series parameters specified"
 msgstr "указаны неправильные параметры временного ряда"
 
-#: src/main/attrib.c:409
+#: src/main/attrib.c:407
 msgid "'tsp' attribute must be numeric"
 msgstr "атрибут 'tsp' должен быть числовым"
 
-#: src/main/attrib.c:415
+#: src/main/attrib.c:413
 msgid "'tsp' attribute must be numeric of length three"
 msgstr "атрибут 'tsp' должен быть числовым, длиной в 3"
 
-#: src/main/attrib.c:432
+#: src/main/attrib.c:430
 msgid "cannot assign 'tsp' to zero-length vector"
 msgstr "не могу присвоить 'tsp' нулевому вектору"
 
-#: src/main/attrib.c:463
+#: src/main/attrib.c:461
 msgid "attempt to set invalid 'comment' attribute"
 msgstr "попытка установить неправильный атрибут 'comment' "
 
-#: src/main/attrib.c:511
+#: src/main/attrib.c:510
 msgid "adding class \"factor\" to an invalid object"
 msgstr "добавление класса \"factor\" к неправильному объекту"
 
-#: src/main/attrib.c:519
+#: src/main/attrib.c:541
 msgid "attempt to set invalid 'class' attribute"
 msgstr "попытка установить неправильный атрибут 'class'"
 
-#: src/main/attrib.c:777
+#: src/main/attrib.c:865
 #, c-format
 msgid "class '%s' has no 'names' slot"
 msgstr "у класса '%s' нет позиции 'names'"
 
-#: src/main/attrib.c:779
+#: src/main/attrib.c:867
 #, c-format
-msgid ""
-"class '%s' has no 'names' slot; assigning a names attribute will create an "
-"invalid object"
-msgstr ""
-"у класса '%s' нет позиции 'names'; присвоение атрибута имени создаст "
-"неправильный объект"
+msgid "class '%s' has no 'names' slot; assigning a names attribute will create an invalid object"
+msgstr "у класса '%s' нет позиции 'names'; присвоение атрибута имени создаст неправильный объект"
 
-#: src/main/attrib.c:782
+#: src/main/attrib.c:870
 #, c-format
-msgid ""
-"invalid to use names()<- to set the 'names' slot in a non-vector class ('%s')"
-msgstr ""
-"нельзя использовать names()<- чтобы установить позицию 'names' в невекторном "
-"классе ('%s')"
+msgid "invalid to use names()<- to set the 'names' slot in a non-vector class ('%s')"
+msgstr "нельзя использовать names()<- чтобы установить позицию 'names' в невекторном классе ('%s')"
 
-#: src/main/attrib.c:812
+#: src/main/attrib.c:900
 msgid "incompatible 'names' argument"
 msgstr "несовместимый аргумент 'names'"
 
-#: src/main/attrib.c:867
+#: src/main/attrib.c:955
 #, c-format
 msgid "invalid type (%s) to set 'names' attribute"
 msgstr "неправильный (%s) тип установки атрибута 'names'"
 
-#: src/main/attrib.c:938
+#: src/main/attrib.c:1028
 msgid "'dimnames' applied to non-array"
 msgstr "'dimnames' применены для не-многомерной матрицы"
 
-#: src/main/attrib.c:943
-msgid "'dimnames' must be a list"
-msgstr "'dimnames' должны быть списком"
+#: src/main/attrib.c:1033
+#: src/main/coerce.c:2452
+#, c-format
+msgid "'%s' must be a list"
+msgstr "'%s' должен быть списком"
 
-#: src/main/attrib.c:946 src/main/attrib.c:974
+#: src/main/attrib.c:1036
+#: src/main/attrib.c:1064
 #, c-format
 msgid "length of 'dimnames' [%d] must match that of 'dims' [%d]"
 msgstr "длина 'dimnames' [%d] должна соответствовать 'dims' [%d]"
 
-#: src/main/attrib.c:980
+#: src/main/attrib.c:1070
 #, c-format
 msgid "invalid type (%s) for 'dimnames' (must be a vector)"
 msgstr "неправильный (%s) тип 'dimnames' (должен быть вектор)"
 
-#: src/main/attrib.c:983
+#: src/main/attrib.c:1073
 #, c-format
 msgid "length of 'dimnames' [%d] not equal to array extent"
 msgstr "длина 'dimnames' [%d] не равна протяженности многомерной матрицы"
 
-#: src/main/attrib.c:1055 src/main/builtin.c:75 src/main/builtin.c:112
-#: src/main/envir.c:1606 src/main/envir.c:1734 src/main/envir.c:1796
-#: src/main/envir.c:1918 src/main/paste.c:74 src/main/paste.c:293
-#: src/main/random.c:487 src/main/random.c:516 src/main/unique.c:1749
+#: src/main/attrib.c:1145
+#: src/main/builtin.c:75
+#: src/main/builtin.c:112
+#: src/main/envir.c:1738
+#: src/main/envir.c:1866
+#: src/main/envir.c:1926
+#: src/main/envir.c:2063
+#: src/main/paste.c:74
+#: src/main/paste.c:293
+#: src/main/random.c:476
+#: src/main/random.c:505
+#: src/main/unique.c:1684
 msgid "invalid first argument"
 msgstr "неправильный первый аргумент"
 
-#: src/main/attrib.c:1058
+#: src/main/attrib.c:1148
 msgid "invalid second argument"
 msgstr "неправильный второй аргумент"
 
-#: src/main/attrib.c:1066
+#: src/main/attrib.c:1156
 msgid "length-0 dimension vector is invalid"
 msgstr "вектор размерности нулевой длины недопустим"
 
-#: src/main/attrib.c:1071
+#: src/main/attrib.c:1161
 msgid "the dims contain missing values"
 msgstr "измерения содержат пропущенные значения"
 
-#: src/main/attrib.c:1073
+#: src/main/attrib.c:1163
 msgid "the dims contain negative values"
 msgstr "змерения содержат отрицательные значения"
 
-#: src/main/attrib.c:1078
+#: src/main/attrib.c:1168
 msgid "dims do not match the length of object"
 msgstr "измерения не соответствуют длине объекта"
 
-#: src/main/attrib.c:1080
+#: src/main/attrib.c:1170
 #, c-format
 msgid "dims [product %d] do not match the length of object [%d]"
 msgstr "измерения [произведение %d] не соответствуют длине объекта [%d]"
 
-#: src/main/attrib.c:1177
+#: src/main/attrib.c:1272
 msgid "attributes must be a list or NULL"
 msgstr "атрибуты должны быть списком или NULL"
 
-#: src/main/attrib.c:1182
+#: src/main/attrib.c:1277
 msgid "attributes must be named"
 msgstr "атрибуты должны быть именованы"
 
-#: src/main/attrib.c:1186
+#: src/main/attrib.c:1281
 #, c-format
 msgid "all attributes must have names [%d does not]"
 msgstr "все атрибуты должны иметь имена [%d не имеет]"
 
-#: src/main/attrib.c:1285
+#: src/main/attrib.c:1381
 msgid "'which' must be of mode character"
 msgstr "'which' должен быть текстом"
 
-#: src/main/attrib.c:1287
+#: src/main/attrib.c:1383
 msgid "exactly one attribute 'which' must be given"
 msgstr "должен быть задан в точности один атрибут 'which'"
 
-#: src/main/attrib.c:1345 src/main/attrib.c:1368 src/main/subscript.c:240
-#: src/main/subscript.c:244 src/main/subset.c:1188 src/main/subset.c:1239
+#: src/main/attrib.c:1441
+#: src/main/attrib.c:1464
+#: src/main/subscript.c:248
+#: src/main/subscript.c:252
+#: src/main/subset.c:1230
+#: src/main/subset.c:1281
 #, c-format
 msgid "partial match of '%s' to '%s'"
 msgstr "частичное соответствие между '%s' и '%s'"
 
-#: src/main/attrib.c:1406
+#: src/main/attrib.c:1503
 #, c-format
 msgid "invalid type '%s' for slot name"
 msgstr "неправильный тип '%s' для имени слота"
 
-#: src/main/attrib.c:1444
+#: src/main/attrib.c:1539
 msgid "'name' must be non-null character string"
 msgstr "'name' должно быть непустой строкой"
 
-#: src/main/attrib.c:1568 src/main/attrib.c:1639 src/main/attrib.c:1676
+#: src/main/attrib.c:1663
+#: src/main/attrib.c:1734
+#: src/main/attrib.c:1771
 msgid "invalid type or length for slot name"
 msgstr "неправильный тип или длина для имени слота"
 
-#: src/main/attrib.c:1602
+#: src/main/attrib.c:1697
 #, c-format
 msgid "cannot get a slot (\"%s\") from an object of type \"%s\""
 msgstr "не могу получить слот (\"%s\") из объекта типа \"%s\""
 
-#: src/main/attrib.c:1613
+#: src/main/attrib.c:1708
 #, c-format
 msgid "no slot of name \"%s\" for this object of class \"%s\""
 msgstr "нет слота имени \"%s\" для этого объекта класса \"%s\""
 
-#: src/main/attrib.c:1630
+#: src/main/attrib.c:1725
 msgid "attempt to set slot on NULL object"
 msgstr "попытка установить слот на NULL объект"
 
-#: src/main/attrib.c:1671
+#: src/main/attrib.c:1766
 msgid "formal classes cannot be used without the 'methods' package"
 msgstr "формальные классы не могут использоваться без пакета 'methods'"
 
-#: src/main/attrib.c:1683
+#: src/main/attrib.c:1778
 #, c-format
-msgid ""
-"trying to get slot \"%s\" from an object of a basic class (\"%s\") with no "
-"slots"
-msgstr ""
-"попытка получить слот \"%s\" из объекта базового класса (\"%s\") без слотов"
+msgid "trying to get slot \"%s\" from an object of a basic class (\"%s\") with no slots"
+msgstr "попытка получить слот \"%s\" из объекта базового класса (\"%s\") без слотов"
 
-#: src/main/attrib.c:1687
+#: src/main/attrib.c:1782
 #, c-format
-msgid ""
-"trying to get slot \"%s\" from an object (class \"%s\") that is not an S4 "
-"object "
-msgstr ""
-"попытка получить слот \"%s\" из объекта (класс \"%s\"), который не является "
-"объектом S4"
+msgid "trying to get slot \"%s\" from an object (class \"%s\") that is not an S4 object "
+msgstr "попытка получить слот \"%s\" из объекта (класс \"%s\"), который не является объектом S4"
 
 #: src/main/bind.c:161
 #, c-format
 msgid "resulting vector exceeds vector length limit in '%s'"
 msgstr "получившийся в '%s' вектор превышает предел длины вектора"
 
-#: src/main/bind.c:291 src/main/bind.c:327 src/main/bind.c:376
-#: src/main/bind.c:449 src/main/bind.c:477
+#: src/main/bind.c:291
+#: src/main/bind.c:327
+#: src/main/bind.c:376
+#: src/main/bind.c:449
+#: src/main/bind.c:477
 #, c-format
 msgid "type '%s' is unimplemented in '%s'"
 msgstr "тип '%s' в '%s' не реализован"
@@ -1266,24 +1614,26 @@ msgstr "повторный формальный аргумент 'use.names'"
 msgid "argument not a list"
 msgstr "аргумент не является списком"
 
-#: src/main/bind.c:1038 src/main/eval.c:2691 src/main/eval.c:2700
-#: src/main/objects.c:318 src/main/objects.c:354 src/main/objects.c:729
-#: src/main/objects.c:746 src/main/objects.c:753
+#: src/main/bind.c:1038
+#: src/main/names.c:1273
+#: src/main/names.c:1278
+#: src/main/names.c:1283
+#: src/main/names.c:1288
 #, c-format
 msgid "class name too long in '%s'"
 msgstr "слишком длинное имя класса в '%s'"
 
-#: src/main/bind.c:1114
+#: src/main/bind.c:1122
 #, c-format
 msgid "cannot create a matrix from type '%s'"
 msgstr "не могу создать матрицу из типа '%s'"
 
-#: src/main/bind.c:1185
+#: src/main/bind.c:1192
 #, c-format
 msgid "number of rows of matrices must match (see arg %d)"
 msgstr "количества строк матриц должны соответствовать (см. аргумент %d)"
 
-#: src/main/bind.c:1430
+#: src/main/bind.c:1439
 #, c-format
 msgid "number of columns of matrices must match (see arg %d)"
 msgstr "количества колонок матриц должны соответствовать (см. аргумент %d)"
@@ -1292,212 +1642,288 @@ msgstr "количества колонок матриц должны соотв
 msgid "vector size cannot be NA"
 msgstr "размер вектора не может быть NA"
 
-#: src/main/builtin.c:49 src/main/builtin.c:57 src/main/sort.c:1303
+#: src/main/builtin.c:49
+#: src/main/builtin.c:57
+#: src/main/sort.c:1303
 msgid "vector size cannot be NA/NaN"
 msgstr "размер вектора не может быть NA/NaN"
 
-#: src/main/builtin.c:50 src/main/builtin.c:58 src/main/sort.c:1304
+#: src/main/builtin.c:50
+#: src/main/builtin.c:58
+#: src/main/sort.c:1304
 msgid "vector size cannot be infinite"
 msgstr "размер вектора не может быть неопределенным"
 
-#: src/main/builtin.c:51 src/main/builtin.c:59 src/main/builtin.c:916
+#: src/main/builtin.c:51
+#: src/main/builtin.c:59
+#: src/main/builtin.c:941
 #: src/main/sort.c:1305
 msgid "vector size specified is too large"
 msgstr "указанный размер вектора слишком велик"
 
-#: src/main/builtin.c:84 src/main/builtin.c:93 src/main/builtin.c:293
-#: src/main/builtin.c:326 src/main/builtin.c:365 src/main/builtin.c:375
-#: src/main/coerce.c:1537 src/main/connections.c:3066 src/main/engine.c:2967
-#: src/main/envir.c:993 src/main/envir.c:1046 src/main/envir.c:1136
-#: src/main/envir.c:1615 src/main/envir.c:1739 src/main/envir.c:1807
-#: src/main/envir.c:1925 src/main/envir.c:2582 src/main/envir.c:2642
-#: src/main/envir.c:2922 src/main/envir.c:2951 src/main/envir.c:2972
-#: src/main/envir.c:2995 src/main/envir.c:3030 src/main/envir.c:3051
-#: src/main/envir.c:3357 src/main/envir.c:3362 src/main/eval.c:5318
-#: src/main/objects.c:197 src/main/objects.c:203 src/main/saveload.c:2070
-#: src/main/saveload.c:2364 src/main/serialize.c:2709
+#: src/main/builtin.c:84
+#: src/main/builtin.c:93
+#: src/main/builtin.c:294
+#: src/main/builtin.c:327
+#: src/main/builtin.c:384
+#: src/main/builtin.c:398
+#: src/main/coerce.c:1519
+#: src/main/connections.c:3062
+#: src/main/engine.c:2967
+#: src/main/envir.c:999
+#: src/main/envir.c:1052
+#: src/main/envir.c:1208
+#: src/main/envir.c:1747
+#: src/main/envir.c:1871
+#: src/main/envir.c:1937
+#: src/main/envir.c:2070
+#: src/main/envir.c:2789
+#: src/main/envir.c:2875
+#: src/main/envir.c:3167
+#: src/main/envir.c:3196
+#: src/main/envir.c:3217
+#: src/main/envir.c:3240
+#: src/main/envir.c:3275
+#: src/main/envir.c:3296
+#: src/main/envir.c:3617
+#: src/main/envir.c:3622
+#: src/main/eval.c:6114
+#: src/main/objects.c:191
+#: src/main/objects.c:199
+#: src/main/saveload.c:2070
+#: src/main/saveload.c:2362
+#: src/main/serialize.c:2755
 msgid "use of NULL environment is defunct"
 msgstr "использование окружения NULL не одобряется"
 
-#: src/main/builtin.c:306
+#: src/main/builtin.c:307
 msgid "replacement object is not an environment"
 msgstr "замещающий объект не является окружением"
 
-#: src/main/builtin.c:331
+#: src/main/builtin.c:332
 msgid "'enclos' must be an environment"
 msgstr "'enclos' должен быть окружением"
 
-#: src/main/builtin.c:352 src/main/builtin.c:370
+#: src/main/builtin.c:353
+#: src/main/builtin.c:389
 msgid "argument is not an environment"
 msgstr "аргумент не является окружением"
 
-#: src/main/builtin.c:354
+#: src/main/builtin.c:355
 msgid "the empty environment has no parent"
 msgstr "пустое окружение не имеет родительского"
 
-#: src/main/builtin.c:372
+#: src/main/builtin.c:391
 msgid "can not set parent of the empty environment"
 msgstr "не могу установить родителя для пустого окружения"
 
-#: src/main/builtin.c:380
+#: src/main/builtin.c:393
+msgid "can not set the parent environment of a namespace"
+msgstr "не могу установить родительское окружение для пространства имен"
+
+#: src/main/builtin.c:395
+msgid "can not set the parent environment of package imports"
+msgstr "не могу установить родительское окружение включений пакета"
+
+#: src/main/builtin.c:403
 msgid "'parent' is not an environment"
 msgstr "'parent' не является окружением"
 
-#: src/main/builtin.c:521 src/main/connections.c:3691
-#: src/main/connections.c:4068 src/main/connections.c:4102
-#: src/main/connections.c:4480 src/main/connections.c:4550
-#: src/main/connections.c:4759 src/main/connections.c:4763
-#: src/main/connections.c:5124 src/main/deparse.c:360 src/main/deparse.c:446
-#: src/main/serialize.c:2006
+#: src/main/builtin.c:546
+#: src/main/connections.c:3689
+#: src/main/connections.c:4072
+#: src/main/connections.c:4106
+#: src/main/connections.c:4484
+#: src/main/connections.c:4554
+#: src/main/connections.c:4763
+#: src/main/connections.c:4767
+#: src/main/connections.c:5212
+#: src/main/deparse.c:368
+#: src/main/deparse.c:457
+#: src/main/serialize.c:2045
 msgid "cannot write to this connection"
 msgstr "не могу записать в это соединение"
 
-#: src/main/builtin.c:526 src/main/builtin.c:556
+#: src/main/builtin.c:551
+#: src/main/builtin.c:581
 #, c-format
 msgid "invalid '%s' specification"
 msgstr "неправильное определение '%s'"
 
-#: src/main/builtin.c:543
+#: src/main/builtin.c:568
 msgid "non-positive 'fill' argument will be ignored"
 msgstr "неположительный аргумент 'fill' будет проигнорирован"
 
-#: src/main/builtin.c:618
+#: src/main/builtin.c:643
 #, c-format
 msgid "argument %d (type '%s') cannot be handled by 'cat'"
 msgstr "'cat' не может работать с аргументом %d (тип '%s')"
 
-#: src/main/builtin.c:763
+#: src/main/builtin.c:788
 #, c-format
 msgid "vector: cannot make a vector of mode '%s'."
 msgstr "вектор: не могу сделать вектор типа '%s'."
 
-#: src/main/builtin.c:789
+#: src/main/builtin.c:814
 msgid "cannot set length of non-vector"
 msgstr "установить длину для не-вектора"
 
-#: src/main/builtin.c:897 src/main/builtin.c:907 src/main/options.c:637
+#: src/main/builtin.c:922
+#: src/main/builtin.c:932
+#: src/main/options.c:653
 msgid "invalid argument"
 msgstr "неправильный аргумент"
 
-#: src/main/builtin.c:899 src/main/builtin.c:909 src/main/builtin.c:911
-#: src/main/character.c:366 src/main/coerce.c:2765
+#: src/main/builtin.c:924
+#: src/main/builtin.c:934
+#: src/main/builtin.c:936
+#: src/main/character.c:415
+#: src/main/coerce.c:2813
 msgid "invalid value"
 msgstr "неправильное значение"
 
-#: src/main/builtin.c:942 src/main/coerce.c:2478 src/main/coerce.c:2519
-#: src/main/eval.c:563 src/main/eval.c:683 src/main/eval.c:2099
-#: src/main/eval.c:2176 src/main/eval.c:2236 src/main/eval.c:2569
-#: src/main/eval.c:4694 src/main/eval.c:4814
+#: src/main/builtin.c:967
+#: src/main/coerce.c:2522
+#: src/main/coerce.c:2565
+#: src/main/eval.c:562
+#: src/main/eval.c:682
+#: src/main/eval.c:2175
+#: src/main/eval.c:2255
+#: src/main/eval.c:2316
+#: src/main/eval.c:2654
+#: src/main/eval.c:5459
+#: src/main/eval.c:5576
 msgid "'...' used in an incorrect context"
 msgstr "'...' использовано в неправильном контексте"
 
-#: src/main/builtin.c:963
+#: src/main/builtin.c:989
 #, c-format
 msgid "duplicate 'switch' defaults: '%s' and '%s'"
 msgstr "повторяющиеся значения по умолчанию в переключателе: '%s' и '%s'"
 
-#: src/main/builtin.c:996
+#: src/main/builtin.c:1022
 msgid "'EXPR' is missing"
 msgstr "'EXPR' отсутствует"
 
-#: src/main/builtin.c:1000 src/main/eval.c:5155
+#: src/main/builtin.c:1026
+#: src/main/eval.c:5931
 msgid "EXPR must be a length 1 vector"
 msgstr "EXPR должно быть вектором единичной длины"
 
-#: src/main/builtin.c:1003
+#: src/main/builtin.c:1029
+#: src/main/eval.c:5934
 #, c-format
 msgid ""
 "EXPR is a \"factor\", treated as integer.\n"
 " Consider using '%s' instead."
 msgstr ""
+"EXPR -- это \"factor\", рассматриваемый как целое число.\n"
+" Попробуйте использовать '%s' взамен."
 
-#: src/main/character.c:105 src/main/character.c:108 src/main/character.c:132
-#: src/main/character.c:135
+#: src/main/character.c:104
+#: src/main/character.c:146
 #, c-format
-msgid "'%s' requires a character vector"
-msgstr "'%s' требует текстового вектора"
+msgid "%d argument passed to '%s' which requires %d to %d"
+msgid_plural "%d arguments passed to '%s' which requires %d to %d"
+msgstr[0] "%d аргумент передан '%s', а требуется %d для %d"
+msgstr[1] "%d аргумента переданы '%s', а требуется %d для %d"
+msgstr[2] "%d аргументов переданы '%s', а требуется %d для %d"
 
-#: src/main/character.c:164
+#: src/main/character.c:111
+#: src/main/character.c:114
+#: src/main/character.c:152
+#: src/main/character.c:155
 #, c-format
-msgid ""
-"number of characters is not computable for element %d in \"bytes\" encoding"
-msgstr "число символов не вычислимо для элемента %d в кодировке \"bytes\""
+msgid "'%s' requires a character vector"
+msgstr "'%s' требует текстового вектора"
 
-#: src/main/character.c:169 src/main/character.c:197 src/main/character.c:653
-#: src/main/character.c:750
+#: src/main/character.c:193
+#: src/main/character.c:209
+#: src/main/character.c:219
+#: src/main/character.c:244
+#: src/main/character.c:702
+#: src/main/character.c:799
 #, c-format
 msgid "invalid multibyte string %d"
 msgstr "неправильная многобайтная строка %d"
 
-#: src/main/character.c:185
+#: src/main/character.c:203
+#, c-format
+msgid "number of characters is not computable for element %d in \"bytes\" encoding"
+msgstr "число символов не вычислимо для элемента %d в кодировке \"bytes\""
+
+#: src/main/character.c:232
 #, c-format
 msgid "width is not computable for element %d in \"bytes\" encoding"
 msgstr "длина не вычислима для элемента %d в кодировке \"bytes\""
 
-#: src/main/character.c:263
+#: src/main/character.c:312
 msgid "extracting substrings from a non-character object"
 msgstr "извлечение подстрок из не-текстового объекта"
 
-#: src/main/character.c:268 src/main/character.c:363
+#: src/main/character.c:317
+#: src/main/character.c:412
 msgid "invalid substring arguments"
 msgstr "неправильный подстроковый аргумент(ы)"
 
-#: src/main/character.c:358
+#: src/main/character.c:407
 msgid "replacing substrings in a non-character object"
 msgstr "замещение подстрок не-текстовым объектом"
 
-#: src/main/character.c:551
+#: src/main/character.c:600
 msgid "the first argument must be a character vector"
 msgstr "первый аргумент должен быть текстовым вектором"
 
-#: src/main/character.c:570
+#: src/main/character.c:619
 msgid "abbreviate used with non-ASCII chars"
 msgstr "'abbreviate' использована с не-ASCII символами"
 
-#: src/main/character.c:591
+#: src/main/character.c:640
 msgid "non-character names"
 msgstr "не-текстовые имена"
 
-#: src/main/character.c:696 src/main/grep.c:159
+#: src/main/character.c:745
+#: src/main/grep.c:163
 msgid "non-character argument"
 msgstr "не-текстовый аргумент"
 
-#: src/main/character.c:805
+#: src/main/character.c:854
 #, c-format
 msgid "decreasing range specification ('%lc-%lc')"
 msgstr "уменьшающееся определение ранга ('%lc-%lc')"
 
-#: src/main/character.c:891
+#: src/main/character.c:940
 #, c-format
 msgid "decreasing range specification ('%c-%c')"
 msgstr "уменьшающееся определение ранга ('%c-%c')"
 
-#: src/main/character.c:1079
+#: src/main/character.c:1128
 msgid "invalid UTF-8 string 'old'"
 msgstr "неправильный UTF-8 строка 'old'"
 
-#: src/main/character.c:1085
+#: src/main/character.c:1134
 msgid "invalid multibyte string 'old'"
 msgstr "неправильный многобайтная строка 'old'"
 
-#: src/main/character.c:1098
+#: src/main/character.c:1147
 msgid "invalid UTF-8 string 'new'"
 msgstr "неправильная UTF-8 строка 'new'"
 
-#: src/main/character.c:1104
+#: src/main/character.c:1153
 msgid "invalid multibyte string 'new'"
 msgstr "неправильный многобайтная строка 'new'"
 
-#: src/main/character.c:1132 src/main/character.c:1221
+#: src/main/character.c:1181
+#: src/main/character.c:1270
 msgid "'old' is longer than 'new'"
 msgstr "'old' длиннее чем 'new'"
 
-#: src/main/character.c:1164
+#: src/main/character.c:1213
 #, c-format
 msgid "invalid input multibyte string %d"
 msgstr "неправильная входная многобайтная строка %d"
 
-#: src/main/character.c:1271
+#: src/main/character.c:1320
 msgid "strtrim() requires a character vector"
 msgstr "strtrim() требует текстового вектора"
 
@@ -1509,15 +1935,17 @@ msgstr "неправильный аргумент 'mode'"
 msgid "applies only to lists and vectors"
 msgstr "применимо только к спискам и векторам"
 
-#: src/main/coerce.c:77 src/main/errors.c:1208
+#: src/main/coerce.c:77
+#: src/main/errors.c:1222
 msgid "NAs introduced by coercion"
 msgstr "в результате преобразования созданы NA"
 
-#: src/main/coerce.c:79 src/main/errors.c:1209
-msgid "inaccurate integer conversion in coercion"
-msgstr "вынужденное неточное целочисленное преобразование"
+#: src/main/coerce.c:79
+msgid "NAs introduced by coercion to integer range"
+msgstr "в результате целочисленного преобразования созданы NA"
 
-#: src/main/coerce.c:81 src/main/errors.c:1210
+#: src/main/coerce.c:81
+#: src/main/errors.c:1224
 msgid "imaginary parts discarded in coercion"
 msgstr "мнимые части убраны при преобразовании"
 
@@ -1525,165 +1953,151 @@ msgstr "мнимые части убраны при преобразовании
 msgid "out-of-range values treated as 0 in coercion to raw"
 msgstr "запредельные значения вынужденно преобразованы в 0"
 
-#: src/main/coerce.c:414
+#: src/main/coerce.c:392
 #, c-format
 msgid "invalid data of mode '%s' (too short)"
 msgstr "неправильные данные типа '%s' (слишком короткие)"
 
-#: src/main/coerce.c:1016
+#: src/main/coerce.c:995
 #, c-format
 msgid "'pairlist' object cannot be coerced to type '%s'"
 msgstr "объект 'pairlist' не может быть преобразован в тип '%s'"
 
-#: src/main/coerce.c:1134
+#: src/main/coerce.c:1113
 #, c-format
 msgid "(list) object cannot be coerced to type '%s'"
 msgstr "объект (список) не может быть преобразован в тип '%s'"
 
-#: src/main/coerce.c:1157
+#: src/main/coerce.c:1136
 #, c-format
 msgid "(symbol) object cannot be coerced to type '%s'"
 msgstr "(символ) объект не может быть преобразован в тип '%s'"
 
-#: src/main/coerce.c:1173 src/main/coerce.c:1485
+#: src/main/coerce.c:1152
+#: src/main/coerce.c:1467
 msgid "no method for coercing this S4 class to a vector"
 msgstr "Отсутствует метод для конверсии данного класса S4 в вектор"
 
-#: src/main/coerce.c:1232
+#: src/main/coerce.c:1215
 msgid "environments cannot be coerced to other types"
 msgstr "окружения не могут быть преобразованы в другие типы"
 
-#: src/main/coerce.c:1379
+#: src/main/coerce.c:1357
 msgid "attempting to coerce non-factor"
 msgstr "попытка конверсии не-фактора"
 
-#: src/main/coerce.c:1533
+#: src/main/coerce.c:1362
+#: src/main/coerce.c:1372
+msgid "malformed factor"
+msgstr "неправильный фактор"
+
+#: src/main/coerce.c:1515
 msgid "list argument expected"
 msgstr "ожидается аргумент-список"
 
-#: src/main/coerce.c:1541 src/main/eval.c:5322
+#: src/main/coerce.c:1523
+#: src/main/eval.c:6118
 msgid "invalid environment"
 msgstr "неправильное окружение"
 
-#: src/main/coerce.c:1545
+#: src/main/coerce.c:1527
 msgid "argument must have length at least 1"
 msgstr "аргумент должен быть по крайней мере единичной длины"
 
-#: src/main/coerce.c:1567
+#: src/main/coerce.c:1549
 msgid "invalid body for function"
 msgstr "неправильное тело функции"
 
-#: src/main/coerce.c:1590
+#: src/main/coerce.c:1572
 msgid "invalid length 0 argument"
 msgstr "неправильный аргумент нулевой длины"
 
-#: src/main/coerce.c:1605
+#: src/main/coerce.c:1587
 msgid "invalid argument list"
 msgstr "неправильный список аргументов"
 
-#: src/main/coerce.c:1916
+#: src/main/coerce.c:1899
 msgid "type \"single\" unimplemented in R"
 msgstr "тип \"single\" не реализован в R"
 
-#: src/main/coerce.c:1918
+#: src/main/coerce.c:1901
 msgid "unimplemented predicate"
 msgstr "нереализованный предикат"
 
-#: src/main/coerce.c:2069
+#: src/main/coerce.c:2053
 #, c-format
 msgid "%s() applied to non-(list or vector) of type '%s'"
 msgstr "%s() применен к не-списку/вектору типа '%s'"
 
-#: src/main/coerce.c:2212 src/main/coerce.c:2275 src/main/coerce.c:2343
+#: src/main/coerce.c:2250
+#: src/main/coerce.c:2313
+#: src/main/coerce.c:2384
 #, c-format
 msgid "default method not implemented for type '%s'"
 msgstr "метод по умолчанию для типа '%s' не сделан"
 
-#: src/main/coerce.c:2361
+#: src/main/coerce.c:2405
 msgid "'name' is missing"
 msgstr "'name' отсутствует"
 
-#: src/main/coerce.c:2368
+#: src/main/coerce.c:2412
 msgid "first argument must be a character string"
 msgstr "первый аргумент должен быть текстовой строкой"
 
-#: src/main/coerce.c:2401
+#: src/main/coerce.c:2445
 msgid "'what' must be a character string or a function"
 msgstr "'what' должен быть текстовой строкой или функцией"
 
-#: src/main/coerce.c:2405
-#, fuzzy
+#: src/main/coerce.c:2449
 msgid "'args' must be a list or expression"
-msgstr "'args' должны быть списком"
+msgstr "'args' должны быть списком или выражением"
 
-#: src/main/coerce.c:2408
-msgid "'args' must be a list"
-msgstr "'args' должны быть списком"
-
-#: src/main/coerce.c:2412
+#: src/main/coerce.c:2456
+#: src/main/unique.c:1285
 msgid "'envir' must be an environment"
 msgstr "'envir' должен быть окружением"
 
-#: src/main/coerce.c:2567
+#: src/main/coerce.c:2615
 msgid "invalid environment specified"
 msgstr "задано неправильное окружение"
 
-#: src/main/coerce.c:2633
+#: src/main/coerce.c:2681
 msgid "Setting class(x) to NULL;   result will no longer be an S4 object"
-msgstr ""
-"Выставляю атрибут class(x) в NULL;   результат не будет являться объектом S4"
+msgstr "Выставляю атрибут class(x) в NULL;   результат не будет являться объектом S4"
 
-#: src/main/coerce.c:2636
+#: src/main/coerce.c:2684
 #, c-format
-msgid ""
-"Setting class(x) to multiple strings (\"%s\", \"%s\", ...); result will no "
-"longer be an S4 object"
-msgstr ""
-"Выставляю class(x) в набор строк (\"%s\", \"%s\", ...);  результат не будет "
-"являться объектом S4"
+msgid "Setting class(x) to multiple strings (\"%s\", \"%s\", ...); result will no longer be an S4 object"
+msgstr "Выставляю class(x) в набор строк (\"%s\", \"%s\", ...);  результат не будет являться объектом S4"
 
-#: src/main/coerce.c:2640
+#: src/main/coerce.c:2688
 #, c-format
-msgid ""
-"Setting class(x) to \"%s\" sets attribute to NULL; result will no longer be "
-"an S4 object"
-msgstr ""
-"Установка class(x) в \"%s\" выставляет атрибут в NULL; результат не будет "
-"больше объектом S4"
+msgid "Setting class(x) to \"%s\" sets attribute to NULL; result will no longer be an S4 object"
+msgstr "Установка class(x) в \"%s\" выставляет атрибут в NULL; результат не будет больше объектом S4"
 
-#: src/main/coerce.c:2673
+#: src/main/coerce.c:2721
 msgid "invalid replacement object to be a class string"
 msgstr "неправильный замещающий объект, для того чтобы быть классовой строкой"
 
-#: src/main/coerce.c:2694
+#: src/main/coerce.c:2742
 #, c-format
-msgid ""
-"\"%s\" can only be set as the class if the object has this type; found \"%s\""
-msgstr ""
-"\"%s\" может быть установлен как класс если объект имеет этот тип; найден "
-"\"%s\""
+msgid "\"%s\" can only be set as the class if the object has this type; found \"%s\""
+msgstr "\"%s\" может быть установлен как класс если объект имеет этот тип; найден \"%s\""
 
-#: src/main/coerce.c:2712
+#: src/main/coerce.c:2760
 #, c-format
-msgid ""
-"invalid to set the class to matrix unless the dimension attribute is of "
-"length 2 (was %d)"
-msgstr ""
-"не способен правильно установить класс для матрицы покуда атрибут "
-"'dimension' не станет длиной 2 (был %d)"
+msgid "invalid to set the class to matrix unless the dimension attribute is of length 2 (was %d)"
+msgstr "не способен правильно установить класс для матрицы покуда атрибут 'dimension' не станет длиной 2 (был %d)"
 
-#: src/main/coerce.c:2720
-msgid ""
-"cannot set class to \"array\" unless the dimension attribute has length > 0"
-msgstr ""
-"не могу установить класс для \"array\" до тех пор, пока атрибут \"dimension"
-"\" не станет > 0"
+#: src/main/coerce.c:2768
+msgid "cannot set class to \"array\" unless the dimension attribute has length > 0"
+msgstr "не могу установить класс для \"array\" до тех пор, пока атрибут \"dimension\" не станет > 0"
 
-#: src/main/coerce.c:2756
+#: src/main/coerce.c:2804
 msgid "'value' must be non-null character string"
 msgstr "'value' должно быть непустой строкой"
 
-#: src/main/coerce.c:2769
+#: src/main/coerce.c:2817
 msgid "invalid to change the storage mode of a factor"
 msgstr "не могу поменять тип хранения фактора"
 
@@ -1699,456 +2113,527 @@ msgstr "не реализованная комплексная операция"
 msgid "non-numeric argument to function"
 msgstr "нечисловой аргумент аргумент для функции"
 
-#: src/main/complex.c:827
+#: src/main/complex.c:830
 msgid "invalid polynomial coefficient"
 msgstr "неправильный коэффициент многочлена"
 
-#: src/main/complex.c:832
+#: src/main/complex.c:835
 msgid "root finding code failed"
 msgstr "ошибка кода нахождения корня"
 
-#: src/main/connections.c:153
+#: src/main/connections.c:150
 msgid "all connections are in use"
 msgstr "все соединения используются"
 
-#: src/main/connections.c:164
+#: src/main/connections.c:161
 msgid "connection not found"
 msgstr "соединение не найдено"
 
-#: src/main/connections.c:175
+#: src/main/connections.c:172
 msgid "invalid connection"
 msgstr "неправильное соединение"
 
-#: src/main/connections.c:207
+#: src/main/connections.c:204
 #, c-format
 msgid "closing unused connection %d (%s)\n"
 msgstr "закрываю неиспользованное соединение %d (%s)\n"
 
-#: src/main/connections.c:232 src/main/sysutils.c:619 src/main/sysutils.c:806
-#: src/main/sysutils.c:821 src/main/sysutils.c:912 src/main/sysutils.c:927
-#: src/main/sysutils.c:1023 src/main/sysutils.c:1096 src/main/sysutils.c:1106
-#: src/main/sysutils.c:1119 src/main/sysutils.c:1516
+#: src/main/connections.c:229
+#: src/main/sysutils.c:625
+#: src/main/sysutils.c:828
+#: src/main/sysutils.c:843
+#: src/main/sysutils.c:972
+#: src/main/sysutils.c:1045
+#: src/main/sysutils.c:1055
+#: src/main/sysutils.c:1068
+#: src/main/sysutils.c:1466
 #, c-format
 msgid "unsupported conversion from '%s' to '%s'"
 msgstr "неподдерживаемая конвертация из '%s' в '%s'"
 
-#: src/main/connections.c:288 src/main/connections.c:304
-#: src/main/connections.c:456 src/main/connections.c:462
-#: src/main/connections.c:468 src/main/connections.c:479
-#: src/main/connections.c:486
+#: src/main/connections.c:285
+#: src/main/connections.c:300
+#: src/main/connections.c:451
+#: src/main/connections.c:456
+#: src/main/connections.c:461
+#: src/main/connections.c:472
+#: src/main/connections.c:478
 #, c-format
 msgid "%s not enabled for this connection"
 msgstr "%s не допущен для этого соединения"
 
-#: src/main/connections.c:335 src/main/connections.c:352
-#: src/main/connections.c:2916
+#: src/main/connections.c:330
+#: src/main/connections.c:347
+#: src/main/connections.c:2910
 msgid "printing of extremely long output is truncated"
 msgstr "печать слишком длинного вывода обрезана"
 
-#: src/main/connections.c:375
+#: src/main/connections.c:370
 msgid "invalid char string in output conversion"
 msgstr "неправильная строка при конвертации вывода"
 
-#: src/main/connections.c:439
+#: src/main/connections.c:434
 #, c-format
 msgid "invalid input found on input connection '%s'"
 msgstr "неправильный ввод найден во входном соединении '%s'"
 
-#: src/main/connections.c:580
+#: src/main/connections.c:571
 #, c-format
 msgid "cannot open file '%ls': %s"
 msgstr "не могу открыть файл '%ls': %s"
 
-#: src/main/connections.c:691
+#: src/main/connections.c:683
 msgid "connection is not open for reading"
 msgstr "соединение не открыто для чтения"
 
-#: src/main/connections.c:696
+#: src/main/connections.c:688
 msgid "connection is not open for writing"
 msgstr "соединение не открыто для записи"
 
-#: src/main/connections.c:734 src/main/connections.c:2229
+#: src/main/connections.c:726
+#: src/main/connections.c:2223
 msgid "can only truncate connections open for writing"
 msgstr "могу укоротить только открытые для записи соединения"
 
-#: src/main/connections.c:738 src/main/connections.c:740
+#: src/main/connections.c:730
+#: src/main/connections.c:732
 msgid "file truncation failed"
 msgstr "укорочение файла не удалось"
 
-#: src/main/connections.c:742
+#: src/main/connections.c:734
 msgid "file truncation unavailable on this platform"
 msgstr "укорочение файла недоступно для этой платформы"
 
-#: src/main/connections.c:788 src/main/connections.c:792
-#: src/main/connections.c:798 src/main/connections.c:815
+#: src/main/connections.c:780
+#: src/main/connections.c:784
+#: src/main/connections.c:790
+#: src/main/connections.c:807
 msgid "allocation of file connection failed"
 msgstr "выделение файлового соединения не удалось"
 
-#: src/main/connections.c:866 src/main/connections.c:1044
+#: src/main/connections.c:858
+#: src/main/connections.c:1035
 #, c-format
 msgid "cannot create fifo '%s', reason '%s'"
 msgstr "не могу создать fifo-канал '%s' по причине '%s'"
 
-#: src/main/connections.c:872
+#: src/main/connections.c:864
 #, c-format
 msgid "'%s' exists but is not a fifo"
 msgstr "'%s' существует, но это не fifo-канал"
 
-#: src/main/connections.c:886
+#: src/main/connections.c:878
 #, c-format
 msgid "fifo '%s' is not ready"
 msgstr "fifo-канал '%s' не готов"
 
-#: src/main/connections.c:887
+#: src/main/connections.c:879
 #, c-format
 msgid "cannot open fifo '%s'"
 msgstr "не могу открыть fifo-канал '%s'"
 
-#: src/main/connections.c:928 src/main/connections.c:939
-#: src/main/connections.c:1104 src/main/connections.c:1123
-#: src/main/connections.c:1531 src/main/connections.c:1541
-#: src/main/connections.c:1660 src/main/connections.c:1720
-#: src/main/connections.c:2246 src/main/connections.c:2263
-#: src/main/connections.c:2572 src/main/connections.c:5305
-#: src/main/connections.c:5369
+#: src/main/connections.c:920
+#: src/main/connections.c:931
+#: src/main/connections.c:1095
+#: src/main/connections.c:1114
+#: src/main/connections.c:1524
+#: src/main/connections.c:1534
+#: src/main/connections.c:1653
+#: src/main/connections.c:1713
+#: src/main/connections.c:2240
+#: src/main/connections.c:2257
+#: src/main/connections.c:2566
+#: src/main/connections.c:5393
+#: src/main/connections.c:5457
 msgid "too large a block specified"
 msgstr "определен слишком большой блок"
 
-#: src/main/connections.c:998 src/main/connections.c:1004
-#, fuzzy
+#: src/main/connections.c:989
+#: src/main/connections.c:995
 msgid "allocation of fifo name failed"
-msgstr "размещение fifo соединения не удалось"
+msgstr "размещение имени fifo не удалось"
 
-#: src/main/connections.c:1066
-#, fuzzy, c-format
+#: src/main/connections.c:1057
+#, c-format
 msgid "cannot open fifo '%s', reason '%s'"
-msgstr "не могу открыть URL '%s' по причине '%s'"
+msgstr "не могу открыть fifo '%s' по причине '%s'"
 
-#: src/main/connections.c:1107 src/main/connections.c:1131
-#, fuzzy
+#: src/main/connections.c:1098
+#: src/main/connections.c:1122
 msgid "allocation of fifo buffer failed"
-msgstr "размещение fifo соединения не удалось"
+msgstr "размещение буфера fifo не удалось"
 
-#: src/main/connections.c:1139
-#, fuzzy, c-format
+#: src/main/connections.c:1130
+#, c-format
 msgid "cannot write FIFO '%s'"
-msgstr "не могу открыть URL '%s'"
+msgstr "не могу записать FIFO '%s'"
 
-#: src/main/connections.c:1175 src/main/connections.c:1179
-#: src/main/connections.c:1185 src/main/connections.c:1201
+#: src/main/connections.c:1166
+#: src/main/connections.c:1170
+#: src/main/connections.c:1176
+#: src/main/connections.c:1192
 msgid "allocation of fifo connection failed"
 msgstr "размещение fifo соединения не удалось"
 
-#: src/main/connections.c:1219 src/main/connections.c:1377
-#: src/main/connections.c:1998 src/main/connections.c:3212
-#: src/main/connections.c:4967
+#: src/main/connections.c:1210
+#: src/main/connections.c:1369
+#: src/main/connections.c:1991
+#: src/main/connections.c:3209
+#: src/main/connections.c:4977
 msgid "only first element of 'description' argument used"
 msgstr "использован только первый элемент аргумента 'description'"
 
-#: src/main/connections.c:1236
-msgid ""
-"fifo(\"\") only supports open = \"w+\" and open = \"w+b\": using the former"
-msgstr ""
-"fifo(\"\") поддерживает только open = \"w+\" и open = \"w+b\": использую "
-"второе"
-
-#: src/main/connections.c:1250 src/main/connections.c:1414
-#: src/main/connections.c:2064 src/main/connections.c:3179
-#: src/main/connections.c:3232 src/main/connections.c:3280
-#: src/main/connections.c:3567 src/main/connections.c:3683
-#: src/main/connections.c:3844 src/main/connections.c:4095
-#: src/main/connections.c:4423 src/main/connections.c:4543
-#: src/main/connections.c:4755 src/main/connections.c:5105 src/main/dcf.c:94
-#: src/main/deparse.c:352 src/main/deparse.c:438 src/main/saveload.c:2267
-#: src/main/saveload.c:2350 src/main/scan.c:933 src/main/serialize.c:2175
-#: src/main/serialize.c:2226 src/main/source.c:265
+#: src/main/connections.c:1227
+msgid "fifo(\"\") only supports open = \"w+\" and open = \"w+b\": using the former"
+msgstr "fifo(\"\") поддерживает только open = \"w+\" и open = \"w+b\": использую второе"
+
+#: src/main/connections.c:1242
+#: src/main/connections.c:1407
+#: src/main/connections.c:2058
+#: src/main/connections.c:3176
+#: src/main/connections.c:3230
+#: src/main/connections.c:3278
+#: src/main/connections.c:3565
+#: src/main/connections.c:3681
+#: src/main/connections.c:3843
+#: src/main/connections.c:4099
+#: src/main/connections.c:4427
+#: src/main/connections.c:4547
+#: src/main/connections.c:4759
+#: src/main/connections.c:5193
+#: src/main/dcf.c:94
+#: src/main/deparse.c:360
+#: src/main/deparse.c:449
+#: src/main/saveload.c:2267
+#: src/main/saveload.c:2348
+#: src/main/scan.c:933
+#: src/main/serialize.c:2216
+#: src/main/serialize.c:2267
+#: src/main/source.c:270
 msgid "cannot open the connection"
 msgstr "не могу открыть соединение"
 
-#: src/main/connections.c:1265
+#: src/main/connections.c:1257
 msgid "fifo connections are not available on this system"
 msgstr "fifo соединения недоступны в этой системе"
 
-#: src/main/connections.c:1295
+#: src/main/connections.c:1287
 #, c-format
 msgid "cannot pipe() cmd '%ls': %s"
 msgstr "не могу открыть pipe() командой '%ls': %s"
 
-#: src/main/connections.c:1302
+#: src/main/connections.c:1294
 #, c-format
 msgid "cannot open pipe() cmd '%s': %s"
 msgstr "не могу открыть pipe() командой '%s': %s"
 
-#: src/main/connections.c:1471 src/main/connections.c:1791
+#: src/main/connections.c:1464
+#: src/main/connections.c:1784
 #, c-format
 msgid "cannot open compressed file '%s', probable reason '%s'"
 msgstr "не могу открыть сжатый файл '%s', возможная причина -- '%s'"
 
-#: src/main/connections.c:1511
+#: src/main/connections.c:1504
 msgid "whence = \"end\" is not implemented for gzfile connections"
 msgstr "whence = \"end\" не разработан для gzfile-соединений"
 
-#: src/main/connections.c:1516
+#: src/main/connections.c:1509
 msgid "seek on a gzfile connection returned an internal error"
 msgstr "поиск gzfile-соединения вернул внутреннюю ошибку"
 
-#: src/main/connections.c:1550 src/main/connections.c:1554
-#: src/main/connections.c:1560 src/main/connections.c:1577
+#: src/main/connections.c:1543
+#: src/main/connections.c:1547
+#: src/main/connections.c:1553
+#: src/main/connections.c:1570
 msgid "allocation of gzfile connection failed"
 msgstr "выделение gzfile-соединения не удалось"
 
-#: src/main/connections.c:1606
+#: src/main/connections.c:1599
 #, c-format
 msgid "cannot open bzip2-ed file '%s', probable reason '%s'"
 msgstr "не могу открыть bzip2-файл '%s', возможная причина -- '%s'"
 
-#: src/main/connections.c:1615
+#: src/main/connections.c:1608
 #, c-format
 msgid "file '%s' appears not to be compressed by bzip2"
 msgstr "файл '%s', по-видимому, сжат не bzip2"
 
-#: src/main/connections.c:1624
+#: src/main/connections.c:1617
 #, c-format
 msgid "initializing bzip2 compression for file '%s' failed"
 msgstr "включить архивирование bzip2 для файла '%s' не удалось"
 
-#: src/main/connections.c:1678
+#: src/main/connections.c:1671
 msgid "allocation of overflow buffer for bzfile failed"
 msgstr "выделение буфера переполнения для bzfile закончилось неуспешно"
 
-#: src/main/connections.c:1685
+#: src/main/connections.c:1678
 #, c-format
-msgid ""
-"file '%s' has trailing content that appears not to be compressed by bzip2"
+msgid "file '%s' has trailing content that appears not to be compressed by bzip2"
 msgstr "файл '%s', по-видимому, сжат не bzip2"
 
-#: src/main/connections.c:1731 src/main/connections.c:1735
-#: src/main/connections.c:1741 src/main/connections.c:1758
+#: src/main/connections.c:1724
+#: src/main/connections.c:1728
+#: src/main/connections.c:1734
+#: src/main/connections.c:1751
 msgid "allocation of bzfile connection failed"
 msgstr "выделение bzfile-соединения не удалось"
 
-#: src/main/connections.c:1804 src/main/connections.c:5961
+#: src/main/connections.c:1797
+#: src/main/connections.c:6050
 #, c-format
 msgid "cannot initialize lzma decoder, error %d"
 msgstr "не могу включить декодер lzma, ошибка %d"
 
-#: src/main/connections.c:1820
+#: src/main/connections.c:1813
 #, c-format
 msgid "cannot initialize lzma encoder, error %d"
 msgstr "не могу включить кодер lzma, ошибка %d"
 
-#: src/main/connections.c:1948 src/main/connections.c:1952
-#: src/main/connections.c:1958 src/main/connections.c:1976
+#: src/main/connections.c:1941
+#: src/main/connections.c:1945
+#: src/main/connections.c:1951
+#: src/main/connections.c:1969
 msgid "allocation of xzfile connection failed"
 msgstr "выделение xzfile-соединения не удалось"
 
-#: src/main/connections.c:2035
+#: src/main/connections.c:2028
 #, c-format
 msgid "this is a %s-compressed file which this build of R does not support"
 msgstr "это %s-архивированный файл, который не поддерживает данная сборка R"
 
-#: src/main/connections.c:2130 src/modules/X11/devX11.c:3375
+#: src/main/connections.c:2124
+#: src/modules/X11/devX11.c:3375
 msgid "memory allocation to copy clipboard failed"
 msgstr "выделение памяти для копирования буфера обмена не удалось"
 
-#: src/main/connections.c:2135 src/modules/X11/devX11.c:3354
+#: src/main/connections.c:2129
+#: src/modules/X11/devX11.c:3354
 #: src/modules/X11/devX11.c:3359
 msgid "clipboard cannot be opened or contains no text"
 msgstr "буфер обмена не может быть открыт или не содержит текста"
 
-#: src/main/connections.c:2146
+#: src/main/connections.c:2140
 msgid "memory allocation to open clipboard failed"
 msgstr "выделение памяти для открытия буфера обмена не удалось"
 
-#: src/main/connections.c:2174
+#: src/main/connections.c:2168
 msgid "unable to open the clipboard"
 msgstr "не могу открыть буфер обмена"
 
-#: src/main/connections.c:2178
+#: src/main/connections.c:2172
 msgid "unable to write to the clipboard"
 msgstr "не могу записать в буфер обмена"
 
-#: src/main/connections.c:2218
+#: src/main/connections.c:2212
 msgid "attempt to seek outside the range of the clipboard"
 msgstr "попытка поиска вне области буфера обмена"
 
-#: src/main/connections.c:2261
+#: src/main/connections.c:2255
 msgid "clipboard connection is open for reading only"
 msgstr "соединение с буфером обмена открыто только для чтения"
 
-#: src/main/connections.c:2281
+#: src/main/connections.c:2275
 msgid "clipboard buffer is full and output lost"
 msgstr "буфер обмена полон, вывод потерян"
 
-#: src/main/connections.c:2302
+#: src/main/connections.c:2296
 msgid "'mode' for the clipboard must be 'r' or 'w'"
 msgstr "'mode' для буфера обмена должна быть 'r' или 'w'"
 
-#: src/main/connections.c:2305
+#: src/main/connections.c:2299
 msgid "'mode' for the clipboard must be 'r' on Unix"
 msgstr "'mode' для буфера обмена должна быть 'r' в  Unix"
 
-#: src/main/connections.c:2308 src/main/connections.c:2314
-#: src/main/connections.c:2320 src/main/connections.c:2337
+#: src/main/connections.c:2302
+#: src/main/connections.c:2308
+#: src/main/connections.c:2314
+#: src/main/connections.c:2331
 msgid "allocation of clipboard connection failed"
 msgstr "выделение соединения с буфером обмена не удалось"
 
-#: src/main/connections.c:2406 src/main/connections.c:2410
-#: src/main/connections.c:2416
+#: src/main/connections.c:2400
+#: src/main/connections.c:2404
+#: src/main/connections.c:2410
 msgid "allocation of terminal connection failed"
 msgstr "выделение соединения с терминалом не удалось"
 
-#: src/main/connections.c:2549
+#: src/main/connections.c:2543
 msgid "attempting to add too many elements to raw vector"
-msgstr ""
-"попытка добавления слишком большого количества элементов в простой вектор"
+msgstr "попытка добавления слишком большого количества элементов в простой вектор"
 
-#: src/main/connections.c:2601
+#: src/main/connections.c:2595
 msgid "attempt to seek outside the range of the raw connection"
 msgstr "попытка поиска вне области простого соединения"
 
-#: src/main/connections.c:2612 src/main/connections.c:2616
-#: src/main/connections.c:2622 src/main/connections.c:2648
+#: src/main/connections.c:2606
+#: src/main/connections.c:2610
+#: src/main/connections.c:2616
+#: src/main/connections.c:2642
 msgid "allocation of raw connection failed"
 msgstr "размещение простого соединения не удалось"
 
-#: src/main/connections.c:2701
+#: src/main/connections.c:2695
 msgid "'con' is not a rawConnection"
 msgstr "'con' не является rawConnection"
 
-#: src/main/connections.c:2704
+#: src/main/connections.c:2698
 msgid "'con' is not an output rawConnection"
 msgstr "'con' не является выходным rawConnection"
 
-#: src/main/connections.c:2742
+#: src/main/connections.c:2736
 msgid "too many characters for text connection"
 msgstr "слишком много символов в текстовом соединении"
 
-#: src/main/connections.c:2747
+#: src/main/connections.c:2741
 msgid "cannot allocate memory for text connection"
 msgstr "не могу выделить память для текстового соединения"
 
-#: src/main/connections.c:2796
+#: src/main/connections.c:2790
 msgid "seek is not relevant for text connection"
 msgstr "поиск для текстового соединения неуместен"
 
-#: src/main/connections.c:2804 src/main/connections.c:2808
-#: src/main/connections.c:2814 src/main/connections.c:2827
-#: src/main/connections.c:3012 src/main/connections.c:3016
-#: src/main/connections.c:3022 src/main/connections.c:3035
-#: src/main/connections.c:3041
+#: src/main/connections.c:2798
+#: src/main/connections.c:2802
+#: src/main/connections.c:2808
+#: src/main/connections.c:2821
+#: src/main/connections.c:3008
+#: src/main/connections.c:3012
+#: src/main/connections.c:3018
+#: src/main/connections.c:3031
+#: src/main/connections.c:3037
 msgid "allocation of text connection failed"
 msgstr "выделение текстового соединения не удалось"
 
-#: src/main/connections.c:2989
+#: src/main/connections.c:2983
 msgid "text connection: appending to a non-existent char vector"
 msgstr "текстовое соединение: добавление к несуществующему текстовому вектору"
 
-#: src/main/connections.c:3093
+#: src/main/connections.c:3089
 msgid "unsupported mode"
 msgstr "неподдерживаемый тип"
 
-#: src/main/connections.c:3115
+#: src/main/connections.c:3111
 msgid "'con' is not a textConnection"
 msgstr "'con' не является текстовым соединением"
 
-#: src/main/connections.c:3118
+#: src/main/connections.c:3114
 msgid "'con' is not an output textConnection"
 msgstr "'con' не является выходным текстовым соединением"
 
-#: src/main/connections.c:3192
+#: src/main/connections.c:3189
 msgid "sockets are not available on this system"
 msgstr "для этой системы сокеты недоступны"
 
-#: src/main/connections.c:3260 src/main/connections.c:3309
-#: src/main/connections.c:3320 src/main/connections.c:3367
-#: src/main/connections.c:3392 src/main/connections.c:3415
-#: src/main/connections.c:3427 src/main/connections.c:3543
-#: src/main/connections.c:3668 src/main/connections.c:5408
+#: src/main/connections.c:3258
+#: src/main/connections.c:3307
+#: src/main/connections.c:3318
+#: src/main/connections.c:3365
+#: src/main/connections.c:3390
+#: src/main/connections.c:3413
+#: src/main/connections.c:3425
+#: src/main/connections.c:3541
+#: src/main/connections.c:3666
+#: src/main/connections.c:5496
 msgid "'con' is not a connection"
 msgstr "'con' не является соединением"
 
-#: src/main/connections.c:3263
+#: src/main/connections.c:3261
 msgid "cannot open standard connections"
 msgstr "не могу открыть стандартные соединения"
 
-#: src/main/connections.c:3265
+#: src/main/connections.c:3263
 msgid "connection is already open"
 msgstr "соединение уже открыто"
 
-#: src/main/connections.c:3298
+#: src/main/connections.c:3296
 msgid "unknown 'rw' value"
 msgstr "неизвестное 'rw' значение"
 
-#: src/main/connections.c:3369
+#: src/main/connections.c:3367
 msgid "cannot close standard connections"
 msgstr "не могу закрыть стандартные соединения"
 
-#: src/main/connections.c:3372
+#: src/main/connections.c:3370
 msgid "cannot close 'output' sink connection"
 msgstr "не могу закрыть выходное sink-соединение"
 
-#: src/main/connections.c:3374
+#: src/main/connections.c:3372
 msgid "cannot close 'message' sink connection"
 msgstr "не могу закрыть sink-соединение для сообщений"
 
-#: src/main/connections.c:3394 src/main/connections.c:5123
-#: src/main/connections.c:5131 src/main/serialize.c:1996
-#: src/main/serialize.c:2004
+#: src/main/connections.c:3392
+#: src/main/connections.c:5211
+#: src/main/connections.c:5219
+#: src/main/serialize.c:2035
+#: src/main/serialize.c:2043
 msgid "connection is not open"
 msgstr "соединение не открыто"
 
-#: src/main/connections.c:3490 src/main/connections.c:3502
+#: src/main/connections.c:3488
+#: src/main/connections.c:3500
 msgid "line longer than buffer size"
 msgstr "строка длиннее буфера"
 
-#: src/main/connections.c:3574 src/main/connections.c:3576
-#: src/main/connections.c:3852 src/main/connections.c:4406
-#: src/main/connections.c:4431 src/main/connections.c:5132 src/main/dcf.c:101
-#: src/main/scan.c:936 src/main/scan.c:940 src/main/serialize.c:1998
-#: src/main/source.c:272
+#: src/main/connections.c:3572
+#: src/main/connections.c:3574
+#: src/main/connections.c:3851
+#: src/main/connections.c:4410
+#: src/main/connections.c:4435
+#: src/main/connections.c:5220
+#: src/main/dcf.c:101
+#: src/main/scan.c:936
+#: src/main/scan.c:940
+#: src/main/serialize.c:2037
+#: src/main/source.c:277
 msgid "cannot read from this connection"
 msgstr "не могу читать из этого соединения"
 
-#: src/main/connections.c:3588 src/main/connections.c:3610
+#: src/main/connections.c:3586
+#: src/main/connections.c:3608
 msgid "cannot allocate buffer in readLines"
 msgstr "не могу разместить буфер в readLines"
 
-#: src/main/connections.c:3623
+#: src/main/connections.c:3621
 #, c-format
 msgid "line %d appears to contain an embedded nul"
-msgstr ""
+msgstr "сторка %d похоже, содержит встроенный nul"
 
-#: src/main/connections.c:3640
+#: src/main/connections.c:3638
 #, c-format
 msgid "incomplete final line found on '%s'"
 msgstr "неполная последняя строка найдена в '%s'"
 
-#: src/main/connections.c:3646
+#: src/main/connections.c:3644
 msgid "too few lines read in readLines"
 msgstr "слишком мало строк прочитано readLines"
 
-#: src/main/connections.c:3749
+#: src/main/connections.c:3748
 msgid "incomplete string at end of file has been discarded"
 msgstr "неполная строка в конце файла пропущена"
 
-#: src/main/connections.c:3755
+#: src/main/connections.c:3754
 msgid "null terminator not found: breaking string at 10000 bytes"
 msgstr "ограничитель 'null' не найден: разбиваю строку по 10000 байтов"
 
-#: src/main/connections.c:3820
+#: src/main/connections.c:3819
 msgid "can only read from a binary connection"
 msgstr "могу только читать из бинарного соединения"
 
-#: src/main/connections.c:3869 src/main/connections.c:4176
+#: src/main/connections.c:3868
+#: src/main/connections.c:4180
 msgid "size changing is not supported for complex vectors"
 msgstr "изменение размера не поддерживается для комплексных векторов"
 
-#: src/main/connections.c:3907 src/main/connections.c:3925
-#: src/main/connections.c:3951 src/main/connections.c:4010
-#: src/main/connections.c:4030 src/main/connections.c:4157
-#: src/main/connections.c:4170 src/main/connections.c:4229
-#: src/main/connections.c:4261
+#: src/main/connections.c:3907
+#: src/main/connections.c:3925
+#: src/main/connections.c:3951
+#: src/main/connections.c:4013
+#: src/main/connections.c:4034
+#: src/main/connections.c:4161
+#: src/main/connections.c:4174
+#: src/main/connections.c:4233
+#: src/main/connections.c:4265
 #, c-format
 msgid "size %d is unknown on this machine"
 msgstr "размер %d неизвестен для этой машины"
@@ -2161,263 +2646,278 @@ msgstr "'raw' всегда единичного размера"
 msgid "'signed = FALSE' is only valid for integers of sizes 1 and 2"
 msgstr "'signed = FALSE' работает только для целых размером 1 и 2"
 
-#: src/main/connections.c:4060
+#: src/main/connections.c:4064
 msgid "'x' is not an atomic vector type"
 msgstr "'x' не является элементарным вектором"
 
-#: src/main/connections.c:4066
+#: src/main/connections.c:4070
 msgid "can only write to a binary connection"
 msgstr "могу только писать в бинарное соединение"
 
-#: src/main/connections.c:4085
+#: src/main/connections.c:4089
 msgid "only 2^31-1 bytes can be written to a raw vector"
 msgstr "только 2^31-1 байтов можно записать в простой вектор"
 
-#: src/main/connections.c:4087
+#: src/main/connections.c:4091
 msgid "only 2^31-1 bytes can be written in a single writeBin() call"
 msgstr "только 2^31-1 байта можно записать в один вызов writeBin()"
 
-#: src/main/connections.c:4136 src/main/connections.c:4289
-#: src/main/connections.c:4570 src/main/connections.c:4610
+#: src/main/connections.c:4140
+#: src/main/connections.c:4293
+#: src/main/connections.c:4574
+#: src/main/connections.c:4614
 msgid "problem writing to connection"
 msgstr "проблема записи в соединение"
 
-#: src/main/connections.c:4181
+#: src/main/connections.c:4185
 msgid "size changing is not supported for raw vectors"
 msgstr "изменение размера не поддерживается для простых векторов"
 
-#: src/main/connections.c:4324 src/main/connections.c:4328
-#: src/main/connections.c:4367
+#: src/main/connections.c:4328
+#: src/main/connections.c:4332
+#: src/main/connections.c:4371
 msgid "invalid UTF-8 input in readChar()"
 msgstr "неправильный UTF-8 ввод в readChar()"
 
-#: src/main/connections.c:4434
+#: src/main/connections.c:4438
 msgid "can only read in bytes in a non-UTF-8 MBCS locale"
 msgstr "могу читать только побайтно на не-UTF-8 MBCS локали"
 
-#: src/main/connections.c:4506
+#: src/main/connections.c:4510
 msgid "'object' is too short"
 msgstr "'object' слишком короткий"
 
-#: src/main/connections.c:4559
+#: src/main/connections.c:4563
 msgid "writeChar: more bytes requested than are in the string - will zero-pad"
 msgstr "writeChar: запрошено больше байтов, чем есть в строке -- буду обнулять"
 
-#: src/main/connections.c:4584
-msgid ""
-"writeChar: more characters requested than are in the string - will zero-pad"
-msgstr ""
-"writeChar: запрошено больше символов, чем есть в строке -- буду обнулять"
+#: src/main/connections.c:4588
+msgid "writeChar: more characters requested than are in the string - will zero-pad"
+msgstr "writeChar: запрошено больше символов, чем есть в строке -- буду обнулять"
 
-#: src/main/connections.c:4638
+#: src/main/connections.c:4642
 msgid "maximum number of pushback lines exceeded"
 msgstr "превышено максимальное количество возвращаемых в поток строк"
 
-#: src/main/connections.c:4644 src/main/connections.c:4648
-#: src/main/connections.c:4685 src/main/connections.c:4693
+#: src/main/connections.c:4648
+#: src/main/connections.c:4652
+#: src/main/connections.c:4689
+#: src/main/connections.c:4697
 msgid "could not allocate space for pushback"
 msgstr "не могу разместить место для возвращения в поток"
 
-#: src/main/connections.c:4676
+#: src/main/connections.c:4680
 msgid "can only push back on open readable connections"
-msgstr ""
-"могу только выталкивать назад из открытых доступных для чтения соединений"
+msgstr "могу только выталкивать назад из открытых доступных для чтения соединений"
 
-#: src/main/connections.c:4678
+#: src/main/connections.c:4682
 msgid "can only push back on text-mode connections"
 msgstr "могу только выталкивать назад из текстовых соединений"
 
-#: src/main/connections.c:4740 src/main/connections.c:4810
+#: src/main/connections.c:4744
+#: src/main/connections.c:4814
 msgid "sink stack is full"
 msgstr "стек 'sink' полон"
 
-#: src/main/connections.c:4743
+#: src/main/connections.c:4747
 msgid "cannot switch output to stdin"
 msgstr "не могу переключить вывод на stdin"
 
-#: src/main/connections.c:4770
+#: src/main/connections.c:4774
 msgid "no sink to remove"
 msgstr "нет 'sink' для удаления"
 
-#: src/main/connections.c:4892
+#: src/main/connections.c:4894
 msgid "there is no connection NA"
 msgstr "соединение NA не существует"
 
-#: src/main/connections.c:4894
+#: src/main/connections.c:4896
 #, c-format
 msgid "there is no connection %d"
 msgstr "соединение %d не существует"
 
-#: src/main/connections.c:5029
-msgid ""
-"file(\"\") only supports open = \"w+\" and open = \"w+b\": using the former"
-msgstr ""
-"файл(\"\") поддерживает только open = \"w+\" and open = \"w+b\": использую "
-"второе"
+#: src/main/connections.c:5026
+msgid "method = \"wininet\" is only supported on Windows"
+msgstr "method = \"wininet\" поддерживается полько под Windows"
 
-#: src/main/connections.c:5083 src/modules/internet/internet.c:115
-#: src/modules/internet/internet.c:569
-msgid "unsupported URL scheme"
-msgstr "не поддерживаемая схема URL"
+#: src/main/connections.c:5116
+msgid "file(\"\") only supports open = \"w+\" and open = \"w+b\": using the former"
+msgstr "файл(\"\") поддерживает только open = \"w+\" and open = \"w+b\": использую второе"
 
-#: src/main/connections.c:5173
+#: src/main/connections.c:5170
+#: src/modules/internet/internet.c:153
+#: src/modules/internet/internet.c:274
+msgid "URL scheme unsupported by this method"
+msgstr "схема URL не поддерживается этим методом"
+
+#: src/main/connections.c:5261
 msgid "file stream does not have gzip magic number"
 msgstr "файловый поток не имеет магического числа gzip"
 
-#: src/main/connections.c:5184
+#: src/main/connections.c:5272
 msgid "file stream does not have valid gzip header"
 msgstr "файловый поток не имеет правильного заголовка gzip"
 
-#: src/main/connections.c:5249
+#: src/main/connections.c:5337
 msgid "writing error whilst flushing 'gzcon' connection"
 msgstr "ошибка записи во время gzcon-соединения"
 
-#: src/main/connections.c:5351
+#: src/main/connections.c:5439
 #, c-format
 msgid "crc error %x %x\n"
 msgstr "ошибка crc %x %x\n"
 
-#: src/main/connections.c:5378
+#: src/main/connections.c:5466
 msgid "write error on 'gzcon' connection"
 msgstr "ошибка записи в gzcon-соединение"
 
-#: src/main/connections.c:5412
+#: src/main/connections.c:5500
 msgid "'level' must be one of 0 ... 9"
 msgstr "'level' должен быть один из 0 ... 9"
 
-#: src/main/connections.c:5415
+#: src/main/connections.c:5503
 msgid "'allowNonCompression' must be TRUE or FALSE"
 msgstr "'allowNonCompression' должно быть TRUE или FALSE"
 
-#: src/main/connections.c:5418
+#: src/main/connections.c:5506
 msgid "this is already a 'gzcon' connection"
 msgstr "это уже 'gzcon'-соединение"
 
-#: src/main/connections.c:5424
+#: src/main/connections.c:5512
 msgid "can only use read- or write- binary connections"
 msgstr "могу только использовать read- или write- бинарные соединения"
 
-#: src/main/connections.c:5427
+#: src/main/connections.c:5515
 msgid "using a text-mode 'file' connection may not work correctly"
-msgstr ""
-"использование текстового соединения 'file' может не работать как положено"
+msgstr "использование текстового соединения 'file' может не работать как положено"
 
-#: src/main/connections.c:5430
-msgid ""
-"cannot create a 'gzcon' connection from a writable textConnection; maybe use "
-"rawConnection"
-msgstr ""
-"не могу создать соединение 'gzcon' из textConnection, открытого для записи; "
-"возможно, поможет rawConnection"
+#: src/main/connections.c:5518
+msgid "cannot create a 'gzcon' connection from a writable textConnection; maybe use rawConnection"
+msgstr "не могу создать соединение 'gzcon' из textConnection, открытого для записи; возможно, поможет rawConnection"
 
-#: src/main/connections.c:5433 src/main/connections.c:5437
-#: src/main/connections.c:5444 src/main/connections.c:5458
+#: src/main/connections.c:5521
+#: src/main/connections.c:5525
+#: src/main/connections.c:5532
+#: src/main/connections.c:5546
 msgid "allocation of 'gzcon' connection failed"
 msgstr "выделить gzcon-соединение не удалось"
 
-#: src/main/connections.c:5644
+#: src/main/connections.c:5733
 msgid "not a list of sockets"
 msgstr "не является списком сокетов"
 
-#: src/main/connections.c:5649
+#: src/main/connections.c:5738
 msgid "bad write indicators"
 msgstr "плохие индикаторы записи"
 
-#: src/main/connections.c:5660
+#: src/main/connections.c:5749
 msgid "not a socket connection"
 msgstr "не сокет-соединение"
 
-#: src/main/connections.c:5905
+#: src/main/connections.c:5994
 msgid "unknown compression, assuming none"
 msgstr "неизвестный архиватор, предполагаю, что архивации не было"
 
-#: src/main/connections.c:6023 src/main/connections.c:6027
-#: src/main/connections.c:6033
+#: src/main/connections.c:6112
+#: src/main/connections.c:6116
+#: src/main/connections.c:6122
 #, c-format
 msgid "allocation of %s connection failed"
 msgstr "размещение %s соединения не удалось"
 
-#: src/main/context.c:282
+#: src/main/context.c:294
 msgid "no loop for break/next, jumping to top level"
 msgstr "нет цикла для прерывания/следующего, перехожу на верхний уровень"
 
-#: src/main/context.c:290
+#: src/main/context.c:302
 msgid "no function to return from, jumping to top level"
 msgstr "нет функции для возврата, перехожу на верхний уровень"
 
-#: src/main/context.c:302
+#: src/main/context.c:317
 msgid "target context is not on the stack"
 msgstr "целевой контекст не находится в стеке"
 
-#: src/main/context.c:324 src/main/context.c:340 src/main/context.c:407
-#: src/main/context.c:428 src/main/context.c:440 src/main/context.c:452
+#: src/main/context.c:339
+#: src/main/context.c:355
+#: src/main/context.c:422
+#: src/main/context.c:443
+#: src/main/context.c:455
+#: src/main/context.c:467
 msgid "not that many frames on the stack"
 msgstr "не так много кадров в стеке"
 
-#: src/main/context.c:357
+#: src/main/context.c:372
 msgid "only positive values of 'n' are allowed"
 msgstr "только положительные значения 'n' разрешены"
 
-#: src/main/context.c:478
+#: src/main/context.c:493
 msgid "no function to restart"
 msgstr "нет функции для перезапуска"
 
-#: src/main/context.c:515
+#: src/main/context.c:530
 msgid "number of contexts must be positive"
 msgstr "количество контекстов должно быть положительно"
 
-#: src/main/context.c:528
+#: src/main/context.c:543
 msgid "no browser context to query"
 msgstr "нет браузерного контекста по запросу"
 
-#: src/main/context.c:546
+#: src/main/context.c:561
 msgid "not that many calls to browser are active"
 msgstr "не так много вызовов браузера активно"
 
-#: src/main/context.c:560
+#: src/main/context.c:575
 msgid "not that many functions on the call stack"
 msgstr "не так много функций в стеке вызова"
 
-#: src/main/context.c:645
+#: src/main/context.c:660
 msgid "internal error in 'do_sys'"
 msgstr "внутренняя ошибка в 'do_sys'"
 
 #: src/main/cum.c:49
 msgid "integer overflow in 'cumsum'; use 'cumsum(as.numeric(.))'"
-msgstr ""
-"целочисленное переполнение в 'cumsum'; используйте 'cumsum(as.numeric(.))'"
-
-#: src/main/cum.c:178
-msgid "'cummin' not defined for complex numbers"
-msgstr "'cummin' не определено для комплексных чисел"
+msgstr "целочисленное переполнение в 'cumsum'; используйте 'cumsum(as.numeric(.))'"
 
-#: src/main/cum.c:181
+#: src/main/cum.c:180
 msgid "'cummax' not defined for complex numbers"
 msgstr "'cummax' не определено для комплексных чисел"
 
-#: src/main/cum.c:206 src/main/cum.c:230
+#: src/main/cum.c:183
+msgid "'cummin' not defined for complex numbers"
+msgstr "'cummin' не определено для комплексных чисел"
+
+#: src/main/cum.c:210
+#: src/main/cum.c:237
 msgid "unknown cumxxx function"
 msgstr "неизвестная функция 'cumxxx'"
 
-#: src/main/datetime.c:548 src/main/datetime.c:556 src/main/datetime.c:570
-#: src/main/datetime.c:575
+#: src/main/datetime.c:558
+#: src/main/datetime.c:566
+#: src/main/datetime.c:580
+#: src/main/datetime.c:585
 msgid "problem with setting timezone"
 msgstr "проблема установки часового пояса"
 
-#: src/main/datetime.c:560
+#: src/main/datetime.c:570
 msgid "cannot set timezones on this system"
 msgstr "не могу установить часовые пояса для этой системы"
 
-#: src/main/datetime.c:582 src/main/datetime.c:584
+#: src/main/datetime.c:592
+#: src/main/datetime.c:594
 msgid "problem with unsetting timezone"
 msgstr "проблема выключения часового пояса"
 
-#: src/main/datetime.c:804 src/main/datetime.c:806 src/main/datetime.c:901
-#: src/main/datetime.c:1240 src/main/datetime.c:1242
+#: src/main/datetime.c:814
+#: src/main/datetime.c:816
+#: src/main/datetime.c:911
+#: src/main/datetime.c:1257
+#: src/main/datetime.c:1259
 msgid "zero-length component in non-empty \"POSIXlt\" structure"
 msgstr "нулевая составляющая в непустой \"POSIXlt\"-структуре"
 
-#: src/main/dcf.c:113 src/main/dcf.c:181 src/main/dcf.c:253
+#: src/main/dcf.c:113
+#: src/main/dcf.c:181
+#: src/main/dcf.c:253
 msgid "could not allocate memory for 'read.dcf'"
 msgstr "не могу разместить память для 'read.dcf'"
 
@@ -2439,70 +2939,94 @@ msgstr "аргумент должен быть замыканием"
 msgid "argument must be a function"
 msgstr "аргумент должен быть функцией"
 
-#: src/main/debug.c:132 src/main/debug.c:166 src/main/debug.c:224
+#: src/main/debug.c:111
+#, c-format
+msgid "Value for '%s' must be TRUE or FALSE"
+msgstr "Значение '%s' должно быть TRUE или FALSE"
+
+#: src/main/debug.c:139
+#: src/main/debug.c:167
+#: src/main/debug.c:237
 msgid "argument must not be a function"
 msgstr "аргумент не должен быть функцией"
 
-#: src/main/debug.c:135
+#: src/main/debug.c:142
 msgid "cannot trace NULL"
 msgstr "не могу трассировать NULL"
 
-#: src/main/debug.c:139
+#: src/main/debug.c:146
 msgid "'tracemem' is not useful for promise and environment objects"
 msgstr "'tracemem' бесполезна для перспективных объектов и объектов-окружений"
 
-#: src/main/debug.c:142
+#: src/main/debug.c:149
 msgid "'tracemem' is not useful for weak reference or external pointer objects"
 msgstr "'tracemem' бесполезна для слабых ссылок и внешних указателей"
 
-#: src/main/debug.c:148 src/main/debug.c:171
+#: src/main/debug.c:178
+#: src/main/debug.c:183
 msgid "R was not compiled with support for memory profiling"
 msgstr "R не был скомпилирован с поддержкой профилирования памяти"
 
-#: src/main/deparse.c:152 src/main/sprintf.c:213 src/main/sprintf.c:245
+#: src/main/deparse.c:155
+#: src/main/sprintf.c:216
+#: src/main/sprintf.c:248
 msgid "too few arguments"
 msgstr "слишком мало аргументов"
 
-#: src/main/deparse.c:159
+#: src/main/deparse.c:162
 msgid "invalid 'cutoff' value for 'deparse', using default"
 msgstr "неправильный 'cutoff' для 'deparse', использую умолчание"
 
-#: src/main/deparse.c:247
+#: src/main/deparse.c:253
 msgid "deparse of an S4 object will not be source()able"
 msgstr "'deparse' S4-объекта не будет доступен для source()"
 
-#: src/main/deparse.c:249
+#: src/main/deparse.c:255
 msgid "deparse may be incomplete"
 msgstr "'deparse' может быть неполным"
 
-#: src/main/deparse.c:251
+#: src/main/deparse.c:257
 msgid "deparse may be not be source()able in R < 2.7.0"
 msgstr "'deparse' может быть недоступным для source() в R < 2.7.0"
 
-#: src/main/deparse.c:369 src/main/deparse.c:461 src/main/deparse.c:467
+#: src/main/deparse.c:349
+#: src/main/deparse.c:399
+#: src/main/source.c:206
+msgid "'file' must be a character string or connection"
+msgstr "'file' должен быть текстовой строкой или соединением"
+
+#: src/main/deparse.c:377
+#: src/main/deparse.c:472
+#: src/main/deparse.c:478
 msgid "wrote too few characters"
 msgstr "записано слишком мало символов"
 
-#: src/main/deparse.c:391
+#: src/main/deparse.c:401
 msgid "character arguments expected"
 msgstr "требуются текстовые аргументы"
 
-#: src/main/deparse.c:394
+#: src/main/deparse.c:404
 msgid "zero-length argument"
 msgstr "нулевой аргумент"
 
-#: src/main/deparse.c:401
+#: src/main/deparse.c:411
 msgid "'opts' should be small non-negative integer"
 msgstr "'opts' должен быть малым положительным целым числом"
 
-#: src/main/deparse.c:411 src/main/envir.c:1764 src/main/envir.c:1846
-#: src/main/eval.c:569 src/main/eval.c:1251 src/main/eval.c:3627
-#: src/main/saveload.c:1978 src/main/saveload.c:2309 src/main/serialize.c:2727
+#: src/main/deparse.c:421
+#: src/main/envir.c:1896
+#: src/main/envir.c:1981
+#: src/main/eval.c:568
+#: src/main/eval.c:1332
+#: src/main/eval.c:4127
+#: src/main/saveload.c:1978
+#: src/main/saveload.c:2310
+#: src/main/serialize.c:2773
 #, c-format
 msgid "object '%s' not found"
 msgstr "объект '%s' не найден"
 
-#: src/main/deparse.c:1519
+#: src/main/deparse.c:1573
 msgid "badly formed function expression"
 msgstr "плохо сформированное выражение для функции"
 
@@ -2510,250 +3034,251 @@ msgstr "плохо сформированное выражение для фун
 msgid "the base graphics system is not registered"
 msgstr "базовая графическая система не зарегистрирована"
 
-#: src/main/devices.c:165 src/main/devices.c:172
+#: src/main/devices.c:166
+#: src/main/devices.c:174
 msgid "no active or default device"
 msgstr "нет активного или умалчиваемого устройства"
 
-#: src/main/devices.c:385 src/main/devices.c:447
+#: src/main/devices.c:387
+#: src/main/devices.c:449
 msgid "too many open devices"
 msgstr "слишком много открытых устройств"
 
-#: src/main/devices.c:474
+#: src/main/devices.c:490
 msgid "not enough memory to allocate device (in GEcreateDevDesc)"
 msgstr "недостаточно памяти для размещения устройства (в GEcreateDevDesc)"
 
-#: src/main/devices.c:515
+#: src/main/devices.c:531
 msgid "Hit <Return> to see next plot: "
 msgstr "Нажмите <Ввод>, чтобы увидеть следующий график:"
 
-#: src/main/dotcode.c:112 src/main/dotcode.c:142
+#: src/main/dotcode.c:127
+#: src/main/dotcode.c:157
 msgid "NULL value passed as symbol address"
 msgstr "NULL-значение передано как символический адрес"
 
-#: src/main/dotcode.c:133
+#: src/main/dotcode.c:148
 #, c-format
 msgid "Unimplemented type %d in createRSymbolObject"
 msgstr "Нереализованный тип %d у createRSymbolObject"
 
-#: src/main/dotcode.c:147 src/main/dotcode.c:237
+#: src/main/dotcode.c:162
+#: src/main/dotcode.c:260
 #, c-format
 msgid "symbol '%s' is too long"
 msgstr "символ '%s' слишком длинен"
 
-#: src/main/dotcode.c:159
-msgid ""
-"first argument must be a string (of length 1) or native symbol reference"
-msgstr ""
-"первый аргумент должен быть строкой (единичной длины) или естественной "
-"символьной ссылкой"
+#: src/main/dotcode.c:174
+msgid "first argument must be a string (of length 1) or native symbol reference"
+msgstr "первый аргумент должен быть строкой (единичной длины) или естественной символьной ссылкой"
 
-#: src/main/dotcode.c:201 src/main/dotcode.c:563
+#: src/main/dotcode.c:224
+#: src/main/dotcode.c:1240
 msgid "too many arguments in foreign function call"
 msgstr "слишком много аргументов при вызове внешней функции"
 
-#: src/main/dotcode.c:213
+#: src/main/dotcode.c:236
 msgid "PACKAGE = \"\" is invalid"
 msgstr "PACKAGE = \"\" неправильный"
 
-#: src/main/dotcode.c:269 src/main/dotcode.c:274 src/main/dotcode.c:279
-#: src/main/dotcode.c:284
+#: src/main/dotcode.c:292
+#: src/main/dotcode.c:297
+#: src/main/dotcode.c:302
+#: src/main/dotcode.c:307
 #, c-format
 msgid "\"%s\" not available for %s() for package \"%s\""
 msgstr "\"%s\" недоступен для %s() для пакета \"%s\""
 
-#: src/main/dotcode.c:289
+#: src/main/dotcode.c:312
 #, c-format
 msgid "%s symbol name \"%s\" not in DLL for package \"%s\""
 msgstr "%s имя символа \"%s\" отсутствует в DLL пакета \"%s\""
 
-#: src/main/dotcode.c:294
+#: src/main/dotcode.c:317
 #, c-format
 msgid "%s symbol name \"%s\" not in load table"
 msgstr "%s имя символа \"%s\" отсутствует в таблице загрузки"
 
-#: src/main/dotcode.c:348 src/main/dotcode.c:352 src/main/dotcode.c:362
-#: src/main/dotcode.c:427 src/main/dotcode.c:434
+#: src/main/dotcode.c:368
+#: src/main/dotcode.c:370
+#: src/main/dotcode.c:380
+#: src/main/dotcode.c:445
+#: src/main/dotcode.c:452
 #, c-format
 msgid "'%s' used more than once"
 msgstr "'%s' использован более одного раза"
 
-#: src/main/dotcode.c:358
+#: src/main/dotcode.c:376
 msgid "DLL name is too long"
 msgstr "имя DLL слишком длинное"
 
-#: src/main/dotcode.c:403
+#: src/main/dotcode.c:421
 msgid "PACKAGE argument must be a single character string"
 msgstr "аргумент PACKAGE должен быть простой текстовой строкой"
 
-#: src/main/dotcode.c:409
+#: src/main/dotcode.c:427
 msgid "PACKAGE argument is too long"
 msgstr "аргумент PACKAGE слишком длинный"
 
-#: src/main/dotcode.c:474
+#: src/main/dotcode.c:492
 msgid "no arguments supplied"
 msgstr "не заданы аргументы"
 
-#: src/main/dotcode.c:475 src/main/seq.c:913
+#: src/main/dotcode.c:493
+#: src/main/seq.c:911
 msgid "too many arguments"
 msgstr "слишком много аргументов"
 
-#: src/main/dotcode.c:512 src/main/dotcode.c:554 src/main/dotcode.c:1397
+#: src/main/dotcode.c:530
+#: src/main/dotcode.c:1232
+#: src/main/dotcode.c:1420
 msgid "'.NAME' is missing"
 msgstr "'NAME' отсутствует"
 
-#: src/main/dotcode.c:521 src/main/dotcode.c:570 src/main/dotcode.c:1418
+#: src/main/dotcode.c:539
+#: src/main/dotcode.c:1247
+#: src/main/dotcode.c:1441
 #, c-format
 msgid "Incorrect number of arguments (%d), expecting %d for '%s'"
 msgstr "Неправильное количество аргументов (%d), ожидается %d для '%s' "
 
-#: src/main/dotcode.c:1227 src/main/dotcode.c:2276
+#: src/main/dotcode.c:1216
+#: src/main/dotcode.c:2290
 msgid "too many arguments, sorry"
 msgstr "слишком много аргументов, извините"
 
-#: src/main/dotcode.c:1261 src/main/dotcode.c:1278 src/main/engine.c:2993
+#: src/main/dotcode.c:1284
+#: src/main/dotcode.c:1301
+#: src/main/engine.c:2993
 msgid "invalid graphics state"
 msgstr "неправильное графическое состояние"
 
-#: src/main/dotcode.c:1357
+#: src/main/dotcode.c:1380
 msgid "NULL value for DLLInfoReference when looking for DLL"
 msgstr "значение NULL для DLLInfoReference во время поиска DLL"
 
-#: src/main/dotcode.c:1458
+#: src/main/dotcode.c:1481
 #, c-format
 msgid "wrong type for argument %d in call to %s"
 msgstr "неправильный тип аргумента %d при вызове %s"
 
-#: src/main/dotcode.c:1470
-#, c-format
-msgid ""
-"explicit request not to duplicate arguments in call to '%s', but argument %d "
-"is of the wrong type (%d != %d)"
-msgstr ""
-"явный запрос не дублировать аргументы при вызове '%s', однако аргумент %d "
-"неправильного типа (%d != %d)"
-
-#: src/main/dotcode.c:1493
+#: src/main/dotcode.c:1510
 #, c-format
 msgid "long vectors (argument %d) are not supported in %s"
 msgstr "длинные вектора (аргумент %d) не поддерживаются в %s"
 
-#: src/main/dotcode.c:1524
+#: src/main/dotcode.c:1541
 #, c-format
 msgid "NAs in foreign function call (arg %d)"
 msgstr "NA при вызове внешней функции (аргумент %d)"
 
-#: src/main/dotcode.c:1547
+#: src/main/dotcode.c:1564
 #, c-format
 msgid "NA/NaN/Inf in foreign function call (arg %d)"
 msgstr "NA/NaN/Inf при вызове внешней функции (аргумент %d)"
 
-#: src/main/dotcode.c:1552
-msgid "single values not returned if not duplicated"
-msgstr "одиночные значения не возвращаются, если не дублированы"
-
-#: src/main/dotcode.c:1578
+#: src/main/dotcode.c:1594
 #, c-format
 msgid "complex NA/NaN/Inf in foreign function call (arg %d)"
 msgstr "комплексные NA/NaN/Inf при вызове внешней функции (аргумент %d)"
 
-#: src/main/dotcode.c:1597
-msgid "character variables must be duplicated in .C/.Fortran"
-msgstr "текстовые переменные должны быть дублированы в  .C/.Fortran"
-
-#: src/main/dotcode.c:1602
+#: src/main/dotcode.c:1616
 msgid "only first string in char vector used in .Fortran"
 msgstr "только первая строка текстового вектора использована в .Fortran"
 
-#: src/main/dotcode.c:1645 src/main/dotcode.c:1661 src/main/dotcode.c:1672
+#: src/main/dotcode.c:1659
+#: src/main/dotcode.c:1675
+#: src/main/dotcode.c:1686
 #, c-format
 msgid "invalid mode (%s) to pass to Fortran (arg %d)"
 msgstr "неправильный режим (%s) для передачи в Fortran (аргумент %d)"
 
-#: src/main/dotcode.c:1666
+#: src/main/dotcode.c:1680
 #, c-format
 msgid "invalid mode (%s) to pass to C or Fortran (arg %d)"
 msgstr "неправильный режим (%s) для передачи в C или Fortran (аргумент %d)"
 
-#: src/main/dotcode.c:1677
+#: src/main/dotcode.c:1691
 msgid "pairlists are passed as SEXP as from R 2.15.0"
 msgstr "pairlists are passed as SEXP as from R 2.15.0"
 
-#: src/main/dotcode.c:2499
+#: src/main/dotcode.c:2510
 #, c-format
 msgid "type \"%s\" not supported in interlanguage calls"
 msgstr "тип \"%s\" не поддерживается при межязыковых вызовах"
 
-#: src/main/dotcode.c:2604
+#: src/main/dotcode.c:2615
 #, c-format
 msgid "mode '%s' is not supported in call_R"
 msgstr "режим '%s' не поддерживается в call_R"
 
-#: src/main/dounzip.c:171
+#: src/main/dounzip.c:172
 #, c-format
 msgid " not overwriting file '%s"
 msgstr "перезапись файла '%s' не выполнена"
 
-#: src/main/dounzip.c:256
+#: src/main/dounzip.c:257
 #, c-format
 msgid "zip file '%s' cannot be opened"
 msgstr "zip файл '%s' не может быть открыт"
 
-#: src/main/dounzip.c:312
+#: src/main/dounzip.c:313
 msgid "invalid zip name argument"
 msgstr "неправильный аргумент имени zip"
 
-#: src/main/dounzip.c:315 src/main/dounzip.c:409
+#: src/main/dounzip.c:316
+#: src/main/dounzip.c:410
 msgid "zip path is too long"
 msgstr "путь zip слишком длинный"
 
-#: src/main/dounzip.c:332
+#: src/main/dounzip.c:333
 msgid "'exdir' is too long"
 msgstr "'exdir' слишком длинное"
 
-#: src/main/dounzip.c:335
+#: src/main/dounzip.c:336
 msgid "'exdir' does not exist"
 msgstr "'exdir' не существует"
 
-#: src/main/dounzip.c:363
+#: src/main/dounzip.c:364
 msgid "requested file not found in the zip file"
 msgstr "запрошенный файл не найден в zip-файле"
 
-#: src/main/dounzip.c:366
+#: src/main/dounzip.c:367
 msgid "zip file is corrupt"
 msgstr "zip-файл поврежден"
 
-#: src/main/dounzip.c:369
+#: src/main/dounzip.c:370
 msgid "CRC error in zip file"
 msgstr "ошибка CRC в zip-файле"
 
-#: src/main/dounzip.c:376
+#: src/main/dounzip.c:377
 msgid "write error in extracting from zip file"
 msgstr "ошибка записи при распаковке zip-файла"
 
-#: src/main/dounzip.c:379
+#: src/main/dounzip.c:380
 #, c-format
 msgid "error %d in extracting from zip file"
 msgstr "ошибка %d при распаковке zip-файла"
 
-#: src/main/dounzip.c:404
+#: src/main/dounzip.c:405
 msgid "unz connections can only be opened for reading"
 msgstr "unz-соединение может быть открыто только для чтения"
 
-#: src/main/dounzip.c:415
+#: src/main/dounzip.c:416
 msgid "invalid description of 'unz' connection"
 msgstr "неправильное описание 'unz'-соединения"
 
-#: src/main/dounzip.c:421
+#: src/main/dounzip.c:422
 #, c-format
 msgid "cannot open zip file '%s'"
 msgstr "не могу открыть zip-файл '%s'"
 
-#: src/main/dounzip.c:425
+#: src/main/dounzip.c:426
 #, c-format
 msgid "cannot locate file '%s' in zip file '%s'"
 msgstr "не могу найти файл '%s' в zip-файле '%s'"
 
-#: src/main/dounzip.c:469
+#: src/main/dounzip.c:470
 msgid "printing not enabled for this connection"
 msgstr "печать для этого соединения невозможна"
 
@@ -2761,8 +3286,10 @@ msgstr "печать для этого соединения невозможна
 msgid "write not enabled for this connection"
 msgstr "запись для этого соединения невозможна"
 
-#: src/main/dounzip.c:496 src/main/dounzip.c:500 src/main/dounzip.c:506
-#: src/main/dounzip.c:523
+#: src/main/dounzip.c:494
+#: src/main/dounzip.c:498
+#: src/main/dounzip.c:504
+#: src/main/dounzip.c:521
 msgid "allocation of 'unz' connection failed"
 msgstr "размещение 'unz'-соединения не удалось"
 
@@ -2778,7 +3305,8 @@ msgstr "неправильные аргументы в теле для 'function
 msgid "invalid argument to edit()"
 msgstr "неправильный аргумент у 'edit()'"
 
-#: src/main/edit.c:121 src/main/saveload.c:2076
+#: src/main/edit.c:121
+#: src/main/saveload.c:2076
 msgid "unable to open file"
 msgstr "не могу открыть файл"
 
@@ -2829,7 +3357,9 @@ msgstr ""
 msgid "Graphics API version mismatch"
 msgstr "Несоответствие версии графического API"
 
-#: src/main/engine.c:113 src/main/engine.c:118 src/main/engine.c:182
+#: src/main/engine.c:113
+#: src/main/engine.c:118
+#: src/main/engine.c:182
 msgid "unable to allocate memory (in GEregister)"
 msgstr "не могу разместить память (в GEregister)"
 
@@ -2841,18 +3371,30 @@ msgstr "слишком много зарегистрированных граф
 msgid "no graphics system to unregister"
 msgstr "нет графической системы для отмены регистрации"
 
-#: src/main/engine.c:443 src/main/engine.c:448 src/main/engine.c:456
-#: src/main/engine.c:463 src/main/engine.c:477 src/modules/X11/devX11.c:1157
+#: src/main/engine.c:443
+#: src/main/engine.c:448
+#: src/main/engine.c:456
+#: src/main/engine.c:463
+#: src/main/engine.c:477
+#: src/modules/X11/devX11.c:1157
 msgid "invalid line end"
 msgstr "неправильный конец строки"
 
-#: src/main/engine.c:508 src/main/engine.c:513 src/main/engine.c:521
-#: src/main/engine.c:528 src/main/engine.c:542 src/modules/X11/devX11.c:1175
+#: src/main/engine.c:508
+#: src/main/engine.c:513
+#: src/main/engine.c:521
+#: src/main/engine.c:528
+#: src/main/engine.c:542
+#: src/modules/X11/devX11.c:1175
 msgid "invalid line join"
 msgstr "неправильное объединение строк"
 
-#: src/main/engine.c:761 src/main/engine.c:865 src/main/engine.c:1098
-#: src/main/engine.c:1205 src/main/engine.c:1328 src/main/engine.c:1392
+#: src/main/engine.c:761
+#: src/main/engine.c:865
+#: src/main/engine.c:1098
+#: src/main/engine.c:1205
+#: src/main/engine.c:1328
+#: src/main/engine.c:1392
 msgid "'lwd' must be non-negative and finite"
 msgstr "'lwd' должен быть положительным конечным числом"
 
@@ -2935,7 +3477,8 @@ msgstr "аргумент 'list' должен быть списком"
 msgid "'env' argument must be an environment"
 msgstr "аргумент 'env' должен быть окружением"
 
-#: src/main/engine.c:3051 src/main/engine.c:3059
+#: src/main/engine.c:3051
+#: src/main/engine.c:3059
 msgid "invalid multibyte char in pch=\"c\""
 msgstr "неправильный многобайтный знак в pch=\"c\""
 
@@ -2951,718 +3494,765 @@ msgstr "неправильный тип линии: должен быть дли
 msgid "invalid line type: zeroes are not allowed"
 msgstr "неправильный тип линии: нули не разрешены"
 
-#: src/main/engine.c:3142 src/main/engine.c:3150 src/main/engine.c:3157
+#: src/main/engine.c:3142
+#: src/main/engine.c:3150
+#: src/main/engine.c:3157
 msgid "invalid line type"
 msgstr "неправильный тип линии"
 
-#: src/main/envir.c:120 src/main/envir.c:132
+#: src/main/envir.c:120
+#: src/main/envir.c:132
 #, c-format
 msgid "cannot change value of locked binding for '%s'"
 msgstr "не могу изменить значение блокированной связи '%s'"
 
-#: src/main/envir.c:251 src/main/envir.c:1454
+#: src/main/envir.c:251
+#: src/main/envir.c:1528
 msgid "cannot add bindings to a locked environment"
 msgstr "не могу добавить связи в блокированное окружение"
 
-#: src/main/envir.c:772
+#: src/main/envir.c:775
 msgid "invalid cached value in R_GetGlobalCache"
 msgstr "неправильное кэшированное значение в R_GetGlobalCache"
 
-#: src/main/envir.c:830
+#: src/main/envir.c:836
 msgid "cannot unbind in the base namespace"
 msgstr "не могу освободить в базовом окружении"
 
-#: src/main/envir.c:832
+#: src/main/envir.c:838
 msgid "unbind in the base environment is unimplemented"
 msgstr "освобождение в базовом окружении не реализовано"
 
-#: src/main/envir.c:834 src/main/envir.c:1684
+#: src/main/envir.c:840
+#: src/main/envir.c:1816
 msgid "cannot remove bindings from a locked environment"
 msgstr "не могу убрать связи в блокированном окружении"
 
-#: src/main/envir.c:1139
+#: src/main/envir.c:1211
 #, c-format
 msgid "argument to '%s' is not an environment"
 msgstr "аргумент для %s не является окружением"
 
-#: src/main/envir.c:1300
+#: src/main/envir.c:1372
 #, c-format
 msgid "the ... list does not contain %d elements"
 msgstr "список  ... не содержит %d элементов"
 
-#: src/main/envir.c:1302
+#: src/main/envir.c:1374
 #, c-format
 msgid "..%d used in an incorrect context, no ... to look in"
 msgstr "..%d использовано в неправильном контексте, нет ... чтобы найти"
 
-#: src/main/envir.c:1390 src/main/envir.c:1842 src/main/eval.c:573
-#: src/main/eval.c:3618
-#, c-format
-msgid "argument \"%s\" is missing, with no default"
-msgstr "аргумент \"%s\" пропущен, умолчаний нет"
-
-#: src/main/envir.c:1395
+#: src/main/envir.c:1467
 #, c-format
 msgid "could not find function \"%s\""
 msgstr "не могу найти функцию \"%s\""
 
-#: src/main/envir.c:1418
+#: src/main/envir.c:1490
 msgid "cannot assign values in the empty environment"
 msgstr "не могу присваивать значения в пустом окружении"
 
-#: src/main/envir.c:1424 src/main/envir.c:1497
+#: src/main/envir.c:1496
+#: src/main/envir.c:1626
 msgid "cannot assign variables to this database"
 msgstr "не могу присвоить переменные этой базе данных"
 
-#: src/main/envir.c:1580
+#: src/main/envir.c:1712
 #, c-format
 msgid "cannot add binding of '%s' to the base environment"
 msgstr "не могу добавить связи '%s' в базовое окружение"
 
-#: src/main/envir.c:1609
+#: src/main/envir.c:1741
 msgid "only the first element is used as variable name"
 msgstr "только первый элемент использован как имя переменной"
 
-#: src/main/envir.c:1641
+#: src/main/envir.c:1773
 msgid "first argument must be a named list"
 msgstr "первый аргумент должен быть именованным списком"
 
-#: src/main/envir.c:1646
+#: src/main/envir.c:1778
 msgid "names(x) must be a character vector of the same length as x"
 msgstr "names(x) должен быть строковым вектором длиной, совпадающей с длиной x"
 
-#: src/main/envir.c:1649
+#: src/main/envir.c:1781
 msgid "'envir' argument must be an environment"
 msgstr "аргумент 'envir' должен быть окружением"
 
-#: src/main/envir.c:1678
+#: src/main/envir.c:1810
 msgid "cannot remove variables from base namespace"
 msgstr "не могу убрать переменные из базового пространства имен"
 
-#: src/main/envir.c:1680
+#: src/main/envir.c:1812
 msgid "cannot remove variables from the base environment"
 msgstr "не могу удалить переменные из базового окружения"
 
-#: src/main/envir.c:1682
+#: src/main/envir.c:1814
 msgid "cannot remove variables from the empty environment"
 msgstr "не могу удалить переменные из пустого окружения"
 
-#: src/main/envir.c:1690
+#: src/main/envir.c:1822
 msgid "cannot remove variables from this database"
 msgstr "не могу удалить переменные из этой базы данных"
 
-#: src/main/envir.c:1849
+#: src/main/envir.c:1983
 #, c-format
 msgid "object '%s' of mode '%s' was not found"
 msgstr "переменная '%s' типа '%s' не найдена"
 
-#: src/main/envir.c:1921
+#: src/main/envir.c:2066
 #, c-format
 msgid "invalid name in position %d"
 msgstr "неправильное имя в позиции %d"
 
-#: src/main/envir.c:1927
+#: src/main/envir.c:2072
 msgid "second argument must be an environment"
 msgstr "второй аргумент должен быть окружением"
 
-#: src/main/envir.c:1935 src/main/envir.c:1943
+#: src/main/envir.c:2080
+#: src/main/envir.c:2088
 #, c-format
 msgid "wrong length for '%s' argument"
 msgstr "неправильная длина аргумента '%s''"
 
-#: src/main/envir.c:2062
+#: src/main/envir.c:2219
 msgid "invalid use of 'missing'"
 msgstr "неправильное использование 'missing'"
 
-#: src/main/envir.c:2087
+#: src/main/envir.c:2245
 msgid "'missing' can only be used for arguments"
 msgstr "'missing' может использоваться только для аргументов"
 
-#: src/main/envir.c:2168
+#: src/main/envir.c:2331
 msgid "'pos' must be an integer"
 msgstr "'pos' должен быть целым"
 
-#: src/main/envir.c:2182
+#: src/main/envir.c:2345
 msgid "all elements of a list must be named"
 msgstr "все элементы должны быть именованы"
 
-#: src/main/envir.c:2205
+#: src/main/envir.c:2368
 msgid "'attach' only works for lists, data frames and environments"
 msgstr "'attach' работает только со списками, таблицами данных и окружениями"
 
-#: src/main/envir.c:2288
+#: src/main/envir.c:2451
 msgid "detaching \"package:base\" is not allowed"
 msgstr "отделение \"package:base\" не разрешено"
 
-#: src/main/envir.c:2589 src/main/envir.c:2644
+#: src/main/envir.c:2796
+#: src/main/envir.c:2877
 msgid "argument must be an environment"
 msgstr "аргумент должен быть окружением"
 
-#: src/main/envir.c:2648
+#: src/main/envir.c:2881
 msgid "arguments must be symbolic"
 msgstr "аргументы должны быть символическими"
 
-#: src/main/envir.c:2772
+#: src/main/envir.c:3017
 msgid "no enclosing environment"
 msgstr "нет вложенного окружения"
 
-#: src/main/envir.c:2825
+#: src/main/envir.c:3070
 #, c-format
 msgid "no item called \"%s\" on the search list"
 msgstr "в списке поиска нет пункта по имени \"%s\""
 
-#: src/main/envir.c:2850
+#: src/main/envir.c:3095
 msgid "using 'as.environment(NULL)' is defunct"
 msgstr "использование 'as.environment(NULL)' не одобряется"
 
-#: src/main/envir.c:2856
+#: src/main/envir.c:3101
 msgid "S4 object does not extend class \"environment\""
 msgstr "объект S4 не расширяет класс \"environment\""
 
-#: src/main/envir.c:2871
+#: src/main/envir.c:3116
 msgid "invalid object for 'as.environment'"
 msgstr "неправильный объект для 'as.environment'"
 
-#: src/main/envir.c:2897 src/main/envir.c:2925 src/main/envir.c:2954
-#: src/main/envir.c:2975 src/main/envir.c:2998 src/main/envir.c:3033
-#: src/main/envir.c:3054
+#: src/main/envir.c:3142
+#: src/main/envir.c:3170
+#: src/main/envir.c:3199
+#: src/main/envir.c:3220
+#: src/main/envir.c:3243
+#: src/main/envir.c:3278
+#: src/main/envir.c:3299
 msgid "not an environment"
 msgstr "не окружение"
 
-#: src/main/envir.c:2949 src/main/envir.c:2970 src/main/envir.c:2991
-#: src/main/envir.c:3028 src/main/envir.c:3049 src/main/envir.c:3148
+#: src/main/envir.c:3194
+#: src/main/envir.c:3215
+#: src/main/envir.c:3236
+#: src/main/envir.c:3273
+#: src/main/envir.c:3294
+#: src/main/envir.c:3393
 msgid "not a symbol"
 msgstr "не символ"
 
-#: src/main/envir.c:2962 src/main/envir.c:2983 src/main/envir.c:3041
-#: src/main/envir.c:3062
+#: src/main/envir.c:3207
+#: src/main/envir.c:3228
+#: src/main/envir.c:3286
+#: src/main/envir.c:3307
 #, c-format
 msgid "no binding for \"%s\""
 msgstr "нет связи для \"%s\""
 
-#: src/main/envir.c:2993
+#: src/main/envir.c:3238
 msgid "not a function"
 msgstr "не функция"
 
-#: src/main/envir.c:3001 src/main/envir.c:3017
+#: src/main/envir.c:3246
+#: src/main/envir.c:3262
 msgid "symbol already has a regular binding"
 msgstr "символ уже имеет правильную связь"
 
-#: src/main/envir.c:3003 src/main/envir.c:3019
+#: src/main/envir.c:3248
+#: src/main/envir.c:3264
 msgid "cannot change active binding if binding is locked"
 msgstr "не могу изменить активную связь когда связь блокирована"
 
-#: src/main/envir.c:3107
+#: src/main/envir.c:3352
+#: src/main/envir.c:3589
 msgid "unknown op"
 msgstr "неизвестный op"
 
-#: src/main/envir.c:3152
+#: src/main/envir.c:3397
 msgid "cannot unbind a locked binding"
 msgstr "не могу освободить блокированную связь"
 
-#: src/main/envir.c:3154
+#: src/main/envir.c:3399
 msgid "cannot unbind an active binding"
 msgstr "не могу освободить активную связь"
 
-#: src/main/envir.c:3289
+#: src/main/envir.c:3540
 msgid "bad namespace name"
 msgstr "неправильное имя пространства имен"
 
-#: src/main/envir.c:3301
+#: src/main/envir.c:3552
 msgid "namespace already registered"
 msgstr "пространство имен уже зарегистрировано"
 
-#: src/main/envir.c:3313
+#: src/main/envir.c:3564
 msgid "namespace not registered"
 msgstr "пространство имен не регистрировано"
 
-#: src/main/envir.c:3360
+#: src/main/envir.c:3620
 msgid "bad import environment argument"
 msgstr "неправильный аргумент импорта окружения"
 
-#: src/main/envir.c:3365
+#: src/main/envir.c:3625
 msgid "bad export environment argument"
 msgstr "неправильный аргумент экспорта окружения"
 
-#: src/main/envir.c:3369
+#: src/main/envir.c:3629
 msgid "length of import and export names must match"
 msgstr "длины экспортируемых и импортируемых имен должны совпадать"
 
-#: src/main/envir.c:3392
+#: src/main/envir.c:3652
 #, c-format
 msgid "exported symbol '%s' has no value"
 msgstr "экспортируемый символ '%s' не имеет значения"
 
 # fuzzy, c-format
-#: src/main/envir.c:3557
+#: src/main/envir.c:3817
 #, c-format
 msgid "unknown encoding: %d"
 msgstr "неизвестная кодировка: %d"
 
-#: src/main/envir.c:3577
+#: src/main/envir.c:3837
 #, c-format
 msgid "embedded nul in string: '%s'"
 msgstr "внутреннее nul в строке: '%s'"
 
-#: src/main/errors.c:178 src/main/errors.c:215
+#: src/main/errors.c:171
+#: src/main/errors.c:208
 msgid "interrupts suspended; signal ignored"
 msgstr "прерывания заморожены; сигнал пропущен"
 
+#: src/main/errors.c:258
+msgid "[... truncated]"
+msgstr "[... обрезано]"
+
 #: src/main/errors.c:318
 msgid "invalid option \"warning.expression\""
 msgstr "неправильный параметр \"warning.expression\""
 
-#: src/main/errors.c:348
+#: src/main/errors.c:347
 #, c-format
 msgid "(converted from warning) %s"
 msgstr "(конвертировано из предупреждения) %s"
 
-#: src/main/errors.c:359
-#, c-format
-msgid "Warning: %s\n"
-msgstr "Предупреждение: %s\n"
+#: src/main/errors.c:357
+msgid "Warning:"
+msgstr "Предупреждение:"
 
-#: src/main/errors.c:363
+#: src/main/errors.c:359
 #, c-format
-msgid "Warning in %s : %s\n"
-msgstr "Предупреждение в %s : %s\n"
+msgid "Warning in %s :"
+msgstr "Предупреждение в %s :"
 
-#: src/main/errors.c:365
-#, c-format
-msgid ""
-"Warning in %s :\n"
-"  %s\n"
-msgstr ""
-"Предупреждение в %s :\n"
-"  %s\n"
+#: src/main/errors.c:368
+#: src/main/errors.c:382
+#: src/main/errors.c:695
+msgid "Calls:"
+msgstr "Вызовы:"
 
-#: src/main/errors.c:428 src/main/errors.c:447 src/main/errors.c:596
+#: src/main/errors.c:429
+#: src/main/errors.c:448
+#: src/main/errors.c:610
 msgid "Lost warning messages\n"
 msgstr "Потерянные предупреждения\n"
 
-#: src/main/errors.c:459
-msgid "Warning message:\n"
-msgid_plural "Warning messages:\n"
-msgstr[0] "Предупреждение\n"
-msgstr[1] "Предупреждения\n"
-msgstr[2] "Предупреждения\n"
+#: src/main/errors.c:460
+msgid "Warning message:"
+msgid_plural "Warning messages:"
+msgstr[0] "Предупреждение:"
+msgstr[1] "Предупреждения:"
+msgstr[2] "Предупреждения:"
 
-#: src/main/errors.c:514
+#: src/main/errors.c:470
+#: src/main/errors.c:498
 #, c-format
-msgid "There were %d warnings (use warnings() to see them)\n"
-msgstr "Было %d предупреждений (введите warnings() чтобы их просмотреть)\n"
+msgid "In %s :"
+msgstr "В %s :"
 
-#: src/main/errors.c:517
+#: src/main/errors.c:523
 #, c-format
-msgid "There were %d or more warnings (use warnings() to see the first %d)\n"
-msgstr ""
-"Было %d или более предупреждений (введите warnings() чтобы просмотреть "
-"первые %d)\n"
+msgid "There was %d warning (use warnings() to see it)"
+msgid_plural "There were %d warnings (use warnings() to see them)"
+msgstr[0] "Было %d предупреждение (введите warnings() чтобы его просмотреть)"
+msgstr[1] "Было %d предупреждения (введите warnings() чтобы их просмотреть)"
+msgstr[2] "Было %d предупреждений (введите warnings() чтобы их просмотреть)"
 
-#: src/main/errors.c:587
+#: src/main/errors.c:528
+#, c-format
+msgid "There were %d or more warnings (use warnings() to see the first %d)"
+msgstr "Было %d или более предупреждений (введите warnings() чтобы просмотреть первые %d)"
+
+#: src/main/errors.c:601
 msgid "Error during wrapup: "
 msgstr "Ошибка во время создания сводки: "
 
-#: src/main/errors.c:612
+#: src/main/errors.c:626
 msgid "Error in "
 msgstr "Ошибка в "
 
-#: src/main/errors.c:613
+#: src/main/errors.c:648
+#: src/main/errors.c:655
+#, c-format
+msgid "Error in %s (from %s) : "
+msgstr "Ошибка в %s (из %s) : "
+
+#: src/main/errors.c:657
 #, c-format
-msgid " (from %s) : "
-msgstr " (из %s) : "
+msgid "Error in %s : "
+msgstr "Ошибка в %s :"
 
-#: src/main/errors.c:664 src/main/errors.c:670
+#: src/main/errors.c:677
+#: src/main/errors.c:683
 #, c-format
 msgid "Error: "
 msgstr "Ошибка: "
 
-#: src/main/errors.c:690 src/main/errors.c:1319
+#: src/main/errors.c:704
+#: src/main/errors.c:1333
 msgid "In addition: "
 msgstr "Вдобавок: "
 
-#: src/main/errors.c:811
+#: src/main/errors.c:825
 msgid "invalid option \"error\"\n"
 msgstr "неправильный параметр \"error\"\n"
 
-#: src/main/errors.c:893
+#: src/main/errors.c:907
 msgid "Execution halted\n"
 msgstr "Выполнение остановлено\n"
 
-#: src/main/errors.c:1032
-msgid "'msg1' must be a character string"
-msgstr "'msg1' должен быть текстовой строкой"
-
-#: src/main/errors.c:1034
-msgid "'msg2' must be a character string"
-msgstr "'msg2' должен быть текстовой строкой"
+#: src/main/errors.c:1046
+#: src/main/errors.c:1048
+#: src/main/options.c:338
+#: src/main/unique.c:1578
+#, c-format
+msgid "'%s' must be a character string"
+msgstr "'%s' должен быть текстовой строкой"
 
-#: src/main/errors.c:1131
+#: src/main/errors.c:1145
 msgid " [invalid string in stop(.)]"
 msgstr " [неправильная строка в stop(.)]"
 
-#: src/main/errors.c:1162
+#: src/main/errors.c:1176
 msgid " [invalid string in warning(.)]"
 msgstr " [неправильная строка в warning(.)]"
 
-#: src/main/errors.c:1178
+#: src/main/errors.c:1192
 #, c-format
 msgid "incorrect number of arguments to \"%s\""
 msgstr "у \"%s\" неправильное количество аргументов"
 
-#: src/main/errors.c:1184 src/main/errors.c:1199
+#: src/main/errors.c:1198
+#: src/main/errors.c:1213
 #, c-format
 msgid "unimplemented feature in %s"
 msgstr "эта особенность в %s не реализована"
 
-#: src/main/errors.c:1193
+#: src/main/errors.c:1207
 msgid "invalid number of arguments"
 msgstr "неправильное количество аргументов"
 
-#: src/main/errors.c:1194 src/main/logic.c:189
+#: src/main/errors.c:1208
+#: src/main/logic.c:180
 msgid "invalid argument type"
 msgstr "неправильный тип аргумента"
 
-#: src/main/errors.c:1196
+#: src/main/errors.c:1210
 msgid "time-series/vector length mismatch"
 msgstr "несоответствие длины временного ряда/вектора"
 
-#: src/main/errors.c:1197
+#: src/main/errors.c:1211
 msgid "incompatible arguments"
 msgstr "несовместимые аргументы"
 
-#: src/main/errors.c:1200
+#: src/main/errors.c:1214
 msgid "unknown error (report this!)"
 msgstr "неизвестная ошибка (сообщите о ней!)"
 
-#: src/main/errors.c:1212
+#: src/main/errors.c:1223
+msgid "inaccurate integer conversion in coercion"
+msgstr "вынужденное неточное целочисленное преобразование"
+
+#: src/main/errors.c:1226
 msgid "unknown warning (report this!)"
 msgstr "неизвестное предупреждение (сообщите о нем!)"
 
-#: src/main/errors.c:1283
+#: src/main/errors.c:1297
 msgid "No function to return from, jumping to top level"
 msgstr "Нет функции для возврата, перехожу на верхний уровень"
 
-#: src/main/errors.c:1299
+#: src/main/errors.c:1313
 msgid "top level inconsistency?"
 msgstr "противоречивость верхнего уровня?"
 
-#: src/main/errors.c:1478
+#: src/main/errors.c:1492
 msgid "bad handler data"
 msgstr "неправильный данные обработчика"
 
-#: src/main/errors.c:1628
+#: src/main/errors.c:1642
 msgid "error message not a string"
 msgstr "сообщение об ошибке не является строкой"
 
-#: src/main/errors.c:1703
+#: src/main/errors.c:1717
 msgid "handler or restart stack mismatch in old restart"
-msgstr ""
-"несоответствие обработчика или перезагрузочного стека в старой перезагрузке"
+msgstr "несоответствие обработчика или перезагрузочного стека в старой перезагрузке"
 
-#: src/main/errors.c:1729 src/main/errors.c:1745
+#: src/main/errors.c:1743
+#: src/main/errors.c:1759
 msgid "bad error message"
 msgstr "неправильное сообщение об ошибке"
 
-#: src/main/errors.c:1787
+#: src/main/errors.c:1800
 msgid "bad restart"
 msgstr "неправильная перезагрузка"
 
-#: src/main/errors.c:1819
+#: src/main/errors.c:1832
 msgid "restart not on stack"
 msgstr "перезагрузка не в стеке"
 
-#: src/main/errors.c:1836
+#: src/main/errors.c:1848
 msgid "not in a try context"
 msgstr "не в контексте 'try'"
 
-#: src/main/errors.c:1849
+#: src/main/errors.c:1861
 msgid "error message must be a character string"
 msgstr "сообщение об ошибке должно быть текстовой строкой"
 
-#: src/main/eval.c:308
+#: src/main/eval.c:307
 #, c-format
 msgid "source files skipped by Rprof; please increase '%s'"
 msgstr "исходные файлы пропущены Rprof; увеличьте '%s'"
 
-#: src/main/eval.c:328
+#: src/main/eval.c:327
 #, c-format
 msgid "Rprof: cannot open profile file '%s'"
 msgstr "Rprof: не могу открыть файл профиля '%s'"
 
-#: src/main/eval.c:422
+#: src/main/eval.c:421
 msgid "R profiling is not available on this system"
 msgstr "R-профилирование недоступно в этой системе"
 
-#: src/main/eval.c:446
-msgid ""
-"promise already under evaluation: recursive default argument reference or "
-"earlier problems?"
-msgstr ""
-"обещание уже рассматривается: рекурсивная ссылка на аргумент по умолчанию "
-"или более ранние проблемы?"
+#: src/main/eval.c:445
+msgid "promise already under evaluation: recursive default argument reference or earlier problems?"
+msgstr "обещание уже рассматривается: рекурсивная ссылка на аргумент по умолчанию или более ранние проблемы?"
 
-#: src/main/eval.c:448
+#: src/main/eval.c:447
 msgid "restarting interrupted promise evaluation"
 msgstr "перезапуск прерван выполнением обещания"
 
-#: src/main/eval.c:544
-msgid ""
-"evaluation nested too deeply: infinite recursion / options(expressions=)?"
-msgstr ""
-"исполнение расположено слишком глубоко: неопределенная рекурсия / options"
-"(expressions=)?"
+#: src/main/eval.c:543
+msgid "evaluation nested too deeply: infinite recursion / options(expressions=)?"
+msgstr "исполнение расположено слишком глубоко: неопределенная рекурсия / options(expressions=)?"
 
-#: src/main/eval.c:575 src/main/eval.c:3619
+#: src/main/eval.c:574
+#: src/main/eval.c:4119
 msgid "argument is missing, with no default"
 msgstr "аргумент пропущен, умолчаний нет"
 
-#: src/main/eval.c:679 src/main/eval.c:4642
+#: src/main/eval.c:678
+#: src/main/eval.c:1215
+#: src/main/eval.c:5410
 msgid "attempt to apply non-function"
 msgstr "попытка применить не-функцию"
 
-#: src/main/eval.c:702
+#: src/main/eval.c:701
 #, c-format
 msgid "%s at %s#%d: "
 msgstr "%s на %s#%d: "
 
-#: src/main/eval.c:1178
+#: src/main/eval.c:1207
+#: src/main/eval.c:2180
+#, c-format
+msgid "argument %d is empty"
+msgstr "аргумент %d пуст"
+
+#: src/main/eval.c:1259
 #, c-format
 msgid "could not find symbol \"%s\" in environment of the generic function"
 msgstr "не могу найти символ \"%s\" в окружении общей функции"
 
-#: src/main/eval.c:1196
+#: src/main/eval.c:1277
 #, c-format
 msgid "symbol \"%s\" not in environment of method"
 msgstr "символ \"%s\" не находится окружении метода"
 
-#: src/main/eval.c:1308
+#: src/main/eval.c:1390
 msgid "the condition has length > 1 and only the first element will be used"
 msgstr "длина условия > 1, будет использован только первый элемент"
 
-#: src/main/eval.c:1325
+#: src/main/eval.c:1409
 msgid "missing value where TRUE/FALSE needed"
 msgstr "пропущенное значение, а нужно TRUE/FALSE"
 
-#: src/main/eval.c:1326
+#: src/main/eval.c:1410
 msgid "argument is not interpretable as logical"
 msgstr "аргумент не интерпретируется как логический"
 
-#: src/main/eval.c:1327
+#: src/main/eval.c:1411
 msgid "argument is of length zero"
 msgstr "аргумент нулевой длины"
 
-#: src/main/eval.c:1418
+#: src/main/eval.c:1504
 msgid "non-symbol loop variable"
 msgstr "несимвольная переменная цикла"
 
-#: src/main/eval.c:1510 src/main/eval.c:4408
+#: src/main/eval.c:1596
+#: src/main/eval.c:5182
 msgid "invalid for() loop sequence"
 msgstr "неправильная циклическая последовательность for()"
 
-#: src/main/eval.c:1652
+#: src/main/eval.c:1736
 msgid "multi-argument returns are not permitted"
 msgstr "многоаргументные возвраты не разрешены"
 
-#: src/main/eval.c:1701
+#: src/main/eval.c:1783
 msgid "invalid (NULL) left side of assignment"
 msgstr "неправильная (NULL) левая сторона присваивания"
 
-#: src/main/eval.c:1734
+#: src/main/eval.c:1817
 msgid "target of assignment expands to non-language object"
 msgstr "цель присваивания раскрывается в неязыковой объект"
 
-#: src/main/eval.c:1817
+#: src/main/eval.c:1900
 #, c-format
 msgid "overlong name in '%s'"
 msgstr "слишком длинное имя в '%s'"
 
-#: src/main/eval.c:1915
+#: src/main/eval.c:1990
 msgid "cannot do complex assignments in base namespace"
 msgstr "не могу делать комплексные присваивания в базовом пространстве имен"
 
-#: src/main/eval.c:1917
+#: src/main/eval.c:1992
 msgid "cannot do complex assignments in base environment"
 msgstr "не могу делать комплексные присваивания в базовом окружении"
 
-#: src/main/eval.c:1954 src/main/eval.c:1981
+#: src/main/eval.c:2030
+#: src/main/eval.c:2057
 msgid "invalid function in complex assignment"
 msgstr "неправильная функция в комплексном присвоении"
 
-#: src/main/eval.c:2041
+#: src/main/eval.c:2117
 msgid "invalid (do_set) left-hand side to assignment"
 msgstr "неправильная (do_set) левая сторона в присвоении"
 
-#: src/main/eval.c:2103
-#, c-format
-msgid "argument %d is empty"
-msgstr "аргумент %d пуст"
-
-#: src/main/eval.c:2116
+#: src/main/eval.c:2193
 #, c-format
 msgid "'%s' is missing"
 msgstr "'%s' отсутствует"
 
-#: src/main/eval.c:2267
+#: src/main/eval.c:2348
 msgid "invalid formal argument list for \"function\""
 msgstr "неправильный список формальных аргументов для \"функция\""
 
-#: src/main/eval.c:2325 src/main/eval.c:2356 src/main/eval.c:2361
+#: src/main/eval.c:2406
+#: src/main/eval.c:2437
+#: src/main/eval.c:2442
 #, c-format
 msgid "invalid '%s' argument of type '%s'"
 msgstr "неправильный аргумент '%s' типа '%s'"
 
-#: src/main/eval.c:2353
+#: src/main/eval.c:2434
 msgid "numeric 'envir' arg not of length one"
 msgstr "числовой аргумент 'envir' не единичной длины"
 
-#: src/main/eval.c:2377 src/main/eval.c:2399
+#: src/main/eval.c:2458
+#: src/main/eval.c:2482
 msgid "restarts not supported in 'eval'"
 msgstr "перезапуск не поддерживается в 'eval'"
 
-#: src/main/eval.c:2456 src/main/eval.c:2469
+#: src/main/eval.c:2541
+#: src/main/eval.c:2554
 msgid "'Recall' called from outside a closure"
 msgstr "'Recall' вызвано снаружи вложения"
 
-#: src/main/eval.c:2562
+#: src/main/eval.c:2647
 msgid "value in '...' is not a promise"
 msgstr "значение в '...' не является перспективным"
 
-#: src/main/eval.c:2754 src/main/objects.c:720
-#, c-format
-msgid "call name too long in '%s'"
-msgstr "слишком длинное имя вызова в '%s'"
-
-#: src/main/eval.c:2775
-#, c-format
-msgid "generic name too long in '%s'"
-msgstr "у %s слишком длинное общее имя"
-
-#: src/main/eval.c:2840
+#: src/main/eval.c:2908
 #, c-format
 msgid "Incompatible methods (\"%s\", \"%s\") for \"%s\""
 msgstr "Несовместимые методы (\"%s\", \"%s\") для \"%s\""
 
-#: src/main/eval.c:2906
+#: src/main/eval.c:2957
 msgid "dispatch error in group dispatch"
 msgstr "ошибка отправки в групповой отправке"
 
-#: src/main/eval.c:3201
+#: src/main/eval.c:3441
 #, c-format
 msgid "\"%s\" is not a %s function"
 msgstr "'%s' не является %s функцией"
 
-#: src/main/eval.c:3430
+#: src/main/eval.c:3928
 msgid "node stack overflow"
 msgstr "переполнение стека узла"
 
-#: src/main/eval.c:3436
+#: src/main/eval.c:3934
 msgid "integer stack overflow"
 msgstr "переполнение стека целых чисел"
 
-#: src/main/eval.c:3490
+#: src/main/eval.c:3988
 msgid "bad opcode"
 msgstr "неправильный opcode"
 
-#: src/main/eval.c:4219
+#: src/main/eval.c:4964
 #, c-format
 msgid "invalid %s type in 'x %s y'"
 msgstr "неправильный тип %s в 'x %s y'"
 
-#: src/main/eval.c:4310
+#: src/main/eval.c:5076
 msgid "bytecode version mismatch; using eval"
 msgstr "несоответствие версии байтового кода; использую eval"
 
-#: src/main/eval.c:4315
+#: src/main/eval.c:5081
 msgid "bytecode version is too old"
 msgstr "версия байтового кода слишком старая"
 
-#: src/main/eval.c:4316
+#: src/main/eval.c:5082
 msgid "bytecode version is too new"
 msgstr "версия байтового кода слишком новая"
 
-#: src/main/eval.c:4350
+#: src/main/eval.c:5116
 msgid "byte code version mismatch"
 msgstr "несоответствие версии байтового кода"
 
-#: src/main/eval.c:4477
+#: src/main/eval.c:5264
 msgid "invalid sequence argument in for loop"
 msgstr "неправильная последовательность аргументов в цикле 'for'"
 
-#: src/main/eval.c:4624 src/main/names.c:1181
+#: src/main/eval.c:5399
+#: src/main/names.c:1312
 #, c-format
 msgid "there is no .Internal function '%s'"
 msgstr "нет .Internal функции '%s'"
 
-#: src/main/eval.c:4731 src/main/eval.c:5077 src/main/eval.c:5119
+#: src/main/eval.c:5497
+#: src/main/eval.c:5843
+#: src/main/eval.c:5883
 msgid "bad function"
 msgstr "неправильная функция"
 
-#: src/main/eval.c:4746
+#: src/main/eval.c:5510
 msgid "not a BUILTIN function"
 msgstr "не BUILTIN-функция"
 
-#: src/main/eval.c:5159
+#: src/main/eval.c:5940
 msgid "numeric EXPR required for 'switch' without named alternatives"
 msgstr "числовое EXPR требуется для 'switch' без именованных альтернатив"
 
-#: src/main/eval.c:5255
+#: src/main/eval.c:6051
 msgid "cannot find index for threaded code address"
 msgstr "не могу найти индекс для нитевого адреса кода"
 
-#: src/main/eval.c:5315
+#: src/main/eval.c:6111
 msgid "invalid body"
 msgstr "неправильное тело"
 
-#: src/main/eval.c:5335
+#: src/main/eval.c:6131
 msgid "invalid symbol"
 msgstr "неправильный символ"
 
-#: src/main/eval.c:5379
+#: src/main/eval.c:6175
 msgid "argument is not a byte code object"
 msgstr "аргумент не является объектом байтового кода"
 
-#: src/main/eval.c:5400
+#: src/main/eval.c:6196
 msgid "bad file name"
 msgstr "неправильное имя файла"
 
-#: src/main/eval.c:5404 src/main/eval.c:5425
+#: src/main/eval.c:6200
+#: src/main/eval.c:6221
 msgid "unable to open 'file'"
 msgstr "не могу открыть 'file'"
 
-#: src/main/eval.c:5419 src/main/saveload.c:1942
+#: src/main/eval.c:6215
+#: src/main/saveload.c:1942
 msgid "'file' must be non-empty string"
 msgstr "'file' должен быть непустой строкой"
 
-#: src/main/eval.c:5421 src/main/saveload.c:1944 src/main/saveload.c:2244
-#: src/main/serialize.c:2149
+#: src/main/eval.c:6217
+#: src/main/saveload.c:1944
+#: src/main/saveload.c:2244
+#: src/main/serialize.c:2189
 msgid "'ascii' must be logical"
 msgstr "'ascii' должно быть логическим"
 
-#: src/main/eval.c:5492 src/main/eval.c:5511 src/main/eval.c:5541
+#: src/main/eval.c:6288
+#: src/main/eval.c:6307
+#: src/main/eval.c:6337
 msgid "constant buffer must be a generic vector"
 msgstr "константный буфер должен быть общим вектором"
 
-#: src/main/eval.c:5543
+#: src/main/eval.c:6339
 msgid "bad constant count"
 msgstr "неверное число констант"
 
-#: src/main/eval.c:5579
+#: src/main/eval.c:6375
 msgid "profile timer in use"
 msgstr "используется профильный таймер"
 
-#: src/main/eval.c:5581
+#: src/main/eval.c:6377
 msgid "already byte code profiling"
 msgstr "уже есть побайтное профилирование"
 
-#: src/main/eval.c:5599
+#: src/main/eval.c:6395
 msgid "setting profile timer failed"
 msgstr "установить профильный таймер не удалось"
 
-#: src/main/eval.c:5616
+#: src/main/eval.c:6412
 msgid "not byte code profiling"
 msgstr "не побайтное профилирование"
 
+#: src/main/eval.c:6427
+#: src/main/eval.c:6430
+#: src/main/eval.c:6433
+msgid "byte code profiling is not supported in this build"
+msgstr "профилинг байткода не поддерживается в этой сборке"
+
 #: src/main/gevents.c:43
 #, c-format
 msgid "'%s' events not supported in this device"
@@ -3688,14 +4278,18 @@ msgstr "рекурсивное использование 'getGraphicsEvent' н
 msgid "no graphics event handlers set"
 msgstr "нет графических обработчиков событий"
 
-#: src/main/gram.y:222 src/main/gram.y:237 src/main/gram.y:2222
-#: src/main/gram.y:2236
+#: src/main/gram.y:222
+#: src/main/gram.y:237
+#: src/main/gram.y:2245
+#: src/main/gram.y:2259
 #, c-format
 msgid "EOF whilst reading MBCS char at line %d"
 msgstr "EOF во время чтения символа MBCS на строке %d"
 
-#: src/main/gram.y:226 src/main/gram.y:234 src/main/gram.y:2226
-#: src/main/gram.y:2233
+#: src/main/gram.y:226
+#: src/main/gram.y:234
+#: src/main/gram.y:2249
+#: src/main/gram.y:2256
 #, c-format
 msgid "invalid multibyte character in parser at line %d"
 msgstr "неправильный многобайтный символ при обработке на строке %d"
@@ -3710,121 +4304,131 @@ msgstr "переполнение буфера ввода на строке %d"
 msgid "incorrect tag type at line %d"
 msgstr "некорректный тип тега на строке %d"
 
-#: src/main/gram.y:1653
+#: src/main/gram.y:1657
 msgid "contextstack overflow"
 msgstr "переполнение стека контекста"
 
-#: src/main/gram.y:1890
-msgid "input"
-msgstr "ввод"
+#: src/main/gram.y:1907
+#: src/main/gram.y:1913
+#, c-format
+msgid "unexpected input"
+msgstr "неожиданный ввод"
 
-#: src/main/gram.y:1891
-msgid "end of input"
-msgstr "конец ввода"
+#: src/main/gram.y:1910
+#: src/main/main.c:311
+#, c-format
+msgid "unexpected end of input"
+msgstr "неожиданный конец ввода"
 
-#: src/main/gram.y:1892
-msgid "string constant"
-msgstr "строковая константа"
+#: src/main/gram.y:1916
+#, c-format
+msgid "unexpected string constant"
+msgstr "неожиданная строковая константа"
 
-#: src/main/gram.y:1893
-msgid "numeric constant"
-msgstr "числовая константа"
+#: src/main/gram.y:1919
+#, c-format
+msgid "unexpected numeric constant"
+msgstr "неожиданная числовая константа"
 
-#: src/main/gram.y:1894
-msgid "symbol"
-msgstr "символ"
+#: src/main/gram.y:1922
+#, c-format
+msgid "unexpected symbol"
+msgstr "неожиданный симфол"
 
-#: src/main/gram.y:1895
-msgid "assignment"
-msgstr "присвоение"
+#: src/main/gram.y:1925
+#, c-format
+msgid "unexpected assignment"
+msgstr "неожиданное присвоение"
 
-#: src/main/gram.y:1896
-msgid "end of line"
-msgstr "конец строки"
+#: src/main/gram.y:1928
+#, c-format
+msgid "unexpected end of line"
+msgstr "неожиданный конец строки"
 
-#: src/main/gram.y:1910 src/main/gram.y:1916
+#: src/main/gram.y:1931
+#: src/main/gram.y:1939
 #, c-format
 msgid "unexpected %s"
 msgstr "неожиданный %s"
 
-#: src/main/gram.y:1926
+#: src/main/gram.y:1951
 #, c-format
 msgid "repeated formal argument '%s' on line %d"
 msgstr "повторный формальный аргумент '%s' на строке %d"
 
-#: src/main/gram.y:2136
+#: src/main/gram.y:2161
 #, c-format
 msgid "integer literal %s contains decimal; using numeric value"
 msgstr "целочисленная константа %s содержит доли; использую числовое значение"
 
-#: src/main/gram.y:2140
+#: src/main/gram.y:2164
 #, c-format
 msgid "non-integer value %s qualified with L; using numeric value"
 msgstr "нечисловое значение %s ограничено L; использую числовое значение"
 
-#: src/main/gram.y:2153
+#: src/main/gram.y:2176
 #, c-format
 msgid "integer literal %s contains unnecessary decimal point"
 msgstr "целочисленная константа %s имеет ненужный десятичный разделитель"
 
-#: src/main/gram.y:2185
+#: src/main/gram.y:2208
 #, c-format
 msgid "unable to allocate buffer for long string at line %d"
 msgstr "не могу разместить буфер для длинной подстроки на строке %d"
 
-#: src/main/gram.y:2338
+#: src/main/gram.y:2347
+#: src/main/gram.y:2370
+#: src/main/gram.y:2407
+#: src/main/gram.y:2443
+#, c-format
+msgid "nul character not allowed (line %d)"
+msgstr "nul символ не разрешается (строка %d)"
+
+#: src/main/gram.y:2363
 #, c-format
 msgid "'\\x' used without hex digits in character string starting \"%s\""
-msgstr ""
-"'\\x' использовано без шестнадцатиричных цифр в строке начинающейся с \"%s\""
+msgstr "'\\x' использовано без шестнадцатиричных цифр в строке начинающейся с \"%s\""
 
-#: src/main/gram.y:2352
+#: src/main/gram.y:2379
 #, c-format
 msgid "\\uxxxx sequences not supported inside backticks (line %d)"
-msgstr ""
-"последовательности \\uxxxx не поддерживаются внутри обратных кавычек (строка "
-"%d)"
+msgstr "последовательности \\uxxxx не поддерживаются внутри обратных кавычек (строка %d)"
 
-#: src/main/gram.y:2367
+#: src/main/gram.y:2394
 #, c-format
 msgid "'\\u' used without hex digits in character string starting \"%s\""
-msgstr ""
-"'\\x' использовано без шестнадцатиричных цифр в строке начинающейся с \"%s\""
+msgstr "'\\x' использовано без шестнадцатиричных цифр в строке начинающейся с \"%s\""
 
-#: src/main/gram.y:2375
+#: src/main/gram.y:2402
 #, c-format
 msgid "invalid \\u{xxxx} sequence (line %d)"
 msgstr "неправильная \\u{xxxx} последовательность (строка %d)"
 
-#: src/main/gram.y:2387
+#: src/main/gram.y:2416
 #, c-format
 msgid "\\Uxxxxxxxx sequences not supported inside backticks (line %d)"
-msgstr ""
-"последовательности \\Uxxxxxxxx не поддерживаются внутри обратных кавычек "
-"(строка %d)"
+msgstr "последовательности \\Uxxxxxxxx не поддерживаются внутри обратных кавычек (строка %d)"
 
-#: src/main/gram.y:2402
+#: src/main/gram.y:2431
 #, c-format
 msgid "'\\U' used without hex digits in character string starting \"%s\""
-msgstr ""
-"'\\x' использовано без шестнадцатиричных цифр в строке начинающейся с \"%s\""
+msgstr "'\\x' использовано без шестнадцатиричных цифр в строке начинающейся с \"%s\""
 
-#: src/main/gram.y:2410
+#: src/main/gram.y:2439
 #, c-format
 msgid "invalid \\U{xxxxxxxx} sequence (line %d)"
 msgstr "неправильная \\U{xxxxxxxx} последовательность (строка %d)"
 
-#: src/main/gram.y:2451
+#: src/main/gram.y:2482
 #, c-format
 msgid "'\\%c' is an unrecognized escape in character string starting \"%s\""
-msgstr ""
-"'\\%c' -- нераспознаваемый префикс в строке в строке начинающейся с \"%s\""
+msgstr "'\\%c' -- нераспознаваемый префикс в строке в строке начинающейся с \"%s\""
 
-#: src/main/gram.y:2510
+#: src/main/gram.y:2546
 msgid "mixing Unicode and octal/hex escapes in a string is not allowed"
 msgstr "смешивание Юникода и octal/hex escapes в строке не позволяется"
 
-#: src/main/gram.y:2514
+#: src/main/gram.y:2550
 #, c-format
 msgid ""
 "string at line %d containing Unicode escapes not in this locale\n"
@@ -3833,13 +4437,15 @@ msgstr ""
 "подстрока на строке %d, содержащая Unicode-escapes не из этой локали\n"
 "слишком длинная (максимум 10000 символов)"
 
-#: src/main/gram.y:3112 src/main/gram.y:3119 src/main/gram.y:3125
-#: src/main/gram.y:3132
+#: src/main/gram.y:3148
+#: src/main/gram.y:3155
+#: src/main/gram.y:3161
+#: src/main/gram.y:3168
 #, c-format
 msgid "contextstack overflow at line %d"
 msgstr "переполнение стека целых чисел на строке %d"
 
-#: src/main/gram.y:3227
+#: src/main/gram.y:3263
 #, c-format
 msgid "internal parser error at line %d"
 msgstr "ошибка внутреннего парсера на строке %d"
@@ -3849,34 +4455,42 @@ msgstr "ошибка внутреннего парсера на строке %d"
 msgid "relative range of values =%4.0f * EPS, is small (axis %d)"
 msgstr "относительный размах значений =%4.0f * EPS мал (ось %d)"
 
-#: src/main/grep.c:93
+#: src/main/grep.c:96
 #, c-format
 msgid "invalid regular expression '%s', reason '%s'"
 msgstr "неправильное регулярное выражение '%s', причина '%s'"
 
-#: src/main/grep.c:95
+#: src/main/grep.c:98
 #, c-format
 msgid "invalid regular expression, reason '%s'"
 msgstr "неправильное регулярное выражение, причина '%s'"
 
-#: src/main/grep.c:220 src/main/grep.c:308 src/main/grep.c:416
-#: src/main/grep.c:883 src/main/grep.c:2473
+#: src/main/grep.c:225
+#: src/main/grep.c:315
+#: src/main/grep.c:426
+#: src/main/grep.c:900
+#: src/main/grep.c:2499
 #, c-format
 msgid "input string %d is invalid UTF-8"
 msgstr "входная строка %d -- это неправильный UTF-8"
 
-#: src/main/grep.c:286 src/main/grep.c:383
+#: src/main/grep.c:292
+#: src/main/grep.c:391
 #, c-format
 msgid "'split' string %d is invalid UTF-8"
 msgstr "строка 'split' %d -- это неправильный UTF-8"
 
-#: src/main/grep.c:290 src/main/grep.c:387 src/main/grep.c:560
+#: src/main/grep.c:296
+#: src/main/grep.c:395
+#: src/main/grep.c:571
 #, c-format
 msgid "'split' string %d is invalid in this locale"
 msgstr "строка 'split' %d для этой локали неправильная"
 
-#: src/main/grep.c:395 src/main/grep.c:851 src/main/grep.c:1600
-#: src/main/grep.c:2394
+#: src/main/grep.c:404
+#: src/main/grep.c:867
+#: src/main/grep.c:1621
+#: src/main/grep.c:2419
 #, c-format
 msgid ""
 "PCRE pattern compilation error\n"
@@ -3887,13 +4501,15 @@ msgstr ""
 "\t'%s'\n"
 "\tв '%s'\n"
 
-#: src/main/grep.c:397
+#: src/main/grep.c:406
 #, c-format
 msgid "invalid split pattern '%s'"
 msgstr "неправильный образец разделения '%s'"
 
-#: src/main/grep.c:401 src/main/grep.c:857 src/main/grep.c:1607
-#: src/main/grep.c:2401
+#: src/main/grep.c:410
+#: src/main/grep.c:873
+#: src/main/grep.c:1628
+#: src/main/grep.c:2426
 #, c-format
 msgid ""
 "PCRE pattern study error\n"
@@ -3902,47 +4518,52 @@ msgstr ""
 "Ошибка анализа паттерна PCRE\n"
 "\t'%s'\n"
 
-#: src/main/grep.c:834 src/main/grep.c:2377
+#: src/main/grep.c:849
+#: src/main/grep.c:2401
 msgid "regular expression is invalid UTF-8"
 msgstr "регулярное выражение -- это неправильный UTF-8"
 
-#: src/main/grep.c:853 src/main/grep.c:1602 src/main/grep.c:2396
+#: src/main/grep.c:869
+#: src/main/grep.c:1623
+#: src/main/grep.c:2421
 #, c-format
 msgid "invalid regular expression '%s'"
 msgstr "неправильное регулярное выражение '%s'"
 
-#: src/main/grep.c:1264
+#: src/main/grep.c:1282
 msgid "pattern matches an empty string infinitely, returning first match only"
-msgstr ""
-"образец позволяет сопоставить пустую строку негораниченное число раз, только "
-"первое совпадение возвращено"
+msgstr "образец позволяет сопоставить пустую строку негораниченное число раз, только первое совпадение возвращено"
 
-#: src/main/grep.c:1575
+#: src/main/grep.c:1595
 msgid "'pattern' is invalid UTF-8"
 msgstr "'pattern' -- это неправильный UTF-8"
 
-#: src/main/grep.c:1577
+#: src/main/grep.c:1597
 msgid "'replacement' is invalid UTF-8"
 msgstr "'replacement' -- это неправильный UTF-8"
 
-#: src/main/grep.c:1581
+#: src/main/grep.c:1601
 msgid "'pattern' is invalid in this locale"
 msgstr "неправильный 'pattern' для этой локали"
 
-#: src/main/grep.c:1584
+#: src/main/grep.c:1604
 msgid "'replacement' is invalid in this locale"
 msgstr "неправильный 'replacement' для этой локали"
 
-#: src/main/grep.c:1589
+#: src/main/grep.c:1609
 msgid "zero-length pattern"
 msgstr "нулевой образец"
 
-#: src/main/grep.c:1732 src/main/grep.c:1748 src/main/grep.c:1796
-#: src/main/grep.c:1812 src/main/grep.c:1859 src/main/grep.c:1875
+#: src/main/grep.c:1753
+#: src/main/grep.c:1769
+#: src/main/grep.c:1817
+#: src/main/grep.c:1833
+#: src/main/grep.c:1880
+#: src/main/grep.c:1896
 msgid "result string is too long"
 msgstr "строка результата слишком длинна"
 
-#: src/main/grep.c:2411
+#: src/main/grep.c:2436
 #, c-format
 msgid "'pcre_fullinfo' returned '%d' "
 msgstr "'pcre_fullinfo' вернул '%d' "
@@ -3951,30 +4572,45 @@ msgstr "'pcre_fullinfo' вернул '%d' "
 msgid "ignoring non-pairlist attributes"
 msgstr "пропускаю non-pairlist атрибуты"
 
-#: src/main/internet.c:92
+#: src/main/internet.c:83
 msgid "internet routines cannot be accessed in module"
 msgstr "средства Интернет не доступны из модуля"
 
-#: src/main/internet.c:103 src/main/internet.c:141 src/main/internet.c:154
-#: src/main/internet.c:165 src/main/internet.c:176 src/main/internet.c:187
-#: src/main/internet.c:196 src/main/internet.c:207 src/main/internet.c:218
-#: src/main/internet.c:227 src/main/internet.c:237
+#: src/main/internet.c:94
+#: src/main/internet.c:128
+#: src/main/internet.c:141
+#: src/main/internet.c:152
+#: src/main/internet.c:163
+#: src/main/internet.c:174
+#: src/main/internet.c:183
+#: src/main/internet.c:194
+#: src/main/internet.c:205
+#: src/main/internet.c:214
+#: src/main/internet.c:224
+#: src/main/internet.c:338
+#: src/main/internet.c:349
+#: src/main/internet.c:360
+#: src/main/internet.c:372
 msgid "internet routines cannot be loaded"
 msgstr "средства Интернет не могут быть загружены"
 
-#: src/main/internet.c:118 src/main/memory.c:3434 src/main/memory.c:3444
-#: src/main/memory.c:3456 src/main/memory.c:3470 src/main/memory.c:3487
-#: src/main/memory.c:3505
+#: src/main/internet.c:109
+#: src/main/memory.c:3490
+#: src/main/memory.c:3500
+#: src/main/memory.c:3512
+#: src/main/memory.c:3526
+#: src/main/memory.c:3541
+#: src/main/memory.c:3559
 msgid "bad value"
 msgstr "неправильное значение"
 
-#: src/main/internet.c:124
-msgid "internet routines were already initialized"
-msgstr "средства Интернет уже включены"
-
-#: src/main/internet.c:251 src/main/internet.c:265 src/main/internet.c:281
-#: src/main/internet.c:293 src/main/internet.c:307 src/main/internet.c:327
-#: src/main/internet.c:340
+#: src/main/internet.c:238
+#: src/main/internet.c:252
+#: src/main/internet.c:268
+#: src/main/internet.c:280
+#: src/main/internet.c:294
+#: src/main/internet.c:314
+#: src/main/internet.c:327
 msgid "socket routines cannot be loaded"
 msgstr "средства сокетов не могут быть загружены"
 
@@ -3986,43 +4622,40 @@ msgstr "средства LAPACK не доступны в модуле"
 msgid "LAPACK routines cannot be loaded"
 msgstr "средства LAPACK не могут быть загружены"
 
-#: src/main/logic.c:70
-msgid "binary operations require two arguments"
-msgstr "бинарные операторы требуют два аргумента"
-
-#: src/main/logic.c:88 src/main/logic.c:150
+#: src/main/logic.c:79
+#: src/main/logic.c:141
 msgid "operations are possible only for numeric, logical or complex types"
-msgstr ""
-"операции возможны только для числовых, логических или комплексных типов"
+msgstr "операции возможны только для числовых, логических или комплексных типов"
 
-#: src/main/logic.c:98
+#: src/main/logic.c:89
 msgid "binary operation on non-conformable arrays"
 msgstr "бинарная операция на неподобных многомерных матрицах"
 
-#: src/main/logic.c:124 src/main/relop.c:247
+#: src/main/logic.c:115
+#: src/main/relop.c:247
 msgid "non-conformable time series"
 msgstr "неподобные временные ряды"
 
-#: src/main/logic.c:254
+#: src/main/logic.c:245
 #, c-format
 msgid "'%s' operator requires 2 arguments"
 msgstr "оператор '%s' требует 2 аргумента"
 
-#: src/main/logic.c:261
+#: src/main/logic.c:252
 #, c-format
 msgid "invalid 'x' type in 'x %s y'"
 msgstr "неправильный тип 'x' в 'x %s y'"
 
-#: src/main/logic.c:268
+#: src/main/logic.c:259
 #, c-format
 msgid "invalid 'y' type in 'x %s y'"
 msgstr "неправильный тип 'y' в 'x %s y'"
 
-#: src/main/logic.c:341
+#: src/main/logic.c:332
 msgid "Unary operator `!' called with two arguments"
 msgstr "Унарный оператор `!' вызван с двумя аргументами"
 
-#: src/main/logic.c:448
+#: src/main/logic.c:437
 #, c-format
 msgid "coercing argument of type '%s' to logical"
 msgstr "преобразование аргумента типа '%s' в логический"
@@ -4031,64 +4664,61 @@ msgstr "преобразование аргумента типа '%s' в лог
 msgid "dummy - do not translate"
 msgstr "dummy - do not translate"
 
-#: src/main/main.c:476
+#: src/main/main.c:481
 msgid "Error: segfault from C stack overflow\n"
 msgstr "Ошибка сегментации памяти из переполненного стека C\n"
 
-#: src/main/main.c:846
+#: src/main/main.c:853
 msgid "unable to open the base package\n"
 msgstr "не могу открыть пакет 'base'\n"
 
-#: src/main/main.c:924
+#: src/main/main.c:931
 #, c-format
 msgid "unable to restore saved data in %s\n"
 msgstr "не могу восстановить сохраненные в %s данные\n"
 
-#: src/main/main.c:971
+#: src/main/main.c:978
 msgid "During startup - "
 msgstr "Во время загрузки - "
 
-#: src/main/main.c:1224
+#: src/main/main.c:1235
 msgid "cannot quit from browser"
 msgstr "не могу выйти из браузера"
 
-#: src/main/main.c:1228
+#: src/main/main.c:1239
 msgid "one of \"yes\", \"no\", \"ask\" or \"default\" expected."
 msgstr "ожидается одно из: \"yes\", \"no\", \"ask\" или \"default\"."
 
-#: src/main/main.c:1233
+#: src/main/main.c:1244
 msgid "save=\"ask\" in non-interactive use: command-line default will be used"
-msgstr ""
-"save=\"ask\" во время неинтерактивной работы: будет использована командная "
-"строка по умолчанию"
+msgstr "save=\"ask\" во время неинтерактивной работы: будет использована командная строка по умолчанию"
 
-#: src/main/main.c:1241
+#: src/main/main.c:1252
 msgid "unrecognized value of 'save'"
 msgstr "нераспознанное значение 'save'"
 
-#: src/main/main.c:1244
+#: src/main/main.c:1255
 msgid "invalid 'status', 0 assumed"
 msgstr "неправильный 'status', принят 0"
 
-#: src/main/main.c:1249
+#: src/main/main.c:1260
 msgid "invalid 'runLast', FALSE assumed"
 msgstr "неправильный 'runLast', принято FALSE"
 
-#: src/main/main.c:1280
+#: src/main/main.c:1291
 msgid "cannot allocate space for toplevel callback element"
 msgstr "не могу выделить место обратного вызова элемента верхнего уровня"
 
-#: src/main/main.c:1358
+#: src/main/main.c:1369
 msgid "negative index passed to R_removeTaskCallbackByIndex"
 msgstr "отрицательный индекс передан в R_removeTaskCallbackByIndex"
 
-#: src/main/main.c:1468
+#: src/main/main.c:1479
 #, c-format
 msgid "warning messages from top-level task callback '%s'\n"
-msgstr ""
-"предупреждающие сообщения из обратного вызова задачи верхнего уровня '%s'\n"
+msgstr "предупреждающие сообщения из обратного вызова задачи верхнего уровня '%s'\n"
 
-#: src/main/main.c:1524
+#: src/main/main.c:1535
 msgid "top-level task callback did not return a logical value"
 msgstr "обратный вызов задачи верхнего уровня не вернул логического значения"
 
@@ -4108,23 +4738,26 @@ msgstr "длина большего аргумента не является п
 msgid "invalid partial string match"
 msgstr "неправильное соответствие части строки"
 
-#: src/main/match.c:228 src/main/match.c:268 src/main/objects.c:56
-#: src/main/objects.c:66
+#: src/main/match.c:228
+#: src/main/match.c:266
+#: src/main/objects.c:49
+#: src/main/objects.c:59
 #, c-format
 msgid "formal argument \"%s\" matched by multiple actual arguments"
 msgstr "формальный аргумент \"%s\" соответствует многим реальным аргументам"
 
-#: src/main/match.c:231 src/main/match.c:266
+#: src/main/match.c:231
+#: src/main/match.c:264
 #, c-format
 msgid "argument %d matches multiple formal arguments"
 msgstr "аргумент %d соответствует многим формальным аргументам"
 
-#: src/main/match.c:272
+#: src/main/match.c:270
 #, c-format
 msgid "partial argument match of '%s' to '%s'"
 msgstr "частичное соответствие между аргументами '%s' и '%s'"
 
-#: src/main/match.c:383
+#: src/main/match.c:380
 #, c-format
 msgid "unused argument %s"
 msgid_plural "unused arguments %s"
@@ -4132,388 +4765,367 @@ msgstr[0] "неиспользованный аргумент %s"
 msgstr[1] "неиспользованные аргументы %s"
 msgstr[2] "неиспользованные аргументы %s"
 
-#: src/main/memory.c:1232
+#: src/main/memory.c:1238
 msgid "can only weakly reference/finalize reference objects"
 msgstr "могу сослаться на/завершить ссылочные объекты только слабо"
 
-#: src/main/memory.c:1266
+#: src/main/memory.c:1272
 msgid "finalizer must be a function or NULL"
 msgstr "завершитель должен быть функцией или NULL"
 
-#: src/main/memory.c:1322 src/main/memory.c:1330 src/main/memory.c:1341
+#: src/main/memory.c:1328
+#: src/main/memory.c:1336
+#: src/main/memory.c:1347
 msgid "not a weak reference"
 msgstr "не является слабой ссылкой"
 
-#: src/main/memory.c:1472
+#: src/main/memory.c:1478
 msgid "first argument must be environment or external pointer"
 msgstr "первый аргумент должен быть окружением или внешним указателем"
 
-#: src/main/memory.c:1474
+#: src/main/memory.c:1480
 msgid "second argument must be a function"
 msgstr "второй аргумент должен быть функцией"
 
-#: src/main/memory.c:1478
+#: src/main/memory.c:1484
 msgid "third argument must be 'TRUE' or 'FALSE'"
 msgstr "третий аргумент должен быть 'TRUE' или 'FALSE'"
 
-#: src/main/memory.c:1970
+#: src/main/memory.c:1978
 msgid "vector memory exhausted (limit reached?)"
 msgstr "векторная память вышла (достигнут предел?)"
 
-#: src/main/memory.c:1976
+#: src/main/memory.c:1984
 msgid "cons memory exhausted (limit reached?)"
 msgstr "cons-память вышла (достигнут предел?)"
 
-#: src/main/memory.c:1981
+#: src/main/memory.c:1989
 msgid "memory exhausted (limit reached?)"
 msgstr "память исчерпана (достигнут предел?)"
 
-#: src/main/memory.c:2116
+#: src/main/memory.c:2125
 #, c-format
 msgid "cannot allocate memory block of size %0.f Tb"
 msgstr "не могу разместить блок памяти размером %0.f Tb"
 
-#: src/main/memory.c:2121
+#: src/main/memory.c:2130
 #, c-format
 msgid "cannot allocate memory block of size %0.1f Gb"
 msgstr "не могу разместить блок памяти размером %0.1f Gb"
 
-#: src/main/memory.c:2442
+#: src/main/memory.c:2457
 msgid "vector is too large"
 msgstr "вектор слишком велик"
 
-#: src/main/memory.c:2445
+#: src/main/memory.c:2460
 msgid "negative length vectors are not allowed"
 msgstr "не разрешена отрицательная длина векторов"
 
-#: src/main/memory.c:2471 src/main/memory.c:2484 src/main/memory.c:2497
+#: src/main/memory.c:2486
+#: src/main/memory.c:2499
 #: src/main/memory.c:2512
+#: src/main/memory.c:2527
 #, c-format
 msgid "cannot allocate vector of length %d"
 msgstr "не могу разместить вектор длины %d"
 
-#: src/main/memory.c:2533
+#: src/main/memory.c:2548
 #, c-format
 msgid "invalid type/length (%s/%d) in vector allocation"
 msgstr "неправильный тип/длина (%s/%d) для размещения вектора"
 
-#: src/main/memory.c:2636
+#: src/main/memory.c:2647
 #, c-format
 msgid "cannot allocate vector of size %0.1f Gb"
 msgstr "не могу разместить вектор размером %0.1f Gb"
 
-#: src/main/memory.c:2640
+#: src/main/memory.c:2651
 #, c-format
 msgid "cannot allocate vector of size %0.1f Mb"
 msgstr "не могу разместить вектор размером %0.1f Mb"
 
-#: src/main/memory.c:2644
+#: src/main/memory.c:2655
 #, c-format
 msgid "cannot allocate vector of size %0.f Kb"
 msgstr "не могу разместить вектор размером %0.f Kb"
 
-#: src/main/memory.c:3001
+#: src/main/memory.c:3052
 msgid "protect(): protection stack overflow"
 msgstr "protect(): переполнение стека защиты"
 
-#: src/main/memory.c:3008
+#: src/main/memory.c:3059
 #, c-format
-msgid "unprotect(): only %d protected items"
-msgstr "unprotect(): только %d защищенных элементов"
+msgid "unprotect(): only %d protected item"
+msgid_plural "unprotect(): only %d protected items"
+msgstr[0] "unprotect(): только %d защищенный элемент"
+msgstr[1] "unprotect(): только %d защищенных элемента"
+msgstr[2] "unprotect(): только %d защищенных элементов"
 
-#: src/main/memory.c:3041
+#: src/main/memory.c:3094
 msgid "unprotect_ptr: pointer not found"
 msgstr "unprotect_ptr: указатель не найден"
 
-#: src/main/memory.c:3079
+#: src/main/memory.c:3132
 #, c-format
-msgid "R_Reprotect: only %d protected items, can't reprotect index %d"
-msgstr ""
-"R_Reprotect: только %d защищенных элементов, не могу перезащитить индекс %d"
+msgid "R_Reprotect: only %d protected item, can't reprotect index %d"
+msgid_plural "R_Reprotect: only %d protected items, can't reprotect index %d"
+msgstr[0] "R_Reprotect: только %d защищенный элемент, не могу перезащитить индекс %d"
+msgstr[1] "R_Reprotect: только %d защищенных элемента, не могу перезащитить индекс %d"
+msgstr[2] "R_Reprotect: только %d защищенных элементов, не могу перезащитить индекс %d"
 
-#: src/main/memory.c:3129
+#: src/main/memory.c:3184
 #, c-format
 msgid "'Calloc' could not allocate memory (%.0f of %u bytes)"
 msgstr "'Calloc' не может выделить память (%.0f из %u байт)"
 
-#: src/main/memory.c:3140
+#: src/main/memory.c:3195
 #, c-format
 msgid "'Realloc' could not re-allocate memory (%.0f bytes)"
 msgstr "'Realloc' не может переразместить память (%.0f байт)"
 
-#: src/main/memory.c:3380
+#: src/main/memory.c:3436
 msgid "not safe to return vector pointer"
 msgstr "небезопасно возвращать указатель вектора"
 
-#: src/main/memory.c:3392
+#: src/main/memory.c:3447
 #, c-format
 msgid "attempt to set index %lu/%lu in SET_STRING_ELT"
-msgstr ""
+msgstr "попытка установить индекс %lu/%lu в SET_STRING_ELT"
 
-#: src/main/memory.c:3408
+#: src/main/memory.c:3463
 #, c-format
 msgid "attempt to set index %lu/%lu in SET_VECTOR_ELT"
-msgstr ""
+msgstr "попытка установить индекс %lu/%lu в SET_VECTOR_ELT"
 
-#: src/main/memory.c:3658
+#: src/main/memory.c:3722
 msgid "memory profiling is not available on this system"
 msgstr "профилирование памяти в этой системе недоступно"
 
-#: src/main/memory.c:3723
+#: src/main/memory.c:3786
 #, c-format
 msgid "Rprofmem: cannot open output file '%s'"
 msgstr "Rprofmem: не могу открыть выходной файл '%s'"
 
-#: src/main/memory.c:3830
+#: src/main/memory.c:3894
 #, c-format
 msgid "long vectors not supported yet: %s:%d"
 msgstr "длинные вектора еще не поддерживаются: %s:%d"
 
-#: src/main/names.c:996
+#: src/main/names.c:1021
 msgid "string argument required"
 msgstr "нужен текстовый аргумент"
 
-#: src/main/names.c:999
+#: src/main/names.c:1024
 msgid "no such primitive function"
 msgstr "нет такой примитивной функции"
 
-#: src/main/names.c:1146
+#: src/main/names.c:1212
+#: src/main/names.c:1242
 msgid "attempt to use zero-length variable name"
 msgstr "попытка использовать имя переменной нулевой длины"
 
-#: src/main/names.c:1148
+#: src/main/names.c:1214
+#: src/main/names.c:1244
 #, c-format
 msgid "variable names are limited to %d bytes"
 msgstr "имена переменных ограничены %d байтами"
 
-#: src/main/names.c:1176 src/main/names.c:1179
+#: src/main/names.c:1307
+#: src/main/names.c:1310
 msgid "invalid .Internal() argument"
 msgstr "неправильный .Internal() аргумент"
 
-#: src/main/objects.c:46
+#: src/main/objects.c:39
 msgid "generic 'function' is not a function"
 msgstr "общая 'function' не является функцией"
 
-#: src/main/objects.c:201
+#: src/main/objects.c:193
 msgid "bad generic call environment"
 msgstr "неправильный общий вызов окружения"
 
-#: src/main/objects.c:207
+#: src/main/objects.c:201
 msgid "bad generic definition environment"
 msgstr "неправильное общее определение окружения"
 
-#: src/main/objects.c:246
-msgid ""
-"no '.S3MethodsClass' table, cannot use S4 objects with S3 methods ('methods' "
-"package not attached?)"
-msgstr ""
-"нет '.S3MethodsClass', не могу использовать объекты S4 с методами S3 (пакет "
-"'methods' не присоединен?)"
+#: src/main/objects.c:249
+msgid "no '.S3MethodsClass' table, cannot use S4 objects with S3 methods ('methods' package not attached?)"
+msgstr "нет '.S3MethodsClass', не могу использовать объекты S4 с методами S3 (пакет 'methods' не присоединен?)"
 
-#: src/main/objects.c:270 src/main/objects.c:411
-msgid "'UseMethod' used in an inappropriate fashion"
-msgstr "'UseMethod' использован неподходящим образом"
-
-#: src/main/objects.c:290
-msgid "invalid generic function in 'usemethod'"
-msgstr "неправильная общая функция в 'usemethod'"
-
-#: src/main/objects.c:399
+#: src/main/objects.c:415
 msgid "there must be a 'generic' argument"
 msgstr "тут должен быть 'generic' аргумент"
 
-#: src/main/objects.c:403
+#: src/main/objects.c:419
 msgid "'generic' argument must be a character string"
 msgstr "'generic' аргумент должен быть текстовой строкой"
 
-#: src/main/objects.c:440
-msgid "'UseMethod' called from outside a function"
-msgstr "'UseMethod' вызван снаружи функции"
-
-#: src/main/objects.c:447
-msgid "first argument must be a generic name"
-msgstr "первый аргумент должен быть общим именем"
+#: src/main/objects.c:427
+msgid "'UseMethod' used in an inappropriate fashion"
+msgstr "'UseMethod' использован неподходящим образом"
 
 #: src/main/objects.c:472
 #, c-format
 msgid "no applicable method for '%s' applied to an object of class \"%s\""
 msgstr "нет подходящего метода для '%s' применяемого к объекту класса \"%s\""
 
-#: src/main/objects.c:533
+#: src/main/objects.c:558
 msgid "'NextMethod' called from outside a function"
 msgstr "'NextMethod' вызван снаружи функции"
 
-#: src/main/objects.c:539
+#: src/main/objects.c:564
 msgid "'NextMethod' called from an anonymous function"
 msgstr "'NextMethod' вызван из безымянной функции"
 
-#: src/main/objects.c:563
+#: src/main/objects.c:585
 msgid "no calling generic was found: was a method called directly?"
 msgstr "не был найден общий вызов: метод был вызван прямо?"
 
-#: src/main/objects.c:566
+#: src/main/objects.c:588
 #, c-format
 msgid "'function' is not a function, but of type %d"
 msgstr "'function' является не функцией, а %d"
 
-#: src/main/objects.c:640
+#: src/main/objects.c:615
 msgid "wrong argument ..."
 msgstr "неправильный аргумент ..."
 
-#: src/main/objects.c:653
+#: src/main/objects.c:627
 msgid "object not specified"
 msgstr "объект не указан"
 
-#: src/main/objects.c:663 src/main/objects.c:670
+#: src/main/objects.c:635
+#: src/main/objects.c:642
 msgid "generic function not specified"
 msgstr "общая функция не указана"
 
-#: src/main/objects.c:667
+#: src/main/objects.c:639
 msgid "invalid generic argument to 'NextMethod'"
 msgstr "неправильный общий аргумент для 'NextMethod'"
 
-#: src/main/objects.c:680
+#: src/main/objects.c:651
 msgid "invalid 'group' argument found in 'NextMethod'"
 msgstr "неправильный аргумент 'group' найден в 'NextMethod'"
 
-#: src/main/objects.c:699
+#: src/main/objects.c:668
 msgid "wrong value for .Method"
 msgstr "неправильное значение для '.Method'"
 
-#: src/main/objects.c:703 src/main/objects.c:712
-#, c-format
-msgid "method name too long in '%s'"
-msgstr "слишком длинное имя метода в '%s'"
-
-#: src/main/objects.c:715
+#: src/main/objects.c:678
 msgid "Incompatible methods ignored"
 msgstr "Несовместимый метод пропущен"
 
-#: src/main/objects.c:775 src/main/objects.c:780
+#: src/main/objects.c:735
+#: src/main/objects.c:740
 msgid "no method to invoke"
 msgstr "нет метода для вызова"
 
-#: src/main/objects.c:832
+#: src/main/objects.c:790
 msgid "cannot unclass an environment"
 msgstr "не могу убрать класс окружения"
 
-#: src/main/objects.c:835
+#: src/main/objects.c:793
 msgid "cannot unclass an external pointer"
 msgstr "не могу убрать класс внешнего указателя"
 
-#: src/main/objects.c:872
+#: src/main/objects.c:829
 msgid "'what' must be a character vector"
 msgstr "'what' должен быть текстовым вектором"
 
-#: src/main/objects.c:876
+#: src/main/objects.c:833
 msgid "'which' must be a length 1 logical vector"
 msgstr "'which' должен быть единичным логическим вектором"
 
-#: src/main/objects.c:882
+#: src/main/objects.c:839
 msgid "use 'is()' instead of 'inherits()' on S4 objects"
 msgstr "использование 'is()' вместо 'inherits()' для S4-объекта"
 
-#: src/main/objects.c:1012
+#: src/main/objects.c:968
 msgid "could not find correct environment; please report!"
 msgstr "не могу найти подходящее окружение, сигнализируйте об этом!"
 
-#: src/main/objects.c:1052
+#: src/main/objects.c:1012
 msgid "'onOff' must be TRUE or FALSE"
 msgstr "'onOff' должно быть TRUE или FALSE"
 
-#: src/main/objects.c:1119
+#: src/main/objects.c:1077
 #, c-format
 msgid "unable to find a non-generic version of function \"%s\""
 msgstr "не могу найти не-общую версию функции \"%s\""
 
-#: src/main/objects.c:1151
-msgid ""
-"'standardGeneric' called without 'methods' dispatch enabled (will be ignored)"
-msgstr ""
-"'standardGeneric' вызван без включенных методов доставки (будет пропущен)"
+#: src/main/objects.c:1109
+msgid "'standardGeneric' called without 'methods' dispatch enabled (will be ignored)"
+msgstr "'standardGeneric' вызван без включенных методов доставки (будет пропущен)"
 
-#: src/main/objects.c:1160
+#: src/main/objects.c:1118
 msgid "argument to 'standardGeneric' must be a non-empty character string"
 msgstr "аргумент для 'standardGeneric' должен быть непустой текстовой строкой"
 
-#: src/main/objects.c:1165
+#: src/main/objects.c:1123
 #, c-format
-msgid ""
-"call to standardGeneric(\"%s\") apparently not from the body of that generic "
-"function"
+msgid "call to standardGeneric(\"%s\") apparently not from the body of that generic function"
 msgstr "вызов для 'standardGeneric' (\"%s\") не из тела данной общей функции"
 
-#: src/main/objects.c:1189
-msgid "argument 'code' must be a character string"
-msgstr "аргумент 'code' должен быть текстовой строкой"
-
-#: src/main/objects.c:1257
+#: src/main/objects.c:1214
 #, c-format
-msgid ""
-"invalid primitive methods code (\"%s\"): should be \"clear\", \"reset\", "
-"\"set\", or \"suppress\""
-msgstr ""
-"неправильный код первичного метода (\"%s\"): должен быть \"clear\", \"reset"
-"\", \"set\", или \"suppress\""
+msgid "invalid primitive methods code (\"%s\"): should be \"clear\", \"reset\", \"set\", or \"suppress\""
+msgstr "неправильный код первичного метода (\"%s\"): должен быть \"clear\", \"reset\", \"set\", или \"suppress\""
 
-#: src/main/objects.c:1265
+#: src/main/objects.c:1222
 msgid "invalid object: must be a primitive function"
 msgstr "неправильный объект: должен быть первичной функцией"
 
-#: src/main/objects.c:1312
+#: src/main/objects.c:1269
 #, c-format
-msgid ""
-"the formal definition of a primitive generic must be a function object (got "
-"type '%s')"
-msgstr ""
-"формальное определение первичного общего должно быть объектом-функцией "
-"(получить тип '%s')"
+msgid "the formal definition of a primitive generic must be a function object (got type '%s')"
+msgstr "формальное определение первичного общего должно быть объектом-функцией (получить тип '%s')"
 
-#: src/main/objects.c:1342
+#: src/main/objects.c:1299
 #, c-format
 msgid "object returned as generic function \"%s\" does not appear to be one"
 msgstr "объект, возвращенный как общая функция \"%s\", похоже, ею не является"
 
-#: src/main/objects.c:1444
+#: src/main/objects.c:1404
 msgid "invalid primitive operation given for dispatch"
 msgstr "для доставки использована неправильная первичная операция"
 
-#: src/main/objects.c:1470 src/main/objects.c:1489
+#: src/main/objects.c:1430
+#: src/main/objects.c:1449
 msgid "dispatch error"
 msgstr "ошибка отправки"
 
-#: src/main/objects.c:1483
+#: src/main/objects.c:1443
 #, c-format
-msgid ""
-"primitive function \"%s\" has been set for methods but no generic function "
-"supplied"
-msgstr ""
-"для методов установлена первичная функция \"%s\", но не предложено общей "
-"функции"
+msgid "primitive function \"%s\" has been set for methods but no generic function supplied"
+msgstr "для методов установлена первичная функция \"%s\", но не предложено общей функции"
 
-#: src/main/objects.c:1508
+#: src/main/objects.c:1468
 msgid "C level MAKE_CLASS macro called with NULL string pointer"
 msgstr "макрос MAKE_CLASS уровня C вызван со строковым указателем NULL"
 
-#: src/main/objects.c:1524
+#: src/main/objects.c:1484
+msgid "'methods' package not yet loaded"
+msgstr "пакет 'methods' еще не загружен"
+
+#: src/main/objects.c:1494
 msgid "R_getClassDef(.) called with NULL string pointer"
 msgstr "R_getClassDef(.) вызван со строковым указателем NULL"
 
-#: src/main/objects.c:1546
+#: src/main/objects.c:1539
 msgid "C level NEW macro called with null class definition pointer"
 msgstr "макрос NEW уровня C вызван с пустым указателем определения класса"
 
-#: src/main/objects.c:1550
+#: src/main/objects.c:1543
 #, c-format
 msgid "trying to generate an object from a virtual class (\"%s\")"
 msgstr "попытка создать объект из виртуального класса (\"%s\")"
 
-#: src/main/objects.c:1627
+#: src/main/objects.c:1625
 #, c-format
 msgid "object of class \"%s\" does not correspond to a valid S3 object"
 msgstr "объект класса \"%s\" не является правильным объектом S3"
 
-#: src/main/options.c:120 src/main/options.c:180
+#: src/main/options.c:120
+#: src/main/options.c:181
 msgid "corrupted options list"
 msgstr "лист опций поврежден"
 
@@ -4533,43 +5145,62 @@ msgstr "неправильное 'deparse.cutoff', использовал 60"
 msgid "invalid value for \"device.ask.default\", using FALSE"
 msgstr "неправильное значение для \"device.ask.default\", использую FALSE"
 
-#: src/main/options.c:401
+#: src/main/options.c:414
 msgid "list argument has no valid names"
 msgstr "у аргумента списка нет правильных имен"
 
-#: src/main/options.c:429
+#: src/main/options.c:443
 #, c-format
 msgid "invalid 'width' parameter, allowed %d...%d"
 msgstr "неправильный параметр 'width', разрешается %d...%d"
 
-#: src/main/options.c:440
+#: src/main/options.c:454
 #, c-format
 msgid "invalid 'digits' parameter, allowed %d...%d"
 msgstr "неправильный параметр 'digits', разрешается %d...%d"
 
-#: src/main/options.c:447
+#: src/main/options.c:461
 #, c-format
 msgid "'expressions' parameter invalid, allowed %d...%d"
 msgstr "неправильный параметр 'expressions', разрешается %d...%d"
 
-#: src/main/options.c:454 src/main/options.c:462 src/main/options.c:468
-#: src/main/options.c:476 src/main/options.c:483 src/main/options.c:488
-#: src/main/options.c:495 src/main/options.c:501 src/main/options.c:507
-#: src/main/options.c:512 src/main/options.c:517 src/main/options.c:526
-#: src/main/options.c:532 src/main/options.c:538 src/main/options.c:549
-#: src/main/options.c:556 src/main/options.c:562 src/main/options.c:570
-#: src/main/options.c:577 src/main/options.c:584 src/main/options.c:591
-#: src/main/options.c:598 src/main/options.c:606 src/main/options.c:615
-#: src/main/options.c:618 src/main/options.c:624
+#: src/main/options.c:468
+#: src/main/options.c:476
+#: src/main/options.c:482
+#: src/main/options.c:490
+#: src/main/options.c:497
+#: src/main/options.c:502
+#: src/main/options.c:509
+#: src/main/options.c:515
+#: src/main/options.c:521
+#: src/main/options.c:526
+#: src/main/options.c:531
+#: src/main/options.c:540
+#: src/main/options.c:546
+#: src/main/options.c:552
+#: src/main/options.c:562
+#: src/main/options.c:572
+#: src/main/options.c:578
+#: src/main/options.c:586
+#: src/main/options.c:593
+#: src/main/options.c:600
+#: src/main/options.c:607
+#: src/main/options.c:614
+#: src/main/options.c:622
+#: src/main/options.c:631
+#: src/main/options.c:634
+#: src/main/options.c:640
 #, c-format
 msgid "invalid value for '%s'"
 msgstr "неправильное значение '%s'"
 
-#: src/main/options.c:611 src/main/options.c:640
+#: src/main/options.c:627
+#: src/main/options.c:656
 msgid "\"par.ask.default\" has been replaced by \"device.ask.default\""
 msgstr "\"par.ask.default\" заменен на \"device.ask.default\""
 
-#: src/main/paste.c:80 src/main/paste.c:300
+#: src/main/paste.c:80
+#: src/main/paste.c:300
 msgid "invalid separator"
 msgstr "неправильный разделитель"
 
@@ -4577,7 +5208,8 @@ msgstr "неправильный разделитель"
 msgid "non-string argument to internal 'paste'"
 msgstr "аргумент для внутренней вставки не является строкой"
 
-#: src/main/paste.c:174 src/main/paste.c:244
+#: src/main/paste.c:174
+#: src/main/paste.c:244
 msgid "result would exceed 2^31-1 bytes"
 msgstr "результат будет превышать 2^31-1 байт"
 
@@ -4585,23 +5217,25 @@ msgstr "результат будет превышать 2^31-1 байт"
 msgid "non-string argument to Internal paste"
 msgstr "аргумент для внутренней вставки не является строкой"
 
-#: src/main/paste.c:390
+#: src/main/paste.c:387
 msgid "first argument must be atomic"
 msgstr "первый аргумент должен быть элементарным"
 
-#: src/main/paste.c:560
+#: src/main/paste.c:558
 msgid "Impossible mode ( x )"
 msgstr "Невозможный режим ( x )"
 
-#: src/main/paste.c:645
+#: src/main/paste.c:643
 msgid "atomic vector arguments only"
 msgstr "аргументы являются только элементарными векторами"
 
-#: src/main/platform.c:304 src/main/platform.c:322
+#: src/main/platform.c:304
+#: src/main/platform.c:322
 msgid "invalid filename specification"
 msgstr "неправильный указание имени файла"
 
-#: src/main/platform.c:375 src/main/platform.c:419
+#: src/main/platform.c:375
+#: src/main/platform.c:419
 msgid "write error during file append"
 msgstr "ошибка записи во время добавки файла"
 
@@ -4609,7 +5243,9 @@ msgstr "ошибка записи во время добавки файла"
 msgid "nothing to append to"
 msgstr "нечего добавить к"
 
-#: src/main/platform.c:448 src/main/platform.c:795
+#: src/main/platform.c:448
+#: src/main/platform.c:793
+#: src/main/platform.c:975
 msgid "invalid filename argument"
 msgstr "неправильный аргумент имени файла"
 
@@ -4618,7 +5254,9 @@ msgstr "неправильный аргумент имени файла"
 msgid "cannot create file '%s', reason '%s'"
 msgstr "не могу создать файл '%s' по причине '%s'"
 
-#: src/main/platform.c:475 src/main/platform.c:545 src/main/platform.c:627
+#: src/main/platform.c:475
+#: src/main/platform.c:545
+#: src/main/platform.c:627
 msgid "invalid first filename"
 msgstr "неправильное первое имя файла"
 
@@ -4627,11 +5265,13 @@ msgstr "неправильное первое имя файла"
 msgid "cannot remove file '%s', reason '%s'"
 msgstr "не могу удалить файл '%s' по причине '%s'"
 
-#: src/main/platform.c:547 src/main/platform.c:629
+#: src/main/platform.c:547
+#: src/main/platform.c:629
 msgid "invalid second filename"
 msgstr "неправильное второе имя файла"
 
-#: src/main/platform.c:549 src/main/platform.c:631
+#: src/main/platform.c:549
+#: src/main/platform.c:631
 msgid "nothing to link"
 msgstr "нечего связать"
 
@@ -4671,11 +5311,13 @@ msgstr "жесткие ссылки на этой платформе не под
 msgid "'from' and 'to' are of different lengths"
 msgstr "'from' и 'to' имеют разную длину"
 
-#: src/main/platform.c:720 src/main/platform.c:730
+#: src/main/platform.c:720
+#: src/main/platform.c:730
 msgid "expanded 'from' name too long"
 msgstr "раскрытое имя 'from' слишком длинное"
 
-#: src/main/platform.c:724 src/main/platform.c:734
+#: src/main/platform.c:724
+#: src/main/platform.c:734
 msgid "expanded 'to' name too long"
 msgstr "раскрытое имя 'to' слишком длинное"
 
@@ -4684,128 +5326,135 @@ msgstr "раскрытое имя 'to' слишком длинное"
 msgid "cannot rename file '%s' to '%s', reason '%s'"
 msgstr "не могу переименовать '%s' в '%s' по причине '%s'"
 
-#: src/main/platform.c:1094
+#: src/main/platform.c:1164
 msgid "invalid 'pattern' regular expression"
 msgstr "неправильный шаблон регулярного выражения"
 
-#: src/main/platform.c:1211
+#: src/main/platform.c:1281
 msgid "unable to determine R home location"
 msgstr "не могу определить домашнюю папку R"
 
-#: src/main/platform.c:1263
+#: src/main/platform.c:1334
 msgid "file name too long"
 msgstr "имя файла слишком длинное"
 
-#: src/main/platform.c:1511 src/main/platform.c:1558 src/main/sysutils.c:1850
-#: src/main/sysutils.c:1864
+#: src/main/platform.c:1582
+#: src/main/platform.c:1629
+#: src/main/sysutils.c:1800
+#: src/main/sysutils.c:1814
 msgid "internal out-of-memory condition"
 msgstr "внутренняя нехватка памяти"
 
-#: src/main/platform.c:1554 src/main/sysutils.c:1860
+#: src/main/platform.c:1625
+#: src/main/sysutils.c:1810
 #, c-format
 msgid "read error on '%s'"
 msgstr "ошибка чтения в '%s'"
 
-#: src/main/platform.c:1722
+#: src/main/platform.c:1787
 msgid "setting 'LC_NUMERIC' may cause R to function strangely"
 msgstr "установка 'LC_NUMERIC' может заставить R странно себя вести"
 
-#: src/main/platform.c:1736
+#: src/main/platform.c:1801
 msgid "LC_MESSAGES exists on Windows but is not operational"
 msgstr "LC_MESSAGES существуют под Windows, но не работают"
 
-#: src/main/platform.c:1763
+#: src/main/platform.c:1828
 #, c-format
 msgid "OS reports request to set locale to \"%s\" cannot be honored"
-msgstr ""
-"ОС сообщает, что запрос установки локали в \"%s\" не может быть выполнен"
+msgstr "ОС сообщает, что запрос установки локали в \"%s\" не может быть выполнен"
 
-#: src/main/platform.c:2065
+#: src/main/platform.c:2148
 msgid "'hostname' must be a character vector of length 1"
 msgstr "'hostname' должен быть единичным текстовым вектором"
 
-#: src/main/platform.c:2071
+#: src/main/platform.c:2154
 #, c-format
 msgid "nsl() was unable to resolve host '%s'"
 msgstr "nsl() не способна разрешить хост '%s'"
 
-#: src/main/platform.c:2078
+#: src/main/platform.c:2161
 msgid "unknown format returned by C function 'gethostbyname'"
 msgstr "C-функция 'gethostbyname' вернула неизвестный формат"
 
-#: src/main/platform.c:2087
+#: src/main/platform.c:2170
 msgid "nsl() is not supported on this platform"
 msgstr "nsl() не поддерживается на этой платформе"
 
-#: src/main/platform.c:2158
+#: src/main/platform.c:2241
 #, c-format
 msgid "'%s' already exists"
 msgstr "'%s' уже существует"
 
-#: src/main/platform.c:2161
+#: src/main/platform.c:2244
 #, c-format
 msgid "cannot create dir '%s', reason '%s'"
 msgstr "не могу создать директорию '%s' по причине '%s'"
 
-#: src/main/platform.c:2207
+#: src/main/platform.c:2290
 #, c-format
 msgid "'%ls' already exists"
 msgstr "'%ls' уже существует"
 
-#: src/main/platform.c:2211
+#: src/main/platform.c:2294
 #, c-format
 msgid "cannot create dir '%ls', reason '%s'"
 msgstr "не могу создать каталог '%ls' по причине '%s'"
 
-#: src/main/platform.c:2245 src/main/platform.c:2449
+#: src/main/platform.c:2328
+#: src/main/platform.c:2537
 msgid "too deep nesting"
 msgstr "слишком глубоко"
 
-#: src/main/platform.c:2253 src/main/platform.c:2266 src/main/platform.c:2284
-#, fuzzy
+#: src/main/platform.c:2336
+#: src/main/platform.c:2349
+#: src/main/platform.c:2367
 msgid "over-long path"
 msgstr "слишком большая длина path"
 
-#: src/main/platform.c:2273
+#: src/main/platform.c:2356
 #, c-format
 msgid "problem creating directory %ls: %s"
 msgstr "проблема с созданием каталога %ls: %s "
 
-#: src/main/platform.c:2293
+#: src/main/platform.c:2376
 #, c-format
 msgid "problem reading dir %ls: %s"
 msgstr "проблема с чтением каталога %ls: %s"
 
-#: src/main/platform.c:2304 src/main/platform.c:2465 src/main/platform.c:2478
-#: src/main/platform.c:2498 src/main/platform.c:2520
+#: src/main/platform.c:2387
+#: src/main/platform.c:2553
+#: src/main/platform.c:2566
+#: src/main/platform.c:2586
+#: src/main/platform.c:2608
 msgid "over-long path length"
 msgstr "слишком большая длина path"
 
-#: src/main/platform.c:2312
+#: src/main/platform.c:2395
 #, c-format
 msgid "problem copying %ls to %ls: %s"
 msgstr "проблема с копированием %ls в %ls: %s"
 
-#: src/main/platform.c:2487
+#: src/main/platform.c:2575
 #, c-format
 msgid "problem creating directory %s: %s"
 msgstr "проблема с созданием каталога %s: %s"
 
-#: src/main/platform.c:2507
+#: src/main/platform.c:2595
 #, c-format
 msgid "problem reading directory %s: %s"
 msgstr "проблема с чтением каталога %s: %s"
 
-#: src/main/platform.c:2529
+#: src/main/platform.c:2617
 #, c-format
 msgid "problem copying %s to %s: %s"
 msgstr "проблема с копированием %s в %s: %s"
 
-#: src/main/platform.c:2662
+#: src/main/platform.c:2754
 msgid "'mode' must be of length at least one"
 msgstr "длина 'mode' должна быть не меньше единицы"
 
-#: src/main/platform.c:2729
+#: src/main/platform.c:2821
 msgid "insufficient OS support on this platform"
 msgstr "недостаточная поддержка OS на этой платформе"
 
@@ -4826,31 +5475,35 @@ msgstr "все значения z являются NA"
 msgid "invalid math style encountered"
 msgstr "встретился неправильный математический стиль"
 
-#: src/main/plotmath.c:1261 src/main/plotmath.c:1366 src/main/plotmath.c:2664
+#: src/main/plotmath.c:1260
+#: src/main/plotmath.c:1365
+#: src/main/plotmath.c:2654
 msgid "invalid mathematical annotation"
 msgstr "неправильная математическая аннотация"
 
-#: src/main/plotmath.c:1670
+#: src/main/plotmath.c:1669
 msgid "invalid accent"
 msgstr "неправильный акцент"
 
-#: src/main/plotmath.c:1964
+#: src/main/plotmath.c:1963
 msgid "invalid group delimiter"
 msgstr "неправильный разделитель групп"
 
-#: src/main/plotmath.c:1991 src/main/plotmath.c:2137
+#: src/main/plotmath.c:1990
+#: src/main/plotmath.c:2127
 msgid "invalid group specification"
 msgstr "неправильное указание группы"
 
-#: src/main/plotmath.c:2062
+#: src/main/plotmath.c:2052
 msgid "group is incomplete"
 msgstr "группа неполна"
 
-#: src/main/plotmath.c:3190
+#: src/main/plotmath.c:3180
 msgid "Metric information not available for this family/device"
 msgstr "Метрическая информация для этого семейства/устройства недоступна"
 
-#: src/main/print.c:148 src/main/print.c:254
+#: src/main/print.c:148
+#: src/main/print.c:254
 msgid "invalid 'na.print' specification"
 msgstr "неправильное указание 'na.print'"
 
@@ -4874,36 +5527,36 @@ msgstr "'gap' должен быть положительным целым чис
 msgid "invalid 'tryS4' internal argument"
 msgstr "неправильный внутренний аргумент 'tryS4' "
 
-#: src/main/print.c:1028
+#: src/main/print.c:1052
 msgid "invalid character length in 'dblepr'"
 msgstr "неправильная длина текста в 'dblepr'"
 
-#: src/main/print.c:1046
+#: src/main/print.c:1070
 msgid "invalid character length in 'intpr'"
 msgstr "неправильная длина текста в 'intpr'"
 
-#: src/main/print.c:1065
+#: src/main/print.c:1089
 msgid "invalid character length in 'realpr'"
 msgstr "неправильная длина текста 'realpr'"
 
-#: src/main/print.c:1075
+#: src/main/print.c:1099
 msgid "memory allocation error in 'realpr'"
 msgstr "ошибка размещения памяти в 'realpr'"
 
-#: src/main/print.c:1091
+#: src/main/print.c:1115
 #, c-format
 msgid "BLAS/LAPACK routine '%6s' gave error code %d"
 msgstr "процедура BLAS/LAPACK '%6s' вернуло ошибку с кодом %d"
 
-#: src/main/printarray.c:453
+#: src/main/printarray.c:327
 msgid "too few row labels"
 msgstr "слишком мало меток строк"
 
-#: src/main/printarray.c:455
+#: src/main/printarray.c:329
 msgid "too few column labels"
 msgstr "слишком мало меток колонок"
 
-#: src/main/printarray.c:489
+#: src/main/printarray.c:363
 #, c-format
 msgid " [ reached getOption(\"max.print\") -- omitted %d row ]\n"
 msgid_plural " [ reached getOption(\"max.print\") -- omitted %d rows ]\n"
@@ -4911,7 +5564,7 @@ msgstr[0] " [ достигнута getOption(\"max.print\") -- строка %d 
 msgstr[1] " [ достигнута getOption(\"max.print\") -- пропущено %d строки ]\n"
 msgstr[2] " [ достигнута getOption(\"max.print\") -- пропущено %d строк ]\n"
 
-#: src/main/printutils.c:613
+#: src/main/printutils.c:688
 msgid "it is not known that wchar_t is Unicode on this platform"
 msgstr "на этой платформе неизвестно, является ли wchar_t юникодной"
 
@@ -4923,41 +5576,47 @@ msgstr "аргумент не является числовым вектором
 msgid "invalid arguments"
 msgstr "неправильные аргументы"
 
-#: src/main/random.c:93 src/main/random.c:110 src/main/random.c:175
-#: src/main/random.c:201 src/main/random.c:274 src/main/random.c:288
+#: src/main/random.c:93
+#: src/main/random.c:110
+#: src/main/random.c:175
+#: src/main/random.c:201
+#: src/main/random.c:274
+#: src/main/random.c:288
 msgid "NAs produced"
 msgstr "получились NA"
 
-#: src/main/random.c:445
+#: src/main/random.c:435
 msgid "NA in probability vector"
 msgstr "NA в векторе вероятности"
 
-#: src/main/random.c:447
-msgid "non-positive probability"
-msgstr "не-положительная вероятность"
+#: src/main/random.c:437
+msgid "negative probability"
+msgstr "отрицательная вероятность"
 
-#: src/main/random.c:454
+#: src/main/random.c:444
 msgid "too few positive probabilities"
 msgstr "слишком мало положительных вероятностей"
 
-#: src/main/random.c:491 src/main/random.c:519
+#: src/main/random.c:480
+#: src/main/random.c:508
 msgid "cannot take a sample larger than the population when 'replace = FALSE'"
 msgstr "не могу сделать выборку бОльшую чем популяция если 'replace = FALSE'"
 
-#: src/main/random.c:498
+#: src/main/random.c:487
 msgid "incorrect number of probabilities"
 msgstr "неправильное количество вероятностей"
 
-#: src/main/random.c:537
+#: src/main/random.c:526
 msgid "n >= 2^31, replace = FALSE is only supported on 64-bit platforms"
-msgstr ""
-"n >= 2^31, replace = FALSE поддерживается только на 64-битных платформах"
+msgstr "n >= 2^31, replace = FALSE поддерживается только на 64-битных платформах"
 
-#: src/main/raw.c:37 src/main/raw.c:273
+#: src/main/raw.c:37
+#: src/main/raw.c:272
 msgid "argument must be a character vector of length 1"
 msgstr "аргумент должен быть единичным текстовым вектором"
 
-#: src/main/raw.c:39 src/main/raw.c:275
+#: src/main/raw.c:39
+#: src/main/raw.c:274
 msgid ""
 "argument should be a character vector of length 1\n"
 "all but the first element will be ignored"
@@ -4965,11 +5624,14 @@ msgstr ""
 "аргумент должен быть единичным текстовым вектором\n"
 "все кроме первого элемента будет пропущено"
 
-#: src/main/raw.c:53 src/main/raw.c:89 src/main/raw.c:110
+#: src/main/raw.c:53
+#: src/main/raw.c:89
+#: src/main/raw.c:110
 msgid "argument 'x' must be a raw vector"
 msgstr "аргумент 'x' должен быть простым вектором"
 
-#: src/main/raw.c:56 src/main/raw.c:330
+#: src/main/raw.c:56
+#: src/main/raw.c:331
 msgid "argument 'multiple' must be TRUE or FALSE"
 msgstr "аргумент 'multiple' должен быть TRUE или FALSE"
 
@@ -4977,7 +5639,8 @@ msgstr "аргумент 'multiple' должен быть TRUE или FALSE"
 msgid "argument 'shift' must be a small integer"
 msgstr "аргумент 'shift' должен быть малым целым числом"
 
-#: src/main/raw.c:129 src/main/raw.c:327
+#: src/main/raw.c:129
+#: src/main/raw.c:328
 msgid "argument 'x' must be an integer vector"
 msgstr "аргумент 'x' должен быть целочисленным вектором"
 
@@ -4985,20 +5648,17 @@ msgstr "аргумент 'x' должен быть целочисленным в
 msgid "argument 'x' must be raw, integer or logical"
 msgstr "аргумент 'x' должен быть простым, целочисленным или логическим"
 
-#: src/main/raw.c:150
-msgid "argument 'type' must be a character string"
-msgstr "аргумент 'type' должен быть текстовой строкой"
-
 #: src/main/raw.c:154
 #, c-format
 msgid "argument 'x' must be a multiple of %d long"
 msgstr "аргумент 'x' должен быть произведением длины %d"
 
-#: src/main/raw.c:167 src/main/raw.c:181
+#: src/main/raw.c:167
+#: src/main/raw.c:181
 msgid "argument 'x' must not contain NAs"
 msgstr "аргумент 'x' не должен содержать NA"
 
-#: src/main/raw.c:285
+#: src/main/raw.c:286
 msgid "invalid UTF-8 string"
 msgstr "неправильная UTF-8 строка"
 
@@ -5023,12 +5683,27 @@ msgstr "неправильное сравнение с комплексными
 msgid "'a' and 'b' must have the same type"
 msgstr "'a' и 'b' должны быть одного типа"
 
-#: src/main/saveload.c:200 src/main/saveload.c:205 src/main/saveload.c:214
-#: src/main/saveload.c:223 src/main/saveload.c:232 src/main/saveload.c:241
-#: src/main/saveload.c:245 src/main/saveload.c:254 src/main/saveload.c:1381
-#: src/main/saveload.c:1386 src/main/saveload.c:1430 src/main/saveload.c:1498
-#: src/main/saveload.c:1507 src/main/serialize.c:331 src/main/serialize.c:338
-#: src/main/serialize.c:2388 src/main/serialize.c:2396
+#: src/main/saveload.c:200
+#: src/main/saveload.c:205
+#: src/main/saveload.c:214
+#: src/main/saveload.c:223
+#: src/main/saveload.c:232
+#: src/main/saveload.c:241
+#: src/main/saveload.c:245
+#: src/main/saveload.c:254
+#: src/main/saveload.c:1381
+#: src/main/saveload.c:1386
+#: src/main/saveload.c:1430
+#: src/main/saveload.c:1498
+#: src/main/saveload.c:1507
+#: src/main/serialize.c:354
+#: src/main/serialize.c:361
+#: src/main/serialize.c:374
+#: src/main/serialize.c:378
+#: src/main/serialize.c:405
+#: src/main/serialize.c:421
+#: src/main/serialize.c:2429
+#: src/main/serialize.c:2437
 msgid "read error"
 msgstr "ошибка чтения"
 
@@ -5048,8 +5723,11 @@ msgstr "произошла ошибка чтения 'C'"
 msgid "a S read error occurred"
 msgstr "произошла ошибка чтения 'S'"
 
-#: src/main/saveload.c:387 src/main/saveload.c:395 src/main/saveload.c:403
-#: src/main/saveload.c:1594 src/main/saveload.c:1602
+#: src/main/saveload.c:387
+#: src/main/saveload.c:395
+#: src/main/saveload.c:403
+#: src/main/saveload.c:1594
+#: src/main/saveload.c:1602
 msgid "a read error occurred"
 msgstr "произошла ошибка чтения"
 
@@ -5062,7 +5740,8 @@ msgstr "неразрешенный узел во время восстановл
 msgid "restore compatibility error - no version %d compatibility"
 msgstr "ошибка восстановления -- нет совместимости для версии %d"
 
-#: src/main/saveload.c:572 src/main/saveload.c:645
+#: src/main/saveload.c:572
+#: src/main/saveload.c:645
 msgid "bad SEXP type in data file"
 msgstr "неправильный SEXP-тип в файле данных"
 
@@ -5070,7 +5749,9 @@ msgstr "неправильный SEXP-тип в файле данных"
 msgid "mismatch on types"
 msgstr "несоответствие типов"
 
-#: src/main/saveload.c:607 src/main/saveload.c:1270 src/main/serialize.c:1636
+#: src/main/saveload.c:607
+#: src/main/saveload.c:1270
+#: src/main/serialize.c:1675
 #, c-format
 msgid "unrecognized internal function name \"%s\""
 msgstr "не могу найти имя внутренней функции \"%s\""
@@ -5085,19 +5766,15 @@ msgstr "не могу восстановить позицию файла при
 
 #: src/main/saveload.c:915
 msgid "base namespace is not preserved in version 1 workspaces"
-msgstr ""
-"базовое пространство имен не сохранено в рабочих пространствах версии 1"
+msgstr "базовое пространство имен не сохранено в рабочих пространствах версии 1"
 
 #: src/main/saveload.c:917
 msgid "cannot save namespace in version 1 workspaces"
 msgstr "не могу сохранить пространство имен в рабочих пространствах версии 1"
 
 #: src/main/saveload.c:919
-msgid ""
-"cannot save environment with locked/active bindings in version 1 workspaces"
-msgstr ""
-"не могу сохранить окружение с блокированными/активными связями в рабочих "
-"пространствах версии 1"
+msgid "cannot save environment with locked/active bindings in version 1 workspaces"
+msgstr "не могу сохранить окружение с блокированными/активными связями в рабочих пространствах версии 1"
 
 #: src/main/saveload.c:943
 msgid "cannot save weak references in version 1 workspaces"
@@ -5137,7 +5814,8 @@ msgstr "не хватает памяти при чтении ascii-строки"
 msgid "a binary read error occurred"
 msgstr "произошла ошибка чтения бинарных данных"
 
-#: src/main/saveload.c:1580 src/main/saveload.c:1681
+#: src/main/saveload.c:1580
+#: src/main/saveload.c:1681
 msgid "out of memory reading binary string"
 msgstr "не хватает памяти при чтении бинарной строки"
 
@@ -5153,7 +5831,8 @@ msgstr "произошла ошибка записи целочисленных
 msgid "an xdr integer data read error occurred"
 msgstr "произошла ошибка чтения целочисленных xdr-данных"
 
-#: src/main/saveload.c:1667 src/main/saveload.c:1686
+#: src/main/saveload.c:1667
+#: src/main/saveload.c:1686
 msgid "an xdr string data write error occurred"
 msgstr "произошла ошибка чтения xdr-строки"
 
@@ -5173,9 +5852,12 @@ msgstr "произошла ошибка записи комплексных xdr-
 msgid "an xdr complex data read error occurred"
 msgstr "произошла ошибка чтения комплексных xdr-данных"
 
-#: src/main/saveload.c:1783 src/main/serialize.c:1958
-#: src/main/serialize.c:2568 src/modules/internet/internet.c:351
-#: src/modules/internet/internet.c:409 src/modules/internet/internet.c:514
+#: src/main/saveload.c:1783
+#: src/main/serialize.c:1997
+#: src/main/serialize.c:2614
+#: src/modules/internet/internet.c:513
+#: src/modules/internet/internet.c:590
+#: src/modules/internet/internet.c:701
 msgid "write failed"
 msgstr "запись не удалась"
 
@@ -5185,16 +5867,14 @@ msgstr "восстановленный файл, возможно, пуст -- 
 
 #: src/main/saveload.c:1912
 msgid "restore file may be from a newer version of R -- no data loaded"
-msgstr ""
-"файл восстановления, возможно, от более новой версии R -- данные не загружены"
+msgstr "файл восстановления, возможно, от более новой версии R -- данные не загружены"
 
 #: src/main/saveload.c:1914
 msgid "bad restore file magic number (file may be corrupted) -- no data loaded"
-msgstr ""
-"неправильное магическое число файла (файл может быть поврежден) -- данные не "
-"загружены"
+msgstr "неправильное магическое число файла (файл может быть поврежден) -- данные не загружены"
 
-#: src/main/saveload.c:1940 src/main/saveload.c:2238
+#: src/main/saveload.c:1940
+#: src/main/saveload.c:2238
 msgid "first argument must be a character vector"
 msgstr "первый аргумент должен быть текстовым вектором"
 
@@ -5202,11 +5882,11 @@ msgstr "первый аргумент должен быть текстовым 
 msgid "not a valid named list"
 msgstr "неправильный именованный список"
 
-#: src/main/saveload.c:2019 src/main/saveload.c:2040
+#: src/main/saveload.c:2019
+#: src/main/saveload.c:2040
 #, c-format
 msgid "'%s' looks like a pre-2.4.0 S4 object: please recreate it"
-msgstr ""
-"'%s', похоже, является до-2.4.0 S4-объект: пересоздайте его, пожалуйста"
+msgstr "'%s', похоже, является до-2.4.0 S4-объект: пересоздайте его, пожалуйста"
 
 #: src/main/saveload.c:2027
 msgid "loaded data is not in pair list form"
@@ -5216,13 +5896,19 @@ msgstr "загруженные данные не в виде парного сп
 msgid "first argument must be a file name"
 msgstr "первый аргумент должен быть именем файла"
 
-#: src/main/saveload.c:2108 src/main/saveload.c:2134 src/main/serialize.c:826
-#: src/main/serialize.c:863 src/main/serialize.c:901
+#: src/main/saveload.c:2108
+#: src/main/saveload.c:2134
+#: src/main/serialize.c:864
+#: src/main/serialize.c:901
+#: src/main/serialize.c:939
 msgid "XDR write failed"
 msgstr "запись 'XDR' не удалась"
 
-#: src/main/saveload.c:2121 src/main/saveload.c:2146 src/main/serialize.c:1362
-#: src/main/serialize.c:1398 src/main/serialize.c:1436
+#: src/main/saveload.c:2121
+#: src/main/saveload.c:2146
+#: src/main/serialize.c:1400
+#: src/main/serialize.c:1436
+#: src/main/serialize.c:1474
 msgid "XDR read failed"
 msgstr "чтение 'XDR' не удалось"
 
@@ -5231,45 +5917,48 @@ msgstr "чтение 'XDR' не удалось"
 msgid "cannot save data -- unable to open '%s': %s"
 msgstr "не могу сохранить данные -- нельзя открыть %s: %s"
 
-#: src/main/saveload.c:2254 src/main/serialize.c:2161
+#: src/main/saveload.c:2254
+#: src/main/serialize.c:2202
 #, c-format
 msgid "cannot save to connections in version %d format"
 msgstr "не могу сохранить в соединения в формате версии %d"
 
-#: src/main/saveload.c:2277 src/main/serialize.c:2186
+#: src/main/saveload.c:2277
+#: src/main/serialize.c:2227
 msgid "connection not open for writing"
 msgstr "соединение не открыто для записи"
 
-#: src/main/saveload.c:2285
+#: src/main/saveload.c:2286
 msgid "cannot save XDR format to a text-mode connection"
 msgstr "не могу сохранить формат 'XDR' в текстовое соединение"
 
-#: src/main/saveload.c:2295 src/main/serialize.c:2066
-#: src/main/serialize.c:2080 src/main/serialize.c:2262
-#: src/main/serialize.c:2284
+#: src/main/saveload.c:2296
+#: src/main/serialize.c:2105
+#: src/main/serialize.c:2119
+#: src/main/serialize.c:2303
+#: src/main/serialize.c:2325
 msgid "error writing to connection"
 msgstr "ошибка записи в соединение"
 
-#: src/main/saveload.c:2359 src/main/serialize.c:2234
+#: src/main/saveload.c:2357
+#: src/main/serialize.c:2275
 msgid "connection not open for reading"
 msgstr "соединение не открыто для чтения"
 
-#: src/main/saveload.c:2360
+#: src/main/saveload.c:2358
 msgid "can only load() from a binary connection"
 msgstr "функция load() может работать только с двоичным соединением"
 
-#: src/main/saveload.c:2371
+#: src/main/saveload.c:2369
 msgid "no input is available"
 msgstr "ввод недоступен"
 
-#: src/main/saveload.c:2383
-msgid ""
-"the input does not start with a magic number compatible with loading from a "
-"connection"
-msgstr ""
-"ввод не начался с магического числа, совместимого с загрузкой с соединения"
+#: src/main/saveload.c:2381
+msgid "the input does not start with a magic number compatible with loading from a connection"
+msgstr "ввод не начался с магического числа, совместимого с загрузкой с соединения"
 
-#: src/main/scan.c:364 src/main/scan.c:414
+#: src/main/scan.c:364
+#: src/main/scan.c:414
 msgid "EOF within quoted string"
 msgstr "EOF внутри закавыченной строки"
 
@@ -5278,7 +5967,8 @@ msgstr "EOF внутри закавыченной строки"
 msgid "scan() expected '%s', got '%s'"
 msgstr "'scan()' ожидает '%s', а не '%s'"
 
-#: src/main/scan.c:585 src/main/scan.c:732
+#: src/main/scan.c:585
+#: src/main/scan.c:732
 msgid "too many items"
 msgstr "слишком много элементов"
 
@@ -5293,8 +5983,7 @@ msgstr "строка %d не содержит %d элементов"
 
 #: src/main/scan.c:775
 msgid "number of items read is not a multiple of the number of columns"
-msgstr ""
-"количество прочитанных элементов не является произведением количества колонок"
+msgstr "количество прочитанных элементов не является произведением количества колонок"
 
 #: src/main/scan.c:869
 msgid "invalid 'strip.white' length"
@@ -5316,10 +6005,9 @@ msgstr "неправильный десятичный разделитель"
 msgid "invalid quote symbol set"
 msgstr "неправильный набор символов кавычек"
 
-#: src/main/scan.c:987
-#, fuzzy
+#: src/main/scan.c:988
 msgid "embedded nul(s) found in input"
-msgstr "внутреннее nul в строке: '%s'"
+msgstr "внутренний nul(s) найден во вводе"
 
 #: src/main/seq.c:48
 msgid "unequal factor lengths"
@@ -5333,133 +6021,148 @@ msgstr "результат может оказаться слишком длин
 msgid "argument of length 0"
 msgstr "аргумент нулевой длины"
 
-#: src/main/seq.c:161 src/main/seq.c:163
+#: src/main/seq.c:162
+#: src/main/seq.c:167
 #, c-format
-msgid "numerical expression has %d elements: only the first used"
-msgstr "у числового выражения %d элементов: использован только первый"
+msgid "numerical expression has %d element: only the first used"
+msgid_plural "numerical expression has %d elements: only the first used"
+msgstr[0] "у числового выражения %d элемент: использован первый"
+msgstr[1] "у числового выражения %d элемента: использован только первый"
+msgstr[2] "у числового выражения %d элементов: использован только первый"
 
-#: src/main/seq.c:167
+#: src/main/seq.c:173
 msgid "NA/NaN argument"
 msgstr "NA/NaN-аргумент"
 
-#: src/main/seq.c:331
+#: src/main/seq.c:337
 msgid "incorrect type for second argument"
 msgstr "неправильный тип второго аргумента"
 
-#: src/main/seq.c:334
+#: src/main/seq.c:340
 #, c-format
 msgid "attempt to replicate an object of type '%s'"
 msgstr "попытка размножить объект типа '%s'"
 
-#: src/main/seq.c:387
+#: src/main/seq.c:393
 msgid "attempt to replicate non-vector"
 msgstr "попытка размножить не-вектор"
 
-#: src/main/seq.c:403
+#: src/main/seq.c:409
 msgid "cannot replicate NULL to a non-zero length"
 msgstr "не могу размножить NULL до ненулевой длины"
 
-#: src/main/seq.c:626 src/main/seq.c:633 src/main/seq.c:768 src/main/seq.c:979
+#: src/main/seq.c:630
+#: src/main/seq.c:637
+#: src/main/seq.c:766
+#: src/main/seq.c:977
 #, c-format
 msgid "first element used of '%s' argument"
 msgstr "использован первый элемент аргумента '%s'"
 
-#: src/main/seq.c:766
+#: src/main/seq.c:764
 msgid "'length.out' must be a non-negative number"
 msgstr "'length.out' должен быть неотрицательным числом"
 
-#: src/main/seq.c:790 src/main/seq.c:856 src/main/seq.c:873
+#: src/main/seq.c:788
+#: src/main/seq.c:854
+#: src/main/seq.c:871
 msgid "'from' must be finite"
 msgstr "'from' должен быть конечным"
 
-#: src/main/seq.c:792 src/main/seq.c:858 src/main/seq.c:895
+#: src/main/seq.c:790
+#: src/main/seq.c:856
+#: src/main/seq.c:893
 msgid "'to' must be finite"
 msgstr "'to' должен быть конечным"
 
-#: src/main/seq.c:804
+#: src/main/seq.c:802
 msgid "invalid '(to - from)/by' in 'seq'"
 msgstr "неверные '(to - from)/by' в 'seq'"
 
-#: src/main/seq.c:816
+#: src/main/seq.c:814
 msgid "'by' argument is much too small"
 msgstr "аргумент 'by' слишком короток"
 
-#: src/main/seq.c:818
+#: src/main/seq.c:816
 msgid "wrong sign in 'by' argument"
 msgstr "неправильный знак аргумента 'by'"
 
-#: src/main/seq.c:875 src/main/seq.c:897
+#: src/main/seq.c:873
+#: src/main/seq.c:895
 msgid "'by' must be finite"
 msgstr "'by' должен быть конечным"
 
-#: src/main/seq.c:985 src/main/seq.c:990
+#: src/main/seq.c:983
+#: src/main/seq.c:988
 msgid "argument must be coercible to non-negative integer"
 msgstr "аргумент должен быть преобразовываем в неотрицательное целое число"
 
-#: src/main/serialize.c:224 src/main/serialize.c:254 src/main/serialize.c:277
+#: src/main/serialize.c:228
+#: src/main/serialize.c:275
+#: src/main/serialize.c:299
 msgid "unknown or inappropriate output format"
 msgstr "неизвестный или неподходящий формат вывода"
 
-#: src/main/serialize.c:504
+#: src/main/serialize.c:542
 msgid "must specify ascii, binary, or xdr format"
 msgstr "нужно задать формат 'ascii', бинарный или 'xdr'"
 
-#: src/main/serialize.c:505
+#: src/main/serialize.c:543
 msgid "unknown output format"
 msgstr "неизвестный формат вывода"
 
-#: src/main/serialize.c:536
+#: src/main/serialize.c:574
 msgid "unknown input format"
 msgstr "неизвестный формат ввода"
 
-#: src/main/serialize.c:541
+#: src/main/serialize.c:579
 msgid "input format does not match specified format"
 msgstr "формат ввода не соответствует указанному формату"
 
-#: src/main/serialize.c:752
+#: src/main/serialize.c:790
 msgid "no restore method available"
 msgstr "нет метода восстановления"
 
-#: src/main/serialize.c:794
+#: src/main/serialize.c:832
 msgid "names in persistent strings are currently ignored"
 msgstr "имена в постоянных строках в настоящее время пропускаются"
 
-#: src/main/serialize.c:963
+#: src/main/serialize.c:1001
 #, c-format
 msgid "'%s' may not be available when loading"
 msgstr "'%s' может быть недоступно во время загрузки"
 
-#: src/main/serialize.c:970
+#: src/main/serialize.c:1008
 msgid "namespaces may not be available when loading"
 msgstr "пространства имен могут быть недоступны во время загрузки"
 
-#: src/main/serialize.c:1097
+#: src/main/serialize.c:1136
 #, c-format
 msgid "WriteItem: unknown type %i"
 msgstr "'WriteItem': неизвестный тип %i"
 
-#: src/main/serialize.c:1273
+#: src/main/serialize.c:1312
 #, c-format
 msgid "version %d not supported"
 msgstr "версия %d не поддерживается"
 
-#: src/main/serialize.c:1305
+#: src/main/serialize.c:1343
 msgid "reference index out of range"
 msgstr "ссылка вне промежутка"
 
-#: src/main/serialize.c:1335
+#: src/main/serialize.c:1373
 msgid "names in persistent strings are not supported yet"
 msgstr "имена в постоянных строках пока не поддерживаются"
 
-#: src/main/serialize.c:1463
+#: src/main/serialize.c:1501
 msgid "negative serialized length for vector"
 msgstr "отрицательная серийная длина для вектора"
 
-#: src/main/serialize.c:1471
+#: src/main/serialize.c:1509
 msgid "invalid upper part of serialized vector length"
 msgstr "неправильная верхняя часть длины серийного вектора"
 
-#: src/main/serialize.c:1476
+#: src/main/serialize.c:1514
 msgid ""
 "negative serialized vector length:\n"
 "perhaps long vector from 64-bit version of R?"
@@ -5467,114 +6170,113 @@ msgstr ""
 "отрицательная длина серийного ветора:\n"
 "может быть, это длинный вектор из 64-битной версии R?"
 
-#: src/main/serialize.c:1707
+#: src/main/serialize.c:1746
 msgid "this version of R cannot read class references"
 msgstr "эта версия R не может читать ссылки на классы"
 
-#: src/main/serialize.c:1709
+#: src/main/serialize.c:1748
 msgid "this version of R cannot read generic function references"
 msgstr "эта версия R не может читать ссылки на общие функции"
 
-#: src/main/serialize.c:1726
+#: src/main/serialize.c:1765
 #, c-format
 msgid "ReadItem: unknown type %i, perhaps written by later version of R"
 msgstr "ReadItem: неизвестный тип %i, возможно записанный следующей версией R"
 
-#: src/main/serialize.c:1882
+#: src/main/serialize.c:1921
 #, c-format
-msgid ""
-"cannot read unreleased workspace version %d written by experimental R %d.%d."
-"%d"
-msgstr ""
-"не могу прочитать рабочее пространство не выпущенной версии %d, записанной "
-"экспериментальным R %d.%d.%d"
+msgid "cannot read unreleased workspace version %d written by experimental R %d.%d.%d"
+msgstr "не могу прочитать рабочее пространство не выпущенной версии %d, записанной экспериментальным R %d.%d.%d"
 
-#: src/main/serialize.c:1886
+#: src/main/serialize.c:1925
 #, c-format
-msgid ""
-"cannot read workspace version %d written by R %d.%d.%d; need R %d.%d.%d or "
-"newer"
-msgstr ""
-"не могу прочитать рабочее пространство версии %d, записанное R %d.%d.%d; "
-"нужен R %d.%d.%d или более новый"
+msgid "cannot read workspace version %d written by R %d.%d.%d; need R %d.%d.%d or newer"
+msgstr "не могу прочитать рабочее пространство версии %d, записанное R %d.%d.%d; нужен R %d.%d.%d или более новый"
 
-#: src/main/serialize.c:1965
+#: src/main/serialize.c:2004
 msgid "read failed"
 msgstr "чтение не удалось"
 
-#: src/main/serialize.c:2028
+#: src/main/serialize.c:2067
 msgid "error reading from ascii connection"
 msgstr "ошибка чтения из ASCII-соединения"
 
-#: src/main/serialize.c:2030
+#: src/main/serialize.c:2069
 msgid "unexpected format in ascii connection"
 msgstr "не могу читать из ASCII-соединения"
 
-#: src/main/serialize.c:2035 src/main/serialize.c:2049
+#: src/main/serialize.c:2074
+#: src/main/serialize.c:2088
 msgid "error reading from connection"
 msgstr "ошибка чтения из соединения"
 
-#: src/main/serialize.c:2090
+#: src/main/serialize.c:2130
 msgid "only ascii format can be written to text mode connections"
 msgstr "только формат 'ascii' может быть записан в текстовые соединения"
 
-#: src/main/serialize.c:2104
+#: src/main/serialize.c:2144
 msgid "only ascii format can be read from text mode connections"
 msgstr "только формат 'ascii' может быть прочитан из текстовых соединений"
 
-#: src/main/serialize.c:2159 src/main/serialize.c:2312
-#: src/main/serialize.c:2461
+#: src/main/serialize.c:2200
+#: src/main/serialize.c:2353
+#: src/main/serialize.c:2502
 msgid "bad version value"
 msgstr "неправильное значение версии"
 
-#: src/main/serialize.c:2184
+#: src/main/serialize.c:2225
 msgid "binary-mode connection required for ascii=FALSE"
 msgstr "для ascii=FALSE требуется двоичное соединение"
 
-#: src/main/serialize.c:2340 src/main/serialize.c:2377
-#: src/main/serialize.c:2440
+#: src/main/serialize.c:2381
+#: src/main/serialize.c:2418
+#: src/main/serialize.c:2481
 msgid "serialization is too large to store in a raw vector"
-msgstr ""
-"сериализация слишком велика, для того чтобы хранить ее в простом векторе"
+msgstr "сериализация слишком велика, для того чтобы хранить ее в простом векторе"
 
-#: src/main/serialize.c:2357
+#: src/main/serialize.c:2398
 msgid "cannot allocate buffer"
 msgstr "не могу разместить буфер"
 
-#: src/main/serialize.c:2546 src/main/serialize.c:2619
+#: src/main/serialize.c:2592
+#: src/main/serialize.c:2665
 msgid "not a proper file name"
 msgstr "неправильное имя файла"
 
-#: src/main/serialize.c:2548
+#: src/main/serialize.c:2594
 msgid "not a proper raw vector"
 msgstr "неправильный простой вектор"
 
-#: src/main/serialize.c:2569
+#: src/main/serialize.c:2615
 msgid "could not determine file position"
 msgstr "не могу определить место файла"
 
-#: src/main/serialize.c:2621
+#: src/main/serialize.c:2667
 msgid "bad offset/length argument"
 msgstr "неправильный аргумент смещения/длины"
 
-#: src/main/serialize.c:2645 src/main/serialize.c:2658
-#: src/main/serialize.c:2667 src/main/serialize.c:2677
-#: src/main/serialize.c:2690
+#: src/main/serialize.c:2691
+#: src/main/serialize.c:2704
+#: src/main/serialize.c:2713
+#: src/main/serialize.c:2723
+#: src/main/serialize.c:2736
 #, c-format
 msgid "seek failed on %s"
 msgstr "на %s не удалось найти"
 
-#: src/main/serialize.c:2662 src/main/serialize.c:2671
-#: src/main/serialize.c:2681 src/main/serialize.c:2694
+#: src/main/serialize.c:2708
+#: src/main/serialize.c:2717
+#: src/main/serialize.c:2727
+#: src/main/serialize.c:2740
 #, c-format
 msgid "read failed on %s"
 msgstr "на %s не удалось прочитать"
 
-#: src/main/serialize.c:2713
+#: src/main/serialize.c:2759
 msgid "bad environment"
 msgstr "плохое окружение"
 
-#: src/main/serialize.c:2715
+#: src/main/serialize.c:2761
 msgid "bad variable names"
 msgstr "неправильное имя переменной"
 
@@ -5582,15 +6284,20 @@ msgstr "неправильное имя переменной"
 msgid "only atomic vectors can be tested to be sorted"
 msgstr "только элементарные факторы могут быть проверены на сортировку"
 
-#: src/main/sort.c:326 src/main/sort.c:1228 src/main/sort.c:1396
+#: src/main/sort.c:326
+#: src/main/sort.c:1228
+#: src/main/sort.c:1396
 msgid "'decreasing' must be TRUE or FALSE"
 msgstr "'decreasing' должен быть TRUE или FALSE"
 
-#: src/main/sort.c:329 src/main/sort.c:600
+#: src/main/sort.c:329
+#: src/main/sort.c:600
 msgid "only atomic vectors can be sorted"
 msgstr "только элементарные векторы могут быть отсортированы"
 
-#: src/main/sort.c:331 src/main/sort.c:602 src/main/sort.c:1297
+#: src/main/sort.c:331
+#: src/main/sort.c:602
+#: src/main/sort.c:1297
 msgid "raw vectors cannot be sorted"
 msgstr "простые векторы не могут быть отсортированы"
 
@@ -5603,11 +6310,13 @@ msgstr "NA или неопределенный индекс"
 msgid "index %ld outside bounds"
 msgstr "индекс %ld за пределами"
 
-#: src/main/sort.c:621 src/main/sort.c:634
+#: src/main/sort.c:621
+#: src/main/sort.c:634
 msgid "NA index"
 msgstr "NA-индекс"
 
-#: src/main/sort.c:623 src/main/sort.c:636
+#: src/main/sort.c:623
+#: src/main/sort.c:636
 #, c-format
 msgid "index %d outside bounds"
 msgstr "индекс %d за пределами"
@@ -5629,11 +6338,11 @@ msgstr "неправильный 'ties.method' для 'rank()' [не должн
 msgid "too large a range of values in 'x'"
 msgstr "размах значений в 'x' слишком велик"
 
-#: src/main/source.c:215
+#: src/main/source.c:220
 msgid "coercion of 'text' to character was unsuccessful"
 msgstr "конверсия 'text' в символы не удалась"
 
-#: src/main/source.c:231
+#: src/main/source.c:236
 #, c-format
 msgid "argument '%s = \"%s\"' will be ignored"
 msgstr "аргумент '%s = \"%s\"' будет проигнорирован"
@@ -5658,90 +6367,95 @@ msgstr "длина данных не является произведением
 msgid "factor has bad level"
 msgstr "у фактора -- неправильный уровень"
 
-#: src/main/sprintf.c:94
+#: src/main/sprintf.c:97
 #, c-format
 msgid "required resulting string length %d is greater than maximal %d"
 msgstr "длина требуемой строки результатов %d, что больше максимальной %d"
 
-#: src/main/sprintf.c:102
+#: src/main/sprintf.c:105
 msgid "'fmt' is not a character vector"
 msgstr "'fmt' не является текстовым вектором"
 
-#: src/main/sprintf.c:107
+#: src/main/sprintf.c:110
 #, c-format
 msgid "only %d arguments are allowed"
 msgstr "разрешено только %d аргументов"
 
-#: src/main/sprintf.c:114
+#: src/main/sprintf.c:117
 #, c-format
 msgid "invalid type of argument[%d]: '%s'"
 msgstr "неправильный тип аргумента [%d]: '%s'"
 
-#: src/main/sprintf.c:125 src/main/sprintf.c:128
+#: src/main/sprintf.c:128
+#: src/main/sprintf.c:131
 msgid "arguments cannot be recycled to the same length"
 msgstr "аргументы не могут самоповторяться до одинаковой длины"
 
-#: src/main/sprintf.c:150 src/main/sprintf.c:257
+#: src/main/sprintf.c:153
+#: src/main/sprintf.c:260
 #, c-format
 msgid "'fmt' length exceeds maximal format length %d"
 msgstr "длина 'fmt' превышает максимальную длину формата %d"
 
-#: src/main/sprintf.c:169
+#: src/main/sprintf.c:172
 #, c-format
 msgid "unrecognised format specification '%s'"
 msgstr "неправильное указание формата '%s'"
 
-#: src/main/sprintf.c:180 src/main/sprintf.c:186 src/main/sprintf.c:199
-#: src/main/sprintf.c:206
+#: src/main/sprintf.c:183
+#: src/main/sprintf.c:189
+#: src/main/sprintf.c:202
+#: src/main/sprintf.c:209
 #, c-format
 msgid "reference to non-existent argument %d"
 msgstr "ссылка на несуществующий аргумент %d"
 
-#: src/main/sprintf.c:218
+#: src/main/sprintf.c:221
 msgid "at most one asterisk '*' is supported in each conversion specification"
-msgstr ""
-"не более одной звездочки '*' поддерживается на каждое определение конверсии"
+msgstr "не более одной звездочки '*' поддерживается на каждое определение конверсии"
 
-#: src/main/sprintf.c:228
+#: src/main/sprintf.c:231
 msgid "argument for '*' conversion specification must be a number"
 msgstr "аргумент у '*'-указания конверсии должен быть числом"
 
-#: src/main/sprintf.c:266
+#: src/main/sprintf.c:269
 msgid "coercion has changed vector length to 0"
 msgstr "преобразование изменило длину вектора в 0"
 
-#: src/main/sprintf.c:339 src/main/sprintf.c:353 src/main/sprintf.c:367
-#: src/main/sprintf.c:402
+#: src/main/sprintf.c:342
+#: src/main/sprintf.c:356
+#: src/main/sprintf.c:370
+#: src/main/sprintf.c:405
 #, c-format
 msgid "invalid format '%s'; %s"
 msgstr "неправильный формат '%s'; %s"
 
-#: src/main/sprintf.c:340
+#: src/main/sprintf.c:343
 #, c-format
 msgid "use format %d or %i for logical objects"
 msgstr "используйте формат %d или %i для логических объектов"
 
-#: src/main/sprintf.c:354
+#: src/main/sprintf.c:357
 #, c-format
 msgid "use format %d, %i, %o, %x or %X for integer objects"
 msgstr "используйте формат %d, %i, %o, %x или %X для целочисленных объектов"
 
-#: src/main/sprintf.c:368
+#: src/main/sprintf.c:371
 #, c-format
 msgid "use format %f, %e, %g or %a for numeric objects"
 msgstr "используйте формат %f, %e, %g или %a для числовых объектов"
 
-#: src/main/sprintf.c:403
+#: src/main/sprintf.c:406
 #, c-format
 msgid "use format %s for character objects"
 msgstr "используйте формат %s для текстовых"
 
-#: src/main/sprintf.c:408
+#: src/main/sprintf.c:411
 #, c-format
 msgid "likely truncation of character string to %d characters"
 msgstr "похоже на укорочение текстовой строки на %d символов"
 
-#: src/main/sprintf.c:417
+#: src/main/sprintf.c:420
 msgid "unsupported type"
 msgstr "неподдерживаемый тип"
 
@@ -5763,189 +6477,211 @@ msgstr "присвоение за пределами вектора/списка
 msgid "incompatible types (from %s to %s) in subassignment type fix"
 msgstr "несовместимые типы (от %s до %s) при записи типа подгрупп присвоения"
 
-#: src/main/subassign.c:502 src/main/subassign.c:782 src/main/subassign.c:785
-#: src/main/subassign.c:1076
+#: src/main/subassign.c:503
+#: src/main/subassign.c:783
+#: src/main/subassign.c:786
+#: src/main/subassign.c:1077
 msgid "NAs are not allowed in subscripted assignments"
 msgstr "в подгруппах присвоений NA не разрешены"
 
-#: src/main/subassign.c:520 src/main/subassign.c:796 src/main/subassign.c:1068
-#: src/main/subassign.c:1641
+#: src/main/subassign.c:521
+#: src/main/subassign.c:797
+#: src/main/subassign.c:1069
+#: src/main/subassign.c:1647
 msgid "replacement has length zero"
 msgstr "замена имеет нулевую длину"
 
-#: src/main/subassign.c:522 src/main/subassign.c:798 src/main/subassign.c:1070
+#: src/main/subassign.c:523
+#: src/main/subassign.c:799
+#: src/main/subassign.c:1071
 msgid "number of items to replace is not a multiple of replacement length"
 msgstr "число единиц для замены не является произведением длины замены"
 
-#: src/main/subassign.c:766
+#: src/main/subassign.c:767
 msgid "incorrect number of subscripts on matrix"
 msgstr "неправильное число подгрупп матрицы"
 
-#: src/main/subassign.c:1022
+#: src/main/subassign.c:1023
 #, c-format
 msgid "incompatible types (from %s to %s) in matrix subset assignment"
 msgstr "несовместимые типы (от %s до %s) в определении подгрупп матрицы"
 
-#: src/main/subassign.c:1038 src/main/subset.c:928
+#: src/main/subassign.c:1039
+#: src/main/subset.c:947
 msgid "incorrect number of subscripts"
 msgstr "неправильное количество подгрупп"
 
-#: src/main/subassign.c:1214
+#: src/main/subassign.c:1215
 #, c-format
 msgid "incompatible types (from %s to %s) in array subset assignment"
-msgstr ""
-"несовместимые типы (от %s до %s) в определении подгрупп многомерной матрицы"
+msgstr "несовместимые типы (от %s до %s) в определении подгрупп многомерной матрицы"
 
-#: src/main/subassign.c:1249 src/main/subassign.c:1270
+#: src/main/subassign.c:1250
+#: src/main/subassign.c:1271
 msgid "invalid subscript in list assign"
 msgstr "неправильная подгруппа списка присвоений"
 
-#: src/main/subassign.c:1263
+#: src/main/subassign.c:1264
 msgid "invalid number of subscripts to list assign"
 msgstr "неправильное количество подгрупп присвоения списка"
 
-#: src/main/subassign.c:1361
+#: src/main/subassign.c:1363
 msgid "SubAssignArgs: invalid number of arguments"
 msgstr "'SubAssignArgs': неправильное количество аргументов"
 
-#: src/main/subassign.c:1506
+#: src/main/subassign.c:1508
 msgid "result is zero-length and so cannot be a language object"
 msgstr "результат нулевой длины и поэтому не может быть объектом языка"
 
-#: src/main/subassign.c:1611
-msgid ""
-"[[<- defined for objects of type \"S4\" only for subclasses of environment"
-msgstr ""
-"[[<- для объектов типа \"S4\" определено только для подклассов окружения"
+#: src/main/subassign.c:1607
+msgid "[[<- defined for objects of type \"S4\" only for subclasses of environment"
+msgstr "[[<- для объектов типа \"S4\" определено только для подклассов окружения"
 
-#: src/main/subassign.c:1617
+#: src/main/subassign.c:1619
 msgid "wrong args for environment subassignment"
 msgstr "неправильные аргументы в подгруппах присвоения для окружения"
 
-#: src/main/subassign.c:1643
+#: src/main/subassign.c:1649
 msgid "more elements supplied than there are to replace"
 msgstr "дано больше элементов, чем можно их заменить"
 
-#: src/main/subassign.c:1645
+#: src/main/subassign.c:1651
 msgid "[[ ]] with missing subscript"
 msgstr "[[ ]] с пропущенным индексом"
 
-#: src/main/subassign.c:1657 src/main/subassign.c:1675
+#: src/main/subassign.c:1669
+#: src/main/subassign.c:1687
 msgid "[[ ]] subscript out of bounds"
 msgstr "[[ ]] индекс за пределами"
 
-#: src/main/subassign.c:1663 src/main/subassign.c:1841
+#: src/main/subassign.c:1675
+#: src/main/subassign.c:1856
 msgid "[[ ]] improper number of subscripts"
 msgstr "[[ ]] неправильное количество подгрупп"
 
-#: src/main/subassign.c:1808
+#: src/main/subassign.c:1821
 #, c-format
 msgid "incompatible types (from %s to %s) in [[ assignment"
 msgstr "несовместимые типы (от %s до %s) в [[ присвоении"
 
-#: src/main/subassign.c:1852
+#: src/main/subassign.c:1867
 #, c-format
 msgid "[[ ]] subscript (%d) out of bounds"
 msgstr "[[ ]] индекс (%d) за пределами"
 
-#: src/main/subassign.c:1905 src/main/subscript.c:143 src/main/subscript.c:145
-#: src/main/subscript.c:274 src/main/subscript.c:276 src/main/subscript.c:826
-#: src/main/subscript.c:828 src/main/subscript.c:919 src/main/subscript.c:921
-#: src/main/subset.c:1109
+#: src/main/subassign.c:1923
+#: src/main/subscript.c:151
+#: src/main/subscript.c:153
+#: src/main/subscript.c:282
+#: src/main/subscript.c:284
+#: src/main/subscript.c:894
+#: src/main/subscript.c:896
+#: src/main/subscript.c:987
+#: src/main/subscript.c:989
+#: src/main/subset.c:1149
 #, c-format
 msgid "invalid subscript type '%s'"
 msgstr "неправильный тип подгруппы '%s'"
 
-#: src/main/subassign.c:1950
+#: src/main/subassign.c:1968
 msgid "no method for assigning subsets of this S4 class"
 msgstr "отсутствует метод класса S4 для назначения подмножеств"
 
-#: src/main/subassign.c:2008
+#: src/main/subassign.c:2026
 msgid "Coercing LHS to a list"
 msgstr "Преобразование левой стороны выражения в список"
 
-#: src/main/subscript.c:53 src/main/subscript.c:75 src/main/subscript.c:180
-#: src/main/subscript.c:204
+#: src/main/subscript.c:58
+#: src/main/subscript.c:80
+#: src/main/subscript.c:188
+#: src/main/subscript.c:212
 msgid "attempt to select less than one element"
 msgstr "попытка выбрать менее одного элемента"
 
-#: src/main/subscript.c:57 src/main/subscript.c:72 src/main/subscript.c:178
-#: src/main/subscript.c:208 src/main/subscript.c:304
+#: src/main/subscript.c:62
+#: src/main/subscript.c:77
+#: src/main/subscript.c:186
+#: src/main/subscript.c:216
+#: src/main/subscript.c:312
 msgid "attempt to select more than one element"
 msgstr "попытка выбрать более одного элемента"
 
-#: src/main/subscript.c:184
+#: src/main/subscript.c:192
 msgid "internal error in use of recursive indexing"
 msgstr "внутренняя ошибка во время использования рекурсивной индексации"
 
-#: src/main/subscript.c:252
+#: src/main/subscript.c:260
 #, c-format
 msgid "further partial match of '%s' to '%s'"
 msgstr "дальнейшее частичное соответствие '%s' с '%s'"
 
-#: src/main/subscript.c:302
+#: src/main/subscript.c:310
 #, c-format
 msgid "recursive indexing failed at level %d\n"
 msgstr "на уровне %d рекурсивная индексация не удалась\n"
 
-#: src/main/subscript.c:309
+#: src/main/subscript.c:320
 #, c-format
 msgid "no such index at level %d\n"
 msgstr "на уровне %d нет такого индекса\n"
 
-#: src/main/subscript.c:352
+#: src/main/subscript.c:367
 msgid "incorrect number of columns in matrix subscript"
 msgstr "неправильное количество колонок в индексе матрицы"
 
-#: src/main/subscript.c:371 src/main/subscript.c:389 src/main/subscript.c:413
+#: src/main/subscript.c:386
+#: src/main/subscript.c:404
+#: src/main/subscript.c:428
 msgid "negative values are not allowed in a matrix subscript"
 msgstr "отрицательные значения в индексе матрицы не разрешены"
 
-#: src/main/subscript.c:492
+#: src/main/subscript.c:507
 msgid "(subscript) logical subscript too long"
 msgstr "(subscript) логический индекс слишком велик"
 
-#: src/main/subscript.c:590 src/main/subscript.c:645
+#: src/main/subscript.c:658
+#: src/main/subscript.c:713
 msgid "only 0's may be mixed with negative subscripts"
 msgstr "только нули могут смешиваться с отрицательными индексами"
 
-#: src/main/subscript.c:618
+#: src/main/subscript.c:686
 msgid "subscript too large for 32-bit R"
 msgstr "слишком большой для 32-битного R список индексов"
 
-#: src/main/subscript.c:817
+#: src/main/subscript.c:885
 msgid "no 'dimnames' attribute for array"
 msgstr "у многомерной матрицы нет атрибута 'dimnames'"
 
-#: src/main/subscript.c:857
+#: src/main/subscript.c:925
 msgid "subscripting on non-vector"
 msgstr "индексирование не-вектора"
 
-#: src/main/subset.c:261
+#: src/main/subset.c:262
 msgid "dimensions would exceed maximum size of array"
 msgstr "размерности превышают максимальный размер массива"
 
-#: src/main/subset.c:304 src/main/subset.c:333
+#: src/main/subset.c:305
+#: src/main/subset.c:334
 msgid "matrix subscripting not handled for this type"
 msgstr "индексирование матрицы для этого типа невозможно"
 
-#: src/main/subset.c:488
+#: src/main/subset.c:490
 msgid "array subscripting not handled for this type"
 msgstr "подмножества для этого типа многомерных матриц создать нельзя"
 
-#: src/main/subset.c:827
+#: src/main/subset.c:846
 msgid "incorrect number of dimensions"
 msgstr "неправильное количество измерений"
 
-#: src/main/subset.c:924
+#: src/main/subset.c:943
 msgid "no index specified"
 msgstr "индекс не указан"
 
-#: src/main/subset.c:934
+#: src/main/subset.c:953
 msgid "this S4 class is not subsettable"
 msgstr "объект S4 не делится на подгруппы"
 
-#: src/main/subset.c:940
+#: src/main/subset.c:960
 msgid "wrong arguments for subsetting an environment"
 msgstr "неправильные аргументы для индексирования окружения"
 
@@ -5954,7 +6690,9 @@ msgstr "неправильные аргументы для индексиров
 msgid "invalid 'type' (%s) of argument"
 msgstr "неправильный 'type' (%s) аргумента"
 
-#: src/main/summary.c:66 src/main/summary.c:78 src/main/summary.c:103
+#: src/main/summary.c:66
+#: src/main/summary.c:78
+#: src/main/summary.c:103
 msgid "integer overflow - use sum(as.numeric(.))"
 msgstr "целочисленное переполнение -- используйте sum(as.numeric(.))"
 
@@ -5963,256 +6701,283 @@ msgstr "целочисленное переполнение -- использу
 msgid "internal error ('op = %d' in do_summary).\t Call a Guru"
 msgstr "внутренняя ошибка ('op = %d' в 'do_summary').\t Вызовите специалиста"
 
-#: src/main/summary.c:623
+#: src/main/summary.c:633
 msgid "Integer overflow - use sum(as.numeric(.))"
 msgstr "Целочисленное переполнение - используйте sum(as.numeric(.))"
 
-#: src/main/summary.c:731
+#: src/main/summary.c:746
 msgid "no non-missing arguments, returning NA"
 msgstr "нет не пропущенных аргументов; возвращаю NA"
 
-#: src/main/summary.c:734
+#: src/main/summary.c:749
 msgid "no non-missing arguments to min; returning Inf"
 msgstr "у 'min' нет не пропущенных аргументов; возвращаю Inf"
 
-#: src/main/summary.c:736
+#: src/main/summary.c:751
 msgid "no non-missing arguments to max; returning -Inf"
 msgstr "у 'max' нет не пропущенных аргументов; возвращаю -Inf"
 
-#: src/main/summary.c:801
+#: src/main/summary.c:816
 msgid "non-numeric argument"
 msgstr "нечисловой аргумент"
 
-#: src/main/summary.c:845
+#: src/main/summary.c:860
 msgid "argument to 'which' is not logical"
 msgstr "аргумент 'which' -- не логический"
 
-#: src/main/summary.c:889
+#: src/main/summary.c:904
 msgid "no arguments"
 msgstr "нет аргументов"
 
-#: src/main/summary.c:900 src/main/summary.c:917
+#: src/main/summary.c:915
+#: src/main/summary.c:932
 msgid "invalid input type"
 msgstr "неправильный тип ввода"
 
-#: src/main/summary.c:934
+#: src/main/summary.c:949
 msgid "an argument will be fractionally recycled"
 msgstr "аргумент будет частично зациклен"
 
-#: src/main/sysutils.c:69 src/main/sysutils.c:83
+#: src/main/sysutils.c:68
+#: src/main/sysutils.c:82
 #, c-format
 msgid "cannot determine file modification time of '%s'"
 msgstr "не могу определить время изменения файла '%s'"
 
-#: src/main/sysutils.c:167
+#: src/main/sysutils.c:166
 msgid "encoding of a filename cannot be 'bytes'"
 msgstr "кодировка для имени файла не может быть 'bytes'"
 
-#: src/main/sysutils.c:170 src/main/sysutils.c:803 src/main/sysutils.c:818
-#: src/main/sysutils.c:909 src/main/sysutils.c:924 src/main/sysutils.c:1020
+#: src/main/sysutils.c:169
+#: src/main/sysutils.c:825
+#: src/main/sysutils.c:840
+#: src/main/sysutils.c:969
 #, c-format
 msgid "unsupported conversion from '%s' in codepage %d"
 msgstr "неподдерживаемая конвертация из '%s' в кодовой странице '%d'"
 
-#: src/main/sysutils.c:179
+#: src/main/sysutils.c:178
 msgid "file name conversion problem -- name too long?"
 msgstr "проблема конвертирования имени файла -- имя слишком длинное?"
 
-#: src/main/sysutils.c:180
+#: src/main/sysutils.c:179
 msgid "file name conversion problem"
 msgstr "проблема конвертирования имени файла"
 
-#: src/main/sysutils.c:249
+#: src/main/sysutils.c:248
 msgid "invalid filename pattern"
 msgstr "неправильный образец имени файла"
 
-#: src/main/sysutils.c:253
+#: src/main/sysutils.c:252
 msgid "invalid file extension"
 msgstr "неправильное расширение файла"
 
-#: src/main/sysutils.c:255
+#: src/main/sysutils.c:254
 msgid "no 'pattern'"
 msgstr "нет 'pattern'"
 
-#: src/main/sysutils.c:257
+#: src/main/sysutils.c:256
 msgid "no 'tempdir'"
 msgstr "нет 'tempdir'"
 
-#: src/main/sysutils.c:259
+#: src/main/sysutils.c:258
 msgid "no 'fileext'"
 msgstr "отсутствует 'fileext'"
 
-#: src/main/sysutils.c:345 src/main/sysutils.c:348 src/main/sysutils.c:439
-#: src/main/sysutils.c:441 src/main/sysutils.c:477
+#: src/main/sysutils.c:322
+#, c-format
+msgid "system call failed: %s"
+msgstr "системный вызов не удался %s"
+
+#: src/main/sysutils.c:351
+#: src/main/sysutils.c:354
+#: src/main/sysutils.c:445
+#: src/main/sysutils.c:447
+#: src/main/sysutils.c:483
 msgid "wrong type for argument"
 msgstr "неправильный тип для аргумента"
 
-#: src/main/sysutils.c:443
+#: src/main/sysutils.c:449
 msgid "wrong length for argument"
 msgstr "неправильная длина аргумента"
 
-#: src/main/sysutils.c:464
+#: src/main/sysutils.c:470
 msgid "'Sys.setenv' is not available on this system"
 msgstr "'Sys.setenv' в этой системе недоступен"
 
-#: src/main/sysutils.c:508
+#: src/main/sysutils.c:514
 msgid "this system cannot unset environment variables: setting to \"\""
-msgstr ""
-"эта система не может отменить переменные окружения: устанавливаю в \"\""
+msgstr "эта система не может отменить переменные окружения: устанавливаю в \"\""
 
-#: src/main/sysutils.c:519
+#: src/main/sysutils.c:525
 msgid "'Sys.unsetenv' is not available on this system"
 msgstr "'Sys.unsetenv' в этой системе недоступен"
 
-#: src/main/sysutils.c:616
+#: src/main/sysutils.c:622
 #, c-format
 msgid "unsupported conversion from '%s' to '%s' in codepage %d"
 msgstr "неподдерживаемая конвертация из '%s' в '%s' в кодовой странице %d"
 
-#: src/main/sysutils.c:631
+#: src/main/sysutils.c:637
 msgid "'x' must be a character vector"
 msgstr "'x' должен быть текстовым вектором"
 
-#: src/main/sysutils.c:646
+#: src/main/sysutils.c:652
 msgid "'x' must be a list of NULL or raw vectors"
 msgstr "'x' должен быть списком из NULL или простых векторов"
 
-#: src/main/sysutils.c:724 src/main/sysutils.c:789 src/main/sysutils.c:895
-#: src/main/sysutils.c:994 src/main/sysutils.c:1010 src/main/sysutils.c:1087
+#: src/main/sysutils.c:730
+#: src/main/sysutils.c:908
+#: src/main/sysutils.c:926
+#: src/main/sysutils.c:943
+#: src/main/sysutils.c:959
+#: src/main/sysutils.c:1036
 #, c-format
 msgid "'%s' must be called on a CHARSXP"
 msgstr "'%s' должен быть вызван на CHARSXP"
 
-#: src/main/sysutils.c:792 src/main/sysutils.c:898 src/main/sysutils.c:1015
-#: src/main/sysutils.c:1090
+#: src/main/sysutils.c:799
+#: src/main/sysutils.c:964
+#: src/main/sysutils.c:1039
 msgid "translating strings with \"bytes\" encoding is not allowed"
 msgstr "перевод строк с кодировкой \"bytes\" запрещено"
 
-#: src/main/sysutils.c:1116
+#: src/main/sysutils.c:812
+msgid "internal error: no translation needed"
+msgstr "внутренняя ошибка: перевод не нужен"
+
+#: src/main/sysutils.c:1065
 #, c-format
 msgid "unsupported conversion to '%s' from codepage %d"
 msgstr "неподдерживаемая конвертация в '%s' из кодовой страницы %d"
 
-#: src/main/sysutils.c:1530
-#, fuzzy, c-format
+#: src/main/sysutils.c:1480
+#, c-format
 msgid "invalid Unicode point %u"
-msgstr "неправильное объединение строк"
+msgstr "неправильный Unicode point %u"
 
-#: src/main/sysutils.c:1632
+#: src/main/sysutils.c:1582
 msgid "cannot create 'R_TempDir'"
 msgstr "не могу создать 'R_TempDir'"
 
-#: src/main/sysutils.c:1636 src/main/sysutils.c:1644 src/main/sysutils.c:1647
+#: src/main/sysutils.c:1586
+#: src/main/sysutils.c:1594
+#: src/main/sysutils.c:1597
 msgid "unable to set R_SESSION_TMPDIR"
 msgstr "не могу установить R_SESSION_TMPDIR"
 
-#: src/main/sysutils.c:1656
+#: src/main/sysutils.c:1606
 msgid "cannot allocate 'R_TempDir'"
 msgstr "не могу разместить 'R_TempDir'"
 
-#: src/main/sysutils.c:1693
+#: src/main/sysutils.c:1643
 msgid "temporary name too long"
 msgstr "временное имя слишком длинное"
 
-#: src/main/sysutils.c:1708
+#: src/main/sysutils.c:1658
 msgid "cannot find unused tempfile name"
 msgstr "не могу найти неиспользованное имя временного файла"
 
-#: src/main/sysutils.c:1711
+#: src/main/sysutils.c:1661
 msgid "allocation failed in R_tmpnam2"
 msgstr "размещение в R_tmpnam2 не удалось"
 
-#: src/main/sysutils.c:1838
+#: src/main/sysutils.c:1788
 msgid "'dirmark = TRUE' is not supported on this platform"
 msgstr "'dirmarke = TRUE' не поддерживается на этой платформе"
 
-#: src/main/unique.c:321 src/main/unique.c:324
+#: src/main/unique.c:321
+#: src/main/unique.c:324
 #, c-format
 msgid "length %d is too large for hashing"
 msgstr "длина %d слишком велика для хеширования"
 
-#: src/main/unique.c:490 src/main/unique.c:519 src/main/unique.c:549
-#: src/main/unique.c:575 src/main/unique.c:614
+#: src/main/unique.c:490
+#: src/main/unique.c:519
+#: src/main/unique.c:549
+#: src/main/unique.c:573
+#: src/main/unique.c:612
 msgid "'duplicated' applies only to vectors"
 msgstr "'duplicated' применима только к векторам"
 
-#: src/main/unique.c:619
+#: src/main/unique.c:617
 msgid "any_duplicated3(., <0-length incomp>)"
 msgstr "any_duplicated3(., <0-length incomp>)"
 
-#: src/main/unique.c:669
+#: src/main/unique.c:667
 msgid "'fromLast' must be length 1"
 msgstr "'fromLast' должен быть единичной длины"
 
-#: src/main/unique.c:672
+#: src/main/unique.c:670
 msgid "'fromLast' must be TRUE or FALSE"
 msgstr "'fromLast' должен быть TRUE или FALSE"
 
-#: src/main/unique.c:683
+#: src/main/unique.c:681
 #, c-format
 msgid "%s() applies only to vectors"
 msgstr "'%s()' применима только к векторам"
 
-#: src/main/unique.c:690
+#: src/main/unique.c:688
 msgid "'nmax' must be positive"
 msgstr "'nmax' должно иметь положительную длину"
 
-#: src/main/unique.c:922
+#: src/main/unique.c:925
 msgid "'match' requires vector arguments"
 msgstr "'match' требует векторных аргументов"
 
-#: src/main/unique.c:970 src/main/unique.c:1125
+#: src/main/unique.c:973
+#: src/main/unique.c:1111
 msgid "argument is not of mode character"
 msgstr "аргумент не является текстом"
 
-#: src/main/unique.c:1251
+#: src/main/unique.c:1236
 msgid "... used in a situation where it does not exist"
 msgstr "... используется в ситуации, где его не существует"
 
-#: src/main/unique.c:1342
-msgid "unable to find a closure from within which 'match.call' was called"
-msgstr "не могу найти вложение из которого вызвано 'match.call'"
+#: src/main/unique.c:1242
+msgid "... is not a pairlist"
+msgstr "... не лист пар"
 
-#: src/main/unique.c:1536
+#: src/main/unique.c:1471
 msgid "non-numeric data frame in rowsum"
 msgstr "нечисловая таблица данных в 'rowsum'"
 
-#: src/main/unique.c:1568
+#: src/main/unique.c:1503
 msgid "this cannot happen"
 msgstr "это не может произойти"
 
-#: src/main/unique.c:1639
+#: src/main/unique.c:1574
 msgid "'names' must be a character vector"
 msgstr "'names' должны быть текстовым вектором"
 
-#: src/main/unique.c:1643
-msgid "'sep' must be a character string"
-msgstr "'sep' должен быть текстовой строкой"
-
-#: src/main/util.c:88 src/main/util.c:106
+#: src/main/util.c:87
+#: src/main/util.c:105
 msgid "object is not a matrix"
 msgstr "объект не является матрицей"
 
-#: src/main/util.c:254 src/main/util.c:268 src/main/util.c:285
+#: src/main/util.c:303
+#: src/main/util.c:315
+#: src/main/util.c:326
+#: src/main/util.c:341
 #, c-format
 msgid "type %d is unimplemented in '%s'"
 msgstr "тип %d не реализован в '%s'"
 
-#: src/main/util.c:297
+#: src/main/util.c:352
 #, c-format
 msgid "unimplemented type '%s' in '%s'\n"
 msgstr "нереализованный тип '%s' в '%s'\n"
 
-#: src/main/util.c:299
+#: src/main/util.c:354
 #, c-format
 msgid "unimplemented type (%d) in '%s'\n"
 msgstr "нереализованный  тип (%d) в '%s'\n"
 
-#: src/main/util.c:424
+#: src/main/util.c:479
 msgid "invalid tag in name extraction"
 msgstr "неправильный ярлык при выделении имени"
 
-#: src/main/util.c:434
+#: src/main/util.c:489
 #, c-format
 msgid "%d argument passed to .Internal(%s) which requires %d"
 msgid_plural "%d arguments passed to .Internal(%s) which requires %d"
@@ -6220,7 +6985,7 @@ msgstr[0] "%d аргумент передан в .Internal(%s), а требуе
 msgstr[1] "%d аргумента переданы в .Internal(%s), а требуется %d"
 msgstr[2] "%d аргументов переданы в .Internal(%s), а требуется %d"
 
-#: src/main/util.c:440
+#: src/main/util.c:495
 #, c-format
 msgid "%d argument passed to '%s' which requires %d"
 msgid_plural "%d arguments passed to '%s' which requires %d"
@@ -6228,99 +6993,117 @@ msgstr[0] "%d аргумент передан '%s', а требуется %d"
 msgstr[1] "%d аргумента переданы '%s', а требуется %d"
 msgstr[2] "%d аргументов переданы '%s', а требуется %d"
 
-#: src/main/util.c:455
+#: src/main/util.c:510
 #, c-format
 msgid "supplied argument name '%s' does not match '%s'"
 msgstr "предложенное имя аргумента '%s' не соответствует '%s'"
 
-#: src/main/util.c:465
+#: src/main/util.c:520
 #, c-format
 msgid "'nthcdr' list shorter than %d"
 msgstr "список 'nthcdr' короче, чем %d"
 
-#: src/main/util.c:470
+#: src/main/util.c:525
 msgid "'nthcdr' needs a list to CDR down"
 msgstr "'nthcdr' нужен список для выполнения CDR"
 
-#: src/main/util.c:586
+#: src/main/util.c:641
 msgid "'all.x' must be TRUE or FALSE"
 msgstr "'all.x' должно быть TRUE или FALSE"
 
-#: src/main/util.c:588
+#: src/main/util.c:643
 msgid "'all.y' must be TRUE or FALSE"
 msgstr "'all.y' должно быть TRUE или FALSE"
 
-#: src/main/util.c:700
+#: src/main/util.c:668
+msgid "number of rows in the result exceeds maximum vector length"
+msgstr "количество строк в результате превышает максимальную длину вектора"
+
+#: src/main/util.c:760
 msgid "missing value is invalid"
 msgstr "неправильное пропущенное значение"
 
-#: src/main/util.c:709 src/main/util.c:716
+#: src/main/util.c:769
+#: src/main/util.c:776
 msgid "cannot change working directory"
 msgstr "невозможно сменить рабочий каталог"
 
-#: src/main/util.c:735 src/main/util.c:769 src/main/util.c:810
-#: src/main/util.c:852 src/main/util.c:981 src/main/util.c:1040
-#: src/main/util.c:1063
+#: src/main/util.c:796
+#: src/main/util.c:830
+#: src/main/util.c:871
+#: src/main/util.c:913
+#: src/main/util.c:1042
+#: src/main/util.c:1101
+#: src/main/util.c:1124
 msgid "a character vector argument expected"
 msgstr "нужен аргумент -- текстовый вектор"
 
-#: src/main/util.c:742 src/main/util.c:777 src/main/util.c:819
-#: src/main/util.c:860
+#: src/main/util.c:803
+#: src/main/util.c:838
+#: src/main/util.c:880
+#: src/main/util.c:921
 msgid "path too long"
 msgstr "слишком длинный путь"
 
-#: src/main/util.c:995
+#: src/main/util.c:1056
 msgid "only the first character of 'quote' will be used"
 msgstr "будет использован только первый символ 'quote'"
 
-#: src/main/util.c:1065
+#: src/main/util.c:1126
 msgid "a character vector 'value' expected"
 msgstr "ожидается текстовый вектор 'value'"
 
-#: src/main/util.c:1068
+#: src/main/util.c:1129
 msgid "'value' must be of positive length"
 msgstr "'value' должно иметь положительную длину"
 
-#: src/main/util.c:1197 src/main/util.c:1205
+#: src/main/util.c:1258
+#: src/main/util.c:1266
 #, c-format
 msgid "invalid input '%s' in 'utf8towcs'"
 msgstr "неправильный ввод '%s' в 'utf8towcs'"
 
-#: src/main/util.c:1290
+#: src/main/util.c:1351
 #, c-format
 msgid "invalid multibyte string at '%s'"
 msgstr "неправильная многобайтная строка в '%s'"
 
-#: src/main/util.c:1399
+#: src/main/util.c:1493
 msgid "error message truncated to 255 chars"
 msgstr "сообщение об ошибке сокращено до 255 символов"
 
-#: src/main/util.c:1412
+#: src/main/util.c:1506
 msgid "warning message truncated to 255 chars"
 msgstr "предупреждающее сообщение сокращено до 255 символов"
 
-#: src/main/util.c:1819
+#: src/main/util.c:1655
+#, c-format
+msgid "accuracy loss in conversion from \"%s\" to numeric"
+msgstr "потеря точности при конвертации \"%s\" в число"
+
+#: src/main/util.c:1965
 msgid "all arguments must be named"
 msgstr "все аргументы должны быть именованы"
 
-#: src/main/util.c:1893
+#: src/main/util.c:2085
 msgid "ICU is not supported on this build"
 msgstr "ICU не поддерживается в этой сборке"
 
-#: src/main/util.c:1954
+#: src/main/util.c:2152
 msgid "'breaks' is not sorted"
 msgstr "'breaks' не сортированы"
 
-#: src/main/util.c:1988 src/main/util.c:2034
+#: src/main/util.c:2186
+#: src/main/util.c:2232
 #, c-format
 msgid "long vector '%s' is not supported"
 msgstr "длинный вектор '%s' не поддерживается"
 
-#: src/main/util.c:2087
+#: src/main/util.c:2285
 msgid "'eps.correct' must be 0, 1, or 2"
 msgstr "'eps.correct' должен быть 0, 1, or 2"
 
-#: src/main/util.c:2115
+#: src/main/util.c:2313
 msgid "'x' must be a vector"
 msgstr "'x' должен быть вектором"
 
@@ -6361,14 +7144,6 @@ msgstr ""
 "Введите 'q()', чтобы выйти из R.\n"
 "\n"
 
-#: src/main/vfonts.c:50
-msgid "vfont routines cannot be accessed in module"
-msgstr "средства 'vfont' не доступны в модуле"
-
-#: src/main/vfonts.c:67 src/main/vfonts.c:80 src/main/vfonts.c:98
-msgid "Hershey fonts cannot be loaded"
-msgstr "шрифты 'Hershey' не могут быть загружены"
-
 #: src/main/xspline.c:60
 #, c-format
 msgid "add_point - reached MAXNUMPTS (%d)"
@@ -6390,7 +7165,8 @@ msgstr "тут должно быть по крайней мере 4 контро
 msgid "There must be at least three control points"
 msgstr "Тут должно быть по крайней мере 3 контрольных точки"
 
-#: src/modules/X11/dataentry.c:1871 src/modules/X11/devX11.c:1246
+#: src/modules/X11/dataentry.c:1874
+#: src/modules/X11/devX11.c:1246
 #, c-format
 msgid "X11 protocol error: %s"
 msgstr "ошибка протокола X11: %s"
@@ -6434,139 +7210,132 @@ msgid "X11 font %s, face %d at size %d could not be loaded"
 msgstr "X11 шрифт %s, начертания %d и размера %d нельзя загрузить"
 
 #: src/modules/X11/devX11.c:1130
-msgid ""
-"semi-transparency is not supported on this device: reported only once per "
-"page"
-msgstr ""
-"полупрозрачность не поддерживается этим устройством: сообщается раз на "
-"страницу"
+msgid "semi-transparency is not supported on this device: reported only once per page"
+msgstr "полупрозрачность не поддерживается этим устройством: сообщается раз на страницу"
 
 #: src/modules/X11/devX11.c:1254
 #, c-format
 msgid "X11 I/O error while opening X11 connection to '%s'"
 msgstr "X11 ошибка ввода/вывода в момент открытия соединения X11 с '%s'"
 
-#: src/modules/X11/devX11.c:1272
+#: src/modules/X11/devX11.c:1271
 msgid "X11 fatal IO error: please save work and shut down R"
 msgstr "фатальная ошибка X11 IO: пожалуйста, сохраните работу и закройте R"
 
-#: src/modules/X11/devX11.c:1328
+#: src/modules/X11/devX11.c:1326
 msgid "locale not supported by Xlib: some X ops will operate in C locale"
-msgstr ""
-"локаль не поддерживается 'Xlib': некоторые операции X будут происходить на "
-"локали C"
+msgstr "локаль не поддерживается 'Xlib': некоторые операции X будут происходить на локали C"
 
-#: src/modules/X11/devX11.c:1329
+#: src/modules/X11/devX11.c:1327
 msgid "X cannot set locale modifiers"
 msgstr "X не может установить модификаторы локали"
 
-#: src/modules/X11/devX11.c:1333
+#: src/modules/X11/devX11.c:1331
 msgid "no png support in this version of R"
 msgstr "в этой версии R нет поддержки PNG"
 
-#: src/modules/X11/devX11.c:1339
+#: src/modules/X11/devX11.c:1337
 msgid "filename too long in png() call"
 msgstr "слишком длинное имя файла в 'png()'"
 
-#: src/modules/X11/devX11.c:1343
+#: src/modules/X11/devX11.c:1341
 #, c-format
 msgid "could not open PNG file '%s'"
 msgstr "не могу открыть PNG-файл '%s'"
 
-#: src/modules/X11/devX11.c:1355
+#: src/modules/X11/devX11.c:1353
 msgid "no jpeg support in this version of R"
 msgstr "в этой версии R нет поддержки JPEG"
 
-#: src/modules/X11/devX11.c:1365
+#: src/modules/X11/devX11.c:1363
 msgid "filename too long in jpeg() call"
 msgstr "слишком длинное имя файла в 'jpeg()'"
 
-#: src/modules/X11/devX11.c:1369
+#: src/modules/X11/devX11.c:1367
 #, c-format
 msgid "could not open JPEG file '%s'"
 msgstr "не могу открыть JPEG-файл '%s'"
 
-#: src/modules/X11/devX11.c:1381
+#: src/modules/X11/devX11.c:1379
 msgid "no tiff support in this version of R"
 msgstr "в этой версии R нет поддержки TIFF"
 
-#: src/modules/X11/devX11.c:1389
+#: src/modules/X11/devX11.c:1387
 msgid "filename too long in tiff() call"
 msgstr "слишком длинное имя файла в 'tiff()'"
 
-#: src/modules/X11/devX11.c:1401
+#: src/modules/X11/devX11.c:1399
 msgid "filename too long in bmp() call"
 msgstr "слишком длинное имя файла в 'bmp()'"
 
-#: src/modules/X11/devX11.c:1405
+#: src/modules/X11/devX11.c:1403
 #, c-format
 msgid "could not open BMP file '%s'"
 msgstr "не могу открыть BMP-файл '%s'"
 
-#: src/modules/X11/devX11.c:1435
+#: src/modules/X11/devX11.c:1433
 #, c-format
 msgid "unable to open connection to X11 display '%s'"
 msgstr "не могу открыть соединение с экраном X11 '%s'"
 
-#: src/modules/X11/devX11.c:1445
+#: src/modules/X11/devX11.c:1443
 msgid "ignoring 'display' argument as an X11 device is already open"
 msgstr "пропускаю аргумент 'display', поскольку устройство X11 уже открыто"
 
-#: src/modules/X11/devX11.c:1451
+#: src/modules/X11/devX11.c:1449
 msgid "cairo-based types may only work correctly on TrueColor visuals"
-msgstr ""
-"основанные на cairo типы работают правильно только на устройствах TrueColor"
+msgstr "основанные на cairo типы работают правильно только на устройствах TrueColor"
 
-#: src/modules/X11/devX11.c:1461
+#: src/modules/X11/devX11.c:1459
 msgid "jpeg() does not support transparency: using white bg"
 msgstr "'jpeg()' не поддерживает прозрачность: использую белый цвет фона"
 
-#: src/modules/X11/devX11.c:1566
+#: src/modules/X11/devX11.c:1564
 #, c-format
 msgid "unable to obtain information on display '%s'"
 msgstr "не могу получить информацию с экрана '%s'"
 
-#: src/modules/X11/devX11.c:1584
+#: src/modules/X11/devX11.c:1582
 msgid "unable to create X11 window"
 msgstr "не могу создать окно X11"
 
-#: src/modules/X11/devX11.c:1719
+#: src/modules/X11/devX11.c:1717
 #, c-format
 msgid "'width=%d, height=%d' are unlikely values in pixels"
 msgstr "'width=%d, height=%d' непохожи на значения, заданные в пикселях"
 
-#: src/modules/X11/devX11.c:1724
+#: src/modules/X11/devX11.c:1722
 msgid "unable to create pixmap"
 msgstr "не могу создать 'pixmap'"
 
-#: src/modules/X11/devX11.c:1755
+#: src/modules/X11/devX11.c:1753
 msgid "invalid font specification"
 msgstr "неправильное указание шрифта"
 
-#: src/modules/X11/devX11.c:1795
+#: src/modules/X11/devX11.c:1793
 msgid "font family not found in X11 font database"
 msgstr "семейство шрифтов не найдено в шрифтовой базе данных X11"
 
-#: src/modules/X11/devX11.c:1834
+#: src/modules/X11/devX11.c:1832
 #, c-format
 msgid "invalid use of %d < 0 in '%s'"
 msgstr "неправильное использование %d < 0 в '%s'"
 
-#: src/modules/X11/devX11.c:1955
+#: src/modules/X11/devX11.c:1953
 #, c-format
 msgid "could not open file '%s'"
 msgstr "не могу открыть файл '%s'"
 
-#: src/modules/X11/devX11.c:2185
+#: src/modules/X11/devX11.c:2183
 #, c-format
 msgid "%s not available for this device"
 msgstr "%s недоступен на этом устройстве"
 
-#: src/modules/X11/devX11.c:2330
+#: src/modules/X11/devX11.c:2328
 msgid "Unable to create XImage"
 msgstr "Не могу создать XImage"
 
-#: src/modules/X11/devX11.c:2529
+#: src/modules/X11/devX11.c:2527
 msgid "attempt to use the locator after dev.hold()"
 msgstr "попытка использовать locator после dev.hold()"
 
@@ -6613,125 +7382,174 @@ msgstr "не могу связаться с экраном X11"
 msgid "clipboard cannot be read (error code %d)"
 msgstr "буфер обмена нельзя прочесть (код ошибки %d)"
 
-#: src/modules/X11/devX11.c:3397
+#: src/modules/X11/devX11.c:3402
 msgid "cannot allocate memory for X11Routines structure"
 msgstr "не могу разместить память для структуры 'X11Routines'"
 
-#: src/modules/internet/internet.c:188 src/modules/internet/internet.c:192
-#: src/modules/internet/internet.c:198 src/modules/internet/internet.c:210
+#: src/modules/internet/internet.c:113
+msgid "for https:// URLs use setInternet2(TRUE)"
+msgstr "для https:// URLs используйте setInternet2(TRUE)"
+
+#: src/modules/internet/internet.c:348
+#: src/modules/internet/internet.c:352
+#: src/modules/internet/internet.c:357
+#: src/modules/internet/internet.c:381
+#: src/modules/internet/libcurl.c:655
+#: src/modules/internet/libcurl.c:659
+#: src/modules/internet/libcurl.c:665
+#: src/modules/internet/libcurl.c:677
+#: src/modules/internet/libcurl.c:685
 msgid "allocation of url connection failed"
 msgstr "выделение url-соединения не удалось"
 
-#: src/modules/internet/internet.c:286
+#: src/modules/internet/internet.c:455
 msgid "only first element of 'url' argument used"
 msgstr "использован только первый элемент аргумента 'url'"
 
-#: src/modules/internet/internet.c:292
+#: src/modules/internet/internet.c:461
 msgid "only first element of 'destfile' argument used"
 msgstr "использован только первый элемент аргумента 'destfile'"
 
-#: src/modules/internet/internet.c:317
+#: src/modules/internet/internet.c:479
+#: src/modules/internet/libcurl.c:367
 msgid "Download progress"
 msgstr "Процент загрузки"
 
-#: src/modules/internet/internet.c:339
+#: src/modules/internet/internet.c:501
 #, c-format
 msgid "cannot open URL '%s', reason '%s'"
 msgstr "не могу открыть URL '%s' по причине '%s'"
 
-#: src/modules/internet/internet.c:346 src/modules/internet/internet.c:372
-#: src/modules/internet/internet.c:474
+#: src/modules/internet/internet.c:508
+#: src/modules/internet/internet.c:536
+#: src/modules/internet/internet.c:661
+#: src/modules/internet/libcurl.c:408
 #, c-format
 msgid "cannot open destfile '%s', reason '%s'"
 msgstr "не могу открыть файл назначения '%s' по причине '%s'"
 
-#: src/modules/internet/internet.c:377 src/modules/internet/internet.c:479
+#: src/modules/internet/internet.c:541
+#: src/modules/internet/internet.c:666
+#: src/modules/internet/libcurl.c:412
 #, c-format
 msgid "trying URL '%s'\n"
 msgstr "пробую URL '%s'\n"
 
-#: src/modules/internet/internet.c:384 src/modules/internet/internet.c:486
-msgid "opened URL\n"
-msgstr "открытие URL\n"
-
-#: src/modules/internet/internet.c:455 src/modules/internet/internet.c:560
+#: src/modules/internet/internet.c:640
+#: src/modules/internet/internet.c:751
+#: src/modules/internet/libcurl.c:460
 #, c-format
-msgid "downloaded length %d != reported length %d"
-msgstr "загруженный размер %d != сообщенному размеру %d"
+msgid "downloaded length %0.f != reported length %0.f"
+msgstr "загруженный размер %0.f != сообщенному размеру %0.f"
 
-#: src/modules/internet/internet.c:460 src/modules/internet/internet.c:565
+#: src/modules/internet/internet.c:645
+#: src/modules/internet/internet.c:756
 #, c-format
 msgid "cannot open URL '%s'"
 msgstr "не могу открыть URL '%s'"
 
-#: src/modules/internet/internet.c:593 src/modules/internet/internet.c:828
+#: src/modules/internet/internet.c:760
+msgid "unsupported URL scheme"
+msgstr "не поддерживаемая схема URL"
+
+#: src/modules/internet/internet.c:783
+#: src/modules/internet/internet.c:949
 #, c-format
 msgid "cannot open: HTTP status was '%d %s'"
 msgstr "не могу открыть: статус HTTP был '%d %s'"
 
-#: src/modules/internet/internet.c:772 src/modules/internet/internet.c:935
-msgid "InternetOpenUrl timed out"
-msgstr "тайм-аут 'InternetOpenUrl'"
-
-#: src/modules/internet/internet.c:799 src/modules/internet/internet.c:813
-#: src/modules/internet/internet.c:957 src/modules/internet/internet.c:966
+#: src/modules/internet/internet.c:920
+#: src/modules/internet/internet.c:934
+#: src/modules/internet/internet.c:1021
+#: src/modules/internet/internet.c:1030
 #, c-format
 msgid "InternetOpenUrl failed: '%s'"
 msgstr "'InternetOpenUrl' не удалось: '%s'"
 
-#: src/modules/internet/internet.c:870
-msgid "Internet read timed out"
-msgstr "тайм-аут чтения из Internet"
+#: src/modules/internet/libcurl.c:142
+msgid "curlGetHeaders is not supported on this platform"
+msgstr "curlGetHeaders не поддерживается на этой платформе"
 
-#: src/modules/internet/nanoftp.c:288 src/modules/internet/nanoftp.c:301
-#: src/modules/internet/nanoftp.c:312 src/modules/internet/nanoftp.c:346
-#: src/modules/internet/nanoftp.c:356
+#: src/modules/internet/libcurl.c:151
+#: src/modules/internet/libcurl.c:154
+#, c-format
+msgid "invalid %s argument"
+msgstr "неправильный аргумент %s"
+
+#: src/modules/internet/libcurl.c:171
+#, c-format
+msgid ""
+"libcurl error code %d\n"
+"\t%s\n"
+msgstr ""
+"код ошибки libcurl %d\n"
+"\t%s\n"
+
+#: src/modules/internet/libcurl.c:306
+msgid "download.file(method = \"libcurl\") is not supported on this platform"
+msgstr "download.file(method = \"libcurl\") не поддерживается на этой платформе"
+
+#: src/modules/internet/libcurl.c:322
+msgid "lengths of 'url' and 'destfile' must match"
+msgstr "длины 'url' and 'destfile' должны совпадать"
+
+#: src/modules/internet/libcurl.c:689
+msgid "url(method = \"libcurl\") is not supported on this platform"
+msgstr "url(method = \"libcurl\") не поддерживается на этой платформе"
+
+#: src/modules/internet/nanoftp.c:290
+#: src/modules/internet/nanoftp.c:303
+#: src/modules/internet/nanoftp.c:314
+#: src/modules/internet/nanoftp.c:348
+#: src/modules/internet/nanoftp.c:358
 msgid "RxmlNanoFTPScanURL: overlong (invalid?) URL"
 msgstr "RxmlNanoFTPScanURL: чересчур длинные (неправильные?) URL"
 
-#: src/modules/internet/nanoftp.c:389
+#: src/modules/internet/nanoftp.c:391
 msgid "removing FTP proxy info"
 msgstr "удаление информации FTP-прокси"
 
-#: src/modules/internet/nanoftp.c:391
+#: src/modules/internet/nanoftp.c:393
 #, c-format
 msgid "using FTP proxy '%s'"
 msgstr "использую FTP-прокси '%s'"
 
-#: src/modules/internet/nanoftp.c:402 src/modules/internet/nanoftp.c:431
+#: src/modules/internet/nanoftp.c:404
+#: src/modules/internet/nanoftp.c:433
 msgid "RxmlNanoFTPScanProxy: overlong (invalid?) URL"
 msgstr "RxmlNanoFTPScanProxy: чересчур длинные (неправильные?) URL"
 
-#: src/modules/internet/nanoftp.c:830
+#: src/modules/internet/nanoftp.c:834
 msgid "cannot resolve host"
 msgstr "не могу определить адрес хоста"
 
-#: src/modules/internet/nanoftp.c:860
+#: src/modules/internet/nanoftp.c:864
 msgid "failed to connect to server"
 msgstr "не удалось связаться с сервером"
 
-#: src/modules/internet/nanoftp.c:871
+#: src/modules/internet/nanoftp.c:875
 msgid "failed to get response from server"
 msgstr "не удалось получить ответ сервера"
 
-#: src/modules/internet/nanoftp.c:1134
+#: src/modules/internet/nanoftp.c:1138
 msgid "RxmlNanoFTPGetConnection: failed to create socket"
 msgstr "'RxmlNanoFTPGetConnection': не удалось создать сокет"
 
-#: src/modules/internet/nanoftp.c:1180
+#: src/modules/internet/nanoftp.c:1184
 msgid "failed to create a data connection"
 msgstr "не удалось создать соединение с данными"
 
-#: src/modules/internet/nanoftp.c:1188
+#: src/modules/internet/nanoftp.c:1192
 msgid "failed to bind a port"
 msgstr "не удалось привязать порт"
 
-#: src/modules/internet/nanoftp.c:1195
+#: src/modules/internet/nanoftp.c:1199
 #, c-format
 msgid "could not listen on port %d"
 msgstr "не могу прослушать порт %d"
 
-#: src/modules/internet/nanohttp.c:370 src/modules/internet/nanohttp.c:398
+#: src/modules/internet/nanohttp.c:370
+#: src/modules/internet/nanohttp.c:398
 #: src/modules/internet/nanohttp.c:407
 msgid "RxmlNanoHTTPScanURL: overlong (invalid?) URL"
 msgstr "RxmlNanoHTTPScanURL: чересчур длинные (неправильные?) URL"
@@ -6745,40 +7563,44 @@ msgstr "удаление информации HTTP-прокси"
 msgid "using HTTP proxy '%s'"
 msgstr "использую HTTP-прокси '%s'"
 
-#: src/modules/internet/nanohttp.c:454 src/modules/internet/nanohttp.c:490
+#: src/modules/internet/nanohttp.c:454
+#: src/modules/internet/nanohttp.c:490
 msgid "RxmlNanoHTTPScanProxy: overlong (invalid?) URL"
 msgstr "RxmlNanoHTTPScanProxy: чересчур длинные (неправильные?) URL"
 
-#: src/modules/internet/nanohttp.c:1107
+#: src/modules/internet/nanohttp.c:1124
 #, c-format
 msgid "unable to resolve '%s'"
 msgstr "не могу разрешить '%s'"
 
-#: src/modules/internet/nanohttp.c:1134
+#: src/modules/internet/nanohttp.c:1157
 #, c-format
 msgid "connected to '%s' on port %d."
 msgstr "соединение с '%s' через порт %d."
 
-#: src/modules/internet/nanohttp.c:1139
+#: src/modules/internet/nanohttp.c:1162
 #, c-format
 msgid "unable to connect to '%s' on port %d."
 msgstr "не могу соединиться с '%s' через порт %d."
 
-#: src/modules/internet/nanohttp.c:1443
+#: src/modules/internet/nanohttp.c:1466
 #, c-format
 msgid "redirect to: '%s'"
 msgstr "перенаправление в: '%s'"
 
-#: src/modules/internet/nanohttp.c:1454
+#: src/modules/internet/nanohttp.c:1477
 msgid "too many redirects, aborting ..."
 msgstr "слишком много перенаправлений, отключаюсь ..."
 
-#: src/modules/internet/sockconn.c:177 src/modules/internet/sockconn.c:181
-#: src/modules/internet/sockconn.c:187 src/modules/internet/sockconn.c:200
+#: src/modules/internet/sockconn.c:177
+#: src/modules/internet/sockconn.c:181
+#: src/modules/internet/sockconn.c:187
+#: src/modules/internet/sockconn.c:200
 msgid "allocation of socket connection failed"
 msgstr "не удалось размещение socket-соединения"
 
-#: src/modules/lapack/Lapack.c:48 src/modules/lapack/Lapack.c:67
+#: src/modules/lapack/Lapack.c:48
+#: src/modules/lapack/Lapack.c:67
 #, c-format
 msgid "argument type[1]='%s' must be a character string of string length 1"
 msgstr "аргумент type[1]='%s' должен быть a текстовым вектором единичной длины"
@@ -6793,30 +7615,45 @@ msgstr "аргумент type[1]='%s' должен быть одним из 'M',
 msgid "argument type[1]='%s' must be one of '1','O', or 'I'"
 msgstr "аргумент type[1]='%s' должен быть одним из '1','O', или 'I'"
 
-#: src/modules/lapack/Lapack.c:116 src/modules/lapack/Lapack.c:123
-#: src/modules/lapack/Lapack.c:182 src/modules/lapack/Lapack.c:193
-#: src/modules/lapack/Lapack.c:275 src/modules/lapack/Lapack.c:281
-#: src/modules/lapack/Lapack.c:617 src/modules/lapack/Lapack.c:623
-#: src/modules/lapack/Lapack.c:677 src/modules/lapack/Lapack.c:684
-#: src/modules/lapack/Lapack.c:688 src/modules/lapack/Lapack.c:723
-#: src/modules/lapack/Lapack.c:730 src/modules/lapack/Lapack.c:779
-#: src/modules/lapack/Lapack.c:786 src/modules/lapack/Lapack.c:834
-#: src/modules/lapack/Lapack.c:840 src/modules/lapack/Lapack.c:894
-#: src/modules/lapack/Lapack.c:900 src/modules/lapack/Lapack.c:1134
-#: src/modules/lapack/Lapack.c:1140 src/modules/lapack/Lapack.c:1188
-#: src/modules/lapack/Lapack.c:1195 src/modules/lapack/Lapack.c:1199
-#: src/modules/lapack/Lapack.c:1227 src/modules/lapack/Lapack.c:1234
-#: src/modules/lapack/Lapack.c:1254
+#: src/modules/lapack/Lapack.c:116
+#: src/modules/lapack/Lapack.c:123
+#: src/modules/lapack/Lapack.c:182
+#: src/modules/lapack/Lapack.c:193
+#: src/modules/lapack/Lapack.c:275
+#: src/modules/lapack/Lapack.c:281
+#: src/modules/lapack/Lapack.c:617
+#: src/modules/lapack/Lapack.c:623
+#: src/modules/lapack/Lapack.c:677
+#: src/modules/lapack/Lapack.c:684
+#: src/modules/lapack/Lapack.c:688
+#: src/modules/lapack/Lapack.c:723
+#: src/modules/lapack/Lapack.c:730
+#: src/modules/lapack/Lapack.c:779
+#: src/modules/lapack/Lapack.c:786
+#: src/modules/lapack/Lapack.c:834
+#: src/modules/lapack/Lapack.c:840
+#: src/modules/lapack/Lapack.c:894
+#: src/modules/lapack/Lapack.c:900
+#: src/modules/lapack/Lapack.c:1135
+#: src/modules/lapack/Lapack.c:1141
+#: src/modules/lapack/Lapack.c:1189
+#: src/modules/lapack/Lapack.c:1196
+#: src/modules/lapack/Lapack.c:1200
+#: src/modules/lapack/Lapack.c:1228
+#: src/modules/lapack/Lapack.c:1235
+#: src/modules/lapack/Lapack.c:1255
 #, c-format
 msgid "error code %d from Lapack routine '%s'"
 msgstr "ошибка с кодом %d из средства 'Lapack' '%s'"
 
-#: src/modules/lapack/Lapack.c:153 src/modules/lapack/Lapack.c:248
+#: src/modules/lapack/Lapack.c:153
+#: src/modules/lapack/Lapack.c:248
 #: src/modules/lapack/Lapack.c:874
 msgid "'x' must be a square numeric matrix"
 msgstr "'x' должен быть квадратной числовой матрицей"
 
-#: src/modules/lapack/Lapack.c:325 src/modules/lapack/Lapack.c:355
+#: src/modules/lapack/Lapack.c:325
+#: src/modules/lapack/Lapack.c:355
 #: src/modules/lapack/Lapack.c:404
 msgid "'A' must be a numeric matrix"
 msgstr "'A' должна быть числовой матрицей"
@@ -6825,8 +7662,10 @@ msgstr "'A' должна быть числовой матрицей"
 msgid "'type' must be a character string"
 msgstr "'type' должен быть текстовой строкой"
 
-#: src/modules/lapack/Lapack.c:357 src/modules/lapack/Lapack.c:405
-#: src/modules/lapack/Lapack.c:441 src/modules/lapack/Lapack.c:498
+#: src/modules/lapack/Lapack.c:357
+#: src/modules/lapack/Lapack.c:405
+#: src/modules/lapack/Lapack.c:441
+#: src/modules/lapack/Lapack.c:498
 msgid "'norm' must be a character string"
 msgstr "'norm' должен быть текстовой строкой"
 
@@ -6845,7 +7684,8 @@ msgstr "точная сингулярность: U[%d,%d] = 0 в LU-разлож
 msgid "error [%d] from Lapack 'dgecon()'"
 msgstr "ошибка [%d] в Lapack функции 'dgecon()'"
 
-#: src/modules/lapack/Lapack.c:414 src/modules/lapack/Lapack.c:446
+#: src/modules/lapack/Lapack.c:414
+#: src/modules/lapack/Lapack.c:446
 #: src/modules/lapack/Lapack.c:504
 msgid "'A' must be a *square* matrix"
 msgstr "'A' должна быть *квадратной* матрицей"
@@ -6855,11 +7695,13 @@ msgstr "'A' должна быть *квадратной* матрицей"
 msgid "error [%d] from Lapack 'dtrcon()'"
 msgstr "ошибка [%d] в Lapack функции 'dtrcon()'"
 
-#: src/modules/lapack/Lapack.c:443 src/modules/lapack/Lapack.c:500
+#: src/modules/lapack/Lapack.c:443
+#: src/modules/lapack/Lapack.c:500
 msgid "'A' must be a complex matrix"
 msgstr "'A' должна быть комплексной матрицей"
 
-#: src/modules/lapack/Lapack.c:465 src/modules/lapack/Lapack.c:472
+#: src/modules/lapack/Lapack.c:465
+#: src/modules/lapack/Lapack.c:472
 #, c-format
 msgid "error [%d] from Lapack 'zgetrf()'"
 msgstr "ошибка [%d] в Lapack функции 'zgetrf()'"
@@ -6869,10 +7711,14 @@ msgstr "ошибка [%d] в Lapack функции 'zgetrf()'"
 msgid "error [%d] from Lapack 'zgecon()'"
 msgstr "ошибка [%d] в Lapack функции 'zgecon()'"
 
-#: src/modules/lapack/Lapack.c:484 src/modules/lapack/Lapack.c:519
-#: src/modules/lapack/Lapack.c:588 src/modules/lapack/Lapack.c:648
-#: src/modules/lapack/Lapack.c:692 src/modules/lapack/Lapack.c:734
-#: src/modules/lapack/Lapack.c:800 src/modules/lapack/Lapack.c:857
+#: src/modules/lapack/Lapack.c:484
+#: src/modules/lapack/Lapack.c:519
+#: src/modules/lapack/Lapack.c:588
+#: src/modules/lapack/Lapack.c:648
+#: src/modules/lapack/Lapack.c:692
+#: src/modules/lapack/Lapack.c:734
+#: src/modules/lapack/Lapack.c:800
+#: src/modules/lapack/Lapack.c:857
 #: src/modules/lapack/Lapack.c:917
 msgid "Fortran complex functions are not available on this platform"
 msgstr "комплексные функции Fortran на этой платформе недоступны"
@@ -6882,50 +7728,60 @@ msgstr "комплексные функции Fortran на этой платфо
 msgid "error [%d] from Lapack 'ztrcon()'"
 msgstr "ошибка [%d] в Lapack функции 'ztrcon()'"
 
-#: src/modules/lapack/Lapack.c:532 src/modules/lapack/Lapack.c:602
+#: src/modules/lapack/Lapack.c:532
+#: src/modules/lapack/Lapack.c:602
 msgid "'a' must be a complex matrix"
 msgstr "'a' должен быть комплексной матрицей"
 
-#: src/modules/lapack/Lapack.c:535 src/modules/lapack/Lapack.c:1042
+#: src/modules/lapack/Lapack.c:535
+#: src/modules/lapack/Lapack.c:1043
 msgid "'a' is 0-diml"
 msgstr "'a' является 0-мерной"
 
-#: src/modules/lapack/Lapack.c:537 src/modules/lapack/Lapack.c:1044
+#: src/modules/lapack/Lapack.c:537
+#: src/modules/lapack/Lapack.c:1045
 #, c-format
 msgid "'a' (%d x %d) must be square"
 msgstr "'a' (%d x %d) должна быть квадратной"
 
-#: src/modules/lapack/Lapack.c:543 src/modules/lapack/Lapack.c:1050
+#: src/modules/lapack/Lapack.c:543
+#: src/modules/lapack/Lapack.c:1051
 msgid "no right-hand side in 'b'"
 msgstr "у 'b' нет правой стороны"
 
-#: src/modules/lapack/Lapack.c:546 src/modules/lapack/Lapack.c:560
-#: src/modules/lapack/Lapack.c:1053 src/modules/lapack/Lapack.c:1069
+#: src/modules/lapack/Lapack.c:546
+#: src/modules/lapack/Lapack.c:560
+#: src/modules/lapack/Lapack.c:1054
+#: src/modules/lapack/Lapack.c:1070
 #, c-format
 msgid "'b' (%d x %d) must be compatible with 'a' (%d x %d)"
 msgstr "'b' (%d x %d) должна быть совместима с 'a' (%d x %d)"
 
-#: src/modules/lapack/Lapack.c:581 src/modules/lapack/Lapack.c:948
-#: src/modules/lapack/Lapack.c:962 src/modules/lapack/Lapack.c:1017
-#: src/modules/lapack/Lapack.c:1091
+#: src/modules/lapack/Lapack.c:581
+#: src/modules/lapack/Lapack.c:948
+#: src/modules/lapack/Lapack.c:962
+#: src/modules/lapack/Lapack.c:1018
+#: src/modules/lapack/Lapack.c:1092
 #, c-format
 msgid "argument %d of Lapack routine %s had invalid value"
 msgstr "аргумент %d функции 'Lapack' %s имеет неправильное значение"
 
-#: src/modules/lapack/Lapack.c:662 src/modules/lapack/Lapack.c:707
+#: src/modules/lapack/Lapack.c:662
+#: src/modules/lapack/Lapack.c:707
 msgid "'b' must be a complex matrix"
 msgstr "'b' должен быть комплексной матрицей"
 
-#: src/modules/lapack/Lapack.c:670 src/modules/lapack/Lapack.c:716
-#: src/modules/lapack/Lapack.c:1181 src/modules/lapack/Lapack.c:1220
+#: src/modules/lapack/Lapack.c:670
+#: src/modules/lapack/Lapack.c:716
+#: src/modules/lapack/Lapack.c:1182
+#: src/modules/lapack/Lapack.c:1221
 #, c-format
 msgid "right-hand side should have %d not %d rows"
 msgstr "правая сторона должна иметь %d, а не %d строк"
 
 #: src/modules/lapack/Lapack.c:743
-#, fuzzy
 msgid "'jobu' must be a character string"
-msgstr "'norm' должен быть текстовой строкой"
+msgstr "'jobu' должен быть текстовой строкой"
 
 #: src/modules/lapack/Lapack.c:751
 msgid "matrices of 2^31 or more elements are not supported"
@@ -6935,13 +7791,16 @@ msgstr "матрицы из 2^31 и более элементов не подд
 msgid "'x' must be a square complex matrix"
 msgstr "'x' должен быть квадратной комплексной матрицей"
 
-#: src/modules/lapack/Lapack.c:926 src/modules/lapack/Lapack.c:1000
-#: src/modules/lapack/Lapack.c:1039 src/modules/lapack/Lapack.c:1114
-#: src/modules/lapack/Lapack.c:1245
+#: src/modules/lapack/Lapack.c:926
+#: src/modules/lapack/Lapack.c:1001
+#: src/modules/lapack/Lapack.c:1040
+#: src/modules/lapack/Lapack.c:1115
+#: src/modules/lapack/Lapack.c:1246
 msgid "'a' must be a numeric matrix"
 msgstr "'a' должен быть числовой матрицей"
 
-#: src/modules/lapack/Lapack.c:933 src/modules/lapack/Lapack.c:1250
+#: src/modules/lapack/Lapack.c:933
+#: src/modules/lapack/Lapack.c:1251
 msgid "'a' must be a square matrix"
 msgstr "'a' должна быть квадратной матрицей"
 
@@ -6958,42 +7817,41 @@ msgstr "ведущий минор порядка %d не является пол
 msgid "the matrix is either rank-deficient or indefinite"
 msgstr "матрица или недостаточного ранга или неопределенная"
 
-#: src/modules/lapack/Lapack.c:987
+#: src/modules/lapack/Lapack.c:988
 msgid "'size' argument must be a positive integer"
 msgstr "аргумент 'size' должен быть положительным целым числом"
 
-#: src/modules/lapack/Lapack.c:1002
+#: src/modules/lapack/Lapack.c:1003
 #, c-format
 msgid "'size' cannot exceed ncol(x) = %d"
 msgstr "'size' не может превышать 'ncol(x)' = %d"
 
-#: src/modules/lapack/Lapack.c:1003
+#: src/modules/lapack/Lapack.c:1004
 #, c-format
 msgid "'size' cannot exceed nrow(x) = %d"
 msgstr "'size' не может превышать nrow(x) = %d"
 
-#: src/modules/lapack/Lapack.c:1015
+#: src/modules/lapack/Lapack.c:1016
 #, c-format
 msgid "element (%d, %d) is zero, so the inverse cannot be computed"
 msgstr "элемент (%d, %d) нулевой, поэтому обратный нельзя вычислить"
 
-#: src/modules/lapack/Lapack.c:1094
+#: src/modules/lapack/Lapack.c:1095
 #, c-format
 msgid "Lapack routine %s: system is exactly singular: U[%d,%d] = 0"
 msgstr "функция Lapack %s: система в точности сингулярная: U[%d,%d] = 0"
 
-#: src/modules/lapack/Lapack.c:1102
+#: src/modules/lapack/Lapack.c:1103
 #, c-format
 msgid "system is computationally singular: reciprocal condition number = %g"
-msgstr ""
-"система вычислительно сингулярная: величина, обратная к числу "
-"обусловленности, равна %g"
+msgstr "система вычислительно сингулярная: величина, обратная к числу обусловленности, равна %g"
 
-#: src/modules/lapack/Lapack.c:1174 src/modules/lapack/Lapack.c:1212
+#: src/modules/lapack/Lapack.c:1175
+#: src/modules/lapack/Lapack.c:1213
 msgid "'b' must be a numeric matrix"
 msgstr "'b' должен быть числовой матрицей"
 
-#: src/modules/lapack/Lapack.c:1246
+#: src/modules/lapack/Lapack.c:1247
 msgid "argument 'logarithm' must be logical"
 msgstr "аргумент 'logarithm' должен быть логическим"
 
@@ -7001,28 +7859,30 @@ msgstr "аргумент 'logarithm' должен быть логическим"
 msgid "bessel_i allocation error"
 msgstr "ошибка выделения памяти в 'bessel_i'"
 
-#: src/nmath/bessel_i.c:77 src/nmath/bessel_i.c:122
+#: src/nmath/bessel_i.c:77
+#: src/nmath/bessel_i.c:122
 #, c-format
 msgid "bessel_i(%g): ncalc (=%ld) != nb (=%ld); alpha=%g. Arg. out of range?\n"
-msgstr ""
-"bessel_i(%g): ncalc (=%ld) != nb (=%ld); alpha=%g. Аргумент за пределами?\n"
+msgstr "bessel_i(%g): ncalc (=%ld) != nb (=%ld); alpha=%g. Аргумент за пределами?\n"
 
-#: src/nmath/bessel_i.c:80 src/nmath/bessel_i.c:125
+#: src/nmath/bessel_i.c:80
+#: src/nmath/bessel_i.c:125
 #, c-format
 msgid "bessel_i(%g,nu=%g): precision lost in result\n"
 msgstr "bessel_i(%g,nu=%g): потеряна точность результата\n"
 
-#: src/nmath/bessel_j.c:67
+#: src/nmath/bessel_j.c:71
 msgid "bessel_j allocation error"
 msgstr "ошибка выделения памяти в 'bessel_j'"
 
-#: src/nmath/bessel_j.c:75 src/nmath/bessel_j.c:118
+#: src/nmath/bessel_j.c:79
+#: src/nmath/bessel_j.c:125
 #, c-format
 msgid "bessel_j(%g): ncalc (=%ld) != nb (=%ld); alpha=%g. Arg. out of range?\n"
-msgstr ""
-"bessel_j(%g): ncalc (=%ld) != nb (=%ld); alpha=%g. Аргумент за пределами?\n"
+msgstr "bessel_j(%g): ncalc (=%ld) != nb (=%ld); alpha=%g. Аргумент за пределами?\n"
 
-#: src/nmath/bessel_j.c:78 src/nmath/bessel_j.c:121
+#: src/nmath/bessel_j.c:82
+#: src/nmath/bessel_j.c:128
 #, c-format
 msgid "bessel_j(%g,nu=%g): precision lost in result\n"
 msgstr "bessel_j(%g,nu=%g): потеряна точность результата\n"
@@ -7031,73 +7891,76 @@ msgstr "bessel_j(%g,nu=%g): потеряна точность результат
 msgid "bessel_k allocation error"
 msgstr "ошибка выделения памяти в 'bessel_k'"
 
-#: src/nmath/bessel_k.c:71 src/nmath/bessel_k.c:108
+#: src/nmath/bessel_k.c:71
+#: src/nmath/bessel_k.c:108
 #, c-format
 msgid "bessel_k(%g): ncalc (=%ld) != nb (=%ld); alpha=%g. Arg. out of range?\n"
-msgstr ""
-"bessel_k(%g): ncalc (=%ld) != nb (=%ld); alpha=%g. Аргумент за пределами?\n"
+msgstr "bessel_k(%g): ncalc (=%ld) != nb (=%ld); alpha=%g. Аргумент за пределами?\n"
 
-#: src/nmath/bessel_k.c:74 src/nmath/bessel_k.c:111
+#: src/nmath/bessel_k.c:74
+#: src/nmath/bessel_k.c:111
 #, c-format
 msgid "bessel_k(%g,nu=%g): precision lost in result\n"
 msgstr "bessel_k(%g,nu=%g): потеряна точность результата\n"
 
-#: src/nmath/bessel_y.c:66
+#: src/nmath/bessel_y.c:70
 msgid "bessel_y allocation error"
 msgstr "ошибка выделения памяти в 'bessel_y'"
 
-#: src/nmath/bessel_y.c:82 src/nmath/bessel_y.c:127
+#: src/nmath/bessel_y.c:86
+#: src/nmath/bessel_y.c:134
 #, c-format
 msgid "bessel_y(%g): ncalc (=%ld) != nb (=%ld); alpha=%g. Arg. out of range?\n"
-msgstr ""
-"bessel_y(%g): ncalc (=%ld) != nb (=%ld); alpha=%g. Аргумент за пределами?\n"
+msgstr "bessel_y(%g): ncalc (=%ld) != nb (=%ld); alpha=%g. Аргумент за пределами?\n"
 
-#: src/nmath/bessel_y.c:85 src/nmath/bessel_y.c:130
+#: src/nmath/bessel_y.c:89
+#: src/nmath/bessel_y.c:137
 #, c-format
 msgid "bessel_y(%g,nu=%g): precision lost in result\n"
 msgstr "bessel_y(%g,nu=%g): потеряна точность результата\n"
 
-#: src/nmath/choose.c:79 src/nmath/choose.c:122
+#: src/nmath/choose.c:79
+#: src/nmath/choose.c:122
 #, c-format
 msgid "'k' (%.2f) must be integer, rounded to %.0f"
 msgstr "'k' (%.2f) должен быть целым, округлено до %.0f"
 
-#: src/nmath/nmath.h:141
+#: src/nmath/nmath.h:143
 #, c-format
 msgid "argument out of domain in '%s'\n"
 msgstr "значение в '%s' -- за областью\n"
 
-#: src/nmath/nmath.h:144
+#: src/nmath/nmath.h:146
 #, c-format
 msgid "value out of range in '%s'\n"
 msgstr "значение в '%s' -- за пределами\n"
 
-#: src/nmath/nmath.h:147
+#: src/nmath/nmath.h:149
 #, c-format
 msgid "convergence failed in '%s'\n"
 msgstr "схождение в '%s' не удалось\n"
 
-#: src/nmath/nmath.h:150
+#: src/nmath/nmath.h:152
 #, c-format
 msgid "full precision may not have been achieved in '%s'\n"
 msgstr "полная точность в '%s' не может дыть достигнута\n"
 
-#: src/nmath/nmath.h:153
+#: src/nmath/nmath.h:155
 #, c-format
 msgid "underflow occurred in '%s'\n"
 msgstr "'%s' недозаполнен\n"
 
-#: src/nmath/pbeta.c:48
+#: src/nmath/pbeta.c:67
 #, c-format
-msgid "pbeta_raw() -> bratio() gave error code %d"
-msgstr "pbeta_raw() -> bratio() выдал ошибку с кодом %d"
+msgid "pbeta_raw(%g, a=%g, b=%g, ..) -> bratio() gave error code %d"
+msgstr "pbeta_raw(%g, a=%g, b=%g, ..) -> bratio() выдал ошибку с кодом %d"
 
 #: src/nmath/pnbinom.c:79
 #, c-format
 msgid "pnbinom_mu() -> bratio() gave error code %d"
 msgstr "pnbinom_mu() -> bratio() выдал ошибку с кодом %d"
 
-#: src/nmath/pnchisq.c:246
+#: src/nmath/pnchisq.c:292
 #, c-format
 msgid "pnchisq(x=%g, ..): not converged in %d iter."
 msgstr "pnchisq(x=%g, ..): не сошлось на %d итерации."
@@ -7121,7 +7984,9 @@ msgstr "ошибка выделения памяти в 'signrank'"
 msgid "norm_rand(): invalid N01_kind: %d\n"
 msgstr "'norm_rand()': неправильный 'N01_kind': %d\n"
 
-#: src/nmath/wilcox.c:85 src/nmath/wilcox.c:95 src/nmath/wilcox.c:148
+#: src/nmath/wilcox.c:85
+#: src/nmath/wilcox.c:95
+#: src/nmath/wilcox.c:148
 #: src/nmath/wilcox.c:313
 #, c-format
 msgid "wilcox allocation error %d"
@@ -7135,43 +8000,35 @@ msgstr "модуль X11 не доступен в этом GUI"
 msgid "X11 routines cannot be accessed in module"
 msgstr "средства X11 не доступны в модуле"
 
-#: src/unix/X11.c:78 src/unix/X11.c:90 src/unix/X11.c:102 src/unix/X11.c:113
+#: src/unix/X11.c:78
+#: src/unix/X11.c:90
+#: src/unix/X11.c:102
+#: src/unix/X11.c:113
 msgid "X11 module cannot be loaded"
 msgstr "модуль X11 нельзя загрузить"
 
-#: src/unix/X11.c:126 src/unix/X11.c:132 src/unix/X11.c:138 src/unix/X11.c:144
+#: src/unix/X11.c:144
+#: src/unix/X11.c:150
+#: src/unix/X11.c:156
+#: src/unix/X11.c:162
 msgid "X11 is not available"
 msgstr "X11 недоступен"
 
 #: src/unix/dynload.c:143
-msgid ""
-"Explicit local dynamic loading not supported on this platform. Using default."
-msgstr ""
-"Явная локальная динамическая загрузка не поддерживается на этой платформе. "
-"Использую умолчание."
+msgid "Explicit local dynamic loading not supported on this platform. Using default."
+msgstr "Явная локальная динамическая загрузка не поддерживается на этой платформе. Использую умолчание."
 
 #: src/unix/dynload.c:144
-msgid ""
-"Explicit global dynamic loading not supported on this platform. Using "
-"default."
-msgstr ""
-"Явная глобальная динамическая загрузка не поддерживается на этой платформе. "
-"Использую умолчание."
+msgid "Explicit global dynamic loading not supported on this platform. Using default."
+msgstr "Явная глобальная динамическая загрузка не поддерживается на этой платформе. Использую умолчание."
 
 #: src/unix/dynload.c:145
-msgid ""
-"Explicit non-lazy dynamic loading not supported on this platform. Using "
-"default."
-msgstr ""
-"Явная неленивая динамическая загрузка не поддерживается на этой платформе. "
-"Использую умолчание."
+msgid "Explicit non-lazy dynamic loading not supported on this platform. Using default."
+msgstr "Явная неленивая динамическая загрузка не поддерживается на этой платформе. Использую умолчание."
 
 #: src/unix/dynload.c:146
-msgid ""
-"Explicit lazy dynamic loading not supported on this platform. Using default."
-msgstr ""
-"Явная ленивая динамическая загрузка не поддерживается на этой платформе. "
-"Использую умолчание."
+msgid "Explicit lazy dynamic loading not supported on this platform. Using default."
+msgstr "Явная ленивая динамическая загрузка не поддерживается на этой платформе. Использую умолчание."
 
 #: src/unix/dynload.c:240
 msgid "cannot get working directory!"
@@ -7182,19 +8039,16 @@ msgid "interrupt handler must not return"
 msgstr "обработчик прерывания не должен возвращать"
 
 #: src/unix/sys-std.c:521
-msgid ""
-"An unusual circumstance has arisen in the nesting of readline input. Please "
-"report using bug.report()"
-msgstr ""
-"При вставке ввода 'readline' произошло нечто необычное. Пожалуйста, "
-"сообщите, используя bug.report()"
+msgid "An unusual circumstance has arisen in the nesting of readline input. Please report using bug.report()"
+msgstr "При вставке ввода 'readline' произошло нечто необычное. Пожалуйста, сообщите, используя bug.report()"
 
-#: src/unix/sys-std.c:1082 src/unix/sys-std.c:1249
+#: src/unix/sys-std.c:1085
+#: src/unix/sys-std.c:1252
 #, c-format
 msgid "problem in saving the history file '%s'"
 msgstr "проблема при сохранении файла истории '%s'"
 
-#: src/unix/sys-std.c:1156
+#: src/unix/sys-std.c:1159
 #, c-format
 msgid ""
 "Cannot open file '%s': %s\n"
@@ -7203,230 +8057,252 @@ msgstr ""
 "Не могу открыть файл '%s': %s\n"
 "\n"
 
-#: src/unix/sys-std.c:1220 src/unix/sys-std.c:1243
+#: src/unix/sys-std.c:1223
+#: src/unix/sys-std.c:1246
 msgid "'file' argument is too long"
 msgstr "аргумент 'file' слишком длинный"
 
-#: src/unix/sys-std.c:1226 src/unix/sys-std.c:1228
+#: src/unix/sys-std.c:1229
+#: src/unix/sys-std.c:1231
 msgid "no history mechanism available"
 msgstr "механизм истории недоступен"
 
-#: src/unix/sys-std.c:1255
+#: src/unix/sys-std.c:1258
 msgid "problem in truncating the history file"
 msgstr "проблема с обрезкой файла истории"
 
-#: src/unix/sys-std.c:1257 src/unix/sys-std.c:1259
+#: src/unix/sys-std.c:1260
+#: src/unix/sys-std.c:1262
 msgid "no history available to save"
 msgstr "нет истории, чтобы сохранить"
 
-#: src/unix/sys-std.c:1271
+#: src/unix/sys-std.c:1274
 msgid "invalid timestamp"
 msgstr "неправильная временная метка"
 
-#: src/unix/sys-unix.c:251
+#: src/unix/sys-unix.c:247
 msgid "non-empty character argument expected"
 msgstr "ожидается непустой текстовый аргумент"
 
-#: src/unix/sys-unix.c:254
+#: src/unix/sys-unix.c:250
 msgid "'intern' must be logical and not NA"
 msgstr "'intern' должно быть логическим и не NA"
 
-#: src/unix/sys-unix.c:266
+#: src/unix/sys-unix.c:262
 #, c-format
 msgid "cannot popen '%s', probable reason '%s'"
 msgstr "не могу popen '%s', возможная причина -- '%s'"
 
-#: src/unix/sys-unix.c:271
+#: src/unix/sys-unix.c:267
 #, c-format
 msgid "line %d may be truncated in call to system(, intern = TRUE)"
 msgstr "строка %d может быть обрезана в вызове system(, intern = TRUE)"
 
-#: src/unix/sys-unix.c:288
+#: src/unix/sys-unix.c:284
 #, c-format
 msgid "error in running command: '%s'"
 msgstr "ошибка запуска команды: '%s'"
 
-#: src/unix/sys-unix.c:290
+#: src/unix/sys-unix.c:286
 msgid "error in running command"
 msgstr "ошибка запуска команды"
 
-#: src/unix/sys-unix.c:294
+#: src/unix/sys-unix.c:290
 #, c-format
 msgid "running command '%s' had status %d and error message '%s'"
 msgstr "запуск команды '%s' вывел статус %d и сообщение об ошибке '%s'"
 
-#: src/unix/sys-unix.c:399
+#: src/unix/sys-unix.c:395
 msgid "Sys.info() is not implemented on this system"
 msgstr "'Sys.info()' в этой системе не разработан"
 
-#: src/unix/system.c:257
+#: src/unix/system.c:267
 #, c-format
 msgid "WARNING: --gui or -g without value ignored"
 msgstr "ПРЕДУПРЕЖДЕНИЕ: --gui или -g без значения пропущен"
 
-#: src/unix/system.c:275
+#: src/unix/system.c:285
 #, c-format
 msgid "WARNING: unknown gui '%s', using X11\n"
 msgstr "ПРЕДУПРЕЖДЕНИЕ: неизвестный gui '%s', использую X11\n"
 
-#: src/unix/system.c:278
+#: src/unix/system.c:288
 #, c-format
 msgid "WARNING: unknown gui '%s', using none\n"
 msgstr "ПРЕДУПРЕЖДЕНИЕ: неизвестный gui '%s', не использую никакого\n"
 
-#: src/unix/system.c:388
+#: src/unix/system.c:373
 msgid "creating temporary file for '-e' failed"
 msgstr "создать временный файл для '-e' не удалось"
 
-#: src/unix/system.c:469
+#: src/unix/system.c:454
 msgid "WARNING: Only editing the first in the list of files"
 msgstr "ПРЕДУПРЕЖДЕНИЕ: Только редактирование первого файла из списка"
 
+#~ msgid "'dimnames' must be a list"
+#~ msgstr "'dimnames' должны быть списком"
+#~ msgid "'args' must be a list"
+#~ msgstr "'args' должны быть списком"
+#~ msgid "binary operations require two arguments"
+#~ msgstr "бинарные операторы требуют два аргумента"
+#~ msgid "opened URL\n"
+#~ msgstr "открытие URL\n"
+#~ msgid "internet routines were already initialized"
+#~ msgstr "средства Интернет уже включены"
+#~ msgid "'msg1' must be a character string"
+#~ msgstr "'msg1' должен быть текстовой строкой"
+#~ msgid "'msg2' must be a character string"
+#~ msgstr "'msg2' должен быть текстовой строкой"
+#~ msgid "argument 'code' must be a character string"
+#~ msgstr "аргумент 'code' должен быть текстовой строкой"
+#~ msgid "argument 'type' must be a character string"
+#~ msgstr "аргумент 'type' должен быть текстовой строкой"
+#~ msgid "InternetOpenUrl timed out"
+#~ msgstr "тайм-аут 'InternetOpenUrl'"
+#~ msgid "Internet read timed out"
+#~ msgstr "тайм-аут чтения из Internet"
+#~ msgid "unable to find a closure from within which 'match.call' was called"
+#~ msgstr "не могу найти вложение из которого вызвано 'match.call'"
+#~ msgid "vfont routines cannot be accessed in module"
+#~ msgstr "средства 'vfont' не доступны в модуле"
+#~ msgid "Hershey fonts cannot be loaded"
+#~ msgstr "шрифты 'Hershey' не могут быть загружены"
+#~ msgid "invalid generic function in 'usemethod'"
+#~ msgstr "неправильная общая функция в 'usemethod'"
+#~ msgid "'UseMethod' called from outside a function"
+#~ msgstr "'UseMethod' вызван снаружи функции"
+#~ msgid "first argument must be a generic name"
+#~ msgstr "первый аргумент должен быть общим именем"
+#~ msgid ""
+#~ "explicit request not to duplicate arguments in call to '%s', but argument "
+#~ "%d is of the wrong type (%d != %d)"
+#~ msgstr ""
+#~ "явный запрос не дублировать аргументы при вызове '%s', однако аргумент %d "
+#~ "неправильного типа (%d != %d)"
+#~ msgid "single values not returned if not duplicated"
+#~ msgstr "одиночные значения не возвращаются, если не дублированы"
+#~ msgid "character variables must be duplicated in .C/.Fortran"
+#~ msgstr "текстовые переменные должны быть дублированы в  .C/.Fortran"
+#~ msgid "call name too long in '%s'"
+#~ msgstr "слишком длинное имя вызова в '%s'"
+#~ msgid "generic name too long in '%s'"
+#~ msgstr "у %s слишком длинное общее имя"
+#~ msgid "method name too long in '%s'"
+#~ msgstr "слишком длинное имя метода в '%s'"
+#~ msgid "%d arguments passed to 'log' which requires 1 or 2"
+#~ msgstr "%d аргумента передано 'log', а требуется 1 или 2"
+#~ msgid ""
+#~ "Warning in %s :\n"
+#~ "  %s\n"
+#~ msgstr ""
+#~ "Предупреждение в %s :\n"
+#~ "  %s\n"
+#~ msgid "input"
+#~ msgstr "ввод"
+#~ msgid "symbol"
+#~ msgstr "символ"
+#~ msgid "assignment"
+#~ msgstr "присвоение"
 #~ msgid ""
 #~ "bad target context--should NEVER happen;\n"
 #~ "please bug.report() [R_run_onexits]"
 #~ msgstr ""
 #~ "неправильный целевой контекст -- НЕ ДОЛЖНО происходить;\n"
 #~ "пожалуйста, bug.report() [R_run_onexits]"
-
 #~ msgid "invalid assignment left-hand side"
 #~ msgstr "неправильная левая сторона присвоения"
-
 #~ msgid "negative value in 'x'"
 #~ msgstr "отрицательное значение в 'x'"
-
 #~ msgid "'jobu' and 'jobv' must be character strings"
 #~ msgstr "'jobu' и 'jobv' должны быть текстовыми строками"
 
 #, fuzzy
 #~ msgid "\"%s\" is not an existing slot in an object of class \"%s\""
 #~ msgstr "нет слота имени \"%s\" для этого объекта класса \"%s\""
-
 #~ msgid "R_CompiledFileName: buffer too small"
 #~ msgstr "R_CompiledFileName: буфер слишком мал"
-
 #~ msgid ".C(..): Width cannot be zero"
 #~ msgstr ".C(..): ширина не может = 0"
-
 #~ msgid ".C(..): 'type' must be \"integer\" for  \"d\"-format"
 #~ msgstr ".C(..): для  \"d\"-формата 'тип' должно быть \"integer\" "
-
 #~ msgid ".C(..): 'type' must be \"real\" for this format"
 #~ msgstr ".C(..): для этого формата 'тип' должен быть \"real\""
-
 #~ msgid "'names' is not a character string"
 #~ msgstr "'names' не является текстовой строкой"
-
 #~ msgid "bad hsv to rgb color conversion"
 #~ msgstr "неправильная конвертация цвета из hsv в rgb"
-
 #~ msgid "unknown palette (need >= 2 colors)"
 #~ msgstr "неизвестная палитра (нужно >= 2 цветов)"
-
 #~ msgid "maximum number of colors exceeded"
 #~ msgstr "превышено максимальное количество цветов"
-
 #~ msgid "invalid RGB specification"
 #~ msgstr "неправильное указание RGB "
-
 #~ msgid "invalid color name '%s'"
 #~ msgstr "неправильное имя цвета '%s'"
-
 #~ msgid "invalid color specification '%s'"
 #~ msgstr "неправильное указание цвета '%s'"
-
 #~ msgid "supplied color is not numeric nor character"
 #~ msgstr "предложенный цвет -- не цифра и не символ"
 
 #, fuzzy
 #~ msgid "invalid color specification"
 #~ msgstr "Неправильное определение цвета"
-
 #~ msgid "rcont2 [%d,%d]: exp underflow to 0; algorithm failure"
 #~ msgstr ""
 #~ "rcont2 [%d,%d]: при вычислении exp произошло исчезновение порядка "
 #~ "(антипереполнение) в 0; ошибка алгоритма"
-
 #~ msgid "no R-to-C converter found corresponding to identifier"
 #~ msgstr "не найдено конвертера R-в-C, соответствующего идентификатору"
-
 #~ msgid "invalid USE.NAMES value"
 #~ msgstr "неправльное значение USE.NAMES"
-
 #~ msgid "duplicated levels will not be allowed in factors anymore"
 #~ msgstr "повторяющиейся уровни в факторах больше не разрешены"
-
 #~ msgid "... used in an incorrect context"
 #~ msgstr "... использовано в неправильном контексте"
-
 #~ msgid "NAOK used more than once"
 #~ msgstr "NAOK использован более одного раза"
-
 #~ msgid "PACKAGE used more than once"
 #~ msgstr "PACKAGE использован более одного раза"
-
 #~ msgid "Invalid graphics state"
 #~ msgstr "Неправильное графическое состояние"
-
 #~ msgid "invalid mode to pass to Fortran (arg %d)"
 #~ msgstr "неправильный режим для передачи в Fortran (аргумент %d)"
-
 #~ msgid "invalid function in call_R"
 #~ msgstr "неправильная функция в call_R"
-
 #~ msgid "invalid argument count in call_R"
 #~ msgstr "неправильный счет аргументов в call_R"
-
 #~ msgid "invalid return value count in call_R"
 #~ msgstr "неправильный счет возвращаемого значения в call_R"
-
-#~ msgid "internal error in unz code"
-#~ msgstr "внутренняя ошибка в коде unz"
-
 #~ msgid "can't use R profiling while byte code profiling"
 #~ msgstr ""
 #~ "не могу использовать R-профилирование до тех пор, пока не включено "
 #~ "побайтное профилирование"
-
 #~ msgid "bad character switch offsets"
 #~ msgstr "неверное смещение строковых переключателей"
-
 #~ msgid "bad switch names"
 #~ msgstr "неправильное имя переключателя"
-
 #~ msgid "bad numeric switch offsets"
 #~ msgstr "неверное смещение числовых переключателей"
-
 #~ msgid "constBuf must be a generic vector"
 #~ msgstr "constBuf должен быть общим вектором"
-
 #~ msgid "bad constCount value"
 #~ msgstr "неверное значение constCount"
-
 #~ msgid "lapack routines cannot be accessed in module"
 #~ msgstr "средства lapack не доступны из модуля"
-
 #~ msgid "lapack routines cannot be loaded"
 #~ msgstr "средства lapack не могут быть загружены"
-
 #~ msgid "'UseMethod' called from outside a closure"
 #~ msgstr "'UseMethod' вызван снаружи замыкания"
-
 #~ msgid "invalid `which' in TeX"
 #~ msgstr "неправильное указание 'which' в TeX"
-
 #~ msgid "internal error in do_random1"
 #~ msgstr "внутренняя ошибка в 'do_random1'"
-
 #~ msgid "internal error in do_random2"
 #~ msgstr "внутренняя ошибка в 'do_random2'"
-
 #~ msgid "internal error in do_random3"
 #~ msgstr "внутренняя ошибка в 'do_random3'"
-
 #~ msgid "%s%d:%d: %s"
 #~ msgstr "%s%d:%d: %s"
-
 #~ msgid ""
 #~ "%s%d:%d: %s\n"
 #~ "%d: %s\n"
@@ -7435,7 +8311,6 @@ msgstr "ПРЕДУПРЕЖДЕНИЕ: Только редактирование
 #~ "%s%d:%d: %s\n"
 #~ "%d: %s\n"
 #~ "%*s"
-
 #~ msgid ""
 #~ "%s%d:%d: %s\n"
 #~ "%d: %s\n"
@@ -7446,13 +8321,10 @@ msgstr "ПРЕДУПРЕЖДЕНИЕ: Только редактирование
 #~ "%d: %s\n"
 #~ "%d: %s\n"
 #~ "%*s"
-
 #~ msgid "%s"
 #~ msgstr "%s"
-
 #~ msgid "%s in \"%s\""
 #~ msgstr "%s в \"%s\""
-
 #~ msgid ""
 #~ "%s in:\n"
 #~ "\"%s\n"
@@ -7461,174 +8333,119 @@ msgstr "ПРЕДУПРЕЖДЕНИЕ: Только редактирование
 #~ "%s в:\n"
 #~ "\"%s\n"
 #~ "%s\""
-
 #~ msgid "cannot mkdir R_TempDir"
 #~ msgstr "не могу создать каталог 'R_TempDir'"
-
 #~ msgid "csduplicated not called on a STRSXP"
 #~ msgstr "'csduplicated' не вызван на 'STRSXP'"
-
 #~ msgid "color intensity %g, not in [0,1]"
 #~ msgstr "интенсивность цвета %g, не в [0,1]"
-
 #~ msgid "color intensity %d, not in 0:255"
 #~ msgstr "интенсивность цвета %d, не в 0:255"
-
 #~ msgid "alpha level %g, not in [0,1]"
 #~ msgstr "альфа-уровень %g, не в [0,1]"
-
 #~ msgid "alpha level %d, not in 0:255"
 #~ msgstr "альфа-уровень %d, не в 0:255"
-
 #~ msgid "invalid hsv color"
 #~ msgstr "неправильный hsv-цвет"
-
 #~ msgid "invalid hcl color"
 #~ msgstr "неправильный hcl-цвет"
-
 #~ msgid "invalid 'names' vector"
 #~ msgstr "неправильный вектор 'names'"
-
 #~ msgid "invalid gray level, must be in [0,1]."
 #~ msgstr "неправильный уровень серого, должен быть в [0,1]."
-
 #~ msgid "rgb is not a matrix (internally)"
 #~ msgstr "rgb не является матрицей (внутренне)"
-
 #~ msgid "rgb must have 3 rows (internally)"
 #~ msgstr "rgb должен иметь 3 строки (внутренне)"
-
 #~ msgid "invalid bind address specification"
 #~ msgstr "неправильная спецификация адреса связи"
-
 #~ msgid "'outFile' must be a single file"
 #~ msgstr "'outFile' должен быть одиночным файлом"
 
 #, fuzzy
 #~ msgid "'fmt' must be length 1"
 #~ msgstr "'fromLast' должен быть единичной длины"
-
 #~ msgid "unknown type"
 #~ msgstr "неизвестный тип"
-
 #~ msgid "Menu functions can only be used in the GUI"
 #~ msgstr "Функции меню могут быть использованы только в GUI"
-
 #~ msgid "unable to retrieve items for %s (%s)"
 #~ msgstr "не могу извлечь пункты для %s (%s)"
-
 #~ msgid "unable to add menu (%s)"
 #~ msgstr "не могу добавить меню (%s)"
-
 #~ msgid "unable to add menu item (%s)"
 #~ msgstr "не могу добавить пункт меню (%s)"
-
 #~ msgid "menu does not exist"
 #~ msgstr "меню не существует"
-
 #~ msgid "unable to delete menu item (%s)"
 #~ msgstr "не могу удалить пункт меню (%s)"
-
 #~ msgid "'savehistory' can only be used in Rgui and Rterm"
 #~ msgstr "'savehistory' можно использовать только в Rgui и в Rterm"
-
 #~ msgid "'loadhistory' can only be used in Rgui and Rterm"
 #~ msgstr "'loadhistory' можно использовать только в Rgui и в Rterm"
-
 #~ msgid "Select one or more"
 #~ msgstr "Выберите один или более "
-
 #~ msgid "Select one"
 #~ msgstr "Выберите один"
-
 #~ msgid "argument must be a character vector or a raw vector"
 #~ msgstr "аргумент должен быть текстовым вектором или простым вектором"
-
 #~ msgid "'default' must be a character string"
 #~ msgstr "'default' должен быть текстовой строкой"
-
 #~ msgid "'default' is overlong"
 #~ msgstr "'default' слишком длинный"
-
 #~ msgid "'caption' must be a character string"
 #~ msgstr "'caption' должен быть текстовой строкой"
-
 #~ msgid "'multi' must be a logical value"
 #~ msgstr "'multi' должен быть логическим значением"
-
 #~ msgid "'filterindex' must be an integer value"
 #~ msgstr "'filterindex' должен быть целым числом"
-
 #~ msgid "'title' must be a character string"
 #~ msgstr "'title' должен быть текстовой строкой"
-
 #~ msgid "'text' must be a character string"
 #~ msgstr "'text' должен быть текстовой строкой"
-
 #~ msgid "'%s' must be length 1"
 #~ msgstr "'%s' должен быть единичной длины"
-
-#~ msgid "'%s' must be a list"
-#~ msgstr "'%s' должен быть списком"
-
 #~ msgid "'%s' element %d is not a window handle"
 #~ msgstr "элемент '%s' %d не является правильным вызовом окна"
-
 #~ msgid "Registry key '%ls' not found"
 #~ msgstr "Ключ реестра '%ls' не найден"
-
 #~ msgid "string terminated by newline or EOF"
 #~ msgstr "строка заканчивается символом новой строки либо EOF"
-
 #~ msgid "the first argument must be of mode character"
 #~ msgstr "первый аргумент должен быть текстового типа"
-
 #~ msgid "Selection: "
 #~ msgstr "Выбор: "
-
 #~ msgid "cannot allocate buffer in 'readTableHead'"
 #~ msgstr "не могу выделить буфер в 'readTableHead'"
-
 #~ msgid "\\ followed by EOF"
 #~ msgstr "за \\ следует EOF"
-
 #~ msgid "incomplete final line found by readTableHeader on '%s'"
 #~ msgstr "'readTableHeader' нашел неполную концевую строку в '%s'"
-
 #~ msgid "'file' is not a connection"
 #~ msgstr "'file' не является соединением"
-
 #~ msgid "'dec' must be a single character"
 #~ msgstr "'dec' должен быть одиночным символом"
-
 #~ msgid "corrupt data frame -- length of column %d does not not match nrows"
 #~ msgstr ""
 #~ "поврежденная таблица данных -- длина колонки %d не соответствует 'nrow'"
-
 #~ msgid "corrupt matrix -- dims not not match length"
 #~ msgstr "поврежденная матрица -- размерность не соответствует длине"
-
 #~ msgid "NA's in .C(\"bincode\",... NAOK=FALSE)"
 #~ msgstr "NA в .C(\"bincode\",... NAOK=FALSE)"
-
 #~ msgid "NA's in .C(\"bincount\",... NAOK=FALSE)"
 #~ msgstr "NA в .C(\"bincount\",... NAOK=FALSE)"
-
 #~ msgid "non-numeric matrix in rowsum(): this cannot happen"
 #~ msgstr "нечисловая матрица в 'rowsum()': это не должно происходить"
-
 #~ msgid "'method' must be a character string"
 #~ msgstr "'method' должен быть текстовой строкой"
-
 #~ msgid "no dyn.load support in this R version"
 #~ msgstr "в этой версии R нет поддержки dyn.load"
-
 #~ msgid "vector size cannot be negative"
 #~ msgstr "размер вектора не может быть отрицательным"
 
 #, fuzzy
 #~ msgid "long vectors are not supported for index.return"
 #~ msgstr "символические ссылки на этой платформе не поддерживаются"
-
 #~ msgid "'R_get_primname' called on a non-primitive"
 #~ msgstr "'R_get_primname' вызван на непримитив"
+
diff --git a/src/library/base/po/tr.po b/src/library/base/po/tr.po
index 5a79ee3..c312f10 100644
--- a/src/library/base/po/tr.po
+++ b/src/library/base/po/tr.po
@@ -8,8 +8,8 @@
 msgid ""
 msgstr ""
 "Project-Id-Version: R 2.13.0\n"
-"Report-Msgid-Bugs-To: bugs.r-project.org\n"
-"POT-Creation-Date: 2014-03-27 07:46+0000\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2016-04-01 10:28-0700\n"
 "PO-Revision-Date: 2011-04-02 18:24+0200\n"
 "Last-Translator: Murat Alkan <muratalk at gmail.com>\n"
 "Language-Team: Turkish <muratalk at gmail.com>\n"
@@ -56,15 +56,15 @@ msgstr "Fonksiyon başlangıç parametreleriyle hesaplanamaz"
 msgid "unknown type in \"CG\" method of 'optim'"
 msgstr "optim'in CG metodunda bilinmeyen tip"
 
-#: src/appl/optim.c:665
+#: src/appl/optim.c:662
 msgid "REPORT must be > 0 (method = \"L-BFGS-B\")"
 msgstr "REPORT > 0 olmalı (metod = \"L-BFGS-B\")"
 
-#: src/appl/optim.c:688
+#: src/appl/optim.c:685
 msgid "L-BFGS-B needs finite values of 'fn'"
 msgstr "L-BFGS-B 'fn'nin sonlu değerlerine ihtiyaç duyar"
 
-#: src/appl/optim.c:744
+#: src/appl/optim.c:741
 msgid "trace, REPORT must be >= 0 (method = \"SANN\")"
 msgstr "trace, REPORT >= 0 olmalı (metod = \"SANN\")"
 
@@ -129,122 +129,127 @@ msgstr "'%ls'e erişim engellendi"
 msgid "problem in displaying '%ls'"
 msgstr "'%ls' gösterilirken hata"
 
-#: src/gnuwin32/extra.c:116 src/gnuwin32/extra.c:159 src/gnuwin32/extra.c:349
-#: src/gnuwin32/extra.c:577 src/gnuwin32/extra.c:602 src/main/agrep.c:131
-#: src/main/agrep.c:135 src/main/agrep.c:775 src/main/agrep.c:780
-#: src/main/apply.c:293 src/main/apply.c:295 src/main/apply.c:298
-#: src/main/array.c:87 src/main/array.c:1137 src/main/array.c:1263
-#: src/main/array.c:1265 src/main/array.c:1266 src/main/array.c:1592
-#: src/main/array.c:1594 src/main/array.c:1596 src/main/attrib.c:196
+#: src/gnuwin32/extra.c:116 src/gnuwin32/extra.c:158 src/gnuwin32/extra.c:348
+#: src/gnuwin32/extra.c:574 src/gnuwin32/extra.c:599 src/main/agrep.c:131
+#: src/main/agrep.c:135 src/main/agrep.c:776 src/main/agrep.c:781
+#: src/main/apply.c:330 src/main/apply.c:332 src/main/apply.c:335
+#: src/main/array.c:90 src/main/array.c:1272 src/main/array.c:1411
+#: src/main/array.c:1413 src/main/array.c:1414 src/main/array.c:1758
+#: src/main/array.c:1760 src/main/array.c:1762 src/main/attrib.c:190
 #: src/main/builtin.c:88 src/main/builtin.c:97 src/main/builtin.c:116
-#: src/main/builtin.c:118 src/main/builtin.c:147 src/main/builtin.c:534
-#: src/main/builtin.c:550 src/main/builtin.c:739 src/main/builtin.c:741
-#: src/main/builtin.c:743 src/main/character.c:139 src/main/character.c:142
-#: src/main/character.c:203 src/main/character.c:1037
-#: src/main/character.c:1041 src/main/character.c:1276
-#: src/main/character.c:1280 src/main/character.c:1341
-#: src/main/character.c:1344 src/main/connections.c:1217
-#: src/main/connections.c:1223 src/main/connections.c:1226
-#: src/main/connections.c:1230 src/main/connections.c:1375
-#: src/main/connections.c:1391 src/main/connections.c:1396
-#: src/main/connections.c:1996 src/main/connections.c:2002
-#: src/main/connections.c:2006 src/main/connections.c:2010
-#: src/main/connections.c:2015 src/main/connections.c:2665
-#: src/main/connections.c:2670 src/main/connections.c:2673
-#: src/main/connections.c:2676 src/main/connections.c:3057
-#: src/main/connections.c:3062 src/main/connections.c:3068
-#: src/main/connections.c:3071 src/main/connections.c:3075
-#: src/main/connections.c:3090 src/main/connections.c:3140
-#: src/main/connections.c:3145 src/main/connections.c:3149
-#: src/main/connections.c:3153 src/main/connections.c:3157
-#: src/main/connections.c:3163 src/main/connections.c:3210
-#: src/main/connections.c:3216 src/main/connections.c:3220
-#: src/main/connections.c:3270 src/main/connections.c:3273
-#: src/main/connections.c:3547 src/main/connections.c:3550
-#: src/main/connections.c:3553 src/main/connections.c:3559
-#: src/main/connections.c:3666 src/main/connections.c:3672
-#: src/main/connections.c:3675 src/main/connections.c:3826
-#: src/main/connections.c:3829 src/main/connections.c:3833
-#: src/main/connections.c:3836 src/main/connections.c:3956
-#: src/main/connections.c:4074 src/main/connections.c:4077
-#: src/main/connections.c:4414 src/main/connections.c:4439
-#: src/main/connections.c:4474 src/main/connections.c:4489
-#: src/main/connections.c:4497 src/main/connections.c:4523
-#: src/main/connections.c:4669 src/main/connections.c:4673
-#: src/main/connections.c:4801 src/main/connections.c:4803
-#: src/main/connections.c:4805 src/main/connections.c:4833
-#: src/main/connections.c:4965 src/main/connections.c:4991
-#: src/main/connections.c:4995 src/main/connections.c:4999
-#: src/main/connections.c:5003 src/main/context.c:596 src/main/context.c:605
-#: src/main/context.c:609 src/main/datetime.c:775 src/main/datetime.c:865
-#: src/main/datetime.c:867 src/main/datetime.c:871 src/main/datetime.c:1026
-#: src/main/datetime.c:1028 src/main/datetime.c:1232 src/main/debug.c:228
-#: src/main/deparse.c:397 src/main/dotcode.c:478 src/main/dotcode.c:482
-#: src/main/dotcode.c:487 src/main/dounzip.c:322 src/main/dounzip.c:329
-#: src/main/dounzip.c:339 src/main/dounzip.c:344 src/main/dounzip.c:348
-#: src/main/dounzip.c:352 src/main/envir.c:1618 src/main/envir.c:1621
-#: src/main/envir.c:1742 src/main/envir.c:1747 src/main/envir.c:1813
-#: src/main/envir.c:1829 src/main/envir.c:1835 src/main/envir.c:1932
-#: src/main/envir.c:1940 src/main/envir.c:1947 src/main/envir.c:1958
-#: src/main/envir.c:2172 src/main/envir.c:2293 src/main/envir.c:2552
-#: src/main/envir.c:2762 src/main/envir.c:2776 src/main/envir.c:2783
-#: src/main/envir.c:2799 src/main/envir.c:3367 src/main/errors.c:1030
-#: src/main/eval.c:397 src/main/eval.c:406 src/main/eval.c:409
-#: src/main/grep.c:767 src/main/grep.c:772 src/main/grep.c:1061
-#: src/main/grep.c:1063 src/main/grep.c:1065 src/main/grep.c:1510
-#: src/main/grep.c:1514 src/main/grep.c:1519 src/main/grep.c:2323
-#: src/main/grep.c:2328 src/main/grep.c:2621 src/main/grep.c:2626
-#: src/main/memory.c:3736 src/main/paste.c:96 src/main/paste.c:395
-#: src/main/paste.c:402 src/main/paste.c:409 src/main/paste.c:414
-#: src/main/paste.c:419 src/main/paste.c:424 src/main/paste.c:427
-#: src/main/paste.c:435 src/main/paste.c:601 src/main/paste.c:606
+#: src/main/builtin.c:118 src/main/builtin.c:149 src/main/builtin.c:569
+#: src/main/builtin.c:585 src/main/builtin.c:773 src/main/builtin.c:775
+#: src/main/builtin.c:777 src/main/character.c:239 src/main/character.c:242
+#: src/main/character.c:247 src/main/character.c:788 src/main/character.c:791
+#: src/main/character.c:1289 src/main/character.c:1293
+#: src/main/character.c:1528 src/main/character.c:1532
+#: src/main/character.c:1593 src/main/character.c:1596
+#: src/main/connections.c:1208 src/main/connections.c:1214
+#: src/main/connections.c:1217 src/main/connections.c:1221
+#: src/main/connections.c:1367 src/main/connections.c:1383
+#: src/main/connections.c:1388 src/main/connections.c:1989
+#: src/main/connections.c:1995 src/main/connections.c:1999
+#: src/main/connections.c:2003 src/main/connections.c:2008
+#: src/main/connections.c:2659 src/main/connections.c:2664
+#: src/main/connections.c:2667 src/main/connections.c:2670
+#: src/main/connections.c:3053 src/main/connections.c:3058
+#: src/main/connections.c:3064 src/main/connections.c:3067
+#: src/main/connections.c:3071 src/main/connections.c:3086
+#: src/main/connections.c:3135 src/main/connections.c:3140
+#: src/main/connections.c:3144 src/main/connections.c:3148
+#: src/main/connections.c:3152 src/main/connections.c:3158
+#: src/main/connections.c:3203 src/main/connections.c:3209
+#: src/main/connections.c:3213 src/main/connections.c:3264
+#: src/main/connections.c:3267 src/main/connections.c:3543
+#: src/main/connections.c:3546 src/main/connections.c:3549
+#: src/main/connections.c:3555 src/main/connections.c:3662
+#: src/main/connections.c:3668 src/main/connections.c:3671
+#: src/main/connections.c:3823 src/main/connections.c:3826
+#: src/main/connections.c:3830 src/main/connections.c:3833
+#: src/main/connections.c:3954 src/main/connections.c:4085
+#: src/main/connections.c:4088 src/main/connections.c:4425
+#: src/main/connections.c:4450 src/main/connections.c:4485
+#: src/main/connections.c:4500 src/main/connections.c:4508
+#: src/main/connections.c:4534 src/main/connections.c:4680
+#: src/main/connections.c:4684 src/main/connections.c:4814
+#: src/main/connections.c:4816 src/main/connections.c:4818
+#: src/main/connections.c:4846 src/main/connections.c:4980
+#: src/main/connections.c:5019 src/main/connections.c:5024
+#: src/main/connections.c:5029 src/main/connections.c:5050
+#: src/main/context.c:607 src/main/context.c:616 src/main/context.c:620
+#: src/main/datetime.c:781 src/main/datetime.c:869 src/main/datetime.c:872
+#: src/main/datetime.c:876 src/main/datetime.c:1043 src/main/datetime.c:1045
+#: src/main/datetime.c:1250 src/main/debug.c:245 src/main/deparse.c:408
+#: src/main/dotcode.c:496 src/main/dotcode.c:500 src/main/dotcode.c:505
+#: src/main/dounzip.c:323 src/main/dounzip.c:330 src/main/dounzip.c:340
+#: src/main/dounzip.c:345 src/main/dounzip.c:349 src/main/dounzip.c:353
+#: src/main/envir.c:1752 src/main/envir.c:1755 src/main/envir.c:1876
+#: src/main/envir.c:1881 src/main/envir.c:1945 src/main/envir.c:1961
+#: src/main/envir.c:1967 src/main/envir.c:2079 src/main/envir.c:2087
+#: src/main/envir.c:2094 src/main/envir.c:2105 src/main/envir.c:2337
+#: src/main/envir.c:2458 src/main/envir.c:2755 src/main/envir.c:3022
+#: src/main/envir.c:3036 src/main/envir.c:3043 src/main/envir.c:3059
+#: src/main/envir.c:3642 src/main/errors.c:1011 src/main/eval.c:454
+#: src/main/eval.c:463 src/main/eval.c:466 src/main/grep.c:780
+#: src/main/grep.c:785 src/main/grep.c:1079 src/main/grep.c:1081
+#: src/main/grep.c:1083 src/main/grep.c:1528 src/main/grep.c:1532
+#: src/main/grep.c:1537 src/main/grep.c:2345 src/main/grep.c:2350
+#: src/main/grep.c:2652 src/main/grep.c:2657 src/main/memory.c:3823
+#: src/main/paste.c:96 src/main/paste.c:392 src/main/paste.c:399
+#: src/main/paste.c:406 src/main/paste.c:411 src/main/paste.c:416
+#: src/main/paste.c:421 src/main/paste.c:424 src/main/paste.c:432
+#: src/main/paste.c:437 src/main/paste.c:619 src/main/paste.c:624
 #: src/main/platform.c:306 src/main/platform.c:308 src/main/platform.c:310
 #: src/main/platform.c:326 src/main/platform.c:337 src/main/platform.c:390
-#: src/main/platform.c:392 src/main/platform.c:705 src/main/platform.c:707
-#: src/main/platform.c:1064 src/main/platform.c:1070 src/main/platform.c:1073
-#: src/main/platform.c:1076 src/main/platform.c:1079 src/main/platform.c:1082
-#: src/main/platform.c:1085 src/main/platform.c:1088 src/main/platform.c:1185
-#: src/main/platform.c:1188 src/main/platform.c:1191 src/main/platform.c:1229
-#: src/main/platform.c:1286 src/main/platform.c:1289 src/main/platform.c:1498
-#: src/main/platform.c:1501 src/main/platform.c:1504 src/main/platform.c:1540
-#: src/main/platform.c:1543 src/main/platform.c:1546 src/main/platform.c:1629
-#: src/main/platform.c:1645 src/main/platform.c:1684 src/main/platform.c:1686
-#: src/main/platform.c:1757 src/main/platform.c:1841 src/main/platform.c:2116
-#: src/main/platform.c:2176 src/main/platform.c:2353 src/main/platform.c:2356
-#: src/main/platform.c:2359 src/main/platform.c:2362 src/main/platform.c:2365
-#: src/main/platform.c:2368 src/main/platform.c:2568 src/main/platform.c:2571
-#: src/main/platform.c:2574 src/main/platform.c:2577 src/main/platform.c:2580
-#: src/main/platform.c:2583 src/main/platform.c:2657 src/main/platform.c:2665
-#: src/main/platform.c:2701 src/main/platform.c:2751 src/main/print.c:242
-#: src/main/print.c:248 src/main/print.c:270 src/main/print.c:276
-#: src/main/print.c:283 src/main/random.c:478 src/main/random.c:482
-#: src/main/random.c:489 src/main/random.c:517 src/main/saveload.c:1950
-#: src/main/saveload.c:1953 src/main/saveload.c:1956 src/main/saveload.c:2072
-#: src/main/saveload.c:2252 src/main/saveload.c:2257 src/main/saveload.c:2260
+#: src/main/platform.c:392 src/main/platform.c:708 src/main/platform.c:710
+#: src/main/platform.c:800 src/main/platform.c:1138 src/main/platform.c:1144
+#: src/main/platform.c:1147 src/main/platform.c:1150 src/main/platform.c:1153
+#: src/main/platform.c:1156 src/main/platform.c:1159 src/main/platform.c:1162
+#: src/main/platform.c:1259 src/main/platform.c:1262 src/main/platform.c:1265
+#: src/main/platform.c:1303 src/main/platform.c:1361 src/main/platform.c:1364
+#: src/main/platform.c:1573 src/main/platform.c:1576 src/main/platform.c:1579
+#: src/main/platform.c:1615 src/main/platform.c:1618 src/main/platform.c:1621
+#: src/main/platform.c:1657 src/main/platform.c:1690 src/main/platform.c:1692
+#: src/main/platform.c:1763 src/main/platform.c:1848 src/main/platform.c:2089
+#: src/main/platform.c:2149 src/main/platform.c:2334 src/main/platform.c:2337
+#: src/main/platform.c:2340 src/main/platform.c:2343 src/main/platform.c:2346
+#: src/main/platform.c:2349 src/main/platform.c:2555 src/main/platform.c:2558
+#: src/main/platform.c:2561 src/main/platform.c:2564 src/main/platform.c:2567
+#: src/main/platform.c:2570 src/main/platform.c:2648 src/main/platform.c:2656
+#: src/main/platform.c:2692 src/main/platform.c:2742 src/main/print.c:235
+#: src/main/print.c:241 src/main/print.c:263 src/main/print.c:269
+#: src/main/print.c:276 src/main/random.c:470 src/main/random.c:474
+#: src/main/random.c:481 src/main/random.c:509 src/main/saveload.c:1952
+#: src/main/saveload.c:1955 src/main/saveload.c:1958 src/main/saveload.c:2074
+#: src/main/saveload.c:2254 src/main/saveload.c:2259 src/main/saveload.c:2262
 #: src/main/saveload.c:2366 src/main/scan.c:684 src/main/scan.c:853
 #: src/main/scan.c:867 src/main/scan.c:871 src/main/scan.c:873
 #: src/main/scan.c:884 src/main/scan.c:911 src/main/scan.c:914
-#: src/main/scan.c:917 src/main/scan.c:972 src/main/seq.c:618
-#: src/main/seq.c:623 src/main/seq.c:631 src/main/seq.c:662 src/main/seq.c:666
-#: src/main/seq.c:672 src/main/seq.c:680 src/main/sort.c:175
-#: src/main/sysutils.c:585 src/main/sysutils.c:589 src/main/sysutils.c:593
-#: src/main/sysutils.c:599 src/main/sysutils.c:603 src/main/sysutils.c:1831
-#: src/main/sysutils.c:1835 src/main/unique.c:966 src/main/unique.c:1289
-#: src/main/unique.c:1349 src/main/unique.c:1356 src/main/unique.c:1750
-#: src/main/util.c:581 src/main/util.c:584 src/main/util.c:1825
-#: src/main/util.c:1994 src/main/util.c:1995 src/main/util.c:1996
-#: src/main/util.c:2013 src/main/util.c:2037 src/main/util.c:2041
-#: src/main/util.c:2043 src/main/util.c:2068 src/main/util.c:2070
-#: src/main/util.c:2072 src/main/util.c:2075 src/main/util.c:2078
-#: src/main/util.c:2082 src/main/util.c:2084 src/modules/X11/devX11.c:3241
-#: src/modules/X11/devX11.c:3244 src/modules/X11/devX11.c:3247
-#: src/modules/X11/devX11.c:3271 src/modules/internet/internet.c:284
-#: src/modules/internet/internet.c:290 src/modules/internet/internet.c:296
-#: src/modules/internet/internet.c:299 src/modules/internet/internet.c:303
+#: src/main/scan.c:917 src/main/scan.c:972 src/main/seq.c:622
+#: src/main/seq.c:627 src/main/seq.c:635 src/main/seq.c:666 src/main/seq.c:670
+#: src/main/seq.c:676 src/main/seq.c:684 src/main/sort.c:175
+#: src/main/sysutils.c:597 src/main/sysutils.c:601 src/main/sysutils.c:605
+#: src/main/sysutils.c:611 src/main/sysutils.c:615 src/main/sysutils.c:1787
+#: src/main/sysutils.c:1791 src/main/unique.c:1029 src/main/unique.c:1337
+#: src/main/unique.c:1341 src/main/unique.c:1351 src/main/unique.c:1747
+#: src/main/util.c:636 src/main/util.c:639 src/main/util.c:1379
+#: src/main/util.c:1393 src/main/util.c:1975 src/main/util.c:2198
+#: src/main/util.c:2199 src/main/util.c:2200 src/main/util.c:2217
+#: src/main/util.c:2245 src/main/util.c:2249 src/main/util.c:2251
+#: src/main/util.c:2277 src/main/util.c:2279 src/main/util.c:2281
+#: src/main/util.c:2284 src/main/util.c:2287 src/main/util.c:2291
+#: src/main/util.c:2293 src/modules/X11/devX11.c:3247
+#: src/modules/X11/devX11.c:3250 src/modules/X11/devX11.c:3253
+#: src/modules/X11/devX11.c:3277 src/modules/internet/internet.c:453
+#: src/modules/internet/internet.c:459 src/modules/internet/internet.c:465
+#: src/modules/internet/internet.c:468 src/modules/internet/internet.c:472
+#: src/modules/internet/internet.c:477 src/modules/internet/libcurl.c:414
+#: src/modules/internet/libcurl.c:418 src/modules/internet/libcurl.c:423
+#: src/modules/internet/libcurl.c:426 src/modules/internet/libcurl.c:430
 #: src/modules/lapack/Lapack.c:155 src/modules/lapack/Lapack.c:261
 #: src/modules/lapack/Lapack.c:709 src/modules/lapack/Lapack.c:818
-#: src/modules/lapack/Lapack.c:880 src/modules/lapack/Lapack.c:1214
-#: src/unix/sys-std.c:1217 src/unix/sys-std.c:1240
+#: src/modules/lapack/Lapack.c:880 src/modules/lapack/Lapack.c:1215
+#: src/unix/sys-std.c:1223 src/unix/sys-std.c:1246
 #, c-format
 msgid "invalid '%s' argument"
 msgstr "hatalı '%s' argümanı"
@@ -253,377 +258,354 @@ msgstr "hatalı '%s' argümanı"
 msgid "unsupported version of Windows"
 msgstr "desteklenmeyen Windows sürümü"
 
-#: src/gnuwin32/extra.c:267 src/main/apply.c:105 src/main/character.c:595
-#: src/main/connections.c:3555 src/main/context.c:642 src/main/context.c:661
-#: src/main/datetime.c:675 src/main/datetime.c:777 src/main/datetime.c:1030
-#: src/main/dotcode.c:199 src/main/errors.c:929 src/main/errors.c:962
-#: src/main/errors.c:1065 src/main/errors.c:1090 src/main/errors.c:1095
-#: src/main/errors.c:1368 src/main/identical.c:66 src/main/identical.c:67
-#: src/main/identical.c:68 src/main/identical.c:69 src/main/identical.c:70
-#: src/main/seq.c:185 src/main/seq.c:341 src/main/seq.c:346 src/main/seq.c:350
-#: src/main/seq.c:391 src/main/seq.c:395 src/main/seq.c:399
-#: src/main/sort.c:1224 src/main/sort.c:1307 src/main/sort.c:1311
-#: src/main/sort.c:1318 src/main/sort.c:1393 src/main/source.c:220
-#: src/main/summary.c:886 src/main/sysutils.c:251 src/main/util.c:986
-#: src/main/util.c:991 src/main/util.c:998 src/main/util.c:1001
-#: src/modules/X11/devX11.c:3142 src/modules/X11/devX11.c:3169
-#: src/modules/X11/devX11.c:3174 src/modules/X11/devX11.c:3179
-#: src/modules/X11/devX11.c:3189 src/modules/X11/devX11.c:3194
-#: src/modules/X11/devX11.c:3198 src/modules/X11/devX11.c:3202
-#: src/unix/sys-std.c:1291
-#, c-format
-msgid "invalid '%s' value"
-msgstr "geçersiz '%s' değeri"
-
-#: src/gnuwin32/extra.c:308 src/gnuwin32/extra.c:321
+#: src/gnuwin32/extra.c:313 src/gnuwin32/extra.c:324
 msgid "incorrect argument"
 msgstr "hatalı argüman"
 
-#: src/gnuwin32/extra.c:312
+#: src/gnuwin32/extra.c:316
 msgid "don't be silly!: your machine has a 4Gb address limit"
 msgstr "aptal olma!:bilgisayarının 4Gb adresleme sınırı var"
 
-#: src/gnuwin32/extra.c:316
+#: src/gnuwin32/extra.c:320
 msgid "cannot decrease memory limit: ignored"
 msgstr "bellek sınırı azaltılamadı: görmezden geliniyor"
 
-#: src/gnuwin32/extra.c:428 src/gnuwin32/extra.c:529 src/main/util.c:897
+#: src/gnuwin32/extra.c:427 src/gnuwin32/extra.c:528 src/main/util.c:962
 msgid "'path' must be a character vector"
 msgstr "'path' bir karakter vektörü olmalıdır"
 
-#: src/gnuwin32/extra.c:579 src/gnuwin32/extra.c:581 src/gnuwin32/extra.c:604
-#: src/gnuwin32/extra.c:606 src/gnuwin32/extra.c:641 src/main/gevents.c:61
+#: src/gnuwin32/extra.c:576 src/gnuwin32/extra.c:578 src/gnuwin32/extra.c:601
+#: src/gnuwin32/extra.c:603 src/gnuwin32/extra.c:638 src/main/gevents.c:61
 #: src/main/gevents.c:98
 msgid "invalid device"
 msgstr "geçersiz aygıt"
 
-#: src/gnuwin32/extra.c:582
+#: src/gnuwin32/extra.c:579
 msgid "requires SDI mode"
 msgstr "SDI modu gereklidir"
 
-#: src/gnuwin32/extra.c:635 src/main/gevents.c:58 src/main/gevents.c:95
+#: src/gnuwin32/extra.c:632 src/main/gevents.c:58 src/main/gevents.c:95
 msgid "invalid graphical device number"
 msgstr "geçersiz grafik aygıtı numarası"
 
-#: src/gnuwin32/extra.c:645
+#: src/gnuwin32/extra.c:642
 msgid "bad device"
 msgstr "hatalı aygıt"
 
-#: src/gnuwin32/extra.c:799 src/gnuwin32/extra.c:807
+#: src/gnuwin32/extra.c:796 src/gnuwin32/extra.c:804
 #, fuzzy
 msgid "invalid input in 'Rmbstowcs'"
 msgstr "Rmbstowcs'da geçersiz giriş"
 
-#: src/gnuwin32/extra.c:830 src/main/platform.c:1261
+#: src/gnuwin32/extra.c:827 src/main/platform.c:1336
 msgid "file choice cancelled"
 msgstr "dosya seçimi iptal edildi"
 
-#: src/gnuwin32/run.c:242
+#: src/gnuwin32/run.c:244
 #, fuzzy, c-format
 msgid "'CreateProcess' failed to run '%s'"
 msgstr "İşleçOluştur '%s'i çalıştırırken hata"
 
-#: src/gnuwin32/run.c:344
+#: src/gnuwin32/run.c:346
 msgid "Child process not responding.  R will terminate it."
 msgstr "Alt işleç cevap vermiyor. R alt işleci kapatacak."
 
-#: src/gnuwin32/run.c:402
+#: src/gnuwin32/run.c:404
 #, c-format
 msgid "Exit code was %d"
 msgstr "Çıkış kodu %d"
 
-#: src/gnuwin32/run.c:434
+#: src/gnuwin32/run.c:436
 msgid "Insufficient memory (rpipeOpen)"
 msgstr "Yetersiz bellek (rpipeOpen)"
 
-#: src/gnuwin32/run.c:648 src/main/dounzip.c:482
+#: src/gnuwin32/run.c:650 src/main/dounzip.c:481
 msgid "seek not enabled for this connection"
 msgstr "bu bağlantı için tarama etkin değil"
 
-#: src/gnuwin32/run.c:654
+#: src/gnuwin32/run.c:656
 msgid "truncate not enabled for this connection"
 msgstr "kırpma bu bağlantı için etkin değil"
 
-#: src/gnuwin32/run.c:729 src/gnuwin32/run.c:733 src/gnuwin32/run.c:746
-#: src/gnuwin32/run.c:774 src/main/connections.c:1330
-#: src/main/connections.c:1334 src/main/connections.c:1340
-#: src/main/connections.c:1354
+#: src/gnuwin32/run.c:731 src/gnuwin32/run.c:735 src/gnuwin32/run.c:748
+#: src/gnuwin32/run.c:776 src/main/connections.c:1322
+#: src/main/connections.c:1326 src/main/connections.c:1332
+#: src/main/connections.c:1346
 msgid "allocation of pipe connection failed"
 msgstr "pipe bağlantısı yerleştirmesinde hata"
 
-#: src/gnuwin32/run.c:788
+#: src/gnuwin32/run.c:790
 #, fuzzy
 msgid "'names' is not a character vector"
 msgstr "'fmt' bir karakter vektörü değil"
 
-#: src/gnuwin32/sys-win32.c:182
+#: src/gnuwin32/sys-win32.c:180
 msgid "character string expected as first argument"
 msgstr "karakter dizesi ilk argüman olarak beklendi"
 
-#: src/gnuwin32/sys-win32.c:191
+#: src/gnuwin32/sys-win32.c:189
 msgid "character string expected as third argument"
 msgstr "karakter dizesi üçüncü argüman olarak beklendi"
 
-#: src/gnuwin32/sys-win32.c:257 src/unix/sys-unix.c:299
+#: src/gnuwin32/sys-win32.c:255 src/unix/sys-unix.c:312
 #, c-format
 msgid "running command '%s' had status %d"
 msgstr "'%s' komutunu çalıştırırken %d durumu oluştu"
 
-#: src/gnuwin32/system.c:122 src/unix/sys-unix.c:427
+#: src/gnuwin32/system.c:121 src/unix/sys-unix.c:440
 msgid "reached session elapsed time limit"
 msgstr "kalan oturum zaman limitine erişildi"
 
-#: src/gnuwin32/system.c:124 src/unix/sys-unix.c:429
+#: src/gnuwin32/system.c:123 src/unix/sys-unix.c:442
 msgid "reached elapsed time limit"
 msgstr "kalan zaman limitine erişildi"
 
-#: src/gnuwin32/system.c:130 src/unix/sys-unix.c:435
+#: src/gnuwin32/system.c:129 src/unix/sys-unix.c:448
 msgid "reached session CPU time limit"
 msgstr "oturum işlemci zaman limitine erişildi"
 
-#: src/gnuwin32/system.c:132 src/unix/sys-unix.c:437
+#: src/gnuwin32/system.c:131 src/unix/sys-unix.c:450
 msgid "reached CPU time limit"
 msgstr "işlemci zaman limitine erişildi"
 
-#: src/gnuwin32/system.c:157
+#: src/gnuwin32/system.c:156
 #, c-format
 msgid "Fatal error: %s\n"
 msgstr "Ölümcül hata: %s\n"
 
-#: src/gnuwin32/system.c:335 src/unix/sys-std.c:863
+#: src/gnuwin32/system.c:334 src/unix/sys-std.c:866
 #, c-format
 msgid "encoding '%s' is not recognised"
 msgstr "'%s' kodlaması tanınmadı"
 
-#: src/gnuwin32/system.c:341 src/unix/sys-std.c:869
+#: src/gnuwin32/system.c:340 src/unix/sys-std.c:872
 #, c-format
 msgid "<ERROR: re-encoding failure from encoding '%s'>\n"
 msgstr "<HATA: '%s' kodlamasını tekrar kodlamada hata>\n"
 
-#: src/gnuwin32/system.c:555 src/gnuwin32/system.c:1049
-#: src/gnuwin32/system.c:1061 src/main/connections.c:590
-#: src/main/connections.c:595 src/main/dounzip.c:177 src/main/saveload.c:1961
-#: src/main/serialize.c:2552 src/main/serialize.c:2557
-#: src/main/serialize.c:2642 src/main/serialize.c:2687 src/unix/system.c:323
-#: src/unix/system.c:343
+#: src/gnuwin32/system.c:562 src/gnuwin32/system.c:1058
+#: src/gnuwin32/system.c:1070 src/main/connections.c:581
+#: src/main/connections.c:586 src/main/dounzip.c:178 src/main/saveload.c:1963
+#: src/main/serialize.c:2598 src/main/serialize.c:2603
+#: src/main/serialize.c:2688 src/main/serialize.c:2733 src/unix/system.c:328
 #, c-format
 msgid "cannot open file '%s': %s"
 msgstr "dosya '%s' açılamadı: %s"
 
-#: src/gnuwin32/system.c:569
+#: src/gnuwin32/system.c:576
 #, c-format
 msgid "file.show(): file '%s' does not exist\n"
 msgstr "file.show(): dosya '%s' mevcut değil\n"
 
-#: src/gnuwin32/system.c:970
+#: src/gnuwin32/system.c:979
 #, fuzzy, c-format
 msgid "WARNING: R_MAX_MEM_SIZE value is invalid: ignored\n"
 msgstr "UYARI: '%s' değeri geçersiz: görmezden gelindi\n"
 
-#: src/gnuwin32/system.c:1002
+#: src/gnuwin32/system.c:1011
 msgid "WARNING: no max-mem-size given\n"
 msgstr "UYARI: max-mem-size verilmemiş\n"
 
-#: src/gnuwin32/system.c:1009
+#: src/gnuwin32/system.c:1018
 #, c-format
 msgid "WARNING: --max-mem-size value is invalid: ignored\n"
 msgstr "UYARI: --max-mem-size değeri geçersiz: görmezden gelindi\n"
 
-#: src/gnuwin32/system.c:1012
+#: src/gnuwin32/system.c:1021
 #, c-format
 msgid "WARNING: --max-mem-size=%lu%c: too large and ignored\n"
 msgstr "UYARI: --max-mem-size=%lu%c: çok büyük, görmezden gelindi\n"
 
-#: src/gnuwin32/system.c:1018
+#: src/gnuwin32/system.c:1027
 #, c-format
 msgid "WARNING: --max-mem-size=%4.1fM: too small and ignored\n"
 msgstr "UYARI: --max-mem-size=%4.1fM: çok küçük, görmezden gelindi\n"
 
-#: src/gnuwin32/system.c:1023
+#: src/gnuwin32/system.c:1032
 #, c-format
 msgid "WARNING: --max-mem-size=%4.0fM: too large and taken as %uM\n"
 msgstr "UYARI: --max-mem-size=%4.0fM: çok büyük, %uM olarak olarak alındı\n"
 
-#: src/gnuwin32/system.c:1039
+#: src/gnuwin32/system.c:1048
 #, fuzzy, c-format
 msgid "option '%s' requires an argument"
 msgstr "binary işlemleri iki argüman gerektirir"
 
-#: src/gnuwin32/system.c:1070
+#: src/gnuwin32/system.c:1079
 #, fuzzy, c-format
 msgid "option '%s' requires a non-empty argument"
 msgstr "binary işlemleri iki argüman gerektirir"
 
-#: src/gnuwin32/system.c:1078 src/unix/system.c:362
+#: src/gnuwin32/system.c:1087 src/unix/system.c:347
 #, c-format
 msgid "WARNING: '-e %s' omitted as input is too long\n"
 msgstr "UYARI: '-e %s' giriş çok uzun olduğu için ihmal edildi\n"
 
-#: src/gnuwin32/system.c:1082 src/unix/system.c:375
+#: src/gnuwin32/system.c:1091 src/unix/system.c:360
 #, c-format
 msgid "WARNING: unknown option '%s'\n"
 msgstr "UYARI: bilinmeyen seçecek '%s'\n"
 
-#: src/gnuwin32/system.c:1104 src/unix/system.c:379
+#: src/gnuwin32/system.c:1113 src/unix/system.c:364
 #, c-format
 msgid "ARGUMENT '%s' __ignored__\n"
 msgstr "ARGÜMAN '%s' __yoksayıldı__\n"
 
-#: src/gnuwin32/system.c:1110 src/unix/system.c:386
+#: src/gnuwin32/system.c:1119 src/unix/system.c:371
 msgid "cannot use -e with -f or --file"
 msgstr "-e argümanı -f veye --file ile kullanılamaz"
 
-#: src/gnuwin32/system.c:1128
+#: src/gnuwin32/system.c:1137
 msgid "creation of tmpfile failed -- set TMPDIR suitably?"
 msgstr ""
 "geçicidosya oluşturulması sırasında hata -- TMPDIR uygun olarak belirlendi "
 "mi?"
 
-#: src/gnuwin32/system.c:1147 src/unix/system.c:437
+#: src/gnuwin32/system.c:1156 src/unix/system.c:422
 msgid "you must specify '--save', '--no-save' or '--vanilla'"
 msgstr "'--save', '--no-save' veya '--vanilla' seçmek zorundasınız"
 
-#: src/gnuwin32/system.c:1152
+#: src/gnuwin32/system.c:1161
 msgid ""
 "impossible to create 'reader thread'; you must free some system resources"
 msgstr ""
 "'reader thread' oluşturmak imkansız; sistem kaynaklarından bir miktar "
 "boşaltmalısınız"
 
-#: src/include/Errormsg.h:25 src/main/subscript.c:375 src/main/subscript.c:393
-#: src/main/subscript.c:417 src/main/subscript.c:456 src/main/subscript.c:584
-#: src/main/subscript.c:623 src/main/subscript.c:766
+#: src/include/Errormsg.h:27 src/main/subscript.c:383 src/main/subscript.c:401
+#: src/main/subscript.c:425 src/main/subscript.c:464 src/main/subscript.c:662
+#: src/main/subscript.c:701 src/main/subscript.c:844
 msgid "subscript out of bounds"
 msgstr "altindis sınırlar dışında"
 
-#: src/include/Errormsg.h:26
+#: src/include/Errormsg.h:28
 #, c-format
 msgid "object of type '%s' is not subsettable"
 msgstr "'%s' tipi nesne alt küme yapılamaz"
 
-#: src/main/CommandLineArgs.c:170
+#: src/main/CommandLineArgs.c:171
 #, fuzzy
 msgid "WARNING: no value given for --encoding"
 msgstr "UYARI: verilen --encoding için değer verilmedi\n"
 
-#: src/main/CommandLineArgs.c:195
+#: src/main/CommandLineArgs.c:196
 #, fuzzy, c-format
 msgid "WARNING: option '%s' no longer supported"
 msgstr "UYARI: '%s' seçeğeni artık desteklenmiyor\n"
 
-#: src/main/CommandLineArgs.c:206
+#: src/main/CommandLineArgs.c:207
 #, fuzzy, c-format
 msgid "WARNING: no value given for '%s'"
 msgstr "UYARI: '%s' için değer girilmedi\n"
 
-#: src/main/CommandLineArgs.c:216
+#: src/main/CommandLineArgs.c:217
 #, fuzzy, c-format
 msgid "WARNING: '%s' value is invalid: ignored"
 msgstr "UYARI: '%s' değeri geçersiz: görmezden gelindi\n"
 
-#: src/main/CommandLineArgs.c:220
+#: src/main/CommandLineArgs.c:221
 #, fuzzy, c-format
 msgid "WARNING: %s: too large and ignored"
 msgstr "UYARI: %s: çok büyük, görmezden gelindi\n"
 
-#: src/main/CommandLineArgs.c:234
+#: src/main/CommandLineArgs.c:235
 #, fuzzy
 msgid "WARNING: no value given for '--max-ppsize'"
 msgstr "UYARI: '--max-ppsize' için değer verilmedi\n"
 
-#: src/main/CommandLineArgs.c:239
+#: src/main/CommandLineArgs.c:240
 #, fuzzy
 msgid "WARNING: '--max-ppsize' value is negative: ignored"
 msgstr "UYARI: '--max-ppsize' değeri negatif: görmezden gelindi\n"
 
-#: src/main/CommandLineArgs.c:241
+#: src/main/CommandLineArgs.c:242
 #, fuzzy
 msgid "WARNING: '--max-ppsize' value is too small: ignored"
 msgstr "UYARI: '--max-ppsize' değeri çok küçük: görmezden gelindi\n"
 
-#: src/main/CommandLineArgs.c:244
+#: src/main/CommandLineArgs.c:245
 #, fuzzy
 msgid "WARNING: '--max-ppsize' value is too large: ignored"
 msgstr "UYARI: '--max-ppsize' değeri çok büyük: görmezden gelindi\n"
 
-#: src/main/RNG.c:175
+#: src/main/RNG.c:176
 #, c-format
 msgid "unif_rand: unimplemented RNG kind %d"
 msgstr "unif_rand: tanımlanmamış RNG çeşidi %d"
 
-#: src/main/RNG.c:260
+#: src/main/RNG.c:261
 #, c-format
 msgid "FixupSeeds: unimplemented RNG kind %d"
 msgstr "FixupSeeds: tanımlanmamış RNG türü %d"
 
-#: src/main/RNG.c:302
+#: src/main/RNG.c:301
 msgid "'user_unif_rand' not in load table"
 msgstr "'user_unif_rand' yükleme tablosunda değil"
 
-#: src/main/RNG.c:310
+#: src/main/RNG.c:309
 msgid "cannot read seeds unless 'user_unif_nseed' is supplied"
 msgstr "'user_unif_nseed' verilmezse okunamaz"
 
-#: src/main/RNG.c:315
+#: src/main/RNG.c:314
 msgid "seed length must be in 0...625; ignored"
 msgstr ""
 "başlangıç değeri uzunluğu 0...625 arasında olmalıdır; görmezden gelindi"
 
-#: src/main/RNG.c:323
+#: src/main/RNG.c:322
 #, c-format
 msgid "RNG_Init: unimplemented RNG kind %d"
 msgstr "RNG_Init: tanımlanmamış RNG çeşidi %d"
 
-#: src/main/RNG.c:354
+#: src/main/RNG.c:351
 #, fuzzy
 msgid "'.Random.seed' is a missing argument with no default"
 msgstr ".Random.seed varsayılı değer atanmayan eksik bir argüman"
 
-#: src/main/RNG.c:355
+#: src/main/RNG.c:352
 #, fuzzy, c-format
 msgid "'.Random.seed' is not an integer vector but of type '%s', so ignored"
 msgstr ".Random.seed '%s' tipinde ancak bir tamsayı vektörü değil"
 
-#: src/main/RNG.c:363
+#: src/main/RNG.c:360
 #, fuzzy
 msgid "'.Random.seed[1]' is not a valid integer, so ignored"
 msgstr ".Random.seed[1] geçerli bir tamsayı değil"
 
-#: src/main/RNG.c:369
+#: src/main/RNG.c:366
 #, fuzzy
 msgid "'.Random.seed[1]' is not a valid Normal type, so ignored"
 msgstr ".Random.seed[0] geçerli bir Normal yazım değil"
 
-#: src/main/RNG.c:383
+#: src/main/RNG.c:380
 #, fuzzy
 msgid "'.Random.seed[1] = 5' but no user-supplied generator, so ignored"
 msgstr ".Random.seed[1] = 5 "
 
-#: src/main/RNG.c:388
+#: src/main/RNG.c:385
 #, fuzzy
 msgid "'.Random.seed[1]' is not a valid RNG kind so ignored"
 msgstr ".Random.seed[1] geçerli bir rassal sayı üreteci çeşidi değil (kod)"
 
-#: src/main/RNG.c:415
+#: src/main/RNG.c:412
 #, fuzzy
 msgid "'.Random.seed' has wrong length"
 msgstr ".Random.seed yanlış uzunlukta"
 
-#: src/main/RNG.c:468
+#: src/main/RNG.c:465
 #, c-format
 msgid "RNGkind: unimplemented RNG kind %d"
 msgstr "RNGkind: tanımlanmamış RNG çeşidi %d"
 
-#: src/main/RNG.c:488
+#: src/main/RNG.c:485
 #, fuzzy
 msgid "invalid Normal type in 'RNGkind'"
 msgstr "RNGçeşidinde geçersiz Normal tipi"
 
-#: src/main/RNG.c:491
+#: src/main/RNG.c:488
 msgid "'user_norm_rand' not in load table"
 msgstr "'user_norm_rand' yükleme tablosunda değil"
 
-#: src/main/RNG.c:535
+#: src/main/RNG.c:532
 msgid "supplied seed is not a valid integer"
 msgstr "verilen başlangıç değeri geçerli bir tamsayı değil"
 
@@ -649,7 +631,7 @@ msgstr "DLLadı '%s' çok uzun"
 msgid "could not allocate space for 'name'"
 msgstr "'name' için yer ayrılamadı"
 
-#: src/main/Rdynload.c:881 src/main/Rdynload.c:897 src/main/util.c:698
+#: src/main/Rdynload.c:881 src/main/Rdynload.c:897 src/main/util.c:762
 msgid "character argument expected"
 msgstr "karakterli argüman bekleniyor"
 
@@ -668,33 +650,34 @@ msgid "shared object '%s' was not loaded"
 msgstr "paylaşılan nesne '%s' yüklenmedi"
 
 #: src/main/Rdynload.c:979
-#, c-format
-msgid "cannot allocate memory for registered native symbol (%d bytes)"
-msgstr "kayıtlı yerel sembol için yer ayrılamadı (%d bayt)"
+#, fuzzy, c-format
+msgid "cannot allocate memory for registered native symbol (%d byte)"
+msgid_plural "cannot allocate memory for registered native symbol (%d bytes)"
+msgstr[0] "kayıtlı yerel sembol için yer ayrılamadı (%d bayt)"
 
-#: src/main/Rdynload.c:1100 src/main/Rdynload.c:1321
+#: src/main/Rdynload.c:1102 src/main/Rdynload.c:1323
 msgid "must pass package name or DllInfo reference"
 msgstr "DllInfo referansı veya paket adı verilmeli"
 
-#: src/main/Rdynload.c:1197
+#: src/main/Rdynload.c:1199
 #, fuzzy, c-format
 msgid "unimplemented type %d in 'createRSymbolObject'"
 msgstr "createRSymbolObject'de tanımlanmamış tip %d"
 
-#: src/main/Rdynload.c:1279 src/main/Rdynload.c:1373
+#: src/main/Rdynload.c:1281 src/main/Rdynload.c:1375
 msgid "R_getRegisteredRoutines() expects a DllInfo reference"
 msgstr "R_getRegisteredRoutines() DllInfo referansı bekler"
 
-#: src/main/Rdynload.c:1282 src/main/Rdynload.c:1376
+#: src/main/Rdynload.c:1284 src/main/Rdynload.c:1378
 msgid "NULL value passed for DllInfo"
 msgstr "DllInfo için NULL değeri geçirildi"
 
-#: src/main/Rdynload.c:1436
+#: src/main/Rdynload.c:1441
 #, c-format
 msgid "function '%s' not provided by package '%s'"
 msgstr "fonksiyon '%s' '%s' paketi tarafından sağlanmadı"
 
-#: src/main/Rdynload.c:1438
+#: src/main/Rdynload.c:1443
 msgid "table entry must be an external pointer"
 msgstr "tablo girişi bir dış gösterici olmalıdır"
 
@@ -703,9 +686,9 @@ msgstr "tablo girişi bir dış gösterici olmalıdır"
 msgid "problem in setting variable '%s' in Renviron"
 msgstr "zaman dilimini ayarlarken bir sorun oluştu"
 
-#: src/main/Renviron.c:311
-#, fuzzy
-msgid "argument 'x' must be a character string"
+#: src/main/Renviron.c:311 src/main/objects.c:1174 src/main/raw.c:155
+#, fuzzy, c-format
+msgid "argument '%s' must be a character string"
 msgstr "'code' argümanı bir karakter dizesi olmalı"
 
 #: src/main/Renviron.c:315
@@ -713,94 +696,121 @@ msgstr "'code' argümanı bir karakter dizesi olmalı"
 msgid "file '%s' cannot be opened for reading"
 msgstr "zip dosyası '%s' açılamaz"
 
-#: src/main/Rstrptime.h:517 src/main/Rstrptime.h:984
+#: src/main/Rstrptime.h:524 src/main/Rstrptime.h:991
 #, c-format
 msgid "use of %s for input is not supported"
 msgstr "giriş için %s kullanımı desteklenmiyor"
 
-#: src/main/Rstrptime.h:1242
+#: src/main/Rstrptime.h:1263
 msgid "input string is too long"
 msgstr "giriş dizesi çok uzun"
 
-#: src/main/Rstrptime.h:1244
+#: src/main/Rstrptime.h:1265
 msgid "invalid multibyte input string"
 msgstr "geçersiz çokbaytlı giriş dizesi "
 
-#: src/main/Rstrptime.h:1247
+#: src/main/Rstrptime.h:1268
 msgid "format string is too long"
 msgstr "biçim dizesi çok uzun"
 
-#: src/main/Rstrptime.h:1249
+#: src/main/Rstrptime.h:1270
 msgid "invalid multibyte format string"
 msgstr "geçersiz çokbaytlı biçim dizesi "
 
-#: src/main/agrep.c:133 src/main/agrep.c:777 src/main/character.c:1039
-#: src/main/character.c:1043 src/main/grep.c:769 src/main/grep.c:1512
-#: src/main/grep.c:1516 src/main/grep.c:2325 src/main/grep.c:2623
+#: src/main/agrep.c:133 src/main/agrep.c:778 src/main/character.c:1291
+#: src/main/character.c:1295 src/main/grep.c:782 src/main/grep.c:1530
+#: src/main/grep.c:1534 src/main/grep.c:2347 src/main/grep.c:2654
 #, c-format
 msgid "argument '%s' has length > 1 and only the first element will be used"
 msgstr "'%s' argümanı boyutu > 1, sadece ilk öğe kullanılacak"
 
-#: src/main/agrep.c:189 src/main/agrep.c:818
+#: src/main/agrep.c:190 src/main/agrep.c:820
 #, fuzzy
 msgid "'pattern' must be a non-empty character string"
 msgstr "'title' bir karakter dizesi olmalıdır"
 
-#: src/main/agrep.c:200 src/main/agrep.c:827 src/main/grep.c:838
-#: src/main/grep.c:2381 src/main/grep.c:2662
+#: src/main/agrep.c:201 src/main/agrep.c:829 src/main/grep.c:853
+#: src/main/grep.c:2405 src/main/grep.c:2707
 msgid "regular expression is invalid in this locale"
 msgstr "düzenli ifade bu yerelde geçersiz"
 
-#: src/main/agrep.c:206 src/main/agrep.c:623
+#: src/main/agrep.c:207 src/main/agrep.c:624
 #, c-format
 msgid "regcomp error:  '%s'"
 msgstr "regcomp hatası: '%s'"
 
-#: src/main/agrep.c:238 src/main/agrep.c:871 src/main/grep.c:227
-#: src/main/grep.c:315 src/main/grep.c:423 src/main/grep.c:578
-#: src/main/grep.c:889 src/main/grep.c:2480 src/main/grep.c:2548
-#: src/main/grep.c:2698
+#: src/main/agrep.c:239 src/main/agrep.c:874 src/main/grep.c:233
+#: src/main/grep.c:323 src/main/grep.c:434 src/main/grep.c:590
+#: src/main/grep.c:907 src/main/grep.c:2510 src/main/grep.c:2579
+#: src/main/grep.c:2744
 #, c-format
 msgid "input string %d is invalid in this locale"
 msgstr "giriş dizesi %d bu yerelde geçersiz"
 
-#: src/main/agrep.c:525 src/main/agrep.c:765 src/main/grep.c:155
-#: src/main/grep.c:760 src/main/grep.c:762 src/main/grep.c:1047
-#: src/main/grep.c:1055 src/main/grep.c:1503 src/main/grep.c:1505
-#: src/main/grep.c:2315 src/main/grep.c:2317 src/main/grep.c:2611
+#: src/main/agrep.c:526 src/main/agrep.c:766 src/main/grep.c:159
+#: src/main/grep.c:773 src/main/grep.c:775 src/main/grep.c:1065
+#: src/main/grep.c:1073 src/main/grep.c:1521 src/main/grep.c:1523
+#: src/main/grep.c:2337 src/main/grep.c:2339 src/main/grep.c:2642
 #, c-format
 msgid "argument '%s' will be ignored"
 msgstr "argüman '%s' görmezden gelinecek"
 
-#: src/main/agrep.c:614
+#: src/main/agrep.c:615
 #, fuzzy, c-format
 msgid "input string x[%d] is invalid in this locale"
 msgstr "giriş dizesi %d bu yerelde geçersiz"
 
-#: src/main/agrep.c:660
+#: src/main/agrep.c:661
 #, fuzzy, c-format
 msgid "input string y[%d] is invalid in this locale"
 msgstr "giriş dizesi %d bu yerelde geçersiz"
 
-#: src/main/agrep.c:833 src/main/grep.c:2668
+#: src/main/agrep.c:835 src/main/grep.c:2713
 #, fuzzy, c-format
 msgid "regcomp error: '%s'"
 msgstr "regcomp hatası: '%s'"
 
-#: src/main/apply.c:103
+#: src/main/apply.c:98
 #, fuzzy
 msgid "'FUN.VALUE' must be a vector"
 msgstr "FUN.VALUE bir vektör olmalıdır"
 
-#: src/main/apply.c:108 src/main/complex.c:758
+#: src/main/apply.c:100 src/main/array.c:506 src/main/character.c:847
+#: src/main/character.c:1655 src/main/connections.c:3551
+#: src/main/context.c:653 src/main/context.c:672 src/main/datetime.c:681
+#: src/main/datetime.c:783 src/main/datetime.c:1047 src/main/dotcode.c:222
+#: src/main/errors.c:910 src/main/errors.c:943 src/main/errors.c:1049
+#: src/main/errors.c:1074 src/main/errors.c:1079 src/main/errors.c:1349
+#: src/main/identical.c:66 src/main/identical.c:67 src/main/identical.c:68
+#: src/main/identical.c:69 src/main/identical.c:70 src/main/platform.c:2982
+#: src/main/seq.c:192 src/main/seq.c:343 src/main/seq.c:348 src/main/seq.c:352
+#: src/main/seq.c:397 src/main/seq.c:401 src/main/seq.c:405
+#: src/main/sort.c:1244 src/main/sort.c:1327 src/main/sort.c:1331
+#: src/main/sort.c:1338 src/main/source.c:225 src/main/summary.c:954
+#: src/main/sysutils.c:250 src/main/util.c:1051 src/main/util.c:1056
+#: src/main/util.c:1063 src/main/util.c:1066 src/main/util.c:2035
+#: src/modules/X11/devX11.c:3148 src/modules/X11/devX11.c:3175
+#: src/modules/X11/devX11.c:3180 src/modules/X11/devX11.c:3185
+#: src/modules/X11/devX11.c:3195 src/modules/X11/devX11.c:3200
+#: src/modules/X11/devX11.c:3204 src/modules/X11/devX11.c:3208
+#, c-format
+msgid "invalid '%s' value"
+msgstr "geçersiz '%s' değeri"
+
+#: src/main/apply.c:103 src/main/complex.c:753
 msgid "invalid length"
 msgstr "geçersiz uzunluk"
 
-#: src/main/apply.c:113
+#: src/main/apply.c:108
 msgid "long vectors are not supported for matrix/array results"
 msgstr ""
 
-#: src/main/apply.c:162
+#: src/main/apply.c:115
+#, c-format
+msgid "type '%s' is not supported"
+msgstr "tip '%s' desteklenmiyor"
+
+#: src/main/apply.c:163
 #, c-format
 msgid ""
 "values must be length %d,\n"
@@ -809,7 +819,7 @@ msgstr ""
 "değerler %d uzunluğunda olmalı\n"
 " ancak FUN(X[[%d]]) sonucu %d uzunluğunda"
 
-#: src/main/apply.c:174
+#: src/main/apply.c:175
 #, c-format
 msgid ""
 "values must be type '%s',\n"
@@ -818,17 +828,12 @@ msgstr ""
 "değerler '%s' tipinde olmalı\n"
 " ancak FUN(X[[%d]]) sonucu '%s' tipinde"
 
-#: src/main/apply.c:193
-#, c-format
-msgid "type '%s' is not supported"
-msgstr "tip '%s' desteklenmiyor"
-
-#: src/main/apply.c:225
+#: src/main/apply.c:252
 #, c-format
 msgid "dimnames(<value>) is neither NULL nor list of length %d"
 msgstr ""
 
-#: src/main/arithmetic.c:42
+#: src/main/arithmetic.c:42 src/main/eval.c:3633
 msgid "NaNs produced"
 msgstr "NaNs üretimi"
 
@@ -837,415 +842,428 @@ msgstr "NaNs üretimi"
 msgid "non-numeric argument to mathematical function"
 msgstr "matematiksel fonksiyona sayısal olmayan argüman"
 
-#: src/main/arithmetic.c:187
+#: src/main/arithmetic.c:186
 msgid "probable complete loss of accuracy in modulus"
 msgstr "modülde tam doğruluk kaybı muhtemel"
 
-#: src/main/arithmetic.c:337
+#: src/main/arithmetic.c:298
 msgid "NAs produced by integer overflow"
 msgstr "Tamsayı taşmasından üretilen NAs"
 
-#: src/main/arithmetic.c:538
+#: src/main/arithmetic.c:499
 msgid "operator needs one or two arguments"
 msgstr "operatör bir veya iki argümana ihtiyaç duyar"
 
-#: src/main/arithmetic.c:554
+#: src/main/arithmetic.c:515
 msgid "non-numeric argument to binary operator"
 msgstr "ikili operatöre sayısal olmayan argüman"
 
-#: src/main/arithmetic.c:615 src/main/relop.c:227
+#: src/main/arithmetic.c:576 src/main/relop.c:221
 msgid "non-conformable arrays"
 msgstr "uygun olmayan diziler"
 
-#: src/main/arithmetic.c:658
+#: src/main/arithmetic.c:619
 msgid "non-conformable time-series"
 msgstr "uygun olmayan zaman-serileri"
 
-#: src/main/arithmetic.c:680 src/main/logic.c:143 src/main/relop.c:166
-#: src/main/relop.c:265
+#: src/main/arithmetic.c:641 src/main/logic.c:135 src/main/relop.c:160
+#: src/main/relop.c:259
 msgid "longer object length is not a multiple of shorter object length"
 msgstr "uzun olan nesne uzunluğu kısa olan nesne uzunluğunun bir katı değil "
 
-#: src/main/arithmetic.c:751
+#: src/main/arithmetic.c:712
 msgid "invalid argument to unary operator"
 msgstr "birli operatöre geçersiz argüman"
 
-#: src/main/arithmetic.c:780 src/main/arithmetic.c:805
-#: src/main/arithmetic.c:824
+#: src/main/arithmetic.c:741 src/main/arithmetic.c:766
+#: src/main/arithmetic.c:785
 msgid "invalid unary operator"
 msgstr "geçersiz birli operatör"
 
-#: src/main/arithmetic.c:1241
+#: src/main/arithmetic.c:1191
 msgid "unimplemented real function of 1 argument"
 msgstr "1 argümanın tanımlanmamış gerçek fonksiyonu"
 
-#: src/main/arithmetic.c:1255 src/main/complex.c:648 src/main/complex.c:718
+#: src/main/arithmetic.c:1205 src/main/complex.c:638 src/main/complex.c:708
 msgid "unimplemented complex function"
 msgstr "tanımlanmamış (uygulanamayan) kompleks fonksiyon"
 
-#: src/main/arithmetic.c:1526 src/main/arithmetic.c:1877
-#: src/main/arithmetic.c:2056 src/main/arithmetic.c:2168
+#: src/main/arithmetic.c:1484 src/main/arithmetic.c:1877
+#: src/main/arithmetic.c:2049 src/main/arithmetic.c:2152
 #, c-format
 msgid "unimplemented real function of %d numeric arguments"
 msgstr "%d sayısal argümanın tanımlanmamış gerçek fonksiyonu"
 
-#: src/main/arithmetic.c:1552
-#, c-format
-msgid "%d arguments passed to '%s' which requires 1 or 2"
-msgstr "%d argüman aktarıldı ('%s' 1 veya 2 argüman gerektiriyor)"
+#: src/main/arithmetic.c:1511
+#, fuzzy, c-format
+msgid "%d argument passed to '%s' which requires 1 or 2 arguments"
+msgid_plural "%d arguments passed to '%s'which requires 1 or 2 arguments"
+msgstr[0] "%d argüman aktarıldı ('%s' 1 veya 2 argüman gerektiriyor)"
 
-#: src/main/arithmetic.c:1570
+#: src/main/arithmetic.c:1530
 msgid "invalid second argument of length 0"
 msgstr "0 uzunluğunda geçersiz ikinci argüman"
 
-#: src/main/arithmetic.c:1639
+#: src/main/arithmetic.c:1625 src/main/arithmetic.c:1643 src/main/envir.c:1464
+#: src/main/envir.c:1972 src/main/eval.c:630 src/main/eval.c:4237
+#, c-format
+msgid "argument \"%s\" is missing, with no default"
+msgstr "varsayılanı olmayan \"%s\" argümanı yok"
+
+#: src/main/arithmetic.c:1649
 msgid "invalid argument 'base' of length 0"
 msgstr "0 birim uzunluğunda geçersiz argüman 'base'"
 
-#: src/main/arithmetic.c:1647
-#, c-format
-msgid "%d arguments passed to 'log' which requires 1 or 2"
-msgstr "1 veya 2 argüman gerektiren 'log'a %d argüman verildi"
-
-#: src/main/array.c:79 src/main/array.c:1441
+#: src/main/array.c:82 src/main/array.c:1591
 #, fuzzy, c-format
 msgid "'data' must be of a vector type, was '%s'"
 msgstr "'data' bir vektörü tipinde olmalıdır"
 
-#: src/main/array.c:94 src/main/array.c:102
+#: src/main/array.c:97 src/main/array.c:105
 msgid "non-numeric matrix extent"
 msgstr "sayısal olmayan matris boyutu"
 
-#: src/main/array.c:97 src/main/array.c:1535
+#: src/main/array.c:100 src/main/array.c:1695
 msgid "invalid 'nrow' value (too large or NA)"
 msgstr "geçersiz 'nrow' değeri (çok büyük veya NA)"
 
-#: src/main/array.c:99 src/main/array.c:1537
+#: src/main/array.c:102 src/main/array.c:1697
 msgid "invalid 'nrow' value (< 0)"
 msgstr "geçersiz 'nrow' değeri (< 0)"
 
-#: src/main/array.c:105 src/main/array.c:1540
+#: src/main/array.c:108 src/main/array.c:1700
 msgid "invalid 'ncol' value (too large or NA)"
 msgstr "geçersiz 'ncol' değeri (çok büyük veya YOK)"
 
-#: src/main/array.c:107 src/main/array.c:1542
+#: src/main/array.c:110 src/main/array.c:1702
 msgid "invalid 'ncol' value (< 0)"
 msgstr "geçersiz 'ncol' değeri (< 0)"
 
-#: src/main/array.c:116
+#: src/main/array.c:119
 msgid "nc = 0 for non-null data"
 msgstr ""
 
-#: src/main/array.c:124
+#: src/main/array.c:127
 msgid "nr = 0 for non-null data"
 msgstr ""
 
-#: src/main/array.c:135
+#: src/main/array.c:138
 #, c-format
 msgid ""
 "data length [%d] is not a sub-multiple or multiple of the number of rows [%d]"
 msgstr "veri uzunluğu [%d] dize sayısının [%d] böleni veya tam böleni değil"
 
-#: src/main/array.c:138
+#: src/main/array.c:141
 #, c-format
 msgid ""
 "data length [%d] is not a sub-multiple or multiple of the number of columns "
 "[%d]"
 msgstr "veri uzunluğu [%d] sütun sayılarının böleni veya tam böleni değil [%d]"
 
-#: src/main/array.c:141
+#: src/main/array.c:144
 msgid "data length exceeds size of matrix"
 msgstr "veri uzunluğu matris boyutunu aşıyor"
 
-#: src/main/array.c:147 src/main/array.c:1453 src/main/array.c:1549
+#: src/main/array.c:150 src/main/array.c:1603 src/main/array.c:1709
 msgid "too many elements specified"
 msgstr "çok fazla eleman seçildi"
 
-#: src/main/array.c:205
+#: src/main/array.c:208
 msgid "negative extents to matrix"
 msgstr "negatif boyutlu matris"
 
-#: src/main/array.c:208
+#: src/main/array.c:211
 msgid "allocMatrix: too many elements specified"
 msgstr "allocMatrix: çok fazla eleman seçildi"
 
-#: src/main/array.c:236
+#: src/main/array.c:239
 msgid "negative extents to 3D array"
 msgstr "negatif 3B dizi"
 
-#: src/main/array.c:239
+#: src/main/array.c:242
 #, fuzzy
 msgid "'alloc3Darray': too many elements specified"
 msgstr "alloc3Darray: çok fazla eleman seçildi"
 
-#: src/main/array.c:264
+#: src/main/array.c:267
 #, fuzzy
 msgid "'allocArray': too many elements specified by 'dims'"
 msgstr "allocArray: 'dims' ile çok fazla eleman belirlenmiş"
 
-#: src/main/array.c:448
+#: src/main/array.c:523
+#, fuzzy, c-format
+msgid "'%s' must be a list or atomic vector"
+msgstr "'x' bir karakter vektörü olmalı"
+
+#: src/main/array.c:561
 #, fuzzy, c-format
 msgid "a matrix-like object is required as argument to '%s'"
 msgstr "'row/col'a bir matris benzeri nesne gereklidir"
 
-#: src/main/array.c:662
+#: src/main/array.c:776
 msgid "requires numeric/complex matrix/vector arguments"
 msgstr "sayısal/karmaşık sayısal matris/vektör argümanları gerektirir"
 
-#: src/main/array.c:752 src/main/array.c:756 src/main/array.c:760
+#: src/main/array.c:886 src/main/array.c:890 src/main/array.c:894
 msgid "non-conformable arguments"
 msgstr "uygun olmayan argümanlar"
 
-#: src/main/array.c:1058
+#: src/main/array.c:1193
 msgid "argument is not a matrix"
 msgstr "argüman bir matris değil"
 
-#: src/main/array.c:1093
+#: src/main/array.c:1228
 msgid "invalid first argument, must be an array"
 msgstr "geçersiz ilk argüman, bir dizi olmalı"
 
-#: src/main/array.c:1107
+#: src/main/array.c:1242
 #, fuzzy, c-format
 msgid "'perm' is of wrong length %d (!= %d)"
 msgstr "yanlış uzunlukta 'perm'"
 
-#: src/main/array.c:1112 src/main/array.c:1115
+#: src/main/array.c:1247 src/main/array.c:1250
 msgid "'a' does not have named dimnames"
 msgstr "'a' boyut ismi olarak isimlendirilemez"
 
-#: src/main/array.c:1122
+#: src/main/array.c:1257
 #, fuzzy, c-format
 msgid "'perm[%d]' does not match a dimension name"
 msgstr "perm[%d] bir boyut ismiyle uyuşmuyo"
 
-#: src/main/array.c:1135
+#: src/main/array.c:1270
 msgid "value out of range in 'perm'"
 msgstr "'perm' de değer sınırlar dışında"
 
-#: src/main/array.c:1217
+#: src/main/array.c:1352
 msgid "'resize' must be TRUE or FALSE"
 msgstr "'resize' DOĞRU yada YANLIŞ olmalı"
 
-#: src/main/array.c:1275
+#: src/main/array.c:1422
 msgid "'x' must be numeric"
 msgstr "'x' sayısal olmalı"
 
-#: src/main/array.c:1449
+#: src/main/array.c:1425
+#, fuzzy
+msgid "'x' is too short"
+msgstr "'object' çok kısa"
+
+#: src/main/array.c:1599
 #, fuzzy
 msgid "'dims' cannot be of length 0"
 msgstr "'hadj' bir birim uzunluğunda olmalıdır"
 
-#: src/main/array.c:1545
+#: src/main/array.c:1705
 #, fuzzy
 msgid "'x' must have positive length"
 msgstr "'value' pozitif bir değer olmalı"
 
-#: src/main/array.c:1605
+#: src/main/array.c:1771
 #, c-format
 msgid "singular matrix in 'backsolve'. First zero in diagonal [%d]"
 msgstr ""
 
-#: src/main/attrib.c:40 src/main/attrib.c:235 src/main/attrib.c:269
-#: src/main/attrib.c:291 src/main/attrib.c:405 src/main/attrib.c:452
-#: src/main/attrib.c:502
+#: src/main/attrib.c:40 src/main/attrib.c:231 src/main/attrib.c:265
+#: src/main/attrib.c:287 src/main/attrib.c:403 src/main/attrib.c:450
+#: src/main/attrib.c:501
 msgid "attempt to set an attribute on NULL"
 msgstr "BOŞ'a nitelik belirleme denemesi "
 
-#: src/main/attrib.c:72
+#: src/main/attrib.c:77
 #, c-format
 msgid "row names must be 'character' or 'integer', not '%s'"
 msgstr "dize isimleri '%s' değil,  'character' veya 'integer' olmalıdır"
 
-#: src/main/attrib.c:124
+#: src/main/attrib.c:130
 #, c-format
 msgid "getAttrib: invalid type (%s) for TAG"
 msgstr "getAttrib: TAG için geçersiz tip (%s)"
 
-#: src/main/attrib.c:379
+#: src/main/attrib.c:377
 #, c-format
 msgid "invalid type (%s) for 'names': must be vector"
 msgstr "'names' için geçersiz tip (%s): vektör olmalı"
 
-#: src/main/attrib.c:382
+#: src/main/attrib.c:380
 #, c-format
 msgid "'names' attribute [%d] must be the same length as the vector [%d]"
 msgstr "'names! özelliği [%d] vektör ile aynı uzunlukta olmalıdır [%d]"
 
-#: src/main/attrib.c:387
+#: src/main/attrib.c:385
 msgid "names() applied to a non-vector"
 msgstr "names() vektör olmayan bir öğeye uygulandı"
 
-#: src/main/attrib.c:395
+#: src/main/attrib.c:393
 msgid "invalid time series parameters specified"
 msgstr "geçersiz zaman serileri parametreleri seçildi"
 
-#: src/main/attrib.c:409
+#: src/main/attrib.c:407
 msgid "'tsp' attribute must be numeric"
 msgstr "'tsp' niteliği sayısal olmalı"
 
-#: src/main/attrib.c:415
+#: src/main/attrib.c:413
 msgid "'tsp' attribute must be numeric of length three"
 msgstr "'tsp' niteliği 3 rakamdan oluşan bir sayı olmalı"
 
-#: src/main/attrib.c:432
+#: src/main/attrib.c:430
 msgid "cannot assign 'tsp' to zero-length vector"
 msgstr "'tsp' sıfır uzunluğunda vektör atanamaz"
 
-#: src/main/attrib.c:463
+#: src/main/attrib.c:461
 msgid "attempt to set invalid 'comment' attribute"
 msgstr "geçersiz 'comment' niteliği belirleme denemesi"
 
-#: src/main/attrib.c:511
+#: src/main/attrib.c:510
 msgid "adding class \"factor\" to an invalid object"
 msgstr "geçersiz bir nesneye \"factor\" sınıfı ekleniyor"
 
-#: src/main/attrib.c:519
+#: src/main/attrib.c:541
 msgid "attempt to set invalid 'class' attribute"
 msgstr "geçersiz 'class' niteliği belirleme denemesi"
 
-#: src/main/attrib.c:777
+#: src/main/attrib.c:872
 #, c-format
 msgid "class '%s' has no 'names' slot"
 msgstr ""
 
-#: src/main/attrib.c:779
+#: src/main/attrib.c:874
 #, c-format
 msgid ""
 "class '%s' has no 'names' slot; assigning a names attribute will create an "
 "invalid object"
 msgstr ""
 
-#: src/main/attrib.c:782
+#: src/main/attrib.c:877
 #, c-format
 msgid ""
 "invalid to use names()<- to set the 'names' slot in a non-vector class ('%s')"
 msgstr ""
 
-#: src/main/attrib.c:812
+#: src/main/attrib.c:907
 msgid "incompatible 'names' argument"
 msgstr "uyumsuz 'names' argümanı"
 
-#: src/main/attrib.c:867
+#: src/main/attrib.c:962
 #, c-format
 msgid "invalid type (%s) to set 'names' attribute"
 msgstr "'names' niteliği belirlemek için geçersiz tip (%s)"
 
-#: src/main/attrib.c:938
+#: src/main/attrib.c:1035
 msgid "'dimnames' applied to non-array"
 msgstr "'dimnames' dizi olmayana uygulandı"
 
-#: src/main/attrib.c:943
-msgid "'dimnames' must be a list"
-msgstr "'dimnames' bir liste olmalıdır"
+#: src/main/attrib.c:1040 src/main/coerce.c:2471
+#, fuzzy, c-format
+msgid "'%s' must be a list"
+msgstr "'%s' bir liste olmalıdır"
 
-#: src/main/attrib.c:946 src/main/attrib.c:974
+#: src/main/attrib.c:1043 src/main/attrib.c:1071
 #, c-format
 msgid "length of 'dimnames' [%d] must match that of 'dims' [%d]"
 msgstr "'dimnames' uzunluğu [%d] bu 'dims' [%d] ile eşleşmelidir"
 
-#: src/main/attrib.c:980
+#: src/main/attrib.c:1077
 #, c-format
 msgid "invalid type (%s) for 'dimnames' (must be a vector)"
 msgstr "'dimnames' için geçersiz tip (%s) (vektör olmalıdır)"
 
-#: src/main/attrib.c:983
+#: src/main/attrib.c:1080
 #, c-format
 msgid "length of 'dimnames' [%d] not equal to array extent"
 msgstr "'dimnames' [%d] uzunluğu dizi uzattmasına eşit değil"
 
-#: src/main/attrib.c:1055 src/main/builtin.c:75 src/main/builtin.c:112
-#: src/main/envir.c:1606 src/main/envir.c:1734 src/main/envir.c:1796
-#: src/main/envir.c:1918 src/main/paste.c:74 src/main/paste.c:293
-#: src/main/random.c:487 src/main/random.c:516 src/main/unique.c:1749
+#: src/main/attrib.c:1152 src/main/builtin.c:75 src/main/builtin.c:112
+#: src/main/envir.c:1740 src/main/envir.c:1868 src/main/envir.c:1928
+#: src/main/envir.c:2065 src/main/paste.c:74 src/main/paste.c:293
+#: src/main/random.c:479 src/main/random.c:508 src/main/unique.c:1746
 msgid "invalid first argument"
 msgstr "geçersiz ilk argüman"
 
-#: src/main/attrib.c:1058
+#: src/main/attrib.c:1155
 msgid "invalid second argument"
 msgstr "geçeriz ikinci argüman"
 
-#: src/main/attrib.c:1066
+#: src/main/attrib.c:1163
 msgid "length-0 dimension vector is invalid"
 msgstr "0-uzunluk boyut vektörü geçersiz"
 
-#: src/main/attrib.c:1071
+#: src/main/attrib.c:1168
 msgid "the dims contain missing values"
 msgstr "dimler eksik değerler içeriyor"
 
-#: src/main/attrib.c:1073
+#: src/main/attrib.c:1170
 msgid "the dims contain negative values"
 msgstr "dimler negatif değerler içeriyor"
 
-#: src/main/attrib.c:1078
+#: src/main/attrib.c:1175
 #, fuzzy
 msgid "dims do not match the length of object"
 msgstr "dims [product %d] [%d] nesnesinin uzunluğuyla eşleşmiyor"
 
-#: src/main/attrib.c:1080
+#: src/main/attrib.c:1177
 #, c-format
 msgid "dims [product %d] do not match the length of object [%d]"
 msgstr "dims [product %d] [%d] nesnesinin uzunluğuyla eşleşmiyor"
 
-#: src/main/attrib.c:1177
+#: src/main/attrib.c:1284
 msgid "attributes must be a list or NULL"
 msgstr "nitelikler bir liste veya NULL olmalıdır"
 
-#: src/main/attrib.c:1182
+#: src/main/attrib.c:1289
 msgid "attributes must be named"
 msgstr "nitelikler isimlendirilmelidir"
 
-#: src/main/attrib.c:1186
+#: src/main/attrib.c:1293
 #, c-format
 msgid "all attributes must have names [%d does not]"
 msgstr "bütün nitelikler isime sahip olmalıdır [%d değil]"
 
-#: src/main/attrib.c:1285
+#: src/main/attrib.c:1393
 msgid "'which' must be of mode character"
 msgstr "'which' mod karakterinin olmalıdır"
 
-#: src/main/attrib.c:1287
+#: src/main/attrib.c:1395
 msgid "exactly one attribute 'which' must be given"
 msgstr "tam olarak bir 'which' nitelik verilmelidir"
 
-#: src/main/attrib.c:1345 src/main/attrib.c:1368 src/main/subscript.c:240
-#: src/main/subscript.c:244 src/main/subset.c:1188 src/main/subset.c:1239
+#: src/main/attrib.c:1456 src/main/attrib.c:1479 src/main/subscript.c:245
+#: src/main/subscript.c:249 src/main/subset.c:1257 src/main/subset.c:1311
 #, c-format
 msgid "partial match of '%s' to '%s'"
 msgstr "'%s' den '%s' e kısmi eşleşme"
 
-#: src/main/attrib.c:1406
+#: src/main/attrib.c:1525
 #, fuzzy, c-format
 msgid "invalid type '%s' for slot name"
 msgstr "slot ismi için geçersiz tip yada uzunluk"
 
-#: src/main/attrib.c:1444
+#: src/main/attrib.c:1563
 msgid "'name' must be non-null character string"
 msgstr "'name' boş olmayan bir karakter dizesi olmalıdır"
 
-#: src/main/attrib.c:1568 src/main/attrib.c:1639 src/main/attrib.c:1676
+#: src/main/attrib.c:1688 src/main/attrib.c:1759 src/main/attrib.c:1797
 msgid "invalid type or length for slot name"
 msgstr "slot ismi için geçersiz tip yada uzunluk"
 
-#: src/main/attrib.c:1602
+#: src/main/attrib.c:1722
 #, c-format
 msgid "cannot get a slot (\"%s\") from an object of type \"%s\""
 msgstr "(\"%s\") slotu alınamıyor (\"%s\" tipinde nesneden)"
 
-#: src/main/attrib.c:1613
+#: src/main/attrib.c:1733
 #, c-format
 msgid "no slot of name \"%s\" for this object of class \"%s\""
 msgstr "\"%s\" adında bir slot yok (\"%s\" sınıfında bir nesne için)"
 
-#: src/main/attrib.c:1630
+#: src/main/attrib.c:1750
 msgid "attempt to set slot on NULL object"
 msgstr "NULL nesnede slot belirleme denemesi"
 
-#: src/main/attrib.c:1671
+#: src/main/attrib.c:1792
 #, fuzzy
 msgid "formal classes cannot be used without the 'methods' package"
 msgstr "biçimsel sınıfsal methods paketi olmadan kullanılamaz"
 
-#: src/main/attrib.c:1683
+#: src/main/attrib.c:1804
 #, c-format
 msgid ""
 "trying to get slot \"%s\" from an object of a basic class (\"%s\") with no "
@@ -1254,7 +1272,7 @@ msgstr ""
 "slot \"%s\" alınmaya çalışılıyor (slotu olmayan bir temel sınıf -\"%s\"-'in "
 "bir nesnesinden)"
 
-#: src/main/attrib.c:1687
+#: src/main/attrib.c:1808
 #, c-format
 msgid ""
 "trying to get slot \"%s\" from an object (class \"%s\") that is not an S4 "
@@ -1263,47 +1281,46 @@ msgstr ""
 "slot \"%s\" alınmaya çalışılıyor (\"%s\" sınıfından S4 nesnesi olmayan bir "
 "nesneden)"
 
-#: src/main/bind.c:161
+#: src/main/bind.c:164
 #, c-format
 msgid "resulting vector exceeds vector length limit in '%s'"
 msgstr ""
 
-#: src/main/bind.c:291 src/main/bind.c:327 src/main/bind.c:376
-#: src/main/bind.c:449 src/main/bind.c:477
+#: src/main/bind.c:294 src/main/bind.c:330 src/main/bind.c:379
+#: src/main/bind.c:452 src/main/bind.c:480
 #, c-format
 msgid "type '%s' is unimplemented in '%s'"
 msgstr "tip '%s' '%s' de tanımlanmamış"
 
-#: src/main/bind.c:685
+#: src/main/bind.c:688
 msgid "repeated formal argument 'recursive'"
 msgstr "tekrarlanan biçimsel argüman 'recursive'"
 
-#: src/main/bind.c:696
+#: src/main/bind.c:699
 msgid "repeated formal argument 'use.names'"
 msgstr "tekrarlanmış biçimsel argüman 'use.names'"
 
-#: src/main/bind.c:894
+#: src/main/bind.c:900
 msgid "argument not a list"
 msgstr "argüman bir liste değil"
 
-#: src/main/bind.c:1038 src/main/eval.c:2691 src/main/eval.c:2700
-#: src/main/objects.c:318 src/main/objects.c:354 src/main/objects.c:729
-#: src/main/objects.c:746 src/main/objects.c:753
+#: src/main/bind.c:1044 src/main/names.c:1273 src/main/names.c:1278
+#: src/main/names.c:1283 src/main/names.c:1288
 #, c-format
 msgid "class name too long in '%s'"
 msgstr "sınıf ismi '%s' de çok uzun"
 
-#: src/main/bind.c:1114
+#: src/main/bind.c:1128
 #, fuzzy, c-format
 msgid "cannot create a matrix from type '%s'"
 msgstr "bu tiplerden bir matris oluşturulamadı"
 
-#: src/main/bind.c:1185
+#: src/main/bind.c:1198
 #, c-format
 msgid "number of rows of matrices must match (see arg %d)"
 msgstr "matrislerin dize sayıları eşleşmelidir (bknz arg %d)"
 
-#: src/main/bind.c:1430
+#: src/main/bind.c:1455
 #, c-format
 msgid "number of columns of matrices must match (see arg %d)"
 msgstr "matrislerin sütun sayıları eşleşmelidir (bknz arg %d)"
@@ -1312,213 +1329,247 @@ msgstr "matrislerin sütun sayıları eşleşmelidir (bknz arg %d)"
 msgid "vector size cannot be NA"
 msgstr "vektör boyutu NA olamaz"
 
-#: src/main/builtin.c:49 src/main/builtin.c:57 src/main/sort.c:1303
+#: src/main/builtin.c:49 src/main/builtin.c:57 src/main/sort.c:1323
 msgid "vector size cannot be NA/NaN"
 msgstr "vektör boyutu NA/NaN olamaz"
 
-#: src/main/builtin.c:50 src/main/builtin.c:58 src/main/sort.c:1304
+#: src/main/builtin.c:50 src/main/builtin.c:58 src/main/sort.c:1324
 msgid "vector size cannot be infinite"
 msgstr "vektör boyutu sonsuz olamaz"
 
-#: src/main/builtin.c:51 src/main/builtin.c:59 src/main/builtin.c:916
-#: src/main/sort.c:1305
+#: src/main/builtin.c:51 src/main/builtin.c:59 src/main/builtin.c:950
+#: src/main/sort.c:1325
 msgid "vector size specified is too large"
 msgstr "seçilen vektör boyutu çok büyük"
 
-#: src/main/builtin.c:84 src/main/builtin.c:93 src/main/builtin.c:293
-#: src/main/builtin.c:326 src/main/builtin.c:365 src/main/builtin.c:375
-#: src/main/coerce.c:1537 src/main/connections.c:3066 src/main/engine.c:2967
-#: src/main/envir.c:993 src/main/envir.c:1046 src/main/envir.c:1136
-#: src/main/envir.c:1615 src/main/envir.c:1739 src/main/envir.c:1807
-#: src/main/envir.c:1925 src/main/envir.c:2582 src/main/envir.c:2642
-#: src/main/envir.c:2922 src/main/envir.c:2951 src/main/envir.c:2972
-#: src/main/envir.c:2995 src/main/envir.c:3030 src/main/envir.c:3051
-#: src/main/envir.c:3357 src/main/envir.c:3362 src/main/eval.c:5318
-#: src/main/objects.c:197 src/main/objects.c:203 src/main/saveload.c:2070
-#: src/main/saveload.c:2364 src/main/serialize.c:2709
+#: src/main/builtin.c:84 src/main/builtin.c:93 src/main/builtin.c:304
+#: src/main/builtin.c:337 src/main/builtin.c:394 src/main/builtin.c:408
+#: src/main/coerce.c:1536 src/main/connections.c:3062 src/main/engine.c:2987
+#: src/main/envir.c:1001 src/main/envir.c:1054 src/main/envir.c:1210
+#: src/main/envir.c:1749 src/main/envir.c:1873 src/main/envir.c:1939
+#: src/main/envir.c:2072 src/main/envir.c:2791 src/main/envir.c:2877
+#: src/main/envir.c:3182 src/main/envir.c:3211 src/main/envir.c:3232
+#: src/main/envir.c:3255 src/main/envir.c:3290 src/main/envir.c:3311
+#: src/main/envir.c:3632 src/main/envir.c:3637 src/main/eval.c:6251
+#: src/main/objects.c:191 src/main/objects.c:199 src/main/saveload.c:2072
+#: src/main/saveload.c:2364 src/main/serialize.c:2755
 msgid "use of NULL environment is defunct"
 msgstr "NULL ortamı kullanımı artık geçersiz"
 
-#: src/main/builtin.c:306
+#: src/main/builtin.c:250 src/main/builtin.c:263
+#, fuzzy
+msgid "argument is not a function"
+msgstr "argğman bir fonksiyon olmalı"
+
+#: src/main/builtin.c:317
 msgid "replacement object is not an environment"
 msgstr "değiştirme nesnesi bir ortam değil"
 
-#: src/main/builtin.c:331
+#: src/main/builtin.c:342
 msgid "'enclos' must be an environment"
 msgstr "'enclos' bir ortam olmalı"
 
-#: src/main/builtin.c:352 src/main/builtin.c:370
+#: src/main/builtin.c:363 src/main/builtin.c:399
 msgid "argument is not an environment"
 msgstr "argüman bir ortam değil"
 
-#: src/main/builtin.c:354
+#: src/main/builtin.c:365
 msgid "the empty environment has no parent"
 msgstr "boş ortamın üst öğesi yok"
 
-#: src/main/builtin.c:372
+#: src/main/builtin.c:401
 msgid "can not set parent of the empty environment"
 msgstr "boş ortamın üst öğesi ayarlanamadı"
 
-#: src/main/builtin.c:380
+#: src/main/builtin.c:403
+#, fuzzy
+msgid "can not set the parent environment of a namespace"
+msgstr "boş ortamın üst öğesi ayarlanamadı"
+
+#: src/main/builtin.c:405
+#, fuzzy
+msgid "can not set the parent environment of package imports"
+msgstr "boş ortamın üst öğesi ayarlanamadı"
+
+#: src/main/builtin.c:413
 msgid "'parent' is not an environment"
 msgstr "'parent' bir ortam değil"
 
-#: src/main/builtin.c:521 src/main/connections.c:3691
-#: src/main/connections.c:4068 src/main/connections.c:4102
-#: src/main/connections.c:4480 src/main/connections.c:4550
-#: src/main/connections.c:4759 src/main/connections.c:4763
-#: src/main/connections.c:5124 src/main/deparse.c:360 src/main/deparse.c:446
-#: src/main/serialize.c:2006
+#: src/main/builtin.c:556 src/main/connections.c:3687
+#: src/main/connections.c:4079 src/main/connections.c:4113
+#: src/main/connections.c:4491 src/main/connections.c:4561
+#: src/main/connections.c:4772 src/main/connections.c:4776
+#: src/main/connections.c:5199 src/main/deparse.c:369 src/main/deparse.c:458
+#: src/main/serialize.c:2045
 msgid "cannot write to this connection"
 msgstr "bu bağlantıya yazılamıyor"
 
-#: src/main/builtin.c:526 src/main/builtin.c:556
+#: src/main/builtin.c:561 src/main/builtin.c:591
 #, c-format
 msgid "invalid '%s' specification"
 msgstr "geçersiz '%s' tanımlaması"
 
-#: src/main/builtin.c:543
+#: src/main/builtin.c:578
 msgid "non-positive 'fill' argument will be ignored"
 msgstr "pozitif olmayan 'fill' argümanı göz ardı edilecek"
 
-#: src/main/builtin.c:618
+#: src/main/builtin.c:653
 #, c-format
 msgid "argument %d (type '%s') cannot be handled by 'cat'"
 msgstr "%d argümanı ('%s' tipi) 'cat' tarafından kullanılamıyor"
 
-#: src/main/builtin.c:763
+#: src/main/builtin.c:797
 #, c-format
 msgid "vector: cannot make a vector of mode '%s'."
 msgstr "vektör: mod '%s' in vektörü oluşturulamadı"
 
-#: src/main/builtin.c:789
+#: src/main/builtin.c:823
 msgid "cannot set length of non-vector"
 msgstr "vektör olmayanın uzunluğu ayarlanamadı"
 
-#: src/main/builtin.c:897 src/main/builtin.c:907 src/main/options.c:637
+#: src/main/builtin.c:931 src/main/builtin.c:941 src/main/options.c:659
 msgid "invalid argument"
 msgstr "geçersiz argüman"
 
-#: src/main/builtin.c:899 src/main/builtin.c:909 src/main/builtin.c:911
-#: src/main/character.c:366 src/main/coerce.c:2765
+#: src/main/builtin.c:933 src/main/builtin.c:943 src/main/builtin.c:945
+#: src/main/character.c:525 src/main/coerce.c:2832
 msgid "invalid value"
 msgstr "geçersiz değer"
 
-#: src/main/builtin.c:942 src/main/coerce.c:2478 src/main/coerce.c:2519
-#: src/main/eval.c:563 src/main/eval.c:683 src/main/eval.c:2099
-#: src/main/eval.c:2176 src/main/eval.c:2236 src/main/eval.c:2569
-#: src/main/eval.c:4694 src/main/eval.c:4814
+#: src/main/builtin.c:976 src/main/coerce.c:2541 src/main/coerce.c:2584
+#: src/main/eval.c:620 src/main/eval.c:740 src/main/eval.c:2266
+#: src/main/eval.c:2346 src/main/eval.c:2407 src/main/eval.c:2745
+#: src/main/eval.c:5584 src/main/eval.c:5701
 msgid "'...' used in an incorrect context"
 msgstr "'...' yanlış içerikte kullanıldı"
 
-#: src/main/builtin.c:963
+#: src/main/builtin.c:998
 #, c-format
 msgid "duplicate 'switch' defaults: '%s' and '%s'"
 msgstr ""
 
-#: src/main/builtin.c:996
+#: src/main/builtin.c:1031
 msgid "'EXPR' is missing"
 msgstr "'EXPR' eksik"
 
-#: src/main/builtin.c:1000 src/main/eval.c:5155
+#: src/main/builtin.c:1035 src/main/eval.c:6056
 msgid "EXPR must be a length 1 vector"
 msgstr "EXPR 1 uzunluğunda bir vektör olmalıdır"
 
-#: src/main/builtin.c:1003
+#: src/main/builtin.c:1038 src/main/eval.c:6059
 #, c-format
 msgid ""
 "EXPR is a \"factor\", treated as integer.\n"
 " Consider using '%s' instead."
 msgstr ""
 
-#: src/main/character.c:105 src/main/character.c:108 src/main/character.c:132
-#: src/main/character.c:135
+#: src/main/builtin.c:1095 src/main/eval.c:6069 src/main/eval.c:6098
+msgid "'switch' with no alternatives"
+msgstr ""
+
+#: src/main/character.c:103 src/main/character.c:224
+#, fuzzy, c-format
+msgid "%d argument passed to '%s' which requires %d to %d"
+msgid_plural "%d arguments passed to '%s' which requires %d to %d"
+msgstr[0] "1 veya 2 argüman gerektiren 'log'a %d argüman verildi"
+
+#: src/main/character.c:110 src/main/character.c:113 src/main/character.c:232
+#: src/main/character.c:235
 #, c-format
 msgid "'%s' requires a character vector"
 msgstr "'%s' bir karakter vektörü gerektirir"
 
-#: src/main/character.c:164
-#, c-format
-msgid ""
-"number of characters is not computable for element %d in \"bytes\" encoding"
-msgstr ""
+#: src/main/character.c:150 src/main/character.c:165 src/main/character.c:175
+#: src/main/character.c:203
+#, fuzzy, c-format
+msgid "invalid multibyte string, %s"
+msgstr "geçersiz çokbaytlı dize  %d"
 
-#: src/main/character.c:169 src/main/character.c:197 src/main/character.c:653
-#: src/main/character.c:750
+#: src/main/character.c:159
 #, c-format
-msgid "invalid multibyte string %d"
-msgstr "geçersiz çokbaytlı dize  %d"
+msgid "number of characters is not computable in \"bytes\" encoding, %s"
+msgstr ""
 
-#: src/main/character.c:185
+#: src/main/character.c:188
 #, c-format
-msgid "width is not computable for element %d in \"bytes\" encoding"
+msgid "width is not computable for %s in \"bytes\" encoding"
 msgstr ""
 
-#: src/main/character.c:263
+#: src/main/character.c:311
 msgid "extracting substrings from a non-character object"
 msgstr "karakter olmayan bir nesneden altdizeler açılıyor"
 
-#: src/main/character.c:268 src/main/character.c:363
+#: src/main/character.c:321 src/main/character.c:522
 #, fuzzy
 msgid "invalid substring arguments"
 msgstr "geçersiz altmetin argümanı/argümanları"
 
-#: src/main/character.c:358
+#: src/main/character.c:361
+#, fuzzy
+msgid "non-character object(s)"
+msgstr "karakter olmayan isimler"
+
+#: src/main/character.c:517
 msgid "replacing substrings in a non-character object"
 msgstr "bir karakter olmayan nesnenin içindeki altmetinler değiştiriliyor"
 
-#: src/main/character.c:551
+#: src/main/character.c:785
 msgid "the first argument must be a character vector"
 msgstr "ilk argüman karakter vektörü olmalıdır"
 
-#: src/main/character.c:570
+#: src/main/character.c:822
 msgid "abbreviate used with non-ASCII chars"
 msgstr "ASCII olmayan karakterlerde kısaltma kullanıldı"
 
-#: src/main/character.c:591
+#: src/main/character.c:843
 msgid "non-character names"
 msgstr "karakter olmayan isimler"
 
-#: src/main/character.c:696 src/main/grep.c:159
+#: src/main/character.c:905 src/main/character.c:1002
+#, c-format
+msgid "invalid multibyte string %d"
+msgstr "geçersiz çokbaytlı dize  %d"
+
+#: src/main/character.c:948 src/main/grep.c:163
 msgid "non-character argument"
 msgstr "karakter olmayan argüman"
 
-#: src/main/character.c:805
+#: src/main/character.c:1057
 #, c-format
 msgid "decreasing range specification ('%lc-%lc')"
 msgstr "azalan aralık özelliği ('%lc-%lc')"
 
-#: src/main/character.c:891
+#: src/main/character.c:1143
 #, c-format
 msgid "decreasing range specification ('%c-%c')"
 msgstr "azalan aralık özelliği ('%c-%c')"
 
-#: src/main/character.c:1079
+#: src/main/character.c:1331
 msgid "invalid UTF-8 string 'old'"
 msgstr "geçersiz UTF-8 dizesi 'old'"
 
-#: src/main/character.c:1085
+#: src/main/character.c:1337
 msgid "invalid multibyte string 'old'"
 msgstr "geçersiz çokbaytlı dize 'old'"
 
-#: src/main/character.c:1098
+#: src/main/character.c:1350
 msgid "invalid UTF-8 string 'new'"
 msgstr "geçersiz UTF-8 dizesi 'new'"
 
-#: src/main/character.c:1104
+#: src/main/character.c:1356
 msgid "invalid multibyte string 'new'"
 msgstr "geçersiz çokbaytlı dize 'new' "
 
-#: src/main/character.c:1132 src/main/character.c:1221
+#: src/main/character.c:1384 src/main/character.c:1473
 msgid "'old' is longer than 'new'"
 msgstr "'old' 'new' den daha uzun"
 
-#: src/main/character.c:1164
+#: src/main/character.c:1416
 #, c-format
 msgid "invalid input multibyte string %d"
 msgstr "çokbaytlı dize geçersiz girişi %d"
 
-#: src/main/character.c:1271
+#: src/main/character.c:1523
 msgid "strtrim() requires a character vector"
 msgstr "strtrim() bir karakter verktörü gerektirir"
 
@@ -1530,15 +1581,16 @@ msgstr "geçersiz 'mode' argümanı"
 msgid "applies only to lists and vectors"
 msgstr "sadece listelere ve vektörlere uygulanır"
 
-#: src/main/coerce.c:77 src/main/errors.c:1208
+#: src/main/coerce.c:77 src/main/errors.c:1194
 msgid "NAs introduced by coercion"
 msgstr "Zorlamadan dolayı ortaya çıkan NAs"
 
-#: src/main/coerce.c:79 src/main/errors.c:1209
-msgid "inaccurate integer conversion in coercion"
-msgstr "zorlamadaki hatalı tamsayı çevrimi"
+#: src/main/coerce.c:79
+#, fuzzy
+msgid "NAs introduced by coercion to integer range"
+msgstr "Zorlamadan dolayı ortaya çıkan NAs"
 
-#: src/main/coerce.c:81 src/main/errors.c:1210
+#: src/main/coerce.c:81 src/main/errors.c:1196
 msgid "imaginary parts discarded in coercion"
 msgstr "zorlamadaki hayali kısımlar çıkarıldı"
 
@@ -1546,59 +1598,63 @@ msgstr "zorlamadaki hayali kısımlar çıkarıldı"
 msgid "out-of-range values treated as 0 in coercion to raw"
 msgstr "ham veriye zorlamada sınırlar dışındaki değerler 0 kabul edildi"
 
-#: src/main/coerce.c:414
+#: src/main/coerce.c:399
 #, c-format
 msgid "invalid data of mode '%s' (too short)"
 msgstr "'%s' modunun geçersiz verisi (çok kısa)"
 
-#: src/main/coerce.c:1016
+#: src/main/coerce.c:1002
 #, c-format
 msgid "'pairlist' object cannot be coerced to type '%s'"
 msgstr "'parlist' nesnesi '%s' tipine zorlanamıyor"
 
-#: src/main/coerce.c:1134
+#: src/main/coerce.c:1120
 #, c-format
 msgid "(list) object cannot be coerced to type '%s'"
 msgstr "(list) nesne '%s' tipine zorlanamaz"
 
-#: src/main/coerce.c:1157
+#: src/main/coerce.c:1143
 #, c-format
 msgid "(symbol) object cannot be coerced to type '%s'"
 msgstr "(symbol) nesne '%s' tipine zorlanamaz"
 
-#: src/main/coerce.c:1173 src/main/coerce.c:1485
+#: src/main/coerce.c:1159 src/main/coerce.c:1484
 msgid "no method for coercing this S4 class to a vector"
 msgstr "bu S4 sınıfını bir vektöre zorlamak için yöntem yok"
 
-#: src/main/coerce.c:1232
+#: src/main/coerce.c:1222
 msgid "environments cannot be coerced to other types"
 msgstr "ortamlar başka tiplere zorlanamaz"
 
-#: src/main/coerce.c:1379
+#: src/main/coerce.c:1374
 msgid "attempting to coerce non-factor"
 msgstr "faktör olmayanı zorlama deneniyor"
 
-#: src/main/coerce.c:1533
+#: src/main/coerce.c:1379 src/main/coerce.c:1389
+msgid "malformed factor"
+msgstr ""
+
+#: src/main/coerce.c:1532
 msgid "list argument expected"
 msgstr "argüman listesi beklendi"
 
-#: src/main/coerce.c:1541 src/main/eval.c:5322
+#: src/main/coerce.c:1540 src/main/eval.c:6255
 msgid "invalid environment"
 msgstr "geçersiz ortam"
 
-#: src/main/coerce.c:1545
+#: src/main/coerce.c:1544
 msgid "argument must have length at least 1"
 msgstr "argüman en az 1 uzunluğunda olmalıdır"
 
-#: src/main/coerce.c:1567
+#: src/main/coerce.c:1566
 msgid "invalid body for function"
 msgstr "fonksiyon için geçersiz gövde"
 
-#: src/main/coerce.c:1590
+#: src/main/coerce.c:1589
 msgid "invalid length 0 argument"
 msgstr "geçersiz 0 uzunluktaki argüman"
 
-#: src/main/coerce.c:1605
+#: src/main/coerce.c:1604
 msgid "invalid argument list"
 msgstr "geçersiz argüman listesi"
 
@@ -1610,50 +1666,47 @@ msgstr "\"single\" tipi R'de tanımlanmamış"
 msgid "unimplemented predicate"
 msgstr "tanımlanmamış karşılaştırma"
 
-#: src/main/coerce.c:2069
+#: src/main/coerce.c:2070
 #, c-format
 msgid "%s() applied to non-(list or vector) of type '%s'"
 msgstr "%s() (liste veya vektör) olmayan '%s' tipinin"
 
-#: src/main/coerce.c:2212 src/main/coerce.c:2275 src/main/coerce.c:2343
+#: src/main/coerce.c:2267 src/main/coerce.c:2331 src/main/coerce.c:2403
 #, fuzzy, c-format
 msgid "default method not implemented for type '%s'"
 msgstr "tanımlanmamış tip '%s', '%s' içinde\n"
 
-#: src/main/coerce.c:2361
+#: src/main/coerce.c:2425
 msgid "'name' is missing"
 msgstr "'name' eksik"
 
-#: src/main/coerce.c:2368
+#: src/main/coerce.c:2432
 msgid "first argument must be a character string"
 msgstr "ilk argüman karakter dizesi olmalıdır"
 
-#: src/main/coerce.c:2401
-msgid "'what' must be a character string or a function"
-msgstr "'what' bir karakter dizesi veya bir fonksiyon olmalıdır"
+#: src/main/coerce.c:2464
+#, fuzzy
+msgid "'what' must be a function or character string"
+msgstr "'text' bir karakter dizesi olmalıdır"
 
-#: src/main/coerce.c:2405
+#: src/main/coerce.c:2468
 #, fuzzy
 msgid "'args' must be a list or expression"
 msgstr "'args' bir liste olmalıdır"
 
-#: src/main/coerce.c:2408
-msgid "'args' must be a list"
-msgstr "'args' bir liste olmalıdır"
-
-#: src/main/coerce.c:2412
+#: src/main/coerce.c:2475 src/main/unique.c:1345
 msgid "'envir' must be an environment"
 msgstr "'envir' bir ortam olmalıdır"
 
-#: src/main/coerce.c:2567
+#: src/main/coerce.c:2634
 msgid "invalid environment specified"
 msgstr "geçersiz ortam seçildi"
 
-#: src/main/coerce.c:2633
+#: src/main/coerce.c:2700
 msgid "Setting class(x) to NULL;   result will no longer be an S4 object"
 msgstr "class(x) NULL'e ayarlanıyor;   sonuç artık bir S4 nesnesi olmayacak"
 
-#: src/main/coerce.c:2636
+#: src/main/coerce.c:2703
 #, c-format
 msgid ""
 "Setting class(x) to multiple strings (\"%s\", \"%s\", ...); result will no "
@@ -1662,7 +1715,7 @@ msgstr ""
 "Çoklu dizeler (\"%s\", \"%s\", ...)'e class(x) ayarlanıyor; sonuç artık bir "
 "S4 nesnesi olmayacak"
 
-#: src/main/coerce.c:2640
+#: src/main/coerce.c:2707
 #, c-format
 msgid ""
 "Setting class(x) to \"%s\" sets attribute to NULL; result will no longer be "
@@ -1671,11 +1724,11 @@ msgstr ""
 "class(x)'i \"%s\"e ayarlamak özelliği NULL'e ayarlar; sonuç arık bir S4 "
 "nesnesi olmayacak"
 
-#: src/main/coerce.c:2673
+#: src/main/coerce.c:2740
 msgid "invalid replacement object to be a class string"
 msgstr "sınıf dizesi olması için geçersiz yerine koyma işlemi"
 
-#: src/main/coerce.c:2694
+#: src/main/coerce.c:2761
 #, c-format
 msgid ""
 "\"%s\" can only be set as the class if the object has this type; found \"%s\""
@@ -1683,7 +1736,7 @@ msgstr ""
 "\"%s\" nesne bu tipe sahipse sadece sınıf olarak ayarlanabilir, \"%s\" "
 "bulundu"
 
-#: src/main/coerce.c:2712
+#: src/main/coerce.c:2779
 #, c-format
 msgid ""
 "invalid to set the class to matrix unless the dimension attribute is of "
@@ -1692,646 +1745,651 @@ msgstr ""
 "boyut özelliği 2 uzunluğunda olmadığı sürece (%d idi) matrise sınıf "
 "ayarlanamaz"
 
-#: src/main/coerce.c:2720
+#: src/main/coerce.c:2787
 msgid ""
 "cannot set class to \"array\" unless the dimension attribute has length > 0"
 msgstr ""
 "boyut özelliği 0'dan büyük uzunluk almadıkça \"array\"'a sınıf ayarlanamaz"
 
-#: src/main/coerce.c:2756
+#: src/main/coerce.c:2823
 msgid "'value' must be non-null character string"
 msgstr "'value' boş olmayan bir karakter dizesi olmalıdır"
 
-#: src/main/coerce.c:2769
+#: src/main/coerce.c:2836
 msgid "invalid to change the storage mode of a factor"
 msgstr "bir faktörün depolama modunu değiştirmek için geçersiz"
 
-#: src/main/complex.c:126
+#: src/main/complex.c:123
 msgid "invalid complex unary operator"
 msgstr "geçersiz karmaşık tekli operatör"
 
-#: src/main/complex.c:261
+#: src/main/complex.c:251
 msgid "unimplemented complex operation"
 msgstr "tanımlanmamış karmaşık sayı işlemi"
 
-#: src/main/complex.c:363
+#: src/main/complex.c:353
 msgid "non-numeric argument to function"
 msgstr "fonksiyona sayısal olmayan argüman"
 
-#: src/main/complex.c:827
+#: src/main/complex.c:822
 msgid "invalid polynomial coefficient"
 msgstr "geçersiz çok terimli (polinomial) katsayı"
 
-#: src/main/complex.c:832
+#: src/main/complex.c:827
 msgid "root finding code failed"
 msgstr "kök bulan kod başarısız"
 
-#: src/main/connections.c:153
+#: src/main/connections.c:150
 msgid "all connections are in use"
 msgstr "tüm bağlantılar kullanımda"
 
-#: src/main/connections.c:164
+#: src/main/connections.c:161
 msgid "connection not found"
 msgstr "bağlantı bulunamadı"
 
-#: src/main/connections.c:175
+#: src/main/connections.c:172 src/main/connections.c:5213
 msgid "invalid connection"
 msgstr "geçersiz bağlantı"
 
-#: src/main/connections.c:207
+#: src/main/connections.c:204
 #, c-format
 msgid "closing unused connection %d (%s)\n"
 msgstr "kullanılmayan bağlantı kapatılıyor %d (%s)\n"
 
-#: src/main/connections.c:232 src/main/sysutils.c:619 src/main/sysutils.c:806
-#: src/main/sysutils.c:821 src/main/sysutils.c:912 src/main/sysutils.c:927
-#: src/main/sysutils.c:1023 src/main/sysutils.c:1096 src/main/sysutils.c:1106
-#: src/main/sysutils.c:1119 src/main/sysutils.c:1516
+#: src/main/connections.c:229 src/main/sysutils.c:631 src/main/sysutils.c:834
+#: src/main/sysutils.c:849 src/main/sysutils.c:978 src/main/sysutils.c:1051
+#: src/main/sysutils.c:1061 src/main/sysutils.c:1074 src/main/sysutils.c:1472
 #, c-format
 msgid "unsupported conversion from '%s' to '%s'"
 msgstr "'%s' den '%s' e desteklenmeyen dönüşüm"
 
-#: src/main/connections.c:288 src/main/connections.c:304
-#: src/main/connections.c:456 src/main/connections.c:462
-#: src/main/connections.c:468 src/main/connections.c:479
-#: src/main/connections.c:486
+#: src/main/connections.c:285 src/main/connections.c:300
+#: src/main/connections.c:451 src/main/connections.c:456
+#: src/main/connections.c:461 src/main/connections.c:472
+#: src/main/connections.c:478
 #, c-format
 msgid "%s not enabled for this connection"
 msgstr "%s bu bağlantı için etkin değil"
 
-#: src/main/connections.c:335 src/main/connections.c:352
-#: src/main/connections.c:2916
+#: src/main/connections.c:330 src/main/connections.c:347
+#: src/main/connections.c:2910
 msgid "printing of extremely long output is truncated"
 msgstr "aşırı uzun çıktının yazdırılması kısaltıldı"
 
-#: src/main/connections.c:375
+#: src/main/connections.c:370
 msgid "invalid char string in output conversion"
 msgstr "çıkış dönüşümünde geçersiz karakter dizesi "
 
-#: src/main/connections.c:439
+#: src/main/connections.c:434
 #, c-format
 msgid "invalid input found on input connection '%s'"
 msgstr "giriş bağlantısı '%s'de  geçersiz giriş bulundu"
 
-#: src/main/connections.c:580
+#: src/main/connections.c:571
 #, fuzzy, c-format
 msgid "cannot open file '%ls': %s"
 msgstr "dosya '%s' açılamadı: %s"
 
-#: src/main/connections.c:691
+#: src/main/connections.c:683
 msgid "connection is not open for reading"
 msgstr "bağlantı okuma için açık değil"
 
-#: src/main/connections.c:696
+#: src/main/connections.c:688
 msgid "connection is not open for writing"
 msgstr "bağlantı yazma için açık değil"
 
-#: src/main/connections.c:734 src/main/connections.c:2229
+#: src/main/connections.c:726 src/main/connections.c:2223
 msgid "can only truncate connections open for writing"
 msgstr "sadece yazma için açık olan bağlantılar kırpılabilir"
 
-#: src/main/connections.c:738 src/main/connections.c:740
+#: src/main/connections.c:730 src/main/connections.c:732
 msgid "file truncation failed"
 msgstr "dosya kırpma başarısız"
 
-#: src/main/connections.c:742
+#: src/main/connections.c:734
 msgid "file truncation unavailable on this platform"
 msgstr "dosya kırpma bu platformda mevcut değil"
 
-#: src/main/connections.c:788 src/main/connections.c:792
-#: src/main/connections.c:798 src/main/connections.c:815
+#: src/main/connections.c:780 src/main/connections.c:784
+#: src/main/connections.c:790 src/main/connections.c:807
 msgid "allocation of file connection failed"
 msgstr "dosya bağlantısı yer ayırması başarısız"
 
-#: src/main/connections.c:866 src/main/connections.c:1044
+#: src/main/connections.c:858 src/main/connections.c:1035
 #, c-format
 msgid "cannot create fifo '%s', reason '%s'"
 msgstr "fifo '%s' oluşturulamadı, sebep: %s"
 
-#: src/main/connections.c:872
+#: src/main/connections.c:864
 #, c-format
 msgid "'%s' exists but is not a fifo"
 msgstr "'%s' mevcut ancak bir fifo değil"
 
-#: src/main/connections.c:886
+#: src/main/connections.c:878
 #, c-format
 msgid "fifo '%s' is not ready"
 msgstr "fifo '%s' hazır değil"
 
-#: src/main/connections.c:887
+#: src/main/connections.c:879
 #, c-format
 msgid "cannot open fifo '%s'"
 msgstr "fifo '%s' açılamadı"
 
-#: src/main/connections.c:928 src/main/connections.c:939
-#: src/main/connections.c:1104 src/main/connections.c:1123
-#: src/main/connections.c:1531 src/main/connections.c:1541
-#: src/main/connections.c:1660 src/main/connections.c:1720
-#: src/main/connections.c:2246 src/main/connections.c:2263
-#: src/main/connections.c:2572 src/main/connections.c:5305
-#: src/main/connections.c:5369
+#: src/main/connections.c:920 src/main/connections.c:931
+#: src/main/connections.c:1095 src/main/connections.c:1114
+#: src/main/connections.c:1524 src/main/connections.c:1534
+#: src/main/connections.c:1653 src/main/connections.c:1713
+#: src/main/connections.c:2240 src/main/connections.c:2257
+#: src/main/connections.c:2566 src/main/connections.c:5385
+#: src/main/connections.c:5449
 msgid "too large a block specified"
 msgstr "çok geniş bir alan seçildi"
 
-#: src/main/connections.c:998 src/main/connections.c:1004
+#: src/main/connections.c:989 src/main/connections.c:995
 #, fuzzy
 msgid "allocation of fifo name failed"
 msgstr "fifo bağlantısı yer ayırması başarısız"
 
-#: src/main/connections.c:1066
+#: src/main/connections.c:1057
 #, fuzzy, c-format
 msgid "cannot open fifo '%s', reason '%s'"
 msgstr "'%s' adresi açılamıyor, sebep:'%s'"
 
-#: src/main/connections.c:1107 src/main/connections.c:1131
+#: src/main/connections.c:1098 src/main/connections.c:1122
 #, fuzzy
 msgid "allocation of fifo buffer failed"
 msgstr "fifo bağlantısı yer ayırması başarısız"
 
-#: src/main/connections.c:1139
+#: src/main/connections.c:1130
 #, fuzzy, c-format
 msgid "cannot write FIFO '%s'"
 msgstr "URL '%s' açılamıyor"
 
-#: src/main/connections.c:1175 src/main/connections.c:1179
-#: src/main/connections.c:1185 src/main/connections.c:1201
+#: src/main/connections.c:1166 src/main/connections.c:1170
+#: src/main/connections.c:1176 src/main/connections.c:1192
 msgid "allocation of fifo connection failed"
 msgstr "fifo bağlantısı yer ayırması başarısız"
 
-#: src/main/connections.c:1219 src/main/connections.c:1377
-#: src/main/connections.c:1998 src/main/connections.c:3212
-#: src/main/connections.c:4967
+#: src/main/connections.c:1210 src/main/connections.c:1369
+#: src/main/connections.c:1991 src/main/connections.c:3205
+#: src/main/connections.c:4982
 msgid "only first element of 'description' argument used"
 msgstr "'description' argümanın sadece ilk öğesi kullanıldı"
 
-#: src/main/connections.c:1236
+#: src/main/connections.c:1227
 msgid ""
 "fifo(\"\") only supports open = \"w+\" and open = \"w+b\": using the former"
 msgstr ""
 "fifo(\"\") sadece open = \"w+\" ve open = \"w+b\" destekler:ilki kullanılıyor"
 
-#: src/main/connections.c:1250 src/main/connections.c:1414
-#: src/main/connections.c:2064 src/main/connections.c:3179
-#: src/main/connections.c:3232 src/main/connections.c:3280
-#: src/main/connections.c:3567 src/main/connections.c:3683
-#: src/main/connections.c:3844 src/main/connections.c:4095
-#: src/main/connections.c:4423 src/main/connections.c:4543
-#: src/main/connections.c:4755 src/main/connections.c:5105 src/main/dcf.c:94
-#: src/main/deparse.c:352 src/main/deparse.c:438 src/main/saveload.c:2267
-#: src/main/saveload.c:2350 src/main/scan.c:933 src/main/serialize.c:2175
-#: src/main/serialize.c:2226 src/main/source.c:265
+#: src/main/connections.c:1242 src/main/connections.c:1407
+#: src/main/connections.c:2058 src/main/connections.c:3175
+#: src/main/connections.c:3226 src/main/connections.c:3274
+#: src/main/connections.c:3563 src/main/connections.c:3679
+#: src/main/connections.c:3841 src/main/connections.c:4106
+#: src/main/connections.c:4434 src/main/connections.c:4554
+#: src/main/connections.c:4768 src/main/connections.c:5180 src/main/dcf.c:93
+#: src/main/deparse.c:361 src/main/deparse.c:450 src/main/saveload.c:2269
+#: src/main/saveload.c:2350 src/main/scan.c:933 src/main/serialize.c:2216
+#: src/main/serialize.c:2267 src/main/source.c:270
 msgid "cannot open the connection"
 msgstr "bağlantı açılamadı"
 
-#: src/main/connections.c:1265
+#: src/main/connections.c:1257
 msgid "fifo connections are not available on this system"
 msgstr "fifo bağlantıları bu sistemde mevcut değil"
 
-#: src/main/connections.c:1295
+#: src/main/connections.c:1287
 #, fuzzy, c-format
 msgid "cannot pipe() cmd '%ls': %s"
 msgstr "pipe() komut dizesi '%s' açılamadı: %s"
 
-#: src/main/connections.c:1302
+#: src/main/connections.c:1294
 #, c-format
 msgid "cannot open pipe() cmd '%s': %s"
 msgstr "pipe() komut dizesi '%s' açılamadı: %s"
 
-#: src/main/connections.c:1471 src/main/connections.c:1791
+#: src/main/connections.c:1464 src/main/connections.c:1784
 #, c-format
 msgid "cannot open compressed file '%s', probable reason '%s'"
 msgstr "sıkıştırılmış dosya '%s' açılamadı, muhtemel sebep: %s"
 
-#: src/main/connections.c:1511
+#: src/main/connections.c:1504
 msgid "whence = \"end\" is not implemented for gzfile connections"
 msgstr "whence = \"end\" gzfile bağlantıları için tanımlanmadı"
 
-#: src/main/connections.c:1516
+#: src/main/connections.c:1509
 msgid "seek on a gzfile connection returned an internal error"
 msgstr "gzfile dosyasında gezinme iç bir hata döndürdü"
 
-#: src/main/connections.c:1550 src/main/connections.c:1554
-#: src/main/connections.c:1560 src/main/connections.c:1577
+#: src/main/connections.c:1543 src/main/connections.c:1547
+#: src/main/connections.c:1553 src/main/connections.c:1570
 msgid "allocation of gzfile connection failed"
 msgstr "gzfile bağlantısı yer ayırması başarısız"
 
-#: src/main/connections.c:1606
+#: src/main/connections.c:1599
 #, c-format
 msgid "cannot open bzip2-ed file '%s', probable reason '%s'"
 msgstr "bzip sıkıştırılmış dosya '%s' açılamadı, muhtemel sebep: '%s'"
 
-#: src/main/connections.c:1615
+#: src/main/connections.c:1608
 #, c-format
 msgid "file '%s' appears not to be compressed by bzip2"
 msgstr "'%s' dosyası bzip2 ile sıkıştırılmamış gibi gözüküyor"
 
-#: src/main/connections.c:1624
+#: src/main/connections.c:1617
 #, c-format
 msgid "initializing bzip2 compression for file '%s' failed"
 msgstr "'%s' dosyası için bzip2 sıkıştırma başlangıcı başarısız"
 
-#: src/main/connections.c:1678
+#: src/main/connections.c:1671
 #, fuzzy
 msgid "allocation of overflow buffer for bzfile failed"
 msgstr "dosya bağlantısı yer ayırması başarısız"
 
-#: src/main/connections.c:1685
+#: src/main/connections.c:1678
 #, fuzzy, c-format
 msgid ""
 "file '%s' has trailing content that appears not to be compressed by bzip2"
 msgstr "'%s' dosyası bzip2 ile sıkıştırılmamış gibi gözüküyor"
 
-#: src/main/connections.c:1731 src/main/connections.c:1735
-#: src/main/connections.c:1741 src/main/connections.c:1758
+#: src/main/connections.c:1724 src/main/connections.c:1728
+#: src/main/connections.c:1734 src/main/connections.c:1751
 msgid "allocation of bzfile connection failed"
 msgstr "bzfile bağlanıtısı yer ayırması başarısız"
 
-#: src/main/connections.c:1804 src/main/connections.c:5961
+#: src/main/connections.c:1797 src/main/connections.c:6046
 #, c-format
 msgid "cannot initialize lzma decoder, error %d"
 msgstr "lzma çözücüsü başlatılamadı, hata %d"
 
-#: src/main/connections.c:1820
+#: src/main/connections.c:1813
 #, c-format
 msgid "cannot initialize lzma encoder, error %d"
 msgstr "lzma kodlayıcısı başlatılamadı, hata %d"
 
-#: src/main/connections.c:1948 src/main/connections.c:1952
-#: src/main/connections.c:1958 src/main/connections.c:1976
+#: src/main/connections.c:1941 src/main/connections.c:1945
+#: src/main/connections.c:1951 src/main/connections.c:1969
 msgid "allocation of xzfile connection failed"
 msgstr "xzfile bağlatısı yer ayırması başarısız"
 
-#: src/main/connections.c:2035
+#: src/main/connections.c:2028
 #, c-format
 msgid "this is a %s-compressed file which this build of R does not support"
 msgstr "bu bir R'nin bu derlemesinin desteklemediği %s-sıkıştırılmış dosya"
 
-#: src/main/connections.c:2130 src/modules/X11/devX11.c:3375
+#: src/main/connections.c:2124 src/modules/X11/devX11.c:3381
 msgid "memory allocation to copy clipboard failed"
 msgstr "panoyu kopyalama için bellek yer ayırması başarısız"
 
-#: src/main/connections.c:2135 src/modules/X11/devX11.c:3354
-#: src/modules/X11/devX11.c:3359
+#: src/main/connections.c:2129 src/modules/X11/devX11.c:3360
+#: src/modules/X11/devX11.c:3365
 msgid "clipboard cannot be opened or contains no text"
 msgstr "pano açılamıyor veya metin içermiyor"
 
-#: src/main/connections.c:2146
+#: src/main/connections.c:2140
 msgid "memory allocation to open clipboard failed"
 msgstr "panoyu açmak için bellek ayırması başarısız"
 
-#: src/main/connections.c:2174
+#: src/main/connections.c:2168
 #, fuzzy
 msgid "unable to open the clipboard"
 msgstr "Pano açılamadı"
 
-#: src/main/connections.c:2178
+#: src/main/connections.c:2172
 #, fuzzy
 msgid "unable to write to the clipboard"
 msgstr "Panoya yazılamadı"
 
-#: src/main/connections.c:2218
+#: src/main/connections.c:2212
 msgid "attempt to seek outside the range of the clipboard"
 msgstr "pano alanı dışında tarama yapma girişimi"
 
-#: src/main/connections.c:2261
+#: src/main/connections.c:2255
 msgid "clipboard connection is open for reading only"
 msgstr "pano bağlantısı sadece okumaya açık"
 
-#: src/main/connections.c:2281
+#: src/main/connections.c:2275
 msgid "clipboard buffer is full and output lost"
 msgstr "pano önbelleği dolu, çıktı kayboldu"
 
-#: src/main/connections.c:2302
+#: src/main/connections.c:2296
 msgid "'mode' for the clipboard must be 'r' or 'w'"
 msgstr "pano için 'mode' 'r' veya 'w' olmalı"
 
-#: src/main/connections.c:2305
+#: src/main/connections.c:2299
 msgid "'mode' for the clipboard must be 'r' on Unix"
 msgstr "pano için 'mode' Unix sistemlerde 'r' olmalıdır"
 
-#: src/main/connections.c:2308 src/main/connections.c:2314
-#: src/main/connections.c:2320 src/main/connections.c:2337
+#: src/main/connections.c:2302 src/main/connections.c:2308
+#: src/main/connections.c:2314 src/main/connections.c:2331
 msgid "allocation of clipboard connection failed"
 msgstr "pano bağlantısı yer ayırması başarısız"
 
-#: src/main/connections.c:2406 src/main/connections.c:2410
-#: src/main/connections.c:2416
+#: src/main/connections.c:2400 src/main/connections.c:2404
+#: src/main/connections.c:2410
 msgid "allocation of terminal connection failed"
 msgstr "terminal bağlantısı yer ayırması başarısız"
 
-#: src/main/connections.c:2549
+#: src/main/connections.c:2543
 msgid "attempting to add too many elements to raw vector"
 msgstr "ham bir vektöre çok fazla öğe ekleme deneniyor"
 
-#: src/main/connections.c:2601
+#: src/main/connections.c:2595
 msgid "attempt to seek outside the range of the raw connection"
 msgstr "ham bir bağlantı alanının dışında tarama denemesi"
 
-#: src/main/connections.c:2612 src/main/connections.c:2616
-#: src/main/connections.c:2622 src/main/connections.c:2648
+#: src/main/connections.c:2606 src/main/connections.c:2610
+#: src/main/connections.c:2616 src/main/connections.c:2642
 msgid "allocation of raw connection failed"
 msgstr "ham bağlantı yer ayırması başarısız"
 
-#: src/main/connections.c:2701
+#: src/main/connections.c:2695
 msgid "'con' is not a rawConnection"
 msgstr "'con' bir rawConnection değil"
 
-#: src/main/connections.c:2704
+#: src/main/connections.c:2698
 msgid "'con' is not an output rawConnection"
 msgstr "'con' bir çıktı rawConnection değil"
 
-#: src/main/connections.c:2742
+#: src/main/connections.c:2736
 #, fuzzy
 msgid "too many characters for text connection"
 msgstr "metin bağlantısı için bellek ayrılamadı"
 
-#: src/main/connections.c:2747
+#: src/main/connections.c:2741
 msgid "cannot allocate memory for text connection"
 msgstr "metin bağlantısı için bellek ayrılamadı"
 
-#: src/main/connections.c:2796
+#: src/main/connections.c:2790
 msgid "seek is not relevant for text connection"
 msgstr "tarama metin bağlantısı ile ilişkili değil"
 
-#: src/main/connections.c:2804 src/main/connections.c:2808
-#: src/main/connections.c:2814 src/main/connections.c:2827
-#: src/main/connections.c:3012 src/main/connections.c:3016
-#: src/main/connections.c:3022 src/main/connections.c:3035
-#: src/main/connections.c:3041
+#: src/main/connections.c:2798 src/main/connections.c:2802
+#: src/main/connections.c:2808 src/main/connections.c:2821
+#: src/main/connections.c:3008 src/main/connections.c:3012
+#: src/main/connections.c:3018 src/main/connections.c:3031
+#: src/main/connections.c:3037
 msgid "allocation of text connection failed"
 msgstr "metin bağlantısı yer ayırması başarısız"
 
-#: src/main/connections.c:2989
+#: src/main/connections.c:2983
 msgid "text connection: appending to a non-existent char vector"
 msgstr "metin bağlantısı: var olmayan bir karakter vektörüne ekleniyor"
 
-#: src/main/connections.c:3093
+#: src/main/connections.c:3089
 msgid "unsupported mode"
 msgstr "desteklenmeyen mod"
 
-#: src/main/connections.c:3115
+#: src/main/connections.c:3111
 msgid "'con' is not a textConnection"
 msgstr "'con' bir metin bağantısı değil"
 
-#: src/main/connections.c:3118
+#: src/main/connections.c:3114
 msgid "'con' is not an output textConnection"
 msgstr "'con' bir çıktı textConnection'ı değil"
 
-#: src/main/connections.c:3192
-msgid "sockets are not available on this system"
-msgstr "soketler bu sistemde mevcut değil"
-
-#: src/main/connections.c:3260 src/main/connections.c:3309
-#: src/main/connections.c:3320 src/main/connections.c:3367
-#: src/main/connections.c:3392 src/main/connections.c:3415
-#: src/main/connections.c:3427 src/main/connections.c:3543
-#: src/main/connections.c:3668 src/main/connections.c:5408
+#: src/main/connections.c:3254 src/main/connections.c:3303
+#: src/main/connections.c:3314 src/main/connections.c:3361
+#: src/main/connections.c:3388 src/main/connections.c:3411
+#: src/main/connections.c:3423 src/main/connections.c:3539
+#: src/main/connections.c:3664 src/main/connections.c:5489
 msgid "'con' is not a connection"
 msgstr "'con' bir bağlantı değil"
 
-#: src/main/connections.c:3263
+#: src/main/connections.c:3257
 msgid "cannot open standard connections"
 msgstr "standart bağlantılar açılamıyor"
 
-#: src/main/connections.c:3265
+#: src/main/connections.c:3259
 msgid "connection is already open"
 msgstr "bağlantı zaten açık"
 
-#: src/main/connections.c:3298
+#: src/main/connections.c:3292
 msgid "unknown 'rw' value"
 msgstr "bilinmeyen 'rw' değeri"
 
-#: src/main/connections.c:3369
+#: src/main/connections.c:3363
 msgid "cannot close standard connections"
 msgstr "standart bağlantılar kapatılamıyor"
 
-#: src/main/connections.c:3372
+#: src/main/connections.c:3366
 #, fuzzy
 msgid "cannot close 'output' sink connection"
 msgstr "sink çıktı bağlantısı kapatılamaz"
 
-#: src/main/connections.c:3374
+#: src/main/connections.c:3368
 #, fuzzy
 msgid "cannot close 'message' sink connection"
 msgstr "sink bağlantısı mesajları kapatılamaz"
 
-#: src/main/connections.c:3394 src/main/connections.c:5123
-#: src/main/connections.c:5131 src/main/serialize.c:1996
-#: src/main/serialize.c:2004
+#: src/main/connections.c:3390 src/main/connections.c:5198
+#: src/main/connections.c:5206 src/main/serialize.c:2035
+#: src/main/serialize.c:2043
 msgid "connection is not open"
 msgstr "bağlantı açık değil"
 
-#: src/main/connections.c:3490 src/main/connections.c:3502
+#: src/main/connections.c:3486 src/main/connections.c:3498
 #, fuzzy
 msgid "line longer than buffer size"
 msgstr "Dize önbellek boyutundan uzun"
 
-#: src/main/connections.c:3574 src/main/connections.c:3576
-#: src/main/connections.c:3852 src/main/connections.c:4406
-#: src/main/connections.c:4431 src/main/connections.c:5132 src/main/dcf.c:101
-#: src/main/scan.c:936 src/main/scan.c:940 src/main/serialize.c:1998
-#: src/main/source.c:272
+#: src/main/connections.c:3570 src/main/connections.c:3572
+#: src/main/connections.c:3849 src/main/connections.c:4417
+#: src/main/connections.c:4442 src/main/connections.c:5207 src/main/dcf.c:100
+#: src/main/scan.c:936 src/main/scan.c:940 src/main/serialize.c:2037
+#: src/main/source.c:277
 msgid "cannot read from this connection"
 msgstr "bu bağlantıdan okunamıyor"
 
-#: src/main/connections.c:3588 src/main/connections.c:3610
+#: src/main/connections.c:3584 src/main/connections.c:3606
 msgid "cannot allocate buffer in readLines"
 msgstr "readLines içinde önbellek ayrılamıyor"
 
-#: src/main/connections.c:3623
+#: src/main/connections.c:3619
 #, c-format
 msgid "line %d appears to contain an embedded nul"
 msgstr ""
 
-#: src/main/connections.c:3640
+#: src/main/connections.c:3636
 #, c-format
 msgid "incomplete final line found on '%s'"
 msgstr "tamamlanmamış son dize bulundu: '%s'"
 
-#: src/main/connections.c:3646
+#: src/main/connections.c:3642
 msgid "too few lines read in readLines"
 msgstr "readLines'da çok az dize"
 
-#: src/main/connections.c:3749
+#: src/main/connections.c:3746
 msgid "incomplete string at end of file has been discarded"
 msgstr "dosya sonundaki eksik dize görmezden gelindi"
 
-#: src/main/connections.c:3755
+#: src/main/connections.c:3752
 msgid "null terminator not found: breaking string at 10000 bytes"
 msgstr "null sonlandırıcısı bulunamadı: 10000 baytta dize sonlandırılıyor"
 
-#: src/main/connections.c:3820
+#: src/main/connections.c:3817
 msgid "can only read from a binary connection"
 msgstr "sadece ikili bir bağlantıdan okunabilir"
 
-#: src/main/connections.c:3869 src/main/connections.c:4176
+#: src/main/connections.c:3866 src/main/connections.c:4187
 msgid "size changing is not supported for complex vectors"
 msgstr "karmaşık vektörler için boyut değiştirme desteklenmiyor"
 
-#: src/main/connections.c:3907 src/main/connections.c:3925
-#: src/main/connections.c:3951 src/main/connections.c:4010
-#: src/main/connections.c:4030 src/main/connections.c:4157
-#: src/main/connections.c:4170 src/main/connections.c:4229
-#: src/main/connections.c:4261
+#: src/main/connections.c:3905 src/main/connections.c:3923
+#: src/main/connections.c:3949 src/main/connections.c:3993
+#: src/main/connections.c:4024 src/main/connections.c:4044
+#: src/main/connections.c:4168 src/main/connections.c:4181
+#: src/main/connections.c:4240 src/main/connections.c:4272
 #, c-format
 msgid "size %d is unknown on this machine"
 msgstr "%d boyutu bu makinede desteklenmiyor"
 
-#: src/main/connections.c:3936
+#: src/main/connections.c:3934
 msgid "raw is always of size 1"
 msgstr "ham hep 1 uzunluğundadır"
 
-#: src/main/connections.c:3959
+#: src/main/connections.c:3957
 msgid "'signed = FALSE' is only valid for integers of sizes 1 and 2"
 msgstr ""
 
-#: src/main/connections.c:4060
+#: src/main/connections.c:4071
 msgid "'x' is not an atomic vector type"
 msgstr "'x' bir atomik vektör tipi değil"
 
-#: src/main/connections.c:4066
+#: src/main/connections.c:4077
 msgid "can only write to a binary connection"
 msgstr "sadece ikili bir bağlantıya yazabilir"
 
-#: src/main/connections.c:4085
+#: src/main/connections.c:4096
 msgid "only 2^31-1 bytes can be written to a raw vector"
 msgstr "bir ham vektöre sadece only 2^31-1 bayt yazılabilir"
 
-#: src/main/connections.c:4087
+#: src/main/connections.c:4098
 #, fuzzy
 msgid "only 2^31-1 bytes can be written in a single writeBin() call"
 msgstr "tek bir readBin() çağrısına sadece 2^31-1 bayt yazılabilir"
 
-#: src/main/connections.c:4136 src/main/connections.c:4289
-#: src/main/connections.c:4570 src/main/connections.c:4610
+#: src/main/connections.c:4147 src/main/connections.c:4300
+#: src/main/connections.c:4581 src/main/connections.c:4621
 msgid "problem writing to connection"
 msgstr "bağlantıya yazılırken hata"
 
-#: src/main/connections.c:4181
+#: src/main/connections.c:4192
 msgid "size changing is not supported for raw vectors"
 msgstr "ham vektörler için boyut değişikliği desteklenmiyor"
 
-#: src/main/connections.c:4324 src/main/connections.c:4328
-#: src/main/connections.c:4367
+#: src/main/connections.c:4335 src/main/connections.c:4339
+#: src/main/connections.c:4378
 msgid "invalid UTF-8 input in readChar()"
 msgstr "readChar()'da geçersiz UTF-8 girişi"
 
-#: src/main/connections.c:4434
+#: src/main/connections.c:4445
 msgid "can only read in bytes in a non-UTF-8 MBCS locale"
 msgstr "sadece UTF-8 MBCS yerelinde olmayanlardan bayt okuyabilir"
 
-#: src/main/connections.c:4506
+#: src/main/connections.c:4517
 msgid "'object' is too short"
 msgstr "'object' çok kısa"
 
-#: src/main/connections.c:4559
+#: src/main/connections.c:4570
 msgid "writeChar: more bytes requested than are in the string - will zero-pad"
 msgstr ""
 "writeChar: dizede bulunandan daha fazla bayt talep edildi - sıfır eklenecek"
 
-#: src/main/connections.c:4584
+#: src/main/connections.c:4595
 msgid ""
 "writeChar: more characters requested than are in the string - will zero-pad"
 msgstr ""
 "writeChar: dizede bulunandan daha fazla karakter talep edildi - sıfır "
 "eklenecek"
 
-#: src/main/connections.c:4638
+#: src/main/connections.c:4649
 #, fuzzy
 msgid "maximum number of pushback lines exceeded"
 msgstr "maksimum renk sayısı aşıldı"
 
-#: src/main/connections.c:4644 src/main/connections.c:4648
-#: src/main/connections.c:4685 src/main/connections.c:4693
+#: src/main/connections.c:4655 src/main/connections.c:4659
+#: src/main/connections.c:4696 src/main/connections.c:4704
 #, fuzzy
 msgid "could not allocate space for pushback"
 msgstr "pushBack için yer ayrılamadı"
 
-#: src/main/connections.c:4676
+#: src/main/connections.c:4687
 msgid "can only push back on open readable connections"
 msgstr "sadece açık okunabilir bağlantılara geri zorlanabilir"
 
-#: src/main/connections.c:4678
+#: src/main/connections.c:4689
 msgid "can only push back on text-mode connections"
 msgstr "sadece metin-modu bağlantılara geri zorlanabilir"
 
-#: src/main/connections.c:4740 src/main/connections.c:4810
+#: src/main/connections.c:4753 src/main/connections.c:4823
 msgid "sink stack is full"
 msgstr "sink yığını tamamen dolu"
 
-#: src/main/connections.c:4743
+#: src/main/connections.c:4756
 msgid "cannot switch output to stdin"
 msgstr "çıktı stdin'e değiştirilemez"
 
-#: src/main/connections.c:4770
+#: src/main/connections.c:4783
 msgid "no sink to remove"
 msgstr "kaldırılcak sink yok"
 
-#: src/main/connections.c:4892
+#: src/main/connections.c:4903
 #, fuzzy
 msgid "there is no connection NA"
 msgstr "bağlantı yok %d"
 
-#: src/main/connections.c:4894
+#: src/main/connections.c:4905
 #, c-format
 msgid "there is no connection %d"
 msgstr "bağlantı yok %d"
 
-#: src/main/connections.c:5029
+#: src/main/connections.c:5039
+#, fuzzy
+msgid "method = \"wininet\" is only supported on Windows"
+msgstr "nsl() bu platformda desteklenmiyor"
+
+#: src/main/connections.c:5103
 msgid ""
 "file(\"\") only supports open = \"w+\" and open = \"w+b\": using the former"
 msgstr ""
 "file(\"\") sadece open = \"w+\" ve open = \"w+b\" destekler: ilki "
 "kullanılıyor"
 
-#: src/main/connections.c:5083 src/modules/internet/internet.c:115
-#: src/modules/internet/internet.c:569
-msgid "unsupported URL scheme"
-msgstr "desteklenmeyen URL şeması"
+#: src/main/connections.c:5157
+#, fuzzy
+msgid "URL scheme unsupported by this method"
+msgstr "bu derlemede ICU desteklenmiyor"
 
-#: src/main/connections.c:5173
+#: src/main/connections.c:5253
 msgid "file stream does not have gzip magic number"
 msgstr "dosya akışı gzip magic numarasına sahip değil"
 
-#: src/main/connections.c:5184
+#: src/main/connections.c:5264
 msgid "file stream does not have valid gzip header"
 msgstr "dosya akışı geçerli gzip başlığı içermiyor"
 
-#: src/main/connections.c:5249
+#: src/main/connections.c:5329
 msgid "writing error whilst flushing 'gzcon' connection"
 msgstr "'gzcon' bağlantısını temizlerken yazma hatası"
 
-#: src/main/connections.c:5351
+#: src/main/connections.c:5431
 #, c-format
 msgid "crc error %x %x\n"
 msgstr "crc hatası %x %x\n"
 
-#: src/main/connections.c:5378
+#: src/main/connections.c:5458
 msgid "write error on 'gzcon' connection"
 msgstr "'gzcon' bağlantısında yazma hatası"
 
-#: src/main/connections.c:5412
+#: src/main/connections.c:5493
 msgid "'level' must be one of 0 ... 9"
 msgstr "'level' 0 ... 9'dan biri olmalı"
 
-#: src/main/connections.c:5415
+#: src/main/connections.c:5496
 msgid "'allowNonCompression' must be TRUE or FALSE"
 msgstr "'allowNonCompression' TRUE veya FALSE olmalı"
 
-#: src/main/connections.c:5418
+#: src/main/connections.c:5499
+#, fuzzy
+msgid "'text' must be TRUE or FALSE"
+msgstr "'all.x' TRUE veya FALSE olmalı"
+
+#: src/main/connections.c:5502
 #, fuzzy
 msgid "this is already a 'gzcon' connection"
 msgstr "bir zaten bir gzcon bağlantısı"
 
-#: src/main/connections.c:5424
+#: src/main/connections.c:5508
 msgid "can only use read- or write- binary connections"
 msgstr "ikili bağlantılarda sadece read- veya write- işlemi yapılabilir"
 
-#: src/main/connections.c:5427
+#: src/main/connections.c:5511
 msgid "using a text-mode 'file' connection may not work correctly"
 msgstr "bir metin modu 'file' bağlantısı düzgün olarak çalışmayabilir"
 
-#: src/main/connections.c:5430
+#: src/main/connections.c:5514
 #, fuzzy
 msgid ""
 "cannot create a 'gzcon' connection from a writable textConnection; maybe use "
@@ -2340,76 +2398,72 @@ msgstr ""
 "yazılabilir textConnection'dan bir gzcon bağlantısı oluşturulamaz; "
 "rawConnection deneyin"
 
-#: src/main/connections.c:5433 src/main/connections.c:5437
-#: src/main/connections.c:5444 src/main/connections.c:5458
+#: src/main/connections.c:5517 src/main/connections.c:5521
+#: src/main/connections.c:5528 src/main/connections.c:5542
 msgid "allocation of 'gzcon' connection failed"
 msgstr "'gzcon' bağlantısı ayırması başarısız"
 
-#: src/main/connections.c:5644
+#: src/main/connections.c:5729
 msgid "not a list of sockets"
 msgstr "bir soket listesi değil"
 
-#: src/main/connections.c:5649
+#: src/main/connections.c:5734
 msgid "bad write indicators"
 msgstr "hatalı yazma göstericileri"
 
-#: src/main/connections.c:5660
+#: src/main/connections.c:5745
 msgid "not a socket connection"
 msgstr "bir soket bağlantısı değil"
 
-#: src/main/connections.c:5905
+#: src/main/connections.c:5990
 msgid "unknown compression, assuming none"
 msgstr "bilinmeyen sıkıştırma, sıkıştırma olmadığı varsayılıyor"
 
-#: src/main/connections.c:6023 src/main/connections.c:6027
-#: src/main/connections.c:6033
+#: src/main/connections.c:6108 src/main/connections.c:6112
+#: src/main/connections.c:6118
 #, fuzzy, c-format
 msgid "allocation of %s connection failed"
 msgstr "ham bağlantı yer ayırması başarısız"
 
-#: src/main/context.c:282
+#: src/main/context.c:316
 #, fuzzy
 msgid "no loop for break/next, jumping to top level"
 msgstr "sonlandırma noktası olan döngü yok, üst seviyeye atlanıyor"
 
-#: src/main/context.c:290
+#: src/main/context.c:324
 msgid "no function to return from, jumping to top level"
 msgstr "geri dönülecek fonksiyon yok, en üst seviyeye atlanıyor"
 
-#: src/main/context.c:302
+#: src/main/context.c:339
 msgid "target context is not on the stack"
 msgstr "hedef içerik yığında değil"
 
-#: src/main/context.c:324 src/main/context.c:340 src/main/context.c:407
-#: src/main/context.c:428 src/main/context.c:440 src/main/context.c:452
+#: src/main/context.c:361 src/main/context.c:377 src/main/context.c:444
+#: src/main/context.c:465 src/main/context.c:477 src/main/context.c:489
 msgid "not that many frames on the stack"
 msgstr "yığında o kadar çok çerçeve yok"
 
-#: src/main/context.c:357
+#: src/main/context.c:394
 msgid "only positive values of 'n' are allowed"
 msgstr "'n'in sadece pozitif değerlerine izin veriliyor"
 
-#: src/main/context.c:478
-msgid "no function to restart"
-msgstr "yeniden başlatılacak fonksiyon yok"
-
-#: src/main/context.c:515
+#: src/main/context.c:526
 msgid "number of contexts must be positive"
 msgstr "içerik numaraları pozitif olmalı"
 
-#: src/main/context.c:528
+#: src/main/context.c:539
 msgid "no browser context to query"
 msgstr "sorgulanacak tarayıcı içeriği yok"
 
-#: src/main/context.c:546
+#: src/main/context.c:557
 msgid "not that many calls to browser are active"
 msgstr "tarayıcıya yapılan çok fazla çağrı yok"
 
-#: src/main/context.c:560
+#: src/main/context.c:571
 msgid "not that many functions on the call stack"
 msgstr "çağrı yığınında o kadar çok fonksiyon yok"
 
-#: src/main/context.c:645
+#: src/main/context.c:656
 msgid "internal error in 'do_sys'"
 msgstr "'do_sys'de iç hata"
 
@@ -2418,40 +2472,40 @@ msgstr "'do_sys'de iç hata"
 msgid "integer overflow in 'cumsum'; use 'cumsum(as.numeric(.))'"
 msgstr "'cumsum'da tamsayı taşması; 'cumsum(as.numeric(.))' kullanın"
 
-#: src/main/cum.c:178
+#: src/main/cum.c:179
 #, fuzzy
-msgid "'cummin' not defined for complex numbers"
+msgid "'cummax' not defined for complex numbers"
 msgstr "min/maks karmaşık sayılar için tanımlanmamış"
 
-#: src/main/cum.c:181
+#: src/main/cum.c:182
 #, fuzzy
-msgid "'cummax' not defined for complex numbers"
+msgid "'cummin' not defined for complex numbers"
 msgstr "min/maks karmaşık sayılar için tanımlanmamış"
 
-#: src/main/cum.c:206 src/main/cum.c:230
+#: src/main/cum.c:209 src/main/cum.c:236
 msgid "unknown cumxxx function"
 msgstr "bilinmeyen cumxxx fonksiyonu"
 
-#: src/main/datetime.c:548 src/main/datetime.c:556 src/main/datetime.c:570
-#: src/main/datetime.c:575
+#: src/main/datetime.c:554 src/main/datetime.c:562 src/main/datetime.c:576
+#: src/main/datetime.c:581
 msgid "problem with setting timezone"
 msgstr "zaman dilimini ayarlarken bir sorun oluştu"
 
-#: src/main/datetime.c:560
+#: src/main/datetime.c:566
 msgid "cannot set timezones on this system"
 msgstr "bu sistem zaman dilimleri ayarlanamıyor"
 
-#: src/main/datetime.c:582 src/main/datetime.c:584
+#: src/main/datetime.c:588 src/main/datetime.c:590
 msgid "problem with unsetting timezone"
 msgstr "saat dilimini kaldırırken sorun"
 
-#: src/main/datetime.c:804 src/main/datetime.c:806 src/main/datetime.c:901
-#: src/main/datetime.c:1240 src/main/datetime.c:1242
+#: src/main/datetime.c:810 src/main/datetime.c:812 src/main/datetime.c:908
+#: src/main/datetime.c:1258 src/main/datetime.c:1260
 #, fuzzy
 msgid "zero-length component in non-empty \"POSIXlt\" structure"
 msgstr "boş olmayan POSIXIt yapısında sıfır uzunluğunda bileşen"
 
-#: src/main/dcf.c:113 src/main/dcf.c:181 src/main/dcf.c:253
+#: src/main/dcf.c:112 src/main/dcf.c:181 src/main/dcf.c:253
 msgid "could not allocate memory for 'read.dcf'"
 msgstr "'read.dcf' için bellek ayrılamıyor"
 
@@ -2465,82 +2519,88 @@ msgstr "Kayıtların başında '%s ...' ile başlayan sürekli dize bulundu"
 msgid "Line starting '%s ...' is malformed!"
 msgstr "'%s ...' ile başlayan dize kusurlu!"
 
-#: src/main/debug.c:45
-msgid "argument must be a closure"
-msgstr "argüman bir kapama olmalı"
-
-#: src/main/debug.c:76
+#: src/main/debug.c:46 src/main/debug.c:76
 msgid "argument must be a function"
 msgstr "argüman bir fonksiyon olmalı"
 
-#: src/main/debug.c:132 src/main/debug.c:166 src/main/debug.c:224
+#: src/main/debug.c:111
+#, fuzzy, c-format
+msgid "Value for '%s' must be TRUE or FALSE"
+msgstr "'all.x' TRUE veya FALSE olmalı"
+
+#: src/main/debug.c:139 src/main/debug.c:167 src/main/debug.c:241
 msgid "argument must not be a function"
 msgstr "argğman bir fonksiyon olmalı"
 
-#: src/main/debug.c:135
+#: src/main/debug.c:142
 msgid "cannot trace NULL"
 msgstr "NULL izlenemez"
 
-#: src/main/debug.c:139
+#: src/main/debug.c:146
 #, fuzzy
 msgid "'tracemem' is not useful for promise and environment objects"
 msgstr "'tracemem' promise ve çevrebirim nesneleri için kullanışlı değil"
 
-#: src/main/debug.c:142
+#: src/main/debug.c:149
 msgid "'tracemem' is not useful for weak reference or external pointer objects"
 msgstr ""
 "'tracemem' zayıf referanslar veya dış işaretçi nesneleri için uygun değil"
 
-#: src/main/debug.c:148 src/main/debug.c:171
+#: src/main/debug.c:180 src/main/debug.c:187
 msgid "R was not compiled with support for memory profiling"
 msgstr "R bellek profilleme özelliğiyle derlenmedi"
 
-#: src/main/deparse.c:152 src/main/sprintf.c:213 src/main/sprintf.c:245
+#: src/main/deparse.c:156 src/main/sprintf.c:216 src/main/sprintf.c:248
 msgid "too few arguments"
 msgstr "çok az argüman"
 
-#: src/main/deparse.c:159
+#: src/main/deparse.c:163
 #, fuzzy
 msgid "invalid 'cutoff' value for 'deparse', using default"
 msgstr "deparse için geçersiz 'cutoff', varsayılan kullanılıyor"
 
-#: src/main/deparse.c:247
+#: src/main/deparse.c:254
 msgid "deparse of an S4 object will not be source()able"
 msgstr "bir S4 nesnesinin deparse edilmesi source() yapılamaz olacak"
 
-#: src/main/deparse.c:249
+#: src/main/deparse.c:256
 msgid "deparse may be incomplete"
 msgstr "deparse eksik olabilir"
 
-#: src/main/deparse.c:251
+#: src/main/deparse.c:258
 msgid "deparse may be not be source()able in R < 2.7.0"
 msgstr "deparse R'nin 2.7.0 sürümünden önce source() yapılamayabilir"
 
-#: src/main/deparse.c:369 src/main/deparse.c:461 src/main/deparse.c:467
+#: src/main/deparse.c:350 src/main/deparse.c:400 src/main/source.c:206
+#, fuzzy
+msgid "'file' must be a character string or connection"
+msgstr "'what' bir karakter dizesi veya bir fonksiyon olmalıdır"
+
+#: src/main/deparse.c:378 src/main/deparse.c:473 src/main/deparse.c:479
 msgid "wrote too few characters"
 msgstr "çok az karakter yazıldı"
 
-#: src/main/deparse.c:391
+#: src/main/deparse.c:402
 msgid "character arguments expected"
 msgstr "karakter argümanı beklendi"
 
-#: src/main/deparse.c:394
+#: src/main/deparse.c:405
 #, fuzzy
 msgid "zero-length argument"
 msgstr "sıfır uzunlukta argüman"
 
-#: src/main/deparse.c:401
+#: src/main/deparse.c:412
 msgid "'opts' should be small non-negative integer"
 msgstr "'opts' negatif olmayan bir tamsayı olmalı"
 
-#: src/main/deparse.c:411 src/main/envir.c:1764 src/main/envir.c:1846
-#: src/main/eval.c:569 src/main/eval.c:1251 src/main/eval.c:3627
-#: src/main/saveload.c:1978 src/main/saveload.c:2309 src/main/serialize.c:2727
+#: src/main/deparse.c:422 src/main/envir.c:1898 src/main/envir.c:1983
+#: src/main/eval.c:626 src/main/eval.c:1423 src/main/eval.c:4246
+#: src/main/saveload.c:1980 src/main/saveload.c:2312 src/main/serialize.c:2773
 #, c-format
 msgid "object '%s' not found"
 msgstr "'%s' nesnesi bulunamadı"
 
-#: src/main/deparse.c:1519
+#: src/main/deparse.c:1592
 msgid "badly formed function expression"
 msgstr "hatalı biçimde fonksiyon ifadesi"
 
@@ -2549,251 +2609,236 @@ msgstr "hatalı biçimde fonksiyon ifadesi"
 msgid "the base graphics system is not registered"
 msgstr "çok fazla grafik sistemi kayıtlı"
 
-#: src/main/devices.c:165 src/main/devices.c:172
+#: src/main/devices.c:166 src/main/devices.c:174
 msgid "no active or default device"
 msgstr "aktif ya da varsayılan aygıt yok"
 
-#: src/main/devices.c:385 src/main/devices.c:447
+#: src/main/devices.c:388 src/main/devices.c:450
 msgid "too many open devices"
 msgstr "çok fazla açık aygıt"
 
-#: src/main/devices.c:474
+#: src/main/devices.c:491
 msgid "not enough memory to allocate device (in GEcreateDevDesc)"
 msgstr "aygıtı yerleştirmek için yeterli bellek yok (GEcreateDevDes içinde)"
 
-#: src/main/devices.c:515
+#: src/main/devices.c:532
 msgid "Hit <Return> to see next plot: "
 msgstr "Sonraki çizimi görmek için <Enter>'a basın: "
 
-#: src/main/dotcode.c:112 src/main/dotcode.c:142
+#: src/main/dotcode.c:127 src/main/dotcode.c:157
 msgid "NULL value passed as symbol address"
 msgstr "NULL değeri sembol adresi olarak geçirildi"
 
-#: src/main/dotcode.c:133
+#: src/main/dotcode.c:148
 #, c-format
 msgid "Unimplemented type %d in createRSymbolObject"
 msgstr "createRSymbolObject'de tanımlanmamış tip %d"
 
-#: src/main/dotcode.c:147 src/main/dotcode.c:237
+#: src/main/dotcode.c:162 src/main/dotcode.c:260
 #, c-format
 msgid "symbol '%s' is too long"
 msgstr "'%s' sembolü çok uzun"
 
-#: src/main/dotcode.c:159
+#: src/main/dotcode.c:174
 #, fuzzy
 msgid ""
 "first argument must be a string (of length 1) or native symbol reference"
 msgstr "'name' bir dize (1 uzunluğunda) ya da yerel sembol referansı olmalıdır"
 
-#: src/main/dotcode.c:201 src/main/dotcode.c:563
+#: src/main/dotcode.c:224 src/main/dotcode.c:1240
 msgid "too many arguments in foreign function call"
 msgstr "yabancı fonksiyon kullanımında çok fazla argüman"
 
-#: src/main/dotcode.c:213
+#: src/main/dotcode.c:236
 msgid "PACKAGE = \"\" is invalid"
 msgstr ""
 
-#: src/main/dotcode.c:269 src/main/dotcode.c:274 src/main/dotcode.c:279
-#: src/main/dotcode.c:284
+#: src/main/dotcode.c:292 src/main/dotcode.c:297 src/main/dotcode.c:302
+#: src/main/dotcode.c:307
 #, fuzzy, c-format
 msgid "\"%s\" not available for %s() for package \"%s\""
 msgstr "%s bu aygıt için mevcut değil"
 
-#: src/main/dotcode.c:289
+#: src/main/dotcode.c:312
 #, c-format
 msgid "%s symbol name \"%s\" not in DLL for package \"%s\""
 msgstr "%s sembol ismi \"%s\" \"%s\" paketi için DLL içinde değil"
 
-#: src/main/dotcode.c:294
+#: src/main/dotcode.c:317
 #, c-format
 msgid "%s symbol name \"%s\" not in load table"
 msgstr "%s sembol ismi \"%s\" yükleme tablosunda değil"
 
-#: src/main/dotcode.c:348 src/main/dotcode.c:352 src/main/dotcode.c:362
-#: src/main/dotcode.c:427 src/main/dotcode.c:434
+#: src/main/dotcode.c:368 src/main/dotcode.c:370 src/main/dotcode.c:380
+#: src/main/dotcode.c:445 src/main/dotcode.c:452
 #, fuzzy, c-format
 msgid "'%s' used more than once"
 msgstr "DUP birden fazla kez kullanıldı"
 
-#: src/main/dotcode.c:358
+#: src/main/dotcode.c:376
 msgid "DLL name is too long"
 msgstr "DLL ismi çok uzun"
 
-#: src/main/dotcode.c:403
+#: src/main/dotcode.c:421
 msgid "PACKAGE argument must be a single character string"
 msgstr "PACKAGE argümanı tek bir karakter dizesi olmalı"
 
-#: src/main/dotcode.c:409
+#: src/main/dotcode.c:427
 msgid "PACKAGE argument is too long"
 msgstr "PACKAGE argümanı çok uzun"
 
-#: src/main/dotcode.c:474
+#: src/main/dotcode.c:492
 msgid "no arguments supplied"
 msgstr "argüman verilmedi"
 
-#: src/main/dotcode.c:475 src/main/seq.c:913
+#: src/main/dotcode.c:493 src/main/seq.c:911
 msgid "too many arguments"
 msgstr "çok fazla argüman"
 
-#: src/main/dotcode.c:512 src/main/dotcode.c:554 src/main/dotcode.c:1397
+#: src/main/dotcode.c:530 src/main/dotcode.c:1232 src/main/dotcode.c:1420
 #, fuzzy
 msgid "'.NAME' is missing"
 msgstr "'EXPR' eksik"
 
-#: src/main/dotcode.c:521 src/main/dotcode.c:570 src/main/dotcode.c:1418
+#: src/main/dotcode.c:539 src/main/dotcode.c:1247 src/main/dotcode.c:1441
 #, fuzzy, c-format
 msgid "Incorrect number of arguments (%d), expecting %d for '%s'"
 msgstr "Hatalı sayıda argüman (%d), %d adet bekleniyordu (%s için)"
 
-#: src/main/dotcode.c:1227 src/main/dotcode.c:2276
+#: src/main/dotcode.c:1216 src/main/dotcode.c:2290
 msgid "too many arguments, sorry"
 msgstr "çok fazla argüman, üzgünüm"
 
-#: src/main/dotcode.c:1261 src/main/dotcode.c:1278 src/main/engine.c:2993
+#: src/main/dotcode.c:1284 src/main/dotcode.c:1301 src/main/engine.c:3013
 msgid "invalid graphics state"
 msgstr "geçersiz grafik durumu"
 
-#: src/main/dotcode.c:1357
+#: src/main/dotcode.c:1380
 msgid "NULL value for DLLInfoReference when looking for DLL"
 msgstr "DLL'ye bakarken DLLInfoReference için NULL değeri"
 
-#: src/main/dotcode.c:1458
+#: src/main/dotcode.c:1481
 #, fuzzy, c-format
 msgid "wrong type for argument %d in call to %s"
 msgstr "%d . argüman için yanlış tip (%s çağrısı)"
 
-#: src/main/dotcode.c:1470
-#, c-format
-msgid ""
-"explicit request not to duplicate arguments in call to '%s', but argument %d "
-"is of the wrong type (%d != %d)"
-msgstr ""
-
-#: src/main/dotcode.c:1493
+#: src/main/dotcode.c:1510
 #, fuzzy, c-format
 msgid "long vectors (argument %d) are not supported in %s"
 msgstr "sembolik bağlantılar bu sistemde desteklenmiyor"
 
-#: src/main/dotcode.c:1524
+#: src/main/dotcode.c:1541
 #, c-format
 msgid "NAs in foreign function call (arg %d)"
 msgstr "dış fonksiyon çağrısında NA'lar (argüman %d)"
 
-#: src/main/dotcode.c:1547
+#: src/main/dotcode.c:1564
 #, c-format
 msgid "NA/NaN/Inf in foreign function call (arg %d)"
 msgstr "dış fonksiyon çağrısında NA/NaN/Inf (argüman %d)"
 
-#: src/main/dotcode.c:1552
-msgid "single values not returned if not duplicated"
-msgstr ""
-
-#: src/main/dotcode.c:1578
+#: src/main/dotcode.c:1594
 #, c-format
 msgid "complex NA/NaN/Inf in foreign function call (arg %d)"
 msgstr "Dışarıdan fonksiyon çağrısında karmaşık NA/NaN/Inf (argüman %d)"
 
-#: src/main/dotcode.c:1597
-msgid "character variables must be duplicated in .C/.Fortran"
-msgstr "karakter değişkenler .C/.Fortran'da kopyalanmalıdır"
-
-#: src/main/dotcode.c:1602
+#: src/main/dotcode.c:1616
 msgid "only first string in char vector used in .Fortran"
 msgstr ".Fortran'da sadece karakter vektörünün ilk dizesi kullanıldı"
 
-#: src/main/dotcode.c:1645 src/main/dotcode.c:1661 src/main/dotcode.c:1672
+#: src/main/dotcode.c:1659 src/main/dotcode.c:1675 src/main/dotcode.c:1686
 #, fuzzy, c-format
 msgid "invalid mode (%s) to pass to Fortran (arg %d)"
 msgstr "Fortran'a geçirmek için geçersiz mod (argüman %d)"
 
-#: src/main/dotcode.c:1666
+#: src/main/dotcode.c:1680
 #, fuzzy, c-format
 msgid "invalid mode (%s) to pass to C or Fortran (arg %d)"
 msgstr "Fortran'a geçirmek için geçersiz mod (argüman %d)"
 
-#: src/main/dotcode.c:1677
+#: src/main/dotcode.c:1691
 msgid "pairlists are passed as SEXP as from R 2.15.0"
 msgstr ""
 
-#: src/main/dotcode.c:2499
+#: src/main/dotcode.c:2510
 #, c-format
 msgid "type \"%s\" not supported in interlanguage calls"
 msgstr "\"%s\" tipi dillerarası çağrılarda desteklenmiyor"
 
-#: src/main/dotcode.c:2604
+#: src/main/dotcode.c:2615
 #, c-format
 msgid "mode '%s' is not supported in call_R"
 msgstr "call_R içinde '%s' modu desteklenmiyor"
 
-#: src/main/dounzip.c:171
+#: src/main/dounzip.c:172
 #, c-format
 msgid " not overwriting file '%s"
 msgstr " '%s dosyasının üzerine yazılmıyor"
 
-#: src/main/dounzip.c:256
+#: src/main/dounzip.c:257
 #, c-format
 msgid "zip file '%s' cannot be opened"
 msgstr "zip dosyası '%s' açılamaz"
 
-#: src/main/dounzip.c:312
+#: src/main/dounzip.c:313
 msgid "invalid zip name argument"
 msgstr "geçersiz zip adı argümanı"
 
-#: src/main/dounzip.c:315 src/main/dounzip.c:409
+#: src/main/dounzip.c:316 src/main/dounzip.c:410
 msgid "zip path is too long"
 msgstr "zip dosya yolu çok uzun"
 
-#: src/main/dounzip.c:332
+#: src/main/dounzip.c:333
 #, fuzzy
 msgid "'exdir' is too long"
 msgstr "'destination' çok uzun"
 
-#: src/main/dounzip.c:335
+#: src/main/dounzip.c:336
 #, fuzzy
 msgid "'exdir' does not exist"
 msgstr "menü bulunmuyor"
 
-#: src/main/dounzip.c:363
+#: src/main/dounzip.c:364
 msgid "requested file not found in the zip file"
 msgstr "zip dosyasında istenilen dosya bulunamadı"
 
-#: src/main/dounzip.c:366
+#: src/main/dounzip.c:367
 msgid "zip file is corrupt"
 msgstr "zip dosyası bozuk"
 
-#: src/main/dounzip.c:369
+#: src/main/dounzip.c:370
 msgid "CRC error in zip file"
 msgstr "zip dosyasında CRC hatası"
 
-#: src/main/dounzip.c:376
+#: src/main/dounzip.c:377
 msgid "write error in extracting from zip file"
 msgstr "zip dosyasından çıkarırken yazma hatası"
 
-#: src/main/dounzip.c:379
+#: src/main/dounzip.c:380
 #, c-format
 msgid "error %d in extracting from zip file"
 msgstr "zip dosyasından çıkarırken %d hatası"
 
-#: src/main/dounzip.c:404
+#: src/main/dounzip.c:405
 msgid "unz connections can only be opened for reading"
 msgstr "unz bağlantıları sadece okumak için açılabilir"
 
-#: src/main/dounzip.c:415
+#: src/main/dounzip.c:416
 #, fuzzy
 msgid "invalid description of 'unz' connection"
 msgstr "unz bağlantısının geçersiz açıklaması"
 
-#: src/main/dounzip.c:421
+#: src/main/dounzip.c:422
 #, c-format
 msgid "cannot open zip file '%s'"
 msgstr "zip dosyası '%s'  açılamadı"
 
-#: src/main/dounzip.c:425
+#: src/main/dounzip.c:426
 #, c-format
 msgid "cannot locate file '%s' in zip file '%s'"
 msgstr "'%s' dosyası '%s' zip dosyasında konumlandıralamadı"
 
-#: src/main/dounzip.c:469
+#: src/main/dounzip.c:470
 msgid "printing not enabled for this connection"
 msgstr "bu bağlantı için yazdırma etkin değil"
 
@@ -2801,8 +2846,8 @@ msgstr "bu bağlantı için yazdırma etkin değil"
 msgid "write not enabled for this connection"
 msgstr "yazma bu bağlantı için etkin değil"
 
-#: src/main/dounzip.c:496 src/main/dounzip.c:500 src/main/dounzip.c:506
-#: src/main/dounzip.c:523
+#: src/main/dounzip.c:494 src/main/dounzip.c:498 src/main/dounzip.c:504
+#: src/main/dounzip.c:521
 #, fuzzy
 msgid "allocation of 'unz' connection failed"
 msgstr "unz bağlantısı yer ayırmasında hata"
@@ -2821,7 +2866,7 @@ msgstr "\"function\" için geçersiz biçimsel argümanlar"
 msgid "invalid argument to edit()"
 msgstr "edit()'e geçersiz argüman"
 
-#: src/main/edit.c:121 src/main/saveload.c:2076
+#: src/main/edit.c:121 src/main/saveload.c:2078
 msgid "unable to open file"
 msgstr "dosya açılamadı"
 
@@ -2885,12 +2930,12 @@ msgid "no graphics system to unregister"
 msgstr "kaydı kaldırılacak grafik sistemi bulunmuyor"
 
 #: src/main/engine.c:443 src/main/engine.c:448 src/main/engine.c:456
-#: src/main/engine.c:463 src/main/engine.c:477 src/modules/X11/devX11.c:1157
+#: src/main/engine.c:463 src/main/engine.c:477 src/modules/X11/devX11.c:1159
 msgid "invalid line end"
 msgstr "geçersiz dize sonu "
 
 #: src/main/engine.c:508 src/main/engine.c:513 src/main/engine.c:521
-#: src/main/engine.c:528 src/main/engine.c:542 src/modules/X11/devX11.c:1175
+#: src/main/engine.c:528 src/main/engine.c:542 src/modules/X11/devX11.c:1177
 msgid "invalid line join"
 msgstr "geçersiz dize girişi"
 
@@ -2923,84 +2968,98 @@ msgstr "Sys.sleep bu sistemde tanımlanmamış"
 msgid "raster capture is not available for this device"
 msgstr "%s bu aygıt için mevcut değil"
 
-#: src/main/engine.c:1656
+#: src/main/engine.c:1662
 #, c-format
 msgid "font face %d not supported for font family '%s'"
 msgstr "%d yazıtipi yüzü, '%s' yazıtipi ailesi için desteklenmiyor"
 
-#: src/main/engine.c:1972
+#: src/main/engine.c:1978
 msgid "no graphics device is active"
 msgstr "aktif grafik aygıtı yok"
 
-#: src/main/engine.c:2049
+#: src/main/engine.c:2055
 #, c-format
 msgid "pch value '%d' is invalid in this locale"
 msgstr "pch değeri '%d' bu yerelde geçersiz"
 
-#: src/main/engine.c:2307
+#: src/main/engine.c:2313
 #, c-format
 msgid "unimplemented pch value '%d'"
 msgstr "tanımlanmamış pch değeri '%d'"
 
-#: src/main/engine.c:2330
+#: src/main/engine.c:2336
 #, c-format
 msgid "invalid axis extents [GEPretty(.,.,n=%d)"
 msgstr "geçersiz eksen uzatımı [GEPretty(.,.,n=%d)"
 
-#: src/main/engine.c:2334
+#: src/main/engine.c:2340
 #, c-format
 msgid "infinite axis extents [GEPretty(%g,%g,%d)]"
 msgstr "sonsuz eksen uzatımı [GEPretty(%g,%g,%d)]"
 
-#: src/main/engine.c:2371
+#: src/main/engine.c:2377
 #, c-format
 msgid " .. GEPretty(.): new *lo = %g < %g = x1"
 msgstr " .. GEPretty(.): new *lo = %g < %g = x1"
 
-#: src/main/engine.c:2373
+#: src/main/engine.c:2379
 #, c-format
 msgid " .. GEPretty(.): new *up = %g > %g = x2"
 msgstr " .. GEPretty(.): new *up = %g > %g = x2"
 
-#: src/main/engine.c:2773
+#: src/main/engine.c:2784
 #, fuzzy
 msgid "display list redraw incomplete"
 msgstr "Görünüm listesi yeniden çizimi eksik"
 
-#: src/main/engine.c:2777
+#: src/main/engine.c:2788
 #, fuzzy
 msgid "invalid display list"
 msgstr "geçersiz argüman listesi"
 
-#: src/main/engine.c:2963
+#: src/main/engine.c:2900
+#, c-format
+msgid ""
+"snapshot recorded with different graphics engine version (pre 11 - this is "
+"version %d)"
+msgstr ""
+
+#: src/main/engine.c:2904
+#, c-format
+msgid ""
+"snapshot recorded with different graphics engine version (%d - this is "
+"version %d)"
+msgstr ""
+
+#: src/main/engine.c:2983
 msgid "'expr' argument must be an expression"
 msgstr "'expr' argümanı bir ifade olmalı"
 
-#: src/main/engine.c:2965
+#: src/main/engine.c:2985
 msgid "'list' argument must be a list"
 msgstr "'list' argümanı bir liste olmalı"
 
-#: src/main/engine.c:2971
+#: src/main/engine.c:2991
 msgid "'env' argument must be an environment"
 msgstr "'env' argümanı bir ortam olmalı"
 
-#: src/main/engine.c:3051 src/main/engine.c:3059
+#: src/main/engine.c:3071 src/main/engine.c:3079
 msgid "invalid multibyte char in pch=\"c\""
 msgstr "pch=\"c\"'de geçersiz çokbaytlı karakter"
 
-#: src/main/engine.c:3106
+#: src/main/engine.c:3126
 msgid "invalid hex digit in 'color' or 'lty'"
 msgstr "'color' veya 'lty' içinde geçersiz hex rakamı"
 
-#: src/main/engine.c:3129
+#: src/main/engine.c:3149
 msgid "invalid line type: must be length 2, 4, 6 or 8"
 msgstr "geçersiz çizgi tipi: 2, 4, 6, veya 8 uzunluğunda olmalıdır"
 
-#: src/main/engine.c:3133
+#: src/main/engine.c:3153
 msgid "invalid line type: zeroes are not allowed"
 msgstr "geçersiz çizgi tipi: sıfırlara izin verilmiyor "
 
-#: src/main/engine.c:3142 src/main/engine.c:3150 src/main/engine.c:3157
+#: src/main/engine.c:3162 src/main/engine.c:3170 src/main/engine.c:3177
 msgid "invalid line type"
 msgstr "geçersiz çizgi tipi"
 
@@ -3009,443 +3068,446 @@ msgstr "geçersiz çizgi tipi"
 msgid "cannot change value of locked binding for '%s'"
 msgstr "kilitlenmiş bağlayıcı '%s' in değeri değiştirilemez"
 
-#: src/main/envir.c:251 src/main/envir.c:1454
+#: src/main/envir.c:251 src/main/envir.c:1530
 msgid "cannot add bindings to a locked environment"
 msgstr "kilitlenmiş bir ortama bağlayıcı eklenemez"
 
-#: src/main/envir.c:772
+#: src/main/envir.c:775
 msgid "invalid cached value in R_GetGlobalCache"
 msgstr "R_GetGlobalCache geçersiz önbelleklenmiş değer"
 
-#: src/main/envir.c:830
+#: src/main/envir.c:836
 msgid "cannot unbind in the base namespace"
 msgstr "temel isimlendirme ayrılamıyor"
 
-#: src/main/envir.c:832
+#: src/main/envir.c:838
 msgid "unbind in the base environment is unimplemented"
 msgstr "temel ortamda ayırma tanımlanmadı"
 
-#: src/main/envir.c:834 src/main/envir.c:1684
+#: src/main/envir.c:840 src/main/envir.c:1818
 msgid "cannot remove bindings from a locked environment"
 msgstr "kilitlenmiş bir ortamdan bağlayıcılar kaldırılamaz"
 
-#: src/main/envir.c:1139
+#: src/main/envir.c:1213
 #, c-format
 msgid "argument to '%s' is not an environment"
 msgstr "'%s' e verilen argüman bir ortam değil"
 
-#: src/main/envir.c:1300
+#: src/main/envir.c:1374
 #, fuzzy, c-format
 msgid "the ... list does not contain %d elements"
 msgstr "... listesi %d eleman içermiyor"
 
-#: src/main/envir.c:1302
+#: src/main/envir.c:1376
 #, c-format
 msgid "..%d used in an incorrect context, no ... to look in"
 msgstr "..%d hatalı bir içerikte kullanıldı,  bakılcak ... yok"
 
-#: src/main/envir.c:1390 src/main/envir.c:1842 src/main/eval.c:573
-#: src/main/eval.c:3618
-#, c-format
-msgid "argument \"%s\" is missing, with no default"
-msgstr "varsayılanı olmayan \"%s\" argümanı yok"
-
-#: src/main/envir.c:1395
+#: src/main/envir.c:1469
 #, c-format
 msgid "could not find function \"%s\""
 msgstr "\"%s\" fonksiyonu bulunamadı"
 
-#: src/main/envir.c:1418
+#: src/main/envir.c:1492
 msgid "cannot assign values in the empty environment"
 msgstr "boş bir ortamda değer atanamaz"
 
-#: src/main/envir.c:1424 src/main/envir.c:1497
+#: src/main/envir.c:1498 src/main/envir.c:1628
 msgid "cannot assign variables to this database"
 msgstr "bu veritabanına değişken atanamaz"
 
-#: src/main/envir.c:1580
+#: src/main/envir.c:1714
 #, c-format
 msgid "cannot add binding of '%s' to the base environment"
 msgstr "'%s' in bağlayıcısı temel ortama eklenemez"
 
-#: src/main/envir.c:1609
+#: src/main/envir.c:1743
 msgid "only the first element is used as variable name"
 msgstr "sadece ilk öğe değişken ismi olarak kullanıldı"
 
-#: src/main/envir.c:1641
+#: src/main/envir.c:1775
 msgid "first argument must be a named list"
 msgstr "ilk argüman isimlendirilmiş bir liste olmalıdır"
 
-#: src/main/envir.c:1646
+#: src/main/envir.c:1780
 #, fuzzy
 msgid "names(x) must be a character vector of the same length as x"
 msgstr "'hostname' 1 birim uzunlukta bir karakter vektörü olmalı"
 
-#: src/main/envir.c:1649
+#: src/main/envir.c:1783
 #, fuzzy
 msgid "'envir' argument must be an environment"
 msgstr "'env' argümanı bir ortam olmalı"
 
-#: src/main/envir.c:1678
+#: src/main/envir.c:1812
 msgid "cannot remove variables from base namespace"
 msgstr "temel isimlendirmeden değişken silinemez"
 
-#: src/main/envir.c:1680
+#: src/main/envir.c:1814
 msgid "cannot remove variables from the base environment"
 msgstr "temel ortamdan değişken silinemez"
 
-#: src/main/envir.c:1682
+#: src/main/envir.c:1816
 msgid "cannot remove variables from the empty environment"
 msgstr "boş ortamdan değişken silinemez"
 
-#: src/main/envir.c:1690
+#: src/main/envir.c:1824
 msgid "cannot remove variables from this database"
 msgstr "bu veritabanından değişken silinemez"
 
-#: src/main/envir.c:1849
+#: src/main/envir.c:1985
 #, c-format
 msgid "object '%s' of mode '%s' was not found"
 msgstr "'%s' nesnesi ('%s' modunun) bulunamadı"
 
-#: src/main/envir.c:1921
+#: src/main/envir.c:2068
 #, c-format
 msgid "invalid name in position %d"
 msgstr "konum %d de geçersiz isim"
 
-#: src/main/envir.c:1927
+#: src/main/envir.c:2074
 msgid "second argument must be an environment"
 msgstr "ikinci argüman bir ortam olmalıdır"
 
-#: src/main/envir.c:1935 src/main/envir.c:1943
+#: src/main/envir.c:2082 src/main/envir.c:2090
 #, c-format
 msgid "wrong length for '%s' argument"
 msgstr "'%s' argümanı için yanlış uzunluk"
 
-#: src/main/envir.c:2062
+#: src/main/envir.c:2221
 msgid "invalid use of 'missing'"
 msgstr "'missing'in geçersiz kullanımı"
 
-#: src/main/envir.c:2087
+#: src/main/envir.c:2247
 msgid "'missing' can only be used for arguments"
 msgstr "'missing' sadece argümanlar için kullanılabilir"
 
-#: src/main/envir.c:2168
+#: src/main/envir.c:2333
 msgid "'pos' must be an integer"
 msgstr "'pos' bir tamsayı olmalıdır"
 
-#: src/main/envir.c:2182
+#: src/main/envir.c:2347
 msgid "all elements of a list must be named"
 msgstr "bir listenin bütün elemanları isimlendirilmiş olmalıdır"
 
-#: src/main/envir.c:2205
+#: src/main/envir.c:2370
 msgid "'attach' only works for lists, data frames and environments"
 msgstr "'attach' sadece listeler, veri çerçeveleri ve ortamlar için çalışır"
 
-#: src/main/envir.c:2288
+#: src/main/envir.c:2453
 msgid "detaching \"package:base\" is not allowed"
 msgstr "\"package:base\" i çıkarmaya izin yok"
 
-#: src/main/envir.c:2589 src/main/envir.c:2644
+#: src/main/envir.c:2798 src/main/envir.c:2879
 msgid "argument must be an environment"
 msgstr "argüman bir ortam olmalıdır"
 
-#: src/main/envir.c:2648
+#: src/main/envir.c:2883
 msgid "arguments must be symbolic"
 msgstr "argüman sembolik olmalıdır"
 
-#: src/main/envir.c:2772
+#: src/main/envir.c:3032
 msgid "no enclosing environment"
 msgstr "kapsayıcı bir ortam yok"
 
-#: src/main/envir.c:2825
+#: src/main/envir.c:3085
 #, c-format
 msgid "no item called \"%s\" on the search list"
 msgstr "arama listesinde \"%s\" adında öğe yok"
 
-#: src/main/envir.c:2850
+#: src/main/envir.c:3110
 msgid "using 'as.environment(NULL)' is defunct"
 msgstr "'as.environment(NULL)' kullanımı artık geçersiz"
 
-#: src/main/envir.c:2856
+#: src/main/envir.c:3116
 msgid "S4 object does not extend class \"environment\""
 msgstr "S4 nesnesi \"environment\" sınıfını genişletmiyor"
 
-#: src/main/envir.c:2871
+#: src/main/envir.c:3131
 msgid "invalid object for 'as.environment'"
 msgstr "'as.environment' için geçersiz nesne"
 
-#: src/main/envir.c:2897 src/main/envir.c:2925 src/main/envir.c:2954
-#: src/main/envir.c:2975 src/main/envir.c:2998 src/main/envir.c:3033
-#: src/main/envir.c:3054
+#: src/main/envir.c:3157 src/main/envir.c:3185 src/main/envir.c:3214
+#: src/main/envir.c:3235 src/main/envir.c:3258 src/main/envir.c:3293
+#: src/main/envir.c:3314
 msgid "not an environment"
 msgstr "bir ortam değil"
 
-#: src/main/envir.c:2949 src/main/envir.c:2970 src/main/envir.c:2991
-#: src/main/envir.c:3028 src/main/envir.c:3049 src/main/envir.c:3148
+#: src/main/envir.c:3209 src/main/envir.c:3230 src/main/envir.c:3251
+#: src/main/envir.c:3288 src/main/envir.c:3309 src/main/envir.c:3408
 msgid "not a symbol"
 msgstr "bir sembol değil"
 
-#: src/main/envir.c:2962 src/main/envir.c:2983 src/main/envir.c:3041
-#: src/main/envir.c:3062
+#: src/main/envir.c:3222 src/main/envir.c:3243 src/main/envir.c:3301
+#: src/main/envir.c:3322
 #, c-format
 msgid "no binding for \"%s\""
 msgstr "\"%s\" için bağlayıcı yok"
 
-#: src/main/envir.c:2993
+#: src/main/envir.c:3253
 msgid "not a function"
 msgstr "bir fonksiyon değil"
 
-#: src/main/envir.c:3001 src/main/envir.c:3017
+#: src/main/envir.c:3261 src/main/envir.c:3277
 msgid "symbol already has a regular binding"
 msgstr "sembol halihazırda düzgün bağlayıcıya sahip"
 
-#: src/main/envir.c:3003 src/main/envir.c:3019
+#: src/main/envir.c:3263 src/main/envir.c:3279
 msgid "cannot change active binding if binding is locked"
 msgstr "bağlayıcı kilitli ise aktif bağlayıcı değiştirilemez"
 
-#: src/main/envir.c:3107
+#: src/main/envir.c:3367 src/main/envir.c:3604
 msgid "unknown op"
 msgstr "bilinmeyen op"
 
-#: src/main/envir.c:3152
+#: src/main/envir.c:3412
 msgid "cannot unbind a locked binding"
 msgstr "kilitlenmiş bağlayıcı ayrılamaz"
 
-#: src/main/envir.c:3154
+#: src/main/envir.c:3414
 msgid "cannot unbind an active binding"
 msgstr "aktif bir bağlayıcı ayrılamaz"
 
-#: src/main/envir.c:3289
+#: src/main/envir.c:3555
 #, fuzzy
 msgid "bad namespace name"
 msgstr "hatalı "
 
-#: src/main/envir.c:3301
+#: src/main/envir.c:3567
 #, fuzzy
 msgid "namespace already registered"
 msgstr "isim alanı halihazırda kayıtlı"
 
-#: src/main/envir.c:3313
+#: src/main/envir.c:3579
 #, fuzzy
 msgid "namespace not registered"
 msgstr "isim alanı kayıtlı değil"
 
-#: src/main/envir.c:3360
+#: src/main/envir.c:3635
 msgid "bad import environment argument"
 msgstr "hatalı içe aktarma ortam argümanı"
 
-#: src/main/envir.c:3365
+#: src/main/envir.c:3640
 msgid "bad export environment argument"
 msgstr "hatalı dışa aktarma argümanı"
 
-#: src/main/envir.c:3369
+#: src/main/envir.c:3644
 msgid "length of import and export names must match"
 msgstr "içe ve dışa aktarma isimleri uzunlukları eşit olmalıdır"
 
-#: src/main/envir.c:3392
+#: src/main/envir.c:3667
 #, c-format
 msgid "exported symbol '%s' has no value"
 msgstr "'%s' dışa aktarılmış sembolünün değeri yok"
 
-#: src/main/envir.c:3557
+#: src/main/envir.c:3833
 #, c-format
 msgid "unknown encoding: %d"
 msgstr "bilinmeyen kodlama: %d"
 
-#: src/main/envir.c:3577
+#: src/main/envir.c:3853
 #, c-format
 msgid "embedded nul in string: '%s'"
 msgstr "'%s' dizesi gömülü nul"
 
-#: src/main/errors.c:178 src/main/errors.c:215
+#: src/main/errors.c:163 src/main/errors.c:200
 msgid "interrupts suspended; signal ignored"
 msgstr "kesmeler durduruldu; sinyal görmezden gelindi"
 
-#: src/main/errors.c:318
+#: src/main/errors.c:250
+msgid "[... truncated]"
+msgstr ""
+
+#: src/main/errors.c:310
 msgid "invalid option \"warning.expression\""
 msgstr "geçersiz seçenek \"warning.expression\""
 
-#: src/main/errors.c:348
+#: src/main/errors.c:339
 #, c-format
 msgid "(converted from warning) %s"
 msgstr "%s (uyarıdan çevirildi)"
 
-#: src/main/errors.c:359
-#, c-format
-msgid "Warning: %s\n"
+#: src/main/errors.c:349
+#, fuzzy
+msgid "Warning:"
 msgstr "Uyarı: %s\n"
 
-#: src/main/errors.c:363
-#, c-format
-msgid "Warning in %s : %s\n"
+#: src/main/errors.c:351
+#, fuzzy, c-format
+msgid "Warning in %s :"
 msgstr "%s'de uyarı: %s\n"
 
-#: src/main/errors.c:365
-#, c-format
-msgid ""
-"Warning in %s :\n"
-"  %s\n"
+#: src/main/errors.c:360 src/main/errors.c:374 src/main/errors.c:687
+msgid "Calls:"
 msgstr ""
-"%s'de uyarı :\n"
-"  %s\n"
 
-#: src/main/errors.c:428 src/main/errors.c:447 src/main/errors.c:596
+#: src/main/errors.c:421 src/main/errors.c:440 src/main/errors.c:602
 msgid "Lost warning messages\n"
 msgstr "Kayıp uyarı mesajları\n"
 
-#: src/main/errors.c:459
-msgid "Warning message:\n"
-msgid_plural "Warning messages:\n"
+#: src/main/errors.c:452
+#, fuzzy
+msgid "Warning message:"
+msgid_plural "Warning messages:"
 msgstr[0] "Uyarı mesajları:\n"
 
-#: src/main/errors.c:514
+#: src/main/errors.c:462 src/main/errors.c:490
 #, c-format
-msgid "There were %d warnings (use warnings() to see them)\n"
-msgstr "%d hata oluştu (görmek için warnings() kullanın)\n"
+msgid "In %s :"
+msgstr ""
+
+#: src/main/errors.c:515
+#, fuzzy, c-format
+msgid "There was %d warning (use warnings() to see it)"
+msgid_plural "There were %d warnings (use warnings() to see them)"
+msgstr[0] "%d hata oluştu (görmek için warnings() kullanın)\n"
 
-#: src/main/errors.c:517
+#: src/main/errors.c:520
 #, fuzzy, c-format
-msgid "There were %d or more warnings (use warnings() to see the first %d)\n"
+msgid "There were %d or more warnings (use warnings() to see the first %d)"
 msgstr ""
 "50 yada daha fazla uyarı oluştu (ilk 50'sini görmek için warnings() "
 "kullanın)\n"
 
-#: src/main/errors.c:587
+#: src/main/errors.c:593
 msgid "Error during wrapup: "
 msgstr "wrapup sırasında hata: "
 
-#: src/main/errors.c:612
+#: src/main/errors.c:618
 msgid "Error in "
 msgstr "Hata oluştu: "
 
-#: src/main/errors.c:613
+#: src/main/errors.c:640 src/main/errors.c:647
 #, c-format
-msgid " (from %s) : "
+msgid "Error in %s (from %s) : "
 msgstr ""
 
-#: src/main/errors.c:664 src/main/errors.c:670
+#: src/main/errors.c:649
+#, fuzzy, c-format
+msgid "Error in %s : "
+msgstr "Hata oluştu: "
+
+#: src/main/errors.c:669 src/main/errors.c:675
 #, c-format
 msgid "Error: "
 msgstr "Hata: "
 
-#: src/main/errors.c:690 src/main/errors.c:1319
+#: src/main/errors.c:696 src/main/errors.c:1300
 msgid "In addition: "
 msgstr "Ek olarak: "
 
-#: src/main/errors.c:811
+#: src/main/errors.c:818
 msgid "invalid option \"error\"\n"
 msgstr "geçersiz seçenecek \"error\"\n"
 
-#: src/main/errors.c:893
-msgid "Execution halted\n"
-msgstr "Çalıştırma durduruldu\n"
-
-#: src/main/errors.c:1032
-msgid "'msg1' must be a character string"
-msgstr "'msg1' bir karakter dizesi olmalıdır"
-
-#: src/main/errors.c:1034
-msgid "'msg2' must be a character string"
-msgstr "'msg2' bir karakter dizesi olmalıdır"
+#: src/main/errors.c:1013 src/main/errors.c:1015 src/main/options.c:339
+#: src/main/unique.c:1638
+#, fuzzy, c-format
+msgid "'%s' must be a character string"
+msgstr "'sep' bir karakter dizesi olmalı"
 
-#: src/main/errors.c:1131
+#: src/main/errors.c:1116
 msgid " [invalid string in stop(.)]"
 msgstr " [stop(.)'da geçersiz dize]"
 
-#: src/main/errors.c:1162
+#: src/main/errors.c:1148
 msgid " [invalid string in warning(.)]"
 msgstr " [warning(.)'de geçersiz dize]"
 
-#: src/main/errors.c:1178
+#: src/main/errors.c:1164
 #, c-format
 msgid "incorrect number of arguments to \"%s\""
 msgstr "\"%s\" e hatalı sayıda argüman"
 
-#: src/main/errors.c:1184 src/main/errors.c:1199
+#: src/main/errors.c:1170 src/main/errors.c:1185
 #, c-format
 msgid "unimplemented feature in %s"
 msgstr "%s de tanımlanmamış özellik"
 
-#: src/main/errors.c:1193
+#: src/main/errors.c:1179
 msgid "invalid number of arguments"
 msgstr "geçersiz sayıda argüman"
 
-#: src/main/errors.c:1194 src/main/logic.c:189
+#: src/main/errors.c:1180 src/main/logic.c:181
 msgid "invalid argument type"
 msgstr "geçersiz argüman tipi"
 
-#: src/main/errors.c:1196
+#: src/main/errors.c:1182
 msgid "time-series/vector length mismatch"
 msgstr "zaman-serisi/vektör uzunluğu uyuşmazlığı"
 
-#: src/main/errors.c:1197
+#: src/main/errors.c:1183
 msgid "incompatible arguments"
 msgstr "uyumsuz argümanlar"
 
-#: src/main/errors.c:1200
+#: src/main/errors.c:1186
 msgid "unknown error (report this!)"
 msgstr "bilinmeyen hata (rapor gönderin!)"
 
-#: src/main/errors.c:1212
+#: src/main/errors.c:1195
+msgid "inaccurate integer conversion in coercion"
+msgstr "zorlamadaki hatalı tamsayı çevrimi"
+
+#: src/main/errors.c:1198
 msgid "unknown warning (report this!)"
 msgstr "bilinmeyen uyarı (rapor edin!)"
 
-#: src/main/errors.c:1283
+#: src/main/errors.c:1269
 msgid "No function to return from, jumping to top level"
 msgstr "Geri dönülecek fonksiyon yok, en üst seviyeye atlanıyor"
 
-#: src/main/errors.c:1299
+#: src/main/errors.c:1285
 msgid "top level inconsistency?"
 msgstr "üst seviye tutarsızlık?"
 
-#: src/main/errors.c:1478
+#: src/main/errors.c:1459
 msgid "bad handler data"
 msgstr "hatalı "
 
-#: src/main/errors.c:1628
+#: src/main/errors.c:1613
 msgid "error message not a string"
 msgstr "hata mesajı bir dize değil"
 
-#: src/main/errors.c:1703
+#: src/main/errors.c:1688
 msgid "handler or restart stack mismatch in old restart"
 msgstr ""
 "önceki yeniden başlatmada yönetici yada yeniden başlatma yığını uyuşmazlığı"
 
-#: src/main/errors.c:1729 src/main/errors.c:1745
+#: src/main/errors.c:1714 src/main/errors.c:1730
 msgid "bad error message"
 msgstr "yanlış hata mesajı"
 
-#: src/main/errors.c:1787
+#: src/main/errors.c:1771
 msgid "bad restart"
 msgstr "yanlış yeniden başlatma"
 
-#: src/main/errors.c:1819
+#: src/main/errors.c:1803
 msgid "restart not on stack"
 msgstr "restart yığında değil"
 
-#: src/main/errors.c:1836
+#: src/main/errors.c:1819
 msgid "not in a try context"
 msgstr "bir deneme içereiğinde değil"
 
-#: src/main/errors.c:1849
+#: src/main/errors.c:1832
 msgid "error message must be a character string"
 msgstr "hata mesajı bir karakter dizesi olmalıdır"
 
-#: src/main/eval.c:308
+#: src/main/eval.c:365
 #, c-format
 msgid "source files skipped by Rprof; please increase '%s'"
 msgstr ""
 
-#: src/main/eval.c:328
+#: src/main/eval.c:385
 #, c-format
 msgid "Rprof: cannot open profile file '%s'"
 msgstr "Rprof: profil dosyası '%s' açılamadı"
 
-#: src/main/eval.c:422
+#: src/main/eval.c:479
 msgid "R profiling is not available on this system"
 msgstr "R profilleme bu sistemde mevcut değil"
 
-#: src/main/eval.c:446
+#: src/main/eval.c:503
 msgid ""
 "promise already under evaluation: recursive default argument reference or "
 "earlier problems?"
@@ -3453,268 +3515,271 @@ msgstr ""
 "promise zaten hesaplama altında: tekrarlamalı varsayılan argüman referansı "
 "veya "
 
-#: src/main/eval.c:448
+#: src/main/eval.c:505
 msgid "restarting interrupted promise evaluation"
 msgstr "yeniden başlatma promise hesaplamasını durdurdu"
 
-#: src/main/eval.c:544
+#: src/main/eval.c:601
 msgid ""
 "evaluation nested too deeply: infinite recursion / options(expressions=)?"
 msgstr "hesaplama çok dallanmış: sonsuz döngü / options(expressions=)?"
 
-#: src/main/eval.c:575 src/main/eval.c:3619
+#: src/main/eval.c:632 src/main/eval.c:4238
 msgid "argument is missing, with no default"
 msgstr "varsayılanı olmayan argüman eksik"
 
-#: src/main/eval.c:679 src/main/eval.c:4642
+#: src/main/eval.c:736 src/main/eval.c:1306 src/main/eval.c:5533
 msgid "attempt to apply non-function"
 msgstr "fonksiyon olmayana uygulama denemesi"
 
-#: src/main/eval.c:702
+#: src/main/eval.c:759
 #, c-format
 msgid "%s at %s#%d: "
 msgstr "%s (%s#%d'de): "
 
-#: src/main/eval.c:1178
+#: src/main/eval.c:1298 src/main/eval.c:2271
+#, c-format
+msgid "argument %d is empty"
+msgstr "argüman %d boş"
+
+#: src/main/eval.c:1350
 #, c-format
 msgid "could not find symbol \"%s\" in environment of the generic function"
 msgstr "genel fonksiyonun ortamında \"%s\" sembolü bulunamadı"
 
-#: src/main/eval.c:1196
+#: src/main/eval.c:1368
 #, c-format
 msgid "symbol \"%s\" not in environment of method"
 msgstr "sembol \"%s\" yöntemin ortamında değil"
 
-#: src/main/eval.c:1308
+#: src/main/eval.c:1481
 msgid "the condition has length > 1 and only the first element will be used"
 msgstr "koşul >1 uzunluğa sahip ve sadece ilk öğe kullanılacak"
 
-#: src/main/eval.c:1325
+#: src/main/eval.c:1500
 msgid "missing value where TRUE/FALSE needed"
 msgstr "TRUE/FALSE gereken yerde eksik değer"
 
-#: src/main/eval.c:1326
+#: src/main/eval.c:1501
 msgid "argument is not interpretable as logical"
 msgstr "argüman mantıksal olarak yorumlanabilir değil"
 
-#: src/main/eval.c:1327
+#: src/main/eval.c:1502
 msgid "argument is of length zero"
 msgstr "sıfır uzunluğunda argüman"
 
-#: src/main/eval.c:1418
+#: src/main/eval.c:1596
 msgid "non-symbol loop variable"
 msgstr "sembol olmayan döngü değişkeni"
 
-#: src/main/eval.c:1510 src/main/eval.c:4408
+#: src/main/eval.c:1687 src/main/eval.c:5301
 msgid "invalid for() loop sequence"
 msgstr "geçersiz for() döngüsü dizilişi"
 
-#: src/main/eval.c:1652
+#: src/main/eval.c:1826
 msgid "multi-argument returns are not permitted"
 msgstr "çoklu argüman geri dönüşlerine izin verilmiyor"
 
-#: src/main/eval.c:1701
+#: src/main/eval.c:1873
 msgid "invalid (NULL) left side of assignment"
 msgstr "atamada geçersiz (NULL) sol taraf"
 
-#: src/main/eval.c:1734
+#: src/main/eval.c:1907
 msgid "target of assignment expands to non-language object"
 msgstr "atama hedefi dil olmayan nesneye yayılıyor"
 
-#: src/main/eval.c:1817
+#: src/main/eval.c:1990
 #, c-format
 msgid "overlong name in '%s'"
 msgstr "'%s' de uzun isim"
 
-#: src/main/eval.c:1915
+#: src/main/eval.c:2080
 msgid "cannot do complex assignments in base namespace"
 msgstr "temel isim alanında karmaşık atamalar yapılamaz"
 
-#: src/main/eval.c:1917
+#: src/main/eval.c:2082
 msgid "cannot do complex assignments in base environment"
 msgstr "temel çevrebirimde karmaşık atamalar yapılamaz"
 
-#: src/main/eval.c:1954 src/main/eval.c:1981
+#: src/main/eval.c:2121 src/main/eval.c:2148
 msgid "invalid function in complex assignment"
 msgstr "karışık atamada geçersiz fonksiyon"
 
-#: src/main/eval.c:2041
+#: src/main/eval.c:2208
 msgid "invalid (do_set) left-hand side to assignment"
 msgstr "atamaya geçersiz (do_set) sol taraf"
 
-#: src/main/eval.c:2103
-#, c-format
-msgid "argument %d is empty"
-msgstr "argüman %d boş"
-
-#: src/main/eval.c:2116
+#: src/main/eval.c:2284
 #, c-format
 msgid "'%s' is missing"
 msgstr "'%s' eksik"
 
-#: src/main/eval.c:2267
+#: src/main/eval.c:2439
 msgid "invalid formal argument list for \"function\""
 msgstr "\"function\" için geçersiz biçimsel argüman"
 
-#: src/main/eval.c:2325 src/main/eval.c:2356 src/main/eval.c:2361
+#: src/main/eval.c:2497 src/main/eval.c:2528 src/main/eval.c:2533
 #, fuzzy, c-format
 msgid "invalid '%s' argument of type '%s'"
 msgstr "hatalı '%s' argümanı"
 
-#: src/main/eval.c:2353
+#: src/main/eval.c:2525
 msgid "numeric 'envir' arg not of length one"
 msgstr "sayısal 'envir' argümanı bir uzunluğunda değil"
 
-#: src/main/eval.c:2377 src/main/eval.c:2399
+#: src/main/eval.c:2549 src/main/eval.c:2573
 msgid "restarts not supported in 'eval'"
 msgstr "'eval' de yeniden başlatma desteklenmiyor"
 
-#: src/main/eval.c:2456 src/main/eval.c:2469
+#: src/main/eval.c:2632 src/main/eval.c:2645
 msgid "'Recall' called from outside a closure"
 msgstr "'Recall' bir kapanmadan sonra çağırıldı"
 
-#: src/main/eval.c:2562
+#: src/main/eval.c:2738
 msgid "value in '...' is not a promise"
 msgstr "'...' içindeki değer bir promise değil"
 
-#: src/main/eval.c:2754 src/main/objects.c:720
-#, c-format
-msgid "call name too long in '%s'"
-msgstr "'%s' içinde çağrı ismi çok uzun"
-
-#: src/main/eval.c:2775
-#, c-format
-msgid "generic name too long in '%s'"
-msgstr "'%s' içinde genel isim çok uzun"
-
-#: src/main/eval.c:2840
+#: src/main/eval.c:2999
 #, c-format
 msgid "Incompatible methods (\"%s\", \"%s\") for \"%s\""
 msgstr "Uyumsuz metodlar (\"%s\", \"%s\") -> \"%s\" için"
 
-#: src/main/eval.c:2906
+#: src/main/eval.c:3048
 msgid "dispatch error in group dispatch"
 msgstr "grup dağıtımında dağıtım hatası"
 
-#: src/main/eval.c:3201
+#: src/main/eval.c:3532
 #, fuzzy, c-format
 msgid "\"%s\" is not a %s function"
 msgstr "'fn' bir fonksiyon değil"
 
-#: src/main/eval.c:3430
+#: src/main/eval.c:4047
 msgid "node stack overflow"
 msgstr "ağ yığın taşması"
 
-#: src/main/eval.c:3436
+#: src/main/eval.c:4053
 msgid "integer stack overflow"
 msgstr "tamsayı yığın taşması"
 
-#: src/main/eval.c:3490
+#: src/main/eval.c:4107
 #, fuzzy
 msgid "bad opcode"
 msgstr "Yanlış işlemci kodu"
 
-#: src/main/eval.c:4219
+#: src/main/eval.c:5083
 #, fuzzy, c-format
 msgid "invalid %s type in 'x %s y'"
 msgstr "geçersiz 'x' tipi ('x %s y' içinde)"
 
-#: src/main/eval.c:4310
+#: src/main/eval.c:5195
 msgid "bytecode version mismatch; using eval"
 msgstr "baytkodu sürüm uyuşmazlığı; eval kullanılıyor"
 
-#: src/main/eval.c:4315
+#: src/main/eval.c:5200
 msgid "bytecode version is too old"
 msgstr "baytkodu sürümü çok eski"
 
-#: src/main/eval.c:4316
+#: src/main/eval.c:5201
 msgid "bytecode version is too new"
 msgstr "baytkodu sürümü çok yeni"
 
-#: src/main/eval.c:4350
+#: src/main/eval.c:5235
 msgid "byte code version mismatch"
 msgstr ""
 
-#: src/main/eval.c:4477
+#: src/main/eval.c:5383
 msgid "invalid sequence argument in for loop"
 msgstr "döngü için geçersiz sıralama argümanı"
 
-#: src/main/eval.c:4624 src/main/names.c:1181
+#: src/main/eval.c:5522 src/main/names.c:1312
 #, fuzzy, c-format
 msgid "there is no .Internal function '%s'"
 msgstr "iç fonksiyonlarda \"%s\" yok"
 
-#: src/main/eval.c:4731 src/main/eval.c:5077 src/main/eval.c:5119
+#: src/main/eval.c:5622 src/main/eval.c:5968 src/main/eval.c:6008
 msgid "bad function"
 msgstr "hatalı fonksiyon"
 
-#: src/main/eval.c:4746
+#: src/main/eval.c:5635
 msgid "not a BUILTIN function"
 msgstr "bir BUILTIN fonksiyon değil"
 
-#: src/main/eval.c:5159
+#: src/main/eval.c:6066
+msgid "bad numeric 'switch' offsets"
+msgstr ""
+
+#: src/main/eval.c:6072
 msgid "numeric EXPR required for 'switch' without named alternatives"
 msgstr ""
 
-#: src/main/eval.c:5255
+#: src/main/eval.c:6076
+msgid "bad character 'switch' offsets"
+msgstr ""
+
+#: src/main/eval.c:6188
 msgid "cannot find index for threaded code address"
 msgstr "iş parçası kod adresi için indeks bulunamadı"
 
-#: src/main/eval.c:5315
+#: src/main/eval.c:6248
 #, fuzzy
 msgid "invalid body"
 msgstr "geçersiz sembol"
 
-#: src/main/eval.c:5335
+#: src/main/eval.c:6268
 msgid "invalid symbol"
 msgstr "geçersiz sembol"
 
-#: src/main/eval.c:5379
+#: src/main/eval.c:6312
 msgid "argument is not a byte code object"
 msgstr "argüman bir bayt kodu nesnesi değil"
 
-#: src/main/eval.c:5400
+#: src/main/eval.c:6334
 msgid "bad file name"
 msgstr "hatalı dosya ismi"
 
-#: src/main/eval.c:5404 src/main/eval.c:5425
+#: src/main/eval.c:6338 src/main/eval.c:6359
 msgid "unable to open 'file'"
 msgstr "dosya açılamadı"
 
-#: src/main/eval.c:5419 src/main/saveload.c:1942
+#: src/main/eval.c:6353 src/main/saveload.c:1944
 msgid "'file' must be non-empty string"
 msgstr "'dosya' boş olmayan bir dize olmalı"
 
-#: src/main/eval.c:5421 src/main/saveload.c:1944 src/main/saveload.c:2244
-#: src/main/serialize.c:2149
+#: src/main/eval.c:6355 src/main/saveload.c:1946 src/main/saveload.c:2246
+#: src/main/serialize.c:2189
 msgid "'ascii' must be logical"
 msgstr "'ascii' mantıksal olmalı"
 
-#: src/main/eval.c:5492 src/main/eval.c:5511 src/main/eval.c:5541
+#: src/main/eval.c:6426 src/main/eval.c:6445 src/main/eval.c:6475
 #, fuzzy
 msgid "constant buffer must be a generic vector"
 msgstr "kod genel bir vektör olmalıdır"
 
-#: src/main/eval.c:5543
+#: src/main/eval.c:6477
 msgid "bad constant count"
 msgstr ""
 
-#: src/main/eval.c:5579
+#: src/main/eval.c:6515
 msgid "profile timer in use"
 msgstr "profil zamanlayıcı kullanımda"
 
-#: src/main/eval.c:5581
+#: src/main/eval.c:6517
 msgid "already byte code profiling"
 msgstr "bayt kod profillemesi zaten açık"
 
-#: src/main/eval.c:5599
+#: src/main/eval.c:6535
 msgid "setting profile timer failed"
 msgstr "profil zamanlayıcıyı ayarlama başarısız"
 
-#: src/main/eval.c:5616
+#: src/main/eval.c:6553
 msgid "not byte code profiling"
 msgstr ""
 
+#: src/main/eval.c:6569 src/main/eval.c:6573 src/main/eval.c:6577
+#, fuzzy
+msgid "byte code profiling is not supported in this build"
+msgstr "bu derlemede ICU desteklenmiyor"
+
 #: src/main/gevents.c:43
 #, c-format
 msgid "'%s' events not supported in this device"
@@ -3728,27 +3793,27 @@ msgstr "iç hata"
 msgid "this graphics device does not support event handling"
 msgstr "grafik aygıtı olay yönetimini desteklemiyor"
 
-#: src/main/gevents.c:136
+#: src/main/gevents.c:135
 msgid "invalid prompt"
 msgstr "geçersiz ileti"
 
-#: src/main/gevents.c:148
+#: src/main/gevents.c:146
 #, fuzzy
 msgid "recursive use of 'getGraphicsEvent' not supported"
 msgstr "getGraphicsEvent 'in yinelemeli kullanımı desteklenmiyor"
 
-#: src/main/gevents.c:158
+#: src/main/gevents.c:157
 msgid "no graphics event handlers set"
 msgstr "grafik olay yöneticisi seti yok"
 
-#: src/main/gram.y:222 src/main/gram.y:237 src/main/gram.y:2222
-#: src/main/gram.y:2236
+#: src/main/gram.y:222 src/main/gram.y:237 src/main/gram.y:2245
+#: src/main/gram.y:2259
 #, c-format
 msgid "EOF whilst reading MBCS char at line %d"
 msgstr "%d dizesi ndan MBCS karakterini okurken EOF alındı"
 
-#: src/main/gram.y:226 src/main/gram.y:234 src/main/gram.y:2226
-#: src/main/gram.y:2233
+#: src/main/gram.y:226 src/main/gram.y:234 src/main/gram.y:2249
+#: src/main/gram.y:2256
 #, c-format
 msgid "invalid multibyte character in parser at line %d"
 msgstr "ayrıştırıcının %d dizesi nda geçersiz çokbaytlı karakter"
@@ -3763,123 +3828,136 @@ msgstr "%d. satırda girdi önbellek taşması"
 msgid "incorrect tag type at line %d"
 msgstr "dize %d 'de geçersiz etiket tipi"
 
-#: src/main/gram.y:1653
+#: src/main/gram.y:1657
 msgid "contextstack overflow"
 msgstr "içerikyığını taşması"
 
-#: src/main/gram.y:1890
-msgid "input"
-msgstr "giriş"
+#: src/main/gram.y:1907 src/main/gram.y:1913
+#, fuzzy, c-format
+msgid "unexpected input"
+msgstr "beklenmeyen durum, %s"
 
-#: src/main/gram.y:1891
-msgid "end of input"
+#: src/main/gram.y:1910 src/main/main.c:311
+#, fuzzy, c-format
+msgid "unexpected end of input"
 msgstr "giriş sonu"
 
-#: src/main/gram.y:1892
-msgid "string constant"
+#: src/main/gram.y:1916
+#, fuzzy, c-format
+msgid "unexpected string constant"
 msgstr "dize sabiti"
 
-#: src/main/gram.y:1893
-msgid "numeric constant"
+#: src/main/gram.y:1919
+#, fuzzy, c-format
+msgid "unexpected numeric constant"
 msgstr "sayısal sabit"
 
-#: src/main/gram.y:1894
-msgid "symbol"
-msgstr "sembol"
+#: src/main/gram.y:1922
+#, fuzzy, c-format
+msgid "unexpected symbol"
+msgstr "beklenmeyen durum, %s"
 
-#: src/main/gram.y:1895
-msgid "assignment"
-msgstr "atama"
+#: src/main/gram.y:1925
+#, fuzzy, c-format
+msgid "unexpected assignment"
+msgstr "beklenmeyen durum, %s"
 
-#: src/main/gram.y:1896
-msgid "end of line"
+#: src/main/gram.y:1928
+#, fuzzy, c-format
+msgid "unexpected end of line"
 msgstr "satır sonu"
 
-#: src/main/gram.y:1910 src/main/gram.y:1916
+#: src/main/gram.y:1931 src/main/gram.y:1939
 #, c-format
 msgid "unexpected %s"
 msgstr "beklenmeyen durum, %s"
 
-#: src/main/gram.y:1926
+#: src/main/gram.y:1951
 #, fuzzy, c-format
 msgid "repeated formal argument '%s' on line %d"
 msgstr "Tekrarlanmış biçimsel argüman '%s' (%d dizesi nda)"
 
-#: src/main/gram.y:2136
+#: src/main/gram.y:2161
 #, fuzzy, c-format
 msgid "integer literal %s contains decimal; using numeric value"
 msgstr "yalın tamsayı %sL ondalık içeriyor; sayısal değer kullanılıyor"
 
-#: src/main/gram.y:2140
+#: src/main/gram.y:2164
 #, c-format
 msgid "non-integer value %s qualified with L; using numeric value"
 msgstr "tamsayı olmayan değer %s L ile uygun; sayısal değer kullanılıyor"
 
-#: src/main/gram.y:2153
+#: src/main/gram.y:2176
 #, fuzzy, c-format
 msgid "integer literal %s contains unnecessary decimal point"
 msgstr "tamsayı %sL gereksiz ondalık nokta içeriyor"
 
-#: src/main/gram.y:2185
+#: src/main/gram.y:2208
 #, c-format
 msgid "unable to allocate buffer for long string at line %d"
 msgstr "%d dizesinde, uzun dize için önbellek ayrılamadı"
 
-#: src/main/gram.y:2338
+#: src/main/gram.y:2347 src/main/gram.y:2370 src/main/gram.y:2407
+#: src/main/gram.y:2443
+#, fuzzy, c-format
+msgid "nul character not allowed (line %d)"
+msgstr "ayrıştırıcının %d dizesi nda geçersiz çokbaytlı karakter"
+
+#: src/main/gram.y:2363
 #, c-format
 msgid "'\\x' used without hex digits in character string starting \"%s\""
 msgstr ""
 "'\\x', \"%s\" ile başlayan bir karakter dizesinde onaltılı haneler olmadan "
 "kullanıldı"
 
-#: src/main/gram.y:2352
+#: src/main/gram.y:2379
 #, c-format
 msgid "\\uxxxx sequences not supported inside backticks (line %d)"
 msgstr ""
 
-#: src/main/gram.y:2367
+#: src/main/gram.y:2394
 #, c-format
 msgid "'\\u' used without hex digits in character string starting \"%s\""
 msgstr ""
 "'\\u', \"%s\" ile başlayan bir karakter dizesinde onaltılı haneler olmadan "
 "kullanıldı"
 
-#: src/main/gram.y:2375
+#: src/main/gram.y:2402
 #, c-format
 msgid "invalid \\u{xxxx} sequence (line %d)"
 msgstr "geçersiz \\u{xxxx} dizilişi (satır %d)"
 
-#: src/main/gram.y:2387
+#: src/main/gram.y:2416
 #, c-format
 msgid "\\Uxxxxxxxx sequences not supported inside backticks (line %d)"
 msgstr ""
 
-#: src/main/gram.y:2402
+#: src/main/gram.y:2431
 #, c-format
 msgid "'\\U' used without hex digits in character string starting \"%s\""
 msgstr ""
 "'\\U', \"%s\" ile başlayan bir karakter dizesinde onaltılı haneler olmadan "
 "kullanıldı"
 
-#: src/main/gram.y:2410
+#: src/main/gram.y:2439
 #, c-format
 msgid "invalid \\U{xxxxxxxx} sequence (line %d)"
 msgstr "geçersiz  \\U{xxxxxxxx} dizilimi (satır %d)"
 
-#: src/main/gram.y:2451
+#: src/main/gram.y:2482
 #, c-format
 msgid "'\\%c' is an unrecognized escape in character string starting \"%s\""
 msgstr ""
 "'\\%c' bir tanımlanamayan kaçış karakteri (\"%s\" ile başlayan karakter "
 "dizesinde)"
 
-#: src/main/gram.y:2510
+#: src/main/gram.y:2546
 msgid "mixing Unicode and octal/hex escapes in a string is not allowed"
 msgstr ""
 "Unicode ile sekizli/onaltılı kaçış karakterlerini karıştırmaya izin "
 "verilmiyor"
 
-#: src/main/gram.y:2514
+#: src/main/gram.y:2550
 #, c-format
 msgid ""
 "string at line %d containing Unicode escapes not in this locale\n"
@@ -3888,13 +3966,13 @@ msgstr ""
 "bu yerelde bulunmayan Unicode kaçışları içeren %d dizesi \n"
 "çok uzun (maks 10000 karakter)"
 
-#: src/main/gram.y:3112 src/main/gram.y:3119 src/main/gram.y:3125
-#: src/main/gram.y:3132
+#: src/main/gram.y:3148 src/main/gram.y:3155 src/main/gram.y:3161
+#: src/main/gram.y:3168
 #, c-format
 msgid "contextstack overflow at line %d"
 msgstr "%d dizesi nda içerikyığını taşması"
 
-#: src/main/gram.y:3227
+#: src/main/gram.y:3263
 #, fuzzy, c-format
 msgid "internal parser error at line %d"
 msgstr "%d. satırda girdi önbellek taşması"
@@ -3904,34 +3982,34 @@ msgstr "%d. satırda girdi önbellek taşması"
 msgid "relative range of values =%4.0f * EPS, is small (axis %d)"
 msgstr "%4.0f * EPS değerlerinin göreceli aralığı küçük (eksen %d)"
 
-#: src/main/grep.c:93
+#: src/main/grep.c:96
 #, fuzzy, c-format
 msgid "invalid regular expression '%s', reason '%s'"
 msgstr "geçersiz düzenli ifade: '%s'"
 
-#: src/main/grep.c:95
+#: src/main/grep.c:98
 #, fuzzy, c-format
 msgid "invalid regular expression, reason '%s'"
 msgstr "geçersiz düzenli ifade: '%s'"
 
-#: src/main/grep.c:220 src/main/grep.c:308 src/main/grep.c:416
-#: src/main/grep.c:883 src/main/grep.c:2473
+#: src/main/grep.c:225 src/main/grep.c:315 src/main/grep.c:426
+#: src/main/grep.c:900 src/main/grep.c:2502
 #, c-format
 msgid "input string %d is invalid UTF-8"
 msgstr "giriş dizesi %d bir geçersiz UTF-8"
 
-#: src/main/grep.c:286 src/main/grep.c:383
+#: src/main/grep.c:292 src/main/grep.c:391
 #, c-format
 msgid "'split' string %d is invalid UTF-8"
 msgstr "'split' dizesi %d bir geçersiz UTF-8"
 
-#: src/main/grep.c:290 src/main/grep.c:387 src/main/grep.c:560
+#: src/main/grep.c:296 src/main/grep.c:395 src/main/grep.c:571
 #, c-format
 msgid "'split' string %d is invalid in this locale"
 msgstr "'split' dizesi %d bu yerelleştrimede geçersiz"
 
-#: src/main/grep.c:395 src/main/grep.c:851 src/main/grep.c:1600
-#: src/main/grep.c:2394
+#: src/main/grep.c:404 src/main/grep.c:867 src/main/grep.c:1621
+#: src/main/grep.c:2419
 #, c-format
 msgid ""
 "PCRE pattern compilation error\n"
@@ -3942,13 +4020,13 @@ msgstr ""
 "\t'%s'\n"
 "\t'%s' de\n"
 
-#: src/main/grep.c:397
+#: src/main/grep.c:406
 #, c-format
 msgid "invalid split pattern '%s'"
 msgstr "geçersiz ayırma modeli '%s'"
 
-#: src/main/grep.c:401 src/main/grep.c:857 src/main/grep.c:1607
-#: src/main/grep.c:2401
+#: src/main/grep.c:410 src/main/grep.c:873 src/main/grep.c:1628
+#: src/main/grep.c:2426
 #, c-format
 msgid ""
 "PCRE pattern study error\n"
@@ -3957,45 +4035,45 @@ msgstr ""
 "PCRE modeli çalışma hatası\n"
 "\t'%s'\n"
 
-#: src/main/grep.c:834 src/main/grep.c:2377
+#: src/main/grep.c:849 src/main/grep.c:2401
 msgid "regular expression is invalid UTF-8"
 msgstr "düzenli ifade geçersiz bir UTF-8"
 
-#: src/main/grep.c:853 src/main/grep.c:1602 src/main/grep.c:2396
+#: src/main/grep.c:869 src/main/grep.c:1623 src/main/grep.c:2421
 #, c-format
 msgid "invalid regular expression '%s'"
 msgstr "geçersiz düzenli ifade: '%s'"
 
-#: src/main/grep.c:1264
+#: src/main/grep.c:1282
 msgid "pattern matches an empty string infinitely, returning first match only"
 msgstr ""
 
-#: src/main/grep.c:1575
+#: src/main/grep.c:1595
 msgid "'pattern' is invalid UTF-8"
 msgstr "'pattern' geçersiz bir UTF-8"
 
-#: src/main/grep.c:1577
+#: src/main/grep.c:1597
 msgid "'replacement' is invalid UTF-8"
 msgstr "'replacement' geçersiz bir UTF-8"
 
-#: src/main/grep.c:1581
+#: src/main/grep.c:1601
 msgid "'pattern' is invalid in this locale"
 msgstr "'pattern' bu yerelde geçersiz"
 
-#: src/main/grep.c:1584
+#: src/main/grep.c:1604
 msgid "'replacement' is invalid in this locale"
 msgstr "'replacement' bu yerelde geçersiz"
 
-#: src/main/grep.c:1589
+#: src/main/grep.c:1609
 msgid "zero-length pattern"
 msgstr "sıfır uzunlukta model"
 
-#: src/main/grep.c:1732 src/main/grep.c:1748 src/main/grep.c:1796
-#: src/main/grep.c:1812 src/main/grep.c:1859 src/main/grep.c:1875
+#: src/main/grep.c:1753 src/main/grep.c:1769 src/main/grep.c:1817
+#: src/main/grep.c:1833 src/main/grep.c:1880 src/main/grep.c:1896
 msgid "result string is too long"
 msgstr "sonuç dizesi çok uzun"
 
-#: src/main/grep.c:2411
+#: src/main/grep.c:2436
 #, c-format
 msgid "'pcre_fullinfo' returned '%d' "
 msgstr ""
@@ -4004,33 +4082,29 @@ msgstr ""
 msgid "ignoring non-pairlist attributes"
 msgstr ""
 
-#: src/main/internet.c:92
+#: src/main/internet.c:83
 msgid "internet routines cannot be accessed in module"
 msgstr "internet rutinlerine bu modülden erişilemez"
 
-#: src/main/internet.c:103 src/main/internet.c:141 src/main/internet.c:154
-#: src/main/internet.c:165 src/main/internet.c:176 src/main/internet.c:187
-#: src/main/internet.c:196 src/main/internet.c:207 src/main/internet.c:218
-#: src/main/internet.c:227 src/main/internet.c:237
+#: src/main/internet.c:94 src/main/internet.c:106 src/main/internet.c:119
+#: src/main/internet.c:130 src/main/internet.c:141 src/main/internet.c:152
+#: src/main/internet.c:161 src/main/internet.c:172 src/main/internet.c:183
+#: src/main/internet.c:192 src/main/internet.c:202 src/main/internet.c:318
+#: src/main/internet.c:330 src/main/internet.c:342 src/main/internet.c:354
 msgid "internet routines cannot be loaded"
 msgstr "internet rutinleri yüklenemez"
 
-#: src/main/internet.c:118 src/main/memory.c:3434 src/main/memory.c:3444
-#: src/main/memory.c:3456 src/main/memory.c:3470 src/main/memory.c:3487
-#: src/main/memory.c:3505
-msgid "bad value"
-msgstr "hatalı değer"
-
-#: src/main/internet.c:124
-msgid "internet routines were already initialized"
-msgstr "internet rutinlerinleri zaten yüklenmişti"
-
-#: src/main/internet.c:251 src/main/internet.c:265 src/main/internet.c:281
-#: src/main/internet.c:293 src/main/internet.c:307 src/main/internet.c:327
-#: src/main/internet.c:340
+#: src/main/internet.c:216 src/main/internet.c:230 src/main/internet.c:247
+#: src/main/internet.c:259 src/main/internet.c:273 src/main/internet.c:293
+#: src/main/internet.c:306
 msgid "socket routines cannot be loaded"
 msgstr "soket rutinleri yüklenemez"
 
+#: src/main/internet.c:242
+#, fuzzy
+msgid "attempt to close invalid socket"
+msgstr "geçersiz 'comment' niteliği belirleme denemesi"
+
 #: src/main/lapack.c:39
 #, fuzzy
 msgid "LAPACK routines cannot be accessed in module"
@@ -4041,43 +4115,39 @@ msgstr "X11 rutinlerine modül içinden erişilemez"
 msgid "LAPACK routines cannot be loaded"
 msgstr "soket rutinleri yüklenemez"
 
-#: src/main/logic.c:70
-msgid "binary operations require two arguments"
-msgstr "binary işlemleri iki argüman gerektirir"
-
-#: src/main/logic.c:88 src/main/logic.c:150
+#: src/main/logic.c:80 src/main/logic.c:142
 msgid "operations are possible only for numeric, logical or complex types"
 msgstr ""
 "işlemler sadece sayısal, mantıksal veya karmaşık sayı tiplerinde mümkündür"
 
-#: src/main/logic.c:98
+#: src/main/logic.c:90
 msgid "binary operation on non-conformable arrays"
 msgstr "uygun olmayan dizilerde ikili işlem"
 
-#: src/main/logic.c:124 src/main/relop.c:247
+#: src/main/logic.c:116 src/main/relop.c:241
 msgid "non-conformable time series"
 msgstr "uygun olmayan zaman serileri"
 
-#: src/main/logic.c:254
+#: src/main/logic.c:247
 #, c-format
 msgid "'%s' operator requires 2 arguments"
 msgstr "'%s' operatörü 2 argüman gerektirir"
 
-#: src/main/logic.c:261
+#: src/main/logic.c:254
 #, c-format
 msgid "invalid 'x' type in 'x %s y'"
 msgstr "geçersiz 'x' tipi ('x %s y' içinde)"
 
-#: src/main/logic.c:268
+#: src/main/logic.c:261
 #, c-format
 msgid "invalid 'y' type in 'x %s y'"
 msgstr "geçersiz 'y' tipi ('x %s y' içinde)"
 
-#: src/main/logic.c:341
+#: src/main/logic.c:334
 msgid "Unary operator `!' called with two arguments"
 msgstr "Birli operatör '!' iki argümanla çağırıldı"
 
-#: src/main/logic.c:448
+#: src/main/logic.c:439
 #, c-format
 msgid "coercing argument of type '%s' to logical"
 msgstr "'%s' tipinin argümanı mantıksala zorlanıyor"
@@ -4086,64 +4156,78 @@ msgstr "'%s' tipinin argümanı mantıksala zorlanıyor"
 msgid "dummy - do not translate"
 msgstr ""
 
-#: src/main/main.c:476
+#: src/main/main.c:329
+#, fuzzy
+msgid "error during cleanup\n"
+msgstr "wrapup sırasında hata: "
+
+#: src/main/main.c:336
+msgid "Execution halted\n"
+msgstr "Çalıştırma durduruldu\n"
+
+#: src/main/main.c:505
 msgid "Error: segfault from C stack overflow\n"
 msgstr "Hata: C stack taşmasından segfault\n"
 
-#: src/main/main.c:846
+#: src/main/main.c:888
 msgid "unable to open the base package\n"
 msgstr "base paketi açılamadı\n"
 
-#: src/main/main.c:924
+#: src/main/main.c:971
 #, fuzzy, c-format
 msgid "unable to restore saved data in %s\n"
 msgstr ".RData'da kayıtlı veri geri alınamadı\n"
 
-#: src/main/main.c:971
+#: src/main/main.c:1020
 msgid "During startup - "
 msgstr "Başlangıç sırasında - "
 
-#: src/main/main.c:1224
+#: src/main/main.c:1036
+#, fuzzy
+msgid "unable to initialize the JIT\n"
+msgstr "okumak için dosya açılamadı"
+
+#: src/main/main.c:1290
 msgid "cannot quit from browser"
 msgstr "tarayıcıdan çıkılamıyor"
 
-#: src/main/main.c:1228
+#: src/main/main.c:1294
 msgid "one of \"yes\", \"no\", \"ask\" or \"default\" expected."
 msgstr ""
 "\"yes\", \"no\", \"ask\", veya \"default\" seçeneklerinden biri beklendi."
 
-#: src/main/main.c:1233
+#: src/main/main.c:1299
 msgid "save=\"ask\" in non-interactive use: command-line default will be used"
 msgstr ""
 "etkileşimli olmayan kullanımda save=\"ask\" kullanımı: komut dizesi "
 "varsayılanı kullanılacak"
 
-#: src/main/main.c:1241
+#: src/main/main.c:1307
 msgid "unrecognized value of 'save'"
 msgstr "'save' in tanınmayan değeri"
 
-#: src/main/main.c:1244
+#: src/main/main.c:1310
 msgid "invalid 'status', 0 assumed"
 msgstr "geçersiz 'status', 0 varsayıldı"
 
-#: src/main/main.c:1249
+#: src/main/main.c:1315
 msgid "invalid 'runLast', FALSE assumed"
 msgstr "geçersiz 'runLast', YANLIŞ varsayıldı"
 
-#: src/main/main.c:1280
+#: src/main/main.c:1346
 msgid "cannot allocate space for toplevel callback element"
 msgstr "üst seviye geri çağrı öğesi için yer ayrılamıyor"
 
-#: src/main/main.c:1358
+#: src/main/main.c:1424
 msgid "negative index passed to R_removeTaskCallbackByIndex"
 msgstr "R_removeTaskCallbackByIndex'e negatif indis verildi"
 
-#: src/main/main.c:1468
+#: src/main/main.c:1534
 #, c-format
 msgid "warning messages from top-level task callback '%s'\n"
 msgstr "üst seviye görev geri çağrılarından uyarı mesajları '%s'\n"
 
-#: src/main/main.c:1524
+#: src/main/main.c:1591
 msgid "top-level task callback did not return a logical value"
 msgstr "üst seviye görev geri çağrısı mantıksal bir değer döndürmedi"
 
@@ -4163,199 +4247,206 @@ msgstr "uzun argüman kısa argümanın uzunluğunun bir katı değil"
 msgid "invalid partial string match"
 msgstr "geçersiz kısmi dize eşleşmesi"
 
-#: src/main/match.c:228 src/main/match.c:268 src/main/objects.c:56
-#: src/main/objects.c:66
+#: src/main/match.c:228 src/main/match.c:266 src/main/objects.c:49
+#: src/main/objects.c:59
 #, c-format
 msgid "formal argument \"%s\" matched by multiple actual arguments"
 msgstr "biçimsel argüman \"%s\" birden çok gerçek argümanla eşleşti"
 
-#: src/main/match.c:231 src/main/match.c:266
+#: src/main/match.c:231 src/main/match.c:264
 #, c-format
 msgid "argument %d matches multiple formal arguments"
 msgstr "argüman %d birden çok biçimsel argümanla uyuşuyor"
 
-#: src/main/match.c:272
+#: src/main/match.c:270
 #, c-format
 msgid "partial argument match of '%s' to '%s'"
 msgstr "kısmi argüman eşleşmesi: '%s' den '%s' e"
 
-#: src/main/match.c:383
+#: src/main/match.c:380
 #, fuzzy, c-format
 msgid "unused argument %s"
 msgid_plural "unused arguments %s"
 msgstr[0] "kullanılmayan argüman(lar) %s"
 
-#: src/main/memory.c:1232
+#: src/main/memory.c:1234
 msgid "can only weakly reference/finalize reference objects"
 msgstr "referans nesneler sadece zayıf referanslık/sonlandırma olabilir"
 
-#: src/main/memory.c:1266
+#: src/main/memory.c:1268
 msgid "finalizer must be a function or NULL"
 msgstr "sonuçlandırıcı bir fonksiyon yada NULL olmalı"
 
-#: src/main/memory.c:1322 src/main/memory.c:1330 src/main/memory.c:1341
+#: src/main/memory.c:1324 src/main/memory.c:1332 src/main/memory.c:1343
 msgid "not a weak reference"
 msgstr "bir zayıf referans değil"
 
-#: src/main/memory.c:1472
+#: src/main/memory.c:1474
 msgid "first argument must be environment or external pointer"
 msgstr "ilk argüman bir ortam veya dış gösterici olmalıdır"
 
-#: src/main/memory.c:1474
+#: src/main/memory.c:1476
 msgid "second argument must be a function"
 msgstr "ikinci argüman bir fonksiyon olmalıdır"
 
-#: src/main/memory.c:1478
+#: src/main/memory.c:1480
 msgid "third argument must be 'TRUE' or 'FALSE'"
 msgstr "üçüncü argüman 'TRUE' yada 'FALSE' olmalı"
 
-#: src/main/memory.c:1970
+#: src/main/memory.c:1979
 msgid "vector memory exhausted (limit reached?)"
 msgstr "vektör belleği bitti (limite erişildi?)"
 
-#: src/main/memory.c:1976
+#: src/main/memory.c:1985
 msgid "cons memory exhausted (limit reached?)"
 msgstr "cons belleği tükendi (limite erişildi?)"
 
-#: src/main/memory.c:1981
+#: src/main/memory.c:1990
 msgid "memory exhausted (limit reached?)"
 msgstr "bellek tükendi (limite erişildi?)"
 
-#: src/main/memory.c:2116
+#: src/main/memory.c:2126
 #, fuzzy, c-format
 msgid "cannot allocate memory block of size %0.f Tb"
 msgstr "%0.1f Gb boyutunda bellek bölgesi oluşturulamadı"
 
-#: src/main/memory.c:2121
+#: src/main/memory.c:2131
 #, c-format
 msgid "cannot allocate memory block of size %0.1f Gb"
 msgstr "%0.1f Gb boyutunda bellek bölgesi oluşturulamadı"
 
-#: src/main/memory.c:2442
+#: src/main/memory.c:2458
 #, fuzzy
 msgid "vector is too large"
 msgstr "seçilen vektör boyutu çok büyük"
 
-#: src/main/memory.c:2445
+#: src/main/memory.c:2461
 msgid "negative length vectors are not allowed"
 msgstr "negatif uzunlukta vektörlere izin verilmiyor"
 
-#: src/main/memory.c:2471 src/main/memory.c:2484 src/main/memory.c:2497
-#: src/main/memory.c:2512
+#: src/main/memory.c:2487 src/main/memory.c:2500 src/main/memory.c:2513
+#: src/main/memory.c:2528
 #, c-format
 msgid "cannot allocate vector of length %d"
 msgstr "%d uzunluğunda vektör oluşturulamadı"
 
-#: src/main/memory.c:2533
+#: src/main/memory.c:2549
 #, c-format
 msgid "invalid type/length (%s/%d) in vector allocation"
 msgstr "vektör ayırmasında geçersiz tip/uzunluk (%s/%d)"
 
-#: src/main/memory.c:2636
+#: src/main/memory.c:2648
 #, c-format
 msgid "cannot allocate vector of size %0.1f Gb"
 msgstr "%0.1f Gb boyutunda vektör ayrılamıyor"
 
-#: src/main/memory.c:2640
+#: src/main/memory.c:2652
 #, c-format
 msgid "cannot allocate vector of size %0.1f Mb"
 msgstr "%0.1f Mb boyutunda vektör ayrılamıyor"
 
-#: src/main/memory.c:2644
+#: src/main/memory.c:2656
 #, c-format
 msgid "cannot allocate vector of size %0.f Kb"
 msgstr "%0.f Kb boyutunda vektör ayrılamıyor"
 
-#: src/main/memory.c:3001
+#: src/main/memory.c:3071
 msgid "protect(): protection stack overflow"
 msgstr "protect(): yığın taşması koruması"
 
-#: src/main/memory.c:3008
-#, c-format
-msgid "unprotect(): only %d protected items"
-msgstr "unprotect(): sadece %d korunmuş öğe var"
+#: src/main/memory.c:3078
+#, fuzzy, c-format
+msgid "unprotect(): only %d protected item"
+msgid_plural "unprotect(): only %d protected items"
+msgstr[0] "unprotect(): sadece %d korunmuş öğe var"
 
-#: src/main/memory.c:3041
+#: src/main/memory.c:3113
 msgid "unprotect_ptr: pointer not found"
 msgstr "uprotect_prt: işaretçi bulunamadı"
 
-#: src/main/memory.c:3079
+#: src/main/memory.c:3151
 #, fuzzy, c-format
-msgid "R_Reprotect: only %d protected items, can't reprotect index %d"
-msgstr "unprotect(): sadece %d korunmuş öğe var"
+msgid "R_Reprotect: only %d protected item, can't reprotect index %d"
+msgid_plural "R_Reprotect: only %d protected items, can't reprotect index %d"
+msgstr[0] "unprotect(): sadece %d korunmuş öğe var"
 
-#: src/main/memory.c:3129
+#: src/main/memory.c:3203
 #, fuzzy, c-format
 msgid "'Calloc' could not allocate memory (%.0f of %u bytes)"
 msgstr "Calloc bellekte (%d / %d)  yer ayıramıyor"
 
-#: src/main/memory.c:3140
+#: src/main/memory.c:3214
 #, fuzzy, c-format
 msgid "'Realloc' could not re-allocate memory (%.0f bytes)"
 msgstr "Realloc bellekte (%d boyutunda) yeniden yer ayırm yapamadı"
 
-#: src/main/memory.c:3380
+#: src/main/memory.c:3460
 msgid "not safe to return vector pointer"
 msgstr "vektör işaretçisine geri döndürme güvenli değil"
 
-#: src/main/memory.c:3392
+#: src/main/memory.c:3471
 #, c-format
 msgid "attempt to set index %lu/%lu in SET_STRING_ELT"
 msgstr ""
 
-#: src/main/memory.c:3408
+#: src/main/memory.c:3487
 #, c-format
 msgid "attempt to set index %lu/%lu in SET_VECTOR_ELT"
 msgstr ""
 
-#: src/main/memory.c:3658
+#: src/main/memory.c:3514 src/main/memory.c:3524 src/main/memory.c:3536
+#: src/main/memory.c:3550 src/main/memory.c:3565 src/main/memory.c:3583
+msgid "bad value"
+msgstr "hatalı değer"
+
+#: src/main/memory.c:3746
 msgid "memory profiling is not available on this system"
 msgstr "bellek profilleme bu sistemde mevcut değil"
 
-#: src/main/memory.c:3723
+#: src/main/memory.c:3810
 #, c-format
 msgid "Rprofmem: cannot open output file '%s'"
 msgstr "Rprofmem: çıktı dosyası '%s' açılamadı"
 
-#: src/main/memory.c:3830
+#: src/main/memory.c:3915
 #, c-format
 msgid "long vectors not supported yet: %s:%d"
 msgstr ""
 
-#: src/main/names.c:996
+#: src/main/names.c:1021
 msgid "string argument required"
 msgstr "dize argümanı gerekli"
 
-#: src/main/names.c:999
+#: src/main/names.c:1024
 msgid "no such primitive function"
 msgstr "böyle bir basit fonksiyon yok"
 
-#: src/main/names.c:1146
+#: src/main/names.c:1212 src/main/names.c:1242
 msgid "attempt to use zero-length variable name"
 msgstr "sıfır uzunlukta değişken ismi kullanımı denemesi"
 
-#: src/main/names.c:1148
+#: src/main/names.c:1214 src/main/names.c:1244
 #, c-format
 msgid "variable names are limited to %d bytes"
 msgstr "değişken isimleri %d karakterle sınırlıdır"
 
-#: src/main/names.c:1176 src/main/names.c:1179
+#: src/main/names.c:1307 src/main/names.c:1310
 msgid "invalid .Internal() argument"
 msgstr "geçersiz .Internal() argüman"
 
-#: src/main/objects.c:46
+#: src/main/objects.c:39
 msgid "generic 'function' is not a function"
 msgstr "genel 'function' bir fonksiyon değil"
 
-#: src/main/objects.c:201
+#: src/main/objects.c:193
 msgid "bad generic call environment"
 msgstr "hatalı genel çağrı ortamı"
 
-#: src/main/objects.c:207
+#: src/main/objects.c:201
 msgid "bad generic definition environment"
 msgstr "hatalı genel tanımlama ortamı"
 
-#: src/main/objects.c:246
+#: src/main/objects.c:249
 #, fuzzy
 msgid ""
 "no '.S3MethodsClass' table, cannot use S4 objects with S3 methods ('methods' "
@@ -4364,31 +4455,17 @@ msgstr ""
 ".S3MethodsClass tablosu yok, S4 nesneleri S3 metodlarıyla kullanılamaz "
 "(metodlar paketi ekli değil mi?)"
 
-#: src/main/objects.c:270 src/main/objects.c:411
-msgid "'UseMethod' used in an inappropriate fashion"
-msgstr "'UseMethod' uygun olmayan bir biçimde kullanıldı"
-
-#: src/main/objects.c:290
-#, fuzzy
-msgid "invalid generic function in 'usemethod'"
-msgstr "'usemethod' içinde geçersiz genel fonksiyon kullanımı"
-
-#: src/main/objects.c:399
+#: src/main/objects.c:415
 msgid "there must be a 'generic' argument"
 msgstr "bir 'generic' argüman verilmesi zorunlu"
 
-#: src/main/objects.c:403
+#: src/main/objects.c:419
 msgid "'generic' argument must be a character string"
 msgstr "'generic' argümanı bir karakter dizesi olmalı"
 
-#: src/main/objects.c:440
-#, fuzzy
-msgid "'UseMethod' called from outside a function"
-msgstr "'NextMethod' bir fonksiyon dışından çağırıldı"
-
-#: src/main/objects.c:447
-msgid "first argument must be a generic name"
-msgstr "ilk argüman genel bir isim olmalı"
+#: src/main/objects.c:427
+msgid "'UseMethod' used in an inappropriate fashion"
+msgstr "'UseMethod' uygun olmayan bir biçimde kullanıldı"
 
 #: src/main/objects.c:472
 #, c-format
@@ -4397,97 +4474,92 @@ msgstr ""
 "'%s' için uygulanabilir bir metod yok (\"%s\" sınıfının bir nesnesine "
 "uygulanan)"
 
-#: src/main/objects.c:533
+#: src/main/objects.c:582
 msgid "'NextMethod' called from outside a function"
 msgstr "'NextMethod' bir fonksiyon dışından çağırıldı"
 
-#: src/main/objects.c:539
+#: src/main/objects.c:588
 msgid "'NextMethod' called from an anonymous function"
 msgstr "'NextMethod' isimsiz bir fonksiyondan çağırıldı"
 
-#: src/main/objects.c:563
+#: src/main/objects.c:609
 msgid "no calling generic was found: was a method called directly?"
 msgstr "çağırılan genel bulunamadı: bir metod direk olarak mı çağırıldı?"
 
-#: src/main/objects.c:566
+#: src/main/objects.c:612
 #, c-format
 msgid "'function' is not a function, but of type %d"
 msgstr "'function' bir fonksiyon değil, ancak %d tipinde"
 
-#: src/main/objects.c:640
+#: src/main/objects.c:639
 msgid "wrong argument ..."
 msgstr "yanlış argüman ..."
 
-#: src/main/objects.c:653
+#: src/main/objects.c:651
 msgid "object not specified"
 msgstr "nesne belirtilmedi"
 
-#: src/main/objects.c:663 src/main/objects.c:670
+#: src/main/objects.c:659 src/main/objects.c:666
 msgid "generic function not specified"
 msgstr "genel fonksiyon belirtilmedi"
 
-#: src/main/objects.c:667
+#: src/main/objects.c:663
 #, fuzzy
 msgid "invalid generic argument to 'NextMethod'"
 msgstr "NextMethod a geçersiz genel argüman"
 
-#: src/main/objects.c:680
+#: src/main/objects.c:675
 #, fuzzy
 msgid "invalid 'group' argument found in 'NextMethod'"
 msgstr "NextMethod da geçersiz 'group' argümanı bulundu"
 
-#: src/main/objects.c:699
+#: src/main/objects.c:692
 msgid "wrong value for .Method"
 msgstr ".Method için yanlış değer"
 
-#: src/main/objects.c:703 src/main/objects.c:712
-#, c-format
-msgid "method name too long in '%s'"
-msgstr "'%s' de metod ismi çok uzun"
-
-#: src/main/objects.c:715
+#: src/main/objects.c:702
 msgid "Incompatible methods ignored"
 msgstr "Uyumsuz metodlar görmezden gelindi"
 
-#: src/main/objects.c:775 src/main/objects.c:780
+#: src/main/objects.c:759 src/main/objects.c:766
 msgid "no method to invoke"
 msgstr "başvuralacak metod yok"
 
-#: src/main/objects.c:832
+#: src/main/objects.c:817
 msgid "cannot unclass an environment"
 msgstr "bir ortam sınıfsızlandırılamaz"
 
-#: src/main/objects.c:835
+#: src/main/objects.c:820
 msgid "cannot unclass an external pointer"
 msgstr "dış işaretci sınıfsızlandırılamaz"
 
-#: src/main/objects.c:872
+#: src/main/objects.c:856
 msgid "'what' must be a character vector"
 msgstr "'what' bir karakter vektörü olmalı"
 
-#: src/main/objects.c:876
+#: src/main/objects.c:860
 msgid "'which' must be a length 1 logical vector"
 msgstr "'which' 1 uzunluğunda mantıksal bir vektör olmalı"
 
-#: src/main/objects.c:882
+#: src/main/objects.c:866
 msgid "use 'is()' instead of 'inherits()' on S4 objects"
 msgstr "S4 nesnelerinde 'inherits()' yerine 'is()' kullanın"
 
-#: src/main/objects.c:1012
+#: src/main/objects.c:995
 msgid "could not find correct environment; please report!"
 msgstr ""
 
-#: src/main/objects.c:1052
+#: src/main/objects.c:1039
 #, fuzzy
 msgid "'onOff' must be TRUE or FALSE"
 msgstr "'all.x' TRUE veya FALSE olmalı"
 
-#: src/main/objects.c:1119
+#: src/main/objects.c:1104
 #, c-format
 msgid "unable to find a non-generic version of function \"%s\""
 msgstr "\"%s\" fonksiyonunun genel olmayan sürümü bulunamadı"
 
-#: src/main/objects.c:1151
+#: src/main/objects.c:1136
 #, fuzzy
 msgid ""
 "'standardGeneric' called without 'methods' dispatch enabled (will be ignored)"
@@ -4495,12 +4567,12 @@ msgstr ""
 "standardGeneric metod dağıtımı etkin olmadığı durumda çağırıldı (görmezden "
 "gelinecek)"
 
-#: src/main/objects.c:1160
+#: src/main/objects.c:1145
 #, fuzzy
 msgid "argument to 'standardGeneric' must be a non-empty character string"
 msgstr "standardGeneric argümanı bir boş olmayan karakter dizesi olmalı"
 
-#: src/main/objects.c:1165
+#: src/main/objects.c:1150
 #, c-format
 msgid ""
 "call to standardGeneric(\"%s\") apparently not from the body of that generic "
@@ -4509,11 +4581,7 @@ msgstr ""
 "standardGeneric(\"%s\")'e çağrı görünürde genel fonksiyonun gövdesinden "
 "değil "
 
-#: src/main/objects.c:1189
-msgid "argument 'code' must be a character string"
-msgstr "'code' argümanı bir karakter dizesi olmalı"
-
-#: src/main/objects.c:1257
+#: src/main/objects.c:1249
 #, c-format
 msgid ""
 "invalid primitive methods code (\"%s\"): should be \"clear\", \"reset\", "
@@ -4522,11 +4590,11 @@ msgstr ""
 "geçersiz basit metod kodu (\"%s\"): \"clear\", \"reset\", \"set\", veya "
 "\"suppress\" olabilir"
 
-#: src/main/objects.c:1265
+#: src/main/objects.c:1257
 msgid "invalid object: must be a primitive function"
 msgstr "geçersiz nesne: bir basit fonksiyon olmalı"
 
-#: src/main/objects.c:1312
+#: src/main/objects.c:1304
 #, c-format
 msgid ""
 "the formal definition of a primitive generic must be a function object (got "
@@ -4535,20 +4603,20 @@ msgstr ""
 "bir basit genelin biçimsel tanımı bir fonksiyon nesnesi olmalı ('%s' tipi "
 "var)"
 
-#: src/main/objects.c:1342
+#: src/main/objects.c:1334
 #, fuzzy, c-format
 msgid "object returned as generic function \"%s\" does not appear to be one"
 msgstr "genel fonksiyon \"%s\" olarak dönen nesne doğru gözükmüyor"
 
-#: src/main/objects.c:1444
+#: src/main/objects.c:1439
 msgid "invalid primitive operation given for dispatch"
 msgstr "dağıtım için verilen basit operasyon geçersiz"
 
-#: src/main/objects.c:1470 src/main/objects.c:1489
+#: src/main/objects.c:1468 src/main/objects.c:1487
 msgid "dispatch error"
 msgstr "dağıtım hatası"
 
-#: src/main/objects.c:1483
+#: src/main/objects.c:1481
 #, c-format
 msgid ""
 "primitive function \"%s\" has been set for methods but no generic function "
@@ -4557,81 +4625,91 @@ msgstr ""
 "basit fonksiyon \"%s\" yöntemler için belirlendi ancak genel fonksiyon "
 "verilmedi"
 
-#: src/main/objects.c:1508
+#: src/main/objects.c:1506
 msgid "C level MAKE_CLASS macro called with NULL string pointer"
 msgstr "C seviye MAKE_CLASS makro NULL dize işaretçisiyle çağırıldı"
 
-#: src/main/objects.c:1524
+#: src/main/objects.c:1522
+#, fuzzy
+msgid "'methods' package not yet loaded"
+msgstr "Hershey yazıtipleri yüklenemedi"
+
+#: src/main/objects.c:1532
 msgid "R_getClassDef(.) called with NULL string pointer"
 msgstr "R_getClassDef(.) bir NULL dize işaretçisiyle çağırıldı"
 
-#: src/main/objects.c:1546
+#: src/main/objects.c:1577
 msgid "C level NEW macro called with null class definition pointer"
 msgstr "C seviye NEW makro null sınıf tanım işaretçisiyle çağırıldı"
 
-#: src/main/objects.c:1550
+#: src/main/objects.c:1581
 #, c-format
 msgid "trying to generate an object from a virtual class (\"%s\")"
 msgstr "bir sanal sınıf olan (\"%s\")'den bir nesne oluşturulmaya çalışılıyor"
 
-#: src/main/objects.c:1627
+#: src/main/objects.c:1663
 #, fuzzy, c-format
 msgid "object of class \"%s\" does not correspond to a valid S3 object"
 msgstr "\"%s\" sınıfının nesnesi geçerli bir S3 nesnesiyle uyuşmuyor"
 
-#: src/main/options.c:120 src/main/options.c:180
+#: src/main/options.c:121 src/main/options.c:182
 msgid "corrupted options list"
 msgstr "seçenekler listesi bozuk"
 
-#: src/main/options.c:130
+#: src/main/options.c:131
 msgid "invalid printing width, used 80"
 msgstr "geçersiz yazdırma genişliği, 80 kullanıldı"
 
-#: src/main/options.c:141
+#: src/main/options.c:142
 msgid "invalid printing digits, used 7"
 msgstr "geçersiz yazdırma hanesi, 7 kullanıldı"
 
-#: src/main/options.c:153
+#: src/main/options.c:154
 msgid "invalid 'deparse.cutoff', used 60"
 msgstr ""
 
-#: src/main/options.c:165
+#: src/main/options.c:166
 msgid "invalid value for \"device.ask.default\", using FALSE"
 msgstr "\"device.ask.default\" için geçersiz değer, FALSE kullanılıyor"
 
-#: src/main/options.c:401
+#: src/main/options.c:416
 msgid "list argument has no valid names"
 msgstr "liste argümanı uygun isimlere sahip değil"
 
-#: src/main/options.c:429
+#: src/main/options.c:445
 #, c-format
 msgid "invalid 'width' parameter, allowed %d...%d"
 msgstr "geçersiz 'width' parametresi, izin verilen %d...%d"
 
-#: src/main/options.c:440
+#: src/main/options.c:456
 #, c-format
 msgid "invalid 'digits' parameter, allowed %d...%d"
 msgstr "geçersiz 'digits' parametresi, izin verilen %d...%d"
 
-#: src/main/options.c:447
+#: src/main/options.c:463
 #, c-format
 msgid "'expressions' parameter invalid, allowed %d...%d"
 msgstr "'expressions' parametresi geçersiz, izin verilen %d...%d"
 
-#: src/main/options.c:454 src/main/options.c:462 src/main/options.c:468
-#: src/main/options.c:476 src/main/options.c:483 src/main/options.c:488
-#: src/main/options.c:495 src/main/options.c:501 src/main/options.c:507
-#: src/main/options.c:512 src/main/options.c:517 src/main/options.c:526
-#: src/main/options.c:532 src/main/options.c:538 src/main/options.c:549
-#: src/main/options.c:556 src/main/options.c:562 src/main/options.c:570
-#: src/main/options.c:577 src/main/options.c:584 src/main/options.c:591
-#: src/main/options.c:598 src/main/options.c:606 src/main/options.c:615
-#: src/main/options.c:618 src/main/options.c:624
+#: src/main/options.c:470 src/main/options.c:478 src/main/options.c:484
+#: src/main/options.c:492 src/main/options.c:499 src/main/options.c:504
+#: src/main/options.c:511 src/main/options.c:517 src/main/options.c:523
+#: src/main/options.c:528 src/main/options.c:533 src/main/options.c:542
+#: src/main/options.c:548 src/main/options.c:554 src/main/options.c:564
+#: src/main/options.c:578 src/main/options.c:584 src/main/options.c:592
+#: src/main/options.c:599 src/main/options.c:606 src/main/options.c:613
+#: src/main/options.c:620 src/main/options.c:628 src/main/options.c:637
+#: src/main/options.c:640 src/main/options.c:646
 #, c-format
 msgid "invalid value for '%s'"
 msgstr "'%s' için geçersiz değer"
 
-#: src/main/options.c:611 src/main/options.c:640
+#: src/main/options.c:569
+#, fuzzy
+msgid "'OutDec' must be a string of one character"
+msgstr "'dec' tek bir karakter olmalıdır"
+
+#: src/main/options.c:633 src/main/options.c:662
 msgid "\"par.ask.default\" has been replaced by \"device.ask.default\""
 msgstr "\"par.ask.default\" \"device.ask.default\" ile değiştirildi"
 
@@ -4652,15 +4730,20 @@ msgstr ""
 msgid "non-string argument to Internal paste"
 msgstr "iç yapıştırmaya dize olmayan argüman"
 
-#: src/main/paste.c:390
+#: src/main/paste.c:387
 msgid "first argument must be atomic"
 msgstr "ilk argüman atomik olmalı"
 
-#: src/main/paste.c:560
+#: src/main/paste.c:448
+#, fuzzy
+msgid "'decimal.mark' must be a string of one character"
+msgstr "'dec' tek bir karakter olmalıdır"
+
+#: src/main/paste.c:579
 msgid "Impossible mode ( x )"
 msgstr "İmkansız mod ( x )"
 
-#: src/main/paste.c:645
+#: src/main/paste.c:663
 msgid "atomic vector arguments only"
 msgstr "sadece atomik vektör argümanları"
 
@@ -4668,217 +4751,199 @@ msgstr "sadece atomik vektör argümanları"
 msgid "invalid filename specification"
 msgstr "geçersiz dosyaadı değeri"
 
-#: src/main/platform.c:375 src/main/platform.c:419
+#: src/main/platform.c:375 src/main/platform.c:420
 msgid "write error during file append"
 msgstr "dosyaya eklenirken yazma hatası"
 
-#: src/main/platform.c:394
+#: src/main/platform.c:395
 msgid "nothing to append to"
 msgstr "eklenecek bir şey yok"
 
-#: src/main/platform.c:448 src/main/platform.c:795
+#: src/main/platform.c:449 src/main/platform.c:797 src/main/platform.c:979
 msgid "invalid filename argument"
 msgstr "geçersiz dosya adı argümanı"
 
-#: src/main/platform.c:460
+#: src/main/platform.c:461
 #, c-format
 msgid "cannot create file '%s', reason '%s'"
 msgstr "dosya '%s' oluşturulamıyor, sebep: '%s'"
 
-#: src/main/platform.c:475 src/main/platform.c:545 src/main/platform.c:627
+#: src/main/platform.c:476 src/main/platform.c:546 src/main/platform.c:629
 msgid "invalid first filename"
 msgstr "geçersiz ilk dosya adı"
 
-#: src/main/platform.c:487
+#: src/main/platform.c:488
 #, c-format
 msgid "cannot remove file '%s', reason '%s'"
 msgstr "dosya '%s' silinemiyor, sebep: '%s'"
 
-#: src/main/platform.c:547 src/main/platform.c:629
+#: src/main/platform.c:548 src/main/platform.c:631
 msgid "invalid second filename"
 msgstr "geçersiz ikinci dosya adı"
 
-#: src/main/platform.c:549 src/main/platform.c:631
+#: src/main/platform.c:551 src/main/platform.c:634
 msgid "nothing to link"
 msgstr "bağlanacak birşey yok"
 
-#: src/main/platform.c:559
+#: src/main/platform.c:561
 #, fuzzy
 msgid "symbolic links are not supported on this version of Windows"
 msgstr "sembolik bağlantılar bu sistemde desteklenmiyor"
 
-#: src/main/platform.c:581
+#: src/main/platform.c:583
 #, fuzzy, c-format
 msgid "cannot symlink '%ls' to '%ls', reason '%s'"
 msgstr "'%s'den '%s'e sembolik bağlantı oluşturulamıyor, sebep: '%s'"
 
-#: src/main/platform.c:601
+#: src/main/platform.c:603
 #, c-format
 msgid "cannot symlink '%s' to '%s', reason '%s'"
 msgstr "'%s'den '%s'e sembolik bağlantı oluşturulamıyor, sebep: '%s'"
 
-#: src/main/platform.c:609
+#: src/main/platform.c:611
 #, fuzzy
 msgid "symbolic links are not supported on this platform"
 msgstr "sembolik bağlantılar bu sistemde desteklenmiyor"
 
-#: src/main/platform.c:649
+#: src/main/platform.c:652
 #, fuzzy, c-format
 msgid "cannot link '%ls' to '%ls', reason '%s'"
 msgstr "'%s'den '%s'e sembolik bağlantı oluşturulamıyor, sebep: '%s'"
 
-#: src/main/platform.c:669
+#: src/main/platform.c:672
 #, fuzzy, c-format
 msgid "cannot link '%s' to '%s', reason '%s'"
 msgstr "'%s'den '%s'e sembolik bağlantı oluşturulamıyor, sebep: '%s'"
 
-#: src/main/platform.c:678
+#: src/main/platform.c:681
 #, fuzzy
 msgid "(hard) links are not supported on this platform"
 msgstr "sembolik bağlantılar bu sistemde desteklenmiyor"
 
-#: src/main/platform.c:709
+#: src/main/platform.c:713
 msgid "'from' and 'to' are of different lengths"
 msgstr ""
 
-#: src/main/platform.c:720 src/main/platform.c:730
+#: src/main/platform.c:724 src/main/platform.c:734
 msgid "expanded 'from' name too long"
 msgstr "genişletilen 'from' ismi çok uzun"
 
-#: src/main/platform.c:724 src/main/platform.c:734
+#: src/main/platform.c:728 src/main/platform.c:738
 msgid "expanded 'to' name too long"
 msgstr "genişletilen 'to'  ismi çok uzun"
 
-#: src/main/platform.c:738
+#: src/main/platform.c:742
 #, c-format
 msgid "cannot rename file '%s' to '%s', reason '%s'"
 msgstr "'%s' dosyası '%s' olarak yeniden adlandırılamıyor, sebep: '%s'"
 
-#: src/main/platform.c:1094
+#: src/main/platform.c:1168
 msgid "invalid 'pattern' regular expression"
 msgstr "geçersiz 'pattern' düzenli ifadesi"
 
-#: src/main/platform.c:1211
+#: src/main/platform.c:1285
 msgid "unable to determine R home location"
 msgstr "R ev dizini belirlenemedi"
 
-#: src/main/platform.c:1263
+#: src/main/platform.c:1338
 msgid "file name too long"
 msgstr "dosya ismi çok uzun"
 
-#: src/main/platform.c:1511 src/main/platform.c:1558 src/main/sysutils.c:1850
-#: src/main/sysutils.c:1864
+#: src/main/platform.c:1586 src/main/platform.c:1633 src/main/sysutils.c:1806
+#: src/main/sysutils.c:1820
 msgid "internal out-of-memory condition"
 msgstr "iç yetersiz-bellek durumu"
 
-#: src/main/platform.c:1554 src/main/sysutils.c:1860
+#: src/main/platform.c:1629 src/main/sysutils.c:1816
 #, c-format
 msgid "read error on '%s'"
 msgstr "'%s' de okuma hatası"
 
-#: src/main/platform.c:1722
+#: src/main/platform.c:1728
 msgid "setting 'LC_NUMERIC' may cause R to function strangely"
 msgstr "'LC_NUMERIC' belirlemek R'nin tuhaf çalışmasına sebep olabilir"
 
-#: src/main/platform.c:1736
+#: src/main/platform.c:1742
 msgid "LC_MESSAGES exists on Windows but is not operational"
 msgstr ""
 
-#: src/main/platform.c:1763
+#: src/main/platform.c:1769
 #, c-format
 msgid "OS reports request to set locale to \"%s\" cannot be honored"
 msgstr ""
 "İşletim Sistemi yereli \"%s\" e ayarlama isteğinin gerçekleştirelemeyeceğini "
 "raporladı"
 
-#: src/main/platform.c:2065
-msgid "'hostname' must be a character vector of length 1"
-msgstr "'hostname' 1 birim uzunlukta bir karakter vektörü olmalı"
-
-#: src/main/platform.c:2071
-#, c-format
-msgid "nsl() was unable to resolve host '%s'"
-msgstr "nsl() '%s' sunucusunu çözümleyemedi"
-
-#: src/main/platform.c:2078
-#, fuzzy
-msgid "unknown format returned by C function 'gethostbyname'"
-msgstr "gethostbyname'den döndürülen bilinmeyen biçim"
-
-#: src/main/platform.c:2087
-msgid "nsl() is not supported on this platform"
-msgstr "nsl() bu platformda desteklenmiyor"
-
-#: src/main/platform.c:2158
+#: src/main/platform.c:2131
 #, c-format
 msgid "'%s' already exists"
 msgstr "'%s' zaten mevcut"
 
-#: src/main/platform.c:2161
+#: src/main/platform.c:2134
 #, c-format
 msgid "cannot create dir '%s', reason '%s'"
 msgstr "'%s' dizini oluşturulamıyor, sebep: '%s'"
 
-#: src/main/platform.c:2207
+#: src/main/platform.c:2181
 #, c-format
 msgid "'%ls' already exists"
 msgstr "'%ls' zaten var"
 
-#: src/main/platform.c:2211
+#: src/main/platform.c:2183 src/main/platform.c:2189
 #, fuzzy, c-format
 msgid "cannot create dir '%ls', reason '%s'"
 msgstr "'%s' dizini oluşturulamıyor, sebep: '%s'"
 
-#: src/main/platform.c:2245 src/main/platform.c:2449
+#: src/main/platform.c:2223 src/main/platform.c:2435
 msgid "too deep nesting"
 msgstr ""
 
-#: src/main/platform.c:2253 src/main/platform.c:2266 src/main/platform.c:2284
+#: src/main/platform.c:2231 src/main/platform.c:2244 src/main/platform.c:2262
 #, fuzzy
 msgid "over-long path"
 msgstr "sıfır uzunlukta model"
 
-#: src/main/platform.c:2273
+#: src/main/platform.c:2251
 #, fuzzy, c-format
 msgid "problem creating directory %ls: %s"
 msgstr "düzenleyici %s çalıştırırken sorun oluştu"
 
-#: src/main/platform.c:2293
+#: src/main/platform.c:2271
 #, fuzzy, c-format
 msgid "problem reading dir %ls: %s"
 msgstr "düzenleyici %s çalıştırırken sorun oluştu"
 
-#: src/main/platform.c:2304 src/main/platform.c:2465 src/main/platform.c:2478
-#: src/main/platform.c:2498 src/main/platform.c:2520
+#: src/main/platform.c:2282 src/main/platform.c:2451 src/main/platform.c:2464
+#: src/main/platform.c:2484 src/main/platform.c:2506
 #, fuzzy
 msgid "over-long path length"
 msgstr "sıfır uzunlukta model"
 
-#: src/main/platform.c:2312
+#: src/main/platform.c:2290
 #, c-format
 msgid "problem copying %ls to %ls: %s"
 msgstr ""
 
-#: src/main/platform.c:2487
+#: src/main/platform.c:2473
 #, fuzzy, c-format
 msgid "problem creating directory %s: %s"
 msgstr "düzenleyici %s çalıştırırken sorun oluştu"
 
-#: src/main/platform.c:2507
+#: src/main/platform.c:2493
 #, fuzzy, c-format
 msgid "problem reading directory %s: %s"
 msgstr "düzenleyici %s çalıştırırken sorun oluştu"
 
-#: src/main/platform.c:2529
+#: src/main/platform.c:2515
 #, c-format
 msgid "problem copying %s to %s: %s"
 msgstr ""
 
-#: src/main/platform.c:2662
+#: src/main/platform.c:2653
 msgid "'mode' must be of length at least one"
 msgstr "'mode' uzunluğu en az bir olmalıdır"
 
-#: src/main/platform.c:2729
+#: src/main/platform.c:2720
 msgid "insufficient OS support on this platform"
 msgstr "bu platform için yetersiz işletim sistemi desteği"
 
@@ -4899,94 +4964,99 @@ msgstr "tüm z değerleri NA"
 msgid "invalid math style encountered"
 msgstr "geçersiz matematik biçimiyle karşılaşıldı"
 
-#: src/main/plotmath.c:1261 src/main/plotmath.c:1366 src/main/plotmath.c:2664
+#: src/main/plotmath.c:1260 src/main/plotmath.c:1365 src/main/plotmath.c:2654
 msgid "invalid mathematical annotation"
 msgstr "geçersiz matematiksel gösterim"
 
-#: src/main/plotmath.c:1670
+#: src/main/plotmath.c:1669
 msgid "invalid accent"
 msgstr "geçersiz aksan"
 
-#: src/main/plotmath.c:1964
+#: src/main/plotmath.c:1963
 msgid "invalid group delimiter"
 msgstr "geçersiz grup sınırlayıcısı"
 
-#: src/main/plotmath.c:1991 src/main/plotmath.c:2137
+#: src/main/plotmath.c:1990 src/main/plotmath.c:2127
 msgid "invalid group specification"
 msgstr "geçersiz grup özelliği"
 
-#: src/main/plotmath.c:2062
+#: src/main/plotmath.c:2052
 msgid "group is incomplete"
 msgstr "grup eksik"
 
-#: src/main/plotmath.c:3190
+#: src/main/plotmath.c:3180
 msgid "Metric information not available for this family/device"
 msgstr "Bu aile/aygıt için metrik bilgisi bulunmuyor"
 
-#: src/main/print.c:148 src/main/print.c:254
+#: src/main/print.c:140 src/main/print.c:247
 msgid "invalid 'na.print' specification"
 msgstr "geçersiz 'na.print' özelliği"
 
-#: src/main/print.c:157
+#: src/main/print.c:149
 msgid "invalid row labels"
 msgstr "geçersiz dize etiketleri"
 
-#: src/main/print.c:159
+#: src/main/print.c:151
 msgid "invalid column labels"
 msgstr "geçersiz sütun etiketleri"
 
-#: src/main/print.c:183
+#: src/main/print.c:176
 msgid "non-function argument to .Internal(print.function(.))"
 msgstr ".Internal(print.function(.))'a fonksiyon olmayan argüman"
 
-#: src/main/print.c:264
+#: src/main/print.c:257
 msgid "'gap' must be non-negative integer"
 msgstr "'gap' negatif olmayan bir tamsayı olmalıdır"
 
-#: src/main/print.c:289
+#: src/main/print.c:282
 msgid "invalid 'tryS4' internal argument"
 msgstr "geçersiz 'tryS4' iç argümanı"
 
-#: src/main/print.c:1028
+#: src/main/print.c:851
+#, fuzzy
+msgid "print buffer overflow"
+msgstr "%d. satırda girdi önbellek taşması"
+
+#: src/main/print.c:1043
 #, fuzzy
 msgid "invalid character length in 'dblepr'"
 msgstr "dblepr de geçersiz karakter uzunluğu"
 
-#: src/main/print.c:1046
+#: src/main/print.c:1061
 #, fuzzy
 msgid "invalid character length in 'intpr'"
 msgstr "intpr de geçersiz karakter uzunluğu"
 
-#: src/main/print.c:1065
+#: src/main/print.c:1080
 #, fuzzy
 msgid "invalid character length in 'realpr'"
 msgstr "realpr de geçersiz karakter uzunluğu"
 
-#: src/main/print.c:1075
+#: src/main/print.c:1090
 #, fuzzy
 msgid "memory allocation error in 'realpr'"
 msgstr "realpr de bellek ayırma hatası"
 
-#: src/main/print.c:1091
+#: src/main/print.c:1106
 #, c-format
 msgid "BLAS/LAPACK routine '%6s' gave error code %d"
 msgstr "BLAS/LAPACK fonksiyonu '%6s' hata kodu %d verdi"
 
-#: src/main/printarray.c:453
+#: src/main/printarray.c:332
 msgid "too few row labels"
 msgstr "çok az dize etiketi"
 
-#: src/main/printarray.c:455
+#: src/main/printarray.c:334
 msgid "too few column labels"
 msgstr "çok az sütun etiketi"
 
-#: src/main/printarray.c:489
+#: src/main/printarray.c:368
 #, c-format
 msgid " [ reached getOption(\"max.print\") -- omitted %d row ]\n"
 msgid_plural " [ reached getOption(\"max.print\") -- omitted %d rows ]\n"
 msgstr[0] ""
 
-#: src/main/printutils.c:613
+#: src/main/printutils.c:710
 #, fuzzy
 msgid "it is not known that wchar_t is Unicode on this platform"
 msgstr "nsl() bu platformda desteklenmiyor"
@@ -4995,344 +5065,342 @@ msgstr "nsl() bu platformda desteklenmiyor"
 msgid "argument is not a numeric vector"
 msgstr "argüman bir sayısal vektörü değil"
 
-#: src/main/random.c:37
+#: src/main/random.c:39
 msgid "invalid arguments"
 msgstr "geçersiz argümanlar"
 
-#: src/main/random.c:93 src/main/random.c:110 src/main/random.c:175
-#: src/main/random.c:201 src/main/random.c:274 src/main/random.c:288
+#: src/main/random.c:95 src/main/random.c:112 src/main/random.c:178
+#: src/main/random.c:204 src/main/random.c:277 src/main/random.c:291
 msgid "NAs produced"
 msgstr "NAs oluştu"
 
-#: src/main/random.c:445
+#: src/main/random.c:438
 msgid "NA in probability vector"
 msgstr "olasılık vektöründe NA"
 
-#: src/main/random.c:447
-msgid "non-positive probability"
+#: src/main/random.c:440
+#, fuzzy
+msgid "negative probability"
 msgstr "pozitif olmayan olasılık"
 
-#: src/main/random.c:454
+#: src/main/random.c:447
 msgid "too few positive probabilities"
 msgstr "çok az pozitif olasılık"
 
-#: src/main/random.c:491 src/main/random.c:519
+#: src/main/random.c:483 src/main/random.c:511
 msgid "cannot take a sample larger than the population when 'replace = FALSE'"
 msgstr "'replace = FALSE' iken ana kütleden büyük bir örneklem alınamaz"
 
-#: src/main/random.c:498
+#: src/main/random.c:490
 msgid "incorrect number of probabilities"
 msgstr "hatalı olasılık sayısı"
 
-#: src/main/random.c:537
+#: src/main/random.c:529
 #, fuzzy
 msgid "n >= 2^31, replace = FALSE is only supported on 64-bit platforms"
 msgstr "'dirmark = TRUE' bu platformda desteklenmiyor"
 
-#: src/main/raw.c:37 src/main/raw.c:273
+#: src/main/raw.c:37 src/main/raw.c:277
 #, fuzzy
 msgid "argument must be a character vector of length 1"
 msgstr "'hostname' 1 birim uzunlukta bir karakter vektörü olmalı"
 
-#: src/main/raw.c:39 src/main/raw.c:275
+#: src/main/raw.c:39 src/main/raw.c:279
 #, fuzzy
 msgid ""
 "argument should be a character vector of length 1\n"
 "all but the first element will be ignored"
 msgstr "'%s' argümanı boyutu > 1, sadece ilk öğe kullanılacak"
 
-#: src/main/raw.c:53 src/main/raw.c:89 src/main/raw.c:110
+#: src/main/raw.c:53 src/main/raw.c:90 src/main/raw.c:113
 #, fuzzy
 msgid "argument 'x' must be a raw vector"
 msgstr "ilk karakter bir vektör olmalı"
 
-#: src/main/raw.c:56 src/main/raw.c:330
+#: src/main/raw.c:56 src/main/raw.c:336
 #, fuzzy
 msgid "argument 'multiple' must be TRUE or FALSE"
 msgstr "'resize' DOĞRU yada YANLIŞ olmalı"
 
-#: src/main/raw.c:91
+#: src/main/raw.c:92
 #, fuzzy
 msgid "argument 'shift' must be a small integer"
 msgstr "'size' argümanı bir pozitif tam sayı olmalı"
 
-#: src/main/raw.c:129 src/main/raw.c:327
+#: src/main/raw.c:133 src/main/raw.c:333
 #, fuzzy
 msgid "argument 'x' must be an integer vector"
 msgstr "ilk argüman bir karakter vektörü olmalıdır"
 
-#: src/main/raw.c:148
+#: src/main/raw.c:153
 #, fuzzy
 msgid "argument 'x' must be raw, integer or logical"
 msgstr "'logarithm' argümanı mantıksal olmalı"
 
-#: src/main/raw.c:150
-#, fuzzy
-msgid "argument 'type' must be a character string"
-msgstr "'code' argümanı bir karakter dizesi olmalı"
-
-#: src/main/raw.c:154
+#: src/main/raw.c:159
 #, fuzzy, c-format
 msgid "argument 'x' must be a multiple of %d long"
 msgstr "argüman bir fonksiyon olmalı"
 
-#: src/main/raw.c:167 src/main/raw.c:181
+#: src/main/raw.c:172 src/main/raw.c:186
 #, fuzzy
 msgid "argument 'x' must not contain NAs"
 msgstr "argğman bir fonksiyon olmalı"
 
-#: src/main/raw.c:285
+#: src/main/raw.c:291
 #, fuzzy
 msgid "invalid UTF-8 string"
 msgstr "geçersiz UTF-8 dizesi 'old'"
 
-#: src/main/relop.c:202
+#: src/main/relop.c:196
 #, c-format
 msgid "comparison (%d) is possible only for atomic and list types"
 msgstr "karşılaştırma (%d) sadece atomik ve liste tiplerinde mümkün"
 
-#: src/main/relop.c:207
+#: src/main/relop.c:201
 msgid "comparison is not allowed for expressions"
 msgstr "ifadeleri karşılaştırmaya izin verilmiyor"
 
-#: src/main/relop.c:296
+#: src/main/relop.c:293
 msgid "comparison of these types is not implemented"
 msgstr "bu tipler için karşılaştırma tanımlanmadı"
 
-#: src/main/relop.c:509
+#: src/main/relop.c:425
 msgid "invalid comparison with complex values"
 msgstr "karışık değerlerle geçersiz karşılaştırma "
 
-#: src/main/relop.c:767
+#: src/main/relop.c:683
 #, fuzzy
 msgid "'a' and 'b' must have the same type"
 msgstr "'data' bir vektörü tipinde olmalıdır"
 
-#: src/main/saveload.c:200 src/main/saveload.c:205 src/main/saveload.c:214
-#: src/main/saveload.c:223 src/main/saveload.c:232 src/main/saveload.c:241
-#: src/main/saveload.c:245 src/main/saveload.c:254 src/main/saveload.c:1381
-#: src/main/saveload.c:1386 src/main/saveload.c:1430 src/main/saveload.c:1498
-#: src/main/saveload.c:1507 src/main/serialize.c:331 src/main/serialize.c:338
-#: src/main/serialize.c:2388 src/main/serialize.c:2396
+#: src/main/saveload.c:202 src/main/saveload.c:207 src/main/saveload.c:216
+#: src/main/saveload.c:225 src/main/saveload.c:234 src/main/saveload.c:243
+#: src/main/saveload.c:247 src/main/saveload.c:256 src/main/saveload.c:1383
+#: src/main/saveload.c:1388 src/main/saveload.c:1432 src/main/saveload.c:1500
+#: src/main/saveload.c:1509 src/main/serialize.c:354 src/main/serialize.c:361
+#: src/main/serialize.c:374 src/main/serialize.c:378 src/main/serialize.c:405
+#: src/main/serialize.c:421 src/main/serialize.c:2429
+#: src/main/serialize.c:2437
 msgid "read error"
 msgstr "okuma hatası"
 
-#: src/main/saveload.c:332
+#: src/main/saveload.c:334
 msgid "a I read error occurred"
 msgstr "bir I okuma hatası oluştu"
 
-#: src/main/saveload.c:342
+#: src/main/saveload.c:344
 msgid "a R read error occurred"
 msgstr "bir R okuma hatası oluştu"
 
-#: src/main/saveload.c:352
+#: src/main/saveload.c:354
 msgid "a C read error occurred"
 msgstr "bir C okuma hatası oluştu"
 
-#: src/main/saveload.c:362
+#: src/main/saveload.c:364
 msgid "a S read error occurred"
 msgstr "bir S okuma hatası oluştu"
 
-#: src/main/saveload.c:387 src/main/saveload.c:395 src/main/saveload.c:403
-#: src/main/saveload.c:1594 src/main/saveload.c:1602
+#: src/main/saveload.c:389 src/main/saveload.c:397 src/main/saveload.c:405
+#: src/main/saveload.c:1596 src/main/saveload.c:1604
 msgid "a read error occurred"
 msgstr "bir okuma hatası oluştu"
 
-#: src/main/saveload.c:467
+#: src/main/saveload.c:469
 msgid "unresolved node during restore"
 msgstr "geri yükleme sırasında çözümlenemeyen ağ"
 
-#: src/main/saveload.c:488
+#: src/main/saveload.c:490
 #, c-format
 msgid "restore compatibility error - no version %d compatibility"
 msgstr "geri yükleme uyumluluk hatası - %d sürümü uyumluluğu yok"
 
-#: src/main/saveload.c:572 src/main/saveload.c:645
+#: src/main/saveload.c:574 src/main/saveload.c:647
 msgid "bad SEXP type in data file"
 msgstr "veri dosyasında yanlış SEXP tipi"
 
-#: src/main/saveload.c:586
+#: src/main/saveload.c:588
 msgid "mismatch on types"
 msgstr "eşleşmeyen tipler"
 
-#: src/main/saveload.c:607 src/main/saveload.c:1270 src/main/serialize.c:1636
+#: src/main/saveload.c:609 src/main/saveload.c:1272 src/main/serialize.c:1675
 #, fuzzy, c-format
 msgid "unrecognized internal function name \"%s\""
 msgstr "\"%s\" fonksiyonu bulunamadı"
 
-#: src/main/saveload.c:709
+#: src/main/saveload.c:711
 msgid "cannot save file position while restoring data"
 msgstr "veri geri yüklerken dosya konumu kaydedilemedi"
 
-#: src/main/saveload.c:722
+#: src/main/saveload.c:724
 msgid "cannot restore file position while restoring data"
 msgstr "veri geri yüklerken dosya konumu geri yüklenemedi"
 
-#: src/main/saveload.c:915
+#: src/main/saveload.c:917
 msgid "base namespace is not preserved in version 1 workspaces"
 msgstr "sürüm 1 çalışma alanlarında temel isimlendirme ayırt edilmedi"
 
-#: src/main/saveload.c:917
+#: src/main/saveload.c:919
 msgid "cannot save namespace in version 1 workspaces"
 msgstr "sürüm 1 çalışma alanlarında temel isimlendirme kaydedilemedi"
 
-#: src/main/saveload.c:919
+#: src/main/saveload.c:921
 #, fuzzy
 msgid ""
 "cannot save environment with locked/active bindings in version 1 workspaces"
 msgstr "ortam sürüm 1 çalışma alanlarında kilitli/aktif bağlar kaydedilemez"
 
-#: src/main/saveload.c:943
+#: src/main/saveload.c:945
 msgid "cannot save weak references in version 1 workspaces"
 msgstr "sürüm 1 çalışma alanlarında zayıf referanslar kaydedilemez"
 
-#: src/main/saveload.c:1021
+#: src/main/saveload.c:1023
 msgid "NewWriteVec called with non-vector type"
 msgstr "vektör olmayan tiple NewWriteVec çağırıldı"
 
-#: src/main/saveload.c:1084
+#: src/main/saveload.c:1086
 msgid "cannot save byte code objects in version 1 workspaces"
 msgstr "sürüm 1 çalışma alanlarında bayt kodu nesneleri kaydedilemez"
 
-#: src/main/saveload.c:1086
+#: src/main/saveload.c:1088
 #, c-format
 msgid "NewWriteItem: unknown type %i"
 msgstr "NewWriteItem: bilinmeyen tip %i"
 
-#: src/main/saveload.c:1216
+#: src/main/saveload.c:1218
 msgid "NewReadVec called with non-vector type"
 msgstr "NewReadVec vektör olmayan bir tiple çağırıldı"
 
-#: src/main/saveload.c:1286
+#: src/main/saveload.c:1288
 msgid "cannot read byte code objects from version 1 workspaces"
 msgstr "sürüm 1 çalışmaalanlarında bayt kodu nesneleri okunamaz"
 
-#: src/main/saveload.c:1288
+#: src/main/saveload.c:1290
 #, c-format
 msgid "NewReadItem: unknown type %i"
 msgstr "NewReadItem: bilinmeyen tip %i"
 
-#: src/main/saveload.c:1440
+#: src/main/saveload.c:1442
 msgid "out of memory reading ascii string"
 msgstr "ascii dizesi okunurken yetersiz bellek"
 
-#: src/main/saveload.c:1565
+#: src/main/saveload.c:1567
 msgid "a binary read error occurred"
 msgstr "bir ikili okuma hatası oluştu"
 
-#: src/main/saveload.c:1580 src/main/saveload.c:1681
+#: src/main/saveload.c:1582 src/main/saveload.c:1683
 msgid "out of memory reading binary string"
 msgstr "ikili dize okunurken yetersiz bellek"
 
-#: src/main/saveload.c:1585
+#: src/main/saveload.c:1587
 msgid "a binary string read error occurred"
 msgstr "ikili dize okuma hatası oluştu"
 
-#: src/main/saveload.c:1645
+#: src/main/saveload.c:1647
 msgid "an xdr integer data write error occurred"
 msgstr "bir xdr tamsayı verisi yazma hatası oluştu"
 
-#: src/main/saveload.c:1652
+#: src/main/saveload.c:1654
 msgid "an xdr integer data read error occurred"
 msgstr "bir xdr tamsayı verisi okuma hatası oluştu"
 
-#: src/main/saveload.c:1667 src/main/saveload.c:1686
+#: src/main/saveload.c:1669 src/main/saveload.c:1688
 msgid "an xdr string data write error occurred"
 msgstr "bir xdr dize verisi yazma hatası oluştu"
 
-#: src/main/saveload.c:1694
+#: src/main/saveload.c:1696
 msgid "an xdr real data write error occurred"
 msgstr "bir xdr gerçek sayı verisi yazma hatası oluştu"
 
-#: src/main/saveload.c:1701
+#: src/main/saveload.c:1703
 msgid "an xdr real data read error occurred"
 msgstr "bir xdr gerçek sayı verisi okuma hatası oluştu"
 
-#: src/main/saveload.c:1708
+#: src/main/saveload.c:1710
 msgid "an xdr complex data write error occurred"
 msgstr "bir karmaşık sayı verisi yazma hatası oluştu"
 
-#: src/main/saveload.c:1715
+#: src/main/saveload.c:1717
 msgid "an xdr complex data read error occurred"
 msgstr "bir xdr karışık sayı verisi okuma hatası oluştu"
 
-#: src/main/saveload.c:1783 src/main/serialize.c:1958
-#: src/main/serialize.c:2568 src/modules/internet/internet.c:351
-#: src/modules/internet/internet.c:409 src/modules/internet/internet.c:514
+#: src/main/saveload.c:1785 src/main/serialize.c:1997
+#: src/main/serialize.c:2614 src/modules/internet/internet.c:514
+#: src/modules/internet/internet.c:590 src/modules/internet/internet.c:701
 msgid "write failed"
 msgstr "yazma başarısız"
 
-#: src/main/saveload.c:1910
+#: src/main/saveload.c:1912
 msgid "restore file may be empty -- no data loaded"
 msgstr "geri yükleme dosyası boş olabilir -- veri yüklenmedi"
 
-#: src/main/saveload.c:1912
+#: src/main/saveload.c:1914
 msgid "restore file may be from a newer version of R -- no data loaded"
 msgstr ""
 "geri yükleme dosyası R'nin yeni bir sürümünden olabilir -- veri yüklenmedi"
 
-#: src/main/saveload.c:1914
+#: src/main/saveload.c:1916
 msgid "bad restore file magic number (file may be corrupted) -- no data loaded"
 msgstr ""
 "hatalı geri yükleme dosyası magic numarası (dosya bozuk olabilir) -- veri "
 "yüklenmedi"
 
-#: src/main/saveload.c:1940 src/main/saveload.c:2238
+#: src/main/saveload.c:1942 src/main/saveload.c:2240
 msgid "first argument must be a character vector"
 msgstr "ilk argüman bir karakter vektörü olmalıdır"
 
-#: src/main/saveload.c:2012
+#: src/main/saveload.c:2014
 msgid "not a valid named list"
 msgstr "uygun bir isimlendirilmiş liste değil"
 
-#: src/main/saveload.c:2019 src/main/saveload.c:2040
+#: src/main/saveload.c:2021 src/main/saveload.c:2042
 #, c-format
 msgid "'%s' looks like a pre-2.4.0 S4 object: please recreate it"
 msgstr "'%s' bir 2.4.0 öncesi nesneye benziyor: lütfen yeniden oluşturun"
 
-#: src/main/saveload.c:2027
+#: src/main/saveload.c:2029
 msgid "loaded data is not in pair list form"
 msgstr "yüklenen veri liste biçimiyle eş değil"
 
-#: src/main/saveload.c:2063
+#: src/main/saveload.c:2065
 msgid "first argument must be a file name"
 msgstr "ilk argüman bir dosya ismi olmalıdır"
 
-#: src/main/saveload.c:2108 src/main/saveload.c:2134 src/main/serialize.c:826
-#: src/main/serialize.c:863 src/main/serialize.c:901
+#: src/main/saveload.c:2110 src/main/saveload.c:2136 src/main/serialize.c:864
+#: src/main/serialize.c:901 src/main/serialize.c:939
 msgid "XDR write failed"
 msgstr "XDR yazma başarısız"
 
-#: src/main/saveload.c:2121 src/main/saveload.c:2146 src/main/serialize.c:1362
-#: src/main/serialize.c:1398 src/main/serialize.c:1436
+#: src/main/saveload.c:2123 src/main/saveload.c:2148 src/main/serialize.c:1400
+#: src/main/serialize.c:1436 src/main/serialize.c:1474
 msgid "XDR read failed"
 msgstr "XDR okuma başarısız"
 
-#: src/main/saveload.c:2157
+#: src/main/saveload.c:2159
 #, c-format
 msgid "cannot save data -- unable to open '%s': %s"
 msgstr "veri kaydedilemedi -- '%s': %s açılamadı"
 
-#: src/main/saveload.c:2254 src/main/serialize.c:2161
+#: src/main/saveload.c:2256 src/main/serialize.c:2202
 #, c-format
 msgid "cannot save to connections in version %d format"
 msgstr "sürüm %d biçiminde  bağlantılara kaydedilemez"
 
-#: src/main/saveload.c:2277 src/main/serialize.c:2186
+#: src/main/saveload.c:2279 src/main/serialize.c:2227
 msgid "connection not open for writing"
 msgstr "bağlantı yazma için açık değil"
 
-#: src/main/saveload.c:2285
+#: src/main/saveload.c:2288
 msgid "cannot save XDR format to a text-mode connection"
 msgstr "XDR biçimi bir metin modlu bağlantıya kaydedilemiyor"
 
-#: src/main/saveload.c:2295 src/main/serialize.c:2066
-#: src/main/serialize.c:2080 src/main/serialize.c:2262
-#: src/main/serialize.c:2284
+#: src/main/saveload.c:2298 src/main/serialize.c:2105
+#: src/main/serialize.c:2119 src/main/serialize.c:2303
+#: src/main/serialize.c:2325
 msgid "error writing to connection"
 msgstr "bağlantıya yazılırken hata"
 
-#: src/main/saveload.c:2359 src/main/serialize.c:2234
+#: src/main/saveload.c:2359 src/main/serialize.c:2275
 msgid "connection not open for reading"
 msgstr "bağlantı okumak için açık değil"
 
@@ -5360,7 +5428,7 @@ msgstr ""
 msgid "scan() expected '%s', got '%s'"
 msgstr "'%s' scan() beklendi , %s alındı"
 
-#: src/main/scan.c:585 src/main/scan.c:732
+#: src/main/scan.c:585 src/main/scan.c:735
 #, fuzzy
 msgid "too many items"
 msgstr "çok fazla argüman"
@@ -5369,7 +5437,7 @@ msgstr "çok fazla argüman"
 msgid "empty 'what' specified"
 msgstr "boş 'what' belirlendi"
 
-#: src/main/scan.c:722
+#: src/main/scan.c:725
 #, c-format
 msgid "line %d did not have %d elements"
 msgstr "%d . dize %d öğeye sahip değil"
@@ -5398,173 +5466,174 @@ msgstr "geçersiz ondalık ayracı"
 msgid "invalid quote symbol set"
 msgstr "geçersiz tırnak sembol seti"
 
-#: src/main/scan.c:987
+#: src/main/scan.c:988
 #, fuzzy
 msgid "embedded nul(s) found in input"
 msgstr "'%s' dizesi gömülü nul"
 
-#: src/main/seq.c:48
+#: src/main/seq.c:49
 msgid "unequal factor lengths"
 msgstr "eşit olmayan faktör uzunlukları"
 
-#: src/main/seq.c:100
+#: src/main/seq.c:101
 msgid "result would be too long a vector"
 msgstr "sonuç çok uzun bir vektör olacak"
 
-#: src/main/seq.c:159
+#: src/main/seq.c:160
 msgid "argument of length 0"
 msgstr "0 uzunluğunda argüman"
 
-#: src/main/seq.c:161 src/main/seq.c:163
-#, c-format
-msgid "numerical expression has %d elements: only the first used"
-msgstr "sayısal gösterim %d öğeye sahip: sadece ilki kullanıldı"
+#: src/main/seq.c:163 src/main/seq.c:168
+#, fuzzy, c-format
+msgid "numerical expression has %d element: only the first used"
+msgid_plural "numerical expression has %d elements: only the first used"
+msgstr[0] "sayısal gösterim %d öğeye sahip: sadece ilki kullanıldı"
 
-#: src/main/seq.c:167
+#: src/main/seq.c:174
 msgid "NA/NaN argument"
 msgstr "NA/NaN argüman"
 
-#: src/main/seq.c:331
+#: src/main/seq.c:333
 msgid "incorrect type for second argument"
 msgstr "ikinci argüman için yanlış tip"
 
-#: src/main/seq.c:334
+#: src/main/seq.c:336
 #, fuzzy, c-format
 msgid "attempt to replicate an object of type '%s'"
 msgstr "vektör olmayanı kopyalama denemesi"
 
-#: src/main/seq.c:387
+#: src/main/seq.c:393
 msgid "attempt to replicate non-vector"
 msgstr "vektör olmayanı kopyalama denemesi"
 
-#: src/main/seq.c:403
+#: src/main/seq.c:409
 #, fuzzy
 msgid "cannot replicate NULL to a non-zero length"
 msgstr "%d uzunluğunda vektör oluşturulamadı"
 
-#: src/main/seq.c:626 src/main/seq.c:633 src/main/seq.c:768 src/main/seq.c:979
+#: src/main/seq.c:630 src/main/seq.c:637 src/main/seq.c:766 src/main/seq.c:977
 #, fuzzy, c-format
 msgid "first element used of '%s' argument"
 msgstr "'url' argümanının sadece ilk öğesi kullanıldı"
 
-#: src/main/seq.c:766
+#: src/main/seq.c:764
 msgid "'length.out' must be a non-negative number"
 msgstr "'length.out' negatif olmayan bir sayı olmalı"
 
-#: src/main/seq.c:790 src/main/seq.c:856 src/main/seq.c:873
+#: src/main/seq.c:788 src/main/seq.c:854 src/main/seq.c:871
 msgid "'from' must be finite"
 msgstr "'from' sonlu olmalı"
 
-#: src/main/seq.c:792 src/main/seq.c:858 src/main/seq.c:895
+#: src/main/seq.c:790 src/main/seq.c:856 src/main/seq.c:893
 msgid "'to' must be finite"
 msgstr "'to' sonlu olmalı"
 
-#: src/main/seq.c:804
+#: src/main/seq.c:802
 msgid "invalid '(to - from)/by' in 'seq'"
 msgstr "'seq' içinde geçersiz '(to - from)/by'"
 
-#: src/main/seq.c:816
+#: src/main/seq.c:814
 msgid "'by' argument is much too small"
 msgstr "'by' argümanı çok küçük"
 
-#: src/main/seq.c:818
+#: src/main/seq.c:816
 msgid "wrong sign in 'by' argument"
 msgstr "'by' argümanında yanlış imza"
 
-#: src/main/seq.c:875 src/main/seq.c:897
+#: src/main/seq.c:873 src/main/seq.c:895
 msgid "'by' must be finite"
 msgstr "'by' sonlu olmalı"
 
-#: src/main/seq.c:985 src/main/seq.c:990
+#: src/main/seq.c:983 src/main/seq.c:988
 msgid "argument must be coercible to non-negative integer"
 msgstr "argüman negatif olmayan tamsayıya zorlanabilmeli"
 
-#: src/main/serialize.c:224 src/main/serialize.c:254 src/main/serialize.c:277
+#: src/main/serialize.c:228 src/main/serialize.c:275 src/main/serialize.c:299
 msgid "unknown or inappropriate output format"
 msgstr "bilinmeyen veya uygun olmayan çıkış biçimi"
 
-#: src/main/serialize.c:504
+#: src/main/serialize.c:542
 msgid "must specify ascii, binary, or xdr format"
 msgstr "ascii, ikili, veya xdr biçimi seçilmeli"
 
-#: src/main/serialize.c:505
+#: src/main/serialize.c:543
 msgid "unknown output format"
 msgstr "bilinmeyen çıkış biçimi"
 
-#: src/main/serialize.c:536
+#: src/main/serialize.c:574
 msgid "unknown input format"
 msgstr "bilinmeyen giriş biçimi"
 
-#: src/main/serialize.c:541
+#: src/main/serialize.c:579
 msgid "input format does not match specified format"
 msgstr "giriş biçimi seçilen biçimle uyuşmuyor"
 
-#: src/main/serialize.c:752
+#: src/main/serialize.c:790
 msgid "no restore method available"
 msgstr "yeniden yükleme metodu mevcut değil"
 
-#: src/main/serialize.c:794
+#: src/main/serialize.c:832
 msgid "names in persistent strings are currently ignored"
 msgstr "kalıcı dizelerdeki isimler şuan görmezden geliniyor"
 
-#: src/main/serialize.c:963
+#: src/main/serialize.c:1001
 #, c-format
 msgid "'%s' may not be available when loading"
 msgstr "'%s' yüklerken mevcut olmayabilir"
 
-#: src/main/serialize.c:970
+#: src/main/serialize.c:1008
 msgid "namespaces may not be available when loading"
 msgstr "isimalanları yüklerken mevcut olmayabilir"
 
-#: src/main/serialize.c:1097
+#: src/main/serialize.c:1136
 #, c-format
 msgid "WriteItem: unknown type %i"
 msgstr "WriteItem: bilinmeyen tip %i"
 
-#: src/main/serialize.c:1273
+#: src/main/serialize.c:1312
 #, c-format
 msgid "version %d not supported"
 msgstr "sürüm %d desteklenmiyor"
 
-#: src/main/serialize.c:1305
+#: src/main/serialize.c:1343
 msgid "reference index out of range"
 msgstr "referans indis alan dışında"
 
-#: src/main/serialize.c:1335
+#: src/main/serialize.c:1373
 msgid "names in persistent strings are not supported yet"
 msgstr "sürekli dizelerde isimler henüz desteklenmiyor"
 
-#: src/main/serialize.c:1463
+#: src/main/serialize.c:1501
 #, fuzzy
 msgid "negative serialized length for vector"
 msgstr "vektör olmayanın uzunluğu ayarlanamadı"
 
-#: src/main/serialize.c:1471
+#: src/main/serialize.c:1509
 #, fuzzy
 msgid "invalid upper part of serialized vector length"
 msgstr "geçersiz parametre uzunluğu"
 
-#: src/main/serialize.c:1476
+#: src/main/serialize.c:1514
 msgid ""
 "negative serialized vector length:\n"
 "perhaps long vector from 64-bit version of R?"
 msgstr ""
 
-#: src/main/serialize.c:1707
+#: src/main/serialize.c:1746
 msgid "this version of R cannot read class references"
 msgstr "R'nin bu sürümü sınıf referanslarını okuyamaz"
 
-#: src/main/serialize.c:1709
+#: src/main/serialize.c:1748
 msgid "this version of R cannot read generic function references"
 msgstr "R'nin bu sürümü genel fonksiyon referanslarını okuyamaz"
 
-#: src/main/serialize.c:1726
+#: src/main/serialize.c:1765
 #, c-format
 msgid "ReadItem: unknown type %i, perhaps written by later version of R"
 msgstr ""
 "ReadItem: bilinmeyen tip %i, R'nin yeni bir sürümüyle yazılmış olabilir"
 
-#: src/main/serialize.c:1882
+#: src/main/serialize.c:1921
 #, c-format
 msgid ""
 "cannot read unreleased workspace version %d written by experimental R %d.%d."
@@ -5573,7 +5642,7 @@ msgstr ""
 "yayınlanmamış çalışma alanı sürümü %d okunamıyor (deneysel R %d.%d.%d ile "
 "yazılmış)"
 
-#: src/main/serialize.c:1886
+#: src/main/serialize.c:1925
 #, c-format
 msgid ""
 "cannot read workspace version %d written by R %d.%d.%d; need R %d.%d.%d or "
@@ -5582,83 +5651,83 @@ msgstr ""
 "çalışma alanı sürümü %d okunamıyor (R %d.%d.%d ile yazılmış; R %d.%d.%d ya "
 "da daha yenisi gerekli)"
 
-#: src/main/serialize.c:1965
+#: src/main/serialize.c:2004
 msgid "read failed"
 msgstr "okuma başarısız"
 
-#: src/main/serialize.c:2028
+#: src/main/serialize.c:2067
 msgid "error reading from ascii connection"
 msgstr "ascii bağlantısında okunurken hata"
 
-#: src/main/serialize.c:2030
+#: src/main/serialize.c:2069
 msgid "unexpected format in ascii connection"
 msgstr "ascii bağlantısında beklenmeyen biçim"
 
-#: src/main/serialize.c:2035 src/main/serialize.c:2049
+#: src/main/serialize.c:2074 src/main/serialize.c:2088
 msgid "error reading from connection"
 msgstr "bağlantıdan okunurken hata"
 
-#: src/main/serialize.c:2090
+#: src/main/serialize.c:2130
 msgid "only ascii format can be written to text mode connections"
 msgstr "metin modu bağlantılara sadece ascii biçiminde yazılabilir"
 
-#: src/main/serialize.c:2104
+#: src/main/serialize.c:2144
 msgid "only ascii format can be read from text mode connections"
 msgstr "metin modu bağlantılardan sadece ascii biçiminde okunabilir"
 
-#: src/main/serialize.c:2159 src/main/serialize.c:2312
-#: src/main/serialize.c:2461
+#: src/main/serialize.c:2200 src/main/serialize.c:2353
+#: src/main/serialize.c:2502
 msgid "bad version value"
 msgstr "hatalı sürüm değeri"
 
-#: src/main/serialize.c:2184
+#: src/main/serialize.c:2225
 #, fuzzy
 msgid "binary-mode connection required for ascii=FALSE"
 msgstr "binary işlemleri iki argüman gerektirir"
 
-#: src/main/serialize.c:2340 src/main/serialize.c:2377
-#: src/main/serialize.c:2440
+#: src/main/serialize.c:2381 src/main/serialize.c:2418
+#: src/main/serialize.c:2481
 msgid "serialization is too large to store in a raw vector"
 msgstr "serileştirme bir ham vektörde saklamak için çok büyük"
 
-#: src/main/serialize.c:2357
+#: src/main/serialize.c:2398
 msgid "cannot allocate buffer"
 msgstr "önbellek ayrılamıyor"
 
-#: src/main/serialize.c:2546 src/main/serialize.c:2619
+#: src/main/serialize.c:2592 src/main/serialize.c:2665
 msgid "not a proper file name"
 msgstr "uygun bir dosya ismi değil"
 
-#: src/main/serialize.c:2548
+#: src/main/serialize.c:2594
 msgid "not a proper raw vector"
 msgstr "uygun bir ham vektör değil"
 
-#: src/main/serialize.c:2569
+#: src/main/serialize.c:2615
 msgid "could not determine file position"
 msgstr "dosya konumu belirlenemiyor"
 
-#: src/main/serialize.c:2621
+#: src/main/serialize.c:2667
 msgid "bad offset/length argument"
 msgstr "hatalı konum/uzunluk argümanı"
 
-#: src/main/serialize.c:2645 src/main/serialize.c:2658
-#: src/main/serialize.c:2667 src/main/serialize.c:2677
-#: src/main/serialize.c:2690
+#: src/main/serialize.c:2691 src/main/serialize.c:2704
+#: src/main/serialize.c:2713 src/main/serialize.c:2723
+#: src/main/serialize.c:2736
 #, c-format
 msgid "seek failed on %s"
 msgstr "%s'de tarama hatası"
 
-#: src/main/serialize.c:2662 src/main/serialize.c:2671
-#: src/main/serialize.c:2681 src/main/serialize.c:2694
+#: src/main/serialize.c:2708 src/main/serialize.c:2717
+#: src/main/serialize.c:2727 src/main/serialize.c:2740
 #, c-format
 msgid "read failed on %s"
 msgstr "%s'de okuma başarısız"
 
-#: src/main/serialize.c:2713
+#: src/main/serialize.c:2759
 msgid "bad environment"
 msgstr "hatalı ortam"
 
-#: src/main/serialize.c:2715
+#: src/main/serialize.c:2761
 msgid "bad variable names"
 msgstr "hatalı değişken isimleri"
 
@@ -5666,166 +5735,162 @@ msgstr "hatalı değişken isimleri"
 msgid "only atomic vectors can be tested to be sorted"
 msgstr "sadece atomik vektörler sıralanmak için sınanabilir"
 
-#: src/main/sort.c:326 src/main/sort.c:1228 src/main/sort.c:1396
+#: src/main/sort.c:325 src/main/sort.c:1248
 msgid "'decreasing' must be TRUE or FALSE"
 msgstr "'decreasing' TRUE ya da FALSE olmalı"
 
-#: src/main/sort.c:329 src/main/sort.c:600
+#: src/main/sort.c:328 src/main/sort.c:599
 msgid "only atomic vectors can be sorted"
 msgstr "sadece atomik vektörler sıralanabilir"
 
-#: src/main/sort.c:331 src/main/sort.c:602 src/main/sort.c:1297
+#: src/main/sort.c:330 src/main/sort.c:601 src/main/sort.c:1317
 msgid "raw vectors cannot be sorted"
 msgstr "ham vektörler sıralanamaz"
 
-#: src/main/sort.c:613
+#: src/main/sort.c:612
 msgid "NA or infinite index"
 msgstr ""
 
-#: src/main/sort.c:616
+#: src/main/sort.c:615
 #, fuzzy, c-format
 msgid "index %ld outside bounds"
 msgstr "indis %d sınırlar dışında"
 
-#: src/main/sort.c:621 src/main/sort.c:634
+#: src/main/sort.c:620 src/main/sort.c:633
 msgid "NA index"
 msgstr "NA indis"
 
-#: src/main/sort.c:623 src/main/sort.c:636
+#: src/main/sort.c:622 src/main/sort.c:635
 #, c-format
 msgid "index %d outside bounds"
 msgstr "indis %d sınırlar dışında"
 
-#: src/main/sort.c:1237
+#: src/main/sort.c:1257
 #, c-format
 msgid "argument %d is not a vector"
 msgstr "%d argümanı bir vektör değil"
 
-#: src/main/sort.c:1239
+#: src/main/sort.c:1259
 msgid "argument lengths differ"
 msgstr "argüman uzunlukları farklı"
 
-#: src/main/sort.c:1324
+#: src/main/sort.c:1344
 msgid "invalid ties.method for rank() [should never happen]"
 msgstr "rank() için geçersiz ties.method [gerçekleşmemesi gerekirdi]"
 
-#: src/main/sort.c:1429
-msgid "too large a range of values in 'x'"
-msgstr "'x'de çok geniş değer aralığı"
-
-#: src/main/source.c:215
+#: src/main/source.c:220
 msgid "coercion of 'text' to character was unsuccessful"
 msgstr "karakterden 'text'e zorlama başarılı olmadı"
 
-#: src/main/source.c:231
+#: src/main/source.c:236
 #, c-format
 msgid "argument '%s = \"%s\"' will be ignored"
 msgstr "argüman '%s = \"%s\"' görmezden gelinecek"
 
-#: src/main/split.c:38
+#: src/main/split.c:39
 msgid "first argument must be a vector"
 msgstr "ilk karakter bir vektör olmalı"
 
-#: src/main/split.c:40
+#: src/main/split.c:41
 msgid "second argument must be a factor"
 msgstr "ikinci argüman bir faktör olmalı"
 
-#: src/main/split.c:45
+#: src/main/split.c:46
 #, fuzzy
 msgid "group length is 0 but data length > 0"
 msgstr "Grup uzunluğu 0 ancak veri uzunluğu > 0"
 
-#: src/main/split.c:47
+#: src/main/split.c:48
 msgid "data length is not a multiple of split variable"
 msgstr "veri uzunluğu bölünmüş değişkenin bir katı değil"
 
-#: src/main/split.c:56
+#: src/main/split.c:58
 msgid "factor has bad level"
 msgstr "faktör hatalı seviyeye sahip"
 
-#: src/main/sprintf.c:94
+#: src/main/sprintf.c:97
 #, fuzzy, c-format
 msgid "required resulting string length %d is greater than maximal %d"
 msgstr "gerekli sonuç dizesi uzunluğu %d > maksimum uzunluk %d'den"
 
-#: src/main/sprintf.c:102
+#: src/main/sprintf.c:105
 msgid "'fmt' is not a character vector"
 msgstr "'fmt' bir karakter vektörü değil"
 
-#: src/main/sprintf.c:107
+#: src/main/sprintf.c:110
 #, c-format
 msgid "only %d arguments are allowed"
 msgstr "sadece %d argümana izin veriliyor"
 
-#: src/main/sprintf.c:114
+#: src/main/sprintf.c:117
 #, c-format
 msgid "invalid type of argument[%d]: '%s'"
 msgstr "argüman[%d]'in tipi geçersiz: '%s'"
 
-#: src/main/sprintf.c:125 src/main/sprintf.c:128
+#: src/main/sprintf.c:128 src/main/sprintf.c:131
 msgid "arguments cannot be recycled to the same length"
 msgstr "argümanlar aynı uzunluğu geri dönüştürülemezler"
 
-#: src/main/sprintf.c:150 src/main/sprintf.c:257
+#: src/main/sprintf.c:153 src/main/sprintf.c:260
 #, c-format
 msgid "'fmt' length exceeds maximal format length %d"
 msgstr "'fmt' uzunluğu maksimum biçim uzunluğu %d'i geçiyor"
 
-#: src/main/sprintf.c:169
+#: src/main/sprintf.c:172
 #, c-format
 msgid "unrecognised format specification '%s'"
 msgstr "tanınmayan biçim özelliği: '%s'"
 
-#: src/main/sprintf.c:180 src/main/sprintf.c:186 src/main/sprintf.c:199
-#: src/main/sprintf.c:206
+#: src/main/sprintf.c:183 src/main/sprintf.c:189 src/main/sprintf.c:202
+#: src/main/sprintf.c:209
 #, c-format
 msgid "reference to non-existent argument %d"
 msgstr "var olmayan argüman %d'e referans"
 
-#: src/main/sprintf.c:218
+#: src/main/sprintf.c:221
 msgid "at most one asterisk '*' is supported in each conversion specification"
 msgstr "her dönüşüm özelliğinde en fazla bir yıldız '*' destekleniyor"
 
-#: src/main/sprintf.c:228
+#: src/main/sprintf.c:231
 msgid "argument for '*' conversion specification must be a number"
 msgstr "'*' için argüman dönüştürme özelliği bir sayı olmalı"
 
-#: src/main/sprintf.c:266
+#: src/main/sprintf.c:269
 msgid "coercion has changed vector length to 0"
 msgstr "zorlama vektör uzunluğunu 0 yaptı"
 
-#: src/main/sprintf.c:339 src/main/sprintf.c:353 src/main/sprintf.c:367
-#: src/main/sprintf.c:402
+#: src/main/sprintf.c:343 src/main/sprintf.c:357 src/main/sprintf.c:371
+#: src/main/sprintf.c:406
 #, c-format
 msgid "invalid format '%s'; %s"
 msgstr "geçersiz biçim '%s'; %s"
 
-#: src/main/sprintf.c:340
+#: src/main/sprintf.c:344
 #, c-format
 msgid "use format %d or %i for logical objects"
 msgstr "mantıksal nesneler için %d veya %i biçimini kullanın"
 
-#: src/main/sprintf.c:354
+#: src/main/sprintf.c:358
 #, c-format
 msgid "use format %d, %i, %o, %x or %X for integer objects"
 msgstr "tamsayı nesneler için %d, %i, %o, %x veya %X  biçimini kullanın"
 
-#: src/main/sprintf.c:368
+#: src/main/sprintf.c:372
 #, c-format
 msgid "use format %f, %e, %g or %a for numeric objects"
 msgstr "sayısal nesneler için %f, %e, %g veya %a biçimini kullanın"
 
-#: src/main/sprintf.c:403
+#: src/main/sprintf.c:407
 #, c-format
 msgid "use format %s for character objects"
 msgstr "karakter nesneleri için %s biçimini kullanın"
 
-#: src/main/sprintf.c:408
+#: src/main/sprintf.c:412
 #, c-format
 msgid "likely truncation of character string to %d characters"
 msgstr "karakter dizesinin %d karaktere kırpılmış hali olası"
 
-#: src/main/sprintf.c:417
+#: src/main/sprintf.c:421
 msgid "unsupported type"
 msgstr "desteklenmeyen tip"
 
@@ -5833,385 +5898,390 @@ msgstr "desteklenmeyen tip"
 msgid "R_LibraryFileName: buffer too small"
 msgstr "R_LibraryFileName: önbellek çok küçük"
 
-#: src/main/subassign.c:117
+#: src/main/subassign.c:118
 msgid "attempt to enlarge non-vector"
 msgstr "vektör olmayanı genişletme denemesi"
 
-#: src/main/subassign.c:122
+#: src/main/subassign.c:123
 #, c-format
 msgid "assignment outside vector/list limits (extending from %d to %d)"
 msgstr "vektör/liste sınırları dışına atama (%d'den %d'e uzatılıyor)"
 
-#: src/main/subassign.c:367
+#: src/main/subassign.c:391
 #, c-format
 msgid "incompatible types (from %s to %s) in subassignment type fix"
 msgstr "altatama düzeltmesinde uyumsuz tipler (%s'den %s'e)"
 
-#: src/main/subassign.c:502 src/main/subassign.c:782 src/main/subassign.c:785
-#: src/main/subassign.c:1076
+#: src/main/subassign.c:550 src/main/subassign.c:830 src/main/subassign.c:833
+#: src/main/subassign.c:1133
 msgid "NAs are not allowed in subscripted assignments"
 msgstr "altindislenmiş atamalarda NA'lara izin verilmiyor"
 
-#: src/main/subassign.c:520 src/main/subassign.c:796 src/main/subassign.c:1068
-#: src/main/subassign.c:1641
+#: src/main/subassign.c:568 src/main/subassign.c:844 src/main/subassign.c:1125
+#: src/main/subassign.c:1705
 msgid "replacement has length zero"
 msgstr "değiştirme sıfır uzunluğunda"
 
-#: src/main/subassign.c:522 src/main/subassign.c:798 src/main/subassign.c:1070
+#: src/main/subassign.c:570 src/main/subassign.c:846 src/main/subassign.c:1127
 msgid "number of items to replace is not a multiple of replacement length"
 msgstr "değiştirilecek öğelerin sayısı değiştirme uzunluğunun bir katı değil"
 
-#: src/main/subassign.c:766
+#: src/main/subassign.c:814
 msgid "incorrect number of subscripts on matrix"
 msgstr "matriste hatalı sayıda altindis"
 
-#: src/main/subassign.c:1022
+#: src/main/subassign.c:1079
 #, c-format
 msgid "incompatible types (from %s to %s) in matrix subset assignment"
 msgstr "matris altküme atamasında uyumsuz tipler (%s'den %s'e)"
 
-#: src/main/subassign.c:1038 src/main/subset.c:928
+#: src/main/subassign.c:1095 src/main/subset.c:957
 msgid "incorrect number of subscripts"
 msgstr "geçersiz sayıda altbetik"
 
-#: src/main/subassign.c:1214
+#: src/main/subassign.c:1272
 #, c-format
 msgid "incompatible types (from %s to %s) in array subset assignment"
 msgstr "dizi altküme atamasında uyumsuz tipler (%s'den %s'e)"
 
-#: src/main/subassign.c:1249 src/main/subassign.c:1270
+#: src/main/subassign.c:1308 src/main/subassign.c:1329
 msgid "invalid subscript in list assign"
 msgstr "liste atamasında geçersiz altindis"
 
-#: src/main/subassign.c:1263
+#: src/main/subassign.c:1322
 msgid "invalid number of subscripts to list assign"
 msgstr "liste ataması için geçersiz sayıda altindis"
 
-#: src/main/subassign.c:1361
+#: src/main/subassign.c:1421
 msgid "SubAssignArgs: invalid number of arguments"
 msgstr "SubAssignArgs: geçersiz sayıda argüman"
 
-#: src/main/subassign.c:1506
+#: src/main/subassign.c:1566
 msgid "result is zero-length and so cannot be a language object"
 msgstr "sonuç sıfır uzunluğunda ve bir dil nesnesi olamaz"
 
-#: src/main/subassign.c:1611
+#: src/main/subassign.c:1665
 msgid ""
 "[[<- defined for objects of type \"S4\" only for subclasses of environment"
 msgstr ""
 
-#: src/main/subassign.c:1617
+#: src/main/subassign.c:1677
 msgid "wrong args for environment subassignment"
 msgstr "çevrebirim altataması için hatalı argümanlar"
 
-#: src/main/subassign.c:1643
+#: src/main/subassign.c:1707
 msgid "more elements supplied than there are to replace"
 msgstr "değiştirileceklerden fazla öğe verildi"
 
-#: src/main/subassign.c:1645
+#: src/main/subassign.c:1709
 msgid "[[ ]] with missing subscript"
 msgstr "eksik altindisli [[ ]]"
 
-#: src/main/subassign.c:1657 src/main/subassign.c:1675
+#: src/main/subassign.c:1727 src/main/subassign.c:1745
 msgid "[[ ]] subscript out of bounds"
 msgstr "[[ ]] altindis sınırlar dışında"
 
-#: src/main/subassign.c:1663 src/main/subassign.c:1841
+#: src/main/subassign.c:1733 src/main/subassign.c:1914
 msgid "[[ ]] improper number of subscripts"
 msgstr "[[ ]] uygun olmayan sayıda altindis"
 
-#: src/main/subassign.c:1808
+#: src/main/subassign.c:1879
 #, c-format
 msgid "incompatible types (from %s to %s) in [[ assignment"
 msgstr "[[ atamasında uyumsuz tipler (%s'den %s'e)"
 
-#: src/main/subassign.c:1852
+#: src/main/subassign.c:1925
 #, c-format
 msgid "[[ ]] subscript (%d) out of bounds"
 msgstr "[[ ]] altindis (%d) sınırlar dışında"
 
-#: src/main/subassign.c:1905 src/main/subscript.c:143 src/main/subscript.c:145
-#: src/main/subscript.c:274 src/main/subscript.c:276 src/main/subscript.c:826
-#: src/main/subscript.c:828 src/main/subscript.c:919 src/main/subscript.c:921
-#: src/main/subset.c:1109
+#: src/main/subassign.c:1986 src/main/subscript.c:151 src/main/subscript.c:278
+#: src/main/subscript.c:903 src/main/subscript.c:996 src/main/subset.c:1176
 #, c-format
 msgid "invalid subscript type '%s'"
 msgstr "geçersiz altindis tipi '%s'"
 
-#: src/main/subassign.c:1950
+#: src/main/subassign.c:2037
 msgid "no method for assigning subsets of this S4 class"
 msgstr "bu S4 sınıfının alt küme ataması için yöntem yok"
 
-#: src/main/subassign.c:2008
+#: src/main/subassign.c:2095
 msgid "Coercing LHS to a list"
 msgstr "LHS bir listeye zorlanıyor"
 
-#: src/main/subscript.c:53 src/main/subscript.c:75 src/main/subscript.c:180
-#: src/main/subscript.c:204
-msgid "attempt to select less than one element"
+#: src/main/subscript.c:59 src/main/subscript.c:81 src/main/subscript.c:185
+#: src/main/subscript.c:209
+#, fuzzy, c-format
+msgid "attempt to select less than one element in %s"
 msgstr "birden az öğe seçme denemesi"
 
-#: src/main/subscript.c:57 src/main/subscript.c:72 src/main/subscript.c:178
-#: src/main/subscript.c:208 src/main/subscript.c:304
-msgid "attempt to select more than one element"
+#: src/main/subscript.c:63 src/main/subscript.c:78 src/main/subscript.c:183
+#: src/main/subscript.c:213 src/main/subscript.c:305
+#, fuzzy, c-format
+msgid "attempt to select more than one element in %s"
 msgstr "birden fazla öğe seçme denemesi"
 
-#: src/main/subscript.c:184
+#: src/main/subscript.c:189
 msgid "internal error in use of recursive indexing"
 msgstr "yinelemeli indisleme kullanımında iç hata"
 
-#: src/main/subscript.c:252
+#: src/main/subscript.c:257
 #, c-format
 msgid "further partial match of '%s' to '%s'"
 msgstr "'%s'den '%s'e daha fazla kısmi uyuşma"
 
-#: src/main/subscript.c:302
+#: src/main/subscript.c:303
 #, c-format
 msgid "recursive indexing failed at level %d\n"
 msgstr "yinelemeli indisleme seyive %d'da başarısız oldu\n"
 
-#: src/main/subscript.c:309
+#: src/main/subscript.c:313
 #, c-format
 msgid "no such index at level %d\n"
 msgstr "seviye %d'de böyle bir indis yok\n"
 
-#: src/main/subscript.c:352
+#: src/main/subscript.c:360
 msgid "incorrect number of columns in matrix subscript"
 msgstr "matris altindisinde hatalı sayıda sütun"
 
-#: src/main/subscript.c:371 src/main/subscript.c:389 src/main/subscript.c:413
+#: src/main/subscript.c:379 src/main/subscript.c:397 src/main/subscript.c:421
 msgid "negative values are not allowed in a matrix subscript"
 msgstr "bir matris altindisinde negatif değerlere izin verilmiyor"
 
-#: src/main/subscript.c:492
+#: src/main/subscript.c:500
 msgid "(subscript) logical subscript too long"
 msgstr "(altindis) mantıksal altindiz çok uzun"
 
-#: src/main/subscript.c:590 src/main/subscript.c:645
+#: src/main/subscript.c:668 src/main/subscript.c:723
 msgid "only 0's may be mixed with negative subscripts"
 msgstr "negatif altindislerle sadece 0'lar karıştırılabilir"
 
-#: src/main/subscript.c:618
+#: src/main/subscript.c:696
 msgid "subscript too large for 32-bit R"
 msgstr ""
 
-#: src/main/subscript.c:817
+#: src/main/subscript.c:895
 msgid "no 'dimnames' attribute for array"
 msgstr "dizi için 'dimnames' özelliği yok"
 
-#: src/main/subscript.c:857
+#: src/main/subscript.c:931
 msgid "subscripting on non-vector"
 msgstr "vektör olmayan altindisleniyor"
 
-#: src/main/subset.c:261
+#: src/main/subset.c:260
 msgid "dimensions would exceed maximum size of array"
 msgstr ""
 
-#: src/main/subset.c:304 src/main/subset.c:333
+#: src/main/subset.c:304 src/main/subset.c:334
 msgid "matrix subscripting not handled for this type"
 msgstr "matris altindisleri bu tip için yöneltilmiyor"
 
-#: src/main/subset.c:488
+#: src/main/subset.c:493
 msgid "array subscripting not handled for this type"
 msgstr "dize altindisleri bu tip için yöneltilmiyor"
 
-#: src/main/subset.c:827
+#: src/main/subset.c:856
 msgid "incorrect number of dimensions"
 msgstr "yanlış sayıda boyut"
 
-#: src/main/subset.c:924
+#: src/main/subset.c:953
 msgid "no index specified"
 msgstr "indis belirlenmedi"
 
-#: src/main/subset.c:934
+#: src/main/subset.c:963
 msgid "this S4 class is not subsettable"
 msgstr "bu S4 sınıfı alt küme yapılamaz"
 
-#: src/main/subset.c:940
+#: src/main/subset.c:970
 msgid "wrong arguments for subsetting an environment"
 msgstr "bir çevrebirimi altkümelemek için yanlış argüman"
 
-#: src/main/summary.c:30
+#: src/main/summary.c:33
 #, c-format
 msgid "invalid 'type' (%s) of argument"
 msgstr "argümanın geçersiz 'type' (%s)"
 
-#: src/main/summary.c:66 src/main/summary.c:78 src/main/summary.c:103
+#: src/main/summary.c:69 src/main/summary.c:81 src/main/summary.c:106
 #, fuzzy
 msgid "integer overflow - use sum(as.numeric(.))"
 msgstr "Tamsayı taşması - sum(as.numeric(.)) kullanın"
 
-#: src/main/summary.c:522
+#: src/main/summary.c:526
 #, c-format
 msgid "internal error ('op = %d' in do_summary).\t Call a Guru"
 msgstr "iç hata (do_summary içinde 'op = %d') \t Bir uzman çağırın"
 
-#: src/main/summary.c:623
+#: src/main/summary.c:637
 msgid "Integer overflow - use sum(as.numeric(.))"
 msgstr "Tamsayı taşması - sum(as.numeric(.)) kullanın"
 
-#: src/main/summary.c:731
+#: src/main/summary.c:750
 msgid "no non-missing arguments, returning NA"
 msgstr "eksik olmayan argüman yok, NA döndürülüyor"
 
-#: src/main/summary.c:734
+#: src/main/summary.c:753
 msgid "no non-missing arguments to min; returning Inf"
 msgstr "min için eksik olmayan argüman yok; Inf döndürülüyor"
 
-#: src/main/summary.c:736
+#: src/main/summary.c:755
 msgid "no non-missing arguments to max; returning -Inf"
 msgstr "max için eksik olmayan argüman yok; -Inf döndürülüyor"
 
-#: src/main/summary.c:801
-msgid "non-numeric argument"
-msgstr "sayısal olmayan argüman"
-
-#: src/main/summary.c:845
+#: src/main/summary.c:913
 msgid "argument to 'which' is not logical"
 msgstr "'which' verilan argüman mantıksal değil"
 
-#: src/main/summary.c:889
+#: src/main/summary.c:957
 msgid "no arguments"
 msgstr "argüman yok"
 
-#: src/main/summary.c:900 src/main/summary.c:917
+#: src/main/summary.c:968 src/main/summary.c:985
 msgid "invalid input type"
 msgstr "geçersiz giriş biçimi"
 
-#: src/main/summary.c:934
+#: src/main/summary.c:1002
 #, fuzzy
 msgid "an argument will be fractionally recycled"
 msgstr "argüman '%s' görmezden gelinecek"
 
-#: src/main/sysutils.c:69 src/main/sysutils.c:83
+#: src/main/sysutils.c:68 src/main/sysutils.c:82
 #, c-format
 msgid "cannot determine file modification time of '%s'"
 msgstr "'%s'in değiştirilme zamanı tespit edilemiyor"
 
-#: src/main/sysutils.c:167
+#: src/main/sysutils.c:166
 msgid "encoding of a filename cannot be 'bytes'"
 msgstr ""
 
-#: src/main/sysutils.c:170 src/main/sysutils.c:803 src/main/sysutils.c:818
-#: src/main/sysutils.c:909 src/main/sysutils.c:924 src/main/sysutils.c:1020
+#: src/main/sysutils.c:169 src/main/sysutils.c:831 src/main/sysutils.c:846
+#: src/main/sysutils.c:975
 #, fuzzy, c-format
 msgid "unsupported conversion from '%s' in codepage %d"
 msgstr "'%s' den '%s' e desteklenmeyen dönüşüm"
 
-#: src/main/sysutils.c:179
+#: src/main/sysutils.c:178
 msgid "file name conversion problem -- name too long?"
 msgstr "dosya ismi dönüştürme sorunu -- isim çok mu uzun?"
 
-#: src/main/sysutils.c:180
+#: src/main/sysutils.c:179
 msgid "file name conversion problem"
 msgstr "dosya ismi dönüştürme sorunu"
 
-#: src/main/sysutils.c:249
+#: src/main/sysutils.c:248
 msgid "invalid filename pattern"
 msgstr "geçersiz dosya ismi kalıbı"
 
-#: src/main/sysutils.c:253
+#: src/main/sysutils.c:252
 #, fuzzy
 msgid "invalid file extension"
 msgstr "geçersiz dosya ismi kalıbı"
 
-#: src/main/sysutils.c:255
+#: src/main/sysutils.c:254
 msgid "no 'pattern'"
 msgstr "'pattern' yok"
 
-#: src/main/sysutils.c:257
+#: src/main/sysutils.c:256
 msgid "no 'tempdir'"
 msgstr "'tempdir' yok"
 
-#: src/main/sysutils.c:259
+#: src/main/sysutils.c:258
 msgid "no 'fileext'"
 msgstr ""
 
-#: src/main/sysutils.c:345 src/main/sysutils.c:348 src/main/sysutils.c:439
-#: src/main/sysutils.c:441 src/main/sysutils.c:477
+#: src/main/sysutils.c:328
+#, fuzzy, c-format
+msgid "system call failed: %s"
+msgstr "%s'de tarama hatası"
+
+#: src/main/sysutils.c:357 src/main/sysutils.c:360 src/main/sysutils.c:451
+#: src/main/sysutils.c:453 src/main/sysutils.c:489
 msgid "wrong type for argument"
 msgstr "argüman için yanlış tip"
 
-#: src/main/sysutils.c:443
+#: src/main/sysutils.c:455
 msgid "wrong length for argument"
 msgstr "argüman için yanlış uzunluk"
 
-#: src/main/sysutils.c:464
+#: src/main/sysutils.c:476
 msgid "'Sys.setenv' is not available on this system"
 msgstr "'Sys.setenv' bu sistemde mevcut değil"
 
-#: src/main/sysutils.c:508
+#: src/main/sysutils.c:520
 msgid "this system cannot unset environment variables: setting to \"\""
 msgstr "bu sistem çevrebirim değişkenlerini kaldıramaz, şuna ayarlanıyor: \"\""
 
-#: src/main/sysutils.c:519
+#: src/main/sysutils.c:531
 msgid "'Sys.unsetenv' is not available on this system"
 msgstr "'Sys.unsetenv' bu sistemde mevcut değil"
 
-#: src/main/sysutils.c:616
+#: src/main/sysutils.c:628
 #, fuzzy, c-format
 msgid "unsupported conversion from '%s' to '%s' in codepage %d"
 msgstr "'%s' den '%s' e desteklenmeyen dönüşüm"
 
-#: src/main/sysutils.c:631
+#: src/main/sysutils.c:643
 msgid "'x' must be a character vector"
 msgstr "'x' bir karakter vektörü olmalı"
 
-#: src/main/sysutils.c:646
+#: src/main/sysutils.c:658
 #, fuzzy
-msgid "'x' must be a list of NULL or raw vectors"
+msgid "'x' must be a character vector or a list of NULL or raw vectors"
 msgstr "'x' bir karakter vektörü olmalı"
 
-#: src/main/sysutils.c:724 src/main/sysutils.c:789 src/main/sysutils.c:895
-#: src/main/sysutils.c:994 src/main/sysutils.c:1010 src/main/sysutils.c:1087
+#: src/main/sysutils.c:736 src/main/sysutils.c:914 src/main/sysutils.c:932
+#: src/main/sysutils.c:949 src/main/sysutils.c:965 src/main/sysutils.c:1042
 #, c-format
 msgid "'%s' must be called on a CHARSXP"
 msgstr "'%s' bir CHARSXP den çağırılmalı"
 
-#: src/main/sysutils.c:792 src/main/sysutils.c:898 src/main/sysutils.c:1015
-#: src/main/sysutils.c:1090
+#: src/main/sysutils.c:805 src/main/sysutils.c:970 src/main/sysutils.c:1045
 msgid "translating strings with \"bytes\" encoding is not allowed"
 msgstr ""
 
-#: src/main/sysutils.c:1116
+#: src/main/sysutils.c:818
+#, fuzzy
+msgid "internal error: no translation needed"
+msgstr "unz kodunda iç hata"
+
+#: src/main/sysutils.c:1071
 #, fuzzy, c-format
 msgid "unsupported conversion to '%s' from codepage %d"
 msgstr "'%s' den '%s' e desteklenmeyen dönüşüm"
 
-#: src/main/sysutils.c:1530
+#: src/main/sysutils.c:1486
 #, fuzzy, c-format
 msgid "invalid Unicode point %u"
 msgstr "geçersiz dize girişi"
 
-#: src/main/sysutils.c:1632
+#: src/main/sysutils.c:1588
 #, fuzzy
 msgid "cannot create 'R_TempDir'"
 msgstr "R_TempDir bellek yeri ayrılamıyor"
 
-#: src/main/sysutils.c:1636 src/main/sysutils.c:1644 src/main/sysutils.c:1647
+#: src/main/sysutils.c:1592 src/main/sysutils.c:1600 src/main/sysutils.c:1603
 msgid "unable to set R_SESSION_TMPDIR"
 msgstr "R_SESSION_TMPDIR belirlenemiyor"
 
-#: src/main/sysutils.c:1656
+#: src/main/sysutils.c:1612
 #, fuzzy
 msgid "cannot allocate 'R_TempDir'"
 msgstr "R_TempDir bellek yeri ayrılamıyor"
 
-#: src/main/sysutils.c:1693
+#: src/main/sysutils.c:1649
 #, fuzzy
 msgid "temporary name too long"
 msgstr "dosya ismi çok uzun"
 
-#: src/main/sysutils.c:1708
+#: src/main/sysutils.c:1664
 msgid "cannot find unused tempfile name"
 msgstr "kullanılmayan geçiçi dosya ismi bulunamıyor"
 
-#: src/main/sysutils.c:1711
+#: src/main/sysutils.c:1667
 #, fuzzy
 msgid "allocation failed in R_tmpnam2"
 msgstr "R_tmpnam için bellek ayırma hatası"
 
-#: src/main/sysutils.c:1838
+#: src/main/sysutils.c:1794
 msgid "'dirmark = TRUE' is not supported on this platform"
 msgstr "'dirmark = TRUE' bu platformda desteklenmiyor"
 
@@ -6221,198 +6291,205 @@ msgid "length %d is too large for hashing"
 msgstr "%d uzunluğu hash işlemi için çok uzun"
 
 #: src/main/unique.c:490 src/main/unique.c:519 src/main/unique.c:549
-#: src/main/unique.c:575 src/main/unique.c:614
+#: src/main/unique.c:573 src/main/unique.c:612
 msgid "'duplicated' applies only to vectors"
 msgstr "'duplicated' sadece vektörler için geçerlidir"
 
-#: src/main/unique.c:619
+#: src/main/unique.c:617
 msgid "any_duplicated3(., <0-length incomp>)"
 msgstr "any_duplicated3(., <0-length incomp>)"
 
-#: src/main/unique.c:669
+#: src/main/unique.c:667
 #, fuzzy
 msgid "'fromLast' must be length 1"
 msgstr "'%s' 1 uzunluğunda olmalıdır"
 
-#: src/main/unique.c:672
+#: src/main/unique.c:670
 #, fuzzy
 msgid "'fromLast' must be TRUE or FALSE"
 msgstr "'resize' DOĞRU yada YANLIŞ olmalı"
 
-#: src/main/unique.c:683
+#: src/main/unique.c:681
 #, c-format
 msgid "%s() applies only to vectors"
 msgstr "%s() sadece vektörler için geçerlidir"
 
-#: src/main/unique.c:690
+#: src/main/unique.c:688
 #, fuzzy
 msgid "'nmax' must be positive"
 msgstr "'value' pozitif bir değer olmalı"
 
-#: src/main/unique.c:922
+#: src/main/unique.c:985
 msgid "'match' requires vector arguments"
 msgstr "'match' vektör argüman gerektirir"
 
-#: src/main/unique.c:970 src/main/unique.c:1125
+#: src/main/unique.c:1033 src/main/unique.c:1171
 #, fuzzy
 msgid "argument is not of mode character"
 msgstr "argüman mod karakterinin değil "
 
-#: src/main/unique.c:1251
+#: src/main/unique.c:1296
 #, fuzzy
 msgid "... used in a situation where it does not exist"
 msgstr "... var olmayan bir durumda kullanıldı"
 
-#: src/main/unique.c:1342
-msgid "unable to find a closure from within which 'match.call' was called"
-msgstr "'match.call' 'un çağırıldığı yerde bir kapama bulunamadı"
+#: src/main/unique.c:1302
+#, fuzzy
+msgid "... is not a pairlist"
+msgstr "'...' içindeki değer bir promise değil"
 
-#: src/main/unique.c:1536
+#: src/main/unique.c:1531
 msgid "non-numeric data frame in rowsum"
 msgstr "rowsum içinde sayısal olmayan veri çerçevesi"
 
-#: src/main/unique.c:1568
+#: src/main/unique.c:1563
 msgid "this cannot happen"
 msgstr "gerçekleştirilemez"
 
-#: src/main/unique.c:1639
+#: src/main/unique.c:1634
 msgid "'names' must be a character vector"
 msgstr "'names' bir karakter vektörü olmalı"
 
-#: src/main/unique.c:1643
-msgid "'sep' must be a character string"
-msgstr "'sep' bir karakter dizesi olmalı"
-
-#: src/main/util.c:88 src/main/util.c:106
+#: src/main/util.c:87 src/main/util.c:105
 msgid "object is not a matrix"
 msgstr "nesne bir matris değil"
 
-#: src/main/util.c:254 src/main/util.c:268 src/main/util.c:285
+#: src/main/util.c:303 src/main/util.c:315 src/main/util.c:326
+#: src/main/util.c:341
 #, c-format
 msgid "type %d is unimplemented in '%s'"
 msgstr "%d tipi '%s' içinde tanımlanmış değil"
 
-#: src/main/util.c:297
+#: src/main/util.c:352
 #, c-format
 msgid "unimplemented type '%s' in '%s'\n"
 msgstr "tanımlanmamış tip '%s', '%s' içinde\n"
 
-#: src/main/util.c:299
+#: src/main/util.c:354
 #, c-format
 msgid "unimplemented type (%d) in '%s'\n"
 msgstr "tanımlanmamış tip (%d), '%s' içinde\n"
 
-#: src/main/util.c:424
+#: src/main/util.c:479
 msgid "invalid tag in name extraction"
 msgstr "isim açılışında geçersiz etiket"
 
-#: src/main/util.c:434
+#: src/main/util.c:489
 #, c-format
 msgid "%d argument passed to .Internal(%s) which requires %d"
 msgid_plural "%d arguments passed to .Internal(%s) which requires %d"
 msgstr[0] ""
 
-#: src/main/util.c:440
+#: src/main/util.c:495
 #, c-format
 msgid "%d argument passed to '%s' which requires %d"
 msgid_plural "%d arguments passed to '%s' which requires %d"
 msgstr[0] ""
 
-#: src/main/util.c:455
+#: src/main/util.c:510
 #, c-format
 msgid "supplied argument name '%s' does not match '%s'"
 msgstr "verilen argüman ismi '%s' '%s' ile eşleşmiyor"
 
-#: src/main/util.c:465
+#: src/main/util.c:520
 #, c-format
 msgid "'nthcdr' list shorter than %d"
 msgstr "'nthcdr' listesi %d'den kısa"
 
-#: src/main/util.c:470
+#: src/main/util.c:525
 msgid "'nthcdr' needs a list to CDR down"
 msgstr "'ntchdr' CDR down işlemi için bir listeye ihtiyaç duyar"
 
-#: src/main/util.c:586
+#: src/main/util.c:641
 msgid "'all.x' must be TRUE or FALSE"
 msgstr "'all.x' TRUE veya FALSE olmalı"
 
-#: src/main/util.c:588
+#: src/main/util.c:643
 msgid "'all.y' must be TRUE or FALSE"
 msgstr "'all.y' TRUE veya FALSE olmalı"
 
-#: src/main/util.c:700
+#: src/main/util.c:672
+msgid "number of rows in the result exceeds maximum vector length"
+msgstr ""
+
+#: src/main/util.c:764
 msgid "missing value is invalid"
 msgstr "eksik değer geçersiz"
 
-#: src/main/util.c:709 src/main/util.c:716
+#: src/main/util.c:773 src/main/util.c:780
 msgid "cannot change working directory"
 msgstr "çalışma dizini değiştirilemiyor"
 
-#: src/main/util.c:735 src/main/util.c:769 src/main/util.c:810
-#: src/main/util.c:852 src/main/util.c:981 src/main/util.c:1040
-#: src/main/util.c:1063
+#: src/main/util.c:800 src/main/util.c:834 src/main/util.c:875
+#: src/main/util.c:917 src/main/util.c:1046 src/main/util.c:1105
+#: src/main/util.c:1128
 msgid "a character vector argument expected"
 msgstr "bir karakter vektörü argümanı beklendi"
 
-#: src/main/util.c:742 src/main/util.c:777 src/main/util.c:819
-#: src/main/util.c:860
+#: src/main/util.c:807 src/main/util.c:842 src/main/util.c:884
+#: src/main/util.c:925
 msgid "path too long"
 msgstr "dosya yolu çok uzun"
 
-#: src/main/util.c:995
+#: src/main/util.c:1060
 msgid "only the first character of 'quote' will be used"
 msgstr "'quote' un sadece ilk karakteri kullanılacak"
 
-#: src/main/util.c:1065
+#: src/main/util.c:1130
 msgid "a character vector 'value' expected"
 msgstr "bir karakter"
 
-#: src/main/util.c:1068
+#: src/main/util.c:1133
 msgid "'value' must be of positive length"
 msgstr "'value' pozitif bir değer olmalı"
 
-#: src/main/util.c:1197 src/main/util.c:1205
+#: src/main/util.c:1262 src/main/util.c:1270
 #, c-format
 msgid "invalid input '%s' in 'utf8towcs'"
 msgstr "'%s' girişi geçersiz ('utf8towscs' içinde)"
 
-#: src/main/util.c:1290
+#: src/main/util.c:1355
 #, c-format
 msgid "invalid multibyte string at '%s'"
 msgstr "'%s' içinde geçersiz çokbaytlı dize"
 
-#: src/main/util.c:1399
+#: src/main/util.c:1497
 msgid "error message truncated to 255 chars"
 msgstr "hata mesajı 255 karaktere indirildi"
 
-#: src/main/util.c:1412
+#: src/main/util.c:1510
 msgid "warning message truncated to 255 chars"
 msgstr "uyarı mesajı 255 karaktere indirgendi"
 
-#: src/main/util.c:1819
+#: src/main/util.c:1659
+#, c-format
+msgid "accuracy loss in conversion from \"%s\" to numeric"
+msgstr ""
+
+#: src/main/util.c:1969
 #, fuzzy
 msgid "all arguments must be named"
 msgstr "nitelikler isimlendirilmelidir"
 
-#: src/main/util.c:1893
+#: src/main/util.c:2091
 msgid "ICU is not supported on this build"
 msgstr "bu derlemede ICU desteklenmiyor"
 
-#: src/main/util.c:1954
+#: src/main/util.c:2158
 #, fuzzy
 msgid "'breaks' is not sorted"
 msgstr "tip '%s' desteklenmiyor"
 
-#: src/main/util.c:1988 src/main/util.c:2034
+#: src/main/util.c:2192 src/main/util.c:2242
 #, fuzzy, c-format
 msgid "long vector '%s' is not supported"
 msgstr "tip '%s' desteklenmiyor"
 
-#: src/main/util.c:2087
+#: src/main/util.c:2296
 msgid "'eps.correct' must be 0, 1, or 2"
 msgstr ""
 
-#: src/main/util.c:2115
+#: src/main/util.c:2324
 #, fuzzy
 msgid "'x' must be a vector"
 msgstr "'x' bir karakter vektörü olmalı"
@@ -6453,14 +6530,6 @@ msgstr ""
 "R'den çıkmak için 'q()' girin.\n"
 "\n"
 
-#: src/main/vfonts.c:50
-msgid "vfont routines cannot be accessed in module"
-msgstr "vfont rutinlerine modül içinden erişilemez"
-
-#: src/main/vfonts.c:67 src/main/vfonts.c:80 src/main/vfonts.c:98
-msgid "Hershey fonts cannot be loaded"
-msgstr "Hershey yazıtipleri yüklenemedi"
-
 #: src/main/xspline.c:60
 #, c-format
 msgid "add_point - reached MAXNUMPTS (%d)"
@@ -6484,7 +6553,7 @@ msgstr "En az dört kontrol noktası olmalıdır"
 msgid "There must be at least three control points"
 msgstr "En az üç kontrol noktası olmaldırı"
 
-#: src/modules/X11/dataentry.c:1871 src/modules/X11/devX11.c:1246
+#: src/modules/X11/dataentry.c:1874 src/modules/X11/devX11.c:1248
 #, c-format
 msgid "X11 protocol error: %s"
 msgstr "X11 protokol hatası: %s"
@@ -6509,7 +6578,7 @@ msgstr ""
 "Hata: X11 ek grafik renklerini yerleştiremiyor.\n"
 "X11'i colortype=\"pseudo.cube\" veya \"gray\" ile kullanmayı deneyin."
 
-#: src/modules/X11/devX11.c:1027
+#: src/modules/X11/devX11.c:1029
 msgid ""
 "could not find any X11 fonts\n"
 "Check that the Font Path is correct."
@@ -6517,17 +6586,17 @@ msgstr ""
 "herhangi bir X11 yazıtipi bulunamadı\n"
 "Yazıtipi Dizininin doğru olduğunu kontrol edin."
 
-#: src/modules/X11/devX11.c:1087
+#: src/modules/X11/devX11.c:1089
 #, c-format
 msgid "X11 used font size %d when %d was requested"
 msgstr "X11 yazıtipi boyutunu %d olarak kullandı (%d istenmişti)"
 
-#: src/modules/X11/devX11.c:1121
+#: src/modules/X11/devX11.c:1123
 #, c-format
 msgid "X11 font %s, face %d at size %d could not be loaded"
 msgstr "X11 yazıtipi %s, yüz %d (boyut %d) yüklenemedi"
 
-#: src/modules/X11/devX11.c:1130
+#: src/modules/X11/devX11.c:1132
 msgid ""
 "semi-transparency is not supported on this device: reported only once per "
 "page"
@@ -6535,12 +6604,12 @@ msgstr ""
 "yarı-şeffaflık bu aygıtta desteklenmiyor: sayfa başına yalnızca bir kez "
 "rapor edidi"
 
-#: src/modules/X11/devX11.c:1254
+#: src/modules/X11/devX11.c:1256
 #, c-format
 msgid "X11 I/O error while opening X11 connection to '%s'"
 msgstr "'%s' e X11 bağlantısı açılırken Girdi/Çıktı hatası oluştu"
 
-#: src/modules/X11/devX11.c:1272
+#: src/modules/X11/devX11.c:1273
 msgid "X11 fatal IO error: please save work and shut down R"
 msgstr "X11 GÇ hatası: lütfen çalışmanızı kaydedip R'yi kapatın"
 
@@ -6664,206 +6733,271 @@ msgstr "XImage oluşturulamadı"
 msgid "attempt to use the locator after dev.hold()"
 msgstr ""
 
-#: src/modules/X11/devX11.c:3111
+#: src/modules/X11/devX11.c:3117
 #, c-format
 msgid "unable to start device %s"
 msgstr "%s aygıtı başlatılamadı"
 
-#: src/modules/X11/devX11.c:3138
+#: src/modules/X11/devX11.c:3144
 msgid "invalid 'width' or 'height'"
 msgstr "geçersiz 'width' veya 'height'"
 
-#: src/modules/X11/devX11.c:3145
+#: src/modules/X11/devX11.c:3151
 msgid "invalid colortype passed to X11 driver"
 msgstr "X11 sürücüsüne geçersiz renk biçimi iletildi"
 
-#: src/modules/X11/devX11.c:3159
+#: src/modules/X11/devX11.c:3165
 msgid "unknown X11 color/colour model -- using monochrome"
 msgstr "bilinmeyen X11 renk modeli -- siyah-beyaz kullanılıyor"
 
-#: src/modules/X11/devX11.c:3249
+#: src/modules/X11/devX11.c:3255
 msgid "no plot on device to save"
 msgstr "kaydedilecek çizim aygıtı yok"
 
-#: src/modules/X11/devX11.c:3251
+#: src/modules/X11/devX11.c:3257
 msgid "not an open X11cairo device"
 msgstr "bir açık X11cairo aygıtı değil"
 
-#: src/modules/X11/devX11.c:3260
+#: src/modules/X11/devX11.c:3266
 #, c-format
 msgid "cannot open file '%s'"
 msgstr "'%s' dosyası açılamıyor"
 
-#: src/modules/X11/devX11.c:3277
+#: src/modules/X11/devX11.c:3283
 msgid "savePlot() is not supported on this build"
 msgstr "savePlot() bu derlemede desteklenmiyor"
 
-#: src/modules/X11/devX11.c:3317
+#: src/modules/X11/devX11.c:3323
 msgid "unable to contact X11 display"
 msgstr "X11 ekranıyla iletişim kurulamadı"
 
-#: src/modules/X11/devX11.c:3366
+#: src/modules/X11/devX11.c:3372
 #, c-format
 msgid "clipboard cannot be read (error code %d)"
 msgstr "pano okunamadı (hata kodu %d)"
 
-#: src/modules/X11/devX11.c:3397
+#: src/modules/X11/devX11.c:3408
 msgid "cannot allocate memory for X11Routines structure"
 msgstr "X11Routines yapısı için bellek ayrılamadı"
 
-#: src/modules/internet/internet.c:188 src/modules/internet/internet.c:192
-#: src/modules/internet/internet.c:198 src/modules/internet/internet.c:210
+#: src/modules/internet/internet.c:113
+msgid "for https:// URLs use method = \"wininet\""
+msgstr ""
+
+#: src/modules/internet/internet.c:153 src/modules/internet/internet.c:274
+#: src/modules/internet/internet.c:758
+#, fuzzy, c-format
+msgid "scheme not supported in URL '%s'"
+msgstr "'eval' de yeniden başlatma desteklenmiyor"
+
+#: src/modules/internet/internet.c:348 src/modules/internet/internet.c:352
+#: src/modules/internet/internet.c:357 src/modules/internet/internet.c:381
+#: src/modules/internet/libcurl.c:791 src/modules/internet/libcurl.c:795
+#: src/modules/internet/libcurl.c:801 src/modules/internet/libcurl.c:814
+#: src/modules/internet/libcurl.c:822
 msgid "allocation of url connection failed"
 msgstr "url bağlantısı yerleştirmesinde hata"
 
-#: src/modules/internet/internet.c:286
+#: src/modules/internet/internet.c:455
 msgid "only first element of 'url' argument used"
 msgstr "'url' argümanının sadece ilk öğesi kullanıldı"
 
-#: src/modules/internet/internet.c:292
+#: src/modules/internet/internet.c:461
 msgid "only first element of 'destfile' argument used"
 msgstr "'destfile' argümanının sadece ilk öğesi kullanıldı"
 
-#: src/modules/internet/internet.c:317
+#: src/modules/internet/internet.c:480 src/modules/internet/libcurl.c:499
 msgid "Download progress"
 msgstr "İndirme durumu"
 
-#: src/modules/internet/internet.c:339
+#: src/modules/internet/internet.c:502
 #, c-format
 msgid "cannot open URL '%s', reason '%s'"
 msgstr "'%s' adresi açılamıyor, sebep:'%s'"
 
-#: src/modules/internet/internet.c:346 src/modules/internet/internet.c:372
-#: src/modules/internet/internet.c:474
+#: src/modules/internet/internet.c:509 src/modules/internet/internet.c:536
+#: src/modules/internet/internet.c:661
 #, c-format
 msgid "cannot open destfile '%s', reason '%s'"
 msgstr "hedefdosya '%s' açılamıyor, sebep: '%s'"
 
-#: src/modules/internet/internet.c:377 src/modules/internet/internet.c:479
+#: src/modules/internet/internet.c:541 src/modules/internet/internet.c:666
+#: src/modules/internet/libcurl.c:530
 #, c-format
 msgid "trying URL '%s'\n"
 msgstr "URL '%s' deneniyor\n"
 
-#: src/modules/internet/internet.c:384 src/modules/internet/internet.c:486
-msgid "opened URL\n"
-msgstr "URL açıldı\n"
-
-#: src/modules/internet/internet.c:455 src/modules/internet/internet.c:560
-#, c-format
-msgid "downloaded length %d != reported length %d"
+#: src/modules/internet/internet.c:640 src/modules/internet/internet.c:751
+#: src/modules/internet/libcurl.c:578
+#, fuzzy, c-format
+msgid "downloaded length %0.f != reported length %0.f"
 msgstr "indirme uzunluğu %d belirtilen uzunluk %d'e eşit değil"
 
-#: src/modules/internet/internet.c:460 src/modules/internet/internet.c:565
+#: src/modules/internet/internet.c:645 src/modules/internet/internet.c:756
 #, c-format
 msgid "cannot open URL '%s'"
 msgstr "URL '%s' açılamıyor"
 
-#: src/modules/internet/internet.c:593 src/modules/internet/internet.c:828
-#, c-format
-msgid "cannot open: HTTP status was '%d %s'"
+#: src/modules/internet/internet.c:779 src/modules/internet/internet.c:944
+#, fuzzy, c-format
+msgid "cannot open URL '%s': HTTP status was '%d %s'"
 msgstr "açılamadı: HTTP durumu '%d %s'"
 
-#: src/modules/internet/internet.c:772 src/modules/internet/internet.c:935
-msgid "InternetOpenUrl timed out"
-msgstr "InternetOpenUrl zamanaşımına uğradı"
-
-#: src/modules/internet/internet.c:799 src/modules/internet/internet.c:813
-#: src/modules/internet/internet.c:957 src/modules/internet/internet.c:966
+#: src/modules/internet/internet.c:915 src/modules/internet/internet.c:929
+#: src/modules/internet/internet.c:1019 src/modules/internet/internet.c:1028
 #, c-format
 msgid "InternetOpenUrl failed: '%s'"
 msgstr "InternetOpenUrl başarısız: '%s'"
 
-#: src/modules/internet/internet.c:870
-msgid "Internet read timed out"
-msgstr "İnternetten okuma zaman aşımına uğradı"
+#: src/modules/internet/libcurl.c:159
+#, fuzzy, c-format
+msgid "URL '%s': status was '%d %s'"
+msgstr "açılamadı: HTTP durumu '%d %s'"
+
+#: src/modules/internet/libcurl.c:163
+#, c-format
+msgid "URL '%s': status was '%s'"
+msgstr ""
 
-#: src/modules/internet/nanoftp.c:288 src/modules/internet/nanoftp.c:301
-#: src/modules/internet/nanoftp.c:312 src/modules/internet/nanoftp.c:346
-#: src/modules/internet/nanoftp.c:356
+#: src/modules/internet/libcurl.c:240
+#, fuzzy
+msgid "curlGetHeaders is not supported on this platform"
+msgstr "nsl() bu platformda desteklenmiyor"
+
+#: src/modules/internet/libcurl.c:249 src/modules/internet/libcurl.c:252
+#, fuzzy, c-format
+msgid "invalid %s argument"
+msgstr "hatalı '%s' argümanı"
+
+#: src/modules/internet/libcurl.c:269
+#, c-format
+msgid ""
+"libcurl error code %d\n"
+"\t%s\n"
+msgstr ""
+
+#: src/modules/internet/libcurl.c:404
+#, fuzzy
+msgid "download.file(method = \"libcurl\") is not supported on this platform"
+msgstr "nsl() bu platformda desteklenmiyor"
+
+#: src/modules/internet/libcurl.c:420
+#, fuzzy
+msgid "lengths of 'url' and 'destfile' must match"
+msgstr "içe ve dışa aktarma isimleri uzunlukları eşit olmalıdır"
+
+#: src/modules/internet/libcurl.c:481
+#, fuzzy, c-format
+msgid "URL %s: cannot open destfile '%s', reason '%s'"
+msgstr "hedefdosya '%s' açılamıyor, sebep: '%s'"
+
+#: src/modules/internet/libcurl.c:593
+#, fuzzy
+msgid "cannot download all files"
+msgstr "'%s' dosyası açılamıyor"
+
+#: src/modules/internet/libcurl.c:727
+#, fuzzy
+msgid "cannot read from connection"
+msgstr "bu bağlantıdan okunamıyor"
+
+#: src/modules/internet/libcurl.c:763
+#, fuzzy
+msgid "cannot open connection"
+msgstr "bağlantı açılamadı"
+
+#: src/modules/internet/libcurl.c:826
+#, fuzzy
+msgid "url(method = \"libcurl\") is not supported on this platform"
+msgstr "nsl() bu platformda desteklenmiyor"
+
+#: src/modules/internet/nanoftp.c:289 src/modules/internet/nanoftp.c:302
+#: src/modules/internet/nanoftp.c:313 src/modules/internet/nanoftp.c:347
+#: src/modules/internet/nanoftp.c:357
 msgid "RxmlNanoFTPScanURL: overlong (invalid?) URL"
 msgstr "RxmlNanoFTPScanURL: çok uzun (geçersiz?) URL"
 
-#: src/modules/internet/nanoftp.c:389
+#: src/modules/internet/nanoftp.c:390
 msgid "removing FTP proxy info"
 msgstr "FTP vekil sunucu bilgisi kaldırılıyor"
 
-#: src/modules/internet/nanoftp.c:391
+#: src/modules/internet/nanoftp.c:392
 #, c-format
 msgid "using FTP proxy '%s'"
 msgstr "FTP vekil sunucusu kullanılıyor '%s'"
 
-#: src/modules/internet/nanoftp.c:402 src/modules/internet/nanoftp.c:431
+#: src/modules/internet/nanoftp.c:403 src/modules/internet/nanoftp.c:432
 msgid "RxmlNanoFTPScanProxy: overlong (invalid?) URL"
 msgstr "RxmlNanoFTPScanProxy: çok uzun (geçersiz?) URL"
 
-#: src/modules/internet/nanoftp.c:830
+#: src/modules/internet/nanoftp.c:833
 msgid "cannot resolve host"
 msgstr "sunucu ismi çözümlenemedi"
 
-#: src/modules/internet/nanoftp.c:860
+#: src/modules/internet/nanoftp.c:863
 msgid "failed to connect to server"
 msgstr "sunucuya bağlanma başarısız"
 
-#: src/modules/internet/nanoftp.c:871
+#: src/modules/internet/nanoftp.c:874
 msgid "failed to get response from server"
 msgstr "sunucundan cevap alma başarısız"
 
-#: src/modules/internet/nanoftp.c:1134
+#: src/modules/internet/nanoftp.c:1137
 msgid "RxmlNanoFTPGetConnection: failed to create socket"
 msgstr "RxmlNanoFTPGetConnection: soket oluşturma başarısız"
 
-#: src/modules/internet/nanoftp.c:1180
+#: src/modules/internet/nanoftp.c:1183
 msgid "failed to create a data connection"
 msgstr "veri bağlantısı oluşturma başarısız"
 
-#: src/modules/internet/nanoftp.c:1188
+#: src/modules/internet/nanoftp.c:1191
 msgid "failed to bind a port"
 msgstr "port'a bağlanma başarısız"
 
-#: src/modules/internet/nanoftp.c:1195
+#: src/modules/internet/nanoftp.c:1198
 #, c-format
 msgid "could not listen on port %d"
 msgstr "%d .porttan dinleme yapılamıyor"
 
-#: src/modules/internet/nanohttp.c:370 src/modules/internet/nanohttp.c:398
-#: src/modules/internet/nanohttp.c:407
+#: src/modules/internet/nanohttp.c:369 src/modules/internet/nanohttp.c:400
+#: src/modules/internet/nanohttp.c:412
 msgid "RxmlNanoHTTPScanURL: overlong (invalid?) URL"
 msgstr "RxmlNanoHTTPScanURL: çok uzun (geçersiz?) URL"
 
-#: src/modules/internet/nanohttp.c:441
+#: src/modules/internet/nanohttp.c:446
 msgid "removing HTTP proxy info"
 msgstr "HTTP vekil sunucu bilgisi kaldırılıyor"
 
-#: src/modules/internet/nanohttp.c:443
+#: src/modules/internet/nanohttp.c:448
 #, c-format
 msgid "using HTTP proxy '%s'"
 msgstr "HTTP vekil sunucu kullanılıyor '%s'"
 
-#: src/modules/internet/nanohttp.c:454 src/modules/internet/nanohttp.c:490
+#: src/modules/internet/nanohttp.c:459 src/modules/internet/nanohttp.c:497
 msgid "RxmlNanoHTTPScanProxy: overlong (invalid?) URL"
 msgstr "RxmlNanoHTTPScanProxy: çok uzun (geçersiz?) URL"
 
-#: src/modules/internet/nanohttp.c:1107
+#: src/modules/internet/nanohttp.c:1135
 #, c-format
 msgid "unable to resolve '%s'"
 msgstr "'%s' çözümlenemedi"
 
-#: src/modules/internet/nanohttp.c:1134
+#: src/modules/internet/nanohttp.c:1168
 #, c-format
 msgid "connected to '%s' on port %d."
 msgstr "'%s' adresine %d numaralı porttan bağlanıldı"
 
-#: src/modules/internet/nanohttp.c:1139
+#: src/modules/internet/nanohttp.c:1173
 #, c-format
 msgid "unable to connect to '%s' on port %d."
 msgstr "'%s' adresine %d numaralı porttan bağlanılamadı"
 
-#: src/modules/internet/nanohttp.c:1443
+#: src/modules/internet/nanohttp.c:1477
 #, c-format
 msgid "redirect to: '%s'"
 msgstr "yönlendiriliyor: '%s'"
 
-#: src/modules/internet/nanohttp.c:1454
+#: src/modules/internet/nanohttp.c:1488
 msgid "too many redirects, aborting ..."
 msgstr "çok fazla yönlendirme, iptal ediliyor ..."
 
@@ -6898,11 +7032,11 @@ msgstr "argument type[1]='%s' '1','O', or 'I' seçeneklerinden biri olmalı"
 #: src/modules/lapack/Lapack.c:730 src/modules/lapack/Lapack.c:779
 #: src/modules/lapack/Lapack.c:786 src/modules/lapack/Lapack.c:834
 #: src/modules/lapack/Lapack.c:840 src/modules/lapack/Lapack.c:894
-#: src/modules/lapack/Lapack.c:900 src/modules/lapack/Lapack.c:1134
-#: src/modules/lapack/Lapack.c:1140 src/modules/lapack/Lapack.c:1188
-#: src/modules/lapack/Lapack.c:1195 src/modules/lapack/Lapack.c:1199
-#: src/modules/lapack/Lapack.c:1227 src/modules/lapack/Lapack.c:1234
-#: src/modules/lapack/Lapack.c:1254
+#: src/modules/lapack/Lapack.c:900 src/modules/lapack/Lapack.c:1135
+#: src/modules/lapack/Lapack.c:1141 src/modules/lapack/Lapack.c:1189
+#: src/modules/lapack/Lapack.c:1196 src/modules/lapack/Lapack.c:1200
+#: src/modules/lapack/Lapack.c:1228 src/modules/lapack/Lapack.c:1235
+#: src/modules/lapack/Lapack.c:1255
 #, c-format
 msgid "error code %d from Lapack routine '%s'"
 msgstr "hata kodu %d, Lapack rutini '%s' den"
@@ -6982,28 +7116,28 @@ msgstr "hata [%d] (Lapack 'ztrcon()' dan)"
 msgid "'a' must be a complex matrix"
 msgstr "'a' bir karmaşık matris olmalı"
 
-#: src/modules/lapack/Lapack.c:535 src/modules/lapack/Lapack.c:1042
+#: src/modules/lapack/Lapack.c:535 src/modules/lapack/Lapack.c:1043
 msgid "'a' is 0-diml"
 msgstr "'a' 0-boyutlu"
 
-#: src/modules/lapack/Lapack.c:537 src/modules/lapack/Lapack.c:1044
+#: src/modules/lapack/Lapack.c:537 src/modules/lapack/Lapack.c:1045
 #, c-format
 msgid "'a' (%d x %d) must be square"
 msgstr "'a' (%d x %d) kare olmalı"
 
-#: src/modules/lapack/Lapack.c:543 src/modules/lapack/Lapack.c:1050
+#: src/modules/lapack/Lapack.c:543 src/modules/lapack/Lapack.c:1051
 msgid "no right-hand side in 'b'"
 msgstr "'b' içinde sağ taraf yok"
 
 #: src/modules/lapack/Lapack.c:546 src/modules/lapack/Lapack.c:560
-#: src/modules/lapack/Lapack.c:1053 src/modules/lapack/Lapack.c:1069
+#: src/modules/lapack/Lapack.c:1054 src/modules/lapack/Lapack.c:1070
 #, c-format
 msgid "'b' (%d x %d) must be compatible with 'a' (%d x %d)"
 msgstr "'b' (%d x %d), 'a' (%d x %d) ile uyumlu olmalı"
 
 #: src/modules/lapack/Lapack.c:581 src/modules/lapack/Lapack.c:948
-#: src/modules/lapack/Lapack.c:962 src/modules/lapack/Lapack.c:1017
-#: src/modules/lapack/Lapack.c:1091
+#: src/modules/lapack/Lapack.c:962 src/modules/lapack/Lapack.c:1018
+#: src/modules/lapack/Lapack.c:1092
 #, c-format
 msgid "argument %d of Lapack routine %s had invalid value"
 msgstr "Lapacak rutininin %d inci argümanı geçersiz değere sahip %s"
@@ -7013,7 +7147,7 @@ msgid "'b' must be a complex matrix"
 msgstr "'b' bir karmaşık matris olmalı"
 
 #: src/modules/lapack/Lapack.c:670 src/modules/lapack/Lapack.c:716
-#: src/modules/lapack/Lapack.c:1181 src/modules/lapack/Lapack.c:1220
+#: src/modules/lapack/Lapack.c:1182 src/modules/lapack/Lapack.c:1221
 #, c-format
 msgid "right-hand side should have %d not %d rows"
 msgstr "sağ taraf %d sütuna sahip olmalı (%d değil)"
@@ -7032,13 +7166,13 @@ msgstr ""
 msgid "'x' must be a square complex matrix"
 msgstr "'x' bir sayısal kare matris olmalı"
 
-#: src/modules/lapack/Lapack.c:926 src/modules/lapack/Lapack.c:1000
-#: src/modules/lapack/Lapack.c:1039 src/modules/lapack/Lapack.c:1114
-#: src/modules/lapack/Lapack.c:1245
+#: src/modules/lapack/Lapack.c:926 src/modules/lapack/Lapack.c:1001
+#: src/modules/lapack/Lapack.c:1040 src/modules/lapack/Lapack.c:1115
+#: src/modules/lapack/Lapack.c:1246
 msgid "'a' must be a numeric matrix"
 msgstr "'a' bir sayısal matris olmalı"
 
-#: src/modules/lapack/Lapack.c:933 src/modules/lapack/Lapack.c:1250
+#: src/modules/lapack/Lapack.c:933 src/modules/lapack/Lapack.c:1251
 msgid "'a' must be a square matrix"
 msgstr "'a' bir kare matris olmalı"
 
@@ -7055,40 +7189,40 @@ msgstr "sıra %d in baş minörü pozitif "
 msgid "the matrix is either rank-deficient or indefinite"
 msgstr ""
 
-#: src/modules/lapack/Lapack.c:987
+#: src/modules/lapack/Lapack.c:988
 msgid "'size' argument must be a positive integer"
 msgstr "'size' argümanı bir pozitif tam sayı olmalı"
 
-#: src/modules/lapack/Lapack.c:1002
+#: src/modules/lapack/Lapack.c:1003
 #, c-format
 msgid "'size' cannot exceed ncol(x) = %d"
 msgstr "'size' ncol(x) = %d i geçemez"
 
-#: src/modules/lapack/Lapack.c:1003
+#: src/modules/lapack/Lapack.c:1004
 #, c-format
 msgid "'size' cannot exceed nrow(x) = %d"
 msgstr "'size' nrow(x) = %d i geçemez"
 
-#: src/modules/lapack/Lapack.c:1015
+#: src/modules/lapack/Lapack.c:1016
 #, c-format
 msgid "element (%d, %d) is zero, so the inverse cannot be computed"
 msgstr "öğe (%d, %d) sıfıra eşit, tersi hesaplanamaz"
 
-#: src/modules/lapack/Lapack.c:1094
+#: src/modules/lapack/Lapack.c:1095
 #, fuzzy, c-format
 msgid "Lapack routine %s: system is exactly singular: U[%d,%d] = 0"
 msgstr "Lapack rutini dgesv: sistem tam olarak tek"
 
-#: src/modules/lapack/Lapack.c:1102
+#: src/modules/lapack/Lapack.c:1103
 #, c-format
 msgid "system is computationally singular: reciprocal condition number = %g"
 msgstr "sistem sayısal olarak tek: karşılıklı koşul numarası = %g"
 
-#: src/modules/lapack/Lapack.c:1174 src/modules/lapack/Lapack.c:1212
+#: src/modules/lapack/Lapack.c:1175 src/modules/lapack/Lapack.c:1213
 msgid "'b' must be a numeric matrix"
 msgstr "'b' bir sayısal matris olmalı"
 
-#: src/modules/lapack/Lapack.c:1246
+#: src/modules/lapack/Lapack.c:1247
 msgid "argument 'logarithm' must be logical"
 msgstr "'logarithm' argümanı mantıksal olmalı"
 
@@ -7097,8 +7231,8 @@ msgid "bessel_i allocation error"
 msgstr "bessel_i bellek ayırma hatası"
 
 #: src/nmath/bessel_i.c:77 src/nmath/bessel_i.c:122
-#, c-format
-msgid "bessel_i(%g): ncalc (=%ld) != nb (=%ld); alpha=%g. Arg. out of range?\n"
+#, fuzzy, c-format
+msgid "bessel_i(%g): ncalc (=%d) != nb (=%d); alpha=%g. Arg. out of range?\n"
 msgstr ""
 "bessel_i(%g): ncalc (=%ld) != nb (=%ld); alpha=%g Argüman sınırlar dışında "
 "mı?\n"
@@ -7108,18 +7242,23 @@ msgstr ""
 msgid "bessel_i(%g,nu=%g): precision lost in result\n"
 msgstr "bessel_i(%g,nu=%g): sonuçta hassasiyet kayboldu\n"
 
-#: src/nmath/bessel_j.c:67
+#: src/nmath/bessel_j.c:64 src/nmath/bessel_j.c:118
+#, c-format
+msgid "besselJ(x, nu): nu=%g too large for bessel_j() algorithm"
+msgstr ""
+
+#: src/nmath/bessel_j.c:72
 msgid "bessel_j allocation error"
 msgstr "bessel_j bellek ayırma hatası"
 
-#: src/nmath/bessel_j.c:75 src/nmath/bessel_j.c:118
-#, c-format
-msgid "bessel_j(%g): ncalc (=%ld) != nb (=%ld); alpha=%g. Arg. out of range?\n"
+#: src/nmath/bessel_j.c:80 src/nmath/bessel_j.c:127
+#, fuzzy, c-format
+msgid "bessel_j(%g): ncalc (=%d) != nb (=%d); alpha=%g. Arg. out of range?\n"
 msgstr ""
 "bessel_j(%g): ncalc (=%ld) != nb (=%ld); alpha=%g.Argüman sınırlar dışında "
 "mı?\n"
 
-#: src/nmath/bessel_j.c:78 src/nmath/bessel_j.c:121
+#: src/nmath/bessel_j.c:83 src/nmath/bessel_j.c:130
 #, c-format
 msgid "bessel_j(%g,nu=%g): precision lost in result\n"
 msgstr "bessel_j(%g,nu=%g): sonuçta hassasiyet kayboldu\n"
@@ -7129,8 +7268,8 @@ msgid "bessel_k allocation error"
 msgstr "bessel_k bellek ayırma hatası"
 
 #: src/nmath/bessel_k.c:71 src/nmath/bessel_k.c:108
-#, c-format
-msgid "bessel_k(%g): ncalc (=%ld) != nb (=%ld); alpha=%g. Arg. out of range?\n"
+#, fuzzy, c-format
+msgid "bessel_k(%g): ncalc (=%d) != nb (=%d); alpha=%g. Arg. out of range?\n"
 msgstr ""
 "bessel_k(%g): ncalc (=%ld) != nb (=%ld); alpha=%g. Argüman sınırlar dışında "
 "mı?\n"
@@ -7140,18 +7279,23 @@ msgstr ""
 msgid "bessel_k(%g,nu=%g): precision lost in result\n"
 msgstr "bessel_k(%g,nu=%g): sonuçta hassasiyet kayboldu\n"
 
-#: src/nmath/bessel_y.c:66
+#: src/nmath/bessel_y.c:63 src/nmath/bessel_y.c:125
+#, c-format
+msgid "besselY(x, nu): nu=%g too large for bessel_y() algorithm"
+msgstr ""
+
+#: src/nmath/bessel_y.c:71
 msgid "bessel_y allocation error"
 msgstr "bessel_y bellek ayırma hatası"
 
-#: src/nmath/bessel_y.c:82 src/nmath/bessel_y.c:127
-#, c-format
-msgid "bessel_y(%g): ncalc (=%ld) != nb (=%ld); alpha=%g. Arg. out of range?\n"
+#: src/nmath/bessel_y.c:87 src/nmath/bessel_y.c:136
+#, fuzzy, c-format
+msgid "bessel_y(%g): ncalc (=%d) != nb (=%d); alpha=%g. Arg. out of range?\n"
 msgstr ""
 "bessel_y(%g): ncalc (=%ld) != nb (=%ld); alpha=%g. Argüman sınırlar dışında "
 "mı?\n"
 
-#: src/nmath/bessel_y.c:85 src/nmath/bessel_y.c:130
+#: src/nmath/bessel_y.c:90 src/nmath/bessel_y.c:139
 #, c-format
 msgid "bessel_y(%g,nu=%g): precision lost in result\n"
 msgstr "bessel_y(%g,nu=%g): sonuçta hassasiyet kayboldu\n"
@@ -7161,42 +7305,42 @@ msgstr "bessel_y(%g,nu=%g): sonuçta hassasiyet kayboldu\n"
 msgid "'k' (%.2f) must be integer, rounded to %.0f"
 msgstr ""
 
-#: src/nmath/nmath.h:141
+#: src/nmath/nmath.h:156
 #, c-format
 msgid "argument out of domain in '%s'\n"
 msgstr "'%s' içinde argüman bölge dışında\n"
 
-#: src/nmath/nmath.h:144
+#: src/nmath/nmath.h:159
 #, c-format
 msgid "value out of range in '%s'\n"
 msgstr "'%s' içinde değer sınırlar dışında\n"
 
-#: src/nmath/nmath.h:147
+#: src/nmath/nmath.h:162
 #, c-format
 msgid "convergence failed in '%s'\n"
 msgstr "'%s' içinde yakınsama başarısız\n"
 
-#: src/nmath/nmath.h:150
+#: src/nmath/nmath.h:165
 #, c-format
 msgid "full precision may not have been achieved in '%s'\n"
 msgstr "'%s' içinde tam hassasiyet başarılamamış olabilir\n"
 
-#: src/nmath/nmath.h:153
+#: src/nmath/nmath.h:168
 #, c-format
 msgid "underflow occurred in '%s'\n"
 msgstr "'%s' aşağı taşma oluştu\n"
 
-#: src/nmath/pbeta.c:48
+#: src/nmath/pbeta.c:64
 #, c-format
-msgid "pbeta_raw() -> bratio() gave error code %d"
+msgid "pbeta_raw(%g, a=%g, b=%g, ..) -> bratio() gave error code %d"
 msgstr ""
 
-#: src/nmath/pnbinom.c:79
+#: src/nmath/pnbinom.c:82
 #, c-format
 msgid "pnbinom_mu() -> bratio() gave error code %d"
 msgstr ""
 
-#: src/nmath/pnchisq.c:246
+#: src/nmath/pnchisq.c:295
 #, c-format
 msgid "pnchisq(x=%g, ..): not converged in %d iter."
 msgstr "pnchisq(x=%g, ..): %d iterasyon içinde  yakınsamadı"
@@ -7238,7 +7382,7 @@ msgstr "X11 rutinlerine modül içinden erişilemez"
 msgid "X11 module cannot be loaded"
 msgstr "X11 modülü yüklenemiyor"
 
-#: src/unix/X11.c:126 src/unix/X11.c:132 src/unix/X11.c:138 src/unix/X11.c:144
+#: src/unix/X11.c:144 src/unix/X11.c:150 src/unix/X11.c:156 src/unix/X11.c:162
 msgid "X11 is not available"
 msgstr "X11 mevcut değil"
 
@@ -7272,7 +7416,7 @@ msgstr ""
 "Açık ağır dinamik yükleme bu platformda desteklenmiyor. Varsayılan "
 "kullanılacak"
 
-#: src/unix/dynload.c:240
+#: src/unix/dynload.c:232
 msgid "cannot get working directory!"
 msgstr "çalışma dizini alınamıyor!"
 
@@ -7288,12 +7432,12 @@ msgstr ""
 "Okunan giriş yerleştirilirken olağandışı bir durum ortaya çıktı. Lütfen buf."
 "report() kullanarak rapor gönderin."
 
-#: src/unix/sys-std.c:1082 src/unix/sys-std.c:1249
+#: src/unix/sys-std.c:1085 src/unix/sys-std.c:1255
 #, c-format
 msgid "problem in saving the history file '%s'"
 msgstr "geçmiş dosyası '%s'i kaydederken hata"
 
-#: src/unix/sys-std.c:1156
+#: src/unix/sys-std.c:1162
 #, c-format
 msgid ""
 "Cannot open file '%s': %s\n"
@@ -7302,87 +7446,203 @@ msgstr ""
 "Dosya açılamıyor '%s': %s\n"
 "\n"
 
-#: src/unix/sys-std.c:1220 src/unix/sys-std.c:1243
+#: src/unix/sys-std.c:1226 src/unix/sys-std.c:1249
 msgid "'file' argument is too long"
 msgstr "'file' argüman çok uzun"
 
-#: src/unix/sys-std.c:1226 src/unix/sys-std.c:1228
+#: src/unix/sys-std.c:1232 src/unix/sys-std.c:1234
 msgid "no history mechanism available"
 msgstr "geçmiş mekanizma bulunmuyor"
 
-#: src/unix/sys-std.c:1255
+#: src/unix/sys-std.c:1261
 msgid "problem in truncating the history file"
 msgstr "geçmiş dosyası kırpılerken bir sorun oluştu"
 
-#: src/unix/sys-std.c:1257 src/unix/sys-std.c:1259
+#: src/unix/sys-std.c:1263 src/unix/sys-std.c:1265
 msgid "no history available to save"
 msgstr "kaydedilecek geçmiş yok"
 
-#: src/unix/sys-std.c:1271
+#: src/unix/sys-std.c:1277
 msgid "invalid timestamp"
 msgstr "geçersiz zaman aralığı"
 
-#: src/unix/sys-unix.c:251
+#: src/unix/sys-unix.c:248
 msgid "non-empty character argument expected"
 msgstr "boş olmayan karakter argümanı beklendi"
 
-#: src/unix/sys-unix.c:254
+#: src/unix/sys-unix.c:251
 msgid "'intern' must be logical and not NA"
 msgstr "'intern' NA olmamalı ve mantıksal olmalıdır"
 
-#: src/unix/sys-unix.c:266
+#: src/unix/sys-unix.c:269
 #, c-format
 msgid "cannot popen '%s', probable reason '%s'"
 msgstr "'%s' popen yapılamadı, muhtemel sebep: '%s'"
 
-#: src/unix/sys-unix.c:271
+#: src/unix/sys-unix.c:279
 #, c-format
 msgid "line %d may be truncated in call to system(, intern = TRUE)"
 msgstr "sisteme çağrıda dize %d kırpılabilir (, intern = TRUE)"
 
-#: src/unix/sys-unix.c:288
+#: src/unix/sys-unix.c:301
 #, c-format
 msgid "error in running command: '%s'"
 msgstr "komutu çalıştırırken hata: '%s'"
 
-#: src/unix/sys-unix.c:290
+#: src/unix/sys-unix.c:303
 msgid "error in running command"
 msgstr "komutu çalıştırırken hata"
 
-#: src/unix/sys-unix.c:294
+#: src/unix/sys-unix.c:307
 #, c-format
 msgid "running command '%s' had status %d and error message '%s'"
 msgstr ""
 "'%s' komutunu çalıştırırken %d durumuna geldi ve '%s' hata mesajı oluştu"
 
-#: src/unix/sys-unix.c:399
+#: src/unix/sys-unix.c:412
 msgid "Sys.info() is not implemented on this system"
 msgstr "Sys.info() bu sistemde tanımlanmamış"
 
-#: src/unix/system.c:257
+#: src/unix/system.c:267
 #, c-format
 msgid "WARNING: --gui or -g without value ignored"
 msgstr "UYARI: değersiz --gui veya -g  görmezden gelindi"
 
-#: src/unix/system.c:275
+#: src/unix/system.c:285
 #, c-format
 msgid "WARNING: unknown gui '%s', using X11\n"
 msgstr "UYARI: bilinmeyen grafiksel arabirim '%s', X11 kullanılıyor\n"
 
-#: src/unix/system.c:278
+#: src/unix/system.c:288
 #, c-format
 msgid "WARNING: unknown gui '%s', using none\n"
 msgstr ""
 "UYARI: bilinmeyen grafiksel arabirim '%s', grafiksel arabirim kullanılmıyor\n"
 
-#: src/unix/system.c:388
+#: src/unix/system.c:373
 msgid "creating temporary file for '-e' failed"
 msgstr "'-e' için geçici dosya oluşturması başarısız"
 
-#: src/unix/system.c:469
+#: src/unix/system.c:454
 msgid "WARNING: Only editing the first in the list of files"
 msgstr "UYARI: Dosya listesinde sadece ilk öğe düzenleniyor"
 
+#~ msgid "'what' must be a character string or a function"
+#~ msgstr "'what' bir karakter dizesi veya bir fonksiyon olmalıdır"
+
+#~ msgid "sockets are not available on this system"
+#~ msgstr "soketler bu sistemde mevcut değil"
+
+#~ msgid "no function to restart"
+#~ msgstr "yeniden başlatılacak fonksiyon yok"
+
+#~ msgid "argument must be a closure"
+#~ msgstr "argüman bir kapama olmalı"
+
+#~ msgid "'hostname' must be a character vector of length 1"
+#~ msgstr "'hostname' 1 birim uzunlukta bir karakter vektörü olmalı"
+
+#~ msgid "nsl() was unable to resolve host '%s'"
+#~ msgstr "nsl() '%s' sunucusunu çözümleyemedi"
+
+#, fuzzy
+#~ msgid "unknown format returned by C function 'gethostbyname'"
+#~ msgstr "gethostbyname'den döndürülen bilinmeyen biçim"
+
+#~ msgid "nsl() is not supported on this platform"
+#~ msgstr "nsl() bu platformda desteklenmiyor"
+
+#~ msgid "too large a range of values in 'x'"
+#~ msgstr "'x'de çok geniş değer aralığı"
+
+#~ msgid "non-numeric argument"
+#~ msgstr "sayısal olmayan argüman"
+
+#~ msgid "unsupported URL scheme"
+#~ msgstr "desteklenmeyen URL şeması"
+
+#~ msgid "'dimnames' must be a list"
+#~ msgstr "'dimnames' bir liste olmalıdır"
+
+#~ msgid "'args' must be a list"
+#~ msgstr "'args' bir liste olmalıdır"
+
+#~ msgid "binary operations require two arguments"
+#~ msgstr "binary işlemleri iki argüman gerektirir"
+
+#~ msgid "opened URL\n"
+#~ msgstr "URL açıldı\n"
+
+#~ msgid "internet routines were already initialized"
+#~ msgstr "internet rutinlerinleri zaten yüklenmişti"
+
+#~ msgid "'msg1' must be a character string"
+#~ msgstr "'msg1' bir karakter dizesi olmalıdır"
+
+#~ msgid "'msg2' must be a character string"
+#~ msgstr "'msg2' bir karakter dizesi olmalıdır"
+
+#~ msgid "argument 'code' must be a character string"
+#~ msgstr "'code' argümanı bir karakter dizesi olmalı"
+
+#, fuzzy
+#~ msgid "argument 'type' must be a character string"
+#~ msgstr "'code' argümanı bir karakter dizesi olmalı"
+
+#~ msgid "InternetOpenUrl timed out"
+#~ msgstr "InternetOpenUrl zamanaşımına uğradı"
+
+#~ msgid "Internet read timed out"
+#~ msgstr "İnternetten okuma zaman aşımına uğradı"
+
+#~ msgid "unable to find a closure from within which 'match.call' was called"
+#~ msgstr "'match.call' 'un çağırıldığı yerde bir kapama bulunamadı"
+
+#~ msgid "vfont routines cannot be accessed in module"
+#~ msgstr "vfont rutinlerine modül içinden erişilemez"
+
+#~ msgid "Hershey fonts cannot be loaded"
+#~ msgstr "Hershey yazıtipleri yüklenemedi"
+
+#, fuzzy
+#~ msgid "invalid generic function in 'usemethod'"
+#~ msgstr "'usemethod' içinde geçersiz genel fonksiyon kullanımı"
+
+#, fuzzy
+#~ msgid "'UseMethod' called from outside a function"
+#~ msgstr "'NextMethod' bir fonksiyon dışından çağırıldı"
+
+#~ msgid "first argument must be a generic name"
+#~ msgstr "ilk argüman genel bir isim olmalı"
+
+#~ msgid "character variables must be duplicated in .C/.Fortran"
+#~ msgstr "karakter değişkenler .C/.Fortran'da kopyalanmalıdır"
+
+#~ msgid "call name too long in '%s'"
+#~ msgstr "'%s' içinde çağrı ismi çok uzun"
+
+#~ msgid "generic name too long in '%s'"
+#~ msgstr "'%s' içinde genel isim çok uzun"
+
+#~ msgid "method name too long in '%s'"
+#~ msgstr "'%s' de metod ismi çok uzun"
+
+#~ msgid ""
+#~ "Warning in %s :\n"
+#~ "  %s\n"
+#~ msgstr ""
+#~ "%s'de uyarı :\n"
+#~ "  %s\n"
+
+#~ msgid "input"
+#~ msgstr "giriş"
+
+#~ msgid "symbol"
+#~ msgstr "sembol"
+
+#~ msgid "assignment"
+#~ msgstr "atama"
+
 #~ msgid "negative value in 'x'"
 #~ msgstr "'x' de negatif değer"
 
@@ -7479,9 +7739,6 @@ msgstr "UYARI: Dosya listesinde sadece ilk öğe düzenleniyor"
 #~ msgid "invalid return value count in call_R"
 #~ msgstr "call_R içinde geçersiz geri dönüş değeri sayısı"
 
-#~ msgid "internal error in unz code"
-#~ msgstr "unz kodunda iç hata"
-
 #, fuzzy
 #~ msgid "bad switch names"
 #~ msgstr "hatalı dosya ismi"
@@ -7653,15 +7910,9 @@ msgstr "UYARI: Dosya listesinde sadece ilk öğe düzenleniyor"
 #~ msgid "'title' must be a character string"
 #~ msgstr "'title' bir karakter dizesi olmalıdır"
 
-#~ msgid "'text' must be a character string"
-#~ msgstr "'text' bir karakter dizesi olmalıdır"
-
 #~ msgid "'%s' must be length 1"
 #~ msgstr "'%s' 1 uzunluğunda olmalıdır"
 
-#~ msgid "'%s' must be a list"
-#~ msgstr "'%s' bir liste olmalıdır"
-
 #~ msgid "'%s' element %d is not a window handle"
 #~ msgstr "'%s' öğesi %d bir pencere durumu değil"
 
@@ -7689,9 +7940,6 @@ msgstr "UYARI: Dosya listesinde sadece ilk öğe düzenleniyor"
 #~ msgid "'file' is not a connection"
 #~ msgstr "'file' bir bağlantı değil"
 
-#~ msgid "'dec' must be a single character"
-#~ msgstr "'dec' tek bir karakter olmalıdır"
-
 #~ msgid "corrupt data frame -- length of column %d does not not match nrows"
 #~ msgstr "bozuk veri çerçevesi -- kolon %d'in uzunluğu nrows'a uymuyor"
 
diff --git a/src/library/base/po/zh_CN.po b/src/library/base/po/zh_CN.po
index da3be20..556385f 100644
--- a/src/library/base/po/zh_CN.po
+++ b/src/library/base/po/zh_CN.po
@@ -6,12 +6,12 @@
 msgid ""
 msgstr ""
 "Project-Id-Version: R 2.1.0\n"
-"Report-Msgid-Bugs-To: bugs.r-project.org\n"
-"POT-Creation-Date: 2014-03-27 07:46+0000\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2016-04-01 10:28-0700\n"
 "PO-Revision-Date: 2005-05-20 18:26+0800\n"
 "Last-Translator: ronggui\n"
 "Language-Team: Chinese\n"
-"Language: \n"
+"Language: zh_CN\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
@@ -50,15 +50,15 @@ msgstr "无法用初始参数来评估函数"
 msgid "unknown type in \"CG\" method of 'optim'"
 msgstr "'optim'的\"CG\"方法中没有这一种类"
 
-#: src/appl/optim.c:665
+#: src/appl/optim.c:662
 msgid "REPORT must be > 0 (method = \"L-BFGS-B\")"
 msgstr "REPORT必需大于零 (method = \"L-BFGS-B\")"
 
-#: src/appl/optim.c:688
+#: src/appl/optim.c:685
 msgid "L-BFGS-B needs finite values of 'fn'"
 msgstr "L-BFGS-B不能有'fn'的无限值"
 
-#: src/appl/optim.c:744
+#: src/appl/optim.c:741
 msgid "trace, REPORT must be >= 0 (method = \"SANN\")"
 msgstr "迹,REPORT必需大于零 (method = \"SANN\")"
 
@@ -123,122 +123,127 @@ msgstr "不能存取'%ls'"
 msgid "problem in displaying '%ls'"
 msgstr "在显示'%ls'时出了问题"
 
-#: src/gnuwin32/extra.c:116 src/gnuwin32/extra.c:159 src/gnuwin32/extra.c:349
-#: src/gnuwin32/extra.c:577 src/gnuwin32/extra.c:602 src/main/agrep.c:131
-#: src/main/agrep.c:135 src/main/agrep.c:775 src/main/agrep.c:780
-#: src/main/apply.c:293 src/main/apply.c:295 src/main/apply.c:298
-#: src/main/array.c:87 src/main/array.c:1137 src/main/array.c:1263
-#: src/main/array.c:1265 src/main/array.c:1266 src/main/array.c:1592
-#: src/main/array.c:1594 src/main/array.c:1596 src/main/attrib.c:196
+#: src/gnuwin32/extra.c:116 src/gnuwin32/extra.c:158 src/gnuwin32/extra.c:348
+#: src/gnuwin32/extra.c:574 src/gnuwin32/extra.c:599 src/main/agrep.c:131
+#: src/main/agrep.c:135 src/main/agrep.c:776 src/main/agrep.c:781
+#: src/main/apply.c:330 src/main/apply.c:332 src/main/apply.c:335
+#: src/main/array.c:90 src/main/array.c:1272 src/main/array.c:1411
+#: src/main/array.c:1413 src/main/array.c:1414 src/main/array.c:1758
+#: src/main/array.c:1760 src/main/array.c:1762 src/main/attrib.c:190
 #: src/main/builtin.c:88 src/main/builtin.c:97 src/main/builtin.c:116
-#: src/main/builtin.c:118 src/main/builtin.c:147 src/main/builtin.c:534
-#: src/main/builtin.c:550 src/main/builtin.c:739 src/main/builtin.c:741
-#: src/main/builtin.c:743 src/main/character.c:139 src/main/character.c:142
-#: src/main/character.c:203 src/main/character.c:1037
-#: src/main/character.c:1041 src/main/character.c:1276
-#: src/main/character.c:1280 src/main/character.c:1341
-#: src/main/character.c:1344 src/main/connections.c:1217
-#: src/main/connections.c:1223 src/main/connections.c:1226
-#: src/main/connections.c:1230 src/main/connections.c:1375
-#: src/main/connections.c:1391 src/main/connections.c:1396
-#: src/main/connections.c:1996 src/main/connections.c:2002
-#: src/main/connections.c:2006 src/main/connections.c:2010
-#: src/main/connections.c:2015 src/main/connections.c:2665
-#: src/main/connections.c:2670 src/main/connections.c:2673
-#: src/main/connections.c:2676 src/main/connections.c:3057
-#: src/main/connections.c:3062 src/main/connections.c:3068
-#: src/main/connections.c:3071 src/main/connections.c:3075
-#: src/main/connections.c:3090 src/main/connections.c:3140
-#: src/main/connections.c:3145 src/main/connections.c:3149
-#: src/main/connections.c:3153 src/main/connections.c:3157
-#: src/main/connections.c:3163 src/main/connections.c:3210
-#: src/main/connections.c:3216 src/main/connections.c:3220
-#: src/main/connections.c:3270 src/main/connections.c:3273
-#: src/main/connections.c:3547 src/main/connections.c:3550
-#: src/main/connections.c:3553 src/main/connections.c:3559
-#: src/main/connections.c:3666 src/main/connections.c:3672
-#: src/main/connections.c:3675 src/main/connections.c:3826
-#: src/main/connections.c:3829 src/main/connections.c:3833
-#: src/main/connections.c:3836 src/main/connections.c:3956
-#: src/main/connections.c:4074 src/main/connections.c:4077
-#: src/main/connections.c:4414 src/main/connections.c:4439
-#: src/main/connections.c:4474 src/main/connections.c:4489
-#: src/main/connections.c:4497 src/main/connections.c:4523
-#: src/main/connections.c:4669 src/main/connections.c:4673
-#: src/main/connections.c:4801 src/main/connections.c:4803
-#: src/main/connections.c:4805 src/main/connections.c:4833
-#: src/main/connections.c:4965 src/main/connections.c:4991
-#: src/main/connections.c:4995 src/main/connections.c:4999
-#: src/main/connections.c:5003 src/main/context.c:596 src/main/context.c:605
-#: src/main/context.c:609 src/main/datetime.c:775 src/main/datetime.c:865
-#: src/main/datetime.c:867 src/main/datetime.c:871 src/main/datetime.c:1026
-#: src/main/datetime.c:1028 src/main/datetime.c:1232 src/main/debug.c:228
-#: src/main/deparse.c:397 src/main/dotcode.c:478 src/main/dotcode.c:482
-#: src/main/dotcode.c:487 src/main/dounzip.c:322 src/main/dounzip.c:329
-#: src/main/dounzip.c:339 src/main/dounzip.c:344 src/main/dounzip.c:348
-#: src/main/dounzip.c:352 src/main/envir.c:1618 src/main/envir.c:1621
-#: src/main/envir.c:1742 src/main/envir.c:1747 src/main/envir.c:1813
-#: src/main/envir.c:1829 src/main/envir.c:1835 src/main/envir.c:1932
-#: src/main/envir.c:1940 src/main/envir.c:1947 src/main/envir.c:1958
-#: src/main/envir.c:2172 src/main/envir.c:2293 src/main/envir.c:2552
-#: src/main/envir.c:2762 src/main/envir.c:2776 src/main/envir.c:2783
-#: src/main/envir.c:2799 src/main/envir.c:3367 src/main/errors.c:1030
-#: src/main/eval.c:397 src/main/eval.c:406 src/main/eval.c:409
-#: src/main/grep.c:767 src/main/grep.c:772 src/main/grep.c:1061
-#: src/main/grep.c:1063 src/main/grep.c:1065 src/main/grep.c:1510
-#: src/main/grep.c:1514 src/main/grep.c:1519 src/main/grep.c:2323
-#: src/main/grep.c:2328 src/main/grep.c:2621 src/main/grep.c:2626
-#: src/main/memory.c:3736 src/main/paste.c:96 src/main/paste.c:395
-#: src/main/paste.c:402 src/main/paste.c:409 src/main/paste.c:414
-#: src/main/paste.c:419 src/main/paste.c:424 src/main/paste.c:427
-#: src/main/paste.c:435 src/main/paste.c:601 src/main/paste.c:606
+#: src/main/builtin.c:118 src/main/builtin.c:149 src/main/builtin.c:569
+#: src/main/builtin.c:585 src/main/builtin.c:773 src/main/builtin.c:775
+#: src/main/builtin.c:777 src/main/character.c:239 src/main/character.c:242
+#: src/main/character.c:247 src/main/character.c:788 src/main/character.c:791
+#: src/main/character.c:1289 src/main/character.c:1293
+#: src/main/character.c:1528 src/main/character.c:1532
+#: src/main/character.c:1593 src/main/character.c:1596
+#: src/main/connections.c:1208 src/main/connections.c:1214
+#: src/main/connections.c:1217 src/main/connections.c:1221
+#: src/main/connections.c:1367 src/main/connections.c:1383
+#: src/main/connections.c:1388 src/main/connections.c:1989
+#: src/main/connections.c:1995 src/main/connections.c:1999
+#: src/main/connections.c:2003 src/main/connections.c:2008
+#: src/main/connections.c:2659 src/main/connections.c:2664
+#: src/main/connections.c:2667 src/main/connections.c:2670
+#: src/main/connections.c:3053 src/main/connections.c:3058
+#: src/main/connections.c:3064 src/main/connections.c:3067
+#: src/main/connections.c:3071 src/main/connections.c:3086
+#: src/main/connections.c:3135 src/main/connections.c:3140
+#: src/main/connections.c:3144 src/main/connections.c:3148
+#: src/main/connections.c:3152 src/main/connections.c:3158
+#: src/main/connections.c:3203 src/main/connections.c:3209
+#: src/main/connections.c:3213 src/main/connections.c:3264
+#: src/main/connections.c:3267 src/main/connections.c:3543
+#: src/main/connections.c:3546 src/main/connections.c:3549
+#: src/main/connections.c:3555 src/main/connections.c:3662
+#: src/main/connections.c:3668 src/main/connections.c:3671
+#: src/main/connections.c:3823 src/main/connections.c:3826
+#: src/main/connections.c:3830 src/main/connections.c:3833
+#: src/main/connections.c:3954 src/main/connections.c:4085
+#: src/main/connections.c:4088 src/main/connections.c:4425
+#: src/main/connections.c:4450 src/main/connections.c:4485
+#: src/main/connections.c:4500 src/main/connections.c:4508
+#: src/main/connections.c:4534 src/main/connections.c:4680
+#: src/main/connections.c:4684 src/main/connections.c:4814
+#: src/main/connections.c:4816 src/main/connections.c:4818
+#: src/main/connections.c:4846 src/main/connections.c:4980
+#: src/main/connections.c:5019 src/main/connections.c:5024
+#: src/main/connections.c:5029 src/main/connections.c:5050
+#: src/main/context.c:607 src/main/context.c:616 src/main/context.c:620
+#: src/main/datetime.c:781 src/main/datetime.c:869 src/main/datetime.c:872
+#: src/main/datetime.c:876 src/main/datetime.c:1043 src/main/datetime.c:1045
+#: src/main/datetime.c:1250 src/main/debug.c:245 src/main/deparse.c:408
+#: src/main/dotcode.c:496 src/main/dotcode.c:500 src/main/dotcode.c:505
+#: src/main/dounzip.c:323 src/main/dounzip.c:330 src/main/dounzip.c:340
+#: src/main/dounzip.c:345 src/main/dounzip.c:349 src/main/dounzip.c:353
+#: src/main/envir.c:1752 src/main/envir.c:1755 src/main/envir.c:1876
+#: src/main/envir.c:1881 src/main/envir.c:1945 src/main/envir.c:1961
+#: src/main/envir.c:1967 src/main/envir.c:2079 src/main/envir.c:2087
+#: src/main/envir.c:2094 src/main/envir.c:2105 src/main/envir.c:2337
+#: src/main/envir.c:2458 src/main/envir.c:2755 src/main/envir.c:3022
+#: src/main/envir.c:3036 src/main/envir.c:3043 src/main/envir.c:3059
+#: src/main/envir.c:3642 src/main/errors.c:1011 src/main/eval.c:454
+#: src/main/eval.c:463 src/main/eval.c:466 src/main/grep.c:780
+#: src/main/grep.c:785 src/main/grep.c:1079 src/main/grep.c:1081
+#: src/main/grep.c:1083 src/main/grep.c:1528 src/main/grep.c:1532
+#: src/main/grep.c:1537 src/main/grep.c:2345 src/main/grep.c:2350
+#: src/main/grep.c:2652 src/main/grep.c:2657 src/main/memory.c:3823
+#: src/main/paste.c:96 src/main/paste.c:392 src/main/paste.c:399
+#: src/main/paste.c:406 src/main/paste.c:411 src/main/paste.c:416
+#: src/main/paste.c:421 src/main/paste.c:424 src/main/paste.c:432
+#: src/main/paste.c:437 src/main/paste.c:619 src/main/paste.c:624
 #: src/main/platform.c:306 src/main/platform.c:308 src/main/platform.c:310
 #: src/main/platform.c:326 src/main/platform.c:337 src/main/platform.c:390
-#: src/main/platform.c:392 src/main/platform.c:705 src/main/platform.c:707
-#: src/main/platform.c:1064 src/main/platform.c:1070 src/main/platform.c:1073
-#: src/main/platform.c:1076 src/main/platform.c:1079 src/main/platform.c:1082
-#: src/main/platform.c:1085 src/main/platform.c:1088 src/main/platform.c:1185
-#: src/main/platform.c:1188 src/main/platform.c:1191 src/main/platform.c:1229
-#: src/main/platform.c:1286 src/main/platform.c:1289 src/main/platform.c:1498
-#: src/main/platform.c:1501 src/main/platform.c:1504 src/main/platform.c:1540
-#: src/main/platform.c:1543 src/main/platform.c:1546 src/main/platform.c:1629
-#: src/main/platform.c:1645 src/main/platform.c:1684 src/main/platform.c:1686
-#: src/main/platform.c:1757 src/main/platform.c:1841 src/main/platform.c:2116
-#: src/main/platform.c:2176 src/main/platform.c:2353 src/main/platform.c:2356
-#: src/main/platform.c:2359 src/main/platform.c:2362 src/main/platform.c:2365
-#: src/main/platform.c:2368 src/main/platform.c:2568 src/main/platform.c:2571
-#: src/main/platform.c:2574 src/main/platform.c:2577 src/main/platform.c:2580
-#: src/main/platform.c:2583 src/main/platform.c:2657 src/main/platform.c:2665
-#: src/main/platform.c:2701 src/main/platform.c:2751 src/main/print.c:242
-#: src/main/print.c:248 src/main/print.c:270 src/main/print.c:276
-#: src/main/print.c:283 src/main/random.c:478 src/main/random.c:482
-#: src/main/random.c:489 src/main/random.c:517 src/main/saveload.c:1950
-#: src/main/saveload.c:1953 src/main/saveload.c:1956 src/main/saveload.c:2072
-#: src/main/saveload.c:2252 src/main/saveload.c:2257 src/main/saveload.c:2260
+#: src/main/platform.c:392 src/main/platform.c:708 src/main/platform.c:710
+#: src/main/platform.c:800 src/main/platform.c:1138 src/main/platform.c:1144
+#: src/main/platform.c:1147 src/main/platform.c:1150 src/main/platform.c:1153
+#: src/main/platform.c:1156 src/main/platform.c:1159 src/main/platform.c:1162
+#: src/main/platform.c:1259 src/main/platform.c:1262 src/main/platform.c:1265
+#: src/main/platform.c:1303 src/main/platform.c:1361 src/main/platform.c:1364
+#: src/main/platform.c:1573 src/main/platform.c:1576 src/main/platform.c:1579
+#: src/main/platform.c:1615 src/main/platform.c:1618 src/main/platform.c:1621
+#: src/main/platform.c:1657 src/main/platform.c:1690 src/main/platform.c:1692
+#: src/main/platform.c:1763 src/main/platform.c:1848 src/main/platform.c:2089
+#: src/main/platform.c:2149 src/main/platform.c:2334 src/main/platform.c:2337
+#: src/main/platform.c:2340 src/main/platform.c:2343 src/main/platform.c:2346
+#: src/main/platform.c:2349 src/main/platform.c:2555 src/main/platform.c:2558
+#: src/main/platform.c:2561 src/main/platform.c:2564 src/main/platform.c:2567
+#: src/main/platform.c:2570 src/main/platform.c:2648 src/main/platform.c:2656
+#: src/main/platform.c:2692 src/main/platform.c:2742 src/main/print.c:235
+#: src/main/print.c:241 src/main/print.c:263 src/main/print.c:269
+#: src/main/print.c:276 src/main/random.c:470 src/main/random.c:474
+#: src/main/random.c:481 src/main/random.c:509 src/main/saveload.c:1952
+#: src/main/saveload.c:1955 src/main/saveload.c:1958 src/main/saveload.c:2074
+#: src/main/saveload.c:2254 src/main/saveload.c:2259 src/main/saveload.c:2262
 #: src/main/saveload.c:2366 src/main/scan.c:684 src/main/scan.c:853
 #: src/main/scan.c:867 src/main/scan.c:871 src/main/scan.c:873
 #: src/main/scan.c:884 src/main/scan.c:911 src/main/scan.c:914
-#: src/main/scan.c:917 src/main/scan.c:972 src/main/seq.c:618
-#: src/main/seq.c:623 src/main/seq.c:631 src/main/seq.c:662 src/main/seq.c:666
-#: src/main/seq.c:672 src/main/seq.c:680 src/main/sort.c:175
-#: src/main/sysutils.c:585 src/main/sysutils.c:589 src/main/sysutils.c:593
-#: src/main/sysutils.c:599 src/main/sysutils.c:603 src/main/sysutils.c:1831
-#: src/main/sysutils.c:1835 src/main/unique.c:966 src/main/unique.c:1289
-#: src/main/unique.c:1349 src/main/unique.c:1356 src/main/unique.c:1750
-#: src/main/util.c:581 src/main/util.c:584 src/main/util.c:1825
-#: src/main/util.c:1994 src/main/util.c:1995 src/main/util.c:1996
-#: src/main/util.c:2013 src/main/util.c:2037 src/main/util.c:2041
-#: src/main/util.c:2043 src/main/util.c:2068 src/main/util.c:2070
-#: src/main/util.c:2072 src/main/util.c:2075 src/main/util.c:2078
-#: src/main/util.c:2082 src/main/util.c:2084 src/modules/X11/devX11.c:3241
-#: src/modules/X11/devX11.c:3244 src/modules/X11/devX11.c:3247
-#: src/modules/X11/devX11.c:3271 src/modules/internet/internet.c:284
-#: src/modules/internet/internet.c:290 src/modules/internet/internet.c:296
-#: src/modules/internet/internet.c:299 src/modules/internet/internet.c:303
+#: src/main/scan.c:917 src/main/scan.c:972 src/main/seq.c:622
+#: src/main/seq.c:627 src/main/seq.c:635 src/main/seq.c:666 src/main/seq.c:670
+#: src/main/seq.c:676 src/main/seq.c:684 src/main/sort.c:175
+#: src/main/sysutils.c:597 src/main/sysutils.c:601 src/main/sysutils.c:605
+#: src/main/sysutils.c:611 src/main/sysutils.c:615 src/main/sysutils.c:1787
+#: src/main/sysutils.c:1791 src/main/unique.c:1029 src/main/unique.c:1337
+#: src/main/unique.c:1341 src/main/unique.c:1351 src/main/unique.c:1747
+#: src/main/util.c:636 src/main/util.c:639 src/main/util.c:1379
+#: src/main/util.c:1393 src/main/util.c:1975 src/main/util.c:2198
+#: src/main/util.c:2199 src/main/util.c:2200 src/main/util.c:2217
+#: src/main/util.c:2245 src/main/util.c:2249 src/main/util.c:2251
+#: src/main/util.c:2277 src/main/util.c:2279 src/main/util.c:2281
+#: src/main/util.c:2284 src/main/util.c:2287 src/main/util.c:2291
+#: src/main/util.c:2293 src/modules/X11/devX11.c:3247
+#: src/modules/X11/devX11.c:3250 src/modules/X11/devX11.c:3253
+#: src/modules/X11/devX11.c:3277 src/modules/internet/internet.c:453
+#: src/modules/internet/internet.c:459 src/modules/internet/internet.c:465
+#: src/modules/internet/internet.c:468 src/modules/internet/internet.c:472
+#: src/modules/internet/internet.c:477 src/modules/internet/libcurl.c:414
+#: src/modules/internet/libcurl.c:418 src/modules/internet/libcurl.c:423
+#: src/modules/internet/libcurl.c:426 src/modules/internet/libcurl.c:430
 #: src/modules/lapack/Lapack.c:155 src/modules/lapack/Lapack.c:261
 #: src/modules/lapack/Lapack.c:709 src/modules/lapack/Lapack.c:818
-#: src/modules/lapack/Lapack.c:880 src/modules/lapack/Lapack.c:1214
-#: src/unix/sys-std.c:1217 src/unix/sys-std.c:1240
+#: src/modules/lapack/Lapack.c:880 src/modules/lapack/Lapack.c:1215
+#: src/unix/sys-std.c:1223 src/unix/sys-std.c:1246
 #, c-format
 msgid "invalid '%s' argument"
 msgstr "'%s'参数不对"
@@ -247,362 +252,339 @@ msgstr "'%s'参数不对"
 msgid "unsupported version of Windows"
 msgstr "不支持这版本的Windows"
 
-#: src/gnuwin32/extra.c:267 src/main/apply.c:105 src/main/character.c:595
-#: src/main/connections.c:3555 src/main/context.c:642 src/main/context.c:661
-#: src/main/datetime.c:675 src/main/datetime.c:777 src/main/datetime.c:1030
-#: src/main/dotcode.c:199 src/main/errors.c:929 src/main/errors.c:962
-#: src/main/errors.c:1065 src/main/errors.c:1090 src/main/errors.c:1095
-#: src/main/errors.c:1368 src/main/identical.c:66 src/main/identical.c:67
-#: src/main/identical.c:68 src/main/identical.c:69 src/main/identical.c:70
-#: src/main/seq.c:185 src/main/seq.c:341 src/main/seq.c:346 src/main/seq.c:350
-#: src/main/seq.c:391 src/main/seq.c:395 src/main/seq.c:399
-#: src/main/sort.c:1224 src/main/sort.c:1307 src/main/sort.c:1311
-#: src/main/sort.c:1318 src/main/sort.c:1393 src/main/source.c:220
-#: src/main/summary.c:886 src/main/sysutils.c:251 src/main/util.c:986
-#: src/main/util.c:991 src/main/util.c:998 src/main/util.c:1001
-#: src/modules/X11/devX11.c:3142 src/modules/X11/devX11.c:3169
-#: src/modules/X11/devX11.c:3174 src/modules/X11/devX11.c:3179
-#: src/modules/X11/devX11.c:3189 src/modules/X11/devX11.c:3194
-#: src/modules/X11/devX11.c:3198 src/modules/X11/devX11.c:3202
-#: src/unix/sys-std.c:1291
-#, c-format
-msgid "invalid '%s' value"
-msgstr "'%s'值不对"
-
-#: src/gnuwin32/extra.c:308 src/gnuwin32/extra.c:321
+#: src/gnuwin32/extra.c:313 src/gnuwin32/extra.c:324
 msgid "incorrect argument"
 msgstr "参数不对"
 
-#: src/gnuwin32/extra.c:312
+#: src/gnuwin32/extra.c:316
 msgid "don't be silly!: your machine has a 4Gb address limit"
 msgstr "不要愚蠢!: 你的机器有4Gb的地址上限"
 
-#: src/gnuwin32/extra.c:316
+#: src/gnuwin32/extra.c:320
 msgid "cannot decrease memory limit: ignored"
 msgstr "无法减少内存极限:忽视不用"
 
-#: src/gnuwin32/extra.c:428 src/gnuwin32/extra.c:529 src/main/util.c:897
+#: src/gnuwin32/extra.c:427 src/gnuwin32/extra.c:528 src/main/util.c:962
 msgid "'path' must be a character vector"
 msgstr "'path'必需为字符矢量"
 
-#: src/gnuwin32/extra.c:579 src/gnuwin32/extra.c:581 src/gnuwin32/extra.c:604
-#: src/gnuwin32/extra.c:606 src/gnuwin32/extra.c:641 src/main/gevents.c:61
+#: src/gnuwin32/extra.c:576 src/gnuwin32/extra.c:578 src/gnuwin32/extra.c:601
+#: src/gnuwin32/extra.c:603 src/gnuwin32/extra.c:638 src/main/gevents.c:61
 #: src/main/gevents.c:98
 msgid "invalid device"
 msgstr "设备不对"
 
-#: src/gnuwin32/extra.c:582
+#: src/gnuwin32/extra.c:579
 msgid "requires SDI mode"
 msgstr "必需用SDI方式"
 
-#: src/gnuwin32/extra.c:635 src/main/gevents.c:58 src/main/gevents.c:95
+#: src/gnuwin32/extra.c:632 src/main/gevents.c:58 src/main/gevents.c:95
 msgid "invalid graphical device number"
 msgstr "图形设备号不对"
 
-#: src/gnuwin32/extra.c:645
+#: src/gnuwin32/extra.c:642
 msgid "bad device"
 msgstr "设备有错"
 
-#: src/gnuwin32/extra.c:799 src/gnuwin32/extra.c:807
+#: src/gnuwin32/extra.c:796 src/gnuwin32/extra.c:804
 msgid "invalid input in 'Rmbstowcs'"
 msgstr "'Rmbstowcs'里的输入不对"
 
-#: src/gnuwin32/extra.c:830 src/main/platform.c:1261
+#: src/gnuwin32/extra.c:827 src/main/platform.c:1336
 msgid "file choice cancelled"
 msgstr "撤消文件选择"
 
-#: src/gnuwin32/run.c:242
+#: src/gnuwin32/run.c:244
 #, c-format
 msgid "'CreateProcess' failed to run '%s'"
 msgstr "'CreateProcess'调用'%s'失败"
 
-#: src/gnuwin32/run.c:344
+#: src/gnuwin32/run.c:346
 msgid "Child process not responding.  R will terminate it."
 msgstr "子进程没有反应。R将终止它。"
 
-#: src/gnuwin32/run.c:402
+#: src/gnuwin32/run.c:404
 #, c-format
 msgid "Exit code was %d"
 msgstr "退出代码是%d"
 
-#: src/gnuwin32/run.c:434
+#: src/gnuwin32/run.c:436
 msgid "Insufficient memory (rpipeOpen)"
 msgstr "内存不够(rpipeOpen)"
 
-#: src/gnuwin32/run.c:648 src/main/dounzip.c:482
+#: src/gnuwin32/run.c:650 src/main/dounzip.c:481
 msgid "seek not enabled for this connection"
 msgstr "读取在这个链结无效"
 
-#: src/gnuwin32/run.c:654
+#: src/gnuwin32/run.c:656
 msgid "truncate not enabled for this connection"
 msgstr "不能缩短这个链结"
 
-#: src/gnuwin32/run.c:729 src/gnuwin32/run.c:733 src/gnuwin32/run.c:746
-#: src/gnuwin32/run.c:774 src/main/connections.c:1330
-#: src/main/connections.c:1334 src/main/connections.c:1340
-#: src/main/connections.c:1354
+#: src/gnuwin32/run.c:731 src/gnuwin32/run.c:735 src/gnuwin32/run.c:748
+#: src/gnuwin32/run.c:776 src/main/connections.c:1322
+#: src/main/connections.c:1326 src/main/connections.c:1332
+#: src/main/connections.c:1346
 msgid "allocation of pipe connection failed"
 msgstr "管道链结分配失败"
 
-#: src/gnuwin32/run.c:788
+#: src/gnuwin32/run.c:790
 msgid "'names' is not a character vector"
 msgstr "'names'必需是字符矢量"
 
-#: src/gnuwin32/sys-win32.c:182
+#: src/gnuwin32/sys-win32.c:180
 msgid "character string expected as first argument"
 msgstr "第一个参数应当是字符串"
 
-#: src/gnuwin32/sys-win32.c:191
+#: src/gnuwin32/sys-win32.c:189
 msgid "character string expected as third argument"
 msgstr "第三个参数应当是字符串"
 
-#: src/gnuwin32/sys-win32.c:257 src/unix/sys-unix.c:299
+#: src/gnuwin32/sys-win32.c:255 src/unix/sys-unix.c:312
 #, c-format
 msgid "running command '%s' had status %d"
 msgstr "运行命令'%s'的状态是%d"
 
-#: src/gnuwin32/system.c:122 src/unix/sys-unix.c:427
+#: src/gnuwin32/system.c:121 src/unix/sys-unix.c:440
 msgid "reached session elapsed time limit"
 msgstr "到达了对话流逝时间限制"
 
-#: src/gnuwin32/system.c:124 src/unix/sys-unix.c:429
+#: src/gnuwin32/system.c:123 src/unix/sys-unix.c:442
 msgid "reached elapsed time limit"
 msgstr "到达了流逝时间限制"
 
-#: src/gnuwin32/system.c:130 src/unix/sys-unix.c:435
+#: src/gnuwin32/system.c:129 src/unix/sys-unix.c:448
 msgid "reached session CPU time limit"
 msgstr "到达了对话CPU时间限制"
 
-#: src/gnuwin32/system.c:132 src/unix/sys-unix.c:437
+#: src/gnuwin32/system.c:131 src/unix/sys-unix.c:450
 msgid "reached CPU time limit"
 msgstr "到达了CPU时间限制"
 
-#: src/gnuwin32/system.c:157
+#: src/gnuwin32/system.c:156
 #, c-format
 msgid "Fatal error: %s\n"
 msgstr "致命错误:%s\n"
 
-#: src/gnuwin32/system.c:335 src/unix/sys-std.c:863
+#: src/gnuwin32/system.c:334 src/unix/sys-std.c:866
 #, c-format
 msgid "encoding '%s' is not recognised"
 msgstr "编码'%s'不存在"
 
-#: src/gnuwin32/system.c:341 src/unix/sys-std.c:869
+#: src/gnuwin32/system.c:340 src/unix/sys-std.c:872
 #, c-format
 msgid "<ERROR: re-encoding failure from encoding '%s'>\n"
 msgstr "<错误: 无法将编码'%s'重新进行编码>\n"
 
-#: src/gnuwin32/system.c:555 src/gnuwin32/system.c:1049
-#: src/gnuwin32/system.c:1061 src/main/connections.c:590
-#: src/main/connections.c:595 src/main/dounzip.c:177 src/main/saveload.c:1961
-#: src/main/serialize.c:2552 src/main/serialize.c:2557
-#: src/main/serialize.c:2642 src/main/serialize.c:2687 src/unix/system.c:323
-#: src/unix/system.c:343
+#: src/gnuwin32/system.c:562 src/gnuwin32/system.c:1058
+#: src/gnuwin32/system.c:1070 src/main/connections.c:581
+#: src/main/connections.c:586 src/main/dounzip.c:178 src/main/saveload.c:1963
+#: src/main/serialize.c:2598 src/main/serialize.c:2603
+#: src/main/serialize.c:2688 src/main/serialize.c:2733 src/unix/system.c:328
 #, c-format
 msgid "cannot open file '%s': %s"
 msgstr "无法打开文件'%s': %s"
 
-#: src/gnuwin32/system.c:569
+#: src/gnuwin32/system.c:576
 #, c-format
 msgid "file.show(): file '%s' does not exist\n"
 msgstr "file.show():不存在'%s'这个文件\n"
 
-#: src/gnuwin32/system.c:970
+#: src/gnuwin32/system.c:979
 #, c-format
 msgid "WARNING: R_MAX_MEM_SIZE value is invalid: ignored\n"
 msgstr "警告: R_MAX_MEM_SIZE的值不对: 略过不用\n"
 
-#: src/gnuwin32/system.c:1002
+#: src/gnuwin32/system.c:1011
 msgid "WARNING: no max-mem-size given\n"
 msgstr "警告: 没有设定max-mem-size\n"
 
-#: src/gnuwin32/system.c:1009
+#: src/gnuwin32/system.c:1018
 #, c-format
 msgid "WARNING: --max-mem-size value is invalid: ignored\n"
 msgstr "警告: --max-mem-size值不对: 略过不用\n"
 
-#: src/gnuwin32/system.c:1012
+#: src/gnuwin32/system.c:1021
 #, c-format
 msgid "WARNING: --max-mem-size=%lu%c: too large and ignored\n"
 msgstr "警告: --max-mem-size=%lu%c: 太大,略过不用\n"
 
-#: src/gnuwin32/system.c:1018
+#: src/gnuwin32/system.c:1027
 #, c-format
 msgid "WARNING: --max-mem-size=%4.1fM: too small and ignored\n"
 msgstr "警告: --max-mem-size=%4.1fM太小,略过不用\n"
 
-#: src/gnuwin32/system.c:1023
+#: src/gnuwin32/system.c:1032
 #, c-format
 msgid "WARNING: --max-mem-size=%4.0fM: too large and taken as %uM\n"
 msgstr "警告: --max-mem-size=%4.0fM太大,当作%uM来用\n"
 
-#: src/gnuwin32/system.c:1039
+#: src/gnuwin32/system.c:1048
 #, fuzzy, c-format
 msgid "option '%s' requires an argument"
 msgstr "二进列运算需要两个参数"
 
-#: src/gnuwin32/system.c:1070
+#: src/gnuwin32/system.c:1079
 #, fuzzy, c-format
 msgid "option '%s' requires a non-empty argument"
 msgstr "二进列运算需要两个参数"
 
-#: src/gnuwin32/system.c:1078 src/unix/system.c:362
+#: src/gnuwin32/system.c:1087 src/unix/system.c:347
 #, c-format
 msgid "WARNING: '-e %s' omitted as input is too long\n"
 msgstr "警告: 因为太长了,'-e %s'这个输入略过不用\n"
 
-#: src/gnuwin32/system.c:1082 src/unix/system.c:375
+#: src/gnuwin32/system.c:1091 src/unix/system.c:360
 #, c-format
 msgid "WARNING: unknown option '%s'\n"
 msgstr "警告: 没有'%s'这样的选项\n"
 
-#: src/gnuwin32/system.c:1104 src/unix/system.c:379
+#: src/gnuwin32/system.c:1113 src/unix/system.c:364
 #, c-format
 msgid "ARGUMENT '%s' __ignored__\n"
 msgstr "参数’%s’略过不用\n"
 
-#: src/gnuwin32/system.c:1110 src/unix/system.c:386
+#: src/gnuwin32/system.c:1119 src/unix/system.c:371
 msgid "cannot use -e with -f or --file"
 msgstr "-e选项不能同时和-f或--file一起出现"
 
-#: src/gnuwin32/system.c:1128
+#: src/gnuwin32/system.c:1137
 msgid "creation of tmpfile failed -- set TMPDIR suitably?"
 msgstr "建立tmpfile失败--设了TMPDIR没有?"
 
-#: src/gnuwin32/system.c:1147 src/unix/system.c:437
+#: src/gnuwin32/system.c:1156 src/unix/system.c:422
 msgid "you must specify '--save', '--no-save' or '--vanilla'"
 msgstr "你必需选用'--save',’--no-save'或'--vanilla'其中的一个"
 
-#: src/gnuwin32/system.c:1152
+#: src/gnuwin32/system.c:1161
 msgid ""
 "impossible to create 'reader thread'; you must free some system resources"
 msgstr "无法建立‘reader thread’,系统资源不够"
 
-#: src/include/Errormsg.h:25 src/main/subscript.c:375 src/main/subscript.c:393
-#: src/main/subscript.c:417 src/main/subscript.c:456 src/main/subscript.c:584
-#: src/main/subscript.c:623 src/main/subscript.c:766
+#: src/include/Errormsg.h:27 src/main/subscript.c:383 src/main/subscript.c:401
+#: src/main/subscript.c:425 src/main/subscript.c:464 src/main/subscript.c:662
+#: src/main/subscript.c:701 src/main/subscript.c:844
 msgid "subscript out of bounds"
 msgstr "下标出界"
 
-#: src/include/Errormsg.h:26
+#: src/include/Errormsg.h:28
 #, c-format
 msgid "object of type '%s' is not subsettable"
 msgstr "类别为'%s'的对象不可以取子集"
 
-#: src/main/CommandLineArgs.c:170
+#: src/main/CommandLineArgs.c:171
 msgid "WARNING: no value given for --encoding"
 msgstr "警告: 没有设定--enconding的值"
 
-#: src/main/CommandLineArgs.c:195
+#: src/main/CommandLineArgs.c:196
 #, c-format
 msgid "WARNING: option '%s' no longer supported"
 msgstr "警告: 本版本不再支持'%s'这一选项"
 
-#: src/main/CommandLineArgs.c:206
+#: src/main/CommandLineArgs.c:207
 #, c-format
 msgid "WARNING: no value given for '%s'"
 msgstr "警告: 没有设定'%s'的值"
 
-#: src/main/CommandLineArgs.c:216
+#: src/main/CommandLineArgs.c:217
 #, c-format
 msgid "WARNING: '%s' value is invalid: ignored"
 msgstr "警告: '%s'的值不对: 略过不用"
 
-#: src/main/CommandLineArgs.c:220
+#: src/main/CommandLineArgs.c:221
 #, c-format
 msgid "WARNING: %s: too large and ignored"
 msgstr "警告: %s: 太大,略过不用"
 
-#: src/main/CommandLineArgs.c:234
+#: src/main/CommandLineArgs.c:235
 msgid "WARNING: no value given for '--max-ppsize'"
 msgstr "警告: 没有设定'--max-ppsize'的值"
 
-#: src/main/CommandLineArgs.c:239
+#: src/main/CommandLineArgs.c:240
 msgid "WARNING: '--max-ppsize' value is negative: ignored"
 msgstr "警告: '--max-ppsize'的值是负数: 略过不用"
 
-#: src/main/CommandLineArgs.c:241
+#: src/main/CommandLineArgs.c:242
 msgid "WARNING: '--max-ppsize' value is too small: ignored"
 msgstr "警告: '--max-ppsize'的值太小: 略过不用"
 
-#: src/main/CommandLineArgs.c:244
+#: src/main/CommandLineArgs.c:245
 msgid "WARNING: '--max-ppsize' value is too large: ignored"
 msgstr "警告: '--max-ppsize'的值太大: 略过不用"
 
-#: src/main/RNG.c:175
+#: src/main/RNG.c:176
 #, c-format
 msgid "unif_rand: unimplemented RNG kind %d"
 msgstr "unif_rand: RNG种类%d目前没有实现"
 
-#: src/main/RNG.c:260
+#: src/main/RNG.c:261
 #, c-format
 msgid "FixupSeeds: unimplemented RNG kind %d"
 msgstr "FixupSeeds: RNG种类%d目前没有实现"
 
-#: src/main/RNG.c:302
+#: src/main/RNG.c:301
 msgid "'user_unif_rand' not in load table"
 msgstr "'user_unif_rand'在载入表中并不存在"
 
-#: src/main/RNG.c:310
+#: src/main/RNG.c:309
 msgid "cannot read seeds unless 'user_unif_nseed' is supplied"
 msgstr "只有在设定了'user_unif_nseed'以后才能读随机种"
 
-#: src/main/RNG.c:315
+#: src/main/RNG.c:314
 msgid "seed length must be in 0...625; ignored"
 msgstr "随机种的长度必需在0到625之间; 略过不用"
 
-#: src/main/RNG.c:323
+#: src/main/RNG.c:322
 #, c-format
 msgid "RNG_Init: unimplemented RNG kind %d"
 msgstr "RNG_Init: RNG种类%d目前没有实现"
 
-#: src/main/RNG.c:354
+#: src/main/RNG.c:351
 msgid "'.Random.seed' is a missing argument with no default"
 msgstr "'.Random.seed'这个参数没有设定,也没有缺省值"
 
-#: src/main/RNG.c:355
+#: src/main/RNG.c:352
 #, fuzzy, c-format
 msgid "'.Random.seed' is not an integer vector but of type '%s', so ignored"
 msgstr "'.Random.seed'不是整数矢量,类别为'%s'"
 
-#: src/main/RNG.c:363
+#: src/main/RNG.c:360
 #, fuzzy
 msgid "'.Random.seed[1]' is not a valid integer, so ignored"
 msgstr ".Random.seed[1]不是适当的整数"
 
-#: src/main/RNG.c:369
+#: src/main/RNG.c:366
 #, fuzzy
 msgid "'.Random.seed[1]' is not a valid Normal type, so ignored"
 msgstr "'.Random.seed[1]'不是适当的Normal类"
 
-#: src/main/RNG.c:383
+#: src/main/RNG.c:380
 #, fuzzy
 msgid "'.Random.seed[1] = 5' but no user-supplied generator, so ignored"
 msgstr "'.Random.seed[1]=5'但用户指定的发生器却不存在"
 
-#: src/main/RNG.c:388
+#: src/main/RNG.c:385
 #, fuzzy
 msgid "'.Random.seed[1]' is not a valid RNG kind so ignored"
 msgstr "'.Random.seed[1]'不是适当的RNG类"
 
-#: src/main/RNG.c:415
+#: src/main/RNG.c:412
 msgid "'.Random.seed' has wrong length"
 msgstr "'.Random.seed'的长度不对"
 
-#: src/main/RNG.c:468
+#: src/main/RNG.c:465
 #, c-format
 msgid "RNGkind: unimplemented RNG kind %d"
 msgstr "RNGkind: RNG种类%d目前没有实现"
 
-#: src/main/RNG.c:488
+#: src/main/RNG.c:485
 msgid "invalid Normal type in 'RNGkind'"
 msgstr "'RNGkind'里的Normal类不对"
 
-#: src/main/RNG.c:491
+#: src/main/RNG.c:488
 msgid "'user_norm_rand' not in load table"
 msgstr "'user_norm_rand'不在载入表中"
 
-#: src/main/RNG.c:535
+#: src/main/RNG.c:532
 msgid "supplied seed is not a valid integer"
 msgstr "提供的随机种不是正确的正数"
 
@@ -627,7 +609,7 @@ msgstr "DLLname '%s'太长"
 msgid "could not allocate space for 'name'"
 msgstr "无法为'name'分配空间"
 
-#: src/main/Rdynload.c:881 src/main/Rdynload.c:897 src/main/util.c:698
+#: src/main/Rdynload.c:881 src/main/Rdynload.c:897 src/main/util.c:762
 msgid "character argument expected"
 msgstr "需要字符参数"
 
@@ -646,33 +628,34 @@ msgid "shared object '%s' was not loaded"
 msgstr "没有载入共享目标对象'%s'"
 
 #: src/main/Rdynload.c:979
-#, c-format
-msgid "cannot allocate memory for registered native symbol (%d bytes)"
-msgstr "无法给注册了的原始符号分配内存(%d字节)"
+#, fuzzy, c-format
+msgid "cannot allocate memory for registered native symbol (%d byte)"
+msgid_plural "cannot allocate memory for registered native symbol (%d bytes)"
+msgstr[0] "无法给注册了的原始符号分配内存(%d字节)"
 
-#: src/main/Rdynload.c:1100 src/main/Rdynload.c:1321
+#: src/main/Rdynload.c:1102 src/main/Rdynload.c:1323
 msgid "must pass package name or DllInfo reference"
 msgstr "必需传给程序包名字或DllInfo引用"
 
-#: src/main/Rdynload.c:1197
+#: src/main/Rdynload.c:1199
 #, c-format
 msgid "unimplemented type %d in 'createRSymbolObject'"
 msgstr "'createRSymbolObject'里的种类%d目前没有被实现"
 
-#: src/main/Rdynload.c:1279 src/main/Rdynload.c:1373
+#: src/main/Rdynload.c:1281 src/main/Rdynload.c:1375
 msgid "R_getRegisteredRoutines() expects a DllInfo reference"
 msgstr " R_getRegisteredRoutines()需要DllInfo引用"
 
-#: src/main/Rdynload.c:1282 src/main/Rdynload.c:1376
+#: src/main/Rdynload.c:1284 src/main/Rdynload.c:1378
 msgid "NULL value passed for DllInfo"
 msgstr "给DllInfo了一个NULL值"
 
-#: src/main/Rdynload.c:1436
+#: src/main/Rdynload.c:1441
 #, c-format
 msgid "function '%s' not provided by package '%s'"
 msgstr "程序包'%s'不提供'%s'这样的函数"
 
-#: src/main/Rdynload.c:1438
+#: src/main/Rdynload.c:1443
 msgid "table entry must be an external pointer"
 msgstr "桌项必需是外部指针"
 
@@ -681,8 +664,9 @@ msgstr "桌项必需是外部指针"
 msgid "problem in setting variable '%s' in Renviron"
 msgstr "在Renviron里设定'%s'变量时出了问题"
 
-#: src/main/Renviron.c:311
-msgid "argument 'x' must be a character string"
+#: src/main/Renviron.c:311 src/main/objects.c:1174 src/main/raw.c:155
+#, fuzzy, c-format
+msgid "argument '%s' must be a character string"
 msgstr "参数'x'必需是字符串"
 
 #: src/main/Renviron.c:315
@@ -690,92 +674,119 @@ msgstr "参数'x'必需是字符串"
 msgid "file '%s' cannot be opened for reading"
 msgstr "无法读取'%s'文件"
 
-#: src/main/Rstrptime.h:517 src/main/Rstrptime.h:984
+#: src/main/Rstrptime.h:524 src/main/Rstrptime.h:991
 #, c-format
 msgid "use of %s for input is not supported"
 msgstr "不支持%s这种输入状态"
 
-#: src/main/Rstrptime.h:1242
+#: src/main/Rstrptime.h:1263
 msgid "input string is too long"
 msgstr "输入字符串太长"
 
-#: src/main/Rstrptime.h:1244
+#: src/main/Rstrptime.h:1265
 msgid "invalid multibyte input string"
 msgstr "多字节输入字符串不对"
 
-#: src/main/Rstrptime.h:1247
+#: src/main/Rstrptime.h:1268
 msgid "format string is too long"
 msgstr "格式字符串太长"
 
-#: src/main/Rstrptime.h:1249
+#: src/main/Rstrptime.h:1270
 msgid "invalid multibyte format string"
 msgstr "多字节格式字符串不对"
 
-#: src/main/agrep.c:133 src/main/agrep.c:777 src/main/character.c:1039
-#: src/main/character.c:1043 src/main/grep.c:769 src/main/grep.c:1512
-#: src/main/grep.c:1516 src/main/grep.c:2325 src/main/grep.c:2623
+#: src/main/agrep.c:133 src/main/agrep.c:778 src/main/character.c:1291
+#: src/main/character.c:1295 src/main/grep.c:782 src/main/grep.c:1530
+#: src/main/grep.c:1534 src/main/grep.c:2347 src/main/grep.c:2654
 #, c-format
 msgid "argument '%s' has length > 1 and only the first element will be used"
 msgstr "变数'%s'的长度大于一,因此只能用其第一元素"
 
-#: src/main/agrep.c:189 src/main/agrep.c:818
+#: src/main/agrep.c:190 src/main/agrep.c:820
 msgid "'pattern' must be a non-empty character string"
 msgstr "'pattern'必需为非空字符串"
 
-#: src/main/agrep.c:200 src/main/agrep.c:827 src/main/grep.c:838
-#: src/main/grep.c:2381 src/main/grep.c:2662
+#: src/main/agrep.c:201 src/main/agrep.c:829 src/main/grep.c:853
+#: src/main/grep.c:2405 src/main/grep.c:2707
 msgid "regular expression is invalid in this locale"
 msgstr "正规表现不适用于此语言环境"
 
-#: src/main/agrep.c:206 src/main/agrep.c:623
+#: src/main/agrep.c:207 src/main/agrep.c:624
 #, c-format
 msgid "regcomp error:  '%s'"
 msgstr "regcomp出错:'%s'"
 
-#: src/main/agrep.c:238 src/main/agrep.c:871 src/main/grep.c:227
-#: src/main/grep.c:315 src/main/grep.c:423 src/main/grep.c:578
-#: src/main/grep.c:889 src/main/grep.c:2480 src/main/grep.c:2548
-#: src/main/grep.c:2698
+#: src/main/agrep.c:239 src/main/agrep.c:874 src/main/grep.c:233
+#: src/main/grep.c:323 src/main/grep.c:434 src/main/grep.c:590
+#: src/main/grep.c:907 src/main/grep.c:2510 src/main/grep.c:2579
+#: src/main/grep.c:2744
 #, c-format
 msgid "input string %d is invalid in this locale"
 msgstr "输入的字符串%d不适用于此语言环境"
 
-#: src/main/agrep.c:525 src/main/agrep.c:765 src/main/grep.c:155
-#: src/main/grep.c:760 src/main/grep.c:762 src/main/grep.c:1047
-#: src/main/grep.c:1055 src/main/grep.c:1503 src/main/grep.c:1505
-#: src/main/grep.c:2315 src/main/grep.c:2317 src/main/grep.c:2611
+#: src/main/agrep.c:526 src/main/agrep.c:766 src/main/grep.c:159
+#: src/main/grep.c:773 src/main/grep.c:775 src/main/grep.c:1065
+#: src/main/grep.c:1073 src/main/grep.c:1521 src/main/grep.c:1523
+#: src/main/grep.c:2337 src/main/grep.c:2339 src/main/grep.c:2642
 #, c-format
 msgid "argument '%s' will be ignored"
 msgstr "略过'%s'参数值"
 
-#: src/main/agrep.c:614
+#: src/main/agrep.c:615
 #, c-format
 msgid "input string x[%d] is invalid in this locale"
 msgstr "输入的字符串x[%d]不适用于此语言环境"
 
-#: src/main/agrep.c:660
+#: src/main/agrep.c:661
 #, c-format
 msgid "input string y[%d] is invalid in this locale"
 msgstr "输入的字符串y[%d]不适用于此语言环境"
 
-#: src/main/agrep.c:833 src/main/grep.c:2668
+#: src/main/agrep.c:835 src/main/grep.c:2713
 #, c-format
 msgid "regcomp error: '%s'"
 msgstr "regcomp出错:'%s'"
 
-#: src/main/apply.c:103
+#: src/main/apply.c:98
 msgid "'FUN.VALUE' must be a vector"
 msgstr "'FUN.VALUE'必需是矢量"
 
-#: src/main/apply.c:108 src/main/complex.c:758
+#: src/main/apply.c:100 src/main/array.c:506 src/main/character.c:847
+#: src/main/character.c:1655 src/main/connections.c:3551
+#: src/main/context.c:653 src/main/context.c:672 src/main/datetime.c:681
+#: src/main/datetime.c:783 src/main/datetime.c:1047 src/main/dotcode.c:222
+#: src/main/errors.c:910 src/main/errors.c:943 src/main/errors.c:1049
+#: src/main/errors.c:1074 src/main/errors.c:1079 src/main/errors.c:1349
+#: src/main/identical.c:66 src/main/identical.c:67 src/main/identical.c:68
+#: src/main/identical.c:69 src/main/identical.c:70 src/main/platform.c:2982
+#: src/main/seq.c:192 src/main/seq.c:343 src/main/seq.c:348 src/main/seq.c:352
+#: src/main/seq.c:397 src/main/seq.c:401 src/main/seq.c:405
+#: src/main/sort.c:1244 src/main/sort.c:1327 src/main/sort.c:1331
+#: src/main/sort.c:1338 src/main/source.c:225 src/main/summary.c:954
+#: src/main/sysutils.c:250 src/main/util.c:1051 src/main/util.c:1056
+#: src/main/util.c:1063 src/main/util.c:1066 src/main/util.c:2035
+#: src/modules/X11/devX11.c:3148 src/modules/X11/devX11.c:3175
+#: src/modules/X11/devX11.c:3180 src/modules/X11/devX11.c:3185
+#: src/modules/X11/devX11.c:3195 src/modules/X11/devX11.c:3200
+#: src/modules/X11/devX11.c:3204 src/modules/X11/devX11.c:3208
+#, c-format
+msgid "invalid '%s' value"
+msgstr "'%s'值不对"
+
+#: src/main/apply.c:103 src/main/complex.c:753
 msgid "invalid length"
 msgstr "长度不对"
 
-#: src/main/apply.c:113
+#: src/main/apply.c:108
 msgid "long vectors are not supported for matrix/array results"
 msgstr "不支持长向量矩阵/数组结果"
 
-#: src/main/apply.c:162
+#: src/main/apply.c:115
+#, c-format
+msgid "type '%s' is not supported"
+msgstr "不支持'%s'这一种类"
+
+#: src/main/apply.c:163
 #, c-format
 msgid ""
 "values must be length %d,\n"
@@ -784,7 +795,7 @@ msgstr ""
 "值的长度必需为%d,\n"
 " 但FUN(X[[%d]])结果的长度却是%d"
 
-#: src/main/apply.c:174
+#: src/main/apply.c:175
 #, c-format
 msgid ""
 "values must be type '%s',\n"
@@ -793,17 +804,12 @@ msgstr ""
 "值的种类必需是'%s',\n"
 " 但FUN(X[[%d]])结果的种类却是'%s'"
 
-#: src/main/apply.c:193
-#, c-format
-msgid "type '%s' is not supported"
-msgstr "不支持'%s'这一种类"
-
-#: src/main/apply.c:225
+#: src/main/apply.c:252
 #, c-format
 msgid "dimnames(<value>) is neither NULL nor list of length %d"
 msgstr "dimnames(<value>)的值不是NULL也不是长度为%d的串列 "
 
-#: src/main/arithmetic.c:42
+#: src/main/arithmetic.c:42 src/main/eval.c:3633
 msgid "NaNs produced"
 msgstr "产生了NaNs"
 
@@ -811,463 +817,475 @@ msgstr "产生了NaNs"
 msgid "non-numeric argument to mathematical function"
 msgstr "数学函数中用了非数值参数"
 
-#: src/main/arithmetic.c:187
+#: src/main/arithmetic.c:186
 msgid "probable complete loss of accuracy in modulus"
 msgstr "系数精确度很可能完全损失"
 
-#: src/main/arithmetic.c:337
+#: src/main/arithmetic.c:298
 msgid "NAs produced by integer overflow"
 msgstr "整数上溢产生了NA"
 
-#: src/main/arithmetic.c:538
+#: src/main/arithmetic.c:499
 msgid "operator needs one or two arguments"
 msgstr "运算符需要一个或两个参数"
 
-#: src/main/arithmetic.c:554
+#: src/main/arithmetic.c:515
 msgid "non-numeric argument to binary operator"
 msgstr "二进列运算符中有非数值参数"
 
-#: src/main/arithmetic.c:615 src/main/relop.c:227
+#: src/main/arithmetic.c:576 src/main/relop.c:221
 msgid "non-conformable arrays"
 msgstr "非整合陈列"
 
-#: src/main/arithmetic.c:658
+#: src/main/arithmetic.c:619
 msgid "non-conformable time-series"
 msgstr "非整合时间系列"
 
-#: src/main/arithmetic.c:680 src/main/logic.c:143 src/main/relop.c:166
-#: src/main/relop.c:265
+#: src/main/arithmetic.c:641 src/main/logic.c:135 src/main/relop.c:160
+#: src/main/relop.c:259
 msgid "longer object length is not a multiple of shorter object length"
 msgstr "长的对象长度不是短的对象长度的整倍数"
 
-#: src/main/arithmetic.c:751
+#: src/main/arithmetic.c:712
 msgid "invalid argument to unary operator"
 msgstr "一进列运算符的参数不对"
 
-#: src/main/arithmetic.c:780 src/main/arithmetic.c:805
-#: src/main/arithmetic.c:824
+#: src/main/arithmetic.c:741 src/main/arithmetic.c:766
+#: src/main/arithmetic.c:785
 msgid "invalid unary operator"
 msgstr "一进列运算符不对"
 
-#: src/main/arithmetic.c:1241
+#: src/main/arithmetic.c:1191
 msgid "unimplemented real function of 1 argument"
 msgstr "一参数的实数函数目前还没有实现"
 
-#: src/main/arithmetic.c:1255 src/main/complex.c:648 src/main/complex.c:718
+#: src/main/arithmetic.c:1205 src/main/complex.c:638 src/main/complex.c:708
 msgid "unimplemented complex function"
 msgstr "目前没有实现复数功能"
 
-#: src/main/arithmetic.c:1526 src/main/arithmetic.c:1877
-#: src/main/arithmetic.c:2056 src/main/arithmetic.c:2168
+#: src/main/arithmetic.c:1484 src/main/arithmetic.c:1877
+#: src/main/arithmetic.c:2049 src/main/arithmetic.c:2152
 #, c-format
 msgid "unimplemented real function of %d numeric arguments"
 msgstr "%d数值参数的实数函数目前没有实现"
 
-#: src/main/arithmetic.c:1552
-#, c-format
-msgid "%d arguments passed to '%s' which requires 1 or 2"
-msgstr "给了%d个参数到'%s',但它最多只能用两个参数"
+#: src/main/arithmetic.c:1511
+#, fuzzy, c-format
+msgid "%d argument passed to '%s' which requires 1 or 2 arguments"
+msgid_plural "%d arguments passed to '%s'which requires 1 or 2 arguments"
+msgstr[0] "给了%d个参数到'%s',但它最多只能用两个参数"
 
-#: src/main/arithmetic.c:1570
+#: src/main/arithmetic.c:1530
 msgid "invalid second argument of length 0"
 msgstr "第二参数长度为零是不对的"
 
-#: src/main/arithmetic.c:1639
+#: src/main/arithmetic.c:1625 src/main/arithmetic.c:1643 src/main/envir.c:1464
+#: src/main/envir.c:1972 src/main/eval.c:630 src/main/eval.c:4237
+#, c-format
+msgid "argument \"%s\" is missing, with no default"
+msgstr "缺少参数\"%s\",也没有缺省值"
+
+#: src/main/arithmetic.c:1649
 msgid "invalid argument 'base' of length 0"
 msgstr "不能有长度为零的'base'参数"
 
-#: src/main/arithmetic.c:1647
-#, c-format
-msgid "%d arguments passed to 'log' which requires 1 or 2"
-msgstr "给了'log'%d个参数,但它最多只能用两个参数"
-
-#: src/main/array.c:79 src/main/array.c:1441
+#: src/main/array.c:82 src/main/array.c:1591
 #, c-format
 msgid "'data' must be of a vector type, was '%s'"
 msgstr "'data'的种类必需为矢量,但现在是'%s'"
 
-#: src/main/array.c:94 src/main/array.c:102
+#: src/main/array.c:97 src/main/array.c:105
 msgid "non-numeric matrix extent"
 msgstr "非数值的矩阵范围"
 
-#: src/main/array.c:97 src/main/array.c:1535
+#: src/main/array.c:100 src/main/array.c:1695
 msgid "invalid 'nrow' value (too large or NA)"
 msgstr "'nrow'值不对(要么是太大,要么是含NA)"
 
-#: src/main/array.c:99 src/main/array.c:1537
+#: src/main/array.c:102 src/main/array.c:1697
 msgid "invalid 'nrow' value (< 0)"
 msgstr "'nrow'值不对(< 0)"
 
-#: src/main/array.c:105 src/main/array.c:1540
+#: src/main/array.c:108 src/main/array.c:1700
 msgid "invalid 'ncol' value (too large or NA)"
 msgstr "'ncol'值不对(要么是太大,要么是含NA)"
 
-#: src/main/array.c:107 src/main/array.c:1542
+#: src/main/array.c:110 src/main/array.c:1702
 msgid "invalid 'ncol' value (< 0)"
 msgstr "'ncol'值不对(< 0)"
 
-#: src/main/array.c:116
+#: src/main/array.c:119
 msgid "nc = 0 for non-null data"
 msgstr ""
 
-#: src/main/array.c:124
+#: src/main/array.c:127
 msgid "nr = 0 for non-null data"
 msgstr ""
 
-#: src/main/array.c:135
+#: src/main/array.c:138
 #, c-format
 msgid ""
 "data length [%d] is not a sub-multiple or multiple of the number of rows [%d]"
 msgstr "数据长度[%d]不是矩阵行数[%d]的整倍"
 
-#: src/main/array.c:138
+#: src/main/array.c:141
 #, c-format
 msgid ""
 "data length [%d] is not a sub-multiple or multiple of the number of columns "
 "[%d]"
 msgstr "数据长度[%d]不是矩阵列数[%d]的整倍数"
 
-#: src/main/array.c:141
+#: src/main/array.c:144
 msgid "data length exceeds size of matrix"
 msgstr "数据长度超过了矩阵的大小"
 
-#: src/main/array.c:147 src/main/array.c:1453 src/main/array.c:1549
+#: src/main/array.c:150 src/main/array.c:1603 src/main/array.c:1709
 msgid "too many elements specified"
 msgstr "设定了太多的元素"
 
-#: src/main/array.c:205
+#: src/main/array.c:208
 msgid "negative extents to matrix"
 msgstr "矩阵的范围不能是负值"
 
-#: src/main/array.c:208
+#: src/main/array.c:211
 msgid "allocMatrix: too many elements specified"
 msgstr "allocMatrix: 设定了太多的元素"
 
-#: src/main/array.c:236
+#: src/main/array.c:239
 msgid "negative extents to 3D array"
 msgstr "三维排列的范围不能是负值"
 
-#: src/main/array.c:239
+#: src/main/array.c:242
 msgid "'alloc3Darray': too many elements specified"
 msgstr "'alloc3Darray': 设定了太多的元素"
 
-#: src/main/array.c:264
+#: src/main/array.c:267
 msgid "'allocArray': too many elements specified by 'dims'"
 msgstr "'allocArray': 'dims'设定了太多的元素"
 
-#: src/main/array.c:448
+#: src/main/array.c:523
+#, fuzzy, c-format
+msgid "'%s' must be a list or atomic vector"
+msgstr "'x'必需是NULL串列或原始矢量"
+
+#: src/main/array.c:561
 #, c-format
 msgid "a matrix-like object is required as argument to '%s'"
 msgstr "'%s'必需用矩阵目标对象作参数"
 
-#: src/main/array.c:662
+#: src/main/array.c:776
 msgid "requires numeric/complex matrix/vector arguments"
 msgstr "需要数值/复数矩阵/矢量参数"
 
-#: src/main/array.c:752 src/main/array.c:756 src/main/array.c:760
+#: src/main/array.c:886 src/main/array.c:890 src/main/array.c:894
 msgid "non-conformable arguments"
 msgstr "非整合参数"
 
-#: src/main/array.c:1058
+#: src/main/array.c:1193
 msgid "argument is not a matrix"
 msgstr "参数不是矩阵"
 
-#: src/main/array.c:1093
+#: src/main/array.c:1228
 msgid "invalid first argument, must be an array"
 msgstr "第一个参数不对, 必需是陈列"
 
-#: src/main/array.c:1107
+#: src/main/array.c:1242
 #, c-format
 msgid "'perm' is of wrong length %d (!= %d)"
 msgstr "'perm'的长度不对 %d (!= %d)"
 
-#: src/main/array.c:1112 src/main/array.c:1115
+#: src/main/array.c:1247 src/main/array.c:1250
 msgid "'a' does not have named dimnames"
 msgstr "'a'必需有带名字的dimnames"
 
-#: src/main/array.c:1122
+#: src/main/array.c:1257
 #, c-format
 msgid "'perm[%d]' does not match a dimension name"
 msgstr "'perm[%d]'和维度名字不相配"
 
-#: src/main/array.c:1135
+#: src/main/array.c:1270
 msgid "value out of range in 'perm'"
 msgstr "'perm'里的值在范围外"
 
-#: src/main/array.c:1217
+#: src/main/array.c:1352
 msgid "'resize' must be TRUE or FALSE"
 msgstr "'resize'的值必需是TRUE或是FALSE"
 
-#: src/main/array.c:1275
+#: src/main/array.c:1422
 msgid "'x' must be numeric"
 msgstr "'x'必需为数值"
 
-#: src/main/array.c:1449
+#: src/main/array.c:1425
+#, fuzzy
+msgid "'x' is too short"
+msgstr "'object'太短"
+
+#: src/main/array.c:1599
 msgid "'dims' cannot be of length 0"
 msgstr "'dims'的长度不能为零"
 
-#: src/main/array.c:1545
+#: src/main/array.c:1705
 msgid "'x' must have positive length"
 msgstr "'x'的长度必需是正数"
 
-#: src/main/array.c:1605
+#: src/main/array.c:1771
 #, c-format
 msgid "singular matrix in 'backsolve'. First zero in diagonal [%d]"
 msgstr "'backsolve'里出现了奇异矩阵。对角线[%d]里第一个零"
 
-#: src/main/attrib.c:40 src/main/attrib.c:235 src/main/attrib.c:269
-#: src/main/attrib.c:291 src/main/attrib.c:405 src/main/attrib.c:452
-#: src/main/attrib.c:502
+#: src/main/attrib.c:40 src/main/attrib.c:231 src/main/attrib.c:265
+#: src/main/attrib.c:287 src/main/attrib.c:403 src/main/attrib.c:450
+#: src/main/attrib.c:501
 msgid "attempt to set an attribute on NULL"
 msgstr "NULL是不能有属性的"
 
-#: src/main/attrib.c:72
+#: src/main/attrib.c:77
 #, c-format
 msgid "row names must be 'character' or 'integer', not '%s'"
 msgstr "行名必需是'character'或'integer',不能是'%s'"
 
-#: src/main/attrib.c:124
+#: src/main/attrib.c:130
 #, c-format
 msgid "getAttrib: invalid type (%s) for TAG"
 msgstr "getAttrib: 标记的种类(%s)不对"
 
-#: src/main/attrib.c:379
+#: src/main/attrib.c:377
 #, c-format
 msgid "invalid type (%s) for 'names': must be vector"
 msgstr "'names'的种类(%s)不对: 必需是矢量"
 
-#: src/main/attrib.c:382
+#: src/main/attrib.c:380
 #, c-format
 msgid "'names' attribute [%d] must be the same length as the vector [%d]"
 msgstr "'names'属性的长度[%d]必需和矢量的长度[%d]一样"
 
-#: src/main/attrib.c:387
+#: src/main/attrib.c:385
 msgid "names() applied to a non-vector"
 msgstr "names()不能用于非矢量"
 
-#: src/main/attrib.c:395
+#: src/main/attrib.c:393
 msgid "invalid time series parameters specified"
 msgstr "时间系列参数设定不对"
 
-#: src/main/attrib.c:409
+#: src/main/attrib.c:407
 msgid "'tsp' attribute must be numeric"
 msgstr "'tsp'属性必需为数值"
 
-#: src/main/attrib.c:415
+#: src/main/attrib.c:413
 msgid "'tsp' attribute must be numeric of length three"
 msgstr "'tsp'属性值的长度必需是三"
 
-#: src/main/attrib.c:432
+#: src/main/attrib.c:430
 msgid "cannot assign 'tsp' to zero-length vector"
 msgstr "零长度矢量不能设成'tsp'"
 
-#: src/main/attrib.c:463
+#: src/main/attrib.c:461
 msgid "attempt to set invalid 'comment' attribute"
 msgstr "无法设定'comment'属性"
 
-#: src/main/attrib.c:511
+#: src/main/attrib.c:510
 msgid "adding class \"factor\" to an invalid object"
 msgstr "无法为不适当的对象加\"factor\" 类别"
 
-#: src/main/attrib.c:519
+#: src/main/attrib.c:541
 msgid "attempt to set invalid 'class' attribute"
 msgstr "无法设非适当'class'属性"
 
-#: src/main/attrib.c:777
+#: src/main/attrib.c:872
 #, c-format
 msgid "class '%s' has no 'names' slot"
 msgstr "'%s'种类没有'names'这个的槽 "
 
-#: src/main/attrib.c:779
+#: src/main/attrib.c:874
 #, c-format
 msgid ""
 "class '%s' has no 'names' slot; assigning a names attribute will create an "
 "invalid object"
 msgstr "'%s'种类没有'names'这个槽;在为其分配名称属性时会创建一个无效对象"
 
-#: src/main/attrib.c:782
+#: src/main/attrib.c:877
 #, c-format
 msgid ""
 "invalid to use names()<- to set the 'names' slot in a non-vector class ('%s')"
 msgstr "在非矢量类别('%s')里不能用names()<-来设'names'这个槽"
 
-#: src/main/attrib.c:812
+#: src/main/attrib.c:907
 msgid "incompatible 'names' argument"
 msgstr "非兼容'names'参数"
 
-#: src/main/attrib.c:867
+#: src/main/attrib.c:962
 #, c-format
 msgid "invalid type (%s) to set 'names' attribute"
 msgstr "设'names'属性时种类(%s)出错"
 
-#: src/main/attrib.c:938
+#: src/main/attrib.c:1035
 msgid "'dimnames' applied to non-array"
 msgstr "'dimnames'只能用于陈列"
 
-#: src/main/attrib.c:943
-msgid "'dimnames' must be a list"
-msgstr "'dimnames'必需是串列"
+#: src/main/attrib.c:1040 src/main/coerce.c:2471
+#, fuzzy, c-format
+msgid "'%s' must be a list"
+msgstr "'%s'必需是串列"
 
-#: src/main/attrib.c:946 src/main/attrib.c:974
+#: src/main/attrib.c:1043 src/main/attrib.c:1071
 #, c-format
 msgid "length of 'dimnames' [%d] must match that of 'dims' [%d]"
 msgstr "'dimnames'的长度[%d]必需同'dims'的长度[%d]相等"
 
-#: src/main/attrib.c:980
+#: src/main/attrib.c:1077
 #, c-format
 msgid "invalid type (%s) for 'dimnames' (must be a vector)"
 msgstr "设'dimnames'时的种类(%s)不对(必需为矢量)"
 
-#: src/main/attrib.c:983
+#: src/main/attrib.c:1080
 #, c-format
 msgid "length of 'dimnames' [%d] not equal to array extent"
 msgstr "'dimnames'的长度[%d]必需与陈列范围相等"
 
-#: src/main/attrib.c:1055 src/main/builtin.c:75 src/main/builtin.c:112
-#: src/main/envir.c:1606 src/main/envir.c:1734 src/main/envir.c:1796
-#: src/main/envir.c:1918 src/main/paste.c:74 src/main/paste.c:293
-#: src/main/random.c:487 src/main/random.c:516 src/main/unique.c:1749
+#: src/main/attrib.c:1152 src/main/builtin.c:75 src/main/builtin.c:112
+#: src/main/envir.c:1740 src/main/envir.c:1868 src/main/envir.c:1928
+#: src/main/envir.c:2065 src/main/paste.c:74 src/main/paste.c:293
+#: src/main/random.c:479 src/main/random.c:508 src/main/unique.c:1746
 msgid "invalid first argument"
 msgstr "第一个参数不对"
 
-#: src/main/attrib.c:1058
+#: src/main/attrib.c:1155
 msgid "invalid second argument"
 msgstr "第二个参数不对"
 
-#: src/main/attrib.c:1066
+#: src/main/attrib.c:1163
 msgid "length-0 dimension vector is invalid"
 msgstr "不能有零长度的大小矢量"
 
-#: src/main/attrib.c:1071
+#: src/main/attrib.c:1168
 msgid "the dims contain missing values"
 msgstr "dims不能包含缺少值"
 
-#: src/main/attrib.c:1073
+#: src/main/attrib.c:1170
 msgid "the dims contain negative values"
 msgstr "dims不能包含负值级"
 
-#: src/main/attrib.c:1078
+#: src/main/attrib.c:1175
 msgid "dims do not match the length of object"
 msgstr "dims与对象长度不匹配"
 
-#: src/main/attrib.c:1080
+#: src/main/attrib.c:1177
 #, c-format
 msgid "dims [product %d] do not match the length of object [%d]"
 msgstr "dims [product %d]与对象长度[%d]不匹配"
 
-#: src/main/attrib.c:1177
+#: src/main/attrib.c:1284
 msgid "attributes must be a list or NULL"
 msgstr "属性必需是串列或NULL值"
 
-#: src/main/attrib.c:1182
+#: src/main/attrib.c:1289
 msgid "attributes must be named"
 msgstr "属性必需取名"
 
-#: src/main/attrib.c:1186
+#: src/main/attrib.c:1293
 #, c-format
 msgid "all attributes must have names [%d does not]"
 msgstr "所有的属性都必需有名字[%d没有]"
 
-#: src/main/attrib.c:1285
+#: src/main/attrib.c:1393
 msgid "'which' must be of mode character"
 msgstr "'which'属性的状态必需是字符"
 
-#: src/main/attrib.c:1287
+#: src/main/attrib.c:1395
 msgid "exactly one attribute 'which' must be given"
 msgstr "只能给一个'which'属性"
 
-#: src/main/attrib.c:1345 src/main/attrib.c:1368 src/main/subscript.c:240
-#: src/main/subscript.c:244 src/main/subset.c:1188 src/main/subset.c:1239
+#: src/main/attrib.c:1456 src/main/attrib.c:1479 src/main/subscript.c:245
+#: src/main/subscript.c:249 src/main/subset.c:1257 src/main/subset.c:1311
 #, c-format
 msgid "partial match of '%s' to '%s'"
 msgstr "'%s'部分匹配到'%s'"
 
-#: src/main/attrib.c:1406
+#: src/main/attrib.c:1525
 #, c-format
 msgid "invalid type '%s' for slot name"
 msgstr "槽名字的类别'%s'不对"
 
-#: src/main/attrib.c:1444
+#: src/main/attrib.c:1563
 msgid "'name' must be non-null character string"
 msgstr "'name'必需为非空字符"
 
-#: src/main/attrib.c:1568 src/main/attrib.c:1639 src/main/attrib.c:1676
+#: src/main/attrib.c:1688 src/main/attrib.c:1759 src/main/attrib.c:1797
 msgid "invalid type or length for slot name"
 msgstr "名字槽的类别或长度不对"
 
-#: src/main/attrib.c:1602
+#: src/main/attrib.c:1722
 #, c-format
 msgid "cannot get a slot (\"%s\") from an object of type \"%s\""
 msgstr "类别\"%2$s\"的对象中没有\"%1$s\"这样一个槽"
 
-#: src/main/attrib.c:1613
+#: src/main/attrib.c:1733
 #, c-format
 msgid "no slot of name \"%s\" for this object of class \"%s\""
 msgstr "\"%1$s\"槽名不存在于\"%2$s\"类别对象中"
 
-#: src/main/attrib.c:1630
+#: src/main/attrib.c:1750
 msgid "attempt to set slot on NULL object"
 msgstr "不能为NULL目标对象设属性"
 
-#: src/main/attrib.c:1671
+#: src/main/attrib.c:1792
 msgid "formal classes cannot be used without the 'methods' package"
 msgstr "一定要有'methods'程序包才能用正式类别"
 
-#: src/main/attrib.c:1683
+#: src/main/attrib.c:1804
 #, c-format
 msgid ""
 "trying to get slot \"%s\" from an object of a basic class (\"%s\") with no "
 "slots"
 msgstr "无法从没有槽的基本类别(\"%2$s\") 的对象中取得\"%1$s\"槽"
 
-#: src/main/attrib.c:1687
+#: src/main/attrib.c:1808
 #, c-format
 msgid ""
 "trying to get slot \"%s\" from an object (class \"%s\") that is not an S4 "
 "object "
 msgstr "非S4类别的对象(类别为\"%2$s\")没有\"%1$s\"这样的槽"
 
-#: src/main/bind.c:161
+#: src/main/bind.c:164
 #, c-format
 msgid "resulting vector exceeds vector length limit in '%s'"
 msgstr "'%s'产生了长度超过限制的矢量"
 
-#: src/main/bind.c:291 src/main/bind.c:327 src/main/bind.c:376
-#: src/main/bind.c:449 src/main/bind.c:477
+#: src/main/bind.c:294 src/main/bind.c:330 src/main/bind.c:379
+#: src/main/bind.c:452 src/main/bind.c:480
 #, c-format
 msgid "type '%s' is unimplemented in '%s'"
 msgstr "'%2$s'里目前还没有实现'%1$s'这一种类"
 
-#: src/main/bind.c:685
+#: src/main/bind.c:688
 msgid "repeated formal argument 'recursive'"
 msgstr "不能有重复的正式参数'recursive' "
 
-#: src/main/bind.c:696
+#: src/main/bind.c:699
 msgid "repeated formal argument 'use.names'"
 msgstr "不能有重复的正式参数'use.names' "
 
-#: src/main/bind.c:894
+#: src/main/bind.c:900
 msgid "argument not a list"
 msgstr "参数不是串列"
 
-#: src/main/bind.c:1038 src/main/eval.c:2691 src/main/eval.c:2700
-#: src/main/objects.c:318 src/main/objects.c:354 src/main/objects.c:729
-#: src/main/objects.c:746 src/main/objects.c:753
+#: src/main/bind.c:1044 src/main/names.c:1273 src/main/names.c:1278
+#: src/main/names.c:1283 src/main/names.c:1288
 #, c-format
 msgid "class name too long in '%s'"
 msgstr "'%s'里的类别名字太长"
 
-#: src/main/bind.c:1114
+#: src/main/bind.c:1128
 #, fuzzy, c-format
 msgid "cannot create a matrix from type '%s'"
 msgstr "无法按这些种类建立矩阵"
 
-#: src/main/bind.c:1185
+#: src/main/bind.c:1198
 #, c-format
 msgid "number of rows of matrices must match (see arg %d)"
 msgstr "矩阵的行数必需相符(见arg%d)"
 
-#: src/main/bind.c:1430
+#: src/main/bind.c:1455
 #, c-format
 msgid "number of columns of matrices must match (see arg %d)"
 msgstr "矩阵的列数必需相符(见arg%d)"
@@ -1276,212 +1294,247 @@ msgstr "矩阵的列数必需相符(见arg%d)"
 msgid "vector size cannot be NA"
 msgstr "矢量size不能是NA"
 
-#: src/main/builtin.c:49 src/main/builtin.c:57 src/main/sort.c:1303
+#: src/main/builtin.c:49 src/main/builtin.c:57 src/main/sort.c:1323
 msgid "vector size cannot be NA/NaN"
 msgstr "矢量大小不能是NA/NaN值"
 
-#: src/main/builtin.c:50 src/main/builtin.c:58 src/main/sort.c:1304
+#: src/main/builtin.c:50 src/main/builtin.c:58 src/main/sort.c:1324
 msgid "vector size cannot be infinite"
 msgstr "矢量大小不能是无限值"
 
-#: src/main/builtin.c:51 src/main/builtin.c:59 src/main/builtin.c:916
-#: src/main/sort.c:1305
+#: src/main/builtin.c:51 src/main/builtin.c:59 src/main/builtin.c:950
+#: src/main/sort.c:1325
 msgid "vector size specified is too large"
 msgstr "矢量size设得太大了"
 
-#: src/main/builtin.c:84 src/main/builtin.c:93 src/main/builtin.c:293
-#: src/main/builtin.c:326 src/main/builtin.c:365 src/main/builtin.c:375
-#: src/main/coerce.c:1537 src/main/connections.c:3066 src/main/engine.c:2967
-#: src/main/envir.c:993 src/main/envir.c:1046 src/main/envir.c:1136
-#: src/main/envir.c:1615 src/main/envir.c:1739 src/main/envir.c:1807
-#: src/main/envir.c:1925 src/main/envir.c:2582 src/main/envir.c:2642
-#: src/main/envir.c:2922 src/main/envir.c:2951 src/main/envir.c:2972
-#: src/main/envir.c:2995 src/main/envir.c:3030 src/main/envir.c:3051
-#: src/main/envir.c:3357 src/main/envir.c:3362 src/main/eval.c:5318
-#: src/main/objects.c:197 src/main/objects.c:203 src/main/saveload.c:2070
-#: src/main/saveload.c:2364 src/main/serialize.c:2709
+#: src/main/builtin.c:84 src/main/builtin.c:93 src/main/builtin.c:304
+#: src/main/builtin.c:337 src/main/builtin.c:394 src/main/builtin.c:408
+#: src/main/coerce.c:1536 src/main/connections.c:3062 src/main/engine.c:2987
+#: src/main/envir.c:1001 src/main/envir.c:1054 src/main/envir.c:1210
+#: src/main/envir.c:1749 src/main/envir.c:1873 src/main/envir.c:1939
+#: src/main/envir.c:2072 src/main/envir.c:2791 src/main/envir.c:2877
+#: src/main/envir.c:3182 src/main/envir.c:3211 src/main/envir.c:3232
+#: src/main/envir.c:3255 src/main/envir.c:3290 src/main/envir.c:3311
+#: src/main/envir.c:3632 src/main/envir.c:3637 src/main/eval.c:6251
+#: src/main/objects.c:191 src/main/objects.c:199 src/main/saveload.c:2072
+#: src/main/saveload.c:2364 src/main/serialize.c:2755
 msgid "use of NULL environment is defunct"
 msgstr "NULL环境不再有用"
 
-#: src/main/builtin.c:306
+#: src/main/builtin.c:250 src/main/builtin.c:263
+#, fuzzy
+msgid "argument is not a function"
+msgstr "参数不能是函数"
+
+#: src/main/builtin.c:317
 msgid "replacement object is not an environment"
 msgstr "替换对象不是环境"
 
-#: src/main/builtin.c:331
+#: src/main/builtin.c:342
 msgid "'enclos' must be an environment"
 msgstr "'enclos'必需是环境"
 
-#: src/main/builtin.c:352 src/main/builtin.c:370
+#: src/main/builtin.c:363 src/main/builtin.c:399
 msgid "argument is not an environment"
 msgstr "参数不是环境"
 
-#: src/main/builtin.c:354
+#: src/main/builtin.c:365
 msgid "the empty environment has no parent"
 msgstr "空环境没有父母环境"
 
-#: src/main/builtin.c:372
+#: src/main/builtin.c:401
 msgid "can not set parent of the empty environment"
 msgstr "无法为空环境设父母环境"
 
-#: src/main/builtin.c:380
+#: src/main/builtin.c:403
+#, fuzzy
+msgid "can not set the parent environment of a namespace"
+msgstr "无法为空环境设父母环境"
+
+#: src/main/builtin.c:405
+#, fuzzy
+msgid "can not set the parent environment of package imports"
+msgstr "无法为空环境设父母环境"
+
+#: src/main/builtin.c:413
 msgid "'parent' is not an environment"
 msgstr "'parent'不是环境"
 
-#: src/main/builtin.c:521 src/main/connections.c:3691
-#: src/main/connections.c:4068 src/main/connections.c:4102
-#: src/main/connections.c:4480 src/main/connections.c:4550
-#: src/main/connections.c:4759 src/main/connections.c:4763
-#: src/main/connections.c:5124 src/main/deparse.c:360 src/main/deparse.c:446
-#: src/main/serialize.c:2006
+#: src/main/builtin.c:556 src/main/connections.c:3687
+#: src/main/connections.c:4079 src/main/connections.c:4113
+#: src/main/connections.c:4491 src/main/connections.c:4561
+#: src/main/connections.c:4772 src/main/connections.c:4776
+#: src/main/connections.c:5199 src/main/deparse.c:369 src/main/deparse.c:458
+#: src/main/serialize.c:2045
 msgid "cannot write to this connection"
 msgstr "无法写入此链结"
 
-#: src/main/builtin.c:526 src/main/builtin.c:556
+#: src/main/builtin.c:561 src/main/builtin.c:591
 #, c-format
 msgid "invalid '%s' specification"
 msgstr "'%s'设定不对"
 
-#: src/main/builtin.c:543
+#: src/main/builtin.c:578
 msgid "non-positive 'fill' argument will be ignored"
 msgstr "略过负的'fill'参数值"
 
-#: src/main/builtin.c:618
+#: src/main/builtin.c:653
 #, c-format
 msgid "argument %d (type '%s') cannot be handled by 'cat'"
 msgstr "cat目前还不能处理%d(种类为'%s')参数"
 
-#: src/main/builtin.c:763
+#: src/main/builtin.c:797
 #, c-format
 msgid "vector: cannot make a vector of mode '%s'."
 msgstr "矢量: 无法建立状态为\"%s\"的矢量."
 
-#: src/main/builtin.c:789
+#: src/main/builtin.c:823
 msgid "cannot set length of non-vector"
 msgstr "不能设非矢量的长度"
 
-#: src/main/builtin.c:897 src/main/builtin.c:907 src/main/options.c:637
+#: src/main/builtin.c:931 src/main/builtin.c:941 src/main/options.c:659
 msgid "invalid argument"
 msgstr "参数不对"
 
-#: src/main/builtin.c:899 src/main/builtin.c:909 src/main/builtin.c:911
-#: src/main/character.c:366 src/main/coerce.c:2765
+#: src/main/builtin.c:933 src/main/builtin.c:943 src/main/builtin.c:945
+#: src/main/character.c:525 src/main/coerce.c:2832
 msgid "invalid value"
 msgstr "值不对"
 
-#: src/main/builtin.c:942 src/main/coerce.c:2478 src/main/coerce.c:2519
-#: src/main/eval.c:563 src/main/eval.c:683 src/main/eval.c:2099
-#: src/main/eval.c:2176 src/main/eval.c:2236 src/main/eval.c:2569
-#: src/main/eval.c:4694 src/main/eval.c:4814
+#: src/main/builtin.c:976 src/main/coerce.c:2541 src/main/coerce.c:2584
+#: src/main/eval.c:620 src/main/eval.c:740 src/main/eval.c:2266
+#: src/main/eval.c:2346 src/main/eval.c:2407 src/main/eval.c:2745
+#: src/main/eval.c:5584 src/main/eval.c:5701
 msgid "'...' used in an incorrect context"
 msgstr "'...'用在的上下文不对"
 
-#: src/main/builtin.c:963
+#: src/main/builtin.c:998
 #, c-format
 msgid "duplicate 'switch' defaults: '%s' and '%s'"
 msgstr "重复'switch'默认值:'%s'和'%s'"
 
-#: src/main/builtin.c:996
+#: src/main/builtin.c:1031
 msgid "'EXPR' is missing"
 msgstr "缺少'EXPR'"
 
-#: src/main/builtin.c:1000 src/main/eval.c:5155
+#: src/main/builtin.c:1035 src/main/eval.c:6056
 msgid "EXPR must be a length 1 vector"
 msgstr "EXPR必需是长度为一的矢量"
 
-#: src/main/builtin.c:1003
+#: src/main/builtin.c:1038 src/main/eval.c:6059
 #, c-format
 msgid ""
 "EXPR is a \"factor\", treated as integer.\n"
 " Consider using '%s' instead."
 msgstr ""
 
-#: src/main/character.c:105 src/main/character.c:108 src/main/character.c:132
-#: src/main/character.c:135
+#: src/main/builtin.c:1095 src/main/eval.c:6069 src/main/eval.c:6098
+#, fuzzy
+msgid "'switch' with no alternatives"
+msgstr "没有名字替代的'switch'需要数值EXPR"
+
+#: src/main/character.c:103 src/main/character.c:224
+#, fuzzy, c-format
+msgid "%d argument passed to '%s' which requires %d to %d"
+msgid_plural "%d arguments passed to '%s' which requires %d to %d"
+msgstr[0] "%d个参数给'%s',但它只需要%d个"
+
+#: src/main/character.c:110 src/main/character.c:113 src/main/character.c:232
+#: src/main/character.c:235
 #, c-format
 msgid "'%s' requires a character vector"
 msgstr "'%s'需要字符矢量"
 
-#: src/main/character.c:164
-#, c-format
-msgid ""
-"number of characters is not computable for element %d in \"bytes\" encoding"
-msgstr "\"bytes\"编码里无法为%%d元素计算字符数"
-
-#: src/main/character.c:169 src/main/character.c:197 src/main/character.c:653
-#: src/main/character.c:750
-#, c-format
-msgid "invalid multibyte string %d"
+#: src/main/character.c:150 src/main/character.c:165 src/main/character.c:175
+#: src/main/character.c:203
+#, fuzzy, c-format
+msgid "invalid multibyte string, %s"
 msgstr "多字节字符串%d有错"
 
-#: src/main/character.c:185
-#, c-format
-msgid "width is not computable for element %d in \"bytes\" encoding"
+#: src/main/character.c:159
+#, fuzzy, c-format
+msgid "number of characters is not computable in \"bytes\" encoding, %s"
+msgstr "\"bytes\"编码里无法为%%d元素计算字符数"
+
+#: src/main/character.c:188
+#, fuzzy, c-format
+msgid "width is not computable for %s in \"bytes\" encoding"
 msgstr "\"bytes\"编码里无法为%%d元素计算长度"
 
-#: src/main/character.c:263
+#: src/main/character.c:311
 msgid "extracting substrings from a non-character object"
 msgstr "无法从非字符对象里抽取子字串"
 
-#: src/main/character.c:268 src/main/character.c:363
+#: src/main/character.c:321 src/main/character.c:522
 msgid "invalid substring arguments"
 msgstr "子字符串参数不对"
 
-#: src/main/character.c:358
+#: src/main/character.c:361
+#, fuzzy
+msgid "non-character object(s)"
+msgstr "不能有非字符名字"
+
+#: src/main/character.c:517
 msgid "replacing substrings in a non-character object"
 msgstr "无法在非字符的对象里替换子字串"
 
-#: src/main/character.c:551
+#: src/main/character.c:785
 msgid "the first argument must be a character vector"
 msgstr "第一参数必需是字符矢量"
 
-#: src/main/character.c:570
+#: src/main/character.c:822
 msgid "abbreviate used with non-ASCII chars"
 msgstr "abbreviate不适用于非ASCII字元"
 
-#: src/main/character.c:591
+#: src/main/character.c:843
 msgid "non-character names"
 msgstr "不能有非字符名字"
 
-#: src/main/character.c:696 src/main/grep.c:159
+#: src/main/character.c:905 src/main/character.c:1002
+#, c-format
+msgid "invalid multibyte string %d"
+msgstr "多字节字符串%d有错"
+
+#: src/main/character.c:948 src/main/grep.c:163
 msgid "non-character argument"
 msgstr "非字符参数"
 
-#: src/main/character.c:805
+#: src/main/character.c:1057
 #, c-format
 msgid "decreasing range specification ('%lc-%lc')"
 msgstr "不能设定递减的范围('%lc-%lc')"
 
-#: src/main/character.c:891
+#: src/main/character.c:1143
 #, c-format
 msgid "decreasing range specification ('%c-%c')"
 msgstr "不能设定递减的范围('%c-%c')"
 
-#: src/main/character.c:1079
+#: src/main/character.c:1331
 msgid "invalid UTF-8 string 'old'"
 msgstr "UTF-8字符串'old'有错"
 
-#: src/main/character.c:1085
+#: src/main/character.c:1337
 msgid "invalid multibyte string 'old'"
 msgstr "多字节字符串'old'有错"
 
-#: src/main/character.c:1098
+#: src/main/character.c:1350
 msgid "invalid UTF-8 string 'new'"
 msgstr "UTF-8字符串'new'有错"
 
-#: src/main/character.c:1104
+#: src/main/character.c:1356
 msgid "invalid multibyte string 'new'"
 msgstr "多字节字符串'new'有错"
 
-#: src/main/character.c:1132 src/main/character.c:1221
+#: src/main/character.c:1384 src/main/character.c:1473
 msgid "'old' is longer than 'new'"
 msgstr "'old'比'new'要长"
 
-#: src/main/character.c:1164
+#: src/main/character.c:1416
 #, c-format
 msgid "invalid input multibyte string %d"
 msgstr "输入的多字节字符串%d有错"
 
-#: src/main/character.c:1271
+#: src/main/character.c:1523
 msgid "strtrim() requires a character vector"
 msgstr "strtrim()需要字符矢量"
 
@@ -1493,15 +1546,16 @@ msgstr "'mode'参数不对"
 msgid "applies only to lists and vectors"
 msgstr "只能用于串列和矢量"
 
-#: src/main/coerce.c:77 src/main/errors.c:1208
+#: src/main/coerce.c:77 src/main/errors.c:1194
 msgid "NAs introduced by coercion"
 msgstr "强制改变过程中产生了NA"
 
-#: src/main/coerce.c:79 src/main/errors.c:1209
-msgid "inaccurate integer conversion in coercion"
-msgstr "强制改变整数不精确"
+#: src/main/coerce.c:79
+#, fuzzy
+msgid "NAs introduced by coercion to integer range"
+msgstr "强制改变过程中产生了NA"
 
-#: src/main/coerce.c:81 src/main/errors.c:1210
+#: src/main/coerce.c:81 src/main/errors.c:1196
 msgid "imaginary parts discarded in coercion"
 msgstr "强制改变时丢弃了虚数部分"
 
@@ -1509,59 +1563,63 @@ msgstr "强制改变时丢弃了虚数部分"
 msgid "out-of-range values treated as 0 in coercion to raw"
 msgstr "在强制改变成原始值时,任何溢位值当作零来处理"
 
-#: src/main/coerce.c:414
+#: src/main/coerce.c:399
 #, c-format
 msgid "invalid data of mode '%s' (too short)"
 msgstr "数据状态为\"%s\"不对(太短了)"
 
-#: src/main/coerce.c:1016
+#: src/main/coerce.c:1002
 #, c-format
 msgid "'pairlist' object cannot be coerced to type '%s'"
 msgstr "'pairlist'对象不能被强制改变成'%s'种类"
 
-#: src/main/coerce.c:1134
+#: src/main/coerce.c:1120
 #, c-format
 msgid "(list) object cannot be coerced to type '%s'"
 msgstr "(串列)对象不能强制改变成'%s'种类"
 
-#: src/main/coerce.c:1157
+#: src/main/coerce.c:1143
 #, c-format
 msgid "(symbol) object cannot be coerced to type '%s'"
 msgstr "(符号)对象不能强制改变成'%s'种类"
 
-#: src/main/coerce.c:1173 src/main/coerce.c:1485
+#: src/main/coerce.c:1159 src/main/coerce.c:1484
 msgid "no method for coercing this S4 class to a vector"
 msgstr "没有可用来把这个S4类别强迫改为矢量的方法"
 
-#: src/main/coerce.c:1232
+#: src/main/coerce.c:1222
 msgid "environments cannot be coerced to other types"
 msgstr "环境不能被强制改变成其他种类"
 
-#: src/main/coerce.c:1379
+#: src/main/coerce.c:1374
 msgid "attempting to coerce non-factor"
 msgstr "不能强迫改变非因子"
 
-#: src/main/coerce.c:1533
+#: src/main/coerce.c:1379 src/main/coerce.c:1389
+msgid "malformed factor"
+msgstr ""
+
+#: src/main/coerce.c:1532
 msgid "list argument expected"
 msgstr "需要串列参数"
 
-#: src/main/coerce.c:1541 src/main/eval.c:5322
+#: src/main/coerce.c:1540 src/main/eval.c:6255
 msgid "invalid environment"
 msgstr "环境不对"
 
-#: src/main/coerce.c:1545
+#: src/main/coerce.c:1544
 msgid "argument must have length at least 1"
 msgstr "参数的长度至少要为一"
 
-#: src/main/coerce.c:1567
+#: src/main/coerce.c:1566
 msgid "invalid body for function"
 msgstr "函数定义本体不对"
 
-#: src/main/coerce.c:1590
+#: src/main/coerce.c:1589
 msgid "invalid length 0 argument"
 msgstr "长度为零的参数是不对的"
 
-#: src/main/coerce.c:1605
+#: src/main/coerce.c:1604
 msgid "invalid argument list"
 msgstr "参数串列不对"
 
@@ -1573,775 +1631,773 @@ msgstr "\"single\"种类目前在R里还没有实现"
 msgid "unimplemented predicate"
 msgstr "没有实现的谓词"
 
-#: src/main/coerce.c:2069
+#: src/main/coerce.c:2070
 #, c-format
 msgid "%s() applied to non-(list or vector) of type '%s'"
 msgstr "%s()不适用于类别为'%s'的非串列或非矢量"
 
-#: src/main/coerce.c:2212 src/main/coerce.c:2275 src/main/coerce.c:2343
+#: src/main/coerce.c:2267 src/main/coerce.c:2331 src/main/coerce.c:2403
 #, c-format
 msgid "default method not implemented for type '%s'"
 msgstr "没有为'%s'类型实现默认的方法"
 
-#: src/main/coerce.c:2361
+#: src/main/coerce.c:2425
 msgid "'name' is missing"
 msgstr "缺少'name'"
 
-#: src/main/coerce.c:2368
+#: src/main/coerce.c:2432
 msgid "first argument must be a character string"
 msgstr "第一个参数必需是字符串"
 
-#: src/main/coerce.c:2401
-msgid "'what' must be a character string or a function"
-msgstr "'what'必需是字符串或函数"
+#: src/main/coerce.c:2464
+#, fuzzy
+msgid "'what' must be a function or character string"
+msgstr "'text'必需为字符串"
 
-#: src/main/coerce.c:2405
+#: src/main/coerce.c:2468
 #, fuzzy
 msgid "'args' must be a list or expression"
 msgstr "'args'必需是串列"
 
-#: src/main/coerce.c:2408
-msgid "'args' must be a list"
-msgstr "'args'必需是串列"
-
-#: src/main/coerce.c:2412
+#: src/main/coerce.c:2475 src/main/unique.c:1345
 msgid "'envir' must be an environment"
 msgstr "'envir'必需是环境"
 
-#: src/main/coerce.c:2567
+#: src/main/coerce.c:2634
 msgid "invalid environment specified"
 msgstr "环境设定有错"
 
-#: src/main/coerce.c:2633
+#: src/main/coerce.c:2700
 msgid "Setting class(x) to NULL;   result will no longer be an S4 object"
 msgstr "把class(x)设成NULL;其结果不再是S4目标对象"
 
-#: src/main/coerce.c:2636
+#: src/main/coerce.c:2703
 #, c-format
 msgid ""
 "Setting class(x) to multiple strings (\"%s\", \"%s\", ...); result will no "
 "longer be an S4 object"
 msgstr "把class(x)设成多结字符串(\"%s\", \"%s\", ...); 其结果不再是S4目标对象"
 
-#: src/main/coerce.c:2640
+#: src/main/coerce.c:2707
 #, c-format
 msgid ""
 "Setting class(x) to \"%s\" sets attribute to NULL; result will no longer be "
 "an S4 object"
 msgstr "把class(x)设成\"%s\"集空属性; 其结果不再是S4目标对象"
 
-#: src/main/coerce.c:2673
+#: src/main/coerce.c:2740
 msgid "invalid replacement object to be a class string"
 msgstr "字符串类别的替换对象不对"
 
-#: src/main/coerce.c:2694
+#: src/main/coerce.c:2761
 #, c-format
 msgid ""
 "\"%s\" can only be set as the class if the object has this type; found \"%s\""
 msgstr "只有在对象有这一类别的情况下才能设\"%s\";不应该有\"%s\""
 
-#: src/main/coerce.c:2712
+#: src/main/coerce.c:2779
 #, c-format
 msgid ""
 "invalid to set the class to matrix unless the dimension attribute is of "
 "length 2 (was %d)"
 msgstr "除非维度的长度为二(目前是%d),否则不能设为矩阵类别"
 
-#: src/main/coerce.c:2720
+#: src/main/coerce.c:2787
 msgid ""
 "cannot set class to \"array\" unless the dimension attribute has length > 0"
 msgstr "除非维度的长度大于零,否则不能设为\"array\"类别"
 
-#: src/main/coerce.c:2756
+#: src/main/coerce.c:2823
 msgid "'value' must be non-null character string"
 msgstr "'value'必需为非空字符"
 
-#: src/main/coerce.c:2769
+#: src/main/coerce.c:2836
 msgid "invalid to change the storage mode of a factor"
 msgstr "不能改变因子的存储方式"
 
-#: src/main/complex.c:126
+#: src/main/complex.c:123
 msgid "invalid complex unary operator"
 msgstr "复数一进列运算符有错"
 
-#: src/main/complex.c:261
+#: src/main/complex.c:251
 msgid "unimplemented complex operation"
 msgstr "复数运算目前还没有实现"
 
-#: src/main/complex.c:363
+#: src/main/complex.c:353
 msgid "non-numeric argument to function"
 msgstr "函数不能有非数值参数"
 
-#: src/main/complex.c:827
+#: src/main/complex.c:822
 msgid "invalid polynomial coefficient"
 msgstr "多项式系数不对"
 
-#: src/main/complex.c:832
+#: src/main/complex.c:827
 msgid "root finding code failed"
 msgstr "寻根码运行失败"
 
-#: src/main/connections.c:153
+#: src/main/connections.c:150
 msgid "all connections are in use"
 msgstr "所有链结都已在运行"
 
-#: src/main/connections.c:164
+#: src/main/connections.c:161
 msgid "connection not found"
 msgstr "找不到链结"
 
-#: src/main/connections.c:175
+#: src/main/connections.c:172 src/main/connections.c:5213
 msgid "invalid connection"
 msgstr "链结不对"
 
-#: src/main/connections.c:207
+#: src/main/connections.c:204
 #, c-format
 msgid "closing unused connection %d (%s)\n"
 msgstr "关闭不再使用的链结%d(%s)\n"
 
-#: src/main/connections.c:232 src/main/sysutils.c:619 src/main/sysutils.c:806
-#: src/main/sysutils.c:821 src/main/sysutils.c:912 src/main/sysutils.c:927
-#: src/main/sysutils.c:1023 src/main/sysutils.c:1096 src/main/sysutils.c:1106
-#: src/main/sysutils.c:1119 src/main/sysutils.c:1516
+#: src/main/connections.c:229 src/main/sysutils.c:631 src/main/sysutils.c:834
+#: src/main/sysutils.c:849 src/main/sysutils.c:978 src/main/sysutils.c:1051
+#: src/main/sysutils.c:1061 src/main/sysutils.c:1074 src/main/sysutils.c:1472
 #, c-format
 msgid "unsupported conversion from '%s' to '%s'"
 msgstr "不支持'%s'到'%s'的这种转换"
 
-#: src/main/connections.c:288 src/main/connections.c:304
-#: src/main/connections.c:456 src/main/connections.c:462
-#: src/main/connections.c:468 src/main/connections.c:479
-#: src/main/connections.c:486
+#: src/main/connections.c:285 src/main/connections.c:300
+#: src/main/connections.c:451 src/main/connections.c:456
+#: src/main/connections.c:461 src/main/connections.c:472
+#: src/main/connections.c:478
 #, c-format
 msgid "%s not enabled for this connection"
 msgstr "%s对这个链结无效"
 
-#: src/main/connections.c:335 src/main/connections.c:352
-#: src/main/connections.c:2916
+#: src/main/connections.c:330 src/main/connections.c:347
+#: src/main/connections.c:2910
 msgid "printing of extremely long output is truncated"
 msgstr "缩短了极长输出的打印"
 
-#: src/main/connections.c:375
+#: src/main/connections.c:370
 msgid "invalid char string in output conversion"
 msgstr "输出转换字符串有错"
 
-#: src/main/connections.c:439
+#: src/main/connections.c:434
 #, c-format
 msgid "invalid input found on input connection '%s'"
 msgstr "输入链结'%s'内的输入不对"
 
-#: src/main/connections.c:580
+#: src/main/connections.c:571
 #, c-format
 msgid "cannot open file '%ls': %s"
 msgstr "无法打开文件'%ls': %s"
 
-#: src/main/connections.c:691
+#: src/main/connections.c:683
 msgid "connection is not open for reading"
 msgstr "链结没有打开,不能读"
 
-#: src/main/connections.c:696
+#: src/main/connections.c:688
 msgid "connection is not open for writing"
 msgstr "链结没有打开,不能写"
 
-#: src/main/connections.c:734 src/main/connections.c:2229
+#: src/main/connections.c:726 src/main/connections.c:2223
 msgid "can only truncate connections open for writing"
 msgstr "只能缩短已经打开了的可以写的链结"
 
-#: src/main/connections.c:738 src/main/connections.c:740
+#: src/main/connections.c:730 src/main/connections.c:732
 msgid "file truncation failed"
 msgstr "未能缩短文件"
 
-#: src/main/connections.c:742
+#: src/main/connections.c:734
 msgid "file truncation unavailable on this platform"
 msgstr "本平台上没有文件缩短功能"
 
-#: src/main/connections.c:788 src/main/connections.c:792
-#: src/main/connections.c:798 src/main/connections.c:815
+#: src/main/connections.c:780 src/main/connections.c:784
+#: src/main/connections.c:790 src/main/connections.c:807
 msgid "allocation of file connection failed"
 msgstr "文件链结分配失败"
 
-#: src/main/connections.c:866 src/main/connections.c:1044
+#: src/main/connections.c:858 src/main/connections.c:1035
 #, c-format
 msgid "cannot create fifo '%s', reason '%s'"
 msgstr "由于'%2$s'的原因,无法建立先进先出'%1$s'"
 
-#: src/main/connections.c:872
+#: src/main/connections.c:864
 #, c-format
 msgid "'%s' exists but is not a fifo"
 msgstr "'%s'存在但不是先进先出"
 
-#: src/main/connections.c:886
+#: src/main/connections.c:878
 #, c-format
 msgid "fifo '%s' is not ready"
 msgstr "先进先出'%s'还没有准备好"
 
-#: src/main/connections.c:887
+#: src/main/connections.c:879
 #, c-format
 msgid "cannot open fifo '%s'"
 msgstr "无法打开先进先出'%s'"
 
-#: src/main/connections.c:928 src/main/connections.c:939
-#: src/main/connections.c:1104 src/main/connections.c:1123
-#: src/main/connections.c:1531 src/main/connections.c:1541
-#: src/main/connections.c:1660 src/main/connections.c:1720
-#: src/main/connections.c:2246 src/main/connections.c:2263
-#: src/main/connections.c:2572 src/main/connections.c:5305
-#: src/main/connections.c:5369
+#: src/main/connections.c:920 src/main/connections.c:931
+#: src/main/connections.c:1095 src/main/connections.c:1114
+#: src/main/connections.c:1524 src/main/connections.c:1534
+#: src/main/connections.c:1653 src/main/connections.c:1713
+#: src/main/connections.c:2240 src/main/connections.c:2257
+#: src/main/connections.c:2566 src/main/connections.c:5385
+#: src/main/connections.c:5449
 msgid "too large a block specified"
 msgstr "区组太大"
 
-#: src/main/connections.c:998 src/main/connections.c:1004
+#: src/main/connections.c:989 src/main/connections.c:995
 #, fuzzy
 msgid "allocation of fifo name failed"
 msgstr "先进先出链结分配失败"
 
-#: src/main/connections.c:1066
+#: src/main/connections.c:1057
 #, fuzzy, c-format
 msgid "cannot open fifo '%s', reason '%s'"
 msgstr "无法打开URL'%s',原因是'%s'"
 
-#: src/main/connections.c:1107 src/main/connections.c:1131
+#: src/main/connections.c:1098 src/main/connections.c:1122
 #, fuzzy
 msgid "allocation of fifo buffer failed"
 msgstr "先进先出链结分配失败"
 
-#: src/main/connections.c:1139
+#: src/main/connections.c:1130
 #, fuzzy, c-format
 msgid "cannot write FIFO '%s'"
 msgstr "无法打开URL'%s'"
 
-#: src/main/connections.c:1175 src/main/connections.c:1179
-#: src/main/connections.c:1185 src/main/connections.c:1201
+#: src/main/connections.c:1166 src/main/connections.c:1170
+#: src/main/connections.c:1176 src/main/connections.c:1192
 msgid "allocation of fifo connection failed"
 msgstr "先进先出链结分配失败"
 
-#: src/main/connections.c:1219 src/main/connections.c:1377
-#: src/main/connections.c:1998 src/main/connections.c:3212
-#: src/main/connections.c:4967
+#: src/main/connections.c:1210 src/main/connections.c:1369
+#: src/main/connections.c:1991 src/main/connections.c:3205
+#: src/main/connections.c:4982
 msgid "only first element of 'description' argument used"
 msgstr "只用了'description'参数的第一个元素"
 
-#: src/main/connections.c:1236
+#: src/main/connections.c:1227
 msgid ""
 "fifo(\"\") only supports open = \"w+\" and open = \"w+b\": using the former"
 msgstr "fifo(\"\")只支持open = \"w+\"和open = \"w+b\"这两种模式:现在使用前者"
 
-#: src/main/connections.c:1250 src/main/connections.c:1414
-#: src/main/connections.c:2064 src/main/connections.c:3179
-#: src/main/connections.c:3232 src/main/connections.c:3280
-#: src/main/connections.c:3567 src/main/connections.c:3683
-#: src/main/connections.c:3844 src/main/connections.c:4095
-#: src/main/connections.c:4423 src/main/connections.c:4543
-#: src/main/connections.c:4755 src/main/connections.c:5105 src/main/dcf.c:94
-#: src/main/deparse.c:352 src/main/deparse.c:438 src/main/saveload.c:2267
-#: src/main/saveload.c:2350 src/main/scan.c:933 src/main/serialize.c:2175
-#: src/main/serialize.c:2226 src/main/source.c:265
+#: src/main/connections.c:1242 src/main/connections.c:1407
+#: src/main/connections.c:2058 src/main/connections.c:3175
+#: src/main/connections.c:3226 src/main/connections.c:3274
+#: src/main/connections.c:3563 src/main/connections.c:3679
+#: src/main/connections.c:3841 src/main/connections.c:4106
+#: src/main/connections.c:4434 src/main/connections.c:4554
+#: src/main/connections.c:4768 src/main/connections.c:5180 src/main/dcf.c:93
+#: src/main/deparse.c:361 src/main/deparse.c:450 src/main/saveload.c:2269
+#: src/main/saveload.c:2350 src/main/scan.c:933 src/main/serialize.c:2216
+#: src/main/serialize.c:2267 src/main/source.c:270
 msgid "cannot open the connection"
 msgstr "无法打开链结"
 
-#: src/main/connections.c:1265
+#: src/main/connections.c:1257
 msgid "fifo connections are not available on this system"
 msgstr "本系统没有先进先出链结这个功能"
 
-#: src/main/connections.c:1295
+#: src/main/connections.c:1287
 #, c-format
 msgid "cannot pipe() cmd '%ls': %s"
 msgstr "无法pipe()命令'%ls': %s"
 
-#: src/main/connections.c:1302
+#: src/main/connections.c:1294
 #, c-format
 msgid "cannot open pipe() cmd '%s': %s"
 msgstr "无法打开pipe()命令'%s': %s"
 
-#: src/main/connections.c:1471 src/main/connections.c:1791
+#: src/main/connections.c:1464 src/main/connections.c:1784
 #, c-format
 msgid "cannot open compressed file '%s', probable reason '%s'"
 msgstr "无法打开压缩文件'%s',可能是因为'%s'"
 
-#: src/main/connections.c:1511
+#: src/main/connections.c:1504
 msgid "whence = \"end\" is not implemented for gzfile connections"
 msgstr "whence = \"end\"不适用于gz文件链结"
 
-#: src/main/connections.c:1516
+#: src/main/connections.c:1509
 msgid "seek on a gzfile connection returned an internal error"
 msgstr "读取gz文件链结时内部出错"
 
-#: src/main/connections.c:1550 src/main/connections.c:1554
-#: src/main/connections.c:1560 src/main/connections.c:1577
+#: src/main/connections.c:1543 src/main/connections.c:1547
+#: src/main/connections.c:1553 src/main/connections.c:1570
 msgid "allocation of gzfile connection failed"
 msgstr "分配gz文件链结失败"
 
-#: src/main/connections.c:1606
+#: src/main/connections.c:1599
 #, c-format
 msgid "cannot open bzip2-ed file '%s', probable reason '%s'"
 msgstr "无法打开bzip2压缩文件'%s',原因可能是'%s'"
 
-#: src/main/connections.c:1615
+#: src/main/connections.c:1608
 #, c-format
 msgid "file '%s' appears not to be compressed by bzip2"
 msgstr "文件'%s'看起来不象是bzip2类"
 
-#: src/main/connections.c:1624
+#: src/main/connections.c:1617
 #, c-format
 msgid "initializing bzip2 compression for file '%s' failed"
 msgstr "在开始给'%s'文件进行bzip2压缩时出现了错误"
 
-#: src/main/connections.c:1678
+#: src/main/connections.c:1671
 msgid "allocation of overflow buffer for bzfile failed"
 msgstr "为bzfile分配溢出缓冲区失败"
 
-#: src/main/connections.c:1685
+#: src/main/connections.c:1678
 #, c-format
 msgid ""
 "file '%s' has trailing content that appears not to be compressed by bzip2"
 msgstr "文件'%s'结尾的内容看起来不是由bzip2压缩的"
 
-#: src/main/connections.c:1731 src/main/connections.c:1735
-#: src/main/connections.c:1741 src/main/connections.c:1758
+#: src/main/connections.c:1724 src/main/connections.c:1728
+#: src/main/connections.c:1734 src/main/connections.c:1751
 msgid "allocation of bzfile connection failed"
 msgstr "分配bz文件链结失败"
 
-#: src/main/connections.c:1804 src/main/connections.c:5961
+#: src/main/connections.c:1797 src/main/connections.c:6046
 #, c-format
 msgid "cannot initialize lzma decoder, error %d"
 msgstr "无法为lzma译码器进行初始化,错误是%d"
 
-#: src/main/connections.c:1820
+#: src/main/connections.c:1813
 #, c-format
 msgid "cannot initialize lzma encoder, error %d"
 msgstr "无法为lzma编码器进行初始化,错误是%d "
 
-#: src/main/connections.c:1948 src/main/connections.c:1952
-#: src/main/connections.c:1958 src/main/connections.c:1976
+#: src/main/connections.c:1941 src/main/connections.c:1945
+#: src/main/connections.c:1951 src/main/connections.c:1969
 msgid "allocation of xzfile connection failed"
 msgstr "分配xzfile文件链结失败"
 
-#: src/main/connections.c:2035
+#: src/main/connections.c:2028
 #, c-format
 msgid "this is a %s-compressed file which this build of R does not support"
 msgstr "这一版本的R不支持%s-压缩文件"
 
-#: src/main/connections.c:2130 src/modules/X11/devX11.c:3375
+#: src/main/connections.c:2124 src/modules/X11/devX11.c:3381
 msgid "memory allocation to copy clipboard failed"
 msgstr "抄写裁剪板时内存分配失败"
 
-#: src/main/connections.c:2135 src/modules/X11/devX11.c:3354
-#: src/modules/X11/devX11.c:3359
+#: src/main/connections.c:2129 src/modules/X11/devX11.c:3360
+#: src/modules/X11/devX11.c:3365
 msgid "clipboard cannot be opened or contains no text"
 msgstr "打不开裁剪板,或是裁剪板不含文字"
 
-#: src/main/connections.c:2146
+#: src/main/connections.c:2140
 msgid "memory allocation to open clipboard failed"
 msgstr "打开裁剪板时内存分配失败"
 
-#: src/main/connections.c:2174
+#: src/main/connections.c:2168
 msgid "unable to open the clipboard"
 msgstr "无法打开裁剪板"
 
-#: src/main/connections.c:2178
+#: src/main/connections.c:2172
 msgid "unable to write to the clipboard"
 msgstr "无法写入裁剪板"
 
-#: src/main/connections.c:2218
+#: src/main/connections.c:2212
 msgid "attempt to seek outside the range of the clipboard"
 msgstr "无法读取裁剪板范围外的内容"
 
-#: src/main/connections.c:2261
+#: src/main/connections.c:2255
 msgid "clipboard connection is open for reading only"
 msgstr "打开了只读裁剪板链结"
 
-#: src/main/connections.c:2281
+#: src/main/connections.c:2275
 msgid "clipboard buffer is full and output lost"
 msgstr "裁剪板缓冲区已满,丢失了输出"
 
-#: src/main/connections.c:2302
+#: src/main/connections.c:2296
 msgid "'mode' for the clipboard must be 'r' or 'w'"
 msgstr "裁剪板'mode'必需是'r'或'w'"
 
-#: src/main/connections.c:2305
+#: src/main/connections.c:2299
 msgid "'mode' for the clipboard must be 'r' on Unix"
 msgstr "Unix操作系统上裁剪板'mode'必需是'r'"
 
-#: src/main/connections.c:2308 src/main/connections.c:2314
-#: src/main/connections.c:2320 src/main/connections.c:2337
+#: src/main/connections.c:2302 src/main/connections.c:2308
+#: src/main/connections.c:2314 src/main/connections.c:2331
 msgid "allocation of clipboard connection failed"
 msgstr "裁剪板链结分配失败"
 
-#: src/main/connections.c:2406 src/main/connections.c:2410
-#: src/main/connections.c:2416
+#: src/main/connections.c:2400 src/main/connections.c:2404
+#: src/main/connections.c:2410
 msgid "allocation of terminal connection failed"
 msgstr "终端链结分配失败"
 
-#: src/main/connections.c:2549
+#: src/main/connections.c:2543
 msgid "attempting to add too many elements to raw vector"
 msgstr "不能给原始矢量加大多元素"
 
-#: src/main/connections.c:2601
+#: src/main/connections.c:2595
 msgid "attempt to seek outside the range of the raw connection"
 msgstr "无法读取原始链结范围外的内容"
 
-#: src/main/connections.c:2612 src/main/connections.c:2616
-#: src/main/connections.c:2622 src/main/connections.c:2648
+#: src/main/connections.c:2606 src/main/connections.c:2610
+#: src/main/connections.c:2616 src/main/connections.c:2642
 msgid "allocation of raw connection failed"
 msgstr "原始链结分配失败"
 
-#: src/main/connections.c:2701
+#: src/main/connections.c:2695
 msgid "'con' is not a rawConnection"
 msgstr "'con'不是rawConnection"
 
-#: src/main/connections.c:2704
+#: src/main/connections.c:2698
 msgid "'con' is not an output rawConnection"
 msgstr "'con'不是输出链结rawConnection"
 
-#: src/main/connections.c:2742
+#: src/main/connections.c:2736
 msgid "too many characters for text connection"
 msgstr "字符太多了,无法用文字链结"
 
-#: src/main/connections.c:2747
+#: src/main/connections.c:2741
 msgid "cannot allocate memory for text connection"
 msgstr "无法给文字链结分配内存"
 
-#: src/main/connections.c:2796
+#: src/main/connections.c:2790
 msgid "seek is not relevant for text connection"
 msgstr "读取不适用于文字链结"
 
-#: src/main/connections.c:2804 src/main/connections.c:2808
-#: src/main/connections.c:2814 src/main/connections.c:2827
-#: src/main/connections.c:3012 src/main/connections.c:3016
-#: src/main/connections.c:3022 src/main/connections.c:3035
-#: src/main/connections.c:3041
+#: src/main/connections.c:2798 src/main/connections.c:2802
+#: src/main/connections.c:2808 src/main/connections.c:2821
+#: src/main/connections.c:3008 src/main/connections.c:3012
+#: src/main/connections.c:3018 src/main/connections.c:3031
+#: src/main/connections.c:3037
 msgid "allocation of text connection failed"
 msgstr "文字链结分配失败"
 
-#: src/main/connections.c:2989
+#: src/main/connections.c:2983
 msgid "text connection: appending to a non-existent char vector"
 msgstr "文字链结: 不能符加给不存在的字符矢量"
 
-#: src/main/connections.c:3093
+#: src/main/connections.c:3089
 msgid "unsupported mode"
 msgstr "不支持此状态"
 
-#: src/main/connections.c:3115
+#: src/main/connections.c:3111
 msgid "'con' is not a textConnection"
 msgstr "'con'不是链结"
 
-#: src/main/connections.c:3118
+#: src/main/connections.c:3114
 msgid "'con' is not an output textConnection"
 msgstr "'con'不是输出链结"
 
-#: src/main/connections.c:3192
-msgid "sockets are not available on this system"
-msgstr "本系统没有插坐这个功能"
-
-#: src/main/connections.c:3260 src/main/connections.c:3309
-#: src/main/connections.c:3320 src/main/connections.c:3367
-#: src/main/connections.c:3392 src/main/connections.c:3415
-#: src/main/connections.c:3427 src/main/connections.c:3543
-#: src/main/connections.c:3668 src/main/connections.c:5408
+#: src/main/connections.c:3254 src/main/connections.c:3303
+#: src/main/connections.c:3314 src/main/connections.c:3361
+#: src/main/connections.c:3388 src/main/connections.c:3411
+#: src/main/connections.c:3423 src/main/connections.c:3539
+#: src/main/connections.c:3664 src/main/connections.c:5489
 msgid "'con' is not a connection"
 msgstr "'con'不是链结"
 
-#: src/main/connections.c:3263
+#: src/main/connections.c:3257
 msgid "cannot open standard connections"
 msgstr "无法打开标准链结"
 
-#: src/main/connections.c:3265
+#: src/main/connections.c:3259
 msgid "connection is already open"
 msgstr "链结已打开"
 
-#: src/main/connections.c:3298
+#: src/main/connections.c:3292
 msgid "unknown 'rw' value"
 msgstr "没有这样的'rw'值"
 
-#: src/main/connections.c:3369
+#: src/main/connections.c:3363
 msgid "cannot close standard connections"
 msgstr "无法关闭标准链结"
 
-#: src/main/connections.c:3372
+#: src/main/connections.c:3366
 msgid "cannot close 'output' sink connection"
 msgstr "无法关闭'output'汇集链结"
 
-#: src/main/connections.c:3374
+#: src/main/connections.c:3368
 msgid "cannot close 'message' sink connection"
 msgstr "无法关闭'message'汇集链结"
 
-#: src/main/connections.c:3394 src/main/connections.c:5123
-#: src/main/connections.c:5131 src/main/serialize.c:1996
-#: src/main/serialize.c:2004
+#: src/main/connections.c:3390 src/main/connections.c:5198
+#: src/main/connections.c:5206 src/main/serialize.c:2035
+#: src/main/serialize.c:2043
 msgid "connection is not open"
 msgstr "链结没有打开"
 
-#: src/main/connections.c:3490 src/main/connections.c:3502
+#: src/main/connections.c:3486 src/main/connections.c:3498
 msgid "line longer than buffer size"
 msgstr "行要比缓冲区要大"
 
-#: src/main/connections.c:3574 src/main/connections.c:3576
-#: src/main/connections.c:3852 src/main/connections.c:4406
-#: src/main/connections.c:4431 src/main/connections.c:5132 src/main/dcf.c:101
-#: src/main/scan.c:936 src/main/scan.c:940 src/main/serialize.c:1998
-#: src/main/source.c:272
+#: src/main/connections.c:3570 src/main/connections.c:3572
+#: src/main/connections.c:3849 src/main/connections.c:4417
+#: src/main/connections.c:4442 src/main/connections.c:5207 src/main/dcf.c:100
+#: src/main/scan.c:936 src/main/scan.c:940 src/main/serialize.c:2037
+#: src/main/source.c:277
 msgid "cannot read from this connection"
 msgstr "无法从此链结读取"
 
-#: src/main/connections.c:3588 src/main/connections.c:3610
+#: src/main/connections.c:3584 src/main/connections.c:3606
 msgid "cannot allocate buffer in readLines"
 msgstr "无法给readLines分配缓冲区"
 
-#: src/main/connections.c:3623
+#: src/main/connections.c:3619
 #, c-format
 msgid "line %d appears to contain an embedded nul"
 msgstr ""
 
-#: src/main/connections.c:3640
+#: src/main/connections.c:3636
 #, c-format
 msgid "incomplete final line found on '%s'"
 msgstr "读'%s'时最后一行未遂"
 
-#: src/main/connections.c:3646
+#: src/main/connections.c:3642
 msgid "too few lines read in readLines"
 msgstr "readLines读的行数不够"
 
-#: src/main/connections.c:3749
+#: src/main/connections.c:3746
 msgid "incomplete string at end of file has been discarded"
 msgstr "略过文件末不完整的字符串"
 
-#: src/main/connections.c:3755
+#: src/main/connections.c:3752
 msgid "null terminator not found: breaking string at 10000 bytes"
 msgstr "没有null终止符: 字符串截断于10000个字节"
 
-#: src/main/connections.c:3820
+#: src/main/connections.c:3817
 msgid "can only read from a binary connection"
 msgstr "无法读二进列链结"
 
-#: src/main/connections.c:3869 src/main/connections.c:4176
+#: src/main/connections.c:3866 src/main/connections.c:4187
 msgid "size changing is not supported for complex vectors"
 msgstr "不支持复数矢量大小的改变"
 
-#: src/main/connections.c:3907 src/main/connections.c:3925
-#: src/main/connections.c:3951 src/main/connections.c:4010
-#: src/main/connections.c:4030 src/main/connections.c:4157
-#: src/main/connections.c:4170 src/main/connections.c:4229
-#: src/main/connections.c:4261
+#: src/main/connections.c:3905 src/main/connections.c:3923
+#: src/main/connections.c:3949 src/main/connections.c:3993
+#: src/main/connections.c:4024 src/main/connections.c:4044
+#: src/main/connections.c:4168 src/main/connections.c:4181
+#: src/main/connections.c:4240 src/main/connections.c:4272
 #, c-format
 msgid "size %d is unknown on this machine"
 msgstr "本系统没有%d这样大小的值"
 
-#: src/main/connections.c:3936
+#: src/main/connections.c:3934
 msgid "raw is always of size 1"
 msgstr "raw的大小只能是一"
 
-#: src/main/connections.c:3959
+#: src/main/connections.c:3957
 msgid "'signed = FALSE' is only valid for integers of sizes 1 and 2"
 msgstr "'signed = FALSE'唯一有效的尺寸是1和2"
 
-#: src/main/connections.c:4060
+#: src/main/connections.c:4071
 msgid "'x' is not an atomic vector type"
 msgstr "'x'非基元矢量种类"
 
-#: src/main/connections.c:4066
+#: src/main/connections.c:4077
 msgid "can only write to a binary connection"
 msgstr "只能写入二进列链结"
 
-#: src/main/connections.c:4085
+#: src/main/connections.c:4096
 msgid "only 2^31-1 bytes can be written to a raw vector"
 msgstr "写原始矢量最多只能用2^31-1字节"
 
-#: src/main/connections.c:4087
+#: src/main/connections.c:4098
 msgid "only 2^31-1 bytes can be written in a single writeBin() call"
 msgstr "单次调用writeBin()的话最多只能写2^31-1字节"
 
-#: src/main/connections.c:4136 src/main/connections.c:4289
-#: src/main/connections.c:4570 src/main/connections.c:4610
+#: src/main/connections.c:4147 src/main/connections.c:4300
+#: src/main/connections.c:4581 src/main/connections.c:4621
 msgid "problem writing to connection"
 msgstr "写入链结有问题"
 
-#: src/main/connections.c:4181
+#: src/main/connections.c:4192
 msgid "size changing is not supported for raw vectors"
 msgstr "不支持原始矢量大小的改变"
 
-#: src/main/connections.c:4324 src/main/connections.c:4328
-#: src/main/connections.c:4367
+#: src/main/connections.c:4335 src/main/connections.c:4339
+#: src/main/connections.c:4378
 msgid "invalid UTF-8 input in readChar()"
 msgstr "readChar()的UTF-8输入有错"
 
-#: src/main/connections.c:4434
+#: src/main/connections.c:4445
 msgid "can only read in bytes in a non-UTF-8 MBCS locale"
 msgstr "在non-UTF-8 MBCS语言环境里只能读取字节"
 
-#: src/main/connections.c:4506
+#: src/main/connections.c:4517
 msgid "'object' is too short"
 msgstr "'object'太短"
 
-#: src/main/connections.c:4559
+#: src/main/connections.c:4570
 msgid "writeChar: more bytes requested than are in the string - will zero-pad"
 msgstr "writeChar:字符串的长度比需要的字节数目短-用零来补上"
 
-#: src/main/connections.c:4584
+#: src/main/connections.c:4595
 msgid ""
 "writeChar: more characters requested than are in the string - will zero-pad"
 msgstr "writeChar:字符串的长度比需要的字节数目短-用零来补上"
 
-#: src/main/connections.c:4638
+#: src/main/connections.c:4649
 msgid "maximum number of pushback lines exceeded"
 msgstr "超出推回线的最大数量"
 
-#: src/main/connections.c:4644 src/main/connections.c:4648
-#: src/main/connections.c:4685 src/main/connections.c:4693
+#: src/main/connections.c:4655 src/main/connections.c:4659
+#: src/main/connections.c:4696 src/main/connections.c:4704
 msgid "could not allocate space for pushback"
 msgstr "无法为推回分配空间"
 
-#: src/main/connections.c:4676
+#: src/main/connections.c:4687
 msgid "can only push back on open readable connections"
 msgstr "只能推回已打开的可读链结"
 
-#: src/main/connections.c:4678
+#: src/main/connections.c:4689
 msgid "can only push back on text-mode connections"
 msgstr "只能推回文字状态的链结"
 
-#: src/main/connections.c:4740 src/main/connections.c:4810
+#: src/main/connections.c:4753 src/main/connections.c:4823
 msgid "sink stack is full"
 msgstr "汇集堆叠满了"
 
-#: src/main/connections.c:4743
+#: src/main/connections.c:4756
 msgid "cannot switch output to stdin"
 msgstr "无法将输出转到stdin"
 
-#: src/main/connections.c:4770
+#: src/main/connections.c:4783
 msgid "no sink to remove"
 msgstr "没有可以除去的汇集"
 
-#: src/main/connections.c:4892
+#: src/main/connections.c:4903
 msgid "there is no connection NA"
 msgstr "没有NA链结"
 
-#: src/main/connections.c:4894
+#: src/main/connections.c:4905
 #, c-format
 msgid "there is no connection %d"
 msgstr "没有%d链结"
 
-#: src/main/connections.c:5029
+#: src/main/connections.c:5039
+#, fuzzy
+msgid "method = \"wininet\" is only supported on Windows"
+msgstr "本平台不支持nsl()"
+
+#: src/main/connections.c:5103
 msgid ""
 "file(\"\") only supports open = \"w+\" and open = \"w+b\": using the former"
 msgstr "file(\"\")只支持open = \"w+\"和open = \"w+b\"这两种模式:现在使用前者"
 
-#: src/main/connections.c:5083 src/modules/internet/internet.c:115
-#: src/modules/internet/internet.c:569
-msgid "unsupported URL scheme"
-msgstr "不支持这种URL方案"
+#: src/main/connections.c:5157
+#, fuzzy
+msgid "URL scheme unsupported by this method"
+msgstr "本平台不支持ICU"
 
-#: src/main/connections.c:5173
+#: src/main/connections.c:5253
 msgid "file stream does not have gzip magic number"
 msgstr "文件串流没有gzip幻数"
 
-#: src/main/connections.c:5184
+#: src/main/connections.c:5264
 msgid "file stream does not have valid gzip header"
 msgstr "文件串流的gzip表头有错"
 
-#: src/main/connections.c:5249
+#: src/main/connections.c:5329
 msgid "writing error whilst flushing 'gzcon' connection"
 msgstr "清除'gzcon'链结时书写出错"
 
-#: src/main/connections.c:5351
+#: src/main/connections.c:5431
 #, c-format
 msgid "crc error %x %x\n"
 msgstr "crc错误%x%x\n"
 
-#: src/main/connections.c:5378
+#: src/main/connections.c:5458
 msgid "write error on 'gzcon' connection"
 msgstr "'gzcon'链结书写出错"
 
-#: src/main/connections.c:5412
+#: src/main/connections.c:5493
 msgid "'level' must be one of 0 ... 9"
 msgstr "'level’必需是0 ... 9之一"
 
-#: src/main/connections.c:5415
+#: src/main/connections.c:5496
 msgid "'allowNonCompression' must be TRUE or FALSE"
 msgstr "'allowNonCompression'的值要么是TRUE要么是FALSE"
 
-#: src/main/connections.c:5418
+#: src/main/connections.c:5499
+#, fuzzy
+msgid "'text' must be TRUE or FALSE"
+msgstr "'all.x'必需是TRUE或FALSE"
+
+#: src/main/connections.c:5502
 msgid "this is already a 'gzcon' connection"
 msgstr "这已经是'gzcon'链结"
 
-#: src/main/connections.c:5424
+#: src/main/connections.c:5508
 msgid "can only use read- or write- binary connections"
 msgstr "只用读或写的二进列链结"
 
-#: src/main/connections.c:5427
+#: src/main/connections.c:5511
 msgid "using a text-mode 'file' connection may not work correctly"
 msgstr "文字方式的'file'联结有可能会出错"
 
-#: src/main/connections.c:5430
+#: src/main/connections.c:5514
 msgid ""
 "cannot create a 'gzcon' connection from a writable textConnection; maybe use "
 "rawConnection"
 msgstr "不能创建一个可写的textConnection的'gzcon'连接;试用rawConnection一下"
 
-#: src/main/connections.c:5433 src/main/connections.c:5437
-#: src/main/connections.c:5444 src/main/connections.c:5458
+#: src/main/connections.c:5517 src/main/connections.c:5521
+#: src/main/connections.c:5528 src/main/connections.c:5542
 msgid "allocation of 'gzcon' connection failed"
 msgstr "分配'gzcon'链结失败"
 
-#: src/main/connections.c:5644
+#: src/main/connections.c:5729
 msgid "not a list of sockets"
 msgstr "非插坐串列"
 
-#: src/main/connections.c:5649
+#: src/main/connections.c:5734
 msgid "bad write indicators"
 msgstr "书写指示器有错"
 
-#: src/main/connections.c:5660
+#: src/main/connections.c:5745
 msgid "not a socket connection"
 msgstr "非插坐链结"
 
-#: src/main/connections.c:5905
+#: src/main/connections.c:5990
 msgid "unknown compression, assuming none"
 msgstr "不知道这种压缩格式,因此假设没有压缩"
 
-#: src/main/connections.c:6023 src/main/connections.c:6027
-#: src/main/connections.c:6033
+#: src/main/connections.c:6108 src/main/connections.c:6112
+#: src/main/connections.c:6118
 #, c-format
 msgid "allocation of %s connection failed"
 msgstr "链结%s分配失败"
 
-#: src/main/context.c:282
+#: src/main/context.c:316
 msgid "no loop for break/next, jumping to top level"
 msgstr "没有可中断/下一步骤的循环, 跳到最高层"
 
-#: src/main/context.c:290
+#: src/main/context.c:324
 msgid "no function to return from, jumping to top level"
 msgstr "没有可回归的函数, 跳到最高层"
 
-#: src/main/context.c:302
+#: src/main/context.c:339
 msgid "target context is not on the stack"
 msgstr "目标上下文不在堆叠上"
 
-#: src/main/context.c:324 src/main/context.c:340 src/main/context.c:407
-#: src/main/context.c:428 src/main/context.c:440 src/main/context.c:452
+#: src/main/context.c:361 src/main/context.c:377 src/main/context.c:444
+#: src/main/context.c:465 src/main/context.c:477 src/main/context.c:489
 msgid "not that many frames on the stack"
 msgstr "堆叠上没有这么多的环境框"
 
-#: src/main/context.c:357
+#: src/main/context.c:394
 msgid "only positive values of 'n' are allowed"
 msgstr "'n'只允许是正数"
 
-#: src/main/context.c:478
-msgid "no function to restart"
-msgstr "没有重新开始的功能"
-
-#: src/main/context.c:515
+#: src/main/context.c:526
 msgid "number of contexts must be positive"
 msgstr "上下文数目必需是正数"
 
-#: src/main/context.c:528
+#: src/main/context.c:539
 msgid "no browser context to query"
 msgstr "询问缺乏浏览器上下文"
 
-#: src/main/context.c:546
+#: src/main/context.c:557
 msgid "not that many calls to browser are active"
 msgstr "没有么多浏览器得指令"
 
-#: src/main/context.c:560
+#: src/main/context.c:571
 msgid "not that many functions on the call stack"
 msgstr "堆叠上没有这么多函数"
 
-#: src/main/context.c:645
+#: src/main/context.c:656
 msgid "internal error in 'do_sys'"
 msgstr "'do_sys'里发生了内部错误"
 
@@ -2349,37 +2405,37 @@ msgstr "'do_sys'里发生了内部错误"
 msgid "integer overflow in 'cumsum'; use 'cumsum(as.numeric(.))'"
 msgstr "'cumsum'中整数上溢;请用'cumsum(as.numeric(.))'"
 
-#: src/main/cum.c:178
-msgid "'cummin' not defined for complex numbers"
-msgstr "'cummin'不适用于复数"
-
-#: src/main/cum.c:181
+#: src/main/cum.c:179
 msgid "'cummax' not defined for complex numbers"
 msgstr "'cummax'不适用于复数"
 
-#: src/main/cum.c:206 src/main/cum.c:230
+#: src/main/cum.c:182
+msgid "'cummin' not defined for complex numbers"
+msgstr "'cummin'不适用于复数"
+
+#: src/main/cum.c:209 src/main/cum.c:236
 msgid "unknown cumxxx function"
 msgstr "没有cumxxx这个功能"
 
-#: src/main/datetime.c:548 src/main/datetime.c:556 src/main/datetime.c:570
-#: src/main/datetime.c:575
+#: src/main/datetime.c:554 src/main/datetime.c:562 src/main/datetime.c:576
+#: src/main/datetime.c:581
 msgid "problem with setting timezone"
 msgstr "设定时区时出了问题"
 
-#: src/main/datetime.c:560
+#: src/main/datetime.c:566
 msgid "cannot set timezones on this system"
 msgstr "无法为本系统设时差区"
 
-#: src/main/datetime.c:582 src/main/datetime.c:584
+#: src/main/datetime.c:588 src/main/datetime.c:590
 msgid "problem with unsetting timezone"
 msgstr "取消时区设制时出了问题"
 
-#: src/main/datetime.c:804 src/main/datetime.c:806 src/main/datetime.c:901
-#: src/main/datetime.c:1240 src/main/datetime.c:1242
+#: src/main/datetime.c:810 src/main/datetime.c:812 src/main/datetime.c:908
+#: src/main/datetime.c:1258 src/main/datetime.c:1260
 msgid "zero-length component in non-empty \"POSIXlt\" structure"
 msgstr "非空的\"POSIXlt\"结构里含长度为零的部件"
 
-#: src/main/dcf.c:113 src/main/dcf.c:181 src/main/dcf.c:253
+#: src/main/dcf.c:112 src/main/dcf.c:181 src/main/dcf.c:253
 msgid "could not allocate memory for 'read.dcf'"
 msgstr "无法为'read.dcf'分配内存"
 
@@ -2393,78 +2449,84 @@ msgstr "在记录开始的地方'%s ...'不能有连续行"
 msgid "Line starting '%s ...' is malformed!"
 msgstr "畸形'%s ...'开头行!"
 
-#: src/main/debug.c:45
-msgid "argument must be a closure"
-msgstr "参数必需为闭合"
-
-#: src/main/debug.c:76
+#: src/main/debug.c:46 src/main/debug.c:76
 msgid "argument must be a function"
 msgstr "参数必需为函数"
 
-#: src/main/debug.c:132 src/main/debug.c:166 src/main/debug.c:224
+#: src/main/debug.c:111
+#, fuzzy, c-format
+msgid "Value for '%s' must be TRUE or FALSE"
+msgstr "'all.x'必需是TRUE或FALSE"
+
+#: src/main/debug.c:139 src/main/debug.c:167 src/main/debug.c:241
 msgid "argument must not be a function"
 msgstr "参数不能是函数"
 
-#: src/main/debug.c:135
+#: src/main/debug.c:142
 msgid "cannot trace NULL"
 msgstr "无法跟踪NULL值"
 
-#: src/main/debug.c:139
+#: src/main/debug.c:146
 msgid "'tracemem' is not useful for promise and environment objects"
 msgstr "'tracemem'对允諾和环境对象没有作用"
 
-#: src/main/debug.c:142
+#: src/main/debug.c:149
 msgid "'tracemem' is not useful for weak reference or external pointer objects"
 msgstr "'tracemem'对弱引用或外指针对象没有作用"
 
-#: src/main/debug.c:148 src/main/debug.c:171
+#: src/main/debug.c:180 src/main/debug.c:187
 msgid "R was not compiled with support for memory profiling"
 msgstr "在编译R程序时没有建立存储轮廓这一功能"
 
-#: src/main/deparse.c:152 src/main/sprintf.c:213 src/main/sprintf.c:245
+#: src/main/deparse.c:156 src/main/sprintf.c:216 src/main/sprintf.c:248
 msgid "too few arguments"
 msgstr "参数数目太少"
 
-#: src/main/deparse.c:159
+#: src/main/deparse.c:163
 msgid "invalid 'cutoff' value for 'deparse', using default"
 msgstr "'deparse'的'cutoff'值不对, 用缺省值"
 
-#: src/main/deparse.c:247
+#: src/main/deparse.c:254
 msgid "deparse of an S4 object will not be source()able"
 msgstr "反向分析S4目标对象是不能被source()"
 
-#: src/main/deparse.c:249
+#: src/main/deparse.c:256
 msgid "deparse may be incomplete"
 msgstr "反向分析可能不完全"
 
-#: src/main/deparse.c:251
+#: src/main/deparse.c:258
 msgid "deparse may be not be source()able in R < 2.7.0"
 msgstr "在R < 2.7.0的版本里deparse可能不可以被source()"
 
-#: src/main/deparse.c:369 src/main/deparse.c:461 src/main/deparse.c:467
+#: src/main/deparse.c:350 src/main/deparse.c:400 src/main/source.c:206
+#, fuzzy
+msgid "'file' must be a character string or connection"
+msgstr "'what'必需是字符串或函数"
+
+#: src/main/deparse.c:378 src/main/deparse.c:473 src/main/deparse.c:479
 msgid "wrote too few characters"
 msgstr "写了的字符数目太小"
 
-#: src/main/deparse.c:391
+#: src/main/deparse.c:402
 msgid "character arguments expected"
 msgstr "需要字符参数"
 
-#: src/main/deparse.c:394
+#: src/main/deparse.c:405
 msgid "zero-length argument"
 msgstr "参数长度为零"
 
-#: src/main/deparse.c:401
+#: src/main/deparse.c:412
 msgid "'opts' should be small non-negative integer"
 msgstr "'opts'必需是小的非负整数"
 
-#: src/main/deparse.c:411 src/main/envir.c:1764 src/main/envir.c:1846
-#: src/main/eval.c:569 src/main/eval.c:1251 src/main/eval.c:3627
-#: src/main/saveload.c:1978 src/main/saveload.c:2309 src/main/serialize.c:2727
+#: src/main/deparse.c:422 src/main/envir.c:1898 src/main/envir.c:1983
+#: src/main/eval.c:626 src/main/eval.c:1423 src/main/eval.c:4246
+#: src/main/saveload.c:1980 src/main/saveload.c:2312 src/main/serialize.c:2773
 #, c-format
 msgid "object '%s' not found"
 msgstr "找不到对象'%s'"
 
-#: src/main/deparse.c:1519
+#: src/main/deparse.c:1592
 msgid "badly formed function expression"
 msgstr "函数表达式形式不对"
 
@@ -2472,246 +2534,231 @@ msgstr "函数表达式形式不对"
 msgid "the base graphics system is not registered"
 msgstr "基本图形系统还没有注册"
 
-#: src/main/devices.c:165 src/main/devices.c:172
+#: src/main/devices.c:166 src/main/devices.c:174
 msgid "no active or default device"
 msgstr "没有在使用中的或缺省的设备"
 
-#: src/main/devices.c:385 src/main/devices.c:447
+#: src/main/devices.c:388 src/main/devices.c:450
 msgid "too many open devices"
 msgstr "太多已打开的设备"
 
-#: src/main/devices.c:474
+#: src/main/devices.c:491
 msgid "not enough memory to allocate device (in GEcreateDevDesc)"
 msgstr "分配设备内存不够(GEcreateDevDesc)"
 
-#: src/main/devices.c:515
+#: src/main/devices.c:532
 msgid "Hit <Return> to see next plot: "
 msgstr "按<Return>键来看下一个图: "
 
-#: src/main/dotcode.c:112 src/main/dotcode.c:142
+#: src/main/dotcode.c:127 src/main/dotcode.c:157
 msgid "NULL value passed as symbol address"
 msgstr "NULL值不能当作符号地址用"
 
-#: src/main/dotcode.c:133
+#: src/main/dotcode.c:148
 #, c-format
 msgid "Unimplemented type %d in createRSymbolObject"
 msgstr "createRSymbolObject里的种类%d目前没有被实现"
 
-#: src/main/dotcode.c:147 src/main/dotcode.c:237
+#: src/main/dotcode.c:162 src/main/dotcode.c:260
 #, c-format
 msgid "symbol '%s' is too long"
 msgstr "符号'%s'太长"
 
-#: src/main/dotcode.c:159
+#: src/main/dotcode.c:174
 msgid ""
 "first argument must be a string (of length 1) or native symbol reference"
 msgstr "第一个参数要么是字符串(长度为一)要么是本机符号引用"
 
-#: src/main/dotcode.c:201 src/main/dotcode.c:563
+#: src/main/dotcode.c:224 src/main/dotcode.c:1240
 msgid "too many arguments in foreign function call"
 msgstr "外接函数调用时参数太多"
 
-#: src/main/dotcode.c:213
+#: src/main/dotcode.c:236
 msgid "PACKAGE = \"\" is invalid"
 msgstr "PACKAGE = \"\"无效"
 
-#: src/main/dotcode.c:269 src/main/dotcode.c:274 src/main/dotcode.c:279
-#: src/main/dotcode.c:284
+#: src/main/dotcode.c:292 src/main/dotcode.c:297 src/main/dotcode.c:302
+#: src/main/dotcode.c:307
 #, c-format
 msgid "\"%s\" not available for %s() for package \"%s\""
 msgstr "程序包\"%3$s\"里\"%1$s\"不适用于%2$s()"
 
-#: src/main/dotcode.c:289
+#: src/main/dotcode.c:312
 #, c-format
 msgid "%s symbol name \"%s\" not in DLL for package \"%s\""
 msgstr "程序包'%3$s'的DLL没有\"%1$s\"字符名\"%2$s\" "
 
-#: src/main/dotcode.c:294
+#: src/main/dotcode.c:317
 #, c-format
 msgid "%s symbol name \"%s\" not in load table"
 msgstr "载入表里没有\"%1$s\"字符名\"%2$s\""
 
-#: src/main/dotcode.c:348 src/main/dotcode.c:352 src/main/dotcode.c:362
-#: src/main/dotcode.c:427 src/main/dotcode.c:434
+#: src/main/dotcode.c:368 src/main/dotcode.c:370 src/main/dotcode.c:380
+#: src/main/dotcode.c:445 src/main/dotcode.c:452
 #, c-format
 msgid "'%s' used more than once"
 msgstr "'%s'只能用一次"
 
-#: src/main/dotcode.c:358
+#: src/main/dotcode.c:376
 msgid "DLL name is too long"
 msgstr "DLL的名字值太长"
 
-#: src/main/dotcode.c:403
+#: src/main/dotcode.c:421
 msgid "PACKAGE argument must be a single character string"
 msgstr "PACKAGE参数必需是单个字符串"
 
-#: src/main/dotcode.c:409
+#: src/main/dotcode.c:427
 msgid "PACKAGE argument is too long"
 msgstr "PACKAGE参数值太长"
 
-#: src/main/dotcode.c:474
+#: src/main/dotcode.c:492
 msgid "no arguments supplied"
 msgstr "没有提供参数"
 
-#: src/main/dotcode.c:475 src/main/seq.c:913
+#: src/main/dotcode.c:493 src/main/seq.c:911
 msgid "too many arguments"
 msgstr "参数太多"
 
-#: src/main/dotcode.c:512 src/main/dotcode.c:554 src/main/dotcode.c:1397
+#: src/main/dotcode.c:530 src/main/dotcode.c:1232 src/main/dotcode.c:1420
 msgid "'.NAME' is missing"
 msgstr "缺少'.NAME'"
 
-#: src/main/dotcode.c:521 src/main/dotcode.c:570 src/main/dotcode.c:1418
+#: src/main/dotcode.c:539 src/main/dotcode.c:1247 src/main/dotcode.c:1441
 #, c-format
 msgid "Incorrect number of arguments (%d), expecting %d for '%s'"
 msgstr "参数数目不对(%1$d), ‘%3$s’只需要%2$d个参数"
 
-#: src/main/dotcode.c:1227 src/main/dotcode.c:2276
+#: src/main/dotcode.c:1216 src/main/dotcode.c:2290
 msgid "too many arguments, sorry"
 msgstr "对不起,参数太多"
 
-#: src/main/dotcode.c:1261 src/main/dotcode.c:1278 src/main/engine.c:2993
+#: src/main/dotcode.c:1284 src/main/dotcode.c:1301 src/main/engine.c:3013
 msgid "invalid graphics state"
 msgstr "图形狀態不对"
 
-#: src/main/dotcode.c:1357
+#: src/main/dotcode.c:1380
 msgid "NULL value for DLLInfoReference when looking for DLL"
 msgstr "寻找DLL时DLLInfoReference的值是NULL"
 
-#: src/main/dotcode.c:1458
+#: src/main/dotcode.c:1481
 #, c-format
 msgid "wrong type for argument %d in call to %s"
 msgstr "调用%2$s时参数%1$d的种类不对"
 
-#: src/main/dotcode.c:1470
-#, c-format
-msgid ""
-"explicit request not to duplicate arguments in call to '%s', but argument %d "
-"is of the wrong type (%d != %d)"
-msgstr "调用'%s'时明确要求不要复制参数,但参数%d的种类不对(%d != %d)"
-
-#: src/main/dotcode.c:1493
+#: src/main/dotcode.c:1510
 #, c-format
 msgid "long vectors (argument %d) are not supported in %s"
 msgstr "%2$s里不支持长向量(参数%1$d)"
 
-#: src/main/dotcode.c:1524
+#: src/main/dotcode.c:1541
 #, c-format
 msgid "NAs in foreign function call (arg %d)"
 msgstr "外接函数调用时不能有NA(arg%d)"
 
-#: src/main/dotcode.c:1547
+#: src/main/dotcode.c:1564
 #, c-format
 msgid "NA/NaN/Inf in foreign function call (arg %d)"
 msgstr "外接函数调用时不能有NA/NaN/Inf(arg%d)"
 
-#: src/main/dotcode.c:1552
-msgid "single values not returned if not duplicated"
-msgstr "如果不重复的话,单值没有返回"
-
-#: src/main/dotcode.c:1578
+#: src/main/dotcode.c:1594
 #, c-format
 msgid "complex NA/NaN/Inf in foreign function call (arg %d)"
 msgstr "外接函数调用时不能有复数的NA/NaN/Inf(arg%d)"
 
-#: src/main/dotcode.c:1597
-msgid "character variables must be duplicated in .C/.Fortran"
-msgstr "在调用.C/.Fortran时字符变数必需被复制"
-
-#: src/main/dotcode.c:1602
+#: src/main/dotcode.c:1616
 msgid "only first string in char vector used in .Fortran"
 msgstr ".Fortran只能用字节矢量中的第一个字符串"
 
-#: src/main/dotcode.c:1645 src/main/dotcode.c:1661 src/main/dotcode.c:1672
+#: src/main/dotcode.c:1659 src/main/dotcode.c:1675 src/main/dotcode.c:1686
 #, c-format
 msgid "invalid mode (%s) to pass to Fortran (arg %d)"
 msgstr "传给Fortran(arg%2$d)的状态(%1$s)出错"
 
-#: src/main/dotcode.c:1666
+#: src/main/dotcode.c:1680
 #, c-format
 msgid "invalid mode (%s) to pass to C or Fortran (arg %d)"
 msgstr "传给C或Fortran(arg%2$d)的状态(%1$s)出错"
 
-#: src/main/dotcode.c:1677
+#: src/main/dotcode.c:1691
 msgid "pairlists are passed as SEXP as from R 2.15.0"
 msgstr "从R版本2.15.0之后pairlists作为SEXP来用"
 
-#: src/main/dotcode.c:2499
+#: src/main/dotcode.c:2510
 #, c-format
 msgid "type \"%s\" not supported in interlanguage calls"
 msgstr "不同语言调用不支持这一种类\"%s\""
 
-#: src/main/dotcode.c:2604
+#: src/main/dotcode.c:2615
 #, c-format
 msgid "mode '%s' is not supported in call_R"
 msgstr "call_R不支持'%s'状态"
 
-#: src/main/dounzip.c:171
+#: src/main/dounzip.c:172
 #, c-format
 msgid " not overwriting file '%s"
 msgstr "无法覆盖'%s'文件"
 
-#: src/main/dounzip.c:256
+#: src/main/dounzip.c:257
 #, c-format
 msgid "zip file '%s' cannot be opened"
 msgstr "无法打开'%s'文件"
 
-#: src/main/dounzip.c:312
+#: src/main/dounzip.c:313
 msgid "invalid zip name argument"
 msgstr "zip名字参数不对"
 
-#: src/main/dounzip.c:315 src/main/dounzip.c:409
+#: src/main/dounzip.c:316 src/main/dounzip.c:410
 msgid "zip path is too long"
 msgstr "zip路径太长"
 
-#: src/main/dounzip.c:332
+#: src/main/dounzip.c:333
 msgid "'exdir' is too long"
 msgstr "'exdir'太长"
 
-#: src/main/dounzip.c:335
+#: src/main/dounzip.c:336
 msgid "'exdir' does not exist"
 msgstr "'exdir'不存在"
 
-#: src/main/dounzip.c:363
+#: src/main/dounzip.c:364
 msgid "requested file not found in the zip file"
 msgstr "你所要求的文件在zip文件中没有"
 
-#: src/main/dounzip.c:366
+#: src/main/dounzip.c:367
 msgid "zip file is corrupt"
 msgstr "zip文件有损坏"
 
-#: src/main/dounzip.c:369
+#: src/main/dounzip.c:370
 msgid "CRC error in zip file"
 msgstr "zip文件出了CRC错误"
 
-#: src/main/dounzip.c:376
+#: src/main/dounzip.c:377
 msgid "write error in extracting from zip file"
 msgstr "抽取zip文件时出现了书写错误"
 
-#: src/main/dounzip.c:379
+#: src/main/dounzip.c:380
 #, c-format
 msgid "error %d in extracting from zip file"
 msgstr "从zip文件中抽取%d时出了错"
 
-#: src/main/dounzip.c:404
+#: src/main/dounzip.c:405
 msgid "unz connections can only be opened for reading"
 msgstr "unz链结只可读不可写"
 
-#: src/main/dounzip.c:415
+#: src/main/dounzip.c:416
 msgid "invalid description of 'unz' connection"
 msgstr "'unz'链结的描述不对"
 
-#: src/main/dounzip.c:421
+#: src/main/dounzip.c:422
 #, c-format
 msgid "cannot open zip file '%s'"
 msgstr "无法打开zip文件'%s'"
 
-#: src/main/dounzip.c:425
+#: src/main/dounzip.c:426
 #, c-format
 msgid "cannot locate file '%s' in zip file '%s'"
 msgstr "在zip文件'%2$s'里找不到%1$s这个文件"
 
-#: src/main/dounzip.c:469
+#: src/main/dounzip.c:470
 msgid "printing not enabled for this connection"
 msgstr "此链结无法打印"
 
@@ -2719,8 +2766,8 @@ msgstr "此链结无法打印"
 msgid "write not enabled for this connection"
 msgstr "无法对这个链结书写"
 
-#: src/main/dounzip.c:496 src/main/dounzip.c:500 src/main/dounzip.c:506
-#: src/main/dounzip.c:523
+#: src/main/dounzip.c:494 src/main/dounzip.c:498 src/main/dounzip.c:504
+#: src/main/dounzip.c:521
 msgid "allocation of 'unz' connection failed"
 msgstr "分配'unz'链结失败"
 
@@ -2736,7 +2783,7 @@ msgstr "’function’的函数体定义不对"
 msgid "invalid argument to edit()"
 msgstr "edit()参数不对"
 
-#: src/main/edit.c:121 src/main/saveload.c:2076
+#: src/main/edit.c:121 src/main/saveload.c:2078
 msgid "unable to open file"
 msgstr "无法打开文件"
 
@@ -2796,12 +2843,12 @@ msgid "no graphics system to unregister"
 msgstr "没有可以取消注册的图形系统"
 
 #: src/main/engine.c:443 src/main/engine.c:448 src/main/engine.c:456
-#: src/main/engine.c:463 src/main/engine.c:477 src/modules/X11/devX11.c:1157
+#: src/main/engine.c:463 src/main/engine.c:477 src/modules/X11/devX11.c:1159
 msgid "invalid line end"
 msgstr "行终点出错"
 
 #: src/main/engine.c:508 src/main/engine.c:513 src/main/engine.c:521
-#: src/main/engine.c:528 src/main/engine.c:542 src/modules/X11/devX11.c:1175
+#: src/main/engine.c:528 src/main/engine.c:542 src/modules/X11/devX11.c:1177
 msgid "invalid line join"
 msgstr "行接合出错"
 
@@ -2830,83 +2877,97 @@ msgstr "没有为这个设备实现光栅渲染这一功能"
 msgid "raster capture is not available for this device"
 msgstr "栅格捕捉不适用于这个设备"
 
-#: src/main/engine.c:1656
+#: src/main/engine.c:1662
 #, c-format
 msgid "font face %d not supported for font family '%s'"
 msgstr "模面%1$d不支持字模家族'%2$s'"
 
-#: src/main/engine.c:1972
+#: src/main/engine.c:1978
 msgid "no graphics device is active"
 msgstr "没有活动图形设备"
 
-#: src/main/engine.c:2049
+#: src/main/engine.c:2055
 #, c-format
 msgid "pch value '%d' is invalid in this locale"
 msgstr "'%d'这个pch值在本语言环境下不适用"
 
-#: src/main/engine.c:2307
+#: src/main/engine.c:2313
 #, c-format
 msgid "unimplemented pch value '%d'"
 msgstr "目前没有实现pch '%d'这样一个值"
 
-#: src/main/engine.c:2330
+#: src/main/engine.c:2336
 #, c-format
 msgid "invalid axis extents [GEPretty(.,.,n=%d)"
 msgstr "座标范围不对[GEPretty(.,.,n=%d)"
 
-#: src/main/engine.c:2334
+#: src/main/engine.c:2340
 #, c-format
 msgid "infinite axis extents [GEPretty(%g,%g,%d)]"
 msgstr "座标范围不能是无限值[GEPretty(%g,%g,%d)]"
 
-#: src/main/engine.c:2371
+#: src/main/engine.c:2377
 #, c-format
 msgid " .. GEPretty(.): new *lo = %g < %g = x1"
 msgstr " .. GEPretty(.): new *lo =%g <%g = x1"
 
-#: src/main/engine.c:2373
+#: src/main/engine.c:2379
 #, c-format
 msgid " .. GEPretty(.): new *up = %g > %g = x2"
 msgstr " .. GEPretty(.): new *up =%g >%g = x2"
 
-#: src/main/engine.c:2773
+#: src/main/engine.c:2784
 msgid "display list redraw incomplete"
 msgstr "显示串列没有完全被刷新"
 
-#: src/main/engine.c:2777
+#: src/main/engine.c:2788
 #, fuzzy
 msgid "invalid display list"
 msgstr "参数串列不对"
 
-#: src/main/engine.c:2963
+#: src/main/engine.c:2900
+#, c-format
+msgid ""
+"snapshot recorded with different graphics engine version (pre 11 - this is "
+"version %d)"
+msgstr ""
+
+#: src/main/engine.c:2904
+#, c-format
+msgid ""
+"snapshot recorded with different graphics engine version (%d - this is "
+"version %d)"
+msgstr ""
+
+#: src/main/engine.c:2983
 msgid "'expr' argument must be an expression"
 msgstr "'expr'参数必需是表达式"
 
-#: src/main/engine.c:2965
+#: src/main/engine.c:2985
 msgid "'list' argument must be a list"
 msgstr "'list'参数必需是串列"
 
-#: src/main/engine.c:2971
+#: src/main/engine.c:2991
 msgid "'env' argument must be an environment"
 msgstr "'env'参数必需是环境"
 
-#: src/main/engine.c:3051 src/main/engine.c:3059
+#: src/main/engine.c:3071 src/main/engine.c:3079
 msgid "invalid multibyte char in pch=\"c\""
 msgstr "pch=\"c\"里的多字节字元不对"
 
-#: src/main/engine.c:3106
+#: src/main/engine.c:3126
 msgid "invalid hex digit in 'color' or 'lty'"
 msgstr "十六进制'color'设定或lty设定不对"
 
-#: src/main/engine.c:3129
+#: src/main/engine.c:3149
 msgid "invalid line type: must be length 2, 4, 6 or 8"
 msgstr "行类不对: 长度必需是2, 4, 6或8"
 
-#: src/main/engine.c:3133
+#: src/main/engine.c:3153
 msgid "invalid line type: zeroes are not allowed"
 msgstr "排类别不对:不能有零值"
 
-#: src/main/engine.c:3142 src/main/engine.c:3150 src/main/engine.c:3157
+#: src/main/engine.c:3162 src/main/engine.c:3170 src/main/engine.c:3177
 msgid "invalid line type"
 msgstr "行类不对"
 
@@ -2915,699 +2976,707 @@ msgstr "行类不对"
 msgid "cannot change value of locked binding for '%s'"
 msgstr "无法改变被锁定的联编'%s'的值"
 
-#: src/main/envir.c:251 src/main/envir.c:1454
+#: src/main/envir.c:251 src/main/envir.c:1530
 msgid "cannot add bindings to a locked environment"
 msgstr "无法为被锁定的环境添加联编"
 
-#: src/main/envir.c:772
+#: src/main/envir.c:775
 msgid "invalid cached value in R_GetGlobalCache"
 msgstr "R_GetGlobalCache里的高速缓存值不对"
 
-#: src/main/envir.c:830
+#: src/main/envir.c:836
 msgid "cannot unbind in the base namespace"
 msgstr "无法在基本名字空间里切断联编"
 
-#: src/main/envir.c:832
+#: src/main/envir.c:838
 msgid "unbind in the base environment is unimplemented"
 msgstr "在基本环境里切断联编这功能还没有被实现"
 
-#: src/main/envir.c:834 src/main/envir.c:1684
+#: src/main/envir.c:840 src/main/envir.c:1818
 msgid "cannot remove bindings from a locked environment"
 msgstr "无法从锁定的环境中删除联编"
 
-#: src/main/envir.c:1139
+#: src/main/envir.c:1213
 #, c-format
 msgid "argument to '%s' is not an environment"
 msgstr "参数'%s'不是环境"
 
-#: src/main/envir.c:1300
+#: src/main/envir.c:1374
 #, c-format
 msgid "the ... list does not contain %d elements"
 msgstr "... 串列不包含%d元素"
 
-#: src/main/envir.c:1302
+#: src/main/envir.c:1376
 #, c-format
 msgid "..%d used in an incorrect context, no ... to look in"
 msgstr "..%d所在的上下文出了错, 没有可以搜索的..."
 
-#: src/main/envir.c:1390 src/main/envir.c:1842 src/main/eval.c:573
-#: src/main/eval.c:3618
-#, c-format
-msgid "argument \"%s\" is missing, with no default"
-msgstr "缺少参数\"%s\",也没有缺省值"
-
-#: src/main/envir.c:1395
+#: src/main/envir.c:1469
 #, c-format
 msgid "could not find function \"%s\""
 msgstr "没有\"%s\"这个函数"
 
-#: src/main/envir.c:1418
+#: src/main/envir.c:1492
 msgid "cannot assign values in the empty environment"
 msgstr "无法在空环境里分派数值"
 
-#: src/main/envir.c:1424 src/main/envir.c:1497
+#: src/main/envir.c:1498 src/main/envir.c:1628
 msgid "cannot assign variables to this database"
 msgstr "无法给这个数据库指定变数"
 
-#: src/main/envir.c:1580
+#: src/main/envir.c:1714
 #, c-format
 msgid "cannot add binding of '%s' to the base environment"
 msgstr "无法在基本环境里加联编'%s' "
 
-#: src/main/envir.c:1609
+#: src/main/envir.c:1743
 msgid "only the first element is used as variable name"
 msgstr "只用了第一个元素作为变数名"
 
-#: src/main/envir.c:1641
+#: src/main/envir.c:1775
 msgid "first argument must be a named list"
 msgstr "第一个参数必需是带名字的串列"
 
-#: src/main/envir.c:1646
+#: src/main/envir.c:1780
 msgid "names(x) must be a character vector of the same length as x"
 msgstr "name(x)必需是长度与x一样的字符矢量"
 
-#: src/main/envir.c:1649
+#: src/main/envir.c:1783
 msgid "'envir' argument must be an environment"
 msgstr "'envir'参数必需是环境"
 
-#: src/main/envir.c:1678
+#: src/main/envir.c:1812
 msgid "cannot remove variables from base namespace"
 msgstr "无法从基本名字空间里删除变数"
 
-#: src/main/envir.c:1680
+#: src/main/envir.c:1814
 msgid "cannot remove variables from the base environment"
 msgstr "无法从基本环境中删除变数"
 
-#: src/main/envir.c:1682
+#: src/main/envir.c:1816
 msgid "cannot remove variables from the empty environment"
 msgstr "无法从空环境中删除变数"
 
-#: src/main/envir.c:1690
+#: src/main/envir.c:1824
 msgid "cannot remove variables from this database"
 msgstr "无法从这个数据库中删除变数"
 
-#: src/main/envir.c:1849
+#: src/main/envir.c:1985
 #, c-format
 msgid "object '%s' of mode '%s' was not found"
 msgstr "没有状态为\"%2$s\"的\"%1$s\"目标对象"
 
-#: src/main/envir.c:1921
+#: src/main/envir.c:2068
 #, c-format
 msgid "invalid name in position %d"
 msgstr "在%d位置的名字不对"
 
-#: src/main/envir.c:1927
+#: src/main/envir.c:2074
 msgid "second argument must be an environment"
 msgstr "第二参数必需是环境"
 
-#: src/main/envir.c:1935 src/main/envir.c:1943
+#: src/main/envir.c:2082 src/main/envir.c:2090
 #, c-format
 msgid "wrong length for '%s' argument"
 msgstr "'%s'参数的长度不对"
 
-#: src/main/envir.c:2062
+#: src/main/envir.c:2221
 msgid "invalid use of 'missing'"
 msgstr "’missing'的用法不对"
 
-#: src/main/envir.c:2087
+#: src/main/envir.c:2247
 msgid "'missing' can only be used for arguments"
 msgstr "'missing'只能用于这些参数"
 
-#: src/main/envir.c:2168
+#: src/main/envir.c:2333
 msgid "'pos' must be an integer"
 msgstr "'pos'的值必需是整数"
 
-#: src/main/envir.c:2182
+#: src/main/envir.c:2347
 msgid "all elements of a list must be named"
 msgstr "所有的串列都必需带名字"
 
-#: src/main/envir.c:2205
+#: src/main/envir.c:2370
 msgid "'attach' only works for lists, data frames and environments"
 msgstr "'attach'只适用于串列,数据框和环境"
 
-#: src/main/envir.c:2288
+#: src/main/envir.c:2453
 msgid "detaching \"package:base\" is not allowed"
 msgstr "\"package:base\"不能被拆离"
 
-#: src/main/envir.c:2589 src/main/envir.c:2644
+#: src/main/envir.c:2798 src/main/envir.c:2879
 msgid "argument must be an environment"
 msgstr "参数必需是环境"
 
-#: src/main/envir.c:2648
+#: src/main/envir.c:2883
 msgid "arguments must be symbolic"
 msgstr "参数必需为符号"
 
-#: src/main/envir.c:2772
+#: src/main/envir.c:3032
 msgid "no enclosing environment"
 msgstr "没有封闭环境"
 
-#: src/main/envir.c:2825
+#: src/main/envir.c:3085
 #, c-format
 msgid "no item called \"%s\" on the search list"
 msgstr "寻找串列里没有\"%s\"这样一个项目"
 
-#: src/main/envir.c:2850
+#: src/main/envir.c:3110
 msgid "using 'as.environment(NULL)' is defunct"
 msgstr "'as.environment(NULL)'不再有用"
 
-#: src/main/envir.c:2856
+#: src/main/envir.c:3116
 msgid "S4 object does not extend class \"environment\""
 msgstr "替换对象不是环境"
 
-#: src/main/envir.c:2871
+#: src/main/envir.c:3131
 msgid "invalid object for 'as.environment'"
 msgstr "as.environment的对象不对"
 
-#: src/main/envir.c:2897 src/main/envir.c:2925 src/main/envir.c:2954
-#: src/main/envir.c:2975 src/main/envir.c:2998 src/main/envir.c:3033
-#: src/main/envir.c:3054
+#: src/main/envir.c:3157 src/main/envir.c:3185 src/main/envir.c:3214
+#: src/main/envir.c:3235 src/main/envir.c:3258 src/main/envir.c:3293
+#: src/main/envir.c:3314
 msgid "not an environment"
 msgstr "不是环境"
 
-#: src/main/envir.c:2949 src/main/envir.c:2970 src/main/envir.c:2991
-#: src/main/envir.c:3028 src/main/envir.c:3049 src/main/envir.c:3148
+#: src/main/envir.c:3209 src/main/envir.c:3230 src/main/envir.c:3251
+#: src/main/envir.c:3288 src/main/envir.c:3309 src/main/envir.c:3408
 msgid "not a symbol"
 msgstr "不是符号"
 
-#: src/main/envir.c:2962 src/main/envir.c:2983 src/main/envir.c:3041
-#: src/main/envir.c:3062
+#: src/main/envir.c:3222 src/main/envir.c:3243 src/main/envir.c:3301
+#: src/main/envir.c:3322
 #, c-format
 msgid "no binding for \"%s\""
 msgstr "\"%s\"没有联编"
 
-#: src/main/envir.c:2993
+#: src/main/envir.c:3253
 msgid "not a function"
 msgstr "不是函数"
 
-#: src/main/envir.c:3001 src/main/envir.c:3017
+#: src/main/envir.c:3261 src/main/envir.c:3277
 msgid "symbol already has a regular binding"
 msgstr "符号已经有了正式联编"
 
-#: src/main/envir.c:3003 src/main/envir.c:3019
+#: src/main/envir.c:3263 src/main/envir.c:3279
 msgid "cannot change active binding if binding is locked"
 msgstr "无法改变被锁定的联编"
 
-#: src/main/envir.c:3107
+#: src/main/envir.c:3367 src/main/envir.c:3604
 msgid "unknown op"
 msgstr "没有这种运算符"
 
-#: src/main/envir.c:3152
+#: src/main/envir.c:3412
 msgid "cannot unbind a locked binding"
 msgstr "无法切斷已经锁定了的联编"
 
-#: src/main/envir.c:3154
+#: src/main/envir.c:3414
 msgid "cannot unbind an active binding"
 msgstr "无法切斷正在使用中的联编"
 
-#: src/main/envir.c:3289
+#: src/main/envir.c:3555
 msgid "bad namespace name"
 msgstr "名字空间名字不对"
 
-#: src/main/envir.c:3301
+#: src/main/envir.c:3567
 msgid "namespace already registered"
 msgstr "名字空间已经注册了"
 
-#: src/main/envir.c:3313
+#: src/main/envir.c:3579
 msgid "namespace not registered"
 msgstr "名字空间没有注册"
 
-#: src/main/envir.c:3360
+#: src/main/envir.c:3635
 msgid "bad import environment argument"
 msgstr "引进环境参数不对"
 
-#: src/main/envir.c:3365
+#: src/main/envir.c:3640
 msgid "bad export environment argument"
 msgstr "引出环境参数不对"
 
-#: src/main/envir.c:3369
+#: src/main/envir.c:3644
 msgid "length of import and export names must match"
 msgstr "引进和引出名字的长度必需相等"
 
-#: src/main/envir.c:3392
+#: src/main/envir.c:3667
 #, c-format
 msgid "exported symbol '%s' has no value"
 msgstr "引出的符号’%s'没有值"
 
-#: src/main/envir.c:3557
+#: src/main/envir.c:3833
 #, c-format
 msgid "unknown encoding: %d"
 msgstr "不支持'%d'这个编码"
 
-#: src/main/envir.c:3577
+#: src/main/envir.c:3853
 #, c-format
 msgid "embedded nul in string: '%s'"
 msgstr "字符串里嵌入了nul:'%s'"
 
-#: src/main/errors.c:178 src/main/errors.c:215
+#: src/main/errors.c:163 src/main/errors.c:200
 msgid "interrupts suspended; signal ignored"
 msgstr "暫停中断; 略过信号"
 
-#: src/main/errors.c:318
+#: src/main/errors.c:250
+msgid "[... truncated]"
+msgstr ""
+
+#: src/main/errors.c:310
 msgid "invalid option \"warning.expression\""
 msgstr "\"warning.expression\"选项不对"
 
-#: src/main/errors.c:348
+#: src/main/errors.c:339
 #, c-format
 msgid "(converted from warning) %s"
 msgstr "(由警告转换成)%s"
 
-#: src/main/errors.c:359
-#, c-format
-msgid "Warning: %s\n"
+#: src/main/errors.c:349
+#, fuzzy
+msgid "Warning:"
 msgstr "警告: %s\n"
 
-#: src/main/errors.c:363
-#, c-format
-msgid "Warning in %s : %s\n"
+#: src/main/errors.c:351
+#, fuzzy, c-format
+msgid "Warning in %s :"
 msgstr "%s里有警告: %s\n"
 
-#: src/main/errors.c:365
-#, c-format
-msgid ""
-"Warning in %s :\n"
-"  %s\n"
+#: src/main/errors.c:360 src/main/errors.c:374 src/main/errors.c:687
+msgid "Calls:"
 msgstr ""
-"%s里有警告:\n"
-"  %s\n"
 
-#: src/main/errors.c:428 src/main/errors.c:447 src/main/errors.c:596
+#: src/main/errors.c:421 src/main/errors.c:440 src/main/errors.c:602
 msgid "Lost warning messages\n"
 msgstr "警告信息丢失\n"
 
-#: src/main/errors.c:459
-msgid "Warning message:\n"
-msgid_plural "Warning messages:\n"
+#: src/main/errors.c:452
+#, fuzzy
+msgid "Warning message:"
+msgid_plural "Warning messages:"
 msgstr[0] "警告信息:\n"
 
-#: src/main/errors.c:514
+#: src/main/errors.c:462 src/main/errors.c:490
 #, c-format
-msgid "There were %d warnings (use warnings() to see them)\n"
-msgstr "共有%d个警告 (用warnings()来显示)\n"
+msgid "In %s :"
+msgstr ""
 
-#: src/main/errors.c:517
-#, c-format
-msgid "There were %d or more warnings (use warnings() to see the first %d)\n"
+#: src/main/errors.c:515
+#, fuzzy, c-format
+msgid "There was %d warning (use warnings() to see it)"
+msgid_plural "There were %d warnings (use warnings() to see them)"
+msgstr[0] "共有%d个警告 (用warnings()来显示)\n"
+
+#: src/main/errors.c:520
+#, fuzzy, c-format
+msgid "There were %d or more warnings (use warnings() to see the first %d)"
 msgstr "警告多于%d个(用warnings()来显示第一个到第%d个)\n"
 
-#: src/main/errors.c:587
+#: src/main/errors.c:593
 msgid "Error during wrapup: "
 msgstr "收捲时出错: "
 
-#: src/main/errors.c:612
+#: src/main/errors.c:618
 msgid "Error in "
 msgstr "错误于"
 
-#: src/main/errors.c:613
-#, c-format
-msgid " (from %s) : "
+#: src/main/errors.c:640 src/main/errors.c:647
+#, fuzzy, c-format
+msgid "Error in %s (from %s) : "
 msgstr " (从%s) : "
 
-#: src/main/errors.c:664 src/main/errors.c:670
+#: src/main/errors.c:649
+#, fuzzy, c-format
+msgid "Error in %s : "
+msgstr "错误于"
+
+#: src/main/errors.c:669 src/main/errors.c:675
 #, c-format
 msgid "Error: "
 msgstr "错误: "
 
-#: src/main/errors.c:690 src/main/errors.c:1319
+#: src/main/errors.c:696 src/main/errors.c:1300
 msgid "In addition: "
 msgstr "此外: "
 
-#: src/main/errors.c:811
+#: src/main/errors.c:818
 msgid "invalid option \"error\"\n"
 msgstr "选项\"error\"不对\n"
 
-#: src/main/errors.c:893
-msgid "Execution halted\n"
-msgstr "停止执行\n"
-
-#: src/main/errors.c:1032
-msgid "'msg1' must be a character string"
-msgstr "'msg1’必需是字符串"
-
-#: src/main/errors.c:1034
-msgid "'msg2' must be a character string"
-msgstr "'msg2’必需是字符串"
+#: src/main/errors.c:1013 src/main/errors.c:1015 src/main/options.c:339
+#: src/main/unique.c:1638
+#, fuzzy, c-format
+msgid "'%s' must be a character string"
+msgstr "'sep'必需是字符串"
 
-#: src/main/errors.c:1131
+#: src/main/errors.c:1116
 msgid " [invalid string in stop(.)]"
 msgstr " [stop(.)里的字符串不对]"
 
-#: src/main/errors.c:1162
+#: src/main/errors.c:1148
 msgid " [invalid string in warning(.)]"
 msgstr " [warning(.)里的字符串不对]"
 
-#: src/main/errors.c:1178
+#: src/main/errors.c:1164
 #, c-format
 msgid "incorrect number of arguments to \"%s\""
 msgstr "\"%s\"里的参数数目不对"
 
-#: src/main/errors.c:1184 src/main/errors.c:1199
+#: src/main/errors.c:1170 src/main/errors.c:1185
 #, c-format
 msgid "unimplemented feature in %s"
 msgstr "%s里的功能目前没有实现"
 
-#: src/main/errors.c:1193
+#: src/main/errors.c:1179
 msgid "invalid number of arguments"
 msgstr "参数数目不对"
 
-#: src/main/errors.c:1194 src/main/logic.c:189
+#: src/main/errors.c:1180 src/main/logic.c:181
 msgid "invalid argument type"
 msgstr "参数种类不对"
 
-#: src/main/errors.c:1196
+#: src/main/errors.c:1182
 msgid "time-series/vector length mismatch"
 msgstr "时间系列/矢量长度不等"
 
-#: src/main/errors.c:1197
+#: src/main/errors.c:1183
 msgid "incompatible arguments"
 msgstr "不可兼容的参数"
 
-#: src/main/errors.c:1200
+#: src/main/errors.c:1186
 msgid "unknown error (report this!)"
 msgstr "不知是什么错误(请报告!)"
 
-#: src/main/errors.c:1212
+#: src/main/errors.c:1195
+msgid "inaccurate integer conversion in coercion"
+msgstr "强制改变整数不精确"
+
+#: src/main/errors.c:1198
 msgid "unknown warning (report this!)"
 msgstr "不知是什么警告(请报告!)"
 
-#: src/main/errors.c:1283
+#: src/main/errors.c:1269
 msgid "No function to return from, jumping to top level"
 msgstr "没有可回归的函数, 跳到最高层"
 
-#: src/main/errors.c:1299
+#: src/main/errors.c:1285
 msgid "top level inconsistency?"
 msgstr "最高层不一致?"
 
-#: src/main/errors.c:1478
+#: src/main/errors.c:1459
 msgid "bad handler data"
 msgstr "处理器数据有错"
 
-#: src/main/errors.c:1628
+#: src/main/errors.c:1613
 msgid "error message not a string"
 msgstr "错误信息不是字符串"
 
-#: src/main/errors.c:1703
+#: src/main/errors.c:1688
 msgid "handler or restart stack mismatch in old restart"
 msgstr "旧重新启动里的处理器或重新启动堆叠不相配"
 
-#: src/main/errors.c:1729 src/main/errors.c:1745
+#: src/main/errors.c:1714 src/main/errors.c:1730
 msgid "bad error message"
 msgstr "错误信息不对"
 
-#: src/main/errors.c:1787
+#: src/main/errors.c:1771
 msgid "bad restart"
 msgstr "重新启动出错"
 
-#: src/main/errors.c:1819
+#: src/main/errors.c:1803
 msgid "restart not on stack"
 msgstr "不能在堆叠上重新启动"
 
-#: src/main/errors.c:1836
+#: src/main/errors.c:1819
 msgid "not in a try context"
 msgstr "不在try的上下文中"
 
-#: src/main/errors.c:1849
+#: src/main/errors.c:1832
 msgid "error message must be a character string"
 msgstr "错误信息必需是字符串"
 
-#: src/main/eval.c:308
+#: src/main/eval.c:365
 #, c-format
 msgid "source files skipped by Rprof; please increase '%s'"
 msgstr "源文件跳过Rprof,请增加“%s”"
 
-#: src/main/eval.c:328
+#: src/main/eval.c:385
 #, c-format
 msgid "Rprof: cannot open profile file '%s'"
 msgstr "Rprof: 无法打开程序概要分析文件'%s'"
 
-#: src/main/eval.c:422
+#: src/main/eval.c:479
 msgid "R profiling is not available on this system"
 msgstr "本系统没有R程序概要分析这个功能"
 
-#: src/main/eval.c:446
+#: src/main/eval.c:503
 msgid ""
 "promise already under evaluation: recursive default argument reference or "
 "earlier problems?"
 msgstr "已经在评估:递归缺省参数参考还是早先原来的问题?"
 
-#: src/main/eval.c:448
+#: src/main/eval.c:505
 msgid "restarting interrupted promise evaluation"
 msgstr "重新评估被中断的许诺"
 
-#: src/main/eval.c:544
+#: src/main/eval.c:601
 msgid ""
 "evaluation nested too deeply: infinite recursion / options(expressions=)?"
 msgstr "评估嵌套太深:无穷递归/ options(expressions=)?"
 
-#: src/main/eval.c:575 src/main/eval.c:3619
+#: src/main/eval.c:632 src/main/eval.c:4238
 msgid "argument is missing, with no default"
 msgstr "缺少参数, 也没有缺省值"
 
-#: src/main/eval.c:679 src/main/eval.c:4642
+#: src/main/eval.c:736 src/main/eval.c:1306 src/main/eval.c:5533
 msgid "attempt to apply non-function"
 msgstr "不适用于非函数"
 
-#: src/main/eval.c:702
+#: src/main/eval.c:759
 #, c-format
 msgid "%s at %s#%d: "
 msgstr "%s在%s#%d: "
 
-#: src/main/eval.c:1178
+#: src/main/eval.c:1298 src/main/eval.c:2271
+#, c-format
+msgid "argument %d is empty"
+msgstr "%d元素是空的"
+
+#: src/main/eval.c:1350
 #, c-format
 msgid "could not find symbol \"%s\" in environment of the generic function"
 msgstr "类属函数环境里没有这个\"%s\"符号"
 
-#: src/main/eval.c:1196
+#: src/main/eval.c:1368
 #, c-format
 msgid "symbol \"%s\" not in environment of method"
 msgstr "方法环境里没有\"%s\"这个符号"
 
-#: src/main/eval.c:1308
+#: src/main/eval.c:1481
 msgid "the condition has length > 1 and only the first element will be used"
 msgstr "条件的长度大于一,因此只能用其第一元素"
 
-#: src/main/eval.c:1325
+#: src/main/eval.c:1500
 msgid "missing value where TRUE/FALSE needed"
 msgstr "需要TRUE/FALSE值的地方不可以用缺少值"
 
-#: src/main/eval.c:1326
+#: src/main/eval.c:1501
 msgid "argument is not interpretable as logical"
 msgstr "参数不能作为逻辑值来用"
 
-#: src/main/eval.c:1327
+#: src/main/eval.c:1502
 msgid "argument is of length zero"
 msgstr "参数长度为零"
 
-#: src/main/eval.c:1418
+#: src/main/eval.c:1596
 msgid "non-symbol loop variable"
 msgstr "非符号循环变数"
 
-#: src/main/eval.c:1510 src/main/eval.c:4408
+#: src/main/eval.c:1687 src/main/eval.c:5301
 msgid "invalid for() loop sequence"
 msgstr "for()循环顺序不对"
 
-#: src/main/eval.c:1652
+#: src/main/eval.c:1826
 msgid "multi-argument returns are not permitted"
 msgstr "不允许多参数回覆值"
 
-#: src/main/eval.c:1701
+#: src/main/eval.c:1873
 msgid "invalid (NULL) left side of assignment"
 msgstr "赋值公式左手不能是(NULL)值"
 
-#: src/main/eval.c:1734
+#: src/main/eval.c:1907
 msgid "target of assignment expands to non-language object"
 msgstr "赋值目标擴充到非语言对象"
 
-#: src/main/eval.c:1817
+#: src/main/eval.c:1990
 #, c-format
 msgid "overlong name in '%s'"
 msgstr "'%s'中的名字太长"
 
-#: src/main/eval.c:1915
+#: src/main/eval.c:2080
 msgid "cannot do complex assignments in base namespace"
 msgstr "无法在基本名字空间里赋复数值"
 
-#: src/main/eval.c:1917
+#: src/main/eval.c:2082
 msgid "cannot do complex assignments in base environment"
 msgstr "无法在基本环境里赋复数值"
 
-#: src/main/eval.c:1954 src/main/eval.c:1981
+#: src/main/eval.c:2121 src/main/eval.c:2148
 msgid "invalid function in complex assignment"
 msgstr "复数赋值里的函数不对"
 
-#: src/main/eval.c:2041
+#: src/main/eval.c:2208
 msgid "invalid (do_set) left-hand side to assignment"
 msgstr "(do_set)赋值公式左手不对"
 
-#: src/main/eval.c:2103
-#, c-format
-msgid "argument %d is empty"
-msgstr "%d元素是空的"
-
-#: src/main/eval.c:2116
+#: src/main/eval.c:2284
 #, c-format
 msgid "'%s' is missing"
 msgstr "缺少'%s'"
 
-#: src/main/eval.c:2267
+#: src/main/eval.c:2439
 msgid "invalid formal argument list for \"function\""
 msgstr "\"function\"正式参数串列不对"
 
-#: src/main/eval.c:2325 src/main/eval.c:2356 src/main/eval.c:2361
+#: src/main/eval.c:2497 src/main/eval.c:2528 src/main/eval.c:2533
 #, c-format
 msgid "invalid '%s' argument of type '%s'"
 msgstr "种类'%2$s'的参数'%1$s'不对"
 
-#: src/main/eval.c:2353
+#: src/main/eval.c:2525
 msgid "numeric 'envir' arg not of length one"
 msgstr "数值'envir'参数的长度不是一"
 
-#: src/main/eval.c:2377 src/main/eval.c:2399
+#: src/main/eval.c:2549 src/main/eval.c:2573
 msgid "restarts not supported in 'eval'"
 msgstr "'eval'不支持重新启动"
 
-#: src/main/eval.c:2456 src/main/eval.c:2469
+#: src/main/eval.c:2632 src/main/eval.c:2645
 msgid "'Recall' called from outside a closure"
 msgstr "'Recall'在封閉包外调用"
 
-#: src/main/eval.c:2562
+#: src/main/eval.c:2738
 msgid "value in '...' is not a promise"
 msgstr "'... '里的值不是允諾"
 
-#: src/main/eval.c:2754 src/main/objects.c:720
-#, c-format
-msgid "call name too long in '%s'"
-msgstr "'%s'里调用的名字太长"
-
-#: src/main/eval.c:2775
-#, c-format
-msgid "generic name too long in '%s'"
-msgstr "'%s'里的类属名字太长"
-
-#: src/main/eval.c:2840
+#: src/main/eval.c:2999
 #, c-format
 msgid "Incompatible methods (\"%s\", \"%s\") for \"%s\""
 msgstr "不可兼容的方法(\"%s\", \"%s\")和\"%s\""
 
-#: src/main/eval.c:2906
+#: src/main/eval.c:3048
 msgid "dispatch error in group dispatch"
 msgstr "组分派错误"
 
-#: src/main/eval.c:3201
+#: src/main/eval.c:3532
 #, c-format
 msgid "\"%s\" is not a %s function"
 msgstr "\"%s\"不是%s函数"
 
-#: src/main/eval.c:3430
+#: src/main/eval.c:4047
 msgid "node stack overflow"
 msgstr "节点堆叠上溢"
 
-#: src/main/eval.c:3436
+#: src/main/eval.c:4053
 msgid "integer stack overflow"
 msgstr "整数堆叠上溢"
 
-#: src/main/eval.c:3490
+#: src/main/eval.c:4107
 msgid "bad opcode"
 msgstr "opcode不对"
 
-#: src/main/eval.c:4219
+#: src/main/eval.c:5083
 #, c-format
 msgid "invalid %s type in 'x %s y'"
 msgstr "'x %2$s y'中%1$s种类不对"
 
-#: src/main/eval.c:4310
+#: src/main/eval.c:5195
 msgid "bytecode version mismatch; using eval"
 msgstr "位元組碼版本不配; 用eval"
 
-#: src/main/eval.c:4315
+#: src/main/eval.c:5200
 msgid "bytecode version is too old"
 msgstr "位元組碼版本太旧"
 
-#: src/main/eval.c:4316
+#: src/main/eval.c:5201
 msgid "bytecode version is too new"
 msgstr "位元組碼版本太新"
 
-#: src/main/eval.c:4350
+#: src/main/eval.c:5235
 msgid "byte code version mismatch"
 msgstr "位元組碼版本不配"
 
-#: src/main/eval.c:4477
+#: src/main/eval.c:5383
 msgid "invalid sequence argument in for loop"
 msgstr "循环里的顺序参数不对"
 
-#: src/main/eval.c:4624 src/main/names.c:1181
+#: src/main/eval.c:5522 src/main/names.c:1312
 #, c-format
 msgid "there is no .Internal function '%s'"
 msgstr "没有'%s'这个内部函数"
 
-#: src/main/eval.c:4731 src/main/eval.c:5077 src/main/eval.c:5119
+#: src/main/eval.c:5622 src/main/eval.c:5968 src/main/eval.c:6008
 msgid "bad function"
 msgstr "函数不对"
 
-#: src/main/eval.c:4746
+#: src/main/eval.c:5635
 msgid "not a BUILTIN function"
 msgstr "非BUILTIN函数"
 
-#: src/main/eval.c:5159
+#: src/main/eval.c:6066
+#, fuzzy
+msgid "bad numeric 'switch' offsets"
+msgstr "数字开关偏移设定不对"
+
+#: src/main/eval.c:6072
 msgid "numeric EXPR required for 'switch' without named alternatives"
 msgstr "没有名字替代的'switch'需要数值EXPR"
 
-#: src/main/eval.c:5255
+#: src/main/eval.c:6076
+#, fuzzy
+msgid "bad character 'switch' offsets"
+msgstr "字符开关偏移不对"
+
+#: src/main/eval.c:6188
 msgid "cannot find index for threaded code address"
 msgstr "找不到线程代码地址的索引"
 
-#: src/main/eval.c:5315
+#: src/main/eval.c:6248
 msgid "invalid body"
 msgstr "函数体不对"
 
-#: src/main/eval.c:5335
+#: src/main/eval.c:6268
 msgid "invalid symbol"
 msgstr "符号不对"
 
-#: src/main/eval.c:5379
+#: src/main/eval.c:6312
 msgid "argument is not a byte code object"
 msgstr "参数不是位元组码对象"
 
-#: src/main/eval.c:5400
+#: src/main/eval.c:6334
 msgid "bad file name"
 msgstr "文件名字不对"
 
-#: src/main/eval.c:5404 src/main/eval.c:5425
+#: src/main/eval.c:6338 src/main/eval.c:6359
 msgid "unable to open 'file'"
 msgstr "无法打开'file'"
 
-#: src/main/eval.c:5419 src/main/saveload.c:1942
+#: src/main/eval.c:6353 src/main/saveload.c:1944
 msgid "'file' must be non-empty string"
 msgstr "'file'必需是非空字符串"
 
-#: src/main/eval.c:5421 src/main/saveload.c:1944 src/main/saveload.c:2244
-#: src/main/serialize.c:2149
+#: src/main/eval.c:6355 src/main/saveload.c:1946 src/main/saveload.c:2246
+#: src/main/serialize.c:2189
 msgid "'ascii' must be logical"
 msgstr "'ascii’必需是逻辑值"
 
-#: src/main/eval.c:5492 src/main/eval.c:5511 src/main/eval.c:5541
+#: src/main/eval.c:6426 src/main/eval.c:6445 src/main/eval.c:6475
 msgid "constant buffer must be a generic vector"
 msgstr "常量缓冲区必须是矢量类属"
 
-#: src/main/eval.c:5543
+#: src/main/eval.c:6477
 msgid "bad constant count"
 msgstr "常量数目不对"
 
-#: src/main/eval.c:5579
+#: src/main/eval.c:6515
 msgid "profile timer in use"
 msgstr "程序概要分析计时器在运行中"
 
-#: src/main/eval.c:5581
+#: src/main/eval.c:6517
 msgid "already byte code profiling"
 msgstr "已经在进行位元组码程序概要分析"
 
-#: src/main/eval.c:5599
+#: src/main/eval.c:6535
 msgid "setting profile timer failed"
 msgstr "程序概要分析计时器设制失败"
 
-#: src/main/eval.c:5616
+#: src/main/eval.c:6553
 msgid "not byte code profiling"
 msgstr "非位元组码程序概要分析"
 
+#: src/main/eval.c:6569 src/main/eval.c:6573 src/main/eval.c:6577
+#, fuzzy
+msgid "byte code profiling is not supported in this build"
+msgstr "本平台不支持ICU"
+
 #: src/main/gevents.c:43
 #, c-format
 msgid "'%s' events not supported in this device"
@@ -3621,26 +3690,26 @@ msgstr "内部错误"
 msgid "this graphics device does not support event handling"
 msgstr "图形设备不支持事件处理"
 
-#: src/main/gevents.c:136
+#: src/main/gevents.c:135
 msgid "invalid prompt"
 msgstr "提示不对"
 
-#: src/main/gevents.c:148
+#: src/main/gevents.c:146
 msgid "recursive use of 'getGraphicsEvent' not supported"
 msgstr "不支持'getGraphicsEvent'的递归应用"
 
-#: src/main/gevents.c:158
+#: src/main/gevents.c:157
 msgid "no graphics event handlers set"
 msgstr "还没有设定图形事件处理机"
 
-#: src/main/gram.y:222 src/main/gram.y:237 src/main/gram.y:2222
-#: src/main/gram.y:2236
+#: src/main/gram.y:222 src/main/gram.y:237 src/main/gram.y:2245
+#: src/main/gram.y:2259
 #, c-format
 msgid "EOF whilst reading MBCS char at line %d"
 msgstr "%d行读MBCS字节时遇到EOF"
 
-#: src/main/gram.y:226 src/main/gram.y:234 src/main/gram.y:2226
-#: src/main/gram.y:2233
+#: src/main/gram.y:226 src/main/gram.y:234 src/main/gram.y:2249
+#: src/main/gram.y:2256
 #, c-format
 msgid "invalid multibyte character in parser at line %d"
 msgstr "句法分析器%d行里不能有多字节字符"
@@ -3655,113 +3724,126 @@ msgstr "%d行输入缓冲区上溢"
 msgid "incorrect tag type at line %d"
 msgstr "%d行的标记种类不对"
 
-#: src/main/gram.y:1653
+#: src/main/gram.y:1657
 msgid "contextstack overflow"
 msgstr "节点堆叠上溢"
 
-#: src/main/gram.y:1890
-msgid "input"
-msgstr "输入"
+#: src/main/gram.y:1907 src/main/gram.y:1913
+#, fuzzy, c-format
+msgid "unexpected input"
+msgstr "意外的%s"
 
-#: src/main/gram.y:1891
-msgid "end of input"
+#: src/main/gram.y:1910 src/main/main.c:311
+#, fuzzy, c-format
+msgid "unexpected end of input"
 msgstr "输入结束"
 
-#: src/main/gram.y:1892
-msgid "string constant"
+#: src/main/gram.y:1916
+#, fuzzy, c-format
+msgid "unexpected string constant"
 msgstr "字符常量"
 
-#: src/main/gram.y:1893
-msgid "numeric constant"
+#: src/main/gram.y:1919
+#, fuzzy, c-format
+msgid "unexpected numeric constant"
 msgstr "数值量"
 
-#: src/main/gram.y:1894
-msgid "symbol"
-msgstr "符号"
+#: src/main/gram.y:1922
+#, fuzzy, c-format
+msgid "unexpected symbol"
+msgstr "意外的%s"
 
-#: src/main/gram.y:1895
-msgid "assignment"
-msgstr "任务"
+#: src/main/gram.y:1925
+#, fuzzy, c-format
+msgid "unexpected assignment"
+msgstr "意外的%s"
 
-#: src/main/gram.y:1896
-msgid "end of line"
+#: src/main/gram.y:1928
+#, fuzzy, c-format
+msgid "unexpected end of line"
 msgstr "行尾"
 
-#: src/main/gram.y:1910 src/main/gram.y:1916
+#: src/main/gram.y:1931 src/main/gram.y:1939
 #, c-format
 msgid "unexpected %s"
 msgstr "意外的%s"
 
-#: src/main/gram.y:1926
+#: src/main/gram.y:1951
 #, c-format
 msgid "repeated formal argument '%s' on line %d"
 msgstr "%2$d行上正式参数'%1$s'有重复"
 
-#: src/main/gram.y:2136
+#: src/main/gram.y:2161
 #, c-format
 msgid "integer literal %s contains decimal; using numeric value"
 msgstr "整数文字%s里有小数点;转用数值"
 
-#: src/main/gram.y:2140
+#: src/main/gram.y:2164
 #, c-format
 msgid "non-integer value %s qualified with L; using numeric value"
 msgstr "同L一起修饰的%s是非整数值; 转用数值"
 
-#: src/main/gram.y:2153
+#: src/main/gram.y:2176
 #, c-format
 msgid "integer literal %s contains unnecessary decimal point"
 msgstr "整数文字%s里含多余的小数点"
 
-#: src/main/gram.y:2185
+#: src/main/gram.y:2208
 #, c-format
 msgid "unable to allocate buffer for long string at line %d"
 msgstr "%d行无法为长字符串分配内存"
 
-#: src/main/gram.y:2338
+#: src/main/gram.y:2347 src/main/gram.y:2370 src/main/gram.y:2407
+#: src/main/gram.y:2443
+#, fuzzy, c-format
+msgid "nul character not allowed (line %d)"
+msgstr "句法分析器%d行里不能有多字节字符"
+
+#: src/main/gram.y:2363
 #, c-format
 msgid "'\\x' used without hex digits in character string starting \"%s\""
 msgstr "由\"%s\"开头的字符串中有'\\x',它必需同hex数字一起来用"
 
-#: src/main/gram.y:2352
+#: src/main/gram.y:2379
 #, c-format
 msgid "\\uxxxx sequences not supported inside backticks (line %d)"
 msgstr "不支持反引号里\\uxxxx这样的序列(%d行)"
 
-#: src/main/gram.y:2367
+#: src/main/gram.y:2394
 #, c-format
 msgid "'\\u' used without hex digits in character string starting \"%s\""
 msgstr "由\"%s\"开头的字符串中有'\\u',它必需同hex数字一起来用"
 
-#: src/main/gram.y:2375
+#: src/main/gram.y:2402
 #, c-format
 msgid "invalid \\u{xxxx} sequence (line %d)"
 msgstr "\\u{xxxx}顺序不对(%d行)"
 
-#: src/main/gram.y:2387
+#: src/main/gram.y:2416
 #, c-format
 msgid "\\Uxxxxxxxx sequences not supported inside backticks (line %d)"
 msgstr "不支持反引号里\\Uxxxxxxxx这样的序列(%d行)"
 
-#: src/main/gram.y:2402
+#: src/main/gram.y:2431
 #, c-format
 msgid "'\\U' used without hex digits in character string starting \"%s\""
 msgstr "由\"%s\"开头的字符串中有'\\U',它必需同hex数字一起来用"
 
-#: src/main/gram.y:2410
+#: src/main/gram.y:2439
 #, c-format
 msgid "invalid \\U{xxxxxxxx} sequence (line %d)"
 msgstr "\\U{xxxxxxxx}顺序不对(%d行)"
 
-#: src/main/gram.y:2451
+#: src/main/gram.y:2482
 #, c-format
 msgid "'\\%c' is an unrecognized escape in character string starting \"%s\""
 msgstr "由\"%2$s\"开头的字符串中存在'\\%1$c',但没有这种逸出号"
 
-#: src/main/gram.y:2510
+#: src/main/gram.y:2546
 msgid "mixing Unicode and octal/hex escapes in a string is not allowed"
 msgstr "在字符串中混合Unicode和八进制/十六进制转义是不允许的"
 
-#: src/main/gram.y:2514
+#: src/main/gram.y:2550
 #, c-format
 msgid ""
 "string at line %d containing Unicode escapes not in this locale\n"
@@ -3770,13 +3852,13 @@ msgstr ""
 "%d行字符串里包含了不属于目前语言环境的Unicode转义字符\n"
 "太长了(最多只能有10000个字符)"
 
-#: src/main/gram.y:3112 src/main/gram.y:3119 src/main/gram.y:3125
-#: src/main/gram.y:3132
+#: src/main/gram.y:3148 src/main/gram.y:3155 src/main/gram.y:3161
+#: src/main/gram.y:3168
 #, c-format
 msgid "contextstack overflow at line %d"
 msgstr "%d行上下文堆叠上溢"
 
-#: src/main/gram.y:3227
+#: src/main/gram.y:3263
 #, c-format
 msgid "internal parser error at line %d"
 msgstr "%d行里输入缓冲区上溢"
@@ -3786,34 +3868,34 @@ msgstr "%d行里输入缓冲区上溢"
 msgid "relative range of values =%4.0f * EPS, is small (axis %d)"
 msgstr "相对范围值=%4.0f * EPS太小(座标%d)"
 
-#: src/main/grep.c:93
+#: src/main/grep.c:96
 #, c-format
 msgid "invalid regular expression '%s', reason '%s'"
 msgstr "正规表现’%s'不对,原因是'%s'"
 
-#: src/main/grep.c:95
+#: src/main/grep.c:98
 #, c-format
 msgid "invalid regular expression, reason '%s'"
 msgstr "正规表现不对, 原因是'%s'"
 
-#: src/main/grep.c:220 src/main/grep.c:308 src/main/grep.c:416
-#: src/main/grep.c:883 src/main/grep.c:2473
+#: src/main/grep.c:225 src/main/grep.c:315 src/main/grep.c:426
+#: src/main/grep.c:900 src/main/grep.c:2502
 #, c-format
 msgid "input string %d is invalid UTF-8"
 msgstr "输入的字符串%d不是UTF-8"
 
-#: src/main/grep.c:286 src/main/grep.c:383
+#: src/main/grep.c:292 src/main/grep.c:391
 #, c-format
 msgid "'split' string %d is invalid UTF-8"
 msgstr "'split'字符串%d不是UTF-8"
 
-#: src/main/grep.c:290 src/main/grep.c:387 src/main/grep.c:560
+#: src/main/grep.c:296 src/main/grep.c:395 src/main/grep.c:571
 #, c-format
 msgid "'split' string %d is invalid in this locale"
 msgstr "在目前的语言环境中'split'字符串%d不是UTF-8"
 
-#: src/main/grep.c:395 src/main/grep.c:851 src/main/grep.c:1600
-#: src/main/grep.c:2394
+#: src/main/grep.c:404 src/main/grep.c:867 src/main/grep.c:1621
+#: src/main/grep.c:2419
 #, c-format
 msgid ""
 "PCRE pattern compilation error\n"
@@ -3824,13 +3906,13 @@ msgstr ""
 "\t'%s'\n"
 "\t在'%s'\n"
 
-#: src/main/grep.c:397
+#: src/main/grep.c:406
 #, c-format
 msgid "invalid split pattern '%s'"
 msgstr "split的式样'%s'不对"
 
-#: src/main/grep.c:401 src/main/grep.c:857 src/main/grep.c:1607
-#: src/main/grep.c:2401
+#: src/main/grep.c:410 src/main/grep.c:873 src/main/grep.c:1628
+#: src/main/grep.c:2426
 #, c-format
 msgid ""
 "PCRE pattern study error\n"
@@ -3839,45 +3921,45 @@ msgstr ""
 "PCRE模式研究错误\n"
 "\t'%s'\n"
 
-#: src/main/grep.c:834 src/main/grep.c:2377
+#: src/main/grep.c:849 src/main/grep.c:2401
 msgid "regular expression is invalid UTF-8"
 msgstr "正规表现不是UTF-8"
 
-#: src/main/grep.c:853 src/main/grep.c:1602 src/main/grep.c:2396
+#: src/main/grep.c:869 src/main/grep.c:1623 src/main/grep.c:2421
 #, c-format
 msgid "invalid regular expression '%s'"
 msgstr "正规表现’%s'不对"
 
-#: src/main/grep.c:1264
+#: src/main/grep.c:1282
 msgid "pattern matches an empty string infinitely, returning first match only"
 msgstr "模式无限匹配了一个空字符串,因此只返回第一个匹配"
 
-#: src/main/grep.c:1575
+#: src/main/grep.c:1595
 msgid "'pattern' is invalid UTF-8"
 msgstr "'pattern'不是UTF-8"
 
-#: src/main/grep.c:1577
+#: src/main/grep.c:1597
 msgid "'replacement' is invalid UTF-8"
 msgstr "'replacement'不是UTF-8"
 
-#: src/main/grep.c:1581
+#: src/main/grep.c:1601
 msgid "'pattern' is invalid in this locale"
 msgstr "'pattern'在本语言环境下不适用"
 
-#: src/main/grep.c:1584
+#: src/main/grep.c:1604
 msgid "'replacement' is invalid in this locale"
 msgstr "'replacement'在本语言环境下不适用"
 
-#: src/main/grep.c:1589
+#: src/main/grep.c:1609
 msgid "zero-length pattern"
 msgstr "式样长度为零"
 
-#: src/main/grep.c:1732 src/main/grep.c:1748 src/main/grep.c:1796
-#: src/main/grep.c:1812 src/main/grep.c:1859 src/main/grep.c:1875
+#: src/main/grep.c:1753 src/main/grep.c:1769 src/main/grep.c:1817
+#: src/main/grep.c:1833 src/main/grep.c:1880 src/main/grep.c:1896
 msgid "result string is too long"
 msgstr "结果字符串太长"
 
-#: src/main/grep.c:2411
+#: src/main/grep.c:2436
 #, c-format
 msgid "'pcre_fullinfo' returned '%d' "
 msgstr "'pcre_fullinfo'返回了'%d'"
@@ -3886,33 +3968,29 @@ msgstr "'pcre_fullinfo'返回了'%d'"
 msgid "ignoring non-pairlist attributes"
 msgstr "忽略非pairlist的属性"
 
-#: src/main/internet.c:92
+#: src/main/internet.c:83
 msgid "internet routines cannot be accessed in module"
 msgstr "无法读写模块里的互联网例行程序"
 
-#: src/main/internet.c:103 src/main/internet.c:141 src/main/internet.c:154
-#: src/main/internet.c:165 src/main/internet.c:176 src/main/internet.c:187
-#: src/main/internet.c:196 src/main/internet.c:207 src/main/internet.c:218
-#: src/main/internet.c:227 src/main/internet.c:237
+#: src/main/internet.c:94 src/main/internet.c:106 src/main/internet.c:119
+#: src/main/internet.c:130 src/main/internet.c:141 src/main/internet.c:152
+#: src/main/internet.c:161 src/main/internet.c:172 src/main/internet.c:183
+#: src/main/internet.c:192 src/main/internet.c:202 src/main/internet.c:318
+#: src/main/internet.c:330 src/main/internet.c:342 src/main/internet.c:354
 msgid "internet routines cannot be loaded"
 msgstr "无法载入互联网例行程序"
 
-#: src/main/internet.c:118 src/main/memory.c:3434 src/main/memory.c:3444
-#: src/main/memory.c:3456 src/main/memory.c:3470 src/main/memory.c:3487
-#: src/main/memory.c:3505
-msgid "bad value"
-msgstr "值不对"
-
-#: src/main/internet.c:124
-msgid "internet routines were already initialized"
-msgstr "互联网例行程序已经打开了"
-
-#: src/main/internet.c:251 src/main/internet.c:265 src/main/internet.c:281
-#: src/main/internet.c:293 src/main/internet.c:307 src/main/internet.c:327
-#: src/main/internet.c:340
+#: src/main/internet.c:216 src/main/internet.c:230 src/main/internet.c:247
+#: src/main/internet.c:259 src/main/internet.c:273 src/main/internet.c:293
+#: src/main/internet.c:306
 msgid "socket routines cannot be loaded"
 msgstr "无法载入插坐例行程序"
 
+#: src/main/internet.c:242
+#, fuzzy
+msgid "attempt to close invalid socket"
+msgstr "无法设定'comment'属性"
+
 #: src/main/lapack.c:39
 msgid "LAPACK routines cannot be accessed in module"
 msgstr "LAPACK例行程序无法使用在模块中"
@@ -3921,42 +3999,38 @@ msgstr "LAPACK例行程序无法使用在模块中"
 msgid "LAPACK routines cannot be loaded"
 msgstr "无法载入LAPACK例行程序"
 
-#: src/main/logic.c:70
-msgid "binary operations require two arguments"
-msgstr "二进列运算需要两个参数"
-
-#: src/main/logic.c:88 src/main/logic.c:150
+#: src/main/logic.c:80 src/main/logic.c:142
 msgid "operations are possible only for numeric, logical or complex types"
 msgstr "此运算只适用于数值,逻辑值或复数值种类"
 
-#: src/main/logic.c:98
+#: src/main/logic.c:90
 msgid "binary operation on non-conformable arrays"
 msgstr "二进列运算不能在非整合陈列上进行"
 
-#: src/main/logic.c:124 src/main/relop.c:247
+#: src/main/logic.c:116 src/main/relop.c:241
 msgid "non-conformable time series"
 msgstr "非整合时间系列"
 
-#: src/main/logic.c:254
+#: src/main/logic.c:247
 #, c-format
 msgid "'%s' operator requires 2 arguments"
 msgstr "'%s'运算符需要两个参数"
 
-#: src/main/logic.c:261
+#: src/main/logic.c:254
 #, c-format
 msgid "invalid 'x' type in 'x %s y'"
 msgstr "'x %s y'里的'x'种类不对"
 
-#: src/main/logic.c:268
+#: src/main/logic.c:261
 #, c-format
 msgid "invalid 'y' type in 'x %s y'"
 msgstr "'x %s y'里的'y'种类不对"
 
-#: src/main/logic.c:341
+#: src/main/logic.c:334
 msgid "Unary operator `!' called with two arguments"
 msgstr "单进列运算`!'不能有两个参数"
 
-#: src/main/logic.c:448
+#: src/main/logic.c:439
 #, c-format
 msgid "coercing argument of type '%s' to logical"
 msgstr "将种类为'%s'的参数强迫转化为逻辑值"
@@ -3965,61 +4039,75 @@ msgstr "将种类为'%s'的参数强迫转化为逻辑值"
 msgid "dummy - do not translate"
 msgstr "dummy - do not translate"
 
-#: src/main/main.c:476
+#: src/main/main.c:329
+#, fuzzy
+msgid "error during cleanup\n"
+msgstr "收捲时出错: "
+
+#: src/main/main.c:336
+msgid "Execution halted\n"
+msgstr "停止执行\n"
+
+#: src/main/main.c:505
 msgid "Error: segfault from C stack overflow\n"
 msgstr "错误:C堆叠上溢\n"
 
-#: src/main/main.c:846
+#: src/main/main.c:888
 msgid "unable to open the base package\n"
 msgstr "无法打开基本程序包\n"
 
-#: src/main/main.c:924
+#: src/main/main.c:971
 #, c-format
 msgid "unable to restore saved data in %s\n"
 msgstr "无法復原保存在%s里的数据\n"
 
-#: src/main/main.c:971
+#: src/main/main.c:1020
 msgid "During startup - "
 msgstr "在启动过程中 - "
 
-#: src/main/main.c:1224
+#: src/main/main.c:1036
+#, fuzzy
+msgid "unable to initialize the JIT\n"
+msgstr "无法打开文件来读取数据"
+
+#: src/main/main.c:1290
 msgid "cannot quit from browser"
 msgstr "无法退出瀏覽器"
 
-#: src/main/main.c:1228
+#: src/main/main.c:1294
 msgid "one of \"yes\", \"no\", \"ask\" or \"default\" expected."
 msgstr "只能用\"yes\", \"no\", \"ask\"或\"default\"中的一个."
 
-#: src/main/main.c:1233
+#: src/main/main.c:1299
 msgid "save=\"ask\" in non-interactive use: command-line default will be used"
 msgstr "save=\"ask\"不能在非交互型状态时使用,改用命令行缺省值"
 
-#: src/main/main.c:1241
+#: src/main/main.c:1307
 msgid "unrecognized value of 'save'"
 msgstr "没有这种'save'值"
 
-#: src/main/main.c:1244
+#: src/main/main.c:1310
 msgid "invalid 'status', 0 assumed"
 msgstr "'status'不对, 假設为零"
 
-#: src/main/main.c:1249
+#: src/main/main.c:1315
 msgid "invalid 'runLast', FALSE assumed"
 msgstr "'runLast'不对, 假設为FALSE"
 
-#: src/main/main.c:1280
+#: src/main/main.c:1346
 msgid "cannot allocate space for toplevel callback element"
 msgstr "无法为最高层回叫元素分配空间"
 
-#: src/main/main.c:1358
+#: src/main/main.c:1424
 msgid "negative index passed to R_removeTaskCallbackByIndex"
 msgstr "R_removeTaskCallbackByIndex不能用负的索引值"
 
-#: src/main/main.c:1468
+#: src/main/main.c:1534
 #, c-format
 msgid "warning messages from top-level task callback '%s'\n"
 msgstr "最高层任务回叫'%s'时产生了警告信息\n"
 
-#: src/main/main.c:1524
+#: src/main/main.c:1591
 msgid "top-level task callback did not return a logical value"
 msgstr "最高层任务回叫没有回覆逻辑值"
 
@@ -4039,340 +4127,326 @@ msgstr "长参数的长度不是短参数的长度的整倍数"
 msgid "invalid partial string match"
 msgstr "部分字符串比较不对"
 
-#: src/main/match.c:228 src/main/match.c:268 src/main/objects.c:56
-#: src/main/objects.c:66
+#: src/main/match.c:228 src/main/match.c:266 src/main/objects.c:49
+#: src/main/objects.c:59
 #, c-format
 msgid "formal argument \"%s\" matched by multiple actual arguments"
 msgstr "正式参数\"%s\"有多个与之相对应的实际参数"
 
-#: src/main/match.c:231 src/main/match.c:266
+#: src/main/match.c:231 src/main/match.c:264
 #, c-format
 msgid "argument %d matches multiple formal arguments"
 msgstr "参数%d有多个与之相对应的正式参数"
 
-#: src/main/match.c:272
+#: src/main/match.c:270
 #, c-format
 msgid "partial argument match of '%s' to '%s'"
 msgstr "'%s'部分匹配为'%s'"
 
-#: src/main/match.c:383
+#: src/main/match.c:380
 #, c-format
 msgid "unused argument %s"
 msgid_plural "unused arguments %s"
 msgstr[0] "参数没有用%s"
 
-#: src/main/memory.c:1232
+#: src/main/memory.c:1234
 msgid "can only weakly reference/finalize reference objects"
 msgstr "只能微弱引用或定局引用对象"
 
-#: src/main/memory.c:1266
+#: src/main/memory.c:1268
 msgid "finalizer must be a function or NULL"
 msgstr "定局器必需是函数或NULL"
 
-#: src/main/memory.c:1322 src/main/memory.c:1330 src/main/memory.c:1341
+#: src/main/memory.c:1324 src/main/memory.c:1332 src/main/memory.c:1343
 msgid "not a weak reference"
 msgstr "非微弱引用"
 
-#: src/main/memory.c:1472
+#: src/main/memory.c:1474
 msgid "first argument must be environment or external pointer"
 msgstr "第一参数必需是环境或外部指针"
 
-#: src/main/memory.c:1474
+#: src/main/memory.c:1476
 msgid "second argument must be a function"
 msgstr "第二参数必需是函数"
 
-#: src/main/memory.c:1478
+#: src/main/memory.c:1480
 msgid "third argument must be 'TRUE' or 'FALSE'"
 msgstr "第三个的值要么是TRUE要么是FALSE"
 
-#: src/main/memory.c:1970
+#: src/main/memory.c:1979
 msgid "vector memory exhausted (limit reached?)"
 msgstr "矢量内存用完了(达到了极限?)"
 
-#: src/main/memory.c:1976
+#: src/main/memory.c:1985
 msgid "cons memory exhausted (limit reached?)"
 msgstr "cons内存用完了(达到了极限?)"
 
-#: src/main/memory.c:1981
+#: src/main/memory.c:1990
 msgid "memory exhausted (limit reached?)"
 msgstr "内存用完了(达到了极限?)"
 
-#: src/main/memory.c:2116
+#: src/main/memory.c:2126
 #, c-format
 msgid "cannot allocate memory block of size %0.f Tb"
 msgstr "无法分配大小为%0.f Tb的内存块"
 
-#: src/main/memory.c:2121
+#: src/main/memory.c:2131
 #, c-format
 msgid "cannot allocate memory block of size %0.1f Gb"
 msgstr "无法分配大小为%0.1f Gb的内存块"
 
-#: src/main/memory.c:2442
+#: src/main/memory.c:2458
 msgid "vector is too large"
 msgstr "矢量设得太大了"
 
-#: src/main/memory.c:2445
+#: src/main/memory.c:2461
 msgid "negative length vectors are not allowed"
 msgstr "不能有负长度矢量"
 
-#: src/main/memory.c:2471 src/main/memory.c:2484 src/main/memory.c:2497
-#: src/main/memory.c:2512
+#: src/main/memory.c:2487 src/main/memory.c:2500 src/main/memory.c:2513
+#: src/main/memory.c:2528
 #, c-format
 msgid "cannot allocate vector of length %d"
 msgstr "无法分配长度为%d的矢量"
 
-#: src/main/memory.c:2533
+#: src/main/memory.c:2549
 #, c-format
 msgid "invalid type/length (%s/%d) in vector allocation"
 msgstr "矢量分配的种类/长度(%s/%d)不对"
 
-#: src/main/memory.c:2636
+#: src/main/memory.c:2648
 #, c-format
 msgid "cannot allocate vector of size %0.1f Gb"
 msgstr "无法分配大小为%0.1f Gb的矢量"
 
-#: src/main/memory.c:2640
+#: src/main/memory.c:2652
 #, c-format
 msgid "cannot allocate vector of size %0.1f Mb"
 msgstr "无法分配大小为%0.1f Mb的矢量"
 
-#: src/main/memory.c:2644
+#: src/main/memory.c:2656
 #, c-format
 msgid "cannot allocate vector of size %0.f Kb"
 msgstr "无法分配大小为%0.f Kb的矢量"
 
-#: src/main/memory.c:3001
+#: src/main/memory.c:3071
 msgid "protect(): protection stack overflow"
 msgstr "protect():防护堆叠上溢"
 
-#: src/main/memory.c:3008
-#, c-format
-msgid "unprotect(): only %d protected items"
-msgstr "unprotect():只有%d个保护项"
+#: src/main/memory.c:3078
+#, fuzzy, c-format
+msgid "unprotect(): only %d protected item"
+msgid_plural "unprotect(): only %d protected items"
+msgstr[0] "unprotect():只有%d个保护项"
 
-#: src/main/memory.c:3041
+#: src/main/memory.c:3113
 msgid "unprotect_ptr: pointer not found"
 msgstr "unprotect_ptr: 找不到指针"
 
-#: src/main/memory.c:3079
-#, c-format
-msgid "R_Reprotect: only %d protected items, can't reprotect index %d"
-msgstr "R_Reprotect:只有%d个保护项, 不能重新保护索引%d"
+#: src/main/memory.c:3151
+#, fuzzy, c-format
+msgid "R_Reprotect: only %d protected item, can't reprotect index %d"
+msgid_plural "R_Reprotect: only %d protected items, can't reprotect index %d"
+msgstr[0] "R_Reprotect:只有%d个保护项, 不能重新保护索引%d"
 
-#: src/main/memory.c:3129
+#: src/main/memory.c:3203
 #, c-format
 msgid "'Calloc' could not allocate memory (%.0f of %u bytes)"
 msgstr "'Calloc'无法分配(%2$u字节的%1$.0f)内存"
 
-#: src/main/memory.c:3140
+#: src/main/memory.c:3214
 #, c-format
 msgid "'Realloc' could not re-allocate memory (%.0f bytes)"
 msgstr "'Realloc'无法重新分配(大小为%.0f字节)的内存"
 
-#: src/main/memory.c:3380
+#: src/main/memory.c:3460
 msgid "not safe to return vector pointer"
 msgstr "回覆矢量指针不是安全的做法"
 
-#: src/main/memory.c:3392
+#: src/main/memory.c:3471
 #, c-format
 msgid "attempt to set index %lu/%lu in SET_STRING_ELT"
 msgstr ""
 
-#: src/main/memory.c:3408
+#: src/main/memory.c:3487
 #, c-format
 msgid "attempt to set index %lu/%lu in SET_VECTOR_ELT"
 msgstr ""
 
-#: src/main/memory.c:3658
+#: src/main/memory.c:3514 src/main/memory.c:3524 src/main/memory.c:3536
+#: src/main/memory.c:3550 src/main/memory.c:3565 src/main/memory.c:3583
+msgid "bad value"
+msgstr "值不对"
+
+#: src/main/memory.c:3746
 msgid "memory profiling is not available on this system"
 msgstr "本系统没有记忆概要分析这个功能"
 
-#: src/main/memory.c:3723
+#: src/main/memory.c:3810
 #, c-format
 msgid "Rprofmem: cannot open output file '%s'"
 msgstr "Rprofmem: 无法输出文件'%s'"
 
-#: src/main/memory.c:3830
+#: src/main/memory.c:3915
 #, c-format
 msgid "long vectors not supported yet: %s:%d"
 msgstr "现在还没有支持长向量:%s:%d"
 
-#: src/main/names.c:996
+#: src/main/names.c:1021
 msgid "string argument required"
 msgstr "需要字符串参数"
 
-#: src/main/names.c:999
+#: src/main/names.c:1024
 msgid "no such primitive function"
 msgstr "没有这种原始函数"
 
-#: src/main/names.c:1146
+#: src/main/names.c:1212 src/main/names.c:1242
 msgid "attempt to use zero-length variable name"
 msgstr "不能用零长度变数名"
 
-#: src/main/names.c:1148
+#: src/main/names.c:1214 src/main/names.c:1244
 #, c-format
 msgid "variable names are limited to %d bytes"
 msgstr "变量名限制于%d字节"
 
-#: src/main/names.c:1176 src/main/names.c:1179
+#: src/main/names.c:1307 src/main/names.c:1310
 msgid "invalid .Internal() argument"
 msgstr ".Internal()参数不对"
 
-#: src/main/objects.c:46
+#: src/main/objects.c:39
 msgid "generic 'function' is not a function"
 msgstr "类属'function'不是函数"
 
-#: src/main/objects.c:201
+#: src/main/objects.c:193
 msgid "bad generic call environment"
 msgstr "类属调用环境不对"
 
-#: src/main/objects.c:207
+#: src/main/objects.c:201
 msgid "bad generic definition environment"
 msgstr "类属定义环境不对"
 
-#: src/main/objects.c:246
+#: src/main/objects.c:249
 msgid ""
 "no '.S3MethodsClass' table, cannot use S4 objects with S3 methods ('methods' "
 "package not attached?)"
 msgstr "没有'.S3MethodsClass'表,不能将S3方法用在S4目标对象上('methods'"
 
-#: src/main/objects.c:270 src/main/objects.c:411
-msgid "'UseMethod' used in an inappropriate fashion"
-msgstr "'UseMethod'不能这样使用"
-
-#: src/main/objects.c:290
-msgid "invalid generic function in 'usemethod'"
-msgstr "'usemethod'里类属功能无效"
-
-#: src/main/objects.c:399
+#: src/main/objects.c:415
 msgid "there must be a 'generic' argument"
 msgstr "必需有'generic'参数"
 
-#: src/main/objects.c:403
+#: src/main/objects.c:419
 msgid "'generic' argument must be a character string"
 msgstr "'generic'参数必需是字符串"
 
-#: src/main/objects.c:440
-msgid "'UseMethod' called from outside a function"
-msgstr "不能在函数外调用'UseMethod' "
-
-#: src/main/objects.c:447
-msgid "first argument must be a generic name"
-msgstr "第一参数必需是类属名"
+#: src/main/objects.c:427
+msgid "'UseMethod' used in an inappropriate fashion"
+msgstr "'UseMethod'不能这样使用"
 
 #: src/main/objects.c:472
 #, c-format
 msgid "no applicable method for '%s' applied to an object of class \"%s\""
 msgstr "\"%s\"没有适用于\"%s\"目标对象的方法"
 
-#: src/main/objects.c:533
+#: src/main/objects.c:582
 msgid "'NextMethod' called from outside a function"
 msgstr "不能在函数外调用'NextMethod' "
 
-#: src/main/objects.c:539
+#: src/main/objects.c:588
 msgid "'NextMethod' called from an anonymous function"
 msgstr "不能在匿名函数内调用'NextMethod' "
 
-#: src/main/objects.c:563
+#: src/main/objects.c:609
 msgid "no calling generic was found: was a method called directly?"
 msgstr "找不到调用此方法的类属函数: 是不是已经直接调用这个方法?"
 
-#: src/main/objects.c:566
+#: src/main/objects.c:612
 #, c-format
 msgid "'function' is not a function, but of type %d"
 msgstr "'function'不是函数, 而是种类%d"
 
-#: src/main/objects.c:640
+#: src/main/objects.c:639
 msgid "wrong argument ..."
 msgstr "参数不对 ..."
 
-#: src/main/objects.c:653
+#: src/main/objects.c:651
 msgid "object not specified"
 msgstr "没有设定对象"
 
-#: src/main/objects.c:663 src/main/objects.c:670
+#: src/main/objects.c:659 src/main/objects.c:666
 msgid "generic function not specified"
 msgstr "没有设定类属功能"
 
-#: src/main/objects.c:667
+#: src/main/objects.c:663
 msgid "invalid generic argument to 'NextMethod'"
 msgstr "'NextMethod'里不能有类属参数"
 
-#: src/main/objects.c:680
+#: src/main/objects.c:675
 msgid "invalid 'group' argument found in 'NextMethod'"
 msgstr "'NextMethod'里的'group'参数不对"
 
-#: src/main/objects.c:699
+#: src/main/objects.c:692
 msgid "wrong value for .Method"
 msgstr ".Method的值不对"
 
-#: src/main/objects.c:703 src/main/objects.c:712
-#, c-format
-msgid "method name too long in '%s'"
-msgstr "'%s'里的方法名字太长"
-
-#: src/main/objects.c:715
+#: src/main/objects.c:702
 msgid "Incompatible methods ignored"
 msgstr "不可兼容方法,略过不用"
 
-#: src/main/objects.c:775 src/main/objects.c:780
+#: src/main/objects.c:759 src/main/objects.c:766
 msgid "no method to invoke"
 msgstr "没有可以调用的方法"
 
-#: src/main/objects.c:832
+#: src/main/objects.c:817
 msgid "cannot unclass an environment"
 msgstr "无法取消环境的类别"
 
-#: src/main/objects.c:835
+#: src/main/objects.c:820
 msgid "cannot unclass an external pointer"
 msgstr "无法取消外部指针的类别"
 
-#: src/main/objects.c:872
+#: src/main/objects.c:856
 msgid "'what' must be a character vector"
 msgstr "'what'必需是字符矢量"
 
-#: src/main/objects.c:876
+#: src/main/objects.c:860
 msgid "'which' must be a length 1 logical vector"
 msgstr "'which'必需是长度为一的逻辑矢量"
 
-#: src/main/objects.c:882
+#: src/main/objects.c:866
 msgid "use 'is()' instead of 'inherits()' on S4 objects"
 msgstr "对S4目标对象请用'is()'而不是'inherits()'"
 
-#: src/main/objects.c:1012
+#: src/main/objects.c:995
 msgid "could not find correct environment; please report!"
 msgstr "找不到正确的环境;请报告!"
 
-#: src/main/objects.c:1052
+#: src/main/objects.c:1039
 msgid "'onOff' must be TRUE or FALSE"
 msgstr "'onOff'必需是TRUE或FALSE"
 
-#: src/main/objects.c:1119
+#: src/main/objects.c:1104
 #, c-format
 msgid "unable to find a non-generic version of function \"%s\""
 msgstr "无法找到函数\"%s\"非类属的版本"
 
-#: src/main/objects.c:1151
+#: src/main/objects.c:1136
 msgid ""
 "'standardGeneric' called without 'methods' dispatch enabled (will be ignored)"
 msgstr "'methods'分派没有激活,因此不能调用'standardGeneric' (略过不用)"
 
-#: src/main/objects.c:1160
+#: src/main/objects.c:1145
 msgid "argument to 'standardGeneric' must be a non-empty character string"
 msgstr "'standardGeneric'的参数必需是非空字符串"
 
-#: src/main/objects.c:1165
+#: src/main/objects.c:1150
 #, c-format
 msgid ""
 "call to standardGeneric(\"%s\") apparently not from the body of that generic "
 "function"
 msgstr "不能从非泛型函数体内调用standardGeneric(\"%s\") "
 
-#: src/main/objects.c:1189
-msgid "argument 'code' must be a character string"
-msgstr "参数'code'必需是字符串"
-
-#: src/main/objects.c:1257
+#: src/main/objects.c:1249
 #, c-format
 msgid ""
 "invalid primitive methods code (\"%s\"): should be \"clear\", \"reset\", "
@@ -4380,112 +4454,122 @@ msgid ""
 msgstr ""
 "原始方法代码(\"%s\")有错:应该是\"clear\", \"reset\", \"set\", 或\"suppress\""
 
-#: src/main/objects.c:1265
+#: src/main/objects.c:1257
 msgid "invalid object: must be a primitive function"
 msgstr "对象不对: 必需是原始函数"
 
-#: src/main/objects.c:1312
+#: src/main/objects.c:1304
 #, c-format
 msgid ""
 "the formal definition of a primitive generic must be a function object (got "
 "type '%s')"
 msgstr "原始同属函数的正式定义必需是函数对象(不能是'%s'类)"
 
-#: src/main/objects.c:1342
+#: src/main/objects.c:1334
 #, c-format
 msgid "object returned as generic function \"%s\" does not appear to be one"
 msgstr "回归为同属函数的目标对象\"%s\"看起来不象"
 
-#: src/main/objects.c:1444
+#: src/main/objects.c:1439
 msgid "invalid primitive operation given for dispatch"
 msgstr "不能分派原始运算"
 
-#: src/main/objects.c:1470 src/main/objects.c:1489
+#: src/main/objects.c:1468 src/main/objects.c:1487
 msgid "dispatch error"
 msgstr "分派错误"
 
-#: src/main/objects.c:1483
+#: src/main/objects.c:1481
 #, c-format
 msgid ""
 "primitive function \"%s\" has been set for methods but no generic function "
 "supplied"
 msgstr "原始函数\"%s\"有了设定的方法,但却没有同属函数 "
 
-#: src/main/objects.c:1508
+#: src/main/objects.c:1506
 msgid "C level MAKE_CLASS macro called with NULL string pointer"
 msgstr "调用C层的MAKE_TYPE宏时不能用NULL字符串指针"
 
-#: src/main/objects.c:1524
+#: src/main/objects.c:1522
+#, fuzzy
+msgid "'methods' package not yet loaded"
+msgstr "无法载入Hershey字形"
+
+#: src/main/objects.c:1532
 msgid "R_getClassDef(.) called with NULL string pointer"
 msgstr "调用R_getClassDef(.) 时不能用NULL字符串指针"
 
-#: src/main/objects.c:1546
+#: src/main/objects.c:1577
 msgid "C level NEW macro called with null class definition pointer"
 msgstr "调用C级的NEW宏时不能用null类别定义指针"
 
-#: src/main/objects.c:1550
+#: src/main/objects.c:1581
 #, c-format
 msgid "trying to generate an object from a virtual class (\"%s\")"
 msgstr "无法从虚拟类别(\"%s\")中产生对象"
 
-#: src/main/objects.c:1627
+#: src/main/objects.c:1663
 #, c-format
 msgid "object of class \"%s\" does not correspond to a valid S3 object"
 msgstr "类别为\"%s\"的目标对象不符合一个有效的S3目标对象"
 
-#: src/main/options.c:120 src/main/options.c:180
+#: src/main/options.c:121 src/main/options.c:182
 msgid "corrupted options list"
 msgstr "选择项名单败坏"
 
-#: src/main/options.c:130
+#: src/main/options.c:131
 msgid "invalid printing width, used 80"
 msgstr "印刷宽度不对,用80"
 
-#: src/main/options.c:141
+#: src/main/options.c:142
 msgid "invalid printing digits, used 7"
 msgstr "印刷数字无效,用7"
 
-#: src/main/options.c:153
+#: src/main/options.c:154
 msgid "invalid 'deparse.cutoff', used 60"
 msgstr "'deparse.cutoff'无效,用了60"
 
-#: src/main/options.c:165
+#: src/main/options.c:166
 msgid "invalid value for \"device.ask.default\", using FALSE"
 msgstr "\"device.ask.default\"的值无效,用FALSE"
 
-#: src/main/options.c:401
+#: src/main/options.c:416
 msgid "list argument has no valid names"
 msgstr "串列参数的名字不对"
 
-#: src/main/options.c:429
+#: src/main/options.c:445
 #, c-format
 msgid "invalid 'width' parameter, allowed %d...%d"
 msgstr "'width'参数不对,可用%d...%d"
 
-#: src/main/options.c:440
+#: src/main/options.c:456
 #, c-format
 msgid "invalid 'digits' parameter, allowed %d...%d"
 msgstr "'digits'参数不对,可用%d...%d"
 
-#: src/main/options.c:447
+#: src/main/options.c:463
 #, c-format
 msgid "'expressions' parameter invalid, allowed %d...%d"
 msgstr "'expressions'参数不对,,可用%d...%d"
 
-#: src/main/options.c:454 src/main/options.c:462 src/main/options.c:468
-#: src/main/options.c:476 src/main/options.c:483 src/main/options.c:488
-#: src/main/options.c:495 src/main/options.c:501 src/main/options.c:507
-#: src/main/options.c:512 src/main/options.c:517 src/main/options.c:526
-#: src/main/options.c:532 src/main/options.c:538 src/main/options.c:549
-#: src/main/options.c:556 src/main/options.c:562 src/main/options.c:570
-#: src/main/options.c:577 src/main/options.c:584 src/main/options.c:591
-#: src/main/options.c:598 src/main/options.c:606 src/main/options.c:615
-#: src/main/options.c:618 src/main/options.c:624
+#: src/main/options.c:470 src/main/options.c:478 src/main/options.c:484
+#: src/main/options.c:492 src/main/options.c:499 src/main/options.c:504
+#: src/main/options.c:511 src/main/options.c:517 src/main/options.c:523
+#: src/main/options.c:528 src/main/options.c:533 src/main/options.c:542
+#: src/main/options.c:548 src/main/options.c:554 src/main/options.c:564
+#: src/main/options.c:578 src/main/options.c:584 src/main/options.c:592
+#: src/main/options.c:599 src/main/options.c:606 src/main/options.c:613
+#: src/main/options.c:620 src/main/options.c:628 src/main/options.c:637
+#: src/main/options.c:640 src/main/options.c:646
 #, c-format
 msgid "invalid value for '%s'"
 msgstr "'%s'的值不对"
 
-#: src/main/options.c:611 src/main/options.c:640
+#: src/main/options.c:569
+#, fuzzy
+msgid "'OutDec' must be a string of one character"
+msgstr "'dec'必需为单节字符"
+
+#: src/main/options.c:633 src/main/options.c:662
 msgid "\"par.ask.default\" has been replaced by \"device.ask.default\""
 msgstr "\"device.ask.default\"代替了\"par.ask.default\" "
 
@@ -4505,15 +4589,20 @@ msgstr "结果将会超过2^31-1个字节"
 msgid "non-string argument to Internal paste"
 msgstr "内部貼補的参数不是字符串"
 
-#: src/main/paste.c:390
+#: src/main/paste.c:387
 msgid "first argument must be atomic"
 msgstr "第一个参数必需是基元"
 
-#: src/main/paste.c:560
+#: src/main/paste.c:448
+#, fuzzy
+msgid "'decimal.mark' must be a string of one character"
+msgstr "'dec'必需为单节字符"
+
+#: src/main/paste.c:579
 msgid "Impossible mode ( x )"
 msgstr "不可能出现这种状态(x)"
 
-#: src/main/paste.c:645
+#: src/main/paste.c:663
 msgid "atomic vector arguments only"
 msgstr "只能用原子矢量参数"
 
@@ -4521,210 +4610,193 @@ msgstr "只能用原子矢量参数"
 msgid "invalid filename specification"
 msgstr "文件名字设定不对"
 
-#: src/main/platform.c:375 src/main/platform.c:419
+#: src/main/platform.c:375 src/main/platform.c:420
 msgid "write error during file append"
 msgstr "文件追加时书写出错"
 
-#: src/main/platform.c:394
+#: src/main/platform.c:395
 msgid "nothing to append to"
 msgstr "没有可以追加的文件"
 
-#: src/main/platform.c:448 src/main/platform.c:795
+#: src/main/platform.c:449 src/main/platform.c:797 src/main/platform.c:979
 msgid "invalid filename argument"
 msgstr "filename参数不对"
 
-#: src/main/platform.c:460
+#: src/main/platform.c:461
 #, c-format
 msgid "cannot create file '%s', reason '%s'"
 msgstr "由于'%2$s'的原因,无法建立'%1$s'文件"
 
-#: src/main/platform.c:475 src/main/platform.c:545 src/main/platform.c:627
+#: src/main/platform.c:476 src/main/platform.c:546 src/main/platform.c:629
 msgid "invalid first filename"
 msgstr "第一个文件名字不对"
 
-#: src/main/platform.c:487
+#: src/main/platform.c:488
 #, c-format
 msgid "cannot remove file '%s', reason '%s'"
 msgstr "无法删除文件'%s',原因是'%s'"
 
-#: src/main/platform.c:547 src/main/platform.c:629
+#: src/main/platform.c:548 src/main/platform.c:631
 msgid "invalid second filename"
 msgstr "第二个文件名字不对"
 
-#: src/main/platform.c:549 src/main/platform.c:631
+#: src/main/platform.c:551 src/main/platform.c:634
 msgid "nothing to link"
 msgstr "没有可以链结的文件"
 
-#: src/main/platform.c:559
+#: src/main/platform.c:561
 msgid "symbolic links are not supported on this version of Windows"
 msgstr "此版本的Windows不支持符号链结"
 
-#: src/main/platform.c:581
+#: src/main/platform.c:583
 #, c-format
 msgid "cannot symlink '%ls' to '%ls', reason '%s'"
 msgstr "无法打开'%ls'到'%ls'的链结,原因是'%s'"
 
-#: src/main/platform.c:601
+#: src/main/platform.c:603
 #, c-format
 msgid "cannot symlink '%s' to '%s', reason '%s'"
 msgstr "无法打开'%s'到'%s'的链结,原因是'%s'"
 
-#: src/main/platform.c:609
+#: src/main/platform.c:611
 msgid "symbolic links are not supported on this platform"
 msgstr "这个平台不支持符号链结"
 
-#: src/main/platform.c:649
+#: src/main/platform.c:652
 #, c-format
 msgid "cannot link '%ls' to '%ls', reason '%s'"
 msgstr "无法打开'%ls'到'%ls'的链结,原因是'%s'"
 
-#: src/main/platform.c:669
+#: src/main/platform.c:672
 #, c-format
 msgid "cannot link '%s' to '%s', reason '%s'"
 msgstr "无法打开'%s'到'%s'的链结,原因是'%s'"
 
-#: src/main/platform.c:678
+#: src/main/platform.c:681
 msgid "(hard) links are not supported on this platform"
 msgstr "这个平台不支持(硬)链结"
 
-#: src/main/platform.c:709
+#: src/main/platform.c:713
 msgid "'from' and 'to' are of different lengths"
 msgstr "from'和'to'的长度不一样"
 
-#: src/main/platform.c:720 src/main/platform.c:730
+#: src/main/platform.c:724 src/main/platform.c:734
 msgid "expanded 'from' name too long"
 msgstr "扩展后的'from'名字太长"
 
-#: src/main/platform.c:724 src/main/platform.c:734
+#: src/main/platform.c:728 src/main/platform.c:738
 msgid "expanded 'to' name too long"
 msgstr "扩展后的'to'名字太长"
 
-#: src/main/platform.c:738
+#: src/main/platform.c:742
 #, c-format
 msgid "cannot rename file '%s' to '%s', reason '%s'"
 msgstr "由于'%3$s'的原因,无法将文件名字'%1$s'改成'%2$s'"
 
-#: src/main/platform.c:1094
+#: src/main/platform.c:1168
 msgid "invalid 'pattern' regular expression"
 msgstr "'pattern'正规表现不对"
 
-#: src/main/platform.c:1211
+#: src/main/platform.c:1285
 msgid "unable to determine R home location"
 msgstr "无法确定R本录位置"
 
-#: src/main/platform.c:1263
+#: src/main/platform.c:1338
 msgid "file name too long"
 msgstr "文件名太长"
 
-#: src/main/platform.c:1511 src/main/platform.c:1558 src/main/sysutils.c:1850
-#: src/main/sysutils.c:1864
+#: src/main/platform.c:1586 src/main/platform.c:1633 src/main/sysutils.c:1806
+#: src/main/sysutils.c:1820
 msgid "internal out-of-memory condition"
 msgstr "内部出现了内存不够情况"
 
-#: src/main/platform.c:1554 src/main/sysutils.c:1860
+#: src/main/platform.c:1629 src/main/sysutils.c:1816
 #, c-format
 msgid "read error on '%s'"
 msgstr "读取'%s'时出了错"
 
-#: src/main/platform.c:1722
+#: src/main/platform.c:1728
 msgid "setting 'LC_NUMERIC' may cause R to function strangely"
 msgstr "设定'LC_NUMERIC'后有可能会使R运转出现问题"
 
-#: src/main/platform.c:1736
+#: src/main/platform.c:1742
 msgid "LC_MESSAGES exists on Windows but is not operational"
 msgstr "LC_MESSAGES存在于Windows里,但没有用"
 
-#: src/main/platform.c:1763
+#: src/main/platform.c:1769
 #, c-format
 msgid "OS reports request to set locale to \"%s\" cannot be honored"
 msgstr "操作系统报告说无法执行将本地化设成\"%s\"的请求"
 
-#: src/main/platform.c:2065
-msgid "'hostname' must be a character vector of length 1"
-msgstr "'hostname'必需是长度为一的字符矢量"
-
-#: src/main/platform.c:2071
-#, c-format
-msgid "nsl() was unable to resolve host '%s'"
-msgstr "nsl()无法分辨主机'%s'"
-
-#: src/main/platform.c:2078
-msgid "unknown format returned by C function 'gethostbyname'"
-msgstr "'gethostbyname'回覆了错误的格式"
-
-#: src/main/platform.c:2087
-msgid "nsl() is not supported on this platform"
-msgstr "本平台不支持nsl()"
-
-#: src/main/platform.c:2158
+#: src/main/platform.c:2131
 #, c-format
 msgid "'%s' already exists"
 msgstr "'%s'已存在"
 
-#: src/main/platform.c:2161
+#: src/main/platform.c:2134
 #, c-format
 msgid "cannot create dir '%s', reason '%s'"
 msgstr "由于'%2$s'的原因,无法建立'%1$s'文件目录"
 
-#: src/main/platform.c:2207
+#: src/main/platform.c:2181
 #, c-format
 msgid "'%ls' already exists"
 msgstr "'%ls'已存在"
 
-#: src/main/platform.c:2211
+#: src/main/platform.c:2183 src/main/platform.c:2189
 #, c-format
 msgid "cannot create dir '%ls', reason '%s'"
 msgstr "由于'%2$s'的原因,无法建立'%1$ls'文件目录"
 
-#: src/main/platform.c:2245 src/main/platform.c:2449
+#: src/main/platform.c:2223 src/main/platform.c:2435
 msgid "too deep nesting"
 msgstr "嵌套过深"
 
-#: src/main/platform.c:2253 src/main/platform.c:2266 src/main/platform.c:2284
+#: src/main/platform.c:2231 src/main/platform.c:2244 src/main/platform.c:2262
 #, fuzzy
 msgid "over-long path"
 msgstr "路径长度太长了"
 
-#: src/main/platform.c:2273
+#: src/main/platform.c:2251
 #, c-format
 msgid "problem creating directory %ls: %s"
 msgstr "建立文件目录%ls时出了问题:%s"
 
-#: src/main/platform.c:2293
+#: src/main/platform.c:2271
 #, c-format
 msgid "problem reading dir %ls: %s"
 msgstr "读取文件目录%ls时出了问题:%s"
 
-#: src/main/platform.c:2304 src/main/platform.c:2465 src/main/platform.c:2478
-#: src/main/platform.c:2498 src/main/platform.c:2520
+#: src/main/platform.c:2282 src/main/platform.c:2451 src/main/platform.c:2464
+#: src/main/platform.c:2484 src/main/platform.c:2506
 msgid "over-long path length"
 msgstr "路径长度太长了"
 
-#: src/main/platform.c:2312
+#: src/main/platform.c:2290
 #, c-format
 msgid "problem copying %ls to %ls: %s"
 msgstr "拷贝%ls到%ls时出了问题:%s "
 
-#: src/main/platform.c:2487
+#: src/main/platform.c:2473
 #, c-format
 msgid "problem creating directory %s: %s"
 msgstr "建立文件目录%s时出了问题:%s"
 
-#: src/main/platform.c:2507
+#: src/main/platform.c:2493
 #, c-format
 msgid "problem reading directory %s: %s"
 msgstr "读取文件目录%s时出了问题:%s"
 
-#: src/main/platform.c:2529
+#: src/main/platform.c:2515
 #, c-format
 msgid "problem copying %s to %s: %s"
 msgstr "拷贝%s到%s出了问题: %s "
 
-#: src/main/platform.c:2662
+#: src/main/platform.c:2653
 msgid "'mode' must be of length at least one"
 msgstr "'mode'的长度至少需要是一"
 
-#: src/main/platform.c:2729
+#: src/main/platform.c:2720
 msgid "insufficient OS support on this platform"
 msgstr "本平台操作系统支持不够"
 
@@ -4745,90 +4817,95 @@ msgstr "所有的z值都是NA"
 msgid "invalid math style encountered"
 msgstr "数学字体不对"
 
-#: src/main/plotmath.c:1261 src/main/plotmath.c:1366 src/main/plotmath.c:2664
+#: src/main/plotmath.c:1260 src/main/plotmath.c:1365 src/main/plotmath.c:2654
 msgid "invalid mathematical annotation"
 msgstr "数学注释不对"
 
-#: src/main/plotmath.c:1670
+#: src/main/plotmath.c:1669
 msgid "invalid accent"
 msgstr "重音不对"
 
-#: src/main/plotmath.c:1964
+#: src/main/plotmath.c:1963
 msgid "invalid group delimiter"
 msgstr "组定界不对"
 
-#: src/main/plotmath.c:1991 src/main/plotmath.c:2137
+#: src/main/plotmath.c:1990 src/main/plotmath.c:2127
 msgid "invalid group specification"
 msgstr "组设定不对"
 
-#: src/main/plotmath.c:2062
+#: src/main/plotmath.c:2052
 msgid "group is incomplete"
 msgstr "组不全"
 
-#: src/main/plotmath.c:3190
+#: src/main/plotmath.c:3180
 msgid "Metric information not available for this family/device"
 msgstr "公制信息不适用此系列/设备"
 
-#: src/main/print.c:148 src/main/print.c:254
+#: src/main/print.c:140 src/main/print.c:247
 msgid "invalid 'na.print' specification"
 msgstr "'na.print'设定不对"
 
-#: src/main/print.c:157
+#: src/main/print.c:149
 msgid "invalid row labels"
 msgstr "行標記不对"
 
-#: src/main/print.c:159
+#: src/main/print.c:151
 msgid "invalid column labels"
 msgstr "列標記不对"
 
-#: src/main/print.c:183
+#: src/main/print.c:176
 msgid "non-function argument to .Internal(print.function(.))"
 msgstr ".Internal(print.function(.))参数是非函数"
 
-#: src/main/print.c:264
+#: src/main/print.c:257
 msgid "'gap' must be non-negative integer"
 msgstr "'gap'必需是正整数"
 
-#: src/main/print.c:289
+#: src/main/print.c:282
 msgid "invalid 'tryS4' internal argument"
 msgstr "'tryS4'内部参数不对"
 
-#: src/main/print.c:1028
+#: src/main/print.c:851
+#, fuzzy
+msgid "print buffer overflow"
+msgstr "%d行输入缓冲区上溢"
+
+#: src/main/print.c:1043
 msgid "invalid character length in 'dblepr'"
 msgstr "'dblepr'字符长度不对"
 
-#: src/main/print.c:1046
+#: src/main/print.c:1061
 msgid "invalid character length in 'intpr'"
 msgstr "'intpr'字符长度不对"
 
-#: src/main/print.c:1065
+#: src/main/print.c:1080
 msgid "invalid character length in 'realpr'"
 msgstr "'realpr'字符长度不对"
 
-#: src/main/print.c:1075
+#: src/main/print.c:1090
 msgid "memory allocation error in 'realpr'"
 msgstr "'realpr'内存分配错误"
 
-#: src/main/print.c:1091
+#: src/main/print.c:1106
 #, c-format
 msgid "BLAS/LAPACK routine '%6s' gave error code %d"
 msgstr "BLAS/LAPACK 例行程序'%6s'产生了错误%d信息"
 
-#: src/main/printarray.c:453
+#: src/main/printarray.c:332
 msgid "too few row labels"
 msgstr "行標記不够"
 
-#: src/main/printarray.c:455
+#: src/main/printarray.c:334
 msgid "too few column labels"
 msgstr "列標記不够"
 
-#: src/main/printarray.c:489
+#: src/main/printarray.c:368
 #, c-format
 msgid " [ reached getOption(\"max.print\") -- omitted %d row ]\n"
 msgid_plural " [ reached getOption(\"max.print\") -- omitted %d rows ]\n"
 msgstr[0] "[到达getOption(\"max.print\") -- 略过%d行]]\n"
 
-#: src/main/printutils.c:613
+#: src/main/printutils.c:710
 msgid "it is not known that wchar_t is Unicode on this platform"
 msgstr " wchar_t在本平台上不应该是Unicode"
 
@@ -4836,330 +4913,329 @@ msgstr " wchar_t在本平台上不应该是Unicode"
 msgid "argument is not a numeric vector"
 msgstr "参数不是数值矢量"
 
-#: src/main/random.c:37
+#: src/main/random.c:39
 msgid "invalid arguments"
 msgstr "参数不对"
 
-#: src/main/random.c:93 src/main/random.c:110 src/main/random.c:175
-#: src/main/random.c:201 src/main/random.c:274 src/main/random.c:288
+#: src/main/random.c:95 src/main/random.c:112 src/main/random.c:178
+#: src/main/random.c:204 src/main/random.c:277 src/main/random.c:291
 msgid "NAs produced"
 msgstr "产生了NA"
 
-#: src/main/random.c:445
+#: src/main/random.c:438
 msgid "NA in probability vector"
 msgstr "机率矢量中有NA"
 
-#: src/main/random.c:447
-msgid "non-positive probability"
+#: src/main/random.c:440
+#, fuzzy
+msgid "negative probability"
 msgstr "不能有非负机率"
 
-#: src/main/random.c:454
+#: src/main/random.c:447
 msgid "too few positive probabilities"
 msgstr "正值机率太少"
 
-#: src/main/random.c:491 src/main/random.c:519
+#: src/main/random.c:483 src/main/random.c:511
 msgid "cannot take a sample larger than the population when 'replace = FALSE'"
 msgstr ""
 "'replace = FALSE',因此不能取比总体要大的样本\n"
 " "
 
-#: src/main/random.c:498
+#: src/main/random.c:490
 msgid "incorrect number of probabilities"
 msgstr "机率数目不对"
 
-#: src/main/random.c:537
+#: src/main/random.c:529
 msgid "n >= 2^31, replace = FALSE is only supported on 64-bit platforms"
 msgstr "n >= 2^31, replace = FALSE只能在64位平台上才能用"
 
-#: src/main/raw.c:37 src/main/raw.c:273
+#: src/main/raw.c:37 src/main/raw.c:277
 msgid "argument must be a character vector of length 1"
 msgstr "参数必需是长度为一的字符矢量"
 
-#: src/main/raw.c:39 src/main/raw.c:275
+#: src/main/raw.c:39 src/main/raw.c:279
 msgid ""
 "argument should be a character vector of length 1\n"
 "all but the first element will be ignored"
 msgstr "参数应该是长度为一的字符矢量,因此只能用其第一元素"
 
-#: src/main/raw.c:53 src/main/raw.c:89 src/main/raw.c:110
+#: src/main/raw.c:53 src/main/raw.c:90 src/main/raw.c:113
 msgid "argument 'x' must be a raw vector"
 msgstr "参数'x'必需是矢量"
 
-#: src/main/raw.c:56 src/main/raw.c:330
+#: src/main/raw.c:56 src/main/raw.c:336
 msgid "argument 'multiple' must be TRUE or FALSE"
 msgstr "'multiple'的参数值必需是TRUE或是FALSE"
 
-#: src/main/raw.c:91
+#: src/main/raw.c:92
 msgid "argument 'shift' must be a small integer"
 msgstr "'shift'参数必需是整数"
 
-#: src/main/raw.c:129 src/main/raw.c:327
+#: src/main/raw.c:133 src/main/raw.c:333
 msgid "argument 'x' must be an integer vector"
 msgstr "'x'参数必需是整数矢量"
 
-#: src/main/raw.c:148
+#: src/main/raw.c:153
 msgid "argument 'x' must be raw, integer or logical"
 msgstr "参数'x'必需是原始,整数或逻辑值"
 
-#: src/main/raw.c:150
-msgid "argument 'type' must be a character string"
-msgstr "参数'type'必需是字符串"
-
-#: src/main/raw.c:154
+#: src/main/raw.c:159
 #, c-format
 msgid "argument 'x' must be a multiple of %d long"
 msgstr "参数'x'必需是长%d的倍数"
 
-#: src/main/raw.c:167 src/main/raw.c:181
+#: src/main/raw.c:172 src/main/raw.c:186
 msgid "argument 'x' must not contain NAs"
 msgstr "'x'参数不能带NA"
 
-#: src/main/raw.c:285
+#: src/main/raw.c:291
 msgid "invalid UTF-8 string"
 msgstr "UTF-8字符串有错"
 
-#: src/main/relop.c:202
+#: src/main/relop.c:196
 #, c-format
 msgid "comparison (%d) is possible only for atomic and list types"
 msgstr "只能比较(%d)基元或串列种类"
 
-#: src/main/relop.c:207
+#: src/main/relop.c:201
 msgid "comparison is not allowed for expressions"
 msgstr "不能比较表达式"
 
-#: src/main/relop.c:296
+#: src/main/relop.c:293
 msgid "comparison of these types is not implemented"
 msgstr "这些种类的比较方法还没有实现"
 
-#: src/main/relop.c:509
+#: src/main/relop.c:425
 msgid "invalid comparison with complex values"
 msgstr "不能比较复数值"
 
-#: src/main/relop.c:767
+#: src/main/relop.c:683
 msgid "'a' and 'b' must have the same type"
 msgstr "'a'和'b'的种类必需相同"
 
-#: src/main/saveload.c:200 src/main/saveload.c:205 src/main/saveload.c:214
-#: src/main/saveload.c:223 src/main/saveload.c:232 src/main/saveload.c:241
-#: src/main/saveload.c:245 src/main/saveload.c:254 src/main/saveload.c:1381
-#: src/main/saveload.c:1386 src/main/saveload.c:1430 src/main/saveload.c:1498
-#: src/main/saveload.c:1507 src/main/serialize.c:331 src/main/serialize.c:338
-#: src/main/serialize.c:2388 src/main/serialize.c:2396
+#: src/main/saveload.c:202 src/main/saveload.c:207 src/main/saveload.c:216
+#: src/main/saveload.c:225 src/main/saveload.c:234 src/main/saveload.c:243
+#: src/main/saveload.c:247 src/main/saveload.c:256 src/main/saveload.c:1383
+#: src/main/saveload.c:1388 src/main/saveload.c:1432 src/main/saveload.c:1500
+#: src/main/saveload.c:1509 src/main/serialize.c:354 src/main/serialize.c:361
+#: src/main/serialize.c:374 src/main/serialize.c:378 src/main/serialize.c:405
+#: src/main/serialize.c:421 src/main/serialize.c:2429
+#: src/main/serialize.c:2437
 msgid "read error"
 msgstr "读取错误"
 
-#: src/main/saveload.c:332
+#: src/main/saveload.c:334
 msgid "a I read error occurred"
 msgstr "发生了I类读取错误"
 
-#: src/main/saveload.c:342
+#: src/main/saveload.c:344
 msgid "a R read error occurred"
 msgstr "发生了R类读取错误"
 
-#: src/main/saveload.c:352
+#: src/main/saveload.c:354
 msgid "a C read error occurred"
 msgstr "发生了C类读取错误"
 
-#: src/main/saveload.c:362
+#: src/main/saveload.c:364
 msgid "a S read error occurred"
 msgstr "发生了S类读取错误"
 
-#: src/main/saveload.c:387 src/main/saveload.c:395 src/main/saveload.c:403
-#: src/main/saveload.c:1594 src/main/saveload.c:1602
+#: src/main/saveload.c:389 src/main/saveload.c:397 src/main/saveload.c:405
+#: src/main/saveload.c:1596 src/main/saveload.c:1604
 msgid "a read error occurred"
 msgstr "发生了读取错误"
 
-#: src/main/saveload.c:467
+#: src/main/saveload.c:469
 msgid "unresolved node during restore"
 msgstr "復原时遇到了无法解析的节点"
 
-#: src/main/saveload.c:488
+#: src/main/saveload.c:490
 #, c-format
 msgid "restore compatibility error - no version %d compatibility"
 msgstr "復原相容错误:没有同版本%d相容的功能"
 
-#: src/main/saveload.c:572 src/main/saveload.c:645
+#: src/main/saveload.c:574 src/main/saveload.c:647
 msgid "bad SEXP type in data file"
 msgstr "数据文件里SEXP种类出错"
 
-#: src/main/saveload.c:586
+#: src/main/saveload.c:588
 msgid "mismatch on types"
 msgstr "种类不相配"
 
-#: src/main/saveload.c:607 src/main/saveload.c:1270 src/main/serialize.c:1636
+#: src/main/saveload.c:609 src/main/saveload.c:1272 src/main/serialize.c:1675
 #, fuzzy, c-format
 msgid "unrecognized internal function name \"%s\""
 msgstr "没有\"%s\"这个函数"
 
-#: src/main/saveload.c:709
+#: src/main/saveload.c:711
 msgid "cannot save file position while restoring data"
 msgstr "在复原数据时无法保存文件位置"
 
-#: src/main/saveload.c:722
+#: src/main/saveload.c:724
 msgid "cannot restore file position while restoring data"
 msgstr "在复原数据时无法复原文件位置"
 
-#: src/main/saveload.c:915
+#: src/main/saveload.c:917
 msgid "base namespace is not preserved in version 1 workspaces"
 msgstr "一号版本的工作空间不能保全基本名字空间"
 
-#: src/main/saveload.c:917
+#: src/main/saveload.c:919
 msgid "cannot save namespace in version 1 workspaces"
 msgstr "一号版本的工作空间无法保存名字空间"
 
-#: src/main/saveload.c:919
+#: src/main/saveload.c:921
 msgid ""
 "cannot save environment with locked/active bindings in version 1 workspaces"
 msgstr "一号版本的工作空间不能保存锁定的/活动的联编"
 
-#: src/main/saveload.c:943
+#: src/main/saveload.c:945
 msgid "cannot save weak references in version 1 workspaces"
 msgstr "一号版本的工作空间无法保存弱引用"
 
-#: src/main/saveload.c:1021
+#: src/main/saveload.c:1023
 msgid "NewWriteVec called with non-vector type"
 msgstr "NewWriteVec不适用于非矢量种类"
 
-#: src/main/saveload.c:1084
+#: src/main/saveload.c:1086
 msgid "cannot save byte code objects in version 1 workspaces"
 msgstr "一号版本的工作空间无法保存位元组码对象"
 
-#: src/main/saveload.c:1086
+#: src/main/saveload.c:1088
 #, c-format
 msgid "NewWriteItem: unknown type %i"
 msgstr "NewWriteItem: 没有%i这一种类"
 
-#: src/main/saveload.c:1216
+#: src/main/saveload.c:1218
 msgid "NewReadVec called with non-vector type"
 msgstr "NewReadVec不适用于非矢量种类"
 
-#: src/main/saveload.c:1286
+#: src/main/saveload.c:1288
 msgid "cannot read byte code objects from version 1 workspaces"
 msgstr "无法从一号版本的工作空间里读取位元组码对象"
 
-#: src/main/saveload.c:1288
+#: src/main/saveload.c:1290
 #, c-format
 msgid "NewReadItem: unknown type %i"
 msgstr "NewReadItem: 没有%i这一种类"
 
-#: src/main/saveload.c:1440
+#: src/main/saveload.c:1442
 msgid "out of memory reading ascii string"
 msgstr "读取ascii字符串时内存不够"
 
-#: src/main/saveload.c:1565
+#: src/main/saveload.c:1567
 msgid "a binary read error occurred"
 msgstr "二进列读取时发生了错误"
 
-#: src/main/saveload.c:1580 src/main/saveload.c:1681
+#: src/main/saveload.c:1582 src/main/saveload.c:1683
 msgid "out of memory reading binary string"
 msgstr "读取二进列字符串时内存不够"
 
-#: src/main/saveload.c:1585
+#: src/main/saveload.c:1587
 msgid "a binary string read error occurred"
 msgstr "读取二进列字符串时发生了错误"
 
-#: src/main/saveload.c:1645
+#: src/main/saveload.c:1647
 msgid "an xdr integer data write error occurred"
 msgstr "xdr整数数据书写错误"
 
-#: src/main/saveload.c:1652
+#: src/main/saveload.c:1654
 msgid "an xdr integer data read error occurred"
 msgstr "xdr整数数据读取错误"
 
-#: src/main/saveload.c:1667 src/main/saveload.c:1686
+#: src/main/saveload.c:1669 src/main/saveload.c:1688
 msgid "an xdr string data write error occurred"
 msgstr "xdr字符串数据书写错误"
 
-#: src/main/saveload.c:1694
+#: src/main/saveload.c:1696
 msgid "an xdr real data write error occurred"
 msgstr "xdr实数数据书写错误"
 
-#: src/main/saveload.c:1701
+#: src/main/saveload.c:1703
 msgid "an xdr real data read error occurred"
 msgstr "xdr实数数据读取错误"
 
-#: src/main/saveload.c:1708
+#: src/main/saveload.c:1710
 msgid "an xdr complex data write error occurred"
 msgstr "xdr复数数据书写错误"
 
-#: src/main/saveload.c:1715
+#: src/main/saveload.c:1717
 msgid "an xdr complex data read error occurred"
 msgstr "xdr复数数据读取错误"
 
-#: src/main/saveload.c:1783 src/main/serialize.c:1958
-#: src/main/serialize.c:2568 src/modules/internet/internet.c:351
-#: src/modules/internet/internet.c:409 src/modules/internet/internet.c:514
+#: src/main/saveload.c:1785 src/main/serialize.c:1997
+#: src/main/serialize.c:2614 src/modules/internet/internet.c:514
+#: src/modules/internet/internet.c:590 src/modules/internet/internet.c:701
 msgid "write failed"
 msgstr "书写失败"
 
-#: src/main/saveload.c:1910
+#: src/main/saveload.c:1912
 msgid "restore file may be empty -- no data loaded"
 msgstr "復原文件可能是空的 -- 没有载入任何数据"
 
-#: src/main/saveload.c:1912
+#: src/main/saveload.c:1914
 msgid "restore file may be from a newer version of R -- no data loaded"
 msgstr "復原文件可能是由比目前R版本要新的R保存的 -- 没有载入任何数据"
 
-#: src/main/saveload.c:1914
+#: src/main/saveload.c:1916
 msgid "bad restore file magic number (file may be corrupted) -- no data loaded"
 msgstr "復原文件幻数出错(文件可能有损坏)-- 没有载入任何数据"
 
-#: src/main/saveload.c:1940 src/main/saveload.c:2238
+#: src/main/saveload.c:1942 src/main/saveload.c:2240
 msgid "first argument must be a character vector"
 msgstr "第一参数必需是字符矢量"
 
-#: src/main/saveload.c:2012
+#: src/main/saveload.c:2014
 msgid "not a valid named list"
 msgstr "带名字的串列不对"
 
-#: src/main/saveload.c:2019 src/main/saveload.c:2040
+#: src/main/saveload.c:2021 src/main/saveload.c:2042
 #, c-format
 msgid "'%s' looks like a pre-2.4.0 S4 object: please recreate it"
 msgstr "'%s'看起来好象是2.4.0前的S4目标对象;请重新创造"
 
-#: src/main/saveload.c:2027
+#: src/main/saveload.c:2029
 msgid "loaded data is not in pair list form"
 msgstr "载入数据没有成双串列形式"
 
-#: src/main/saveload.c:2063
+#: src/main/saveload.c:2065
 msgid "first argument must be a file name"
 msgstr "第一参数必需是文件名字"
 
-#: src/main/saveload.c:2108 src/main/saveload.c:2134 src/main/serialize.c:826
-#: src/main/serialize.c:863 src/main/serialize.c:901
+#: src/main/saveload.c:2110 src/main/saveload.c:2136 src/main/serialize.c:864
+#: src/main/serialize.c:901 src/main/serialize.c:939
 msgid "XDR write failed"
 msgstr "XDR书写失败"
 
-#: src/main/saveload.c:2121 src/main/saveload.c:2146 src/main/serialize.c:1362
-#: src/main/serialize.c:1398 src/main/serialize.c:1436
+#: src/main/saveload.c:2123 src/main/saveload.c:2148 src/main/serialize.c:1400
+#: src/main/serialize.c:1436 src/main/serialize.c:1474
 msgid "XDR read failed"
 msgstr "XDR读取失败"
 
-#: src/main/saveload.c:2157
+#: src/main/saveload.c:2159
 #, c-format
 msgid "cannot save data -- unable to open '%s': %s"
 msgstr "无法保存数据 -- 无法打开%s: %s"
 
-#: src/main/saveload.c:2254 src/main/serialize.c:2161
+#: src/main/saveload.c:2256 src/main/serialize.c:2202
 #, c-format
 msgid "cannot save to connections in version %d format"
 msgstr "无法用%d版本的格式来保存链结"
 
-#: src/main/saveload.c:2277 src/main/serialize.c:2186
+#: src/main/saveload.c:2279 src/main/serialize.c:2227
 msgid "connection not open for writing"
 msgstr "无法打开链结进行书写"
 
-#: src/main/saveload.c:2285
+#: src/main/saveload.c:2288
 msgid "cannot save XDR format to a text-mode connection"
 msgstr "不能将XDR格式保存到文字状态链结"
 
-#: src/main/saveload.c:2295 src/main/serialize.c:2066
-#: src/main/serialize.c:2080 src/main/serialize.c:2262
-#: src/main/serialize.c:2284
+#: src/main/saveload.c:2298 src/main/serialize.c:2105
+#: src/main/serialize.c:2119 src/main/serialize.c:2303
+#: src/main/serialize.c:2325
 msgid "error writing to connection"
 msgstr "链结书写发生了错误"
 
-#: src/main/saveload.c:2359 src/main/serialize.c:2234
+#: src/main/saveload.c:2359 src/main/serialize.c:2275
 msgid "connection not open for reading"
 msgstr "链结没有打开,不能读"
 
@@ -5186,7 +5262,7 @@ msgstr ""
 msgid "scan() expected '%s', got '%s'"
 msgstr "scan()需要'%s', 而不是'%s'"
 
-#: src/main/scan.c:585 src/main/scan.c:732
+#: src/main/scan.c:585 src/main/scan.c:735
 msgid "too many items"
 msgstr "项目太多"
 
@@ -5194,7 +5270,7 @@ msgstr "项目太多"
 msgid "empty 'what' specified"
 msgstr "'what'设定不能是空的"
 
-#: src/main/scan.c:722
+#: src/main/scan.c:725
 #, c-format
 msgid "line %d did not have %d elements"
 msgstr "%d行没有%d元素"
@@ -5223,150 +5299,151 @@ msgstr "十进位分隔符不对"
 msgid "invalid quote symbol set"
 msgstr "引号符号集不对"
 
-#: src/main/scan.c:987
+#: src/main/scan.c:988
 #, fuzzy
 msgid "embedded nul(s) found in input"
 msgstr "字符串里嵌入了nul:'%s'"
 
-#: src/main/seq.c:48
+#: src/main/seq.c:49
 msgid "unequal factor lengths"
 msgstr "因子长度不相等"
 
-#: src/main/seq.c:100
+#: src/main/seq.c:101
 msgid "result would be too long a vector"
 msgstr "答案矢量会太长"
 
-#: src/main/seq.c:159
+#: src/main/seq.c:160
 msgid "argument of length 0"
 msgstr "参数长度为零"
 
-#: src/main/seq.c:161 src/main/seq.c:163
-#, c-format
-msgid "numerical expression has %d elements: only the first used"
-msgstr "数值表达式一共有%d元素: 只用了第一个"
+#: src/main/seq.c:163 src/main/seq.c:168
+#, fuzzy, c-format
+msgid "numerical expression has %d element: only the first used"
+msgid_plural "numerical expression has %d elements: only the first used"
+msgstr[0] "数值表达式一共有%d元素: 只用了第一个"
 
-#: src/main/seq.c:167
+#: src/main/seq.c:174
 msgid "NA/NaN argument"
 msgstr "NA/NaN参数"
 
-#: src/main/seq.c:331
+#: src/main/seq.c:333
 msgid "incorrect type for second argument"
 msgstr "第二参数种类不对"
 
-#: src/main/seq.c:334
+#: src/main/seq.c:336
 #, c-format
 msgid "attempt to replicate an object of type '%s'"
 msgstr "种类为'%s'的目标对象不能被复制"
 
-#: src/main/seq.c:387
+#: src/main/seq.c:393
 msgid "attempt to replicate non-vector"
 msgstr "非矢量不能被复制"
 
-#: src/main/seq.c:403
+#: src/main/seq.c:409
 msgid "cannot replicate NULL to a non-zero length"
 msgstr "不能复制NULL到一个非零长度的"
 
-#: src/main/seq.c:626 src/main/seq.c:633 src/main/seq.c:768 src/main/seq.c:979
+#: src/main/seq.c:630 src/main/seq.c:637 src/main/seq.c:766 src/main/seq.c:977
 #, c-format
 msgid "first element used of '%s' argument"
 msgstr "只用'%s'参数里的第一个元素"
 
-#: src/main/seq.c:766
+#: src/main/seq.c:764
 msgid "'length.out' must be a non-negative number"
 msgstr "'length.out'必需是正整数"
 
-#: src/main/seq.c:790 src/main/seq.c:856 src/main/seq.c:873
+#: src/main/seq.c:788 src/main/seq.c:854 src/main/seq.c:871
 msgid "'from' must be finite"
 msgstr "'from'的值必需是有限的"
 
-#: src/main/seq.c:792 src/main/seq.c:858 src/main/seq.c:895
+#: src/main/seq.c:790 src/main/seq.c:856 src/main/seq.c:893
 msgid "'to' must be finite"
 msgstr "'to'的值必需是有限的"
 
-#: src/main/seq.c:804
+#: src/main/seq.c:802
 msgid "invalid '(to - from)/by' in 'seq'"
 msgstr "'seq'内的'(to - from)/by'值设得不对"
 
-#: src/main/seq.c:816
+#: src/main/seq.c:814
 msgid "'by' argument is much too small"
 msgstr "'by'参数太小了"
 
-#: src/main/seq.c:818
+#: src/main/seq.c:816
 msgid "wrong sign in 'by' argument"
 msgstr "'by'正负号不对"
 
-#: src/main/seq.c:875 src/main/seq.c:897
+#: src/main/seq.c:873 src/main/seq.c:895
 msgid "'by' must be finite"
 msgstr "'by'的值必需是有限的"
 
-#: src/main/seq.c:985 src/main/seq.c:990
+#: src/main/seq.c:983 src/main/seq.c:988
 msgid "argument must be coercible to non-negative integer"
 msgstr "参数必需能被强制改变成非负整数"
 
-#: src/main/serialize.c:224 src/main/serialize.c:254 src/main/serialize.c:277
+#: src/main/serialize.c:228 src/main/serialize.c:275 src/main/serialize.c:299
 msgid "unknown or inappropriate output format"
 msgstr "输出格式不对"
 
-#: src/main/serialize.c:504
+#: src/main/serialize.c:542
 msgid "must specify ascii, binary, or xdr format"
 msgstr "必需设定ascii, binary, 或xdr格式中的一个"
 
-#: src/main/serialize.c:505
+#: src/main/serialize.c:543
 msgid "unknown output format"
 msgstr "没有这种输出格式"
 
-#: src/main/serialize.c:536
+#: src/main/serialize.c:574
 msgid "unknown input format"
 msgstr "没有这种输入格式"
 
-#: src/main/serialize.c:541
+#: src/main/serialize.c:579
 msgid "input format does not match specified format"
 msgstr "输入格式同设定的格式不相配"
 
-#: src/main/serialize.c:752
+#: src/main/serialize.c:790
 msgid "no restore method available"
 msgstr "没有復原的方法"
 
-#: src/main/serialize.c:794
+#: src/main/serialize.c:832
 msgid "names in persistent strings are currently ignored"
 msgstr "持续字符串里的名字现在不用"
 
-#: src/main/serialize.c:963
+#: src/main/serialize.c:1001
 #, c-format
 msgid "'%s' may not be available when loading"
 msgstr "载入时'%s'可能无用"
 
-#: src/main/serialize.c:970
+#: src/main/serialize.c:1008
 msgid "namespaces may not be available when loading"
 msgstr "载入时名字空间可能无用"
 
-#: src/main/serialize.c:1097
+#: src/main/serialize.c:1136
 #, c-format
 msgid "WriteItem: unknown type %i"
 msgstr "WriteItem不对: 没有这一种类%i"
 
-#: src/main/serialize.c:1273
+#: src/main/serialize.c:1312
 #, c-format
 msgid "version %d not supported"
 msgstr "不支持版本%d"
 
-#: src/main/serialize.c:1305
+#: src/main/serialize.c:1343
 msgid "reference index out of range"
 msgstr "引用索引在范围外"
 
-#: src/main/serialize.c:1335
+#: src/main/serialize.c:1373
 msgid "names in persistent strings are not supported yet"
 msgstr "目前不支持持续字符串里的名字"
 
-#: src/main/serialize.c:1463
+#: src/main/serialize.c:1501
 msgid "negative serialized length for vector"
 msgstr "向量序列长度不能是负的"
 
-#: src/main/serialize.c:1471
+#: src/main/serialize.c:1509
 msgid "invalid upper part of serialized vector length"
 msgstr "上部序列向量的长度不对"
 
-#: src/main/serialize.c:1476
+#: src/main/serialize.c:1514
 msgid ""
 "negative serialized vector length:\n"
 "perhaps long vector from 64-bit version of R?"
@@ -5374,20 +5451,20 @@ msgstr ""
 "负序列化的向量长度:\n"
 "也许矢量是从64位版本的R来的?"
 
-#: src/main/serialize.c:1707
+#: src/main/serialize.c:1746
 msgid "this version of R cannot read class references"
 msgstr "本R版本无法读取类别引用"
 
-#: src/main/serialize.c:1709
+#: src/main/serialize.c:1748
 msgid "this version of R cannot read generic function references"
 msgstr "本R版本无法读取类属功能引用"
 
-#: src/main/serialize.c:1726
+#: src/main/serialize.c:1765
 #, c-format
 msgid "ReadItem: unknown type %i, perhaps written by later version of R"
 msgstr "ReadItem: 不存在%i 这一种类,可能是因为由新的R版本所写的"
 
-#: src/main/serialize.c:1882
+#: src/main/serialize.c:1921
 #, c-format
 msgid ""
 "cannot read unreleased workspace version %d written by experimental R %d.%d."
@@ -5395,7 +5472,7 @@ msgid ""
 msgstr ""
 "无法从由R实验版本%2$d.%3$d.%4$d写的还未被释放的工作空间版本%1$d中读取数据"
 
-#: src/main/serialize.c:1886
+#: src/main/serialize.c:1925
 #, c-format
 msgid ""
 "cannot read workspace version %d written by R %d.%d.%d; need R %d.%d.%d or "
@@ -5404,82 +5481,82 @@ msgstr ""
 "无法从由R版本%2$d.%3$d.%4$d写的工作空间版本%1$d中读取数据;需要R版本%5$d."
 "%6$d.%7$d以后的版本"
 
-#: src/main/serialize.c:1965
+#: src/main/serialize.c:2004
 msgid "read failed"
 msgstr "读取失败"
 
-#: src/main/serialize.c:2028
+#: src/main/serialize.c:2067
 msgid "error reading from ascii connection"
 msgstr "读取ascii链结时发生了错误"
 
-#: src/main/serialize.c:2030
+#: src/main/serialize.c:2069
 msgid "unexpected format in ascii connection"
 msgstr "ascii链结里出现了意外格式"
 
-#: src/main/serialize.c:2035 src/main/serialize.c:2049
+#: src/main/serialize.c:2074 src/main/serialize.c:2088
 msgid "error reading from connection"
 msgstr "读取链结时发生了错误"
 
-#: src/main/serialize.c:2090
+#: src/main/serialize.c:2130
 msgid "only ascii format can be written to text mode connections"
 msgstr "只能用ascii格式书写文字状态的链结"
 
-#: src/main/serialize.c:2104
+#: src/main/serialize.c:2144
 msgid "only ascii format can be read from text mode connections"
 msgstr "只能用ascii格式读取文字状态的链结"
 
-#: src/main/serialize.c:2159 src/main/serialize.c:2312
-#: src/main/serialize.c:2461
+#: src/main/serialize.c:2200 src/main/serialize.c:2353
+#: src/main/serialize.c:2502
 msgid "bad version value"
 msgstr "版本值不对"
 
-#: src/main/serialize.c:2184
+#: src/main/serialize.c:2225
 msgid "binary-mode connection required for ascii=FALSE"
 msgstr "二进列链结需要设定ascii=FALSE"
 
-#: src/main/serialize.c:2340 src/main/serialize.c:2377
-#: src/main/serialize.c:2440
+#: src/main/serialize.c:2381 src/main/serialize.c:2418
+#: src/main/serialize.c:2481
 msgid "serialization is too large to store in a raw vector"
 msgstr "串行太大,无法存储于原始矢量中"
 
-#: src/main/serialize.c:2357
+#: src/main/serialize.c:2398
 msgid "cannot allocate buffer"
 msgstr "无法分配缓冲区"
 
-#: src/main/serialize.c:2546 src/main/serialize.c:2619
+#: src/main/serialize.c:2592 src/main/serialize.c:2665
 msgid "not a proper file name"
 msgstr "文件名字有错"
 
-#: src/main/serialize.c:2548
+#: src/main/serialize.c:2594
 msgid "not a proper raw vector"
 msgstr "不是原始矢量"
 
-#: src/main/serialize.c:2569
+#: src/main/serialize.c:2615
 msgid "could not determine file position"
 msgstr "无法确定文件位置"
 
-#: src/main/serialize.c:2621
+#: src/main/serialize.c:2667
 msgid "bad offset/length argument"
 msgstr "位移/长度参数不对"
 
-#: src/main/serialize.c:2645 src/main/serialize.c:2658
-#: src/main/serialize.c:2667 src/main/serialize.c:2677
-#: src/main/serialize.c:2690
+#: src/main/serialize.c:2691 src/main/serialize.c:2704
+#: src/main/serialize.c:2713 src/main/serialize.c:2723
+#: src/main/serialize.c:2736
 #, c-format
 msgid "seek failed on %s"
 msgstr "读取%s失败"
 
-#: src/main/serialize.c:2662 src/main/serialize.c:2671
-#: src/main/serialize.c:2681 src/main/serialize.c:2694
+#: src/main/serialize.c:2708 src/main/serialize.c:2717
+#: src/main/serialize.c:2727 src/main/serialize.c:2740
 #, c-format
 msgid "read failed on %s"
 msgstr "读取%s失败"
 
-#: src/main/serialize.c:2713
+#: src/main/serialize.c:2759
 msgid "bad environment"
 msgstr "环境有错"
 
-#: src/main/serialize.c:2715
+#: src/main/serialize.c:2761
 msgid "bad variable names"
 msgstr "变数名字不对"
 
@@ -5487,165 +5564,161 @@ msgstr "变数名字不对"
 msgid "only atomic vectors can be tested to be sorted"
 msgstr "只有基元矢量才能被检验排序"
 
-#: src/main/sort.c:326 src/main/sort.c:1228 src/main/sort.c:1396
+#: src/main/sort.c:325 src/main/sort.c:1248
 msgid "'decreasing' must be TRUE or FALSE"
 msgstr "'increasing'必需是TRUE或是FALSE"
 
-#: src/main/sort.c:329 src/main/sort.c:600
+#: src/main/sort.c:328 src/main/sort.c:599
 msgid "only atomic vectors can be sorted"
 msgstr "只有基元矢量才能被排序"
 
-#: src/main/sort.c:331 src/main/sort.c:602 src/main/sort.c:1297
+#: src/main/sort.c:330 src/main/sort.c:601 src/main/sort.c:1317
 msgid "raw vectors cannot be sorted"
 msgstr "无法排序原始矢量"
 
-#: src/main/sort.c:613
+#: src/main/sort.c:612
 msgid "NA or infinite index"
 msgstr "出现了NA或无限大的index "
 
-#: src/main/sort.c:616
+#: src/main/sort.c:615
 #, c-format
 msgid "index %ld outside bounds"
 msgstr "索引%ld在界限外"
 
-#: src/main/sort.c:621 src/main/sort.c:634
+#: src/main/sort.c:620 src/main/sort.c:633
 msgid "NA index"
 msgstr "NA索引"
 
-#: src/main/sort.c:623 src/main/sort.c:636
+#: src/main/sort.c:622 src/main/sort.c:635
 #, c-format
 msgid "index %d outside bounds"
 msgstr "索引%d在界限外"
 
-#: src/main/sort.c:1237
+#: src/main/sort.c:1257
 #, c-format
 msgid "argument %d is not a vector"
 msgstr "参数%d不是矢量"
 
-#: src/main/sort.c:1239
+#: src/main/sort.c:1259
 msgid "argument lengths differ"
 msgstr "参数长度不同"
 
-#: src/main/sort.c:1324
+#: src/main/sort.c:1344
 msgid "invalid ties.method for rank() [should never happen]"
 msgstr "rank()的ties.method不对[这是不应该发生的]"
 
-#: src/main/sort.c:1429
-msgid "too large a range of values in 'x'"
-msgstr "'x'里的值的范围太大"
-
-#: src/main/source.c:215
+#: src/main/source.c:220
 msgid "coercion of 'text' to character was unsuccessful"
 msgstr "将'text'强迫改变成字符串失败"
 
-#: src/main/source.c:231
+#: src/main/source.c:236
 #, c-format
 msgid "argument '%s = \"%s\"' will be ignored"
 msgstr "略过'%s = \"%s\"'参数值"
 
-#: src/main/split.c:38
+#: src/main/split.c:39
 msgid "first argument must be a vector"
 msgstr "第一参数必需是矢量"
 
-#: src/main/split.c:40
+#: src/main/split.c:41
 msgid "second argument must be a factor"
 msgstr "第二参数必需是因子"
 
-#: src/main/split.c:45
+#: src/main/split.c:46
 msgid "group length is 0 but data length > 0"
 msgstr "组的长度为零但数据的长度大于零"
 
-#: src/main/split.c:47
+#: src/main/split.c:48
 msgid "data length is not a multiple of split variable"
 msgstr "数据长度不是分割变数的倍数"
 
-#: src/main/split.c:56
+#: src/main/split.c:58
 msgid "factor has bad level"
 msgstr "因子的水平不对"
 
-#: src/main/sprintf.c:94
+#: src/main/sprintf.c:97
 #, c-format
 msgid "required resulting string length %d is greater than maximal %d"
 msgstr "所需要的字符串长度%d大于最大限度%d"
 
-#: src/main/sprintf.c:102
+#: src/main/sprintf.c:105
 msgid "'fmt' is not a character vector"
 msgstr "'fmt'必需是字符矢量"
 
-#: src/main/sprintf.c:107
+#: src/main/sprintf.c:110
 #, c-format
 msgid "only %d arguments are allowed"
 msgstr "只允许%d个参数"
 
-#: src/main/sprintf.c:114
+#: src/main/sprintf.c:117
 #, c-format
 msgid "invalid type of argument[%d]: '%s'"
 msgstr "参数[%d] 的种类不对:'%s'"
 
-#: src/main/sprintf.c:125 src/main/sprintf.c:128
+#: src/main/sprintf.c:128 src/main/sprintf.c:131
 msgid "arguments cannot be recycled to the same length"
 msgstr "不是所有的参数都一样长"
 
-#: src/main/sprintf.c:150 src/main/sprintf.c:257
+#: src/main/sprintf.c:153 src/main/sprintf.c:260
 #, c-format
 msgid "'fmt' length exceeds maximal format length %d"
 msgstr "'fmt'长度超过了缓冲区最大长度%d"
 
-#: src/main/sprintf.c:169
+#: src/main/sprintf.c:172
 #, c-format
 msgid "unrecognised format specification '%s'"
 msgstr "没有'%s'这样的格式设定"
 
-#: src/main/sprintf.c:180 src/main/sprintf.c:186 src/main/sprintf.c:199
-#: src/main/sprintf.c:206
+#: src/main/sprintf.c:183 src/main/sprintf.c:189 src/main/sprintf.c:202
+#: src/main/sprintf.c:209
 #, c-format
 msgid "reference to non-existent argument %d"
 msgstr "不能引用不存在的参数%d"
 
-#: src/main/sprintf.c:218
+#: src/main/sprintf.c:221
 msgid "at most one asterisk '*' is supported in each conversion specification"
 msgstr "每个轉換規格里最多只支持一个'*'号"
 
-#: src/main/sprintf.c:228
+#: src/main/sprintf.c:231
 msgid "argument for '*' conversion specification must be a number"
 msgstr "轉換規格'*'的参数必需是数字"
 
-#: src/main/sprintf.c:266
+#: src/main/sprintf.c:269
 msgid "coercion has changed vector length to 0"
 msgstr "矢量长度被強制改变成零"
 
-#: src/main/sprintf.c:339 src/main/sprintf.c:353 src/main/sprintf.c:367
-#: src/main/sprintf.c:402
+#: src/main/sprintf.c:343 src/main/sprintf.c:357 src/main/sprintf.c:371
+#: src/main/sprintf.c:406
 #, c-format
 msgid "invalid format '%s'; %s"
 msgstr "'%s'的格式不对;%s"
 
-#: src/main/sprintf.c:340
+#: src/main/sprintf.c:344
 #, c-format
 msgid "use format %d or %i for logical objects"
 msgstr "逻辑对象使用的格式应该是%d或%i"
 
-#: src/main/sprintf.c:354
+#: src/main/sprintf.c:358
 #, c-format
 msgid "use format %d, %i, %o, %x or %X for integer objects"
 msgstr "整数对象使用的格式应该是%d,%i,%o,%x或%X"
 
-#: src/main/sprintf.c:368
+#: src/main/sprintf.c:372
 #, c-format
 msgid "use format %f, %e, %g or %a for numeric objects"
 msgstr "数值对象使用的格式应该是%f,%e,%g或%a"
 
-#: src/main/sprintf.c:403
+#: src/main/sprintf.c:407
 #, c-format
 msgid "use format %s for character objects"
 msgstr "字符对象使用的格式应该是%s"
 
-#: src/main/sprintf.c:408
+#: src/main/sprintf.c:412
 #, c-format
 msgid "likely truncation of character string to %d characters"
 msgstr "字符串很可能被缩短到%d个字符"
 
-#: src/main/sprintf.c:417
+#: src/main/sprintf.c:421
 msgid "unsupported type"
 msgstr "不支持这一种类"
 
@@ -5653,377 +5726,383 @@ msgstr "不支持这一种类"
 msgid "R_LibraryFileName: buffer too small"
 msgstr "R_Library文件名字不对: 缓冲区太小"
 
-#: src/main/subassign.c:117
+#: src/main/subassign.c:118
 msgid "attempt to enlarge non-vector"
 msgstr "不能把非矢量变大"
 
-#: src/main/subassign.c:122
+#: src/main/subassign.c:123
 #, c-format
 msgid "assignment outside vector/list limits (extending from %d to %d)"
 msgstr "不能在矢量/串列极限外赋值(%d加大到%d)"
 
-#: src/main/subassign.c:367
+#: src/main/subassign.c:391
 #, c-format
 msgid "incompatible types (from %s to %s) in subassignment type fix"
 msgstr "下赋值fix种类里有不可兼容的种类(从%s到%s)"
 
-#: src/main/subassign.c:502 src/main/subassign.c:782 src/main/subassign.c:785
-#: src/main/subassign.c:1076
+#: src/main/subassign.c:550 src/main/subassign.c:830 src/main/subassign.c:833
+#: src/main/subassign.c:1133
 msgid "NAs are not allowed in subscripted assignments"
 msgstr "下标赋值里不允许NA"
 
-#: src/main/subassign.c:520 src/main/subassign.c:796 src/main/subassign.c:1068
-#: src/main/subassign.c:1641
+#: src/main/subassign.c:568 src/main/subassign.c:844 src/main/subassign.c:1125
+#: src/main/subassign.c:1705
 msgid "replacement has length zero"
 msgstr "更换参数长度为零"
 
-#: src/main/subassign.c:522 src/main/subassign.c:798 src/main/subassign.c:1070
+#: src/main/subassign.c:570 src/main/subassign.c:846 src/main/subassign.c:1127
 msgid "number of items to replace is not a multiple of replacement length"
 msgstr "被替换的项目不是替换值长度的倍数"
 
-#: src/main/subassign.c:766
+#: src/main/subassign.c:814
 msgid "incorrect number of subscripts on matrix"
 msgstr "矩阵里的下标数目不对"
 
-#: src/main/subassign.c:1022
+#: src/main/subassign.c:1079
 #, c-format
 msgid "incompatible types (from %s to %s) in matrix subset assignment"
 msgstr "矩阵子集赋值里有不可兼容的种类(从%s到%s)"
 
-#: src/main/subassign.c:1038 src/main/subset.c:928
+#: src/main/subassign.c:1095 src/main/subset.c:957
 msgid "incorrect number of subscripts"
 msgstr "下标数目不对"
 
-#: src/main/subassign.c:1214
+#: src/main/subassign.c:1272
 #, c-format
 msgid "incompatible types (from %s to %s) in array subset assignment"
 msgstr "陈列子集赋值有不可兼容的种类(从%s到%s)"
 
-#: src/main/subassign.c:1249 src/main/subassign.c:1270
+#: src/main/subassign.c:1308 src/main/subassign.c:1329
 msgid "invalid subscript in list assign"
 msgstr "串列赋值里的下标不对"
 
-#: src/main/subassign.c:1263
+#: src/main/subassign.c:1322
 msgid "invalid number of subscripts to list assign"
 msgstr "串列赋值里的下标数目不对"
 
-#: src/main/subassign.c:1361
+#: src/main/subassign.c:1421
 msgid "SubAssignArgs: invalid number of arguments"
 msgstr "SubAssignArgs: 参数数目不对"
 
-#: src/main/subassign.c:1506
+#: src/main/subassign.c:1566
 msgid "result is zero-length and so cannot be a language object"
 msgstr "计算结果的长度为零,因此不可能是语言目标对象"
 
-#: src/main/subassign.c:1611
+#: src/main/subassign.c:1665
 msgid ""
 "[[<- defined for objects of type \"S4\" only for subclasses of environment"
 msgstr "给\"S4\"类型的对象所定义的[[<-只能在环境子类内有用"
 
-#: src/main/subassign.c:1617
+#: src/main/subassign.c:1677
 msgid "wrong args for environment subassignment"
 msgstr "环境下赋值的参数不对"
 
-#: src/main/subassign.c:1643
+#: src/main/subassign.c:1707
 msgid "more elements supplied than there are to replace"
 msgstr "用来替换的元素比所要替换的值多"
 
-#: src/main/subassign.c:1645
+#: src/main/subassign.c:1709
 msgid "[[ ]] with missing subscript"
 msgstr "[[ ]] 缺少下标"
 
-#: src/main/subassign.c:1657 src/main/subassign.c:1675
+#: src/main/subassign.c:1727 src/main/subassign.c:1745
 msgid "[[ ]] subscript out of bounds"
 msgstr "[[ ]] 下标在界限外"
 
-#: src/main/subassign.c:1663 src/main/subassign.c:1841
+#: src/main/subassign.c:1733 src/main/subassign.c:1914
 msgid "[[ ]] improper number of subscripts"
 msgstr "[[ ]] 下标数目不对"
 
-#: src/main/subassign.c:1808
+#: src/main/subassign.c:1879
 #, c-format
 msgid "incompatible types (from %s to %s) in [[ assignment"
 msgstr " [[ 赋值里有不可兼容的种类(从%s到%s)"
 
-#: src/main/subassign.c:1852
+#: src/main/subassign.c:1925
 #, c-format
 msgid "[[ ]] subscript (%d) out of bounds"
 msgstr "[[ ]] 下标(%d)在界限外"
 
-#: src/main/subassign.c:1905 src/main/subscript.c:143 src/main/subscript.c:145
-#: src/main/subscript.c:274 src/main/subscript.c:276 src/main/subscript.c:826
-#: src/main/subscript.c:828 src/main/subscript.c:919 src/main/subscript.c:921
-#: src/main/subset.c:1109
+#: src/main/subassign.c:1986 src/main/subscript.c:151 src/main/subscript.c:278
+#: src/main/subscript.c:903 src/main/subscript.c:996 src/main/subset.c:1176
 #, c-format
 msgid "invalid subscript type '%s'"
 msgstr "类别为'%s'的下标不对"
 
-#: src/main/subassign.c:1950
+#: src/main/subassign.c:2037
 msgid "no method for assigning subsets of this S4 class"
 msgstr "不存在给这个S4类别分配子集的方法"
 
-#: src/main/subassign.c:2008
+#: src/main/subassign.c:2095
 msgid "Coercing LHS to a list"
 msgstr "把公式左手强迫变成串列"
 
-#: src/main/subscript.c:53 src/main/subscript.c:75 src/main/subscript.c:180
-#: src/main/subscript.c:204
-msgid "attempt to select less than one element"
+#: src/main/subscript.c:59 src/main/subscript.c:81 src/main/subscript.c:185
+#: src/main/subscript.c:209
+#, fuzzy, c-format
+msgid "attempt to select less than one element in %s"
 msgstr "至少要选择一个元素"
 
-#: src/main/subscript.c:57 src/main/subscript.c:72 src/main/subscript.c:178
-#: src/main/subscript.c:208 src/main/subscript.c:304
-msgid "attempt to select more than one element"
+#: src/main/subscript.c:63 src/main/subscript.c:78 src/main/subscript.c:183
+#: src/main/subscript.c:213 src/main/subscript.c:305
+#, fuzzy, c-format
+msgid "attempt to select more than one element in %s"
 msgstr "最多只能选择一个元素"
 
-#: src/main/subscript.c:184
+#: src/main/subscript.c:189
 msgid "internal error in use of recursive indexing"
 msgstr "递回索引在运行时发生了内部错误"
 
-#: src/main/subscript.c:252
+#: src/main/subscript.c:257
 #, c-format
 msgid "further partial match of '%s' to '%s'"
 msgstr "'%s'进一部分匹配到'%s'"
 
-#: src/main/subscript.c:302
+#: src/main/subscript.c:303
 #, c-format
 msgid "recursive indexing failed at level %d\n"
 msgstr "递回索引在%d层失败\n"
 
-#: src/main/subscript.c:309
+#: src/main/subscript.c:313
 #, c-format
 msgid "no such index at level %d\n"
 msgstr "在%d层没有这一索引\n"
 
-#: src/main/subscript.c:352
+#: src/main/subscript.c:360
 msgid "incorrect number of columns in matrix subscript"
 msgstr "矩阵下标里列的数目不对"
 
-#: src/main/subscript.c:371 src/main/subscript.c:389 src/main/subscript.c:413
+#: src/main/subscript.c:379 src/main/subscript.c:397 src/main/subscript.c:421
 msgid "negative values are not allowed in a matrix subscript"
 msgstr "矩阵下标里不能有负数值"
 
-#: src/main/subscript.c:492
+#: src/main/subscript.c:500
 msgid "(subscript) logical subscript too long"
 msgstr "(下标)逻辑下标太长"
 
-#: src/main/subscript.c:590 src/main/subscript.c:645
+#: src/main/subscript.c:668 src/main/subscript.c:723
 msgid "only 0's may be mixed with negative subscripts"
 msgstr "只有负下标里才能有零"
 
-#: src/main/subscript.c:618
+#: src/main/subscript.c:696
 msgid "subscript too large for 32-bit R"
 msgstr "标过大,因为是32位的R "
 
-#: src/main/subscript.c:817
+#: src/main/subscript.c:895
 msgid "no 'dimnames' attribute for array"
 msgstr "陈列中没有'dimnames'这一属性"
 
-#: src/main/subscript.c:857
+#: src/main/subscript.c:931
 msgid "subscripting on non-vector"
 msgstr "非矢量不能有下标"
 
-#: src/main/subset.c:261
+#: src/main/subset.c:260
 msgid "dimensions would exceed maximum size of array"
 msgstr "尺寸会超过阵列最大大小"
 
-#: src/main/subset.c:304 src/main/subset.c:333
+#: src/main/subset.c:304 src/main/subset.c:334
 msgid "matrix subscripting not handled for this type"
 msgstr "这一种类不能有矩阵下标"
 
-#: src/main/subset.c:488
+#: src/main/subset.c:493
 msgid "array subscripting not handled for this type"
 msgstr "这一种类不能有阵列下标"
 
-#: src/main/subset.c:827
+#: src/main/subset.c:856
 msgid "incorrect number of dimensions"
 msgstr "量度数目不对"
 
-#: src/main/subset.c:924
+#: src/main/subset.c:953
 msgid "no index specified"
 msgstr "没有索引设定"
 
-#: src/main/subset.c:934
+#: src/main/subset.c:963
 msgid "this S4 class is not subsettable"
 msgstr "S4对象不可以取子集"
 
-#: src/main/subset.c:940
+#: src/main/subset.c:970
 msgid "wrong arguments for subsetting an environment"
 msgstr "取子集环境时的参数不对"
 
-#: src/main/summary.c:30
+#: src/main/summary.c:33
 #, c-format
 msgid "invalid 'type' (%s) of argument"
 msgstr "'type'(%s)参数不对"
 
-#: src/main/summary.c:66 src/main/summary.c:78 src/main/summary.c:103
+#: src/main/summary.c:69 src/main/summary.c:81 src/main/summary.c:106
 msgid "integer overflow - use sum(as.numeric(.))"
 msgstr "整数上溢-请用sum(as.numeric(.))"
 
-#: src/main/summary.c:522
+#: src/main/summary.c:526
 #, c-format
 msgid "internal error ('op = %d' in do_summary).\t Call a Guru"
 msgstr "内部错误(do_summary里的'op = %d').\t 请向专家请教"
 
-#: src/main/summary.c:623
+#: src/main/summary.c:637
 msgid "Integer overflow - use sum(as.numeric(.))"
 msgstr "整数上溢;请用sum(as.numeric(.))"
 
-#: src/main/summary.c:731
+#: src/main/summary.c:750
 msgid "no non-missing arguments, returning NA"
 msgstr "所有的参数都不存在; 回覆NA"
 
-#: src/main/summary.c:734
+#: src/main/summary.c:753
 msgid "no non-missing arguments to min; returning Inf"
 msgstr "min里所有的参数都不存在; 回覆Inf"
 
-#: src/main/summary.c:736
+#: src/main/summary.c:755
 msgid "no non-missing arguments to max; returning -Inf"
 msgstr "max里所有的参数都不存在;回覆-Inf"
 
-#: src/main/summary.c:801
-msgid "non-numeric argument"
-msgstr "非数值参数"
-
-#: src/main/summary.c:845
+#: src/main/summary.c:913
 msgid "argument to 'which' is not logical"
 msgstr "参数'which'必需是逻辑值"
 
-#: src/main/summary.c:889
+#: src/main/summary.c:957
 msgid "no arguments"
 msgstr "没有参数"
 
-#: src/main/summary.c:900 src/main/summary.c:917
+#: src/main/summary.c:968 src/main/summary.c:985
 msgid "invalid input type"
 msgstr "输入种类不对"
 
-#: src/main/summary.c:934
+#: src/main/summary.c:1002
 msgid "an argument will be fractionally recycled"
 msgstr "参数值将数据略微回收"
 
-#: src/main/sysutils.c:69 src/main/sysutils.c:83
+#: src/main/sysutils.c:68 src/main/sysutils.c:82
 #, c-format
 msgid "cannot determine file modification time of '%s'"
 msgstr "无法确定文件'%s'的修改时间"
 
-#: src/main/sysutils.c:167
+#: src/main/sysutils.c:166
 msgid "encoding of a filename cannot be 'bytes'"
 msgstr "编码的文件名不能是'bytes'"
 
-#: src/main/sysutils.c:170 src/main/sysutils.c:803 src/main/sysutils.c:818
-#: src/main/sysutils.c:909 src/main/sysutils.c:924 src/main/sysutils.c:1020
+#: src/main/sysutils.c:169 src/main/sysutils.c:831 src/main/sysutils.c:846
+#: src/main/sysutils.c:975
 #, c-format
 msgid "unsupported conversion from '%s' in codepage %d"
 msgstr "不支持代码页%2$d里由'%1$s'来这种转换"
 
-#: src/main/sysutils.c:179
+#: src/main/sysutils.c:178
 msgid "file name conversion problem -- name too long?"
 msgstr "转换文件名时出了问题--名字太长了?"
 
-#: src/main/sysutils.c:180
+#: src/main/sysutils.c:179
 msgid "file name conversion problem"
 msgstr "转换文件名时出了问题"
 
-#: src/main/sysutils.c:249
+#: src/main/sysutils.c:248
 msgid "invalid filename pattern"
 msgstr "文件名字式样不对"
 
-#: src/main/sysutils.c:253
+#: src/main/sysutils.c:252
 msgid "invalid file extension"
 msgstr "文件扩展名不对"
 
-#: src/main/sysutils.c:255
+#: src/main/sysutils.c:254
 msgid "no 'pattern'"
 msgstr "没有'pattern'"
 
-#: src/main/sysutils.c:257
+#: src/main/sysutils.c:256
 msgid "no 'tempdir'"
 msgstr "没有'tempdir'"
 
-#: src/main/sysutils.c:259
+#: src/main/sysutils.c:258
 msgid "no 'fileext'"
 msgstr "没有'fileext'"
 
-#: src/main/sysutils.c:345 src/main/sysutils.c:348 src/main/sysutils.c:439
-#: src/main/sysutils.c:441 src/main/sysutils.c:477
+#: src/main/sysutils.c:328
+#, fuzzy, c-format
+msgid "system call failed: %s"
+msgstr "读取%s失败"
+
+#: src/main/sysutils.c:357 src/main/sysutils.c:360 src/main/sysutils.c:451
+#: src/main/sysutils.c:453 src/main/sysutils.c:489
 msgid "wrong type for argument"
 msgstr "参数种类不对"
 
-#: src/main/sysutils.c:443
+#: src/main/sysutils.c:455
 msgid "wrong length for argument"
 msgstr "参数的长度不对"
 
-#: src/main/sysutils.c:464
+#: src/main/sysutils.c:476
 msgid "'Sys.setenv' is not available on this system"
 msgstr "本系统没有'Sys.setenv'这个功能"
 
-#: src/main/sysutils.c:508
+#: src/main/sysutils.c:520
 msgid "this system cannot unset environment variables: setting to \"\""
 msgstr "本系统无法復原环境变量:设成\"\""
 
-#: src/main/sysutils.c:519
+#: src/main/sysutils.c:531
 msgid "'Sys.unsetenv' is not available on this system"
 msgstr "本系统没有'Sys.unsetenv'这个功能"
 
-#: src/main/sysutils.c:616
+#: src/main/sysutils.c:628
 #, c-format
 msgid "unsupported conversion from '%s' to '%s' in codepage %d"
 msgstr "不支持代码页%3$d里从'%1$s'到'%2$s'的这种转换"
 
-#: src/main/sysutils.c:631
+#: src/main/sysutils.c:643
 msgid "'x' must be a character vector"
 msgstr "'x'必需是字符矢量"
 
-#: src/main/sysutils.c:646
-msgid "'x' must be a list of NULL or raw vectors"
+#: src/main/sysutils.c:658
+#, fuzzy
+msgid "'x' must be a character vector or a list of NULL or raw vectors"
 msgstr "'x'必需是NULL串列或原始矢量"
 
-#: src/main/sysutils.c:724 src/main/sysutils.c:789 src/main/sysutils.c:895
-#: src/main/sysutils.c:994 src/main/sysutils.c:1010 src/main/sysutils.c:1087
+#: src/main/sysutils.c:736 src/main/sysutils.c:914 src/main/sysutils.c:932
+#: src/main/sysutils.c:949 src/main/sysutils.c:965 src/main/sysutils.c:1042
 #, c-format
 msgid "'%s' must be called on a CHARSXP"
 msgstr "'%s'只能调用在CHARSXP上"
 
-#: src/main/sysutils.c:792 src/main/sysutils.c:898 src/main/sysutils.c:1015
-#: src/main/sysutils.c:1090
+#: src/main/sysutils.c:805 src/main/sysutils.c:970 src/main/sysutils.c:1045
 msgid "translating strings with \"bytes\" encoding is not allowed"
 msgstr "不允许用\"bytes\"编码进行字符翻译”"
 
-#: src/main/sysutils.c:1116
+#: src/main/sysutils.c:818
+#, fuzzy
+msgid "internal error: no translation needed"
+msgstr "unz写码发生了内部错误"
+
+#: src/main/sysutils.c:1071
 #, c-format
 msgid "unsupported conversion to '%s' from codepage %d"
 msgstr "不支持从代码页%2$d里到'%1$s'的转换"
 
-#: src/main/sysutils.c:1530
+#: src/main/sysutils.c:1486
 #, fuzzy, c-format
 msgid "invalid Unicode point %u"
 msgstr "行接合出错"
 
-#: src/main/sysutils.c:1632
+#: src/main/sysutils.c:1588
 msgid "cannot create 'R_TempDir'"
 msgstr "无法创建'R_TempDir'"
 
-#: src/main/sysutils.c:1636 src/main/sysutils.c:1644 src/main/sysutils.c:1647
+#: src/main/sysutils.c:1592 src/main/sysutils.c:1600 src/main/sysutils.c:1603
 msgid "unable to set R_SESSION_TMPDIR"
 msgstr "无法设制R_SESSION_TMPDIR "
 
-#: src/main/sysutils.c:1656
+#: src/main/sysutils.c:1612
 msgid "cannot allocate 'R_TempDir'"
 msgstr "无法分配'R_TempDir'"
 
-#: src/main/sysutils.c:1693
+#: src/main/sysutils.c:1649
 msgid "temporary name too long"
 msgstr "临时文件名太长"
 
-#: src/main/sysutils.c:1708
+#: src/main/sysutils.c:1664
 msgid "cannot find unused tempfile name"
 msgstr "临时文件名都用完了"
 
-#: src/main/sysutils.c:1711
+#: src/main/sysutils.c:1667
 msgid "allocation failed in R_tmpnam2"
 msgstr "分配R_tmpnam2失败"
 
-#: src/main/sysutils.c:1838
+#: src/main/sysutils.c:1794
 msgid "'dirmark = TRUE' is not supported on this platform"
 msgstr "本平台不支持'dirmark = TRUE'"
 
@@ -6033,191 +6112,198 @@ msgid "length %d is too large for hashing"
 msgstr "雜亂定址法的长度%d太大了"
 
 #: src/main/unique.c:490 src/main/unique.c:519 src/main/unique.c:549
-#: src/main/unique.c:575 src/main/unique.c:614
+#: src/main/unique.c:573 src/main/unique.c:612
 msgid "'duplicated' applies only to vectors"
 msgstr "'duplicated'只适用于矢量"
 
-#: src/main/unique.c:619
+#: src/main/unique.c:617
 msgid "any_duplicated3(., <0-length incomp>)"
 msgstr "any_duplicated3(., <0-length incomp>)"
 
-#: src/main/unique.c:669
+#: src/main/unique.c:667
 msgid "'fromLast' must be length 1"
 msgstr "'fromLast'的长度必需为一"
 
-#: src/main/unique.c:672
+#: src/main/unique.c:670
 msgid "'fromLast' must be TRUE or FALSE"
 msgstr "'fromLast'的值必需是TRUE或是FALSE"
 
-#: src/main/unique.c:683
+#: src/main/unique.c:681
 #, c-format
 msgid "%s() applies only to vectors"
 msgstr "%s()只适用于矢量"
 
-#: src/main/unique.c:690
+#: src/main/unique.c:688
 msgid "'nmax' must be positive"
 msgstr "'nmax'的长度必需是正数"
 
-#: src/main/unique.c:922
+#: src/main/unique.c:985
 msgid "'match' requires vector arguments"
 msgstr "'match'需要矢量参数"
 
-#: src/main/unique.c:970 src/main/unique.c:1125
+#: src/main/unique.c:1033 src/main/unique.c:1171
 msgid "argument is not of mode character"
 msgstr "参数不是字符状态"
 
-#: src/main/unique.c:1251
+#: src/main/unique.c:1296
 msgid "... used in a situation where it does not exist"
 msgstr "... 用于了在它不存在的地方"
 
-#: src/main/unique.c:1342
-msgid "unable to find a closure from within which 'match.call' was called"
-msgstr "找不到调用'match.call'的闭合"
+#: src/main/unique.c:1302
+#, fuzzy
+msgid "... is not a pairlist"
+msgstr "'... '里的值不是允諾"
 
-#: src/main/unique.c:1536
+#: src/main/unique.c:1531
 msgid "non-numeric data frame in rowsum"
 msgstr "rowsum里不能有非数值数据框"
 
-#: src/main/unique.c:1568
+#: src/main/unique.c:1563
 msgid "this cannot happen"
 msgstr "这不应该发生"
 
-#: src/main/unique.c:1639
+#: src/main/unique.c:1634
 msgid "'names' must be a character vector"
 msgstr "'names'必需是字符矢量"
 
-#: src/main/unique.c:1643
-msgid "'sep' must be a character string"
-msgstr "'sep'必需是字符串"
-
-#: src/main/util.c:88 src/main/util.c:106
+#: src/main/util.c:87 src/main/util.c:105
 msgid "object is not a matrix"
 msgstr "对象不是矩阵"
 
-#: src/main/util.c:254 src/main/util.c:268 src/main/util.c:285
+#: src/main/util.c:303 src/main/util.c:315 src/main/util.c:326
+#: src/main/util.c:341
 #, c-format
 msgid "type %d is unimplemented in '%s'"
 msgstr "'%2$s'里的%1$d种类还没有被实现"
 
-#: src/main/util.c:297
+#: src/main/util.c:352
 #, c-format
 msgid "unimplemented type '%s' in '%s'\n"
 msgstr "种类'%s'目前没有在'%s'里实现\n"
 
-#: src/main/util.c:299
+#: src/main/util.c:354
 #, c-format
 msgid "unimplemented type (%d) in '%s'\n"
 msgstr "(%d)种类目前没有在'%s'里实现\n"
 
-#: src/main/util.c:424
+#: src/main/util.c:479
 msgid "invalid tag in name extraction"
 msgstr "抽取名字的标记不对"
 
-#: src/main/util.c:434
+#: src/main/util.c:489
 #, c-format
 msgid "%d argument passed to .Internal(%s) which requires %d"
 msgid_plural "%d arguments passed to .Internal(%s) which requires %d"
 msgstr[0] ".Internal(%2$s)收到了%1$d个参数,但它最多只能用%3$d个参数"
 
-#: src/main/util.c:440
+#: src/main/util.c:495
 #, c-format
 msgid "%d argument passed to '%s' which requires %d"
 msgid_plural "%d arguments passed to '%s' which requires %d"
 msgstr[0] "%d个参数给'%s',但它只需要%d个"
 
-#: src/main/util.c:455
+#: src/main/util.c:510
 #, c-format
 msgid "supplied argument name '%s' does not match '%s'"
 msgstr "提供的参数名'%s'同'%s'不匹配"
 
-#: src/main/util.c:465
+#: src/main/util.c:520
 #, c-format
 msgid "'nthcdr' list shorter than %d"
 msgstr "'nthcdr'串列比%d要短"
 
-#: src/main/util.c:470
+#: src/main/util.c:525
 msgid "'nthcdr' needs a list to CDR down"
 msgstr "'nthcdr'需要CDR串列"
 
-#: src/main/util.c:586
+#: src/main/util.c:641
 msgid "'all.x' must be TRUE or FALSE"
 msgstr "'all.x'必需是TRUE或FALSE"
 
-#: src/main/util.c:588
+#: src/main/util.c:643
 msgid "'all.y' must be TRUE or FALSE"
 msgstr "'all.y'必需是TRUE或FALSE"
 
-#: src/main/util.c:700
+#: src/main/util.c:672
+msgid "number of rows in the result exceeds maximum vector length"
+msgstr ""
+
+#: src/main/util.c:764
 msgid "missing value is invalid"
 msgstr "遗漏值不对"
 
-#: src/main/util.c:709 src/main/util.c:716
+#: src/main/util.c:773 src/main/util.c:780
 msgid "cannot change working directory"
 msgstr "无法改变工作目录"
 
-#: src/main/util.c:735 src/main/util.c:769 src/main/util.c:810
-#: src/main/util.c:852 src/main/util.c:981 src/main/util.c:1040
-#: src/main/util.c:1063
+#: src/main/util.c:800 src/main/util.c:834 src/main/util.c:875
+#: src/main/util.c:917 src/main/util.c:1046 src/main/util.c:1105
+#: src/main/util.c:1128
 msgid "a character vector argument expected"
 msgstr "需要字符矢量参数"
 
-#: src/main/util.c:742 src/main/util.c:777 src/main/util.c:819
-#: src/main/util.c:860
+#: src/main/util.c:807 src/main/util.c:842 src/main/util.c:884
+#: src/main/util.c:925
 msgid "path too long"
 msgstr "路径太长"
 
-#: src/main/util.c:995
+#: src/main/util.c:1060
 msgid "only the first character of 'quote' will be used"
 msgstr "只用了'quote'的第一个字符"
 
-#: src/main/util.c:1065
+#: src/main/util.c:1130
 msgid "a character vector 'value' expected"
 msgstr "需要字符矢量'value'"
 
-#: src/main/util.c:1068
+#: src/main/util.c:1133
 msgid "'value' must be of positive length"
 msgstr "'value'的长度必需是正数"
 
-#: src/main/util.c:1197 src/main/util.c:1205
+#: src/main/util.c:1262 src/main/util.c:1270
 #, c-format
 msgid "invalid input '%s' in 'utf8towcs'"
 msgstr "'utf8towcs'里的输入'%s'不对"
 
-#: src/main/util.c:1290
+#: src/main/util.c:1355
 #, c-format
 msgid "invalid multibyte string at '%s'"
 msgstr "'%s'多字节字符串有错"
 
-#: src/main/util.c:1399
+#: src/main/util.c:1497
 msgid "error message truncated to 255 chars"
 msgstr "错误信息缩短到255个字节"
 
-#: src/main/util.c:1412
+#: src/main/util.c:1510
 msgid "warning message truncated to 255 chars"
 msgstr "警告信息缩短到255个字节"
 
-#: src/main/util.c:1819
+#: src/main/util.c:1659
+#, c-format
+msgid "accuracy loss in conversion from \"%s\" to numeric"
+msgstr ""
+
+#: src/main/util.c:1969
 msgid "all arguments must be named"
 msgstr "所有的参数都必需取名"
 
-#: src/main/util.c:1893
+#: src/main/util.c:2091
 msgid "ICU is not supported on this build"
 msgstr "本平台不支持ICU"
 
-#: src/main/util.c:1954
+#: src/main/util.c:2158
 msgid "'breaks' is not sorted"
 msgstr "'breaks'没有排序"
 
-#: src/main/util.c:1988 src/main/util.c:2034
+#: src/main/util.c:2192 src/main/util.c:2242
 #, c-format
 msgid "long vector '%s' is not supported"
 msgstr "不支持'%s'这种长向量"
 
-#: src/main/util.c:2087
+#: src/main/util.c:2296
 msgid "'eps.correct' must be 0, 1, or 2"
 msgstr "'eps.correct' 的值必需是0,1,或2"
 
-#: src/main/util.c:2115
+#: src/main/util.c:2324
 msgid "'x' must be a vector"
 msgstr "'x'必需是向量"
 
@@ -6257,14 +6343,6 @@ msgstr ""
 "用'q()'退出R.\n"
 "\n"
 
-#: src/main/vfonts.c:50
-msgid "vfont routines cannot be accessed in module"
-msgstr "模块里没有vfont例行程序"
-
-#: src/main/vfonts.c:67 src/main/vfonts.c:80 src/main/vfonts.c:98
-msgid "Hershey fonts cannot be loaded"
-msgstr "无法载入Hershey字形"
-
 #: src/main/xspline.c:60
 #, c-format
 msgid "add_point - reached MAXNUMPTS (%d)"
@@ -6286,7 +6364,7 @@ msgstr "至少得有四个控制点"
 msgid "There must be at least three control points"
 msgstr "至少得有三个控制点"
 
-#: src/modules/X11/dataentry.c:1871 src/modules/X11/devX11.c:1246
+#: src/modules/X11/dataentry.c:1874 src/modules/X11/devX11.c:1248
 #, c-format
 msgid "X11 protocol error: %s"
 msgstr "X11協定错误:%s"
@@ -6309,7 +6387,7 @@ msgstr ""
 "错误:X11无法分配额外的图案颜色。\n"
 "请考虑用colortype=\"pseudo.cube\"或\"gray\"选项来调用X11。"
 
-#: src/modules/X11/devX11.c:1027
+#: src/modules/X11/devX11.c:1029
 msgid ""
 "could not find any X11 fonts\n"
 "Check that the Font Path is correct."
@@ -6317,28 +6395,28 @@ msgstr ""
 "找不到任何X11字形\n"
 "请检查字形路径设得是不是对。"
 
-#: src/modules/X11/devX11.c:1087
+#: src/modules/X11/devX11.c:1089
 #, c-format
 msgid "X11 used font size %d when %d was requested"
 msgstr "虽然需要的是%2$d,但X11却大小为%1$d的字形"
 
-#: src/modules/X11/devX11.c:1121
+#: src/modules/X11/devX11.c:1123
 #, c-format
 msgid "X11 font %s, face %d at size %d could not be loaded"
 msgstr "无法载入X11字面为%2$d,大小为%3$d的字形%1$s"
 
-#: src/modules/X11/devX11.c:1130
+#: src/modules/X11/devX11.c:1132
 msgid ""
 "semi-transparency is not supported on this device: reported only once per "
 "page"
 msgstr "这装置不支持半透明输出:每一页只提醒一次"
 
-#: src/modules/X11/devX11.c:1254
+#: src/modules/X11/devX11.c:1256
 #, c-format
 msgid "X11 I/O error while opening X11 connection to '%s'"
 msgstr "在打开'%s'链结的时候X11 I/O出错"
 
-#: src/modules/X11/devX11.c:1272
+#: src/modules/X11/devX11.c:1273
 msgid "X11 fatal IO error: please save work and shut down R"
 msgstr "X11致命的IO错误: 请保存工作数据,然后重新启动R"
 
@@ -6459,206 +6537,271 @@ msgstr "无法建立XImage"
 msgid "attempt to use the locator after dev.hold()"
 msgstr "调用了dev.hold()后就不能再用定位器了"
 
-#: src/modules/X11/devX11.c:3111
+#: src/modules/X11/devX11.c:3117
 #, c-format
 msgid "unable to start device %s"
 msgstr "无法打开%s设备"
 
-#: src/modules/X11/devX11.c:3138
+#: src/modules/X11/devX11.c:3144
 msgid "invalid 'width' or 'height'"
 msgstr "'width'或'height'不对"
 
-#: src/modules/X11/devX11.c:3145
+#: src/modules/X11/devX11.c:3151
 msgid "invalid colortype passed to X11 driver"
 msgstr "传给X11驅動器的颜色种类不对"
 
-#: src/modules/X11/devX11.c:3159
+#: src/modules/X11/devX11.c:3165
 msgid "unknown X11 color/colour model -- using monochrome"
 msgstr "没有这种X11颜色/颜色模型 --用黑白色的"
 
-#: src/modules/X11/devX11.c:3249
+#: src/modules/X11/devX11.c:3255
 msgid "no plot on device to save"
 msgstr "没有可以保存的设备"
 
-#: src/modules/X11/devX11.c:3251
+#: src/modules/X11/devX11.c:3257
 msgid "not an open X11cairo device"
 msgstr "不是已打开的X11cairo设备"
 
-#: src/modules/X11/devX11.c:3260
+#: src/modules/X11/devX11.c:3266
 #, c-format
 msgid "cannot open file '%s'"
 msgstr "无法打开文件'%s'"
 
-#: src/modules/X11/devX11.c:3277
+#: src/modules/X11/devX11.c:3283
 msgid "savePlot() is not supported on this build"
 msgstr "本平台不支持savePlot()"
 
-#: src/modules/X11/devX11.c:3317
+#: src/modules/X11/devX11.c:3323
 msgid "unable to contact X11 display"
 msgstr "无法链结到X11显示"
 
-#: src/modules/X11/devX11.c:3366
+#: src/modules/X11/devX11.c:3372
 #, c-format
 msgid "clipboard cannot be read (error code %d)"
 msgstr "读取裁剪板失败(错误码%d)"
 
-#: src/modules/X11/devX11.c:3397
+#: src/modules/X11/devX11.c:3408
 msgid "cannot allocate memory for X11Routines structure"
 msgstr "无法为X11Routines结构分配内存"
 
-#: src/modules/internet/internet.c:188 src/modules/internet/internet.c:192
-#: src/modules/internet/internet.c:198 src/modules/internet/internet.c:210
+#: src/modules/internet/internet.c:113
+msgid "for https:// URLs use method = \"wininet\""
+msgstr ""
+
+#: src/modules/internet/internet.c:153 src/modules/internet/internet.c:274
+#: src/modules/internet/internet.c:758
+#, fuzzy, c-format
+msgid "scheme not supported in URL '%s'"
+msgstr "'eval'不支持重新启动"
+
+#: src/modules/internet/internet.c:348 src/modules/internet/internet.c:352
+#: src/modules/internet/internet.c:357 src/modules/internet/internet.c:381
+#: src/modules/internet/libcurl.c:791 src/modules/internet/libcurl.c:795
+#: src/modules/internet/libcurl.c:801 src/modules/internet/libcurl.c:814
+#: src/modules/internet/libcurl.c:822
 msgid "allocation of url connection failed"
 msgstr "url链结分配失败"
 
-#: src/modules/internet/internet.c:286
+#: src/modules/internet/internet.c:455
 msgid "only first element of 'url' argument used"
 msgstr "只用'url'参数的第一个元素"
 
-#: src/modules/internet/internet.c:292
+#: src/modules/internet/internet.c:461
 msgid "only first element of 'destfile' argument used"
 msgstr "只用'destfile'参数的第一个元素"
 
-#: src/modules/internet/internet.c:317
+#: src/modules/internet/internet.c:480 src/modules/internet/libcurl.c:499
 msgid "Download progress"
 msgstr "正在下载"
 
-#: src/modules/internet/internet.c:339
+#: src/modules/internet/internet.c:502
 #, c-format
 msgid "cannot open URL '%s', reason '%s'"
 msgstr "无法打开URL'%s',原因是'%s'"
 
-#: src/modules/internet/internet.c:346 src/modules/internet/internet.c:372
-#: src/modules/internet/internet.c:474
+#: src/modules/internet/internet.c:509 src/modules/internet/internet.c:536
+#: src/modules/internet/internet.c:661
 #, c-format
 msgid "cannot open destfile '%s', reason '%s'"
 msgstr "无法打开目的文件'%s',原因是'%s'"
 
-#: src/modules/internet/internet.c:377 src/modules/internet/internet.c:479
+#: src/modules/internet/internet.c:541 src/modules/internet/internet.c:666
+#: src/modules/internet/libcurl.c:530
 #, c-format
 msgid "trying URL '%s'\n"
 msgstr "试开URL’%s'\n"
 
-#: src/modules/internet/internet.c:384 src/modules/internet/internet.c:486
-msgid "opened URL\n"
-msgstr "打开了URL\n"
-
-#: src/modules/internet/internet.c:455 src/modules/internet/internet.c:560
-#, c-format
-msgid "downloaded length %d != reported length %d"
+#: src/modules/internet/internet.c:640 src/modules/internet/internet.c:751
+#: src/modules/internet/libcurl.c:578
+#, fuzzy, c-format
+msgid "downloaded length %0.f != reported length %0.f"
 msgstr "下载的长度%d不等于报告的长度%d"
 
-#: src/modules/internet/internet.c:460 src/modules/internet/internet.c:565
+#: src/modules/internet/internet.c:645 src/modules/internet/internet.c:756
 #, c-format
 msgid "cannot open URL '%s'"
 msgstr "无法打开URL'%s'"
 
-#: src/modules/internet/internet.c:593 src/modules/internet/internet.c:828
-#, c-format
-msgid "cannot open: HTTP status was '%d %s'"
+#: src/modules/internet/internet.c:779 src/modules/internet/internet.c:944
+#, fuzzy, c-format
+msgid "cannot open URL '%s': HTTP status was '%d %s'"
 msgstr "无法打开: HTTP状态是'%d%s'"
 
-#: src/modules/internet/internet.c:772 src/modules/internet/internet.c:935
-msgid "InternetOpenUrl timed out"
-msgstr "InternetOpenUrl超时"
-
-#: src/modules/internet/internet.c:799 src/modules/internet/internet.c:813
-#: src/modules/internet/internet.c:957 src/modules/internet/internet.c:966
+#: src/modules/internet/internet.c:915 src/modules/internet/internet.c:929
+#: src/modules/internet/internet.c:1019 src/modules/internet/internet.c:1028
 #, c-format
 msgid "InternetOpenUrl failed: '%s'"
 msgstr "InternetOpenUrl失败:’%s'"
 
-#: src/modules/internet/internet.c:870
-msgid "Internet read timed out"
-msgstr "互联网读取超时"
+#: src/modules/internet/libcurl.c:159
+#, fuzzy, c-format
+msgid "URL '%s': status was '%d %s'"
+msgstr "无法打开: HTTP状态是'%d%s'"
+
+#: src/modules/internet/libcurl.c:163
+#, c-format
+msgid "URL '%s': status was '%s'"
+msgstr ""
+
+#: src/modules/internet/libcurl.c:240
+#, fuzzy
+msgid "curlGetHeaders is not supported on this platform"
+msgstr "本平台不支持nsl()"
+
+#: src/modules/internet/libcurl.c:249 src/modules/internet/libcurl.c:252
+#, fuzzy, c-format
+msgid "invalid %s argument"
+msgstr "'%s'参数不对"
+
+#: src/modules/internet/libcurl.c:269
+#, c-format
+msgid ""
+"libcurl error code %d\n"
+"\t%s\n"
+msgstr ""
+
+#: src/modules/internet/libcurl.c:404
+#, fuzzy
+msgid "download.file(method = \"libcurl\") is not supported on this platform"
+msgstr "本平台不支持nsl()"
+
+#: src/modules/internet/libcurl.c:420
+#, fuzzy
+msgid "lengths of 'url' and 'destfile' must match"
+msgstr "引进和引出名字的长度必需相等"
+
+#: src/modules/internet/libcurl.c:481
+#, fuzzy, c-format
+msgid "URL %s: cannot open destfile '%s', reason '%s'"
+msgstr "无法打开目的文件'%s',原因是'%s'"
+
+#: src/modules/internet/libcurl.c:593
+#, fuzzy
+msgid "cannot download all files"
+msgstr "无法打开文件'%s'"
+
+#: src/modules/internet/libcurl.c:727
+#, fuzzy
+msgid "cannot read from connection"
+msgstr "无法从此链结读取"
+
+#: src/modules/internet/libcurl.c:763
+#, fuzzy
+msgid "cannot open connection"
+msgstr "无法打开链结"
+
+#: src/modules/internet/libcurl.c:826
+#, fuzzy
+msgid "url(method = \"libcurl\") is not supported on this platform"
+msgstr "本平台不支持nsl()"
 
-#: src/modules/internet/nanoftp.c:288 src/modules/internet/nanoftp.c:301
-#: src/modules/internet/nanoftp.c:312 src/modules/internet/nanoftp.c:346
-#: src/modules/internet/nanoftp.c:356
+#: src/modules/internet/nanoftp.c:289 src/modules/internet/nanoftp.c:302
+#: src/modules/internet/nanoftp.c:313 src/modules/internet/nanoftp.c:347
+#: src/modules/internet/nanoftp.c:357
 msgid "RxmlNanoFTPScanURL: overlong (invalid?) URL"
 msgstr "RxmlNanoFTPScanURL: URL太长了(或格式不对?)"
 
-#: src/modules/internet/nanoftp.c:389
+#: src/modules/internet/nanoftp.c:390
 msgid "removing FTP proxy info"
 msgstr "删除FTP代理主机信息"
 
-#: src/modules/internet/nanoftp.c:391
+#: src/modules/internet/nanoftp.c:392
 #, c-format
 msgid "using FTP proxy '%s'"
 msgstr "用FTP代理主机'%s'"
 
-#: src/modules/internet/nanoftp.c:402 src/modules/internet/nanoftp.c:431
+#: src/modules/internet/nanoftp.c:403 src/modules/internet/nanoftp.c:432
 msgid "RxmlNanoFTPScanProxy: overlong (invalid?) URL"
 msgstr "RxmlNanoFTPScanProxy: URL太长了(或格式不对?)"
 
-#: src/modules/internet/nanoftp.c:830
+#: src/modules/internet/nanoftp.c:833
 msgid "cannot resolve host"
 msgstr "无法分辨主机"
 
-#: src/modules/internet/nanoftp.c:860
+#: src/modules/internet/nanoftp.c:863
 msgid "failed to connect to server"
 msgstr "连接不上伺服器"
 
-#: src/modules/internet/nanoftp.c:871
+#: src/modules/internet/nanoftp.c:874
 msgid "failed to get response from server"
 msgstr "伺服器没有反应"
 
-#: src/modules/internet/nanoftp.c:1134
+#: src/modules/internet/nanoftp.c:1137
 msgid "RxmlNanoFTPGetConnection: failed to create socket"
 msgstr "RxmlNanoFTPGetConnection: 建立插坐失败"
 
-#: src/modules/internet/nanoftp.c:1180
+#: src/modules/internet/nanoftp.c:1183
 msgid "failed to create a data connection"
 msgstr "建立数据链结失败"
 
-#: src/modules/internet/nanoftp.c:1188
+#: src/modules/internet/nanoftp.c:1191
 msgid "failed to bind a port"
 msgstr "连接通訊埠失败"
 
-#: src/modules/internet/nanoftp.c:1195
+#: src/modules/internet/nanoftp.c:1198
 #, c-format
 msgid "could not listen on port %d"
 msgstr "无法从通訊埠%d听取数据"
 
-#: src/modules/internet/nanohttp.c:370 src/modules/internet/nanohttp.c:398
-#: src/modules/internet/nanohttp.c:407
+#: src/modules/internet/nanohttp.c:369 src/modules/internet/nanohttp.c:400
+#: src/modules/internet/nanohttp.c:412
 msgid "RxmlNanoHTTPScanURL: overlong (invalid?) URL"
 msgstr "RxmlNanoHTTPScanURL: URL太长了(或格式不对?)"
 
-#: src/modules/internet/nanohttp.c:441
+#: src/modules/internet/nanohttp.c:446
 msgid "removing HTTP proxy info"
 msgstr "删除HTTP代理主机信息"
 
-#: src/modules/internet/nanohttp.c:443
+#: src/modules/internet/nanohttp.c:448
 #, c-format
 msgid "using HTTP proxy '%s'"
 msgstr "用HTTP代理主机'%s'"
 
-#: src/modules/internet/nanohttp.c:454 src/modules/internet/nanohttp.c:490
+#: src/modules/internet/nanohttp.c:459 src/modules/internet/nanohttp.c:497
 msgid "RxmlNanoHTTPScanProxy: overlong (invalid?) URL"
 msgstr "RxmlNanoHTTPScanProxy: URL太长了(或格式不对?)"
 
-#: src/modules/internet/nanohttp.c:1107
+#: src/modules/internet/nanohttp.c:1135
 #, c-format
 msgid "unable to resolve '%s'"
 msgstr "无法解决'%s'."
 
-#: src/modules/internet/nanohttp.c:1134
+#: src/modules/internet/nanohttp.c:1168
 #, c-format
 msgid "connected to '%s' on port %d."
 msgstr "由通訊埠%2$d接通到'%1$s'."
 
-#: src/modules/internet/nanohttp.c:1139
+#: src/modules/internet/nanohttp.c:1173
 #, c-format
 msgid "unable to connect to '%s' on port %d."
 msgstr "无法通过通訊埠%2$d连接到'%1$s'."
 
-#: src/modules/internet/nanohttp.c:1443
+#: src/modules/internet/nanohttp.c:1477
 #, c-format
 msgid "redirect to: '%s'"
 msgstr "重新寄送到: '%s'"
 
-#: src/modules/internet/nanohttp.c:1454
+#: src/modules/internet/nanohttp.c:1488
 msgid "too many redirects, aborting ..."
 msgstr "太多重新寄送,中断工作 ..."
 
@@ -6691,11 +6834,11 @@ msgstr "type[1]='%s'参数必需取'1','O'或'I'其中的一个"
 #: src/modules/lapack/Lapack.c:730 src/modules/lapack/Lapack.c:779
 #: src/modules/lapack/Lapack.c:786 src/modules/lapack/Lapack.c:834
 #: src/modules/lapack/Lapack.c:840 src/modules/lapack/Lapack.c:894
-#: src/modules/lapack/Lapack.c:900 src/modules/lapack/Lapack.c:1134
-#: src/modules/lapack/Lapack.c:1140 src/modules/lapack/Lapack.c:1188
-#: src/modules/lapack/Lapack.c:1195 src/modules/lapack/Lapack.c:1199
-#: src/modules/lapack/Lapack.c:1227 src/modules/lapack/Lapack.c:1234
-#: src/modules/lapack/Lapack.c:1254
+#: src/modules/lapack/Lapack.c:900 src/modules/lapack/Lapack.c:1135
+#: src/modules/lapack/Lapack.c:1141 src/modules/lapack/Lapack.c:1189
+#: src/modules/lapack/Lapack.c:1196 src/modules/lapack/Lapack.c:1200
+#: src/modules/lapack/Lapack.c:1228 src/modules/lapack/Lapack.c:1235
+#: src/modules/lapack/Lapack.c:1255
 #, c-format
 msgid "error code %d from Lapack routine '%s'"
 msgstr "Lapack例行程序'%2$s'回复了%1$d错误代码"
@@ -6775,28 +6918,28 @@ msgstr "Lapack例行程序'ztrcon()'回复了[%d]错误代码"
 msgid "'a' must be a complex matrix"
 msgstr "'a'必需是复数矩阵"
 
-#: src/modules/lapack/Lapack.c:535 src/modules/lapack/Lapack.c:1042
+#: src/modules/lapack/Lapack.c:535 src/modules/lapack/Lapack.c:1043
 msgid "'a' is 0-diml"
 msgstr "'a'是0-diml"
 
-#: src/modules/lapack/Lapack.c:537 src/modules/lapack/Lapack.c:1044
+#: src/modules/lapack/Lapack.c:537 src/modules/lapack/Lapack.c:1045
 #, c-format
 msgid "'a' (%d x %d) must be square"
 msgstr "'a'(%d x %d)必需是正方形的"
 
-#: src/modules/lapack/Lapack.c:543 src/modules/lapack/Lapack.c:1050
+#: src/modules/lapack/Lapack.c:543 src/modules/lapack/Lapack.c:1051
 msgid "no right-hand side in 'b'"
 msgstr "'b'在等号右手没有公式"
 
 #: src/modules/lapack/Lapack.c:546 src/modules/lapack/Lapack.c:560
-#: src/modules/lapack/Lapack.c:1053 src/modules/lapack/Lapack.c:1069
+#: src/modules/lapack/Lapack.c:1054 src/modules/lapack/Lapack.c:1070
 #, c-format
 msgid "'b' (%d x %d) must be compatible with 'a' (%d x %d)"
 msgstr "'b' (%d x %d)必需与'a'(%d x %d)相容"
 
 #: src/modules/lapack/Lapack.c:581 src/modules/lapack/Lapack.c:948
-#: src/modules/lapack/Lapack.c:962 src/modules/lapack/Lapack.c:1017
-#: src/modules/lapack/Lapack.c:1091
+#: src/modules/lapack/Lapack.c:962 src/modules/lapack/Lapack.c:1018
+#: src/modules/lapack/Lapack.c:1092
 #, c-format
 msgid "argument %d of Lapack routine %s had invalid value"
 msgstr "Lapack例行程序%2$s里的%1$d参数值不对"
@@ -6806,7 +6949,7 @@ msgid "'b' must be a complex matrix"
 msgstr "'b'必需是复数矩阵"
 
 #: src/modules/lapack/Lapack.c:670 src/modules/lapack/Lapack.c:716
-#: src/modules/lapack/Lapack.c:1181 src/modules/lapack/Lapack.c:1220
+#: src/modules/lapack/Lapack.c:1182 src/modules/lapack/Lapack.c:1221
 #, c-format
 msgid "right-hand side should have %d not %d rows"
 msgstr "公式右手应该有%d而不是%d行"
@@ -6824,13 +6967,13 @@ msgstr "不支持2 ^ 31个或更多的元素矩阵"
 msgid "'x' must be a square complex matrix"
 msgstr "'x'必需是正方形的复数矩阵"
 
-#: src/modules/lapack/Lapack.c:926 src/modules/lapack/Lapack.c:1000
-#: src/modules/lapack/Lapack.c:1039 src/modules/lapack/Lapack.c:1114
-#: src/modules/lapack/Lapack.c:1245
+#: src/modules/lapack/Lapack.c:926 src/modules/lapack/Lapack.c:1001
+#: src/modules/lapack/Lapack.c:1040 src/modules/lapack/Lapack.c:1115
+#: src/modules/lapack/Lapack.c:1246
 msgid "'a' must be a numeric matrix"
 msgstr "'a'必需是数值矩阵"
 
-#: src/modules/lapack/Lapack.c:933 src/modules/lapack/Lapack.c:1250
+#: src/modules/lapack/Lapack.c:933 src/modules/lapack/Lapack.c:1251
 msgid "'a' must be a square matrix"
 msgstr "'a'必需是正方形矩阵"
 
@@ -6847,40 +6990,40 @@ msgstr "%d数位主次为非正定"
 msgid "the matrix is either rank-deficient or indefinite"
 msgstr "矩阵的秩亏或不确定"
 
-#: src/modules/lapack/Lapack.c:987
+#: src/modules/lapack/Lapack.c:988
 msgid "'size' argument must be a positive integer"
 msgstr "'size'参数必需是正整数"
 
-#: src/modules/lapack/Lapack.c:1002
+#: src/modules/lapack/Lapack.c:1003
 #, c-format
 msgid "'size' cannot exceed ncol(x) = %d"
 msgstr "'size'不能超过ncol(x)=%d"
 
-#: src/modules/lapack/Lapack.c:1003
+#: src/modules/lapack/Lapack.c:1004
 #, c-format
 msgid "'size' cannot exceed nrow(x) = %d"
 msgstr "'size'不能超过nrow(x)=%d"
 
-#: src/modules/lapack/Lapack.c:1015
+#: src/modules/lapack/Lapack.c:1016
 #, c-format
 msgid "element (%d, %d) is zero, so the inverse cannot be computed"
 msgstr "元素(%d,%d)为零, 因此无法求逆"
 
-#: src/modules/lapack/Lapack.c:1094
+#: src/modules/lapack/Lapack.c:1095
 #, c-format
 msgid "Lapack routine %s: system is exactly singular: U[%d,%d] = 0"
 msgstr "Lapack例行程序%s: 系统正好是奇异的: U[%d,%d] = 0"
 
-#: src/modules/lapack/Lapack.c:1102
+#: src/modules/lapack/Lapack.c:1103
 #, c-format
 msgid "system is computationally singular: reciprocal condition number = %g"
 msgstr "系统计算上是奇异的: 倒条件数=%g"
 
-#: src/modules/lapack/Lapack.c:1174 src/modules/lapack/Lapack.c:1212
+#: src/modules/lapack/Lapack.c:1175 src/modules/lapack/Lapack.c:1213
 msgid "'b' must be a numeric matrix"
 msgstr "'b'必需是数值矩阵"
 
-#: src/modules/lapack/Lapack.c:1246
+#: src/modules/lapack/Lapack.c:1247
 msgid "argument 'logarithm' must be logical"
 msgstr "参数'logarithm'必需是逻辑值"
 
@@ -6889,8 +7032,8 @@ msgid "bessel_i allocation error"
 msgstr "bessel_i分配错误"
 
 #: src/nmath/bessel_i.c:77 src/nmath/bessel_i.c:122
-#, c-format
-msgid "bessel_i(%g): ncalc (=%ld) != nb (=%ld); alpha=%g. Arg. out of range?\n"
+#, fuzzy, c-format
+msgid "bessel_i(%g): ncalc (=%d) != nb (=%d); alpha=%g. Arg. out of range?\n"
 msgstr "bessel_i(%g): ncalc (=%ld)!= nb (=%ld); alpha=%g. 参数在范围外?\n"
 
 #: src/nmath/bessel_i.c:80 src/nmath/bessel_i.c:125
@@ -6898,16 +7041,21 @@ msgstr "bessel_i(%g): ncalc (=%ld)!= nb (=%ld); alpha=%g. 参数在范围外?\n"
 msgid "bessel_i(%g,nu=%g): precision lost in result\n"
 msgstr "bessel_i(%g,nu=%g): 结果的精确度有损害\n"
 
-#: src/nmath/bessel_j.c:67
+#: src/nmath/bessel_j.c:64 src/nmath/bessel_j.c:118
+#, c-format
+msgid "besselJ(x, nu): nu=%g too large for bessel_j() algorithm"
+msgstr ""
+
+#: src/nmath/bessel_j.c:72
 msgid "bessel_j allocation error"
 msgstr "Bessel_j分配错误"
 
-#: src/nmath/bessel_j.c:75 src/nmath/bessel_j.c:118
-#, c-format
-msgid "bessel_j(%g): ncalc (=%ld) != nb (=%ld); alpha=%g. Arg. out of range?\n"
+#: src/nmath/bessel_j.c:80 src/nmath/bessel_j.c:127
+#, fuzzy, c-format
+msgid "bessel_j(%g): ncalc (=%d) != nb (=%d); alpha=%g. Arg. out of range?\n"
 msgstr "bessel_j(%g): ncalc (=%ld)!= nb (=%ld); alpha=%g. 参数在范围外?\n"
 
-#: src/nmath/bessel_j.c:78 src/nmath/bessel_j.c:121
+#: src/nmath/bessel_j.c:83 src/nmath/bessel_j.c:130
 #, c-format
 msgid "bessel_j(%g,nu=%g): precision lost in result\n"
 msgstr "bessel_j(%g,nu=%g): 结果的精确度有损害\n"
@@ -6917,8 +7065,8 @@ msgid "bessel_k allocation error"
 msgstr "bessel_k分配错误"
 
 #: src/nmath/bessel_k.c:71 src/nmath/bessel_k.c:108
-#, c-format
-msgid "bessel_k(%g): ncalc (=%ld) != nb (=%ld); alpha=%g. Arg. out of range?\n"
+#, fuzzy, c-format
+msgid "bessel_k(%g): ncalc (=%d) != nb (=%d); alpha=%g. Arg. out of range?\n"
 msgstr "bessel_k(%g): ncalc (=%ld)!= nb (=%ld); alpha=%g. 参数在范围外?\n"
 
 #: src/nmath/bessel_k.c:74 src/nmath/bessel_k.c:111
@@ -6926,16 +7074,21 @@ msgstr "bessel_k(%g): ncalc (=%ld)!= nb (=%ld); alpha=%g. 参数在范围外?\n"
 msgid "bessel_k(%g,nu=%g): precision lost in result\n"
 msgstr "bessel_k(%g,nu=%g): 结果的精确度有损害\n"
 
-#: src/nmath/bessel_y.c:66
+#: src/nmath/bessel_y.c:63 src/nmath/bessel_y.c:125
+#, c-format
+msgid "besselY(x, nu): nu=%g too large for bessel_y() algorithm"
+msgstr ""
+
+#: src/nmath/bessel_y.c:71
 msgid "bessel_y allocation error"
 msgstr "bessel_y分配错误"
 
-#: src/nmath/bessel_y.c:82 src/nmath/bessel_y.c:127
-#, c-format
-msgid "bessel_y(%g): ncalc (=%ld) != nb (=%ld); alpha=%g. Arg. out of range?\n"
+#: src/nmath/bessel_y.c:87 src/nmath/bessel_y.c:136
+#, fuzzy, c-format
+msgid "bessel_y(%g): ncalc (=%d) != nb (=%d); alpha=%g. Arg. out of range?\n"
 msgstr "bessel_y(%g): ncalc (=%ld)!= nb (=%ld); alpha=%g. 参数在范围外?\n"
 
-#: src/nmath/bessel_y.c:85 src/nmath/bessel_y.c:130
+#: src/nmath/bessel_y.c:90 src/nmath/bessel_y.c:139
 #, c-format
 msgid "bessel_y(%g,nu=%g): precision lost in result\n"
 msgstr "bessel_y(%g,nu=%g): 结果的精确度有损害\n"
@@ -6945,42 +7098,42 @@ msgstr "bessel_y(%g,nu=%g): 结果的精确度有损害\n"
 msgid "'k' (%.2f) must be integer, rounded to %.0f"
 msgstr "'k' (%.2f)必需是整数,四舍五入时到%.0f"
 
-#: src/nmath/nmath.h:141
+#: src/nmath/nmath.h:156
 #, c-format
 msgid "argument out of domain in '%s'\n"
 msgstr "'%s'里的参数值在范围外\n"
 
-#: src/nmath/nmath.h:144
+#: src/nmath/nmath.h:159
 #, c-format
 msgid "value out of range in '%s'\n"
 msgstr "'%s'里的值在范围外\n"
 
-#: src/nmath/nmath.h:147
+#: src/nmath/nmath.h:162
 #, c-format
 msgid "convergence failed in '%s'\n"
 msgstr "'%s'收敛失败\n"
 
-#: src/nmath/nmath.h:150
+#: src/nmath/nmath.h:165
 #, c-format
 msgid "full precision may not have been achieved in '%s'\n"
 msgstr "'%s'可能达不到全精度\n"
 
-#: src/nmath/nmath.h:153
+#: src/nmath/nmath.h:168
 #, c-format
 msgid "underflow occurred in '%s'\n"
 msgstr "'%s'下溢\n"
 
-#: src/nmath/pbeta.c:48
-#, c-format
-msgid "pbeta_raw() -> bratio() gave error code %d"
+#: src/nmath/pbeta.c:64
+#, fuzzy, c-format
+msgid "pbeta_raw(%g, a=%g, b=%g, ..) -> bratio() gave error code %d"
 msgstr "pbeta_raw() -> bratio()得到了错误代码%d"
 
-#: src/nmath/pnbinom.c:79
+#: src/nmath/pnbinom.c:82
 #, c-format
 msgid "pnbinom_mu() -> bratio() gave error code %d"
 msgstr "pnbinom_mu() -> bratio()得到了错误代码%d "
 
-#: src/nmath/pnchisq.c:246
+#: src/nmath/pnchisq.c:295
 #, c-format
 msgid "pnchisq(x=%g, ..): not converged in %d iter."
 msgstr "pnchisq(x=%g, ..):%d次循环后还没有聚合."
@@ -7022,7 +7175,7 @@ msgstr "模块没有X11例行程序"
 msgid "X11 module cannot be loaded"
 msgstr "无法载入X11模块"
 
-#: src/unix/X11.c:126 src/unix/X11.c:132 src/unix/X11.c:138 src/unix/X11.c:144
+#: src/unix/X11.c:144 src/unix/X11.c:150 src/unix/X11.c:156 src/unix/X11.c:162
 msgid "X11 is not available"
 msgstr "没有X11平台这一功能"
 
@@ -7048,7 +7201,7 @@ msgid ""
 "Explicit lazy dynamic loading not supported on this platform. Using default."
 msgstr "本系统不支持明晰缓慢动态载入。用缺席值。"
 
-#: src/unix/dynload.c:240
+#: src/unix/dynload.c:232
 msgid "cannot get working directory!"
 msgstr "找不到工作目录"
 
@@ -7062,97 +7215,220 @@ msgid ""
 "report using bug.report()"
 msgstr "读行输入嵌套出了不寻常的错,请用bug.report()"
 
-#: src/unix/sys-std.c:1082 src/unix/sys-std.c:1249
+#: src/unix/sys-std.c:1085 src/unix/sys-std.c:1255
 #, c-format
 msgid "problem in saving the history file '%s'"
 msgstr "在保存履历文件'%s'时出了问题"
 
-#: src/unix/sys-std.c:1156
+#: src/unix/sys-std.c:1162
 #, c-format
 msgid ""
 "Cannot open file '%s': %s\n"
 "\n"
 msgstr "无法打开文件'%s': %s\n"
 
-#: src/unix/sys-std.c:1220 src/unix/sys-std.c:1243
+#: src/unix/sys-std.c:1226 src/unix/sys-std.c:1249
 msgid "'file' argument is too long"
 msgstr "'file'参数太长"
 
-#: src/unix/sys-std.c:1226 src/unix/sys-std.c:1228
+#: src/unix/sys-std.c:1232 src/unix/sys-std.c:1234
 msgid "no history mechanism available"
 msgstr "没有历史功能"
 
-#: src/unix/sys-std.c:1255
+#: src/unix/sys-std.c:1261
 msgid "problem in truncating the history file"
 msgstr "截短履历文件时出了问题"
 
-#: src/unix/sys-std.c:1257 src/unix/sys-std.c:1259
+#: src/unix/sys-std.c:1263 src/unix/sys-std.c:1265
 msgid "no history available to save"
 msgstr "没有可以保存的历史"
 
-#: src/unix/sys-std.c:1271
+#: src/unix/sys-std.c:1277
 msgid "invalid timestamp"
 msgstr "时间标签不对"
 
-#: src/unix/sys-unix.c:251
+#: src/unix/sys-unix.c:248
 msgid "non-empty character argument expected"
 msgstr "需要非空字符参数"
 
-#: src/unix/sys-unix.c:254
+#: src/unix/sys-unix.c:251
 msgid "'intern' must be logical and not NA"
 msgstr "'intern’必需是逻辑值而不是NA"
 
-#: src/unix/sys-unix.c:266
+#: src/unix/sys-unix.c:269
 #, c-format
 msgid "cannot popen '%s', probable reason '%s'"
 msgstr "无法popen'%s',原因可能是'%s'"
 
-#: src/unix/sys-unix.c:271
+#: src/unix/sys-unix.c:279
 #, c-format
 msgid "line %d may be truncated in call to system(, intern = TRUE)"
 msgstr "调用system(, intern = TRUE)时%d行可能会被截断"
 
-#: src/unix/sys-unix.c:288
+#: src/unix/sys-unix.c:301
 #, c-format
 msgid "error in running command: '%s'"
 msgstr "运行命令时出错:'%s'"
 
-#: src/unix/sys-unix.c:290
+#: src/unix/sys-unix.c:303
 msgid "error in running command"
 msgstr "调用命令时发生了错误"
 
-#: src/unix/sys-unix.c:294
+#: src/unix/sys-unix.c:307
 #, c-format
 msgid "running command '%s' had status %d and error message '%s'"
 msgstr "运行命令'%s'的状态是%d:错误消息是'%s'"
 
-#: src/unix/sys-unix.c:399
+#: src/unix/sys-unix.c:412
 msgid "Sys.info() is not implemented on this system"
 msgstr "本系统没有实现Sys.info()这一功能"
 
-#: src/unix/system.c:257
+#: src/unix/system.c:267
 #, c-format
 msgid "WARNING: --gui or -g without value ignored"
 msgstr "警告: --gui或-g选项没有值,因此略过不用"
 
-#: src/unix/system.c:275
+#: src/unix/system.c:285
 #, c-format
 msgid "WARNING: unknown gui '%s', using X11\n"
 msgstr "警告: 没有这种gui ’%s', 用X11\n"
 
-#: src/unix/system.c:278
+#: src/unix/system.c:288
 #, c-format
 msgid "WARNING: unknown gui '%s', using none\n"
 msgstr "警告: 没有这种gui ’%s', 因此什么都不用\n"
 
-#: src/unix/system.c:388
+#: src/unix/system.c:373
 msgid "creating temporary file for '-e' failed"
 msgstr "为'-e'建立临时文件失败"
 
-#: src/unix/system.c:469
+#: src/unix/system.c:454
 msgid "WARNING: Only editing the first in the list of files"
 msgstr "警告: 只修改文件串列中的第一个元素"
 
+#~ msgid "'what' must be a character string or a function"
+#~ msgstr "'what'必需是字符串或函数"
+
+#~ msgid "sockets are not available on this system"
+#~ msgstr "本系统没有插坐这个功能"
+
+#~ msgid "no function to restart"
+#~ msgstr "没有重新开始的功能"
+
+#~ msgid "argument must be a closure"
+#~ msgstr "参数必需为闭合"
+
+#~ msgid "'hostname' must be a character vector of length 1"
+#~ msgstr "'hostname'必需是长度为一的字符矢量"
+
+#~ msgid "nsl() was unable to resolve host '%s'"
+#~ msgstr "nsl()无法分辨主机'%s'"
+
+#~ msgid "unknown format returned by C function 'gethostbyname'"
+#~ msgstr "'gethostbyname'回覆了错误的格式"
+
+#~ msgid "nsl() is not supported on this platform"
+#~ msgstr "本平台不支持nsl()"
+
+#~ msgid "too large a range of values in 'x'"
+#~ msgstr "'x'里的值的范围太大"
+
+#~ msgid "non-numeric argument"
+#~ msgstr "非数值参数"
+
+#~ msgid "unsupported URL scheme"
+#~ msgstr "不支持这种URL方案"
+
+#~ msgid "'dimnames' must be a list"
+#~ msgstr "'dimnames'必需是串列"
+
+#~ msgid "'args' must be a list"
+#~ msgstr "'args'必需是串列"
+
+#~ msgid "binary operations require two arguments"
+#~ msgstr "二进列运算需要两个参数"
+
+#~ msgid "opened URL\n"
+#~ msgstr "打开了URL\n"
+
+#~ msgid "internet routines were already initialized"
+#~ msgstr "互联网例行程序已经打开了"
+
+#~ msgid "'msg1' must be a character string"
+#~ msgstr "'msg1’必需是字符串"
+
+#~ msgid "'msg2' must be a character string"
+#~ msgstr "'msg2’必需是字符串"
+
+#~ msgid "argument 'code' must be a character string"
+#~ msgstr "参数'code'必需是字符串"
+
+#~ msgid "argument 'type' must be a character string"
+#~ msgstr "参数'type'必需是字符串"
+
+#~ msgid "InternetOpenUrl timed out"
+#~ msgstr "InternetOpenUrl超时"
+
+#~ msgid "Internet read timed out"
+#~ msgstr "互联网读取超时"
+
+#~ msgid "unable to find a closure from within which 'match.call' was called"
+#~ msgstr "找不到调用'match.call'的闭合"
+
+#~ msgid "vfont routines cannot be accessed in module"
+#~ msgstr "模块里没有vfont例行程序"
+
+#~ msgid "Hershey fonts cannot be loaded"
+#~ msgstr "无法载入Hershey字形"
+
+#~ msgid "invalid generic function in 'usemethod'"
+#~ msgstr "'usemethod'里类属功能无效"
+
+#~ msgid "'UseMethod' called from outside a function"
+#~ msgstr "不能在函数外调用'UseMethod' "
+
+#~ msgid "first argument must be a generic name"
+#~ msgstr "第一参数必需是类属名"
+
+#~ msgid ""
+#~ "explicit request not to duplicate arguments in call to '%s', but argument "
+#~ "%d is of the wrong type (%d != %d)"
+#~ msgstr "调用'%s'时明确要求不要复制参数,但参数%d的种类不对(%d != %d)"
+
+#~ msgid "single values not returned if not duplicated"
+#~ msgstr "如果不重复的话,单值没有返回"
+
+#~ msgid "character variables must be duplicated in .C/.Fortran"
+#~ msgstr "在调用.C/.Fortran时字符变数必需被复制"
+
+#~ msgid "call name too long in '%s'"
+#~ msgstr "'%s'里调用的名字太长"
+
+#~ msgid "generic name too long in '%s'"
+#~ msgstr "'%s'里的类属名字太长"
+
+#~ msgid "method name too long in '%s'"
+#~ msgstr "'%s'里的方法名字太长"
+
+#~ msgid "%d arguments passed to 'log' which requires 1 or 2"
+#~ msgstr "给了'log'%d个参数,但它最多只能用两个参数"
+
+#~ msgid ""
+#~ "Warning in %s :\n"
+#~ "  %s\n"
+#~ msgstr ""
+#~ "%s里有警告:\n"
+#~ "  %s\n"
+
+#~ msgid "input"
+#~ msgstr "输入"
+
+#~ msgid "symbol"
+#~ msgstr "符号"
+
+#~ msgid "assignment"
+#~ msgstr "任务"
+
 #~ msgid "negative value in 'x'"
 #~ msgstr "'x'里有负值"
 
@@ -7249,21 +7525,12 @@ msgstr "警告: 只修改文件串列中的第一个元素"
 #~ msgid "invalid return value count in call_R"
 #~ msgstr "call_R的回覆值数目不对"
 
-#~ msgid "internal error in unz code"
-#~ msgstr "unz写码发生了内部错误"
-
 #~ msgid "can't use R profiling while byte code profiling"
 #~ msgstr "在进行一位元組碼程序概要分析的同时不能用R来进行程序概要分析"
 
-#~ msgid "bad character switch offsets"
-#~ msgstr "字符开关偏移不对"
-
 #~ msgid "bad switch names"
 #~ msgstr "开关名字不对"
 
-#~ msgid "bad numeric switch offsets"
-#~ msgstr "数字开关偏移设定不对"
-
 #~ msgid "constBuf must be a generic vector"
 #~ msgstr "constBuf必需是矢量类属"
 
@@ -7429,15 +7696,9 @@ msgstr "警告: 只修改文件串列中的第一个元素"
 #~ msgid "'title' must be a character string"
 #~ msgstr "'title'必需为字符串"
 
-#~ msgid "'text' must be a character string"
-#~ msgstr "'text'必需为字符串"
-
 #~ msgid "'%s' must be length 1"
 #~ msgstr "'%s'的长度必需为一"
 
-#~ msgid "'%s' must be a list"
-#~ msgstr "'%s'必需是串列"
-
 #~ msgid "'%s' element %d is not a window handle"
 #~ msgstr "'%s'的%d元素不是窗户环柄"
 
@@ -7465,9 +7726,6 @@ msgstr "警告: 只修改文件串列中的第一个元素"
 #~ msgid "'file' is not a connection"
 #~ msgstr "'file'不是链结"
 
-#~ msgid "'dec' must be a single character"
-#~ msgstr "'dec'必需为单节字符"
-
 #~ msgid "corrupt data frame -- length of column %d does not not match nrows"
 #~ msgstr "数据框损坏了--列的长度%d不等于行的数目"
 
diff --git a/src/library/base/po/zh_TW.po b/src/library/base/po/zh_TW.po
index 5e843ff..aabd161 100644
--- a/src/library/base/po/zh_TW.po
+++ b/src/library/base/po/zh_TW.po
@@ -7,8 +7,8 @@
 msgid ""
 msgstr ""
 "Project-Id-Version: R 2.14.0\n"
-"Report-Msgid-Bugs-To: bugs.r-project.org\n"
-"POT-Creation-Date: 2014-03-27 07:46+0000\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2016-04-01 10:28-0700\n"
 "PO-Revision-Date: 2011-10-13 17:30+0800\n"
 "Last-Translator: Wei-Lun Chao <chaoweilun at gmail.com>\n"
 "Language-Team: Chinese (traditional) <zh-l10n at linux.org.tw>\n"
@@ -54,15 +54,15 @@ msgstr "不可使用初始參數來評估函數"
 msgid "unknown type in \"CG\" method of 'optim'"
 msgstr "optim 的 CG 方法中沒有此一類型"
 
-#: src/appl/optim.c:665
+#: src/appl/optim.c:662
 msgid "REPORT must be > 0 (method = \"L-BFGS-B\")"
 msgstr "REPORT必須 > 0 (method = \"L-BFGS-B\")"
 
-#: src/appl/optim.c:688
+#: src/appl/optim.c:685
 msgid "L-BFGS-B needs finite values of 'fn'"
 msgstr "L-BFGS-B 不能有 'fn' 的無限值"
 
-#: src/appl/optim.c:744
+#: src/appl/optim.c:741
 msgid "trace, REPORT must be >= 0 (method = \"SANN\")"
 msgstr "追蹤,REPORT 必須 >= 0 (方法 = \"SANN\")"
 
@@ -127,122 +127,127 @@ msgstr "存取 '%ls' 被拒絕"
 msgid "problem in displaying '%ls'"
 msgstr "顯示 '%ls' 時發生問題"
 
-#: src/gnuwin32/extra.c:116 src/gnuwin32/extra.c:159 src/gnuwin32/extra.c:349
-#: src/gnuwin32/extra.c:577 src/gnuwin32/extra.c:602 src/main/agrep.c:131
-#: src/main/agrep.c:135 src/main/agrep.c:775 src/main/agrep.c:780
-#: src/main/apply.c:293 src/main/apply.c:295 src/main/apply.c:298
-#: src/main/array.c:87 src/main/array.c:1137 src/main/array.c:1263
-#: src/main/array.c:1265 src/main/array.c:1266 src/main/array.c:1592
-#: src/main/array.c:1594 src/main/array.c:1596 src/main/attrib.c:196
+#: src/gnuwin32/extra.c:116 src/gnuwin32/extra.c:158 src/gnuwin32/extra.c:348
+#: src/gnuwin32/extra.c:574 src/gnuwin32/extra.c:599 src/main/agrep.c:131
+#: src/main/agrep.c:135 src/main/agrep.c:776 src/main/agrep.c:781
+#: src/main/apply.c:330 src/main/apply.c:332 src/main/apply.c:335
+#: src/main/array.c:90 src/main/array.c:1272 src/main/array.c:1411
+#: src/main/array.c:1413 src/main/array.c:1414 src/main/array.c:1758
+#: src/main/array.c:1760 src/main/array.c:1762 src/main/attrib.c:190
 #: src/main/builtin.c:88 src/main/builtin.c:97 src/main/builtin.c:116
-#: src/main/builtin.c:118 src/main/builtin.c:147 src/main/builtin.c:534
-#: src/main/builtin.c:550 src/main/builtin.c:739 src/main/builtin.c:741
-#: src/main/builtin.c:743 src/main/character.c:139 src/main/character.c:142
-#: src/main/character.c:203 src/main/character.c:1037
-#: src/main/character.c:1041 src/main/character.c:1276
-#: src/main/character.c:1280 src/main/character.c:1341
-#: src/main/character.c:1344 src/main/connections.c:1217
-#: src/main/connections.c:1223 src/main/connections.c:1226
-#: src/main/connections.c:1230 src/main/connections.c:1375
-#: src/main/connections.c:1391 src/main/connections.c:1396
-#: src/main/connections.c:1996 src/main/connections.c:2002
-#: src/main/connections.c:2006 src/main/connections.c:2010
-#: src/main/connections.c:2015 src/main/connections.c:2665
-#: src/main/connections.c:2670 src/main/connections.c:2673
-#: src/main/connections.c:2676 src/main/connections.c:3057
-#: src/main/connections.c:3062 src/main/connections.c:3068
-#: src/main/connections.c:3071 src/main/connections.c:3075
-#: src/main/connections.c:3090 src/main/connections.c:3140
-#: src/main/connections.c:3145 src/main/connections.c:3149
-#: src/main/connections.c:3153 src/main/connections.c:3157
-#: src/main/connections.c:3163 src/main/connections.c:3210
-#: src/main/connections.c:3216 src/main/connections.c:3220
-#: src/main/connections.c:3270 src/main/connections.c:3273
-#: src/main/connections.c:3547 src/main/connections.c:3550
-#: src/main/connections.c:3553 src/main/connections.c:3559
-#: src/main/connections.c:3666 src/main/connections.c:3672
-#: src/main/connections.c:3675 src/main/connections.c:3826
-#: src/main/connections.c:3829 src/main/connections.c:3833
-#: src/main/connections.c:3836 src/main/connections.c:3956
-#: src/main/connections.c:4074 src/main/connections.c:4077
-#: src/main/connections.c:4414 src/main/connections.c:4439
-#: src/main/connections.c:4474 src/main/connections.c:4489
-#: src/main/connections.c:4497 src/main/connections.c:4523
-#: src/main/connections.c:4669 src/main/connections.c:4673
-#: src/main/connections.c:4801 src/main/connections.c:4803
-#: src/main/connections.c:4805 src/main/connections.c:4833
-#: src/main/connections.c:4965 src/main/connections.c:4991
-#: src/main/connections.c:4995 src/main/connections.c:4999
-#: src/main/connections.c:5003 src/main/context.c:596 src/main/context.c:605
-#: src/main/context.c:609 src/main/datetime.c:775 src/main/datetime.c:865
-#: src/main/datetime.c:867 src/main/datetime.c:871 src/main/datetime.c:1026
-#: src/main/datetime.c:1028 src/main/datetime.c:1232 src/main/debug.c:228
-#: src/main/deparse.c:397 src/main/dotcode.c:478 src/main/dotcode.c:482
-#: src/main/dotcode.c:487 src/main/dounzip.c:322 src/main/dounzip.c:329
-#: src/main/dounzip.c:339 src/main/dounzip.c:344 src/main/dounzip.c:348
-#: src/main/dounzip.c:352 src/main/envir.c:1618 src/main/envir.c:1621
-#: src/main/envir.c:1742 src/main/envir.c:1747 src/main/envir.c:1813
-#: src/main/envir.c:1829 src/main/envir.c:1835 src/main/envir.c:1932
-#: src/main/envir.c:1940 src/main/envir.c:1947 src/main/envir.c:1958
-#: src/main/envir.c:2172 src/main/envir.c:2293 src/main/envir.c:2552
-#: src/main/envir.c:2762 src/main/envir.c:2776 src/main/envir.c:2783
-#: src/main/envir.c:2799 src/main/envir.c:3367 src/main/errors.c:1030
-#: src/main/eval.c:397 src/main/eval.c:406 src/main/eval.c:409
-#: src/main/grep.c:767 src/main/grep.c:772 src/main/grep.c:1061
-#: src/main/grep.c:1063 src/main/grep.c:1065 src/main/grep.c:1510
-#: src/main/grep.c:1514 src/main/grep.c:1519 src/main/grep.c:2323
-#: src/main/grep.c:2328 src/main/grep.c:2621 src/main/grep.c:2626
-#: src/main/memory.c:3736 src/main/paste.c:96 src/main/paste.c:395
-#: src/main/paste.c:402 src/main/paste.c:409 src/main/paste.c:414
-#: src/main/paste.c:419 src/main/paste.c:424 src/main/paste.c:427
-#: src/main/paste.c:435 src/main/paste.c:601 src/main/paste.c:606
+#: src/main/builtin.c:118 src/main/builtin.c:149 src/main/builtin.c:569
+#: src/main/builtin.c:585 src/main/builtin.c:773 src/main/builtin.c:775
+#: src/main/builtin.c:777 src/main/character.c:239 src/main/character.c:242
+#: src/main/character.c:247 src/main/character.c:788 src/main/character.c:791
+#: src/main/character.c:1289 src/main/character.c:1293
+#: src/main/character.c:1528 src/main/character.c:1532
+#: src/main/character.c:1593 src/main/character.c:1596
+#: src/main/connections.c:1208 src/main/connections.c:1214
+#: src/main/connections.c:1217 src/main/connections.c:1221
+#: src/main/connections.c:1367 src/main/connections.c:1383
+#: src/main/connections.c:1388 src/main/connections.c:1989
+#: src/main/connections.c:1995 src/main/connections.c:1999
+#: src/main/connections.c:2003 src/main/connections.c:2008
+#: src/main/connections.c:2659 src/main/connections.c:2664
+#: src/main/connections.c:2667 src/main/connections.c:2670
+#: src/main/connections.c:3053 src/main/connections.c:3058
+#: src/main/connections.c:3064 src/main/connections.c:3067
+#: src/main/connections.c:3071 src/main/connections.c:3086
+#: src/main/connections.c:3135 src/main/connections.c:3140
+#: src/main/connections.c:3144 src/main/connections.c:3148
+#: src/main/connections.c:3152 src/main/connections.c:3158
+#: src/main/connections.c:3203 src/main/connections.c:3209
+#: src/main/connections.c:3213 src/main/connections.c:3264
+#: src/main/connections.c:3267 src/main/connections.c:3543
+#: src/main/connections.c:3546 src/main/connections.c:3549
+#: src/main/connections.c:3555 src/main/connections.c:3662
+#: src/main/connections.c:3668 src/main/connections.c:3671
+#: src/main/connections.c:3823 src/main/connections.c:3826
+#: src/main/connections.c:3830 src/main/connections.c:3833
+#: src/main/connections.c:3954 src/main/connections.c:4085
+#: src/main/connections.c:4088 src/main/connections.c:4425
+#: src/main/connections.c:4450 src/main/connections.c:4485
+#: src/main/connections.c:4500 src/main/connections.c:4508
+#: src/main/connections.c:4534 src/main/connections.c:4680
+#: src/main/connections.c:4684 src/main/connections.c:4814
+#: src/main/connections.c:4816 src/main/connections.c:4818
+#: src/main/connections.c:4846 src/main/connections.c:4980
+#: src/main/connections.c:5019 src/main/connections.c:5024
+#: src/main/connections.c:5029 src/main/connections.c:5050
+#: src/main/context.c:607 src/main/context.c:616 src/main/context.c:620
+#: src/main/datetime.c:781 src/main/datetime.c:869 src/main/datetime.c:872
+#: src/main/datetime.c:876 src/main/datetime.c:1043 src/main/datetime.c:1045
+#: src/main/datetime.c:1250 src/main/debug.c:245 src/main/deparse.c:408
+#: src/main/dotcode.c:496 src/main/dotcode.c:500 src/main/dotcode.c:505
+#: src/main/dounzip.c:323 src/main/dounzip.c:330 src/main/dounzip.c:340
+#: src/main/dounzip.c:345 src/main/dounzip.c:349 src/main/dounzip.c:353
+#: src/main/envir.c:1752 src/main/envir.c:1755 src/main/envir.c:1876
+#: src/main/envir.c:1881 src/main/envir.c:1945 src/main/envir.c:1961
+#: src/main/envir.c:1967 src/main/envir.c:2079 src/main/envir.c:2087
+#: src/main/envir.c:2094 src/main/envir.c:2105 src/main/envir.c:2337
+#: src/main/envir.c:2458 src/main/envir.c:2755 src/main/envir.c:3022
+#: src/main/envir.c:3036 src/main/envir.c:3043 src/main/envir.c:3059
+#: src/main/envir.c:3642 src/main/errors.c:1011 src/main/eval.c:454
+#: src/main/eval.c:463 src/main/eval.c:466 src/main/grep.c:780
+#: src/main/grep.c:785 src/main/grep.c:1079 src/main/grep.c:1081
+#: src/main/grep.c:1083 src/main/grep.c:1528 src/main/grep.c:1532
+#: src/main/grep.c:1537 src/main/grep.c:2345 src/main/grep.c:2350
+#: src/main/grep.c:2652 src/main/grep.c:2657 src/main/memory.c:3823
+#: src/main/paste.c:96 src/main/paste.c:392 src/main/paste.c:399
+#: src/main/paste.c:406 src/main/paste.c:411 src/main/paste.c:416
+#: src/main/paste.c:421 src/main/paste.c:424 src/main/paste.c:432
+#: src/main/paste.c:437 src/main/paste.c:619 src/main/paste.c:624
 #: src/main/platform.c:306 src/main/platform.c:308 src/main/platform.c:310
 #: src/main/platform.c:326 src/main/platform.c:337 src/main/platform.c:390
-#: src/main/platform.c:392 src/main/platform.c:705 src/main/platform.c:707
-#: src/main/platform.c:1064 src/main/platform.c:1070 src/main/platform.c:1073
-#: src/main/platform.c:1076 src/main/platform.c:1079 src/main/platform.c:1082
-#: src/main/platform.c:1085 src/main/platform.c:1088 src/main/platform.c:1185
-#: src/main/platform.c:1188 src/main/platform.c:1191 src/main/platform.c:1229
-#: src/main/platform.c:1286 src/main/platform.c:1289 src/main/platform.c:1498
-#: src/main/platform.c:1501 src/main/platform.c:1504 src/main/platform.c:1540
-#: src/main/platform.c:1543 src/main/platform.c:1546 src/main/platform.c:1629
-#: src/main/platform.c:1645 src/main/platform.c:1684 src/main/platform.c:1686
-#: src/main/platform.c:1757 src/main/platform.c:1841 src/main/platform.c:2116
-#: src/main/platform.c:2176 src/main/platform.c:2353 src/main/platform.c:2356
-#: src/main/platform.c:2359 src/main/platform.c:2362 src/main/platform.c:2365
-#: src/main/platform.c:2368 src/main/platform.c:2568 src/main/platform.c:2571
-#: src/main/platform.c:2574 src/main/platform.c:2577 src/main/platform.c:2580
-#: src/main/platform.c:2583 src/main/platform.c:2657 src/main/platform.c:2665
-#: src/main/platform.c:2701 src/main/platform.c:2751 src/main/print.c:242
-#: src/main/print.c:248 src/main/print.c:270 src/main/print.c:276
-#: src/main/print.c:283 src/main/random.c:478 src/main/random.c:482
-#: src/main/random.c:489 src/main/random.c:517 src/main/saveload.c:1950
-#: src/main/saveload.c:1953 src/main/saveload.c:1956 src/main/saveload.c:2072
-#: src/main/saveload.c:2252 src/main/saveload.c:2257 src/main/saveload.c:2260
+#: src/main/platform.c:392 src/main/platform.c:708 src/main/platform.c:710
+#: src/main/platform.c:800 src/main/platform.c:1138 src/main/platform.c:1144
+#: src/main/platform.c:1147 src/main/platform.c:1150 src/main/platform.c:1153
+#: src/main/platform.c:1156 src/main/platform.c:1159 src/main/platform.c:1162
+#: src/main/platform.c:1259 src/main/platform.c:1262 src/main/platform.c:1265
+#: src/main/platform.c:1303 src/main/platform.c:1361 src/main/platform.c:1364
+#: src/main/platform.c:1573 src/main/platform.c:1576 src/main/platform.c:1579
+#: src/main/platform.c:1615 src/main/platform.c:1618 src/main/platform.c:1621
+#: src/main/platform.c:1657 src/main/platform.c:1690 src/main/platform.c:1692
+#: src/main/platform.c:1763 src/main/platform.c:1848 src/main/platform.c:2089
+#: src/main/platform.c:2149 src/main/platform.c:2334 src/main/platform.c:2337
+#: src/main/platform.c:2340 src/main/platform.c:2343 src/main/platform.c:2346
+#: src/main/platform.c:2349 src/main/platform.c:2555 src/main/platform.c:2558
+#: src/main/platform.c:2561 src/main/platform.c:2564 src/main/platform.c:2567
+#: src/main/platform.c:2570 src/main/platform.c:2648 src/main/platform.c:2656
+#: src/main/platform.c:2692 src/main/platform.c:2742 src/main/print.c:235
+#: src/main/print.c:241 src/main/print.c:263 src/main/print.c:269
+#: src/main/print.c:276 src/main/random.c:470 src/main/random.c:474
+#: src/main/random.c:481 src/main/random.c:509 src/main/saveload.c:1952
+#: src/main/saveload.c:1955 src/main/saveload.c:1958 src/main/saveload.c:2074
+#: src/main/saveload.c:2254 src/main/saveload.c:2259 src/main/saveload.c:2262
 #: src/main/saveload.c:2366 src/main/scan.c:684 src/main/scan.c:853
 #: src/main/scan.c:867 src/main/scan.c:871 src/main/scan.c:873
 #: src/main/scan.c:884 src/main/scan.c:911 src/main/scan.c:914
-#: src/main/scan.c:917 src/main/scan.c:972 src/main/seq.c:618
-#: src/main/seq.c:623 src/main/seq.c:631 src/main/seq.c:662 src/main/seq.c:666
-#: src/main/seq.c:672 src/main/seq.c:680 src/main/sort.c:175
-#: src/main/sysutils.c:585 src/main/sysutils.c:589 src/main/sysutils.c:593
-#: src/main/sysutils.c:599 src/main/sysutils.c:603 src/main/sysutils.c:1831
-#: src/main/sysutils.c:1835 src/main/unique.c:966 src/main/unique.c:1289
-#: src/main/unique.c:1349 src/main/unique.c:1356 src/main/unique.c:1750
-#: src/main/util.c:581 src/main/util.c:584 src/main/util.c:1825
-#: src/main/util.c:1994 src/main/util.c:1995 src/main/util.c:1996
-#: src/main/util.c:2013 src/main/util.c:2037 src/main/util.c:2041
-#: src/main/util.c:2043 src/main/util.c:2068 src/main/util.c:2070
-#: src/main/util.c:2072 src/main/util.c:2075 src/main/util.c:2078
-#: src/main/util.c:2082 src/main/util.c:2084 src/modules/X11/devX11.c:3241
-#: src/modules/X11/devX11.c:3244 src/modules/X11/devX11.c:3247
-#: src/modules/X11/devX11.c:3271 src/modules/internet/internet.c:284
-#: src/modules/internet/internet.c:290 src/modules/internet/internet.c:296
-#: src/modules/internet/internet.c:299 src/modules/internet/internet.c:303
+#: src/main/scan.c:917 src/main/scan.c:972 src/main/seq.c:622
+#: src/main/seq.c:627 src/main/seq.c:635 src/main/seq.c:666 src/main/seq.c:670
+#: src/main/seq.c:676 src/main/seq.c:684 src/main/sort.c:175
+#: src/main/sysutils.c:597 src/main/sysutils.c:601 src/main/sysutils.c:605
+#: src/main/sysutils.c:611 src/main/sysutils.c:615 src/main/sysutils.c:1787
+#: src/main/sysutils.c:1791 src/main/unique.c:1029 src/main/unique.c:1337
+#: src/main/unique.c:1341 src/main/unique.c:1351 src/main/unique.c:1747
+#: src/main/util.c:636 src/main/util.c:639 src/main/util.c:1379
+#: src/main/util.c:1393 src/main/util.c:1975 src/main/util.c:2198
+#: src/main/util.c:2199 src/main/util.c:2200 src/main/util.c:2217
+#: src/main/util.c:2245 src/main/util.c:2249 src/main/util.c:2251
+#: src/main/util.c:2277 src/main/util.c:2279 src/main/util.c:2281
+#: src/main/util.c:2284 src/main/util.c:2287 src/main/util.c:2291
+#: src/main/util.c:2293 src/modules/X11/devX11.c:3247
+#: src/modules/X11/devX11.c:3250 src/modules/X11/devX11.c:3253
+#: src/modules/X11/devX11.c:3277 src/modules/internet/internet.c:453
+#: src/modules/internet/internet.c:459 src/modules/internet/internet.c:465
+#: src/modules/internet/internet.c:468 src/modules/internet/internet.c:472
+#: src/modules/internet/internet.c:477 src/modules/internet/libcurl.c:414
+#: src/modules/internet/libcurl.c:418 src/modules/internet/libcurl.c:423
+#: src/modules/internet/libcurl.c:426 src/modules/internet/libcurl.c:430
 #: src/modules/lapack/Lapack.c:155 src/modules/lapack/Lapack.c:261
 #: src/modules/lapack/Lapack.c:709 src/modules/lapack/Lapack.c:818
-#: src/modules/lapack/Lapack.c:880 src/modules/lapack/Lapack.c:1214
-#: src/unix/sys-std.c:1217 src/unix/sys-std.c:1240
+#: src/modules/lapack/Lapack.c:880 src/modules/lapack/Lapack.c:1215
+#: src/unix/sys-std.c:1223 src/unix/sys-std.c:1246
 #, c-format
 msgid "invalid '%s' argument"
 msgstr "'%s' 引數不正確"
@@ -251,367 +256,344 @@ msgstr "'%s' 引數不正確"
 msgid "unsupported version of Windows"
 msgstr "不支援的 Windows 版本"
 
-#: src/gnuwin32/extra.c:267 src/main/apply.c:105 src/main/character.c:595
-#: src/main/connections.c:3555 src/main/context.c:642 src/main/context.c:661
-#: src/main/datetime.c:675 src/main/datetime.c:777 src/main/datetime.c:1030
-#: src/main/dotcode.c:199 src/main/errors.c:929 src/main/errors.c:962
-#: src/main/errors.c:1065 src/main/errors.c:1090 src/main/errors.c:1095
-#: src/main/errors.c:1368 src/main/identical.c:66 src/main/identical.c:67
-#: src/main/identical.c:68 src/main/identical.c:69 src/main/identical.c:70
-#: src/main/seq.c:185 src/main/seq.c:341 src/main/seq.c:346 src/main/seq.c:350
-#: src/main/seq.c:391 src/main/seq.c:395 src/main/seq.c:399
-#: src/main/sort.c:1224 src/main/sort.c:1307 src/main/sort.c:1311
-#: src/main/sort.c:1318 src/main/sort.c:1393 src/main/source.c:220
-#: src/main/summary.c:886 src/main/sysutils.c:251 src/main/util.c:986
-#: src/main/util.c:991 src/main/util.c:998 src/main/util.c:1001
-#: src/modules/X11/devX11.c:3142 src/modules/X11/devX11.c:3169
-#: src/modules/X11/devX11.c:3174 src/modules/X11/devX11.c:3179
-#: src/modules/X11/devX11.c:3189 src/modules/X11/devX11.c:3194
-#: src/modules/X11/devX11.c:3198 src/modules/X11/devX11.c:3202
-#: src/unix/sys-std.c:1291
-#, c-format
-msgid "invalid '%s' value"
-msgstr "'%s' 值不正確"
-
-#: src/gnuwin32/extra.c:308 src/gnuwin32/extra.c:321
+#: src/gnuwin32/extra.c:313 src/gnuwin32/extra.c:324
 msgid "incorrect argument"
 msgstr "引數不正確"
 
-#: src/gnuwin32/extra.c:312
+#: src/gnuwin32/extra.c:316
 msgid "don't be silly!: your machine has a 4Gb address limit"
 msgstr "別傻了!:您的機器有 4Gb 的位址上限"
 
-#: src/gnuwin32/extra.c:316
+#: src/gnuwin32/extra.c:320
 msgid "cannot decrease memory limit: ignored"
 msgstr "無法減少記憶體限制:已忽略"
 
-#: src/gnuwin32/extra.c:428 src/gnuwin32/extra.c:529 src/main/util.c:897
+#: src/gnuwin32/extra.c:427 src/gnuwin32/extra.c:528 src/main/util.c:962
 msgid "'path' must be a character vector"
 msgstr "'path' 必須是字元向量"
 
-#: src/gnuwin32/extra.c:579 src/gnuwin32/extra.c:581 src/gnuwin32/extra.c:604
-#: src/gnuwin32/extra.c:606 src/gnuwin32/extra.c:641 src/main/gevents.c:61
+#: src/gnuwin32/extra.c:576 src/gnuwin32/extra.c:578 src/gnuwin32/extra.c:601
+#: src/gnuwin32/extra.c:603 src/gnuwin32/extra.c:638 src/main/gevents.c:61
 #: src/main/gevents.c:98
 msgid "invalid device"
 msgstr "無效裝置"
 
-#: src/gnuwin32/extra.c:582
+#: src/gnuwin32/extra.c:579
 msgid "requires SDI mode"
 msgstr "需要用 SDI 模式"
 
-#: src/gnuwin32/extra.c:635 src/main/gevents.c:58 src/main/gevents.c:95
+#: src/gnuwin32/extra.c:632 src/main/gevents.c:58 src/main/gevents.c:95
 msgid "invalid graphical device number"
 msgstr "無效的繪圖裝置號碼"
 
-#: src/gnuwin32/extra.c:645
+#: src/gnuwin32/extra.c:642
 msgid "bad device"
 msgstr "不當裝置"
 
-#: src/gnuwin32/extra.c:799 src/gnuwin32/extra.c:807
+#: src/gnuwin32/extra.c:796 src/gnuwin32/extra.c:804
 #, fuzzy
 msgid "invalid input in 'Rmbstowcs'"
 msgstr "Rmbstowcs 中的輸入無效"
 
-#: src/gnuwin32/extra.c:830 src/main/platform.c:1261
+#: src/gnuwin32/extra.c:827 src/main/platform.c:1336
 msgid "file choice cancelled"
 msgstr "已取消檔案選擇"
 
-#: src/gnuwin32/run.c:242
+#: src/gnuwin32/run.c:244
 #, fuzzy, c-format
 msgid "'CreateProcess' failed to run '%s'"
 msgstr "CreateProcess 無法運行 '%s'"
 
-#: src/gnuwin32/run.c:344
+#: src/gnuwin32/run.c:346
 msgid "Child process not responding.  R will terminate it."
 msgstr "子進程沒有反應。 R 將會終止它。"
 
-#: src/gnuwin32/run.c:402
+#: src/gnuwin32/run.c:404
 #, c-format
 msgid "Exit code was %d"
 msgstr "離開代碼是 %d"
 
-#: src/gnuwin32/run.c:434
+#: src/gnuwin32/run.c:436
 msgid "Insufficient memory (rpipeOpen)"
 msgstr "沒有足夠的記憶體 (rpipeOpen)"
 
-#: src/gnuwin32/run.c:648 src/main/dounzip.c:482
+#: src/gnuwin32/run.c:650 src/main/dounzip.c:481
 msgid "seek not enabled for this connection"
 msgstr "這個連結上不能使用搜索"
 
-#: src/gnuwin32/run.c:654
+#: src/gnuwin32/run.c:656
 msgid "truncate not enabled for this connection"
 msgstr "這個連結不能使用截短"
 
-#: src/gnuwin32/run.c:729 src/gnuwin32/run.c:733 src/gnuwin32/run.c:746
-#: src/gnuwin32/run.c:774 src/main/connections.c:1330
-#: src/main/connections.c:1334 src/main/connections.c:1340
-#: src/main/connections.c:1354
+#: src/gnuwin32/run.c:731 src/gnuwin32/run.c:735 src/gnuwin32/run.c:748
+#: src/gnuwin32/run.c:776 src/main/connections.c:1322
+#: src/main/connections.c:1326 src/main/connections.c:1332
+#: src/main/connections.c:1346
 msgid "allocation of pipe connection failed"
 msgstr "管道連結配置失敗"
 
-#: src/gnuwin32/run.c:788
+#: src/gnuwin32/run.c:790
 #, fuzzy
 msgid "'names' is not a character vector"
 msgstr "'fmt' 並非字元向量"
 
-#: src/gnuwin32/sys-win32.c:182
+#: src/gnuwin32/sys-win32.c:180
 msgid "character string expected as first argument"
 msgstr "第一個引數應當是字串"
 
-#: src/gnuwin32/sys-win32.c:191
+#: src/gnuwin32/sys-win32.c:189
 msgid "character string expected as third argument"
 msgstr "第三個引數應當是字串"
 
-#: src/gnuwin32/sys-win32.c:257 src/unix/sys-unix.c:299
+#: src/gnuwin32/sys-win32.c:255 src/unix/sys-unix.c:312
 #, c-format
 msgid "running command '%s' had status %d"
 msgstr "執行中命令 '%s' 已有狀態 %d"
 
-#: src/gnuwin32/system.c:122 src/unix/sys-unix.c:427
+#: src/gnuwin32/system.c:121 src/unix/sys-unix.c:440
 msgid "reached session elapsed time limit"
 msgstr "達到了作業階段經過時間的限制"
 
-#: src/gnuwin32/system.c:124 src/unix/sys-unix.c:429
+#: src/gnuwin32/system.c:123 src/unix/sys-unix.c:442
 msgid "reached elapsed time limit"
 msgstr "達到了經過時間的限制"
 
-#: src/gnuwin32/system.c:130 src/unix/sys-unix.c:435
+#: src/gnuwin32/system.c:129 src/unix/sys-unix.c:448
 msgid "reached session CPU time limit"
 msgstr "達到了作業階段 CPU 時間的限制"
 
-#: src/gnuwin32/system.c:132 src/unix/sys-unix.c:437
+#: src/gnuwin32/system.c:131 src/unix/sys-unix.c:450
 msgid "reached CPU time limit"
 msgstr "達到了 CPU 時間的限制"
 
-#: src/gnuwin32/system.c:157
+#: src/gnuwin32/system.c:156
 #, c-format
 msgid "Fatal error: %s\n"
 msgstr "嚴重錯誤:%s\n"
 
-#: src/gnuwin32/system.c:335 src/unix/sys-std.c:863
+#: src/gnuwin32/system.c:334 src/unix/sys-std.c:866
 #, c-format
 msgid "encoding '%s' is not recognised"
 msgstr "編碼 '%s' 無法確認"
 
-#: src/gnuwin32/system.c:341 src/unix/sys-std.c:869
+#: src/gnuwin32/system.c:340 src/unix/sys-std.c:872
 #, c-format
 msgid "<ERROR: re-encoding failure from encoding '%s'>\n"
 msgstr "<錯誤:從編碼 '%s' 重新編碼時失敗>\n"
 
-#: src/gnuwin32/system.c:555 src/gnuwin32/system.c:1049
-#: src/gnuwin32/system.c:1061 src/main/connections.c:590
-#: src/main/connections.c:595 src/main/dounzip.c:177 src/main/saveload.c:1961
-#: src/main/serialize.c:2552 src/main/serialize.c:2557
-#: src/main/serialize.c:2642 src/main/serialize.c:2687 src/unix/system.c:323
-#: src/unix/system.c:343
+#: src/gnuwin32/system.c:562 src/gnuwin32/system.c:1058
+#: src/gnuwin32/system.c:1070 src/main/connections.c:581
+#: src/main/connections.c:586 src/main/dounzip.c:178 src/main/saveload.c:1963
+#: src/main/serialize.c:2598 src/main/serialize.c:2603
+#: src/main/serialize.c:2688 src/main/serialize.c:2733 src/unix/system.c:328
 #, c-format
 msgid "cannot open file '%s': %s"
 msgstr "無法開啟檔案 '%s' :%s"
 
-#: src/gnuwin32/system.c:569
+#: src/gnuwin32/system.c:576
 #, c-format
 msgid "file.show(): file '%s' does not exist\n"
 msgstr "file.show(): 檔案 '%s' 不存在\n"
 
-#: src/gnuwin32/system.c:970
+#: src/gnuwin32/system.c:979
 #, fuzzy, c-format
 msgid "WARNING: R_MAX_MEM_SIZE value is invalid: ignored\n"
 msgstr "警告:'%s' 值無效:已忽略"
 
-#: src/gnuwin32/system.c:1002
+#: src/gnuwin32/system.c:1011
 msgid "WARNING: no max-mem-size given\n"
 msgstr "警告: max-mem-size 沒有定義\n"
 
-#: src/gnuwin32/system.c:1009
+#: src/gnuwin32/system.c:1018
 #, c-format
 msgid "WARNING: --max-mem-size value is invalid: ignored\n"
 msgstr "警告: --max-mem-size 值不正確: 忽略不用\n"
 
-#: src/gnuwin32/system.c:1012
+#: src/gnuwin32/system.c:1021
 #, c-format
 msgid "WARNING: --max-mem-size=%lu%c: too large and ignored\n"
 msgstr "警告:--max-mem-size=%lu%c:太大因而忽略\n"
 
-#: src/gnuwin32/system.c:1018
+#: src/gnuwin32/system.c:1027
 #, c-format
 msgid "WARNING: --max-mem-size=%4.1fM: too small and ignored\n"
 msgstr "警告:--max-mem-size=%4.1fM:太小因而忽略\n"
 
-#: src/gnuwin32/system.c:1023
+#: src/gnuwin32/system.c:1032
 #, c-format
 msgid "WARNING: --max-mem-size=%4.0fM: too large and taken as %uM\n"
 msgstr "警告:--max-mem-size=%4.0fM:太大因而視為 %uM\n"
 
-#: src/gnuwin32/system.c:1039
+#: src/gnuwin32/system.c:1048
 #, fuzzy, c-format
 msgid "option '%s' requires an argument"
 msgstr "二元運算需要兩個引數"
 
-#: src/gnuwin32/system.c:1070
+#: src/gnuwin32/system.c:1079
 #, fuzzy, c-format
 msgid "option '%s' requires a non-empty argument"
 msgstr "二元運算需要兩個引數"
 
-#: src/gnuwin32/system.c:1078 src/unix/system.c:362
+#: src/gnuwin32/system.c:1087 src/unix/system.c:347
 #, c-format
 msgid "WARNING: '-e %s' omitted as input is too long\n"
 msgstr "警告:'-e %s' 因為輸入太長而被省略\n"
 
-#: src/gnuwin32/system.c:1082 src/unix/system.c:375
+#: src/gnuwin32/system.c:1091 src/unix/system.c:360
 #, c-format
 msgid "WARNING: unknown option '%s'\n"
 msgstr "警告: 沒有 '%s' 這樣的選項\n"
 
-#: src/gnuwin32/system.c:1104 src/unix/system.c:379
+#: src/gnuwin32/system.c:1113 src/unix/system.c:364
 #, c-format
 msgid "ARGUMENT '%s' __ignored__\n"
 msgstr "引數 '%s' 忽略不用\n"
 
-#: src/gnuwin32/system.c:1110 src/unix/system.c:386
+#: src/gnuwin32/system.c:1119 src/unix/system.c:371
 msgid "cannot use -e with -f or --file"
 msgstr "無法將 -e 與 -f 或 --file 共同使用"
 
-#: src/gnuwin32/system.c:1128
+#: src/gnuwin32/system.c:1137
 msgid "creation of tmpfile failed -- set TMPDIR suitably?"
 msgstr "建立暫存檔時失敗 -- 已適當設定了 TMPDIR?"
 
-#: src/gnuwin32/system.c:1147 src/unix/system.c:437
+#: src/gnuwin32/system.c:1156 src/unix/system.c:422
 msgid "you must specify '--save', '--no-save' or '--vanilla'"
 msgstr "您必須指定 '--save'、'--no-save' 或 '--vanilla' 其中的一個"
 
-#: src/gnuwin32/system.c:1152
+#: src/gnuwin32/system.c:1161
 msgid ""
 "impossible to create 'reader thread'; you must free some system resources"
 msgstr "無法建立 'reader thread';您必須釋放一些系統資源"
 
-#: src/include/Errormsg.h:25 src/main/subscript.c:375 src/main/subscript.c:393
-#: src/main/subscript.c:417 src/main/subscript.c:456 src/main/subscript.c:584
-#: src/main/subscript.c:623 src/main/subscript.c:766
+#: src/include/Errormsg.h:27 src/main/subscript.c:383 src/main/subscript.c:401
+#: src/main/subscript.c:425 src/main/subscript.c:464 src/main/subscript.c:662
+#: src/main/subscript.c:701 src/main/subscript.c:844
 msgid "subscript out of bounds"
 msgstr "下標超出邊界"
 
-#: src/include/Errormsg.h:26
+#: src/include/Errormsg.h:28
 #, c-format
 msgid "object of type '%s' is not subsettable"
 msgstr "'%s' 類型的物件無法具有子集合"
 
-#: src/main/CommandLineArgs.c:170
+#: src/main/CommandLineArgs.c:171
 msgid "WARNING: no value given for --encoding"
 msgstr "警告:沒有設定 --enconding 的值"
 
-#: src/main/CommandLineArgs.c:195
+#: src/main/CommandLineArgs.c:196
 #, c-format
 msgid "WARNING: option '%s' no longer supported"
 msgstr "警告:不再支援選項 '%s'"
 
-#: src/main/CommandLineArgs.c:206
+#: src/main/CommandLineArgs.c:207
 #, c-format
 msgid "WARNING: no value given for '%s'"
 msgstr "警告:沒有設定 '%s' 的值"
 
-#: src/main/CommandLineArgs.c:216
+#: src/main/CommandLineArgs.c:217
 #, c-format
 msgid "WARNING: '%s' value is invalid: ignored"
 msgstr "警告:'%s' 值無效:已忽略"
 
-#: src/main/CommandLineArgs.c:220
+#: src/main/CommandLineArgs.c:221
 #, c-format
 msgid "WARNING: %s: too large and ignored"
 msgstr "警告:%s:過大因而忽略"
 
-#: src/main/CommandLineArgs.c:234
+#: src/main/CommandLineArgs.c:235
 msgid "WARNING: no value given for '--max-ppsize'"
 msgstr "警告:沒有設定 '--max-ppsize' 的值"
 
-#: src/main/CommandLineArgs.c:239
+#: src/main/CommandLineArgs.c:240
 msgid "WARNING: '--max-ppsize' value is negative: ignored"
 msgstr "警告:'--max-ppsize' 值是負數:已忽略"
 
-#: src/main/CommandLineArgs.c:241
+#: src/main/CommandLineArgs.c:242
 msgid "WARNING: '--max-ppsize' value is too small: ignored"
 msgstr "警告:'--max-ppsize' 的值太小:已忽略"
 
-#: src/main/CommandLineArgs.c:244
+#: src/main/CommandLineArgs.c:245
 msgid "WARNING: '--max-ppsize' value is too large: ignored"
 msgstr "警告:'--max-ppsize' 的值太大:已忽略"
 
-#: src/main/RNG.c:175
+#: src/main/RNG.c:176
 #, c-format
 msgid "unif_rand: unimplemented RNG kind %d"
 msgstr "unif_rand: RNG 類型 %d 尚未實作"
 
-#: src/main/RNG.c:260
+#: src/main/RNG.c:261
 #, c-format
 msgid "FixupSeeds: unimplemented RNG kind %d"
 msgstr "FixupSeeds: RNG 類型 %d 尚未實作"
 
-#: src/main/RNG.c:302
+#: src/main/RNG.c:301
 msgid "'user_unif_rand' not in load table"
 msgstr "'user_unif_rand' 在載入表中並不存在"
 
-#: src/main/RNG.c:310
+#: src/main/RNG.c:309
 msgid "cannot read seeds unless 'user_unif_nseed' is supplied"
 msgstr "只有在設定了 'user_unif_nseed' 以後才能讀隨機種子"
 
-#: src/main/RNG.c:315
+#: src/main/RNG.c:314
 msgid "seed length must be in 0...625; ignored"
 msgstr "隨機種子的長度必須在 0 到 625 之間; 忽略不用"
 
-#: src/main/RNG.c:323
+#: src/main/RNG.c:322
 #, c-format
 msgid "RNG_Init: unimplemented RNG kind %d"
 msgstr "RNG_Init: RNG 類型 %d 尚未實作"
 
-#: src/main/RNG.c:354
+#: src/main/RNG.c:351
 #, fuzzy
 msgid "'.Random.seed' is a missing argument with no default"
 msgstr ".Random.seed 這個引數沒有設定也沒有預設值"
 
-#: src/main/RNG.c:355
+#: src/main/RNG.c:352
 #, fuzzy, c-format
 msgid "'.Random.seed' is not an integer vector but of type '%s', so ignored"
 msgstr ".Random.seed 不是整數向量而是類型 '%s'"
 
-#: src/main/RNG.c:363
+#: src/main/RNG.c:360
 #, fuzzy
 msgid "'.Random.seed[1]' is not a valid integer, so ignored"
 msgstr ".Random.seed[1] 不是有效的整數"
 
-#: src/main/RNG.c:369
+#: src/main/RNG.c:366
 #, fuzzy
 msgid "'.Random.seed[1]' is not a valid Normal type, so ignored"
 msgstr ".Random.seed[0] 不是正確的 Normal 類別"
 
-#: src/main/RNG.c:383
+#: src/main/RNG.c:380
 #, fuzzy
 msgid "'.Random.seed[1] = 5' but no user-supplied generator, so ignored"
 msgstr ".Random.seed[1]=5 但沒有使用者指定的產生器"
 
-#: src/main/RNG.c:388
+#: src/main/RNG.c:385
 #, fuzzy
 msgid "'.Random.seed[1]' is not a valid RNG kind so ignored"
 msgstr ".Random.seed[1] 不是正確的 RNG 類別 (程式碼)"
 
-#: src/main/RNG.c:415
+#: src/main/RNG.c:412
 #, fuzzy
 msgid "'.Random.seed' has wrong length"
 msgstr ".Random.seed 的長度不正確"
 
-#: src/main/RNG.c:468
+#: src/main/RNG.c:465
 #, c-format
 msgid "RNGkind: unimplemented RNG kind %d"
 msgstr "RNGkind: RNG 類型 %d 尚未實作"
 
-#: src/main/RNG.c:488
+#: src/main/RNG.c:485
 #, fuzzy
 msgid "invalid Normal type in 'RNGkind'"
 msgstr "RNGkind 中的 Normal 類別不正確"
 
-#: src/main/RNG.c:491
+#: src/main/RNG.c:488
 msgid "'user_norm_rand' not in load table"
 msgstr "'user_norm_rand' 不在載入表中"
 
-#: src/main/RNG.c:535
+#: src/main/RNG.c:532
 msgid "supplied seed is not a valid integer"
 msgstr "提供的隨機種子不是正確的整數"
 
@@ -637,7 +619,7 @@ msgstr "DLLname '%s' 太長"
 msgid "could not allocate space for 'name'"
 msgstr "無法為 'name' 配置空間"
 
-#: src/main/Rdynload.c:881 src/main/Rdynload.c:897 src/main/util.c:698
+#: src/main/Rdynload.c:881 src/main/Rdynload.c:897 src/main/util.c:762
 msgid "character argument expected"
 msgstr "需要字元引數"
 
@@ -656,33 +638,34 @@ msgid "shared object '%s' was not loaded"
 msgstr "沒有載入共享物件 '%s'"
 
 #: src/main/Rdynload.c:979
-#, c-format
-msgid "cannot allocate memory for registered native symbol (%d bytes)"
-msgstr "無法給已登記的原生符號 (%d 位元組) 配置記憶體"
+#, fuzzy, c-format
+msgid "cannot allocate memory for registered native symbol (%d byte)"
+msgid_plural "cannot allocate memory for registered native symbol (%d bytes)"
+msgstr[0] "無法給已登記的原生符號 (%d 位元組) 配置記憶體"
 
-#: src/main/Rdynload.c:1100 src/main/Rdynload.c:1321
+#: src/main/Rdynload.c:1102 src/main/Rdynload.c:1323
 msgid "must pass package name or DllInfo reference"
 msgstr "必須傳給套件名稱或 DllInfo 參照"
 
-#: src/main/Rdynload.c:1197
+#: src/main/Rdynload.c:1199
 #, fuzzy, c-format
 msgid "unimplemented type %d in 'createRSymbolObject'"
 msgstr "createRSymbolObject 中的類型 %d 尚未被實作"
 
-#: src/main/Rdynload.c:1279 src/main/Rdynload.c:1373
+#: src/main/Rdynload.c:1281 src/main/Rdynload.c:1375
 msgid "R_getRegisteredRoutines() expects a DllInfo reference"
 msgstr "R_getRegisteredRoutines() 需要 DllInfo 參考"
 
-#: src/main/Rdynload.c:1282 src/main/Rdynload.c:1376
+#: src/main/Rdynload.c:1284 src/main/Rdynload.c:1378
 msgid "NULL value passed for DllInfo"
 msgstr "傳給 DllInfo 一個 NULL 值"
 
-#: src/main/Rdynload.c:1436
+#: src/main/Rdynload.c:1441
 #, c-format
 msgid "function '%s' not provided by package '%s'"
 msgstr "函數 '%s' 未由套件 '%s' 所提供"
 
-#: src/main/Rdynload.c:1438
+#: src/main/Rdynload.c:1443
 msgid "table entry must be an external pointer"
 msgstr "表格條目必須是一個外部指標"
 
@@ -691,9 +674,9 @@ msgstr "表格條目必須是一個外部指標"
 msgid "problem in setting variable '%s' in Renviron"
 msgstr "設定時區時發生問題"
 
-#: src/main/Renviron.c:311
-#, fuzzy
-msgid "argument 'x' must be a character string"
+#: src/main/Renviron.c:311 src/main/objects.c:1174 src/main/raw.c:155
+#, fuzzy, c-format
+msgid "argument '%s' must be a character string"
 msgstr "引數 'code' 必須是字串"
 
 #: src/main/Renviron.c:315
@@ -701,93 +684,120 @@ msgstr "引數 'code' 必須是字串"
 msgid "file '%s' cannot be opened for reading"
 msgstr "zip 檔案 '%s' 無法開啟"
 
-#: src/main/Rstrptime.h:517 src/main/Rstrptime.h:984
+#: src/main/Rstrptime.h:524 src/main/Rstrptime.h:991
 #, c-format
 msgid "use of %s for input is not supported"
 msgstr "使用 %s 做為輸入未被支援"
 
-#: src/main/Rstrptime.h:1242
+#: src/main/Rstrptime.h:1263
 msgid "input string is too long"
 msgstr "輸入字串太長"
 
-#: src/main/Rstrptime.h:1244
+#: src/main/Rstrptime.h:1265
 msgid "invalid multibyte input string"
 msgstr "無效的多位元組輸入字串"
 
-#: src/main/Rstrptime.h:1247
+#: src/main/Rstrptime.h:1268
 msgid "format string is too long"
 msgstr "格式字串太長"
 
-#: src/main/Rstrptime.h:1249
+#: src/main/Rstrptime.h:1270
 msgid "invalid multibyte format string"
 msgstr "無效的多位元組格式字串"
 
-#: src/main/agrep.c:133 src/main/agrep.c:777 src/main/character.c:1039
-#: src/main/character.c:1043 src/main/grep.c:769 src/main/grep.c:1512
-#: src/main/grep.c:1516 src/main/grep.c:2325 src/main/grep.c:2623
+#: src/main/agrep.c:133 src/main/agrep.c:778 src/main/character.c:1291
+#: src/main/character.c:1295 src/main/grep.c:782 src/main/grep.c:1530
+#: src/main/grep.c:1534 src/main/grep.c:2347 src/main/grep.c:2654
 #, c-format
 msgid "argument '%s' has length > 1 and only the first element will be used"
 msgstr "引數 '%s' 長度 > 1 且只有第一個元素將被使用"
 
-#: src/main/agrep.c:189 src/main/agrep.c:818
+#: src/main/agrep.c:190 src/main/agrep.c:820
 msgid "'pattern' must be a non-empty character string"
 msgstr "'pattern' 必須是非空字串"
 
-#: src/main/agrep.c:200 src/main/agrep.c:827 src/main/grep.c:838
-#: src/main/grep.c:2381 src/main/grep.c:2662
+#: src/main/agrep.c:201 src/main/agrep.c:829 src/main/grep.c:853
+#: src/main/grep.c:2405 src/main/grep.c:2707
 msgid "regular expression is invalid in this locale"
 msgstr "正規表示式不適用於此語言環境"
 
-#: src/main/agrep.c:206 src/main/agrep.c:623
+#: src/main/agrep.c:207 src/main/agrep.c:624
 #, c-format
 msgid "regcomp error:  '%s'"
 msgstr "正規表示式編譯錯誤:'%s'"
 
-#: src/main/agrep.c:238 src/main/agrep.c:871 src/main/grep.c:227
-#: src/main/grep.c:315 src/main/grep.c:423 src/main/grep.c:578
-#: src/main/grep.c:889 src/main/grep.c:2480 src/main/grep.c:2548
-#: src/main/grep.c:2698
+#: src/main/agrep.c:239 src/main/agrep.c:874 src/main/grep.c:233
+#: src/main/grep.c:323 src/main/grep.c:434 src/main/grep.c:590
+#: src/main/grep.c:907 src/main/grep.c:2510 src/main/grep.c:2579
+#: src/main/grep.c:2744
 #, c-format
 msgid "input string %d is invalid in this locale"
 msgstr "輸入的字串 %d 不適用於此語言環境"
 
-#: src/main/agrep.c:525 src/main/agrep.c:765 src/main/grep.c:155
-#: src/main/grep.c:760 src/main/grep.c:762 src/main/grep.c:1047
-#: src/main/grep.c:1055 src/main/grep.c:1503 src/main/grep.c:1505
-#: src/main/grep.c:2315 src/main/grep.c:2317 src/main/grep.c:2611
+#: src/main/agrep.c:526 src/main/agrep.c:766 src/main/grep.c:159
+#: src/main/grep.c:773 src/main/grep.c:775 src/main/grep.c:1065
+#: src/main/grep.c:1073 src/main/grep.c:1521 src/main/grep.c:1523
+#: src/main/grep.c:2337 src/main/grep.c:2339 src/main/grep.c:2642
 #, c-format
 msgid "argument '%s' will be ignored"
 msgstr "引數 '%s' 將被忽略"
 
-#: src/main/agrep.c:614
+#: src/main/agrep.c:615
 #, c-format
 msgid "input string x[%d] is invalid in this locale"
 msgstr "輸入字串 x[%d] 在這個語區中無效"
 
-#: src/main/agrep.c:660
+#: src/main/agrep.c:661
 #, c-format
 msgid "input string y[%d] is invalid in this locale"
 msgstr "輸入字串 y[%d] 在這個語區無效"
 
-#: src/main/agrep.c:833 src/main/grep.c:2668
+#: src/main/agrep.c:835 src/main/grep.c:2713
 #, c-format
 msgid "regcomp error: '%s'"
 msgstr "正規表示式編譯錯誤:'%s'"
 
-#: src/main/apply.c:103
+#: src/main/apply.c:98
 #, fuzzy
 msgid "'FUN.VALUE' must be a vector"
 msgstr "FUN.VALUE 必須是向量"
 
-#: src/main/apply.c:108 src/main/complex.c:758
+#: src/main/apply.c:100 src/main/array.c:506 src/main/character.c:847
+#: src/main/character.c:1655 src/main/connections.c:3551
+#: src/main/context.c:653 src/main/context.c:672 src/main/datetime.c:681
+#: src/main/datetime.c:783 src/main/datetime.c:1047 src/main/dotcode.c:222
+#: src/main/errors.c:910 src/main/errors.c:943 src/main/errors.c:1049
+#: src/main/errors.c:1074 src/main/errors.c:1079 src/main/errors.c:1349
+#: src/main/identical.c:66 src/main/identical.c:67 src/main/identical.c:68
+#: src/main/identical.c:69 src/main/identical.c:70 src/main/platform.c:2982
+#: src/main/seq.c:192 src/main/seq.c:343 src/main/seq.c:348 src/main/seq.c:352
+#: src/main/seq.c:397 src/main/seq.c:401 src/main/seq.c:405
+#: src/main/sort.c:1244 src/main/sort.c:1327 src/main/sort.c:1331
+#: src/main/sort.c:1338 src/main/source.c:225 src/main/summary.c:954
+#: src/main/sysutils.c:250 src/main/util.c:1051 src/main/util.c:1056
+#: src/main/util.c:1063 src/main/util.c:1066 src/main/util.c:2035
+#: src/modules/X11/devX11.c:3148 src/modules/X11/devX11.c:3175
+#: src/modules/X11/devX11.c:3180 src/modules/X11/devX11.c:3185
+#: src/modules/X11/devX11.c:3195 src/modules/X11/devX11.c:3200
+#: src/modules/X11/devX11.c:3204 src/modules/X11/devX11.c:3208
+#, c-format
+msgid "invalid '%s' value"
+msgstr "'%s' 值不正確"
+
+#: src/main/apply.c:103 src/main/complex.c:753
 msgid "invalid length"
 msgstr "長度不正確"
 
-#: src/main/apply.c:113
+#: src/main/apply.c:108
 msgid "long vectors are not supported for matrix/array results"
 msgstr ""
 
-#: src/main/apply.c:162
+#: src/main/apply.c:115
+#, c-format
+msgid "type '%s' is not supported"
+msgstr "類型 '%s' 未被支援"
+
+#: src/main/apply.c:163
 #, c-format
 msgid ""
 "values must be length %d,\n"
@@ -796,7 +806,7 @@ msgstr ""
 "值的長度必須是 %d,\n"
 "但是 FUN(X[[%d]]) 的結果長度是 %d"
 
-#: src/main/apply.c:174
+#: src/main/apply.c:175
 #, c-format
 msgid ""
 "values must be type '%s',\n"
@@ -805,17 +815,12 @@ msgstr ""
 "值的類型必須是 '%s',\n"
 "但是 FUN(X[[%d]]) 的結果類型是 '%s'"
 
-#: src/main/apply.c:193
-#, c-format
-msgid "type '%s' is not supported"
-msgstr "類型 '%s' 未被支援"
-
-#: src/main/apply.c:225
+#: src/main/apply.c:252
 #, c-format
 msgid "dimnames(<value>) is neither NULL nor list of length %d"
 msgstr "dimnames(<值>) 既不是空值也不是長度 %d 的串列"
 
-#: src/main/arithmetic.c:42
+#: src/main/arithmetic.c:42 src/main/eval.c:3633
 msgid "NaNs produced"
 msgstr "產生了 NaNs"
 
@@ -824,469 +829,481 @@ msgstr "產生了 NaNs"
 msgid "non-numeric argument to mathematical function"
 msgstr "數學函數中使用了非數值引數"
 
-#: src/main/arithmetic.c:187
+#: src/main/arithmetic.c:186
 msgid "probable complete loss of accuracy in modulus"
 msgstr "係數的精確度很可能完全損失"
 
-#: src/main/arithmetic.c:337
+#: src/main/arithmetic.c:298
 msgid "NAs produced by integer overflow"
 msgstr "整數向上溢位產生了 NA"
 
-#: src/main/arithmetic.c:538
+#: src/main/arithmetic.c:499
 msgid "operator needs one or two arguments"
 msgstr "運算子需要一或兩個引數"
 
-#: src/main/arithmetic.c:554
+#: src/main/arithmetic.c:515
 msgid "non-numeric argument to binary operator"
 msgstr "二元運算子中有非數值引數"
 
-#: src/main/arithmetic.c:615 src/main/relop.c:227
+#: src/main/arithmetic.c:576 src/main/relop.c:221
 msgid "non-conformable arrays"
 msgstr "非調和陣列"
 
-#: src/main/arithmetic.c:658
+#: src/main/arithmetic.c:619
 msgid "non-conformable time-series"
 msgstr "非調和時間序列"
 
-#: src/main/arithmetic.c:680 src/main/logic.c:143 src/main/relop.c:166
-#: src/main/relop.c:265
+#: src/main/arithmetic.c:641 src/main/logic.c:135 src/main/relop.c:160
+#: src/main/relop.c:259
 msgid "longer object length is not a multiple of shorter object length"
 msgstr "較長的物件長度並非較短物件長度的倍數"
 
-#: src/main/arithmetic.c:751
+#: src/main/arithmetic.c:712
 msgid "invalid argument to unary operator"
 msgstr "一元運算子的引數不正確"
 
-#: src/main/arithmetic.c:780 src/main/arithmetic.c:805
-#: src/main/arithmetic.c:824
+#: src/main/arithmetic.c:741 src/main/arithmetic.c:766
+#: src/main/arithmetic.c:785
 msgid "invalid unary operator"
 msgstr "一元運算子不正確"
 
-#: src/main/arithmetic.c:1241
+#: src/main/arithmetic.c:1191
 msgid "unimplemented real function of 1 argument"
 msgstr "單引數的實數函數目前還沒有實作"
 
-#: src/main/arithmetic.c:1255 src/main/complex.c:648 src/main/complex.c:718
+#: src/main/arithmetic.c:1205 src/main/complex.c:638 src/main/complex.c:708
 msgid "unimplemented complex function"
 msgstr "尚未實作複數功能"
 
-#: src/main/arithmetic.c:1526 src/main/arithmetic.c:1877
-#: src/main/arithmetic.c:2056 src/main/arithmetic.c:2168
+#: src/main/arithmetic.c:1484 src/main/arithmetic.c:1877
+#: src/main/arithmetic.c:2049 src/main/arithmetic.c:2152
 #, c-format
 msgid "unimplemented real function of %d numeric arguments"
 msgstr "%d 個數值引數的實數函數尚未實作"
 
-#: src/main/arithmetic.c:1552
-#, c-format
-msgid "%d arguments passed to '%s' which requires 1 or 2"
-msgstr "%d 個引數傳遞給 '%s',但它最多只能用兩個引數"
+#: src/main/arithmetic.c:1511
+#, fuzzy, c-format
+msgid "%d argument passed to '%s' which requires 1 or 2 arguments"
+msgid_plural "%d arguments passed to '%s'which requires 1 or 2 arguments"
+msgstr[0] "%d 個引數傳遞給 '%s',但它最多只能用兩個引數"
 
-#: src/main/arithmetic.c:1570
+#: src/main/arithmetic.c:1530
 msgid "invalid second argument of length 0"
 msgstr "第二引數長度為 0,不正確"
 
-#: src/main/arithmetic.c:1639
+#: src/main/arithmetic.c:1625 src/main/arithmetic.c:1643 src/main/envir.c:1464
+#: src/main/envir.c:1972 src/main/eval.c:630 src/main/eval.c:4237
+#, c-format
+msgid "argument \"%s\" is missing, with no default"
+msgstr "缺少引數 \"%s\",也沒有預設值"
+
+#: src/main/arithmetic.c:1649
 msgid "invalid argument 'base' of length 0"
 msgstr "長度為 0 的無效引數 '基底'"
 
-#: src/main/arithmetic.c:1647
-#, c-format
-msgid "%d arguments passed to 'log' which requires 1 or 2"
-msgstr "給了 'log' %d 個引數,但它最多只能用兩個引數"
-
-#: src/main/array.c:79 src/main/array.c:1441
+#: src/main/array.c:82 src/main/array.c:1591
 #, fuzzy, c-format
 msgid "'data' must be of a vector type, was '%s'"
 msgstr "'data' 必須是向量類型"
 
-#: src/main/array.c:94 src/main/array.c:102
+#: src/main/array.c:97 src/main/array.c:105
 msgid "non-numeric matrix extent"
 msgstr "非數值的矩陣範圍"
 
-#: src/main/array.c:97 src/main/array.c:1535
+#: src/main/array.c:100 src/main/array.c:1695
 msgid "invalid 'nrow' value (too large or NA)"
 msgstr "無效的 'nrow' 值 (太大或無法取得)"
 
-#: src/main/array.c:99 src/main/array.c:1537
+#: src/main/array.c:102 src/main/array.c:1697
 msgid "invalid 'nrow' value (< 0)"
 msgstr "無效的 'nrow' 值 (< 0)"
 
-#: src/main/array.c:105 src/main/array.c:1540
+#: src/main/array.c:108 src/main/array.c:1700
 msgid "invalid 'ncol' value (too large or NA)"
 msgstr "無效的 'ncol' 值 (太大或無法取得)"
 
-#: src/main/array.c:107 src/main/array.c:1542
+#: src/main/array.c:110 src/main/array.c:1702
 msgid "invalid 'ncol' value (< 0)"
 msgstr "無效的 'ncol' 值 (< 0)"
 
-#: src/main/array.c:116
+#: src/main/array.c:119
 msgid "nc = 0 for non-null data"
 msgstr ""
 
-#: src/main/array.c:124
+#: src/main/array.c:127
 msgid "nr = 0 for non-null data"
 msgstr ""
 
-#: src/main/array.c:135
+#: src/main/array.c:138
 #, c-format
 msgid ""
 "data length [%d] is not a sub-multiple or multiple of the number of rows [%d]"
 msgstr "資料長度 [%d] 並非列數量 [%d] 的因數或倍數"
 
-#: src/main/array.c:138
+#: src/main/array.c:141
 #, c-format
 msgid ""
 "data length [%d] is not a sub-multiple or multiple of the number of columns "
 "[%d]"
 msgstr "資料長度 [%d] 並非欄位數量 [%d] 的因數或倍數"
 
-#: src/main/array.c:141
+#: src/main/array.c:144
 msgid "data length exceeds size of matrix"
 msgstr "資料長度超過矩陣的大小"
 
-#: src/main/array.c:147 src/main/array.c:1453 src/main/array.c:1549
+#: src/main/array.c:150 src/main/array.c:1603 src/main/array.c:1709
 msgid "too many elements specified"
 msgstr "指定了太多的元素"
 
-#: src/main/array.c:205
+#: src/main/array.c:208
 msgid "negative extents to matrix"
 msgstr "矩陣的範圍不能是負值"
 
-#: src/main/array.c:208
+#: src/main/array.c:211
 msgid "allocMatrix: too many elements specified"
 msgstr "allocMatrix: 指定了太多的元素"
 
-#: src/main/array.c:236
+#: src/main/array.c:239
 msgid "negative extents to 3D array"
 msgstr "負值延伸到 3D 陣列"
 
-#: src/main/array.c:239
+#: src/main/array.c:242
 #, fuzzy
 msgid "'alloc3Darray': too many elements specified"
 msgstr "alloc3Darray:指定了太多的元素"
 
-#: src/main/array.c:264
+#: src/main/array.c:267
 #, fuzzy
 msgid "'allocArray': too many elements specified by 'dims'"
 msgstr "allocArray: 'dims' 指定了太多的元素"
 
-#: src/main/array.c:448
+#: src/main/array.c:523
+#, fuzzy, c-format
+msgid "'%s' must be a list or atomic vector"
+msgstr "'x' 必須是空值或純量向量串列"
+
+#: src/main/array.c:561
 #, fuzzy, c-format
 msgid "a matrix-like object is required as argument to '%s'"
 msgstr "'row/col'需要一個類矩陣物件"
 
-#: src/main/array.c:662
+#: src/main/array.c:776
 msgid "requires numeric/complex matrix/vector arguments"
 msgstr "需要數值/複數矩陣/向量引數"
 
-#: src/main/array.c:752 src/main/array.c:756 src/main/array.c:760
+#: src/main/array.c:886 src/main/array.c:890 src/main/array.c:894
 msgid "non-conformable arguments"
 msgstr "非調和引數"
 
-#: src/main/array.c:1058
+#: src/main/array.c:1193
 msgid "argument is not a matrix"
 msgstr "引數不是矩陣"
 
-#: src/main/array.c:1093
+#: src/main/array.c:1228
 msgid "invalid first argument, must be an array"
 msgstr "第一個引數不正確, 必須是陣列"
 
-#: src/main/array.c:1107
+#: src/main/array.c:1242
 #, fuzzy, c-format
 msgid "'perm' is of wrong length %d (!= %d)"
 msgstr "'perm' 的長度不正確"
 
-#: src/main/array.c:1112 src/main/array.c:1115
+#: src/main/array.c:1247 src/main/array.c:1250
 msgid "'a' does not have named dimnames"
 msgstr "'a' 沒有具名的 dimnames"
 
-#: src/main/array.c:1122
+#: src/main/array.c:1257
 #, fuzzy, c-format
 msgid "'perm[%d]' does not match a dimension name"
 msgstr "perm[%d] 不符合維度名稱"
 
-#: src/main/array.c:1135
+#: src/main/array.c:1270
 msgid "value out of range in 'perm'"
 msgstr "'perm' 的值在範圍外"
 
-#: src/main/array.c:1217
+#: src/main/array.c:1352
 msgid "'resize' must be TRUE or FALSE"
 msgstr "'resize' 必須為真或假"
 
-#: src/main/array.c:1275
+#: src/main/array.c:1422
 msgid "'x' must be numeric"
 msgstr "'x' 必須是數值"
 
-#: src/main/array.c:1449
+#: src/main/array.c:1425
+#, fuzzy
+msgid "'x' is too short"
+msgstr "'object' 太短"
+
+#: src/main/array.c:1599
 #, fuzzy
 msgid "'dims' cannot be of length 0"
 msgstr "'hadj' 的長度必須是 1"
 
-#: src/main/array.c:1545
+#: src/main/array.c:1705
 #, fuzzy
 msgid "'x' must have positive length"
 msgstr "'value' 必須是正值的長度"
 
-#: src/main/array.c:1605
+#: src/main/array.c:1771
 #, c-format
 msgid "singular matrix in 'backsolve'. First zero in diagonal [%d]"
 msgstr ""
 
-#: src/main/attrib.c:40 src/main/attrib.c:235 src/main/attrib.c:269
-#: src/main/attrib.c:291 src/main/attrib.c:405 src/main/attrib.c:452
-#: src/main/attrib.c:502
+#: src/main/attrib.c:40 src/main/attrib.c:231 src/main/attrib.c:265
+#: src/main/attrib.c:287 src/main/attrib.c:403 src/main/attrib.c:450
+#: src/main/attrib.c:501
 msgid "attempt to set an attribute on NULL"
 msgstr "試圖在 NULL 上設定屬性"
 
-#: src/main/attrib.c:72
+#: src/main/attrib.c:77
 #, c-format
 msgid "row names must be 'character' or 'integer', not '%s'"
 msgstr "列名稱必須是 '字元' 或 '整數' ,而不是 '%s'"
 
-#: src/main/attrib.c:124
+#: src/main/attrib.c:130
 #, c-format
 msgid "getAttrib: invalid type (%s) for TAG"
 msgstr "getAttrib: 標記的類型 (%s) 不正確"
 
-#: src/main/attrib.c:379
+#: src/main/attrib.c:377
 #, c-format
 msgid "invalid type (%s) for 'names': must be vector"
 msgstr "'names' 的類型 (%s) 不正確: 必須是向量"
 
-#: src/main/attrib.c:382
+#: src/main/attrib.c:380
 #, c-format
 msgid "'names' attribute [%d] must be the same length as the vector [%d]"
 msgstr "'names' 屬性 [%d] 必須和向量的長度 [%d] 一樣"
 
-#: src/main/attrib.c:387
+#: src/main/attrib.c:385
 msgid "names() applied to a non-vector"
 msgstr "names() 被用於非向量"
 
-#: src/main/attrib.c:395
+#: src/main/attrib.c:393
 msgid "invalid time series parameters specified"
 msgstr "時間序列參數設定不正確"
 
-#: src/main/attrib.c:409
+#: src/main/attrib.c:407
 msgid "'tsp' attribute must be numeric"
 msgstr "'tsp' 屬性必須是數值"
 
-#: src/main/attrib.c:415
+#: src/main/attrib.c:413
 msgid "'tsp' attribute must be numeric of length three"
 msgstr "'tsp' 屬性必須是長度為三的數值"
 
-#: src/main/attrib.c:432
+#: src/main/attrib.c:430
 msgid "cannot assign 'tsp' to zero-length vector"
 msgstr "零長度向量不能指派為 'tsp'"
 
-#: src/main/attrib.c:463
+#: src/main/attrib.c:461
 msgid "attempt to set invalid 'comment' attribute"
 msgstr "試圖設定無效的 'comment' 屬性"
 
-#: src/main/attrib.c:511
+#: src/main/attrib.c:510
 msgid "adding class \"factor\" to an invalid object"
 msgstr "加入 \"factor\" 類別到無效的物件"
 
-#: src/main/attrib.c:519
+#: src/main/attrib.c:541
 msgid "attempt to set invalid 'class' attribute"
 msgstr "試圖設定無效的 'class' 屬性"
 
-#: src/main/attrib.c:777
+#: src/main/attrib.c:872
 #, fuzzy, c-format
 msgid "class '%s' has no 'names' slot"
 msgstr "類別 '%s' 沒有任何 'names' 插槽"
 
-#: src/main/attrib.c:779
+#: src/main/attrib.c:874
 #, fuzzy, c-format
 msgid ""
 "class '%s' has no 'names' slot; assigning a names attribute will create an "
 "invalid object"
 msgstr "類別 '%s' 沒有任何 'names' 插槽;指派名稱屬性將建立無效的物件"
 
-#: src/main/attrib.c:782
+#: src/main/attrib.c:877
 #, fuzzy, c-format
 msgid ""
 "invalid to use names()<- to set the 'names' slot in a non-vector class ('%s')"
 msgstr "在非向量類別 ('%s') 中使用 names()<- 以設定 'names' 插槽是不合法的"
 
-#: src/main/attrib.c:812
+#: src/main/attrib.c:907
 msgid "incompatible 'names' argument"
 msgstr "不相容的 'names' 引數"
 
-#: src/main/attrib.c:867
+#: src/main/attrib.c:962
 #, c-format
 msgid "invalid type (%s) to set 'names' attribute"
 msgstr "以無效的類型 (%s) 設定 'names' 屬性"
 
-#: src/main/attrib.c:938
+#: src/main/attrib.c:1035
 msgid "'dimnames' applied to non-array"
 msgstr "'dimnames' 被應用於非陣列"
 
-#: src/main/attrib.c:943
-msgid "'dimnames' must be a list"
-msgstr "'dimnames' 必須是串列"
+#: src/main/attrib.c:1040 src/main/coerce.c:2471
+#, fuzzy, c-format
+msgid "'%s' must be a list"
+msgstr "'%s' 必須是串列"
 
-#: src/main/attrib.c:946 src/main/attrib.c:974
+#: src/main/attrib.c:1043 src/main/attrib.c:1071
 #, c-format
 msgid "length of 'dimnames' [%d] must match that of 'dims' [%d]"
 msgstr "'dimnames' 的長度 [%d] 必須同 'dims' 的長度 [%d] 相等"
 
-#: src/main/attrib.c:980
+#: src/main/attrib.c:1077
 #, c-format
 msgid "invalid type (%s) for 'dimnames' (must be a vector)"
 msgstr "設 'dimnames' 時的類型 (%s) 不正確 (必須是向量)"
 
-#: src/main/attrib.c:983
+#: src/main/attrib.c:1080
 #, c-format
 msgid "length of 'dimnames' [%d] not equal to array extent"
 msgstr "'dimnames' 的長度 [%d] 必須與陣列範圍相等"
 
-#: src/main/attrib.c:1055 src/main/builtin.c:75 src/main/builtin.c:112
-#: src/main/envir.c:1606 src/main/envir.c:1734 src/main/envir.c:1796
-#: src/main/envir.c:1918 src/main/paste.c:74 src/main/paste.c:293
-#: src/main/random.c:487 src/main/random.c:516 src/main/unique.c:1749
+#: src/main/attrib.c:1152 src/main/builtin.c:75 src/main/builtin.c:112
+#: src/main/envir.c:1740 src/main/envir.c:1868 src/main/envir.c:1928
+#: src/main/envir.c:2065 src/main/paste.c:74 src/main/paste.c:293
+#: src/main/random.c:479 src/main/random.c:508 src/main/unique.c:1746
 msgid "invalid first argument"
 msgstr "第一個引數不正確"
 
-#: src/main/attrib.c:1058
+#: src/main/attrib.c:1155
 msgid "invalid second argument"
 msgstr "第二個引數不正確"
 
-#: src/main/attrib.c:1066
+#: src/main/attrib.c:1163
 msgid "length-0 dimension vector is invalid"
 msgstr "長度為零的維度向量無效"
 
-#: src/main/attrib.c:1071
+#: src/main/attrib.c:1168
 msgid "the dims contain missing values"
 msgstr "維度包含缺少值"
 
-#: src/main/attrib.c:1073
+#: src/main/attrib.c:1170
 msgid "the dims contain negative values"
 msgstr "維度包含負值"
 
-#: src/main/attrib.c:1078
+#: src/main/attrib.c:1175
 #, fuzzy
 msgid "dims do not match the length of object"
 msgstr "維度 [product %d] 不符合物件 [%d] 的長度"
 
-#: src/main/attrib.c:1080
+#: src/main/attrib.c:1177
 #, c-format
 msgid "dims [product %d] do not match the length of object [%d]"
 msgstr "維度 [product %d] 不符合物件 [%d] 的長度"
 
-#: src/main/attrib.c:1177
+#: src/main/attrib.c:1284
 msgid "attributes must be a list or NULL"
 msgstr "屬性必須是串列或空值"
 
-#: src/main/attrib.c:1182
+#: src/main/attrib.c:1289
 msgid "attributes must be named"
 msgstr "屬性必須命名"
 
-#: src/main/attrib.c:1186
+#: src/main/attrib.c:1293
 #, c-format
 msgid "all attributes must have names [%d does not]"
 msgstr "所有的屬性都必須有名稱 [%d 卻沒有]"
 
-#: src/main/attrib.c:1285
+#: src/main/attrib.c:1393
 msgid "'which' must be of mode character"
 msgstr "'which' 的模式必須是字元"
 
-#: src/main/attrib.c:1287
+#: src/main/attrib.c:1395
 msgid "exactly one attribute 'which' must be given"
 msgstr "必須給定 'which' 剛好一個屬性"
 
-#: src/main/attrib.c:1345 src/main/attrib.c:1368 src/main/subscript.c:240
-#: src/main/subscript.c:244 src/main/subset.c:1188 src/main/subset.c:1239
+#: src/main/attrib.c:1456 src/main/attrib.c:1479 src/main/subscript.c:245
+#: src/main/subscript.c:249 src/main/subset.c:1257 src/main/subset.c:1311
 #, c-format
 msgid "partial match of '%s' to '%s'"
 msgstr "'%s' 部份匹配到 '%s'"
 
-#: src/main/attrib.c:1406
+#: src/main/attrib.c:1525
 #, fuzzy, c-format
 msgid "invalid type '%s' for slot name"
 msgstr "名稱插槽的類型或長度不正確"
 
-#: src/main/attrib.c:1444
+#: src/main/attrib.c:1563
 msgid "'name' must be non-null character string"
 msgstr "'name' 必須是非空字串"
 
-#: src/main/attrib.c:1568 src/main/attrib.c:1639 src/main/attrib.c:1676
+#: src/main/attrib.c:1688 src/main/attrib.c:1759 src/main/attrib.c:1797
 msgid "invalid type or length for slot name"
 msgstr "名稱插槽的類型或長度不正確"
 
-#: src/main/attrib.c:1602
+#: src/main/attrib.c:1722
 #, c-format
 msgid "cannot get a slot (\"%s\") from an object of type \"%s\""
 msgstr "類型 \"%2$s\" 的物件中沒有 \"%1$s\" 這樣一個插槽"
 
-#: src/main/attrib.c:1613
+#: src/main/attrib.c:1733
 #, c-format
 msgid "no slot of name \"%s\" for this object of class \"%s\""
 msgstr "\"%1$s\" 插槽名不存在於 \"%2$s\" 類型物件中"
 
-#: src/main/attrib.c:1630
+#: src/main/attrib.c:1750
 msgid "attempt to set slot on NULL object"
 msgstr "試圖設在空值物件上定插槽"
 
-#: src/main/attrib.c:1671
+#: src/main/attrib.c:1792
 #, fuzzy
 msgid "formal classes cannot be used without the 'methods' package"
 msgstr "一定要有方法套件才能使用正式類別"
 
-#: src/main/attrib.c:1683
+#: src/main/attrib.c:1804
 #, c-format
 msgid ""
 "trying to get slot \"%s\" from an object of a basic class (\"%s\") with no "
 "slots"
 msgstr "無法從沒有插槽的基本類別 (\"%2$s\") 的物件中取得 \"%1$s\" 插槽"
 
-#: src/main/attrib.c:1687
+#: src/main/attrib.c:1808
 #, c-format
 msgid ""
 "trying to get slot \"%s\" from an object (class \"%s\") that is not an S4 "
 "object "
 msgstr "嘗試從一個不是 S4 物件的物件 (類別 \"%2$s\") 中獲取插槽 \"%1$s\" "
 
-#: src/main/bind.c:161
+#: src/main/bind.c:164
 #, c-format
 msgid "resulting vector exceeds vector length limit in '%s'"
 msgstr "所產生的向量超出 '%s' 中的向量長度限制"
 
-#: src/main/bind.c:291 src/main/bind.c:327 src/main/bind.c:376
-#: src/main/bind.c:449 src/main/bind.c:477
+#: src/main/bind.c:294 src/main/bind.c:330 src/main/bind.c:379
+#: src/main/bind.c:452 src/main/bind.c:480
 #, c-format
 msgid "type '%s' is unimplemented in '%s'"
 msgstr "'%2$s' 中尚未實作類型 '%1$s'"
 
-#: src/main/bind.c:685
+#: src/main/bind.c:688
 msgid "repeated formal argument 'recursive'"
 msgstr "正式引數 'recursive' 出現重複"
 
-#: src/main/bind.c:696
+#: src/main/bind.c:699
 msgid "repeated formal argument 'use.names'"
 msgstr "正式引數 'use.names' 出現重複"
 
-#: src/main/bind.c:894
+#: src/main/bind.c:900
 msgid "argument not a list"
 msgstr "引數不是串列"
 
-#: src/main/bind.c:1038 src/main/eval.c:2691 src/main/eval.c:2700
-#: src/main/objects.c:318 src/main/objects.c:354 src/main/objects.c:729
-#: src/main/objects.c:746 src/main/objects.c:753
+#: src/main/bind.c:1044 src/main/names.c:1273 src/main/names.c:1278
+#: src/main/names.c:1283 src/main/names.c:1288
 #, c-format
 msgid "class name too long in '%s'"
 msgstr "'%s' 中的類別名稱太長"
 
-#: src/main/bind.c:1114
+#: src/main/bind.c:1128
 #, fuzzy, c-format
 msgid "cannot create a matrix from type '%s'"
 msgstr "無法從這些類型建立矩陣"
 
-#: src/main/bind.c:1185
+#: src/main/bind.c:1198
 #, c-format
 msgid "number of rows of matrices must match (see arg %d)"
 msgstr "矩陣的列數必須相符 (參看引數 %d)"
 
-#: src/main/bind.c:1430
+#: src/main/bind.c:1455
 #, c-format
 msgid "number of columns of matrices must match (see arg %d)"
 msgstr "矩陣的行數必須相符 (參看引數 %d)"
@@ -1295,213 +1312,248 @@ msgstr "矩陣的行數必須相符 (參看引數 %d)"
 msgid "vector size cannot be NA"
 msgstr "向量大小不能是 NA"
 
-#: src/main/builtin.c:49 src/main/builtin.c:57 src/main/sort.c:1303
+#: src/main/builtin.c:49 src/main/builtin.c:57 src/main/sort.c:1323
 msgid "vector size cannot be NA/NaN"
 msgstr "向量大小不能是 NA/NaN"
 
-#: src/main/builtin.c:50 src/main/builtin.c:58 src/main/sort.c:1304
+#: src/main/builtin.c:50 src/main/builtin.c:58 src/main/sort.c:1324
 msgid "vector size cannot be infinite"
 msgstr "向量大小不能是無限大"
 
-#: src/main/builtin.c:51 src/main/builtin.c:59 src/main/builtin.c:916
-#: src/main/sort.c:1305
+#: src/main/builtin.c:51 src/main/builtin.c:59 src/main/builtin.c:950
+#: src/main/sort.c:1325
 msgid "vector size specified is too large"
 msgstr "指定的向量大小太大"
 
-#: src/main/builtin.c:84 src/main/builtin.c:93 src/main/builtin.c:293
-#: src/main/builtin.c:326 src/main/builtin.c:365 src/main/builtin.c:375
-#: src/main/coerce.c:1537 src/main/connections.c:3066 src/main/engine.c:2967
-#: src/main/envir.c:993 src/main/envir.c:1046 src/main/envir.c:1136
-#: src/main/envir.c:1615 src/main/envir.c:1739 src/main/envir.c:1807
-#: src/main/envir.c:1925 src/main/envir.c:2582 src/main/envir.c:2642
-#: src/main/envir.c:2922 src/main/envir.c:2951 src/main/envir.c:2972
-#: src/main/envir.c:2995 src/main/envir.c:3030 src/main/envir.c:3051
-#: src/main/envir.c:3357 src/main/envir.c:3362 src/main/eval.c:5318
-#: src/main/objects.c:197 src/main/objects.c:203 src/main/saveload.c:2070
-#: src/main/saveload.c:2364 src/main/serialize.c:2709
+#: src/main/builtin.c:84 src/main/builtin.c:93 src/main/builtin.c:304
+#: src/main/builtin.c:337 src/main/builtin.c:394 src/main/builtin.c:408
+#: src/main/coerce.c:1536 src/main/connections.c:3062 src/main/engine.c:2987
+#: src/main/envir.c:1001 src/main/envir.c:1054 src/main/envir.c:1210
+#: src/main/envir.c:1749 src/main/envir.c:1873 src/main/envir.c:1939
+#: src/main/envir.c:2072 src/main/envir.c:2791 src/main/envir.c:2877
+#: src/main/envir.c:3182 src/main/envir.c:3211 src/main/envir.c:3232
+#: src/main/envir.c:3255 src/main/envir.c:3290 src/main/envir.c:3311
+#: src/main/envir.c:3632 src/main/envir.c:3637 src/main/eval.c:6251
+#: src/main/objects.c:191 src/main/objects.c:199 src/main/saveload.c:2072
+#: src/main/saveload.c:2364 src/main/serialize.c:2755
 msgid "use of NULL environment is defunct"
 msgstr "NULL 環境的使用已經廢止"
 
-#: src/main/builtin.c:306
+#: src/main/builtin.c:250 src/main/builtin.c:263
+#, fuzzy
+msgid "argument is not a function"
+msgstr "引數必須不是函數"
+
+#: src/main/builtin.c:317
 msgid "replacement object is not an environment"
 msgstr "替換物件不是環境物件"
 
-#: src/main/builtin.c:331
+#: src/main/builtin.c:342
 msgid "'enclos' must be an environment"
 msgstr "'enclos' 必須是環境物件"
 
-#: src/main/builtin.c:352 src/main/builtin.c:370
+#: src/main/builtin.c:363 src/main/builtin.c:399
 msgid "argument is not an environment"
 msgstr "引數不是環境物件"
 
-#: src/main/builtin.c:354
+#: src/main/builtin.c:365
 msgid "the empty environment has no parent"
 msgstr "空環境沒有上一層"
 
-#: src/main/builtin.c:372
+#: src/main/builtin.c:401
 msgid "can not set parent of the empty environment"
 msgstr "無法設定空環境的上層"
 
-#: src/main/builtin.c:380
+#: src/main/builtin.c:403
+#, fuzzy
+msgid "can not set the parent environment of a namespace"
+msgstr "無法設定空環境的上層"
+
+#: src/main/builtin.c:405
+#, fuzzy
+msgid "can not set the parent environment of package imports"
+msgstr "無法設定空環境的上層"
+
+#: src/main/builtin.c:413
 msgid "'parent' is not an environment"
 msgstr "'parent' 不是環境物件"
 
-#: src/main/builtin.c:521 src/main/connections.c:3691
-#: src/main/connections.c:4068 src/main/connections.c:4102
-#: src/main/connections.c:4480 src/main/connections.c:4550
-#: src/main/connections.c:4759 src/main/connections.c:4763
-#: src/main/connections.c:5124 src/main/deparse.c:360 src/main/deparse.c:446
-#: src/main/serialize.c:2006
+#: src/main/builtin.c:556 src/main/connections.c:3687
+#: src/main/connections.c:4079 src/main/connections.c:4113
+#: src/main/connections.c:4491 src/main/connections.c:4561
+#: src/main/connections.c:4772 src/main/connections.c:4776
+#: src/main/connections.c:5199 src/main/deparse.c:369 src/main/deparse.c:458
+#: src/main/serialize.c:2045
 msgid "cannot write to this connection"
 msgstr "無法寫入此連結"
 
-#: src/main/builtin.c:526 src/main/builtin.c:556
+#: src/main/builtin.c:561 src/main/builtin.c:591
 #, c-format
 msgid "invalid '%s' specification"
 msgstr "'%s' 設定不正確"
 
-#: src/main/builtin.c:543
+#: src/main/builtin.c:578
 msgid "non-positive 'fill' argument will be ignored"
 msgstr "非正數的 'fill' 引數將會被忽略"
 
-#: src/main/builtin.c:618
+#: src/main/builtin.c:653
 #, c-format
 msgid "argument %d (type '%s') cannot be handled by 'cat'"
 msgstr "'cat' 目前還不能用 %d 引數 (類型 '%s')"
 
-#: src/main/builtin.c:763
+#: src/main/builtin.c:797
 #, c-format
 msgid "vector: cannot make a vector of mode '%s'."
 msgstr "向量:無法建立模式為 '%s' 的向量。"
 
-#: src/main/builtin.c:789
+#: src/main/builtin.c:823
 msgid "cannot set length of non-vector"
 msgstr "不能設定非向量的長度"
 
-#: src/main/builtin.c:897 src/main/builtin.c:907 src/main/options.c:637
+#: src/main/builtin.c:931 src/main/builtin.c:941 src/main/options.c:659
 msgid "invalid argument"
 msgstr "引數不正確"
 
-#: src/main/builtin.c:899 src/main/builtin.c:909 src/main/builtin.c:911
-#: src/main/character.c:366 src/main/coerce.c:2765
+#: src/main/builtin.c:933 src/main/builtin.c:943 src/main/builtin.c:945
+#: src/main/character.c:525 src/main/coerce.c:2832
 msgid "invalid value"
 msgstr "無效的值"
 
-#: src/main/builtin.c:942 src/main/coerce.c:2478 src/main/coerce.c:2519
-#: src/main/eval.c:563 src/main/eval.c:683 src/main/eval.c:2099
-#: src/main/eval.c:2176 src/main/eval.c:2236 src/main/eval.c:2569
-#: src/main/eval.c:4694 src/main/eval.c:4814
+#: src/main/builtin.c:976 src/main/coerce.c:2541 src/main/coerce.c:2584
+#: src/main/eval.c:620 src/main/eval.c:740 src/main/eval.c:2266
+#: src/main/eval.c:2346 src/main/eval.c:2407 src/main/eval.c:2745
+#: src/main/eval.c:5584 src/main/eval.c:5701
 msgid "'...' used in an incorrect context"
 msgstr "'...' 的上下文用得不正確"
 
-#: src/main/builtin.c:963
+#: src/main/builtin.c:998
 #, fuzzy, c-format
 msgid "duplicate 'switch' defaults: '%s' and '%s'"
 msgstr "重複切換預設值:'%s' 和 '%s'"
 
-#: src/main/builtin.c:996
+#: src/main/builtin.c:1031
 msgid "'EXPR' is missing"
 msgstr "缺少 'EXPR'"
 
-#: src/main/builtin.c:1000 src/main/eval.c:5155
+#: src/main/builtin.c:1035 src/main/eval.c:6056
 msgid "EXPR must be a length 1 vector"
 msgstr "EXPR 必須是長度為 1 的向量"
 
-#: src/main/builtin.c:1003
+#: src/main/builtin.c:1038 src/main/eval.c:6059
 #, c-format
 msgid ""
 "EXPR is a \"factor\", treated as integer.\n"
 " Consider using '%s' instead."
 msgstr ""
 
-#: src/main/character.c:105 src/main/character.c:108 src/main/character.c:132
-#: src/main/character.c:135
+#: src/main/builtin.c:1095 src/main/eval.c:6069 src/main/eval.c:6098
+#, fuzzy
+msgid "'switch' with no alternatives"
+msgstr "switch() 需要數值而無需具名的替代方案"
+
+#: src/main/character.c:103 src/main/character.c:224
+#, fuzzy, c-format
+msgid "%d argument passed to '%s' which requires %d to %d"
+msgid_plural "%d arguments passed to '%s' which requires %d to %d"
+msgstr[0] "傳遞了 %d 個引數給 '%s' 但它需要 %d 個"
+
+#: src/main/character.c:110 src/main/character.c:113 src/main/character.c:232
+#: src/main/character.c:235
 #, c-format
 msgid "'%s' requires a character vector"
 msgstr "'%s' 需要字元向量"
 
-#: src/main/character.c:164
-#, c-format
-msgid ""
-"number of characters is not computable for element %d in \"bytes\" encoding"
-msgstr "對於 \"bytes\" 編碼中的元素 %d 而言,字元數量並非可計算的"
-
-#: src/main/character.c:169 src/main/character.c:197 src/main/character.c:653
-#: src/main/character.c:750
-#, c-format
-msgid "invalid multibyte string %d"
+#: src/main/character.c:150 src/main/character.c:165 src/main/character.c:175
+#: src/main/character.c:203
+#, fuzzy, c-format
+msgid "invalid multibyte string, %s"
 msgstr "多位元組字串 %d 不正確"
 
-#: src/main/character.c:185
-#, c-format
-msgid "width is not computable for element %d in \"bytes\" encoding"
+#: src/main/character.c:159
+#, fuzzy, c-format
+msgid "number of characters is not computable in \"bytes\" encoding, %s"
+msgstr "對於 \"bytes\" 編碼中的元素 %d 而言,字元數量並非可計算的"
+
+#: src/main/character.c:188
+#, fuzzy, c-format
+msgid "width is not computable for %s in \"bytes\" encoding"
 msgstr "對於 \"bytes\" 編碼中的元素 %d 而言,寬度並非可計算的"
 
-#: src/main/character.c:263
+#: src/main/character.c:311
 msgid "extracting substrings from a non-character object"
 msgstr "從非字元物件中抽取子字串"
 
-#: src/main/character.c:268 src/main/character.c:363
+#: src/main/character.c:321 src/main/character.c:522
 #, fuzzy
 msgid "invalid substring arguments"
 msgstr "無效的子字串引數"
 
-#: src/main/character.c:358
+#: src/main/character.c:361
+#, fuzzy
+msgid "non-character object(s)"
+msgstr "不能有非字元名稱"
+
+#: src/main/character.c:517
 msgid "replacing substrings in a non-character object"
 msgstr "在非字元的物件中替換子字串"
 
-#: src/main/character.c:551
+#: src/main/character.c:785
 msgid "the first argument must be a character vector"
 msgstr "第一個引數必須是字元向量"
 
-#: src/main/character.c:570
+#: src/main/character.c:822
 msgid "abbreviate used with non-ASCII chars"
 msgstr "abbreviate 不適用於非 ASCII 字元"
 
-#: src/main/character.c:591
+#: src/main/character.c:843
 msgid "non-character names"
 msgstr "不能有非字元名稱"
 
-#: src/main/character.c:696 src/main/grep.c:159
+#: src/main/character.c:905 src/main/character.c:1002
+#, c-format
+msgid "invalid multibyte string %d"
+msgstr "多位元組字串 %d 不正確"
+
+#: src/main/character.c:948 src/main/grep.c:163
 msgid "non-character argument"
 msgstr "非字元引數"
 
-#: src/main/character.c:805
+#: src/main/character.c:1057
 #, c-format
 msgid "decreasing range specification ('%lc-%lc')"
 msgstr "正在遞減範圍設定 ('%lc-%lc')"
 
-#: src/main/character.c:891
+#: src/main/character.c:1143
 #, c-format
 msgid "decreasing range specification ('%c-%c')"
 msgstr "正在遞減範圍設定 ('%c-%c')"
 
-#: src/main/character.c:1079
+#: src/main/character.c:1331
 msgid "invalid UTF-8 string 'old'"
 msgstr "無效的 UTF-8 字串 'old'"
 
-#: src/main/character.c:1085
+#: src/main/character.c:1337
 msgid "invalid multibyte string 'old'"
 msgstr "多位元組字串 'old' 不正確"
 
-#: src/main/character.c:1098
+#: src/main/character.c:1350
 msgid "invalid UTF-8 string 'new'"
 msgstr "無效的 UTF-8 字串 'new'"
 
-#: src/main/character.c:1104
+#: src/main/character.c:1356
 msgid "invalid multibyte string 'new'"
 msgstr "多位元組字串 'new' 不正確"
 
-#: src/main/character.c:1132 src/main/character.c:1221
+#: src/main/character.c:1384 src/main/character.c:1473
 msgid "'old' is longer than 'new'"
 msgstr "'old' 比 'new' 要長"
 
-#: src/main/character.c:1164
+#: src/main/character.c:1416
 #, c-format
 msgid "invalid input multibyte string %d"
 msgstr "輸入的多位元組字串 %d 不正確"
 
-#: src/main/character.c:1271
+#: src/main/character.c:1523
 msgid "strtrim() requires a character vector"
 msgstr "strtrim() 需要字元向量"
 
@@ -1513,15 +1565,16 @@ msgstr "無效的 'mode' 引數"
 msgid "applies only to lists and vectors"
 msgstr "只能用於串列和向量"
 
-#: src/main/coerce.c:77 src/main/errors.c:1208
+#: src/main/coerce.c:77 src/main/errors.c:1194
 msgid "NAs introduced by coercion"
 msgstr "強制變更過程中產生了 NA"
 
-#: src/main/coerce.c:79 src/main/errors.c:1209
-msgid "inaccurate integer conversion in coercion"
-msgstr "強制變更造成整數不精確"
+#: src/main/coerce.c:79
+#, fuzzy
+msgid "NAs introduced by coercion to integer range"
+msgstr "強制變更過程中產生了 NA"
 
-#: src/main/coerce.c:81 src/main/errors.c:1210
+#: src/main/coerce.c:81 src/main/errors.c:1196
 msgid "imaginary parts discarded in coercion"
 msgstr "強制變更時丟棄了虛數部分"
 
@@ -1529,59 +1582,63 @@ msgstr "強制變更時丟棄了虛數部分"
 msgid "out-of-range values treated as 0 in coercion to raw"
 msgstr "在強制變更成純量值時,任何溢位值當作 0 來處理"
 
-#: src/main/coerce.c:414
+#: src/main/coerce.c:399
 #, c-format
 msgid "invalid data of mode '%s' (too short)"
 msgstr "無效的模式 '%s' 資料 (太短)"
 
-#: src/main/coerce.c:1016
+#: src/main/coerce.c:1002
 #, c-format
 msgid "'pairlist' object cannot be coerced to type '%s'"
 msgstr "'pairlist' 物件無法強制變更成 '%s'"
 
-#: src/main/coerce.c:1134
+#: src/main/coerce.c:1120
 #, c-format
 msgid "(list) object cannot be coerced to type '%s'"
 msgstr "(串列) 物件無法強制變更成 '%s'"
 
-#: src/main/coerce.c:1157
+#: src/main/coerce.c:1143
 #, c-format
 msgid "(symbol) object cannot be coerced to type '%s'"
 msgstr "(符號) 物件無法強制變更成 '%s'"
 
-#: src/main/coerce.c:1173 src/main/coerce.c:1485
+#: src/main/coerce.c:1159 src/main/coerce.c:1484
 msgid "no method for coercing this S4 class to a vector"
 msgstr "沒有方法可將這個 S4 類別強制變更成向量"
 
-#: src/main/coerce.c:1232
+#: src/main/coerce.c:1222
 msgid "environments cannot be coerced to other types"
 msgstr "環境物件不能被強制變更成其它類型"
 
-#: src/main/coerce.c:1379
+#: src/main/coerce.c:1374
 msgid "attempting to coerce non-factor"
 msgstr "試圖強制變更非向量"
 
-#: src/main/coerce.c:1533
+#: src/main/coerce.c:1379 src/main/coerce.c:1389
+msgid "malformed factor"
+msgstr ""
+
+#: src/main/coerce.c:1532
 msgid "list argument expected"
 msgstr "需要串列引數"
 
-#: src/main/coerce.c:1541 src/main/eval.c:5322
+#: src/main/coerce.c:1540 src/main/eval.c:6255
 msgid "invalid environment"
 msgstr "環境物件不正確"
 
-#: src/main/coerce.c:1545
+#: src/main/coerce.c:1544
 msgid "argument must have length at least 1"
 msgstr "引數的長度至少要為 1"
 
-#: src/main/coerce.c:1567
+#: src/main/coerce.c:1566
 msgid "invalid body for function"
 msgstr "函數本體不正確"
 
-#: src/main/coerce.c:1590
+#: src/main/coerce.c:1589
 msgid "invalid length 0 argument"
 msgstr "長度為 0 的引數是不正確的"
 
-#: src/main/coerce.c:1605
+#: src/main/coerce.c:1604
 msgid "invalid argument list"
 msgstr "引數串列不正確"
 
@@ -1593,786 +1650,784 @@ msgstr "類型 \"single\" 目前在 R 中還沒有實作"
 msgid "unimplemented predicate"
 msgstr "尚未實作 predicate"
 
-#: src/main/coerce.c:2069
+#: src/main/coerce.c:2070
 #, c-format
 msgid "%s() applied to non-(list or vector) of type '%s'"
 msgstr "%s() 套用到非串列或向量類型 '%s'"
 
-#: src/main/coerce.c:2212 src/main/coerce.c:2275 src/main/coerce.c:2343
+#: src/main/coerce.c:2267 src/main/coerce.c:2331 src/main/coerce.c:2403
 #, c-format
 msgid "default method not implemented for type '%s'"
 msgstr "預設方法尚未於類型 '%s' 中實作"
 
-#: src/main/coerce.c:2361
+#: src/main/coerce.c:2425
 msgid "'name' is missing"
 msgstr "缺少 'name'"
 
-#: src/main/coerce.c:2368
+#: src/main/coerce.c:2432
 msgid "first argument must be a character string"
 msgstr "第一個引數必須是字串"
 
-#: src/main/coerce.c:2401
-msgid "'what' must be a character string or a function"
-msgstr "'what' 必須是字串或函數"
+#: src/main/coerce.c:2464
+#, fuzzy
+msgid "'what' must be a function or character string"
+msgstr "'text' 必須是字串"
 
-#: src/main/coerce.c:2405
+#: src/main/coerce.c:2468
 #, fuzzy
 msgid "'args' must be a list or expression"
 msgstr "'args' 必須是串列"
 
-#: src/main/coerce.c:2408
-msgid "'args' must be a list"
-msgstr "'args' 必須是串列"
-
-#: src/main/coerce.c:2412
+#: src/main/coerce.c:2475 src/main/unique.c:1345
 msgid "'envir' must be an environment"
 msgstr "'envir' 必須是環境物件"
 
-#: src/main/coerce.c:2567
+#: src/main/coerce.c:2634
 msgid "invalid environment specified"
 msgstr "環境設定不正確"
 
-#: src/main/coerce.c:2633
+#: src/main/coerce.c:2700
 msgid "Setting class(x) to NULL;   result will no longer be an S4 object"
 msgstr "設定 class(x) 為空值; 結果將不再是 S4 物件"
 
-#: src/main/coerce.c:2636
+#: src/main/coerce.c:2703
 #, c-format
 msgid ""
 "Setting class(x) to multiple strings (\"%s\", \"%s\", ...); result will no "
 "longer be an S4 object"
 msgstr "設定 class(x) 為多重字串 (\"%s\", \"%s\", ...);結果將不再是 S4 物件"
 
-#: src/main/coerce.c:2640
+#: src/main/coerce.c:2707
 #, c-format
 msgid ""
 "Setting class(x) to \"%s\" sets attribute to NULL; result will no longer be "
 "an S4 object"
 msgstr "設定 class(x) 為 \"%s\" 設定屬性為空值;結果將不再是 S4 物件"
 
-#: src/main/coerce.c:2673
+#: src/main/coerce.c:2740
 msgid "invalid replacement object to be a class string"
 msgstr "字串類別的替換物件不正確"
 
-#: src/main/coerce.c:2694
+#: src/main/coerce.c:2761
 #, c-format
 msgid ""
 "\"%s\" can only be set as the class if the object has this type; found \"%s\""
 msgstr "只有在物件有此一類別的情況下才能設 \"%s\";不應該有 \"%s\""
 
-#: src/main/coerce.c:2712
+#: src/main/coerce.c:2779
 #, c-format
 msgid ""
 "invalid to set the class to matrix unless the dimension attribute is of "
 "length 2 (was %d)"
 msgstr "除非維度的長度為 2(目前是 %d),否則不能設為矩陣類別"
 
-#: src/main/coerce.c:2720
+#: src/main/coerce.c:2787
 msgid ""
 "cannot set class to \"array\" unless the dimension attribute has length > 0"
 msgstr "除非維度的長度 >0,否則不能設為 \"array\" 類別"
 
-#: src/main/coerce.c:2756
+#: src/main/coerce.c:2823
 msgid "'value' must be non-null character string"
 msgstr "'value' 必須是非空字串"
 
-#: src/main/coerce.c:2769
+#: src/main/coerce.c:2836
 msgid "invalid to change the storage mode of a factor"
 msgstr "變更因子的儲存體模式無效"
 
-#: src/main/complex.c:126
+#: src/main/complex.c:123
 msgid "invalid complex unary operator"
 msgstr "單一複數運算子不正確"
 
-#: src/main/complex.c:261
+#: src/main/complex.c:251
 msgid "unimplemented complex operation"
 msgstr "複數運算目前還沒有實作"
 
-#: src/main/complex.c:363
+#: src/main/complex.c:353
 msgid "non-numeric argument to function"
 msgstr "函數不能有非數值引數"
 
-#: src/main/complex.c:827
+#: src/main/complex.c:822
 msgid "invalid polynomial coefficient"
 msgstr "多項式係數不正確"
 
-#: src/main/complex.c:832
+#: src/main/complex.c:827
 msgid "root finding code failed"
 msgstr "求根運算執行失敗"
 
-#: src/main/connections.c:153
+#: src/main/connections.c:150
 msgid "all connections are in use"
 msgstr "所有連結都已在使用"
 
-#: src/main/connections.c:164
+#: src/main/connections.c:161
 msgid "connection not found"
 msgstr "找不到連結"
 
-#: src/main/connections.c:175
+#: src/main/connections.c:172 src/main/connections.c:5213
 msgid "invalid connection"
 msgstr "連結不正確"
 
-#: src/main/connections.c:207
+#: src/main/connections.c:204
 #, c-format
 msgid "closing unused connection %d (%s)\n"
 msgstr "關閉未使用的連接 %d (%s)\n"
 
-#: src/main/connections.c:232 src/main/sysutils.c:619 src/main/sysutils.c:806
-#: src/main/sysutils.c:821 src/main/sysutils.c:912 src/main/sysutils.c:927
-#: src/main/sysutils.c:1023 src/main/sysutils.c:1096 src/main/sysutils.c:1106
-#: src/main/sysutils.c:1119 src/main/sysutils.c:1516
+#: src/main/connections.c:229 src/main/sysutils.c:631 src/main/sysutils.c:834
+#: src/main/sysutils.c:849 src/main/sysutils.c:978 src/main/sysutils.c:1051
+#: src/main/sysutils.c:1061 src/main/sysutils.c:1074 src/main/sysutils.c:1472
 #, c-format
 msgid "unsupported conversion from '%s' to '%s'"
 msgstr "不支援從 '%s' 到 '%s' 的轉換"
 
-#: src/main/connections.c:288 src/main/connections.c:304
-#: src/main/connections.c:456 src/main/connections.c:462
-#: src/main/connections.c:468 src/main/connections.c:479
-#: src/main/connections.c:486
+#: src/main/connections.c:285 src/main/connections.c:300
+#: src/main/connections.c:451 src/main/connections.c:456
+#: src/main/connections.c:461 src/main/connections.c:472
+#: src/main/connections.c:478
 #, c-format
 msgid "%s not enabled for this connection"
 msgstr "%s 未於此連接啟用"
 
-#: src/main/connections.c:335 src/main/connections.c:352
-#: src/main/connections.c:2916
+#: src/main/connections.c:330 src/main/connections.c:347
+#: src/main/connections.c:2910
 msgid "printing of extremely long output is truncated"
 msgstr "截短了需要列印的特長輸出"
 
-#: src/main/connections.c:375
+#: src/main/connections.c:370
 msgid "invalid char string in output conversion"
 msgstr "輸出轉換字串不正確"
 
-#: src/main/connections.c:439
+#: src/main/connections.c:434
 #, c-format
 msgid "invalid input found on input connection '%s'"
 msgstr "輸入連結 '%s' 中的輸入不正確"
 
-#: src/main/connections.c:580
+#: src/main/connections.c:571
 #, fuzzy, c-format
 msgid "cannot open file '%ls': %s"
 msgstr "無法開啟檔案 '%s' :%s"
 
-#: src/main/connections.c:691
+#: src/main/connections.c:683
 msgid "connection is not open for reading"
 msgstr "連結沒有開啟而不能讀"
 
-#: src/main/connections.c:696
+#: src/main/connections.c:688
 msgid "connection is not open for writing"
 msgstr "連結沒有開啟而不能寫"
 
-#: src/main/connections.c:734 src/main/connections.c:2229
+#: src/main/connections.c:726 src/main/connections.c:2223
 msgid "can only truncate connections open for writing"
 msgstr "只能截短已經開啟之可以寫入的連結"
 
-#: src/main/connections.c:738 src/main/connections.c:740
+#: src/main/connections.c:730 src/main/connections.c:732
 msgid "file truncation failed"
 msgstr "未能截短檔案"
 
-#: src/main/connections.c:742
+#: src/main/connections.c:734
 msgid "file truncation unavailable on this platform"
 msgstr "本平臺上沒有檔案截短功能"
 
-#: src/main/connections.c:788 src/main/connections.c:792
-#: src/main/connections.c:798 src/main/connections.c:815
+#: src/main/connections.c:780 src/main/connections.c:784
+#: src/main/connections.c:790 src/main/connections.c:807
 msgid "allocation of file connection failed"
 msgstr "檔案連結配置失敗"
 
-#: src/main/connections.c:866 src/main/connections.c:1044
+#: src/main/connections.c:858 src/main/connections.c:1035
 #, c-format
 msgid "cannot create fifo '%s', reason '%s'"
 msgstr "無法建立先進先出 '%s',原因是 '%s'"
 
-#: src/main/connections.c:872
+#: src/main/connections.c:864
 #, c-format
 msgid "'%s' exists but is not a fifo"
 msgstr "'%s' 存在但不是先進先出"
 
-#: src/main/connections.c:886
+#: src/main/connections.c:878
 #, c-format
 msgid "fifo '%s' is not ready"
 msgstr "先進先出 '%s' 還沒有準備好"
 
-#: src/main/connections.c:887
+#: src/main/connections.c:879
 #, c-format
 msgid "cannot open fifo '%s'"
 msgstr "無法開啟先進先出 '%s'"
 
-#: src/main/connections.c:928 src/main/connections.c:939
-#: src/main/connections.c:1104 src/main/connections.c:1123
-#: src/main/connections.c:1531 src/main/connections.c:1541
-#: src/main/connections.c:1660 src/main/connections.c:1720
-#: src/main/connections.c:2246 src/main/connections.c:2263
-#: src/main/connections.c:2572 src/main/connections.c:5305
-#: src/main/connections.c:5369
+#: src/main/connections.c:920 src/main/connections.c:931
+#: src/main/connections.c:1095 src/main/connections.c:1114
+#: src/main/connections.c:1524 src/main/connections.c:1534
+#: src/main/connections.c:1653 src/main/connections.c:1713
+#: src/main/connections.c:2240 src/main/connections.c:2257
+#: src/main/connections.c:2566 src/main/connections.c:5385
+#: src/main/connections.c:5449
 msgid "too large a block specified"
 msgstr "指定的區塊太大"
 
-#: src/main/connections.c:998 src/main/connections.c:1004
+#: src/main/connections.c:989 src/main/connections.c:995
 #, fuzzy
 msgid "allocation of fifo name failed"
 msgstr "先進先出連結配置失敗"
 
-#: src/main/connections.c:1066
+#: src/main/connections.c:1057
 #, fuzzy, c-format
 msgid "cannot open fifo '%s', reason '%s'"
 msgstr "無法開啟網址 '%s' ,原因是 '%s'"
 
-#: src/main/connections.c:1107 src/main/connections.c:1131
+#: src/main/connections.c:1098 src/main/connections.c:1122
 #, fuzzy
 msgid "allocation of fifo buffer failed"
 msgstr "先進先出連結配置失敗"
 
-#: src/main/connections.c:1139
+#: src/main/connections.c:1130
 #, fuzzy, c-format
 msgid "cannot write FIFO '%s'"
 msgstr "無法開啟 URL '%s'"
 
-#: src/main/connections.c:1175 src/main/connections.c:1179
-#: src/main/connections.c:1185 src/main/connections.c:1201
+#: src/main/connections.c:1166 src/main/connections.c:1170
+#: src/main/connections.c:1176 src/main/connections.c:1192
 msgid "allocation of fifo connection failed"
 msgstr "先進先出連結配置失敗"
 
-#: src/main/connections.c:1219 src/main/connections.c:1377
-#: src/main/connections.c:1998 src/main/connections.c:3212
-#: src/main/connections.c:4967
+#: src/main/connections.c:1210 src/main/connections.c:1369
+#: src/main/connections.c:1991 src/main/connections.c:3205
+#: src/main/connections.c:4982
 msgid "only first element of 'description' argument used"
 msgstr "只用了 'description' 引數的第一個元素"
 
-#: src/main/connections.c:1236
+#: src/main/connections.c:1227
 msgid ""
 "fifo(\"\") only supports open = \"w+\" and open = \"w+b\": using the former"
 msgstr "fifo (\"\") 只有支援開啟= \"w+\" 和開啟= \"w+b\":使用前項"
 
-#: src/main/connections.c:1250 src/main/connections.c:1414
-#: src/main/connections.c:2064 src/main/connections.c:3179
-#: src/main/connections.c:3232 src/main/connections.c:3280
-#: src/main/connections.c:3567 src/main/connections.c:3683
-#: src/main/connections.c:3844 src/main/connections.c:4095
-#: src/main/connections.c:4423 src/main/connections.c:4543
-#: src/main/connections.c:4755 src/main/connections.c:5105 src/main/dcf.c:94
-#: src/main/deparse.c:352 src/main/deparse.c:438 src/main/saveload.c:2267
-#: src/main/saveload.c:2350 src/main/scan.c:933 src/main/serialize.c:2175
-#: src/main/serialize.c:2226 src/main/source.c:265
+#: src/main/connections.c:1242 src/main/connections.c:1407
+#: src/main/connections.c:2058 src/main/connections.c:3175
+#: src/main/connections.c:3226 src/main/connections.c:3274
+#: src/main/connections.c:3563 src/main/connections.c:3679
+#: src/main/connections.c:3841 src/main/connections.c:4106
+#: src/main/connections.c:4434 src/main/connections.c:4554
+#: src/main/connections.c:4768 src/main/connections.c:5180 src/main/dcf.c:93
+#: src/main/deparse.c:361 src/main/deparse.c:450 src/main/saveload.c:2269
+#: src/main/saveload.c:2350 src/main/scan.c:933 src/main/serialize.c:2216
+#: src/main/serialize.c:2267 src/main/source.c:270
 msgid "cannot open the connection"
 msgstr "無法開啟連結"
 
-#: src/main/connections.c:1265
+#: src/main/connections.c:1257
 msgid "fifo connections are not available on this system"
 msgstr "本系統沒有先進先出連結這個功能"
 
-#: src/main/connections.c:1295
+#: src/main/connections.c:1287
 #, fuzzy, c-format
 msgid "cannot pipe() cmd '%ls': %s"
 msgstr "無法開啟 pipe() 命令 '%s' :%s"
 
-#: src/main/connections.c:1302
+#: src/main/connections.c:1294
 #, c-format
 msgid "cannot open pipe() cmd '%s': %s"
 msgstr "無法開啟 pipe() 命令 '%s' :%s"
 
-#: src/main/connections.c:1471 src/main/connections.c:1791
+#: src/main/connections.c:1464 src/main/connections.c:1784
 #, c-format
 msgid "cannot open compressed file '%s', probable reason '%s'"
 msgstr "無法開啟壓縮過的檔案 '%s',可能的原因是 '%s'"
 
-#: src/main/connections.c:1511
+#: src/main/connections.c:1504
 msgid "whence = \"end\" is not implemented for gzfile connections"
 msgstr "whence = \"end\" 不適用於 gz 檔案連結"
 
-#: src/main/connections.c:1516
+#: src/main/connections.c:1509
 msgid "seek on a gzfile connection returned an internal error"
 msgstr "讀取 gz 檔案連結時內部發生錯誤"
 
-#: src/main/connections.c:1550 src/main/connections.c:1554
-#: src/main/connections.c:1560 src/main/connections.c:1577
+#: src/main/connections.c:1543 src/main/connections.c:1547
+#: src/main/connections.c:1553 src/main/connections.c:1570
 msgid "allocation of gzfile connection failed"
 msgstr "配置 gz 檔案連結失敗"
 
-#: src/main/connections.c:1606
+#: src/main/connections.c:1599
 #, c-format
 msgid "cannot open bzip2-ed file '%s', probable reason '%s'"
 msgstr "無法開啟 bzip2 壓縮過的檔案 '%s',可能的原因是 '%s'"
 
-#: src/main/connections.c:1615
+#: src/main/connections.c:1608
 #, c-format
 msgid "file '%s' appears not to be compressed by bzip2"
 msgstr "檔案 '%s' 看起來不像是 bzip2 類別"
 
-#: src/main/connections.c:1624
+#: src/main/connections.c:1617
 #, c-format
 msgid "initializing bzip2 compression for file '%s' failed"
 msgstr "初始化 bzip2 壓縮檔案 '%s' 時失敗"
 
-#: src/main/connections.c:1678
+#: src/main/connections.c:1671
 msgid "allocation of overflow buffer for bzfile failed"
 msgstr "為 bzfile 的溢位緩衝區配置時失敗"
 
-#: src/main/connections.c:1685
+#: src/main/connections.c:1678
 #, c-format
 msgid ""
 "file '%s' has trailing content that appears not to be compressed by bzip2"
 msgstr "檔案 '%s' 有尾隨的內容,看起來並非由 bzip2 壓縮過"
 
-#: src/main/connections.c:1731 src/main/connections.c:1735
-#: src/main/connections.c:1741 src/main/connections.c:1758
+#: src/main/connections.c:1724 src/main/connections.c:1728
+#: src/main/connections.c:1734 src/main/connections.c:1751
 msgid "allocation of bzfile connection failed"
 msgstr "配置 bz 檔案連結失敗"
 
-#: src/main/connections.c:1804 src/main/connections.c:5961
+#: src/main/connections.c:1797 src/main/connections.c:6046
 #, c-format
 msgid "cannot initialize lzma decoder, error %d"
 msgstr "無法初始化 lzma 解碼器,錯誤 %d"
 
-#: src/main/connections.c:1820
+#: src/main/connections.c:1813
 #, c-format
 msgid "cannot initialize lzma encoder, error %d"
 msgstr "無法初始化 lzma 編碼器,錯誤 %d"
 
-#: src/main/connections.c:1948 src/main/connections.c:1952
-#: src/main/connections.c:1958 src/main/connections.c:1976
+#: src/main/connections.c:1941 src/main/connections.c:1945
+#: src/main/connections.c:1951 src/main/connections.c:1969
 msgid "allocation of xzfile connection failed"
 msgstr "xzfile 連接配置時失敗"
 
-#: src/main/connections.c:2035
+#: src/main/connections.c:2028
 #, c-format
 msgid "this is a %s-compressed file which this build of R does not support"
 msgstr "這是 %s 壓縮過的檔案,這版組建的 R 並不支援它"
 
-#: src/main/connections.c:2130 src/modules/X11/devX11.c:3375
+#: src/main/connections.c:2124 src/modules/X11/devX11.c:3381
 msgid "memory allocation to copy clipboard failed"
 msgstr "複製剪貼簿時記憶體配置失敗"
 
-#: src/main/connections.c:2135 src/modules/X11/devX11.c:3354
-#: src/modules/X11/devX11.c:3359
+#: src/main/connections.c:2129 src/modules/X11/devX11.c:3360
+#: src/modules/X11/devX11.c:3365
 msgid "clipboard cannot be opened or contains no text"
 msgstr "打不開剪貼簿,或是剪貼簿不含文字"
 
-#: src/main/connections.c:2146
+#: src/main/connections.c:2140
 msgid "memory allocation to open clipboard failed"
 msgstr "開啟剪貼簿時記憶體配置失敗"
 
-#: src/main/connections.c:2174
+#: src/main/connections.c:2168
 #, fuzzy
 msgid "unable to open the clipboard"
 msgstr "無法開啟剪貼簿"
 
-#: src/main/connections.c:2178
+#: src/main/connections.c:2172
 #, fuzzy
 msgid "unable to write to the clipboard"
 msgstr "無法寫入剪貼簿"
 
-#: src/main/connections.c:2218
+#: src/main/connections.c:2212
 msgid "attempt to seek outside the range of the clipboard"
 msgstr "無法檢索剪貼簿範圍外的內容"
 
-#: src/main/connections.c:2261
+#: src/main/connections.c:2255
 msgid "clipboard connection is open for reading only"
 msgstr "開啟了唯讀剪貼簿連結"
 
-#: src/main/connections.c:2281
+#: src/main/connections.c:2275
 msgid "clipboard buffer is full and output lost"
 msgstr "剪貼簿緩衝區已滿,輸出資料丟失"
 
-#: src/main/connections.c:2302
+#: src/main/connections.c:2296
 msgid "'mode' for the clipboard must be 'r' or 'w'"
 msgstr "剪貼簿 'mode' 必須是 'r' 或 'w'"
 
-#: src/main/connections.c:2305
+#: src/main/connections.c:2299
 msgid "'mode' for the clipboard must be 'r' on Unix"
 msgstr "Unix 作業系統上剪貼簿 'mode' 必須是 'r'"
 
-#: src/main/connections.c:2308 src/main/connections.c:2314
-#: src/main/connections.c:2320 src/main/connections.c:2337
+#: src/main/connections.c:2302 src/main/connections.c:2308
+#: src/main/connections.c:2314 src/main/connections.c:2331
 msgid "allocation of clipboard connection failed"
 msgstr "剪貼簿連結配置失敗"
 
-#: src/main/connections.c:2406 src/main/connections.c:2410
-#: src/main/connections.c:2416
+#: src/main/connections.c:2400 src/main/connections.c:2404
+#: src/main/connections.c:2410
 msgid "allocation of terminal connection failed"
 msgstr "終端機連結配置失敗"
 
-#: src/main/connections.c:2549
+#: src/main/connections.c:2543
 msgid "attempting to add too many elements to raw vector"
 msgstr "試圖加入太多元素到純量向量"
 
-#: src/main/connections.c:2601
+#: src/main/connections.c:2595
 msgid "attempt to seek outside the range of the raw connection"
 msgstr "試圖尋指原始連接以外的範圍"
 
-#: src/main/connections.c:2612 src/main/connections.c:2616
-#: src/main/connections.c:2622 src/main/connections.c:2648
+#: src/main/connections.c:2606 src/main/connections.c:2610
+#: src/main/connections.c:2616 src/main/connections.c:2642
 msgid "allocation of raw connection failed"
 msgstr "原始連接的配置失敗"
 
-#: src/main/connections.c:2701
+#: src/main/connections.c:2695
 msgid "'con' is not a rawConnection"
 msgstr "'con' 並非 rawConnection"
 
-#: src/main/connections.c:2704
+#: src/main/connections.c:2698
 msgid "'con' is not an output rawConnection"
 msgstr "'con' 不是個輸出的 rawConnection"
 
-#: src/main/connections.c:2742
+#: src/main/connections.c:2736
 #, fuzzy
 msgid "too many characters for text connection"
 msgstr "無法給文字連結配置記憶體"
 
-#: src/main/connections.c:2747
+#: src/main/connections.c:2741
 msgid "cannot allocate memory for text connection"
 msgstr "無法給文字連結配置記憶體"
 
-#: src/main/connections.c:2796
+#: src/main/connections.c:2790
 msgid "seek is not relevant for text connection"
 msgstr "讀取對文字連結無用"
 
-#: src/main/connections.c:2804 src/main/connections.c:2808
-#: src/main/connections.c:2814 src/main/connections.c:2827
-#: src/main/connections.c:3012 src/main/connections.c:3016
-#: src/main/connections.c:3022 src/main/connections.c:3035
-#: src/main/connections.c:3041
+#: src/main/connections.c:2798 src/main/connections.c:2802
+#: src/main/connections.c:2808 src/main/connections.c:2821
+#: src/main/connections.c:3008 src/main/connections.c:3012
+#: src/main/connections.c:3018 src/main/connections.c:3031
+#: src/main/connections.c:3037
 msgid "allocation of text connection failed"
 msgstr "文字連結配置失敗"
 
-#: src/main/connections.c:2989
+#: src/main/connections.c:2983
 msgid "text connection: appending to a non-existent char vector"
 msgstr "文字連結: 不能附加給不存在的字元向量"
 
-#: src/main/connections.c:3093
+#: src/main/connections.c:3089
 msgid "unsupported mode"
 msgstr "不支援的狀態"
 
-#: src/main/connections.c:3115
+#: src/main/connections.c:3111
 msgid "'con' is not a textConnection"
 msgstr "'con' 並非 textConnection"
 
-#: src/main/connections.c:3118
+#: src/main/connections.c:3114
 msgid "'con' is not an output textConnection"
 msgstr "'con' 不是個輸出 textConnection"
 
-#: src/main/connections.c:3192
-msgid "sockets are not available on this system"
-msgstr "本系統沒有插槽這個功能"
-
-#: src/main/connections.c:3260 src/main/connections.c:3309
-#: src/main/connections.c:3320 src/main/connections.c:3367
-#: src/main/connections.c:3392 src/main/connections.c:3415
-#: src/main/connections.c:3427 src/main/connections.c:3543
-#: src/main/connections.c:3668 src/main/connections.c:5408
+#: src/main/connections.c:3254 src/main/connections.c:3303
+#: src/main/connections.c:3314 src/main/connections.c:3361
+#: src/main/connections.c:3388 src/main/connections.c:3411
+#: src/main/connections.c:3423 src/main/connections.c:3539
+#: src/main/connections.c:3664 src/main/connections.c:5489
 msgid "'con' is not a connection"
 msgstr "'con' 不是個連結"
 
-#: src/main/connections.c:3263
+#: src/main/connections.c:3257
 msgid "cannot open standard connections"
 msgstr "無法開啟標準連結"
 
-#: src/main/connections.c:3265
+#: src/main/connections.c:3259
 msgid "connection is already open"
 msgstr "連結已開啟"
 
-#: src/main/connections.c:3298
+#: src/main/connections.c:3292
 msgid "unknown 'rw' value"
 msgstr "不明的 'rw' 值"
 
-#: src/main/connections.c:3369
+#: src/main/connections.c:3363
 msgid "cannot close standard connections"
 msgstr "無法關閉標準連結"
 
-#: src/main/connections.c:3372
+#: src/main/connections.c:3366
 #, fuzzy
 msgid "cannot close 'output' sink connection"
 msgstr "無法關閉輸出匯集連結"
 
-#: src/main/connections.c:3374
+#: src/main/connections.c:3368
 #, fuzzy
 msgid "cannot close 'message' sink connection"
 msgstr "無法關閉訊息匯集連結"
 
-#: src/main/connections.c:3394 src/main/connections.c:5123
-#: src/main/connections.c:5131 src/main/serialize.c:1996
-#: src/main/serialize.c:2004
+#: src/main/connections.c:3390 src/main/connections.c:5198
+#: src/main/connections.c:5206 src/main/serialize.c:2035
+#: src/main/serialize.c:2043
 msgid "connection is not open"
 msgstr "連結沒有開啟"
 
-#: src/main/connections.c:3490 src/main/connections.c:3502
+#: src/main/connections.c:3486 src/main/connections.c:3498
 #, fuzzy
 msgid "line longer than buffer size"
 msgstr "列長大於緩衝區"
 
-#: src/main/connections.c:3574 src/main/connections.c:3576
-#: src/main/connections.c:3852 src/main/connections.c:4406
-#: src/main/connections.c:4431 src/main/connections.c:5132 src/main/dcf.c:101
-#: src/main/scan.c:936 src/main/scan.c:940 src/main/serialize.c:1998
-#: src/main/source.c:272
+#: src/main/connections.c:3570 src/main/connections.c:3572
+#: src/main/connections.c:3849 src/main/connections.c:4417
+#: src/main/connections.c:4442 src/main/connections.c:5207 src/main/dcf.c:100
+#: src/main/scan.c:936 src/main/scan.c:940 src/main/serialize.c:2037
+#: src/main/source.c:277
 msgid "cannot read from this connection"
 msgstr "無法從此連結讀取"
 
-#: src/main/connections.c:3588 src/main/connections.c:3610
+#: src/main/connections.c:3584 src/main/connections.c:3606
 msgid "cannot allocate buffer in readLines"
 msgstr "無法給 readLines 配置緩衝區"
 
-#: src/main/connections.c:3623
+#: src/main/connections.c:3619
 #, c-format
 msgid "line %d appears to contain an embedded nul"
 msgstr ""
 
-#: src/main/connections.c:3640
+#: src/main/connections.c:3636
 #, c-format
 msgid "incomplete final line found on '%s'"
 msgstr "於 '%s' 找到不完整的最後一列"
 
-#: src/main/connections.c:3646
+#: src/main/connections.c:3642
 msgid "too few lines read in readLines"
 msgstr "readLines 讀的列數不夠"
 
-#: src/main/connections.c:3749
+#: src/main/connections.c:3746
 msgid "incomplete string at end of file has been discarded"
 msgstr "忽略檔案末端不完整的字串"
 
-#: src/main/connections.c:3755
+#: src/main/connections.c:3752
 msgid "null terminator not found: breaking string at 10000 bytes"
 msgstr "空值終止符找不到:中斷字串於 10000 位元組"
 
-#: src/main/connections.c:3820
+#: src/main/connections.c:3817
 msgid "can only read from a binary connection"
 msgstr "無法讀取二進位連結"
 
-#: src/main/connections.c:3869 src/main/connections.c:4176
+#: src/main/connections.c:3866 src/main/connections.c:4187
 msgid "size changing is not supported for complex vectors"
 msgstr "不支援複數向量大小的變更"
 
-#: src/main/connections.c:3907 src/main/connections.c:3925
-#: src/main/connections.c:3951 src/main/connections.c:4010
-#: src/main/connections.c:4030 src/main/connections.c:4157
-#: src/main/connections.c:4170 src/main/connections.c:4229
-#: src/main/connections.c:4261
+#: src/main/connections.c:3905 src/main/connections.c:3923
+#: src/main/connections.c:3949 src/main/connections.c:3993
+#: src/main/connections.c:4024 src/main/connections.c:4044
+#: src/main/connections.c:4168 src/main/connections.c:4181
+#: src/main/connections.c:4240 src/main/connections.c:4272
 #, c-format
 msgid "size %d is unknown on this machine"
 msgstr "本系統沒有 %d 這樣大小的值"
 
-#: src/main/connections.c:3936
+#: src/main/connections.c:3934
 msgid "raw is always of size 1"
 msgstr "raw 的大小只能是 1"
 
-#: src/main/connections.c:3959
+#: src/main/connections.c:3957
 msgid "'signed = FALSE' is only valid for integers of sizes 1 and 2"
 msgstr "'signed = FALSE' 用對於大小為 1 和 2 的整數有效"
 
-#: src/main/connections.c:4060
+#: src/main/connections.c:4071
 msgid "'x' is not an atomic vector type"
 msgstr "'x' 非基元向量類型"
 
-#: src/main/connections.c:4066
+#: src/main/connections.c:4077
 msgid "can only write to a binary connection"
 msgstr "只能寫入二進位連結"
 
-#: src/main/connections.c:4085
+#: src/main/connections.c:4096
 msgid "only 2^31-1 bytes can be written to a raw vector"
 msgstr "只有 2^31-1 位元組可以被寫入純量向量"
 
-#: src/main/connections.c:4087
+#: src/main/connections.c:4098
 msgid "only 2^31-1 bytes can be written in a single writeBin() call"
 msgstr "只有 2^31-1 位元組可以被寫入單一 writeBin() 呼叫"
 
-#: src/main/connections.c:4136 src/main/connections.c:4289
-#: src/main/connections.c:4570 src/main/connections.c:4610
+#: src/main/connections.c:4147 src/main/connections.c:4300
+#: src/main/connections.c:4581 src/main/connections.c:4621
 msgid "problem writing to connection"
 msgstr "寫入連結有問題"
 
-#: src/main/connections.c:4181
+#: src/main/connections.c:4192
 msgid "size changing is not supported for raw vectors"
 msgstr "不支援純量向量大小的變更"
 
-#: src/main/connections.c:4324 src/main/connections.c:4328
-#: src/main/connections.c:4367
+#: src/main/connections.c:4335 src/main/connections.c:4339
+#: src/main/connections.c:4378
 msgid "invalid UTF-8 input in readChar()"
 msgstr "readChar() 的 UTF-8 輸入不正確"
 
-#: src/main/connections.c:4434
+#: src/main/connections.c:4445
 msgid "can only read in bytes in a non-UTF-8 MBCS locale"
 msgstr "在非 UTF-8 MBCS 語區中只能以位元組為單位讀取"
 
-#: src/main/connections.c:4506
+#: src/main/connections.c:4517
 msgid "'object' is too short"
 msgstr "'object' 太短"
 
-#: src/main/connections.c:4559
+#: src/main/connections.c:4570
 msgid "writeChar: more bytes requested than are in the string - will zero-pad"
 msgstr "writeChar:要求的位元組比字串中的還多 - 將用零填補"
 
-#: src/main/connections.c:4584
+#: src/main/connections.c:4595
 msgid ""
 "writeChar: more characters requested than are in the string - will zero-pad"
 msgstr "writeChar:字串的長度比需要的位元組數目短 - 將用零填補"
 
-#: src/main/connections.c:4638
+#: src/main/connections.c:4649
 #, fuzzy
 msgid "maximum number of pushback lines exceeded"
 msgstr "顏色的數目已超過最大值"
 
-#: src/main/connections.c:4644 src/main/connections.c:4648
-#: src/main/connections.c:4685 src/main/connections.c:4693
+#: src/main/connections.c:4655 src/main/connections.c:4659
+#: src/main/connections.c:4696 src/main/connections.c:4704
 #, fuzzy
 msgid "could not allocate space for pushback"
 msgstr "無法為 pushBack 配置空間"
 
-#: src/main/connections.c:4676
+#: src/main/connections.c:4687
 msgid "can only push back on open readable connections"
 msgstr "只能推回已開啟的可讀連結"
 
-#: src/main/connections.c:4678
+#: src/main/connections.c:4689
 msgid "can only push back on text-mode connections"
 msgstr "只能推回文字狀態的連結"
 
-#: src/main/connections.c:4740 src/main/connections.c:4810
+#: src/main/connections.c:4753 src/main/connections.c:4823
 msgid "sink stack is full"
 msgstr "匯集堆疊已滿"
 
-#: src/main/connections.c:4743
+#: src/main/connections.c:4756
 msgid "cannot switch output to stdin"
 msgstr "無法將輸出轉往stdin"
 
-#: src/main/connections.c:4770
+#: src/main/connections.c:4783
 msgid "no sink to remove"
 msgstr "沒有可以除去的匯集"
 
-#: src/main/connections.c:4892
+#: src/main/connections.c:4903
 #, fuzzy
 msgid "there is no connection NA"
 msgstr "沒有任何連接 %d"
 
-#: src/main/connections.c:4894
+#: src/main/connections.c:4905
 #, c-format
 msgid "there is no connection %d"
 msgstr "沒有任何連接 %d"
 
-#: src/main/connections.c:5029
+#: src/main/connections.c:5039
+#, fuzzy
+msgid "method = \"wininet\" is only supported on Windows"
+msgstr "本平臺不支援 nsl()"
+
+#: src/main/connections.c:5103
 msgid ""
 "file(\"\") only supports open = \"w+\" and open = \"w+b\": using the former"
 msgstr "file(\"\") 只支援 open = \"w+\" 與 open = \"w+b\": 使用前者"
 
-#: src/main/connections.c:5083 src/modules/internet/internet.c:115
-#: src/modules/internet/internet.c:569
-msgid "unsupported URL scheme"
-msgstr "不支援這種 URL 方案"
+#: src/main/connections.c:5157
+#, fuzzy
+msgid "URL scheme unsupported by this method"
+msgstr "這個組建不支援 ICU"
 
-#: src/main/connections.c:5173
+#: src/main/connections.c:5253
 msgid "file stream does not have gzip magic number"
 msgstr "檔案串流沒有 gzip 魔術數字"
 
-#: src/main/connections.c:5184
+#: src/main/connections.c:5264
 msgid "file stream does not have valid gzip header"
 msgstr "檔案串流的 gzip 表頭不正確"
 
-#: src/main/connections.c:5249
+#: src/main/connections.c:5329
 msgid "writing error whilst flushing 'gzcon' connection"
 msgstr "清除 'gzcon' 連結時寫入發生錯誤"
 
-#: src/main/connections.c:5351
+#: src/main/connections.c:5431
 #, c-format
 msgid "crc error %x %x\n"
 msgstr "crc 錯誤 %x %x\n"
 
-#: src/main/connections.c:5378
+#: src/main/connections.c:5458
 msgid "write error on 'gzcon' connection"
 msgstr "'gzcon' 連結寫入發生錯誤"
 
-#: src/main/connections.c:5412
+#: src/main/connections.c:5493
 msgid "'level' must be one of 0 ... 9"
 msgstr "'level' 必須是 0...9 之一"
 
-#: src/main/connections.c:5415
+#: src/main/connections.c:5496
 msgid "'allowNonCompression' must be TRUE or FALSE"
 msgstr "'allowNonCompression' 的值必須是 TRUE 或是 FALSE"
 
-#: src/main/connections.c:5418
+#: src/main/connections.c:5499
+#, fuzzy
+msgid "'text' must be TRUE or FALSE"
+msgstr "'all.x' 必須是 TRUE 或 FALSE"
+
+#: src/main/connections.c:5502
 #, fuzzy
 msgid "this is already a 'gzcon' connection"
 msgstr "這已經是 gzcon 連結"
 
-#: src/main/connections.c:5424
+#: src/main/connections.c:5508
 msgid "can only use read- or write- binary connections"
 msgstr "只用讀或寫的二元連結"
 
-#: src/main/connections.c:5427
+#: src/main/connections.c:5511
 msgid "using a text-mode 'file' connection may not work correctly"
 msgstr "使用某個文字模式 'file' 連結可能不會正確作用"
 
-#: src/main/connections.c:5430
+#: src/main/connections.c:5514
 #, fuzzy
 msgid ""
 "cannot create a 'gzcon' connection from a writable textConnection; maybe use "
 "rawConnection"
 msgstr "無法從可寫入的 textConnection 建立 gzcon 連接;也許使用 rawConnection"
 
-#: src/main/connections.c:5433 src/main/connections.c:5437
-#: src/main/connections.c:5444 src/main/connections.c:5458
+#: src/main/connections.c:5517 src/main/connections.c:5521
+#: src/main/connections.c:5528 src/main/connections.c:5542
 msgid "allocation of 'gzcon' connection failed"
 msgstr "配置 'gzcon' 連結失敗"
 
-#: src/main/connections.c:5644
+#: src/main/connections.c:5729
 msgid "not a list of sockets"
 msgstr "非插槽串列"
 
-#: src/main/connections.c:5649
+#: src/main/connections.c:5734
 msgid "bad write indicators"
 msgstr "寫入指示器不正確"
 
-#: src/main/connections.c:5660
+#: src/main/connections.c:5745
 msgid "not a socket connection"
 msgstr "非插槽連結"
 
-#: src/main/connections.c:5905
+#: src/main/connections.c:5990
 msgid "unknown compression, assuming none"
 msgstr "不明壓縮,假設為沒有"
 
-#: src/main/connections.c:6023 src/main/connections.c:6027
-#: src/main/connections.c:6033
+#: src/main/connections.c:6108 src/main/connections.c:6112
+#: src/main/connections.c:6118
 #, fuzzy, c-format
 msgid "allocation of %s connection failed"
 msgstr "原始連接的配置失敗"
 
-#: src/main/context.c:282
+#: src/main/context.c:316
 msgid "no loop for break/next, jumping to top level"
 msgstr "沒有可中斷/下一個的迴圈,跳到頂層"
 
-#: src/main/context.c:290
+#: src/main/context.c:324
 msgid "no function to return from, jumping to top level"
 msgstr "沒有可回返的函數, 跳到最高層"
 
-#: src/main/context.c:302
+#: src/main/context.c:339
 msgid "target context is not on the stack"
 msgstr "目的上下文不在堆疊上"
 
-#: src/main/context.c:324 src/main/context.c:340 src/main/context.c:407
-#: src/main/context.c:428 src/main/context.c:440 src/main/context.c:452
+#: src/main/context.c:361 src/main/context.c:377 src/main/context.c:444
+#: src/main/context.c:465 src/main/context.c:477 src/main/context.c:489
 msgid "not that many frames on the stack"
 msgstr "堆疊上沒有這麼多的框格"
 
-#: src/main/context.c:357
+#: src/main/context.c:394
 msgid "only positive values of 'n' are allowed"
 msgstr "'n' 只允許是正數"
 
-#: src/main/context.c:478
-msgid "no function to restart"
-msgstr "沒有重新開始的功能"
-
-#: src/main/context.c:515
+#: src/main/context.c:526
 msgid "number of contexts must be positive"
 msgstr "狀態組合數量必須是正值"
 
-#: src/main/context.c:528
+#: src/main/context.c:539
 msgid "no browser context to query"
 msgstr "無瀏覽器狀態組合到查詢"
 
-#: src/main/context.c:546
+#: src/main/context.c:557
 msgid "not that many calls to browser are active"
 msgstr "無法有那麼多對於瀏覽器的呼叫作用中"
 
-#: src/main/context.c:560
+#: src/main/context.c:571
 msgid "not that many functions on the call stack"
 msgstr "無法有那麼多函數在呼叫堆疊之上"
 
-#: src/main/context.c:645
+#: src/main/context.c:656
 msgid "internal error in 'do_sys'"
 msgstr "內部錯誤 'do_sys'"
 
@@ -2381,40 +2436,40 @@ msgstr "內部錯誤 'do_sys'"
 msgid "integer overflow in 'cumsum'; use 'cumsum(as.numeric(.))'"
 msgstr "'cumsum' 中的整數溢位;使用 'cumsum(as.numeric(.))'"
 
-#: src/main/cum.c:178
+#: src/main/cum.c:179
 #, fuzzy
-msgid "'cummin' not defined for complex numbers"
+msgid "'cummax' not defined for complex numbers"
 msgstr "min/max 不能適用於複數"
 
-#: src/main/cum.c:181
+#: src/main/cum.c:182
 #, fuzzy
-msgid "'cummax' not defined for complex numbers"
+msgid "'cummin' not defined for complex numbers"
 msgstr "min/max 不能適用於複數"
 
-#: src/main/cum.c:206 src/main/cum.c:230
+#: src/main/cum.c:209 src/main/cum.c:236
 msgid "unknown cumxxx function"
 msgstr "不明的 cumxxx 功能"
 
-#: src/main/datetime.c:548 src/main/datetime.c:556 src/main/datetime.c:570
-#: src/main/datetime.c:575
+#: src/main/datetime.c:554 src/main/datetime.c:562 src/main/datetime.c:576
+#: src/main/datetime.c:581
 msgid "problem with setting timezone"
 msgstr "設定時區時發生問題"
 
-#: src/main/datetime.c:560
+#: src/main/datetime.c:566
 msgid "cannot set timezones on this system"
 msgstr "無法為本系統設定時區"
 
-#: src/main/datetime.c:582 src/main/datetime.c:584
+#: src/main/datetime.c:588 src/main/datetime.c:590
 msgid "problem with unsetting timezone"
 msgstr "解除設定時區發生問題"
 
-#: src/main/datetime.c:804 src/main/datetime.c:806 src/main/datetime.c:901
-#: src/main/datetime.c:1240 src/main/datetime.c:1242
+#: src/main/datetime.c:810 src/main/datetime.c:812 src/main/datetime.c:908
+#: src/main/datetime.c:1258 src/main/datetime.c:1260
 #, fuzzy
 msgid "zero-length component in non-empty \"POSIXlt\" structure"
 msgstr "非空的 POSIXlt 結構內含長度為零的成分"
 
-#: src/main/dcf.c:113 src/main/dcf.c:181 src/main/dcf.c:253
+#: src/main/dcf.c:112 src/main/dcf.c:181 src/main/dcf.c:253
 msgid "could not allocate memory for 'read.dcf'"
 msgstr "無法為 'read.dcf' 配置記憶體"
 
@@ -2428,80 +2483,86 @@ msgstr "於記錄開始找到起始 '%s…' 的連續列。"
 msgid "Line starting '%s ...' is malformed!"
 msgstr "起始 '%s…' 的列異常!"
 
-#: src/main/debug.c:45
-msgid "argument must be a closure"
-msgstr "引數必須是個結束"
-
-#: src/main/debug.c:76
+#: src/main/debug.c:46 src/main/debug.c:76
 msgid "argument must be a function"
 msgstr "引數必須是個函數"
 
-#: src/main/debug.c:132 src/main/debug.c:166 src/main/debug.c:224
+#: src/main/debug.c:111
+#, fuzzy, c-format
+msgid "Value for '%s' must be TRUE or FALSE"
+msgstr "'all.x' 必須是 TRUE 或 FALSE"
+
+#: src/main/debug.c:139 src/main/debug.c:167 src/main/debug.c:241
 msgid "argument must not be a function"
 msgstr "引數必須不是函數"
 
-#: src/main/debug.c:135
+#: src/main/debug.c:142
 msgid "cannot trace NULL"
 msgstr "無法追蹤空值"
 
-#: src/main/debug.c:139
+#: src/main/debug.c:146
 msgid "'tracemem' is not useful for promise and environment objects"
 msgstr "'tracemem' 對於約定和環境物件不太有用"
 
-#: src/main/debug.c:142
+#: src/main/debug.c:149
 msgid "'tracemem' is not useful for weak reference or external pointer objects"
 msgstr "'tracemem' 對於弱型參考或外部指標物件不太有用"
 
-#: src/main/debug.c:148 src/main/debug.c:171
+#: src/main/debug.c:180 src/main/debug.c:187
 msgid "R was not compiled with support for memory profiling"
 msgstr "R 未被編譯以支援記憶體側寫"
 
-#: src/main/deparse.c:152 src/main/sprintf.c:213 src/main/sprintf.c:245
+#: src/main/deparse.c:156 src/main/sprintf.c:216 src/main/sprintf.c:248
 msgid "too few arguments"
 msgstr "引數數目太少"
 
-#: src/main/deparse.c:159
+#: src/main/deparse.c:163
 #, fuzzy
 msgid "invalid 'cutoff' value for 'deparse', using default"
 msgstr "deparse的 'cutoff' 值不正確,用預設值"
 
-#: src/main/deparse.c:247
+#: src/main/deparse.c:254
 msgid "deparse of an S4 object will not be source()able"
 msgstr "S4 物件的反解析將無法進行 source()"
 
-#: src/main/deparse.c:249
+#: src/main/deparse.c:256
 msgid "deparse may be incomplete"
 msgstr "反解析可能不完整"
 
-#: src/main/deparse.c:251
+#: src/main/deparse.c:258
 msgid "deparse may be not be source()able in R < 2.7.0"
 msgstr "反解析也許無法在 R < 2.7.0 中進行 source()"
 
-#: src/main/deparse.c:369 src/main/deparse.c:461 src/main/deparse.c:467
+#: src/main/deparse.c:350 src/main/deparse.c:400 src/main/source.c:206
+#, fuzzy
+msgid "'file' must be a character string or connection"
+msgstr "'what' 必須是字串或函數"
+
+#: src/main/deparse.c:378 src/main/deparse.c:473 src/main/deparse.c:479
 msgid "wrote too few characters"
 msgstr "字元寫得不夠"
 
-#: src/main/deparse.c:391
+#: src/main/deparse.c:402
 msgid "character arguments expected"
 msgstr "需要字元引數"
 
-#: src/main/deparse.c:394
+#: src/main/deparse.c:405
 #, fuzzy
 msgid "zero-length argument"
 msgstr "引數長度為零"
 
-#: src/main/deparse.c:401
+#: src/main/deparse.c:412
 msgid "'opts' should be small non-negative integer"
 msgstr "'opts' 應該是小的非負值整數"
 
-#: src/main/deparse.c:411 src/main/envir.c:1764 src/main/envir.c:1846
-#: src/main/eval.c:569 src/main/eval.c:1251 src/main/eval.c:3627
-#: src/main/saveload.c:1978 src/main/saveload.c:2309 src/main/serialize.c:2727
+#: src/main/deparse.c:422 src/main/envir.c:1898 src/main/envir.c:1983
+#: src/main/eval.c:626 src/main/eval.c:1423 src/main/eval.c:4246
+#: src/main/saveload.c:1980 src/main/saveload.c:2312 src/main/serialize.c:2773
 #, c-format
 msgid "object '%s' not found"
 msgstr "找不到物件 '%s'"
 
-#: src/main/deparse.c:1519
+#: src/main/deparse.c:1592
 msgid "badly formed function expression"
 msgstr "不當形式的函數敘述"
 
@@ -2510,249 +2571,234 @@ msgstr "不當形式的函數敘述"
 msgid "the base graphics system is not registered"
 msgstr "登記了太多的繪圖系統"
 
-#: src/main/devices.c:165 src/main/devices.c:172
+#: src/main/devices.c:166 src/main/devices.c:174
 msgid "no active or default device"
 msgstr "沒有在使用中的或預設的裝置"
 
-#: src/main/devices.c:385 src/main/devices.c:447
+#: src/main/devices.c:388 src/main/devices.c:450
 msgid "too many open devices"
 msgstr "太多已經開啟的裝置"
 
-#: src/main/devices.c:474
+#: src/main/devices.c:491
 msgid "not enough memory to allocate device (in GEcreateDevDesc)"
 msgstr "所需記憶體不足以配置裝置 (在 GEcreateDevDesc 中)"
 
-#: src/main/devices.c:515
+#: src/main/devices.c:532
 msgid "Hit <Return> to see next plot: "
 msgstr "按 <return> 鍵來看下一張圖: "
 
-#: src/main/dotcode.c:112 src/main/dotcode.c:142
+#: src/main/dotcode.c:127 src/main/dotcode.c:157
 msgid "NULL value passed as symbol address"
 msgstr "NULL 值被當作符號位址"
 
-#: src/main/dotcode.c:133
+#: src/main/dotcode.c:148
 #, c-format
 msgid "Unimplemented type %d in createRSymbolObject"
 msgstr "createRSymbolObject 中的類型 %d 尚未被實作"
 
-#: src/main/dotcode.c:147 src/main/dotcode.c:237
+#: src/main/dotcode.c:162 src/main/dotcode.c:260
 #, c-format
 msgid "symbol '%s' is too long"
 msgstr "符號 '%s' 太長"
 
-#: src/main/dotcode.c:159
+#: src/main/dotcode.c:174
 #, fuzzy
 msgid ""
 "first argument must be a string (of length 1) or native symbol reference"
 msgstr "'name' 必須是字串 (長度為 1) 或是原生符號參照"
 
-#: src/main/dotcode.c:201 src/main/dotcode.c:563
+#: src/main/dotcode.c:224 src/main/dotcode.c:1240
 msgid "too many arguments in foreign function call"
 msgstr "外接函數呼叫時引數太多"
 
-#: src/main/dotcode.c:213
+#: src/main/dotcode.c:236
 msgid "PACKAGE = \"\" is invalid"
 msgstr ""
 
-#: src/main/dotcode.c:269 src/main/dotcode.c:274 src/main/dotcode.c:279
-#: src/main/dotcode.c:284
+#: src/main/dotcode.c:292 src/main/dotcode.c:297 src/main/dotcode.c:302
+#: src/main/dotcode.c:307
 #, fuzzy, c-format
 msgid "\"%s\" not available for %s() for package \"%s\""
 msgstr "這個裝置無法使用 %s "
 
-#: src/main/dotcode.c:289
+#: src/main/dotcode.c:312
 #, c-format
 msgid "%s symbol name \"%s\" not in DLL for package \"%s\""
 msgstr "套件 \"%3$s\" 的 DLL 中沒有 %1$s 的符號名稱 \"%2$s\""
 
-#: src/main/dotcode.c:294
+#: src/main/dotcode.c:317
 #, c-format
 msgid "%s symbol name \"%s\" not in load table"
 msgstr "載入表中沒有 %s 的符號名稱 \"%s\""
 
-#: src/main/dotcode.c:348 src/main/dotcode.c:352 src/main/dotcode.c:362
-#: src/main/dotcode.c:427 src/main/dotcode.c:434
+#: src/main/dotcode.c:368 src/main/dotcode.c:370 src/main/dotcode.c:380
+#: src/main/dotcode.c:445 src/main/dotcode.c:452
 #, fuzzy, c-format
 msgid "'%s' used more than once"
 msgstr "DUP 被使用超過一次"
 
-#: src/main/dotcode.c:358
+#: src/main/dotcode.c:376
 msgid "DLL name is too long"
 msgstr "DLL 的名稱太長"
 
-#: src/main/dotcode.c:403
+#: src/main/dotcode.c:421
 msgid "PACKAGE argument must be a single character string"
 msgstr "PACKAGE 引數必須是單字元字串"
 
-#: src/main/dotcode.c:409
+#: src/main/dotcode.c:427
 msgid "PACKAGE argument is too long"
 msgstr "PACKAGE 引數太長"
 
-#: src/main/dotcode.c:474
+#: src/main/dotcode.c:492
 msgid "no arguments supplied"
 msgstr "沒有提供引數"
 
-#: src/main/dotcode.c:475 src/main/seq.c:913
+#: src/main/dotcode.c:493 src/main/seq.c:911
 msgid "too many arguments"
 msgstr "引數太多"
 
-#: src/main/dotcode.c:512 src/main/dotcode.c:554 src/main/dotcode.c:1397
+#: src/main/dotcode.c:530 src/main/dotcode.c:1232 src/main/dotcode.c:1420
 #, fuzzy
 msgid "'.NAME' is missing"
 msgstr "缺少 'EXPR'"
 
-#: src/main/dotcode.c:521 src/main/dotcode.c:570 src/main/dotcode.c:1418
+#: src/main/dotcode.c:539 src/main/dotcode.c:1247 src/main/dotcode.c:1441
 #, c-format
 msgid "Incorrect number of arguments (%d), expecting %d for '%s'"
 msgstr "不正確的引數數量 (%d),預期為 %d 用於 '%s'"
 
-#: src/main/dotcode.c:1227 src/main/dotcode.c:2276
+#: src/main/dotcode.c:1216 src/main/dotcode.c:2290
 msgid "too many arguments, sorry"
 msgstr "對不起,引數太多"
 
-#: src/main/dotcode.c:1261 src/main/dotcode.c:1278 src/main/engine.c:2993
+#: src/main/dotcode.c:1284 src/main/dotcode.c:1301 src/main/engine.c:3013
 msgid "invalid graphics state"
 msgstr "繪圖狀態不正確"
 
-#: src/main/dotcode.c:1357
+#: src/main/dotcode.c:1380
 msgid "NULL value for DLLInfoReference when looking for DLL"
 msgstr "尋找 DLL 時 DLLInfoReference 的值是 NULL"
 
-#: src/main/dotcode.c:1458
+#: src/main/dotcode.c:1481
 #, fuzzy, c-format
 msgid "wrong type for argument %d in call to %s"
 msgstr "呼叫 %2$s 時引數 %1$d 的類型不正確"
 
-#: src/main/dotcode.c:1470
-#, c-format
-msgid ""
-"explicit request not to duplicate arguments in call to '%s', but argument %d "
-"is of the wrong type (%d != %d)"
-msgstr "呼叫 '%s' 時明確要求不要複製引數,但引數 %d 的類型不正確 (%d != %d)"
-
-#: src/main/dotcode.c:1493
+#: src/main/dotcode.c:1510
 #, fuzzy, c-format
 msgid "long vectors (argument %d) are not supported in %s"
 msgstr "這個平臺不支援符號連結"
 
-#: src/main/dotcode.c:1524
+#: src/main/dotcode.c:1541
 #, c-format
 msgid "NAs in foreign function call (arg %d)"
 msgstr "外部函數呼叫時不能有 NA (引數 %d)"
 
-#: src/main/dotcode.c:1547
+#: src/main/dotcode.c:1564
 #, c-format
 msgid "NA/NaN/Inf in foreign function call (arg %d)"
 msgstr "外部函數呼叫時不能有 NA/NaN/Inf (引數 %d)"
 
-#: src/main/dotcode.c:1552
-msgid "single values not returned if not duplicated"
-msgstr ""
-
-#: src/main/dotcode.c:1578
+#: src/main/dotcode.c:1594
 #, c-format
 msgid "complex NA/NaN/Inf in foreign function call (arg %d)"
 msgstr "外部函數呼叫時不能有複數的 NA/NaN/Inf (引數 %d)"
 
-#: src/main/dotcode.c:1597
-msgid "character variables must be duplicated in .C/.Fortran"
-msgstr "在呼叫 .C/.Fortran 時字元變數必須被複製"
-
-#: src/main/dotcode.c:1602
+#: src/main/dotcode.c:1616
 msgid "only first string in char vector used in .Fortran"
 msgstr ".Fortran 只用了位元組向量中的第一個字串"
 
-#: src/main/dotcode.c:1645 src/main/dotcode.c:1661 src/main/dotcode.c:1672
+#: src/main/dotcode.c:1659 src/main/dotcode.c:1675 src/main/dotcode.c:1686
 #, fuzzy, c-format
 msgid "invalid mode (%s) to pass to Fortran (arg %d)"
 msgstr "傳給 Fortran 的狀態發生錯誤 (引數 %d)"
 
-#: src/main/dotcode.c:1666
+#: src/main/dotcode.c:1680
 #, fuzzy, c-format
 msgid "invalid mode (%s) to pass to C or Fortran (arg %d)"
 msgstr "傳給 Fortran 的狀態發生錯誤 (引數 %d)"
 
-#: src/main/dotcode.c:1677
+#: src/main/dotcode.c:1691
 msgid "pairlists are passed as SEXP as from R 2.15.0"
 msgstr ""
 
-#: src/main/dotcode.c:2499
+#: src/main/dotcode.c:2510
 #, c-format
 msgid "type \"%s\" not supported in interlanguage calls"
 msgstr "語言間呼叫不支援此一類型 \"%s\""
 
-#: src/main/dotcode.c:2604
+#: src/main/dotcode.c:2615
 #, c-format
 msgid "mode '%s' is not supported in call_R"
 msgstr "call_R 不支援 '%s' 型式"
 
-#: src/main/dounzip.c:171
+#: src/main/dounzip.c:172
 #, c-format
 msgid " not overwriting file '%s"
 msgstr " 無法覆寫檔案 '%s"
 
-#: src/main/dounzip.c:256
+#: src/main/dounzip.c:257
 #, c-format
 msgid "zip file '%s' cannot be opened"
 msgstr "zip 檔案 '%s' 無法開啟"
 
-#: src/main/dounzip.c:312
+#: src/main/dounzip.c:313
 msgid "invalid zip name argument"
 msgstr "zip 名稱引數不正確"
 
-#: src/main/dounzip.c:315 src/main/dounzip.c:409
+#: src/main/dounzip.c:316 src/main/dounzip.c:410
 msgid "zip path is too long"
 msgstr "zip 路徑太長"
 
-#: src/main/dounzip.c:332
+#: src/main/dounzip.c:333
 msgid "'exdir' is too long"
 msgstr "'exdir' 太長"
 
-#: src/main/dounzip.c:335
+#: src/main/dounzip.c:336
 msgid "'exdir' does not exist"
 msgstr "'exdir' 不存在"
 
-#: src/main/dounzip.c:363
+#: src/main/dounzip.c:364
 msgid "requested file not found in the zip file"
 msgstr "您所要求的檔案在 zip 檔案中沒有"
 
-#: src/main/dounzip.c:366
+#: src/main/dounzip.c:367
 msgid "zip file is corrupt"
 msgstr "zip 檔案有損壞"
 
-#: src/main/dounzip.c:369
+#: src/main/dounzip.c:370
 msgid "CRC error in zip file"
 msgstr "zip 檔案出現 CRC 錯誤"
 
-#: src/main/dounzip.c:376
+#: src/main/dounzip.c:377
 msgid "write error in extracting from zip file"
 msgstr "抽取 zip 檔案時出了寫入錯誤"
 
-#: src/main/dounzip.c:379
+#: src/main/dounzip.c:380
 #, c-format
 msgid "error %d in extracting from zip file"
 msgstr "從 zip 檔案中解開 %d 時發生錯誤"
 
-#: src/main/dounzip.c:404
+#: src/main/dounzip.c:405
 msgid "unz connections can only be opened for reading"
 msgstr "unz 連結可讀不可寫"
 
-#: src/main/dounzip.c:415
+#: src/main/dounzip.c:416
 #, fuzzy
 msgid "invalid description of 'unz' connection"
 msgstr "unz 連結的描述不正確"
 
-#: src/main/dounzip.c:421
+#: src/main/dounzip.c:422
 #, c-format
 msgid "cannot open zip file '%s'"
 msgstr "無法開啟 zip 檔案 '%s'"
 
-#: src/main/dounzip.c:425
+#: src/main/dounzip.c:426
 #, c-format
 msgid "cannot locate file '%s' in zip file '%s'"
 msgstr "找不到在 zip 檔案 '%2$s' 中的 %1$s 檔案"
 
-#: src/main/dounzip.c:469
+#: src/main/dounzip.c:470
 msgid "printing not enabled for this connection"
 msgstr "此連結無法列印"
 
@@ -2760,8 +2806,8 @@ msgstr "此連結無法列印"
 msgid "write not enabled for this connection"
 msgstr "無法寫入這個連結"
 
-#: src/main/dounzip.c:496 src/main/dounzip.c:500 src/main/dounzip.c:506
-#: src/main/dounzip.c:523
+#: src/main/dounzip.c:494 src/main/dounzip.c:498 src/main/dounzip.c:504
+#: src/main/dounzip.c:521
 #, fuzzy
 msgid "allocation of 'unz' connection failed"
 msgstr "配置 unz 連結失敗"
@@ -2778,7 +2824,7 @@ msgstr "無效的主體引數用於 'function'"
 msgid "invalid argument to edit()"
 msgstr "edit() 引數不正確"
 
-#: src/main/edit.c:121 src/main/saveload.c:2076
+#: src/main/edit.c:121 src/main/saveload.c:2078
 msgid "unable to open file"
 msgstr "無法開啟檔案"
 
@@ -2842,12 +2888,12 @@ msgid "no graphics system to unregister"
 msgstr "沒有可以取消登記的繪圖系統"
 
 #: src/main/engine.c:443 src/main/engine.c:448 src/main/engine.c:456
-#: src/main/engine.c:463 src/main/engine.c:477 src/modules/X11/devX11.c:1157
+#: src/main/engine.c:463 src/main/engine.c:477 src/modules/X11/devX11.c:1159
 msgid "invalid line end"
 msgstr "線條終點發生錯誤"
 
 #: src/main/engine.c:508 src/main/engine.c:513 src/main/engine.c:521
-#: src/main/engine.c:528 src/main/engine.c:542 src/modules/X11/devX11.c:1175
+#: src/main/engine.c:528 src/main/engine.c:542 src/modules/X11/devX11.c:1177
 msgid "invalid line join"
 msgstr "線條接合發生錯誤"
 
@@ -2880,84 +2926,98 @@ msgstr "點陣潤算尚未於這個裝置上實作"
 msgid "raster capture is not available for this device"
 msgstr "點陣擷取於這個裝置上無法使用"
 
-#: src/main/engine.c:1656
+#: src/main/engine.c:1662
 #, c-format
 msgid "font face %d not supported for font family '%s'"
 msgstr "字模家族 '%2$s' 中沒有字模 %1$d"
 
-#: src/main/engine.c:1972
+#: src/main/engine.c:1978
 msgid "no graphics device is active"
 msgstr "沒有作用中的繪圖裝置"
 
-#: src/main/engine.c:2049
+#: src/main/engine.c:2055
 #, c-format
 msgid "pch value '%d' is invalid in this locale"
 msgstr "pch 值 '%d' 在這個語區中無效"
 
-#: src/main/engine.c:2307
+#: src/main/engine.c:2313
 #, c-format
 msgid "unimplemented pch value '%d'"
 msgstr "尚未實作pch '%d' 的值"
 
-#: src/main/engine.c:2330
+#: src/main/engine.c:2336
 #, c-format
 msgid "invalid axis extents [GEPretty(.,.,n=%d)"
 msgstr "座標範圍不正確 [GEPretty(.,.,n=%d)"
 
-#: src/main/engine.c:2334
+#: src/main/engine.c:2340
 #, c-format
 msgid "infinite axis extents [GEPretty(%g,%g,%d)]"
 msgstr "無限的座標範圍值 [GEPretty(%g,%g,%d)]"
 
-#: src/main/engine.c:2371
+#: src/main/engine.c:2377
 #, c-format
 msgid " .. GEPretty(.): new *lo = %g < %g = x1"
 msgstr " .. GEPretty(.): new *lo =%g <%g = x1"
 
-#: src/main/engine.c:2373
+#: src/main/engine.c:2379
 #, c-format
 msgid " .. GEPretty(.): new *up = %g > %g = x2"
 msgstr " .. GEPretty(.): new *up =%g >%g = x2"
 
-#: src/main/engine.c:2773
+#: src/main/engine.c:2784
 #, fuzzy
 msgid "display list redraw incomplete"
 msgstr "顯示串列重新整理時不完整"
 
-#: src/main/engine.c:2777
+#: src/main/engine.c:2788
 #, fuzzy
 msgid "invalid display list"
 msgstr "引數串列不正確"
 
-#: src/main/engine.c:2963
+#: src/main/engine.c:2900
+#, c-format
+msgid ""
+"snapshot recorded with different graphics engine version (pre 11 - this is "
+"version %d)"
+msgstr ""
+
+#: src/main/engine.c:2904
+#, c-format
+msgid ""
+"snapshot recorded with different graphics engine version (%d - this is "
+"version %d)"
+msgstr ""
+
+#: src/main/engine.c:2983
 msgid "'expr' argument must be an expression"
 msgstr "'expr' 引數必須是運算式"
 
-#: src/main/engine.c:2965
+#: src/main/engine.c:2985
 msgid "'list' argument must be a list"
 msgstr "'list' 引數必須是串列"
 
-#: src/main/engine.c:2971
+#: src/main/engine.c:2991
 msgid "'env' argument must be an environment"
 msgstr "'env' 引數必須是環境物件"
 
-#: src/main/engine.c:3051 src/main/engine.c:3059
+#: src/main/engine.c:3071 src/main/engine.c:3079
 msgid "invalid multibyte char in pch=\"c\""
 msgstr "pch=\"c\" 中的多位元組字元不正確"
 
-#: src/main/engine.c:3106
+#: src/main/engine.c:3126
 msgid "invalid hex digit in 'color' or 'lty'"
 msgstr "十六進位 'color' 設定或 'lty' 設定不正確"
 
-#: src/main/engine.c:3129
+#: src/main/engine.c:3149
 msgid "invalid line type: must be length 2, 4, 6 or 8"
 msgstr "無效的列類型: 長度必須是 2, 4, 6 或 8"
 
-#: src/main/engine.c:3133
+#: src/main/engine.c:3153
 msgid "invalid line type: zeroes are not allowed"
 msgstr "無效的線條類型:不允許多個零"
 
-#: src/main/engine.c:3142 src/main/engine.c:3150 src/main/engine.c:3157
+#: src/main/engine.c:3162 src/main/engine.c:3170 src/main/engine.c:3177
 msgid "invalid line type"
 msgstr "無效的列類型"
 
@@ -2966,702 +3026,710 @@ msgstr "無效的列類型"
 msgid "cannot change value of locked binding for '%s'"
 msgstr "無法變更用於 '%s' 的鎖定繫結值"
 
-#: src/main/envir.c:251 src/main/envir.c:1454
+#: src/main/envir.c:251 src/main/envir.c:1530
 msgid "cannot add bindings to a locked environment"
 msgstr "無法給鎖定環境加上繫結"
 
-#: src/main/envir.c:772
+#: src/main/envir.c:775
 msgid "invalid cached value in R_GetGlobalCache"
 msgstr "R_GetGlobalCache 中的快取值不正確"
 
-#: src/main/envir.c:830
+#: src/main/envir.c:836
 msgid "cannot unbind in the base namespace"
 msgstr "無法在基本命名空間中切斷繫結"
 
-#: src/main/envir.c:832
+#: src/main/envir.c:838
 msgid "unbind in the base environment is unimplemented"
 msgstr "尚未實作在基本環境中解除繫結"
 
-#: src/main/envir.c:834 src/main/envir.c:1684
+#: src/main/envir.c:840 src/main/envir.c:1818
 msgid "cannot remove bindings from a locked environment"
 msgstr "無法從鎖定的環境中刪除繫結"
 
-#: src/main/envir.c:1139
+#: src/main/envir.c:1213
 #, c-format
 msgid "argument to '%s' is not an environment"
 msgstr "用於 '%s' 的引數不是環境物件"
 
-#: src/main/envir.c:1300
+#: src/main/envir.c:1374
 #, fuzzy, c-format
 msgid "the ... list does not contain %d elements"
 msgstr "... 串列不包含 %d 個元素"
 
-#: src/main/envir.c:1302
+#: src/main/envir.c:1376
 #, c-format
 msgid "..%d used in an incorrect context, no ... to look in"
 msgstr "..%d 所用的上下文發生錯誤, 找不到..."
 
-#: src/main/envir.c:1390 src/main/envir.c:1842 src/main/eval.c:573
-#: src/main/eval.c:3618
-#, c-format
-msgid "argument \"%s\" is missing, with no default"
-msgstr "缺少引數 \"%s\",也沒有預設值"
-
-#: src/main/envir.c:1395
+#: src/main/envir.c:1469
 #, c-format
 msgid "could not find function \"%s\""
 msgstr "沒有這個函數 \"%s\""
 
-#: src/main/envir.c:1418
+#: src/main/envir.c:1492
 msgid "cannot assign values in the empty environment"
 msgstr "無法在空環境中指派值"
 
-#: src/main/envir.c:1424 src/main/envir.c:1497
+#: src/main/envir.c:1498 src/main/envir.c:1628
 msgid "cannot assign variables to this database"
 msgstr "無法給這個資料庫指派變數"
 
-#: src/main/envir.c:1580
+#: src/main/envir.c:1714
 #, c-format
 msgid "cannot add binding of '%s' to the base environment"
 msgstr "無法將繫結的 '%s' 加入基本環境"
 
-#: src/main/envir.c:1609
+#: src/main/envir.c:1743
 msgid "only the first element is used as variable name"
 msgstr "只用了第一個元素做為變數名"
 
-#: src/main/envir.c:1641
+#: src/main/envir.c:1775
 msgid "first argument must be a named list"
 msgstr "第一個引數必須是具名串列"
 
-#: src/main/envir.c:1646
+#: src/main/envir.c:1780
 msgid "names(x) must be a character vector of the same length as x"
 msgstr "names(x) 必須是與 x 相同長度的字元向量"
 
-#: src/main/envir.c:1649
+#: src/main/envir.c:1783
 #, fuzzy
 msgid "'envir' argument must be an environment"
 msgstr "'env' 引數必須是環境物件"
 
-#: src/main/envir.c:1678
+#: src/main/envir.c:1812
 msgid "cannot remove variables from base namespace"
 msgstr "無法從基本名稱空間刪除變數"
 
-#: src/main/envir.c:1680
+#: src/main/envir.c:1814
 msgid "cannot remove variables from the base environment"
 msgstr "無法從基本環境移除變數"
 
-#: src/main/envir.c:1682
+#: src/main/envir.c:1816
 msgid "cannot remove variables from the empty environment"
 msgstr "無法從空環境中刪除變數"
 
-#: src/main/envir.c:1690
+#: src/main/envir.c:1824
 msgid "cannot remove variables from this database"
 msgstr "無法從這個資料庫中刪除變數"
 
-#: src/main/envir.c:1849
+#: src/main/envir.c:1985
 #, c-format
 msgid "object '%s' of mode '%s' was not found"
 msgstr "找不到模式 '%2$s' 的物件 '%1$s'"
 
-#: src/main/envir.c:1921
+#: src/main/envir.c:2068
 #, c-format
 msgid "invalid name in position %d"
 msgstr "在 %d 位置的名稱不正確"
 
-#: src/main/envir.c:1927
+#: src/main/envir.c:2074
 msgid "second argument must be an environment"
 msgstr "第二引數必須是環境物件"
 
-#: src/main/envir.c:1935 src/main/envir.c:1943
+#: src/main/envir.c:2082 src/main/envir.c:2090
 #, c-format
 msgid "wrong length for '%s' argument"
 msgstr "'%s' 引數的長度錯誤"
 
-#: src/main/envir.c:2062
+#: src/main/envir.c:2221
 msgid "invalid use of 'missing'"
 msgstr "無效的 'missing' 使用"
 
-#: src/main/envir.c:2087
+#: src/main/envir.c:2247
 msgid "'missing' can only be used for arguments"
 msgstr "'missing' 只能用做引數"
 
-#: src/main/envir.c:2168
+#: src/main/envir.c:2333
 msgid "'pos' must be an integer"
 msgstr "'pos' 必須是整數"
 
-#: src/main/envir.c:2182
+#: src/main/envir.c:2347
 msgid "all elements of a list must be named"
 msgstr "串列的所有元素都必須具名"
 
-#: src/main/envir.c:2205
+#: src/main/envir.c:2370
 msgid "'attach' only works for lists, data frames and environments"
 msgstr "'attach' 只作用於串列、資料框和環境"
 
-#: src/main/envir.c:2288
+#: src/main/envir.c:2453
 msgid "detaching \"package:base\" is not allowed"
 msgstr "\"package:base\" 不能被拆離"
 
-#: src/main/envir.c:2589 src/main/envir.c:2644
+#: src/main/envir.c:2798 src/main/envir.c:2879
 msgid "argument must be an environment"
 msgstr "引數必須是環境物件"
 
-#: src/main/envir.c:2648
+#: src/main/envir.c:2883
 msgid "arguments must be symbolic"
 msgstr "引數必須是符號"
 
-#: src/main/envir.c:2772
+#: src/main/envir.c:3032
 msgid "no enclosing environment"
 msgstr "沒有封閉的環境"
 
-#: src/main/envir.c:2825
+#: src/main/envir.c:3085
 #, c-format
 msgid "no item called \"%s\" on the search list"
 msgstr "搜尋串列中沒有所謂的 \"%s\" 項目"
 
-#: src/main/envir.c:2850
+#: src/main/envir.c:3110
 msgid "using 'as.environment(NULL)' is defunct"
 msgstr "'as.environment(NULL)' 已廢止使用"
 
-#: src/main/envir.c:2856
+#: src/main/envir.c:3116
 msgid "S4 object does not extend class \"environment\""
 msgstr "S4 物件並不延伸類別 \"environment\""
 
-#: src/main/envir.c:2871
+#: src/main/envir.c:3131
 msgid "invalid object for 'as.environment'"
 msgstr "無效的物件用於 'as.environment'"
 
-#: src/main/envir.c:2897 src/main/envir.c:2925 src/main/envir.c:2954
-#: src/main/envir.c:2975 src/main/envir.c:2998 src/main/envir.c:3033
-#: src/main/envir.c:3054
+#: src/main/envir.c:3157 src/main/envir.c:3185 src/main/envir.c:3214
+#: src/main/envir.c:3235 src/main/envir.c:3258 src/main/envir.c:3293
+#: src/main/envir.c:3314
 msgid "not an environment"
 msgstr "不是環境物件"
 
-#: src/main/envir.c:2949 src/main/envir.c:2970 src/main/envir.c:2991
-#: src/main/envir.c:3028 src/main/envir.c:3049 src/main/envir.c:3148
+#: src/main/envir.c:3209 src/main/envir.c:3230 src/main/envir.c:3251
+#: src/main/envir.c:3288 src/main/envir.c:3309 src/main/envir.c:3408
 msgid "not a symbol"
 msgstr "不是符號"
 
-#: src/main/envir.c:2962 src/main/envir.c:2983 src/main/envir.c:3041
-#: src/main/envir.c:3062
+#: src/main/envir.c:3222 src/main/envir.c:3243 src/main/envir.c:3301
+#: src/main/envir.c:3322
 #, c-format
 msgid "no binding for \"%s\""
 msgstr "沒有 \"%s\" 繫結"
 
-#: src/main/envir.c:2993
+#: src/main/envir.c:3253
 msgid "not a function"
 msgstr "不是函數"
 
-#: src/main/envir.c:3001 src/main/envir.c:3017
+#: src/main/envir.c:3261 src/main/envir.c:3277
 msgid "symbol already has a regular binding"
 msgstr "符號已經有了正式繫結"
 
-#: src/main/envir.c:3003 src/main/envir.c:3019
+#: src/main/envir.c:3263 src/main/envir.c:3279
 msgid "cannot change active binding if binding is locked"
 msgstr "如果繫結被鎖定就無法變更作用中繫結"
 
-#: src/main/envir.c:3107
+#: src/main/envir.c:3367 src/main/envir.c:3604
 msgid "unknown op"
 msgstr "沒有這種運算子"
 
-#: src/main/envir.c:3152
+#: src/main/envir.c:3412
 msgid "cannot unbind a locked binding"
 msgstr "無法切斷已經鎖定的繫結"
 
-#: src/main/envir.c:3154
+#: src/main/envir.c:3414
 msgid "cannot unbind an active binding"
 msgstr "無法切斷正在使用中的繫結"
 
-#: src/main/envir.c:3289
+#: src/main/envir.c:3555
 msgid "bad namespace name"
 msgstr "不當的命名空間名稱"
 
-#: src/main/envir.c:3301
+#: src/main/envir.c:3567
 msgid "namespace already registered"
 msgstr "命名空間已註冊"
 
-#: src/main/envir.c:3313
+#: src/main/envir.c:3579
 msgid "namespace not registered"
 msgstr "命名空間尚未註冊"
 
-#: src/main/envir.c:3360
+#: src/main/envir.c:3635
 msgid "bad import environment argument"
 msgstr "不當導入環境引數"
 
-#: src/main/envir.c:3365
+#: src/main/envir.c:3640
 msgid "bad export environment argument"
 msgstr "不當導出環境引數"
 
-#: src/main/envir.c:3369
+#: src/main/envir.c:3644
 msgid "length of import and export names must match"
 msgstr "導入和導出名稱的長度必須相等"
 
-#: src/main/envir.c:3392
+#: src/main/envir.c:3667
 #, c-format
 msgid "exported symbol '%s' has no value"
 msgstr "導出的符號 '%s' 沒有值"
 
-#: src/main/envir.c:3557
+#: src/main/envir.c:3833
 #, c-format
 msgid "unknown encoding: %d"
 msgstr "不明編碼:%d"
 
-#: src/main/envir.c:3577
+#: src/main/envir.c:3853
 #, c-format
 msgid "embedded nul in string: '%s'"
 msgstr "空值嵌入於字串中:'%s'"
 
-#: src/main/errors.c:178 src/main/errors.c:215
+#: src/main/errors.c:163 src/main/errors.c:200
 msgid "interrupts suspended; signal ignored"
 msgstr "暫停被中斷; 信號忽略不用"
 
-#: src/main/errors.c:318
+#: src/main/errors.c:250
+msgid "[... truncated]"
+msgstr ""
+
+#: src/main/errors.c:310
 msgid "invalid option \"warning.expression\""
 msgstr "\"warning.expression\" 選項不正確"
 
-#: src/main/errors.c:348
+#: src/main/errors.c:339
 #, c-format
 msgid "(converted from warning) %s"
 msgstr "(從警告轉換成) %s"
 
-#: src/main/errors.c:359
-#, c-format
-msgid "Warning: %s\n"
+#: src/main/errors.c:349
+#, fuzzy
+msgid "Warning:"
 msgstr "警告:%s\n"
 
-#: src/main/errors.c:363
-#, c-format
-msgid "Warning in %s : %s\n"
+#: src/main/errors.c:351
+#, fuzzy, c-format
+msgid "Warning in %s :"
 msgstr "%s 中的警告:%s\n"
 
-#: src/main/errors.c:365
-#, c-format
-msgid ""
-"Warning in %s :\n"
-"  %s\n"
+#: src/main/errors.c:360 src/main/errors.c:374 src/main/errors.c:687
+msgid "Calls:"
 msgstr ""
-"%s 中的警告:\n"
-" %s\n"
 
-#: src/main/errors.c:428 src/main/errors.c:447 src/main/errors.c:596
+#: src/main/errors.c:421 src/main/errors.c:440 src/main/errors.c:602
 msgid "Lost warning messages\n"
 msgstr "警告訊息遺失\n"
 
-#: src/main/errors.c:459
-msgid "Warning message:\n"
-msgid_plural "Warning messages:\n"
+#: src/main/errors.c:452
+#, fuzzy
+msgid "Warning message:"
+msgid_plural "Warning messages:"
 msgstr[0] "警告訊息:\n"
 
-#: src/main/errors.c:514
+#: src/main/errors.c:462 src/main/errors.c:490
 #, c-format
-msgid "There were %d warnings (use warnings() to see them)\n"
-msgstr "共有 %d 個警告 (用 warnings() 來顯示)\n"
+msgid "In %s :"
+msgstr ""
+
+#: src/main/errors.c:515
+#, fuzzy, c-format
+msgid "There was %d warning (use warnings() to see it)"
+msgid_plural "There were %d warnings (use warnings() to see them)"
+msgstr[0] "共有 %d 個警告 (用 warnings() 來顯示)\n"
 
-#: src/main/errors.c:517
+#: src/main/errors.c:520
 #, fuzzy, c-format
-msgid "There were %d or more warnings (use warnings() to see the first %d)\n"
+msgid "There were %d or more warnings (use warnings() to see the first %d)"
 msgstr "警告多於50個 (用 warnings() 來顯示最先的50個)\n"
 
-#: src/main/errors.c:587
+#: src/main/errors.c:593
 msgid "Error during wrapup: "
 msgstr "收捲時發生錯誤: "
 
-#: src/main/errors.c:612
+#: src/main/errors.c:618
 msgid "Error in "
 msgstr "錯誤在"
 
-#: src/main/errors.c:613
+#: src/main/errors.c:640 src/main/errors.c:647
 #, c-format
-msgid " (from %s) : "
+msgid "Error in %s (from %s) : "
 msgstr ""
 
-#: src/main/errors.c:664 src/main/errors.c:670
+#: src/main/errors.c:649
+#, fuzzy, c-format
+msgid "Error in %s : "
+msgstr "錯誤在"
+
+#: src/main/errors.c:669 src/main/errors.c:675
 #, c-format
 msgid "Error: "
 msgstr "錯誤: "
 
-#: src/main/errors.c:690 src/main/errors.c:1319
+#: src/main/errors.c:696 src/main/errors.c:1300
 msgid "In addition: "
 msgstr "此外: "
 
-#: src/main/errors.c:811
+#: src/main/errors.c:818
 msgid "invalid option \"error\"\n"
 msgstr "選項 \"error\" 不正確\n"
 
-#: src/main/errors.c:893
-msgid "Execution halted\n"
-msgstr "停止執行\n"
-
-#: src/main/errors.c:1032
-msgid "'msg1' must be a character string"
-msgstr "'msg1' 必須是字串"
-
-#: src/main/errors.c:1034
-msgid "'msg2' must be a character string"
-msgstr "'msg2' 必須是字串"
+#: src/main/errors.c:1013 src/main/errors.c:1015 src/main/options.c:339
+#: src/main/unique.c:1638
+#, fuzzy, c-format
+msgid "'%s' must be a character string"
+msgstr "'sep' 必須是字串"
 
-#: src/main/errors.c:1131
+#: src/main/errors.c:1116
 msgid " [invalid string in stop(.)]"
 msgstr " [stop(.) 中的字串不正確]"
 
-#: src/main/errors.c:1162
+#: src/main/errors.c:1148
 msgid " [invalid string in warning(.)]"
 msgstr " [warning(.) 中的字串不正確]"
 
-#: src/main/errors.c:1178
+#: src/main/errors.c:1164
 #, c-format
 msgid "incorrect number of arguments to \"%s\""
 msgstr "\"%s\" 中的引數數目不正確"
 
-#: src/main/errors.c:1184 src/main/errors.c:1199
+#: src/main/errors.c:1170 src/main/errors.c:1185
 #, c-format
 msgid "unimplemented feature in %s"
 msgstr "%s 中的功能尚未實作"
 
-#: src/main/errors.c:1193
+#: src/main/errors.c:1179
 msgid "invalid number of arguments"
 msgstr "引數數目不正確"
 
-#: src/main/errors.c:1194 src/main/logic.c:189
+#: src/main/errors.c:1180 src/main/logic.c:181
 msgid "invalid argument type"
 msgstr "引數類型不正確"
 
-#: src/main/errors.c:1196
+#: src/main/errors.c:1182
 msgid "time-series/vector length mismatch"
 msgstr "時間序列/向量長度不等"
 
-#: src/main/errors.c:1197
+#: src/main/errors.c:1183
 msgid "incompatible arguments"
 msgstr "不相容的引數"
 
-#: src/main/errors.c:1200
+#: src/main/errors.c:1186
 msgid "unknown error (report this!)"
 msgstr "不明錯誤 (請報告!)"
 
-#: src/main/errors.c:1212
+#: src/main/errors.c:1195
+msgid "inaccurate integer conversion in coercion"
+msgstr "強制變更造成整數不精確"
+
+#: src/main/errors.c:1198
 msgid "unknown warning (report this!)"
 msgstr "不明警告 (請報告!)"
 
-#: src/main/errors.c:1283
+#: src/main/errors.c:1269
 msgid "No function to return from, jumping to top level"
 msgstr "沒有可回返的函數, 跳到最高層"
 
-#: src/main/errors.c:1299
+#: src/main/errors.c:1285
 msgid "top level inconsistency?"
 msgstr "最高層不一致?"
 
-#: src/main/errors.c:1478
+#: src/main/errors.c:1459
 msgid "bad handler data"
 msgstr "不當的控柄資料"
 
-#: src/main/errors.c:1628
+#: src/main/errors.c:1613
 msgid "error message not a string"
 msgstr "錯誤訊息不是字串"
 
-#: src/main/errors.c:1703
+#: src/main/errors.c:1688
 msgid "handler or restart stack mismatch in old restart"
 msgstr "舊重新啟動中的控柄或重新啟動堆疊不符合"
 
-#: src/main/errors.c:1729 src/main/errors.c:1745
+#: src/main/errors.c:1714 src/main/errors.c:1730
 msgid "bad error message"
 msgstr "不當的錯誤訊息"
 
-#: src/main/errors.c:1787
+#: src/main/errors.c:1771
 msgid "bad restart"
 msgstr "不當的重新啟動"
 
-#: src/main/errors.c:1819
+#: src/main/errors.c:1803
 msgid "restart not on stack"
 msgstr "未在堆疊上重新啟動"
 
-#: src/main/errors.c:1836
+#: src/main/errors.c:1819
 msgid "not in a try context"
 msgstr "不在 try 的上下文中"
 
-#: src/main/errors.c:1849
+#: src/main/errors.c:1832
 msgid "error message must be a character string"
 msgstr "錯誤訊息必須是字串"
 
-#: src/main/eval.c:308
+#: src/main/eval.c:365
 #, c-format
 msgid "source files skipped by Rprof; please increase '%s'"
 msgstr ""
 
-#: src/main/eval.c:328
+#: src/main/eval.c:385
 #, c-format
 msgid "Rprof: cannot open profile file '%s'"
 msgstr "Rprof: 打不開程式概要分析檔案 '%s'"
 
-#: src/main/eval.c:422
+#: src/main/eval.c:479
 msgid "R profiling is not available on this system"
 msgstr "本系統沒有 R 程式概要分析這個功能"
 
-#: src/main/eval.c:446
+#: src/main/eval.c:503
 msgid ""
 "promise already under evaluation: recursive default argument reference or "
 "earlier problems?"
 msgstr "約定已進行求值:遞迴預設引數參考或是之前的問題?"
 
-#: src/main/eval.c:448
+#: src/main/eval.c:505
 msgid "restarting interrupted promise evaluation"
 msgstr "重新啟動插斷的約定求值"
 
-#: src/main/eval.c:544
+#: src/main/eval.c:601
 msgid ""
 "evaluation nested too deeply: infinite recursion / options(expressions=)?"
 msgstr "評估巢狀太深:無窮遞迴/選項(表示式=)?"
 
-#: src/main/eval.c:575 src/main/eval.c:3619
+#: src/main/eval.c:632 src/main/eval.c:4238
 msgid "argument is missing, with no default"
 msgstr "缺少引數, 也沒有預設值"
 
-#: src/main/eval.c:679 src/main/eval.c:4642
+#: src/main/eval.c:736 src/main/eval.c:1306 src/main/eval.c:5533
 msgid "attempt to apply non-function"
 msgstr "不適用於非函數"
 
-#: src/main/eval.c:702
+#: src/main/eval.c:759
 #, c-format
 msgid "%s at %s#%d: "
 msgstr "%s 於 %s#%d:"
 
-#: src/main/eval.c:1178
+#: src/main/eval.c:1298 src/main/eval.c:2271
+#, c-format
+msgid "argument %d is empty"
+msgstr "引數 %d 是空的"
+
+#: src/main/eval.c:1350
 #, c-format
 msgid "could not find symbol \"%s\" in environment of the generic function"
 msgstr "一般函數環境中沒有 \"%s\" 符號"
 
-#: src/main/eval.c:1196
+#: src/main/eval.c:1368
 #, c-format
 msgid "symbol \"%s\" not in environment of method"
 msgstr "方法環境中沒有 \"%s\" 符號"
 
-#: src/main/eval.c:1308
+#: src/main/eval.c:1481
 msgid "the condition has length > 1 and only the first element will be used"
 msgstr "條件的長度 > 1,因此只能用其第一元素"
 
-#: src/main/eval.c:1325
+#: src/main/eval.c:1500
 msgid "missing value where TRUE/FALSE needed"
 msgstr "需要 TRUE/FALSE 值的地方有缺值"
 
-#: src/main/eval.c:1326
+#: src/main/eval.c:1501
 msgid "argument is not interpretable as logical"
 msgstr "引數無法解譯為邏輯值"
 
-#: src/main/eval.c:1327
+#: src/main/eval.c:1502
 msgid "argument is of length zero"
 msgstr "引數長度為零"
 
-#: src/main/eval.c:1418
+#: src/main/eval.c:1596
 msgid "non-symbol loop variable"
 msgstr "非符號循環變數"
 
-#: src/main/eval.c:1510 src/main/eval.c:4408
+#: src/main/eval.c:1687 src/main/eval.c:5301
 msgid "invalid for() loop sequence"
 msgstr "不當的 for() 循環序列"
 
-#: src/main/eval.c:1652
+#: src/main/eval.c:1826
 msgid "multi-argument returns are not permitted"
 msgstr "不允許多引數回傳"
 
-#: src/main/eval.c:1701
+#: src/main/eval.c:1873
 msgid "invalid (NULL) left side of assignment"
 msgstr "賦值公式左側是無效 (NULL) 值"
 
-#: src/main/eval.c:1734
+#: src/main/eval.c:1907
 msgid "target of assignment expands to non-language object"
 msgstr "賦值目標擴充到非語言的物件"
 
-#: src/main/eval.c:1817
+#: src/main/eval.c:1990
 #, c-format
 msgid "overlong name in '%s'"
 msgstr "'%s' 中的名稱太長"
 
-#: src/main/eval.c:1915
+#: src/main/eval.c:2080
 msgid "cannot do complex assignments in base namespace"
 msgstr "無法在基本名稱空間中賦予複數值"
 
-#: src/main/eval.c:1917
+#: src/main/eval.c:2082
 msgid "cannot do complex assignments in base environment"
 msgstr "無法在基本環境中賦予複數值"
 
-#: src/main/eval.c:1954 src/main/eval.c:1981
+#: src/main/eval.c:2121 src/main/eval.c:2148
 msgid "invalid function in complex assignment"
 msgstr "複數賦值中的函數不正確"
 
-#: src/main/eval.c:2041
+#: src/main/eval.c:2208
 msgid "invalid (do_set) left-hand side to assignment"
 msgstr "(do_set) 賦值公式左側不正確"
 
-#: src/main/eval.c:2103
-#, c-format
-msgid "argument %d is empty"
-msgstr "引數 %d 是空的"
-
-#: src/main/eval.c:2116
+#: src/main/eval.c:2284
 #, c-format
 msgid "'%s' is missing"
 msgstr "缺少 '%s'"
 
-#: src/main/eval.c:2267
+#: src/main/eval.c:2439
 msgid "invalid formal argument list for \"function\""
 msgstr "\"function\" 正式引數串列不正確"
 
-#: src/main/eval.c:2325 src/main/eval.c:2356 src/main/eval.c:2361
+#: src/main/eval.c:2497 src/main/eval.c:2528 src/main/eval.c:2533
 #, fuzzy, c-format
 msgid "invalid '%s' argument of type '%s'"
 msgstr "'%s' 引數不正確"
 
-#: src/main/eval.c:2353
+#: src/main/eval.c:2525
 msgid "numeric 'envir' arg not of length one"
 msgstr "數值 'envir' 引數的長度不是 1"
 
-#: src/main/eval.c:2377 src/main/eval.c:2399
+#: src/main/eval.c:2549 src/main/eval.c:2573
 msgid "restarts not supported in 'eval'"
 msgstr "'eval' 不支援重新啟動"
 
-#: src/main/eval.c:2456 src/main/eval.c:2469
+#: src/main/eval.c:2632 src/main/eval.c:2645
 msgid "'Recall' called from outside a closure"
 msgstr "'Recall' 從閉包外部呼叫"
 
-#: src/main/eval.c:2562
+#: src/main/eval.c:2738
 msgid "value in '...' is not a promise"
 msgstr "'...' 中的值不是一個約定"
 
-#: src/main/eval.c:2754 src/main/objects.c:720
-#, c-format
-msgid "call name too long in '%s'"
-msgstr "'%s' 中呼叫的名稱太長"
-
-#: src/main/eval.c:2775
-#, c-format
-msgid "generic name too long in '%s'"
-msgstr "'%s' 中的一般名稱太長"
-
-#: src/main/eval.c:2840
+#: src/main/eval.c:2999
 #, c-format
 msgid "Incompatible methods (\"%s\", \"%s\") for \"%s\""
 msgstr "不相容的方法 (\"%s\", \"%s\") 用於 \"%s\""
 
-#: src/main/eval.c:2906
+#: src/main/eval.c:3048
 msgid "dispatch error in group dispatch"
 msgstr "群組派送時發生錯誤"
 
-#: src/main/eval.c:3201
+#: src/main/eval.c:3532
 #, c-format
 msgid "\"%s\" is not a %s function"
 msgstr "\"%s\" 並非 %s 函數"
 
-#: src/main/eval.c:3430
+#: src/main/eval.c:4047
 msgid "node stack overflow"
 msgstr "節點堆疊向上溢位"
 
-#: src/main/eval.c:3436
+#: src/main/eval.c:4053
 msgid "integer stack overflow"
 msgstr "整數堆疊向上溢位"
 
-#: src/main/eval.c:3490
+#: src/main/eval.c:4107
 #, fuzzy
 msgid "bad opcode"
 msgstr "不當的操作代碼"
 
-#: src/main/eval.c:4219
+#: src/main/eval.c:5083
 #, c-format
 msgid "invalid %s type in 'x %s y'"
 msgstr "'x %2$s y' 中無效的 %1$s 類型"
 
-#: src/main/eval.c:4310
+#: src/main/eval.c:5195
 msgid "bytecode version mismatch; using eval"
 msgstr "位元組碼版本不符;使用 eval"
 
-#: src/main/eval.c:4315
+#: src/main/eval.c:5200
 msgid "bytecode version is too old"
 msgstr "位元組碼版本太舊"
 
-#: src/main/eval.c:4316
+#: src/main/eval.c:5201
 msgid "bytecode version is too new"
 msgstr "位元組碼版本太新"
 
-#: src/main/eval.c:4350
+#: src/main/eval.c:5235
 msgid "byte code version mismatch"
 msgstr "位元組碼版本不符"
 
-#: src/main/eval.c:4477
+#: src/main/eval.c:5383
 msgid "invalid sequence argument in for loop"
 msgstr "迴圈中的序列引數不正確"
 
-#: src/main/eval.c:4624 src/main/names.c:1181
+#: src/main/eval.c:5522 src/main/names.c:1312
 #, fuzzy, c-format
 msgid "there is no .Internal function '%s'"
 msgstr "沒有 \"%s\" 這個內部函數"
 
-#: src/main/eval.c:4731 src/main/eval.c:5077 src/main/eval.c:5119
+#: src/main/eval.c:5622 src/main/eval.c:5968 src/main/eval.c:6008
 msgid "bad function"
 msgstr "不當的函數"
 
-#: src/main/eval.c:4746
+#: src/main/eval.c:5635
 msgid "not a BUILTIN function"
 msgstr "非 BUILTIN 函數"
 
-#: src/main/eval.c:5159
+#: src/main/eval.c:6066
+#, fuzzy
+msgid "bad numeric 'switch' offsets"
+msgstr "不當的數值切換偏移值"
+
+#: src/main/eval.c:6072
 #, fuzzy
 msgid "numeric EXPR required for 'switch' without named alternatives"
 msgstr "switch() 需要數值而無需具名的替代方案"
 
-#: src/main/eval.c:5255
+#: src/main/eval.c:6076
+#, fuzzy
+msgid "bad character 'switch' offsets"
+msgstr "不當的字元切換偏移值"
+
+#: src/main/eval.c:6188
 msgid "cannot find index for threaded code address"
 msgstr "找不到執行緒程式碼位址的索引"
 
-#: src/main/eval.c:5315
+#: src/main/eval.c:6248
 msgid "invalid body"
 msgstr "無效的主體"
 
-#: src/main/eval.c:5335
+#: src/main/eval.c:6268
 msgid "invalid symbol"
 msgstr "符號不正確"
 
-#: src/main/eval.c:5379
+#: src/main/eval.c:6312
 msgid "argument is not a byte code object"
 msgstr "引數不是位元組碼物件"
 
-#: src/main/eval.c:5400
+#: src/main/eval.c:6334
 msgid "bad file name"
 msgstr "不當的檔案名稱"
 
-#: src/main/eval.c:5404 src/main/eval.c:5425
+#: src/main/eval.c:6338 src/main/eval.c:6359
 msgid "unable to open 'file'"
 msgstr "無法開啟 'file'"
 
-#: src/main/eval.c:5419 src/main/saveload.c:1942
+#: src/main/eval.c:6353 src/main/saveload.c:1944
 msgid "'file' must be non-empty string"
 msgstr "'file' 必須是非空字串"
 
-#: src/main/eval.c:5421 src/main/saveload.c:1944 src/main/saveload.c:2244
-#: src/main/serialize.c:2149
+#: src/main/eval.c:6355 src/main/saveload.c:1946 src/main/saveload.c:2246
+#: src/main/serialize.c:2189
 msgid "'ascii' must be logical"
 msgstr "'ascii' 必須是邏輯值"
 
-#: src/main/eval.c:5492 src/main/eval.c:5511 src/main/eval.c:5541
+#: src/main/eval.c:6426 src/main/eval.c:6445 src/main/eval.c:6475
 msgid "constant buffer must be a generic vector"
 msgstr "常數緩衝區必須是個一般向量"
 
-#: src/main/eval.c:5543
+#: src/main/eval.c:6477
 msgid "bad constant count"
 msgstr "不當的常數計數"
 
-#: src/main/eval.c:5579
+#: src/main/eval.c:6515
 msgid "profile timer in use"
 msgstr "程式概要分析計時器在使用中"
 
-#: src/main/eval.c:5581
+#: src/main/eval.c:6517
 msgid "already byte code profiling"
 msgstr "已經在進行位元組碼程式概要分析"
 
-#: src/main/eval.c:5599
+#: src/main/eval.c:6535
 msgid "setting profile timer failed"
 msgstr "程式概要分析計時器設置失敗"
 
-#: src/main/eval.c:5616
+#: src/main/eval.c:6553
 msgid "not byte code profiling"
 msgstr "非位元組碼程式概要分析"
 
+#: src/main/eval.c:6569 src/main/eval.c:6573 src/main/eval.c:6577
+#, fuzzy
+msgid "byte code profiling is not supported in this build"
+msgstr "這個組建不支援 ICU"
+
 #: src/main/gevents.c:43
 #, c-format
 msgid "'%s' events not supported in this device"
@@ -3675,27 +3743,27 @@ msgstr "內部錯誤"
 msgid "this graphics device does not support event handling"
 msgstr "這個圖形裝置不支援事件處理"
 
-#: src/main/gevents.c:136
+#: src/main/gevents.c:135
 msgid "invalid prompt"
 msgstr "提示不正確"
 
-#: src/main/gevents.c:148
+#: src/main/gevents.c:146
 #, fuzzy
 msgid "recursive use of 'getGraphicsEvent' not supported"
 msgstr "不支援 getGraphicsEvent 的遞迴使用"
 
-#: src/main/gevents.c:158
+#: src/main/gevents.c:157
 msgid "no graphics event handlers set"
 msgstr "沒有任何圖形事件處理常式被設定"
 
-#: src/main/gram.y:222 src/main/gram.y:237 src/main/gram.y:2222
-#: src/main/gram.y:2236
+#: src/main/gram.y:222 src/main/gram.y:237 src/main/gram.y:2245
+#: src/main/gram.y:2259
 #, c-format
 msgid "EOF whilst reading MBCS char at line %d"
 msgstr "讀取 MBCS 字元於第 %d 列時遇到 EOF"
 
-#: src/main/gram.y:226 src/main/gram.y:234 src/main/gram.y:2226
-#: src/main/gram.y:2233
+#: src/main/gram.y:226 src/main/gram.y:234 src/main/gram.y:2249
+#: src/main/gram.y:2256
 #, c-format
 msgid "invalid multibyte character in parser at line %d"
 msgstr "在剖析器的第 %d 列中有無效的多位元組字元"
@@ -3710,113 +3778,126 @@ msgstr "輸入緩衝區溢位於第 %d 列"
 msgid "incorrect tag type at line %d"
 msgstr "第 %d 列有不正確的標記類型"
 
-#: src/main/gram.y:1653
+#: src/main/gram.y:1657
 msgid "contextstack overflow"
 msgstr "contextstack 溢位"
 
-#: src/main/gram.y:1890
-msgid "input"
-msgstr "輸入"
+#: src/main/gram.y:1907 src/main/gram.y:1913
+#, fuzzy, c-format
+msgid "unexpected input"
+msgstr "未預期的 %s"
 
-#: src/main/gram.y:1891
-msgid "end of input"
+#: src/main/gram.y:1910 src/main/main.c:311
+#, fuzzy, c-format
+msgid "unexpected end of input"
 msgstr "輸入結束"
 
-#: src/main/gram.y:1892
-msgid "string constant"
+#: src/main/gram.y:1916
+#, fuzzy, c-format
+msgid "unexpected string constant"
 msgstr "字串常數"
 
-#: src/main/gram.y:1893
-msgid "numeric constant"
+#: src/main/gram.y:1919
+#, fuzzy, c-format
+msgid "unexpected numeric constant"
 msgstr "數值常數"
 
-#: src/main/gram.y:1894
-msgid "symbol"
-msgstr "符號"
+#: src/main/gram.y:1922
+#, fuzzy, c-format
+msgid "unexpected symbol"
+msgstr "未預期的 %s"
 
-#: src/main/gram.y:1895
-msgid "assignment"
-msgstr "指派"
+#: src/main/gram.y:1925
+#, fuzzy, c-format
+msgid "unexpected assignment"
+msgstr "未預期的 %s"
 
-#: src/main/gram.y:1896
-msgid "end of line"
+#: src/main/gram.y:1928
+#, fuzzy, c-format
+msgid "unexpected end of line"
 msgstr "列尾"
 
-#: src/main/gram.y:1910 src/main/gram.y:1916
+#: src/main/gram.y:1931 src/main/gram.y:1939
 #, c-format
 msgid "unexpected %s"
 msgstr "未預期的 %s"
 
-#: src/main/gram.y:1926
+#: src/main/gram.y:1951
 #, fuzzy, c-format
 msgid "repeated formal argument '%s' on line %d"
 msgstr "重複的形式引數 '%s' 於第 %d 列"
 
-#: src/main/gram.y:2136
+#: src/main/gram.y:2161
 #, fuzzy, c-format
 msgid "integer literal %s contains decimal; using numeric value"
 msgstr "整數實文 %sL 含有十進位;使用數值"
 
-#: src/main/gram.y:2140
+#: src/main/gram.y:2164
 #, c-format
 msgid "non-integer value %s qualified with L; using numeric value"
 msgstr "非整數值 %s 以 L 資格修飾過; 使用數值"
 
-#: src/main/gram.y:2153
+#: src/main/gram.y:2176
 #, fuzzy, c-format
 msgid "integer literal %s contains unnecessary decimal point"
 msgstr "整數實文 %sL 含有非必要的十進小數點"
 
-#: src/main/gram.y:2185
+#: src/main/gram.y:2208
 #, c-format
 msgid "unable to allocate buffer for long string at line %d"
 msgstr "無法配置緩衝區給第 %d 列的長字串"
 
-#: src/main/gram.y:2338
+#: src/main/gram.y:2347 src/main/gram.y:2370 src/main/gram.y:2407
+#: src/main/gram.y:2443
+#, fuzzy, c-format
+msgid "nul character not allowed (line %d)"
+msgstr "在剖析器的第 %d 列中有無效的多位元組字元"
+
+#: src/main/gram.y:2363
 #, c-format
 msgid "'\\x' used without hex digits in character string starting \"%s\""
 msgstr "在起始 \"%s\" 的字串中使用了 '\\x' 卻無十六進位數字"
 
-#: src/main/gram.y:2352
+#: src/main/gram.y:2379
 #, c-format
 msgid "\\uxxxx sequences not supported inside backticks (line %d)"
 msgstr "在反引號內部不支援 \\uxxxx 序列 (第 %d 列)"
 
-#: src/main/gram.y:2367
+#: src/main/gram.y:2394
 #, c-format
 msgid "'\\u' used without hex digits in character string starting \"%s\""
 msgstr "在起始 \"%s\" 的字串中使用了 '\\u' 卻無十六進位數字"
 
-#: src/main/gram.y:2375
+#: src/main/gram.y:2402
 #, c-format
 msgid "invalid \\u{xxxx} sequence (line %d)"
 msgstr "無效的 \\u{xxxx} 序列 (第 %d 列)"
 
-#: src/main/gram.y:2387
+#: src/main/gram.y:2416
 #, c-format
 msgid "\\Uxxxxxxxx sequences not supported inside backticks (line %d)"
 msgstr "在反引號內部不支援 \\Uxxxxxxxx 序列 (第 %d 列)"
 
-#: src/main/gram.y:2402
+#: src/main/gram.y:2431
 #, c-format
 msgid "'\\U' used without hex digits in character string starting \"%s\""
 msgstr "在起始 \"%s\" 的字串中使用了 '\\U' 卻無十六進位數字"
 
-#: src/main/gram.y:2410
+#: src/main/gram.y:2439
 #, c-format
 msgid "invalid \\U{xxxxxxxx} sequence (line %d)"
 msgstr "無效的 \\U{xxxxxxxx} 序列 (第 %d 列)"
 
-#: src/main/gram.y:2451
+#: src/main/gram.y:2482
 #, c-format
 msgid "'\\%c' is an unrecognized escape in character string starting \"%s\""
 msgstr "在起始 \"%2$s\" 的字串中 '\\%1$c' 是無法辨識的跳脫字元"
 
-#: src/main/gram.y:2510
+#: src/main/gram.y:2546
 msgid "mixing Unicode and octal/hex escapes in a string is not allowed"
 msgstr "不允許在字串中混合萬國碼和八進位/十六進位跳脫字元"
 
-#: src/main/gram.y:2514
+#: src/main/gram.y:2550
 #, c-format
 msgid ""
 "string at line %d containing Unicode escapes not in this locale\n"
@@ -3825,13 +3906,13 @@ msgstr ""
 "第 %d 列的字串包含不存在這個語區的萬國碼跳脫字元\n"
 "長度太長 (最大 10000 字元)"
 
-#: src/main/gram.y:3112 src/main/gram.y:3119 src/main/gram.y:3125
-#: src/main/gram.y:3132
+#: src/main/gram.y:3148 src/main/gram.y:3155 src/main/gram.y:3161
+#: src/main/gram.y:3168
 #, c-format
 msgid "contextstack overflow at line %d"
 msgstr "contextstack 於第 %d 列溢位"
 
-#: src/main/gram.y:3227
+#: src/main/gram.y:3263
 #, fuzzy, c-format
 msgid "internal parser error at line %d"
 msgstr "輸入緩衝區溢位於第 %d 列"
@@ -3841,34 +3922,34 @@ msgstr "輸入緩衝區溢位於第 %d 列"
 msgid "relative range of values =%4.0f * EPS, is small (axis %d)"
 msgstr "相對範圍值 =%4.0f * EPS太小 (座標 %d)"
 
-#: src/main/grep.c:93
+#: src/main/grep.c:96
 #, c-format
 msgid "invalid regular expression '%s', reason '%s'"
 msgstr "無效的正規表示式 '%s' ,原因是 '%s'"
 
-#: src/main/grep.c:95
+#: src/main/grep.c:98
 #, c-format
 msgid "invalid regular expression, reason '%s'"
 msgstr "無效的正規表示式,原因是 '%s'"
 
-#: src/main/grep.c:220 src/main/grep.c:308 src/main/grep.c:416
-#: src/main/grep.c:883 src/main/grep.c:2473
+#: src/main/grep.c:225 src/main/grep.c:315 src/main/grep.c:426
+#: src/main/grep.c:900 src/main/grep.c:2502
 #, c-format
 msgid "input string %d is invalid UTF-8"
 msgstr "輸入字串 %d 是無效的 UTF-8"
 
-#: src/main/grep.c:286 src/main/grep.c:383
+#: src/main/grep.c:292 src/main/grep.c:391
 #, c-format
 msgid "'split' string %d is invalid UTF-8"
 msgstr "'split' 字串 %d 是無效的 UTF-8"
 
-#: src/main/grep.c:290 src/main/grep.c:387 src/main/grep.c:560
+#: src/main/grep.c:296 src/main/grep.c:395 src/main/grep.c:571
 #, c-format
 msgid "'split' string %d is invalid in this locale"
 msgstr "'split' 字串 %d 在這個語區中無效"
 
-#: src/main/grep.c:395 src/main/grep.c:851 src/main/grep.c:1600
-#: src/main/grep.c:2394
+#: src/main/grep.c:404 src/main/grep.c:867 src/main/grep.c:1621
+#: src/main/grep.c:2419
 #, c-format
 msgid ""
 "PCRE pattern compilation error\n"
@@ -3879,13 +3960,13 @@ msgstr ""
 "\t'%s'\n"
 "\t於 '%s'\n"
 
-#: src/main/grep.c:397
+#: src/main/grep.c:406
 #, c-format
 msgid "invalid split pattern '%s'"
 msgstr "split 的胚騰 '%s' 不正確"
 
-#: src/main/grep.c:401 src/main/grep.c:857 src/main/grep.c:1607
-#: src/main/grep.c:2401
+#: src/main/grep.c:410 src/main/grep.c:873 src/main/grep.c:1628
+#: src/main/grep.c:2426
 #, c-format
 msgid ""
 "PCRE pattern study error\n"
@@ -3894,45 +3975,45 @@ msgstr ""
 "PCRE 胚騰檢查錯誤\n"
 "\t'%s'\n"
 
-#: src/main/grep.c:834 src/main/grep.c:2377
+#: src/main/grep.c:849 src/main/grep.c:2401
 msgid "regular expression is invalid UTF-8"
 msgstr "正規表示式是無效的 UTF-8"
 
-#: src/main/grep.c:853 src/main/grep.c:1602 src/main/grep.c:2396
+#: src/main/grep.c:869 src/main/grep.c:1623 src/main/grep.c:2421
 #, c-format
 msgid "invalid regular expression '%s'"
 msgstr "正規表示式 '%s' 不正確"
 
-#: src/main/grep.c:1264
+#: src/main/grep.c:1282
 msgid "pattern matches an empty string infinitely, returning first match only"
 msgstr "胚騰符合無限大的空字串,只回傳第一個符合者"
 
-#: src/main/grep.c:1575
+#: src/main/grep.c:1595
 msgid "'pattern' is invalid UTF-8"
 msgstr "'pattern' 是無效的 UTF-8"
 
-#: src/main/grep.c:1577
+#: src/main/grep.c:1597
 msgid "'replacement' is invalid UTF-8"
 msgstr "'replacement' 是無效的 UTF-8"
 
-#: src/main/grep.c:1581
+#: src/main/grep.c:1601
 msgid "'pattern' is invalid in this locale"
 msgstr "'pattern' 的值在本語言環境下不正確"
 
-#: src/main/grep.c:1584
+#: src/main/grep.c:1604
 msgid "'replacement' is invalid in this locale"
 msgstr "'replacement' 的值在本語言環境下不正確"
 
-#: src/main/grep.c:1589
+#: src/main/grep.c:1609
 msgid "zero-length pattern"
 msgstr "胚騰長度為零"
 
-#: src/main/grep.c:1732 src/main/grep.c:1748 src/main/grep.c:1796
-#: src/main/grep.c:1812 src/main/grep.c:1859 src/main/grep.c:1875
+#: src/main/grep.c:1753 src/main/grep.c:1769 src/main/grep.c:1817
+#: src/main/grep.c:1833 src/main/grep.c:1880 src/main/grep.c:1896
 msgid "result string is too long"
 msgstr "結果字串太長"
 
-#: src/main/grep.c:2411
+#: src/main/grep.c:2436
 #, fuzzy, c-format
 msgid "'pcre_fullinfo' returned '%d' "
 msgstr "pcre_fullinfo 已回傳 '%d'"
@@ -3941,33 +4022,29 @@ msgstr "pcre_fullinfo 已回傳 '%d'"
 msgid "ignoring non-pairlist attributes"
 msgstr ""
 
-#: src/main/internet.c:92
+#: src/main/internet.c:83
 msgid "internet routines cannot be accessed in module"
 msgstr "無法讀寫模組中的網際網路例行程式"
 
-#: src/main/internet.c:103 src/main/internet.c:141 src/main/internet.c:154
-#: src/main/internet.c:165 src/main/internet.c:176 src/main/internet.c:187
-#: src/main/internet.c:196 src/main/internet.c:207 src/main/internet.c:218
-#: src/main/internet.c:227 src/main/internet.c:237
+#: src/main/internet.c:94 src/main/internet.c:106 src/main/internet.c:119
+#: src/main/internet.c:130 src/main/internet.c:141 src/main/internet.c:152
+#: src/main/internet.c:161 src/main/internet.c:172 src/main/internet.c:183
+#: src/main/internet.c:192 src/main/internet.c:202 src/main/internet.c:318
+#: src/main/internet.c:330 src/main/internet.c:342 src/main/internet.c:354
 msgid "internet routines cannot be loaded"
 msgstr "無法載入網際網路例行程式"
 
-#: src/main/internet.c:118 src/main/memory.c:3434 src/main/memory.c:3444
-#: src/main/memory.c:3456 src/main/memory.c:3470 src/main/memory.c:3487
-#: src/main/memory.c:3505
-msgid "bad value"
-msgstr "不當的值"
-
-#: src/main/internet.c:124
-msgid "internet routines were already initialized"
-msgstr "網際網路常式已經初始化"
-
-#: src/main/internet.c:251 src/main/internet.c:265 src/main/internet.c:281
-#: src/main/internet.c:293 src/main/internet.c:307 src/main/internet.c:327
-#: src/main/internet.c:340
+#: src/main/internet.c:216 src/main/internet.c:230 src/main/internet.c:247
+#: src/main/internet.c:259 src/main/internet.c:273 src/main/internet.c:293
+#: src/main/internet.c:306
 msgid "socket routines cannot be loaded"
 msgstr "無法載入插槽例行程式"
 
+#: src/main/internet.c:242
+#, fuzzy
+msgid "attempt to close invalid socket"
+msgstr "試圖設定無效的 'comment' 屬性"
+
 #: src/main/lapack.c:39
 #, fuzzy
 msgid "LAPACK routines cannot be accessed in module"
@@ -3978,42 +4055,38 @@ msgstr "模組中沒有此一 X11 例行程式"
 msgid "LAPACK routines cannot be loaded"
 msgstr "無法載入插槽例行程式"
 
-#: src/main/logic.c:70
-msgid "binary operations require two arguments"
-msgstr "二元運算需要兩個引數"
-
-#: src/main/logic.c:88 src/main/logic.c:150
+#: src/main/logic.c:80 src/main/logic.c:142
 msgid "operations are possible only for numeric, logical or complex types"
 msgstr "運算只適用於數值、邏輯或複數類型"
 
-#: src/main/logic.c:98
+#: src/main/logic.c:90
 msgid "binary operation on non-conformable arrays"
 msgstr "二元運算不能在非調和陣列上進行"
 
-#: src/main/logic.c:124 src/main/relop.c:247
+#: src/main/logic.c:116 src/main/relop.c:241
 msgid "non-conformable time series"
 msgstr "非調和時間序列"
 
-#: src/main/logic.c:254
+#: src/main/logic.c:247
 #, c-format
 msgid "'%s' operator requires 2 arguments"
 msgstr "'%s' 運算子需要兩個引數"
 
-#: src/main/logic.c:261
+#: src/main/logic.c:254
 #, c-format
 msgid "invalid 'x' type in 'x %s y'"
 msgstr "'x %s y' 中的 'x' 類型不正確"
 
-#: src/main/logic.c:268
+#: src/main/logic.c:261
 #, c-format
 msgid "invalid 'y' type in 'x %s y'"
 msgstr "'x %s y' 中的 'y' 類型不正確"
 
-#: src/main/logic.c:341
+#: src/main/logic.c:334
 msgid "Unary operator `!' called with two arguments"
 msgstr "呼叫一元運算 '!' 時用了兩個引數"
 
-#: src/main/logic.c:448
+#: src/main/logic.c:439
 #, c-format
 msgid "coercing argument of type '%s' to logical"
 msgstr "強制變更 '%s' 類型的引數為邏輯類型"
@@ -4022,61 +4095,75 @@ msgstr "強制變更 '%s' 類型的引數為邏輯類型"
 msgid "dummy - do not translate"
 msgstr "dummy - do not translate"
 
-#: src/main/main.c:476
+#: src/main/main.c:329
+#, fuzzy
+msgid "error during cleanup\n"
+msgstr "收捲時發生錯誤: "
+
+#: src/main/main.c:336
+msgid "Execution halted\n"
+msgstr "停止執行\n"
+
+#: src/main/main.c:505
 msgid "Error: segfault from C stack overflow\n"
 msgstr "錯誤: C 堆疊向上溢位的區段錯誤\n"
 
-#: src/main/main.c:846
+#: src/main/main.c:888
 msgid "unable to open the base package\n"
 msgstr "無法開啟基本套件\n"
 
-#: src/main/main.c:924
+#: src/main/main.c:971
 #, c-format
 msgid "unable to restore saved data in %s\n"
 msgstr "無法還原儲存在 %s 中的資料\n"
 
-#: src/main/main.c:971
+#: src/main/main.c:1020
 msgid "During startup - "
 msgstr "於啟動期間 - "
 
-#: src/main/main.c:1224
+#: src/main/main.c:1036
+#, fuzzy
+msgid "unable to initialize the JIT\n"
+msgstr "無法開啟檔案來讀取資料"
+
+#: src/main/main.c:1290
 msgid "cannot quit from browser"
 msgstr "無法離開瀏覽器"
 
-#: src/main/main.c:1228
+#: src/main/main.c:1294
 msgid "one of \"yes\", \"no\", \"ask\" or \"default\" expected."
 msgstr "只能用 \"yes\"、\"no\"、\"ask\" 或 \"default\" 中的一個。"
 
-#: src/main/main.c:1233
+#: src/main/main.c:1299
 msgid "save=\"ask\" in non-interactive use: command-line default will be used"
 msgstr "save=\"ask\" 不能在非交互狀態時使用:改用命令列預設值"
 
-#: src/main/main.c:1241
+#: src/main/main.c:1307
 msgid "unrecognized value of 'save'"
 msgstr "沒有這種 'save' 值"
 
-#: src/main/main.c:1244
+#: src/main/main.c:1310
 msgid "invalid 'status', 0 assumed"
 msgstr "'status' 不正確, 假定為 0"
 
-#: src/main/main.c:1249
+#: src/main/main.c:1315
 msgid "invalid 'runLast', FALSE assumed"
 msgstr "'runLast' 不正確, 假定為 FALSE"
 
-#: src/main/main.c:1280
+#: src/main/main.c:1346
 msgid "cannot allocate space for toplevel callback element"
 msgstr "無法為最高層回呼元素配置空間"
 
-#: src/main/main.c:1358
+#: src/main/main.c:1424
 msgid "negative index passed to R_removeTaskCallbackByIndex"
 msgstr "負的索引值被傳遞給 R_removeTaskCallbackByIndex"
 
-#: src/main/main.c:1468
+#: src/main/main.c:1534
 #, c-format
 msgid "warning messages from top-level task callback '%s'\n"
 msgstr "最高層任務回呼 '%s' 產生了警告訊息\n"
 
-#: src/main/main.c:1524
+#: src/main/main.c:1591
 msgid "top-level task callback did not return a logical value"
 msgstr "最高層任務回呼沒回傳邏輯值"
 
@@ -4096,199 +4183,206 @@ msgstr "長引數長度不是短引數長度的整數倍"
 msgid "invalid partial string match"
 msgstr "部分字串比對不正確"
 
-#: src/main/match.c:228 src/main/match.c:268 src/main/objects.c:56
-#: src/main/objects.c:66
+#: src/main/match.c:228 src/main/match.c:266 src/main/objects.c:49
+#: src/main/objects.c:59
 #, c-format
 msgid "formal argument \"%s\" matched by multiple actual arguments"
 msgstr "正式引數 \"%s\" 有多個與之相對應的實際引數"
 
-#: src/main/match.c:231 src/main/match.c:266
+#: src/main/match.c:231 src/main/match.c:264
 #, c-format
 msgid "argument %d matches multiple formal arguments"
 msgstr "引數 %d 有多個與之相對應的正式引數"
 
-#: src/main/match.c:272
+#: src/main/match.c:270
 #, c-format
 msgid "partial argument match of '%s' to '%s'"
 msgstr "'%s' 的部份引數符合 '%s'"
 
-#: src/main/match.c:383
+#: src/main/match.c:380
 #, fuzzy, c-format
 msgid "unused argument %s"
 msgid_plural "unused arguments %s"
 msgstr[0] "未使用的引數 %s"
 
-#: src/main/memory.c:1232
+#: src/main/memory.c:1234
 msgid "can only weakly reference/finalize reference objects"
 msgstr "參考物件只能被弱型參考或被終了"
 
-#: src/main/memory.c:1266
+#: src/main/memory.c:1268
 msgid "finalizer must be a function or NULL"
 msgstr "終了程式必須是函數或 NULL"
 
-#: src/main/memory.c:1322 src/main/memory.c:1330 src/main/memory.c:1341
+#: src/main/memory.c:1324 src/main/memory.c:1332 src/main/memory.c:1343
 msgid "not a weak reference"
 msgstr "非弱型參考"
 
-#: src/main/memory.c:1472
+#: src/main/memory.c:1474
 msgid "first argument must be environment or external pointer"
 msgstr "第一引數必須是環境或外部指標"
 
-#: src/main/memory.c:1474
+#: src/main/memory.c:1476
 msgid "second argument must be a function"
 msgstr "第二引數必須是函數"
 
-#: src/main/memory.c:1478
+#: src/main/memory.c:1480
 msgid "third argument must be 'TRUE' or 'FALSE'"
 msgstr "第三引數的值必須是 'TRUE' 或 'FALSE'"
 
-#: src/main/memory.c:1970
+#: src/main/memory.c:1979
 msgid "vector memory exhausted (limit reached?)"
 msgstr "向量記憶體已用完 (達到了極值?)"
 
-#: src/main/memory.c:1976
+#: src/main/memory.c:1985
 msgid "cons memory exhausted (limit reached?)"
 msgstr "cons 記憶體已用完 (達到了極值?)"
 
-#: src/main/memory.c:1981
+#: src/main/memory.c:1990
 msgid "memory exhausted (limit reached?)"
 msgstr "記憶體已耗盡 (達到了極值?)"
 
-#: src/main/memory.c:2116
+#: src/main/memory.c:2126
 #, fuzzy, c-format
 msgid "cannot allocate memory block of size %0.f Tb"
 msgstr "無法配置大小為 %0.1f Gb 的記憶體區塊"
 
-#: src/main/memory.c:2121
+#: src/main/memory.c:2131
 #, c-format
 msgid "cannot allocate memory block of size %0.1f Gb"
 msgstr "無法配置大小為 %0.1f Gb 的記憶體區塊"
 
-#: src/main/memory.c:2442
+#: src/main/memory.c:2458
 #, fuzzy
 msgid "vector is too large"
 msgstr "指定的向量大小太大"
 
-#: src/main/memory.c:2445
+#: src/main/memory.c:2461
 msgid "negative length vectors are not allowed"
 msgstr "不允許負長度的向量"
 
-#: src/main/memory.c:2471 src/main/memory.c:2484 src/main/memory.c:2497
-#: src/main/memory.c:2512
+#: src/main/memory.c:2487 src/main/memory.c:2500 src/main/memory.c:2513
+#: src/main/memory.c:2528
 #, c-format
 msgid "cannot allocate vector of length %d"
 msgstr "無法分派長度為 %d 的向量"
 
-#: src/main/memory.c:2533
+#: src/main/memory.c:2549
 #, c-format
 msgid "invalid type/length (%s/%d) in vector allocation"
 msgstr "向量配置的類型/長度 (%s/%d) 無效"
 
-#: src/main/memory.c:2636
+#: src/main/memory.c:2648
 #, c-format
 msgid "cannot allocate vector of size %0.1f Gb"
 msgstr "無法配置大小為 %0.1f Gb 的向量"
 
-#: src/main/memory.c:2640
+#: src/main/memory.c:2652
 #, c-format
 msgid "cannot allocate vector of size %0.1f Mb"
 msgstr "無法配置大小為 %0.1f Mb 的向量"
 
-#: src/main/memory.c:2644
+#: src/main/memory.c:2656
 #, c-format
 msgid "cannot allocate vector of size %0.f Kb"
 msgstr "無法配置大小為 %0.f Kb 的向量"
 
-#: src/main/memory.c:3001
+#: src/main/memory.c:3071
 msgid "protect(): protection stack overflow"
 msgstr "protect():防止堆疊向上溢位"
 
-#: src/main/memory.c:3008
-#, c-format
-msgid "unprotect(): only %d protected items"
-msgstr "unprotect():只有 %d 個受保護項目"
+#: src/main/memory.c:3078
+#, fuzzy, c-format
+msgid "unprotect(): only %d protected item"
+msgid_plural "unprotect(): only %d protected items"
+msgstr[0] "unprotect():只有 %d 個受保護項目"
 
-#: src/main/memory.c:3041
+#: src/main/memory.c:3113
 msgid "unprotect_ptr: pointer not found"
 msgstr "unprotect_ptr: 找不到指標"
 
-#: src/main/memory.c:3079
+#: src/main/memory.c:3151
 #, fuzzy, c-format
-msgid "R_Reprotect: only %d protected items, can't reprotect index %d"
-msgstr "unprotect():只有 %d 個受保護項目"
+msgid "R_Reprotect: only %d protected item, can't reprotect index %d"
+msgid_plural "R_Reprotect: only %d protected items, can't reprotect index %d"
+msgstr[0] "unprotect():只有 %d 個受保護項目"
 
-#: src/main/memory.c:3129
+#: src/main/memory.c:3203
 #, fuzzy, c-format
 msgid "'Calloc' could not allocate memory (%.0f of %u bytes)"
 msgstr "Calloc 無法配置記憶體 (%.0f 於 %u 位元組)"
 
-#: src/main/memory.c:3140
+#: src/main/memory.c:3214
 #, fuzzy, c-format
 msgid "'Realloc' could not re-allocate memory (%.0f bytes)"
 msgstr "Realloc 無法重新配置記憶體 (%.0f 位元組)"
 
-#: src/main/memory.c:3380
+#: src/main/memory.c:3460
 msgid "not safe to return vector pointer"
 msgstr "回傳向量指標不是安全的做法"
 
-#: src/main/memory.c:3392
+#: src/main/memory.c:3471
 #, c-format
 msgid "attempt to set index %lu/%lu in SET_STRING_ELT"
 msgstr ""
 
-#: src/main/memory.c:3408
+#: src/main/memory.c:3487
 #, c-format
 msgid "attempt to set index %lu/%lu in SET_VECTOR_ELT"
 msgstr ""
 
-#: src/main/memory.c:3658
+#: src/main/memory.c:3514 src/main/memory.c:3524 src/main/memory.c:3536
+#: src/main/memory.c:3550 src/main/memory.c:3565 src/main/memory.c:3583
+msgid "bad value"
+msgstr "不當的值"
+
+#: src/main/memory.c:3746
 msgid "memory profiling is not available on this system"
 msgstr "這個系統上無法取得記憶體側寫檔"
 
-#: src/main/memory.c:3723
+#: src/main/memory.c:3810
 #, c-format
 msgid "Rprofmem: cannot open output file '%s'"
 msgstr "Rprofmem:無法開啟輸出檔案 '%s'"
 
-#: src/main/memory.c:3830
+#: src/main/memory.c:3915
 #, c-format
 msgid "long vectors not supported yet: %s:%d"
 msgstr ""
 
-#: src/main/names.c:996
+#: src/main/names.c:1021
 msgid "string argument required"
 msgstr "需要字串引數"
 
-#: src/main/names.c:999
+#: src/main/names.c:1024
 msgid "no such primitive function"
 msgstr "沒有此一原始函數"
 
-#: src/main/names.c:1146
+#: src/main/names.c:1212 src/main/names.c:1242
 msgid "attempt to use zero-length variable name"
 msgstr "不能用零長度的變數名"
 
-#: src/main/names.c:1148
+#: src/main/names.c:1214 src/main/names.c:1244
 #, c-format
 msgid "variable names are limited to %d bytes"
 msgstr "變數名稱受限為 %d 位元組"
 
-#: src/main/names.c:1176 src/main/names.c:1179
+#: src/main/names.c:1307 src/main/names.c:1310
 msgid "invalid .Internal() argument"
 msgstr ".Internal() 引數不正確"
 
-#: src/main/objects.c:46
+#: src/main/objects.c:39
 msgid "generic 'function' is not a function"
 msgstr "一般 'function' 不是函數"
 
-#: src/main/objects.c:201
+#: src/main/objects.c:193
 msgid "bad generic call environment"
 msgstr "一般呼叫環境不正確"
 
-#: src/main/objects.c:207
+#: src/main/objects.c:201
 msgid "bad generic definition environment"
 msgstr "一般定義環境不正確"
 
-#: src/main/objects.c:246
+#: src/main/objects.c:249
 #, fuzzy
 msgid ""
 "no '.S3MethodsClass' table, cannot use S4 objects with S3 methods ('methods' "
@@ -4296,150 +4390,127 @@ msgid ""
 msgstr ""
 "沒有 .S3MethodsClass 表格,無法使用 S4 物件與 S3 方法 (沒有附加方法套件?)"
 
-#: src/main/objects.c:270 src/main/objects.c:411
-msgid "'UseMethod' used in an inappropriate fashion"
-msgstr "'UseMethod' 不能這樣使用"
-
-#: src/main/objects.c:290
-#, fuzzy
-msgid "invalid generic function in 'usemethod'"
-msgstr "'usemethod' 中不能用一般功能"
-
-#: src/main/objects.c:399
+#: src/main/objects.c:415
 msgid "there must be a 'generic' argument"
 msgstr "必須要有一個 'generic' 引數"
 
-#: src/main/objects.c:403
+#: src/main/objects.c:419
 msgid "'generic' argument must be a character string"
 msgstr "'generic' 引數必須是字串"
 
-#: src/main/objects.c:440
-#, fuzzy
-msgid "'UseMethod' called from outside a function"
-msgstr "'NextMethod' 不能在函數外呼叫"
-
-#: src/main/objects.c:447
-msgid "first argument must be a generic name"
-msgstr "第一引數必須是一般名稱"
+#: src/main/objects.c:427
+msgid "'UseMethod' used in an inappropriate fashion"
+msgstr "'UseMethod' 不能這樣使用"
 
 #: src/main/objects.c:472
 #, c-format
 msgid "no applicable method for '%s' applied to an object of class \"%s\""
 msgstr "沒有適用的方法可將 '%s' 套用到 \"%s\" 類別的物件"
 
-#: src/main/objects.c:533
+#: src/main/objects.c:582
 msgid "'NextMethod' called from outside a function"
 msgstr "'NextMethod' 不能在函數外呼叫"
 
-#: src/main/objects.c:539
+#: src/main/objects.c:588
 msgid "'NextMethod' called from an anonymous function"
 msgstr "'NextMethod' 不能在匿名函數內呼叫"
 
-#: src/main/objects.c:563
+#: src/main/objects.c:609
 msgid "no calling generic was found: was a method called directly?"
 msgstr "找不到呼叫此方法的一般函數: 是不是已經直接呼叫這個方法?"
 
-#: src/main/objects.c:566
+#: src/main/objects.c:612
 #, c-format
 msgid "'function' is not a function, but of type %d"
 msgstr "'function' 不是函數, 而是類型 %d"
 
-#: src/main/objects.c:640
+#: src/main/objects.c:639
 msgid "wrong argument ..."
 msgstr "引數不正確 ..."
 
-#: src/main/objects.c:653
+#: src/main/objects.c:651
 msgid "object not specified"
 msgstr "物件沒有指定"
 
-#: src/main/objects.c:663 src/main/objects.c:670
+#: src/main/objects.c:659 src/main/objects.c:666
 msgid "generic function not specified"
 msgstr "一般功能沒有指定"
 
-#: src/main/objects.c:667
+#: src/main/objects.c:663
 #, fuzzy
 msgid "invalid generic argument to 'NextMethod'"
 msgstr "NextMethod 不能用一般引數"
 
-#: src/main/objects.c:680
+#: src/main/objects.c:675
 #, fuzzy
 msgid "invalid 'group' argument found in 'NextMethod'"
 msgstr "NextMethod 不能用 'group' 引數"
 
-#: src/main/objects.c:699
+#: src/main/objects.c:692
 msgid "wrong value for .Method"
 msgstr ".Method 的值不正確"
 
-#: src/main/objects.c:703 src/main/objects.c:712
-#, c-format
-msgid "method name too long in '%s'"
-msgstr "'%s' 中的方法名稱太長"
-
-#: src/main/objects.c:715
+#: src/main/objects.c:702
 msgid "Incompatible methods ignored"
 msgstr "不相容方法,忽略不用"
 
-#: src/main/objects.c:775 src/main/objects.c:780
+#: src/main/objects.c:759 src/main/objects.c:766
 msgid "no method to invoke"
 msgstr "沒有可以呼叫的方法"
 
-#: src/main/objects.c:832
+#: src/main/objects.c:817
 msgid "cannot unclass an environment"
 msgstr "無法取消環境的類別"
 
-#: src/main/objects.c:835
+#: src/main/objects.c:820
 msgid "cannot unclass an external pointer"
 msgstr "無法取消外部指標的類別"
 
-#: src/main/objects.c:872
+#: src/main/objects.c:856
 msgid "'what' must be a character vector"
 msgstr "'what' 必須是字元向量"
 
-#: src/main/objects.c:876
+#: src/main/objects.c:860
 msgid "'which' must be a length 1 logical vector"
 msgstr "'which' 必須是長度為 1 的邏輯向量"
 
-#: src/main/objects.c:882
+#: src/main/objects.c:866
 msgid "use 'is()' instead of 'inherits()' on S4 objects"
 msgstr "在 S4 物件上使用 'is()' 來代替 'inherits()'"
 
-#: src/main/objects.c:1012
+#: src/main/objects.c:995
 msgid "could not find correct environment; please report!"
 msgstr ""
 
-#: src/main/objects.c:1052
+#: src/main/objects.c:1039
 #, fuzzy
 msgid "'onOff' must be TRUE or FALSE"
 msgstr "'all.x' 必須是 TRUE 或 FALSE"
 
-#: src/main/objects.c:1119
+#: src/main/objects.c:1104
 #, c-format
 msgid "unable to find a non-generic version of function \"%s\""
 msgstr "無法找到非一般版本的函數 \"%s\""
 
-#: src/main/objects.c:1151
+#: src/main/objects.c:1136
 #, fuzzy
 msgid ""
 "'standardGeneric' called without 'methods' dispatch enabled (will be ignored)"
 msgstr "standardGeneric 被呼叫,但方法分派沒有啟用 (忽略不用)"
 
-#: src/main/objects.c:1160
+#: src/main/objects.c:1145
 #, fuzzy
 msgid "argument to 'standardGeneric' must be a non-empty character string"
 msgstr "standardGeneric 的引數必須是非空字串"
 
-#: src/main/objects.c:1165
+#: src/main/objects.c:1150
 #, c-format
 msgid ""
 "call to standardGeneric(\"%s\") apparently not from the body of that generic "
 "function"
 msgstr "不能從非同屬函數中呼叫 standardGeneric(\"%s\") "
 
-#: src/main/objects.c:1189
-msgid "argument 'code' must be a character string"
-msgstr "引數 'code' 必須是字串"
-
-#: src/main/objects.c:1257
+#: src/main/objects.c:1249
 #, c-format
 msgid ""
 "invalid primitive methods code (\"%s\"): should be \"clear\", \"reset\", "
@@ -4448,112 +4519,122 @@ msgstr ""
 "原始方法程式碼 (\"%s\") 不正確:應該是 \"clear\"、\"reset\"、\"set\" 或 "
 "\"suppress\""
 
-#: src/main/objects.c:1265
+#: src/main/objects.c:1257
 msgid "invalid object: must be a primitive function"
 msgstr "物件不正確: 必須是原始函數"
 
-#: src/main/objects.c:1312
+#: src/main/objects.c:1304
 #, c-format
 msgid ""
 "the formal definition of a primitive generic must be a function object (got "
 "type '%s')"
 msgstr "原始一般函數的正式定義必須是函數物件 (不能是 '%s' 類別)"
 
-#: src/main/objects.c:1342
+#: src/main/objects.c:1334
 #, fuzzy, c-format
 msgid "object returned as generic function \"%s\" does not appear to be one"
 msgstr "以通用函數 \"%s\" 型式回傳的物件看來不是一個"
 
-#: src/main/objects.c:1444
+#: src/main/objects.c:1439
 msgid "invalid primitive operation given for dispatch"
 msgstr "不能分派原始運算"
 
-#: src/main/objects.c:1470 src/main/objects.c:1489
+#: src/main/objects.c:1468 src/main/objects.c:1487
 msgid "dispatch error"
 msgstr "分派錯誤"
 
-#: src/main/objects.c:1483
+#: src/main/objects.c:1481
 #, c-format
 msgid ""
 "primitive function \"%s\" has been set for methods but no generic function "
 "supplied"
 msgstr "原始函數 \"%s\" 設定了方法,但沒有一般函數 "
 
-#: src/main/objects.c:1508
+#: src/main/objects.c:1506
 msgid "C level MAKE_CLASS macro called with NULL string pointer"
 msgstr "C 級的 MAKE_TYPE 巨集不能用 NULL 字串指標來呼叫"
 
-#: src/main/objects.c:1524
+#: src/main/objects.c:1522
+#, fuzzy
+msgid "'methods' package not yet loaded"
+msgstr "無法載入 Hershey 字型"
+
+#: src/main/objects.c:1532
 msgid "R_getClassDef(.) called with NULL string pointer"
 msgstr "R_getClassDef(.)  以空字串指標來呼叫"
 
-#: src/main/objects.c:1546
+#: src/main/objects.c:1577
 msgid "C level NEW macro called with null class definition pointer"
 msgstr "C 級的 NEW 巨集不能用 null 類別定義指標來呼叫"
 
-#: src/main/objects.c:1550
+#: src/main/objects.c:1581
 #, c-format
 msgid "trying to generate an object from a virtual class (\"%s\")"
 msgstr "試著從虛擬類別 (\"%s\") 產生物件"
 
-#: src/main/objects.c:1627
+#: src/main/objects.c:1663
 #, fuzzy, c-format
 msgid "object of class \"%s\" does not correspond to a valid S3 object"
 msgstr "\"%s\" 類別的物件並不相應於有效的 S3 物件"
 
-#: src/main/options.c:120 src/main/options.c:180
+#: src/main/options.c:121 src/main/options.c:182
 msgid "corrupted options list"
 msgstr "已損壞的選項串列"
 
-#: src/main/options.c:130
+#: src/main/options.c:131
 msgid "invalid printing width, used 80"
 msgstr "無效的印出寬度,使用 80"
 
-#: src/main/options.c:141
+#: src/main/options.c:142
 msgid "invalid printing digits, used 7"
 msgstr "無效的印出位數,使用 7"
 
-#: src/main/options.c:153
+#: src/main/options.c:154
 msgid "invalid 'deparse.cutoff', used 60"
 msgstr ""
 
-#: src/main/options.c:165
+#: src/main/options.c:166
 msgid "invalid value for \"device.ask.default\", using FALSE"
 msgstr "用於 \"device.ask.default\" 的值無效,使用 FALSE"
 
-#: src/main/options.c:401
+#: src/main/options.c:416
 msgid "list argument has no valid names"
 msgstr "串列引數沒有任何有效名稱"
 
-#: src/main/options.c:429
+#: src/main/options.c:445
 #, c-format
 msgid "invalid 'width' parameter, allowed %d...%d"
 msgstr "無效的 'width' 參數,允許 %d...%d"
 
-#: src/main/options.c:440
+#: src/main/options.c:456
 #, c-format
 msgid "invalid 'digits' parameter, allowed %d...%d"
 msgstr "無效的 'digits' 參數,允許 %d...%d"
 
-#: src/main/options.c:447
+#: src/main/options.c:463
 #, c-format
 msgid "'expressions' parameter invalid, allowed %d...%d"
 msgstr "'expressions' 參數無效,允許 %d...%d"
 
-#: src/main/options.c:454 src/main/options.c:462 src/main/options.c:468
-#: src/main/options.c:476 src/main/options.c:483 src/main/options.c:488
-#: src/main/options.c:495 src/main/options.c:501 src/main/options.c:507
-#: src/main/options.c:512 src/main/options.c:517 src/main/options.c:526
-#: src/main/options.c:532 src/main/options.c:538 src/main/options.c:549
-#: src/main/options.c:556 src/main/options.c:562 src/main/options.c:570
-#: src/main/options.c:577 src/main/options.c:584 src/main/options.c:591
-#: src/main/options.c:598 src/main/options.c:606 src/main/options.c:615
-#: src/main/options.c:618 src/main/options.c:624
+#: src/main/options.c:470 src/main/options.c:478 src/main/options.c:484
+#: src/main/options.c:492 src/main/options.c:499 src/main/options.c:504
+#: src/main/options.c:511 src/main/options.c:517 src/main/options.c:523
+#: src/main/options.c:528 src/main/options.c:533 src/main/options.c:542
+#: src/main/options.c:548 src/main/options.c:554 src/main/options.c:564
+#: src/main/options.c:578 src/main/options.c:584 src/main/options.c:592
+#: src/main/options.c:599 src/main/options.c:606 src/main/options.c:613
+#: src/main/options.c:620 src/main/options.c:628 src/main/options.c:637
+#: src/main/options.c:640 src/main/options.c:646
 #, c-format
 msgid "invalid value for '%s'"
 msgstr "無效的值用於 '%s'"
 
-#: src/main/options.c:611 src/main/options.c:640
+#: src/main/options.c:569
+#, fuzzy
+msgid "'OutDec' must be a string of one character"
+msgstr "'dec' 必須是單一字元"
+
+#: src/main/options.c:633 src/main/options.c:662
 msgid "\"par.ask.default\" has been replaced by \"device.ask.default\""
 msgstr "\"par.ask.default\" 已被 \"device.ask.default\" 所置換"
 
@@ -4574,15 +4655,20 @@ msgstr ""
 msgid "non-string argument to Internal paste"
 msgstr "內部貼上的引數不是字串"
 
-#: src/main/paste.c:390
+#: src/main/paste.c:387
 msgid "first argument must be atomic"
 msgstr "第一個引數必須是基元"
 
-#: src/main/paste.c:560
+#: src/main/paste.c:448
+#, fuzzy
+msgid "'decimal.mark' must be a string of one character"
+msgstr "'dec' 必須是單一字元"
+
+#: src/main/paste.c:579
 msgid "Impossible mode ( x )"
 msgstr "這種狀態 (x) 是不可能的"
 
-#: src/main/paste.c:645
+#: src/main/paste.c:663
 msgid "atomic vector arguments only"
 msgstr "只能用基元向量引數"
 
@@ -4590,214 +4676,196 @@ msgstr "只能用基元向量引數"
 msgid "invalid filename specification"
 msgstr "檔案名稱設定不正確"
 
-#: src/main/platform.c:375 src/main/platform.c:419
+#: src/main/platform.c:375 src/main/platform.c:420
 msgid "write error during file append"
 msgstr "檔案附加時寫入發生錯誤"
 
-#: src/main/platform.c:394
+#: src/main/platform.c:395
 msgid "nothing to append to"
 msgstr "沒有可以附加的檔案"
 
-#: src/main/platform.c:448 src/main/platform.c:795
+#: src/main/platform.c:449 src/main/platform.c:797 src/main/platform.c:979
 msgid "invalid filename argument"
 msgstr "filename 引數不正確"
 
-#: src/main/platform.c:460
+#: src/main/platform.c:461
 #, c-format
 msgid "cannot create file '%s', reason '%s'"
 msgstr "無法建立檔案 '%s' ,原因是 '%s'"
 
-#: src/main/platform.c:475 src/main/platform.c:545 src/main/platform.c:627
+#: src/main/platform.c:476 src/main/platform.c:546 src/main/platform.c:629
 msgid "invalid first filename"
 msgstr "第一個檔案名稱不正確"
 
-#: src/main/platform.c:487
+#: src/main/platform.c:488
 #, c-format
 msgid "cannot remove file '%s', reason '%s'"
 msgstr "無法移除檔案 '%s' ,原因是 '%s'"
 
-#: src/main/platform.c:547 src/main/platform.c:629
+#: src/main/platform.c:548 src/main/platform.c:631
 msgid "invalid second filename"
 msgstr "第二個檔案名稱不正確"
 
-#: src/main/platform.c:549 src/main/platform.c:631
+#: src/main/platform.c:551 src/main/platform.c:634
 msgid "nothing to link"
 msgstr "沒有可以連結的檔案"
 
-#: src/main/platform.c:559
+#: src/main/platform.c:561
 #, fuzzy
 msgid "symbolic links are not supported on this version of Windows"
 msgstr "這個平臺不支援符號連結"
 
-#: src/main/platform.c:581
+#: src/main/platform.c:583
 #, fuzzy, c-format
 msgid "cannot symlink '%ls' to '%ls', reason '%s'"
 msgstr "無法將 '%s' 符號連結到 '%s' ,原因是 '%s'"
 
-#: src/main/platform.c:601
+#: src/main/platform.c:603
 #, c-format
 msgid "cannot symlink '%s' to '%s', reason '%s'"
 msgstr "無法將 '%s' 符號連結到 '%s' ,原因是 '%s'"
 
-#: src/main/platform.c:609
+#: src/main/platform.c:611
 #, fuzzy
 msgid "symbolic links are not supported on this platform"
 msgstr "這個平臺不支援符號連結"
 
-#: src/main/platform.c:649
+#: src/main/platform.c:652
 #, c-format
 msgid "cannot link '%ls' to '%ls', reason '%s'"
 msgstr "無法將 '%ls' 鏈結到 '%ls' ,原因是 '%s'"
 
-#: src/main/platform.c:669
+#: src/main/platform.c:672
 #, c-format
 msgid "cannot link '%s' to '%s', reason '%s'"
 msgstr "無法將 '%s' 鏈結到 '%s' ,原因是 '%s'"
 
-#: src/main/platform.c:678
+#: src/main/platform.c:681
 msgid "(hard) links are not supported on this platform"
 msgstr "這個平臺不支援 (硬式) 鏈結"
 
-#: src/main/platform.c:709
+#: src/main/platform.c:713
 msgid "'from' and 'to' are of different lengths"
 msgstr "'from' 和 'to' 具有不同的長度"
 
-#: src/main/platform.c:720 src/main/platform.c:730
+#: src/main/platform.c:724 src/main/platform.c:734
 msgid "expanded 'from' name too long"
 msgstr "展開後的 'from' 名稱太長"
 
-#: src/main/platform.c:724 src/main/platform.c:734
+#: src/main/platform.c:728 src/main/platform.c:738
 msgid "expanded 'to' name too long"
 msgstr "展開後的 'to' 名稱太長"
 
-#: src/main/platform.c:738
+#: src/main/platform.c:742
 #, c-format
 msgid "cannot rename file '%s' to '%s', reason '%s'"
 msgstr "無法將檔案 '%s' 重新命名為 ' %s' ,原因是 '%s'"
 
-#: src/main/platform.c:1094
+#: src/main/platform.c:1168
 msgid "invalid 'pattern' regular expression"
 msgstr "'pattern' 正規表示式不正確"
 
-#: src/main/platform.c:1211
+#: src/main/platform.c:1285
 msgid "unable to determine R home location"
 msgstr "無法確定 R 家目錄位置"
 
-#: src/main/platform.c:1263
+#: src/main/platform.c:1338
 msgid "file name too long"
 msgstr "檔案名稱太長"
 
-#: src/main/platform.c:1511 src/main/platform.c:1558 src/main/sysutils.c:1850
-#: src/main/sysutils.c:1864
+#: src/main/platform.c:1586 src/main/platform.c:1633 src/main/sysutils.c:1806
+#: src/main/sysutils.c:1820
 msgid "internal out-of-memory condition"
 msgstr "內部記憶體不足的狀況"
 
-#: src/main/platform.c:1554 src/main/sysutils.c:1860
+#: src/main/platform.c:1629 src/main/sysutils.c:1816
 #, c-format
 msgid "read error on '%s'"
 msgstr "於 '%s' 讀取錯誤"
 
-#: src/main/platform.c:1722
+#: src/main/platform.c:1728
 msgid "setting 'LC_NUMERIC' may cause R to function strangely"
 msgstr "正在設定 'LC_NUMERIC' 可能會使得 R 的運作異常"
 
-#: src/main/platform.c:1736
+#: src/main/platform.c:1742
 msgid "LC_MESSAGES exists on Windows but is not operational"
 msgstr "LC_MESSAGES 存在於 Windows 但是運作不正常"
 
-#: src/main/platform.c:1763
+#: src/main/platform.c:1769
 #, c-format
 msgid "OS reports request to set locale to \"%s\" cannot be honored"
 msgstr "作業系統回報無法實現設定語區為 \"%s\" 的要求"
 
-#: src/main/platform.c:2065
-msgid "'hostname' must be a character vector of length 1"
-msgstr "'hostname' 必須是長度為 1 的字元向量"
-
-#: src/main/platform.c:2071
-#, c-format
-msgid "nsl() was unable to resolve host '%s'"
-msgstr "nsl() 無法分辨主機 '%s'"
-
-#: src/main/platform.c:2078
-#, fuzzy
-msgid "unknown format returned by C function 'gethostbyname'"
-msgstr "gethostbyname 回傳了錯誤的格式"
-
-#: src/main/platform.c:2087
-msgid "nsl() is not supported on this platform"
-msgstr "本平臺不支援 nsl()"
-
-#: src/main/platform.c:2158
+#: src/main/platform.c:2131
 #, c-format
 msgid "'%s' already exists"
 msgstr "'%s' 已存在"
 
-#: src/main/platform.c:2161
+#: src/main/platform.c:2134
 #, c-format
 msgid "cannot create dir '%s', reason '%s'"
 msgstr "無法建立目錄 '%s' ,原因是 '%s'"
 
-#: src/main/platform.c:2207
+#: src/main/platform.c:2181
 #, c-format
 msgid "'%ls' already exists"
 msgstr "'%ls' 已經存在"
 
-#: src/main/platform.c:2211
+#: src/main/platform.c:2183 src/main/platform.c:2189
 #, c-format
 msgid "cannot create dir '%ls', reason '%s'"
 msgstr "無法建立目錄 '%ls' ,原因是 '%s'"
 
-#: src/main/platform.c:2245 src/main/platform.c:2449
+#: src/main/platform.c:2223 src/main/platform.c:2435
 msgid "too deep nesting"
 msgstr ""
 
-#: src/main/platform.c:2253 src/main/platform.c:2266 src/main/platform.c:2284
+#: src/main/platform.c:2231 src/main/platform.c:2244 src/main/platform.c:2262
 #, fuzzy
 msgid "over-long path"
 msgstr "胚騰長度為零"
 
-#: src/main/platform.c:2273
+#: src/main/platform.c:2251
 #, c-format
 msgid "problem creating directory %ls: %s"
 msgstr "建立目錄 %ls 時出了問題:%s"
 
-#: src/main/platform.c:2293
+#: src/main/platform.c:2271
 #, c-format
 msgid "problem reading dir %ls: %s"
 msgstr "讀取目錄 %ls 時出了問題:%s"
 
-#: src/main/platform.c:2304 src/main/platform.c:2465 src/main/platform.c:2478
-#: src/main/platform.c:2498 src/main/platform.c:2520
+#: src/main/platform.c:2282 src/main/platform.c:2451 src/main/platform.c:2464
+#: src/main/platform.c:2484 src/main/platform.c:2506
 #, fuzzy
 msgid "over-long path length"
 msgstr "胚騰長度為零"
 
-#: src/main/platform.c:2312
+#: src/main/platform.c:2290
 #, c-format
 msgid "problem copying %ls to %ls: %s"
 msgstr "複製 %ls 到 %ls 時出了問題:%s"
 
-#: src/main/platform.c:2487
+#: src/main/platform.c:2473
 #, c-format
 msgid "problem creating directory %s: %s"
 msgstr "建立目錄 %s 時出了問題:%s"
 
-#: src/main/platform.c:2507
+#: src/main/platform.c:2493
 #, c-format
 msgid "problem reading directory %s: %s"
 msgstr "讀取目錄 %s 時出了問題:%s"
 
-#: src/main/platform.c:2529
+#: src/main/platform.c:2515
 #, c-format
 msgid "problem copying %s to %s: %s"
 msgstr "複製 %s 到 %s 時出了問題:%s"
 
-#: src/main/platform.c:2662
+#: src/main/platform.c:2653
 msgid "'mode' must be of length at least one"
 msgstr "'mode' 的長度必須是至少一個"
 
-#: src/main/platform.c:2729
+#: src/main/platform.c:2720
 msgid "insufficient OS support on this platform"
 msgstr "這個平臺的作業系統支援不足"
 
@@ -4818,94 +4886,99 @@ msgstr "所有的 z 值都是 NA"
 msgid "invalid math style encountered"
 msgstr "遇到無效的數學樣式"
 
-#: src/main/plotmath.c:1261 src/main/plotmath.c:1366 src/main/plotmath.c:2664
+#: src/main/plotmath.c:1260 src/main/plotmath.c:1365 src/main/plotmath.c:2654
 msgid "invalid mathematical annotation"
 msgstr "無效的數學記法"
 
-#: src/main/plotmath.c:1670
+#: src/main/plotmath.c:1669
 msgid "invalid accent"
 msgstr "無效的音調符號"
 
-#: src/main/plotmath.c:1964
+#: src/main/plotmath.c:1963
 msgid "invalid group delimiter"
 msgstr "無效的群組分隔符號"
 
-#: src/main/plotmath.c:1991 src/main/plotmath.c:2137
+#: src/main/plotmath.c:1990 src/main/plotmath.c:2127
 msgid "invalid group specification"
 msgstr "無效的群組規格"
 
-#: src/main/plotmath.c:2062
+#: src/main/plotmath.c:2052
 msgid "group is incomplete"
 msgstr "群組不完整"
 
-#: src/main/plotmath.c:3190
+#: src/main/plotmath.c:3180
 msgid "Metric information not available for this family/device"
 msgstr "度量資訊無法用於這個家族/裝置"
 
-#: src/main/print.c:148 src/main/print.c:254
+#: src/main/print.c:140 src/main/print.c:247
 msgid "invalid 'na.print' specification"
 msgstr "'na.print' 設定不正確"
 
-#: src/main/print.c:157
+#: src/main/print.c:149
 msgid "invalid row labels"
 msgstr "列標記不正確"
 
-#: src/main/print.c:159
+#: src/main/print.c:151
 msgid "invalid column labels"
 msgstr "行標記不正確"
 
-#: src/main/print.c:183
+#: src/main/print.c:176
 msgid "non-function argument to .Internal(print.function(.))"
 msgstr ".Internal (print.function(.)) 的非函數引數"
 
-#: src/main/print.c:264
+#: src/main/print.c:257
 msgid "'gap' must be non-negative integer"
 msgstr "'gap' 必須是正整數"
 
-#: src/main/print.c:289
+#: src/main/print.c:282
 msgid "invalid 'tryS4' internal argument"
 msgstr "'tryS4' 內部引數不正確"
 
-#: src/main/print.c:1028
+#: src/main/print.c:851
+#, fuzzy
+msgid "print buffer overflow"
+msgstr "輸入緩衝區溢位於第 %d 列"
+
+#: src/main/print.c:1043
 #, fuzzy
 msgid "invalid character length in 'dblepr'"
 msgstr "dblepr 字元長度不正確"
 
-#: src/main/print.c:1046
+#: src/main/print.c:1061
 #, fuzzy
 msgid "invalid character length in 'intpr'"
 msgstr "intpr 字元長度不正確"
 
-#: src/main/print.c:1065
+#: src/main/print.c:1080
 #, fuzzy
 msgid "invalid character length in 'realpr'"
 msgstr "realpr 字元長度不正確"
 
-#: src/main/print.c:1075
+#: src/main/print.c:1090
 #, fuzzy
 msgid "memory allocation error in 'realpr'"
 msgstr "realpr 記憶體配置錯誤"
 
-#: src/main/print.c:1091
+#: src/main/print.c:1106
 #, c-format
 msgid "BLAS/LAPACK routine '%6s' gave error code %d"
 msgstr "BLAS/LAPACK 例行程式 '%6s' 產生了錯誤碼 %d"
 
-#: src/main/printarray.c:453
+#: src/main/printarray.c:332
 msgid "too few row labels"
 msgstr "列標記不夠"
 
-#: src/main/printarray.c:455
+#: src/main/printarray.c:334
 msgid "too few column labels"
 msgstr "行標記不夠"
 
-#: src/main/printarray.c:489
+#: src/main/printarray.c:368
 #, fuzzy, c-format
 msgid " [ reached getOption(\"max.print\") -- omitted %d row ]\n"
 msgid_plural " [ reached getOption(\"max.print\") -- omitted %d rows ]\n"
 msgstr[0] " [ 達到了 getOption (\"max.print\") -- 省略最後 %d 列 ]]\n"
 
-#: src/main/printutils.c:613
+#: src/main/printutils.c:710
 #, fuzzy
 msgid "it is not known that wchar_t is Unicode on this platform"
 msgstr "本平臺不支援 nsl()"
@@ -4914,340 +4987,338 @@ msgstr "本平臺不支援 nsl()"
 msgid "argument is not a numeric vector"
 msgstr "引數不是數值向量"
 
-#: src/main/random.c:37
+#: src/main/random.c:39
 msgid "invalid arguments"
 msgstr "引數不正確"
 
-#: src/main/random.c:93 src/main/random.c:110 src/main/random.c:175
-#: src/main/random.c:201 src/main/random.c:274 src/main/random.c:288
+#: src/main/random.c:95 src/main/random.c:112 src/main/random.c:178
+#: src/main/random.c:204 src/main/random.c:277 src/main/random.c:291
 msgid "NAs produced"
 msgstr "產生了 NA"
 
-#: src/main/random.c:445
+#: src/main/random.c:438
 msgid "NA in probability vector"
 msgstr "機率向量中有 NA"
 
-#: src/main/random.c:447
-msgid "non-positive probability"
+#: src/main/random.c:440
+#, fuzzy
+msgid "negative probability"
 msgstr "出現非正值機率"
 
-#: src/main/random.c:454
+#: src/main/random.c:447
 msgid "too few positive probabilities"
 msgstr "正值機率太少"
 
-#: src/main/random.c:491 src/main/random.c:519
+#: src/main/random.c:483 src/main/random.c:511
 msgid "cannot take a sample larger than the population when 'replace = FALSE'"
 msgstr "當 'replace = FALSE' 時不能取用比總體還要大的樣本"
 
-#: src/main/random.c:498
+#: src/main/random.c:490
 msgid "incorrect number of probabilities"
 msgstr "機率數目不正確"
 
-#: src/main/random.c:537
+#: src/main/random.c:529
 #, fuzzy
 msgid "n >= 2^31, replace = FALSE is only supported on 64-bit platforms"
 msgstr "這個平臺不支援 'dirmark = TRUE'"
 
-#: src/main/raw.c:37 src/main/raw.c:273
+#: src/main/raw.c:37 src/main/raw.c:277
 #, fuzzy
 msgid "argument must be a character vector of length 1"
 msgstr "'hostname' 必須是長度為 1 的字元向量"
 
-#: src/main/raw.c:39 src/main/raw.c:275
+#: src/main/raw.c:39 src/main/raw.c:279
 #, fuzzy
 msgid ""
 "argument should be a character vector of length 1\n"
 "all but the first element will be ignored"
 msgstr "引數 '%s' 長度 > 1 且只有第一個元素將被使用"
 
-#: src/main/raw.c:53 src/main/raw.c:89 src/main/raw.c:110
+#: src/main/raw.c:53 src/main/raw.c:90 src/main/raw.c:113
 #, fuzzy
 msgid "argument 'x' must be a raw vector"
 msgstr "第一引數必須是向量"
 
-#: src/main/raw.c:56 src/main/raw.c:330
+#: src/main/raw.c:56 src/main/raw.c:336
 #, fuzzy
 msgid "argument 'multiple' must be TRUE or FALSE"
 msgstr "'resize' 必須為真或假"
 
-#: src/main/raw.c:91
+#: src/main/raw.c:92
 #, fuzzy
 msgid "argument 'shift' must be a small integer"
 msgstr "'size' 引數必須是正整數"
 
-#: src/main/raw.c:129 src/main/raw.c:327
+#: src/main/raw.c:133 src/main/raw.c:333
 #, fuzzy
 msgid "argument 'x' must be an integer vector"
 msgstr "第一引數必須是字元向量"
 
-#: src/main/raw.c:148
+#: src/main/raw.c:153
 #, fuzzy
 msgid "argument 'x' must be raw, integer or logical"
 msgstr "引數 'logarithm' 必須是邏輯值"
 
-#: src/main/raw.c:150
-#, fuzzy
-msgid "argument 'type' must be a character string"
-msgstr "引數 'code' 必須是字串"
-
-#: src/main/raw.c:154
+#: src/main/raw.c:159
 #, fuzzy, c-format
 msgid "argument 'x' must be a multiple of %d long"
 msgstr "引數必須是個函數"
 
-#: src/main/raw.c:167 src/main/raw.c:181
+#: src/main/raw.c:172 src/main/raw.c:186
 #, fuzzy
 msgid "argument 'x' must not contain NAs"
 msgstr "引數必須不是函數"
 
-#: src/main/raw.c:285
+#: src/main/raw.c:291
 #, fuzzy
 msgid "invalid UTF-8 string"
 msgstr "無效的 UTF-8 字串 'old'"
 
-#: src/main/relop.c:202
+#: src/main/relop.c:196
 #, c-format
 msgid "comparison (%d) is possible only for atomic and list types"
 msgstr "只有基元或串列類型才能做比較 (%d)"
 
-#: src/main/relop.c:207
+#: src/main/relop.c:201
 msgid "comparison is not allowed for expressions"
 msgstr "運算式不能作比較"
 
-#: src/main/relop.c:296
+#: src/main/relop.c:293
 msgid "comparison of these types is not implemented"
 msgstr "這些類型的比較還沒有實作"
 
-#: src/main/relop.c:509
+#: src/main/relop.c:425
 msgid "invalid comparison with complex values"
 msgstr "不能與複數值進行比較"
 
-#: src/main/relop.c:767
+#: src/main/relop.c:683
 #, fuzzy
 msgid "'a' and 'b' must have the same type"
 msgstr "'data' 必須是向量類型"
 
-#: src/main/saveload.c:200 src/main/saveload.c:205 src/main/saveload.c:214
-#: src/main/saveload.c:223 src/main/saveload.c:232 src/main/saveload.c:241
-#: src/main/saveload.c:245 src/main/saveload.c:254 src/main/saveload.c:1381
-#: src/main/saveload.c:1386 src/main/saveload.c:1430 src/main/saveload.c:1498
-#: src/main/saveload.c:1507 src/main/serialize.c:331 src/main/serialize.c:338
-#: src/main/serialize.c:2388 src/main/serialize.c:2396
+#: src/main/saveload.c:202 src/main/saveload.c:207 src/main/saveload.c:216
+#: src/main/saveload.c:225 src/main/saveload.c:234 src/main/saveload.c:243
+#: src/main/saveload.c:247 src/main/saveload.c:256 src/main/saveload.c:1383
+#: src/main/saveload.c:1388 src/main/saveload.c:1432 src/main/saveload.c:1500
+#: src/main/saveload.c:1509 src/main/serialize.c:354 src/main/serialize.c:361
+#: src/main/serialize.c:374 src/main/serialize.c:378 src/main/serialize.c:405
+#: src/main/serialize.c:421 src/main/serialize.c:2429
+#: src/main/serialize.c:2437
 msgid "read error"
 msgstr "讀取錯誤"
 
-#: src/main/saveload.c:332
+#: src/main/saveload.c:334
 msgid "a I read error occurred"
 msgstr "發生了 I 類別讀取錯誤"
 
-#: src/main/saveload.c:342
+#: src/main/saveload.c:344
 msgid "a R read error occurred"
 msgstr "發生了 R 類別讀取錯誤"
 
-#: src/main/saveload.c:352
+#: src/main/saveload.c:354
 msgid "a C read error occurred"
 msgstr "發生了 C 類別讀取錯誤"
 
-#: src/main/saveload.c:362
+#: src/main/saveload.c:364
 msgid "a S read error occurred"
 msgstr "發生了 S 類別讀取錯誤"
 
-#: src/main/saveload.c:387 src/main/saveload.c:395 src/main/saveload.c:403
-#: src/main/saveload.c:1594 src/main/saveload.c:1602
+#: src/main/saveload.c:389 src/main/saveload.c:397 src/main/saveload.c:405
+#: src/main/saveload.c:1596 src/main/saveload.c:1604
 msgid "a read error occurred"
 msgstr "發生了讀取錯誤"
 
-#: src/main/saveload.c:467
+#: src/main/saveload.c:469
 msgid "unresolved node during restore"
 msgstr "復原時遇到了無法解析的節點"
 
-#: src/main/saveload.c:488
+#: src/main/saveload.c:490
 #, c-format
 msgid "restore compatibility error - no version %d compatibility"
 msgstr "復原相容錯誤:沒有同版本 %d 相容的功能"
 
-#: src/main/saveload.c:572 src/main/saveload.c:645
+#: src/main/saveload.c:574 src/main/saveload.c:647
 msgid "bad SEXP type in data file"
 msgstr "資料檔案中 SEXP 類型發生錯誤"
 
-#: src/main/saveload.c:586
+#: src/main/saveload.c:588
 msgid "mismatch on types"
 msgstr "類型不符合"
 
-#: src/main/saveload.c:607 src/main/saveload.c:1270 src/main/serialize.c:1636
+#: src/main/saveload.c:609 src/main/saveload.c:1272 src/main/serialize.c:1675
 #, fuzzy, c-format
 msgid "unrecognized internal function name \"%s\""
 msgstr "沒有這個函數 \"%s\""
 
-#: src/main/saveload.c:709
+#: src/main/saveload.c:711
 msgid "cannot save file position while restoring data"
 msgstr "復原資料的時候無法儲存檔案位置"
 
-#: src/main/saveload.c:722
+#: src/main/saveload.c:724
 msgid "cannot restore file position while restoring data"
 msgstr "復原資料的時候無法復原檔案位置"
 
-#: src/main/saveload.c:915
+#: src/main/saveload.c:917
 msgid "base namespace is not preserved in version 1 workspaces"
 msgstr "1 號版本工作空間不能保留基本名稱空間"
 
-#: src/main/saveload.c:917
+#: src/main/saveload.c:919
 msgid "cannot save namespace in version 1 workspaces"
 msgstr "1 號版本工作空間無法儲存名稱空間"
 
-#: src/main/saveload.c:919
+#: src/main/saveload.c:921
 msgid ""
 "cannot save environment with locked/active bindings in version 1 workspaces"
 msgstr "1 號版本工作空間不能儲存鎖住的或是仍在用的繫結環境"
 
-#: src/main/saveload.c:943
+#: src/main/saveload.c:945
 msgid "cannot save weak references in version 1 workspaces"
 msgstr "1 號版本工作空間無法儲存弱型參考"
 
-#: src/main/saveload.c:1021
+#: src/main/saveload.c:1023
 msgid "NewWriteVec called with non-vector type"
 msgstr "NewWriteVec 不適用於非向量類型"
 
-#: src/main/saveload.c:1084
+#: src/main/saveload.c:1086
 msgid "cannot save byte code objects in version 1 workspaces"
 msgstr "1 號版本工作空間無法儲存位元組碼物件"
 
-#: src/main/saveload.c:1086
+#: src/main/saveload.c:1088
 #, c-format
 msgid "NewWriteItem: unknown type %i"
 msgstr "NewWriteItem: 不明類型 %i"
 
-#: src/main/saveload.c:1216
+#: src/main/saveload.c:1218
 msgid "NewReadVec called with non-vector type"
 msgstr "NewReadVec 不適用於非向量類型"
 
-#: src/main/saveload.c:1286
+#: src/main/saveload.c:1288
 msgid "cannot read byte code objects from version 1 workspaces"
 msgstr "無法從 1 號版本工作空間中讀取位元組碼物件"
 
-#: src/main/saveload.c:1288
+#: src/main/saveload.c:1290
 #, c-format
 msgid "NewReadItem: unknown type %i"
 msgstr "NewReadItem: 不明類型 %i"
 
-#: src/main/saveload.c:1440
+#: src/main/saveload.c:1442
 msgid "out of memory reading ascii string"
 msgstr "讀取 ascii 字串時記憶體不足"
 
-#: src/main/saveload.c:1565
+#: src/main/saveload.c:1567
 msgid "a binary read error occurred"
 msgstr "二進位讀取時發生了錯誤"
 
-#: src/main/saveload.c:1580 src/main/saveload.c:1681
+#: src/main/saveload.c:1582 src/main/saveload.c:1683
 msgid "out of memory reading binary string"
 msgstr "讀取二進位字串時記憶體不足"
 
-#: src/main/saveload.c:1585
+#: src/main/saveload.c:1587
 msgid "a binary string read error occurred"
 msgstr "讀取二進位字串時發生了錯誤"
 
-#: src/main/saveload.c:1645
+#: src/main/saveload.c:1647
 msgid "an xdr integer data write error occurred"
 msgstr "發生了 xdr 整數資料寫入錯誤"
 
-#: src/main/saveload.c:1652
+#: src/main/saveload.c:1654
 msgid "an xdr integer data read error occurred"
 msgstr "發生了 xdr 整數資料讀取錯誤"
 
-#: src/main/saveload.c:1667 src/main/saveload.c:1686
+#: src/main/saveload.c:1669 src/main/saveload.c:1688
 msgid "an xdr string data write error occurred"
 msgstr "發生了 xdr 字串資料寫入錯誤"
 
-#: src/main/saveload.c:1694
+#: src/main/saveload.c:1696
 msgid "an xdr real data write error occurred"
 msgstr "發生了 xdr 實數資料寫入錯誤"
 
-#: src/main/saveload.c:1701
+#: src/main/saveload.c:1703
 msgid "an xdr real data read error occurred"
 msgstr "發生了 xdr 實數資料讀取錯誤"
 
-#: src/main/saveload.c:1708
+#: src/main/saveload.c:1710
 msgid "an xdr complex data write error occurred"
 msgstr "發生了 xdr 複數資料寫入錯誤"
 
-#: src/main/saveload.c:1715
+#: src/main/saveload.c:1717
 msgid "an xdr complex data read error occurred"
 msgstr "發生了 xdr 複數資料讀取錯誤"
 
-#: src/main/saveload.c:1783 src/main/serialize.c:1958
-#: src/main/serialize.c:2568 src/modules/internet/internet.c:351
-#: src/modules/internet/internet.c:409 src/modules/internet/internet.c:514
+#: src/main/saveload.c:1785 src/main/serialize.c:1997
+#: src/main/serialize.c:2614 src/modules/internet/internet.c:514
+#: src/modules/internet/internet.c:590 src/modules/internet/internet.c:701
 msgid "write failed"
 msgstr "寫入失敗"
 
-#: src/main/saveload.c:1910
+#: src/main/saveload.c:1912
 msgid "restore file may be empty -- no data loaded"
 msgstr "復原檔案可能是空的 -- 沒有載入任何資料"
 
-#: src/main/saveload.c:1912
+#: src/main/saveload.c:1914
 msgid "restore file may be from a newer version of R -- no data loaded"
 msgstr "復原檔案可能是由比本 R 版本要新的 R 所儲存的 -- 沒有載入任何資料"
 
-#: src/main/saveload.c:1914
+#: src/main/saveload.c:1916
 msgid "bad restore file magic number (file may be corrupted) -- no data loaded"
 msgstr "復原檔案魔術數字發生錯誤 (檔案可能有損壞)-- 沒有載入任何資料"
 
-#: src/main/saveload.c:1940 src/main/saveload.c:2238
+#: src/main/saveload.c:1942 src/main/saveload.c:2240
 msgid "first argument must be a character vector"
 msgstr "第一引數必須是字元向量"
 
-#: src/main/saveload.c:2012
+#: src/main/saveload.c:2014
 msgid "not a valid named list"
 msgstr "不是有效的具名串列"
 
-#: src/main/saveload.c:2019 src/main/saveload.c:2040
+#: src/main/saveload.c:2021 src/main/saveload.c:2042
 #, c-format
 msgid "'%s' looks like a pre-2.4.0 S4 object: please recreate it"
 msgstr "'%s' 看來像是 pre-2.4.0 S4 物件:請重新建立它"
 
-#: src/main/saveload.c:2027
+#: src/main/saveload.c:2029
 msgid "loaded data is not in pair list form"
 msgstr "載入資料不是成雙的串列形式"
 
-#: src/main/saveload.c:2063
+#: src/main/saveload.c:2065
 msgid "first argument must be a file name"
 msgstr "第一引數必須是檔案名稱"
 
-#: src/main/saveload.c:2108 src/main/saveload.c:2134 src/main/serialize.c:826
-#: src/main/serialize.c:863 src/main/serialize.c:901
+#: src/main/saveload.c:2110 src/main/saveload.c:2136 src/main/serialize.c:864
+#: src/main/serialize.c:901 src/main/serialize.c:939
 msgid "XDR write failed"
 msgstr "XDR 寫入失敗"
 
-#: src/main/saveload.c:2121 src/main/saveload.c:2146 src/main/serialize.c:1362
-#: src/main/serialize.c:1398 src/main/serialize.c:1436
+#: src/main/saveload.c:2123 src/main/saveload.c:2148 src/main/serialize.c:1400
+#: src/main/serialize.c:1436 src/main/serialize.c:1474
 msgid "XDR read failed"
 msgstr "XDR 讀取失敗"
 
-#: src/main/saveload.c:2157
+#: src/main/saveload.c:2159
 #, c-format
 msgid "cannot save data -- unable to open '%s': %s"
 msgstr "無法儲存資料 -- 無法開啟 '%s' :%s"
 
-#: src/main/saveload.c:2254 src/main/serialize.c:2161
+#: src/main/saveload.c:2256 src/main/serialize.c:2202
 #, c-format
 msgid "cannot save to connections in version %d format"
 msgstr "不可使用版本 %d 的格式來儲存連結"
 
-#: src/main/saveload.c:2277 src/main/serialize.c:2186
+#: src/main/saveload.c:2279 src/main/serialize.c:2227
 msgid "connection not open for writing"
 msgstr "無法開啟連結來進行寫入"
 
-#: src/main/saveload.c:2285
+#: src/main/saveload.c:2288
 msgid "cannot save XDR format to a text-mode connection"
 msgstr "不能將XDR格式儲存到文字狀態連結"
 
-#: src/main/saveload.c:2295 src/main/serialize.c:2066
-#: src/main/serialize.c:2080 src/main/serialize.c:2262
-#: src/main/serialize.c:2284
+#: src/main/saveload.c:2298 src/main/serialize.c:2105
+#: src/main/serialize.c:2119 src/main/serialize.c:2303
+#: src/main/serialize.c:2325
 msgid "error writing to connection"
 msgstr "連結寫入發生了錯誤"
 
-#: src/main/saveload.c:2359 src/main/serialize.c:2234
+#: src/main/saveload.c:2359 src/main/serialize.c:2275
 msgid "connection not open for reading"
 msgstr "連接未開啟而無法讀取"
 
@@ -5274,7 +5345,7 @@ msgstr ""
 msgid "scan() expected '%s', got '%s'"
 msgstr "scan() 需要 '%s',而不是 '%s'"
 
-#: src/main/scan.c:585 src/main/scan.c:732
+#: src/main/scan.c:585 src/main/scan.c:735
 #, fuzzy
 msgid "too many items"
 msgstr "引數太多"
@@ -5283,7 +5354,7 @@ msgstr "引數太多"
 msgid "empty 'what' specified"
 msgstr "'what' 設定是空的"
 
-#: src/main/scan.c:722
+#: src/main/scan.c:725
 #, c-format
 msgid "line %d did not have %d elements"
 msgstr "第 %d 列沒有 %d 個元素"
@@ -5312,172 +5383,173 @@ msgstr "十進位分隔符號不正確"
 msgid "invalid quote symbol set"
 msgstr "引號符號集不正確"
 
-#: src/main/scan.c:987
+#: src/main/scan.c:988
 #, fuzzy
 msgid "embedded nul(s) found in input"
 msgstr "空值嵌入於字串中:'%s'"
 
-#: src/main/seq.c:48
+#: src/main/seq.c:49
 msgid "unequal factor lengths"
 msgstr "因子長度不相等"
 
-#: src/main/seq.c:100
+#: src/main/seq.c:101
 msgid "result would be too long a vector"
 msgstr "答案向量會太長"
 
-#: src/main/seq.c:159
+#: src/main/seq.c:160
 msgid "argument of length 0"
 msgstr "長度為 0 的引數"
 
-#: src/main/seq.c:161 src/main/seq.c:163
-#, c-format
-msgid "numerical expression has %d elements: only the first used"
-msgstr "數值運算式一共有 %d 個元素: 只用了第一個"
+#: src/main/seq.c:163 src/main/seq.c:168
+#, fuzzy, c-format
+msgid "numerical expression has %d element: only the first used"
+msgid_plural "numerical expression has %d elements: only the first used"
+msgstr[0] "數值運算式一共有 %d 個元素: 只用了第一個"
 
-#: src/main/seq.c:167
+#: src/main/seq.c:174
 msgid "NA/NaN argument"
 msgstr "NA/NaN 引數"
 
-#: src/main/seq.c:331
+#: src/main/seq.c:333
 msgid "incorrect type for second argument"
 msgstr "第二引數的類型不正確"
 
-#: src/main/seq.c:334
+#: src/main/seq.c:336
 #, fuzzy, c-format
 msgid "attempt to replicate an object of type '%s'"
 msgstr "非向量不能被複製"
 
-#: src/main/seq.c:387
+#: src/main/seq.c:393
 msgid "attempt to replicate non-vector"
 msgstr "非向量不能被複製"
 
-#: src/main/seq.c:403
+#: src/main/seq.c:409
 #, fuzzy
 msgid "cannot replicate NULL to a non-zero length"
 msgstr "無法分派長度為 %d 的向量"
 
-#: src/main/seq.c:626 src/main/seq.c:633 src/main/seq.c:768 src/main/seq.c:979
+#: src/main/seq.c:630 src/main/seq.c:637 src/main/seq.c:766 src/main/seq.c:977
 #, c-format
 msgid "first element used of '%s' argument"
 msgstr "'%s' 引數的第一個元素已用"
 
-#: src/main/seq.c:766
+#: src/main/seq.c:764
 msgid "'length.out' must be a non-negative number"
 msgstr "'length.out' 必須是非負的數字"
 
-#: src/main/seq.c:790 src/main/seq.c:856 src/main/seq.c:873
+#: src/main/seq.c:788 src/main/seq.c:854 src/main/seq.c:871
 msgid "'from' must be finite"
 msgstr "'from' 必須是有限的"
 
-#: src/main/seq.c:792 src/main/seq.c:858 src/main/seq.c:895
+#: src/main/seq.c:790 src/main/seq.c:856 src/main/seq.c:893
 msgid "'to' must be finite"
 msgstr "'to' 必須是有限的"
 
-#: src/main/seq.c:804
+#: src/main/seq.c:802
 msgid "invalid '(to - from)/by' in 'seq'"
 msgstr "在 'seq' 中無效的 '(to - from)/by'"
 
-#: src/main/seq.c:816
+#: src/main/seq.c:814
 msgid "'by' argument is much too small"
 msgstr "'by' 的引數小太多了"
 
-#: src/main/seq.c:818
+#: src/main/seq.c:816
 msgid "wrong sign in 'by' argument"
 msgstr "在 'by' 的引數中有錯誤符號"
 
-#: src/main/seq.c:875 src/main/seq.c:897
+#: src/main/seq.c:873 src/main/seq.c:895
 msgid "'by' must be finite"
 msgstr "'by' 必須是有限的"
 
-#: src/main/seq.c:985 src/main/seq.c:990
+#: src/main/seq.c:983 src/main/seq.c:988
 msgid "argument must be coercible to non-negative integer"
 msgstr "引數必須可強制變更為非負值整數"
 
-#: src/main/serialize.c:224 src/main/serialize.c:254 src/main/serialize.c:277
+#: src/main/serialize.c:228 src/main/serialize.c:275 src/main/serialize.c:299
 msgid "unknown or inappropriate output format"
 msgstr "不明或不適當的輸出格式"
 
-#: src/main/serialize.c:504
+#: src/main/serialize.c:542
 msgid "must specify ascii, binary, or xdr format"
 msgstr "必須設定 ascii、binary 或 xdr 格式之一"
 
-#: src/main/serialize.c:505
+#: src/main/serialize.c:543
 msgid "unknown output format"
 msgstr "不明的輸出格式"
 
-#: src/main/serialize.c:536
+#: src/main/serialize.c:574
 msgid "unknown input format"
 msgstr "不明的輸入格式"
 
-#: src/main/serialize.c:541
+#: src/main/serialize.c:579
 msgid "input format does not match specified format"
 msgstr "輸入格式與設定的格式不符合"
 
-#: src/main/serialize.c:752
+#: src/main/serialize.c:790
 msgid "no restore method available"
 msgstr "沒有復原的方法"
 
-#: src/main/serialize.c:794
+#: src/main/serialize.c:832
 msgid "names in persistent strings are currently ignored"
 msgstr "固有字串中的名稱現在不用"
 
-#: src/main/serialize.c:963
+#: src/main/serialize.c:1001
 #, c-format
 msgid "'%s' may not be available when loading"
 msgstr "載入時 '%s' 也許不能用"
 
-#: src/main/serialize.c:970
+#: src/main/serialize.c:1008
 msgid "namespaces may not be available when loading"
 msgstr "載入時名稱空間也許不能用"
 
-#: src/main/serialize.c:1097
+#: src/main/serialize.c:1136
 #, c-format
 msgid "WriteItem: unknown type %i"
 msgstr "WriteItem:不明的類型 %i"
 
-#: src/main/serialize.c:1273
+#: src/main/serialize.c:1312
 #, c-format
 msgid "version %d not supported"
 msgstr "版本 %d 不支援"
 
-#: src/main/serialize.c:1305
+#: src/main/serialize.c:1343
 msgid "reference index out of range"
 msgstr "參照索引超出範圍"
 
-#: src/main/serialize.c:1335
+#: src/main/serialize.c:1373
 msgid "names in persistent strings are not supported yet"
 msgstr "目前不支援固有字串中的名稱"
 
-#: src/main/serialize.c:1463
+#: src/main/serialize.c:1501
 #, fuzzy
 msgid "negative serialized length for vector"
 msgstr "不能設定非向量的長度"
 
-#: src/main/serialize.c:1471
+#: src/main/serialize.c:1509
 #, fuzzy
 msgid "invalid upper part of serialized vector length"
 msgstr "參數長度不正確"
 
-#: src/main/serialize.c:1476
+#: src/main/serialize.c:1514
 msgid ""
 "negative serialized vector length:\n"
 "perhaps long vector from 64-bit version of R?"
 msgstr ""
 
-#: src/main/serialize.c:1707
+#: src/main/serialize.c:1746
 msgid "this version of R cannot read class references"
 msgstr "本 R 版本無法讀取類別參照"
 
-#: src/main/serialize.c:1709
+#: src/main/serialize.c:1748
 msgid "this version of R cannot read generic function references"
 msgstr "本 R 版本無法讀取一般功能參照"
 
-#: src/main/serialize.c:1726
+#: src/main/serialize.c:1765
 #, c-format
 msgid "ReadItem: unknown type %i, perhaps written by later version of R"
 msgstr "ReadItem:不明類型 %i,也許是由後期版本的 R 所寫入"
 
-#: src/main/serialize.c:1882
+#: src/main/serialize.c:1921
 #, c-format
 msgid ""
 "cannot read unreleased workspace version %d written by experimental R %d.%d."
@@ -5486,7 +5558,7 @@ msgstr ""
 "無法從由 R 實驗版本 %2$d.%3$d.%4$d 所寫入之尚未被釋放的工作空間版本 %1$d 中讀"
 "取資料"
 
-#: src/main/serialize.c:1886
+#: src/main/serialize.c:1925
 #, c-format
 msgid ""
 "cannot read workspace version %d written by R %d.%d.%d; need R %d.%d.%d or "
@@ -5495,82 +5567,82 @@ msgstr ""
 "無法從由 R 版本 %2$d.%3$d.%4$d 所寫入之工作空間版本 %1$d 中讀取資料;需要 R "
 "版本 %5$d.%6$d.%7$d 或更新"
 
-#: src/main/serialize.c:1965
+#: src/main/serialize.c:2004
 msgid "read failed"
 msgstr "讀取失敗"
 
-#: src/main/serialize.c:2028
+#: src/main/serialize.c:2067
 msgid "error reading from ascii connection"
 msgstr "從 ascii 連接讀取時發生錯誤"
 
-#: src/main/serialize.c:2030
+#: src/main/serialize.c:2069
 msgid "unexpected format in ascii connection"
 msgstr "在 ascii 連接中未預期的格式"
 
-#: src/main/serialize.c:2035 src/main/serialize.c:2049
+#: src/main/serialize.c:2074 src/main/serialize.c:2088
 msgid "error reading from connection"
 msgstr "從連結讀取時發生了錯誤"
 
-#: src/main/serialize.c:2090
+#: src/main/serialize.c:2130
 msgid "only ascii format can be written to text mode connections"
 msgstr "只有 ascii 格式才能對文字狀態的連結進行寫入"
 
-#: src/main/serialize.c:2104
+#: src/main/serialize.c:2144
 msgid "only ascii format can be read from text mode connections"
 msgstr "只有 ascii 格式才能從文字狀態的連結讀取"
 
-#: src/main/serialize.c:2159 src/main/serialize.c:2312
-#: src/main/serialize.c:2461
+#: src/main/serialize.c:2200 src/main/serialize.c:2353
+#: src/main/serialize.c:2502
 msgid "bad version value"
 msgstr "不當的版本值"
 
-#: src/main/serialize.c:2184
+#: src/main/serialize.c:2225
 msgid "binary-mode connection required for ascii=FALSE"
 msgstr "當 ascii=FASLE 時需要二進位模式連接"
 
-#: src/main/serialize.c:2340 src/main/serialize.c:2377
-#: src/main/serialize.c:2440
+#: src/main/serialize.c:2381 src/main/serialize.c:2418
+#: src/main/serialize.c:2481
 msgid "serialization is too large to store in a raw vector"
 msgstr "序列化太大而無法儲存在純量向量中"
 
-#: src/main/serialize.c:2357
+#: src/main/serialize.c:2398
 msgid "cannot allocate buffer"
 msgstr "無法配置緩衝區"
 
-#: src/main/serialize.c:2546 src/main/serialize.c:2619
+#: src/main/serialize.c:2592 src/main/serialize.c:2665
 msgid "not a proper file name"
 msgstr "檔案名稱不正確"
 
-#: src/main/serialize.c:2548
+#: src/main/serialize.c:2594
 msgid "not a proper raw vector"
 msgstr "非適當純量向量"
 
-#: src/main/serialize.c:2569
+#: src/main/serialize.c:2615
 msgid "could not determine file position"
 msgstr "無法確定檔案位置"
 
-#: src/main/serialize.c:2621
+#: src/main/serialize.c:2667
 msgid "bad offset/length argument"
 msgstr "不當的位移/長度引數"
 
-#: src/main/serialize.c:2645 src/main/serialize.c:2658
-#: src/main/serialize.c:2667 src/main/serialize.c:2677
-#: src/main/serialize.c:2690
+#: src/main/serialize.c:2691 src/main/serialize.c:2704
+#: src/main/serialize.c:2713 src/main/serialize.c:2723
+#: src/main/serialize.c:2736
 #, c-format
 msgid "seek failed on %s"
 msgstr "搜索 %s 失敗"
 
-#: src/main/serialize.c:2662 src/main/serialize.c:2671
-#: src/main/serialize.c:2681 src/main/serialize.c:2694
+#: src/main/serialize.c:2708 src/main/serialize.c:2717
+#: src/main/serialize.c:2727 src/main/serialize.c:2740
 #, c-format
 msgid "read failed on %s"
 msgstr "讀取 %s 失敗"
 
-#: src/main/serialize.c:2713
+#: src/main/serialize.c:2759
 msgid "bad environment"
 msgstr "不當的環境"
 
-#: src/main/serialize.c:2715
+#: src/main/serialize.c:2761
 msgid "bad variable names"
 msgstr "不當的變數名稱"
 
@@ -5578,166 +5650,162 @@ msgstr "不當的變數名稱"
 msgid "only atomic vectors can be tested to be sorted"
 msgstr "只有基元向量才能被試著排序"
 
-#: src/main/sort.c:326 src/main/sort.c:1228 src/main/sort.c:1396
+#: src/main/sort.c:325 src/main/sort.c:1248
 msgid "'decreasing' must be TRUE or FALSE"
 msgstr "'increasing' 必須是 TRUE 或是 FALSE"
 
-#: src/main/sort.c:329 src/main/sort.c:600
+#: src/main/sort.c:328 src/main/sort.c:599
 msgid "only atomic vectors can be sorted"
 msgstr "只有基元向量才能被排序"
 
-#: src/main/sort.c:331 src/main/sort.c:602 src/main/sort.c:1297
+#: src/main/sort.c:330 src/main/sort.c:601 src/main/sort.c:1317
 msgid "raw vectors cannot be sorted"
 msgstr "無法排序純量向量"
 
-#: src/main/sort.c:613
+#: src/main/sort.c:612
 msgid "NA or infinite index"
 msgstr ""
 
-#: src/main/sort.c:616
+#: src/main/sort.c:615
 #, fuzzy, c-format
 msgid "index %ld outside bounds"
 msgstr "索引 %d 在界限外"
 
-#: src/main/sort.c:621 src/main/sort.c:634
+#: src/main/sort.c:620 src/main/sort.c:633
 msgid "NA index"
 msgstr "NA 索引"
 
-#: src/main/sort.c:623 src/main/sort.c:636
+#: src/main/sort.c:622 src/main/sort.c:635
 #, c-format
 msgid "index %d outside bounds"
 msgstr "索引 %d 在界限外"
 
-#: src/main/sort.c:1237
+#: src/main/sort.c:1257
 #, c-format
 msgid "argument %d is not a vector"
 msgstr "引數 %d 不是向量"
 
-#: src/main/sort.c:1239
+#: src/main/sort.c:1259
 msgid "argument lengths differ"
 msgstr "引數長度不同"
 
-#: src/main/sort.c:1324
+#: src/main/sort.c:1344
 msgid "invalid ties.method for rank() [should never happen]"
 msgstr "rank() 的 ties.method 不正確 [這是不應該發生的]"
 
-#: src/main/sort.c:1429
-msgid "too large a range of values in 'x'"
-msgstr "'x' 中的值的範圍太大"
-
-#: src/main/source.c:215
+#: src/main/source.c:220
 msgid "coercion of 'text' to character was unsuccessful"
 msgstr "將 'text' 強制變更為字元未能成功"
 
-#: src/main/source.c:231
+#: src/main/source.c:236
 #, c-format
 msgid "argument '%s = \"%s\"' will be ignored"
 msgstr "引數 '%s = \"%s\"' 將被忽略"
 
-#: src/main/split.c:38
+#: src/main/split.c:39
 msgid "first argument must be a vector"
 msgstr "第一引數必須是向量"
 
-#: src/main/split.c:40
+#: src/main/split.c:41
 msgid "second argument must be a factor"
 msgstr "第二引數必須是因子"
 
-#: src/main/split.c:45
+#: src/main/split.c:46
 #, fuzzy
 msgid "group length is 0 but data length > 0"
 msgstr "Group 長度為零但資料長度 > 0"
 
-#: src/main/split.c:47
+#: src/main/split.c:48
 msgid "data length is not a multiple of split variable"
 msgstr "資料長度不是 split 變數的倍數"
 
-#: src/main/split.c:56
+#: src/main/split.c:58
 msgid "factor has bad level"
 msgstr "因子有不當的等級"
 
-#: src/main/sprintf.c:94
+#: src/main/sprintf.c:97
 #, fuzzy, c-format
 msgid "required resulting string length %d is greater than maximal %d"
 msgstr "需要的結果字串長度 %d 大於最大值 %d"
 
-#: src/main/sprintf.c:102
+#: src/main/sprintf.c:105
 msgid "'fmt' is not a character vector"
 msgstr "'fmt' 並非字元向量"
 
-#: src/main/sprintf.c:107
+#: src/main/sprintf.c:110
 #, c-format
 msgid "only %d arguments are allowed"
 msgstr "只允許 %d 個引數"
 
-#: src/main/sprintf.c:114
+#: src/main/sprintf.c:117
 #, c-format
 msgid "invalid type of argument[%d]: '%s'"
 msgstr "無效的引數 [%d] 類型:'%s'"
 
-#: src/main/sprintf.c:125 src/main/sprintf.c:128
+#: src/main/sprintf.c:128 src/main/sprintf.c:131
 msgid "arguments cannot be recycled to the same length"
 msgstr "不是所有的引數都一樣長"
 
-#: src/main/sprintf.c:150 src/main/sprintf.c:257
+#: src/main/sprintf.c:153 src/main/sprintf.c:260
 #, c-format
 msgid "'fmt' length exceeds maximal format length %d"
 msgstr "'fmt' 長度超出格式長度的最大值 %d"
 
-#: src/main/sprintf.c:169
+#: src/main/sprintf.c:172
 #, c-format
 msgid "unrecognised format specification '%s'"
 msgstr "無法辨識的格式規格 '%s'"
 
-#: src/main/sprintf.c:180 src/main/sprintf.c:186 src/main/sprintf.c:199
-#: src/main/sprintf.c:206
+#: src/main/sprintf.c:183 src/main/sprintf.c:189 src/main/sprintf.c:202
+#: src/main/sprintf.c:209
 #, c-format
 msgid "reference to non-existent argument %d"
 msgstr "參照不存在的引數 %d"
 
-#: src/main/sprintf.c:218
+#: src/main/sprintf.c:221
 msgid "at most one asterisk '*' is supported in each conversion specification"
 msgstr "在每個轉換規格中只支援最多一個星號 '*'"
 
-#: src/main/sprintf.c:228
+#: src/main/sprintf.c:231
 msgid "argument for '*' conversion specification must be a number"
 msgstr "用於 '*' 轉換規格的引數必須是一個數字"
 
-#: src/main/sprintf.c:266
+#: src/main/sprintf.c:269
 msgid "coercion has changed vector length to 0"
 msgstr "強制變更時將向量長度改為 0"
 
-#: src/main/sprintf.c:339 src/main/sprintf.c:353 src/main/sprintf.c:367
-#: src/main/sprintf.c:402
+#: src/main/sprintf.c:343 src/main/sprintf.c:357 src/main/sprintf.c:371
+#: src/main/sprintf.c:406
 #, c-format
 msgid "invalid format '%s'; %s"
 msgstr "無效的格式 '%s';%s"
 
-#: src/main/sprintf.c:340
+#: src/main/sprintf.c:344
 #, c-format
 msgid "use format %d or %i for logical objects"
 msgstr "邏輯物件套用格式 %d 或 %i"
 
-#: src/main/sprintf.c:354
+#: src/main/sprintf.c:358
 #, c-format
 msgid "use format %d, %i, %o, %x or %X for integer objects"
 msgstr "使用格式 %d, %i, %o, %x 或 %X 於整數物件"
 
-#: src/main/sprintf.c:368
+#: src/main/sprintf.c:372
 #, c-format
 msgid "use format %f, %e, %g or %a for numeric objects"
 msgstr "使用格式 %f, %e, %g 或 %a 於數值物件"
 
-#: src/main/sprintf.c:403
+#: src/main/sprintf.c:407
 #, c-format
 msgid "use format %s for character objects"
 msgstr "字元物件套用格式 %s"
 
-#: src/main/sprintf.c:408
+#: src/main/sprintf.c:412
 #, c-format
 msgid "likely truncation of character string to %d characters"
 msgstr "字串似乎被截斷成 %d 個字元"
 
-#: src/main/sprintf.c:417
+#: src/main/sprintf.c:421
 msgid "unsupported type"
 msgstr "不支援此一類型"
 
@@ -5745,380 +5813,386 @@ msgstr "不支援此一類型"
 msgid "R_LibraryFileName: buffer too small"
 msgstr "R_LibraryFileName: 緩衝區太小"
 
-#: src/main/subassign.c:117
+#: src/main/subassign.c:118
 msgid "attempt to enlarge non-vector"
 msgstr "不能加大非向量"
 
-#: src/main/subassign.c:122
+#: src/main/subassign.c:123
 #, c-format
 msgid "assignment outside vector/list limits (extending from %d to %d)"
 msgstr "不能在向量/串列極值外賦值(%d 加大到 %d)"
 
-#: src/main/subassign.c:367
+#: src/main/subassign.c:391
 #, c-format
 msgid "incompatible types (from %s to %s) in subassignment type fix"
 msgstr "下賦值 fix 類型中有不相容的類型 (從 %s 到 %s)"
 
-#: src/main/subassign.c:502 src/main/subassign.c:782 src/main/subassign.c:785
-#: src/main/subassign.c:1076
+#: src/main/subassign.c:550 src/main/subassign.c:830 src/main/subassign.c:833
+#: src/main/subassign.c:1133
 msgid "NAs are not allowed in subscripted assignments"
 msgstr "下標賦值中不允許 NA"
 
-#: src/main/subassign.c:520 src/main/subassign.c:796 src/main/subassign.c:1068
-#: src/main/subassign.c:1641
+#: src/main/subassign.c:568 src/main/subassign.c:844 src/main/subassign.c:1125
+#: src/main/subassign.c:1705
 msgid "replacement has length zero"
 msgstr "置換的長度為零"
 
-#: src/main/subassign.c:522 src/main/subassign.c:798 src/main/subassign.c:1070
+#: src/main/subassign.c:570 src/main/subassign.c:846 src/main/subassign.c:1127
 msgid "number of items to replace is not a multiple of replacement length"
 msgstr "被替換的項目不是替換值長度的倍數"
 
-#: src/main/subassign.c:766
+#: src/main/subassign.c:814
 msgid "incorrect number of subscripts on matrix"
 msgstr "矩陣中的下標數目不正確"
 
-#: src/main/subassign.c:1022
+#: src/main/subassign.c:1079
 #, c-format
 msgid "incompatible types (from %s to %s) in matrix subset assignment"
 msgstr "矩陣子集賦值中有不相容的類型 (從 %s 到 %s)"
 
-#: src/main/subassign.c:1038 src/main/subset.c:928
+#: src/main/subassign.c:1095 src/main/subset.c:957
 msgid "incorrect number of subscripts"
 msgstr "下標數目不正確"
 
-#: src/main/subassign.c:1214
+#: src/main/subassign.c:1272
 #, c-format
 msgid "incompatible types (from %s to %s) in array subset assignment"
 msgstr "陣列子集賦值有不相容的類型 (從 %s 到 %s)"
 
-#: src/main/subassign.c:1249 src/main/subassign.c:1270
+#: src/main/subassign.c:1308 src/main/subassign.c:1329
 msgid "invalid subscript in list assign"
 msgstr "串列賦值中的下標數目無效"
 
-#: src/main/subassign.c:1263
+#: src/main/subassign.c:1322
 msgid "invalid number of subscripts to list assign"
 msgstr "串列賦值中的下標數目不正確"
 
-#: src/main/subassign.c:1361
+#: src/main/subassign.c:1421
 msgid "SubAssignArgs: invalid number of arguments"
 msgstr "SubAssignArgs: 引數數目不正確"
 
-#: src/main/subassign.c:1506
+#: src/main/subassign.c:1566
 msgid "result is zero-length and so cannot be a language object"
 msgstr "結果長度為零因而無法做為一個語言物件"
 
-#: src/main/subassign.c:1611
+#: src/main/subassign.c:1665
 msgid ""
 "[[<- defined for objects of type \"S4\" only for subclasses of environment"
 msgstr "[[<- 只有在子類別用於定義 \"S4\" 類型的物件"
 
-#: src/main/subassign.c:1617
+#: src/main/subassign.c:1677
 msgid "wrong args for environment subassignment"
 msgstr "環境下賦值的引數不正確"
 
-#: src/main/subassign.c:1643
+#: src/main/subassign.c:1707
 msgid "more elements supplied than there are to replace"
 msgstr "用來替換的元素比所要替換的值多"
 
-#: src/main/subassign.c:1645
+#: src/main/subassign.c:1709
 msgid "[[ ]] with missing subscript"
 msgstr "[[ ]] 缺少下標"
 
-#: src/main/subassign.c:1657 src/main/subassign.c:1675
+#: src/main/subassign.c:1727 src/main/subassign.c:1745
 msgid "[[ ]] subscript out of bounds"
 msgstr "[[ ]] 下標在界限外"
 
-#: src/main/subassign.c:1663 src/main/subassign.c:1841
+#: src/main/subassign.c:1733 src/main/subassign.c:1914
 msgid "[[ ]] improper number of subscripts"
 msgstr "[[ ]] 下標數目不正確"
 
-#: src/main/subassign.c:1808
+#: src/main/subassign.c:1879
 #, c-format
 msgid "incompatible types (from %s to %s) in [[ assignment"
 msgstr "[[ 賦值中有不相容的類型 (從 %s 到 %s)"
 
-#: src/main/subassign.c:1852
+#: src/main/subassign.c:1925
 #, c-format
 msgid "[[ ]] subscript (%d) out of bounds"
 msgstr "[[ ]] 下標 (%d) 在界限外"
 
-#: src/main/subassign.c:1905 src/main/subscript.c:143 src/main/subscript.c:145
-#: src/main/subscript.c:274 src/main/subscript.c:276 src/main/subscript.c:826
-#: src/main/subscript.c:828 src/main/subscript.c:919 src/main/subscript.c:921
-#: src/main/subset.c:1109
+#: src/main/subassign.c:1986 src/main/subscript.c:151 src/main/subscript.c:278
+#: src/main/subscript.c:903 src/main/subscript.c:996 src/main/subset.c:1176
 #, c-format
 msgid "invalid subscript type '%s'"
 msgstr "無效的下標類型 '%s'"
 
-#: src/main/subassign.c:1950
+#: src/main/subassign.c:2037
 msgid "no method for assigning subsets of this S4 class"
 msgstr "沒有方法可用於指派這個 S4 類別的子集"
 
-#: src/main/subassign.c:2008
+#: src/main/subassign.c:2095
 msgid "Coercing LHS to a list"
 msgstr "把公式左側強迫變成串列"
 
-#: src/main/subscript.c:53 src/main/subscript.c:75 src/main/subscript.c:180
-#: src/main/subscript.c:204
-msgid "attempt to select less than one element"
+#: src/main/subscript.c:59 src/main/subscript.c:81 src/main/subscript.c:185
+#: src/main/subscript.c:209
+#, fuzzy, c-format
+msgid "attempt to select less than one element in %s"
 msgstr "至少要選擇一個元素"
 
-#: src/main/subscript.c:57 src/main/subscript.c:72 src/main/subscript.c:178
-#: src/main/subscript.c:208 src/main/subscript.c:304
-msgid "attempt to select more than one element"
+#: src/main/subscript.c:63 src/main/subscript.c:78 src/main/subscript.c:183
+#: src/main/subscript.c:213 src/main/subscript.c:305
+#, fuzzy, c-format
+msgid "attempt to select more than one element in %s"
 msgstr "最多只能選擇一個元素"
 
-#: src/main/subscript.c:184
+#: src/main/subscript.c:189
 msgid "internal error in use of recursive indexing"
 msgstr "用遞迴索引時發生了內部錯誤"
 
-#: src/main/subscript.c:252
+#: src/main/subscript.c:257
 #, c-format
 msgid "further partial match of '%s' to '%s'"
 msgstr "進一步部份匹配 '%s' 到 '%s'"
 
-#: src/main/subscript.c:302
+#: src/main/subscript.c:303
 #, c-format
 msgid "recursive indexing failed at level %d\n"
 msgstr "遞迴索引在 %d 層失敗\n"
 
-#: src/main/subscript.c:309
+#: src/main/subscript.c:313
 #, c-format
 msgid "no such index at level %d\n"
 msgstr "在 %d 層沒有此一索引\n"
 
-#: src/main/subscript.c:352
+#: src/main/subscript.c:360
 msgid "incorrect number of columns in matrix subscript"
 msgstr "矩陣下標中行數不正確"
 
-#: src/main/subscript.c:371 src/main/subscript.c:389 src/main/subscript.c:413
+#: src/main/subscript.c:379 src/main/subscript.c:397 src/main/subscript.c:421
 msgid "negative values are not allowed in a matrix subscript"
 msgstr "矩陣下標中不允許負值"
 
-#: src/main/subscript.c:492
+#: src/main/subscript.c:500
 msgid "(subscript) logical subscript too long"
 msgstr "(下標) 邏輯下標太長"
 
-#: src/main/subscript.c:590 src/main/subscript.c:645
+#: src/main/subscript.c:668 src/main/subscript.c:723
 msgid "only 0's may be mixed with negative subscripts"
 msgstr "只有負數下標中才能有 0"
 
-#: src/main/subscript.c:618
+#: src/main/subscript.c:696
 msgid "subscript too large for 32-bit R"
 msgstr ""
 
-#: src/main/subscript.c:817
+#: src/main/subscript.c:895
 msgid "no 'dimnames' attribute for array"
 msgstr "陣列中沒有 'dimnames' 此一屬性"
 
-#: src/main/subscript.c:857
+#: src/main/subscript.c:931
 msgid "subscripting on non-vector"
 msgstr "非向量不能有下標"
 
-#: src/main/subset.c:261
+#: src/main/subset.c:260
 msgid "dimensions would exceed maximum size of array"
 msgstr ""
 
-#: src/main/subset.c:304 src/main/subset.c:333
+#: src/main/subset.c:304 src/main/subset.c:334
 msgid "matrix subscripting not handled for this type"
 msgstr "此一類型無法處理矩陣下標"
 
-#: src/main/subset.c:488
+#: src/main/subset.c:493
 msgid "array subscripting not handled for this type"
 msgstr "此一類型無法處理陣列下標"
 
-#: src/main/subset.c:827
+#: src/main/subset.c:856
 msgid "incorrect number of dimensions"
 msgstr "維度數目不正確"
 
-#: src/main/subset.c:924
+#: src/main/subset.c:953
 msgid "no index specified"
 msgstr "沒有指定的索引"
 
-#: src/main/subset.c:934
+#: src/main/subset.c:963
 msgid "this S4 class is not subsettable"
 msgstr "這個 S4 類別不是子集合表格"
 
-#: src/main/subset.c:940
+#: src/main/subset.c:970
 msgid "wrong arguments for subsetting an environment"
 msgstr "取子集環境時的引數不正確"
 
-#: src/main/summary.c:30
+#: src/main/summary.c:33
 #, c-format
 msgid "invalid 'type' (%s) of argument"
 msgstr "'type' (%s) 的引數無效"
 
-#: src/main/summary.c:66 src/main/summary.c:78 src/main/summary.c:103
+#: src/main/summary.c:69 src/main/summary.c:81 src/main/summary.c:106
 #, fuzzy
 msgid "integer overflow - use sum(as.numeric(.))"
 msgstr "整數溢位 - 請使用 sum(as.numeric(.))"
 
-#: src/main/summary.c:522
+#: src/main/summary.c:526
 #, c-format
 msgid "internal error ('op = %d' in do_summary).\t Call a Guru"
 msgstr "內部錯誤 (do_summary 中的 'op = %d')。\t 請向專家請教"
 
-#: src/main/summary.c:623
+#: src/main/summary.c:637
 msgid "Integer overflow - use sum(as.numeric(.))"
 msgstr "整數溢位 - 請使用 sum(as.numeric(.))"
 
-#: src/main/summary.c:731
+#: src/main/summary.c:750
 msgid "no non-missing arguments, returning NA"
 msgstr "沒有非漏失的引數,回傳 NA"
 
-#: src/main/summary.c:734
+#: src/main/summary.c:753
 msgid "no non-missing arguments to min; returning Inf"
 msgstr "min 中沒有無漏失的引數; 回傳 Inf"
 
-#: src/main/summary.c:736
+#: src/main/summary.c:755
 msgid "no non-missing arguments to max; returning -Inf"
 msgstr "max 中沒有無漏失的引數;回傳 -Inf"
 
-#: src/main/summary.c:801
-msgid "non-numeric argument"
-msgstr "非數值引數"
-
-#: src/main/summary.c:845
+#: src/main/summary.c:913
 msgid "argument to 'which' is not logical"
 msgstr "'which' 的引數不是邏輯值"
 
-#: src/main/summary.c:889
+#: src/main/summary.c:957
 msgid "no arguments"
 msgstr "沒有引數"
 
-#: src/main/summary.c:900 src/main/summary.c:917
+#: src/main/summary.c:968 src/main/summary.c:985
 msgid "invalid input type"
 msgstr "無效的輸入類型"
 
-#: src/main/summary.c:934
+#: src/main/summary.c:1002
 msgid "an argument will be fractionally recycled"
 msgstr "某個引數將被部分重新利用"
 
-#: src/main/sysutils.c:69 src/main/sysutils.c:83
+#: src/main/sysutils.c:68 src/main/sysutils.c:82
 #, c-format
 msgid "cannot determine file modification time of '%s'"
 msgstr "無法確定檔案 '%s' 的修改時間"
 
-#: src/main/sysutils.c:167
+#: src/main/sysutils.c:166
 msgid "encoding of a filename cannot be 'bytes'"
 msgstr "檔名的編碼不可以是 'bytes'"
 
-#: src/main/sysutils.c:170 src/main/sysutils.c:803 src/main/sysutils.c:818
-#: src/main/sysutils.c:909 src/main/sysutils.c:924 src/main/sysutils.c:1020
+#: src/main/sysutils.c:169 src/main/sysutils.c:831 src/main/sysutils.c:846
+#: src/main/sysutils.c:975
 #, c-format
 msgid "unsupported conversion from '%s' in codepage %d"
 msgstr "不支援在編碼頁 %2$d 中來自 '%1$s' 的轉換"
 
-#: src/main/sysutils.c:179
+#: src/main/sysutils.c:178
 msgid "file name conversion problem -- name too long?"
 msgstr "檔案名稱轉換問題 -- 名稱太長?"
 
-#: src/main/sysutils.c:180
+#: src/main/sysutils.c:179
 msgid "file name conversion problem"
 msgstr "檔案名稱轉換問題"
 
-#: src/main/sysutils.c:249
+#: src/main/sysutils.c:248
 msgid "invalid filename pattern"
 msgstr "檔案名稱胚騰不正確"
 
-#: src/main/sysutils.c:253
+#: src/main/sysutils.c:252
 msgid "invalid file extension"
 msgstr "無效的副檔名"
 
-#: src/main/sysutils.c:255
+#: src/main/sysutils.c:254
 msgid "no 'pattern'"
 msgstr "沒有 'pattern'"
 
-#: src/main/sysutils.c:257
+#: src/main/sysutils.c:256
 msgid "no 'tempdir'"
 msgstr "沒有 'tempdir'"
 
-#: src/main/sysutils.c:259
+#: src/main/sysutils.c:258
 msgid "no 'fileext'"
 msgstr "沒有 'fileext'"
 
-#: src/main/sysutils.c:345 src/main/sysutils.c:348 src/main/sysutils.c:439
-#: src/main/sysutils.c:441 src/main/sysutils.c:477
+#: src/main/sysutils.c:328
+#, fuzzy, c-format
+msgid "system call failed: %s"
+msgstr "搜索 %s 失敗"
+
+#: src/main/sysutils.c:357 src/main/sysutils.c:360 src/main/sysutils.c:451
+#: src/main/sysutils.c:453 src/main/sysutils.c:489
 msgid "wrong type for argument"
 msgstr "引數類型不正確"
 
-#: src/main/sysutils.c:443
+#: src/main/sysutils.c:455
 msgid "wrong length for argument"
 msgstr "引數的長度錯誤"
 
-#: src/main/sysutils.c:464
+#: src/main/sysutils.c:476
 msgid "'Sys.setenv' is not available on this system"
 msgstr "這個系統無法使用 'Sys.setenv'"
 
-#: src/main/sysutils.c:508
+#: src/main/sysutils.c:520
 msgid "this system cannot unset environment variables: setting to \"\""
 msgstr "這個系統無法解除設定環境變數:設定為 \"\""
 
-#: src/main/sysutils.c:519
+#: src/main/sysutils.c:531
 msgid "'Sys.unsetenv' is not available on this system"
 msgstr "這個系統無法使用 'Sys.unsetenv'"
 
-#: src/main/sysutils.c:616
+#: src/main/sysutils.c:628
 #, c-format
 msgid "unsupported conversion from '%s' to '%s' in codepage %d"
 msgstr "在編碼頁 %3$d 中不支援從 '%1$s' 轉換到 '%2$s'"
 
-#: src/main/sysutils.c:631
+#: src/main/sysutils.c:643
 msgid "'x' must be a character vector"
 msgstr "'x' 必須是字元向量"
 
-#: src/main/sysutils.c:646
-msgid "'x' must be a list of NULL or raw vectors"
+#: src/main/sysutils.c:658
+#, fuzzy
+msgid "'x' must be a character vector or a list of NULL or raw vectors"
 msgstr "'x' 必須是空值或純量向量串列"
 
-#: src/main/sysutils.c:724 src/main/sysutils.c:789 src/main/sysutils.c:895
-#: src/main/sysutils.c:994 src/main/sysutils.c:1010 src/main/sysutils.c:1087
+#: src/main/sysutils.c:736 src/main/sysutils.c:914 src/main/sysutils.c:932
+#: src/main/sysutils.c:949 src/main/sysutils.c:965 src/main/sysutils.c:1042
 #, c-format
 msgid "'%s' must be called on a CHARSXP"
 msgstr "'%s' 必須於 CHARSXP 之上被呼叫"
 
-#: src/main/sysutils.c:792 src/main/sysutils.c:898 src/main/sysutils.c:1015
-#: src/main/sysutils.c:1090
+#: src/main/sysutils.c:805 src/main/sysutils.c:970 src/main/sysutils.c:1045
 msgid "translating strings with \"bytes\" encoding is not allowed"
 msgstr "不允許以 \"bytes\" 編碼的翻譯字串"
 
-#: src/main/sysutils.c:1116
+#: src/main/sysutils.c:818
+#, fuzzy
+msgid "internal error: no translation needed"
+msgstr "unz 程式碼中有內部錯誤"
+
+#: src/main/sysutils.c:1071
 #, c-format
 msgid "unsupported conversion to '%s' from codepage %d"
 msgstr "不支援從編碼頁 %2$d 轉換到 '%1$s'"
 
-#: src/main/sysutils.c:1530
+#: src/main/sysutils.c:1486
 #, fuzzy, c-format
 msgid "invalid Unicode point %u"
 msgstr "線條接合發生錯誤"
 
-#: src/main/sysutils.c:1632
+#: src/main/sysutils.c:1588
 #, fuzzy
 msgid "cannot create 'R_TempDir'"
 msgstr "無法配置 R_TempDir"
 
-#: src/main/sysutils.c:1636 src/main/sysutils.c:1644 src/main/sysutils.c:1647
+#: src/main/sysutils.c:1592 src/main/sysutils.c:1600 src/main/sysutils.c:1603
 msgid "unable to set R_SESSION_TMPDIR"
 msgstr "無法設定 R_SESSION_TMPDIR"
 
-#: src/main/sysutils.c:1656
+#: src/main/sysutils.c:1612
 #, fuzzy
 msgid "cannot allocate 'R_TempDir'"
 msgstr "無法配置 R_TempDir"
 
-#: src/main/sysutils.c:1693
+#: src/main/sysutils.c:1649
 msgid "temporary name too long"
 msgstr "暫時名稱太長"
 
-#: src/main/sysutils.c:1708
+#: src/main/sysutils.c:1664
 msgid "cannot find unused tempfile name"
 msgstr "暫時檔名已用盡"
 
-#: src/main/sysutils.c:1711
+#: src/main/sysutils.c:1667
 msgid "allocation failed in R_tmpnam2"
 msgstr "在 R_tmpnam2 中配置失敗"
 
-#: src/main/sysutils.c:1838
+#: src/main/sysutils.c:1794
 msgid "'dirmark = TRUE' is not supported on this platform"
 msgstr "這個平臺不支援 'dirmark = TRUE'"
 
@@ -6128,195 +6202,202 @@ msgid "length %d is too large for hashing"
 msgstr "用雜亂定址法時長度 %d 太長"
 
 #: src/main/unique.c:490 src/main/unique.c:519 src/main/unique.c:549
-#: src/main/unique.c:575 src/main/unique.c:614
+#: src/main/unique.c:573 src/main/unique.c:612
 msgid "'duplicated' applies only to vectors"
 msgstr "'duplicated' 只適用於向量"
 
-#: src/main/unique.c:619
+#: src/main/unique.c:617
 msgid "any_duplicated3(., <0-length incomp>)"
 msgstr "any_duplicated3(., <長度零不相容>)"
 
-#: src/main/unique.c:669
+#: src/main/unique.c:667
 msgid "'fromLast' must be length 1"
 msgstr "'fromLast' 的長度必須是 1"
 
-#: src/main/unique.c:672
+#: src/main/unique.c:670
 msgid "'fromLast' must be TRUE or FALSE"
 msgstr "'fromLast' 必須是 TRUE 或 FALSE"
 
-#: src/main/unique.c:683
+#: src/main/unique.c:681
 #, c-format
 msgid "%s() applies only to vectors"
 msgstr "%s() 只適用於向量"
 
-#: src/main/unique.c:690
+#: src/main/unique.c:688
 #, fuzzy
 msgid "'nmax' must be positive"
 msgstr "'value' 必須是正值的長度"
 
-#: src/main/unique.c:922
+#: src/main/unique.c:985
 msgid "'match' requires vector arguments"
 msgstr "'match' 需要向量引數"
 
-#: src/main/unique.c:970 src/main/unique.c:1125
+#: src/main/unique.c:1033 src/main/unique.c:1171
 msgid "argument is not of mode character"
 msgstr "引數不是字元狀態"
 
-#: src/main/unique.c:1251
+#: src/main/unique.c:1296
 #, fuzzy
 msgid "... used in a situation where it does not exist"
 msgstr "... 用在它不存在的地方了"
 
-#: src/main/unique.c:1342
-msgid "unable to find a closure from within which 'match.call' was called"
-msgstr "從 'match.call' 被呼叫處之內無法找到結束"
+#: src/main/unique.c:1302
+#, fuzzy
+msgid "... is not a pairlist"
+msgstr "'...' 中的值不是一個約定"
 
-#: src/main/unique.c:1536
+#: src/main/unique.c:1531
 msgid "non-numeric data frame in rowsum"
 msgstr "rowsum 中不能有非數值資料框"
 
-#: src/main/unique.c:1568
+#: src/main/unique.c:1563
 msgid "this cannot happen"
 msgstr "這不可能發生"
 
-#: src/main/unique.c:1639
+#: src/main/unique.c:1634
 msgid "'names' must be a character vector"
 msgstr "'names' 必須是字元向量"
 
-#: src/main/unique.c:1643
-msgid "'sep' must be a character string"
-msgstr "'sep' 必須是字串"
-
-#: src/main/util.c:88 src/main/util.c:106
+#: src/main/util.c:87 src/main/util.c:105
 msgid "object is not a matrix"
 msgstr "物件不是矩陣"
 
-#: src/main/util.c:254 src/main/util.c:268 src/main/util.c:285
+#: src/main/util.c:303 src/main/util.c:315 src/main/util.c:326
+#: src/main/util.c:341
 #, c-format
 msgid "type %d is unimplemented in '%s'"
 msgstr "'%2$s' 中尚未實作類型 %1$d"
 
-#: src/main/util.c:297
+#: src/main/util.c:352
 #, c-format
 msgid "unimplemented type '%s' in '%s'\n"
 msgstr "類型 '%s' 尚未在 '%s' 中實作\n"
 
-#: src/main/util.c:299
+#: src/main/util.c:354
 #, c-format
 msgid "unimplemented type (%d) in '%s'\n"
 msgstr "(%d) 類型尚未在 '%s' 中實作\n"
 
-#: src/main/util.c:424
+#: src/main/util.c:479
 msgid "invalid tag in name extraction"
 msgstr "抽取名稱的標記不正確"
 
-#: src/main/util.c:434
+#: src/main/util.c:489
 #, c-format
 msgid "%d argument passed to .Internal(%s) which requires %d"
 msgid_plural "%d arguments passed to .Internal(%s) which requires %d"
 msgstr[0] "傳遞 %d 個引數給 .Internal(%s) 但它需要 %d 個"
 
-#: src/main/util.c:440
+#: src/main/util.c:495
 #, c-format
 msgid "%d argument passed to '%s' which requires %d"
 msgid_plural "%d arguments passed to '%s' which requires %d"
 msgstr[0] "傳遞了 %d 個引數給 '%s' 但它需要 %d 個"
 
-#: src/main/util.c:455
+#: src/main/util.c:510
 #, c-format
 msgid "supplied argument name '%s' does not match '%s'"
 msgstr "給定引數名稱 '%s' 不匹配 '%s'"
 
-#: src/main/util.c:465
+#: src/main/util.c:520
 #, c-format
 msgid "'nthcdr' list shorter than %d"
 msgstr "'nthcdr' 串列比 %d 要短"
 
-#: src/main/util.c:470
+#: src/main/util.c:525
 msgid "'nthcdr' needs a list to CDR down"
 msgstr "'nthcdr' 需要 CDR 向下串列"
 
-#: src/main/util.c:586
+#: src/main/util.c:641
 msgid "'all.x' must be TRUE or FALSE"
 msgstr "'all.x' 必須是 TRUE 或 FALSE"
 
-#: src/main/util.c:588
+#: src/main/util.c:643
 msgid "'all.y' must be TRUE or FALSE"
 msgstr "'all.y' 必須是 TRUE 或 FALSE"
 
-#: src/main/util.c:700
+#: src/main/util.c:672
+msgid "number of rows in the result exceeds maximum vector length"
+msgstr ""
+
+#: src/main/util.c:764
 msgid "missing value is invalid"
 msgstr "缺少值為無效"
 
-#: src/main/util.c:709 src/main/util.c:716
+#: src/main/util.c:773 src/main/util.c:780
 msgid "cannot change working directory"
 msgstr "無法變更工作目錄"
 
-#: src/main/util.c:735 src/main/util.c:769 src/main/util.c:810
-#: src/main/util.c:852 src/main/util.c:981 src/main/util.c:1040
-#: src/main/util.c:1063
+#: src/main/util.c:800 src/main/util.c:834 src/main/util.c:875
+#: src/main/util.c:917 src/main/util.c:1046 src/main/util.c:1105
+#: src/main/util.c:1128
 msgid "a character vector argument expected"
 msgstr "需要字元向量引數"
 
-#: src/main/util.c:742 src/main/util.c:777 src/main/util.c:819
-#: src/main/util.c:860
+#: src/main/util.c:807 src/main/util.c:842 src/main/util.c:884
+#: src/main/util.c:925
 msgid "path too long"
 msgstr "路徑太長"
 
-#: src/main/util.c:995
+#: src/main/util.c:1060
 msgid "only the first character of 'quote' will be used"
 msgstr "只用了 'quote' 的第一個字元"
 
-#: src/main/util.c:1065
+#: src/main/util.c:1130
 msgid "a character vector 'value' expected"
 msgstr "預期有一個字元向量 'value'"
 
-#: src/main/util.c:1068
+#: src/main/util.c:1133
 msgid "'value' must be of positive length"
 msgstr "'value' 必須是正值的長度"
 
-#: src/main/util.c:1197 src/main/util.c:1205
+#: src/main/util.c:1262 src/main/util.c:1270
 #, c-format
 msgid "invalid input '%s' in 'utf8towcs'"
 msgstr "在 'utf8towcs' 中無效的輸入'%s'"
 
-#: src/main/util.c:1290
+#: src/main/util.c:1355
 #, c-format
 msgid "invalid multibyte string at '%s'"
 msgstr "無效的多位元組字串於 '%s'"
 
-#: src/main/util.c:1399
+#: src/main/util.c:1497
 msgid "error message truncated to 255 chars"
 msgstr "錯誤訊息截短到 255 個位元組"
 
-#: src/main/util.c:1412
+#: src/main/util.c:1510
 msgid "warning message truncated to 255 chars"
 msgstr "警告訊息截短到 255 個位元組"
 
-#: src/main/util.c:1819
+#: src/main/util.c:1659
+#, c-format
+msgid "accuracy loss in conversion from \"%s\" to numeric"
+msgstr ""
+
+#: src/main/util.c:1969
 #, fuzzy
 msgid "all arguments must be named"
 msgstr "屬性必須命名"
 
-#: src/main/util.c:1893
+#: src/main/util.c:2091
 msgid "ICU is not supported on this build"
 msgstr "這個組建不支援 ICU"
 
-#: src/main/util.c:1954
+#: src/main/util.c:2158
 #, fuzzy
 msgid "'breaks' is not sorted"
 msgstr "類型 '%s' 未被支援"
 
-#: src/main/util.c:1988 src/main/util.c:2034
+#: src/main/util.c:2192 src/main/util.c:2242
 #, fuzzy, c-format
 msgid "long vector '%s' is not supported"
 msgstr "類型 '%s' 未被支援"
 
-#: src/main/util.c:2087
+#: src/main/util.c:2296
 msgid "'eps.correct' must be 0, 1, or 2"
 msgstr ""
 
-#: src/main/util.c:2115
+#: src/main/util.c:2324
 #, fuzzy
 msgid "'x' must be a vector"
 msgstr "'x' 必須是字元向量"
@@ -6357,14 +6438,6 @@ msgstr ""
 "用 'q()' 離開 R。\n"
 "\n"
 
-#: src/main/vfonts.c:50
-msgid "vfont routines cannot be accessed in module"
-msgstr "模組中沒有 vfont 例行程式"
-
-#: src/main/vfonts.c:67 src/main/vfonts.c:80 src/main/vfonts.c:98
-msgid "Hershey fonts cannot be loaded"
-msgstr "無法載入 Hershey 字型"
-
 #: src/main/xspline.c:60
 #, c-format
 msgid "add_point - reached MAXNUMPTS (%d)"
@@ -6388,7 +6461,7 @@ msgstr "至少必須有四個控制點"
 msgid "There must be at least three control points"
 msgstr "至少必須有三個控制點"
 
-#: src/modules/X11/dataentry.c:1871 src/modules/X11/devX11.c:1246
+#: src/modules/X11/dataentry.c:1874 src/modules/X11/devX11.c:1248
 #, c-format
 msgid "X11 protocol error: %s"
 msgstr "X11 協定錯誤:%s"
@@ -6411,7 +6484,7 @@ msgstr ""
 "錯誤:X11 無法配置額外的圖案顏色。\n"
 "請考慮用 colortype=\"pseudo.cube\" 或 \"gray\" 選項來呼叫 X11。"
 
-#: src/modules/X11/devX11.c:1027
+#: src/modules/X11/devX11.c:1029
 msgid ""
 "could not find any X11 fonts\n"
 "Check that the Font Path is correct."
@@ -6419,28 +6492,28 @@ msgstr ""
 "找不到任何 X11 字型\n"
 "請檢查字型路徑設得是不是對。"
 
-#: src/modules/X11/devX11.c:1087
+#: src/modules/X11/devX11.c:1089
 #, c-format
 msgid "X11 used font size %d when %d was requested"
 msgstr "X11 用了字型大小 %d 但需要的是 %d"
 
-#: src/modules/X11/devX11.c:1121
+#: src/modules/X11/devX11.c:1123
 #, c-format
 msgid "X11 font %s, face %d at size %d could not be loaded"
 msgstr "X11 字型 %s,字體 %d 於大小 %d 時無法載入"
 
-#: src/modules/X11/devX11.c:1130
+#: src/modules/X11/devX11.c:1132
 msgid ""
 "semi-transparency is not supported on this device: reported only once per "
 "page"
 msgstr "這個裝置不支援半透明:每頁只會回報一次"
 
-#: src/modules/X11/devX11.c:1254
+#: src/modules/X11/devX11.c:1256
 #, c-format
 msgid "X11 I/O error while opening X11 connection to '%s'"
 msgstr "當開啟 X11 連線到 '%s' 時 X11 I/O 錯誤"
 
-#: src/modules/X11/devX11.c:1272
+#: src/modules/X11/devX11.c:1273
 msgid "X11 fatal IO error: please save work and shut down R"
 msgstr "X11 致命的 IO 錯誤: 請儲存工作資料,然後重新啟動 R"
 
@@ -6561,206 +6634,271 @@ msgstr "無法建立 XImage"
 msgid "attempt to use the locator after dev.hold()"
 msgstr "於 dev.hold() 之後試圖使用定位器"
 
-#: src/modules/X11/devX11.c:3111
+#: src/modules/X11/devX11.c:3117
 #, c-format
 msgid "unable to start device %s"
 msgstr "無法開啟裝置 %s"
 
-#: src/modules/X11/devX11.c:3138
+#: src/modules/X11/devX11.c:3144
 msgid "invalid 'width' or 'height'"
 msgstr "'width' 或 'height' 不正確"
 
-#: src/modules/X11/devX11.c:3145
+#: src/modules/X11/devX11.c:3151
 msgid "invalid colortype passed to X11 driver"
 msgstr "傳給 X11 驅動器的顏色類型不正確"
 
-#: src/modules/X11/devX11.c:3159
+#: src/modules/X11/devX11.c:3165
 msgid "unknown X11 color/colour model -- using monochrome"
 msgstr "沒有這種 X11 顏色/顏色模型 -- 使用黑白顏色"
 
-#: src/modules/X11/devX11.c:3249
+#: src/modules/X11/devX11.c:3255
 msgid "no plot on device to save"
 msgstr "裝置上沒有插槽可以儲存"
 
-#: src/modules/X11/devX11.c:3251
+#: src/modules/X11/devX11.c:3257
 msgid "not an open X11cairo device"
 msgstr "不是一個開啟的 X11cairo 裝置"
 
-#: src/modules/X11/devX11.c:3260
+#: src/modules/X11/devX11.c:3266
 #, c-format
 msgid "cannot open file '%s'"
 msgstr "無法開啟檔案 '%s'"
 
-#: src/modules/X11/devX11.c:3277
+#: src/modules/X11/devX11.c:3283
 msgid "savePlot() is not supported on this build"
 msgstr "這次組建並未支援 savePlot()"
 
-#: src/modules/X11/devX11.c:3317
+#: src/modules/X11/devX11.c:3323
 msgid "unable to contact X11 display"
 msgstr "無法連結到 X11 顯示"
 
-#: src/modules/X11/devX11.c:3366
+#: src/modules/X11/devX11.c:3372
 #, c-format
 msgid "clipboard cannot be read (error code %d)"
 msgstr "無法讀取剪貼簿 (錯誤碼 %d)"
 
-#: src/modules/X11/devX11.c:3397
+#: src/modules/X11/devX11.c:3408
 msgid "cannot allocate memory for X11Routines structure"
 msgstr "無法為 X11Routines 結構配置記憶體"
 
-#: src/modules/internet/internet.c:188 src/modules/internet/internet.c:192
-#: src/modules/internet/internet.c:198 src/modules/internet/internet.c:210
+#: src/modules/internet/internet.c:113
+msgid "for https:// URLs use method = \"wininet\""
+msgstr ""
+
+#: src/modules/internet/internet.c:153 src/modules/internet/internet.c:274
+#: src/modules/internet/internet.c:758
+#, fuzzy, c-format
+msgid "scheme not supported in URL '%s'"
+msgstr "'eval' 不支援重新啟動"
+
+#: src/modules/internet/internet.c:348 src/modules/internet/internet.c:352
+#: src/modules/internet/internet.c:357 src/modules/internet/internet.c:381
+#: src/modules/internet/libcurl.c:791 src/modules/internet/libcurl.c:795
+#: src/modules/internet/libcurl.c:801 src/modules/internet/libcurl.c:814
+#: src/modules/internet/libcurl.c:822
 msgid "allocation of url connection failed"
 msgstr "url 連結配置失敗"
 
-#: src/modules/internet/internet.c:286
+#: src/modules/internet/internet.c:455
 msgid "only first element of 'url' argument used"
 msgstr "只用 'url' 引數的第一個元素"
 
-#: src/modules/internet/internet.c:292
+#: src/modules/internet/internet.c:461
 msgid "only first element of 'destfile' argument used"
 msgstr "只用 'destfile' 引數的第一個元素"
 
-#: src/modules/internet/internet.c:317
+#: src/modules/internet/internet.c:480 src/modules/internet/libcurl.c:499
 msgid "Download progress"
 msgstr "正在下載"
 
-#: src/modules/internet/internet.c:339
+#: src/modules/internet/internet.c:502
 #, c-format
 msgid "cannot open URL '%s', reason '%s'"
 msgstr "無法開啟網址 '%s' ,原因是 '%s'"
 
-#: src/modules/internet/internet.c:346 src/modules/internet/internet.c:372
-#: src/modules/internet/internet.c:474
+#: src/modules/internet/internet.c:509 src/modules/internet/internet.c:536
+#: src/modules/internet/internet.c:661
 #, c-format
 msgid "cannot open destfile '%s', reason '%s'"
 msgstr "無法開啟目標檔案 '%s' ,原因是 '%s'"
 
-#: src/modules/internet/internet.c:377 src/modules/internet/internet.c:479
+#: src/modules/internet/internet.c:541 src/modules/internet/internet.c:666
+#: src/modules/internet/libcurl.c:530
 #, c-format
 msgid "trying URL '%s'\n"
 msgstr "嘗試 URL '%s'\n"
 
-#: src/modules/internet/internet.c:384 src/modules/internet/internet.c:486
-msgid "opened URL\n"
-msgstr "開啟了 URL\n"
-
-#: src/modules/internet/internet.c:455 src/modules/internet/internet.c:560
-#, c-format
-msgid "downloaded length %d != reported length %d"
+#: src/modules/internet/internet.c:640 src/modules/internet/internet.c:751
+#: src/modules/internet/libcurl.c:578
+#, fuzzy, c-format
+msgid "downloaded length %0.f != reported length %0.f"
 msgstr "下載的長度 %d != 報告的長度 %d"
 
-#: src/modules/internet/internet.c:460 src/modules/internet/internet.c:565
+#: src/modules/internet/internet.c:645 src/modules/internet/internet.c:756
 #, c-format
 msgid "cannot open URL '%s'"
 msgstr "無法開啟 URL '%s'"
 
-#: src/modules/internet/internet.c:593 src/modules/internet/internet.c:828
-#, c-format
-msgid "cannot open: HTTP status was '%d %s'"
+#: src/modules/internet/internet.c:779 src/modules/internet/internet.c:944
+#, fuzzy, c-format
+msgid "cannot open URL '%s': HTTP status was '%d %s'"
 msgstr "無法開啟: HTTP 狀態是 '%d%s'"
 
-#: src/modules/internet/internet.c:772 src/modules/internet/internet.c:935
-msgid "InternetOpenUrl timed out"
-msgstr "InternetOpenUrl 已經逾時"
-
-#: src/modules/internet/internet.c:799 src/modules/internet/internet.c:813
-#: src/modules/internet/internet.c:957 src/modules/internet/internet.c:966
+#: src/modules/internet/internet.c:915 src/modules/internet/internet.c:929
+#: src/modules/internet/internet.c:1019 src/modules/internet/internet.c:1028
 #, c-format
 msgid "InternetOpenUrl failed: '%s'"
 msgstr "InternetOpenUrl 失敗: '%s'"
 
-#: src/modules/internet/internet.c:870
-msgid "Internet read timed out"
-msgstr "網際網路讀取逾時"
+#: src/modules/internet/libcurl.c:159
+#, fuzzy, c-format
+msgid "URL '%s': status was '%d %s'"
+msgstr "無法開啟: HTTP 狀態是 '%d%s'"
+
+#: src/modules/internet/libcurl.c:163
+#, c-format
+msgid "URL '%s': status was '%s'"
+msgstr ""
+
+#: src/modules/internet/libcurl.c:240
+#, fuzzy
+msgid "curlGetHeaders is not supported on this platform"
+msgstr "本平臺不支援 nsl()"
+
+#: src/modules/internet/libcurl.c:249 src/modules/internet/libcurl.c:252
+#, fuzzy, c-format
+msgid "invalid %s argument"
+msgstr "'%s' 引數不正確"
+
+#: src/modules/internet/libcurl.c:269
+#, c-format
+msgid ""
+"libcurl error code %d\n"
+"\t%s\n"
+msgstr ""
+
+#: src/modules/internet/libcurl.c:404
+#, fuzzy
+msgid "download.file(method = \"libcurl\") is not supported on this platform"
+msgstr "本平臺不支援 nsl()"
+
+#: src/modules/internet/libcurl.c:420
+#, fuzzy
+msgid "lengths of 'url' and 'destfile' must match"
+msgstr "導入和導出名稱的長度必須相等"
 
-#: src/modules/internet/nanoftp.c:288 src/modules/internet/nanoftp.c:301
-#: src/modules/internet/nanoftp.c:312 src/modules/internet/nanoftp.c:346
-#: src/modules/internet/nanoftp.c:356
+#: src/modules/internet/libcurl.c:481
+#, fuzzy, c-format
+msgid "URL %s: cannot open destfile '%s', reason '%s'"
+msgstr "無法開啟目標檔案 '%s' ,原因是 '%s'"
+
+#: src/modules/internet/libcurl.c:593
+#, fuzzy
+msgid "cannot download all files"
+msgstr "無法開啟檔案 '%s'"
+
+#: src/modules/internet/libcurl.c:727
+#, fuzzy
+msgid "cannot read from connection"
+msgstr "無法從此連結讀取"
+
+#: src/modules/internet/libcurl.c:763
+#, fuzzy
+msgid "cannot open connection"
+msgstr "無法開啟連結"
+
+#: src/modules/internet/libcurl.c:826
+#, fuzzy
+msgid "url(method = \"libcurl\") is not supported on this platform"
+msgstr "本平臺不支援 nsl()"
+
+#: src/modules/internet/nanoftp.c:289 src/modules/internet/nanoftp.c:302
+#: src/modules/internet/nanoftp.c:313 src/modules/internet/nanoftp.c:347
+#: src/modules/internet/nanoftp.c:357
 msgid "RxmlNanoFTPScanURL: overlong (invalid?) URL"
 msgstr "RxmlNanoFTPScanURL:過長 (無效?) 網址"
 
-#: src/modules/internet/nanoftp.c:389
+#: src/modules/internet/nanoftp.c:390
 msgid "removing FTP proxy info"
 msgstr "刪除 FTP 代理主機資訊"
 
-#: src/modules/internet/nanoftp.c:391
+#: src/modules/internet/nanoftp.c:392
 #, c-format
 msgid "using FTP proxy '%s'"
 msgstr "用 FTP 代理主機 '%s'"
 
-#: src/modules/internet/nanoftp.c:402 src/modules/internet/nanoftp.c:431
+#: src/modules/internet/nanoftp.c:403 src/modules/internet/nanoftp.c:432
 msgid "RxmlNanoFTPScanProxy: overlong (invalid?) URL"
 msgstr "RxmlNanoFTPScanProxy:過長 (無效?) 網址"
 
-#: src/modules/internet/nanoftp.c:830
+#: src/modules/internet/nanoftp.c:833
 msgid "cannot resolve host"
 msgstr "無法分辨主機"
 
-#: src/modules/internet/nanoftp.c:860
+#: src/modules/internet/nanoftp.c:863
 msgid "failed to connect to server"
 msgstr "連線不上伺服器"
 
-#: src/modules/internet/nanoftp.c:871
+#: src/modules/internet/nanoftp.c:874
 msgid "failed to get response from server"
 msgstr "伺服器沒有反應"
 
-#: src/modules/internet/nanoftp.c:1134
+#: src/modules/internet/nanoftp.c:1137
 msgid "RxmlNanoFTPGetConnection: failed to create socket"
 msgstr "RxmlNanoFTPGetConnection: 建立插槽失敗"
 
-#: src/modules/internet/nanoftp.c:1180
+#: src/modules/internet/nanoftp.c:1183
 msgid "failed to create a data connection"
 msgstr "建立資料連結失敗"
 
-#: src/modules/internet/nanoftp.c:1188
+#: src/modules/internet/nanoftp.c:1191
 msgid "failed to bind a port"
 msgstr "連線通訊埠失敗"
 
-#: src/modules/internet/nanoftp.c:1195
+#: src/modules/internet/nanoftp.c:1198
 #, c-format
 msgid "could not listen on port %d"
 msgstr "無法從通訊埠 %d 聽取資料"
 
-#: src/modules/internet/nanohttp.c:370 src/modules/internet/nanohttp.c:398
-#: src/modules/internet/nanohttp.c:407
+#: src/modules/internet/nanohttp.c:369 src/modules/internet/nanohttp.c:400
+#: src/modules/internet/nanohttp.c:412
 msgid "RxmlNanoHTTPScanURL: overlong (invalid?) URL"
 msgstr "RxmlNanoHTTPScanURL:過長 (無效?) 網址"
 
-#: src/modules/internet/nanohttp.c:441
+#: src/modules/internet/nanohttp.c:446
 msgid "removing HTTP proxy info"
 msgstr "刪除 HTTP 代理主機資訊"
 
-#: src/modules/internet/nanohttp.c:443
+#: src/modules/internet/nanohttp.c:448
 #, c-format
 msgid "using HTTP proxy '%s'"
 msgstr "使用 HTTP 代理主機 '%s'"
 
-#: src/modules/internet/nanohttp.c:454 src/modules/internet/nanohttp.c:490
+#: src/modules/internet/nanohttp.c:459 src/modules/internet/nanohttp.c:497
 msgid "RxmlNanoHTTPScanProxy: overlong (invalid?) URL"
 msgstr "RxmlNanoHTTPScanProxy:過長 (無效?) 網址"
 
-#: src/modules/internet/nanohttp.c:1107
+#: src/modules/internet/nanohttp.c:1135
 #, c-format
 msgid "unable to resolve '%s'"
 msgstr "無法解析 '%s'"
 
-#: src/modules/internet/nanohttp.c:1134
+#: src/modules/internet/nanohttp.c:1168
 #, c-format
 msgid "connected to '%s' on port %d."
 msgstr "透過通訊埠 %2$d 接通到 '%1$s'。"
 
-#: src/modules/internet/nanohttp.c:1139
+#: src/modules/internet/nanohttp.c:1173
 #, c-format
 msgid "unable to connect to '%s' on port %d."
 msgstr "無法透過通訊埠 %2$d 連線到 '%1$s'。"
 
-#: src/modules/internet/nanohttp.c:1443
+#: src/modules/internet/nanohttp.c:1477
 #, c-format
 msgid "redirect to: '%s'"
 msgstr "重新傳送到: '%s'"
 
-#: src/modules/internet/nanohttp.c:1454
+#: src/modules/internet/nanohttp.c:1488
 msgid "too many redirects, aborting ..."
 msgstr "太多重新傳送,中斷工作 ..."
 
@@ -6793,11 +6931,11 @@ msgstr "引數 type[1]='%s' 必須是 '1', 'O' 或 'I' 之一"
 #: src/modules/lapack/Lapack.c:730 src/modules/lapack/Lapack.c:779
 #: src/modules/lapack/Lapack.c:786 src/modules/lapack/Lapack.c:834
 #: src/modules/lapack/Lapack.c:840 src/modules/lapack/Lapack.c:894
-#: src/modules/lapack/Lapack.c:900 src/modules/lapack/Lapack.c:1134
-#: src/modules/lapack/Lapack.c:1140 src/modules/lapack/Lapack.c:1188
-#: src/modules/lapack/Lapack.c:1195 src/modules/lapack/Lapack.c:1199
-#: src/modules/lapack/Lapack.c:1227 src/modules/lapack/Lapack.c:1234
-#: src/modules/lapack/Lapack.c:1254
+#: src/modules/lapack/Lapack.c:900 src/modules/lapack/Lapack.c:1135
+#: src/modules/lapack/Lapack.c:1141 src/modules/lapack/Lapack.c:1189
+#: src/modules/lapack/Lapack.c:1196 src/modules/lapack/Lapack.c:1200
+#: src/modules/lapack/Lapack.c:1228 src/modules/lapack/Lapack.c:1235
+#: src/modules/lapack/Lapack.c:1255
 #, c-format
 msgid "error code %d from Lapack routine '%s'"
 msgstr "錯誤程式碼 %d,Lapack 例行程式 '%s'"
@@ -6878,28 +7016,28 @@ msgstr "錯誤 [%d] 來自 Lapack 'ztrcon()'"
 msgid "'a' must be a complex matrix"
 msgstr "'a' 必須是複數矩陣"
 
-#: src/modules/lapack/Lapack.c:535 src/modules/lapack/Lapack.c:1042
+#: src/modules/lapack/Lapack.c:535 src/modules/lapack/Lapack.c:1043
 msgid "'a' is 0-diml"
 msgstr "'a' 是 0-diml"
 
-#: src/modules/lapack/Lapack.c:537 src/modules/lapack/Lapack.c:1044
+#: src/modules/lapack/Lapack.c:537 src/modules/lapack/Lapack.c:1045
 #, c-format
 msgid "'a' (%d x %d) must be square"
 msgstr "'a' (%d x %d) 必須是正方形的"
 
-#: src/modules/lapack/Lapack.c:543 src/modules/lapack/Lapack.c:1050
+#: src/modules/lapack/Lapack.c:543 src/modules/lapack/Lapack.c:1051
 msgid "no right-hand side in 'b'"
 msgstr "'b' 在等號右側沒有公式"
 
 #: src/modules/lapack/Lapack.c:546 src/modules/lapack/Lapack.c:560
-#: src/modules/lapack/Lapack.c:1053 src/modules/lapack/Lapack.c:1069
+#: src/modules/lapack/Lapack.c:1054 src/modules/lapack/Lapack.c:1070
 #, c-format
 msgid "'b' (%d x %d) must be compatible with 'a' (%d x %d)"
 msgstr "'b' (%d x %d) 必須與 'a' (%d x %d) 相容"
 
 #: src/modules/lapack/Lapack.c:581 src/modules/lapack/Lapack.c:948
-#: src/modules/lapack/Lapack.c:962 src/modules/lapack/Lapack.c:1017
-#: src/modules/lapack/Lapack.c:1091
+#: src/modules/lapack/Lapack.c:962 src/modules/lapack/Lapack.c:1018
+#: src/modules/lapack/Lapack.c:1092
 #, c-format
 msgid "argument %d of Lapack routine %s had invalid value"
 msgstr "Lapack 例行程式 %2$s 的引數 %1$d 具有不正確的值"
@@ -6909,7 +7047,7 @@ msgid "'b' must be a complex matrix"
 msgstr "'b' 必須是複數矩陣"
 
 #: src/modules/lapack/Lapack.c:670 src/modules/lapack/Lapack.c:716
-#: src/modules/lapack/Lapack.c:1181 src/modules/lapack/Lapack.c:1220
+#: src/modules/lapack/Lapack.c:1182 src/modules/lapack/Lapack.c:1221
 #, c-format
 msgid "right-hand side should have %d not %d rows"
 msgstr "公式右側應該有 %d 而不是 %d 列"
@@ -6928,13 +7066,13 @@ msgstr ""
 msgid "'x' must be a square complex matrix"
 msgstr "'x' 必須是正方形的數值矩陣"
 
-#: src/modules/lapack/Lapack.c:926 src/modules/lapack/Lapack.c:1000
-#: src/modules/lapack/Lapack.c:1039 src/modules/lapack/Lapack.c:1114
-#: src/modules/lapack/Lapack.c:1245
+#: src/modules/lapack/Lapack.c:926 src/modules/lapack/Lapack.c:1001
+#: src/modules/lapack/Lapack.c:1040 src/modules/lapack/Lapack.c:1115
+#: src/modules/lapack/Lapack.c:1246
 msgid "'a' must be a numeric matrix"
 msgstr "'a' 必須是數值矩陣"
 
-#: src/modules/lapack/Lapack.c:933 src/modules/lapack/Lapack.c:1250
+#: src/modules/lapack/Lapack.c:933 src/modules/lapack/Lapack.c:1251
 msgid "'a' must be a square matrix"
 msgstr "'a' 必須是正方形矩陣"
 
@@ -6951,40 +7089,40 @@ msgstr "序列 %d 前置的次要符號並非肯定明確"
 msgid "the matrix is either rank-deficient or indefinite"
 msgstr ""
 
-#: src/modules/lapack/Lapack.c:987
+#: src/modules/lapack/Lapack.c:988
 msgid "'size' argument must be a positive integer"
 msgstr "'size' 引數必須是正整數"
 
-#: src/modules/lapack/Lapack.c:1002
+#: src/modules/lapack/Lapack.c:1003
 #, c-format
 msgid "'size' cannot exceed ncol(x) = %d"
 msgstr "'size' 不能超過 ncol(x)=%d"
 
-#: src/modules/lapack/Lapack.c:1003
+#: src/modules/lapack/Lapack.c:1004
 #, c-format
 msgid "'size' cannot exceed nrow(x) = %d"
 msgstr "'size' 不能超過 nrow(x)=%d"
 
-#: src/modules/lapack/Lapack.c:1015
+#: src/modules/lapack/Lapack.c:1016
 #, c-format
 msgid "element (%d, %d) is zero, so the inverse cannot be computed"
 msgstr "元素 (%d,%d) 為零,因此無法逆向求值"
 
-#: src/modules/lapack/Lapack.c:1094
+#: src/modules/lapack/Lapack.c:1095
 #, fuzzy, c-format
 msgid "Lapack routine %s: system is exactly singular: U[%d,%d] = 0"
 msgstr "Lapack 例行程式 dgesv: 系統正好是獨特的"
 
-#: src/modules/lapack/Lapack.c:1102
+#: src/modules/lapack/Lapack.c:1103
 #, c-format
 msgid "system is computationally singular: reciprocal condition number = %g"
 msgstr "系統計算上是獨特的: 互反條件數=%g"
 
-#: src/modules/lapack/Lapack.c:1174 src/modules/lapack/Lapack.c:1212
+#: src/modules/lapack/Lapack.c:1175 src/modules/lapack/Lapack.c:1213
 msgid "'b' must be a numeric matrix"
 msgstr "'b' 必須是數值矩陣"
 
-#: src/modules/lapack/Lapack.c:1246
+#: src/modules/lapack/Lapack.c:1247
 msgid "argument 'logarithm' must be logical"
 msgstr "引數 'logarithm' 必須是邏輯值"
 
@@ -6993,8 +7131,8 @@ msgid "bessel_i allocation error"
 msgstr "bessel_i 配置錯誤"
 
 #: src/nmath/bessel_i.c:77 src/nmath/bessel_i.c:122
-#, c-format
-msgid "bessel_i(%g): ncalc (=%ld) != nb (=%ld); alpha=%g. Arg. out of range?\n"
+#, fuzzy, c-format
+msgid "bessel_i(%g): ncalc (=%d) != nb (=%d); alpha=%g. Arg. out of range?\n"
 msgstr "bessel_i(%g): ncalc (=%ld)!= nb (=%ld); alpha=%g. 引數在範圍外?\n"
 
 #: src/nmath/bessel_i.c:80 src/nmath/bessel_i.c:125
@@ -7002,16 +7140,21 @@ msgstr "bessel_i(%g): ncalc (=%ld)!= nb (=%ld); alpha=%g. 引數在範圍外?\
 msgid "bessel_i(%g,nu=%g): precision lost in result\n"
 msgstr "bessel_i(%g,nu=%g): 結果的精確度有損害\n"
 
-#: src/nmath/bessel_j.c:67
+#: src/nmath/bessel_j.c:64 src/nmath/bessel_j.c:118
+#, c-format
+msgid "besselJ(x, nu): nu=%g too large for bessel_j() algorithm"
+msgstr ""
+
+#: src/nmath/bessel_j.c:72
 msgid "bessel_j allocation error"
 msgstr "bessel_j 配置錯誤"
 
-#: src/nmath/bessel_j.c:75 src/nmath/bessel_j.c:118
-#, c-format
-msgid "bessel_j(%g): ncalc (=%ld) != nb (=%ld); alpha=%g. Arg. out of range?\n"
+#: src/nmath/bessel_j.c:80 src/nmath/bessel_j.c:127
+#, fuzzy, c-format
+msgid "bessel_j(%g): ncalc (=%d) != nb (=%d); alpha=%g. Arg. out of range?\n"
 msgstr "bessel_j(%g): ncalc (=%ld)!= nb (=%ld); alpha=%g. 引數在範圍外?\n"
 
-#: src/nmath/bessel_j.c:78 src/nmath/bessel_j.c:121
+#: src/nmath/bessel_j.c:83 src/nmath/bessel_j.c:130
 #, c-format
 msgid "bessel_j(%g,nu=%g): precision lost in result\n"
 msgstr "bessel_j(%g,nu=%g): 結果的精確度有損害\n"
@@ -7021,8 +7164,8 @@ msgid "bessel_k allocation error"
 msgstr "bessel_k 配置錯誤"
 
 #: src/nmath/bessel_k.c:71 src/nmath/bessel_k.c:108
-#, c-format
-msgid "bessel_k(%g): ncalc (=%ld) != nb (=%ld); alpha=%g. Arg. out of range?\n"
+#, fuzzy, c-format
+msgid "bessel_k(%g): ncalc (=%d) != nb (=%d); alpha=%g. Arg. out of range?\n"
 msgstr "bessel_k(%g): ncalc (=%ld)!= nb (=%ld); alpha=%g. 引數在範圍外?\n"
 
 #: src/nmath/bessel_k.c:74 src/nmath/bessel_k.c:111
@@ -7030,16 +7173,21 @@ msgstr "bessel_k(%g): ncalc (=%ld)!= nb (=%ld); alpha=%g. 引數在範圍外?\
 msgid "bessel_k(%g,nu=%g): precision lost in result\n"
 msgstr "bessel_k(%g,nu=%g): 結果的精確度有損害\n"
 
-#: src/nmath/bessel_y.c:66
+#: src/nmath/bessel_y.c:63 src/nmath/bessel_y.c:125
+#, c-format
+msgid "besselY(x, nu): nu=%g too large for bessel_y() algorithm"
+msgstr ""
+
+#: src/nmath/bessel_y.c:71
 msgid "bessel_y allocation error"
 msgstr "bessel_y 配置錯誤"
 
-#: src/nmath/bessel_y.c:82 src/nmath/bessel_y.c:127
-#, c-format
-msgid "bessel_y(%g): ncalc (=%ld) != nb (=%ld); alpha=%g. Arg. out of range?\n"
+#: src/nmath/bessel_y.c:87 src/nmath/bessel_y.c:136
+#, fuzzy, c-format
+msgid "bessel_y(%g): ncalc (=%d) != nb (=%d); alpha=%g. Arg. out of range?\n"
 msgstr "bessel_y(%g): ncalc (=%ld)!= nb (=%ld); alpha=%g. 引數在範圍外?\n"
 
-#: src/nmath/bessel_y.c:85 src/nmath/bessel_y.c:130
+#: src/nmath/bessel_y.c:90 src/nmath/bessel_y.c:139
 #, c-format
 msgid "bessel_y(%g,nu=%g): precision lost in result\n"
 msgstr "bessel_y(%g,nu=%g): 結果的精確度有損害\n"
@@ -7049,42 +7197,42 @@ msgstr "bessel_y(%g,nu=%g): 結果的精確度有損害\n"
 msgid "'k' (%.2f) must be integer, rounded to %.0f"
 msgstr ""
 
-#: src/nmath/nmath.h:141
+#: src/nmath/nmath.h:156
 #, c-format
 msgid "argument out of domain in '%s'\n"
 msgstr "在 '%s' 中引數超出領域\n"
 
-#: src/nmath/nmath.h:144
+#: src/nmath/nmath.h:159
 #, c-format
 msgid "value out of range in '%s'\n"
 msgstr "在 '%s' 中的值超出範圍\n"
 
-#: src/nmath/nmath.h:147
+#: src/nmath/nmath.h:162
 #, c-format
 msgid "convergence failed in '%s'\n"
 msgstr "在 '%s' 中收斂失敗\n"
 
-#: src/nmath/nmath.h:150
+#: src/nmath/nmath.h:165
 #, c-format
 msgid "full precision may not have been achieved in '%s'\n"
 msgstr "在 '%s' 中可能尚未達到完全精確\n"
 
-#: src/nmath/nmath.h:153
+#: src/nmath/nmath.h:168
 #, c-format
 msgid "underflow occurred in '%s'\n"
 msgstr "下限溢位發生於 '%s'\n"
 
-#: src/nmath/pbeta.c:48
+#: src/nmath/pbeta.c:64
 #, c-format
-msgid "pbeta_raw() -> bratio() gave error code %d"
+msgid "pbeta_raw(%g, a=%g, b=%g, ..) -> bratio() gave error code %d"
 msgstr ""
 
-#: src/nmath/pnbinom.c:79
+#: src/nmath/pnbinom.c:82
 #, c-format
 msgid "pnbinom_mu() -> bratio() gave error code %d"
 msgstr ""
 
-#: src/nmath/pnchisq.c:246
+#: src/nmath/pnchisq.c:295
 #, c-format
 msgid "pnchisq(x=%g, ..): not converged in %d iter."
 msgstr "pnchisq(x=%g, ..): %d 次循環後還沒有聚合。"
@@ -7126,7 +7274,7 @@ msgstr "模組中沒有此一 X11 例行程式"
 msgid "X11 module cannot be loaded"
 msgstr "無法載入 X11 模組"
 
-#: src/unix/X11.c:126 src/unix/X11.c:132 src/unix/X11.c:138 src/unix/X11.c:144
+#: src/unix/X11.c:144 src/unix/X11.c:150 src/unix/X11.c:156 src/unix/X11.c:162
 msgid "X11 is not available"
 msgstr "無法使用 X11"
 
@@ -7152,7 +7300,7 @@ msgid ""
 "Explicit lazy dynamic loading not supported on this platform. Using default."
 msgstr "本系統不支援明確的緩慢動態載入。使用預設值。"
 
-#: src/unix/dynload.c:240
+#: src/unix/dynload.c:232
 msgid "cannot get working directory!"
 msgstr "找不到工作目錄"
 
@@ -7166,12 +7314,12 @@ msgid ""
 "report using bug.report()"
 msgstr "巢狀 readline 輸入出了不尋常的錯,請用 bug.report()"
 
-#: src/unix/sys-std.c:1082 src/unix/sys-std.c:1249
+#: src/unix/sys-std.c:1085 src/unix/sys-std.c:1255
 #, c-format
 msgid "problem in saving the history file '%s'"
 msgstr "儲存歷史檔案 '%s' 時出了問題"
 
-#: src/unix/sys-std.c:1156
+#: src/unix/sys-std.c:1162
 #, c-format
 msgid ""
 "Cannot open file '%s': %s\n"
@@ -7180,85 +7328,209 @@ msgstr ""
 "無法開啟檔案 '%s' :%s\n"
 "\n"
 
-#: src/unix/sys-std.c:1220 src/unix/sys-std.c:1243
+#: src/unix/sys-std.c:1226 src/unix/sys-std.c:1249
 msgid "'file' argument is too long"
 msgstr "'file' 引數太長"
 
-#: src/unix/sys-std.c:1226 src/unix/sys-std.c:1228
+#: src/unix/sys-std.c:1232 src/unix/sys-std.c:1234
 msgid "no history mechanism available"
 msgstr "沒有歷史功能"
 
-#: src/unix/sys-std.c:1255
+#: src/unix/sys-std.c:1261
 msgid "problem in truncating the history file"
 msgstr "截斷歷史檔案時發生問題"
 
-#: src/unix/sys-std.c:1257 src/unix/sys-std.c:1259
+#: src/unix/sys-std.c:1263 src/unix/sys-std.c:1265
 msgid "no history available to save"
 msgstr "沒有可以儲存的歷史紀錄"
 
-#: src/unix/sys-std.c:1271
+#: src/unix/sys-std.c:1277
 msgid "invalid timestamp"
 msgstr "時間戳記不正確"
 
-#: src/unix/sys-unix.c:251
+#: src/unix/sys-unix.c:248
 msgid "non-empty character argument expected"
 msgstr "需要非空字元引數"
 
-#: src/unix/sys-unix.c:254
+#: src/unix/sys-unix.c:251
 msgid "'intern' must be logical and not NA"
 msgstr "'intern' 必須是邏輯值且非無定義"
 
-#: src/unix/sys-unix.c:266
+#: src/unix/sys-unix.c:269
 #, c-format
 msgid "cannot popen '%s', probable reason '%s'"
 msgstr "無法 popen '%s' ,可能的原因是 '%s'"
 
-#: src/unix/sys-unix.c:271
+#: src/unix/sys-unix.c:279
 #, c-format
 msgid "line %d may be truncated in call to system(, intern = TRUE)"
 msgstr "第 %d 列也許在呼叫 system(, intern = TRUE) 時被截斷"
 
-#: src/unix/sys-unix.c:288
+#: src/unix/sys-unix.c:301
 #, c-format
 msgid "error in running command: '%s'"
 msgstr "執行命令時發生錯誤:'%s'"
 
-#: src/unix/sys-unix.c:290
+#: src/unix/sys-unix.c:303
 msgid "error in running command"
 msgstr "執行命令時發生錯誤"
 
-#: src/unix/sys-unix.c:294
+#: src/unix/sys-unix.c:307
 #, c-format
 msgid "running command '%s' had status %d and error message '%s'"
 msgstr "執行命令 '%s' 時出現狀態 %d 和錯誤訊息 '%s'"
 
-#: src/unix/sys-unix.c:399
+#: src/unix/sys-unix.c:412
 msgid "Sys.info() is not implemented on this system"
 msgstr "本系統沒有實作 Sys.info() 此一功能"
 
-#: src/unix/system.c:257
+#: src/unix/system.c:267
 #, c-format
 msgid "WARNING: --gui or -g without value ignored"
 msgstr "警告: --gui 或 -g 選項沒有值,因此忽略不用"
 
-#: src/unix/system.c:275
+#: src/unix/system.c:285
 #, c-format
 msgid "WARNING: unknown gui '%s', using X11\n"
 msgstr "警告: 沒有這種 gui '%s', 使用 X11\n"
 
-#: src/unix/system.c:278
+#: src/unix/system.c:288
 #, c-format
 msgid "WARNING: unknown gui '%s', using none\n"
 msgstr "警告: 沒有這種 gui '%s', 因此什麼都不用\n"
 
-#: src/unix/system.c:388
+#: src/unix/system.c:373
 msgid "creating temporary file for '-e' failed"
 msgstr "為 '-e' 建立暫存檔時失敗"
 
-#: src/unix/system.c:469
+#: src/unix/system.c:454
 msgid "WARNING: Only editing the first in the list of files"
 msgstr "警告: 只修改檔案串列中的第一個元素"
 
+#~ msgid "'what' must be a character string or a function"
+#~ msgstr "'what' 必須是字串或函數"
+
+#~ msgid "sockets are not available on this system"
+#~ msgstr "本系統沒有插槽這個功能"
+
+#~ msgid "no function to restart"
+#~ msgstr "沒有重新開始的功能"
+
+#~ msgid "argument must be a closure"
+#~ msgstr "引數必須是個結束"
+
+#~ msgid "'hostname' must be a character vector of length 1"
+#~ msgstr "'hostname' 必須是長度為 1 的字元向量"
+
+#~ msgid "nsl() was unable to resolve host '%s'"
+#~ msgstr "nsl() 無法分辨主機 '%s'"
+
+#, fuzzy
+#~ msgid "unknown format returned by C function 'gethostbyname'"
+#~ msgstr "gethostbyname 回傳了錯誤的格式"
+
+#~ msgid "nsl() is not supported on this platform"
+#~ msgstr "本平臺不支援 nsl()"
+
+#~ msgid "too large a range of values in 'x'"
+#~ msgstr "'x' 中的值的範圍太大"
+
+#~ msgid "non-numeric argument"
+#~ msgstr "非數值引數"
+
+#~ msgid "unsupported URL scheme"
+#~ msgstr "不支援這種 URL 方案"
+
+#~ msgid "'dimnames' must be a list"
+#~ msgstr "'dimnames' 必須是串列"
+
+#~ msgid "'args' must be a list"
+#~ msgstr "'args' 必須是串列"
+
+#~ msgid "binary operations require two arguments"
+#~ msgstr "二元運算需要兩個引數"
+
+#~ msgid "opened URL\n"
+#~ msgstr "開啟了 URL\n"
+
+#~ msgid "internet routines were already initialized"
+#~ msgstr "網際網路常式已經初始化"
+
+#~ msgid "'msg1' must be a character string"
+#~ msgstr "'msg1' 必須是字串"
+
+#~ msgid "'msg2' must be a character string"
+#~ msgstr "'msg2' 必須是字串"
+
+#~ msgid "argument 'code' must be a character string"
+#~ msgstr "引數 'code' 必須是字串"
+
+#, fuzzy
+#~ msgid "argument 'type' must be a character string"
+#~ msgstr "引數 'code' 必須是字串"
+
+#~ msgid "InternetOpenUrl timed out"
+#~ msgstr "InternetOpenUrl 已經逾時"
+
+#~ msgid "Internet read timed out"
+#~ msgstr "網際網路讀取逾時"
+
+#~ msgid "unable to find a closure from within which 'match.call' was called"
+#~ msgstr "從 'match.call' 被呼叫處之內無法找到結束"
+
+#~ msgid "vfont routines cannot be accessed in module"
+#~ msgstr "模組中沒有 vfont 例行程式"
+
+#~ msgid "Hershey fonts cannot be loaded"
+#~ msgstr "無法載入 Hershey 字型"
+
+#, fuzzy
+#~ msgid "invalid generic function in 'usemethod'"
+#~ msgstr "'usemethod' 中不能用一般功能"
+
+#, fuzzy
+#~ msgid "'UseMethod' called from outside a function"
+#~ msgstr "'NextMethod' 不能在函數外呼叫"
+
+#~ msgid "first argument must be a generic name"
+#~ msgstr "第一引數必須是一般名稱"
+
+#~ msgid ""
+#~ "explicit request not to duplicate arguments in call to '%s', but argument "
+#~ "%d is of the wrong type (%d != %d)"
+#~ msgstr "呼叫 '%s' 時明確要求不要複製引數,但引數 %d 的類型不正確 (%d != %d)"
+
+#~ msgid "character variables must be duplicated in .C/.Fortran"
+#~ msgstr "在呼叫 .C/.Fortran 時字元變數必須被複製"
+
+#~ msgid "call name too long in '%s'"
+#~ msgstr "'%s' 中呼叫的名稱太長"
+
+#~ msgid "generic name too long in '%s'"
+#~ msgstr "'%s' 中的一般名稱太長"
+
+#~ msgid "method name too long in '%s'"
+#~ msgstr "'%s' 中的方法名稱太長"
+
+#~ msgid "%d arguments passed to 'log' which requires 1 or 2"
+#~ msgstr "給了 'log' %d 個引數,但它最多只能用兩個引數"
+
+#~ msgid ""
+#~ "Warning in %s :\n"
+#~ "  %s\n"
+#~ msgstr ""
+#~ "%s 中的警告:\n"
+#~ " %s\n"
+
+#~ msgid "input"
+#~ msgstr "輸入"
+
+#~ msgid "symbol"
+#~ msgstr "符號"
+
+#~ msgid "assignment"
+#~ msgstr "指派"
+
 #~ msgid "negative value in 'x'"
 #~ msgstr "'x' 中有負值"
 
@@ -7355,21 +7627,12 @@ msgstr "警告: 只修改檔案串列中的第一個元素"
 #~ msgid "invalid return value count in call_R"
 #~ msgstr "call_R 的回傳值數目不正確"
 
-#~ msgid "internal error in unz code"
-#~ msgstr "unz 程式碼中有內部錯誤"
-
 #~ msgid "can't use R profiling while byte code profiling"
 #~ msgstr "在位元組碼程式概要分析時不能用 R 來同時進行程式概要分析"
 
-#~ msgid "bad character switch offsets"
-#~ msgstr "不當的字元切換偏移值"
-
 #~ msgid "bad switch names"
 #~ msgstr "不當的切換名稱"
 
-#~ msgid "bad numeric switch offsets"
-#~ msgstr "不當的數值切換偏移值"
-
 #~ msgid "constBuf must be a generic vector"
 #~ msgstr "constBuf 必須是一般向量"
 
@@ -7535,15 +7798,9 @@ msgstr "警告: 只修改檔案串列中的第一個元素"
 #~ msgid "'title' must be a character string"
 #~ msgstr "'title' 必須是字串"
 
-#~ msgid "'text' must be a character string"
-#~ msgstr "'text' 必須是字串"
-
 #~ msgid "'%s' must be length 1"
 #~ msgstr "'%s' 的長度必須是 1"
 
-#~ msgid "'%s' must be a list"
-#~ msgstr "'%s' 必須是串列"
-
 #~ msgid "'%s' element %d is not a window handle"
 #~ msgstr "'%s' 元素 %d 並非視窗控柄"
 
@@ -7571,9 +7828,6 @@ msgstr "警告: 只修改檔案串列中的第一個元素"
 #~ msgid "'file' is not a connection"
 #~ msgstr "'file' 不是連結"
 
-#~ msgid "'dec' must be a single character"
-#~ msgstr "'dec' 必須是單一字元"
-
 #~ msgid "corrupt data frame -- length of column %d does not not match nrows"
 #~ msgstr "資料框毀損-- 行的長度 %d 與 nrows 不相等"
 
diff --git a/src/library/compiler/DESCRIPTION.in b/src/library/compiler/DESCRIPTION.in
index f94b7f1..ab4d436 100644
--- a/src/library/compiler/DESCRIPTION.in
+++ b/src/library/compiler/DESCRIPTION.in
@@ -4,5 +4,5 @@ Priority: base
 Title: The R Compiler Package
 Author: Luke Tierney <luke-tierney at uiowa.edu>
 Maintainer: R Core Team <R-core at r-project.org>
-Description: Byte code compiler for R
+Description: Byte code compiler for R.
 License: Part of R @VERSION@
diff --git a/src/library/compiler/Makefile.in b/src/library/compiler/Makefile.in
index 18fe856..38ed8e5 100644
--- a/src/library/compiler/Makefile.in
+++ b/src/library/compiler/Makefile.in
@@ -15,7 +15,7 @@ DISTFILES = DESCRIPTION.in Makefile.in Makefile.win NAMESPACE
 
 pkg = compiler
 
-R_EXE = $(top_builddir)/bin/R --vanilla --slave
+R_EXE = R_ENABLE_JIT=0 $(top_builddir)/bin/R --vanilla --slave
 
 RSRC = `LC_COLLATE=C ls $(srcdir)/R/*.R`
 DEFPKGS = NULL
@@ -31,7 +31,8 @@ NOTANGLE = @NOTANGLE@
 from-noweb: $(srcdir)/R/cmp.R
 $(srcdir)/R/cmp.R: $(srcdir)/noweb/compiler.nw
 	@echo "re-making 'R/cmp.R'"
-	@$(NOTANGLE) -Rcmp.R $(srcdir)/noweb/compiler.nw > $(srcdir)/R/cmp.R
+	@$(NOTANGLE) -Rcmp.R $(srcdir)/noweb/compiler.nw > $(srcdir)/R/cmp.R || \
+	  (mv $(srcdir)/R/cmp.R $(srcdir)/R/cmp.fail && exit 1)
 
 mkR: mkR1
 
diff --git a/src/library/compiler/R/cmp.R b/src/library/compiler/R/cmp.R
index d34cb16..102d0cc 100644
--- a/src/library/compiler/R/cmp.R
+++ b/src/library/compiler/R/cmp.R
@@ -1,8 +1,8 @@
 #  Automatically generated from ../noweb/compiler.nw.
 #
 #  File src/library/compiler/R/cmp.R
-#  Part of the R package, http://www.R-project.org
-#  Copyright (C) 2001-2012 Luke Tierney
+#  Part of the R package, https://www.R-project.org
+#  Copyright (C) 2001-2014 Luke Tierney
 #
 #  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
@@ -15,7 +15,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 ##
 ## Compiler options
@@ -23,7 +23,7 @@
 
 compilerOptions <- new.env(hash = TRUE, parent = emptyenv())
 compilerOptions$optimize <- 2
-compilerOptions$suppressAll <- FALSE
+compilerOptions$suppressAll <- TRUE
 compilerOptions$suppressUndefined <-
     c(".Generic", ".Method", ".Random.seed", ".self")
 
@@ -89,8 +89,11 @@ missingArgs <- function(args) {
 frameTypes <- function(env) {
     top <- topenv(env)
     empty <- emptyenv()
+    base <- baseenv()
     nl <- 0
     while (! identical(env, top)) {
+        if (isNamespace(env))
+            stop("namespace found within local environments")
         env <- parent.env(env)
         nl <- nl + 1
         if (identical(env, empty))
@@ -99,6 +102,11 @@ frameTypes <- function(env) {
     nn <- 0
     if (isNamespace(env)) {
         while (! identical(env, .GlobalEnv)) {
+            if (!isNamespace(env)) {
+                name <- attr(env, "name")
+                if (!is.character(name) || !startsWith(name, "imports:"))
+                    stop("non-namespace found within namespace environments")
+            }
             env <- parent.env(env)
             nn <- nn + 1
             if (identical(env, empty))
@@ -107,6 +115,8 @@ frameTypes <- function(env) {
     }
     ng <- 0
     while (! identical(env, empty)) {
+        if (isNamespace(env))
+            stop("namespace found within global environments")
         env <- parent.env(env)
         ng <- ng + 1
     }
@@ -117,7 +127,7 @@ frameTypes <- function(env) {
 ## imports environment) find the namespace in which the symbol's value
 ## was originally defined. Returns NULL if the symbol is not found via
 ## the namespace.
-findHomeNS <- function(sym, ns) {
+findHomeNS <- function(sym, ns, cntxt) {
     if (! isNamespace(ns)) {
         ## As a convenience this allows for 'ns' to be the imports fame
         ## of a namespace. It appears that these now have a 'name'
@@ -125,7 +135,8 @@ findHomeNS <- function(sym, ns) {
         ## namespace.
         name <- attr(ns, "name")
         if (is.null(name))
-            stop("'ns' must be a namespace or a namespace imports environment")
+            cntxt$stop("'ns' must be a namespace or a namespace imports environment",
+                cntxt)
         ns <- getNamespace(sub("imports:", "", attr(ns, "name")))
     }
     if (exists(sym, ns, inherits = FALSE))
@@ -141,7 +152,7 @@ findHomeNS <- function(sym, ns) {
                 else
                     exports <- get(".__NAMESPACE__.", ins)$exports
                 if (exists(sym, exports, inherits = FALSE))
-                    return(findHomeNS(sym, ins))
+                    return(findHomeNS(sym, ins, cntxt))
             }
             else {
                 exports <- imports[[i]]
@@ -152,7 +163,7 @@ findHomeNS <- function(sym, ns) {
                     ## renaming this is still supported by the
                     ## namespace code.)
                     if (sym == exports[pos])
-                        return(findHomeNS(sym, ins))
+                        return(findHomeNS(sym, ins, cntxt))
                     else
                         return(NULL)
                 }
@@ -188,64 +199,60 @@ nsName <- function(ns) {
 ## Finding possible local variables
 ##
 
-getAssignedVar <- function(e) {
+getAssignedVar <- function(e, cntxt) {
     v <- e[[2]]
     if (missing(v))
-        stop(gettextf("bad assignment: %s", pasteExpr(e)),
-             domain = NA)
+        cntxt$stop(gettextf("bad assignment: %s", pasteExpr(e)), cntxt)
     else if (typeof(v) %in% c("symbol", "character"))
         as.character(v)
     else {
         while (typeof(v) == "language") {
             if (length(v) < 2)
-                stop(gettextf("bad assignment: %s", pasteExpr(e)),
-                     domain = NA)
+                cntxt$stop(gettextf("bad assignment: %s", pasteExpr(e)), cntxt)
             v <- v[[2]]
             if (missing(v))
-                stop(gettextf("bad assignment: %s", pasteExpr(e)),
-                     domain = NA)
+                cntxt$stop(gettextf("bad assignment: %s", pasteExpr(e)), cntxt)
         }
         if (typeof(v) != "symbol")
-            stop(gettextf("bad assignment: %s", pasteExpr(e)),
-                 domain = NA)
+            cntxt$stop(gettextf("bad assignment: %s", pasteExpr(e)), cntxt)
         as.character(v)
     }
 }
 
-findLocals1 <- function(e, shadowed = character(0)) {
+findLocals1 <- function(e, shadowed = character(0), cntxt) {
     if (typeof(e) == "language") {
         if (typeof(e[[1]]) %in% c("symbol", "character")) {
             v <- as.character(e[[1]])
             switch(v,
                    "=" =,
-                   "<-" = unique(c(getAssignedVar(e),
-                                   findLocalsList1(e[-1], shadowed))),
+                   "<-" = unique(c(getAssignedVar(e, cntxt),
+                                   findLocalsList1(e[-1], shadowed, cntxt))),
                    "for" = unique(c(as.character(e[2]),
-                                    findLocalsList1(e[-2], shadowed))),
+                                    findLocalsList1(e[-2], shadowed, cntxt))),
                    "delayedAssign" =,
                    "assign" = if (length(e) == 3 &&
                                   is.character(e[[2]]) &&
                                   length(e[[2]]) == 1)
-                                  c(e[[2]], findLocals1(e[[3]], shadowed))
-                              else findLocalsList1(e[1], shadowed),
+                                  c(e[[2]], findLocals1(e[[3]], shadowed, cntxt))
+                              else findLocalsList1(e[1], shadowed, cntxt),
                    "function" = character(0),
                    "~" = character(0),
                    "local" = if (! v %in% shadowed && length(e) == 2)
                                  character(0)
-                             else findLocalsList1(e[-1], shadowed),
+                             else findLocalsList1(e[-1], shadowed, cntxt),
                    "expression" =,
                    "quote" = if (! v %in% shadowed)
                                  character(0)
-                             else findLocalsList1(e[-1], shadowed),
-                   findLocalsList1(e[-1], shadowed))
+                             else findLocalsList1(e[-1], shadowed, cntxt),
+                   findLocalsList1(e[-1], shadowed, cntxt))
         }
-         else findLocalsList1(e, shadowed)
+         else findLocalsList1(e, shadowed, cntxt)
     }
     else character(0)
 }
 
-findLocalsList1 <- function(elist, shadowed)
-    unique(unlist(lapply(elist, findLocals1, shadowed)))
+findLocalsList1 <- function(elist, shadowed, cntxt)
+    unique(unlist(lapply(elist, findLocals1, shadowed, cntxt)))
 
 findLocals <- function(e, cntxt)
     findLocalsList(list(e), cntxt)
@@ -257,7 +264,7 @@ findLocalsList <- function(elist, cntxt) {
     sf <- initialShadowedFuns
     nsf <- length(sf)
     repeat {
-        vals <- findLocalsList1(elist, sf)
+        vals <- findLocalsList1(elist, sf, cntxt)
         redefined <- sf %in% vals
         last.nsf <- nsf
         sf <- unique(c(shadowed, sf[redefined]))
@@ -265,13 +272,8 @@ findLocalsList <- function(elist, cntxt) {
         ## **** need to fix the termination condition used in codetools!!!
         if (last.nsf == nsf) {
             rdsf <- vals %in% specialSyntaxFuns
-            if (any(rdsf)) {
-                msg <- ngettext(sum(rdsf),
-                                "local assignment to syntactic function: ",
-                                "local assignments to syntactic functions: ")
-                warning(msg, paste(vals[rdsf], collapse = ", "),
-                        domain = NA)
-            }
+            if (any(rdsf))
+                notifyAssignSyntacticFun(vals[rdsf], cntxt)
             return(vals)
         }
     }
@@ -453,7 +455,8 @@ constantFoldCall <- function(e, cntxt) {
             modes <- unlist(lapply(args, mode))
             if (all(modes %in% constModes)) {
                 tryCatch(checkConst(do.call(ffun, args)),
-                         error = function(e) NULL) ## **** issue warning??
+                         error = function(e) NULL, warning = function(w) NULL)
+                ## **** issue warning??
             }
             else NULL
         }
@@ -513,8 +516,8 @@ BRIFNOT.OP = 2,
 POP.OP = 0,
 DUP.OP = 0,
 PRINTVALUE.OP = 0,
-STARTLOOPCNTXT.OP = 1,
-ENDLOOPCNTXT.OP = 0,
+STARTLOOPCNTXT.OP = 2,
+ENDLOOPCNTXT.OP = 1,
 DOLOOPNEXT.OP = 0,
 DOLOOPBREAK.OP = 0,
 STARTFOR.OP = 3,
@@ -590,10 +593,10 @@ ISCHARACTER.OP = 0,
 ISSYMBOL.OP = 0,
 ISOBJECT.OP = 0,
 ISNUMERIC.OP = 0,
-NVECELT.OP = 0,
-NMATELT.OP = 0,
-SETNVECELT.OP = 0,
-SETNMATELT.OP = 0,
+VECSUBSET.OP = 1,
+MATSUBSET.OP = 1,
+VECSUBASSIGN.OP = 1,
+MATSUBASSIGN.OP = 1,
 AND1ST.OP = 2,
 AND2ND.OP = 1,
 OR1ST.OP = 2,
@@ -609,7 +612,27 @@ GETTER_CALL.OP = 1,
 SWAP.OP = 0,
 DUP2ND.OP = 0,
 SWITCH.OP = 4,
-RETURNJMP.OP = 0
+RETURNJMP.OP = 0,
+STARTSUBSET_N.OP = 2,
+STARTSUBASSIGN_N.OP = 2,
+VECSUBSET2.OP = 1,
+MATSUBSET2.OP = 1,
+VECSUBASSIGN2.OP = 1,
+MATSUBASSIGN2.OP = 1,
+STARTSUBSET2_N.OP = 2,
+STARTSUBASSIGN2_N.OP = 2,
+SUBSET_N.OP = 2,
+SUBSET2_N.OP = 2,
+SUBASSIGN_N.OP = 2,
+SUBASSIGN2_N.OP = 2,
+LOG.OP = 1,
+LOGBASE.OP = 1,
+MATH1.OP = 2,
+DOTCALL.OP = 2,
+COLON.OP = 1,
+SEQALONG.OP = 1,
+SEQLEN.OP = 1,
+BASEGUARD.OP = 2
 )
 
 Opcodes.names <- names(Opcodes.argc)
@@ -698,10 +721,10 @@ ISCHARACTER.OP <- 80
 ISSYMBOL.OP <- 81
 ISOBJECT.OP <- 82
 ISNUMERIC.OP <- 83
-NVECELT.OP <- 84
-NMATELT.OP <- 85
-SETNVECELT.OP <- 86
-SETNMATELT.OP <- 87
+VECSUBSET.OP <- 84
+MATSUBSET.OP <- 85
+VECSUBASSIGN.OP <- 86
+MATSUBASSIGN.OP <- 87
 AND1ST.OP <- 88
 AND2ND.OP <- 89
 OR1ST.OP <- 90
@@ -718,21 +741,150 @@ SWAP.OP <- 100
 DUP2ND.OP <- 101
 SWITCH.OP <- 102
 RETURNJMP.OP <- 103
+STARTSUBSET_N.OP <- 104
+STARTSUBASSIGN_N.OP <- 105
+VECSUBSET2.OP <- 106
+MATSUBSET2.OP <- 107
+VECSUBASSIGN2.OP <- 108
+MATSUBASSIGN2.OP <- 109
+STARTSUBSET2_N.OP <- 110
+STARTSUBASSIGN2_N.OP <- 111
+SUBSET_N.OP <- 112
+SUBSET2_N.OP <- 113
+SUBASSIGN_N.OP <- 114
+SUBASSIGN2_N.OP <-115
+LOG.OP <- 116
+LOGBASE.OP <- 117
+MATH1.OP <- 118
+DOTCALL.OP <- 119
+COLON.OP <- 120
+SEQALONG.OP <- 121
+SEQLEN.OP <- 122
+BASEGUARD.OP <- 123
 
 
 ##
 ## Code buffer implementation
 ##
 
-make.codeBuf <- function(expr) {
+extractSrcref <- function(sref, idx) {
+    if (is.list(sref) && length(sref) >= idx)
+        sref <- sref[[idx]]
+    else if (is.integer(sref) && length(sref) >= 6)
+        sref
+    else
+        NULL
+}
+getExprSrcref <- function(expr) {
+    sattr <- attr(expr, "srcref")
+    extractSrcref(sattr, 1)
+}
+# if block is a block srcref, get its idx'th entry
+# if block is a single srcref, return this srcref
+getBlockSrcref <- function(block, idx) {
+  extractSrcref(block, idx)
+}
+
+make.codeBuf <- function(expr, loc = NULL) {
+    exprTrackingOn <- TRUE
+    srcrefTrackingOn <- TRUE
+
+    if (is.null(loc)) {
+        curExpr <- expr
+        curSrcref <- getExprSrcref(expr)
+    } else {
+        curExpr <- loc$expr
+        curSrcref <- loc$srcref
+    }
+
+    if (is.null(curSrcref))
+        ## when top-level srcref is null, we speculate there will be no
+        ##   source references within the compiled expressions either,
+        ##   disabling the tracking makes the resulting constant pool
+        ##   smaller
+        srcrefTrackingOn <- FALSE
+
+    exprBuf <- NA   ## exprBuf will have the same length as codeBuf
+    srcrefBuf <- NA ## srcrefBuf will have the same length as codeBuf
+
+    if (!exprTrackingOn) {
+        curExpr <- NULL
+        exprBuf <- NULL
+    }
+    if (!srcrefTrackingOn) {
+        curSrcref <- NULL
+        srcrefBuf <- NULL
+    }
+
+    ## set the current expression
+    ## also update the srcref according to expr, if expr has srcref attribute
+    ##   (note: never clears current srcref)
+    setcurexpr <- function(expr) {
+        if (exprTrackingOn) {
+            curExpr <<- expr
+        }
+        if (srcrefTrackingOn) {
+            sref <- getExprSrcref(expr)
+            if (!is.null(sref) && srcrefTrackingOn)
+                curSrcref <<- sref
+         }
+    }
+    ## unconditionally sets the current expression and srcrefs
+    setcurloc <- function(expr, sref) {
+        if (exprTrackingOn)
+            curExpr <<- expr
+        if (srcrefTrackingOn)
+            curSrcref <<- sref
+    }
+    ## add location information (current expressions, srcrefs) to the constant pool
+    commitlocs <- function() {
+        if (exprTrackingOn) {
+          exprs <- exprBuf[1:codeCount]
+          class(exprs) <- "expressionsIndex"
+          putconst(exprs)
+        }
+
+        if (srcrefTrackingOn) {
+          srefs <- srcrefBuf[1:codeCount]
+          class(srefs) <- "srcrefsIndex"
+          putconst(srefs)
+        }
+
+        ## these entries will be at the end of the constant pool, assuming only the compiler
+        ## uses these two classes
+        NULL
+    }
+    savecurloc <- function() {
+        list(expr = curExpr, srcref = curSrcref)
+    }
+    restorecurloc <- function(saved) {
+        if (exprTrackingOn) curExpr <<- saved$expr
+        if (srcrefTrackingOn) curSrcref <<- saved$srcref
+    }
     codeBuf <- list(.Internal(bcVersion()))
     codeCount <- 1
     putcode <- function(...) {
         new <- list(...)
         newLen <- length(new)
-        while (codeCount + newLen > length(codeBuf))
+        while (codeCount + newLen > length(codeBuf)) {
             codeBuf <<- c(codeBuf, vector("list", length(codeBuf)))
-        codeBuf[(codeCount + 1) : (codeCount + newLen)] <<- new
+            if (exprTrackingOn)
+                exprBuf <<- c(exprBuf, vector("integer", length(exprBuf)))
+            if (srcrefTrackingOn)
+                srcrefBuf <<- c(srcrefBuf, vector("integer", length(srcrefBuf)))
+        }
+        codeRange <- (codeCount + 1) : (codeCount + newLen)
+        codeBuf[codeRange] <<- new
+
+        if (exprTrackingOn) {   ## put current expression into the constant pool
+            ei <- putconst(curExpr)
+            exprBuf[codeRange] <<- ei
+        }
+        if (srcrefTrackingOn) { ## put current srcref into the constant pool
+            si <- putconst(curSrcref)
+            srcrefBuf[codeRange] <<- si
+        }
+
         codeCount <<- codeCount + newLen
     }
     getcode <- function() as.integer(codeBuf[1 : codeCount])
@@ -752,11 +904,11 @@ make.codeBuf <- function(expr) {
     labels <- vector("list")
     makelabel <- function() { idx <<- idx + 1; paste0("L", idx) }
     putlabel <- function(name) labels[[name]] <<- codeCount
-    patchlabels <- function() {
+    patchlabels <- function(cntxt) {
         offset <- function(lbl) {
             if (is.null(labels[[lbl]]))
-                stop(gettextf("no offset recorded for label \"%s\"", lbl),
-                     domain = NA)
+                cntxt$stop(gettextf("no offset recorded for label \"%s\"", lbl),
+                           cntxt)
             labels[[lbl]]
         }
         for (i in 1 : codeCount) {
@@ -776,23 +928,31 @@ make.codeBuf <- function(expr) {
                putconst = putconst,
                makelabel = makelabel,
                putlabel = putlabel,
-               patchlabels = patchlabels)
+               patchlabels = patchlabels,
+               setcurexpr = setcurexpr,
+               setcurloc = setcurloc,
+               commitlocs = commitlocs,
+               savecurloc = savecurloc,
+               restorecurloc = restorecurloc)
     cb$putconst(expr) ## insert expression as first constant.
+      ## NOTE: this will also insert the srcref directly into the constant
+      ## pool
     cb
 }
 
-codeBufCode <- function(cb) {
-    cb$patchlabels()
+codeBufCode <- function(cb, cntxt) {
+    cb$patchlabels(cntxt)
+    cb$commitlocs()
     .Internal(mkCode(cb$code(), cb$const()))
 }
 
-genCode <- function(e, cntxt, gen = NULL) {
-    cb <- make.codeBuf(e)
+genCode <- function(e, cntxt, gen = NULL, loc = NULL) {
+    cb <- make.codeBuf(e, loc)
     if (is.null(gen))
-        cmp(e, cb, cntxt)
+        cmp(e, cb, cntxt, setloc = FALSE)
     else
         gen(cb, cntxt)
-    codeBufCode(cb)
+    codeBufCode(cb, cntxt)
 }
 
 
@@ -864,13 +1024,17 @@ make.loopContext <- function(cntxt, loop.label, end.label) {
 ## Compiler top level
 ##
 
-cmp <- function(e, cb, cntxt) {
+cmp <- function(e, cb, cntxt, missingOK = FALSE, setloc = TRUE) {
+    if (setloc) {
+        sloc <- cb$savecurloc()
+        cb$setcurexpr(e)
+    }
     ce <- constantFold(e, cntxt)
     if (is.null(ce)) {
         if (typeof(e) == "language")
             cmpCall(e, cb, cntxt)
         else if (typeof(e) == "symbol")
-            cmpSym(e, cb, cntxt)
+            cmpSym(e, cb, cntxt, missingOK)
         else if (typeof(e) == "bytecode")
             cntxt$stop(gettext("cannot compile byte code literals in code"),
                        cntxt)
@@ -882,6 +1046,8 @@ cmp <- function(e, cb, cntxt) {
     }
     else
         cmpConst(ce$value, cb, cntxt)
+    if (setloc)
+        cb$restorecurloc(sloc)
 }
 
 cmpConst <- function(val, cb, cntxt) {
@@ -925,12 +1091,14 @@ cmpSym <- function(sym, cb, cntxt, missingOK = FALSE) {
     }
 }
 
-cmpCall <- function(call, cb, cntxt) {
+cmpCall <- function(call, cb, cntxt, inlineOK = TRUE) {
+    sloc <- cb$savecurloc()
+    cb$setcurexpr(call)
     cntxt <- make.callContext(cntxt, call)
     fun <- call[[1]]
     args <- call[-1]
     if (typeof(fun) == "symbol") {
-        if (! tryInline(call, cb, cntxt)) {
+        if (! (inlineOK && tryInline(call, cb, cntxt))) {
             if (findLocVar(fun, cntxt))
                 notifyLocalFun(fun, cntxt)
             else {
@@ -951,6 +1119,7 @@ cmpCall <- function(call, cb, cntxt) {
             return(cmp(fun, cb, cntxt))
         cmpCallExprFun(fun, args, call, cb, cntxt)
     }
+    cb$restorecurloc(sloc)
 }
 
 cmpCallSymFun <- function(fun, args, call, cb, cntxt) {
@@ -995,7 +1164,7 @@ cmpCallArgs <- function(args, cb, cntxt) {
                        cntxt)
         else {
             if (is.symbol(a) || typeof(a) == "language") {
-                ci <- cb$putconst(genCode(a, pcntxt))
+                ci <- cb$putconst(genCode(a, pcntxt, loc = cb$savecurloc()))
                 cb$putcode(MAKEPROM.OP, ci)
             }
             else
@@ -1018,23 +1187,20 @@ cmpConstArg <- function(a, cb, cntxt) {
     }
 }
 
-## **** clean up to use tryCatch
 ## **** figure out how to handler multi-line deparses
 ## ****     e.g. checkCall(`{`, quote({}))
 ## **** better design would capture error object, wrap it up, and pass it on
+## **** use approach from codetools to capture partial argument match
+## ****     warnings if enabled?
 checkCall <- function(def, call, signal = warning) {
     if (typeof(def) %in% c("builtin", "special"))
         def <- args(def)
     if (typeof(def) != "closure" || any.dots(call))
         NA
     else {
-        old <-options()$show.error.messages
-        if (is.null(old)) old <- TRUE
-        options(show.error.messages=FALSE)
-        msg <- try({match.call(def, call); NULL})
-        options(show.error.messages=old)
+        msg <- tryCatch({match.call(def, call); NULL},
+                        error = function(e) conditionMessage(e))
         if (! is.null(msg)) {
-            msg <- sub("\n$", "", sub("^E.*: ", "", msg))
             emsg <- gettextf("possible error in '%s': %s",
                              deparse(call, 20)[1], msg)
             if (! is.null(signal)) signal(emsg)
@@ -1055,6 +1221,31 @@ cmpTag <- function(n, cb) {
     }
 }
 
+mayCallBrowser <- function(e, cntxt) {
+    if (typeof(e) == "language") {
+        fun <- e[[1]]
+        if (typeof(fun) == "symbol") {
+            fname <- as.character(fun)
+            if (fname == "browser") ## not checking isBaseVar to err on the
+                                    ## positive
+                TRUE
+            else if (fname == "function" && isBaseVar(fname, cntxt))
+                FALSE
+            else
+                mayCallBrowserList(e[-1], cntxt)
+        }
+        else
+            mayCallBrowserList(e, cntxt)
+    }
+    else FALSE
+}
+
+mayCallBrowserList <- function(elist, cntxt) {
+    for (a in as.list(elist))
+        if (! missing(a) && mayCallBrowser(a, cntxt))
+            return(TRUE)
+    FALSE
+}
 
 ##
 ## Inlining mechanism
@@ -1094,27 +1285,13 @@ haveInlineHandler <- function(name, package = "base") {
 
 ## tryInline implements the rule permitting inlining as they stand now:
 ## Inlining is controlled by the optimize compiler option, with possible
-## values 0, 1, 2, which mean
-##
-##   optimize = 0 -- no inlining
-##   optimize = 1 -- can inline syntactically special functions and
-##                   functions found via a namespace
-##   optimize = 2 -- can inline any functions from case packages
-##
-## This can easily be modified to allow functions to do things like
-##
-##     declare(optimize = 2)
-##
-## or
-##
-##     declare(notinline = c("diag", "dim"))
-##
-## **** need to figure out if there is a sensible way to declare things at
-## **** the package level
+## values 0, 1, 2, 3.
+
+noInlineSymbols <- c("standardGeneric")
 
-getInlineInfo <- function(name, cntxt) {
+getInlineInfo <- function(name, cntxt, guardOK = FALSE) {
     optimize <- cntxt$optimize
-    if (optimize > 0) {
+    if (optimize > 0 && ! (name %in% noInlineSymbols)) {
         info <- findCenvVar(name, cntxt$env)
         if (is.null(info))
             NULL
@@ -1130,15 +1307,23 @@ getInlineInfo <- function(name, cntxt) {
                         cntxt$stop(gettext("bad namespace import frame"))
                     frame <- top
                 }
-                info$package <- nsName(findHomeNS(name, frame))
+                info$package <- nsName(findHomeNS(name, frame, cntxt))
+                info$guard <- FALSE
                 info
             }
             else if (ftype == "global" &&
                      (optimize >= 3 ||
                       (optimize >= 2 && name %in% languageFuns))) {
                 info$package <- packFrameName(frame)
+                info$guard <- FALSE
                 info
             }
+            else if (guardOK && ftype == "global" &&
+                     packFrameName(frame) == "base") {
+                info$package <- packFrameName(frame)
+                info$guard <- TRUE
+                info
+            }                
             else NULL
         }
     }
@@ -1147,13 +1332,26 @@ getInlineInfo <- function(name, cntxt) {
 
 tryInline <- function(e, cb, cntxt) {
     name <- as.character(e[[1]])
-    info <- getInlineInfo(name, cntxt)
+    info <- getInlineInfo(name, cntxt, guardOK = TRUE)
     if (is.null(info))
         FALSE
     else {
         h <- getInlineHandler(name, info$package)
-        if (! is.null(h))
-            h(e, cb, cntxt)
+        if (! is.null(h)) {
+            if (info$guard) {
+                tailcall <- cntxt$tailcall
+                if (tailcall) cntxttailcall <- FALSE
+                expridx <- cb$putconst(e)
+                endlabel <- cb$makelabel()
+                cb$putcode(BASEGUARD.OP, expridx, endlabel)
+                if (! h(e, cb, cntxt))
+                    cmpCall(e, cb, cntxt, inlineOK = FALSE)
+                cb$putlabel(endlabel)
+                if (tailcall) cb$putcode(RETURN.OP)
+                TRUE
+            }
+            else h(e, cb, cntxt)
+        }
         else FALSE
     }
 }
@@ -1166,9 +1364,12 @@ tryInline <- function(e, cb, cntxt) {
 setInlineHandler("function", function(e, cb, cntxt) {
     forms <- e[[2]]
     body <- e[[3]]
+    sref <- e[[4]]
     ncntxt <- make.functionContext(cntxt, forms, body)
-    cbody <- genCode(body, ncntxt)
-    ci <- cb$putconst(list(forms, cbody))
+    if (mayCallBrowser(body, cntxt))
+        return(FALSE)
+    cbody <- genCode(body, ncntxt, loc = cb$savecurloc())
+    ci <- cb$putconst(list(forms, cbody, sref))
     cb$putcode(MAKECLOSURE.OP, ci)
     if (cntxt$tailcall) cb$putcode(RETURN.OP)
     TRUE
@@ -1179,14 +1380,21 @@ setInlineHandler("{", function(e, cb, cntxt) {
     if (n == 1)
         cmp(NULL, cb, cntxt)
     else {
+        sloc <- cb$savecurloc()
+        bsrefs <- attr(e, "srcref")
         if (n > 2) {
             ncntxt <- make.noValueContext(cntxt)
             for (i in 2 : (n - 1)) {
-                cmp(e[[i]], cb, ncntxt)
+                subexp <- e[[i]]
+                cb$setcurloc(subexp, getBlockSrcref(bsrefs, i))
+                cmp(subexp, cb, ncntxt, setloc = FALSE)
                 cb$putcode(POP.OP)
             }
         }
-        cmp(e[[n]], cb, cntxt)
+        subexp <- e[[n]]
+        cb$setcurloc(subexp, getBlockSrcref(bsrefs, n))
+        cmp(subexp, cb, cntxt, setloc = FALSE)
+        cb$restorecurloc(sloc)
     }
     TRUE
 })
@@ -1303,7 +1511,7 @@ getSetterInlineHandler <- function(name, package = "base") {
     else NULL
 }
 
-trySetterInline <- function(afun, place, call, cb, cntxt) {
+trySetterInline <- function(afun, place, origplace, call, cb, cntxt) {
     name <- as.character(afun)
     info <- getInlineInfo(name, cntxt)
     if (is.null(info))
@@ -1311,7 +1519,7 @@ trySetterInline <- function(afun, place, call, cb, cntxt) {
     else {
         h <- getSetterInlineHandler(name, info$package)
         if (! is.null(h))
-            h(afun, place, call, cb, cntxt)
+            h(afun, place, origplace, call, cb, cntxt)
         else FALSE
     }
 }
@@ -1359,7 +1567,7 @@ cmpAssign <- function(e, cb, cntxt) {
     superAssign <- as.character(e[[1]]) == "<<-"
     lhs <- e[[2]]
     value <- e[[3]]
-    symbol <- as.name(getAssignedVar(e))
+    symbol <- as.name(getAssignedVar(e, cntxt))
     if (superAssign && ! findVar(symbol, cntxt))
         notifyNoSuperAssignVar(symbol, cntxt)
     if (is.name(lhs) || is.character(lhs))
@@ -1369,23 +1577,27 @@ cmpAssign <- function(e, cb, cntxt) {
     else cmpSpecial(e, cb, cntxt) # punt for now
 }
 
-flattenPlace <- function(place) {
+flattenPlace <- function(place, cntxt) {
     places <- NULL
+    origplaces <- NULL
     while (typeof(place) == "language") {
         if (length(place) < 2)
-            stop("bad assignment 1")
+            cntxt$stop(gettext("bad assignment 1"), cntxt)
+        origplaces <- c(origplaces, list(place))
         tplace <- place
         tplace[[2]] <- as.name("*tmp*")
         places <- c(places, list(tplace))
         place <- place[[2]]
     }
     if (typeof(place) != "symbol")
-        stop("bad assignment 2")
-    places
+        cntxt$stop(gettext("bad assignment 2"), cntxt)
+    list(places = places, origplaces = origplaces)
 }
 
-cmpGetterCall <- function(place, cb, cntxt) {
+cmpGetterCall <- function(place, origplace, cb, cntxt) {
     ncntxt <- make.callContext(cntxt, place)
+    sloc <- cb$savecurloc()
+    cb$setcurexpr(origplace)
     fun <- place[[1]]
     if (typeof(fun) == "symbol") {
         if (! tryGetterInline(place, cb, ncntxt)) {
@@ -1407,6 +1619,7 @@ cmpGetterCall <- function(place, cb, cntxt) {
         cb$putcode(GETTER_CALL.OP, cci)
         cb$putcode(SWAP.OP)
     }
+    cb$restorecurloc(sloc)
 }
 
 checkAssign <- function(e, cntxt) {
@@ -1468,12 +1681,15 @@ cmpComplexAssign <- function(symbol, lhs, value, superAssign, cb, cntxt) {
     cb$putcode(startOP, csi)
 
     ncntxt <- make.argContext(cntxt)
-    flatPlace <- flattenPlace(lhs)
-    for (p in rev(flatPlace[-1]))
-        cmpGetterCall(p, cb, ncntxt)
-    cmpSetterCall(flatPlace[[1]], value, cb, ncntxt)
-    for (p in flatPlace[-1])
-        cmpSetterCall(p, as.name("*vtmp*"), cb, ncntxt)
+    flat <- flattenPlace(lhs, cntxt)
+    flatOrigPlace <- flat$origplaces
+    flatPlace <- flat$places
+    flatPlaceIdxs <- seq_along(flatPlace)[-1]
+    for (i in rev(flatPlaceIdxs))
+        cmpGetterCall(flatPlace[[i]], flatOrigPlace[[i]], cb, ncntxt)
+    cmpSetterCall(flatPlace[[1]], flatOrigPlace[[1]], value, cb, ncntxt)
+    for (i in flatPlaceIdxs)
+        cmpSetterCall(flatPlace[[i]], flatOrigPlace[[i]], as.name("*vtmp*"), cb, ncntxt)
 
     cb$putcode(endOP, csi)
     if (cntxt$tailcall) {
@@ -1483,17 +1699,20 @@ cmpComplexAssign <- function(symbol, lhs, value, superAssign, cb, cntxt) {
     TRUE;
 }
 
-cmpSetterCall <- function(place, vexpr, cb, cntxt) {
+cmpSetterCall <- function(place, origplace, vexpr, cb, cntxt) {
     afun <- getAssignFun(place[[1]])
     acall <- as.call(c(afun, as.list(place[-1]), list(value = vexpr)))
     acall[[2]] <- as.name("*tmp*")
     ncntxt <- make.callContext(cntxt, acall)
+    sloc <- cb$savecurloc()
+    cexpr <- as.call(c(afun, as.list(origplace[-1]), list(value = vexpr)))
+    cb$setcurexpr(cexpr)
     if (is.null(afun))
         ## **** warn instead and arrange for cmpSpecial?
         ## **** or generate code to signal runtime error?
         cntxt$stop(gettext("invalid function in complex assignment"))
     else if (typeof(afun) == "symbol") {
-        if (! trySetterInline(afun, place, acall, cb, ncntxt)) {
+        if (! trySetterInline(afun, place, origplace, acall, cb, ncntxt)) {
             ci <- cb$putconst(afun)
             cb$putcode(GETFUN.OP, ci)
             cb$putcode(PUSHNULLARG.OP)
@@ -1512,6 +1731,7 @@ cmpSetterCall <- function(place, vexpr, cb, cntxt) {
         cvi <- cb$putconst(vexpr)
         cb$putcode(SETTER_CALL.OP, cci, cvi)
     }
+    cb$restorecurloc(sloc)
 }
 
 getAssignFun <- function(fun) {
@@ -1551,7 +1771,7 @@ setInlineHandler("<-", cmpAssign)
 setInlineHandler("=", cmpAssign)
 setInlineHandler("<<-", cmpAssign)
 
-setSetterInlineHandler("$<-", function(afun, place, call, cb, cntxt) {
+setSetterInlineHandler("$<-", function(afun, place, origplace, call, cb, cntxt) {
     if (any.dots(place) || length(place) != 3)
         FALSE
     else {
@@ -1568,13 +1788,14 @@ setSetterInlineHandler("$<-", function(afun, place, call, cb, cntxt) {
     }
 })
 
-setSetterInlineHandler("[<-", function(afun, place, call, cb, cntxt)
-    cmpSetterDispatch(STARTSUBASSIGN.OP, DFLTSUBASSIGN.OP,
-                      afun, place, call, cb, cntxt))
+# **** this is now handled differently; see "Improved subset ..."
+# setSetterInlineHandler("[<-", function(afun, place, origplace, call, cb, cntxt)
+#     cmpSetterDispatch(STARTSUBASSIGN.OP, DFLTSUBASSIGN.OP,
+#                       afun, place, call, cb, cntxt))
 
-setSetterInlineHandler("[[<-", function(afun, place, call, cb, cntxt)
-    cmpSetterDispatch(STARTSUBASSIGN2.OP, DFLTSUBASSIGN2.OP,
-                      afun, place, call, cb, cntxt))
+# setSetterInlineHandler("[[<-", function(afun, place, origplace, call, cb, cntxt)
+#     cmpSetterDispatch(STARTSUBASSIGN2.OP, DFLTSUBASSIGN2.OP,
+#                       afun, place, call, cb, cntxt))
 
 cmpGetterDispatch <- function(start.op, dflt.op, call, cb, cntxt) {
     if (any.dots(call))
@@ -1614,11 +1835,12 @@ setGetterInlineHandler("$", function(call, cb, cntxt) {
     }
 })
 
-setGetterInlineHandler("[", function(call, cb, cntxt)
-    cmpGetterDispatch(STARTSUBSET.OP, DFLTSUBSET.OP, call, cb, cntxt))
+# **** this is now handled differently; see "Improved subset ..."
+# setGetterInlineHandler("[", function(call, cb, cntxt)
+#     cmpGetterDispatch(STARTSUBSET.OP, DFLTSUBSET.OP, call, cb, cntxt))
 
-setGetterInlineHandler("[[", function(call, cb, cntxt)
-    cmpGetterDispatch(STARTSUBSET2.OP, DFLTSUBSET2.OP, call, cb, cntxt))
+# setGetterInlineHandler("[[", function(call, cb, cntxt)
+#     cmpGetterDispatch(STARTSUBSET2.OP, DFLTSUBSET2.OP, call, cb, cntxt))
 
 
 ##
@@ -1675,6 +1897,8 @@ checkSkipLoopCntxt <- function(e, cntxt, breakOK = TRUE) {
                 TRUE
             else if (isLoopTopFun(fname, cntxt))
                 checkSkipLoopCntxtList(e[-1], cntxt, breakOK)
+            else if (fname %in% c("eval", "evalq"))
+                FALSE
             else
                 checkSkipLoopCntxtList(e[-1], cntxt, FALSE)
         }
@@ -1690,13 +1914,11 @@ setInlineHandler("repeat", function(e, cb, cntxt) {
         cmpRepeatBody(body, cb, cntxt)
     else {
         cntxt$needRETURNJMP <- TRUE ## **** do this a better way
-        code <- genCode(body, cntxt,
-                        function(cb, cntxt) {
-                            cmpRepeatBody(body, cb, cntxt)
-                            cb$putcode(ENDLOOPCNTXT.OP)
-                        })
-        bi <- cb$putconst(code)
-        cb$putcode(STARTLOOPCNTXT.OP, bi)
+        ljmpend.label <- cb$makelabel()
+        cb$putcode(STARTLOOPCNTXT.OP, 0, ljmpend.label)
+        cmpRepeatBody(body, cb, cntxt)
+        cb$putlabel(ljmpend.label)
+        cb$putcode(ENDLOOPCNTXT.OP, 0)
     }
     cb$putcode(LDNULL.OP)
     if (cntxt$tailcall) {
@@ -1724,13 +1946,11 @@ setInlineHandler("while", function(e, cb, cntxt) {
         cmpWhileBody(e, cond, body, cb, cntxt)
     else {
         cntxt$needRETURNJMP <- TRUE ## **** do this a better way
-        code <- genCode(body, cntxt, ## **** expr isn't quite right
-                        function(cb, cntxt) {
-                            cmpWhileBody(e, cond, body, cb, cntxt)
-                            cb$putcode(ENDLOOPCNTXT.OP)
-                        })
-        bi <- cb$putconst(code)
-        cb$putcode(STARTLOOPCNTXT.OP, bi)
+        ljmpend.label <- cb$makelabel()
+        cb$putcode(STARTLOOPCNTXT.OP, 0, ljmpend.label)
+        cmpWhileBody(e, cond, body, cb, cntxt)
+        cb$putlabel(ljmpend.label)
+        cb$putcode(ENDLOOPCNTXT.OP, 0)
     }
     cb$putcode(LDNULL.OP)
     if (cntxt$tailcall) {
@@ -1773,13 +1993,11 @@ setInlineHandler("for", function(e, cb, cntxt) {
         ctxt.label <- cb$makelabel()
         cb$putcode(STARTFOR.OP, callidx, ci, ctxt.label)
         cb$putlabel(ctxt.label)
-        code <- genCode(body, cntxt, ## **** expr isn't quite right
-                        function(cb, cntxt) {
-                            cmpForBody(NULL, body, NULL, cb, cntxt)
-                            cb$putcode(ENDLOOPCNTXT.OP)
-                        })
-        bi <- cb$putconst(code)
-        cb$putcode(STARTLOOPCNTXT.OP, bi)
+        ljmpend.label <- cb$makelabel()
+        cb$putcode(STARTLOOPCNTXT.OP, 1, ljmpend.label)
+        cmpForBody(NULL, body, NULL, cb, cntxt)
+        cb$putlabel(ljmpend.label)
+        cb$putcode(ENDLOOPCNTXT.OP, 1)
     }
     cb$putcode(ENDFOR.OP)
     if (cntxt$tailcall) {
@@ -1878,6 +2096,63 @@ setInlineHandler("exp", function(e, cb, cntxt)
 setInlineHandler("sqrt", function(e, cb, cntxt)
     cmpPrim1(e, cb, SQRT.OP, cntxt))
 
+setInlineHandler("log", function(e, cb, cntxt) {
+    if (dots.or.missing(e) || ! is.null(names(e)) ||
+        length(e) < 2 || length(e) > 3)
+        cmpSpecial(e, cb, cntxt)
+    else {
+        ci <- cb$putconst(e)
+        ncntxt <- make.nonTailCallContext(cntxt)
+        cmp(e[[2]], cb, ncntxt);
+        if (length(e) == 2)
+            cb$putcode(LOG.OP, ci)
+        else {
+            ncntxt <- make.argContext(cntxt)
+            cmp(e[[3]], cb, ncntxt)
+            cb$putcode(LOGBASE.OP, ci)
+        }
+        if (cntxt$tailcall)
+            cb$putcode(RETURN.OP)
+        TRUE
+    }
+})
+
+## Keep the order consistent with the order in the internal byte code
+## interpreter!
+math1funs <- c("floor", "ceiling", "sign",
+               "expm1", "log1p",
+               "cos", "sin", "tan", "acos", "asin", "atan",
+               "cosh", "sinh", "tanh", "acosh", "asinh", "atanh",
+               "lgamma", "gamma", "digamma", "trigamma",
+               "cospi", "sinpi", "tanpi")
+
+cmpMath1 <- function(e, cb, cntxt) {
+    if (dots.or.missing(e[-1]))
+        cmpBuiltin(e, cb, cntxt)
+    else if (length(e) != 2) {
+        notifyWrongArgCount(e[[1]], cntxt)
+        cmpBuiltin(e, cb, cntxt)
+    }
+    else {
+        name <- as.character(e[[1]])
+        idx <- match(name, math1funs) - 1
+        if (is.na(idx))
+            cntxt$stop(
+                paste(sQuote(name), "is not a registered math1 function"),
+                cntxt)
+        ncntxt <- make.nonTailCallContext(cntxt)
+        cmp(e[[2]], cb, ncntxt);
+        ci <- cb$putconst(e)
+        cb$putcode(MATH1.OP, ci, idx)
+        if (cntxt$tailcall)
+            cb$putcode(RETURN.OP)
+        TRUE
+    }
+}
+
+for (name in math1funs)
+    setInlineHandler(name, cmpMath1)
+
 setInlineHandler("==", function(e, cb, cntxt)
    cmpPrim2(e, cb, EQ.OP, cntxt))
 
@@ -2007,14 +2282,16 @@ cmpSpecial <- function(e, cb, cntxt) {
     TRUE
 }
 
-setInlineHandler(".Internal", function(e, cb, cntxt) {
+cmpDotInternalCall <- function(e, cb, cntxt) {
     ee <- e[[2]]
     sym <- ee[[1]]
     if (.Internal(is.builtin.internal(sym)))
         cmpBuiltin(ee, cb, cntxt, internal = TRUE)
     else
         cmpSpecial(e, cb, cntxt)
-})
+}
+
+setInlineHandler(".Internal", cmpDotInternalCall)
 
 
 ##
@@ -2048,15 +2325,17 @@ cmpDispatch <- function(start.op, dflt.op, e, cb, cntxt, missingOK = TRUE) {
     }
 }
 
-setInlineHandler("[", function(e, cb, cntxt)
-    cmpDispatch(STARTSUBSET.OP, DFLTSUBSET.OP, e, cb, cntxt))
+# **** this is now handled differently; see "Improved subset ..."
+# setInlineHandler("[", function(e, cb, cntxt)
+#     cmpDispatch(STARTSUBSET.OP, DFLTSUBSET.OP, e, cb, cntxt))
 
 # **** c() is now a BUILTIN
 # setInlineHandler("c", function(e, cb, cntxt)
 #     cmpDispatch(STARTC.OP, DFLTC.OP, e, cb, cntxt, FALSE))
 
-setInlineHandler("[[", function(e, cb, cntxt)
-    cmpDispatch(STARTSUBSET2.OP, DFLTSUBSET2.OP, e, cb, cntxt))
+# **** this is now handled differently; see "Improved subset ..."
+# setInlineHandler("[[", function(e, cb, cntxt)
+#     cmpDispatch(STARTSUBSET2.OP, DFLTSUBSET2.OP, e, cb, cntxt))
 
 setInlineHandler("$", function(e, cb, cntxt) {
     if (any.dots(e) || length(e) != 3)
@@ -2084,7 +2363,8 @@ setInlineHandler("$", function(e, cb, cntxt) {
 
 setInlineHandler("local", function(e, cb, cntxt) {
     if (length(e) == 2) {
-        ee <- as.call(list(as.call(list(as.name("function"), NULL, e[[2]]))))
+        ee <- as.call(list(as.call(list(
+            as.name("function"), NULL, e[[2]], NULL))))
         cmp(ee, cb, cntxt)
         TRUE
     }
@@ -2242,17 +2522,16 @@ cmpSimpleInternal <- function(e, cb, cntxt) {
         call <- inlineSimpleInternalCall(e, def)
         if (is.null(call))
             FALSE
-        else {
-            cmp(call, cb, cntxt)
-            TRUE
-        }
+        else
+            cmpDotInternalCall(call, cb, cntxt)
     }
 }
 
 safeBaseInternals <- c("atan2", "besselY", "beta", "choose",
                        "drop", "inherits", "is.vector", "lbeta", "lchoose",
                        "nchar", "polyroot", "typeof", "vector", "which.max",
-                       "which.min", "is.loaded", "identical")
+                       "which.min", "is.loaded", "identical",
+                       "match", "rep.int", "rep_len")
 
 for (i in safeBaseInternals) setInlineHandler(i,  cmpSimpleInternal)
 
@@ -2288,6 +2567,9 @@ setInlineHandler("switch", function(e, cb, cntxt) {
         expr <- e[[2]]
         cases <-e[-c(1, 2)]
 
+        if (is.null(cases))
+            notifyNoSwitchcases(cntxt)
+
         miss <- missingArgs(cases)
         nm <- names(cases)
 
@@ -2401,6 +2683,47 @@ setInlineHandler("switch", function(e, cb, cntxt) {
 
 
 ##
+## Inline handler for .Call
+##
+
+setInlineHandler(".Call", function(e, cb, cntxt) {
+    nargsmax <- 16 ## should match DOTCALL_MAX in eval.c
+    if (dots.or.missing(e[-1]) || ! is.null(names(e)) ||
+        length(e) < 2 || length(e) > nargsmax + 2)
+        cmpBuiltin(e, cb, cntxt) ## punt
+    else {
+        ncntxt <- make.nonTailCallContext(cntxt)
+        cmp(e[[2]], cb, ncntxt);
+        nargs <- length(e) - 2
+        if (nargs > 0) {
+            ncntxt <- make.argContext(cntxt)
+            for (a in as.list(e[-(1:2)]))
+                cmp(a, cb, ncntxt);
+        }
+        ci <- cb$putconst(e)
+        cb$putcode(DOTCALL.OP, ci, nargs)
+        if (cntxt$tailcall)
+            cb$putcode(RETURN.OP)
+        TRUE
+    }
+})
+
+
+##
+## Inline handlers for generating integer sequences
+##
+
+setInlineHandler(":", function(e, cb, cntxt)
+    cmpPrim2(e, cb, COLON.OP, cntxt))
+
+setInlineHandler("seq_along", function(e, cb, cntxt)
+    cmpPrim1(e, cb, SEQALONG.OP, cntxt))
+
+setInlineHandler("seq_len", function(e, cb, cntxt)
+    cmpPrim1(e, cb, SEQLEN.OP, cntxt))
+
+
+##
 ## Inline handlers to control warnings
 ##
 
@@ -2425,16 +2748,16 @@ cmpMultiColon <- function(e, cb, cntxt) {
 setInlineHandler("::", cmpMultiColon)
 setInlineHandler(":::", cmpMultiColon)
 
-setSetterInlineHandler("@<-", function(afun, place, acall, cb, cntxt) {
+setSetterInlineHandler("@<-", function(afun, place, origplace, acall, cb, cntxt) {
     if (! dots.or.missing(place) && length(place) == 3 &&
         typeof(place[[3]]) == "symbol") {
         place[[3]] <- as.character(place[[3]])
         vexpr <- acall[[length(acall)]]
-        cmpSetterCall(place, vexpr, cb, cntxt)
+        cmpSetterCall(place, origplace, vexpr, cb, cntxt)
         TRUE
     }
     else FALSE
-}, "methods")
+})
 
 setInlineHandler("with", function(e, cb, cntxt) {
     cntxt$suppressUndefined <- TRUE
@@ -2534,16 +2857,39 @@ notifyMultipleSwitchDefaults <- function(ndflt, cntxt)
         cntxt$warn(gettext("more than one default provided in switch() call"),
                    cntxt)
 
+notifyNoSwitchcases <- function(cntxt)
+    if (! suppressAll(cntxt))
+        cntxt$warn(gettext("'switch' with no alternatives"), cntxt)
+
+notifyAssignSyntacticFun <- function(funs, cntxt) {
+    if (! suppressAll(cntxt)) {
+        msg <- ngettext(length(funs),
+            "local assignment to syntactic function: ",
+            "local assignments to syntactic functions: ")
+        cntxt$warn(paste(msg, paste(funs, collapse = ", ")), cntxt)
+    }
+}
+
+notifyCompilerError <- function(msg)
+    if (!compilerOptions$suppressAll)
+        cat(paste(gettext("Error: compilation failed - "), msg, "\n"))
+
 
 ##
 ## Compiler interface
 ##
 
-compile <- function(e, env = .GlobalEnv, options = NULL) {
+compile <- function(e, env = .GlobalEnv, options = NULL, srcref = NULL) {
     cenv <- makeCenv(env)
     cntxt <- make.toplevelContext(cenv, options)
     cntxt$env <- addCenvVars(cenv, findLocals(e, cntxt))
-    genCode(e, cntxt)
+    if (mayCallBrowser(e, cntxt))
+        ## NOTE: compilation will be attempted repeatedly
+        e
+    else if (is.null(srcref))
+        genCode(e, cntxt)
+    else
+        genCode(e, cntxt, loc = list(expr = e, srcref = srcref))
 }
 
 cmpfun <- function(f, options = NULL) {
@@ -2551,7 +2897,13 @@ cmpfun <- function(f, options = NULL) {
     if (type == "closure") {
         cntxt <- make.toplevelContext(makeCenv(environment(f)), options)
         ncntxt <- make.functionContext(cntxt, formals(f), body(f))
-        b <- genCode(body(f), ncntxt)
+        if (mayCallBrowser(body(f), ncntxt))
+            return(f)
+        if (typeof(body(f)) != "language" || body(f)[1] != "{")
+            loc <- list(expr = body(f), srcref = getExprSrcref(f))
+        else
+            loc <- NULL
+        b <- genCode(body(f), ncntxt, loc = loc)
         val <- .Internal(bcClose(formals(f), b, environment(f)))
         attrs <- attributes(f)
         if (! is.null(attrs))
@@ -2560,17 +2912,26 @@ cmpfun <- function(f, options = NULL) {
             val <- asS4(val)
         val
     }
-    else if (typeof(f) == "builtin" || type == "special")
+    else if (type == "builtin" || type == "special")
         f
     else stop("cannot compile a non-function")
 }
 
 tryCmpfun <- function(f)
-    tryCatch(cmpfun(f), error = function(e) f)
+    tryCatch(cmpfun(f), error = function(e) {
+        notifyCompilerError(paste(e$message, "at", deparse(e$call)))
+        f
+    })
+
+tryCompile <- function(e, ...)
+    tryCatch(compile(e, ...), error = function(err) {
+        notifyCompilerError(paste(err$message, "at", deparse(err$call)))
+        e
+    })
 
 cmpframe <- function(inpos, file) {
     expr.needed <- 1000
-    expr.old <- options()$expressions
+    expr.old <- getOption("expressions")
     if (expr.old < expr.needed)
        options(expressions = expr.needed)
     on.exit(options(expressions = expr.old))
@@ -2621,7 +2982,7 @@ cmpfile <- function(infile, outfile, ascii = FALSE, env = .GlobalEnv,
     nforms <- length(forms)
     if (nforms > 0) {
         expr.needed <- 1000
-        expr.old <- options()$expressions
+        expr.old <- getOption("expressions")
         if (expr.old < expr.needed) {
             options(expressions = expr.needed)
             on.exit(options(expressions = expr.old))
@@ -2640,7 +3001,8 @@ cmpfile <- function(infile, outfile, ascii = FALSE, env = .GlobalEnv,
                     cat(paste("compiling expression", deparse(e, 20)[1],
                               "...\n"))
             }
-            cforms[[i]] <- genCode(e, cntxt)
+            if (!mayCallBrowser(e, cntxt))
+                cforms[[i]] <- genCode(e, cntxt)
         }
         cat(gettextf("saving to file \"%s\" ... ", outfile))
         .Internal(save.to.file(cforms, outfile, ascii))
@@ -2681,6 +3043,7 @@ setCompilerOptions <- function(...) {
             stop(gettextf("'%s' is not a valid compiler option", n),
                  domain = NA)
     old <- list()
+    newOptions <- as.list(compilerOptions) # copy options
     for (n in nm) {
         op <- options[[n]]
         switch(n,
@@ -2689,14 +3052,14 @@ setCompilerOptions <- function(...) {
                    if (length(op) == 1 && 0 <= op && op <= 3) {
                        old <- c(old, list(optimize =
                                           compilerOptions$optimize))
-                       compilerOptions$optimize <- op
+                       newOptions$optimize <- op
                    }
                },
                suppressAll = {
                    if (identical(op, TRUE) || identical(op, FALSE)) {
                        old <- c(old, list(suppressAll =
                                           compilerOptions$suppressAll))
-                       compilerOptions$suppressAll <- op
+                       newOptions$suppressAll <- op
                    }
                },
                suppressUndefined = {
@@ -2704,16 +3067,53 @@ setCompilerOptions <- function(...) {
                        is.character(op)) {
                        old <- c(old, list(suppressUndefined =
                                           compilerOptions$suppressUndefined))
-                       compilerOptions$suppressUndefined <- op
+                       newOptions$suppressUndefined <- op
                    }
                })
     }
-    old
+    jitEnabled <- enableJIT(-1)
+    if (checkCompilerOptions(jitEnabled, newOptions))
+        for(n in names(newOptions)) # commit the new options
+            assign(n, newOptions[[n]], compilerOptions)
+    invisible(old)
 }
 
 .onLoad <- function(libname, pkgname) {
-    if (Sys.getenv("R_COMPILER_SUPPRESS_ALL") != "")
-        setCompilerOptions(suppressAll = TRUE)
+    envAsLogical <- function(varName) {
+        value = Sys.getenv(varName)
+        if (value == "")
+            NA
+        else
+            switch(value,
+                "1"=, "TRUE"=, "true"=, "True"=, "yes"=, "Yes"= TRUE,
+                "0"=, "FALSE"=,"false"=,"False"=, "no"=, "No" = FALSE,
+                stop(gettextf("invalid environment variable value: %s==%s",
+                    varName, value)))
+    }
+    val <- envAsLogical("R_COMPILER_SUPPRESS_ALL")
+    if (!is.na(val))
+        setCompilerOptions(suppressAll = val)
+    val <- envAsLogical("R_COMPILER_SUPPRESS_UNDEFINED")
+    if (!is.na(val))
+        setCompilerOptions(suppressUndefined = val)
+    if (Sys.getenv("R_COMPILER_OPTIMIZE") != "")
+        tryCatch({
+            lev <- as.integer(Sys.getenv("R_COMPILER_OPTIMIZE"))
+            if (0 <= lev && lev <= 3)
+                setCompilerOptions(optimize = lev)
+        }, error = function(e) e, warning = function(w) w)
+}
+
+checkCompilerOptions <- function(jitEnabled, options = NULL) {
+    optimize <- getCompilerOption("optimize", options)
+    if (jitEnabled <= 2 || optimize >= 2)
+        TRUE
+    else {
+        stop(gettextf(
+            "invalid compiler options: optimize(==%d)<2 and jitEnabled(==%d)>2",
+            optimize, jitEnabled))
+        FALSE
+    }
 }
 
 
@@ -2757,3 +3157,187 @@ disassemble <- function(code) {
     }
     dput(disasm(.Internal(disassemble(code))))
 }
+
+
+##
+## Experimental Utilities
+##
+
+bcprof <- function(expr) {
+    .Internal(bcprofstart())
+    expr
+    .Internal(bcprofstop())
+    val <- structure(.Internal(bcprofcounts()),
+                     names = Opcodes.names)
+    hits <- sort(val[val > 0], decreasing = TRUE)
+    pct <- round(100 * hits / sum(hits), 1)
+    data.frame(hits = hits, pct = pct)
+}
+
+asm <- function(e, gen, env = .GlobalEnv, options = NULL) {
+    cenv <- makeCenv(env)
+    cntxt <- make.toplevelContext(cenv, options)
+    cntxt$env <- addCenvVars(cenv, findLocals(e, cntxt))
+    genCode(e, cntxt, gen = gen)
+}
+
+
+##
+## Improved subset and subassign handling
+##
+
+cmpSubsetDispatch <- function(start.op, dflt.op, e, cb, cntxt) {
+    if (dots.or.missing(e) || ! is.null(names(e)) || length(e) < 3)
+        cntxt$stop(gettext("cannot compile this expression"), cntxt)
+    else {
+        oe <- e[[2]]
+        if (missing(oe))
+            cntxt$stop(gettext("cannot compile this expression"), cntxt)
+        ncntxt <- make.argContext(cntxt)
+        ci <- cb$putconst(e)
+        label <- cb$makelabel()
+        cmp(oe, cb, ncntxt)
+        cb$putcode(start.op, ci, label)
+        indices <- e[-c(1, 2)]
+        for (i in seq_along(indices))
+            cmp(indices[[i]], cb, ncntxt, TRUE)
+        if (dflt.op$rank) cb$putcode(dflt.op$code, ci, length(indices))
+        else cb$putcode(dflt.op$code, ci)
+        cb$putlabel(label)
+        if (cntxt$tailcall) cb$putcode(RETURN.OP)
+        TRUE
+    }
+}
+
+setInlineHandler("[", function(e, cb, cntxt) {
+    if (dots.or.missing(e) || ! is.null(names(e)) || length(e) < 3)
+        cmpDispatch(STARTSUBSET.OP, DFLTSUBSET.OP, e, cb, cntxt) ## punt
+    else {
+        nidx <- length(e) - 2;
+        if (nidx == 1)
+            dflt.op <- list(code = VECSUBSET.OP, rank = FALSE)
+        else if (nidx == 2)
+            dflt.op <- list(code = MATSUBSET.OP, rank = FALSE)
+        else
+            dflt.op <- list(code = SUBSET_N.OP, rank = TRUE)
+        cmpSubsetDispatch(STARTSUBSET_N.OP, dflt.op, e, cb, cntxt)
+    }
+})
+
+setInlineHandler("[[", function(e, cb, cntxt) {
+    if (dots.or.missing(e) || ! is.null(names(e)) || length(e) < 3)
+        cmpDispatch(STARTSUBSET2.OP, DFLTSUBSET2.OP, e, cb, cntxt) ## punt
+    else {
+        nidx <- length(e) - 2;
+        if (nidx == 1)
+            dflt.op <- list(code = VECSUBSET2.OP, rank = FALSE)
+        else if (nidx == 2)
+            dflt.op <- list(code = MATSUBSET2.OP, rank = FALSE)
+        else
+            dflt.op <- list(code = SUBSET2_N.OP, rank = TRUE)
+        cmpSubsetDispatch(STARTSUBSET2_N.OP, dflt.op, e, cb, cntxt)
+    }
+})
+
+cmpSubassignDispatch <- function(start.op, dflt.op, afun, place, call, cb,
+                                 cntxt) {
+    if (dots.or.missing(place) || ! is.null(names(place)) || length(place) < 3)
+        cntxt$stop(gettext("cannot compile this expression"), cntxt)
+    else {
+        ci <- cb$putconst(call)
+        label <- cb$makelabel()
+        cb$putcode(start.op, ci, label)
+        indices <- place[-c(1, 2)]
+        for (i in seq_along(indices))
+            cmp(indices[[i]], cb, cntxt, TRUE)
+        if (dflt.op$rank) cb$putcode(dflt.op$code, ci, length(indices))
+        else cb$putcode(dflt.op$code, ci)
+        cb$putlabel(label)
+        TRUE
+    }
+}
+
+setSetterInlineHandler("[<-", function(afun, place, origplace, call, cb, cntxt) {
+    if (dots.or.missing(place) || ! is.null(names(place)) || length(place) < 3)
+        cmpSetterDispatch(STARTSUBASSIGN.OP, DFLTSUBASSIGN.OP,
+                          afun, place, call, cb, cntxt) ## punt
+    else {
+        nidx <- length(place) - 2
+        if (nidx == 1)
+            dflt.op <- list(code = VECSUBASSIGN.OP, rank = FALSE)
+        else if (nidx == 2)
+            dflt.op <- list(code = MATSUBASSIGN.OP, rank = FALSE)
+        else
+            dflt.op <- list(code = SUBASSIGN_N.OP, rank = TRUE)
+        cmpSubassignDispatch(STARTSUBASSIGN_N.OP, dflt.op, afun, place, call,
+                             cb, cntxt)
+    }
+})
+
+setSetterInlineHandler("[[<-", function(afun, place, origplace, call, cb, cntxt) {
+    if (dots.or.missing(place) || ! is.null(names(place)) || length(place) < 3)
+        cmpSetterDispatch(STARTSUBASSIGN2.OP, DFLTSUBASSIGN2.OP,
+                          afun, place, call, cb, cntxt) ## punt
+    else {
+        nidx <- length(place) - 2
+        if (nidx == 1)
+            dflt.op <- list(code = VECSUBASSIGN2.OP, rank = FALSE)
+        else if (nidx == 2)
+            dflt.op <- list(code = MATSUBASSIGN2.OP, rank = FALSE)
+        else
+            dflt.op <- list(code = SUBASSIGN2_N.OP, rank = TRUE)
+        cmpSubassignDispatch(STARTSUBASSIGN2_N.OP, dflt.op, afun, place, call,
+                             cb, cntxt)
+    }
+})
+
+cmpSubsetGetterDispatch <- function(start.op, dflt.op, call, cb, cntxt) {
+    if (dots.or.missing(call) || ! is.null(names(call)) || length(call) < 3)
+        cntxt$stop(gettext("cannot compile this expression"), cntxt)
+    else {
+        ci <- cb$putconst(call)
+        end.label <- cb$makelabel()
+        cb$putcode(DUP2ND.OP)
+        cb$putcode(start.op, ci, end.label)
+        indices <- call[-c(1, 2)]
+        for (i in seq_along(indices))
+            cmp(indices[[i]], cb, cntxt, TRUE)
+        if (dflt.op$rank)
+            cb$putcode(dflt.op$code, ci, length(indices))
+        else
+            cb$putcode(dflt.op$code, ci)
+        cb$putlabel(end.label)
+        cb$putcode(SWAP.OP)
+        TRUE
+    }
+}
+
+setGetterInlineHandler("[", function(call, cb, cntxt) {
+    if (dots.or.missing(call) || ! is.null(names(call)) || length(call) < 3)
+        cmpGetterDispatch(STARTSUBSET.OP, DFLTSUBSET.OP, call, cb, cntxt)
+    else {
+        nidx <- length(call) - 2;
+        if (nidx == 1)
+            dflt.op <- list(code = VECSUBSET.OP, rank = FALSE)
+        else if (nidx == 2)
+            dflt.op <- list(code = MATSUBSET.OP, rank = FALSE)
+        else
+            dflt.op <- list(code = SUBSET_N.OP, rank = TRUE)
+        cmpSubsetGetterDispatch(STARTSUBSET_N.OP, dflt.op, call, cb, cntxt)
+    }
+})
+
+setGetterInlineHandler("[[", function(call, cb, cntxt) {
+    if (dots.or.missing(call) || ! is.null(names(call)) || length(call) < 3)
+        cmpGetterDispatch(STARTSUBSET2.OP, DFLTSUBSET2.OP, call, cb, cntxt)
+    else {
+        nidx <- length(call) - 2;
+        if (nidx == 1)
+            dflt.op <- list(code = VECSUBSET2.OP, rank = FALSE)
+        else if (nidx == 2)
+            dflt.op <- list(code = MATSUBSET2.OP, rank = FALSE)
+        else
+            dflt.op <- list(code = SUBSET2_N.OP, rank = TRUE)
+        cmpSubsetGetterDispatch(STARTSUBSET2_N.OP, dflt.op, call, cb, cntxt)
+    }
+})
diff --git a/src/library/compiler/man/compile.Rd b/src/library/compiler/man/compile.Rd
index 6fa224e..0266f01 100644
--- a/src/library/compiler/man/compile.Rd
+++ b/src/library/compiler/man/compile.Rd
@@ -1,6 +1,6 @@
 % File src/library/compiler/man/compile.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 2011 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 2011-2017 R Core Team
 % Distributed under GPL 2 or later
 
 \name{compile}
@@ -16,7 +16,7 @@
 \title{Byte Code Compiler}
 \usage{
 cmpfun(f, options = NULL)
-compile(e, env = .GlobalEnv, options = NULL)
+compile(e, env = .GlobalEnv, options = NULL, srcref = NULL)
 cmpfile(infile, outfile, ascii = FALSE, env = .GlobalEnv,
         verbose = FALSE, options = NULL)
 loadcmp(file, envir = .GlobalEnv, chdir = FALSE)
@@ -28,23 +28,24 @@ setCompilerOptions(...)
 }
 \arguments{
   \item{f}{a closure.}
-  \item{options}{list of named compiler options}
+  \item{options}{list of named compiler options: see \sQuote{Details}.}
   \item{env}{the top level environment for the compiling.}
-  \item{file,infile,outfile}{pathnames; outfile defaults to infile with a .Rc
-                             extension in place of any existing extension.}
+  \item{srcref}{initial source reference for the expression.}
+  \item{file,infile,outfile}{pathnames; outfile defaults to infile with
+    a \file{.Rc} extension in place of any existing extension.}
   \item{ascii}{logical; should the compiled file be saved in ascii format?}
-  \item{verbose}{logical; should the compiler show what is being compiled}
+  \item{verbose}{logical; should the compiler show what is being compiled?}
   \item{envir}{environment to evaluate loaded expressions in.}
   \item{chdir}{logical; change directory before evaluation?}
   \item{code}{byte code expression or compiled closure}
-  \item{e}{expression to compile}
-  \item{level}{integer; the JIT level to use}
-  \item{enable}{logical; enable compiling packages if \code{TRUE}}
-  \item{name}{character string; name of option to return}
-  \item{...}{named compiler options to set}
+  \item{e}{expression to compile.}
+  \item{level}{integer; the JIT level to use (\code{0} to \code{3}).}
+  \item{enable}{logical; enable compiling packages if \code{TRUE}.}
+  \item{name}{character string; name of option to return.}
+  \item{...}{named compiler options to set.}
 }
 \description{
-  These functions provide an interface to a byte code compiler for R.
+  These functions provide an interface to a byte code compiler for \R.
 }
 \details{
   The function \code{cmpfun} compiles the body of a closure and
@@ -54,7 +55,7 @@ setCompilerOptions(...)
   \code{compile} compiles an expression into a byte code object; the
   object can then be evaluated with \code{eval}.
 
-  \code{cmpfile} parses the expression in \code{infile}, compiles
+  \code{cmpfile} parses the expressions in \code{infile}, compiles
   them, and writes the compiled expressions to \code{outfile}.  If
   \code{outfile} is not provided, it is formed from \code{infile} by
   replacing or appending a \code{.Rc} suffix.
@@ -67,20 +68,27 @@ setCompilerOptions(...)
   that may be useful to give a hint of what is going on.
 
   \code{enableJIT} enables or disables just-in-time (JIT)
-  compilation. JIT is disabled if the argument is 0. If \code{enable} is
-  1 then closures are compiled before their first use.  If \code{enable}
-  is 2, then in addition closures are also compiled before they are
-  duplicated (useful for some packages, like \code{lattice}, that store
-  closures in lists).  If \code{enable} is 3 then in addition all loops
-  are compiled before they are executed.  JIT can also be enabled by
-  starting \R with the environment variable \code{R_ENABLE_JIT} set to
-  one of these values.
+  compilation. JIT is disabled if the argument is 0. If \code{level} is
+  1 then larger closures are compiled before their first use.  If
+  \code{level} is 2, then some small closures are also compiled before
+  their second use.  If \code{level} is 3 then in addition
+  all top level loops are compiled before they are executed.  JIT level
+  3 requires the compiler option \code{optimize} to be 2 or 3.  The JIT
+  level can also be selected by starting \R with the environment
+  variable \code{R_ENABLE_JIT} set to one of these values. Calling
+  \code{enableJIT} with a negative argument returns the current JIT
+  level. The default JIT level is \code{3}.
 
   \code{compilePKGS} enables or disables compiling packages when they
-  are installed.  This requires that the package use lazy loading as
+  are installed.  This requires that the package uses lazy loading as
   compilation occurs as functions are written to the lazy loading data
   base. This can also be enabled by starting \R with the environment
-  variable \code{R_COMPILE_PKGS} set to a positive integer value.
+  variable \code{_R_COMPILE_PKGS_} set to a positive integer value.
+  This should not be enabled outside package installation, because it
+  causes any serialized function to be compiled, which comes with
+  time and space overhead. \code{R_COMPILE_PKGS} can be used, instead,
+  to instruct \code{INSTALL} to enable/disable compilation of packages
+  during installation.
 
   Currently the compiler warns about a variety of things.  It does
   this by using \code{cat} to print messages.  Eventually this should
@@ -89,18 +97,20 @@ setCompilerOptions(...)
   The \code{options} argument can be used to control compiler operation.
   There are currently three options: \code{optimize},
   \code{suppressAll}, and \code{suppressUndefined}. \code{optimize}
-  specifies the optimization level, which can be an integer form 0 to 3.
-  \code{suppressAll} should be a scalar logical; if \code{TRUE} no
-  messages will be shown. \code{suppressUndefined} can be \code{TRUE} to
-  suppress all messages about undefined variables, or it can be a
-  character vector of the names of variables for which messages should
-  not be shown.
+  specifies the optimization level, an integer from \code{0} to \code{3}
+  (the current out-of-the-box default is \code{2}).  \code{suppressAll}
+  should be a scalar logical; if \code{TRUE} no messages will be
+  shown. \code{suppressUndefined} can be \code{TRUE} to suppress all
+  messages about undefined variables, or it can be a character vector of
+  the names of variables for which messages should not be shown.
 
   \code{getCompilerOption} returns the value of the specified option.
   The default value is returned unless a value is supplied in the
   \code{options} argument; the \code{options} argument is primarily for
   internal use.  \code{setCompilerOption} sets the default option
-  values. It returns a named list of the previous values.
+  values. Options to set are identified by argument names, e.g.
+  \code{setCompilerOptions(suppressAll = TRUE, optimize = 3)}.
+  It returns a named list of the previous values.
 
   Calling the compiler a byte code compiler is actually a bit of a
   misnomer: the external representation of code objects currently uses
@@ -110,6 +120,7 @@ setCompilerOptions(...)
 \author{Luke Tierney}
 
 \examples{
+oldJIT <- enableJIT(0)
 # a simple example
 f <- function(x) x+1
 fc <- cmpfun(f)
@@ -170,5 +181,6 @@ for (i in 1:1000) la1(y, is.null)
 for (i in 1:1000) la1c(y, is.null)
 for (i in 1:1000) la2(y, is.null)
 for (i in 1:1000) la2c(y, is.null)
-}}
+}
+enableJIT(oldJIT)}
 \keyword{programming}
diff --git a/src/library/compiler/noweb/compiler.nw b/src/library/compiler/noweb/compiler.nw
index 3600b34..8f039b3 100644
--- a/src/library/compiler/noweb/compiler.nw
+++ b/src/library/compiler/noweb/compiler.nw
@@ -1,4 +1,4 @@
-% -*- Mode: Noweb; noweb-code-mode: R-mode -*-
+% -*- mode: ess-noweb; ess-noweb-code-mode: R-mode -*-
 
 \documentclass[11pt]{article}
 \usepackage{hyperref}
@@ -134,23 +134,28 @@ installed or for just-in-time (JIT) compilation of functions or
 expressions.  The mechanism for enabling these is experimental and
 likely to change.
 
-For now, compilation of packages requires the use of lazy loading and
-can be enabled either by calling [[compilePKGS]] with argument
-[[TRUE]] or by starting R with the environment variable
-[[R_COMPILE_PKGS]] set to a positive integer value.  In a UNIX-like
-environment, for example, installing a package with
+For now, compilation of packages requires the use of lazy loading and can be
+enabled either by calling [[compilePKGS]] with argument [[TRUE]] or by
+starting R with the environment variable [[_R_COMPILE_PKGS_]] set to a
+positive integer value.  These settings are used internally during R build
+to compile the base package (and tools, utils, methods, etc) and by
+[[R CMD INSTALL]].
+Functions are compiled as they are written to the lazy loading database.
+Compilation of packages should only be enabled for that time, because it
+adds noticeable time and space overhead to any serialization.
+
+In a UNIX-like environment, for example, installing a package with
 \begin{verbatim}
 env R_COMPILE_PKGS=1 R CMD INSTALL foo.tar.gz
 \end{verbatim}
-will compile the functions in the package as they are written to the
-lazy loading data base.
+will internally enable package compilation using [[compilePKGS]].
 
 If R is installed from source then the base and required packages can
 be compiled on installation using
 \begin{verbatim}
 make bytecode
 \end{verbatim}
-This does not require setting the [[R_COMPILE_PKGS]] environment variable.
+This does not require setting the [[_R_COMPILE_PKGS_]] environment variable.
 
 JIT compilation can be enabled from within R by calling [[enableJIT]]
 with a non-negative integer argument or by starting R with the
@@ -185,14 +190,23 @@ well as various compiler option settings.
 
 The simplest function in the top level compiler interface is the
 function [[compile]].  This function requires an expression argument
-and takes two optional arguments: an environment and a list of
-options. The default environment is the global environment.
+and takes three optional arguments: an environment, a list of
+options and source code reference.  The default environment is the global
+environment. By default, the source reference argument is [[NULL]] and the
+source reference is taken from the [[srcref]] attribute of the expression
+argument.
 <<[[compile]] function>>=
-compile <- function(e, env = .GlobalEnv, options = NULL) {
+compile <- function(e, env = .GlobalEnv, options = NULL, srcref = NULL) {
     cenv <- makeCenv(env)
     cntxt <- make.toplevelContext(cenv, options)
     cntxt$env <- addCenvVars(cenv, findLocals(e, cntxt))
-    genCode(e, cntxt)
+    if (mayCallBrowser(e, cntxt))
+        ## NOTE: compilation will be attempted repeatedly
+        e
+    else if (is.null(srcref))
+        genCode(e, cntxt)
+    else
+        genCode(e, cntxt, loc = list(expr = e, srcref = srcref))
 }
 @ %def compile
 The supplied environment is converted into a compilation environment
@@ -205,13 +219,13 @@ Compilation environments are described in Section
 \ref{sec:environments} and compiler contexts in Section
 \ref{sec:contexts}. The [[genCode]] function is defined as
 <<[[genCode]] function>>=
-genCode <- function(e, cntxt, gen = NULL) {
-    cb <- make.codeBuf(e)
+genCode <- function(e, cntxt, gen = NULL, loc = NULL) {
+    cb <- make.codeBuf(e, loc)
     if (is.null(gen))
-        cmp(e, cb, cntxt)
+        cmp(e, cb, cntxt, setloc = FALSE)
     else
         gen(cb, cntxt)
-    codeBufCode(cb)
+    codeBufCode(cb, cntxt)
 }
 @ %def genCode
 [[genCode]] creates a code buffer, fills the code buffer, and then
@@ -220,7 +234,9 @@ the most common case [[genCode]] uses the low level recursive
 compilation function [[cmp]], described in Section \ref{subsec:cmp},
 to generate the code.  For added flexibility it can be given a
 generator function that emits code into the code buffer based on the
-provided context.  This is used in Section \ref{sec:loops} for ****.
+provided context.  This is used in Section \ref{sec:loops} for
+compilation of loop bodies in loops that require an explicit loop context
+(and a long jump in the byte-code interpreter).
 
 
 \subsection{Basic code buffer interface}
@@ -241,7 +257,7 @@ As an example, the [[GETVAR]] instruction takes one operand, the index
 in the constant pool of a symbol. The opcode for this instruction is
 [[GETVAR.OP]].  The instruction retrieves the symbol from the constant
 pool, looks up its value in the current environment, and pushes the
-value on the stack.  If [[sym]] is a variable with value a symbol,
+value on the stack.  If [[sym]] is a variable with value of a symbol,
 then code to enter the symbol in the constant pool and emit an
 instruction to get its value would be
 <<example of emitting a [[GETVAR]] instruction>>=
@@ -267,7 +283,7 @@ Otherwise it returns [[NULL]].  If constant folding is successful,
 then the result is compiled as a constant.  Otherwise, the standard
 code generation process is used.
 %% **** comment on alternative of doing constant folding as an
-%% **** optimization on the butecode or an intermediate representation?
+%% **** optimization on the bytecode or an intermediate representation?
 
 In the interpreter there are four types of objects that are not
 treated as constants, i.e. as evaluating to themselves: function calls
@@ -282,7 +298,7 @@ their own code generators.
 if (typeof(e) == "language")
     cmpCall(e, cb, cntxt)
 else if (typeof(e) == "symbol")
-    cmpSym(e, cb, cntxt)
+    cmpSym(e, cb, cntxt, missingOK)
 else if (typeof(e) == "bytecode")
     cntxt$stop(gettext("cannot compile byte code literals in code"),
                cntxt)
@@ -294,13 +310,19 @@ else
 @ 
 The function [[cmp]] is then defined as
 <<[[cmp]] function>>=
-cmp <- function(e, cb, cntxt) {
+cmp <- function(e, cb, cntxt, missingOK = FALSE, setloc = TRUE) {
+    if (setloc) {
+        sloc <- cb$savecurloc()
+        cb$setcurexpr(e)
+    }
     ce <- constantFold(e, cntxt)
     if (is.null(ce)) {
         <<generate code for expression [[e]]>>
     }
     else
         cmpConst(ce$value, cb, cntxt)
+    if (setloc)
+        cb$restorecurloc(sloc)
 }
 @ %def cmp
 The call code generator [[cmpCall]] will recursively call [[cmp]].
@@ -352,14 +374,12 @@ It might be useful to handle other constants in a similar way, such as
 %% **** check out if small integers is worth doing.
 %% **** mention peephole optimization as alternative
 
-Ideally the implementation should be able to mark the values in the
-constant pool of a byte code object as read-only by setting the
-[[NAMED]] field to 2, but experience in testing shows that there are
-several packages in the wild that assume that an expression [[TRUE]],
-for example, appearing in code will result in a freshly allocated
-value that can be freely modified in [[.C]] calls. It would be good to
-educate users not to do this, but for now the implementation
-duplicates all values as they are retrieved from the constant pool.
+The implementation marks values in the constant pool as read-only after they
+are loaded, by setting the [[NAMED]] field to 2. In the past, all values
+were duplicated as they were retrieved from the constant pool as a
+precaution against bad package code: several packages in the wild assumed
+that an expression [[TRUE]], for example, appearing in code would result in a
+freshly allocated value that could be freely modified in [[.C]] calls.
 
 
 \subsection{Compiling variable references}
@@ -450,8 +470,6 @@ then this may be effective.
 %% **** Neal's em by about 10% (just lookup, not assignment -- with
 %% **** assignment should be a bit better)
 
-%% **** Avoid using ftype variable in bcEval. Could just look at the
-%% **** fun on the stack, or use the intstack instead.
 %% **** Is it really necessary for bcEval to save/restore stack tops?
 %% **** Shouldn't that happen automatically?
 %% **** Is it possible to have closure calling stay in the same bc?
@@ -528,12 +546,14 @@ cmpCallExprFun <- function(fun, args, call, cb, cntxt) {
 The actual definition of [[cmpCall]] is a bit more complex than the
 simplified one given above:
 <<[[cmpCall]] function>>=
-cmpCall <- function(call, cb, cntxt) {
+cmpCall <- function(call, cb, cntxt, inlineOK = TRUE) {
+    sloc <- cb$savecurloc()
+    cb$setcurexpr(call)
     cntxt <- make.callContext(cntxt, call)
     fun <- call[[1]]
     args <- call[-1]
     if (typeof(fun) == "symbol") {
-        if (! tryInline(call, cb, cntxt)) {
+        if (! (inlineOK && tryInline(call, cb, cntxt))) {
             <<check the call to a symbol function>>
 	    cmpCallSymFun(fun, args, call, cb, cntxt)
         }
@@ -542,14 +562,16 @@ cmpCall <- function(call, cb, cntxt) {
         <<hack for handling [[break()]] and [[next()]] expressions>>
         cmpCallExprFun(fun, args, call, cb, cntxt)
     }
+    cb$restorecurloc(sloc)
 }
 @ %def cmpCall
 The main addition is the use of a [[tryInline]] function which tries
-to generate more efficient code for particular functions.  This
-function returns [[TRUE]] if it has handled code generation and
-[[FALSE]] if it has not.  Code will be generated by the inline
-mechanism if inline handlers for the particular function are available
-and the optimization level permits their use.  Details of the inlining
+to generate more efficient code for particular functions.  The
+[[inlineOK]] argument can be used to disable inlining. This function
+returns [[TRUE]] if it has handled code generation and [[FALSE]] if it
+has not.  Code will be generated by the inline mechanism if inline
+handlers for the particular function are available and the
+optimization level permits their use.  Details of the inlining
 mechanism are given in Section \ref{sec:inlining}.
 
 In addition to the inlining mechanism, some checking of the call is
@@ -567,23 +589,20 @@ else {
 @ 
 and [[checkCall]] is defined as
 <<[[checkCall]] function>>=
-## **** clean up to use tryCatch
 ## **** figure out how to handler multi-line deparses
 ## ****     e.g. checkCall(`{`, quote({}))
 ## **** better design would capture error object, wrap it up, and pass it on
+## **** use approach from codetools to capture partial argument match
+## ****     warnings if enabled?
 checkCall <- function(def, call, signal = warning) {
     if (typeof(def) %in% c("builtin", "special"))
         def <- args(def)
     if (typeof(def) != "closure" || any.dots(call))
         NA
     else {
-        old <-options()$show.error.messages
-        if (is.null(old)) old <- TRUE
-        options(show.error.messages=FALSE)
-        msg <- try({match.call(def, call); NULL})
-        options(show.error.messages=old)
+        msg <- tryCatch({match.call(def, call); NULL},
+                        error = function(e) conditionMessage(e))
         if (! is.null(msg)) {
-            msg <- sub("\n$", "", sub("^E.*: ", "", msg))
             emsg <- gettextf("possible error in '%s': %s",
                              deparse(call, 20)[1], msg)
             if (! is.null(signal)) signal(emsg)
@@ -688,7 +707,7 @@ though it is not clean how much this would gain.
 <<compile a general argument>>=
 else {
     if (is.symbol(a) || typeof(a) == "language") {
-        ci <- cb$putconst(genCode(a, pcntxt))
+        ci <- cb$putconst(genCode(a, pcntxt, loc = cb$savecurloc()))
         cb$putcode(MAKEPROM.OP, ci)
     }
     else
@@ -798,7 +817,8 @@ addition, the expression to be compiled into the code buffer is stored
 as the first constant in the constant pool; this can be used to
 retrieve the source code for a compiled expression.
 <<[[make.codeBuf]] function>>=
-make.codeBuf <- function(expr) {
+make.codeBuf <- function(expr, loc = NULL) {
+    <<source location tracking implementation>>
     <<instruction stream buffer implementation>>
     <<constant pool buffer implementation>>
     <<label management interface>>
@@ -808,8 +828,15 @@ make.codeBuf <- function(expr) {
                putconst = putconst,
                makelabel = makelabel,
                putlabel = putlabel,
-	       patchlabels = patchlabels)
+	       patchlabels = patchlabels,
+               setcurexpr = setcurexpr,
+               setcurloc = setcurloc,
+               commitlocs = commitlocs,
+               savecurloc = savecurloc,
+               restorecurloc = restorecurloc)
     cb$putconst(expr) ## insert expression as first constant.
+      ## NOTE: this will also insert the srcref directly into the constant
+      ## pool
     cb
 }
 @ %def make.codeBuf
@@ -827,13 +854,29 @@ codeCount <- 1
 putcode <- function(...) {
     new <- list(...)
     newLen <- length(new)
-    while (codeCount + newLen > length(codeBuf))
+    while (codeCount + newLen > length(codeBuf)) {
         codeBuf <<- c(codeBuf, vector("list", length(codeBuf)))
-    codeBuf[(codeCount + 1) : (codeCount + newLen)] <<- new
+        if (exprTrackingOn)
+            exprBuf <<- c(exprBuf, vector("integer", length(exprBuf)))
+        if (srcrefTrackingOn)
+            srcrefBuf <<- c(srcrefBuf, vector("integer", length(srcrefBuf)))
+    }
+    codeRange <- (codeCount + 1) : (codeCount + newLen)
+    codeBuf[codeRange] <<- new
+
+    if (exprTrackingOn) {   ## put current expression into the constant pool
+        ei <- putconst(curExpr)
+        exprBuf[codeRange] <<- ei
+    }
+    if (srcrefTrackingOn) { ## put current srcref into the constant pool
+        si <- putconst(curSrcref)
+        srcrefBuf[codeRange] <<- si
+    }
+
     codeCount <<- codeCount + newLen
 }
 getcode <- function() as.integer(codeBuf[1 : codeCount])
-@ 
+@ %def
 
 The constant pool is accumulated into a list buffer.  The zero-based
 index of the constant in the pool is returned by the insertion
@@ -857,6 +900,116 @@ getconst <- function()
     .Internal(getconst(constBuf, constCount))
 @ %def
 
+The compiler maintains a mapping from code to source locations. For each
+value in the code buffer (instruction and operand) there is a source code
+reference ([[srcref]]) and the corresponding expression (AST).  The code
+buffer implementation remembers the current location (source reference and
+expression), which can be set by [[setcurloc]], [[setcurexpr]] or
+[[restorecurloc]] and retrieved by [[savecurloc]].  In addition to emitting
+code, [[putconst]] also copies the current location information into the
+constant pool and records the resulting constant indices in a source
+reference buffer and expression buffer.  When the final code is extracted
+using [[codeBufCode]], the source reference and expression buffers are
+copied into the constant pool as vectors indexed by code offset (program
+counter).
+<<source location tracking functions>>=
+extractSrcref <- function(sref, idx) {
+    if (is.list(sref) && length(sref) >= idx)
+        sref <- sref[[idx]]
+    else if (is.integer(sref) && length(sref) >= 6)
+        sref
+    else
+        NULL
+}
+getExprSrcref <- function(expr) {
+    sattr <- attr(expr, "srcref")
+    extractSrcref(sattr, 1)
+}
+# if block is a block srcref, get its idx'th entry
+# if block is a single srcref, return this srcref
+getBlockSrcref <- function(block, idx) {
+  extractSrcref(block, idx)
+}
+@ %def
+
+<<source location tracking implementation>>=
+exprTrackingOn <- TRUE
+srcrefTrackingOn <- TRUE
+
+if (is.null(loc)) {
+    curExpr <- expr
+    curSrcref <- getExprSrcref(expr)
+} else {
+    curExpr <- loc$expr
+    curSrcref <- loc$srcref
+}
+
+if (is.null(curSrcref))
+    ## when top-level srcref is null, we speculate there will be no
+    ##   source references within the compiled expressions either,
+    ##   disabling the tracking makes the resulting constant pool
+    ##   smaller
+    srcrefTrackingOn <- FALSE
+
+exprBuf <- NA   ## exprBuf will have the same length as codeBuf
+srcrefBuf <- NA ## srcrefBuf will have the same length as codeBuf
+
+if (!exprTrackingOn) {
+    curExpr <- NULL
+    exprBuf <- NULL
+}
+if (!srcrefTrackingOn) {
+    curSrcref <- NULL
+    srcrefBuf <- NULL
+}
+
+## set the current expression
+## also update the srcref according to expr, if expr has srcref attribute
+##   (note: never clears current srcref)
+setcurexpr <- function(expr) {
+    if (exprTrackingOn) {
+        curExpr <<- expr
+    }
+    if (srcrefTrackingOn) {
+        sref <- getExprSrcref(expr)
+        if (!is.null(sref) && srcrefTrackingOn)
+            curSrcref <<- sref
+     }
+}
+## unconditionally sets the current expression and srcrefs
+setcurloc <- function(expr, sref) {
+    if (exprTrackingOn)
+        curExpr <<- expr
+    if (srcrefTrackingOn)
+        curSrcref <<- sref
+}
+## add location information (current expressions, srcrefs) to the constant pool
+commitlocs <- function() {
+    if (exprTrackingOn) {
+      exprs <- exprBuf[1:codeCount]
+      class(exprs) <- "expressionsIndex"
+      putconst(exprs)
+    }
+
+    if (srcrefTrackingOn) {
+      srefs <- srcrefBuf[1:codeCount]
+      class(srefs) <- "srcrefsIndex"
+      putconst(srefs)
+    }
+
+    ## these entries will be at the end of the constant pool, assuming only the compiler
+    ## uses these two classes
+    NULL
+}
+savecurloc <- function() {
+    list(expr = curExpr, srcref = curSrcref)
+}
+restorecurloc <- function(saved) {
+    if (exprTrackingOn) curExpr <<- saved$expr
+    if (srcrefTrackingOn) curSrcref <<- saved$srcref
+}
+@ %def
+
 
 Labels are used for identifying targets for branching instruction.  The
 label management interface creates new labels with [[makelabel]] as
@@ -874,14 +1027,14 @@ putlabel <- function(name) labels[[name]] <<- codeCount
 Once code generation is complete the symbolic labels in the code
 stream need to be converted to numerical offset values.  This is done
 by [[patchlabels]].  Labels can appear directly in the instruction
-stream os in lists that have been placed in the instruction stream;
+stream and in lists that have been placed in the instruction stream;
 this is used for the [[SWITCH]] instruction.
 <<label management interface>>=
-patchlabels <- function() {
+patchlabels <- function(cntxt) {
     offset <- function(lbl) {
         if (is.null(labels[[lbl]]))
-            stop(gettextf("no offset recorded for label \"%s\"", lbl),
-                 domain = NA)
+            cntxt$stop(gettextf("no offset recorded for label \"%s\"", lbl),
+                       cntxt)
         labels[[lbl]]
     }
     for (i in 1 : codeCount) {
@@ -900,8 +1053,9 @@ patchlabels <- function() {
 The contents of the code buffer is extracted into a code object by
 calling [[codeBufCode]]:
 <<[[codeBufCode]] function>>=
-codeBufCode <- function(cb) {
-    cb$patchlabels()
+codeBufCode <- function(cb, cntxt) {
+    cb$patchlabels(cntxt)
+    cb$commitlocs()
     .Internal(mkCode(cb$code(), cb$const()))
 }
 @ %def codeBufCode
@@ -1057,7 +1211,7 @@ be suppressed.
 <<compiler options data base>>=
 compilerOptions <- new.env(hash = TRUE, parent = emptyenv())
 compilerOptions$optimize <- 2
-compilerOptions$suppressAll <- FALSE
+compilerOptions$suppressAll <- TRUE
 compilerOptions$suppressUndefined <-
     c(".Generic", ".Method", ".Random.seed", ".self")
 @ %def compilerOptions
@@ -1219,6 +1373,40 @@ notifyMultipleSwitchDefaults <- function(ndflt, cntxt)
                    cntxt)
 @ %def notifyMultipleSwitchDefaults
 
+<<[[notifyNoSwitchcases]] function>>=
+notifyNoSwitchcases <- function(cntxt)
+    if (! suppressAll(cntxt))
+        cntxt$warn(gettext("'switch' with no alternatives"), cntxt)
+@ %def notifyNoSwitchcases
+
+The compiler signals when it encounters that a special syntactic function,
+such as [[for]], has been assigned to.
+<<[[notifyAssignSyntacticFun]] function>>=
+notifyAssignSyntacticFun <- function(funs, cntxt) {
+    if (! suppressAll(cntxt)) {
+        msg <- ngettext(length(funs),
+            "local assignment to syntactic function: ",
+            "local assignments to syntactic functions: ")
+        cntxt$warn(paste(msg, paste(funs, collapse = ", ")), cntxt)
+    }
+}
+@ %def notifyAssignSyntacticFun
+
+When the compiler encounters an error during JIT or package
+compilation, it catches the error and returns the original uncompiled
+code letting the AST interpreter handle it. This can happen due to a
+compiler bug or when the code being compiled violates certain
+assumptions made by the compiler (such as a certain discipline on
+frame types in the evaluation environment, as checked in
+[[frameTypes]]). The compiler will notify about catching such errors
+via [[notifyCompilerError]].
+
+<<[[notifyCompilerError]] function>>=
+notifyCompilerError <- function(msg)
+    if (!compilerOptions$suppressAll)
+        cat(paste(gettext("Error: compilation failed - "), msg, "\n"))
+@ %def notifyCompilerError
+
 
 \section{Compilation environments}
 \label{sec:environments}
@@ -1475,50 +1663,46 @@ environment.
 A simple approach for identifying all local variables created within
 an expression is given by
 <<findlocals0>>=
-findLocals0 <- function(e) {
+findLocals0 <- function(e, cntxt) {
     if (typeof(e) == "language") {
         if (typeof(e[[1]]) %in% c("symbol", "character"))
             switch(as.character(e[[1]]),
                    <<[[findLocals0]] switch clauses>>
-                   findLocalsList0(e[-1]))
-         else findLocalsList0(e)
+                   findLocalsList0(e[-1], cntxt))
+         else findLocalsList0(e, cntxt)
     }
     else character(0)
 }
 
-findLocalsList0 <- function(elist)
-    unique(unlist(lapply(elist, findLocals0)))
+findLocalsList0 <- function(elist, cntxt)
+    unique(unlist(lapply(elist, findLocals0, cntxt)))
 @ %def findLocals0 findLocalsList0
 
 For assignment expressions the assignment variable is added to any
 variables found in the value expression.
 <<[[findLocals0]] switch clauses>>=
 "=" =,
-"<-" = unique(c(getAssignedVar(e),
-                findLocalsList0(e[-1]))),
+"<-" = unique(c(getAssignedVar(e, cntxt),
+                findLocalsList0(e[-1], cntxt))),
 @ %def
 The assigned variable is determined by [[getAssignedVar]]:
 <<[[getAssignedVar]] function>>=
-getAssignedVar <- function(e) {
+getAssignedVar <- function(e, cntxt) {
     v <- e[[2]]
     if (missing(v))
-        stop(gettextf("bad assignment: %s", pasteExpr(e)),
-             domain = NA)
+        cntxt$stop(gettextf("bad assignment: %s", pasteExpr(e)), cntxt)
     else if (typeof(v) %in% c("symbol", "character"))
         as.character(v)
     else {
         while (typeof(v) == "language") {
             if (length(v) < 2)
-                stop(gettextf("bad assignment: %s", pasteExpr(e)),
-                     domain = NA)
+                cntxt$stop(gettextf("bad assignment: %s", pasteExpr(e)), cntxt)
             v <- v[[2]]
             if (missing(v))
-                stop(gettextf("bad assignment: %s", pasteExpr(e)),
-                     domain = NA)
+                cntxt$stop(gettextf("bad assignment: %s", pasteExpr(e)), cntxt)
         }
         if (typeof(v) != "symbol")
-            stop(gettextf("bad assignment: %s", pasteExpr(e)),
-                 domain = NA)
+            cntxt$stop(gettextf("bad assignment: %s", pasteExpr(e)), cntxt)
         as.character(v)
     }
 }
@@ -1528,7 +1712,7 @@ For [[for]] loops the loop variable is added to any variables found in
 the sequence and body expressions.
 <<[[findLocals0]] switch clauses>>=
 "for" = unique(c(as.character(e[2]),
-                 findLocalsList0(e[-2]))),
+                 findLocalsList0(e[-2], cntxt))),
 @ %def
 
 The variable in [[assign]] and [[delayedAssign]] expressions is
@@ -1539,8 +1723,8 @@ environment argument.
 "assign" = if (length(e) == 3 &&
                is.character(e[[2]]) &&
                length(e[[2]]) == 1)
-               c(e[[2]], findLocals0(e[[3]], shadowed))
-           else findLocalsList1(e[1], shadowed),
+               c(e[[2]], findLocals0(e[[3]], cntxt))
+           else findLocalsList0(e[1], cntxt),
 @ %def
 
 Variables defined within local functions created by [[function]]
@@ -1557,7 +1741,7 @@ evaluate their arguments and so do not contribute new local variables.
 "function" = character(0),
 "~" = character(0),
 "local" = if (length(e) == 2) character(0)
-          else findLocalsList0(e[-1]),
+          else findLocalsList0(e[-1], cntxt),
 "expression" =,
 "quote" = character(0),
 @ %def findLocals0
@@ -1575,38 +1759,38 @@ surrounding function.  To allow for this we can add an optional
 variable [[shadowed]] for providing a character vector of names of
 variables with shadowing local definitions.
 <<[[findLocals1]] function>>=
-findLocals1 <- function(e, shadowed = character(0)) {
+findLocals1 <- function(e, shadowed = character(0), cntxt) {
     if (typeof(e) == "language") {
         if (typeof(e[[1]]) %in% c("symbol", "character")) {
             v <- as.character(e[[1]])
             switch(v,
                    <<[[findLocals1]] switch clauses>>
-                   findLocalsList1(e[-1], shadowed))
+                   findLocalsList1(e[-1], shadowed, cntxt))
         }
-         else findLocalsList1(e, shadowed)
+         else findLocalsList1(e, shadowed, cntxt)
     }
     else character(0)
 }
 @ %def findLocals1 
 %% **** merge into single chunk??
 <<[[findLocalsList1]] function>>=
-findLocalsList1 <- function(elist, shadowed)
-    unique(unlist(lapply(elist, findLocals1, shadowed)))
+findLocalsList1 <- function(elist, shadowed, cntxt)
+    unique(unlist(lapply(elist, findLocals1, shadowed, cntxt)))
 @ %def findLocalsList1
 The handling of assignment operators, [[for]] loops, [[function]] and
 [[~]] expressions is analogous to the approach in [[findLocals0]].
 <<[[findLocals1]] switch clauses>>=
 "=" =,
-"<-" = unique(c(getAssignedVar(e),
-                findLocalsList1(e[-1], shadowed))),
+"<-" = unique(c(getAssignedVar(e, cntxt),
+                findLocalsList1(e[-1], shadowed, cntxt))),
 "for" = unique(c(as.character(e[2]),
-                 findLocalsList1(e[-2], shadowed))),
+                 findLocalsList1(e[-2], shadowed, cntxt))),
 "delayedAssign" =,
 "assign" = if (length(e) == 3 &&
                is.character(e[[2]]) &&
                length(e[[2]]) == 1)
-               c(e[[2]], findLocals1(e[[3]], shadowed))
-           else findLocalsList1(e[1], shadowed),
+               c(e[[2]], findLocals1(e[[3]], shadowed, cntxt))
+           else findLocalsList1(e[1], shadowed, cntxt),
 "function" = character(0),
 "~" = character(0),
 @ %def
@@ -1616,11 +1800,11 @@ definitions.
 <<[[findLocals1]] switch clauses>>=
 "local" = if (! v %in% shadowed && length(e) == 2)
               character(0)
-          else findLocalsList1(e[-1], shadowed),
+          else findLocalsList1(e[-1], shadowed, cntxt),
 "expression" =,
 "quote" = if (! v %in% shadowed)
               character(0)
-          else findLocalsList1(e[-1], shadowed),
+          else findLocalsList1(e[-1], shadowed, cntxt),
 @ %def
 The assignment functions could also be shadowed, but this is not very
 common, and assuming that they are not errs in the conservative
@@ -1646,7 +1830,6 @@ not to be shadowed.  This can be iterated to convergence.  It is also
 useful to check before returning whether any of the syntactically
 special variables has been assigned to.  If so, so a warning is
 issued.
-%% **** allow overriding of the warning function by cntxt?
 %% **** look into speeding up findLocalsList
 <<[[findLocalsList]] function>>=
 findLocalsList <- function(elist, cntxt) {
@@ -1656,7 +1839,7 @@ findLocalsList <- function(elist, cntxt) {
     sf <- initialShadowedFuns
     nsf <- length(sf)
     repeat {
-        vals <- findLocalsList1(elist, sf)
+        vals <- findLocalsList1(elist, sf, cntxt)
         redefined <- sf %in% vals
         last.nsf <- nsf
         sf <- unique(c(shadowed, sf[redefined]))
@@ -1664,13 +1847,8 @@ findLocalsList <- function(elist, cntxt) {
         ## **** need to fix the termination condition used in codetools!!!
         if (last.nsf == nsf) {
             rdsf <- vals %in% specialSyntaxFuns
-            if (any(rdsf)) {
-                msg <- ngettext(sum(rdsf),
-                                "local assignment to syntactic function: ",
-                                "local assignments to syntactic functions: ")
-                warning(msg, paste(vals[rdsf], collapse = ", "),
-                        domain = NA)
-            }
+            if (any(rdsf))
+                notifyAssignSyntacticFun(vals[rdsf], cntxt)
             return(vals)
         }
     }
@@ -1732,7 +1910,10 @@ optimization settings.  There are four possible optimization levels:
 \item[Level 2:] In addition to the inlining permitted by Level 1,
   functions that are syntactically special or are considered core
   language functions and are found via the global environment at
-  compile time may be inlined.
+  compile time may be inlined. Other functions in the base packages
+  found via the global environment may be inlined with a guard that
+  ensures at runtime that the inlined function has not been masked;
+  if it has, then the call in handled by the AST interpreter.
 \item[Level 3:] Any function in the base packages found via the global
   environment may be inlined.
   %% **** should there be an explicit list of functions where inlining
@@ -1767,24 +1948,48 @@ returns [[FALSE]].
 <<[[tryInline]] function>>=
 tryInline <- function(e, cb, cntxt) {
     name <- as.character(e[[1]])
-    info <- getInlineInfo(name, cntxt)
+    info <- getInlineInfo(name, cntxt, guardOK = TRUE)
     if (is.null(info))
         FALSE
     else {
         h <- getInlineHandler(name, info$package)
-        if (! is.null(h))
-            h(e, cb, cntxt)
+        if (! is.null(h)) {
+            if (info$guard) {
+	        <<inline with a guard instruction>>
+            }
+            else h(e, cb, cntxt)
+	}
         else FALSE
     }
 }
 @ %def tryInline
+If a guard instruction is needed then the instruction is emitted that
+will check validity of the inlined function at runtime; if the inlined
+code is not valid the guard instruction will evaluate the call in the
+AST interpreter and jump over the inlined code. The inlined code is
+handled as a non-tail-call; if the call is in tail position, then a
+return instruction is emitted.
+<<inline with a guard instruction>>=
+tailcall <- cntxt$tailcall
+if (tailcall) cntxttailcall <- FALSE
+expridx <- cb$putconst(e)
+endlabel <- cb$makelabel()
+cb$putcode(BASEGUARD.OP, expridx, endlabel)
+if (! h(e, cb, cntxt))
+    cmpCall(e, cb, cntxt, inlineOK = FALSE)
+cb$putlabel(endlabel)
+if (tailcall) cb$putcode(RETURN.OP)
+TRUE
+@ 
 
 The function [[getInlineInfo]] implements the optimization rules
 described at the beginning of this section.
 <<[[getInlineInfo]] function>>=
-getInlineInfo <- function(name, cntxt) {
+noInlineSymbols <- c("standardGeneric")
+
+getInlineInfo <- function(name, cntxt, guardOK = FALSE) {
     optimize <- cntxt$optimize
-    if (optimize > 0) {
+    if (optimize > 0 && ! (name %in% noInlineSymbols)) {
         info <- findCenvVar(name, cntxt$env)
         if (is.null(info))
             NULL
@@ -1793,15 +1998,23 @@ getInlineInfo <- function(name, cntxt) {
             frame <- info$frame
             if (ftype == "namespace") {
                 <<fixup for a namespace import frame>>
-                info$package <- nsName(findHomeNS(name, frame))
+                info$package <- nsName(findHomeNS(name, frame, cntxt))
+		info$guard <- FALSE
                 info
             }
             else if (ftype == "global" &&
                      (optimize >= 3 ||
                       (optimize >= 2 && name %in% languageFuns))) {
                 info$package <- packFrameName(frame)
+		info$guard <- FALSE
                 info
             }
+            else if (guardOK && ftype == "global" &&
+                     packFrameName(frame) == "base") {
+                info$package <- packFrameName(frame)
+                info$guard <- TRUE
+                info
+            }                
             else NULL
         }
     }
@@ -1876,8 +2089,8 @@ specialized handlers for a range of functions that are installed in
 place of the default ones.
 <<install default inlining handlers>>=
 local({
-    <<install default [[BUILTIN]] handlers>>
     <<install default [[SPECIAL]] handlers>>
+    <<install default [[BUILTIN]] handlers>>
 })
 @ 
 The handler installations are wrapped in a [[local]] call to reduce
@@ -1992,11 +2205,9 @@ makes the code a bit cleaner.
 Default handlers for all [[BUILTIN]] functions in the [[base]] package
 are installed programmatically by
 <<install default [[BUILTIN]] handlers>>=
-basevars <- ls('package:base', all = TRUE)
-types <- sapply(basevars, function(n) typeof(get(n)))
-for (s in basevars[types == "special"])
-    if (! haveInlineHandler(s, "base"))
-        setInlineHandler(s, cmpSpecial)
+for (b in basevars[types == "builtin"])
+    if (! haveInlineHandler(b, "base"))
+        setInlineHandler(b, cmpBuiltin)
 @ %def
 
 
@@ -2019,9 +2230,11 @@ cmpSpecial <- function(e, cb, cntxt) {
 This handler is installed for all [[SPECIAL]] functions in the base
 package with
 <<install default [[SPECIAL]] handlers>>=
-for (b in basevars[types == "builtin"])
-    if (! haveInlineHandler(b, "base"))
-        setInlineHandler(b, cmpBuiltin)
+basevars <- ls('package:base', all = TRUE)
+types <- sapply(basevars, function(n) typeof(get(n)))
+for (s in basevars[types == "special"])
+    if (! haveInlineHandler(s, "base"))
+        setInlineHandler(s, cmpSpecial)
 @ %def
 
 
@@ -2046,14 +2259,21 @@ setInlineHandler("{", function(e, cb, cntxt) {
     if (n == 1)
         cmp(NULL, cb, cntxt)
     else {
+        sloc <- cb$savecurloc()
+        bsrefs <- attr(e, "srcref")
         if (n > 2) {
             ncntxt <- make.noValueContext(cntxt)
             for (i in 2 : (n - 1)) {
-                cmp(e[[i]], cb, ncntxt)
+                subexp <- e[[i]]
+                cb$setcurloc(subexp, getBlockSrcref(bsrefs, i))
+                cmp(subexp, cb, ncntxt, setloc = FALSE)
                 cb$putcode(POP.OP)
             }
         }
-        cmp(e[[n]], cb, cntxt)
+        subexp <- e[[n]]
+        cb$setcurloc(subexp, getBlockSrcref(bsrefs, n))
+        cmp(subexp, cb, cntxt, setloc = FALSE)
+        cb$restorecurloc(sloc)
     }
     TRUE
 })
@@ -2073,9 +2293,12 @@ versions of the compiler.
 setInlineHandler("function", function(e, cb, cntxt) {
     forms <- e[[2]]
     body <- e[[3]]
+    sref <- e[[4]]
     ncntxt <- make.functionContext(cntxt, forms, body)
-    cbody <- genCode(body, ncntxt)
-    ci <- cb$putconst(list(forms, cbody))
+    if (mayCallBrowser(body, cntxt))
+        return(FALSE)
+    cbody <- genCode(body, ncntxt, loc = cb$savecurloc())
+    ci <- cb$putconst(list(forms, cbody, sref))
     cb$putcode(MAKECLOSURE.OP, ci)
     if (cntxt$tailcall) cb$putcode(RETURN.OP)
     TRUE
@@ -2139,19 +2362,23 @@ One frequently used [[SPECIAL]] function is [[.Internal]]. When the
 compile the call as for a [[BUILTIN]] function.  For [[.Internal]]
 functions of type [[SPECIAL]] there is less of an advantage, and so
 the [[.Internal]] expression is compiled with [[cmpSpecial]].  It may
-be useful to use introduce a [[GETINTLSPECIAL]] instruction and handle
-these analogously to [[.Internal]] functions of type [[BUILTIN]].
+be useful to introduce a [[GETINTLSPECIAL]] instruction and handle
+these analogously to [[.Internal]] functions of type [[BUILTIN]].  The
+handler is assigned to the variable [[cmpDotInternalCall]] to allow
+its use in inlining.
 %% **** look into adding GETINTLSPECIAL??
 <<inlining handler for [[.Internal]]>>=
-setInlineHandler(".Internal", function(e, cb, cntxt) {
+cmpDotInternalCall <- function(e, cb, cntxt) {
     ee <- e[[2]]
     sym <- ee[[1]]
     if (.Internal(is.builtin.internal(sym)))
         cmpBuiltin(ee, cb, cntxt, internal = TRUE)
     else
         cmpSpecial(e, cb, cntxt)
-})
-@ %def
+}
+
+setInlineHandler(".Internal", cmpDotInternalCall)
+@ %def cmpDotInternalCall
 
 
 \subsection{The [[local]] function}
@@ -2167,21 +2394,41 @@ essentially the same as
 (function() expr)()
 \end{verbatim}
 There may be some minor differences related to what the [[sys.xyz]]
-functions return but these do not seem to be important. So the
-compiler handles one argument [[local]] calls by making this
+functions return. An instance of this was found in the [[RefManageR]]
+package which used [[parent.frame(2)]] to access the environment from which
+[[local]] was invoked. In this case, the use of [[parent.frame]] was
+unnecessary (and [[local]] was not needed either); the maintainer
+accepted a patch fixing this. The code pattern in the package was
+\begin{verbatim}
+MakeBibLaTeX <- function(docstyle = "text") local({
+  docstyle <- get("docstyle", parent.frame(2))
+  sortKeys <- function() 42
+  environment()
+})
+\end{verbatim}
+and the suggested fix was
+\begin{verbatim}
+MakeBibLaTeX <- function(docstyle = "text") {
+  sortKeys <- function() 42
+  environment()
+}
+\end{verbatim}
+So the compiler handles one argument [[local]] calls by making this
 conversion and compiling the result.
 %% **** add to language manual?
 <<inlining handler for [[local]] function>>=
 setInlineHandler("local", function(e, cb, cntxt) {
     if (length(e) == 2) {
-        ee <- as.call(list(as.call(list(as.name("function"), NULL, e[[2]]))))
+        ee <- as.call(list(as.call(list(
+            as.name("function"), NULL, e[[2]], NULL))))
         cmp(ee, cb, cntxt)
         TRUE
     }
     else FALSE
 })
 @ %def
-
+The interpreter couls, and probably should, be modified to handle this
+case of a [[local]] call expression in the same way as the compiler.
 
 \subsection{The [[return]] function}
 \label{subsec:return}
@@ -2433,9 +2680,22 @@ context for each loop, and [[break]] and [[next]] use [[longjmp]] to
 transfer control.  In general, compiled loops need to use a similar
 approach.  For now, this is implemented by the [[STARTLOOPCNTXT]] and
 [[ENDLOOPCNTXT]] instructions.  The [[STARTLOOPCNTXT]] instructions
-takes one argument, the constant pool index for a code object
-implementing the loop body.  The loop body should end with a call to
-[[ENDLOOPCNTXT]].
+takes two operands, a flag indicating whether the loop is a [[for]]
+loop or not, and a label which points after the loop. The interpreter
+jumps to this label in case of a non-local jump implementing
+[[break]].  The loop body should end with a call to [[ENDLOOPCNTXT]],
+which takes one operand indicating whether this is a [[for]] loop or
+not.  [[ENDLOOPCNTXT]] terminates the context established by
+[[STARTLOOPCNTXT]] and pops it off the context stack.  The context
+data is stored on the byte code interpreter stack; in the case of a
+[[for]] loop some loop state information is duplicated on the stack by
+[[STARTLOOPCNTXT]] and removed again by [[ENDLOOPCNTXT]]. The byte
+code intepreter stores the [[pc]] in a slot in the [[RCNTXT]]
+structure so it is available after a [[longjmp]] triggered by a
+[[break]] for retrieving the label on the [[ENDLOOPCNTXT]]
+instruction.  An alternative would be to add separate
+[[STARTFORLOOPCNTXT]] and [[ENDFORLOOPCNTXT]] instructions. Then the
+[[pc]] or the label could be stored on the note stack.
 
 At least with some assumptions it is often possible to implement
 [[break]] and [[next]] calls as simple [[GOTO]]s.  If all [[break]]
@@ -2457,7 +2717,7 @@ defined as
 <<inlining handler for [[repeat]] loops>>=
 setInlineHandler("repeat", function(e, cb, cntxt) {
     body <- e[[2]]
-    <<generate context and body code for [[repeat]] loop>>
+    <<generate context and body for [[repeat]] loop>>
     <<generate [[repeat]] and [[while]] loop wrap-up code>>
     TRUE
 })
@@ -2465,26 +2725,19 @@ setInlineHandler("repeat", function(e, cb, cntxt) {
 
 If a loop context is not needed then the code for the loop body is
 just written to the original code buffer.  The [[else]] clause in the
-code chunk below generates the code for the general case.  [[genCode]]
-is used to produce a new code object containing code for the loop body
-followed by the [[ENDLOOPCNTXT]] instruction, The code object is then
-installed in the context pool.  The [[STARTLOOPCNTXT]] instruction is
-emitted to the main code buffer.  When a separate code object is
-written the need for using [[RETURNJMP]] for [[return]] calls is
-indicated by setting the [[needRETURNJMP]] flag in the compiler
-context to [[TRUE]].
-<<generate context and body code for [[repeat]] loop>>=
+code chunk below generates the code for the general case. The need for
+using [[RETURNJMP]] for [[return]] calls is indicated by setting the
+[[needRETURNJMP]] flag in the compiler context to [[TRUE]].
+<<generate context and body for [[repeat]] loop>>=
 if (checkSkipLoopCntxt(body, cntxt))
     cmpRepeatBody(body, cb, cntxt)
 else {
     cntxt$needRETURNJMP <- TRUE ## **** do this a better way
-    code <- genCode(body, cntxt,
-                    function(cb, cntxt) {
-                        cmpRepeatBody(body, cb, cntxt)
-                        cb$putcode(ENDLOOPCNTXT.OP)
-                    })
-    bi <- cb$putconst(code)
-    cb$putcode(STARTLOOPCNTXT.OP, bi)
+    ljmpend.label <- cb$makelabel()
+    cb$putcode(STARTLOOPCNTXT.OP, 0, ljmpend.label)
+    cmpRepeatBody(body, cb, cntxt)
+    cb$putlabel(ljmpend.label)
+    cb$putcode(ENDLOOPCNTXT.OP, 0)
 }
 @ %def
 
@@ -2561,7 +2814,7 @@ structure of the [[repeat]] code generator:
 setInlineHandler("while", function(e, cb, cntxt) {
     cond <- e[[2]]
     body <- e[[3]]
-    <<generate context and body code for [[while]] loop>>
+    <<generate context and body for [[while]] loop>>
     <<generate [[repeat]] and [[while]] loop wrap-up code>>
     TRUE
 })
@@ -2570,18 +2823,16 @@ The context and body generation chunk is similar as well. The
 expression stored in the code object isn't quite right as what is
 compiled includes both the test and the body, but this code object
 should not be externally visible.
-<<generate context and body code for [[while]] loop>>=
+<<generate context and body for [[while]] loop>>=
 if (checkSkipLoopCntxt(cond, cntxt) && checkSkipLoopCntxt(body, cntxt))
     cmpWhileBody(e, cond, body, cb, cntxt)
 else {
     cntxt$needRETURNJMP <- TRUE ## **** do this a better way
-    code <- genCode(body, cntxt, ## **** expr isn't quite right
-                    function(cb, cntxt) {
-                        cmpWhileBody(e, cond, body, cb, cntxt)
-                        cb$putcode(ENDLOOPCNTXT.OP)
-                    })
-    bi <- cb$putconst(code)
-    cb$putcode(STARTLOOPCNTXT.OP, bi)
+    ljmpend.label <- cb$makelabel()
+    cb$putcode(STARTLOOPCNTXT.OP, 0, ljmpend.label)
+    cmpWhileBody(e, cond, body, cb, cntxt)
+    cb$putlabel(ljmpend.label)
+    cb$putcode(ENDLOOPCNTXT.OP, 0)
 }
 @ %def
 
@@ -2651,7 +2902,7 @@ setInlineHandler("for", function(e, cb, cntxt) {
     cmp(seq, cb, ncntxt)
     ci <- cb$putconst(sym)
     callidx <- cb$putconst(e)
-    <<generate context and body code for [[for]] loop>>
+    <<generate context and body for [[for]] loop>>
     <<generate [[for]] loop wrap-up code>>
     TRUE
 })
@@ -2666,7 +2917,7 @@ for the body will be a [[GOTO]] instruction that jumps to the
 [[STEPFOR]] instruction.  This design means the stepping and the jump
 can be handled by one instruction instead of two, a step instruction
 and a [[GOTO]].
-<<generate context and body code for [[for]] loop>>=
+<<generate context and body for [[for]] loop>>=
 if (checkSkipLoopCntxt(body, cntxt))
     cmpForBody(callidx, body, ci, cb, cntxt)
 else {
@@ -2674,13 +2925,11 @@ else {
     ctxt.label <- cb$makelabel()
     cb$putcode(STARTFOR.OP, callidx, ci, ctxt.label)
     cb$putlabel(ctxt.label)
-    code <- genCode(body, cntxt, ## **** expr isn't quite right
-                    function(cb, cntxt) {
-                        cmpForBody(NULL, body, NULL, cb, cntxt)
-                        cb$putcode(ENDLOOPCNTXT.OP)
-                    })
-    bi <- cb$putconst(code)
-    cb$putcode(STARTLOOPCNTXT.OP, bi)
+    ljmpend.label <- cb$makelabel()
+    cb$putcode(STARTLOOPCNTXT.OP, 1, ljmpend.label)
+    cmpForBody(NULL, body, NULL, cb, cntxt)
+    cb$putlabel(ljmpend.label)
+    cb$putcode(ENDLOOPCNTXT.OP, 1)
 }
 @ %def
 
@@ -2745,7 +2994,12 @@ cannot contain relevant [[break]] or [[next]] calls.  These stop
 expressions are calls to the three loop functions and to [[function]].
 Calls to functions like [[quote]] that are known not to evaluate their
 arguments could also be included among the stop functions but this
-doesn't seem particularly worth while at this time.
+doesn't seem particularly worth while at this time. Loops that include a
+call to [[eval]] (or [[evalq]]) are compiled with context to support a
+programming pattern present e.g. in package [[Rmpi]]: a server application
+is implemented using an infinite loop, which evaluates de-serialized code
+received from the client; the server shuts down when it receives a
+serialized version of [[break]].
 
 The recursive checking function is defined as
 <<[[checkSkipLoopCntxt]] function>>=
@@ -2760,6 +3014,8 @@ checkSkipLoopCntxt <- function(e, cntxt, breakOK = TRUE) {
                 TRUE
             else if (isLoopTopFun(fname, cntxt))
                 checkSkipLoopCntxtList(e[-1], cntxt, breakOK)
+            else if (fname %in% c("eval", "evalq"))
+                FALSE
             else
                 checkSkipLoopCntxtList(e[-1], cntxt, FALSE)
         }
@@ -2912,13 +3168,85 @@ setInlineHandler("sqrt", function(e, cb, cntxt)
 @ 
 
 The [[log]] function is currently defined as a [[SPECIAL]].  The
-inline handler for [[log]] is thus defined by
+default inline handler action is therefore to use [[cmpSpecial]]. For
+calls with one unnamed argument the [[LOG.OP]] instruction is
+used. For two unnamed arguments [[LOGBASE.OP]] is used. It might be
+useful to introduce instructions for [[log2]] and [[log10]] as well
+but this has not been done yet.
 <<inline handler for [[log]]>>=
-setInlineHandler("log", cmpSpecial)
+setInlineHandler("log", function(e, cb, cntxt) {
+    if (dots.or.missing(e) || ! is.null(names(e)) ||
+        length(e) < 2 || length(e) > 3)
+        cmpSpecial(e, cb, cntxt)
+    else {
+        ci <- cb$putconst(e)
+        ncntxt <- make.nonTailCallContext(cntxt)
+        cmp(e[[2]], cb, ncntxt);
+        if (length(e) == 2)
+            cb$putcode(LOG.OP, ci)
+        else {
+            ncntxt <- make.argContext(cntxt)
+            cmp(e[[3]], cb, ncntxt)
+            cb$putcode(LOGBASE.OP, ci)
+        }
+        if (cntxt$tailcall)
+            cb$putcode(RETURN.OP)
+        TRUE
+    }
+})
 @ 
-It would be a good idea to add instructions for one and two argument log
-functions.
 
+A number of one argument math functions are handled by the interpreter
+using the function [[math1]] in [[arithmetic.c]]. The [[MATH1.OP]]
+instruction handles these for compuled code. The instruction takes two
+operands, an index for the call expression in the constant table, and
+an index for the function to be called in a table of function
+pointers. The table of names in the byte code compiler has to match
+the function pointer array in the byte code interpreter.  It would
+have been possible to use the same indices as the offset values used
+in [[names.c]], but keeping this consistent seemed more challenging.
+<<list of one argument math functions>>=
+## Keep the order consistent with the order in the internal byte code
+## interpreter!
+math1funs <- c("floor", "ceiling", "sign",
+               "expm1", "log1p",
+               "cos", "sin", "tan", "acos", "asin", "atan",
+               "cosh", "sinh", "tanh", "acosh", "asinh", "atanh",
+               "lgamma", "gamma", "digamma", "trigamma",
+               "cospi", "sinpi", "tanpi")
+@ %def math1funs
+
+The code generation is done by [[cmpMath1]]:
+<<[[cmpMath1]] function>>=
+cmpMath1 <- function(e, cb, cntxt) {
+    if (dots.or.missing(e[-1]))
+        cmpBuiltin(e, cb, cntxt)
+    else if (length(e) != 2) {
+        notifyWrongArgCount(e[[1]], cntxt)
+        cmpBuiltin(e, cb, cntxt)
+    }
+    else {
+        name <- as.character(e[[1]])
+        idx <- match(name, math1funs) - 1
+        if (is.na(idx))
+            cntxt$stop(
+                paste(sQuote(name), "is not a registered math1 function"),
+                cntxt)
+        ncntxt <- make.nonTailCallContext(cntxt)
+        cmp(e[[2]], cb, ncntxt);
+        ci <- cb$putconst(e)
+        cb$putcode(MATH1.OP, ci, idx)
+        if (cntxt$tailcall)
+            cb$putcode(RETURN.OP)
+        TRUE
+    }
+}
+@ %def cmpMath1
+The generators are installed by
+<<inline one argument math functions>>=
+for (name in math1funs)
+    setInlineHandler(name, cmpMath1)
+@ 
 
 \subsection{Logical operators}
 Two argument instructions are provided for the comparison operators
@@ -2992,15 +3320,17 @@ This pattern is used for several other operations and is abstracted
 into the code generation function [[cmpDispatch]]. Code for subsetting
 and other operations is then generated by
 <<inlining handlers for some dispatching SPECIAL functions>>=
-setInlineHandler("[", function(e, cb, cntxt)
-    cmpDispatch(STARTSUBSET.OP, DFLTSUBSET.OP, e, cb, cntxt))
+# **** this is now handled differently; see "Improved subset ..."
+# setInlineHandler("[", function(e, cb, cntxt)
+#     cmpDispatch(STARTSUBSET.OP, DFLTSUBSET.OP, e, cb, cntxt))
 
 # **** c() is now a BUILTIN
 # setInlineHandler("c", function(e, cb, cntxt)
 #     cmpDispatch(STARTC.OP, DFLTC.OP, e, cb, cntxt, FALSE))
 
-setInlineHandler("[[", function(e, cb, cntxt)
-    cmpDispatch(STARTSUBSET2.OP, DFLTSUBSET2.OP, e, cb, cntxt))
+# **** this is now handled differently; see "Improved subset ..."
+# setInlineHandler("[[", function(e, cb, cntxt)
+#     cmpDispatch(STARTSUBSET2.OP, DFLTSUBSET2.OP, e, cb, cntxt))
 @ 
 
 The [[cmpDispatch]] function takes the two opcodes as arguments.  It
@@ -3147,10 +3477,8 @@ cmpSimpleInternal <- function(e, cb, cntxt) {
         call <- inlineSimpleInternalCall(e, def)
         if (is.null(call))
             FALSE
-        else {
-            cmp(call, cb, cntxt)
-            TRUE
-        }
+	else
+            cmpDotInternalCall(call, cb, cntxt)
     }
 }
 @ %def cmpSimpleInternal
@@ -3159,7 +3487,8 @@ cmpSimpleInternal <- function(e, cb, cntxt) {
 safeBaseInternals <- c("atan2", "besselY", "beta", "choose",
                        "drop", "inherits", "is.vector", "lbeta", "lchoose",
                        "nchar", "polyroot", "typeof", "vector", "which.max",
-                       "which.min", "is.loaded", "identical")
+                       "which.min", "is.loaded", "identical",
+                       "match", "rep.int", "rep_len")
 
 for (i in safeBaseInternals) setInlineHandler(i,  cmpSimpleInternal)
 @ %def safeBaseInternals
@@ -3194,7 +3523,7 @@ in test code to check that the assumption made in the compiler is
 valid.  The implementation is
 <<[[simpleInternals]] function>>=
 simpleInternals <- function(pos = "package:base") {
-    names <- ls(pos = pos, all = T)
+    names <- ls(pos = pos, all = TRUE)
     if (length(names) == 0)
         character(0)
     else {
@@ -3306,6 +3635,63 @@ dispatching so we just handle them as ordinary [[BUILTIN]]s.  It might
 be worth defining virtual machine instructions for them as well.
 
 
+\subsection{Inline handler for calling C functions}
+The [[.Call]] interface is now the preferred interface for calling C
+functions and is also used in base packages like [[stat]]. The
+[[DOTCALL.OP]] instruction allows these calls to be made without
+allocating a list of arguments---the arguments are accumulated on the
+stack. For now only 16 or fewer arguments are handled; more arguments,
+and cases with named arguments, are handled by the standard [[.Call]]
+[[BUILTIN]].
+<<inline handler for [[.Call]]>>=
+setInlineHandler(".Call", function(e, cb, cntxt) {
+    nargsmax <- 16 ## should match DOTCALL_MAX in eval.c
+    if (dots.or.missing(e[-1]) || ! is.null(names(e)) ||
+        length(e) < 2 || length(e) > nargsmax + 2)
+        cmpBuiltin(e, cb, cntxt) ## punt
+    else {
+        ncntxt <- make.nonTailCallContext(cntxt)
+        cmp(e[[2]], cb, ncntxt);
+        nargs <- length(e) - 2
+        if (nargs > 0) {
+            ncntxt <- make.argContext(cntxt)
+            for (a in as.list(e[-(1:2)]))
+                cmp(a, cb, ncntxt);
+        }
+        ci <- cb$putconst(e)
+        cb$putcode(DOTCALL.OP, ci, nargs)
+        if (cntxt$tailcall)
+            cb$putcode(RETURN.OP)
+        TRUE
+    }
+})
+@
+
+
+\subsection{Inline handlers for generating integer sequences}
+The colon operator and the [[BUILTIN]] functions [[seq_along]] and
+[[seq_len]] generate sequences (the sequence might not be integers if
+long vectors are involved or the colon operator is given no-integer
+arguments). The [[COLON.OP]], [[SEQALONG.OP]], and [[SEQLEN.OP]]
+instructions implement these operations in byte code. This allows an
+implementation in which the result stored on the stack is not a fully
+realized sequence but only a recipe that the [[for]] loop, for
+example, can use to run the loop without generating the sequence.
+This is optionally implemented in the byte code interpreter. It would
+also be possible to allow the compact sequence representation to be
+stored in variables, etc., but this would require more extensive
+changes.
+<<inline handlers for integer sequences>>=
+setInlineHandler(":", function(e, cb, cntxt)
+    cmpPrim2(e, cb, COLON.OP, cntxt))
+
+setInlineHandler("seq_along", function(e, cb, cntxt)
+    cmpPrim1(e, cb, SEQALONG.OP, cntxt))
+
+setInlineHandler("seq_len", function(e, cb, cntxt)
+    cmpPrim1(e, cb, SEQLEN.OP, cntxt))
+@
+
 \subsection{Inlining handlers for controlling warnings}
 The inlining handlers in this section do not actually affect code
 generation. Their purpose is to suppress warnings.
@@ -3419,13 +3805,17 @@ setInlineHandler("switch", function(e, cb, cntxt) {
 The first step in processing the [[switch]] expression is to extract
 the selector expression [[expr]] and the case expressions, to identify
 which, if any, of the cases are empty, and to extract the names of the
-cases as [[nm]].  If there is only one case and that case is not named
-then setting [[nm = ""]] allows this situation to be processed by code
-used when names are present.
+cases as [[nm]].  A warning is issued if there are no cases.  If there
+is only one case and that case is not named then setting [[nm = ""]]
+allows this situation to be processed by code used when names are
+present.
 <<extract the [[switch]] expression components>>=
 expr <- e[[2]]
 cases <-e[-c(1, 2)]
 
+if (is.null(cases))
+    notifyNoSwitchcases(cntxt)
+
 miss <- missingArgs(cases)
 nm <- names(cases)
 
@@ -3534,7 +3924,7 @@ cmp(expr, cb, ncntxt)
 @ %def
 
 The switch instruction takes the selector off the stack and four
-operands form the instruction stream: the call index, an index for the
+operands from the instruction stream: the call index, an index for the
 names, or [[NULL]] if there are none, and indices for the labels for a
 character selector and for a numeric selector.  At this point lists of
 labels are placed in the instruction buffer.  At code extraction time
@@ -3625,7 +4015,7 @@ cmpAssign <- function(e, cb, cntxt) {
     superAssign <- as.character(e[[1]]) == "<<-"
     lhs <- e[[2]]
     value <- e[[3]]
-    symbol <- as.name(getAssignedVar(e))
+    symbol <- as.name(getAssignedVar(e, cntxt))
     if (superAssign && ! findVar(symbol, cntxt))
         notifyNoSuperAssignVar(symbol, cntxt)
     if (is.name(lhs) || is.character(lhs))
@@ -3901,7 +4291,7 @@ of the expressions that need to be considered, with [[*tmp*]] in place
 of the current left hand side argument. For example, for an assignment
 of the form [[f(g(h(x, k), j), i) <- v]] this produces
 \begin{verbatim}
-> flattenPlace(quote(f(g(h(x, k), j), i)))
+> flattenPlace(quote(f(g(h(x, k), j), i)))$places
 [[1]]
 f(`*tmp*`, i)
 
@@ -3921,9 +4311,12 @@ order. An argument context is used since there are already values on
 the stack.
 <<compile code to compute left hand side values>>=
 ncntxt <- make.argContext(cntxt)
-flatPlace <- flattenPlace(lhs)
-for (p in rev(flatPlace[-1]))
-    cmpGetterCall(p, cb, ncntxt)
+flat <- flattenPlace(lhs, cntxt)
+flatOrigPlace <- flat$origplaces
+flatPlace <- flat$places
+flatPlaceIdxs <- seq_along(flatPlace)[-1]
+for (i in rev(flatPlaceIdxs))
+    cmpGetterCall(flatPlace[[i]], flatOrigPlace[[i]], cb, ncntxt)
 @ %def
 The compilation of the individual calls carried out by
 [[cmpGetterCall]], which is presented in Section \ref{subsec:getter}.
@@ -3933,19 +4326,21 @@ right hand side value, to preserve the stack invariant.
 
 The function [[flattenPlace]] is defined as
 <<[[flattenPlace]] function>>=
-flattenPlace <- function(place) {
+flattenPlace <- function(place, cntxt) {
     places <- NULL
+    origplaces <- NULL
     while (typeof(place) == "language") {
         if (length(place) < 2)
-            stop("bad assignment 1")
+            cntxt$stop(gettext("bad assignment 1"), cntxt)
+        origplaces <- c(origplaces, list(place))
         tplace <- place
         tplace[[2]] <- as.name("*tmp*")
         places <- c(places, list(tplace))
         place <- place[[2]]
     }
     if (typeof(place) != "symbol")
-        stop("bad assignment 2")
-    places
+        cntxt$stop(gettext("bad assignment 2"), cntxt)
+    list(places = places, origplaces = origplaces)
 }
 @ %def flattenPlace
 
@@ -3954,9 +4349,9 @@ the original right hand side value followed by the left hand side
 values in the order in which they need to be modified. Code to call
 the sequence of replacement functions is generated by
 <<compile code to compute right hand side values>>=
-cmpSetterCall(flatPlace[[1]], value, cb, ncntxt)
-for (p in flatPlace[-1])
-    cmpSetterCall(p, as.name("*vtmp*"), cb, ncntxt)
+cmpSetterCall(flatPlace[[1]], flatOrigPlace[[1]], value, cb, ncntxt)
+for (i in flatPlaceIdxs)
+    cmpSetterCall(flatPlace[[i]], flatOrigPlace[[i]], as.name("*vtmp*"), cb, ncntxt)
 @ %def
 The first call uses the expression for the original right hand side in
 its call; all others will use [[*vtmp*]].  Each replacement function
@@ -3983,17 +4378,20 @@ the function is specified in the form [[foo::bar]] or [[foo:::bar]]
 differs only compiling the function expression and using [[CHECKFUN]]
 to verify the result and prepare the stack.
 <<[[cmpSetterCall]] function>>=
-cmpSetterCall <- function(place, vexpr, cb, cntxt) {
+cmpSetterCall <- function(place, origplace, vexpr, cb, cntxt) {
     afun <- getAssignFun(place[[1]])
     acall <- as.call(c(afun, as.list(place[-1]), list(value = vexpr)))
     acall[[2]] <- as.name("*tmp*")
     ncntxt <- make.callContext(cntxt, acall)
+    sloc <- cb$savecurloc()
+    cexpr <- as.call(c(afun, as.list(origplace[-1]), list(value = vexpr)))
+    cb$setcurexpr(cexpr)
     if (is.null(afun))
         ## **** warn instead and arrange for cmpSpecial?
         ## **** or generate code to signal runtime error?
         cntxt$stop(gettext("invalid function in complex assignment"))
     else if (typeof(afun) == "symbol") {
-        if (! trySetterInline(afun, place, acall, cb, ncntxt)) {
+        if (! trySetterInline(afun, place, origplace, acall, cb, ncntxt)) {
             ci <- cb$putconst(afun)
             cb$putcode(GETFUN.OP, ci)
             <<compile additional arguments and call to setter function>>
@@ -4004,6 +4402,7 @@ cmpSetterCall <- function(place, vexpr, cb, cntxt) {
         cb$putcode(CHECKFUN.OP)
         <<compile additional arguments and call to setter function>>
     }
+    cb$restorecurloc(sloc)
 }
 @ %def cmpSetterCall
 The common code for compiling additional arguments and issuing the
@@ -4075,7 +4474,7 @@ getSetterInlineHandler <- function(name, package = "base") {
     else NULL
 }
 
-trySetterInline <- function(afun, place, call, cb, cntxt) {
+trySetterInline <- function(afun, place, origplace, call, cb, cntxt) {
     name <- as.character(afun)
     info <- getInlineInfo(name, cntxt)
     if (is.null(info))
@@ -4083,7 +4482,7 @@ trySetterInline <- function(afun, place, call, cb, cntxt) {
     else {
         h <- getSetterInlineHandler(name, info$package)
         if (! is.null(h))
-            h(afun, place, call, cb, cntxt)
+            h(afun, place, origplace, call, cb, cntxt)
         else FALSE
     }
 }
@@ -4095,7 +4494,7 @@ would produce runtime errors; these are compiled by the generic
 mechanism.
 %% **** might be useful to signal a warning at compile time
 <<setter inline handler for [[$<-]]>>=
-setSetterInlineHandler("$<-", function(afun, place, call, cb, cntxt) {
+setSetterInlineHandler("$<-", function(afun, place, origplace, call, cb, cntxt) {
     if (any.dots(place) || length(place) != 3)
         FALSE
     else {
@@ -4138,13 +4537,14 @@ cmpSetterDispatch <- function(start.op, dflt.op, afun, place, call, cb, cntxt) {
 @ %def cmpSetterDispatch
 The two inlining handlers are then defined as
 <<setter inline handlers for [[ [<- ]] and [[ [[<- ]]>>=
-setSetterInlineHandler("[<-", function(afun, place, call, cb, cntxt)
-    cmpSetterDispatch(STARTSUBASSIGN.OP, DFLTSUBASSIGN.OP,
-                      afun, place, call, cb, cntxt))
-
-setSetterInlineHandler("[[<-", function(afun, place, call, cb, cntxt)
-    cmpSetterDispatch(STARTSUBASSIGN2.OP, DFLTSUBASSIGN2.OP,
-                      afun, place, call, cb, cntxt))
+# **** this is now handled differently; see "Improved subset ..."
+# setSetterInlineHandler("[<-", function(afun, place, origplace, call, cb, cntxt)
+#     cmpSetterDispatch(STARTSUBASSIGN.OP, DFLTSUBASSIGN.OP,
+#                       afun, place, call, cb, cntxt))
+
+# setSetterInlineHandler("[[<-", function(afun, place, origplace, call, cb, cntxt)
+#     cmpSetterDispatch(STARTSUBASSIGN2.OP, DFLTSUBASSIGN2.OP,
+#                       afun, place, call, cb, cntxt))
 @ %def
 
 An inline handler is defined for [[@<-]] in order to suppress spurious
@@ -4154,16 +4554,16 @@ is then compiled by a recursive call to [[cmpSetterCall]]; the handler
 will decline in this second call and the default compilation strategy
 will be used.
 <<setter inlining handler for [[@<-]]>>=
-setSetterInlineHandler("@<-", function(afun, place, acall, cb, cntxt) {
+setSetterInlineHandler("@<-", function(afun, place, origplace, acall, cb, cntxt) {
     if (! dots.or.missing(place) && length(place) == 3 &&
         typeof(place[[3]]) == "symbol") {
         place[[3]] <- as.character(place[[3]])
         vexpr <- acall[[length(acall)]]
-	cmpSetterCall(place, vexpr, cb, cntxt)
+	cmpSetterCall(place, origplace, vexpr, cb, cntxt)
         TRUE
     }
     else FALSE
-}, "methods")
+})
 @ 
 
 
@@ -4176,8 +4576,10 @@ for installing the getter function on the stack.  These are then
 followed by common code for handling the additional arguments and the
 call.
 <<[[cmpGetterCall]] function>>=
-cmpGetterCall <- function(place, cb, cntxt) {
+cmpGetterCall <- function(place, origplace, cb, cntxt) {
     ncntxt <- make.callContext(cntxt, place)
+    sloc <- cb$savecurloc()
+    cb$setcurexpr(origplace)
     fun <- place[[1]]
     if (typeof(fun) == "symbol") {
         if (! tryGetterInline(place, cb, ncntxt)) {
@@ -4191,6 +4593,7 @@ cmpGetterCall <- function(place, cb, cntxt) {
         cb$putcode(CHECKFUN.OP)
 	<<compile additional arguments and call to getter function>>
     }
+    cb$restorecurloc(sloc)
 }
 @ %def cmpGetterCall
 In the common code, as in setter calls a [[NULL]] is placed on the
@@ -4316,11 +4719,12 @@ cmpGetterDispatch <- function(start.op, dflt.op, call, cb, cntxt) {
 @ %def cmpGetterDispatch
 The two inline handlers are then defined as
 <<getter inline handlers for [[[]] and [[[[]]>>=
-setGetterInlineHandler("[", function(call, cb, cntxt)
-    cmpGetterDispatch(STARTSUBSET.OP, DFLTSUBSET.OP, call, cb, cntxt))
+# **** this is now handled differently; see "Improved subset ..."
+# setGetterInlineHandler("[", function(call, cb, cntxt)
+#     cmpGetterDispatch(STARTSUBSET.OP, DFLTSUBSET.OP, call, cb, cntxt))
 
-setGetterInlineHandler("[[", function(call, cb, cntxt)
-    cmpGetterDispatch(STARTSUBSET2.OP, DFLTSUBSET2.OP, call, cb, cntxt))
+# setGetterInlineHandler("[[", function(call, cb, cntxt)
+#     cmpGetterDispatch(STARTSUBSET2.OP, DFLTSUBSET2.OP, call, cb, cntxt))
 @ %def
 
 
@@ -4407,7 +4811,7 @@ constNames <- c("pi", "T", "F")
 Call expressions are handled by determining whether the function
 called is eligible for constant folding, attempting to constant fold
 the arguments, and calling the folding function.  The result is the
-passed to [[checkConst]].  If an error occurs in the call to the
+passed to [[checkConst]].  If an error or a warning occurs in the call to the
 folding function then [[constantFoldCall]] returns [[NULL]].
 <<[[constantFoldCall]] function>>=
 constantFoldCall <- function(e, cntxt) {
@@ -4428,7 +4832,8 @@ constantFoldCall <- function(e, cntxt) {
             modes <- unlist(lapply(args, mode))
             if (all(modes %in% constModes)) {
                 tryCatch(checkConst(do.call(ffun, args)),
-                         error = function(e) NULL) ## **** issue warning??
+                         error = function(e) NULL, warning = function(w) NULL)
+                ## **** issue warning??
             }
             else NULL
         }
@@ -4489,7 +4894,13 @@ cmpfun <- function(f, options = NULL) {
     if (type == "closure") {
         cntxt <- make.toplevelContext(makeCenv(environment(f)), options)
         ncntxt <- make.functionContext(cntxt, formals(f), body(f))
-        b <- genCode(body(f), ncntxt)
+        if (mayCallBrowser(body(f), ncntxt))
+            return(f)
+        if (typeof(body(f)) != "language" || body(f)[1] != "{")
+            loc <- list(expr = body(f), srcref = getExprSrcref(f))
+        else
+            loc <- NULL
+        b <- genCode(body(f), ncntxt, loc = loc)
         val <- .Internal(bcClose(formals(f), b, environment(f)))
         attrs <- attributes(f)
         if (! is.null(attrs))
@@ -4498,7 +4909,7 @@ cmpfun <- function(f, options = NULL) {
             val <- asS4(val)
         val
     }
-    else if (typeof(f) == "builtin" || type == "special")
+    else if (type == "builtin" || type == "special")
         f
     else stop("cannot compile a non-function")
 }
@@ -4509,9 +4920,57 @@ have a variant that returns the uncompiled function if there is an
 error during compilation.
 <<[[tryCmpfun]] function>>=
 tryCmpfun <- function(f)
-    tryCatch(cmpfun(f), error = function(e) f)
+    tryCatch(cmpfun(f), error = function(e) {
+        notifyCompilerError(paste(e$message, "at", deparse(e$call)))
+        f
+    })
 @ %def tryCmpfun
 
+A similar utility for expressions for use in JIT compilation of loops:
+<<[[tryCompile]] function>>=
+tryCompile <- function(e, ...)
+    tryCatch(compile(e, ...), error = function(err) {
+        notifyCompilerError(paste(err$message, "at", deparse(err$call)))
+        e
+    })
+@ %def tryCompile
+
+If a function contains a call to [[browser]], it should not be compiled,
+because the byte-code interpreter does not support command-by-command
+execution ("n"). This function explores the AST of a closure to find out if
+it may contain a call to [[browser]]:
+
+<<[[mayCallBrowser]] function>>=
+mayCallBrowser <- function(e, cntxt) {
+    if (typeof(e) == "language") {
+        fun <- e[[1]]
+        if (typeof(fun) == "symbol") {
+            fname <- as.character(fun)
+            if (fname == "browser") ## not checking isBaseVar to err on the
+                                    ## positive
+                TRUE
+            else if (fname == "function" && isBaseVar(fname, cntxt))
+                FALSE
+            else
+                mayCallBrowserList(e[-1], cntxt)
+        }
+        else
+            mayCallBrowserList(e, cntxt)
+    }
+    else FALSE
+}
+@ %def mayCallBrowser
+
+A version that operates on a list of expressions is
+<<[[mayCallBrowserList]] function>>=
+mayCallBrowserList <- function(elist, cntxt) {
+    for (a in as.list(elist))
+        if (! missing(a) && mayCallBrowser(a, cntxt))
+            return(TRUE)
+    FALSE
+}
+@ %def mayCallBrowserList
+
 
 \subsection{Compiling and loading files}
 A file can be compiled with [[cmpfile]] and loaded with [[loadcmp]].
@@ -4529,7 +4988,7 @@ cmpfile <- function(infile, outfile, ascii = FALSE, env = .GlobalEnv,
     nforms <- length(forms)
     if (nforms > 0) {
         expr.needed <- 1000
-        expr.old <- options()$expressions
+        expr.old <- getOption("expressions")
         if (expr.old < expr.needed) {
             options(expressions = expr.needed)
             on.exit(options(expressions = expr.old))
@@ -4548,7 +5007,8 @@ cmpfile <- function(infile, outfile, ascii = FALSE, env = .GlobalEnv,
                     cat(paste("compiling expression", deparse(e, 20)[1],
                               "...\n"))
             }
-            cforms[[i]] <- genCode(e, cntxt)
+            if (!mayCallBrowser(e, cntxt))
+                cforms[[i]] <- genCode(e, cntxt)
         }
         cat(gettextf("saving to file \"%s\" ... ", outfile))
         .Internal(save.to.file(cforms, outfile, ascii))
@@ -4602,7 +5062,7 @@ Two additional functions that are currently not exported or used are
 <<[[cmpframe]] function>>=
 cmpframe <- function(inpos, file) {
     expr.needed <- 1000
-    expr.old <- options()$expressions
+    expr.old <- getOption("expressions")
     if (expr.old < expr.needed)
        options(expressions = expr.needed)
     on.exit(options(expressions = expr.old))
@@ -4667,6 +5127,7 @@ setCompilerOptions <- function(...) {
             stop(gettextf("'%s' is not a valid compiler option", n),
                  domain = NA)
     old <- list()
+    newOptions <- as.list(compilerOptions) # copy options
     for (n in nm) {
         op <- options[[n]]
         switch(n,
@@ -4675,14 +5136,14 @@ setCompilerOptions <- function(...) {
                    if (length(op) == 1 && 0 <= op && op <= 3) {
                        old <- c(old, list(optimize =
                                           compilerOptions$optimize))
-                       compilerOptions$optimize <- op
+                       newOptions$optimize <- op
                    }
                },
                suppressAll = {
                    if (identical(op, TRUE) || identical(op, FALSE)) {
                        old <- c(old, list(suppressAll =
                                           compilerOptions$suppressAll))
-                       compilerOptions$suppressAll <- op
+                       newOptions$suppressAll <- op
                    }
                },
                suppressUndefined = {
@@ -4690,25 +5151,73 @@ setCompilerOptions <- function(...) {
                        is.character(op)) {
                        old <- c(old, list(suppressUndefined =
                                           compilerOptions$suppressUndefined))
-                       compilerOptions$suppressUndefined <- op
+                       newOptions$suppressUndefined <- op
                    }
                })
     }
-    old
+    jitEnabled <- enableJIT(-1)
+    if (checkCompilerOptions(jitEnabled, newOptions))
+        for(n in names(newOptions)) # commit the new options
+            assign(n, newOptions[[n]], compilerOptions)
+    invisible(old)
 }
 @ %def
 
 For now, a [[.onLoad]] function is used to allow all warning to be
 suppressed.  This is probably useful for building packages, since the
 way lazy loading is done means variables defined in shared libraries
-are not available and produce a raft of warnings.
+are not available and produce a raft of warnings.  The [[.onLoad]]
+function also allows undefined variables to be suppressed and the
+optimization level to be specified using environment variables.
 <<[[.onLoad]] function>>=
 .onLoad <- function(libname, pkgname) {
-    if (Sys.getenv("R_COMPILER_SUPPRESS_ALL") != "")
-        setCompilerOptions(suppressAll = TRUE)
+    envAsLogical <- function(varName) {
+        value = Sys.getenv(varName)
+        if (value == "")
+            NA
+        else
+            switch(value,
+                "1"=, "TRUE"=, "true"=, "True"=, "yes"=, "Yes"= TRUE,
+                "0"=, "FALSE"=,"false"=,"False"=, "no"=, "No" = FALSE,
+                stop(gettextf("invalid environment variable value: %s==%s",
+                    varName, value)))
+    }
+    val <- envAsLogical("R_COMPILER_SUPPRESS_ALL")
+    if (!is.na(val))
+        setCompilerOptions(suppressAll = val)
+    val <- envAsLogical("R_COMPILER_SUPPRESS_UNDEFINED")
+    if (!is.na(val))
+        setCompilerOptions(suppressUndefined = val)
+    if (Sys.getenv("R_COMPILER_OPTIMIZE") != "")
+        tryCatch({
+            lev <- as.integer(Sys.getenv("R_COMPILER_OPTIMIZE"))
+            if (0 <= lev && lev <= 3)
+                setCompilerOptions(optimize = lev)
+        }, error = function(e) e, warning = function(w) w)
 }
 @ %def .onLoad
 
+When [[enableJIT]] is set to 3, loops should be compiled before executing. 
+However, if the [[optimize]] option is set to 0 or 1, a compiled loop will
+call to the same primitive function as is used by the AST interpretter (e.g. 
+[[do_for]]), and the compilation would run into infinite recursion. 
+[[checkCompilerOptions]] will detect invalid combinations of [[enableJIT]]
+and [[optimize]] and report a warning.
+%% **** could also change the interface and atomically set enableJIT and optimize
+<<[[checkCompilerOptions]] function>>=
+checkCompilerOptions <- function(jitEnabled, options = NULL) {
+    optimize <- getCompilerOption("optimize", options)
+    if (jitEnabled <= 2 || optimize >= 2)
+        TRUE
+    else {
+        stop(gettextf(
+            "invalid compiler options: optimize(==%d)<2 and jitEnabled(==%d)>2",
+            optimize, jitEnabled))
+        FALSE
+    }
+}
+@ %def checkCompilerOptions
+
 
 \subsection{Disassembler}
 A minimal disassembler is provided by [[disassemble]]. This is
@@ -4762,6 +5271,198 @@ bcDecode <- function(code) {
 @ %def bcDecode
 
 
+\section{Improved subset and sub-assignment handling}
+This section describes changes that allow subset and subassign
+operations to inmost case be handled without allocating list of the
+index arguments --- the arguments are passed on the stack instead.
+The function [[cmpSubsetDispatch]] is analogous to [[cmpDispatch]]
+described above. the [[dflt.op]] argument passed information about the
+instruction to be emitted. For instructions designed for a particular
+number of arguments the [[rank]] component is [[FALSE]] and no index
+count is emitted; this is used for [[VECSUBSET.OP]] and
+[[MATSUBSET.OP]] instructions. If [[rank]] is [[TRUE]], then the
+number of indices is emitted as an operand; this is used by the
+[[SUBSET_N.OP]] instruction.
+<<[[cmpSubsetDispatch]] function>>=
+cmpSubsetDispatch <- function(start.op, dflt.op, e, cb, cntxt) {
+    if (dots.or.missing(e) || ! is.null(names(e)) || length(e) < 3)
+        cntxt$stop(gettext("cannot compile this expression"), cntxt)
+    else {
+        oe <- e[[2]]
+        if (missing(oe))
+            cntxt$stop(gettext("cannot compile this expression"), cntxt)
+        ncntxt <- make.argContext(cntxt)
+        ci <- cb$putconst(e)
+        label <- cb$makelabel()
+        cmp(oe, cb, ncntxt)
+        cb$putcode(start.op, ci, label)
+        indices <- e[-c(1, 2)]
+        for (i in seq_along(indices))
+            cmp(indices[[i]], cb, ncntxt, TRUE)
+        if (dflt.op$rank) cb$putcode(dflt.op$code, ci, length(indices))
+        else cb$putcode(dflt.op$code, ci)
+        cb$putlabel(label)
+        if (cntxt$tailcall) cb$putcode(RETURN.OP)
+        TRUE
+    }
+}
+@ %def cmpSubsetDispatch
+The subsetting handlers fall back to using [[cmpDispatch]] if there
+are any named arguments or if an error would need to be signaled (we
+could issue a compiler warning at this point as well). If all
+arguments are unnamed and there are no dots then [[cmpSubsetDispatch]]
+is used; the instruction emitted depends on the argument count.
+<<inline handlers for subsetting>>=
+setInlineHandler("[", function(e, cb, cntxt) {
+    if (dots.or.missing(e) || ! is.null(names(e)) || length(e) < 3)
+        cmpDispatch(STARTSUBSET.OP, DFLTSUBSET.OP, e, cb, cntxt) ## punt
+    else {
+        nidx <- length(e) - 2;
+        if (nidx == 1)
+            dflt.op <- list(code = VECSUBSET.OP, rank = FALSE)
+        else if (nidx == 2)
+            dflt.op <- list(code = MATSUBSET.OP, rank = FALSE)
+        else
+            dflt.op <- list(code = SUBSET_N.OP, rank = TRUE)
+        cmpSubsetDispatch(STARTSUBSET_N.OP, dflt.op, e, cb, cntxt)
+    }
+})
+
+setInlineHandler("[[", function(e, cb, cntxt) {
+    if (dots.or.missing(e) || ! is.null(names(e)) || length(e) < 3)
+        cmpDispatch(STARTSUBSET2.OP, DFLTSUBSET2.OP, e, cb, cntxt) ## punt
+    else {
+        nidx <- length(e) - 2;
+        if (nidx == 1)
+            dflt.op <- list(code = VECSUBSET2.OP, rank = FALSE)
+        else if (nidx == 2)
+            dflt.op <- list(code = MATSUBSET2.OP, rank = FALSE)
+        else
+            dflt.op <- list(code = SUBSET2_N.OP, rank = TRUE)
+        cmpSubsetDispatch(STARTSUBSET2_N.OP, dflt.op, e, cb, cntxt)
+    }
+})
+@ 
+
+Similarly, [[cmpSubassignDispatch]] is a variant of
+[[cmpSetterDispatch]] that passes index arguments on the stack and
+emits an index count if necessary.
+<<[[cmpSubassignDispatch]] function>>=
+cmpSubassignDispatch <- function(start.op, dflt.op, afun, place, call, cb,
+                                 cntxt) {
+    if (dots.or.missing(place) || ! is.null(names(place)) || length(place) < 3)
+        cntxt$stop(gettext("cannot compile this expression"), cntxt)
+    else {
+        ci <- cb$putconst(call)
+        label <- cb$makelabel()
+        cb$putcode(start.op, ci, label)
+        indices <- place[-c(1, 2)]
+        for (i in seq_along(indices))
+            cmp(indices[[i]], cb, cntxt, TRUE)
+        if (dflt.op$rank) cb$putcode(dflt.op$code, ci, length(indices))
+        else cb$putcode(dflt.op$code, ci)
+        cb$putlabel(label)
+        TRUE
+    }
+}
+@  %def cmpSubassignDispatch
+
+Again the handlers fall back to [[cmpSetterDispatch]] if there are
+named arguments or other complication.
+<<inline handlers for subassignment>>=
+setSetterInlineHandler("[<-", function(afun, place, origplace, call, cb, cntxt) {
+    if (dots.or.missing(place) || ! is.null(names(place)) || length(place) < 3)
+        cmpSetterDispatch(STARTSUBASSIGN.OP, DFLTSUBASSIGN.OP,
+                          afun, place, call, cb, cntxt) ## punt
+    else {
+        nidx <- length(place) - 2
+        if (nidx == 1)
+            dflt.op <- list(code = VECSUBASSIGN.OP, rank = FALSE)
+        else if (nidx == 2)
+            dflt.op <- list(code = MATSUBASSIGN.OP, rank = FALSE)
+        else
+            dflt.op <- list(code = SUBASSIGN_N.OP, rank = TRUE)
+        cmpSubassignDispatch(STARTSUBASSIGN_N.OP, dflt.op, afun, place, call,
+                             cb, cntxt)
+    }
+})
+
+setSetterInlineHandler("[[<-", function(afun, place, origplace, call, cb, cntxt) {
+    if (dots.or.missing(place) || ! is.null(names(place)) || length(place) < 3)
+        cmpSetterDispatch(STARTSUBASSIGN2.OP, DFLTSUBASSIGN2.OP,
+                          afun, place, call, cb, cntxt) ## punt
+    else {
+        nidx <- length(place) - 2
+        if (nidx == 1)
+            dflt.op <- list(code = VECSUBASSIGN2.OP, rank = FALSE)
+        else if (nidx == 2)
+            dflt.op <- list(code = MATSUBASSIGN2.OP, rank = FALSE)
+        else
+            dflt.op <- list(code = SUBASSIGN2_N.OP, rank = TRUE)
+        cmpSubassignDispatch(STARTSUBASSIGN2_N.OP, dflt.op, afun, place, call,
+                             cb, cntxt)
+    }
+})
+@ 
+
+Similarly, again, [[cmpSubsetGetterDispatch]] is a variant of
+[[cmpGetterDispatch]] that passes index arguments on the stack.
+<<[[cmpSubsetGetterDispatch]] function>>=
+cmpSubsetGetterDispatch <- function(start.op, dflt.op, call, cb, cntxt) {
+    if (dots.or.missing(call) || ! is.null(names(call)) || length(call) < 3)
+        cntxt$stop(gettext("cannot compile this expression"), cntxt)
+    else {
+        ci <- cb$putconst(call)
+        end.label <- cb$makelabel()
+        cb$putcode(DUP2ND.OP)
+        cb$putcode(start.op, ci, end.label)
+        indices <- call[-c(1, 2)]
+        for (i in seq_along(indices))
+            cmp(indices[[i]], cb, cntxt, TRUE)
+        if (dflt.op$rank)
+            cb$putcode(dflt.op$code, ci, length(indices))
+        else
+            cb$putcode(dflt.op$code, ci)
+        cb$putlabel(end.label)
+        cb$putcode(SWAP.OP)
+        TRUE
+    }
+}
+@  %def cmpSubsetGetterDispatch
+
+And again the handlers fall back to [[cmpGetterDispatch]] if necessary.
+<<inline handlers for subset getters>>=
+setGetterInlineHandler("[", function(call, cb, cntxt) {
+    if (dots.or.missing(call) || ! is.null(names(call)) || length(call) < 3)
+        cmpGetterDispatch(STARTSUBSET.OP, DFLTSUBSET.OP, call, cb, cntxt)
+    else {
+        nidx <- length(call) - 2;
+        if (nidx == 1)
+            dflt.op <- list(code = VECSUBSET.OP, rank = FALSE)
+        else if (nidx == 2)
+            dflt.op <- list(code = MATSUBSET.OP, rank = FALSE)
+        else
+            dflt.op <- list(code = SUBSET_N.OP, rank = TRUE)
+        cmpSubsetGetterDispatch(STARTSUBSET_N.OP, dflt.op, call, cb, cntxt)
+    }
+})
+
+setGetterInlineHandler("[[", function(call, cb, cntxt) {
+    if (dots.or.missing(call) || ! is.null(names(call)) || length(call) < 3)
+        cmpGetterDispatch(STARTSUBSET2.OP, DFLTSUBSET2.OP, call, cb, cntxt)
+    else {
+        nidx <- length(call) - 2;
+        if (nidx == 1)
+            dflt.op <- list(code = VECSUBSET2.OP, rank = FALSE)
+        else if (nidx == 2)
+            dflt.op <- list(code = MATSUBSET2.OP, rank = FALSE)
+        else
+            dflt.op <- list(code = SUBSET2_N.OP, rank = TRUE)
+        cmpSubsetGetterDispatch(STARTSUBSET2_N.OP, dflt.op, call, cb, cntxt)
+    }
+})
+@ 
+
 \section{Discussion and future directions}
 Despite its long gestation period this compiler should be viewed as a
 first pass at creating a byte code compiler for R.  The compiler
@@ -4922,6 +5623,7 @@ result using [[rep]].
 frameTypes <- function(env) {
     top <- topenv(env)
     empty <- emptyenv()
+    base <- baseenv()
     <<find the number [[nl]] of local frames>>
     <<find the number [[nn]] of namespace frames>>
     <<find the number [[ng]] of global frames>>
@@ -4933,6 +5635,8 @@ frames with [[parent.env]] until the top level environment is reached.
 <<find the number [[nl]] of local frames>>=
 nl <- 0
 while (! identical(env, top)) {
+    if (isNamespace(env))
+        stop("namespace found within local environments")
     env <- parent.env(env)
     nl <- nl + 1
     if (identical(env, empty))
@@ -4945,6 +5649,11 @@ parent frames until [[.GlobalEnv]] is reached.
 nn <- 0
 if (isNamespace(env)) {
     while (! identical(env, .GlobalEnv)) {
+        if (!isNamespace(env)) {
+            name <- attr(env, "name")
+            if (!is.character(name) || !startsWith(name, "imports:"))
+		stop("non-namespace found within namespace environments")
+        }
         env <- parent.env(env)
         nn <- nn + 1
         if (identical(env, empty))
@@ -4958,6 +5667,8 @@ the length of the result returned by [[search]]
 <<find the number [[ng]] of global frames>>=
 ng <- 0
 while (! identical(env, empty)) {
+    if (isNamespace(env))
+	stop("namespace found within global environments")
     env <- parent.env(env)
     ng <- ng + 1
 }
@@ -4977,7 +5688,7 @@ its imports, or if the home namespace cannot be determined.
 ## imports environment) find the namespace in which the symbol's value
 ## was originally defined. Returns NULL if the symbol is not found via
 ## the namespace.
-findHomeNS <- function(sym, ns) {
+findHomeNS <- function(sym, ns, cntxt) {
     <<if [[ns]] is an imports frame find the corresponding namespace>>
     if (exists(sym, ns, inherits = FALSE))
         ns
@@ -5003,7 +5714,8 @@ if (! isNamespace(ns)) {
     ## namespace.
     name <- attr(ns, "name")
     if (is.null(name))
-        stop("'ns' must be a namespace or a namespace imports environment")
+        cntxt$stop("'ns' must be a namespace or a namespace imports environment",
+            cntxt)
     ns <- getNamespace(sub("imports:", "", attr(ns, "name")))
 }
 @ %def
@@ -5036,7 +5748,7 @@ if (identical(ins, .BaseNamespaceEnv))
 else
     exports <- get(".__NAMESPACE__.", ins)$exports
 if (exists(sym, exports, inherits = FALSE))
-    return(findHomeNS(sym, ins))
+    return(findHomeNS(sym, ins, cntxt))
 @ %def
 
 For selective imports the [[imports]] entry is a named character
@@ -5053,7 +5765,7 @@ if (pos) {
     ## renaming this is still supported by the
     ## namespace code.)
     if (sym == exports[pos])
-        return(findHomeNS(sym, ins))
+        return(findHomeNS(sym, ins, cntxt))
     else
         return(NULL)
 }
@@ -5090,6 +5802,41 @@ nsName <- function(ns) {
 @ %def nsName
 
 
+\section{Experimental utilities}
+
+This section presents two experimental utililities that, for now, are
+not exported. The first is a simple byte code profiler. This requires
+that the file [[eval.c]] be compiled with [[BC_PROFILING]] enabled,
+which on [[gcc]]-compatible compilers will disable threaded code. The
+byte code profiler uses the profile timer to record the active byte
+code instruction at interrupt time. The function [[bcprof]] runs the
+profiler while evaluating its argument expression and returns a
+summary of the counts.
+
+<<[[bcprof]] function>>=
+bcprof <- function(expr) {
+    .Internal(bcprofstart())
+    expr
+    .Internal(bcprofstop())
+    val <- structure(.Internal(bcprofcounts()),
+                     names = Opcodes.names)
+    hits <- sort(val[val > 0], decreasing = TRUE)
+    pct <- round(100 * hits / sum(hits), 1)
+    data.frame(hits = hits, pct = pct)
+}
+@ %def bcprof
+
+The second utility is a simple interface to the code building
+mechanism that may help with experimenting with code optimizations.
+<<[[asm]] function>>=
+asm <- function(e, gen, env = .GlobalEnv, options = NULL) {
+    cenv <- makeCenv(env)
+    cntxt <- make.toplevelContext(cenv, options)
+    cntxt$env <- addCenvVars(cenv, findLocals(e, cntxt))
+    genCode(e, cntxt, gen = gen)
+}
+@ %def asm
+
 \section{Opcode constants}
 \subsection{Symbolic opcode names}
 <<opcode definitions>>=
@@ -5177,10 +5924,10 @@ ISCHARACTER.OP <- 80
 ISSYMBOL.OP <- 81
 ISOBJECT.OP <- 82
 ISNUMERIC.OP <- 83
-NVECELT.OP <- 84
-NMATELT.OP <- 85
-SETNVECELT.OP <- 86
-SETNMATELT.OP <- 87
+VECSUBSET.OP <- 84
+MATSUBSET.OP <- 85
+VECSUBASSIGN.OP <- 86
+MATSUBASSIGN.OP <- 87
 AND1ST.OP <- 88
 AND2ND.OP <- 89
 OR1ST.OP <- 90
@@ -5197,6 +5944,26 @@ SWAP.OP <- 100
 DUP2ND.OP <- 101
 SWITCH.OP <- 102
 RETURNJMP.OP <- 103
+STARTSUBSET_N.OP <- 104
+STARTSUBASSIGN_N.OP <- 105
+VECSUBSET2.OP <- 106
+MATSUBSET2.OP <- 107
+VECSUBASSIGN2.OP <- 108
+MATSUBASSIGN2.OP <- 109
+STARTSUBSET2_N.OP <- 110
+STARTSUBASSIGN2_N.OP <- 111
+SUBSET_N.OP <- 112
+SUBSET2_N.OP <- 113
+SUBASSIGN_N.OP <- 114
+SUBASSIGN2_N.OP <-115
+LOG.OP <- 116
+LOGBASE.OP <- 117
+MATH1.OP <- 118
+DOTCALL.OP <- 119
+COLON.OP <- 120
+SEQALONG.OP <- 121
+SEQLEN.OP <- 122
+BASEGUARD.OP <- 123
 @ 
 
 \subsection{Instruction argument counts and names}
@@ -5209,8 +5976,8 @@ BRIFNOT.OP = 2,
 POP.OP = 0,
 DUP.OP = 0,
 PRINTVALUE.OP = 0,
-STARTLOOPCNTXT.OP = 1,
-ENDLOOPCNTXT.OP = 0,
+STARTLOOPCNTXT.OP = 2,
+ENDLOOPCNTXT.OP = 1,
 DOLOOPNEXT.OP = 0,
 DOLOOPBREAK.OP = 0,
 STARTFOR.OP = 3,
@@ -5286,10 +6053,10 @@ ISCHARACTER.OP = 0,
 ISSYMBOL.OP = 0,
 ISOBJECT.OP = 0,
 ISNUMERIC.OP = 0,
-NVECELT.OP = 0,
-NMATELT.OP = 0,
-SETNVECELT.OP = 0,
-SETNMATELT.OP = 0,
+VECSUBSET.OP = 1,
+MATSUBSET.OP = 1,
+VECSUBASSIGN.OP = 1,
+MATSUBASSIGN.OP = 1,
 AND1ST.OP = 2,
 AND2ND.OP = 1,
 OR1ST.OP = 2,
@@ -5305,11 +6072,31 @@ GETTER_CALL.OP = 1,
 SWAP.OP = 0,
 DUP2ND.OP = 0,
 SWITCH.OP = 4,
-RETURNJMP.OP = 0
+RETURNJMP.OP = 0,
+STARTSUBSET_N.OP = 2,
+STARTSUBASSIGN_N.OP = 2,
+VECSUBSET2.OP = 1,
+MATSUBSET2.OP = 1,
+VECSUBASSIGN2.OP = 1,
+MATSUBASSIGN2.OP = 1,
+STARTSUBSET2_N.OP = 2,
+STARTSUBASSIGN2_N.OP = 2,
+SUBSET_N.OP = 2,
+SUBSET2_N.OP = 2,
+SUBASSIGN_N.OP = 2,
+SUBASSIGN2_N.OP = 2,
+LOG.OP = 1,
+LOGBASE.OP = 1,
+MATH1.OP = 2,
+DOTCALL.OP = 2,
+COLON.OP = 1,
+SEQALONG.OP = 1,
+SEQLEN.OP = 1,
+BASEGUARD.OP = 2
 )
 @ 
 
-<<opcode namse>>=
+<<opcode names>>=
 Opcodes.names <- names(Opcodes.argc)
 @ %def Opcodes.names
 
@@ -5336,8 +6123,8 @@ Opcodes.names <- names(Opcodes.argc)
 #  Automatically generated from ../noweb/compiler.nw.
 #
 #  File src/library/compiler/R/cmp.R
-#  Part of the R package, http://www.R-project.org
-#  Copyright (C) 2001-2012 Luke Tierney
+#  Part of the R package, https://www.R-project.org
+#  Copyright (C) 2001-2014 Luke Tierney
 #
 #  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
@@ -5350,7 +6137,7 @@ Opcodes.names <- names(Opcodes.argc)
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 ##
 ## Compiler options
@@ -5457,7 +6244,7 @@ Opcodes.names <- names(Opcodes.argc)
 
 <<opcode argument counts>>
 
-<<opcode namse>>
+<<opcode names>>
 
 <<opcode definitions>>
 
@@ -5466,6 +6253,8 @@ Opcodes.names <- names(Opcodes.argc)
 ## Code buffer implementation
 ##
 
+<<source location tracking functions>>
+
 <<[[make.codeBuf]] function>>
 
 <<[[codeBufCode]] function>>
@@ -5522,6 +6311,9 @@ Opcodes.names <- names(Opcodes.argc)
 
 <<[[cmpTag]] function>>
 
+<<[[mayCallBrowser]] function>>
+
+<<[[mayCallBrowserList]] function>>
 
 ##
 ## Inlining mechanism
@@ -5531,23 +6323,7 @@ Opcodes.names <- names(Opcodes.argc)
 
 ## tryInline implements the rule permitting inlining as they stand now:
 ## Inlining is controlled by the optimize compiler option, with possible
-## values 0, 1, 2, which mean
-##
-##   optimize = 0 -- no inlining
-##   optimize = 1 -- can inline syntactically special functions and
-##                   functions found via a namespace
-##   optimize = 2 -- can inline any functions from case packages
-##
-## This can easily be modified to allow functions to do things like
-##
-##     declare(optimize = 2)
-##
-## or
-##
-##     declare(notinline = c("diag", "dim"))
-##
-## **** need to figure out if there is a sensible way to declare things at
-## **** the package level
+## values 0, 1, 2, 3.
 
 <<[[getInlineInfo]] function>>
 
@@ -5649,6 +6425,14 @@ Opcodes.names <- names(Opcodes.argc)
 
 <<inline handlers for [[^]], [[exp]], and [[sqrt]]>>
 
+<<inline handler for [[log]]>>
+
+<<list of one argument math functions>>
+
+<<[[cmpMath1]] function>>
+
+<<inline one argument math functions>>
+
 <<inline handlers for comparison operators>>
 
 <<inline handlers for [[&]] and [[|]]>>
@@ -5741,6 +6525,20 @@ Opcodes.names <- names(Opcodes.argc)
 
 
 ##
+## Inline handler for .Call
+##
+
+<<inline handler for [[.Call]]>>
+
+
+##
+## Inline handlers for generating integer sequences
+##
+
+<<inline handlers for integer sequences>>
+
+
+##
 ## Inline handlers to control warnings
 ##
 
@@ -5783,6 +6581,12 @@ Opcodes.names <- names(Opcodes.argc)
 
 <<[[notifyMultipleSwitchDefaults]] function>>
 
+<<[[notifyNoSwitchcases]] function>>
+
+<<[[notifyAssignSyntacticFun]] function>>
+
+<<[[notifyCompilerError]] function>>
+
 
 ##
 ## Compiler interface
@@ -5794,6 +6598,8 @@ Opcodes.names <- names(Opcodes.argc)
 
 <<[[tryCmpfun]] function>>
 
+<<[[tryCompile]] function>>
+
 <<[[cmpframe]] function>>
 
 <<[[cmplib]] function>>
@@ -5810,6 +6616,8 @@ Opcodes.names <- names(Opcodes.argc)
 
 <<[[.onLoad]] function>>
 
+<<[[checkCompilerOptions]] function>>
+
 
 ##
 ## Disassembler
@@ -5818,5 +6626,31 @@ Opcodes.names <- names(Opcodes.argc)
 <<[[bcDecode]] function>>
 
 <<[[disassemble]] function>>
+
+
+##
+## Experimental Utilities
+##
+
+<<[[bcprof]] function>>
+
+<<[[asm]] function>>
+
+
+##
+## Improved subset and subassign handling
+##
+
+<<[[cmpSubsetDispatch]] function>>
+
+<<inline handlers for subsetting>>
+
+<<[[cmpSubassignDispatch]] function>>
+
+<<inline handlers for subassignment>>
+
+<<[[cmpSubsetGetterDispatch]] function>>
+
+<<inline handlers for subset getters>>
 @ 
 \end{document}
diff --git a/src/library/compiler/po/R-compiler.pot b/src/library/compiler/po/R-compiler.pot
index 9184562..e7b9f05 100644
--- a/src/library/compiler/po/R-compiler.pot
+++ b/src/library/compiler/po/R-compiler.pot
@@ -1,8 +1,7 @@
 msgid ""
 msgstr ""
-"Project-Id-Version: R 3.1.0\n"
-"Report-Msgid-Bugs-To: bugs.r-project.org\n"
-"POT-Creation-Date: 2013-03-07 08:36\n"
+"Project-Id-Version: compiler 3.4.0\n"
+"POT-Creation-Date: 2016-04-01 09:50\n"
 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
 "Last-Translator: FULL NAME <EMAIL at ADDRESS>\n"
 "Language-Team: LANGUAGE <LL at li.org>\n"
@@ -11,9 +10,18 @@ msgstr ""
 "Content-Transfer-Encoding: 8bit\n"
 
 
+msgid "namespace found within local environments"
+msgstr ""
+
 msgid "not a proper evaluation environment"
 msgstr ""
 
+msgid "non-namespace found within namespace environments"
+msgstr ""
+
+msgid "namespace found within global environments"
+msgstr ""
+
 msgid "'ns' must be a namespace or a namespace imports environment"
 msgstr ""
 
@@ -50,6 +58,9 @@ msgstr ""
 msgid "invalid function in complex assignment"
 msgstr ""
 
+msgid "is not a registered math1 function"
+msgstr ""
+
 msgid "missing arguments are not allowed"
 msgstr ""
 
@@ -71,6 +82,9 @@ msgstr ""
 msgid "more than one default provided in switch() call"
 msgstr ""
 
+msgid "'switch' with no alternatives"
+msgstr ""
+
 msgid "cannot compile a non-function"
 msgstr ""
 
@@ -98,9 +112,15 @@ msgstr ""
 msgid "'%s' is not a valid compiler option"
 msgstr ""
 
+msgid "invalid compiler options: optimize(==%d)<2 and jitEnabled(==%d)>2"
+msgstr ""
+
 msgid "function is not compiled"
 msgstr ""
 
+msgid "cannot compile this expression"
+msgstr ""
+
 msgid        "local assignment to syntactic function: "
 msgid_plural "local assignments to syntactic functions: "
 msgstr[0]    ""
diff --git a/src/library/compiler/po/R-da.po b/src/library/compiler/po/R-da.po
index 62f1382..2d1ebc9 100644
--- a/src/library/compiler/po/R-da.po
+++ b/src/library/compiler/po/R-da.po
@@ -2,7 +2,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: R /3.0.0\n"
 "Report-Msgid-Bugs-To: bugs.r-project.org\n"
-"POT-Creation-Date: 2012-09-30 15:04\n"
+"POT-Creation-Date: 2016-04-01 09:50\n"
 "PO-Revision-Date: 2011-11-29 17:20+0200\n"
 "Last-Translator: Joe <joedalton2 at yahoo.dk>\n"
 "Language-Team: LANGUAGE <LL at li.org>\n"
@@ -13,9 +13,19 @@ msgstr ""
 "Plural-Forms: nplurals=2; plural=(n != 1);\n"
 "X-Generator: Pootle 2.1.6\n"
 
+msgid "namespace found within local environments"
+msgstr ""
+
 msgid "not a proper evaluation environment"
 msgstr "ikke et korrekt evuleringsmiljø"
 
+#, fuzzy
+msgid "non-namespace found within namespace environments"
+msgstr "'ns' skal være et navnerum eller et importmiljø for navnerum"
+
+msgid "namespace found within global environments"
+msgstr ""
+
 msgid "'ns' must be a namespace or a namespace imports environment"
 msgstr "'ns' skal være et navnerum eller et importmiljø for navnerum"
 
@@ -52,6 +62,9 @@ msgstr "ugyldig tildeling 2"
 msgid "invalid function in complex assignment"
 msgstr "ugyldig funktion i kompleks tildeling"
 
+msgid "is not a registered math1 function"
+msgstr ""
+
 msgid "missing arguments are not allowed"
 msgstr "manglende argumenter er ikke tilladt"
 
@@ -74,6 +87,9 @@ msgstr "forkert antal argumenter for '%s'"
 msgid "more than one default provided in switch() call"
 msgstr "mere end en standard tilbudt i kontaktkald"
 
+msgid "'switch' with no alternatives"
+msgstr ""
+
 msgid "cannot compile a non-function"
 msgstr "kan ikke kompilere en ikkefunktion"
 
@@ -101,9 +117,16 @@ msgstr "fil '%s' findes ikke"
 msgid "'%s' is not a valid compiler option"
 msgstr "'%s' er ikke et gyldigt kompilertilvalg"
 
+msgid "invalid compiler options: optimize(==%d)<2 and jitEnabled(==%d)>2"
+msgstr ""
+
 msgid "function is not compiled"
 msgstr "funktion er ikke kompileret"
 
+#, fuzzy
+msgid "cannot compile this expression"
+msgstr "kan ikke kompilere ordrette lovninger i kode"
+
 msgid "local assignment to syntactic function: "
 msgid_plural "local assignments to syntactic functions: "
 msgstr[0] "lokal tildeling til syntaksfunktion: "
diff --git a/src/library/compiler/po/R-de.po b/src/library/compiler/po/R-de.po
index d93a907..a1bfa95 100644
--- a/src/library/compiler/po/R-de.po
+++ b/src/library/compiler/po/R-de.po
@@ -5,13 +5,13 @@
 #
 msgid ""
 msgstr ""
-"Project-Id-Version: R 3.1.0\n"
+"Project-Id-Version: R 3.3.0\n"
 "Report-Msgid-Bugs-To: bugs.r-project.org\n"
-"POT-Creation-Date: 2012-09-30 15:04\n"
-"PO-Revision-Date: 2013-02-28 16:12+0100\n"
+"POT-Creation-Date: 2015-06-06 13:51\n"
+"PO-Revision-Date: 2016-04-07 10:44+0200\n"
 "Last-Translator: Detlef Steuer <steuer at hsuhh.de>\n"
 "Language-Team: R-core <r-core at r-project.org>\n"
-"Language: \n"
+"Language: de\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
@@ -30,7 +30,7 @@ msgid "cannot constant fold literal promises"
 msgstr "kann literale Promises nicht konstant falten"
 
 msgid "cannot constant fold literal bytecode objects"
-msgstr "kann literale Bytecodeobjecte nicht konstant falten"
+msgstr "kann literale Bytecode-Objekte nicht konstant falten"
 
 msgid "no offset recorded for label \"%s\""
 msgstr "kein Offset aufgezeichnet für Label \"%s\""
@@ -39,7 +39,7 @@ msgid "cannot compile byte code literals in code"
 msgstr "kann Bytecode Literale im Code nicht kompilieren"
 
 msgid "cannot compile promise literals in code"
-msgstr "kann literatle promises nicht in Programm kompilieren"
+msgstr "kann literale promises nicht in Programm kompilieren"
 
 msgid "possible error in '%s': %s"
 msgstr "möglicher Fehler in '%s': %s"
@@ -56,6 +56,9 @@ msgstr "unzulässige Zuweisung 2"
 msgid "invalid function in complex assignment"
 msgstr "unzulässige Funktion in komplexer Zuweisung"
 
+msgid "%s is not a registered math1 function"
+msgstr "%S ist keine registrierte math1 Funktion"
+
 msgid "missing arguments are not allowed"
 msgstr "fehlende Argumente sind nicht zugelassen"
 
@@ -102,11 +105,14 @@ msgid "file '%s' does not exist"
 msgstr "Datei '%s' existiert nicht"
 
 msgid "'%s' is not a valid compiler option"
-msgstr "'%s' ist keine zulässige Kompileroption"
+msgstr "'%s' ist keine zulässige Compiler-Option"
 
 msgid "function is not compiled"
 msgstr "Funktion ist nicht kompiliert"
 
+msgid "cannot compile this expression"
+msgstr "kann diesen Ausdruck nicht kompilieren"
+
 msgid "local assignment to syntactic function: "
 msgid_plural "local assignments to syntactic functions: "
 msgstr[0] "lokale Zuweisung an syntaktische Funktion:"
diff --git a/src/library/compiler/po/R-fr.po b/src/library/compiler/po/R-fr.po
index e309621..c2cb471 100644
--- a/src/library/compiler/po/R-fr.po
+++ b/src/library/compiler/po/R-fr.po
@@ -7,7 +7,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: R 2.13.0\n"
 "Report-Msgid-Bugs-To: bugs.r-project.org\n"
-"POT-Creation-Date: 2012-09-30 15:04\n"
+"POT-Creation-Date: 2016-04-01 09:50\n"
 "PO-Revision-Date: 2013-03-18 22:00+0100\n"
 "Last-Translator: Philippe Grosjean <phgrosjean at sciviews.org>\n"
 "Language-Team: French <R-core at r-project.org>\n"
@@ -18,9 +18,21 @@ msgstr ""
 "Plural-Forms: nplurals=2; plural=(n > 1);\n"
 "X-Generator: Poedit 1.5.5\n"
 
+msgid "namespace found within local environments"
+msgstr ""
+
 msgid "not a proper evaluation environment"
 msgstr "ceci n'est pas un environnement ad�quat pour l'�valuation"
 
+#, fuzzy
+msgid "non-namespace found within namespace environments"
+msgstr ""
+"'ns' doit �tre �tre un espace de noms (namespace) ou un environnement "
+"d'importation d'espace de noms"
+
+msgid "namespace found within global environments"
+msgstr ""
+
 msgid "'ns' must be a namespace or a namespace imports environment"
 msgstr ""
 "'ns' doit �tre �tre un espace de noms (namespace) ou un environnement "
@@ -63,6 +75,9 @@ msgstr "mauvaise affectation 1"
 msgid "invalid function in complex assignment"
 msgstr "function incorrecte dans une affectation complexe"
 
+msgid "is not a registered math1 function"
+msgstr ""
+
 msgid "missing arguments are not allowed"
 msgstr "les arguments manquants ne sont pas autoris�s"
 
@@ -84,6 +99,9 @@ msgstr "nombre incorrect d'arguments pour '%s'"
 msgid "more than one default provided in switch() call"
 msgstr "plus d'une valeur par d�faut fournie dans une construction switch()"
 
+msgid "'switch' with no alternatives"
+msgstr ""
+
 msgid "cannot compile a non-function"
 msgstr "impossible de compiler autre chose qu'une fonction"
 
@@ -111,9 +129,16 @@ msgstr "le fichier '%s' n'existe pas"
 msgid "'%s' is not a valid compiler option"
 msgstr "'%s' n'est pas une option de compilation reconnue"
 
+msgid "invalid compiler options: optimize(==%d)<2 and jitEnabled(==%d)>2"
+msgstr ""
+
 msgid "function is not compiled"
 msgstr "la fonction n'est pas compil�e"
 
+#, fuzzy
+msgid "cannot compile this expression"
+msgstr "impossible de compiler des promesses litt�rales dans le code"
+
 msgid "local assignment to syntactic function: "
 msgid_plural "local assignments to syntactic functions: "
 msgstr[0] "affectation locale vers une fonction syntaxique :"
diff --git a/src/library/compiler/po/R-ja.po b/src/library/compiler/po/R-ja.po
index 5a5d3a5..042e3e3 100644
--- a/src/library/compiler/po/R-ja.po
+++ b/src/library/compiler/po/R-ja.po
@@ -2,20 +2,33 @@ msgid ""
 msgstr ""
 "Project-Id-Version: R 2.13.0 \n"
 "Report-Msgid-Bugs-To: bugs.r-project.org\n"
-"POT-Creation-Date: 2013-03-07 08:36\n"
-"PO-Revision-Date: 2013-02-28 01:53+0200 \n"
-"Last-Translator: Triad sou  \n"
+"POT-Creation-Date: 2016-04-01 09:50\n"
+"PO-Revision-Date: 2015-03-27 14:15+0900 \n"
+"Last-Translator: Masafumi  \n"
 "Language-Team: RjpWiki Message Translation Team <mokada at md.tsukuba.ac.jp> \n"
 "Language: ja \n"
 "MIME-Version: 1.0 \n"
 "Content-Type: text/plain; charset=UTF-8 \n"
 "Content-Transfer-Encoding: 8bit \n"
 "Plural-Forms: nplurals=1; plural=0; \n"
-"X-Generator: Pootle 2.0.5 \n"
+"X-Generator: Pootle 2.5.1.1 \n"
+"X-POOTLE-MTIME: 1427433312.000000 \n"
+
+msgid "namespace found within local environments"
+msgstr ""
 
 msgid "not a proper evaluation environment"
 msgstr " 評価環境が適切ではありません "
 
+#, fuzzy
+msgid "non-namespace found within namespace environments"
+msgstr ""
+" 'ns' はネームスペースか、あるいは環境をインポートしたネームスペースでなけれ"
+"ばなりません "
+
+msgid "namespace found within global environments"
+msgstr ""
+
 msgid "'ns' must be a namespace or a namespace imports environment"
 msgstr ""
 " 'ns' はネームスペースか、あるいは環境をインポートしたネームスペースでなけれ"
@@ -54,6 +67,10 @@ msgstr " 付値の誤り 2 "
 msgid "invalid function in complex assignment"
 msgstr " complex の付値に不正な関数があります "
 
+#, fuzzy
+msgid "is not a registered math1 function"
+msgstr " %s は登録された math1 関数ではありません "
+
 msgid "missing arguments are not allowed"
 msgstr " 引数の欠損は許されません "
 
@@ -75,6 +92,9 @@ msgstr " '%s' に対する引数の数が違います "
 msgid "more than one default provided in switch() call"
 msgstr " switch() 呼び出しの中で、デフォルト選択肢が 2 つ以上あります "
 
+msgid "'switch' with no alternatives"
+msgstr ""
+
 msgid "cannot compile a non-function"
 msgstr " 非関数はコンパイルできません "
 
@@ -102,9 +122,15 @@ msgstr " ファイル '%s' は存在しません "
 msgid "'%s' is not a valid compiler option"
 msgstr " '%s' は有効なコンパイルオプションではありません "
 
+msgid "invalid compiler options: optimize(==%d)<2 and jitEnabled(==%d)>2"
+msgstr ""
+
 msgid "function is not compiled"
 msgstr " 関数はコンパイルされません "
 
+msgid "cannot compile this expression"
+msgstr " この式はコンパイルできません "
+
 msgid "local assignment to syntactic function: "
 msgid_plural "local assignments to syntactic functions: "
 msgstr[0] " シンタックス関数へのローカル付値です: "
diff --git a/src/library/compiler/po/R-ko.po b/src/library/compiler/po/R-ko.po
index 200ac1e..beb1e19 100644
--- a/src/library/compiler/po/R-ko.po
+++ b/src/library/compiler/po/R-ko.po
@@ -1,28 +1,44 @@
 # Korean translation for R compiler package
-# src/library/compiler/po/R-ko.po
-# Copyright (C) 1995-2014 The R Core Team
+# ./compiler/po/R-ko.po
+#
+# Copyright (C) 1995-2016 The R Core Team
+#
 # This file is distributed under the same license as the R compiler package.
-# Chel Hee Lee <chl948 at mail.usask.ca>, 2008-2014.
+# Maintained by Chel Hee Lee <chl948 at mail.usask.ca>, 2008-2016.
+# Contact: Chel Hee Lee <gnustats at gmail.com>
+#
+# Notes:
+# Under development (unstable) starting from 11-APR-2016 for R-3.3.1 - QC: in progress
+# Freezed on 10-APR-2016 for R-3.3.0 - QC: PASS
+# Freezed on 30-MAR-2015 for R-3.2.0 - QC: PASS
+# Freezed on 06-FEB-2015 for R-3.1.3 - QC: PASS
 #
 msgid ""
 msgstr ""
-"Project-Id-Version: R 3.1.0\n"
+"Project-Id-Version: R-3.3.0\n"
 "Report-Msgid-Bugs-To: bugs.r-project.org\n"
-"POT-Creation-Date: 2012-12-10 18:35\n"
-"PO-Revision-Date: 2014-03-27 09:02-0600\n"
+"POT-Creation-Date: 2016-04-01 09:50\n"
+"PO-Revision-Date: 2016-04-11 13:08-0600\n"
 "Last-Translator: Chel Hee Lee <chl948 at mail.usask.ca>\n"
-"Language-Team:  <chl948 at mail.usask.ca>\n"
+"Language-Team: Chel Hee Lee <chl948 at mail.usask.ca>\n"
 "Language: ko\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
 "Plural-Forms: nplurals=1; plural=0;\n"
-"X-Poedit-SourceCharset: UTF-8\n"
-"X-Generator: Poedit 1.5.4\n"
+
+msgid "namespace found within local environments"
+msgstr ""
 
 msgid "not a proper evaluation environment"
 msgstr "올바른 이밸류에이션 인바이런먼트가 아닙니다"
 
+msgid "non-namespace found within namespace environments"
+msgstr ""
+
+msgid "namespace found within global environments"
+msgstr ""
+
 msgid "'ns' must be a namespace or a namespace imports environment"
 msgstr ""
 "'ns'는 반드시 네임스페이스 또는 환경을  불러오는 네임스페이스이어야 합니다"
@@ -60,6 +76,9 @@ msgstr ""
 msgid "invalid function in complex assignment"
 msgstr ""
 
+msgid "is not a registered math1 function"
+msgstr ""
+
 msgid "missing arguments are not allowed"
 msgstr "누락된 인자들이 있어서는 안됩니다"
 
@@ -81,6 +100,9 @@ msgstr "'%s'에 올바르지 않은 개수의 인자들이 있습니다"
 msgid "more than one default provided in switch() call"
 msgstr "switch() 함수호출시 주어진 기본값이 하나이상입니다"
 
+msgid "'switch' with no alternatives"
+msgstr ""
+
 msgid "cannot compile a non-function"
 msgstr "함수가 아닌 것을 컴파일 할 수 없습니다"
 
@@ -108,9 +130,15 @@ msgstr "파일 '%s'은 존재하지 않습니다"
 msgid "'%s' is not a valid compiler option"
 msgstr "'%s'은 선택가능한 컴파일러가 아닙니다"
 
+msgid "invalid compiler options: optimize(==%d)<2 and jitEnabled(==%d)>2"
+msgstr ""
+
 msgid "function is not compiled"
 msgstr "함수가 컴파일 되지 않았습니다"
 
+msgid "cannot compile this expression"
+msgstr "이 표현식(expression)은 컴파일 할 수 없습니다."
+
 msgid "local assignment to syntactic function: "
 msgid_plural "local assignments to syntactic functions: "
 msgstr[0] ""
diff --git a/src/library/compiler/po/R-pl.po b/src/library/compiler/po/R-pl.po
index 0fbf7b4..10e661f 100644
--- a/src/library/compiler/po/R-pl.po
+++ b/src/library/compiler/po/R-pl.po
@@ -1,8 +1,8 @@
 msgid ""
 msgstr ""
-"Project-Id-Version: R 3.1.0\n"
+"Project-Id-Version: R 3.4.0\n"
 "Report-Msgid-Bugs-To: bugs.r-project.org\n"
-"POT-Creation-Date: 2014-03-11 19:17\n"
+"POT-Creation-Date: 2016-04-04 08:15\n"
 "PO-Revision-Date: \n"
 "Last-Translator: Łukasz Daniel <lukasz.daniel at gmail.com>\n"
 "Language-Team: Łukasz Daniel <lukasz.daniel at gmail.com>\n"
@@ -13,307 +13,220 @@ msgstr ""
 "na-Revision-Date: 2012-05-29 07:55+0100\n"
 "Plural-Forms: nplurals=3; plural=(n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 "
 "|| n%100>=20) ? 1 : 2);\n"
-"X-Poedit-SourceCharset: iso-8859-1\n"
-"X-Generator: Poedit 1.5.4\n"
-
-# compiler/noweb/compiler.nw: 4939
-# stop("not a proper evaluation environment")
-# compiler/noweb/compiler.nw: 4951
-# stop("not a proper evaluation environment")
-# compiler/R/cmp.R: 97
-# stop("not a proper evaluation environment")
-# compiler/R/cmp.R: 105
-# stop("not a proper evaluation environment")
-msgid "not a proper evaluation environment"
-msgstr ""
-"dostarczony argument 'env' nie jest odpowiednim środowiskiem obliczeniowym"
+"X-Poedit-SourceCharset: UTF-8\n"
+"X-Generator: Poedit 1.8.7\n"
+
+#. R/cmp.R: gettextf("'%s' is not a valid compiler option", n)
+#: R/cmp.R:0
+msgid "'%s' is not a valid compiler option"
+msgstr "'%s' nie jest prawidłową opcją kompilatora"
 
-# compiler/noweb/compiler.nw: 5006
-# stop("'ns' must be a namespace or a namespace imports environment")
-# compiler/R/cmp.R: 128
-# stop("'ns' must be a namespace or a namespace imports environment")
+#. R/cmp.R: stop("'env' must be a top level environment")
+#: R/cmp.R:0
+msgid "'env' must be a top level environment"
+msgstr "'env' musi być środowiskiem o najwyższym poziomie"
+
+#. R/cmp.R: stop("'ns' must be a namespace or a namespace imports environment")
+#: R/cmp.R:0
 msgid "'ns' must be a namespace or a namespace imports environment"
 msgstr ""
 "'ns' musi być przestrzenią nazw lub przestrzenią nazw importującą środowisko"
 
-# compiler/noweb/compiler.nw: 1505
-# stop(gettextf("bad assignment: %s", pasteExpr(e)),
-#              domain = NA)
-# compiler/noweb/compiler.nw: 1512
-# stop(gettextf("bad assignment: %s", pasteExpr(e)),
-#                      domain = NA)
-# compiler/noweb/compiler.nw: 1516
-# stop(gettextf("bad assignment: %s", pasteExpr(e)),
-#                      domain = NA)
-# compiler/noweb/compiler.nw: 1520
-# stop(gettextf("bad assignment: %s", pasteExpr(e)),
-#                  domain = NA)
-# compiler/R/cmp.R: 194
-# stop(gettextf("bad assignment: %s", pasteExpr(e)),
-#              domain = NA)
-# compiler/R/cmp.R: 201
-# stop(gettextf("bad assignment: %s", pasteExpr(e)),
-#                      domain = NA)
-# compiler/R/cmp.R: 205
-# stop(gettextf("bad assignment: %s", pasteExpr(e)),
-#                      domain = NA)
-# compiler/R/cmp.R: 209
-# stop(gettextf("bad assignment: %s", pasteExpr(e)),
-#                  domain = NA)
+#. R/cmp.R: gettext("'switch' with no alternatives")
+#: R/cmp.R:0
+msgid "'switch' with no alternatives"
+msgstr "funkcja 'switch()' bez żadnych alternatyw"
+
+#. R/cmp.R: stop("bad assignment 1")
+#: R/cmp.R:0
+msgid "bad assignment 1"
+msgstr "złe przypisanie 1"
+
+#. R/cmp.R: stop("bad assignment 2")
+#: R/cmp.R:0
+msgid "bad assignment 2"
+msgstr "złe przypisanie 2"
+
+#. R/cmp.R: gettextf("bad assignment: %s", pasteExpr(e))
+#. R/cmp.R: gettextf("bad assignment: %s", pasteExpr(e))
+#. R/cmp.R: gettextf("bad assignment: %s", pasteExpr(e))
+#. R/cmp.R: gettextf("bad assignment: %s", pasteExpr(e))
+#: R/cmp.R:0
 msgid "bad assignment: %s"
 msgstr "złe przypisanie: %s"
 
-# compiler/noweb/compiler.nw: 4355
-# stop(gettext("cannot constant fold literal promises"),
-#                    cntxt)
-# compiler/R/cmp.R: 473
-# stop(gettext("cannot constant fold literal promises"),
-#                    cntxt)
-msgid "cannot constant fold literal promises"
-msgstr "nie można ukryć stałych z dosłownymi obietnicami"
-
-# compiler/noweb/compiler.nw: 4358
-# stop(gettext("cannot constant fold literal bytecode objects"),
-#                    cntxt)
-# compiler/R/cmp.R: 476
-# stop(gettext("cannot constant fold literal bytecode objects"),
-#                    cntxt)
-msgid "cannot constant fold literal bytecode objects"
-msgstr "nie można ukryć stałych dosłownych obiektów kodu bajtowego"
+#. R/cmp.R: gettext("bad namespace import frame")
+#: R/cmp.R:0
+msgid "bad namespace import frame"
+msgstr "zła przestrzeń nazw importowanej ramki"
 
-# compiler/noweb/compiler.nw: 883
-# stop(gettextf("no offset recorded for label \"%s\"", lbl),
-#                  domain = NA)
-# compiler/R/cmp.R: 758
-# stop(gettextf("no offset recorded for label \"%s\"", lbl),
-#                      domain = NA)
-msgid "no offset recorded for label \"%s\""
-msgstr "nie zarejestrowano przesunięcia dla etykiety \"%s\""
+#. R/cmp.R: stop("cannot compile a non-function")
+#: R/cmp.R:0
+msgid "cannot compile a non-function"
+msgstr "nie można skompilować nie-funkcji"
 
-# compiler/noweb/compiler.nw: 287
-# stop(gettext("cannot compile byte code literals in code"),
-#                cntxt)
-# compiler/noweb/compiler.nw: 666
-# stop(gettext("cannot compile byte code literals in code"),
-#                cntxt)
-# compiler/R/cmp.R: 875
-# stop(gettext("cannot compile byte code literals in code"),
-#                        cntxt)
-# compiler/R/cmp.R: 991
-# stop(gettext("cannot compile byte code literals in code"),
-#                        cntxt)
-# compiler/R/cmp.R: 1973
-# stop(gettext("cannot compile byte code literals in code"),
-#                        cntxt)
+#. R/cmp.R: gettext("cannot compile byte code literals in code")
+#. R/cmp.R: gettext("cannot compile byte code literals in code")
+#. R/cmp.R: gettext("cannot compile byte code literals in code")
+#: R/cmp.R:0
 msgid "cannot compile byte code literals in code"
 msgstr "nie można skompilować dosłownych bajtów kodu w kod"
 
-# compiler/noweb/compiler.nw: 290
-# stop(gettext("cannot compile promise literals in code"),
-#                cntxt)
-# compiler/noweb/compiler.nw: 669
-# stop(gettext("cannot compile promise literals in code"),
-#                cntxt)
-# compiler/R/cmp.R: 878
-# stop(gettext("cannot compile promise literals in code"),
-#                        cntxt)
-# compiler/R/cmp.R: 994
-# stop(gettext("cannot compile promise literals in code"),
-#                        cntxt)
-# compiler/R/cmp.R: 1976
-# stop(gettext("cannot compile promise literals in code"),
-#                        cntxt)
+#. R/cmp.R: gettext("cannot compile promise literals in code")
+#. R/cmp.R: gettext("cannot compile promise literals in code")
+#. R/cmp.R: gettext("cannot compile promise literals in code")
+#: R/cmp.R:0
 msgid "cannot compile promise literals in code"
 msgstr "nie można skompilować dosłownych obietnic w kod"
 
-# compiler/noweb/compiler.nw: 587
-# gettextf("possible error in '%s': %s",
-#                              deparse(call, 20)[1], msg)
-# compiler/R/cmp.R: 1038
-# gettextf("possible error in '%s': %s",
-#                              deparse(call, 20)[1], msg)
-msgid "possible error in '%s': %s"
-msgstr "prawdopodobny błąd w '%s': %s"
+#. R/cmp.R: gettext("cannot compile this expression")
+#. R/cmp.R: gettext("cannot compile this expression")
+#. R/cmp.R: gettext("cannot compile this expression")
+#. R/cmp.R: gettext("cannot compile this expression")
+#: R/cmp.R:0
+msgid "cannot compile this expression"
+msgstr "nie można skompilować tego wyrażenia"
 
-# compiler/noweb/compiler.nw: 1822
-# stop(gettext("bad namespace import frame"))
-# compiler/R/cmp.R: 1130
-# stop(gettext("bad namespace import frame"))
-msgid "bad namespace import frame"
-msgstr "zła przestrzeń nazw importowanej ramki"
-
-# compiler/noweb/compiler.nw: 3940
-# stop("bad assignment 1")
-# compiler/R/cmp.R: 1376
-# stop("bad assignment 1")
-msgid "bad assignment 1"
-msgstr "złe przypisanie 1"
+#. R/cmp.R: gettext("cannot constant fold literal bytecode objects")
+#: R/cmp.R:0
+msgid "cannot constant fold literal bytecode objects"
+msgstr "nie można ukryć stałych dosłownych obiektów kodu bajtowego"
 
-# compiler/noweb/compiler.nw: 3947
-# stop("bad assignment 2")
-# compiler/R/cmp.R: 1383
-# stop("bad assignment 2")
-msgid "bad assignment 2"
-msgstr "złe przypisanie 2"
+#. R/cmp.R: gettext("cannot constant fold literal promises")
+#: R/cmp.R:0
+msgid "cannot constant fold literal promises"
+msgstr "nie można ukryć stałych z dosłownymi obietnicami"
 
-# compiler/noweb/compiler.nw: 1207
-# gettext("invalid function in complex assignment")
-# compiler/noweb/compiler.nw: 3994
-# stop(gettext("invalid function in complex assignment"))
-# compiler/R/cmp.R: 1494
-# stop(gettext("invalid function in complex assignment"))
-# compiler/R/cmp.R: 2529
-# gettext("invalid function in complex assignment")
-msgid "invalid function in complex assignment"
-msgstr "niepoprawna funkcja w zespolonym przypisaniu"
+#. R/cmp.R: gettextf("compiling '%s'", f)
+#: R/cmp.R:0
+msgid "compiling '%s'"
+msgstr "kompilowanie '%s'"
 
-# compiler/noweb/compiler.nw: 1958
-# stop(gettext("missing arguments are not allowed"), cntxt)
-# compiler/R/cmp.R: 1969
-# stop(gettext("missing arguments are not allowed"), cntxt)
-msgid "missing arguments are not allowed"
-msgstr "brakujące argumenty nie są dozwolone"
+#. R/cmp.R: gettext("done")
+#. R/cmp.R: gettext("done")
+#: R/cmp.R:0
+msgid "done"
+msgstr "wykonano"
 
-# compiler/noweb/compiler.nw: 3565
-# stop("empty alternative in numeric switch")
-# compiler/R/cmp.R: 2373
-# stop("empty alternative in numeric switch")
+#. R/cmp.R: stop("empty alternative in numeric switch")
+#: R/cmp.R:0
 msgid "empty alternative in numeric switch"
 msgstr "pusta alternatywa w numerycznej instrukcji 'switch'"
 
-# compiler/noweb/compiler.nw: 1120
-# gettextf("no visible global function definition for '%s'",
-#                         as.character(fun))
-# compiler/R/cmp.R: 2481
-# gettextf("no visible global function definition for '%s'",
-#                         as.character(fun))
-msgid "no visible global function definition for '%s'"
-msgstr "brak widocznej globalnej definicji funkcji dla '%s'"
+#. R/cmp.R: warning("empty input file; no output written")
+#: R/cmp.R:0
+msgid "empty input file; no output written"
+msgstr "pusty plik wejściowy; brak zapisanego wyjścia"
 
-# compiler/noweb/compiler.nw: 1129
-# gettextf("no visible binding for global variable '%s'",
-#                         as.character(var))
-# compiler/R/cmp.R: 2489
-# gettextf("no visible binding for global variable '%s'",
-#                         as.character(var))
-msgid "no visible binding for global variable '%s'"
-msgstr "brak widocznego wiązania dla zmiennej globalnej '%s'"
+#. R/cmp.R: gettextf("file '%s' does not exist", file)
+#: R/cmp.R:0
+msgid "file '%s' does not exist"
+msgstr "plik '%s' nie istnieje"
 
-# compiler/noweb/compiler.nw: 1194
-# gettextf("no visible binding for '<<-' assignment to '%s'",
-#                         as.character(symbol))
-# compiler/R/cmp.R: 2497
-# gettextf("no visible binding for '<<-' assignment to '%s'",
-#                         as.character(symbol))
-msgid "no visible binding for '<<-' assignment to '%s'"
-msgstr "brak widocznego wiązania dla przypisania '<<-' do '%s'"
+#. R/cmp.R: stop("function is not compiled")
+#: R/cmp.R:0
+msgid "function is not compiled"
+msgstr "funkcja nie jest skompilowana"
 
-# compiler/noweb/compiler.nw: 1160
-# gettextf("wrong number of arguments to '%s'",
-#                             as.character(fun))
-# compiler/R/cmp.R: 2505
-# gettextf("wrong number of arguments to '%s'",
-#                             as.character(fun))
-msgid "wrong number of arguments to '%s'"
-msgstr "błędna liczba argumentów w '%s'"
+#. R/cmp.R: stop("input and output file names are the same")
+#: R/cmp.R:0
+msgid "input and output file names are the same"
+msgstr "nazwy plików wejścia i wyjścia są takie same"
+
+#. R/cmp.R: gettextf("invalid compiler options: optimize(==%d)<2 and jitEnabled(==%d)>2",     optimize, jitEnabled)
+#: R/cmp.R:0
+msgid "invalid compiler options: optimize(==%d)<2 and jitEnabled(==%d)>2"
+msgstr ""
+"niepoprawne opcje kompilatora: 'optimize(==%d)<2' oraz 'jitEnabled(==%d)>2'"
+
+#. R/cmp.R: gettext("invalid function in complex assignment")
+#. R/cmp.R: gettext("invalid function in complex assignment")
+#: R/cmp.R:0
+msgid "invalid function in complex assignment"
+msgstr "niepoprawna funkcja w zespolonym przypisaniu"
+
+#. R/cmp.R: stop(sQuote(name), "is not a registered math1 function")
+#: R/cmp.R:0
+msgid "is not a registered math1 function"
+msgstr ": to nie jest zarejestrowana funkcja math1"
+
+#. R/cmp.R: gettext("missing arguments are not allowed")
+#: R/cmp.R:0
+msgid "missing arguments are not allowed"
+msgstr "brakujące argumenty nie są dozwolone"
 
-# compiler/noweb/compiler.nw: 1218
-# gettext("more than one default provided in switch() call")
-# compiler/R/cmp.R: 2534
-# gettext("more than one default provided in switch() call")
+#. R/cmp.R: gettext("more than one default provided in switch() call")
+#: R/cmp.R:0
 msgid "more than one default provided in switch() call"
 msgstr "więcej niż jedna wartość domyślna dostarczona w wywołaniu 'switch()'"
 
-# compiler/noweb/compiler.nw: 4503
-# stop("cannot compile a non-function")
-# compiler/R/cmp.R: 2565
-# stop("cannot compile a non-function")
-msgid "cannot compile a non-function"
-msgstr "nie można skompilować nie-funkcji"
+#. R/cmp.R: stop("namespace found within global environments")
+#: R/cmp.R:0
+msgid "namespace found within global environments"
+msgstr "przestrzeń nazw znaleziona wewnątrz globalnych środowisk"
 
-# compiler/noweb/compiler.nw: 4618
-# gettextf("compiling '%s'", f)
-# compiler/R/cmp.R: 2586
-# gettextf("compiling '%s'", f)
-msgid "compiling '%s'"
-msgstr "kompilowanie '%s'"
+#. R/cmp.R: stop("namespace found within local environments")
+#: R/cmp.R:0
+msgid "namespace found within local environments"
+msgstr "przestrzeń nazw znaleziona wewnątrz lokalnych środowisk"
 
-# compiler/noweb/compiler.nw: 4553
-# gettextf("saving to file \"%s\" ... ", outfile)
-# compiler/noweb/compiler.nw: 4623
-# gettextf("saving to file \"%s\" ... ", file)
-# compiler/R/cmp.R: 2591
-# gettextf("saving to file \"%s\" ... ", file)
-# compiler/R/cmp.R: 2645
-# gettextf("saving to file \"%s\" ... ", outfile)
-msgid "saving to file \"%s\" ..."
-msgstr "zapisywanie do pliku '%s' ..."
+#. R/cmp.R: gettextf("no offset recorded for label \"%s\"", lbl)
+#: R/cmp.R:0
+msgid "no offset recorded for label \"%s\""
+msgstr "nie zarejestrowano przesunięcia dla etykiety \"%s\""
 
-# compiler/noweb/compiler.nw: 4555
-# gettext("done")
-# compiler/noweb/compiler.nw: 4625
-# gettext("done")
-# compiler/R/cmp.R: 2593
-# gettext("done")
-# compiler/R/cmp.R: 2647
-# gettext("done")
-msgid "done"
-msgstr "wykonano"
+#. R/cmp.R: gettextf("no visible binding for '<<-' assignment to '%s'", as.character(symbol))
+#: R/cmp.R:0
+msgid "no visible binding for '<<-' assignment to '%s'"
+msgstr "brak widocznego wiązania dla przypisania '<<-' do '%s'"
 
-# compiler/noweb/compiler.nw: 4525
-# stop("'env' must be a top level environment")
-# compiler/R/cmp.R: 2613
-# stop("'env' must be a top level environment")
-msgid "'env' must be a top level environment"
-msgstr "'env' musi być środowiskiem o najwyższym poziomie"
+#. R/cmp.R: gettextf("no visible binding for global variable '%s'", as.character(var))
+#: R/cmp.R:0
+msgid "no visible binding for global variable '%s'"
+msgstr "brak widocznego wiązania dla zmiennej globalnej '%s'"
 
-# compiler/noweb/compiler.nw: 4574
-# stop("input and output file names are the same")
-# compiler/R/cmp.R: 2619
-# stop("input and output file names are the same")
-msgid "input and output file names are the same"
-msgstr "nazwy plików wejścia i wyjścia są takie same"
+#. R/cmp.R: gettextf("no visible global function definition for '%s'", as.character(fun))
+#: R/cmp.R:0
+msgid "no visible global function definition for '%s'"
+msgstr "brak widocznej globalnej definicji funkcji dla '%s'"
 
-# compiler/noweb/compiler.nw: 4557
-# warning("empty input file; no output written")
-# compiler/R/cmp.R: 2649
-# warning("empty input file; no output written")
-msgid "empty input file; no output written"
-msgstr "pusty plik wejściowy; brak zapisanego wyjścia"
+#. R/cmp.R: stop("non-namespace found within namespace environments")
+#: R/cmp.R:0
+msgid "non-namespace found within namespace environments"
+msgstr ""
+"obiekt niebędący przestrzenią nazw znaleziony wewnątrz środowisk przestrzeni "
+"nazw"
 
-# compiler/noweb/compiler.nw: 4583
-# stop(gettextf("file '%s' does not exist", file), domain = NA)
-# compiler/R/cmp.R: 2655
-# stop(gettextf("file '%s' does not exist", file), domain = NA)
-msgid "file '%s' does not exist"
-msgstr "plik '%s' nie istnieje"
+#. R/cmp.R: stop("not a proper evaluation environment")
+#. R/cmp.R: stop("not a proper evaluation environment")
+#: R/cmp.R:0
+msgid "not a proper evaluation environment"
+msgstr ""
+"dostarczony argument 'env' nie jest odpowiednim środowiskiem obliczeniowym"
 
-# compiler/noweb/compiler.nw: 4667
-# stop(gettextf("'%s' is not a valid compiler option", n),
-#                  domain = NA)
-# compiler/R/cmp.R: 2681
-# stop(gettextf("'%s' is not a valid compiler option", n),
-#                  domain = NA)
-msgid "'%s' is not a valid compiler option"
-msgstr "'%s' nie jest prawidłową opcją kompilatora"
+#. R/cmp.R: gettextf("possible error in '%s': %s", deparse(call, 20)[1],     msg)
+#: R/cmp.R:0
+msgid "possible error in '%s': %s"
+msgstr "prawdopodobny błąd w '%s': %s"
 
-# compiler/noweb/compiler.nw: 4732
-# stop("function is not compiled")
-# compiler/R/cmp.R: 2756
-# stop("function is not compiled")
-msgid "function is not compiled"
-msgstr "funkcja nie jest skompilowana"
+#. R/cmp.R: gettextf("saving to file \"%s\" ... ", file)
+#. R/cmp.R: gettextf("saving to file \"%s\" ... ", outfile)
+#: R/cmp.R:0
+msgid "saving to file \"%s\" ..."
+msgstr "zapisywanie do pliku '%s' ..."
 
-# compiler/noweb/compiler.nw: 1668
-# ngettext(sum(rdsf),
-#                                 "local assignment to syntactic function: ",
-#                                 "local assignments to syntactic functions: ")
-# compiler/R/cmp.R: 269
-# ngettext(sum(rdsf),
-#                                 "local assignment to syntactic function: ",
-#                                 "local assignments to syntactic functions: ")
+#. R/cmp.R: gettextf("wrong number of arguments to '%s'", as.character(fun))
+#: R/cmp.R:0
+msgid "wrong number of arguments to '%s'"
+msgstr "błędna liczba argumentów w '%s'"
+
+#. R/cmp.R: ngettext(sum(rdsf), "local assignment to syntactic function: ",     "local assignments to syntactic functions: ")
+#: R/cmp.R:0
 msgid "local assignment to syntactic function: "
 msgid_plural "local assignments to syntactic functions: "
 msgstr[0] "lokalne przypisanie do funkcji syntaktycznej:"
 msgstr[1] "lokalne przypisania do funkcji syntaktycznych:"
 msgstr[2] "lokalne przypisania do funkcji syntaktycznych:"
+
+#~ msgid "%s is not a registered math1 function"
+#~ msgstr "%s nie jest zarejestrowaną funkcją 'math1'"
diff --git a/src/library/compiler/po/R-pt_BR.po b/src/library/compiler/po/R-pt_BR.po
index 5b980c3..b2fd574 100644
--- a/src/library/compiler/po/R-pt_BR.po
+++ b/src/library/compiler/po/R-pt_BR.po
@@ -2,7 +2,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: 2.13.0\n"
 "Report-Msgid-Bugs-To: bugs.r-project.org\n"
-"POT-Creation-Date: 2012-09-30 15:04\n"
+"POT-Creation-Date: 2016-04-01 09:50\n"
 "PO-Revision-Date: 2011-03-26 08:55-0300\n"
 "Last-Translator: Fernando Henrique <pessoal at fernandohrosa.com.br>\n"
 "Language-Team: http://www.feferraz.net/br/P/Projeto_Traducao_R_Portugues\n"
@@ -13,9 +13,20 @@ msgstr ""
 "Plural-Forms: nplurals=2; plural=(n > 1);\n"
 "X-Generator: Pootle 2.0.5\n"
 
+msgid "namespace found within local environments"
+msgstr ""
+
 msgid "not a proper evaluation environment"
 msgstr "não é um ambiente apropriado para avaliação"
 
+#, fuzzy
+msgid "non-namespace found within namespace environments"
+msgstr ""
+"'ns' deve ser um espaço de nomes ou um ambiente importado de espaço de nomes"
+
+msgid "namespace found within global environments"
+msgstr ""
+
 msgid "'ns' must be a namespace or a namespace imports environment"
 msgstr ""
 "'ns' deve ser um espaço de nomes ou um ambiente importado de espaço de nomes"
@@ -53,6 +64,9 @@ msgstr "atribuição inválida 2"
 msgid "invalid function in complex assignment"
 msgstr "função inválida em atribuição complexa"
 
+msgid "is not a registered math1 function"
+msgstr ""
+
 msgid "missing arguments are not allowed"
 msgstr "argumentos faltantes não são permitidos"
 
@@ -75,6 +89,9 @@ msgstr "número de argumentos inválidos para '%s'"
 msgid "more than one default provided in switch() call"
 msgstr "mais de um valor default fornecido na chamada de switch"
 
+msgid "'switch' with no alternatives"
+msgstr ""
+
 msgid "cannot compile a non-function"
 msgstr "não é possível compilar algo que não seja uma função"
 
@@ -102,9 +119,16 @@ msgstr "arquivo '%s' não existe"
 msgid "'%s' is not a valid compiler option"
 msgstr "'%s' não é uma opção válida de compilação"
 
+msgid "invalid compiler options: optimize(==%d)<2 and jitEnabled(==%d)>2"
+msgstr ""
+
 msgid "function is not compiled"
 msgstr "função não está compilada"
 
+#, fuzzy
+msgid "cannot compile this expression"
+msgstr "não é possível compilar promessas literais em código"
+
 msgid "local assignment to syntactic function: "
 msgid_plural "local assignments to syntactic functions: "
 msgstr[0] "atribuição local para função sintática: "
diff --git a/src/library/compiler/po/R-ru.po b/src/library/compiler/po/R-ru.po
index 3466492..0960d90 100644
--- a/src/library/compiler/po/R-ru.po
+++ b/src/library/compiler/po/R-ru.po
@@ -2,11 +2,11 @@ msgid ""
 msgstr ""
 "Project-Id-Version: R 2.13.0\n"
 "Report-Msgid-Bugs-To: bugs.r-project.org\n"
-"POT-Creation-Date: 2012-09-30 15:04\n"
-"PO-Revision-Date: 2013-03-19 19:17-0600\n"
+"POT-Creation-Date: 2015-06-06 13:51\n"
+"PO-Revision-Date: 2016-04-05 18:15-0600\n"
 "Last-Translator: Alexey Shipunov <dactylorhiza at gmail.com>\n"
 "Language-Team: Russian\n"
-"Language: \n"
+"Language: ru\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
@@ -53,6 +53,9 @@ msgstr "неправильное назначение 2"
 msgid "invalid function in complex assignment"
 msgstr "неверная функция в сложном назначении"
 
+msgid "%s is not a registered math1 function"
+msgstr "%s -- незарегистрированная math1-функция"
+
 msgid "missing arguments are not allowed"
 msgstr "пропущенные аргументы не допустимы"
 
@@ -104,6 +107,9 @@ msgstr "'%s' не является опцией компилятора"
 msgid "function is not compiled"
 msgstr "функция не скомпилирована"
 
+msgid "cannot compile this expression"
+msgstr "не могу скомпилировать это выражение"
+
 msgid "local assignment to syntactic function: "
 msgid_plural "local assignments to syntactic functions: "
 msgstr[0] "локальное назначение синтаксической функции:"
diff --git a/src/library/compiler/po/R-zh_CN.po b/src/library/compiler/po/R-zh_CN.po
index 7f1be25..cfb77bc 100644
--- a/src/library/compiler/po/R-zh_CN.po
+++ b/src/library/compiler/po/R-zh_CN.po
@@ -7,19 +7,29 @@ msgid ""
 msgstr ""
 "Project-Id-Version: R 2.15.0\n"
 "Report-Msgid-Bugs-To: bugs.r-project.org\n"
-"POT-Creation-Date: 2013-03-07 08:36\n"
+"POT-Creation-Date: 2016-04-01 09:50\n"
 "PO-Revision-Date: 2005-03-15 08:37+0000\n"
 "Last-Translator: 陈斐 <feic at normipaiva.com>\n"
 "Language-Team: Chinese\n"
-"Language: \n"
+"Language: zh_CN\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
 "Plural-Forms: nplurals=2; plural=0;\n"
 
+msgid "namespace found within local environments"
+msgstr ""
+
 msgid "not a proper evaluation environment"
 msgstr "不是一个正确的评估环境"
 
+#, fuzzy
+msgid "non-namespace found within namespace environments"
+msgstr "'ns'必须是一个命名空间或命名空间的进口环境"
+
+msgid "namespace found within global environments"
+msgstr ""
+
 msgid "'ns' must be a namespace or a namespace imports environment"
 msgstr "'ns'必须是一个命名空间或命名空间的进口环境"
 
@@ -56,6 +66,9 @@ msgstr "2分配出了错"
 msgid "invalid function in complex assignment"
 msgstr "复杂分配里的函数不对"
 
+msgid "is not a registered math1 function"
+msgstr ""
+
 msgid "missing arguments are not allowed"
 msgstr "不允许缺少参数"
 
@@ -77,6 +90,9 @@ msgstr "给'%s'的参数个数不对"
 msgid "more than one default provided in switch() call"
 msgstr "调用switch()时只能有一个默认值"
 
+msgid "'switch' with no alternatives"
+msgstr ""
+
 msgid "cannot compile a non-function"
 msgstr "无法编译非函数"
 
@@ -104,9 +120,16 @@ msgstr "没有'%s'这样的文件"
 msgid "'%s' is not a valid compiler option"
 msgstr "没有'%s'这样的编译器选项"
 
+msgid "invalid compiler options: optimize(==%d)<2 and jitEnabled(==%d)>2"
+msgstr ""
+
 msgid "function is not compiled"
 msgstr "函数没有被编制"
 
+#, fuzzy
+msgid "cannot compile this expression"
+msgstr "不能编译代码中的承诺文字"
+
 msgid "local assignment to syntactic function: "
 msgid_plural "local assignments to syntactic functions: "
 msgstr[0] "为句法函数作了本地分配:"
diff --git a/src/library/compiler/tests/assign.R b/src/library/compiler/tests/assign.R
index 96291b0..9f4de32 100644
--- a/src/library/compiler/tests/assign.R
+++ b/src/library/compiler/tests/assign.R
@@ -134,10 +134,14 @@ stopifnot(identical(checkAssign(quote(f(g("x")) <- 1), cntxt), FALSE))
 
 ## flattenPlace
 flattenPlace <- compiler:::flattenPlace
-stopifnot(identical(flattenPlace(quote(f(g(h(x, k), j), i))),
+stopifnot(identical(flattenPlace(quote(f(g(h(x, k), j), i)))$places,
                     list(quote(f(`*tmp*`, i)),
                          quote(g(`*tmp*`, j)),
                          quote(h(`*tmp*`, k)))))
+stopifnot(identical(flattenPlace(quote(f(g(h(x, k), j), i)))$origplaces,
+                    list(quote(f(g(h(x, k), j), i)),
+                         quote(g(h(x, k), j)),
+                         quote(h(x, k)))))
 
 ## getAssignFun
 getAssignFun <- compiler:::getAssignFun
diff --git a/src/library/compiler/tests/basics.R b/src/library/compiler/tests/basics.R
index adf61f9..0a6120c 100644
--- a/src/library/compiler/tests/basics.R
+++ b/src/library/compiler/tests/basics.R
@@ -1,5 +1,7 @@
 library(compiler)
 
+options(keep.source=TRUE)
+
 ## very minimal
 x <- 2
 stopifnot(eval(compile(quote(x + 1))) == 3)
@@ -20,12 +22,12 @@ stopifnot(checkCode(quote(x + 1),
 f <- function(x) x
 checkCode(quote({f(1); f(2)}),
           c(GETFUN.OP, 1L,
-            PUSHCONSTARG.OP, 2L,
-            CALL.OP, 3L,
+            PUSHCONSTARG.OP, 3L,
+            CALL.OP, 4L,
             POP.OP,
             GETFUN.OP, 1L,
-            PUSHCONSTARG.OP, 4L,
-            CALL.OP, 5L,
+            PUSHCONSTARG.OP, 6L,
+            CALL.OP, 7L,
             RETURN.OP))
 
 
diff --git a/src/library/compiler/tests/curexpr.R b/src/library/compiler/tests/curexpr.R
new file mode 100644
index 0000000..aef1867
--- /dev/null
+++ b/src/library/compiler/tests/curexpr.R
@@ -0,0 +1,95 @@
+library(compiler)
+
+# set to TRUE for debugging
+only.print <- FALSE
+
+testError <- function(expr, handler) {
+    err <- tryCatch(expr, error = handler)
+    stopifnot(identical(err, TRUE))
+}
+
+testWarning <- function(expr, handler) {
+    warn <- tryCatch(expr, warning = handler)
+    stopifnot(identical(warn, TRUE))
+}
+
+w <- function(expr, call = substitute(expr)) {
+    if (only.print)
+       testWarning(expr = expr, handler = function(e) {
+           cat("WARNING-MESSAGE: \"", e$message, "\"\nWARNING-CALL: ", deparse(e$call), "\n", sep="")
+           TRUE
+       })
+    else
+       testWarning(expr = expr, handler = function(e) {
+           stopifnot(identical(e$call, call))
+           TRUE
+       })
+}
+
+e <- function(expr, call = substitute(expr)) {
+    if (only.print)
+       testError(expr = expr, handler = function(e) {
+           cat("ERROR-MESSAGE: \"", e$message, "\"\nERROR-CALL: ", deparse(e$call), "\n", sep="")
+           TRUE
+       })
+    else
+       testError(expr = expr, handler = function(e) {
+           stopifnot(identical(e$call, call))
+           TRUE
+       })
+}
+
+f <- function(x = 1:2,
+        y = -1,
+        z = c(a=1, b=2, c=2, d=3),
+        u = list(inner = c(a=1,b=2,c=3,d=4)),
+        v = list(),
+        ...) {
+
+
+    w(x[1:3] <- 11:12)
+        # quote(`[<-`(x, 1:3, value = 11:12))
+    w(min(...))
+    w(sqrt(y))
+
+    e(names(z[1:2]) <- c("X", "Y", "Z"))
+        # quote(`names<-`(z[1:2], value = c("X", "Y", "Z"))
+    e(names(z[c(-1,1)]) <- c("X", "Y", "Z"),
+        # quote(z[c(-1, 1)])) <=== this would be nice, but not possible at the moment
+        quote(`*tmp*`[c(-1, 1)]))
+    w(names(u$inner)[2:4] <- v[1:2] <- c("X", "Y", "Z", "U")[1:2])
+        # quote(`[<-`(names(u$inner), 2:4, value = v[1:2] <- c("X", "Y", "Z", "U")[1:2]))
+
+    e(stopifnot(is.numeric(dummy)))
+}
+
+old=options()
+
+oldoptimize <- getCompilerOption("optimize")
+oldjit <- enableJIT(3)
+
+for (opt in 2:3) {
+    setCompilerOptions(optimize=opt)
+    f()
+}
+
+## test that AST and compiler errors/warnings agree
+
+enableJIT(0)
+testexpr <- function(fun) {
+  resast <- tryCatch(fun(), error = function(e) e, warning = function(e) e)
+  cfun <- cmpfun(fun)
+  rescmp <- tryCatch(cfun(), error = function(e) e, warning = function(e) e)
+
+  show(resast)
+  show(rescmp)
+
+  stopifnot(identical(resast, rescmp))
+}
+
+testexpr(function() { dummy()$e })
+testexpr(function() { beta(-1, NULL) })
+testexpr(function() { inherits(1, log) })
+
+enableJIT(oldjit)
+setCompilerOptions(optimize = oldoptimize)
diff --git a/src/library/compiler/tests/srcref.R b/src/library/compiler/tests/srcref.R
new file mode 100644
index 0000000..2e67e1e
--- /dev/null
+++ b/src/library/compiler/tests/srcref.R
@@ -0,0 +1,77 @@
+library(compiler)
+
+# This tests tracking of source file references
+
+options(keep.source=TRUE)
+ln <- function() attr(sys.call(), "srcref")[1]
+
+# NOTE: the block below is sensitive to formatting (newlines)
+
+code <- quote({
+    start <- ln()
+    plus1 <- ln()                          # start + 1
+    stopifnot(identical(plus1, start+1L))
+    {
+        plus4 <- ln()                         # start + 4
+    }
+    stopifnot(identical(plus4, start+4L))
+    plus9 <- 0
+    f <- function() {
+        plus9 <<- ln()                       # start + 9
+    }
+    f()
+    stopifnot(identical(plus9, start+9L))
+    g <- function(x = ln()) x              # start + 13
+    plus13 <- g()
+    stopifnot(identical(plus13, start+13L))
+    plus16 <- g(ln())                      # start + 16
+    stopifnot(identical(plus16, start+13L) || identical(plus16, start+16L)) ### NOTE: see compatibility note below
+    for(i in 1) plus18 <- ln()             # start + 18
+    stopifnot(identical(plus18, start+18L))
+    for(i in 1) { plus20 <- ln() }         # start + 20
+    stopifnot(identical(plus20, start+20L))
+    for(i in 1) {
+        plus23 <- ln()                       # start + 23
+    }
+    stopifnot(identical(plus23, start+23L))
+    ff <- function() for(i in 1) return(ln()) # start + 26
+    plus26 <- ff()
+    stopifnot(identical(plus26, start+26L))
+    ff1 <- function() {
+        for(i in 1) return(ln())             # start + 30
+    }
+    plus30 <- ff1()
+    stopifnot(identical(plus30, start+30L))
+})
+
+## Compatibility note
+##
+## in the example above, "plus16" with the AST interpreter gets line number
+## start+13, but with the compiler, it gets start+16.  The latter seems to
+## be more correct, as line start+16 is where the spelling of "ln()" is.
+
+oldoptimize <- getCompilerOption("optimize")
+oldjit <- enableJIT(0)
+
+l <- function() 1
+body(l) <- code
+
+for(jit in 0:2) {
+    enableJIT(jit)
+    for (opt in 0:3) {
+        if (opt >=2 || jit <=2) {
+            setCompilerOptions(optimize=opt)
+            eval(code)
+            eval(compile(code))
+            body(l) <- code
+            l()
+            body(l) <- code
+            cmpfun(l)()
+            local(eval(code))
+            do.call("local", list(code))
+        }
+    }
+}
+
+setCompilerOptions(optimize = oldoptimize)
+enableJIT(oldjit)
diff --git a/src/library/compiler/tests/switch.R b/src/library/compiler/tests/switch.R
index 42c846e..6309868 100644
--- a/src/library/compiler/tests/switch.R
+++ b/src/library/compiler/tests/switch.R
@@ -84,3 +84,15 @@ stopifnot(identical(ev(quote(lc(1))), ev(quote(l(1)))))
 stopifnot(identical(ev(quote(lc(2))), ev(quote(l(2)))))
 stopifnot(identical(ev(quote(lc(3))), ev(quote(l(3)))))
 stopifnot(identical(ev(quote(lc(4))), ev(quote(l(4)))))
+
+l <- function(x) switch(x)
+lc <- cmpfun(l)
+
+cw <- function(expr) tryCatch(expr, warning = function(w) w)
+
+stopifnot(identical(cw(l(1)), cw(lc(1))))
+stopifnot(identical(cw(l("A")), cw(lc("A"))))
+suppressWarnings(stopifnot(identical(withVisible(l(1)),
+                                     withVisible(lc(1)))))
+suppressWarnings(stopifnot(identical(withVisible(l("A")),
+                                     withVisible(lc("A")))))
diff --git a/src/library/datasets/DESCRIPTION.in b/src/library/datasets/DESCRIPTION.in
index 79f2ce3..880ae42 100644
--- a/src/library/datasets/DESCRIPTION.in
+++ b/src/library/datasets/DESCRIPTION.in
@@ -4,5 +4,5 @@ Priority: base
 Title: The R Datasets Package
 Author: R Core Team and contributors worldwide
 Maintainer: R Core Team <R-core at r-project.org>
-Description: Base R datasets
+Description: Base R datasets.
 License: Part of R @VERSION@
diff --git a/src/library/datasets/NAMESPACE b/src/library/datasets/NAMESPACE
index 5d0f475..66a4aa6 100644
--- a/src/library/datasets/NAMESPACE
+++ b/src/library/datasets/NAMESPACE
@@ -1,2 +1,2 @@
-# This package exports nothing (it uses lazydata)
-# exportPattern(".")
+# This package exports nothing (it uses lazydata)
+# exportPattern(".")
diff --git a/src/library/datasets/data/UScitiesD.rda b/src/library/datasets/data/UScitiesD.rda
new file mode 100644
index 0000000..37622be
Binary files /dev/null and b/src/library/datasets/data/UScitiesD.rda differ
diff --git a/src/library/datasets/data/precip.R b/src/library/datasets/data/precip.R
index 5f6132c..71c8b5d 100644
--- a/src/library/datasets/data/precip.R
+++ b/src/library/datasets/data/precip.R
@@ -1,20 +1,20 @@
 "precip" <-
-structure(c(67, 54.7, 7, 48.5, 14, 17.2, 20.7, 13, 43.4, 40.2, 38.9, 54.5, 
-59.8, 48.3, 22.9, 11.5, 34.4, 35.1, 38.7, 30.8, 30.6, 43.1, 56.8, 40.8, 
-41.8, 42.5, 31, 31.7, 30.2, 25.9, 49.2, 37, 35.9, 15, 30.2, 7.2, 36.2, 
-45.5, 7.8, 33.4, 36.1, 40.2, 42.7, 42.5, 16.2, 39, 35, 37, 31.4, 37.6, 
-39.9, 36.2, 42.8, 46.4, 24.7, 49.1, 46, 35.9, 7.8, 48.2, 15.2, 32.5, 44.7, 
-42.6, 38.8, 17.4, 40.8, 29.1, 14.6, 59.2), .Names = c("Mobile", "Juneau", 
-"Phoenix", "Little Rock", "Los Angeles", "Sacramento", "San Francisco", 
-"Denver", "Hartford", "Wilmington", "Washington", "Jacksonville", "Miami", 
+structure(c(67, 54.7, 7, 48.5, 14, 17.2, 20.7, 13, 43.4, 40.2, 38.9, 54.5,
+59.8, 48.3, 22.9, 11.5, 34.4, 35.1, 38.7, 30.8, 30.6, 43.1, 56.8, 40.8,
+41.8, 42.5, 31, 31.7, 30.2, 25.9, 49.2, 37, 35.9, 15, 30.2, 7.2, 36.2,
+45.5, 7.8, 33.4, 36.1, 40.2, 42.7, 42.5, 16.2, 39, 35, 37, 31.4, 37.6,
+39.9, 36.2, 42.8, 46.4, 24.7, 49.1, 46, 35.9, 7.8, 48.2, 15.2, 32.5, 44.7,
+42.6, 38.8, 17.4, 40.8, 29.1, 14.6, 59.2), .Names = c("Mobile", "Juneau",
+"Phoenix", "Little Rock", "Los Angeles", "Sacramento", "San Francisco",
+"Denver", "Hartford", "Wilmington", "Washington", "Jacksonville", "Miami",
 "Atlanta", "Honolulu", "Boise", "Chicago", "Peoria", "Indianapolis",
 "Des Moines", "Wichita", "Louisville", "New Orleans", "Portland",
 "Baltimore", "Boston", "Detroit", "Sault Ste. Marie", "Duluth",
 "Minneapolis/St Paul", "Jackson", "Kansas City", "St Louis", "Great Falls",
 "Omaha", "Reno", "Concord", "Atlantic City", "Albuquerque", "Albany",
-"Buffalo", "New York", "Charlotte", "Raleigh", "Bismark", "Cincinati",
+"Buffalo", "New York", "Charlotte", "Raleigh", "Bismark", "Cincinnati",
 "Cleveland", "Columbus", "Oklahoma City", "Portland", "Philadelphia",
 "Pittsburg", "Providence", "Columbia", "Sioux Falls", "Memphis",
-"Nashville", "Dallas", "El Paso", "Houston", "Salt Lake City", "Burlington", 
-"Norfolk", "Richmond", "Seattle Tacoma", "Spokane", "Charleston", "Milwaukee", 
+"Nashville", "Dallas", "El Paso", "Houston", "Salt Lake City", "Burlington",
+"Norfolk", "Richmond", "Seattle Tacoma", "Spokane", "Charleston", "Milwaukee",
 "Cheyenne", "San Juan"))
diff --git a/src/library/datasets/man/AirPassengers.Rd b/src/library/datasets/man/AirPassengers.Rd
index 5cb09c6..3a68756 100644
--- a/src/library/datasets/man/AirPassengers.Rd
+++ b/src/library/datasets/man/AirPassengers.Rd
@@ -1,5 +1,5 @@
 % File src/library/datasets/man/AirPassengers.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2007 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/datasets/man/BJsales.Rd b/src/library/datasets/man/BJsales.Rd
index 9e9ba11..df413fd 100644
--- a/src/library/datasets/man/BJsales.Rd
+++ b/src/library/datasets/man/BJsales.Rd
@@ -1,10 +1,8 @@
 % File src/library/datasets/man/BJsales.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2007 R Core Team
 % Distributed under GPL 2 or later
 
-\newcommand{\sspace}{\ifelse{latex}{\out{~}}{ }}
-
 \name{BJsales}
 \docType{data}
 \alias{BJsales}
diff --git a/src/library/datasets/man/BOD.Rd b/src/library/datasets/man/BOD.Rd
index 028aa3a..2e91649 100644
--- a/src/library/datasets/man/BOD.Rd
+++ b/src/library/datasets/man/BOD.Rd
@@ -1,5 +1,5 @@
 % File src/library/datasets/man/BOD.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2014 R Core Team
 % Distributed under GPL 2 or later
 
@@ -34,7 +34,7 @@
   M.Sc. Thesis, University of Wisconsin -- Madison.
 }
 \examples{
-\testonly{options(show.nls.convergence=FALSE)
+\dontshow{options(show.nls.convergence=FALSE)
 old <- options(digits = 5)}
 require(stats)
 # simplest form of fitting a first-order model to these data
@@ -48,6 +48,6 @@ fm2 <- nls(demand ~ (1-exp(-exp(lrc)*Time)), data = BOD,
 # using a self-starting model
 fm3 <- nls(demand ~ SSasympOrig(Time, A, lrc), data = BOD)
 summary(fm3)
-\testonly{options(old)}
+\dontshow{options(old)}
 }
 \keyword{datasets}
diff --git a/src/library/datasets/man/ChickWeight.Rd b/src/library/datasets/man/ChickWeight.Rd
index 265a4ed..2bc5cc6 100644
--- a/src/library/datasets/man/ChickWeight.Rd
+++ b/src/library/datasets/man/ChickWeight.Rd
@@ -1,5 +1,5 @@
 % File src/library/datasets/man/ChickWeight.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2011 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/datasets/man/DNase.Rd b/src/library/datasets/man/DNase.Rd
index a60193d..c063e95 100644
--- a/src/library/datasets/man/DNase.Rd
+++ b/src/library/datasets/man/DNase.Rd
@@ -1,10 +1,8 @@
 % File src/library/datasets/man/DNase.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2011 R Core Team
 % Distributed under GPL 2 or later
 
-\newcommand{\sspace}{\ifelse{latex}{\out{~}}{ }}
-
 \name{DNase}
 \docType{data}
 \alias{DNase}
@@ -51,7 +49,7 @@
 }
 \examples{
 require(stats); require(graphics)
-\testonly{options(show.nls.convergence=FALSE)}
+\dontshow{options(show.nls.convergence=FALSE)}
 coplot(density ~ conc | Run, data = DNase,
        show.given = FALSE, type = "b")
 coplot(density ~ log(conc) | Run, data = DNase,
diff --git a/src/library/datasets/man/EuStockMarkets.Rd b/src/library/datasets/man/EuStockMarkets.Rd
index 0c99e7b..54297d3 100644
--- a/src/library/datasets/man/EuStockMarkets.Rd
+++ b/src/library/datasets/man/EuStockMarkets.Rd
@@ -1,5 +1,5 @@
 % File src/library/datasets/man/EuStockMarkets.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2007 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/datasets/man/Formaldehyde.Rd b/src/library/datasets/man/Formaldehyde.Rd
index 237c2df..d65842f 100644
--- a/src/library/datasets/man/Formaldehyde.Rd
+++ b/src/library/datasets/man/Formaldehyde.Rd
@@ -1,5 +1,5 @@
 % File src/library/datasets/man/Formaldehyde.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2009 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/datasets/man/HairEyeColor.Rd b/src/library/datasets/man/HairEyeColor.Rd
index 5dbe407..c9daa00 100644
--- a/src/library/datasets/man/HairEyeColor.Rd
+++ b/src/library/datasets/man/HairEyeColor.Rd
@@ -1,10 +1,8 @@
 % File src/library/datasets/man/HairEyeColor.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2007 R Core Team
 % Distributed under GPL 2 or later
 
-\newcommand{\sspace}{\ifelse{latex}{\out{~}}{ }}
-
 \name{HairEyeColor}
 \docType{data}
 \alias{HairEyeColor}
diff --git a/src/library/datasets/man/Harman23.cor.Rd b/src/library/datasets/man/Harman23.cor.Rd
index 298bfe2..d421d6e 100644
--- a/src/library/datasets/man/Harman23.cor.Rd
+++ b/src/library/datasets/man/Harman23.cor.Rd
@@ -1,5 +1,5 @@
 % File src/library/datasets/man/Harman23.cor.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2007 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/datasets/man/Harman74.cor.Rd b/src/library/datasets/man/Harman74.cor.Rd
index 6e778a8..016613d 100644
--- a/src/library/datasets/man/Harman74.cor.Rd
+++ b/src/library/datasets/man/Harman74.cor.Rd
@@ -1,5 +1,5 @@
 % File src/library/datasets/man/Harman74.cor.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2007 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/datasets/man/Indometh.Rd b/src/library/datasets/man/Indometh.Rd
index 5be3265..72ef3d2 100644
--- a/src/library/datasets/man/Indometh.Rd
+++ b/src/library/datasets/man/Indometh.Rd
@@ -1,10 +1,8 @@
 % File src/library/datasets/man/Indometh.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2011 R Core Team
 % Distributed under GPL 2 or later
 
-\newcommand{\sspace}{\ifelse{latex}{\out{~}}{ }}
-
 \name{Indometh}
 \docType{data}
 \alias{Indometh}
diff --git a/src/library/datasets/man/InsectSprays.Rd b/src/library/datasets/man/InsectSprays.Rd
index 66fbea4..1466f30 100644
--- a/src/library/datasets/man/InsectSprays.Rd
+++ b/src/library/datasets/man/InsectSprays.Rd
@@ -1,5 +1,5 @@
 % File src/library/datasets/man/InsectSprays.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2007 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/datasets/man/JohnsonJohnson.Rd b/src/library/datasets/man/JohnsonJohnson.Rd
index 5b88609..fa20abe 100644
--- a/src/library/datasets/man/JohnsonJohnson.Rd
+++ b/src/library/datasets/man/JohnsonJohnson.Rd
@@ -1,5 +1,5 @@
 % File src/library/datasets/man/JohnsonJohnson.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2007 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/datasets/man/LakeHuron.Rd b/src/library/datasets/man/LakeHuron.Rd
index 0cfa2fe..7ba4eb0 100644
--- a/src/library/datasets/man/LakeHuron.Rd
+++ b/src/library/datasets/man/LakeHuron.Rd
@@ -1,5 +1,5 @@
 % File src/library/datasets/man/LakeHuron.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2007 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/datasets/man/LifeCycleSavings.Rd b/src/library/datasets/man/LifeCycleSavings.Rd
index 3aa38cc..5730778 100644
--- a/src/library/datasets/man/LifeCycleSavings.Rd
+++ b/src/library/datasets/man/LifeCycleSavings.Rd
@@ -1,5 +1,5 @@
 % File src/library/datasets/man/LifeCycleSavings.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2007 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/datasets/man/Loblolly.Rd b/src/library/datasets/man/Loblolly.Rd
index ace1823..ea6b756 100644
--- a/src/library/datasets/man/Loblolly.Rd
+++ b/src/library/datasets/man/Loblolly.Rd
@@ -1,5 +1,5 @@
 % File src/library/datasets/man/Loblolly.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2011 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/datasets/man/Nile.Rd b/src/library/datasets/man/Nile.Rd
index 5094e27..e580086 100644
--- a/src/library/datasets/man/Nile.Rd
+++ b/src/library/datasets/man/Nile.Rd
@@ -1,6 +1,6 @@
 % File src/library/datasets/man/Nile.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2007 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2016 R Core Team
 % Distributed under GPL 2 or later
 
 \name{Nile}
@@ -9,7 +9,9 @@
 \title{Flow of the River Nile}
 \usage{Nile}
 \description{
-  Measurements of the annual flow of the river Nile at Ashwan 1871--1970.
+  Measurements of the annual flow of the river Nile at Aswan (formerly
+  \code{Assuan}), 1871--1970, in \eqn{10^8 m^3},
+  \dQuote{with apparent changepoint near 1898} (Cobb(1978), Table 1, p.249).
 }
 \format{
   A time series of length 100.
diff --git a/src/library/datasets/man/Orange.Rd b/src/library/datasets/man/Orange.Rd
index 61f862e..24d0c23 100644
--- a/src/library/datasets/man/Orange.Rd
+++ b/src/library/datasets/man/Orange.Rd
@@ -1,5 +1,5 @@
 % File src/library/datasets/man/Orange.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2011 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/datasets/man/OrchardSprays.Rd b/src/library/datasets/man/OrchardSprays.Rd
index 83d79fb..d606372 100644
--- a/src/library/datasets/man/OrchardSprays.Rd
+++ b/src/library/datasets/man/OrchardSprays.Rd
@@ -1,5 +1,5 @@
 % File src/library/datasets/man/OrchardSprays.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2007 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/datasets/man/PlantGrowth.Rd b/src/library/datasets/man/PlantGrowth.Rd
index 3f3afa5..fddc376 100644
--- a/src/library/datasets/man/PlantGrowth.Rd
+++ b/src/library/datasets/man/PlantGrowth.Rd
@@ -1,5 +1,5 @@
 % File src/library/datasets/man/PlantGrowth.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2007 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/datasets/man/Puromycin.Rd b/src/library/datasets/man/Puromycin.Rd
index 120cb12..0d95d72 100644
--- a/src/library/datasets/man/Puromycin.Rd
+++ b/src/library/datasets/man/Puromycin.Rd
@@ -1,5 +1,5 @@
 % File src/library/datasets/man/Puromycin.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2014 R Core Team
 % Distributed under GPL 2 or later
 
@@ -53,7 +53,7 @@
 }
 \examples{
 require(stats); require(graphics)
-\testonly{options(show.nls.convergence=FALSE)}
+\dontshow{options(show.nls.convergence=FALSE)}
 plot(rate ~ conc, data = Puromycin, las = 1,
      xlab = "Substrate concentration (ppm)",
      ylab = "Reaction velocity (counts/min/min)",
diff --git a/src/library/datasets/man/Theoph.Rd b/src/library/datasets/man/Theoph.Rd
index 0608ad4..ce99da8 100644
--- a/src/library/datasets/man/Theoph.Rd
+++ b/src/library/datasets/man/Theoph.Rd
@@ -1,10 +1,8 @@
 % File src/library/datasets/man/Theoph.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2011 R Core Team
 % Distributed under GPL 2 or later
 
-\newcommand{\sspace}{\ifelse{latex}{\out{~}}{ }}
-
 \name{Theoph}
 \docType{data}
 \alias{Theoph}
@@ -69,7 +67,7 @@
 \seealso{\code{\link{SSfol}}}
 \examples{
 require(stats); require(graphics)
-\testonly{options(show.nls.convergence=FALSE)}
+\dontshow{options(show.nls.convergence=FALSE)}
 coplot(conc ~ Time | Subject, data = Theoph, show.given = FALSE)
 Theoph.4 <- subset(Theoph, Subject == 4)
 fm1 <- nls(conc ~ SSfol(Dose, Time, lKe, lKa, lCl),
diff --git a/src/library/datasets/man/Titanic.Rd b/src/library/datasets/man/Titanic.Rd
index 4fed067..8015ff3 100644
--- a/src/library/datasets/man/Titanic.Rd
+++ b/src/library/datasets/man/Titanic.Rd
@@ -1,5 +1,5 @@
 % File src/library/datasets/man/Titanic.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2007 R Core Team
 % Distributed under GPL 2 or later
 
@@ -50,7 +50,7 @@
   Dawson, Robert J. MacG. (1995),
   The \sQuote{Unusual Episode} Data Revisited.
   \emph{Journal of Statistics Education}, \bold{3}.
-  \url{http://www.amstat.org/publications/jse/v3n3/datasets.dawson.html}
+  \url{https://www.amstat.org/publications/jse/v3n3/datasets.dawson.html}
 
   The source provides a data set recording class, sex, age, and survival
   status for each person on board of the Titanic, and is based on data
diff --git a/src/library/datasets/man/ToothGrowth.Rd b/src/library/datasets/man/ToothGrowth.Rd
index 1192224..2e1a044 100644
--- a/src/library/datasets/man/ToothGrowth.Rd
+++ b/src/library/datasets/man/ToothGrowth.Rd
@@ -1,6 +1,6 @@
 % File src/library/datasets/man/ToothGrowth.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2007 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2015 R Core Team
 % Distributed under GPL 2 or later
 
 \name{ToothGrowth}
@@ -8,10 +8,11 @@
 \alias{ToothGrowth}
 \title{The Effect of Vitamin C on Tooth Growth in Guinea Pigs}
 \description{
-  The response is the length of odontoblasts (teeth) in each of 10
-  guinea pigs at each of three dose levels of Vitamin C (0.5, 1, and 2
-  mg) with each of two delivery methods (orange juice or ascorbic
-  acid).
+  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
+  as \code{VC}).
 }
 \usage{ToothGrowth}
 \format{
@@ -19,7 +20,7 @@
   \tabular{rlll}{
     [,1]  \tab len   \tab numeric  \tab Tooth length\cr
     [,2]  \tab supp  \tab factor   \tab Supplement type (VC or OJ).\cr
-    [,3]  \tab dose  \tab numeric  \tab Dose in milligrams.
+    [,3]  \tab dose  \tab numeric  \tab Dose in milligrams/day
   }
 }
 \source{
@@ -31,6 +32,12 @@
   McNeil, D. R. (1977)
   \emph{Interactive Data Analysis}.
   New York: Wiley.
+
+  Crampton, E. W. (1947)
+  The growth of the odontoblast of the incisor teeth as a criterion of
+  vitamin C intake of the guinea pig. \emph{The Journal of Nutrition}
+  \bold{33(5)}: 491--504.
+  \url{http://jn.nutrition.org/content/33/5/491.full.pdf}
 }
 \examples{
 require(graphics)
diff --git a/src/library/datasets/man/UCBAdmissions.Rd b/src/library/datasets/man/UCBAdmissions.Rd
index a3beb33..5345e14 100644
--- a/src/library/datasets/man/UCBAdmissions.Rd
+++ b/src/library/datasets/man/UCBAdmissions.Rd
@@ -1,6 +1,6 @@
 % File src/library/datasets/man/UCBAdmissions.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2009 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2015 R Core Team
 % Distributed under GPL 2 or later
 
 \name{UCBAdmissions}
@@ -38,11 +38,8 @@
   \emph{more} to departments with higher rejection rates).
 
   This data set can also be used for illustrating methods for graphical
-  display of categorical data, such as the general-purpose mosaic plot
-  or the fourfold display for 2-by-2-by-\eqn{k} tables.  See the
-  home page of Michael Friendly
-  (\url{http://www.math.yorku.ca/SCS/friendly.html}) for further
-  information.
+  display of categorical data, such as the general-purpose \link{mosaicplot}
+  or the \link{fourfoldplot} for 2-by-2-by-\eqn{k} tables.
 }
 \references{
   Bickel, P. J., Hammel, E. A., and O'Connell, J. W. (1975)
diff --git a/src/library/datasets/man/UKDriverDeaths.Rd b/src/library/datasets/man/UKDriverDeaths.Rd
index 72c12df..8963bb6 100644
--- a/src/library/datasets/man/UKDriverDeaths.Rd
+++ b/src/library/datasets/man/UKDriverDeaths.Rd
@@ -1,10 +1,8 @@
 % File src/library/datasets/man/UKDriverDeaths.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2007 R Core Team
 % Distributed under GPL 2 or later
 
-\newcommand{\sspace}{\ifelse{latex}{\out{~}}{ }}
-
 \name{UKDriverDeaths}
 \docType{data}
 \alias{UKDriverDeaths}
diff --git a/src/library/datasets/man/UKLungDeaths.Rd b/src/library/datasets/man/UKLungDeaths.Rd
index 71412ec..dbe2563 100644
--- a/src/library/datasets/man/UKLungDeaths.Rd
+++ b/src/library/datasets/man/UKLungDeaths.Rd
@@ -1,5 +1,5 @@
 % File src/library/datasets/man/UKLungDeaths.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright  1994-9 W. N. Venables and B. D. Ripley
 % Distributed under GPL 2 or later
 
diff --git a/src/library/datasets/man/UKgas.Rd b/src/library/datasets/man/UKgas.Rd
index c7121cb..9e00709 100644
--- a/src/library/datasets/man/UKgas.Rd
+++ b/src/library/datasets/man/UKgas.Rd
@@ -1,5 +1,5 @@
 % File src/library/datasets/man/UKgas.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2007 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/datasets/man/USAccDeaths.Rd b/src/library/datasets/man/USAccDeaths.Rd
index 6828c1f..fa31723 100644
--- a/src/library/datasets/man/USAccDeaths.Rd
+++ b/src/library/datasets/man/USAccDeaths.Rd
@@ -1,5 +1,5 @@
 % File src/library/datasets/man/USAccDeaths.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1994-9 W. N. Venables and B. D. Ripley
 % Distributed under GPL 2 or later
 
diff --git a/src/library/datasets/man/USArrests.Rd b/src/library/datasets/man/USArrests.Rd
index 23377e4..fdf557b 100644
--- a/src/library/datasets/man/USArrests.Rd
+++ b/src/library/datasets/man/USArrests.Rd
@@ -1,12 +1,12 @@
 % File src/library/datasets/man/USArrests.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2007 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2016 R Core Team
 % Distributed under GPL 2 or later
 
 \name{USArrests}
+\title{Violent Crime Rates by US State}
 \docType{data}
 \alias{USArrests}
-\title{Violent Crime Rates by US State}
 \description{
   This data set contains statistics, in arrests per 100,000 residents
   for assault, murder, and rape in each of the 50 US states in 1973.
@@ -17,20 +17,28 @@
   A data frame with 50 observations on 4 variables.
 
   \tabular{rlll}{
-    [,1]  \tab Murder    \tab numeric
-    \tab Murder arrests (per 100,000)\cr
-    [,2]  \tab Assault   \tab numeric
-    \tab Assault arrests (per 100,000)\cr
-    [,3]  \tab UrbanPop  \tab numeric
-    \tab Percent urban population\cr
-    [,4]  \tab Rape      \tab numeric
-    \tab Rape arrests (per 100,000)
+    [,1]  \tab Murder    \tab numeric \tab Murder arrests (per 100,000)\cr
+    [,2]  \tab Assault   \tab numeric \tab Assault arrests (per 100,000)\cr
+    [,3]  \tab UrbanPop  \tab numeric \tab Percent urban population\cr
+    [,4]  \tab Rape      \tab numeric \tab Rape arrests (per 100,000)
   }
 }
 \source{
   World Almanac and Book of facts 1975.  (Crime rates).
 
-  Statistical Abstracts of the United States 1975.  (Urban rates).
+  Statistical Abstracts of the United States 1975, p.20, (Urban rates),
+  possibly available as
+  \url{https://books.google.ch/books?id=zl9qAAAAMAAJ&pg=PA20}.
+}
+\note{
+  \code{USArrests} contains the data as in McNeil's monograph.  For the
+  \code{UrbanPop} percentages, a review of the table (No. 21) in the
+  Statistical Abstracts 1975 reveals a transcription error for Maryland
+  (and that McNeil used the same \dQuote{round to even} rule that \R's
+  \code{\link{round}()} uses), as found by Daniel S Coven (Arizona).
+
+  See the example below on how to correct the error and improve accuracy
+  for the \sQuote{<n>.5} percentages.
 }
 \seealso{The \code{\link{state}} data sets.}
 \references{
@@ -39,7 +47,22 @@
   New York: Wiley.
 }
 \examples{
+summary(USArrests)
+
 require(graphics)
 pairs(USArrests, panel = panel.smooth, main = "USArrests data")
+
+## Difference between 'USArrests' and its correction
+USArrests["Maryland", "UrbanPop"] # 67 -- the transcription error
+UA.C <- USArrests
+UA.C["Maryland", "UrbanPop"] <- 76.6
+
+## also +/- 0.5 to restore the original  <n>.5  percentages
+s5u <- c("Colorado", "Florida", "Mississippi", "Wyoming")
+s5d <- c("Nebraska", "Pennsylvania")
+UA.C[s5u, "UrbanPop"] <- UA.C[s5u, "UrbanPop"] + 0.5
+UA.C[s5d, "UrbanPop"] <- UA.C[s5d, "UrbanPop"] - 0.5
+
+## ==> UA.C  is now a *C*orrected version of  USArrests
 }
 \keyword{datasets}
diff --git a/src/library/datasets/man/USJudgeRatings.Rd b/src/library/datasets/man/USJudgeRatings.Rd
index 8018f1a..230204d 100644
--- a/src/library/datasets/man/USJudgeRatings.Rd
+++ b/src/library/datasets/man/USJudgeRatings.Rd
@@ -1,5 +1,5 @@
 % File src/library/datasets/man/USJudgeRatings.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2007 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/datasets/man/USPersonalExpenditure.Rd b/src/library/datasets/man/USPersonalExpenditure.Rd
index bd167fb..340d4e6 100644
--- a/src/library/datasets/man/USPersonalExpenditure.Rd
+++ b/src/library/datasets/man/USPersonalExpenditure.Rd
@@ -1,5 +1,5 @@
 % File src/library/datasets/man/USPersonalExpenditure.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2007 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/datasets/man/VADeaths.Rd b/src/library/datasets/man/VADeaths.Rd
index 7e23bea..3943828 100644
--- a/src/library/datasets/man/VADeaths.Rd
+++ b/src/library/datasets/man/VADeaths.Rd
@@ -1,5 +1,5 @@
 % File src/library/datasets/man/VADeaths.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2007 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/datasets/man/WWWusage.Rd b/src/library/datasets/man/WWWusage.Rd
index 84eec5b..2be319c 100644
--- a/src/library/datasets/man/WWWusage.Rd
+++ b/src/library/datasets/man/WWWusage.Rd
@@ -1,5 +1,5 @@
 % File src/library/datasets/man/WWWusage.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2007 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/datasets/man/WorldPhones.Rd b/src/library/datasets/man/WorldPhones.Rd
index 4372704..b1207fb 100644
--- a/src/library/datasets/man/WorldPhones.Rd
+++ b/src/library/datasets/man/WorldPhones.Rd
@@ -1,5 +1,5 @@
 % File src/library/datasets/man/WorldPhones.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2007 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/datasets/man/ability.cov.Rd b/src/library/datasets/man/ability.cov.Rd
index 16bcecb..a023c95 100644
--- a/src/library/datasets/man/ability.cov.Rd
+++ b/src/library/datasets/man/ability.cov.Rd
@@ -1,5 +1,5 @@
 % File src/library/datasets/man/ability.cov.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2007 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/datasets/man/airmiles.Rd b/src/library/datasets/man/airmiles.Rd
index 70170e8..6a31d4a 100644
--- a/src/library/datasets/man/airmiles.Rd
+++ b/src/library/datasets/man/airmiles.Rd
@@ -1,5 +1,5 @@
 % File src/library/datasets/man/airmiles.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2007 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/datasets/man/airquality.Rd b/src/library/datasets/man/airquality.Rd
index 007ee36..8f174d6 100644
--- a/src/library/datasets/man/airquality.Rd
+++ b/src/library/datasets/man/airquality.Rd
@@ -1,5 +1,5 @@
 % File src/library/datasets/man/airquality.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2007 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/datasets/man/anscombe.Rd b/src/library/datasets/man/anscombe.Rd
index 09672f0..f871294 100644
--- a/src/library/datasets/man/anscombe.Rd
+++ b/src/library/datasets/man/anscombe.Rd
@@ -1,5 +1,5 @@
 % File src/library/datasets/man/anscombe.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2011 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/datasets/man/attenu.Rd b/src/library/datasets/man/attenu.Rd
index 7c1e0a3..c922a3e 100644
--- a/src/library/datasets/man/attenu.Rd
+++ b/src/library/datasets/man/attenu.Rd
@@ -1,5 +1,5 @@
 % File src/library/datasets/man/attenu.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2007 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/datasets/man/attitude.Rd b/src/library/datasets/man/attitude.Rd
index fafa966..a027ec5 100644
--- a/src/library/datasets/man/attitude.Rd
+++ b/src/library/datasets/man/attitude.Rd
@@ -1,5 +1,5 @@
 % File src/library/datasets/man/attitude.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2013 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/datasets/man/austres.Rd b/src/library/datasets/man/austres.Rd
index 382b606..9237f06 100644
--- a/src/library/datasets/man/austres.Rd
+++ b/src/library/datasets/man/austres.Rd
@@ -1,5 +1,5 @@
 % File src/library/datasets/man/austres.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1994-9 W. N. Venables and B. D. Ripley
 % Distributed under GPL 2 or later
 
diff --git a/src/library/datasets/man/beavers.Rd b/src/library/datasets/man/beavers.Rd
index 63c0a26..d81caef 100644
--- a/src/library/datasets/man/beavers.Rd
+++ b/src/library/datasets/man/beavers.Rd
@@ -1,5 +1,5 @@
 % File src/library/datasets/man/beavers.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1994-9 W. N. Venables and B. D. Ripley
 % Distributed under GPL 2 or later
 
diff --git a/src/library/datasets/man/cars.Rd b/src/library/datasets/man/cars.Rd
index d01b99d..e427c7a 100644
--- a/src/library/datasets/man/cars.Rd
+++ b/src/library/datasets/man/cars.Rd
@@ -1,5 +1,5 @@
 % File src/library/datasets/man/cars.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2007 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/datasets/man/chickwts.Rd b/src/library/datasets/man/chickwts.Rd
index 45ad004..bb5ec7d 100644
--- a/src/library/datasets/man/chickwts.Rd
+++ b/src/library/datasets/man/chickwts.Rd
@@ -1,5 +1,5 @@
 % File src/library/datasets/man/chickwts.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2014 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/datasets/man/co2.Rd b/src/library/datasets/man/co2.Rd
index 4bee52b..74f53d0 100644
--- a/src/library/datasets/man/co2.Rd
+++ b/src/library/datasets/man/co2.Rd
@@ -1,5 +1,5 @@
 % File src/library/datasets/man/co2.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2007 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/datasets/man/crimtab.Rd b/src/library/datasets/man/crimtab.Rd
index 4d64e00..2c02cec 100644
--- a/src/library/datasets/man/crimtab.Rd
+++ b/src/library/datasets/man/crimtab.Rd
@@ -1,10 +1,8 @@
 % File src/library/datasets/man/crimtab.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2007 R Core Team
 % Distributed under GPL 2 or later
 
-\newcommand{\sspace}{\ifelse{latex}{\out{~}}{ }}
-
 \name{crimtab}
 \alias{crimtab}
 \docType{data}
diff --git a/src/library/datasets/man/datasets-package.Rd b/src/library/datasets/man/datasets-package.Rd
index 8af0ba7..e197e67 100644
--- a/src/library/datasets/man/datasets-package.Rd
+++ b/src/library/datasets/man/datasets-package.Rd
@@ -1,5 +1,5 @@
 % File src/library/datasets/man/datasets-package.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2007 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/datasets/man/discoveries.Rd b/src/library/datasets/man/discoveries.Rd
index 96977fd..1d87974 100644
--- a/src/library/datasets/man/discoveries.Rd
+++ b/src/library/datasets/man/discoveries.Rd
@@ -1,5 +1,5 @@
 % File src/library/datasets/man/discoveries.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2007 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/datasets/man/esoph.Rd b/src/library/datasets/man/esoph.Rd
index cd0deb0..f62a44f 100644
--- a/src/library/datasets/man/esoph.Rd
+++ b/src/library/datasets/man/esoph.Rd
@@ -1,5 +1,5 @@
 % File src/library/datasets/man/esoph.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2007 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/datasets/man/euro.Rd b/src/library/datasets/man/euro.Rd
index 4bbc66b..e9aa199 100644
--- a/src/library/datasets/man/euro.Rd
+++ b/src/library/datasets/man/euro.Rd
@@ -1,5 +1,5 @@
 % File src/library/datasets/man/euro.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2007 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/datasets/man/eurodist.Rd b/src/library/datasets/man/eurodist.Rd
index d77f3b2..77238b2 100644
--- a/src/library/datasets/man/eurodist.Rd
+++ b/src/library/datasets/man/eurodist.Rd
@@ -1,19 +1,27 @@
 % File src/library/datasets/man/eurodist.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2007 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2014 R Core Team
 % Distributed under GPL 2 or later
 
 \name{eurodist}
 \docType{data}
 \alias{eurodist}
-\title{Distances Between European Cities}
+\alias{UScitiesD}
+\title{Distances Between European Cities and Between US Cities}
 \description{
-  The data give the road distances (in km) between 21 cities in Europe.
-  The data are taken from a table in \emph{The Cambridge Encyclopaedia}.
+  The \code{eurodist} gives the road distances (in km) between 21
+  cities in Europe.  The data are taken from a table in \emph{The
+  Cambridge Encyclopaedia}.
+
+  \code{UScitiesD} gives \dQuote{straight line} distances between 10
+  cities in the US.
+}
+\usage{
+eurodist
+UScitiesD
 }
-\usage{eurodist}
 \format{
-  A \code{dist} object based on 21 objects.
+  \code{dist} objects based on 21 and 10 objects, respectively.
   (You must have the \pkg{stats} package loaded to have the methods for this
   kind of object available).
 }
@@ -21,5 +29,7 @@
   Crystal, D. Ed. (1990)
   \emph{The Cambridge Encyclopaedia}.
   Cambridge: Cambridge University Press,
+
+  The US cities distances were provided by Pierre Legendre.
 }
 \keyword{datasets}
diff --git a/src/library/datasets/man/faithful.Rd b/src/library/datasets/man/faithful.Rd
index 68dd415..786881a 100644
--- a/src/library/datasets/man/faithful.Rd
+++ b/src/library/datasets/man/faithful.Rd
@@ -1,10 +1,8 @@
 % File src/library/datasets/man/faithful.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2007 R Core Team
 % Distributed under GPL 2 or later
 
-\newcommand{\CRANpkg}{\href{http://CRAN.R-project.org/package=#1}{\pkg{#1}}}
-
 \name{faithful}
 \docType{data}
 \alias{faithful}
diff --git a/src/library/datasets/man/freeny.Rd b/src/library/datasets/man/freeny.Rd
index e527b3f..9703a75 100644
--- a/src/library/datasets/man/freeny.Rd
+++ b/src/library/datasets/man/freeny.Rd
@@ -1,5 +1,5 @@
 % File src/library/datasets/man/freeny.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2007 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/datasets/man/infert.Rd b/src/library/datasets/man/infert.Rd
index 503a394..9afa566 100644
--- a/src/library/datasets/man/infert.Rd
+++ b/src/library/datasets/man/infert.Rd
@@ -1,5 +1,5 @@
 % File src/library/datasets/man/infert.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2007 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/datasets/man/iris.Rd b/src/library/datasets/man/iris.Rd
index 6d100df..b10ea61 100644
--- a/src/library/datasets/man/iris.Rd
+++ b/src/library/datasets/man/iris.Rd
@@ -1,5 +1,5 @@
 % File src/library/datasets/man/iris.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2007 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/datasets/man/islands.Rd b/src/library/datasets/man/islands.Rd
index 2adb4be..0625bba 100644
--- a/src/library/datasets/man/islands.Rd
+++ b/src/library/datasets/man/islands.Rd
@@ -1,5 +1,5 @@
 % File src/library/datasets/man/islands.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2007 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/datasets/man/lh.Rd b/src/library/datasets/man/lh.Rd
index ffd34f6..00e066d 100644
--- a/src/library/datasets/man/lh.Rd
+++ b/src/library/datasets/man/lh.Rd
@@ -1,5 +1,5 @@
 % File src/library/datasets/man/lh.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1994-9 W. N. Venables and B. D. Ripley
 % Distributed under GPL 2 or later
 
diff --git a/src/library/datasets/man/longley.Rd b/src/library/datasets/man/longley.Rd
index 442a70b..73af221 100644
--- a/src/library/datasets/man/longley.Rd
+++ b/src/library/datasets/man/longley.Rd
@@ -1,5 +1,5 @@
 % File src/library/datasets/man/longley.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2014 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/datasets/man/lynx.Rd b/src/library/datasets/man/lynx.Rd
index 86212b2..a11b568 100644
--- a/src/library/datasets/man/lynx.Rd
+++ b/src/library/datasets/man/lynx.Rd
@@ -1,5 +1,5 @@
 % File src/library/datasets/man/lynx.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2007 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/datasets/man/morley.Rd b/src/library/datasets/man/morley.Rd
index ae7902f..0c1ce63 100644
--- a/src/library/datasets/man/morley.Rd
+++ b/src/library/datasets/man/morley.Rd
@@ -1,10 +1,8 @@
 % File src/library/datasets/man/morley.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2014 R Core Team
 % Distributed under GPL 2 or later
 
-\newcommand{\CRANpkg}{\href{http://CRAN.R-project.org/package=#1}{\pkg{#1}}}
-
 \name{morley}
 \docType{data}
 \alias{morley}
diff --git a/src/library/datasets/man/mtcars.Rd b/src/library/datasets/man/mtcars.Rd
index fe93494..19ec8dc 100644
--- a/src/library/datasets/man/mtcars.Rd
+++ b/src/library/datasets/man/mtcars.Rd
@@ -1,5 +1,5 @@
 % File src/library/datasets/man/mtcars.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2007 R Core Team
 % Distributed under GPL 2 or later
 
@@ -22,7 +22,7 @@
     [, 3] \tab disp \tab Displacement (cu.in.) \cr
     [, 4] \tab hp   \tab Gross horsepower \cr
     [, 5] \tab drat \tab Rear axle ratio \cr
-    [, 6] \tab wt   \tab Weight (lb/1000) \cr
+    [, 6] \tab wt   \tab Weight (1000 lbs) \cr
     [, 7] \tab qsec \tab 1/4 mile time \cr
     [, 8] \tab vs   \tab V/S \cr
     [, 9] \tab am   \tab Transmission (0 = automatic, 1 = manual) \cr
diff --git a/src/library/datasets/man/nhtemp.Rd b/src/library/datasets/man/nhtemp.Rd
index 2e579fc..93f1901 100644
--- a/src/library/datasets/man/nhtemp.Rd
+++ b/src/library/datasets/man/nhtemp.Rd
@@ -1,5 +1,5 @@
 % File src/library/datasets/man/nhtemp.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2007 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/datasets/man/nottem.Rd b/src/library/datasets/man/nottem.Rd
index 4904825..6af1ce8 100644
--- a/src/library/datasets/man/nottem.Rd
+++ b/src/library/datasets/man/nottem.Rd
@@ -1,5 +1,5 @@
 % File src/library/datasets/man/nottem.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2007 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/datasets/man/npk.Rd b/src/library/datasets/man/npk.Rd
index 0a7a1fe..0950d1f 100644
--- a/src/library/datasets/man/npk.Rd
+++ b/src/library/datasets/man/npk.Rd
@@ -1,5 +1,5 @@
 % File src/library/datasets/man/npk.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % copyright (C) 1999 W. N. Venables and B. D. Ripley
 % Distributed under GPL 2 or later
 
diff --git a/src/library/datasets/man/occupationalStatus.Rd b/src/library/datasets/man/occupationalStatus.Rd
index 98501c0..25ea1a4 100644
--- a/src/library/datasets/man/occupationalStatus.Rd
+++ b/src/library/datasets/man/occupationalStatus.Rd
@@ -1,10 +1,8 @@
 % File src/library/datasets/man/occupationalStatus.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 2008 R Core Team
 % Distributed under GPL 2 or later
 
-\newcommand{\CRANpkg}{\href{http://CRAN.R-project.org/package=#1}{\pkg{#1}}}
-
 \name{occupationalStatus}
 \alias{occupationalStatus}
 \docType{data}
diff --git a/src/library/datasets/man/precip.Rd b/src/library/datasets/man/precip.Rd
index 2da1d79..2d2f441 100644
--- a/src/library/datasets/man/precip.Rd
+++ b/src/library/datasets/man/precip.Rd
@@ -1,6 +1,6 @@
 % File src/library/datasets/man/precip.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2007 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2016 R Core Team
 % Distributed under GPL 2 or later
 
 \name{precip}
@@ -23,9 +23,20 @@
   \emph{Interactive Data Analysis}.
   New York: Wiley.
 }
+\note{
+  The dataset version up to Nov.16, 2016 had a typo in \code{"Cincinnati"}'s
+  name.  The examples show how to recreate that version.
+}
 \examples{
 require(graphics)
 dotchart(precip[order(precip)], main = "precip data")
 title(sub = "Average annual precipitation (in.)")
+
+## Old ("wrong") version of dataset (just name change):
+precip.O <- local({
+   p <- precip; names(p)[names(p) == "Cincinnati"] <- "Cincinati" ; p })
+stopifnot(all(precip == precip.O),
+	  match("Cincinnati", names(precip)) == 46,
+	  identical(names(precip)[-46], names(precip.O)[-46]))
 }
 \keyword{datasets}
diff --git a/src/library/datasets/man/presidents.Rd b/src/library/datasets/man/presidents.Rd
index 12d36e1..c253903 100644
--- a/src/library/datasets/man/presidents.Rd
+++ b/src/library/datasets/man/presidents.Rd
@@ -1,5 +1,5 @@
 % File src/library/datasets/man/presidents.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2007 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/datasets/man/pressure.Rd b/src/library/datasets/man/pressure.Rd
index a0e8e8d..9d5224e 100644
--- a/src/library/datasets/man/pressure.Rd
+++ b/src/library/datasets/man/pressure.Rd
@@ -1,5 +1,5 @@
 % File src/library/datasets/man/pressure.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2007 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/datasets/man/quakes.Rd b/src/library/datasets/man/quakes.Rd
index 314422f..5b21829 100644
--- a/src/library/datasets/man/quakes.Rd
+++ b/src/library/datasets/man/quakes.Rd
@@ -1,5 +1,5 @@
 % File src/library/datasets/man/quakes.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2007 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/datasets/man/randu.Rd b/src/library/datasets/man/randu.Rd
index 7471715..57fde6f 100644
--- a/src/library/datasets/man/randu.Rd
+++ b/src/library/datasets/man/randu.Rd
@@ -1,5 +1,5 @@
 % File src/library/datasets/man/randu.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2007 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/datasets/man/rivers.Rd b/src/library/datasets/man/rivers.Rd
index 46381d4..27020ac 100644
--- a/src/library/datasets/man/rivers.Rd
+++ b/src/library/datasets/man/rivers.Rd
@@ -1,5 +1,5 @@
 % File src/library/datasets/man/rivers.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2007 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/datasets/man/rock.Rd b/src/library/datasets/man/rock.Rd
index db836ab..71b833a 100644
--- a/src/library/datasets/man/rock.Rd
+++ b/src/library/datasets/man/rock.Rd
@@ -1,5 +1,5 @@
 % File src/library/datasets/man/rock.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1994-8 W. N. Venables and B. D. Ripley
 % Distributed under GPL 2 or later
 
diff --git a/src/library/datasets/man/sleep.Rd b/src/library/datasets/man/sleep.Rd
index cd61643..dff3584 100644
--- a/src/library/datasets/man/sleep.Rd
+++ b/src/library/datasets/man/sleep.Rd
@@ -1,5 +1,5 @@
 % File src/library/datasets/man/sleep.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2012 R Core Team
 % Copyright 1999-2012 The R Foundation
 % Distributed under GPL 2 or later
diff --git a/src/library/datasets/man/stackloss.Rd b/src/library/datasets/man/stackloss.Rd
index d926a9f..43023d6 100644
--- a/src/library/datasets/man/stackloss.Rd
+++ b/src/library/datasets/man/stackloss.Rd
@@ -1,10 +1,8 @@
 % File src/library/datasets/man/stackloss.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2007 R Core Team
 % Distributed under GPL 2 or later
 
-\newcommand{\sspace}{\ifelse{latex}{\out{~}}{ }}
-
 \name{stackloss}
 \docType{data}
 \alias{stackloss}
diff --git a/src/library/datasets/man/state.Rd b/src/library/datasets/man/state.Rd
index 3a013e1..830a399 100644
--- a/src/library/datasets/man/state.Rd
+++ b/src/library/datasets/man/state.Rd
@@ -1,5 +1,5 @@
 % File src/library/datasets/man/state.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2007 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/datasets/man/sunspot.month.Rd b/src/library/datasets/man/sunspot.month.Rd
index d17d01e..643d621 100644
--- a/src/library/datasets/man/sunspot.month.Rd
+++ b/src/library/datasets/man/sunspot.month.Rd
@@ -1,5 +1,5 @@
 % File src/library/datasets/man/sunspot.month.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2014 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/datasets/man/sunspot.year.Rd b/src/library/datasets/man/sunspot.year.Rd
index 0cf0ae4..0b9d043 100644
--- a/src/library/datasets/man/sunspot.year.Rd
+++ b/src/library/datasets/man/sunspot.year.Rd
@@ -1,10 +1,8 @@
 % File src/library/datasets/man/sunspot.year.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2007 R Core Team
 % Distributed under GPL 2 or later
 
-\newcommand{\sspace}{\ifelse{latex}{\out{~}}{ }}
-
 \name{sunspot.year}
 \docType{data}
 \alias{sunspot.year}
diff --git a/src/library/datasets/man/sunspots.Rd b/src/library/datasets/man/sunspots.Rd
index 3a166fa..38f57ee 100644
--- a/src/library/datasets/man/sunspots.Rd
+++ b/src/library/datasets/man/sunspots.Rd
@@ -1,5 +1,5 @@
 % File src/library/datasets/man/sunspots.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2014 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/datasets/man/swiss.Rd b/src/library/datasets/man/swiss.Rd
index 100b2e7..5973abf 100644
--- a/src/library/datasets/man/swiss.Rd
+++ b/src/library/datasets/man/swiss.Rd
@@ -1,6 +1,6 @@
 % File src/library/datasets/man/swiss.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2007 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2015 R Core Team
 % Distributed under GPL 2 or later
 
 \name{swiss}
@@ -64,8 +64,7 @@
 }
 \note{
   Files for all 182 districts in 1888 and other years have been available at
-  \url{http://opr.princeton.edu/archive/eufert/switz.html} or
-  \url{http://opr.princeton.edu/archive/pefp/switz.asp}.
+  \url{https://opr.princeton.edu/archive/pefp/switz.aspx}.
 
   They state that variables \code{Examination} and \code{Education}
   are averages for 1887, 1888 and 1889.
diff --git a/src/library/datasets/man/treering.Rd b/src/library/datasets/man/treering.Rd
index 6d30ef0..7a8e9d9 100644
--- a/src/library/datasets/man/treering.Rd
+++ b/src/library/datasets/man/treering.Rd
@@ -1,6 +1,6 @@
 % File src/library/datasets/man/treering.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2007 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2015 R Core Team
 % Distributed under GPL 2 or later
 
 \name{treering}
@@ -31,8 +31,7 @@ treering
   series \file{CA535.DAT}
 }
 \references{
-  For background on Bristlecone pines and Methuselah Walk, see
-  \url{http://www.sonic.net/bristlecone/}; for some photos see
+  For some photos of Methuselah Walk see
   \url{http://www.ltrr.arizona.edu/~hallman/sitephotos/meth.html}
 }
 \keyword{datasets}
diff --git a/src/library/datasets/man/trees.Rd b/src/library/datasets/man/trees.Rd
index 9aec180..312c332 100644
--- a/src/library/datasets/man/trees.Rd
+++ b/src/library/datasets/man/trees.Rd
@@ -1,5 +1,5 @@
 % File src/library/datasets/man/trees.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2007 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/datasets/man/uspop.Rd b/src/library/datasets/man/uspop.Rd
index 53c7eb9..df2eb42 100644
--- a/src/library/datasets/man/uspop.Rd
+++ b/src/library/datasets/man/uspop.Rd
@@ -1,5 +1,5 @@
 % File src/library/datasets/man/uspop.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2007 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/datasets/man/volcano.Rd b/src/library/datasets/man/volcano.Rd
index 8a95c25..37fc668 100644
--- a/src/library/datasets/man/volcano.Rd
+++ b/src/library/datasets/man/volcano.Rd
@@ -1,5 +1,5 @@
 % File src/library/datasets/man/volcano.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2007 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/datasets/man/warpbreaks.Rd b/src/library/datasets/man/warpbreaks.Rd
index 142e65c..4bdaf13 100644
--- a/src/library/datasets/man/warpbreaks.Rd
+++ b/src/library/datasets/man/warpbreaks.Rd
@@ -1,5 +1,5 @@
 % File src/library/datasets/man/warpbreaks.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2007 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/datasets/man/women.Rd b/src/library/datasets/man/women.Rd
index aeaf400..b03bb24 100644
--- a/src/library/datasets/man/women.Rd
+++ b/src/library/datasets/man/women.Rd
@@ -1,5 +1,5 @@
 % File src/library/datasets/man/women.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2007 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/datasets/man/zCO2.Rd b/src/library/datasets/man/zCO2.Rd
index 96beb5a..211f2a2 100644
--- a/src/library/datasets/man/zCO2.Rd
+++ b/src/library/datasets/man/zCO2.Rd
@@ -1,5 +1,5 @@
 % File src/library/datasets/man/zCO2.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-20011 R Core Team
 % Distributed under GPL 2 or later
 
@@ -64,7 +64,7 @@
 }
 \examples{
 require(stats); require(graphics)
-\testonly{options(show.nls.convergence=FALSE)}
+\dontshow{options(show.nls.convergence=FALSE)}
 coplot(uptake ~ conc | Plant, data = CO2, show.given = FALSE, type = "b")
 ## fit the data for the first plant
 fm1 <- nls(uptake ~ SSasymp(conc, Asym, lrc, c0),
diff --git a/src/library/grDevices/DESCRIPTION.in b/src/library/grDevices/DESCRIPTION.in
index ed38cfa..0b81756 100644
--- a/src/library/grDevices/DESCRIPTION.in
+++ b/src/library/grDevices/DESCRIPTION.in
@@ -4,5 +4,7 @@ Priority: base
 Title: The R Graphics Devices and Support for Colours and Fonts
 Author: R Core Team and contributors worldwide
 Maintainer: R Core Team <R-core at r-project.org>
-Description: Graphics devices and support for base and grid graphics
+Description: Graphics devices and support for base and grid graphics.
 License: Part of R @VERSION@
+Suggests: KernSmooth
+NeedsCompilation: yes
diff --git a/src/library/grDevices/NAMESPACE b/src/library/grDevices/NAMESPACE
index ed6fe3a..325c453 100644
--- a/src/library/grDevices/NAMESPACE
+++ b/src/library/grDevices/NAMESPACE
@@ -1,18 +1,18 @@
 useDynLib(grDevices, .registration = TRUE, .fixes = "C_")
 
-export(Hershey, adjustcolor, as.graphicsAnnot, as.raster, axisTicks, blues9,
-       boxplot.stats, check.options, chull, CIDFont, col2rgb, colors,
-       colours, cm, colorRamp, colorRampPalette, contourLines,
+export(Hershey, adjustcolor, as.graphicsAnnot, as.raster, axisTicks,
+       blues9, boxplot.stats, check.options, chull, CIDFont, col2rgb,
+       colors, colours, cm, colorRamp, colorRampPalette, contourLines,
        convertColor, colorConverter, colorspaces, cm.colors, densCols,
-       devAskNewPage, dev.capabilities, dev.capture, dev.control, dev.copy,
-       dev.copy2eps, dev.copy2pdf, dev.cur, dev.hold, dev.flush,
-       dev.interactive, dev.list, dev.new, dev.next, dev.off,
-       dev.prev, dev.print, dev.set, dev.size, dev2bitmap,
+       devAskNewPage, dev.capabilities, dev.capture, dev.control,
+       dev.copy, dev.copy2eps, dev.copy2pdf, dev.cur, dev.hold,
+       dev.flush, dev.interactive, dev.list, dev.new, dev.next,
+       dev.off, dev.prev, dev.print, dev.set, dev.size, dev2bitmap,
        deviceIsInteractive, embedFonts, extendrange, getGraphicsEvent,
        getGraphicsEventEnv, graphics.off, gray, grey, gray.colors,
-       grey.colors, heat.colors, hsv, hcl, is.raster, make.rgb,
-       n2mfrow, nclass.Sturges, nclass.FD, nclass.scott, palette, pdf,
-       pdf.options, pdfFonts, pictex, postscript,
+       grSoftVersion, grey.colors, heat.colors, hsv, hcl, is.raster,
+       make.rgb, n2mfrow, nclass.Sturges, nclass.FD, nclass.scott,
+       palette, pdf, pdf.options, pdfFonts, pictex, postscript,
        postscriptFonts, ps.options, rainbow, recordGraphics,
        recordPlot, replayPlot, rgb, rgb2hsv, savePlot, setEPS,
        setGraphicsEventEnv, setGraphicsEventHandlers, setPS,
@@ -48,8 +48,8 @@ S3method("Ops", "raster")
 
 S3method("print", "raster")
 
-S3method(pretty, Date)
-S3method(pretty, POSIXt)
+S3method(pretty, Date,   prettyDate)
+S3method(pretty, POSIXt, prettyDate)
 
 
 if(tools:::.OStype() == "windows") {
@@ -58,6 +58,7 @@ if(tools:::.OStype() == "windows") {
 
     S3method("[", SavedPlots)
     S3method(print, SavedPlots)
+    importFrom("utils", "shortPathName")
 } else {
     export(X11.options, X11Font, X11Fonts,
            quartz, quartz.options, quartz.save, quartzFont, quartzFonts)
diff --git a/src/library/grDevices/R/Hershey.R b/src/library/grDevices/R/Hershey.R
index ca74e56..882739c 100644
--- a/src/library/grDevices/R/Hershey.R
+++ b/src/library/grDevices/R/Hershey.R
@@ -1,5 +1,5 @@
 #  File src/library/grDevices/R/Hershey.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
 #  Copyright (C) 1995-2012 The R Core Team
 #
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 Hershey <-
     list(typeface =
diff --git a/src/library/grDevices/R/cairo.R b/src/library/grDevices/R/cairo.R
index 6bf9ba3..ca22090 100644
--- a/src/library/grDevices/R/cairo.R
+++ b/src/library/grDevices/R/cairo.R
@@ -1,7 +1,7 @@
 #  File src/library/grDevices/R/cairo.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
-#  Copyright (C) 1995-2012 The R Core Team
+#  Copyright (C) 1995-2015 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
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 
 svg <- function(filename = if(onefile) "Rplots.svg" else "Rplot%03d.svg",
@@ -23,35 +23,39 @@ svg <- function(filename = if(onefile) "Rplots.svg" else "Rplot%03d.svg",
                 antialias = c("default", "none", "gray", "subpixel"))
 {
     if(!checkIntFormat(filename)) stop("invalid 'filename'")
-    new <- list()
     antialiases <- eval(formals()$antialias)
     antialias <- match(match.arg(antialias, antialiases), antialiases)
-    invisible(.External(C_devCairo, filename, 4L, 72*width, 72*height, pointsize,
-                        bg, NA_integer_, antialias, onefile, family))
+    invisible(.External(C_devCairo, filename, 4L, 72*width, 72*height,
+                        pointsize, bg, NA_integer_, antialias, onefile,
+                        family, 300))
 }
 
 cairo_pdf <- function(filename = if(onefile) "Rplots.pdf" else "Rplot%03d.pdf",
                       width = 7, height = 7, pointsize = 12,
                       onefile = FALSE, family = "sans", bg = "white",
-                      antialias = c("default", "none", "gray", "subpixel"))
+                      antialias = c("default", "none", "gray", "subpixel"),
+                      fallback_resolution = 300)
 {
     if(!checkIntFormat(filename)) stop("invalid 'filename'")
     antialiases <- eval(formals()$antialias)
     antialias <- match(match.arg(antialias, antialiases), antialiases)
     invisible(.External(C_devCairo, filename, 6L, 72*width, 72*height,
                         pointsize, bg, NA_integer_, antialias, onefile,
-                        family))
+                        family, fallback_resolution))
 }
 
 cairo_ps <- function(filename = if(onefile) "Rplots.ps" else "Rplot%03d.ps",
                      width = 7, height = 7, pointsize = 12,
                      onefile = FALSE, family = "sans", bg = "white",
-                     antialias = c("default", "none", "gray", "subpixel"))
+                     antialias = c("default", "none", "gray", "subpixel"),
+                     fallback_resolution = 300)
 {
     if(!checkIntFormat(filename)) stop("invalid 'filename'")
     antialiases <- eval(formals()$antialias)
     antialias <- match(match.arg(antialias, antialiases), antialiases)
     invisible(.External(C_devCairo, filename, 7L, 72*width, 72*height,
                         pointsize, bg, NA_integer_, antialias, onefile,
-                        family))
+                        family, fallback_resolution))
 }
+
+cairoVersion <- function() .Call(C_cairoVersion)
diff --git a/src/library/grDevices/R/calc.R b/src/library/grDevices/R/calc.R
index 0427249..81acbae 100644
--- a/src/library/grDevices/R/calc.R
+++ b/src/library/grDevices/R/calc.R
@@ -1,7 +1,7 @@
 #  File src/library/grDevices/R/calc.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
-#  Copyright (C) 1995-2013 The R Core Team
+#  Copyright (C) 1995-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
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 #### Functions that calculate useful stuff for plotting
 #### BUT which do not do any actual drawing
@@ -76,7 +76,7 @@ function (x = seq(0, 1, length.out = nrow(z)),
 
 chull <- function(x, y = NULL)
 {
-    X <- xy.coords(x, y, recycle = TRUE)
+    X <- xy.coords(x, y, recycle = TRUE, setLab = FALSE)
     x <- cbind(X$x, X$y)
     if(any(!is.finite(x))) stop("finite coordinates are needed")
     if(nrow(x) == 0) return(integer())
@@ -113,7 +113,7 @@ xyTable <- function(x, y = NULL, digits)
 {
     ## Compute number := multiplicities of (x[i], y[i])
 
-    x <- xy.coords(x, y)
+    x <- xy.coords(x, y, setLab = FALSE)
 
     ## get rid of rounding fuzz:
     y <- signif(x$y, digits=digits)
diff --git a/src/library/grDevices/R/cm.R b/src/library/grDevices/R/cm.R
index 572f66f..d97eef2 100644
--- a/src/library/grDevices/R/cm.R
+++ b/src/library/grDevices/R/cm.R
@@ -1,5 +1,5 @@
 #  File src/library/grDevices/R/cm.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
 #  Copyright (C) 1995-2012 The R Core Team
 #
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 cm <- function(x) 2.54*x
 
diff --git a/src/library/grDevices/R/colorRamp.R b/src/library/grDevices/R/colorRamp.R
index bb10afe..e636465 100644
--- a/src/library/grDevices/R/colorRamp.R
+++ b/src/library/grDevices/R/colorRamp.R
@@ -1,5 +1,5 @@
 #  File src/library/grDevices/R/colorRamp.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
 #  Copyright (C) 1995-2013 The R Core Team
 #
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 
 colorRampPalette <- function(colors,...)
diff --git a/src/library/grDevices/R/colorstuff.R b/src/library/grDevices/R/colorstuff.R
index baa0cd7..e22764b 100644
--- a/src/library/grDevices/R/colorstuff.R
+++ b/src/library/grDevices/R/colorstuff.R
@@ -1,5 +1,5 @@
 #  File src/library/grDevices/R/colorstuff.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
 #  Copyright (C) 1995-2012 The R Core Team
 #
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 colours <- colors <- function(distinct = FALSE)
 {
diff --git a/src/library/grDevices/R/convertColor.R b/src/library/grDevices/R/convertColor.R
index 9fda64f..639f4b3 100644
--- a/src/library/grDevices/R/convertColor.R
+++ b/src/library/grDevices/R/convertColor.R
@@ -1,7 +1,7 @@
 #  File src/library/grDevices/R/convertColor.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
-#  Copyright (C) 1995-2013 The R Core Team
+#  Copyright (C) 1995-2014 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
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 
 ## easyRGB scales Y=100 for white
diff --git a/src/library/grDevices/R/device.R b/src/library/grDevices/R/device.R
index 735a604..736afd6 100644
--- a/src/library/grDevices/R/device.R
+++ b/src/library/grDevices/R/device.R
@@ -1,7 +1,7 @@
 #  File src/library/grDevices/R/device.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
-#  Copyright (C) 1995-2014 The R Core Team
+#  Copyright (C) 1995-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
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 
 .known_interactive.devices <-
@@ -161,9 +161,9 @@ dev.print <- function(device = postscript, ...)
             ## fits portrait but not landscape
             hz <- FALSE
         } else {
-            h0 <- ifelse(hz, wp, hp)
+            h0 <- if(hz) wp else hp
             if(h > h0) { w <- w * h0/h; h <- h0 }
-            w0 <- ifelse(hz, hp, wp)
+            w0 <- if(hz) hp else wp
             if(w > w0) { h <- h * w0/w; w <- w0 }
         }
         if(is.null(oc$pointsize)) {
@@ -281,25 +281,11 @@ dev.new <- function(..., noRStudioGD = FALSE)
     dev <- getOption("device")
     if(!is.character(dev) && !is.function(dev))
         stop("invalid setting for 'getOption(\"device\")'")
-    if(is.character(dev) && noRStudioGD && dev == "RStudioGD") {
-        ## copied from zzz.R
-        if(!nzchar(defdev <- Sys.getenv("R_DEFAULT_DEVICE"))) defdev <- pdf
-        dev <- if(interactive()) {
-            if(nzchar(intdev <- Sys.getenv("R_INTERACTIVE_DEVICE"))) intdev
-            else {
-                dsp <- Sys.getenv("DISPLAY")
-                if(.Platform$OS.type == "windows") windows
-                else if (.Platform$GUI == "AQUA" ||
-                         ((!nzchar(dsp) || grepl("^/tmp/launch-", dsp))
-                          && .Call(C_makeQuartzDefault))) quartz
-                else if (nzchar(dsp) && .Platform$GUI %in% c("X11", "Tk")) X11
-                else defdev
-            }
-        } else defdev
-    }
+    if(noRStudioGD && is.character(dev) && dev == "RStudioGD")
+        dev <- .select_device()
     if(is.character(dev)) {
         ## this is documented to be searched for from workspace,
-        ## then in graphics namespace.
+        ## then in the grDevices namespace.
         ## We could restrict the search to functions, but the C
         ## code in devices.c does not.
         dev <- if(exists(dev, .GlobalEnv)) get(dev, .GlobalEnv)
@@ -386,3 +372,24 @@ dev.capabilities <- function(what = NULL)
                   if (zz[9L]) "Keybd" )[-1L]
     if (!is.null(what)) z[charmatch(what, names(z), 0L)] else z
 }
+
+## for use in dev.new and .onLoad
+.select_device <- function() {
+    ## Use device functions rather than names to make it harder to get masked.
+    if(!nzchar(defdev <- Sys.getenv("R_DEFAULT_DEVICE"))) defdev <- pdf
+    if(interactive()) {
+        if(nzchar(intdev <- Sys.getenv("R_INTERACTIVE_DEVICE"))) intdev
+        else {
+            if(.Platform$OS.type == "windows") windows
+            else {
+                ## This detects if quartz() was built and if we are
+                ## running at the macOS console (both of which have to
+                ## be true under R.app).
+                if(.Platform$GUI == "AQUA" ||.Call(C_makeQuartzDefault)) quartz
+                else if(nzchar(Sys.getenv("DISPLAY"))
+                        && .Platform$GUI %in% c("X11", "Tk")) X11
+                else defdev
+            }
+        }
+    } else defdev
+}
diff --git a/src/library/grDevices/R/gevents.R b/src/library/grDevices/R/gevents.R
index 72f6a40..db91a1a 100644
--- a/src/library/grDevices/R/gevents.R
+++ b/src/library/grDevices/R/gevents.R
@@ -1,7 +1,7 @@
 #  File src/library/grDevices/R/gevents.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
-#  Copyright (C) 1995-2012 The R Core Team
+#  Copyright (C) 1995-2014 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
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 setGraphicsEventHandlers <- function(which=dev.cur(),
 				     ...)
@@ -37,12 +37,13 @@ getGraphicsEventEnv <- function(which=dev.cur()) {
 
 getGraphicsEvent <- function(prompt = "Waiting for input",
                  onMouseDown = NULL, onMouseMove = NULL, onMouseUp = NULL,
-                 onKeybd = NULL, consolePrompt = prompt) {
+                 onKeybd = NULL, onIdle = NULL, consolePrompt = prompt) {
     if (!interactive()) return(NULL)
     if (!missing(prompt) || !missing(onMouseDown) || !missing(onMouseMove)
-     || !missing(onMouseUp) || !missing(onKeybd)) {
+     || !missing(onMouseUp) || !missing(onKeybd) || !missing(onIdle)) {
         setGraphicsEventHandlers(prompt=prompt, onMouseDown=onMouseDown,
-          onMouseMove=onMouseMove, onMouseUp=onMouseUp, onKeybd=onKeybd)
+          onMouseMove=onMouseMove, onMouseUp=onMouseUp, onKeybd=onKeybd,
+          onIdle=onIdle)
     }
     .External2(C_getGraphicsEvent, consolePrompt)
 }
diff --git a/src/library/grDevices/R/pictex.R b/src/library/grDevices/R/pictex.R
index 0782f78..ae7e5ad 100644
--- a/src/library/grDevices/R/pictex.R
+++ b/src/library/grDevices/R/pictex.R
@@ -1,5 +1,5 @@
 #  File src/library/grDevices/R/pictex.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
 #  Copyright (C) 1995-2012 The R Core Team
 #
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 pictex <-
     function(file = "Rplots.tex", width = 5, height = 4, debug = FALSE,
diff --git a/src/library/grDevices/R/postscript.R b/src/library/grDevices/R/postscript.R
index d9c7e4c..736e84f 100644
--- a/src/library/grDevices/R/postscript.R
+++ b/src/library/grDevices/R/postscript.R
@@ -1,7 +1,7 @@
 #  File src/library/grDevices/R/postscript.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
-#  Copyright (C) 1995-2014 The R Core Team
+#  Copyright (C) 1995-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
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 ## An environment not exported from namespace:graphics used to pass
 ## .PostScript.Options and .PDF.options to the windows() device for
@@ -71,11 +71,11 @@ check.options <-
                                      "differs between new and previous",
                                      "differ between new and previous"),
                             if(any(do.keep)) {
-                                paste("\n\t ==> ",
-                                      gettextf("NOT changing %s",
-                                              paste(sQuote(names(prev[do.keep])),
-                                                    collapse=" & ")),
-                                      sep = "")} else "",
+                                paste0("\n\t ==> ",
+                                       gettextf("NOT changing %s",
+                                                paste(sQuote(names(prev[do.keep])),
+                                                      collapse=" & ")))
+                            } else "",
                             domain = NA, call. = FALSE)
 		}
 	    names(new) <- NULL
@@ -191,7 +191,7 @@ guessEncoding <- function(family)
 
 ##--> source in devPS.c :
 
-postscript <- function(file = ifelse(onefile, "Rplots.ps", "Rplot%03d.ps"),
+postscript <- function(file = if(onefile) "Rplots.ps" else "Rplot%03d.ps",
                        onefile, family, title , fonts, encoding, bg, fg,
                        width, height, horizontal, pointsize,
                        paper, pagecentre, print.it, command, colormodel,
@@ -272,7 +272,7 @@ postscript <- function(file = ifelse(onefile, "Rplots.ps", "Rplot%03d.ps"),
     invisible()
 }
 
-xfig <- function (file = ifelse(onefile,"Rplots.fig", "Rplot%03d.fig"),
+xfig <- function (file = if(onefile) "Rplots.fig" else "Rplot%03d.fig",
                   onefile = FALSE, encoding = "none",
                   paper = "default", horizontal = TRUE,
                   width = 0, height = 0, family = "Helvetica",
@@ -291,7 +291,7 @@ xfig <- function (file = ifelse(onefile,"Rplots.fig", "Rplot%03d.fig"),
     invisible()
 }
 
-pdf <- function(file = ifelse(onefile, "Rplots.pdf", "Rplot%03d.pdf"),
+pdf <- function(file = if(onefile) "Rplots.pdf" else "Rplot%03d.pdf",
                 width, height, onefile, family, title, fonts, version,
                 paper, encoding, bg, fg, pointsize, pagecentre, colormodel,
                 useDingbats, useKerning, fillOddEven, compress)
@@ -947,12 +947,12 @@ pdfFonts(Japan1 = CIDFont("KozMinPro-Regular-Acro", "EUC-H", "EUC-JP",
 }
 
 # Call ghostscript to process postscript or pdf file to embed fonts
-# (could also be used to convert ps or pdf to any supported  format)
+# (could also be used to convert ps or pdf to any supported format)
 embedFonts <- function(file, # The ps or pdf file to convert
                        format, # Default guessed from file suffix
                        outfile = file, # By default overwrite file
                        fontpaths = character(),
-                       options = "" # Additional options to ghostscript
+                       options = character() # Additional options to ghostscript
                        )
 {
     if(!is.character(file) || length(file) != 1L || !nzchar(file))
@@ -965,20 +965,22 @@ embedFonts <- function(file, # The ps or pdf file to convert
         format <- switch(suffix,
                          ps = , eps = "ps2write",
                          pdf = "pdfwrite")
-    if (!is.character(format))
-        stop("Invalid output format")
+    if (!is.character(format)) stop("invalid output format")
+    check_gs_type(gsexe, format)
     tmpfile <- tempfile("Rembed")
     if (length(fontpaths))
         fontpaths <-
-            shQuote(paste0("-sFONTPATH=",
-                           paste(fontpaths, collapse =.Platform$path.sep)))
-    cmd <- paste0(gsexe, " -dNOPAUSE -dBATCH -q -dAutoRotatePages=/None -sDEVICE=", format,
-                  " -sOutputFile=", tmpfile, " ", fontpaths, " ",
-                  options, " ", shQuote(file))
-    ret <- system(cmd)
+            paste0("-sFONTPATH=",
+                   shQuote(paste(fontpaths, collapse = .Platform$path.sep)))
+    args <- c(paste0("-dNOPAUSE -dBATCH -q -dAutoRotatePages=/None -sDEVICE=", format),
+              paste0(" -sOutputFile=", tmpfile),
+              fontpaths, options, shQuote(file))
+    ret <- system2(gsexe, args)
     if(ret != 0)
         stop(gettextf("status %d in running command '%s'", ret, cmd),
              domain = NA)
+    if(outfile != file) args[2] <- paste0(" -sOutputFile=", shQuote(outfile))
+    cmd <- paste(c(shQuote(gsexe), args), collapse = " ")
     file.copy(tmpfile, outfile, overwrite = TRUE)
     invisible(cmd)
 }
diff --git a/src/library/grDevices/R/prettyDate.R b/src/library/grDevices/R/prettyDate.R
index 388e3ce..6f06019 100644
--- a/src/library/grDevices/R/prettyDate.R
+++ b/src/library/grDevices/R/prettyDate.R
@@ -1,7 +1,7 @@
 #  File src/library/grDevices/R/prettyDate.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
-#  Copyright (C) 1995-2012 The R Core Team
+#  Copyright (C) 1995-2016 The R Core Team
 #
 # Original code Copyright (C) 2010 Felix Andrews
 # Modifications Copyright (C) 2010 The R Core Team
@@ -17,35 +17,46 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
-
-pretty.Date <- function(x, n = 5, min.n = n %/% 2, sep = " ", ...)
-{
-    prettyDate(x = x, n = n, min.n = min.n, sep = sep, ...)
-}
-
-pretty.POSIXt <- function(x, n = 5, min.n = n %/% 2, sep = " ", ...)
-{
-    prettyDate(x = x, n = n, min.n = min.n, sep = sep, ...)
-}
-
+#  https://www.R-project.org/Licenses/
 
+##' S3 method =:  pretty.Date() and pretty.POSIXt [in ../NAMESPACE]
 prettyDate <- function(x, n = 5, min.n = n %/% 2, sep = " ", ...)
 {
+    stopifnot(min.n <= n)
     isDate <- inherits(x, "Date")
     x <- as.POSIXct(x)
     if (isDate) # the timezone *does* matter
 	attr(x, "tzone") <- "GMT"
-    zz <- range(x, na.rm = TRUE)
-    xspan <- as.numeric(diff(zz), units = "secs")
-    if (diff(as.numeric(zz)) == 0) # one value only
-	zz <- zz + c(0,60)
-    ## specify the set of pretty timesteps
+    zz <- rx <- range(x, na.rm = TRUE)
+    D <- diff(nzz <- as.numeric(zz))
     MIN <- 60
     HOUR <- MIN * 60
     DAY <- HOUR * 24
     YEAR <- DAY * 365.25
     MONTH <- YEAR / 12
+    makeOutput <- function(at, s, round = TRUE, do) {
+	structure(if(isDate)
+		      if(round) as.Date(round(at, units = "days")) else at
+		  else as.POSIXct(at),
+		  labels = format(at, s$format))
+    }
+    if(isDate && D <= n * DAY) { # D <= 'n days' & Date  ==> use days
+	zz <- as.Date(zz)
+	r <- round(n - D/DAY)
+	m <- max(0, r %/% 2)
+        m2 <- m + (r %% 2)
+	while(length(dd <- seq.Date(zz[1] - m, zz[2] + m2, by = "1 day")) < min.n + 1)
+	    if(m < m2) m <- m+1 else m2 <- m2+1
+	return(makeOutput(dd, round = FALSE, ## "1 DSTday" from steps:
+			  list(format = paste("%b", "%d", sep = sep))))
+    }
+    else if(D < 1) { # unique values / sub-second ranges: [? or use "1 ms" steps below?]
+	m <- min(30, max(D == 0, n/2))
+	zz <- structure(c(floor(nzz[1] - m), ceiling(nzz[2] + m)),
+			class = class(x), tzone = attr(x, "tzone"))
+    }
+    xspan <- as.numeric(diff(zz), units = "secs")
+    ## specify the set of pretty timesteps
     steps <-
         list("1 sec" = list(1, format = "%S", start = "mins"),
              "2 secs" = list(2),
@@ -60,7 +71,8 @@ prettyDate <- function(x, n = 5, min.n = n %/% 2, sep = " ", ...)
              "15 mins" = list(15*MIN),
              "30 mins" = list(30*MIN),
              ## "1 hour" = list(1*HOUR),
-             "1 hour" = list(1*HOUR, format = if (xspan <= DAY) "%H:%M" else paste("%b %d", "%H:%M", sep = sep)),
+	     "1 hour" = list(1*HOUR, format = if (xspan <= DAY) "%H:%M"
+					      else paste("%b %d", "%H:%M", sep = sep)),
              "3 hours" = list(3*HOUR, start = "days"),
              "6 hours" = list(6*HOUR, format = paste("%b %d", "%H:%M", sep = sep)),
              "12 hours" = list(12*HOUR),
@@ -69,7 +81,8 @@ prettyDate <- function(x, n = 5, min.n = n %/% 2, sep = " ", ...)
              "1 week" = list(7*DAY, start = "weeks"),
              "halfmonth" = list(MONTH/2, start = "months"),
              ## "1 month" = list(1*MONTH, format = "%b"),
-             "1 month" = list(1*MONTH, format = if (xspan < YEAR) "%b" else paste("%b", "%Y", sep = sep)),
+	     "1 month" = list(1*MONTH, format = if (xspan < YEAR) "%b"
+						else paste("%b", "%Y", sep = sep)),
              "3 months" = list(3*MONTH, start = "years"),
              "6 months" = list(6*MONTH, format = "%Y-%m"),
              "1 year" = list(1*YEAR, format = "%Y"),
@@ -91,64 +104,126 @@ prettyDate <- function(x, n = 5, min.n = n %/% 2, sep = " ", ...)
         steps[[i]]$spec <- names(steps)[i]
     }
     ## crudely work out number of steps in the given interval
-    nsteps <- sapply(steps, function(s) {
-        xspan / s[[1]]
-    })
-    init.i <- which.min(abs(nsteps - n))
+    nsteps <- xspan / vapply(steps, `[[`, numeric(1), 1L, USE.NAMES=FALSE)
+    init.i <- init.i0 <- which.min(abs(nsteps - n))
     ## calculate actual number of ticks in the given interval
-    calcSteps <- function(s) {
-        startTime <- trunc_POSIXt(min(zz), units = s$start) ## FIXME: should be trunc() eventually
-        if (identical(s$spec, "halfmonth")) {
-            at <- seq(startTime, max(zz), by = "months")
-            at2 <- as.POSIXlt(at)
-            at2$mday <- 15L
-            at <- structure(sort(c(as.POSIXct(at), as.POSIXct(at2))),
-                            tzone = attr(at, "tzone"))
-        } else {
-            at <- seq(startTime, max(zz), by = s$spec)
-        }
-        at <- at[(min(zz) <= at) & (at <= max(zz))]
-        at
+    calcSteps <- function(s, lim = range(zz)) {
+        startTime <- trunc_POSIXt(lim[1], units = s$start) ## FIXME: should be trunc() eventually
+        at <- seqDtime(startTime, end = lim[2], by = s$spec)
+	if(anyNA(at)) { at <- at[!is.na(at)]; if(!length(at)) return(at) }
+	r1 <- sum(at <= lim[1])
+	r2 <- length(at) + 1 - sum(at >= lim[2])
+	if(r2 == length(at) + 1) { # not covering at right -- add point at right
+	    nat <- seqDtime(at[length(at)], by = s$spec, length=2)[2]
+	    if(is.na(nat) || !(nat > at[length(at)])) # failed
+		r2 <- length(at)
+	    else
+		at[r2] <- nat
+	}
+	## Now we could see if we are *smaller* than 'n+1' and add even more at[] on both sides
+	at[r1:r2]
     }
-    init.at <- calcSteps(steps[[init.i]])
-    init.n <- length(init.at) - 1L
+    init.at <- calcSteps(st.i <- steps[[init.i]])
     ## bump it up if below acceptable threshold
-    while (init.n < min.n) {
-        init.i <- init.i - 1L
-        if (init.i == 0) stop("range too small for 'min.n'")
-        init.at <- calcSteps(steps[[init.i]])
-        init.n <- length(init.at) - 1L
-    }
-    makeOutput <- function(at, s) {
-        flabels <- format(at, s$format)
-        ans <-
-            if (isDate) as.Date(round(at, units = "days"))
-            else as.POSIXct(at)
-        attr(ans, "labels") <- flabels
-        ans
+    R <- TRUE # R := TRUE iff "right"
+    L.fail <- R.fail <- FALSE
+    while ((init.n <- length(init.at) - 1L) < min.n) {
+	if(init.i == 1L) { ## keep steps[[1]]
+	    ## add new interval right or left
+            if(R) {
+                nat <- seqDtime(init.at[length(init.at)], by = st.i$spec, length=2)[2]
+                R.fail <- is.na(nat) || !(nat > init.at[length(init.at)])
+                if(!R.fail)
+                    init.at[length(init.at) + 1] <- nat
+            } else { # left
+                nat <- seqDtime(init.at[1], by = paste0("-",st.i$spec), length=2)[2]
+                L.fail <- is.na(nat) || !(nat < init.at[1])
+                if(!L.fail) {
+                    init.at[seq_along(init.at) + 1] <- init.at
+                    init.at[1] <- nat
+                }
+            }
+            if(R.fail && L.fail)
+                stop("failed to add more ticks; 'min.n' too large?")
+	    R <- !R # alternating right <-> left
+	} else { # smaller step sizes
+	    init.i <- init.i - 1L
+	    init.at <- calcSteps(st.i <- steps[[init.i]])
+	}
     }
     if (init.n == n) ## perfect
-        return(makeOutput(init.at, steps[[init.i]]))
-    if (init.n > n) {
-        ## too many ticks
-        new.i <- init.i + 1L
-        new.i <- min(new.i, length(steps))
-    } else {
-        ## too few ticks
-        new.i <- init.i - 1L
-        new.i <- max(new.i, 1L)
+        return(makeOutput(init.at, st.i))
+    ## else : have a difference dn :
+    dn <- init.n - n
+    if(dn > 0L) {  ## too many ticks
+	## ticks "outside", on left and right, keep at least one on each side
+	nl <- sum(init.at <= rx[1]) - 1L
+	nr <- sum(init.at >= rx[2]) - 1L
+	if(nl > 0L || nr > 0L) {
+	    n.c <- nl+nr # number of removable ticks
+	    if(dn < n.c) { # remove dn, not all
+		nl <- round(dn * nl/n.c)
+		nr <- dn - nl
+	    }
+	    ## remove nl on left,  nr on right:
+	    init.at <- init.at[-c(seq_len(nl), length(init.at)+1L-seq_len(nr))]
+	}
+    } else { ## too few ticks
+        ## warning("trying to add more points -- not yet implemented")
+        ## but after all, 'n' is approximate
+	## init.at <- calcSteps(st.i, "more ticks")
     }
+    if ((dn <- length(init.at) - 1L - n) == 0L  ## perfect
+	|| (dn > 0L && init.i < init.i0) # too many, but we tried init.i + 1 already
+        || (dn < 0L && init.i == 1)) # too few, but init.i = 1
+	return(makeOutput(init.at, st.i))
+
+    new.i <- if (dn > 0L) ## too many ticks
+		 min(init.i + 1L, length(steps))
+	     else ## too few ticks (and init.i > 1):
+		 init.i - 1L
     new.at <- calcSteps(steps[[new.i]])
     new.n <- length(new.at) - 1L
     ## work out whether new.at or init.at is better
     if (new.n < min.n)
         new.n <- -Inf
-    if (abs(new.n - n) < abs(init.n - n))
+    if (abs(new.n - n) < abs(dn))
 	makeOutput(new.at, steps[[new.i]])
     else
-	makeOutput(init.at, steps[[init.i]])
+	makeOutput(init.at, st.i)
+}
+
+
+## Utility, a generalization/special case of seq.POSIXct() / seq.Date()
+seqDtime <- function(beg, end, by, length=NULL) {
+    if(missing(by) || !identical(by, "halfmonth"))
+        return( seq(beg, end, by = by, length.out=length) )
+    ## else  by == "halfmonth" => can only go forward (!)
+    if(is.null(length)) {
+        l2 <- NULL; i <- TRUE
+    } else {
+        l2 <- ceiling(length/2); i <- seq_len(length)
+    }
+    at <- seq(beg, end, by = "months", length.out = l2)
+    at2 <- as.POSIXlt(at)
+    stopifnot(length(md <- unique(at2$mday)) == 1)
+    at <- as.POSIXct(at)
+    ## intersperse at and at2 := 15-day-shifted( at ), via rbind():
+    if(md == 1) {
+        at2$mday <- 15L
+    } else if(md >= 15) { # (md == 16 may happen; not seen yet)
+        at2$mday <- 1L
+        at2$mon <- at2$mon + 1L
+        ## at2 now has wrong 'yday','wday',.. and we rely on as.POSIXct():
+    } else if(md < 15) { ## e.g., southern hemisphere, seen 14
+        at2$mday <- md + 14L # consistent w (1 -> 15) in 1st case; ok even in Feb.
+    }
+    at2$isdst <- -1L
+    at2 <- rbind(at, as.POSIXct(at2), deparse.level = 0L)
+    structure(at2[i], class = class(at), tzone = attr(at, "tzone"))
 }
 
+
 ## utility function, extending the base function trunc.POSIXt.
 ## Ideally this should replace the original, but that should be done
 ## with a little more thought (what about round.POSIXt etc.?)
@@ -160,8 +235,8 @@ trunc_POSIXt <-
 {
     x <- as.POSIXlt(x)
     if (units %in% c("secs", "mins", "hours", "days"))
-        return(base::trunc.POSIXt(x, units))
-    x <- base::trunc.POSIXt(x, "days")
+	return(trunc.POSIXt(x, units))
+    x <- trunc.POSIXt(x, "days")
     if (length(x$sec))
         switch(units,
                weeks = {
diff --git a/src/library/grDevices/R/raster.R b/src/library/grDevices/R/raster.R
index 885ebfa..d9c75bd 100644
--- a/src/library/grDevices/R/raster.R
+++ b/src/library/grDevices/R/raster.R
@@ -1,7 +1,7 @@
 #  File src/library/grDevices/R/raster.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
-#  Copyright (C) 1995-2013 The R Core Team
+#  Copyright (C) 1995-2015 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
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 
 # A raster object is a character vector
@@ -42,10 +42,14 @@ as.raster.raster <- function(x, ...)  x
 as.raster.logical <- function(x, max = 1, ...)
     as.raster(matrix(x, ...), max)
 
+as.raster.raw <- function(x, max = 255L, ...)
+    as.raster(matrix(x, ...), max=max)
+
 as.raster.numeric <- as.raster.logical
 
 as.raster.character <- as.raster.logical
 
+
 as.raster.matrix <- function(x, max = 1, ...)
 {
     if (is.character(x)) {
@@ -60,6 +64,10 @@ as.raster.matrix <- function(x, max = 1, ...)
         if (length(tx.na)) tx[tx.na] <- 0
         r <- rgb(tx, tx, tx, maxColorValue = max)
         if (length(tx.na)) r[tx.na] <- NA
+    } else if (is.raw(x)) { ## non NA's here
+	storage.mode(x) <- "integer"
+	tx <- t(x)
+	r <- rgb(tx, tx, tx, maxColorValue = 255L)
     } else
         stop("a raster matrix must be character, or numeric, or logical")
     ## Transposed, but retain original dimensions
@@ -70,17 +78,22 @@ as.raster.matrix <- function(x, max = 1, ...)
 
 as.raster.array <- function(x, max = 1, ...)
 {
-    if (!is.numeric(x))
-        stop("a raster array must be numeric")
-    if (length(dim(x)) != 3L)
+    if (!is.numeric(x)) {
+	if (is.raw(x)) {
+	    storage.mode(x) <- "integer" # memory x 4 (!)
+	    max <- 255L
+	} else
+	    stop("a raster array must be numeric")
+    }
+    if (length(d <- dim(x)) != 3L)
         stop("a raster array must have exactly 3 dimensions")
-    r <- if (dim(x)[3L] == 3L)
+    r <- array(if (d[3L] == 3L)
         rgb(t(x[,,1L]), t(x[,,2L]), t(x[,,3L]), maxColorValue = max)
-    else if (dim(x)[3] == 4L)
+    else if (d[3L] == 4L)
         rgb(t(x[,,1L]), t(x[,,2L]), t(x[,,3L]), t(x[,,4L]), maxColorValue = max)
     else
-        stop("a raster array must have exactly 3 or 4 planes")
-    dim(r) <- dim(x)[1:2]
+        stop("a raster array must have exactly 3 or 4 planes"),
+    dim = d[1:2])
     class(r) <- "raster"
     r
 }
@@ -89,12 +102,11 @@ as.raster.array <- function(x, max = 1, ...)
 as.matrix.raster <- function(x, ...)
 {
     dim <- dim(x)
-    m <- matrix(x, nrow = dim[1L], ncol = dim[2L], byrow = TRUE)
-    m
+    matrix(x, nrow = dim[1L], ncol = dim[2L], byrow = TRUE)
 }
 
 is.na.raster <- function(x) is.na(as.matrix(x))
-anyNA.raster <- function(x) anyNA(as.matrix(x))
+anyNA.raster <- function(x, recursive = FALSE) anyNA(as.matrix(x))
 
 # FIXME:
 # It would be useful to have conversion to array (rgb[a])
diff --git a/src/library/grDevices/R/recordplot.R b/src/library/grDevices/R/recordplot.R
index d7d070a..3ebcb7a 100644
--- a/src/library/grDevices/R/recordplot.R
+++ b/src/library/grDevices/R/recordplot.R
@@ -1,7 +1,7 @@
 #  File src/library/grDevices/R/recordplot.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
-#  Copyright (C) 1995-2013 The R Core Team
+#  Copyright (C) 1995-2014 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
@@ -14,26 +14,32 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
-recordPlot <- function()
+# 'load' and 'attach' should be character vectors of package names
+recordPlot <- function(load=NULL, attach=NULL)
 {
     if(dev.cur() == 1L)
         stop("no current device to record from")
     res <- .External2(C_getSnapshot)
     attr(res, "pid") <- Sys.getpid()
+    attr(res, "Rversion") <- getRversion()
+    attr(res, "load") <- as.character(load)
+    attr(res, "attach") <- as.character(attach)
     class(res) <- "recordedplot"
     res
 }
 
-replayPlot <- function(x)
+replayPlot <- function(x, reloadPkgs=FALSE)
 {
     if(!inherits(x, "recordedplot"))
         stop(gettextf("argument is not of class %s", dQuote("recordedplot")),
              domain = NA)
     pid <- attr(x, "pid") ## added after R 3.0.2
-    if (is.null(pid) || pid != Sys.getpid())
-        stop("loading snapshot from a different session")
+    if (is.null(pid) || pid != Sys.getpid()) {
+        # This is a "recordedplot" loaded from another session
+        x <- restoreRecordedPlot(x, reloadPkgs)
+    }
     invisible(.External2(C_playSnapshot, x))
 }
 
@@ -43,3 +49,68 @@ print.recordedplot <- function(x, ...)
     invisible(x)
 }
 
+# If this is a "recordedplot" that has been saved and reloaded
+# (possibly across sessions) then we need to ...
+# - warn if have R version mismatch
+# - restore NativeSymbolInfo on each element of the snapshot display list
+# - bail out gracefully if something is not right
+restoreRecordedPlot <- function(x, reloadPkgs) {
+    snapshotRversion <- attr(x, "Rversion")
+    if (is.null(snapshotRversion)) {
+        warning("snapshot recorded in different R version (pre 3.3.0)")
+    } else if (snapshotRversion != getRversion()) {
+        warning(gettextf("snapshot recorded in different R version (%s)",
+                         snapshotRversion))
+    }
+    # Ensure that all graphics systems in the snapshot are available
+    # (snapshots only started recording pkgName in R 3.3.0)
+    # Similar for any 'pkgs' saved with the snapshot
+    n <- length(x)
+    if (n > 1 &&
+        !is.null(snapshotRversion) &&
+        snapshotRversion >= R_system_version("3.3.0")) {
+        for (i in 2:n) {
+            library(attr(x[[i]], "pkgName"), character.only=TRUE)
+        }
+        if (reloadPkgs) {
+            load <- attr(x, "load")
+            for (i in load) {
+                loadNamespace(i)
+            }
+            attach <- attr(x, "attach")
+            for (i in attach) {
+                library(i, character.only=TRUE)
+            }
+        }
+    }
+    # The display list is the first component of the snapshot
+    plot <- x
+    for (i in 1:length(plot[[1]])) {
+        # get the symbol then test if it's a native symbol
+        symbol <- plot[[1]][[i]][[2]][[1]]
+        if ("NativeSymbolInfo" %in% class(symbol)) {
+            # determine the dll that the symbol lives in
+            if (!is.null(symbol$package))
+                name <- symbol$package[["name"]]
+            else
+                name <- symbol$dll[["name"]]
+            pkgDLL <- getLoadedDLLs()[[name]]
+            # reconstruct the native symbol and assign it into the plot
+            # This will error out if it fails to find the symbol, which
+            # is some protection against running "recordedplot" in
+            # R session where the recorded function does not exist!
+            nativeSymbol <- getNativeSymbolInfo(name = symbol$name,
+                                                PACKAGE = pkgDLL,
+                                                withRegistrationInfo = TRUE)
+            # Check that the 'numParameters' matches.
+            # If it does not, we would also receive a redundant WARNING
+            # about R version or graphics engine version mismatch,
+            # but this mismatch is serious enough to put a STOP to things.
+            if (nativeSymbol$numParameters != symbol$numParameters) {
+                stop("snapshot contains invalid graphics call")
+            }
+            plot[[1]][[i]][[2]][[1]] <- nativeSymbol
+        }
+    }
+    plot
+}
diff --git a/src/library/grDevices/R/smooth2d.R b/src/library/grDevices/R/smooth2d.R
index e9ea0d8..07e5d46 100644
--- a/src/library/grDevices/R/smooth2d.R
+++ b/src/library/grDevices/R/smooth2d.R
@@ -1,7 +1,7 @@
 #  File src/library/grDevices/R/smooth2d.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
-#  Copyright (C) 1995-2012 The R Core Team
+#  Copyright (C) 1995-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
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 
 ## need some standard blues to plot ; output of brewer.pal(9, "Blues"):
@@ -29,7 +29,7 @@ blues9 <- c("#F7FBFF", "#DEEBF7", "#C6DBEF", "#9ECAE1", "#6BAED6",
 	stop("'nbin' must be numeric of length 1 or 2")
 
     if (missing(bandwidth)) { ## cheap
-	bandwidth <- diff(apply(x, 2, quantile,
+	bandwidth <- diff(apply(x, 2, stats::quantile,
 				probs = c(0.05, 0.95),
                                 na.rm = TRUE, names = FALSE)) / 25
 	bandwidth[bandwidth==0] <- 1
@@ -49,7 +49,7 @@ densCols <- function(x, y = NULL, nbin = 128, bandwidth,
 		     colramp = colorRampPalette(blues9[-(1:3)]))
 {
     ## similar as in plot.default
-    xy <- xy.coords(x, y)
+    xy <- xy.coords(x, y, setLab = FALSE)
 
     ## deal with NA, etc
     select <- is.finite(xy$x) & is.finite(xy$y)
diff --git a/src/library/grDevices/R/unix/dev2bitmap.R b/src/library/grDevices/R/unix/dev2bitmap.R
index 1c95366..1769190 100644
--- a/src/library/grDevices/R/unix/dev2bitmap.R
+++ b/src/library/grDevices/R/unix/dev2bitmap.R
@@ -1,5 +1,5 @@
 #  File src/library/grDevices/R/unix/dev2bitmap.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
 #  Copyright (C) 1995-2014 The R Core Team
 #
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 dev2bitmap <- function(file, type = "png16m", height = 7, width = 7, res = 72,
                        units = "in", pointsize, ...,
diff --git a/src/library/grDevices/R/unix/png.R b/src/library/grDevices/R/unix/png.R
index dc24b6b..2ba70b4 100644
--- a/src/library/grDevices/R/unix/png.R
+++ b/src/library/grDevices/R/unix/png.R
@@ -1,7 +1,7 @@
 #  File src/library/grDevices/R/unix/png.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
-#  Copyright (C) 1995-2014 The R Core Team
+#  Copyright (C) 1995-2015 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
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 .geometry <- function(width, height, units, res)
 {
@@ -56,13 +56,13 @@ png <- function(filename = "Rplot%03d.png",
                             "white", if(is.na(res)) NULL else res))
     } else if (type == "cairo" && capabilities("cairo"))
         invisible(.External(C_devCairo, filename, 2L, g$width, g$height,
-                            pointsize, bg, res, antialias, 100L, d$family))
+                            pointsize, bg, res, antialias, 100L, d$family, 300))
     else if (type == "cairo-png" && capabilities("cairo"))
         invisible(.External(C_devCairo, filename, 5L, g$width, g$height,
-                            pointsize, bg, res, antialias, 100L, d$family))
+                            pointsize, bg, res, antialias, 100L, d$family, 300))
     else
         invisible(.External2(C_X11,
-                             paste("png::", filename, sep=""),
+                             paste0("png::", filename),
                              g$width, g$height, pointsize, d$gamma,
                              d$colortype, d$maxcubesize, bg, bg, d$fonts, res,
                              0L, 0L, "", 0, 0, d$family))
@@ -90,10 +90,11 @@ jpeg <- function(filename = "Rplot%03d.jpeg",
                             "white", if(is.na(res)) NULL else res))
     } else if (type == "cairo" && capabilities("cairo"))
         invisible(.External(C_devCairo, filename, 3L, g$width, g$height,
-                            pointsize, bg, res, antialias, quality, d$family))
+                            pointsize, bg, res, antialias, quality, d$family,
+                            300))
     else
         invisible(.External2(C_X11,
-                            paste("jpeg::", quality, ":", filename, sep=""),
+                            paste0("jpeg::", quality, ":", filename),
                             g$width, g$height, pointsize, d$gamma,
                             d$colortype, d$maxcubesize, bg, bg, d$fonts, res,
                             0L, 0L, "", 0, 0, d$family))
@@ -125,10 +126,11 @@ tiff <- function(filename = "Rplot%03d.tiff",
                             "white", if(is.na(res)) NULL else res))
     } else if (type == "cairo" && capabilities("cairo"))
         invisible(.External(C_devCairo, filename, 8L, g$width, g$height,
-                            pointsize, bg, res, antialias, comp, d$family))
+                            pointsize, bg, res, antialias, comp, d$family,
+                            300))
     else
         invisible(.External2(C_X11,
-                             paste("tiff::", comp, ":", filename, sep=""),
+                             paste0("tiff::", comp, ":", filename),
                              g$width, g$height, pointsize, d$gamma,
                              d$colortype, d$maxcubesize, bg, bg, d$fonts, res,
                              0L, 0L, "", 0, 0, d$family))
@@ -155,10 +157,17 @@ bmp <- function(filename = "Rplot%03d.bmp",
                             "white", if(is.na(res)) NULL else res))
     } else if (type == "cairo" && capabilities("cairo"))
         invisible(.External(C_devCairo, filename, 9L, g$width, g$height,
-                            pointsize, bg, res, antialias, 100L, d$family))
+                            pointsize, bg, res, antialias, 100L, d$family,
+                            300))
     else
-        invisible(.External2(C_X11, paste("bmp::", filename, sep=""),
+        invisible(.External2(C_X11, paste0("bmp::", filename),
                              g$width, g$height, pointsize, d$gamma,
                              d$colortype, d$maxcubesize, bg, bg, d$fonts, res,
                              0L, 0L, "", 0, 0, d$family))
 }
+
+grSoftVersion <- function() {
+    bm <- .Call(C_bmVersion)
+    if(nzchar(bm[3L])) bm[3L] <- strsplit(bm[3L], "\n")[[1L]][1L]
+    c(cairo = cairoVersion(), bm)
+}
diff --git a/src/library/grDevices/R/unix/quartz.R b/src/library/grDevices/R/unix/quartz.R
index 44ce3a7..d869b1b 100644
--- a/src/library/grDevices/R/unix/quartz.R
+++ b/src/library/grDevices/R/unix/quartz.R
@@ -1,5 +1,5 @@
 #  File src/library/grDevices/R/unix/quartz.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
 #  Copyright (C) 1995-2014 The R Core Team
 #
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 .Quartzenv <- new.env()
 
@@ -105,7 +105,7 @@ setQuartzFonts <- function(fonts, fontNames) {
 }
 
 printFont <- function(font) {
-    paste(font, "\n", sep="")
+    paste0(font, "\n")
 }
 
 printFonts <- function(fonts) {
@@ -169,7 +169,7 @@ quartz.save <- function(file, type = 'png', device = dev.cur(), dpi = 100, ...)
     oc$file <- NULL
     oc$device <- quartz
     oc$type <- type
-    if(missing(file)) file <- paste("Rplot", type, sep=".")
+    if(missing(file)) file <- paste0("Rplot.", type)
     oc$file <- file
     oc$dpi <- dpi
     din <- dev.size("in")
diff --git a/src/library/grDevices/R/unix/x11.R b/src/library/grDevices/R/unix/x11.R
index 9524613..45375db 100644
--- a/src/library/grDevices/R/unix/x11.R
+++ b/src/library/grDevices/R/unix/x11.R
@@ -1,5 +1,5 @@
 #  File src/library/grDevices/R/unix/x11.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
 #  Copyright (C) 1995-2014 The R Core Team
 #
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 ## An environment not exported from namespace:grDevices used to
 ## pass .X11.Fonts to the X11 device.
@@ -55,14 +55,15 @@ X11.options <- function(..., reset = FALSE)
 
 check_for_XQuartz <- function()
 {
-    r_arch <- .Platform$r_arch
-    DSO <- file.path(R.home("modules"), "R_X11.so")
-    out <- system2("otool", c("-L", shQuote(DSO)), stdout = TRUE)
-    ind <- grep("libX11[.][0-9]+[.]dylib", out)
-    if(length(ind)) {
-        this <- sub(" .*", "", sub("^\t", "", out[ind]))
-        if(!file.exists(this))
-            stop("X11 library is missing: install XQuartz from xquartz.macosforge.org", domain = NA)
+    if (file.exists("/usr/bin/otool") &&
+        file.exists(DSO <- file.path(R.home("modules"), "R_X11.so"))) {
+        out <- system2("otool", c("-L", shQuote(DSO)), stdout = TRUE)
+        ind <- grep("libX11[.][0-9]+[.]dylib", out)
+        if(length(ind)) {
+            this <- sub(" .*", "", sub("^\t", "", out[ind]))
+            if(!file.exists(this))
+                stop("X11 library is missing: install XQuartz from xquartz.macosforge.org", domain = NA)
+        }
     }
 }
 
@@ -168,7 +169,7 @@ setX11Fonts <- function(fonts, fontNames)
     assign(".X11.Fonts", fontDB, envir=.X11env)
 }
 
-printFont <- function(font) paste(font, "\n", sep="")
+printFont <- function(font) paste0(font, "\n")
 
 
 printFonts <- function(fonts)
@@ -219,7 +220,7 @@ X11Fonts(# Default Serif font is Times
          Mincho = X11Font("-*-mincho-%s-%s-*-*-%d-*-*-*-*-*-*-*")
          )
 
-savePlot <- function(filename = paste("Rplot", type, sep="."),
+savePlot <- function(filename = paste("Rplot", type, sep = "."),
                      type = c("png", "jpeg", "tiff", "bmp"),
                      device = dev.cur())
 {
diff --git a/src/library/grDevices/R/utils.R b/src/library/grDevices/R/utils.R
index 0567587..90f2f83 100644
--- a/src/library/grDevices/R/utils.R
+++ b/src/library/grDevices/R/utils.R
@@ -1,5 +1,5 @@
 #  File src/library/grDevices/R/utils.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
 #  Copyright (C) 1995-2012 The R Core Team
 #
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 n2mfrow <- function(nr.plots)
 {
diff --git a/src/library/grDevices/R/windows/cairo.R b/src/library/grDevices/R/windows/cairo.R
deleted file mode 100644
index 12326bf..0000000
--- a/src/library/grDevices/R/windows/cairo.R
+++ /dev/null
@@ -1,102 +0,0 @@
-#  File src/library/grDevices/R/windows/cairo.R
-#  Part of the R package, http://www.R-project.org
-#
-#  Copyright (C) 1995-2012 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
-#  the Free Software Foundation; either version 2 of the License, or
-#  (at your option) any later version.
-#
-#  This program is distributed in the hope that it will be useful,
-#  but WITHOUT ANY WARRANTY; without even the implied warranty of
-#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-#  GNU General Public License for more details.
-#
-#  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
-
-## These interfaces are undocumented and unexported.
-cairo_png <-
-    function(filename = "Rplot%03d.png",
-             width = 480, height = 480, units = "px", pointsize = 12,
-             bg = "white", res = NA, family = "sans",
-             antialias = c("default", "none", "gray", "subpixel"))
-{
-    if(!checkIntFormat(filename)) stop("invalid 'filename'")
-    units <- match.arg(units, c("in", "px", "cm", "mm"))
-    if(units != "px" && is.na(res))
-        stop("'res' must be specified unless 'units = \"px\"'")
-    height <-
-        switch(units, "in"=res, "cm"=res/2.54, "mm"=res/25.4, "px"=1) * height
-    width <-
-        switch(units, "in"=res, "cm"=res/2.54, "mm"=res/25.4, "px"=1) * width
-    antialiases <- eval(formals()$antialias)
-    antialias <- match(match.arg(antialias, antialiases), antialiases)
-    invisible(.External(C_devCairo, filename, 2L, width, height, pointsize, bg,
-                        res, antialias, 100L, family))
-}
-
-cairo_jpeg <-
-    function(filename = "Rplot%03d.jpeg",
-             width = 480, height = 480, units = "px", pointsize = 12,
-             quality = 75,
-             bg = "white", res = NA, family = "sans",
-             antialias = c("default", "none", "gray", "subpixel"))
-{
-    if(!checkIntFormat(filename)) stop("invalid 'filename'")
-    units <- match.arg(units, c("in", "px", "cm", "mm"))
-    if(units != "px" && is.na(res))
-        stop("'res' must be specified unless 'units = \"px\"'")
-    height <-
-        switch(units, "in"=res, "cm"=res/2.54, "mm"=res/25.4, "px"=1) * height
-    width <-
-        switch(units, "in"=res, "cm"=res/2.54, "mm"=res/25.4, "px"=1) * width
-    antialiases <- eval(formals()$antialias)
-    antialias <- match(match.arg(antialias, antialiases), antialiases)
-    invisible(.External(C_devCairo, filename, 3L, width, height, pointsize, bg,
-                        res, antialias, quality, family))
-}
-
-cairo_tiff <-
-    function(filename = "Rplot%03d.tiff",
-             width = 480, height = 480, units = "px", pointsize = 12,
-             compression = c("none", "rle", "lzw", "jpeg", "zip"),
-             bg = "white", res = NA, family = "sans",
-             antialias = c("default", "none", "gray", "subpixel"))
-{
-    if(!checkIntFormat(filename)) stop("invalid 'filename'")
-    units <- match.arg(units, c("in", "px", "cm", "mm"))
-    if(units != "px" && is.na(res))
-        stop("'res' must be specified unless 'units = \"px\"'")
-    height <-
-        switch(units, "in"=res, "cm"=res/2.54, "mm"=res/25.4, "px"=1) * height
-    width <-
-        switch(units, "in"=res, "cm"=res/2.54, "mm"=res/25.4, "px"=1) * width
-    antialiases <- eval(formals()$antialias)
-    antialias <- match(match.arg(antialias, antialiases), antialiases)
-    comp <- switch( match.arg(compression),
-                   "none" = 1, "rle" = 2, "lzw" = 5, "jpeg" = 7, "zip" = 8)
-    invisible(.External(C_devCairo, filename, 8L, width, height, pointsize, bg,
-                        res, antialias, comp, family))
-}
-
-cairo_bmp <-
-    function(filename = "Rplot%03d.bmp",
-             width = 480, height = 480, units = "px", pointsize = 12,
-             bg = "white", res = NA, family = "sans",
-             antialias = c("default", "none", "gray", "subpixel"))
-{
-    if(!checkIntFormat(filename)) stop("invalid 'filename'")
-    units <- match.arg(units, c("in", "px", "cm", "mm"))
-    if(units != "px" && is.na(res))
-        stop("'res' must be specified unless 'units = \"px\"'")
-    height <-
-        switch(units, "in"=res, "cm"=res/2.54, "mm"=res/25.4, "px"=1) * height
-    width <-
-        switch(units, "in"=res, "cm"=res/2.54, "mm"=res/25.4, "px"=1) * width
-    antialiases <- eval(formals()$antialias)
-    antialias <- match(match.arg(antialias, antialiases), antialiases)
-    invisible(.External(C_devCairo, filename, 9L, width, height, pointsize, bg,
-                        res, antialias, 100L, family))
-}
diff --git a/src/library/grDevices/R/windows/dev2bitmap.R b/src/library/grDevices/R/windows/dev2bitmap.R
index 4ee9e51..2458078 100644
--- a/src/library/grDevices/R/windows/dev2bitmap.R
+++ b/src/library/grDevices/R/windows/dev2bitmap.R
@@ -1,5 +1,5 @@
 #  File src/library/grDevices/R/windows/dev2bitmap.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
 #  Copyright (C) 1995-2014 The R Core Team
 #
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 dev2bitmap <- function(file, type = "png16m", height = 7, width = 7, res = 72,
                        units = "in", pointsize, ...,
diff --git a/src/library/grDevices/R/windows/png.R b/src/library/grDevices/R/windows/png.R
index f2a87bb..b31d3e2 100644
--- a/src/library/grDevices/R/windows/png.R
+++ b/src/library/grDevices/R/windows/png.R
@@ -1,7 +1,7 @@
 #  File src/library/grDevices/R/windows/png.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
-#  Copyright (C) 1995-2014 The R Core Team
+#  Copyright (C) 1995-2015 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
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 .geometry <- function(width, height, units, res)
 {
@@ -48,13 +48,13 @@ png <-
         invisible(.External(C_devCairo, filename, 2L,
                             g$width, g$height, pointsize,
                             bg, res, antialias, 100L,
-                            if(nzchar(family)) family else "sans"))
+                            if(nzchar(family)) family else "sans", 300))
     } else if(match.arg(type) == "cairo-png") {
         antialias <- match(match.arg(antialias), aa.cairo)
         invisible(.External(C_devCairo, filename, 5L,
                             g$width, g$height, pointsize,
                             bg, res, antialias, 100L,
-                            if(nzchar(family)) family else "sans"))
+                            if(nzchar(family)) family else "sans", 300))
     } else {
         new <- if (!missing(antialias)) {
             list(bitmap.aa.win = match.arg(antialias, aa.win))
@@ -63,7 +63,7 @@ png <-
             check.options(new = new, envir = .WindowsEnv,
                           name.opt = ".Windows.Options",
                           reset = FALSE, assign.opt = FALSE)$bitmap.aa.win
-        invisible(.External(C_devga, paste("png:", filename, sep=""),
+        invisible(.External(C_devga, paste0("png:", filename),
                             g$width, g$height, pointsize, FALSE, 1L,
                             NA_real_, NA_real_, bg, 1,
                             as.integer(res), NA_integer_, FALSE, .PSenv, NA,
@@ -86,7 +86,7 @@ bmp <-
         invisible(.External(C_devCairo, filename,
                             9L, g$width, g$height, pointsize,
                             bg, res, antialias, 100L,
-                            if(nzchar(family)) family else "sans"))
+                            if(nzchar(family)) family else "sans", 300))
     } else {
         new <- if (!missing(antialias)) {
             list(bitmap.aa.win = match.arg(antialias, aa.win))
@@ -95,7 +95,7 @@ bmp <-
             check.options(new = new, envir = .WindowsEnv,
                           name.opt = ".Windows.Options",
                           reset = FALSE, assign.opt = FALSE)$bitmap.aa.win
-        invisible(.External(C_devga, paste("bmp:", filename, sep=""),
+        invisible(.External(C_devga, paste0("bmp:", filename),
                             g$width, g$height, pointsize, FALSE, 1L,
                             NA_real_, NA_real_, bg, 1,
                             as.integer(res), NA_integer_, FALSE, .PSenv, NA,
@@ -117,7 +117,7 @@ jpeg <-
         antialias <- match(match.arg(antialias), aa.cairo)
         invisible(.External(C_devCairo, filename, 3L, g$width, height, pointsize,
                             bg, res, antialias, quality,
-                            if(nzchar(family)) family else "sans"))
+                            if(nzchar(family)) family else "sans", 300))
     } else {
         new <- if (!missing(antialias)) {
             list(bitmap.aa.win = match.arg(antialias, aa.win))
@@ -127,7 +127,7 @@ jpeg <-
                           name.opt = ".Windows.Options",
                           reset = FALSE, assign.opt = FALSE)$bitmap.aa.win
         invisible(.External(C_devga,
-                            paste("jpeg:", quality, ":",filename, sep=""),
+                            paste0("jpeg:", quality, ":",filename),
                             g$width, g$height, pointsize, FALSE, 1L,
                             NA_real_, NA_real_, bg, 1,
                             as.integer(res), NA_integer_, FALSE, .PSenv, NA,
@@ -156,7 +156,7 @@ tiff <-
         invisible(.External(C_devCairo, filename, 8L,
                             g$width, g$height, pointsize,
                             bg, res, antialias, comp,
-                            if(nzchar(family)) family else "sans"))
+                            if(nzchar(family)) family else "sans", 300))
     } else {
         new <- if (!missing(antialias)) {
             list(bitmap.aa.win = match.arg(antialias, aa.win))
@@ -166,7 +166,7 @@ tiff <-
                           name.opt = ".Windows.Options",
                           reset = FALSE, assign.opt = FALSE)$bitmap.aa.win
         invisible(.External(C_devga,
-                            paste("tiff:", comp, ":", filename, sep=""),
+                            paste0("tiff:", comp, ":", filename),
                             g$width, g$height, pointsize, FALSE, 1L,
                             NA_real_, NA_real_, bg, 1,
                             as.integer(res), NA_integer_, FALSE, .PSenv, NA,
@@ -174,3 +174,9 @@ tiff <-
                             family, match(antialias, aa.win)))
     }
 }
+
+grSoftVersion <- function() {
+    bm <- .Call(C_bmVersion)
+    if(nzchar(bm[3L])) bm[3L] <- strsplit(bm[3L], "\n")[[1L]][1L]
+    c(cairo = cairoVersion(), bm)
+}
diff --git a/src/library/grDevices/R/windows/windows.R b/src/library/grDevices/R/windows/windows.R
index 9308dc3..97eedd5 100644
--- a/src/library/grDevices/R/windows/windows.R
+++ b/src/library/grDevices/R/windows/windows.R
@@ -1,5 +1,5 @@
 #  File src/library/grDevices/R/windows/windows.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
 #  Copyright (C) 1995-2014 The R Core Team
 #
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 .WindowsEnv <- new.env()
 
@@ -123,7 +123,7 @@ win.print <-
         stop("windows devices should not be used in examples etc", domain = NA)
 
     antialias <- match(match.arg(antialias, aa.win), aa.win)
-    invisible(.External(C_devga, paste("win.print:", printer, sep=""),
+    invisible(.External(C_devga, paste0("win.print:", printer),
                         width, height, pointsize, FALSE, 1L,
                         NA_real_, NA_real_, "white", 1,
                         NA_integer_, NA_integer_,
@@ -141,7 +141,7 @@ win.metafile <-
 
     if(!checkIntFormat(filename)) stop("invalid 'filename'")
     filename <- path.expand(filename)
-    invisible(.External(C_devga, paste("win.metafile:", filename, sep=""),
+    invisible(.External(C_devga, paste0("win.metafile:", filename),
                         width, height, pointsize, FALSE, 1L,
                         NA_real_, NA_real_, "white", 1,
                         NA_integer_, NA_integer_, FALSE, .PSenv, NA,
@@ -245,7 +245,7 @@ setWindowsFonts <- function(fonts, fontNames)
     assign(".Windows.Fonts", fontDB, envir=.WindowsEnv)
 }
 
-printFont <- function(font) paste(font, "\n", sep="")
+printFont <- function(font) paste0(font, "\n")
 
 printFonts <- function(fonts)
     cat(paste(names(fonts), ": ", unlist(lapply(fonts, printFont)),
diff --git a/src/library/grDevices/R/xyz.coords.R b/src/library/grDevices/R/xyz.coords.R
index 3a48719..5fba25b 100644
--- a/src/library/grDevices/R/xyz.coords.R
+++ b/src/library/grDevices/R/xyz.coords.R
@@ -1,7 +1,7 @@
 #  File src/library/grDevices/R/xyz.coords.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
-#  Copyright (C) 1995-2014 The R Core Team
+#  Copyright (C) 1995-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
@@ -14,19 +14,22 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 ## Both xy.coords() and xyz.coords()  --- should be kept in sync!
 
 xy.coords <-
-    function(x, y = NULL, xlab = NULL, ylab = NULL, log = NULL, recycle = FALSE)
+    function(x, y = NULL, xlab = NULL, ylab = NULL, log = NULL, recycle = FALSE,
+             setLab = TRUE)
 {
     if(is.null(y)) {
-	ylab <- xlab
+	if(is.null(ylab)) ylab <- xlab
 	if(is.language(x)) {
 	    if (inherits(x, "formula") && length(x) == 3) {
-		ylab <- deparse(x[[2L]])
-		xlab <- deparse(x[[3L]])
+                if(setLab) {
+                    ylab <- deparse(x[[2L]])
+                    xlab <- deparse(x[[3L]])
+                }
 		y <- eval(x[[2L]], environment(x))
 		x <- eval(x[[3L]], environment(x))
 	    }
@@ -35,39 +38,45 @@ xy.coords <-
 	else if(inherits(x, "ts")) {
 	    y <- if(is.matrix(x)) x[,1] else x
 	    x <- stats::time(x)
-	    xlab <- "Time"
+            if(setLab) xlab <- "Time"
 	}
 	else if(is.complex(x)) {
 	    y <- Im(x)
 	    x <- Re(x)
-	    xlab <- paste0("Re(", ylab, ")")
-	    ylab <- paste0("Im(", ylab, ")")
+            if(setLab) {
+                xlab <- paste0("Re(", ylab, ")")
+                ylab <- paste0("Im(", ylab, ")")
+            }
 	}
 	else if(is.matrix(x) || is.data.frame(x)) {
 	    x <- data.matrix(x)
 	    if(ncol(x) == 1) {
-		xlab <- "Index"
+		if(setLab) xlab <- "Index"
 		y <- x[,1]
 		x <- seq_along(y)
 	    }
 	    else {
 		colnames <- dimnames(x)[[2L]]
-		if(is.null(colnames)) {
-		    xlab <- paste0(ylab, "[,1]")
-		    ylab <- paste0(ylab, "[,2]")
-		}
-		else {
-		    xlab <- colnames[1L]
-		    ylab <- colnames[2L]
-		}
+                if(setLab) {
+                    if(is.null(colnames)) {
+                        xlab <- paste0(ylab, "[,1]")
+                        ylab <- paste0(ylab, "[,2]")
+                    }
+                    else {
+                        xlab <- colnames[1L]
+                        ylab <- colnames[2L]
+                    }
+                }
 		y <- x[,2]
 		x <- x[,1]
 	    }
 	}
 	else if(is.list(x)) {
             if (all(c("x", "y") %in% names(x))) {
-                xlab <- paste0(ylab, "$x")
-                ylab <- paste0(ylab, "$y")
+                if(setLab) {
+                    xlab <- paste0(ylab, "$x")
+                    ylab <- paste0(ylab, "$y")
+                }
                 y <- x[["y"]]
                 x <- x[["x"]]
             } else
@@ -75,7 +84,7 @@ xy.coords <-
 	}
 	else {
 	    if(is.factor(x)) x <- as.numeric(x)
-	    xlab <- "Index"
+	    if(setLab) xlab <- "Index"
 	    y <- x
 	    x <- seq_along(x)
 	}
@@ -99,34 +108,36 @@ xy.coords <-
 	if("x" %in% log && any(ii <- x <= 0 & !is.na(x))) {
 	    n <- as.integer(sum(ii))
 	    warning(sprintf(ngettext(n,
-                            "%d x value <= 0 omitted from logarithmic plot",
-                            "%d x values <= 0 omitted from logarithmic plot"),
+                                     "%d x value <= 0 omitted from logarithmic plot",
+                                     "%d x values <= 0 omitted from logarithmic plot"),
                             n), domain = NA)
 	    x[ii] <- NA
 	}
 	if("y" %in% log && any(ii <- y <= 0 & !is.na(y))) {
 	    n <- as.integer(sum(ii))
 	    warning(sprintf(ngettext(n,
-                            "%d y value <= 0 omitted from logarithmic plot",
-                            "%d y values <= 0 omitted from logarithmic plot"),
+                                     "%d y value <= 0 omitted from logarithmic plot",
+                                     "%d y values <= 0 omitted from logarithmic plot"),
                             n), domain = NA)
 	    y[ii] <- NA
 	}
     }
-    return(list(x=as.double(x), y=as.double(y), xlab=xlab, ylab=ylab))
+    list(x=as.double(x), y=as.double(y), xlab=xlab, ylab=ylab)
 }
 
 xyz.coords <- function(x, y=NULL, z=NULL, xlab=NULL, ylab=NULL, zlab=NULL,
-		       log = NULL, recycle = FALSE)
+		       log = NULL, recycle = FALSE, setLab = TRUE)
 {
     ## Only x
     if(is.null(y)) {
 	if (is.language(x)) {
 	    if (inherits(x, "formula") && length(x) == 3
 		&& length(rhs <- x[[3L]]) == 3) {
-		zlab <- deparse(x[[2L]])
-		ylab <- deparse(rhs[[3L]])
-		xlab <- deparse(rhs[[2L]])
+                if(setLab) {
+                    zlab <- deparse(x[[2L]])
+                    ylab <- deparse(rhs[[3L]])
+                    xlab <- deparse(rhs[[2L]])
+                }
 		pf <- parent.frame()
 		z <- eval(x[[2L]],   environment(x), pf)
 		y <- eval(rhs[[3L]], environment(x), pf)
@@ -138,23 +149,25 @@ xyz.coords <- function(x, y=NULL, z=NULL, xlab=NULL, ylab=NULL, zlab=NULL,
 	    x <- data.matrix(x)
 	    if(ncol(x) < 2) stop("at least 2 columns needed")
 	    if(ncol(x) == 2) {
-		xlab <- "Index"
+		if(setLab) xlab <- "Index"
 		y <- x[,1]
 		z <- x[,2]
 		x <- seq_along(y)
 	    }
 	    else { ## >= 3 columns
 		colnames <- dimnames(x)[[2L]]
-		if(is.null(colnames)) {
-		    zlab <- paste0(xlab,"[,3]")
-		    ylab <- paste0(xlab,"[,2]")
-		    xlab <- paste0(xlab,"[,1]")
-		}
-		else {
-		    xlab <- colnames[1L]
-		    ylab <- colnames[2L]
-		    zlab <- colnames[3L]
-		}
+                if(setLab) {
+                    if(is.null(colnames)) {
+                        zlab <- paste0(xlab,"[,3]")
+                        ylab <- paste0(xlab,"[,2]")
+                        xlab <- paste0(xlab,"[,1]")
+                    }
+                    else {
+                        xlab <- colnames[1L]
+                        ylab <- colnames[2L]
+                        zlab <- colnames[3L]
+                    }
+                }
 		y <- x[,2]
 		z <- x[,3]
 		x <- x[,1]
@@ -162,9 +175,11 @@ xyz.coords <- function(x, y=NULL, z=NULL, xlab=NULL, ylab=NULL, zlab=NULL,
 	}
 	else if(is.list(x)) {
             if (all(c("x", "y", "z") %in% names(x))) {
-                zlab <- paste0(xlab,"$z")
-                ylab <- paste0(xlab,"$y")
-                xlab <- paste0(xlab,"$x")
+                if(setLab) {
+                    zlab <- paste0(xlab,"$z")
+                    ylab <- paste0(xlab,"$y")
+                    xlab <- paste0(xlab,"$x")
+                }
                 y <- x[["y"]]
                 z <- x[["z"]]
                 x <- x[["x"]]
@@ -179,22 +194,26 @@ xyz.coords <- function(x, y=NULL, z=NULL, xlab=NULL, ylab=NULL, zlab=NULL,
 	    z <- y
 	    y <- Im(x)
 	    x <- Re(x)
-	    zlab <- ylab
-	    ylab <- paste0("Im(", xlab, ")")
-	    xlab <- paste0("Re(", xlab, ")")
+            if(setLab) {
+                zlab <- ylab
+                ylab <- paste0("Im(", xlab, ")")
+                xlab <- paste0("Re(", xlab, ")")
+            }
 	}
 	else if(is.complex(y)) {
 	    z <- x
 	    x <- Re(y)
 	    y <- Im(y)
-	    zlab <- xlab
-	    xlab <- paste0("Re(", ylab, ")")
-	    ylab <- paste0("Im(", ylab, ")")
+            if(setLab) {
+                zlab <- xlab
+                xlab <- paste0("Re(", ylab, ")")
+                ylab <- paste0("Im(", ylab, ")")
+            }
 	}
 	else {
 	    if(is.factor(x)) x <- as.numeric(x)
 	    if(is.factor(y)) y <- as.numeric(y)
-	    xlab <- "Index"
+            if(setLab) xlab <- "Index"
 	    z <- y
 	    y <- x
 	    x <- seq_along(x)
diff --git a/src/library/grDevices/R/zzz.R b/src/library/grDevices/R/zzz.R
index 8445e93..7cbd89f 100644
--- a/src/library/grDevices/R/zzz.R
+++ b/src/library/grDevices/R/zzz.R
@@ -1,7 +1,7 @@
 #  File src/library/grDevices/R/zzz.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
-#  Copyright (C) 1995-2013 The R Core Team
+#  Copyright (C) 1995-2014 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
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 .noGenerics <- TRUE
 
@@ -25,33 +25,16 @@ if (.Platform$OS.type == "windows") {
 
 .onLoad <- function(libname, pkgname)
 {
-    op <- options()
-    extras <- if(.Platform$OS.type == "windows")
-        list(windowsTimeouts = c(100L,500L)) else
-    list(bitmapType = if(capabilities("aqua")) "quartz"
-    else if(.Call(C_cairoProps, 2L)) "cairo" else "Xlib")
-    defdev <- Sys.getenv("R_DEFAULT_DEVICE")
-    ## Use devices rather than names to make it harder to get masked.
-    if(!nzchar(defdev)) defdev <- pdf
-    device <- if(interactive()) {
-        intdev <- Sys.getenv("R_INTERACTIVE_DEVICE")
-        if(nzchar(intdev)) intdev
-        else {
-            dsp <- Sys.getenv("DISPLAY")
-            if(.Platform$OS.type == "windows") windows
-            else if (.Platform$GUI == "AQUA" ||
-                     ((!nzchar(dsp) || grepl("^/tmp/launch-|^/private/tmp/com.apple.launchd", dsp))
-                      && .Call(C_makeQuartzDefault))) quartz
-            else if (nzchar(dsp) && .Platform$GUI %in% c("X11", "Tk")) X11
-	    else defdev
-        }
-    } else defdev
-
     if (.Platform$OS.type != "windows" && !.Call(C_cairoProps, 2L))
         X11.options(type = "Xlib")
+
+    extras <- if(.Platform$OS.type == "windows")
+        list(windowsTimeouts = c(100L,500L)) else
+        list(bitmapType = if(capabilities("aqua")) "quartz"
+        else if(.Call(C_cairoProps, 2L)) "cairo" else "Xlib")
     op.grDevices <- c(list(locatorBell = TRUE, device.ask.default = FALSE),
-                  extras, device = device)
-    toset <- !(names(op.grDevices) %in% names(op))
+                      extras, list(device = .select_device()))
+    toset <- !(names(op.grDevices) %in% names(options()))
     if(any(toset)) options(op.grDevices[toset])
 }
 
diff --git a/src/library/grDevices/man/Devices.Rd b/src/library/grDevices/man/Devices.Rd
index edcfa7f..7b19362 100644
--- a/src/library/grDevices/man/Devices.Rd
+++ b/src/library/grDevices/man/Devices.Rd
@@ -1,5 +1,5 @@
 % File src/library/grDevices/man/Devices.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2013 R Core Team
 % Distributed under GPL 2 or later
 
@@ -37,9 +37,9 @@
     \item \code{\link{tiff}} TIFF bitmap device
 #ifdef unix
 
-    \item \code{\link{quartz}} The graphics device for the OS X
+    \item \code{\link{quartz}} The graphics device for the macOS
     native Quartz 2d graphics system.  (This is only functional on
-    OS X where it can be used from the \code{R.app} GUI and from the
+    macOS where it can be used from the \code{R.app} GUI and from the
     command line: but it will display on the local screen even for a
     remote session.)
 #endif
diff --git a/src/library/grDevices/man/Hershey.Rd b/src/library/grDevices/man/Hershey.Rd
index 9459af3..d569b23 100644
--- a/src/library/grDevices/man/Hershey.Rd
+++ b/src/library/grDevices/man/Hershey.Rd
@@ -1,5 +1,5 @@
 % File src/library/grDevices/man/Hershey.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2012 R Core Team
 % Distributed under GPL 2 or later
 
@@ -204,7 +204,7 @@ You cannot use mathematical expressions (\code{\link{plotmath}}) with
 }
 
 \references{
-  \url{http://www.gnu.org/software/plotutils/plotutils.html}.
+  \url{https://www.gnu.org/software/plotutils/plotutils.html}.
 }
 \seealso{ \code{\link{demo}(Hershey)}, \code{\link{par}},
   \code{\link{text}}, \code{\link{contour}}.
diff --git a/src/library/grDevices/man/Japanese.Rd b/src/library/grDevices/man/Japanese.Rd
index 9b080f1..d91d68a 100644
--- a/src/library/grDevices/man/Japanese.Rd
+++ b/src/library/grDevices/man/Japanese.Rd
@@ -1,5 +1,5 @@
 % File src/library/grDevices/man/Japanese.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2013 R Core Team
 % Distributed under GPL 2 or later
 
@@ -27,7 +27,7 @@
   \code{\link{demo}(Japanese)}, \code{\link{Hershey}}, \code{\link{text}}
 }
 \references{
-  \url{http://www.gnu.org/software/plotutils/plotutils.html}
+  \url{https://www.gnu.org/software/plotutils/plotutils.html}
 }
 \examples{
 require(graphics)
diff --git a/src/library/grDevices/man/Type1Font.Rd b/src/library/grDevices/man/Type1Font.Rd
index 54dd165..973172f 100644
--- a/src/library/grDevices/man/Type1Font.Rd
+++ b/src/library/grDevices/man/Type1Font.Rd
@@ -1,5 +1,5 @@
 % File src/library/grDevices/man/Type1Font.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2013 R Core Team
 % Distributed under GPL 2 or later
 
@@ -57,21 +57,22 @@ CIDFont(family, cmap, cmapEncoding, pdfresource = "")
   The CMap file maps encoded strings (usually in a MBCS) to IDs, so
   \code{cmap} and \code{cmapEncoding} specifications must match.  There
   are no real bold or italic versions of CID fonts (bold/italic were
-  very rarely used in traditional CJK topography), and for the
+  very rarely used in traditional East Asian topography), and for the
   \code{\link{pdf}} device all four font faces will be identical.
   However, for the \code{\link{postscript}} device, bold and italic (and
   bold italic) are emulated.
 
-  CID-keyed fonts are intended only for use for the glyphs of CJK
+  CID-keyed fonts are intended only for use for the glyphs of East Asian
   languages, which are all monospaced and are all treated as filling the
   same bounding box.  (Thus \code{\link{plotmath}} will work with such
   characters, but the spacing will be less carefully controlled than
   with Western glyphs.)  The CID-keyed fonts do contain other
-  characters, including a Latin alphabet:  non-CJK glyphs are regarded
-  as monospaced with half the width of CJK glyphs.  This is often the
-  case, but sometimes Latin glyphs designed for proportional spacing are
-  used (and may look odd).  We strongly recommend that CID-keyed fonts
-  are \bold{only} used for CJK glyphs.
+  characters, including a Latin alphabet: non-East-Asian glyphs are
+  regarded as monospaced with half the width of East Asian glyphs.  This
+  is often the case, but sometimes Latin glyphs designed for
+  proportional spacing are used (and may look odd).  We strongly
+  recommend that CID-keyed fonts are \bold{only} used for East Asian
+  glyphs.
 }
 \value{
   A list of class \code{"Type1Font"} or \code{"CIDFont"}.
diff --git a/src/library/grDevices/man/adjustcolor.Rd b/src/library/grDevices/man/adjustcolor.Rd
index aecc37c..1c41576 100644
--- a/src/library/grDevices/man/adjustcolor.Rd
+++ b/src/library/grDevices/man/adjustcolor.Rd
@@ -1,5 +1,5 @@
 % File src/library/grDevices/man/palette.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2012 R Core Team
 % Copyright 2002-2010 The R Foundation
 % Distributed under GPL 2 or later
diff --git a/src/library/grDevices/man/as.graphicsAnnot.Rd b/src/library/grDevices/man/as.graphicsAnnot.Rd
index 8b861de..7eecec2 100644
--- a/src/library/grDevices/man/as.graphicsAnnot.Rd
+++ b/src/library/grDevices/man/as.graphicsAnnot.Rd
@@ -1,5 +1,5 @@
 % File src/library/grDevices/man/as.graphicsAnnot.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2012 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/grDevices/man/as.raster.Rd b/src/library/grDevices/man/as.raster.Rd
index d0899b7..f67196e 100644
--- a/src/library/grDevices/man/as.raster.Rd
+++ b/src/library/grDevices/man/as.raster.Rd
@@ -1,6 +1,6 @@
 % File src/library/grid/man/as.raster.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 200920131 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 2009-2015 R Core Team
 % Distributed under GPL 2 or later
 
 \name{as.raster}
@@ -8,6 +8,7 @@
 \alias{as.raster}
 \alias{as.raster.logical}
 \alias{as.raster.numeric}
+\alias{as.raster.raw}
 \alias{as.raster.character}
 \alias{as.raster.matrix}
 \alias{as.raster.array}
@@ -21,16 +22,16 @@
 is.raster(x)
 as.raster(x, \dots)
 
+\method{as.raster}{matrix}(x, max = 1, \dots)
+\method{as.raster}{array}(x, max = 1, \dots)
+
 \method{as.raster}{logical}(x, max = 1, \dots)
 \method{as.raster}{numeric}(x, max = 1, \dots)
 \method{as.raster}{character}(x, max = 1, \dots)
-\method{as.raster}{matrix}(x, max = 1, \dots)
-\method{as.raster}{array}(x, max = 1, \dots)
+\method{as.raster}{raw}(x, max = 255L, \dots)
 }
 \arguments{
-  \item{x}{
-    Any R object.
-  }
+  \item{x}{any \R object.}
   \item{max}{number giving the maximum of the color values range.}
   \item{\dots}{further arguments passed to or from other methods.}
 }
@@ -43,8 +44,8 @@ as.raster(x, \dots)
   make use of the \code{as.raster()} function to generate a raster
   object from their input.
 
-  The \code{as.raster()} function is generic so methods can be
-  written to convert other R objects to a raster object.
+  The \code{as.raster()} function is (S3) generic so methods can be
+  written to convert other \R objects to a raster object.
 
   The default implementation for numeric matrices interprets scalar
   values on black-to-white scale.
@@ -52,18 +53,23 @@ as.raster(x, \dots)
   Raster objects can be subsetted like a matrix and it is
   possible to assign to a subset of a raster object.
 
-  There is a method for converting a raster object to a matrix
-  (of colour strings).
+  There is a method for converting a raster object to a
+  \code{\link{matrix}} (of colour strings).
 
-  Raster objects can be compared
-  for equality or inequality (with each other or with a
-  colour string).
+  Raster objects can be compared for equality or inequality (with each
+  other or with a colour string).
 
   There is a \code{\link{is.na}} method which returns a logical matrix
   of the same dimensions as the raster object.  Note that \code{NA}
   values are interpreted as the fully transparent colour by some (but
   not all) graphics devices.
 }
+\note{
+  Raster images are internally represented row-first, which can cause
+  confusion when trying to manipulate a raster object.  The recommended
+  approach is to coerce a raster to a matrix, perform the manipulation,
+  then convert back to a raster.
+}
 \value{
   For \code{as.raster()}, a raster object.
 
@@ -80,13 +86,13 @@ as.raster(matrix(hcl(0, 80, seq(50, 80, 10)),
 as.raster(hcl(0, 80, seq(50, 80, 10)))
 #   numeric vectors are greyscale ...
 as.raster(1:5, max = 5)
-#   locigal vectors are black and white ...
+#   logical vectors are black and white ...
 as.raster(1:10 \%\% 2 == 0)
 
 # ... unless nrow/ncol are supplied ...
 as.raster(1:10 \%\% 2 == 0, nrow = 1)
 
-# Matrix can also be logical or numeric ...
+# Matrix can also be logical or numeric (or raw) ...
 as.raster(matrix(c(TRUE, FALSE), nrow = 3, ncol = 2))
 as.raster(matrix(1:3/4, nrow = 3, ncol = 4))
 
diff --git a/src/library/grDevices/man/axisTicks.Rd b/src/library/grDevices/man/axisTicks.Rd
index bd5a6dd..88b1b04 100644
--- a/src/library/grDevices/man/axisTicks.Rd
+++ b/src/library/grDevices/man/axisTicks.Rd
@@ -1,5 +1,5 @@
 % File src/library/grDevices/man/axisTicks.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 2011-2013 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/grDevices/man/boxplot.stats.Rd b/src/library/grDevices/man/boxplot.stats.Rd
index 7c91435..9a18863 100644
--- a/src/library/grDevices/man/boxplot.stats.Rd
+++ b/src/library/grDevices/man/boxplot.stats.Rd
@@ -1,10 +1,8 @@
 % File src/library/grDevices/man/boxplot.stats.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2007 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2014 R Core Team
 % Distributed under GPL 2 or later
 
-\newcommand{\sspace}{\ifelse{latex}{\out{~}}{ }}
-
 \name{boxplot.stats}
 \title{Box Plot Statistics}
 \usage{
diff --git a/src/library/grDevices/man/cairo.Rd b/src/library/grDevices/man/cairo.Rd
index b24748f..e35aa45 100644
--- a/src/library/grDevices/man/cairo.Rd
+++ b/src/library/grDevices/man/cairo.Rd
@@ -1,10 +1,8 @@
 % File src/library/grDevices/man/cairo.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2014 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2015 R Core Team
 % Distributed under GPL 2 or later
 
-\newcommand{\sspace}{\ifelse{latex}{\out{~}}{ }}
-
 \name{cairo}
 \alias{svg}
 \alias{cairo_pdf}
@@ -23,12 +21,14 @@ svg(filename = if(onefile) "Rplots.svg" else "Rplot\%03d.svg",
 cairo_pdf(filename = if(onefile) "Rplots.pdf" else "Rplot\%03d.pdf",
           width = 7, height = 7, pointsize = 12,
           onefile = FALSE, family = "sans", bg = "white",
-          antialias = c("default", "none", "gray", "subpixel"))
+          antialias = c("default", "none", "gray", "subpixel"),
+          fallback_resolution = 300)
 
 cairo_ps(filename = if(onefile) "Rplots.ps" else "Rplot\%03d.ps",
          width = 7, height = 7, pointsize = 12,
          onefile = FALSE, family = "sans", bg = "white",
-         antialias = c("default", "none", "gray", "subpixel"))
+         antialias = c("default", "none", "gray", "subpixel"),
+         fallback_resolution = 300)
 }
 \arguments{
   \item{filename}{the name of the output file.
@@ -53,19 +53,22 @@ cairo_ps(filename = if(onefile) "Rplots.ps" else "Rplot\%03d.ps",
     par("bg").}
   \item{antialias}{string, the type of anti-aliasing (if any) to be used;
     defaults to \code{"default"}.}
+  \item{fallback_resolution}{numeric: the resolution in dpi used when
+    falling back to bitmap output.  Prior to \R 3.3.0 this depended on
+    the cairo implementation but was commonly 300.}
 }
 \details{
   SVG (Scalar Vector Graphics) is a W3C standard for vector graphics.
   See \url{http://www.w3.org/Graphics/SVG/}.  The output from \code{svg}
   is SVG version 1.1 for \code{onefile = FALSE} (the default), otherwise
-  SVG 1.2.  (Very few SVG viewers are capable of displaying multi-page
-  SVG files.)
+  SVG 1.2.  (Few SVG viewers are capable of displaying multi-page SVG
+  files.)
 
   Note that unlike \code{\link{postscript}} and \code{\link{pdf}},
   \code{cairo_pdf} and \code{cairo_ps} sometimes record \emph{bitmaps}
-  and not vector graphics: a resolution of 72dpi is used.  On the other
-  hand, they can (on suitable platforms) include a much wider range of
-  UTF-8 glyphs, and embed the fonts used.
+  and not vector graphics.  On the other hand, they can
+  (on suitable platforms) include a much wider range of UTF-8 glyphs,
+  and embed the fonts used.
 
   The output produced by \code{cairo_ps(onefile = FALSE)} will be
   encapsulated postscript on a platform with cairo >= 1.6.
@@ -79,8 +82,8 @@ cairo_ps(filename = if(onefile) "Rplots.ps" else "Rplot\%03d.ps",
   \code{file} (or set \code{onefile = TRUE}) the file will contain the
   last page plotted.
 
-  There is full support of transparency, but using this is one of the
-  things liable to trigger bitmap output (and will always do so for
+  There is full support of semi-transparency, but using this is one of
+  the things liable to trigger bitmap output (and will always do so for
   \code{cairo_ps}).
 }
 
@@ -89,7 +92,7 @@ cairo_ps(filename = if(onefile) "Rplots.ps" else "Rplot\%03d.ps",
   
   In principle these devices are independent of X11 (as is seen by their
   presence on Windows).  But on a Unix-alike the cairo libraries may be
-  distributed as part of the X11 system and hence that (on OS X,
+  distributed as part of the X11 system and hence that (on macOS,
   XQuartz) may need to be installed.
 }
 
diff --git a/src/library/grDevices/man/check.options.Rd b/src/library/grDevices/man/check.options.Rd
index 33b8730..ba77372 100644
--- a/src/library/grDevices/man/check.options.Rd
+++ b/src/library/grDevices/man/check.options.Rd
@@ -1,5 +1,5 @@
 % File src/library/grDevices/man/check.options.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2007 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/grDevices/man/chull.Rd b/src/library/grDevices/man/chull.Rd
index 10b2bcc..0095777 100644
--- a/src/library/grDevices/man/chull.Rd
+++ b/src/library/grDevices/man/chull.Rd
@@ -1,5 +1,5 @@
 % File src/library/grDevices/man/chull.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2014 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/grDevices/man/cm.Rd b/src/library/grDevices/man/cm.Rd
index b45e1c2..fe30d9c 100644
--- a/src/library/grDevices/man/cm.Rd
+++ b/src/library/grDevices/man/cm.Rd
@@ -1,5 +1,5 @@
 % File src/library/grDevices/man/cm.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2007 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/grDevices/man/col2rgb.Rd b/src/library/grDevices/man/col2rgb.Rd
index d76cb8a..c17b78d 100644
--- a/src/library/grDevices/man/col2rgb.Rd
+++ b/src/library/grDevices/man/col2rgb.Rd
@@ -1,6 +1,6 @@
 % File src/library/grDevices/man/col2rgb.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2013 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2017 R Core Team
 % Distributed under GPL 2 or later
 
 \name{col2rgb}
@@ -25,9 +25,9 @@ col2rgb(col, alpha = FALSE)
   \code{\link{NA}} (as integer or character) and \code{"NA"} mean transparent.
 
   Values of \code{col} not of one of these types are coerced: real
-  vectors are coerced to integer and other types to character.  (Prior to
-  \R 3.0.2 factors were coerced to their integer codes: in all other
-  cases the class is still ignored when doing the coercion.)
+  vectors are coerced to integer and other types to character.  (factors
+  are coerced to character: in all other cases the class is
+  ignored when doing the coercion.)
 
   Zero and negative values of \code{col} are an error.
 }
diff --git a/src/library/grDevices/man/colorRamp.Rd b/src/library/grDevices/man/colorRamp.Rd
index 62755c0..7304105 100644
--- a/src/library/grDevices/man/colorRamp.Rd
+++ b/src/library/grDevices/man/colorRamp.Rd
@@ -1,10 +1,8 @@
 % File src/library/grDevices/man/colorRamp.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2014 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2017 R Core Team
 % Distributed under GPL 2 or later
 
-\newcommand{\CRANpkg}{\href{http://CRAN.R-project.org/package=#1}{\pkg{#1}}}
-
 \name{colorRamp}
 \alias{colorRamp}
 \alias{colorRampPalette}
@@ -28,7 +26,7 @@ colorRampPalette(colors, \dots)
   \item{space}{a character string; interpolation in RGB or CIE Lab
     color spaces.}
   \item{interpolate}{use spline or linear interpolation.}
-  \item{alpha}{logical: should alpha channel (opacity) values should be
+  \item{alpha}{logical: should alpha channel (opacity) values be
     returned?   It is an error to give a true value if
     \code{space} is specified.}
   \item{\dots}{arguments to pass to \code{colorRamp}.}
@@ -43,8 +41,6 @@ colorRampPalette(colors, \dots)
   completely accurate and the color ramp may not reach the extreme
   values in Lab space.  Future changes in the \R color model may change
   the colors produced with \code{space = "Lab"}.
-
-  Argument \code{alpha} has introduced in \R 3.1.0.
 }
 \value{
   \code{colorRamp} returns a \code{\link{function}} with argument a
diff --git a/src/library/grDevices/man/colors.Rd b/src/library/grDevices/man/colors.Rd
index 52a448d..4fb2efa 100644
--- a/src/library/grDevices/man/colors.Rd
+++ b/src/library/grDevices/man/colors.Rd
@@ -1,5 +1,5 @@
 % File src/library/grDevices/man/colors.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2012 R Core Team
 % Copyright 2002-2012 The R Foundation
 % Distributed under GPL 2 or later
diff --git a/src/library/grDevices/man/contourLines.Rd b/src/library/grDevices/man/contourLines.Rd
index b462fa4..19335ac 100644
--- a/src/library/grDevices/man/contourLines.Rd
+++ b/src/library/grDevices/man/contourLines.Rd
@@ -1,5 +1,5 @@
 % File src/library/grDevices/man/contourLines.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2008 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/grDevices/man/convertColor.Rd b/src/library/grDevices/man/convertColor.Rd
index 7212531..2fe8373 100644
--- a/src/library/grDevices/man/convertColor.Rd
+++ b/src/library/grDevices/man/convertColor.Rd
@@ -1,5 +1,5 @@
 % File src/library/grDevices/man/convertColor.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2013 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/grDevices/man/densCols.Rd b/src/library/grDevices/man/densCols.Rd
index fd839d5..fc8eb4f 100644
--- a/src/library/grDevices/man/densCols.Rd
+++ b/src/library/grDevices/man/densCols.Rd
@@ -1,9 +1,8 @@
 % File src/library/grDevices/man/densCols.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2013 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2014 R Core Team
 % Distributed under GPL 2 or later
 
-\newcommand{\CRANpkg}{\href{http://CRAN.R-project.org/package=#1}{\pkg{#1}}}
 
 \name{densCols}
 \alias{densCols}
diff --git a/src/library/grDevices/man/dev.Rd b/src/library/grDevices/man/dev.Rd
index f7a27f4..24f01d0 100644
--- a/src/library/grDevices/man/dev.Rd
+++ b/src/library/grDevices/man/dev.Rd
@@ -1,10 +1,8 @@
 % File src/library/grDevices/man/dev.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2014 R Core Team
 % Distributed under GPL 2 or later
 
-\newcommand{\sspace}{\ifelse{latex}{\out{~}}{ }}
-
 \name{dev}
 \alias{dev.cur}
 \alias{dev.list}
diff --git a/src/library/grDevices/man/dev.capabilities.Rd b/src/library/grDevices/man/dev.capabilities.Rd
index 06d77c0..288c0c3 100644
--- a/src/library/grDevices/man/dev.capabilities.Rd
+++ b/src/library/grDevices/man/dev.capabilities.Rd
@@ -1,5 +1,5 @@
 % File src/library/grDevices/man/dev.capabilities.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 2008-12 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/grDevices/man/dev.capture.Rd b/src/library/grDevices/man/dev.capture.Rd
index a6fe579..bd5343f 100644
--- a/src/library/grDevices/man/dev.capture.Rd
+++ b/src/library/grDevices/man/dev.capture.Rd
@@ -1,5 +1,5 @@
 % File src/library/grDevices/man/dev.capture.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 2011 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/grDevices/man/dev.flush.Rd b/src/library/grDevices/man/dev.flush.Rd
index 207d355..c76fd9c 100644
--- a/src/library/grDevices/man/dev.flush.Rd
+++ b/src/library/grDevices/man/dev.flush.Rd
@@ -1,5 +1,5 @@
 % File src/library/grDevices/man/devSet.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 2011-2013 R Core Team
 % Distributed under GPL 2 or later
 
@@ -33,7 +33,7 @@ dev.flush(level = 1L)
   with buffering.  When the hold level is positive the \sQuote{watch}
   cursor is set on the device's window.
 
-  It is available on the \code{quartz} device on OS X.
+  It is available on the \code{quartz} device on macOS.
 
   This is implemented for the \code{windows} device with
   buffering selected (the default).  When the hold level is positive the
diff --git a/src/library/grDevices/man/dev.interactive.Rd b/src/library/grDevices/man/dev.interactive.Rd
index 21f9055..49ee86e 100644
--- a/src/library/grDevices/man/dev.interactive.Rd
+++ b/src/library/grDevices/man/dev.interactive.Rd
@@ -1,10 +1,8 @@
 % File src/library/grDevices/man/dev.interactive.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2013 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2014 R Core Team
 % Distributed under GPL 2 or later
 
-\newcommand{\CRANpkg}{\href{http://CRAN.R-project.org/package=#1}{\pkg{#1}}}
-
 \name{dev.interactive}
 \alias{dev.interactive}
 \alias{deviceIsInteractive}
@@ -28,7 +26,7 @@ deviceIsInteractive(name = NULL)
 }
 \details{
   The \code{X11} (Unix), \code{windows} (Windows) and \code{quartz}
-  (OS X, on-screen types only) are regarded as interactive, together
+  (macOS, on-screen types only) are regarded as interactive, together
   with \code{JavaGD} (from the package of the same name) and
   \code{CairoWin} and \code{CairoX11} (from package \CRANpkg{Cairo}).
   Packages can add their devices to the list by calling
diff --git a/src/library/grDevices/man/dev.size.Rd b/src/library/grDevices/man/dev.size.Rd
index 9ec338e..3378548 100644
--- a/src/library/grDevices/man/dev.size.Rd
+++ b/src/library/grDevices/man/dev.size.Rd
@@ -1,5 +1,5 @@
 % File src/library/grDevices/man/dev.size.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 2008-11 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/grDevices/man/dev2.Rd b/src/library/grDevices/man/dev2.Rd
index 03c466f..4b14401 100644
--- a/src/library/grDevices/man/dev2.Rd
+++ b/src/library/grDevices/man/dev2.Rd
@@ -1,5 +1,5 @@
 % File src/library/grDevices/man/dev2.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2013 R Core Team
 % Distributed under GPL 2 or later
 
@@ -27,7 +27,7 @@ dev.control(displaylist = c("inhibit", "enable"))
     \code{\link{postscript}} arguments.}
   \item{which}{A device number specifying the device to copy to.}
   \item{out.type}{The name of the output device: can be \code{"pdf"}, or
-    \code{"quartz"} (some OS X builds) or \code{"cairo"} (Windows
+    \code{"quartz"} (some macOS builds) or \code{"cairo"} (Windows
     and some Unix-alikes, see \code{\link{cairo_pdf}}).}
   \item{displaylist}{A character string: the only valid values are
     \code{"inhibit"} and \code{"enable"}.}
diff --git a/src/library/grDevices/man/dev2bitmap.Rd b/src/library/grDevices/man/dev2bitmap.Rd
index 8b4b062..031101b 100644
--- a/src/library/grDevices/man/dev2bitmap.Rd
+++ b/src/library/grDevices/man/dev2bitmap.Rd
@@ -1,5 +1,5 @@
 % File src/library/grDevices/man/dev2bitmap.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2014 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/grDevices/man/devAskNewPage.Rd b/src/library/grDevices/man/devAskNewPage.Rd
index 5d93efb..7d2cf75 100644
--- a/src/library/grDevices/man/devAskNewPage.Rd
+++ b/src/library/grDevices/man/devAskNewPage.Rd
@@ -1,5 +1,5 @@
 % File src/library/grDevices/man/devAskNewPage.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2008 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/grDevices/man/embedFonts.Rd b/src/library/grDevices/man/embedFonts.Rd
index 1bdfa64..119a24e 100644
--- a/src/library/grDevices/man/embedFonts.Rd
+++ b/src/library/grDevices/man/embedFonts.Rd
@@ -1,6 +1,6 @@
 % File src/library/grDevices/man/embedFonts.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2014 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2015 R Core Team
 % Distributed under GPL 2 or later
 
 \name{embedFonts}
@@ -12,8 +12,8 @@
   embed all fonts in the file.
 }
 \usage{
-embedFonts(file, format, outfile = file, fontpaths = character(),
-           options = "")
+embedFonts(file, format, outfile = file,
+           fontpaths = character(), options = character())
 }
 \arguments{
   \item{file}{a character string giving the name of the original file.}
@@ -23,7 +23,7 @@ embedFonts(file, format, outfile = file, fontpaths = character(),
   \item{outfile}{the name of the new file (with fonts embedded).}
   \item{fontpaths}{a character vector giving directories that
     Ghostscript will search for fonts.}
-  \item{options}{a character string containing further options to
+  \item{options}{a character vector containing further options to
     Ghostscript.}
 }
 \details{
@@ -72,6 +72,6 @@ embedFonts(file, format, outfile = file, fontpaths = character(),
 
   Paul Murrell and Brian Ripley (2006) Non-standard fonts in PostScript
   and PDF graphics. \emph{R News}, 6(2):41--47.
-  \url{http://cran.r-project.org/doc/Rnews/Rnews_2006-2.pdf}.
+  \url{https://www.r-project.org/doc/Rnews/Rnews_2006-2.pdf}.
 }
 \keyword{device}
diff --git a/src/library/grDevices/man/extendrange.Rd b/src/library/grDevices/man/extendrange.Rd
index ac47107..2e9669f 100644
--- a/src/library/grDevices/man/extendrange.Rd
+++ b/src/library/grDevices/man/extendrange.Rd
@@ -1,5 +1,5 @@
 % File src/library/grDevices/man/extendrange.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2007 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/grDevices/man/getGraphicsEvent.Rd b/src/library/grDevices/man/getGraphicsEvent.Rd
index d14a8b8..076a06b 100644
--- a/src/library/grDevices/man/getGraphicsEvent.Rd
+++ b/src/library/grDevices/man/getGraphicsEvent.Rd
@@ -1,6 +1,6 @@
 % File src/library/grDevices/man/getGraphicsEvent.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2013 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2014 R Core Team
 % Distributed under GPL 2 or later
 
 \name{getGraphicsEvent}
@@ -17,6 +17,7 @@ form of a mouse or keyboard event.
 getGraphicsEvent(prompt = "Waiting for input",
                  onMouseDown = NULL, onMouseMove = NULL,
                  onMouseUp = NULL, onKeybd = NULL,
+                 onIdle = NULL,
                  consolePrompt = prompt)
 setGraphicsEventHandlers(which = dev.cur(), ...)
 getGraphicsEventEnv(which = dev.cur())
@@ -29,6 +30,7 @@ setGraphicsEventEnv(which = dev.cur(), env)
   \item{onMouseMove}{a function to respond to mouse movement}
   \item{onMouseUp}{a function to respond to mouse button releases}
   \item{onKeybd}{a function to respond to key presses}
+  \item{onIdle}{a function to call when no events are pending}
   \item{consolePrompt}{prompt to be displayed to the user in the console}
   \item{which}{which graphics device does the call apply to?}
   \item{...}{items including handlers to be placed in the event environment}
@@ -36,11 +38,12 @@ setGraphicsEventEnv(which = dev.cur(), env)
 }
 \details{
 These functions allow user input from some graphics devices (currently
-only the \code{windows()} and \code{X11(type = "Xlib")} screen displays
+only the \code{windows()}, \code{X11(type = "Xlib")}
+and \code{X11(type = "cairo")} screen displays
 in base \R{}). Event handlers may be installed to respond to events
 involving the mouse or keyboard.
 
-The functions are related as follows.  If any of the first five
+The functions are related as follows.  If any of the first six
 arguments to \code{getGraphicsEvent} are given, then it uses those
 in a call to \code{setGraphicsEventHandlers} to replace any existing
 handlers in the current device.  This is for compatibility with pre-2.12.0 \R{}
@@ -53,8 +56,9 @@ for use later.
 
 The names of the arguments in \code{getGraphicsEvent} are special.  When
 handling events, the graphics system will look through the event
-environment for functions named \code{onMouseDown}, \code{onMouseMove}, \code{onMouseUp}
-and \code{onKeybd} and use them as event handlers.  It will use
+environment for functions named \code{onMouseDown}, \code{onMouseMove},
+\code{onMouseUp}, \code{onKeybd}, and \code{onIdle}, and use them as
+event handlers.  It will use
 \code{prompt} for a label on the graphics device.  Two other special names are
 \code{which}, which will identify the graphics device, and
 \code{result}, where the result of the last event
@@ -82,6 +86,24 @@ keys will have been processed, so \code{shift-a} will be passed as
      \item Function keys, passed as one of \code{"F1", "F2", ...}
 }
 
+The idle event handler \code{onIdle} should be a function with no
+arguments. If the function is undefined or \code{NULL}, then R will
+typically call a system function which (efficiently) waits for the next
+event to appear on a filehandle. Otherwise, the idle event handler will
+be called whenever the event queue of the graphics device was found to
+be empty, i.e. in an infinite loop. This feature is intended to allow
+animations to respond to user input, and could be CPU-intensive.
+Currently, \code{onIdle} is only implemented for \code{X11()} devices.
+
+Note that calling \code{Sys.sleep()} is not recommended within an idle
+handler - \code{Sys.sleep()} removes pending graphics events in order to
+allow users to move, close, or resize windows while it is executing.
+Events such as mouse and keyboard events occurring during
+\code{Sys.sleep()} are lost, and currently do not trigger the event
+handlers registered via \code{getGraphicsEvent} or
+\code{setGraphicsEventHandlers}.
+
+
 The event handlers are standard R functions, and will be executed as though called
 from the event environment.
 
@@ -108,8 +130,8 @@ event environment for the graphics device.
 }
 \author{Duncan Murdoch}
 \examples{
-# This currently only works on the Windows
-# and X11(type = "Xlib") screen devices...
+# This currently only works on the Windows, X11(type = "Xlib"), and
+# X11(type = "cairo") screen devices...
 \dontrun{
 savepar <- par(ask = FALSE)
 dragplot <- function(..., xlim = NULL, ylim = NULL, xaxs = "r", yaxs = "r") {
diff --git a/src/library/grDevices/man/grDevices-package.Rd b/src/library/grDevices/man/grDevices-package.Rd
index 7895b2a..23fd23f 100644
--- a/src/library/grDevices/man/grDevices-package.Rd
+++ b/src/library/grDevices/man/grDevices-package.Rd
@@ -1,5 +1,5 @@
 % File src/library/grDevices/man/grDevices-package.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2009 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/grDevices/man/grSoftVersion.Rd b/src/library/grDevices/man/grSoftVersion.Rd
new file mode 100644
index 0000000..9b797eb
--- /dev/null
+++ b/src/library/grDevices/man/grSoftVersion.Rd
@@ -0,0 +1,50 @@
+% File src/library/grDevices/man/grSoftVersion.Rd
+% Part of the R package, https://www.R-project.org
+% Copyright 2014 R Core Team
+% Distributed under GPL 2 or later
+
+\name{grSoftVersion}
+\alias{grSoftVersion}
+\title{Report Versions of Graphics Software}
+\description{
+  Report versions of third-party graphics software.
+}
+\usage{
+grSoftVersion()
+}
+\value{
+  A named character vector containing at least the element
+  
+  \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
+#ifdef windows
+  standard
+#endif
+#ifdef unix
+  X11-based
+#endif
+  (not cairo-based) 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.}
+  
+  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
+  reports its version as \code{"6.2"}, the IJG version from which it forked.
+}
+
+\seealso{
+  \code{\link{extSoftVersion}} for versions of non-graphics software.
+}
+%% output is variable
+\examples{
+\donttest{grSoftVersion()}
+}
diff --git a/src/library/grDevices/man/gray.Rd b/src/library/grDevices/man/gray.Rd
index 9f0d959..52061b1 100644
--- a/src/library/grDevices/man/gray.Rd
+++ b/src/library/grDevices/man/gray.Rd
@@ -1,5 +1,5 @@
 % File src/library/grDevices/man/gray.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2012 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/grDevices/man/gray.colors.Rd b/src/library/grDevices/man/gray.colors.Rd
index fa049e9..624c163 100644
--- a/src/library/grDevices/man/gray.colors.Rd
+++ b/src/library/grDevices/man/gray.colors.Rd
@@ -1,5 +1,5 @@
 % File src/library/grDevices/man/gray.colors.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2012 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/grDevices/man/hcl.Rd b/src/library/grDevices/man/hcl.Rd
index 5dc18de..9f0a815 100644
--- a/src/library/grDevices/man/hcl.Rd
+++ b/src/library/grDevices/man/hcl.Rd
@@ -1,5 +1,5 @@
 % File src/library/grDevices/man/hcl.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2013 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/grDevices/man/hsv.Rd b/src/library/grDevices/man/hsv.Rd
index f20fd3c..18fa4ed 100644
--- a/src/library/grDevices/man/hsv.Rd
+++ b/src/library/grDevices/man/hsv.Rd
@@ -1,5 +1,5 @@
 % File src/library/grDevices/man/hsv.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2011 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/grDevices/man/make.rgb.Rd b/src/library/grDevices/man/make.rgb.Rd
index a85d9e0..5429992 100644
--- a/src/library/grDevices/man/make.rgb.Rd
+++ b/src/library/grDevices/man/make.rgb.Rd
@@ -1,5 +1,5 @@
 % File src/library/grDevices/man/make.rgb.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2012 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/grDevices/man/n2mfrow.Rd b/src/library/grDevices/man/n2mfrow.Rd
index fe85b84..919cf3b 100644
--- a/src/library/grDevices/man/n2mfrow.Rd
+++ b/src/library/grDevices/man/n2mfrow.Rd
@@ -1,5 +1,5 @@
 % File src/library/grDevices/man/n2mfrow.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2007 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/grDevices/man/nclass.Rd b/src/library/grDevices/man/nclass.Rd
index 661489e..6326105 100644
--- a/src/library/grDevices/man/nclass.Rd
+++ b/src/library/grDevices/man/nclass.Rd
@@ -1,10 +1,8 @@
 % File src/library/grDevices/man/nclass.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2009 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2014 R Core Team
 % Distributed under GPL 2 or later
 
-\newcommand{\CRANpkg}{\href{http://CRAN.R-project.org/package=#1}{\pkg{#1}}}
-
 \name{nclass}
 \alias{nclass.Sturges}
 \alias{nclass.scott}
diff --git a/src/library/grDevices/man/palette.Rd b/src/library/grDevices/man/palette.Rd
index 538e58e..be11986 100644
--- a/src/library/grDevices/man/palette.Rd
+++ b/src/library/grDevices/man/palette.Rd
@@ -1,10 +1,8 @@
 % File src/library/grDevices/man/palette.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2013 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2015 R Core Team
 % Distributed under GPL 2 or later
 
-\newcommand{\sspace}{\ifelse{latex}{\out{~}}{ }}
-
 \name{palette}
 \title{Set or View the Graphics Palette}
 \usage{
@@ -36,11 +34,10 @@ palette(value)
   the palette is changed, the new palette applies to all subsequent
   plotting.
 
-  Prior to \R 3.0.0 the current palette also applies to re-plotting (for
-  example if an on-screen device is resized or \code{\link{dev.copy}} or
-  \code{\link{replayPlot}} is used).  In current \R, the palette is
-  recorded on the displaylist at the start of each page and when it is
-  changed.
+  The current palette also applies to re-plotting (for example if an
+  on-screen device is resized or \code{\link{dev.copy}} or
+  \code{\link{replayPlot}} is used).  The palette is recorded on the
+  displaylist at the start of each page and when it is changed.
 }
 
 \value{
diff --git a/src/library/grDevices/man/palettes.Rd b/src/library/grDevices/man/palettes.Rd
index f1f6c79..d28282e 100644
--- a/src/library/grDevices/man/palettes.Rd
+++ b/src/library/grDevices/man/palettes.Rd
@@ -1,5 +1,5 @@
 % File src/library/grDevices/man/palettes.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2011 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/grDevices/man/pdf.Rd b/src/library/grDevices/man/pdf.Rd
index 9356751..cb43ffd 100644
--- a/src/library/grDevices/man/pdf.Rd
+++ b/src/library/grDevices/man/pdf.Rd
@@ -1,10 +1,8 @@
 % File src/library/grDevices/man/pdf.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2013 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2016 R Core Team
 % Distributed under GPL 2 or later
 
-\newcommand{\sspace}{\ifelse{latex}{\out{~}}{ }}
-
 \name{pdf}
 \alias{pdf}
 \encoding{UTF-8}
@@ -16,7 +14,7 @@
   graphics.
 }
 \usage{
-pdf(file = ifelse(onefile, "Rplots.pdf", "Rplot\%03d.pdf"),
+pdf(file = if(onefile) "Rplots.pdf" else "Rplot\%03d.pdf",
     width, height, onefile, family, title, fonts, version,
     paper, encoding, bg, fg, pointsize, pagecentre, colormodel,
     useDingbats, useKerning, fillOddEven, compress)
@@ -187,7 +185,7 @@ pdf(file = ifelse(onefile, "Rplots.pdf", "Rplot\%03d.pdf"),
   luminosity (biased towards green).  \code{"cmyk"} outputs in CMYK
   colorspace.  The simplest possible conversion from sRGB to CMYK is
   used
-  (\url{http://en.wikipedia.org/wiki/CMYK_color_model#Mapping_RGB_to_CMYK}),
+  (\url{https://en.wikipedia.org/wiki/CMYK_color_model#Mapping_RGB_to_CMYK}),
   and raster images are output in RGB.
 
   Also available for backwards compatibility is model \code{"rgb"} which
@@ -232,7 +230,7 @@ pdf(file = ifelse(onefile, "Rplots.pdf", "Rplot\%03d.pdf"),
   in your viewer if you can) and missing or incorrect glyphs in text
   (viewers silently doing font substitution).
 
-  Unfortunately the default viewers on most Linux and OS X systems
+  Unfortunately the default viewers on most Linux and macOS systems
   have these problems, and no obvious way to turn off graphics anti-aliasing.
 
   Acrobat Reader does not use the fonts specified but rather emulates
@@ -287,11 +285,11 @@ pdf(file = ifelse(onefile, "Rplots.pdf", "Rplot\%03d.pdf"),
   \code{\link{postscript}}.
 
 #ifdef unix
-  \code{\link{cairo_pdf}} and (on OS X only) \code{\link{quartz}}
+  \code{\link{cairo_pdf}} and (on macOS only) \code{\link{quartz}}
   for other devices that can produce PDF.
 #endif
 #ifdef windows
-  \code{\link{cairo_pdf}} and (on OS X only) \code{quartz}
+  \code{\link{cairo_pdf}} and (on macOS only) \code{quartz}
   for other devices that can produce PDF.
 #endif
 
@@ -300,7 +298,7 @@ pdf(file = ifelse(onefile, "Rplots.pdf", "Rplot\%03d.pdf"),
 
   Paul Murrell and Brian Ripley (2006) Non-standard fonts in PostScript
   and PDF graphics. \emph{R News}, 6(2):41--47.
-  \url{http://cran.r-project.org/doc/Rnews/Rnews_2006-2.pdf}.
+  \url{https://www.r-project.org/doc/Rnews/Rnews_2006-2.pdf}.
 }
 \examples{
 \donttest{
diff --git a/src/library/grDevices/man/pdf.options.Rd b/src/library/grDevices/man/pdf.options.Rd
index 15bfe63..7c12acf 100644
--- a/src/library/grDevices/man/pdf.options.Rd
+++ b/src/library/grDevices/man/pdf.options.Rd
@@ -1,5 +1,5 @@
 % File src/library/grDevices/man/pdf.options.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2011 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/grDevices/man/pictex.Rd b/src/library/grDevices/man/pictex.Rd
index 1e533dd..6a9ca80 100644
--- a/src/library/grDevices/man/pictex.Rd
+++ b/src/library/grDevices/man/pictex.Rd
@@ -1,5 +1,5 @@
 % File src/library/grDevices/man/pictex.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2010 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/grDevices/man/plotmath.Rd b/src/library/grDevices/man/plotmath.Rd
index 64de9c0..dda22db 100644
--- a/src/library/grDevices/man/plotmath.Rd
+++ b/src/library/grDevices/man/plotmath.Rd
@@ -1,10 +1,8 @@
 % File src/library/grDevices/man/plotmath.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2013 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2015 R Core Team
 % Distributed under GPL 2 or later
 
-\newcommand{\sspace}{\ifelse{latex}{\out{~}}{ }}
-
 \name{plotmath}
 \alias{plotmath}
 \alias{symbol}
@@ -160,8 +158,15 @@
     \code{group("(",list(a, b),"]")} \tab specify left and right delimiters \cr
     \code{bgroup("(",atop(x,y),")")} \tab use scalable delimiters \cr
     \code{group(lceil, x, rceil)} \tab special delimiters \cr
+    \code{group(lfloor, x, rfloor)} \tab special delimiters \cr
   }
-
+  
+  The supported \sQuote{scalable delimiters} are \code{| ( [ \{},
+  \code{lceil}, \code{lfloor} and their right-hand versions.
+  \code{"."} is equivalent to \code{""}: the corresponding delimiter
+  will be omitted. Delimiter \code{||} is supported but has the same
+  effect as \code{|}.
+  
   The symbol font uses Adobe Symbol encoding so, for example, a lower
   case mu can be obtained either by the special symbol \code{mu} or by
   \code{symbol("m")}.  This provides access to symbols that have no
@@ -237,9 +242,9 @@
 
   The symbol codes can be found in octal in the Adobe reference manuals,
   e.g.\sspace{}for Postscript
-  \url{http://www.adobe.com/products/postscript/pdfs/PLRM.pdf}
+  \url{https://www.adobe.com/products/postscript/pdfs/PLRM.pdf}
   or PDF
-  \url{http://www.adobe.com/devnet/acrobat/pdfs/pdf_reference_1-7.pdf}
+  \url{https://www.adobe.com/devnet/acrobat/pdfs/pdf_reference_1-7.pdf}
   and in decimal, octal and hex at
   \url{http://www.stat.auckland.ac.nz/~paul/R/CM/AdobeSym.html}.
 }
diff --git a/src/library/grDevices/man/postscript.Rd b/src/library/grDevices/man/postscript.Rd
index 96ad9c1..01708ce 100644
--- a/src/library/grDevices/man/postscript.Rd
+++ b/src/library/grDevices/man/postscript.Rd
@@ -1,6 +1,6 @@
 % File src/library/grDevices/man/postscript.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2013 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2016 R Core Team
 % Distributed under GPL 2 or later
 
 \name{postscript}
@@ -15,7 +15,7 @@
 %% The definitive doc is the source :-)
 %%      ../../../main/devices.c  &   ../../../unix/devPS.c
 \usage{
-postscript(file = ifelse(onefile, "Rplots.ps", "Rplot\%03d.ps"),
+postscript(file = if(onefile) "Rplots.ps" else "Rplot\%03d.ps",
            onefile, family, title, fonts, encoding, bg, fg,
            width, height, horizontal, pointsize,
            paper, pagecentre, print.it, command,
@@ -40,7 +40,7 @@ postscript(file = ifelse(onefile, "Rplots.ps", "Rplot\%03d.ps"),
   \item{onefile}{logical: if true (the default) allow multiple figures
     in one file.  If false, generate a file name containing the page
     number for each page and use an EPSF header and no
-    \code{DocumentMedia} comment.  Defaults to the \code{TRUE}.}
+    \code{DocumentMedia} comment.  Defaults to \code{TRUE}.}
   \item{family}{the initial font family to be used, normally as a
     character string.  See the section \sQuote{Families}.  Defaults to
     \code{"Helvetica"}.}
@@ -225,7 +225,7 @@ postscript(file = ifelse(onefile, "Rplots.ps", "Rplot\%03d.ps"),
   the encoding used on machines running \R may well be different, and by
   using the \code{encoding} argument the glyphs can be matched to
   encoding in use.  This suffices for European and Cyrillic languages,
-  but not for CJK languages.  For the latter, composite CID fonts are
+  but not for East Asian languages.  For the latter, composite CID fonts are
   used.  These fonts are useful for other languages: for example they
   may contain Greek glyphs. (The rest of this section applies only when CID
   fonts are not used.)
@@ -307,7 +307,7 @@ postscript(file = ifelse(onefile, "Rplots.ps", "Rplot\%03d.ps"),
   only greyscales (and converts other colours to a luminance), and
   \code{"cmyk"}.  The simplest possible conversion from sRGB to CMYK is
   used
-  (\url{http://en.wikipedia.org/wiki/CMYK_color_model#Mapping_RGB_to_CMYK}),
+  (\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"})
@@ -368,7 +368,7 @@ postscript(file = ifelse(onefile, "Rplots.ps", "Rplot\%03d.ps"),
   anti-aliasing in your viewer if you can) and missing or incorrect glyphs
   in text (viewers silently doing font substitution).
 
-  Unfortunately the default viewers on most Linux and OS X systems
+  Unfortunately the default viewers on most Linux and macOS systems
   have these problems, and no obvious way to turn off graphics anti-aliasing.
 }
 
@@ -391,7 +391,7 @@ postscript(file = ifelse(onefile, "Rplots.ps", "Rplot\%03d.ps"),
 
   Paul Murrell and Brian Ripley (2006) Non-standard fonts in PostScript
   and PDF graphics. \emph{R News}, 6(2):41--47.
-  \url{http://cran.r-project.org/doc/Rnews/Rnews_2006-2.pdf}.
+  \url{https://www.r-project.org/doc/Rnews/Rnews_2006-2.pdf}.
 }
 
 \author{
diff --git a/src/library/grDevices/man/postscriptFonts.Rd b/src/library/grDevices/man/postscriptFonts.Rd
index 53a7466..7bc8582 100644
--- a/src/library/grDevices/man/postscriptFonts.Rd
+++ b/src/library/grDevices/man/postscriptFonts.Rd
@@ -1,6 +1,6 @@
 % File src/library/grDevices/man/postscriptFonts.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2013 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2017 R Core Team
 % Distributed under GPL 2 or later
 
 \name{postscriptFonts}
@@ -60,8 +60,7 @@ pdfFonts(\dots)
   \code{"NimbusRom"} (synonym \code{"URWTimes"}).
 
   There are also mappings for \code{"ComputerModern"},
-  \code{"ComputerModernItalic"} and, as from \R 3.1.0, \code{"ArialMT"}
-  (Monotype Arial).
+  \code{"ComputerModernItalic"} and \code{"ArialMT"} (Monotype Arial).
 
   Finally, there are some default mappings for East Asian locales
   described in a separate section.
@@ -111,7 +110,7 @@ pdfFonts(\dots)
     CNS1 (PS) \tab \code{MOESung-Regular}\cr \tab Ken Lunde's CJKV resources\cr
     CNS1 (PDF) \tab \code{MSungStd-Light-Acro}\cr  \tab from Adobe Reader 7.0 Traditional Chinese Font Pack\cr
   }
-  \code{Baekmuk-Batang} can be found at \url{ftp://ftp.mizi.com/pub/baekmuk/}.
+%  \code{Baekmuk-Batang} Can be found at \url{ftp://ftp.mizi.com/pub/baekmuk/}.
   \code{BousungEG-Light-GB} can be found at
   \url{ftp://ftp.gnu.org/pub/non-gnu/chinese-fonts-truetype/}.
   Ken Lunde's CJKV resources are at
@@ -122,8 +121,8 @@ pdfFonts(\dots)
 
   You may well find that your postscript/PDF interpreters has been set
   up to provide aliases for many of these fonts.  For example,
-  ghostscript on Windows can optionally be installed to map common CJK
-  fonts names to Windows TrueType fonts.  (You may want to add the
+  ghostscript on Windows can optionally be installed to map common East
+  Asian fonts names to Windows TrueType fonts.  (You may want to add the
   \code{-Acro} versions as well.)
 
   Adding a mapping for a CID-keyed font is for gurus only.
@@ -137,7 +136,7 @@ pdfFonts(\dots)
 }
 \author{
   Support for Computer Modern fonts is based on a contribution by
-  Brian D'Urso \email{durso at hussle.harvard.edu}.
+  Brian D'Urso.% formerly \email{durso at hussle.harvard.edu}.
 }
 \examples{
 postscriptFonts()
diff --git a/src/library/grDevices/man/pretty.Date.Rd b/src/library/grDevices/man/pretty.Date.Rd
index cec4bb2..2fea03a 100644
--- a/src/library/grDevices/man/pretty.Date.Rd
+++ b/src/library/grDevices/man/pretty.Date.Rd
@@ -1,11 +1,11 @@
 % File src/library/grDevices/man/pretty.Date.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 2010 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 2010-2016 R Core Team
 % Distributed under GPL 2 or later
 
 \name{pretty.Date}
 \title{Pretty Breakpoints for Date-Time Classes}
-\alias{pretty.Date}
+\alias{pretty.Date}%- keep alias{}es - such that ?pretty.Date  works
 \alias{pretty.POSIXt}
 \usage{
 \method{pretty}{Date}(x, n = 5, min.n = n \%/\% 2, sep = " ", \dots)
@@ -14,19 +14,23 @@
 \arguments{
   \item{x}{an object of class \code{"Date"} or \code{"POSIXt"} (i.e.,
     \code{"POSIXct"} or \code{"POSIXlt"}). }
-  \item{n}{integer giving the \emph{desired} number of
-    intervals.  }
+  \item{n}{integer giving the \emph{desired} number of intervals.}
   \item{min.n}{nonnegative integer giving the \emph{minimal} number of
-    intervals.  }
+    intervals.}
   \item{sep}{character string, serving as a separator for certain
     formats (e.g., between month and year). }
   \item{\dots}{further arguments for compatibility with the generic,
     ignored.}
 }
 \description{
-  Compute a  sequence of about \code{n+1} equally spaced \sQuote{nice}
-  values which cover the range of the values in \code{x}.
+  Compute a sequence of about \code{n+1} equally spaced \sQuote{nice}
+  values which cover the range of the values in \code{x}, possibly of
+  length one, when \code{min.n = 0} and there is only one unique
+  \code{x}.
 }
+%% \note{The current algorithm is geared towards small \code{n}, not
+%% larger than say, 50 or 100.
+%% }
 \value{
   A vector (of the suitable class) of locations, with attribute
   \code{"labels"} giving corresponding formatted character labels.
@@ -35,20 +39,23 @@
   \code{\link{pretty}} for the default method.
 }
 \examples{
+\donttest{% time-dependent
+pretty(Sys.Date())
+pretty(Sys.time(), n = 10)
+}
+pretty(as.Date("2000-03-01")) # R 1.0.0 came in a leap year
 
-steps <-
-    list("10 secs", "1 min", "5 mins", "30 mins", "6 hours", "12 hours",
-         "1 DSTday", "2 weeks", "1 month", "6 months", "1 year",
-         "10 years", "50 years", "1000 years")
-
-names(steps) <- paste("span =", unlist(steps))
-
+## time ranges in diverse scales:% also in ../../../../tests/reg-tests-1c.R
+require(stats)
+steps <- setNames(,
+    c("10 secs", "1 min", "5 mins", "30 mins", "6 hours", "12 hours",
+      "1 DSTday", "2 weeks", "1 month", "6 months", "1 year",
+      "10 years", "50 years", "1000 years"))
 x <- as.POSIXct("2002-02-02 02:02")
 lapply(steps,
        function(s) {
            at <- pretty(seq(x, by = s, length = 2), n = 5)
            attr(at, "labels")
        })
-
 }
 \keyword{dplot}
diff --git a/src/library/grDevices/man/ps.options.Rd b/src/library/grDevices/man/ps.options.Rd
index 8d4d838..9cde8a5 100644
--- a/src/library/grDevices/man/ps.options.Rd
+++ b/src/library/grDevices/man/ps.options.Rd
@@ -1,5 +1,5 @@
 % File src/library/grDevices/man/ps.options.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2008 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/grDevices/man/recordGraphics.Rd b/src/library/grDevices/man/recordGraphics.Rd
index 35d7615..24974ab 100644
--- a/src/library/grDevices/man/recordGraphics.Rd
+++ b/src/library/grDevices/man/recordGraphics.Rd
@@ -1,5 +1,5 @@
 % File src/library/grDevices/man/recordGraphics.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2007 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/grDevices/man/recordplot.Rd b/src/library/grDevices/man/recordplot.Rd
index e18b74b..e2263b4 100644
--- a/src/library/grDevices/man/recordplot.Rd
+++ b/src/library/grDevices/man/recordplot.Rd
@@ -1,5 +1,5 @@
 % File src/library/grDevices/man/recordplot.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2013 R Core Team
 % Distributed under GPL 2 or later
 
@@ -12,11 +12,17 @@
   Functions to save the current plot in an \R variable, and to replay it.
 }
 \usage{
-recordPlot()
-replayPlot(x)
+recordPlot(load=NULL, attach=NULL)
+replayPlot(x, reloadPkgs=FALSE)
 }
 \arguments{
- \item{x}{A saved plot.}
+  \item{load}{If not \code{NULL}, a character vector of package names,
+    which are saved as part of the recorded plot.}
+  \item{attach}{If not \code{NULL}, a character vector of package names,
+    which are saved as part of the recorded plot.}
+  \item{x}{A saved plot.}
+  \item{reloadPkgs}{A logical indicating whether to reload and/or
+    reattach any packages that were saved as part of the recorded plot.}
 }
 \details{
   These functions record and replay the displaylist of the current
@@ -29,10 +35,32 @@ replayPlot(x)
   \code{\link{str}} are liable to mislead.
 }
 \section{Warning}{
-  The format of recorded plots may change between \R versions.
-  Recorded plots can \strong{not} be used as a permanent
-  storage format for \R plots.  There were extensive changes in \R
-  3.0.0, and now only plots from the current session can be replayed.
+  The format of recorded plots may change between \R versions, so
+  recorded plots should \strong{not} be used as a permanent
+  storage format for \R plots.
+  
+  As of \R 3.3.0, it is possible (again)
+  to replay a plot from another \R session using, for example,
+  \code{\link{saveRDS}} and \code{\link{readRDS}}.
+  It is even possible to replay a plot from another \R version,
+  however, this will produce warnings, may produce errors,
+  or something worse.
+}
+\section{Note}{
+  Replay of a recorded plot may not produce the correct result
+  (or may just fail) if the display list contains a call to
+  \code{\link{recordGraphics}} which in turn contains an expression
+  that calls code from a non-base package other than \pkg{graphics}
+  or \pkg{grid}.  The most well-known example of this is a plot
+  drawn with the package \CRANpkg{ggplot2}.  One solution is to load
+  the relevant package(s) before replaying the recorded plot.
+  The \code{load} and \code{attach} arguments to \code{recordPlot}
+  can be used to automate this - any packages named in \code{load}
+  will be reloaded, via \code{\link{loadNamespace}}, and any packages
+  named in \code{attach} will be reattached, via \code{\link{library}},
+  as long as \code{reloadPkgs} is \code{TRUE} in the call to
+  \code{replayPlot}.  This is only relevant when attempting to
+  replay in one R session a plot that was recorded in a different R session.
 }
 \value{
   \code{recordPlot} returns an object of class \code{"recordedplot"}.
diff --git a/src/library/grDevices/man/rgb.Rd b/src/library/grDevices/man/rgb.Rd
index 6655c2d..d4e7ace 100644
--- a/src/library/grDevices/man/rgb.Rd
+++ b/src/library/grDevices/man/rgb.Rd
@@ -1,10 +1,8 @@
 % File src/library/grDevices/man/rgb.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2014 R Core Team
 % Distributed under GPL 2 or later
 
-\newcommand{\CRANpkg}{\href{http://CRAN.R-project.org/package=#1}{\pkg{#1}}}
-
 \name{rgb}
 \title{RGB Color Specification}
 \usage{
@@ -33,7 +31,7 @@ rgb(red, green, blue, alpha, names = NULL, maxColorValue = 1)
     \code{red}, \code{blue}, \code{green}, and \code{alpha}
     values are coerced to integers in \code{0:255} and the result is
     computed most efficiently.}
-  \item{names}{character. The names for the resulting vector.}
+  \item{names}{character vector. The names for the resulting vector.}
   \item{maxColorValue}{number giving the maximum of the color values
     range, see above.}
 }
diff --git a/src/library/grDevices/man/rgb2hsv.Rd b/src/library/grDevices/man/rgb2hsv.Rd
index 158f457..c4350a4 100644
--- a/src/library/grDevices/man/rgb2hsv.Rd
+++ b/src/library/grDevices/man/rgb2hsv.Rd
@@ -1,6 +1,6 @@
 % File src/library/grDevices/man/rgb2hsv.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2011 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2014 R Core Team
 % Distributed under GPL 2 or later
 
 \name{rgb2hsv}
@@ -52,7 +52,7 @@ rgb2hsv(r, g = NULL, b = NULL, maxColorValue = 255)
 (hc <- rgb2hsv(rc))
 6 * hc["h",] # the hues are equispaced
 
-\testonly{set.seed(151)}
+\dontshow{set.seed(151)}
 (rgb3 <- floor(256 * matrix(stats::runif(3*12), 3, 12)))
 (hsv3 <- rgb2hsv(rgb3))
 ## Consistency :
diff --git a/src/library/grDevices/man/trans3d.Rd b/src/library/grDevices/man/trans3d.Rd
index da4ce7d..4885a69 100644
--- a/src/library/grDevices/man/trans3d.Rd
+++ b/src/library/grDevices/man/trans3d.Rd
@@ -1,5 +1,5 @@
 % File src/library/grDevices/man/trans3d.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2007 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/grDevices/man/unix/png.Rd b/src/library/grDevices/man/unix/png.Rd
index 774dda2..deff716 100644
--- a/src/library/grDevices/man/unix/png.Rd
+++ b/src/library/grDevices/man/unix/png.Rd
@@ -1,6 +1,6 @@
 % File src/library/grDevices/man/unix/png.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2014 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2017 R Core Team
 % Distributed under GPL 2 or later
 
 \name{png}
@@ -68,7 +68,7 @@ tiff(filename = "Rplot\%03d.tiff",
     section in the help for \code{\link{X11}}.}
 
   \item{type}{character string, one of \code{"Xlib"} or \code{"quartz"}
-    (some OS X builds) or \code{"cairo"}.  The latter will only be
+    (some macOS builds) or \code{"cairo"}.  The latter will only be
     available if the system was compiled with support for cairo --
     otherwise \code{"Xlib"} will be used.  The default is set by
     \code{\link{getOption}("bitmapType")} -- the \sQuote{out of the box}
@@ -117,7 +117,7 @@ tiff(filename = "Rplot\%03d.tiff",
   "Xlib"} they may not be usable unless the X11 display is available to
   the owner of the \R process.  \code{type = "cairo"} requires cairo 1.2
   or later.  \code{type = "quartz"} uses the \code{\link{quartz}} device
-  and so is only available where that is (on some OS X builds: see
+  and so is only available where that is (on some macOS builds: see
   \code{\link{capabilities}("aqua")}).
 
   By default no resolution is recorded in the file, except for BMP.
@@ -139,10 +139,9 @@ tiff(filename = "Rplot\%03d.tiff",
 
   Quartz-produced PNG and TIFF plots with a transparent background are
   recorded with a dark grey matte which will show up in some viewers,
-  including \command{Preview} on OS X.
+  including \command{Preview} on macOS.
   
-  Prior to \R 3.0.3 unknown resolutions in BMP files were sometimes
-  recorded incorrectly: they are now recorded as 72 ppi.
+  Unknown resolutions in BMP files are recorded as 72 ppi.
 }
 
 \value{
@@ -168,14 +167,14 @@ tiff(filename = "Rplot\%03d.tiff",
     \item On platforms with support for X11, plotting to a hidden X11
     display.
 
-    \item On OS X when working at the console and when \R is
+    \item On macOS when working at the console and when \R is
     compiled with suitable support, using Apple's Quartz plotting
     system.
 
     \item Where support has been compiled in for cairographics, plotting
     on cairo surfaces.  This may use the native platform support for
     fonts, or it may use \code{fontconfig} to support a wide range of
-    font formats.  (This was first available on Windows in \R 2.14.0.)
+    font formats.
   }
   Inevitably there will be differences between the options supported and
   output produced.  Perhaps the most important are support for
@@ -200,7 +199,7 @@ tiff(filename = "Rplot\%03d.tiff",
   The PNG specification, \url{http://www.w3.org/TR/PNG/}.
   
   The TIFF specification, including extensions, at
-  \url{http://partners.adobe.com/public/developer/tiff/}.
+  \url{https://partners.adobe.com/public/developer/tiff/}.
 }
 \seealso{
   \code{\link{Devices}}, \code{\link{dev.print}}
@@ -234,7 +233,7 @@ tiff(filename = "Rplot\%03d.tiff",
 
 \examples{
 ## these examples will work only if the devices are available
-## and cairo or an X11 display or an OS X display is available.
+## and cairo or an X11 display or a macOS display is available.
 
 ## copy current plot to a (large) PNG file
 \dontrun{dev.print(png, file = "myplot.png", width = 1024, height = 768)}
diff --git a/src/library/grDevices/man/unix/quartz.Rd b/src/library/grDevices/man/unix/quartz.Rd
index f29c011..395cd1a 100644
--- a/src/library/grDevices/man/unix/quartz.Rd
+++ b/src/library/grDevices/man/unix/quartz.Rd
@@ -1,18 +1,16 @@
 % File src/library/grDevices/man/unix/quartz.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2013 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2014 R Core Team
 % Distributed under GPL 2 or later
 
-\newcommand{\sspace}{\ifelse{latex}{\out{~}}{ }}
-
 \name{quartz}
 \alias{quartz}
 \alias{quartz.options}
 \alias{quartz.save}
 
-\title{OS X Quartz Device}
+\title{macOS Quartz Device}
 \description{
-  \code{quartz} starts a graphics device driver for the OS X System.
+  \code{quartz} starts a graphics device driver for the macOS System.
   It supports plotting both to the screen (the default) and to various
   graphics file formats.
 }
@@ -133,7 +131,7 @@ quartz.save(file, type = "png", device = dev.cur(), dpi = 100, ...)
 \note{
   For a long time the default font family was documented as
   \code{"Helvetica"} after it had been changed to \code{"Arial"} to work
-  around a deficiency in OS X 10.4.   It may be changed back in future.
+  around a deficiency in macOS 10.4.   It may be changed back in future.
   
   A fairly common Mac problem is no text appearing on plots due to
   corrupted or duplicated fonts on your system.  You may be able to
diff --git a/src/library/grDevices/man/unix/quartzFonts.Rd b/src/library/grDevices/man/unix/quartzFonts.Rd
index 92307cb..692dea5 100644
--- a/src/library/grDevices/man/unix/quartzFonts.Rd
+++ b/src/library/grDevices/man/unix/quartzFonts.Rd
@@ -1,5 +1,5 @@
 % File src/library/grDevices/man/unix/quartzFonts.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2007 R Core Team
 % Distributed under GPL 2 or later
 
@@ -51,7 +51,7 @@ quartzFonts(...)
 quartzFonts()
 quartzFonts("mono")
 \dontrun{
-## for CJK locales you can use something like
+## for East Asian locales you can use something like
 quartzFonts(sans = quartzFont(rep("AppleGothic", 4)),
             serif = quartzFont(rep("AppleMyungjp", 4)))
 ## since the default fonts may well not have the glyphs needed
diff --git a/src/library/grDevices/man/unix/savePlot.Rd b/src/library/grDevices/man/unix/savePlot.Rd
index 7f42a59..3653fba 100644
--- a/src/library/grDevices/man/unix/savePlot.Rd
+++ b/src/library/grDevices/man/unix/savePlot.Rd
@@ -1,5 +1,5 @@
 % File src/library/grDevices/man/windows/savePlot.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 2008-9 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/grDevices/man/unix/x11.Rd b/src/library/grDevices/man/unix/x11.Rd
index eb428b5..9bcd1bc 100644
--- a/src/library/grDevices/man/unix/x11.Rd
+++ b/src/library/grDevices/man/unix/x11.Rd
@@ -1,10 +1,8 @@
 % File src/library/grDevices/man/unix/x11.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2013 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2014 R Core Team
 % Distributed under GPL 2 or later
 
-\newcommand{\sspace}{\ifelse{latex}{\out{~}}{ }}
-
 \name{x11}
 \alias{x11}
 \alias{X11}
@@ -19,7 +17,7 @@
   \code{x11} is recognized as a synonym for \code{X11}.
 
   The \R function is a wrapper for two devices, one based on Xlib
-  (\url{http://en.wikipedia.org/wiki/Xlib}) and one using cairographics
+  (\url{https://en.wikipedia.org/wiki/Xlib}) and one using cairographics
   (\url{http://www.cairographics.org}).
 }
 \usage{
@@ -83,7 +81,7 @@ X11.options(\dots, reset = FALSE)
     \code{"nbcairo"} or \code{"dbcairo"}.  Only the first will be
     available if the system was compiled without support for
     cairographics.  The default is \code{"cairo"} where available except
-    on OS X, otherwise \code{"Xlib"}.}
+    on macOS, otherwise \code{"Xlib"}.}
 
   \item{antialias}{for cairo types, the type of anti-aliasing (if any)
     to be used.  One of \code{c("default", "none", "gray", "subpixel")}.}
@@ -133,11 +131,11 @@ X11.options(\dots, reset = FALSE)
   Which version will be fastest depends on the X11 connection and the
   type of plotting.  You will probably want to use a buffered type
   unless backing store is in use on the X server (which for example it
-  always is on OS X displays), as otherwise repainting when the
+  always is on macOS displays), as otherwise repainting when the
   window is exposed will be slow.  On slow connections \code{type =
     "dbcairo"} will probably give the best performance.
 
-  Because of known problems with font selection on OS X without
+  Because of known problems with font selection on macOS without
   Pango (for example, the CRAN distribution), \code{type = "cairo"} is
   not the default there.  These problems have included mixing up bold
   and italic (since worked around), selecting incorrect glyphs and ugly
@@ -197,7 +195,7 @@ X11.options(\dots, reset = FALSE)
   \code{"Courier"}).
 
   The font selection is handled by \code{Pango} (usually \emph{via}
-  \code{fontconfig}) or \code{fontconfig} (on OS X and perhaps
+  \code{fontconfig}) or \code{fontconfig} (on macOS and perhaps
   elsewhere).  The results depend on the fonts installed on the system
   running \R -- setting the environmnent variable \env{FC_DEBUG} to 1
   normally allows some tracing of the selection process.
@@ -246,7 +244,7 @@ If that shows \code{symbol.ttf} that may be the Wine symbol font -- use
   \code{X11.options}.  The class looked for is \code{R_x11}.  Note that
   the resource specifies the width and height in pixels and not in
   inches.  See for example \samp{man X} (or
-  \url{http://www.xfree86.org/current/X.7.html}).
+  \url{https://www.x.org/releases/current/}).
   An example line in \file{~/.Xresources} might be
 \preformatted{R_x11*geometry: 900x900-0+0
 }
diff --git a/src/library/grDevices/man/unix/x11Fonts.Rd b/src/library/grDevices/man/unix/x11Fonts.Rd
index 81d3345..fff1760 100644
--- a/src/library/grDevices/man/unix/x11Fonts.Rd
+++ b/src/library/grDevices/man/unix/x11Fonts.Rd
@@ -1,5 +1,5 @@
 % File src/library/grDevices/man/unix/x11Fonts.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2013 R Core Team
 % Distributed under GPL 2 or later
 
@@ -47,7 +47,7 @@ X11Fonts(...)
   provided for \code{"Helvetica"} (the device default), \code{"Times"},
   \code{"CyrHelvetica"}, \code{"CyrTimes"} (versions of these fonts with
   Cyrillic support, at least on Linux), \code{"Arial"} (on some
-  platforms including OS X and Solaris) and \code{"Mincho"} (a CJK
+  platforms including macOS and Solaris) and \code{"Mincho"} (a CJK
   font).
 }
 \seealso{
diff --git a/src/library/grDevices/man/windows/bringToTop.Rd b/src/library/grDevices/man/windows/bringToTop.Rd
index 92a5f36..f3b5032 100644
--- a/src/library/grDevices/man/windows/bringToTop.Rd
+++ b/src/library/grDevices/man/windows/bringToTop.Rd
@@ -1,10 +1,8 @@
 % File src/library/grDevices/man/windows/bringToTop.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2007 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2014 R Core Team
 % Distributed under GPL 2 or later
 
-\newcommand{\sspace}{\ifelse{latex}{\out{~}}{ }}
-
 \name{bringToTop}
 \alias{bringToTop}
 \alias{stayOnTop}
diff --git a/src/library/grDevices/man/windows/msgWindow.Rd b/src/library/grDevices/man/windows/msgWindow.Rd
index 4643d6d..85b373f 100644
--- a/src/library/grDevices/man/windows/msgWindow.Rd
+++ b/src/library/grDevices/man/windows/msgWindow.Rd
@@ -1,5 +1,5 @@
 % File src/library/grDevices/man/windows/msgWindow.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 2008 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/grDevices/man/windows/png.Rd b/src/library/grDevices/man/windows/png.Rd
index 2ed115e..55bc485 100644
--- a/src/library/grDevices/man/windows/png.Rd
+++ b/src/library/grDevices/man/windows/png.Rd
@@ -1,6 +1,6 @@
 % File src/library/grDevices/man/windows/png.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2014 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2017 R Core Team
 % Distributed under GPL 2 or later
 
 \name{png}
@@ -126,8 +126,7 @@ tiff(filename = "Rplot\%03d.tif",
   of the TIFF specification) in combination with the compression method,
   which is effective for continuous-tone images, especially colour ones.
   
-  Prior to \R 3.0.3 unknown resolutions in BMP files were sometimes
-  recorded incorrectly: they are now recorded as 72 ppi.
+  Unknown resolutions in BMP files are recorded as 72 ppi.
 }
 
 \value{
@@ -153,14 +152,14 @@ tiff(filename = "Rplot\%03d.tif",
     \item On platforms with support for X11, plotting to a hidden X11
     display.
 
-    \item On OS X when working at the console and when \R is
+    \item On macOS when working at the console and when \R is
     compiled with suitable support, using Apple's Quartz plotting
     system.
 
     \item Where support has been compiled in for cairographics, plotting
     on cairo surfaces.  This may use the native platform support for
     fonts, or it may use \code{fontconfig} to support a wide range of
-    font formats.  (This was first available on Windows in \R 2.14.0.)
+    font formats.
   }
   Inevitably there will be differences between the options supported and
   output produced.  Perhaps the most important are support for
@@ -189,7 +188,7 @@ tiff(filename = "Rplot\%03d.tif",
   The PNG specification, \url{http://www.w3.org/TR/PNG/}.
   
   The TIFF specification, including extensions, at
-  \url{http://partners.adobe.com/public/developer/tiff/}.
+  \url{https://partners.adobe.com/public/developer/tiff/}.
 }
 \seealso{
   \code{\link{Devices}}, \code{\link{dev.print}}
diff --git a/src/library/grDevices/man/windows/savePlot.Rd b/src/library/grDevices/man/windows/savePlot.Rd
index 9b35c84..e91cc98 100644
--- a/src/library/grDevices/man/windows/savePlot.Rd
+++ b/src/library/grDevices/man/windows/savePlot.Rd
@@ -1,5 +1,5 @@
 % File src/library/grDevices/man/windows/savePlot.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2009 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/grDevices/man/windows/windows.Rd b/src/library/grDevices/man/windows/windows.Rd
index ae04799..9520d05 100644
--- a/src/library/grDevices/man/windows/windows.Rd
+++ b/src/library/grDevices/man/windows/windows.Rd
@@ -1,10 +1,8 @@
 % File src/library/grDevices/man/windows/windows.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2014 R Core Team
 % Distributed under GPL 2 or later
 
-\newcommand{\sspace}{\ifelse{latex}{\out{~}}{ }}
-
 \name{windows}
 \alias{windows}
 \alias{win.graph}
diff --git a/src/library/grDevices/man/windows/windows.options.Rd b/src/library/grDevices/man/windows/windows.options.Rd
index 11211f2..e8db00d 100644
--- a/src/library/grDevices/man/windows/windows.options.Rd
+++ b/src/library/grDevices/man/windows/windows.options.Rd
@@ -1,5 +1,5 @@
 % File src/library/grDevices/man/pdf.options.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2011 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/grDevices/man/windows/windowsFonts.Rd b/src/library/grDevices/man/windows/windowsFonts.Rd
index 47ab892..6470456 100644
--- a/src/library/grDevices/man/windows/windowsFonts.Rd
+++ b/src/library/grDevices/man/windows/windowsFonts.Rd
@@ -1,5 +1,5 @@
 % File src/library/grDevices/man/windows/windowsFonts.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2007 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/grDevices/man/xfig.Rd b/src/library/grDevices/man/xfig.Rd
index f7e17ca..9c16d71 100644
--- a/src/library/grDevices/man/xfig.Rd
+++ b/src/library/grDevices/man/xfig.Rd
@@ -1,6 +1,6 @@
 % File src/library/grDevices/man/xfig.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2007 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2016 R Core Team
 % Distributed under GPL 2 or later
 
 \name{xfig}
@@ -15,7 +15,7 @@
   \code{xfig} and \code{postscript}.
 }
 \usage{
-xfig(file = ifelse(onefile, "Rplots.fig", "Rplot\%03d.fig"),
+xfig(file = if(onefile) "Rplots.fig" else "Rplot\%03d.fig",
      onefile = FALSE, encoding = "none",
      paper = "default", horizontal = TRUE,
      width = 0, height = 0, family = "Helvetica",
diff --git a/src/library/grDevices/man/xy.coords.Rd b/src/library/grDevices/man/xy.coords.Rd
index 1ba56a2..e1d7733 100644
--- a/src/library/grDevices/man/xy.coords.Rd
+++ b/src/library/grDevices/man/xy.coords.Rd
@@ -1,6 +1,6 @@
 % File src/library/grDevices/man/xy.coords.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2007 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2016 R Core Team
 % Distributed under GPL 2 or later
 
 \name{xy.coords}
@@ -12,7 +12,7 @@
 }
 \usage{
 xy.coords(x, y = NULL, xlab = NULL, ylab = NULL, log = NULL,
-          recycle = FALSE)
+          recycle = FALSE, setLab = TRUE)
 }
 \alias{xy.coords}
 \arguments{
@@ -24,6 +24,9 @@ xy.coords(x, y = NULL, xlab = NULL, ylab = NULL, log = NULL,
     gives a warning.}
   \item{recycle}{logical; if \code{TRUE}, recycle (\code{\link{rep}})
     the shorter of \code{x} or \code{y} if their lengths differ.}
+  \item{setLab}{logical indicating if the resulting \code{xlab} and
+    \code{ylab} should be constructed from the \dQuote{kind} of \code{(x,y)};
+    otherwise, the arguments \code{xlab} and \code{ylab} are used.}
 }
 \details{
   An attempt is made to interpret the arguments \code{x} and \code{y} in
@@ -49,7 +52,7 @@ xy.coords(x, y = NULL, xlab = NULL, ylab = NULL, log = NULL,
   In any other case, the \code{x} argument is coerced to a vector and
   returned as \bold{y} component where the resulting \code{x} is just
   the index vector \code{1:n}.  In this case, the resulting \code{xlab}
-  component is set to \code{"Index"}.
+  component is set to \code{"Index"} (if \code{setLab} is true as by default).
 
   If \code{x} (after transformation as above) inherits from class
   \code{"POSIXt"} it is coerced to class \code{"POSIXct"}.
@@ -68,12 +71,24 @@ xy.coords(x, y = NULL, xlab = NULL, ylab = NULL, log = NULL,
   and \code{\link{lowess}} are examples of functions which use this mechanism.
 }
 \examples{
-xy.coords(stats::fft(c(1:9)), NULL)
-
+ff <- stats::fft(1:9)
+xy.coords(ff)
+xy.coords(ff, xlab = "fft") # labels "Re(fft)",  "Im(fft)"
+\dontshow{
+stopifnot(identical(xy.coords(ff, xlab = "fft"),
+                    xy.coords(ff, ylab = "fft")))
+xy.labs <- function(...) xy.coords(...)[c("xlab","ylab")]
+stopifnot(identical(xy.labs(ff, xlab = "fft", setLab = FALSE),
+                    list(xlab = "fft", ylab = "fft")),
+          identical(xy.labs(ff, ylab = "fft", setLab = FALSE),
+                    list(xlab = NULL, ylab = "fft")),
+          identical(xy.labs(ff, xlab = "Re(fft)", ylab = "Im(fft)", setLab = FALSE),
+                    list(xlab = "Re(fft)", ylab = "Im(fft)")))
+}% dont
 with(cars, xy.coords(dist ~ speed, NULL)$xlab ) # = "speed"
 
-xy.coords(1:3, 1:2, recycle = TRUE)
-xy.coords(-2:10, NULL, log = "y")
-##> warning: 3 y values <= 0 omitted ..
+xy.coords(1:3, 1:2, recycle = TRUE) # otherwise error "lengths differ"
+xy.coords(-2:10, log = "y")
+##> xlab: "Index"  \\\  warning: 3 y values <= 0 omitted ..
 }
 \keyword{dplot}
diff --git a/src/library/grDevices/man/xyTable.Rd b/src/library/grDevices/man/xyTable.Rd
index e4d6f17..72d14da 100644
--- a/src/library/grDevices/man/xyTable.Rd
+++ b/src/library/grDevices/man/xyTable.Rd
@@ -1,5 +1,5 @@
 % File src/library/grDevices/man/xyTable.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2007 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/grDevices/man/xyz.coords.Rd b/src/library/grDevices/man/xyz.coords.Rd
index b589701..5353fbb 100644
--- a/src/library/grDevices/man/xyz.coords.Rd
+++ b/src/library/grDevices/man/xyz.coords.Rd
@@ -1,6 +1,6 @@
 % File src/library/grDevices/man/xyz.coords.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2007 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2016 R Core Team
 % Distributed under GPL 2 or later
 
 \name{xyz.coords}
@@ -13,7 +13,7 @@
 \usage{
 xyz.coords(x, y = NULL, z = NULL,
            xlab = NULL, ylab = NULL, zlab = NULL,
-           log = NULL, recycle = FALSE)
+           log = NULL, recycle = FALSE, setLab = TRUE)
 }
 \arguments{
   \item{x, y, z}{the x, y and z coordinates of a set of points.
@@ -41,6 +41,9 @@ xyz.coords(x, y = NULL, z = NULL,
     Sets negative values to \code{\link{NA}} and gives a warning.}
   \item{recycle}{logical; if \code{TRUE}, recycle (\code{\link{rep}}) the
     shorter ones of \code{x}, \code{y} or \code{z} if their lengths differ.}
+  \item{setLab}{logical indicating if the resulting \code{xlab} and
+    \code{ylab} should be constructed from the \dQuote{kind} of \code{(x,y)};
+    otherwise, the arguments \code{xlab} and \code{ylab} are used.}
 }
 \value{
   A list with the components
diff --git a/src/library/grDevices/po/R-da.po b/src/library/grDevices/po/R-da.po
index 536f624..e47ffcd 100644
--- a/src/library/grDevices/po/R-da.po
+++ b/src/library/grDevices/po/R-da.po
@@ -2,7 +2,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: R 3.0.0\n"
 "Report-Msgid-Bugs-To: bugs.r-project.org\n"
-"POT-Creation-Date: 2013-12-18 14:41\n"
+"POT-Creation-Date: 2016-04-01 09:50\n"
 "PO-Revision-Date: 2012-01-28 17:40+0200\n"
 "Last-Translator: Joe <joedalton2 at yahoo.dk>\n"
 "Language-Team: LANGUAGE <LL at li.org>\n"
@@ -31,6 +31,9 @@ msgstr "ingen korrekt »z-matrix« angivet"
 msgid "dimensions of 'x', 'y' and 'z' do not match"
 msgstr ""
 
+msgid "finite coordinates are needed"
+msgstr ""
+
 msgid "'bias' must be positive"
 msgstr "»bias« skal være positiv"
 
@@ -218,17 +221,17 @@ msgstr "forskellige skriftkodninger »%s'/'%s«"
 msgid "'file' must be a non-empty character string"
 msgstr "»file« skal være en udfyldt tegnstreng"
 
-msgid "Invalid output format"
+msgid "GhostScript was not found"
+msgstr ""
+
+#, fuzzy
+msgid "invalid output format"
 msgstr "Ugyldigt uddataformat"
 
 msgid "status %d in running command '%s'"
 msgstr "status %d i kørende kommando »%s«"
 
 #, fuzzy
-msgid "range too small for 'min.n'"
-msgstr "interval for lille for min.n"
-
-#, fuzzy
 msgid "a raster matrix must be character, or numeric, or logical"
 msgstr "En bitmapmatrix skal være tegn eller numerisk eller logisk"
 
@@ -265,9 +268,16 @@ msgid "argument is not of class %s"
 msgstr "argument er ikke af klasse »recordedplot«"
 
 #, fuzzy
-msgid "loading snapshot from a different session"
+msgid "snapshot recorded in different R version (pre 3.3.0)"
+msgstr "Indlæser øjebliksbillede fra anden R version"
+
+#, fuzzy
+msgid "snapshot recorded in different R version (%s)"
 msgstr "Indlæser øjebliksbillede fra anden R version"
 
+msgid "snapshot contains invalid graphics call"
+msgstr ""
+
 msgid "'nbin' must be numeric of length 1 or 2"
 msgstr "»nbin« skal være numerisk og af længde 1 eller 2"
 
@@ -304,16 +314,16 @@ msgstr "længden for »x«, »y« og »z« er forskellig"
 msgid "'file' is missing with no default"
 msgstr "»file« mangler uden standard"
 
-msgid "sorry, 'gs' cannot be found"
-msgstr "beklager, »gs« kan ikke findes"
-
 msgid "unrecognized format of gs -help"
 msgstr "formatet for gs -help blev ikke genkendt"
 
 msgid "device '%s' is not available"
 msgstr "enhed »%s« er ikke tilgængelig"
 
-msgid "Available devices are %s"
+#, fuzzy
+msgid ""
+"Available devices are:\n"
+"%s"
 msgstr "Tilgængelige enheder er %s"
 
 msgid "'res' must be specified unless 'units = \"px\"'"
@@ -413,6 +423,13 @@ msgstr[0] "%d z værdi <= 0 udeladt fra logaritmisk plot"
 msgstr[1] "%d z værdier <= 0 udeladt fra logaritmisk plot"
 
 #, fuzzy
+#~ msgid "range too small for 'min.n'"
+#~ msgstr "interval for lille for min.n"
+
+#~ msgid "sorry, 'gs' cannot be found"
+#~ msgstr "beklager, »gs« kan ikke findes"
+
+#, fuzzy
 #~ msgid "loading snapshot from pre-3.0.0 R version"
 #~ msgstr "Indlæser øjebliksbillede fra pre-2.0.0 R version"
 
diff --git a/src/library/grDevices/po/R-de.po b/src/library/grDevices/po/R-de.po
index bc2ea72..75153a7 100644
--- a/src/library/grDevices/po/R-de.po
+++ b/src/library/grDevices/po/R-de.po
@@ -4,13 +4,13 @@
 # Detlef Steuer <steuer at hsu-hh.de>, 2007-2014.
 msgid ""
 msgstr ""
-"Project-Id-Version: R 3.1.0\n"
+"Project-Id-Version: R 3.2.0\n"
 "Report-Msgid-Bugs-To: bugs.r-project.org\n"
-"POT-Creation-Date: 2013-12-18 14:41\n"
-"PO-Revision-Date: 2013-03-01 10:55+0100\n"
+"POT-Creation-Date: 2016-04-01 09:50\n"
+"PO-Revision-Date: 2015-03-20 16:07+0100\n"
 "Last-Translator: Detlef Steuer <steuer at hsu-hh.de>\n"
 "Language-Team: R-Core <R-core at r-project.org>\n"
-"Language: \n"
+"Language: de\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
@@ -26,7 +26,7 @@ msgid "no 'z' matrix specified"
 msgstr "keine 'z' Matrix angegeben"
 
 msgid "increasing 'x' and 'y' values expected"
-msgstr "ansteigende 'x' und 'y' Werte erwarted"
+msgstr "ansteigende 'x' und 'y' Werte erwartet"
 
 msgid "no proper 'z' matrix specified"
 msgstr "keine geeignete 'z' Matrix angegeben"
@@ -34,6 +34,9 @@ msgstr "keine geeignete 'z' Matrix angegeben"
 msgid "dimensions of 'x', 'y' and 'z' do not match"
 msgstr "Dimensionen von 'x', 'y' und 'z' passen nicht zueinander"
 
+msgid "finite coordinates are needed"
+msgstr "endliche Koordinaten werden benötigt"
+
 msgid "'bias' must be positive"
 msgstr "'bias' muss positiv sein"
 
@@ -44,7 +47,7 @@ msgid "at least 3 columns needed"
 msgstr "zumindest 3 Spalten benötigt"
 
 msgid "rgb matrix must be numeric"
-msgstr "RGB Matrix muss nummerisch sein"
+msgstr "RGB Matrix muss numerisch sein"
 
 msgid "rgb matrix must have 3 rows"
 msgstr "RGB Matrix muss 3 Zeilen haben"
@@ -83,7 +86,7 @@ msgid "color spaces use different reference whites"
 msgstr "Farbräume nutzen unterschiedliches Referenz-Weiß"
 
 msgid "'name' must be a character vector"
-msgstr "'name' muss Charakter-Vektor sein"
+msgstr "'name' muss Zeichenkettenvektor sein"
 
 msgid "cannot shut down device 1 (the null device)"
 msgstr "kann Device 1 (Null Device) nicht schließen"
@@ -122,7 +125,7 @@ msgid "dev.displaylist() called without an open graphics device"
 msgstr "dev.displaylist() ohne geöffnetes Grafik-Device aufgerufen"
 
 msgid "invalid setting for 'getOption(\"device\")'"
-msgstr "unzulässige einstellung für 'getOption(\"device\")'"
+msgstr "unzulässige Einstellung für 'getOption(\"device\")'"
 
 msgid "device '%s' not found"
 msgstr "Device '%s' nicht gefunden"
@@ -140,11 +143,11 @@ msgid "dev.new(): using postscript(file=\"%s\")"
 msgstr "dev.new(): nutze postscript(file=\"%s\")"
 
 msgid "invalid arguments in '%s' (need named args)"
-msgstr "unzulässige Argumente in '%s' (benannte Argumente benötigt"
+msgstr "unzulässige Argumente in '%s' (benannte Argumente benötigt)"
 
 msgid "'name.opt' must be character, name of an existing list"
 msgstr ""
-"'name.opt' muss ein Charkter, ein Name oder eine exisitierende Liste sein"
+"'name.opt' muss eine Zeichenkette sein, der Name einer existierenden Liste"
 
 msgid "cannot reset non-existent '%s'"
 msgstr "kann nicht existierendes ' %s' nicht zurücksetzen"
@@ -212,18 +215,18 @@ msgstr "Zeichenkodierungen passen nicht '%s'/'%s'"
 msgid "'file' must be a non-empty character string"
 msgstr "'file' muss eine nicht-leere Zeichenkette sein"
 
-msgid "Invalid output format"
+msgid "GhostScript was not found"
+msgstr "GhostScript nicht gefunden"
+
+msgid "invalid output format"
 msgstr "ungültiges Ausgabeformat"
 
 msgid "status %d in running command '%s'"
 msgstr "Status %d im laufenden Kommando '%s'"
 
-msgid "range too small for 'min.n'"
-msgstr "Spannweite zu klein für 'min.n'"
-
 msgid "a raster matrix must be character, or numeric, or logical"
 msgstr ""
-"Eine Rastermatrix muss entweder character, nummerisch oder boole'sch sein"
+"Eine Rastermatrix muss entweder character, numerisch oder boolesch sein"
 
 msgid "a raster array must be numeric"
 msgstr "ein Raster-Array muss numerisch sein"
@@ -232,16 +235,16 @@ msgid "a raster array must have exactly 3 dimensions"
 msgstr "ein Raster-Array muss genau 3 Dimensionen haben"
 
 msgid "a raster array must have exactly 3 or 4 planes"
-msgstr "ein Rater-Array muss genau 3 oder 4 Ebenen haben"
+msgstr "ein Raster-Array muss genau 3 oder 4 Ebenen haben"
 
 msgid "'drop' is always implicitly FALSE in '[.raster'"
 msgstr "'drop' ist implizit immer FALSE in '[.raster'"
 
 msgid "invalid raster subsetting"
-msgstr "ungültiges Rastersubsetting"
+msgstr "ungültiges Raster-Subsetting"
 
 msgid "invalid raster subassignment"
-msgstr "ungültige Rasterteilzuweisung"
+msgstr "ungültige Raster-Teilzuweisung"
 
 msgid "operator not meaningful for raster objects"
 msgstr "Operator hat für Rasterobjekte keine Bedeutung"
@@ -252,14 +255,22 @@ msgstr "kein aktuelles Device, von dem aufgenommen werden kann"
 msgid "argument is not of class %s"
 msgstr "Argument ist nicht von Klasse %s"
 
-msgid "loading snapshot from a different session"
+#, fuzzy
+msgid "snapshot recorded in different R version (pre 3.3.0)"
 msgstr "lade Snapshot einer anderen R Sitzung"
 
+#, fuzzy
+msgid "snapshot recorded in different R version (%s)"
+msgstr "lade Snapshot einer anderen R Sitzung"
+
+msgid "snapshot contains invalid graphics call"
+msgstr ""
+
 msgid "'nbin' must be numeric of length 1 or 2"
-msgstr "'nbin' muss nummerisch mit Länge 1 oder 2 sein"
+msgstr "'nbin' muss numerisch mit Länge 1 oder 2 sein"
 
 msgid "'bandwidth' must be numeric"
-msgstr "'bandwidth' muss nummerisch sein"
+msgstr "'bandwidth' muss numerisch sein"
 
 msgid "'bandwidth' must be positive"
 msgstr "'bandwidth' muss positiv sein"
@@ -274,7 +285,7 @@ msgid "'x' is a list, but does not have components 'x' and 'y'"
 msgstr "'x' ist eine Liste, hat aber keine Komponenten 'x' und 'y'"
 
 msgid "'x' and 'y' lengths differ"
-msgstr "Längen von 'x' nud 'y' unterscheiden sich"
+msgstr "Längen von 'x' und 'y' unterscheiden sich"
 
 msgid "invalid first argument [bad language object]"
 msgstr "ungültiges erstes Argument [schlechtes Sprachobjekt]"
@@ -291,17 +302,18 @@ msgstr "Längen von 'x', 'y' und 'z' unterscheiden sich"
 msgid "'file' is missing with no default"
 msgstr "'file' fehlt ohne Standardwert"
 
-msgid "sorry, 'gs' cannot be found"
-msgstr "'gs' kann leider nicht gefunden werden"
-
 msgid "unrecognized format of gs -help"
 msgstr "unbekanntes Format von gs -help"
 
 msgid "device '%s' is not available"
 msgstr "Device '%s' steht nicht zur Verfügung"
 
-msgid "Available devices are %s"
-msgstr "Verfügbar Devices sind %s"
+msgid ""
+"Available devices are:\n"
+"%s"
+msgstr ""
+"Verfügbare Devices sind:\n"
+"%s"
 
 msgid "'res' must be specified unless 'units = \"px\"'"
 msgstr "'res' muss angegeben werden, außer 'units = \"px\"'"
@@ -327,7 +339,7 @@ msgstr ""
 "nutze \"Xlib\""
 
 msgid "unknown family for X11(type = \"XLib\")"
-msgstr "unbekannte Famiile für X11(type = \"XLib\")"
+msgstr "unbekannte Familie für X11(type = \"XLib\")"
 
 msgid "invalid X11 font specification:"
 msgstr "ungültige X11 Zeichensatzspezifikation"
@@ -348,7 +360,7 @@ msgid "invalid value for 'rescale'"
 msgstr "unzulässiger Wert für 'rescale'"
 
 msgid "can only bring windows devices to the front"
-msgstr "kann nur windows-Devices nach Vorne bringen"
+msgstr "kann nur Windows-Devices nach vorne bringen"
 
 msgid "'type' not applicable to the R console"
 msgstr "'type' für die R-Konsole nicht anwendbar"
@@ -396,6 +408,12 @@ msgid_plural "%d z values <= 0 omitted from logarithmic plot"
 msgstr[0] "%d z Wert <= 0 ausgelassen in logarithmischem Plot"
 msgstr[1] "%d z Werte <= 0 ausgelassen in logarithmischem Plot"
 
+#~ msgid "range too small for 'min.n'"
+#~ msgstr "Spannweite zu klein für 'min.n'"
+
+#~ msgid "sorry, 'gs' cannot be found"
+#~ msgstr "'gs' kann leider nicht gefunden werden"
+
 #~ msgid "loading snapshot from pre-3.0.0 R version"
 #~ msgstr "lade Snapshot einer Version vor R-3.0.0"
 
diff --git a/src/library/grDevices/po/R-en_GB.po b/src/library/grDevices/po/R-en_GB.po
index 5919e8f..32a5be1 100644
--- a/src/library/grDevices/po/R-en_GB.po
+++ b/src/library/grDevices/po/R-en_GB.po
@@ -2,11 +2,11 @@ msgid ""
 msgstr ""
 "Project-Id-Version: R 2.3.0\n"
 "Report-Msgid-Bugs-To: bugs.r-project.org\n"
-"POT-Creation-Date: 2013-12-18 14:41\n"
+"POT-Creation-Date: 2016-04-01 09:50\n"
 "PO-Revision-Date: 2005-08-15 11:43+0000\n"
 "Last-Translator: Prof Brian Ripley <ripley at stats.ox.ac.uk>\n"
 "Language-Team: English\n"
-"Language: \n"
+"Language: en_GB\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=ISO-8859-1\n"
 "Content-Transfer-Encoding: 8bit\n"
@@ -29,6 +29,9 @@ msgstr ""
 msgid "dimensions of 'x', 'y' and 'z' do not match"
 msgstr ""
 
+msgid "finite coordinates are needed"
+msgstr ""
+
 msgid "'bias' must be positive"
 msgstr ""
 
@@ -207,13 +210,13 @@ msgstr ""
 msgid "'file' must be a non-empty character string"
 msgstr ""
 
-msgid "Invalid output format"
+msgid "GhostScript was not found"
 msgstr ""
 
-msgid "status %d in running command '%s'"
+msgid "invalid output format"
 msgstr ""
 
-msgid "range too small for 'min.n'"
+msgid "status %d in running command '%s'"
 msgstr ""
 
 msgid "a raster matrix must be character, or numeric, or logical"
@@ -246,7 +249,13 @@ msgstr ""
 msgid "argument is not of class %s"
 msgstr ""
 
-msgid "loading snapshot from a different session"
+msgid "snapshot recorded in different R version (pre 3.3.0)"
+msgstr ""
+
+msgid "snapshot recorded in different R version (%s)"
+msgstr ""
+
+msgid "snapshot contains invalid graphics call"
 msgstr ""
 
 msgid "'nbin' must be numeric of length 1 or 2"
@@ -285,16 +294,15 @@ msgstr ""
 msgid "'file' is missing with no default"
 msgstr ""
 
-msgid "sorry, 'gs' cannot be found"
-msgstr ""
-
 msgid "unrecognized format of gs -help"
 msgstr ""
 
 msgid "device '%s' is not available"
 msgstr ""
 
-msgid "Available devices are %s"
+msgid ""
+"Available devices are:\n"
+"%s"
 msgstr ""
 
 msgid "'res' must be specified unless 'units = \"px\"'"
diff --git a/src/library/grDevices/po/R-fr.po b/src/library/grDevices/po/R-fr.po
index 39a31ab..fc00303 100644
--- a/src/library/grDevices/po/R-fr.po
+++ b/src/library/grDevices/po/R-fr.po
@@ -7,7 +7,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: R 2.12.0\n"
 "Report-Msgid-Bugs-To: bugs.r-project.org\n"
-"POT-Creation-Date: 2013-12-18 14:41\n"
+"POT-Creation-Date: 2016-04-01 09:50\n"
 "PO-Revision-Date: 2014-03-17 10:46+0100\n"
 "Last-Translator: Philippe Grosjean <phgrosjean at sciviews.org>\n"
 "Language-Team: French <R-core at r-project.org>\n"
@@ -36,6 +36,9 @@ msgstr "la matrice 'z' sp
 msgid "dimensions of 'x', 'y' and 'z' do not match"
 msgstr "les dimensions de 'x', 'y' et 'z' ne correspondent pas"
 
+msgid "finite coordinates are needed"
+msgstr ""
+
 msgid "'bias' must be positive"
 msgstr "'bias' doit �tre positif"
 
@@ -217,15 +220,16 @@ msgstr "incoh
 msgid "'file' must be a non-empty character string"
 msgstr "'file' doit �tre une cha�ne de caract�re non vide"
 
-msgid "Invalid output format"
+msgid "GhostScript was not found"
+msgstr ""
+
+#, fuzzy
+msgid "invalid output format"
 msgstr "Format de sortie incorrect"
 
 msgid "status %d in running command '%s'"
 msgstr "statut %d dans la commande en cours d'ex�cution '%s'"
 
-msgid "range too small for 'min.n'"
-msgstr "�tendue des valeurs trop petite pour 'min.n'"
-
 msgid "a raster matrix must be character, or numeric, or logical"
 msgstr ""
 "une matrice de pixels doit contenir des cha�nes de caract�res, des nombres "
@@ -258,9 +262,17 @@ msgstr "aucun p
 msgid "argument is not of class %s"
 msgstr "l'argument n'est pas de classe %s"
 
-msgid "loading snapshot from a different session"
+#, fuzzy
+msgid "snapshot recorded in different R version (pre 3.3.0)"
+msgstr "chargement d'un instantan� graphique � partir d'une version diff�rente"
+
+#, fuzzy
+msgid "snapshot recorded in different R version (%s)"
 msgstr "chargement d'un instantan� graphique � partir d'une version diff�rente"
 
+msgid "snapshot contains invalid graphics call"
+msgstr ""
+
 msgid "'nbin' must be numeric of length 1 or 2"
 msgstr "'nbin' doit �tre num�rique et de longueur 1 ou 2"
 
@@ -297,16 +309,16 @@ msgstr "les longueurs de 'x', 'y' et 'z' diff
 msgid "'file' is missing with no default"
 msgstr "'file' est manquant sans valeur par d�faut"
 
-msgid "sorry, 'gs' cannot be found"
-msgstr "d�sol�, 'gs' est introuvable"
-
 msgid "unrecognized format of gs -help"
 msgstr "format de gs - help inconnu"
 
 msgid "device '%s' is not available"
 msgstr "le p�riph�rique '%s' n'est pas disponible"
 
-msgid "Available devices are %s"
+#, fuzzy
+msgid ""
+"Available devices are:\n"
+"%s"
 msgstr "Les p�riph�riques disponibles sont %s"
 
 msgid "'res' must be specified unless 'units = \"px\"'"
@@ -409,6 +421,12 @@ msgid_plural "%d z values <= 0 omitted from logarithmic plot"
 msgstr[0] "%d valeur z <= 0 est ignor�e pour le graphe logarithmique"
 msgstr[1] "%d valeurs z <= 0 sont ignor�es pour le graphe logarithmique"
 
+#~ msgid "range too small for 'min.n'"
+#~ msgstr "�tendue des valeurs trop petite pour 'min.n'"
+
+#~ msgid "sorry, 'gs' cannot be found"
+#~ msgstr "d�sol�, 'gs' est introuvable"
+
 #~ msgid "loading snapshot from pre-3.0.0 R version"
 #~ msgstr ""
 #~ "chargement d'un instantan� graphique � partir d'une version de R pre-3.0.0"
diff --git a/src/library/grDevices/po/R-grDevices.pot b/src/library/grDevices/po/R-grDevices.pot
index 5dbbf49..3f7f25c 100644
--- a/src/library/grDevices/po/R-grDevices.pot
+++ b/src/library/grDevices/po/R-grDevices.pot
@@ -1,8 +1,7 @@
 msgid ""
 msgstr ""
-"Project-Id-Version: R 3.1.0\n"
-"Report-Msgid-Bugs-To: bugs.r-project.org\n"
-"POT-Creation-Date: 2013-12-18 14:41\n"
+"Project-Id-Version: grDevices 3.4.0\n"
+"POT-Creation-Date: 2016-04-01 09:50\n"
 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
 "Last-Translator: FULL NAME <EMAIL at ADDRESS>\n"
 "Language-Team: LANGUAGE <LL at li.org>\n"
@@ -29,6 +28,9 @@ msgstr ""
 msgid "dimensions of 'x', 'y' and 'z' do not match"
 msgstr ""
 
+msgid "finite coordinates are needed"
+msgstr ""
+
 msgid "'bias' must be positive"
 msgstr ""
 
@@ -206,13 +208,13 @@ msgstr ""
 msgid "'file' must be a non-empty character string"
 msgstr ""
 
-msgid "Invalid output format"
+msgid "GhostScript was not found"
 msgstr ""
 
-msgid "status %d in running command '%s'"
+msgid "invalid output format"
 msgstr ""
 
-msgid "range too small for 'min.n'"
+msgid "status %d in running command '%s'"
 msgstr ""
 
 msgid "a raster matrix must be character, or numeric, or logical"
@@ -245,7 +247,13 @@ msgstr ""
 msgid "argument is not of class %s"
 msgstr ""
 
-msgid "loading snapshot from a different session"
+msgid "snapshot recorded in different R version (pre 3.3.0)"
+msgstr ""
+
+msgid "snapshot recorded in different R version (%s)"
+msgstr ""
+
+msgid "snapshot contains invalid graphics call"
 msgstr ""
 
 msgid "'nbin' must be numeric of length 1 or 2"
@@ -284,16 +292,13 @@ msgstr ""
 msgid "'file' is missing with no default"
 msgstr ""
 
-msgid "sorry, 'gs' cannot be found"
-msgstr ""
-
 msgid "unrecognized format of gs -help"
 msgstr ""
 
 msgid "device '%s' is not available"
 msgstr ""
 
-msgid "Available devices are %s"
+msgid "Available devices are:\n%s"
 msgstr ""
 
 msgid "'res' must be specified unless 'units = \"px\"'"
diff --git a/src/library/grDevices/po/R-it.po b/src/library/grDevices/po/R-it.po
index e8a46a5..05e9180 100644
--- a/src/library/grDevices/po/R-it.po
+++ b/src/library/grDevices/po/R-it.po
@@ -7,11 +7,11 @@ msgid ""
 msgstr ""
 "Project-Id-Version: R 2.3.0\n"
 "Report-Msgid-Bugs-To: bugs.r-project.org\n"
-"POT-Creation-Date: 2013-12-18 14:41\n"
+"POT-Creation-Date: 2016-04-01 09:50\n"
 "PO-Revision-Date: 2005-02-27 13:33+0100\n"
 "Last-Translator: Stefano M. Iacus <Stefano.Iacus at R-project.org>\n"
 "Language-Team: Italian\n"
-"Language: \n"
+"Language: it\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
@@ -36,6 +36,9 @@ msgstr "nessuna matrice 'z' opportuna specificata"
 msgid "dimensions of 'x', 'y' and 'z' do not match"
 msgstr ""
 
+msgid "finite coordinates are needed"
+msgstr ""
+
 msgid "'bias' must be positive"
 msgstr "'bias' deve essere positivo"
 
@@ -235,13 +238,13 @@ msgstr ""
 msgid "'file' must be a non-empty character string"
 msgstr "'file' deve essere una stringa carattere non vuota"
 
-msgid "Invalid output format"
+msgid "GhostScript was not found"
 msgstr ""
 
-msgid "status %d in running command '%s'"
+msgid "invalid output format"
 msgstr ""
 
-msgid "range too small for 'min.n'"
+msgid "status %d in running command '%s'"
 msgstr ""
 
 msgid "a raster matrix must be character, or numeric, or logical"
@@ -280,9 +283,16 @@ msgid "argument is not of class %s"
 msgstr "l'argomento non è di classe \"recordedplot\""
 
 #, fuzzy
-msgid "loading snapshot from a different session"
+msgid "snapshot recorded in different R version (pre 3.3.0)"
+msgstr "carico uno snapshot da una versione differente di R"
+
+#, fuzzy
+msgid "snapshot recorded in different R version (%s)"
 msgstr "carico uno snapshot da una versione differente di R"
 
+msgid "snapshot contains invalid graphics call"
+msgstr ""
+
 msgid "'nbin' must be numeric of length 1 or 2"
 msgstr ""
 
@@ -321,16 +331,16 @@ msgstr "le lunghezze di 'x', 'y' e 'z' differiscono"
 msgid "'file' is missing with no default"
 msgstr "'file' manca senza valore di default"
 
-msgid "sorry, 'gs' cannot be found"
-msgstr "spiacente, ma non trovo 'gs'"
-
 msgid "unrecognized format of gs -help"
 msgstr ""
 
 msgid "device '%s' is not available"
 msgstr "device '%s' non disponibile"
 
-msgid "Available devices are %s"
+#, fuzzy
+msgid ""
+"Available devices are:\n"
+"%s"
 msgstr "I dispositivi disponibili sono %s"
 
 msgid "'res' must be specified unless 'units = \"px\"'"
@@ -433,6 +443,9 @@ msgid_plural "%d z values <= 0 omitted from logarithmic plot"
 msgstr[0] "omesso %d valore di x <= 0 dal grafico su scala logaritmica"
 msgstr[1] "omessi %d valori di x <= 0 dal grafico su scala logaritmica"
 
+#~ msgid "sorry, 'gs' cannot be found"
+#~ msgstr "spiacente, ma non trovo 'gs'"
+
 #, fuzzy
 #~ msgid "loading snapshot from pre-3.0.0 R version"
 #~ msgstr "carico snapshot di una versione di R pre-2.0.0"
diff --git a/src/library/grDevices/po/R-ja.po b/src/library/grDevices/po/R-ja.po
index 307fa58..103ebf1 100644
--- a/src/library/grDevices/po/R-ja.po
+++ b/src/library/grDevices/po/R-ja.po
@@ -2,16 +2,17 @@ msgid ""
 msgstr ""
 "Project-Id-Version: R 2.1.0 \n"
 "Report-Msgid-Bugs-To: bugs.r-project.org\n"
-"POT-Creation-Date: 2013-12-18 14:41\n"
-"PO-Revision-Date: 2014-03-24 04:50+0200 \n"
-"Last-Translator: Triad sou  \n"
+"POT-Creation-Date: 2016-04-01 09:50\n"
+"PO-Revision-Date: 2015-03-27 14:17+0900 \n"
+"Last-Translator: Masafumi  \n"
 "Language-Team: RjpWiki Message Translation Team <mokada at md.tsukuba.ac.jp> \n"
 "Language: ja \n"
 "MIME-Version: 1.0 \n"
 "Content-Type: text/plain; charset=UTF-8 \n"
 "Content-Transfer-Encoding: 8bit \n"
 "Plural-Forms: nplurals=1; plural=0; \n"
-"X-Generator: Pootle 2.0.5 \n"
+"X-Generator: Pootle 2.5.1.1 \n"
+"X-POOTLE-MTIME: 1427433420.000000 \n"
 
 msgid "invalid 'filename'"
 msgstr " 不正な 'filename' 引数です "
@@ -31,6 +32,9 @@ msgstr " 適切な 'z' 行列が指定されていません "
 msgid "dimensions of 'x', 'y' and 'z' do not match"
 msgstr " 'x', 'y' および 'z' の次元が適合していません "
 
+msgid "finite coordinates are needed"
+msgstr " 有限の座標が必要です "
+
 msgid "'bias' must be positive"
 msgstr " 'bias' は正の値でなければなりません "
 
@@ -214,15 +218,15 @@ msgstr " フォントエンコーディングがミスマッチです '%s'/'%s'
 msgid "'file' must be a non-empty character string"
 msgstr " 'file' は空でない文字列でなければなりません "
 
-msgid "Invalid output format"
-msgstr " 不正な出力書式です "
+msgid "GhostScript was not found"
+msgstr "GhostScript が見つかりません "
+
+msgid "invalid output format"
+msgstr " 無効な出力書式です "
 
 msgid "status %d in running command '%s'"
 msgstr " 状態 %d が命令 '%s' 実行中に起きました "
 
-msgid "range too small for 'min.n'"
-msgstr " 'min.n' に対して範囲が小さすぎます "
-
 msgid "a raster matrix must be character, or numeric, or logical"
 msgstr " ラスター行列は文字、数値もしくは論理値でなければなりません "
 
@@ -253,9 +257,17 @@ msgstr " 現在、以下のものから記録することが出来るデバイ
 msgid "argument is not of class %s"
 msgstr " 引数はクラス %s ではありません "
 
-msgid "loading snapshot from a different session"
+#, fuzzy
+msgid "snapshot recorded in different R version (pre 3.3.0)"
 msgstr " 異なるセッションからスナップショットが読み込まれています "
 
+#, fuzzy
+msgid "snapshot recorded in different R version (%s)"
+msgstr " 異なるセッションからスナップショットが読み込まれています "
+
+msgid "snapshot contains invalid graphics call"
+msgstr ""
+
 msgid "'nbin' must be numeric of length 1 or 2"
 msgstr " 'nbin' は長さ 1 または 2 の数値でなければなりません "
 
@@ -292,17 +304,18 @@ msgstr " 'x', 'y' そして 'z' の長さが異なります "
 msgid "'file' is missing with no default"
 msgstr " 'file' はデフォルトなしで欠損となっています "
 
-msgid "sorry, 'gs' cannot be found"
-msgstr " すみません,'gs' が見つかりません "
-
 msgid "unrecognized format of gs -help"
 msgstr " gs -help の意味不明な書式です "
 
 msgid "device '%s' is not available"
 msgstr " デバイス '%s' は利用可能ではありません "
 
-msgid "Available devices are %s"
-msgstr " 利用可能なデバイスは %s です "
+msgid ""
+"Available devices are:\n"
+"%s"
+msgstr ""
+" 利用可能なデバイスは以下の通りです: \n"
+" %s "
 
 msgid "'res' must be specified unless 'units = \"px\"'"
 msgstr " 'res' は 'units = \"px\"' で無い限り指定される必要があります "
@@ -393,6 +406,12 @@ msgid "%d z value <= 0 omitted from logarithmic plot"
 msgid_plural "%d z values <= 0 omitted from logarithmic plot"
 msgstr[0] " %d 個の正でない x の値が対数プロットから除かれました "
 
+#~ msgid "range too small for 'min.n'"
+#~ msgstr " 'min.n' に対して範囲が小さすぎます "
+
+#~ msgid "sorry, 'gs' cannot be found"
+#~ msgstr " すみません,'gs' が見つかりません "
+
 #~ msgid "loading snapshot from pre-3.0.0 R version"
 #~ msgstr ""
 #~ " R-3.0.0 以前のバージョンからのスナップショットが読み込まれています "
diff --git a/src/library/grDevices/po/R-ko.po b/src/library/grDevices/po/R-ko.po
index 9d3d7a7..224911a 100644
--- a/src/library/grDevices/po/R-ko.po
+++ b/src/library/grDevices/po/R-ko.po
@@ -1,24 +1,31 @@
 # Korean translation for R grDevices package
-# src/library/grDevices/po/R-ko.po
-# Copyright (C) 1995-2014 The R Core Team
+# ./grDevices/po/R-ko.po
+#
+# Copyright (C) 1995-2016 The R Core Team
+#
 # This file is distributed under the same license as the R grDevices package.
-# Chel Hee Lee <chl948 at mail.usask.ca>, 2008-2014.
+# Maintained by Chel Hee Lee <chl948 at mail.usask.ca>, 2008-2016.
+# Contact: Chel Hee Lee <gnustats at gmail.com>
+#
+# Notes:
+# Under development (unstable) starting from 11-APR-2016 for R-3.3.1 - QC: in progress
+# Freezed on 10-APR-2016 for R-3.3.0 - QC: PASS
+# Freezed on 30-MAR-2015 for R-3.2.0 - QC: PASS
+# Freezed on 06-FEB-2015 for R-3.1.3 - QC: PASS
 #
 msgid ""
 msgstr ""
-"Project-Id-Version: R 3.1.0\n"
+"Project-Id-Version: R-3.3.0\n"
 "Report-Msgid-Bugs-To: bugs.r-project.org\n"
-"POT-Creation-Date: 2013-12-18 14:41\n"
-"PO-Revision-Date: 2014-03-26 20:50-0600\n"
+"POT-Creation-Date: 2016-04-01 09:50\n"
+"PO-Revision-Date: 2016-04-11 13:08-0600\n"
 "Last-Translator: Chel Hee Lee <chl948 at mail.usask.ca>\n"
-"Language-Team:  <chl948 at mail.usask.ca>\n"
+"Language-Team: Chel Hee Lee <chl948 at mail.usask.ca>\n"
 "Language: ko\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
 "Plural-Forms: nplurals=1; plural=0;\n"
-"X-Poedit-SourceCharset: UTF-8\n"
-"X-Generator: Poedit 1.5.4\n"
 
 msgid "invalid 'filename'"
 msgstr "유효하지 않은 'filename'입니다"
@@ -38,6 +45,9 @@ msgstr "적절히 지정된 'z' 행렬이 없습니다"
 msgid "dimensions of 'x', 'y' and 'z' do not match"
 msgstr "'x', 'y' 그리고 'z'의 차원들이 일치하지 않습니다"
 
+msgid "finite coordinates are needed"
+msgstr ""
+
 msgid "'bias' must be positive"
 msgstr "'bias'는 반드시 양수이어야 합니다"
 
@@ -216,15 +226,15 @@ msgstr "폰트 인코딩이 일치하지 않습니다 '%s'/'%s'"
 msgid "'file' must be a non-empty character string"
 msgstr "'file'은 반드시 비어있지 않은 문자열이어야 합니다"
 
-msgid "Invalid output format"
-msgstr "유효하지 않은 출력 포맷입니다"
+msgid "GhostScript was not found"
+msgstr ""
+
+msgid "invalid output format"
+msgstr "올바른 출력형식(output format)이 아닙니다."
 
 msgid "status %d in running command '%s'"
 msgstr "명령어 '%2$s'를 실행하던 중 상태 %1$d가 되었습니다"
 
-msgid "range too small for 'min.n'"
-msgstr "'min.n'에 대한 범위가 너무 작습니다"
-
 msgid "a raster matrix must be character, or numeric, or logical"
 msgstr "래스터 행렬은 반드시 문자, 또는 숫자, 또는 논리값이어야 합니다"
 
@@ -256,8 +266,14 @@ msgstr "다음으로부터 기록을 할 수 있는 장치가 없습니다"
 msgid "argument is not of class %s"
 msgstr "인자는 클래스 %s가 아닙니다"
 
-msgid "loading snapshot from a different session"
-msgstr "다른 세션으로부터 스냅샷을 로딩합니다"
+msgid "snapshot recorded in different R version (pre 3.3.0)"
+msgstr ""
+
+msgid "snapshot recorded in different R version (%s)"
+msgstr ""
+
+msgid "snapshot contains invalid graphics call"
+msgstr ""
 
 msgid "'nbin' must be numeric of length 1 or 2"
 msgstr "'nbin'은 반드시 길이가 1 또는 2인 수치형입니다"
@@ -296,17 +312,18 @@ msgstr "'x', 'y' 그리고 'z'의 길이가 다릅니다"
 msgid "'file' is missing with no default"
 msgstr "'file'은 기본값 없이 누락되었습니다"
 
-msgid "sorry, 'gs' cannot be found"
-msgstr "미안합니다, 'gs'를 찾을 수 없습니다"
-
 msgid "unrecognized format of gs -help"
 msgstr "알수없는 gs 포맷입니다 -help"
 
 msgid "device '%s' is not available"
 msgstr "장치 '%s'를 사용할 수 없습니다"
 
-msgid "Available devices are %s"
-msgstr "사용가능한 장치들은 %s입니다"
+msgid ""
+"Available devices are:\n"
+"%s"
+msgstr ""
+"사용가능한 장치들은 다음과 같습니다:\n"
+"%s"
 
 msgid "'res' must be specified unless 'units = \"px\"'"
 msgstr "만약 'units = \"px\"'이 아니라면 'res'는 반드시 지정되야 합니다"
@@ -402,5 +419,14 @@ msgid "%d z value <= 0 omitted from logarithmic plot"
 msgid_plural "%d z values <= 0 omitted from logarithmic plot"
 msgstr[0] ""
 
+#~ msgid "range too small for 'min.n'"
+#~ msgstr "'min.n'에 대한 범위가 너무 작습니다"
+
+#~ msgid "loading snapshot from a different session"
+#~ msgstr "다른 세션으로부터 스냅샷을 로딩합니다"
+
+#~ msgid "sorry, 'gs' cannot be found"
+#~ msgstr "미안합니다, 'gs'를 찾을 수 없습니다"
+
 #~ msgid "loading snapshot from pre-3.0.0 R version"
 #~ msgstr "pre-3.0.0 R 버전으로부터 스냅샷을 로딩합니다"
diff --git a/src/library/grDevices/po/R-pl.po b/src/library/grDevices/po/R-pl.po
index 73aafb9..1fcef1a 100644
--- a/src/library/grDevices/po/R-pl.po
+++ b/src/library/grDevices/po/R-pl.po
@@ -1,8 +1,8 @@
 msgid ""
 msgstr ""
-"Project-Id-Version: R 3.1.0\n"
+"Project-Id-Version: R 3.4.0\n"
 "Report-Msgid-Bugs-To: bugs.r-project.org\n"
-"POT-Creation-Date: 2013-12-18 14:41\n"
+"POT-Creation-Date: 2016-04-04 08:15\n"
 "PO-Revision-Date: \n"
 "Last-Translator: Łukasz Daniel <lukasz.daniel at gmail.com>\n"
 "Language-Team: Łukasz Daniel <lukasz.daniel at gmail.com>\n"
@@ -13,839 +13,704 @@ msgstr ""
 "na-Revision-Date: 2012-05-29 07:55+0100\n"
 "Plural-Forms: nplurals=3; plural=(n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 "
 "|| n%100>=20) ? 1 : 2);\n"
-"X-Poedit-SourceCharset: iso-8859-1\n"
-"X-Generator: Poedit 1.5.4\n"
-
-# grDevices/R/unix/png.R: 42
-# stop("invalid 'filename'")
-# grDevices/R/unix/png.R: 77
-# stop("invalid 'filename'")
-# grDevices/R/unix/png.R: 109
-# stop("invalid 'filename'")
-# grDevices/R/unix/png.R: 142
-# stop("invalid 'filename'")
-# grDevices/R/cairo.R: 25
-# stop("invalid 'filename'")
-# grDevices/R/cairo.R: 38
-# stop("invalid 'filename'")
-# grDevices/R/cairo.R: 51
-# stop("invalid 'filename'")
-# grDevices/R/windows/cairo.R: 26
-# stop("invalid 'filename'")
-# grDevices/R/windows/cairo.R: 47
-# stop("invalid 'filename'")
-# grDevices/R/windows/cairo.R: 68
-# stop("invalid 'filename'")
-# grDevices/R/windows/cairo.R: 90
-# stop("invalid 'filename'")
-# grDevices/R/windows/png.R: 44
-# stop("invalid 'filename'")
-# grDevices/R/windows/png.R: 82
-# stop("invalid 'filename'")
-# grDevices/R/windows/png.R: 114
-# stop("invalid 'filename'")
-# grDevices/R/windows/png.R: 148
-# stop("invalid 'filename'")
-# grDevices/R/windows/windows.R: 142
-# stop("invalid 'filename'")
-msgid "invalid 'filename'"
-msgstr "niepoprawny argument 'filename'"
-
-# grDevices/R/calc.R: 25
-# stop("'coef' must not be negative")
-msgid "'coef' must not be negative"
-msgstr "wartość 'coef' musi być nieujemna"
-
-# grDevices/R/calc.R: 63
-# stop("no 'z' matrix specified")
-msgid "no 'z' matrix specified"
-msgstr "brak określonej macierzy 'z'"
+"X-Poedit-SourceCharset: UTF-8\n"
+"X-Generator: Poedit 1.8.7\n"
 
-# grDevices/R/calc.R: 69
-# stop("increasing 'x' and 'y' values expected")
-msgid "increasing 'x' and 'y' values expected"
-msgstr "oczekiwano rosnących wartości 'x' oraz 'y'"
+#. R/colorRamp.R: stop("'alpha' must be false if 'space' is specified")
+#: R/colorRamp.R:0
+msgid "'alpha' must be false if 'space' is specified"
+msgstr ""
+"argument 'alpha' musi mieć wartość FALSE, jeśli określono argument 'space'"
 
-# grDevices/R/calc.R: 71
-# stop("no proper 'z' matrix specified")
-msgid "no proper 'z' matrix specified"
-msgstr "nie określono odpowiedniej macierzy 'z'"
+#. R/smooth2d.R: stop("'bandwidth' must be numeric")
+#: R/smooth2d.R:0
+msgid "'bandwidth' must be numeric"
+msgstr "wartość 'bandwidth' musi być liczbą"
 
-# grDevices/R/calc.R: 73
-# stop("dimensions of 'x', 'y' and 'z' do not match")
-msgid "dimensions of 'x', 'y' and 'z' do not match"
-msgstr "wymiary 'x', 'y' oraz 'z' nie zgadzają się"
+#. R/smooth2d.R: stop("'bandwidth' must be positive")
+#: R/smooth2d.R:0
+msgid "'bandwidth' must be positive"
+msgstr "argument 'bandwidth' musi być dodatni"
 
-# grDevices/R/colorRamp.R: 35
-# stop("'bias' must be positive")
+#. R/colorRamp.R: stop("'bias' must be positive")
+#: R/colorRamp.R:0
 msgid "'bias' must be positive"
 msgstr "argument 'bias' musi być dodatni"
 
-# grDevices/R/colorRamp.R: 37
-# stop("'alpha' must be false if 'space' is specified")
-msgid "'alpha' must be false if 'space' is specified"
-msgstr ""
-"argument 'alpha' musi mieć wartość FALSE, jeśli określono argument 'space'"
+#. R/calc.R: stop("'coef' must not be negative")
+#: R/calc.R:0
+msgid "'coef' must not be negative"
+msgstr "wartość 'coef' musi być nieujemna"
 
-# grDevices/R/colorstuff.R: 43
-# stop("at least 3 columns needed")
-msgid "at least 3 columns needed"
-msgstr "przynajmniej 3 kolumny są potrzebne"
+#. R/device.R: stop("'device' should be a function")
+#: R/device.R:0
+msgid "'device' should be a function"
+msgstr "'device' powinno być funkcją"
 
-# grDevices/man/rgb2hsv.Rd: 66
-# stop("rgb matrix must be numeric")
-# grDevices/R/colorstuff.R: 62
-# stop("rgb matrix must be numeric")
-msgid "rgb matrix must be numeric"
-msgstr "macierz RGB musi być liczbowa"
+#. R/raster.R: warning("'drop' is always implicitly FALSE in '[.raster'")
+#: R/raster.R:0
+msgid "'drop' is always implicitly FALSE in '[.raster'"
+msgstr "'drop' jest zawsze rozumiany jako FALSE w '[.raster'"
 
-# grDevices/man/rgb2hsv.Rd: 68
-# stop("rgb matrix must have 3 rows")
-# grDevices/R/colorstuff.R: 64
-# stop("rgb matrix must have 3 rows")
-msgid "rgb matrix must have 3 rows"
-msgstr "macierz RGB musi mieć 3 wiersze"
+#. R/unix/dev2bitmap.R: stop("'file' is missing with no default")
+#. R/unix/dev2bitmap.R: stop("'file' is missing with no default")
+#. R/windows/dev2bitmap.R: stop("'file' is missing with no default")
+#. R/windows/dev2bitmap.R: stop("'file' is missing with no default")
+#: R/unix/dev2bitmap.R:0 R/windows/dev2bitmap.R:0
+msgid "'file' is missing with no default"
+msgstr "brakuje argumentu 'file', a brak zdefiniowanej wartości domyślnej"
 
-# grDevices/R/colorstuff.R: 70
-# stop("rgb values must be in [0, maxColorValue]")
-msgid "rgb values must be in [0, maxColorValue]"
-msgstr "argumenty 'r', 'g' oraz 'b' muszą być w przedziale [0, maxColorValue]"
+#. R/postscript.R: stop("'file' must be a non-empty character string")
+#. R/unix/dev2bitmap.R: stop("'file' must be a non-empty character string")
+#. R/unix/dev2bitmap.R: stop("'file' must be a non-empty character string")
+#. R/windows/dev2bitmap.R: stop("'file' must be a non-empty character string")
+#. R/windows/dev2bitmap.R: stop("'file' must be a non-empty character string")
+#: R/postscript.R:0 R/unix/dev2bitmap.R:0 R/windows/dev2bitmap.R:0
+msgid "'file' must be a non-empty character string"
+msgstr "argument 'file' musi być niepustym łańcuchem tekstowym"
 
-# grDevices/R/colorstuff.R: 95
-# stop("'start' and 'end' must be distinct and in [0, 1].")
-msgid "'start' and 'end' must be distinct and in [0, 1]."
+#. R/convertColor.R: stop("'from' must be a \"colorConverter\" object or a string")
+#: R/convertColor.R:0
+msgid "'from' must be a \"colorConverter\" object or a string"
 msgstr ""
-"wartości 'start' oraz 'end' muszą być różne oraz zawierać się w przedziale "
-"[0, 1]."
+"argument 'from' musi być obiektem klasy \"colorConverter\" lub łańcuchem "
+"tekstowym"
+
+#. R/convertColor.R: gettextf("'from.ref.white' disagrees with definition of %s",     from$name)
+#: R/convertColor.R:0
+msgid "'from.ref.white' disagrees with definition of %s"
+msgstr "'from.ref.white' nie zgadza się z definicją %s"
 
-# grDevices/R/convertColor.R: 57
-# stop("'gamma' must be a scalar or 'sRGB'")
+#. R/convertColor.R: stop("'gamma' must be a scalar or 'sRGB'")
+#: R/convertColor.R:0
 msgid "'gamma' must be a scalar or 'sRGB'"
 msgstr "argument 'gamma' musi być liczbą lub wartością 'sRGB'"
 
-# grDevices/R/convertColor.R: 70
-# gettextf("Color space converter: %s", x$name)
-msgid "Color space converter: %s"
-msgstr "Konwerter przestrzeni kolorów: %s"
+#. R/device.R: stop("'name' must be a character vector")
+#: R/device.R:0
+msgid "'name' must be a character vector"
+msgstr "argument 'name' musi być wektorem tekstowym"
 
-# grDevices/R/convertColor.R: 72
-# gettextf("Reference white: %s", x$reference.white)
-msgid "Reference white: %s"
-msgstr "Referencyjna biel: %s"
+#. R/postscript.R: stop("'name.opt' must be character, name of an existing list")
+#: R/postscript.R:0
+msgid "'name.opt' must be character, name of an existing list"
+msgstr "argument 'name.opt' musi być tekstem, nazwą istniejącej listy"
 
-# grDevices/R/convertColor.R: 79
-# gettextf("display gamma = %s", format(x$gamma))
-msgid "display gamma = %s"
-msgstr "wyświetl gamma = %s"
+#. R/smooth2d.R: stop("'nbin' must be numeric of length 1 or 2")
+#: R/smooth2d.R:0
+msgid "'nbin' must be numeric of length 1 or 2"
+msgstr "argument 'nbin' musi być liczbą o długości 1 lub 2"
 
-# grDevices/R/convertColor.R: 216
-# stop("'from' must be a \"colorConverter\" object or a string")
-msgid "'from' must be a \"colorConverter\" object or a string"
+#. R/utils.R: stop("'r' must be a \"range\", hence of length 2")
+#: R/utils.R:0
+msgid "'r' must be a \"range\", hence of length 2"
+msgstr "'r' musi być wynikiem funkcji 'range()', a więc o długości 2"
+
+#. R/unix/png.R: stop("'res' must be specified unless 'units = \"px\"'")
+#. R/windows/png.R: stop("'res' must be specified unless 'units = \"px\"'")
+#: R/unix/png.R:0 R/windows/png.R:0
+msgid "'res' must be specified unless 'units = \"px\"'"
+msgstr "wartość 'res' musi być określona chyba, że 'units = \"px\"'"
+
+#. R/colorstuff.R: stop("'start' and 'end' must be distinct and in [0, 1].")
+#: R/colorstuff.R:0
+msgid "'start' and 'end' must be distinct and in [0, 1]."
 msgstr ""
-"argument 'from' musi być obiektem klasy \"colorConverter\" lub łańcuchem "
-"tekstowym"
+"wartości 'start' oraz 'end' muszą być różne oraz zawierać się w przedziale "
+"[0, 1]."
 
-# grDevices/R/convertColor.R: 220
-# stop("'to' must be a \"colorConverter\" object or a string")
+#. R/convertColor.R: stop("'to' must be a \"colorConverter\" object or a string")
+#: R/convertColor.R:0
 msgid "'to' must be a \"colorConverter\" object or a string"
 msgstr "'to' musi być obiektem klasy \"colorConverter\" lub łańcuchem"
 
-# grDevices/R/convertColor.R: 228
-# stop(gettextf("'from.ref.white' disagrees with definition of %s",
-#                     from$name), domain = NA)
-msgid "'from.ref.white' disagrees with definition of %s"
-msgstr "'from.ref.white' nie zgadza się z definicją %s"
-
-# grDevices/R/convertColor.R: 234
-# stop(gettextf("'to.ref.white' disagrees with definition of %s",
-#                     to$name), domain = NA)
+#. R/convertColor.R: gettextf("'to.ref.white' disagrees with definition of %s", to$name)
+#: R/convertColor.R:0
 msgid "'to.ref.white' disagrees with definition of %s"
 msgstr "'to.ref.white' nie zgadza się z definicją %s"
 
-# grDevices/R/convertColor.R: 273
-# warning("color spaces use different reference whites")
-msgid "color spaces use different reference whites"
-msgstr "przestrzenie kolorów używają różnych referencyjnych bieli"
+#. R/windows/windows.R: stop("'type' not applicable to the R console")
+#: R/windows/windows.R:0
+msgid "'type' not applicable to the R console"
+msgstr "'type' nie ma zastosowania w konsoli R"
 
-# grDevices/R/device.R: 40
-# stop("'name' must be a character vector")
-msgid "'name' must be a character vector"
-msgstr "argument 'name' musi być wektorem tekstowym"
+#. R/xyz.coords.R: stop("'x' and 'y' lengths differ")
+#: R/xyz.coords.R:0
+msgid "'x' and 'y' lengths differ"
+msgstr "długości zmiennych 'x' oraz 'y' różnią się"
 
-# grDevices/R/device.R: 100
-# stop("cannot shut down device 1 (the null device)")
-msgid "cannot shut down device 1 (the null device)"
-msgstr "nie można zamknąć urządzenia 1 (urządzenie 'null')"
+#. R/xyz.coords.R: stop("'x' is a list, but does not have components 'x' and 'y'")
+#: R/xyz.coords.R:0
+msgid "'x' is a list, but does not have components 'x' and 'y'"
+msgstr "obiekt 'x' jest listą, ale nie zawiera komponentów 'x' oraz 'y'"
 
-# grDevices/R/device.R: 108
-# stop("cannot supply 'which' and 'device' at the same time")
-msgid "cannot supply 'which' and 'device' at the same time"
-msgstr "nie można dostarczyć 'which' oraz 'device' w tym samym czasie"
+#. R/xyz.coords.R: stop("'x' is a list, but does not have components 'x', 'y'  and 'z'")
+#: R/xyz.coords.R:0
+msgid "'x' is a list, but does not have components 'x', 'y'  and 'z'"
+msgstr "obiekt 'x' jest listą, ale nie zawiera komponentów 'x', 'y' oraz 'z'"
 
-# grDevices/R/device.R: 111
-# stop("cannot copy from the null device")
-msgid "cannot copy from the null device"
-msgstr "nie można kopiować z urządzenia 'null'"
+#. R/xyz.coords.R: stop("'x', 'y' and 'z' lengths differ")
+#: R/xyz.coords.R:0
+msgid "'x', 'y' and 'z' lengths differ"
+msgstr "długości zmiennych 'x', 'y' oraz 'z' różnią się"
 
-# grDevices/R/device.R: 114
-# stop("cannot copy to the null device")
-msgid "cannot copy to the null device"
-msgstr "nie można kopiować do urządzenia 'null'"
+#. R/unix/dev2bitmap.R: gettextf("Available devices are:\n%s", paste(gsdevs, collapse = "\n"))
+#. R/windows/dev2bitmap.R: gettextf("Available devices are:\n%s", paste(gsdevs, collapse = "\n"))
+#: R/unix/dev2bitmap.R:0 R/windows/dev2bitmap.R:0
+msgid ""
+"Available devices are:\n"
+"%s"
+msgstr ""
+"Dostępne urządzenia to:\n"
+"%s"
 
-# grDevices/R/device.R: 116
-# stop("cannot copy device to itself")
-msgid "cannot copy device to itself"
-msgstr "nie można kopiować urządzenia na siebie samego"
+#. R/convertColor.R: gettextf("Color space converter: %s", x$name)
+#: R/convertColor.R:0
+msgid "Color space converter: %s"
+msgstr "Konwerter przestrzeni kolorów: %s"
 
-# grDevices/R/device.R: 121
-# stop("'device' should be a function")
-msgid "'device' should be a function"
-msgstr "'device' powinno być funkcją"
+#. R/postscript.R: stop("GhostScript was not found")
+#. R/unix/dev2bitmap.R: stop("GhostScript was not found")
+#. R/unix/dev2bitmap.R: stop("GhostScript was not found")
+#. R/windows/dev2bitmap.R: stop("GhostScript was not found")
+#. R/windows/dev2bitmap.R: stop("GhostScript was not found")
+#: R/postscript.R:0 R/unix/dev2bitmap.R:0 R/windows/dev2bitmap.R:0
+msgid "GhostScript was not found"
+msgstr "program 'GhostScript' nie został znaleziony"
+
+#. R/postscript.R: stop("Invalid font database name")
+#: R/postscript.R:0
+msgid "Invalid font database name"
+msgstr "Niepoprawna nazwa bazy danych czcionek"
 
-# grDevices/R/unix/quartz.R: 165
-# stop("no device to print from")
-# grDevices/R/device.R: 135
-# stop("no device to print from")
-# grDevices/R/device.R: 195
-# stop("no device to print from")
-# grDevices/R/device.R: 221
-# stop("no device to print from")
-msgid "no device to print from"
-msgstr "brak urządzenia z którego można drukować"
+#. R/postscript.R: stop("Invalid font type")
+#: R/postscript.R:0
+msgid "Invalid font type"
+msgstr "Niepoprawny typ czcionki"
 
-# grDevices/R/unix/quartz.R: 166
-# stop("can only print from a screen device")
-# grDevices/R/device.R: 137
-# stop("can only print from a screen device")
-# grDevices/R/device.R: 197
-# stop("can only print from a screen device")
-# grDevices/R/device.R: 223
-# stop("can only print from a screen device")
-msgid "can only print from a screen device"
-msgstr "można drukować jedynie z ekranu urządzenia"
+#. R/postscript.R: gettextf("NOT changing %s", paste(sQuote(names(prev[do.keep])),     collapse = " & "))
+#: R/postscript.R:0
+msgid "NOT changing %s"
+msgstr "NIE zmienianie %s"
 
-# grDevices/R/device.R: 180
-# warning("need to specify one of 'width' and 'height'")
-msgid "need to specify one of 'width' and 'height'"
-msgstr "potrzeba określić jeden z 'width' oraz 'height'"
+#. R/postscript.R: stop("Not a CID font")
+#: R/postscript.R:0
+msgid "Not a CID font"
+msgstr "To nie jest czcionka CID"
 
-# grDevices/R/device.R: 254
-# stop("dev.control() called without an open graphics device")
-msgid "dev.control() called without an open graphics device"
-msgstr "funkcja 'dev.control()' wywołana bez otwartego urządzenia graficznego"
+#. R/convertColor.R: gettextf("Reference white: %s", x$reference.white)
+#: R/convertColor.R:0
+msgid "Reference white: %s"
+msgstr "Referencyjna biel: %s"
+
+#. R/raster.R: stop("a raster array must be numeric")
+#: R/raster.R:0
+msgid "a raster array must be numeric"
+msgstr "tablica rastrowa musi być liczbowa"
+
+#. R/raster.R: stop("a raster array must have exactly 3 dimensions")
+#: R/raster.R:0
+msgid "a raster array must have exactly 3 dimensions"
+msgstr "tablica rastrowa musi mieć dokładnie 3 wymiary"
+
+#. R/raster.R: stop("a raster array must have exactly 3 or 4 planes")
+#: R/raster.R:0
+msgid "a raster array must have exactly 3 or 4 planes"
+msgstr "tablica rastrowa musi mieć dokładnie 3 lub 4 płaszczyzny"
+
+#. R/raster.R: stop("a raster matrix must be character, or numeric, or logical")
+#: R/raster.R:0
+msgid "a raster matrix must be character, or numeric, or logical"
+msgstr ""
+"macierz rastrowa musi być tekstem lub liczbą lub być wartością logiczną"
 
-# grDevices/R/device.R: 258
-# stop("argument is missing with no default")
+#. R/postscript.R: warning("argument 'append' is for back-compatibility and will be ignored",     immediate. = TRUE)
+#: R/postscript.R:0
+msgid "argument 'append' is for back-compatibility and will be ignored"
+msgstr ""
+"argument 'append' jest dla zapewnienia wstecznej kompatybilności i będzie "
+"zignorowany"
+
+#. R/device.R: stop("argument is missing with no default")
+#: R/device.R:0
 msgid "argument is missing with no default"
 msgstr "brakuje argumentu, a brak zdefiniowanej dla niego wartości domyślnej"
 
-# grDevices/R/device.R: 265
-# stop("dev.displaylist() called without an open graphics device")
-msgid "dev.displaylist() called without an open graphics device"
+#. R/recordplot.R: gettextf("argument is not of class %s", dQuote("recordedplot"))
+#: R/recordplot.R:0
+msgid "argument is not of class %s"
+msgstr "argument nie jest obiektem klasy %s"
+
+#. R/xyz.coords.R: stop("at least 2 columns needed")
+#: R/xyz.coords.R:0
+msgid "at least 2 columns needed"
+msgstr "przynajmniej 2 kolumny są potrzebne"
+
+#. R/colorstuff.R: stop("at least 3 columns needed")
+#: R/colorstuff.R:0
+msgid "at least 3 columns needed"
+msgstr "przynajmniej 3 kolumny są potrzebne"
+
+#. R/unix/x11.R: warning("cairo-based types are not supported on this build - using \"Xlib\"")
+#: R/unix/x11.R:0
+msgid "cairo-based types are not supported on this build - using \"Xlib\""
 msgstr ""
-"funkcja 'dev.displaylist()' wywołana bez otwartego urządzenia graficznego"
+"czcionki oparte o cairo nie są wspierane w tej kompilacji - używanie \"Xlib\""
 
-# grDevices/R/device.R: 283
-# stop("invalid setting for 'getOption(\"device\")'")
-msgid "invalid setting for 'getOption(\"device\")'"
-msgstr "niepoprawne ustawienie dla 'getOption(\"device\")'"
+#. R/windows/windows.R: stop("can only bring windows devices to the front")
+#: R/windows/windows.R:0
+msgid "can only bring windows devices to the front"
+msgstr "można jedynie przywołać urządzenia okien na wierzch"
 
-# grDevices/R/device.R: 292
-# stop(gettextf("device '%s' not found", dev), domain=NA)
-msgid "device '%s' not found"
-msgstr "urządzenie '%s' nie zostało znalezione"
+#. R/unix/x11.R: stop("can only copy from 'X11(type=\"*cairo\")' devices")
+#: R/unix/x11.R:0
+msgid "can only copy from 'X11(type=\"*cairo\")' devices"
+msgstr "można kopiować jedynie z urządzeń 'X11(type=\"*cairo\")'"
 
-# grDevices/R/device.R: 302
-# stop("no suitable unused file name for pdf()")
-msgid "no suitable unused file name for pdf()"
-msgstr "brak odpowiedniej nieużywanej nazwy pliku dla 'pdf()'"
+#. R/windows/windows.R: stop("can only copy from 'windows' devices")
+#: R/windows/windows.R:0
+msgid "can only copy from 'windows' devices"
+msgstr "można kopiować jedynie z urządzeń 'windows'"
 
-# grDevices/R/device.R: 303
-# message(gettextf("dev.new(): using pdf(file=\"%s\")", tmp[!fe][1L]),
-#                     domain=NA)
-msgid "dev.new(): using pdf(file=\"%s\")"
-msgstr "dev.new(): używanie 'pdf(file=\"%s\")'"
+#. R/windows/windows.R: stop("can only manipulate windows devices")
+#: R/windows/windows.R:0
+msgid "can only manipulate windows devices"
+msgstr "można działać tylko z urządzeniami 'windows'"
 
-# grDevices/R/device.R: 311
-# stop("no suitable unused file name for postscript()")
-msgid "no suitable unused file name for postscript()"
-msgstr "brak odpowiedniej nieużywanej nazwy pliku dla 'postscript()'"
+#. R/device.R: stop("can only print from a screen device")
+#. R/device.R: stop("can only print from a screen device")
+#. R/device.R: stop("can only print from a screen device")
+#. R/unix/quartz.R: stop("can only print from a screen device")
+#: R/device.R:0 R/unix/quartz.R:0
+msgid "can only print from a screen device"
+msgstr "można drukować jedynie z ekranu urządzenia"
 
-# grDevices/R/device.R: 312
-# message(gettextf("dev.new(): using postscript(file=\"%s\")",
-#                              tmp[!fe][1L]), domain=NA)
-msgid "dev.new(): using postscript(file=\"%s\")"
-msgstr "dev.new(): używanie 'postscript(file=\"%s\")'"
+#. R/device.R: stop("cannot copy device to itself")
+#: R/device.R:0
+msgid "cannot copy device to itself"
+msgstr "nie można kopiować urządzenia na siebie samego"
 
-# grDevices/R/postscript.R: 31
-# stop(gettextf("invalid arguments in '%s' (need named args)",
-#                       deparse(sys.call(sys.parent()))), domain = NA)
-# grDevices/R/postscript.R: 543
-# stop(gettextf("invalid arguments in '%s' (need named args)",
-#                               "postscriptFonts"), domain = NA)
-# grDevices/R/postscript.R: 597
-# stop(gettextf("invalid arguments in '%s' (need named args)",
-#                               "pdfFonts"), domain = NA)
-msgid "invalid arguments in '%s' (need named args)"
-msgstr "niepoprawne argumenty w '%s' (potrzebne są nazwane argumenty)"
+#. R/device.R: stop("cannot copy from the null device")
+#: R/device.R:0
+msgid "cannot copy from the null device"
+msgstr "nie można kopiować z urządzenia 'null'"
 
-# grDevices/R/postscript.R: 34
-# stop("'name.opt' must be character, name of an existing list")
-msgid "'name.opt' must be character, name of an existing list"
-msgstr "argument 'name.opt' musi być tekstem, nazwą istniejącej listy"
+#. R/device.R: stop("cannot copy to the null device")
+#: R/device.R:0
+msgid "cannot copy to the null device"
+msgstr "nie można kopiować do urządzenia 'null'"
 
-# grDevices/R/postscript.R: 40
-# stop(gettextf("cannot reset non-existent '%s'", name.opt),
-#                     domain = NA)
+#. R/postscript.R: gettextf("cannot reset non-existent '%s'", name.opt)
+#: R/postscript.R:0
 msgid "cannot reset non-existent '%s'"
 msgstr "nie można zresetować nieistniejące '%s'"
 
-# grDevices/R/postscript.R: 45
-# stop(gettextf("invalid options in '%s'", name.opt), domain = NA)
-msgid "invalid options in '%s'"
-msgstr "niepoprawne opcje w '%s'"
+#. R/device.R: stop("cannot shut down device 1 (the null device)")
+#: R/device.R:0
+msgid "cannot shut down device 1 (the null device)"
+msgstr "nie można zamknąć urządzenia 1 (urządzenie 'null')"
 
-# grDevices/R/postscript.R: 68
-# warning(paste(sQuote(paste0(fn, "(", names(prev[ii]), ")" )),
-#                                   collapse = " and "), " ",
-#                             ngettext(as.integer(sum(ii)),
-#                                      "differs between new and previous",
-#                                      "differ between new and previous"),
-#                             if(any(do.keep)) {
-#                                 paste("\n\t ==> ",
-#                                       gettextf("NOT changing %s",
-#                                               paste(sQuote(names(prev[do.keep])),
-#                                                     collapse=" & ")),
-#                                       sep = "")} else "",
-#                             domain = NA, call. = FALSE)
-msgid "NOT changing %s"
-msgstr "NIE zmienianie %s"
+#. R/device.R: stop("cannot supply 'which' and 'device' at the same time")
+#: R/device.R:0
+msgid "cannot supply 'which' and 'device' at the same time"
+msgstr "nie można dostarczyć 'which' oraz 'device' w tym samym czasie"
 
-# grDevices/R/postscript.R: 105
-# warning("argument 'append' is for back-compatibility and will be ignored",
-#                 immediate. = TRUE)
-msgid "argument 'append' is for back-compatibility and will be ignored"
+#. R/convertColor.R: warning("color spaces use different reference whites")
+#: R/convertColor.R:0
+msgid "color spaces use different reference whites"
+msgstr "przestrzenie kolorów używają różnych referencyjnych bieli"
+
+#. R/device.R: stop("dev.control() called without an open graphics device")
+#: R/device.R:0
+msgid "dev.control() called without an open graphics device"
+msgstr "funkcja 'dev.control()' wywołana bez otwartego urządzenia graficznego"
+
+#. R/device.R: stop("dev.displaylist() called without an open graphics device")
+#: R/device.R:0
+msgid "dev.displaylist() called without an open graphics device"
 msgstr ""
-"argument 'append' jest dla zapewnienia wstecznej kompatybilności i będzie "
-"zignorowany"
+"funkcja 'dev.displaylist()' wywołana bez otwartego urządzenia graficznego"
 
-# grDevices/R/postscript.R: 255
-# stop(gettextf("unknown family '%s'", family), domain = NA)
-# grDevices/R/postscript.R: 350
-# stop(gettextf("unknown family '%s'", family), domain = NA)
-msgid "unknown family '%s'"
-msgstr "nieznana rodzina '%s'"
+#. R/device.R: gettextf("dev.new(): using pdf(file=\"%s\")", tmp[!fe][1L])
+#: R/device.R:0
+msgid "dev.new(): using pdf(file=\"%s\")"
+msgstr "dev.new(): używanie 'pdf(file=\"%s\")'"
 
-# grDevices/R/postscript.R: 258
-# stop("invalid 'family' argument")
-# grDevices/R/postscript.R: 353
-# stop("invalid 'family' argument")
-msgid "invalid 'family' argument"
-msgstr "niepoprawny argument 'family'"
+#. R/device.R: gettextf("dev.new(): using postscript(file=\"%s\")", tmp[!fe][1L])
+#: R/device.R:0
+msgid "dev.new(): using postscript(file=\"%s\")"
+msgstr "dev.new(): używanie 'postscript(file=\"%s\")'"
 
-# grDevices/R/postscript.R: 264
-# stop(gettextf("invalid 'file' argument '%s'", file), domain = NA)
-# grDevices/R/postscript.R: 287
-# stop(gettextf("invalid 'file' argument '%s'", file), domain = NA)
-# grDevices/R/postscript.R: 366
-# stop(gettextf("invalid 'file' argument '%s'", file), domain = NA)
-msgid "invalid 'file' argument '%s'"
-msgstr "niepoprawny argument 'file' '%s'"
+#. R/unix/dev2bitmap.R: gettextf("device '%s' is not available\n", type)
+#. R/windows/dev2bitmap.R: gettextf("device '%s' is not available\n", type)
+#: R/unix/dev2bitmap.R:0 R/windows/dev2bitmap.R:0
+msgid "device '%s' is not available"
+msgstr "urządzenie '%s' nie jest dostępne"
 
-# grDevices/R/postscript.R: 362
-# stop("invalid PDF version")
-msgid "invalid PDF version"
-msgstr "niepoprawna wersja PDF"
+#. R/device.R: gettextf("device '%s' not found", dev)
+#: R/device.R:0
+msgid "device '%s' not found"
+msgstr "urządzenie '%s' nie zostało znalezione"
 
-# grDevices/R/postscript.R: 432
-# stop("Invalid font type")
-msgid "Invalid font type"
-msgstr "Niepoprawny typ czcionki"
+#. R/calc.R: stop("dimensions of 'x', 'y' and 'z' do not match")
+#: R/calc.R:0
+msgid "dimensions of 'x', 'y' and 'z' do not match"
+msgstr "wymiary 'x', 'y' oraz 'z' nie zgadzają się"
 
-# grDevices/R/postscript.R: 441
-# stop("invalid family name in font specification")
-# grDevices/R/postscript.R: 461
-# stop("invalid family name in font specification")
-msgid "invalid family name in font specification"
-msgstr "niepoprawna rodzina czcionki w specyfikacji czcionki"
+#. R/convertColor.R: gettextf("display gamma = %s", format(x$gamma))
+#: R/convertColor.R:0
+msgid "display gamma = %s"
+msgstr "wyświetl gamma = %s"
 
-# grDevices/R/postscript.R: 444
-# stop("invalid metric information in font specification")
-# grDevices/R/postscript.R: 464
-# stop("invalid metric information in font specification")
-msgid "invalid metric information in font specification"
-msgstr "niepoprawna informacja metryczna w specyfikacji czcionki"
+#. R/calc.R: stop("finite coordinates are needed")
+#: R/calc.R:0
+msgid "finite coordinates are needed"
+msgstr "wymagane są skończone współrzędne"
 
-# grDevices/R/postscript.R: 449
-# stop("invalid encoding in font specification")
-msgid "invalid encoding in font specification"
-msgstr "niepoprawna strona kodowa w specyfikacji czcionki"
+#. R/postscript.R: gettextf("font %s already in use", i)
+#: R/postscript.R:0
+msgid "font %s already in use"
+msgstr "czcionka '%s' jest już w użyciu"
 
-# grDevices/R/postscript.R: 459
-# stop("Not a CID font")
-msgid "Not a CID font"
-msgstr "To nie jest czcionka CID"
+#. R/postscript.R: gettextf("font encoding mismatch '%s'/'%s'", font$encoding, encoding)
+#: R/postscript.R:0
+msgid "font encoding mismatch '%s'/'%s'"
+msgstr "niezgodność strony kodowej czcionki '%s'/'%s'"
 
-# grDevices/R/postscript.R: 469
-# stop("invalid CMap name in font specification")
-msgid "invalid CMap name in font specification"
-msgstr "niepoprawna nazwa 'CMap' w specyfikacji czcionki"
+#. R/calc.R: stop("increasing 'x' and 'y' values expected")
+#: R/calc.R:0
+msgid "increasing 'x' and 'y' values expected"
+msgstr "oczekiwano rosnących wartości 'x' oraz 'y'"
 
-# grDevices/R/postscript.R: 471
-# stop("invalid 'cmapEncoding' in font specification")
+#. R/postscript.R: stop("invalid 'cmapEncoding' in font specification")
+#: R/postscript.R:0
 msgid "invalid 'cmapEncoding' in font specification"
 msgstr "niepoprawne 'cmapEncoding' w specyfikacji czcionki"
 
-# grDevices/R/postscript.R: 473
-# stop("invalid PDF resource in font specification")
-msgid "invalid PDF resource in font specification"
-msgstr "niepoprawne źródło PDF w specyfikacji czcionki"
-
-# grDevices/R/postscript.R: 481
-# stop("Invalid font database name")
-msgid "Invalid font database name"
-msgstr "Niepoprawna nazwa bazy danych czcionek"
+#. R/postscript.R: stop("invalid 'family' argument")
+#. R/postscript.R: stop("invalid 'family' argument")
+#: R/postscript.R:0
+msgid "invalid 'family' argument"
+msgstr "niepoprawny argument 'family'"
 
-# grDevices/R/postscript.R: 488
-# stop(gettextf("font %s already in use", i), domain = NA)
-msgid "font %s already in use"
-msgstr "czcionka '%s' jest już w użyciu"
+#. R/unix/quartz.R: stop("invalid 'file'")
+#: R/unix/quartz.R:0
+msgid "invalid 'file'"
+msgstr "niepoprawny argument 'file'"
 
-# grDevices/R/postscript.R: 537
-# stop(gettextf("invalid arguments in '%s' (must be font names)",
-#                               "postscriptFonts"), domain = NA)
-# grDevices/R/postscript.R: 591
-# stop(gettextf("invalid arguments in '%s' (must be font names)",
-#                               "pdfFonts"), domain = NA)
-msgid "invalid arguments in '%s' (must be font names)"
-msgstr "niepoprawne argumenty w '%s' (muszą być nazwy czcionek)"
+#. R/postscript.R: gettextf("invalid 'file' argument '%s'", file)
+#. R/postscript.R: gettextf("invalid 'file' argument '%s'", file)
+#. R/postscript.R: gettextf("invalid 'file' argument '%s'", file)
+#: R/postscript.R:0
+msgid "invalid 'file' argument '%s'"
+msgstr "niepoprawny argument 'file' '%s'"
 
-# grDevices/R/postscript.R: 620
-# stop("unknown font")
-msgid "unknown font"
-msgstr "nieznana czcionka"
+#. R/cairo.R: stop("invalid 'filename'")
+#. R/cairo.R: stop("invalid 'filename'")
+#. R/cairo.R: stop("invalid 'filename'")
+#. R/unix/png.R: stop("invalid 'filename'")
+#. R/unix/png.R: stop("invalid 'filename'")
+#. R/unix/png.R: stop("invalid 'filename'")
+#. R/unix/png.R: stop("invalid 'filename'")
+#. R/windows/png.R: stop("invalid 'filename'")
+#. R/windows/png.R: stop("invalid 'filename'")
+#. R/windows/png.R: stop("invalid 'filename'")
+#. R/windows/png.R: stop("invalid 'filename'")
+#. R/windows/windows.R: stop("invalid 'filename'")
+#: R/cairo.R:0 R/unix/png.R:0 R/windows/png.R:0 R/windows/windows.R:0
+msgid "invalid 'filename'"
+msgstr "niepoprawny argument 'filename'"
 
-# grDevices/R/postscript.R: 622
-# stop(gettextf("font encoding mismatch '%s'/'%s'",
-#                       font$encoding, encoding), domain=NA)
-msgid "font encoding mismatch '%s'/'%s'"
-msgstr "niezgodność strony kodowej czcionki '%s'/'%s'"
+#. R/unix/quartz.R: stop("invalid 'title'")
+#. R/unix/x11.R: stop("invalid 'title'")
+#: R/unix/quartz.R:0 R/unix/x11.R:0
+msgid "invalid 'title'"
+msgstr "niepoprawny argument 'title'"
 
-# grDevices/R/unix/dev2bitmap.R: 25
-# stop("'file' must be a non-empty character string")
-# grDevices/R/unix/dev2bitmap.R: 87
-# stop("'file' must be a non-empty character string")
-# grDevices/R/postscript.R: 959
-# stop("'file' must be a non-empty character string")
-# grDevices/R/windows/dev2bitmap.R: 25
-# stop("'file' must be a non-empty character string")
-# grDevices/R/windows/dev2bitmap.R: 89
-# stop("'file' must be a non-empty character string")
-msgid "'file' must be a non-empty character string"
-msgstr "argument 'file' musi być niepustym łańcuchem tekstowym"
+#. R/postscript.R: stop("invalid CMap name in font specification")
+#: R/postscript.R:0
+msgid "invalid CMap name in font specification"
+msgstr "niepoprawna nazwa 'CMap' w specyfikacji czcionki"
 
-# grDevices/R/postscript.R: 968
-# stop("Invalid output format")
-msgid "Invalid output format"
-msgstr "niepoprawny format wyjściowy"
+#. R/postscript.R: stop("invalid PDF resource in font specification")
+#: R/postscript.R:0
+msgid "invalid PDF resource in font specification"
+msgstr "niepoprawne źródło PDF w specyfikacji czcionki"
 
-# grDevices/R/postscript.R: 994
-# stop(gettextf("status %d in running command '%s'", ret, cmd),
-#              domain = NA)
-msgid "status %d in running command '%s'"
-msgstr "status '%d' w działającym poleceniu '%s'"
+#. R/postscript.R: stop("invalid PDF version")
+#: R/postscript.R:0
+msgid "invalid PDF version"
+msgstr "niepoprawna wersja PDF"
 
-# grDevices/R/prettyDate.R: 118
-# stop("range too small for 'min.n'")
-msgid "range too small for 'min.n'"
-msgstr "zakres jest zbyt mały dla 'min.m'"
+#. R/unix/quartz.R: stop("invalid Quartz font:  must be 4 strings")
+#: R/unix/quartz.R:0
+msgid "invalid Quartz font:  must be 4 strings"
+msgstr "niepoprawna czcionka 'Quartz': muszą być 4 łańcuchy"
 
-# grDevices/R/raster.R: 64
-# stop("a raster matrix must be character, or numeric, or logical")
-msgid "a raster matrix must be character, or numeric, or logical"
+#. R/windows/windows.R: stop("invalid Windows font:  must be a single font family name")
+#: R/windows/windows.R:0
+msgid "invalid Windows font:  must be a single font family name"
 msgstr ""
-"macierz rastrowa musi być tekstem lub liczbą lub być wartością logiczną"
-
-# grDevices/R/raster.R: 74
-# stop("a raster array must be numeric")
-msgid "a raster array must be numeric"
-msgstr "tablica rastrowa musi być liczbowa"
-
-# grDevices/R/raster.R: 76
-# stop("a raster array must have exactly 3 dimensions")
-msgid "a raster array must have exactly 3 dimensions"
-msgstr "tablica rastrowa musi mieć dokładnie 3 wymiary"
-
-# grDevices/R/raster.R: 82
-# stop("a raster array must have exactly 3 or 4 planes")
-msgid "a raster array must have exactly 3 or 4 planes"
-msgstr "tablica rastrowa musi mieć dokładnie 3 lub 4 płaszczyzny"
+"niepoprawna czcionka Windows:  musi być nazwa pojedynczej rodziny czcionek"
 
-# grDevices/R/raster.R: 116
-# warning("'drop' is always implicitly FALSE in '[.raster'")
-msgid "'drop' is always implicitly FALSE in '[.raster'"
-msgstr "'drop' jest zawsze rozumiany jako FALSE w '[.raster'"
+#. R/unix/x11.R: stop("invalid X11 font specification: ", errDesc)
+#: R/unix/x11.R:0
+msgid "invalid X11 font specification:"
+msgstr "niepoprawne określenie czcionki X11:"
 
-# grDevices/R/raster.R: 125
-# stop("invalid raster subsetting")
-msgid "invalid raster subsetting"
-msgstr "niepoprawny podzbiór rastra"
+#. R/postscript.R: gettextf("invalid arguments in '%s' (must be font names)", "postscriptFonts")
+#. R/postscript.R: gettextf("invalid arguments in '%s' (must be font names)", "pdfFonts")
+#: R/postscript.R:0
+msgid "invalid arguments in '%s' (must be font names)"
+msgstr "niepoprawne argumenty w '%s' (muszą być nazwy czcionek)"
 
-# grDevices/R/raster.R: 140
-# stop("invalid raster subassignment")
-msgid "invalid raster subassignment"
-msgstr "niepoprawny wymiana elementu rastra"
+#. R/postscript.R: gettextf("invalid arguments in '%s' (need named args)", deparse(sys.call(sys.parent())))
+#. R/postscript.R: gettextf("invalid arguments in '%s' (need named args)", "postscriptFonts")
+#. R/postscript.R: gettextf("invalid arguments in '%s' (need named args)", "pdfFonts")
+#: R/postscript.R:0
+msgid "invalid arguments in '%s' (need named args)"
+msgstr "niepoprawne argumenty w '%s' (potrzebne są nazwane argumenty)"
 
-# grDevices/R/raster.R: 154
-# stop("operator not meaningful for raster objects")
-msgid "operator not meaningful for raster objects"
-msgstr "operator nie ma znaczenia dla obiektów rastrowych"
+#. R/unix/x11.R: stop("invalid arguments in 'X11Fonts' (must be font names)")
+#: R/unix/x11.R:0
+msgid "invalid arguments in 'X11Fonts' (must be font names)"
+msgstr "niepoprawne argumenty w 'X11Fonts' (muszą być nazwy czcionek)"
 
-# grDevices/R/recordplot.R: 22
-# stop("no current device to record from")
-msgid "no current device to record from"
-msgstr "brak bieżącego urządzenia z którego można nagrywać"
+#. R/unix/x11.R: stop("invalid arguments in 'X11Fonts' (need named args)")
+#: R/unix/x11.R:0
+msgid "invalid arguments in 'X11Fonts' (need named args)"
+msgstr "niepoprawne argumenty w 'X11Fonts' (potrzebne są nazwane argumenty)"
 
-# grDevices/R/recordplot.R: 32
-# stop(gettextf("argument is not of class %s", dQuote("recordedplot")),
-#              domain = NA)
-msgid "argument is not of class %s"
-msgstr "argument nie jest obiektem klasy %s"
+#. R/unix/quartz.R: stop("invalid arguments in 'quartzFonts' (must be font names)")
+#: R/unix/quartz.R:0
+msgid "invalid arguments in 'quartzFonts' (must be font names)"
+msgstr "niepoprawne argumenty w 'quatzFonts' (muszą być nazwy czcionek)"
 
-# grDevices/R/recordplot.R: 36
-# stop("loading snapshot from a different session")
-msgid "loading snapshot from a different session"
-msgstr "ładowanie zrzutu z innej sesji"
+#. R/unix/quartz.R: stop("invalid arguments in 'quartzFonts' (need named args)")
+#: R/unix/quartz.R:0
+msgid "invalid arguments in 'quartzFonts' (need named args)"
+msgstr "niepoprawne argumenty w 'quatzFonts' (potrzebne są nazwane argumenty)"
 
-# grDevices/R/smooth2d.R: 29
-# stop("'nbin' must be numeric of length 1 or 2")
-msgid "'nbin' must be numeric of length 1 or 2"
-msgstr "argument 'nbin' musi być liczbą o długości 1 lub 2"
+#. R/windows/windows.R: stop("invalid arguments in 'windowsFonts' (must be font names)")
+#: R/windows/windows.R:0
+msgid "invalid arguments in 'windowsFonts' (must be font names)"
+msgstr "niepoprawne argumenty w 'windowsFonts' (muszą być nazwy czcionek)"
 
-# grDevices/R/smooth2d.R: 38
-# stop("'bandwidth' must be numeric")
-msgid "'bandwidth' must be numeric"
-msgstr "wartość 'bandwidth' musi być liczbą"
+#. R/windows/windows.R: stop("invalid arguments in 'windowsFonts' (need named args)")
+#: R/windows/windows.R:0
+msgid "invalid arguments in 'windowsFonts' (need named args)"
+msgstr ""
+"niepoprawne argumenty w 'windowsFonts' (potrzebne są nazwane argumenty)"
 
-# grDevices/R/smooth2d.R: 39
-# stop("'bandwidth' must be positive")
-msgid "'bandwidth' must be positive"
-msgstr "argument 'bandwidth' musi być dodatni"
+#. R/postscript.R: stop("invalid encoding in font specification")
+#: R/postscript.R:0
+msgid "invalid encoding in font specification"
+msgstr "niepoprawna strona kodowa w specyfikacji czcionki"
 
-# grDevices/R/utils.R: 32
-# stop("'r' must be a \"range\", hence of length 2")
-msgid "'r' must be a \"range\", hence of length 2"
-msgstr "'r' musi być wynikiem funkcji 'range()', a więc o długości 2"
+#. R/postscript.R: stop("invalid family name in font specification")
+#. R/postscript.R: stop("invalid family name in font specification")
+#: R/postscript.R:0
+msgid "invalid family name in font specification"
+msgstr "niepoprawna rodzina czcionki w specyfikacji czcionki"
 
-# grDevices/R/xyz.coords.R: 33
-# stop("invalid first argument")
+#. R/xyz.coords.R: stop("invalid first argument")
+#: R/xyz.coords.R:0
 msgid "invalid first argument"
 msgstr "niepoprawny pierwszy argument"
 
-# grDevices/R/xyz.coords.R: 74
-# stop("'x' is a list, but does not have components 'x' and 'y'")
-msgid "'x' is a list, but does not have components 'x' and 'y'"
-msgstr "obiekt 'x' jest listą, ale nie zawiera komponentów 'x' oraz 'y'"
-
-# grDevices/R/xyz.coords.R: 94
-# stop("'x' and 'y' lengths differ")
-msgid "'x' and 'y' lengths differ"
-msgstr "długości zmiennych 'x' oraz 'y' różnią się"
-
-# grDevices/R/xyz.coords.R: 135
-# stop("invalid first argument [bad language object]")
+#. R/xyz.coords.R: stop("invalid first argument [bad language object]")
+#: R/xyz.coords.R:0
 msgid "invalid first argument [bad language object]"
 msgstr "niepoprawny pierwszy argument [niepoprawny obiekt języka]"
 
-# grDevices/R/xyz.coords.R: 139
-# stop("at least 2 columns needed")
-msgid "at least 2 columns needed"
-msgstr "przynajmniej 2 kolumny są potrzebne"
-
-# grDevices/R/xyz.coords.R: 172
-# stop("'x' is a list, but does not have components 'x', 'y'  and 'z'")
-msgid "'x' is a list, but does not have components 'x', 'y'  and 'z'"
-msgstr "obiekt 'x' jest listą, ale nie zawiera komponentów 'x', 'y' oraz 'z'"
+#. R/postscript.R: stop("invalid metric information in font specification")
+#. R/postscript.R: stop("invalid metric information in font specification")
+#: R/postscript.R:0
+msgid "invalid metric information in font specification"
+msgstr "niepoprawna informacja metryczna w specyfikacji czcionki"
 
-# grDevices/R/xyz.coords.R: 212
-# stop("'x', 'y' and 'z' lengths differ")
-msgid "'x', 'y' and 'z' lengths differ"
-msgstr "długości zmiennych 'x', 'y' oraz 'z' różnią się"
+#. R/postscript.R: gettextf("invalid options in '%s'", name.opt)
+#: R/postscript.R:0
+msgid "invalid options in '%s'"
+msgstr "niepoprawne opcje w '%s'"
 
-# grDevices/R/unix/dev2bitmap.R: 23
-# stop("'file' is missing with no default")
-# grDevices/R/unix/dev2bitmap.R: 85
-# stop("'file' is missing with no default")
-# grDevices/R/windows/dev2bitmap.R: 23
-# stop("'file' is missing with no default")
-# grDevices/R/windows/dev2bitmap.R: 87
-# stop("'file' is missing with no default")
-msgid "'file' is missing with no default"
-msgstr "brakuje argumentu 'file', a brak zdefiniowanej wartości domyślnej"
+#. R/postscript.R: stop("invalid output format")
+#: R/postscript.R:0
+msgid "invalid output format"
+msgstr "niepoprawny format wyjściowy"
 
-# grDevices/R/unix/dev2bitmap.R: 35
-# stop("sorry, 'gs' cannot be found")
-# grDevices/R/unix/dev2bitmap.R: 96
-# stop("sorry, 'gs' cannot be found")
-msgid "sorry, 'gs' cannot be found"
-msgstr "przykro mi, ale polecenie 'gs' nie może zostać znalezione"
-
-# grDevices/R/unix/dev2bitmap.R: 41
-# warning("unrecognized format of gs -help")
-# grDevices/R/unix/dev2bitmap.R: 102
-# warning("unrecognized format of gs -help")
-# grDevices/R/windows/dev2bitmap.R: 43
-# warning("unrecognized format of gs -help")
-# grDevices/R/windows/dev2bitmap.R: 106
-# warning("unrecognized format of gs -help")
-msgid "unrecognized format of gs -help"
-msgstr "nierozpoznany format 'gs -help'"
+#. R/raster.R: stop("invalid raster subassignment")
+#: R/raster.R:0
+msgid "invalid raster subassignment"
+msgstr "niepoprawny wymiana elementu rastra"
 
-# grDevices/R/unix/dev2bitmap.R: 46
-# stop(gettextf("device '%s' is not available\n", type),
-#                  gettextf("Available devices are %s",
-#                           paste(gsdevs, collapse = "\n")),
-#                  domain = NA)
-# grDevices/R/unix/dev2bitmap.R: 107
-# stop(gettextf("device '%s' is not available\n", type),
-#                  gettextf("Available devices are %s",
-#                           paste(gsdevs, collapse = "\n")),
-#                  domain = NA)
-# grDevices/R/windows/dev2bitmap.R: 48
-# stop(gettextf("device '%s' is not available\n", type),
-#                  gettextf("Available devices are %s",
-#                           paste(gsdevs, collapse = "\n")),
-#                  domain = NA)
-# grDevices/R/windows/dev2bitmap.R: 111
-# stop(gettextf("device '%s' is not available\n", type),
-#                  gettextf("Available devices are %s",
-#                           paste(gsdevs, collapse = "\n")),
-#                  domain = NA)
-msgid "device '%s' is not available"
-msgstr "urządzenie '%s' nie jest dostępne"
+#. R/raster.R: stop("invalid raster subsetting")
+#: R/raster.R:0
+msgid "invalid raster subsetting"
+msgstr "niepoprawny podzbiór rastra"
 
-# grDevices/R/unix/dev2bitmap.R: 46
-# stop(gettextf("device '%s' is not available\n", type),
-#                  gettextf("Available devices are %s",
-#                           paste(gsdevs, collapse = "\n")),
-#                  domain = NA)
-# grDevices/R/unix/dev2bitmap.R: 107
-# stop(gettextf("device '%s' is not available\n", type),
-#                  gettextf("Available devices are %s",
-#                           paste(gsdevs, collapse = "\n")),
-#                  domain = NA)
-# grDevices/R/windows/dev2bitmap.R: 48
-# stop(gettextf("device '%s' is not available\n", type),
-#                  gettextf("Available devices are %s",
-#                           paste(gsdevs, collapse = "\n")),
-#                  domain = NA)
-# grDevices/R/windows/dev2bitmap.R: 111
-# stop(gettextf("device '%s' is not available\n", type),
-#                  gettextf("Available devices are %s",
-#                           paste(gsdevs, collapse = "\n")),
-#                  domain = NA)
-msgid "Available devices are %s"
-msgstr "Dostępne urządzenia to %s"
-
-# grDevices/R/unix/png.R: 23
-# stop("'res' must be specified unless 'units = \"px\"'")
-# grDevices/R/windows/cairo.R: 29
-# stop("'res' must be specified unless 'units = \"px\"'")
-# grDevices/R/windows/cairo.R: 50
-# stop("'res' must be specified unless 'units = \"px\"'")
-# grDevices/R/windows/cairo.R: 71
-# stop("'res' must be specified unless 'units = \"px\"'")
-# grDevices/R/windows/cairo.R: 93
-# stop("'res' must be specified unless 'units = \"px\"'")
-# grDevices/R/windows/png.R: 23
-# stop("'res' must be specified unless 'units = \"px\"'")
-msgid "'res' must be specified unless 'units = \"px\"'"
-msgstr "wartość 'res' musi być określona chyba, że 'units = \"px\"'"
+#. R/device.R: stop("invalid setting for 'getOption(\"device\")'")
+#: R/device.R:0
+msgid "invalid setting for 'getOption(\"device\")'"
+msgstr "niepoprawne ustawienie dla 'getOption(\"device\")'"
 
-# grDevices/R/unix/quartz.R: 72
-# stop("invalid 'title'")
-# grDevices/R/unix/x11.R: 83
-# stop("invalid 'title'")
-msgid "invalid 'title'"
-msgstr "niepoprawny argument 'title'"
+#. R/windows/windows.R: stop("invalid value for 'rescale'")
+#: R/windows/windows.R:0
+msgid "invalid value for 'rescale'"
+msgstr "niepoprawna wartość dla 'rescale'"
 
-# grDevices/R/unix/quartz.R: 73
-# stop("invalid 'file'")
-msgid "invalid 'file'"
-msgstr "niepoprawny argument 'file'"
+#. R/device.R: warning("need to specify one of 'width' and 'height'")
+#: R/device.R:0
+msgid "need to specify one of 'width' and 'height'"
+msgstr "potrzeba określić jeden z 'width' oraz 'height'"
 
-# grDevices/R/unix/quartz.R: 92
-# stop("invalid Quartz font:  must be 4 strings")
-msgid "invalid Quartz font:  must be 4 strings"
-msgstr "niepoprawna czcionka 'Quartz': muszą być 4 łańcuchy"
+#. R/calc.R: stop("no 'z' matrix specified")
+#: R/calc.R:0
+msgid "no 'z' matrix specified"
+msgstr "brak określonej macierzy 'z'"
 
-# grDevices/R/unix/quartz.R: 131
-# stop("invalid arguments in 'quartzFonts' (must be font names)")
-msgid "invalid arguments in 'quartzFonts' (must be font names)"
-msgstr "niepoprawne argumenty w 'quatzFonts' (muszą być nazwy czcionek)"
+#. R/recordplot.R: stop("no current device to record from")
+#: R/recordplot.R:0
+msgid "no current device to record from"
+msgstr "brak bieżącego urządzenia z którego można nagrywać"
 
-# grDevices/R/unix/quartz.R: 136
-# stop("invalid arguments in 'quartzFonts' (need named args)")
-msgid "invalid arguments in 'quartzFonts' (need named args)"
-msgstr "niepoprawne argumenty w 'quatzFonts' (potrzebne są nazwane argumenty)"
+#. R/device.R: stop("no device to print from")
+#. R/device.R: stop("no device to print from")
+#. R/device.R: stop("no device to print from")
+#. R/unix/quartz.R: stop("no device to print from")
+#: R/device.R:0 R/unix/quartz.R:0
+msgid "no device to print from"
+msgstr "brak urządzenia z którego można drukować"
 
-# grDevices/R/unix/x11.R: 87
-# warning("cairo-based types are not supported on this build - using \"Xlib\"")
-msgid "cairo-based types are not supported on this build - using \"Xlib\""
-msgstr ""
-"czcionki oparte o cairo nie są wspierane w tej kompilacji - używanie \"Xlib\""
+#. R/calc.R: stop("no proper 'z' matrix specified")
+#: R/calc.R:0
+msgid "no proper 'z' matrix specified"
+msgstr "nie określono odpowiedniej macierzy 'z'"
 
-# grDevices/R/unix/x11.R: 97
-# stop('unknown family for X11(type = "XLib")')
-msgid "unknown family for X11(type = \"XLib\")"
-msgstr "nieznana rodzina dla  'X11(type = \"XLib\")'"
+#. R/unix/x11.R: stop("no such device")
+#. R/windows/windows.R: stop("no such device")
+#: R/unix/x11.R:0 R/windows/windows.R:0
+msgid "no such device"
+msgstr "brak takiego urządzenia"
 
-# grDevices/R/unix/x11.R: 124
-# stop("invalid X11 font specification: ", errDesc)
-msgid "invalid X11 font specification:"
-msgstr "niepoprawne określenie czcionki X11:"
+#. R/device.R: stop("no suitable unused file name for pdf()")
+#: R/device.R:0
+msgid "no suitable unused file name for pdf()"
+msgstr "brak odpowiedniej nieużywanej nazwy pliku dla 'pdf()'"
 
-# grDevices/R/unix/x11.R: 179
-# stop("invalid arguments in 'X11Fonts' (must be font names)")
-msgid "invalid arguments in 'X11Fonts' (must be font names)"
-msgstr "niepoprawne argumenty w 'X11Fonts' (muszą być nazwy czcionek)"
+#. R/device.R: stop("no suitable unused file name for postscript()")
+#: R/device.R:0
+msgid "no suitable unused file name for postscript()"
+msgstr "brak odpowiedniej nieużywanej nazwy pliku dla 'postscript()'"
 
-# grDevices/R/unix/x11.R: 184
-# stop("invalid arguments in 'X11Fonts' (need named args)")
-msgid "invalid arguments in 'X11Fonts' (need named args)"
-msgstr "niepoprawne argumenty w 'X11Fonts' (potrzebne są nazwane argumenty)"
+#. R/raster.R: stop("operator not meaningful for raster objects")
+#: R/raster.R:0
+msgid "operator not meaningful for raster objects"
+msgstr "operator nie ma znaczenia dla obiektów rastrowych"
 
-# grDevices/R/unix/x11.R: 214
-# stop("no such device")
-# grDevices/R/windows/windows.R: 186
-# stop("no such device")
-msgid "no such device"
-msgstr "brak takiego urządzenia"
+#. R/colorstuff.R: stop("rgb matrix must be numeric")
+#: R/colorstuff.R:0
+msgid "rgb matrix must be numeric"
+msgstr "macierz RGB musi być liczbowa"
 
-# grDevices/R/unix/x11.R: 217
-# stop("can only copy from 'X11(type=\"*cairo\")' devices")
-msgid "can only copy from 'X11(type=\"*cairo\")' devices"
-msgstr "można kopiować jedynie z urządzeń 'X11(type=\"*cairo\")'"
+#. R/colorstuff.R: stop("rgb matrix must have 3 rows")
+#: R/colorstuff.R:0
+msgid "rgb matrix must have 3 rows"
+msgstr "macierz RGB musi mieć 3 wiersze"
 
-# grDevices/R/windows/windows.R: 97
-# stop("invalid value for 'rescale'")
-msgid "invalid value for 'rescale'"
-msgstr "niepoprawna wartość dla 'rescale'"
+#. R/colorstuff.R: stop("rgb values must be in [0, maxColorValue]")
+#: R/colorstuff.R:0
+msgid "rgb values must be in [0, maxColorValue]"
+msgstr "argumenty 'r', 'g' oraz 'b' muszą być w przedziale [0, maxColorValue]"
 
-# grDevices/R/windows/windows.R: 157
-# stop("can only bring windows devices to the front")
-msgid "can only bring windows devices to the front"
-msgstr "można jedynie przywołać urządzenia okien na wierzch"
+#. R/recordplot.R: stop("snapshot contains invalid graphics call")
+#: R/recordplot.R:0
+msgid "snapshot contains invalid graphics call"
+msgstr "zrzut zawiera niepoprawne wywołania grafiki"
 
-# grDevices/R/windows/windows.R: 169
-# stop("'type' not applicable to the R console")
-msgid "'type' not applicable to the R console"
-msgstr "'type' nie ma zastosowania w konsoli R"
+#. R/recordplot.R: gettextf("snapshot recorded in different R version (%s)", snapshotRversion)
+#: R/recordplot.R:0
+msgid "snapshot recorded in different R version (%s)"
+msgstr "zrzut zapisany w innej wersji R (%s)"
 
-# grDevices/R/windows/windows.R: 172
-# stop("can only manipulate windows devices")
-msgid "can only manipulate windows devices"
-msgstr "można działać tylko z urządzeniami 'windows'"
+#. R/recordplot.R: warning("snapshot recorded in different R version (pre 3.3.0)")
+#: R/recordplot.R:0
+msgid "snapshot recorded in different R version (pre 3.3.0)"
+msgstr "zrzut zapisany w innej wersji R (przed 3.3.0)"
 
-# grDevices/R/windows/windows.R: 188
-# stop("can only copy from 'windows' devices")
-msgid "can only copy from 'windows' devices"
-msgstr "można kopiować jedynie z urządzeń 'windows'"
+#. R/postscript.R: gettextf("status %d in running command '%s'", ret, cmd)
+#: R/postscript.R:0
+msgid "status %d in running command '%s'"
+msgstr "status '%d' w działającym poleceniu '%s'"
 
-# grDevices/R/windows/windows.R: 213
-# stop("subscript out of range")
+#. R/windows/windows.R: stop("subscript out of range")
+#: R/windows/windows.R:0
 msgid "subscript out of range"
 msgstr "indeks jest poza zakresem"
 
-# grDevices/R/windows/windows.R: 232
-# stop("invalid Windows font:  must be a single font family name")
-msgid "invalid Windows font:  must be a single font family name"
-msgstr ""
-"niepoprawna czcionka Windows:  musi być nazwa pojedynczej rodziny czcionek"
-
-# grDevices/R/windows/windows.R: 270
-# stop("invalid arguments in 'windowsFonts' (must be font names)")
-msgid "invalid arguments in 'windowsFonts' (must be font names)"
-msgstr "niepoprawne argumenty w 'windowsFonts' (muszą być nazwy czcionek)"
+#. R/postscript.R: gettextf("unknown family '%s'", family)
+#. R/postscript.R: gettextf("unknown family '%s'", family)
+#: R/postscript.R:0
+msgid "unknown family '%s'"
+msgstr "nieznana rodzina '%s'"
 
-# grDevices/R/windows/windows.R: 275
-# stop("invalid arguments in 'windowsFonts' (need named args)")
-msgid "invalid arguments in 'windowsFonts' (need named args)"
-msgstr ""
-"niepoprawne argumenty w 'windowsFonts' (potrzebne są nazwane argumenty)"
+#. R/unix/x11.R: stop("unknown family for X11(type = \"XLib\")")
+#: R/unix/x11.R:0
+msgid "unknown family for X11(type = \"XLib\")"
+msgstr "nieznana rodzina dla  'X11(type = \"XLib\")'"
 
-# grDevices/R/postscript.R: 50
-# stop(sprintf(ngettext(as.integer(sum(is.na(matches))),
-#                                  "invalid argument name %s in '%s'",
-#                                  "invalid argument names %s in '%s'"),
-#                          paste(sQuote(newnames[is.na(matches)]),
-#                                collapse=", "),
-#                          deparse(sys.call(sys.parent()))),
-#                  domain = NA)
-msgid "invalid argument name %s in '%s'"
-msgid_plural "invalid argument names %s in '%s'"
-msgstr[0] "niepoprawna nazwa argumentu %s w '%s'"
-msgstr[1] "niepoprawne nazwy argumentów %s w '%s'"
-msgstr[2] "niepoprawne nazwy argumentów %s w '%s'"
+#. R/postscript.R: stop("unknown font")
+#: R/postscript.R:0
+msgid "unknown font"
+msgstr "nieznana czcionka"
 
-# grDevices/R/postscript.R: 68
-# warning(paste(sQuote(paste0(fn, "(", names(prev[ii]), ")" )),
-#                                   collapse = " and "), " ",
-#                             ngettext(as.integer(sum(ii)),
-#                                      "differs between new and previous",
-#                                      "differ between new and previous"),
-#                             if(any(do.keep)) {
-#                                 paste("\n\t ==> ",
-#                                       gettextf("NOT changing %s",
-#                                               paste(sQuote(names(prev[do.keep])),
-#                                                     collapse=" & ")),
-#                                       sep = "")} else "",
-#                             domain = NA, call. = FALSE)
-msgid "differs between new and previous"
-msgid_plural "differ between new and previous"
-msgstr[0] "różni się pomiędzy nowym a poprzednim"
-msgstr[1] "różnią się pomiędzy nowym a poprzednim"
-msgstr[2] "różnią się pomiędzy nowym a poprzednim"
+#. R/unix/dev2bitmap.R: warning("unrecognized format of gs -help")
+#. R/windows/dev2bitmap.R: warning("unrecognized format of gs -help")
+#: R/unix/dev2bitmap.R:0 R/windows/dev2bitmap.R:0
+msgid "unrecognized format of gs -help"
+msgstr "nierozpoznany format 'gs -help'"
 
-# grDevices/R/xyz.coords.R: 101
-# warning(sprintf(ngettext(n,
-#                             "%d x value <= 0 omitted from logarithmic plot",
-#                             "%d x values <= 0 omitted from logarithmic plot"),
-#                             n), domain = NA)
-# grDevices/R/xyz.coords.R: 220
-# warning(sprintf(ngettext(n,
-#                                      "%d x value <= 0 omitted from logarithmic plot",
-#                                      "%d x values <= 0 omitted from logarithmic plot"),
-#                             n), domain = NA)
+#. R/xyz.coords.R: ngettext(n, "%d x value <= 0 omitted from logarithmic plot",     "%d x values <= 0 omitted from logarithmic plot")
+#. R/xyz.coords.R: ngettext(n, "%d x value <= 0 omitted from logarithmic plot",     "%d x values <= 0 omitted from logarithmic plot")
+#: R/xyz.coords.R:0
 msgid "%d x value <= 0 omitted from logarithmic plot"
 msgid_plural "%d x values <= 0 omitted from logarithmic plot"
 msgstr[0] "%d wartość x <= 0 pominięto na wykresie logarytmicznym"
 msgstr[1] "%d wartości x <= 0 pominięto na wykresie logarytmicznym"
 msgstr[2] "%d wartości x <= 0 pominięto na wykresie logarytmicznym"
 
-# grDevices/R/xyz.coords.R: 109
-# warning(sprintf(ngettext(n,
-#                             "%d y value <= 0 omitted from logarithmic plot",
-#                             "%d y values <= 0 omitted from logarithmic plot"),
-#                             n), domain = NA)
-# grDevices/R/xyz.coords.R: 228
-# warning(sprintf(ngettext(n,
-#                                      "%d y value <= 0 omitted from logarithmic plot",
-#                                      "%d y values <= 0 omitted from logarithmic plot"),
-#                             n), domain = NA)
+#. R/xyz.coords.R: ngettext(n, "%d y value <= 0 omitted from logarithmic plot",     "%d y values <= 0 omitted from logarithmic plot")
+#. R/xyz.coords.R: ngettext(n, "%d y value <= 0 omitted from logarithmic plot",     "%d y values <= 0 omitted from logarithmic plot")
+#: R/xyz.coords.R:0
 msgid "%d y value <= 0 omitted from logarithmic plot"
 msgid_plural "%d y values <= 0 omitted from logarithmic plot"
 msgstr[0] "%d wartość y <= 0 pominięto na wykresie logarytmicznym"
 msgstr[1] "%d wartości y <= 0 pominięto na wykresie logarytmicznym"
 msgstr[2] "%d wartości y <= 0 pominięto na wykresie logarytmicznym"
 
-# grDevices/R/xyz.coords.R: 236
-# warning(sprintf(ngettext(n,
-#                                      "%d z value <= 0 omitted from logarithmic plot",
-#                                      "%d z values <= 0 omitted from logarithmic plot"),
-#                             n), domain = NA)
+#. R/xyz.coords.R: ngettext(n, "%d z value <= 0 omitted from logarithmic plot",     "%d z values <= 0 omitted from logarithmic plot")
+#: R/xyz.coords.R:0
 msgid "%d z value <= 0 omitted from logarithmic plot"
 msgid_plural "%d z values <= 0 omitted from logarithmic plot"
 msgstr[0] "%d wartość z <= 0 pominięto na wykresie logarytmicznym"
 msgstr[1] "%d wartości z <= 0 pominięto na wykresie logarytmicznym"
 msgstr[2] "%d wartości z <= 0 pominięto na wykresie logarytmicznym"
+
+#. R/postscript.R: ngettext(as.integer(sum(ii)), "differs between new and previous",     "differ between new and previous")
+#: R/postscript.R:0
+msgid "differs between new and previous"
+msgid_plural "differ between new and previous"
+msgstr[0] "różni się pomiędzy nowym a poprzednim"
+msgstr[1] "różnią się pomiędzy nowym a poprzednim"
+msgstr[2] "różnią się pomiędzy nowym a poprzednim"
+
+#. R/postscript.R: ngettext(as.integer(sum(is.na(matches))), "invalid argument name %s in '%s'",     "invalid argument names %s in '%s'")
+#: R/postscript.R:0
+msgid "invalid argument name %s in '%s'"
+msgid_plural "invalid argument names %s in '%s'"
+msgstr[0] "niepoprawna nazwa argumentu %s w '%s'"
+msgstr[1] "niepoprawne nazwy argumentów %s w '%s'"
+msgstr[2] "niepoprawne nazwy argumentów %s w '%s'"
+
+#~ msgid "range too small for 'min.n'"
+#~ msgstr "zakres jest zbyt mały dla 'min.m'"
diff --git a/src/library/grDevices/po/R-pt_BR.po b/src/library/grDevices/po/R-pt_BR.po
index 1f1cfaf..c107033 100644
--- a/src/library/grDevices/po/R-pt_BR.po
+++ b/src/library/grDevices/po/R-pt_BR.po
@@ -2,7 +2,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: 2.13.0\n"
 "Report-Msgid-Bugs-To: bugs.r-project.org\n"
-"POT-Creation-Date: 2013-12-18 14:41\n"
+"POT-Creation-Date: 2016-04-01 09:50\n"
 "PO-Revision-Date: 2011-03-26 08:56-0300\n"
 "Last-Translator: Fernando Henrique <pessoal at fernandohrosa.com.br>\n"
 "Language-Team: http://www.feferraz.net/br/P/Projeto_Traducao_R_Portugues\n"
@@ -31,6 +31,9 @@ msgstr "nenhuma matriz 'z' própria especificada"
 msgid "dimensions of 'x', 'y' and 'z' do not match"
 msgstr ""
 
+msgid "finite coordinates are needed"
+msgstr ""
+
 msgid "'bias' must be positive"
 msgstr "'bias' deve ser positivo"
 
@@ -220,17 +223,17 @@ msgstr "codificação da fone não corresponde '%s'/'%s'"
 msgid "'file' must be a non-empty character string"
 msgstr "'file' deve ser uma cadeia de caracteres não-vazia"
 
-msgid "Invalid output format"
+msgid "GhostScript was not found"
+msgstr ""
+
+#, fuzzy
+msgid "invalid output format"
 msgstr "formato de saída inválido"
 
 msgid "status %d in running command '%s'"
 msgstr "estado %d em executar comando '%s'"
 
 #, fuzzy
-msgid "range too small for 'min.n'"
-msgstr "faixa pequena demais para min.n"
-
-#, fuzzy
 msgid "a raster matrix must be character, or numeric, or logical"
 msgstr "Uma matriz raster deve ser caractere, ou numérica, ou lógica"
 
@@ -267,9 +270,16 @@ msgid "argument is not of class %s"
 msgstr "argumento não é da classe \"recordedplot\""
 
 #, fuzzy
-msgid "loading snapshot from a different session"
+msgid "snapshot recorded in different R version (pre 3.3.0)"
+msgstr "carregando snapshot de versão R diferente"
+
+#, fuzzy
+msgid "snapshot recorded in different R version (%s)"
 msgstr "carregando snapshot de versão R diferente"
 
+msgid "snapshot contains invalid graphics call"
+msgstr ""
+
 msgid "'nbin' must be numeric of length 1 or 2"
 msgstr "'nbin' deve ser numérico de comprimento 1 ou 2"
 
@@ -306,16 +316,16 @@ msgstr "comprimentos de 'x', 'y' e 'z' diferem"
 msgid "'file' is missing with no default"
 msgstr "'file' está faltando sem nenhum padrão"
 
-msgid "sorry, 'gs' cannot be found"
-msgstr "desculpe, 'gs' não pode ser encontrado"
-
 msgid "unrecognized format of gs -help"
 msgstr "formato desconhecido de gs -help"
 
 msgid "device '%s' is not available"
 msgstr "dispositivo '%s' não está disponível"
 
-msgid "Available devices are %s"
+#, fuzzy
+msgid ""
+"Available devices are:\n"
+"%s"
 msgstr "dispositivos disponíveis são %s"
 
 msgid "'res' must be specified unless 'units = \"px\"'"
@@ -415,6 +425,13 @@ msgstr[0] "valores %d z <= 0 omitidos do gráfico logarítmico"
 msgstr[1] ""
 
 #, fuzzy
+#~ msgid "range too small for 'min.n'"
+#~ msgstr "faixa pequena demais para min.n"
+
+#~ msgid "sorry, 'gs' cannot be found"
+#~ msgstr "desculpe, 'gs' não pode ser encontrado"
+
+#, fuzzy
 #~ msgid "loading snapshot from pre-3.0.0 R version"
 #~ msgstr "carregando snapshot de versão R pré-2.0.0"
 
diff --git a/src/library/grDevices/po/R-ru.po b/src/library/grDevices/po/R-ru.po
index 159269f..af2e001 100644
--- a/src/library/grDevices/po/R-ru.po
+++ b/src/library/grDevices/po/R-ru.po
@@ -9,17 +9,16 @@ msgid ""
 msgstr ""
 "Project-Id-Version: R 2.11.0\n"
 "Report-Msgid-Bugs-To: bugs.r-project.org\n"
-"POT-Creation-Date: 2013-12-18 14:41\n"
-"PO-Revision-Date: 2014-03-11 10:27-0600\n"
+"POT-Creation-Date: 2014-05-26 08:40\n"
+"PO-Revision-Date: 2016-04-05 18:07-0600\n"
 "Last-Translator: Alexey Shipunov <dactylorhiza at gmail.com>\n"
 "Language-Team: Russian\n"
-"Language: \n"
+"Language: ru\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=KOI8-R\n"
 "Content-Transfer-Encoding: 8bit\n"
 "X-Poedit-Language: Russian\n"
-"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n"
-"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
+"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
 
 msgid "invalid 'filename'"
 msgstr "������������ 'filename'"
@@ -39,11 +38,14 @@ msgstr "
 msgid "dimensions of 'x', 'y' and 'z' do not match"
 msgstr "��������� 'x', 'y' and 'z' �� ������������� ���� �����"
 
+msgid "finite coordinates are needed"
+msgstr "����� �������� ����������"
+
 msgid "'bias' must be positive"
 msgstr "'bias' ������ ���� �������������"
 
 msgid "'alpha' must be false if 'space' is specified"
-msgstr ""
+msgstr "'alpha' ������ ���� false ���� ������� 'space'"
 
 msgid "at least 3 columns needed"
 msgstr "����� �� ������� ���� 3 �������"
@@ -160,8 +162,7 @@ msgid "NOT changing %s"
 msgstr "�� ���������� %s"
 
 msgid "argument 'append' is for back-compatibility and will be ignored"
-msgstr ""
-"�������� 'append' ������������ ��� �������� ������������� � ����� ��������"
+msgstr "�������� 'append' ������������ ��� �������� ������������� � ����� ��������"
 
 msgid "unknown family '%s'"
 msgstr "����������� ��������� '%s'"
@@ -169,9 +170,8 @@ msgstr "
 msgid "invalid 'family' argument"
 msgstr "������������ �������� 'family'"
 
-#, fuzzy
 msgid "invalid 'file' argument '%s'"
-msgstr "������������ �������� 'family'"
+msgstr "������������ �������� 'file' '%s'"
 
 msgid "invalid PDF version"
 msgstr "������������ ������ PDF"
@@ -218,8 +218,11 @@ msgstr "
 msgid "'file' must be a non-empty character string"
 msgstr "'file' ������ ���� �������� ���������� �������"
 
-msgid "Invalid output format"
-msgstr "������������ ������ ������"
+msgid "GhostScript was not found"
+msgstr "GhostScript �� ������"
+
+msgid "invalid output format"
+msgstr "������������ ������ ������"
 
 msgid "status %d in running command '%s'"
 msgstr "������ %d ������������� ������� '%s'"
@@ -228,8 +231,7 @@ msgid "range too small for 'min.n'"
 msgstr "������ ������� ��� ��� 'min.n'"
 
 msgid "a raster matrix must be character, or numeric, or logical"
-msgstr ""
-"��������� ������� ������ ���� ��������, ������ ��� ���������� ����������"
+msgstr "��������� ������� ������ ���� ��������, ������ ��� ���������� ����������"
 
 msgid "a raster array must be numeric"
 msgstr "��������� ����������� ������� ������ ���� ��������"
@@ -238,8 +240,7 @@ msgid "a raster array must have exactly 3 dimensions"
 msgstr "��������� ����������� ������� ������ ���� � �������� ����������"
 
 msgid "a raster array must have exactly 3 or 4 planes"
-msgstr ""
-"��������� ����������� ������� ������ ����� � �������� 3 ��� 4 ��������� "
+msgstr "��������� ����������� ������� ������ ����� � �������� 3 ��� 4 ��������� "
 
 msgid "'drop' is always implicitly FALSE in '[.raster'"
 msgstr "'drop' ������ ������ ��������� � FALSE � '[.raster'"
@@ -259,9 +260,8 @@ msgstr "
 msgid "argument is not of class %s"
 msgstr "�������� �� ����������� � ������ %s"
 
-#, fuzzy
 msgid "loading snapshot from a different session"
-msgstr "�������� ������ �� ������ ������ R"
+msgstr "�������� ������ �� ������ ������"
 
 msgid "'nbin' must be numeric of length 1 or 2"
 msgstr "'nbin' ������ ���� �������� �������� ������ 1 ��� 2"
@@ -299,17 +299,18 @@ msgstr "
 msgid "'file' is missing with no default"
 msgstr "�������� 'file', ��������� ���"
 
-msgid "sorry, 'gs' cannot be found"
-msgstr "��������, �� ���� ����� 'gs'"
-
 msgid "unrecognized format of gs -help"
 msgstr "���������������� ������ gs -help"
 
 msgid "device '%s' is not available"
 msgstr "���������� '%s' ����������"
 
-msgid "Available devices are %s"
-msgstr "��������� ����������: %s"
+msgid ""
+"Available devices are:\n"
+"%s"
+msgstr ""
+"��������� ����������:\n"
+"%s"
 
 msgid "'res' must be specified unless 'units = \"px\"'"
 msgstr "'res' ������ ���� ��������� �� ��� ��� ���� 'units = \"px\"'"
@@ -330,9 +331,7 @@ msgid "invalid arguments in 'quartzFonts' (need named args)"
 msgstr "������������ ��������� � �quartzFonts� (����� ����������� ���������)"
 
 msgid "cairo-based types are not supported on this build - using \"Xlib\""
-msgstr ""
-"����, ���������� �� cairo, � ���� ������ �� �������������� -- ��������� "
-"\"Xlib\""
+msgstr "����, ���������� �� cairo, � ���� ������ �� �������������� -- ��������� \"Xlib\""
 
 msgid "unknown family for X11(type = \"XLib\")"
 msgstr "����������� ��������� X11(type = \"XLib\")"
@@ -409,22 +408,20 @@ msgstr[0] "%d 
 msgstr[1] "%d �������� z <= 0 ��������� �� ��������������� �������"
 msgstr[2] "%d �������� z <= 0 ��������� �� ��������������� �������"
 
+#~ msgid "sorry, 'gs' cannot be found"
+#~ msgstr "��������, �� ���� ����� 'gs'"
 #~ msgid "loading snapshot from pre-3.0.0 R version"
 #~ msgstr "�������� ������ �� ������ R �� 3.0.0"
-
 #~ msgid "can only print from screen device"
 #~ msgstr "���� �������� ������ � ��������� ����������"
-
 #~ msgid "'maxRasters' is no longer needed, and will be ignored"
 #~ msgstr "'maxRasters' ������ �� ����� � ����� ���������"
-
 #~ msgid "The 'gamma' argument is deprecated and has no effect"
 #~ msgstr "�������� 'gamma' ������� � �� �������� �������� �������"
-
 #~ msgid "invalid value for 'antialias'"
 #~ msgstr "������������ �������� 'antialias'"
-
 #~ msgid "quartz() device interactivity reduced without an event loop manager"
 #~ msgstr ""
 #~ "���������� quartz() ������������ ��������� ��� ������������� ����������� "
 #~ "������"
+
diff --git a/src/library/grDevices/po/R-zh_CN.po b/src/library/grDevices/po/R-zh_CN.po
index 3989c94..6260109 100644
--- a/src/library/grDevices/po/R-zh_CN.po
+++ b/src/library/grDevices/po/R-zh_CN.po
@@ -7,11 +7,11 @@ msgid ""
 msgstr ""
 "Project-Id-Version: R 2.4.0\n"
 "Report-Msgid-Bugs-To: bugs.r-project.org\n"
-"POT-Creation-Date: 2013-12-18 14:41\n"
+"POT-Creation-Date: 2016-04-01 09:50\n"
 "PO-Revision-Date: 2008-04-05 10:53+0100\n"
 "Last-Translator: 陈斐 <feic at normipaiva.com>\n"
 "Language-Team: Chinese\n"
-"Language: \n"
+"Language: zh_CN\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
@@ -35,6 +35,9 @@ msgstr "没有正确设定'z'这个矩阵"
 msgid "dimensions of 'x', 'y' and 'z' do not match"
 msgstr ""
 
+msgid "finite coordinates are needed"
+msgstr ""
+
 msgid "'bias' must be positive"
 msgstr "'bias'的值必需是正数"
 
@@ -213,15 +216,16 @@ msgstr "字体编码冲突'%s'/'%s'"
 msgid "'file' must be a non-empty character string"
 msgstr "'file'必需是非空字符串"
 
-msgid "Invalid output format"
+msgid "GhostScript was not found"
+msgstr ""
+
+#, fuzzy
+msgid "invalid output format"
 msgstr "输出的格式不对"
 
 msgid "status %d in running command '%s'"
 msgstr "调用命令'%2$s'的运行状况为%1$d"
 
-msgid "range too small for 'min.n'"
-msgstr "'min.n'的范围太小了"
-
 msgid "a raster matrix must be character, or numeric, or logical"
 msgstr "光栅矩阵必需是字符,数字或逻辑值"
 
@@ -253,9 +257,16 @@ msgid "argument is not of class %s"
 msgstr "参数的类别必需为%s"
 
 #, fuzzy
-msgid "loading snapshot from a different session"
+msgid "snapshot recorded in different R version (pre 3.3.0)"
+msgstr "从另外一个R版本载入快照"
+
+#, fuzzy
+msgid "snapshot recorded in different R version (%s)"
 msgstr "从另外一个R版本载入快照"
 
+msgid "snapshot contains invalid graphics call"
+msgstr ""
+
 msgid "'nbin' must be numeric of length 1 or 2"
 msgstr "'nbin'的值应该是长度1或2的数值"
 
@@ -292,16 +303,16 @@ msgstr "'x', 'y'和'z'的长度不一样"
 msgid "'file' is missing with no default"
 msgstr "'file'不存在,也没有默认值"
 
-msgid "sorry, 'gs' cannot be found"
-msgstr "对不起,'gs'不存在"
-
 msgid "unrecognized format of gs -help"
 msgstr "gs -help的格式不对"
 
 msgid "device '%s' is not available"
 msgstr "没有'%s'这样的装置"
 
-msgid "Available devices are %s"
+#, fuzzy
+msgid ""
+"Available devices are:\n"
+"%s"
 msgstr "可用的装置是%s"
 
 msgid "'res' must be specified unless 'units = \"px\"'"
@@ -390,6 +401,12 @@ msgid "%d z value <= 0 omitted from logarithmic plot"
 msgid_plural "%d z values <= 0 omitted from logarithmic plot"
 msgstr[0] "对数图里略过%d个小于等于零的z值"
 
+#~ msgid "range too small for 'min.n'"
+#~ msgstr "'min.n'的范围太小了"
+
+#~ msgid "sorry, 'gs' cannot be found"
+#~ msgstr "对不起,'gs'不存在"
+
 #~ msgid "loading snapshot from pre-3.0.0 R version"
 #~ msgstr "从前-3.0.0 R版本载入快照"
 
diff --git a/src/library/grDevices/po/da.po b/src/library/grDevices/po/da.po
index 531b566..cf0e05c 100644
--- a/src/library/grDevices/po/da.po
+++ b/src/library/grDevices/po/da.po
@@ -5,8 +5,8 @@
 msgid ""
 msgstr ""
 "Project-Id-Version: R 3.0.0\n"
-"Report-Msgid-Bugs-To: bugs.r-project.org\n"
-"POT-Creation-Date: 2014-03-27 07:46+0000\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2016-04-01 10:28-0700\n"
 "PO-Revision-Date: 2011-11-29 09:07+0200\n"
 "Last-Translator: Joe <joedalton2 at yahoo.dk>\n"
 "Language-Team: LANGUAGE <LL at li.org>\n"
@@ -17,100 +17,120 @@ msgstr ""
 "Plural-Forms: nplurals=2; plural=(n != 1);\n"
 "X-Generator: Pootle 2.1.6\n"
 
-#: axis_scales.c:37 axis_scales.c:38 axis_scales.c:53
+#: axis_scales.c:37 axis_scales.c:38 axis_scales.c:55
 #, c-format
 msgid "'%s' must be numeric of length %d"
 msgstr "'%s' skal være numerisk med længden %d"
 
 #: colors.c:69
 #, c-format
+msgid "color intensity %s, not in [0,1]"
+msgstr ""
+
+#: colors.c:71
+#, c-format
 msgid "color intensity %g, not in [0,1]"
 msgstr ""
 
-#: colors.c:76
+#: colors.c:78
+#, c-format
+msgid "color intensity %s, not in 0:255"
+msgstr ""
+
+#: colors.c:80
 #, c-format
 msgid "color intensity %d, not in 0:255"
 msgstr ""
 
-#: colors.c:83
+#: colors.c:87
+#, c-format
+msgid "alpha level %s, not in [0,1]"
+msgstr ""
+
+#: colors.c:89
 #, c-format
 msgid "alpha level %g, not in [0,1]"
 msgstr ""
 
-#: colors.c:90
+#: colors.c:96
+#, c-format
+msgid "alpha level %s, not in 0:255"
+msgstr ""
+
+#: colors.c:98
 #, c-format
 msgid "alpha level %d, not in 0:255"
 msgstr ""
 
-#: colors.c:118
+#: colors.c:126
 msgid "bad hsv to rgb color conversion"
 msgstr ""
 
-#: colors.c:207 colors.c:221
+#: colors.c:218 colors.c:232
 msgid "invalid hsv color"
 msgstr ""
 
-#: colors.c:333 colors.c:353
+#: colors.c:344 colors.c:364
 msgid "invalid hcl color"
 msgstr ""
 
-#: colors.c:385
+#: colors.c:396
 #, fuzzy
 msgid "invalid value of 'maxColorValue'"
 msgstr "ugyldig værdi for '%s'"
 
-#: colors.c:413
+#: colors.c:424
 #, fuzzy
 msgid "invalid 'names' vector"
 msgstr "ugyldigt 'fil'-argument"
 
-#: colors.c:472 colors.c:481
+#: colors.c:483 colors.c:492
 msgid "invalid gray level, must be in [0,1]."
 msgstr ""
 
-#: colors.c:537
+#: colors.c:548
 #, fuzzy, c-format
 msgid "invalid '%s' value"
 msgstr "ugyldigt 'fil'-argument"
 
-#: colors.c:1329
+#: colors.c:1340
 msgid "invalid hex digit in 'color' or 'lty'"
 msgstr ""
 
-#: colors.c:1339 colors.c:1349
+#: colors.c:1350 colors.c:1360
 #, fuzzy
 msgid "invalid RGB specification"
 msgstr "Ugyldig skriftspecifikation"
 
-#: colors.c:1382
+#: colors.c:1393
 #, fuzzy, c-format
 msgid "invalid color name '%s'"
 msgstr "ugyldig streng i '%s'"
 
-#: colors.c:1432 colors.c:1441
+#: colors.c:1443 colors.c:1452
 #, fuzzy, c-format
 msgid "invalid color specification \"%s\""
 msgstr "Ugyldig skriftspecifikation"
 
-#: colors.c:1469
+#: colors.c:1480
 msgid "supplied color is neither numeric nor character"
 msgstr ""
 
-#: colors.c:1473
+#: colors.c:1484
 #, c-format
 msgid "numerical color values must be >= 0, found %d"
 msgstr ""
 
-#: colors.c:1484
+#: colors.c:1495
 #, fuzzy
 msgid "invalid argument type"
 msgstr "ugyldigt 'fil'-argument"
 
-#: colors.c:1495
+#: colors.c:1506
 msgid "unknown palette (need >= 2 colors)"
 msgstr ""
 
-#: colors.c:1499 colors.c:1521
+#: colors.c:1510 colors.c:1532
 #, c-format
 msgid "maximum number of colors is %d"
 msgstr ""
@@ -124,7 +144,7 @@ msgstr "afm-fil '%s' kunne ikke åbnes"
 msgid "unknown AFM entity encountered"
 msgstr "mødte ukendt AFM-entitet"
 
-#: devPS.c:740 devPS.c:743 devPS.c:4420 devPS.c:7911 devPicTeX.c:484
+#: devPS.c:740 devPS.c:743 devPS.c:4427 devPS.c:7918 devPicTeX.c:484
 #: devPicTeX.c:486
 #, c-format
 msgid "invalid string in '%s'"
@@ -207,47 +227,47 @@ msgstr "kunne ikke indlæse kodningsfil '%s'"
 msgid "invalid font name or more than one font name"
 msgstr "Ugyldigt skriftnavn eller mere end et skriftnavn"
 
-#: devPS.c:1595 devPS.c:1630
+#: devPS.c:1596 devPS.c:1631
 #, fuzzy, c-format
 msgid "font family '%s' not found in PostScript font database"
 msgstr "skriftfamilie ikke fundet i PostScript-skriftdatabasen"
 
-#: devPS.c:1702 devPS.c:1784 devPS.c:1811
+#: devPS.c:1703 devPS.c:1785 devPS.c:1812
 #, fuzzy, c-format
 msgid "font encoding for family '%s' not found in font database"
 msgstr "skriftkodning ikke fundet i skriftdatabasen"
 
-#: devPS.c:1729 devPS.c:1756
+#: devPS.c:1730 devPS.c:1757
 #, fuzzy, c-format
 msgid "font CMap for family '%s' not found in font database"
 msgstr "skrift-CMAP ikke fundet i skriftdatabasen"
 
-#: devPS.c:1950 devPS.c:2029 devPS.c:2097
+#: devPS.c:1952 devPS.c:2032 devPS.c:2100
 #, c-format
 msgid "cannot load afm file '%s'"
 msgstr "kan ikke indlæse afm-fil '%s'"
 
-#: devPS.c:2385
+#: devPS.c:2388
 #, fuzzy
 msgid "corrupt loaded encodings;  encoding not recorded"
 msgstr "Ødelagte indlæste kodninger;  kodning ikke optaget"
 
-#: devPS.c:2396
+#: devPS.c:2399
 #, fuzzy
 msgid "failed to record device encoding"
 msgstr "Kunne ikke optage enhedskodning"
 
-#: devPS.c:2565
+#: devPS.c:2570
 #, fuzzy
 msgid "object '.ps.prolog' is not a character vector"
 msgstr "Object.ps.prolog er ikke en tegnvektor"
 
-#: devPS.c:2638 devPS.c:6415 devWindows.c:784
+#: devPS.c:2645 devPS.c:6422 devWindows.c:801
 #, fuzzy
 msgid "invalid line end"
 msgstr "Ugyldig linjeafslutning"
 
-#: devPS.c:2657 devPS.c:6434 devWindows.c:797
+#: devPS.c:2664 devPS.c:6441 devWindows.c:814
 #, fuzzy
 msgid "invalid line join"
 msgstr "Ugyldig linjeforbindelse"
@@ -255,71 +275,71 @@ msgstr "Ugyldig linjeforbindelse"
 # http://en.wikipedia.org/wiki/Miter_joint
 # må være gering på dansk
 # http://www.denstoredanske.dk/It,_teknik_og_naturvidenskab/Teknik/Boring,_s%C3%A6nkning_og_rivning/gering
-#: devPS.c:2665
+#: devPS.c:2672
 #, fuzzy
 msgid "invalid line mitre"
 msgstr "Ugyldig linjegering"
 
-#: devPS.c:2874 devPS.c:3770 devPS.c:4218 devPS.c:4245 devPS.c:5255
-#: devPS.c:7761 devPS.c:7806
+#: devPS.c:2881 devPS.c:3777 devPS.c:4225 devPS.c:4252 devPS.c:5262
+#: devPS.c:7768 devPS.c:7813
 #, c-format
 msgid "attempt to use invalid font %d replaced by font 1"
 msgstr "forsøg på at bruge ugyldig skrifttype %d erstattet af skrifttype 1"
 
-#: devPS.c:3096 devPS.c:4720 devPS.c:5834
+#: devPS.c:3103 devPS.c:4727 devPS.c:5841
 #, c-format
 msgid "filename too long in %s()"
 msgstr "filnavn er for langt i %s()"
 
-#: devPS.c:3102 devPS.c:4726 devPS.c:5840
+#: devPS.c:3109 devPS.c:4733 devPS.c:5847
 #, c-format
 msgid "memory allocation problem in %s()"
 msgstr "allokeringsproblem for hukommelsen i %s()"
 
-#: devPS.c:3119 devPS.c:5900
+#: devPS.c:3126 devPS.c:5907
 #, c-format
 msgid "encoding path is too long in %s()"
 msgstr "kodningssti er for lang i %s()"
 
-#: devPS.c:3133 devPS.c:4766
+#: devPS.c:3140 devPS.c:4773
 #, c-format
 msgid "failed to load encoding file in %s()"
 msgstr "kunne ikke indlæse kodningsfil i %s()"
 
-#: devPS.c:3178 devPS.c:3241 devPS.c:5959 devPS.c:6014 devPS.c:7641
+#: devPS.c:3185 devPS.c:3248 devPS.c:5966 devPS.c:6021 devPS.c:7648
 #, fuzzy
 msgid "invalid font type"
 msgstr "Ugyldig skrifttype"
 
-#: devPS.c:3202
+#: devPS.c:3209
 #, fuzzy
 msgid "failed to initialise default PostScript font"
 msgstr "Kunne ikke initialisere standardskriften for PostScript"
 
-#: devPS.c:3268
+#: devPS.c:3275
 #, fuzzy
 msgid "failed to initialise additional PostScript fonts"
 msgstr "Kunne ikke initialisere yderligere PostScript-skrifter"
 
-#: devPS.c:3284
+#: devPS.c:3291
 msgid "invalid foreground/background color (postscript)"
 msgstr "ugyldig forgrund- eller baggrundsfarve (postscript)"
 
-#: devPS.c:3289
+#: devPS.c:3296
 msgid "'command' is too long"
 msgstr "'kommando' er for lang"
 
-#: devPS.c:3294
+#: devPS.c:3301
 #, fuzzy
 msgid "'postscript(print.it=TRUE)' used with an empty 'print' command"
 msgstr "postscript(print.it=TRUE) brugt med en tom print-kommando"
 
-#: devPS.c:3343
+#: devPS.c:3350
 #, c-format
 msgid "invalid page type '%s' (postscript)"
 msgstr "ugyldig sidetype '%s' (postscript)"
 
-#: devPS.c:3457 devPS.c:4570 devWindows.c:2341
+#: devPS.c:3464 devPS.c:4577 devWindows.c:2346
 msgid ""
 "semi-transparency is not supported on this device: reported only once per "
 "page"
@@ -327,17 +347,17 @@ msgstr ""
 "semitransparens er ikke understøttet på denne enhed: kun rapporteret en gang "
 "per side"
 
-#: devPS.c:3563 devPS.c:3572
+#: devPS.c:3570 devPS.c:3579
 #, c-format
 msgid "cannot open 'postscript' pipe to '%s'"
 msgstr "kan ikke åbne postscript-datakanal til '%s'"
 
-#: devPS.c:3583 devPS.c:4975 devPS.c:4986 devPS.c:7066 qdPDF.c:98
+#: devPS.c:3590 devPS.c:4982 devPS.c:4993 devPS.c:7073 qdPDF.c:98
 #, c-format
 msgid "cannot open file '%s'"
 msgstr "kan ikke åbne fil '%s'"
 
-#: devPS.c:3711 devPS.c:3726
+#: devPS.c:3718 devPS.c:3733
 #, c-format
 msgid ""
 "error from postscript() in running:\n"
@@ -346,187 +366,187 @@ msgstr ""
 "fejl fra postscript() under kørsel af:\n"
 "    %s"
 
-#: devPS.c:3758
+#: devPS.c:3765
 #, fuzzy, c-format
 msgid "CID family '%s' not included in postscript() device"
 msgstr "CID-familie '%s' er ikke inkluderet i PostScript-enhed"
 
 # 91%
-#: devPS.c:3776 devPS.c:3787 devPS.c:4225 devPS.c:4255 devPS.c:4360
+#: devPS.c:3783 devPS.c:3794 devPS.c:4232 devPS.c:4262 devPS.c:4367
 #, fuzzy, c-format
 msgid "family '%s' not included in postscript() device"
 msgstr "familie '%s' er ikke inkluderet i PostScript-enhed"
 
-#: devPS.c:4300
+#: devPS.c:4307
 #, c-format
 msgid "unknown encoding '%s' in 'mbcsToSbcs'"
 msgstr "ukendt kodning '%s' i 'mbcsToSbcs'"
 
-#: devPS.c:4310
+#: devPS.c:4317
 #, c-format
 msgid "conversion failure on '%s' in 'mbcsToSbcs': dot substituted for <%02x>"
 msgstr "konverteringsfejl på '%s' i 'mbcsToSbcs': punktum erstattet for <%02x>"
 
-#: devPS.c:4388
+#: devPS.c:4395
 #, c-format
 msgid "failed open converter to encoding '%s'"
 msgstr "fejlede åbn af omdannelsesprogram for kodning af '%s'"
 
-#: devPS.c:4406 devPS.c:5300 devPS.c:7896
+#: devPS.c:4413 devPS.c:5307 devPS.c:7903
 #, c-format
 msgid "failed in text conversion to encoding '%s'"
 msgstr "fejlede i tekstomdannelse til kodning '%s'"
 
-#: devPS.c:4584
+#: devPS.c:4591
 #, fuzzy
 msgid "ran out of colors in xfig()"
 msgstr "løb ud af farver i xfig()"
 
-#: devPS.c:4613
+#: devPS.c:4620
 #, c-format
 msgid "unimplemented line texture %08x: using Dash-double-dotted"
 msgstr "uimplementeret linjetekstur %08x: bruger Bindestreg-dobbelt-prikket"
 
-#: devPS.c:4679
+#: devPS.c:4686
 #, c-format
 msgid "unknown postscript font family '%s', using Helvetica"
 msgstr "ukendt postscript-skriftfamilie '%s', bruger Helvetica"
 
 # 81%
-#: devPS.c:4751
+#: devPS.c:4758
 msgid "invalid foreground/background color (xfig)"
 msgstr "ugyldig forgrund- eller baggrundsfarve (xfig)"
 
-#: devPS.c:4784
+#: devPS.c:4791
 #, fuzzy
 msgid "only Type 1 fonts supported for XFig"
 msgstr "Kun Type 1-skrifter understøttet for XFig"
 
 # 79%
-#: devPS.c:4797
+#: devPS.c:4804
 #, fuzzy
 msgid "failed to initialise default XFig font"
 msgstr "Kunne ikke initialisere standardskriften for XFig"
 
-#: devPS.c:4834
+#: devPS.c:4841
 #, c-format
 msgid "invalid page type '%s' (xfig)"
 msgstr "ugyldig sidetype '%s' (xfig)"
 
-#: devPS.c:4842
+#: devPS.c:4849
 #, c-format
 msgid "xfig(%s, onefile=FALSE) will only return the last plot"
 msgstr "xfig(%s, onefile=FALSE) vil kun returnere det sidste plot"
 
-#: devPS.c:4967
+#: devPS.c:4974
 msgid "empty file name"
 msgstr "tomt filnavn"
 
-#: devPS.c:5032 devPS.c:5084 devPS.c:5662 devPS.c:5706 devPS.c:7126
+#: devPS.c:5039 devPS.c:5091 devPS.c:5669 devPS.c:5713 devPS.c:7133
 msgid "write failed"
 msgstr "skrivning fejlede"
 
-#: devPS.c:5289
+#: devPS.c:5296
 #, c-format
 msgid "unable to use encoding '%s'"
 msgstr "kan ikke bruge kodning '%s'"
 
-#: devPS.c:5550 devPS.c:5553
+#: devPS.c:5557 devPS.c:5560
 msgid "failed to increase 'maxRaster'"
 msgstr "kan ikke øge 'maxRaster'"
 
-#: devPS.c:5565
+#: devPS.c:5572
 #, fuzzy
 msgid "unable to allocate raster image"
 msgstr "Kan ikke allokere raster-billede"
 
 # 77%
-#: devPS.c:5766
+#: devPS.c:5773
 #, fuzzy
 msgid "corrupt loaded encodings;  font not added"
 msgstr "Ødelagte indlæste kodninger;  skrift ikke tilføjet"
 
-#: devPS.c:5775
+#: devPS.c:5782
 #, fuzzy
 msgid "failed to record device encoding; font not added"
 msgstr "Kunne ikke optage enhedskodning: skrifttype ikke tilføjet"
 
-#: devPS.c:5886
+#: devPS.c:5893
 msgid "increasing the PDF version to 1.2"
 msgstr "øger PDF-versionen til 1.2"
 
-#: devPS.c:5916
+#: devPS.c:5923
 msgid "failed to load default encoding"
 msgstr "kunne ikke indlæse standardkodning"
 
 # 79%
-#: devPS.c:5982
+#: devPS.c:5989
 #, fuzzy
 msgid "failed to initialise default PDF font"
 msgstr "Kunne ikke initialisere standardskriften for PDF"
 
 # 81%
-#: devPS.c:6037
+#: devPS.c:6044
 #, fuzzy
 msgid "failed to initialise additional PDF fonts"
 msgstr "Kunne ikke initialisere yderligere PDF-skrifter"
 
 # 75%
-#: devPS.c:6050
+#: devPS.c:6057
 msgid "failed to allocate rasters"
 msgstr "kunne ikke allokere rastere"
 
-#: devPS.c:6057
+#: devPS.c:6064
 msgid "failed to allocate masks"
 msgstr "kunne ikke allokere masker"
 
-#: devPS.c:6120
+#: devPS.c:6127
 #, c-format
 msgid "invalid paper type '%s' (pdf)"
 msgstr "ugyldig papirtype '%s' (pdf)"
 
 # 81%
-#: devPS.c:6144
+#: devPS.c:6151
 msgid "invalid foreground/background color (pdf)"
 msgstr "ugyldig forgrund- eller baggrundsfarve (pdf)"
 
-#: devPS.c:6263
+#: devPS.c:6270
 #, fuzzy
 msgid "invalid 'alpha' value in PDF"
 msgstr "Ugyldig alfaværdi i PDF"
 
-#: devPS.c:6288
+#: devPS.c:6295
 msgid "increasing the PDF version to 1.4"
 msgstr "øger PDF-versionen til 1.4"
 
-#: devPS.c:6339 devPS.c:6386
+#: devPS.c:6346 devPS.c:6393
 msgid "unknown 'colormodel', using 'srgb'"
 msgstr "ukendt 'colormodel', bruger 'srgb'"
 
-#: devPS.c:6580
+#: devPS.c:6587
 #, fuzzy
 msgid "failed to load sRGB colorspace file"
 msgstr "Kunne ikke indlæse sRGB-farverumsfil"
 
-#: devPS.c:6844
+#: devPS.c:6851
 #, fuzzy
 msgid "corrupt encodings in PDF device"
 msgstr "Ødelagte kodninger i PDF-enhed"
 
-#: devPS.c:6925
+#: devPS.c:6932
 msgid "increasing the PDF version to 1.3"
 msgstr "øger PDF-versionen til 1.3"
 
-#: devPS.c:7050
+#: devPS.c:7057
 #, fuzzy, c-format
 msgid "cannot open 'pdf' pipe to '%s'"
 msgstr "kan ikke åbne postscript-datakanal til '%s'"
 
-#: devPS.c:7056
+#: devPS.c:7063
 msgid "file = \"|cmd\" implies 'onefile = TRUE'"
 msgstr ""
 
-#: devPS.c:7199
+#: devPS.c:7206
 #, c-format
 msgid ""
 "cannot open 'pdf' file argument '%s'\n"
@@ -535,35 +555,35 @@ msgstr ""
 "kan ikke åbne 'pdf-filargument' '%s'\n"
 "  luk venligst PDF-enheden ned"
 
-#: devPS.c:7666 devPS.c:8028 devPS.c:8075
+#: devPS.c:7673 devPS.c:8035 devPS.c:8082
 #, fuzzy
 msgid "failed to find or load PDF font"
 msgstr "Kunne ikke finde eller indlæse PDF-skrift"
 
-#: devPS.c:7850 devPS.c:7983
+#: devPS.c:7857 devPS.c:7990
 #, fuzzy
 msgid "failed to find or load PDF CID font"
 msgstr "Kunne ikke finde eller indlæse PDF CID-skrift"
 
-#: devPS.c:8214 devPS.c:8218 devPS.c:8378 devPS.c:8382
+#: devPS.c:8221 devPS.c:8225 devPS.c:8386 devPS.c:8390
 #, c-format
 msgid "invalid 'family' parameter in %s"
 msgstr "ugyldigt 'family'-parameter i %s"
 
-#: devPS.c:8236 devPS.c:8394
+#: devPS.c:8243 devPS.c:8402
 #, c-format
 msgid "invalid 'fonts' parameter in %s"
 msgstr "ugyldigt 'fonts'-parameter i %s"
 
-#: devPS.c:8242 devPS.c:8404 devPS.c:8407 devWindows.c:3648 devWindows.c:3652
-#: devWindows.c:3660 devWindows.c:3671 devWindows.c:3677 devWindows.c:3684
-#: devWindows.c:3691 devWindows.c:3695
+#: devPS.c:8249 devPS.c:8412 devPS.c:8415 devWindows.c:3646 devWindows.c:3650
+#: devWindows.c:3658 devWindows.c:3669 devWindows.c:3675 devWindows.c:3682
+#: devWindows.c:3689 devWindows.c:3693
 #, c-format
 msgid "invalid value of '%s'"
 msgstr "ugyldig værdi for '%s'"
 
 # 85%
-#: devPS.c:8255 devPS.c:8322 devPS.c:8421 devPicTeX.c:740 devWindows.c:3732
+#: devPS.c:8262 devPS.c:8329 devPS.c:8429 devPicTeX.c:740 devWindows.c:3734
 #, c-format
 msgid "unable to start %s() device"
 msgstr "kan ikke starte %s()-enhed"
@@ -603,152 +623,148 @@ msgid ""
 msgstr ""
 "Kan ikke oprette Quartz-enhedsmål, angivet type er måske ikke understøttet."
 
-#: devQuartz.c:1606
+#: devQuartz.c:1609
 msgid "Quartz device is not available on this platform"
 msgstr "Quartz-enhed er ikke tilgængelig på denne platform"
 
-#: devWindows.c:341 devWindows.c:387 devWindows.c:458
+#: devWindows.c:358 devWindows.c:404 devWindows.c:475
 msgid "Not enough memory to copy graphics window"
 msgstr "Ikke nok hukommelse til at kopiere grafikvindue"
 
-#: devWindows.c:346 devWindows.c:392 devWindows.c:463
+#: devWindows.c:363 devWindows.c:409 devWindows.c:480
 msgid "No device available to copy graphics window"
 msgstr "Ingen enhed tilgængelig til at kopiere grafikvindue"
 
-#: devWindows.c:396 devWindows.c:467
+#: devWindows.c:413 devWindows.c:484
 #, c-format
 msgid "'%%' is not allowed in file name"
 msgstr "'%%' er ikke tilladt i filnavnet"
 
-#: devWindows.c:604
+#: devWindows.c:621
 #, fuzzy
 msgid "invalid font specification"
 msgstr "Ugyldig skriftspecifikation"
 
 # 77%
-#: devWindows.c:643
+#: devWindows.c:660
 #, fuzzy
 msgid "font family not found in Windows font database"
 msgstr "Skriftfamilie ikke fundet i Windows-skriftdatabasen"
 
-#: devWindows.c:1074
+#: devWindows.c:1091
 msgid "plot history seems corrupted"
 msgstr "plot-historik ser ud til at være ødelagt"
 
-#: devWindows.c:1081
+#: devWindows.c:1098
 msgid "no plot history!"
 msgstr "ingen plot-historik!"
 
 # 83%
-#: devWindows.c:1798
+#: devWindows.c:1815
 #, c-format
 msgid "filename too long in %s() call"
 msgstr "filnavn er for langt i %s()-kald"
 
-#: devWindows.c:1807 devWindows.c:1846 devWindows.c:1880
+#: devWindows.c:1820 devWindows.c:1855 devWindows.c:1885
 #, c-format
 msgid "'width=%d, height=%d' are unlikely values in pixels"
 msgstr "'bredde=%d, højde=%d' er usandsynlige værdier i billedpunkter"
 
-#: devWindows.c:1815 devWindows.c:1820 devWindows.c:1849 devWindows.c:1854
-#: devWindows.c:1883 devWindows.c:1888
+#: devWindows.c:1828 devWindows.c:1833 devWindows.c:1858 devWindows.c:1863
+#: devWindows.c:1888 devWindows.c:1893
 #, fuzzy
 msgid "unable to allocate bitmap"
 msgstr "Kan ikke allokere bitmap"
 
-#: devWindows.c:1826 devWindows.c:1860 devWindows.c:2184
+#: devWindows.c:1839 devWindows.c:1869 devWindows.c:2189
 #, fuzzy, c-format
 msgid "unable to open file '%s' for writing"
 msgstr "Kan ikke åbne fil '%s' for skrivning"
 
-#: devWindows.c:1843
+#: devWindows.c:1852
 msgid "filename too long in jpeg() call"
 msgstr "filnavn for langt i jpeg()-kald"
 
-#: devWindows.c:1877
+#: devWindows.c:1882
 msgid "filename too long in tiff() call"
 msgstr "filnavn for langt i tiff()-kald"
 
-#: devWindows.c:1909
+#: devWindows.c:1914
 msgid "filename too long in win.metafile() call"
 msgstr "filnavn for langt i win.metafile()-kald"
 
-#: devWindows.c:1919
+#: devWindows.c:1924
 #, fuzzy, c-format
 msgid "unable to open metafile '%s' for writing"
 msgstr "Kan ikke åben metafil '%s' for skrivning"
 
-#: devWindows.c:1921
+#: devWindows.c:1926
 #, fuzzy
 msgid "unable to open clipboard to write metafile"
 msgstr "Kan ikke åbne udklipsholder for at skrive metafil"
 
-#: devWindows.c:2132
+#: devWindows.c:2137
 msgid "Insufficient memory for resize. Killing device"
 msgstr "Ikke nok hukommelse for ændring af størrelse. Dræber enhed"
 
-#: devWindows.c:2140
+#: devWindows.c:2145
 msgid "Insufficient memory for resize. Disabling alpha blending"
 msgstr "Ikke nok hukommelse for at ændre størrelse. Deaktiverer alfablanding"
 
-#: devWindows.c:2169
+#: devWindows.c:2174
 #, fuzzy
 msgid "a clipboard metafile can store only one figure."
 msgstr "En metafil for udklipsholderen kan kun lagre en figur."
 
 # 76%
-#: devWindows.c:2175
+#: devWindows.c:2180
 #, c-format
 msgid "metafile '%s' could not be created"
 msgstr "metafilfil '%s' kunne ikke oprettes"
 
-#: devWindows.c:3112 devWindows.c:3756
+#: devWindows.c:3117 devWindows.c:3758
 msgid "R Graphics"
 msgstr "R-grafik"
 
-#: devWindows.c:3126
+#: devWindows.c:3131
 msgid "attempt to use the locator after dev.hold()"
 msgstr "forsøg på at bruge afgrænseren efter dev.hold()"
 
-#: devWindows.c:3392
+#: devWindows.c:3397
 msgid "option 'windowsTimeouts' should be integer"
 msgstr "tilvalg 'windows Timeouts' skal være et heltal"
 
-#: devWindows.c:3413
+#: devWindows.c:3418
 msgid "invalid device number in 'savePlot'"
 msgstr "ugyldigt enhedstal i 'savePlot'"
 
-#: devWindows.c:3415
+#: devWindows.c:3420
 msgid "invalid device in 'savePlot'"
 msgstr "ugyldig enhed i 'savePlot'"
 
-#: devWindows.c:3418
+#: devWindows.c:3423
 #, fuzzy
 msgid "invalid filename argument in 'savePlot'"
 msgstr "ugyldigt filnavnsargument i savePlot"
 
-#: devWindows.c:3423
+#: devWindows.c:3428
 msgid "invalid type argument in 'savePlot'"
 msgstr "ugyldigt typeargument i 'savePlot'"
 
-#: devWindows.c:3450
+#: devWindows.c:3455
 msgid "unknown type in savePlot"
 msgstr "ukendt type i savePlot"
 
-#: devWindows.c:3495 devWindows.c:3528 devWindows.c:3557 devWindows.c:3589
-#: devWindows.c:3614
+#: devWindows.c:3500 devWindows.c:3532 devWindows.c:3560 devWindows.c:3591
+#: devWindows.c:3612
 msgid "processing of the plot ran out of memory"
 msgstr "behandlingem af plottet løb tør for hukommelse"
 
-#: devWindows.c:3574
+#: devWindows.c:3576
 msgid "Impossible to open "
 msgstr "Umulig at åbne "
 
-#: devWindows.c:3601
-msgid "Impossible to load Rbitmap.dll"
-msgstr "Umuligt at indlæse Rbitmap.dll"
-
-#: devWindows.c:3643
+#: devWindows.c:3641
 msgid "invalid 'width' or 'height'"
 msgstr "ugyldig 'bredde' eller 'højde'"
 
@@ -771,11 +787,14 @@ msgstr "QuartzBitmap_Output - kan ikke åbne fil '%s'"
 msgid "not a supported scheme, no image data written"
 msgstr "Ikke et understøttet skema, ingen billeddata skrevet"
 
-#: stubs.c:99
+#: stubs.c:104
 #, fuzzy, c-format
 msgid "invalid '%s' argument"
 msgstr "ugyldigt 'fil'-argument"
 
+#~ msgid "Impossible to load Rbitmap.dll"
+#~ msgstr "Umuligt at indlæse Rbitmap.dll"
+
 #~ msgid "Invalid line end"
 #~ msgstr "Ugyldig linjeafslutning"
 
diff --git a/src/library/grDevices/po/de.po b/src/library/grDevices/po/de.po
index 2090e56..126e632 100644
--- a/src/library/grDevices/po/de.po
+++ b/src/library/grDevices/po/de.po
@@ -4,108 +4,128 @@
 # Detlef Steuer <steuer at hsu-hh.de>, 2009-2014.
 msgid ""
 msgstr ""
-"Project-Id-Version: R-3.1.0\n"
-"Report-Msgid-Bugs-To: bugs.r-project.org\n"
-"POT-Creation-Date: 2014-03-27 07:46+0000\n"
-"PO-Revision-Date: 2013-03-01 10:48+0100\n"
+"Project-Id-Version: R-3.2.0\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2016-04-01 10:28-0700\n"
+"PO-Revision-Date: 2015-03-20 16:05+0100\n"
 "Last-Translator: Detlef Steuer <steuer at hsu-hh.de>\n"
 "Language-Team: R-Core <R-core at r-project.org>\n"
-"Language: \n"
+"Language: de\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 7bit\n"
 "Plural-Forms: nplurals=2; plural=n == 1 ? 0 : 1;\n"
 
-#: axis_scales.c:37 axis_scales.c:38 axis_scales.c:53
+#: axis_scales.c:37 axis_scales.c:38 axis_scales.c:55
 #, c-format
 msgid "'%s' must be numeric of length %d"
 msgstr "'%s' muss numerisch sein mit Länge %d"
 
 #: colors.c:69
 #, c-format
+msgid "color intensity %s, not in [0,1]"
+msgstr "Farbintensität %s nicht in [0, 1]"
+
+#: colors.c:71
+#, c-format
 msgid "color intensity %g, not in [0,1]"
 msgstr "Farbintensität %g nicht in [0, 1]"
 
-#: colors.c:76
+#: colors.c:78
+#, c-format
+msgid "color intensity %s, not in 0:255"
+msgstr "Farbintensität %s nicht in 0:255"
+
+#: colors.c:80
 #, c-format
 msgid "color intensity %d, not in 0:255"
 msgstr "Farbintensität %d nicht in 1:255"
 
-#: colors.c:83
+#: colors.c:87
+#, c-format
+msgid "alpha level %s, not in [0,1]"
+msgstr "alpha Level %s nicht in [0, 1]"
+
+#: colors.c:89
 #, c-format
 msgid "alpha level %g, not in [0,1]"
 msgstr "alpha Level %g nicht in [0, 1]"
 
-#: colors.c:90
+#: colors.c:96
+#, c-format
+msgid "alpha level %s, not in 0:255"
+msgstr "alpha Level %s nicht in 0:255"
+
+#: colors.c:98
 #, c-format
 msgid "alpha level %d, not in 0:255"
 msgstr "alpha Level %d nicht in 0:255"
 
-#: colors.c:118
+#: colors.c:126
 msgid "bad hsv to rgb color conversion"
 msgstr "schlechte HSV nach RGB Konvertierung"
 
-#: colors.c:207 colors.c:221
+#: colors.c:218 colors.c:232
 msgid "invalid hsv color"
 msgstr "unzulässige HSV Farbe"
 
-#: colors.c:333 colors.c:353
+#: colors.c:344 colors.c:364
 msgid "invalid hcl color"
 msgstr "unzulässige HCL Farbe"
 
-#: colors.c:385
+#: colors.c:396
 msgid "invalid value of 'maxColorValue'"
 msgstr "unzulässiger Wert von 'maxColorValue'"
 
-#: colors.c:413
+#: colors.c:424
 msgid "invalid 'names' vector"
 msgstr "unzulässiger 'names' Vektor"
 
-#: colors.c:472 colors.c:481
+#: colors.c:483 colors.c:492
 msgid "invalid gray level, must be in [0,1]."
 msgstr "unzulässige Graustufe, muss aus [0, 1] sein"
 
-#: colors.c:537
+#: colors.c:548
 #, c-format
 msgid "invalid '%s' value"
 msgstr "unzulässiger '%s' Wert"
 
-#: colors.c:1329
+#: colors.c:1340
 msgid "invalid hex digit in 'color' or 'lty'"
 msgstr "unzulässige Hexadezimalziffer in 'color' oder 'lty'"
 
-#: colors.c:1339 colors.c:1349
+#: colors.c:1350 colors.c:1360
 msgid "invalid RGB specification"
 msgstr "unzulässige RGB Spezifikation"
 
-#: colors.c:1382
+#: colors.c:1393
 #, c-format
 msgid "invalid color name '%s'"
 msgstr "ungültiger Farbname in '%s'"
 
-#: colors.c:1432 colors.c:1441
+#: colors.c:1443 colors.c:1452
 #, c-format
 msgid "invalid color specification \"%s\""
 msgstr "Unzulässige Farbspezifikation \"%s\""
 
-#: colors.c:1469
+#: colors.c:1480
 msgid "supplied color is neither numeric nor character"
 msgstr "angegebene Farbe ist weder numerisch noch Zeichenkette"
 
-#: colors.c:1473
+#: colors.c:1484
 #, c-format
 msgid "numerical color values must be >= 0, found %d"
 msgstr "numerische Farbe muss >= 0 sein, gefunden %d"
 
-#: colors.c:1484
+#: colors.c:1495
 msgid "invalid argument type"
 msgstr "unzulässiger Argumenttyp"
 
-#: colors.c:1495
+#: colors.c:1506
 msgid "unknown palette (need >= 2 colors)"
 msgstr "unbekannte Palette (brauche >= 2 Farben)"
 
-#: colors.c:1499 colors.c:1521
+#: colors.c:1510 colors.c:1532
 #, c-format
 msgid "maximum number of colors is %d"
 msgstr "maximale Zahl von Farben ist %d"
@@ -119,7 +139,7 @@ msgstr "afm Datei '%s' konnte nicht geöffnet werden"
 msgid "unknown AFM entity encountered"
 msgstr "unbekannte AFM Entität aufgetreten"
 
-#: devPS.c:740 devPS.c:743 devPS.c:4420 devPS.c:7911 devPicTeX.c:484
+#: devPS.c:740 devPS.c:743 devPS.c:4427 devPS.c:7918 devPicTeX.c:484
 #: devPicTeX.c:486
 #, c-format
 msgid "invalid string in '%s'"
@@ -202,112 +222,112 @@ msgstr "Laden der Kodierungsdatei '%s' fehlgeschlagen"
 msgid "invalid font name or more than one font name"
 msgstr "Ungültiger Zeichensatzname, oder mehr als ein Zeichensatzname"
 
-#: devPS.c:1595 devPS.c:1630
+#: devPS.c:1596 devPS.c:1631
 #, c-format
 msgid "font family '%s' not found in PostScript font database"
 msgstr ""
 "Zeichensatzfamilie '%s' in der PostScript-Zeichensatzdatenbank nicht gefunden"
 
-#: devPS.c:1702 devPS.c:1784 devPS.c:1811
+#: devPS.c:1703 devPS.c:1785 devPS.c:1812
 #, c-format
 msgid "font encoding for family '%s' not found in font database"
 msgstr ""
 "Zeichensatzkodierung für die Familie '%s' in der Zeichensatzdatenbank nicht "
 "gefunden"
 
-#: devPS.c:1729 devPS.c:1756
+#: devPS.c:1730 devPS.c:1757
 #, c-format
 msgid "font CMap for family '%s' not found in font database"
 msgstr ""
 "Zeichensatz CMap für Familie '%s' in der Zeichensatzdatenbank nicht gefunden"
 
-#: devPS.c:1950 devPS.c:2029 devPS.c:2097
+#: devPS.c:1952 devPS.c:2032 devPS.c:2100
 #, c-format
 msgid "cannot load afm file '%s'"
 msgstr "kann afm Datei '%s' nicht laden"
 
-#: devPS.c:2385
+#: devPS.c:2388
 msgid "corrupt loaded encodings;  encoding not recorded"
 msgstr "Beschädigte geladene Kodierung; Kodierung nicht aufgezeichnet"
 
-#: devPS.c:2396
+#: devPS.c:2399
 msgid "failed to record device encoding"
 msgstr "Speichern der Gerätekodierung fehlgeschlagen"
 
-#: devPS.c:2565
+#: devPS.c:2570
 msgid "object '.ps.prolog' is not a character vector"
 msgstr "Objekt '.ps.prolog' ist keine Zeichenkette"
 
-#: devPS.c:2638 devPS.c:6415 devWindows.c:784
+#: devPS.c:2645 devPS.c:6422 devWindows.c:801
 msgid "invalid line end"
 msgstr "unzulässiges Zeilenende"
 
-#: devPS.c:2657 devPS.c:6434 devWindows.c:797
+#: devPS.c:2664 devPS.c:6441 devWindows.c:814
 msgid "invalid line join"
 msgstr "unzulässige Zeilenverbindung"
 
-#: devPS.c:2665
+#: devPS.c:2672
 msgid "invalid line mitre"
 msgstr "unzulässige Zeilenkappung"
 
-#: devPS.c:2874 devPS.c:3770 devPS.c:4218 devPS.c:4245 devPS.c:5255
-#: devPS.c:7761 devPS.c:7806
+#: devPS.c:2881 devPS.c:3777 devPS.c:4225 devPS.c:4252 devPS.c:5262
+#: devPS.c:7768 devPS.c:7813
 #, c-format
 msgid "attempt to use invalid font %d replaced by font 1"
 msgstr ""
 "Versuch den unzulässigen Zeichensatz %d zu benutzen, nutze stattdessen "
 "Zeichensatz 1"
 
-#: devPS.c:3096 devPS.c:4720 devPS.c:5834
+#: devPS.c:3103 devPS.c:4727 devPS.c:5841
 #, c-format
 msgid "filename too long in %s()"
 msgstr "Dateiname in %s() zu lang"
 
-#: devPS.c:3102 devPS.c:4726 devPS.c:5840
+#: devPS.c:3109 devPS.c:4733 devPS.c:5847
 #, c-format
 msgid "memory allocation problem in %s()"
 msgstr "Speicherreservierungsproblem in %s()"
 
-#: devPS.c:3119 devPS.c:5900
+#: devPS.c:3126 devPS.c:5907
 #, c-format
 msgid "encoding path is too long in %s()"
 msgstr "Kodierungspfad ist zu lang in %s()"
 
-#: devPS.c:3133 devPS.c:4766
+#: devPS.c:3140 devPS.c:4773
 #, c-format
 msgid "failed to load encoding file in %s()"
 msgstr "Laden der Kodierungsdatei in %s() fehlgeschlagen"
 
-#: devPS.c:3178 devPS.c:3241 devPS.c:5959 devPS.c:6014 devPS.c:7641
+#: devPS.c:3185 devPS.c:3248 devPS.c:5966 devPS.c:6021 devPS.c:7648
 msgid "invalid font type"
 msgstr "unzulässiger Zeichensatztyp"
 
-#: devPS.c:3202
+#: devPS.c:3209
 msgid "failed to initialise default PostScript font"
 msgstr "konnte den standard Postscriptzeichensatz nicht initialisieren"
 
-#: devPS.c:3268
+#: devPS.c:3275
 msgid "failed to initialise additional PostScript fonts"
 msgstr "konnte zusätzliche PostScript Zeichensätze nicht initialisieren"
 
-#: devPS.c:3284
+#: devPS.c:3291
 msgid "invalid foreground/background color (postscript)"
 msgstr "unzulässige Vordergrund-/Hintergrundfarbe (postscript)"
 
-#: devPS.c:3289
+#: devPS.c:3296
 msgid "'command' is too long"
 msgstr "'command' ist zu lang"
 
-#: devPS.c:3294
+#: devPS.c:3301
 msgid "'postscript(print.it=TRUE)' used with an empty 'print' command"
 msgstr "'postscript(print.it=TRUE)' mit leerem 'print' Befehl benutzt"
 
-#: devPS.c:3343
+#: devPS.c:3350
 #, c-format
 msgid "invalid page type '%s' (postscript)"
 msgstr "ungültiger Seitentyp '%s' (postscript)"
 
-#: devPS.c:3457 devPS.c:4570 devWindows.c:2341
+#: devPS.c:3464 devPS.c:4577 devWindows.c:2346
 msgid ""
 "semi-transparency is not supported on this device: reported only once per "
 "page"
@@ -315,17 +335,17 @@ msgstr ""
 "Semi-Transparenz ist für dieses Gerät nicht unterstützt; nur eine Meldung "
 "pro Seite"
 
-#: devPS.c:3563 devPS.c:3572
+#: devPS.c:3570 devPS.c:3579
 #, c-format
 msgid "cannot open 'postscript' pipe to '%s'"
 msgstr "kann die 'postscript' Pipe nach '%s' nicht öffnen"
 
-#: devPS.c:3583 devPS.c:4975 devPS.c:4986 devPS.c:7066 qdPDF.c:98
+#: devPS.c:3590 devPS.c:4982 devPS.c:4993 devPS.c:7073 qdPDF.c:98
 #, c-format
 msgid "cannot open file '%s'"
 msgstr "kann Datei '%s' nicht öffnen"
 
-#: devPS.c:3711 devPS.c:3726
+#: devPS.c:3718 devPS.c:3733
 #, c-format
 msgid ""
 "error from postscript() in running:\n"
@@ -334,169 +354,169 @@ msgstr ""
 "Fehler aus postscript() bei der Ausführung:\n"
 "    %s"
 
-#: devPS.c:3758
+#: devPS.c:3765
 #, c-format
 msgid "CID family '%s' not included in postscript() device"
 msgstr "Die CID Familie '%s' ist nicht im postscript() Gerät enthalten"
 
-#: devPS.c:3776 devPS.c:3787 devPS.c:4225 devPS.c:4255 devPS.c:4360
+#: devPS.c:3783 devPS.c:3794 devPS.c:4232 devPS.c:4262 devPS.c:4367
 #, c-format
 msgid "family '%s' not included in postscript() device"
 msgstr "Familie '%s' ist nicht im postscript() Gerät enthalten"
 
-#: devPS.c:4300
+#: devPS.c:4307
 #, c-format
 msgid "unknown encoding '%s' in 'mbcsToSbcs'"
 msgstr "unbekannte Kodierung '%s' in 'mbcsToSbcs'"
 
-#: devPS.c:4310
+#: devPS.c:4317
 #, c-format
 msgid "conversion failure on '%s' in 'mbcsToSbcs': dot substituted for <%02x>"
 msgstr "Konvertierungsfehler für '%s' in 'mbcsToSbcs': Punkt ersetzt <%02x>"
 
-#: devPS.c:4388
+#: devPS.c:4395
 #, c-format
 msgid "failed open converter to encoding '%s'"
 msgstr "konnte Konverter für Kodierung '%s' nicht öffnen"
 
-#: devPS.c:4406 devPS.c:5300 devPS.c:7896
+#: devPS.c:4413 devPS.c:5307 devPS.c:7903
 #, c-format
 msgid "failed in text conversion to encoding '%s'"
 msgstr "konnte Text nicht in Kodierung '%s' konvertieren"
 
-#: devPS.c:4584
+#: devPS.c:4591
 msgid "ran out of colors in xfig()"
 msgstr "keine Farben mehr übrig in xfig()"
 
-#: devPS.c:4613
+#: devPS.c:4620
 #, c-format
 msgid "unimplemented line texture %08x: using Dash-double-dotted"
 msgstr "unimplementierte Zeilentextur %08x: nutze Strich-Punkt-Punkt"
 
-#: devPS.c:4679
+#: devPS.c:4686
 #, c-format
 msgid "unknown postscript font family '%s', using Helvetica"
 msgstr "unbekannte Postscript-Zeichensatzfamilie '%s', nutzt Helvetica"
 
-#: devPS.c:4751
+#: devPS.c:4758
 msgid "invalid foreground/background color (xfig)"
 msgstr "ungültige Vorder-/Hintergrundfarbe (xfig)"
 
-#: devPS.c:4784
+#: devPS.c:4791
 msgid "only Type 1 fonts supported for XFig"
 msgstr "es werden nur Type 1 Zeichensätze für XFig unterstützt"
 
-#: devPS.c:4797
+#: devPS.c:4804
 msgid "failed to initialise default XFig font"
 msgstr "konnte den Standard-Zeichensatz für XFig nicht initialisieren"
 
-#: devPS.c:4834
+#: devPS.c:4841
 #, c-format
 msgid "invalid page type '%s' (xfig)"
 msgstr "unzulässiger Seitentyp '%s' (xfig)"
 
-#: devPS.c:4842
+#: devPS.c:4849
 #, c-format
 msgid "xfig(%s, onefile=FALSE) will only return the last plot"
 msgstr "xfig(%s, onfile=FALSE) liefert nur die letzte Grafik"
 
-#: devPS.c:4967
+#: devPS.c:4974
 msgid "empty file name"
 msgstr "leerer Dateinamen"
 
-#: devPS.c:5032 devPS.c:5084 devPS.c:5662 devPS.c:5706 devPS.c:7126
+#: devPS.c:5039 devPS.c:5091 devPS.c:5669 devPS.c:5713 devPS.c:7133
 msgid "write failed"
 msgstr "Schreiben fehlgeschlagen"
 
-#: devPS.c:5289
+#: devPS.c:5296
 #, c-format
 msgid "unable to use encoding '%s'"
 msgstr "kann Kodierung '%s' nicht nutzen"
 
-#: devPS.c:5550 devPS.c:5553
+#: devPS.c:5557 devPS.c:5560
 msgid "failed to increase 'maxRaster'"
 msgstr "konnte 'maxRaster' nicht vergrößern"
 
-#: devPS.c:5565
+#: devPS.c:5572
 msgid "unable to allocate raster image"
 msgstr "kann Rasterimage nicht allozieren"
 
-#: devPS.c:5766
+#: devPS.c:5773
 msgid "corrupt loaded encodings;  font not added"
 msgstr "Geladene Kodierungen sind beschädigt; Zeichensatz nicht hinzugefügt"
 
-#: devPS.c:5775
+#: devPS.c:5782
 msgid "failed to record device encoding; font not added"
 msgstr ""
 "konnte Gerätekodierung nicht aufzeichnen; Zeichensatz nicht hinzugefügt"
 
-#: devPS.c:5886
+#: devPS.c:5893
 msgid "increasing the PDF version to 1.2"
 msgstr "PDF Version auf 1.2 erhöht"
 
-#: devPS.c:5916
+#: devPS.c:5923
 msgid "failed to load default encoding"
 msgstr "konnte Standardkodierung nicht laden"
 
-#: devPS.c:5982
+#: devPS.c:5989
 msgid "failed to initialise default PDF font"
 msgstr "Konnte den Standard-Zeichensatz für PDF nicht initialisieren"
 
-#: devPS.c:6037
+#: devPS.c:6044
 msgid "failed to initialise additional PDF fonts"
 msgstr "Konnte zusätzliche PDF Zeichensätze nicht initialisieren"
 
-#: devPS.c:6050
+#: devPS.c:6057
 msgid "failed to allocate rasters"
 msgstr "konnte Raster nicht allozieren"
 
-#: devPS.c:6057
+#: devPS.c:6064
 msgid "failed to allocate masks"
 msgstr "konnte Masken nicht allozieren"
 
-#: devPS.c:6120
+#: devPS.c:6127
 #, c-format
 msgid "invalid paper type '%s' (pdf)"
 msgstr "ungültiger Papiertyp '%s' (pdf)"
 
-#: devPS.c:6144
+#: devPS.c:6151
 msgid "invalid foreground/background color (pdf)"
 msgstr "ungültige Vorder-/Hintergrundfarbe (pdf)"
 
-#: devPS.c:6263
+#: devPS.c:6270
 msgid "invalid 'alpha' value in PDF"
 msgstr "unzulässiger alpha Wert in PDF"
 
-#: devPS.c:6288
+#: devPS.c:6295
 msgid "increasing the PDF version to 1.4"
 msgstr "PDF Version auf 1.4 erhöht"
 
-#: devPS.c:6339 devPS.c:6386
+#: devPS.c:6346 devPS.c:6393
 msgid "unknown 'colormodel', using 'srgb'"
 msgstr "unbekanntes 'colormodel', nutze 'srgb'"
 
-#: devPS.c:6580
+#: devPS.c:6587
 msgid "failed to load sRGB colorspace file"
 msgstr "Laden der sRGB Farbraumdatei fehlgeschlagen"
 
-#: devPS.c:6844
+#: devPS.c:6851
 msgid "corrupt encodings in PDF device"
 msgstr "Beschädigte Kodierungen im PDF Gerät"
 
-#: devPS.c:6925
+#: devPS.c:6932
 msgid "increasing the PDF version to 1.3"
 msgstr "PDF Version auf 1.3 erhöht"
 
-#: devPS.c:7050
+#: devPS.c:7057
 #, c-format
 msgid "cannot open 'pdf' pipe to '%s'"
 msgstr "kann die 'pdf' Pipe nach '%s' nicht öffnen"
 
-#: devPS.c:7056
+#: devPS.c:7063
 msgid "file = \"|cmd\" implies 'onefile = TRUE'"
 msgstr "file = \"|cmd\" impliziert 'onefile = TRUE'"
 
-#: devPS.c:7199
+#: devPS.c:7206
 #, c-format
 msgid ""
 "cannot open 'pdf' file argument '%s'\n"
@@ -505,32 +525,32 @@ msgstr ""
 "kann das 'pdf' Dateiargument '%s' nicht öffnen;\n"
 " bitte das PDF gerät schließen"
 
-#: devPS.c:7666 devPS.c:8028 devPS.c:8075
+#: devPS.c:7673 devPS.c:8035 devPS.c:8082
 msgid "failed to find or load PDF font"
 msgstr "konnte PDF Zeichensatz nicht finden oder nicht laden"
 
-#: devPS.c:7850 devPS.c:7983
+#: devPS.c:7857 devPS.c:7990
 msgid "failed to find or load PDF CID font"
 msgstr "Konnte PDF CID Zeichensatz nicht finden oder nicht laden"
 
-#: devPS.c:8214 devPS.c:8218 devPS.c:8378 devPS.c:8382
+#: devPS.c:8221 devPS.c:8225 devPS.c:8386 devPS.c:8390
 #, c-format
 msgid "invalid 'family' parameter in %s"
 msgstr "ungültiger 'family' Parameter in %s"
 
-#: devPS.c:8236 devPS.c:8394
+#: devPS.c:8243 devPS.c:8402
 #, c-format
 msgid "invalid 'fonts' parameter in %s"
 msgstr "ungültiger 'fonts' Parameter in %s<"
 
-#: devPS.c:8242 devPS.c:8404 devPS.c:8407 devWindows.c:3648 devWindows.c:3652
-#: devWindows.c:3660 devWindows.c:3671 devWindows.c:3677 devWindows.c:3684
-#: devWindows.c:3691 devWindows.c:3695
+#: devPS.c:8249 devPS.c:8412 devPS.c:8415 devWindows.c:3646 devWindows.c:3650
+#: devWindows.c:3658 devWindows.c:3669 devWindows.c:3675 devWindows.c:3682
+#: devWindows.c:3689 devWindows.c:3693
 #, c-format
 msgid "invalid value of '%s'"
 msgstr "unzulässiger Wert von '%s'"
 
-#: devPS.c:8255 devPS.c:8322 devPS.c:8421 devPicTeX.c:740 devWindows.c:3732
+#: devPS.c:8262 devPS.c:8329 devPS.c:8429 devPicTeX.c:740 devWindows.c:3734
 #, c-format
 msgid "unable to start %s() device"
 msgstr "kann %s()-Gerät nicht starten"
@@ -568,143 +588,139 @@ msgstr ""
 "kann das quartz() Gerät als Ziel nicht erzeugen, angegebener Typ evtl. nicht "
 "unterstützt"
 
-#: devQuartz.c:1606
+#: devQuartz.c:1609
 msgid "Quartz device is not available on this platform"
 msgstr "Auf dieser Platform ist kein Quartz-Gerät verfügbar"
 
-#: devWindows.c:341 devWindows.c:387 devWindows.c:458
+#: devWindows.c:358 devWindows.c:404 devWindows.c:475
 msgid "Not enough memory to copy graphics window"
 msgstr "Nicht genug Hauptspeicher um das Grafikfenster zu kopieren"
 
-#: devWindows.c:346 devWindows.c:392 devWindows.c:463
+#: devWindows.c:363 devWindows.c:409 devWindows.c:480
 msgid "No device available to copy graphics window"
 msgstr "Kein Gerät verfügbar, um das Grafik-Fenster zu kopieren"
 
-#: devWindows.c:396 devWindows.c:467
+#: devWindows.c:413 devWindows.c:484
 #, c-format
 msgid "'%%' is not allowed in file name"
 msgstr "'%%' ist in Dateinamen nicht erlaubt"
 
-#: devWindows.c:604
+#: devWindows.c:621
 msgid "invalid font specification"
 msgstr "unzulässige Zeichensatzspezifikation"
 
-#: devWindows.c:643
+#: devWindows.c:660
 msgid "font family not found in Windows font database"
 msgstr "Zeichensatzfamilie in der Windows Zeichensatzdatenbank nicht gefunden"
 
-#: devWindows.c:1074
+#: devWindows.c:1091
 msgid "plot history seems corrupted"
 msgstr "Grafikhistorie scheint beschädigt"
 
-#: devWindows.c:1081
+#: devWindows.c:1098
 msgid "no plot history!"
 msgstr "keine Plot-Historie"
 
-#: devWindows.c:1798
+#: devWindows.c:1815
 #, c-format
 msgid "filename too long in %s() call"
 msgstr "Dateiname im Aufruf von %s() zu lang"
 
-#: devWindows.c:1807 devWindows.c:1846 devWindows.c:1880
+#: devWindows.c:1820 devWindows.c:1855 devWindows.c:1885
 #, c-format
 msgid "'width=%d, height=%d' are unlikely values in pixels"
 msgstr "'width=%d, height=%d'sind unwahrscheinliche Pixelzahlen"
 
-#: devWindows.c:1815 devWindows.c:1820 devWindows.c:1849 devWindows.c:1854
-#: devWindows.c:1883 devWindows.c:1888
+#: devWindows.c:1828 devWindows.c:1833 devWindows.c:1858 devWindows.c:1863
+#: devWindows.c:1888 devWindows.c:1893
 msgid "unable to allocate bitmap"
 msgstr "kann Bitmap nicht allozieren"
 
-#: devWindows.c:1826 devWindows.c:1860 devWindows.c:2184
+#: devWindows.c:1839 devWindows.c:1869 devWindows.c:2189
 #, c-format
 msgid "unable to open file '%s' for writing"
 msgstr "kann Datei '%s' nicht zum Schreiben öffnen"
 
-#: devWindows.c:1843
+#: devWindows.c:1852
 msgid "filename too long in jpeg() call"
 msgstr "Dateiname zu lang in jpeg() Aufruf"
 
-#: devWindows.c:1877
+#: devWindows.c:1882
 msgid "filename too long in tiff() call"
 msgstr "Dateiname zu lang in tiff() Aufruf"
 
-#: devWindows.c:1909
+#: devWindows.c:1914
 msgid "filename too long in win.metafile() call"
 msgstr "Dateiname zu lang in win.metafile() Aufruf"
 
-#: devWindows.c:1919
+#: devWindows.c:1924
 #, c-format
 msgid "unable to open metafile '%s' for writing"
 msgstr "kann Metafile '%s' nicht zum Schreiben öffnen<"
 
-#: devWindows.c:1921
+#: devWindows.c:1926
 msgid "unable to open clipboard to write metafile"
 msgstr "kann die Zwischenablage nicht zum Schreiben eines Metafiles öffnen"
 
-#: devWindows.c:2132
+#: devWindows.c:2137
 msgid "Insufficient memory for resize. Killing device"
 msgstr "Zu wenig Speicher für Größenänderung. Schalte Gerät ab."
 
-#: devWindows.c:2140
+#: devWindows.c:2145
 msgid "Insufficient memory for resize. Disabling alpha blending"
 msgstr "Zu wenig Speicher für Größenänderung. Schalte Alpha-Blending ab.<"
 
-#: devWindows.c:2169
+#: devWindows.c:2174
 msgid "a clipboard metafile can store only one figure."
 msgstr "ein Zwischenablagemetafile kann nur eine Grafik speichern."
 
-#: devWindows.c:2175
+#: devWindows.c:2180
 #, c-format
 msgid "metafile '%s' could not be created"
 msgstr "Das Metafile '%s' kann nicht erzeugt werden"
 
-#: devWindows.c:3112 devWindows.c:3756
+#: devWindows.c:3117 devWindows.c:3758
 msgid "R Graphics"
 msgstr "R Grafiken"
 
-#: devWindows.c:3126
+#: devWindows.c:3131
 msgid "attempt to use the locator after dev.hold()"
 msgstr "Versuch den Lokator zu nutzen nach Aufruf von dev.hold()"
 
-#: devWindows.c:3392
+#: devWindows.c:3397
 msgid "option 'windowsTimeouts' should be integer"
 msgstr "Option 'windowsTimeouts' sollte ganzzahlig sein"
 
-#: devWindows.c:3413
+#: devWindows.c:3418
 msgid "invalid device number in 'savePlot'"
 msgstr "unzulässige Gerätenummer in 'savePlot'"
 
-#: devWindows.c:3415
+#: devWindows.c:3420
 msgid "invalid device in 'savePlot'"
 msgstr "unzulässiges Gerät in 'savePlot'"
 
-#: devWindows.c:3418
+#: devWindows.c:3423
 msgid "invalid filename argument in 'savePlot'"
 msgstr "unzulässiges Dateinamenargument in 'savePlot'"
 
-#: devWindows.c:3423
+#: devWindows.c:3428
 msgid "invalid type argument in 'savePlot'"
 msgstr "unzulässiges Typ Argument in 'savePlot'"
 
-#: devWindows.c:3450
+#: devWindows.c:3455
 msgid "unknown type in savePlot"
 msgstr "unbekannter Typ in savePlot"
 
-#: devWindows.c:3495 devWindows.c:3528 devWindows.c:3557 devWindows.c:3589
-#: devWindows.c:3614
+#: devWindows.c:3500 devWindows.c:3532 devWindows.c:3560 devWindows.c:3591
+#: devWindows.c:3612
 msgid "processing of the plot ran out of memory"
 msgstr "Bei Bearbeitung der Grafik ging der Speicher aus"
 
-#: devWindows.c:3574
+#: devWindows.c:3576
 msgid "Impossible to open "
 msgstr "Kann nicht öffnen"
 
-#: devWindows.c:3601
-msgid "Impossible to load Rbitmap.dll"
-msgstr "Kann Rbitmap.dll nicht laden"
-
-#: devWindows.c:3643
+#: devWindows.c:3641
 msgid "invalid 'width' or 'height'"
 msgstr "unzulässige 'with' oder 'height'"
 
@@ -725,11 +741,14 @@ msgstr "QuartzBitmap_Output - kann Datei '%s' nicht öffnen"
 msgid "not a supported scheme, no image data written"
 msgstr "nicht unterstütztes Schema, keine Abbilddatei geschrieben"
 
-#: stubs.c:99
+#: stubs.c:104
 #, c-format
 msgid "invalid '%s' argument"
 msgstr "unzulässiges '%s' Argument"
 
+#~ msgid "Impossible to load Rbitmap.dll"
+#~ msgstr "Kann Rbitmap.dll nicht laden"
+
 #~ msgid "Invalid line end"
 #~ msgstr "Unzulässiges Zeilenende"
 
diff --git a/src/library/grDevices/po/en_GB.po b/src/library/grDevices/po/en_GB.po
index 404c249..1311fc5 100644
--- a/src/library/grDevices/po/en_GB.po
+++ b/src/library/grDevices/po/en_GB.po
@@ -6,108 +6,128 @@
 msgid ""
 msgstr ""
 "Project-Id-Version: R 2.1.0\n"
-"Report-Msgid-Bugs-To: bugs.r-project.org\n"
-"POT-Creation-Date: 2014-03-27 07:46+0000\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2016-04-01 10:28-0700\n"
 "PO-Revision-Date: 2005-02-22 16:55+0000\n"
 "Last-Translator: Prof Brian Ripley <ripley at stats.ox.ac.uk>\n"
 "Language-Team: English\n"
-"Language: \n"
+"Language: en_GB\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=ISO-8859-1\n"
 "Content-Transfer-Encoding: 8bit\n"
 "Plural-Forms: nplurals=2; plural=(n != 1);\n"
 
-#: axis_scales.c:37 axis_scales.c:38 axis_scales.c:53
+#: axis_scales.c:37 axis_scales.c:38 axis_scales.c:55
 #, c-format
 msgid "'%s' must be numeric of length %d"
 msgstr ""
 
 #: colors.c:69
+#, fuzzy, c-format
+msgid "color intensity %s, not in [0,1]"
+msgstr "colour intensity %g, not in [0,1]"
+
+#: colors.c:71
 #, c-format
 msgid "color intensity %g, not in [0,1]"
 msgstr "colour intensity %g, not in [0,1]"
 
-#: colors.c:76
+#: colors.c:78
+#, fuzzy, c-format
+msgid "color intensity %s, not in 0:255"
+msgstr "colour intensity %d, not in 0:255"
+
+#: colors.c:80
 #, c-format
 msgid "color intensity %d, not in 0:255"
 msgstr "colour intensity %d, not in 0:255"
 
-#: colors.c:83
+#: colors.c:87
+#, fuzzy, c-format
+msgid "alpha level %s, not in [0,1]"
+msgstr "invalid grey level, must be in [0,1]"
+
+#: colors.c:89
 #, c-format
 msgid "alpha level %g, not in [0,1]"
 msgstr ""
 
-#: colors.c:90
+#: colors.c:96
+#, fuzzy, c-format
+msgid "alpha level %s, not in 0:255"
+msgstr "colour intensity %d, not in 0:255"
+
+#: colors.c:98
 #, c-format
 msgid "alpha level %d, not in 0:255"
 msgstr ""
 
-#: colors.c:118
+#: colors.c:126
 msgid "bad hsv to rgb color conversion"
 msgstr ""
 
-#: colors.c:207 colors.c:221
+#: colors.c:218 colors.c:232
 msgid "invalid hsv color"
 msgstr "invalid hsv colour"
 
-#: colors.c:333 colors.c:353
+#: colors.c:344 colors.c:364
 msgid "invalid hcl color"
 msgstr "invalid hcl colour"
 
-#: colors.c:385
+#: colors.c:396
 msgid "invalid value of 'maxColorValue'"
 msgstr ""
 
-#: colors.c:413
+#: colors.c:424
 msgid "invalid 'names' vector"
 msgstr ""
 
-#: colors.c:472 colors.c:481
+#: colors.c:483 colors.c:492
 msgid "invalid gray level, must be in [0,1]."
 msgstr "invalid grey level, must be in [0,1]"
 
-#: colors.c:537
+#: colors.c:548
 #, fuzzy, c-format
 msgid "invalid '%s' value"
 msgstr "invalid hsv colour"
 
-#: colors.c:1329
+#: colors.c:1340
 msgid "invalid hex digit in 'color' or 'lty'"
 msgstr ""
 
-#: colors.c:1339 colors.c:1349
+#: colors.c:1350 colors.c:1360
 msgid "invalid RGB specification"
 msgstr ""
 
-#: colors.c:1382
+#: colors.c:1393
 #, fuzzy, c-format
 msgid "invalid color name '%s'"
 msgstr "invalid hsv colour"
 
-#: colors.c:1432 colors.c:1441
+#: colors.c:1443 colors.c:1452
 #, c-format
 msgid "invalid color specification \"%s\""
 msgstr ""
 
-#: colors.c:1469
+#: colors.c:1480
 msgid "supplied color is neither numeric nor character"
 msgstr ""
 
-#: colors.c:1473
+#: colors.c:1484
 #, c-format
 msgid "numerical color values must be >= 0, found %d"
 msgstr ""
 
-#: colors.c:1484
+#: colors.c:1495
 #, fuzzy
 msgid "invalid argument type"
 msgstr "invalid hcl colour"
 
-#: colors.c:1495
+#: colors.c:1506
 msgid "unknown palette (need >= 2 colors)"
 msgstr ""
 
-#: colors.c:1499 colors.c:1521
+#: colors.c:1510 colors.c:1532
 #, c-format
 msgid "maximum number of colors is %d"
 msgstr ""
@@ -121,7 +141,7 @@ msgstr ""
 msgid "unknown AFM entity encountered"
 msgstr ""
 
-#: devPS.c:740 devPS.c:743 devPS.c:4420 devPS.c:7911 devPicTeX.c:484
+#: devPS.c:740 devPS.c:743 devPS.c:4427 devPS.c:7918 devPicTeX.c:484
 #: devPicTeX.c:486
 #, c-format
 msgid "invalid string in '%s'"
@@ -200,327 +220,327 @@ msgstr ""
 msgid "invalid font name or more than one font name"
 msgstr ""
 
-#: devPS.c:1595 devPS.c:1630
+#: devPS.c:1596 devPS.c:1631
 #, c-format
 msgid "font family '%s' not found in PostScript font database"
 msgstr ""
 
-#: devPS.c:1702 devPS.c:1784 devPS.c:1811
+#: devPS.c:1703 devPS.c:1785 devPS.c:1812
 #, c-format
 msgid "font encoding for family '%s' not found in font database"
 msgstr ""
 
-#: devPS.c:1729 devPS.c:1756
+#: devPS.c:1730 devPS.c:1757
 #, c-format
 msgid "font CMap for family '%s' not found in font database"
 msgstr ""
 
-#: devPS.c:1950 devPS.c:2029 devPS.c:2097
+#: devPS.c:1952 devPS.c:2032 devPS.c:2100
 #, c-format
 msgid "cannot load afm file '%s'"
 msgstr ""
 
-#: devPS.c:2385
+#: devPS.c:2388
 msgid "corrupt loaded encodings;  encoding not recorded"
 msgstr ""
 
-#: devPS.c:2396
+#: devPS.c:2399
 msgid "failed to record device encoding"
 msgstr ""
 
-#: devPS.c:2565
+#: devPS.c:2570
 msgid "object '.ps.prolog' is not a character vector"
 msgstr ""
 
-#: devPS.c:2638 devPS.c:6415 devWindows.c:784
+#: devPS.c:2645 devPS.c:6422 devWindows.c:801
 #, fuzzy
 msgid "invalid line end"
 msgstr "invalid hcl colour"
 
-#: devPS.c:2657 devPS.c:6434 devWindows.c:797
+#: devPS.c:2664 devPS.c:6441 devWindows.c:814
 #, fuzzy
 msgid "invalid line join"
 msgstr "invalid hcl colour"
 
-#: devPS.c:2665
+#: devPS.c:2672
 #, fuzzy
 msgid "invalid line mitre"
 msgstr "invalid hcl colour"
 
-#: devPS.c:2874 devPS.c:3770 devPS.c:4218 devPS.c:4245 devPS.c:5255
-#: devPS.c:7761 devPS.c:7806
+#: devPS.c:2881 devPS.c:3777 devPS.c:4225 devPS.c:4252 devPS.c:5262
+#: devPS.c:7768 devPS.c:7813
 #, c-format
 msgid "attempt to use invalid font %d replaced by font 1"
 msgstr ""
 
-#: devPS.c:3096 devPS.c:4720 devPS.c:5834
+#: devPS.c:3103 devPS.c:4727 devPS.c:5841
 #, c-format
 msgid "filename too long in %s()"
 msgstr ""
 
-#: devPS.c:3102 devPS.c:4726 devPS.c:5840
+#: devPS.c:3109 devPS.c:4733 devPS.c:5847
 #, c-format
 msgid "memory allocation problem in %s()"
 msgstr ""
 
-#: devPS.c:3119 devPS.c:5900
+#: devPS.c:3126 devPS.c:5907
 #, c-format
 msgid "encoding path is too long in %s()"
 msgstr ""
 
-#: devPS.c:3133 devPS.c:4766
+#: devPS.c:3140 devPS.c:4773
 #, c-format
 msgid "failed to load encoding file in %s()"
 msgstr ""
 
-#: devPS.c:3178 devPS.c:3241 devPS.c:5959 devPS.c:6014 devPS.c:7641
+#: devPS.c:3185 devPS.c:3248 devPS.c:5966 devPS.c:6021 devPS.c:7648
 msgid "invalid font type"
 msgstr ""
 
-#: devPS.c:3202
+#: devPS.c:3209
 msgid "failed to initialise default PostScript font"
 msgstr ""
 
-#: devPS.c:3268
+#: devPS.c:3275
 msgid "failed to initialise additional PostScript fonts"
 msgstr ""
 
-#: devPS.c:3284
+#: devPS.c:3291
 msgid "invalid foreground/background color (postscript)"
 msgstr "invalid foreground/background colour (postscript)"
 
-#: devPS.c:3289
+#: devPS.c:3296
 msgid "'command' is too long"
 msgstr ""
 
-#: devPS.c:3294
+#: devPS.c:3301
 msgid "'postscript(print.it=TRUE)' used with an empty 'print' command"
 msgstr ""
 
-#: devPS.c:3343
+#: devPS.c:3350
 #, c-format
 msgid "invalid page type '%s' (postscript)"
 msgstr ""
 
-#: devPS.c:3457 devPS.c:4570 devWindows.c:2341
+#: devPS.c:3464 devPS.c:4577 devWindows.c:2346
 msgid ""
 "semi-transparency is not supported on this device: reported only once per "
 "page"
 msgstr ""
 
-#: devPS.c:3563 devPS.c:3572
+#: devPS.c:3570 devPS.c:3579
 #, c-format
 msgid "cannot open 'postscript' pipe to '%s'"
 msgstr ""
 
-#: devPS.c:3583 devPS.c:4975 devPS.c:4986 devPS.c:7066 qdPDF.c:98
+#: devPS.c:3590 devPS.c:4982 devPS.c:4993 devPS.c:7073 qdPDF.c:98
 #, c-format
 msgid "cannot open file '%s'"
 msgstr ""
 
-#: devPS.c:3711 devPS.c:3726
+#: devPS.c:3718 devPS.c:3733
 #, c-format
 msgid ""
 "error from postscript() in running:\n"
 "    %s"
 msgstr ""
 
-#: devPS.c:3758
+#: devPS.c:3765
 #, c-format
 msgid "CID family '%s' not included in postscript() device"
 msgstr ""
 
-#: devPS.c:3776 devPS.c:3787 devPS.c:4225 devPS.c:4255 devPS.c:4360
+#: devPS.c:3783 devPS.c:3794 devPS.c:4232 devPS.c:4262 devPS.c:4367
 #, c-format
 msgid "family '%s' not included in postscript() device"
 msgstr ""
 
-#: devPS.c:4300
+#: devPS.c:4307
 #, c-format
 msgid "unknown encoding '%s' in 'mbcsToSbcs'"
 msgstr ""
 
-#: devPS.c:4310
+#: devPS.c:4317
 #, c-format
 msgid "conversion failure on '%s' in 'mbcsToSbcs': dot substituted for <%02x>"
 msgstr ""
 
-#: devPS.c:4388
+#: devPS.c:4395
 #, c-format
 msgid "failed open converter to encoding '%s'"
 msgstr ""
 
-#: devPS.c:4406 devPS.c:5300 devPS.c:7896
+#: devPS.c:4413 devPS.c:5307 devPS.c:7903
 #, c-format
 msgid "failed in text conversion to encoding '%s'"
 msgstr ""
 
-#: devPS.c:4584
+#: devPS.c:4591
 #, fuzzy
 msgid "ran out of colors in xfig()"
 msgstr "run out of colours in xfig()"
 
-#: devPS.c:4613
+#: devPS.c:4620
 #, c-format
 msgid "unimplemented line texture %08x: using Dash-double-dotted"
 msgstr ""
 
-#: devPS.c:4679
+#: devPS.c:4686
 #, c-format
 msgid "unknown postscript font family '%s', using Helvetica"
 msgstr ""
 
-#: devPS.c:4751
+#: devPS.c:4758
 msgid "invalid foreground/background color (xfig)"
 msgstr "invalid foreground/background colour (xfig)"
 
-#: devPS.c:4784
+#: devPS.c:4791
 msgid "only Type 1 fonts supported for XFig"
 msgstr ""
 
-#: devPS.c:4797
+#: devPS.c:4804
 msgid "failed to initialise default XFig font"
 msgstr ""
 
-#: devPS.c:4834
+#: devPS.c:4841
 #, c-format
 msgid "invalid page type '%s' (xfig)"
 msgstr ""
 
-#: devPS.c:4842
+#: devPS.c:4849
 #, c-format
 msgid "xfig(%s, onefile=FALSE) will only return the last plot"
 msgstr ""
 
-#: devPS.c:4967
+#: devPS.c:4974
 msgid "empty file name"
 msgstr ""
 
-#: devPS.c:5032 devPS.c:5084 devPS.c:5662 devPS.c:5706 devPS.c:7126
+#: devPS.c:5039 devPS.c:5091 devPS.c:5669 devPS.c:5713 devPS.c:7133
 msgid "write failed"
 msgstr ""
 
-#: devPS.c:5289
+#: devPS.c:5296
 #, c-format
 msgid "unable to use encoding '%s'"
 msgstr ""
 
-#: devPS.c:5550 devPS.c:5553
+#: devPS.c:5557 devPS.c:5560
 msgid "failed to increase 'maxRaster'"
 msgstr ""
 
-#: devPS.c:5565
+#: devPS.c:5572
 msgid "unable to allocate raster image"
 msgstr ""
 
-#: devPS.c:5766
+#: devPS.c:5773
 msgid "corrupt loaded encodings;  font not added"
 msgstr ""
 
-#: devPS.c:5775
+#: devPS.c:5782
 msgid "failed to record device encoding; font not added"
 msgstr ""
 
-#: devPS.c:5886
+#: devPS.c:5893
 msgid "increasing the PDF version to 1.2"
 msgstr ""
 
-#: devPS.c:5916
+#: devPS.c:5923
 msgid "failed to load default encoding"
 msgstr ""
 
-#: devPS.c:5982
+#: devPS.c:5989
 msgid "failed to initialise default PDF font"
 msgstr ""
 
-#: devPS.c:6037
+#: devPS.c:6044
 msgid "failed to initialise additional PDF fonts"
 msgstr ""
 
-#: devPS.c:6050
+#: devPS.c:6057
 msgid "failed to allocate rasters"
 msgstr ""
 
-#: devPS.c:6057
+#: devPS.c:6064
 msgid "failed to allocate masks"
 msgstr ""
 
-#: devPS.c:6120
+#: devPS.c:6127
 #, c-format
 msgid "invalid paper type '%s' (pdf)"
 msgstr ""
 
-#: devPS.c:6144
+#: devPS.c:6151
 msgid "invalid foreground/background color (pdf)"
 msgstr "invalid foreground/background colour (pdf)"
 
-#: devPS.c:6263
+#: devPS.c:6270
 msgid "invalid 'alpha' value in PDF"
 msgstr ""
 
-#: devPS.c:6288
+#: devPS.c:6295
 msgid "increasing the PDF version to 1.4"
 msgstr ""
 
-#: devPS.c:6339 devPS.c:6386
+#: devPS.c:6346 devPS.c:6393
 msgid "unknown 'colormodel', using 'srgb'"
 msgstr ""
 
-#: devPS.c:6580
+#: devPS.c:6587
 #, fuzzy
 msgid "failed to load sRGB colorspace file"
 msgstr "Failed to load sRGB colourspace file"
 
-#: devPS.c:6844
+#: devPS.c:6851
 msgid "corrupt encodings in PDF device"
 msgstr ""
 
-#: devPS.c:6925
+#: devPS.c:6932
 msgid "increasing the PDF version to 1.3"
 msgstr ""
 
-#: devPS.c:7050
+#: devPS.c:7057
 #, c-format
 msgid "cannot open 'pdf' pipe to '%s'"
 msgstr ""
 
-#: devPS.c:7056
+#: devPS.c:7063
 msgid "file = \"|cmd\" implies 'onefile = TRUE'"
 msgstr ""
 
-#: devPS.c:7199
+#: devPS.c:7206
 #, c-format
 msgid ""
 "cannot open 'pdf' file argument '%s'\n"
 "  please shut down the PDF device"
 msgstr ""
 
-#: devPS.c:7666 devPS.c:8028 devPS.c:8075
+#: devPS.c:7673 devPS.c:8035 devPS.c:8082
 msgid "failed to find or load PDF font"
 msgstr ""
 
-#: devPS.c:7850 devPS.c:7983
+#: devPS.c:7857 devPS.c:7990
 msgid "failed to find or load PDF CID font"
 msgstr ""
 
-#: devPS.c:8214 devPS.c:8218 devPS.c:8378 devPS.c:8382
+#: devPS.c:8221 devPS.c:8225 devPS.c:8386 devPS.c:8390
 #, c-format
 msgid "invalid 'family' parameter in %s"
 msgstr ""
 
-#: devPS.c:8236 devPS.c:8394
+#: devPS.c:8243 devPS.c:8402
 #, c-format
 msgid "invalid 'fonts' parameter in %s"
 msgstr ""
 
-#: devPS.c:8242 devPS.c:8404 devPS.c:8407 devWindows.c:3648 devWindows.c:3652
-#: devWindows.c:3660 devWindows.c:3671 devWindows.c:3677 devWindows.c:3684
-#: devWindows.c:3691 devWindows.c:3695
+#: devPS.c:8249 devPS.c:8412 devPS.c:8415 devWindows.c:3646 devWindows.c:3650
+#: devWindows.c:3658 devWindows.c:3669 devWindows.c:3675 devWindows.c:3682
+#: devWindows.c:3689 devWindows.c:3693
 #, c-format
 msgid "invalid value of '%s'"
 msgstr ""
 
-#: devPS.c:8255 devPS.c:8322 devPS.c:8421 devPicTeX.c:740 devWindows.c:3732
+#: devPS.c:8262 devPS.c:8329 devPS.c:8429 devPicTeX.c:740 devWindows.c:3734
 #, c-format
 msgid "unable to start %s() device"
 msgstr ""
@@ -556,143 +576,139 @@ msgid ""
 "unable to create quartz() device target, given type may not be supported"
 msgstr ""
 
-#: devQuartz.c:1606
+#: devQuartz.c:1609
 msgid "Quartz device is not available on this platform"
 msgstr ""
 
-#: devWindows.c:341 devWindows.c:387 devWindows.c:458
+#: devWindows.c:358 devWindows.c:404 devWindows.c:475
 msgid "Not enough memory to copy graphics window"
 msgstr ""
 
-#: devWindows.c:346 devWindows.c:392 devWindows.c:463
+#: devWindows.c:363 devWindows.c:409 devWindows.c:480
 msgid "No device available to copy graphics window"
 msgstr ""
 
-#: devWindows.c:396 devWindows.c:467
+#: devWindows.c:413 devWindows.c:484
 #, c-format
 msgid "'%%' is not allowed in file name"
 msgstr ""
 
-#: devWindows.c:604
+#: devWindows.c:621
 msgid "invalid font specification"
 msgstr ""
 
-#: devWindows.c:643
+#: devWindows.c:660
 msgid "font family not found in Windows font database"
 msgstr ""
 
-#: devWindows.c:1074
+#: devWindows.c:1091
 msgid "plot history seems corrupted"
 msgstr ""
 
-#: devWindows.c:1081
+#: devWindows.c:1098
 msgid "no plot history!"
 msgstr ""
 
-#: devWindows.c:1798
+#: devWindows.c:1815
 #, c-format
 msgid "filename too long in %s() call"
 msgstr ""
 
-#: devWindows.c:1807 devWindows.c:1846 devWindows.c:1880
+#: devWindows.c:1820 devWindows.c:1855 devWindows.c:1885
 #, c-format
 msgid "'width=%d, height=%d' are unlikely values in pixels"
 msgstr ""
 
-#: devWindows.c:1815 devWindows.c:1820 devWindows.c:1849 devWindows.c:1854
-#: devWindows.c:1883 devWindows.c:1888
+#: devWindows.c:1828 devWindows.c:1833 devWindows.c:1858 devWindows.c:1863
+#: devWindows.c:1888 devWindows.c:1893
 msgid "unable to allocate bitmap"
 msgstr ""
 
-#: devWindows.c:1826 devWindows.c:1860 devWindows.c:2184
+#: devWindows.c:1839 devWindows.c:1869 devWindows.c:2189
 #, c-format
 msgid "unable to open file '%s' for writing"
 msgstr ""
 
-#: devWindows.c:1843
+#: devWindows.c:1852
 msgid "filename too long in jpeg() call"
 msgstr ""
 
-#: devWindows.c:1877
+#: devWindows.c:1882
 msgid "filename too long in tiff() call"
 msgstr ""
 
-#: devWindows.c:1909
+#: devWindows.c:1914
 msgid "filename too long in win.metafile() call"
 msgstr ""
 
-#: devWindows.c:1919
+#: devWindows.c:1924
 #, c-format
 msgid "unable to open metafile '%s' for writing"
 msgstr ""
 
-#: devWindows.c:1921
+#: devWindows.c:1926
 msgid "unable to open clipboard to write metafile"
 msgstr ""
 
-#: devWindows.c:2132
+#: devWindows.c:2137
 msgid "Insufficient memory for resize. Killing device"
 msgstr ""
 
-#: devWindows.c:2140
+#: devWindows.c:2145
 msgid "Insufficient memory for resize. Disabling alpha blending"
 msgstr ""
 
-#: devWindows.c:2169
+#: devWindows.c:2174
 msgid "a clipboard metafile can store only one figure."
 msgstr ""
 
-#: devWindows.c:2175
+#: devWindows.c:2180
 #, c-format
 msgid "metafile '%s' could not be created"
 msgstr ""
 
-#: devWindows.c:3112 devWindows.c:3756
+#: devWindows.c:3117 devWindows.c:3758
 msgid "R Graphics"
 msgstr ""
 
-#: devWindows.c:3126
+#: devWindows.c:3131
 msgid "attempt to use the locator after dev.hold()"
 msgstr ""
 
-#: devWindows.c:3392
+#: devWindows.c:3397
 msgid "option 'windowsTimeouts' should be integer"
 msgstr ""
 
-#: devWindows.c:3413
+#: devWindows.c:3418
 msgid "invalid device number in 'savePlot'"
 msgstr ""
 
-#: devWindows.c:3415
+#: devWindows.c:3420
 msgid "invalid device in 'savePlot'"
 msgstr ""
 
-#: devWindows.c:3418
+#: devWindows.c:3423
 msgid "invalid filename argument in 'savePlot'"
 msgstr ""
 
-#: devWindows.c:3423
+#: devWindows.c:3428
 msgid "invalid type argument in 'savePlot'"
 msgstr ""
 
-#: devWindows.c:3450
+#: devWindows.c:3455
 msgid "unknown type in savePlot"
 msgstr ""
 
-#: devWindows.c:3495 devWindows.c:3528 devWindows.c:3557 devWindows.c:3589
-#: devWindows.c:3614
+#: devWindows.c:3500 devWindows.c:3532 devWindows.c:3560 devWindows.c:3591
+#: devWindows.c:3612
 msgid "processing of the plot ran out of memory"
 msgstr ""
 
-#: devWindows.c:3574
+#: devWindows.c:3576
 msgid "Impossible to open "
 msgstr ""
 
-#: devWindows.c:3601
-msgid "Impossible to load Rbitmap.dll"
-msgstr ""
-
-#: devWindows.c:3643
+#: devWindows.c:3641
 msgid "invalid 'width' or 'height'"
 msgstr ""
 
@@ -713,7 +729,7 @@ msgstr ""
 msgid "not a supported scheme, no image data written"
 msgstr ""
 
-#: stubs.c:99
+#: stubs.c:104
 #, c-format
 msgid "invalid '%s' argument"
 msgstr ""
diff --git a/src/library/grDevices/po/fr.po b/src/library/grDevices/po/fr.po
index 7cb4ec6..6318a86 100644
--- a/src/library/grDevices/po/fr.po
+++ b/src/library/grDevices/po/fr.po
@@ -6,8 +6,8 @@
 msgid ""
 msgstr ""
 "Project-Id-Version: R 2.12.0\n"
-"Report-Msgid-Bugs-To: bugs.r-project.org\n"
-"POT-Creation-Date: 2014-03-27 07:46+0000\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2016-04-01 10:28-0700\n"
 "PO-Revision-Date: 2014-03-17 10:45+0100\n"
 "Last-Translator: Philippe Grosjean <phgrosjean at sciviews.org>\n"
 "Language-Team: French <R-core at r-project.org>\n"
@@ -18,99 +18,119 @@ msgstr ""
 "Plural-Forms: nplurals=2; plural=(n > 1);\n"
 "X-Generator: Poedit 1.6.4\n"
 
-#: axis_scales.c:37 axis_scales.c:38 axis_scales.c:53
+#: axis_scales.c:37 axis_scales.c:38 axis_scales.c:55
 #, c-format
 msgid "'%s' must be numeric of length %d"
 msgstr "'%s' doit �tre num�rique et de longueur %d"
 
 #: colors.c:69
+#, fuzzy, c-format
+msgid "color intensity %s, not in [0,1]"
+msgstr "l'intensit� de couleur %g, hors intervalle [0,1]"
+
+#: colors.c:71
 #, c-format
 msgid "color intensity %g, not in [0,1]"
 msgstr "l'intensit� de couleur %g, hors intervalle [0,1]"
 
-#: colors.c:76
+#: colors.c:78
+#, fuzzy, c-format
+msgid "color intensity %s, not in 0:255"
+msgstr "l'intensit� de couleur %d, hors intervalle 0:255"
+
+#: colors.c:80
 #, c-format
 msgid "color intensity %d, not in 0:255"
 msgstr "l'intensit� de couleur %d, hors intervalle 0:255"
 
-#: colors.c:83
+#: colors.c:87
+#, fuzzy, c-format
+msgid "alpha level %s, not in [0,1]"
+msgstr "valeur de transparence alpha %g, hors intervalle [0,1]"
+
+#: colors.c:89
 #, c-format
 msgid "alpha level %g, not in [0,1]"
 msgstr "valeur de transparence alpha %g, hors intervalle [0,1]"
 
-#: colors.c:90
+#: colors.c:96
+#, fuzzy, c-format
+msgid "alpha level %s, not in 0:255"
+msgstr "valeur de transparence alpha %d, hors intervalle 0:255"
+
+#: colors.c:98
 #, c-format
 msgid "alpha level %d, not in 0:255"
 msgstr "valeur de transparence alpha %d, hors intervalle 0:255"
 
-#: colors.c:118
+#: colors.c:126
 msgid "bad hsv to rgb color conversion"
 msgstr "conversion de couleur hsv vers rgb incorrecte"
 
-#: colors.c:207 colors.c:221
+#: colors.c:218 colors.c:232
 msgid "invalid hsv color"
 msgstr "couleur hsv incorrecte"
 
-#: colors.c:333 colors.c:353
+#: colors.c:344 colors.c:364
 msgid "invalid hcl color"
 msgstr "couleur hcl incorrecte"
 
-#: colors.c:385
+#: colors.c:396
 msgid "invalid value of 'maxColorValue'"
 msgstr "valeur incorrecte de 'maxColorValue'"
 
-#: colors.c:413
+#: colors.c:424
 msgid "invalid 'names' vector"
 msgstr "vecteur 'names' incorrect"
 
-#: colors.c:472 colors.c:481
+#: colors.c:483 colors.c:492
 msgid "invalid gray level, must be in [0,1]."
 msgstr "niveau de gris incorrect, doit �tre dans l'intervalle [0,1]"
 
-#: colors.c:537
+#: colors.c:548
 #, c-format
 msgid "invalid '%s' value"
 msgstr "valeur '%s' incorrecte"
 
-#: colors.c:1329
+#: colors.c:1340
 msgid "invalid hex digit in 'color' or 'lty'"
 msgstr "nombre hexad�cimal incorrect dans 'color' ou 'lty'"
 
-#: colors.c:1339 colors.c:1349
+#: colors.c:1350 colors.c:1360
 msgid "invalid RGB specification"
 msgstr "Sp�cification RGB incorrecte"
 
-#: colors.c:1382
+#: colors.c:1393
 #, c-format
 msgid "invalid color name '%s'"
 msgstr "nom de couleur '%s' incorrecte"
 
-#: colors.c:1432 colors.c:1441
+#: colors.c:1443 colors.c:1452
 #, c-format
 msgid "invalid color specification \"%s\""
 msgstr "Sp�cification de couleur \"%s\" incorrecte"
 
-#: colors.c:1469
+#: colors.c:1480
 msgid "supplied color is neither numeric nor character"
 msgstr ""
 "la couleur fournie doit �tre soit une valeur num�rique, soit une cha�ne de "
 "caract�res"
 
-#: colors.c:1473
+#: colors.c:1484
 #, c-format
 msgid "numerical color values must be >= 0, found %d"
 msgstr ""
 "les valeurs num�riques des couleurs doivent �tre >= 0, valeurs %d rencontr�es"
 
-#: colors.c:1484
+#: colors.c:1495
 msgid "invalid argument type"
 msgstr "type de l'argument incorrect"
 
-#: colors.c:1495
+#: colors.c:1506
 msgid "unknown palette (need >= 2 colors)"
 msgstr "palette de couleurs inconnue (il faut au moins deux couleurs)"
 
-#: colors.c:1499 colors.c:1521
+#: colors.c:1510 colors.c:1532
 #, c-format
 msgid "maximum number of colors is %d"
 msgstr "le nombre maximum de couleurs est %d"
@@ -124,7 +144,7 @@ msgstr "le fichier metafile '%s' ne peut 
 msgid "unknown AFM entity encountered"
 msgstr "entit� AFM inconnue rencontr�e"
 
-#: devPS.c:740 devPS.c:743 devPS.c:4420 devPS.c:7911 devPicTeX.c:484
+#: devPS.c:740 devPS.c:743 devPS.c:4427 devPS.c:7918 devPicTeX.c:484
 #: devPicTeX.c:486
 #, c-format
 msgid "invalid string in '%s'"
@@ -207,110 +227,110 @@ msgstr "Echec de chargement du fichier d'encodage '%s'"
 msgid "invalid font name or more than one font name"
 msgstr "Nom de police incorrect ou plus d'un nom de police"
 
-#: devPS.c:1595 devPS.c:1630
+#: devPS.c:1596 devPS.c:1631
 #, c-format
 msgid "font family '%s' not found in PostScript font database"
 msgstr ""
 "famille de police '%s' introuvable dans la base de donn�es de polices "
 "PostScript"
 
-#: devPS.c:1702 devPS.c:1784 devPS.c:1811
+#: devPS.c:1703 devPS.c:1785 devPS.c:1812
 #, c-format
 msgid "font encoding for family '%s' not found in font database"
 msgstr "encodage de police '%s' introuvable dans la base de donn�es de polices"
 
-#: devPS.c:1729 devPS.c:1756
+#: devPS.c:1730 devPS.c:1757
 #, c-format
 msgid "font CMap for family '%s' not found in font database"
 msgstr ""
 "la police CMap pour la famille '%s' introuvable dans la base de donn�es des "
 "polices"
 
-#: devPS.c:1950 devPS.c:2029 devPS.c:2097
+#: devPS.c:1952 devPS.c:2032 devPS.c:2100
 #, c-format
 msgid "cannot load afm file '%s'"
 msgstr "impossible de lire fichier afm '%s'"
 
-#: devPS.c:2385
+#: devPS.c:2388
 msgid "corrupt loaded encodings;  encoding not recorded"
 msgstr "Encodages charg�s corrompus : encodage non enregistr�"
 
-#: devPS.c:2396
+#: devPS.c:2399
 msgid "failed to record device encoding"
 msgstr "Echec d'enregistrement de l'encodage du p�riph�rique"
 
-#: devPS.c:2565
+#: devPS.c:2570
 msgid "object '.ps.prolog' is not a character vector"
 msgstr "L'objet '.ps.prolog' n'est pas un vecteur de mode caract�re"
 
-#: devPS.c:2638 devPS.c:6415 devWindows.c:784
+#: devPS.c:2645 devPS.c:6422 devWindows.c:801
 msgid "invalid line end"
 msgstr "Extr�mit� de ligne incorrecte"
 
-#: devPS.c:2657 devPS.c:6434 devWindows.c:797
+#: devPS.c:2664 devPS.c:6441 devWindows.c:814
 msgid "invalid line join"
 msgstr "Jointure de ligne incorrecte"
 
-#: devPS.c:2665
+#: devPS.c:2672
 msgid "invalid line mitre"
 msgstr "Mitre (jointure pointue) de ligne incorrecte"
 
-#: devPS.c:2874 devPS.c:3770 devPS.c:4218 devPS.c:4245 devPS.c:5255
-#: devPS.c:7761 devPS.c:7806
+#: devPS.c:2881 devPS.c:3777 devPS.c:4225 devPS.c:4252 devPS.c:5262
+#: devPS.c:7768 devPS.c:7813
 #, c-format
 msgid "attempt to use invalid font %d replaced by font 1"
 msgstr "tentative d'utiliser la police incorrecte %d remplac�e par police 1"
 
-#: devPS.c:3096 devPS.c:4720 devPS.c:5834
+#: devPS.c:3103 devPS.c:4727 devPS.c:5841
 #, c-format
 msgid "filename too long in %s()"
 msgstr "nom de fichier trop long dans %s()"
 
-#: devPS.c:3102 devPS.c:4726 devPS.c:5840
+#: devPS.c:3109 devPS.c:4733 devPS.c:5847
 #, c-format
 msgid "memory allocation problem in %s()"
 msgstr "probl�me d'allocation m�moire dans %s()"
 
-#: devPS.c:3119 devPS.c:5900
+#: devPS.c:3126 devPS.c:5907
 #, c-format
 msgid "encoding path is too long in %s()"
 msgstr "chemin d'acc�s � l'encodage trop long dans %s()"
 
-#: devPS.c:3133 devPS.c:4766
+#: devPS.c:3140 devPS.c:4773
 #, c-format
 msgid "failed to load encoding file in %s()"
 msgstr "Echec de chargement du fichier d'encodage dans %s"
 
-#: devPS.c:3178 devPS.c:3241 devPS.c:5959 devPS.c:6014 devPS.c:7641
+#: devPS.c:3185 devPS.c:3248 devPS.c:5966 devPS.c:6021 devPS.c:7648
 msgid "invalid font type"
 msgstr "Sp�cification de police incorrecte"
 
-#: devPS.c:3202
+#: devPS.c:3209
 msgid "failed to initialise default PostScript font"
 msgstr "�chec d'initialisation des polices PostScript par d�faut"
 
-#: devPS.c:3268
+#: devPS.c:3275
 msgid "failed to initialise additional PostScript fonts"
 msgstr "�chec d'initialisation des polices PostScript suppl�mentaires"
 
-#: devPS.c:3284
+#: devPS.c:3291
 msgid "invalid foreground/background color (postscript)"
 msgstr "couleurs de premier/arri�re plans incorrectes (postscript)"
 
-#: devPS.c:3289
+#: devPS.c:3296
 msgid "'command' is too long"
 msgstr "'command' est trop long"
 
-#: devPS.c:3294
+#: devPS.c:3301
 msgid "'postscript(print.it=TRUE)' used with an empty 'print' command"
 msgstr "'postscript(print.it=TRUE)' utilis� avec une commande 'print' vide"
 
-#: devPS.c:3343
+#: devPS.c:3350
 #, c-format
 msgid "invalid page type '%s' (postscript)"
 msgstr "type de page incorrect '%s' (postscript)"
 
-#: devPS.c:3457 devPS.c:4570 devWindows.c:2341
+#: devPS.c:3464 devPS.c:4577 devWindows.c:2346
 msgid ""
 "semi-transparency is not supported on this device: reported only once per "
 "page"
@@ -318,17 +338,17 @@ msgstr ""
 "la semi-transparence n'est pas support�e sur ce p�riph�rique : report� "
 "seulement une fois par page"
 
-#: devPS.c:3563 devPS.c:3572
+#: devPS.c:3570 devPS.c:3579
 #, c-format
 msgid "cannot open 'postscript' pipe to '%s'"
 msgstr "impossible d'ouvrir une conduite 'postscript' vers '%s'"
 
-#: devPS.c:3583 devPS.c:4975 devPS.c:4986 devPS.c:7066 qdPDF.c:98
+#: devPS.c:3590 devPS.c:4982 devPS.c:4993 devPS.c:7073 qdPDF.c:98
 #, c-format
 msgid "cannot open file '%s'"
 msgstr "impossible d'ouvrir le fichier '%s'"
 
-#: devPS.c:3711 devPS.c:3726
+#: devPS.c:3718 devPS.c:3733
 #, c-format
 msgid ""
 "error from postscript() in running:\n"
@@ -337,171 +357,171 @@ msgstr ""
 "erreur de la part de postscript() en ex�cutant :\n"
 "    %s"
 
-#: devPS.c:3758
+#: devPS.c:3765
 #, c-format
 msgid "CID family '%s' not included in postscript() device"
 msgstr "famille CID '%s' non incluse dans le p�riph�rique postscript()"
 
-#: devPS.c:3776 devPS.c:3787 devPS.c:4225 devPS.c:4255 devPS.c:4360
+#: devPS.c:3783 devPS.c:3794 devPS.c:4232 devPS.c:4262 devPS.c:4367
 #, c-format
 msgid "family '%s' not included in postscript() device"
 msgstr "famille '%s' non incluse dans le p�riph�rique postscript()"
 
-#: devPS.c:4300
+#: devPS.c:4307
 #, c-format
 msgid "unknown encoding '%s' in 'mbcsToSbcs'"
 msgstr "encodage inconnu '%s' dans 'mbcsToSbcs'"
 
-#: devPS.c:4310
+#: devPS.c:4317
 #, c-format
 msgid "conversion failure on '%s' in 'mbcsToSbcs': dot substituted for <%02x>"
 msgstr ""
 "erreur de conversion de '%s' dans 'mbcsToSbcs' : le point est substitu� pour "
 "<%02x>"
 
-#: devPS.c:4388
+#: devPS.c:4395
 #, c-format
 msgid "failed open converter to encoding '%s'"
 msgstr "erreur d'ouverture du convertisseur vers l'encodage '%s'"
 
-#: devPS.c:4406 devPS.c:5300 devPS.c:7896
+#: devPS.c:4413 devPS.c:5307 devPS.c:7903
 #, c-format
 msgid "failed in text conversion to encoding '%s'"
 msgstr "erreur dans la conversion du texte vers l'encodage '%s'"
 
-#: devPS.c:4584
+#: devPS.c:4591
 msgid "ran out of colors in xfig()"
 msgstr "trop de couleurs pour xfig()"
 
-#: devPS.c:4613
+#: devPS.c:4620
 #, c-format
 msgid "unimplemented line texture %08x: using Dash-double-dotted"
 msgstr "texture de lignes non impl�ment�e %08x : utilise 'Dash-double-dotted'"
 
-#: devPS.c:4679
+#: devPS.c:4686
 #, c-format
 msgid "unknown postscript font family '%s', using Helvetica"
 msgstr "famille de police postscript '%s' inconnue, utilisation d'Helvetica"
 
-#: devPS.c:4751
+#: devPS.c:4758
 msgid "invalid foreground/background color (xfig)"
 msgstr "couleurs de premier/arri�re plans incorrectes (xfig)"
 
-#: devPS.c:4784
+#: devPS.c:4791
 msgid "only Type 1 fonts supported for XFig"
 msgstr "seules les fontes Type 1 sont support�es pour XFig"
 
-#: devPS.c:4797
+#: devPS.c:4804
 msgid "failed to initialise default XFig font"
 msgstr "�chec d'initialisation des polices XFig par d�faut"
 
-#: devPS.c:4834
+#: devPS.c:4841
 #, c-format
 msgid "invalid page type '%s' (xfig)"
 msgstr "type de page '%s' incorrect (xfig)"
 
-#: devPS.c:4842
+#: devPS.c:4849
 #, c-format
 msgid "xfig(%s, onefile=FALSE) will only return the last plot"
 msgstr "xfig(%s, onefile=FALSE) ne retournera que le dernier graphe"
 
-#: devPS.c:4967
+#: devPS.c:4974
 msgid "empty file name"
 msgstr "nom de fichier vide"
 
-#: devPS.c:5032 devPS.c:5084 devPS.c:5662 devPS.c:5706 devPS.c:7126
+#: devPS.c:5039 devPS.c:5091 devPS.c:5669 devPS.c:5713 devPS.c:7133
 msgid "write failed"
 msgstr "�criture non ex�cut�e"
 
-#: devPS.c:5289
+#: devPS.c:5296
 #, c-format
 msgid "unable to use encoding '%s'"
 msgstr "Impossible d'utiliser l'encodage '%s'"
 
-#: devPS.c:5550 devPS.c:5553
+#: devPS.c:5557 devPS.c:5560
 msgid "failed to increase 'maxRaster'"
 msgstr "Echec d'augmentation de 'maxRaster'"
 
-#: devPS.c:5565
+#: devPS.c:5572
 msgid "unable to allocate raster image"
 msgstr "impossible d'allouer une image en mode pixel"
 
-#: devPS.c:5766
+#: devPS.c:5773
 msgid "corrupt loaded encodings;  font not added"
 msgstr "encodages charg�s corrompus ; police non ajout�e"
 
-#: devPS.c:5775
+#: devPS.c:5782
 msgid "failed to record device encoding; font not added"
 msgstr ""
 "�chec d'enregistrement de l'encodage du p�riph�rique ; police non ajout�e"
 
-#: devPS.c:5886
+#: devPS.c:5893
 msgid "increasing the PDF version to 1.2"
 msgstr "la version du PDF est augment�e � 1.2"
 
-#: devPS.c:5916
+#: devPS.c:5923
 msgid "failed to load default encoding"
 msgstr "Echec de chargement du fichier d'encodage par d�faut"
 
-#: devPS.c:5982
+#: devPS.c:5989
 msgid "failed to initialise default PDF font"
 msgstr "�chec d'initialisation des polices PDF par d�faut"
 
-#: devPS.c:6037
+#: devPS.c:6044
 msgid "failed to initialise additional PDF fonts"
 msgstr "�chec d'initialisation des polices PDF suppl�mentaires"
 
-#: devPS.c:6050
+#: devPS.c:6057
 msgid "failed to allocate rasters"
 msgstr "Echec d'allocation d'images en mode pixel"
 
-#: devPS.c:6057
+#: devPS.c:6064
 msgid "failed to allocate masks"
 msgstr "Echec d'allocation pour des masques"
 
-#: devPS.c:6120
+#: devPS.c:6127
 #, c-format
 msgid "invalid paper type '%s' (pdf)"
 msgstr "type de papier '%s' incorrect (pdf)"
 
-#: devPS.c:6144
+#: devPS.c:6151
 msgid "invalid foreground/background color (pdf)"
 msgstr "couleurs de premier/arri�re plans incorrectes (pdf)"
 
-#: devPS.c:6263
+#: devPS.c:6270
 msgid "invalid 'alpha' value in PDF"
 msgstr "valeur 'alpha' incorrecte dans PDF"
 
-#: devPS.c:6288
+#: devPS.c:6295
 msgid "increasing the PDF version to 1.4"
 msgstr "la version du PDF est augment�e � 1.4"
 
-#: devPS.c:6339 devPS.c:6386
+#: devPS.c:6346 devPS.c:6393
 msgid "unknown 'colormodel', using 'srgb'"
 msgstr "'colormodel' inconnu, utilisation de 'rgb'"
 
-#: devPS.c:6580
+#: devPS.c:6587
 msgid "failed to load sRGB colorspace file"
 msgstr "�chec de chargement de l'espace de couleur sRGB"
 
-#: devPS.c:6844
+#: devPS.c:6851
 msgid "corrupt encodings in PDF device"
 msgstr "encodage corrompus dans le p�riph�rique PDF"
 
-#: devPS.c:6925
+#: devPS.c:6932
 msgid "increasing the PDF version to 1.3"
 msgstr "la version du PDF est augment�e � 1.3"
 
-#: devPS.c:7050
+#: devPS.c:7057
 #, c-format
 msgid "cannot open 'pdf' pipe to '%s'"
 msgstr "impossible d'ouvrir une conduite 'pdf' vers '%s'"
 
-#: devPS.c:7056
+#: devPS.c:7063
 msgid "file = \"|cmd\" implies 'onefile = TRUE'"
 msgstr "file = \"|cmd\" implique 'onefile = TRUE'"
 
-#: devPS.c:7199
+#: devPS.c:7206
 #, c-format
 msgid ""
 "cannot open 'pdf' file argument '%s'\n"
@@ -510,32 +530,32 @@ msgstr ""
 "impossible d'ouvrir le fichier en argument de 'pdf' '%s'\n"
 "  fermez le p�riph�rique PDF"
 
-#: devPS.c:7666 devPS.c:8028 devPS.c:8075
+#: devPS.c:7673 devPS.c:8035 devPS.c:8082
 msgid "failed to find or load PDF font"
 msgstr "impossible de trouver ou de charger la police PDF"
 
-#: devPS.c:7850 devPS.c:7983
+#: devPS.c:7857 devPS.c:7990
 msgid "failed to find or load PDF CID font"
 msgstr "impossible de trouver ou de charger la police PDF CID"
 
-#: devPS.c:8214 devPS.c:8218 devPS.c:8378 devPS.c:8382
+#: devPS.c:8221 devPS.c:8225 devPS.c:8386 devPS.c:8390
 #, c-format
 msgid "invalid 'family' parameter in %s"
 msgstr "param�tre 'family' incorrect dans %s"
 
-#: devPS.c:8236 devPS.c:8394
+#: devPS.c:8243 devPS.c:8402
 #, c-format
 msgid "invalid 'fonts' parameter in %s"
 msgstr "param�tre 'fonts' incorrect dans %s"
 
-#: devPS.c:8242 devPS.c:8404 devPS.c:8407 devWindows.c:3648 devWindows.c:3652
-#: devWindows.c:3660 devWindows.c:3671 devWindows.c:3677 devWindows.c:3684
-#: devWindows.c:3691 devWindows.c:3695
+#: devPS.c:8249 devPS.c:8412 devPS.c:8415 devWindows.c:3646 devWindows.c:3650
+#: devWindows.c:3658 devWindows.c:3669 devWindows.c:3675 devWindows.c:3682
+#: devWindows.c:3689 devWindows.c:3693
 #, c-format
 msgid "invalid value of '%s'"
 msgstr "valeur incorrecte de '%s'"
 
-#: devPS.c:8255 devPS.c:8322 devPS.c:8421 devPicTeX.c:740 devWindows.c:3732
+#: devPS.c:8262 devPS.c:8329 devPS.c:8429 devPicTeX.c:740 devWindows.c:3734
 #, c-format
 msgid "unable to start %s() device"
 msgstr "impossible de d�marrer le p�riph�rique %s()"
@@ -573,147 +593,143 @@ msgstr ""
 "impossible de cr�er le p�riph�rique cible quartz(), le type fourni n'est "
 "peut-�tre pas support�"
 
-#: devQuartz.c:1606
+#: devQuartz.c:1609
 msgid "Quartz device is not available on this platform"
 msgstr "P�riph�rique Quartz non disponible sur cette architecture"
 
-#: devWindows.c:341 devWindows.c:387 devWindows.c:458
+#: devWindows.c:358 devWindows.c:404 devWindows.c:475
 msgid "Not enough memory to copy graphics window"
 msgstr "M�moire insuffisante pour copier la fen�tre graphique"
 
-#: devWindows.c:346 devWindows.c:392 devWindows.c:463
+#: devWindows.c:363 devWindows.c:409 devWindows.c:480
 msgid "No device available to copy graphics window"
 msgstr "Aucun p�riph�rique disponible pour copier la fen�tre graphique"
 
-#: devWindows.c:396 devWindows.c:467
+#: devWindows.c:413 devWindows.c:484
 #, c-format
 msgid "'%%' is not allowed in file name"
 msgstr "'%%' n'est pas autoris� dans le nom du fichier"
 
-#: devWindows.c:604
+#: devWindows.c:621
 msgid "invalid font specification"
 msgstr "sp�cification de police incorrecte"
 
-#: devWindows.c:643
+#: devWindows.c:660
 msgid "font family not found in Windows font database"
 msgstr ""
 "famille de police introuvable dans la base de donn�es des polices Windows"
 
-#: devWindows.c:1074
+#: devWindows.c:1091
 msgid "plot history seems corrupted"
 msgstr "l'historique des graphes semble corrompu"
 
-#: devWindows.c:1081
+#: devWindows.c:1098
 msgid "no plot history!"
 msgstr "pas d'historique des graphes !"
 
-#: devWindows.c:1798
+#: devWindows.c:1815
 #, c-format
 msgid "filename too long in %s() call"
 msgstr "nom de fichier trop long dans l'appel %s()"
 
-#: devWindows.c:1807 devWindows.c:1846 devWindows.c:1880
+#: devWindows.c:1820 devWindows.c:1855 devWindows.c:1885
 #, c-format
 msgid "'width=%d, height=%d' are unlikely values in pixels"
 msgstr "'width=%d, height=%d' ne sont probablement pas des valeurs en pixels"
 
-#: devWindows.c:1815 devWindows.c:1820 devWindows.c:1849 devWindows.c:1854
-#: devWindows.c:1883 devWindows.c:1888
+#: devWindows.c:1828 devWindows.c:1833 devWindows.c:1858 devWindows.c:1863
+#: devWindows.c:1888 devWindows.c:1893
 msgid "unable to allocate bitmap"
 msgstr "impossible d'allouer un bitmap"
 
-#: devWindows.c:1826 devWindows.c:1860 devWindows.c:2184
+#: devWindows.c:1839 devWindows.c:1869 devWindows.c:2189
 #, c-format
 msgid "unable to open file '%s' for writing"
 msgstr "impossible d'ouvrir le fichier '%s' pour �criture"
 
-#: devWindows.c:1843
+#: devWindows.c:1852
 msgid "filename too long in jpeg() call"
 msgstr "nom de fichier trop long dans l'appel � jpeg()"
 
-#: devWindows.c:1877
+#: devWindows.c:1882
 msgid "filename too long in tiff() call"
 msgstr "nom de fichier trop long dans l'appel tiff()"
 
-#: devWindows.c:1909
+#: devWindows.c:1914
 msgid "filename too long in win.metafile() call"
 msgstr "nom de fichier trop long dans l'appel � win.metafile()"
 
-#: devWindows.c:1919
+#: devWindows.c:1924
 #, c-format
 msgid "unable to open metafile '%s' for writing"
 msgstr "impossible d'ouvrir le fichier metafile '%s' pour �criture"
 
-#: devWindows.c:1921
+#: devWindows.c:1926
 msgid "unable to open clipboard to write metafile"
 msgstr "impossible d'ouvrir le presse-papier pour �crire les donn�es metafile"
 
-#: devWindows.c:2132
+#: devWindows.c:2137
 msgid "Insufficient memory for resize. Killing device"
 msgstr ""
 "M�moire insuffisante pour modifier la taille. Le p�riph�rique va �tre ferm�"
 
-#: devWindows.c:2140
+#: devWindows.c:2145
 msgid "Insufficient memory for resize. Disabling alpha blending"
 msgstr ""
 "M�moire insuffisante pour modifier la taille. L'\"alpha blending\" est "
 "d�sactiv�"
 
-#: devWindows.c:2169
+#: devWindows.c:2174
 msgid "a clipboard metafile can store only one figure."
 msgstr "un presse-papier metafile ne peut stocker qu'une seule figure."
 
-#: devWindows.c:2175
+#: devWindows.c:2180
 #, c-format
 msgid "metafile '%s' could not be created"
 msgstr "le fichier metafile '%s' ne peut �tre cr��"
 
-#: devWindows.c:3112 devWindows.c:3756
+#: devWindows.c:3117 devWindows.c:3758
 msgid "R Graphics"
 msgstr "R Graphes"
 
-#: devWindows.c:3126
+#: devWindows.c:3131
 msgid "attempt to use the locator after dev.hold()"
 msgstr "tentative d'utilisation du localisateur (locator) apr�s dev.hold()"
 
-#: devWindows.c:3392
+#: devWindows.c:3397
 msgid "option 'windowsTimeouts' should be integer"
 msgstr "l'option 'windowsTimeouts' doit �tre un entier"
 
-#: devWindows.c:3413
+#: devWindows.c:3418
 msgid "invalid device number in 'savePlot'"
 msgstr "num�ro de p�riph�rique incorrect dans 'savePlot'"
 
-#: devWindows.c:3415
+#: devWindows.c:3420
 msgid "invalid device in 'savePlot'"
 msgstr "p�riph�rique incorrect dans 'savePlot'"
 
-#: devWindows.c:3418
+#: devWindows.c:3423
 msgid "invalid filename argument in 'savePlot'"
 msgstr "argument nom de fichier incorrect dans 'savePlot'"
 
-#: devWindows.c:3423
+#: devWindows.c:3428
 msgid "invalid type argument in 'savePlot'"
 msgstr "type d'argument incorrect dans 'savePlot'"
 
-#: devWindows.c:3450
+#: devWindows.c:3455
 msgid "unknown type in savePlot"
 msgstr "type inconnu dans savePlot"
 
-#: devWindows.c:3495 devWindows.c:3528 devWindows.c:3557 devWindows.c:3589
-#: devWindows.c:3614
+#: devWindows.c:3500 devWindows.c:3532 devWindows.c:3560 devWindows.c:3591
+#: devWindows.c:3612
 msgid "processing of the plot ran out of memory"
 msgstr "la r�alisation du graphe manque de m�moire"
 
-#: devWindows.c:3574
+#: devWindows.c:3576
 msgid "Impossible to open "
 msgstr "Impossible d'ouvrir "
 
-#: devWindows.c:3601
-msgid "Impossible to load Rbitmap.dll"
-msgstr "Impossible to charger Rbitmap.dll"
-
-#: devWindows.c:3643
+#: devWindows.c:3641
 msgid "invalid 'width' or 'height'"
 msgstr "'width' ou 'height' incorrecte"
 
@@ -734,11 +750,14 @@ msgstr "QuartzBitmap_Output - impossible d'ouvrir le fichier '%s'"
 msgid "not a supported scheme, no image data written"
 msgstr "le sch�ma n'est pas support�, aucune donn�e d'image n'est �crite"
 
-#: stubs.c:99
+#: stubs.c:104
 #, c-format
 msgid "invalid '%s' argument"
 msgstr "argument '%s' incorrect"
 
+#~ msgid "Impossible to load Rbitmap.dll"
+#~ msgstr "Impossible to charger Rbitmap.dll"
+
 #~ msgid "Invalid line end"
 #~ msgstr "Fin de ligne incorrecte"
 
diff --git a/src/library/grDevices/po/grDevices.pot b/src/library/grDevices/po/grDevices.pot
index 71dcfc4..52f646f 100644
--- a/src/library/grDevices/po/grDevices.pot
+++ b/src/library/grDevices/po/grDevices.pot
@@ -1,14 +1,14 @@
 # SOME DESCRIPTIVE TITLE.
-# Copyright (C) YEAR The R Core Team
+# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
 # This file is distributed under the same license as the PACKAGE package.
 # FIRST AUTHOR <EMAIL at ADDRESS>, YEAR.
 #
 #, fuzzy
 msgid ""
 msgstr ""
-"Project-Id-Version: R 3.1.0\n"
-"Report-Msgid-Bugs-To: bugs.r-project.org\n"
-"POT-Creation-Date: 2014-03-27 07:46+0000\n"
+"Project-Id-Version: grDevices 3.4.0\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2016-04-01 10:28-0700\n"
 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
 "Last-Translator: FULL NAME <EMAIL at ADDRESS>\n"
 "Language-Team: LANGUAGE <LL at li.org>\n"
@@ -17,96 +17,116 @@ msgstr ""
 "Content-Type: text/plain; charset=CHARSET\n"
 "Content-Transfer-Encoding: 8bit\n"
 
-#: axis_scales.c:37 axis_scales.c:38 axis_scales.c:53
+#: axis_scales.c:37 axis_scales.c:38 axis_scales.c:55
 #, c-format
 msgid "'%s' must be numeric of length %d"
 msgstr ""
 
 #: colors.c:69
 #, c-format
+msgid "color intensity %s, not in [0,1]"
+msgstr ""
+
+#: colors.c:71
+#, c-format
 msgid "color intensity %g, not in [0,1]"
 msgstr ""
 
-#: colors.c:76
+#: colors.c:78
+#, c-format
+msgid "color intensity %s, not in 0:255"
+msgstr ""
+
+#: colors.c:80
 #, c-format
 msgid "color intensity %d, not in 0:255"
 msgstr ""
 
-#: colors.c:83
+#: colors.c:87
+#, c-format
+msgid "alpha level %s, not in [0,1]"
+msgstr ""
+
+#: colors.c:89
 #, c-format
 msgid "alpha level %g, not in [0,1]"
 msgstr ""
 
-#: colors.c:90
+#: colors.c:96
+#, c-format
+msgid "alpha level %s, not in 0:255"
+msgstr ""
+
+#: colors.c:98
 #, c-format
 msgid "alpha level %d, not in 0:255"
 msgstr ""
 
-#: colors.c:118
+#: colors.c:126
 msgid "bad hsv to rgb color conversion"
 msgstr ""
 
-#: colors.c:207 colors.c:221
+#: colors.c:218 colors.c:232
 msgid "invalid hsv color"
 msgstr ""
 
-#: colors.c:333 colors.c:353
+#: colors.c:344 colors.c:364
 msgid "invalid hcl color"
 msgstr ""
 
-#: colors.c:385
+#: colors.c:396
 msgid "invalid value of 'maxColorValue'"
 msgstr ""
 
-#: colors.c:413
+#: colors.c:424
 msgid "invalid 'names' vector"
 msgstr ""
 
-#: colors.c:472 colors.c:481
+#: colors.c:483 colors.c:492
 msgid "invalid gray level, must be in [0,1]."
 msgstr ""
 
-#: colors.c:537
+#: colors.c:548
 #, c-format
 msgid "invalid '%s' value"
 msgstr ""
 
-#: colors.c:1329
+#: colors.c:1340
 msgid "invalid hex digit in 'color' or 'lty'"
 msgstr ""
 
-#: colors.c:1339 colors.c:1349
+#: colors.c:1350 colors.c:1360
 msgid "invalid RGB specification"
 msgstr ""
 
-#: colors.c:1382
+#: colors.c:1393
 #, c-format
 msgid "invalid color name '%s'"
 msgstr ""
 
-#: colors.c:1432 colors.c:1441
+#: colors.c:1443 colors.c:1452
 #, c-format
 msgid "invalid color specification \"%s\""
 msgstr ""
 
-#: colors.c:1469
+#: colors.c:1480
 msgid "supplied color is neither numeric nor character"
 msgstr ""
 
-#: colors.c:1473
+#: colors.c:1484
 #, c-format
 msgid "numerical color values must be >= 0, found %d"
 msgstr ""
 
-#: colors.c:1484
+#: colors.c:1495
 msgid "invalid argument type"
 msgstr ""
 
-#: colors.c:1495
+#: colors.c:1506
 msgid "unknown palette (need >= 2 colors)"
 msgstr ""
 
-#: colors.c:1499 colors.c:1521
+#: colors.c:1510 colors.c:1532
 #, c-format
 msgid "maximum number of colors is %d"
 msgstr ""
@@ -120,7 +140,7 @@ msgstr ""
 msgid "unknown AFM entity encountered"
 msgstr ""
 
-#: devPS.c:740 devPS.c:743 devPS.c:4420 devPS.c:7911 devPicTeX.c:484
+#: devPS.c:740 devPS.c:743 devPS.c:4427 devPS.c:7918 devPicTeX.c:484
 #: devPicTeX.c:486
 #, c-format
 msgid "invalid string in '%s'"
@@ -199,322 +219,322 @@ msgstr ""
 msgid "invalid font name or more than one font name"
 msgstr ""
 
-#: devPS.c:1595 devPS.c:1630
+#: devPS.c:1596 devPS.c:1631
 #, c-format
 msgid "font family '%s' not found in PostScript font database"
 msgstr ""
 
-#: devPS.c:1702 devPS.c:1784 devPS.c:1811
+#: devPS.c:1703 devPS.c:1785 devPS.c:1812
 #, c-format
 msgid "font encoding for family '%s' not found in font database"
 msgstr ""
 
-#: devPS.c:1729 devPS.c:1756
+#: devPS.c:1730 devPS.c:1757
 #, c-format
 msgid "font CMap for family '%s' not found in font database"
 msgstr ""
 
-#: devPS.c:1950 devPS.c:2029 devPS.c:2097
+#: devPS.c:1952 devPS.c:2032 devPS.c:2100
 #, c-format
 msgid "cannot load afm file '%s'"
 msgstr ""
 
-#: devPS.c:2385
+#: devPS.c:2388
 msgid "corrupt loaded encodings;  encoding not recorded"
 msgstr ""
 
-#: devPS.c:2396
+#: devPS.c:2399
 msgid "failed to record device encoding"
 msgstr ""
 
-#: devPS.c:2565
+#: devPS.c:2570
 msgid "object '.ps.prolog' is not a character vector"
 msgstr ""
 
-#: devPS.c:2638 devPS.c:6415 devWindows.c:784
+#: devPS.c:2645 devPS.c:6422 devWindows.c:801
 msgid "invalid line end"
 msgstr ""
 
-#: devPS.c:2657 devPS.c:6434 devWindows.c:797
+#: devPS.c:2664 devPS.c:6441 devWindows.c:814
 msgid "invalid line join"
 msgstr ""
 
-#: devPS.c:2665
+#: devPS.c:2672
 msgid "invalid line mitre"
 msgstr ""
 
-#: devPS.c:2874 devPS.c:3770 devPS.c:4218 devPS.c:4245 devPS.c:5255
-#: devPS.c:7761 devPS.c:7806
+#: devPS.c:2881 devPS.c:3777 devPS.c:4225 devPS.c:4252 devPS.c:5262
+#: devPS.c:7768 devPS.c:7813
 #, c-format
 msgid "attempt to use invalid font %d replaced by font 1"
 msgstr ""
 
-#: devPS.c:3096 devPS.c:4720 devPS.c:5834
+#: devPS.c:3103 devPS.c:4727 devPS.c:5841
 #, c-format
 msgid "filename too long in %s()"
 msgstr ""
 
-#: devPS.c:3102 devPS.c:4726 devPS.c:5840
+#: devPS.c:3109 devPS.c:4733 devPS.c:5847
 #, c-format
 msgid "memory allocation problem in %s()"
 msgstr ""
 
-#: devPS.c:3119 devPS.c:5900
+#: devPS.c:3126 devPS.c:5907
 #, c-format
 msgid "encoding path is too long in %s()"
 msgstr ""
 
-#: devPS.c:3133 devPS.c:4766
+#: devPS.c:3140 devPS.c:4773
 #, c-format
 msgid "failed to load encoding file in %s()"
 msgstr ""
 
-#: devPS.c:3178 devPS.c:3241 devPS.c:5959 devPS.c:6014 devPS.c:7641
+#: devPS.c:3185 devPS.c:3248 devPS.c:5966 devPS.c:6021 devPS.c:7648
 msgid "invalid font type"
 msgstr ""
 
-#: devPS.c:3202
+#: devPS.c:3209
 msgid "failed to initialise default PostScript font"
 msgstr ""
 
-#: devPS.c:3268
+#: devPS.c:3275
 msgid "failed to initialise additional PostScript fonts"
 msgstr ""
 
-#: devPS.c:3284
+#: devPS.c:3291
 msgid "invalid foreground/background color (postscript)"
 msgstr ""
 
-#: devPS.c:3289
+#: devPS.c:3296
 msgid "'command' is too long"
 msgstr ""
 
-#: devPS.c:3294
+#: devPS.c:3301
 msgid "'postscript(print.it=TRUE)' used with an empty 'print' command"
 msgstr ""
 
-#: devPS.c:3343
+#: devPS.c:3350
 #, c-format
 msgid "invalid page type '%s' (postscript)"
 msgstr ""
 
-#: devPS.c:3457 devPS.c:4570 devWindows.c:2341
+#: devPS.c:3464 devPS.c:4577 devWindows.c:2346
 msgid ""
 "semi-transparency is not supported on this device: reported only once per "
 "page"
 msgstr ""
 
-#: devPS.c:3563 devPS.c:3572
+#: devPS.c:3570 devPS.c:3579
 #, c-format
 msgid "cannot open 'postscript' pipe to '%s'"
 msgstr ""
 
-#: devPS.c:3583 devPS.c:4975 devPS.c:4986 devPS.c:7066 qdPDF.c:98
+#: devPS.c:3590 devPS.c:4982 devPS.c:4993 devPS.c:7073 qdPDF.c:98
 #, c-format
 msgid "cannot open file '%s'"
 msgstr ""
 
-#: devPS.c:3711 devPS.c:3726
+#: devPS.c:3718 devPS.c:3733
 #, c-format
 msgid ""
 "error from postscript() in running:\n"
 "    %s"
 msgstr ""
 
-#: devPS.c:3758
+#: devPS.c:3765
 #, c-format
 msgid "CID family '%s' not included in postscript() device"
 msgstr ""
 
-#: devPS.c:3776 devPS.c:3787 devPS.c:4225 devPS.c:4255 devPS.c:4360
+#: devPS.c:3783 devPS.c:3794 devPS.c:4232 devPS.c:4262 devPS.c:4367
 #, c-format
 msgid "family '%s' not included in postscript() device"
 msgstr ""
 
-#: devPS.c:4300
+#: devPS.c:4307
 #, c-format
 msgid "unknown encoding '%s' in 'mbcsToSbcs'"
 msgstr ""
 
-#: devPS.c:4310
+#: devPS.c:4317
 #, c-format
 msgid "conversion failure on '%s' in 'mbcsToSbcs': dot substituted for <%02x>"
 msgstr ""
 
-#: devPS.c:4388
+#: devPS.c:4395
 #, c-format
 msgid "failed open converter to encoding '%s'"
 msgstr ""
 
-#: devPS.c:4406 devPS.c:5300 devPS.c:7896
+#: devPS.c:4413 devPS.c:5307 devPS.c:7903
 #, c-format
 msgid "failed in text conversion to encoding '%s'"
 msgstr ""
 
-#: devPS.c:4584
+#: devPS.c:4591
 msgid "ran out of colors in xfig()"
 msgstr ""
 
-#: devPS.c:4613
+#: devPS.c:4620
 #, c-format
 msgid "unimplemented line texture %08x: using Dash-double-dotted"
 msgstr ""
 
-#: devPS.c:4679
+#: devPS.c:4686
 #, c-format
 msgid "unknown postscript font family '%s', using Helvetica"
 msgstr ""
 
-#: devPS.c:4751
+#: devPS.c:4758
 msgid "invalid foreground/background color (xfig)"
 msgstr ""
 
-#: devPS.c:4784
+#: devPS.c:4791
 msgid "only Type 1 fonts supported for XFig"
 msgstr ""
 
-#: devPS.c:4797
+#: devPS.c:4804
 msgid "failed to initialise default XFig font"
 msgstr ""
 
-#: devPS.c:4834
+#: devPS.c:4841
 #, c-format
 msgid "invalid page type '%s' (xfig)"
 msgstr ""
 
-#: devPS.c:4842
+#: devPS.c:4849
 #, c-format
 msgid "xfig(%s, onefile=FALSE) will only return the last plot"
 msgstr ""
 
-#: devPS.c:4967
+#: devPS.c:4974
 msgid "empty file name"
 msgstr ""
 
-#: devPS.c:5032 devPS.c:5084 devPS.c:5662 devPS.c:5706 devPS.c:7126
+#: devPS.c:5039 devPS.c:5091 devPS.c:5669 devPS.c:5713 devPS.c:7133
 msgid "write failed"
 msgstr ""
 
-#: devPS.c:5289
+#: devPS.c:5296
 #, c-format
 msgid "unable to use encoding '%s'"
 msgstr ""
 
-#: devPS.c:5550 devPS.c:5553
+#: devPS.c:5557 devPS.c:5560
 msgid "failed to increase 'maxRaster'"
 msgstr ""
 
-#: devPS.c:5565
+#: devPS.c:5572
 msgid "unable to allocate raster image"
 msgstr ""
 
-#: devPS.c:5766
+#: devPS.c:5773
 msgid "corrupt loaded encodings;  font not added"
 msgstr ""
 
-#: devPS.c:5775
+#: devPS.c:5782
 msgid "failed to record device encoding; font not added"
 msgstr ""
 
-#: devPS.c:5886
+#: devPS.c:5893
 msgid "increasing the PDF version to 1.2"
 msgstr ""
 
-#: devPS.c:5916
+#: devPS.c:5923
 msgid "failed to load default encoding"
 msgstr ""
 
-#: devPS.c:5982
+#: devPS.c:5989
 msgid "failed to initialise default PDF font"
 msgstr ""
 
-#: devPS.c:6037
+#: devPS.c:6044
 msgid "failed to initialise additional PDF fonts"
 msgstr ""
 
-#: devPS.c:6050
+#: devPS.c:6057
 msgid "failed to allocate rasters"
 msgstr ""
 
-#: devPS.c:6057
+#: devPS.c:6064
 msgid "failed to allocate masks"
 msgstr ""
 
-#: devPS.c:6120
+#: devPS.c:6127
 #, c-format
 msgid "invalid paper type '%s' (pdf)"
 msgstr ""
 
-#: devPS.c:6144
+#: devPS.c:6151
 msgid "invalid foreground/background color (pdf)"
 msgstr ""
 
-#: devPS.c:6263
+#: devPS.c:6270
 msgid "invalid 'alpha' value in PDF"
 msgstr ""
 
-#: devPS.c:6288
+#: devPS.c:6295
 msgid "increasing the PDF version to 1.4"
 msgstr ""
 
-#: devPS.c:6339 devPS.c:6386
+#: devPS.c:6346 devPS.c:6393
 msgid "unknown 'colormodel', using 'srgb'"
 msgstr ""
 
-#: devPS.c:6580
+#: devPS.c:6587
 msgid "failed to load sRGB colorspace file"
 msgstr ""
 
-#: devPS.c:6844
+#: devPS.c:6851
 msgid "corrupt encodings in PDF device"
 msgstr ""
 
-#: devPS.c:6925
+#: devPS.c:6932
 msgid "increasing the PDF version to 1.3"
 msgstr ""
 
-#: devPS.c:7050
+#: devPS.c:7057
 #, c-format
 msgid "cannot open 'pdf' pipe to '%s'"
 msgstr ""
 
-#: devPS.c:7056
+#: devPS.c:7063
 msgid "file = \"|cmd\" implies 'onefile = TRUE'"
 msgstr ""
 
-#: devPS.c:7199
+#: devPS.c:7206
 #, c-format
 msgid ""
 "cannot open 'pdf' file argument '%s'\n"
 "  please shut down the PDF device"
 msgstr ""
 
-#: devPS.c:7666 devPS.c:8028 devPS.c:8075
+#: devPS.c:7673 devPS.c:8035 devPS.c:8082
 msgid "failed to find or load PDF font"
 msgstr ""
 
-#: devPS.c:7850 devPS.c:7983
+#: devPS.c:7857 devPS.c:7990
 msgid "failed to find or load PDF CID font"
 msgstr ""
 
-#: devPS.c:8214 devPS.c:8218 devPS.c:8378 devPS.c:8382
+#: devPS.c:8221 devPS.c:8225 devPS.c:8386 devPS.c:8390
 #, c-format
 msgid "invalid 'family' parameter in %s"
 msgstr ""
 
-#: devPS.c:8236 devPS.c:8394
+#: devPS.c:8243 devPS.c:8402
 #, c-format
 msgid "invalid 'fonts' parameter in %s"
 msgstr ""
 
-#: devPS.c:8242 devPS.c:8404 devPS.c:8407 devWindows.c:3648 devWindows.c:3652
-#: devWindows.c:3660 devWindows.c:3671 devWindows.c:3677 devWindows.c:3684
-#: devWindows.c:3691 devWindows.c:3695
+#: devPS.c:8249 devPS.c:8412 devPS.c:8415 devWindows.c:3646 devWindows.c:3650
+#: devWindows.c:3658 devWindows.c:3669 devWindows.c:3675 devWindows.c:3682
+#: devWindows.c:3689 devWindows.c:3693
 #, c-format
 msgid "invalid value of '%s'"
 msgstr ""
 
-#: devPS.c:8255 devPS.c:8322 devPS.c:8421 devPicTeX.c:740 devWindows.c:3732
+#: devPS.c:8262 devPS.c:8329 devPS.c:8429 devPicTeX.c:740 devWindows.c:3734
 #, c-format
 msgid "unable to start %s() device"
 msgstr ""
@@ -550,143 +570,139 @@ msgid ""
 "unable to create quartz() device target, given type may not be supported"
 msgstr ""
 
-#: devQuartz.c:1606
+#: devQuartz.c:1609
 msgid "Quartz device is not available on this platform"
 msgstr ""
 
-#: devWindows.c:341 devWindows.c:387 devWindows.c:458
+#: devWindows.c:358 devWindows.c:404 devWindows.c:475
 msgid "Not enough memory to copy graphics window"
 msgstr ""
 
-#: devWindows.c:346 devWindows.c:392 devWindows.c:463
+#: devWindows.c:363 devWindows.c:409 devWindows.c:480
 msgid "No device available to copy graphics window"
 msgstr ""
 
-#: devWindows.c:396 devWindows.c:467
+#: devWindows.c:413 devWindows.c:484
 #, c-format
 msgid "'%%' is not allowed in file name"
 msgstr ""
 
-#: devWindows.c:604
+#: devWindows.c:621
 msgid "invalid font specification"
 msgstr ""
 
-#: devWindows.c:643
+#: devWindows.c:660
 msgid "font family not found in Windows font database"
 msgstr ""
 
-#: devWindows.c:1074
+#: devWindows.c:1091
 msgid "plot history seems corrupted"
 msgstr ""
 
-#: devWindows.c:1081
+#: devWindows.c:1098
 msgid "no plot history!"
 msgstr ""
 
-#: devWindows.c:1798
+#: devWindows.c:1815
 #, c-format
 msgid "filename too long in %s() call"
 msgstr ""
 
-#: devWindows.c:1807 devWindows.c:1846 devWindows.c:1880
+#: devWindows.c:1820 devWindows.c:1855 devWindows.c:1885
 #, c-format
 msgid "'width=%d, height=%d' are unlikely values in pixels"
 msgstr ""
 
-#: devWindows.c:1815 devWindows.c:1820 devWindows.c:1849 devWindows.c:1854
-#: devWindows.c:1883 devWindows.c:1888
+#: devWindows.c:1828 devWindows.c:1833 devWindows.c:1858 devWindows.c:1863
+#: devWindows.c:1888 devWindows.c:1893
 msgid "unable to allocate bitmap"
 msgstr ""
 
-#: devWindows.c:1826 devWindows.c:1860 devWindows.c:2184
+#: devWindows.c:1839 devWindows.c:1869 devWindows.c:2189
 #, c-format
 msgid "unable to open file '%s' for writing"
 msgstr ""
 
-#: devWindows.c:1843
+#: devWindows.c:1852
 msgid "filename too long in jpeg() call"
 msgstr ""
 
-#: devWindows.c:1877
+#: devWindows.c:1882
 msgid "filename too long in tiff() call"
 msgstr ""
 
-#: devWindows.c:1909
+#: devWindows.c:1914
 msgid "filename too long in win.metafile() call"
 msgstr ""
 
-#: devWindows.c:1919
+#: devWindows.c:1924
 #, c-format
 msgid "unable to open metafile '%s' for writing"
 msgstr ""
 
-#: devWindows.c:1921
+#: devWindows.c:1926
 msgid "unable to open clipboard to write metafile"
 msgstr ""
 
-#: devWindows.c:2132
+#: devWindows.c:2137
 msgid "Insufficient memory for resize. Killing device"
 msgstr ""
 
-#: devWindows.c:2140
+#: devWindows.c:2145
 msgid "Insufficient memory for resize. Disabling alpha blending"
 msgstr ""
 
-#: devWindows.c:2169
+#: devWindows.c:2174
 msgid "a clipboard metafile can store only one figure."
 msgstr ""
 
-#: devWindows.c:2175
+#: devWindows.c:2180
 #, c-format
 msgid "metafile '%s' could not be created"
 msgstr ""
 
-#: devWindows.c:3112 devWindows.c:3756
+#: devWindows.c:3117 devWindows.c:3758
 msgid "R Graphics"
 msgstr ""
 
-#: devWindows.c:3126
+#: devWindows.c:3131
 msgid "attempt to use the locator after dev.hold()"
 msgstr ""
 
-#: devWindows.c:3392
+#: devWindows.c:3397
 msgid "option 'windowsTimeouts' should be integer"
 msgstr ""
 
-#: devWindows.c:3413
+#: devWindows.c:3418
 msgid "invalid device number in 'savePlot'"
 msgstr ""
 
-#: devWindows.c:3415
+#: devWindows.c:3420
 msgid "invalid device in 'savePlot'"
 msgstr ""
 
-#: devWindows.c:3418
+#: devWindows.c:3423
 msgid "invalid filename argument in 'savePlot'"
 msgstr ""
 
-#: devWindows.c:3423
+#: devWindows.c:3428
 msgid "invalid type argument in 'savePlot'"
 msgstr ""
 
-#: devWindows.c:3450
+#: devWindows.c:3455
 msgid "unknown type in savePlot"
 msgstr ""
 
-#: devWindows.c:3495 devWindows.c:3528 devWindows.c:3557 devWindows.c:3589
-#: devWindows.c:3614
+#: devWindows.c:3500 devWindows.c:3532 devWindows.c:3560 devWindows.c:3591
+#: devWindows.c:3612
 msgid "processing of the plot ran out of memory"
 msgstr ""
 
-#: devWindows.c:3574
+#: devWindows.c:3576
 msgid "Impossible to open "
 msgstr ""
 
-#: devWindows.c:3601
-msgid "Impossible to load Rbitmap.dll"
-msgstr ""
-
-#: devWindows.c:3643
+#: devWindows.c:3641
 msgid "invalid 'width' or 'height'"
 msgstr ""
 
@@ -707,7 +723,7 @@ msgstr ""
 msgid "not a supported scheme, no image data written"
 msgstr ""
 
-#: stubs.c:99
+#: stubs.c:104
 #, c-format
 msgid "invalid '%s' argument"
 msgstr ""
diff --git a/src/library/grDevices/po/it.po b/src/library/grDevices/po/it.po
index 0783c98..b01e250 100644
--- a/src/library/grDevices/po/it.po
+++ b/src/library/grDevices/po/it.po
@@ -6,111 +6,131 @@
 msgid ""
 msgstr ""
 "Project-Id-Version: R 2.1.0\n"
-"Report-Msgid-Bugs-To: bugs.r-project.org\n"
-"POT-Creation-Date: 2014-03-27 07:46+0000\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2016-04-01 10:28-0700\n"
 "PO-Revision-Date: 2005-02-27 14:01+0100\n"
 "Last-Translator: Stefano M. Iacus <Stefano.Iacus at R-project.org>\n"
 "Language-Team: Italian\n"
-"Language: \n"
+"Language: it\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
 "Plural-Forms: nplurals=2; plural=(n != 1);\n"
 
-#: axis_scales.c:37 axis_scales.c:38 axis_scales.c:53
+#: axis_scales.c:37 axis_scales.c:38 axis_scales.c:55
 #, c-format
 msgid "'%s' must be numeric of length %d"
 msgstr ""
 
 #: colors.c:69
 #, c-format
+msgid "color intensity %s, not in [0,1]"
+msgstr ""
+
+#: colors.c:71
+#, c-format
 msgid "color intensity %g, not in [0,1]"
 msgstr ""
 
-#: colors.c:76
+#: colors.c:78
+#, c-format
+msgid "color intensity %s, not in 0:255"
+msgstr ""
+
+#: colors.c:80
 #, c-format
 msgid "color intensity %d, not in 0:255"
 msgstr ""
 
-#: colors.c:83
+#: colors.c:87
+#, c-format
+msgid "alpha level %s, not in [0,1]"
+msgstr ""
+
+#: colors.c:89
 #, c-format
 msgid "alpha level %g, not in [0,1]"
 msgstr ""
 
-#: colors.c:90
+#: colors.c:96
+#, c-format
+msgid "alpha level %s, not in 0:255"
+msgstr ""
+
+#: colors.c:98
 #, c-format
 msgid "alpha level %d, not in 0:255"
 msgstr ""
 
-#: colors.c:118
+#: colors.c:126
 msgid "bad hsv to rgb color conversion"
 msgstr ""
 
-#: colors.c:207 colors.c:221
+#: colors.c:218 colors.c:232
 msgid "invalid hsv color"
 msgstr ""
 
-#: colors.c:333 colors.c:353
+#: colors.c:344 colors.c:364
 msgid "invalid hcl color"
 msgstr ""
 
-#: colors.c:385
+#: colors.c:396
 #, fuzzy
 msgid "invalid value of 'maxColorValue'"
 msgstr "valore di 'bg' non valido in devWindows"
 
-#: colors.c:413
+#: colors.c:424
 #, fuzzy
 msgid "invalid 'names' vector"
 msgstr "argomento stringa non valido"
 
-#: colors.c:472 colors.c:481
+#: colors.c:483 colors.c:492
 msgid "invalid gray level, must be in [0,1]."
 msgstr ""
 
-#: colors.c:537
+#: colors.c:548
 #, fuzzy, c-format
 msgid "invalid '%s' value"
 msgstr "argomento stringa non valido"
 
-#: colors.c:1329
+#: colors.c:1340
 msgid "invalid hex digit in 'color' or 'lty'"
 msgstr ""
 
-#: colors.c:1339 colors.c:1349
+#: colors.c:1350 colors.c:1360
 #, fuzzy
 msgid "invalid RGB specification"
 msgstr "Specificazione font non valida"
 
-#: colors.c:1382
+#: colors.c:1393
 #, fuzzy, c-format
 msgid "invalid color name '%s'"
 msgstr "argomento stringa non valido"
 
-#: colors.c:1432 colors.c:1441
+#: colors.c:1443 colors.c:1452
 #, fuzzy, c-format
 msgid "invalid color specification \"%s\""
 msgstr "Specificazione font non valida"
 
-#: colors.c:1469
+#: colors.c:1480
 msgid "supplied color is neither numeric nor character"
 msgstr ""
 
-#: colors.c:1473
+#: colors.c:1484
 #, c-format
 msgid "numerical color values must be >= 0, found %d"
 msgstr ""
 
-#: colors.c:1484
+#: colors.c:1495
 #, fuzzy
 msgid "invalid argument type"
 msgstr "argomento stringa non valido"
 
-#: colors.c:1495
+#: colors.c:1506
 msgid "unknown palette (need >= 2 colors)"
 msgstr ""
 
-#: colors.c:1499 colors.c:1521
+#: colors.c:1510 colors.c:1532
 #, c-format
 msgid "maximum number of colors is %d"
 msgstr ""
@@ -124,7 +144,7 @@ msgstr ""
 msgid "unknown AFM entity encountered"
 msgstr "entità AFM sconosciuta"
 
-#: devPS.c:740 devPS.c:743 devPS.c:4420 devPS.c:7911 devPicTeX.c:484
+#: devPS.c:740 devPS.c:743 devPS.c:4427 devPS.c:7918 devPicTeX.c:484
 #: devPicTeX.c:486
 #, fuzzy, c-format
 msgid "invalid string in '%s'"
@@ -204,132 +224,132 @@ msgstr "Caricamento file encoding '%s' fallito"
 msgid "invalid font name or more than one font name"
 msgstr "Più di un nome font specificato oppure nome font non valido"
 
-#: devPS.c:1595 devPS.c:1630
+#: devPS.c:1596 devPS.c:1631
 #, fuzzy, c-format
 msgid "font family '%s' not found in PostScript font database"
 msgstr "famiglia font non trovata nel database PostScript"
 
-#: devPS.c:1702 devPS.c:1784 devPS.c:1811
+#: devPS.c:1703 devPS.c:1785 devPS.c:1812
 #, fuzzy, c-format
 msgid "font encoding for family '%s' not found in font database"
 msgstr "encoding non trovato nel database"
 
-#: devPS.c:1729 devPS.c:1756
+#: devPS.c:1730 devPS.c:1757
 #, fuzzy, c-format
 msgid "font CMap for family '%s' not found in font database"
 msgstr "Famiglia font non presente nel database font di Quartz"
 
-#: devPS.c:1950 devPS.c:2029 devPS.c:2097
+#: devPS.c:1952 devPS.c:2032 devPS.c:2100
 #, c-format
 msgid "cannot load afm file '%s'"
 msgstr "non posso leggere file afm '%s'"
 
-#: devPS.c:2385
+#: devPS.c:2388
 #, fuzzy
 msgid "corrupt loaded encodings;  encoding not recorded"
 msgstr "Encoding caricato danneggiato; encoding non registrato"
 
-#: devPS.c:2396
+#: devPS.c:2399
 #, fuzzy
 msgid "failed to record device encoding"
 msgstr "Registrazione endocing device non riuscita"
 
-#: devPS.c:2565
+#: devPS.c:2570
 #, fuzzy
 msgid "object '.ps.prolog' is not a character vector"
 msgstr "L'ogetto .ps.prolog non è un vettore di caratteri"
 
-#: devPS.c:2638 devPS.c:6415 devWindows.c:784
+#: devPS.c:2645 devPS.c:6422 devWindows.c:801
 #, fuzzy
 msgid "invalid line end"
 msgstr "'line end' non valida"
 
-#: devPS.c:2657 devPS.c:6434 devWindows.c:797
+#: devPS.c:2664 devPS.c:6441 devWindows.c:814
 #, fuzzy
 msgid "invalid line join"
 msgstr "'line join' non valida"
 
-#: devPS.c:2665
+#: devPS.c:2672
 #, fuzzy
 msgid "invalid line mitre"
 msgstr "'line mitre' non valida"
 
-#: devPS.c:2874 devPS.c:3770 devPS.c:4218 devPS.c:4245 devPS.c:5255
-#: devPS.c:7761 devPS.c:7806
+#: devPS.c:2881 devPS.c:3777 devPS.c:4225 devPS.c:4252 devPS.c:5262
+#: devPS.c:7768 devPS.c:7813
 #, c-format
 msgid "attempt to use invalid font %d replaced by font 1"
 msgstr "tentativo di usare il font %d non valido sostituito con il font 1"
 
-#: devPS.c:3096 devPS.c:4720 devPS.c:5834
+#: devPS.c:3103 devPS.c:4727 devPS.c:5841
 #, fuzzy, c-format
 msgid "filename too long in %s()"
 msgstr "nome file troppo lungo in %s()"
 
-#: devPS.c:3102 devPS.c:4726 devPS.c:5840
+#: devPS.c:3109 devPS.c:4733 devPS.c:5847
 #, c-format
 msgid "memory allocation problem in %s()"
 msgstr ""
 
-#: devPS.c:3119 devPS.c:5900
+#: devPS.c:3126 devPS.c:5907
 #, fuzzy, c-format
 msgid "encoding path is too long in %s()"
 msgstr "percorso encoding troppo lungo"
 
-#: devPS.c:3133 devPS.c:4766
+#: devPS.c:3140 devPS.c:4773
 #, fuzzy, c-format
 msgid "failed to load encoding file in %s()"
 msgstr "Caricamento file encoding '%s' fallito"
 
-#: devPS.c:3178 devPS.c:3241 devPS.c:5959 devPS.c:6014 devPS.c:7641
+#: devPS.c:3185 devPS.c:3248 devPS.c:5966 devPS.c:6021 devPS.c:7648
 #, fuzzy
 msgid "invalid font type"
 msgstr "Specificazione font non valida"
 
-#: devPS.c:3202
+#: devPS.c:3209
 #, fuzzy
 msgid "failed to initialise default PostScript font"
 msgstr "Inizializzazione font PostScript fallita"
 
-#: devPS.c:3268
+#: devPS.c:3275
 #, fuzzy
 msgid "failed to initialise additional PostScript fonts"
 msgstr "Inizializzazione font PostScript aggiuntivi fallita"
 
-#: devPS.c:3284
+#: devPS.c:3291
 msgid "invalid foreground/background color (postscript)"
 msgstr "colore foreground/background non valida (postscript)"
 
-#: devPS.c:3289
+#: devPS.c:3296
 msgid "'command' is too long"
 msgstr "'command' è troppo lungo"
 
-#: devPS.c:3294
+#: devPS.c:3301
 #, fuzzy
 msgid "'postscript(print.it=TRUE)' used with an empty 'print' command"
 msgstr "postscript(print.it=TRUE) usato con un comando print vuoto"
 
-#: devPS.c:3343
+#: devPS.c:3350
 #, c-format
 msgid "invalid page type '%s' (postscript)"
 msgstr "tipo pagina '%s' non valida (postscript)"
 
-#: devPS.c:3457 devPS.c:4570 devWindows.c:2341
+#: devPS.c:3464 devPS.c:4577 devWindows.c:2346
 msgid ""
 "semi-transparency is not supported on this device: reported only once per "
 "page"
 msgstr ""
 
-#: devPS.c:3563 devPS.c:3572
+#: devPS.c:3570 devPS.c:3579
 #, c-format
 msgid "cannot open 'postscript' pipe to '%s'"
 msgstr "non posso aprire pipe 'postscript' su '%s'"
 
-#: devPS.c:3583 devPS.c:4975 devPS.c:4986 devPS.c:7066 qdPDF.c:98
+#: devPS.c:3590 devPS.c:4982 devPS.c:4993 devPS.c:7073 qdPDF.c:98
 #, fuzzy, c-format
 msgid "cannot open file '%s'"
 msgstr "non posso leggere file afm '%s'"
 
-#: devPS.c:3711 devPS.c:3726
+#: devPS.c:3718 devPS.c:3733
 #, c-format
 msgid ""
 "error from postscript() in running:\n"
@@ -338,182 +358,182 @@ msgstr ""
 "errore esecuzione postscript() in:\n"
 "    %s"
 
-#: devPS.c:3758
+#: devPS.c:3765
 #, fuzzy, c-format
 msgid "CID family '%s' not included in postscript() device"
 msgstr "famiglia CID '%s' non inclusa nel dispositivo PostScript"
 
-#: devPS.c:3776 devPS.c:3787 devPS.c:4225 devPS.c:4255 devPS.c:4360
+#: devPS.c:3783 devPS.c:3794 devPS.c:4232 devPS.c:4262 devPS.c:4367
 #, fuzzy, c-format
 msgid "family '%s' not included in postscript() device"
 msgstr "famiglia '%s' non inclusa nel dispositivo PostScript"
 
-#: devPS.c:4300
+#: devPS.c:4307
 #, c-format
 msgid "unknown encoding '%s' in 'mbcsToSbcs'"
 msgstr ""
 
-#: devPS.c:4310
+#: devPS.c:4317
 #, c-format
 msgid "conversion failure on '%s' in 'mbcsToSbcs': dot substituted for <%02x>"
 msgstr ""
 
-#: devPS.c:4388
+#: devPS.c:4395
 #, fuzzy, c-format
 msgid "failed open converter to encoding '%s'"
 msgstr "Caricamento file encoding '%s' fallito"
 
-#: devPS.c:4406 devPS.c:5300 devPS.c:7896
+#: devPS.c:4413 devPS.c:5307 devPS.c:7903
 #, c-format
 msgid "failed in text conversion to encoding '%s'"
 msgstr ""
 
-#: devPS.c:4584
+#: devPS.c:4591
 #, fuzzy
 msgid "ran out of colors in xfig()"
 msgstr "usati tutti i colori in xfig()"
 
-#: devPS.c:4613
+#: devPS.c:4620
 #, c-format
 msgid "unimplemented line texture %08x: using Dash-double-dotted"
 msgstr "'line texture' %08x non implementata: uso Dash-double-dotted"
 
-#: devPS.c:4679
+#: devPS.c:4686
 #, fuzzy, c-format
 msgid "unknown postscript font family '%s', using Helvetica"
 msgstr "famiglia font postscript sconosciuta, uso %s"
 
-#: devPS.c:4751
+#: devPS.c:4758
 msgid "invalid foreground/background color (xfig)"
 msgstr "colore foreground/background non valido (xfig)"
 
-#: devPS.c:4784
+#: devPS.c:4791
 msgid "only Type 1 fonts supported for XFig"
 msgstr ""
 
-#: devPS.c:4797
+#: devPS.c:4804
 #, fuzzy
 msgid "failed to initialise default XFig font"
 msgstr "Inizializzazione font XFig fallita"
 
-#: devPS.c:4834
+#: devPS.c:4841
 #, c-format
 msgid "invalid page type '%s' (xfig)"
 msgstr "typo pagina '%s' non valido (xfig)"
 
-#: devPS.c:4842
+#: devPS.c:4849
 #, c-format
 msgid "xfig(%s, onefile=FALSE) will only return the last plot"
 msgstr "xfig(%s, onefile=FALSE) restituirà solo l'ultimo grafico"
 
-#: devPS.c:4967
+#: devPS.c:4974
 msgid "empty file name"
 msgstr "nome file vuoto"
 
-#: devPS.c:5032 devPS.c:5084 devPS.c:5662 devPS.c:5706 devPS.c:7126
+#: devPS.c:5039 devPS.c:5091 devPS.c:5669 devPS.c:5713 devPS.c:7133
 msgid "write failed"
 msgstr ""
 
-#: devPS.c:5289
+#: devPS.c:5296
 #, fuzzy, c-format
 msgid "unable to use encoding '%s'"
 msgstr "Caricamento file encoding fallito"
 
-#: devPS.c:5550 devPS.c:5553
+#: devPS.c:5557 devPS.c:5560
 #, fuzzy
 msgid "failed to increase 'maxRaster'"
 msgstr "allocazione lista font fallita"
 
-#: devPS.c:5565
+#: devPS.c:5572
 #, fuzzy
 msgid "unable to allocate raster image"
 msgstr "Impossibile allocare bitmap"
 
-#: devPS.c:5766
+#: devPS.c:5773
 #, fuzzy
 msgid "corrupt loaded encodings;  font not added"
 msgstr "Encoding caricato danneggiato; il font non viene aggiunto"
 
-#: devPS.c:5775
+#: devPS.c:5782
 #, fuzzy
 msgid "failed to record device encoding; font not added"
 msgstr ""
 "Registrazione encoding dispositivo non riuscita; il font non verrà aggiunto"
 
-#: devPS.c:5886
+#: devPS.c:5893
 msgid "increasing the PDF version to 1.2"
 msgstr ""
 
-#: devPS.c:5916
+#: devPS.c:5923
 msgid "failed to load default encoding"
 msgstr "caricamento file encoding fallito"
 
-#: devPS.c:5982
+#: devPS.c:5989
 #, fuzzy
 msgid "failed to initialise default PDF font"
 msgstr "Inizializzazione font XFig fallita"
 
-#: devPS.c:6037
+#: devPS.c:6044
 #, fuzzy
 msgid "failed to initialise additional PDF fonts"
 msgstr "Inizializzazione font PostScript aggiuntivi fallita"
 
-#: devPS.c:6050
+#: devPS.c:6057
 #, fuzzy
 msgid "failed to allocate rasters"
 msgstr "allocazione lista font fallita"
 
-#: devPS.c:6057
+#: devPS.c:6064
 #, fuzzy
 msgid "failed to allocate masks"
 msgstr "allocazione lista font fallita"
 
-#: devPS.c:6120
+#: devPS.c:6127
 #, c-format
 msgid "invalid paper type '%s' (pdf)"
 msgstr "tipo foglio '%s' non valido (pdf)"
 
-#: devPS.c:6144
+#: devPS.c:6151
 msgid "invalid foreground/background color (pdf)"
 msgstr "colore foreground/background non valido (pdf)"
 
-#: devPS.c:6263
+#: devPS.c:6270
 #, fuzzy
 msgid "invalid 'alpha' value in PDF"
 msgstr "valore alpha non valido in PDF"
 
-#: devPS.c:6288
+#: devPS.c:6295
 msgid "increasing the PDF version to 1.4"
 msgstr ""
 
-#: devPS.c:6339 devPS.c:6386
+#: devPS.c:6346 devPS.c:6393
 msgid "unknown 'colormodel', using 'srgb'"
 msgstr ""
 
-#: devPS.c:6580
+#: devPS.c:6587
 #, fuzzy
 msgid "failed to load sRGB colorspace file"
 msgstr "caricamento file encoding fallito"
 
-#: devPS.c:6844
+#: devPS.c:6851
 #, fuzzy
 msgid "corrupt encodings in PDF device"
 msgstr "Encoding danneggiato nel dispositivo PDF"
 
-#: devPS.c:6925
+#: devPS.c:6932
 msgid "increasing the PDF version to 1.3"
 msgstr ""
 
-#: devPS.c:7050
+#: devPS.c:7057
 #, fuzzy, c-format
 msgid "cannot open 'pdf' pipe to '%s'"
 msgstr "non posso aprire pipe 'postscript' su '%s'"
 
-#: devPS.c:7056
+#: devPS.c:7063
 msgid "file = \"|cmd\" implies 'onefile = TRUE'"
 msgstr ""
 
-#: devPS.c:7199
+#: devPS.c:7206
 #, fuzzy, c-format
 msgid ""
 "cannot open 'pdf' file argument '%s'\n"
@@ -522,34 +542,34 @@ msgstr ""
 "non posso aprire il file '%s' in 'pdf'\n"
 "  si prega di chiudere il dispositivo PDF"
 
-#: devPS.c:7666 devPS.c:8028 devPS.c:8075
+#: devPS.c:7673 devPS.c:8035 devPS.c:8082
 #, fuzzy
 msgid "failed to find or load PDF font"
 msgstr "Impossibile caricare o trovare il font PDF"
 
-#: devPS.c:7850 devPS.c:7983
+#: devPS.c:7857 devPS.c:7990
 #, fuzzy
 msgid "failed to find or load PDF CID font"
 msgstr "Impossibile caricare o trovare il font PDF CID"
 
-#: devPS.c:8214 devPS.c:8218 devPS.c:8378 devPS.c:8382
+#: devPS.c:8221 devPS.c:8225 devPS.c:8386 devPS.c:8390
 #, c-format
 msgid "invalid 'family' parameter in %s"
 msgstr "parametro 'family' non valido in %s"
 
-#: devPS.c:8236 devPS.c:8394
+#: devPS.c:8243 devPS.c:8402
 #, c-format
 msgid "invalid 'fonts' parameter in %s"
 msgstr "parametro 'fonts' non valido in %s"
 
-#: devPS.c:8242 devPS.c:8404 devPS.c:8407 devWindows.c:3648 devWindows.c:3652
-#: devWindows.c:3660 devWindows.c:3671 devWindows.c:3677 devWindows.c:3684
-#: devWindows.c:3691 devWindows.c:3695
+#: devPS.c:8249 devPS.c:8412 devPS.c:8415 devWindows.c:3646 devWindows.c:3650
+#: devWindows.c:3658 devWindows.c:3669 devWindows.c:3675 devWindows.c:3682
+#: devWindows.c:3689 devWindows.c:3693
 #, fuzzy, c-format
 msgid "invalid value of '%s'"
 msgstr "valore di 'bg' non valido in devWindows"
 
-#: devPS.c:8255 devPS.c:8322 devPS.c:8421 devPicTeX.c:740 devWindows.c:3732
+#: devPS.c:8262 devPS.c:8329 devPS.c:8429 devPicTeX.c:740 devWindows.c:3734
 #, fuzzy, c-format
 msgid "unable to start %s() device"
 msgstr "impossibile aprire dispositivo pdf"
@@ -589,155 +609,151 @@ msgid ""
 "unable to create quartz() device target, given type may not be supported"
 msgstr ""
 
-#: devQuartz.c:1606
+#: devQuartz.c:1609
 #, fuzzy
 msgid "Quartz device is not available on this platform"
 msgstr "Il dispositivo Quartz non è disponibile per questa piattaforma"
 
-#: devWindows.c:341 devWindows.c:387 devWindows.c:458
+#: devWindows.c:358 devWindows.c:404 devWindows.c:475
 msgid "Not enough memory to copy graphics window"
 msgstr "Non c'è abbastanza memoria per copiare la finestra grafica"
 
-#: devWindows.c:346 devWindows.c:392 devWindows.c:463
+#: devWindows.c:363 devWindows.c:409 devWindows.c:480
 msgid "No device available to copy graphics window"
 msgstr "Nessun dispositivo disponibile per copiarci la finestra grafica"
 
-#: devWindows.c:396 devWindows.c:467
+#: devWindows.c:413 devWindows.c:484
 #, c-format
 msgid "'%%' is not allowed in file name"
 msgstr ""
 
-#: devWindows.c:604
+#: devWindows.c:621
 #, fuzzy
 msgid "invalid font specification"
 msgstr "Specificazione font non valida"
 
-#: devWindows.c:643
+#: devWindows.c:660
 #, fuzzy
 msgid "font family not found in Windows font database"
 msgstr "Famiglia font non trovata nel databse font di Windows"
 
-#: devWindows.c:1074
+#: devWindows.c:1091
 msgid "plot history seems corrupted"
 msgstr "plot history sembra essere danneggiato"
 
-#: devWindows.c:1081
+#: devWindows.c:1098
 msgid "no plot history!"
 msgstr "nessuna plot history!"
 
-#: devWindows.c:1798
+#: devWindows.c:1815
 #, c-format
 msgid "filename too long in %s() call"
 msgstr "nome file troppo lungo in %s()"
 
-#: devWindows.c:1807 devWindows.c:1846 devWindows.c:1880
+#: devWindows.c:1820 devWindows.c:1855 devWindows.c:1885
 #, c-format
 msgid "'width=%d, height=%d' are unlikely values in pixels"
 msgstr ""
 
-#: devWindows.c:1815 devWindows.c:1820 devWindows.c:1849 devWindows.c:1854
-#: devWindows.c:1883 devWindows.c:1888
+#: devWindows.c:1828 devWindows.c:1833 devWindows.c:1858 devWindows.c:1863
+#: devWindows.c:1888 devWindows.c:1893
 #, fuzzy
 msgid "unable to allocate bitmap"
 msgstr "Impossibile allocare bitmap"
 
-#: devWindows.c:1826 devWindows.c:1860 devWindows.c:2184
+#: devWindows.c:1839 devWindows.c:1869 devWindows.c:2189
 #, fuzzy, c-format
 msgid "unable to open file '%s' for writing"
 msgstr "Impossibile aprire file '%s' in scrittura"
 
-#: devWindows.c:1843
+#: devWindows.c:1852
 msgid "filename too long in jpeg() call"
 msgstr "nome file troppo lungo in jpeg()"
 
-#: devWindows.c:1877
+#: devWindows.c:1882
 #, fuzzy
 msgid "filename too long in tiff() call"
 msgstr "nome file troppo lungo in %s()"
 
-#: devWindows.c:1909
+#: devWindows.c:1914
 msgid "filename too long in win.metafile() call"
 msgstr "nome file troppo lungo in win.metafile()"
 
-#: devWindows.c:1919
+#: devWindows.c:1924
 #, fuzzy, c-format
 msgid "unable to open metafile '%s' for writing"
 msgstr "Impossibile aprire metafile '%s' in scrittura"
 
-#: devWindows.c:1921
+#: devWindows.c:1926
 #, fuzzy
 msgid "unable to open clipboard to write metafile"
 msgstr "Impossibile aprire appunti per scrittura metafile"
 
-#: devWindows.c:2132
+#: devWindows.c:2137
 msgid "Insufficient memory for resize. Killing device"
 msgstr "Memoria insufficiente per resize. Chiudo il dispositivo"
 
-#: devWindows.c:2140
+#: devWindows.c:2145
 #, fuzzy
 msgid "Insufficient memory for resize. Disabling alpha blending"
 msgstr "Memoria insufficiente per resize. Chiudo il dispositivo"
 
-#: devWindows.c:2169
+#: devWindows.c:2174
 #, fuzzy
 msgid "a clipboard metafile can store only one figure."
 msgstr "Gli appunti possono memorizzare una sola figura."
 
-#: devWindows.c:2175
+#: devWindows.c:2180
 #, c-format
 msgid "metafile '%s' could not be created"
 msgstr ""
 
-#: devWindows.c:3112 devWindows.c:3756
+#: devWindows.c:3117 devWindows.c:3758
 msgid "R Graphics"
 msgstr "R Graphics"
 
-#: devWindows.c:3126
+#: devWindows.c:3131
 msgid "attempt to use the locator after dev.hold()"
 msgstr ""
 
-#: devWindows.c:3392
+#: devWindows.c:3397
 msgid "option 'windowsTimeouts' should be integer"
 msgstr "l'opzione 'windowsTimeouts' dovrebbe essere un intero"
 
-#: devWindows.c:3413
+#: devWindows.c:3418
 #, fuzzy
 msgid "invalid device number in 'savePlot'"
 msgstr "numero dispositivo non valido in savePlot"
 
-#: devWindows.c:3415
+#: devWindows.c:3420
 #, fuzzy
 msgid "invalid device in 'savePlot'"
 msgstr "dispositivo non valido in savePlot"
 
-#: devWindows.c:3418
+#: devWindows.c:3423
 #, fuzzy
 msgid "invalid filename argument in 'savePlot'"
 msgstr "nome file non valido in savePlot"
 
-#: devWindows.c:3423
+#: devWindows.c:3428
 #, fuzzy
 msgid "invalid type argument in 'savePlot'"
 msgstr "argomento type non valido in savePlot"
 
-#: devWindows.c:3450
+#: devWindows.c:3455
 msgid "unknown type in savePlot"
 msgstr "type sconosciuto in savePlot"
 
-#: devWindows.c:3495 devWindows.c:3528 devWindows.c:3557 devWindows.c:3589
-#: devWindows.c:3614
+#: devWindows.c:3500 devWindows.c:3532 devWindows.c:3560 devWindows.c:3591
+#: devWindows.c:3612
 msgid "processing of the plot ran out of memory"
 msgstr "mancanza di memoria nel processare il grafico"
 
-#: devWindows.c:3574
+#: devWindows.c:3576
 msgid "Impossible to open "
 msgstr "Impossibile aprire "
 
-#: devWindows.c:3601
-msgid "Impossible to load Rbitmap.dll"
-msgstr "Impossibile caricare Rbitmap.dll"
-
-#: devWindows.c:3643
+#: devWindows.c:3641
 #, fuzzy
 msgid "invalid 'width' or 'height'"
 msgstr "'width' o 'height' non validi in devWindows"
@@ -760,11 +776,14 @@ msgstr ""
 msgid "not a supported scheme, no image data written"
 msgstr ""
 
-#: stubs.c:99
+#: stubs.c:104
 #, fuzzy, c-format
 msgid "invalid '%s' argument"
 msgstr "argomento stringa non valido"
 
+#~ msgid "Impossible to load Rbitmap.dll"
+#~ msgstr "Impossibile caricare Rbitmap.dll"
+
 #~ msgid "Invalid line end"
 #~ msgstr "'line end' non valida"
 
diff --git a/src/library/grDevices/po/ja.po b/src/library/grDevices/po/ja.po
index de9dbae..5ee4eaa 100644
--- a/src/library/grDevices/po/ja.po
+++ b/src/library/grDevices/po/ja.po
@@ -7,9 +7,9 @@
 msgid ""
 msgstr ""
 "Project-Id-Version: R 2.5.0 \n"
-"Report-Msgid-Bugs-To: bugs.r-project.org\n"
-"POT-Creation-Date: 2014-03-27 07:46+0000\n"
-"PO-Revision-Date: 2014-03-26 13:54+0200 \n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2016-04-01 10:28-0700\n"
+"PO-Revision-Date: 2015-02-17 08:52+0200 \n"
 "Last-Translator: Masafumi  \n"
 "Language-Team: RjpWiki Message Translation Team <mokada at md.tsukuba.ac.jp> \n"
 "Language: ja \n"
@@ -19,98 +19,118 @@ msgstr ""
 "Plural-Forms: nplurals=1; plural=0; \n"
 "X-Generator: Pootle 2.0.5 \n"
 
-#: axis_scales.c:37 axis_scales.c:38 axis_scales.c:53
+#: axis_scales.c:37 axis_scales.c:38 axis_scales.c:55
 #, c-format
 msgid "'%s' must be numeric of length %d"
 msgstr " '%s' は長さ %d の数値でなければなりません "
 
 #: colors.c:69
 #, c-format
+msgid "color intensity %s, not in [0,1]"
+msgstr " 色彩強度 %s が [0, 1] の範囲内にありません "
+
+#: colors.c:71
+#, c-format
 msgid "color intensity %g, not in [0,1]"
 msgstr " 色彩強度 %g が [0, 1] の範囲内にありません "
 
-#: colors.c:76
+#: colors.c:78
+#, c-format
+msgid "color intensity %s, not in 0:255"
+msgstr " 色彩強度 %s が 0:255 の範囲内にありません "
+
+#: colors.c:80
 #, c-format
 msgid "color intensity %d, not in 0:255"
 msgstr " 色彩強度 %d が 0:255 の範囲内にありません "
 
-#: colors.c:83
+#: colors.c:87
+#, c-format
+msgid "alpha level %s, not in [0,1]"
+msgstr " アルファ値 %s が [0, 1] の範囲内にありません "
+
+#: colors.c:89
 #, c-format
 msgid "alpha level %g, not in [0,1]"
 msgstr " アルファ値 %g が [0, 1] の範囲内にありません "
 
-#: colors.c:90
+#: colors.c:96
+#, c-format
+msgid "alpha level %s, not in 0:255"
+msgstr " アルファ値 %s が 0:255 の範囲内にありません "
+
+#: colors.c:98
 #, c-format
 msgid "alpha level %d, not in 0:255"
 msgstr " アルファ値 %d が 0:255 の範囲内にありません "
 
-#: colors.c:118
+#: colors.c:126
 msgid "bad hsv to rgb color conversion"
 msgstr " hsv から rgb への色変換に失敗しました "
 
-#: colors.c:207 colors.c:221
+#: colors.c:218 colors.c:232
 msgid "invalid hsv color"
 msgstr " hsv カラーが不正です "
 
-#: colors.c:333 colors.c:353
+#: colors.c:344 colors.c:364
 msgid "invalid hcl color"
 msgstr " hcl カラーが不正です "
 
-#: colors.c:385
+#: colors.c:396
 msgid "invalid value of 'maxColorValue'"
 msgstr " 'maxColorValue' の値が不正です "
 
-#: colors.c:413
+#: colors.c:424
 msgid "invalid 'names' vector"
 msgstr " 'names' ベクトルが不正です "
 
-#: colors.c:472 colors.c:481
+#: colors.c:483 colors.c:492
 msgid "invalid gray level, must be in [0,1]."
 msgstr " 濃淡度が不正です。濃淡度は [0, 1] の範囲内にある必要があります "
 
-#: colors.c:537
+#: colors.c:548
 #, c-format
 msgid "invalid '%s' value"
 msgstr " '%s' の値が不正です "
 
-#: colors.c:1329
+#: colors.c:1340
 msgid "invalid hex digit in 'color' or 'lty'"
 msgstr " 'color' または 'lty' 中の 16 進数が不正です "
 
-#: colors.c:1339 colors.c:1349
+#: colors.c:1350 colors.c:1360
 msgid "invalid RGB specification"
 msgstr " RGB の指定が不正です "
 
-#: colors.c:1382
+#: colors.c:1393
 #, c-format
 msgid "invalid color name '%s'"
 msgstr " 色名 '%s' が不正です "
 
-#: colors.c:1432 colors.c:1441
+#: colors.c:1443 colors.c:1452
 #, c-format
 msgid "invalid color specification \"%s\""
 msgstr " 色の指定 \"%s\" が不正です "
 
-#: colors.c:1469
+#: colors.c:1480
 msgid "supplied color is neither numeric nor character"
 msgstr " 与えられた色が数値でも文字列でもありません "
 
-#: colors.c:1473
+#: colors.c:1484
 #, c-format
 msgid "numerical color values must be >= 0, found %d"
 msgstr ""
 " 色を数値で指定する場合、数値は 0 以上である必要があります。%d が指定されまし"
 "た "
 
-#: colors.c:1484
+#: colors.c:1495
 msgid "invalid argument type"
 msgstr " 引数の型が不正です "
 
-#: colors.c:1495
+#: colors.c:1506
 msgid "unknown palette (need >= 2 colors)"
 msgstr " パレットが不正です (2 色以上必要です) "
 
-#: colors.c:1499 colors.c:1521
+#: colors.c:1510 colors.c:1532
 #, c-format
 msgid "maximum number of colors is %d"
 msgstr " パレットの色数の最大値は %d です "
@@ -124,7 +144,7 @@ msgstr " afm ファイル '%s' を開くことができませんでした "
 msgid "unknown AFM entity encountered"
 msgstr " 未知の AFM 項目に出会いました "
 
-#: devPS.c:740 devPS.c:743 devPS.c:4420 devPS.c:7911 devPicTeX.c:484
+#: devPS.c:740 devPS.c:743 devPS.c:4427 devPS.c:7918 devPicTeX.c:484
 #: devPicTeX.c:486
 #, c-format
 msgid "invalid string in '%s'"
@@ -207,114 +227,114 @@ msgstr " エンコーディングファイル '%s' をロードできません
 msgid "invalid font name or more than one font name"
 msgstr " 一つもしくは複数のフォント名が不正です "
 
-#: devPS.c:1595 devPS.c:1630
+#: devPS.c:1596 devPS.c:1631
 #, c-format
 msgid "font family '%s' not found in PostScript font database"
 msgstr ""
 " ポストスクリプトフォントのデータベースにフォントファミリ '%s' が見付かりませ"
 "ん "
 
-#: devPS.c:1702 devPS.c:1784 devPS.c:1811
+#: devPS.c:1703 devPS.c:1785 devPS.c:1812
 #, c-format
 msgid "font encoding for family '%s' not found in font database"
 msgstr ""
 " フォントのデータベースに '%s' ファミリに対するエンコーディングが見付かりませ"
 "ん "
 
-#: devPS.c:1729 devPS.c:1756
+#: devPS.c:1730 devPS.c:1757
 #, c-format
 msgid "font CMap for family '%s' not found in font database"
 msgstr ""
 " フォントのデータベースに '%s' ファミリに対する CMap フォントが見付かりませ"
 "ん "
 
-#: devPS.c:1950 devPS.c:2029 devPS.c:2097
+#: devPS.c:1952 devPS.c:2032 devPS.c:2100
 #, c-format
 msgid "cannot load afm file '%s'"
 msgstr " afm ファイル '%s' をロードできませんでした "
 
-#: devPS.c:2385
+#: devPS.c:2388
 msgid "corrupt loaded encodings;  encoding not recorded"
 msgstr ""
 " ロードされたエンコーディングが破損しています;  エンコーディングは記録されま"
 "せんでした "
 
-#: devPS.c:2396
+#: devPS.c:2399
 msgid "failed to record device encoding"
 msgstr " デバイスのエンコーディングを記録することに失敗しました "
 
-#: devPS.c:2565
+#: devPS.c:2570
 msgid "object '.ps.prolog' is not a character vector"
 msgstr " オブジェクト '.ps.prolog' は文字ベクトルではありません "
 
-#: devPS.c:2638 devPS.c:6415 devWindows.c:784
+#: devPS.c:2645 devPS.c:6422 devWindows.c:801
 msgid "invalid line end"
 msgstr " 線分の線端形状の指定が不正です "
 
-#: devPS.c:2657 devPS.c:6434 devWindows.c:797
+#: devPS.c:2664 devPS.c:6441 devWindows.c:814
 msgid "invalid line join"
 msgstr " 線分の接続方法の指定が不正です "
 
-#: devPS.c:2665
+#: devPS.c:2672
 msgid "invalid line mitre"
 msgstr " 線分のマイターリミットの指定が不正です "
 
-#: devPS.c:2874 devPS.c:3770 devPS.c:4218 devPS.c:4245 devPS.c:5255
-#: devPS.c:7761 devPS.c:7806
+#: devPS.c:2881 devPS.c:3777 devPS.c:4225 devPS.c:4252 devPS.c:5262
+#: devPS.c:7768 devPS.c:7813
 #, c-format
 msgid "attempt to use invalid font %d replaced by font 1"
 msgstr " 不正なフォント %d を使おうとしましたが、フォント 1 で置き換えました "
 
-#: devPS.c:3096 devPS.c:4720 devPS.c:5834
+#: devPS.c:3103 devPS.c:4727 devPS.c:5841
 #, c-format
 msgid "filename too long in %s()"
 msgstr " %s() 中のファイル名が長すぎます "
 
-#: devPS.c:3102 devPS.c:4726 devPS.c:5840
+#: devPS.c:3109 devPS.c:4733 devPS.c:5847
 #, c-format
 msgid "memory allocation problem in %s()"
 msgstr " %s() 中にメモリ割り当てのトラブルがあります "
 
-#: devPS.c:3119 devPS.c:5900
+#: devPS.c:3126 devPS.c:5907
 #, c-format
 msgid "encoding path is too long in %s()"
 msgstr " %s() 中のエンコーディングのパスが長すぎます "
 
-#: devPS.c:3133 devPS.c:4766
+#: devPS.c:3140 devPS.c:4773
 #, c-format
 msgid "failed to load encoding file in %s()"
 msgstr " %s() 中にエンコーディングファイををロードできませんでした "
 
-#: devPS.c:3178 devPS.c:3241 devPS.c:5959 devPS.c:6014 devPS.c:7641
+#: devPS.c:3185 devPS.c:3248 devPS.c:5966 devPS.c:6021 devPS.c:7648
 msgid "invalid font type"
 msgstr " フォントタイプが不正です "
 
-#: devPS.c:3202
+#: devPS.c:3209
 msgid "failed to initialise default PostScript font"
 msgstr " 既定のポストスクリプトフォントの初期化に失敗しました "
 
-#: devPS.c:3268
+#: devPS.c:3275
 msgid "failed to initialise additional PostScript fonts"
 msgstr " 追加のポストスクリプトフォントの初期化に失敗しました "
 
-#: devPS.c:3284
+#: devPS.c:3291
 msgid "invalid foreground/background color (postscript)"
 msgstr " 不正な前景/背景色 (ポストスクリプト) "
 
-#: devPS.c:3289
+#: devPS.c:3296
 msgid "'command' is too long"
 msgstr " 'command' が長すぎます "
 
-#: devPS.c:3294
+#: devPS.c:3301
 msgid "'postscript(print.it=TRUE)' used with an empty 'print' command"
 msgstr " 'postscript(print.it=TRUE)' が空の描画命令とともに使われました "
 
-#: devPS.c:3343
+#: devPS.c:3350
 #, c-format
 msgid "invalid page type '%s' (postscript)"
 msgstr " 不正なページ '%s' (ポストスクリプト) "
 
-#: devPS.c:3457 devPS.c:4570 devWindows.c:2341
+#: devPS.c:3464 devPS.c:4577 devWindows.c:2346
 msgid ""
 "semi-transparency is not supported on this device: reported only once per "
 "page"
@@ -322,17 +342,17 @@ msgstr ""
 " 半透過機能はこのデバイスではサポートされていません: ページ毎に一度だけレポー"
 "トされます "
 
-#: devPS.c:3563 devPS.c:3572
+#: devPS.c:3570 devPS.c:3579
 #, c-format
 msgid "cannot open 'postscript' pipe to '%s'"
 msgstr " '%s' に対する 'postscript' パイプを開くことができません "
 
-#: devPS.c:3583 devPS.c:4975 devPS.c:4986 devPS.c:7066 qdPDF.c:98
+#: devPS.c:3590 devPS.c:4982 devPS.c:4993 devPS.c:7073 qdPDF.c:98
 #, c-format
 msgid "cannot open file '%s'"
 msgstr " ファイル '%s' を開けません "
 
-#: devPS.c:3711 devPS.c:3726
+#: devPS.c:3718 devPS.c:3733
 #, c-format
 msgid ""
 "error from postscript() in running:\n"
@@ -341,171 +361,171 @@ msgstr ""
 " 実行中の postscript() からのエラー: \n"
 " %s "
 
-#: devPS.c:3758
+#: devPS.c:3765
 #, c-format
 msgid "CID family '%s' not included in postscript() device"
 msgstr " postscript() デバイス中に CID ファミリ '%s' は含まれていません "
 
-#: devPS.c:3776 devPS.c:3787 devPS.c:4225 devPS.c:4255 devPS.c:4360
+#: devPS.c:3783 devPS.c:3794 devPS.c:4232 devPS.c:4262 devPS.c:4367
 #, c-format
 msgid "family '%s' not included in postscript() device"
 msgstr " postscript() デバイス中にフォントファミリ '%s' は含まれていません "
 
-#: devPS.c:4300
+#: devPS.c:4307
 #, c-format
 msgid "unknown encoding '%s' in 'mbcsToSbcs'"
 msgstr " 'mbcsToSbcs' 中に未知のエンコーディング '%s' があります "
 
-#: devPS.c:4310
+#: devPS.c:4317
 #, c-format
 msgid "conversion failure on '%s' in 'mbcsToSbcs': dot substituted for <%02x>"
 msgstr " 'mbcsToSbcs' 中の '%s' で変換に失敗: <%02x> をドットで置き換えました "
 
-#: devPS.c:4388
+#: devPS.c:4395
 #, c-format
 msgid "failed open converter to encoding '%s'"
 msgstr " エンコーディング '%s' へのコンバータを開けませんでした "
 
-#: devPS.c:4406 devPS.c:5300 devPS.c:7896
+#: devPS.c:4413 devPS.c:5307 devPS.c:7903
 #, c-format
 msgid "failed in text conversion to encoding '%s'"
 msgstr " テキストをエンコーディング '%s' に変換することに失敗しました "
 
-#: devPS.c:4584
+#: devPS.c:4591
 msgid "ran out of colors in xfig()"
 msgstr " xfig() 中の色数が多すぎました "
 
-#: devPS.c:4613
+#: devPS.c:4620
 #, c-format
 msgid "unimplemented line texture %08x: using Dash-double-dotted"
 msgstr " 実装されていない線種 %08x: Dash-double-dotted を使います "
 
-#: devPS.c:4679
+#: devPS.c:4686
 #, c-format
 msgid "unknown postscript font family '%s', using Helvetica"
 msgstr ""
 " 未知のポストスクリプトフォントファミリ '%s' です。Helvetica を使います "
 
-#: devPS.c:4751
+#: devPS.c:4758
 msgid "invalid foreground/background color (xfig)"
 msgstr " 不正な前景/背景色です (xfig) "
 
-#: devPS.c:4784
+#: devPS.c:4791
 msgid "only Type 1 fonts supported for XFig"
 msgstr " XFig に対しては Type 1 フォントだけがサポートされています "
 
-#: devPS.c:4797
+#: devPS.c:4804
 msgid "failed to initialise default XFig font"
 msgstr " 既定の XFig フォントの初期化に失敗しました "
 
-#: devPS.c:4834
+#: devPS.c:4841
 #, c-format
 msgid "invalid page type '%s' (xfig)"
 msgstr " 不正なページタイプ '%s' (xfig) "
 
-#: devPS.c:4842
+#: devPS.c:4849
 #, c-format
 msgid "xfig(%s, onefile=FALSE) will only return the last plot"
 msgstr " xfig(%s, onefile=FALSE) は最後のプロットだけを返します "
 
-#: devPS.c:4967
+#: devPS.c:4974
 msgid "empty file name"
 msgstr " ファイル名がありません "
 
-#: devPS.c:5032 devPS.c:5084 devPS.c:5662 devPS.c:5706 devPS.c:7126
+#: devPS.c:5039 devPS.c:5091 devPS.c:5669 devPS.c:5713 devPS.c:7133
 msgid "write failed"
 msgstr " 書き込みに失敗しました "
 
-#: devPS.c:5289
+#: devPS.c:5296
 #, c-format
 msgid "unable to use encoding '%s'"
 msgstr " エンコーディング '%s' を使うことができません "
 
-#: devPS.c:5550 devPS.c:5553
+#: devPS.c:5557 devPS.c:5560
 msgid "failed to increase 'maxRaster'"
 msgstr " 'maxRaster' を増やすことはできませんでした "
 
-#: devPS.c:5565
+#: devPS.c:5572
 msgid "unable to allocate raster image"
 msgstr " ラスター画像を割り当てられません "
 
-#: devPS.c:5766
+#: devPS.c:5773
 msgid "corrupt loaded encodings;  font not added"
 msgstr ""
 " ロードされたエンコーディングが破損しています;  フォントは追加されません "
 
-#: devPS.c:5775
+#: devPS.c:5782
 msgid "failed to record device encoding; font not added"
 msgstr ""
 " デバイスエンコーディングの記録に失敗しました; フォントは追加されません "
 
-#: devPS.c:5886
+#: devPS.c:5893
 msgid "increasing the PDF version to 1.2"
 msgstr " PDF のバージョンを 1.2 に更新しています "
 
-#: devPS.c:5916
+#: devPS.c:5923
 msgid "failed to load default encoding"
 msgstr " 既定のエンコーディングのロードに失敗しました "
 
-#: devPS.c:5982
+#: devPS.c:5989
 msgid "failed to initialise default PDF font"
 msgstr " 既定の PDF フォントの初期化に失敗しました "
 
-#: devPS.c:6037
+#: devPS.c:6044
 msgid "failed to initialise additional PDF fonts"
 msgstr " 追加の PDF フォントの初期化に失敗しました "
 
-#: devPS.c:6050
+#: devPS.c:6057
 msgid "failed to allocate rasters"
 msgstr " ラスターを割り当てることができませんでした "
 
-#: devPS.c:6057
+#: devPS.c:6064
 msgid "failed to allocate masks"
 msgstr " マスクを割り当てることができませんでした "
 
-#: devPS.c:6120
+#: devPS.c:6127
 #, c-format
 msgid "invalid paper type '%s' (pdf)"
 msgstr " 不正なペーパサイズ '%s' (pdf) "
 
-#: devPS.c:6144
+#: devPS.c:6151
 msgid "invalid foreground/background color (pdf)"
 msgstr " 不正な前景/背景色 (pdf) "
 
-#: devPS.c:6263
+#: devPS.c:6270
 msgid "invalid 'alpha' value in PDF"
 msgstr " PDF 中に不正なアルファ値 "
 
-#: devPS.c:6288
+#: devPS.c:6295
 msgid "increasing the PDF version to 1.4"
 msgstr " PDF のバージョンを 1.4 に更新 "
 
-#: devPS.c:6339 devPS.c:6386
+#: devPS.c:6346 devPS.c:6393
 msgid "unknown 'colormodel', using 'srgb'"
 msgstr " 未知の 'colormodel' です。'srgb' を使います "
 
-#: devPS.c:6580
+#: devPS.c:6587
 msgid "failed to load sRGB colorspace file"
 msgstr " sRGB 色空間ファイルのロードに失敗しました "
 
-#: devPS.c:6844
+#: devPS.c:6851
 msgid "corrupt encodings in PDF device"
 msgstr " PDF デバイス中に破損したエンコーディング "
 
-#: devPS.c:6925
+#: devPS.c:6932
 msgid "increasing the PDF version to 1.3"
 msgstr " PDF のバージョンを 1.3 に更新 "
 
-#: devPS.c:7050
+#: devPS.c:7057
 #, c-format
 msgid "cannot open 'pdf' pipe to '%s'"
 msgstr " '%s' に対する 'postscript' パイプを開くことができません "
 
-#: devPS.c:7056
+#: devPS.c:7063
 msgid "file = \"|cmd\" implies 'onefile = TRUE'"
 msgstr " file = \"|cmd\" は 'onefile = TRUE' を意味します "
 
-#: devPS.c:7199
+#: devPS.c:7206
 #, c-format
 msgid ""
 "cannot open 'pdf' file argument '%s'\n"
@@ -514,32 +534,32 @@ msgstr ""
 " 'pdf' ファイル引数 '%s' を開くことができません \n"
 " PDF デバイスを閉じてください "
 
-#: devPS.c:7666 devPS.c:8028 devPS.c:8075
+#: devPS.c:7673 devPS.c:8035 devPS.c:8082
 msgid "failed to find or load PDF font"
 msgstr " PDF フォントが見付からないかロードできませんでした "
 
-#: devPS.c:7850 devPS.c:7983
+#: devPS.c:7857 devPS.c:7990
 msgid "failed to find or load PDF CID font"
 msgstr " PDF CID フォントが見付からないかロードできませんでした "
 
-#: devPS.c:8214 devPS.c:8218 devPS.c:8378 devPS.c:8382
+#: devPS.c:8221 devPS.c:8225 devPS.c:8386 devPS.c:8390
 #, c-format
 msgid "invalid 'family' parameter in %s"
 msgstr " %s 中に不正な 'family' パラメータ "
 
-#: devPS.c:8236 devPS.c:8394
+#: devPS.c:8243 devPS.c:8402
 #, c-format
 msgid "invalid 'fonts' parameter in %s"
 msgstr " %s 中に不正な 'fonts' パラメータ "
 
-#: devPS.c:8242 devPS.c:8404 devPS.c:8407 devWindows.c:3648 devWindows.c:3652
-#: devWindows.c:3660 devWindows.c:3671 devWindows.c:3677 devWindows.c:3684
-#: devWindows.c:3691 devWindows.c:3695
+#: devPS.c:8249 devPS.c:8412 devPS.c:8415 devWindows.c:3646 devWindows.c:3650
+#: devWindows.c:3658 devWindows.c:3669 devWindows.c:3675 devWindows.c:3682
+#: devWindows.c:3689 devWindows.c:3693
 #, c-format
 msgid "invalid value of '%s'"
 msgstr " '%s' の値が不正です "
 
-#: devPS.c:8255 devPS.c:8322 devPS.c:8421 devPicTeX.c:740 devWindows.c:3732
+#: devPS.c:8262 devPS.c:8329 devPS.c:8429 devPicTeX.c:740 devWindows.c:3734
 #, c-format
 msgid "unable to start %s() device"
 msgstr " デバイス %s() を開始できませんでした "
@@ -576,143 +596,139 @@ msgid ""
 msgstr ""
 " quartz() デバイスを作成できません。与えられた型はサポートされていません "
 
-#: devQuartz.c:1606
+#: devQuartz.c:1609
 msgid "Quartz device is not available on this platform"
 msgstr " Quartz デバイスはこのプラットフォームでは利用できません "
 
-#: devWindows.c:341 devWindows.c:387 devWindows.c:458
+#: devWindows.c:358 devWindows.c:404 devWindows.c:475
 msgid "Not enough memory to copy graphics window"
 msgstr " グラフィックスウィンドをコピーするのに十分なメモリがありません "
 
-#: devWindows.c:346 devWindows.c:392 devWindows.c:463
+#: devWindows.c:363 devWindows.c:409 devWindows.c:480
 msgid "No device available to copy graphics window"
 msgstr " グラフィックスウィンドをコピーするのに使えるデバイスがありません "
 
-#: devWindows.c:396 devWindows.c:467
+#: devWindows.c:413 devWindows.c:484
 #, c-format
 msgid "'%%' is not allowed in file name"
 msgstr " '%%' はファイル名には利用できません "
 
-#: devWindows.c:604
+#: devWindows.c:621
 msgid "invalid font specification"
 msgstr " 不正なフォント指定 "
 
-#: devWindows.c:643
+#: devWindows.c:660
 msgid "font family not found in Windows font database"
 msgstr " Windows のフォントデータベースにフォントファミリが見付かりません "
 
-#: devWindows.c:1074
+#: devWindows.c:1091
 msgid "plot history seems corrupted"
 msgstr " 描画履歴が破損しているようです "
 
-#: devWindows.c:1081
+#: devWindows.c:1098
 msgid "no plot history!"
 msgstr " 描画履歴がありません "
 
-#: devWindows.c:1798
+#: devWindows.c:1815
 #, c-format
 msgid "filename too long in %s() call"
 msgstr " 呼出し %s() 中に長すぎるファイル名 "
 
-#: devWindows.c:1807 devWindows.c:1846 devWindows.c:1880
+#: devWindows.c:1820 devWindows.c:1855 devWindows.c:1885
 #, c-format
 msgid "'width=%d, height=%d' are unlikely values in pixels"
 msgstr " 'width=%d, height=%d' はピクセル単位でありそうもない値です "
 
-#: devWindows.c:1815 devWindows.c:1820 devWindows.c:1849 devWindows.c:1854
-#: devWindows.c:1883 devWindows.c:1888
+#: devWindows.c:1828 devWindows.c:1833 devWindows.c:1858 devWindows.c:1863
+#: devWindows.c:1888 devWindows.c:1893
 msgid "unable to allocate bitmap"
 msgstr " ビットマップを割り当てられません "
 
-#: devWindows.c:1826 devWindows.c:1860 devWindows.c:2184
+#: devWindows.c:1839 devWindows.c:1869 devWindows.c:2189
 #, c-format
 msgid "unable to open file '%s' for writing"
 msgstr " ファイル '%s' を書込み用に開くことができません "
 
-#: devWindows.c:1843
+#: devWindows.c:1852
 msgid "filename too long in jpeg() call"
 msgstr " 呼出し jpeg() 中に長すぎるファイル名 "
 
-#: devWindows.c:1877
+#: devWindows.c:1882
 msgid "filename too long in tiff() call"
 msgstr " 呼出し tiff() 中に長すぎるファイル名 "
 
-#: devWindows.c:1909
+#: devWindows.c:1914
 msgid "filename too long in win.metafile() call"
 msgstr " 呼出し win.metafile() 中に長すぎるファイル名 "
 
-#: devWindows.c:1919
+#: devWindows.c:1924
 #, c-format
 msgid "unable to open metafile '%s' for writing"
 msgstr " メタファイル '%s' を書込み用に開くことができません "
 
-#: devWindows.c:1921
+#: devWindows.c:1926
 msgid "unable to open clipboard to write metafile"
 msgstr " メタファイルを書込むためにクリップボードを開くことができません "
 
-#: devWindows.c:2132
+#: devWindows.c:2137
 msgid "Insufficient memory for resize. Killing device"
 msgstr " メモリ不足でサイズ変更できません。デバイスを停止します "
 
-#: devWindows.c:2140
+#: devWindows.c:2145
 msgid "Insufficient memory for resize. Disabling alpha blending"
 msgstr " メモリ不足でサイズ変更できません。alpha blending を停止します "
 
-#: devWindows.c:2169
+#: devWindows.c:2174
 msgid "a clipboard metafile can store only one figure."
 msgstr " クリップボードメタファイルは一つの図だけを保管できます "
 
-#: devWindows.c:2175
+#: devWindows.c:2180
 #, c-format
 msgid "metafile '%s' could not be created"
 msgstr " メタファイル '%s' を作成できませんでした "
 
-#: devWindows.c:3112 devWindows.c:3756
+#: devWindows.c:3117 devWindows.c:3758
 msgid "R Graphics"
 msgstr " R グラフィックス "
 
-#: devWindows.c:3126
+#: devWindows.c:3131
 msgid "attempt to use the locator after dev.hold()"
 msgstr " dev.hold() のあとにロケーターを使おうとしています "
 
-#: devWindows.c:3392
+#: devWindows.c:3397
 msgid "option 'windowsTimeouts' should be integer"
 msgstr " オプション 'windowsTimeouts' は整数でなければなりません "
 
-#: devWindows.c:3413
+#: devWindows.c:3418
 msgid "invalid device number in 'savePlot'"
 msgstr " 'savePlot' 中に不正なデバイス番号 "
 
-#: devWindows.c:3415
+#: devWindows.c:3420
 msgid "invalid device in 'savePlot'"
 msgstr " 'savePlot' 中に不正なデバイス "
 
-#: devWindows.c:3418
+#: devWindows.c:3423
 msgid "invalid filename argument in 'savePlot'"
 msgstr " 'savePlot' 中に不正なファイル名引数 "
 
-#: devWindows.c:3423
+#: devWindows.c:3428
 msgid "invalid type argument in 'savePlot'"
 msgstr " 'savePlot' に不正な型の引数 "
 
-#: devWindows.c:3450
+#: devWindows.c:3455
 msgid "unknown type in savePlot"
 msgstr " savePlot 中に未知の型 "
 
-#: devWindows.c:3495 devWindows.c:3528 devWindows.c:3557 devWindows.c:3589
-#: devWindows.c:3614
+#: devWindows.c:3500 devWindows.c:3532 devWindows.c:3560 devWindows.c:3591
+#: devWindows.c:3612
 msgid "processing of the plot ran out of memory"
 msgstr " プロット中にメモリ不足になりました "
 
-#: devWindows.c:3574
+#: devWindows.c:3576
 msgid "Impossible to open "
 msgstr " オープンできません "
 
-#: devWindows.c:3601
-msgid "Impossible to load Rbitmap.dll"
-msgstr " Rbitmap.dll をロードできません "
-
-#: devWindows.c:3643
+#: devWindows.c:3641
 msgid "invalid 'width' or 'height'"
 msgstr " 不正な幅か高さ "
 
@@ -735,11 +751,14 @@ msgstr ""
 " サポートされていないスキーム (scheme) なのでイメージデータは書き出されませ"
 "ん "
 
-#: stubs.c:99
+#: stubs.c:104
 #, c-format
 msgid "invalid '%s' argument"
 msgstr " 引数 '%s' が不正です "
 
+#~ msgid "Impossible to load Rbitmap.dll"
+#~ msgstr " Rbitmap.dll をロードできません "
+
 #~ msgid "Invalid line end"
 #~ msgstr " 行末が不正です "
 
diff --git a/src/library/grDevices/po/ko.po b/src/library/grDevices/po/ko.po
index 7262699..9393225 100644
--- a/src/library/grDevices/po/ko.po
+++ b/src/library/grDevices/po/ko.po
@@ -1,115 +1,142 @@
 # Korean translation for R grDevices package
-# src/library/grDevices/po/ko.po
-# Copyright (C) 1995-2014 The R Core Team
+# ./grDevices/po/ko.po
+#
+# Copyright (C) 1995-2016 The R Core Team
+#
 # This file is distributed under the same license as the R grDevices package.
-# Chel Hee Lee <chl948 at mail.usask.ca>, 2008-2014.
+# Maintained by Chel Hee Lee <chl948 at mail.usask.ca>, 2008-2016.
+# Contact: Chel Hee Lee <gnustats at gmail.com>
+#
+# Notes:
+# Under development (unstable) starting from 11-APR-2016 for R-3.3.1 - QC: in progress
+# Freezed on 10-APR-2016 for R-3.3.0 - QC: PASS
+# Freezed on 30-MAR-2015 for R-3.2.0 - QC: PASS
+# Freezed on 06-FEB-2015 for R-3.1.3 - QC: PASS
 #
 msgid ""
 msgstr ""
-"Project-Id-Version: R 3.1.0\n"
+"Project-Id-Version: R-3.3.0\n"
 "Report-Msgid-Bugs-To: bugs.r-project.org\n"
-"POT-Creation-Date: 2014-03-27 07:46+0000\n"
-"PO-Revision-Date: 2014-03-26 20:46-0600\n"
+"POT-Creation-Date: 2016-04-01 10:28-0700\n"
+"PO-Revision-Date: 2016-04-11 13:08-0600\n"
 "Last-Translator: Chel Hee Lee <chl948 at mail.usask.ca>\n"
-"Language-Team:  <chl948 at mail.usask.ca>\n"
+"Language-Team: Chel Hee Lee <chl948 at mail.usask.ca>\n"
 "Language: ko\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
 "Plural-Forms: nplurals=1; plural=0;\n"
-"X-Poedit-SourceCharset: UTF-8\n"
-"X-Generator: Poedit 1.5.4\n"
 
-#: axis_scales.c:37 axis_scales.c:38 axis_scales.c:53
+#: axis_scales.c:37 axis_scales.c:38 axis_scales.c:55
 #, c-format
 msgid "'%s' must be numeric of length %d"
 msgstr "'%s'는 반드시 수치형이어야 하며, 길이가 %d이어야 합니다"
 
 #: colors.c:69
 #, c-format
+msgid "color intensity %s, not in [0,1]"
+msgstr "색의 강도는 [0,1] 내에 있어야 하는데 %s를 가집니다."
+
+#: colors.c:71
+#, c-format
 msgid "color intensity %g, not in [0,1]"
-msgstr "색의 강도는 [0,1] 내에 있어야 하는데  %g입니다"
+msgstr "색의 강도는 [0,1] 내에 있어야 하는데  %g를 가집니다."
 
-#: colors.c:76
+#: colors.c:78
+#, c-format
+msgid "color intensity %s, not in 0:255"
+msgstr "색의 강도는 0:255 내에 있어야 하는데 %s를 가집니다."
+
+#: colors.c:80
 #, c-format
 msgid "color intensity %d, not in 0:255"
-msgstr "색의 강도는 0:255 내에 있어야 하는데 %d입니다"
+msgstr "색의 강도는 0:255 내에 있어야 하는데 %d를 가집니다."
+
+#: colors.c:87
+#, c-format
+msgid "alpha level %s, not in [0,1]"
+msgstr "알파 수준은 [0,1] 내에 있어야 하는데 %s를 가집니다."
 
-#: colors.c:83
+#: colors.c:89
 #, c-format
 msgid "alpha level %g, not in [0,1]"
-msgstr "알파레벨이 [0,1] 내에 있어야 하는데 %g입니다"
+msgstr "알파레벨이 [0,1] 내에 있어야 하는데 %g를 가집니다."
 
-#: colors.c:90
+#: colors.c:96
+#, c-format
+msgid "alpha level %s, not in 0:255"
+msgstr "알파레벨 0:255 내에 있어야 하는데 %s를 가집니다."
+
+#: colors.c:98
 #, c-format
 msgid "alpha level %d, not in 0:255"
-msgstr "알파레벨 0:255 내에 있어야 하는데 %d입니다"
+msgstr "알파레벨 0:255 내에 있어야 하는데 %d를 가집니다."
 
-#: colors.c:118
+#: colors.c:126
 msgid "bad hsv to rgb color conversion"
-msgstr "hsv에서 rgb로의 색상전환이 잘못되었습니다"
+msgstr "hsv에서 rgb로의 색상전환이 잘못되었습니다."
 
-#: colors.c:207 colors.c:221
+#: colors.c:218 colors.c:232
 msgid "invalid hsv color"
-msgstr "유효하지 않은 hsv 색입니다"
+msgstr "유효하지 않은 hsv 색입니다."
 
-#: colors.c:333 colors.c:353
+#: colors.c:344 colors.c:364
 msgid "invalid hcl color"
-msgstr "유효하지 않은 hcl 색입니다"
+msgstr "유효하지 않은 hcl 색입니다."
 
-#: colors.c:385
+#: colors.c:396
 msgid "invalid value of 'maxColorValue'"
 msgstr "'maxColorValue'의 값이 올바르지 않습니다"
 
-#: colors.c:413
+#: colors.c:424
 msgid "invalid 'names' vector"
 msgstr "유효하지 않은 'names' 벡터입니다"
 
-#: colors.c:472 colors.c:481
+#: colors.c:483 colors.c:492
 msgid "invalid gray level, must be in [0,1]."
 msgstr "명암수준은 반드시 [0,1]내에 있어야 합니다"
 
-#: colors.c:537
+#: colors.c:548
 #, c-format
 msgid "invalid '%s' value"
 msgstr "유효하지 않은 '%s' 값입니다"
 
-#: colors.c:1329
+#: colors.c:1340
 msgid "invalid hex digit in 'color' or 'lty'"
 msgstr "'color' 또는 'lty'에 유효하지 않은 16진수가 있습니다"
 
-#: colors.c:1339 colors.c:1349
+#: colors.c:1350 colors.c:1360
 msgid "invalid RGB specification"
 msgstr "유효하지 않은 RGB 지정입니다"
 
-#: colors.c:1382
+#: colors.c:1393
 #, c-format
 msgid "invalid color name '%s'"
 msgstr "유효하지 않은 색상명 '%s'입니다"
 
-#: colors.c:1432 colors.c:1441
+#: colors.c:1443 colors.c:1452
 #, c-format
 msgid "invalid color specification \"%s\""
 msgstr "유효하지 않은 색상지정 \"%s\"입니다"
 
-#: colors.c:1469
+#: colors.c:1480
 msgid "supplied color is neither numeric nor character"
 msgstr "제공된 색상은 숫자도 아니고 문자도 아닙니다"
 
-#: colors.c:1473
+#: colors.c:1484
 #, c-format
 msgid "numerical color values must be >= 0, found %d"
 msgstr "색상을 정하는 숫자값은 반드시 0보다 크거나 같아야 하며 %d를 찾았습니다"
 
-#: colors.c:1484
+#: colors.c:1495
 msgid "invalid argument type"
 msgstr "유효하지 않은 인자 유형입니다"
 
-#: colors.c:1495
+#: colors.c:1506
 msgid "unknown palette (need >= 2 colors)"
 msgstr "알수없는 파렛트입니다 (2개 이상의 색상이 필요합니다)"
 
-#: colors.c:1499 colors.c:1521
+#: colors.c:1510 colors.c:1532
 #, c-format
 msgid "maximum number of colors is %d"
 msgstr "사용할 수 있는 색상의 최대개수는 %d입니다"
@@ -123,7 +150,7 @@ msgstr "afm 파일 '%s'는 열 수 없습니다"
 msgid "unknown AFM entity encountered"
 msgstr ""
 
-#: devPS.c:740 devPS.c:743 devPS.c:4420 devPS.c:7911 devPicTeX.c:484
+#: devPS.c:740 devPS.c:743 devPS.c:4427 devPS.c:7918 devPicTeX.c:484
 #: devPicTeX.c:486
 #, c-format
 msgid "invalid string in '%s'"
@@ -151,19 +178,12 @@ msgstr "문자 0x%x에 대한 폰트메트릭을 알 수 없습니다"
 
 #: devPS.c:881
 #, c-format
-msgid ""
-"invalid character (%04x) sent to 'PostScriptCIDMetricInfo' in a single-byte "
-"locale"
-msgstr ""
-"단일바이트 로케일에 있는 'PostScriptCIDMetricInfo'에 보내진 유효하지 않은 문"
-"자 (%04x)입니다"
+msgid "invalid character (%04x) sent to 'PostScriptCIDMetricInfo' in a single-byte locale"
+msgstr "단일바이트 로케일에 있는 'PostScriptCIDMetricInfo'에 보내진 유효하지 않은 문자 (%04x)입니다"
 
 #: devPS.c:889
-msgid ""
-"invalid character sent to 'PostScriptCIDMetricInfo' in a single-byte locale"
-msgstr ""
-"단일바이트 로케일에 있는 'PostScriptCIDMetricInfo'에 보내진 유효하지 않은 문"
-"자입니다"
+msgid "invalid character sent to 'PostScriptCIDMetricInfo' in a single-byte locale"
+msgstr "단일바이트 로케일에 있는 'PostScriptCIDMetricInfo'에 보내진 유효하지 않은 문자입니다"
 
 #: devPS.c:994
 msgid "failed to allocate CID font info"
@@ -206,295 +226,288 @@ msgstr "인코딩 파일 '%s'을 로드하는데 실패했습니다"
 msgid "invalid font name or more than one font name"
 msgstr "올바른 폰트명이 아니거나 하나 이상의 폰트명을 가집니다"
 
-#: devPS.c:1595 devPS.c:1630
+#: devPS.c:1596 devPS.c:1631
 #, c-format
 msgid "font family '%s' not found in PostScript font database"
 msgstr "PostScript 폰트 데이터베이스에서 찾을 수 없는 폰트페밀리 '%s'입니다"
 
-#: devPS.c:1702 devPS.c:1784 devPS.c:1811
+#: devPS.c:1703 devPS.c:1785 devPS.c:1812
 #, c-format
 msgid "font encoding for family '%s' not found in font database"
-msgstr ""
-"페밀리 '%s'에 대한 폰트 인코딩을 폰트 데이터베이스에서 찾을 수 없습니다"
+msgstr "페밀리 '%s'에 대한 폰트 인코딩을 폰트 데이터베이스에서 찾을 수 없습니다"
 
-#: devPS.c:1729 devPS.c:1756
+#: devPS.c:1730 devPS.c:1757
 #, c-format
 msgid "font CMap for family '%s' not found in font database"
 msgstr "페밀리 '%s'에 대한 폰트 CMap을 폰트 데이터베이스에서 찾을 수 없습니다"
 
-#: devPS.c:1950 devPS.c:2029 devPS.c:2097
+#: devPS.c:1952 devPS.c:2032 devPS.c:2100
 #, c-format
 msgid "cannot load afm file '%s'"
 msgstr "afm 파일 '%s'를 로드할 수 없습니다"
 
-#: devPS.c:2385
+#: devPS.c:2388
 msgid "corrupt loaded encodings;  encoding not recorded"
 msgstr "로드된 인코딩이 손상되어 기록된 인코딩이 없습니다"
 
-#: devPS.c:2396
+#: devPS.c:2399
 msgid "failed to record device encoding"
 msgstr "장치 인코딩을 기록하는데 실패했습니다"
 
-#: devPS.c:2565
+#: devPS.c:2570
 msgid "object '.ps.prolog' is not a character vector"
 msgstr "객체 '.ps.prolog'는 문자형 벡터가 아닙니다"
 
-#: devPS.c:2638 devPS.c:6415 devWindows.c:784
+#: devPS.c:2645 devPS.c:6422 devWindows.c:801
 msgid "invalid line end"
 msgstr "유효하지 않은 라인의 끝입니다"
 
-#: devPS.c:2657 devPS.c:6434 devWindows.c:797
+#: devPS.c:2664 devPS.c:6441 devWindows.c:814
 msgid "invalid line join"
 msgstr "유효하지 않은 라인의 결합입니다"
 
-#: devPS.c:2665
+#: devPS.c:2672
 msgid "invalid line mitre"
 msgstr ""
 
-#: devPS.c:2874 devPS.c:3770 devPS.c:4218 devPS.c:4245 devPS.c:5255
-#: devPS.c:7761 devPS.c:7806
+#: devPS.c:2881 devPS.c:3777 devPS.c:4225 devPS.c:4252 devPS.c:5262
+#: devPS.c:7768 devPS.c:7813
 #, c-format
 msgid "attempt to use invalid font %d replaced by font 1"
 msgstr "font 1에 의해서 대체된 유효하지 않은 폰트 %d를 사용하려고 시도합니다"
 
-#: devPS.c:3096 devPS.c:4720 devPS.c:5834
+#: devPS.c:3103 devPS.c:4727 devPS.c:5841
 #, c-format
 msgid "filename too long in %s()"
 msgstr "%s()에 있는 파일명이 너무 깁니다"
 
-#: devPS.c:3102 devPS.c:4726 devPS.c:5840
+#: devPS.c:3109 devPS.c:4733 devPS.c:5847
 #, c-format
 msgid "memory allocation problem in %s()"
 msgstr "%s()에서 메모리 할당 문제가 발생했습니다"
 
-#: devPS.c:3119 devPS.c:5900
+#: devPS.c:3126 devPS.c:5907
 #, c-format
 msgid "encoding path is too long in %s()"
 msgstr "%s()에 인코딩 패스가 너무 깁니다"
 
-#: devPS.c:3133 devPS.c:4766
+#: devPS.c:3140 devPS.c:4773
 #, c-format
 msgid "failed to load encoding file in %s()"
 msgstr "%s()에 인코딩 파일을 로드하는데 실패했습니다"
 
-#: devPS.c:3178 devPS.c:3241 devPS.c:5959 devPS.c:6014 devPS.c:7641
+#: devPS.c:3185 devPS.c:3248 devPS.c:5966 devPS.c:6021 devPS.c:7648
 msgid "invalid font type"
 msgstr "유효하지 않은 폰트타입입니다"
 
-#: devPS.c:3202
+#: devPS.c:3209
 msgid "failed to initialise default PostScript font"
 msgstr "기본 PostScript 폰트를 초기화하는데 실패했습니다"
 
-#: devPS.c:3268
+#: devPS.c:3275
 msgid "failed to initialise additional PostScript fonts"
 msgstr "추가적인 PostScript 폰트들을 초기화하는데 실패했습니다"
 
-#: devPS.c:3284
+#: devPS.c:3291
 msgid "invalid foreground/background color (postscript)"
 msgstr "유효하지 않은 전방/후방색입니다 (postscript)"
 
-#: devPS.c:3289
+#: devPS.c:3296
 msgid "'command' is too long"
 msgstr "'command'가 너무 깁니다"
 
-#: devPS.c:3294
+#: devPS.c:3301
 msgid "'postscript(print.it=TRUE)' used with an empty 'print' command"
-msgstr ""
-"비어있는 'print' 명령어와 함께 사용된 'postscript(print.it=TRUE)'입니다"
+msgstr "비어있는 'print' 명령어와 함께 사용된 'postscript(print.it=TRUE)'입니다"
 
-#: devPS.c:3343
+#: devPS.c:3350
 #, c-format
 msgid "invalid page type '%s' (postscript)"
 msgstr "유효하지 않은 페이지 타입 '%s' (postscript)"
 
-#: devPS.c:3457 devPS.c:4570 devWindows.c:2341
-msgid ""
-"semi-transparency is not supported on this device: reported only once per "
-"page"
-msgstr ""
-"이 장치에서는 반투명 기능이 지원되지 않습니다: 페이당 오로지 한번만 보고됩니"
-"다"
+#: devPS.c:3464 devPS.c:4577 devWindows.c:2346
+msgid "semi-transparency is not supported on this device: reported only once per page"
+msgstr "이 장치에서는 반투명 기능이 지원되지 않습니다: 페이당 오로지 한번만 보고됩니다"
 
-#: devPS.c:3563 devPS.c:3572
+#: devPS.c:3570 devPS.c:3579
 #, c-format
 msgid "cannot open 'postscript' pipe to '%s'"
 msgstr "'%s'에 파이프하는 'postscript'를 열 수 없습니다"
 
-#: devPS.c:3583 devPS.c:4975 devPS.c:4986 devPS.c:7066 qdPDF.c:98
+#: devPS.c:3590 devPS.c:4982 devPS.c:4993 devPS.c:7073 qdPDF.c:98
 #, c-format
 msgid "cannot open file '%s'"
 msgstr "파일 '%s'를 열 수 없습니다"
 
-#: devPS.c:3711 devPS.c:3726
+#: devPS.c:3718 devPS.c:3733
 #, c-format
 msgid ""
 "error from postscript() in running:\n"
 "    %s"
 msgstr ""
 
-#: devPS.c:3758
+#: devPS.c:3765
 #, c-format
 msgid "CID family '%s' not included in postscript() device"
 msgstr "postscript() 장치에 포함되어 있지 않은 CID 페밀리 '%s'입니다"
 
-#: devPS.c:3776 devPS.c:3787 devPS.c:4225 devPS.c:4255 devPS.c:4360
+#: devPS.c:3783 devPS.c:3794 devPS.c:4232 devPS.c:4262 devPS.c:4367
 #, c-format
 msgid "family '%s' not included in postscript() device"
 msgstr "postscript() 장치에 포함되어 있지 않은 페밀리 '%s'입니다"
 
-#: devPS.c:4300
+#: devPS.c:4307
 #, c-format
 msgid "unknown encoding '%s' in 'mbcsToSbcs'"
 msgstr "'mbcsToSbcs'에 알 수 없는 인코딩 '%s'가 있습니다"
 
-#: devPS.c:4310
+#: devPS.c:4317
 #, c-format
 msgid "conversion failure on '%s' in 'mbcsToSbcs': dot substituted for <%02x>"
 msgstr ""
 
-#: devPS.c:4388
+#: devPS.c:4395
 #, c-format
 msgid "failed open converter to encoding '%s'"
 msgstr "인코딩 '%s'로 전환해주는 장치를 여는데 실패했습니다"
 
-#: devPS.c:4406 devPS.c:5300 devPS.c:7896
+#: devPS.c:4413 devPS.c:5307 devPS.c:7903
 #, c-format
 msgid "failed in text conversion to encoding '%s'"
 msgstr "인코딩 '%s'로 텍스트컨버전에서 실패했습니다"
 
-#: devPS.c:4584
+#: devPS.c:4591
 msgid "ran out of colors in xfig()"
 msgstr ""
 
-#: devPS.c:4613
+#: devPS.c:4620
 #, c-format
 msgid "unimplemented line texture %08x: using Dash-double-dotted"
 msgstr "구현되지 않은 라인 텍스츄어 %08x이므로 Dash-double-dotted를 이용합니다"
 
-#: devPS.c:4679
+#: devPS.c:4686
 #, c-format
 msgid "unknown postscript font family '%s', using Helvetica"
-msgstr ""
-"알 수 없는 포스트스크립트 폰트 페밀리 '%s'이므로 Helvetica를 사용합니다"
+msgstr "알 수 없는 포스트스크립트 폰트 페밀리 '%s'이므로 Helvetica를 사용합니다"
 
-#: devPS.c:4751
+#: devPS.c:4758
 msgid "invalid foreground/background color (xfig)"
 msgstr "유효하지 않은 전경/배격색 (xfig)입니다"
 
-#: devPS.c:4784
+#: devPS.c:4791
 msgid "only Type 1 fonts supported for XFig"
 msgstr "XFig에 지원되는 Type 1 폰트입니다"
 
-#: devPS.c:4797
+#: devPS.c:4804
 msgid "failed to initialise default XFig font"
 msgstr "기본 XFig 폰트를 초기화하는데 실패했습니다"
 
-#: devPS.c:4834
+#: devPS.c:4841
 #, c-format
 msgid "invalid page type '%s' (xfig)"
 msgstr "유효하지 않은 페이지 타입 '%s' (xfig)입니다"
 
-#: devPS.c:4842
+#: devPS.c:4849
 #, c-format
 msgid "xfig(%s, onefile=FALSE) will only return the last plot"
 msgstr "xfig(%s, onefile=FALSE)는 오로지 마지막 플랏을 반환만 할 것입니다"
 
-#: devPS.c:4967
+#: devPS.c:4974
 msgid "empty file name"
 msgstr "비어있는 파일명입니다"
 
-#: devPS.c:5032 devPS.c:5084 devPS.c:5662 devPS.c:5706 devPS.c:7126
+#: devPS.c:5039 devPS.c:5091 devPS.c:5669 devPS.c:5713 devPS.c:7133
 msgid "write failed"
 msgstr "쓰기에 실패했습니다"
 
-#: devPS.c:5289
+#: devPS.c:5296
 #, c-format
 msgid "unable to use encoding '%s'"
 msgstr "인코딩 '%s'를 사용할 수 없습니다"
 
-#: devPS.c:5550 devPS.c:5553
+#: devPS.c:5557 devPS.c:5560
 msgid "failed to increase 'maxRaster'"
 msgstr "'maxRaster'를 증가시키는데 실패했습니다"
 
-#: devPS.c:5565
+#: devPS.c:5572
 msgid "unable to allocate raster image"
 msgstr "래스터 이미지를 할당할 수 없습니다"
 
-#: devPS.c:5766
+#: devPS.c:5773
 msgid "corrupt loaded encodings;  font not added"
 msgstr "로드된 인코딩이 손상되어 추가되지 않은 폰트입니다"
 
-#: devPS.c:5775
+#: devPS.c:5782
 msgid "failed to record device encoding; font not added"
 msgstr ""
 
-#: devPS.c:5886
+#: devPS.c:5893
 msgid "increasing the PDF version to 1.2"
 msgstr "PDF 버전을 1.2로 올립니다"
 
-#: devPS.c:5916
+#: devPS.c:5923
 msgid "failed to load default encoding"
 msgstr "기본 인코딩을 로드하는데 실패했습니다"
 
-#: devPS.c:5982
+#: devPS.c:5989
 msgid "failed to initialise default PDF font"
 msgstr "기본 PDF 폰트를 초기화하는데 실패했습니다"
 
-#: devPS.c:6037
+#: devPS.c:6044
 msgid "failed to initialise additional PDF fonts"
 msgstr "추가적인 PDF 폰트를 초기화하는데 실패했습니다"
 
-#: devPS.c:6050
+#: devPS.c:6057
 msgid "failed to allocate rasters"
 msgstr "래스터를 할당하는데 실패했습니다"
 
-#: devPS.c:6057
+#: devPS.c:6064
 msgid "failed to allocate masks"
 msgstr "매스크를 할당하는데 실패했습니다"
 
-#: devPS.c:6120
+#: devPS.c:6127
 #, c-format
 msgid "invalid paper type '%s' (pdf)"
 msgstr "유효하지 않은 페이퍼 종류 '%s' (pdf)입니다"
 
-#: devPS.c:6144
+#: devPS.c:6151
 msgid "invalid foreground/background color (pdf)"
 msgstr "유효하지 않은 전방/배경색 (pdf)입니다"
 
-#: devPS.c:6263
+#: devPS.c:6270
 msgid "invalid 'alpha' value in PDF"
 msgstr "PDF에 유효하지 않은 'alpha'값입니다"
 
-#: devPS.c:6288
+#: devPS.c:6295
 msgid "increasing the PDF version to 1.4"
 msgstr "PDF 버전을 1.4로 올립니다"
 
-#: devPS.c:6339 devPS.c:6386
+#: devPS.c:6346 devPS.c:6393
 msgid "unknown 'colormodel', using 'srgb'"
 msgstr "알 수 없는 'colormodel'이므로 'srgb'를 사용합니다"
 
-#: devPS.c:6580
+#: devPS.c:6587
 msgid "failed to load sRGB colorspace file"
 msgstr "sRGB 색공간 파일을 로드하는데 실패했습니다"
 
-#: devPS.c:6844
+#: devPS.c:6851
 msgid "corrupt encodings in PDF device"
 msgstr ""
 
-#: devPS.c:6925
+#: devPS.c:6932
 msgid "increasing the PDF version to 1.3"
 msgstr "PDF 버전을 1.3으로 올립니다"
 
-#: devPS.c:7050
+#: devPS.c:7057
 #, c-format
 msgid "cannot open 'pdf' pipe to '%s'"
 msgstr "'%s'에 파이프 하는 'pdf'를 열 수 없습니다"
 
-#: devPS.c:7056
+#: devPS.c:7063
 msgid "file = \"|cmd\" implies 'onefile = TRUE'"
 msgstr "file = \"|cmd\"은 'onefile = TRUE'을 의미합니다"
 
-#: devPS.c:7199
+#: devPS.c:7206
 #, c-format
 msgid ""
 "cannot open 'pdf' file argument '%s'\n"
@@ -503,32 +516,32 @@ msgstr ""
 "'pdf' 파링 인자 '%s'를 열 수 없습니다\n"
 "  PDF 장치를 닫아주세요"
 
-#: devPS.c:7666 devPS.c:8028 devPS.c:8075
+#: devPS.c:7673 devPS.c:8035 devPS.c:8082
 msgid "failed to find or load PDF font"
 msgstr "PDF 폰트를 찾거나 로드하는데 실패했습니다"
 
-#: devPS.c:7850 devPS.c:7983
+#: devPS.c:7857 devPS.c:7990
 msgid "failed to find or load PDF CID font"
 msgstr "PDF CID 폰트를 찾거나 로드하는데 실패했습니다"
 
-#: devPS.c:8214 devPS.c:8218 devPS.c:8378 devPS.c:8382
+#: devPS.c:8221 devPS.c:8225 devPS.c:8386 devPS.c:8390
 #, c-format
 msgid "invalid 'family' parameter in %s"
 msgstr "%s에 유효하지 않은 'family' 파라미터가 있습니다"
 
-#: devPS.c:8236 devPS.c:8394
+#: devPS.c:8243 devPS.c:8402
 #, c-format
 msgid "invalid 'fonts' parameter in %s"
 msgstr "%s에 유효하지 않은 'fonts' 파라미터가 있습니다"
 
-#: devPS.c:8242 devPS.c:8404 devPS.c:8407 devWindows.c:3648 devWindows.c:3652
-#: devWindows.c:3660 devWindows.c:3671 devWindows.c:3677 devWindows.c:3684
-#: devWindows.c:3691 devWindows.c:3695
+#: devPS.c:8249 devPS.c:8412 devPS.c:8415 devWindows.c:3646 devWindows.c:3650
+#: devWindows.c:3658 devWindows.c:3669 devWindows.c:3675 devWindows.c:3682
+#: devWindows.c:3689 devWindows.c:3693
 #, c-format
 msgid "invalid value of '%s'"
 msgstr "유효하지 않은 '%s'의 값입니다"
 
-#: devPS.c:8255 devPS.c:8322 devPS.c:8421 devPicTeX.c:740 devWindows.c:3732
+#: devPS.c:8262 devPS.c:8329 devPS.c:8429 devPicTeX.c:740 devWindows.c:3734
 #, c-format
 msgid "unable to start %s() device"
 msgstr "%s() 장치를 시작할 수 없습니다"
@@ -560,149 +573,142 @@ msgid "unable to create device description"
 msgstr "device description을 생성할 수 없습니다"
 
 #: devQuartz.c:1479
-msgid ""
-"unable to create quartz() device target, given type may not be supported"
-msgstr ""
-"quartz() 장치대상을 생성할 수 없었습니다.  아마도 타입이 지원되지 않는 것 같"
-"습니다"
+msgid "unable to create quartz() device target, given type may not be supported"
+msgstr "quartz() 장치대상을 생성할 수 없었습니다.  아마도 타입이 지원되지 않는 것 같습니다"
 
-#: devQuartz.c:1606
+#: devQuartz.c:1609
 msgid "Quartz device is not available on this platform"
 msgstr "이 플랫폼에서는 Quartz장치를 사용할 수 없습니다"
 
-#: devWindows.c:341 devWindows.c:387 devWindows.c:458
+#: devWindows.c:358 devWindows.c:404 devWindows.c:475
 msgid "Not enough memory to copy graphics window"
 msgstr "그래픽 윈도우를 복사하는데 충분한 메모리가 없습니다"
 
-#: devWindows.c:346 devWindows.c:392 devWindows.c:463
+#: devWindows.c:363 devWindows.c:409 devWindows.c:480
 msgid "No device available to copy graphics window"
 msgstr "그래픽 윈도우를 복사할 수 있는 장치가 없습니다"
 
-#: devWindows.c:396 devWindows.c:467
+#: devWindows.c:413 devWindows.c:484
 #, c-format
 msgid "'%%' is not allowed in file name"
 msgstr "'%%'는 파일명에 사용될 수 없습니다"
 
-#: devWindows.c:604
+#: devWindows.c:621
 msgid "invalid font specification"
 msgstr "유효하지 않은 폰트지정입니다"
 
-#: devWindows.c:643
+#: devWindows.c:660
 msgid "font family not found in Windows font database"
 msgstr "윈도우즈 폰트데이터베이스에서 찾을 수 없는 폰트페밀리입니다"
 
-#: devWindows.c:1074
+#: devWindows.c:1091
 msgid "plot history seems corrupted"
 msgstr "플랏 히스토리가 손상된 것 같습니다"
 
-#: devWindows.c:1081
+#: devWindows.c:1098
 msgid "no plot history!"
 msgstr "플랏 히스토리가 없습니다!"
 
-#: devWindows.c:1798
+#: devWindows.c:1815
 #, c-format
 msgid "filename too long in %s() call"
 msgstr "%s() 호출시 파일명이 너무 깁니다"
 
-#: devWindows.c:1807 devWindows.c:1846 devWindows.c:1880
+#: devWindows.c:1820 devWindows.c:1855 devWindows.c:1885
 #, c-format
 msgid "'width=%d, height=%d' are unlikely values in pixels"
 msgstr "'width=%d, height=%d'는 픽셀에서 사용가능한 값들이 아닙니다"
 
-#: devWindows.c:1815 devWindows.c:1820 devWindows.c:1849 devWindows.c:1854
-#: devWindows.c:1883 devWindows.c:1888
+#: devWindows.c:1828 devWindows.c:1833 devWindows.c:1858 devWindows.c:1863
+#: devWindows.c:1888 devWindows.c:1893
 msgid "unable to allocate bitmap"
 msgstr "bitmap을 할당할 수 없습니다"
 
-#: devWindows.c:1826 devWindows.c:1860 devWindows.c:2184
+#: devWindows.c:1839 devWindows.c:1869 devWindows.c:2189
 #, c-format
 msgid "unable to open file '%s' for writing"
 msgstr "쓰기 위해서 파일 '%s'를 열 수 없습니다"
 
-#: devWindows.c:1843
+#: devWindows.c:1852
 msgid "filename too long in jpeg() call"
 msgstr "jpeg() 호출에 파일명이 너무 깁니다"
 
-#: devWindows.c:1877
+#: devWindows.c:1882
 msgid "filename too long in tiff() call"
 msgstr "tiff() 호출에 파일명이 너무 깁니다"
 
-#: devWindows.c:1909
+#: devWindows.c:1914
 msgid "filename too long in win.metafile() call"
 msgstr "win.metafile() 호출에 파일명이 너무 깁니다"
 
-#: devWindows.c:1919
+#: devWindows.c:1924
 #, c-format
 msgid "unable to open metafile '%s' for writing"
 msgstr "쓰기 위해서 메타파일 '%s'를 열 수 없습니다"
 
-#: devWindows.c:1921
+#: devWindows.c:1926
 msgid "unable to open clipboard to write metafile"
 msgstr "메타파일을 쓰기 위한 클립보드를 열 수 없습니다"
 
-#: devWindows.c:2132
+#: devWindows.c:2137
 msgid "Insufficient memory for resize. Killing device"
 msgstr "크기재조정을 위한 메모리가 충분하지 않으므로 장치를 꺼주세요"
 
-#: devWindows.c:2140
+#: devWindows.c:2145
 msgid "Insufficient memory for resize. Disabling alpha blending"
 msgstr "크기재조정을 위한 메모리가 충분하지 않으므로 알파 블렌딩은 꺼주세요"
 
-#: devWindows.c:2169
+#: devWindows.c:2174
 msgid "a clipboard metafile can store only one figure."
 msgstr "클립보드 메타파일은 오로지 한개의 figure만을 저장할 수 있습니다"
 
-#: devWindows.c:2175
+#: devWindows.c:2180
 #, c-format
 msgid "metafile '%s' could not be created"
 msgstr "메타파일 '%s'은 생성되지 않을 것입니다"
 
-#: devWindows.c:3112 devWindows.c:3756
+#: devWindows.c:3117 devWindows.c:3758
 msgid "R Graphics"
 msgstr "R 그래픽스"
 
-#: devWindows.c:3126
+#: devWindows.c:3131
 msgid "attempt to use the locator after dev.hold()"
 msgstr "dev.hold() 이후에 로케이터를 사용하려고 시도합니다"
 
-#: devWindows.c:3392
+#: devWindows.c:3397
 msgid "option 'windowsTimeouts' should be integer"
 msgstr "옵션 'windowsTimeouts'은 반드시 정수이어야 합니다"
 
-#: devWindows.c:3413
+#: devWindows.c:3418
 msgid "invalid device number in 'savePlot'"
 msgstr "'savePlot'에 유효하지 않은 장치번호가 있습니다"
 
-#: devWindows.c:3415
+#: devWindows.c:3420
 msgid "invalid device in 'savePlot'"
 msgstr "'savePlot'에 유효하지 않은 장치가 있습니다"
 
-#: devWindows.c:3418
+#: devWindows.c:3423
 msgid "invalid filename argument in 'savePlot'"
 msgstr "'savePlot'에 유효하지 않은 filename 인수가 있습니다"
 
-#: devWindows.c:3423
+#: devWindows.c:3428
 msgid "invalid type argument in 'savePlot'"
 msgstr "'savePlot'에 유효하지 않은 type 인수가 있습니다"
 
-#: devWindows.c:3450
+#: devWindows.c:3455
 msgid "unknown type in savePlot"
 msgstr "savePlot에 알 수 없는 유형입니다"
 
-#: devWindows.c:3495 devWindows.c:3528 devWindows.c:3557 devWindows.c:3589
-#: devWindows.c:3614
+#: devWindows.c:3500 devWindows.c:3532 devWindows.c:3560 devWindows.c:3591
+#: devWindows.c:3612
 msgid "processing of the plot ran out of memory"
 msgstr ""
 
-#: devWindows.c:3574
+#: devWindows.c:3576
 msgid "Impossible to open "
 msgstr "열 수 없습니다"
 
-#: devWindows.c:3601
-msgid "Impossible to load Rbitmap.dll"
-msgstr "Rbitmap.dll을 로드할 수 없습니다"
-
-#: devWindows.c:3643
+#: devWindows.c:3641
 msgid "invalid 'width' or 'height'"
 msgstr "유효하지 않은 'width' 또는 'height'입니다"
 
@@ -723,7 +729,10 @@ msgstr "QuartzBitmap_Output - 파일 '%s'를 열 수 없습니다"
 msgid "not a supported scheme, no image data written"
 msgstr ""
 
-#: stubs.c:99
+#: stubs.c:104
 #, c-format
 msgid "invalid '%s' argument"
 msgstr "유효하지 않은 '%s' 인자입니다"
+
+#~ msgid "Impossible to load Rbitmap.dll"
+#~ msgstr "Rbitmap.dll을 로드할 수 없습니다"
diff --git a/src/library/grDevices/po/pl.po b/src/library/grDevices/po/pl.po
index 8b4eff5..d9b1a74 100644
--- a/src/library/grDevices/po/pl.po
+++ b/src/library/grDevices/po/pl.po
@@ -1,8 +1,8 @@
 msgid ""
 msgstr ""
-"Project-Id-Version: R 3.1.0\n"
-"Report-Msgid-Bugs-To: bugs.r-project.org\n"
-"POT-Creation-Date: 2014-03-27 07:46+0000\n"
+"Project-Id-Version: R 3.4.0\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2016-04-01 10:28-0700\n"
 "PO-Revision-Date: \n"
 "Last-Translator: Łukasz Daniel <lukasz.daniel at gmail.com>\n"
 "Language-Team: Łukasz Daniel <lukasz.daniel at gmail.com>\n"
@@ -13,229 +13,158 @@ msgstr ""
 "na-Revision-Date: 2012-05-29 07:55+0100\n"
 "Plural-Forms: nplurals=3; plural=(n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 "
 "|| n%100>=20) ? 1 : 2);\n"
-"X-Poedit-SourceCharset: iso-8859-1\n"
-"X-Generator: Poedit 1.5.4\n"
-
-# grDevices/src/axis_scales.c: 37
-# error(_("'%s' must be numeric of length %d"), "axp", 3)
-# grDevices/src/axis_scales.c: 38
-# error(_("'%s' must be numeric of length %d"), "usr", 2)
-# grDevices/src/axis_scales.c: 53
-# error(_("'%s' must be numeric of length %d"), "usr", 2)
-#: axis_scales.c:37 axis_scales.c:38 axis_scales.c:53
+"X-Poedit-SourceCharset: UTF-8\n"
+"X-Generator: Poedit 1.8.7\n"
+
+#: axis_scales.c:37 axis_scales.c:38 axis_scales.c:55
 #, c-format
 msgid "'%s' must be numeric of length %d"
 msgstr "'%s' musi być liczbą o długości %d"
 
-# grDevices/src/colors.c: 69
-# error(_("color intensity %g, not in [0,1]"), x)
 #: colors.c:69
 #, c-format
+msgid "color intensity %s, not in [0,1]"
+msgstr "intensywność %s koloru, nie jest w przedziale [0, 1]"
+
+#: colors.c:71
+#, c-format
 msgid "color intensity %g, not in [0,1]"
 msgstr "intensywność %g koloru, nie jest w przedziale [0, 1]"
 
-# grDevices/src/colors.c: 76
-# error(_("color intensity %d, not in 0:255"), x)
-#: colors.c:76
+#: colors.c:78
+#, c-format
+msgid "color intensity %s, not in 0:255"
+msgstr "intensywność %s koloru, nie jest w zakresie 0:255"
+
+#: colors.c:80
 #, c-format
 msgid "color intensity %d, not in 0:255"
 msgstr "intensywność %d koloru, nie jest w zakresie 0:255"
 
-# grDevices/src/colors.c: 83
-# error(_("alpha level %g, not in [0,1]"), x)
-#: colors.c:83
+#: colors.c:87
+#, c-format
+msgid "alpha level %s, not in [0,1]"
+msgstr "poziom %s alfa, nie jest w przedziale [0, 1]"
+
+#: colors.c:89
 #, c-format
 msgid "alpha level %g, not in [0,1]"
 msgstr "poziom %g alfa, nie jest w przedziale [0, 1]"
 
-# grDevices/src/colors.c: 90
-# error(_("alpha level %d, not in 0:255"), x)
-#: colors.c:90
+#: colors.c:96
+#, c-format
+msgid "alpha level %s, not in 0:255"
+msgstr "poziom %s alfa, nie jest w zakresie 0:255"
+
+#: colors.c:98
 #, c-format
 msgid "alpha level %d, not in 0:255"
 msgstr "poziom %d alfa, nie jest w zakresie 0:255"
 
-# grDevices/src/colors.c: 118
-# error(_("bad hsv to rgb color conversion"))
-#: colors.c:118
+#: colors.c:126
 msgid "bad hsv to rgb color conversion"
 msgstr "błędna konwersja hsv na rgb"
 
-# grDevices/src/colors.c: 207
-# error(_("invalid hsv color"))
-# grDevices/src/colors.c: 221
-# error(_("invalid hsv color"))
-#: colors.c:207 colors.c:221
+#: colors.c:218 colors.c:232
 msgid "invalid hsv color"
 msgstr "niepoprawny kolor hsv"
 
-# grDevices/src/colors.c: 333
-# error(_("invalid hcl color"))
-# grDevices/src/colors.c: 353
-# error(_("invalid hcl color"))
-#: colors.c:333 colors.c:353
+#: colors.c:344 colors.c:364
 msgid "invalid hcl color"
 msgstr "niepoprawny kolor hcl"
 
-# grDevices/src/colors.c: 385
-# error(_("invalid value of 'maxColorValue'"))
-#: colors.c:385
+#: colors.c:396
 msgid "invalid value of 'maxColorValue'"
 msgstr "niepoprawna wartość 'maxColorValue'"
 
-# grDevices/src/colors.c: 413
-# error(_("invalid 'names' vector"))
-#: colors.c:413
+#: colors.c:424
 msgid "invalid 'names' vector"
 msgstr "niepoprawny wektor 'names'"
 
-# grDevices/src/colors.c: 472
-# error(_("invalid gray level, must be in [0,1]."))
-# grDevices/src/colors.c: 481
-# error(_("invalid gray level, must be in [0,1]."))
-#: colors.c:472 colors.c:481
+#: colors.c:483 colors.c:492
 msgid "invalid gray level, must be in [0,1]."
 msgstr "niepoprawny poziom szarości, musi być w przedziale [0, 1]."
 
-# grDevices/src/colors.c: 537
-# error(_("invalid '%s' value"), "alpha")
-# grDevices/src/cairo/cairoBM.c: 501
-# error(_("invalid '%s' value"), "bg")
-#: colors.c:537
+#: colors.c:548
 #, c-format
 msgid "invalid '%s' value"
 msgstr "niepoprawna wartość '%s'"
 
-# grDevices/src/colors.c: 1329
-# error(_("invalid hex digit in 'color' or 'lty'"))
-#: colors.c:1329
+#: colors.c:1340
 msgid "invalid hex digit in 'color' or 'lty'"
 msgstr "niepoprawna liczba szestnastkowa w 'color' lub 'lty'"
 
-# grDevices/src/colors.c: 1339
-# error(_("invalid RGB specification"))
-# grDevices/src/colors.c: 1349
-# error(_("invalid RGB specification"))
-#: colors.c:1339 colors.c:1349
+#: colors.c:1350 colors.c:1360
 msgid "invalid RGB specification"
 msgstr "niepoprawne określenie RGB"
 
-# grDevices/src/colors.c: 1382
-# error(_("invalid color name '%s'"), nm)
-#: colors.c:1382
+#: colors.c:1393
 #, c-format
 msgid "invalid color name '%s'"
 msgstr "niepoprawna nazwa koloru '%s'"
 
-# grDevices/src/colors.c: 1432
-# error(_("invalid color specification \"%s\""), s)
-# grDevices/src/colors.c: 1441
-# error(_("invalid color specification \"%s\""), s)
-#: colors.c:1432 colors.c:1441
+#: colors.c:1443 colors.c:1452
 #, c-format
 msgid "invalid color specification \"%s\""
 msgstr "niepoprawne określenie koloru \"%s\""
 
-# grDevices/src/colors.c: 1469
-# warning(_("supplied color is neither numeric nor character"))
-#: colors.c:1469
+#: colors.c:1480
 msgid "supplied color is neither numeric nor character"
 msgstr "dostarczony kolor nie jest ani liczbą ani tekstem"
 
-# grDevices/src/colors.c: 1473
-# error(_("numerical color values must be >= 0, found %d"), indx)
-#: colors.c:1473
+#: colors.c:1484
 #, c-format
 msgid "numerical color values must be >= 0, found %d"
 msgstr "liczbowe wartości koloru muszą być >=0, znaleziono %d"
 
-# grDevices/src/colors.c: 1484
-# error(_("invalid argument type"))
-#: colors.c:1484
+#: colors.c:1495
 msgid "invalid argument type"
 msgstr "niepoprawny argument 'type'"
 
-# grDevices/src/colors.c: 1495
-# error(_("unknown palette (need >= 2 colors)"))
-#: colors.c:1495
+#: colors.c:1506
 msgid "unknown palette (need >= 2 colors)"
 msgstr "nieznana paleta (potrzeba >= 2 kolory)"
 
-# grDevices/src/colors.c: 1499
-# error(_("maximum number of colors is %d"), MAX_PALETTE_SIZE)
-# grDevices/src/colors.c: 1521
-# error(_("maximum number of colors is %d"), MAX_PALETTE_SIZE)
-#: colors.c:1499 colors.c:1521
+#: colors.c:1510 colors.c:1532
 #, c-format
 msgid "maximum number of colors is %d"
 msgstr "maksymalna liczba kolorów wynosi %d"
 
-# grDevices/src/devPS.c: 560
-# warning(_("afm file '%s' could not be opened"), 
-# 		    R_ExpandFileName(buf))
 #: devPS.c:560
 #, c-format
 msgid "afm file '%s' could not be opened"
 msgstr "plik afm '%s' nie mógł zostać otwarty"
 
-# grDevices/src/devPS.c: 628
-# warning(_("unknown AFM entity encountered"))
 #: devPS.c:628
 msgid "unknown AFM entity encountered"
 msgstr "napotkano nieznany obiekt AFM"
 
-# grDevices/src/devPicTeX.c: 484
-# warning(_("invalid string in '%s'"), "PicTeX_StrWidth")
-# grDevices/src/devPicTeX.c: 486
-# warning(_("invalid string in '%s'"), "PicTeX_StrWidth")
-# grDevices/src/devPS.c: 740
-# warning(_("invalid string in '%s'"), "PostScriptStringWidth")
-# grDevices/src/devPS.c: 743
-# warning(_("invalid string in '%s'"), "PostScriptStringWidth")
-# grDevices/src/devPS.c: 4418
-# warning(_("invalid string in '%s'"), "PS_Text")
-# grDevices/src/devPS.c: 7905
-# warning(_("invalid string in '%s'"), "PDF_Text")
-#: devPS.c:740 devPS.c:743 devPS.c:4420 devPS.c:7911 devPicTeX.c:484
+#: devPS.c:740 devPS.c:743 devPS.c:4427 devPS.c:7918 devPicTeX.c:484
 #: devPicTeX.c:486
 #, c-format
 msgid "invalid string in '%s'"
 msgstr "niepoprawny łańcuch w '%s'"
 
-# grDevices/src/devPS.c: 774
-# warning(_("font width unknown for character 0x%x"), *p)
 #: devPS.c:774
 #, c-format
 msgid "font width unknown for character 0x%x"
 msgstr "nieznana szerokość czcionki dla znaku '0x%x'"
 
-# grDevices/src/devPS.c: 832
-# error(_("unknown encoding '%s' in 'PostScriptMetricInfo'"),
-# 		  encoding)
 #: devPS.c:832
 #, c-format
 msgid "unknown encoding '%s' in 'PostScriptMetricInfo'"
 msgstr "nieznane kodowanie '%s' w 'PostScriptMetricInfo'"
 
-# grDevices/src/devPS.c: 848
-# warning(_("font metrics unknown for Unicode character U+%04x"), c)
-# grDevices/src/devPS.c: 859
-# warning(_("font metrics unknown for Unicode character U+%04x"), c)
 #: devPS.c:848 devPS.c:859
 #, c-format
 msgid "font metrics unknown for Unicode character U+%04x"
 msgstr "nieznane metryki czcionki dla znaku Unicode 'U+%04x'"
 
-# grDevices/src/devPS.c: 867
-# warning(_("font metrics unknown for character 0x%x"), c)
 #: devPS.c:867
 #, c-format
 msgid "font metrics unknown for character 0x%x"
 msgstr "nieznane metryki czcionki dla znaku '0x%x'"
 
-# grDevices/src/devPS.c: 881
-# error(_("invalid character (%04x) sent to 'PostScriptCIDMetricInfo' in a single-byte locale"),
-# 		  c)
 #: devPS.c:881
 #, c-format
 msgid ""
@@ -245,8 +174,6 @@ msgstr ""
 "niepoprawny znak (%04x) wysłany do 'PostScriptCIDMetricInfo' w jednobajtowej "
 "lokalizacji"
 
-# grDevices/src/devPS.c: 889
-# error(_("invalid character sent to 'PostScriptCIDMetricInfo' in a single-byte locale"))
 #: devPS.c:889
 msgid ""
 "invalid character sent to 'PostScriptCIDMetricInfo' in a single-byte locale"
@@ -254,286 +181,152 @@ msgstr ""
 "niepoprawny znak wysłany do 'PostScriptCIDMetricInfo' w jednobajtowej "
 "lokalizacji"
 
-# grDevices/src/devPS.c: 994
-# warning(_("failed to allocate CID font info"))
 #: devPS.c:994
 msgid "failed to allocate CID font info"
 msgstr "nie udało się przydzielić informacji o czcionce CID"
 
-# grDevices/src/devPS.c: 1009
-# warning(_("failed to allocate Type 1 font info"))
 #: devPS.c:1009
 msgid "failed to allocate Type 1 font info"
 msgstr "nie udało się przydzielić informacji o czcionce  Type 1"
 
-# grDevices/src/devPS.c: 1029
-# warning(_("failed to allocate encoding info"))
 #: devPS.c:1029
 msgid "failed to allocate encoding info"
 msgstr "nie udało się przydzielić informacji o kodowaniu"
 
-# grDevices/src/devPS.c: 1047
-# warning(_("failed to allocate CID font family"))
 #: devPS.c:1047
 msgid "failed to allocate CID font family"
 msgstr "nie udało się przydzielić rodziny czcionek CID"
 
-# grDevices/src/devPS.c: 1060
-# warning(_("failed to allocate Type 1 font family"))
 #: devPS.c:1060
 msgid "failed to allocate Type 1 font family"
 msgstr "nie udało się przydzielić rodziny czcionek Type 1"
 
-# grDevices/src/devPS.c: 1099
-# warning(_("failed to allocate font list"))
-# grDevices/src/devPS.c: 1110
-# warning(_("failed to allocate font list"))
 #: devPS.c:1099 devPS.c:1110
 msgid "failed to allocate font list"
 msgstr "nie udało się przydzielić listy czcionek"
 
-# grDevices/src/devPS.c: 1161
-# warning(_("failed to allocated encoding list"))
 #: devPS.c:1161
 msgid "failed to allocated encoding list"
 msgstr "nie udało się przydzielić listy kodowań"
 
-# grDevices/src/devPS.c: 1309
-# warning(_("truncated string which was too long for copy"))
 #: devPS.c:1309
 msgid "truncated string which was too long for copy"
 msgstr "przycięty łańcuch, który był zbyt długi do skopiowania"
 
-# grDevices/src/devPS.c: 1349
-# warning(_("failed to load encoding file '%s'"), encpath)
 #: devPS.c:1349
 #, c-format
 msgid "failed to load encoding file '%s'"
 msgstr "nie udało się załadować pliku strony kodowej '%s'"
 
-# grDevices/src/devPS.c: 1442
-# error(_("invalid font name or more than one font name"))
-# grDevices/src/devPS.c: 1475
-# error(_("invalid font name or more than one font name"))
 #: devPS.c:1442 devPS.c:1475
 msgid "invalid font name or more than one font name"
 msgstr "niepoprawna nazwa czcionki lub więcej niż jedna nazwa czcionki"
 
-# grDevices/src/devPS.c: 1595
-# warning(_("font family '%s' not found in PostScript font database"),
-# 		family)
-# grDevices/src/devPS.c: 1630
-# warning(_("font family '%s' not found in PostScript font database"),
-# 		family)
-#: devPS.c:1595 devPS.c:1630
+#: devPS.c:1596 devPS.c:1631
 #, c-format
 msgid "font family '%s' not found in PostScript font database"
 msgstr ""
 "rodzina czcionki '%s' nie została znaleziona w bazie danych czcionek "
 "PostScript"
 
-# grDevices/src/devPS.c: 1702
-# warning(_("font encoding for family '%s' not found in font database"),
-# 		family)
-# grDevices/src/devPS.c: 1784
-# warning(_("font encoding for family '%s' not found in font database"),
-# 		family)
-# grDevices/src/devPS.c: 1811
-# warning(_("font encoding for family '%s' not found in font database"),
-# 		family)
-#: devPS.c:1702 devPS.c:1784 devPS.c:1811
+#: devPS.c:1703 devPS.c:1785 devPS.c:1812
 #, c-format
 msgid "font encoding for family '%s' not found in font database"
 msgstr ""
 "kodowanie czcionki dla rodziny '%s' nie zostało znalezione w bazie danych "
 "czcionki"
 
-# grDevices/src/devPS.c: 1729
-# warning(_("font CMap for family '%s' not found in font database"),
-# 		family)
-# grDevices/src/devPS.c: 1756
-# warning(_("font CMap for family '%s' not found in font database"),
-# 		family)
-#: devPS.c:1729 devPS.c:1756
+#: devPS.c:1730 devPS.c:1757
 #, c-format
 msgid "font CMap for family '%s' not found in font database"
 msgstr "czcionka CMap dla rodziny '%s' nie została znaleziona w bazie danych"
 
-# grDevices/src/devPS.c: 1950
-# warning(_("cannot load afm file '%s'"), afmpath)
-# grDevices/src/devPS.c: 2029
-# warning(_("cannot load afm file '%s'"), afmpath)
-# grDevices/src/devPS.c: 2097
-# warning(_("cannot load afm file '%s'"), afmpaths[i])
-#: devPS.c:1950 devPS.c:2029 devPS.c:2097
+#: devPS.c:1952 devPS.c:2032 devPS.c:2100
 #, c-format
 msgid "cannot load afm file '%s'"
 msgstr "nie można załadować pliku afm '%s'"
 
-# grDevices/src/devPS.c: 2385
-# warning(_("corrupt loaded encodings;  encoding not recorded"))
-#: devPS.c:2385
+#: devPS.c:2388
 msgid "corrupt loaded encodings;  encoding not recorded"
 msgstr ""
 "załadowane kodowania są uszkodzone; kodowanie nie zostało zarejestrowane"
 
-# grDevices/src/devPS.c: 2396
-# warning(_("failed to record device encoding"))
-#: devPS.c:2396
+#: devPS.c:2399
 msgid "failed to record device encoding"
 msgstr "nie udało się zapisać kodowania urządzenia"
 
-# grDevices/src/devPS.c: 2565
-# error(_("object '.ps.prolog' is not a character vector"))
-#: devPS.c:2565
+#: devPS.c:2570
 msgid "object '.ps.prolog' is not a character vector"
 msgstr "obiekt '.ps.prolog' nie jest wektorem tekstowym"
 
-# grDevices/src/devWindows.c: 784
-# error(_("invalid line end"))
-# grDevices/src/devPS.c: 2638
-# error(_("invalid line end"))
-# grDevices/src/devPS.c: 6409
-# error(_("invalid line end"))
-#: devPS.c:2638 devPS.c:6415 devWindows.c:784
+#: devPS.c:2645 devPS.c:6422 devWindows.c:801
 msgid "invalid line end"
 msgstr "błędny koniec linii"
 
-# grDevices/src/devWindows.c: 797
-# error(_("invalid line join"))
-# grDevices/src/devPS.c: 2657
-# error(_("invalid line join"))
-# grDevices/src/devPS.c: 6428
-# error(_("invalid line join"))
-#: devPS.c:2657 devPS.c:6434 devWindows.c:797
+#: devPS.c:2664 devPS.c:6441 devWindows.c:814
 msgid "invalid line join"
 msgstr "błędny łącznik linii"
 
-# grDevices/src/devPS.c: 2665
-# error(_("invalid line mitre"))
-#: devPS.c:2665
+#: devPS.c:2672
 msgid "invalid line mitre"
 msgstr "niepoprawny ukośnik linii"
 
-# grDevices/src/devPS.c: 2874
-# warning(_("attempt to use invalid font %d replaced by font 1"), face)
-# grDevices/src/devPS.c: 3768
-# warning(_("attempt to use invalid font %d replaced by font 1"),
-# 		    face)
-# grDevices/src/devPS.c: 4216
-# warning(_("attempt to use invalid font %d replaced by font 1"), style)
-# grDevices/src/devPS.c: 4243
-# warning(_("attempt to use invalid font %d replaced by font 1"), style)
-# grDevices/src/devPS.c: 5251
-# warning(_("attempt to use invalid font %d replaced by font 1"), style)
-# grDevices/src/devPS.c: 7755
-# warning(_("attempt to use invalid font %d replaced by font 1"), face)
-# grDevices/src/devPS.c: 7800
-# warning(_("attempt to use invalid font %d replaced by font 1"), face)
-#: devPS.c:2874 devPS.c:3770 devPS.c:4218 devPS.c:4245 devPS.c:5255
-#: devPS.c:7761 devPS.c:7806
+#: devPS.c:2881 devPS.c:3777 devPS.c:4225 devPS.c:4252 devPS.c:5262
+#: devPS.c:7768 devPS.c:7813
 #, c-format
 msgid "attempt to use invalid font %d replaced by font 1"
 msgstr "próba użycia niepoprawnej czcionki %d zastąpionej przez czcionkę 1"
 
-# grDevices/src/devPS.c: 3096
-# error(_("filename too long in %s()"), "postscript")
-# grDevices/src/devPS.c: 4718
-# error(_("filename too long in %s()"), "xfig")
-# grDevices/src/devPS.c: 5830
-# error(_("filename too long in %s()"), "pdf")
-#: devPS.c:3096 devPS.c:4720 devPS.c:5834
+#: devPS.c:3103 devPS.c:4727 devPS.c:5841
 #, c-format
 msgid "filename too long in %s()"
 msgstr "nazwa pliku w '%s()' jest zbyt długa"
 
-# grDevices/src/devPS.c: 3102
-# error(_("memory allocation problem in %s()"), "postscript")
-# grDevices/src/devPS.c: 4724
-# error(_("memory allocation problem in %s()"), "xfig")
-# grDevices/src/devPS.c: 5836
-# error(_("memory allocation problem in %s()"), "pdf")
-#: devPS.c:3102 devPS.c:4726 devPS.c:5840
+#: devPS.c:3109 devPS.c:4733 devPS.c:5847
 #, c-format
 msgid "memory allocation problem in %s()"
 msgstr "problem przydziału pamięci w '%s()'"
 
-# grDevices/src/devPS.c: 3119
-# error(_("encoding path is too long in %s()"), "postscript")
-# grDevices/src/devPS.c: 5896
-# error(_("encoding path is too long in %s()"), "pdf")
-#: devPS.c:3119 devPS.c:5900
+#: devPS.c:3126 devPS.c:5907
 #, c-format
 msgid "encoding path is too long in %s()"
 msgstr "ścieżka kodowa w '%s()' jest zbyt długa"
 
-# grDevices/src/devPS.c: 3133
-# error(_("failed to load encoding file in %s()"), "postscript")
-# grDevices/src/devPS.c: 4764
-# error(_("failed to load encoding file in %s()"), "xfig")
-#: devPS.c:3133 devPS.c:4766
+#: devPS.c:3140 devPS.c:4773
 #, c-format
 msgid "failed to load encoding file in %s()"
 msgstr "nie udało się załadować pliku kodowego w %s()"
 
-# grDevices/src/devPS.c: 3178
-# error(_("invalid font type"))
-# grDevices/src/devPS.c: 3241
-# error(_("invalid font type"))
-# grDevices/src/devPS.c: 5955
-# error(_("invalid font type"))
-# grDevices/src/devPS.c: 6010
-# error(_("invalid font type"))
-# grDevices/src/devPS.c: 7635
-# error(_("invalid font type"))
-#: devPS.c:3178 devPS.c:3241 devPS.c:5959 devPS.c:6014 devPS.c:7641
+#: devPS.c:3185 devPS.c:3248 devPS.c:5966 devPS.c:6021 devPS.c:7648
 msgid "invalid font type"
 msgstr "niepoprawny typ czcionki"
 
-# grDevices/src/devPS.c: 3202
-# error(_("failed to initialise default PostScript font"))
-#: devPS.c:3202
+#: devPS.c:3209
 msgid "failed to initialise default PostScript font"
 msgstr "nie udało się zainicjalizować domyślnej czcionki PostScript"
 
-# grDevices/src/devPS.c: 3268
-# error(_("failed to initialise additional PostScript fonts"))
-#: devPS.c:3268
+#: devPS.c:3275
 msgid "failed to initialise additional PostScript fonts"
 msgstr "nie udało się zainicjalizować dodatkowych czcionek PostScript"
 
-# grDevices/src/devPS.c: 3284
-# error(_("invalid foreground/background color (postscript)"))
-#: devPS.c:3284
+#: devPS.c:3291
 msgid "invalid foreground/background color (postscript)"
 msgstr "niepoprawny kolor pierwszego planu/tła (postscript)"
 
-# grDevices/src/devPS.c: 3289
-# error(_("'command' is too long"))
-#: devPS.c:3289
+#: devPS.c:3296
 msgid "'command' is too long"
 msgstr "'command' jest zbyt długie"
 
-# grDevices/src/devPS.c: 3294
-# error(_("'postscript(print.it=TRUE)' used with an empty 'print' command"))
-#: devPS.c:3294
+#: devPS.c:3301
 msgid "'postscript(print.it=TRUE)' used with an empty 'print' command"
 msgstr "'postscript(print.it=TRUE)' użyte z pustą komendą 'print'"
 
-# grDevices/src/devPS.c: 3343
-# error(_("invalid page type '%s' (postscript)"), pd->papername)
-#: devPS.c:3343
+#: devPS.c:3350
 #, c-format
 msgid "invalid page type '%s' (postscript)"
 msgstr "niepoprawny typ '%s' strony (postscript)"
 
-# grDevices/src/devWindows.c: 2341
-# warning(_("semi-transparency is not supported on this device: reported only once per page"))
-# grDevices/src/devPS.c: 3455
-# warning(_("semi-transparency is not supported on this device: reported only once per page"))
-# grDevices/src/devPS.c: 4568
-# warning(_("semi-transparency is not supported on this device: reported only once per page"))
-#: devPS.c:3457 devPS.c:4570 devWindows.c:2341
+#: devPS.c:3464 devPS.c:4577 devWindows.c:2346
 msgid ""
 "semi-transparency is not supported on this device: reported only once per "
 "page"
@@ -541,38 +334,17 @@ msgstr ""
 "półprzezroczystość nie jest wspierana na tym urządzeniu: zaraportowane tylko "
 "raz na stronę"
 
-# grDevices/src/devPS.c: 3561
-# error(_("cannot open 'postscript' pipe to '%s'"), pd->command)
-# grDevices/src/devPS.c: 3570
-# error(_("cannot open 'postscript' pipe to '%s'"),
-# 		    pd->filename + 1)
-#: devPS.c:3563 devPS.c:3572
+#: devPS.c:3570 devPS.c:3579
 #, c-format
 msgid "cannot open 'postscript' pipe to '%s'"
 msgstr "nie można otworzyć kanału 'postscript' w '%s'"
 
-# grDevices/src/qdPDF.c: 98
-# warning(_("cannot open file '%s'"), par->file)
-# grDevices/src/devPS.c: 3581
-# error(_("cannot open file '%s'"), buf)
-# grDevices/src/devPS.c: 4971
-# error(_("cannot open file '%s'"), buf)
-# grDevices/src/devPS.c: 4982
-# error(_("cannot open file '%s'"), pd->tmpname)
-# grDevices/src/devPS.c: 7060
-# error(_("cannot open file '%s'"), buf)
-#: devPS.c:3583 devPS.c:4975 devPS.c:4986 devPS.c:7066 qdPDF.c:98
+#: devPS.c:3590 devPS.c:4982 devPS.c:4993 devPS.c:7073 qdPDF.c:98
 #, c-format
 msgid "cannot open file '%s'"
 msgstr "nie można otworzyć pliku '%s'"
 
-# grDevices/src/devPS.c: 3709
-# warning(_("error from postscript() in running:\n    %s"),
-# 			pd->command)
-# grDevices/src/devPS.c: 3724
-# warning(_("error from postscript() in running:\n    %s"),
-# 			buff)
-#: devPS.c:3711 devPS.c:3726
+#: devPS.c:3718 devPS.c:3733
 #, c-format
 msgid ""
 "error from postscript() in running:\n"
@@ -581,278 +353,169 @@ msgstr ""
 "błąd pochodzący z funkcji 'postscript()' w działającym:\n"
 "    %s"
 
-# grDevices/src/devPS.c: 3756
-# error(_("CID family '%s' not included in postscript() device"),
-# 	      family)
-#: devPS.c:3758
+#: devPS.c:3765
 #, c-format
 msgid "CID family '%s' not included in postscript() device"
 msgstr "rodzina CID '%s' nie jest uwzględniona w urządzeniu 'postScript()'"
 
-# grDevices/src/devPS.c: 3774
-# error(_("family '%s' not included in postscript() device"), family)
-# grDevices/src/devPS.c: 3785
-# error(_("family '%s' not included in postscript() device"), family)
-# grDevices/src/devPS.c: 4223
-# warning(_("family '%s' not included in postscript() device"), family)
-# grDevices/src/devPS.c: 4253
-# warning(_("family '%s' not included in postscript() device"), family)
-# grDevices/src/devPS.c: 4358
-# error(_("family '%s' not included in postscript() device"),
-# 		  gc->fontfamily)
-#: devPS.c:3776 devPS.c:3787 devPS.c:4225 devPS.c:4255 devPS.c:4360
+#: devPS.c:3783 devPS.c:3794 devPS.c:4232 devPS.c:4262 devPS.c:4367
 #, c-format
 msgid "family '%s' not included in postscript() device"
 msgstr "rodzina '%s' nie jest uwzględniona w urządzeniu 'postScript()'"
 
-# grDevices/src/devPS.c: 4298
-# error(_("unknown encoding '%s' in 'mbcsToSbcs'"), encoding)
-#: devPS.c:4300
+#: devPS.c:4307
 #, c-format
 msgid "unknown encoding '%s' in 'mbcsToSbcs'"
 msgstr "nieznana strona kodowa '%s' w 'mbcsToSbcs'"
 
-# grDevices/src/devPS.c: 4308
-# warning(_("conversion failure on '%s' in 'mbcsToSbcs': dot substituted for <%02x>"),
-# 		in, (unsigned char) *i_buf)
-#: devPS.c:4310
+#: devPS.c:4317
 #, c-format
 msgid "conversion failure on '%s' in 'mbcsToSbcs': dot substituted for <%02x>"
 msgstr "niepowodzenie konwersji '%s' w 'mbcsToSbcs': kropka zastąpiona <%02x>"
 
-# grDevices/src/devPS.c: 4386
-# warning(_("failed open converter to encoding '%s'"),
-# 			cidfont->encoding)
-#: devPS.c:4388
+#: devPS.c:4395
 #, c-format
 msgid "failed open converter to encoding '%s'"
 msgstr "nie udało się otworzyć konwertera dla kodowania '%s'"
 
-# grDevices/src/devPS.c: 4404
-# warning(_("failed in text conversion to encoding '%s'"),
-# 			cidfont->encoding)
-# grDevices/src/devPS.c: 5296
-# warning(_("failed in text conversion to encoding '%s'"),
-# 			    pd->encoding)
-# grDevices/src/devPS.c: 7890
-# warning(_("failed in text conversion to encoding '%s'"),
-# 			cidfont->encoding)
-#: devPS.c:4406 devPS.c:5300 devPS.c:7896
+#: devPS.c:4413 devPS.c:5307 devPS.c:7903
 #, c-format
 msgid "failed in text conversion to encoding '%s'"
 msgstr "konwersja tesktu dla kodowania '%s' nie powiodła się"
 
-# grDevices/src/devPS.c: 4582
-# error(_("ran out of colors in xfig()"))
-#: devPS.c:4584
+#: devPS.c:4591
 msgid "ran out of colors in xfig()"
 msgstr "zabrakło kolorów w 'xfig()'"
 
-# grDevices/src/devPS.c: 4611
-# warning(_("unimplemented line texture %08x: using Dash-double-dotted"),
-# 		lty)
-#: devPS.c:4613
+#: devPS.c:4620
 #, c-format
 msgid "unimplemented line texture %08x: using Dash-double-dotted"
 msgstr "niezaimplementowana tekstura linii %08x: używanie kreska-dwie-kropki"
 
-# grDevices/src/devPS.c: 4677
-# warning(_("unknown postscript font family '%s', using Helvetica"),
-# 		name)
-#: devPS.c:4679
+#: devPS.c:4686
 #, c-format
 msgid "unknown postscript font family '%s', using Helvetica"
 msgstr "nieznana rodzina czcionki postscript '%s', używanie Helvetica"
 
-# grDevices/src/devPS.c: 4749
-# error(_("invalid foreground/background color (xfig)"))
-#: devPS.c:4751
+#: devPS.c:4758
 msgid "invalid foreground/background color (xfig)"
 msgstr "niepoprawny kolor pierwszego planu/tła (xfig)"
 
-# grDevices/src/devPS.c: 4782
-# error(_("only Type 1 fonts supported for XFig"))
-#: devPS.c:4784
+#: devPS.c:4791
 msgid "only Type 1 fonts supported for XFig"
 msgstr "tylko czcionki 'Type 1' są wspierane w XFig"
 
-# grDevices/src/devPS.c: 4795
-# error(_("failed to initialise default XFig font"))
-#: devPS.c:4797
+#: devPS.c:4804
 msgid "failed to initialise default XFig font"
 msgstr "nie udało się zainicjalizować domyślnej czcionki XFig"
 
-# grDevices/src/devPS.c: 4832
-# error(_("invalid page type '%s' (xfig)"), pd->papername)
-#: devPS.c:4834
+#: devPS.c:4841
 #, c-format
 msgid "invalid page type '%s' (xfig)"
 msgstr "niepoprawny typ '%s' strony ('xfig')"
 
-# grDevices/src/devPS.c: 4840
-# warning(_("xfig(%s, onefile=FALSE) will only return the last plot"), pd->filename)
-#: devPS.c:4842
+#: devPS.c:4849
 #, c-format
 msgid "xfig(%s, onefile=FALSE) will only return the last plot"
 msgstr "'xfig(%s, onefile=FALSE)' zwróci tylko ostatni wykres"
 
-# grDevices/src/devPS.c: 4963
-# error(_("empty file name"))
-#: devPS.c:4967
+#: devPS.c:4974
 msgid "empty file name"
 msgstr "pusta nazwa pliku"
 
-# grDevices/src/devPS.c: 5028
-# error(_("write failed"))
-# grDevices/src/devPS.c: 5080
-# error(_("write failed"))
-# grDevices/src/devPS.c: 5658
-# error(_("write failed"))
-# grDevices/src/devPS.c: 5702
-# error(_("write failed"))
-# grDevices/src/devPS.c: 7120
-# error(_("write failed"))
-#: devPS.c:5032 devPS.c:5084 devPS.c:5662 devPS.c:5706 devPS.c:7126
+#: devPS.c:5039 devPS.c:5091 devPS.c:5669 devPS.c:5713 devPS.c:7133
 msgid "write failed"
 msgstr "zapis nie powiódł się"
 
-# grDevices/src/devPS.c: 5285
-# warning(_("unable to use encoding '%s'"), pd->encoding)
-#: devPS.c:5289
+#: devPS.c:5296
 #, c-format
 msgid "unable to use encoding '%s'"
 msgstr "nie można użyć strony kodowej '%s'"
 
-# grDevices/src/devPS.c: 5546
-# error(_("failed to increase 'maxRaster'"))
-# grDevices/src/devPS.c: 5549
-# error(_("failed to increase 'maxRaster'"))
-#: devPS.c:5550 devPS.c:5553
+#: devPS.c:5557 devPS.c:5560
 msgid "failed to increase 'maxRaster'"
 msgstr "nie udało się zwiększyć 'maxRaster'"
 
-# grDevices/src/devPS.c: 5561
-# error(_("unable to allocate raster image"))
-#: devPS.c:5565
+#: devPS.c:5572
 msgid "unable to allocate raster image"
 msgstr "nie można przydzielić obrazu rastrowego"
 
-# grDevices/src/devPS.c: 5762
-# warning(_("corrupt loaded encodings;  font not added"))
-#: devPS.c:5766
+#: devPS.c:5773
 msgid "corrupt loaded encodings;  font not added"
 msgstr "załadowane kodowania są uszkodzone; czcionka nie została dodana"
 
-# grDevices/src/devPS.c: 5771
-# warning(_("failed to record device encoding; font not added"))
-#: devPS.c:5775
+#: devPS.c:5782
 msgid "failed to record device encoding; font not added"
 msgstr ""
 "nie udało się zarejestrować kodowania urządzenia; czcionka nie została dodana"
 
-# grDevices/src/devPS.c: 5882
-# warning(_("increasing the PDF version to 1.2"))
-#: devPS.c:5886
+#: devPS.c:5893
 msgid "increasing the PDF version to 1.2"
 msgstr "zwiększanie wersji PDF do 1.2"
 
-# grDevices/src/devPS.c: 5912
-# error(_("failed to load default encoding"))
-#: devPS.c:5916
+#: devPS.c:5923
 msgid "failed to load default encoding"
 msgstr "nie udało się załadować domyślnej strony kodowej"
 
-# grDevices/src/devPS.c: 5978
-# error(_("failed to initialise default PDF font"))
-#: devPS.c:5982
+#: devPS.c:5989
 msgid "failed to initialise default PDF font"
 msgstr "nie udało się zainicjalizować domyślnej czcionki PDF"
 
-# grDevices/src/devPS.c: 6033
-# error(_("failed to initialise additional PDF fonts"))
-#: devPS.c:6037
+#: devPS.c:6044
 msgid "failed to initialise additional PDF fonts"
 msgstr "nie udało się zainicjalizować dodatkowych czcionek PDF"
 
-# grDevices/src/devPS.c: 6046
-# error(_("failed to allocate rasters"))
-#: devPS.c:6050
+#: devPS.c:6057
 msgid "failed to allocate rasters"
 msgstr "nie udało się przydzielić rastrów"
 
-# grDevices/src/devPS.c: 6053
-# error(_("failed to allocate masks"))
-#: devPS.c:6057
+#: devPS.c:6064
 msgid "failed to allocate masks"
 msgstr "nie udało się przydzielić masek"
 
-# grDevices/src/devPS.c: 6116
-# error(_("invalid paper type '%s' (pdf)"), pd->papername)
-#: devPS.c:6120
+#: devPS.c:6127
 #, c-format
 msgid "invalid paper type '%s' (pdf)"
 msgstr "niepoprawny typ '%s' papieru (pdf)"
 
-# grDevices/src/devPS.c: 6140
-# error(_("invalid foreground/background color (pdf)"))
-#: devPS.c:6144
+#: devPS.c:6151
 msgid "invalid foreground/background color (pdf)"
 msgstr "niepoprawny kolor pierwszego planu/tła (pdf)"
 
-# grDevices/src/devPS.c: 6257
-# error(_("invalid 'alpha' value in PDF"))
-#: devPS.c:6263
+#: devPS.c:6270
 msgid "invalid 'alpha' value in PDF"
 msgstr "niepoprawna wartość 'alpha' w PDF"
 
-# grDevices/src/devPS.c: 6282
-# warning(_("increasing the PDF version to 1.4"))
-#: devPS.c:6288
+#: devPS.c:6295
 msgid "increasing the PDF version to 1.4"
 msgstr "zwiększanie wersji PDF do 1.4"
 
-# grDevices/src/devPS.c: 6333
-# warning(_("unknown 'colormodel', using 'srgb'"))
-# grDevices/src/devPS.c: 6380
-# warning(_("unknown 'colormodel', using 'srgb'"))
-#: devPS.c:6339 devPS.c:6386
+#: devPS.c:6346 devPS.c:6393
 msgid "unknown 'colormodel', using 'srgb'"
 msgstr "nieznany 'colormodel', używanie 'srgb'"
 
-# grDevices/src/devPS.c: 6574
-# error(_("failed to load sRGB colorspace file"))
-#: devPS.c:6580
+#: devPS.c:6587
 msgid "failed to load sRGB colorspace file"
 msgstr "nie udało się załadować pliku przestrzeni kolorów sRGB"
 
-# grDevices/src/devPS.c: 6838
-# error(_("corrupt encodings in PDF device"))
-#: devPS.c:6844
+#: devPS.c:6851
 msgid "corrupt encodings in PDF device"
 msgstr "uszkodzone kodowania w urządzeniu PDF"
 
-# grDevices/src/devPS.c: 6919
-# warning(_("increasing the PDF version to 1.3"))
-#: devPS.c:6925
+#: devPS.c:6932
 msgid "increasing the PDF version to 1.3"
 msgstr "zwiększanie wersji PDF do 1.3"
 
-# grDevices/src/devPS.c: 7044
-# error(_("cannot open 'pdf' pipe to '%s'"), pd->cmd)
-#: devPS.c:7050
+#: devPS.c:7057
 #, c-format
 msgid "cannot open 'pdf' pipe to '%s'"
 msgstr "nie można otworzyć kanału 'pdf' w '%s'"
 
-# grDevices/src/devPS.c: 7050
-# warning(_("file = \"|cmd\" implies 'onefile = TRUE'"))
-#: devPS.c:7056
+#: devPS.c:7063
 msgid "file = \"|cmd\" implies 'onefile = TRUE'"
 msgstr "file = \"|cmd\" sugeruje, że 'onefile = TRUE'"
 
-# grDevices/src/devPS.c: 7193
-# error(_("cannot open 'pdf' file argument '%s'\n  please shut down the PDF device"), buf)
-#: devPS.c:7199
+#: devPS.c:7206
 #, c-format
 msgid ""
 "cannot open 'pdf' file argument '%s'\n"
@@ -861,431 +524,225 @@ msgstr ""
 "nie można otworzyć argumentu pliku 'pdf' '%s'\n"
 "  proszę wyłączyć urządzenie PDF"
 
-# grDevices/src/devPS.c: 7660
-# error(_("failed to find or load PDF font"))
-# grDevices/src/devPS.c: 8022
-# error(_("failed to find or load PDF font"))
-# grDevices/src/devPS.c: 8069
-# error(_("failed to find or load PDF font"))
-#: devPS.c:7666 devPS.c:8028 devPS.c:8075
+#: devPS.c:7673 devPS.c:8035 devPS.c:8082
 msgid "failed to find or load PDF font"
 msgstr "nie udało się znaleźć lub załadować czcionkę PDF"
 
-# grDevices/src/devPS.c: 7844
-# error(_("failed to find or load PDF CID font"))
-# grDevices/src/devPS.c: 7977
-# error(_("failed to find or load PDF CID font"))
-#: devPS.c:7850 devPS.c:7983
+#: devPS.c:7857 devPS.c:7990
 msgid "failed to find or load PDF CID font"
 msgstr "nie udało się znaleźć lub załadować czcionkę CID PDF"
 
-# grDevices/src/devPS.c: 8208
-# error(_("invalid 'family' parameter in %s"), call)
-# grDevices/src/devPS.c: 8212
-# error(_("invalid 'family' parameter in %s"), call)
-# grDevices/src/devPS.c: 8372
-# error(_("invalid 'family' parameter in %s"), call)
-# grDevices/src/devPS.c: 8376
-# error(_("invalid 'family' parameter in %s"), call)
-#: devPS.c:8214 devPS.c:8218 devPS.c:8378 devPS.c:8382
+#: devPS.c:8221 devPS.c:8225 devPS.c:8386 devPS.c:8390
 #, c-format
 msgid "invalid 'family' parameter in %s"
 msgstr "niepoprawny parametr 'family' w %s"
 
-# grDevices/src/devPS.c: 8230
-# error(_("invalid 'fonts' parameter in %s"), call)
-# grDevices/src/devPS.c: 8388
-# error(_("invalid 'fonts' parameter in %s"), call)
-#: devPS.c:8236 devPS.c:8394
+#: devPS.c:8243 devPS.c:8402
 #, c-format
 msgid "invalid 'fonts' parameter in %s"
 msgstr "niepoprawny parametr 'fonts' w %s"
 
-# grDevices/src/devWindows.c: 3646
-# error(_("invalid value of '%s'"), "record")
-# grDevices/src/devWindows.c: 3650
-# error(_("invalid value of '%s'"), "rescale")
-# grDevices/src/devWindows.c: 3658
-# error(_("invalid value of '%s'"), "canvas")
-# grDevices/src/devWindows.c: 3669
-# error(_("invalid value of '%s'"), "buffered")
-# grDevices/src/devWindows.c: 3675
-# error(_("invalid value of '%s'"), "bg")
-# grDevices/src/devWindows.c: 3682
-# error(_("invalid value of '%s'"), "title")
-# grDevices/src/devWindows.c: 3689
-# error(_("invalid value of '%s'"), "fillOddEven")
-# grDevices/src/devWindows.c: 3693
-# error(_("invalid value of '%s'"), "family")
-# grDevices/src/devPS.c: 8236
-# error(_("invalid value of '%s'"), "fillOddEven")
-# grDevices/src/devPS.c: 8398
-# error(_("invalid value of '%s'"), "fillOddEven")
-# grDevices/src/devPS.c: 8401
-# error(_("invalid value of '%s'"), "useCompression")
-#: devPS.c:8242 devPS.c:8404 devPS.c:8407 devWindows.c:3648 devWindows.c:3652
-#: devWindows.c:3660 devWindows.c:3671 devWindows.c:3677 devWindows.c:3684
-#: devWindows.c:3691 devWindows.c:3695
+#: devPS.c:8249 devPS.c:8412 devPS.c:8415 devWindows.c:3646 devWindows.c:3650
+#: devWindows.c:3658 devWindows.c:3669 devWindows.c:3675 devWindows.c:3682
+#: devWindows.c:3689 devWindows.c:3693
 #, c-format
 msgid "invalid value of '%s'"
 msgstr "niepoprawna wartość '%s'"
 
-# grDevices/src/devWindows.c: 3730
-# error(_("unable to start %s() device"), type)
-# grDevices/src/devPicTeX.c: 738
-# error(_("unable to start %s() device"), "pictex")
-# grDevices/src/devPS.c: 8249
-# error(_("unable to start %s() device"), "postscript")
-# grDevices/src/devPS.c: 8316
-# error(_("unable to start %s() device"), "xfig")
-# grDevices/src/devPS.c: 8415
-# error(_("unable to start %s() device"), "pdf")
-#: devPS.c:8255 devPS.c:8322 devPS.c:8421 devPicTeX.c:740 devWindows.c:3732
+#: devPS.c:8262 devPS.c:8329 devPS.c:8429 devPicTeX.c:740 devWindows.c:3734
 #, c-format
 msgid "unable to start %s() device"
 msgstr "nie można uruchomić urządzenia '%s()'"
 
-# grDevices/src/devQuartz.c: 651
-# warning(_("font \"%s\" could not be found for family \"%s\""), fontName, fontFamily)
 #: devQuartz.c:651
 #, c-format
 msgid "font \"%s\" could not be found for family \"%s\""
 msgstr "czcionka '%s' nie została znaleziona dla rodziny '%s'"
 
-# grDevices/src/devQuartz.c: 669
-# error(_("font family name is too long"))
 #: devQuartz.c:669
 msgid "font family name is too long"
 msgstr "nazwa rodziny czcionki jest zbyt długa"
 
-# grDevices/src/devQuartz.c: 709
-# warning(_("no font could be found for family \"%s\""), fontFamily)
 #: devQuartz.c:709
 #, c-format
 msgid "no font could be found for family \"%s\""
 msgstr "nie można było znaleźć żadnej czcionki dla rodziny '%s'"
 
-# grDevices/src/devQuartz.c: 1374
-# error(_("invalid 'file' argument"))
 #: devQuartz.c:1374
 msgid "invalid 'file' argument"
 msgstr "błędny argument 'file'"
 
-# grDevices/src/devQuartz.c: 1401
-# error(_("invalid quartz() device size"))
 #: devQuartz.c:1401
 msgid "invalid quartz() device size"
 msgstr "niepoprawny rozmiar urządzenia 'quartz()'"
 
-# grDevices/src/devQuartz.c: 1429
-# error(_("unable to create device description"))
 #: devQuartz.c:1429
 msgid "unable to create device description"
 msgstr "nie można utworzyć opisu urządzenia."
 
-# grDevices/src/devQuartz.c: 1479
-# error(_("unable to create quartz() device target, given type may not be supported"))
 #: devQuartz.c:1479
 msgid ""
 "unable to create quartz() device target, given type may not be supported"
 msgstr ""
 "nie można utworzyć urządzenia 'quartz()', podany typ może nie być wspierany"
 
-# grDevices/src/devQuartz.c: 1606
-# warning(_("Quartz device is not available on this platform"))
-#: devQuartz.c:1606
+#: devQuartz.c:1609
 msgid "Quartz device is not available on this platform"
 msgstr "urządzenie Quartz nie jest dostępne na tej platformie"
 
-# grDevices/src/devWindows.c: 341
-# (_("Not enough memory to copy graphics window"))
-# grDevices/src/devWindows.c: 387
-# (_("Not enough memory to copy graphics window"))
-# grDevices/src/devWindows.c: 458
-# (_("Not enough memory to copy graphics window"))
-#: devWindows.c:341 devWindows.c:387 devWindows.c:458
+#: devWindows.c:358 devWindows.c:404 devWindows.c:475
 msgid "Not enough memory to copy graphics window"
 msgstr "Zbyt mało pamięci aby skopiować okno grafiki"
 
-# grDevices/src/devWindows.c: 346
-# (_("No device available to copy graphics window"))
-# grDevices/src/devWindows.c: 392
-# (_("No device available to copy graphics window"))
-# grDevices/src/devWindows.c: 463
-# (_("No device available to copy graphics window"))
-#: devWindows.c:346 devWindows.c:392 devWindows.c:463
+#: devWindows.c:363 devWindows.c:409 devWindows.c:480
 msgid "No device available to copy graphics window"
 msgstr "Brak dostępnego urządzenia aby skopiować okno grafiki"
 
-# grDevices/src/devWindows.c: 396
-# error(_("'%%' is not allowed in file name"))
-# grDevices/src/devWindows.c: 467
-# error(_("'%%' is not allowed in file name"))
-#: devWindows.c:396 devWindows.c:467
+#: devWindows.c:413 devWindows.c:484
 #, c-format
 msgid "'%%' is not allowed in file name"
 msgstr "'%%' nie jest dozwolone w nazwie pliku"
 
-# grDevices/src/devWindows.c: 604
-# error(_("invalid font specification"))
-#: devWindows.c:604
+#: devWindows.c:621
 msgid "invalid font specification"
 msgstr "niepoprawne określenie czcionki"
 
-# grDevices/src/devWindows.c: 643
-# warning(_("font family not found in Windows font database"))
-#: devWindows.c:643
+#: devWindows.c:660
 msgid "font family not found in Windows font database"
 msgstr ""
 "rodzina czcionek nie została znaleziona w bazie czcionek systemu Windows"
 
-# grDevices/src/devWindows.c: 1074
-# (_("plot history seems corrupted"))
-#: devWindows.c:1074
+#: devWindows.c:1091
 msgid "plot history seems corrupted"
 msgstr "historia wykresu wygląda na uszkodzoną"
 
-# grDevices/src/devWindows.c: 1081
-# (_("no plot history!"))
-#: devWindows.c:1081
+#: devWindows.c:1098
 msgid "no plot history!"
 msgstr "brak historii wykresu!"
 
-# grDevices/src/devWindows.c: 1798
-# error(_("filename too long in %s() call"),
-# 				       (dsp[0]=='p') ? "png" : "bmp")
-#: devWindows.c:1798
+#: devWindows.c:1815
 #, c-format
 msgid "filename too long in %s() call"
 msgstr "nazwa pliku jest zbyt długa w wywołaniu '%s()'"
 
-# grDevices/src/devWindows.c: 1807
-# warning(_("'width=%d, height=%d' are unlikely values in pixels"),
-# 		    (int)w, (int) h)
-# grDevices/src/devWindows.c: 1846
-# warning(_("'width=%d, height=%d' are unlikely values in pixels"),
-# 		    (int)w, (int) h)
-# grDevices/src/devWindows.c: 1880
-# warning(_("'width=%d, height=%d' are unlikely values in pixels"),
-# 		    (int) w, (int) h)
-#: devWindows.c:1807 devWindows.c:1846 devWindows.c:1880
+#: devWindows.c:1820 devWindows.c:1855 devWindows.c:1885
 #, c-format
 msgid "'width=%d, height=%d' are unlikely values in pixels"
 msgstr "'width=%d, height=%d' są mało prawdopodobnymi wartościami w pikselach"
 
-# grDevices/src/devWindows.c: 1815
-# warning(_("unable to allocate bitmap"))
-# grDevices/src/devWindows.c: 1820
-# warning(_("unable to allocate bitmap"))
-# grDevices/src/devWindows.c: 1849
-# warning(_("unable to allocate bitmap"))
-# grDevices/src/devWindows.c: 1854
-# warning(_("unable to allocate bitmap"))
-# grDevices/src/devWindows.c: 1883
-# warning(_("unable to allocate bitmap"))
-# grDevices/src/devWindows.c: 1888
-# warning(_("unable to allocate bitmap"))
-#: devWindows.c:1815 devWindows.c:1820 devWindows.c:1849 devWindows.c:1854
-#: devWindows.c:1883 devWindows.c:1888
+#: devWindows.c:1828 devWindows.c:1833 devWindows.c:1858 devWindows.c:1863
+#: devWindows.c:1888 devWindows.c:1893
 msgid "unable to allocate bitmap"
 msgstr "nie można przydzielić bitmapy"
 
-# grDevices/src/devWindows.c: 1826
-# warning(_("unable to open file '%s' for writing"), buf)
-# grDevices/src/devWindows.c: 1860
-# warning(_("unable to open file '%s' for writing"), buf)
-# grDevices/src/devWindows.c: 2184
-# error(_("unable to open file '%s' for writing"), buf)
-#: devWindows.c:1826 devWindows.c:1860 devWindows.c:2184
+#: devWindows.c:1839 devWindows.c:1869 devWindows.c:2189
 #, c-format
 msgid "unable to open file '%s' for writing"
 msgstr "nie można otworzyć pliku '%s' do zapisu"
 
-# grDevices/src/devWindows.c: 1843
-# error(_("filename too long in jpeg() call"))
-#: devWindows.c:1843
+#: devWindows.c:1852
 msgid "filename too long in jpeg() call"
 msgstr "nazwa pliku w wywołaniu 'jpeg()' jest zbyt długa"
 
-# grDevices/src/devWindows.c: 1877
-# error(_("filename too long in tiff() call"))
-#: devWindows.c:1877
+#: devWindows.c:1882
 msgid "filename too long in tiff() call"
 msgstr "nazwa pliku w wywołaniu 'tiff()' jest zbyt długa"
 
-# grDevices/src/devWindows.c: 1909
-# error(_("filename too long in win.metafile() call"))
-#: devWindows.c:1909
+#: devWindows.c:1914
 msgid "filename too long in win.metafile() call"
 msgstr "nazwa pliku w wywołaniu 'win.metafile()' jest zbyt długa"
 
-# grDevices/src/devWindows.c: 1919
-# warning(_("unable to open metafile '%s' for writing"), buf)
-#: devWindows.c:1919
+#: devWindows.c:1924
 #, c-format
 msgid "unable to open metafile '%s' for writing"
 msgstr "nie można otworzyć metapliku '%s' do zapisu"
 
-# grDevices/src/devWindows.c: 1921
-# warning(_("unable to open clipboard to write metafile"))
-#: devWindows.c:1921
+#: devWindows.c:1926
 msgid "unable to open clipboard to write metafile"
 msgstr "nie można otworzyć schowka aby zapisać metaplik"
 
-# grDevices/src/devWindows.c: 2132
-# (_("Insufficient memory for resize. Killing device"))
-#: devWindows.c:2132
+#: devWindows.c:2137
 msgid "Insufficient memory for resize. Killing device"
 msgstr ""
 "Niewystarczająca ilość pamięci do zmiany rozmiaru. Zabijanie urządzenia"
 
-# grDevices/src/devWindows.c: 2140
-# (_("Insufficient memory for resize. Disabling alpha blending"))
-#: devWindows.c:2140
+#: devWindows.c:2145
 msgid "Insufficient memory for resize. Disabling alpha blending"
 msgstr ""
 "Niewystarczająca ilość pamięci do zmiany rozmiaru. Wyłączenie mieszania alfa"
 
-# grDevices/src/devWindows.c: 2169
-# error(_("a clipboard metafile can store only one figure."))
-#: devWindows.c:2169
+#: devWindows.c:2174
 msgid "a clipboard metafile can store only one figure."
 msgstr "metaplik schowka może przechowywać tylko jeden obrazek."
 
-# grDevices/src/devWindows.c: 2175
-# error(_("metafile '%s' could not be created"), buf)
-#: devWindows.c:2175
+#: devWindows.c:2180
 #, c-format
 msgid "metafile '%s' could not be created"
 msgstr "metaplik '%s' nie mógł zostać utworzony"
 
-# grDevices/src/devWindows.c: 3112
-# (_("R Graphics"))
-# grDevices/src/devWindows.c: 3754
-# (_("R Graphics"))
-#: devWindows.c:3112 devWindows.c:3756
+#: devWindows.c:3117 devWindows.c:3758
 msgid "R Graphics"
 msgstr "R Grafika"
 
-# grDevices/src/devWindows.c: 3126
-# error(_("attempt to use the locator after dev.hold()"))
-#: devWindows.c:3126
+#: devWindows.c:3131
 msgid "attempt to use the locator after dev.hold()"
 msgstr "próba użycia 'locator' po 'dev.hold()'"
 
-# grDevices/src/devWindows.c: 3390
-# warning(_("option 'windowsTimeouts' should be integer"))
-#: devWindows.c:3392
+#: devWindows.c:3397
 msgid "option 'windowsTimeouts' should be integer"
 msgstr "opcja 'windowsTimeouts' powinna być liczba całkowitą"
 
-# grDevices/src/devWindows.c: 3411
-# error(_("invalid device number in 'savePlot'"))
-#: devWindows.c:3413
+#: devWindows.c:3418
 msgid "invalid device number in 'savePlot'"
 msgstr "niepoprawny numer urządzenia w 'savePlot'"
 
-# grDevices/src/devWindows.c: 3413
-# error(_("invalid device in 'savePlot'"))
-#: devWindows.c:3415
+#: devWindows.c:3420
 msgid "invalid device in 'savePlot'"
 msgstr "niepoprawne urządzenie w 'savePlot'"
 
-# grDevices/src/devWindows.c: 3416
-# error(_("invalid filename argument in 'savePlot'"))
-#: devWindows.c:3418
+#: devWindows.c:3423
 msgid "invalid filename argument in 'savePlot'"
 msgstr "niepoprawny argument nazwy pliku w 'savePlot'"
 
-# grDevices/src/devWindows.c: 3421
-# error(_("invalid type argument in 'savePlot'"))
-#: devWindows.c:3423
+#: devWindows.c:3428
 msgid "invalid type argument in 'savePlot'"
 msgstr "niepoprawny typ argumentu w 'savePlot'"
 
-# grDevices/src/devWindows.c: 3448
-# error(_("unknown type in savePlot"))
-#: devWindows.c:3450
+#: devWindows.c:3455
 msgid "unknown type in savePlot"
 msgstr "nieznany typ w 'savePlot'"
 
-# grDevices/src/devWindows.c: 3493
-# warning(_("processing of the plot ran out of memory"))
-# grDevices/src/devWindows.c: 3526
-# warning(_("processing of the plot ran out of memory"))
-# grDevices/src/devWindows.c: 3555
-# warning(_("processing of the plot ran out of memory"))
-# grDevices/src/devWindows.c: 3587
-# warning(_("processing of the plot ran out of memory"))
-# grDevices/src/devWindows.c: 3612
-# warning(_("processing of the plot ran out of memory"))
-#: devWindows.c:3495 devWindows.c:3528 devWindows.c:3557 devWindows.c:3589
-#: devWindows.c:3614
+#: devWindows.c:3500 devWindows.c:3532 devWindows.c:3560 devWindows.c:3591
+#: devWindows.c:3612
 msgid "processing of the plot ran out of memory"
 msgstr "zabrakło pamięci podczas przetwarzania wykresu"
 
-# grDevices/src/devWindows.c: 3572
-#  _("Impossible to open ")
-#: devWindows.c:3574
+#: devWindows.c:3576
 msgid "Impossible to open "
 msgstr "Nie można otworzyć "
 
-# grDevices/src/devWindows.c: 3599
-# (_("Impossible to load Rbitmap.dll"))
-#: devWindows.c:3601
-msgid "Impossible to load Rbitmap.dll"
-msgstr "Nie można załadować 'Rbitmap.dll'"
-
-# grDevices/src/devWindows.c: 3641
-# error(_("invalid 'width' or 'height'"))
-#: devWindows.c:3643
+#: devWindows.c:3641
 msgid "invalid 'width' or 'height'"
 msgstr "niepoprawna wartość 'width' lub 'height'"
 
-# grDevices/src/devices.c: 51
-# error(_("argument must have positive length"))
 #: devices.c:51
 msgid "argument must have positive length"
 msgstr "argument musi mieć dodatnią długość"
 
-# grDevices/src/devices.c: 60
-# error(_("invalid argument"))
 #: devices.c:60
 msgid "invalid argument"
 msgstr "niepoprawny argument"
 
-# grDevices/src/qdBitmap.c: 79
-# error(_("QuartzBitmap_Output - unable to open file '%s'"), buf)
 #: qdBitmap.c:79
 #, c-format
 msgid "QuartzBitmap_Output - unable to open file '%s'"
 msgstr "'QuartzBitmap_Output' - nie można otworzyć pliku '%s'"
 
-# grDevices/src/qdBitmap.c: 94
-# warning(_("not a supported scheme, no image data written"))
 #: qdBitmap.c:94
 msgid "not a supported scheme, no image data written"
 msgstr "to nie jest wspierany schemat, nie zapisano danych obrazka"
 
-# grDevices/src/stubs.c: 99
-# error(_("invalid '%s' argument"), "ask")
-# grDevices/src/cairo/cairoBM.c: 480
-# error(_("invalid '%s' argument"), "filename")
-# grDevices/src/cairo/cairoBM.c: 485
-# error(_("invalid '%s' argument"), "type")
-# grDevices/src/cairo/cairoBM.c: 489
-# error(_("invalid '%s' argument"), "width")
-# grDevices/src/cairo/cairoBM.c: 493
-# error(_("invalid '%s' argument"), "height")
-# grDevices/src/cairo/cairoBM.c: 497
-# error(_("invalid '%s' argument"), "pointsize")
-# grDevices/src/cairo/cairoBM.c: 508
-# error(_("invalid '%s' argument"), "antialias")
-# grDevices/src/cairo/cairoBM.c: 512
-# error(_("invalid '%s' argument"), "quality")
-# grDevices/src/cairo/cairoBM.c: 515
-# error(_("invalid '%s' argument"), "family")
-#: stubs.c:99
+#: stubs.c:104
 #, c-format
 msgid "invalid '%s' argument"
 msgstr "niepoprawny argument '%s'"
diff --git a/src/library/grDevices/po/pt_BR.po b/src/library/grDevices/po/pt_BR.po
index 8ea5aa1..ba5760d 100644
--- a/src/library/grDevices/po/pt_BR.po
+++ b/src/library/grDevices/po/pt_BR.po
@@ -5,109 +5,129 @@
 msgid ""
 msgstr ""
 "Project-Id-Version: 2.13.0\n"
-"Report-Msgid-Bugs-To: bugs.r-project.org\n"
-"POT-Creation-Date: 2014-03-27 07:46+0000\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2016-04-01 10:28-0700\n"
 "PO-Revision-Date: 2011-03-26 08:54-0300\n"
 "Last-Translator: Fernando Henrique <pessoal at fernandohrosa.com.br>\n"
 "Language-Team: http://www.feferraz.net/br/P/Projeto_Traducao_R_Portugues\n"
-"Language: \n"
+"Language: pt_BR\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
 "Plural-Forms: nplurals=2; plural=(n > 1);\n"
 "X-Generator: Pootle 2.0.5\n"
 
-#: axis_scales.c:37 axis_scales.c:38 axis_scales.c:53
+#: axis_scales.c:37 axis_scales.c:38 axis_scales.c:55
 #, c-format
 msgid "'%s' must be numeric of length %d"
 msgstr ""
 
 #: colors.c:69
 #, c-format
+msgid "color intensity %s, not in [0,1]"
+msgstr ""
+
+#: colors.c:71
+#, c-format
 msgid "color intensity %g, not in [0,1]"
 msgstr ""
 
-#: colors.c:76
+#: colors.c:78
+#, c-format
+msgid "color intensity %s, not in 0:255"
+msgstr ""
+
+#: colors.c:80
 #, c-format
 msgid "color intensity %d, not in 0:255"
 msgstr ""
 
-#: colors.c:83
+#: colors.c:87
+#, c-format
+msgid "alpha level %s, not in [0,1]"
+msgstr ""
+
+#: colors.c:89
 #, c-format
 msgid "alpha level %g, not in [0,1]"
 msgstr ""
 
-#: colors.c:90
+#: colors.c:96
+#, c-format
+msgid "alpha level %s, not in 0:255"
+msgstr ""
+
+#: colors.c:98
 #, c-format
 msgid "alpha level %d, not in 0:255"
 msgstr ""
 
-#: colors.c:118
+#: colors.c:126
 msgid "bad hsv to rgb color conversion"
 msgstr ""
 
-#: colors.c:207 colors.c:221
+#: colors.c:218 colors.c:232
 msgid "invalid hsv color"
 msgstr ""
 
-#: colors.c:333 colors.c:353
+#: colors.c:344 colors.c:364
 msgid "invalid hcl color"
 msgstr ""
 
-#: colors.c:385
+#: colors.c:396
 msgid "invalid value of 'maxColorValue'"
 msgstr ""
 
-#: colors.c:413
+#: colors.c:424
 msgid "invalid 'names' vector"
 msgstr ""
 
-#: colors.c:472 colors.c:481
+#: colors.c:483 colors.c:492
 msgid "invalid gray level, must be in [0,1]."
 msgstr ""
 
-#: colors.c:537
+#: colors.c:548
 #, fuzzy, c-format
 msgid "invalid '%s' value"
 msgstr "cadeia de caracteres inválida em '%s'"
 
-#: colors.c:1329
+#: colors.c:1340
 msgid "invalid hex digit in 'color' or 'lty'"
 msgstr ""
 
-#: colors.c:1339 colors.c:1349
+#: colors.c:1350 colors.c:1360
 msgid "invalid RGB specification"
 msgstr ""
 
-#: colors.c:1382
+#: colors.c:1393
 #, fuzzy, c-format
 msgid "invalid color name '%s'"
 msgstr "cadeia de caracteres inválida em '%s'"
 
-#: colors.c:1432 colors.c:1441
+#: colors.c:1443 colors.c:1452
 #, c-format
 msgid "invalid color specification \"%s\""
 msgstr ""
 
-#: colors.c:1469
+#: colors.c:1480
 msgid "supplied color is neither numeric nor character"
 msgstr ""
 
-#: colors.c:1473
+#: colors.c:1484
 #, c-format
 msgid "numerical color values must be >= 0, found %d"
 msgstr ""
 
-#: colors.c:1484
+#: colors.c:1495
 #, fuzzy
 msgid "invalid argument type"
 msgstr "cadeia de caracteres inválida em '%s'"
 
-#: colors.c:1495
+#: colors.c:1506
 msgid "unknown palette (need >= 2 colors)"
 msgstr ""
 
-#: colors.c:1499 colors.c:1521
+#: colors.c:1510 colors.c:1532
 #, c-format
 msgid "maximum number of colors is %d"
 msgstr ""
@@ -121,7 +141,7 @@ msgstr "arquivo afm '%s' não pode ser aberto"
 msgid "unknown AFM entity encountered"
 msgstr "entidade AFM desconhecida encontrada"
 
-#: devPS.c:740 devPS.c:743 devPS.c:4420 devPS.c:7911 devPicTeX.c:484
+#: devPS.c:740 devPS.c:743 devPS.c:4427 devPS.c:7918 devPicTeX.c:484
 #: devPicTeX.c:486
 #, c-format
 msgid "invalid string in '%s'"
@@ -206,338 +226,338 @@ msgstr "falha ao carregar arquivo de codificação '%s'"
 msgid "invalid font name or more than one font name"
 msgstr "nome de fonte inválido ou mais de um nome de fonte"
 
-#: devPS.c:1595 devPS.c:1630
+#: devPS.c:1596 devPS.c:1631
 #, c-format
 msgid "font family '%s' not found in PostScript font database"
 msgstr ""
 
-#: devPS.c:1702 devPS.c:1784 devPS.c:1811
+#: devPS.c:1703 devPS.c:1785 devPS.c:1812
 #, c-format
 msgid "font encoding for family '%s' not found in font database"
 msgstr ""
 
-#: devPS.c:1729 devPS.c:1756
+#: devPS.c:1730 devPS.c:1757
 #, c-format
 msgid "font CMap for family '%s' not found in font database"
 msgstr ""
 
-#: devPS.c:1950 devPS.c:2029 devPS.c:2097
+#: devPS.c:1952 devPS.c:2032 devPS.c:2100
 #, c-format
 msgid "cannot load afm file '%s'"
 msgstr ""
 
-#: devPS.c:2385
+#: devPS.c:2388
 #, fuzzy
 msgid "corrupt loaded encodings;  encoding not recorded"
 msgstr "falha ao alocar informação de codificação"
 
-#: devPS.c:2396
+#: devPS.c:2399
 #, fuzzy
 msgid "failed to record device encoding"
 msgstr "falha ao alocar informação de codificação"
 
-#: devPS.c:2565
+#: devPS.c:2570
 msgid "object '.ps.prolog' is not a character vector"
 msgstr ""
 
-#: devPS.c:2638 devPS.c:6415 devWindows.c:784
+#: devPS.c:2645 devPS.c:6422 devWindows.c:801
 #, fuzzy
 msgid "invalid line end"
 msgstr "cadeia de caracteres inválida em '%s'"
 
-#: devPS.c:2657 devPS.c:6434 devWindows.c:797
+#: devPS.c:2664 devPS.c:6441 devWindows.c:814
 #, fuzzy
 msgid "invalid line join"
 msgstr "cadeia de caracteres inválida em '%s'"
 
-#: devPS.c:2665
+#: devPS.c:2672
 #, fuzzy
 msgid "invalid line mitre"
 msgstr "cadeia de caracteres inválida em '%s'"
 
-#: devPS.c:2874 devPS.c:3770 devPS.c:4218 devPS.c:4245 devPS.c:5255
-#: devPS.c:7761 devPS.c:7806
+#: devPS.c:2881 devPS.c:3777 devPS.c:4225 devPS.c:4252 devPS.c:5262
+#: devPS.c:7768 devPS.c:7813
 #, c-format
 msgid "attempt to use invalid font %d replaced by font 1"
 msgstr ""
 
-#: devPS.c:3096 devPS.c:4720 devPS.c:5834
+#: devPS.c:3103 devPS.c:4727 devPS.c:5841
 #, c-format
 msgid "filename too long in %s()"
 msgstr ""
 
-#: devPS.c:3102 devPS.c:4726 devPS.c:5840
+#: devPS.c:3109 devPS.c:4733 devPS.c:5847
 #, c-format
 msgid "memory allocation problem in %s()"
 msgstr ""
 
-#: devPS.c:3119 devPS.c:5900
+#: devPS.c:3126 devPS.c:5907
 #, c-format
 msgid "encoding path is too long in %s()"
 msgstr ""
 
-#: devPS.c:3133 devPS.c:4766
+#: devPS.c:3140 devPS.c:4773
 #, fuzzy, c-format
 msgid "failed to load encoding file in %s()"
 msgstr "falha ao carregar arquivo de codificação '%s'"
 
-#: devPS.c:3178 devPS.c:3241 devPS.c:5959 devPS.c:6014 devPS.c:7641
+#: devPS.c:3185 devPS.c:3248 devPS.c:5966 devPS.c:6021 devPS.c:7648
 msgid "invalid font type"
 msgstr ""
 
-#: devPS.c:3202
+#: devPS.c:3209
 msgid "failed to initialise default PostScript font"
 msgstr ""
 
-#: devPS.c:3268
+#: devPS.c:3275
 msgid "failed to initialise additional PostScript fonts"
 msgstr ""
 
-#: devPS.c:3284
+#: devPS.c:3291
 msgid "invalid foreground/background color (postscript)"
 msgstr ""
 
-#: devPS.c:3289
+#: devPS.c:3296
 msgid "'command' is too long"
 msgstr ""
 
-#: devPS.c:3294
+#: devPS.c:3301
 msgid "'postscript(print.it=TRUE)' used with an empty 'print' command"
 msgstr ""
 
-#: devPS.c:3343
+#: devPS.c:3350
 #, c-format
 msgid "invalid page type '%s' (postscript)"
 msgstr ""
 
-#: devPS.c:3457 devPS.c:4570 devWindows.c:2341
+#: devPS.c:3464 devPS.c:4577 devWindows.c:2346
 msgid ""
 "semi-transparency is not supported on this device: reported only once per "
 "page"
 msgstr ""
 
-#: devPS.c:3563 devPS.c:3572
+#: devPS.c:3570 devPS.c:3579
 #, c-format
 msgid "cannot open 'postscript' pipe to '%s'"
 msgstr ""
 
-#: devPS.c:3583 devPS.c:4975 devPS.c:4986 devPS.c:7066 qdPDF.c:98
+#: devPS.c:3590 devPS.c:4982 devPS.c:4993 devPS.c:7073 qdPDF.c:98
 #, c-format
 msgid "cannot open file '%s'"
 msgstr ""
 
-#: devPS.c:3711 devPS.c:3726
+#: devPS.c:3718 devPS.c:3733
 #, c-format
 msgid ""
 "error from postscript() in running:\n"
 "    %s"
 msgstr ""
 
-#: devPS.c:3758
+#: devPS.c:3765
 #, c-format
 msgid "CID family '%s' not included in postscript() device"
 msgstr ""
 
-#: devPS.c:3776 devPS.c:3787 devPS.c:4225 devPS.c:4255 devPS.c:4360
+#: devPS.c:3783 devPS.c:3794 devPS.c:4232 devPS.c:4262 devPS.c:4367
 #, c-format
 msgid "family '%s' not included in postscript() device"
 msgstr ""
 
-#: devPS.c:4300
+#: devPS.c:4307
 #, c-format
 msgid "unknown encoding '%s' in 'mbcsToSbcs'"
 msgstr ""
 
-#: devPS.c:4310
+#: devPS.c:4317
 #, c-format
 msgid "conversion failure on '%s' in 'mbcsToSbcs': dot substituted for <%02x>"
 msgstr ""
 
-#: devPS.c:4388
+#: devPS.c:4395
 #, c-format
 msgid "failed open converter to encoding '%s'"
 msgstr ""
 
-#: devPS.c:4406 devPS.c:5300 devPS.c:7896
+#: devPS.c:4413 devPS.c:5307 devPS.c:7903
 #, c-format
 msgid "failed in text conversion to encoding '%s'"
 msgstr ""
 
-#: devPS.c:4584
+#: devPS.c:4591
 msgid "ran out of colors in xfig()"
 msgstr ""
 
-#: devPS.c:4613
+#: devPS.c:4620
 #, c-format
 msgid "unimplemented line texture %08x: using Dash-double-dotted"
 msgstr ""
 
-#: devPS.c:4679
+#: devPS.c:4686
 #, c-format
 msgid "unknown postscript font family '%s', using Helvetica"
 msgstr ""
 
-#: devPS.c:4751
+#: devPS.c:4758
 msgid "invalid foreground/background color (xfig)"
 msgstr ""
 
-#: devPS.c:4784
+#: devPS.c:4791
 msgid "only Type 1 fonts supported for XFig"
 msgstr ""
 
-#: devPS.c:4797
+#: devPS.c:4804
 msgid "failed to initialise default XFig font"
 msgstr ""
 
-#: devPS.c:4834
+#: devPS.c:4841
 #, c-format
 msgid "invalid page type '%s' (xfig)"
 msgstr ""
 
-#: devPS.c:4842
+#: devPS.c:4849
 #, c-format
 msgid "xfig(%s, onefile=FALSE) will only return the last plot"
 msgstr ""
 
-#: devPS.c:4967
+#: devPS.c:4974
 msgid "empty file name"
 msgstr ""
 
-#: devPS.c:5032 devPS.c:5084 devPS.c:5662 devPS.c:5706 devPS.c:7126
+#: devPS.c:5039 devPS.c:5091 devPS.c:5669 devPS.c:5713 devPS.c:7133
 msgid "write failed"
 msgstr ""
 
-#: devPS.c:5289
+#: devPS.c:5296
 #, c-format
 msgid "unable to use encoding '%s'"
 msgstr ""
 
-#: devPS.c:5550 devPS.c:5553
+#: devPS.c:5557 devPS.c:5560
 #, fuzzy
 msgid "failed to increase 'maxRaster'"
 msgstr "falha ao alocar lista de fonte"
 
-#: devPS.c:5565
+#: devPS.c:5572
 #, fuzzy
 msgid "unable to allocate raster image"
 msgstr "falha ao alocar lista de fonte"
 
-#: devPS.c:5766
+#: devPS.c:5773
 #, fuzzy
 msgid "corrupt loaded encodings;  font not added"
 msgstr "falha ao alocar informação de codificação"
 
-#: devPS.c:5775
+#: devPS.c:5782
 #, fuzzy
 msgid "failed to record device encoding; font not added"
 msgstr "falha ao alocar informação de codificação"
 
-#: devPS.c:5886
+#: devPS.c:5893
 msgid "increasing the PDF version to 1.2"
 msgstr ""
 
-#: devPS.c:5916
+#: devPS.c:5923
 msgid "failed to load default encoding"
 msgstr ""
 
-#: devPS.c:5982
+#: devPS.c:5989
 #, fuzzy
 msgid "failed to initialise default PDF font"
 msgstr "falha ao alocar informação de fonte CID"
 
-#: devPS.c:6037
+#: devPS.c:6044
 msgid "failed to initialise additional PDF fonts"
 msgstr ""
 
-#: devPS.c:6050
+#: devPS.c:6057
 #, fuzzy
 msgid "failed to allocate rasters"
 msgstr "falha ao alocar lista de fonte"
 
-#: devPS.c:6057
+#: devPS.c:6064
 #, fuzzy
 msgid "failed to allocate masks"
 msgstr "falha ao alocar lista de fonte"
 
-#: devPS.c:6120
+#: devPS.c:6127
 #, c-format
 msgid "invalid paper type '%s' (pdf)"
 msgstr ""
 
-#: devPS.c:6144
+#: devPS.c:6151
 msgid "invalid foreground/background color (pdf)"
 msgstr ""
 
-#: devPS.c:6263
+#: devPS.c:6270
 msgid "invalid 'alpha' value in PDF"
 msgstr ""
 
-#: devPS.c:6288
+#: devPS.c:6295
 msgid "increasing the PDF version to 1.4"
 msgstr ""
 
-#: devPS.c:6339 devPS.c:6386
+#: devPS.c:6346 devPS.c:6393
 msgid "unknown 'colormodel', using 'srgb'"
 msgstr ""
 
-#: devPS.c:6580
+#: devPS.c:6587
 #, fuzzy
 msgid "failed to load sRGB colorspace file"
 msgstr "falha ao carregar arquivo de codificação '%s'"
 
-#: devPS.c:6844
+#: devPS.c:6851
 #, fuzzy
 msgid "corrupt encodings in PDF device"
 msgstr "falha ao alocar informação de codificação"
 
-#: devPS.c:6925
+#: devPS.c:6932
 msgid "increasing the PDF version to 1.3"
 msgstr ""
 
-#: devPS.c:7050
+#: devPS.c:7057
 #, c-format
 msgid "cannot open 'pdf' pipe to '%s'"
 msgstr ""
 
-#: devPS.c:7056
+#: devPS.c:7063
 msgid "file = \"|cmd\" implies 'onefile = TRUE'"
 msgstr ""
 
-#: devPS.c:7199
+#: devPS.c:7206
 #, c-format
 msgid ""
 "cannot open 'pdf' file argument '%s'\n"
 "  please shut down the PDF device"
 msgstr ""
 
-#: devPS.c:7666 devPS.c:8028 devPS.c:8075
+#: devPS.c:7673 devPS.c:8035 devPS.c:8082
 #, fuzzy
 msgid "failed to find or load PDF font"
 msgstr "falha ao alocar informação de fonte CID"
 
-#: devPS.c:7850 devPS.c:7983
+#: devPS.c:7857 devPS.c:7990
 #, fuzzy
 msgid "failed to find or load PDF CID font"
 msgstr "falha ao alocar informação de fonte CID"
 
-#: devPS.c:8214 devPS.c:8218 devPS.c:8378 devPS.c:8382
+#: devPS.c:8221 devPS.c:8225 devPS.c:8386 devPS.c:8390
 #, c-format
 msgid "invalid 'family' parameter in %s"
 msgstr ""
 
-#: devPS.c:8236 devPS.c:8394
+#: devPS.c:8243 devPS.c:8402
 #, c-format
 msgid "invalid 'fonts' parameter in %s"
 msgstr ""
 
-#: devPS.c:8242 devPS.c:8404 devPS.c:8407 devWindows.c:3648 devWindows.c:3652
-#: devWindows.c:3660 devWindows.c:3671 devWindows.c:3677 devWindows.c:3684
-#: devWindows.c:3691 devWindows.c:3695
+#: devPS.c:8249 devPS.c:8412 devPS.c:8415 devWindows.c:3646 devWindows.c:3650
+#: devWindows.c:3658 devWindows.c:3669 devWindows.c:3675 devWindows.c:3682
+#: devWindows.c:3689 devWindows.c:3693
 #, c-format
 msgid "invalid value of '%s'"
 msgstr ""
 
-#: devPS.c:8255 devPS.c:8322 devPS.c:8421 devPicTeX.c:740 devWindows.c:3732
+#: devPS.c:8262 devPS.c:8329 devPS.c:8429 devPicTeX.c:740 devWindows.c:3734
 #, c-format
 msgid "unable to start %s() device"
 msgstr "não é possível iniciar dispositivo %s()"
@@ -574,145 +594,141 @@ msgid ""
 "unable to create quartz() device target, given type may not be supported"
 msgstr ""
 
-#: devQuartz.c:1606
+#: devQuartz.c:1609
 msgid "Quartz device is not available on this platform"
 msgstr ""
 
-#: devWindows.c:341 devWindows.c:387 devWindows.c:458
+#: devWindows.c:358 devWindows.c:404 devWindows.c:475
 msgid "Not enough memory to copy graphics window"
 msgstr ""
 
-#: devWindows.c:346 devWindows.c:392 devWindows.c:463
+#: devWindows.c:363 devWindows.c:409 devWindows.c:480
 msgid "No device available to copy graphics window"
 msgstr ""
 
-#: devWindows.c:396 devWindows.c:467
+#: devWindows.c:413 devWindows.c:484
 #, c-format
 msgid "'%%' is not allowed in file name"
 msgstr ""
 
-#: devWindows.c:604
+#: devWindows.c:621
 msgid "invalid font specification"
 msgstr ""
 
-#: devWindows.c:643
+#: devWindows.c:660
 msgid "font family not found in Windows font database"
 msgstr ""
 
-#: devWindows.c:1074
+#: devWindows.c:1091
 msgid "plot history seems corrupted"
 msgstr ""
 
-#: devWindows.c:1081
+#: devWindows.c:1098
 msgid "no plot history!"
 msgstr ""
 
-#: devWindows.c:1798
+#: devWindows.c:1815
 #, c-format
 msgid "filename too long in %s() call"
 msgstr ""
 
-#: devWindows.c:1807 devWindows.c:1846 devWindows.c:1880
+#: devWindows.c:1820 devWindows.c:1855 devWindows.c:1885
 #, c-format
 msgid "'width=%d, height=%d' are unlikely values in pixels"
 msgstr ""
 
-#: devWindows.c:1815 devWindows.c:1820 devWindows.c:1849 devWindows.c:1854
-#: devWindows.c:1883 devWindows.c:1888
+#: devWindows.c:1828 devWindows.c:1833 devWindows.c:1858 devWindows.c:1863
+#: devWindows.c:1888 devWindows.c:1893
 #, fuzzy
 msgid "unable to allocate bitmap"
 msgstr "falha ao alocar lista de fonte"
 
-#: devWindows.c:1826 devWindows.c:1860 devWindows.c:2184
+#: devWindows.c:1839 devWindows.c:1869 devWindows.c:2189
 #, c-format
 msgid "unable to open file '%s' for writing"
 msgstr ""
 
-#: devWindows.c:1843
+#: devWindows.c:1852
 msgid "filename too long in jpeg() call"
 msgstr ""
 
-#: devWindows.c:1877
+#: devWindows.c:1882
 msgid "filename too long in tiff() call"
 msgstr ""
 
-#: devWindows.c:1909
+#: devWindows.c:1914
 msgid "filename too long in win.metafile() call"
 msgstr ""
 
-#: devWindows.c:1919
+#: devWindows.c:1924
 #, c-format
 msgid "unable to open metafile '%s' for writing"
 msgstr ""
 
-#: devWindows.c:1921
+#: devWindows.c:1926
 #, fuzzy
 msgid "unable to open clipboard to write metafile"
 msgstr "falha ao alocar lista de fonte"
 
-#: devWindows.c:2132
+#: devWindows.c:2137
 msgid "Insufficient memory for resize. Killing device"
 msgstr ""
 
-#: devWindows.c:2140
+#: devWindows.c:2145
 msgid "Insufficient memory for resize. Disabling alpha blending"
 msgstr ""
 
-#: devWindows.c:2169
+#: devWindows.c:2174
 msgid "a clipboard metafile can store only one figure."
 msgstr ""
 
-#: devWindows.c:2175
+#: devWindows.c:2180
 #, fuzzy, c-format
 msgid "metafile '%s' could not be created"
 msgstr "arquivo afm '%s' não pode ser aberto"
 
-#: devWindows.c:3112 devWindows.c:3756
+#: devWindows.c:3117 devWindows.c:3758
 msgid "R Graphics"
 msgstr ""
 
-#: devWindows.c:3126
+#: devWindows.c:3131
 msgid "attempt to use the locator after dev.hold()"
 msgstr ""
 
-#: devWindows.c:3392
+#: devWindows.c:3397
 msgid "option 'windowsTimeouts' should be integer"
 msgstr ""
 
-#: devWindows.c:3413
+#: devWindows.c:3418
 msgid "invalid device number in 'savePlot'"
 msgstr ""
 
-#: devWindows.c:3415
+#: devWindows.c:3420
 msgid "invalid device in 'savePlot'"
 msgstr ""
 
-#: devWindows.c:3418
+#: devWindows.c:3423
 msgid "invalid filename argument in 'savePlot'"
 msgstr ""
 
-#: devWindows.c:3423
+#: devWindows.c:3428
 msgid "invalid type argument in 'savePlot'"
 msgstr ""
 
-#: devWindows.c:3450
+#: devWindows.c:3455
 msgid "unknown type in savePlot"
 msgstr ""
 
-#: devWindows.c:3495 devWindows.c:3528 devWindows.c:3557 devWindows.c:3589
-#: devWindows.c:3614
+#: devWindows.c:3500 devWindows.c:3532 devWindows.c:3560 devWindows.c:3591
+#: devWindows.c:3612
 msgid "processing of the plot ran out of memory"
 msgstr ""
 
-#: devWindows.c:3574
+#: devWindows.c:3576
 msgid "Impossible to open "
 msgstr ""
 
-#: devWindows.c:3601
-msgid "Impossible to load Rbitmap.dll"
-msgstr ""
-
-#: devWindows.c:3643
+#: devWindows.c:3641
 msgid "invalid 'width' or 'height'"
 msgstr ""
 
@@ -733,7 +749,7 @@ msgstr ""
 msgid "not a supported scheme, no image data written"
 msgstr ""
 
-#: stubs.c:99
+#: stubs.c:104
 #, c-format
 msgid "invalid '%s' argument"
 msgstr ""
diff --git a/src/library/grDevices/po/ru.po b/src/library/grDevices/po/ru.po
index f0df5fa..8cb8ba1 100644
--- a/src/library/grDevices/po/ru.po
+++ b/src/library/grDevices/po/ru.po
@@ -9,109 +9,135 @@ msgid ""
 msgstr ""
 "Project-Id-Version: R 2.11.0\n"
 "Report-Msgid-Bugs-To: bugs.r-project.org\n"
-"POT-Creation-Date: 2014-03-27 07:46+0000\n"
-"PO-Revision-Date: 2013-03-19 19:32-0600\n"
+"POT-Creation-Date: 2015-06-06 13:51+0100\n"
+"PO-Revision-Date: 2016-04-05 18:07-0600\n"
 "Last-Translator: Alexey Shipunov <dactylorhiza at gmail.com>\n"
 "Language-Team: Russian\n"
-"Language: \n"
+"Language: ru\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=KOI8-R\n"
 "Content-Transfer-Encoding: 8bit\n"
 "X-Poedit-Language: Russian\n"
-"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n"
-"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
+"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
 
-#: axis_scales.c:37 axis_scales.c:38 axis_scales.c:53
+#: axis_scales.c:37
+#: axis_scales.c:38
+#: axis_scales.c:55
 #, c-format
 msgid "'%s' must be numeric of length %d"
 msgstr "'%s' ������ ���� �������� ����� %d"
 
 #: colors.c:69
 #, c-format
+msgid "color intensity %s, not in [0,1]"
+msgstr "�������� ������������� %s, �� � [0,1]"
+
+#: colors.c:71
+#, c-format
 msgid "color intensity %g, not in [0,1]"
 msgstr "�������� ������������� %g, �� � [0,1]"
 
-#: colors.c:76
+#: colors.c:78
+#, c-format
+msgid "color intensity %s, not in 0:255"
+msgstr "�������� ������������� %s, �� � 0:255"
+
+#: colors.c:80
 #, c-format
 msgid "color intensity %d, not in 0:255"
 msgstr "�������� ������������� %d, �� � 0:255"
 
-#: colors.c:83
+#: colors.c:87
+#, c-format
+msgid "alpha level %s, not in [0,1]"
+msgstr "������� ����� %s, �� � [0,1]"
+
+#: colors.c:89
 #, c-format
 msgid "alpha level %g, not in [0,1]"
 msgstr "������� ����� %g, �� � [0,1]"
 
-#: colors.c:90
+#: colors.c:96
+#, c-format
+msgid "alpha level %s, not in 0:255"
+msgstr "������� ����� %s �� � 0:255"
+
+#: colors.c:98
 #, c-format
 msgid "alpha level %d, not in 0:255"
 msgstr "������� ����� %d, �� � 0:255"
 
-#: colors.c:118
+#: colors.c:126
 msgid "bad hsv to rgb color conversion"
 msgstr "������������ �������������� hsv � rgb"
 
-#: colors.c:207 colors.c:221
+#: colors.c:218
+#: colors.c:232
 msgid "invalid hsv color"
 msgstr "������������ ���� hsv"
 
-#: colors.c:333 colors.c:353
+#: colors.c:344
+#: colors.c:364
 msgid "invalid hcl color"
 msgstr "������������ ���� hcl"
 
-#: colors.c:385
-#, fuzzy
+#: colors.c:396
 msgid "invalid value of 'maxColorValue'"
-msgstr "������������ �������� '%s'"
+msgstr "������������ �������� 'maxColorValue'"
 
-#: colors.c:413
+#: colors.c:424
 msgid "invalid 'names' vector"
 msgstr "������������ ������ 'names'"
 
-#: colors.c:472 colors.c:481
+#: colors.c:483
+#: colors.c:492
 msgid "invalid gray level, must be in [0,1]."
 msgstr "������������ ������� ������, ������ ���� � [0,1]."
 
-#: colors.c:537
+#: colors.c:548
 #, c-format
 msgid "invalid '%s' value"
 msgstr "������������ �������� '%s'"
 
-#: colors.c:1329
+#: colors.c:1340
 msgid "invalid hex digit in 'color' or 'lty'"
 msgstr "������������ ����������������� ����� � 'color' ��� 'lty'"
 
-#: colors.c:1339 colors.c:1349
+#: colors.c:1350
+#: colors.c:1360
 msgid "invalid RGB specification"
 msgstr "������������ �������� RGB"
 
-#: colors.c:1382
+#: colors.c:1393
 #, c-format
 msgid "invalid color name '%s'"
 msgstr "������������ �������� ����� '%s'"
 
-#: colors.c:1432 colors.c:1441
+#: colors.c:1443
+#: colors.c:1452
 #, c-format
 msgid "invalid color specification \"%s\""
 msgstr "������������ �������� ����� \"%s\""
 
-#: colors.c:1469
+#: colors.c:1480
 msgid "supplied color is neither numeric nor character"
 msgstr "�������� ���� �� ����� � �� �����"
 
-#: colors.c:1473
+#: colors.c:1484
 #, c-format
 msgid "numerical color values must be >= 0, found %d"
 msgstr "�������� �������� ������ ������ ���� >= 0, � ��� %d"
 
-#: colors.c:1484
+#: colors.c:1495
 msgid "invalid argument type"
 msgstr "������������ ��� ���������"
 
-#: colors.c:1495
+#: colors.c:1506
 msgid "unknown palette (need >= 2 colors)"
 msgstr "������������ ������� (���� >= 2 ������)"
 
-#: colors.c:1499 colors.c:1521
+#: colors.c:1510
+#: colors.c:1532
 #, c-format
 msgid "maximum number of colors is %d"
 msgstr "������������ ���������� ������ %d"
@@ -125,7 +151,11 @@ msgstr "afm-
 msgid "unknown AFM entity encountered"
 msgstr "�������� ����������� ������ AFM"
 
-#: devPS.c:740 devPS.c:743 devPS.c:4420 devPS.c:7911 devPicTeX.c:484
+#: devPS.c:740
+#: devPS.c:743
+#: devPS.c:4425
+#: devPS.c:7916
+#: devPicTeX.c:484
 #: devPicTeX.c:486
 #, c-format
 msgid "invalid string in '%s'"
@@ -141,7 +171,8 @@ msgstr "
 msgid "unknown encoding '%s' in 'PostScriptMetricInfo'"
 msgstr "����������� ��������� '%s' � 'PostScriptMetricInfo'"
 
-#: devPS.c:848 devPS.c:859
+#: devPS.c:848
+#: devPS.c:859
 #, c-format
 msgid "font metrics unknown for Unicode character U+%04x"
 msgstr "���������� ��������� ������� ��� ������� ������� U+%04x"
@@ -153,18 +184,12 @@ msgstr "
 
 #: devPS.c:881
 #, c-format
-msgid ""
-"invalid character (%04x) sent to 'PostScriptCIDMetricInfo' in a single-byte "
-"locale"
-msgstr ""
-"������������ ������ (%04x) ������ � 'PostScriptCIDMetricInfo' �� ����������� "
-"������"
+msgid "invalid character (%04x) sent to 'PostScriptCIDMetricInfo' in a single-byte locale"
+msgstr "������������ ������ (%04x) ������ � 'PostScriptCIDMetricInfo' �� ����������� ������"
 
 #: devPS.c:889
-msgid ""
-"invalid character sent to 'PostScriptCIDMetricInfo' in a single-byte locale"
-msgstr ""
-"������������ ������ ������ � 'PostScriptCIDMetricInfo' �� ����������� ������"
+msgid "invalid character sent to 'PostScriptCIDMetricInfo' in a single-byte locale"
+msgstr "������������ ������ ������ � 'PostScriptCIDMetricInfo' �� ����������� ������"
 
 #: devPS.c:994
 msgid "failed to allocate CID font info"
@@ -186,7 +211,8 @@ msgstr "
 msgid "failed to allocate Type 1 font family"
 msgstr "�� ���� ���������� ��������� ������� Type 1"
 
-#: devPS.c:1099 devPS.c:1110
+#: devPS.c:1099
+#: devPS.c:1110
 msgid "failed to allocate font list"
 msgstr "�� ���� ���������� ������ �������"
 
@@ -203,128 +229,158 @@ msgstr "
 msgid "failed to load encoding file '%s'"
 msgstr "�� ���� ��������� ���� ��������� '%s'"
 
-#: devPS.c:1442 devPS.c:1475
+#: devPS.c:1442
+#: devPS.c:1475
 msgid "invalid font name or more than one font name"
 msgstr "������������ ��� ������ ��� ������ ������ ����� ������"
 
-#: devPS.c:1595 devPS.c:1630
+#: devPS.c:1596
+#: devPS.c:1631
 #, c-format
 msgid "font family '%s' not found in PostScript font database"
 msgstr "��������� ������� '%s' �� ������� � ���� ������ ������� PostScript"
 
-#: devPS.c:1702 devPS.c:1784 devPS.c:1811
+#: devPS.c:1703
+#: devPS.c:1785
+#: devPS.c:1812
 #, c-format
 msgid "font encoding for family '%s' not found in font database"
 msgstr "��������� ������ ��������� '%s' �� ������� � ���� ������"
 
-#: devPS.c:1729 devPS.c:1756
+#: devPS.c:1730
+#: devPS.c:1757
 #, c-format
 msgid "font CMap for family '%s' not found in font database"
 msgstr "��������� CMap ��������� '%s' �� ������� � ���� ������ �������"
 
-#: devPS.c:1950 devPS.c:2029 devPS.c:2097
+#: devPS.c:1951
+#: devPS.c:2030
+#: devPS.c:2098
 #, c-format
 msgid "cannot load afm file '%s'"
 msgstr "�� ���� ��������� afm-���� '%s'"
 
-#: devPS.c:2385
+#: devPS.c:2386
 msgid "corrupt loaded encodings;  encoding not recorded"
 msgstr "���������� ����������� ���������; ��������� �� ��������"
 
-#: devPS.c:2396
+#: devPS.c:2397
 msgid "failed to record device encoding"
 msgstr "�� ����� �������� ��������� ����������"
 
-#: devPS.c:2565
+#: devPS.c:2568
 msgid "object '.ps.prolog' is not a character vector"
 msgstr "������ '.ps.prolog' �� �������� ��������� ��������"
 
-#: devPS.c:2638 devPS.c:6415 devWindows.c:784
+#: devPS.c:2643
+#: devPS.c:6420
+#: devWindows.c:801
 msgid "invalid line end"
 msgstr "������������ ����� ������"
 
-#: devPS.c:2657 devPS.c:6434 devWindows.c:797
+#: devPS.c:2662
+#: devPS.c:6439
+#: devWindows.c:814
 msgid "invalid line join"
 msgstr "������������ ���������� �����"
 
-#: devPS.c:2665
+#: devPS.c:2670
 msgid "invalid line mitre"
 msgstr "������������ ����� �����"
 
-#: devPS.c:2874 devPS.c:3770 devPS.c:4218 devPS.c:4245 devPS.c:5255
-#: devPS.c:7761 devPS.c:7806
+#: devPS.c:2879
+#: devPS.c:3775
+#: devPS.c:4223
+#: devPS.c:4250
+#: devPS.c:5260
+#: devPS.c:7766
+#: devPS.c:7811
 #, c-format
 msgid "attempt to use invalid font %d replaced by font 1"
 msgstr "������� ������������� ������������� ������ %d; ������� ������� 1"
 
-#: devPS.c:3096 devPS.c:4720 devPS.c:5834
+#: devPS.c:3101
+#: devPS.c:4725
+#: devPS.c:5839
 #, c-format
 msgid "filename too long in %s()"
 msgstr "������� ������� ��� ����� � ������ %s()"
 
-#: devPS.c:3102 devPS.c:4726 devPS.c:5840
+#: devPS.c:3107
+#: devPS.c:4731
+#: devPS.c:5845
 #, c-format
 msgid "memory allocation problem in %s()"
 msgstr "�������� � ���������� ������ � %s()"
 
-#: devPS.c:3119 devPS.c:5900
+#: devPS.c:3124
+#: devPS.c:5905
 #, c-format
 msgid "encoding path is too long in %s()"
 msgstr "���� � ��������� ������� ������� � %s()"
 
-#: devPS.c:3133 devPS.c:4766
+#: devPS.c:3138
+#: devPS.c:4771
 #, c-format
 msgid "failed to load encoding file in %s()"
 msgstr "�� ���� ��������� ���� ��������� � %s()"
 
-#: devPS.c:3178 devPS.c:3241 devPS.c:5959 devPS.c:6014 devPS.c:7641
+#: devPS.c:3183
+#: devPS.c:3246
+#: devPS.c:5964
+#: devPS.c:6019
+#: devPS.c:7646
 msgid "invalid font type"
 msgstr "������������ ��� ������"
 
-#: devPS.c:3202
+#: devPS.c:3207
 msgid "failed to initialise default PostScript font"
 msgstr "�� ������� ���������������� ����� PostScript �� ���������"
 
-#: devPS.c:3268
+#: devPS.c:3273
 msgid "failed to initialise additional PostScript fonts"
 msgstr "�� ������� ���������������� �������������� ������ PostScript"
 
-#: devPS.c:3284
+#: devPS.c:3289
 msgid "invalid foreground/background color (postscript)"
 msgstr "������������ ���� ���������/������� ����� (postscript)"
 
-#: devPS.c:3289
+#: devPS.c:3294
 msgid "'command' is too long"
 msgstr "'command' ������� �������"
 
-#: devPS.c:3294
+#: devPS.c:3299
 msgid "'postscript(print.it=TRUE)' used with an empty 'print' command"
 msgstr "'postscript(print.it=TRUE)' ����������� � ������ �������� ������"
 
-#: devPS.c:3343
+#: devPS.c:3348
 #, c-format
 msgid "invalid page type '%s' (postscript)"
 msgstr "������������ ��� �������� '%s' (postscript)"
 
-#: devPS.c:3457 devPS.c:4570 devWindows.c:2341
-msgid ""
-"semi-transparency is not supported on this device: reported only once per "
-"page"
-msgstr ""
-"���������������� �� �������������� ���� �����������: ���������� ��� �� "
-"��������"
+#: devPS.c:3462
+#: devPS.c:4575
+#: devWindows.c:2346
+msgid "semi-transparency is not supported on this device: reported only once per page"
+msgstr "���������������� �� �������������� ���� �����������: ���������� ��� �� ��������"
 
-#: devPS.c:3563 devPS.c:3572
+#: devPS.c:3568
+#: devPS.c:3577
 #, c-format
 msgid "cannot open 'postscript' pipe to '%s'"
 msgstr "�� ���� ������� ����� 'postscript' � '%s'"
 
-#: devPS.c:3583 devPS.c:4975 devPS.c:4986 devPS.c:7066 qdPDF.c:98
+#: devPS.c:3588
+#: devPS.c:4980
+#: devPS.c:4991
+#: devPS.c:7071
+#: qdPDF.c:98
 #, c-format
 msgid "cannot open file '%s'"
 msgstr "�� ���� ������� ���� '%s'"
 
-#: devPS.c:3711 devPS.c:3726
+#: devPS.c:3716
+#: devPS.c:3731
 #, c-format
 msgid ""
 "error from postscript() in running:\n"
@@ -333,168 +389,180 @@ msgstr ""
 "������ postscript(), ������������:\n"
 "    %s"
 
-#: devPS.c:3758
+#: devPS.c:3763
 #, c-format
 msgid "CID family '%s' not included in postscript() device"
 msgstr "CID-��������� '%s' �� �������� � postscript() ����������"
 
-#: devPS.c:3776 devPS.c:3787 devPS.c:4225 devPS.c:4255 devPS.c:4360
+#: devPS.c:3781
+#: devPS.c:3792
+#: devPS.c:4230
+#: devPS.c:4260
+#: devPS.c:4365
 #, c-format
 msgid "family '%s' not included in postscript() device"
 msgstr "��������� '%s' �� �������� � postscript() ����������"
 
-#: devPS.c:4300
+#: devPS.c:4305
 #, c-format
 msgid "unknown encoding '%s' in 'mbcsToSbcs'"
 msgstr "����������� ��������� '%s' � 'mbcsToSbcs'"
 
-#: devPS.c:4310
+#: devPS.c:4315
 #, c-format
 msgid "conversion failure on '%s' in 'mbcsToSbcs': dot substituted for <%02x>"
 msgstr "������ ����������� '%s' � 'mbcsToSbcs': ����� �������� �� <%02x>"
 
-#: devPS.c:4388
+#: devPS.c:4393
 #, c-format
 msgid "failed open converter to encoding '%s'"
 msgstr "�� ������� ��������� � ��������� '%s'"
 
-#: devPS.c:4406 devPS.c:5300 devPS.c:7896
+#: devPS.c:4411
+#: devPS.c:5305
+#: devPS.c:7901
 #, c-format
 msgid "failed in text conversion to encoding '%s'"
 msgstr "�� ������� ��������� ������ � ��������� '%s'"
 
-#: devPS.c:4584
+#: devPS.c:4589
 msgid "ran out of colors in xfig()"
 msgstr "�� ������� ������ � xfig()"
 
-#: devPS.c:4613
+#: devPS.c:4618
 #, c-format
 msgid "unimplemented line texture %08x: using Dash-double-dotted"
 msgstr "�� ������������� �������� ����� %08x: ��������� Dash-double-dotted"
 
-#: devPS.c:4679
+#: devPS.c:4684
 #, c-format
 msgid "unknown postscript font family '%s', using Helvetica"
 msgstr "����������� ��������� postscript-������� '%s', ��������� Helvetica"
 
-#: devPS.c:4751
+#: devPS.c:4756
 msgid "invalid foreground/background color (xfig)"
 msgstr "������������ ���� ���������/������� ����� (xfig)"
 
-#: devPS.c:4784
+#: devPS.c:4789
 msgid "only Type 1 fonts supported for XFig"
 msgstr "������ ������ Type 1 �������������� � XFig"
 
-#: devPS.c:4797
+#: devPS.c:4802
 msgid "failed to initialise default XFig font"
 msgstr "�� ������� ���������������� ����� XFig �� ���������"
 
-#: devPS.c:4834
+#: devPS.c:4839
 #, c-format
 msgid "invalid page type '%s' (xfig)"
 msgstr "������������ ��� �������� '%s' (xfig)"
 
-#: devPS.c:4842
+#: devPS.c:4847
 #, c-format
 msgid "xfig(%s, onefile=FALSE) will only return the last plot"
 msgstr "xfig(%s, onefile=FALSE) ������ ������ ��������� ������"
 
-#: devPS.c:4967
+#: devPS.c:4972
 msgid "empty file name"
 msgstr "������ ��� �����"
 
-#: devPS.c:5032 devPS.c:5084 devPS.c:5662 devPS.c:5706 devPS.c:7126
+#: devPS.c:5037
+#: devPS.c:5089
+#: devPS.c:5667
+#: devPS.c:5711
+#: devPS.c:7131
 msgid "write failed"
 msgstr "������ �� �������"
 
-#: devPS.c:5289
+#: devPS.c:5294
 #, c-format
 msgid "unable to use encoding '%s'"
 msgstr "�� ���� ������������ ��������� '%s'"
 
-#: devPS.c:5550 devPS.c:5553
+#: devPS.c:5555
+#: devPS.c:5558
 msgid "failed to increase 'maxRaster'"
 msgstr "�� ���� ��������� 'maxRaster'"
 
-#: devPS.c:5565
+#: devPS.c:5570
 msgid "unable to allocate raster image"
 msgstr "�� ���� ���������� ��������� �����������"
 
-#: devPS.c:5766
+#: devPS.c:5771
 msgid "corrupt loaded encodings;  font not added"
 msgstr "���������� ����������� ���������; ����� �� ��������"
 
-#: devPS.c:5775
+#: devPS.c:5780
 msgid "failed to record device encoding; font not added"
 msgstr "�� ���� �������� ��������� ����������; ����� �� ��������"
 
-#: devPS.c:5886
+#: devPS.c:5891
 msgid "increasing the PDF version to 1.2"
 msgstr "���������� ������ PDF �� 1.2"
 
-#: devPS.c:5916
+#: devPS.c:5921
 msgid "failed to load default encoding"
 msgstr "�� ���� ��������� ��������� �� ���������"
 
-#: devPS.c:5982
+#: devPS.c:5987
 msgid "failed to initialise default PDF font"
 msgstr "�� ������� ���������������� ����� PDF �� ���������"
 
-#: devPS.c:6037
+#: devPS.c:6042
 msgid "failed to initialise additional PDF fonts"
 msgstr "�� ������� ���������������� �������������� ������ PDF"
 
-#: devPS.c:6050
+#: devPS.c:6055
 msgid "failed to allocate rasters"
 msgstr "�� ���� ���������� ������"
 
-#: devPS.c:6057
+#: devPS.c:6062
 msgid "failed to allocate masks"
 msgstr "�� ���� ���������� �����"
 
-#: devPS.c:6120
+#: devPS.c:6125
 #, c-format
 msgid "invalid paper type '%s' (pdf)"
 msgstr "������������ ��� ������ '%s' (pdf)"
 
-#: devPS.c:6144
+#: devPS.c:6149
 msgid "invalid foreground/background color (pdf)"
 msgstr "������������ ���� ���������/������� ����� (pdf)"
 
-#: devPS.c:6263
+#: devPS.c:6268
 msgid "invalid 'alpha' value in PDF"
 msgstr "������������ �������� 'alpha' � PDF"
 
-#: devPS.c:6288
+#: devPS.c:6293
 msgid "increasing the PDF version to 1.4"
 msgstr "���������� ������ PDF �� 1.4"
 
-#: devPS.c:6339 devPS.c:6386
+#: devPS.c:6344
+#: devPS.c:6391
 msgid "unknown 'colormodel', using 'srgb'"
 msgstr "����������� 'colormodel', ��������� 'srgb'"
 
-#: devPS.c:6580
+#: devPS.c:6585
 msgid "failed to load sRGB colorspace file"
 msgstr "�� ������� ��������� ���� ��������� ������������ sRGB"
 
-#: devPS.c:6844
+#: devPS.c:6849
 msgid "corrupt encodings in PDF device"
 msgstr "������������ ��������� � ���������� PDF"
 
-#: devPS.c:6925
+#: devPS.c:6930
 msgid "increasing the PDF version to 1.3"
 msgstr "���������� ������ PDF �� 1.3"
 
-#: devPS.c:7050
+#: devPS.c:7055
 #, c-format
 msgid "cannot open 'pdf' pipe to '%s'"
 msgstr "�� ���� ������� ����� 'pdf' � '%s'"
 
-#: devPS.c:7056
+#: devPS.c:7061
 msgid "file = \"|cmd\" implies 'onefile = TRUE'"
 msgstr "file = \"|cmd\" ������������ 'onefile = TRUE'"
 
-#: devPS.c:7199
+#: devPS.c:7204
 #, c-format
 msgid ""
 "cannot open 'pdf' file argument '%s'\n"
@@ -503,32 +571,51 @@ msgstr ""
 "�� ���� ������� 'pdf'-���� ��������� '%s'\n"
 "  ����������, ��������� PDFdevice"
 
-#: devPS.c:7666 devPS.c:8028 devPS.c:8075
+#: devPS.c:7671
+#: devPS.c:8033
+#: devPS.c:8080
 msgid "failed to find or load PDF font"
 msgstr "�� ������� ����� ��� ��������� ����� PDF"
 
-#: devPS.c:7850 devPS.c:7983
+#: devPS.c:7855
+#: devPS.c:7988
 msgid "failed to find or load PDF CID font"
 msgstr "�� ������� ����� ��� ��������� CID-����� PDF"
 
-#: devPS.c:8214 devPS.c:8218 devPS.c:8378 devPS.c:8382
+#: devPS.c:8219
+#: devPS.c:8223
+#: devPS.c:8383
+#: devPS.c:8387
 #, c-format
 msgid "invalid 'family' parameter in %s"
 msgstr "������������ �������� 'family' � %s"
 
-#: devPS.c:8236 devPS.c:8394
+#: devPS.c:8241
+#: devPS.c:8399
 #, c-format
 msgid "invalid 'fonts' parameter in %s"
 msgstr "������������ �������� 'fonts' � %s"
 
-#: devPS.c:8242 devPS.c:8404 devPS.c:8407 devWindows.c:3648 devWindows.c:3652
-#: devWindows.c:3660 devWindows.c:3671 devWindows.c:3677 devWindows.c:3684
-#: devWindows.c:3691 devWindows.c:3695
+#: devPS.c:8247
+#: devPS.c:8409
+#: devPS.c:8412
+#: devWindows.c:3646
+#: devWindows.c:3650
+#: devWindows.c:3658
+#: devWindows.c:3669
+#: devWindows.c:3675
+#: devWindows.c:3682
+#: devWindows.c:3689
+#: devWindows.c:3693
 #, c-format
 msgid "invalid value of '%s'"
 msgstr "������������ �������� '%s'"
 
-#: devPS.c:8255 devPS.c:8322 devPS.c:8421 devPicTeX.c:740 devWindows.c:3732
+#: devPS.c:8260
+#: devPS.c:8327
+#: devPS.c:8426
+#: devPicTeX.c:740
+#: devWindows.c:3734
 #, c-format
 msgid "unable to start %s() device"
 msgstr "�� ���� ��������� ���������� %s()"
@@ -560,149 +647,159 @@ msgid "unable to create device description"
 msgstr "�� ���� ������� �������� ����������."
 
 #: devQuartz.c:1479
-msgid ""
-"unable to create quartz() device target, given type may not be supported"
-msgstr ""
-"�� ���� ������� ������� ���������� quartz(), ��������� ��� �� ����� ���� "
-"���������"
+msgid "unable to create quartz() device target, given type may not be supported"
+msgstr "�� ���� ������� ������� ���������� quartz(), ��������� ��� �� ����� ���� ���������"
 
-#: devQuartz.c:1606
+#: devQuartz.c:1609
 msgid "Quartz device is not available on this platform"
 msgstr "���������� Quartz �� ���� ��������� ����������"
 
-#: devWindows.c:341 devWindows.c:387 devWindows.c:458
+#: devWindows.c:358
+#: devWindows.c:404
+#: devWindows.c:475
 msgid "Not enough memory to copy graphics window"
 msgstr "�� ������� ������, ����� ����������� ���� �������"
 
-#: devWindows.c:346 devWindows.c:392 devWindows.c:463
+#: devWindows.c:363
+#: devWindows.c:409
+#: devWindows.c:480
 msgid "No device available to copy graphics window"
 msgstr "��� ����������, ����� ����������� ���� �������"
 
-#: devWindows.c:396 devWindows.c:467
+#: devWindows.c:413
+#: devWindows.c:484
 #, c-format
 msgid "'%%' is not allowed in file name"
 msgstr "'%%' � ����� ����� �� �����������"
 
-#: devWindows.c:604
+#: devWindows.c:621
 msgid "invalid font specification"
 msgstr "������������ �������� ������"
 
-#: devWindows.c:643
+#: devWindows.c:660
 msgid "font family not found in Windows font database"
 msgstr "��������� ������� �� ������� � ���� ������ ������� Windows"
 
-#: devWindows.c:1074
+#: devWindows.c:1091
 msgid "plot history seems corrupted"
 msgstr "������� ��������, ������, ����������"
 
-#: devWindows.c:1081
+#: devWindows.c:1098
 msgid "no plot history!"
 msgstr "��� ������� ��������!"
 
-#: devWindows.c:1798
+#: devWindows.c:1815
 #, c-format
 msgid "filename too long in %s() call"
 msgstr "������� ������� ��� ����� � ������ %s()"
 
-#: devWindows.c:1807 devWindows.c:1846 devWindows.c:1880
+#: devWindows.c:1820
+#: devWindows.c:1855
+#: devWindows.c:1885
 #, c-format
 msgid "'width=%d, height=%d' are unlikely values in pixels"
 msgstr "�� ������, ��� 'width=%d, height=%d' � ��������"
 
-#: devWindows.c:1815 devWindows.c:1820 devWindows.c:1849 devWindows.c:1854
-#: devWindows.c:1883 devWindows.c:1888
+#: devWindows.c:1828
+#: devWindows.c:1833
+#: devWindows.c:1858
+#: devWindows.c:1863
+#: devWindows.c:1888
+#: devWindows.c:1893
 msgid "unable to allocate bitmap"
 msgstr "�� ���� ���������� bitmap"
 
-#: devWindows.c:1826 devWindows.c:1860 devWindows.c:2184
+#: devWindows.c:1839
+#: devWindows.c:1869
+#: devWindows.c:2189
 #, c-format
 msgid "unable to open file '%s' for writing"
 msgstr "�� ���� ������� ���� '%s' ��� ������"
 
-#: devWindows.c:1843
+#: devWindows.c:1852
 msgid "filename too long in jpeg() call"
 msgstr "������� ������� ��� ����� � ������ jpeg()"
 
-#: devWindows.c:1877
+#: devWindows.c:1882
 msgid "filename too long in tiff() call"
 msgstr "������� ������� ��� ����� � ������ tiff()"
 
-#: devWindows.c:1909
+#: devWindows.c:1914
 msgid "filename too long in win.metafile() call"
 msgstr "������� ������� ��� ����� � ������ win.metafile()"
 
-#: devWindows.c:1919
+#: devWindows.c:1924
 #, c-format
 msgid "unable to open metafile '%s' for writing"
 msgstr "�� ���� ������� �������� '%s' ��� ������"
 
-#: devWindows.c:1921
+#: devWindows.c:1926
 msgid "unable to open clipboard to write metafile"
 msgstr "�� ���� ������� ����� ������ ��� ������ ���������"
 
-#: devWindows.c:2132
+#: devWindows.c:2137
 msgid "Insufficient memory for resize. Killing device"
 msgstr "�� ������� ������ ��� ���������������. ������ ����������"
 
-#: devWindows.c:2140
+#: devWindows.c:2145
 msgid "Insufficient memory for resize. Disabling alpha blending"
 msgstr "�� ������� ������ ��� ���������������. �������� alpha-blending"
 
-#: devWindows.c:2169
+#: devWindows.c:2174
 msgid "a clipboard metafile can store only one figure."
 msgstr "�������� � ������ ������ ����� ������� ������ ���� ������"
 
-#: devWindows.c:2175
+#: devWindows.c:2180
 #, c-format
 msgid "metafile '%s' could not be created"
 msgstr "�������� '%s' �� ���������� �������"
 
-#: devWindows.c:3112 devWindows.c:3756
+#: devWindows.c:3117
+#: devWindows.c:3758
 msgid "R Graphics"
 msgstr "R-�������"
 
-#: devWindows.c:3126
+#: devWindows.c:3131
 msgid "attempt to use the locator after dev.hold()"
 msgstr "������� ������������ locator ����� dev.hold()"
 
-#: devWindows.c:3392
+#: devWindows.c:3397
 msgid "option 'windowsTimeouts' should be integer"
 msgstr "����� 'windowsTimeouts' ������ ���� ����� ������"
 
-#: devWindows.c:3413
+#: devWindows.c:3418
 msgid "invalid device number in 'savePlot'"
 msgstr "������������ ����� ���������� � 'savePlot'"
 
-#: devWindows.c:3415
+#: devWindows.c:3420
 msgid "invalid device in 'savePlot'"
 msgstr "������������ ���������� � 'savePlot'"
 
-#: devWindows.c:3418
+#: devWindows.c:3423
 msgid "invalid filename argument in 'savePlot'"
 msgstr "������������ �������� ����� ����� � 'savePlot'"
 
-#: devWindows.c:3423
+#: devWindows.c:3428
 msgid "invalid type argument in 'savePlot'"
 msgstr "������������ ��� ��������� � 'savePlot'"
 
-#: devWindows.c:3450
+#: devWindows.c:3455
 msgid "unknown type in savePlot"
 msgstr "����������� ��� � savePlot"
 
-#: devWindows.c:3495 devWindows.c:3528 devWindows.c:3557 devWindows.c:3589
-#: devWindows.c:3614
+#: devWindows.c:3500
+#: devWindows.c:3532
+#: devWindows.c:3560
+#: devWindows.c:3591
+#: devWindows.c:3612
 msgid "processing of the plot ran out of memory"
 msgstr "��������� ������� ��������� ������"
 
-#: devWindows.c:3574
+#: devWindows.c:3576
 msgid "Impossible to open "
 msgstr "������ ������� "
 
-#: devWindows.c:3601
-msgid "Impossible to load Rbitmap.dll"
-msgstr "���������� ��������� Rbitmap.dll"
-
-#: devWindows.c:3643
+#: devWindows.c:3641
 msgid "invalid 'width' or 'height'"
 msgstr "������������ 'width' ��� 'height'"
 
@@ -723,125 +820,90 @@ msgstr "QuartzBitmap_Output - 
 msgid "not a supported scheme, no image data written"
 msgstr "����� �� ��������������, ������ ����������� �� ��������"
 
-#: stubs.c:99
+#: stubs.c:104
 #, c-format
 msgid "invalid '%s' argument"
 msgstr "������������ �������� %s"
 
+#~ msgid "Impossible to load Rbitmap.dll"
+#~ msgstr "���������� ��������� Rbitmap.dll"
 #~ msgid "Invalid line end"
 #~ msgstr "������������ ����� ������"
-
 #~ msgid "Invalid line join"
 #~ msgstr "������������ ���������� �����"
-
 #~ msgid "Unable to load Rbitmap.dll"
 #~ msgstr "�� ���� ��������� Rbitmap.dll"
-
 #~ msgid "Unable to load winCairo.dll: was it built?"
 #~ msgstr "�� ���� ��������� winCairo.dll: ��� ������������� �������?"
-
 #~ msgid "FontBBox could not be parsed"
 #~ msgstr "FontBBox �� �����������"
-
 #~ msgid "CharInfo could not be parsed"
 #~ msgstr "CharInfo �� �����������"
-
 #~ msgid "unable to start NULL device"
 #~ msgstr "�� ���� ��������� NULL-����������"
-
 #~ msgid "printing via file = \"\" is not implemented in this version"
 #~ msgstr "������ ����� file = \"\" ���������� � ���� ������"
-
 #~ msgid "file = \"|cmd\" is not implemented in this version"
 #~ msgstr "file = \"|cmd\" ���������� � ���� ������"
-
 #~ msgid "%s not available for this device"
 #~ msgstr "%s ���������� ��� ����� ����������"
-
 #~ msgid "%s not yet implemented for this device"
 #~ msgstr "%s ��� ����� ���������� ��� �� ������"
-
 #~ msgid "Too many raster images"
 #~ msgstr "������� ����� ��������� ��������"
-
 #~ msgid "cannot allocate pd->pos"
 #~ msgstr "�� ���� ���������� pd->pos"
-
 #~ msgid "cannot allocate pd->pageobj"
 #~ msgstr "�� ���� ���������� pd->pageobj"
-
 #~ msgid "unable to increase page limit: please shutdown the pdf device"
 #~ msgstr ""
 #~ "�� ���� ��������� ����� �������: ����������, ��������� ���������� PDF"
-
 #~ msgid "invalid 'maxRasters' parameter in %s"
 #~ msgstr "������������ �������� 'maxRasters' � %s"
-
 #~ msgid "only gray colors are allowed in this color model"
 #~ msgstr "� ���� �������� ������ ��������� ������ ������� ������"
-
 #~ msgid "cannot open 'postscript' file argument '%s'"
 #~ msgstr "�� ���� ������� 'postscript'-���� ��������� '%s'"
-
 #~ msgid "cannot open 'pdf' file argument '%s'"
 #~ msgstr "�� ���� ������� 'pdf'-���� � ��������� '%s'"
-
 #~ msgid "filename too long in postscript"
 #~ msgstr "��� ����� ������� ������ ��� postscript"
-
 #~ msgid "filename too long in xfig"
 #~ msgstr "��� ����� ������� ������� ��� xfig"
-
 #~ msgid "filename too long in pdf"
 #~ msgstr "������� ������� ��� ����� ��� pdf"
-
 #~ msgid "unable to start device PostScript"
 #~ msgstr "�� ���� ��������� ���������� PostScript"
-
 #~ msgid "unable to start device xfig"
 #~ msgstr "�� ���� ��������� ���������� xfig"
-
 #~ msgid "unable to start device pdf"
 #~ msgstr "�� ���� ��������� ���������� pdf"
-
 #~ msgid "unable to start device PicTeX"
 #~ msgstr "�� ���� ��������� ���������� PicTeX"
-
 #~ msgid "recursive use of getGraphicsEvent not supported"
 #~ msgstr "����������� ������������� getGraphicsEvent �� ��������������"
-
 #~ msgid "CID fonts are not supported on this platform"
 #~ msgstr "������ CID �� �������������� �� ���� ���������"
-
 #~ msgid "re-encoding is not possible on this system"
 #~ msgstr "� ���� ������� ������������� ����������"
-
 #~ msgid "invalid value of 'record' in devWindows"
 #~ msgstr "������������ �������� 'record' � devWindows"
-
 #~ msgid "invalid value of 'rescale' in devWindows"
 #~ msgstr "������������ �������� 'rescale' � devWindows"
-
 #~ msgid "invalid value of 'canvas' in devWindows"
 #~ msgstr "������������ �������� 'canvas' � devWindows"
-
 #~ msgid "invalid value of 'buffered' in devWindows"
 #~ msgstr "������������ �������� 'buffered' � devWindows"
-
 #~ msgid "invalid value of 'title' in devWindows"
 #~ msgstr "������������ �������� 'title' � devWindows"
-
 #~ msgid "unable to start device devWindows"
 #~ msgstr "�� ���� ��������� ���������� devWindows"
-
 #~ msgid "can't find any fonts"
 #~ msgstr "�� ���� ����� ������� �������"
-
 #~ msgid "invalid width or height in quartz"
 #~ msgstr "������������ ������ ��� ������ � quartz"
-
 #~ msgid "unable to start device Quartz"
 #~ msgstr "�� ���� ��������� ���������� Quartz"
-
 #~ msgid "Font family not found in Quartz font database"
 #~ msgstr "��������� ������� �� ������� � ���� ������ Quartz"
+
diff --git a/src/library/grDevices/po/zh_CN.po b/src/library/grDevices/po/zh_CN.po
index b641f8e..20f7f68 100644
--- a/src/library/grDevices/po/zh_CN.po
+++ b/src/library/grDevices/po/zh_CN.po
@@ -6,108 +6,128 @@
 msgid ""
 msgstr ""
 "Project-Id-Version: R 2.4.0\n"
-"Report-Msgid-Bugs-To: bugs.r-project.org\n"
-"POT-Creation-Date: 2014-03-27 07:46+0000\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2016-04-01 10:28-0700\n"
 "PO-Revision-Date: 2005-02-04 08:37+0000\n"
 "Last-Translator: 陈斐 <feic at normipaiva.com>\n"
 "Language-Team: Chinese\n"
-"Language: \n"
+"Language: zh_CN\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
 "Plural-Forms: nplurals=1; plural=0;\n"
 
-#: axis_scales.c:37 axis_scales.c:38 axis_scales.c:53
+#: axis_scales.c:37 axis_scales.c:38 axis_scales.c:55
 #, c-format
 msgid "'%s' must be numeric of length %d"
 msgstr "'%s'必需是长度为%d的数值"
 
 #: colors.c:69
+#, fuzzy, c-format
+msgid "color intensity %s, not in [0,1]"
+msgstr "颜色强度%g,不在[0,1]"
+
+#: colors.c:71
 #, c-format
 msgid "color intensity %g, not in [0,1]"
 msgstr "颜色强度%g,不在[0,1]"
 
-#: colors.c:76
+#: colors.c:78
+#, fuzzy, c-format
+msgid "color intensity %s, not in 0:255"
+msgstr "颜色强度%d,不在0:255"
+
+#: colors.c:80
 #, c-format
 msgid "color intensity %d, not in 0:255"
 msgstr "颜色强度%d,不在0:255"
 
-#: colors.c:83
+#: colors.c:87
+#, fuzzy, c-format
+msgid "alpha level %s, not in [0,1]"
+msgstr "α水平%g,不在[0,1]"
+
+#: colors.c:89
 #, c-format
 msgid "alpha level %g, not in [0,1]"
 msgstr "α水平%g,不在[0,1]"
 
-#: colors.c:90
+#: colors.c:96
+#, fuzzy, c-format
+msgid "alpha level %s, not in 0:255"
+msgstr "α水平%d,不在0:255"
+
+#: colors.c:98
 #, c-format
 msgid "alpha level %d, not in 0:255"
 msgstr "α水平%d,不在0:255"
 
-#: colors.c:118
+#: colors.c:126
 msgid "bad hsv to rgb color conversion"
 msgstr "hsv到rgb颜色转换出错"
 
-#: colors.c:207 colors.c:221
+#: colors.c:218 colors.c:232
 msgid "invalid hsv color"
 msgstr "hsv颜色不对"
 
-#: colors.c:333 colors.c:353
+#: colors.c:344 colors.c:364
 msgid "invalid hcl color"
 msgstr "hcl颜色不对"
 
-#: colors.c:385
+#: colors.c:396
 #, fuzzy
 msgid "invalid value of 'maxColorValue'"
 msgstr "'%s'的值不对"
 
-#: colors.c:413
+#: colors.c:424
 msgid "invalid 'names' vector"
 msgstr "'names'向量不对"
 
-#: colors.c:472 colors.c:481
+#: colors.c:483 colors.c:492
 msgid "invalid gray level, must be in [0,1]."
 msgstr "灰色水平不对,必需在[0,1]。"
 
-#: colors.c:537
+#: colors.c:548
 #, c-format
 msgid "invalid '%s' value"
 msgstr "'%s'值 不对"
 
-#: colors.c:1329
+#: colors.c:1340
 msgid "invalid hex digit in 'color' or 'lty'"
 msgstr "'color'或'lty'里的十六进制数字不对"
 
-#: colors.c:1339 colors.c:1349
+#: colors.c:1350 colors.c:1360
 msgid "invalid RGB specification"
 msgstr "RGB设置出错"
 
-#: colors.c:1382
+#: colors.c:1393
 #, c-format
 msgid "invalid color name '%s'"
 msgstr "'%s'颜色名字不对"
 
-#: colors.c:1432 colors.c:1441
+#: colors.c:1443 colors.c:1452
 #, c-format
 msgid "invalid color specification \"%s\""
 msgstr "颜色设置出错\"%s\""
 
-#: colors.c:1469
+#: colors.c:1480
 msgid "supplied color is neither numeric nor character"
 msgstr "所提供的颜色值既不是数字也不是字符"
 
-#: colors.c:1473
+#: colors.c:1484
 #, c-format
 msgid "numerical color values must be >= 0, found %d"
 msgstr "颜色数值必需大于等于零,现在得到的是%d"
 
-#: colors.c:1484
+#: colors.c:1495
 msgid "invalid argument type"
 msgstr "参数种类不对"
 
-#: colors.c:1495
+#: colors.c:1506
 msgid "unknown palette (need >= 2 colors)"
 msgstr "没有这样的调色板(至少需要两种颜色"
 
-#: colors.c:1499 colors.c:1521
+#: colors.c:1510 colors.c:1532
 #, c-format
 msgid "maximum number of colors is %d"
 msgstr "最大颜色数是%d"
@@ -121,7 +141,7 @@ msgstr "无法打开afm文本'%s'"
 msgid "unknown AFM entity encountered"
 msgstr "遇到未知AFM值这个错误"
 
-#: devPS.c:740 devPS.c:743 devPS.c:4420 devPS.c:7911 devPicTeX.c:484
+#: devPS.c:740 devPS.c:743 devPS.c:4427 devPS.c:7918 devPicTeX.c:484
 #: devPicTeX.c:486
 #, c-format
 msgid "invalid string in '%s'"
@@ -200,122 +220,122 @@ msgstr "无法载入编码文本'%s'"
 msgid "invalid font name or more than one font name"
 msgstr "字体名字不对或太多"
 
-#: devPS.c:1595 devPS.c:1630
+#: devPS.c:1596 devPS.c:1631
 #, c-format
 msgid "font family '%s' not found in PostScript font database"
 msgstr "PostScript字体数据库里找不到'%s'这个字体系列"
 
-#: devPS.c:1702 devPS.c:1784 devPS.c:1811
+#: devPS.c:1703 devPS.c:1785 devPS.c:1812
 #, c-format
 msgid "font encoding for family '%s' not found in font database"
 msgstr "字体数据库里找不到'%s'字体系列的字体编码"
 
-#: devPS.c:1729 devPS.c:1756
+#: devPS.c:1730 devPS.c:1757
 #, c-format
 msgid "font CMap for family '%s' not found in font database"
 msgstr "字体数据库里找不到用于'%s'字体系列的CMap这个字体"
 
-#: devPS.c:1950 devPS.c:2029 devPS.c:2097
+#: devPS.c:1952 devPS.c:2032 devPS.c:2100
 #, c-format
 msgid "cannot load afm file '%s'"
 msgstr "无法载入afm文本'%s'"
 
-#: devPS.c:2385
+#: devPS.c:2388
 msgid "corrupt loaded encodings;  encoding not recorded"
 msgstr "载入的编码损坏了; 没有记录编码"
 
-#: devPS.c:2396
+#: devPS.c:2399
 msgid "failed to record device encoding"
 msgstr "无法记录装置编码"
 
-#: devPS.c:2565
+#: devPS.c:2570
 msgid "object '.ps.prolog' is not a character vector"
 msgstr "对象'.ps.prolog'不是字符向量"
 
-#: devPS.c:2638 devPS.c:6415 devWindows.c:784
+#: devPS.c:2645 devPS.c:6422 devWindows.c:801
 msgid "invalid line end"
 msgstr "行尾出错"
 
-#: devPS.c:2657 devPS.c:6434 devWindows.c:797
+#: devPS.c:2664 devPS.c:6441 devWindows.c:814
 msgid "invalid line join"
 msgstr "行接連處出错"
 
-#: devPS.c:2665
+#: devPS.c:2672
 msgid "invalid line mitre"
 msgstr "行斜接出错"
 
-#: devPS.c:2874 devPS.c:3770 devPS.c:4218 devPS.c:4245 devPS.c:5255
-#: devPS.c:7761 devPS.c:7806
+#: devPS.c:2881 devPS.c:3777 devPS.c:4225 devPS.c:4252 devPS.c:5262
+#: devPS.c:7768 devPS.c:7813
 #, c-format
 msgid "attempt to use invalid font %d replaced by font 1"
 msgstr "不能用%d这个字体,代用一字体"
 
-#: devPS.c:3096 devPS.c:4720 devPS.c:5834
+#: devPS.c:3103 devPS.c:4727 devPS.c:5841
 #, c-format
 msgid "filename too long in %s()"
 msgstr "%s()里的文本名字太长"
 
-#: devPS.c:3102 devPS.c:4726 devPS.c:5840
+#: devPS.c:3109 devPS.c:4733 devPS.c:5847
 #, c-format
 msgid "memory allocation problem in %s()"
 msgstr "%s()内存分配出了问题"
 
-#: devPS.c:3119 devPS.c:5900
+#: devPS.c:3126 devPS.c:5907
 #, c-format
 msgid "encoding path is too long in %s()"
 msgstr "%s()里的编码路径太长"
 
-#: devPS.c:3133 devPS.c:4766
+#: devPS.c:3140 devPS.c:4773
 #, c-format
 msgid "failed to load encoding file in %s()"
 msgstr "%s()中载入编码文本失败了'"
 
-#: devPS.c:3178 devPS.c:3241 devPS.c:5959 devPS.c:6014 devPS.c:7641
+#: devPS.c:3185 devPS.c:3248 devPS.c:5966 devPS.c:6021 devPS.c:7648
 msgid "invalid font type"
 msgstr "字体类别出错"
 
-#: devPS.c:3202
+#: devPS.c:3209
 msgid "failed to initialise default PostScript font"
 msgstr "无法初始化PostScript字体的默认值"
 
-#: devPS.c:3268
+#: devPS.c:3275
 msgid "failed to initialise additional PostScript fonts"
 msgstr "无法初始化外加的PostScript字体"
 
-#: devPS.c:3284
+#: devPS.c:3291
 msgid "invalid foreground/background color (postscript)"
 msgstr "前景/后景颜色不对(postscript)"
 
-#: devPS.c:3289
+#: devPS.c:3296
 msgid "'command' is too long"
 msgstr "'command'太长"
 
-#: devPS.c:3294
+#: devPS.c:3301
 msgid "'postscript(print.it=TRUE)' used with an empty 'print' command"
 msgstr "'postscript(print.it=TRUE)'不能用在空'print'命令里"
 
-#: devPS.c:3343
+#: devPS.c:3350
 #, c-format
 msgid "invalid page type '%s' (postscript)"
 msgstr "页类别'%s'(postscript)不对"
 
-#: devPS.c:3457 devPS.c:4570 devWindows.c:2341
+#: devPS.c:3464 devPS.c:4577 devWindows.c:2346
 msgid ""
 "semi-transparency is not supported on this device: reported only once per "
 "page"
 msgstr "此装置不支持半透明:每一页将被报告一次"
 
-#: devPS.c:3563 devPS.c:3572
+#: devPS.c:3570 devPS.c:3579
 #, c-format
 msgid "cannot open 'postscript' pipe to '%s'"
 msgstr "无法打开'postscript'管道至'%s'"
 
-#: devPS.c:3583 devPS.c:4975 devPS.c:4986 devPS.c:7066 qdPDF.c:98
+#: devPS.c:3590 devPS.c:4982 devPS.c:4993 devPS.c:7073 qdPDF.c:98
 #, c-format
 msgid "cannot open file '%s'"
 msgstr "无法打开'%s'文件"
 
-#: devPS.c:3711 devPS.c:3726
+#: devPS.c:3718 devPS.c:3733
 #, c-format
 msgid ""
 "error from postscript() in running:\n"
@@ -324,168 +344,168 @@ msgstr ""
 "postscript()出了错,是在运行这个命令时发生的:\n"
 "    %s"
 
-#: devPS.c:3758
+#: devPS.c:3765
 #, c-format
 msgid "CID family '%s' not included in postscript() device"
 msgstr "postscript()装置里没有CID系列'%s'"
 
-#: devPS.c:3776 devPS.c:3787 devPS.c:4225 devPS.c:4255 devPS.c:4360
+#: devPS.c:3783 devPS.c:3794 devPS.c:4232 devPS.c:4262 devPS.c:4367
 #, c-format
 msgid "family '%s' not included in postscript() device"
 msgstr " postscript()装置里没有'%s'系列"
 
-#: devPS.c:4300
+#: devPS.c:4307
 #, c-format
 msgid "unknown encoding '%s' in 'mbcsToSbcs'"
 msgstr "'mbcsToSbcs'不存在'%s'这样的编码"
 
-#: devPS.c:4310
+#: devPS.c:4317
 #, c-format
 msgid "conversion failure on '%s' in 'mbcsToSbcs': dot substituted for <%02x>"
 msgstr "'mbcsToSbcs'里转换'%s'出错:<%02x>代替了dot"
 
-#: devPS.c:4388
+#: devPS.c:4395
 #, c-format
 msgid "failed open converter to encoding '%s'"
 msgstr "编码'%s'时文字转换器出了错"
 
-#: devPS.c:4406 devPS.c:5300 devPS.c:7896
+#: devPS.c:4413 devPS.c:5307 devPS.c:7903
 #, c-format
 msgid "failed in text conversion to encoding '%s'"
 msgstr "文字转换到编码'%s'时出了错"
 
-#: devPS.c:4584
+#: devPS.c:4591
 msgid "ran out of colors in xfig()"
 msgstr "xfig()里的颜色不够用"
 
-#: devPS.c:4613
+#: devPS.c:4620
 #, c-format
 msgid "unimplemented line texture %08x: using Dash-double-dotted"
 msgstr "没有实现%08x这样的字行结构: 用Dash-double-dotted"
 
-#: devPS.c:4679
+#: devPS.c:4686
 #, c-format
 msgid "unknown postscript font family '%s', using Helvetica"
 msgstr "不存在postscript字体系列'%s', 用Helvetica"
 
-#: devPS.c:4751
+#: devPS.c:4758
 msgid "invalid foreground/background color (xfig)"
 msgstr "前景/后景颜色不对(xfig)"
 
-#: devPS.c:4784
+#: devPS.c:4791
 msgid "only Type 1 fonts supported for XFig"
 msgstr "XFig只支持Type 1字体"
 
-#: devPS.c:4797
+#: devPS.c:4804
 msgid "failed to initialise default XFig font"
 msgstr "无法初始化XFig默认字体"
 
-#: devPS.c:4834
+#: devPS.c:4841
 #, c-format
 msgid "invalid page type '%s' (xfig)"
 msgstr "页类别'%s'出错(xfig)"
 
-#: devPS.c:4842
+#: devPS.c:4849
 #, c-format
 msgid "xfig(%s, onefile=FALSE) will only return the last plot"
 msgstr "xfig(%s, onefile=FALSE)只会返回最后的一张图"
 
-#: devPS.c:4967
+#: devPS.c:4974
 msgid "empty file name"
 msgstr "空文本名字"
 
-#: devPS.c:5032 devPS.c:5084 devPS.c:5662 devPS.c:5706 devPS.c:7126
+#: devPS.c:5039 devPS.c:5091 devPS.c:5669 devPS.c:5713 devPS.c:7133
 msgid "write failed"
 msgstr "讀寫失败"
 
-#: devPS.c:5289
+#: devPS.c:5296
 #, c-format
 msgid "unable to use encoding '%s'"
 msgstr "无法用编码'%s'"
 
-#: devPS.c:5550 devPS.c:5553
+#: devPS.c:5557 devPS.c:5560
 msgid "failed to increase 'maxRaster'"
 msgstr "无法增加’maxRaster’"
 
-#: devPS.c:5565
+#: devPS.c:5572
 msgid "unable to allocate raster image"
 msgstr "无法分配光栅图像"
 
-#: devPS.c:5766
+#: devPS.c:5773
 msgid "corrupt loaded encodings;  font not added"
 msgstr "载入的编码坏了; 字体没有加入"
 
-#: devPS.c:5775
+#: devPS.c:5782
 msgid "failed to record device encoding; font not added"
 msgstr "无法记录装置编码; 字体没有加入"
 
-#: devPS.c:5886
+#: devPS.c:5893
 msgid "increasing the PDF version to 1.2"
 msgstr "增加PDF版本到1.2"
 
-#: devPS.c:5916
+#: devPS.c:5923
 msgid "failed to load default encoding"
 msgstr "无法载入默认编码"
 
-#: devPS.c:5982
+#: devPS.c:5989
 msgid "failed to initialise default PDF font"
 msgstr "无法初始化PDF默认字体"
 
-#: devPS.c:6037
+#: devPS.c:6044
 msgid "failed to initialise additional PDF fonts"
 msgstr "无法初始化外加的PDF字体"
 
-#: devPS.c:6050
+#: devPS.c:6057
 msgid "failed to allocate rasters"
 msgstr "无法分配栅格"
 
-#: devPS.c:6057
+#: devPS.c:6064
 msgid "failed to allocate masks"
 msgstr "无法分配面具"
 
-#: devPS.c:6120
+#: devPS.c:6127
 #, c-format
 msgid "invalid paper type '%s' (pdf)"
 msgstr "纸张类别'%s'不对(pdf)"
 
-#: devPS.c:6144
+#: devPS.c:6151
 msgid "invalid foreground/background color (pdf)"
 msgstr "前景/后景颜色不对(pdf)"
 
-#: devPS.c:6263
+#: devPS.c:6270
 msgid "invalid 'alpha' value in PDF"
 msgstr "PDF里的'alpha'值不对"
 
-#: devPS.c:6288
+#: devPS.c:6295
 msgid "increasing the PDF version to 1.4"
 msgstr "增加PDF版本到1.4"
 
-#: devPS.c:6339 devPS.c:6386
+#: devPS.c:6346 devPS.c:6393
 msgid "unknown 'colormodel', using 'srgb'"
 msgstr "没有这种'colormodel',用'srgb'"
 
-#: devPS.c:6580
+#: devPS.c:6587
 msgid "failed to load sRGB colorspace file"
 msgstr "无法载入sRGB色彩文件"
 
-#: devPS.c:6844
+#: devPS.c:6851
 msgid "corrupt encodings in PDF device"
 msgstr "PDF装置里的编码坏了"
 
-#: devPS.c:6925
+#: devPS.c:6932
 msgid "increasing the PDF version to 1.3"
 msgstr "增加PDF版本到1.3"
 
-#: devPS.c:7050
+#: devPS.c:7057
 #, c-format
 msgid "cannot open 'pdf' pipe to '%s'"
 msgstr "无法打开通到'%s'的'pdf'管道"
 
-#: devPS.c:7056
+#: devPS.c:7063
 msgid "file = \"|cmd\" implies 'onefile = TRUE'"
 msgstr "file = \"|cmd\"意味着'onefile = TRUE'"
 
-#: devPS.c:7199
+#: devPS.c:7206
 #, c-format
 msgid ""
 "cannot open 'pdf' file argument '%s'\n"
@@ -494,32 +514,32 @@ msgstr ""
 "无法打开'pdf'文本参数'%s'\n"
 "  请关闭PDF装置"
 
-#: devPS.c:7666 devPS.c:8028 devPS.c:8075
+#: devPS.c:7673 devPS.c:8035 devPS.c:8082
 msgid "failed to find or load PDF font"
 msgstr "没有能够找到或载入PDF字体"
 
-#: devPS.c:7850 devPS.c:7983
+#: devPS.c:7857 devPS.c:7990
 msgid "failed to find or load PDF CID font"
 msgstr "没有能够找到或载入PDF CID字体"
 
-#: devPS.c:8214 devPS.c:8218 devPS.c:8378 devPS.c:8382
+#: devPS.c:8221 devPS.c:8225 devPS.c:8386 devPS.c:8390
 #, c-format
 msgid "invalid 'family' parameter in %s"
 msgstr "%s里的'system'参数不对"
 
-#: devPS.c:8236 devPS.c:8394
+#: devPS.c:8243 devPS.c:8402
 #, c-format
 msgid "invalid 'fonts' parameter in %s"
 msgstr "%s里的'fonts'参数不对"
 
-#: devPS.c:8242 devPS.c:8404 devPS.c:8407 devWindows.c:3648 devWindows.c:3652
-#: devWindows.c:3660 devWindows.c:3671 devWindows.c:3677 devWindows.c:3684
-#: devWindows.c:3691 devWindows.c:3695
+#: devPS.c:8249 devPS.c:8412 devPS.c:8415 devWindows.c:3646 devWindows.c:3650
+#: devWindows.c:3658 devWindows.c:3669 devWindows.c:3675 devWindows.c:3682
+#: devWindows.c:3689 devWindows.c:3693
 #, c-format
 msgid "invalid value of '%s'"
 msgstr "'%s'的值不对"
 
-#: devPS.c:8255 devPS.c:8322 devPS.c:8421 devPicTeX.c:740 devWindows.c:3732
+#: devPS.c:8262 devPS.c:8329 devPS.c:8429 devPicTeX.c:740 devWindows.c:3734
 #, c-format
 msgid "unable to start %s() device"
 msgstr "无法启动%s()装置"
@@ -555,143 +575,139 @@ msgid ""
 "unable to create quartz() device target, given type may not be supported"
 msgstr "无法建立quartz()装置,可能不支持所提供的种类"
 
-#: devQuartz.c:1606
+#: devQuartz.c:1609
 msgid "Quartz device is not available on this platform"
 msgstr "这个平台上没有石英装置"
 
-#: devWindows.c:341 devWindows.c:387 devWindows.c:458
+#: devWindows.c:358 devWindows.c:404 devWindows.c:475
 msgid "Not enough memory to copy graphics window"
 msgstr "内存不够,无法拷贝图形窗"
 
-#: devWindows.c:346 devWindows.c:392 devWindows.c:463
+#: devWindows.c:363 devWindows.c:409 devWindows.c:480
 msgid "No device available to copy graphics window"
 msgstr "没有装置来拷贝图形窗"
 
-#: devWindows.c:396 devWindows.c:467
+#: devWindows.c:413 devWindows.c:484
 #, c-format
 msgid "'%%' is not allowed in file name"
 msgstr "文件名字中不能有'%%'"
 
-#: devWindows.c:604
+#: devWindows.c:621
 msgid "invalid font specification"
 msgstr "字体设置出错"
 
-#: devWindows.c:643
+#: devWindows.c:660
 msgid "font family not found in Windows font database"
 msgstr "Windows字体数据库里没有这样的字体系列"
 
-#: devWindows.c:1074
+#: devWindows.c:1091
 msgid "plot history seems corrupted"
 msgstr "绘图历史好象坏了"
 
-#: devWindows.c:1081
+#: devWindows.c:1098
 msgid "no plot history!"
 msgstr "没有绘图历史!"
 
-#: devWindows.c:1798
+#: devWindows.c:1815
 #, c-format
 msgid "filename too long in %s() call"
 msgstr "%s()調用里的文本名字太长"
 
-#: devWindows.c:1807 devWindows.c:1846 devWindows.c:1880
+#: devWindows.c:1820 devWindows.c:1855 devWindows.c:1885
 #, c-format
 msgid "'width=%d, height=%d' are unlikely values in pixels"
 msgstr "'width=%d, height=%d'这样的像素值很可能不对"
 
-#: devWindows.c:1815 devWindows.c:1820 devWindows.c:1849 devWindows.c:1854
-#: devWindows.c:1883 devWindows.c:1888
+#: devWindows.c:1828 devWindows.c:1833 devWindows.c:1858 devWindows.c:1863
+#: devWindows.c:1888 devWindows.c:1893
 msgid "unable to allocate bitmap"
 msgstr "无法分配bitmap"
 
-#: devWindows.c:1826 devWindows.c:1860 devWindows.c:2184
+#: devWindows.c:1839 devWindows.c:1869 devWindows.c:2189
 #, c-format
 msgid "unable to open file '%s' for writing"
 msgstr "无法打开'%s'文本写入"
 
-#: devWindows.c:1843
+#: devWindows.c:1852
 msgid "filename too long in jpeg() call"
 msgstr "jpeg()調用中的文本名字太长"
 
-#: devWindows.c:1877
+#: devWindows.c:1882
 msgid "filename too long in tiff() call"
 msgstr "tiff()調用里的文本名字太长"
 
-#: devWindows.c:1909
+#: devWindows.c:1914
 msgid "filename too long in win.metafile() call"
 msgstr "win.metafile()調用里的文本名字太长"
 
-#: devWindows.c:1919
+#: devWindows.c:1924
 #, c-format
 msgid "unable to open metafile '%s' for writing"
 msgstr "无法打开元文本'%s'写入"
 
-#: devWindows.c:1921
+#: devWindows.c:1926
 msgid "unable to open clipboard to write metafile"
 msgstr "无法打开剪輯板来写入元文本"
 
-#: devWindows.c:2132
+#: devWindows.c:2137
 msgid "Insufficient memory for resize. Killing device"
 msgstr "内存不够,无法重新修改大小. 关闭装置"
 
-#: devWindows.c:2140
+#: devWindows.c:2145
 msgid "Insufficient memory for resize. Disabling alpha blending"
 msgstr "内存不够,无法重新修改大小. 关闭alpha混合"
 
-#: devWindows.c:2169
+#: devWindows.c:2174
 msgid "a clipboard metafile can store only one figure."
 msgstr "剪輯板元文本只能保存一个图片。"
 
-#: devWindows.c:2175
+#: devWindows.c:2180
 #, c-format
 msgid "metafile '%s' could not be created"
 msgstr "无法建立元文本'%s'"
 
-#: devWindows.c:3112 devWindows.c:3756
+#: devWindows.c:3117 devWindows.c:3758
 msgid "R Graphics"
 msgstr "R Graphics"
 
-#: devWindows.c:3126
+#: devWindows.c:3131
 msgid "attempt to use the locator after dev.hold()"
 msgstr "调用dev.hold()后不能再用定位器"
 
-#: devWindows.c:3392
+#: devWindows.c:3397
 msgid "option 'windowsTimeouts' should be integer"
 msgstr "'windowsTimeouts'选择项必需是整数"
 
-#: devWindows.c:3413
+#: devWindows.c:3418
 msgid "invalid device number in 'savePlot'"
 msgstr "'savePlot'里的装置数目出了错"
 
-#: devWindows.c:3415
+#: devWindows.c:3420
 msgid "invalid device in 'savePlot'"
 msgstr "'savePlot'装置出错"
 
-#: devWindows.c:3418
+#: devWindows.c:3423
 msgid "invalid filename argument in 'savePlot'"
 msgstr "'savePlot'文本名字参数不对"
 
-#: devWindows.c:3423
+#: devWindows.c:3428
 msgid "invalid type argument in 'savePlot'"
 msgstr "'savePlot'类别参数不对"
 
-#: devWindows.c:3450
+#: devWindows.c:3455
 msgid "unknown type in savePlot"
 msgstr "savePlot里没有类别"
 
-#: devWindows.c:3495 devWindows.c:3528 devWindows.c:3557 devWindows.c:3589
-#: devWindows.c:3614
+#: devWindows.c:3500 devWindows.c:3532 devWindows.c:3560 devWindows.c:3591
+#: devWindows.c:3612
 msgid "processing of the plot ran out of memory"
 msgstr "处理图象时内存用完了"
 
-#: devWindows.c:3574
+#: devWindows.c:3576
 msgid "Impossible to open "
 msgstr "无法打开"
 
-#: devWindows.c:3601
-msgid "Impossible to load Rbitmap.dll"
-msgstr "无法载入Rbitmap.dll"
-
-#: devWindows.c:3643
+#: devWindows.c:3641
 msgid "invalid 'width' or 'height'"
 msgstr "'width'或'height'的值不对"
 
@@ -712,11 +728,14 @@ msgstr " QuartzBitmap_Output - 打不开'%s'文件"
 msgid "not a supported scheme, no image data written"
 msgstr "不支持这个规划,因此没有写任何图象数据"
 
-#: stubs.c:99
+#: stubs.c:104
 #, c-format
 msgid "invalid '%s' argument"
 msgstr "'%s'参数不对"
 
+#~ msgid "Impossible to load Rbitmap.dll"
+#~ msgstr "无法载入Rbitmap.dll"
+
 #~ msgid "Invalid line end"
 #~ msgstr "行尾出错"
 
diff --git a/src/library/grDevices/src/Makefile.in b/src/library/grDevices/src/Makefile.in
index 56b551a..d7b5dc0 100644
--- a/src/library/grDevices/src/Makefile.in
+++ b/src/library/grDevices/src/Makefile.in
@@ -23,14 +23,11 @@ OBJECTS = $(SOURCES_C:.c=.o) $(SOURCES_M:.m=.o)
 
 SHLIB = $(pkg)@SHLIB_EXT@
 
-ZLIB_CPPFLAGS = @BUILD_ZLIB_TRUE@ -I$(top_srcdir)/src/extra/zlib
 # need Defn.h etc, and config.h
-PKG_CPPFLAGS =-I../../../include -I$(top_srcdir)/src/include -DHAVE_CONFIG_H $(ZLIB_CPPFLAGS)
+PKG_CPPFLAGS =-I../../../include -I$(top_srcdir)/src/include -DHAVE_CONFIG_H
 
- at BUILD_AQUA_TRUE@AQUA_LIBS=-framework AppKit
- at BUILD_ZLIB_TRUE@R_ZLIBS=$(top_builddir)/src/extra/zlib/libz.a
- at BUILD_ZLIB_FALSE@R_ZLIBS=-lz
-PKG_LIBS = $(AQUA_LIBS) $(R_ZLIBS)
+ at BUILD_AQUA_TRUE@AQUA_LIBS = -framework AppKit
+PKG_LIBS = $(AQUA_LIBS) -lz
 
 all: Makedeps
 	@$(MAKE) shlib @BUILD_DEVCAIRO_TRUE@ cairodevice
diff --git a/src/library/grDevices/src/Makefile.win b/src/library/grDevices/src/Makefile.win
index 18e369b..811dbe5 100644
--- a/src/library/grDevices/src/Makefile.win
+++ b/src/library/grDevices/src/Makefile.win
@@ -12,7 +12,7 @@ subdir = src/library/$(pkg)/src
 R_HOME = $(top_builddir)
 
 SOURCES_C = axis_scales.c chull.c devices.c init.c stubs.c colors.c \
-   devPicTeX.c devPS.c devWindows.c
+   devPicTeX.c devPS.c devWindows.c winbitmap.c
 SOURCES_F =
 DEPENDS = $(SOURCES_C:.c=.d)
 OBJECTS = $(SOURCES_C:.c=.o) $(SOURCES_F:.f=.o) ../../../gnuwin32/dllversion.o
@@ -21,18 +21,22 @@ SHLIB = $(pkg).dll
 RESFLAGS = -I $(R_HOME)/include
 
 ## need config.h
-PKG_CPPFLAGS=-I$(R_HOME)/src/include -DHAVE_CONFIG_H
+PKG_CPPFLAGS = -I$(R_HOME)/src/include -DHAVE_CONFIG_H
 ## devPS needs zlib.h and run.h
-devPS-CPPFLAGS=-I$(R_HOME)/src/extra/zlib -I$(R_HOME)/src/gnuwin32
+devPS-CPPFLAGS = -I"$(EXT_LIBS)" -I$(R_HOME)/src/gnuwin32
+
 ## devWindows needs opt.h, console.h, rui.h and graphapp headers
 ifeq "$(WIN)" "64"
 arch_DEFS = -DR_ARCH='"x64"'
 else
 arch_DEFS = -DR_ARCH='"i386"'
 endif
-devWindows-CPPFLAGS=-I$(R_HOME)/src/gnuwin32 -I$(R_HOME)/src/extra $(arch_DEFS)
+devWindows-CPPFLAGS = -I$(R_HOME)/src/gnuwin32 -I$(R_HOME)/src/extra $(arch_DEFS)
+
+winbitmap-CPPFLAGS = -DHAVE_PNG -DHAVE_JPEG -DHAVE_TIFF -I"$(EXT_LIBS)"
+
+PKG_LIBS = -L"$(EXT_LIBS)"/lib$(R_ARCH) -lRgraphapp -lpng -ltiff -ljpeg -lz
 
-PKG_LIBS=-lRgraphapp -lRzlib
 
 all: makeMakedeps shlib
 
diff --git a/src/library/grDevices/src/axis_scales.c b/src/library/grDevices/src/axis_scales.c
index c5ab8c4..40d648b 100644
--- a/src/library/grDevices/src/axis_scales.c
+++ b/src/library/grDevices/src/axis_scales.c
@@ -14,7 +14,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  */
 
 #ifdef HAVE_CONFIG_H
@@ -32,13 +32,15 @@ SEXP R_CreateAtVector(SEXP axp, SEXP usr, SEXP nint, SEXP is_log)
     int nint_v = asInteger(nint);
     Rboolean logflag = asLogical(is_log);
 
-    axp = coerceVector(axp, REALSXP);
-    usr = coerceVector(usr, REALSXP);
+    PROTECT(axp = coerceVector(axp, REALSXP));
+    PROTECT(usr = coerceVector(usr, REALSXP));
     if(LENGTH(axp) != 3) error(_("'%s' must be numeric of length %d"), "axp", 3);
     if(LENGTH(usr) != 2) error(_("'%s' must be numeric of length %d"), "usr", 2);
 
-    return CreateAtVector(REAL(axp), REAL(usr), nint_v, logflag);
+    SEXP res = CreateAtVector(REAL(axp), REAL(usr), nint_v, logflag);
     // -> ../../../main/plot.c
+    UNPROTECT(2);
+    return res;
 }
 
 SEXP R_GAxisPars(SEXP usr, SEXP is_log, SEXP nintLog)
diff --git a/src/library/grDevices/src/cairo/Makefile.in b/src/library/grDevices/src/cairo/Makefile.in
index df45a79..ec23eef 100644
--- a/src/library/grDevices/src/cairo/Makefile.in
+++ b/src/library/grDevices/src/cairo/Makefile.in
@@ -24,8 +24,9 @@ DEPENDS = $(SOURCES:.c=.d)
 OBJECTS = $(SOURCES:.c=.o) $(top_builddir)/src/modules/X11/rbitmap.o
 
 cairo_la = cairo$(SHLIB_EXT)
+## This order has to be consistent with the other use of rbitmap.o
 ## AIX needs LIBM
-cairo_la_LIBADD = @CAIRO_LIBS@ @BITMAP_LIBS@ $(LIBR) $(LIBM) @DYLIB_UNDEFINED_ALLOWED_FALSE@ $(LIBINTL)
+cairo_la_LIBADD = @BITMAP_LIBS@ @CAIRO_LIBS@ $(LIBR) $(LIBM) @DYLIB_UNDEFINED_ALLOWED_FALSE@ $(LIBINTL)
 
 all: Makedeps
 	@$(MAKE) R
diff --git a/src/library/grDevices/src/cairo/Makefile.win b/src/library/grDevices/src/cairo/Makefile.win
index e5de328..b302550 100644
--- a/src/library/grDevices/src/cairo/Makefile.win
+++ b/src/library/grDevices/src/cairo/Makefile.win
@@ -16,11 +16,11 @@ arch_DEFS = -DR_ARCH='"i386"'
 R_ARCH = /i386
 endif
 
-PKG_CPPFLAGS=-I$(R_HOME)/src/include -I. -I.. -DHAVE_CONFIG_H  $(arch_DEFS)
-PKG_CPPFLAGS+= -I"$(CAIRO_HOME)/win$(WIN)"
+PKG_CPPFLAGS = -I$(R_HOME)/src/include -I. -I.. -DHAVE_CONFIG_H \
+  $(arch_DEFS) -I"$(CAIRO_HOME)/win$(WIN)"
 
-PKG_LIBS=-L"$(CAIRO_HOME)/win$(WIN)" -lcairo -lpixman-1 -lpng -lz \
-  -lgdi32 -lmsimg32
+PKG_LIBS = -L"$(CAIRO_HOME)/win$(WIN)" -lcairo -lpixman-1 -lpng -lz \
+  -lgdi32 -lmsimg32 -L.. -lgrDevices
 
 SOURCES = cairoBM.c
 DEPENDS = $(SOURCES:.c=.d)
diff --git a/src/library/grDevices/src/cairo/cairoBM.c b/src/library/grDevices/src/cairo/cairoBM.c
index 27164eb..f93e54f 100644
--- a/src/library/grDevices/src/cairo/cairoBM.c
+++ b/src/library/grDevices/src/cairo/cairoBM.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--2014  The R Core Team
+ *  Copyright (C) 1997--2015  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
@@ -15,7 +15,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  */
 
 #ifdef HAVE_CONFIG_H
@@ -30,6 +30,7 @@
     cairo_pdf_surface_create (1.2)
     cairo_ps_surface_create  (1.2)
     cairo_ps_surface_set_eps  (1.6)
+    cairo_surface_set_fallback_resolution (1.2)
     cairo_surface_write_to_png
     cairo_svg_surface_create (1.2)
     cairo_svg_surface_restrict_to_version (1.2)
@@ -87,7 +88,7 @@ static void cbm_Size(double *left, double *right,
 #include "cairoFns.c"
 
 #ifdef Win32
-# include "rbitmap.h"
+# include "winbitmap.h"
 #else
 # include "bitmap.h"
 #endif
@@ -95,42 +96,104 @@ static void cbm_Size(double *left, double *right,
 static Rboolean
 BM_Open(pDevDesc dd, pX11Desc xd, int width, int height)
 {
+    char buf[PATH_MAX];
     cairo_status_t res;
     if (xd->type == PNG || xd->type == JPEG ||
-	xd->type == TIFF || xd->type == BMP) {
-#ifdef Win32
-	if (!Load_Rbitmap_Dll()) {
-	    warning("Unable to load Rbitmap.dll");
-	    return FALSE;
-	}
-#endif
+	xd->type == TIFF || xd->type == BMP ||
+        xd->type == PNGdirect) {
 	xd->cs = cairo_image_surface_create(CAIRO_FORMAT_ARGB32,
 					    xd->windowWidth,
 					    xd->windowHeight);
-    } else if (xd->type == PNGdirect) {
-	xd->cs = cairo_image_surface_create(CAIRO_FORMAT_ARGB32,
-					    xd->windowWidth,
-					    xd->windowHeight);
-    } else if(xd->type == SVG || xd->type == PDF || xd->type == PS) {
-	/* leave creation to BM_Newpage */
-	return TRUE;
-    } else
-	error(_("unimplemented cairo-based device"));
-
-    res = cairo_surface_status(xd->cs);
-    if (res != CAIRO_STATUS_SUCCESS) {
-	warning("cairo error '%s'", cairo_status_to_string(res));
-	return FALSE;
+        res = cairo_surface_status(xd->cs);
+        if (res != CAIRO_STATUS_SUCCESS) {
+            warning("cairo error '%s'", cairo_status_to_string(res));
+            return FALSE;
+        }
+        xd->cc = cairo_create(xd->cs);
+        res = cairo_status(xd->cc);
+        if (res != CAIRO_STATUS_SUCCESS) {
+            warning("cairo error '%s'", cairo_status_to_string(res));
+            return FALSE;
+        }
+        cairo_set_operator(xd->cc, CAIRO_OPERATOR_OVER);
+        cairo_reset_clip(xd->cc);
+        cairo_set_antialias(xd->cc, xd->antialias);
     }
-    xd->cc = cairo_create(xd->cs);
-    res = cairo_status(xd->cc);
-    if (res != CAIRO_STATUS_SUCCESS) {
-	warning("cairo error '%s'", cairo_status_to_string(res));
-	return FALSE;
+#ifdef HAVE_CAIRO_SVG
+    else if(xd->type == SVG) {
+        snprintf(buf, PATH_MAX, xd->filename, xd->npages + 1);
+        xd->cs = cairo_svg_surface_create(R_ExpandFileName(buf),
+                                          (double)xd->windowWidth,
+                                          (double)xd->windowHeight);
+        res = cairo_surface_status(xd->cs);
+        if (res != CAIRO_STATUS_SUCCESS) {
+            xd->cs = NULL;
+            warning("cairo error '%s'", cairo_status_to_string(res));
+            return FALSE;
+        }
+        if(xd->onefile)
+            cairo_svg_surface_restrict_to_version(xd->cs, CAIRO_SVG_VERSION_1_2);
+        xd->cc = cairo_create(xd->cs);
+        res = cairo_status(xd->cc);
+        if (res != CAIRO_STATUS_SUCCESS) {
+            warning("cairo error '%s'", cairo_status_to_string(res));
+            return FALSE;
+        }
+        cairo_set_antialias(xd->cc, xd->antialias);
     }
-    cairo_set_operator(xd->cc, CAIRO_OPERATOR_OVER);
-    cairo_reset_clip(xd->cc);
-    cairo_set_antialias(xd->cc, xd->antialias);
+#endif
+#ifdef HAVE_CAIRO_PDF
+    else if(xd->type == PDF) {
+        snprintf(buf, PATH_MAX, xd->filename, xd->npages + 1);
+        xd->cs = cairo_pdf_surface_create(R_ExpandFileName(buf),
+                                          (double)xd->windowWidth,
+                                          (double)xd->windowHeight);
+        res = cairo_surface_status(xd->cs);
+        if (res != CAIRO_STATUS_SUCCESS) {
+            warning("cairo error '%s'", cairo_status_to_string(res));
+            return FALSE;
+        }
+        cairo_surface_set_fallback_resolution(xd->cs, xd->fallback_dpi,
+                                              xd->fallback_dpi);
+        xd->cc = cairo_create(xd->cs);
+        res = cairo_status(xd->cc);
+        if (res != CAIRO_STATUS_SUCCESS) {
+            warning("cairo error '%s'", cairo_status_to_string(res));
+            return FALSE;
+        }
+        cairo_set_antialias(xd->cc, xd->antialias);
+    }
+#endif
+#ifdef HAVE_CAIRO_PS
+    else if(xd->type == PS) {
+        snprintf(buf, PATH_MAX, xd->filename, xd->npages + 1);
+        xd->cs = cairo_ps_surface_create(R_ExpandFileName(buf),
+                                         (double)xd->windowWidth,
+                                         (double)xd->windowHeight);
+        res = cairo_surface_status(xd->cs);
+        if (res != CAIRO_STATUS_SUCCESS) {
+            warning("cairo error '%s'", cairo_status_to_string(res));
+            return FALSE;
+        }
+// We already require >= 1.2
+#if CAIRO_VERSION_MAJOR > 2 || CAIRO_VERSION_MINOR >= 6
+        if(!xd->onefile)
+            cairo_ps_surface_set_eps(xd->cs, TRUE);
+#endif
+        cairo_surface_set_fallback_resolution(xd->cs, xd->fallback_dpi,
+                                              xd->fallback_dpi);
+        xd->cc = cairo_create(xd->cs);
+        res = cairo_status(xd->cc);
+        if (res != CAIRO_STATUS_SUCCESS) {
+            warning("cairo error '%s'", cairo_status_to_string(res));
+            return FALSE;
+        }
+        cairo_set_antialias(xd->cc, xd->antialias);
+    }
+#endif
+    else
+	error(_("unimplemented cairo-based device"));
+
     return TRUE;
 }
 
@@ -209,27 +272,25 @@ static void BM_NewPage(const pGEcontext gc, pDevDesc dd)
 	    if(!xd->onefile) {
 		cairo_surface_destroy(xd->cs);
 		cairo_destroy(xd->cc);
-	    }
-	}
-	if(xd->npages == 1 || !xd->onefile) {
-	    snprintf(buf, PATH_MAX, xd->filename, xd->npages);
-	    xd->cs = cairo_svg_surface_create(R_ExpandFileName(buf),
-					      (double)xd->windowWidth,
-					      (double)xd->windowHeight);
-	    res = cairo_surface_status(xd->cs);
-	    if (res != CAIRO_STATUS_SUCCESS) {
-		xd->cs = NULL;
-		error("cairo error '%s'", cairo_status_to_string(res));
-	    }
-	    if(xd->onefile)
-		cairo_svg_surface_restrict_to_version(xd->cs, CAIRO_SVG_VERSION_1_2);
-	    xd->cc = cairo_create(xd->cs);
-	    res = cairo_status(xd->cc);
-	    if (res != CAIRO_STATUS_SUCCESS) {
-		error("cairo error '%s'", cairo_status_to_string(res));
-	    }
-	    cairo_set_antialias(xd->cc, xd->antialias);
-	}
+                snprintf(buf, PATH_MAX, xd->filename, xd->npages);
+                xd->cs = cairo_svg_surface_create(R_ExpandFileName(buf),
+                                                  (double)xd->windowWidth,
+                                                  (double)xd->windowHeight);
+                res = cairo_surface_status(xd->cs);
+                if (res != CAIRO_STATUS_SUCCESS) {
+                    xd->cs = NULL;
+                    error("cairo error '%s'", cairo_status_to_string(res));
+                }
+                if(xd->onefile)
+                    cairo_svg_surface_restrict_to_version(xd->cs, CAIRO_SVG_VERSION_1_2);
+                xd->cc = cairo_create(xd->cs);
+                res = cairo_status(xd->cc);
+                if (res != CAIRO_STATUS_SUCCESS) {
+                    error("cairo error '%s'", cairo_status_to_string(res));
+                }
+                cairo_set_antialias(xd->cc, xd->antialias);
+            }
+        }
     }
 #endif
 #ifdef HAVE_CAIRO_PDF
@@ -239,54 +300,56 @@ static void BM_NewPage(const pGEcontext gc, pDevDesc dd)
 	    if(!xd->onefile) {
 		cairo_surface_destroy(xd->cs);
 		cairo_destroy(xd->cc);
-	    }
-	}
-	if(xd->npages == 1 || !xd->onefile) {
-	    snprintf(buf, PATH_MAX, xd->filename, xd->npages);
-	    xd->cs = cairo_pdf_surface_create(R_ExpandFileName(buf),
-					      (double)xd->windowWidth,
-					      (double)xd->windowHeight);
-	    res = cairo_surface_status(xd->cs);
-	    if (res != CAIRO_STATUS_SUCCESS) {
-		error("cairo error '%s'", cairo_status_to_string(res));
-	    }
-	    xd->cc = cairo_create(xd->cs);
-	    res = cairo_status(xd->cc);
-	    if (res != CAIRO_STATUS_SUCCESS) {
-		error("cairo error '%s'", cairo_status_to_string(res));
-	    }
-	    cairo_set_antialias(xd->cc, xd->antialias);
+                snprintf(buf, PATH_MAX, xd->filename, xd->npages);
+                xd->cs = cairo_pdf_surface_create(R_ExpandFileName(buf),
+                                                  (double)xd->windowWidth,
+                                                  (double)xd->windowHeight);
+                res = cairo_surface_status(xd->cs);
+                if (res != CAIRO_STATUS_SUCCESS) {
+                    error("cairo error '%s'", cairo_status_to_string(res));
+                }
+                cairo_surface_set_fallback_resolution(xd->cs, xd->fallback_dpi,
+                                                      xd->fallback_dpi);
+                xd->cc = cairo_create(xd->cs);
+                res = cairo_status(xd->cc);
+                if (res != CAIRO_STATUS_SUCCESS) {
+                    error("cairo error '%s'", cairo_status_to_string(res));
+                }
+                cairo_set_antialias(xd->cc, xd->antialias);
+            }
 	}
     }
 #endif
 #ifdef HAVE_CAIRO_PS
     else if(xd->type == PS) {
-	if (xd->npages > 1 && !xd->onefile) {
+	if (xd->npages > 1) {
 	    cairo_show_page(xd->cc);
-	    cairo_surface_destroy(xd->cs);
-	    cairo_destroy(xd->cc);
-	}
-	if(xd->npages == 1 || !xd->onefile) {
-	    snprintf(buf, PATH_MAX, xd->filename, xd->npages);
-	    xd->cs = cairo_ps_surface_create(R_ExpandFileName(buf),
-					     (double)xd->windowWidth,
-					     (double)xd->windowHeight);
-	    res = cairo_surface_status(xd->cs);
-	    if (res != CAIRO_STATUS_SUCCESS) {
-		error("cairo error '%s'", cairo_status_to_string(res));
-	    }
+	    if(!xd->onefile) {
+                cairo_surface_destroy(xd->cs);
+                cairo_destroy(xd->cc);
+                snprintf(buf, PATH_MAX, xd->filename, xd->npages);
+                xd->cs = cairo_ps_surface_create(R_ExpandFileName(buf),
+                                                 (double)xd->windowWidth,
+                                                 (double)xd->windowHeight);
+                res = cairo_surface_status(xd->cs);
+                if (res != CAIRO_STATUS_SUCCESS) {
+                    error("cairo error '%s'", cairo_status_to_string(res));
+                }
 // We already require >= 1.2
 #if CAIRO_VERSION_MAJOR > 2 || CAIRO_VERSION_MINOR >= 6
-	    if(!xd->onefile)
-		cairo_ps_surface_set_eps(xd->cs, TRUE);
+                if(!xd->onefile)
+                    cairo_ps_surface_set_eps(xd->cs, TRUE);
 #endif
-	    xd->cc = cairo_create(xd->cs);
-	    res = cairo_status(xd->cc);
-	    if (res != CAIRO_STATUS_SUCCESS) {
-		error("cairo error '%s'", cairo_status_to_string(res));
-	    }
-	    cairo_set_antialias(xd->cc, xd->antialias);
-	}
+                cairo_surface_set_fallback_resolution(xd->cs, xd->fallback_dpi,
+                                                      xd->fallback_dpi);
+                xd->cc = cairo_create(xd->cs);
+                res = cairo_status(xd->cc);
+                if (res != CAIRO_STATUS_SUCCESS) {
+                    error("cairo error '%s'", cairo_status_to_string(res));
+                }
+                cairo_set_antialias(xd->cc, xd->antialias);
+            }
+        }
     }
 #endif
     else
@@ -327,7 +390,8 @@ static void BM_Close(pDevDesc dd)
 static Rboolean
 BMDeviceDriver(pDevDesc dd, int kind, const char *filename,
 	       int quality, int width, int height, int ps,
-	       int bg, int res, int antialias, const char *family)
+	       int bg, int res, int antialias, const char *family,
+	       double dpi)
 {
     pX11Desc xd;
     int res0 = (res > 0) ? res : 72;
@@ -349,6 +413,7 @@ BMDeviceDriver(pDevDesc dd, int kind, const char *filename,
     xd->pointsize = dps;
     xd->bg = bg;
     xd->res_dpi = res;
+    xd->fallback_dpi = dpi;
     switch(antialias){
     case 1: xd->antialias = CAIRO_ANTIALIAS_DEFAULT; break;
     case 2: xd->antialias = CAIRO_ANTIALIAS_NONE; break;
@@ -441,6 +506,7 @@ BMDeviceDriver(pDevDesc dd, int kind, const char *filename,
     dd->startfill = xd->fill;
     dd->startlty = LTY_SOLID;
     dd->startfont = 1;
+    dd->startgamma = 1;
     dd->displayListOn = FALSE;
     dd->deviceSpecific = (void *) xd;
 
@@ -473,6 +539,7 @@ SEXP in_Cairo(SEXP args)
     SEXP sc;
     const char *filename, *family;
     int type, quality, width, height, pointsize, bgcolor, res, antialias;
+    double dpi;
     const void *vmax = vmaxget();
 
     args = CDR(args); /* skip entry point name */
@@ -514,6 +581,10 @@ SEXP in_Cairo(SEXP args)
     if (!isString(CAR(args)) || LENGTH(CAR(args)) < 1)
 	error(_("invalid '%s' argument"), "family");
     family = translateChar(STRING_ELT(CAR(args), 0));
+    args = CDR(args);
+    dpi = asReal(CAR(args));
+    if(ISNAN(dpi) || dpi <= 0)
+	error(_("invalid '%s' argument"), "dpi");
 
     R_GE_checkVersionOrDie(R_GE_version);
     R_CheckDeviceAvailable();
@@ -523,14 +594,22 @@ SEXP in_Cairo(SEXP args)
 	if (!(dev = (pDevDesc) calloc(1, sizeof(DevDesc)))) return 0;
 	if (!BMDeviceDriver(dev, devtable[type].gtype, filename, quality,
 			    width, height, pointsize,
-			    bgcolor, res, antialias, family)) {
+			    bgcolor, res, antialias, family, dpi)) {
 	    free(dev);
 	    error(_("unable to start device '%s'"), devtable[type].name);
 	}
 	gdd = GEcreateDevDesc(dev);
-	GEaddDevice2(gdd, devtable[type].name);
+	GEaddDevice2f(gdd, devtable[type].name, filename);
     } END_SUSPEND_INTERRUPTS;
 
     vmaxset(vmax);
     return R_NilValue;
 }
+
+SEXP in_CairoVersion(void)
+{
+    SEXP ans = PROTECT(allocVector(STRSXP, 1));
+    SET_STRING_ELT(ans, 0, mkChar(cairo_version_string()));
+    UNPROTECT(1);
+    return ans;
+}
diff --git a/src/library/grDevices/src/cairo/cairoBM.h b/src/library/grDevices/src/cairo/cairoBM.h
index ca36f25..bdb1b09 100644
--- a/src/library/grDevices/src/cairo/cairoBM.h
+++ b/src/library/grDevices/src/cairo/cairoBM.h
@@ -1,6 +1,6 @@
 /*
  *  R : A Computer Language for Statistical Data Analysis
- *  Copyright (C) 1997--2011  R Core Team
+ *  Copyright (C) 1997--2015  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
@@ -14,7 +14,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  */
 
 #ifndef R_DEV_CAIRO_H
@@ -86,6 +86,7 @@ typedef struct {
     int quality;			/* JPEG quality/TIFF compression */
 
     int res_dpi;			/* used for png/jpeg */
+    double fallback_dpi;		/* used for ps/pdf */
     char title[101];
     Rboolean onefile;
 
diff --git a/src/library/grDevices/src/cairo/cairoFns.c b/src/library/grDevices/src/cairo/cairoFns.c
index 4e503e7..308ee98 100644
--- a/src/library/grDevices/src/cairo/cairoFns.c
+++ b/src/library/grDevices/src/cairo/cairoFns.c
@@ -14,7 +14,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  */
 
 
@@ -68,7 +68,7 @@
     cairo_show_text
     cairo_text_extents
 
-    cairo_ft_font_face_create_for_ft_face [OS X]
+    cairo_ft_font_face_create_for_ft_face [macOS]
 
     g_object_unref  (glib)
 
@@ -718,7 +718,7 @@ static cairo_font_face_t *FC_getFont(const char *family, int style)
 		    FcFontSetDestroy (fs);
 
 #ifdef __APPLE__
-		    /* FreeType is broken on OS X in that face index
+		    /* FreeType is broken on macOS in that face index
 		       is often wrong (unfortunately even for Helvetica!)
 		       - we try to find the best match through enumeration.
 		       And italic and bold are swapped */
diff --git a/src/library/grDevices/src/colors.c b/src/library/grDevices/src/colors.c
index c871fa2..a500f49 100644
--- a/src/library/grDevices/src/colors.c
+++ b/src/library/grDevices/src/colors.c
@@ -15,7 +15,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  */
 
 /* This should be regarded as part of the graphics engine */
@@ -109,6 +109,8 @@ static void hsv2rgb(double h, double s, double v,
     double f, p, q, t;
     int i;
 
+    if (!R_FINITE(h) || !R_FINITE(s) || !R_FINITE(v)) 
+	error(_("inputs must be finite")); 
     f = modf(h * 6.0, &t);
     i = ((int) t) % 6;
 
@@ -204,7 +206,10 @@ SEXP hsv(SEXP h, SEXP s, SEXP v, SEXP a)
     if (max < nv) max = nv;
     if (max < na) max = na;
     SEXP c = PROTECT(allocVector(STRSXP, max));
-    if(max == 0) return(c);
+    if(max == 0) {
+        UNPROTECT(5);
+        return(c);
+    }
 
     if(isNull(a)) {
 	for (i = 0; i < max; i++) {
diff --git a/src/library/grDevices/src/devCairo.c b/src/library/grDevices/src/devCairo.c
index 03f3d24..0cf774b 100644
--- a/src/library/grDevices/src/devCairo.c
+++ b/src/library/grDevices/src/devCairo.c
@@ -1,6 +1,6 @@
 /*
  *  R : A Computer Langage for Statistical Data Analysis
- *  Copyright (C) 2011     The R Core Team
+ *  Copyright (C) 2011-2014     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
@@ -14,7 +14,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  */
 
 #ifdef HAVE_CONFIG_H
@@ -28,8 +28,10 @@
 int R_cairoCdynload(int local, int now);
 
 typedef SEXP (*R_cairo)(SEXP args);
+typedef SEXP (*R_cairoVersion_t)(void);
 
 static R_cairo R_devCairo;
+static R_cairoVersion_t R_cairoVersion;
 
 static int Load_Rcairo_Dll(void)
 {
@@ -42,6 +44,7 @@ static int Load_Rcairo_Dll(void)
     if(!res) return initialized;
     R_devCairo = (R_cairo) R_FindSymbol("in_Cairo", "cairo", NULL);
     if (!R_devCairo) error("failed to load cairo DLL");
+    R_cairoVersion = (R_cairoVersion_t) R_FindSymbol("in_CairoVersion", "cairo", NULL);
     initialized = 1;
     return initialized;
 }
@@ -53,3 +56,13 @@ SEXP devCairo(SEXP args)
     else (R_devCairo)(args);
     return R_NilValue;
 }
+
+SEXP cairoVersion(void)
+{
+#ifdef HAVE_WORKING_CAIRO
+    if (Load_Rcairo_Dll() < 0) return mkString("");
+    else return (R_cairoVersion)();
+#else
+    return mkString("");
+#endif
+}
diff --git a/src/library/grDevices/src/devPS.c b/src/library/grDevices/src/devPS.c
index 0729456..9375b44 100644
--- a/src/library/grDevices/src/devPS.c
+++ b/src/library/grDevices/src/devPS.c
@@ -1,7 +1,7 @@
 /*
  *  R : A Computer Language for Statistical Data Analysis
  *  Copyright (C) 1995, 1996  Robert Gentleman and Ross Ihaka
- *  Copyright (C) 1998--2013  The R Core Team
+ *  Copyright (C) 1998--2015  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
@@ -15,7 +15,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  */
 
 
@@ -412,10 +412,10 @@ static int GetNextItem(FILE *fp, char *dest, int c, EncodingInputState *state)
 	/* check for incomplete encoding file */
 	if(!state->p) return 1;
 	while (isspace((int)* state->p)) state->p++;
-	if (state->p == '\0' || *state->p == '%'|| *state->p == '\n') { state->p = NULL; continue; }
+	if (*state->p == '\0' || *state->p == '%'|| *state->p == '\n') { state->p = NULL; continue; }
 	state->p0 = state->p;
 	while (!isspace((int)*state->p)) state->p++;
-	if (state->p != '\0') *state->p++ = '\0';
+	if (*state->p != '\0') *state->p++ = '\0';
 	if(c == 45) strcpy(dest, "/minus"); else strcpy(dest, state->p0);
 	break;
     }
@@ -513,13 +513,15 @@ LoadEncoding(const char *encpath, char *encname,
 	if (!(fp = R_fopen(R_ExpandFileName(buf), "r"))) return 0;
     }
     if (GetNextItem(fp, buf, -1, &state)) return 0; /* encoding name */
-    strcpy(encname, buf+1);
+    strncpy(encname, buf+1, 99); 
+    encname[99] = '\0';
     if (!isPDF) snprintf(enccode, 5000, "/%s [\n", encname);
     else enccode[0] = '\0';
     if (GetNextItem(fp, buf, 0, &state)) { fclose(fp); return 0;} /* [ */
     for(i = 0; i < 256; i++) {
 	if (GetNextItem(fp, buf, i, &state)) { fclose(fp); return 0; }
-	strcpy(encnames[i].cname, buf+1);
+	strncpy(encnames[i].cname, buf+1, 39);
+	encnames[i].cname[39] = '\0';
 	strcat(enccode, " /"); strcat(enccode, encnames[i].cname);
 	if(i%8 == 7) strcat(enccode, "\n");
     }
@@ -704,7 +706,7 @@ pserror:
 }
 
 
-extern int Ri18n_wcwidth(wchar_t c);
+#include <rlocale.h> /* for Ri18n_wcwidth */
 
 
 static double
@@ -1566,7 +1568,8 @@ static SEXP getFontDB(const char *fontdbname) {
     if(TYPEOF(PSenv) == PROMSXP) {
 	PROTECT(PSenv);
 	PSenv = eval(PSenv, graphicsNS);
-	UNPROTECT(1);
+	UNPROTECT(2);
+	PROTECT(PSenv);
     }
     PROTECT(fontdb = findVar(install(fontdbname), PSenv));
     UNPROTECT(3);
@@ -1580,7 +1583,7 @@ static SEXP getFont(const char *family, const char *fontdbname) {
     int i, nfonts;
     SEXP result = R_NilValue;
     int found = 0;
-    SEXP fontdb = getFontDB(fontdbname);
+    SEXP fontdb = PROTECT(getFontDB(fontdbname));
     SEXP fontnames;
     PROTECT(fontnames = getAttrib(fontdb, R_NamesSymbol));
     nfonts = LENGTH(fontdb);
@@ -1594,7 +1597,7 @@ static SEXP getFont(const char *family, const char *fontdbname) {
     if (!found)
 	warning(_("font family '%s' not found in PostScript font database"),
 		family);
-    UNPROTECT(1);
+    UNPROTECT(2);
     return result;
 }
 
@@ -1613,7 +1616,7 @@ fontMetricsFileName(const char *family, int faceIndex,
     int i, nfonts;
     const char *result = NULL;
     int found = 0;
-    SEXP fontdb = getFontDB(fontdbname);
+    SEXP fontdb = PROTECT(getFontDB(fontdbname));
     SEXP fontnames;
     PROTECT(fontnames = getAttrib(fontdb, R_NamesSymbol));
     nfonts = LENGTH(fontdb);
@@ -1629,7 +1632,7 @@ fontMetricsFileName(const char *family, int faceIndex,
     if (!found)
 	warning(_("font family '%s' not found in PostScript font database"),
 		family);
-    UNPROTECT(1);
+    UNPROTECT(2);
     return result;
 }
 
@@ -1687,7 +1690,7 @@ static const char *getFontEncoding(const char *family, const char *fontdbname)
     int i, nfonts;
     const char *result = NULL;
     int found = 0;
-    SEXP fontdb = getFontDB(fontdbname);
+    SEXP fontdb = PROTECT(getFontDB(fontdbname));
     PROTECT(fontnames = getAttrib(fontdb, R_NamesSymbol));
     nfonts = LENGTH(fontdb);
     for (i=0; i<nfonts && !found; i++) {
@@ -1701,7 +1704,7 @@ static const char *getFontEncoding(const char *family, const char *fontdbname)
     if (!found)
 	warning(_("font encoding for family '%s' not found in font database"),
 		family);
-    UNPROTECT(1);
+    UNPROTECT(2);
     return result;
 }
 
@@ -1714,7 +1717,7 @@ static const char *getFontName(const char *family, const char *fontdbname)
     int i, nfonts;
     const char *result = NULL;
     int found = 0;
-    SEXP fontdb = getFontDB(fontdbname);
+    SEXP fontdb = PROTECT(getFontDB(fontdbname));
     PROTECT(fontnames = getAttrib(fontdb, R_NamesSymbol));
     nfonts = LENGTH(fontdb);
     for (i=0; i<nfonts && !found; i++) {
@@ -1728,7 +1731,7 @@ static const char *getFontName(const char *family, const char *fontdbname)
     if (!found)
 	warning(_("font CMap for family '%s' not found in font database"),
 		family);
-    UNPROTECT(1);
+    UNPROTECT(2);
     return result;
 }
 
@@ -1741,7 +1744,7 @@ static const char *getFontCMap(const char *family, const char *fontdbname)
     int i, nfonts;
     const char *result = NULL;
     int found = 0;
-    SEXP fontdb = getFontDB(fontdbname);
+    SEXP fontdb = PROTECT(getFontDB(fontdbname));
     PROTECT(fontnames = getAttrib(fontdb, R_NamesSymbol));
     nfonts = LENGTH(fontdb);
     for (i=0; i<nfonts && !found; i++) {
@@ -1755,7 +1758,7 @@ static const char *getFontCMap(const char *family, const char *fontdbname)
     if (!found)
 	warning(_("font CMap for family '%s' not found in font database"),
 		family);
-    UNPROTECT(1);
+    UNPROTECT(2);
     return result;
 }
 
@@ -1769,7 +1772,7 @@ getCIDFontEncoding(const char *family, const char *fontdbname)
     int i, nfonts;
     const char *result = NULL;
     int found = 0;
-    SEXP fontdb = getFontDB(fontdbname);
+    SEXP fontdb = PROTECT(getFontDB(fontdbname));
     PROTECT(fontnames = getAttrib(fontdb, R_NamesSymbol));
     nfonts = LENGTH(fontdb);
     for (i=0; i<nfonts && !found; i++) {
@@ -1783,7 +1786,7 @@ getCIDFontEncoding(const char *family, const char *fontdbname)
     if (!found)
 	warning(_("font encoding for family '%s' not found in font database"),
 		family);
-    UNPROTECT(1);
+    UNPROTECT(2);
     return result;
 }
 
@@ -1796,7 +1799,7 @@ static const char *getCIDFontPDFResource(const char *family)
     int i, nfonts;
     const char *result = NULL;
     int found = 0;
-    SEXP fontdb = getFontDB(PDFFonts);
+    SEXP fontdb = PROTECT(getFontDB(PDFFonts));
     PROTECT(fontnames = getAttrib(fontdb, R_NamesSymbol));
     nfonts = LENGTH(fontdb);
     for (i=0; i<nfonts && !found; i++) {
@@ -1810,7 +1813,7 @@ static const char *getCIDFontPDFResource(const char *family)
     if (!found)
 	warning(_("font encoding for family '%s' not found in font database"),
 		family);
-    UNPROTECT(1);
+    UNPROTECT(2);
     return result;
 }
 
@@ -1935,6 +1938,7 @@ static cidfontfamily addCIDFont(const char *name, Rboolean isPDF)
 		if (!afmpath) {
 		    freeCIDFontFamily(fontfamily);
 		    fontfamily = NULL;
+		    freeType1Font(font);
 		    break;
 		}
 		fontfamily->symfont = font;
@@ -2013,6 +2017,7 @@ static type1fontfamily addFont(const char *name, Rboolean isPDF,
 		    if (!afmpath) {
 			freeFontFamily(fontfamily);
 			fontfamily = NULL;
+			freeType1Font(font);
 			break;
 		    }
 		    fontfamily->fonts[i] = font;
@@ -2553,6 +2558,7 @@ static void PSFileHeader(FILE *fp,
     if(prolog == R_UnboundValue) {
 	/* if no object is visible, look in the graphics namespace */
 	SEXP graphicsNS = R_FindNamespace(ScalarString(mkChar("grDevices")));
+	PROTECT(graphicsNS);
 	prolog = findVar(install(".ps.prolog"), graphicsNS);
 	/* under lazy loading this will be a promise on first use */
 	if(TYPEOF(prolog) == PROMSXP) {
@@ -2560,6 +2566,7 @@ static void PSFileHeader(FILE *fp,
 	    prolog = eval(prolog, graphicsNS);
 	    UNPROTECT(1);
 	}
+	UNPROTECT(1);
     }
     if(!isString(prolog))
 	error(_("object '.ps.prolog' is not a character vector"));
@@ -2569,6 +2576,7 @@ static void PSFileHeader(FILE *fp,
     fprintf(fp, "%% end   .ps.prolog\n");
     if (streql(pd->colormodel, "srgb+gray") || streql(pd->colormodel, "srgb")) {
 	SEXP graphicsNS = R_FindNamespace(ScalarString(mkChar("grDevices")));
+	PROTECT(graphicsNS);
 	prolog = findVar(install(".ps.prolog.srgb"), graphicsNS);
 	/* under lazy loading this will be a promise on first use */
 	if(TYPEOF(prolog) == PROMSXP) {
@@ -2576,6 +2584,7 @@ static void PSFileHeader(FILE *fp,
 	    prolog = eval(prolog, graphicsNS);
 	    UNPROTECT(1);
 	}
+	UNPROTECT(1);
 	for (i = 0; i < length(prolog); i++)
 	    fprintf(fp, "%s\n", CHAR(STRING_ELT(prolog, i)));
     }
@@ -7212,10 +7221,16 @@ static void PDF_NewPage(const pGEcontext gc,
 	/* assume tmpname is less than PATH_MAX */
 	strcpy(pd->tmpname, tmp);
 	pd->pdffp = fopen(tmp, "w+b");
+	if (! pd->pdffp) {
+            pd->pdffp = pd->mainfp;
+            pd->useCompression = 0;
+            warning(_("Cannot open temporary file '%s' for compression (reason: %s); compression has been turned off for this device"), 
+                    tmp, strerror(errno));
+        }
 	free(tmp);
-	if(! pd->pdffp) error("cannot open file '%s', reason %s", 
-			      tmp, strerror(errno));
-    } else {
+    } 
+    /* May have turned compression off in previous block */
+    if (!pd->useCompression) {
 	fprintf(pd->pdffp, "%d 0 obj\n<<\n/Length %d 0 R\n>>\nstream\n",
 		pd->nobjs, pd->nobjs + 1);
 	pd->startstream = (int) ftell(pd->pdffp);
@@ -8255,7 +8270,7 @@ SEXP PostScript(SEXP args)
 	    error(_("unable to start %s() device"), "postscript");
 	}
 	gdd = GEcreateDevDesc(dev);
-	GEaddDevice2(gdd, "postscript");
+	GEaddDevice2f(gdd, "postscript", file);
     } END_SUSPEND_INTERRUPTS;
     vmaxset(vmax);
     return R_NilValue;
@@ -8322,7 +8337,7 @@ SEXP XFig(SEXP args)
 	    error(_("unable to start %s() device"), "xfig");
 	}
 	gdd = GEcreateDevDesc(dev);
-	GEaddDevice2(gdd, "xfig");
+	GEaddDevice2f(gdd, "xfig", file);
     } END_SUSPEND_INTERRUPTS;
     vmaxset(vmax);
     return R_NilValue;
@@ -8368,8 +8383,9 @@ SEXP PDF(SEXP args)
     args = CDR(args); /* skip entry point name */
     if (isNull(CAR(args)))
         file = NULL;
-    else 
-        file = translateChar(asChar(CAR(args)));  args = CDR(args);
+    else
+        file = translateChar(asChar(CAR(args)));  
+    args = CDR(args);
     paper = CHAR(asChar(CAR(args))); args = CDR(args);
     fam = CAR(args); args = CDR(args);
     if(length(fam) == 1)
@@ -8421,7 +8437,7 @@ SEXP PDF(SEXP args)
 	    error(_("unable to start %s() device"), "pdf");
 	}
 	gdd = GEcreateDevDesc(dev);
-	GEaddDevice2(gdd, "pdf");
+	GEaddDevice2f(gdd, "pdf", file);
     } END_SUSPEND_INTERRUPTS;
     vmaxset(vmax);
     return R_NilValue;
diff --git a/src/library/grDevices/src/devPicTeX.c b/src/library/grDevices/src/devPicTeX.c
index 32c5df4..c7e9ebe 100644
--- a/src/library/grDevices/src/devPicTeX.c
+++ b/src/library/grDevices/src/devPicTeX.c
@@ -16,7 +16,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  */
 
 #ifdef HAVE_CONFIG_H
@@ -740,7 +740,7 @@ SEXP PicTeX(SEXP args)
 	    error(_("unable to start %s() device"), "pictex");
 	}
 	dd = GEcreateDevDesc(dev);
-	GEaddDevice2(dd, "pictex");
+	GEaddDevice2f(dd, "pictex", file);
     } END_SUSPEND_INTERRUPTS;
     vmaxset(vmax);
     return R_NilValue;
diff --git a/src/library/grDevices/src/devQuartz.c b/src/library/grDevices/src/devQuartz.c
index 3f63ae1..52f7aba 100644
--- a/src/library/grDevices/src/devQuartz.c
+++ b/src/library/grDevices/src/devQuartz.c
@@ -14,9 +14,9 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  *
- *  Modular Quartz device for Mac OS X
+ *  Modular Quartz device for macOS
  *
  *  Partially based on code by Byron Ellis
  */
@@ -41,7 +41,7 @@
 
 #define DEVQUARTZ_VERSION 1 /* first public Quartz API version */
 
-#define QBE_NATIVE   1  /* either Cocoa or Carbon depending on the OS X version */
+#define QBE_NATIVE   1  /* either Cocoa or Carbon depending on the macOS version */
 #define QBE_COCOA    2  /* internal Cocoa */
 #define QBE_CARBON   3  /* internal Carbon */
 #define QBE_BITMAP   4  /* bitmap file creating */
@@ -75,7 +75,7 @@ const quartz_module_t quartz_modules[] = {
 
 
 
-/* for compatibility with OS X <10.5 */
+/* for compatibility with macOS <10.5 */
 #ifndef CGFLOAT_DEFINED
 typedef float CGFloat;
 #define CGFLOAT_MIN FLT_MIN
@@ -506,7 +506,7 @@ QuartzFunctions_t *getQuartzAPI() {
     return &qfn;
 }
 
-/* old OS X versions has different names for some of the CGFont stuff */
+/* old macOS versions has different names for some of the CGFont stuff */
 #if MAC_OS_X_VERSION_MAX_ALLOWED <= MAC_OS_X_VERSION_10_4
 #define CGFontCreateWithFontName CGFontCreateWithName
 #define CGFontGetGlyphBBoxes CGFontGetGlyphBoundingBoxes
@@ -661,7 +661,7 @@ CGFontRef RQuartz_Font(CTXDESC)
         if (!atsFont) { /* not in the cache? Then we need to find the 
 			   proper font name from the family name and face */
             /* as it turns out kATSFontFilterSelectorFontFamily is not 
-	       implemented in OS X (!!) so there is no way to query for a 
+	       implemented in macOS (!!) so there is no way to query for a 
 	       font from a specific family. Therefore we have to use 
 	       text-matching heuristics ... very nasty ... */
             char compositeFontName[256];
@@ -1481,7 +1481,10 @@ SEXP Quartz(SEXP args)
 	const char *devname = "quartz_off_screen";
 	if(streql(type, "") || streql(type, "native") || streql(type, "cocoa") 
 	   || streql(type, "carbon")) devname = "quartz";
- 	gsetVar(R_DeviceSymbol, mkString(devname), R_BaseEnv);
+	SEXP f = PROTECT(mkString(devname));
+	if(file) setAttrib(f, install("filepath"), mkString(file));
+ 	gsetVar(R_DeviceSymbol, f, R_BaseEnv);
+	UNPROTECT(1);
 	pGEDevDesc dd = GEcreateDevDesc(dev);
 	GEaddDevice(dd);
 	GEinitDisplayList(dd);
@@ -1494,7 +1497,7 @@ SEXP Quartz(SEXP args)
 
 static double cached_darwin_version = 0.0;
 
-/* Darwin version X.Y maps to OS X version 10.(X - 4).Y */
+/* Darwin version X.Y maps to macOS version 10.(X - 4).Y */
 static double darwin_version() {
     char ver[32];
     size_t len = sizeof(ver) - 1;
@@ -1523,7 +1526,7 @@ extern kern_return_t bootstrap_info(mach_port_t , /* bootstrap port */
    interactively via LS. Although ssh to a machine that has a running
    session for the same user will allow a WS connection, this function
    will still return 0 in that case.
-   NOTE: on Mac OS X 10.5 we are currently NOT searching the parent
+   NOTE: on macOS 10.5 we are currently NOT searching the parent
    namespaces. This is currently OK, because the session service will
    be registered in the session namespace which is the last in the
    chain. However, this could change in the future.
@@ -1567,7 +1570,7 @@ static int has_wss() {
 	if (bport != MACH_PORT_NULL)
 	    mach_port_deallocate(mach_task_self(), bport);
     } else {
-	/* On Mac OS X 10.7 (Lion) and higher two things changed:
+	/* On macOS 10.7 (Lion) and higher two things changed:
 	   a) there is no com.apple.windowserver.session anymore 
 	   so the above will fail
 	   b) every process has now the full bootstrap info, 
diff --git a/src/library/grDevices/src/devWindows.c b/src/library/grDevices/src/devWindows.c
index ac85ea7..6b15edf 100644
--- a/src/library/grDevices/src/devWindows.c
+++ b/src/library/grDevices/src/devWindows.c
@@ -3,7 +3,7 @@
  *  Copyright (C) 1995, 1996  Robert Gentleman and Ross Ihaka
  *  Copyright (C) 1998--2003  Guido Masarotto and Brian Ripley
  *  Copyright (C) 2004        The R Foundation
- *  Copyright (C) 2004-2013   The R Core Team
+ *  Copyright (C) 2004-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
@@ -17,7 +17,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  */
 
 /*--- Device Driver for Windows; this file started from
@@ -301,7 +301,25 @@ static Rboolean GA_NewFrameConfirm(pDevDesc);
 	/* end of list of required device driver actions	*/
 	/********************************************************/
 
-#include "rbitmap.h"
+//#include "rbitmap.h"
+extern int 
+R_SaveAsPng(void  *d, int width, int height,
+	    unsigned int (*gp)(void *, int, int),
+	    int bgr, FILE *fp, unsigned int transparent, int res);
+extern int
+R_SaveAsJpeg(void  *d, int width, int height,
+	     unsigned int (*gp)(void *, int, int),
+	     int bgr, int quality, FILE *outfile, int res);
+extern int
+R_SaveAsTIFF(void  *d, int width, int height,
+	     unsigned int (*gp)(void *, int, int),
+	     int bgr, const char *outfile, int res, int compression);
+extern int
+R_SaveAsBmp(void  *d, int width, int height,
+	    unsigned int (*gp)(void *, int, int), int bgr, FILE *fp, int res);
+const char * R_pngVersion(void);
+const char * R_jpegVersion(void);
+const char * R_tiffVersion(void);
 
 	/* Support Routines */
 
@@ -309,7 +327,6 @@ static double pixelHeight(drawing  d);
 static double pixelWidth(drawing d);
 static void SetColor(int, double, gadesc*);
 static void SetFont(pGEcontext, double, gadesc*);
-//static int Load_Rbitmap_Dll();
 static void SaveAsPng(pDevDesc dd, const char *fn);
 static void SaveAsJpeg(pDevDesc dd, int quality, const char *fn);
 static void SaveAsBmp(pDevDesc dd, const char *fn);
@@ -1646,7 +1663,7 @@ setupScreenDevice(pDevDesc dd, gadesc *xd, double w, double h,
     MCHECK(xd->mclpwm = newmenuitem(G_("as a Metafile\tCTRL+W"), 0, menuclpwm));
     addto(m);
     MCHECK(newmenuitem("-", 0, NULL));
-    MCHECK(xd->mprint = newmenuitem(G_("Print...\tCTRL+P"), 0, menuprint));
+    MCHECK(xd->mprint = newmenuitem(G_("Print..."), 'P', menuprint));
     MCHECK(newmenuitem("-", 0, NULL));
     MCHECK(xd->mclose = newmenuitem(G_("close Device"), 0, menuclose));
     MCHECK(newmenu(G_("History")));
@@ -1688,7 +1705,7 @@ setupScreenDevice(pDevDesc dd, gadesc *xd, double w, double h,
     MCHECK(xd->grmenustayontop = newmenuitem(G_("Stay on top"), 0, menustayontop));
     setdata(xd->grmenustayontop, (void *) dd);
     MCHECK(newmenuitem("-", 0, NULL));
-    MCHECK(m = newmenuitem(G_("Print..."), 0, menuprint));
+    MCHECK(m = newmenuitem(G_("Print..."), 'P', menuprint));
     setdata(m, (void *) dd);
     gchangepopup(xd->gawin, xd->grpopup);
 
@@ -1746,6 +1763,7 @@ setupScreenDevice(pDevDesc dd, gadesc *xd, double w, double h,
     dd->canGenMouseMove = TRUE;
     dd->canGenMouseUp = TRUE;
     dd->canGenKeybd = TRUE;
+    dd->canGenIdle = FALSE;
     dd->gettingEvent = FALSE;
 
     GA_xd = xd;
@@ -1798,10 +1816,6 @@ static Rboolean GA_Open(pDevDesc dd, gadesc *xd, const char *dsp,
 	if(strlen(dsp+4) >= 512) error(_("filename too long in %s() call"),
 				       (dsp[0]=='p') ? "png" : "bmp");
 	strcpy(xd->filename, R_ExpandFileName(dsp+4));
-	if (!Load_Rbitmap_Dll()) {
-	    warning("unable to load Rbitmap.dll");
-	    return FALSE;
-	}
 
 	if (w < 20 && h < 20)
 	    warning(_("'width=%d, height=%d' are unlikely values in pixels"),
@@ -1833,10 +1847,6 @@ static Rboolean GA_Open(pDevDesc dd, gadesc *xd, const char *dsp,
 	xd->bg = dd->startfill = canvascolor;
 	xd->kind = JPEG;
 	if (!p) return FALSE;
-	if (!Load_Rbitmap_Dll()) {
-	    warning("unable to load Rbitmap.dll");
-	    return FALSE;
-	}
 	*p = '\0';
 	xd->quality = atoi(&dsp[5]);
 	*p = ':' ;
@@ -1867,10 +1877,6 @@ static Rboolean GA_Open(pDevDesc dd, gadesc *xd, const char *dsp,
 	xd->bg = dd->startfill = canvascolor;
 	xd->kind = TIFF;
 	if (!p) return FALSE;
-	if (!Load_Rbitmap_Dll()) {
-	    warning("unable to load Rbitmap.dll");
-	    return FALSE;
-	}
 	*p = '\0';
 	xd->quality = atoi(&dsp[5]);
 	*p = ':' ;
@@ -2246,9 +2252,11 @@ static void GA_Close(pDevDesc dd)
     gadesc *xd = (gadesc *) dd->deviceSpecific;
     SEXP vDL;
 
+    if (xd->cntxt)
+    	((RCNTXT *)xd->cntxt)->cend = NULL;  /* Don't try to run cleanup; it will have already happened */
+
     if (dd->onExit) {
 	dd->onExit(dd);
-	UserBreak = TRUE;
     }
 
     if (xd->kind == SCREEN) {
@@ -2282,6 +2290,7 @@ static void GA_Close(pDevDesc dd)
        device (but also on the console and others) */
     doevent();
     free(xd);
+    dd->deviceSpecific = NULL;
 }
 
 	/********************************************************/
@@ -3151,6 +3160,11 @@ static Rboolean GA_Locator(double *x, double *y, pDevDesc dd)
 	SH;
 	R_WaitEvent();
 	R_ProcessEvents();
+	if (!dd->deviceSpecific) { /* closing the window on other systems calls error().  
+	                             But that is not safe on Windows, so we NULL the device
+	                             specific field and call error() here instead. */
+	    error(_("graphics device closed during call to locator or identify"));
+	}
     }
 
     dd->onExit = NULL;
@@ -3507,7 +3521,6 @@ static void SaveAsPng(pDevDesc dd, const char *fn)
     unsigned char *data;
     gadesc *xd = (gadesc *) dd->deviceSpecific;
 
-    if (!Load_Rbitmap_Dll()) return;
     if ((fp = R_fopen(fn, "wb")) == NULL) {
 	char msg[MAX_PATH+32];
 
@@ -3537,7 +3550,6 @@ static void SaveAsJpeg(pDevDesc dd, int quality, const char *fn)
     unsigned char *data;
     gadesc *xd = (gadesc *) dd->deviceSpecific;
 
-    if (!Load_Rbitmap_Dll()) return;
     if ((fp = R_fopen(fn,"wb")) == NULL) {
 	char msg[MAX_PATH+32];
 	strcpy(msg, "Impossible to open ");
@@ -3567,7 +3579,6 @@ static void SaveAsBmp(pDevDesc dd, const char *fn)
     unsigned char *data;
     gadesc *xd = (gadesc *) dd->deviceSpecific;
 
-    if (!Load_Rbitmap_Dll()) return;
     if ((fp = R_fopen(fn, "wb")) == NULL) {
 	char msg[MAX_PATH+32];
 
@@ -3597,10 +3608,6 @@ static void SaveAsTiff(pDevDesc dd, const char *fn)
     unsigned char *data;
     gadesc *xd = (gadesc *) dd->deviceSpecific;
 
-    if (!Load_Rbitmap_Dll()) {
-	R_ShowMessage(_("Impossible to load Rbitmap.dll"));
-	return;
-    }
     r = ggetcliprect(xd->bm);
     gsetcliprect(xd->bm, r2 = getrect(xd->bm));
 
@@ -3710,15 +3717,19 @@ SEXP devga(SEXP args)
     R_CheckDeviceAvailable();
     BEGIN_SUSPEND_INTERRUPTS {
 	pDevDesc dev;
-	char type[100];
+	char type[100], *file = NULL, fn[MAX_PATH];
 	strcpy(type, "windows");
 	if (display[0]) {
 	    strncpy(type, display, 100);
-	    // Package tkrplot assumes the exact form here
-	    if(strncmp(display, "win.metafile", 12)) {
-		char *p = strchr(type, ':');
-		if(p) *p = '\0';
+	    char *p = strchr(display, ':');
+	    if (p) {
+		strncpy(fn, p+1, MAX_PATH);
+		file = fn;
 	    }
+	    // Package tkrplot assumes the exact form here,
+	    // but remove suffix for all the others.
+	    p = strchr(type, ':');
+	    if(p && strncmp(display, "win.metafile", 12)) *p = '\0';
 	}
 	/* Allocate and initialize the device driver data */
 	if (!(dev = (pDevDesc) calloc(1, sizeof(DevDesc)))) return 0;
@@ -3732,7 +3743,7 @@ SEXP devga(SEXP args)
 	    error(_("unable to start %s() device"), type);
 	}
 	gdd = GEcreateDevDesc(dev);
-	GEaddDevice2(gdd, type);
+	GEaddDevice2f(gdd, type, file);
     } END_SUSPEND_INTERRUPTS;
     vmaxset(vmax);
     return R_NilValue;
@@ -3800,9 +3811,12 @@ static void GA_eventHelper(pDevDesc dd, int code)
     	gchangepopup(xd->gawin, NULL);
     	if (isEnvironment(dd->eventEnv)) {
     	    SEXP prompt = findVar(install("prompt"), dd->eventEnv);
-    	    if (length(prompt) == 1) {
+    	    if (isString(prompt) && length(prompt) == 1) {
     		setstatus(CHAR(asChar(prompt)));
     		settext(xd->gawin, CHAR(asChar(prompt)));
+    	    } else {
+    	    	setstatus("");
+    	    	settext(xd->gawin, "");
     	    }
     	}
     	dd->onExit = GA_onExit;  /* install callback for cleanup */
@@ -3813,10 +3827,16 @@ static void GA_eventHelper(pDevDesc dd, int code)
 }
 
 
+#define WIN32_LEAN_AND_MEAN 1
+#include <windows.h>
+typedef int (*R_SaveAsBitmap)(/* variable set of args */);
 static R_SaveAsBitmap R_devCairo;
 static int RcairoAlreadyLoaded = 0;
 static HINSTANCE hRcairoDll;
 
+typedef SEXP (*R_cairoVersion_t)(void);
+static R_cairoVersion_t R_cairoVersion = NULL;
+
 static int Load_Rcairo_Dll()
 {
     if (!RcairoAlreadyLoaded) {
@@ -3829,6 +3849,8 @@ static int Load_Rcairo_Dll()
 	    ((R_devCairo =
 	      (R_SaveAsBitmap)GetProcAddress(hRcairoDll, "in_Cairo"))
 	     != NULL)) {
+	    R_cairoVersion = (R_cairoVersion_t)
+		GetProcAddress(hRcairoDll, "in_CairoVersion");
 	    RcairoAlreadyLoaded = 1;
 	} else {
 	    if (hRcairoDll != NULL) FreeLibrary(hRcairoDll);
@@ -3851,3 +3873,24 @@ SEXP devCairo(SEXP args)
     else (R_devCairo)(args);
     return R_NilValue;
 }
+
+SEXP cairoVersion(void)
+{
+    if (!Load_Rcairo_Dll() || R_cairoVersion == NULL) return mkString("");
+    else return (R_cairoVersion)();
+}
+
+SEXP bmVersion(void)
+{
+    SEXP ans = PROTECT(allocVector(STRSXP, 3)),
+	nms = PROTECT(allocVector(STRSXP, 3));
+    setAttrib(ans, R_NamesSymbol, nms);
+    SET_STRING_ELT(nms, 0, mkChar("libpng"));
+    SET_STRING_ELT(nms, 1, mkChar("jpeg"));
+    SET_STRING_ELT(nms, 2, mkChar("libtiff"));
+    SET_STRING_ELT(ans, 0, mkChar((R_pngVersion)()));
+    SET_STRING_ELT(ans, 1, mkChar((R_jpegVersion)()));
+    SET_STRING_ELT(ans, 2, mkChar((R_tiffVersion)()));
+    UNPROTECT(2);
+    return ans;
+}
diff --git a/src/library/grDevices/src/devWindows.h b/src/library/grDevices/src/devWindows.h
index d6fc958..758aa9f 100644
--- a/src/library/grDevices/src/devWindows.h
+++ b/src/library/grDevices/src/devWindows.h
@@ -15,7 +15,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  */
 
 #include <R_ext/GraphicsEngine.h>
diff --git a/src/library/grDevices/src/devices.c b/src/library/grDevices/src/devices.c
index 5bc0961..06dd9b3 100644
--- a/src/library/grDevices/src/devices.c
+++ b/src/library/grDevices/src/devices.c
@@ -16,7 +16,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
 
 
  *  This is (a small part of) an extensive reworking by Paul Murrell
@@ -85,20 +85,25 @@ SEXP devcur(SEXP args)
 SEXP devnext(SEXP args)
 {
     checkArity_length;
-    return ScalarInteger( nextDevice(INTEGER(CAR(args))[0] - 1) + 1 );
+    int nxt = INTEGER(CAR(args))[0];
+    if (nxt == NA_INTEGER) error(_("NA argument is invalid"));
+    return ScalarInteger( nextDevice(nxt - 1) + 1 );
 }
 
 SEXP devprev(SEXP args)
 {
     checkArity_length;
-    return ScalarInteger( prevDevice(INTEGER(CAR(args))[0] - 1) + 1 );
+    int prev = INTEGER(CAR(args))[0];
+    if (prev == NA_INTEGER) error(_("NA argument is invalid"));
+    return ScalarInteger( prevDevice(prev - 1) + 1 );
 }
 
 SEXP devset(SEXP args)
 {
     checkArity_length;
-    int devNum = INTEGER(CAR(args))[0] - 1;
-    return ScalarInteger( selectDevice(devNum) + 1 );
+    int devNum = INTEGER(CAR(args))[0];
+    if (devNum == NA_INTEGER) error(_("NA argument is invalid"));
+    return ScalarInteger( selectDevice(devNum - 1) + 1 );
 }
 
 SEXP devoff(SEXP args)
diff --git a/src/library/grDevices/src/grDevices.h b/src/library/grDevices/src/grDevices.h
index ca7c213..47c3a2c 100644
--- a/src/library/grDevices/src/grDevices.h
+++ b/src/library/grDevices/src/grDevices.h
@@ -14,7 +14,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  */
 
 #include <Rinternals.h>
@@ -110,4 +110,5 @@ const char *incol2name(unsigned int col);
 unsigned int inR_GE_str2col(const char *s);
 void initPalette(void);
 
-
+SEXP cairoVersion(void);
+SEXP bmVersion(void);
diff --git a/src/library/grDevices/src/init.c b/src/library/grDevices/src/init.c
index ae82836..2caf0da 100644
--- a/src/library/grDevices/src/init.c
+++ b/src/library/grDevices/src/init.c
@@ -1,6 +1,6 @@
 /*
  *  R : A Computer Language for Statistical Data Analysis
- *  Copyright (C) 2004-13   The R Core Team.
+ *  Copyright (C) 2004-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
@@ -14,7 +14,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  */
 
 #ifdef HAVE_CONFIG_H
@@ -27,6 +27,7 @@
 
 #include "grDevices.h"
 #include <R_ext/Rdynload.h>
+#include <R_ext/Visibility.h>
 
 #ifndef _WIN32
 /* This really belongs with the X11 module, but it is about devices */
@@ -70,6 +71,8 @@ static const R_CallMethodDef CallEntries[] = {
     CALLDEF(colors, 0),
     CALLDEF(palette, 1),
     CALLDEF(palette2, 1),
+    CALLDEF(cairoVersion, 0),
+    CALLDEF(bmVersion, 0),
 
 #ifndef _WIN32
     CALLDEF(makeQuartzDefault, 0),
@@ -88,7 +91,7 @@ static const R_ExternalMethodDef ExtEntries[] = {
     EXTDEF(PostScript, 19),
     EXTDEF(XFig, 14),
     EXTDEF(PDF, 20),
-    EXTDEF(devCairo, 10),
+    EXTDEF(devCairo, 11),
     EXTDEF(devcap, 0),
     EXTDEF(devcapture, 1),
     EXTDEF(devcontrol, 1),
@@ -125,7 +128,7 @@ extern void setup_RdotApp(void);
 extern Rboolean useaqua;
 #endif
 
-void R_init_grDevices(DllInfo *dll)
+void attribute_visible R_init_grDevices(DllInfo *dll)
 {
     initPalette();
     R_registerRoutines(dll, NULL, CallEntries, NULL, ExtEntries);
diff --git a/src/library/grDevices/src/qdBitmap.c b/src/library/grDevices/src/qdBitmap.c
index 35b1e9b..dec8980 100644
--- a/src/library/grDevices/src/qdBitmap.c
+++ b/src/library/grDevices/src/qdBitmap.c
@@ -14,7 +14,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  *
  *  Bitmap output Quartz device module
  *
diff --git a/src/library/grDevices/src/qdBitmap.h b/src/library/grDevices/src/qdBitmap.h
index c81534f..53170e6 100644
--- a/src/library/grDevices/src/qdBitmap.h
+++ b/src/library/grDevices/src/qdBitmap.h
@@ -14,7 +14,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  *
  *  Quartz Quartz device module header file
  *
diff --git a/src/library/grDevices/src/qdCocoa.h b/src/library/grDevices/src/qdCocoa.h
index 57624cc..816ac1d 100644
--- a/src/library/grDevices/src/qdCocoa.h
+++ b/src/library/grDevices/src/qdCocoa.h
@@ -14,7 +14,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  *
  *  Quartz Quartz device module header file
  *
diff --git a/src/library/grDevices/src/qdCocoa.m b/src/library/grDevices/src/qdCocoa.m
index 954b17f..3319130 100644
--- a/src/library/grDevices/src/qdCocoa.m
+++ b/src/library/grDevices/src/qdCocoa.m
@@ -14,7 +14,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  *
  *  Cocoa Quartz device module
  *
@@ -67,6 +67,8 @@ static QuartzFunctions_t *qf;
 #define R_GREEN(col)    (((col)>> 8)&255)
 #define R_BLUE(col)     (((col)>>16)&255)
 #define R_ALPHA(col)    (((col)>>24)&255)
+#define R_RGB(r,g,b)    ((r)|((g)<<8)|((b)<<16)|0xFF000000)
+#define R_RGBA(r,g,b,a) ((r)|((g)<<8)|((b)<<16)|((a)<<24))
 
 - (NSColor *) canvasColor
 {
@@ -803,8 +805,9 @@ static void* QuartzCocoa_Cap(QuartzDesc_t dev, void *userInfo) {
                                                    size.width, size.height)];
 
 	int bpp = (int) [rep bitsPerPixel];
+	int spp = (int) [rep samplesPerPixel];
 	NSBitmapFormat bf = [rep bitmapFormat];
-	/* Rprintf("format: bpp=%d, bf=0x%x, bps=%d, planar=%s, colorspace=%s\n", bpp, (int) bf, [rep bitsPerSample], [rep isPlanar] ? "YES" : "NO", [[rep colorSpaceName] UTF8String]); */
+	/* Rprintf("format: bpp=%d, bf=0x%x, bps=%d, spp=%d, planar=%s, colorspace=%s\n", bpp, (int) bf, [rep bitsPerSample], spp, [rep isPlanar] ? "YES" : "NO", [[rep colorSpaceName] UTF8String]); */
 	/* we only support meshed (=interleaved) formats of 8 bits/component with 3 or 4 components. We should really check for RGB/RGBA as well.. */
 	if ([rep isPlanar] || [rep bitsPerSample] != 8 || (bf & NSFloatingPointSamplesBitmapFormat) || (bpp != 24 && bpp != 32)) {
 	    warning("Unsupported image format");
@@ -820,12 +823,17 @@ static void* QuartzCocoa_Cap(QuartzDesc_t dev, void *userInfo) {
          * The ARGB32 needs to be converted to an R ABGR32 */
         rint = (unsigned int *) INTEGER(raster);
 	stride = (bpp == 24) ? 3 : 4; /* convers bpp to stride in bytes */
-	for (i = 0; i < pixels; i++, j += stride)
-	    rint[i] = ((screenData[j + 0]) |
-		       (screenData[j + 1] << 8) |
-		       (screenData[j + 2] << 16) |
-		       0xFF000000); /* alpha is currently ignored and set to 1.0 (why?) */
-	
+
+	if (bf & NSAlphaFirstBitmapFormat) /* ARGB */
+	    for (i = 0; i < pixels; i++, j += stride)
+		rint[i] = R_RGBA(screenData[j + 1], screenData[j + 2], screenData[j + 3], screenData[j]);
+	else if (spp == 4) /* RGBA */
+	    for (i = 0; i < pixels; i++, j += stride)
+		rint[i] = R_RGBA(screenData[j], screenData[j + 1], screenData[j + 2], screenData[j + 3]);
+	else /* RGB */
+	    for (i = 0; i < pixels; i++, j += stride)
+		rint[i] = R_RGB(screenData[j + 0], screenData[j + 1], screenData[j + 2]);
+
 	[rep release];
 	
 	PROTECT(dim = allocVector(INTSXP, 2));
diff --git a/src/library/grDevices/src/qdPDF.c b/src/library/grDevices/src/qdPDF.c
index 6a13846..8486e82 100644
--- a/src/library/grDevices/src/qdPDF.c
+++ b/src/library/grDevices/src/qdPDF.c
@@ -14,7 +14,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  *
  *  PDF output Quartz device module
  *
@@ -28,9 +28,9 @@
 
 #include "qdPDF.h"
 
-#include <R.h>
+//#include <R.h>
 #include <Rinternals.h>
-#include <R_ext/QuartzDevice.h>
+//#include <R_ext/QuartzDevice.h>
 #define _(String) (String)
 
 typedef struct {
diff --git a/src/library/grDevices/src/rbitmap.h b/src/library/grDevices/src/rbitmap.h
deleted file mode 100644
index 5af8abe..0000000
--- a/src/library/grDevices/src/rbitmap.h
+++ /dev/null
@@ -1,60 +0,0 @@
-/*
- *  R : A Computer Langage for Statistical Data Analysis
- *  Copyright (C) 2000-11     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
- *  the Free Software Foundation; either version 2 of the License, or
- *  (at your option) any later version.
- *
- *  This program is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU General Public License for more details.
- *
- *  You should have received a copy of the GNU General Public License
- *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
- */
-
-#define WIN32_LEAN_AND_MEAN 1
-#include <windows.h>
-typedef int (*R_SaveAsBitmap)(/* variable set of args */);
-static R_SaveAsBitmap R_SaveAsPng, R_SaveAsJpeg, R_SaveAsBmp, R_SaveAsTIFF;
-
-static int RbitmapAlreadyLoaded = 0;
-static HINSTANCE hRbitmapDll;
-
-static int Load_Rbitmap_Dll()
-{
-    if (!RbitmapAlreadyLoaded) {
-	char szFullPath[PATH_MAX];
-	strcpy(szFullPath, R_HomeDir());
-	strcat(szFullPath, "\\library\\grDevices\\libs\\");
-	strcat(szFullPath, R_ARCH);
-	strcat(szFullPath, "\\Rbitmap.dll");
-	if (((hRbitmapDll = LoadLibrary(szFullPath)) != NULL) &&
-	    ((R_SaveAsPng=
-	      (R_SaveAsBitmap)GetProcAddress(hRbitmapDll, "R_SaveAsPng"))
-	     != NULL) &&
-	    ((R_SaveAsBmp=
-	      (R_SaveAsBitmap)GetProcAddress(hRbitmapDll, "R_SaveAsBmp"))
-	     != NULL) &&
-	    ((R_SaveAsJpeg=
-	      (R_SaveAsBitmap)GetProcAddress(hRbitmapDll, "R_SaveAsJpeg"))
-	     != NULL) &&
-	    ((R_SaveAsTIFF=
-	      (R_SaveAsBitmap)GetProcAddress(hRbitmapDll, "R_SaveAsTIFF"))
-	     != NULL)
-	    ) {
-	    RbitmapAlreadyLoaded = 1;
-	} else {
-	    if (hRbitmapDll != NULL) FreeLibrary(hRbitmapDll);
-	    RbitmapAlreadyLoaded= -1;
-	    char buf[1000];
-	    snprintf(buf, 1000, "Unable to load '%s'", szFullPath);
-	    R_ShowMessage(buf);
-	}
-    }
-    return (RbitmapAlreadyLoaded > 0);
-}
diff --git a/src/library/grDevices/src/stubs.c b/src/library/grDevices/src/stubs.c
index ff63f3e..c502437 100644
--- a/src/library/grDevices/src/stubs.c
+++ b/src/library/grDevices/src/stubs.c
@@ -1,6 +1,6 @@
 /*
  *  R : A Computer Language for Statistical Data Analysis
- *  Copyright (C) 2012     the R Core Team
+ *  Copyright (C) 2012-2014     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
@@ -14,7 +14,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  */
 
 #include <config.h>
@@ -25,6 +25,7 @@
 #ifndef _WIN32
 SEXP do_X11(SEXP call, SEXP op, SEXP args, SEXP env);
 SEXP do_saveplot(SEXP call, SEXP op, SEXP args, SEXP env);
+SEXP do_bmVersion(void);
 
 SEXP X11(SEXP call, SEXP op, SEXP args, SEXP env)
 {
@@ -35,6 +36,10 @@ SEXP savePlot(SEXP call, SEXP op, SEXP args, SEXP env)
 {
     return do_saveplot(call, op, CDR(args), env);
 }
+SEXP bmVersion(void)
+{
+    return do_bmVersion();
+}
 #endif
 
 SEXP contourLines(SEXP call, SEXP op, SEXP args, SEXP env)
diff --git a/src/library/grDevices/src/winbitmap.c b/src/library/grDevices/src/winbitmap.c
new file mode 100644
index 0000000..71f6682
--- /dev/null
+++ b/src/library/grDevices/src/winbitmap.c
@@ -0,0 +1,686 @@
+/*
+ *  R : A Computer Language for Statistical Data Analysis
+ *  Copyright (C) 1999       Guido Masarotto
+ *  Copyright (C) 1999-2014  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
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, a copy is available at
+ *  https://www.R-project.org/Licenses/
+ */
+
+
+/*
+ * This file aims to be system independent so it sees the underlying
+ * structures only using:
+ * void *d : an 'opaque' view of the source of the pixels;
+ * int width, height: dimensions in pixels;
+ * unsigned int (*gp)(void *d, int x, int y): a function which
+ *     returns the colour of the (x,y) pixels stored either as
+ *     BGR (R model, see GraphicsDevice.h) or as RGB in the
+ *     24 least sig. bits (8 bit for channel).
+ *     (0,0) is the left-top corner. (3,2) is the third pixel
+ *     in the fourth scanline.
+ * int bgr: if != 0, order is BGR else is RGB.
+ * int quality: only for jpeg (0-100 measure of how much to compress).
+ * FILE * fp is the destination.
+ *
+ */
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <setjmp.h>
+
+/* 8 bits red, green and blue channel */
+#define DECLARESHIFTS int RSHIFT=(bgr)?0:16, GSHIFT=8, BSHIFT=(bgr)?16:0
+#define GETRED(col)    (((col) >> RSHIFT) & 0xFF)
+#define GETGREEN(col)  (((col) >> GSHIFT) & 0xFF)
+#define GETBLUE(col)   (((col) >> BSHIFT) & 0xFF)
+#define GETALPHA(col)   (((col) >> 24) & 0xFF)
+
+#include <R_ext/Error.h>
+
+#ifdef HAVE_PNG
+
+#include "png.h"
+/*
+ * Try to save the content of the device 'd' in 'filename' as png.
+ * If numbers of colors is less than 256 we use a 'palette' png.
+ * Return 1 on success, 0 on failure
+*/
+
+/*
+    I don't use 'error' since (1) we must free 'scanline' and
+   (2) we can be arrived here from a button or menuitem callback maybe
+   in a different thread from the one where R runs.
+*/
+static void my_png_error(png_structp png_ptr, png_const_charp msg)
+{
+    R_ShowMessage((char *) msg);
+#if PNG_LIBPNG_VER < 10400
+    longjmp(png_ptr->jmpbuf,1);
+#else
+    longjmp(png_jmpbuf(png_ptr),1);
+#endif
+}
+
+static void my_png_warning(png_structp png_ptr, png_const_charp msg)
+{
+    warning("libpng: %s",(char *) msg);
+}
+
+int R_SaveAsPng(void  *d, int width, int height,
+		unsigned int (*gp)(void *, int, int),
+		int bgr, FILE *fp, unsigned int transparent, int res)
+{
+    png_structp png_ptr;
+    png_infop info_ptr;
+    unsigned int  col, palette[256];
+    png_color pngpalette[256];
+    png_bytep pscanline;
+    png_bytep scanline = (png_bytep) calloc((size_t)(4*width),sizeof(png_byte));
+    png_byte trans[256];
+    png_color_16 trans_values[1];
+    int i, j, r, ncols, mid, high, low, withpalette, have_alpha;
+    volatile DECLARESHIFTS;
+
+    /* Have we enough memory?*/
+    if (scanline == NULL)
+	return 0;
+
+    if (fp == NULL) {
+	free(scanline);
+	return 0;
+    }
+
+    /* Create and initialize the png_struct with the desired error handler
+     * functions.  If you want to use the default stderr and longjump method,
+     * you can supply NULL for the last three parameters.  We also check that
+     * the library version is compatible with the one used at compile time,
+     * in case we are using dynamically linked libraries.  REQUIRED.
+     */
+    png_ptr = png_create_write_struct(PNG_LIBPNG_VER_STRING, NULL, NULL, NULL);
+    if (png_ptr == NULL) {
+	free(scanline);
+	return 0;
+    }
+
+    /* Allocate/initialize the image information data.  REQUIRED */
+    info_ptr = png_create_info_struct(png_ptr);
+    if (info_ptr == NULL) {
+	free(scanline);
+	png_destroy_write_struct(&png_ptr,  (png_infopp)NULL);
+	return 0;
+    }
+
+    /* Set error handling.  REQUIRED if you aren't supplying your own
+     * error handling functions in the png_create_write_struct() call.
+     */
+#if PNG_LIBPNG_VER < 10400
+    if (setjmp(png_ptr->jmpbuf))
+#else
+    if (setjmp(png_jmpbuf(png_ptr)))
+#endif
+{
+	/* If we get here, we had a problem writing the file */
+	free(scanline);
+	png_destroy_write_struct(&png_ptr, &info_ptr);
+	return 0;
+    }
+    png_set_error_fn(png_ptr, NULL, my_png_error, my_png_warning);
+
+    /* I/O initialization functions is REQUIRED */
+    png_init_io(png_ptr, fp);
+    /* Have we less than 256 different colors? */
+    ncols = 0;
+    if(transparent) palette[ncols++] = transparent & 0xFFFFFF;
+    mid = ncols;
+    withpalette = 1;
+    have_alpha = 0;
+    for (i = 0; (i < height) && withpalette ; i++) {
+	for (j = 0; (j < width) && withpalette ; j++) {
+	    col = gp(d,i,j);
+	    if (GETALPHA(col) < 255) have_alpha = 1;
+	    /* binary search the palette: */
+	    low = 0;
+	    high = ncols - 1;
+	    while (low <= high) {
+		mid = (low + high)/2;
+		if ( col < palette[mid] ) high = mid - 1;
+		else if ( col > palette[mid] ) low  = mid + 1;
+		else break;
+	    }
+	    if (high < low) {
+		/* didn't find colour in palette, insert it: */
+		if (ncols >= 256) {
+		    withpalette = 0;
+		} else {
+		    for (r = ncols; r > low; r--)
+			palette[r] = palette[r-1] ;
+		    palette[low] = col;
+		    ncols ++;
+		}
+	    }
+	}
+    }
+    col = gp(d,0,0);
+    //have_alpha &= (transparent == 0);
+
+    /* Set the image information here.  Width and height are up to 2^31,
+     * bit_depth is one of 1, 2, 4, 8, or 16, but valid values also depend on
+     * the color_type selected. color_type is one of PNG_COLOR_TYPE_GRAY,
+     * PNG_COLOR_TYPE_GRAY_ALPHA, PNG_COLOR_TYPE_PALETTE, PNG_COLOR_TYPE_RGB,
+     * or PNG_COLOR_TYPE_RGB_ALPHA.  interlace is either PNG_INTERLACE_NONE or
+     * PNG_INTERLACE_ADAM7, and the compression_type and filter_type MUST
+     * currently be PNG_COMPRESSION_TYPE_BASE and PNG_FILTER_TYPE_BASE. REQUIRED
+     */
+    png_set_IHDR(png_ptr, info_ptr, width, height, 8,
+		 withpalette ? PNG_COLOR_TYPE_PALETTE :
+		 (have_alpha ? PNG_COLOR_TYPE_RGB_ALPHA : PNG_COLOR_TYPE_RGB),
+		 PNG_INTERLACE_NONE, PNG_COMPRESSION_TYPE_BASE,
+		 PNG_FILTER_TYPE_BASE);
+
+    if (withpalette) {
+	for (i = 0; i < ncols ; i++) {
+	    col = palette[i];
+	    if(transparent) {
+		trans[i] = (col == transparent) ? 0:255;
+		pngpalette[i].red = GETRED(col);
+		pngpalette[i].green = GETGREEN(col);
+		pngpalette[i].blue = GETBLUE(col);
+	    } else {
+		/* PNG needs NON-premultiplied alpha */
+		int a = GETALPHA(col);
+		trans[i] = a;
+		if(a == 255 || a == 0) {
+		    pngpalette[i].red = GETRED(col);
+		    pngpalette[i].green = GETGREEN(col);
+		    pngpalette[i].blue = GETBLUE(col);
+		} else {
+		    pngpalette[i].red = 0.49 + 255.0*GETRED(col)/a;
+		    pngpalette[i].green = 0.49 + 255.0*GETGREEN(col)/a;
+		    pngpalette[i].blue = 0.49 + 255.0*GETBLUE(col)/a;
+
+		}
+	    }
+	}
+	png_set_PLTE(png_ptr, info_ptr, pngpalette, ncols);
+	if (transparent || have_alpha)
+	    png_set_tRNS(png_ptr, info_ptr, trans, ncols, trans_values);
+    }
+    /* Deal with transparency */
+    if(transparent && !withpalette) {
+	trans_values[0].red = GETRED(transparent);
+	trans_values[0].blue = GETBLUE(transparent);
+	trans_values[0].green = GETGREEN(transparent);
+	png_set_tRNS(png_ptr, info_ptr, trans, ncols, trans_values);
+    }
+
+    if(res > 0)
+	png_set_pHYs(png_ptr, info_ptr, res/0.0254, res/0.0254,
+		     PNG_RESOLUTION_METER);
+
+    /* Write the file header information.  REQUIRED */
+    png_write_info(png_ptr, info_ptr);
+
+    /*
+     * Now, write the pixels
+     */
+    for (i = 0 ; i < height ; i++) {
+	/* Build the scanline */
+	pscanline = scanline;
+	for (j = 0 ; j < width ; j++) {
+	    col = gp(d, i, j);
+	    if (withpalette) {
+		/* binary search the palette (the colour must be there): */
+		low = 0;  high = ncols - 1;
+		while (low <= high) {
+		    mid = (low + high)/2;
+		    if      (col < palette[mid]) high = mid - 1;
+		    else if (col > palette[mid]) low  = mid + 1;
+		    else break;
+		}
+		*pscanline++ = mid;
+	    } else {
+		if(have_alpha) {
+		    /* PNG needs NON-premultiplied alpha */
+		    int a = GETALPHA(col);
+		    if(a == 255 || a == 0) {
+			*pscanline++ = GETRED(col) ;
+			*pscanline++ = GETGREEN(col) ;
+			*pscanline++ = GETBLUE(col) ;
+			*pscanline++ =  a;
+		    } else {
+			*pscanline++ = 0.49 + 255.0*GETRED(col)/a ;
+			*pscanline++ = 0.49 + 255.0*GETGREEN(col)/a ;
+			*pscanline++ = 0.49 + 255.0*GETBLUE(col)/a ;
+			*pscanline++ =  a;
+		    }
+		} else {
+		    *pscanline++ = GETRED(col) ;
+		    *pscanline++ = GETGREEN(col) ;
+		    *pscanline++ = GETBLUE(col) ;
+		}
+	    }
+	}
+	png_write_row(png_ptr, scanline);
+    }
+
+    /* It is REQUIRED to call this to finish writing the rest of the file */
+    png_write_end(png_ptr, info_ptr);
+
+    /* clean up after the write, and free any memory allocated */
+    free(scanline);
+    png_destroy_write_struct(&png_ptr, &info_ptr);
+
+    /* that's it */
+    return 1;
+}
+
+#endif /* HAVE_PNG */
+
+
+#ifdef HAVE_JPEG
+
+/* jconfig.h included by jpeglib.h may define these unconditionally */
+#undef HAVE_STDDEF_H
+#undef HAVE_STDLIB_H
+#include <jpeglib.h>
+
+/* Here's the extended error handler struct */
+
+struct my_error_mgr {
+    struct jpeg_error_mgr pub;	/* "public" fields */
+    jmp_buf setjmp_buffer;	/* for return to caller */
+};
+
+typedef struct my_error_mgr * my_error_ptr;
+
+/*
+ * Here's the routine that will replace the standard error_exit method:
+*/
+
+static void my_error_exit (j_common_ptr cinfo)
+{
+    /* cinfo->err really points to a my_error_mgr struct, so coerce pointer */
+    my_error_ptr myerr = (my_error_ptr) cinfo->err;
+
+    /* Always display the message. */
+    (*cinfo->err->output_message) (cinfo);
+
+    /* Return control to the setjmp point */
+    longjmp(myerr->setjmp_buffer, 1);
+}
+
+/* We also replace the output method */
+static void my_output_message (j_common_ptr cinfo)
+{
+    char buffer[JMSG_LENGTH_MAX];
+
+    /* Create the message */
+    (*cinfo->err->format_message) (cinfo, buffer);
+
+    /* and show it */
+    R_ShowMessage(buffer);
+}
+
+
+
+int R_SaveAsJpeg(void  *d, int width, int height,
+		unsigned int (*gp)(void *, int, int),
+		int bgr, int quality, FILE *outfile, int res)
+{
+    struct jpeg_compress_struct cinfo;
+    struct my_error_mgr jerr;
+    /* More stuff */
+    JSAMPLE *pscanline, *scanline = (JSAMPLE *) calloc(3*width,sizeof(JSAMPLE));
+    int i, j;
+    unsigned int col;
+    DECLARESHIFTS;
+
+    /* Have we enough memory?*/
+    if (scanline == NULL)
+	return 0;
+
+    if (outfile == NULL) {
+	free(scanline);
+	return 0;
+    }
+
+    /* Step 1: allocate and initialize JPEG compression object */
+
+    /*
+     * We set up the normal JPEG error routines, then override error_exit
+     * and output_message
+     */
+    cinfo.err = jpeg_std_error(&jerr.pub);
+    jerr.pub.error_exit = my_error_exit ;
+    jerr.pub.output_message = my_output_message ;
+    /* Establish the setjmp return context for my_error_exit to use. */
+    if (setjmp(jerr.setjmp_buffer)) {
+	/* If we get here, the JPEG code has signaled an error.
+	 * We need to clean up the JPEG object, close the input file, and return.
+	 */
+	jpeg_destroy_compress(&cinfo);
+	free(scanline);
+	if (outfile) fclose(outfile);
+	return 0;
+    }
+    /* Now we can initialize the JPEG compression object. */
+    jpeg_create_compress(&cinfo);
+
+    /* Step 2: specify data destination (eg, a file) */
+    jpeg_stdio_dest(&cinfo, outfile);
+
+    /* Step 3: set parameters for compression */
+    /* First we supply a description of the input image.
+     * Four fields of the cinfo struct must be filled in:
+     */
+    cinfo.image_width = width;	/* image width and height, in pixels */
+    cinfo.image_height = height;
+    cinfo.input_components = 3;		/* # of color components per pixel */
+    cinfo.in_color_space = JCS_RGB;	/* colorspace of input image */
+    jpeg_set_defaults(&cinfo);
+    if(res > 0) {
+	cinfo.density_unit = 1;  /* pixels per inch */
+	cinfo.X_density = res;
+	cinfo.Y_density = res;
+    }
+    jpeg_set_quality(&cinfo, quality, TRUE);
+    /* Step 4: Start compressor */
+    jpeg_start_compress(&cinfo, TRUE);
+
+    /* Step 5: while (scan lines remain to be written) */
+    /*           jpeg_write_scanlines(...); */
+    for (i=0 ; i<height ; i++) {
+	/* Build the scanline */
+	pscanline = scanline;
+	for ( j=0 ; j<width ; j++) {
+	    col = gp(d, i, j) & 0xFFFFFF;
+	    *pscanline++ = GETRED(col) ;
+	    *pscanline++ = GETGREEN(col) ;
+	    *pscanline++ = GETBLUE(col) ;
+	}
+	jpeg_write_scanlines(&cinfo, (JSAMPARRAY) &scanline, 1);
+    }
+
+    /* Step 6: Finish compression */
+
+    jpeg_finish_compress(&cinfo);
+
+    /* Step 7: release JPEG compression object */
+
+    /* This is an important step since it will release a good deal of memory. */
+    free(scanline);
+    jpeg_destroy_compress(&cinfo);
+
+
+    /* And we're done! */
+    return 1;
+}
+
+#endif /* HAVE_JPEG */
+
+#ifdef HAVE_TIFF
+#include <tiffio.h>
+
+int R_SaveAsTIFF(void  *d, int width, int height,
+		unsigned int (*gp)(void *, int, int),
+		int bgr, const char *outfile, int res, int compression)
+{
+    TIFF *out;
+    int sampleperpixel;
+    tsize_t linebytes;
+    unsigned char *buf, *pscanline;
+    unsigned int col, i, j;
+    int have_alpha = 0;
+
+    DECLARESHIFTS;
+
+    for (i = 0; i < height; i++)
+	for (j = 0; j < width; j++) {
+	    col = gp(d,i,j);
+	    if (GETALPHA(col) < 255) {
+		have_alpha = 1;
+		break;
+	    }
+	}
+    sampleperpixel = 3 + have_alpha;
+
+    out = TIFFOpen(outfile, "w");
+    if (!out) {
+	warning("unable to open TIFF file '%s'", outfile);
+	return 0;
+    }
+    TIFFSetField(out, TIFFTAG_IMAGEWIDTH, width);
+    TIFFSetField(out, TIFFTAG_IMAGELENGTH, height);
+    TIFFSetField(out, TIFFTAG_SAMPLESPERPIXEL, sampleperpixel);
+    TIFFSetField(out, TIFFTAG_BITSPERSAMPLE, 8);
+    TIFFSetField(out, TIFFTAG_ORIENTATION, ORIENTATION_TOPLEFT);
+    TIFFSetField(out, TIFFTAG_PLANARCONFIG, PLANARCONFIG_CONTIG);
+    TIFFSetField(out, TIFFTAG_PHOTOMETRIC, PHOTOMETRIC_RGB);
+#if 0
+    /* Possible compression values
+       COMPRESSION_NONE = 1;
+       COMPRESSION_CCITTRLE = 2;
+       COMPRESSION_CCITTFAX3 = COMPRESSION_CCITT_T4 = 3;
+       COMPRESSION_CCITTFAX4 = COMPRESSION_CCITT_T6 = 4;
+       COMPRESSION_LZW = 5;
+       COMPRESSION_JPEG = 7;
+       COMPRESSION_DEFLATE = 32946;
+       COMPRESSION_ADOBE_DEFLATE = 8;
+    */
+    TIFFSetField(out, TIFFTAG_COMPRESSION, COMPRESSION_NONE);
+#endif
+    if(compression > 1) {
+	if (compression > 10) {
+	    TIFFSetField(out, TIFFTAG_COMPRESSION, compression - 10);
+	    TIFFSetField(out, TIFFTAG_PREDICTOR, 2);
+	} else 
+	    TIFFSetField(out, TIFFTAG_COMPRESSION, compression);
+    }
+
+    if (res > 0) {
+	TIFFSetField(out, TIFFTAG_RESOLUTIONUNIT, RESUNIT_INCH);
+	TIFFSetField(out, TIFFTAG_XRESOLUTION, (float) res);
+	TIFFSetField(out, TIFFTAG_YRESOLUTION, (float) res);
+    }
+
+    linebytes = sampleperpixel * width;
+    if (TIFFScanlineSize(out))
+	buf =(unsigned char *)_TIFFmalloc(linebytes);
+    else
+	buf = (unsigned char *)_TIFFmalloc(TIFFScanlineSize(out));
+
+    for (i = 0; i < height; i++) {
+	pscanline = buf;
+	for(j = 0; j < width; j++) {
+	    col = gp(d, i, j);
+	    *pscanline++ = GETRED(col) ;
+	    *pscanline++ = GETGREEN(col) ;
+	    *pscanline++ = GETBLUE(col) ;
+	    if(have_alpha) *pscanline++ = GETALPHA(col) ;
+	}
+	TIFFWriteScanline(out, buf, i, 0);
+    }
+    TIFFClose(out);
+    _TIFFfree(buf);
+    return 1;
+}
+#endif  /* HAVE_TIFF */
+
+
+/*
+ * Try to save the content of the device 'd' in 'filename' as Windows BMP.
+ * If numbers of colors is less than 256 we use a 'palette' BMP.
+ * Return 1 on success, 0 on failure
+*/
+
+#define BMPERROR {R_ShowMessage("Problems writing to 'bmp' file");return 0;}
+#define BMPW(a) {wrd=a;if(fwrite(&wrd,sizeof(unsigned short),1,fp)!=1) BMPERROR}
+#define BMPDW(a) {dwrd=a;if(fwrite(&dwrd,sizeof(unsigned int),1,fp)!=1) BMPERROR}
+#define BMPPUTC(a) if(fputc(a,fp)==EOF) BMPERROR;
+#define HEADERSIZE 54
+
+int R_SaveAsBmp(void  *d, int width, int height,
+		unsigned int (*gp)(void *, int, int), int bgr, FILE *fp,
+		int res)
+{
+    unsigned int  col, palette[256];
+    int i, j, r, ncols, mid, high, low, withpalette;
+    int bfOffBits, bfSize, biBitCount, biClrUsed , pad;
+    unsigned short wrd;
+    unsigned int dwrd;
+    int lres;
+    DECLARESHIFTS;
+
+    if (fp == NULL)
+	return 0;
+
+    /* Have we less than 256 different colors? */
+    ncols = mid = 0;
+    withpalette = 1;
+    for (i = 0; i < 256 ; i++) palette[i] = 0;
+    for (i = 0; (i < height) && withpalette ; i++) {
+	for (j = 0; (j < width) && withpalette ; j++) {
+	    col = gp(d,i,j) & 0xFFFFFF ;
+	    /* binary search the palette: */
+	    low = 0;
+	    high = ncols - 1;
+	    while (low <= high) {
+		mid = (low + high)/2;
+		if ( col < palette[mid] ) high = mid - 1;
+		else if ( col > palette[mid] ) low  = mid + 1;
+		else break;
+	    }
+	    if (high < low) {
+		/* didn't find colour in palette, insert it: */
+		if (ncols >= 256) {
+		    withpalette = 0;
+		} else {
+		    for (r = ncols; r > low; r--)
+			palette[r] = palette[r-1] ;
+		    palette[low] = col;
+		    ncols ++;
+		}
+	    }
+	}
+    }
+    /* Compute some part of the header */
+    if (withpalette) {
+	bfOffBits = HEADERSIZE + 4 * 256;
+	bfSize = bfOffBits + width * height ;
+	biBitCount = 8;
+	biClrUsed = 256;
+    } else {
+	bfOffBits = HEADERSIZE + 4;
+	bfSize = bfOffBits + 3 * width * height ;
+	biBitCount = 24;
+	biClrUsed = 0;
+    }
+
+    /* write the header */
+
+    BMPPUTC('B');BMPPUTC('M');
+    BMPDW(bfSize); /*bfSize*/
+    BMPW(0);BMPW(0); /* bfReserved1 and bfReserved2 must be 0*/
+    BMPDW(bfOffBits); /* bfOffBits */
+    BMPDW(40);	/* Windows V3. size 40 bytes */
+    BMPDW(width); /* biWidth */
+    BMPDW(height); /* biHeight */
+    BMPW(1);	/* biPlanes - must be 1 */
+    BMPW(biBitCount); /* biBitCount */
+    BMPDW(0); /* biCompression=BI_RGB */
+    BMPDW(0); /* biSizeImage (with BI_RGB not needed)*/
+    if (res > 0)
+	lres = (int)(0.5 + res/0.0254);
+    else lres = 2835; // 72ppi = 2835 pixels/metre.
+    BMPDW(lres); /* XPels/M */
+    BMPDW(lres); /* XPels/M */
+    BMPDW(biClrUsed); /* biClrUsed */
+    BMPDW(0) ; /* biClrImportant All colours are important */
+
+    /* and now the image */
+    if (withpalette) {
+	/* 8 bit image; write the palette */
+	for (i = 0; i < 256; i++) {
+	    col = palette[i];
+	    BMPPUTC(GETBLUE(col));
+	    BMPPUTC(GETGREEN(col));
+	    BMPPUTC(GETRED(col));
+	    BMPPUTC(0);
+	}
+	/* Rows must be padded to 4-byte boundary */
+	for (pad = 0; ((width+pad) & 3) != 0; pad++);
+	/* and then the pixels */
+	for (i = height-1 ; i >= 0 ; i--) {
+	    for (j = 0 ; j < width ; j++) {
+		col = gp(d, i, j) & 0xFFFFFF;
+		/* binary search the palette (the colour must be there): */
+		low = 0;  high = ncols - 1;
+		while (low <= high) {
+		    mid = (low + high)/2;
+		    if      (col < palette[mid]) high = mid - 1;
+		    else if (col > palette[mid]) low  = mid + 1;
+		    else break;
+		}
+		BMPPUTC(mid);
+	    }
+	    for (j = 0; j < pad; j++) BMPPUTC(0);
+	}
+    } else {
+	/* 24 bits image */
+	BMPDW(0); /* null bmiColors */
+	for (pad = 0; ((3*width+pad) & 3) != 0; pad++); /*padding*/
+	for (i = height-1 ; i>=0 ; i--) {
+	    for (j = 0 ; j < width ; j++) {
+		col = gp(d, i, j) & 0xFFFFFF;
+		BMPPUTC(GETBLUE(col));
+		BMPPUTC(GETGREEN(col));
+		BMPPUTC(GETRED(col));
+	    }
+	    for (j = 0; j < pad; j++) BMPPUTC(0);
+	}
+    }
+    return 1;
+}
+
+const char * R_pngVersion(void)
+{
+#ifdef HAVE_PNG
+    return png_get_header_ver(NULL /*ignored*/);
+#else
+    return "";
+#endif
+}
+const char * R_jpegVersion(void)
+{
+#ifdef HAVE_JPEG
+    static char ans[10];
+#ifdef JPEG_LIB_VERSION_MAJOR
+    sprintf(ans, "%d.%d", JPEG_LIB_VERSION_MAJOR, JPEG_LIB_VERSION_MINOR);
+#else
+    sprintf(ans, "%d.%d", JPEG_LIB_VERSION/10, JPEG_LIB_VERSION%10);
+#endif
+    return ans;
+#else
+    return "";
+#endif
+}
+const char * R_tiffVersion(void)
+{
+#ifdef HAVE_TIFF
+    return TIFFGetVersion();
+#else
+    return "";
+#endif
+}
diff --git a/src/library/grDevices/src/winbitmap.h b/src/library/grDevices/src/winbitmap.h
new file mode 100644
index 0000000..1dad7f8
--- /dev/null
+++ b/src/library/grDevices/src/winbitmap.h
@@ -0,0 +1,36 @@
+/*
+ *  R : A Computer Langage for Statistical Data Analysis
+ *  Copyright (C) 2014   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
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, a copy is available at
+ *  https://www.R-project.org/Licenses/
+ */
+extern int 
+R_SaveAsPng(void  *d, int width, int height,
+	    unsigned int (*gp)(void *, int, int),
+	    int bgr, FILE *fp, unsigned int transparent, int res);
+extern int
+R_SaveAsJpeg(void  *d, int width, int height,
+	     unsigned int (*gp)(void *, int, int),
+	     int bgr, int quality, FILE *outfile, int res);
+extern int
+R_SaveAsTIFF(void  *d, int width, int height,
+	     unsigned int (*gp)(void *, int, int),
+	     int bgr, const char *outfile, int res, int compression);
+extern int
+R_SaveAsBmp(void  *d, int width, int height,
+	    unsigned int (*gp)(void *, int, int), int bgr, FILE *fp, int res);
+const char * R_pngVersion(void);
+const char * R_jpegVersion(void);
+const char * R_tiffVersion(void);
diff --git a/src/library/grDevices/tests/ps-tests.Rout.save b/src/library/grDevices/tests/ps-tests.Rout.save
index cfd6206..3d16bba 100644
--- a/src/library/grDevices/tests/ps-tests.Rout.save
+++ b/src/library/grDevices/tests/ps-tests.Rout.save
@@ -1,7 +1,7 @@
 
-R version 3.1.2 RC (2014-10-29 r66897) -- "Pumpkin Helmet"
-Copyright (C) 2014 The R Foundation for Statistical Computing
-Platform: x86_64-unknown-linux-gnu (64-bit)
+R version 3.4.0 RC (2017-04-18 r72543) -- "You Stupid Darkness"
+Copyright (C) 2017 The R Foundation for Statistical Computing
+Platform: x86_64-pc-linux-gnu (64-bit)
 
 R is free software and comes with ABSOLUTELY NO WARRANTY.
 You are welcome to redistribute it under certain conditions.
@@ -95,4 +95,4 @@ null device
 > 
 > proc.time()
    user  system elapsed 
-  0.423   0.018   0.433 
+  0.431   0.019   0.440 
diff --git a/src/library/grDevices/tests/xfig-tests.Rout.save b/src/library/grDevices/tests/xfig-tests.Rout.save
index 1315093..b308a2c 100644
--- a/src/library/grDevices/tests/xfig-tests.Rout.save
+++ b/src/library/grDevices/tests/xfig-tests.Rout.save
@@ -1,7 +1,7 @@
 
-R version 3.1.2 RC (2014-10-29 r66897) -- "Pumpkin Helmet"
-Copyright (C) 2014 The R Foundation for Statistical Computing
-Platform: x86_64-unknown-linux-gnu (64-bit)
+R version 3.4.0 RC (2017-04-18 r72543) -- "You Stupid Darkness"
+Copyright (C) 2017 The R Foundation for Statistical Computing
+Platform: x86_64-pc-linux-gnu (64-bit)
 
 R is free software and comes with ABSOLUTELY NO WARRANTY.
 You are welcome to redistribute it under certain conditions.
@@ -102,4 +102,4 @@ Type 'q()' to quit R.
 > 
 > proc.time()
    user  system elapsed 
-  0.181   0.019   0.192 
+  0.180   0.014   0.183 
diff --git a/src/library/graphics/DESCRIPTION.in b/src/library/graphics/DESCRIPTION.in
index 2cca126..9dfeca2 100644
--- a/src/library/graphics/DESCRIPTION.in
+++ b/src/library/graphics/DESCRIPTION.in
@@ -4,6 +4,7 @@ Priority: base
 Title: The R Graphics Package
 Author: R Core Team and contributors worldwide
 Maintainer: R Core Team <R-core at r-project.org>
-Description: R functions for base graphics
+Description: R functions for base graphics.
 Imports: grDevices
 License: Part of R @VERSION@
+NeedsCompilation: yes
diff --git a/src/library/graphics/NAMESPACE b/src/library/graphics/NAMESPACE
index a6af66c..b482144 100644
--- a/src/library/graphics/NAMESPACE
+++ b/src/library/graphics/NAMESPACE
@@ -35,6 +35,7 @@ S3method(Axis, table)
 S3method(barplot, default)
 S3method(boxplot, default)
 S3method(boxplot, formula)
+S3method(boxplot, matrix)
 S3method(cdplot, default)
 S3method(cdplot, formula)
 S3method(contour, default)
@@ -58,6 +59,7 @@ S3method(plot, factor)
 S3method(plot, formula)
 S3method(plot, "function")
 S3method(plot, histogram)
+S3method(plot, raster)
 S3method(plot, table)
 S3method(points, default)
 S3method(points, formula)
diff --git a/src/library/graphics/R/abline.R b/src/library/graphics/R/abline.R
index 1580874..326f640 100644
--- a/src/library/graphics/R/abline.R
+++ b/src/library/graphics/R/abline.R
@@ -1,5 +1,5 @@
 #  File src/library/graphics/R/abline.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
 #  Copyright (C) 1995-2012 The R Core Team
 #
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 abline <- function(a = NULL, b = NULL, h = NULL, v = NULL, reg = NULL,
                    coef = NULL, untf = FALSE, ...)
diff --git a/src/library/graphics/R/arrows.R b/src/library/graphics/R/arrows.R
index c1e5840..23ad4a4 100644
--- a/src/library/graphics/R/arrows.R
+++ b/src/library/graphics/R/arrows.R
@@ -1,7 +1,7 @@
 #  File src/library/graphics/R/arrows.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
-#  Copyright (C) 1995-2013 The R Core Team
+#  Copyright (C) 1995-2014 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
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 arrows <-
     function(x0, y0, x1 = x0, y1 = y0, length = 0.25, angle = 30, code = 2,
diff --git a/src/library/graphics/R/assocplot.R b/src/library/graphics/R/assocplot.R
index 069902e..079dcb7 100644
--- a/src/library/graphics/R/assocplot.R
+++ b/src/library/graphics/R/assocplot.R
@@ -1,7 +1,7 @@
 #  File src/library/graphics/R/assocplot.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
-#  Copyright (C) 1995-2013 The R Core Team
+#  Copyright (C) 1995-2014 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
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 assocplot <- function(x, col = c("black", "red"), space = 0.3,
                       main = NULL, xlab = NULL, ylab = NULL)
diff --git a/src/library/graphics/R/axis.R b/src/library/graphics/R/axis.R
index afada46..be404d5 100644
--- a/src/library/graphics/R/axis.R
+++ b/src/library/graphics/R/axis.R
@@ -1,7 +1,7 @@
 #  File src/library/graphics/R/axis.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
-#  Copyright (C) 1995-2013 The R Core Team
+#  Copyright (C) 1995-2014 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
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 axis <- function(side, at = NULL, labels = TRUE, tick = TRUE, line = NA,
                  pos = NA, outer = FALSE, font = NA,
diff --git a/src/library/graphics/R/barplot.R b/src/library/graphics/R/barplot.R
index 803b474..95a1228 100644
--- a/src/library/graphics/R/barplot.R
+++ b/src/library/graphics/R/barplot.R
@@ -1,5 +1,5 @@
 #  File src/library/graphics/R/barplot.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
 #  Copyright (C) 1995-2012 The R Core Team
 #
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 barplot <- function(height, ...) UseMethod("barplot")
 
diff --git a/src/library/graphics/R/box.R b/src/library/graphics/R/box.R
index 2332f43..9de14da 100644
--- a/src/library/graphics/R/box.R
+++ b/src/library/graphics/R/box.R
@@ -1,5 +1,5 @@
 #  File src/library/graphics/R/box.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
 #  Copyright (C) 1995-2012 The R Core Team
 #
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 box <- function(which="plot", lty="solid", ...)
 {
diff --git a/src/library/graphics/R/boxplot.R b/src/library/graphics/R/boxplot.R
index d28a29a..a1dc37d 100644
--- a/src/library/graphics/R/boxplot.R
+++ b/src/library/graphics/R/boxplot.R
@@ -1,7 +1,7 @@
 #  File src/library/graphics/R/boxplot.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
-#  Copyright (C) 1995-2013 The R Core Team
+#  Copyright (C) 1995-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
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 boxplot <- function(x, ...) UseMethod("boxplot")
 
@@ -77,32 +77,36 @@ function(x, ..., range = 1.5, width = NULL, varwidth = FALSE,
 
 boxplot.matrix <- function(x, use.cols = TRUE, ...)
 {
-  ## Purpose: Boxplot for each column or row [use.cols= TRUE / FALSE] of a matrix
-  ## -------------------------------------------------------------------------
-  ## Arguments: x: a numeric matrix; use.cols: logical, columns (T) or rows (F)
-  groups <- if(use.cols) split(x, rep.int(1L:ncol(x),
-                                          rep.int(nrow(x), ncol(x))))
-  else split(x, seq(nrow(x)))
-  ## Make use of col/row names if present
-  if (length(nam <- dimnames(x)[[1+use.cols]])) names(groups) <- nam
-  invisible(boxplot(groups, ...))
+    ## Purpose: Boxplot for each column or row [use.cols= TRUE / FALSE] of a matrix
+    ## -------------------------------------------------------------------------
+    ## Arguments: x: a numeric matrix; use.cols: logical, columns (T) or rows (F)
+    ## <FIXME split.matrix>
+    groups <- if(use.cols) {
+        split(c(x), rep.int(1L:ncol(x), rep.int(nrow(x), ncol(x))))
+    } else split(c(x), seq(nrow(x)))
+    ## Make use of col/row names if present
+    if (length(nam <- dimnames(x)[[1+use.cols]])) names(groups) <- nam
+    invisible(boxplot(groups, ...))
 }
 
 boxplot.formula <-
-    function(formula, data = NULL, ..., subset, na.action = NULL)
+    function(formula, data = NULL, ..., subset, na.action = NULL,
+	     drop = FALSE, sep = ".", lex.order = FALSE)
 {
     if(missing(formula) || (length(formula) != 3L))
 	stop("'formula' missing or incorrect")
     m <- match.call(expand.dots = FALSE)
     if(is.matrix(eval(m$data, parent.frame())))
 	m$data <- as.data.frame(data)
-    m$... <- NULL
+    m$... <- m$drop <- m$sep <- m$lex.order <- NULL
     m$na.action <- na.action # force use of default for this method
-    require(stats, quietly = TRUE)
+    ## need stats:: for non-standard evaluation
     m[[1L]] <- quote(stats::model.frame)
     mf <- eval(m, parent.frame())
     response <- attr(attr(mf, "terms"), "response")
-    boxplot(split(mf[[response]], mf[-response]), ...)
+    boxplot(split(mf[[response]], mf[-response],
+		  drop = drop, sep = sep, lex.order = lex.order),
+	    ...)
 }
 
 bxp <- function(z, notch = FALSE, width = NULL, varwidth = FALSE,
diff --git a/src/library/graphics/R/cdplot.R b/src/library/graphics/R/cdplot.R
index a238634..309ad27 100644
--- a/src/library/graphics/R/cdplot.R
+++ b/src/library/graphics/R/cdplot.R
@@ -1,7 +1,7 @@
 #  File src/library/graphics/R/cdplot.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
-#  Copyright (C) 1995-2013 The R Core Team
+#  Copyright (C) 1995-2015 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
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 ## CD plots contributed by Achim Zeileis
 
@@ -33,7 +33,7 @@ function(formula, data = list(),
     ## extract x, y from formula
     m <- match.call(expand.dots = FALSE)
     m <- m[c(1L, match(c("formula", "data", "subset"), names(m), 0L))]
-    require(stats, quietly=TRUE)
+    ## need stats:: for non-standard evaluation
     m[[1L]] <- quote(stats::model.frame)
     mf <- eval.parent(m)
     if(NCOL(mf) != 2L)
diff --git a/src/library/graphics/R/contour.R b/src/library/graphics/R/contour.R
index 09d035a..7b49e11 100644
--- a/src/library/graphics/R/contour.R
+++ b/src/library/graphics/R/contour.R
@@ -1,5 +1,5 @@
 #  File src/library/graphics/R/contour.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
 #  Copyright (C) 1995-2012 The R Core Team
 #
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 contour <- function(x, ...) UseMethod("contour")
 
@@ -63,8 +63,11 @@ function (x = seq(0, 1, length.out = nrow(z)),
     if (!is.null(vfont))
         vfont <- c(typeface = pmatch(vfont[1L], Hershey$typeface),
                    fontindex = pmatch(vfont[2L], Hershey$fontindex))
-    if (!is.null(labels))
+    if (!is.null(labels)) {
         labels <- as.character(labels)
+	if (drawlabels && !length(labels))
+	    stop("'labels' is length zero.  Use 'drawlabels = FALSE' to suppress labels.")
+    }
     .External.graphics(C_contour, x, y, z, levels, labels, labcex, drawlabels,
                        method, vfont, col, lty, lwd)
     if(!add) {
diff --git a/src/library/graphics/R/coplot.R b/src/library/graphics/R/coplot.R
index 2f3ff77..854c06b 100644
--- a/src/library/graphics/R/coplot.R
+++ b/src/library/graphics/R/coplot.R
@@ -1,5 +1,5 @@
 #  File src/library/graphics/R/coplot.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
 #  Copyright (C) 1995-2013 The R Core Team
 #
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 co.intervals <- function (x, number = 6, overlap = 0.5)
 {
diff --git a/src/library/graphics/R/curve.R b/src/library/graphics/R/curve.R
index 3a53e23..7525dc3 100644
--- a/src/library/graphics/R/curve.R
+++ b/src/library/graphics/R/curve.R
@@ -1,5 +1,5 @@
 #  File src/library/graphics/R/curve.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
 #  Copyright (C) 1995-2012 The R Core Team
 #
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 curve <- function(expr, from = NULL, to = NULL, n = 101, add = FALSE,
                   type = "l", xname = "x", xlab = xname,
diff --git a/src/library/graphics/R/datetime.R b/src/library/graphics/R/datetime.R
index d83cf03..8312624 100644
--- a/src/library/graphics/R/datetime.R
+++ b/src/library/graphics/R/datetime.R
@@ -1,7 +1,7 @@
 #  File src/library/graphics/R/datetime.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
-#  Copyright (C) 1995-2012 The R Core Team
+#  Copyright (C) 1995-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
@@ -14,13 +14,13 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 axis.POSIXct <- function(side, x, at, format, labels = TRUE, ...)
 {
-    mat <- missing(at) || is.null(at)
-    if(!mat) x <- as.POSIXct(at) else x <- as.POSIXct(x)
-    range <- par("usr")[if(side %%2) 1L:2L else 3L:4L]
+    has.at <- !missing(at) && !is.null(at)
+    x <- as.POSIXct(if(has.at) at else x)
+    range <- sort(par("usr")[if(side %% 2) 1L:2L else 3L:4L])
     ## find out the scale involved
     d <- range[2L] - range[1L]
     z <- c(range, x[is.finite(x)])
@@ -72,7 +72,7 @@ axis.POSIXct <- function(side, x, at, format, labels = TRUE, ...)
         z <- as.POSIXct(.POSIXlt(zz))
         if(missing(format)) format <- "%Y"
     }
-    if(!mat) z <- x[is.finite(x)] # override changes
+    if(has.at) z <- x[is.finite(x)] # override changes
     keep <- z >= range[1L] & z <= range[2L]
     z <- z[keep]
     if (!is.logical(labels)) labels <- labels[keep]
@@ -85,7 +85,7 @@ axis.POSIXct <- function(side, x, at, format, labels = TRUE, ...)
 
 hist.POSIXt <- function(x, breaks, ..., xlab = deparse(substitute(x)),
                         plot = TRUE, freq = FALSE,
-                        start.on.monday = TRUE, format)
+                        start.on.monday = TRUE, format, right = TRUE)
 {
     if(!inherits(x, "POSIXt")) stop("wrong method")
     xlab
@@ -136,7 +136,9 @@ hist.POSIXt <- function(x, breaks, ..., xlab = deparse(substitute(x)),
                 end$isdst <- -1L
                 breaks <- seq(start, end, "months")
                 ind <- seq_along(breaks[-1L])
-                breaks[ind] <- breaks[ind] - 86400
+                if (right)
+                    breaks[ind] <- breaks[ind] - 86400
+		if (missing(format)) format <- "%Y-%m-%d"
             } else if(valid == 7L) { # "years"
                 start$mon <- 0L
                 start$mday <- 1L
@@ -147,7 +149,9 @@ hist.POSIXt <- function(x, breaks, ..., xlab = deparse(substitute(x)),
                 end$isdst <- -1L
                 breaks <- seq(start, end, "years")
                 ind <- seq_along(breaks[-1L])
-                breaks[ind] <- breaks[ind] - 86400
+                if (right)
+                    breaks[ind] <- breaks[ind] - 86400
+		if (missing(format)) format <- "%Y-%m-%d"
             } else if(valid == 8L) { # "quarters"
                 qtr <- rep(c(0L, 3L, 6L, 9L), each = 3L)
                 start$mon <- qtr[start$mon + 1L]
@@ -159,7 +163,9 @@ hist.POSIXt <- function(x, breaks, ..., xlab = deparse(substitute(x)),
                 end$isdst <- -1L
                 breaks <- seq(start, end, "3 months")
                 ind <- seq_along(breaks[-1L])
-                breaks[ind] <- breaks[ind] - 86400
+                if (right)
+                    breaks[ind] <- breaks[ind] - 86400
+		if (missing(format)) format <- "%Y-%m-%d"
            } else { # "days" or "weeks"
                 maxx <- max(x, na.rm = TRUE)
                 breaks <- seq(start, maxx + incr, breaks)
@@ -169,7 +175,7 @@ hist.POSIXt <- function(x, breaks, ..., xlab = deparse(substitute(x)),
         else stop("invalid specification of 'breaks'")
     }
     res <- hist.default(unclass(x), unclass(breaks), plot = FALSE,
-                        warn.unused = FALSE, ...)
+                        warn.unused = FALSE, right = right, ...)
     res$equidist <- TRUE # years are of uneven lengths
     res$intensities <- res$intensities*incr
     res$xname <- xlab
@@ -200,9 +206,9 @@ hist.POSIXt <- function(x, breaks, ..., xlab = deparse(substitute(x)),
 
 axis.Date <- function(side, x, at, format, labels = TRUE, ...)
 {
-    mat <- missing(at) || is.null(at)
-    if(!mat) x <- as.Date(at) else x <- as.Date(x)
-    range <- par("usr")[if(side %%2) 1L:2L else 3:4L]
+    has.at <- !missing(at) && !is.null(at)
+    x <- as.Date(if(has.at) at else x)
+    range <- sort(par("usr")[if(side %% 2) 1L:2L else 3:4L])
     range[1L] <- ceiling(range[1L])
     range[2L] <- floor(range[2L])
     ## find out the scale involved
@@ -230,7 +236,7 @@ axis.Date <- function(side, x, at, format, labels = TRUE, ...)
         z <- as.Date(zz)
         if(missing(format)) format <- "%Y"
     }
-    if(!mat) z <- x[is.finite(x)] # override changes
+    if(has.at) z <- x[is.finite(x)] # override changes
     keep <- z >= range[1L] & z <= range[2L]
     z <- z[keep]
     z <- sort(unique(z)); class(z) <- "Date"
@@ -245,7 +251,7 @@ axis.Date <- function(side, x, at, format, labels = TRUE, ...)
 
 hist.Date <- function(x, breaks, ..., xlab = deparse(substitute(x)),
                       plot = TRUE, freq = FALSE,
-                      start.on.monday = TRUE, format)
+                      start.on.monday = TRUE, format, right = TRUE)
 {
     if(!inherits(x, "Date")) stop("wrong method")
     force(xlab)
@@ -285,7 +291,10 @@ hist.Date <- function(x, breaks, ..., xlab = deparse(substitute(x)),
                 end <- as.POSIXlt(end + (31 * 86400))
                 end$mday <- 1
                 end$isdst <- -1
-                breaks <- as.Date(seq(start, end, "months")) - 1
+                breaks <- as.Date(seq(start, end, "months"))
+                if (right)
+                    breaks <- breaks - 1
+		if (missing(format)) format <- "%Y-%m-%d"
             } else if(valid == 4L) { ## "years"
                 start$mon <- 0L
                 start$mday <- 1L
@@ -294,7 +303,10 @@ hist.Date <- function(x, breaks, ..., xlab = deparse(substitute(x)),
                 end$mon <- 0L
                 end$mday <- 1L
                 end$isdst <- -1
-                breaks <- as.Date(seq(start, end, "years")) - 1
+                breaks <- as.Date(seq(start, end, "years"))
+                if (right)
+                    breaks <- breaks - 1
+		if (missing(format)) format <- "%Y-%m-%d"
             } else if(valid == 5L) { ## "quarters"
                 qtr <- rep(c(0L, 3L, 6L, 9L), each = 3L)
                 start$mon <- qtr[start$mon + 1L]
@@ -304,7 +316,10 @@ hist.Date <- function(x, breaks, ..., xlab = deparse(substitute(x)),
                 end$mon <- qtr[end$mon + 1L]
                 end$mday <- 1L
                 end$isdst <- -1
-                breaks <- as.Date(seq(start, end, "3 months")) - 1
+                breaks <- as.Date(seq(start, end, "3 months"))
+                if (right)
+                    breaks <- breaks - 1
+		if (missing(format)) format <- "%Y-%m-%d"
             } else { ## "days" (or "weeks")
                 start <- as.Date(start)
                 maxx <- max(x, na.rm = TRUE)
@@ -313,7 +328,7 @@ hist.Date <- function(x, breaks, ..., xlab = deparse(substitute(x)),
             }
         } else stop("invalid specification of 'breaks'")
     }
-    res <- hist.default(unclass(x), unclass(breaks), plot = FALSE, warn.unused = FALSE, ...)
+    res <- hist.default(unclass(x), unclass(breaks), plot = FALSE, warn.unused = FALSE, right = right, ...)
     res$equidist <- TRUE # years are of uneven lengths
     res$intensities <- res$intensities*incr
     res$xname <- xlab
diff --git a/src/library/graphics/R/dotchart.R b/src/library/graphics/R/dotchart.R
index f9e2dac..5b0dbf1 100644
--- a/src/library/graphics/R/dotchart.R
+++ b/src/library/graphics/R/dotchart.R
@@ -1,7 +1,7 @@
 #  File src/library/graphics/R/dotchart.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
-#  Copyright (C) 1995-2013 The R Core Team
+#  Copyright (C) 1995-2014 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
@@ -14,10 +14,11 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 dotchart <-
-function(x, labels = NULL, groups = NULL, gdata = NULL, cex = par("cex"),
+function(x, labels = NULL, groups = NULL, gdata = NULL,
+         cex = par("cex"), pt.cex = cex,
 	 pch = 21, gpch = 21, bg = par("bg"), color = par("fg"),
 	 gcolor = par("fg"), lcolor = "gray",
 	 xlim = range(x[is.finite(x)]),
@@ -97,7 +98,7 @@ function(x, labels = NULL, groups = NULL, gdata = NULL, cex = par("cex"),
               col = color, las = 2, cex = cex, ...)
     }
     abline(h = y, lty = "dotted", col = lcolor)
-    points(x, y, pch = pch, col = color, bg = bg)
+    points(x, y, pch = pch, col = color, bg = bg, cex = pt.cex/cex)
     if (!is.null(groups)) {
 	gpos <- rev(cumsum(rev(tapply(groups, groups, length)) + 2) - 1)
 	ginch <- max(strwidth(glabels, "inch"), na.rm = TRUE)
@@ -106,7 +107,8 @@ function(x, labels = NULL, groups = NULL, gdata = NULL, cex = par("cex"),
               adj = 0, col = gcolor, las = 2, cex = cex, ...)
 	if (!is.null(gdata)) {
 	    abline(h = gpos, lty = "dotted")
-	    points(gdata, gpos, pch = gpch, col = gcolor, bg = bg, ...)
+	    points(gdata, gpos, pch = gpch, col = gcolor, bg = bg,
+                   cex = pt.cex/cex, ...)
 	}
     }
     axis(1)
diff --git a/src/library/graphics/R/filled.contour.R b/src/library/graphics/R/filled.contour.R
index 988a8ac..5ceb5b9 100644
--- a/src/library/graphics/R/filled.contour.R
+++ b/src/library/graphics/R/filled.contour.R
@@ -1,5 +1,5 @@
 #  File src/library/graphics/R/filled.contour.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
 #  Copyright (C) 1995-2012 The R Core Team
 #
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 filled.contour <-
 function (x = seq(0, 1, length.out = nrow(z)),
diff --git a/src/library/graphics/R/fourfoldplot.R b/src/library/graphics/R/fourfoldplot.R
index 91c4136..3c92fd7 100644
--- a/src/library/graphics/R/fourfoldplot.R
+++ b/src/library/graphics/R/fourfoldplot.R
@@ -1,7 +1,7 @@
 #  File src/library/graphics/R/fourfoldplot.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
-#  Copyright (C) 1995-2012 The R Core Team
+#  Copyright (C) 1995-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
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 fourfoldplot <-
 function(x, color = c("#99CCFF", "#6699CC"), conf.level = 0.95,
@@ -160,7 +160,7 @@ function(x, color = c("#99CCFF", "#6699CC"), conf.level = 0.95,
     angle.f <- c( 90, 180,  0, 270)     # 'f' for 'from'
     angle.t <- c(180, 270, 90, 360)     # 't' for 'to'
 
-    opar <- par(mar = c(0, 0, ifelse(is.null(main), 0, 2.5), 0))
+    opar <- par(mar = c(0, 0, if(is.null(main)) 0 else 2.5, 0))
     on.exit(par(opar))
 
     byrow <- FALSE
diff --git a/src/library/graphics/R/grid.R b/src/library/graphics/R/grid.R
index c9a4d5d..176c8b1 100644
--- a/src/library/graphics/R/grid.R
+++ b/src/library/graphics/R/grid.R
@@ -1,5 +1,5 @@
 #  File src/library/graphics/R/grid.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
 #  Copyright (C) 1995-2012 The R Core Team
 #
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 grid <- function (nx = NULL, ny = nx, col="lightgray", lty="dotted",
                   lwd = par("lwd"), equilogs = TRUE)
diff --git a/src/library/graphics/R/hist.R b/src/library/graphics/R/hist.R
index cc13739..65fb03a 100644
--- a/src/library/graphics/R/hist.R
+++ b/src/library/graphics/R/hist.R
@@ -1,7 +1,7 @@
 #  File src/library/graphics/R/hist.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
-#  Copyright (C) 1995-2013 The R Core Team
+#  Copyright (C) 1995-2014 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
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 hist <- function(x, ...) UseMethod("hist")
 
@@ -23,7 +23,7 @@ hist.default <-
 	      probability = !freq, include.lowest= TRUE,
 	      right = TRUE, density = NULL, angle = 45,
 	      col = NULL, border = NULL,
-	      main = paste("Histogram of" , xname),
+	      main = paste("Histogram of", xname),
 	      xlim = range(breaks), ylim = NULL,
 	      xlab = xname, ylab,
 	      axes = TRUE, plot = TRUE, labels = FALSE, nclass = NULL,
@@ -107,18 +107,15 @@ hist.default <-
     ## the boundaries
     ## As one break point could be very much larger than the others,
     ## as from 1.9.1 we no longer use the range. (PR#6931)
-    ## diddle <- 1e-7 * max(abs(range(breaks)))
-    diddle <- 1e-7 * stats::median(diff(breaks))
+    ## diddle <- 1e-7 * max(abs(range(breaks)))  ## NB: h == diff(breaks)
+    diddle <- 1e-7 * if(nB > 5) stats::median(h)
+    ## for few breaks, protect against very large bins:
+		     else if(nB <= 3) diff(range(x)) else min(h[h > 0])
     fuzz <- if(right)
-	c(if(include.lowest) - diddle else diddle,
-          rep.int(diddle, length(breaks) - 1))
+	c(if(include.lowest) -diddle else diddle, rep.int(diddle, nB - 1L))
     else
-	c(rep.int(-diddle, length(breaks) - 1),
-          if(include.lowest) diddle else -diddle)
-
+	c(rep.int(-diddle, nB - 1L), if(include.lowest) diddle else -diddle)
     fuzzybreaks <- breaks + fuzz
-    h <- diff(fuzzybreaks)
-
     ## With the fuzz adjustment above, the "right" and "include"
     ## arguments are often irrelevant (but not with integer data!)
     counts <- .Call(C_BinCount, x, fuzzybreaks, right, include.lowest)
@@ -126,7 +123,7 @@ hist.default <-
 	stop("negative 'counts'. Internal Error.", domain = NA)
     if (sum(counts) < n)
 	stop("some 'x' not counted; maybe 'breaks' do not span range of 'x'")
-    dens <- counts/(n*diff(breaks)) # use un-fuzzed intervals
+    dens <- counts/(n*h) # use un-fuzzed intervals
     mids <- 0.5 * (breaks[-1L] + breaks[-nB])
     r <- structure(list(breaks = breaks, counts = counts,
 			density = dens, mids = mids,
diff --git a/src/library/graphics/R/identify.R b/src/library/graphics/R/identify.R
index ffddbc9..7b247ba 100644
--- a/src/library/graphics/R/identify.R
+++ b/src/library/graphics/R/identify.R
@@ -1,7 +1,7 @@
 #  File src/library/graphics/R/identify.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
-#  Copyright (C) 1995-2012 The R Core Team
+#  Copyright (C) 1995-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
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 identify <- function(x, ...) UseMethod("identify")
 
@@ -27,7 +27,7 @@ identify.default <-
         opar <- par(extras)
         on.exit(par(opar))
     }
-    xy <- xy.coords(x, y)
+    xy <- xy.coords(x, y, setLab = FALSE)
     x <- xy$x
     y <- xy$y
     if (length(x)==0) {
diff --git a/src/library/graphics/R/image.R b/src/library/graphics/R/image.R
index 877d5e1..9e1c44b 100644
--- a/src/library/graphics/R/image.R
+++ b/src/library/graphics/R/image.R
@@ -1,7 +1,7 @@
 #  File src/library/graphics/R/image.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
-#  Copyright (C) 1995-2013 The R Core Team
+#  Copyright (C) 1995-2014 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
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 image <- function(x, ...) UseMethod("image")
 
@@ -44,8 +44,8 @@ image.default <- function (x = seq(0, 1, length.out = nrow(z)),
 	} else stop("no 'z' matrix specified")
     } else if (is.list(x)) {
 	xn <- deparse(substitute(x))
-	if (missing(xlab)) xlab <- paste(xn, "x", sep = "$")
-	if (missing(ylab)) ylab <- paste(xn, "y", sep = "$")
+	if (missing(xlab)) xlab <- paste0(xn, "$x")
+	if (missing(ylab)) ylab <- paste0(xn, "$y")
 	y <- x$y
 	x <- x$x
     } else {
@@ -60,15 +60,17 @@ image.default <- function (x = seq(0, 1, length.out = nrow(z)),
 	stop("increasing 'x' and 'y' values expected")
     if (!is.matrix(z))
         stop("'z' must be a matrix")
+    if (!typeof(z) %in% c("logical", "integer", "double"))
+        stop("'z' must be numeric or logical")
     if (length(x) > 1 && length(x) == nrow(z)) { # midpoints
         dx <- 0.5*diff(x)
-        x <- c(x[1L] - dx[1L], x[-length(x)]+dx,
-               x[length(x)]+dx[length(x)-1])
+        x <- c(x[1L] - dx[1L], x[-length(x)] + dx,
+               x[length(x)] + dx[length(x)-1])
     }
     if (length(y) > 1 && length(y) == ncol(z)) { # midpoints
         dy <- 0.5*diff(y)
-        y <- c(y[1L] - dy[1L], y[-length(y)]+dy,
-               y[length(y)]+dy[length(y)-1L])
+        y <- c(y[1L] - dy[1L], y[-length(y)] + dy,
+               y[length(y)] + dy[length(y)-1L])
     }
 
     if (missing(breaks)) {
diff --git a/src/library/graphics/R/layout.R b/src/library/graphics/R/layout.R
index 41662e0..8741711 100644
--- a/src/library/graphics/R/layout.R
+++ b/src/library/graphics/R/layout.R
@@ -1,5 +1,5 @@
 #  File src/library/graphics/R/layout.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
 #  Copyright (C) 1995-2012 The R Core Team
 #
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 lcm <- function(x) paste(x, "cm")#-> 3 characters (used in layout!)
 
diff --git a/src/library/graphics/R/legend.R b/src/library/graphics/R/legend.R
index 820ae99..3c1c461 100644
--- a/src/library/graphics/R/legend.R
+++ b/src/library/graphics/R/legend.R
@@ -1,7 +1,7 @@
 #  File src/library/graphics/R/legend.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
-#  Copyright (C) 1995-2012 The R Core Team
+#  Copyright (C) 1995-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
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 legend <-
 function(x, y = NULL, legend, fill = NULL, col = par("col"), border="black",
@@ -53,7 +53,7 @@ function(x, y = NULL, legend, fill = NULL, col = par("col"), border="black",
 	else NA
 
     if (is.na(auto)) {
-	xy <- xy.coords(x, y); x <- xy$x; y <- xy$y
+	xy <- xy.coords(x, y, setLab = FALSE); x <- xy$x; y <- xy$y
 	nx <- length(x)
 	if (nx < 1 || nx > 2) stop("invalid coordinate lengths")
     } else nx <- 0
@@ -171,7 +171,7 @@ function(x, y = NULL, legend, fill = NULL, col = par("col"), border="black",
 	h <- (n.legpercol + !is.null(title)) * ychar + yc
 	w0 <- text.width + (x.intersp + 1) * xchar
 	if(mfill)	w0 <- w0 + dx.fill
-	if(do.lines)		w0 <- w0 + (seg.len + x.off)*xchar
+	if(do.lines)	w0 <- w0 + (seg.len + x.off)*xchar
 	w <- ncol*w0 + .5* xchar
 	if (!is.null(title)
 	    && (abs(tw <- strwidth(title, units="user", cex=cex) + 0.5*xchar)) > abs(w)) {
diff --git a/src/library/graphics/R/lines.R b/src/library/graphics/R/lines.R
index 5fef0a5..59f8374 100644
--- a/src/library/graphics/R/lines.R
+++ b/src/library/graphics/R/lines.R
@@ -1,5 +1,5 @@
 #  File src/library/graphics/R/lines.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
 #  Copyright (C) 1995-2012 The R Core Team
 #
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 lines <- function(x, ...) UseMethod("lines")
 
diff --git a/src/library/graphics/R/locator.R b/src/library/graphics/R/locator.R
index 0c57148..886a9f3 100644
--- a/src/library/graphics/R/locator.R
+++ b/src/library/graphics/R/locator.R
@@ -1,5 +1,5 @@
 #  File src/library/graphics/R/locator.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
 #  Copyright (C) 1995-2012 The R Core Team
 #
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 locator <- function(n = 512, type="n", ...)
 {
diff --git a/src/library/graphics/R/matplot.R b/src/library/graphics/R/matplot.R
index e4003b1..415ac55 100644
--- a/src/library/graphics/R/matplot.R
+++ b/src/library/graphics/R/matplot.R
@@ -1,5 +1,5 @@
 #  File src/library/graphics/R/matplot.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
 #  Copyright (C) 1995-2012 The R Core Team
 #
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 ## Author: Martin Maechler, Date: 27 Jun 97
 
diff --git a/src/library/graphics/R/mosaicplot.R b/src/library/graphics/R/mosaicplot.R
index fa62c2d..41eab30 100644
--- a/src/library/graphics/R/mosaicplot.R
+++ b/src/library/graphics/R/mosaicplot.R
@@ -1,7 +1,7 @@
 #  File src/library/graphics/R/mosaicplot.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
-#  Copyright (C) 1995-2013 The R Core Team
+#  Copyright (C) 1995-2015 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
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 ## Original code copyright (C) 1998 John W. Emerson
 ## This version distributed under GPL (version 2 or later)
@@ -180,12 +180,7 @@ function(x, main = deparse(substitute(x)), sub = NULL, xlab = NULL,
     dimd <- length(dx <- dim(x))
     if(dimd == 0L || any(dx == 0L))
         stop("'x' must not have 0 dimensionality")
-    if(!missing(...))
-        warning(sprintf(ngettext(length(list(...)),
-                                 "extra argument %s will be disregarded",
-                                 "extra arguments %s will be disregarded"),
-                         paste(sQuote(names(list(...))), collapse = ", ")),
-                domain = NA)
+    chkDots(...)
     ##-- Set up 'Ind' matrix : to contain indices and data
     Ind <- 1L:dx[1L]
     if(dimd > 1L) {
@@ -400,7 +395,7 @@ function(formula, data = NULL, ...,
        || inherits(edata, "table")
        || length(dim(edata)) > 2) {
         data <- as.table(data)
-        varnames <- attr(stats:::terms.formula(formula), "term.labels")
+        varnames <- attr(stats::terms.formula(formula), "term.labels")
         if(all(varnames != "."))
             data <- margin.table(data,
                                  match(varnames, names(dimnames(data))))
@@ -410,6 +405,7 @@ function(formula, data = NULL, ...,
             m$data <- as.data.frame(data)
         m$main <- m$... <- NULL
         m$na.action <- na.action
+        ## need stats:: for non-standard evaluation
         m[[1L]] <- quote(stats::model.frame)
         mf <- eval(m, parent.frame())
         mosaicplot(table(mf), main = main, ...)
diff --git a/src/library/graphics/R/mtext.R b/src/library/graphics/R/mtext.R
index 5772023..5a431a9 100644
--- a/src/library/graphics/R/mtext.R
+++ b/src/library/graphics/R/mtext.R
@@ -1,5 +1,5 @@
 #  File src/library/graphics/R/mtext.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
 #  Copyright (C) 1995-2012 The R Core Team
 #
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 mtext <-
 function (text, side = 3, line = 0, outer = FALSE, at = NA,
diff --git a/src/library/graphics/R/pairs.R b/src/library/graphics/R/pairs.R
index 901c463..a9ac898 100644
--- a/src/library/graphics/R/pairs.R
+++ b/src/library/graphics/R/pairs.R
@@ -1,7 +1,7 @@
 #  File src/library/graphics/R/pairs.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
-#  Copyright (C) 1995-2013 The R Core Team
+#  Copyright (C) 1995-2015 The R Core Team
 #  Some parts  Copyright (C) 1999 Dr. Jens Oehlschlaegel-Akiyoshi
 #
 #  This program is free software; you can redistribute it and/or modify
@@ -15,7 +15,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 pairs <- function(x, ...) UseMethod("pairs")
 
@@ -28,7 +28,6 @@ function(formula, data = NULL, ..., subset, na.action = stats::na.pass)
     m$... <- NULL
     m$na.action <- na.action # force in even if  default
     m[[1L]] <- quote(stats::model.frame)
-    require(stats, quietly=TRUE)
     mf <- eval(m, parent.frame())
     pairs(mf, ...)
 }
@@ -42,6 +41,7 @@ function(formula, data = NULL, ..., subset, na.action = stats::na.pass)
 
 pairs.default <-
 function (x, labels, panel = points, ...,
+          horInd = 1:nc, verInd = 1:nc,
           lower.panel = panel, upper.panel = panel,
           diag.panel = NULL, text.panel = textPanel,
           label.pos = 0.5 + has.diag/3, line.main = 3,
@@ -97,7 +97,11 @@ function (x, labels, panel = points, ...,
     }
 
     nc <- ncol(x)
-    if (nc < 2) stop("only one column in the argument to 'pairs'")
+    if (nc < 2L) stop("only one column in the argument to 'pairs'")
+    if(!all(horInd >= 1L && horInd <= nc))
+        stop("invalid argument 'horInd'")
+    if(!all(verInd >= 1L && verInd <= nc))
+        stop("invalid argument 'verInd'")
     if(doText) {
 	if (missing(labels)) {
 	    labels <- colnames(x)
@@ -109,15 +113,16 @@ function (x, labels, panel = points, ...,
     main <- if("main" %in% nmdots) dots$main
     if (is.null(oma))
 	oma <- c(4, 4, if(!is.null(main)) 6 else 4, 4)
-    opar <- par(mfrow = c(nc, nc), mar = rep.int(gap/2, 4), oma = oma)
+    opar <- par(mfrow = c(length(horInd), length(verInd)),
+                mar = rep.int(gap/2, 4), oma = oma)
     on.exit(par(opar))
     dev.hold(); on.exit(dev.flush(), add = TRUE)
 
     xl <- yl <- logical(nc)
     if (is.numeric(log)) xl[log] <- yl[log] <- TRUE
     else {xl[] <- grepl("x", log); yl[] <- grepl("y", log)}
-    for (i in if(row1attop) 1L:nc else nc:1L)
-        for (j in 1L:nc) {
+    for (i in if(row1attop) verInd else rev(verInd))
+        for (j in horInd) {
             l <- paste0(ifelse(xl[j], "x", ""), ifelse(yl[i], "y", ""))
             localPlot(x[, j], x[, i], xlab = "", ylab = "",
                       axes = FALSE, type = "n", ..., log = l)
diff --git a/src/library/graphics/R/par.R b/src/library/graphics/R/par.R
index 8a7048a..f5a74cd 100644
--- a/src/library/graphics/R/par.R
+++ b/src/library/graphics/R/par.R
@@ -1,7 +1,7 @@
 #  File src/library/graphics/R/par.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
-#  Copyright (C) 1995-2013 The R Core Team
+#  Copyright (C) 1995-2014 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
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 ##-- These are the ones used in ../../../main/par.c  Query(..) :
 ##-- Documentation in		../../../include/Graphics.h
diff --git a/src/library/graphics/R/persp.R b/src/library/graphics/R/persp.R
index e6522ab..25739ca 100644
--- a/src/library/graphics/R/persp.R
+++ b/src/library/graphics/R/persp.R
@@ -1,5 +1,5 @@
 #  File src/library/graphics/R/persp.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
 #  Copyright (C) 1995-2012 The R Core Team
 #
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 persp <- function(x, ...) UseMethod("persp")
 
diff --git a/src/library/graphics/R/pie.R b/src/library/graphics/R/pie.R
index edd5f37..9072513 100644
--- a/src/library/graphics/R/pie.R
+++ b/src/library/graphics/R/pie.R
@@ -1,5 +1,5 @@
 #  File src/library/graphics/R/pie.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
 #  Copyright (C) 1995-2012 The R Core Team
 #
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 pie <-
     function (x, labels = names(x), edges = 200, radius = 0.8,
diff --git a/src/library/graphics/R/plot.R b/src/library/graphics/R/plot.R
index d9c29f3..53b6c7f 100644
--- a/src/library/graphics/R/plot.R
+++ b/src/library/graphics/R/plot.R
@@ -1,7 +1,7 @@
 #  File src/library/graphics/R/plot.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
-#  Copyright (C) 1995-2013 The R Core Team
+#  Copyright (C) 1995-2015 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
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 ### xy.coords() is now in the imported 'grDevices' package
 
@@ -206,7 +206,15 @@ function(formula, data = parent.frame(), ..., subset,
                 do.call(funname,
                         c(list(mf[[i]], y, ylab = yl, xlab = xl), dots))
                }
-	} else do.call(funname, c(list(y, ylab = ylab), dots))
+	} else {
+	    if(length(varnames) == 1L && length(formula) == 3L &&
+	       identical(formula[[2L]], formula[[3L]]))
+		warning(gettextf("the formula '%s' is treated as '%s'",
+				 format(formula),
+				 format(local({ f <- formula; f[[3L]] <- quote(1); f}))),
+			domain=NA)
+	    do.call(funname, c(list(y, ylab = ylab), dots))
+	}
     } else do.call("plot.data.frame", c(list(mf), dots))
     invisible()
 }
diff --git a/src/library/graphics/R/plot.design.R b/src/library/graphics/R/plot.design.R
index da66fad..42ea93c 100644
--- a/src/library/graphics/R/plot.design.R
+++ b/src/library/graphics/R/plot.design.R
@@ -1,7 +1,7 @@
 #  File src/library/graphics/R/plot.design.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
-#  Copyright (C) 1995-2013 The R Core Team
+#  Copyright (C) 1995-2014 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
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 plot.design <-
     function(x, y = NULL, fun = mean, data = NULL, ...,
diff --git a/src/library/graphics/R/points.R b/src/library/graphics/R/points.R
index 037b835..ad9131f 100644
--- a/src/library/graphics/R/points.R
+++ b/src/library/graphics/R/points.R
@@ -1,5 +1,5 @@
 #  File src/library/graphics/R/points.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
 #  Copyright (C) 1995-2012 The R Core Team
 #
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 points <- function(x, ...) UseMethod("points")
 
diff --git a/src/library/graphics/R/polygon.R b/src/library/graphics/R/polygon.R
index 74acdad..40681fd 100644
--- a/src/library/graphics/R/polygon.R
+++ b/src/library/graphics/R/polygon.R
@@ -1,7 +1,7 @@
 #  File src/library/graphics/R/polygon.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
-#  Copyright 1995-2012 The R Core Team
+#  Copyright 1995-2016 The R Core Team
 #  In part (C) 2001 Kevin Buhr
 #
 #  This program is free software; you can redistribute it and/or modify
@@ -15,7 +15,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 ### polyhatch -  a pure R implementation of polygon hatching
 ### Copyright (C) 2001 Kevin Buhr
@@ -29,7 +29,7 @@ polygon <-
     ## FIXME: remove this eventually
     ..debug.hatch <- FALSE
     ##-- FIXME: what if `log' is active, for x or y?
-    xy <- xy.coords(x, y)
+    xy <- xy.coords(x, y, setLab = FALSE)
 
     if (is.numeric(density) && all(is.na(density) | density < 0))
         density <- NULL
@@ -283,7 +283,7 @@ xspline <-
   function(x, y = NULL, shape = 0, open = TRUE, repEnds = TRUE,
            draw = TRUE, border = par("fg"), col = NA, ...)
 {
-    xy <- xy.coords(x, y)
+    xy <- xy.coords(x, y, setLab = FALSE)
     s <- rep.int(shape, length(xy$x))
     if(open) s[1L] <- s[length(x)] <- 0
     invisible(.External.graphics(C_xspline, xy$x, xy$y, s, open, repEnds,
@@ -295,7 +295,7 @@ polypath <-
            border = NULL, col = NA, lty = par("lty"),
            rule = "winding", ...)
 {
-    xy <- xy.coords(x, y)
+    xy <- xy.coords(x, y, setLab = FALSE)
     if (is.logical(border)) {
         if (!is.na(border) && border) border <- par("fg")
         else border <- NA
diff --git a/src/library/graphics/R/raster.R b/src/library/graphics/R/raster.R
index 0863fdc..52c01c6 100644
--- a/src/library/graphics/R/raster.R
+++ b/src/library/graphics/R/raster.R
@@ -1,5 +1,5 @@
 #  File src/library/graphics/R/rect.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
 #  Copyright (C) 1995-2012 The R Core Team
 #
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 rasterImage <- function (image, xleft, ybottom, xright, ytop,
                          angle = 0, interpolate = TRUE, ...)
@@ -26,3 +26,19 @@ rasterImage <- function (image, xleft, ybottom, xright, ytop,
                        as.double(angle), as.logical(interpolate), ...)
     invisible()
 }
+
+plot.raster <- function(x,                  # a "raster" object
+                        y,                  # not used
+                        xlim=c(0, ncol(x)), # by default based on raster dims
+                        ylim=c(0, nrow(x)),
+                        xaxs="i",           # by default fill plot region
+                        yaxs="i",
+                        asp=1,              # by default retain aspect ratio
+                        add=FALSE,          # by default new plot
+                        ...) {
+    if (!add) {
+        plot.new()
+        plot.window(xlim=xlim, ylim=ylim, asp=asp, xaxs=xaxs, yaxs=yaxs)
+    }
+    rasterImage(x, 0, 0, ncol(x), nrow(x), ...)
+}
diff --git a/src/library/graphics/R/rect.R b/src/library/graphics/R/rect.R
index f9be76d..299fb80 100644
--- a/src/library/graphics/R/rect.R
+++ b/src/library/graphics/R/rect.R
@@ -1,5 +1,5 @@
 #  File src/library/graphics/R/rect.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
 #  Copyright (C) 1995-2012 The R Core Team
 #
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 rect <-
   function (xleft, ybottom, xright, ytop, density = NULL, angle = 45,
diff --git a/src/library/graphics/R/rug.R b/src/library/graphics/R/rug.R
index 4a4fa81..497e0a3 100644
--- a/src/library/graphics/R/rug.R
+++ b/src/library/graphics/R/rug.R
@@ -1,5 +1,5 @@
 #  File src/library/graphics/R/rug.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
 #  Copyright (C) 1995-2012 The R Core Team
 #
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 rug <- function(x, ticksize = 0.03, side = 1, lwd = 0.5, col = par("fg"),
 		quiet = getOption("warn") < 0, ...)
diff --git a/src/library/graphics/R/screen.R b/src/library/graphics/R/screen.R
index a4d8673..9c9cb7d 100644
--- a/src/library/graphics/R/screen.R
+++ b/src/library/graphics/R/screen.R
@@ -1,7 +1,7 @@
 #  File src/library/graphics/R/screen.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
-#  Copyright (C) 1995-2012 The R Core Team
+#  Copyright (C) 1995-2015 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
@@ -14,8 +14,11 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
+utils::globalVariables(c(".split.valid.screens", ".split.cur.screen",
+                         ".split.saved.pars", ".split.screens",
+                         ".split.par.list"))
 ## An environment not exported from namespace:graphics used to
 ## store the split.screen settings
 .SSenv <- new.env()
diff --git a/src/library/graphics/R/segments.R b/src/library/graphics/R/segments.R
index bbd2837..22c4390 100644
--- a/src/library/graphics/R/segments.R
+++ b/src/library/graphics/R/segments.R
@@ -1,5 +1,5 @@
 #  File src/library/graphics/R/segments.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
 #  Copyright (C) 1995-2012 The R Core Team
 #
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 segments <-
     function(x0, y0, x1 = x0, y1 = y0, col=par("fg"), lty=par("lty"),
diff --git a/src/library/graphics/R/smoothScatter.R b/src/library/graphics/R/smoothScatter.R
index a71f01c..cdec697 100644
--- a/src/library/graphics/R/smoothScatter.R
+++ b/src/library/graphics/R/smoothScatter.R
@@ -1,7 +1,7 @@
 #  File src/library/graphics/R/smoothScatter.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
-#  Copyright (C) 1995-2012 The R Core Team
+#  Copyright (C) 1995-2015 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
@@ -14,19 +14,21 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 
 smoothScatter <- function(x, y=NULL, nbin=128, bandwidth,
 			  colramp=colorRampPalette(c("white", blues9)),
-			  nrpoints=100, pch=".", cex=1, col="black",
+			  nrpoints=100, ret.selection=FALSE, pch=".", cex=1, col="black",
 			  transformation = function(x) x^.25,
                           postPlotHook = box,
 			  xlab=NULL, ylab=NULL, xlim, ylim,
 			  xaxs=par("xaxs"), yaxs=par("yaxs"), ...)
 {
-    if (!is.numeric(nrpoints) | (nrpoints<0) | (length(nrpoints)!=1) )
+    if (!is.numeric(nrpoints) || nrpoints < 0 || length(nrpoints) != 1)
 	stop("'nrpoints' should be numeric scalar with value >= 0.")
+    nrpoints <- round(nrpoints)
+    ret.selection <- ret.selection && nrpoints > 0
 
     ## similar as in plot.default
     xlabel <- if (!missing(x)) deparse(substitute(x))
@@ -36,18 +38,22 @@ smoothScatter <- function(x, y=NULL, nbin=128, bandwidth,
     ylab <- if (is.null(ylab)) xy$ylab else ylab
 
     ## eliminate non-finite (incl. NA) values
-    x <- cbind(xy$x, xy$y)[ is.finite(xy$x) & is.finite(xy$y), , drop = FALSE]
+    ## want to keep rownames
+    x <- cbind(xy$x, xy$y)[ I <- is.finite(xy$x) & is.finite(xy$y), , drop=FALSE]
+    if(ret.selection) iS <- which(I)
 
     ## xlim and ylim
     if(!missing(xlim)) {
 	stopifnot(is.numeric(xlim), length(xlim)==2, is.finite(xlim))
-	x <- x[ min(xlim) <= x[,1] & x[,1] <= max(xlim), ]
+	x <- x[ I <- min(xlim) <= x[,1] & x[,1] <= max(xlim), , drop=FALSE]
+        if(ret.selection) iS <- iS[I]
     } else {
 	xlim <- range(x[,1])
     }
     if(!missing(ylim)) {
 	stopifnot(is.numeric(ylim), length(ylim)==2, is.finite(ylim))
-	x <- x[ min(ylim) <= x[,2] & x[,2] <= max(ylim), ]
+	x <- x[ I <- min(ylim) <= x[,2] & x[,2] <= max(ylim), , drop=FALSE]
+        if(ret.selection) iS <- iS[I]
     } else {
 	ylim <- range(x[,2])
     }
@@ -61,7 +67,7 @@ smoothScatter <- function(x, y=NULL, nbin=128, bandwidth,
 
     ## plot color image
     image(xm, ym, z=dens, col=colramp(256),
-	  xlab=xlab, ylab=ylab, xlim=xlim, ylim=ylim, xaxs=xaxs, yaxs=yaxs, ...)
+          xlab=xlab, ylab=ylab, xlim=xlim, ylim=ylim, xaxs=xaxs, yaxs=yaxs, ...)
     if(!is.null(postPlotHook))
 	postPlotHook()
 
@@ -75,6 +81,8 @@ smoothScatter <- function(x, y=NULL, nbin=128, bandwidth,
 	ixm <- 1L + as.integer((nx-1)*(x[,1]-xm[1])/(xm[nx]-xm[1]))
 	iym <- 1L + as.integer((ny-1)*(x[,2]-ym[1])/(ym[ny]-ym[1]))
 	sel <- order(dens[cbind(ixm, iym)])[seq_len(nrpoints)]
-	points(x[sel,], pch=pch, cex=cex, col=col)
+	x <- x[sel, , drop=FALSE]
+	points(x, pch=pch, cex=cex, col=col)
+        if(ret.selection) iS[sel]
     }
 }
diff --git a/src/library/graphics/R/spineplot.R b/src/library/graphics/R/spineplot.R
index 4b11ac0..94a0bb7 100644
--- a/src/library/graphics/R/spineplot.R
+++ b/src/library/graphics/R/spineplot.R
@@ -1,7 +1,7 @@
 #  File src/library/graphics/R/spineplot.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
-#  Copyright (C) 1995-2013 The R Core Team
+#  Copyright (C) 1995-2015 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
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 ## Spine plots/Spinograms contributed by Achim Zeileis
 
@@ -28,12 +28,12 @@ function(formula, data = NULL,
          col = NULL, main = "", xlab = NULL, ylab = NULL,
          xaxlabels = NULL, yaxlabels = NULL,
          xlim = NULL, ylim = c(0, 1), axes = TRUE, ...,
-         subset = NULL)
+         subset = NULL, drop.unused.levels = FALSE)
 {
     ## extract x, y from formula
     m <- match.call(expand.dots = FALSE)
-    m <- m[c(1L, match(c("formula", "data", "subset"), names(m), 0L))]
-    require(stats, quietly=TRUE)
+    m <- m[c(1L, match(c("formula", "data", "subset", "drop.unused.levels"), names(m), 0L))]
+    ## need stats:: for non-standard evaluation
     m[[1L]] <- quote(stats::model.frame)
     mf <- eval.parent(m)
     if(NCOL(mf) != 2L)
@@ -121,10 +121,10 @@ function(x, y = NULL,
         breaks <- do.call("hist", breaks)$breaks
         ## categorize x
         x1 <- cut(x, breaks = breaks, include.lowest = TRUE)
-        ## compute rectangle positions on x axis
-        xat <- c(0, cumsum(prop.table(table(x1))))
         ## construct table
         tab <- table(x1, y)
+        ## compute rectangle positions on x axis
+        xat <- c(0, cumsum(prop.table(margin.table(tab, 1)))) # c(0, cumsum(prop.table(table(x1))))
         nx <- NROW(tab)
         xaxlabels <- if(is.null(xaxlabels)) {
 	  if(xnumeric) breaks else c(xorig[1L], xorig[c(diff(as.numeric(x1)) > 0, TRUE)])
diff --git a/src/library/graphics/R/stars.R b/src/library/graphics/R/stars.R
index bcb9e45..78ea319 100644
--- a/src/library/graphics/R/stars.R
+++ b/src/library/graphics/R/stars.R
@@ -1,5 +1,5 @@
 #  File src/library/graphics/R/stars.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
 #  Copyright (C) 1995-2012 The R Core Team
 #
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 ### This code started life as spatial star plots by David A. Andrews.
 ### See http://www.udallas.edu:8080/~andrews/software/software.html
diff --git a/src/library/graphics/R/stem.R b/src/library/graphics/R/stem.R
index 68a3e36..224bd3b 100644
--- a/src/library/graphics/R/stem.R
+++ b/src/library/graphics/R/stem.R
@@ -1,5 +1,5 @@
 #  File src/library/graphics/R/stem.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
 #  Copyright (C) 1995-2013 The R Core Team
 #
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 stem <- function(x, scale = 1, width = 80, atom = 0.00000001)
 {
diff --git a/src/library/graphics/R/stripchart.R b/src/library/graphics/R/stripchart.R
index 4b84787..7f09456 100644
--- a/src/library/graphics/R/stripchart.R
+++ b/src/library/graphics/R/stripchart.R
@@ -1,7 +1,7 @@
 #  File src/library/graphics/R/stripchart.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
-#  Copyright (C) 1995-2014 The R Core Team
+#  Copyright (C) 1995-2015 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
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 ## Dotplots a la Box, Hunter and Hunter
 
@@ -114,7 +114,7 @@ stripchart.formula <-
     m$formula <- m$x
     m$x <- NULL
     m$na.action <- na.action # force use of default for this method
-    require(stats, quietly = TRUE)
+    ## need stats:: for non-standard evaluation
     m[[1L]] <- quote(stats::model.frame)
     mf <- eval(m, parent.frame())
     response <- attr(attr(mf, "terms"), "response")
diff --git a/src/library/graphics/R/strwidth.R b/src/library/graphics/R/strwidth.R
index 0436389..bbd4535 100644
--- a/src/library/graphics/R/strwidth.R
+++ b/src/library/graphics/R/strwidth.R
@@ -1,5 +1,5 @@
 #  File src/library/graphics/R/strwidth.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
 #  Copyright (C) 1995-2012 The R Core Team
 #
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 strwidth <-
     function(s, units = "user", cex = NULL, font = NULL, vfont = NULL,...)
diff --git a/src/library/graphics/R/sunflowerplot.R b/src/library/graphics/R/sunflowerplot.R
index 39d13dc..c268cfb 100644
--- a/src/library/graphics/R/sunflowerplot.R
+++ b/src/library/graphics/R/sunflowerplot.R
@@ -1,7 +1,7 @@
 #  File src/library/graphics/R/sunflowerplot.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
-#  Copyright (C) 1995-2013 The R Core Team
+#  Copyright (C) 1995-2015 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
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 sunflowerplot <- function(x, ...) UseMethod("sunflowerplot")
 
@@ -97,7 +97,7 @@ sunflowerplot.formula <-
 	m$data <- as.data.frame(data)
     m$xlab <- m$ylab <- m$... <- NULL
     m$na.action <- na.action # force use of default for this method
-    require(stats, quietly = TRUE)
+    ## need stats:: for non-standard evaluation
     m[[1L]] <- quote(stats::model.frame)
     mf <- eval(m, parent.frame())
     if(NCOL(mf) != 2L)
diff --git a/src/library/graphics/R/symbols.R b/src/library/graphics/R/symbols.R
index d30224a..c279870 100644
--- a/src/library/graphics/R/symbols.R
+++ b/src/library/graphics/R/symbols.R
@@ -1,5 +1,5 @@
 #  File src/library/graphics/R/symbols.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
 #  Copyright (C) 1995-2012 The R Core Team
 #
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 symbols <-
 function (x, y = NULL, circles, squares, rectangles, stars,
diff --git a/src/library/graphics/R/text.R b/src/library/graphics/R/text.R
index 2680fa7..6bbc439 100644
--- a/src/library/graphics/R/text.R
+++ b/src/library/graphics/R/text.R
@@ -1,7 +1,7 @@
 #  File src/library/graphics/R/text.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
-#  Copyright (C) 1995-2012 The R Core Team
+#  Copyright (C) 1995-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
@@ -14,23 +14,24 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 text <- function(x, ...) UseMethod("text")
 
 text.default <-
-function(x, y = NULL, labels = seq_along(x),
+function(x, y = NULL, labels = seq_along(x$x),
          adj = NULL, pos = NULL, offset = 0.5,
          vfont = NULL, cex = 1, col = NULL, font = NULL, ...)
 {
     if (!missing(y) && (is.character(y) || is.expression(y))) {
 	labels <- y; y <- NULL
     }
+    x <- xy.coords(x,y, recycle = TRUE, setLab = FALSE)
     labels <- as.graphicsAnnot(labels)
     if (!is.null(vfont))
         vfont <- c(typeface = pmatch(vfont[1L], Hershey$typeface),
                    fontindex = pmatch(vfont[2L], Hershey$fontindex))
-    .External.graphics(C_text, xy.coords(x,y, recycle = TRUE), labels,
+    .External.graphics(C_text, x, labels,
                        adj, pos, offset, vfont, cex, col, font, ...)
     invisible()
 }
diff --git a/src/library/graphics/R/title.R b/src/library/graphics/R/title.R
index 7c19fb1..f19d6b3 100644
--- a/src/library/graphics/R/title.R
+++ b/src/library/graphics/R/title.R
@@ -1,5 +1,5 @@
 #  File src/library/graphics/R/title.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
 #  Copyright (C) 1995-2012 The R Core Team
 #
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 title <- function(main=NULL, sub=NULL, xlab=NULL, ylab=NULL,
                   line=NA, outer=FALSE, ...)
diff --git a/src/library/graphics/R/units.R b/src/library/graphics/R/units.R
index dd4c49b..d7a874f 100644
--- a/src/library/graphics/R/units.R
+++ b/src/library/graphics/R/units.R
@@ -1,5 +1,5 @@
 #  File src/library/graphics/R/units.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
 #  Copyright (C) 1995-2012 The R Core Team
 #
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 xinch <- function(x=1, warn.log=TRUE) {
     if(warn.log && par("xlog")) warning("x log scale:  xinch() is nonsense")
diff --git a/src/library/graphics/R/zzz.R b/src/library/graphics/R/zzz.R
index ad51391..8a5308d 100644
--- a/src/library/graphics/R/zzz.R
+++ b/src/library/graphics/R/zzz.R
@@ -1,5 +1,5 @@
 #  File src/library/graphics/R/zzz.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
 #  Copyright (C) 1995-2012 The R Core Team
 #
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 ## <entry>
 ## Deprecated in 1.5.0
diff --git a/src/library/graphics/demo/plotmath.R b/src/library/graphics/demo/plotmath.R
index 1c6a7d7..44144e1 100644
--- a/src/library/graphics/demo/plotmath.R
+++ b/src/library/graphics/demo/plotmath.R
@@ -1,4 +1,4 @@
-#  Copyright (C) 2002-2009 The R Core Team
+#  Copyright (C) 2002-2016 The R Core Team
 
 require(datasets)
 require(grDevices); require(graphics)
@@ -37,7 +37,7 @@ draw.plotmath.cell <- function(expr, i, nr, string = NULL) {
         string <- deparse(expr)
         string <- substr(string, 12, nchar(string) - 1)
     }
-    text((2*(c - 1) + 1), -r, string, col="grey")
+    text((2*(c - 1) + 1), -r, string, col="grey50")
     text((2*c), -r, expr, adj=c(.5,.5))
     rect((2*(c - 1) + .5), -(r - .5), (2*c + .5), -(r + .5), border="grey")
 }
@@ -176,13 +176,15 @@ draw.plotmath.cell(expression(min(g(x), x >= 0)), i, nr); i <- i + 1
 draw.plotmath.cell(expression(inf(S)), i, nr); i <- i + 1
 draw.plotmath.cell(expression(sup(S)), i, nr); i <- i + 1
 
+nr <- 11
 make.table(nr, nc)
 i <- 0
 draw.title.cell("Grouping", i, nr); i <- i + 1
+# Those involving '{ . }' have to be done "by hand"
+draw.plotmath.cell(expression({}(x , y)), i, nr, string="{}(x, y)"); i <- i + 1
 draw.plotmath.cell(expression((x + y)*z), i, nr); i <- i + 1
-draw.plotmath.cell(expression(x^y + z), i, nr); i <- i + 1
+draw.plotmath.cell(expression(x^y + z),   i, nr); i <- i + 1
 draw.plotmath.cell(expression(x^(y + z)), i, nr); i <- i + 1
-# have to do this one by hand
 draw.plotmath.cell(expression(x^{y + z}), i, nr, string="x^{y + z}"); i <- i + 1
 draw.plotmath.cell(expression(group("(", list(a, b), "]")), i, nr); i <- i + 1
 draw.plotmath.cell(expression(bgroup("(", atop(x, y), ")")), i, nr); i <- i + 1
diff --git a/src/library/graphics/man/abline.Rd b/src/library/graphics/man/abline.Rd
index e879df3..3de07f6 100644
--- a/src/library/graphics/man/abline.Rd
+++ b/src/library/graphics/man/abline.Rd
@@ -1,5 +1,5 @@
 % File src/library/graphics/man/abline.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2011 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/graphics/man/arrows.Rd b/src/library/graphics/man/arrows.Rd
index fa7c422..ab0f0bd 100644
--- a/src/library/graphics/man/arrows.Rd
+++ b/src/library/graphics/man/arrows.Rd
@@ -1,5 +1,5 @@
 % File src/library/graphics/man/arrows.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2009 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/graphics/man/assocplot.Rd b/src/library/graphics/man/assocplot.Rd
index 97e2dd3..5143743 100644
--- a/src/library/graphics/man/assocplot.Rd
+++ b/src/library/graphics/man/assocplot.Rd
@@ -1,10 +1,8 @@
 % File src/library/graphics/man/assocplot.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2007 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2014 R Core Team
 % Distributed under GPL 2 or later
 
-\newcommand{\CRANpkg}{\href{http://CRAN.R-project.org/package=#1}{\pkg{#1}}}
-
 \name{assocplot}
 \alias{assocplot}
 \encoding{UTF-8}
diff --git a/src/library/graphics/man/axTicks.Rd b/src/library/graphics/man/axTicks.Rd
index 480921a..8956494 100644
--- a/src/library/graphics/man/axTicks.Rd
+++ b/src/library/graphics/man/axTicks.Rd
@@ -1,5 +1,5 @@
 % File src/library/graphics/man/axTicks.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2011 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/graphics/man/axis.POSIXct.Rd b/src/library/graphics/man/axis.POSIXct.Rd
index 002a121..2082f2f 100644
--- a/src/library/graphics/man/axis.POSIXct.Rd
+++ b/src/library/graphics/man/axis.POSIXct.Rd
@@ -1,6 +1,6 @@
 % File src/library/graphics/man/axis.POSIXct.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2013 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2014 R Core Team
 % Distributed under GPL 2 or later
 
 \name{axis.POSIXct}
diff --git a/src/library/graphics/man/axis.Rd b/src/library/graphics/man/axis.Rd
index 0a7dc05..619bb25 100644
--- a/src/library/graphics/man/axis.Rd
+++ b/src/library/graphics/man/axis.Rd
@@ -1,5 +1,5 @@
 % File src/library/graphics/man/axis.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2011 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/graphics/man/barplot.Rd b/src/library/graphics/man/barplot.Rd
index e8c1a12..d6c561e 100644
--- a/src/library/graphics/man/barplot.Rd
+++ b/src/library/graphics/man/barplot.Rd
@@ -1,5 +1,5 @@
 % File src/library/graphics/man/barplot.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2007 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/graphics/man/box.Rd b/src/library/graphics/man/box.Rd
index 4fa28f4..ba08f44 100644
--- a/src/library/graphics/man/box.Rd
+++ b/src/library/graphics/man/box.Rd
@@ -1,5 +1,5 @@
 % File src/library/graphics/man/box.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2007 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/graphics/man/boxplot.Rd b/src/library/graphics/man/boxplot.Rd
index f735c87..94c68c9 100644
--- a/src/library/graphics/man/boxplot.Rd
+++ b/src/library/graphics/man/boxplot.Rd
@@ -1,10 +1,8 @@
 % File src/library/graphics/man/boxplot.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2008 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2016 R Core Team
 % Distributed under GPL 2 or later
 
-\newcommand{\sspace}{\ifelse{latex}{\out{~}}{ }}
-
 \name{boxplot}
 \alias{boxplot}
 \alias{boxplot.default}
@@ -16,7 +14,8 @@
 \usage{
 boxplot(x, \dots)
 
-\method{boxplot}{formula}(formula, data = NULL, \dots, subset, na.action = NULL)
+\method{boxplot}{formula}(formula, data = NULL, \dots, subset, na.action = NULL,
+        drop = FALSE, sep = ".", lex.order = FALSE)
 
 \method{boxplot}{default}(x, \dots, range = 1.5, width = NULL, varwidth = FALSE,
         notch = FALSE, outline = TRUE, names, plot = TRUE,
@@ -35,6 +34,7 @@ boxplot(x, \dots)
   \item{na.action}{a function which indicates what should happen
     when the data contain \code{NA}s.  The default is to ignore missing
     values in either the response or the group.}
+  \item{drop, sep, lex.order}{passed to \code{\link{split.default}}, see there.}
   \item{x}{for specifying data from which the boxplots are to be
     produced. Either a numeric vector, or a single list containing such
     vectors. Additional unnamed arguments specify further data
@@ -166,14 +166,14 @@ arrows(xi, mn.t - sd.t, xi, mn.t + sd.t,
 ## boxplot on a matrix:
 mat <- cbind(Uni05 = (1:100)/21, Norm = rnorm(100),
              `5T` = rt(100, df = 5), Gam2 = rgamma(100, shape = 2))
-boxplot(as.data.frame(mat),
-        main = "boxplot(as.data.frame(mat), main = ...)")
+boxplot(mat) # directly, calling boxplot.matrix()
+
+## boxplot on a data frame:
+df. <- as.data.frame(mat)
 par(las = 1) # all axis labels horizontal
-boxplot(as.data.frame(mat), main = "boxplot(*, horizontal = TRUE)",
-        horizontal = TRUE)
+boxplot(df., main = "boxplot(*, horizontal = TRUE)", horizontal = TRUE)
 
 ## Using 'at = ' and adding boxplots -- example idea by Roger Bivand :
-
 boxplot(len ~ dose, data = ToothGrowth,
         boxwex = 0.25, at = 1:3 - 0.2,
         subset = supp == "VC", col = "yellow",
@@ -187,6 +187,13 @@ boxplot(len ~ dose, data = ToothGrowth, add = TRUE,
 legend(2, 9, c("Ascorbic acid", "Orange juice"),
        fill = c("yellow", "orange"))
 
+## With less effort (slightly different) using factor *interaction*:
+boxplot(len ~ dose:supp, data = ToothGrowth,
+        boxwex = 0.5, col = c("orange", "yellow"),
+        main = "Guinea Pigs' Tooth Growth",
+        xlab = "Vitamin C dose mg", ylab = "tooth length",
+        sep = ":", lex.order = TRUE, ylim = c(0, 35), yaxs = "i")
+
 ## more examples in  help(bxp)
 }
 \keyword{hplot}
diff --git a/src/library/graphics/man/boxplot.matrix.Rd b/src/library/graphics/man/boxplot.matrix.Rd
index 07e3e12..727f8ac 100644
--- a/src/library/graphics/man/boxplot.matrix.Rd
+++ b/src/library/graphics/man/boxplot.matrix.Rd
@@ -1,10 +1,8 @@
 % File src/library/graphics/man/boxplot.matrix.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 2008 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 2008-2014 R Core Team
 % Distributed under GPL 2 or later
 
-\newcommand{\CRANpkg}{\href{http://CRAN.R-project.org/package=#1}{\pkg{#1}}}
-
 \name{boxplot.matrix}
 \alias{boxplot.matrix}
 \title{Draw a Boxplot for each Column (Row) of a Matrix}
diff --git a/src/library/graphics/man/bxp.Rd b/src/library/graphics/man/bxp.Rd
index fe900c2..1f7ff75 100644
--- a/src/library/graphics/man/bxp.Rd
+++ b/src/library/graphics/man/bxp.Rd
@@ -1,5 +1,5 @@
 % File src/library/graphics/man/bxp.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2007 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/graphics/man/cdplot.Rd b/src/library/graphics/man/cdplot.Rd
index 73cecde..91d13cd 100644
--- a/src/library/graphics/man/cdplot.Rd
+++ b/src/library/graphics/man/cdplot.Rd
@@ -1,5 +1,5 @@
 % File src/library/graphics/man/cdplot.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2007 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/graphics/man/clip.Rd b/src/library/graphics/man/clip.Rd
index 72b4db0..c0f273a 100644
--- a/src/library/graphics/man/clip.Rd
+++ b/src/library/graphics/man/clip.Rd
@@ -1,5 +1,5 @@
 % File src/library/graphics/man/clip.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 2008-2011 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/graphics/man/contour.Rd b/src/library/graphics/man/contour.Rd
index ba0ed3c..698d33c 100644
--- a/src/library/graphics/man/contour.Rd
+++ b/src/library/graphics/man/contour.Rd
@@ -1,11 +1,8 @@
 % File src/library/graphics/man/contour.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2013 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2014 R Core Team
 % Distributed under GPL 2 or later
 
-\newcommand{\CRANpkg}{\href{http://CRAN.R-project.org/package=#1}{\pkg{#1}}}
-\newcommand{\sspace}{\ifelse{latex}{\out{~}}{ }}
-
 \name{contour}
 \alias{contour}
 \alias{contour.default}
diff --git a/src/library/graphics/man/convertXY.Rd b/src/library/graphics/man/convertXY.Rd
index 1573715..2677564 100644
--- a/src/library/graphics/man/convertXY.Rd
+++ b/src/library/graphics/man/convertXY.Rd
@@ -1,6 +1,6 @@
 % File src/library/graphics/man/convertXY.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 2008 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 2008-2014 R Core Team
 % Distributed under GPL 2 or later
 
 \name{convertXY}
diff --git a/src/library/graphics/man/coplot.Rd b/src/library/graphics/man/coplot.Rd
index 5c71c7f..eb6efd6 100644
--- a/src/library/graphics/man/coplot.Rd
+++ b/src/library/graphics/man/coplot.Rd
@@ -1,5 +1,5 @@
 % File src/library/graphics/man/coplot.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2007 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/graphics/man/curve.Rd b/src/library/graphics/man/curve.Rd
index cec3dec..072726d 100644
--- a/src/library/graphics/man/curve.Rd
+++ b/src/library/graphics/man/curve.Rd
@@ -1,5 +1,5 @@
 % File src/library/graphics/man/curve.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2013 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/graphics/man/dotchart.Rd b/src/library/graphics/man/dotchart.Rd
index d935a45..829060a 100644
--- a/src/library/graphics/man/dotchart.Rd
+++ b/src/library/graphics/man/dotchart.Rd
@@ -1,5 +1,5 @@
 % File src/library/graphics/man/dotchart.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2011 R Core Team
 % Distributed under GPL 2 or later
 
@@ -11,7 +11,8 @@
 }
 \usage{
 dotchart(x, labels = NULL, groups = NULL, gdata = NULL,
-         cex = par("cex"), pch = 21, gpch = 21, bg = par("bg"),
+         cex = par("cex"), pt.cex = cex,
+         pch = 21, gpch = 21, bg = par("bg"),
          color = par("fg"), gcolor = par("fg"), lcolor = "gray",
          xlim = range(x[is.finite(x)]),
          main = NULL, xlab = NULL, ylab = NULL, \dots)
@@ -37,6 +38,8 @@ dotchart(x, labels = NULL, groups = NULL, gdata = NULL,
     to a value smaller than one can be a useful way of avoiding label
     overlap.  Unlike many other graphics functions, this sets the actual
     size, not a multiple of \code{par("cex")}.}
+  \item{pt.cex}{the \code{cex} to be applied to plotting symbols.
+    This behaves like \code{cex} in \code{plot()}.}
   \item{pch}{the plotting character or symbol to be used.}
   \item{gpch}{the plotting character or symbol to be used for group
     values.}
@@ -48,7 +51,7 @@ dotchart(x, labels = NULL, groups = NULL, gdata = NULL,
     values.}
   \item{lcolor}{the color(s) to be used for the horizontal lines.}
   \item{xlim}{horizontal range for the plot, see
-    \code{\link{plot.window}}, e.g.}
+    \code{\link{plot.window}}, for example.}
   \item{main}{overall title for the plot, see \code{\link{title}}.}
   \item{xlab, ylab}{axis annotations as in \code{title}.}
   \item{\dots}{\link{graphical parameters} can also be specified as arguments.}
diff --git a/src/library/graphics/man/filled.contour.Rd b/src/library/graphics/man/filled.contour.Rd
index 7691ac5..ed17704 100644
--- a/src/library/graphics/man/filled.contour.Rd
+++ b/src/library/graphics/man/filled.contour.Rd
@@ -1,10 +1,8 @@
 % File src/library/graphics/man/filled.contour.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2013 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2014 R Core Team
 % Distributed under GPL 2 or later
 
-\newcommand{\CRANpkg}{\href{http://CRAN.R-project.org/package=#1}{\pkg{#1}}}
-
 \name{filled.contour}
 \alias{filled.contour}
 \alias{.filled.contour}
diff --git a/src/library/graphics/man/fourfoldplot.Rd b/src/library/graphics/man/fourfoldplot.Rd
index 756f0a6..3762b65 100644
--- a/src/library/graphics/man/fourfoldplot.Rd
+++ b/src/library/graphics/man/fourfoldplot.Rd
@@ -1,5 +1,5 @@
 % File src/library/graphics/man/fourfoldplot.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2007 R Core Team
 % Distributed under GPL 2 or later
 
@@ -28,8 +28,8 @@ fourfoldplot(x, color = c("#99CCFF", "#6699CC"),
     the odds ratios.  Must be a single nonnegative number less than 1;
     if set to 0, confidence rings are suppressed.}
   \item{std}{a character string specifying how to standardize the table.
-    Must be one of \code{"margins"}, \code{"ind.max"}, or
-    \code{"all.max"}, and can be abbreviated by the initial letter.
+    Must match one of \code{"margins"}, \code{"ind.max"}, or
+    \code{"all.max"}, and can be abbreviated to the initial letter.
     If set to \code{"margins"}, each 2 by 2 table is standardized to
     equate the margins specified by \code{margin} while preserving the
     odds ratio.  If \code{"ind.max"} or \code{"all.max"}, the tables are
diff --git a/src/library/graphics/man/frame.Rd b/src/library/graphics/man/frame.Rd
index f60b773..071a311 100644
--- a/src/library/graphics/man/frame.Rd
+++ b/src/library/graphics/man/frame.Rd
@@ -1,5 +1,5 @@
 % File src/library/graphics/man/frame.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2007 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/graphics/man/graphics-defunct.Rd b/src/library/graphics/man/graphics-defunct.Rd
index 3d57d14..872cfa7 100644
--- a/src/library/graphics/man/graphics-defunct.Rd
+++ b/src/library/graphics/man/graphics-defunct.Rd
@@ -1,10 +1,8 @@
 % File src/library/graphics/man/graphics-defunct.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2013 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2014 R Core Team
 % Distributed under GPL 2 or later
 
-\newcommand{\CRANpkg}{\href{http://CRAN.R-project.org/package=#1}{\pkg{#1}}}
-
 \name{graphics-defunct}
 \alias{graphics-defunct}
 \alias{dotplot}
diff --git a/src/library/graphics/man/graphics-package.Rd b/src/library/graphics/man/graphics-package.Rd
index ac5f096..c4826e7 100644
--- a/src/library/graphics/man/graphics-package.Rd
+++ b/src/library/graphics/man/graphics-package.Rd
@@ -1,5 +1,5 @@
 % File src/library/graphics/man/graphics-package.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2007 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/graphics/man/grid.Rd b/src/library/graphics/man/grid.Rd
index 31c82fb..5adbdaf 100644
--- a/src/library/graphics/man/grid.Rd
+++ b/src/library/graphics/man/grid.Rd
@@ -1,5 +1,5 @@
 % File src/library/graphics/man/grid.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2007 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/graphics/man/hist.POSIXt.Rd b/src/library/graphics/man/hist.POSIXt.Rd
index 0656a12..6e12069 100644
--- a/src/library/graphics/man/hist.POSIXt.Rd
+++ b/src/library/graphics/man/hist.POSIXt.Rd
@@ -1,6 +1,6 @@
 % File src/library/graphics/man/hist.POSIXt.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2012 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2016 R Core Team
 % Distributed under GPL 2 or later
 
 \name{hist.POSIXt}
@@ -14,12 +14,12 @@
 \method{hist}{POSIXt}(x, breaks, \dots,
      xlab = deparse(substitute(x)),
      plot = TRUE, freq = FALSE,
-     start.on.monday = TRUE, format)
+     start.on.monday = TRUE, format, right = TRUE)
 
 \method{hist}{Date}(x, breaks, \dots,
      xlab = deparse(substitute(x)),
      plot = TRUE, freq = FALSE,
-     start.on.monday = TRUE, format)
+     start.on.monday = TRUE, format, right = TRUE)
 }
 \arguments{
   \item{x}{an object inheriting from class \code{"POSIXt"} or \code{"Date"}.}
@@ -44,6 +44,8 @@
   \item{start.on.monday}{logical. If \code{breaks = "weeks"}, should the
     week start on Mondays or Sundays?}
   \item{format}{for the x-axis labels. See \code{\link{strptime}}.}
+  \item{right}{logical; if \code{TRUE}, the histogram cells are
+    right-closed (left open) intervals.}
 }
 \details{
   Note that unlike the default method, \code{breaks} is a required argument.
@@ -51,6 +53,12 @@
   Using \code{breaks = "quarters"} will create intervals of 3 calendar
   months, with the intervals beginning on January 1, April 1,
   July 1 or October 1, based upon \code{min(x)} as appropriate.
+
+  With the default \code{right = TRUE}, breaks will be set
+  on the last day of the previous period when \code{breaks} is
+  \code{"months"}, \code{"quarters"} or \code{"years"}.  Use
+  \code{right = FALSE} to set them to the first day of the
+  interval shown in each bar.
 }
 \value{
   An object of class \code{"histogram"}: see \code{\link{hist}}.
@@ -61,7 +69,8 @@
 \examples{
 hist(.leap.seconds, "years", freq = TRUE)
 hist(.leap.seconds,
-     seq(ISOdate(1970, 1, 1), ISOdate(2015, 1, 1), "5 years"))
+     seq(ISOdate(1970, 1, 1), ISOdate(2020, 1, 1), "5 years"))
+rug(.leap.seconds, lwd=2)
 
 ## 100 random dates in a 10-week period
 random.dates <- as.Date("2001/1/1") + 70*stats::runif(100)
diff --git a/src/library/graphics/man/hist.Rd b/src/library/graphics/man/hist.Rd
index da0bbba..a867efc 100644
--- a/src/library/graphics/man/hist.Rd
+++ b/src/library/graphics/man/hist.Rd
@@ -1,10 +1,8 @@
 % File src/library/graphics/man/hist.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2013 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2015 R Core Team
 % Distributed under GPL 2 or later
 
-\newcommand{\CRANpkg}{\href{http://CRAN.R-project.org/package=#1}{\pkg{#1}}}
-
 \name{hist}
 \title{Histograms}
 \usage{
@@ -36,7 +34,7 @@ hist(x, \dots)
     In the last three cases the number is a suggestion only; the
      breakpoints will be set to \code{\link{pretty}} values.  If
      \code{breaks} is a function, the \code{x} vector is supplied to it
-     as the only argument. 
+     as the only argument.
   }
   \item{freq}{logical; if \code{TRUE}, the histogram graphic is a
     representation of frequencies, the \code{counts} component of
@@ -73,7 +71,7 @@ hist(x, \dots)
     plotted, otherwise a list of breaks and counts is returned.  In the
     latter case, a warning is used if (typically graphical) arguments
     are specified that only apply to the \code{plot = TRUE} case.}
-  \item{labels}{logical or character.  Additionally draw labels on top
+  \item{labels}{logical or character string.  Additionally draw labels on top
     of bars, if not \code{FALSE}; see \code{\link{plot.histogram}}.}
   \item{nclass}{numeric (integer).  For S(-PLUS) compatibility only,
     \code{nclass} is equivalent to \code{breaks} for a scalar or
@@ -112,9 +110,10 @@ hist(x, \dots)
   and \code{include.lowest} means \sQuote{\emph{include highest}}.
 
   A numerical tolerance of \eqn{10^{-7}}{1e-7} times the median bin size
-  is applied when counting entries on the edges of bins.  This is not
-  included in the reported \code{breaks} nor (as from \R 2.11.0) in the
-  calculation of \code{density}.
+  (for more than four bins, otherwise the median is substituted) is
+  applied when counting entries on the edges of bins.  This is not
+  included in the reported \code{breaks} nor in the calculation of
+  \code{density}.
 
   The default for \code{breaks} is \code{"Sturges"}: see
   \code{\link{nclass.Sturges}}.  Other names for which algorithms
@@ -141,9 +140,6 @@ hist(x, \dots)
   \item{xname}{a character string with the actual \code{x} argument name.}
   \item{equidist}{logical, indicating if the distances between
     \code{breaks} are all the same.}
-
-  Prior to \R 3.0.0 there was a component \code{intensities}, the same
-  as \code{density}, for long-term back compatibility.
 }
 
 \references{
diff --git a/src/library/graphics/man/identify.Rd b/src/library/graphics/man/identify.Rd
index b39cf27..f43ffe3 100644
--- a/src/library/graphics/man/identify.Rd
+++ b/src/library/graphics/man/identify.Rd
@@ -1,6 +1,6 @@
 % File src/library/graphics/man/identify.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2011 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2014 R Core Team
 % Distributed under GPL 2 or later
 
 \name{identify}
diff --git a/src/library/graphics/man/image.Rd b/src/library/graphics/man/image.Rd
index 3fff80d..3190400 100644
--- a/src/library/graphics/man/image.Rd
+++ b/src/library/graphics/man/image.Rd
@@ -1,11 +1,8 @@
 % File src/library/graphics/man/image.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2014 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2017 R Core Team
 % Distributed under GPL 2 or later
 
-\newcommand{\CRANpkg}{\href{http://CRAN.R-project.org/package=#1}{\pkg{#1}}}
-\newcommand{\sspace}{\ifelse{latex}{\out{~}}{ }}
-
 \name{image}
 \alias{image}
 \alias{image.default}
@@ -25,9 +22,9 @@ image(x, \dots)
     its components \code{x$x} and \code{x$y} are used for \code{x}
     and \code{y}, respectively. If the list has component \code{z} this
     is used for \code{z}.}
-  \item{z}{a matrix containing the values to be plotted (\code{NA}s are
-    allowed).  Note that \code{x} can be used instead of \code{z} for
-    convenience.}
+  \item{z}{a numeric or logical matrix containing the values to be plotted
+    (\code{NA}s are allowed).  Note that \code{x} can be used instead
+    of \code{z} for convenience.}
   \item{zlim}{the minimum and maximum \code{z} values for which colors
     should be plotted, defaulting to the range of the finite values of
     \code{z}. Each of the given colors will be used to color an
@@ -87,7 +84,7 @@ image(x, \dots)
 
   Rectangles corresponding to missing values are not plotted (and so are
   transparent and (unless \code{add = TRUE}) the default background
-  painted in \code{par("bg")} will show though and if that is
+  painted in \code{par("bg")} will show through and if that is
   transparent, the canvas colour will be seen).
 
   If \code{breaks} is specified then \code{zlim} is unused and the
@@ -98,7 +95,7 @@ image(x, \dots)
   The axes (where plotted) make use of the classes of \code{xlim} and
   \code{ylim} (and hence by default the classes of \code{x} and
   \code{y}): this will mean that for example dates are labelled as
-  such.  (As from \R 3.0.1.)
+  such.
 
   Notice that \code{image} interprets the \code{z} matrix as a table of
   \code{f(x[i], y[j])} values, so that the x axis corresponds to row
diff --git a/src/library/graphics/man/layout.Rd b/src/library/graphics/man/layout.Rd
index 92e6cb8..264950d 100644
--- a/src/library/graphics/man/layout.Rd
+++ b/src/library/graphics/man/layout.Rd
@@ -1,5 +1,5 @@
 % File src/library/graphics/man/layout.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2012 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/graphics/man/legend.Rd b/src/library/graphics/man/legend.Rd
index 7175135..946e3f9 100644
--- a/src/library/graphics/man/legend.Rd
+++ b/src/library/graphics/man/legend.Rd
@@ -1,6 +1,6 @@
 % File src/library/graphics/man/legend.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2012 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2017 R Core Team
 % Distributed under GPL 2 or later
 
 \name{legend}
@@ -58,7 +58,7 @@ legend(x, y = NULL, legend, fill = NULL, col = par("col"),
     corresponding to its argument \code{bg}.}
   \item{cex}{character expansion factor \bold{relative} to current
     \code{par("cex")}.  Used for text, and provides the default for
-    \code{pt.cex} and \code{title.cex}.}
+    \code{pt.cex}.}
   \item{pt.cex}{expansion factor(s) for the points.}
   \item{pt.lwd}{line width for the points, defaults to the one for
     lines, or if that is not set, to \code{par("lwd")}.}
@@ -72,8 +72,9 @@ legend(x, y = NULL, legend, fill = NULL, col = par("col"),
     text.  Useful for y-adjustment when \code{labels} are
     \link{plotmath} expressions.}
   \item{text.width}{the width of the legend text in x (\code{"user"})
-    coordinates.  (Should be positive even for a reversed x axis.)
-    Defaults to the proper value computed by \code{\link{strwidth}(legend)}.}
+    coordinates.  (Should be a single positive number even for a reversed
+    x axis.)  Defaults to the proper value computed by
+    \code{\link{strwidth}(legend)}.}
   \item{text.col}{the color used for the legend text.}
   \item{text.font}{the font used for the legend text, see \code{\link{text}}.}
   \item{merge}{logical; if \code{TRUE}, merge points and lines but
diff --git a/src/library/graphics/man/lines.Rd b/src/library/graphics/man/lines.Rd
index 14378ef..617e848 100644
--- a/src/library/graphics/man/lines.Rd
+++ b/src/library/graphics/man/lines.Rd
@@ -1,5 +1,5 @@
 % File src/library/graphics/man/lines.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2013 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/graphics/man/locator.Rd b/src/library/graphics/man/locator.Rd
index 41899b8..8a9cf41 100644
--- a/src/library/graphics/man/locator.Rd
+++ b/src/library/graphics/man/locator.Rd
@@ -1,5 +1,5 @@
 % File src/library/graphics/man/locator.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2011 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/graphics/man/matplot.Rd b/src/library/graphics/man/matplot.Rd
index fa280c8..ec3b52b 100644
--- a/src/library/graphics/man/matplot.Rd
+++ b/src/library/graphics/man/matplot.Rd
@@ -1,5 +1,5 @@
 % File src/library/graphics/man/matplot.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2007 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/graphics/man/mosaicplot.Rd b/src/library/graphics/man/mosaicplot.Rd
index ff64f30..30a2544 100644
--- a/src/library/graphics/man/mosaicplot.Rd
+++ b/src/library/graphics/man/mosaicplot.Rd
@@ -1,10 +1,8 @@
 % File src/library/graphics/man/mosaicplot.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2007 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2015 R Core Team
 % Distributed under GPL 2 or later
 
-\newcommand{\CRANpkg}{\href{http://CRAN.R-project.org/package=#1}{\pkg{#1}}}
-
 \name{mosaicplot}
 \alias{mosaicplot}
 \alias{mosaicplot.default}
@@ -147,11 +145,6 @@ mosaicplot(x, \dots)
   \emph{Report 22}, Department of Statistics and Mathematics,
   \enc{Wirtschaftsuniversität}{Wirtschaftsuniversitaet} Wien, Research Report Series.
   \url{http://epub.wu.ac.at/dyn/openURL?id=oai:epub.wu-wien.ac.at:epub-wu-01_8a1}
-
-  The home page of Michael Friendly
-  (\url{http://www.math.yorku.ca/SCS/friendly.html}) provides
-  information on various aspects of graphical methods for analyzing
-  categorical data, including mosaic plots.
 }
 \seealso{
   \code{\link{assocplot}},
diff --git a/src/library/graphics/man/mtext.Rd b/src/library/graphics/man/mtext.Rd
index b27aae6..475397c 100644
--- a/src/library/graphics/man/mtext.Rd
+++ b/src/library/graphics/man/mtext.Rd
@@ -1,5 +1,5 @@
 % File src/library/graphics/man/mtext.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2011 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/graphics/man/pairs.Rd b/src/library/graphics/man/pairs.Rd
index 27961cc..e1847a0 100644
--- a/src/library/graphics/man/pairs.Rd
+++ b/src/library/graphics/man/pairs.Rd
@@ -1,6 +1,6 @@
 % File src/library/graphics/man/pairs.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2013 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2014 R Core Team
 % Distributed under GPL 2 or later
 
 \name{pairs}
@@ -19,6 +19,7 @@ pairs(x, \dots)
       na.action = stats::na.pass)
 
 \method{pairs}{default}(x, labels, panel = points, \dots,
+      horInd = 1:nc, verInd = 1:nc,
       lower.panel = panel, upper.panel = panel,
       diag.panel = NULL, text.panel = textPanel,
       label.pos = 0.5 + has.diag/3, line.main = 3,
@@ -53,6 +54,8 @@ pairs(x, \dots)
     \code{plot} such as \code{main}.  \code{par("oma")} will be set
     appropriately unless specified.
   }
+  \item{horInd, verInd}{The (numerical) indices of the variables to be
+    plotted on the horizontal and vertical axes respectively.}
   \item{lower.panel, upper.panel}{separate panel functions (or
     \code{NULL}) to be used below and above the diagonal respectively.}
   \item{diag.panel}{optional \code{function(x, \dots)} to be
@@ -68,7 +71,7 @@ pairs(x, \dots)
     at the top, or graph-like with row 1 at the bottom?}
   \item{gap}{distance between subplots, in margin lines.}
   \item{log}{a character string indicating if logarithmic axes are to be
-    used: see \code{\link{plot.default}}. \code{log = "xy"} specifies
+    used: see \code{\link{plot.default}}.  \code{log = "xy"} specifies
     logarithmic axes for all variables.}
 }
 \details{
@@ -98,6 +101,12 @@ pairs(x, \dots)
   \code{na.action = na.omit}, all cases which contain a missing values for
   any of the variables are omitted completely (including when the scales
   are selected).
+  
+  Arguments \code{horInd} and \code{verInd} were introduced in \R
+  3.2.0. If given the same value they can be used to select or re-order
+  variables: with different ranges of consecutive values they can be
+  used to plot rectangular windows of a full pairs plot; in the latter
+  case \sQuote{diagonal} refers to the diagonal of the full plot. 
 }
 \author{
   Enhancements for \R 1.0.0 contributed by Dr. Jens
diff --git a/src/library/graphics/man/panel.smooth.Rd b/src/library/graphics/man/panel.smooth.Rd
index 1af5c2e..0b1a78a 100644
--- a/src/library/graphics/man/panel.smooth.Rd
+++ b/src/library/graphics/man/panel.smooth.Rd
@@ -1,5 +1,5 @@
 % File src/library/graphics/man/panel.smooth.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2007 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/graphics/man/par.Rd b/src/library/graphics/man/par.Rd
index 7f14410..91f8116 100644
--- a/src/library/graphics/man/par.Rd
+++ b/src/library/graphics/man/par.Rd
@@ -1,11 +1,8 @@
 % File src/library/graphics/man/par.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2013 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2015 R Core Team
 % Distributed under GPL 2 or later
 
-\newcommand{\CRANpkg}{\href{http://CRAN.R-project.org/package=#1}{\pkg{#1}}}
-\newcommand{\sspace}{\ifelse{latex}{\out{~}}{ }}
-
 \name{par}
 \alias{par}
 \alias{.Pars}
@@ -100,7 +97,7 @@
 \usage{
 par(\dots, no.readonly = FALSE)
 
-\special{<highlevel plot> (\dots, <tag> = <value>)}
+\special{<highlevel plot> (..., <tag> = <value>)}
 }
 
 \arguments{
@@ -301,10 +298,11 @@ par(\dots, no.readonly = FALSE)
       the default device fonts will be used (and what those are should
       be listed on the help page for the device).  Standard values are
       \code{"serif"}, \code{"sans"} and \code{"mono"}, and the
-      \link{Hershey} font families are also available.  (Different
-      devices may define others, and some devices will ignore this
-      setting completely.)  This can be specified inline for
-      \code{\link{text}}.}
+      \link{Hershey} font families are also available.  (Devices may
+      define others, and some devices will ignore this setting
+      completely.  Names starting with \code{"Hershey"} are treated
+      specially and should only be used for the built-in Hershey font
+      families.)  This can be specified inline for \code{\link{text}}.}
     \item{\code{fg}}{The color to be used for the foreground of plots.
       This is the default color used for things like axes and boxes
       around plots.  When called from \code{par()} this also sets
@@ -405,7 +403,7 @@ par(\dots, no.readonly = FALSE)
     \item{\code{mai}}{A numerical vector of the form \code{c(bottom,
         left, top, right)} which gives the margin size specified in
       inches.\cr
-      \if{html}{\figure{mai.png}{options: width=35\% alt="Figure: mai.png"}}
+      \if{html}{\figure{mai.png}{options: width="35\%" alt="Figure: mai.png"}}
       \if{latex}{\figure{mai.pdf}{options: width=7cm}}
     }
     \item{\code{mar}}{A numerical vector of the form \code{c(bottom,
@@ -465,7 +463,7 @@ par(\dots, no.readonly = FALSE)
       on a device that does not currently contain a high-level plot.}
     \item{\code{oma}}{A vector of the form \code{c(bottom, left, top,
         right)} giving the size of the outer margins in lines of text.\cr
-      \if{html}{\figure{oma.png}{options: width=25\% alt="Figure: oma.png"}}
+      \if{html}{\figure{oma.png}{options: width="25\%" alt="Figure: oma.png"}}
       \if{latex}{\figure{oma.pdf}{options: width=6cm}}
     }
     \item{\code{omd}}{A vector of the form \code{c(x1, x2, y1, y2)}
@@ -618,8 +616,7 @@ par(\dots, no.readonly = FALSE)
   \code{0} corresponds to the background color.  Note that the palette
   (apart from \code{0} which is per-device) is a per-session setting.
 
-  Negative integer colours were accepted prior to \R 3.0.0, but treated
-  inconsistently.  They are now errors.
+  Negative integer colours are errors.
 
   Additionally, \code{"transparent"} is \emph{transparent}, useful for
   filled areas (such as the background!), and just invisible for things
@@ -633,8 +630,6 @@ par(\dots, no.readonly = FALSE)
   The functions \code{\link{rgb}}, \code{\link{hsv}}, \code{\link{hcl}},
   \code{\link{gray}} and \code{\link{rainbow}} provide additional ways
   of generating colors.
-
-  It was possible to specify color numbers as strings prior to \R 3.0.0.
 }
 
 \section{Line Type Specification}{
diff --git a/src/library/graphics/man/persp.Rd b/src/library/graphics/man/persp.Rd
index e09b054..c81002c 100644
--- a/src/library/graphics/man/persp.Rd
+++ b/src/library/graphics/man/persp.Rd
@@ -1,10 +1,8 @@
 % File src/library/graphics/man/persp.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2011 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2014 R Core Team
 % Distributed under GPL 2 or later
 
-\newcommand{\CRANpkg}{\href{http://CRAN.R-project.org/package=#1}{\pkg{#1}}}
-
 \name{persp}
 \alias{persp}
 \alias{persp.default}
diff --git a/src/library/graphics/man/pie.Rd b/src/library/graphics/man/pie.Rd
index d885722..fb6f7c1 100644
--- a/src/library/graphics/man/pie.Rd
+++ b/src/library/graphics/man/pie.Rd
@@ -1,6 +1,6 @@
 % File src/library/graphics/man/pie.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2007 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2015 R Core Team
 % Distributed under GPL 2 or later
 
 \name{pie}
@@ -94,5 +94,10 @@ text(0, 1, "init.angle = 90", col = "red")
 n <- 200
 pie(rep(1, n), labels = "", col = rainbow(n), border = NA,
     main = "pie(*, labels=\"\", col=rainbow(n), border=NA,..")
+
+## Another case showing pie() is rather fun than science:
+## (original by FinalBackwardsGlance on http://imgur.com/gallery/wWrpU4X)
+pie(c(Sky = 78, "Sunny side of pyramid" = 17, "Shady side of pyramid" = 5),
+    init.angle = 315, col = c("deepskyblue", "yellow", "yellow3"), border = FALSE)
 }
 \keyword{hplot}
diff --git a/src/library/graphics/man/plot.Rd b/src/library/graphics/man/plot.Rd
index d3a4e2d..a38257b 100644
--- a/src/library/graphics/man/plot.Rd
+++ b/src/library/graphics/man/plot.Rd
@@ -1,10 +1,8 @@
 % File src/library/graphics/man/plot.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2011 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2015 R Core Team
 % Distributed under GPL 2 or later
 
-\newcommand{\sspace}{\ifelse{latex}{\out{~}}{ }}
-
 \name{plot}
 \title{Generic X-Y Plotting}
 \alias{plot}
@@ -67,12 +65,14 @@ plot(x, y, \dots)
 \seealso{
   \code{\link{plot.default}}, \code{\link{plot.formula}} and other
   methods; \code{\link{points}}, \code{\link{lines}}, \code{\link{par}}.
+  For thousands of points, consider using \code{\link{smoothScatter}()}
+  instead of \code{plot()}.
 
   For X-Y-Z plotting see \code{\link{contour}}, \code{\link{persp}} and
   \code{\link{image}}.
 }
 \examples{
-require(stats)
+require(stats) # for lowess, rpois, rnorm
 plot(cars)
 lines(lowess(cars))
 
diff --git a/src/library/graphics/man/plot.dataframe.Rd b/src/library/graphics/man/plot.dataframe.Rd
index d712b00..87962b7 100644
--- a/src/library/graphics/man/plot.dataframe.Rd
+++ b/src/library/graphics/man/plot.dataframe.Rd
@@ -1,6 +1,6 @@
 % File src/library/graphics/man/plot.dataframe.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2007 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2014 R Core Team
 % Distributed under GPL 2 or later
 
 \name{plot.data.frame}
diff --git a/src/library/graphics/man/plot.default.Rd b/src/library/graphics/man/plot.default.Rd
index 0e3f150..2d0aa60 100644
--- a/src/library/graphics/man/plot.default.Rd
+++ b/src/library/graphics/man/plot.default.Rd
@@ -1,10 +1,8 @@
 % File src/library/graphics/man/plotdefault.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2012 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2016 R Core Team
 % Distributed under GPL 2 or later
 
-\newcommand{\sspace}{\ifelse{latex}{\out{~}}{ }}
-
 \name{plot.default}
 \alias{plot.default}
 \title{The Default Scatterplot Function}
@@ -119,6 +117,8 @@
 }
 \seealso{
   \code{\link{plot}}, \code{\link{plot.window}}, \code{\link{xy.coords}}.
+  For thousands of points, consider using \code{\link{smoothScatter}}
+  instead.
 }
 \examples{
 Speed <- cars$speed
@@ -146,7 +146,7 @@ par(op)
 lx <- seq(1, 5, length = 41)
 yl <- expression(e^{-frac(1,2) * {log[10](x)}^2})
 y <- exp(-.5*lx^2)
-op <- par(mfrow = c(2,1), mar = par("mar")+c(0,1,0,0))
+op <- par(mfrow = c(2,1), mar = par("mar")-c(1,0,2,0), mgp = c(2, .7, 0))
 plot(10^lx, y, log = "xy", type = "l", col = "purple",
      main = "Log-Log plot", ylab = yl, xlab = "x")
 plot(10^lx, y, log = "xy", type = "o", pch = ".", col = "forestgreen",
@@ -154,8 +154,9 @@ plot(10^lx, y, log = "xy", type = "o", pch = ".", col = "forestgreen",
      axes = FALSE, frame.plot = TRUE)
 my.at <- 10^(1:5)
 axis(1, at = my.at, labels = formatC(my.at, format = "fg"))
-at.y <- 10^(-5:-1)
-axis(2, at = at.y, labels = formatC(at.y, format = "fg"), col.axis = "red")
+e.y <- -5:-1 ; at.y <- 10^e.y
+axis(2, at = at.y, col.axis = "red", las = 1,
+     labels = as.expression(lapply(e.y, function(E) bquote(10^.(E)))))
 par(op)
 }
 \keyword{hplot}
diff --git a/src/library/graphics/man/plot.design.Rd b/src/library/graphics/man/plot.design.Rd
index 86370f2..2740fe2 100644
--- a/src/library/graphics/man/plot.design.Rd
+++ b/src/library/graphics/man/plot.design.Rd
@@ -1,10 +1,8 @@
 % File src/library/graphics/man/plot.design.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2013 R Core Team
 % Distributed under GPL 2 or later
 
-\newcommand{\sspace}{\ifelse{latex}{\out{~}}{ }}
-
 \name{plot.design}
 \alias{plot.design}
 \title{Plot Univariate Effects of a Design or Model}
diff --git a/src/library/graphics/man/plot.factor.Rd b/src/library/graphics/man/plot.factor.Rd
index 63a9695..892e48c 100644
--- a/src/library/graphics/man/plot.factor.Rd
+++ b/src/library/graphics/man/plot.factor.Rd
@@ -1,5 +1,5 @@
 % File src/library/graphics/man/plotfactor.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2009 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/graphics/man/plot.formula.Rd b/src/library/graphics/man/plot.formula.Rd
index 042b0eb..88644d6 100644
--- a/src/library/graphics/man/plot.formula.Rd
+++ b/src/library/graphics/man/plot.formula.Rd
@@ -1,6 +1,6 @@
 % File src/library/graphics/man/plotformula.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995--2011 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995--2014 R Core Team
 % Distributed under GPL 2 or later
 
 \name{plot.formula}
diff --git a/src/library/graphics/man/plot.raster.Rd b/src/library/graphics/man/plot.raster.Rd
new file mode 100644
index 0000000..9ece703
--- /dev/null
+++ b/src/library/graphics/man/plot.raster.Rd
@@ -0,0 +1,52 @@
+% File src/library/graphics/man/plotraster.Rd
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2014 R Core Team
+% Distributed under GPL 2 or later
+
+\name{plot.raster}
+\title{Plotting Raster Images}
+\usage{
+\method{plot}{raster}(x, y,
+     xlim = c(0, ncol(x)), ylim = c(0, nrow(x)),
+     xaxs = "i", yaxs = "i",
+     asp = 1, add = FALSE, \dots)
+}
+\alias{plot.raster}
+\arguments{
+  \item{x, y}{raster. \code{y} will be ignored.}
+  \item{xlim, ylim}{Limits on the plot region (default from dimensions
+    of the raster.}
+  \item{xaxs, yaxs}{Axis interval calculation style (default means that
+    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.}
+  \item{\dots}{Further arguments to the \code{\link{rasterImage}} function.}
+}
+\description{
+  This functions implements a \code{\link{plot}} method for raster images.
+}
+\seealso{
+    \code{\link{plot.default}}, \code{\link{rasterImage}}.
+}
+\examples{
+require(grDevices)
+r <- as.raster(c(0.5, 1, 0.5))
+plot(r)
+# additional arguments to rasterImage()
+plot(r, interpolate=FALSE)
+# distort
+plot(r, asp=NA)
+# fill page
+op <- par(mar=rep(0, 4))
+plot(r, asp=NA)
+par(op)
+# normal annotations work
+plot(r, asp=NA)
+box()
+title(main="This is my raster")
+# add to existing plot
+plot(1)
+plot(r, add=TRUE)
+}
+\keyword{hplot}
diff --git a/src/library/graphics/man/plot.table.Rd b/src/library/graphics/man/plot.table.Rd
index b84dcc9..bebe77e 100644
--- a/src/library/graphics/man/plot.table.Rd
+++ b/src/library/graphics/man/plot.table.Rd
@@ -1,5 +1,5 @@
 % File src/library/graphics/man/plot.table.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2012 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/graphics/man/plot.window.Rd b/src/library/graphics/man/plot.window.Rd
index 41dc09d..f6eb620 100644
--- a/src/library/graphics/man/plot.window.Rd
+++ b/src/library/graphics/man/plot.window.Rd
@@ -1,5 +1,5 @@
 % File src/library/graphics/man/plot.window.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2014 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/graphics/man/plot.xy.Rd b/src/library/graphics/man/plot.xy.Rd
index 38cc179..8384b0b 100644
--- a/src/library/graphics/man/plot.xy.Rd
+++ b/src/library/graphics/man/plot.xy.Rd
@@ -1,5 +1,5 @@
 % File src/library/graphics/man/plot.xy.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2007 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/graphics/man/plothistogram.Rd b/src/library/graphics/man/plothistogram.Rd
index 0661e57..9eb62d8 100644
--- a/src/library/graphics/man/plothistogram.Rd
+++ b/src/library/graphics/man/plothistogram.Rd
@@ -1,5 +1,5 @@
 % File src/library/graphics/man/plothistogram.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2007 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/graphics/man/points.Rd b/src/library/graphics/man/points.Rd
index c284fbf..05d9cbf 100644
--- a/src/library/graphics/man/points.Rd
+++ b/src/library/graphics/man/points.Rd
@@ -1,10 +1,8 @@
 % File src/library/graphics/man/points.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2014 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2015 R Core Team
 % Distributed under GPL 2 or later
 
-\newcommand{\sspace}{\ifelse{latex}{\out{~}}{ }}
-
 \name{points}
 \alias{points}
 \alias{points.default}
@@ -141,7 +139,7 @@ points(x, \dots)
   If the symbol font (\code{\link{par}(font = 5)}) is used, numerical
   values should be used for \code{pch}: the range is
   \code{c(32:126, 160:254)} in all locales (but \code{240} is not
-  defined (used for \sQuote{apple} on OS X) and \code{160}, Euro, may
+  defined (used for \sQuote{apple} on macOS) and \code{160}, Euro, may
   not be present).
 }
 \note{
@@ -156,8 +154,8 @@ points(x, \dots)
 
   What happens for very small or zero values of \code{cex} is
   device-dependent: symbols or characters may become invisible or
-  they may be plotted at a fixed minimum size.   As
-  from \R 2.15.0, circles of zero radius will not be plotted.
+  they may be plotted at a fixed minimum size.  Circles of zero radius
+  will not be plotted.
 }
 \references{
   Becker, R. A., Chambers, J. M. and Wilks, A. R. (1988)
@@ -244,7 +242,7 @@ TestChars <- function(sign = 1, font = 1, ...)
 TestChars()
 try(TestChars(sign = -1))
 TestChars(font = 5)  # Euro might be at 160 (0+10*16).
-                     # Mac OS has apple at 240 (0+15*16).
+                     # macOS has apple at 240 (0+15*16).
 try(TestChars(-1, font = 2))  # bold
 }}
 \keyword{aplot}
diff --git a/src/library/graphics/man/polygon.Rd b/src/library/graphics/man/polygon.Rd
index c6cfca5..280a5b7 100644
--- a/src/library/graphics/man/polygon.Rd
+++ b/src/library/graphics/man/polygon.Rd
@@ -1,5 +1,5 @@
 % File src/library/graphics/man/polygon.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2011 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/graphics/man/polypath.Rd b/src/library/graphics/man/polypath.Rd
index 337516c..2256bea 100644
--- a/src/library/graphics/man/polypath.Rd
+++ b/src/library/graphics/man/polypath.Rd
@@ -1,5 +1,5 @@
 % File src/library/graphics/man/path.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2011 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/graphics/man/rasterImage.Rd b/src/library/graphics/man/rasterImage.Rd
index 2f14869..8b6b040 100644
--- a/src/library/graphics/man/rasterImage.Rd
+++ b/src/library/graphics/man/rasterImage.Rd
@@ -1,6 +1,6 @@
 % File src/library/graphics/man/rasterImage.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2013 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2014 R Core Team
 % Distributed under GPL 2 or later
 
 \name{rasterImage}
diff --git a/src/library/graphics/man/rect.Rd b/src/library/graphics/man/rect.Rd
index 9a7cf51..fa024cb 100644
--- a/src/library/graphics/man/rect.Rd
+++ b/src/library/graphics/man/rect.Rd
@@ -1,5 +1,5 @@
 % File src/library/graphics/man/rect.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2012 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/graphics/man/rug.Rd b/src/library/graphics/man/rug.Rd
index dab1754..30446b3 100644
--- a/src/library/graphics/man/rug.Rd
+++ b/src/library/graphics/man/rug.Rd
@@ -1,5 +1,5 @@
 % File src/library/graphics/man/rug.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2008 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/graphics/man/screen.Rd b/src/library/graphics/man/screen.Rd
index fafd7e5..75a960e 100644
--- a/src/library/graphics/man/screen.Rd
+++ b/src/library/graphics/man/screen.Rd
@@ -1,6 +1,6 @@
 % File src/library/graphics/man/screen.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2007 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2014 R Core Team
 % Distributed under GPL 2 or later
 
 \name{screen}
diff --git a/src/library/graphics/man/segments.Rd b/src/library/graphics/man/segments.Rd
index 8a7b3c8..5d022f8 100644
--- a/src/library/graphics/man/segments.Rd
+++ b/src/library/graphics/man/segments.Rd
@@ -1,5 +1,5 @@
 % File src/library/graphics/man/segments.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2009 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/graphics/man/smoothScatter.Rd b/src/library/graphics/man/smoothScatter.Rd
index 4a77677..b961047 100644
--- a/src/library/graphics/man/smoothScatter.Rd
+++ b/src/library/graphics/man/smoothScatter.Rd
@@ -1,24 +1,21 @@
 % File src/library/graphics/man/smoothscatter.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2013 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2015 R Core Team
 % Distributed under GPL 2 or later
 
-\newcommand{\CRANpkg}{\href{http://CRAN.R-project.org/package=#1}{\pkg{#1}}}
-
 \name{smoothScatter}
 \alias{smoothScatter}
 \title{Scatterplots with Smoothed Densities Color Representation}
 
 \description{\code{smoothScatter} produces a smoothed color density
-  representation of the scatterplot, obtained through a kernel
-  density estimate. \code{densCols} produces a vector containing
-  colors which encode the local densities at each point in a
-  scatterplot.
+  representation of a scatterplot, obtained through a (2D) kernel
+  density estimate.
 }
 \usage{
 smoothScatter(x, y = NULL, nbin = 128, bandwidth,
               colramp = colorRampPalette(c("white", blues9)),
-              nrpoints = 100, pch = ".", cex = 1, col = "black",
+              nrpoints = 100, ret.selection = FALSE,
+              pch = ".", cex = 1, col = "black",
               transformation = function(x) x^.25,
               postPlotHook = box,
               xlab = NULL, ylab = NULL, xlim, ylim,
@@ -44,6 +41,8 @@ smoothScatter(x, y = NULL, nbin = 128, bandwidth,
     regional densities will be plotted.  Adding points to the plot
     allows for the identification of outliers.  If all points are to be
     plotted, choose \code{nrpoints = Inf}.}
+  \item{ret.selection}{\code{\link{logical}} indicating to return the
+    ordered indices of \dQuote{low density} points if \code{nrpoints > 0}.}
   \item{pch, cex, col}{arguments passed to \code{\link{points}},
     when \code{nrpoints > 0}: point symbol, character expansion factor
     and color, see also \code{\link{par}}.}
@@ -53,9 +52,15 @@ smoothScatter(x, y = NULL, nbin = 128, bandwidth,
   \item{xlab, ylab}{character strings to be used as axis labels, passed
     to \code{\link{image}}.}
   \item{xlim, ylim}{numeric vectors of length 2 specifying axis limits.}
-  \item{xaxs, yaxs, \dots}{further arguments, passed to \code{\link{image}}.}
+  \item{xaxs, yaxs, \dots}{further arguments passed to \code{\link{image}},
+    e.g., \code{add=TRUE} or \code{useRaster=TRUE}.}
+}
+\value{
+  If \code{ret.selection} is true, a vector of integers of length
+  \code{nrpoints} (or smaller, if there are less finite points inside
+  \code{xlim} and \code{ylim}) with the indices of the low-density
+  points drawn, ordered with lowest density first.
 }
-
 \details{
   \code{smoothScatter} produces a smoothed version of a scatter plot.
   Two dimensional (kernel density) smoothing is performed by
@@ -79,13 +84,18 @@ x1  <- matrix(rnorm(n), ncol = 2)
 x2  <- matrix(rnorm(n, mean = 3, sd = 1.5), ncol = 2)
 x   <- rbind(x1, x2)
 
-oldpar <- par(mfrow = c(2, 2))
+oldpar <- par(mfrow = c(2, 2), mar=.1+c(3,3,1,1), mgp = c(1.5, 0.5, 0))
 smoothScatter(x, nrpoints = 0)
 smoothScatter(x)
 
 ## a different color scheme:
 Lab.palette <- colorRampPalette(c("blue", "orange", "red"), space = "Lab")
-smoothScatter(x, colramp = Lab.palette)
+i.s <- smoothScatter(x, colramp = Lab.palette,
+                     ## pch=NA: do not draw them
+                     nrpoints = 250, ret.selection=TRUE)
+## label the 20 very lowest-density points,the "outliers" (with obs.number):
+i.20 <- i.s[1:20]
+text(x[i.20,], labels = i.20, cex= 0.75)
 
 ## somewhat similar, using identical smoothing computations,
 ## but considerably *less* efficient for really large data:
@@ -95,7 +105,8 @@ plot(x, col = densCols(x), pch = 20)
 par(mfrow = c(1, 1))
 y <- matrix(rnorm(40000), ncol = 4) + 3*rnorm(10000)
 y[, c(2,4)] <-  -y[, c(2,4)]
-pairs(y, panel = function(...) smoothScatter(..., nrpoints = 0, add = TRUE))
+pairs(y, panel = function(...) smoothScatter(..., nrpoints = 0, add = TRUE),
+      gap = 0.2)
 
 par(oldpar)
 }}
diff --git a/src/library/graphics/man/spineplot.Rd b/src/library/graphics/man/spineplot.Rd
index f13215c..4b6fc69 100644
--- a/src/library/graphics/man/spineplot.Rd
+++ b/src/library/graphics/man/spineplot.Rd
@@ -1,5 +1,5 @@
 % File src/library/graphics/man/spineplot.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2007 R Core Team
 % Distributed under GPL 2 or later
 
@@ -29,7 +29,7 @@ spineplot(x, \dots)
           main = "", xlab = NULL, ylab = NULL,
           xaxlabels = NULL, yaxlabels = NULL,
           xlim = NULL, ylim = c(0, 1), axes = TRUE, \dots,
-          subset = NULL)
+          subset = NULL, drop.unused.levels = FALSE)
 }
 \arguments{
   \item{x}{an object, the default method expects either a single variable
@@ -61,7 +61,9 @@ spineplot(x, \dots)
     level names) are suppressed.}
   \item{\dots}{additional arguments passed to \code{\link{rect}}.}
   \item{subset}{an optional vector specifying a subset of observations
-    to be used for plotting.  }
+    to be used for plotting.}
+  \item{drop.unused.levels}{should factors have unused levels dropped?
+    Defaults to \code{FALSE}.}
 }
 \details{
   \code{spineplot} creates either a spinogram or a spine plot.  It can
diff --git a/src/library/graphics/man/stars.Rd b/src/library/graphics/man/stars.Rd
index 44041d1..0cdc116 100644
--- a/src/library/graphics/man/stars.Rd
+++ b/src/library/graphics/man/stars.Rd
@@ -1,6 +1,6 @@
 % File src/library/graphics/man/stars.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2007 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2015 R Core Team
 % Distributed under GPL 2 or later
 
 \name{stars}
@@ -121,9 +121,9 @@ stars(x, full = TRUE, scale = TRUE, radius = TRUE,
 }
 \note{
   This code started life as spatial star plots by David A. Andrews.
-  See \url{http://www.udallas.edu:8080/~andrews/software/software.html}.
+%  See \url{http://www.udallas.edu:8080/~andrews/software/software.html}.
 
-  Prior to 1.4.1, scaling only shifted the maximum to 1, although
+  Prior to \R 1.4.1, scaling only shifted the maximum to 1, although
   documented as here.
 }
 \examples{
diff --git a/src/library/graphics/man/stem.Rd b/src/library/graphics/man/stem.Rd
index 9cdceb8..18c41e8 100644
--- a/src/library/graphics/man/stem.Rd
+++ b/src/library/graphics/man/stem.Rd
@@ -1,5 +1,5 @@
 % File src/library/graphics/man/stem.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2013 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/graphics/man/stripchart.Rd b/src/library/graphics/man/stripchart.Rd
index 7e12ce9..22ef85f 100644
--- a/src/library/graphics/man/stripchart.Rd
+++ b/src/library/graphics/man/stripchart.Rd
@@ -1,5 +1,5 @@
 % File src/library/graphics/man/stripchart.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2014 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/graphics/man/strwidth.Rd b/src/library/graphics/man/strwidth.Rd
index 199d6c0..fdf2f70 100644
--- a/src/library/graphics/man/strwidth.Rd
+++ b/src/library/graphics/man/strwidth.Rd
@@ -1,5 +1,5 @@
 % File src/library/graphics/man/strwidth.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2011 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/graphics/man/sunflowerplot.Rd b/src/library/graphics/man/sunflowerplot.Rd
index 100e462..b6e2466 100644
--- a/src/library/graphics/man/sunflowerplot.Rd
+++ b/src/library/graphics/man/sunflowerplot.Rd
@@ -1,6 +1,6 @@
 % File src/library/graphics/man/sunflowerplot.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2011 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2014 R Core Team
 % Distributed under GPL 2 or later
 
 \name{sunflowerplot}
@@ -117,7 +117,7 @@ sunflowerplot(x, \dots)
 \seealso{\code{\link{density}}, \code{\link{xyTable}}
 }
 \examples{
-require(stats)
+require(stats) # for rnorm
 require(grDevices)
 
 ## 'number' is computed automatically:
diff --git a/src/library/graphics/man/symbols.Rd b/src/library/graphics/man/symbols.Rd
index b1a42b3..ab6f251 100644
--- a/src/library/graphics/man/symbols.Rd
+++ b/src/library/graphics/man/symbols.Rd
@@ -1,5 +1,5 @@
 % File src/library/graphics/man/symbols.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2012 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/graphics/man/text.Rd b/src/library/graphics/man/text.Rd
index 4e297ac..0954c3a 100644
--- a/src/library/graphics/man/text.Rd
+++ b/src/library/graphics/man/text.Rd
@@ -1,17 +1,15 @@
 % File src/library/graphics/man/text.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2012 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2016 R Core Team
 % Distributed under GPL 2 or later
 
-\newcommand{\sspace}{\ifelse{latex}{\out{~}}{ }}
-
 \name{text}
 \title{Add Text to a Plot}
 \encoding{UTF-8}
 \usage{
 text(x, \dots)
 
-\method{text}{default} (x, y = NULL, labels = seq_along(x), adj = NULL,
+\method{text}{default} (x, y = NULL, labels = seq_along(x$x), adj = NULL,
      pos = NULL, offset = 0.5, vfont = NULL,
      cex = 1, col = NULL, font = NULL, \dots)
 }
@@ -100,19 +98,20 @@ text(x, \dots)
   is delta, and \code{"\300"} is aleph.
 }
 \section{Euro symbol}{
-  The Euro symbol was introduced relatively recently and may not be
-  available in older fonts.  In recent versions of Adobe symbol fonts it
-  is character 160, so \code{text(x, y, "\xA0", font = 5)} may work.
-  People using Western European locales on Unix-alikes can probably
-  select ISO-8895-15 (Latin-9) which has the Euro as character 165: this
-  can also be used for \code{\link{postscript}} and \code{\link{pdf}}.
-  It is \samp{\u20ac} in Unicode, which can be used in UTF-8 locales.
+  The Euro symbol may not be available in older fonts.  In current
+  versions of Adobe symbol fonts it is character 160, so \code{text(x,
+  y, "\xA0", font = 5)} may work. People using Western European locales
+  on Unix-alikes can probably select ISO-8895-15 (Latin-9) which has the
+  Euro as character 165: this can also be used for
+  \code{\link{postscript}} and \code{\link{pdf}}. It is \samp{\u20ac} in
+  Unicode, which can be used in UTF-8 locales.
 #ifdef unix
 
   The Euro should be rendered correctly by \code{\link{X11}} in UTF-8
   locales, but the corresponding single-byte encoding in
   \code{\link{postscript}} and \code{\link{pdf}} will need to be selected
-  as \code{ISOLatin9.enc}.
+  as \code{ISOLatin9.enc} (and the font will need to contain the Euro
+  glyph, which for example older printers may not).
 #endif
 #ifdef windows
 
diff --git a/src/library/graphics/man/title.Rd b/src/library/graphics/man/title.Rd
index 11b76ec..2eeb22c 100644
--- a/src/library/graphics/man/title.Rd
+++ b/src/library/graphics/man/title.Rd
@@ -1,6 +1,6 @@
 % File src/library/graphics/man/title.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2008 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2016 R Core Team
 % Distributed under GPL 2 or later
 
 \name{title}
@@ -11,13 +11,12 @@ title(main = NULL, sub = NULL, xlab = NULL, ylab = NULL,
 }
 \alias{title}
 \arguments{
-  \item{main}{The main title (on top) using font and size (character
-    expansion) \code{par("font.main")} and color
-    \code{par("col.main")}.}
-  \item{sub}{Sub-title (at bottom) using font and size
-    \code{par("font.sub")} and color \code{par("col.sub")}.}
-  \item{xlab}{X axis label using font and character expansion
-    \code{par("font.lab")} and color \code{par("col.lab")}.}
+  \item{main}{The main title (on top) using font, size (character
+    expansion) and color \code{par(c("font.main", "cex.main", "col.main"))}.}
+  \item{sub}{Sub-title (at bottom) using font, size and color 
+    \code{par(c("font.sub", "cex.sub", "col.sub"))}.}
+  \item{xlab}{X axis label using font, size and color 
+    \code{par(c("font.lab", "cex.lab", "col.lab"))}.}
   \item{ylab}{Y axis label, same font attributes as \code{xlab}.}
   \item{line}{specifying a value for \code{line} overrides the
     default placement of labels, and places them this many lines
diff --git a/src/library/graphics/man/units.Rd b/src/library/graphics/man/units.Rd
index 65f1df0..4228ad9 100644
--- a/src/library/graphics/man/units.Rd
+++ b/src/library/graphics/man/units.Rd
@@ -1,5 +1,5 @@
 % File src/library/graphics/man/units.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2007 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/graphics/man/xspline.Rd b/src/library/graphics/man/xspline.Rd
index 558d8a8..bf9f820 100644
--- a/src/library/graphics/man/xspline.Rd
+++ b/src/library/graphics/man/xspline.Rd
@@ -1,10 +1,8 @@
 % File src/library/graphics/man/xspline.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2007 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2014 R Core Team
 % Distributed under GPL 2 or later
 
-\newcommand{\sspace}{\ifelse{latex}{\out{~}}{ }}
-
 \name{xspline}
 \alias{xspline}
 \title{Draw an X-spline}
diff --git a/src/library/graphics/man/zAxis.Rd b/src/library/graphics/man/zAxis.Rd
index a33e55c..08248fc 100644
--- a/src/library/graphics/man/zAxis.Rd
+++ b/src/library/graphics/man/zAxis.Rd
@@ -1,5 +1,5 @@
 % File src/library/graphics/man/zAxis.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2010 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/graphics/po/R-da.po b/src/library/graphics/po/R-da.po
index 737671c..c9c5991 100644
--- a/src/library/graphics/po/R-da.po
+++ b/src/library/graphics/po/R-da.po
@@ -2,7 +2,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: R 3.0.0\n"
 "Report-Msgid-Bugs-To: bugs.r-project.org\n"
-"POT-Creation-Date: 2013-07-20 09:37\n"
+"POT-Creation-Date: 2016-04-01 09:50\n"
 "PO-Revision-Date: 2012-01-08 00:28+0200\n"
 "Last-Translator: Joe <joedalton2 at yahoo.dk>\n"
 "Language-Team: LANGUAGE <LL at li.org>\n"
@@ -227,6 +227,9 @@ msgstr ""
 msgid "'z' must be a matrix"
 msgstr ""
 
+msgid "'z' must be numeric or logical"
+msgstr ""
+
 msgid "invalid z limits"
 msgstr ""
 
@@ -308,6 +311,12 @@ msgstr ""
 msgid "only one column in the argument to 'pairs'"
 msgstr ""
 
+msgid "invalid argument 'horInd'"
+msgstr ""
+
+msgid "invalid argument 'verInd'"
+msgstr ""
+
 msgid "the 'panel' function made a new plot"
 msgstr ""
 
@@ -320,6 +329,9 @@ msgstr ""
 msgid "invalid table 'x'"
 msgstr ""
 
+msgid "the formula '%s' is treated as '%s'"
+msgstr ""
+
 msgid "cannot handle more than one 'x' coordinate"
 msgstr ""
 
@@ -440,8 +452,3 @@ msgid "argument %s is not made use of"
 msgid_plural "arguments %s are not made use of"
 msgstr[0] ""
 msgstr[1] ""
-
-msgid "extra argument %s will be disregarded"
-msgid_plural "extra arguments %s will be disregarded"
-msgstr[0] ""
-msgstr[1] ""
diff --git a/src/library/graphics/po/R-de.po b/src/library/graphics/po/R-de.po
index c3f9dd1..204c35c 100644
--- a/src/library/graphics/po/R-de.po
+++ b/src/library/graphics/po/R-de.po
@@ -4,13 +4,13 @@
 # Detlef Steuer <steuer at hsu-hh.de>, 2007-2014.
 msgid ""
 msgstr ""
-"Project-Id-Version: R 3.1.0\n"
+"Project-Id-Version: R 3.2.0\n"
 "Report-Msgid-Bugs-To: bugs.r-project.org\n"
-"POT-Creation-Date: 2013-07-20 09:37\n"
-"PO-Revision-Date: 2013-02-28 16:30+0100\n"
+"POT-Creation-Date: 2015-06-06 13:51\n"
+"PO-Revision-Date: 2016-04-08 11:14+0200\n"
 "Last-Translator: Detlef Steuer <steuer at hsu-hh.de>\n"
 "Language-Team: R-Core <R-core at r-project.org>\n"
-"Language: \n"
+"Language: de\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
@@ -35,7 +35,7 @@ msgid "all entries of 'x' must be nonnegative and finite"
 msgstr "alle Einträge in 'x' müssen nicht-negativ und endlich sein"
 
 msgid "at least one entry of 'x' must be positive"
-msgstr "midestens ein Eintrag in 'x' muss positiv sein"
+msgstr "mindestens ein Eintrag in 'x' muss positiv sein"
 
 msgid "incorrect 'col': must be length 2"
 msgstr "ungültiger Wert für 'col': muss Länge 2 haben"
@@ -101,7 +101,7 @@ msgstr "abhängige Variable sollte ein Faktor sein"
 
 msgid "y axis is on a cumulative probability scale, 'ylim' must be in [0,1]"
 msgstr ""
-"Y-Achse ist eine kumulative Wahscheinlichkeitsskala, 'ylim' muss in [0,1] "
+"Y-Achse ist eine kumulative Wahrscheinlichkeitsskala, 'ylim' muss in [0,1] "
 "sein"
 
 msgid "no 'z' matrix specified"
@@ -123,7 +123,7 @@ msgid "'number' must be integer >= 1"
 msgstr "'number' muss eine ganze Zahl >= 1 sein"
 
 msgid "'overlap' must be < 1 (and typically >= 0)."
-msgstr "'overlap' muss , 1 (und typisch >= 0 ) sein"
+msgstr "'overlap' muss < 1 (und typischerweise >= 0) sein"
 
 msgid "invalid 'given.values'"
 msgstr "ungültige 'given.values'"
@@ -140,7 +140,7 @@ msgstr ""
 "enthält"
 
 msgid "'add' will be ignored as there is no existing plot"
-msgstr "'add' wird ignoriert, da noch keine Grafik exisitiert"
+msgstr "'add' wird ignoriert, da noch keine Grafik existiert"
 
 msgid "'from' and 'to' must be > 0 with log=\"x\""
 msgstr "'from' und 'to' müssen > 0 sein mit log=\"x\""
@@ -161,7 +161,7 @@ msgid "Must specify 'breaks' in hist(<Date>)"
 msgstr "In hist(<Date>) müssen 'breaks' angegeben werden"
 
 msgid "'x' must be a numeric vector or matrix"
-msgstr "'x' muss ein nummerischer Vektor oder eine Matrix sein"
+msgstr "'x' muss ein numerischer Vektor oder eine Matrix sein"
 
 msgid "'x' is neither a vector nor a matrix: using as.numeric(x)"
 msgstr "'x' ist weder Vektor noch Matrix: nutze as.numeric(x)"
@@ -182,10 +182,10 @@ msgid "incorrect 'margin' specification"
 msgstr "ungültige Spezifikation von 'margin'"
 
 msgid "incorrect geometry specification"
-msgstr "ungültige Spzifikation der Geometrie"
+msgstr "ungültige Spezifikation der Geometrie"
 
 msgid "'x' must be numeric"
-msgstr "'x' muss nummerisch sein"
+msgstr "'x' muss numerisch sein"
 
 msgid "invalid length(x)"
 msgstr "ungültige length(x)"
@@ -200,7 +200,7 @@ msgid "unknown 'breaks' algorithm"
 msgstr "unbekannter Algorithmus für 'breaks'"
 
 msgid "invalid number of 'breaks'"
-msgstr "unzulässige Anzahle für 'breaks'"
+msgstr "unzulässige Anzahl für 'breaks'"
 
 msgid "hist.default: pretty() error, breaks=%s"
 msgstr "hist.default: Fehler in pretty(), breaks=%s"
@@ -237,11 +237,14 @@ msgstr "'x' und 'y' Werte müssen endlich und nicht fehlend sein"
 msgid "'z' must be a matrix"
 msgstr "'z' muss eine Matrix sein"
 
+msgid "'z' must be numeric or logical"
+msgstr "'z' muss numerisch oder logisch sein"
+
 msgid "invalid z limits"
 msgstr "unzulässige Grenzen für z"
 
 msgid "must have one more break than colour"
-msgstr "es muss eine Stützstelle mehr gebe als Farben"
+msgstr "es muss eine Stützstelle mehr geben als Farben"
 
 msgid "'breaks' must all be finite"
 msgstr "alle 'breaks' müssen endlich sein"
@@ -260,7 +263,7 @@ msgstr "ganzzahlige Farbangaben müssen nicht-negativ sein"
 
 msgid "'respect' must be logical or matrix with same dimension as 'mat'"
 msgstr ""
-"'respect' muss boolesch oder eine Matrix mit dem selben Format wie 'mat' sein"
+"'respect' muss boolesch oder eine Matrix mit demselben Format wie 'mat' sein"
 
 msgid ""
 "layout matrix must contain at least one reference\n"
@@ -279,7 +282,7 @@ msgid "invalid coordinate lengths"
 msgstr "unzulässige Koordinatenlängen"
 
 msgid "'text.width' must be numeric, >= 0"
-msgstr "'text.width' muss nummerisch >= 0 sein"
+msgstr "'text.width' muss numerisch >= 0 sein"
 
 msgid "horizontal specification overrides: Number of columns := %d"
 msgstr "horizontale Spezifikation überschreibt Anzahl der Spalten := %d"
@@ -311,17 +314,23 @@ msgid "'x' must not have 0 dimensionality"
 msgstr "'x' darf nicht Dimension 0 haben"
 
 msgid "invalid 'shade' specification"
-msgstr "unzulässige spezifikation für 'shade'"
+msgstr "unzulässige Spezifikation für 'shade'"
 
 msgid "length of 'sort' does not conform to 'dim(x)'"
 msgstr "Länge von 'sort' passt nicht zu 'dim(x)'"
 
 msgid "non-numeric argument to 'pairs'"
-msgstr "nicht-nummerisches Argument für 'pairs'"
+msgstr "nicht-numerisches Argument für 'pairs'"
 
 msgid "only one column in the argument to 'pairs'"
 msgstr "nur eine Spalte im Argument zu 'pairs'"
 
+msgid "invalid argument 'horInd'"
+msgstr "ungültiges Argument 'horInd'"
+
+msgid "invalid argument 'verInd'"
+msgstr "ungültiges Argument 'verInd'"
+
 msgid "the 'panel' function made a new plot"
 msgstr "die 'panel' Funktion hat neuen Plot erstellt"
 
@@ -344,7 +353,7 @@ msgid "'plot.data.frame' applied to non data frame"
 msgstr "'plot.data.frame' auf etwas anderes als einen Dataframe angewendet"
 
 msgid "'y' must be a numeric vector"
-msgstr "'z' muss nummerischer Vektor sein"
+msgstr "'z' muss numerischer Vektor sein"
 
 msgid "'x' must be a data frame"
 msgstr "'x' muss Dataframe sein"
@@ -359,10 +368,10 @@ msgid "'x' must be a dataframe or a formula"
 msgstr "'x' muss entweder Dataframe oder Formel sein"
 
 msgid "a variable in 'y' is not numeric"
-msgstr "a variable in 'y' ist nicht nummerisch"
+msgstr "a variable in 'y' ist nicht numerisch"
 
 msgid "there must be at least one numeric variable!"
-msgstr "es muss zumindest eine nummerische Varable vorhanden sein!"
+msgstr "es muss zumindest eine numerische Varable vorhanden sein!"
 
 msgid "cannot hatch with logarithmic scale active"
 msgstr "bei logarithmischer Skala hatch nicht möglich"
@@ -400,10 +409,10 @@ msgid "'x' must be a matrix or a data frame"
 msgstr "'x' muss eine Matrix oder ein Dataframe sein"
 
 msgid "data in 'x' must be numeric"
-msgstr "die Daten in 'x' müssen nummerisch sein"
+msgstr "die Daten in 'x' müssen numerisch sein"
 
 msgid "'nrow * ncol' is less than the number of observations"
-msgstr "'nrow * ncol' kleiner als die  Anzahl der Beobachtungen"
+msgstr "'nrow * ncol' ist kleiner als die Anzahl der Beobachtungen"
 
 msgid "labels do not make sense for a single location"
 msgstr "Labels haben keine Sinn für eine einzelne Position"
@@ -415,10 +424,10 @@ msgid "number of rows of 'locations' and 'x' must be equal."
 msgstr "Anzahl der Zeilen von 'locations' und 'x' müssen gleich sein"
 
 msgid "length of 'angles' must equal 'ncol(x)'"
-msgstr "Länge von 'angels' muss 'ncol(x)' entsprechen"
+msgstr "Länge von 'angles' muss 'ncol(x)' entsprechen"
 
 msgid "no finite and non-missing values"
-msgstr "keine endliche nicht-fehlenden Werte"
+msgstr "keine endlichen, nicht-fehlenden Werte"
 
 msgid "'scale' must be positive"
 msgstr "'scale' muss positiv sein"
@@ -457,10 +466,10 @@ msgid_plural "arguments %s are not made use of"
 msgstr[0] "Argument (%s) wird nicht benutzt"
 msgstr[1] "Argumente (%s) werden nicht benutzt"
 
-msgid "extra argument %s will be disregarded"
-msgid_plural "extra arguments %s will be disregarded"
-msgstr[0] "zusätzliches Argument %s wird verworfen"
-msgstr[1] "zusätzliche Argumente %s werden verworfen"
+#~ msgid "extra argument %s will be disregarded"
+#~ msgid_plural "extra arguments %s will be disregarded"
+#~ msgstr[0] "zusätzliches Argument %s wird verworfen"
+#~ msgstr[1] "zusätzliche Argumente %s werden verworfen"
 
 #~ msgid "negative 'counts'. Internal Error in C-code for \"bincount\""
 #~ msgstr "negative 'counts'. Interner Fehler im C-Kode für\"bincount\""
diff --git a/src/library/graphics/po/R-fr.po b/src/library/graphics/po/R-fr.po
index 2b98860..9402c0c 100644
--- a/src/library/graphics/po/R-fr.po
+++ b/src/library/graphics/po/R-fr.po
@@ -7,7 +7,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: R 2.12.0\n"
 "Report-Msgid-Bugs-To: bugs.r-project.org\n"
-"POT-Creation-Date: 2013-07-20 09:37\n"
+"POT-Creation-Date: 2016-04-01 09:50\n"
 "PO-Revision-Date: 2014-03-17 10:44+0100\n"
 "Last-Translator: Philippe Grosjean <phgrosjean at sciviews.org>\n"
 "Language-Team: French <R-core at r-project.org>\n"
@@ -241,6 +241,10 @@ msgstr "les valeurs de 'x' et 'y' doivent 
 msgid "'z' must be a matrix"
 msgstr "'z' doit �tre une matrice"
 
+#, fuzzy
+msgid "'z' must be numeric or logical"
+msgstr "'x' doit �tre num�rique"
+
 msgid "invalid z limits"
 msgstr "limites de z incorrectes"
 
@@ -331,6 +335,14 @@ msgstr "argument non num
 msgid "only one column in the argument to 'pairs'"
 msgstr "seulement une colonne dans l'argument pour 'pairs'"
 
+#, fuzzy
+msgid "invalid argument 'horInd'"
+msgstr "premier argument incorrect"
+
+#, fuzzy
+msgid "invalid argument 'verInd'"
+msgstr "premier argument incorrect"
+
 msgid "the 'panel' function made a new plot"
 msgstr "la fonction 'panel' a cr�� un nouveau graphe"
 
@@ -343,6 +355,9 @@ msgstr "les valeurs de 'x' doivent 
 msgid "invalid table 'x'"
 msgstr "tableau 'x' incorrect"
 
+msgid "the formula '%s' is treated as '%s'"
+msgstr ""
+
 msgid "cannot handle more than one 'x' coordinate"
 msgstr "incapable de traiter plus d'une coordonn�e 'x'"
 
@@ -469,10 +484,10 @@ msgid_plural "arguments %s are not made use of"
 msgstr[0] "l'argument %s n'est pas utilis� par"
 msgstr[1] "les arguments %s ne sont pas utilis�s par"
 
-msgid "extra argument %s will be disregarded"
-msgid_plural "extra arguments %s will be disregarded"
-msgstr[0] "l'argument suppl�mentaire %s sera ignor�"
-msgstr[1] "les arguments suppl�mentaires %s seront ignor�s"
+#~ msgid "extra argument %s will be disregarded"
+#~ msgid_plural "extra arguments %s will be disregarded"
+#~ msgstr[0] "l'argument suppl�mentaire %s sera ignor�"
+#~ msgstr[1] "les arguments suppl�mentaires %s seront ignor�s"
 
 #~ msgid "negative 'counts'. Internal Error in C-code for \"bincount\""
 #~ msgstr "'counts' n�gatif. Erreur interne dans le code C pour \"bincount\""
diff --git a/src/library/graphics/po/R-graphics.pot b/src/library/graphics/po/R-graphics.pot
index d6dd38b..4ddf1a4 100644
--- a/src/library/graphics/po/R-graphics.pot
+++ b/src/library/graphics/po/R-graphics.pot
@@ -1,8 +1,7 @@
 msgid ""
 msgstr ""
-"Project-Id-Version: R 3.1.0\n"
-"Report-Msgid-Bugs-To: bugs.r-project.org\n"
-"POT-Creation-Date: 2013-07-20 09:37\n"
+"Project-Id-Version: graphics 3.4.0\n"
+"POT-Creation-Date: 2016-04-01 09:50\n"
 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
 "Last-Translator: FULL NAME <EMAIL at ADDRESS>\n"
 "Language-Team: LANGUAGE <LL at li.org>\n"
@@ -224,6 +223,9 @@ msgstr ""
 msgid "'z' must be a matrix"
 msgstr ""
 
+msgid "'z' must be numeric or logical"
+msgstr ""
+
 msgid "invalid z limits"
 msgstr ""
 
@@ -302,6 +304,12 @@ msgstr ""
 msgid "only one column in the argument to 'pairs'"
 msgstr ""
 
+msgid "invalid argument 'horInd'"
+msgstr ""
+
+msgid "invalid argument 'verInd'"
+msgstr ""
+
 msgid "the 'panel' function made a new plot"
 msgstr ""
 
@@ -314,6 +322,9 @@ msgstr ""
 msgid "invalid table 'x'"
 msgstr ""
 
+msgid "the formula '%s' is treated as '%s'"
+msgstr ""
+
 msgid "cannot handle more than one 'x' coordinate"
 msgstr ""
 
@@ -434,8 +445,3 @@ msgid        "argument %s is not made use of"
 msgid_plural "arguments %s are not made use of"
 msgstr[0]    ""
 msgstr[1]    ""
-
-msgid        "extra argument %s will be disregarded"
-msgid_plural "extra arguments %s will be disregarded"
-msgstr[0]    ""
-msgstr[1]    ""
diff --git a/src/library/graphics/po/R-it.po b/src/library/graphics/po/R-it.po
index 13ef2d9..f4e5615 100644
--- a/src/library/graphics/po/R-it.po
+++ b/src/library/graphics/po/R-it.po
@@ -7,11 +7,11 @@ msgid ""
 msgstr ""
 "Project-Id-Version: R 2.3.0\n"
 "Report-Msgid-Bugs-To: bugs.r-project.org\n"
-"POT-Creation-Date: 2013-07-20 09:37\n"
+"POT-Creation-Date: 2016-04-01 09:50\n"
 "PO-Revision-Date: 2005-02-26 22:56+0100\n"
 "Last-Translator: Stefano M. Iacus <Stefano.Iacus at R-project.org>\n"
 "Language-Team: Italian\n"
-"Language: \n"
+"Language: it\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
@@ -242,6 +242,10 @@ msgstr ""
 msgid "'z' must be a matrix"
 msgstr "'z' deve essere una matrice"
 
+#, fuzzy
+msgid "'z' must be numeric or logical"
+msgstr "'x' deve essere numeric"
+
 msgid "invalid z limits"
 msgstr "limits di z non validi"
 
@@ -331,6 +335,14 @@ msgstr "argomento non numerico a 'pairs'"
 msgid "only one column in the argument to 'pairs'"
 msgstr "solo una colonna come argomento di 'pairs'"
 
+#, fuzzy
+msgid "invalid argument 'horInd'"
+msgstr "primo argomento non valido"
+
+#, fuzzy
+msgid "invalid argument 'verInd'"
+msgstr "primo argomento non valido"
+
 msgid "the 'panel' function made a new plot"
 msgstr "La funzione 'panel' ha generato un nuovo grafico"
 
@@ -343,6 +355,9 @@ msgstr "i valori di 'x' devono essere positiv"
 msgid "invalid table 'x'"
 msgstr "table 'x' non valida"
 
+msgid "the formula '%s' is treated as '%s'"
+msgstr ""
+
 msgid "cannot handle more than one 'x' coordinate"
 msgstr "non possono lavorare con piu' di una coordinata 'x'"
 
@@ -471,10 +486,10 @@ msgstr[0] ""
 msgstr[1] ""
 
 #, fuzzy
-msgid "extra argument %s will be disregarded"
-msgid_plural "extra arguments %s will be disregarded"
-msgstr[0] "gli argomenti in eccesso %s verranno ignorati"
-msgstr[1] "gli argomenti in eccesso %s verranno ignorati"
+#~ msgid "extra argument %s will be disregarded"
+#~ msgid_plural "extra arguments %s will be disregarded"
+#~ msgstr[0] "gli argomenti in eccesso %s verranno ignorati"
+#~ msgstr[1] "gli argomenti in eccesso %s verranno ignorati"
 
 #~ msgid "negative 'counts'. Internal Error in C-code for \"bincount\""
 #~ msgstr "'counts' negativi. Errore interno nel codice C oer \"bincount\""
diff --git a/src/library/graphics/po/R-ja.po b/src/library/graphics/po/R-ja.po
index 303537d..011c98e 100644
--- a/src/library/graphics/po/R-ja.po
+++ b/src/library/graphics/po/R-ja.po
@@ -2,17 +2,18 @@ msgid ""
 msgstr ""
 "Project-Id-Version: R 2.3.0 \n"
 "Report-Msgid-Bugs-To: bugs.r-project.org\n"
-"POT-Creation-Date: 2013-07-20 09:37\n"
-"PO-Revision-Date: 2014-03-22 05:27+0200 \n"
-"Last-Translator: sakamotoki  \n"
+"POT-Creation-Date: 2016-04-01 09:50\n"
+"PO-Revision-Date: 2015-03-27 14:16+0900 \n"
+"Last-Translator: Masafumi  \n"
 "Language-Team: RjpWiki Message Translation Team <mokada at md.tsukuba.ac.jp> \n"
 "Language: ja \n"
 "MIME-Version: 1.0 \n"
 "Content-Type: text/plain; charset=UTF-8 \n"
 "Content-Transfer-Encoding: 8bit \n"
 "Plural-Forms: nplurals=1; plural=0; \n"
-"X-Generator: Pootle 2.0.5 \n"
+"X-Generator: Pootle 2.5.1.1 \n"
 "Report- Msgid-Bugs-To: bugs at r-project.org \n"
+"X-POOTLE-MTIME: 1427433405.000000 \n"
 
 msgid "'a' is overridden by 'reg'"
 msgstr " 'a' は 'reg' により無効にされます "
@@ -234,6 +235,9 @@ msgstr " 'x' と 'y' の値は有限値であり欠損は許されません "
 msgid "'z' must be a matrix"
 msgstr " 'z' は行列でなければなりません "
 
+msgid "'z' must be numeric or logical"
+msgstr " 'z' は数値または論理値でなければなりません "
+
 msgid "invalid z limits"
 msgstr " 無効な z の限界です "
 
@@ -317,6 +321,12 @@ msgstr " 'pairs' へ数値でない引数が与えられました "
 msgid "only one column in the argument to 'pairs'"
 msgstr " 'pairs' の引数はただ一つの列しか持ちません "
 
+msgid "invalid argument 'horInd'"
+msgstr " 無効な引数 'horInd' です "
+
+msgid "invalid argument 'verInd'"
+msgstr " 無効な引数 'verInd' です "
+
 msgid "the 'panel' function made a new plot"
 msgstr " 'panel' 関数は新規のプロットを行いました "
 
@@ -329,6 +339,9 @@ msgstr " 'x' の値は正でなければなりません "
 msgid "invalid table 'x'"
 msgstr " テーブル 'x' は不正です "
 
+msgid "the formula '%s' is treated as '%s'"
+msgstr ""
+
 msgid "cannot handle more than one 'x' coordinate"
 msgstr " 二つ以上の 'x' 座標を扱うことはできません "
 
@@ -449,9 +462,9 @@ msgid "argument %s is not made use of"
 msgid_plural "arguments %s are not made use of"
 msgstr[0] " 引数 %s は使用されていません "
 
-msgid "extra argument %s will be disregarded"
-msgid_plural "extra arguments %s will be disregarded"
-msgstr[0] " 余分な引数 %s は無視されます "
+#~ msgid "extra argument %s will be disregarded"
+#~ msgid_plural "extra arguments %s will be disregarded"
+#~ msgstr[0] " 余分な引数 %s は無視されます "
 
 #~ msgid "negative 'counts'. Internal Error in C-code for \"bincount\""
 #~ msgstr ""
diff --git a/src/library/graphics/po/R-ko.po b/src/library/graphics/po/R-ko.po
index 489ad7a..b3c1c5c 100644
--- a/src/library/graphics/po/R-ko.po
+++ b/src/library/graphics/po/R-ko.po
@@ -1,24 +1,31 @@
 # Korean translation for R graphics package
-# src/library/graphics/po/R-ko.po
-# Copyright (C) 1995-2014 The R Core Team
+# ./graphics/po/R-ko.po
+#
+# Copyright (C) 1995-2016 The R Core Team
+#
 # This file is distributed under the same license as the R graphics package.
-# Chel Hee Lee <chl948 at mail.usask.ca>, 2008-2014.
+# Maintained by Chel Hee Lee <chl948 at mail.usask.ca>, 2008-2016.
+# Contact: Chel Hee Lee <gnustats at gmail.com>
+#
+# Notes:
+# Under development (unstable) starting from 11-APR-2016 for R-3.3.1 - QC: in progress
+# Freezed on 10-APR-2016 for R-3.3.0 - QC: PASS
+# Freezed on 30-MAR-2015 for R-3.2.0 - QC: PASS
+# Freezed on 06-FEB-2015 for R-3.1.3 - QC: PASS
 #
 msgid ""
 msgstr ""
-"Project-Id-Version: R 3.1.0\n"
+"Project-Id-Version: R-3.3.0\n"
 "Report-Msgid-Bugs-To: bugs.r-project.org\n"
-"POT-Creation-Date: 2013-07-20 09:37\n"
-"PO-Revision-Date: 2014-03-27 09:00-0600\n"
+"POT-Creation-Date: 2016-04-01 09:50\n"
+"PO-Revision-Date: 2016-04-11 13:08-0600\n"
 "Last-Translator: Chel Hee Lee <chl948 at mail.usask.ca>\n"
-"Language-Team:  <chl948 at mail.usask.ca>\n"
+"Language-Team: Chel Hee Lee <chl948 at mail.usask.ca>\n"
 "Language: ko\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
 "Plural-Forms: nplurals=1; plural=0;\n"
-"X-Poedit-SourceCharset: UTF-8\n"
-"X-Generator: Poedit 1.5.4\n"
 
 msgid "'a' is overridden by 'reg'"
 msgstr "'a'는 'reg'에 의하여 덮어씌워졌습니다"
@@ -241,6 +248,9 @@ msgstr "'x'와 'y'의 값들은 반드시 유한해야 하며 누락되지 않
 msgid "'z' must be a matrix"
 msgstr "'z'는 반드시 행렬이어야 합니다"
 
+msgid "'z' must be numeric or logical"
+msgstr "'z'는 반드시 수치형 또는 논리형이어야 합니다."
+
 msgid "invalid z limits"
 msgstr "유효하지 않은 z limits입니다"
 
@@ -324,6 +334,12 @@ msgstr "'pairs'에 숫자가 아닌 인자가 전달되었습니다"
 msgid "only one column in the argument to 'pairs'"
 msgstr ""
 
+msgid "invalid argument 'horInd'"
+msgstr "인자 'horInd'가 올바르지 않습니다."
+
+msgid "invalid argument 'verInd'"
+msgstr "인자 'verInd'가 올바르지 않습니다."
+
 msgid "the 'panel' function made a new plot"
 msgstr "'panel'함수가 새 플랏을 작성했습니다"
 
@@ -336,6 +352,9 @@ msgstr "'x'의 값은 반드시 양수이어야 합니다"
 msgid "invalid table 'x'"
 msgstr "유효하지 않은 테이블 'x'입니다"
 
+msgid "the formula '%s' is treated as '%s'"
+msgstr ""
+
 msgid "cannot handle more than one 'x' coordinate"
 msgstr "한개 이상의 'x'좌표를 처리할 수 없습니다"
 
@@ -457,6 +476,6 @@ msgid "argument %s is not made use of"
 msgid_plural "arguments %s are not made use of"
 msgstr[0] ""
 
-msgid "extra argument %s will be disregarded"
-msgid_plural "extra arguments %s will be disregarded"
-msgstr[0] "추가적인 인자들 %s은 무시되어질 것입니다"
+#~ msgid "extra argument %s will be disregarded"
+#~ msgid_plural "extra arguments %s will be disregarded"
+#~ msgstr[0] "추가적인 인자들 %s은 무시되어질 것입니다"
diff --git a/src/library/graphics/po/R-pl.po b/src/library/graphics/po/R-pl.po
index c8dd3d4..ac1a3b7 100644
--- a/src/library/graphics/po/R-pl.po
+++ b/src/library/graphics/po/R-pl.po
@@ -1,8 +1,8 @@
 msgid ""
 msgstr ""
-"Project-Id-Version: R 3.1.0\n"
+"Project-Id-Version: R 3.4.0\n"
 "Report-Msgid-Bugs-To: bugs.r-project.org\n"
-"POT-Creation-Date: 2013-07-20 09:37\n"
+"POT-Creation-Date: 2016-04-04 08:15\n"
 "PO-Revision-Date: \n"
 "Last-Translator: Łukasz Daniel <lukasz.daniel at gmail.com>\n"
 "Language-Team: Łukasz Daniel <lukasz.daniel at gmail.com>\n"
@@ -13,803 +13,774 @@ msgstr ""
 "na-Revision-Date: 2012-05-29 07:55+0100\n"
 "Plural-Forms: nplurals=3; plural=(n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 "
 "|| n%100>=20) ? 1 : 2);\n"
-"X-Poedit-SourceCharset: iso-8859-1\n"
-"X-Generator: Poedit 1.5.4\n"
+"X-Poedit-SourceCharset: UTF-8\n"
+"X-Generator: Poedit 1.8.7\n"
 
-# graphics/R/abline.R: 27
-# warning("'a' is overridden by 'reg'")
-msgid "'a' is overridden by 'reg'"
-msgstr "'a' jest nadpisane przez 'reg'"
-
-# graphics/R/abline.R: 34
-# warning(gettextf("only using the first two of %d regression coefficients", p), domain = NA)
-msgid "only using the first two of %d regression coefficients"
-msgstr "używanie tylko pierwszych dwóch z %d współczynników regresji"
+#. R/image.R: gettextf("%s can only be used with a regular grid", sQuote("useRaster = TRUE"))
+#: R/image.R:0
+msgid "%s can only be used with a regular grid"
+msgstr "%s może być użyte tylko z regularną siatką"
 
-# graphics/R/abline.R: 46
-# warning("'a' and 'b' are overridden by 'coef'")
+#. R/abline.R: warning("'a' and 'b' are overridden by 'coef'")
+#: R/abline.R:0
 msgid "'a' and 'b' are overridden by 'coef'"
 msgstr "'a' oraz 'b' są zastąpione przez 'coef'"
 
-# graphics/R/arrows.R: 24
-# stop("one of 'x1' and 'y1' must be given")
-# graphics/R/segments.R: 24
-# stop("one of 'x1' and 'y1' must be given")
-msgid "one of 'x1' and 'y1' must be given"
-msgstr "jeden z 'x1' oraz 'y1' musi być podany"
-
-# graphics/R/assocplot.R: 23
-# stop("'x' must be a 2-d contingency table")
-msgid "'x' must be a 2-d contingency table"
-msgstr "'x' musi być 2-wymiarową tabelą kontyngencji"
-
-# graphics/R/assocplot.R: 25
-# stop("all entries of 'x' must be nonnegative and finite")
-msgid "all entries of 'x' must be nonnegative and finite"
-msgstr "wszystkie wpisy 'x' muszą być nieujemne oraz skończone"
-
-# graphics/R/assocplot.R: 27
-# stop("at least one entry of 'x' must be positive")
-msgid "at least one entry of 'x' must be positive"
-msgstr "przynajmniej jeden wpis w 'x' musi być dodatni"
-
-# graphics/R/assocplot.R: 29
-# stop("incorrect 'col': must be length 2")
-msgid "incorrect 'col': must be length 2"
-msgstr "niepoprawne 'col': długość musi wynosić 2"
-
-# graphics/R/lines.R: 32
-# stop("only for 1-D table")
-# graphics/R/points.R: 32
-# stop("only for 1-D table")
-# graphics/R/axis.R: 60
-# stop("only for 1-D table")
-msgid "only for 1-D table"
-msgstr "tylko dla tabeli 1-wymiarowej"
+#. R/abline.R: warning("'a' is overridden by 'reg'")
+#: R/abline.R:0
+msgid "'a' is overridden by 'reg'"
+msgstr "'a' jest nadpisane przez 'reg'"
 
-# graphics/R/axis.R: 73
-# stop("'side' must be in {1:4}")
-msgid "'side' must be in {1:4}"
-msgstr "argument 'side' musi być w przedziale {1:4}"
+#. R/curve.R: warning("'add' will be ignored as there is no existing plot")
+#: R/curve.R:0
+msgid "'add' will be ignored as there is no existing plot"
+msgstr "'add' zostanie zignorowane ponieważ nie ma istniejącego wykresu"
 
-# graphics/R/axis.R: 77
-# stop("invalid 'axp'")
-msgid "invalid 'axp'"
-msgstr "niepoprawna wartość 'axp'"
+#. R/stripchart.R: gettextf("'at' must have length equal to the number %d of groups",     n)
+#: R/stripchart.R:0
+msgid "'at' must have length equal to the number %d of groups"
+msgstr "argument 'at' musi mieć długość równą liczbie %d grup"
 
-# graphics/R/axis.R: 79
-# stop("invalid 'log'")
-msgid "invalid 'log'"
-msgstr "niepoprawna wartość 'log'"
+#. R/boxplot.R: gettextf("'at' must have same length as 'z$n', i.e. %d", n)
+#: R/boxplot.R:0
+msgid "'at' must have same length as 'z$n', i.e. %d"
+msgstr "'at' musi mieć tę samą długość co 'z$n', tzn. %d"
 
-# graphics/R/axis.R: 82
-# stop("invalid positive 'axp[3]'")
-msgid "invalid positive 'axp[3]'"
-msgstr "niepoprawne dodatnie 'axp[3]'"
+#. R/hist.R: stop("'breaks' are not strictly increasing")
+#: R/hist.R:0
+msgid "'breaks' are not strictly increasing"
+msgstr "'breaks' nie są ściśle rosnące"
 
-# graphics/R/axis.R: 84
-# stop("invalid 'usr'")
-msgid "invalid 'usr'"
-msgstr "niepoprawny argument 'usr'"
+#. R/image.R: stop("'breaks' must all be finite")
+#: R/image.R:0
+msgid "'breaks' must all be finite"
+msgstr "wszystkie 'breaks' muszą być skończone"
 
-# graphics/R/barplot.R: 57
-# stop("'height' must be a vector or a matrix")
-msgid "'height' must be a vector or a matrix"
-msgstr "'height' musi być wektorem lub macierzą"
+#. R/fourfoldplot.R: stop("'conf.level' must be a single number between 0 and 1")
+#: R/fourfoldplot.R:0
+msgid "'conf.level' must be a single number between 0 and 1"
+msgstr "'conf.level' musi być pojedynczą liczbą pomiędzy 0 a 1"
 
-# graphics/R/barplot.R: 71
-# stop("Cannot use shading lines in bars when log scale is used")
-msgid "Cannot use shading lines in bars when log scale is used"
-msgstr ""
-"Nie można użyć linii cieniujących w słupkach kiedy używana jest skala "
-"logarytmiczna"
+#. R/curve.R: stop("'expr' did not evaluate to an object of length 'n'")
+#: R/curve.R:0
+msgid "'expr' did not evaluate to an object of length 'n'"
+msgstr "funkcja 'expr' nie została obliczona w obiekt o długości 'n'"
 
-# graphics/R/barplot.R: 95
-# stop("log scale error: at least one 'height + offset' value <= 0")
-msgid "log scale error: at least one 'height + offset' value <= 0"
+#. R/curve.R: gettextf("'expr' must be a function, or a call or an expression containing '%s'",     xname)
+#: R/curve.R:0
+msgid "'expr' must be a function, or a call or an expression containing '%s'"
 msgstr ""
-"błąd skali logarytmicznej: przynajmniej jedna wartość 'height + offset'  "
-"musi być <= 0"
-
-# graphics/R/barplot.R: 97
-# stop("log scale error: 'xlim' <= 0")
-msgid "log scale error: 'xlim' <= 0"
-msgstr "błąd skali logarytmicznej: 'xlim' <= 0"
-
-# graphics/R/barplot.R: 99
-# stop("log scale error: 'ylim' <= 0")
-msgid "log scale error: 'ylim' <= 0"
-msgstr "błąd skali logarytmicznej: 'ylim' <= 0"
+"'expr' musi być funkcją lub wywołaniem lub wyrażeniem zawierającym '%s'"
 
-# graphics/R/barplot.R: 169
-# stop("incorrect number of names")
-msgid "incorrect number of names"
-msgstr "nieprawidłowa liczba nazw"
+#. R/screen.R: stop("'figs' must be a vector or a matrix with 4 columns")
+#: R/screen.R:0
+msgid "'figs' must be a vector or a matrix with 4 columns"
+msgstr "'figs' musi być wektorem lub macierzą z 4-ma kolumnami"
 
-# graphics/src/plot.c: 1576
-# error(_("invalid first argument"))
-# graphics/R/stripchart.R: 36
-# stop("invalid first argument")
-# graphics/R/boxplot.R: 35
-# stop("invalid first argument")
-# graphics/R/boxplot.R: 186
-# stop("invalid first argument")
-msgid "invalid first argument"
-msgstr "niepoprawny pierwszy argument"
+#. R/screen.R: stop("'figs' must specify at least one screen")
+#: R/screen.R:0
+msgid "'figs' must specify at least one screen"
+msgstr "'figs' musi określać przynajmniej jeden ekran"
 
-# graphics/R/boxplot.R: 95
-# stop("'formula' missing or incorrect")
+#. R/boxplot.R: stop("'formula' missing or incorrect")
+#: R/boxplot.R:0
 msgid "'formula' missing or incorrect"
 msgstr "brakująca lub niepoprawna 'formula'"
 
-# graphics/R/boxplot.R: 190
-# stop(gettextf("'at' must have same length as 'z$n', i.e. %d", n),
-#              domain = NA)
-msgid "'at' must have same length as 'z$n', i.e. %d"
-msgstr "'at' musi mieć tę samą długość co 'z$n', tzn. %d"
-
-# graphics/R/boxplot.R: 263
-# stop("invalid boxplot widths")
-msgid "invalid boxplot widths"
-msgstr "niepoprawne szerokości wykresu pudełkowego"
-
-# graphics/R/boxplot.R: 287
-# warning("some notches went outside hinges ('box'): maybe set notch=FALSE")
-msgid "some notches went outside hinges ('box'): maybe set notch=FALSE"
-msgstr "niektóre wcięcia wyszły poza oś ('box'): może ustaw 'notch=FALSE'"
-
-# graphics/R/cdplot.R: 40
-# stop("'formula' should specify exactly two variables")
-# graphics/R/spineplot.R: 40
-# stop("'formula' should specify exactly two variables")
-# graphics/R/sunflowerplot.R: 104
-# stop("'formula' should specify exactly two variables")
+#. R/cdplot.R: stop("'formula' should specify exactly two variables")
+#. R/spineplot.R: stop("'formula' should specify exactly two variables")
+#. R/sunflowerplot.R: stop("'formula' should specify exactly two variables")
+#: R/cdplot.R:0 R/spineplot.R:0 R/sunflowerplot.R:0
 msgid "'formula' should specify exactly two variables"
 msgstr "'formula' powinna określać dokładnie dwie zmienne"
 
-# graphics/R/cdplot.R: 43
-# stop("dependent variable should be a factor")
-# graphics/R/cdplot.R: 77
-# stop("dependent variable should be a factor")
-# graphics/R/spineplot.R: 43
-# stop("dependent variable should be a factor")
-# graphics/R/spineplot.R: 81
-# stop("dependent variable should be a factor")
-msgid "dependent variable should be a factor"
-msgstr "zmienna zależna powinna być czynnikiem"
+#. R/curve.R: stop("'from' and 'to' must be > 0 with log=\"x\"")
+#: R/curve.R:0
+msgid "'from' and 'to' must be > 0 with log=\"x\""
+msgstr "'from' oraz 'to' muszą być > 0 z log=\"x\""
 
-# graphics/R/cdplot.R: 111
-# warning("y axis is on a cumulative probability scale, 'ylim' must be in [0,1]")
-# graphics/R/spineplot.R: 147
-# warning("y axis is on a cumulative probability scale, 'ylim' must be in [0,1]")
-msgid "y axis is on a cumulative probability scale, 'ylim' must be in [0,1]"
-msgstr ""
-"oś y jest w skali skumulowanego prawdopodobieństwa, 'ylim' musi być w "
-"przedziale [0,1]"
+#. R/barplot.R: stop("'height' must be a vector or a matrix")
+#: R/barplot.R:0
+msgid "'height' must be a vector or a matrix"
+msgstr "'height' musi być wektorem lub macierzą"
 
-# graphics/R/contour.R: 41
-# stop("no 'z' matrix specified")
-# graphics/R/image.R: 44
-# stop("no 'z' matrix specified")
-# graphics/R/persp.R: 49
-# stop("no 'z' matrix specified")
-# graphics/R/filled.contour.R: 45
-# stop("no 'z' matrix specified")
-msgid "no 'z' matrix specified"
-msgstr "nie określono macierzy 'z'"
+#. R/hist.R: warning("'include.lowest' ignored as 'breaks' is not a vector")
+#: R/hist.R:0
+msgid "'include.lowest' ignored as 'breaks' is not a vector"
+msgstr "'include.lowest' zignorowano ponieważ 'breaks' nie jest wektorem"
 
-# graphics/R/contour.R: 47
-# stop("increasing 'x' and 'y' values expected")
-# graphics/R/image.R: 60
-# stop("increasing 'x' and 'y' values expected")
-# graphics/R/persp.R: 56
-# stop("increasing 'x' and 'y' values expected")
-# graphics/R/filled.contour.R: 52
-# stop("increasing 'x' and 'y' values expected")
-msgid "increasing 'x' and 'y' values expected"
-msgstr "oczekiwano zwiększających się wartości 'x' oraz 'y'"
+#. R/legend.R: stop("'legend' is of length 0")
+#: R/legend.R:0
+msgid "'legend' is of length 0"
+msgstr "argument 'legend' ma długość 0"
 
-# graphics/R/contour.R: 49
-# stop("no proper 'z' matrix specified")
-# graphics/R/filled.contour.R: 105
-# stop("no proper 'z' matrix specified")
-msgid "no proper 'z' matrix specified"
-msgstr "nie określono odpowiedniej macierzy 'z'"
+#. R/stars.R: stop("'locations' must be a 2-column matrix.")
+#: R/stars.R:0
+msgid "'locations' must be a 2-column matrix."
+msgstr "'locations' musi być 2-kolumnową macierzą"
 
-# graphics/R/coplot.R: 63
-# stop("invalid conditioning formula")
-msgid "invalid conditioning formula"
-msgstr "niepoprawna formuła warunkowa"
+#. R/legend.R: warning("'merge = TRUE' has no effect when no line segments are drawn")
+#: R/legend.R:0
+msgid "'merge = TRUE' has no effect when no line segments are drawn"
+msgstr "'merge = TRUE' nie ma efektu gdy nie są rysowane żadne linie segmentów"
 
-# graphics/R/coplot.R: 64
-# stop("incompatible variable lengths")
-msgid "incompatible variable lengths"
-msgstr "niespójne długości zmiennych"
+#. R/hist.R: warning("'nclass' not used when 'breaks' is specified")
+#: R/hist.R:0
+msgid "'nclass' not used when 'breaks' is specified"
+msgstr "'nclass' nie jest używane gdy określony jest argument 'breaks'"
+
+#. R/stars.R: stop("'nrow * ncol' is less than the number of observations")
+#: R/stars.R:0
+msgid "'nrow * ncol' is less than the number of observations"
+msgstr "'ncol * nrow' jest mniejsze niż liczba obserwacji"
+
+#. R/smoothScatter.R: stop("'nrpoints' should be numeric scalar with value >= 0.")
+#: R/smoothScatter.R:0
+msgid "'nrpoints' should be numeric scalar with value >= 0."
+msgstr "'nrpoints' powinien być liczbą o wartości >= 0"
 
-# graphics/R/coplot.R: 119
-# stop("'number' must be integer >= 1")
+#. R/coplot.R: stop("'number' must be integer >= 1")
+#: R/coplot.R:0
 msgid "'number' must be integer >= 1"
 msgstr "'number' musi być liczbą całkowitą >= 1"
 
-# graphics/R/coplot.R: 120
-# stop("'overlap' must be < 1 (and typically >= 0).")
+#. R/sunflowerplot.R: stop("'number' must have same length as 'x' and 'y'")
+#: R/sunflowerplot.R:0
+msgid "'number' must have same length as 'x' and 'y'"
+msgstr "'number' musi mieć tę samą długość co 'x' oraz 'y'"
+
+#. R/coplot.R: stop("'overlap' must be < 1 (and typically >= 0).")
+#: R/coplot.R:0
 msgid "'overlap' must be < 1 (and typically >= 0)."
 msgstr "'overlap' musi być < 1 (oraz zazwyczaj >= 0)."
 
-# graphics/R/coplot.R: 122
-# stop("invalid 'given.values'")
-msgid "invalid 'given.values'"
-msgstr "niepoprawna wartość 'given.values'"
-
-# graphics/R/coplot.R: 200
-# stop("rows * columns too small")
-msgid "rows * columns too small"
-msgstr "liczba wierszy * liczba kolumn jest zbyt mała"
+#. R/plot.R: stop("'plot.data.frame' applied to non data frame")
+#: R/plot.R:0
+msgid "'plot.data.frame' applied to non data frame"
+msgstr "'plot.data.frame' zastosowano do danych niebędących ramką danych"
 
-# graphics/R/coplot.R: 351
-# gettextf("Missing rows: %s",
-#                            paste0(missingrows, collapse = ", "))
-msgid "Missing rows: %s"
-msgstr "Brakujące wiersze %s"
+#. R/hist.R: stop("'probability' is an alias for '!freq', however they differ.")
+#: R/hist.R:0
+msgid "'probability' is an alias for '!freq', however they differ."
+msgstr "'probability' jest aliasem dla '!freq', jednakże różnią się"
 
-# graphics/R/curve.R: 30
-# stop(gettextf("'expr' must be a function, or a call or an expression containing '%s'", xname), domain = NA)
-msgid "'expr' must be a function, or a call or an expression containing '%s'"
+#. R/layout.R: stop("'respect' must be logical or matrix with same dimension as 'mat'")
+#: R/layout.R:0
+msgid "'respect' must be logical or matrix with same dimension as 'mat'"
 msgstr ""
-"'expr' musi być funkcją lub wywołaniem lub wyrażeniem zawierającym '%s'"
-
-# graphics/R/curve.R: 34
-# warning("'add' will be ignored as there is no existing plot")
-msgid "'add' will be ignored as there is no existing plot"
-msgstr "'add' zostanie zignorowane ponieważ nie ma istniejącego wykresu"
-
-# graphics/R/curve.R: 54
-# stop("'from' and 'to' must be > 0 with log=\"x\"")
-msgid "'from' and 'to' must be > 0 with log=\"x\""
-msgstr "'from' oraz 'to' muszą być > 0 z log=\"x\""
+"'respect' musi być wartością logiczną lub macierzą o tym samym wymiarze co "
+"'mat'"
 
-# graphics/R/curve.R: 60
-# stop("'expr' did not evaluate to an object of length 'n'")
-msgid "'expr' did not evaluate to an object of length 'n'"
-msgstr "funkcja 'expr' nie została obliczona w obiekt o długości 'n'"
+#. R/stem.R: stop("'scale' must be positive")
+#: R/stem.R:0
+msgid "'scale' must be positive"
+msgstr "argument 'scale' musi być dodatni"
 
-# graphics/R/datetime.R: 90
-# stop("wrong method")
-# graphics/R/datetime.R: 250
-# stop("wrong method")
-msgid "wrong method"
-msgstr "błędna metoda"
+#. R/axis.R: stop("'side' must be in {1:4}")
+#: R/axis.R:0
+msgid "'side' must be in {1:4}"
+msgstr "argument 'side' musi być w przedziale {1:4}"
 
-# graphics/R/datetime.R: 96
-# stop("Must specify 'breaks' in hist(<POSIXt>)")
-msgid "Must specify 'breaks' in hist(<POSIXt>)"
-msgstr "'breaks' w 'hist(<POSIXt>)' muszą być określone"
+#. R/legend.R: stop("'text.width' must be numeric, >= 0")
+#: R/legend.R:0
+msgid "'text.width' must be numeric, >= 0"
+msgstr "argument 'text.width' musi być liczbą >= 0"
 
-# graphics/R/datetime.R: 116
-# stop("invalid specification of 'breaks'")
-# graphics/R/datetime.R: 169
-# stop("invalid specification of 'breaks'")
-# graphics/R/datetime.R: 271
-# stop("invalid specification of 'breaks'")
-# graphics/R/datetime.R: 314
-# stop("invalid specification of 'breaks'")
-msgid "invalid specification of 'breaks'"
-msgstr "niepoprawne określenie dla 'breaks'"
+#. R/matplot.R: stop("'x' and 'y' must have only 1 or the same number of columns")
+#: R/matplot.R:0
+msgid "'x' and 'y' must have only 1 or the same number of columns"
+msgstr "'x' oraz 'y' muszą mieć tylko 1 lub tę samą liczbę kolumn"
 
-# graphics/R/datetime.R: 255
-# stop("Must specify 'breaks' in hist(<Date>)")
-msgid "Must specify 'breaks' in hist(<Date>)"
-msgstr "'breaks' w 'hist(<Date>)' muszą być określone"
+#. R/matplot.R: stop("'x' and 'y' must have same number of rows")
+#: R/matplot.R:0
+msgid "'x' and 'y' must have same number of rows"
+msgstr "'x' oraz 'y' muszą mieć tę samą liczbę wierszy"
 
-# graphics/R/dotchart.R: 33
-# stop("'x' must be a numeric vector or matrix")
-msgid "'x' must be a numeric vector or matrix"
-msgstr "'x' musi być wektorem liczbowym lub macierzą"
+#. R/image.R: stop("'x' and 'y' values must be finite and non-missing")
+#: R/image.R:0
+msgid "'x' and 'y' values must be finite and non-missing"
+msgstr ""
+"wartości 'x' oraz 'y' muszą być skończone i nie mogą być wartościami "
+"brakującymi"
 
-# graphics/R/dotchart.R: 48
-# warning("'x' is neither a vector nor a matrix: using as.numeric(x)")
+#. R/dotchart.R: warning("'x' is neither a vector nor a matrix: using as.numeric(x)")
+#: R/dotchart.R:0
 msgid "'x' is neither a vector nor a matrix: using as.numeric(x)"
 msgstr "'x' nie jest ani wektorem ani macierzą: używanie 'as.numeric(x)'"
 
-# graphics/R/fourfoldplot.R: 54
-# stop("'x' must be an array")
-msgid "'x' must be an array"
-msgstr "'x' musi być tablicą"
+#. R/hist.R: stop("'x' is wrongly structured")
+#: R/hist.R:0
+msgid "'x' is wrongly structured"
+msgstr "'x' jest błędnie skonstruowany"
 
-# graphics/R/fourfoldplot.R: 62
-# stop("'x' must be 2- or 3-dimensional")
+#. R/fourfoldplot.R: stop("'x' must be 2- or 3-dimensional")
+#: R/fourfoldplot.R:0
 msgid "'x' must be 2- or 3-dimensional"
 msgstr "'x' musi być 2- lub 3-wymiarowe"
 
-# graphics/R/fourfoldplot.R: 64
-# stop("table for each stratum must be 2 by 2")
-msgid "table for each stratum must be 2 by 2"
-msgstr "tablica dla każdej warstwy musi być rozmiaru 2 na 2"
+#. R/assocplot.R: stop("'x' must be a 2-d contingency table")
+#: R/assocplot.R:0
+msgid "'x' must be a 2-d contingency table"
+msgstr "'x' musi być 2-wymiarową tabelą kontyngencji"
 
-# graphics/R/fourfoldplot.R: 81
-# stop("'conf.level' must be a single number between 0 and 1")
-msgid "'conf.level' must be a single number between 0 and 1"
-msgstr "'conf.level' musi być pojedynczą liczbą pomiędzy 0 a 1"
+#. R/plot.design.R: stop("'x' must be a data frame")
+#: R/plot.design.R:0
+msgid "'x' must be a data frame"
+msgstr "'x' musi być ramką danych"
 
-# graphics/R/fourfoldplot.R: 126
-# stop("incorrect 'margin' specification")
-msgid "incorrect 'margin' specification"
-msgstr "niepoprawne określenie 'margin'"
+#. R/plot.design.R: stop("'x' must be a dataframe or a formula")
+#: R/plot.design.R:0
+msgid "'x' must be a dataframe or a formula"
+msgstr "'x' musi być ramką danych lub formułą"
 
-# graphics/R/fourfoldplot.R: 181
-# stop("incorrect geometry specification")
-msgid "incorrect geometry specification"
-msgstr "niepoprawne określenie geometrii"
+#. R/stars.R: stop("'x' must be a matrix or a data frame")
+#: R/stars.R:0
+msgid "'x' must be a matrix or a data frame"
+msgstr "'x' musi być macierzą lub ramką danych"
+
+#. R/dotchart.R: stop("'x' must be a numeric vector or matrix")
+#: R/dotchart.R:0
+msgid "'x' must be a numeric vector or matrix"
+msgstr "'x' musi być wektorem liczbowym lub macierzą"
+
+#. R/fourfoldplot.R: stop("'x' must be an array")
+#: R/fourfoldplot.R:0
+msgid "'x' must be an array"
+msgstr "'x' musi być tablicą"
 
-# graphics/R/stem.R: 21
-# stop("'x' must be numeric")
-# graphics/R/hist.R: 33
-# stop("'x' must be numeric")
+#. R/hist.R: stop("'x' must be numeric")
+#. R/stem.R: stop("'x' must be numeric")
+#: R/hist.R:0 R/stem.R:0
 msgid "'x' must be numeric"
 msgstr "argument 'x' musi być liczbą"
 
-# graphics/R/stem.R: 24
-# stop("invalid length(x)")
-# graphics/R/hist.R: 37
-# stop("invalid length(x)")
-msgid "invalid length(x)"
-msgstr "niepoprawna wartość 'length(x)'"
+#. R/mosaicplot.R: stop("'x' must not have 0 dimensionality")
+#: R/mosaicplot.R:0
+msgid "'x' must not have 0 dimensionality"
+msgstr "argument 'x' nie może być 0-wymiarowy"
 
-# graphics/R/hist.R: 41
-# warning("'nclass' not used when 'breaks' is specified")
-msgid "'nclass' not used when 'breaks' is specified"
-msgstr "'nclass' nie jest używane gdy określony jest argument 'breaks'"
+#. R/pie.R: stop("'x' values must be positive.")
+#: R/pie.R:0
+msgid "'x' values must be positive."
+msgstr "wartości 'x' muszą być dodatnie"
 
-# graphics/R/hist.R: 51
-# warning("'include.lowest' ignored as 'breaks' is not a vector")
-msgid "'include.lowest' ignored as 'breaks' is not a vector"
-msgstr "'include.lowest' zignorowano ponieważ 'breaks' nie jest wektorem"
+#. R/plot.design.R: stop("'y' must be a numeric vector")
+#: R/plot.design.R:0
+msgid "'y' must be a numeric vector"
+msgstr "'y' musi być wektorem liczbowym"
 
-# graphics/R/hist.R: 62
-# stop("unknown 'breaks' algorithm")
-msgid "unknown 'breaks' algorithm"
-msgstr "nieznany algorytm 'breaks'"
+#. R/image.R: stop("'z' must be a matrix")
+#: R/image.R:0
+msgid "'z' must be a matrix"
+msgstr "'z' musi być macierzą"
 
-# graphics/R/hist.R: 67
-# stop("invalid number of 'breaks'")
-# graphics/R/hist.R: 75
-# stop("invalid number of 'breaks'")
-msgid "invalid number of 'breaks'"
-msgstr "niepoprawna liczba 'breaks'"
+#. R/image.R: stop("'z' must be numeric or logical")
+#: R/image.R:0
+msgid "'z' must be numeric or logical"
+msgstr "argument 'z' musi być liczbą lub wartością logiczną"
 
-# graphics/R/hist.R: 71
-# stop(gettextf("hist.default: pretty() error, breaks=%s",
-#         ##                   format(breaks)), domain = NA)
-# graphics/R/hist.R: 79
-# stop(gettextf("hist.default: pretty() error, breaks=%s",
-#                               format(breaks)), domain = NA)
-msgid "hist.default: pretty() error, breaks=%s"
-msgstr "hist.default: błąd 'pretty()', przerwy=%s"
+#. R/barplot.R: stop("Cannot use shading lines in bars when log scale is used")
+#: R/barplot.R:0
+msgid "Cannot use shading lines in bars when log scale is used"
+msgstr ""
+"Nie można użyć linii cieniujących w słupkach kiedy używana jest skala "
+"logarytmiczna"
 
-# graphics/R/hist.R: 84
-# stop(gettextf("Invalid breakpoints produced by 'breaks(x)': %s",
-#                               format(breaks)), domain = NA)
+#. R/hist.R: gettextf("Invalid breakpoints produced by 'breaks(x)': %s", format(breaks))
+#: R/hist.R:0
 msgid "Invalid breakpoints produced by 'breaks(x)': %s"
 msgstr "niepoprawne punkty przerw wyprodukowane przez funkcję 'breaks(x)': %s"
 
-# graphics/R/hist.R: 92
-# stop("invalid length(breaks)")
-msgid "invalid length(breaks)"
-msgstr "niepoprawna wartość 'length(breaks)'"
+#. R/polygon.R: stop("Invalid fill rule for graphics path")
+#: R/polygon.R:0
+msgid "Invalid fill rule for graphics path"
+msgstr "Niepoprawna reguła wypełnienia dla ścieżki graficznej"
 
-# graphics/R/hist.R: 99
-# stop("'breaks' are not strictly increasing")
-msgid "'breaks' are not strictly increasing"
-msgstr "'breaks' nie są ściśle rosnące"
+#. R/coplot.R: gettextf("Missing rows: %s", paste0(missingrows, collapse = ", "))
+#: R/coplot.R:0
+msgid "Missing rows: %s"
+msgstr "Brakujące wiersze %s"
 
-# graphics/R/hist.R: 104
-# stop("'probability' is an alias for '!freq', however they differ.")
-msgid "'probability' is an alias for '!freq', however they differ."
-msgstr "'probability' jest aliasem dla '!freq', jednakże różnią się"
+#. R/datetime.R: stop("Must specify 'breaks' in hist(<Date>)")
+#: R/datetime.R:0
+msgid "Must specify 'breaks' in hist(<Date>)"
+msgstr "'breaks' w 'hist(<Date>)' muszą być określone"
 
-# graphics/R/hist.R: 128
-# stop("some 'x' not counted; maybe 'breaks' do not span range of 'x'")
-msgid "some 'x' not counted; maybe 'breaks' do not span range of 'x'"
-msgstr ""
-"niektóre wartości zmiennej 'x' nie zostały zliczone; być może wartości "
-"argumentu 'breaks' nie rozciągają się na cały zakres zmiennej 'x'"
+#. R/datetime.R: stop("Must specify 'breaks' in hist(<POSIXt>)")
+#: R/datetime.R:0
+msgid "Must specify 'breaks' in hist(<POSIXt>)"
+msgstr "'breaks' w 'hist(<POSIXt>)' muszą być określone"
 
-# graphics/R/hist.R: 175
-# warning("the AREAS in the plot are wrong -- rather use 'freq = FALSE'")
-msgid "the AREAS in the plot are wrong -- rather use 'freq = FALSE'"
-msgstr "OBSZARY na wykresie są błędne -- użyj raczej 'freq=FALSE'"
+#. R/spineplot.R: stop("a 2-way table has to be specified")
+#: R/spineplot.R:0
+msgid "a 2-way table has to be specified"
+msgstr "2-kierunkowa tabela musi zostać określona"
 
-# graphics/R/hist.R: 179
-# stop("'x' is wrongly structured")
-msgid "'x' is wrongly structured"
-msgstr "'x' jest błędnie skonstruowany"
+#. R/plot.design.R: stop("a variable in 'y' is not numeric")
+#: R/plot.design.R:0
+msgid "a variable in 'y' is not numeric"
+msgstr "zmienna w 'y' nie jest liczbą"
+
+#. R/plot.design.R: stop("all columns/components of 'x' must be factors")
+#: R/plot.design.R:0
+msgid "all columns/components of 'x' must be factors"
+msgstr "wszystkie kolumny/komponenty 'x' muszą być czynnikami"
+
+#. R/assocplot.R: stop("all entries of 'x' must be nonnegative and finite")
+#: R/assocplot.R:0
+msgid "all entries of 'x' must be nonnegative and finite"
+msgstr "wszystkie wpisy 'x' muszą być nieujemne oraz skończone"
 
-# graphics/R/image.R: 38
-# stop("argument must be matrix-like")
+#. R/image.R: stop("argument must be matrix-like")
+#: R/image.R:0
 msgid "argument must be matrix-like"
 msgstr "argument musi być w stylu macierzy"
 
-# graphics/R/image.R: 58
-# stop("'x' and 'y' values must be finite and non-missing")
-msgid "'x' and 'y' values must be finite and non-missing"
-msgstr ""
-"wartości 'x' oraz 'y' muszą być skończone i nie mogą być wartościami "
-"brakującymi"
+#. R/assocplot.R: stop("at least one entry of 'x' must be positive")
+#: R/assocplot.R:0
+msgid "at least one entry of 'x' must be positive"
+msgstr "przynajmniej jeden wpis w 'x' musi być dodatni"
 
-# graphics/R/image.R: 62
-# stop("'z' must be a matrix")
-msgid "'z' must be a matrix"
-msgstr "'z' musi być macierzą"
+#. R/plot.R: stop("cannot handle more than one 'x' coordinate")
+#. R/plot.R: stop("cannot handle more than one 'x' coordinate")
+#. R/plot.R: stop("cannot handle more than one 'x' coordinate")
+#: R/plot.R:0
+msgid "cannot handle more than one 'x' coordinate"
+msgstr "nie można obsłużyć więcej niż jedną współrzędną 'x'"
 
-# graphics/R/image.R: 77
-# stop("invalid z limits")
-msgid "invalid z limits"
-msgstr "niepoprawne granice 'z'"
+#. R/polygon.R: warning("cannot hatch with logarithmic scale active")
+#: R/polygon.R:0
+msgid "cannot hatch with logarithmic scale active"
+msgstr "nie można utworzyć gdy aktywna jest skala logarytmiczna"
 
-# graphics/R/image.R: 87
-# stop("must have one more break than colour")
-msgid "must have one more break than colour"
-msgstr "wymagane jest posiadanie o jedną przerwę więcej niż jest kolorów"
+#. R/stars.R: stop("data in 'x' must be numeric")
+#: R/stars.R:0
+msgid "data in 'x' must be numeric"
+msgstr "dane w 'x' muszą być liczbami"
 
-# graphics/R/image.R: 89
-# stop("'breaks' must all be finite")
-msgid "'breaks' must all be finite"
-msgstr "wszystkie 'breaks' muszą być skończone"
+#. R/matplot.R: warning("default 'pch' is smaller than number of columns and hence recycled")
+#: R/matplot.R:0
+msgid "default 'pch' is smaller than number of columns and hence recycled"
+msgstr ""
+"domyślna wartość dla 'pch' jest mniejsza niż liczba kolumn dlatego też "
+"kolumny zostały zapętlone"
 
-# graphics/R/image.R: 91
-# warning("unsorted 'breaks' will be sorted before use")
-msgid "unsorted 'breaks' will be sorted before use"
-msgstr "nieposortowane 'breaks' zostaną posortowane przed użyciem"
+#. R/cdplot.R: stop("dependent variable should be a factor")
+#. R/cdplot.R: stop("dependent variable should be a factor")
+#. R/spineplot.R: stop("dependent variable should be a factor")
+#. R/spineplot.R: stop("dependent variable should be a factor")
+#: R/cdplot.R:0 R/spineplot.R:0
+msgid "dependent variable should be a factor"
+msgstr "zmienna zależna powinna być czynnikiem"
 
-# graphics/R/image.R: 104
-# stop("dimensions of z are not length(x)(-1) times length(y)(-1)")
+#. R/image.R: stop("dimensions of z are not length(x)(-1) times length(y)(-1)")
+#: R/image.R:0
 msgid "dimensions of z are not length(x)(-1) times length(y)(-1)"
 msgstr "wymiary 'z' nie są równe 'length(x)(-1) * length(y)(-1)'"
 
-# graphics/R/image.R: 126
-# stop(gettextf("%s can only be used with a regular grid",
-#                           sQuote("useRaster = TRUE")),
-#                  domain = NA)
-msgid "%s can only be used with a regular grid"
-msgstr "%s może być użyte tylko z regularną siatką"
+#. R/symbols.R: stop("exactly one symbol type must be specified")
+#: R/symbols.R:0
+msgid "exactly one symbol type must be specified"
+msgstr "dokładnie jeden typ symbolu musi być określony"
 
-# graphics/R/image.R: 133
-# stop("integer colors must be non-negative")
+#. R/stripchart.R: stop("formula missing or incorrect")
+#. R/sunflowerplot.R: stop("formula missing or incorrect")
+#: R/stripchart.R:0 R/sunflowerplot.R:0
+msgid "formula missing or incorrect"
+msgstr "brakuje formuły lub jest ona niepoprawna"
+
+#. R/hist.R: gettextf("hist.default: pretty() error, breaks=%s", format(breaks))
+#: R/hist.R:0
+msgid "hist.default: pretty() error, breaks=%s"
+msgstr "hist.default: błąd 'pretty()', przerwy=%s"
+
+#. R/legend.R: gettextf("horizontal specification overrides: Number of columns := %d",     n.leg)
+#: R/legend.R:0
+msgid "horizontal specification overrides: Number of columns := %d"
+msgstr "obejścia określenia poziomu: Liczba kolumn := %d"
+
+#. R/coplot.R: stop("incompatible variable lengths")
+#: R/coplot.R:0
+msgid "incompatible variable lengths"
+msgstr "niespójne długości zmiennych"
+
+#. R/assocplot.R: stop("incorrect 'col': must be length 2")
+#: R/assocplot.R:0
+msgid "incorrect 'col': must be length 2"
+msgstr "niepoprawne 'col': długość musi wynosić 2"
+
+#. R/fourfoldplot.R: stop("incorrect 'margin' specification")
+#: R/fourfoldplot.R:0
+msgid "incorrect 'margin' specification"
+msgstr "niepoprawne określenie 'margin'"
+
+#. R/fourfoldplot.R: stop("incorrect geometry specification")
+#: R/fourfoldplot.R:0
+msgid "incorrect geometry specification"
+msgstr "niepoprawne określenie geometrii"
+
+#. R/barplot.R: stop("incorrect number of names")
+#: R/barplot.R:0
+msgid "incorrect number of names"
+msgstr "nieprawidłowa liczba nazw"
+
+#. R/contour.R: stop("increasing 'x' and 'y' values expected")
+#. R/filled.contour.R: stop("increasing 'x' and 'y' values expected")
+#. R/image.R: stop("increasing 'x' and 'y' values expected")
+#. R/persp.R: stop("increasing 'x' and 'y' values expected")
+#: R/contour.R:0 R/filled.contour.R:0 R/image.R:0 R/persp.R:0
+msgid "increasing 'x' and 'y' values expected"
+msgstr "oczekiwano zwiększających się wartości 'x' oraz 'y'"
+
+#. R/image.R: stop("integer colors must be non-negative")
+#: R/image.R:0
 msgid "integer colors must be non-negative"
 msgstr "kolory całkowite muszą być nieujemne"
 
-# graphics/R/layout.R: 30
-# stop("'respect' must be logical or matrix with same dimension as 'mat'")
-msgid "'respect' must be logical or matrix with same dimension as 'mat'"
-msgstr ""
-"'respect' musi być wartością logiczną lub macierzą o tym samym wymiarze co "
-"'mat'"
+#. R/axis.R: stop("invalid 'axp'")
+#: R/axis.R:0
+msgid "invalid 'axp'"
+msgstr "niepoprawna wartość 'axp'"
 
-msgid ""
-"layout matrix must contain at least one reference\n"
-"to each of the values {1 ... %d}"
-msgstr ""
-"macierz layoutu musi zawierać przynajmniej jedną referencję\n"
-"do każdej z wartości {1 ... %d}"
+#. R/coplot.R: stop("invalid 'given.values'")
+#: R/coplot.R:0
+msgid "invalid 'given.values'"
+msgstr "niepoprawna wartość 'given.values'"
+
+#. R/axis.R: stop("invalid 'log'")
+#: R/axis.R:0
+msgid "invalid 'log'"
+msgstr "niepoprawna wartość 'log'"
 
-# graphics/R/legend.R: 45
-# stop("invalid 'title'")
+#. R/mosaicplot.R: stop("invalid 'shade' specification")
+#: R/mosaicplot.R:0
+msgid "invalid 'shade' specification"
+msgstr "niepoprawne określenie 'shade'"
+
+#. R/legend.R: stop("invalid 'title'")
+#: R/legend.R:0
 msgid "invalid 'title'"
 msgstr "niepoprawny argument 'title'"
 
-# graphics/R/legend.R: 48
-# stop("'legend' is of length 0")
-msgid "'legend' is of length 0"
-msgstr "argument 'legend' ma długość 0"
+#. R/axis.R: stop("invalid 'usr'")
+#: R/axis.R:0
+msgid "invalid 'usr'"
+msgstr "niepoprawny argument 'usr'"
 
-# graphics/R/legend.R: 58
-# stop("invalid coordinate lengths")
-msgid "invalid coordinate lengths"
-msgstr "niepoprawne długości współrzędnych"
+#. R/pairs.R: stop("invalid argument 'horInd'")
+#: R/pairs.R:0
+msgid "invalid argument 'horInd'"
+msgstr "niepoprawny argument 'horInd'"
 
-# graphics/R/legend.R: 97
-# stop("'text.width' must be numeric, >= 0")
-msgid "'text.width' must be numeric, >= 0"
-msgstr "argument 'text.width' musi być liczbą >= 0"
+#. R/pairs.R: stop("invalid argument 'verInd'")
+#: R/pairs.R:0
+msgid "invalid argument 'verInd'"
+msgstr "niepoprawny argument 'verInd'"
 
-# graphics/R/legend.R: 124
-# warning(gettextf("horizontal specification overrides: Number of columns := %d",
-#                                  n.leg), domain = NA)
-msgid "horizontal specification overrides: Number of columns := %d"
-msgstr "obejścia określenia poziomu: Liczba kolumn := %d"
+#. R/boxplot.R: stop("invalid boxplot widths")
+#: R/boxplot.R:0
+msgid "invalid boxplot widths"
+msgstr "niepoprawne szerokości wykresu pudełkowego"
 
-# graphics/R/legend.R: 134
-# warning("'merge = TRUE' has no effect when no line segments are drawn")
-msgid "'merge = TRUE' has no effect when no line segments are drawn"
-msgstr "'merge = TRUE' nie ma efektu gdy nie są rysowane żadne linie segmentów"
+#. R/coplot.R: stop("invalid conditioning formula")
+#: R/coplot.R:0
+msgid "invalid conditioning formula"
+msgstr "niepoprawna formuła warunkowa"
 
-# graphics/R/legend.R: 140
-# warning("not using pch[2..] since pch[1L] has multiple chars")
-msgid "not using pch[2..] since pch[1L] has multiple chars"
-msgstr "nie używam 'pch[2..]' skoro 'pch[1L]' ma wielokrotne znaki"
+#. R/legend.R: stop("invalid coordinate lengths")
+#: R/legend.R:0
+msgid "invalid coordinate lengths"
+msgstr "niepoprawne długości współrzędnych"
 
-# graphics/R/matplot.R: 47
-# stop("must specify at least one of 'x' and 'y'")
-msgid "must specify at least one of 'x' and 'y'"
-msgstr "wymagane jest określenie przynajmniej jednej z 'x' oraz 'y'"
+#. R/boxplot.R: stop("invalid first argument")
+#. R/boxplot.R: stop("invalid first argument")
+#. R/stripchart.R: stop("invalid first argument")
+#: R/boxplot.R:0 R/stripchart.R:0
+msgid "invalid first argument"
+msgstr "niepoprawny pierwszy argument"
 
-# graphics/R/matplot.R: 56
-# stop("'x' and 'y' must have same number of rows")
-msgid "'x' and 'y' must have same number of rows"
-msgstr "'x' oraz 'y' muszą mieć tę samą liczbę wierszy"
+#. R/hist.R: stop("invalid length(breaks)")
+#: R/hist.R:0
+msgid "invalid length(breaks)"
+msgstr "niepoprawna wartość 'length(breaks)'"
 
-# graphics/R/matplot.R: 59
-# stop("'x' and 'y' must have only 1 or the same number of columns")
-msgid "'x' and 'y' must have only 1 or the same number of columns"
-msgstr "'x' oraz 'y' muszą mieć tylko 1 lub tę samą liczbę kolumn"
+#. R/hist.R: stop("invalid length(x)")
+#. R/stem.R: stop("invalid length(x)")
+#: R/hist.R:0 R/stem.R:0
+msgid "invalid length(x)"
+msgstr "niepoprawna wartość 'length(x)'"
 
-# graphics/R/matplot.R: 68
-# warning("default 'pch' is smaller than number of columns and hence recycled")
-msgid "default 'pch' is smaller than number of columns and hence recycled"
-msgstr ""
-"domyślna wartość dla 'pch' jest mniejsza niż liczba kolumn dlatego też "
-"kolumny zostały zapętlone"
+#. R/hist.R: stop("invalid number of 'breaks'")
+#: R/hist.R:0
+msgid "invalid number of 'breaks'"
+msgstr "niepoprawna liczba 'breaks'"
 
-# graphics/R/mosaicplot.R: 58
-# stop("missing values in contingency table")
-msgid "missing values in contingency table"
-msgstr "brakujące wartości w tabeli kontyngencji"
+#. R/stripchart.R: stop("invalid plotting method")
+#: R/stripchart.R:0
+msgid "invalid plotting method"
+msgstr "niepoprawna metoda rysowania wykresu"
 
-# graphics/R/mosaicplot.R: 182
-# stop("'x' must not have 0 dimensionality")
-msgid "'x' must not have 0 dimensionality"
-msgstr "argument 'x' nie może być 0-wymiarowy"
+#. R/axis.R: stop("invalid positive 'axp[3]'")
+#: R/axis.R:0
+msgid "invalid positive 'axp[3]'"
+msgstr "niepoprawne dodatnie 'axp[3]'"
 
-# graphics/R/mosaicplot.R: 218
-# stop("invalid 'shade' specification")
-msgid "invalid 'shade' specification"
-msgstr "niepoprawne określenie 'shade'"
+#. R/rect.R: stop("invalid rectangle specification")
+#: R/rect.R:0
+msgid "invalid rectangle specification"
+msgstr "niepoprawne określenie prostokąta"
 
-# graphics/R/mosaicplot.R: 268
-# stop("length of 'sort' does not conform to 'dim(x)'")
-msgid "length of 'sort' does not conform to 'dim(x)'"
-msgstr "długość  'sort' nie jest zgodna z 'dim(x)'"
+#. R/screen.R: stop("invalid screen number")
+#. R/screen.R: stop("invalid screen number")
+#. R/screen.R: stop("invalid screen number")
+#: R/screen.R:0
+msgid "invalid screen number"
+msgstr "niepoprawny numer ekranu"
 
-# graphics/R/pairs.R: 83
-# stop("non-numeric argument to 'pairs'")
-# graphics/R/pairs.R: 85
-# stop("non-numeric argument to 'pairs'")
-msgid "non-numeric argument to 'pairs'"
-msgstr "argument nieliczbowy przekazywany do 'pairs'"
+#. R/datetime.R: stop("invalid specification of 'breaks'")
+#. R/datetime.R: stop("invalid specification of 'breaks'")
+#. R/datetime.R: stop("invalid specification of 'breaks'")
+#. R/datetime.R: stop("invalid specification of 'breaks'")
+#: R/datetime.R:0
+msgid "invalid specification of 'breaks'"
+msgstr "niepoprawne określenie dla 'breaks'"
 
-# graphics/R/pairs.R: 100
-# stop("only one column in the argument to 'pairs'")
-msgid "only one column in the argument to 'pairs'"
-msgstr "tylko jedna kolumna w argumencie przekazywanym do 'pairs'"
+#. R/plot.R: stop("invalid table 'x'")
+#: R/plot.R:0
+msgid "invalid table 'x'"
+msgstr "niepoprawna tabela 'x'"
 
-# graphics/R/pairs.R: 153
-# stop("the 'panel' function made a new plot")
-msgid "the 'panel' function made a new plot"
-msgstr "funkcja 'panel' utworzyła nowy wykres"
+#. R/image.R: stop("invalid z limits")
+#: R/image.R:0
+msgid "invalid z limits"
+msgstr "niepoprawne granice 'z'"
 
-# graphics/R/persp.R: 62
-# warning("surface extends beyond the box")
-msgid "surface extends beyond the box"
-msgstr "powierzchnia rozciąga się poza pudełko"
+#. R/stars.R: warning("labels do not make sense for a single location")
+#: R/stars.R:0
+msgid "labels do not make sense for a single location"
+msgstr "etykiety nie mają sensu dla pojedynczego położenia"
 
-# graphics/R/pie.R: 26
-# stop("'x' values must be positive.")
-msgid "'x' values must be positive."
-msgstr "wartości 'x' muszą być dodatnie"
+#. R/layout.R: gettextf("layout matrix must contain at least one reference\nto each of the values {1 ... %d}\n",     num.figures)
+#: R/layout.R:0
+msgid ""
+"layout matrix must contain at least one reference\n"
+"to each of the values {1 ... %d}"
+msgstr ""
+"macierz layoutu musi zawierać przynajmniej jedną referencję\n"
+"do każdej z wartości {1 ... %d}"
 
-# graphics/R/plot.R: 119
-# stop("invalid table 'x'")
-msgid "invalid table 'x'"
-msgstr "niepoprawna tabela 'x'"
+#. R/stars.R: stop("length of 'angles' must equal 'ncol(x)'")
+#: R/stars.R:0
+msgid "length of 'angles' must equal 'ncol(x)'"
+msgstr "długość 'angles' musi równać się 'ncol(x)'"
 
-# graphics/R/plot.R: 245
-# stop("cannot handle more than one 'x' coordinate")
-# graphics/R/plot.R: 286
-# stop("cannot handle more than one 'x' coordinate")
-# graphics/R/plot.R: 326
-# stop("cannot handle more than one 'x' coordinate")
-msgid "cannot handle more than one 'x' coordinate"
-msgstr "nie można obsłużyć więcej niż jedną współrzędną 'x'"
+#. R/mosaicplot.R: stop("length of 'sort' does not conform to 'dim(x)'")
+#: R/mosaicplot.R:0
+msgid "length of 'sort' does not conform to 'dim(x)'"
+msgstr "długość  'sort' nie jest zgodna z 'dim(x)'"
 
-# graphics/R/plot.R: 252
-# stop("must have a response variable")
-# graphics/R/plot.R: 293
-# stop("must have a response variable")
-# graphics/R/plot.R: 333
-# stop("must have a response variable")
-msgid "must have a response variable"
-msgstr "wymagana jest zmienna zależna"
+#. R/barplot.R: stop("log scale error: 'xlim' <= 0")
+#: R/barplot.R:0
+msgid "log scale error: 'xlim' <= 0"
+msgstr "błąd skali logarytmicznej: 'xlim' <= 0"
 
-# graphics/R/plot.R: 372
-# stop("'plot.data.frame' applied to non data frame")
-msgid "'plot.data.frame' applied to non data frame"
-msgstr "'plot.data.frame' zastosowano do danych niebędących ramką danych"
+#. R/barplot.R: stop("log scale error: 'ylim' <= 0")
+#: R/barplot.R:0
+msgid "log scale error: 'ylim' <= 0"
+msgstr "błąd skali logarytmicznej: 'ylim' <= 0"
 
-# graphics/R/plot.design.R: 30
-# stop("'y' must be a numeric vector")
-msgid "'y' must be a numeric vector"
-msgstr "'y' musi być wektorem liczbowym"
+#. R/barplot.R: stop("log scale error: at least one 'height + offset' value <= 0")
+#: R/barplot.R:0
+msgid "log scale error: at least one 'height + offset' value <= 0"
+msgstr ""
+"błąd skali logarytmicznej: przynajmniej jedna wartość 'height + offset'  "
+"musi być <= 0"
 
-# graphics/R/plot.design.R: 32
-# stop("'x' must be a data frame")
-msgid "'x' must be a data frame"
-msgstr "'x' musi być ramką danych"
+#. R/units.R: warning("log scale:  xyinch() is nonsense")
+#: R/units.R:0
+msgid "log scale:  xyinch() is nonsense"
+msgstr "skala logarytmiczna:  'xyinch()' nie ma sensu"
 
-# graphics/R/plot.design.R: 34
-# stop("all columns/components of 'x' must be factors")
-msgid "all columns/components of 'x' must be factors"
-msgstr "wszystkie kolumny/komponenty 'x' muszą być czynnikami"
+#. R/mosaicplot.R: stop("missing values in contingency table")
+#: R/mosaicplot.R:0
+msgid "missing values in contingency table"
+msgstr "brakujące wartości w tabeli kontyngencji"
 
-# graphics/R/plot.design.R: 43
-# warning("some levels of the factors are empty", call. = FALSE)
-msgid "some levels of the factors are empty"
-msgstr "niektóre poziomy czynników są puste"
+#. R/plot.R: stop("must have a response variable")
+#. R/plot.R: stop("must have a response variable")
+#. R/plot.R: stop("must have a response variable")
+#: R/plot.R:0
+msgid "must have a response variable"
+msgstr "wymagana jest zmienna zależna"
 
-# graphics/R/plot.design.R: 69
-# stop("'x' must be a dataframe or a formula")
-msgid "'x' must be a dataframe or a formula"
-msgstr "'x' musi być ramką danych lub formułą"
+#. R/image.R: stop("must have one more break than colour")
+#: R/image.R:0
+msgid "must have one more break than colour"
+msgstr "wymagane jest posiadanie o jedną przerwę więcej niż jest kolorów"
 
-# graphics/R/plot.design.R: 86
-# stop("a variable in 'y' is not numeric")
-msgid "a variable in 'y' is not numeric"
-msgstr "zmienna w 'y' nie jest liczbą"
+#. R/matplot.R: stop("must specify at least one of 'x' and 'y'")
+#: R/matplot.R:0
+msgid "must specify at least one of 'x' and 'y'"
+msgstr "wymagane jest określenie przynajmniej jednej z 'x' oraz 'y'"
 
-# graphics/R/plot.design.R: 105
-# stop("there must be at least one numeric variable!")
-msgid "there must be at least one numeric variable!"
-msgstr "musi być przynajmniej jedna zmienna liczbowa!"
+#. R/contour.R: stop("no 'z' matrix specified")
+#. R/filled.contour.R: stop("no 'z' matrix specified")
+#. R/image.R: stop("no 'z' matrix specified")
+#. R/persp.R: stop("no 'z' matrix specified")
+#: R/contour.R:0 R/filled.contour.R:0 R/image.R:0 R/persp.R:0
+msgid "no 'z' matrix specified"
+msgstr "nie określono macierzy 'z'"
 
-# graphics/R/polygon.R: 118
-# warning("cannot hatch with logarithmic scale active")
-msgid "cannot hatch with logarithmic scale active"
-msgstr "nie można utworzyć gdy aktywna jest skala logarytmiczna"
+#. R/stem.R: stop("no finite and non-missing values")
+#: R/stem.R:0
+msgid "no finite and non-missing values"
+msgstr "brak skończonych i niebrakujących wartości"
 
-# graphics/R/polygon.R: 305
-# stop("Invalid fill rule for graphics path")
-msgid "Invalid fill rule for graphics path"
-msgstr "Niepoprawna reguła wypełnienia dla ścieżki graficznej"
+#. R/contour.R: stop("no proper 'z' matrix specified")
+#. R/filled.contour.R: stop("no proper 'z' matrix specified")
+#: R/contour.R:0 R/filled.contour.R:0
+msgid "no proper 'z' matrix specified"
+msgstr "nie określono odpowiedniej macierzy 'z'"
 
-# graphics/R/rect.R: 33
-# stop("invalid rectangle specification")
-msgid "invalid rectangle specification"
-msgstr "niepoprawne określenie prostokąta"
+#. R/pairs.R: stop("non-numeric argument to 'pairs'")
+#. R/pairs.R: stop("non-numeric argument to 'pairs'")
+#: R/pairs.R:0
+msgid "non-numeric argument to 'pairs'"
+msgstr "argument nieliczbowy przekazywany do 'pairs'"
 
-# graphics/R/rug.R: 33
-# warning("some values will be clipped")
-msgid "some values will be clipped"
-msgstr "niektóre wartości będą przycięte"
+#. R/legend.R: warning("not using pch[2..] since pch[1L] has multiple chars")
+#: R/legend.R:0
+msgid "not using pch[2..] since pch[1L] has multiple chars"
+msgstr "nie używam 'pch[2..]' skoro 'pch[1L]' ma wielokrotne znaki"
 
-# graphics/R/screen.R: 47
-# stop("invalid screen number")
-# graphics/R/screen.R: 122
-# stop("invalid screen number")
-# graphics/R/screen.R: 139
-# stop("invalid screen number")
-msgid "invalid screen number"
-msgstr "niepoprawny numer ekranu"
+#. R/stars.R: stop("number of rows of 'locations' and 'x' must be equal.")
+#: R/stars.R:0
+msgid "number of rows of 'locations' and 'x' must be equal."
+msgstr "liczba wierszy dla 'locations' oraz 'x' muszą być równe"
 
-# graphics/R/screen.R: 51
-# stop("'figs' must be a vector or a matrix with 4 columns")
-msgid "'figs' must be a vector or a matrix with 4 columns"
-msgstr "'figs' musi być wektorem lub macierzą z 4-ma kolumnami"
+#. R/arrows.R: stop("one of 'x1' and 'y1' must be given")
+#. R/segments.R: stop("one of 'x1' and 'y1' must be given")
+#: R/arrows.R:0 R/segments.R:0
+msgid "one of 'x1' and 'y1' must be given"
+msgstr "jeden z 'x1' oraz 'y1' musi być podany"
 
-# graphics/R/screen.R: 63
-# stop("'figs' must specify at least one screen")
-msgid "'figs' must specify at least one screen"
-msgstr "'figs' musi określać przynajmniej jeden ekran"
+#. R/axis.R: stop("only for 1-D table")
+#. R/lines.R: stop("only for 1-D table")
+#. R/points.R: stop("only for 1-D table")
+#: R/axis.R:0 R/lines.R:0 R/points.R:0
+msgid "only for 1-D table"
+msgstr "tylko dla tabeli 1-wymiarowej"
 
-# graphics/R/smoothScatter.R: 29
-# stop("'nrpoints' should be numeric scalar with value >= 0.")
-msgid "'nrpoints' should be numeric scalar with value >= 0."
-msgstr "'nrpoints' powinien być liczbą o wartości >= 0"
+#. R/pairs.R: stop("only one column in the argument to 'pairs'")
+#: R/pairs.R:0
+msgid "only one column in the argument to 'pairs'"
+msgstr "tylko jedna kolumna w argumencie przekazywanym do 'pairs'"
 
-# graphics/R/spineplot.R: 71
-# stop("a 2-way table has to be specified")
-msgid "a 2-way table has to be specified"
-msgstr "2-kierunkowa tabela musi zostać określona"
+#. R/abline.R: gettextf("only using the first two of %d regression coefficients",     p)
+#: R/abline.R:0
+msgid "only using the first two of %d regression coefficients"
+msgstr "używanie tylko pierwszych dwóch z %d współczynników regresji"
 
-# graphics/R/spineplot.R: 142
-# warning("x axis is on a cumulative probability scale, 'xlim' must be in [0,1]")
-msgid "x axis is on a cumulative probability scale, 'xlim' must be in [0,1]"
-msgstr ""
-"oś x jest w skali skumulowanego prawdopodobieństwa, 'xlim' musi być pomiędzy "
-"[0,1]"
+#. R/coplot.R: stop("rows * columns too small")
+#: R/coplot.R:0
+msgid "rows * columns too small"
+msgstr "liczba wierszy * liczba kolumn jest zbyt mała"
 
-# graphics/R/stars.R: 41
-# stop("'x' must be a matrix or a data frame")
-msgid "'x' must be a matrix or a data frame"
-msgstr "'x' musi być macierzą lub ramką danych"
+#. R/hist.R: stop("some 'x' not counted; maybe 'breaks' do not span range of 'x'")
+#: R/hist.R:0
+msgid "some 'x' not counted; maybe 'breaks' do not span range of 'x'"
+msgstr ""
+"niektóre wartości zmiennej 'x' nie zostały zliczone; być może wartości "
+"argumentu 'breaks' nie rozciągają się na cały zakres zmiennej 'x'"
 
-# graphics/R/stars.R: 43
-# stop("data in 'x' must be numeric")
-msgid "data in 'x' must be numeric"
-msgstr "dane w 'x' muszą być liczbami"
+#. R/plot.design.R: warning("some levels of the factors are empty", call. = FALSE)
+#: R/plot.design.R:0
+msgid "some levels of the factors are empty"
+msgstr "niektóre poziomy czynników są puste"
 
-# graphics/R/stars.R: 54
-# stop("'nrow * ncol' is less than the number of observations")
-msgid "'nrow * ncol' is less than the number of observations"
-msgstr "'ncol * nrow' jest mniejsze niż liczba obserwacji"
+#. R/boxplot.R: warning("some notches went outside hinges ('box'): maybe set notch=FALSE")
+#: R/boxplot.R:0
+msgid "some notches went outside hinges ('box'): maybe set notch=FALSE"
+msgstr "niektóre wcięcia wyszły poza oś ('box'): może ustaw 'notch=FALSE'"
 
-# graphics/R/stars.R: 67
-# warning("labels do not make sense for a single location")
-msgid "labels do not make sense for a single location"
-msgstr "etykiety nie mają sensu dla pojedynczego położenia"
+#. R/rug.R: warning("some values will be clipped")
+#: R/rug.R:0
+msgid "some values will be clipped"
+msgstr "niektóre wartości będą przycięte"
 
-# graphics/R/stars.R: 74
-# stop("'locations' must be a 2-column matrix.")
-msgid "'locations' must be a 2-column matrix."
-msgstr "'locations' musi być 2-kolumnową macierzą"
+#. R/persp.R: warning("surface extends beyond the box")
+#: R/persp.R:0
+msgid "surface extends beyond the box"
+msgstr "powierzchnia rozciąga się poza pudełko"
 
-# graphics/R/stars.R: 76
-# stop("number of rows of 'locations' and 'x' must be equal.")
-msgid "number of rows of 'locations' and 'x' must be equal."
-msgstr "liczba wierszy dla 'locations' oraz 'x' muszą być równe"
+#. R/fourfoldplot.R: stop("table for each stratum must be 2 by 2")
+#: R/fourfoldplot.R:0
+msgid "table for each stratum must be 2 by 2"
+msgstr "tablica dla każdej warstwy musi być rozmiaru 2 na 2"
 
-# graphics/R/stars.R: 94
-# stop("length of 'angles' must equal 'ncol(x)'")
-msgid "length of 'angles' must equal 'ncol(x)'"
-msgstr "długość 'angles' musi równać się 'ncol(x)'"
+#. R/pairs.R: stop("the 'panel' function made a new plot")
+#: R/pairs.R:0
+msgid "the 'panel' function made a new plot"
+msgstr "funkcja 'panel' utworzyła nowy wykres"
 
-# graphics/R/stem.R: 25
-# stop("no finite and non-missing values")
-msgid "no finite and non-missing values"
-msgstr "brak skończonych i niebrakujących wartości"
+#. R/hist.R: warning("the AREAS in the plot are wrong -- rather use 'freq = FALSE'")
+#: R/hist.R:0
+msgid "the AREAS in the plot are wrong -- rather use 'freq = FALSE'"
+msgstr "OBSZARY na wykresie są błędne -- użyj raczej 'freq=FALSE'"
 
-# graphics/R/stem.R: 26
-# stop("'scale' must be positive")
-msgid "'scale' must be positive"
-msgstr "argument 'scale' musi być dodatni"
+#. R/plot.R: gettextf("the formula '%s' is treated as '%s'", format(formula),     format(local({        f <- formula        f[[3L]] <- quote(1)        f    })))
+#: R/plot.R:0
+msgid "the formula '%s' is treated as '%s'"
+msgstr "formuła '%s' jest traktowana jako '%s'"
 
-# graphics/R/stripchart.R: 32
-# stop("invalid plotting method")
-msgid "invalid plotting method"
-msgstr "niepoprawna metoda rysowania wykresu"
+#. R/plot.design.R: stop("there must be at least one numeric variable!")
+#: R/plot.design.R:0
+msgid "there must be at least one numeric variable!"
+msgstr "musi być przynajmniej jedna zmienna liczbowa!"
 
-# graphics/R/stripchart.R: 43
-# stop(gettextf("'at' must have length equal to the number %d of groups",
-#                       n), domain = NA)
-msgid "'at' must have length equal to the number %d of groups"
-msgstr "argument 'at' musi mieć długość równą liczbie %d grup"
+#. R/hist.R: stop("unknown 'breaks' algorithm")
+#: R/hist.R:0
+msgid "unknown 'breaks' algorithm"
+msgstr "nieznany algorytm 'breaks'"
 
-# graphics/R/stripchart.R: 109
-# stop("formula missing or incorrect")
-# graphics/R/sunflowerplot.R: 94
-# stop("formula missing or incorrect")
-msgid "formula missing or incorrect"
-msgstr "brakuje formuły lub jest ona niepoprawna"
+#. R/image.R: warning("unsorted 'breaks' will be sorted before use")
+#: R/image.R:0
+msgid "unsorted 'breaks' will be sorted before use"
+msgstr "nieposortowane 'breaks' zostaną posortowane przed użyciem"
 
-# graphics/R/sunflowerplot.R: 53
-# stop("'number' must have same length as 'x' and 'y'")
-msgid "'number' must have same length as 'x' and 'y'"
-msgstr "'number' musi mieć tę samą długość co 'x' oraz 'y'"
+#. R/datetime.R: stop("wrong method")
+#. R/datetime.R: stop("wrong method")
+#: R/datetime.R:0
+msgid "wrong method"
+msgstr "błędna metoda"
 
-# graphics/R/symbols.R: 57
-# stop("exactly one symbol type must be specified")
-msgid "exactly one symbol type must be specified"
-msgstr "dokładnie jeden typ symbolu musi być określony"
+#. R/spineplot.R: warning("x axis is on a cumulative probability scale, 'xlim' must be in [0,1]")
+#: R/spineplot.R:0
+msgid "x axis is on a cumulative probability scale, 'xlim' must be in [0,1]"
+msgstr ""
+"oś x jest w skali skumulowanego prawdopodobieństwa, 'xlim' musi być pomiędzy "
+"[0,1]"
 
-# graphics/R/units.R: 20
-# warning("x log scale:  xinch() is nonsense")
+#. R/units.R: warning("x log scale:  xinch() is nonsense")
+#: R/units.R:0
 msgid "x log scale:  xinch() is nonsense"
 msgstr "skala logarytmiczna x:  'xinch()' nie ma sensu"
 
-# graphics/R/units.R: 24
-# warning("y log scale:  yinch() is nonsense")
+#. R/cdplot.R: warning("y axis is on a cumulative probability scale, 'ylim' must be in [0,1]")
+#. R/spineplot.R: warning("y axis is on a cumulative probability scale, 'ylim' must be in [0,1]")
+#: R/cdplot.R:0 R/spineplot.R:0
+msgid "y axis is on a cumulative probability scale, 'ylim' must be in [0,1]"
+msgstr ""
+"oś y jest w skali skumulowanego prawdopodobieństwa, 'ylim' musi być w "
+"przedziale [0,1]"
+
+#. R/units.R: warning("y log scale:  yinch() is nonsense")
+#: R/units.R:0
 msgid "y log scale:  yinch() is nonsense"
 msgstr "skala logarytmiczna y:  'yinch()' nie ma sensu"
 
-# graphics/R/units.R: 30
-# warning("log scale:  xyinch() is nonsense")
-msgid "log scale:  xyinch() is nonsense"
-msgstr "skala logarytmiczna:  'xyinch()' nie ma sensu"
-
-# graphics/R/boxplot.R: 175
-# warning(sprintf(ngettext(length(unique(out[inf])),
-# 				 "Outlier (%s) in boxplot %d is not drawn",
-# 				 "Outliers (%s) in boxplot %d are not drawn"),
-# 				paste(unique(out[inf]), collapse=", "), i),
-# 			domain = NA)
+#. R/boxplot.R: ngettext(length(unique(out[inf])), "Outlier (%s) in boxplot %d is not drawn",     "Outliers (%s) in boxplot %d are not drawn")
+#: R/boxplot.R:0
 msgid "Outlier (%s) in boxplot %d is not drawn"
 msgid_plural "Outliers (%s) in boxplot %d are not drawn"
 msgstr[0] ""
@@ -819,26 +790,16 @@ msgstr[1] ""
 msgstr[2] ""
 "Wartości oddalone (%s) na wykresie pudełkowym %d nie zostały narysowane"
 
-# graphics/R/hist.R: 152
-# warning(sprintf(ngettext(sum(not.miss),
-# 					 "argument %s is not made use of",
-# 					 "arguments %s are not made use of"),
-# 				paste(sQuote(nf[not.miss]), collapse=", ")),
-# 			domain = NA)
+#. R/hist.R: ngettext(sum(not.miss), "argument %s is not made use of", "arguments %s are not made use of")
+#: R/hist.R:0
 msgid "argument %s is not made use of"
 msgid_plural "arguments %s are not made use of"
 msgstr[0] "argument %s nie robi użytku z"
 msgstr[1] "argumenty %s nie robią użytku z"
 msgstr[2] "argumenty %s nie robią użytku z"
 
-# graphics/R/mosaicplot.R: 184
-# warning(sprintf(ngettext(length(list(...)),
-#                                  "extra argument %s will be disregarded",
-#                                  "extra arguments %s will be disregarded"),
-#                          paste(sQuote(names(list(...))), collapse = ", ")),
-#                 domain = NA)
-msgid "extra argument %s will be disregarded"
-msgid_plural "extra arguments %s will be disregarded"
-msgstr[0] "dodatkowy argument %s zostanie odrzucony"
-msgstr[1] "dodatkowe argumenty %s zostaną odrzucone"
-msgstr[2] "dodatkowe argumenty %s zostaną odrzucone"
+#~ msgid "extra argument %s will be disregarded"
+#~ msgid_plural "extra arguments %s will be disregarded"
+#~ msgstr[0] "dodatkowy argument %s zostanie odrzucony"
+#~ msgstr[1] "dodatkowe argumenty %s zostaną odrzucone"
+#~ msgstr[2] "dodatkowe argumenty %s zostaną odrzucone"
diff --git a/src/library/graphics/po/R-pt_BR.po b/src/library/graphics/po/R-pt_BR.po
index 1dfe0e0..b8cd200 100644
--- a/src/library/graphics/po/R-pt_BR.po
+++ b/src/library/graphics/po/R-pt_BR.po
@@ -2,7 +2,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: 2.13.0\n"
 "Report-Msgid-Bugs-To: bugs.r-project.org\n"
-"POT-Creation-Date: 2013-07-20 09:37\n"
+"POT-Creation-Date: 2016-04-01 09:50\n"
 "PO-Revision-Date: 2011-03-26 08:55-0300\n"
 "Last-Translator: Fernando Henrique <pessoal at fernandohrosa.com.br>\n"
 "Language-Team: http://www.feferraz.net/br/P/Projeto_Traducao_R_Portugues\n"
@@ -242,6 +242,10 @@ msgstr "valores 'x' e 'y' devem ser finitos não-faltantes"
 msgid "'z' must be a matrix"
 msgstr "'z' deve ser uma matriz"
 
+#, fuzzy
+msgid "'z' must be numeric or logical"
+msgstr "'x' deve ser numérico"
+
 msgid "invalid z limits"
 msgstr "limites z inválidos"
 
@@ -330,6 +334,14 @@ msgstr "argumento não numérico para 'pairs'"
 msgid "only one column in the argument to 'pairs'"
 msgstr "apenas uma coluna no argumento para 'pairs'"
 
+#, fuzzy
+msgid "invalid argument 'horInd'"
+msgstr "argumento inicial inválido"
+
+#, fuzzy
+msgid "invalid argument 'verInd'"
+msgstr "argumento inicial inválido"
+
 msgid "the 'panel' function made a new plot"
 msgstr "a função 'panel' fez um novo gráfico"
 
@@ -342,6 +354,9 @@ msgstr "os valores de 'x' devem ser positivos."
 msgid "invalid table 'x'"
 msgstr "tabela 'x' inválida"
 
+msgid "the formula '%s' is treated as '%s'"
+msgstr ""
+
 msgid "cannot handle more than one 'x' coordinate"
 msgstr "não é possível lidar com mais de uma coordenada 'x'"
 
@@ -471,10 +486,10 @@ msgstr[0] "argumento %s não está sendo utilizado"
 msgstr[1] "argumentos %s não estão sendo utilizados"
 
 #, fuzzy
-msgid "extra argument %s will be disregarded"
-msgid_plural "extra arguments %s will be disregarded"
-msgstr[0] "os argumento(s) extras %s serão desconsiderados"
-msgstr[1] "os argumento(s) extras %s serão desconsiderados"
+#~ msgid "extra argument %s will be disregarded"
+#~ msgid_plural "extra arguments %s will be disregarded"
+#~ msgstr[0] "os argumento(s) extras %s serão desconsiderados"
+#~ msgstr[1] "os argumento(s) extras %s serão desconsiderados"
 
 #~ msgid "negative 'counts'. Internal Error in C-code for \"bincount\""
 #~ msgstr "'counts' negativo. Erro interno no código C para \"bincount\""
diff --git a/src/library/graphics/po/R-ru.po b/src/library/graphics/po/R-ru.po
index 38ba6bc..2fbcc33 100644
--- a/src/library/graphics/po/R-ru.po
+++ b/src/library/graphics/po/R-ru.po
@@ -9,19 +9,18 @@ msgid ""
 msgstr ""
 "Project-Id-Version: R 2.10.0\n"
 "Report-Msgid-Bugs-To: bugs.r-project.org\n"
-"POT-Creation-Date: 2013-07-20 09:37\n"
-"PO-Revision-Date: 2014-03-11 10:28-0600\n"
+"POT-Creation-Date: 2015-06-06 13:51\n"
+"PO-Revision-Date: 2016-04-05 18:07-0600\n"
 "Last-Translator: Alexey Shipunov <dactylorhiza at gmail.com>\n"
 "Language-Team: Russian\n"
-"Language: \n"
+"Language: ru\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=KOI8-R\n"
 "Content-Transfer-Encoding: 8bit\n"
 "X-Poedit-Language: Russian\n"
 "X-Poedit-Country: RUSSIAN FEDERATION\n"
 "X-Poedit-SourceCharset: iso-8859-1\n"
-"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n"
-"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
+"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
 
 msgid "'a' is overridden by 'reg'"
 msgstr "'a' ��������� � ������ 'reg'"
@@ -69,12 +68,10 @@ msgid "'height' must be a vector or a matrix"
 msgstr "'height' ������ ���� �������� ��� ��������"
 
 msgid "Cannot use shading lines in bars when log scale is used"
-msgstr ""
-"�� ���� �������� ����� � ���������, ���� ������������ ��������������� �����"
+msgstr "�� ���� �������� ����� � ���������, ���� ������������ ��������������� �����"
 
 msgid "log scale error: at least one 'height + offset' value <= 0"
-msgstr ""
-"������ ��������������� �����: at least one 'height + offset' �������� <= 0"
+msgstr "������ ��������������� �����: at least one 'height + offset' �������� <= 0"
 
 msgid "log scale error: 'xlim' <= 0"
 msgstr "������ ��������������� �����: 'xlim' <= 0"
@@ -98,9 +95,7 @@ msgid "invalid boxplot widths"
 msgstr "������������ ������ � ������-�-�����"
 
 msgid "some notches went outside hinges ('box'): maybe set notch=FALSE"
-msgstr ""
-"��������� notches ���� �� ������� hinges ('box'): ��������, ���� ������� "
-"notch=FALSE"
+msgstr "��������� notches ���� �� ������� hinges ('box'): ��������, ���� ������� notch=FALSE"
 
 msgid "'formula' should specify exactly two variables"
 msgstr "'formula' ������ ���������� � �������� ��� ����������"
@@ -109,8 +104,7 @@ msgid "dependent variable should be a factor"
 msgstr "��������� ���������� ������ ���� ��������"
 
 msgid "y axis is on a cumulative probability scale, 'ylim' must be in [0,1]"
-msgstr ""
-"��� y -- � ����� ��������� �����������, 'ylim' ������ ���� � �������� [0,1]"
+msgstr "��� y -- � ����� ��������� �����������, 'ylim' ������ ���� � �������� [0,1]"
 
 msgid "no 'z' matrix specified"
 msgstr "�� ������� ������� 'z'"
@@ -224,8 +218,7 @@ msgid "'probability' is an alias for '!freq', however they differ."
 msgstr "'probability' �������� ����������� ��� '!freq', ������ ��� ����������."
 
 msgid "some 'x' not counted; maybe 'breaks' do not span range of 'x'"
-msgstr ""
-"��������� 'x' �� ����������; ��������, 'breaks' �� �������� ����� ������� 'x'"
+msgstr "��������� 'x' �� ����������; ��������, 'breaks' �� �������� ����� ������� 'x'"
 
 msgid "the AREAS in the plot are wrong -- rather use 'freq = FALSE'"
 msgstr "������������ AREAS �� ������� -- ����� ����������� 'freq=FALSE'"
@@ -242,6 +235,9 @@ msgstr "
 msgid "'z' must be a matrix"
 msgstr "'z' ������ ���� ��������"
 
+msgid "'z' must be numeric or logical"
+msgstr "'z' ������ ���� �������� ��� ����������"
+
 msgid "invalid z limits"
 msgstr "������������ ������� z"
 
@@ -264,9 +260,7 @@ msgid "integer colors must be non-negative"
 msgstr "������������� ����� ������ ���� ����������������"
 
 msgid "'respect' must be logical or matrix with same dimension as 'mat'"
-msgstr ""
-"'respect' ������ ���� ���������� ��� �������� � ��� �� ������������, ��� � "
-"'mat'"
+msgstr "'respect' ������ ���� ���������� ��� �������� � ��� �� ������������, ��� � 'mat'"
 
 msgid ""
 "layout matrix must contain at least one reference\n"
@@ -303,12 +297,10 @@ msgid "'x' and 'y' must have same number of rows"
 msgstr "'x' � 'y' ������ ����� ���������� ���������� �����"
 
 msgid "'x' and 'y' must have only 1 or the same number of columns"
-msgstr ""
-"'x' � 'y' ������ ����� ������ 1 ������� ��� ���������� ���������� �������"
+msgstr "'x' � 'y' ������ ����� ������ 1 ������� ��� ���������� ���������� �������"
 
 msgid "default 'pch' is smaller than number of columns and hence recycled"
-msgstr ""
-"������������ �������� 'pch' ������ ���������� ������� � ������� �����������"
+msgstr "������������ �������� 'pch' ������ ���������� ������� � ������� �����������"
 
 msgid "missing values in contingency table"
 msgstr "����������� �������� � ������� �������������"
@@ -328,6 +320,12 @@ msgstr "
 msgid "only one column in the argument to 'pairs'"
 msgstr "������ ���� ������� � ��������� pairs'"
 
+msgid "invalid argument 'horInd'"
+msgstr "������������ �������� 'horInd'"
+
+msgid "invalid argument 'verInd'"
+msgstr "������������ �������� 'verInd'"
+
 msgid "the 'panel' function made a new plot"
 msgstr "������� 'panel' ������� ����� ������"
 
@@ -398,8 +396,7 @@ msgid "a 2-way table has to be specified"
 msgstr "���� ������� ��������� �������"
 
 msgid "x axis is on a cumulative probability scale, 'xlim' must be in [0,1]"
-msgstr ""
-"��� � -- � ����� ��������� �����������, 'xlim' ������ ���� � �������� [0,1]"
+msgstr "��� � -- � ����� ��������� �����������, 'xlim' ������ ���� � �������� [0,1]"
 
 msgid "'x' must be a matrix or a data frame"
 msgstr "'x' ������ ���� �������� ��� �������� ������"
@@ -422,9 +419,8 @@ msgstr "
 msgid "length of 'angles' must equal 'ncol(x)'"
 msgstr "����� 'angles' ������ ��������� 'ncol(x)'"
 
-#, fuzzy
 msgid "no finite and non-missing values"
-msgstr "��� ������������� ��������"
+msgstr "��� �������� � ������������� ��������"
 
 msgid "'scale' must be positive"
 msgstr "'scale' ������ ���� �������������"
@@ -465,20 +461,17 @@ msgstr[0] "
 msgstr[1] "��������� %s �� ��� �������������"
 msgstr[2] "��������� %s �� ��� �������������"
 
-msgid "extra argument %s will be disregarded"
-msgid_plural "extra arguments %s will be disregarded"
-msgstr[0] "�������������� �������� %s ����� ��������"
-msgstr[1] "�������������� ��������� %s ����� ���������"
-msgstr[2] "�������������� ��������� %s ����� ���������"
-
+#~ msgid "extra argument %s will be disregarded"
+#~ msgid_plural "extra arguments %s will be disregarded"
+#~ msgstr[0] "�������������� �������� %s ����� ��������"
+#~ msgstr[1] "�������������� ��������� %s ����� ���������"
+#~ msgstr[2] "�������������� ��������� %s ����� ���������"
 #~ msgid "negative 'counts'. Internal Error in C-code for \"bincount\""
 #~ msgstr "���������� 'counts'. ���������� ������ C-���� ��� \"bincount\""
-
 #~ msgid "explanatory variable should be numeric"
 #~ msgstr "����������� ���������� ������ ���� ��������"
-
 #~ msgid "regression coefficients"
 #~ msgstr "������������ ��������"
-
 #~ msgid "argument 'col' is deprecated in favour of 'boxfill'"
 #~ msgstr "�������� 'col' �� ����������, ����������� 'boxfill'"
+
diff --git a/src/library/graphics/po/R-zh_CN.po b/src/library/graphics/po/R-zh_CN.po
index e6a057a..d49f51d 100644
--- a/src/library/graphics/po/R-zh_CN.po
+++ b/src/library/graphics/po/R-zh_CN.po
@@ -7,11 +7,11 @@ msgid ""
 msgstr ""
 "Project-Id-Version: R 2.4.0\n"
 "Report-Msgid-Bugs-To: bugs.r-project.org\n"
-"POT-Creation-Date: 2013-07-20 09:37\n"
+"POT-Creation-Date: 2016-04-01 09:50\n"
 "PO-Revision-Date: 2005-02-04 08:37+0000\n"
 "Last-Translator: 陈斐 <feic at normipaiva.com>\n"
 "Language-Team: Chinese\n"
-"Language: \n"
+"Language: zh_CN\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
@@ -230,6 +230,10 @@ msgstr "'x'和'y'的值不能是无限的,而且不能有缺少"
 msgid "'z' must be a matrix"
 msgstr "'z'必需是矩阵"
 
+#, fuzzy
+msgid "'z' must be numeric or logical"
+msgstr "'x'必需为数值"
+
 msgid "invalid z limits"
 msgstr "z的限制不对"
 
@@ -310,6 +314,14 @@ msgstr "非数值参数不能适用于'pairs'"
 msgid "only one column in the argument to 'pairs'"
 msgstr "参数里只有一个列用在'pairs'上"
 
+#, fuzzy
+msgid "invalid argument 'horInd'"
+msgstr "第一个参数不对"
+
+#, fuzzy
+msgid "invalid argument 'verInd'"
+msgstr "第一个参数不对"
+
 msgid "the 'panel' function made a new plot"
 msgstr "'panel'函数画了一个新的图"
 
@@ -322,6 +334,9 @@ msgstr "'x'必需是正数."
 msgid "invalid table 'x'"
 msgstr "'x'表不对"
 
+msgid "the formula '%s' is treated as '%s'"
+msgstr ""
+
 msgid "cannot handle more than one 'x' coordinate"
 msgstr "不能处理多个'x'座标"
 
@@ -442,9 +457,9 @@ msgid "argument %s is not made use of"
 msgid_plural "arguments %s are not made use of"
 msgstr[0] "没有用%s这个参数"
 
-msgid "extra argument %s will be disregarded"
-msgid_plural "extra arguments %s will be disregarded"
-msgstr[0] "多余的参数%s略过不用"
+#~ msgid "extra argument %s will be disregarded"
+#~ msgid_plural "extra arguments %s will be disregarded"
+#~ msgstr[0] "多余的参数%s略过不用"
 
 #~ msgid "negative 'counts'. Internal Error in C-code for \"bincount\""
 #~ msgstr "负的'counts'。\"bincount\"的C码里出现了内部错误"
diff --git a/src/library/graphics/po/da.po b/src/library/graphics/po/da.po
index 53a990b..5137a5f 100644
--- a/src/library/graphics/po/da.po
+++ b/src/library/graphics/po/da.po
@@ -5,8 +5,8 @@
 msgid ""
 msgstr ""
 "Project-Id-Version: R 3.0.0\n"
-"Report-Msgid-Bugs-To: bugs.r-project.org\n"
-"POT-Creation-Date: 2014-03-27 07:47+0000\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2016-04-01 10:28-0700\n"
 "PO-Revision-Date: 2011-11-29 21:34+0200\n"
 "Last-Translator: Joe <joedalton2 at yahoo.dk>\n"
 "Language-Team: LANGUAGE <LL at li.org>\n"
@@ -17,11 +17,15 @@ msgstr ""
 "Plural-Forms: nplurals=2; plural=(n != 1);\n"
 "X-Generator: Pootle 2.1.6\n"
 
-#: base.c:45
+#: base.c:43
 msgid "no base graphics system is registered"
 msgstr ""
 
-#: base.c:335 base.c:342 base.c:350
+#: base.c:310
+msgid "Incompatible graphics state"
+msgstr ""
+
+#: base.c:385 base.c:392 base.c:400
 msgid "the base graphics system is not registered"
 msgstr ""
 
@@ -116,7 +120,7 @@ msgstr ""
 msgid "graphical parameter \"%s\" has the wrong length"
 msgstr ""
 
-#: par.c:262 par.c:672
+#: par.c:262 par.c:673
 #, c-format
 msgid "graphical parameter \"%s\" cannot be set"
 msgstr ""
@@ -141,35 +145,35 @@ msgstr ""
 msgid "value of 'nc' in \"mfg\" is wrong and will be ignored"
 msgstr ""
 
-#: par.c:477
+#: par.c:478
 msgid "calling par(new=TRUE) with no plot"
 msgstr ""
 
-#: par.c:664 par.c:1062
+#: par.c:665 par.c:1063
 #, c-format
 msgid "graphical parameter \"%s\" is obsolete"
 msgstr ""
 
-#: par.c:668 par.c:1066
+#: par.c:669 par.c:1067
 #, c-format
 msgid "\"%s\" is not a graphical parameter"
 msgstr ""
 
-#: par.c:1119
+#: par.c:1120
 msgid "invalid argument passed to par()"
 msgstr ""
 
-#: par.c:1163
+#: par.c:1164
 #, c-format
 msgid "too many rows in layout, limit %d"
 msgstr ""
 
-#: par.c:1169
+#: par.c:1170
 #, c-format
 msgid "too many columns in layout, limit %d"
 msgstr ""
 
-#: par.c:1171
+#: par.c:1172
 #, c-format
 msgid "too many cells in layout, limit %d"
 msgstr ""
diff --git a/src/library/graphics/po/de.po b/src/library/graphics/po/de.po
index b7c64f0..13c7b9c 100644
--- a/src/library/graphics/po/de.po
+++ b/src/library/graphics/po/de.po
@@ -5,22 +5,27 @@
 msgid ""
 msgstr ""
 "Project-Id-Version: R-3.1.0\n"
-"Report-Msgid-Bugs-To: bugs.r-project.org\n"
-"POT-Creation-Date: 2014-03-27 07:47+0000\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2016-04-01 10:28-0700\n"
 "PO-Revision-Date: 2013-02-28 16:20+0100\n"
 "Last-Translator: Detlef Steuer <steuer at hsu-hh.de>\n"
 "Language-Team: R-core <R-core at r-project.org>\n"
-"Language: \n"
+"Language: de\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
 "Plural-Forms: nplurals=2; plural=n == 1 ? 0 : 1;\n"
 
-#: base.c:45
+#: base.c:43
 msgid "no base graphics system is registered"
 msgstr "kein Basisgrafiksystem registriert"
 
-#: base.c:335 base.c:342 base.c:350
+#: base.c:310
+#, fuzzy
+msgid "Incompatible graphics state"
+msgstr "ungültiger Grafikzustand"
+
+#: base.c:385 base.c:392 base.c:400
 msgid "the base graphics system is not registered"
 msgstr "das Basisgrafiksystem ist nicht registriert"
 
@@ -35,11 +40,11 @@ msgstr "Versuch auf das Nulldevice zu zeichnen"
 
 #: graphics.c:1843
 msgid "outer margins too large (figure region too small)"
-msgstr "äußere Ränder zu groß (figure region zu klein)"
+msgstr "äußere Ränder zu groß (figure Bereich zu klein)"
 
 #: graphics.c:1845
 msgid "figure region too large"
-msgstr "figure region zu groß"
+msgstr "figure Bereich zu groß"
 
 #: graphics.c:1847
 msgid "figure margins too large"
@@ -47,7 +52,7 @@ msgstr "Grafikränder zu groß"
 
 #: graphics.c:1849
 msgid "plot region too large"
-msgstr "plot region zu groß"
+msgstr "plot Bereich zu groß"
 
 #: graphics.c:1896
 #, c-format
@@ -116,7 +121,7 @@ msgstr "ungültiger Wert für den Grafikparameter \"%s\" spezifiziert"
 msgid "graphical parameter \"%s\" has the wrong length"
 msgstr "Grafikparameter \"%s\" hat falsche Länge"
 
-#: par.c:262 par.c:672
+#: par.c:262 par.c:673
 #, c-format
 msgid "graphical parameter \"%s\" cannot be set"
 msgstr "Grafikparameter \"%s\" kann nicht gesetzt werden"
@@ -141,35 +146,35 @@ msgstr "Wert für 'nr' in \"mfg\" ist falsch und wird ignoriert"
 msgid "value of 'nc' in \"mfg\" is wrong and will be ignored"
 msgstr "Wert für 'nc' in \"mfg\" ist falsch und wird ignoriert"
 
-#: par.c:477
+#: par.c:478
 msgid "calling par(new=TRUE) with no plot"
 msgstr "par(new) ohne Plot aufgerufen"
 
-#: par.c:664 par.c:1062
+#: par.c:665 par.c:1063
 #, c-format
 msgid "graphical parameter \"%s\" is obsolete"
 msgstr "Grafikparameter \"%s\" ist veraltet"
 
-#: par.c:668 par.c:1066
+#: par.c:669 par.c:1067
 #, c-format
 msgid "\"%s\" is not a graphical parameter"
 msgstr "\"%s\" ist kein Grafikparameter"
 
-#: par.c:1119
+#: par.c:1120
 msgid "invalid argument passed to par()"
 msgstr "ungültiges Argument an par() übergeben"
 
-#: par.c:1163
+#: par.c:1164
 #, c-format
 msgid "too many rows in layout, limit %d"
 msgstr "zu viele Zeilen in layout, höchstens %d zulässig"
 
-#: par.c:1169
+#: par.c:1170
 #, c-format
 msgid "too many columns in layout, limit %d"
 msgstr "zu viele Spalten in layout, höchstens %d zulässig"
 
-#: par.c:1171
+#: par.c:1172
 #, c-format
 msgid "too many cells in layout, limit %d"
 msgstr "zu viele Zellen in layout, höchstens %d zulässig"
@@ -217,7 +222,7 @@ msgstr "mindestens 3 Argumente nötig"
 
 #: plot.c:492
 msgid "\"log=\" specification must be character"
-msgstr "\"log=\" Spezifikation muss ein Charakter sein"
+msgstr "\"log=\" Spezifikation muss eine Zeichenkette sein"
 
 #: plot.c:503
 #, c-format
@@ -257,7 +262,7 @@ msgstr "zu wenig Argumente"
 #: plot.c:776
 #, c-format
 msgid "invalid axis number %d"
-msgstr "ungültige Achsnummer %d"
+msgstr "ungültige Achsennummer %d"
 
 #: plot.c:866
 msgid "'hadj' must be of length one"
@@ -340,7 +345,7 @@ msgstr "ungültiger Pfeilspitzenwinkel"
 
 #: plot.c:1924
 msgid "invalid arrow head specification"
-msgstr "ungültige Pfeilsitzenspezifikation"
+msgstr "ungültige Pfeilspitzenspezifikation"
 
 #: plot.c:2158
 msgid "no coordinates were supplied"
@@ -509,15 +514,15 @@ msgstr "ungültige Grenzen für 'z'"
 
 #: plot3d.c:1137
 msgid "'xlab' must be a character vector of length 1"
-msgstr "'xlab' muss ein Charktervektor der Länge 1 sein"
+msgstr "'xlab' muss ein Zeichenkettenvektor der Länge 1 sein"
 
 #: plot3d.c:1139
 msgid "'ylab' must be a character vector of length 1"
-msgstr "'ylab' muss ein Charktervektor der Länge 1 sein"
+msgstr "'ylab' muss ein Zeichenkettenvektor der Länge 1 sein"
 
 #: plot3d.c:1141
 msgid "'zlab' must be a character vector of length 1"
-msgstr "'zlab' muss ein Charktervektor der Länge 1 sein"
+msgstr "'zlab' muss ein Zeichenkettenvektor der Länge 1 sein"
 
 #: plot3d.c:1161
 msgid "invalid viewing parameters"
diff --git a/src/library/graphics/po/es.po b/src/library/graphics/po/es.po
index 203ce6a..cd5124d 100644
--- a/src/library/graphics/po/es.po
+++ b/src/library/graphics/po/es.po
@@ -6,8 +6,8 @@
 msgid ""
 msgstr ""
 "Project-Id-Version: R 2.13.0\n"
-"Report-Msgid-Bugs-To: bugs.r-project.org\n"
-"POT-Creation-Date: 2014-03-27 07:47+0000\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2016-04-01 10:28-0700\n"
 "PO-Revision-Date: 2012-03-16 15:59+0100\n"
 "Last-Translator: \n"
 "Language-Team: Spanish <pabloemilio.verde at uni-duesseldorf.de>\n"
@@ -18,11 +18,16 @@ msgstr ""
 "Plural-Forms: nplurals=2; plural=(n > 1);\n"
 "X-Poedit-Language: Spanish\n"
 
-#: base.c:45
+#: base.c:43
 msgid "no base graphics system is registered"
 msgstr ""
 
-#: base.c:335 base.c:342 base.c:350
+#: base.c:310
+#, fuzzy
+msgid "Incompatible graphics state"
+msgstr "estado gr�fico inv�lido"
+
+#: base.c:385 base.c:392 base.c:400
 msgid "the base graphics system is not registered"
 msgstr ""
 
@@ -120,7 +125,7 @@ msgstr "el valor especificado del par
 msgid "graphical parameter \"%s\" has the wrong length"
 msgstr "el par�metro del gr�fico \"%s\" tiene tama�o incorrecto"
 
-#: par.c:262 par.c:672
+#: par.c:262 par.c:673
 #, c-format
 msgid "graphical parameter \"%s\" cannot be set"
 msgstr "el par�metro del gr�fico \"%s\" no puede ser especificado"
@@ -147,35 +152,35 @@ msgstr "el valor de nr en \"mfg\" es incorrecto y ser
 msgid "value of 'nc' in \"mfg\" is wrong and will be ignored"
 msgstr "el valor de nc en \"mfg\" es incorrecto y ser� ignorado"
 
-#: par.c:477
+#: par.c:478
 msgid "calling par(new=TRUE) with no plot"
 msgstr "llamada par(new=TRUE) sin gr�fico"
 
-#: par.c:664 par.c:1062
+#: par.c:665 par.c:1063
 #, fuzzy, c-format
 msgid "graphical parameter \"%s\" is obsolete"
 msgstr "lista de par�metros gr�ficos no v�lidos"
 
-#: par.c:668 par.c:1066
+#: par.c:669 par.c:1067
 #, fuzzy, c-format
 msgid "\"%s\" is not a graphical parameter"
 msgstr "par�metro gr�fico inv�lido"
 
-#: par.c:1119
+#: par.c:1120
 msgid "invalid argument passed to par()"
 msgstr "el par�metro pasado a par() es inv�lido"
 
-#: par.c:1163
+#: par.c:1164
 #, c-format
 msgid "too many rows in layout, limit %d"
 msgstr "muchas filas en la salida, l�mite %d"
 
-#: par.c:1169
+#: par.c:1170
 #, c-format
 msgid "too many columns in layout, limit %d"
 msgstr "muchas columnas en la salida, l�mite %d"
 
-#: par.c:1171
+#: par.c:1172
 #, c-format
 msgid "too many cells in layout, limit %d"
 msgstr "muchas celdas en la salida, l�mite %d"
diff --git a/src/library/graphics/po/fr.po b/src/library/graphics/po/fr.po
index f80e0c8..9d92ff5 100644
--- a/src/library/graphics/po/fr.po
+++ b/src/library/graphics/po/fr.po
@@ -6,8 +6,8 @@
 msgid ""
 msgstr ""
 "Project-Id-Version: R-2.12.0\n"
-"Report-Msgid-Bugs-To: bugs.r-project.org\n"
-"POT-Creation-Date: 2014-03-27 07:47+0000\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2016-04-01 10:28-0700\n"
 "PO-Revision-Date: 2014-03-17 10:43+0100\n"
 "Last-Translator: Philippe Grosjean <phgrosjean at sciviews.org>\n"
 "Language-Team: French <R-core at r-project.org>\n"
@@ -18,11 +18,16 @@ msgstr ""
 "Plural-Forms: nplurals=2; plural=(n > 1);\n"
 "X-Generator: Poedit 1.6.4\n"
 
-#: base.c:45
+#: base.c:43
 msgid "no base graphics system is registered"
 msgstr "aucun syst�me graphique de base n'est enregistr�"
 
-#: base.c:335 base.c:342 base.c:350
+#: base.c:310
+#, fuzzy
+msgid "Incompatible graphics state"
+msgstr "�tat des graphiques incorrect"
+
+#: base.c:385 base.c:392 base.c:400
 msgid "the base graphics system is not registered"
 msgstr "le syst�me graphique de base n'est pas enregistr�"
 
@@ -119,7 +124,7 @@ msgstr "valeur sp
 msgid "graphical parameter \"%s\" has the wrong length"
 msgstr "le param�tre graphique \"%s\" est de la mauvaise longueur"
 
-#: par.c:262 par.c:672
+#: par.c:262 par.c:673
 #, c-format
 msgid "graphical parameter \"%s\" cannot be set"
 msgstr "le param�tre graphique \"%s\" ne peut �tre chang�"
@@ -144,35 +149,35 @@ msgstr "la valeur de 'nr' dans \"mfg\" est mauvaise et sera ignor
 msgid "value of 'nc' in \"mfg\" is wrong and will be ignored"
 msgstr "la valeur de 'nc' dans \"mfg\" est mauvaise et sera ignor�e"
 
-#: par.c:477
+#: par.c:478
 msgid "calling par(new=TRUE) with no plot"
 msgstr "appel de par(new=TRUE) sans graphe"
 
-#: par.c:664 par.c:1062
+#: par.c:665 par.c:1063
 #, c-format
 msgid "graphical parameter \"%s\" is obsolete"
 msgstr "param�tre graphique \"%s\" incorrect"
 
-#: par.c:668 par.c:1066
+#: par.c:669 par.c:1067
 #, c-format
 msgid "\"%s\" is not a graphical parameter"
 msgstr "\"%s\" n'est pas un param�tre graphique"
 
-#: par.c:1119
+#: par.c:1120
 msgid "invalid argument passed to par()"
 msgstr "param�tre pass� � par() invalide"
 
-#: par.c:1163
+#: par.c:1164
 #, c-format
 msgid "too many rows in layout, limit %d"
 msgstr "trop de lignes dans la mise en page, limit� � %d"
 
-#: par.c:1169
+#: par.c:1170
 #, c-format
 msgid "too many columns in layout, limit %d"
 msgstr "trop de colonnes dans la mise en page, limit� � %d"
 
-#: par.c:1171
+#: par.c:1172
 #, c-format
 msgid "too many cells in layout, limit %d"
 msgstr "trop de cellules dans la mise en page, limit� � %d"
diff --git a/src/library/graphics/po/graphics.pot b/src/library/graphics/po/graphics.pot
index 975ec77..57e4c21 100644
--- a/src/library/graphics/po/graphics.pot
+++ b/src/library/graphics/po/graphics.pot
@@ -1,14 +1,14 @@
 # SOME DESCRIPTIVE TITLE.
-# Copyright (C) YEAR The R Core Team
+# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
 # This file is distributed under the same license as the PACKAGE package.
 # FIRST AUTHOR <EMAIL at ADDRESS>, YEAR.
 #
 #, fuzzy
 msgid ""
 msgstr ""
-"Project-Id-Version: R 3.1.0\n"
-"Report-Msgid-Bugs-To: bugs.r-project.org\n"
-"POT-Creation-Date: 2014-03-27 07:47+0000\n"
+"Project-Id-Version: graphics 3.4.0\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2016-04-01 10:28-0700\n"
 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
 "Last-Translator: FULL NAME <EMAIL at ADDRESS>\n"
 "Language-Team: LANGUAGE <LL at li.org>\n"
@@ -17,11 +17,15 @@ msgstr ""
 "Content-Type: text/plain; charset=CHARSET\n"
 "Content-Transfer-Encoding: 8bit\n"
 
-#: base.c:45
+#: base.c:43
 msgid "no base graphics system is registered"
 msgstr ""
 
-#: base.c:335 base.c:342 base.c:350
+#: base.c:310
+msgid "Incompatible graphics state"
+msgstr ""
+
+#: base.c:385 base.c:392 base.c:400
 msgid "the base graphics system is not registered"
 msgstr ""
 
@@ -116,7 +120,7 @@ msgstr ""
 msgid "graphical parameter \"%s\" has the wrong length"
 msgstr ""
 
-#: par.c:262 par.c:672
+#: par.c:262 par.c:673
 #, c-format
 msgid "graphical parameter \"%s\" cannot be set"
 msgstr ""
@@ -141,35 +145,35 @@ msgstr ""
 msgid "value of 'nc' in \"mfg\" is wrong and will be ignored"
 msgstr ""
 
-#: par.c:477
+#: par.c:478
 msgid "calling par(new=TRUE) with no plot"
 msgstr ""
 
-#: par.c:664 par.c:1062
+#: par.c:665 par.c:1063
 #, c-format
 msgid "graphical parameter \"%s\" is obsolete"
 msgstr ""
 
-#: par.c:668 par.c:1066
+#: par.c:669 par.c:1067
 #, c-format
 msgid "\"%s\" is not a graphical parameter"
 msgstr ""
 
-#: par.c:1119
+#: par.c:1120
 msgid "invalid argument passed to par()"
 msgstr ""
 
-#: par.c:1163
+#: par.c:1164
 #, c-format
 msgid "too many rows in layout, limit %d"
 msgstr ""
 
-#: par.c:1169
+#: par.c:1170
 #, c-format
 msgid "too many columns in layout, limit %d"
 msgstr ""
 
-#: par.c:1171
+#: par.c:1172
 #, c-format
 msgid "too many cells in layout, limit %d"
 msgstr ""
diff --git a/src/library/graphics/po/it.po b/src/library/graphics/po/it.po
index 778f7a2..cafb280 100644
--- a/src/library/graphics/po/it.po
+++ b/src/library/graphics/po/it.po
@@ -13,8 +13,8 @@
 msgid ""
 msgstr ""
 "Project-Id-Version: R\n"
-"Report-Msgid-Bugs-To: bugs.r-project.org\n"
-"POT-Creation-Date: 2014-03-27 07:47+0000\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2016-04-01 10:28-0700\n"
 "PO-Revision-Date: 2006-01-16 09:11+0100\n"
 "Last-Translator: Daniele Medri <daniele.medri2 at unibo.it>\n"
 "Language-Team: Italian <tp at lists.linux.it>\n"
@@ -24,11 +24,16 @@ msgstr ""
 "Content-Transfer-Encoding: 8bit\n"
 "Plural-Forms: nplurals=2; plural=(n != 1);\n"
 
-#: base.c:45
+#: base.c:43
 msgid "no base graphics system is registered"
 msgstr ""
 
-#: base.c:335 base.c:342 base.c:350
+#: base.c:310
+#, fuzzy
+msgid "Incompatible graphics state"
+msgstr "stato grafico non valido"
+
+#: base.c:385 base.c:392 base.c:400
 #, fuzzy
 msgid "the base graphics system is not registered"
 msgstr "troppi sistemi grafici registrati"
@@ -129,7 +134,7 @@ msgstr "valore non valido specificato per il parametro grafico \"%s\""
 msgid "graphical parameter \"%s\" has the wrong length"
 msgstr "il parametro \"%s\" ha la lunghezza sbagliata"
 
-#: par.c:262 par.c:672
+#: par.c:262 par.c:673
 #, c-format
 msgid "graphical parameter \"%s\" cannot be set"
 msgstr "il parametro \"%s\" non può essere impostato"
@@ -156,36 +161,36 @@ msgstr "il valore di nr in \"mfg\" è sbagliato e verrà ignorato"
 msgid "value of 'nc' in \"mfg\" is wrong and will be ignored"
 msgstr "il valore di nc in \"mfg\" è sbagliato e verrà ignorato"
 
-#: par.c:477
+#: par.c:478
 #, fuzzy
 msgid "calling par(new=TRUE) with no plot"
 msgstr "stai chiamando par(new=) senza plot"
 
-#: par.c:664 par.c:1062
+#: par.c:665 par.c:1063
 #, fuzzy, c-format
 msgid "graphical parameter \"%s\" is obsolete"
 msgstr "lista parametro grafico non valida"
 
-#: par.c:668 par.c:1066
+#: par.c:669 par.c:1067
 #, c-format
 msgid "\"%s\" is not a graphical parameter"
 msgstr "parametro grafico \"%s\" non valido"
 
-#: par.c:1119
+#: par.c:1120
 msgid "invalid argument passed to par()"
 msgstr "parametro non valido passato a par()"
 
-#: par.c:1163
+#: par.c:1164
 #, c-format
 msgid "too many rows in layout, limit %d"
 msgstr "troppe righe nel layout, limite %d"
 
-#: par.c:1169
+#: par.c:1170
 #, c-format
 msgid "too many columns in layout, limit %d"
 msgstr "troppe colonne nel layout, limite %d"
 
-#: par.c:1171
+#: par.c:1172
 #, c-format
 msgid "too many cells in layout, limit %d"
 msgstr "troppe celle nel layout, limite %d"
diff --git a/src/library/graphics/po/ja.po b/src/library/graphics/po/ja.po
index d74e7ef..71d219e 100644
--- a/src/library/graphics/po/ja.po
+++ b/src/library/graphics/po/ja.po
@@ -5,8 +5,8 @@
 msgid ""
 msgstr ""
 "Project-Id-Version: R 2.5.0 \n"
-"Report-Msgid-Bugs-To: bugs.r-project.org\n"
-"POT-Creation-Date: 2014-03-27 07:47+0000\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2016-04-01 10:28-0700\n"
 "PO-Revision-Date: 2014-03-26 13:54+0200 \n"
 "Last-Translator: Masafumi  \n"
 "Language-Team: R-core <R-core at R-project.org> \n"
@@ -17,11 +17,16 @@ msgstr ""
 "Plural-Forms: nplurals=1; plural=0; \n"
 "X-Generator: Pootle 2.0.5 \n"
 
-#: base.c:45
+#: base.c:43
 msgid "no base graphics system is registered"
 msgstr " ベースとなるグラフィックシステムが登録されていません "
 
-#: base.c:335 base.c:342 base.c:350
+#: base.c:310
+#, fuzzy
+msgid "Incompatible graphics state"
+msgstr " グラフィックスの状態が不正です "
+
+#: base.c:385 base.c:392 base.c:400
 msgid "the base graphics system is not registered"
 msgstr " 基本グラフィックシステムが登録されていません "
 
@@ -117,7 +122,7 @@ msgstr " グラフィックスパラメータ \"%s\" に不正な値が指定さ
 msgid "graphical parameter \"%s\" has the wrong length"
 msgstr " グラフィックパラメータ \"%s\" の長さが不正です "
 
-#: par.c:262 par.c:672
+#: par.c:262 par.c:673
 #, c-format
 msgid "graphical parameter \"%s\" cannot be set"
 msgstr " グラフィックパラメータ \"%s\" を設定できません "
@@ -142,35 +147,35 @@ msgstr " \"mfg\" の中の 'nr' の値が不正なため無視されます "
 msgid "value of 'nc' in \"mfg\" is wrong and will be ignored"
 msgstr " \"mfg\" の中の 'nc' の値が不正なため無視されます "
 
-#: par.c:477
+#: par.c:478
 msgid "calling par(new=TRUE) with no plot"
 msgstr " プロットなしで par(new=TRUE) を呼び出しました "
 
-#: par.c:664 par.c:1062
+#: par.c:665 par.c:1063
 #, c-format
 msgid "graphical parameter \"%s\" is obsolete"
 msgstr " グラフィックスパラメータ \"%s\" はもはやサポートされていません "
 
-#: par.c:668 par.c:1066
+#: par.c:669 par.c:1067
 #, c-format
 msgid "\"%s\" is not a graphical parameter"
 msgstr " \"%s\" はグラフィックスパラメータではありません "
 
-#: par.c:1119
+#: par.c:1120
 msgid "invalid argument passed to par()"
 msgstr " par() に不正なパラメータが渡されました "
 
-#: par.c:1163
+#: par.c:1164
 #, c-format
 msgid "too many rows in layout, limit %d"
 msgstr " layout の列数が多すぎます(限界値は %d) "
 
-#: par.c:1169
+#: par.c:1170
 #, c-format
 msgid "too many columns in layout, limit %d"
 msgstr " layout の列が多すぎます(限界は %d) "
 
-#: par.c:1171
+#: par.c:1172
 #, c-format
 msgid "too many cells in layout, limit %d"
 msgstr " layout のセルが多すぎます(限界は %d) "
diff --git a/src/library/graphics/po/ko.po b/src/library/graphics/po/ko.po
index 9fdf612..bc9e153 100644
--- a/src/library/graphics/po/ko.po
+++ b/src/library/graphics/po/ko.po
@@ -1,30 +1,41 @@
 # Korean translation for R graphics package
-# src/library/graphics/po/ko.po
-# Copyright (C) 1995-2014 The R Core Team
+# ./graphics/po/ko.po
+#
+# Copyright (C) 1995-2016 The R Core Team
+#
 # This file is distributed under the same license as the R graphics package.
-# Chel Hee Lee <chl948 at mail.usask.ca>, 2008-2014.
+# Maintained by Chel Hee Lee <chl948 at mail.usask.ca>, 2008-2016.
+# Contact: Chel Hee Lee <gnustats at gmail.com>
+#
+# Notes:
+# Under development (unstable) starting from 11-APR-2016 for R-3.3.1 - QC: in progress
+# Freezed on 10-APR-2016 for R-3.3.0 - QC: PASS
+# Freezed on 30-MAR-2015 for R-3.2.0 - QC: PASS
+# Freezed on 06-FEB-2015 for R-3.1.3 - QC: PASS
 #
 msgid ""
 msgstr ""
-"Project-Id-Version: R 3.1.0\n"
+"Project-Id-Version: R-3.3.0\n"
 "Report-Msgid-Bugs-To: bugs.r-project.org\n"
-"POT-Creation-Date: 2014-03-27 07:47+0000\n"
-"PO-Revision-Date: 2014-03-27 09:00-0600\n"
+"POT-Creation-Date: 2016-04-01 10:28-0700\n"
+"PO-Revision-Date: 2016-04-11 13:08-0600\n"
 "Last-Translator: Chel Hee Lee <chl948 at mail.usask.ca>\n"
-"Language-Team:  <chl948 at mail.usask.ca>\n"
+"Language-Team: Chel Hee Lee <chl948 at mail.usask.ca>\n"
 "Language: ko\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
 "Plural-Forms: nplurals=1; plural=0;\n"
-"X-Poedit-SourceCharset: UTF-8\n"
-"X-Generator: Poedit 1.5.4\n"
 
-#: base.c:45
+#: base.c:43
 msgid "no base graphics system is registered"
 msgstr "등록된 base 그래픽 시스템이 없습니다"
 
-#: base.c:335 base.c:342 base.c:350
+#: base.c:310
+msgid "Incompatible graphics state"
+msgstr ""
+
+#: base.c:385 base.c:392 base.c:400
 msgid "the base graphics system is not registered"
 msgstr "base 그래픽 시스템이 등록되지 않았습니다"
 
@@ -119,7 +130,7 @@ msgstr "그래픽 파라미터 \"%s\"에 지정된 값이 유효하지 않습니
 msgid "graphical parameter \"%s\" has the wrong length"
 msgstr "그래픽 파라미터 \"%s\"는 잘못된 길이를 가지고 있습니다"
 
-#: par.c:262 par.c:672
+#: par.c:262 par.c:673
 #, c-format
 msgid "graphical parameter \"%s\" cannot be set"
 msgstr "그래픽 파라미터 \"%s\"를 설정할 수 없습니다"
@@ -144,35 +155,35 @@ msgstr "\"mfg\"내 'nr'의 값이 잘못되었으므로 무시될 것입니다"
 msgid "value of 'nc' in \"mfg\" is wrong and will be ignored"
 msgstr "\"mfg\"내 'nc'의 값이 잘못되었으므로 무시될 것입니다"
 
-#: par.c:477
+#: par.c:478
 msgid "calling par(new=TRUE) with no plot"
 msgstr "플랏없이 par(new=TRUE)를 호출합니다"
 
-#: par.c:664 par.c:1062
+#: par.c:665 par.c:1063
 #, c-format
 msgid "graphical parameter \"%s\" is obsolete"
 msgstr "그래픽 파라미터 \"%s\"는 필요하지 않습니다"
 
-#: par.c:668 par.c:1066
+#: par.c:669 par.c:1067
 #, c-format
 msgid "\"%s\" is not a graphical parameter"
 msgstr "\"%s\"는 그래픽 매개변수가 아닙니다"
 
-#: par.c:1119
+#: par.c:1120
 msgid "invalid argument passed to par()"
 msgstr "par()에 전달된 인자는 유효하지 않습니다"
 
-#: par.c:1163
+#: par.c:1164
 #, c-format
 msgid "too many rows in layout, limit %d"
 msgstr "레이아웃내에 너무 많은 행이 있습니다 (최대 %d입니다)"
 
-#: par.c:1169
+#: par.c:1170
 #, c-format
 msgid "too many columns in layout, limit %d"
 msgstr "레이아웃내에 너무 많은 열들이 있습니다 (최대 %d입니다)"
 
-#: par.c:1171
+#: par.c:1172
 #, c-format
 msgid "too many cells in layout, limit %d"
 msgstr "레이아웃내에 너무 많은 셀들이 있습니다 (최대 %d개입니다)"
diff --git a/src/library/graphics/po/nn.po b/src/library/graphics/po/nn.po
index ceee109..c4c8628 100644
--- a/src/library/graphics/po/nn.po
+++ b/src/library/graphics/po/nn.po
@@ -6,8 +6,8 @@
 msgid ""
 msgstr ""
 "Project-Id-Version: nn\n"
-"Report-Msgid-Bugs-To: bugs.r-project.org\n"
-"POT-Creation-Date: 2014-03-27 07:47+0000\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2016-04-01 10:28-0700\n"
 "PO-Revision-Date: 2011-02-18 09:09+0100\n"
 "Last-Translator: Karl Ove Hufthammer <karl at huftis.org>\n"
 "Language-Team: Norwegian Nynorsk <i18n-nn at lister.ping.uio.no>\n"
@@ -18,11 +18,16 @@ msgstr ""
 "X-Generator: Lokalize 1.1\n"
 "Plural-Forms: nplurals=2; plural=n != 1;\n"
 
-#: base.c:45
+#: base.c:43
 msgid "no base graphics system is registered"
 msgstr ""
 
-#: base.c:335 base.c:342 base.c:350
+#: base.c:310
+#, fuzzy
+msgid "Incompatible graphics state"
+msgstr "ugyldig grafikktilstand"
+
+#: base.c:385 base.c:392 base.c:400
 #, fuzzy
 msgid "the base graphics system is not registered"
 msgstr "for mange grafikksystem registrerte"
@@ -121,7 +126,7 @@ msgstr "ugyldig verdi oppgjeven for den grafiske parameteren «%s»"
 msgid "graphical parameter \"%s\" has the wrong length"
 msgstr "den grafiske parameteren «%s» har feil lengd"
 
-#: par.c:262 par.c:672
+#: par.c:262 par.c:673
 #, c-format
 msgid "graphical parameter \"%s\" cannot be set"
 msgstr "den grafiske parameteren «%s» kan ikkje definerast"
@@ -148,35 +153,35 @@ msgstr "verdien «nr» i «mfg» er feil, og vert ikkje brukt"
 msgid "value of 'nc' in \"mfg\" is wrong and will be ignored"
 msgstr "verdien «nc» i «mfg» er feil, og vert ikkje brukt"
 
-#: par.c:477
+#: par.c:478
 msgid "calling par(new=TRUE) with no plot"
 msgstr "kallar par(new=TRUE) utan noko plott"
 
-#: par.c:664 par.c:1062
+#: par.c:665 par.c:1063
 #, c-format
 msgid "graphical parameter \"%s\" is obsolete"
 msgstr "den grafiske parameteren «%s» er utdatert"
 
-#: par.c:668 par.c:1066
+#: par.c:669 par.c:1067
 #, c-format
 msgid "\"%s\" is not a graphical parameter"
 msgstr "«%s» er ikkje ein grafisk parameter"
 
-#: par.c:1119
+#: par.c:1120
 msgid "invalid argument passed to par()"
 msgstr "ugyldig argument sendt til par()"
 
-#: par.c:1163
+#: par.c:1164
 #, c-format
 msgid "too many rows in layout, limit %d"
 msgstr "for mange rader i oppsett (grense: %d)"
 
-#: par.c:1169
+#: par.c:1170
 #, c-format
 msgid "too many columns in layout, limit %d"
 msgstr "for mange kolonnar i oppsett (grense: %d)"
 
-#: par.c:1171
+#: par.c:1172
 #, c-format
 msgid "too many cells in layout, limit %d"
 msgstr "for mange celler i oppsett (grense: %d)"
diff --git a/src/library/graphics/po/pl.po b/src/library/graphics/po/pl.po
index ff657d7..10f1230 100644
--- a/src/library/graphics/po/pl.po
+++ b/src/library/graphics/po/pl.po
@@ -1,324 +1,202 @@
 msgid ""
 msgstr ""
-"Project-Id-Version: R 3.1.0\n"
-"Report-Msgid-Bugs-To: bugs.r-project.org\n"
-"POT-Creation-Date: 2014-03-27 07:47+0000\n"
-"PO-Revision-Date: 2014-03-13 17:07+0100\n"
+"Project-Id-Version: R 3.4.0\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2016-04-01 10:28-0700\n"
+"PO-Revision-Date: 2016-04-04 11:19+0200\n"
 "Last-Translator: Łukasz Daniel <lukasz.daniel at gmail.com>\n"
 "Language-Team: Łukasz Daniel <lukasz.daniel at gmail.com>\n"
 "Language: pl_PL\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
-"X-Poedit-SourceCharset: iso-8859-1\n"
+"X-Poedit-SourceCharset: UTF-8\n"
 "Plural-Forms: nplurals=3; plural=(n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 "
 "|| n%100>=20) ? 1 : 2);\n"
-"X-Generator: Poedit 1.5.4\n"
+"X-Generator: Poedit 1.8.7\n"
 
-# graphics/src/base.c: 45
-# error(_("no base graphics system is registered"))
-#: base.c:45
+#: base.c:43
 msgid "no base graphics system is registered"
 msgstr "nie zarejestrowano żadnego bazowego systemu graficznego"
 
-# graphics/src/base.c: 335
-# error(_("the base graphics system is not registered"))
-# graphics/src/base.c: 342
-# error(_("the base graphics system is not registered"))
-# graphics/src/base.c: 350
-# error(_("the base graphics system is not registered"))
-#: base.c:335 base.c:342 base.c:350
+#: base.c:310
+msgid "Incompatible graphics state"
+msgstr "Niepoprawny stan grafiki"
+
+#: base.c:385 base.c:392 base.c:400
 msgid "the base graphics system is not registered"
 msgstr "bazowy system graficzny nie jest zarejestrowany"
 
-# graphics/src/graphics.c: 297
-# error(_("bad units specified in '%s'"), where)
 #: graphics.c:297
 #, c-format
 msgid "bad units specified in '%s'"
 msgstr "określono niepoprawne jednostki w '%s'"
 
-# graphics/src/graphics.c: 1791
-# error(_("attempt to plot on null device"))
-# graphics/src/graphics.c: 1813
-# error(_("attempt to plot on null device"))
 #: graphics.c:1791 graphics.c:1813
 msgid "attempt to plot on null device"
 msgstr "próba rysowania na urządzeniu 'null'"
 
-# graphics/src/graphics.c: 1843
-# (_("outer margins too large (figure region too small)"))
 #: graphics.c:1843
 msgid "outer margins too large (figure region too small)"
 msgstr "zewnętrzne marginesy są zbyt duże (obszar wykresu jest zbyt mały)"
 
-# graphics/src/graphics.c: 1845
-# (_("figure region too large"))
 #: graphics.c:1845
 msgid "figure region too large"
 msgstr "obszar wykresu jest zbyt duży"
 
-# graphics/src/graphics.c: 1847
-# (_("figure margins too large"))
 #: graphics.c:1847
 msgid "figure margins too large"
 msgstr "marginesy wykresu są zbyt duże"
 
-# graphics/src/graphics.c: 1849
-# (_("plot region too large"))
 #: graphics.c:1849
 msgid "plot region too large"
 msgstr "obszar wykresu jest zbyt duży"
 
-# graphics/src/graphics.c: 1896
-# warning(_("relative range of values (%4.0f * EPS) is small (axis %d)")
-# 		/*"to compute accurately"*/,
-# 		fabs(*max - *min) / (t_*DBL_EPSILON), axis)
 #: graphics.c:1896
 #, c-format
 msgid "relative range of values (%4.0f * EPS) is small (axis %d)"
 msgstr "względny zakres wartości =%4.0f * EPS, jest mały (oś %d)"
 
-# graphics/src/graphics.c: 1948
-# warning(_("nonfinite axis limits [GScale(%g,%g,%d, .); log=%d]"),
-# 		min, max, axis, log)
 #: graphics.c:1948
 #, c-format
 msgid "nonfinite axis limits [GScale(%g,%g,%d, .); log=%d]"
 msgstr "nieskończone granice osi [GScale(%g,%g,%d, .); log=%d]"
 
-# graphics/src/graphics.c: 1978
-# error(_("axis style \"%c\" unimplemented"), style)
 #: graphics.c:1978
 #, c-format
 msgid "axis style \"%c\" unimplemented"
 msgstr "styl \"%c\" osi nie został zaimplementowany"
 
-# graphics/src/graphics.c: 2216
-# error(_("no graphics device is active"))
 #: graphics.c:2216
 msgid "no graphics device is active"
 msgstr "brak aktywnego urządzenia graficznego"
 
-# graphics/src/graphics.c: 2411
-# error(_("plot.new has not been called yet"))
 #: graphics.c:2411
 msgid "plot.new has not been called yet"
 msgstr "'plot.new' nie został jeszcze wywołany"
 
-# graphics/src/graphics.c: 2413
-# error(_("invalid graphics state"))
 #: graphics.c:2413
 msgid "invalid graphics state"
 msgstr "niepoprawny stan grafiki"
 
-# graphics/src/graphics.c: 2555
-# error(_("graphics device closed during call to locator or identify"))
 #: graphics.c:2555
 msgid "graphics device closed during call to locator or identify"
 msgstr ""
 "urządzenie graficzne zostało zamknięte podczas wywołania funkcji 'locator()' "
 "lub 'idenfify()'"
 
-# graphics/src/graphics.c: 2604
-# error(_("No graphics device is active"))
 #: graphics.c:2604
 msgid "No graphics device is active"
 msgstr "Brak aktywnego urządzenia graficznego"
 
-# graphics/src/graphics.c: 3063
-# warning(_("zero-length arrow is of indeterminate angle and so skipped"))
 #: graphics.c:3063
 msgid "zero-length arrow is of indeterminate angle and so skipped"
 msgstr ""
 "strzałka o zerowej długości ma nieokreślony kąt tak więc zostaje pominięta"
 
-# graphics/src/graphics.c: 3144
-# warning(_("invalid par(\"bty\") = '%c'; no box() drawn"),
-# 		    gpptr(dd)->bty)
 #: graphics.c:3144
 #, c-format
 msgid "invalid par(\"bty\") = '%c'; no box() drawn"
 msgstr "niepoprawne par(\"bty\") = '%c'; nie wykonano funkcji 'box()'"
 
-# graphics/src/graphics.c: 3161
-# error(_("invalid argument to GBox"))
 #: graphics.c:3161
 msgid "invalid argument to GBox"
 msgstr "niepoprawny argument przekazany do 'GBox'"
 
-# graphics/src/graphics.c: 3406
-# error(_("metric information not available for this device"))
 #: graphics.c:3406
 msgid "metric information not available for this device"
 msgstr "informacja o metryce nie jest dostępna dla tego urządzenia"
 
-# graphics/src/par-common.c: 143
-# error(_("graphical parameter 'family' has a maximum length of 200 bytes"))
 #: par-common.c:143
 msgid "graphical parameter 'family' has a maximum length of 200 bytes"
 msgstr "parametr graficzny 'family' posiada maksymalną długość 200 bajtów"
 
-# graphics/src/par.c: 160
-# error(_("invalid value specified for graphical parameter \"%s\""),  what)
 #: par.c:160
 #, c-format
 msgid "invalid value specified for graphical parameter \"%s\""
 msgstr "określono niepoprawną wartość dla parametru graficznego '%s'"
 
-# graphics/src/par.c: 167
-# error(_("graphical parameter \"%s\" has the wrong length"), what)
 #: par.c:167
 #, c-format
 msgid "graphical parameter \"%s\" has the wrong length"
 msgstr "parametr graficzny '%s' posiada niepoprawną długość"
 
-# graphics/src/par.c: 262
-# warning(_("graphical parameter \"%s\" cannot be set"), what)
-# graphics/src/par.c: 672
-# warning(_("graphical parameter \"%s\" cannot be set"), what)
-#: par.c:262 par.c:672
+#: par.c:262 par.c:673
 #, c-format
 msgid "graphical parameter \"%s\" cannot be set"
 msgstr "parametr graficzny '%s' nie może zostać ustawiony"
 
-# graphics/src/par.c: 434
-# error(_("parameter \"mfg\" has the wrong length"))
 #: par.c:434
 msgid "parameter \"mfg\" has the wrong length"
 msgstr "parametr 'mfg' posiada niepoprawną długość"
 
-# graphics/src/par.c: 442
-# error(_("parameter \"i\" in \"mfg\" is out of range"))
 #: par.c:442
 msgid "parameter \"i\" in \"mfg\" is out of range"
 msgstr "parametr \"i\" w parametrze \"mfg\" jest poza zakresem"
 
-# graphics/src/par.c: 444
-# error(_("parameter \"j\" in \"mfg\" is out of range"))
 #: par.c:444
 msgid "parameter \"j\" in \"mfg\" is out of range"
 msgstr "parametr \"j\" w parametrze \"mfg\" jest poza zakresem"
 
-# graphics/src/par.c: 449
-# warning(_("value of 'nr' in \"mfg\" is wrong and will be ignored"))
 #: par.c:449
 msgid "value of 'nr' in \"mfg\" is wrong and will be ignored"
 msgstr ""
 "wartość 'nr' w parametrze \"mfg\" jest niepoprawna i zostanie zignorowana"
 
-# graphics/src/par.c: 451
-# warning(_("value of 'nc' in \"mfg\" is wrong and will be ignored"))
 #: par.c:451
 msgid "value of 'nc' in \"mfg\" is wrong and will be ignored"
 msgstr ""
 "wartość 'nc' w parametrze \"mfg\" jest niepoprawna i zostanie zignorowana"
 
-# graphics/src/par.c: 477
-# warning(_("calling par(new=TRUE) with no plot"))
-#: par.c:477
+#: par.c:478
 msgid "calling par(new=TRUE) with no plot"
 msgstr "wywołanie 'par(new=TRUE)' bez wykresu"
 
-# graphics/src/par.c: 632
-# warning(_("graphical parameter \"%s\" is obsolete"), what)
-# graphics/src/par.c: 664
-# warning(_("graphical parameter \"%s\" is obsolete"), what)
-# graphics/src/par.c: 1062
-# warning(_("graphical parameter \"%s\" is obsolete"), what)
-#: par.c:664 par.c:1062
+#: par.c:665 par.c:1063
 #, c-format
 msgid "graphical parameter \"%s\" is obsolete"
 msgstr "parametr graficzny '%s' jest przestarzały"
 
-# graphics/src/par.c: 668
-# warning(_("\"%s\" is not a graphical parameter"), what)
-# graphics/src/par.c: 1066
-# warning(_("\"%s\" is not a graphical parameter"), what)
-#: par.c:668 par.c:1066
+#: par.c:669 par.c:1067
 #, c-format
 msgid "\"%s\" is not a graphical parameter"
 msgstr "'%s' nie jest parametrem graficznym"
 
-# graphics/src/par.c: 1119
-# error(_("invalid argument passed to par()"))
-#: par.c:1119
+#: par.c:1120
 msgid "invalid argument passed to par()"
 msgstr "niepoprawny argument przekazany do 'par()'"
 
-# graphics/src/par.c: 1163
-# error(_("too many rows in layout, limit %d"), MAX_LAYOUT_ROWS)
-#: par.c:1163
+#: par.c:1164
 #, c-format
 msgid "too many rows in layout, limit %d"
 msgstr "zbyt wiele wierszy w layoucie, limit %d"
 
-# graphics/src/par.c: 1169
-# error(_("too many columns in layout, limit %d"), MAX_LAYOUT_COLS)
-#: par.c:1169
+#: par.c:1170
 #, c-format
 msgid "too many columns in layout, limit %d"
 msgstr "zbyt wiele kolumn w layoucie, limit %d"
 
-# graphics/src/par.c: 1171
-# error(_("too many cells in layout, limit %d"), MAX_LAYOUT_CELLS)
-#: par.c:1171
+#: par.c:1172
 #, c-format
 msgid "too many cells in layout, limit %d"
 msgstr "zbyt wiele komórek w layoucie, limit %d"
 
-# graphics/src/plot.c: 60
-# error(_("invalid color specification"))
 #: plot.c:60
 msgid "invalid color specification"
 msgstr "niepoprawne określenie koloru"
 
-# graphics/src/plot.c: 126
-# error(_("only NA allowed in logical plotting symbol"))
 #: plot.c:126
 msgid "only NA allowed in logical plotting symbol"
 msgstr "tylko wartość NA jest dozwolona w logicznym rysowanym symbolu"
 
-# graphics/src/plot.c: 128
-# error(_("invalid plotting symbol"))
 #: plot.c:128
 msgid "invalid plotting symbol"
 msgstr "niepoprawny symbol wykresu"
 
-# graphics/src/plot.c: 217
-# error(_("invalid font specification"))
 #: plot.c:217
 msgid "invalid font specification"
 msgstr "niepoprawne określenie koloru"
 
-# graphics/src/plot3d.c: 1163
-# error(_("invalid '%s' value"), "expand")
-# graphics/src/plot3d.c: 1167
-# error(_("invalid '%s' value"), "nticks")
-# graphics/src/plot3d.c: 1169
-# error(_("invalid '%s' value"), "ticktype")
-# graphics/src/plot3d.c: 1903
-# error(_("invalid '%s' value"), "method")
-# graphics/src/plot.c: 276
-# error(_("invalid '%s' value"), "cex")
-# graphics/src/plot.c: 290
-# error(_("invalid '%s' value"), "vfont")
-# graphics/src/plot.c: 481
-# error(_("invalid '%s' value"), "xlim")
-# graphics/src/plot.c: 486
-# error(_("invalid '%s' value"), "ylim")
-# graphics/src/plot.c: 2114
-# error(_("invalid '%s' value"), "adj")
-# graphics/src/plot.c: 2121
-# error(_("invalid '%s' value"), "pos")
-# graphics/src/plot.c: 3143
-# error(_("invalid '%s' value"), "tolerance")
-# graphics/src/plot.c: 3145
-# error(_("invalid '%s' value"), "plot")
-# graphics/src/plot.c: 3147
-# error(_("invalid '%s' value"), "atpen")
-# graphics/src/plot.c: 3302
-# error(_("invalid '%s' value"), "cex")
 #: plot.c:276 plot.c:290 plot.c:481 plot.c:486 plot.c:2112 plot.c:2119
 #: plot.c:3141 plot.c:3143 plot.c:3145 plot.c:3300 plot3d.c:1163 plot3d.c:1167
 #: plot3d.c:1169 plot3d.c:1903
@@ -326,163 +204,72 @@ msgstr "niepoprawne określenie koloru"
 msgid "invalid '%s' value"
 msgstr "niepoprawna wartość '%s'"
 
-# graphics/src/plot.c: 293
-# error(_("invalid 'vfont' value [typeface %d]"), typeface)
 #: plot.c:293
 #, c-format
 msgid "invalid 'vfont' value [typeface %d]"
 msgstr "niepoprawna wartość 'vfont'  [krój %d]"
 
-# graphics/src/plot.c: 317
-# error(_("invalid 'vfont' value [typeface = %d, fontindex = %d]"),
-# 		  typeface, fontindex)
 #: plot.c:317
 #, c-format
 msgid "invalid 'vfont' value [typeface = %d, fontindex = %d]"
 msgstr "niepoprawna wartość 'vfont' [krój = %d, indeks czcionki = %d]"
 
-# graphics/src/plot.c: 391
-# error(_("invalid graphics parameter"))
 #: plot.c:391
 msgid "invalid graphics parameter"
 msgstr "niepoprawne parametry grafiki"
 
-# graphics/src/plot.c: 477
-# error(_("at least 3 arguments required"))
 #: plot.c:477
 msgid "at least 3 arguments required"
 msgstr "wymagane są co najmniej 3 argumenty"
 
-# graphics/src/plot.c: 492
-# error(_("\"log=\" specification must be character"))
 #: plot.c:492
 msgid "\"log=\" specification must be character"
 msgstr "określenie 'log=' musi być tekstem"
 
-# graphics/src/plot.c: 503
-# error(_("invalid \"log=%s\" specification"), p)
 #: plot.c:503
 #, c-format
 msgid "invalid \"log=%s\" specification"
 msgstr "niepoprawne określenie 'log=%s'"
 
-# graphics/src/plot.c: 518
-# error(_("NAs not allowed in 'xlim'"))
 #: plot.c:518
 msgid "NAs not allowed in 'xlim'"
 msgstr "wartości NA nie są dozwolone w 'xlim'"
 
-# graphics/src/plot.c: 524
-# error(_("need finite 'xlim' values"))
 #: plot.c:524
 msgid "need finite 'xlim' values"
 msgstr "'xlim' potrzebuje skończonych wartości"
 
-# graphics/src/plot.c: 530
-# error(_("NAs not allowed in 'ylim'"))
 #: plot.c:530
 msgid "NAs not allowed in 'ylim'"
 msgstr "wartości NA nie są dozwolone w 'ylim'"
 
-# graphics/src/plot.c: 536
-# error(_("need finite 'ylim' values"))
 #: plot.c:536
 msgid "need finite 'ylim' values"
 msgstr "'ylim' potrzebuje skończonych wartości"
 
-# graphics/src/plot.c: 542
-# error(_("Logarithmic axis must have positive limits"))
 #: plot.c:542
 msgid "Logarithmic axis must have positive limits"
 msgstr "Oś logarytmiczna musi mieć dodatnie granice"
 
-# graphics/src/plot.c: 664
-# error(_("invalid type for axis labels"))
 #: plot.c:664
 msgid "invalid type for axis labels"
 msgstr "niepoprawny typ dla etykiet osi"
 
-# graphics/src/plot3d.c: 1872
-# error(_("too few arguments"))
-# graphics/src/plot.c: 765
-# error(_("too few arguments"))
-# graphics/src/plot.c: 1298
-# error(_("too few arguments"))
-# graphics/src/plot.c: 1621
-# error(_("too few arguments"))
-# graphics/src/plot.c: 1686
-# error(_("too few arguments"))
-# graphics/src/plot.c: 1761
-# error(_("too few arguments"))
-# graphics/src/plot.c: 1827
-# error(_("too few arguments"))
-# graphics/src/plot.c: 1903
-# error(_("too few arguments"))
-# graphics/src/plot.c: 1998
-# error(_("too few arguments"))
-# graphics/src/plot.c: 2074
-# error(_("too few arguments"))
-# graphics/src/plot.c: 2352
-# error(_("too few arguments"))
-# graphics/src/plot.c: 2526
-# error(_("too few arguments"))
-# graphics/src/plot.c: 2742
-# error(_("too few arguments"))
-# graphics/src/plot.c: 3284
-# error(_("too few arguments"))
-# graphics/src/plot.c: 3411
-# error(_("too few arguments"))
-# graphics/src/plot.c: 3487
-# error(_("too few arguments"))
-# graphics/src/plot.c: 3653
-# error(_("too few arguments"))
-# graphics/src/plot.c: 3933
-# error(_("too few arguments"))
 #: plot.c:765 plot.c:1298 plot.c:1621 plot.c:1686 plot.c:1761 plot.c:1827
 #: plot.c:1901 plot.c:1996 plot.c:2072 plot.c:2350 plot.c:2524 plot.c:2740
 #: plot.c:3282 plot.c:3409 plot.c:3485 plot.c:3651 plot.c:3931 plot3d.c:1872
 msgid "too few arguments"
 msgstr "zbyt mało argumentów"
 
-# graphics/src/plot.c: 776
-# error(_("invalid axis number %d"), side)
 #: plot.c:776
 #, c-format
 msgid "invalid axis number %d"
 msgstr "niepoprawny numer %d osi"
 
-# graphics/src/plot.c: 866
-# error(_("'hadj' must be of length one"))
 #: plot.c:866
 msgid "'hadj' must be of length one"
 msgstr "argument 'hadj' musi mieć długość 1"
 
-# graphics/src/plot.c: 873
-# error(_("zero-length '%s' specified"), "padj")
-# graphics/src/plot.c: 2086
-# error(_("zero-length '%s' specified"), "labels")
-# graphics/src/plot.c: 2363
-# error(_("zero-length '%s' specified"), "text")
-# graphics/src/plot.c: 2369
-# error(_("zero-length '%s' specified"), "side")
-# graphics/src/plot.c: 2376
-# error(_("zero-length '%s' specified"), "line")
-# graphics/src/plot.c: 2384
-# error(_("zero-length '%s' specified"), "outer")
-# graphics/src/plot.c: 2391
-# error(_("zero-length '%s' specified"), "at")
-# graphics/src/plot.c: 2398
-# error(_("zero-length '%s' specified"), "adj")
-# graphics/src/plot.c: 2405
-# error(_("zero-length '%s' specified"), "padj")
-# graphics/src/plot.c: 2412
-# error(_("zero-length '%s' specified"), "cex")
-# graphics/src/plot.c: 2420
-# error(_("zero-length '%s' specified"), "col")
-# graphics/src/plot.c: 2427
-# error(_("zero-length '%s' specified"), "font")
-# graphics/src/plot.c: 3150
-# error(_("zero-length '%s' specified"), "labels")
 #: plot.c:873 plot.c:2084 plot.c:2361 plot.c:2367 plot.c:2374 plot.c:2382
 #: plot.c:2389 plot.c:2396 plot.c:2403 plot.c:2410 plot.c:2418 plot.c:2425
 #: plot.c:3148
@@ -490,186 +277,90 @@ msgstr "argument 'hadj' musi mieć długość 1"
 msgid "zero-length '%s' specified"
 msgstr "określono '%s' o zerowej długości"
 
-# graphics/src/plot.c: 942
-# error(_("'labels' is supplied and not 'at'"))
 #: plot.c:942
 msgid "'labels' is supplied and not 'at'"
 msgstr "dostarczono argumentu 'labels' a nie argumentu 'at'"
 
-# graphics/src/plot.c: 946
-# error(_("'at' and 'labels' lengths differ, %d != %d"),
-# 		      length(at), length(lab))
 #: plot.c:946
 #, c-format
 msgid "'at' and 'labels' lengths differ, %d != %d"
 msgstr "długości argumentów 'at' oraz 'labels' różnią się, %d != %d"
 
-# graphics/src/plot.c: 963
-# error(_("no locations are finite"))
 #: plot.c:963
 msgid "no locations are finite"
 msgstr "żadne położenia nie są skończone"
 
-# graphics/src/plot.c: 1314
-# error(_("invalid plotting structure"))
 #: plot.c:1314
 msgid "invalid plotting structure"
 msgstr "niepoprawna struktura wykresu"
 
-# graphics/src/plot.c: 1316
-# error(_("'x' and 'y' lengths differ in %s()"), subname)
 #: plot.c:1316
 #, c-format
 msgid "'x' and 'y' lengths differ in %s()"
 msgstr "długości 'x' oraz 'y' różnią się w '%s()'"
 
-# graphics/src/plot.c: 1327
-# warning(_("plot type '%s' will be truncated to first character"),
-# 			CHAR(pch))
 #: plot.c:1327
 #, c-format
 msgid "plot type '%s' will be truncated to first character"
 msgstr "typ '%s' wykresu zostanie przycięty do pierwszego znaku"
 
-# graphics/src/plot.c: 1331
-# error(_("invalid plot type"))
-# graphics/src/plot.c: 3004
-# error(_("invalid plot type"))
 #: plot.c:1331 plot.c:3002
 msgid "invalid plot type"
 msgstr "niepoprawny typ wykresu"
 
-# graphics/src/plot.c: 1533
-# error(_("invalid plot type '%c'"), type)
 #: plot.c:1533
 #, c-format
 msgid "invalid plot type '%c'"
 msgstr "niepoprawny typ '%c' wykresu"
 
-# graphics/src/plot.c: 1576
-# error(_("invalid first argument"))
-# graphics/R/stripchart.R: 36
-# stop("invalid first argument")
-# graphics/R/boxplot.R: 35
-# stop("invalid first argument")
-# graphics/R/boxplot.R: 186
-# stop("invalid first argument")
 #: plot.c:1576
 msgid "invalid first argument"
 msgstr "niepoprawny pierwszy argument"
 
-# graphics/src/plot.c: 1583
-# error(_("invalid second argument"))
 #: plot.c:1583
 msgid "invalid second argument"
 msgstr "niepoprawny drugi argument"
 
-# graphics/src/plot.c: 1591
-# error(_("invalid third argument"))
 #: plot.c:1591
 msgid "invalid third argument"
 msgstr "niepoprawny trzeci argument"
 
-# graphics/src/plot.c: 1599
-# error(_("invalid fourth argument"))
 #: plot.c:1599
 msgid "invalid fourth argument"
 msgstr "niepoprawny czwarty argument"
 
-# graphics/src/plot.c: 1607
-# error(_("cannot mix zero-length and non-zero-length coordinates"))
 #: plot.c:1607
 msgid "cannot mix zero-length and non-zero-length coordinates"
 msgstr "nie można mieszać współrzędnych o zerowej i niezerowej długości"
 
-# graphics/src/plot.c: 1833
-# error(_("Empty raster"))
 #: plot.c:1832
 msgid "Empty raster"
 msgstr "Pusty raster"
 
-# graphics/src/plot.c: 1916
-# error(_("invalid arrow head length"))
 #: plot.c:1914
 msgid "invalid arrow head length"
 msgstr "niepoprawna długość grotu strzałki"
 
-# graphics/src/plot.c: 1921
-# error(_("invalid arrow head angle"))
 #: plot.c:1919
 msgid "invalid arrow head angle"
 msgstr "niepoprawny kąt grotu strzałki"
 
-# graphics/src/plot.c: 1926
-# error(_("invalid arrow head specification"))
 #: plot.c:1924
 msgid "invalid arrow head specification"
 msgstr "niepoprawne określenie grotu strzałki"
 
-# graphics/src/plot.c: 2160
-# error(_("no coordinates were supplied"))
 #: plot.c:2158
 msgid "no coordinates were supplied"
 msgstr "nie dostarczono współrzędnych"
 
-# graphics/src/plot.c: 2783
-# error(_("invalid a=, b= specification"))
 #: plot.c:2781
 msgid "invalid a=, b= specification"
 msgstr "niepoprawne określenie 'a=', 'b='"
 
-# graphics/src/plot.c: 2792
-# error(_("'a' and 'b' must be finite"))
 #: plot.c:2790
 msgid "'a' and 'b' must be finite"
 msgstr "argumenty 'a' oraz 'b' muszą być skończone"
 
-# graphics/src/stem.c: 158
-# error(_("invalid '%s' argument"), "x")
-# graphics/src/stem.c: 159
-# error(_("invalid '%s' argument"), "width")
-# graphics/src/stem.c: 161
-# error(_("invalid '%s' argument"), "scale")
-# graphics/src/stem.c: 162
-# error(_("invalid '%s' argument"), "atom")
-# graphics/src/stem.c: 208
-# error(_("invalid '%s' argument"), "right")
-# graphics/src/stem.c: 209
-# error(_("invalid '%s' argument"), "include.lowest")
-# graphics/src/plot3d.c: 1085
-# error(_("invalid '%s' argument"), "x")
-# graphics/src/plot3d.c: 1089
-# error(_("invalid '%s' argument"), "y")
-# graphics/src/plot3d.c: 1094
-# error(_("invalid '%s' argument"), "z")
-# graphics/src/plot3d.c: 1098
-# error(_("invalid '%s' argument"), "xlim")
-# graphics/src/plot3d.c: 1102
-# error(_("invalid '%s' argument"), "ylim")
-# graphics/src/plot3d.c: 1106
-# error(_("invalid '%s' argument"), "zlim")
-# graphics/src/plot.c: 2927
-# error(_("invalid '%s' argument"), "which")
-# graphics/src/plot.c: 4024
-# error("invalid '%s' argument", "x1")
-# graphics/src/plot.c: 4027
-# error("invalid '%s' argument", "x2")
-# graphics/src/plot.c: 4030
-# error("invalid '%s' argument", "y1")
-# graphics/src/plot.c: 4033
-# error("invalid '%s' argument", "y2")
-# graphics/src/plot.c: 4053
-# error(_("invalid '%s' argument"), "x")
-# graphics/src/plot.c: 4057
-# error(_("invalid '%s' argument"), "from")
-# graphics/src/plot.c: 4060
-# error(_("invalid '%s' argument"), "to")
-# graphics/src/plot.c: 4080
-# error(_("invalid '%s' argument"), "x")
-# graphics/src/plot.c: 4084
-# error(_("invalid '%s' argument"), "from")
-# graphics/src/plot.c: 4087
-# error(_("invalid '%s' argument"), "to")
 #: plot.c:2925 plot.c:4051 plot.c:4055 plot.c:4058 plot.c:4078 plot.c:4082
 #: plot.c:4085 plot3d.c:1085 plot3d.c:1089 plot3d.c:1094 plot3d.c:1098
 #: plot3d.c:1102 plot3d.c:1106 stem.c:158 stem.c:159 stem.c:161 stem.c:162
@@ -678,29 +369,19 @@ msgstr "argumenty 'a' oraz 'b' muszą być skończone"
 msgid "invalid '%s' argument"
 msgstr "niepoprawny argument '%s'"
 
-# graphics/src/plot.c: 2999
-# error(_("invalid number of points in %s"), "locator()")
-# graphics/src/plot.c: 3139
-# error(_("invalid number of points in %s"), "identify()")
 #: plot.c:2997 plot.c:3137
 #, c-format
 msgid "invalid number of points in %s"
 msgstr "niepoprawna liczba punktów w funkcji '%s'"
 
-# graphics/src/plot.c: 3141
-# error(_("incorrect argument type"))
 #: plot.c:3139
 msgid "incorrect argument type"
 msgstr "niepoprawny typ argumentu"
 
-# graphics/src/plot.c: 3153
-# error(_("different argument lengths"))
 #: plot.c:3151
 msgid "different argument lengths"
 msgstr "długości argumentów różnią się"
 
-# graphics/src/plot.c: 3155
-# warning(_("more 'labels' than points"))
 #: plot.c:3153
 msgid "more 'labels' than points"
 msgstr "wiecej etykiet niż punktów"
@@ -714,292 +395,179 @@ msgstr "ostrzeżenie: brak punktu w obszarze %.2f cali\n"
 msgid "warning: nearest point already identified\n"
 msgstr "ostrzeżenie: najbliższy punkt jest już zidentyfikowany\n"
 
-# graphics/src/plot.c: 3295
-# error(_("invalid units"))
 #: plot.c:3293
 msgid "invalid units"
 msgstr "niepoprawne jednostki"
 
-# graphics/src/plot.c: 3471
-# error(_("invalid dendrogram input"))
-# graphics/src/plot.c: 3578
-# error(_("invalid dendrogram input"))
 #: plot.c:3469 plot.c:3576
 msgid "invalid dendrogram input"
 msgstr "niepoprawne wejście dendrogramu"
 
-# graphics/src/plot.c: 3635
-# error(_("invalid symbol parameter vector"))
 #: plot.c:3633
 msgid "invalid symbol parameter vector"
 msgstr "niepoprawny wektor parametrów symboli"
 
-# graphics/src/plot.c: 3658
-# error(_("invalid symbol coordinates"))
 #: plot.c:3656
 msgid "invalid symbol coordinates"
 msgstr "niepoprawne współrzędne symbolu"
 
-# graphics/src/plot.c: 3666
-# error(_("x/y/parameter length mismatch"))
 #: plot.c:3664
 msgid "x/y/parameter length mismatch"
 msgstr "niezgodność długości x/y/parametru"
 
-# graphics/src/plot.c: 3685
-# error(_("invalid circles data"))
 #: plot.c:3683
 msgid "invalid circles data"
 msgstr "niepoprawne dane o kółkach"
 
-# graphics/src/plot.c: 3687
-# error(_("invalid symbol parameter"))
-# graphics/src/plot.c: 3708
-# error(_("invalid symbol parameter"))
-# graphics/src/plot.c: 3733
-# error(_("invalid symbol parameter"))
-# graphics/src/plot.c: 3763
-# error(_("invalid symbol parameter"))
 #: plot.c:3685 plot.c:3706 plot.c:3731 plot.c:3761
 msgid "invalid symbol parameter"
 msgstr "niepoprawny parametr symbolu"
 
-# graphics/src/plot.c: 3706
-# error(_("invalid squares data"))
 #: plot.c:3704
 msgid "invalid squares data"
 msgstr "niepoprawne dane o kwadratach"
 
-# graphics/src/plot.c: 3731
-# error(_("invalid rectangles data (need 2 columns)"))
 #: plot.c:3729
 msgid "invalid rectangles data (need 2 columns)"
 msgstr "niepoprawne dane o prostokątach (potrzeba 2 kolumn)"
 
-# graphics/src/plot.c: 3761
-# error(_("invalid stars data"))
 #: plot.c:3759
 msgid "invalid stars data"
 msgstr "niepoprawne dane o gwiazdkach"
 
-# graphics/src/plot.c: 3803
-# error(_("invalid thermometers data (need 3 or 4 columns)"))
 #: plot.c:3801
 msgid "invalid thermometers data (need 3 or 4 columns)"
 msgstr "niepoprawne dane o temperaturach (potrzeba 3 lub 4 kolumn)"
 
-# graphics/src/plot.c: 3806
-# error(_("invalid 'thermometers[, %s]'"),
-# 		      (nc == 4)? "3:4" : "3")
 #: plot.c:3804
 #, c-format
 msgid "invalid 'thermometers[, %s]'"
 msgstr "niepoprawne 'thermometers[,%s]'"
 
-# graphics/src/plot.c: 3809
-# warning(_("'thermometers[, %s]' not in [0,1] -- may look funny"),
-# 		    (nc == 4)? "3:4" : "3")
 #: plot.c:3807
 #, c-format
 msgid "'thermometers[, %s]' not in [0,1] -- may look funny"
 msgstr "'thermometers[,%s]' nie są w przedziale [0,1] -- może dziwnie wyglądać"
 
-# graphics/src/plot.c: 3812
-# error(_("invalid 'thermometers[, 1:2]'"))
 #: plot.c:3810
 msgid "invalid 'thermometers[, 1:2]'"
 msgstr "niepoprawne 'thermometers[,1:2]'"
 
-# graphics/src/plot.c: 3851
-# error(_("invalid 'boxplots' data (need 5 columns)"))
 #: plot.c:3849
 msgid "invalid 'boxplots' data (need 5 columns)"
 msgstr "niepoprawne dane w 'boxplots' (potrzeba 5 kolumn)"
 
-# graphics/src/plot.c: 3860
-# warning(_("'boxplots[, 5]' outside [0,1] -- may look funny"))
 #: plot.c:3858
 msgid "'boxplots[, 5]' outside [0,1] -- may look funny"
 msgstr "'boxplots[,5]' poza przedziałem [0,1] -- może dziwnie wyglądać"
 
-# graphics/src/plot.c: 3862
-# error(_("invalid 'boxplots[, 1:4]'"))
 #: plot.c:3860
 msgid "invalid 'boxplots[, 1:4]'"
 msgstr "niepoprawne 'boxplots[, 1:4]'"
 
-# graphics/src/plot.c: 3908
-# error(_("invalid symbol type"))
 #: plot.c:3906
 msgid "invalid symbol type"
 msgstr "niepoprawny typ symbolu"
 
-# graphics/src/plot.c: 3946
-# error(_("incorrect length for '%s' argument"), "col")
-# graphics/src/plot.c: 3948
-# warning(_("incorrect length for '%s' argument"), "col")
-# graphics/src/plot.c: 3953
-# error(_("incorrect length for '%s' argument"), "border")
-# graphics/src/plot.c: 3955
-# warning(_("incorrect length for '%s' argument"), "border")
 #: plot.c:3944 plot.c:3946 plot.c:3951 plot.c:3953
 #, c-format
 msgid "incorrect length for '%s' argument"
 msgstr "niepoprawna długość dla argumentu '%s'"
 
-# graphics/src/plot3d.c: 181
-# error(_("insufficient 'x' or 'y' values"))
-# graphics/src/plot3d.c: 1929
-# error(_("insufficient 'x' or 'y' values"))
 #: plot3d.c:181 plot3d.c:1929
 msgid "insufficient 'x' or 'y' values"
 msgstr "niewystarczające wartości 'x' lub 'y'"
 
-# graphics/src/plot3d.c: 185
-# error(_("dimension mismatch"))
-# graphics/src/plot3d.c: 1932
-# error(_("dimension mismatch"))
 #: plot3d.c:185 plot3d.c:1932
 msgid "dimension mismatch"
 msgstr "niezgodność wymiaru"
 
-# graphics/src/plot3d.c: 193
-# error(_("no contour values"))
-# graphics/src/plot3d.c: 1935
-# error(_("no contour values"))
 #: plot3d.c:193 plot3d.c:1935
 msgid "no contour values"
 msgstr "brak wartości konturu"
 
-# graphics/src/plot3d.c: 255
-# error(_("invalid x / y values or limits"))
 #: plot3d.c:255
 msgid "invalid x / y values or limits"
 msgstr "niepoprawne wartości x / y lub granice"
 
-# graphics/src/plot3d.c: 257
-# error(_("invalid contour levels: must be strictly increasing"))
 #: plot3d.c:257
 msgid "invalid contour levels: must be strictly increasing"
 msgstr "niepoprawne poziomy konturu: muszą być ściśle rosnące"
 
-# graphics/src/plot3d.c: 1049
-# warning(_("Axis orientation not calculated"))
-# graphics/src/plot3d.c: 1062
-# warning(_("Axis orientation not calculated"))
 #: plot3d.c:1049 plot3d.c:1062
 msgid "Axis orientation not calculated"
 msgstr "Orientacja osi nie została obliczona"
 
-# graphics/src/plot3d.c: 1082
-# error(_("too few parameters"))
 #: plot3d.c:1082
 msgid "too few parameters"
 msgstr "zbyt mało parametrów"
 
-# graphics/src/plot3d.c: 1112
-# error(_("invalid 'x' limits"))
 #: plot3d.c:1112
 msgid "invalid 'x' limits"
 msgstr "niepoprawne granice 'x'"
 
-# graphics/src/plot3d.c: 1114
-# error(_("invalid 'y' limits"))
 #: plot3d.c:1114
 msgid "invalid 'y' limits"
 msgstr "niepoprawne granice 'y'"
 
-# graphics/src/plot3d.c: 1116
-# error(_("invalid 'z' limits"))
 #: plot3d.c:1116
 msgid "invalid 'z' limits"
 msgstr "niepoprawne granice 'z'"
 
-# graphics/src/plot3d.c: 1137
-# error(_("'xlab' must be a character vector of length 1"))
 #: plot3d.c:1137
 msgid "'xlab' must be a character vector of length 1"
 msgstr "argument 'xlab' musi być wektorem tekstowym o długości 1"
 
-# graphics/src/plot3d.c: 1139
-# error(_("'ylab' must be a character vector of length 1"))
 #: plot3d.c:1139
 msgid "'ylab' must be a character vector of length 1"
 msgstr "argument 'ylab' musi być wektorem tekstowym o długości 1"
 
-# graphics/src/plot3d.c: 1141
-# error(_("'zlab' must be a character vector of length 1"))
 #: plot3d.c:1141
 msgid "'zlab' must be a character vector of length 1"
 msgstr "argument 'zlsb' musi być wektorem tekstowym o długości 1"
 
-# graphics/src/plot3d.c: 1161
-# error(_("invalid viewing parameters"))
 #: plot3d.c:1161
 msgid "invalid viewing parameters"
 msgstr "niepoprawne parametry podglądu"
 
-# graphics/src/plot3d.c: 1179
-# error(_("invalid '%s' specification"), "col")
-# graphics/src/plot3d.c: 1183
-# error(_("invalid '%s' specification"), "border")
 #: plot3d.c:1179 plot3d.c:1183
 #, c-format
 msgid "invalid '%s' specification"
 msgstr "niepoprawne określenie '%s'"
 
-# graphics/src/plot3d.c: 1529
-# warning(_("contour(): circular/long seglist -- set %s > %d?"), 
-# 		        "options(\"max.contour.segments\")", max_contour_segments)
 #: plot3d.c:1529
 #, c-format
 msgid "contour(): circular/long seglist -- set %s > %d?"
 msgstr "'contour()': kołowa/długa lista segmentów -- ustawić %s > %d?"
 
-# graphics/src/plot3d.c: 1939
-# error(_("missing 'x' values"))
 #: plot3d.c:1939
 msgid "missing 'x' values"
 msgstr "brakuje wartości 'x'"
 
-# graphics/src/plot3d.c: 1941
-# error(_("increasing 'x' values expected"))
 #: plot3d.c:1941
 msgid "increasing 'x' values expected"
 msgstr "oczekiwano rosnących wartości 'x'"
 
-# graphics/src/plot3d.c: 1946
-# error(_("missing 'y' values"))
 #: plot3d.c:1946
 msgid "missing 'y' values"
 msgstr "brakuje wartości 'y'"
 
-# graphics/src/plot3d.c: 1948
-# error(_("increasing 'y' values expected"))
 #: plot3d.c:1948
 msgid "increasing 'y' values expected"
 msgstr "oczekiwano rosnących wartości 'y'"
 
-# graphics/src/plot3d.c: 1953
-# error(_("invalid NA contour values"))
 #: plot3d.c:1953
 msgid "invalid NA contour values"
 msgstr "niepoprawne wartości NA konturu"
 
-# graphics/src/plot3d.c: 1965
-# warning(_("all z values are equal"))
 #: plot3d.c:1965
 msgid "all z values are equal"
 msgstr "wszystkie wartości 'z' są równe"
 
-# graphics/src/plot3d.c: 1967
-# warning(_("all z values are NA"))
 #: plot3d.c:1967
 msgid "all z values are NA"
 msgstr "wszystkie wartości 'z' to NA"
 
-# graphics/src/stem.c: 155
-# error(_("long vector '%s' is not supported"), "x")
 #: stem.c:155
 #, c-format
 msgid "long vector '%s' is not supported"
diff --git a/src/library/graphics/po/pt_BR.po b/src/library/graphics/po/pt_BR.po
index 86c2f76..912c5e1 100644
--- a/src/library/graphics/po/pt_BR.po
+++ b/src/library/graphics/po/pt_BR.po
@@ -5,8 +5,8 @@
 msgid ""
 msgstr ""
 "Project-Id-Version: R 2.1.0\n"
-"Report-Msgid-Bugs-To: bugs.r-project.org\n"
-"POT-Creation-Date: 2014-03-27 07:47+0000\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2016-04-01 10:28-0700\n"
 "PO-Revision-Date: 2011-03-26 08:56-0300\n"
 "Last-Translator: Fernando Henrique <pessoal at fernandohrosa.com.br>\n"
 "Language-Team: http://www.feferraz.net/br/P/Projeto_Traducao_R_Portugues\n"
@@ -17,11 +17,16 @@ msgstr ""
 "Plural-Forms: nplurals=2; plural=(n > 1);\n"
 "X-Generator: Pootle 2.0.5\n"
 
-#: base.c:45
+#: base.c:43
 msgid "no base graphics system is registered"
 msgstr ""
 
-#: base.c:335 base.c:342 base.c:350
+#: base.c:310
+#, fuzzy
+msgid "Incompatible graphics state"
+msgstr "estado gráfico inválido"
+
+#: base.c:385 base.c:392 base.c:400
 #, fuzzy
 msgid "the base graphics system is not registered"
 msgstr "muitos sistemas gráficos registrados"
@@ -120,7 +125,7 @@ msgstr "valor inválido especificado para parâmetro gráfico \"%s\""
 msgid "graphical parameter \"%s\" has the wrong length"
 msgstr "parâmetro gráfico \"%s\" tem o comprimento errado"
 
-#: par.c:262 par.c:672
+#: par.c:262 par.c:673
 #, c-format
 msgid "graphical parameter \"%s\" cannot be set"
 msgstr "parâmetro gráfico \"%s\" não pode ser especificado"
@@ -147,35 +152,35 @@ msgstr "valor de nr em \"mfg\" está errado e vai ser ignorado"
 msgid "value of 'nc' in \"mfg\" is wrong and will be ignored"
 msgstr "valor de nc em \"mfg\" está errado e vai ser ignorado"
 
-#: par.c:477
+#: par.c:478
 msgid "calling par(new=TRUE) with no plot"
 msgstr "chamada de par(new=TRUE) sem plot"
 
-#: par.c:664 par.c:1062
+#: par.c:665 par.c:1063
 #, c-format
 msgid "graphical parameter \"%s\" is obsolete"
 msgstr "parâmetro gráfico \"%s\" é obsoleto"
 
-#: par.c:668 par.c:1066
+#: par.c:669 par.c:1067
 #, c-format
 msgid "\"%s\" is not a graphical parameter"
 msgstr "\"%s\" não é um parâmetro gráfico"
 
-#: par.c:1119
+#: par.c:1120
 msgid "invalid argument passed to par()"
 msgstr "argumento inválido passado para par()"
 
-#: par.c:1163
+#: par.c:1164
 #, c-format
 msgid "too many rows in layout, limit %d"
 msgstr "muitas linhas no layout, limite %d"
 
-#: par.c:1169
+#: par.c:1170
 #, c-format
 msgid "too many columns in layout, limit %d"
 msgstr "muitas colunas no layout, limite %d"
 
-#: par.c:1171
+#: par.c:1172
 #, c-format
 msgid "too many cells in layout, limit %d"
 msgstr "muitas células no layout, limite %d"
diff --git a/src/library/graphics/po/ru.po b/src/library/graphics/po/ru.po
index 49b4c47..ddd738e 100644
--- a/src/library/graphics/po/ru.po
+++ b/src/library/graphics/po/ru.po
@@ -10,23 +10,24 @@ msgid ""
 msgstr ""
 "Project-Id-Version: R 2.11.0\n"
 "Report-Msgid-Bugs-To: bugs.r-project.org\n"
-"POT-Creation-Date: 2014-03-27 07:47+0000\n"
-"PO-Revision-Date: 2013-03-19 19:40-0600\n"
+"POT-Creation-Date: 2015-06-06 13:51+0100\n"
+"PO-Revision-Date: 2016-04-05 18:07-0600\n"
 "Last-Translator: Alexey Shipunov <dactylorhiza at gmail.com>\n"
 "Language-Team: Russian\n"
-"Language: \n"
+"Language: ru\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
 "First-Translator: Dmitri I GOULIAEV <dmitri.gouliaev at telkel.net\n"
-"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n"
-"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
+"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
 
-#: base.c:45
+#: base.c:43
 msgid "no base graphics system is registered"
 msgstr "не зарегистрирована базовая графическая система"
 
-#: base.c:335 base.c:342 base.c:350
+#: base.c:333
+#: base.c:340
+#: base.c:348
 msgid "the base graphics system is not registered"
 msgstr "базовая графическая система не зарегистрирована"
 
@@ -35,7 +36,8 @@ msgstr "базовая графическая система не зарегис
 msgid "bad units specified in '%s'"
 msgstr "в %s указаны неправильные единицы"
 
-#: graphics.c:1791 graphics.c:1813
+#: graphics.c:1791
+#: graphics.c:1813
 msgid "attempt to plot on null device"
 msgstr "попытка рисовать на null-устройстве"
 
@@ -84,7 +86,7 @@ msgstr "неправильное графическое состояние"
 
 #: graphics.c:2555
 msgid "graphics device closed during call to locator or identify"
-msgstr ""
+msgstr "графическое устройство закрыто в процессе вызова locator или identify"
 
 #: graphics.c:2604
 msgid "No graphics device is active"
@@ -121,7 +123,8 @@ msgstr "указано неправильное значение графиче
 msgid "graphical parameter \"%s\" has the wrong length"
 msgstr "графический параметр \"%s\" неправильной длины"
 
-#: par.c:262 par.c:672
+#: par.c:262
+#: par.c:673
 #, c-format
 msgid "graphical parameter \"%s\" cannot be set"
 msgstr "графический параметр \"%s\" не может быть установлен"
@@ -146,35 +149,37 @@ msgstr "значение 'nr' в \"mfg\" неправильное и будет
 msgid "value of 'nc' in \"mfg\" is wrong and will be ignored"
 msgstr "значение 'nc' в \"mfg\" неправильное и будет пропущено"
 
-#: par.c:477
+#: par.c:478
 msgid "calling par(new=TRUE) with no plot"
 msgstr "вызов par(new=TRUE) без графика"
 
-#: par.c:664 par.c:1062
+#: par.c:665
+#: par.c:1063
 #, c-format
 msgid "graphical parameter \"%s\" is obsolete"
 msgstr "графический параметр \"%s\" устарел"
 
-#: par.c:668 par.c:1066
+#: par.c:669
+#: par.c:1067
 #, c-format
 msgid "\"%s\" is not a graphical parameter"
 msgstr "\"%s\" -- не графический параметр"
 
-#: par.c:1119
+#: par.c:1120
 msgid "invalid argument passed to par()"
 msgstr "par() передан неправильный аргумент"
 
-#: par.c:1163
+#: par.c:1164
 #, c-format
 msgid "too many rows in layout, limit %d"
 msgstr "слишком много строк в разметке, надо не больше %d"
 
-#: par.c:1169
+#: par.c:1170
 #, c-format
 msgid "too many columns in layout, limit %d"
 msgstr "слишком много колонок в разметке, надо не больше %d"
 
-#: par.c:1171
+#: par.c:1172
 #, c-format
 msgid "too many cells in layout, limit %d"
 msgstr "слишком много ячеек в разметке, надо не больше %d"
@@ -195,9 +200,20 @@ msgstr "неправильный графический символ"
 msgid "invalid font specification"
 msgstr "неправильное указание шрифта"
 
-#: plot.c:276 plot.c:290 plot.c:481 plot.c:486 plot.c:2112 plot.c:2119
-#: plot.c:3141 plot.c:3143 plot.c:3145 plot.c:3300 plot3d.c:1163 plot3d.c:1167
-#: plot3d.c:1169 plot3d.c:1903
+#: plot.c:276
+#: plot.c:290
+#: plot.c:481
+#: plot.c:486
+#: plot.c:2112
+#: plot.c:2119
+#: plot.c:3141
+#: plot.c:3143
+#: plot.c:3145
+#: plot.c:3300
+#: plot3d.c:1163
+#: plot3d.c:1167
+#: plot3d.c:1169
+#: plot3d.c:1903
 #, c-format
 msgid "invalid '%s' value"
 msgstr "неправильное значение '%s'"
@@ -253,9 +269,24 @@ msgstr "Логарифмическая ось должна иметь полож
 msgid "invalid type for axis labels"
 msgstr "неправильный тип меток осей"
 
-#: plot.c:765 plot.c:1298 plot.c:1621 plot.c:1686 plot.c:1761 plot.c:1827
-#: plot.c:1901 plot.c:1996 plot.c:2072 plot.c:2350 plot.c:2524 plot.c:2740
-#: plot.c:3282 plot.c:3409 plot.c:3485 plot.c:3651 plot.c:3931 plot3d.c:1872
+#: plot.c:765
+#: plot.c:1298
+#: plot.c:1621
+#: plot.c:1686
+#: plot.c:1761
+#: plot.c:1827
+#: plot.c:1901
+#: plot.c:1996
+#: plot.c:2072
+#: plot.c:2350
+#: plot.c:2524
+#: plot.c:2740
+#: plot.c:3282
+#: plot.c:3409
+#: plot.c:3485
+#: plot.c:3651
+#: plot.c:3931
+#: plot3d.c:1872
 msgid "too few arguments"
 msgstr "слишком мало аргументов"
 
@@ -268,8 +299,18 @@ msgstr "неправильное количество осей %d"
 msgid "'hadj' must be of length one"
 msgstr "'hadj' должен быть единичной длины"
 
-#: plot.c:873 plot.c:2084 plot.c:2361 plot.c:2367 plot.c:2374 plot.c:2382
-#: plot.c:2389 plot.c:2396 plot.c:2403 plot.c:2410 plot.c:2418 plot.c:2425
+#: plot.c:873
+#: plot.c:2084
+#: plot.c:2361
+#: plot.c:2367
+#: plot.c:2374
+#: plot.c:2382
+#: plot.c:2389
+#: plot.c:2396
+#: plot.c:2403
+#: plot.c:2410
+#: plot.c:2418
+#: plot.c:2425
 #: plot.c:3148
 #, c-format
 msgid "zero-length '%s' specified"
@@ -302,7 +343,8 @@ msgstr "длины 'x' и 'y' в %s() различаются"
 msgid "plot type '%s' will be truncated to first character"
 msgstr "тип графика '%s' будет обрезан до первого знака"
 
-#: plot.c:1331 plot.c:3002
+#: plot.c:1331
+#: plot.c:3002
 msgid "invalid plot type"
 msgstr "неправильный тип графика"
 
@@ -333,7 +375,7 @@ msgstr "не могу смешивать координаты нулевой д
 
 #: plot.c:1832
 msgid "Empty raster"
-msgstr ""
+msgstr "Пустой растр"
 
 #: plot.c:1914
 msgid "invalid arrow head length"
@@ -359,15 +401,31 @@ msgstr "неправильное указание a=, b="
 msgid "'a' and 'b' must be finite"
 msgstr "'a' и 'b' должны быть конечными"
 
-#: plot.c:2925 plot.c:4051 plot.c:4055 plot.c:4058 plot.c:4078 plot.c:4082
-#: plot.c:4085 plot3d.c:1085 plot3d.c:1089 plot3d.c:1094 plot3d.c:1098
-#: plot3d.c:1102 plot3d.c:1106 stem.c:158 stem.c:159 stem.c:161 stem.c:162
-#: stem.c:208 stem.c:209
+#: plot.c:2925
+#: plot.c:4051
+#: plot.c:4055
+#: plot.c:4058
+#: plot.c:4078
+#: plot.c:4082
+#: plot.c:4085
+#: plot3d.c:1085
+#: plot3d.c:1089
+#: plot3d.c:1094
+#: plot3d.c:1098
+#: plot3d.c:1102
+#: plot3d.c:1106
+#: stem.c:158
+#: stem.c:159
+#: stem.c:161
+#: stem.c:162
+#: stem.c:208
+#: stem.c:209
 #, c-format
 msgid "invalid '%s' argument"
 msgstr "неправильный аргумент '%s'"
 
-#: plot.c:2997 plot.c:3137
+#: plot.c:2997
+#: plot.c:3137
 #, c-format
 msgid "invalid number of points in %s"
 msgstr "неправильное количество точек в %s"
@@ -397,7 +455,8 @@ msgstr "предупреждение: ближайшая точка уже оп
 msgid "invalid units"
 msgstr "неправильные единицы"
 
-#: plot.c:3469 plot.c:3576
+#: plot.c:3469
+#: plot.c:3576
 msgid "invalid dendrogram input"
 msgstr "неправильный ввод дендрограммы"
 
@@ -417,7 +476,10 @@ msgstr "несоответствие длин x/y/параметров"
 msgid "invalid circles data"
 msgstr "неправильные данные о кругах"
 
-#: plot.c:3685 plot.c:3706 plot.c:3731 plot.c:3761
+#: plot.c:3685
+#: plot.c:3706
+#: plot.c:3731
+#: plot.c:3761
 msgid "invalid symbol parameter"
 msgstr "неправильный символьный параметр"
 
@@ -467,20 +529,26 @@ msgstr "неправильные 'boxplots[, 1:4]'"
 msgid "invalid symbol type"
 msgstr "неправильный тип символа"
 
-#: plot.c:3944 plot.c:3946 plot.c:3951 plot.c:3953
+#: plot.c:3944
+#: plot.c:3946
+#: plot.c:3951
+#: plot.c:3953
 #, c-format
 msgid "incorrect length for '%s' argument"
 msgstr "неправильная длина аргумента '%s''"
 
-#: plot3d.c:181 plot3d.c:1929
+#: plot3d.c:181
+#: plot3d.c:1929
 msgid "insufficient 'x' or 'y' values"
 msgstr "недостаточные значения 'x' или 'y'"
 
-#: plot3d.c:185 plot3d.c:1932
+#: plot3d.c:185
+#: plot3d.c:1932
 msgid "dimension mismatch"
 msgstr "несоответствие размерности"
 
-#: plot3d.c:193 plot3d.c:1935
+#: plot3d.c:193
+#: plot3d.c:1935
 msgid "no contour values"
 msgstr "нет значений контура"
 
@@ -492,7 +560,8 @@ msgstr "неправильные x/y-значения или границы"
 msgid "invalid contour levels: must be strictly increasing"
 msgstr "неправильные уровни контура: должны четко увеличиваться"
 
-#: plot3d.c:1049 plot3d.c:1062
+#: plot3d.c:1049
+#: plot3d.c:1062
 msgid "Axis orientation not calculated"
 msgstr "Положение осей не вычислено"
 
@@ -528,7 +597,8 @@ msgstr "'zlab' должен быть текстовым вектором еди
 msgid "invalid viewing parameters"
 msgstr "неправильные параметры просмотра"
 
-#: plot3d.c:1179 plot3d.c:1183
+#: plot3d.c:1179
+#: plot3d.c:1183
 #, c-format
 msgid "invalid '%s' specification"
 msgstr "неправильное определение '%s'"
@@ -573,48 +643,34 @@ msgstr "длинный вектор '%s' не поддерживается"
 
 #~ msgid "unable to allocate memory (in GPolygon)"
 #~ msgstr "не могу разместить память (в GPolygon)"
-
 #~ msgid "invalid number of points in identify()"
 #~ msgstr "неправильное количество точек в identify()"
-
 #~ msgid "Event GE_ScalePS requires a single numeric value"
 #~ msgstr "Событие GE_ScalePS требует единичного числового значения"
-
 #~ msgid "zero length 'padj' specified"
 #~ msgstr "указан 'padj' нулевой длины"
-
 #~ msgid "unable to allocate memory (in GPath)"
 #~ msgstr "не могу разместить память (в GPath)"
-
 #~ msgid "invalid x or y (in GPath)"
 #~ msgstr "неправильный x или y (в GPath)"
-
 #~ msgid "zero length 'labels'"
 #~ msgstr "нулевые 'labels'"
-
 #~ msgid "zero length 'text' specified"
 #~ msgstr "указана нулевая длина 'text'"
-
 #~ msgid "zero length 'line' specified"
 #~ msgstr "указан нулевая длина 'line'"
-
 #~ msgid "zero length 'outer' specified"
 #~ msgstr "указана нулевая длина 'outer'"
-
 #~ msgid "zero length 'at' specified"
 #~ msgstr "указана нулевая длина 'at'"
-
 #~ msgid "zero length 'adj' specified"
 #~ msgstr "указана нулевая длина 'adj'"
-
 #~ msgid "zero length 'cex' specified"
 #~ msgstr "указана нулевая длина 'cex'"
-
 #~ msgid "zero length 'col' specified"
 #~ msgstr "указана нулевая длина 'col'"
-
 #~ msgid "zero length 'font' specified"
 #~ msgstr "указана нулевая длина 'font'"
-
 #~ msgid "unable to allocate memory (in xspline)"
 #~ msgstr "не могу разместить память (в xspline)"
+
diff --git a/src/library/graphics/po/tr.po b/src/library/graphics/po/tr.po
index d5d1331..6bc205e 100644
--- a/src/library/graphics/po/tr.po
+++ b/src/library/graphics/po/tr.po
@@ -8,8 +8,8 @@
 msgid ""
 msgstr ""
 "Project-Id-Version: R 2.13.0\n"
-"Report-Msgid-Bugs-To: bugs.r-project.org\n"
-"POT-Creation-Date: 2014-03-27 07:47+0000\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2016-04-01 10:28-0700\n"
 "PO-Revision-Date: 2011-04-02 18:24+0200\n"
 "Last-Translator: Murat Alkan <muratalk at gmail.com>\n"
 "Language-Team: Turkish <muratalk at gmail.com>\n"
@@ -20,11 +20,16 @@ msgstr ""
 "X-Generator: Lokalize 1.0\n"
 "Plural-Forms: nplurals=1; plural=0;\n"
 
-#: base.c:45
+#: base.c:43
 msgid "no base graphics system is registered"
 msgstr ""
 
-#: base.c:335 base.c:342 base.c:350
+#: base.c:310
+#, fuzzy
+msgid "Incompatible graphics state"
+msgstr "geçersiz grafik durumu"
+
+#: base.c:385 base.c:392 base.c:400
 #, fuzzy
 msgid "the base graphics system is not registered"
 msgstr "çok fazla grafik sistemi kayıtlı"
@@ -123,7 +128,7 @@ msgstr "grafiksel parametre \"%s\" için geçersiz değer berlirlendi"
 msgid "graphical parameter \"%s\" has the wrong length"
 msgstr "grafiksel parametre \"%s\" yanlış uzunlukta"
 
-#: par.c:262 par.c:672
+#: par.c:262 par.c:673
 #, c-format
 msgid "graphical parameter \"%s\" cannot be set"
 msgstr "grafiksel parametre \"%s\" belirlenemez"
@@ -150,35 +155,35 @@ msgstr "\"mfg\" içindeki nr değeri yanlış, görmezden gelinecek"
 msgid "value of 'nc' in \"mfg\" is wrong and will be ignored"
 msgstr "\"mfg\" içindeki nc değeri yanlış, görmezden gelinecek"
 
-#: par.c:477
+#: par.c:478
 msgid "calling par(new=TRUE) with no plot"
 msgstr "çizim olmadan par(new=TRUE) çağırılıyor"
 
-#: par.c:664 par.c:1062
+#: par.c:665 par.c:1063
 #, c-format
 msgid "graphical parameter \"%s\" is obsolete"
 msgstr "grafiksel parametre \"%s\" çok eski"
 
-#: par.c:668 par.c:1066
+#: par.c:669 par.c:1067
 #, c-format
 msgid "\"%s\" is not a graphical parameter"
 msgstr "\"%s\" bir grafiksel parametre değil"
 
-#: par.c:1119
+#: par.c:1120
 msgid "invalid argument passed to par()"
 msgstr "par()'a geçersiz bir argüman geçirildi"
 
-#: par.c:1163
+#: par.c:1164
 #, c-format
 msgid "too many rows in layout, limit %d"
 msgstr "yerleşimde çok fazla sütun var, sınır %d"
 
-#: par.c:1169
+#: par.c:1170
 #, c-format
 msgid "too many columns in layout, limit %d"
 msgstr "yerleşimde çok fazla dize var, sınır %d"
 
-#: par.c:1171
+#: par.c:1172
 #, c-format
 msgid "too many cells in layout, limit %d"
 msgstr "yerleşimde çok fazla hücre var, sınır %d"
diff --git a/src/library/graphics/po/zh_CN.po b/src/library/graphics/po/zh_CN.po
index cbd36cb..6d3f21a 100644
--- a/src/library/graphics/po/zh_CN.po
+++ b/src/library/graphics/po/zh_CN.po
@@ -6,22 +6,27 @@
 msgid ""
 msgstr ""
 "Project-Id-Version: R 2.1.0\n"
-"Report-Msgid-Bugs-To: bugs.r-project.org\n"
-"POT-Creation-Date: 2014-03-27 07:47+0000\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2016-04-01 10:28-0700\n"
 "PO-Revision-Date: 2005-05-20 18:26+0800\n"
 "Last-Translator: ronggui\n"
 "Language-Team: Chinese\n"
-"Language: \n"
+"Language: zh_CN\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
 "Plural-Forms: nplurals=1; plural=0;\n"
 
-#: base.c:45
+#: base.c:43
 msgid "no base graphics system is registered"
 msgstr "没有注册的基础图形系统"
 
-#: base.c:335 base.c:342 base.c:350
+#: base.c:310
+#, fuzzy
+msgid "Incompatible graphics state"
+msgstr "图形狀態不对"
+
+#: base.c:385 base.c:392 base.c:400
 msgid "the base graphics system is not registered"
 msgstr "没有注册基础图形系统"
 
@@ -116,7 +121,7 @@ msgstr "图形参数\"%s\"的值设得不对"
 msgid "graphical parameter \"%s\" has the wrong length"
 msgstr "图形参数\"%s\"的长度不对"
 
-#: par.c:262 par.c:672
+#: par.c:262 par.c:673
 #, c-format
 msgid "graphical parameter \"%s\" cannot be set"
 msgstr "无法设定图形参数\"%s\""
@@ -141,35 +146,35 @@ msgstr "\"mfg\"里的'nr'值不对,略过不用"
 msgid "value of 'nc' in \"mfg\" is wrong and will be ignored"
 msgstr "\"mfg\"里的'nc'值不对,略过不用"
 
-#: par.c:477
+#: par.c:478
 msgid "calling par(new=TRUE) with no plot"
 msgstr "不绘图就不能调用par(new=TRUE)"
 
-#: par.c:664 par.c:1062
+#: par.c:665 par.c:1063
 #, c-format
 msgid "graphical parameter \"%s\" is obsolete"
 msgstr "图形参数\"%s\"已过期不用了"
 
-#: par.c:668 par.c:1066
+#: par.c:669 par.c:1067
 #, c-format
 msgid "\"%s\" is not a graphical parameter"
 msgstr "\"%s\"不是图形参数"
 
-#: par.c:1119
+#: par.c:1120
 msgid "invalid argument passed to par()"
 msgstr "传给par()的参数错误"
 
-#: par.c:1163
+#: par.c:1164
 #, c-format
 msgid "too many rows in layout, limit %d"
 msgstr "layout里的行数太多, 极限为%d"
 
-#: par.c:1169
+#: par.c:1170
 #, c-format
 msgid "too many columns in layout, limit %d"
 msgstr "layout里的列数太多, 极限为%d"
 
-#: par.c:1171
+#: par.c:1172
 #, c-format
 msgid "too many cells in layout, limit %d"
 msgstr "layout里的元素太多, 极限为%d"
diff --git a/src/library/graphics/po/zh_TW.po b/src/library/graphics/po/zh_TW.po
index f623e82..d4197f7 100644
--- a/src/library/graphics/po/zh_TW.po
+++ b/src/library/graphics/po/zh_TW.po
@@ -7,8 +7,8 @@
 msgid ""
 msgstr ""
 "Project-Id-Version: R 2.14.0\n"
-"Report-Msgid-Bugs-To: bugs.r-project.org\n"
-"POT-Creation-Date: 2014-03-27 07:47+0000\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2016-04-01 10:28-0700\n"
 "PO-Revision-Date: 2011-10-13 17:30+0800\n"
 "Last-Translator: Wei-Lun Chao <chaoweilun at gmail.com>\n"
 "Language-Team: Chinese (traditional) <zh-l10n at linux.org.tw>\n"
@@ -18,11 +18,16 @@ msgstr ""
 "Content-Transfer-Encoding: 8bit\n"
 "Plural-Forms: nplurals=1; plural=0;\n"
 
-#: base.c:45
+#: base.c:43
 msgid "no base graphics system is registered"
 msgstr ""
 
-#: base.c:335 base.c:342 base.c:350
+#: base.c:310
+#, fuzzy
+msgid "Incompatible graphics state"
+msgstr "繪圖狀態不正確"
+
+#: base.c:385 base.c:392 base.c:400
 #, fuzzy
 msgid "the base graphics system is not registered"
 msgstr "登記了太多的繪圖系統"
@@ -121,7 +126,7 @@ msgstr "繪圖參數 \"%s\" 的值設得不正確"
 msgid "graphical parameter \"%s\" has the wrong length"
 msgstr "繪圖參數 \"%s\" 的長度不正確"
 
-#: par.c:262 par.c:672
+#: par.c:262 par.c:673
 #, c-format
 msgid "graphical parameter \"%s\" cannot be set"
 msgstr "無法設定繪圖參數 \"%s\""
@@ -148,35 +153,35 @@ msgstr "\"mfg\" 中的 nr 值不正確,忽略不用"
 msgid "value of 'nc' in \"mfg\" is wrong and will be ignored"
 msgstr "\"mfg\" 中的 nc 值不正確,忽略不用"
 
-#: par.c:477
+#: par.c:478
 msgid "calling par(new=TRUE) with no plot"
 msgstr "呼叫 par(new=TRUE) 而不繪圖"
 
-#: par.c:664 par.c:1062
+#: par.c:665 par.c:1063
 #, c-format
 msgid "graphical parameter \"%s\" is obsolete"
 msgstr "繪圖參數 \"%s\" 已過時"
 
-#: par.c:668 par.c:1066
+#: par.c:669 par.c:1067
 #, c-format
 msgid "\"%s\" is not a graphical parameter"
 msgstr "\"%s\" 不是一個繪圖參數"
 
-#: par.c:1119
+#: par.c:1120
 msgid "invalid argument passed to par()"
 msgstr "傳給 par() 的引數無效"
 
-#: par.c:1163
+#: par.c:1164
 #, c-format
 msgid "too many rows in layout, limit %d"
 msgstr "layout 中的列數太多, 極值為 %d"
 
-#: par.c:1169
+#: par.c:1170
 #, c-format
 msgid "too many columns in layout, limit %d"
 msgstr "layout 中的行數太多, 極值為 %d"
 
-#: par.c:1171
+#: par.c:1172
 #, c-format
 msgid "too many cells in layout, limit %d"
 msgstr "layout 中的元素太多, 極值為 %d"
diff --git a/src/library/graphics/src/Makefile.win b/src/library/graphics/src/Makefile.win
index f32f534..638b283 100644
--- a/src/library/graphics/src/Makefile.win
+++ b/src/library/graphics/src/Makefile.win
@@ -20,7 +20,7 @@ SHLIB = $(pkg).dll
 RESFLAGS = -I $(R_HOME)/include
 
 ## need config.h
-PKG_CPPFLAGS=-I$(R_HOME)/src/include -DHAVE_CONFIG_H -I$(R_HOME)/src/main
+PKG_CPPFLAGS = -I$(R_HOME)/src/include -DHAVE_CONFIG_H -I$(R_HOME)/src/main
 all: makeMakedeps shlib
 
 shlib: $(SHLIB)
diff --git a/src/library/graphics/src/base.c b/src/library/graphics/src/base.c
index 8df4fc0..1e6dfcb 100644
--- a/src/library/graphics/src/base.c
+++ b/src/library/graphics/src/base.c
@@ -14,7 +14,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  */
 
 /* The beginning of code which represents an R base graphics system
@@ -37,8 +37,6 @@
 #define _(String) (String)
 #endif
 
-/* From src/main/devices.c */
-extern int baseRegisterIndex;
 
 static R_INLINE GPar* dpSavedptr(pGEDevDesc dd) {
     if (baseRegisterIndex == -1)
@@ -263,21 +261,73 @@ static SEXP baseCallback(GEevent task, pGEDevDesc dd, SEXP data)
 	GReset(dd);
 	break;
     case GE_SaveSnapshotState:
-	/* called from GEcreateSnapshot */
-	bss = dd->gesd[baseRegisterIndex]->systemSpecific;
-	/* Changed from INTSXP in 2.7.0: but saved graphics lists
-	   are protected by an R version number */
-	PROTECT(result = allocVector(RAWSXP, sizeof(GPar)));
-	copyGPar(&(bss->dpSaved), (GPar*) RAW(result));
-	UNPROTECT(1);
+        /* called from GEcreateSnapshot */
+        { 
+            SEXP pkgName;
+            bss = dd->gesd[baseRegisterIndex]->systemSpecific;
+            /* Changed from INTSXP in 2.7.0: but saved graphics lists
+               are protected by an R version number */
+            PROTECT(result = allocVector(RAWSXP, sizeof(GPar)));
+            copyGPar(&(bss->dpSaved), (GPar*) RAW(result));
+            PROTECT(pkgName = mkString("graphics"));
+            setAttrib(result, install("pkgName"), pkgName);
+            UNPROTECT(2);
+        }
 	break;
     case GE_RestoreSnapshotState:
-	/* called from GEplaySnapshot */
-	bss = dd->gesd[baseRegisterIndex]->systemSpecific;
-	copyGPar((GPar*) RAW(data), &(bss->dpSaved));
-	restoredpSaved(dd);
-	copyGPar(&(bss->dp), &(bss->gp));
-	GReset(dd);
+        /* called from GEplaySnapshot */
+        {
+            int i, nState = LENGTH(data) - 1;
+            SEXP graphicsState, snapshotEngineVersion;
+            PROTECT(graphicsState = R_NilValue);
+            /* Prior to engine version 11, "pkgName" was not stored.
+             * (can tell because "engineVersion" was not stored either.)
+             * Assume 'graphics' is first state in snapshot
+             * (though this could be fatal).
+             */
+            PROTECT(snapshotEngineVersion = 
+                    getAttrib(data, install("engineVersion")));
+            if (isNull(snapshotEngineVersion)) {
+                graphicsState = VECTOR_ELT(data, 1);
+            } else {
+                for (i=0; i<nState; i++) {
+                    SEXP state = VECTOR_ELT(data, i + 1);
+                    if (!strcmp(CHAR(STRING_ELT(getAttrib(state, 
+                                                          install("pkgName")), 
+                                                0)), 
+                                "graphics")) {
+                        graphicsState = state;
+                    }
+                }
+            }
+            if (!isNull(graphicsState)) {
+                /* Check that RAW blob being restored is same size
+                 * as GPar struct in current R version.
+                 * Any version difference will have been warned about,
+                 * but a difference here means STOP.
+                 */
+                if (LENGTH(graphicsState) != sizeof(GPar)) {
+                    error(_("Incompatible graphics state"));
+                }
+                bss = dd->gesd[baseRegisterIndex]->systemSpecific;
+                copyGPar((GPar*) RAW(graphicsState), &(bss->dpSaved));
+                /* These are probably redundant because GE_RestoreState
+                 * will follow from GEplayDisplayList(), but no harm
+                 * is done 
+                 * AND there is at least one place that
+                 * depends on this ('gridGraphics' package replays
+                 * an empty DL to do restoredpSaved() on new page)
+                 */
+                restoredpSaved(dd);
+                copyGPar(&(bss->dp), &(bss->gp));
+                GReset(dd);
+                /* Make the device "clean" with respect to 'graphics'
+                 * so that the display list replay starts from scratch
+                 */
+                bss->baseDevice = FALSE;
+            }
+            UNPROTECT(2);
+        }
 	break;
     case GE_CheckPlot:
 	/* called from GEcheckState:
diff --git a/src/library/graphics/src/graphics.c b/src/library/graphics/src/graphics.c
index 998491e..47dd379 100644
--- a/src/library/graphics/src/graphics.c
+++ b/src/library/graphics/src/graphics.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--2014  The R Core Team
+ *  Copyright (C) 1997--2016  The R Core Team
  *  Copyright (C) 2002--2011  The R Foundation
  *
  *  This program is free software; you can redistribute it and/or modify
@@ -16,7 +16,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
 
 
  *  This is an extensive reworking by Paul Murrell of an original
@@ -292,7 +292,7 @@ static double yDevtoCharUnits(double y, pGEDevDesc dd)
     return yDevtoNDCUnits(y, dd)/(gpptr(dd)->cex * gpptr(dd)->yNDCPerChar);
 }
 
-static void BadUnitsError(const char *where)
+static void NORET BadUnitsError(const char *where)
 {
     error(_("bad units specified in '%s'"), where);
 }
@@ -1735,7 +1735,7 @@ static Rboolean validFigureMargins(pGEDevDesc dd)
 	    (gpptr(dd)->plt[2] < gpptr(dd)->plt[3]));
 }
 
-static void invalidError(const char *message, pGEDevDesc dd)
+static void NORET invalidError(const char *message, pGEDevDesc dd)
 {
     dpptr(dd)->currentFigure -= 1;
     if (dpptr(dd)->currentFigure < 1)
@@ -2547,12 +2547,21 @@ void GLine(double x1, double y1, double x2, double y2, int coords, pGEDevDesc dd
 */
 static void (*old_close)(pDevDesc) = NULL;
 
-static void locator_close(pDevDesc dd)
+static void 
+#ifndef WIN32
+NORET 
+#endif
+locator_close(pDevDesc dd)
 {
     if(old_close) old_close(dd);
     dd->close = old_close;
     old_close = NULL;
+    /* It's not safe to call error() in a Windows event handler, so 
+       the GA_Close method records the close event separately.
+    */
+#ifndef WIN32
     error(_("graphics device closed during call to locator or identify"));
+#endif
 }
 
 
@@ -3379,7 +3388,7 @@ double GExpressionHeight(SEXP expr, GUnit units, pGEDevDesc dd)
  * Could be removed if Rgraphics.h ever gets REPLACED by new API
  * NOTE that base graphics code no longer calls this -- the base
  * graphics system directly calls the graphics engine for mathematical
- * annotation (GEMathText)
+ * annotation (GEMathText in ../../../main/plotmath.c )
  */
 void GMathText(double x, double y, int coords, SEXP expr,
 	       double xc, double yc, double rot,
diff --git a/src/library/graphics/src/graphics.h b/src/library/graphics/src/graphics.h
index 44fd024..166f412 100644
--- a/src/library/graphics/src/graphics.h
+++ b/src/library/graphics/src/graphics.h
@@ -14,7 +14,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  */
 
 #ifdef ENABLE_NLS
diff --git a/src/library/graphics/src/init.c b/src/library/graphics/src/init.c
index dfc6468..a5d1f7a 100644
--- a/src/library/graphics/src/init.c
+++ b/src/library/graphics/src/init.c
@@ -1,6 +1,6 @@
 /*
  *  R : A Computer Language for Statistical Data Analysis
- *  Copyright (C) 2012   The R Core Team.
+ *  Copyright (C) 2012-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
@@ -14,7 +14,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  */
 
 #ifdef HAVE_CONFIG_H
@@ -26,6 +26,7 @@
 
 #include "graphics.h"
 #include <R_ext/Rdynload.h>
+#include <R_ext/Visibility.h>
 
 #define CALLDEF(name, n)  {#name, (DL_FUNC) &name, n}
 
@@ -80,10 +81,7 @@ static const R_ExternalMethodDef ExtEntries[] = {
 };
 
 
-void
-#ifdef HAVE_VISIBILITY_ATTRIBUTE
-__attribute__ ((visibility ("default")))
-#endif
+void attribute_visible
 R_init_graphics(DllInfo *dll)
 {
     R_registerRoutines(dll, NULL, CallEntries, NULL, ExtEntries);
diff --git a/src/library/graphics/src/par-common.c b/src/library/graphics/src/par-common.c
index fb4584c..ec5c830 100644
--- a/src/library/graphics/src/par-common.c
+++ b/src/library/graphics/src/par-common.c
@@ -14,7 +14,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  */
 
 /* Graphical parameters which are treated identically by
@@ -136,6 +136,9 @@
      else if (streql(what, "family")) {
 	const char *ss;
 	value = coerceVector(value, STRSXP);
+        if (STRING_ELT(value, 0) == NA_STRING) {
+            SET_STRING_ELT(value, 0, R_BlankString);
+        }
 	lengthCheck(what, value, 1);
 	const void *vmax = vmaxget();
 	ss = translateChar(STRING_ELT(value, 0));
@@ -232,7 +235,7 @@
 	R_DEV__(lwd) = x;
     }
     else if (streql(what, "mgp")) {
-	value = coerceVector(value, REALSXP);
+	PROTECT(value = coerceVector(value, REALSXP));
 	lengthCheck(what, value, 3);
 	/* Since 1.6.x: Allow negative (S-compatibly): */
 	naRealCheck(REAL(value)[0], what);
@@ -244,6 +247,7 @@
 	R_DEV__(mgp[0]) = REAL(value)[0];
 	R_DEV__(mgp[1]) = REAL(value)[1];
 	R_DEV__(mgp[2]) = REAL(value)[2];
+	UNPROTECT(1);
     }
     else if (streql(what, "mkh")) {
 	lengthCheck(what, value, 1);	x = asReal(value);
diff --git a/src/library/graphics/src/par.c b/src/library/graphics/src/par.c
index 66bab44..997ad80 100644
--- a/src/library/graphics/src/par.c
+++ b/src/library/graphics/src/par.c
@@ -15,7 +15,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  *
  *
  *
@@ -155,7 +155,7 @@ static int ParCode(const char *what)
 }
 
 
-static void par_error(const char *what)
+static void NORET par_error(const char *what)
 {
     error(_("invalid value specified for graphical parameter \"%s\""),  what);
 }
@@ -428,7 +428,7 @@ static void Specify(const char *what, SEXP value, pGEDevDesc dd)
     }
     else if (streql(what, "mfg")) {
 	int row, col, nrow, ncol, np;
-	value = coerceVector(value, INTSXP);
+	PROTECT(value = coerceVector(value, INTSXP));
 	np = length(value);
 	if(np != 2 && np != 4)
 	    error(_("parameter \"mfg\" has the wrong length"));
@@ -450,6 +450,7 @@ static void Specify(const char *what, SEXP value, pGEDevDesc dd)
 	    if(ncol != INTEGER(value)[3])
 		warning(_("value of 'nc' in \"mfg\" is wrong and will be ignored"));
 	}
+	UNPROTECT(1);
 	R_DEV_2(lastFigure) = nrow*ncol;
 	/*R_DEV__(mfind) = 1;*/
 	/* currentFigure is 1-based */
diff --git a/src/library/graphics/src/plot.c b/src/library/graphics/src/plot.c
index 530a689..d2327dd 100644
--- a/src/library/graphics/src/plot.c
+++ b/src/library/graphics/src/plot.c
@@ -16,7 +16,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  */
 
 #ifdef HAVE_CONFIG_H
@@ -638,7 +638,7 @@ SEXP labelformat(SEXP labels)
 	formatReal(REAL(labels), n, &w, &d, &e, 0);
 	PROTECT(ans = allocVector(STRSXP, n));
 	for (i = 0; i < n; i++) {
-	    strp = EncodeReal(REAL(labels)[i], 0, d, e, OutDec);
+	    strp = EncodeReal0(REAL(labels)[i], 0, d, e, OutDec);
 	    SET_STRING_ELT(ans, i, mkChar(strp));
 	}
 	UNPROTECT(1);
@@ -2148,8 +2148,8 @@ SEXP C_text(SEXP args)
 
     /* Done here so 'vfont' trumps inline 'family' */
     if (!isNull(vfont) && !isExpression(txt)) {
-	strncpy(gpptr(dd)->family, "Her ", 201);
-	gpptr(dd)->family[3] = (char) INTEGER(vfont)[0];
+	strncpy(gpptr(dd)->family, "Hershey ", 201);
+	gpptr(dd)->family[7] = (char) INTEGER(vfont)[0];
 	vectorFonts = TRUE;
     }
 
@@ -2837,12 +2837,12 @@ SEXP C_abline(SEXP args)
 		/* now get rid of -ve values */
 		lstart = 0;lstop = NS;
 		if (xlog) {
-		    for(; xx[lstart] <= 0 && lstart < NS+1; lstart++);
-		    for(; xx[lstop] <= 0 && lstop > 0; lstop--);
+		    for(; lstart < NS+1 && xx[lstart] <= 0 ; lstart++);
+		    for(; lstop > 0 && xx[lstop] <= 0 ; lstop--);
 		}
 		if (ylog) {
-		    for(; yy[lstart] <= 0 && lstart < NS+1; lstart++);
-		    for(; yy[lstop] <= 0 && lstop > 0; lstop--);
+		    for(; lstart < NS+1 && yy[lstart] <= 0 ; lstart++);
+		    for(; lstop > 0 && yy[lstop] <= 0 ; lstop--);
 		}
 
 		GPolyline(lstop-lstart+1, xx+lstart, yy+lstart, USER, dd);
@@ -3306,8 +3306,8 @@ SEXP C_identify(SEXP call, SEXP op, SEXP args, SEXP rho)
 									\
     /* 'vfont' trumps inline 'family' */				\
     if (!isNull(vfont) && !isExpression(str)) {				\
-	strncpy(gpptr(dd)->family, "Her ", 201);			\
-	gpptr(dd)->family[3] = (char)INTEGER(vfont)[0];			\
+	strncpy(gpptr(dd)->family, "Hershey ", 201);			\
+	gpptr(dd)->family[7] = (char)INTEGER(vfont)[0];			\
 	gpptr(dd)->font = INTEGER(vfont)[1];				\
     } else gpptr(dd)->font = INTEGER(font)[0];				\
 									\
diff --git a/src/library/graphics/src/plot3d.c b/src/library/graphics/src/plot3d.c
index 003c2c6..1904faa 100644
--- a/src/library/graphics/src/plot3d.c
+++ b/src/library/graphics/src/plot3d.c
@@ -14,7 +14,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  */
 
 
@@ -1905,8 +1905,8 @@ SEXP C_contour(SEXP args)
     PROTECT(vfont = FixupVFont(CAR(args)));
     if (!isNull(vfont)) {
 	strncpy(familysave, gpptr(dd)->family, 201);
-	strncpy(gpptr(dd)->family, "Her ", 201);
-	gpptr(dd)->family[3] = (char) INTEGER(vfont)[0];
+	strncpy(gpptr(dd)->family, "Hershey ", 201);
+	gpptr(dd)->family[7] = (char) INTEGER(vfont)[0];
 	fontsave = gpptr(dd)->font;
 	gpptr(dd)->font = INTEGER(vfont)[1];
     }
diff --git a/src/library/graphics/src/stem.c b/src/library/graphics/src/stem.c
index 62b081b..6e6b7f3 100644
--- a/src/library/graphics/src/stem.c
+++ b/src/library/graphics/src/stem.c
@@ -15,7 +15,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  */
 
 #ifdef HAVE_CONFIG_H
diff --git a/src/library/grid/DESCRIPTION.in b/src/library/grid/DESCRIPTION.in
index 26affe4..0590dec 100644
--- a/src/library/grid/DESCRIPTION.in
+++ b/src/library/grid/DESCRIPTION.in
@@ -5,7 +5,8 @@ Title: The Grid Graphics Package
 Author: Paul Murrell <paul at stat.auckland.ac.nz>
 Maintainer: R Core Team <R-core at r-project.org>
 Description: A rewrite of the graphics layout capabilities, plus some
-  support for interaction
-Imports: grDevices
+  support for interaction.
+Imports: grDevices, utils
 Suggests: lattice
 License: Part of R @VERSION@
+NeedsCompilation: yes
diff --git a/src/library/grid/NAMESPACE b/src/library/grid/NAMESPACE
index c11361e..434650b 100644
--- a/src/library/grid/NAMESPACE
+++ b/src/library/grid/NAMESPACE
@@ -1,6 +1,7 @@
-useDynLib("grid", .registration = TRUE)
+useDynLib("grid", .registration = TRUE, .fixes = "C_")
 
 import(grDevices)
+importFrom(utils, str)
 
 export(
        "arcCurvature", "arrow",
@@ -20,7 +21,7 @@ export(
        "gpar", "get.gpar",
        "grid.collection",
        "grid.copy", "grid.display.list", "grid.draw",
-       "grid.record", "grid.delay", "grid.DLapply", 
+       "grid.record", "grid.delay", "grid.DLapply",
        "grid.grill",
        "grid.layout", "grid.locator",
        "grid.newpage",
@@ -68,7 +69,7 @@ export(
        "getGrob", "setGrob", "addGrob", "removeGrob", "editGrob", "forceGrob",
        "gEdit", "gEditList", "applyEdit", "applyEdits",
        "grid.grab", "grid.grabExpr",
-       "grid.force", "grid.revert", 
+       "grid.force", "grid.revert",
        "grid.reorder", "reorderGrob",
        "grid.cap",
        "setChildren",
@@ -131,6 +132,7 @@ S3method("[", "unit")
 S3method("[", "unit.arithmetic")
 S3method("[", "unit.list")
 S3method("[", "vpPath")
+S3method("[<-", "unit")
 S3method("Ops", "unit")
 S3method("Summary", "unit")
 S3method("as.character", "grob")
@@ -143,6 +145,9 @@ S3method("as.character", "viewport")
 S3method("as.character", "vpList")
 S3method("as.character", "vpStack")
 S3method("as.character", "vpTree")
+S3method("format", "unit")
+S3method("format", "unit.arithmetic")
+S3method("format", "unit.list")
 S3method("print", "grob")
 S3method("print", "gList")
 S3method("print", "unit")
@@ -333,6 +338,10 @@ S3method("forceGrob", "default")
 S3method("forceGrob", "grob")
 S3method("forceGrob", "gTree")
 
+S3method("absolute.units", "unit")
+S3method("absolute.units", "unit.list")
+S3method("absolute.units", "unit.arithmetic")
+
 # S3 methods for internal generics that are used in calls to external fns
 S3method("depth", "viewport")
 S3method("depth", "vpList")
diff --git a/src/library/grid/R/components.R b/src/library/grid/R/components.R
index 2108ccc..a5ca8b2 100644
--- a/src/library/grid/R/components.R
+++ b/src/library/grid/R/components.R
@@ -1,5 +1,5 @@
 #  File src/library/grid/R/components.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
 #  Copyright (C) 1995-2013 The R Core Team
 #
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 grid.collection <- function(..., gp=gpar(), draw=TRUE, vp=NULL) {
     .Defunct("gTree")
diff --git a/src/library/grid/R/curve.R b/src/library/grid/R/curve.R
index 2cb720c..9e52565 100644
--- a/src/library/grid/R/curve.R
+++ b/src/library/grid/R/curve.R
@@ -1,5 +1,5 @@
 #  File src/library/grid/R/curve.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
 #  Copyright (C) 1995-2012 The R Core Team
 #
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 
 ###############################
@@ -80,12 +80,9 @@ interleave <- function(ncp, ncurve, val, sval, eval, e) {
 calcSquareControlPoints <- function(x1, y1, x2, y2,
                                     curvature, angle, ncp,
                                     debug=FALSE) {
-    xm <- (x1 + x2)/2
-    ym <- (y1 + y2)/2
     dx <- x2 - x1
     dy <- y2 - y1
     slope <- dy/dx
-    oslope <- -1/slope
 
     # FIXME:  There MUST be a more compact way of calculating the
     # new end point!
@@ -95,23 +92,15 @@ calcSquareControlPoints <- function(x1, y1, x2, y2,
         end <- !end
     startx <- ifelse(end,
                      x1,
-                     ifelse(abs(slope) > 1,
-                            newx <- x2 - dx,
-                            newx <- x2 - sign(slope)*dy))
+                     ifelse(abs(slope) > 1, x2 - dx, x2 - sign(slope)*dy))
     starty <- ifelse(end,
                      y1,
-                     ifelse(abs(slope) > 1,
-                            newy <- y2 - sign(slope)*dx,
-                            newy <- y2 - dy))
+                     ifelse(abs(slope) > 1, y2 - sign(slope)*dx, y2 - dy))
     endx <- ifelse(end,
-                   ifelse(abs(slope) > 1,
-                          newx <- x1 + dx,
-                          newx <- x1 + sign(slope)*dy),
+                   ifelse(abs(slope) > 1, x1 + dx, x1 + sign(slope)*dy),
                    x2)
     endy <- ifelse(end,
-                   ifelse(abs(slope) > 1,
-                          newy <- y1 + sign(slope)*dx,
-                          newy <- y1 + dy),
+                   ifelse(abs(slope) > 1, y1 + sign(slope)*dx, y1 + dy),
                    y2)
 
     cps <- calcControlPoints(startx, starty, endx, endy,
@@ -138,7 +127,6 @@ calcControlPoints <- function(x1, y1, x2, y2, curvature, angle, ncp,
     dx <- x2 - x1
     dy <- y2 - y1
     slope <- dy/dx
-    oslope <- -1/slope
 
     # Calculate "corner" of region to produce control points in
     # (depends on 'angle', which MUST lie between 0 and 180)
diff --git a/src/library/grid/R/debug.R b/src/library/grid/R/debug.R
index 8605c10..dda7bdb 100644
--- a/src/library/grid/R/debug.R
+++ b/src/library/grid/R/debug.R
@@ -1,7 +1,7 @@
 #  File src/library/grid/R/debug.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
-#  Copyright (C) 1995-2013 The R Core Team
+#  Copyright (C) 1995-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
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 ### Label grobs in a scene
 
@@ -124,7 +124,7 @@ showGrob <- function(x=NULL,
         # To remove labels use grid.redraw()
         if (is.null(gPath)) {
             # Show the current scene
-            dl <- grid.Call(L_getDisplayList)[1L:grid:::grid.Call(L_getDLindex)]
+            dl <- grid.Call(C_getDisplayList)[1L : grid.Call(C_getDLindex)]
             grid.newpage(recording=FALSE)
             # -1 because first element on DL is ROOT viewport
             lapply(dl[-1],
diff --git a/src/library/grid/R/edit.R b/src/library/grid/R/edit.R
index da606ea..46d1ea6 100644
--- a/src/library/grid/R/edit.R
+++ b/src/library/grid/R/edit.R
@@ -1,5 +1,5 @@
 #  File src/library/grid/R/edit.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
 #  Copyright (C) 1995-2012 The R Core Team
 #
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 # All args just used as args to editGrob
 gEdit <- function(...) {
diff --git a/src/library/grid/R/frames.R b/src/library/grid/R/frames.R
index 79d2e99..197a8e7 100644
--- a/src/library/grid/R/frames.R
+++ b/src/library/grid/R/frames.R
@@ -1,5 +1,5 @@
 #  File src/library/grid/R/frames.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
 #  Copyright (C) 1995-2013 The R Core Team
 #
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 ################
 # frame class
diff --git a/src/library/grid/R/function.R b/src/library/grid/R/function.R
index e2129e7..59fb4f4 100644
--- a/src/library/grid/R/function.R
+++ b/src/library/grid/R/function.R
@@ -1,5 +1,5 @@
 #  File src/library/grid/R/function.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
 #  Copyright (C) 1995-2012 The R Core Team
 #
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 
 validDetails.functiongrob <- function(x, ...) {
diff --git a/src/library/grid/R/gpar.R b/src/library/grid/R/gpar.R
index e669f93..1eb6626 100644
--- a/src/library/grid/R/gpar.R
+++ b/src/library/grid/R/gpar.R
@@ -1,7 +1,7 @@
 #  File src/library/grid/R/gpar.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
-#  Copyright (C) 1995-2012 The R Core Team
+#  Copyright (C) 1995-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
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 
 # A "gpar" object is a list of graphics parameters
@@ -53,10 +53,27 @@ validGP <- function(gpars) {
       }
     }
   }
+  checkNA <- function(gparname) {
+      if (!is.na(match(gparname, names(gpars)))) {
+          if (any(is.na(gpars[[gparname]]))) {
+              # ALL NA gets removed (ignored)
+              if (all(is.na(gpars[[gparname]]))) {
+                  gpars[[gparname]] <<- NULL
+              } else {
+                  stop(gettextf("mixture of missing and non-missing values for %s",
+                                gparname),
+                       domain=NA)
+              }
+          }
+      }
+  }
   # fontsize, lineheight, cex, lwd should be numeric and not NULL
   numnotnull("fontsize")
+  checkNA("fontsize")
   numnotnull("lineheight")
+  checkNA("lineheight")
   numnotnull("cex")
+  checkNA("cex")
   numnotnull("lwd")
   numnotnull("lex")
   # gamma defunct in 2.7.0
@@ -126,6 +143,7 @@ validGP <- function(gpars) {
     else {
       check.length("fontfamily")
       gpars$fontfamily <- as.character(gpars$fontfamily)
+      checkNA("fontfamily")
     }
   }
   # fontface can be character or integer;  map character to integer
@@ -183,7 +201,7 @@ validGP <- function(gpars) {
 set.gpar <- function(gp) {
   if (!is.gpar(gp))
     stop("argument must be a 'gpar' object")
-  temp <- grid.Call(L_getGPar)
+  temp <- grid.Call(C_getGPar)
   # gamma defunct in 2.7.0
   if ("gamma" %in% names(gp)) {
       warning("'gamma' 'gpar' element is defunct")
@@ -210,12 +228,12 @@ set.gpar <- function(gp) {
   temp$alpha <- tempalpha
   temp$lex <- templex
   # Do this as a .Call.graphics to get it onto the base display list
-  grid.Call.graphics(L_setGPar, temp)
+  grid.Call.graphics(C_setGPar, temp)
 }
 
 get.gpar <- function(names=NULL) {
   if (is.null(names)) {
-    result <- grid.Call(L_getGPar)
+    result <- grid.Call(C_getGPar)
     # drop gamma
     result$gamma <- NULL
   } else {
@@ -227,7 +245,7 @@ get.gpar <- function(names=NULL) {
       warning("'gamma' 'gpar' element is defunct")
       names <- names[-match("gamma", names)]
     }
-    result <- unclass(grid.Call(L_getGPar))[names]
+    result <- unclass(grid.Call(C_getGPar))[names]
   }
   class(result) <- "gpar"
   result
diff --git a/src/library/grid/R/grab.R b/src/library/grid/R/grab.R
index d75b09b..bc8d4b6 100644
--- a/src/library/grid/R/grab.R
+++ b/src/library/grid/R/grab.R
@@ -1,7 +1,7 @@
 #  File src/library/grid/R/grab.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
-#  Copyright (C) 1995-2012 The R Core Team
+#  Copyright (C) 1995-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
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 #########
 # Generate a gTree from the current display list
@@ -28,15 +28,15 @@ rootVP <- function(pvp) {
 
 # List the children of the current vp (as a vpList)
 current.vpList <- function() {
-  cpvp <- grid.Call(L_currentViewport)
-  if (length(ls(cpvp$children, all.names=TRUE)) == 0)
+  cpvp <- grid.Call(C_currentViewport)
+  if (no.children(cpvp$children))
     NULL
   else
     vpListFromNode(cpvp)
 }
 
 current.vpNames <- function() {
-  ls(grid.Call(L_currentViewport)$children)
+  ls(grid.Call(C_currentViewport)$children)
 }
 
 # vp might be a viewport, or a vpList, or a vpStack, or a vpTree
@@ -45,7 +45,7 @@ vpExists <- function(vp) {
 }
 
 vpExists.viewport <- function(vp) {
-  vp$name %in% ls(.Call(L_currentViewport)$children)
+  exists(vp$name, .Call(C_currentViewport)$children)
 }
 
 vpExists.vpStack <- function(vp) {
@@ -53,7 +53,7 @@ vpExists.vpStack <- function(vp) {
 }
 
 vpExists.vpList <- function(vp) {
-  any(sapply(vp, vpExists, simplify=TRUE))
+  any(vapply(vp, vpExists, logical(1L), simplify=TRUE))
 }
 
 vpExists.vpTree <- function(vp) {
@@ -107,7 +107,7 @@ wrap.vpPath <- function(x) {
 #   in a gTree
 grabDL <- function(warn, wrap, ...) {
   gList <- NULL
-  dl.index <- grid.Call(L_getDLindex)
+  dl.index <- grid.Call(C_getDLindex)
   if (dl.index > 1) {
     if (warn > 0) {
       names <- getNames()
@@ -122,7 +122,7 @@ grabDL <- function(warn, wrap, ...) {
       # dispatching to a function call per element because
       # we need to work with whole DL at times, not
       # just individual elements
-      elt <- grid.Call(L_getDLelt, as.integer(i - 1))
+      elt <- grid.Call(C_getDLelt, as.integer(i - 1))
       if (wrap)
         gList <- addToGList(wrap(elt), gList)
       else {
@@ -228,7 +228,7 @@ grid.grabExpr <- function(expr, warn=2, wrap=FALSE, ...) {
 
 grid.cap <- function() {
     # This does not need recording on the display list
-    grid.Call(L_cap)
+    grid.Call(C_cap)
 }
 
 
diff --git a/src/library/grid/R/grid.R b/src/library/grid/R/grid.R
index d26a679..523b369 100644
--- a/src/library/grid/R/grid.R
+++ b/src/library/grid/R/grid.R
@@ -1,7 +1,7 @@
 #  File src/library/grid/R/grid.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
-#  Copyright (C) 1995-2013 The R Core Team
+#  Copyright (C) 1995-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
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 
 # FIXME:  all grid functions should check that .grid.started is TRUE
@@ -38,18 +38,18 @@ push.vp.viewport <- function(vp, recording) {
   # being pushed from within a gTree which has enforced gpar
   # settings (i.e., the gTree$gp is enforced between this viewport
   # and the this viewport's parent$gp)
-  vp$parentgpar <- grid.Call(L_getGPar)
+  vp$parentgpar <- grid.Call(C_getGPar)
   # Enforce gpar settings
   set.gpar(vp$gp)
   # Store the entire set of gpar settings for this viewport
-  vp$gpar <- grid.Call(L_getGPar)
+  vp$gpar <- grid.Call(C_getGPar)
   # Pass in the pushedvp structure which will be used to store
   # things like the viewport transformation, parent-child links, ...
   # In C code, a pushedvp object is created, with a call to pushedvp(),
   # for the system to keep track of
   # (it happens in C code so that a "normal" vp gets recorded on the
   #  display list rather than a "pushedvp")
-  grid.Call.graphics(L_setviewport, vp, TRUE)
+  grid.Call.graphics(C_setviewport, vp, TRUE)
 }
 
 # For all but the last viewport, push the
@@ -105,7 +105,7 @@ pushViewport <- function(..., recording=TRUE) {
 
 # Helper functions called from C
 no.children <- function(children) {
-  length(ls(children, all.names=TRUE)) == 0
+  length(names(children)) == 0
 }
 
 child.exists <- function(name, children) {
@@ -113,7 +113,7 @@ child.exists <- function(name, children) {
 }
 
 child.list <- function(children) {
-  ls(children, all.names=TRUE)
+  ls(children, all.names=TRUE) # sorted (needed ?)
 }
 
 pathMatch <- function(path, pathsofar, strict) {
@@ -160,19 +160,19 @@ buildPath <- function(desc, anc, depth) {
 }
 
 downViewport.vpPath <- function(name, strict=FALSE, recording=TRUE) {
-    start <- grid.Call(L_currentViewport)
+    start <- grid.Call(C_currentViewport)
     if (name$n == 1)
-        result <- grid.Call.graphics(L_downviewport, name$name, strict)
+        result <- grid.Call.graphics(C_downviewport, name$name, strict)
     else
-        result <- grid.Call.graphics(L_downvppath,
+        result <- grid.Call.graphics(C_downvppath,
                                      name$path, name$name, strict)
     # If the downViewport() fails, there is an error in C code
     # so none of the following code will be run
 
     # Enforce the gpar settings for the viewport
-    pvp <- grid.Call(L_currentViewport)
+    pvp <- grid.Call(C_currentViewport)
     # Do not call set.gpar because set.gpar accumulates cex
-    grid.Call.graphics(L_setGPar, pvp$gpar)
+    grid.Call.graphics(C_setGPar, pvp$gpar)
     # Record the viewport operation
     # ... including the depth navigated down
     if (recording) {
@@ -195,7 +195,7 @@ seekViewport <- function(name, recording=TRUE) {
 
 # Depth of the current viewport
 vpDepth <- function() {
-  pvp <- grid.Call(L_currentViewport)
+  pvp <- grid.Call(C_currentViewport)
   count <- 0
   while (!is.null(pvp$parent)) {
     pvp <- pvp$parent
@@ -214,7 +214,7 @@ popViewport <- function(n=1, recording=TRUE) {
   if (n == 0)
     n <- vpDepth()
   if (n > 0) {
-    grid.Call.graphics(L_unsetviewport, as.integer(n))
+    grid.Call.graphics(C_unsetviewport, as.integer(n))
     # Record on the display list
     if (recording) {
       class(n) <- "pop"
@@ -236,7 +236,7 @@ upViewport <- function(n=1, recording=TRUE) {
   if (n > 0) {
     path <- current.vpPath()
     upPath <- path[(depth(path) - n + 1):depth(path)]
-    grid.Call.graphics(L_upviewport, as.integer(n))
+    grid.Call.graphics(C_upviewport, as.integer(n))
     # Record on the display list
     if (recording) {
       class(n) <- "up"
@@ -249,7 +249,7 @@ upViewport <- function(n=1, recording=TRUE) {
 # Return the full vpPath to the current viewport
 current.vpPath <- function() {
   names <- NULL
-  pvp <- grid.Call(L_currentViewport)
+  pvp <- grid.Call(C_currentViewport)
   while (!rootVP(pvp)) {
     names <- c(names, pvp$name)
     pvp <- pvp$parent
@@ -264,7 +264,7 @@ current.vpPath <- function() {
 current.viewport <- function() {
     # The system stores a pushedvp;  the user should only
     # ever see normal viewports, so convert.
-    vpFromPushedvp(grid.Call(L_currentViewport))
+    vpFromPushedvp(grid.Call(C_currentViewport))
 }
 
 # Return the parent of the current viewport
@@ -272,7 +272,7 @@ current.viewport <- function() {
 current.parent <- function(n=1) {
     if (n < 1)
         stop("Invalid number of generations")
-    vp <- grid.Call(L_currentViewport)
+    vp <- grid.Call(C_currentViewport)
     generation <- 1
     while (generation <= n) {
         if (is.null(vp))
@@ -287,20 +287,12 @@ current.parent <- function(n=1) {
 }
 
 vpListFromNode <- function(node) {
-  childnames <- ls(node$children, all.names=TRUE)
-  n <- length(childnames)
-  children <- vector("list", n)
-  index <- 1
-  for (i in childnames) {
-    children[[index]] <- vpTreeFromNode(get(i, envir=node$children))
-    index <- index + 1
-  }
-  vpListFromList(children)
+  vpListFromList(eapply(node$children, vpTreeFromNode, all.names=TRUE))
 }
 
 vpTreeFromNode <- function(node) {
   # If no children then just return viewport
-  if (length(ls(node$children, all.names=TRUE)) == 0)
+  if (no.children(node$children))
     vpFromPushedvp(node)
   # Otherwise return vpTree
   else
@@ -312,26 +304,26 @@ vpTreeFromNode <- function(node) {
 # Either from the current location in the tree down
 # or ALL of the tree
 current.vpTree <- function(all=TRUE) {
-  cpvp <- grid.Call(L_currentViewport)
+  cpvp <- grid.Call(C_currentViewport)
   moving <- all && vpDepth() > 0
   if (moving) {
-    savedname <- cpvp$name
+    savedpath <- current.vpPath()
     upViewport(0, recording=FALSE)
-    cpvp <- grid.Call(L_currentViewport)
+    cpvp <- grid.Call(C_currentViewport)
   }
   tree <- vpTreeFromNode(cpvp)
   if (moving) {
-    downViewport(savedname, recording=FALSE)
+    downViewport(savedpath, recording=FALSE)
   }
   tree
 }
 
 current.transform <- function() {
-    grid.Call(L_currentViewport)$trans
+    grid.Call(C_currentViewport)$trans
 }
 
 current.rotation <- function() {
-    grid.Call(L_currentViewport)$rotation
+    grid.Call(C_currentViewport)$rotation
 }
 
 # Call this function if you want the graphics device erased or moved
@@ -348,12 +340,12 @@ grid.newpage <- function(recording=TRUE) {
     # NOTE that we do NOT do grid.Call here because we have to do
     # things slightly differently if grid.newpage is the first grid operation
     # on a new device
-    .Call(L_newpagerecording)
-    .Call(L_newpage)
-    .Call(L_initGPar)
-    .Call(L_initViewportStack)
+    .Call(C_newpagerecording)
+    .Call(C_newpage)
+    .Call(C_initGPar)
+    .Call(C_initViewportStack)
     if (recording) {
-        .Call(L_initDisplayList)
+        .Call(C_initDisplayList)
         grDevices:::recordPalette()
         for (fun in getHook("grid.newpage"))  {
             if(is.character(fun)) fun <- get(fun)
@@ -371,8 +363,8 @@ grid.newpage <- function(recording=TRUE) {
 # that we can redraw upon edit.
 
 inc.display.list <- function() {
-  display.list <- grid.Call(L_getDisplayList)
-  dl.index <- grid.Call(L_getDLindex)
+  display.list <- grid.Call(C_getDisplayList)
+  dl.index <- grid.Call(C_getDLindex)
   dl.index <- dl.index + 1
   n <- length(display.list)
   # The " - 1" below is because dl.index is now stored internally
@@ -383,25 +375,25 @@ inc.display.list <- function() {
     display.list <- vector("list", n + 100L)
     display.list[1L:n] <- temp
   }
-  grid.Call(L_setDisplayList, display.list)
-  grid.Call(L_setDLindex, as.integer(dl.index))
+  grid.Call(C_setDisplayList, display.list)
+  grid.Call(C_setDLindex, as.integer(dl.index))
 }
 
 # This will either ...
 #   (i) turn on AND INITIALISE the display list or ...
 #   (ii) turn off AND ERASE the display list
 grid.display.list <- function(on=TRUE) {
-  grid.Call(L_setDLon, as.logical(on))
+  grid.Call(C_setDLon, as.logical(on))
   if (on) {
-    grid.Call(L_setDisplayList, vector("list", 100L))
-    grid.Call(L_setDLindex, 0L)
+    grid.Call(C_setDisplayList, vector("list", 100L))
+    grid.Call(C_setDLindex, 0L)
   }
   else
-    grid.Call(L_setDisplayList, NULL)
+    grid.Call(C_setDisplayList, NULL)
 }
 
 record <- function(x) {
-  if (grid.Call(L_getDLon))
+  if (grid.Call(C_getDLon))
     UseMethod("record")
 }
 
@@ -410,28 +402,28 @@ record <- function(x) {
 record.default <- function(x) {
   if (!is.numeric(x))
     stop("invalid object inserted on the display list")
-  grid.Call(L_setDLelt, x)
+  grid.Call(C_setDLelt, x)
   inc.display.list()
 }
 
 record.grob <- function(x) {
-  grid.Call(L_setDLelt, x)
+  grid.Call(C_setDLelt, x)
   inc.display.list()
 }
 
 record.viewport <- function(x) {
-  grid.Call(L_setDLelt, x)
+  grid.Call(C_setDLelt, x)
   inc.display.list()
 }
 
 record.vpPath <- function(x) {
-  grid.Call(L_setDLelt, x)
+  grid.Call(C_setDLelt, x)
   inc.display.list()
 }
 
 # This controls whether grid is using the graphics engine's display list
 engine.display.list <- function(on=TRUE) {
-  grid.Call(L_setEngineDLon, as.logical(on))
+  grid.Call(C_setEngineDLon, as.logical(on))
 }
 
 # Rerun the grid DL
@@ -452,21 +444,21 @@ grid.refresh <- function() {
 grid.DLapply <- function(FUN, ...) {
     FUN <- match.fun(FUN)
     # Traverse DL and do something to each entry
-    gridDL <- grid.Call(L_getDisplayList)
-    gridDLindex <- grid.Call(L_getDLindex)
+#    gridDL <- grid.Call(C_getDisplayList)
+    gridDLindex <- grid.Call(C_getDLindex)
     newDL <- vector("list", gridDLindex)
     for (i in 1:(gridDLindex - 1)) {
-        elt <- grid.Call(L_getDLelt, i)
+        elt <- grid.Call(C_getDLelt, i)
         newElt <- FUN(elt, ...)
         if (!(is.null(newElt) || inherits(newElt, class(elt))))
             stop("invalid modification of the display list")
         newDL[[i]] <- newElt
     }
     for (i in 1:(gridDLindex - 1)) {
-        grid.Call(L_setDLindex, i)
-        grid.Call(L_setDLelt, newDL[[i]])
+        grid.Call(C_setDLindex, i)
+        grid.Call(C_setDLelt, newDL[[i]])
     }
-    grid.Call(L_setDLindex, gridDLindex)
+    grid.Call(C_setDLindex, gridDLindex)
 }
 
 # Wrapper for .Call and .Call.graphics
@@ -477,23 +469,23 @@ grid.DLapply <- function(FUN, ...) {
 # .Call.graphics unless you have a good reason and you know what
 # you are doing -- this will be a bit of overkill, but is for safety
 grid.Call <- function(fnname, ...) {
-  .Call(L_gridDirty)
+  .Call(C_gridDirty)
   .Call(dontCheck(fnname), ...)  # skip code analysis checks, keep runtime checks
 }
 
 grid.Call.graphics <- function(fnname, ...) {
   # Only record graphics operations on the graphics engine's display
   # list if the engineDLon flag is set
-  engineDLon <- grid.Call(L_getEngineDLon)
+  engineDLon <- grid.Call(C_getEngineDLon)
   if (engineDLon) {
-    # NOTE that we need a .Call.graphics("L_gridDirty") so that
-    # the the first thing on the engine display list is a dirty
+    # NOTE that we need a .Call.graphics(C_gridDirty) so that
+    # the first thing on the engine display list is a dirty
     # operation;  this is necessary in case the display list is
     # played on another device (e.g., via replayPlot() or dev.copy())
-    .Call.graphics(L_gridDirty)
+    .Call.graphics(C_gridDirty)
     result <- .Call.graphics(dontCheck(fnname), ...)
   } else {
-    .Call(L_gridDirty)
+    .Call(C_gridDirty)
     result <- .Call(dontCheck(fnname), ...)
   }
   result
diff --git a/src/library/grid/R/grob.R b/src/library/grid/R/grob.R
index e8b98d8..ef864f0 100644
--- a/src/library/grid/R/grob.R
+++ b/src/library/grid/R/grob.R
@@ -1,7 +1,7 @@
 #  File src/library/grid/R/grob.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
-#  Copyright (C) 1995-2013 The R Core Team
+#  Copyright (C) 1995-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
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 ######################################
 # Grid graphical objects
@@ -330,7 +330,7 @@ getName <- function(elt) {
 }
 
 getNames <- function() {
-  dl <- grid.Call(L_getDisplayList)[1L:grid.Call(L_getDLindex)]
+  dl <- grid.Call(C_getDisplayList)[1L:grid.Call(C_getDLindex)]
   names <- sapply(dl, getName)
   names[nzchar(names)]
 }
@@ -400,12 +400,12 @@ grid.set <- function(gPath, newGrob, strict=FALSE, grep=FALSE,
   # result$index will be non-zero if matched the gPath
   if (result$index) {
     # Get the current DL index
-    dl.index <- grid.Call(L_getDLindex)
+    dl.index <- grid.Call(C_getDLindex)
     # Destructively modify the DL elt
-    grid.Call(L_setDLindex, as.integer(result$index))
-    grid.Call(L_setDLelt, result$grob)
+    grid.Call(C_setDLindex, as.integer(result$index))
+    grid.Call(C_setDLelt, result$grob)
     # Reset the DL index
-    grid.Call(L_setDLindex, as.integer(dl.index))
+    grid.Call(C_setDLindex, as.integer(dl.index))
     if (redraw)
       draw.all()
   } else {
@@ -866,12 +866,12 @@ getGrobFromGPath.gTree <- function(grob, pathsofar, gPath, strict,
 }
 
 getDLfromGPath <- function(gPath, strict, grep, global) {
-  dl.index <- grid.Call(L_getDLindex)
+  dl.index <- grid.Call(C_getDLindex)
   result <- NULL
   index <- 1
   while (index < dl.index &&
          (is.null(result) || global)) {
-    grob <- getGrobFromGPath(grid.Call(L_getDLelt,
+    grob <- getGrobFromGPath(grid.Call(C_getDLelt,
                                        as.integer(index)),
                              NULL, gPath, strict,
                              grep, global)
@@ -1012,12 +1012,12 @@ setGrobFromGPath.gTree <- function(grob, pathsofar, gPath, newGrob,
 }
 
 setDLfromGPath <- function(gPath, newGrob, strict, grep) {
-  dl.index <- grid.Call(L_getDLindex)
+  dl.index <- grid.Call(C_getDLindex)
   index <- 1
   result <- list(index=0, grob=NULL)
   while (index < dl.index &&
          result$index == 0) {
-    result$grob <- setGrobFromGPath(grid.Call(L_getDLelt,
+    result$grob <- setGrobFromGPath(grid.Call(C_getDLelt,
                                               as.integer(index)),
                                     NULL, gPath, newGrob, strict, grep)
     if (!is.null(result$grob))
@@ -1174,22 +1174,22 @@ editGrobFromGPath.gTree <- function(grob, specs,
 }
 
 editDLfromGPath <- function(gPath, specs, strict, grep, global, redraw) {
-  dl.index <- grid.Call(L_getDLindex)
+  dl.index <- grid.Call(C_getDLindex)
   index <- 1
   grob <- NULL
   found <- FALSE
   while (index < dl.index &&
          (is.null(grob) || global)) {
-    grob <- editGrobFromGPath(grid.Call(L_getDLelt,
+    grob <- editGrobFromGPath(grid.Call(C_getDLelt,
                                         as.integer(index)),
                               specs,
                               NULL, gPath, strict, grep, global)
     if (!is.null(grob)) {
       # Destructively modify the DL elt
-      grid.Call(L_setDLindex, as.integer(index))
-      grid.Call(L_setDLelt, grob)
+      grid.Call(C_setDLindex, as.integer(index))
+      grid.Call(C_setDLelt, grob)
       # Reset the DL index
-      grid.Call(L_setDLindex, as.integer(dl.index))
+      grid.Call(C_setDLindex, as.integer(dl.index))
       found <- TRUE
     }
     index <- index + 1
@@ -1338,22 +1338,22 @@ addGrobFromGPath.gTree <- function(grob, child,
 }
 
 addDLfromGPath <- function(gPath, child, strict, grep, global, redraw) {
-  dl.index <- grid.Call(L_getDLindex)
+  dl.index <- grid.Call(C_getDLindex)
   index <- 1
   grob <- NULL
   found <- FALSE
   while (index < dl.index &&
          (is.null(grob) || global)) {
-    grob <- addGrobFromGPath(grid.Call(L_getDLelt,
+    grob <- addGrobFromGPath(grid.Call(C_getDLelt,
                                        as.integer(index)),
                              child,
                              NULL, gPath, strict, grep, global)
     if (!is.null(grob)) {
       # Destructively modify the DL elt
-      grid.Call(L_setDLindex, as.integer(index))
-      grid.Call(L_setDLelt, grob)
+      grid.Call(C_setDLindex, as.integer(index))
+      grid.Call(C_setDLelt, grob)
       # Reset the DL index
-      grid.Call(L_setDLindex, as.integer(dl.index))
+      grid.Call(C_setDLindex, as.integer(dl.index))
       found <- TRUE
     }
     index <- index + 1
@@ -1514,22 +1514,22 @@ removeGrobFromGPath.gTree <- function(grob, name,
 
 removeDLFromGPath <- function(gPath, name, strict, grep, grepname, global,
                               warn, redraw) {
-  dl.index <- grid.Call(L_getDLindex)
+  dl.index <- grid.Call(C_getDLindex)
   index <- 1
   grob <- NULL
   found <- FALSE
   while (index < dl.index &&
          (is.null(grob) || global)) {
-    grob <- removeGrobFromGPath(grid.Call(L_getDLelt, as.integer(index)),
+    grob <- removeGrobFromGPath(grid.Call(C_getDLelt, as.integer(index)),
                                 name,
                                 NULL, gPath, strict, grep, grepname,
                                 global, warn)
     if (!is.null(grob)) {
       # Destructively modify the DL elt
-      grid.Call(L_setDLindex, as.integer(index))
-      grid.Call(L_setDLelt, grob)
+      grid.Call(C_setDLindex, as.integer(index))
+      grid.Call(C_setDLelt, grob)
       # Reset the DL index
-      grid.Call(L_setDLindex, as.integer(dl.index))
+      grid.Call(C_setDLindex, as.integer(dl.index))
       found <- TRUE
     }
     index <- index + 1
@@ -1594,21 +1594,21 @@ removeName <- function(gTree, name, strict, grep, global, warn) {
 }
 
 removeNameFromDL <- function(name, strict, grep, global, warn, redraw) {
-  dl.index <- grid.Call(L_getDLindex)
+  dl.index <- grid.Call(C_getDLindex)
   index <- 1
   grob <- NULL
   found <- FALSE
   while (index < dl.index &&
          (is.null(grob) || global)) {
-    grob <- grid.Call(L_getDLelt, as.integer(index))
+    grob <- grid.Call(C_getDLelt, as.integer(index))
     if (inherits(grob, "grob")) {
       # If match top-level grob, remove it from DL
       if (nameMatch(name, grob$name, grep)) {
         # Destructively modify the DL elt
-        grid.Call(L_setDLindex, as.integer(index))
-        grid.Call(L_setDLelt, NULL)
+        grid.Call(C_setDLindex, as.integer(index))
+        grid.Call(C_setDLelt, NULL)
         # Reset the DL index
-        grid.Call(L_setDLindex, as.integer(dl.index))
+        grid.Call(C_setDLindex, as.integer(dl.index))
         found <- TRUE
       # Otherwise search down it for match
       } else {
@@ -1616,10 +1616,10 @@ removeNameFromDL <- function(name, strict, grep, global, warn, redraw) {
           grob <- removeGrobFromName(grob, name, grep, global, warn)
           if (!is.null(grob)) {
             # Destructively modify the DL elt
-            grid.Call(L_setDLindex, as.integer(index))
-            grid.Call(L_setDLelt, grob)
+            grid.Call(C_setDLindex, as.integer(index))
+            grid.Call(C_setDLelt, grob)
             # Reset the DL index
-            grid.Call(L_setDLindex, as.integer(dl.index))
+            grid.Call(C_setDLindex, as.integer(dl.index))
             found <- TRUE
           }
         }
@@ -1655,11 +1655,11 @@ findgrob.grob <- function(x, name) {
 }
 
 findGrobinDL <- function(name) {
-  dl.index <- grid.Call(L_getDLindex)
+  dl.index <- grid.Call(C_getDLindex)
   result <- NULL
   index <- 1
   while (index < dl.index && is.null(result)) {
-    result <- findgrob(grid.Call(L_getDLelt, as.integer(index)), name)
+    result <- findgrob(grid.Call(C_getDLelt, as.integer(index)), name)
     index <- index + 1
   }
   if (is.null(result))
@@ -1694,13 +1694,9 @@ findGrobinChildren <- function(name, children) {
 #   temp <- function() { grid.lines(); grid.rect() }
 #   temp()
 grid.draw <- function(x, recording=TRUE) {
-  UseMethod("grid.draw")
-}
-
-grid.draw.default <- function(x, recording) {
-  # Allow for "holes" in the DL if a grob has been removed
-  if (!is.null(x))
-    stop("invalid element in the display list")
+    # If 'x' is NULL, draw nothing
+    if (!is.null(x))
+        UseMethod("grid.draw")
 }
 
 grid.draw.viewport <- function(x, recording) {
@@ -1789,19 +1785,19 @@ preDraw.gTree <- function(x) {
     # Make this gTree the "current grob" for evaluation of
     # grobwidth/height units via gPath
     # Do this as a .Call.graphics to get it onto the base display list
-    grid.Call.graphics(L_setCurrentGrob, x)
+    grid.Call.graphics(C_setCurrentGrob, x)
     # automatically push/pop the viewport
     pushvpgp(x)
     # Push then "up" childrenvp
     if (!is.null(x$childrenvp)) {
         # Save any x$gp gpar settings
-        tempgp <- grid.Call(L_getGPar)
+        tempgp <- grid.Call(C_getGPar)
         pushViewport(x$childrenvp, recording=FALSE)
         upViewport(depth(x$childrenvp), recording=FALSE)
         # reset the x$gp gpar settings
         # The upViewport above may have overwritten them with
         # the previous vp$gp settings
-        grid.Call.graphics(L_setGPar, tempgp)
+        grid.Call.graphics(C_setGPar, tempgp)
     }
     preDrawDetails(x)
     x
@@ -1820,19 +1816,19 @@ postDraw.grob <- function(x) {
 drawGrob <- function(x) {
     # Temporarily turn off the grid DL so that
     # nested calls to drawing code do not get recorded
-    dlon <- grid.Call(L_setDLon, FALSE)
+    dlon <- grid.Call(C_setDLon, FALSE)
     # If get error or user-interrupt, need to reset state
     # Need to turn grid DL back on (if it was on)
-    on.exit(grid.Call(L_setDLon, dlon))
+    on.exit(grid.Call(C_setDLon, dlon))
     # Save current gpar
-    tempgpar <- grid.Call(L_getGPar)
+    tempgpar <- grid.Call(C_getGPar)
     # If get error or user-interrupt, need to reset state
     # Need to restore current grob (gtree predraw sets current grob)
     # Need to restore gpar settings (set by gtree itself and/or its vp)
     # This does not need to be a grid.Call.graphics() because
     # we are nested within a recordGraphics()
     # Do not call set.gpar because set.gpar accumulates cex
-    on.exit(grid.Call(L_setGPar, tempgpar), add=TRUE)
+    on.exit(grid.Call(C_setGPar, tempgpar), add=TRUE)
     # Setting up the drawing context may involve modifying the grob
     # (typically only x$vp) but the modified grob is needed for postDraw()
     x <- preDraw(x)
@@ -1846,7 +1842,7 @@ drawGrob <- function(x) {
 }
 
 grid.draw.grob <- function(x, recording=TRUE) {
-    engineDLon <- grid.Call(L_getEngineDLon)
+    engineDLon <- grid.Call(C_getEngineDLon)
     if (engineDLon)
         recordGraphics(drawGrob(x),
                        list(x=x),
@@ -1869,7 +1865,7 @@ drawGList <- function(x) {
 }
 
 grid.draw.gList <- function(x, recording=TRUE) {
-    engineDLon <- grid.Call(L_getEngineDLon)
+    engineDLon <- grid.Call(C_getEngineDLon)
     if (engineDLon)
         recordGraphics(drawGList(x),
                        list(x=x),
@@ -1882,21 +1878,21 @@ grid.draw.gList <- function(x, recording=TRUE) {
 drawGTree <- function(x) {
     # Temporarily turn off the grid DL so that
     # nested calls to drawing code do not get recorded
-    dlon <- grid.Call(L_setDLon, FALSE)
+    dlon <- grid.Call(C_setDLon, FALSE)
     # If get error or user-interrupt, need to reset state
     # Need to turn grid DL back on (if it was on)
-    on.exit(grid.Call(L_setDLon, dlon))
+    on.exit(grid.Call(C_setDLon, dlon))
     # Save current grob and current gpar
-    tempgrob <- grid.Call(L_getCurrentGrob)
-    tempgpar <- grid.Call(L_getGPar)
+    tempgrob <- grid.Call(C_getCurrentGrob)
+    tempgpar <- grid.Call(C_getGPar)
     # If get error or user-interrupt, need to reset state
     # Need to restore current grob (gtree predraw sets current grob)
     # Need to restore gpar settings (set by gtree itself and/or its vp)
     # This does not need to be a grid.Call.graphics() because
     # we are nested within a recordGraphics()
     # Do not call set.gpar because set.gpar accumulates cex
-    on.exit({ grid.Call(L_setGPar, tempgpar)
-              grid.Call(L_setCurrentGrob, tempgrob)
+    on.exit({ grid.Call(C_setGPar, tempgpar)
+              grid.Call(C_setCurrentGrob, tempgrob)
             }, add=TRUE)
     # Setting up the drawing context may involve modifying the grob
     # (typically only x$vp) but the modified grob is needed for postDraw()
@@ -1912,7 +1908,7 @@ drawGTree <- function(x) {
 }
 
 grid.draw.gTree <- function(x, recording=TRUE) {
-    engineDLon <- grid.Call(L_getEngineDLon)
+    engineDLon <- grid.Call(C_getEngineDLon)
     if (engineDLon)
         recordGraphics(drawGTree(x),
                        list(x=x),
@@ -1926,11 +1922,11 @@ grid.draw.gTree <- function(x, recording=TRUE) {
 
 draw.all <- function() {
     grid.newpage(recording=FALSE)
-    dl.index <- grid.Call(L_getDLindex)
+    dl.index <- grid.Call(C_getDLindex)
     if (dl.index > 1)
         # Start at 2 because first element is viewport[ROOT]
         for (i in 2:dl.index) {
-            grid.draw(grid.Call(L_getDLelt, as.integer(i - 1)),
+            grid.draw(grid.Call(C_getDLelt, as.integer(i - 1)),
                       recording=FALSE)
         }
 }
@@ -1987,10 +1983,10 @@ forceGrob.grob <- function(x) {
     # Copy of the original object to allow a "revert"
     originalX <- x
     # Same set up as drawGrob()
-    dlon <- grid.Call(L_setDLon, FALSE)
-    on.exit(grid.Call(L_setDLon, dlon))
-    tempgpar <- grid.Call(L_getGPar)
-    on.exit(grid.Call(L_setGPar, tempgpar), add=TRUE)
+    dlon <- grid.Call(C_setDLon, FALSE)
+    on.exit(grid.Call(C_setDLon, dlon))
+    tempgpar <- grid.Call(C_getGPar)
+    on.exit(grid.Call(C_setGPar, tempgpar), add=TRUE)
     # Same drawing context set up as drawGrob()
     # including enforcing the drawing context
     x <- preDraw(x)
@@ -2023,12 +2019,12 @@ forceGrob.gTree <- function(x) {
     # Copy of the original object to allow a "revert"
     originalX <- x
     # Same set up as drawGTree()
-    dlon <- grid.Call(L_setDLon, FALSE)
-    on.exit(grid.Call(L_setDLon, dlon))
-    tempgrob <- grid.Call(L_getCurrentGrob)
-    tempgpar <- grid.Call(L_getGPar)
-    on.exit({ grid.Call(L_setGPar, tempgpar)
-              grid.Call(L_setCurrentGrob, tempgrob)
+    dlon <- grid.Call(C_setDLon, FALSE)
+    on.exit(grid.Call(C_setDLon, dlon))
+    tempgrob <- grid.Call(C_getCurrentGrob)
+    tempgpar <- grid.Call(C_getGPar)
+    on.exit({ grid.Call(C_setGPar, tempgpar)
+              grid.Call(C_setCurrentGrob, tempgrob)
             }, add=TRUE)
     # Same drawing context set up as drawGTree(),
     # including enforcing the drawing context
@@ -2071,15 +2067,15 @@ grid.force.default <- function(x, redraw = FALSE, ...) {
     # Must upViewport(0) otherwise you risk running the display
     # list from something other than the ROOT viewport
     oldcontext <- upViewport(0, recording=FALSE)
-    dl.index <- grid.Call(L_getDLindex)
+    dl.index <- grid.Call(C_getDLindex)
     if (dl.index > 1) {
         # Start at 2 because first element is viewport[ROOT]
         for (i in 2:dl.index) {
-            grid.Call(L_setDLindex, as.integer(i - 1))
-            grid.Call(L_setDLelt,
-                      forceGrob(grid.Call(L_getDLelt, as.integer(i - 1))))
+            grid.Call(C_setDLindex, as.integer(i - 1))
+            grid.Call(C_setDLelt,
+                      forceGrob(grid.Call(C_getDLelt, as.integer(i - 1))))
         }
-        grid.Call(L_setDLindex, dl.index)
+        grid.Call(C_setDLindex, dl.index)
     }
     if (redraw) {
         draw.all()
@@ -2165,15 +2161,15 @@ grid.revert <- function(x, ...) {
 grid.revert.default <- function(x, redraw=FALSE, ...) {
     if (!missing(x))
         stop("Invalid revert target")
-    dl.index <- grid.Call(L_getDLindex)
+    dl.index <- grid.Call(C_getDLindex)
     if (dl.index > 1) {
         # Start at 2 because first element is viewport[ROOT]
         for (i in 2:dl.index) {
-            grid.Call(L_setDLindex, as.integer(i - 1))
-            grid.Call(L_setDLelt,
-                      revert(grid.Call(L_getDLelt, as.integer(i - 1))))
+            grid.Call(C_setDLindex, as.integer(i - 1))
+            grid.Call(C_setDLelt,
+                      revert(grid.Call(C_getDLelt, as.integer(i - 1))))
         }
-        grid.Call(L_setDLindex, dl.index)
+        grid.Call(C_setDLindex, dl.index)
     }
     if (redraw) {
         draw.all()
diff --git a/src/library/grid/R/highlevel.R b/src/library/grid/R/highlevel.R
index 1db6b21..76d918d 100644
--- a/src/library/grid/R/highlevel.R
+++ b/src/library/grid/R/highlevel.R
@@ -1,5 +1,5 @@
 #  File src/library/grid/R/highlevel.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
 #  Copyright (C) 1995-2013 The R Core Team
 #
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 ######################################
 ## Example applications of grid    #
@@ -133,7 +133,7 @@ grid.show.layout <- function(l, newpage=TRUE, vp.ex=0.8,
                              bg="light grey",
                              cell.border="blue", cell.fill="light blue",
                              cell.label=TRUE, label.col="blue",
-                             unit.col="red", vp=NULL) {
+                             unit.col="red", vp=NULL, ...) {
   if (!is.layout(l))
     stop("'l' must be a layout")
   if (newpage)
@@ -154,23 +154,23 @@ grid.show.layout <- function(l, newpage=TRUE, vp.ex=0.8,
         grid.text(paste0("(", i, ", ", j, ")"), gp=gpar(col=label.col))
       if (j==1)
         # recycle heights if necessary
-        grid.text(as.character("["(l$heights, i, top=FALSE)), gp=gp.red,
+        grid.text(format("["(l$heights, i, top=FALSE), ...), gp=gp.red,
               just=c("right", "centre"),
               x=unit(-.05, "inches"), y=unit(.5, "npc"), rot=0)
       if (i==l$nrow)
         # recycle widths if necessary
-        grid.text(as.character("["(l$widths, j, top=FALSE)), gp=gp.red,
+        grid.text(format("["(l$widths, j, top=FALSE), ...), gp=gp.red,
               just=c("centre", "top"),
               x=unit(.5, "npc"), y=unit(-.05, "inches"), rot=0)
       if (j==l$ncol)
         # recycle heights if necessary
-        grid.text(as.character("["(l$heights, i, top=FALSE)), gp=gp.red,
+        grid.text(format("["(l$heights, i, top=FALSE), ...), gp=gp.red,
               just=c("left", "centre"),
               x=unit(1, "npc") + unit(.05, "inches"), y=unit(.5, "npc"),
               rot=0)
       if (i==1)
         # recycle widths if necessary
-        grid.text(as.character("["(l$widths, j, top=FALSE)), gp=gp.red,
+        grid.text(format("["(l$widths, j, top=FALSE), ...), gp=gp.red,
               just=c("centre", "bottom"),
               x=unit(.5, "npc"), y=unit(1, "npc") + unit(.05, "inches"),
               rot=0)
diff --git a/src/library/grid/R/interactive.R b/src/library/grid/R/interactive.R
index e5feaaf..66eb1ef 100644
--- a/src/library/grid/R/interactive.R
+++ b/src/library/grid/R/interactive.R
@@ -1,5 +1,5 @@
 #  File src/library/grid/R/interactive.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
 #  Copyright (C) 1995-2012 The R Core Team
 #
@@ -14,11 +14,11 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 
 grid.locator <- function(unit="native") {
-  location <- c(grid.Call(L_locator), 1)
+  location <- c(grid.Call(C_locator), 1)
   if (is.na(location[1L]))
     invisible(NULL)
   else {
diff --git a/src/library/grid/R/just.R b/src/library/grid/R/just.R
index 5967bd2..681efae 100644
--- a/src/library/grid/R/just.R
+++ b/src/library/grid/R/just.R
@@ -1,5 +1,5 @@
 #  File src/library/grid/R/just.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
 #  Copyright (C) 1995-2013 The R Core Team
 #
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 # NOTE: the order of the strings in these conversion functions must
 # match the order of the enums in ../src/lattice.h
diff --git a/src/library/grid/R/layout.R b/src/library/grid/R/layout.R
index 1013f33..2041fc7 100644
--- a/src/library/grid/R/layout.R
+++ b/src/library/grid/R/layout.R
@@ -1,7 +1,7 @@
 #  File src/library/grid/R/layout.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
-#  Copyright (C) 1995-2013 The R Core Team
+#  Copyright (C) 1995-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
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 
 is.layout <- function(l) {
@@ -98,7 +98,7 @@ layout.torture <- function() {
 
 # Return the region allocated by the layout of the current viewport
 layoutRegion <- function(layout.pos.row=1, layout.pos.col=1) {
-  region <- grid.Call(L_layoutRegion,
+  region <- grid.Call(C_layoutRegion,
                       # This conversion matches the vailidity check in
                       # valid.viewport()
                       if (is.null(layout.pos.row)) layout.pos.row
diff --git a/src/library/grid/R/ls.R b/src/library/grid/R/ls.R
index fc45582..72cd582 100644
--- a/src/library/grid/R/ls.R
+++ b/src/library/grid/R/ls.R
@@ -1,7 +1,7 @@
 #  File src/library/grid/R/ls.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
-#  Copyright (C) 1995-2013 The R Core Team
+#  Copyright (C) 1995-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
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 
 # Code for listing objects in various grid "namespaces"
@@ -68,12 +68,16 @@ grid.ls <- function(x=NULL, grobs=TRUE, viewports=FALSE, fullNames=FALSE,
 
 gridListDL <- function(x, grobs=TRUE, viewports=FALSE,
                        fullNames=FALSE, recursive=TRUE) {
-    display.list <- grid.Call(L_getDisplayList)
-    dl.index <- grid.Call(L_getDLindex)
-    result <- lapply(display.list[1L:dl.index], gridList,
-                     grobs=grobs, viewports=viewports,
-                     fullNames=fullNames, recursive=recursive)
-    names(result) <- NULL
+    if (is.null(dev.list())) {
+        result <- list(gridList(NULL))
+    } else {
+        display.list <- grid.Call(C_getDisplayList)
+        dl.index <- grid.Call(C_getDLindex)
+        result <- lapply(display.list[1L:dl.index], gridList,
+                         grobs=grobs, viewports=viewports,
+                         fullNames=fullNames, recursive=recursive)
+        names(result) <- NULL
+    }
     class(result) <- c("gridListListing", "gridListing")
     result
 }
@@ -709,14 +713,7 @@ pathListing <- function(x, gvpSep=" | ", gAlign=TRUE) {
     }
 
     padPrefix <- function(path, maxLen) {
-        numSpaces <- maxLen - nchar(path)
-        if (length(path) == 1L) {
-            paste0(path, paste(rep.int(" ", numSpaces), collapse=""))
-        } else {
-            padding <- rep(" ", length(path))
-            padding <- mapply(rep.int, padding, numSpaces)
-            paste0(path, sapply(padding, paste, collapse=""))
-        }
+        paste0(path, strrep(" ", maxLen - nchar(path)))
     }
 
     if (!inherits(x, "flatGridListing"))
@@ -790,7 +787,7 @@ grid.grep <- function(path, x = NULL, grobs = TRUE, viewports = FALSE,
         dl <- grid.ls(x, grobs=grobs, viewports=viewports, print = FALSE)
     }
     if (!length(dl$name))
-        stop("Nothing on the display list")
+        return(no.match)
     # Only keep vpListing and grobListing
     names <- names(dl)
     dl <- lapply(dl,
diff --git a/src/library/grid/R/origin.R b/src/library/grid/R/origin.R
index a665c88..309bdfd 100644
--- a/src/library/grid/R/origin.R
+++ b/src/library/grid/R/origin.R
@@ -1,5 +1,5 @@
 #  File src/library/grid/R/origin.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
 #  Copyright (C) 1995-2013 The R Core Team
 #
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 valid.origin <- function(origin) {
   origin <- as.integer(match(origin,
diff --git a/src/library/grid/R/primitives.R b/src/library/grid/R/primitives.R
index 813952f..4691dae 100644
--- a/src/library/grid/R/primitives.R
+++ b/src/library/grid/R/primitives.R
@@ -1,7 +1,7 @@
 #  File src/library/grid/R/primitives.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
-#  Copyright (C) 1995-2013 The R Core Team
+#  Copyright (C) 1995-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
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 
 # Function that creates a description of an arrow head
@@ -79,7 +79,7 @@ validDetails.move.to <- function(x) {
 }
 
 drawDetails.move.to <- function(x, recording=TRUE) {
-  grid.Call.graphics(L_moveTo, x$x, x$y)
+  grid.Call.graphics(C_moveTo, x$x, x$y)
 }
 
 moveToGrob <- function(x=0, y=0,
@@ -116,7 +116,7 @@ validDetails.line.to <- function(x) {
 }
 
 drawDetails.line.to <- function(x, recording=TRUE) {
-  grid.Call.graphics(L_lineTo, x$x, x$y, x$arrow)
+  grid.Call.graphics(C_lineTo, x$x, x$y, x$arrow)
 }
 
 lineToGrob <- function(x=1, y=1,
@@ -155,13 +155,13 @@ validDetails.lines <- function(x) {
 }
 
 drawDetails.lines <- function(x, recording=TRUE) {
-    grid.Call.graphics(L_lines, x$x, x$y,
+    grid.Call.graphics(C_lines, x$x, x$y,
                        list(as.integer(1L:max(length(x$x), length(x$y)))),
                        x$arrow)
 }
 
 xDetails.lines <- function(x, theta) {
-    bounds <- grid.Call(L_locnBounds, x$x, x$y, theta)
+    bounds <- grid.Call(C_locnBounds, x$x, x$y, theta)
     if (is.null(bounds))
         unit(0.5, "npc")
     else
@@ -169,7 +169,7 @@ xDetails.lines <- function(x, theta) {
 }
 
 yDetails.lines <- function(x, theta) {
-    bounds <- grid.Call(L_locnBounds, x$x, x$y, theta)
+    bounds <- grid.Call(C_locnBounds, x$x, x$y, theta)
     if (is.null(bounds))
         unit(0.5, "npc")
     else
@@ -177,7 +177,7 @@ yDetails.lines <- function(x, theta) {
 }
 
 widthDetails.lines <- function(x) {
-  bounds <- grid.Call(L_locnBounds, x$x, x$y, 0)
+  bounds <- grid.Call(C_locnBounds, x$x, x$y, 0)
   if (is.null(bounds))
     unit(0, "inches")
   else
@@ -185,7 +185,7 @@ widthDetails.lines <- function(x) {
 }
 
 heightDetails.lines <- function(x) {
-  bounds <- grid.Call(L_locnBounds, x$x, x$y, 0)
+  bounds <- grid.Call(C_locnBounds, x$x, x$y, 0)
   if (is.null(bounds))
     unit(0, "inches")
   else
@@ -248,7 +248,7 @@ validDetails.polyline <- function(x) {
 
 drawDetails.polyline <- function(x, recording=TRUE) {
     if (is.null(x$id) && is.null(x$id.lengths))
-        grid.Call.graphics(L_lines, x$x, x$y,
+        grid.Call.graphics(C_lines, x$x, x$y,
                            list(as.integer(seq_along(x$x))),
                            x$arrow)
     else {
@@ -260,12 +260,12 @@ drawDetails.polyline <- function(x, recording=TRUE) {
             id <- x$id
         }
         index <- split(as.integer(seq_along(x$x)), id)
-        grid.Call.graphics(L_lines, x$x, x$y, index, x$arrow)
+        grid.Call.graphics(C_lines, x$x, x$y, index, x$arrow)
     }
 }
 
 xDetails.polyline <- function(x, theta) {
-    bounds <- grid.Call(L_locnBounds, x$x, x$y, theta)
+    bounds <- grid.Call(C_locnBounds, x$x, x$y, theta)
     if (is.null(bounds))
         unit(0.5, "npc")
     else
@@ -273,7 +273,7 @@ xDetails.polyline <- function(x, theta) {
 }
 
 yDetails.polyline <- function(x, theta) {
-    bounds <- grid.Call(L_locnBounds, x$x, x$y, theta)
+    bounds <- grid.Call(C_locnBounds, x$x, x$y, theta)
     if (is.null(bounds))
         unit(0.5, "npc")
     else
@@ -281,7 +281,7 @@ yDetails.polyline <- function(x, theta) {
 }
 
 widthDetails.polyline <- function(x) {
-    bounds <- grid.Call(L_locnBounds, x$x, x$y, 0)
+    bounds <- grid.Call(C_locnBounds, x$x, x$y, 0)
     if (is.null(bounds))
         unit(0, "inches")
     else
@@ -289,7 +289,7 @@ widthDetails.polyline <- function(x) {
 }
 
 heightDetails.polyline <- function(x) {
-    bounds <- grid.Call(L_locnBounds, x$x, x$y, 0)
+    bounds <- grid.Call(C_locnBounds, x$x, x$y, 0)
     if (is.null(bounds))
         unit(0, "inches")
     else
@@ -328,7 +328,7 @@ validDetails.segments <- function(x) {
 }
 
 drawDetails.segments <- function(x, recording=TRUE) {
-  grid.Call.graphics(L_segments, x$x0, x$y0, x$x1, x$y1, x$arrow)
+  grid.Call.graphics(C_segments, x$x0, x$y0, x$x1, x$y1, x$arrow)
 }
 
 segmentBounds <- function(x, theta) {
@@ -338,7 +338,7 @@ segmentBounds <- function(x, theta) {
     x1 <- rep(x$x1, length.out=n)
     y0 <- rep(x$y0, length.out=n)
     y1 <- rep(x$y1, length.out=n)
-    grid.Call(L_locnBounds, unit.c(x0, x1), unit.c(y0, y1), theta)
+    grid.Call(C_locnBounds, unit.c(x0, x1), unit.c(y0, y1), theta)
 }
 
 xDetails.segments <- function(x, theta) {
@@ -485,11 +485,11 @@ drawDetails.arrows <- function(x, recording=TRUE) {
     yy <- rep(x$y, length.out=n)
     ynm1 <- yy[n - 1]
     yn <- yy[n]
-    grid.Call.graphics(L_lines, x$x, x$y,
+    grid.Call.graphics(C_lines, x$x, x$y,
                        list(as.integer(1L:n)),
                        NULL)
   }
-  grid.Call.graphics(L_arrows, x1, x2, xnm1, xn, y1, y2, ynm1, yn,
+  grid.Call.graphics(C_arrows, x1, x2, xnm1, xn, y1, y2, ynm1, yn,
                      x$angle, x$length, x$ends, x$type)
 }
 
@@ -500,7 +500,7 @@ widthDetails.arrows <- function(x) {
     lineThing <- getGrob(x, childNames(x))
     widthDetails(lineThing)
   } else {
-    bounds <- grid.Call(L_locnBounds, x$x, x$y, 0)
+    bounds <- grid.Call(C_locnBounds, x$x, x$y, 0)
     if (is.null(bounds))
       unit(0, "inches")
     else
@@ -515,7 +515,7 @@ heightDetails.arrows <- function(x) {
     lineThing <- getGrob(x, childNames(x))
     heightDetails(lineThing)
   } else {
-    bounds <- grid.Call(L_locnBounds, x$x, x$y, 0)
+    bounds <- grid.Call(C_locnBounds, x$x, x$y, 0)
     if (is.null(bounds))
       unit(0, "inches")
     else
@@ -566,7 +566,7 @@ validDetails.polygon <- function(x) {
 
 drawDetails.polygon <- function(x, recording=TRUE) {
   if (is.null(x$id) && is.null(x$id.lengths))
-    grid.Call.graphics(L_polygon, x$x, x$y,
+    grid.Call.graphics(C_polygon, x$x, x$y,
                        list(as.integer(seq_along(x$x))))
   else {
     if (is.null(x$id)) {
@@ -577,12 +577,12 @@ drawDetails.polygon <- function(x, recording=TRUE) {
       id <- x$id
     }
     index <- split(as.integer(seq_along(x$x)), id)
-    grid.Call.graphics(L_polygon, x$x, x$y, index)
+    grid.Call.graphics(C_polygon, x$x, x$y, index)
   }
 }
 
 xDetails.polygon <- function(x, theta) {
-    bounds <- grid.Call(L_locnBounds, x$x, x$y, theta)
+    bounds <- grid.Call(C_locnBounds, x$x, x$y, theta)
     if (is.null(bounds))
         unit(0.5, "npc")
     else
@@ -590,7 +590,7 @@ xDetails.polygon <- function(x, theta) {
 }
 
 yDetails.polygon <- function(x, theta) {
-    bounds <- grid.Call(L_locnBounds, x$x, x$y, theta)
+    bounds <- grid.Call(C_locnBounds, x$x, x$y, theta)
     if (is.null(bounds))
         unit(0.5, "npc")
     else
@@ -598,7 +598,7 @@ yDetails.polygon <- function(x, theta) {
 }
 
 widthDetails.polygon <- function(x) {
-  bounds <- grid.Call(L_locnBounds, x$x, x$y, 0)
+  bounds <- grid.Call(C_locnBounds, x$x, x$y, 0)
   if (is.null(bounds))
     unit(0, "inches")
   else
@@ -606,7 +606,7 @@ widthDetails.polygon <- function(x) {
 }
 
 heightDetails.polygon <- function(x) {
-  bounds <- grid.Call(L_locnBounds, x$x, x$y, 0)
+  bounds <- grid.Call(C_locnBounds, x$x, x$y, 0)
   if (is.null(bounds))
     unit(0, "inches")
   else
@@ -661,7 +661,7 @@ validDetails.pathgrob <- function(x) {
 }
 
 xDetails.pathgrob <- function(x, theta) {
-    bounds <- grid.Call(L_locnBounds, x$x, x$y, theta)
+    bounds <- grid.Call(C_locnBounds, x$x, x$y, theta)
     if (is.null(bounds))
         unit(0.5, "npc")
     else
@@ -669,7 +669,7 @@ xDetails.pathgrob <- function(x, theta) {
 }
 
 yDetails.pathgrob <- function(x, theta) {
-    bounds <- grid.Call(L_locnBounds, x$x, x$y, theta)
+    bounds <- grid.Call(C_locnBounds, x$x, x$y, theta)
     if (is.null(bounds))
         unit(0.5, "npc")
     else
@@ -677,7 +677,7 @@ yDetails.pathgrob <- function(x, theta) {
 }
 
 widthDetails.pathgrob <- function(x) {
-    bounds <- grid.Call(L_locnBounds, x$x, x$y, 0)
+    bounds <- grid.Call(C_locnBounds, x$x, x$y, 0)
     if (is.null(bounds))
         unit(0, "inches")
     else
@@ -685,7 +685,7 @@ widthDetails.pathgrob <- function(x) {
 }
 
 heightDetails.pathgrob <- function(x) {
-    bounds <- grid.Call(L_locnBounds, x$x, x$y, 0)
+    bounds <- grid.Call(C_locnBounds, x$x, x$y, 0)
     if (is.null(bounds))
         unit(0, "inches")
     else
@@ -695,7 +695,7 @@ heightDetails.pathgrob <- function(x) {
 
 drawDetails.pathgrob <- function(x, recording=TRUE) {
       if (is.null(x$id) && is.null(x$id.lengths))
-          grid.Call.graphics(L_polygon, x$x, x$y,
+          grid.Call.graphics(C_polygon, x$x, x$y,
                              list(as.integer(seq_along(x$x))))
   else {
     if (is.null(x$id)) {
@@ -706,7 +706,7 @@ drawDetails.pathgrob <- function(x, recording=TRUE) {
       id <- x$id
     }
     index <- split(as.integer(seq_along(x$x)), id)
-    grid.Call.graphics(L_path, x$x, x$y, index,
+    grid.Call.graphics(C_path, x$x, x$y, index,
                        switch(x$rule, winding=1L, evenodd=0L))
   }
 }
@@ -785,12 +785,12 @@ xsplineIndex <- function(x) {
 }
 
 drawDetails.xspline <- function(x, recording=TRUE) {
-    grid.Call.graphics(L_xspline, x$x, x$y, x$shape, x$open, x$arrow,
+    grid.Call.graphics(C_xspline, x$x, x$y, x$shape, x$open, x$arrow,
                        x$repEnds, xsplineIndex(x))
 }
 
 xDetails.xspline <- function(x, theta) {
-  bounds <- grid.Call(L_xsplineBounds, x$x, x$y, x$shape, x$open, x$arrow,
+  bounds <- grid.Call(C_xsplineBounds, x$x, x$y, x$shape, x$open, x$arrow,
                       x$repEnds, xsplineIndex(x), theta)
   if (is.null(bounds))
     unit(0.5, "npc")
@@ -799,7 +799,7 @@ xDetails.xspline <- function(x, theta) {
 }
 
 yDetails.xspline <- function(x, theta) {
-  bounds <- grid.Call(L_xsplineBounds, x$x, x$y, x$shape, x$open, x$arrow,
+  bounds <- grid.Call(C_xsplineBounds, x$x, x$y, x$shape, x$open, x$arrow,
                       x$repEnds, xsplineIndex(x), theta)
   if (is.null(bounds))
     unit(0.5, "npc")
@@ -808,7 +808,7 @@ yDetails.xspline <- function(x, theta) {
 }
 
 widthDetails.xspline <- function(x) {
-  bounds <- grid.Call(L_xsplineBounds, x$x, x$y, x$shape, x$open, x$arrow,
+  bounds <- grid.Call(C_xsplineBounds, x$x, x$y, x$shape, x$open, x$arrow,
                       x$repEnds, list(as.integer(seq_along(x$x))), 0)
   if (is.null(bounds))
     unit(0, "inches")
@@ -817,7 +817,7 @@ widthDetails.xspline <- function(x) {
 }
 
 heightDetails.xspline <- function(x) {
-  bounds <- grid.Call(L_xsplineBounds, x$x, x$y, x$shape, x$open, x$arrow,
+  bounds <- grid.Call(C_xsplineBounds, x$x, x$y, x$shape, x$open, x$arrow,
                       x$repEnds, list(as.integer(seq_along(x$x))), 0)
   if (is.null(bounds))
     unit(0, "inches")
@@ -845,13 +845,13 @@ grid.xspline <- function(...) {
 
 xsplinePoints <- function(x) {
     # Mimic drawGrob() to ensure x$vp and x$gp enforced
-    dlon <- grid.Call(L_setDLon, FALSE)
-    on.exit(grid.Call(L_setDLon, dlon))
-    tempgpar <- grid.Call(L_getGPar)
-    on.exit(grid.Call(L_setGPar, tempgpar), add=TRUE)
+    dlon <- grid.Call(C_setDLon, FALSE)
+    on.exit(grid.Call(C_setDLon, dlon))
+    tempgpar <- grid.Call(C_getGPar)
+    on.exit(grid.Call(C_setGPar, tempgpar), add=TRUE)
     preDraw(x)
     # Raw pts in dev coords
-    devPoints <- grid.Call(L_xsplinePoints,
+    devPoints <- grid.Call(C_xsplinePoints,
                            x$x, x$y, x$shape, x$open, x$arrow,
                            x$repEnds, xsplineIndex(x), 0)
     postDraw(x)
@@ -929,16 +929,17 @@ validDetails.beziergrob <- function(x) {
     if (!is.null(x$id.lengths))
         x$id.lengths <- as.integer(x$id.lengths)
     if (is.null(x$id) && is.null(x$id.lengths)) {
-        if (length(x$x) != 4)
+        if (length(x$x) != 4L)
             stop("must have exactly 4 control points")
     } else {
         if (is.null(x$id)) {
+            n <- length(x$id.lengths)
             id <- rep(1L:n, x$id.lengths)
         } else {
             id <- x$id
         }
         xper <- split(x$x, id)
-        if (any(sapply(xper, length) != 4))
+        if (any(lengths(xper) != 4L))
             stop("must have exactly 4 control points per Bezier curve")
     }
     if (!(is.null(x$arrow) || inherits(x$arrow, "arrow")))
@@ -1004,11 +1005,11 @@ validDetails.circle <- function(x) {
 }
 
 drawDetails.circle <- function(x, recording=TRUE) {
-  grid.Call.graphics(L_circle, x$x, x$y, x$r)
+  grid.Call.graphics(C_circle, x$x, x$y, x$r)
 }
 
 xDetails.circle <- function(x, theta) {
-  bounds <- grid.Call(L_circleBounds, x$x, x$y, x$r, theta)
+  bounds <- grid.Call(C_circleBounds, x$x, x$y, x$r, theta)
   if (is.null(bounds))
     unit(0.5, "npc")
   else
@@ -1016,7 +1017,7 @@ xDetails.circle <- function(x, theta) {
 }
 
 yDetails.circle <- function(x, theta) {
-  bounds <- grid.Call(L_circleBounds, x$x, x$y, x$r, theta)
+  bounds <- grid.Call(C_circleBounds, x$x, x$y, x$r, theta)
   if (is.null(bounds))
     unit(0.5, "npc")
   else
@@ -1024,7 +1025,7 @@ yDetails.circle <- function(x, theta) {
 }
 
 widthDetails.circle <- function(x) {
-  bounds <- grid.Call(L_circleBounds, x$x, x$y, x$r, 0)
+  bounds <- grid.Call(C_circleBounds, x$x, x$y, x$r, 0)
   if (is.null(bounds))
     unit(0, "inches")
   else
@@ -1032,7 +1033,7 @@ widthDetails.circle <- function(x) {
 }
 
 heightDetails.circle <- function(x) {
-  bounds <- grid.Call(L_circleBounds, x$x, x$y, x$r, 0)
+  bounds <- grid.Call(C_circleBounds, x$x, x$y, x$r, 0)
   if (is.null(bounds))
     unit(0, "inches")
   else
@@ -1080,13 +1081,13 @@ validDetails.rect <- function(x) {
 }
 
 drawDetails.rect <- function(x, recording=TRUE) {
-  grid.Call.graphics(L_rect, x$x, x$y, x$width, x$height,
+  grid.Call.graphics(C_rect, x$x, x$y, x$width, x$height,
                      resolveHJust(x$just, x$hjust),
                      resolveVJust(x$just, x$vjust))
 }
 
 xDetails.rect <- function(x, theta) {
-  bounds <- grid.Call(L_rectBounds, x$x, x$y, x$width, x$height,
+  bounds <- grid.Call(C_rectBounds, x$x, x$y, x$width, x$height,
                       resolveHJust(x$just, x$hjust),
                       resolveVJust(x$just, x$vjust),
                       theta)
@@ -1097,7 +1098,7 @@ xDetails.rect <- function(x, theta) {
 }
 
 yDetails.rect <- function(x, theta) {
-  bounds <- grid.Call(L_rectBounds, x$x, x$y, x$width, x$height,
+  bounds <- grid.Call(C_rectBounds, x$x, x$y, x$width, x$height,
                       resolveHJust(x$just, x$hjust),
                       resolveVJust(x$just, x$vjust),
                       theta)
@@ -1108,7 +1109,7 @@ yDetails.rect <- function(x, theta) {
 }
 
 widthDetails.rect <- function(x) {
-  bounds <- grid.Call(L_rectBounds, x$x, x$y, x$width, x$height,
+  bounds <- grid.Call(C_rectBounds, x$x, x$y, x$width, x$height,
                       resolveHJust(x$just, x$hjust),
                       resolveVJust(x$just, x$vjust),
                       0)
@@ -1119,7 +1120,7 @@ widthDetails.rect <- function(x) {
 }
 
 heightDetails.rect <- function(x) {
-  bounds <- grid.Call(L_rectBounds, x$x, x$y, x$width, x$height,
+  bounds <- grid.Call(C_rectBounds, x$x, x$y, x$width, x$height,
                       resolveHJust(x$just, x$hjust),
                       resolveVJust(x$just, x$vjust),
                       0)
@@ -1243,7 +1244,7 @@ drawDetails.rastergrob <- function(x, recording=TRUE) {
                              "inches")
         }
     }
-    grid.Call.graphics(L_raster, x$raster,
+    grid.Call.graphics(C_raster, x$raster,
                        x$x, x$y, x$width, x$height,
                        resolveHJust(x$just, x$hjust),
                        resolveVJust(x$just, x$vjust),
@@ -1252,7 +1253,7 @@ drawDetails.rastergrob <- function(x, recording=TRUE) {
 
 xDetails.rastergrob <- function(x, theta) {
     x <- resolveRasterSize(x)
-    bounds <- grid.Call(L_rectBounds, x$x, x$y, x$width, x$height,
+    bounds <- grid.Call(C_rectBounds, x$x, x$y, x$width, x$height,
                         resolveHJust(x$just, x$hjust),
                         resolveVJust(x$just, x$vjust),
                         theta)
@@ -1264,7 +1265,7 @@ xDetails.rastergrob <- function(x, theta) {
 
 yDetails.rastergrob <- function(x, theta) {
     x <- resolveRasterSize(x)
-    bounds <- grid.Call(L_rectBounds, x$x, x$y, x$width, x$height,
+    bounds <- grid.Call(C_rectBounds, x$x, x$y, x$width, x$height,
                         resolveHJust(x$just, x$hjust),
                         resolveVJust(x$just, x$vjust),
                         theta)
@@ -1276,7 +1277,7 @@ yDetails.rastergrob <- function(x, theta) {
 
 widthDetails.rastergrob <- function(x) {
     x <- resolveRasterSize(x)
-    bounds <- grid.Call(L_rectBounds, x$x, x$y, x$width, x$height,
+    bounds <- grid.Call(C_rectBounds, x$x, x$y, x$width, x$height,
                         resolveHJust(x$just, x$hjust),
                         resolveVJust(x$just, x$vjust),
                         0)
@@ -1288,7 +1289,7 @@ widthDetails.rastergrob <- function(x) {
 
 heightDetails.rastergrob <- function(x) {
     x <- resolveRasterSize(x)
-    bounds <- grid.Call(L_rectBounds, x$x, x$y, x$width, x$height,
+    bounds <- grid.Call(C_rectBounds, x$x, x$y, x$width, x$height,
                         resolveHJust(x$just, x$hjust),
                         resolveVJust(x$just, x$vjust),
                         0)
@@ -1360,7 +1361,7 @@ validDetails.text <- function(x) {
 }
 
 drawDetails.text <- function(x, recording=TRUE) {
-  grid.Call.graphics(L_text, as.graphicsAnnot(x$label),
+  grid.Call.graphics(C_text, as.graphicsAnnot(x$label),
                      x$x, x$y,
                      resolveHJust(x$just, x$hjust),
                      resolveVJust(x$just, x$vjust),
@@ -1368,7 +1369,7 @@ drawDetails.text <- function(x, recording=TRUE) {
 }
 
 xDetails.text <- function(x, theta) {
-  bounds <- grid.Call(L_textBounds, as.graphicsAnnot(x$label),
+  bounds <- grid.Call(C_textBounds, as.graphicsAnnot(x$label),
                       x$x, x$y,
                       resolveHJust(x$just, x$hjust),
                       resolveVJust(x$just, x$vjust),
@@ -1380,7 +1381,7 @@ xDetails.text <- function(x, theta) {
 }
 
 yDetails.text <- function(x, theta) {
-  bounds <- grid.Call(L_textBounds, as.graphicsAnnot(x$label),
+  bounds <- grid.Call(C_textBounds, as.graphicsAnnot(x$label),
                       x$x, x$y,
                       resolveHJust(x$just, x$hjust),
                       resolveVJust(x$just, x$vjust),
@@ -1392,7 +1393,7 @@ yDetails.text <- function(x, theta) {
 }
 
 widthDetails.text <- function(x) {
-  bounds <- grid.Call(L_textBounds, as.graphicsAnnot(x$label),
+  bounds <- grid.Call(C_textBounds, as.graphicsAnnot(x$label),
                       x$x, x$y,
                       resolveHJust(x$just, x$hjust),
                       resolveVJust(x$just, x$vjust),
@@ -1404,7 +1405,7 @@ widthDetails.text <- function(x) {
 }
 
 heightDetails.text <- function(x) {
-  bounds <- grid.Call(L_textBounds, as.graphicsAnnot(x$label),
+  bounds <- grid.Call(C_textBounds, as.graphicsAnnot(x$label),
                       x$x, x$y,
                       resolveHJust(x$just, x$hjust),
                       resolveVJust(x$just, x$vjust),
@@ -1417,7 +1418,7 @@ heightDetails.text <- function(x) {
 
 ascentDetails.text <- function(x) {
     if (length(x$label) == 1) {
-        metrics <- grid.Call(L_stringMetric, as.graphicsAnnot(x$label))
+        metrics <- grid.Call(C_stringMetric, as.graphicsAnnot(x$label))
         unit(metrics[[1]], "inches")
     } else {
         heightDetails(x)
@@ -1426,7 +1427,7 @@ ascentDetails.text <- function(x) {
 
 descentDetails.text <- function(x) {
     if (length(x$label) == 1) {
-        metrics <- grid.Call(L_stringMetric, as.graphicsAnnot(x$label))
+        metrics <- grid.Call(C_stringMetric, as.graphicsAnnot(x$label))
         unit(metrics[[2]], "inches")
     } else {
         unit(0, "inches")
@@ -1487,12 +1488,12 @@ validDetails.points <- function(x) {
 }
 
 drawDetails.points <- function(x, recording=TRUE) {
-  grid.Call.graphics(L_points, x$x, x$y, x$pch, x$size)
+  grid.Call.graphics(C_points, x$x, x$y, x$pch, x$size)
 }
 
 # FIXME:  does not take into account the size of the symbols
 xDetails.points <- function(x, theta) {
-    bounds <- grid.Call(L_locnBounds, x$x, x$y, theta)
+    bounds <- grid.Call(C_locnBounds, x$x, x$y, theta)
     if (is.null(bounds))
         unit(0.5, "npc")
     else
@@ -1500,7 +1501,7 @@ xDetails.points <- function(x, theta) {
 }
 
 yDetails.points <- function(x, theta) {
-    bounds <- grid.Call(L_locnBounds, x$x, x$y, theta)
+    bounds <- grid.Call(C_locnBounds, x$x, x$y, theta)
     if (is.null(bounds))
         unit(0.5, "npc")
     else
@@ -1508,7 +1509,7 @@ yDetails.points <- function(x, theta) {
 }
 
 widthDetails.points <- function(x) {
-  bounds <- grid.Call(L_locnBounds, x$x, x$y, 0)
+  bounds <- grid.Call(C_locnBounds, x$x, x$y, 0)
   if (is.null(bounds))
     unit(0, "inches")
   else
@@ -1516,7 +1517,7 @@ widthDetails.points <- function(x) {
 }
 
 heightDetails.points <- function(x) {
-  bounds <- grid.Call(L_locnBounds, x$x, x$y, 0)
+  bounds <- grid.Call(C_locnBounds, x$x, x$y, 0)
   if (is.null(bounds))
     unit(0, "inches")
   else
@@ -1571,7 +1572,7 @@ validDetails.clip <- function(x) {
 }
 
 drawDetails.clip <- function(x, recording=TRUE) {
-  grid.Call.graphics(L_clip, x$x, x$y, x$width, x$height,
+  grid.Call.graphics(C_clip, x$x, x$y, x$width, x$height,
                      resolveHJust(x$just, x$hjust),
                      resolveVJust(x$just, x$vjust))
 }
@@ -1621,7 +1622,7 @@ drawDetails.null <- function(x, recording=TRUE) {
 }
 
 xDetails.null <- function(x, theta) {
-    bounds <- grid.Call(L_locnBounds, x$x, x$y, theta)
+    bounds <- grid.Call(C_locnBounds, x$x, x$y, theta)
     if (is.null(bounds))
         unit(0.5, "npc")
     else
@@ -1629,7 +1630,7 @@ xDetails.null <- function(x, theta) {
 }
 
 yDetails.null <- function(x, theta) {
-    bounds <- grid.Call( L_locnBounds, x$x, x$y, theta)
+    bounds <- grid.Call( C_locnBounds, x$x, x$y, theta)
     if (is.null(bounds))
         unit(0.5, "npc")
     else
diff --git a/src/library/grid/R/roundRect.R b/src/library/grid/R/roundRect.R
index e16433f..6eabc6b 100644
--- a/src/library/grid/R/roundRect.R
+++ b/src/library/grid/R/roundRect.R
@@ -1,7 +1,7 @@
 #  File src/library/grid/R/roundrect.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
-#  Copyright (C) 1995-2012 The R Core Team
+#  Copyright (C) 1995-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
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 
 # Good idea to choose r as absolute unit or "snpc"
@@ -124,7 +124,7 @@ makeContent.roundrect <- function(x) {
 
 xDetails.roundrect <- function(x, theta) {
     boundary <- rrpoints(x)
-    bounds <- grid.Call(L_locnBounds, boundary$x, boundary$y, theta)
+    bounds <- grid.Call(C_locnBounds, boundary$x, boundary$y, theta)
     if (is.null(bounds))
         unit(0.5, "npc")
     else
@@ -133,7 +133,7 @@ xDetails.roundrect <- function(x, theta) {
 
 yDetails.roundrect <- function(x, theta) {
     boundary <- rrpoints(x)
-    bounds <- grid.Call(L_locnBounds, boundary$x, boundary$y, theta)
+    bounds <- grid.Call(C_locnBounds, boundary$x, boundary$y, theta)
     if (is.null(bounds))
         unit(0.5, "npc")
     else
@@ -142,7 +142,7 @@ yDetails.roundrect <- function(x, theta) {
 
 widthDetails.roundrect <- function(x) {
     boundary <- rrpoints(x)
-    bounds <- grid.Call(L_locnBounds, boundary$x, boundary$y, 0)
+    bounds <- grid.Call(C_locnBounds, boundary$x, boundary$y, 0)
     if (is.null(bounds))
         unit(0, "inches")
     else
@@ -151,7 +151,7 @@ widthDetails.roundrect <- function(x) {
 
 heightDetails.roundrect <- function(x) {
     boundary <- rrpoints(x)
-    bounds <- grid.Call(L_locnBounds, boundary$x, boundary$y, 0)
+    bounds <- grid.Call(C_locnBounds, boundary$x, boundary$y, 0)
     if (is.null(bounds))
         unit(0, "inches")
     else
diff --git a/src/library/grid/R/size.R b/src/library/grid/R/size.R
index 2e5bc61..de7f2c6 100644
--- a/src/library/grid/R/size.R
+++ b/src/library/grid/R/size.R
@@ -1,5 +1,5 @@
 #  File src/library/grid/R/size.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
 #  Copyright (C) 1995-2012 The R Core Team
 #
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 # These functions are used to evaluate "grobwidth" and
 # "grobheight" units.
diff --git a/src/library/grid/R/unit.R b/src/library/grid/R/unit.R
index 6f9bab1..7facc3d 100644
--- a/src/library/grid/R/unit.R
+++ b/src/library/grid/R/unit.R
@@ -1,7 +1,7 @@
 #  File src/library/grid/R/unit.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
-#  Copyright (C) 1995-2013 The R Core Team
+#  Copyright (C) 1995-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
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 
 # Create an object of class "unit"
@@ -34,13 +34,10 @@ unit <- function(x, units, data=NULL) {
 }
 
 valid.unit <- function(x, units, data) {
-  valid.units <- valid.units(units)
-  data <- valid.data(rep(units, length.out=length(x)), data)
-  attr(x, "unit") <- units
-  attr(x, "valid.unit") <- valid.units
-  attr(x, "data") <- data
-  class(x) <- "unit"
-  x
+    structure(x, class = "unit",
+              "valid.unit" = valid.units(units),
+              "data" = valid.data(rep(units, length.out=length(x)), data),
+              "unit" = units)
 }
 
 grid.convert <- function(x, unitTo, axisFrom="x", typeFrom="location",
@@ -60,7 +57,7 @@ convertUnit <- function(x, unitTo, axisFrom="x", typeFrom="location",
     stop("'x' argument must be a unit object")
   if (is.na(whatfrom) || is.na(whatto))
     stop("invalid 'axis' or 'type'")
-  value <- grid.Call(L_convert, x, as.integer(whatfrom),
+  value <- grid.Call(C_convert, x, as.integer(whatfrom),
                  as.integer(whatto), valid.units(unitTo))
   if (!valueOnly)
     unit(value, unitTo)
@@ -112,7 +109,7 @@ convertNative <- function(unit, dimension="x", type="location") {
 # in the current context
 calcStringMetric <- function(text) {
     # .Call rather than .Call.graphics because it is a one-off calculation
-    metric <- grid.Call(L_stringMetric, text)
+    metric <- grid.Call(C_stringMetric, text)
     names(metric) <- c("ascent", "descent", "width")
     metric
 }
@@ -165,11 +162,10 @@ recycle.data <- function(data, data.per, max.n, units) {
             n <- length(data)
         original <- data
         length(data) <- n
-        if (length(original) < length(data)) {
-            for (i in (length(original) + 1):length(data)) {
-                data[[i]] <- original[[(i - 1) %% length(original) + 1]]
-            }
-        }
+        n.o <- length(original)
+        if (n.o < n)
+            for (i in (n.o + 1L):n)
+                data[[i]] <- original[[(i - 1L) %% n.o + 1L]]
     }
     data
 }
@@ -204,7 +200,7 @@ valid.data <- function(units, data) {
 }
 
 valid.units <- function(units) {
-  .Call(validUnits, units)
+  .Call(C_validUnits, units)
 }
 
 as.character.unit <- function(x, ...) {
@@ -212,6 +208,10 @@ as.character.unit <- function(x, ...) {
   paste0(x, attr(x, "unit"))
 }
 
+format.unit <- function(x, ...) {
+    paste0(format(unclass(x), ...), attr(x, "unit"))
+}
+
 #########################
 # UNIT ARITHMETIC STUFF
 #########################
@@ -283,6 +283,14 @@ as.character.unit.arithmetic <- function(x, ...) {
     paste0(fname, "(", paste(x$arg1, collapse=", "), ")")
 }
 
+format.unit.arithmetic <- function(x, ...) {
+    fname <- x$fname
+    if (fname == "+" || fname == "-" || fname == "*")
+        paste0(format(x$arg1, ...), fname, format(x$arg2, ...))
+    else
+        paste0(fname, "(", paste(format(x$arg1, ...), collapse=", "), ")")
+}
+
 unit.pmax <- function(...) {
 
   select.i <- function(unit, i) {
@@ -337,16 +345,11 @@ unit.pmin <- function(...) {
 
 # create a unit list from a unit, unit.arithmetic, or unit.list object
 unit.list <- function(unit) {
-  if (is.unit.list(unit))
-    unit
-  else {
-    l <- length(unit)
-    result <- vector("list", l)
-    for (i in seq_len(l))
-      result[[i]] <- unit[i]
-    class(result) <- c("unit.list", "unit")
-    result
-  }
+    if (is.unit.list(unit))
+	unit
+    else
+	structure(class = c("unit.list", "unit"),
+		  lapply(seq_along(unit), function(i) unit[i]))
 }
 
 is.unit.list <- function(x) {
@@ -354,11 +357,12 @@ is.unit.list <- function(x) {
 }
 
 as.character.unit.list <- function(x, ...) {
-  l <- length(x)
-  result <- character(l)
-  for (i in seq_len(l))
-    result[i] <- as.character(x[[i]])
-  result
+  ## *apply cannot work on 'x' directly because of "wrong" length()s
+  vapply(seq_along(x), function(i) as.character(x[[i]]), "")
+}
+
+format.unit.list <- function(x, ...) {
+    vapply(seq_along(x), function(i) format(x[[i]], ...), "")
 }
 
 #########################
@@ -369,10 +373,9 @@ is.unit <- function(unit) {
   inherits(unit, "unit")
 }
 
-print.unit <- function(x, ...) {
+print.unit <- function(x, ...)
   print(as.character(x), quote=FALSE, ...)
-  invisible(x)
-}
+
 
 #########################
 # Unit subsetting
@@ -388,28 +391,30 @@ print.unit <- function(x, ...) {
 `[.unit` <- function(x, index, top=TRUE, ...) {
   this.length <- length(x)
   if (is.logical(index))
-    index <- (1L:this.length)[index]
-  # Allow for negative integer index
-  if (any(index < 0)) {
-      if (any(index > 0))
-          stop("cannot mix signs of indices")
-      else
-          index <- (1L:this.length)[index]
+      index <- which(index)
+  else { # Allow for negative integer index
+      if (any(index < 0)) {
+          if (any(index > 0))
+              stop("cannot mix signs of indices")
+          else
+              index <- (1L:this.length)[index]
+      }
+      if (top && any(index > this.length))
+          stop("index out of bounds ('unit' subsetting)")
   }
-  if (top && any(index > this.length))
-    stop("index out of bounds ('unit' subsetting)")
   cl <- class(x)
   units <- attr(x, "unit")
   valid.units <- attr(x, "valid.unit")
   data <- attr(x, "data")
   class(x) <- NULL
+  i_1 <- index - 1L
   # The line below may seem slightly odd, but it should only be
   # used to recycle values when this method is called to
   # subset an argument in a unit.arithmetic object
-  x <- x[(index - 1) %% this.length + 1]
-  attr(x, "unit") <- units[(index - 1) %% length(units) + 1]
-  attr(x, "valid.unit") <- valid.units[(index - 1) %% length(valid.units) + 1]
-  data.list <- data[(index - 1) %% length(data) + 1]
+  x <- x[i_1 %% this.length + 1L]
+  attr(x, "unit") <- units[i_1 %% length(units) + 1L]
+  attr(x, "valid.unit") <- valid.units[i_1 %% length(valid.units) + 1L]
+  data.list <- data[i_1 %% length(data) + 1L]
   attr(x, "data") <- data.list
   class(x) <- cl
   x
@@ -420,31 +425,32 @@ print.unit <- function(x, ...) {
 `[.unit.arithmetic` <- function(x, index, top=TRUE, ...) {
   this.length <- length(x)
   if (is.logical(index))
-    index <- (1L:this.length)[index]
-  # Allow for negative integer index
-  if (any(index < 0)) {
+    index <- which(index)
+  else { # Allow for negative integer index
+    if (any(index < 0)) {
       if (any(index > 0))
-          stop("cannot mix signs of indices")
+        stop("cannot mix signs of indices")
       else
-          index <- (1L:this.length)[index]
+        index <- (1L:this.length)[index]
+    }
+    if (top && any(index > this.length))
+      stop("index out of bounds (unit arithmetic subsetting)")
   }
-  if (top && any(index > this.length))
-    stop("index out of bounds (unit arithmetic subsetting)")
-
   repSummaryUnit <- function(x, n) {
-      newUnits <- lapply(seq_len(n), function(z) { get(x$fname)(x$arg1) })
+      val <- get(x$fname)(x$arg1)
+      newUnits <- lapply(integer(n), function(z) val)
       class(newUnits) <- c("unit.list", "unit")
       newUnits
   }
 
   switch(x$fname,
-         "+"=`[`(x$arg1, (index - 1) %% this.length + 1, top=FALSE) +
-             `[`(x$arg2, (index - 1) %% this.length + 1, top=FALSE),
-         "-"=`[`(x$arg1, (index - 1) %% this.length + 1, top=FALSE) -
-             `[`(x$arg2, (index - 1) %% this.length + 1, top=FALSE),
+         "+"=`[`(x$arg1, (index - 1L) %% this.length + 1L, top=FALSE) +
+             `[`(x$arg2, (index - 1L) %% this.length + 1L, top=FALSE),
+         "-"=`[`(x$arg1, (index - 1L) %% this.length + 1L, top=FALSE) -
+             `[`(x$arg2, (index - 1L) %% this.length + 1L, top=FALSE),
          # Recycle multiplier if necessary
-         "*"=x$arg1[(index - 1) %% length(x$arg1) + 1] *
-             `[`(x$arg2, (index - 1) %% this.length + 1, top=FALSE),
+         "*"=`[`(x$arg1, (index - 1L) %% length(x$arg1) + 1L) *
+             `[`(x$arg2, (index - 1L) %% this.length + 1L, top=FALSE),
          "min"=repSummaryUnit(x, length(index)),
          "max"=repSummaryUnit(x, length(index)),
          "sum"=repSummaryUnit(x, length(index)))
@@ -453,23 +459,35 @@ print.unit <- function(x, ...) {
 `[.unit.list` <- function(x, index, top=TRUE, ...) {
   this.length <- length(x)
   if (is.logical(index))
-    index <- (1L:this.length)[index]
-  # Allow for negative integer index
-  if (any(index < 0)) {
+    index <- which(index)
+  else { # Allow for negative integer index
+    if (any(index < 0)) {
       if (any(index > 0))
-          stop("cannot mix signs of indices")
+        stop("cannot mix signs of indices")
       else
-          index <- (1L:this.length)[index]
+        index <- (1L:this.length)[index]
+    }
+    if (top && any(index > this.length))
+      stop("index out of bounds (unit list subsetting)")
   }
-  if (top && any(index > this.length))
-    stop("index out of bounds (unit list subsetting)")
-  cl <- class(x)
-  result <- unclass(x)[(index - 1) %% this.length + 1]
-  class(result) <- cl
-  result
+  structure(class = class(x),
+            unclass(x)[(index - 1L) %% this.length + 1L])
 }
 
-# Write `[<-.unit` methods too ??
+# `[<-.unit` methods
+#
+# The basic approach is to convert everything to a unit.list,
+# unclass (so everything is list), rely on list subassignment, reclass
+
+`[<-.unit` <- function(x, i, value) {
+    if (!is.unit(value))
+        stop("Value being assigned must be a unit")
+    valueList <- unclass(unit.list(value))
+    xList <- unclass(unit.list(x))
+    xList[i] <- valueList
+    class(xList) <- c("unit.list", "unit")
+    xList
+}
 
 #########################
 # str() method
@@ -528,11 +546,10 @@ unit.c <- function(...) {
     }
 }
 
-unit.list.from.list <- function(x) {
-    result <- do.call("c", lapply(x, unit.list))
-    class(result) <- c("unit.list", "unit")
-    result
-}
+unit.list.from.list <- function(x)
+  structure(class = c("unit.list", "unit"),
+            do.call("c", lapply(x, unit.list)))
+
 
 #########################
 # rep'ing unit objects
@@ -786,7 +803,13 @@ absolute <- function(unit) {
                  "mm", "points", "picas", "bigpts",
                  "dida", "cicero", "scaledpts",
                  "strwidth", "strheight", "strascent", "strdescent", "char",
-                 "mylines", "mychar", "mystrwidth", "mystrheight")))
+                 "mylines", "mychar", "mystrwidth", "mystrheight",
+                 # pseudonyms (from unit.c)
+                 "centimetre", "centimetres", "centimeter",  "centimeters",
+                 "in", "inch",
+                 "line",
+                 "millimetre", "millimetres", "millimeter", "millimeters",
+                 "point", "pt")))
 }
 
 # OLD absolute.unit
@@ -796,24 +819,15 @@ absolute.units <- function(unit) {
 
 absolute.units.unit <- function(unit) {
   n <- length(unit)
-  if (absolute(unit[1L]))
-    abs.unit <- unit[1L]
-  else
-    abs.unit <- unit(1, "null")
-  new.unit <- abs.unit
-  count <- 1
-  while (count < n) {
-    count <- count + 1
-    new.unit <- unit.c(new.unit, absolute.units(unit[count]))
-  }
+  new.unit <- if (absolute(unit[1L])) unit[1L] else unit(1, "null")
+  if(n > 1) for(i in 2L:n)
+    new.unit <- unit.c(new.unit, absolute.units(unit[i]))
   new.unit
 }
 
 absolute.units.unit.list <- function(unit) {
-  cl <- class(unit)
-  abs.ul <- lapply(unit, absolute.units)
-  class(abs.ul) <- cl
-  abs.ul
+  structure(class = class(unit),
+            lapply(unit, absolute.units))
 }
 
 absolute.units.unit.arithmetic <- function(unit) {
@@ -827,5 +841,3 @@ absolute.units.unit.arithmetic <- function(unit) {
          "max"=unit.arithmetic("max", absolute.units(unit$arg1)),
          "sum"=unit.arithmetic("sum", absolute.units(unit$arg1)))
 }
-
-
diff --git a/src/library/grid/R/util.R b/src/library/grid/R/util.R
index 4ff7a12..16fa425 100644
--- a/src/library/grid/R/util.R
+++ b/src/library/grid/R/util.R
@@ -1,7 +1,7 @@
 #  File src/library/grid/R/util.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
-#  Copyright (C) 1995-2012 The R Core Team
+#  Copyright (C) 1995-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
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 
 # Define a convenience function that is easy to call from C code
@@ -42,6 +42,6 @@ is.odd <- function(x) !is.even(x)
 grid.pretty <- function(range) {
   if (!is.numeric(range))
     stop("'range' must be numeric")
-  .Call(L_pretty, range)
+  .Call(C_pretty, range)
 }
 
diff --git a/src/library/grid/R/viewport.R b/src/library/grid/R/viewport.R
index fc4cbdc..37acd1d 100644
--- a/src/library/grid/R/viewport.R
+++ b/src/library/grid/R/viewport.R
@@ -1,5 +1,5 @@
 #  File src/library/grid/R/viewport.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
 #  Copyright (C) 1995-2013 The R Core Team
 #
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 
 initvpAutoName <- function() {
diff --git a/src/library/grid/R/zzz.R b/src/library/grid/R/zzz.R
index b91783a..03cedb5 100644
--- a/src/library/grid/R/zzz.R
+++ b/src/library/grid/R/zzz.R
@@ -1,7 +1,7 @@
 #  File src/library/grid/R/zzz.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
-#  Copyright (C) 1995-2012 The R Core Team
+#  Copyright (C) 1995-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
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 ## environment used for evaluation in the C code
 ## assigned here to protect from GC, but otherwise unused at R level
@@ -37,7 +37,7 @@ utils::globalVariables(c("n", "vp", "path"))
 {
     ## want eval in C code to see unexported objects
     environment(.GridEvalEnv) <- asNamespace("grid")
-    .Call(L_initGrid, .GridEvalEnv)
+    .Call(C_initGrid, .GridEvalEnv)
     .grid.loaded <<- TRUE
 }
 
@@ -52,7 +52,7 @@ utils::globalVariables(c("n", "vp", "path"))
             warning("shutting down all devices when unloading 'grid' namespace",
                     call. = FALSE)
         graphics.off()
-        .Call(L_killGrid)
+        .Call(C_killGrid)
     }
     library.dynam.unload("grid", libpath)
 }
diff --git a/src/library/grid/inst/doc/changes.txt b/src/library/grid/inst/doc/changes.txt
index 2bdda2b..2016266 100644
--- a/src/library/grid/inst/doc/changes.txt
+++ b/src/library/grid/inst/doc/changes.txt
@@ -1,4 +1,61 @@
 
+Changes from grid_3.4.* to grid_3.5.0:
+-------------------------------------
+
+1.  Fix for current.vpTree() so that it puts you back in the right
+    place in the viewport tree if there are nested viewports with
+    the same name (e.g., pushViewport(vp, vp)).
+
+    Reported by Prem Thomas.
+
+
+Changes from grid_3.3.* to grid_3.4.0:
+-------------------------------------
+
+1.  Added format() method for units, so, for example, the number of 
+    digits printed for numeric values can be controlled.
+
+    grid.show.layout() now uses format() for annotating layout
+    widths and heights.
+
+2.  More robust handling of NA values in graphical parameter settings
+    that affect text.  NA values for fontsize, lineheight, cex, and
+    fontfamily are ignored, i.e., inherited from parent drawing context.
+    A mixture of NA and non-NA generates an error.
+
+3.  Improved support for calcStringMetric() function (and
+    stringAscent() and stringDescent() and grobAscent() and
+    grobDescent()) so that text encoding is now handled.
+
+    Reported by Hakon Malmedal and Hadley Wickham.
+
+
+Changes from grid_3.2.* to grid_3.3.0:
+-------------------------------------
+
+1.  Added "pseudonym" units to check made in absolute.size() so that,
+    for example, absolute.size(unit(1, "in")) works properly
+    (reported by Baptiste Auguie).
+
+2.  Registered absolute.units() methods in NAMESPACE, so that, for
+    example, a call to absolute.size(unit(1,"npc") + unit(2,"mm"))
+    works outside of 'grid' (reported by Baptiste Auguie).
+
+3.  Refactored grid.draw() so that grid.draw(NULL) now works 
+    (by doing nothing).  Reported by Hadley Wickham.
+
+4.  Modified grid.ls() so that it returns nothing if there are no
+    active devices (rather than opening a new device).
+  
+5.  Modified grid.grep() so that it returns an empty list (rather than
+    throwing an error) when the 'grid' display list is empty.
+
+6.  Added subassignment methods for unit objects
+    (e.g., x <- unit(1:3, "cm"); x[2] <- unit(.5, "npc"))
+
+    Thanks to Baptiste Auguie for code suggestions.
+
+
 Changes from grid_3.1.* to grid_3.2.0:
 -------------------------------------
 
@@ -9,6 +66,15 @@ Changes from grid_3.1.* to grid_3.2.0:
 
     Problem reported by Baptiste Auguie.
 
+2.  Fixed problem in validDetails.beziergrob(), which used to fail if
+    you tried to specify 'id.lengths'
+
+3.  Fixed bug in downViewport() when descending more than one
+    viewport.  It was possible for this to end up with the wrong
+    clipping region (because if you ended up in a viewport that
+    inherited its clipping region from a parent, that clipping region
+    was not enforced).
+
 
 Changes from grid_3.0.* to grid_3.1.0:
 -------------------------------------
diff --git a/src/library/grid/inst/doc/displaylist.pdf b/src/library/grid/inst/doc/displaylist.pdf
index 56a2afb..ead9096 100644
Binary files a/src/library/grid/inst/doc/displaylist.pdf and b/src/library/grid/inst/doc/displaylist.pdf differ
diff --git a/src/library/grid/inst/doc/frame.pdf b/src/library/grid/inst/doc/frame.pdf
index 8757b1f..dc4b3e4 100644
Binary files a/src/library/grid/inst/doc/frame.pdf and b/src/library/grid/inst/doc/frame.pdf differ
diff --git a/src/library/grid/inst/doc/grid.pdf b/src/library/grid/inst/doc/grid.pdf
index b51b6fc..b9512ff 100644
Binary files a/src/library/grid/inst/doc/grid.pdf and b/src/library/grid/inst/doc/grid.pdf differ
diff --git a/src/library/grid/inst/doc/grobs.pdf b/src/library/grid/inst/doc/grobs.pdf
index 8aa2e80..efa5896 100644
Binary files a/src/library/grid/inst/doc/grobs.pdf and b/src/library/grid/inst/doc/grobs.pdf differ
diff --git a/src/library/grid/inst/doc/interactive.pdf b/src/library/grid/inst/doc/interactive.pdf
index 0058100..56fb66e 100644
Binary files a/src/library/grid/inst/doc/interactive.pdf and b/src/library/grid/inst/doc/interactive.pdf differ
diff --git a/src/library/grid/inst/doc/locndimn.pdf b/src/library/grid/inst/doc/locndimn.pdf
index ed383af..7fa2373 100644
Binary files a/src/library/grid/inst/doc/locndimn.pdf and b/src/library/grid/inst/doc/locndimn.pdf differ
diff --git a/src/library/grid/inst/doc/moveline.pdf b/src/library/grid/inst/doc/moveline.pdf
index 7accc59..87e1e9b 100644
Binary files a/src/library/grid/inst/doc/moveline.pdf and b/src/library/grid/inst/doc/moveline.pdf differ
diff --git a/src/library/grid/inst/doc/nonfinite.pdf b/src/library/grid/inst/doc/nonfinite.pdf
index 1697c0f..c57312a 100644
Binary files a/src/library/grid/inst/doc/nonfinite.pdf and b/src/library/grid/inst/doc/nonfinite.pdf differ
diff --git a/src/library/grid/inst/doc/plotexample.pdf b/src/library/grid/inst/doc/plotexample.pdf
index fae0545..05d0938 100644
Binary files a/src/library/grid/inst/doc/plotexample.pdf and b/src/library/grid/inst/doc/plotexample.pdf differ
diff --git a/src/library/grid/inst/doc/rotated.pdf b/src/library/grid/inst/doc/rotated.pdf
index 5581fdf..cea1873 100644
Binary files a/src/library/grid/inst/doc/rotated.pdf and b/src/library/grid/inst/doc/rotated.pdf differ
diff --git a/src/library/grid/inst/doc/saveload.pdf b/src/library/grid/inst/doc/saveload.pdf
index 0083947..ac89896 100644
Binary files a/src/library/grid/inst/doc/saveload.pdf and b/src/library/grid/inst/doc/saveload.pdf differ
diff --git a/src/library/grid/inst/doc/sharing.pdf b/src/library/grid/inst/doc/sharing.pdf
index beec4c9..9841855 100644
Binary files a/src/library/grid/inst/doc/sharing.pdf and b/src/library/grid/inst/doc/sharing.pdf differ
diff --git a/src/library/grid/inst/doc/viewports.pdf b/src/library/grid/inst/doc/viewports.pdf
index 0684812..3ec3eeb 100644
Binary files a/src/library/grid/inst/doc/viewports.pdf and b/src/library/grid/inst/doc/viewports.pdf differ
diff --git a/src/library/grid/man/Grid.Rd b/src/library/grid/man/Grid.Rd
index bfec7bf..d398576 100644
--- a/src/library/grid/man/Grid.Rd
+++ b/src/library/grid/man/Grid.Rd
@@ -1,5 +1,5 @@
 % File src/library/grid/man/Grid.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2007 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/grid/man/absolute.size.Rd b/src/library/grid/man/absolute.size.Rd
index 142c11f..31278e9 100644
--- a/src/library/grid/man/absolute.size.Rd
+++ b/src/library/grid/man/absolute.size.Rd
@@ -1,5 +1,5 @@
 % File src/library/grid/man/absolute.size.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2007 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/grid/man/arrow.Rd b/src/library/grid/man/arrow.Rd
index 436e7d9..bc41461 100644
--- a/src/library/grid/man/arrow.Rd
+++ b/src/library/grid/man/arrow.Rd
@@ -1,5 +1,5 @@
 % File src/library/grid/man/arrow.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2007 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/grid/man/calcStringMetric.Rd b/src/library/grid/man/calcStringMetric.Rd
index 4330cc8..3a42517 100644
--- a/src/library/grid/man/calcStringMetric.Rd
+++ b/src/library/grid/man/calcStringMetric.Rd
@@ -1,5 +1,5 @@
 % File src/library/grid/man/calcStringMetric.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2007 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/grid/man/current.viewport.Rd b/src/library/grid/man/current.viewport.Rd
index 0391d43..7b90e43 100644
--- a/src/library/grid/man/current.viewport.Rd
+++ b/src/library/grid/man/current.viewport.Rd
@@ -1,5 +1,5 @@
 % File src/library/grid/man/current.viewport.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2013 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/grid/man/dataViewport.Rd b/src/library/grid/man/dataViewport.Rd
index 8952601..b086ea9 100644
--- a/src/library/grid/man/dataViewport.Rd
+++ b/src/library/grid/man/dataViewport.Rd
@@ -1,5 +1,5 @@
 % File src/library/grid/man/dataViewport.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2007 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/grid/man/drawDetails.Rd b/src/library/grid/man/drawDetails.Rd
index 049a9c4..ef06570 100644
--- a/src/library/grid/man/drawDetails.Rd
+++ b/src/library/grid/man/drawDetails.Rd
@@ -1,5 +1,5 @@
 % File src/library/grid/man/drawDetails.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2013 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/grid/man/editDetails.Rd b/src/library/grid/man/editDetails.Rd
index 918b8a9..11e1079 100644
--- a/src/library/grid/man/editDetails.Rd
+++ b/src/library/grid/man/editDetails.Rd
@@ -1,5 +1,5 @@
 % File src/library/grid/man/editDetails.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2007 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/grid/man/gEdit.Rd b/src/library/grid/man/gEdit.Rd
index 431c913..3bbfce4 100644
--- a/src/library/grid/man/gEdit.Rd
+++ b/src/library/grid/man/gEdit.Rd
@@ -1,5 +1,5 @@
 % File src/library/grid/man/gEdit.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2007 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/grid/man/gPath.Rd b/src/library/grid/man/gPath.Rd
index bbc4b85..75e9c54 100644
--- a/src/library/grid/man/gPath.Rd
+++ b/src/library/grid/man/gPath.Rd
@@ -1,5 +1,5 @@
 % File src/library/grid/man/gPath.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2007 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/grid/man/getNames.Rd b/src/library/grid/man/getNames.Rd
index a233c6d..dcabe15 100644
--- a/src/library/grid/man/getNames.Rd
+++ b/src/library/grid/man/getNames.Rd
@@ -1,5 +1,5 @@
 % File src/library/grid/man/getNames.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2007 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/grid/man/gpar.Rd b/src/library/grid/man/gpar.Rd
index 8227301..c9c2e04 100644
--- a/src/library/grid/man/gpar.Rd
+++ b/src/library/grid/man/gpar.Rd
@@ -1,10 +1,8 @@
 % File src/library/grid/man/gpar.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2012 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2015 R Core Team
 % Distributed under GPL 2 or later
 
-\newcommand{\sspace}{\ifelse{latex}{\out{~}}{ }}
-
 \name{gpar}
 \alias{gpar}
 \alias{get.gpar}
@@ -66,8 +64,8 @@ get.gpar(names = NULL)
   Colours can be specified in one of the forms returned by
   \code{\link{rgb}}, as a name (see \code{\link{colors}}) or as a
   non-negative integer index into the current \link{palette} (with zero
-  being taken as transparent).  (Prior to \R 3.0.0 negative integer
-  values were allowed and taken as transparent: they are now an error.)
+  being taken as transparent).  (Negative integer values are now an
+  error.)
 
   The \code{alpha} setting is combined with the alpha channel for
   individual colours by multiplying (with both alpha settings
@@ -104,8 +102,6 @@ get.gpar(names = NULL)
   not always make sense -- for example, viewports will only take
   notice of the first parameter value.)
 
-  The \code{gamma} parameter is defunct since \R 2.7.0.
-
   \code{get.gpar()} returns all current graphical parameter settings.
 }
 \value{
diff --git a/src/library/grid/man/grid-defunct.Rd b/src/library/grid/man/grid-defunct.Rd
index 5fbcfd6..236f7bf 100644
--- a/src/library/grid/man/grid-defunct.Rd
+++ b/src/library/grid/man/grid-defunct.Rd
@@ -1,5 +1,5 @@
 % File src/library/grid/man/grid-defunct.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2013 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/grid/man/grid-internal.Rd b/src/library/grid/man/grid-internal.Rd
index 917eaff..ef10c7f 100644
--- a/src/library/grid/man/grid-internal.Rd
+++ b/src/library/grid/man/grid-internal.Rd
@@ -1,5 +1,5 @@
 % File src/library/grid/man/grid-internal.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2013 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/grid/man/grid-package.Rd b/src/library/grid/man/grid-package.Rd
index a59941d..71ae3a5 100644
--- a/src/library/grid/man/grid-package.Rd
+++ b/src/library/grid/man/grid-package.Rd
@@ -1,5 +1,5 @@
 % File src/library/grid/man/grid-package.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2007 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/grid/man/grid.DLapply.Rd b/src/library/grid/man/grid.DLapply.Rd
index 993802b..125f782 100644
--- a/src/library/grid/man/grid.DLapply.Rd
+++ b/src/library/grid/man/grid.DLapply.Rd
@@ -1,5 +1,5 @@
 % File src/library/grid/man/grid.DLapply.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2013 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/grid/man/grid.add.Rd b/src/library/grid/man/grid.add.Rd
index 5847cbe..537520e 100644
--- a/src/library/grid/man/grid.add.Rd
+++ b/src/library/grid/man/grid.add.Rd
@@ -1,5 +1,5 @@
 % File src/library/grid/man/grid.add.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2007 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/grid/man/grid.bezier.Rd b/src/library/grid/man/grid.bezier.Rd
index 030ac50..38b48dd 100644
--- a/src/library/grid/man/grid.bezier.Rd
+++ b/src/library/grid/man/grid.bezier.Rd
@@ -1,5 +1,5 @@
 % File src/library/grid/man/grid.bezier.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2007 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/grid/man/grid.cap.Rd b/src/library/grid/man/grid.cap.Rd
index 3efb415..312cdcd 100644
--- a/src/library/grid/man/grid.cap.Rd
+++ b/src/library/grid/man/grid.cap.Rd
@@ -1,5 +1,5 @@
 % File src/library/grid/man/grid.cap.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2014 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/grid/man/grid.circle.Rd b/src/library/grid/man/grid.circle.Rd
index 8b9a090..5f52666 100644
--- a/src/library/grid/man/grid.circle.Rd
+++ b/src/library/grid/man/grid.circle.Rd
@@ -1,6 +1,6 @@
 % File src/library/grid/man/grid.circle.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2012 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2015 R Core Team
 % Distributed under GPL 2 or later
 
 \name{grid.circle}
@@ -44,8 +44,8 @@ circleGrob(x=0.5, y=0.5, r=0.5, default.units="npc", name=NULL,
   effect, type \code{grid.circle()} and adjust the size of the window.
 
   What happens for very small radii is device-dependent: the
-  circle may become invisible or be shown at a fixed minimum size.  As
-  from \R 2.15.0, circles of zero radius will not be plotted.
+  circle may become invisible or be shown at a fixed minimum size.
+  Circles of zero radius will not be plotted.
 }
 \section{Warning}{
   Negative values for the radius are silently converted to their
diff --git a/src/library/grid/man/grid.clip.Rd b/src/library/grid/man/grid.clip.Rd
index 3f5c5fd..3a141cb 100644
--- a/src/library/grid/man/grid.clip.Rd
+++ b/src/library/grid/man/grid.clip.Rd
@@ -1,5 +1,5 @@
 % File src/library/grid/man/grid.clip.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2009 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/grid/man/grid.convert.Rd b/src/library/grid/man/grid.convert.Rd
index 78b8772..10946ff 100644
--- a/src/library/grid/man/grid.convert.Rd
+++ b/src/library/grid/man/grid.convert.Rd
@@ -1,5 +1,5 @@
 % File src/library/grid/man/grid.convert.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2013 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/grid/man/grid.copy.Rd b/src/library/grid/man/grid.copy.Rd
index 8568411..a613be6 100644
--- a/src/library/grid/man/grid.copy.Rd
+++ b/src/library/grid/man/grid.copy.Rd
@@ -1,5 +1,5 @@
 % File src/library/grid/man/grid.copy.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2007 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/grid/man/grid.curve.Rd b/src/library/grid/man/grid.curve.Rd
index 6e7c36d..8e6b1d6 100644
--- a/src/library/grid/man/grid.curve.Rd
+++ b/src/library/grid/man/grid.curve.Rd
@@ -1,5 +1,5 @@
 % File src/library/grid/man/grid.curve.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2007 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/grid/man/grid.delay.Rd b/src/library/grid/man/grid.delay.Rd
index e8fd9fd..703d5aa 100644
--- a/src/library/grid/man/grid.delay.Rd
+++ b/src/library/grid/man/grid.delay.Rd
@@ -1,5 +1,5 @@
 % File src/library/grid/man/grid.delay.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2007 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/grid/man/grid.display.list.Rd b/src/library/grid/man/grid.display.list.Rd
index 08d5b14..df0ff7a 100644
--- a/src/library/grid/man/grid.display.list.Rd
+++ b/src/library/grid/man/grid.display.list.Rd
@@ -1,5 +1,5 @@
 % File src/library/grid/man/grid.display.list.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2007 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/grid/man/grid.draw.Rd b/src/library/grid/man/grid.draw.Rd
index 156cac9..f1c16a1 100644
--- a/src/library/grid/man/grid.draw.Rd
+++ b/src/library/grid/man/grid.draw.Rd
@@ -1,5 +1,5 @@
 % File src/library/grid/man/grid.draw.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2007 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/grid/man/grid.edit.Rd b/src/library/grid/man/grid.edit.Rd
index 116cbfd..1678f21 100644
--- a/src/library/grid/man/grid.edit.Rd
+++ b/src/library/grid/man/grid.edit.Rd
@@ -1,5 +1,5 @@
 % File src/library/grid/man/grid.edit.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2007 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/grid/man/grid.force.Rd b/src/library/grid/man/grid.force.Rd
index b6259b9..ea27c00 100644
--- a/src/library/grid/man/grid.force.Rd
+++ b/src/library/grid/man/grid.force.Rd
@@ -1,5 +1,5 @@
 % File src/library/grid/man/grid.force.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2013 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/grid/man/grid.frame.Rd b/src/library/grid/man/grid.frame.Rd
index 2d3da2a..cb02198 100644
--- a/src/library/grid/man/grid.frame.Rd
+++ b/src/library/grid/man/grid.frame.Rd
@@ -1,5 +1,5 @@
 % File src/library/grid/man/grid.frame.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2007 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/grid/man/grid.function.Rd b/src/library/grid/man/grid.function.Rd
index 9f8130b..1e8fffb 100644
--- a/src/library/grid/man/grid.function.Rd
+++ b/src/library/grid/man/grid.function.Rd
@@ -1,5 +1,5 @@
 % File src/library/grid/man/grid.function.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2007 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/grid/man/grid.get.Rd b/src/library/grid/man/grid.get.Rd
index 0d356db..df7411c 100644
--- a/src/library/grid/man/grid.get.Rd
+++ b/src/library/grid/man/grid.get.Rd
@@ -1,5 +1,5 @@
 % File src/library/grid/man/grid.get.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2009 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/grid/man/grid.grab.Rd b/src/library/grid/man/grid.grab.Rd
index 0feec2b..20f9bde 100644
--- a/src/library/grid/man/grid.grab.Rd
+++ b/src/library/grid/man/grid.grab.Rd
@@ -1,5 +1,5 @@
 % File src/library/grid/man/grid.grab.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2007 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/grid/man/grid.grill.Rd b/src/library/grid/man/grid.grill.Rd
index 0c8c5b0..031aa02 100644
--- a/src/library/grid/man/grid.grill.Rd
+++ b/src/library/grid/man/grid.grill.Rd
@@ -1,5 +1,5 @@
 % File src/library/grid/man/grid.grill.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2007 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/grid/man/grid.grob.Rd b/src/library/grid/man/grid.grob.Rd
index 4921774..305eaef 100644
--- a/src/library/grid/man/grid.grob.Rd
+++ b/src/library/grid/man/grid.grob.Rd
@@ -1,5 +1,5 @@
 % File src/library/grid/man/grid.grob.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2013 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/grid/man/grid.layout.Rd b/src/library/grid/man/grid.layout.Rd
index 6dacebb..e16c78e 100644
--- a/src/library/grid/man/grid.layout.Rd
+++ b/src/library/grid/man/grid.layout.Rd
@@ -1,5 +1,5 @@
 % File src/library/grid/man/grid.layout.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2013 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/grid/man/grid.lines.Rd b/src/library/grid/man/grid.lines.Rd
index bef808e..c0f4990 100644
--- a/src/library/grid/man/grid.lines.Rd
+++ b/src/library/grid/man/grid.lines.Rd
@@ -1,5 +1,5 @@
 % File src/library/grid/man/grid.lines.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2007 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/grid/man/grid.locator.Rd b/src/library/grid/man/grid.locator.Rd
index d6ae9cb..ea8e9e4 100644
--- a/src/library/grid/man/grid.locator.Rd
+++ b/src/library/grid/man/grid.locator.Rd
@@ -1,10 +1,8 @@
 % File src/library/grid/man/grid.locator.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2007 R Core Team
 % Distributed under GPL 2 or later
 
-\newcommand{\CRANpkg}{\href{http://CRAN.R-project.org/package=#1}{\pkg{#1}}}
-
 \name{grid.locator}
 \alias{grid.locator}
 \title{ Capture a Mouse Click }
diff --git a/src/library/grid/man/grid.ls.Rd b/src/library/grid/man/grid.ls.Rd
index 009241e..4b1606c 100644
--- a/src/library/grid/man/grid.ls.Rd
+++ b/src/library/grid/man/grid.ls.Rd
@@ -1,5 +1,5 @@
 % File src/library/grid/man/grid.ls.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2013 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/grid/man/grid.move.to.Rd b/src/library/grid/man/grid.move.to.Rd
index dd3d667..0ad27c1 100644
--- a/src/library/grid/man/grid.move.to.Rd
+++ b/src/library/grid/man/grid.move.to.Rd
@@ -1,5 +1,5 @@
 % File src/library/grid/man/grid.move.to.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2013 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/grid/man/grid.newpage.Rd b/src/library/grid/man/grid.newpage.Rd
index aebaff0..6fb5a63 100644
--- a/src/library/grid/man/grid.newpage.Rd
+++ b/src/library/grid/man/grid.newpage.Rd
@@ -1,5 +1,5 @@
 % File src/library/grid/man/grid.newpage.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2007 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/grid/man/grid.null.Rd b/src/library/grid/man/grid.null.Rd
index 1f67f4c..de53f26 100644
--- a/src/library/grid/man/grid.null.Rd
+++ b/src/library/grid/man/grid.null.Rd
@@ -1,5 +1,5 @@
 % File src/library/grid/man/grid.null.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2007 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/grid/man/grid.pack.Rd b/src/library/grid/man/grid.pack.Rd
index bb71e60..d821200 100644
--- a/src/library/grid/man/grid.pack.Rd
+++ b/src/library/grid/man/grid.pack.Rd
@@ -1,5 +1,5 @@
 % File src/library/grid/man/grid.pack.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2013 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/grid/man/grid.path.Rd b/src/library/grid/man/grid.path.Rd
index 4b077fe..9b42b7c 100644
--- a/src/library/grid/man/grid.path.Rd
+++ b/src/library/grid/man/grid.path.Rd
@@ -1,5 +1,5 @@
 % File src/library/grid/man/grid.path.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2011 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/grid/man/grid.place.Rd b/src/library/grid/man/grid.place.Rd
index 812cb92..ea4a5ce 100644
--- a/src/library/grid/man/grid.place.Rd
+++ b/src/library/grid/man/grid.place.Rd
@@ -1,5 +1,5 @@
 % File src/library/grid/man/grid.place.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2007 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/grid/man/grid.plot.and.legend.Rd b/src/library/grid/man/grid.plot.and.legend.Rd
index 31b4584..8a1e575 100644
--- a/src/library/grid/man/grid.plot.and.legend.Rd
+++ b/src/library/grid/man/grid.plot.and.legend.Rd
@@ -1,5 +1,5 @@
 % File src/library/grid/man/grid.plot.and.legend.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2007 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/grid/man/grid.points.Rd b/src/library/grid/man/grid.points.Rd
index 3068a75..71b25b5 100644
--- a/src/library/grid/man/grid.points.Rd
+++ b/src/library/grid/man/grid.points.Rd
@@ -1,5 +1,5 @@
 % File src/library/grid/man/grid.points.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2013 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/grid/man/grid.polygon.Rd b/src/library/grid/man/grid.polygon.Rd
index 7282bdd..3090c36 100644
--- a/src/library/grid/man/grid.polygon.Rd
+++ b/src/library/grid/man/grid.polygon.Rd
@@ -1,5 +1,5 @@
 % File src/library/grid/man/grid.polygon.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2007 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/grid/man/grid.pretty.Rd b/src/library/grid/man/grid.pretty.Rd
index 8840100..88f8045 100644
--- a/src/library/grid/man/grid.pretty.Rd
+++ b/src/library/grid/man/grid.pretty.Rd
@@ -1,5 +1,5 @@
 % File src/library/grid/man/grid.pretty.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2007 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/grid/man/grid.raster.Rd b/src/library/grid/man/grid.raster.Rd
index acc88c9..c1872fe 100644
--- a/src/library/grid/man/grid.raster.Rd
+++ b/src/library/grid/man/grid.raster.Rd
@@ -1,5 +1,5 @@
 % File src/library/grid/man/grid.record.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 2009-2013 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/grid/man/grid.record.Rd b/src/library/grid/man/grid.record.Rd
index 2a491e0..6f89410 100644
--- a/src/library/grid/man/grid.record.Rd
+++ b/src/library/grid/man/grid.record.Rd
@@ -1,5 +1,5 @@
 % File src/library/grid/man/grid.record.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2007 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/grid/man/grid.rect.Rd b/src/library/grid/man/grid.rect.Rd
index ac3c209..e5370c7 100644
--- a/src/library/grid/man/grid.rect.Rd
+++ b/src/library/grid/man/grid.rect.Rd
@@ -1,5 +1,5 @@
 % File src/library/grid/man/grid.rect.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2007 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/grid/man/grid.refresh.Rd b/src/library/grid/man/grid.refresh.Rd
index bab30ab..0230e85 100644
--- a/src/library/grid/man/grid.refresh.Rd
+++ b/src/library/grid/man/grid.refresh.Rd
@@ -1,5 +1,5 @@
 % File src/library/grid/man/grid.refresh.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2007 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/grid/man/grid.remove.Rd b/src/library/grid/man/grid.remove.Rd
index fa52993..c6abb59 100644
--- a/src/library/grid/man/grid.remove.Rd
+++ b/src/library/grid/man/grid.remove.Rd
@@ -1,5 +1,5 @@
 % File src/library/grid/man/grid.remove.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2007 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/grid/man/grid.reorder.Rd b/src/library/grid/man/grid.reorder.Rd
index 90d8875..7bb89e7 100644
--- a/src/library/grid/man/grid.reorder.Rd
+++ b/src/library/grid/man/grid.reorder.Rd
@@ -1,5 +1,5 @@
 % File src/library/grid/man/grid.reorder.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2007 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/grid/man/grid.roundrect.Rd b/src/library/grid/man/grid.roundrect.Rd
index b805906..76e9157 100644
--- a/src/library/grid/man/grid.roundrect.Rd
+++ b/src/library/grid/man/grid.roundrect.Rd
@@ -1,5 +1,5 @@
 % File src/library/grid/man/grid.roundrect.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 2008 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/grid/man/grid.segments.Rd b/src/library/grid/man/grid.segments.Rd
index 1a80bc1..422b988 100644
--- a/src/library/grid/man/grid.segments.Rd
+++ b/src/library/grid/man/grid.segments.Rd
@@ -1,5 +1,5 @@
 % File src/library/grid/man/grid.segments.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2007 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/grid/man/grid.set.Rd b/src/library/grid/man/grid.set.Rd
index e87cd85..91cfe99 100644
--- a/src/library/grid/man/grid.set.Rd
+++ b/src/library/grid/man/grid.set.Rd
@@ -1,5 +1,5 @@
 % File src/library/grid/man/grid.set.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2009 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/grid/man/grid.show.layout.Rd b/src/library/grid/man/grid.show.layout.Rd
index d834db7..30588aa 100644
--- a/src/library/grid/man/grid.show.layout.Rd
+++ b/src/library/grid/man/grid.show.layout.Rd
@@ -1,5 +1,5 @@
 % File src/library/grid/man/grid.show.layout.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2013 R Core Team
 % Distributed under GPL 2 or later
 
@@ -14,7 +14,7 @@
 grid.show.layout(l, newpage=TRUE, vp.ex = 0.8, bg = "light grey",
              cell.border = "blue", cell.fill = "light blue",
              cell.label = TRUE, label.col = "blue",
-             unit.col = "red", vp = NULL)
+             unit.col = "red", vp = NULL, \dots)
 }
 \arguments{
   \item{l}{A Grid layout object.}
@@ -32,6 +32,8 @@ grid.show.layout(l, newpage=TRUE, vp.ex = 0.8, bg = "light grey",
   \item{unit.col}{The colour used for labelling the widths/heights of
     columns/rows.}
   \item{vp}{A Grid viewport object (or NULL).}
+  \item{\dots}{Arguments passed to \code{format} for formatting the
+    layout width and height annotations.}
 }
 \details{
   A viewport is created within \code{vp} to provide a margin for
diff --git a/src/library/grid/man/grid.show.viewport.Rd b/src/library/grid/man/grid.show.viewport.Rd
index 1c87cd6..ce39810 100644
--- a/src/library/grid/man/grid.show.viewport.Rd
+++ b/src/library/grid/man/grid.show.viewport.Rd
@@ -1,5 +1,5 @@
 % File src/library/grid/man/grid.show.viewport.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2013 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/grid/man/grid.text.Rd b/src/library/grid/man/grid.text.Rd
index 3bd6a91..8bc7d1c 100644
--- a/src/library/grid/man/grid.text.Rd
+++ b/src/library/grid/man/grid.text.Rd
@@ -1,5 +1,5 @@
 % File src/library/grid/man/grid.text.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2007 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/grid/man/grid.xaxis.Rd b/src/library/grid/man/grid.xaxis.Rd
index 029d96a..01c3d85 100644
--- a/src/library/grid/man/grid.xaxis.Rd
+++ b/src/library/grid/man/grid.xaxis.Rd
@@ -1,5 +1,5 @@
 % File src/library/grid/man/grid.xaxis.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2007 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/grid/man/grid.xspline.Rd b/src/library/grid/man/grid.xspline.Rd
index 4fa7c1a..d279977 100644
--- a/src/library/grid/man/grid.xspline.Rd
+++ b/src/library/grid/man/grid.xspline.Rd
@@ -1,10 +1,8 @@
 % File src/library/grid/man/grid.xspline.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2007 R Core Team
 % Distributed under GPL 2 or later
 
-\newcommand{\sspace}{\ifelse{latex}{\out{~}}{ }}
-
 \name{grid.xspline}
 \alias{grid.xspline}
 \alias{xsplineGrob}
diff --git a/src/library/grid/man/grid.yaxis.Rd b/src/library/grid/man/grid.yaxis.Rd
index a30795b..7379f2e 100644
--- a/src/library/grid/man/grid.yaxis.Rd
+++ b/src/library/grid/man/grid.yaxis.Rd
@@ -1,5 +1,5 @@
 % File src/library/grid/man/grid.yaxis.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2007 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/grid/man/grobName.Rd b/src/library/grid/man/grobName.Rd
index c720293..782f9a1 100644
--- a/src/library/grid/man/grobName.Rd
+++ b/src/library/grid/man/grobName.Rd
@@ -1,5 +1,5 @@
 % File src/library/grid/man/grobName.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2007 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/grid/man/grobWidth.Rd b/src/library/grid/man/grobWidth.Rd
index 90b5399..3591172 100644
--- a/src/library/grid/man/grobWidth.Rd
+++ b/src/library/grid/man/grobWidth.Rd
@@ -1,5 +1,5 @@
 % File src/library/grid/man/grobWidth.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2007 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/grid/man/grobX.Rd b/src/library/grid/man/grobX.Rd
index 7d6f723..2a14de2 100644
--- a/src/library/grid/man/grobX.Rd
+++ b/src/library/grid/man/grobX.Rd
@@ -1,5 +1,5 @@
 % File src/library/grid/man/grobX.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2007 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/grid/man/legendGrob.Rd b/src/library/grid/man/legendGrob.Rd
index 9277bf5..32373e4 100644
--- a/src/library/grid/man/legendGrob.Rd
+++ b/src/library/grid/man/legendGrob.Rd
@@ -1,5 +1,5 @@
 % File src/library/grid/man/legendGrob.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 2013 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/grid/man/makeContent.Rd b/src/library/grid/man/makeContent.Rd
index ef9e987..bd9ff85 100644
--- a/src/library/grid/man/makeContent.Rd
+++ b/src/library/grid/man/makeContent.Rd
@@ -1,5 +1,5 @@
 % File src/library/grid/man/makeContent.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2007 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/grid/man/plotViewport.Rd b/src/library/grid/man/plotViewport.Rd
index 609a77f..f82f723 100644
--- a/src/library/grid/man/plotViewport.Rd
+++ b/src/library/grid/man/plotViewport.Rd
@@ -1,5 +1,5 @@
 % File src/library/grid/man/plotViewport.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2007 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/grid/man/showGrob.Rd b/src/library/grid/man/showGrob.Rd
index c7aed7c..a25ace9 100644
--- a/src/library/grid/man/showGrob.Rd
+++ b/src/library/grid/man/showGrob.Rd
@@ -1,5 +1,5 @@
 % File src/library/grid/man/showGrob.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2011 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/grid/man/showViewport.Rd b/src/library/grid/man/showViewport.Rd
index b37bcff..00ea63c 100644
--- a/src/library/grid/man/showViewport.Rd
+++ b/src/library/grid/man/showViewport.Rd
@@ -1,5 +1,5 @@
 % File src/library/grid/man/showViewport.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2011 R Core Team
 % Distributed under GPL 2 or later
 
@@ -68,6 +68,11 @@ showViewport(vp = NULL, recurse = TRUE, depth = NULL,
 \examples{
 showViewport(viewport(width=.5, height=.5, name="vp"))
 
+grid.newpage()
+pushViewport(viewport(width=.5, height=.5, name="vp"))
+upViewport()
+showViewport(vpPath("vp"))
+
 showViewport(vpStack(viewport(width=.5, height=.5, name="vp1"),
                      viewport(width=.5, height=.5, name="vp2")),
              newpage=TRUE)
diff --git a/src/library/grid/man/stringWidth.Rd b/src/library/grid/man/stringWidth.Rd
index 8a739fa..b7e9e49 100644
--- a/src/library/grid/man/stringWidth.Rd
+++ b/src/library/grid/man/stringWidth.Rd
@@ -1,5 +1,5 @@
 % File src/library/grid/man/stringWidth.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2011 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/grid/man/unit.Rd b/src/library/grid/man/unit.Rd
index ea8c337..96ad605 100644
--- a/src/library/grid/man/unit.Rd
+++ b/src/library/grid/man/unit.Rd
@@ -1,5 +1,5 @@
 % File src/library/grid/man/unit.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2007 R Core Team
 % Distributed under GPL 2 or later
 
@@ -82,8 +82,9 @@ unit(x, units, data=NULL)
   data = list(NULL, "my string", NULL))
 }.
 
-  It is possible to subset unit objects in the normal way
-  (e.g., \code{unit(1:5, "npc")[2:4]}), but a special function
+  It is possible to subset unit objects in the normal way and to perform
+  subassignment (see the examples),
+  but a special function
   \code{unit.c} is provided for combining unit objects.
 
   Certain arithmetic and summary operations are defined for
@@ -92,6 +93,11 @@ unit(x, units, data=NULL)
   and to specify the minimum or maximum of a list
   of unit objects (e.g., \code{min(unit(0.5, "npc"), unit(1,
     "inches"))}).
+
+  There is a \code{format} method for units, which should respond to
+  the arguments for the default \code{format} method, e.g.,
+  \code{digits} to control the number of significant digits
+  printed for numeric values.
 }
 \section{WARNING}{
   There is a special function \code{unit.c} for concatenating
@@ -120,5 +126,9 @@ unit(1:3/4, "npc") + unit(1, "inches")
 min(unit(0.5, "npc"), unit(1, "inches"))
 unit.c(unit(0.5, "npc"), unit(2, "inches") + unit(1:3/4, "npc"),
        unit(1, "strwidth", "hi there"))
+x <- unit(1:5, "npc")
+x[2:4]
+x[2:4] <- unit(1, "mm")
+x
 }
 \keyword{dplot}
diff --git a/src/library/grid/man/unit.c.Rd b/src/library/grid/man/unit.c.Rd
index 45de864..f20c894 100644
--- a/src/library/grid/man/unit.c.Rd
+++ b/src/library/grid/man/unit.c.Rd
@@ -1,5 +1,5 @@
 % File src/library/grid/man/unit.c.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2007 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/grid/man/unit.length.Rd b/src/library/grid/man/unit.length.Rd
index f1b2ee2..86a3d02 100644
--- a/src/library/grid/man/unit.length.Rd
+++ b/src/library/grid/man/unit.length.Rd
@@ -1,5 +1,5 @@
 % File src/library/grid/man/unit.length.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2007 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/grid/man/unit.pmin.Rd b/src/library/grid/man/unit.pmin.Rd
index 4cbcd96..a31365f 100644
--- a/src/library/grid/man/unit.pmin.Rd
+++ b/src/library/grid/man/unit.pmin.Rd
@@ -1,5 +1,5 @@
 % File src/library/grid/man/unit.pmin.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2007 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/grid/man/unit.rep.Rd b/src/library/grid/man/unit.rep.Rd
index 70e5241..333897e 100644
--- a/src/library/grid/man/unit.rep.Rd
+++ b/src/library/grid/man/unit.rep.Rd
@@ -1,5 +1,5 @@
 % File src/library/grid/man/unit.rep.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2007 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/grid/man/valid.just.Rd b/src/library/grid/man/valid.just.Rd
index 14e1f1e..48296f8 100644
--- a/src/library/grid/man/valid.just.Rd
+++ b/src/library/grid/man/valid.just.Rd
@@ -1,5 +1,5 @@
 % File src/library/grid/man/valid.just.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2013 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/grid/man/validDetails.Rd b/src/library/grid/man/validDetails.Rd
index e0f1d59..95534a6 100644
--- a/src/library/grid/man/validDetails.Rd
+++ b/src/library/grid/man/validDetails.Rd
@@ -1,5 +1,5 @@
 % File src/library/grid/man/validDetails.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2007 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/grid/man/viewport.Rd b/src/library/grid/man/viewport.Rd
index 092a8c0..6df4ddf 100644
--- a/src/library/grid/man/viewport.Rd
+++ b/src/library/grid/man/viewport.Rd
@@ -1,5 +1,5 @@
 % File src/library/grid/man/viewport.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2013 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/grid/man/viewports.Rd b/src/library/grid/man/viewports.Rd
index 06371b1..1ac065b 100644
--- a/src/library/grid/man/viewports.Rd
+++ b/src/library/grid/man/viewports.Rd
@@ -1,5 +1,5 @@
 % File src/library/grid/man/viewports.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2013 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/grid/man/vpPath.Rd b/src/library/grid/man/vpPath.Rd
index 8b3265a..267509a 100644
--- a/src/library/grid/man/vpPath.Rd
+++ b/src/library/grid/man/vpPath.Rd
@@ -1,5 +1,5 @@
 % File src/library/grid/man/vpPath.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2007 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/grid/man/widthDetails.Rd b/src/library/grid/man/widthDetails.Rd
index 3e55cf6..28ba327 100644
--- a/src/library/grid/man/widthDetails.Rd
+++ b/src/library/grid/man/widthDetails.Rd
@@ -1,5 +1,5 @@
 % File src/library/grid/man/widthDetails.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2007 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/grid/man/xDetails.Rd b/src/library/grid/man/xDetails.Rd
index 7f2d644..bcc6fc1 100644
--- a/src/library/grid/man/xDetails.Rd
+++ b/src/library/grid/man/xDetails.Rd
@@ -1,5 +1,5 @@
 % File src/library/grid/man/xDetails.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2007 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/grid/man/xsplinePoints.Rd b/src/library/grid/man/xsplinePoints.Rd
index af8b0a0..bb0c88b 100644
--- a/src/library/grid/man/xsplinePoints.Rd
+++ b/src/library/grid/man/xsplinePoints.Rd
@@ -1,5 +1,5 @@
 % File src/library/grid/man/viewport.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 2009 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/grid/po/R-da.po b/src/library/grid/po/R-da.po
index 7ee2e99..bbd1ad5 100644
--- a/src/library/grid/po/R-da.po
+++ b/src/library/grid/po/R-da.po
@@ -2,7 +2,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: R 3.0.0\n"
 "Report-Msgid-Bugs-To: bugs.r-project.org\n"
-"POT-Creation-Date: 2014-02-27 17:14\n"
+"POT-Creation-Date: 2016-04-01 09:50\n"
 "PO-Revision-Date: 2012-01-29 12:58+0200\n"
 "Last-Translator: Joe <joedalton2 at yahoo.dk>\n"
 "Language-Team: LANGUAGE <LL at li.org>\n"
@@ -281,9 +281,6 @@ msgstr ""
 msgid "grob '%s' not found"
 msgstr ""
 
-msgid "invalid element in the display list"
-msgstr ""
-
 #, fuzzy
 msgid "Invalid force target"
 msgstr "Ugyldig »frame«"
@@ -351,9 +348,6 @@ msgstr "Ugyldig »grob«"
 msgid "invalid 'listing'"
 msgstr "Ugyldig »grob«"
 
-msgid "Nothing on the display list"
-msgstr ""
-
 #, fuzzy
 msgid "invalid 'origin'"
 msgstr "Ugyldig »grob«"
@@ -493,6 +487,9 @@ msgstr ""
 msgid "index out of bounds (unit list subsetting)"
 msgstr ""
 
+msgid "Value being assigned must be a unit"
+msgstr ""
+
 msgid "it is invalid to combine 'unit' objects with other types"
 msgstr ""
 
diff --git a/src/library/grid/po/R-de.po b/src/library/grid/po/R-de.po
index 41bc3d2..f291a8d 100644
--- a/src/library/grid/po/R-de.po
+++ b/src/library/grid/po/R-de.po
@@ -4,13 +4,13 @@
 # Detlef Steuer <steuer at hsu-hh.de>, 2007-2014.
 msgid ""
 msgstr ""
-"Project-Id-Version: R 3.1.0\n"
+"Project-Id-Version: R 3.2.0\n"
 "Report-Msgid-Bugs-To: bugs.r-project.org\n"
 "POT-Creation-Date: 2014-02-27 17:14\n"
-"PO-Revision-Date: 2013-03-01 15:59+0100\n"
+"PO-Revision-Date: 2016-04-08 11:20+0200\n"
 "Last-Translator: Detlef Steuer <steuer at hsu-hh.de>\n"
 "Language-Team: R-Core <R-core at r-project.org>\n"
-"Language: \n"
+"Language: de\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
@@ -112,7 +112,7 @@ msgid "must specify only one of 'font' and 'fontface'"
 msgstr "es darf nur entweder 'font' oder 'fontface' angegeben werden"
 
 msgid "invalid fontface"
-msgstr "ungültige Zeichensatzerscheinung"
+msgstr "ungültiger 'fontface' Wert"
 
 msgid "argument must be a 'gpar' object"
 msgstr "Argument muss ein 'gpar' Objekt sein"
@@ -145,13 +145,16 @@ msgid "must specify at least one viewport"
 msgstr "es muss zumindest ein Viewport angegeben werden"
 
 msgid "Down viewport failed to record on display list"
-msgstr "Abgeschalteter Viewport konnte nicht in die Displayliste aufnehmen"
+msgstr ""
+"Abgeschalteter Viewport konnte nicht in die Display-Liste "
+"aufgenommen werde"
 
 msgid "Down viewport incorrectly recorded on display list"
-msgstr "Abgeschalteter Viewport fälschlicherweise  in die Displayliste aufgenommen"
+msgstr ""
+"Abgeschalteter Viewport fälschlicherweise in die Displayliste aufgenommen"
 
 msgid "must pop at least one viewport"
-msgstr "es muss zumindest ein Viewport von Stack geholt werden"
+msgstr "es muss zumindest ein Viewport vom Stack geholt werden"
 
 msgid "must navigate up at least one viewport"
 msgstr "es muss mindestens ein Viewport nach oben navigiert werden"
@@ -163,7 +166,7 @@ msgid "invalid object inserted on the display list"
 msgstr "unzulässiges Objekt in die Displayliste eingefügt"
 
 msgid "invalid modification of the display list"
-msgstr "unzulässige Modifikation der Display-Liste"
+msgstr "unzulässige Modifikation der Displayliste"
 
 msgid "'expr' must return a grob or gList"
 msgstr "'expr' muss ein grob oder eine gList zurückgeben"
@@ -190,7 +193,7 @@ msgid "only 'grobs' allowed in \"gList\""
 msgstr "nur 'grobs' in \"gList\" erlaubt"
 
 msgid "invalid element to add to \"gList\""
-msgstr "unzulässiges Element für Hinzufügen in \"gList\""
+msgstr "unzulässiges Element zum Hinzufügen zu \"gList\""
 
 msgid "can only set 'children' for a \"gTree\""
 msgstr "kann nur 'children' für einen \"gTree\" setzen"
@@ -291,10 +294,10 @@ msgid "'vgap' must be single unit"
 msgstr "'vgap' muss eine einzelne Stelle sein"
 
 msgid "'nrow' must be >= 1"
-msgstr "'nrow' must >= 1 sein"
+msgstr "'nrow' muss >= 1 sein"
 
 msgid "'ncol' must be >= 1"
-msgstr "'ncol' must >= 1 sein"
+msgstr "'ncol' muss >= 1 sein"
 
 msgid "nrow * ncol < #{legend labels}"
 msgstr "nrow * ncol < #{legend labels}"
@@ -363,13 +366,13 @@ msgid "'x' and 'y' must be units or NULL"
 msgstr "'x' und 'y' müssen Einheiten oder NULL sein"
 
 msgid "corrupt 'arrows' object"
-msgstr "korruptes 'arrows' Objekt"
+msgstr "beschädigtes 'arrows' Objekt"
 
 msgid "x and y must be units"
 msgstr "x und y müssen Einheiten sein"
 
 msgid "must have exactly 4 control points"
-msgstr "nuss exakt 4 Kontrollpunkte haben"
+msgstr "muss exakt 4 Kontrollpunkte haben"
 
 msgid "must have exactly 4 control points per Bezier curve"
 msgstr "muss je Bezier-Kurve exakt 4 Kontrollpunkte haben"
@@ -432,22 +435,22 @@ msgid "only one operand may be a unit"
 msgstr "nur ein Operand darf eine Einheit sein"
 
 msgid "non-unit operand must be numeric"
-msgstr "Nicht-unit Operand muss numerisch sein"
+msgstr "non-unit Operand muss numerisch sein"
 
 msgid "both operands must be units"
-msgstr "Beide Operanden müssen Einheiten sein"
+msgstr "beide Operanden müssen Einheiten sein"
 
 msgid "'Summary' function '%s' not meaningful for units"
 msgstr "'Summary'-Funktion '%s' hat für Einheiten keine Bedeutung"
 
 msgid "no arguments where at least one expected"
-msgstr "Kein Argument, wo zumindest eines erwartet"
+msgstr "kein Argument, wo zumindest eines erwartet"
 
 msgid "Zero arguments where at least one expected"
 msgstr "Kein Argument, wo zumindest eines erwartet"
 
 msgid "cannot mix signs of indices"
-msgstr "Vorzeichen von Indices können nicht gemischt werden"
+msgstr "Vorzeichen von Indizes können nicht gemischt werden"
 
 msgid "index out of bounds ('unit' subsetting)"
 msgstr "Index außerhalb des Bereichs ('unit' Teilauswahl)"
@@ -460,7 +463,7 @@ msgstr "Index außerhalb des Bereichs (Einheitenlistenteilauswahl)"
 
 msgid "it is invalid to combine 'unit' objects with other types"
 msgstr ""
-"unzulässig 'unit' Objekte können nicht mit anderen Typen zu kombinieren"
+"unzulässig 'unit' Objekte mit anderen Typen zu kombinieren"
 
 msgid "invalid 'unit' object"
 msgstr "Unzulässiges 'unit' Objekt"
@@ -469,7 +472,7 @@ msgid "invalid 'theta'"
 msgstr "unzulässiges 'theta'"
 
 msgid "'range' must be numeric"
-msgstr "'range' muss nummerisch sein"
+msgstr "'range' muss numerisch sein"
 
 msgid "invalid 'gp' value"
 msgstr "ungültiger 'gp' Wert"
@@ -516,7 +519,7 @@ msgid "must specify at least one of 'y' or 'yscale'"
 msgstr "mindestens 'y' oder 'yscale' muss angegeben werden"
 
 msgid "shutting down all devices when unloading 'grid' namespace"
-msgstr "schließe alle Geräte, wenn der 'grid' Namensraum entfernt wird "
+msgstr "schließe alle Devices, wenn der 'grid' Namensraum entfernt wird "
 
 msgid "invalid grob name"
 msgid_plural "invalid grob names"
diff --git a/src/library/grid/po/R-fr.po b/src/library/grid/po/R-fr.po
index 559c986..cb75f06 100644
--- a/src/library/grid/po/R-fr.po
+++ b/src/library/grid/po/R-fr.po
@@ -7,7 +7,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: R 2.12.0\n"
 "Report-Msgid-Bugs-To: bugs.r-project.org\n"
-"POT-Creation-Date: 2014-02-27 17:14\n"
+"POT-Creation-Date: 2016-04-01 09:50\n"
 "PO-Revision-Date: 2014-03-17 10:52+0100\n"
 "Last-Translator: Philippe Grosjean <phgrosjean at sciviews.org>\n"
 "Language-Team: French <R-core at r-project.org>\n"
@@ -281,9 +281,6 @@ msgstr "gPath (%s) introuvable"
 msgid "grob '%s' not found"
 msgstr "grob '%s' introuvable"
 
-msgid "invalid element in the display list"
-msgstr "�l�ment incorrect dans la liste d'affichage (display list)"
-
 msgid "Invalid force target"
 msgstr "Cible incorrecte pour 'force'"
 
@@ -343,9 +340,6 @@ msgstr "listing incorrect"
 msgid "invalid 'listing'"
 msgstr "'listing' incorrect"
 
-msgid "Nothing on the display list"
-msgstr "Il n'y a rien dans la liste d'affichage (display list)"
-
 msgid "invalid 'origin'"
 msgstr "'origin' incorrecte"
 
@@ -482,6 +476,10 @@ msgstr "indice hors plage (indi
 msgid "index out of bounds (unit list subsetting)"
 msgstr "indice hors plage (indi�age de liste d'unit�s)"
 
+#, fuzzy
+msgid "Value being assigned must be a unit"
+msgstr "'x' et 'y' doivent �tre des unit�s"
+
 msgid "it is invalid to combine 'unit' objects with other types"
 msgstr "il n'est pas permis de combiner des objets unit�s avec d'autres types"
 
@@ -553,6 +551,12 @@ msgid_plural "invalid viewport names"
 msgstr[0] "nom de vue incorrect"
 msgstr[1] "noms de vues incorrects"
 
+#~ msgid "invalid element in the display list"
+#~ msgstr "�l�ment incorrect dans la liste d'affichage (display list)"
+
+#~ msgid "Nothing on the display list"
+#~ msgstr "Il n'y a rien dans la liste d'affichage (display list)"
+
 #~ msgid "the 'vp' argument is deprecated"
 #~ msgstr "l'argument 'vp' est obsol�te"
 
diff --git a/src/library/grid/po/R-grid.pot b/src/library/grid/po/R-grid.pot
index 762e1a5..fa89454 100644
--- a/src/library/grid/po/R-grid.pot
+++ b/src/library/grid/po/R-grid.pot
@@ -1,8 +1,7 @@
 msgid ""
 msgstr ""
-"Project-Id-Version: R 3.1.0\n"
-"Report-Msgid-Bugs-To: bugs.r-project.org\n"
-"POT-Creation-Date: 2014-02-27 17:14\n"
+"Project-Id-Version: grid 3.4.0\n"
+"POT-Creation-Date: 2016-04-01 09:50\n"
 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
 "Last-Translator: FULL NAME <EMAIL at ADDRESS>\n"
 "Language-Team: LANGUAGE <LL at li.org>\n"
@@ -242,9 +241,6 @@ msgstr ""
 msgid "grob '%s' not found"
 msgstr ""
 
-msgid "invalid element in the display list"
-msgstr ""
-
 msgid "Invalid force target"
 msgstr ""
 
@@ -302,9 +298,6 @@ msgstr ""
 msgid "invalid 'listing'"
 msgstr ""
 
-msgid "Nothing on the display list"
-msgstr ""
-
 msgid "invalid 'origin'"
 msgstr ""
 
@@ -437,6 +430,9 @@ msgstr ""
 msgid "index out of bounds (unit list subsetting)"
 msgstr ""
 
+msgid "Value being assigned must be a unit"
+msgstr ""
+
 msgid "it is invalid to combine 'unit' objects with other types"
 msgstr ""
 
diff --git a/src/library/grid/po/R-ja.po b/src/library/grid/po/R-ja.po
index b319932..4235b0e 100644
--- a/src/library/grid/po/R-ja.po
+++ b/src/library/grid/po/R-ja.po
@@ -2,7 +2,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: R 2.3.0 \n"
 "Report-Msgid-Bugs-To: bugs.r-project.org\n"
-"POT-Creation-Date: 2014-02-27 17:14\n"
+"POT-Creation-Date: 2016-04-01 09:50\n"
 "PO-Revision-Date: 2014-03-26 10:01+0200 \n"
 "Last-Translator: Masafumi  \n"
 "Language-Team: RjpWiki Message Translation Team <mokada at md.tsukuba.ac.jp> \n"
@@ -265,9 +265,6 @@ msgstr " gPath (%s) が見つかりません "
 msgid "grob '%s' not found"
 msgstr " grob '%s' が見つかりません "
 
-msgid "invalid element in the display list"
-msgstr " ディスプレイリストの中に不正な要素があります "
-
 msgid "Invalid force target"
 msgstr " 不正な force target です "
 
@@ -325,9 +322,6 @@ msgstr " 不正なリスティング "
 msgid "invalid 'listing'"
 msgstr " 不正な 'listing' "
 
-msgid "Nothing on the display list"
-msgstr " ディスプレイリストに何もありません "
-
 msgid "invalid 'origin'"
 msgstr " 不正な 'origin' です "
 
@@ -465,6 +459,10 @@ msgstr " 添え字が範囲を超えています (unit arithmetic subsetting) "
 msgid "index out of bounds (unit list subsetting)"
 msgstr " 添え字が範囲を超えています (unit list subsetting) "
 
+#, fuzzy
+msgid "Value being assigned must be a unit"
+msgstr " x と y は単位 (units) でなければなりません "
+
 msgid "it is invalid to combine 'unit' objects with other types"
 msgstr ""
 " 単位 ('unit') オブジェクトとそれ以外の型のオブジェクトを結合することは出来ま"
@@ -536,6 +534,12 @@ msgid "invalid viewport name"
 msgid_plural "invalid viewport names"
 msgstr[0] " 不正な viewport 名です "
 
+#~ msgid "invalid element in the display list"
+#~ msgstr " ディスプレイリストの中に不正な要素があります "
+
+#~ msgid "Nothing on the display list"
+#~ msgstr " ディスプレイリストに何もありません "
+
 #~ msgid "the 'vp' argument is deprecated"
 #~ msgstr " 引数 'vp' は廃止予定です "
 
diff --git a/src/library/grid/po/R-ko.po b/src/library/grid/po/R-ko.po
index 5feb92d..3cb32bf 100644
--- a/src/library/grid/po/R-ko.po
+++ b/src/library/grid/po/R-ko.po
@@ -1,24 +1,31 @@
 # Korean translation for R grid package
-# src/library/grid/po/R-ko.po
-# Copyright (C) 1995-2014 The R Core Team
+# ./grid/po/R-ko.po
+#
+# Copyright (C) 1995-2016 The R Core Team
+#
 # This file is distributed under the same license as the R grid package.
-# Chel Hee Lee <chl948 at mail.usask.ca>, 2008-2014.
+# Maintained by Chel Hee Lee <chl948 at mail.usask.ca>, 2008-2016.
+# Contact: Chel Hee Lee <gnustats at gmail.com>
+#
+# Notes:
+# Under development (unstable) starting from 11-APR-2016 for R-3.3.1 - QC: in progress
+# Freezed on 10-APR-2016 for R-3.3.0 - QC: PASS
+# Freezed on 30-MAR-2015 for R-3.2.0 - QC: PASS
+# Freezed on 06-FEB-2015 for R-3.1.3 - QC: PASS
 #
 msgid ""
 msgstr ""
-"Project-Id-Version: R 3.1.0\n"
+"Project-Id-Version: R-3.3.0\n"
 "Report-Msgid-Bugs-To: bugs.r-project.org\n"
-"POT-Creation-Date: 2014-02-27 17:14\n"
-"PO-Revision-Date: 2014-03-27 09:04-0600\n"
+"POT-Creation-Date: 2016-04-01 09:50\n"
+"PO-Revision-Date: 2016-04-11 13:08-0600\n"
 "Last-Translator: Chel Hee Lee <chl948 at mail.usask.ca>\n"
-"Language-Team:  <chl948 at mail.usask.ca>\n"
+"Language-Team: Chel Hee Lee <chl948 at mail.usask.ca>\n"
 "Language: ko\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
 "Plural-Forms: nplurals=1; plural=0;\n"
-"X-Poedit-SourceCharset: UTF-8\n"
-"X-Generator: Poedit 1.5.4\n"
 
 msgid "invalid 'at' location in 'axis'"
 msgstr "'axis'에 유효하지 않은 'at' 위치입니다"
@@ -267,9 +274,6 @@ msgstr "gPath (%s)를 찾을 수 없습니다"
 msgid "grob '%s' not found"
 msgstr "grob '%s'를 찾을 수 없습니다"
 
-msgid "invalid element in the display list"
-msgstr "디스플레이 목록에 유효하지 않은 항목이 있습니다"
-
 msgid "Invalid force target"
 msgstr ""
 
@@ -328,9 +332,6 @@ msgstr "유효하지 않은 listing입니다"
 msgid "invalid 'listing'"
 msgstr "유효하지 않은 'listing'입니다"
 
-msgid "Nothing on the display list"
-msgstr "디스플레이 목록에 아무것도 없습니다"
-
 msgid "invalid 'origin'"
 msgstr "유효하지 않은 'origin'입니다"
 
@@ -464,6 +465,9 @@ msgstr ""
 msgid "index out of bounds (unit list subsetting)"
 msgstr ""
 
+msgid "Value being assigned must be a unit"
+msgstr ""
+
 msgid "it is invalid to combine 'unit' objects with other types"
 msgstr "'unit'객체들과 다른 타입들의 결합은 유효하지 않습니다"
 
@@ -531,6 +535,12 @@ msgid "invalid viewport name"
 msgid_plural "invalid viewport names"
 msgstr[0] "유효하지 않은 뷰포트 이름입니다"
 
+#~ msgid "invalid element in the display list"
+#~ msgstr "디스플레이 목록에 유효하지 않은 항목이 있습니다"
+
+#~ msgid "Nothing on the display list"
+#~ msgstr "디스플레이 목록에 아무것도 없습니다"
+
 #~ msgid "the 'vp' argument is deprecated"
 #~ msgstr "'vp' 인자는 더이상 지원되지 않습니다"
 
diff --git a/src/library/grid/po/R-pl.po b/src/library/grid/po/R-pl.po
index 6537873..b160191 100644
--- a/src/library/grid/po/R-pl.po
+++ b/src/library/grid/po/R-pl.po
@@ -1,8 +1,8 @@
 msgid ""
 msgstr ""
-"Project-Id-Version: R 3.1.0\n"
+"Project-Id-Version: R 3.4.0\n"
 "Report-Msgid-Bugs-To: bugs.r-project.org\n"
-"POT-Creation-Date: 2014-02-27 17:14\n"
+"POT-Creation-Date: 2016-04-04 08:15\n"
 "PO-Revision-Date: \n"
 "Last-Translator: Łukasz Daniel <lukasz.daniel at gmail.com>\n"
 "Language-Team: Łukasz Daniel <lukasz.daniel at gmail.com>\n"
@@ -13,1054 +13,954 @@ msgstr ""
 "na-Revision-Date: 2012-05-29 07:55+0100\n"
 "Plural-Forms: nplurals=3; plural=(n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 "
 "|| n%100>=20) ? 1 : 2);\n"
-"X-Poedit-SourceCharset: iso-8859-1\n"
-"X-Generator: Poedit 1.5.4\n"
+"X-Poedit-SourceCharset: UTF-8\n"
+"X-Generator: Poedit 1.8.7\n"
 
-# grid/R/components.R: 42
-# stop("invalid 'at' location in 'axis'")
-msgid "invalid 'at' location in 'axis'"
-msgstr "niepoprawne położenie 'at' w 'axis'"
+#. R/unit.R: gettextf("'Summary' function '%s' not meaningful for units",     .Generic)
+#: R/unit.R:0
+msgid "'Summary' function '%s' not meaningful for units"
+msgstr "Funkcja 'summary' '%s' nie ma znaczenia dla jednostek"
 
-# grid/R/components.R: 48
-# stop("invalid to specify axis labels when 'at' is NULL")
-msgid "invalid to specify axis labels when 'at' is NULL"
-msgstr ""
-"nie można określać etykiet osi kiedy komponent 'at' argumentu 'x' ma wartość "
-"NULL"
+#. R/grob.R: stop("'allDevices' not yet implemented")
+#. R/grob.R: stop("'allDevices' not yet implemented")
+#. R/grob.R: stop("'allDevices' not yet implemented")
+#. R/grob.R: stop("'allDevices' not yet implemented")
+#: R/grob.R:0
+msgid "'allDevices' not yet implemented"
+msgstr "argument 'allDevices' nie jest jeszcze zaimplementowany"
 
-# grid/R/components.R: 53
-# stop("'labels' and 'at' locations must have same length")
-msgid "'labels' and 'at' locations must have same length"
-msgstr "argument 'labels' oraz położenia 'at' muszą mieć tę samą długość"
+#. R/curve.R: stop("'arrow' must be an arrow object or NULL")
+#: R/curve.R:0
+msgid "'arrow' must be an arrow object or NULL"
+msgstr "'arrow' musi być obiektem klasy \"arrow\" lub wartością NULL"
 
-# grid/R/components.R: 171
-# stop("logical 'label' supplied of length 0")
-# grid/R/components.R: 299
-# stop("logical 'label' supplied of length 0")
-msgid "logical 'label' supplied of length 0"
-msgstr "dostarczono logiczną wartość argumentu 'label' o długości 0"
+#. R/grob.R: stop("'children' must be a \"gList\"")
+#: R/grob.R:0
+msgid "'children' must be a \"gList\""
+msgstr "argument 'children' musi być obiektem klasy \"gList\""
 
-# grid/R/curve.R: 308
-# stop("end points must not be identical")
-msgid "end points must not be identical"
-msgstr "punkty końcowe nie mogą być identyczne"
+#. R/frames.R: stop("'col' can only be a range of existing columns")
+#: R/frames.R:0
+msgid "'col' can only be a range of existing columns"
+msgstr "'col' może być tylko z zakresu istniejących kolumn"
 
-# grid/R/curve.R: 455
-# stop("'x1', 'y1', 'x2', and 'y2' must be units")
-msgid "'x1', 'y1', 'x2', and 'y2' must be units"
-msgstr "argumenty Wielkości 'x1', 'y1', 'x2', oraz 'y2' muszą być jednostkami"
+#. R/grid.R: stop("'expr' must return a grob or gList")
+#: R/grid.R:0
+msgid "'expr' must return a grob or gList"
+msgstr "'expr' musi zwrócić obiekt klasy \"grob\" lub \"gList\""
 
-# grid/R/curve.R: 460
-# stop("'shape' must be between -1 and 1")
-# grid/R/primitives.R: 758
-# stop("'shape' must be between -1 and 1")
-msgid "'shape' must be between -1 and 1"
-msgstr "argument 'shape' musi być pomiędzy -1 a 1"
+#. R/edit.R: stop("'gEditList' can only contain 'gEdit' objects")
+#: R/edit.R:0
+msgid "'gEditList' can only contain 'gEdit' objects"
+msgstr "'gEditList()' może zawierać tylko obiekty klasy \"gEdit\""
 
-# grid/R/curve.R: 463
-# stop("'squareShape' must be between -1 and 1")
-msgid "'squareShape' must be between -1 and 1"
-msgstr "argument 'squareShape' musi być pomiędzy -1 a 1"
+#. R/grob.R: gettextf("'gPath' (%s) not found", as.character(gPath))
+#. R/grob.R: gettextf("'gPath' (%s) not found", as.character(gPath))
+#. R/grob.R: gettextf("'gPath' (%s) not found", as.character(gPath))
+#. R/grob.R: gettextf("'gPath' (%s) not found", as.character(gPath))
+#. R/grob.R: gettextf("'gPath' (%s) not found", gPath)
+#: R/grob.R:0
+msgid "'gPath' (%s) not found"
+msgstr "'gPath' (%s) nie został znaleziony"
 
-# grid/R/curve.R: 466
-# stop("'arrow' must be an arrow object or NULL")
-msgid "'arrow' must be an arrow object or NULL"
-msgstr "'arrow' musi być obiektem klasy \"arrow\" lub wartością NULL"
+#. R/grob.R: stop("'gPath' does not specify a valid child")
+#. R/grob.R: stop("'gPath' does not specify a valid child")
+#. R/grob.R: stop("'gPath' does not specify a valid child")
+#: R/grob.R:0
+msgid "'gPath' does not specify a valid child"
+msgstr "'gPath' nie określa poprawnego dziecka"
 
-# grid/R/debug.R: 386
-# stop("how did we get here?")
-msgid "how did we get here?"
-msgstr "jak się tu dostaliśmy?"
+#. R/unit.R: stop("'gPath' must have depth 1 in 'grobwidth/height' units")
+#: R/unit.R:0
+msgid "'gPath' must have depth 1 in 'grobwidth/height' units"
+msgstr "'gPath' musi mieć głębokość 1 w jednostkach 'grobwidth/height'"
 
-# grid/R/debug.R: 432
-# stop("must start new page if showing leaves separately")
-msgid "must start new page if showing leaves separately"
-msgstr ""
-"trzeba rozpocząć nową stronę jeśli liście mają być pokazywane oddzielnie"
+#. R/gpar.R: warning("'gamma' 'gpar' element is defunct")
+#. R/gpar.R: warning("'gamma' 'gpar' element is defunct")
+#. R/gpar.R: warning("'gamma' 'gpar' element is defunct")
+#: R/gpar.R:0
+msgid "'gamma' 'gpar' element is defunct"
+msgstr "'gamma' w 'gpar' jest przestarzałe"
 
-# grid/R/edit.R: 35
-# stop("invalid 'edit' information")
-# grid/R/edit.R: 67
-# stop("invalid 'edit' information")
-msgid "invalid 'edit' information"
-msgstr "niepoprawne wartość 'edit'"
+#. R/gpar.R: gettextf("'gpar' element '%s' must not be length 0", gparname)
+#: R/gpar.R:0
+msgid "'gpar' element '%s' must not be length 0"
+msgstr "element '%s' w 'gpar' nie może mieć długości 0"
 
-# grid/R/edit.R: 50
-# stop("'gEditList' can only contain 'gEdit' objects")
-msgid "'gEditList' can only contain 'gEdit' objects"
-msgstr "'gEditList()' może zawierać tylko obiekty klasy \"gEdit\""
+#. R/highlevel.R: stop("'hgap' must be single unit")
+#. R/highlevel.R: stop("'hgap' must be single unit")
+#: R/highlevel.R:0
+msgid "'hgap' must be single unit"
+msgstr "'hgap' musi być pojedynczą jednostką"
 
-# grid/R/frames.R: 136
-# stop("invalid 'frame'")
-# grid/R/frames.R: 327
-# stop("invalid 'frame'")
-msgid "invalid 'frame'"
-msgstr "niepoprawny argument 'frame'"
+#. R/highlevel.R: stop("'l' must be a layout")
+#: R/highlevel.R:0
+msgid "'l' must be a layout"
+msgstr "argument 'l' musi być layoutem"
 
-# grid/R/frames.R: 138
-# stop("invalid 'grob'")
-# grid/R/frames.R: 329
-# stop("invalid 'grob'")
-msgid "invalid 'grob'"
-msgstr "niepoprawny argument 'grob'"
+#. R/components.R: stop("'labels' and 'at' locations must have same length")
+#: R/components.R:0
+msgid "'labels' and 'at' locations must have same length"
+msgstr "argument 'labels' oraz położenia 'at' muszą mieć tę samą długość"
 
-# grid/R/frames.R: 150
-# stop("invalid 'row' and/or 'col' (no such cell in frame layout)")
-msgid "invalid 'row' and/or 'col' (no such cell in frame layout)"
+#. R/primitives.R: stop("'length' must be a 'unit' object")
+#. R/primitives.R: stop("'length' must be a 'unit' object")
+#: R/primitives.R:0
+msgid "'length' must be a 'unit' object"
+msgstr "argument 'length' musi być obiektem klasy \"unit\""
+
+#. R/highlevel.R: stop("'ncol' must be >= 1")
+#: R/highlevel.R:0
+msgid "'ncol' must be >= 1"
+msgstr "argument 'ncol' musi mieć wartość >= 1"
+
+#. R/highlevel.R: stop("'nrow' must be >= 1")
+#: R/highlevel.R:0
+msgid "'nrow' must be >= 1"
+msgstr "argument 'nrow' musi mieć wartość >= 1"
+
+#. R/viewport.R: stop("'parent' must be a viewport and 'children' must be a 'vpList' in 'vpTree'")
+#: R/viewport.R:0
+msgid ""
+"'parent' must be a viewport and 'children' must be a 'vpList' in 'vpTree'"
 msgstr ""
-"niepoprawne argumenty 'row' oraz/lub 'col' (brak takiej komórki w ramce "
-"layoutu)"
+"argument 'parent' musi być oknem ekranu oraz argument 'children' musi być "
+"'vpList' w 'vpTree'"
 
-# grid/R/frames.R: 189
-# stop("'col' can only be a range of existing columns")
-msgid "'col' can only be a range of existing columns"
-msgstr "'col' może być tylko z zakresu istniejących kolumn"
+#. R/highlevel.R: stop("'pch' and 'labels' not the same length")
+#: R/highlevel.R:0
+msgid "'pch' and 'labels' not the same length"
+msgstr "argumenty 'pch' oraz 'labels' nie są tej samej długości"
 
-# grid/R/frames.R: 195
-# stop("invalid 'col' specification")
-msgid "invalid 'col' specification"
-msgstr "niepoprawne określenie 'col'"
+#. R/roundRect.R: stop("'r' must be a 'unit' object")
+#: R/roundRect.R:0
+msgid "'r' must be a 'unit' object"
+msgstr "'r' musi być obiektem klasy \"unit\""
+
+#. R/util.R: stop("'range' must be numeric")
+#: R/util.R:0
+msgid "'range' must be numeric"
+msgstr "'range' musi być liczbą"
+
+#. R/layout.R: stop("'respect' must be logical or an 'nrow' by 'ncol' matrix")
+#: R/layout.R:0
+msgid "'respect' must be logical or an 'nrow' by 'ncol' matrix"
+msgstr ""
+"'respect' musi być wartością logiczną lub macierzą o rozmiarze 'nrow' na "
+"'ncol'"
 
-# grid/R/frames.R: 232
-# stop("'row' can only be a range of existing rows")
+#. R/frames.R: stop("'row' can only be a range of existing rows")
+#: R/frames.R:0
 msgid "'row' can only be a range of existing rows"
 msgstr "'row' może być tylko z zakresu istniejących wierszy"
 
-# grid/R/frames.R: 238
-# stop("invalid 'row' specification")
-msgid "invalid 'row' specification"
-msgstr "niepoprawne określenie 'row'"
+#. R/curve.R: stop("'shape' must be between -1 and 1")
+#. R/primitives.R: stop("'shape' must be between -1 and 1")
+#: R/curve.R:0 R/primitives.R:0
+msgid "'shape' must be between -1 and 1"
+msgstr "argument 'shape' musi być pomiędzy -1 a 1"
 
-# grid/R/frames.R: 372
-# stop("cannot specify more than one of 'side=[\"left\", \"right\"]', 'col', 'col.before', or 'col.after'")
-msgid ""
-"cannot specify more than one of 'side=[\"left\", \"right\"]', 'col', 'col."
-"before', or 'col.after'"
-msgstr ""
-"nie można określić więcej niż jeden z 'side=[\"left\", \"right\"]', 'col', "
-"'col.before', lub 'col.after'"
+#. R/curve.R: stop("'squareShape' must be between -1 and 1")
+#: R/curve.R:0
+msgid "'squareShape' must be between -1 and 1"
+msgstr "argument 'squareShape' musi być pomiędzy -1 a 1"
 
-# grid/R/frames.R: 386
-# stop("must specify exactly one of 'side=[\"top\", \"bottom\"]', 'row', 'row.before', or 'row.after'")
-msgid ""
-"must specify exactly one of 'side=[\"top\", \"bottom\"]', 'row', 'row."
-"before', or 'row.after'"
-msgstr ""
-"potrzeba określić dokładnie jeden z 'side=[\"top\", \"bottom\"]', 'row', "
-"'row.before', lub 'row.after'"
+#. R/highlevel.R: stop("'vgap' must be single unit")
+#. R/highlevel.R: stop("'vgap' must be single unit")
+#: R/highlevel.R:0
+msgid "'vgap' must be single unit"
+msgstr "'vgap' musi być pojedynczą jednostką"
 
-# grid/R/function.R: 22
-# stop("invalid 'n'")
-msgid "invalid 'n'"
-msgstr "niepoprawny argument 'n'"
+#. R/unit.R: stop("'x' and 'units' must have length > 0")
+#: R/unit.R:0
+msgid "'x' and 'units' must have length > 0"
+msgstr "argumenty 'x' oraz 'units' muszą mieć długość > 0"
 
-# grid/R/function.R: 26
-# stop("invalid 'f'")
-msgid "invalid 'f'"
-msgstr "niepoprawna wartość 'f'"
+#. R/primitives.R: stop("'x' and 'y' and 'id' must all be same length")
+#. R/primitives.R: stop("'x' and 'y' and 'id' must all be same length")
+#. R/primitives.R: stop("'x' and 'y' and 'id' must all be same length")
+#. R/primitives.R: stop("'x' and 'y' and 'id' must all be same length")
+#. R/primitives.R: stop("'x' and 'y' and 'id' must all be same length")
+#: R/primitives.R:0
+msgid "'x' and 'y' and 'id' must all be same length"
+msgstr ""
+"komponenty 'x' oraz 'y' oraz 'z' argumentu 'x' muszą wszystkie mieć tę samą "
+"długość"
 
-# grid/R/gpar.R: 42
-# stop(gettextf("'gpar' element '%s' must not be length 0", gparname),
-#            domain = NA)
-msgid "'gpar' element '%s' must not be length 0"
-msgstr "element '%s' w 'gpar' nie może mieć długości 0"
+#. R/primitives.R: stop("'x' and 'y' and 'id.lengths' must specify same overall length")
+#. R/primitives.R: stop("'x' and 'y' and 'id.lengths' must specify same overall length")
+#. R/primitives.R: stop("'x' and 'y' and 'id.lengths' must specify same overall length")
+#. R/primitives.R: stop("'x' and 'y' and 'id.lengths' must specify same overall length")
+#. R/primitives.R: stop("'x' and 'y' and 'id.lengths' must specify same overall length")
+#: R/primitives.R:0
+msgid "'x' and 'y' and 'id.lengths' must specify same overall length"
+msgstr ""
+"komponenty 'x' oraz 'y' oraz 'id.lengths' argumentu 'x' muszą określać tę "
+"samą całościową długość"
 
-# grid/R/gpar.R: 64
-# warning("'gamma' 'gpar' element is defunct")
-# grid/R/gpar.R: 189
-# warning("'gamma' 'gpar' element is defunct")
-# grid/R/gpar.R: 227
-# warning("'gamma' 'gpar' element is defunct")
-msgid "'gamma' 'gpar' element is defunct"
-msgstr "'gamma' w 'gpar' jest przestarzałe"
+#. R/primitives.R: stop("'x' and 'y' must all be units of length 1")
+#: R/primitives.R:0
+msgid "'x' and 'y' must all be units of length 1"
+msgstr "'x' oraz 'y' muszą być jednostkami o długości 1"
 
-# grid/R/gpar.R: 106
-# stop("invalid 'linemitre' value")
-msgid "invalid 'linemitre' value"
-msgstr "niepoprawna wartość 'linemitre'"
+#. R/primitives.R: stop("'x' and 'y' must be 'unit' objects and have the same length")
+#: R/primitives.R:0
+msgid "'x' and 'y' must be 'unit' objects and have the same length"
+msgstr ""
+"komponenty 'x' oraz 'y' argumentu 'x' muszą być obiektami klasy \"unit\" "
+"oraz muszą mieć tę samą długość"
 
-# grid/R/gpar.R: 111
-# stop("invalid 'alpha' value")
-msgid "invalid 'alpha' value"
-msgstr "niepoprawna wartość 'alpha'"
+#. R/primitives.R: stop("'x' and 'y' must be same length")
+#. R/primitives.R: stop("'x' and 'y' must be same length")
+#. R/primitives.R: stop("'x' and 'y' must be same length")
+#. R/primitives.R: stop("'x' and 'y' must be same length")
+#. R/primitives.R: stop("'x' and 'y' must be same length")
+#: R/primitives.R:0
+msgid "'x' and 'y' must be same length"
+msgstr "argumenty 'x' oraz 'units' muszą mieć tę samą długość"
 
-# grid/R/gpar.R: 136
-# stop("must specify only one of 'font' and 'fontface'")
-msgid "must specify only one of 'font' and 'fontface'"
-msgstr "potrzeba określić tylko jeden z 'font' oraz 'fontface'"
+#. R/primitives.R: stop("'x' and 'y' must be units")
+#. R/primitives.R: stop("'x' and 'y' must be units")
+#. R/primitives.R: stop("'x' and 'y' must be units")
+#. R/primitives.R: stop("'x' and 'y' must be units")
+#. R/primitives.R: stop("'x' and 'y' must be units")
+#. R/primitives.R: stop("'x' and 'y' must be units")
+#. R/primitives.R: stop("'x' and 'y' must be units")
+#. R/primitives.R: stop("'x' and 'y' must be units")
+#: R/primitives.R:0
+msgid "'x' and 'y' must be units"
+msgstr "argumenty 'x' oraz 'y' muszą być jednostkami"
 
-# grid/R/gpar.R: 156
-# stop("invalid fontface ", ch)
-msgid "invalid fontface"
-msgstr "niepoprawny krój czcionki"
+#. R/primitives.R: stop("'x' and 'y' must be units or NULL")
+#: R/primitives.R:0
+msgid "'x' and 'y' must be units or NULL"
+msgstr "'x' oraz 'y' muszą być jednostkami"
 
-# grid/R/gpar.R: 185
-# stop("argument must be a 'gpar' object")
-msgid "argument must be a 'gpar' object"
-msgstr "argument musi być obiektem klasy \"gpar\""
+#. R/primitives.R: stop("'x' and 'y' must have length 1")
+#. R/primitives.R: stop("'x' and 'y' must have length 1")
+#: R/primitives.R:0
+msgid "'x' and 'y' must have length 1"
+msgstr "argumenty 'x' oraz 'y' muszą mieć długość 1"
 
-# grid/R/gpar.R: 224
-# stop("must specify only valid 'gpar' names")
-msgid "must specify only valid 'gpar' names"
-msgstr "potrzeba określić tylko poprawne nazwy 'gpar'"
+#. R/unit.R: stop("'x' argument must be a unit object")
+#: R/unit.R:0
+msgid "'x' argument must be a unit object"
+msgstr "argument 'x' musi być obiektem klasy \"unit\""
 
-# grid/R/grab.R: 75
-# stop("invalid display list element")
-msgid "invalid display list element"
-msgstr "niepoprawne element listy wyświetleń"
+#. R/primitives.R: stop("'x', 'y' and 'size' must be units")
+#: R/primitives.R:0
+msgid "'x', 'y' and 'size' must be units"
+msgstr "'x', 'y' oraz 'size' muszą być jednostkami"
 
-# grid/R/grab.R: 116
-# warning("one of more grobs overwritten (grab WILL not be faithful; try 'wrap = TRUE')")
-msgid ""
-"one of more grobs overwritten (grab WILL not be faithful; try 'wrap = TRUE')"
+#. R/primitives.R: stop("'x', 'y', 'width', and 'height' must all be units of length 1")
+#. R/viewport.R: stop("'x', 'y', 'width', and 'height' must all be units of length 1")
+#: R/primitives.R:0 R/viewport.R:0
+msgid "'x', 'y', 'width', and 'height' must all be units of length 1"
 msgstr ""
-"jeden lub więcej 'grob' nadpisane ('grab' NIE BĘDZIE wiarygodne; spróbuj "
-"'wrap=TRUE')"
+"argumenty 'x', 'y', 'width' oraz 'height' muszą wszystkie być jednostkami o "
+"długości 1"
 
-# grid/R/grab.R: 142
-# warning("viewport overwritten (grab MAY not be faithful)")
-# grid/R/grab.R: 182
-# warning("viewport overwritten (grab MAY not be faithful)")
-msgid "viewport overwritten (grab MAY not be faithful)"
-msgstr "okno ekranu nadpisane ('grab' MOŻE nie być wiarygodne)"
+#. R/primitives.R: stop("'x', 'y', 'width', and 'height' must be units")
+#. R/primitives.R: stop("'x', 'y', 'width', and 'height' must be units")
+#. R/primitives.R: stop("'x', 'y', 'width', and 'height' must be units")
+#. R/roundRect.R: stop("'x', 'y', 'width', and 'height' must be units")
+#: R/primitives.R:0 R/roundRect.R:0
+msgid "'x', 'y', 'width', and 'height' must be units"
+msgstr "'x', 'y', 'width', oraz 'height' muszą być jednostkami"
 
-# grid/R/grab.R: 168
-# warning("grob pushed viewports and did not pop/up them (grab MAY not be faithful)")
-msgid ""
-"grob pushed viewports and did not pop/up them (grab MAY not be faithful)"
-msgstr ""
-"'grob' wypchnął okna ekranów i nie wyświetlił ich ('grab' MOŻE nie być "
-"wiarygodny)"
+#. R/roundRect.R: stop("'x', 'y', 'width', and 'height' must have length 1")
+#: R/roundRect.R:0
+msgid "'x', 'y', 'width', and 'height' must have length 1"
+msgstr "'x', 'y', 'width', oraz 'height' muszą mieć długość 1"
 
-# grid/R/grid.R: 28
-# stop("only valid to push viewports")
-msgid "only valid to push viewports"
-msgstr "poprawne tylko dla wypychanych okien ekranów"
+#. R/primitives.R: stop("'x', 'y', and 'r' must be units")
+#: R/primitives.R:0
+msgid "'x', 'y', and 'r' must be units"
+msgstr "'x', 'y', oraz 'r' muszą być jednostkami"
 
-# grid/R/grid.R: 98
-# stop("must specify at least one viewport")
-msgid "must specify at least one viewport"
-msgstr "przynajmniej jedno okno ekranu musi być określone"
+#. R/primitives.R: stop("'x0', 'y0', 'x1', and 'y1' must be units")
+#: R/primitives.R:0
+msgid "'x0', 'y0', 'x1', and 'y1' must be units"
+msgstr "Wielkości 'x0', 'y0', 'x1', oraz 'y1' muszą być jednostkami"
 
-# grid/R/grid.R: 152
-# stop("Down viewport failed to record on display list")
+#. R/curve.R: stop("'x1', 'y1', 'x2', and 'y2' must be units")
+#: R/curve.R:0
+msgid "'x1', 'y1', 'x2', and 'y2' must be units"
+msgstr "argumenty Wielkości 'x1', 'y1', 'x2', oraz 'y2' muszą być jednostkami"
+
+#. R/grid.R: stop("Down viewport failed to record on display list")
+#: R/grid.R:0
 msgid "Down viewport failed to record on display list"
 msgstr "Nie udało się poprawnie zarejestrować okna ekranu na liście wyświetleń"
 
-# grid/R/grid.R: 158
-# warning("Down viewport incorrectly recorded on display list")
+#. R/grid.R: warning("Down viewport incorrectly recorded on display list")
+#: R/grid.R:0
 msgid "Down viewport incorrectly recorded on display list"
 msgstr "Okno ekranu nie poprawnie zarejestrowane na liście wyświetleń"
 
-# grid/R/grid.R: 213
-# stop("must pop at least one viewport")
-msgid "must pop at least one viewport"
-msgstr "potrzeba wyświetlić przynajmniej jedno okno ekranu"
+#. R/grob.R: stop("Invalid 'order'")
+#: R/grob.R:0
+msgid "Invalid 'order'"
+msgstr "niepoprawna wartość 'order'"
 
-# grid/R/grid.R: 231
-# stop("must navigate up at least one viewport")
-msgid "must navigate up at least one viewport"
-msgstr "potrzeba przenieść w górę przynajmniej jedno okno ekranu"
+#. R/grob.R: stop("Invalid force target")
+#: R/grob.R:0
+msgid "Invalid force target"
+msgstr "niepoprawny cel 'force'"
 
-# grid/R/grid.R: 274
-# stop("Invalid number of generations")
-# grid/R/grid.R: 279
-# stop("Invalid number of generations")
+#. R/grid.R: stop("Invalid number of generations")
+#. R/grid.R: stop("Invalid number of generations")
+#: R/grid.R:0
 msgid "Invalid number of generations"
 msgstr "niepoprawna liczba generacji"
 
-# grid/R/grid.R: 412
-# stop("invalid object inserted on the display list")
-msgid "invalid object inserted on the display list"
-msgstr "niepoprawne obiekty wstawione na listę wyświetleń"
-
-# grid/R/grid.R: 462
-# stop("invalid modification of the display list")
-msgid "invalid modification of the display list"
-msgstr "niepoprawna modyfikacja listy wyświetleń"
-
-# grid/R/grid.R: 530
-# stop("'expr' must return a grob or gList")
-msgid "'expr' must return a grob or gList"
-msgstr "'expr' musi zwrócić obiekt klasy \"grob\" lub \"gList\""
-
-# grid/R/grob.R: 44
-# stop("invalid 'grob' argument")
-msgid "invalid 'grob' argument"
-msgstr "niepoprawny argument 'grob'"
+#. R/grob.R: stop("Invalid revert target")
+#: R/grob.R:0
+msgid "Invalid revert target"
+msgstr "niepoprawny cel 'revert'"
 
-# grid/R/grob.R: 61
-# stop("invalid 'vp' slot")
-msgid "invalid 'vp' slot"
-msgstr "niepoprawne gniazdo 'vp'"
+#. R/grob.R: gettextf("New 'grob' name (%s) does not match 'gPath' (%s)",     newGrob$name, gPath)
+#: R/grob.R:0
+msgid "New 'grob' name (%s) does not match 'gPath' (%s)"
+msgstr "Nowa nazwa 'grob' (%s) nie zgadza się z 'gPath' (%s)"
 
-# grid/R/grob.R: 81
-# stop("invalid 'gp' slot")
-msgid "invalid 'gp' slot"
-msgstr "niepoprawne gniazdo 'gp'"
+#. R/unit.R: stop("Value being assigned must be a unit")
+#: R/unit.R:0
+msgid "Value being assigned must be a unit"
+msgstr "Wartość przypisywana musi być jednostką"
 
-# grid/R/grob.R: 113
-# stop("invalid 'grob' class")
-msgid "invalid 'grob' class"
-msgstr "niepoprawna klasa 'grob'"
+#. R/unit.R: stop("Zero arguments where at least one expected")
+#: R/unit.R:0
+msgid "Zero arguments where at least one expected"
+msgstr "Zero argumentów gdzie oczekiwano przynajmniej jednego"
 
-# grid/R/grob.R: 147
-# stop("a 'grob' path must contain at least one 'grob' name")
+#. R/grob.R: stop("a 'grob' path must contain at least one 'grob' name")
+#: R/grob.R:0
 msgid "a 'grob' path must contain at least one 'grob' name"
 msgstr "ścieżka 'grob' musi zawierać przynajmniej jedną nazwę 'grob'"
 
-# grid/R/grob.R: 182
-# stop("unable to coerce to \"gList\"")
-msgid "unable to coerce to \"gList\""
-msgstr "nie można przekształcić argumentu 'x' na obiekt klasy \"gList\""
+#. R/viewport.R: stop("a viewport path must contain at least one viewport name")
+#: R/viewport.R:0
+msgid "a viewport path must contain at least one viewport name"
+msgstr "ścieżka okna ekranu musi zawierać przynajmniej jedną nazwę okna ekranu"
 
-# grid/R/grob.R: 198
-# stop("only 'grobs' allowed in \"gList\"")
-msgid "only 'grobs' allowed in \"gList\""
-msgstr "tylko 'grobs' są dozwolone w \"gList\""
+#. R/gpar.R: stop("argument must be a 'gpar' object")
+#: R/gpar.R:0
+msgid "argument must be a 'gpar' object"
+msgstr "argument musi być obiektem klasy \"gpar\""
 
-# grid/R/grob.R: 210
-# stop("invalid element to add to \"gList\"")
-msgid "invalid element to add to \"gList\""
-msgstr "niepoprawny element do dodania do obiektu klasy \"gList\""
+#. R/unit.R: stop("both operands must be units")
+#: R/unit.R:0
+msgid "both operands must be units"
+msgstr "oba operatory muszą być jednostkami"
 
-# grid/R/grob.R: 255
-# stop("can only set 'children' for a \"gTree\"")
+#. R/grob.R: stop("can only reorder 'children' for a \"gTree\"")
+#: R/grob.R:0
+msgid "can only reorder 'children' for a \"gTree\""
+msgstr "można jedynie zmienić kolejność argumentu 'children' dla \"gTree\""
+
+#. R/grob.R: stop("can only set 'children' for a \"gTree\"")
+#: R/grob.R:0
 msgid "can only set 'children' for a \"gTree\""
 msgstr "można jedynie ustwić dzieci dla \"gTree\""
 
-# grid/R/grob.R: 258
-# stop("'children' must be a \"gList\"")
-msgid "'children' must be a \"gList\""
-msgstr "argument 'children' musi być obiektem klasy \"gList\""
+#. R/unit.R: stop("cannot mix signs of indices")
+#. R/unit.R: stop("cannot mix signs of indices")
+#. R/unit.R: stop("cannot mix signs of indices")
+#: R/unit.R:0
+msgid "cannot mix signs of indices"
+msgstr "nie można mieszać znaków indeksów"
 
-# grid/R/grob.R: 279
-# stop("it is only valid to get 'children' from a \"gTree\"")
-msgid "it is only valid to get 'children' from a \"gTree\""
-msgstr "poprawne jest jedynie uzyskanie dzieci z \"gTree\""
+#. R/frames.R: stop("cannot specify more than one of 'side=[\"left\", \"right\"]', 'col', 'col.before', or 'col.after'")
+#: R/frames.R:0
+msgid ""
+"cannot specify more than one of 'side=[\"left\", \"right\"]', 'col', 'col."
+"before', or 'col.after'"
+msgstr ""
+"nie można określić więcej niż jeden z 'side=[\"left\", \"right\"]', 'col', "
+"'col.before', lub 'col.after'"
+
+#. R/primitives.R: stop("corrupt 'arrows' object")
+#. R/primitives.R: stop("corrupt 'arrows' object")
+#. R/primitives.R: stop("corrupt 'arrows' object")
+#: R/primitives.R:0
+msgid "corrupt 'arrows' object"
+msgstr "uszkodzony obiekt 'arrows'"
+
+#. R/curve.R: stop("end points must not be identical")
+#: R/curve.R:0
+msgid "end points must not be identical"
+msgstr "punkty końcowe nie mogą być identyczne"
+
+#. R/grob.R: gettextf("gPath (%s) not found", paste(gPath, name, sep = .grid.pathSep))
+#. R/grob.R: gettextf("gPath (%s) not found", name)
+#: R/grob.R:0
+msgid "gPath (%s) not found"
+msgstr "'gPath' (%s) nie został znaleziony"
+
+#. R/grob.R: gettextf("grob '%s' not found", name)
+#. R/grob.R: gettextf("grob '%s' not found", name)
+#: R/grob.R:0
+msgid "grob '%s' not found"
+msgstr "'grob' (%s) nie został znaleziony"
+
+#. R/grab.R: warning("grob pushed viewports and did not pop/up them (grab MAY not be faithful)")
+#: R/grab.R:0
+msgid ""
+"grob pushed viewports and did not pop/up them (grab MAY not be faithful)"
+msgstr ""
+"'grob' wypchnął okna ekranów i nie wyświetlił ich ('grab' MOŻE nie być "
+"wiarygodny)"
 
-# grid/R/grob.R: 306
-# stop("invalid \"gTree\" class")
+#. R/debug.R: stop("how did we get here?")
+#: R/debug.R:0
+msgid "how did we get here?"
+msgstr "jak się tu dostaliśmy?"
+
+#. R/unit.R: stop("index out of bounds ('unit' subsetting)")
+#: R/unit.R:0
+msgid "index out of bounds ('unit' subsetting)"
+msgstr "indeks poza zakresem (podzbiór 'unit')"
+
+#. R/unit.R: stop("index out of bounds (unit arithmetic subsetting)")
+#: R/unit.R:0
+msgid "index out of bounds (unit arithmetic subsetting)"
+msgstr "indeks poza zakresem (arytmetyczny podzbiór jednostki)"
+
+#. R/unit.R: stop("index out of bounds (unit list subsetting)")
+#: R/unit.R:0
+msgid "index out of bounds (unit list subsetting)"
+msgstr "indeks poza zakresem (podzbiór listy jednostek)"
+
+#. R/grob.R: stop("invalid \"gTree\" class")
+#: R/grob.R:0
 msgid "invalid \"gTree\" class"
 msgstr "niepoprawna klasa \"gTree\""
 
-# grid/R/grob.R: 352
-# stop("'allDevices' not yet implemented")
-# grid/R/grob.R: 456
-# stop("'allDevices' not yet implemented")
-# grid/R/grob.R: 502
-# stop("'allDevices' not yet implemented")
-# grid/R/grob.R: 567
-# stop("'allDevices' not yet implemented")
-msgid "'allDevices' not yet implemented"
-msgstr "argument 'allDevices' nie jest jeszcze zaimplementowany"
+#. R/gpar.R: stop("invalid 'alpha' value")
+#: R/gpar.R:0
+msgid "invalid 'alpha' value"
+msgstr "niepoprawna wartość 'alpha'"
 
-# grid/R/grob.R: 356
-# stop("invalid 'gPath'")
-# grid/R/grob.R: 377
-# stop("invalid 'gPath'")
-# grid/R/grob.R: 395
-# stop("invalid 'gPath'")
-# grid/R/grob.R: 426
-# stop("invalid 'gPath'")
-# grid/R/grob.R: 460
-# stop("invalid 'gPath'")
-# grid/R/grob.R: 506
-# stop("invalid 'gPath'")
-# grid/R/grob.R: 536
-# stop("invalid 'gPath'")
-# grid/R/grob.R: 571
-# stop("invalid 'gPath'")
-msgid "invalid 'gPath'"
-msgstr "niepoprawne wartość 'gPath'"
+#. R/viewport.R: stop("invalid 'angle' in viewport")
+#: R/viewport.R:0
+msgid "invalid 'angle' in viewport"
+msgstr "niepoprawny argument 'angle' w oknie ekranu"
 
-# grid/R/grob.R: 358
-# stop("invalid 'grep' value")
-# grid/R/grob.R: 382
-# stop("invalid 'grep' value")
-# grid/R/grob.R: 397
-# stop("invalid 'grep' value")
-# grid/R/grob.R: 428
-# stop("invalid 'grep' value")
-# grid/R/grob.R: 462
-# stop("invalid 'grep' value")
-# grid/R/grob.R: 481
-# stop("invalid 'grep' value")
-# grid/R/grob.R: 508
-# stop("invalid 'grep' value")
-# grid/R/grob.R: 538
-# stop("invalid 'grep' value")
-# grid/R/grob.R: 573
-# stop("invalid 'grep' value")
-# grid/R/grob.R: 598
-# stop("invalid 'grep' value")
-msgid "invalid 'grep' value"
-msgstr "niepoprawna wartość 'grep'"
+#. R/primitives.R: stop("invalid 'arrow' argument")
+#. R/primitives.R: stop("invalid 'arrow' argument")
+#. R/primitives.R: stop("invalid 'arrow' argument")
+#. R/primitives.R: stop("invalid 'arrow' argument")
+#. R/primitives.R: stop("invalid 'arrow' argument")
+#. R/primitives.R: stop("invalid 'arrow' argument")
+#: R/primitives.R:0
+msgid "invalid 'arrow' argument"
+msgstr "niepoprawny argument 'arrow'"
 
-# grid/R/grob.R: 373
-# stop("it is only valid to get a child from a \"gTree\"")
-msgid "it is only valid to get a child from a \"gTree\""
-msgstr "poprawne jest jedynie uzyskanie dziecka z \"gTree\""
+#. R/components.R: stop("invalid 'at' location in 'axis'")
+#: R/components.R:0
+msgid "invalid 'at' location in 'axis'"
+msgstr "niepoprawne położenie 'at' w 'axis'"
 
-# grid/R/grob.R: 412
-# stop("'gPath' does not specify a valid child")
-# grid/R/grob.R: 441
-# stop("'gPath' does not specify a valid child")
-# grid/R/grob.R: 446
-# stop("'gPath' does not specify a valid child")
-msgid "'gPath' does not specify a valid child"
-msgstr "'gPath' nie określa poprawnego dziecka"
+#. R/unit.R: stop("invalid 'axis' or 'type'")
+#: R/unit.R:0
+msgid "invalid 'axis' or 'type'"
+msgstr "niepoprawna wartość 'axis' lub 'type'"
 
-# grid/R/grob.R: 420
-# stop("it is only valid to set a child of a \"gTree\"")
-msgid "it is only valid to set a child of a \"gTree\""
-msgstr "poprawne jest jedynie ustawienie dziecka \"gTree\""
+#. R/viewport.R: stop("invalid 'clip' value")
+#: R/viewport.R:0
+msgid "invalid 'clip' value"
+msgstr "niepoprawna wartość 'clip'"
 
-# grid/R/grob.R: 422
-# stop("it is only valid to set a 'grob' as child of a \"gTree\"")
-msgid "it is only valid to set a 'grob' as child of a \"gTree\""
-msgstr "poprawne jest jedynie ustawienie'grob' jako dziecka \"gTree\""
+#. R/frames.R: stop("invalid 'col' specification")
+#: R/frames.R:0
+msgid "invalid 'col' specification"
+msgstr "niepoprawne określenie 'col'"
 
-# grid/R/grob.R: 437
-# stop(gettextf("New 'grob' name (%s) does not match 'gPath' (%s)",
-#                         newGrob$name, gPath), domain = NA)
-msgid "New 'grob' name (%s) does not match 'gPath' (%s)"
-msgstr "Nowa nazwa 'grob' (%s) nie zgadza się z 'gPath' (%s)"
+#. R/edit.R: stop("invalid 'edit' information")
+#. R/edit.R: stop("invalid 'edit' information")
+#: R/edit.R:0
+msgid "invalid 'edit' information"
+msgstr "niepoprawne wartość 'edit'"
 
-# grid/R/grob.R: 471
-# stop("it is only valid to add a 'grob' to a \"gTree\"")
-msgid "it is only valid to add a 'grob' to a \"gTree\""
-msgstr "poprawne jest jedynie dodanie 'grob' do \"gTree\""
+#. R/primitives.R: stop("invalid 'ends' or 'type' argument")
+#. R/primitives.R: stop("invalid 'ends' or 'type' argument")
+#: R/primitives.R:0
+msgid "invalid 'ends' or 'type' argument"
+msgstr "niepoprawny argument 'ends' lub 'type'"
 
-# grid/R/grob.R: 479
-# stop("it is only valid to add a child to a \"gTree\"")
-# grid/R/grob.R: 1210
-# stop("it is only valid to add a child to a \"gTree\"")
-# grid/R/grob.R: 1243
-# stop("it is only valid to add a child to a \"gTree\"")
-msgid "it is only valid to add a child to a \"gTree\""
-msgstr "poprawne jest jedynie dodanie dziecka do \"gTree\""
+#. R/function.R: stop("invalid 'f'")
+#: R/function.R:0
+msgid "invalid 'f'"
+msgstr "niepoprawna wartość 'f'"
 
-# grid/R/grob.R: 487
-# warning(gettextf("'gPath' (%s) not found",
-#                                  as.character(gPath)),
-#                         domain = NA)
-# grid/R/grob.R: 554
-# warning(gettextf("'gPath' (%s) not found", as.character(gPath)),
-#                     domain = NA)
-# grid/R/grob.R: 604
-# warning(gettextf("'gPath' (%s) not found",
-#                                  as.character(gPath)),
-#                         domain = NA)
-# grid/R/grob.R: 1198
-# stop(gettextf("'gPath' (%s) not found", as.character(gPath)), domain = NA)
-# grid/R/grob.R: 1362
-# stop(gettextf("'gPath' (%s) not found", gPath), domain = NA)
-msgid "'gPath' (%s) not found"
-msgstr "'gPath' (%s) nie został znaleziony"
+#. R/frames.R: stop("invalid 'frame'")
+#. R/frames.R: stop("invalid 'frame'")
+#: R/frames.R:0
+msgid "invalid 'frame'"
+msgstr "niepoprawny argument 'frame'"
 
-# grid/R/grob.R: 532
-# stop("it is only valid to remove a child from a \"gTree\"")
-# grid/R/grob.R: 1373
-# stop("it is only valid to remove a child from a \"gTree\"")
-msgid "it is only valid to remove a child from a \"gTree\""
-msgstr "poprawne jest jedynie usunięcie dziecka do \"gTree\""
+#. R/grob.R: stop("invalid 'gPath'")
+#. R/grob.R: stop("invalid 'gPath'")
+#. R/grob.R: stop("invalid 'gPath'")
+#. R/grob.R: stop("invalid 'gPath'")
+#. R/grob.R: stop("invalid 'gPath'")
+#. R/grob.R: stop("invalid 'gPath'")
+#. R/grob.R: stop("invalid 'gPath'")
+#. R/grob.R: stop("invalid 'gPath'")
+#: R/grob.R:0
+msgid "invalid 'gPath'"
+msgstr "niepoprawne wartość 'gPath'"
 
-# grid/R/grob.R: 596
-# stop("it is only valid to edit a child of a \"gTree\"")
-msgid "it is only valid to edit a child of a \"gTree\""
-msgstr "poprawna jest jedynie edycja dziecka \"gTree\""
+#. R/grob.R: stop("invalid 'gp' slot")
+#: R/grob.R:0
+msgid "invalid 'gp' slot"
+msgstr "niepoprawne gniazdo 'gp'"
 
-# grid/R/grob.R: 629
-# stop("it is invalid to directly edit the 'children' or 'childrenOrder' slot")
-msgid "it is invalid to directly edit the 'children' or 'childrenOrder' slot"
-msgstr ""
-"niepoprawne jest bezpośrednie edytowanie gniazda 'children' lub "
-"'childrenOrder'"
+#. R/viewport.R: stop("invalid 'gp' value")
+#: R/viewport.R:0
+msgid "invalid 'gp' value"
+msgstr "niepoprawna wartość 'gp'"
 
-# grid/R/grob.R: 740
-# stop("invalid 'result'")
-msgid "invalid 'result'"
-msgstr "niepoprawna wartość 'result'"
+#. R/grob.R: stop("invalid 'grep' value")
+#. R/grob.R: stop("invalid 'grep' value")
+#. R/grob.R: stop("invalid 'grep' value")
+#. R/grob.R: stop("invalid 'grep' value")
+#. R/grob.R: stop("invalid 'grep' value")
+#. R/grob.R: stop("invalid 'grep' value")
+#. R/grob.R: stop("invalid 'grep' value")
+#. R/grob.R: stop("invalid 'grep' value")
+#. R/grob.R: stop("invalid 'grep' value")
+#. R/grob.R: stop("invalid 'grep' value")
+#: R/grob.R:0
+msgid "invalid 'grep' value"
+msgstr "niepoprawna wartość 'grep'"
 
-# grid/R/grob.R: 938
-# stop("the new 'grob' must have the same name as the old 'grob'")
-# grid/R/grob.R: 962
-# stop("the new 'grob' must have the same name as the old 'grob'")
-# grid/R/grob.R: 998
-# stop("the new 'grob' must have the same name as the old 'grob'")
-msgid "the new 'grob' must have the same name as the old 'grob'"
-msgstr "nowy 'grob' musi mieć tę samą nazwę jak stary 'grob'"
+#. R/frames.R: stop("invalid 'grob'")
+#. R/frames.R: stop("invalid 'grob'")
+#: R/frames.R:0
+msgid "invalid 'grob'"
+msgstr "niepoprawny argument 'grob'"
 
-# grid/R/grob.R: 1051
-# warning(gettextf("slot '%s' not found", i), domain = NA)
-msgid "slot '%s' not found"
-msgstr "gniazdo '%s' nie zostało znalezione"
+#. R/grob.R: stop("invalid 'grob' argument")
+#: R/grob.R:0
+msgid "invalid 'grob' argument"
+msgstr "niepoprawny argument 'grob'"
 
-# grid/R/grob.R: 1538
-# stop(gettextf("gPath (%s) not found",
-#                   paste(gPath, name, sep=.grid.pathSep)),
-#                   domain = NA)
-# grid/R/grob.R: 1634
-# stop(gettextf("gPath (%s) not found", name), domain = NA)
-msgid "gPath (%s) not found"
-msgstr "'gPath' (%s) nie został znaleziony"
+#. R/grob.R: stop("invalid 'grob' class")
+#: R/grob.R:0
+msgid "invalid 'grob' class"
+msgstr "niepoprawna klasa 'grob'"
 
-# grid/R/grob.R: 1666
-# stop(gettextf("grob '%s' not found", name), domain = NA)
-# grid/R/grob.R: 1679
-# stop(gettextf("grob '%s' not found", name), domain = NA)
-msgid "grob '%s' not found"
-msgstr "'grob' (%s) nie został znaleziony"
+#. R/viewport.R: stop("invalid 'layout' in viewport")
+#: R/viewport.R:0
+msgid "invalid 'layout' in viewport"
+msgstr "niepoprawny argument 'layout' w oknie ekranu"
 
-# grid/R/grob.R: 1703
-# stop("invalid element in the display list")
-msgid "invalid element in the display list"
-msgstr "niepoprawny element w liście wyświetleń"
+#. R/viewport.R: stop("invalid 'layout.pos.col' in viewport")
+#: R/viewport.R:0
+msgid "invalid 'layout.pos.col' in viewport"
+msgstr "niepoprawny argument 'layout.pos.col' w oknie ekranu"
 
-# grid/R/grob.R: 2070
-# stop("Invalid force target")
-msgid "Invalid force target"
-msgstr "niepoprawny cel 'force'"
+#. R/viewport.R: stop("invalid 'layout.pos.row' in viewport")
+#: R/viewport.R:0
+msgid "invalid 'layout.pos.row' in viewport"
+msgstr "niepoprawny argument 'layout.pos.row' w oknie ekranu"
 
-# grid/R/grob.R: 2167
-# stop("Invalid revert target")
-msgid "Invalid revert target"
-msgstr "niepoprawny cel 'revert'"
+#. R/gpar.R: stop("invalid 'linemitre' value")
+#: R/gpar.R:0
+msgid "invalid 'linemitre' value"
+msgstr "niepoprawna wartość 'linemitre'"
 
-# grid/R/grob.R: 2232
-# stop("can only reorder 'children' for a \"gTree\"")
-msgid "can only reorder 'children' for a \"gTree\""
-msgstr "można jedynie zmienić kolejność argumentu 'children' dla \"gTree\""
+#. R/ls.R: stop("invalid 'listing'")
+#: R/ls.R:0
+msgid "invalid 'listing'"
+msgstr "niepoprawna wartość 'listing'"
 
-# grid/R/grob.R: 2243
-# stop("Invalid 'order'")
-msgid "Invalid 'order'"
-msgstr "niepoprawna wartość 'order'"
+#. R/function.R: stop("invalid 'n'")
+#: R/function.R:0
+msgid "invalid 'n'"
+msgstr "niepoprawny argument 'n'"
 
-# grid/R/highlevel.R: 138
-# stop("'l' must be a layout")
-msgid "'l' must be a layout"
-msgstr "argument 'l' musi być layoutem"
+#. R/origin.R: stop("invalid 'origin'")
+#: R/origin.R:0
+msgid "invalid 'origin'"
+msgstr "niepoprawna wartość \"origin\""
 
-# grid/R/highlevel.R: 272
-# stop("'pch' and 'labels' not the same length")
-msgid "'pch' and 'labels' not the same length"
-msgstr "argumenty 'pch' oraz 'labels' nie są tej samej długości"
+#. R/ls.R: stop("invalid 'print' argument")
+#: R/ls.R:0
+msgid "invalid 'print' argument"
+msgstr "niepoprawny argument 'print'"
 
-# grid/R/highlevel.R: 276
-# stop("'hgap' must be single unit")
-# grid/R/highlevel.R: 319
-# stop("'hgap' must be single unit")
-msgid "'hgap' must be single unit"
-msgstr "'hgap' musi być pojedynczą jednostką"
+#. R/grob.R: stop("invalid 'result'")
+#: R/grob.R:0
+msgid "invalid 'result'"
+msgstr "niepoprawna wartość 'result'"
 
-# grid/R/highlevel.R: 280
-# stop("'vgap' must be single unit")
-# grid/R/highlevel.R: 322
-# stop("'vgap' must be single unit")
-msgid "'vgap' must be single unit"
-msgstr "'vgap' musi być pojedynczą jednostką"
+#. R/primitives.R: stop("invalid 'rot' value")
+#: R/primitives.R:0
+msgid "invalid 'rot' value"
+msgstr "niepoprawna wartość 'rot'"
 
-# grid/R/highlevel.R: 329
-# stop("'nrow' must be >= 1")
-msgid "'nrow' must be >= 1"
-msgstr "argument 'nrow' musi mieć wartość >= 1"
+#. R/frames.R: stop("invalid 'row' and/or 'col' (no such cell in frame layout)")
+#: R/frames.R:0
+msgid "invalid 'row' and/or 'col' (no such cell in frame layout)"
+msgstr ""
+"niepoprawne argumenty 'row' oraz/lub 'col' (brak takiej komórki w ramce "
+"layoutu)"
 
-# grid/R/highlevel.R: 330
-# stop("'ncol' must be >= 1")
-msgid "'ncol' must be >= 1"
-msgstr "argument 'ncol' musi mieć wartość >= 1"
+#. R/frames.R: stop("invalid 'row' specification")
+#: R/frames.R:0
+msgid "invalid 'row' specification"
+msgstr "niepoprawne określenie 'row'"
 
-# grid/R/highlevel.R: 332
-# stop("nrow * ncol < #{legend labels}")
-msgid "nrow * ncol < #{legend labels}"
-msgstr "nrow * ncol < liczba etykiet legendy"
+#. R/unit.R: stop("invalid 'theta'")
+#: R/unit.R:0
+msgid "invalid 'theta'"
+msgstr "niepoprawna wartość 'theta'"
 
-# grid/R/just.R: 42
-# stop("invalid justification")
-# grid/R/just.R: 74
-# stop("invalid justification")
-msgid "invalid justification"
-msgstr "niepoprawne justowanie"
+#. R/unit.R: stop("invalid 'unit' object")
+#: R/unit.R:0
+msgid "invalid 'unit' object"
+msgstr "niepoprawny obiekt 'unit'"
 
-# grid/R/just.R: 48
-# stop("invalid horizontal justification")
-msgid "invalid horizontal justification"
-msgstr "niepoprawne poziome justowanie"
+#. R/grob.R: stop("invalid 'vp' slot")
+#: R/grob.R:0
+msgid "invalid 'vp' slot"
+msgstr "niepoprawne gniazdo 'vp'"
 
-# grid/R/just.R: 53
-# stop("invalid vertical justification")
-msgid "invalid vertical justification"
-msgstr "niepoprawne pionowe justowanie"
+#. R/viewport.R: stop("invalid 'xscale' in viewport")
+#: R/viewport.R:0
+msgid "invalid 'xscale' in viewport"
+msgstr "niepoprawny argument 'xscale' w oknie ekranu"
 
-# grid/R/layout.R: 34
-# stop("'respect' must be logical or an 'nrow' by 'ncol' matrix")
-msgid "'respect' must be logical or an 'nrow' by 'ncol' matrix"
-msgstr ""
-"'respect' musi być wartością logiczną lub macierzą o rozmiarze 'nrow' na "
-"'ncol'"
+#. R/viewport.R: stop("invalid 'yscale' in viewport")
+#: R/viewport.R:0
+msgid "invalid 'yscale' in viewport"
+msgstr "niepoprawny argument 'yscale' w oknie ekranu"
+
+#. R/grab.R: stop("invalid display list element")
+#: R/grab.R:0
+msgid "invalid display list element"
+msgstr "niepoprawne element listy wyświetleń"
+
+#. R/grob.R: stop("invalid element to add to \"gList\"")
+#: R/grob.R:0
+msgid "invalid element to add to \"gList\""
+msgstr "niepoprawny element do dodania do obiektu klasy \"gList\""
 
-# grid/R/ls.R: 64
-# stop("invalid 'print' argument")
-msgid "invalid 'print' argument"
-msgstr "niepoprawny argument 'print'"
+#. R/gpar.R: stop("invalid fontface ", ch)
+#: R/gpar.R:0
+msgid "invalid fontface"
+msgstr "niepoprawny krój czcionki"
 
-# grid/R/ls.R: 92
-# stop("invalid object in 'listing'")
-msgid "invalid object in 'listing'"
-msgstr "niepoprawny obiekt w listing'"
+#. R/just.R: stop("invalid horizontal justification")
+#: R/just.R:0
+msgid "invalid horizontal justification"
+msgstr "niepoprawne poziome justowanie"
 
-# grid/R/ls.R: 695
-# stop("invalid listing")
-msgid "invalid listing"
-msgstr "niepoprawna wartość 'listing'"
+#. R/just.R: stop("invalid justification")
+#. R/just.R: stop("invalid justification")
+#: R/just.R:0
+msgid "invalid justification"
+msgstr "niepoprawne justowanie"
 
-# grid/R/ls.R: 723
-# stop("invalid 'listing'")
-msgid "invalid 'listing'"
+#. R/ls.R: stop("invalid listing")
+#: R/ls.R:0
+msgid "invalid listing"
 msgstr "niepoprawna wartość 'listing'"
 
-# grid/R/ls.R: 793
-# stop("Nothing on the display list")
-msgid "Nothing on the display list"
-msgstr "Nic na liście wyświetlania"
+#. R/grid.R: stop("invalid modification of the display list")
+#: R/grid.R:0
+msgid "invalid modification of the display list"
+msgstr "niepoprawna modyfikacja listy wyświetleń"
 
-# grid/R/origin.R: 24
-# stop("invalid 'origin'")
-msgid "invalid 'origin'"
-msgstr "niepoprawna wartość \"origin\""
+#. R/ls.R: stop("invalid object in 'listing'")
+#: R/ls.R:0
+msgid "invalid object in 'listing'"
+msgstr "niepoprawny obiekt w listing'"
 
-# grid/R/primitives.R: 26
-# stop("'length' must be a 'unit' object")
-# grid/R/primitives.R: 419
-# stop("'length' must be a 'unit' object")
-msgid "'length' must be a 'unit' object"
-msgstr "argument 'length' musi być obiektem klasy \"unit\""
+#. R/grid.R: stop("invalid object inserted on the display list")
+#: R/grid.R:0
+msgid "invalid object inserted on the display list"
+msgstr "niepoprawne obiekty wstawione na listę wyświetleń"
 
-# grid/R/primitives.R: 31
-# stop("invalid 'ends' or 'type' argument")
-# grid/R/primitives.R: 423
-# stop("invalid 'ends' or 'type' argument")
-msgid "invalid 'ends' or 'type' argument"
-msgstr "niepoprawny argument 'ends' lub 'type'"
+#. R/components.R: stop("invalid to specify axis labels when 'at' is NULL")
+#: R/components.R:0
+msgid "invalid to specify axis labels when 'at' is NULL"
+msgstr ""
+"nie można określać etykiet osi kiedy komponent 'at' argumentu 'x' ma wartość "
+"NULL"
 
-# grid/R/primitives.R: 74
-# stop("'x' and 'y' must be units")
-# grid/R/primitives.R: 109
-# stop("'x' and 'y' must be units")
-# grid/R/primitives.R: 151
-# stop("'x' and 'y' must be units")
-# grid/R/primitives.R: 231
-# stop("'x' and 'y' must be units")
-# grid/R/primitives.R: 551
-# stop("'x' and 'y' must be units")
-# grid/R/primitives.R: 647
-# stop("'x' and 'y' must be units")
-# grid/R/primitives.R: 1349
-# stop("'x' and 'y' must be units")
-# grid/R/primitives.R: 1609
-# stop("'x' and 'y' must be units")
-msgid "'x' and 'y' must be units"
-msgstr "argumenty 'x' oraz 'y' muszą być jednostkami"
+#. R/just.R: stop("invalid vertical justification")
+#: R/just.R:0
+msgid "invalid vertical justification"
+msgstr "niepoprawne pionowe justowanie"
 
-# grid/R/primitives.R: 77
-# stop("'x' and 'y' must have length 1")
-# grid/R/primitives.R: 112
-# stop("'x' and 'y' must have length 1")
-msgid "'x' and 'y' must have length 1"
-msgstr "argumenty 'x' oraz 'y' muszą mieć długość 1"
+#. R/unit.R: stop("it is invalid to combine 'unit' objects with other types")
+#: R/unit.R:0
+msgid "it is invalid to combine 'unit' objects with other types"
+msgstr "niepoprawne jest łączenie obiektów 'unit' z innymi typami"
 
-# grid/R/primitives.R: 114
-# stop("invalid 'arrow' argument")
-# grid/R/primitives.R: 153
-# stop("invalid 'arrow' argument")
-# grid/R/primitives.R: 245
-# stop("invalid 'arrow' argument")
-# grid/R/primitives.R: 326
-# stop("invalid 'arrow' argument")
-# grid/R/primitives.R: 756
-# stop("invalid 'arrow' argument")
-# grid/R/primitives.R: 945
-# stop("invalid 'arrow' argument")
-msgid "invalid 'arrow' argument"
-msgstr "niepoprawny argument 'arrow'"
+#. R/grob.R: stop("it is invalid to directly edit the 'children' or 'childrenOrder' slot")
+#: R/grob.R:0
+msgid "it is invalid to directly edit the 'children' or 'childrenOrder' slot"
+msgstr ""
+"niepoprawne jest bezpośrednie edytowanie gniazda 'children' lub "
+"'childrenOrder'"
 
-# grid/R/primitives.R: 233
-# stop("it is invalid to specify both 'id' and 'id.lengths'")
-# grid/R/primitives.R: 553
-# stop("it is invalid to specify both 'id' and 'id.lengths'")
-# grid/R/primitives.R: 649
-# stop("it is invalid to specify both 'id' and 'id.lengths'")
-# grid/R/primitives.R: 742
-# stop("it is invalid to specify both 'id' and 'id.lengths'")
-# grid/R/primitives.R: 918
-# stop("it is invalid to specify both 'id' and 'id.lengths'")
+#. R/primitives.R: stop("it is invalid to specify both 'id' and 'id.lengths'")
+#. R/primitives.R: stop("it is invalid to specify both 'id' and 'id.lengths'")
+#. R/primitives.R: stop("it is invalid to specify both 'id' and 'id.lengths'")
+#. R/primitives.R: stop("it is invalid to specify both 'id' and 'id.lengths'")
+#. R/primitives.R: stop("it is invalid to specify both 'id' and 'id.lengths'")
+#: R/primitives.R:0
 msgid "it is invalid to specify both 'id' and 'id.lengths'"
 msgstr ""
 "nie jest poprawnie określać oba komponenty 'id' oraz 'id.lengths' argumentu "
 "'x'"
 
-# grid/R/primitives.R: 235
-# stop("'x' and 'y' must be same length")
-# grid/R/primitives.R: 555
-# stop("'x' and 'y' must be same length")
-# grid/R/primitives.R: 651
-# stop("'x' and 'y' must be same length")
-# grid/R/primitives.R: 746
-# stop("'x' and 'y' must be same length")
-# grid/R/primitives.R: 922
-# stop("'x' and 'y' must be same length")
-msgid "'x' and 'y' must be same length"
-msgstr "argumenty 'x' oraz 'units' muszą mieć tę samą długość"
+#. R/grob.R: stop("it is only valid to add a 'grob' to a \"gTree\"")
+#: R/grob.R:0
+msgid "it is only valid to add a 'grob' to a \"gTree\""
+msgstr "poprawne jest jedynie dodanie 'grob' do \"gTree\""
 
-# grid/R/primitives.R: 237
-# stop("'x' and 'y' and 'id' must all be same length")
-# grid/R/primitives.R: 557
-# stop("'x' and 'y' and 'id' must all be same length")
-# grid/R/primitives.R: 653
-# stop("'x' and 'y' and 'id' must all be same length")
-# grid/R/primitives.R: 748
-# stop("'x' and 'y' and 'id' must all be same length")
-# grid/R/primitives.R: 924
-# stop("'x' and 'y' and 'id' must all be same length")
-msgid "'x' and 'y' and 'id' must all be same length"
-msgstr ""
-"komponenty 'x' oraz 'y' oraz 'z' argumentu 'x' muszą wszystkie mieć tę samą "
-"długość"
+#. R/grob.R: stop("it is only valid to add a child to a \"gTree\"")
+#. R/grob.R: stop("it is only valid to add a child to a \"gTree\"")
+#. R/grob.R: stop("it is only valid to add a child to a \"gTree\"")
+#: R/grob.R:0
+msgid "it is only valid to add a child to a \"gTree\""
+msgstr "poprawne jest jedynie dodanie dziecka do \"gTree\""
 
-# grid/R/primitives.R: 241
-# stop("'x' and 'y' and 'id.lengths' must specify same overall length")
-# grid/R/primitives.R: 561
-# stop("'x' and 'y' and 'id.lengths' must specify same overall length")
-# grid/R/primitives.R: 657
-# stop("'x' and 'y' and 'id.lengths' must specify same overall length")
-# grid/R/primitives.R: 752
-# stop("'x' and 'y' and 'id.lengths' must specify same overall length")
-# grid/R/primitives.R: 928
-# stop("'x' and 'y' and 'id.lengths' must specify same overall length")
-msgid "'x' and 'y' and 'id.lengths' must specify same overall length"
-msgstr ""
-"komponenty 'x' oraz 'y' oraz 'id.lengths' argumentu 'x' muszą określać tę "
-"samą całościową długość"
+#. R/grob.R: stop("it is only valid to edit a child of a \"gTree\"")
+#: R/grob.R:0
+msgid "it is only valid to edit a child of a \"gTree\""
+msgstr "poprawna jest jedynie edycja dziecka \"gTree\""
 
-# grid/R/primitives.R: 324
-# stop("'x0', 'y0', 'x1', and 'y1' must be units")
-msgid "'x0', 'y0', 'x1', and 'y1' must be units"
-msgstr "Wielkości 'x0', 'y0', 'x1', oraz 'y1' muszą być jednostkami"
+#. R/grob.R: stop("it is only valid to get 'children' from a \"gTree\"")
+#: R/grob.R:0
+msgid "it is only valid to get 'children' from a \"gTree\""
+msgstr "poprawne jest jedynie uzyskanie dzieci z \"gTree\""
 
-# grid/R/primitives.R: 417
-# stop("'x' and 'y' must be units or NULL")
-msgid "'x' and 'y' must be units or NULL"
-msgstr "'x' oraz 'y' muszą być jednostkami"
+#. R/grob.R: stop("it is only valid to get a child from a \"gTree\"")
+#: R/grob.R:0
+msgid "it is only valid to get a child from a \"gTree\""
+msgstr "poprawne jest jedynie uzyskanie dziecka z \"gTree\""
 
-# grid/R/primitives.R: 430
-# stop("corrupt 'arrows' object")
-# grid/R/primitives.R: 499
-# stop("corrupt 'arrows' object")
-# grid/R/primitives.R: 514
-# stop("corrupt 'arrows' object")
-msgid "corrupt 'arrows' object"
-msgstr "uszkodzony obiekt 'arrows'"
+#. R/grob.R: stop("it is only valid to remove a child from a \"gTree\"")
+#. R/grob.R: stop("it is only valid to remove a child from a \"gTree\"")
+#: R/grob.R:0
+msgid "it is only valid to remove a child from a \"gTree\""
+msgstr "poprawne jest jedynie usunięcie dziecka do \"gTree\""
 
-# grid/R/primitives.R: 740
-# stop("x and y must be units")
-# grid/R/primitives.R: 916
-# stop("x and y must be units")
-msgid "x and y must be units"
-msgstr "'x' oraz 'y' muszą być jednostkami"
+#. R/grob.R: stop("it is only valid to set a 'grob' as child of a \"gTree\"")
+#: R/grob.R:0
+msgid "it is only valid to set a 'grob' as child of a \"gTree\""
+msgstr "poprawne jest jedynie ustawienie'grob' jako dziecka \"gTree\""
+
+#. R/grob.R: stop("it is only valid to set a child of a \"gTree\"")
+#: R/grob.R:0
+msgid "it is only valid to set a child of a \"gTree\""
+msgstr "poprawne jest jedynie ustawienie dziecka \"gTree\""
 
-# grid/R/primitives.R: 933
-# stop("must have exactly 4 control points")
+#. R/components.R: stop("logical 'label' supplied of length 0")
+#. R/components.R: stop("logical 'label' supplied of length 0")
+#: R/components.R:0
+msgid "logical 'label' supplied of length 0"
+msgstr "dostarczono logiczną wartość argumentu 'label' o długości 0"
+
+#. R/primitives.R: stop("must have exactly 4 control points")
+#: R/primitives.R:0
 msgid "must have exactly 4 control points"
 msgstr "potrzeba mieć dokładnie 4 punkty kontrolne"
 
-# grid/R/primitives.R: 942
-# stop("must have exactly 4 control points per Bezier curve")
+#. R/primitives.R: stop("must have exactly 4 control points per Bezier curve")
+#: R/primitives.R:0
 msgid "must have exactly 4 control points per Bezier curve"
 msgstr "potrzeba mieć dokładnie 4 punkty kontrolne na każdą krzywą Beziera"
 
-# grid/R/primitives.R: 1002
-# stop("'x', 'y', and 'r' must be units")
-msgid "'x', 'y', and 'r' must be units"
-msgstr "'x', 'y', oraz 'r' muszą być jednostkami"
-
-# grid/R/primitives.R: 1073
-# stop("'x', 'y', 'width', and 'height' must be units")
-# grid/R/primitives.R: 1175
-# stop("'x', 'y', 'width', and 'height' must be units")
-# grid/R/primitives.R: 1561
-# stop("'x', 'y', 'width', and 'height' must be units")
-# grid/R/roundRect.R: 47
-# stop("'x', 'y', 'width', and 'height' must be units")
-msgid "'x', 'y', 'width', and 'height' must be units"
-msgstr "'x', 'y', 'width', oraz 'height' muszą być jednostkami"
+#. R/grid.R: stop("must navigate up at least one viewport")
+#: R/grid.R:0
+msgid "must navigate up at least one viewport"
+msgstr "potrzeba przenieść w górę przynajmniej jedno okno ekranu"
 
-# grid/R/primitives.R: 1352
-# stop("invalid 'rot' value")
-msgid "invalid 'rot' value"
-msgstr "niepoprawna wartość 'rot'"
+#. R/grid.R: stop("must pop at least one viewport")
+#: R/grid.R:0
+msgid "must pop at least one viewport"
+msgstr "potrzeba wyświetlić przynajmniej jedno okno ekranu"
 
-# grid/R/primitives.R: 1470
-# stop("zero-length 'pch'")
-msgid "zero-length 'pch'"
-msgstr "argument 'pch' ma zerową długość"
+#. R/viewport.R: stop("must specify at least one of 'x' or 'xscale'")
+#: R/viewport.R:0
+msgid "must specify at least one of 'x' or 'xscale'"
+msgstr "przynajmniej jeden z 'x' oraz 'xscale' musi być określony"
 
-# grid/R/primitives.R: 1482
-# stop("'x', 'y' and 'size' must be units")
-msgid "'x', 'y' and 'size' must be units"
-msgstr "'x', 'y' oraz 'size' muszą być jednostkami"
+#. R/viewport.R: stop("must specify at least one of 'y' or 'yscale'")
+#: R/viewport.R:0
+msgid "must specify at least one of 'y' or 'yscale'"
+msgstr "tylko jeden z 'font' oraz 'fontface' może być określony"
 
-# grid/R/primitives.R: 1484
-# stop("'x' and 'y' must be 'unit' objects and have the same length")
-msgid "'x' and 'y' must be 'unit' objects and have the same length"
-msgstr ""
-"komponenty 'x' oraz 'y' argumentu 'x' muszą być obiektami klasy \"unit\" "
-"oraz muszą mieć tę samą długość"
+#. R/grid.R: stop("must specify at least one viewport")
+#: R/grid.R:0
+msgid "must specify at least one viewport"
+msgstr "przynajmniej jedno okno ekranu musi być określone"
 
-# grid/R/primitives.R: 1564
-# stop("'x', 'y', 'width', and 'height' must all be units of length 1")
-# grid/R/viewport.R: 40
-# stop("'x', 'y', 'width', and 'height' must all be units of length 1")
-msgid "'x', 'y', 'width', and 'height' must all be units of length 1"
+#. R/frames.R: stop("must specify exactly one of 'side=[\"top\", \"bottom\"]', 'row', 'row.before', or 'row.after'")
+#: R/frames.R:0
+msgid ""
+"must specify exactly one of 'side=[\"top\", \"bottom\"]', 'row', 'row."
+"before', or 'row.after'"
 msgstr ""
-"argumenty 'x', 'y', 'width' oraz 'height' muszą wszystkie być jednostkami o "
-"długości 1"
-
-# grid/R/primitives.R: 1611
-# stop("'x' and 'y' must all be units of length 1")
-msgid "'x' and 'y' must all be units of length 1"
-msgstr "'x' oraz 'y' muszą być jednostkami o długości 1"
+"potrzeba określić dokładnie jeden z 'side=[\"top\", \"bottom\"]', 'row', "
+"'row.before', lub 'row.after'"
 
-# grid/R/roundRect.R: 49
-# stop("'r' must be a 'unit' object")
-msgid "'r' must be a 'unit' object"
-msgstr "'r' musi być obiektem klasy \"unit\""
+#. R/gpar.R: stop("must specify only one of 'font' and 'fontface'")
+#: R/gpar.R:0
+msgid "must specify only one of 'font' and 'fontface'"
+msgstr "potrzeba określić tylko jeden z 'font' oraz 'fontface'"
 
-# grid/R/roundRect.R: 54
-# stop("'x', 'y', 'width', and 'height' must have length 1")
-msgid "'x', 'y', 'width', and 'height' must have length 1"
-msgstr "'x', 'y', 'width', oraz 'height' muszą mieć długość 1"
+#. R/gpar.R: stop("must specify only valid 'gpar' names")
+#: R/gpar.R:0
+msgid "must specify only valid 'gpar' names"
+msgstr "potrzeba określić tylko poprawne nazwy 'gpar'"
 
-# grid/R/unit.R: 32
-# stop("'x' and 'units' must have length > 0")
-msgid "'x' and 'units' must have length > 0"
-msgstr "argumenty 'x' oraz 'units' muszą mieć długość > 0"
+#. R/debug.R: stop("must start new page if showing leaves separately")
+#: R/debug.R:0
+msgid "must start new page if showing leaves separately"
+msgstr ""
+"trzeba rozpocząć nową stronę jeśli liście mają być pokazywane oddzielnie"
 
-# grid/R/unit.R: 60
-# stop("'x' argument must be a unit object")
-msgid "'x' argument must be a unit object"
-msgstr "argument 'x' musi być obiektem klasy \"unit\""
+#. R/unit.R: stop("no 'grob' supplied for 'grobwidth/height' unit")
+#: R/unit.R:0
+msgid "no 'grob' supplied for 'grobwidth/height' unit"
+msgstr "nie dostarczono 'grob' dla jednostki 'grobwidth/height'"
 
-# grid/R/unit.R: 62
-# stop("invalid 'axis' or 'type'")
-msgid "invalid 'axis' or 'type'"
-msgstr "niepoprawna wartość 'axis' lub 'type'"
+#. R/unit.R: stop("no arguments where at least one expected")
+#: R/unit.R:0
+msgid "no arguments where at least one expected"
+msgstr "brak argumentów gdzie oczekiwano przynajmniej jednego"
 
-# grid/R/unit.R: 185
-# stop("no string supplied for 'strwidth/height' unit")
+#. R/unit.R: stop("no string supplied for 'strwidth/height' unit")
+#: R/unit.R:0
 msgid "no string supplied for 'strwidth/height' unit"
 msgstr "nie dostarczono łańcuchów dla jednostki 'strwidth/height'"
 
-# grid/R/unit.R: 193
-# stop("no 'grob' supplied for 'grobwidth/height' unit")
-msgid "no 'grob' supplied for 'grobwidth/height' unit"
-msgstr "nie dostarczono 'grob' dla jednostki 'grobwidth/height'"
-
-# grid/R/unit.R: 198
-# stop("'gPath' must have depth 1 in 'grobwidth/height' units")
-msgid "'gPath' must have depth 1 in 'grobwidth/height' units"
-msgstr "'gPath' musi mieć głębokość 1 w jednostkach 'grobwidth/height'"
-
-# grid/R/unit.R: 202
-# stop("non-NULL value supplied for plain unit")
+#. R/unit.R: stop("non-NULL value supplied for plain unit")
+#: R/unit.R:0
 msgid "non-NULL value supplied for plain unit"
 msgstr "wartość inna niż NULL dostarczona dla zwykłej jednostki"
 
-# grid/R/unit.R: 228
-# stop(gettextf("operator '%s' not meaningful for units", .Generic),
-#          domain = NA)
-msgid "operator '%s' not meaningful for units"
-msgstr "operator '%s' nie posiada znaczenia dla jednostek"
-
-# grid/R/unit.R: 234
-# stop("only one operand may be a unit")
-msgid "only one operand may be a unit"
-msgstr "tylko jeden operator może być jednostką"
-
-# grid/R/unit.R: 240
-# stop("non-unit operand must be numeric")
-# grid/R/unit.R: 246
-# stop("non-unit operand must be numeric")
+#. R/unit.R: stop("non-unit operand must be numeric")
+#. R/unit.R: stop("non-unit operand must be numeric")
+#: R/unit.R:0
 msgid "non-unit operand must be numeric"
 msgstr "niejednostkowy operator musi być liczbą"
 
-# grid/R/unit.R: 253
-# stop("both operands must be units")
-msgid "both operands must be units"
-msgstr "oba operatory muszą być jednostkami"
-
-# grid/R/unit.R: 266
-# stop(gettextf("'Summary' function '%s' not meaningful for units",
-#                   .Generic), domain = NA)
-msgid "'Summary' function '%s' not meaningful for units"
-msgstr "Funkcja 'summary' '%s' nie ma znaczenia dla jednostek"
-
-# grid/R/unit.R: 295
-# stop("no arguments where at least one expected")
-msgid "no arguments where at least one expected"
-msgstr "brak argumentów gdzie oczekiwano przynajmniej jednego"
-
-# grid/R/unit.R: 318
-# stop("Zero arguments where at least one expected")
-msgid "Zero arguments where at least one expected"
-msgstr "Zero argumentów gdzie oczekiwano przynajmniej jednego"
-
-# grid/R/unit.R: 395
-# stop("cannot mix signs of indices")
-# grid/R/unit.R: 427
-# stop("cannot mix signs of indices")
-# grid/R/unit.R: 460
-# stop("cannot mix signs of indices")
-msgid "cannot mix signs of indices"
-msgstr "nie można mieszać znaków indeksów"
-
-# grid/R/unit.R: 400
-# stop("index out of bounds ('unit' subsetting)")
-msgid "index out of bounds ('unit' subsetting)"
-msgstr "indeks poza zakresem (podzbiór 'unit')"
-
-# grid/R/unit.R: 432
-# stop("index out of bounds (unit arithmetic subsetting)")
-msgid "index out of bounds (unit arithmetic subsetting)"
-msgstr "indeks poza zakresem (arytmetyczny podzbiór jednostki)"
-
-# grid/R/unit.R: 465
-# stop("index out of bounds (unit list subsetting)")
-msgid "index out of bounds (unit list subsetting)"
-msgstr "indeks poza zakresem (podzbiór listy jednostek)"
-
-# grid/R/unit.R: 505
-# stop("it is invalid to combine 'unit' objects with other types")
-msgid "it is invalid to combine 'unit' objects with other types"
-msgstr "niepoprawne jest łączenie obiektów 'unit' z innymi typami"
-
-# grid/R/unit.R: 543
-# stop("invalid 'unit' object")
-msgid "invalid 'unit' object"
-msgstr "niepoprawny obiekt 'unit'"
-
-# grid/R/unit.R: 645
-# stop("invalid 'theta'")
-msgid "invalid 'theta'"
-msgstr "niepoprawna wartość 'theta'"
-
-# grid/R/util.R: 44
-# stop("'range' must be numeric")
-msgid "'range' must be numeric"
-msgstr "'range' musi być liczbą"
-
-# grid/R/viewport.R: 42
-# stop("invalid 'gp' value")
-msgid "invalid 'gp' value"
-msgstr "niepoprawna wartość 'gp'"
-
-# grid/R/viewport.R: 48
-# stop("invalid 'clip' value")
-msgid "invalid 'clip' value"
-msgstr "niepoprawna wartość 'clip'"
-
-# grid/R/viewport.R: 54
-# stop("invalid 'xscale' in viewport")
-msgid "invalid 'xscale' in viewport"
-msgstr "niepoprawny argument 'xscale' w oknie ekranu"
-
-# grid/R/viewport.R: 57
-# stop("invalid 'yscale' in viewport")
-msgid "invalid 'yscale' in viewport"
-msgstr "niepoprawny argument 'yscale' w oknie ekranu"
+#. R/highlevel.R: stop("nrow * ncol < #{legend labels}")
+#: R/highlevel.R:0
+msgid "nrow * ncol < #{legend labels}"
+msgstr "nrow * ncol < liczba etykiet legendy"
 
-# grid/R/viewport.R: 60
-# stop("invalid 'angle' in viewport")
-msgid "invalid 'angle' in viewport"
-msgstr "niepoprawny argument 'angle' w oknie ekranu"
+#. R/grab.R: warning("one of more grobs overwritten (grab WILL not be faithful; try 'wrap = TRUE')")
+#: R/grab.R:0
+msgid ""
+"one of more grobs overwritten (grab WILL not be faithful; try 'wrap = TRUE')"
+msgstr ""
+"jeden lub więcej 'grob' nadpisane ('grab' NIE BĘDZIE wiarygodne; spróbuj "
+"'wrap=TRUE')"
 
-# grid/R/viewport.R: 62
-# stop("invalid 'layout' in viewport")
-msgid "invalid 'layout' in viewport"
-msgstr "niepoprawny argument 'layout' w oknie ekranu"
+#. R/grob.R: stop("only 'grobs' allowed in \"gList\"")
+#: R/grob.R:0
+msgid "only 'grobs' allowed in \"gList\""
+msgstr "tylko 'grobs' są dozwolone w \"gList\""
 
-# grid/R/viewport.R: 66
-# stop("invalid 'layout.pos.row' in viewport")
-msgid "invalid 'layout.pos.row' in viewport"
-msgstr "niepoprawny argument 'layout.pos.row' w oknie ekranu"
+#. R/unit.R: stop("only one operand may be a unit")
+#: R/unit.R:0
+msgid "only one operand may be a unit"
+msgstr "tylko jeden operator może być jednostką"
 
-# grid/R/viewport.R: 71
-# stop("invalid 'layout.pos.col' in viewport")
-msgid "invalid 'layout.pos.col' in viewport"
-msgstr "niepoprawny argument 'layout.pos.col' w oknie ekranu"
+#. R/grid.R: stop("only valid to push viewports")
+#: R/grid.R:0
+msgid "only valid to push viewports"
+msgstr "poprawne tylko dla wypychanych okien ekranów"
 
-# grid/R/viewport.R: 261
-# stop("only viewports allowed in 'vpList'")
+#. R/viewport.R: stop("only viewports allowed in 'vpList'")
+#: R/viewport.R:0
 msgid "only viewports allowed in 'vpList'"
 msgstr "tylko okna ekranów są dozwolone w 'vpList'"
 
-# grid/R/viewport.R: 278
-# stop("only viewports allowed in 'vpStack'")
+#. R/viewport.R: stop("only viewports allowed in 'vpStack'")
+#: R/viewport.R:0
 msgid "only viewports allowed in 'vpStack'"
 msgstr "tylko okna ekranów są dozwolone w 'vpStack'"
 
-# grid/R/viewport.R: 289
-# stop("'parent' must be a viewport and 'children' must be a 'vpList' in 'vpTree'")
-msgid ""
-"'parent' must be a viewport and 'children' must be a 'vpList' in 'vpTree'"
-msgstr ""
-"argument 'parent' musi być oknem ekranu oraz argument 'children' musi być "
-"'vpList' w 'vpTree'"
-
-# grid/R/viewport.R: 331
-# stop("a viewport path must contain at least one viewport name")
-msgid "a viewport path must contain at least one viewport name"
-msgstr "ścieżka okna ekranu musi zawierać przynajmniej jedną nazwę okna ekranu"
-
-# grid/R/viewport.R: 403
-# stop("must specify at least one of 'x' or 'xscale'")
-msgid "must specify at least one of 'x' or 'xscale'"
-msgstr "przynajmniej jeden z 'x' oraz 'xscale' musi być określony"
-
-# grid/R/viewport.R: 408
-# stop("must specify at least one of 'y' or 'yscale'")
-msgid "must specify at least one of 'y' or 'yscale'"
-msgstr "tylko jeden z 'font' oraz 'fontface' może być określony"
+#. R/unit.R: gettextf("operator '%s' not meaningful for units", .Generic)
+#: R/unit.R:0
+msgid "operator '%s' not meaningful for units"
+msgstr "operator '%s' nie posiada znaczenia dla jednostek"
 
-# grid/R/zzz.R: 52
-# warning("shutting down all devices when unloading 'grid' namespace",
-#                     call. = FALSE)
+#. R/zzz.R: warning("shutting down all devices when unloading 'grid' namespace",     call. = FALSE)
+#: R/zzz.R:0
 msgid "shutting down all devices when unloading 'grid' namespace"
 msgstr ""
 "zamykanie wszystkich urządzeń kiedy wykonywane jest zwalnianie przestrzeni "
 "nazw 'grid'"
 
-# grid/R/grob.R: 141
-# stop(ngettext(sum(bad), "invalid grob name", "invalid grob names"),
-#            domain = NA)
+#. R/grob.R: gettextf("slot '%s' not found", i)
+#: R/grob.R:0
+msgid "slot '%s' not found"
+msgstr "gniazdo '%s' nie zostało znalezione"
+
+#. R/grob.R: stop("the new 'grob' must have the same name as the old 'grob'")
+#. R/grob.R: stop("the new 'grob' must have the same name as the old 'grob'")
+#. R/grob.R: stop("the new 'grob' must have the same name as the old 'grob'")
+#: R/grob.R:0
+msgid "the new 'grob' must have the same name as the old 'grob'"
+msgstr "nowy 'grob' musi mieć tę samą nazwę jak stary 'grob'"
+
+#. R/grob.R: stop("unable to coerce to \"gList\"")
+#: R/grob.R:0
+msgid "unable to coerce to \"gList\""
+msgstr "nie można przekształcić argumentu 'x' na obiekt klasy \"gList\""
+
+#. R/grab.R: warning("viewport overwritten (grab MAY not be faithful)")
+#. R/grab.R: warning("viewport overwritten (grab MAY not be faithful)")
+#: R/grab.R:0
+msgid "viewport overwritten (grab MAY not be faithful)"
+msgstr "okno ekranu nadpisane ('grab' MOŻE nie być wiarygodne)"
+
+#. R/primitives.R: stop("x and y must be units")
+#. R/primitives.R: stop("x and y must be units")
+#: R/primitives.R:0
+msgid "x and y must be units"
+msgstr "'x' oraz 'y' muszą być jednostkami"
+
+#. R/primitives.R: stop("zero-length 'pch'")
+#: R/primitives.R:0
+msgid "zero-length 'pch'"
+msgstr "argument 'pch' ma zerową długość"
+
+#. R/grob.R: ngettext(sum(bad), "invalid grob name", "invalid grob names")
+#: R/grob.R:0
 msgid "invalid grob name"
 msgid_plural "invalid grob names"
 msgstr[0] "niepoprawna nazwa 'grob'"
 msgstr[1] "niepoprawne nazwy 'grob'"
 msgstr[2] "niepoprawne nazwy 'grob'"
 
-# grid/R/viewport.R: 324
-# stop(ngettext(sum(bad),
-#                     "invalid viewport name",
-#                     "invalid viewport names"),
-#            domain = NA)
+#. R/viewport.R: ngettext(sum(bad), "invalid viewport name", "invalid viewport names")
+#: R/viewport.R:0
 msgid "invalid viewport name"
 msgid_plural "invalid viewport names"
 msgstr[0] "niepoprawna nazwa okna ekranu"
 msgstr[1] "niepoprawne nazwy okien ekranu"
 msgstr[2] "niepoprawne nazwy okien ekranu"
 
+#~ msgid "invalid element in the display list"
+#~ msgstr "niepoprawny element w liście wyświetleń"
+
+#~ msgid "Nothing on the display list"
+#~ msgstr "Nic na liście wyświetlania"
+
 #~ msgid "the 'vp' argument is deprecated"
 #~ msgstr "argument 'vp' jest przestarzały"
 
diff --git a/src/library/grid/po/R-pt_BR.po b/src/library/grid/po/R-pt_BR.po
index 133270d..6134d74 100644
--- a/src/library/grid/po/R-pt_BR.po
+++ b/src/library/grid/po/R-pt_BR.po
@@ -2,7 +2,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: 2.13.0\n"
 "Report-Msgid-Bugs-To: bugs.r-project.org\n"
-"POT-Creation-Date: 2014-02-27 17:14\n"
+"POT-Creation-Date: 2016-04-01 09:50\n"
 "PO-Revision-Date: 2011-03-26 08:56-0300\n"
 "Last-Translator: Fernando Henrique <pessoal at fernandohrosa.com.br>\n"
 "Language-Team: http://www.feferraz.net/br/P/Projeto_Traducao_R_Portugues\n"
@@ -318,10 +318,6 @@ msgid "grob '%s' not found"
 msgstr "Grob '%s' não encontrado"
 
 #, fuzzy
-msgid "invalid element in the display list"
-msgstr "Elemento Inválido na lista de exibição"
-
-#, fuzzy
 msgid "Invalid force target"
 msgstr "'frame' inválido"
 
@@ -392,10 +388,6 @@ msgid "invalid 'listing'"
 msgstr "listing inválido"
 
 #, fuzzy
-msgid "Nothing on the display list"
-msgstr "Elemento Inválido na lista de exibição"
-
-#, fuzzy
 msgid "invalid 'origin'"
 msgstr "'origin' inválido"
 
@@ -552,6 +544,10 @@ msgid "index out of bounds (unit list subsetting)"
 msgstr "Índice fora dos limites (tentando fazer subset de lista unitária)"
 
 #, fuzzy
+msgid "Value being assigned must be a unit"
+msgstr "x e y devem ser unidades"
+
+#, fuzzy
 msgid "it is invalid to combine 'unit' objects with other types"
 msgstr "É inválido combinar objetos unitários com outros tipos"
 
@@ -641,6 +637,14 @@ msgstr[0] "Nome(s) de vista inválido(s)"
 msgstr[1] "Nome(s) de vista inválido(s)"
 
 #, fuzzy
+#~ msgid "invalid element in the display list"
+#~ msgstr "Elemento Inválido na lista de exibição"
+
+#, fuzzy
+#~ msgid "Nothing on the display list"
+#~ msgstr "Elemento Inválido na lista de exibição"
+
+#, fuzzy
 #~ msgid "the 'vp' argument is deprecated"
 #~ msgstr "O argumento \"vp\" é obsoleto"
 
diff --git a/src/library/grid/po/R-ru.po b/src/library/grid/po/R-ru.po
index 0dc3e80..0c51028 100644
--- a/src/library/grid/po/R-ru.po
+++ b/src/library/grid/po/R-ru.po
@@ -10,16 +10,15 @@ msgstr ""
 "Project-Id-Version: R 2.11.0\n"
 "Report-Msgid-Bugs-To: bugs.r-project.org\n"
 "POT-Creation-Date: 2014-02-27 17:14\n"
-"PO-Revision-Date: 2013-03-19 19:58-0600\n"
+"PO-Revision-Date: 2016-04-05 18:07-0600\n"
 "Last-Translator: Alexey Shipunov <dactylorhiza at gmail.com>\n"
 "Language-Team: Russian\n"
-"Language: \n"
+"Language: ru\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=KOI8-R\n"
 "Content-Transfer-Encoding: 8bit\n"
 "X-Poedit-Language: Russian\n"
-"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n"
-"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
+"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
 
 msgid "invalid 'at' location in 'axis'"
 msgstr "������������ ������� 'at' � 'axis'"
@@ -81,19 +80,11 @@ msgstr "'row' 
 msgid "invalid 'row' specification"
 msgstr "������������ �������� 'row'"
 
-msgid ""
-"cannot specify more than one of 'side=[\"left\", \"right\"]', 'col', 'col."
-"before', or 'col.after'"
-msgstr ""
-"�� ���� ������ ������ ��� ���� 'side=[\"left\", \"right\"]', 'col', 'col."
-"before', ��� 'col.after'"
+msgid "cannot specify more than one of 'side=[\"left\", \"right\"]', 'col', 'col.before', or 'col.after'"
+msgstr "�� ���� ������ ������ ��� ���� 'side=[\"left\", \"right\"]', 'col', 'col.before', ��� 'col.after'"
 
-msgid ""
-"must specify exactly one of 'side=[\"top\", \"bottom\"]', 'row', 'row."
-"before', or 'row.after'"
-msgstr ""
-"���� ������ � �������� ���� �� 'side=[\"top\", \"bottom\"]', 'row', 'row."
-"before', ��� 'row.after'"
+msgid "must specify exactly one of 'side=[\"top\", \"bottom\"]', 'row', 'row.before', or 'row.after'"
+msgstr "���� ������ � �������� ���� �� 'side=[\"top\", \"bottom\"]', 'row', 'row.before', ��� 'row.after'"
 
 msgid "invalid 'n'"
 msgstr "������������ 'n'"
@@ -116,7 +107,6 @@ msgstr "
 msgid "must specify only one of 'font' and 'fontface'"
 msgstr "���� ������ ������ ���� �� 'font' ��� 'fontface'"
 
-#, fuzzy
 msgid "invalid fontface"
 msgstr "������������ ���������� ������"
 
@@ -129,20 +119,14 @@ msgstr "
 msgid "invalid display list element"
 msgstr "������������ ������� ������ �����������"
 
-msgid ""
-"one of more grobs overwritten (grab WILL not be faithful; try 'wrap = TRUE')"
-msgstr ""
-"���� ��� ������ grobs ��������� (grab �� ����� ������; ���������� 'wrap = "
-"TRUE')"
+msgid "one of more grobs overwritten (grab WILL not be faithful; try 'wrap = TRUE')"
+msgstr "���� ��� ������ grobs ��������� (grab �� ����� ������; ���������� 'wrap = TRUE')"
 
 msgid "viewport overwritten (grab MAY not be faithful)"
 msgstr "�������� ���������� (grab, ��������, �� ����� ������)"
 
-msgid ""
-"grob pushed viewports and did not pop/up them (grab MAY not be faithful)"
-msgstr ""
-"grob �������� �������� � �� ������/���������� ����� (grab, ��������, �� "
-"����� ������)"
+msgid "grob pushed viewports and did not pop/up them (grab MAY not be faithful)"
+msgstr "grob �������� �������� � �� ������/���������� ����� (grab, ��������, �� ����� ������)"
 
 msgid "only valid to push viewports"
 msgstr "��������� ������ ��� ���������� �������"
@@ -150,13 +134,11 @@ msgstr "
 msgid "must specify at least one viewport"
 msgstr "���� ���������� �� ������� ���� ���� ��������"
 
-#, fuzzy
 msgid "Down viewport failed to record on display list"
-msgstr "������������ ������ �������� � ������ �����������"
+msgstr "������ �������� �� �������� � ������ �����������"
 
-#, fuzzy
 msgid "Down viewport incorrectly recorded on display list"
-msgstr "������������ ������ �������� � ������ �����������"
+msgstr "������ �������� ����������� �������� � ������ �����������"
 
 msgid "must pop at least one viewport"
 msgstr "����� ������� ��� ������� ���� ��������"
@@ -165,7 +147,7 @@ msgid "must navigate up at least one viewport"
 msgstr "����� ��������� ��� ������� ����� ���������"
 
 msgid "Invalid number of generations"
-msgstr ""
+msgstr "������������ ���������� ���������"
 
 msgid "invalid object inserted on the display list"
 msgstr "������������ ������ �������� � ������ �����������"
@@ -272,13 +254,11 @@ msgstr "grob '%s' 
 msgid "invalid element in the display list"
 msgstr "������������ ������� � ������ �����������"
 
-#, fuzzy
 msgid "Invalid force target"
-msgstr "������������ 'order'"
+msgstr "������������ ������ ����"
 
-#, fuzzy
 msgid "Invalid revert target"
-msgstr "������������ �������� 'print'"
+msgstr "������������ �������� ����"
 
 msgid "can only reorder 'children' for a \"gTree\""
 msgstr "���� ������ �������������� 'children' ��� \"gTree\""
@@ -298,16 +278,14 @@ msgstr "'hgap' 
 msgid "'vgap' must be single unit"
 msgstr "'vgap' ������ ���� ��������� ��������"
 
-#, fuzzy
 msgid "'nrow' must be >= 1"
-msgstr "'l' ������ ���� �������"
+msgstr "'nrow' ������ ���� >= 1"
 
-#, fuzzy
 msgid "'ncol' must be >= 1"
-msgstr "'l' ������ ���� �������"
+msgstr "'ncol' ������ ���� >= 1"
 
 msgid "nrow * ncol < #{legend labels}"
-msgstr ""
+msgstr "nrow * ncol < #{legend labels}"
 
 msgid "invalid justification"
 msgstr "������������ ������������"
@@ -333,9 +311,8 @@ msgstr "
 msgid "invalid 'listing'"
 msgstr "������������ ������"
 
-#, fuzzy
 msgid "Nothing on the display list"
-msgstr "������������ ��������� � ������ �����������"
+msgstr "������ ��� � ������ �����������"
 
 msgid "invalid 'origin'"
 msgstr "������������ 'origin'"
@@ -511,14 +488,11 @@ msgstr "
 msgid "only viewports allowed in 'vpStack'"
 msgstr "������ �������� ��������� � 'vpStack'"
 
-msgid ""
-"'parent' must be a viewport and 'children' must be a 'vpList' in 'vpTree'"
-msgstr ""
-"'parent' ������ ���� ��������� � 'children' ������ ���� 'vpList' � 'vpTree'"
+msgid "'parent' must be a viewport and 'children' must be a 'vpList' in 'vpTree'"
+msgstr "'parent' ������ ���� ��������� � 'children' ������ ���� 'vpList' � 'vpTree'"
 
 msgid "a viewport path must contain at least one viewport name"
-msgstr ""
-"���� � �������� ������ ������ ��������� �� ������� ���� ���� ��� ��������"
+msgstr "���� � �������� ������ ������ ��������� �� ������� ���� ���� ��� ��������"
 
 msgid "must specify at least one of 'x' or 'xscale'"
 msgstr "���� ������ �� ������� ���� ���� �� 'x' ��� 'xscale'"
@@ -543,47 +517,38 @@ msgstr[2] "
 
 #~ msgid "the 'vp' argument is deprecated"
 #~ msgstr "�������� 'vp' �� ����������"
-
 #~ msgid "grid.grob() is deprecated; please use grob() instead"
 #~ msgstr "grid.grob() �� ����������; �����������, ����������, grob()"
-
 #~ msgid "the 'grob' argument must be a 'line.to', 'lines', or 'segments' grob"
 #~ msgstr "�������� 'grob' ������ ���� 'line.to', 'lines', ��� 'segments' grob"
 
 #, fuzzy
 #~ msgid "invalid 'ask' value"
 #~ msgstr "������������ �������� 'ask'"
-
 #~ msgid "Cannot mix signs of indices"
 #~ msgstr "�� ���� ��������� ����� ��������"
 
 #, fuzzy
 #~ msgid "It is only valid to remove a child from a \"gTree\""
 #~ msgstr "��������� ���� ������� 'child' �� 'gTree'"
-
 #~ msgid "This function is redundant and will disappear in future versions."
 #~ msgstr "��� ������� �������� � �������� � ������� �������."
-
 #~ msgid ""
 #~ "grid.arrows() has been deprecated;  use 'arrow' arguments to line drawing "
 #~ "functions."
 #~ msgstr ""
 #~ "grid.arrows() �� ����������;  ����������� ��������� 'arrow' ��� �������, "
 #~ "�������� �����."
-
 #~ msgid "shape must be between -1 and 1"
 #~ msgstr "����� ������ ���� ����� -1 � 1"
-
 #~ msgid "Non-unit operand must be numeric"
 #~ msgstr "��������-��-������� ������ ���� ���������"
-
 #~ msgid ""
 #~ "unit.rep has been deprecated in favour of a unit method for the generic "
 #~ "rep function"
 #~ msgstr ""
 #~ "'unit.rep' �� ����������, ����������� ��������� ����� ��� ����� ������� "
 #~ "'rep'"
-
 #~ msgid ""
 #~ "unit.length has been deprecated in favour of a unit method for the "
 #~ "generic length function"
@@ -594,21 +559,16 @@ msgstr[2] "
 #, fuzzy
 #~ msgid "invalid graphics parameters"
 #~ msgstr "������������ ����������� ���������"
-
 #~ msgid "at least one of 'width' and 'height' must be specified"
 #~ msgstr "�� ������� ���� 'width', � 'height' ������ ���� ����������"
-
 #~ msgid "Viewport '%s' was not found"
 #~ msgstr "�������� '%s' �� �������"
-
 #~ msgid "Invalid"
 #~ msgstr "������������"
-
 #~ msgid "print"
 #~ msgstr "������"
-
 #~ msgid "argument"
 #~ msgstr "��������"
-
 #~ msgid "'x' must be numeric"
 #~ msgstr "'x' ������ ���� ������"
+
diff --git a/src/library/grid/po/R-zh_CN.po b/src/library/grid/po/R-zh_CN.po
index 2bcfd48..6ec0fb3 100644
--- a/src/library/grid/po/R-zh_CN.po
+++ b/src/library/grid/po/R-zh_CN.po
@@ -7,11 +7,11 @@ msgid ""
 msgstr ""
 "Project-Id-Version: R 2.4.0\n"
 "Report-Msgid-Bugs-To: bugs.r-project.org\n"
-"POT-Creation-Date: 2014-02-27 17:14\n"
+"POT-Creation-Date: 2016-04-01 09:50\n"
 "PO-Revision-Date: 2005-02-04 08:37+0000\n"
 "Last-Translator: 陈斐 <feic at normipaiva.com>\n"
 "Language-Team: Chinese\n"
-"Language: \n"
+"Language: zh_CN\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
@@ -261,9 +261,6 @@ msgstr "gPath(%s)不存在"
 msgid "grob '%s' not found"
 msgstr "不存在grob'%s'这个值"
 
-msgid "invalid element in the display list"
-msgstr "显示单里的成分不对"
-
 #, fuzzy
 msgid "Invalid force target"
 msgstr "'order'的值不对"
@@ -325,10 +322,6 @@ msgstr "表不对"
 msgid "invalid 'listing'"
 msgstr "'listing'不对"
 
-#, fuzzy
-msgid "Nothing on the display list"
-msgstr "显示单修改得不对"
-
 msgid "invalid 'origin'"
 msgstr "'origin'的值不对"
 
@@ -461,6 +454,10 @@ msgstr "索引值出界(取单元数字子集时)"
 msgid "index out of bounds (unit list subsetting)"
 msgstr "索引值出界(取单元串子集时)"
 
+#, fuzzy
+msgid "Value being assigned must be a unit"
+msgstr "x和y必需为单元值"
+
 msgid "it is invalid to combine 'unit' objects with other types"
 msgstr "不能将'unit'对象同其它类别的对象相结合"
 
@@ -527,6 +524,13 @@ msgid "invalid viewport name"
 msgid_plural "invalid viewport names"
 msgstr[0] "视口名字不对"
 
+#~ msgid "invalid element in the display list"
+#~ msgstr "显示单里的成分不对"
+
+#, fuzzy
+#~ msgid "Nothing on the display list"
+#~ msgstr "显示单修改得不对"
+
 #~ msgid "the 'vp' argument is deprecated"
 #~ msgstr "'vp'参数已经不再有用"
 
diff --git a/src/library/grid/po/da.po b/src/library/grid/po/da.po
index eae6b66..e878862 100644
--- a/src/library/grid/po/da.po
+++ b/src/library/grid/po/da.po
@@ -5,8 +5,8 @@
 msgid ""
 msgstr ""
 "Project-Id-Version: R 3.0.0\n"
-"Report-Msgid-Bugs-To: bugs.r-project.org\n"
-"POT-Creation-Date: 2014-02-19 07:55+0000\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2016-04-01 10:01-0700\n"
 "PO-Revision-Date: 2011-11-28 23:18+0200\n"
 "Last-Translator: Joe <joedalton2 at yahoo.dk>\n"
 "Language-Team: LANGUAGE <LL at li.org>\n"
@@ -17,58 +17,58 @@ msgstr ""
 "Plural-Forms: nplurals=2; plural=(n != 1);\n"
 "X-Generator: Pootle 2.1.6\n"
 
-#: grid.c:214
+#: grid.c:212
 #, fuzzy
 msgid "cannot clip to rotated viewport"
 msgstr "Kan ikke klippe til roteret viewport"
 
-#: grid.c:691 grid.c:696 grid.c:785 grid.c:790
+#: grid.c:697 grid.c:702 grid.c:792 grid.c:797
 #, fuzzy
 msgid "cannot pop the top-level viewport ('grid' and 'graphics' output mixed?)"
 msgstr "Kan ikke pop topniveau-viewporten (gitter og grafiks uddata blandet?)"
 
-#: grid.c:970
+#: grid.c:977
 msgid "attempt to plot on null device"
 msgstr "forsøg på at plotte på null-enhed"
 
-#: grid.c:1302
+#: grid.c:1309
 #, fuzzy
 msgid "there is no layout defined"
 msgstr "Der er ingen layout defineret"
 
-#: grid.c:1522
+#: grid.c:1529
 #, fuzzy
 msgid "polygon edge not found (zero-width or zero-height?)"
 msgstr "Polygonkant ikke fundet (nulbredde eller nulhøjde?)"
 
-#: grid.c:1531
+#: grid.c:1538
 #, fuzzy
 msgid "polygon edge not found"
 msgstr "Polygonkant ikke fundet"
 
-#: grid.c:1685
+#: grid.c:1692
 #, fuzzy
 msgid "require at least two points to draw arrow"
 msgstr "Kræver mindst to punkter at tegne pil"
 
-#: grid.c:2001
+#: grid.c:2008
 #, fuzzy
 msgid "non-finite control point in Xspline"
 msgstr "Ikkebegrænsende kontrolpunkter i Xspline"
 
-#: grid.c:2866
+#: grid.c:2873
 msgid "non-finite x or y in graphics path"
 msgstr "ikkebegrænsende x eller y i grafiksti"
 
-#: grid.c:2907
+#: grid.c:2914
 msgid "Empty raster"
 msgstr ""
 
-#: grid.c:3359
+#: grid.c:3368
 msgid "invalid plotting symbol"
 msgstr "ugyldigt plotsymbol"
 
-#: grid.c:3445
+#: grid.c:3454
 #, fuzzy
 msgid "unable to clip to rotated rectangle"
 msgstr "Kan ikke klippe til roteret rektangel"
@@ -83,11 +83,11 @@ msgstr "ugyldig layout.pos.row"
 msgid "invalid 'layout.pos.col'"
 msgstr "ugyldig layout.pos.col"
 
-#: matrix.c:49
+#: matrix.c:50
 msgid "singular transformation matrix"
 msgstr "entalstransformationsmatrix"
 
-#: state.c:169
+#: state.c:170
 #, fuzzy
 msgid "unable to store 'grid' state.  Too many devices open?"
 msgstr "Kan ikke lagre gittertilstand.  For mange enheder åbne?"
@@ -124,7 +124,7 @@ msgstr "Enheder skal være tegn"
 msgid "'units' must be of length > 0"
 msgstr "Enheder skal have længde > 0"
 
-#: viewport.c:317
+#: viewport.c:315
 #, fuzzy
 msgid "non-finite location and/or size for viewport"
 msgstr "Ikkebegrænsende placeirng og/eller størrelse for viewport"
diff --git a/src/library/grid/po/de.po b/src/library/grid/po/de.po
index db7c81e..6e8a436 100644
--- a/src/library/grid/po/de.po
+++ b/src/library/grid/po/de.po
@@ -5,65 +5,65 @@
 # Detlef Steuer <steuer at hsu-hh.de>, 2009-2014.
 msgid ""
 msgstr ""
-"Project-Id-Version: R-3.1.0\n"
-"Report-Msgid-Bugs-To: bugs.r-project.org\n"
-"POT-Creation-Date: 2014-02-19 07:55+0000\n"
-"PO-Revision-Date: 2013-03-01 15:06+0100\n"
+"Project-Id-Version: R-3.2.0\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2016-04-01 10:01-0700\n"
+"PO-Revision-Date: 2015-03-20 16:09+0100\n"
 "Last-Translator: Detlef Steuer <steuer at hsu-hh.de>\n"
 "Language-Team:  <R-core at r-project.org>\n"
-"Language: \n"
+"Language: de\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
 "Plural-Forms: nplurals=2; plural=n == 1 ? 0 : 1;\n"
 
-#: grid.c:214
+#: grid.c:212
 msgid "cannot clip to rotated viewport"
 msgstr "kann rotierten Viewport nicht beschneiden"
 
-#: grid.c:691 grid.c:696 grid.c:785 grid.c:790
+#: grid.c:697 grid.c:702 grid.c:792 grid.c:797
 msgid "cannot pop the top-level viewport ('grid' and 'graphics' output mixed?)"
 msgstr ""
 "kann den obersten viewport nicht vom Stack werfen ('grid' und 'graphics' "
 "Ausgaben gemischt?)"
 
-#: grid.c:970
+#: grid.c:977
 msgid "attempt to plot on null device"
-msgstr "Versuch in das NUll-Gerät zu zeichnen"
+msgstr "Versuch in das Null-Device zu zeichnen"
 
-#: grid.c:1302
+#: grid.c:1309
 msgid "there is no layout defined"
 msgstr "kein Layout definiert"
 
-#: grid.c:1522
+#: grid.c:1529
 msgid "polygon edge not found (zero-width or zero-height?)"
 msgstr "Polygonkante nicht gefunden (Breite oder Länge 0?)"
 
-#: grid.c:1531
+#: grid.c:1538
 msgid "polygon edge not found"
 msgstr "Polygonkante nicht gefunden"
 
-#: grid.c:1685
+#: grid.c:1692
 msgid "require at least two points to draw arrow"
 msgstr "mindestens zwei Punkte nötig, um einen Pfeil zu zeichnen"
 
-#: grid.c:2001
+#: grid.c:2008
 msgid "non-finite control point in Xspline"
 msgstr "nicht-endlicher Kontrollpunkt in Xspline"
 
-#: grid.c:2866
+#: grid.c:2873
 msgid "non-finite x or y in graphics path"
 msgstr "unendliches x oder y im Grafikpfad"
 
-#: grid.c:2907
+#: grid.c:2914
 msgid "Empty raster"
 msgstr "Leeres Raster"
 
-#: grid.c:3359
+#: grid.c:3368
 msgid "invalid plotting symbol"
 msgstr "unzulässiges Plotsymbol"
 
-#: grid.c:3445
+#: grid.c:3454
 msgid "unable to clip to rotated rectangle"
 msgstr "kann nicht auf das rotierte Rechteck zurechtschneiden"
 
@@ -75,11 +75,11 @@ msgstr "unzulässige 'layout.pos.row'"
 msgid "invalid 'layout.pos.col'"
 msgstr "unzulässige 'layout.pos.col'"
 
-#: matrix.c:49
+#: matrix.c:50
 msgid "singular transformation matrix"
 msgstr "singuläre Transformationsmatrix"
 
-#: state.c:169
+#: state.c:170
 msgid "unable to store 'grid' state.  Too many devices open?"
 msgstr "kann den Status von 'grid' nicht speichern. Zu viele geöffnete Geräte?"
 
@@ -92,7 +92,6 @@ msgid "invalid unit or unit not yet implemented"
 msgstr "unzulässige Einheit oder Einheit noch nicht implementiert"
 
 #: unit.c:1702 unit.c:1733
-#, fuzzy
 msgid "Viewport has zero dimension(s)"
 msgstr "Viewport hat keine Dimension(en)"
 
@@ -112,6 +111,6 @@ msgstr "'units' müssen Zeichenketten sein"
 msgid "'units' must be of length > 0"
 msgstr "'units' müssen positive Länge haben"
 
-#: viewport.c:317
+#: viewport.c:315
 msgid "non-finite location and/or size for viewport"
 msgstr "nicht-endlicher Ort oder/und Größe des Viewports"
diff --git a/src/library/grid/po/fr.po b/src/library/grid/po/fr.po
index a2bc4d4..856a4e2 100644
--- a/src/library/grid/po/fr.po
+++ b/src/library/grid/po/fr.po
@@ -6,8 +6,8 @@
 msgid ""
 msgstr ""
 "Project-Id-Version: R 2.12.0\n"
-"Report-Msgid-Bugs-To: bugs.r-project.org\n"
-"POT-Creation-Date: 2014-02-19 07:55+0000\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2016-04-01 10:01-0700\n"
 "PO-Revision-Date: 2014-03-17 10:48+0100\n"
 "Last-Translator: Philippe Grosjean <phgrosjean at sciviews.org>\n"
 "Language-Team: French <R-core at r-project.org>\n"
@@ -18,53 +18,53 @@ msgstr ""
 "Plural-Forms: nplurals=2; plural=(n > 1);\n"
 "X-Generator: Poedit 1.6.4\n"
 
-#: grid.c:214
+#: grid.c:212
 msgid "cannot clip to rotated viewport"
 msgstr "impossible de couper une vue pivot�e"
 
-#: grid.c:691 grid.c:696 grid.c:785 grid.c:790
+#: grid.c:697 grid.c:702 grid.c:792 grid.c:797
 msgid "cannot pop the top-level viewport ('grid' and 'graphics' output mixed?)"
 msgstr ""
 "impossible de rendre la vue de plus haut niveau active (sorties 'grid' et "
 "'graphics' mix�es ?)"
 
-#: grid.c:970
+#: grid.c:977
 msgid "attempt to plot on null device"
 msgstr "tentative de dessin dans un p�riph�rique 'null'"
 
-#: grid.c:1302
+#: grid.c:1309
 msgid "there is no layout defined"
 msgstr "aucune mise en page d�finie"
 
-#: grid.c:1522
+#: grid.c:1529
 msgid "polygon edge not found (zero-width or zero-height?)"
 msgstr "extr�mit� de polygone non trouv� (longueur ou largeur nulle?)"
 
-#: grid.c:1531
+#: grid.c:1538
 msgid "polygon edge not found"
 msgstr "extr�mit�s de polygone non trouv�s"
 
-#: grid.c:1685
+#: grid.c:1692
 msgid "require at least two points to draw arrow"
 msgstr "il faut au moins deux points pour tracer une fl�che"
 
-#: grid.c:2001
+#: grid.c:2008
 msgid "non-finite control point in Xspline"
 msgstr "point de contr�le non fini dans Xspline"
 
-#: grid.c:2866
+#: grid.c:2873
 msgid "non-finite x or y in graphics path"
 msgstr "x ou y infinis dans le chemin graphique"
 
-#: grid.c:2907
+#: grid.c:2914
 msgid "Empty raster"
 msgstr "graphique raster vide"
 
-#: grid.c:3359
+#: grid.c:3368
 msgid "invalid plotting symbol"
 msgstr "symboles graphiques incorrects"
 
-#: grid.c:3445
+#: grid.c:3454
 msgid "unable to clip to rotated rectangle"
 msgstr "impossible de couper au rectangle pivot�"
 
@@ -76,11 +76,11 @@ msgstr "'layout.pos.row' incorrect"
 msgid "invalid 'layout.pos.col'"
 msgstr "'layout.pos.col' incorrect"
 
-#: matrix.c:49
+#: matrix.c:50
 msgid "singular transformation matrix"
 msgstr "matrice de transformation singuli�re"
 
-#: state.c:169
+#: state.c:170
 msgid "unable to store 'grid' state.  Too many devices open?"
 msgstr ""
 "Impossible de conserver l'�tat de 'grid'. Trop de p�riph�riques ouverts ?"
@@ -113,7 +113,7 @@ msgstr "les unit
 msgid "'units' must be of length > 0"
 msgstr "Les unit�s dans 'units' doivent �tre de longueur > 0"
 
-#: viewport.c:317
+#: viewport.c:315
 msgid "non-finite location and/or size for viewport"
 msgstr "position et / ou taille de vue non finies"
 
diff --git a/src/library/grid/po/grid.pot b/src/library/grid/po/grid.pot
index 7f21409..b0e70e7 100644
--- a/src/library/grid/po/grid.pot
+++ b/src/library/grid/po/grid.pot
@@ -1,14 +1,14 @@
 # SOME DESCRIPTIVE TITLE.
-# Copyright (C) YEAR The R Core Team
+# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
 # This file is distributed under the same license as the PACKAGE package.
 # FIRST AUTHOR <EMAIL at ADDRESS>, YEAR.
 #
 #, fuzzy
 msgid ""
 msgstr ""
-"Project-Id-Version: R 3.1.0\n"
-"Report-Msgid-Bugs-To: bugs.r-project.org\n"
-"POT-Creation-Date: 2014-02-19 07:55+0000\n"
+"Project-Id-Version: grid 3.4.0\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2016-04-01 10:01-0700\n"
 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
 "Last-Translator: FULL NAME <EMAIL at ADDRESS>\n"
 "Language-Team: LANGUAGE <LL at li.org>\n"
@@ -17,51 +17,51 @@ msgstr ""
 "Content-Type: text/plain; charset=CHARSET\n"
 "Content-Transfer-Encoding: 8bit\n"
 
-#: grid.c:214
+#: grid.c:212
 msgid "cannot clip to rotated viewport"
 msgstr ""
 
-#: grid.c:691 grid.c:696 grid.c:785 grid.c:790
+#: grid.c:697 grid.c:702 grid.c:792 grid.c:797
 msgid "cannot pop the top-level viewport ('grid' and 'graphics' output mixed?)"
 msgstr ""
 
-#: grid.c:970
+#: grid.c:977
 msgid "attempt to plot on null device"
 msgstr ""
 
-#: grid.c:1302
+#: grid.c:1309
 msgid "there is no layout defined"
 msgstr ""
 
-#: grid.c:1522
+#: grid.c:1529
 msgid "polygon edge not found (zero-width or zero-height?)"
 msgstr ""
 
-#: grid.c:1531
+#: grid.c:1538
 msgid "polygon edge not found"
 msgstr ""
 
-#: grid.c:1685
+#: grid.c:1692
 msgid "require at least two points to draw arrow"
 msgstr ""
 
-#: grid.c:2001
+#: grid.c:2008
 msgid "non-finite control point in Xspline"
 msgstr ""
 
-#: grid.c:2866
+#: grid.c:2873
 msgid "non-finite x or y in graphics path"
 msgstr ""
 
-#: grid.c:2907
+#: grid.c:2914
 msgid "Empty raster"
 msgstr ""
 
-#: grid.c:3359
+#: grid.c:3368
 msgid "invalid plotting symbol"
 msgstr ""
 
-#: grid.c:3445
+#: grid.c:3454
 msgid "unable to clip to rotated rectangle"
 msgstr ""
 
@@ -73,11 +73,11 @@ msgstr ""
 msgid "invalid 'layout.pos.col'"
 msgstr ""
 
-#: matrix.c:49
+#: matrix.c:50
 msgid "singular transformation matrix"
 msgstr ""
 
-#: state.c:169
+#: state.c:170
 msgid "unable to store 'grid' state.  Too many devices open?"
 msgstr ""
 
@@ -109,6 +109,6 @@ msgstr ""
 msgid "'units' must be of length > 0"
 msgstr ""
 
-#: viewport.c:317
+#: viewport.c:315
 msgid "non-finite location and/or size for viewport"
 msgstr ""
diff --git a/src/library/grid/po/it.po b/src/library/grid/po/it.po
index 55a1ea7..99d543e 100644
--- a/src/library/grid/po/it.po
+++ b/src/library/grid/po/it.po
@@ -6,8 +6,8 @@
 msgid ""
 msgstr ""
 "Project-Id-Version: R 2.1.0\n"
-"Report-Msgid-Bugs-To: bugs.r-project.org\n"
-"POT-Creation-Date: 2014-02-19 07:55+0000\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2016-04-01 10:01-0700\n"
 "PO-Revision-Date: 2005-04-17 17:30+0200\n"
 "Last-Translator: stefano iacus <>\n"
 "Language-Team: Italian <it at li.org>\n"
@@ -17,57 +17,57 @@ msgstr ""
 "Content-Transfer-Encoding: 8bit\n"
 "Plural-Forms: nplurals=2; plural=(n != 1);\n"
 
-#: grid.c:214
+#: grid.c:212
 #, fuzzy
 msgid "cannot clip to rotated viewport"
 msgstr "Impossibile tagliare su una viewport ruotata"
 
-#: grid.c:691 grid.c:696 grid.c:785 grid.c:790
+#: grid.c:697 grid.c:702 grid.c:792 grid.c:797
 #, fuzzy
 msgid "cannot pop the top-level viewport ('grid' and 'graphics' output mixed?)"
 msgstr ""
 "Non posso mostrare la view-port di livello massimo (grid e graphics output "
 "mischiato?)"
 
-#: grid.c:970
+#: grid.c:977
 msgid "attempt to plot on null device"
 msgstr "tentativo di scrivere sul dispositivo null"
 
-#: grid.c:1302
+#: grid.c:1309
 #, fuzzy
 msgid "there is no layout defined"
 msgstr "Il layout non è definito"
 
-#: grid.c:1522
+#: grid.c:1529
 msgid "polygon edge not found (zero-width or zero-height?)"
 msgstr ""
 
-#: grid.c:1531
+#: grid.c:1538
 msgid "polygon edge not found"
 msgstr ""
 
-#: grid.c:1685
+#: grid.c:1692
 msgid "require at least two points to draw arrow"
 msgstr ""
 
-#: grid.c:2001
+#: grid.c:2008
 msgid "non-finite control point in Xspline"
 msgstr ""
 
-#: grid.c:2866
+#: grid.c:2873
 msgid "non-finite x or y in graphics path"
 msgstr ""
 
-#: grid.c:2907
+#: grid.c:2914
 msgid "Empty raster"
 msgstr ""
 
-#: grid.c:3359
+#: grid.c:3368
 #, fuzzy
 msgid "invalid plotting symbol"
 msgstr "layout.pos.col non valido"
 
-#: grid.c:3445
+#: grid.c:3454
 #, fuzzy
 msgid "unable to clip to rotated rectangle"
 msgstr "Impossibile tagliare su una viewport ruotata"
@@ -82,11 +82,11 @@ msgstr "layout.pos.row non valido"
 msgid "invalid 'layout.pos.col'"
 msgstr "layout.pos.col non valido"
 
-#: matrix.c:49
+#: matrix.c:50
 msgid "singular transformation matrix"
 msgstr ""
 
-#: state.c:169
+#: state.c:170
 #, fuzzy
 msgid "unable to store 'grid' state.  Too many devices open?"
 msgstr "Impossibile memorizzare lo stato di grid. Troppi dispositivi aperti?"
@@ -123,7 +123,7 @@ msgstr "unit devono essere di tipo character"
 msgid "'units' must be of length > 0"
 msgstr "unit devono avere lunghezza > 0"
 
-#: viewport.c:317
+#: viewport.c:315
 #, fuzzy
 msgid "non-finite location and/or size for viewport"
 msgstr "Posizione e/o ampiezza della viewport non finita"
diff --git a/src/library/grid/po/ja.po b/src/library/grid/po/ja.po
index b7ff0b6..dfb61d4 100644
--- a/src/library/grid/po/ja.po
+++ b/src/library/grid/po/ja.po
@@ -6,8 +6,8 @@
 msgid ""
 msgstr ""
 "Project-Id-Version: R 2.1.1 \n"
-"Report-Msgid-Bugs-To: bugs.r-project.org\n"
-"POT-Creation-Date: 2014-02-19 07:55+0000\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2016-04-01 10:01-0700\n"
 "PO-Revision-Date: 2014-03-26 10:02+0200 \n"
 "Last-Translator: Masafumi  \n"
 "Language-Team: RjpWiki Message Translation Team <mokada at md.tsukuba.ac.jp> \n"
@@ -18,53 +18,53 @@ msgstr ""
 "Plural-Forms: nplurals=1; plural=0; \n"
 "X-Generator: Pootle 2.0.5 \n"
 
-#: grid.c:214
+#: grid.c:212
 msgid "cannot clip to rotated viewport"
 msgstr " rotated viewport のクリップは出来ません "
 
-#: grid.c:691 grid.c:696 grid.c:785 grid.c:790
+#: grid.c:697 grid.c:702 grid.c:792 grid.c:797
 msgid "cannot pop the top-level viewport ('grid' and 'graphics' output mixed?)"
 msgstr ""
 " トップレベルの viewport は pop することが出来ません ('grid' と 'graphics' の"
 "出力を混同していませんか?) "
 
-#: grid.c:970
+#: grid.c:977
 msgid "attempt to plot on null device"
 msgstr " ナルデバイスにプロットしようとしています "
 
-#: grid.c:1302
+#: grid.c:1309
 msgid "there is no layout defined"
 msgstr " レイアウトが定義されていません "
 
-#: grid.c:1522
+#: grid.c:1529
 msgid "polygon edge not found (zero-width or zero-height?)"
 msgstr " 多角形の頂点が見付かりません (幅もしくは高さがゼロ?) "
 
-#: grid.c:1531
+#: grid.c:1538
 msgid "polygon edge not found"
 msgstr " 多角形の頂点が見付かりません "
 
-#: grid.c:1685
+#: grid.c:1692
 msgid "require at least two points to draw arrow"
 msgstr " 矢印を書くためには少なくとも二つの点が必要です "
 
-#: grid.c:2001
+#: grid.c:2008
 msgid "non-finite control point in Xspline"
 msgstr " Xspline 中に有限でない制御点 "
 
-#: grid.c:2866
+#: grid.c:2873
 msgid "non-finite x or y in graphics path"
 msgstr " グラフィックパスに有限でない x か y があります "
 
-#: grid.c:2907
+#: grid.c:2914
 msgid "Empty raster"
 msgstr " ラスターが空です "
 
-#: grid.c:3359
+#: grid.c:3368
 msgid "invalid plotting symbol"
 msgstr " 不正なプロット記号です "
 
-#: grid.c:3445
+#: grid.c:3454
 msgid "unable to clip to rotated rectangle"
 msgstr " 回転された矩形へクリップ出来ません "
 
@@ -76,11 +76,11 @@ msgstr " 不正な 'layout.pos.row' です "
 msgid "invalid 'layout.pos.col'"
 msgstr " 不正な 'layout.pos.col' です "
 
-#: matrix.c:49
+#: matrix.c:50
 msgid "singular transformation matrix"
 msgstr " 特異な変換行列です "
 
-#: state.c:169
+#: state.c:170
 msgid "unable to store 'grid' state.  Too many devices open?"
 msgstr ""
 " 現在の 'grid' の状態を保持することが出来ません。デバイスを開きすぎていません"
@@ -114,7 +114,7 @@ msgstr " 単位 ('units') は文字型でなければなりません "
 msgid "'units' must be of length > 0"
 msgstr " 単位 ('units') の長さは 0 より大きくなければなりません "
 
-#: viewport.c:317
+#: viewport.c:315
 msgid "non-finite location and/or size for viewport"
 msgstr ""
 " 有限でない location かつ/または 有限でない viewport に対するサイズです "
diff --git a/src/library/grid/po/ko.po b/src/library/grid/po/ko.po
index 3aed709..8efe6a7 100644
--- a/src/library/grid/po/ko.po
+++ b/src/library/grid/po/ko.po
@@ -1,72 +1,77 @@
 # Korean translation for R grid package
-# src/library/grid/po/ko.po
-# Copyright (C) 1995-2014 The R Core Team
+# ./grid/po/ko.po
+#
+# Copyright (C) 1995-2016 The R Core Team
+#
 # This file is distributed under the same license as the R grid package.
-# Chel Hee Lee <chl948 at mail.usask.ca>, 2008-2014.
+# Maintained by Chel Hee Lee <chl948 at mail.usask.ca>, 2008-2016.
+# Contact: Chel Hee Lee <gnustats at gmail.com>
+#
+# Notes:
+# Under development (unstable) starting from 11-APR-2016 for R-3.3.1 - QC: in progress
+# Freezed on 10-APR-2016 for R-3.3.0 - QC: PASS
+# Freezed on 30-MAR-2015 for R-3.2.0 - QC: PASS
+# Freezed on 06-FEB-2015 for R-3.1.3 - QC: PASS
 #
 msgid ""
 msgstr ""
-"Project-Id-Version: R 3.1.0\n"
+"Project-Id-Version: R-3.3.0\n"
 "Report-Msgid-Bugs-To: bugs.r-project.org\n"
-"POT-Creation-Date: 2014-02-19 07:55+0000\n"
-"PO-Revision-Date: 2014-03-27 09:03-0600\n"
+"POT-Creation-Date: 2016-04-01 10:01-0700\n"
+"PO-Revision-Date: 2016-04-11 13:08-0600\n"
 "Last-Translator: Chel Hee Lee <chl948 at mail.usask.ca>\n"
-"Language-Team:  <chl948 at mail.usask.ca>\n"
+"Language-Team: Chel Hee Lee <chl948 at mail.usask.ca>\n"
 "Language: ko\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
 "Plural-Forms: nplurals=1; plural=0;\n"
-"X-Poedit-SourceCharset: UTF-8\n"
-"X-Generator: Poedit 1.5.4\n"
 
-#: grid.c:214
+#: grid.c:212
 msgid "cannot clip to rotated viewport"
 msgstr "회전된 뷰포트에 고정 할 수 없습니다"
 
-#: grid.c:691 grid.c:696 grid.c:785 grid.c:790
+#: grid.c:697 grid.c:702 grid.c:792 grid.c:797
 msgid "cannot pop the top-level viewport ('grid' and 'graphics' output mixed?)"
-msgstr ""
-"최상단 뷰포트를 띄울 수 없습니다 ('grid'와 'graphics' 출력을 혼용하고 있나"
-"요?)"
+msgstr "최상단 뷰포트를 띄울 수 없습니다 ('grid'와 'graphics' 출력을 혼용하고 있나요?)"
 
-#: grid.c:970
+#: grid.c:977
 msgid "attempt to plot on null device"
 msgstr "null 장치위에 플랏을 시도합니다"
 
-#: grid.c:1302
+#: grid.c:1309
 msgid "there is no layout defined"
 msgstr "정의된 레이아웃이 없습니다"
 
-#: grid.c:1522
+#: grid.c:1529
 msgid "polygon edge not found (zero-width or zero-height?)"
 msgstr "다각형의 끝점을 찾을 수 없습니다 (혹시 너비 또는 높이가 0인가요?)"
 
-#: grid.c:1531
+#: grid.c:1538
 msgid "polygon edge not found"
 msgstr "다각형의 끝점을 찾을 수 없습니다"
 
-#: grid.c:1685
+#: grid.c:1692
 msgid "require at least two points to draw arrow"
 msgstr "화살표를 그리기 위해서는 최소한 두개의 점이 필요합니다"
 
-#: grid.c:2001
+#: grid.c:2008
 msgid "non-finite control point in Xspline"
 msgstr "Xspline에서 유한하지 않은 컨트롤 포인트입니다"
 
-#: grid.c:2866
+#: grid.c:2873
 msgid "non-finite x or y in graphics path"
 msgstr "그래픽 패스에 유한하지 않은 x 또는 y가 있습니다"
 
-#: grid.c:2907
+#: grid.c:2914
 msgid "Empty raster"
 msgstr "비어있는 래스터입니다"
 
-#: grid.c:3359
+#: grid.c:3368
 msgid "invalid plotting symbol"
 msgstr "유효하지 않은 플랏팅 기호입니다"
 
-#: grid.c:3445
+#: grid.c:3454
 msgid "unable to clip to rotated rectangle"
 msgstr "회전된 사각형을 고정할 수 없습니다"
 
@@ -78,11 +83,11 @@ msgstr "유효하지 않은 'layout.pos.row'입니다"
 msgid "invalid 'layout.pos.col'"
 msgstr "유효하지 않은 'layout.pos.col'입니다"
 
-#: matrix.c:49
+#: matrix.c:50
 msgid "singular transformation matrix"
 msgstr ""
 
-#: state.c:169
+#: state.c:170
 msgid "unable to store 'grid' state.  Too many devices open?"
 msgstr "'grid'상태를 저장할 수 없는데 혹시 너무 많은 장치가 열려있나요?"
 
@@ -114,6 +119,6 @@ msgstr "'units'은 반드시 문자이어야 합니다"
 msgid "'units' must be of length > 0"
 msgstr "유닛은 반드시 길이가 0 보다 커야 합니다"
 
-#: viewport.c:317
+#: viewport.c:315
 msgid "non-finite location and/or size for viewport"
 msgstr "뷰포트의 위치 그리고/또는 크기가 유한하지 않습니다"
diff --git a/src/library/grid/po/pl.po b/src/library/grid/po/pl.po
index 702f68f..a1f604e 100644
--- a/src/library/grid/po/pl.po
+++ b/src/library/grid/po/pl.po
@@ -1,8 +1,8 @@
 msgid ""
 msgstr ""
-"Project-Id-Version: R 3.1.0\n"
-"Report-Msgid-Bugs-To: bugs.r-project.org\n"
-"POT-Creation-Date: 2014-02-19 07:55+0000\n"
+"Project-Id-Version: R 3.4.0\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2016-04-01 10:01-0700\n"
 "PO-Revision-Date: \n"
 "Last-Translator: Łukasz Daniel <lukasz.daniel at gmail.com>\n"
 "Language-Team: Łukasz Daniel <lukasz.daniel at gmail.com>\n"
@@ -13,179 +13,105 @@ msgstr ""
 "na-Revision-Date: 2012-05-29 07:55+0100\n"
 "Plural-Forms: nplurals=3; plural=(n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 "
 "|| n%100>=20) ? 1 : 2);\n"
-"X-Poedit-SourceCharset: iso-8859-1\n"
-"X-Generator: Poedit 1.5.4\n"
+"X-Poedit-SourceCharset: UTF-8\n"
+"X-Generator: Poedit 1.8.7\n"
 
-# grid/src/grid.c: 214
-# warning(_("cannot clip to rotated viewport"))
-#: grid.c:214
+#: grid.c:212
 msgid "cannot clip to rotated viewport"
 msgstr "nie można przypiąć do obróconego okienka ekranu"
 
-# grid/src/grid.c: 691
-# error(_("cannot pop the top-level viewport ('grid' and 'graphics' output mixed?)"))
-# grid/src/grid.c: 696
-# error(_("cannot pop the top-level viewport ('grid' and 'graphics' output mixed?)"))
-# grid/src/grid.c: 785
-# error(_("cannot pop the top-level viewport ('grid' and 'graphics' output mixed?)"))
-# grid/src/grid.c: 790
-# error(_("cannot pop the top-level viewport ('grid' and 'graphics' output mixed?)"))
-#: grid.c:691 grid.c:696 grid.c:785 grid.c:790
+#: grid.c:697 grid.c:702 grid.c:792 grid.c:797
 msgid "cannot pop the top-level viewport ('grid' and 'graphics' output mixed?)"
 msgstr ""
 "nie można wyświetlić okienka ekranu na wierzchu (siatka oraz grafika "
 "pomieszały się?)"
 
-# grid/src/grid.c: 970
-# error(_("attempt to plot on null device"))
-#: grid.c:970
+#: grid.c:977
 msgid "attempt to plot on null device"
 msgstr "próba rysowania na pustym urządzeniu"
 
-# grid/src/grid.c: 1302
-# error(_("there is no layout defined"))
-#: grid.c:1302
+#: grid.c:1309
 msgid "there is no layout defined"
 msgstr "nie określono układu"
 
-# grid/src/grid.c: 1522
-# error(_("polygon edge not found (zero-width or zero-height?)"))
-#: grid.c:1522
+#: grid.c:1529
 msgid "polygon edge not found (zero-width or zero-height?)"
 msgstr ""
 "nie znaleziono krawędzi wielokąta (zerowa szerokość lub zerowa wysokość?)"
 
-# grid/src/grid.c: 1531
-# error(_("polygon edge not found"))
-#: grid.c:1531
+#: grid.c:1538
 msgid "polygon edge not found"
 msgstr "nie znaleziono krawędzi wielokąta"
 
-# grid/src/grid.c: 1685
-# error(_("require at least two points to draw arrow"))
-#: grid.c:1685
+#: grid.c:1692
 msgid "require at least two points to draw arrow"
 msgstr "wymaga co najmniej dwu punktów, aby narysować strzałkę"
 
-# grid/src/grid.c: 2001
-# error(_("non-finite control point in Xspline"))
-#: grid.c:2001
+#: grid.c:2008
 msgid "non-finite control point in Xspline"
 msgstr "nieskończony punkt kontrolny w 'Xspline'"
 
-# grid/src/grid.c: 2866
-# error(_("non-finite x or y in graphics path"))
-#: grid.c:2866
+#: grid.c:2873
 msgid "non-finite x or y in graphics path"
 msgstr "nieskończony 'x' lub 'y' w ścieżce grafiki"
 
-# grid/src/grid.c: 2907
-# error(_("Empty raster"))
-#: grid.c:2907
+#: grid.c:2914
 msgid "Empty raster"
 msgstr "Pusty raster"
 
-# grid/src/grid.c: 3359
-# error(_("invalid plotting symbol"))
-#: grid.c:3359
+#: grid.c:3368
 msgid "invalid plotting symbol"
 msgstr "Nieprawidłowy rysowany symbol"
 
-# grid/src/grid.c: 3445
-# warning(_("unable to clip to rotated rectangle"))
-#: grid.c:3445
+#: grid.c:3454
 msgid "unable to clip to rotated rectangle"
 msgstr "nie można przypiąć do obróconego prostokąta"
 
-# grid/src/layout.c: 589
-# error(_("invalid 'layout.pos.row'"))
 #: layout.c:589
 msgid "invalid 'layout.pos.row'"
 msgstr "niepoprawny 'layout.pos.row'"
 
-# grid/src/layout.c: 593
-# error(_("invalid 'layout.pos.col'"))
 #: layout.c:593
 msgid "invalid 'layout.pos.col'"
 msgstr "niepoprawny 'layout.pos.col'"
 
-# grid/src/matrix.c: 49
-# error(_("singular transformation matrix"))
-#: matrix.c:49
+#: matrix.c:50
 msgid "singular transformation matrix"
 msgstr "osobliwa macierz transformacyjna"
 
-# grid/src/state.c: 169
-# error(_("unable to store 'grid' state.  Too many devices open?"))
-#: state.c:169
+#: state.c:170
 msgid "unable to store 'grid' state.  Too many devices open?"
 msgstr "nie można zachować stanu siatki. Zbyt duża liczba otwartych urządzeń?"
 
-# grid/src/unit.c: 260
-# error(_("unimplemented unit function"))
-# grid/src/unit.c: 410
-# error(_("unimplemented unit function"))
-# grid/src/unit.c: 1210
-# error(_("unimplemented unit function"))
-# grid/src/unit.c: 1290
-# error(_("unimplemented unit function"))
-# grid/src/unit.c: 1370
-# error(_("unimplemented unit function"))
-# grid/src/unit.c: 1450
-# error(_("unimplemented unit function"))
 #: unit.c:260 unit.c:410 unit.c:1210 unit.c:1290 unit.c:1370 unit.c:1450
 msgid "unimplemented unit function"
 msgstr "niezaimplementowana jednostkowa funkcja"
 
-# grid/src/unit.c: 893
-# error(_("invalid unit or unit not yet implemented"))
-# grid/src/unit.c: 1645
-# error(_("invalid unit or unit not yet implemented"))
 #: unit.c:893 unit.c:1645
 msgid "invalid unit or unit not yet implemented"
 msgstr ""
 "niedozwolona jednostka lub jednostka nie została jeszcze zaimplementowana"
 
-# grid/src/unit.c: 1702
-# error(_("Viewport has zero dimension(s)"))
-# grid/src/unit.c: 1733
-# error(_("Viewport has zero dimension(s)"))
 #: unit.c:1702 unit.c:1733
 msgid "Viewport has zero dimension(s)"
 msgstr "Okno ekranu ma zerowe wymiary"
 
-# grid/src/unit.c: 1765
-# error(_("Unsupported unit conversion"))
-# grid/src/unit.c: 1780
-# error(_("Unsupported unit conversion"))
-# grid/src/unit.c: 1795
-# error(_("Unsupported unit conversion"))
-# grid/src/unit.c: 1810
-# error(_("Unsupported unit conversion"))
 #: unit.c:1765 unit.c:1780 unit.c:1795 unit.c:1810
 msgid "Unsupported unit conversion"
 msgstr "Niewspierana jednostka konwersji"
 
-# grid/src/unit.c: 1898
-# error(_("Invalid unit"))
 #: unit.c:1898
 msgid "Invalid unit"
 msgstr "Niepoprawna jednostka"
 
-# grid/src/unit.c: 1914
-# error(_("'units' must be character"))
 #: unit.c:1914
 msgid "'units' must be character"
 msgstr "'units' muszą być tekstem"
 
-# grid/src/unit.c: 1917
-# error(_("'units' must be of length > 0"))
 #: unit.c:1917
 msgid "'units' must be of length > 0"
 msgstr "'units' muszą mieć długość > 0"
 
-# grid/src/viewport.c: 317
-# error(_("non-finite location and/or size for viewport"))
-#: viewport.c:317
+#: viewport.c:315
 msgid "non-finite location and/or size for viewport"
 msgstr "nieskończone położenie oraz/lub rozmiar okna ekranu"
diff --git a/src/library/grid/po/pt_BR.po b/src/library/grid/po/pt_BR.po
index 30cf565..dffb643 100644
--- a/src/library/grid/po/pt_BR.po
+++ b/src/library/grid/po/pt_BR.po
@@ -5,72 +5,72 @@
 msgid ""
 msgstr ""
 "Project-Id-Version: R 2.2.0\n"
-"Report-Msgid-Bugs-To: bugs.r-project.org\n"
-"POT-Creation-Date: 2014-02-19 07:55+0000\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2016-04-01 10:01-0700\n"
 "PO-Revision-Date: 2011-03-26 08:54-0300\n"
 "Last-Translator: Fernando Henrique <pessoal at fernandohrosa.com.br>\n"
 "Language-Team: http://www.feferraz.net/br/P/Projeto_Traducao_R_Portugues\n"
-"Language: \n"
+"Language: pt_BR\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
 "Plural-Forms: nplurals=2; plural=(n > 1);\n"
 "X-Generator: Pootle 2.0.5\n"
 
-#: grid.c:214
+#: grid.c:212
 #, fuzzy
 msgid "cannot clip to rotated viewport"
 msgstr "Não é possível cortar sobre uma viewport rotacionada"
 
-#: grid.c:691 grid.c:696 grid.c:785 grid.c:790
+#: grid.c:697 grid.c:702 grid.c:792 grid.c:797
 #, fuzzy
 msgid "cannot pop the top-level viewport ('grid' and 'graphics' output mixed?)"
 msgstr ""
 "Não é possível mostrar a viewport de nível máximo (saidas gráficas e grid "
 "misturadas?) "
 
-#: grid.c:970
+#: grid.c:977
 msgid "attempt to plot on null device"
 msgstr "tentativa de fazer um gráfico no dispositivo nulo"
 
-#: grid.c:1302
+#: grid.c:1309
 #, fuzzy
 msgid "there is no layout defined"
 msgstr "Não há layout definido"
 
-#: grid.c:1522
+#: grid.c:1529
 #, fuzzy
 msgid "polygon edge not found (zero-width or zero-height?)"
 msgstr "Limite do polígono não encontrado (largura ou altura zero?)"
 
-#: grid.c:1531
+#: grid.c:1538
 #, fuzzy
 msgid "polygon edge not found"
 msgstr "Limite do polígono não encontrado"
 
-#: grid.c:1685
+#: grid.c:1692
 #, fuzzy
 msgid "require at least two points to draw arrow"
 msgstr "Pelo menos dois pontos são necessários para desenhar uma seta"
 
-#: grid.c:2001
+#: grid.c:2008
 #, fuzzy
 msgid "non-finite control point in Xspline"
 msgstr "Ponto de controle não-finito em Xspline"
 
-#: grid.c:2866
+#: grid.c:2873
 msgid "non-finite x or y in graphics path"
 msgstr "valores não-finitos de x ou y no caminho do gráfico"
 
-#: grid.c:2907
+#: grid.c:2914
 msgid "Empty raster"
 msgstr ""
 
-#: grid.c:3359
+#: grid.c:3368
 msgid "invalid plotting symbol"
 msgstr "simbolo para gráfico inválido"
 
-#: grid.c:3445
+#: grid.c:3454
 #, fuzzy
 msgid "unable to clip to rotated rectangle"
 msgstr "Não é possível cortar sobre um retângulo rotacionado"
@@ -85,11 +85,11 @@ msgstr "layout.pos.row inválido"
 msgid "invalid 'layout.pos.col'"
 msgstr "layout.pos.col inválido"
 
-#: matrix.c:49
+#: matrix.c:50
 msgid "singular transformation matrix"
 msgstr "matriz de transformação singular"
 
-#: state.c:169
+#: state.c:170
 #, fuzzy
 msgid "unable to store 'grid' state.  Too many devices open?"
 msgstr ""
@@ -127,7 +127,7 @@ msgstr "Unidades devem ser do tipo caractere"
 msgid "'units' must be of length > 0"
 msgstr "Unidades devem ter comprimento > 0"
 
-#: viewport.c:317
+#: viewport.c:315
 #, fuzzy
 msgid "non-finite location and/or size for viewport"
 msgstr "Localização e/ou tamanhos não finitos para viewport"
diff --git a/src/library/grid/po/ru.po b/src/library/grid/po/ru.po
index 5d10761..3134af1 100644
--- a/src/library/grid/po/ru.po
+++ b/src/library/grid/po/ru.po
@@ -9,65 +9,65 @@ msgid ""
 msgstr ""
 "Project-Id-Version: R 2.9.0\n"
 "Report-Msgid-Bugs-To: bugs.r-project.org\n"
-"POT-Creation-Date: 2014-02-19 07:55+0000\n"
-"PO-Revision-Date: 2013-03-19 20:00-0600\n"
+"POT-Creation-Date: 2015-06-06 13:51+0100\n"
+"PO-Revision-Date: 2016-04-05 18:07-0600\n"
 "Last-Translator: Alexey Shipunov <dactylorhiza at gmail.com>\n"
 "Language-Team: Russian\n"
-"Language: \n"
+"Language: ru\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=KOI8-R\n"
 "Content-Transfer-Encoding: 8bit\n"
 "X-Poedit-Language: Russian\n"
-"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n"
-"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
+"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
 
-#: grid.c:214
+#: grid.c:212
 msgid "cannot clip to rotated viewport"
 msgstr "�� ���� �������� �� ���������� ��������"
 
-#: grid.c:691 grid.c:696 grid.c:785 grid.c:790
+#: grid.c:697
+#: grid.c:702
+#: grid.c:792
+#: grid.c:797
 msgid "cannot pop the top-level viewport ('grid' and 'graphics' output mixed?)"
-msgstr ""
-"�� ���� ������� �������� �������� ������ (������ 'grid' � 'graphics' "
-"���������?)"
+msgstr "�� ���� ������� �������� �������� ������ (������ 'grid' � 'graphics' ���������?)"
 
-#: grid.c:970
+#: grid.c:977
 msgid "attempt to plot on null device"
 msgstr "������� ������� �� ������� ����������"
 
-#: grid.c:1302
+#: grid.c:1309
 msgid "there is no layout defined"
 msgstr "��� ��������� ������"
 
-#: grid.c:1522
+#: grid.c:1529
 msgid "polygon edge not found (zero-width or zero-height?)"
 msgstr "���� �������������� �� ������ (������� ������ ��� ������?)"
 
-#: grid.c:1531
+#: grid.c:1538
 msgid "polygon edge not found"
 msgstr "���� �������������� �� ������"
 
-#: grid.c:1685
+#: grid.c:1692
 msgid "require at least two points to draw arrow"
 msgstr "���� ��� ������� ��� �����, ����� ���������� �������"
 
-#: grid.c:2001
+#: grid.c:2008
 msgid "non-finite control point in Xspline"
 msgstr "��-�������� ����������� ����� � Xspline"
 
-#: grid.c:2866
+#: grid.c:2873
 msgid "non-finite x or y in graphics path"
 msgstr "����������� x ��� y � ������ �������"
 
-#: grid.c:2907
+#: grid.c:2914
 msgid "Empty raster"
-msgstr ""
+msgstr "������ �����"
 
-#: grid.c:3359
+#: grid.c:3368
 msgid "invalid plotting symbol"
 msgstr "������������ ������ �������"
 
-#: grid.c:3445
+#: grid.c:3454
 msgid "unable to clip to rotated rectangle"
 msgstr "�� ���� �������� �� ����������� ����������������"
 
@@ -87,21 +87,31 @@ msgstr "
 msgid "unable to store 'grid' state.  Too many devices open?"
 msgstr "�� ���� ��������� ��������� 'grid'. ������� ������� ����� ���������?"
 
-#: unit.c:260 unit.c:410 unit.c:1210 unit.c:1290 unit.c:1370 unit.c:1450
+#: unit.c:260
+#: unit.c:410
+#: unit.c:1210
+#: unit.c:1290
+#: unit.c:1370
+#: unit.c:1450
 msgid "unimplemented unit function"
 msgstr "�� ������������� ��������� �������"
 
-#: unit.c:893 unit.c:1645
+#: unit.c:893
+#: unit.c:1645
 msgid "invalid unit or unit not yet implemented"
 msgstr "������������ ��� �� ������������� �������"
 
-#: unit.c:1702 unit.c:1733
+#: unit.c:1702
+#: unit.c:1733
 msgid "Viewport has zero dimension(s)"
-msgstr ""
+msgstr "�������� ����� ���� ���������"
 
-#: unit.c:1765 unit.c:1780 unit.c:1795 unit.c:1810
+#: unit.c:1765
+#: unit.c:1780
+#: unit.c:1795
+#: unit.c:1810
 msgid "Unsupported unit conversion"
-msgstr ""
+msgstr "���������������� ��������� ������ ���������"
 
 #: unit.c:1898
 msgid "Invalid unit"
@@ -115,9 +125,10 @@ msgstr "
 msgid "'units' must be of length > 0"
 msgstr "������� ������ ���� ������ > 0"
 
-#: viewport.c:317
+#: viewport.c:315
 msgid "non-finite location and/or size for viewport"
 msgstr "��-�������� ��������� �/��� ������ ��������"
 
 #~ msgid "Invalid circle radius (must be non-negative)"
 #~ msgstr "������������ ������ ����� (������ ���� ���������������)"
+
diff --git a/src/library/grid/po/zh_CN.po b/src/library/grid/po/zh_CN.po
index 1e3cd57..c758334 100644
--- a/src/library/grid/po/zh_CN.po
+++ b/src/library/grid/po/zh_CN.po
@@ -6,62 +6,62 @@
 msgid ""
 msgstr ""
 "Project-Id-Version: R 2.4.0\n"
-"Report-Msgid-Bugs-To: bugs.r-project.org\n"
-"POT-Creation-Date: 2014-02-19 07:55+0000\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2016-04-01 10:01-0700\n"
 "PO-Revision-Date: 2005-02-04 08:37+0000\n"
 "Last-Translator: 陈斐 <feic at normipaiva.com>\n"
 "Language-Team: Chinese\n"
-"Language: \n"
+"Language: zh_CN\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
 "Plural-Forms: nplurals=1; plural=0;\n"
 
-#: grid.c:214
+#: grid.c:212
 msgid "cannot clip to rotated viewport"
 msgstr "无法修剪至旋转了的視窗中"
 
-#: grid.c:691 grid.c:696 grid.c:785 grid.c:790
+#: grid.c:697 grid.c:702 grid.c:792 grid.c:797
 msgid "cannot pop the top-level viewport ('grid' and 'graphics' output mixed?)"
 msgstr "无法弹到最上层的視窗('grid'和'graphics'输出有混合?)"
 
-#: grid.c:970
+#: grid.c:977
 msgid "attempt to plot on null device"
 msgstr "不能在无效装置上画图"
 
-#: grid.c:1302
+#: grid.c:1309
 msgid "there is no layout defined"
 msgstr "需要设定布局"
 
-#: grid.c:1522
+#: grid.c:1529
 msgid "polygon edge not found (zero-width or zero-height?)"
 msgstr "找不到多边形的边(零宽度或是零高度?)"
 
-#: grid.c:1531
+#: grid.c:1538
 msgid "polygon edge not found"
 msgstr "找不到多边形的边"
 
-#: grid.c:1685
+#: grid.c:1692
 msgid "require at least two points to draw arrow"
 msgstr "至少需要两点才能画一个箭头"
 
-#: grid.c:2001
+#: grid.c:2008
 msgid "non-finite control point in Xspline"
 msgstr "Xspline里不能有无限值的控制点"
 
-#: grid.c:2866
+#: grid.c:2873
 msgid "non-finite x or y in graphics path"
 msgstr "图形路径里x或y的值非限定"
 
-#: grid.c:2907
+#: grid.c:2914
 msgid "Empty raster"
 msgstr ""
 
-#: grid.c:3359
+#: grid.c:3368
 msgid "invalid plotting symbol"
 msgstr "图画符号值不对"
 
-#: grid.c:3445
+#: grid.c:3454
 msgid "unable to clip to rotated rectangle"
 msgstr "无法修剪到旋转了的长方形上"
 
@@ -73,11 +73,11 @@ msgstr "'layout.pos.row'的值不对"
 msgid "invalid 'layout.pos.col'"
 msgstr "'layout.pos.col'的值不对"
 
-#: matrix.c:49
+#: matrix.c:50
 msgid "singular transformation matrix"
 msgstr "奇异转换矩阵"
 
-#: state.c:169
+#: state.c:170
 msgid "unable to store 'grid' state.  Too many devices open?"
 msgstr "无法保留'grid'的状况。是不是因为你打开了太多的装置?"
 
@@ -109,6 +109,6 @@ msgstr "'units'必需是字符"
 msgid "'units' must be of length > 0"
 msgstr "'units'的长度必需大于零"
 
-#: viewport.c:317
+#: viewport.c:315
 msgid "non-finite location and/or size for viewport"
 msgstr "視窗的位置或大小不能是无限的"
diff --git a/src/library/grid/src/gpar.c b/src/library/grid/src/gpar.c
index e98b81e..f415a25 100644
--- a/src/library/grid/src/gpar.c
+++ b/src/library/grid/src/gpar.c
@@ -1,7 +1,7 @@
 /*
  *  R : A Computer Language for Statistical Data Analysis
  *  Copyright (C) 2001-3 Paul Murrell
- *                2003 The R Core Team
+ *                2003-2014 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
@@ -15,15 +15,13 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  */
 
 #include "grid.h"
 #include <string.h>
 
 
-extern int gridRegisterIndex;
-
 /* Some access methods for gpars */
 SEXP gpFontSizeSXP(SEXP gp) {
     return VECTOR_ELT(gp, GP_FONTSIZE);
diff --git a/src/library/grid/src/grid.c b/src/library/grid/src/grid.c
index c04bd2e..d2d3060 100644
--- a/src/library/grid/src/grid.c
+++ b/src/library/grid/src/grid.c
@@ -15,7 +15,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  */
 
 
@@ -30,8 +30,6 @@
  * package used to be called "lattice"
  */
 
-extern int gridRegisterIndex;
-
 void getDeviceSize(pGEDevDesc dd, double *devWidthCM, double *devHeightCM) 
 {
     double left, right, bottom, top;
@@ -172,7 +170,7 @@ SEXP doSetViewport(SEXP vp,
 	 * NOTE that we are deliberately using defineVar to
 	 * assign the vp SEXP itself, NOT a copy.
 	 */
-	defineVar(install(CHAR(STRING_ELT(VECTOR_ELT(vp, VP_NAME), 0))),
+	defineVar(installChar(STRING_ELT(VECTOR_ELT(vp, VP_NAME), 0)),
 		  vp, 
 		  VECTOR_ELT(parent, PVP_CHILDREN));
     }
@@ -290,6 +288,13 @@ SEXP doSetViewport(SEXP vp,
 	xx2 = REAL(parentClip)[2];
 	yy2 = REAL(parentClip)[3];
 	UNPROTECT(1);
+        /* If we are revisiting a viewport that inherits a clip
+         * region from a parent viewport, we may need to reset 
+         * the clip region (at worst, we generate a redundant clip)
+         */
+        if (!pushing) {
+	    GESetClip(xx1, yy1, xx2, yy2, dd);
+        }
     }
     PROTECT(currentClip = allocVector(REALSXP, 4));
     REAL(currentClip)[0] = xx1;
@@ -407,10 +412,11 @@ static SEXP findInChildren(SEXP name, SEXP strict, SEXP children, int depth)
     PROTECT(result);
     while (count < n && !found) {
 	result = findViewport(name, strict,
-			      findVar(install(CHAR(STRING_ELT(childnames, count))),
-				      children),
+			      PROTECT(findVar(installChar(STRING_ELT(childnames, count)),
+				      children)),
 			      depth);
 	found = INTEGER(VECTOR_ELT(result, 0))[0] > 0;
+	UNPROTECT(1);
 	count = count + 1;
     }
     if (!found) {
@@ -460,7 +466,7 @@ static SEXP findViewport(SEXP name, SEXP strict, SEXP vp, int depth)
 		       /*
 			* Does this do inherits=FALSE?
 			*/
-		       findVar(install(CHAR(STRING_ELT(name, 0))), 
+		       findVar(installChar(STRING_ELT(name, 0)),
 			       viewportChildren(vp)));
     } else {
 	/*
@@ -562,7 +568,7 @@ static SEXP findvppathInChildren(SEXP path, SEXP name,
     PROTECT(result);
     while (count < n && !found) {
 	SEXP vp, newpathsofar;
-	PROTECT(vp = findVar(install(CHAR(STRING_ELT(childnames, count))),
+	PROTECT(vp = findVar(installChar(STRING_ELT(childnames, count)),
 			     children));
 	PROTECT(newpathsofar = growPath(pathsofar,
 					VECTOR_ELT(vp, VP_NAME)));
@@ -613,7 +619,7 @@ static SEXP findvppath(SEXP path, SEXP name, SEXP strict,
 		       /*
 			* Does this do inherits=FALSE?
 			*/
-		       findVar(install(CHAR(STRING_ELT(name, 0))), 
+		       findVar(installChar(STRING_ELT(name, 0)),
 			       viewportChildren(vp)));
     } else {
 	result = findvppathInChildren(path, name, strict, pathsofar,
@@ -709,9 +715,9 @@ SEXP L_unsetviewport(SEXP n)
      * in the "Writing R Extensions" manual, but the compiler didn't
      * like CAR(t) as an lvalue.
      */
+    PROTECT(gvp); PROTECT(newvp);
     {
 	SEXP fcall, false, t;
-	PROTECT(gvp); PROTECT(newvp);
 	PROTECT(false = allocVector(LGLSXP, 1));
 	LOGICAL(false)[0] = FALSE;
 	PROTECT(fcall = lang4(install("remove"), 
@@ -724,7 +730,7 @@ SEXP L_unsetviewport(SEXP n)
 	t = CDR(t);
 	SET_TAG(t, install("inherits")); 
 	eval(fcall, R_gridEvalEnv); 
-	UNPROTECT(4);
+	UNPROTECT(2); /* false, fcall */
     }
     /* Get the current device size 
      */
@@ -760,6 +766,7 @@ SEXP L_unsetviewport(SEXP n)
      * to part of the (global) grid state
      */
     SET_VECTOR_ELT(gvp, PVP_PARENT, R_NilValue);
+    UNPROTECT(2); /* gvp, newvp */
     return R_NilValue;
 }
 
@@ -3115,6 +3122,8 @@ static SEXP gridText(SEXP label, SEXP x, SEXP y, SEXP hjust, SEXP vjust,
 	txt = coerceVector(txt, EXPRSXP);
     else if (!isExpression(txt))
 	txt = coerceVector(txt, STRSXP);
+    UNPROTECT(1);
+    PROTECT(txt);
     if (overlapChecking || !draw) {
 	bounds = (LRect *) R_alloc(nx, sizeof(LRect));
     }
@@ -3516,8 +3525,8 @@ SEXP L_locator() {
 	REAL(answer)[0] = NA_REAL;
 	REAL(answer)[1] = NA_REAL;	
     }
-    UNPROTECT(1);
     GEMode(0, dd);
+    UNPROTECT(1);
     return answer;
 }
 
diff --git a/src/library/grid/src/grid.h b/src/library/grid/src/grid.h
index 81ac600..f71c915 100644
--- a/src/library/grid/src/grid.h
+++ b/src/library/grid/src/grid.h
@@ -1,7 +1,7 @@
 /*
  *  R : A Computer Language for Statistical Data Analysis
  *  Copyright (C) 2001-3 Paul Murrell
- *                2003-8 The R Core Team
+ *                2003-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
@@ -15,9 +15,10 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  */
 
+#include <R.h>
 #include <Rconfig.h>
 #include <Rinternals.h>
 #include <Rmath.h>
@@ -597,6 +598,9 @@ void setGridStateElement(pGEDevDesc dd, int elementIndex, SEXP value);
 
 SEXP gridCallback(GEevent task, pGEDevDesc dd, SEXP data);
 
+int gridRegisterIndex;
+
+
 /* From grid.c */
 SEXP doSetViewport(SEXP vp, 
 		   Rboolean topLevelVP,
@@ -608,6 +612,8 @@ void getDeviceSize(pGEDevDesc dd, double *devWidthCM, double *devHeightCM);
 /* This is, confusingly, a wrapper for GEcurrentDevice */
 pGEDevDesc getDevice();
 
+void dirtyGridDevice(pGEDevDesc dd);
+
 void getViewportTransform(SEXP currentvp, 
 			  pGEDevDesc dd, 
 			  double *vpWidthCM, double *vpHeightCM,
diff --git a/src/library/grid/src/just.c b/src/library/grid/src/just.c
index c005c35..92c3ecf 100644
--- a/src/library/grid/src/just.c
+++ b/src/library/grid/src/just.c
@@ -15,7 +15,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  */
 
 #include "grid.h"
diff --git a/src/library/grid/src/layout.c b/src/library/grid/src/layout.c
index f338862..c326f3f 100644
--- a/src/library/grid/src/layout.c
+++ b/src/library/grid/src/layout.c
@@ -15,7 +15,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  */
 
 #include "grid.h"
diff --git a/src/library/grid/src/matrix.c b/src/library/grid/src/matrix.c
index edae708..a39b226 100644
--- a/src/library/grid/src/matrix.c
+++ b/src/library/grid/src/matrix.c
@@ -15,10 +15,11 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  */
 
 #include "grid.h" 
+#include <math.h>
 
 /* Code for matrices, matrix multiplication, etc for performing
  *  2D affine transformations:  translations, scaling, and rotations.
diff --git a/src/library/grid/src/register.c b/src/library/grid/src/register.c
index 43c2075..b30642f 100644
--- a/src/library/grid/src/register.c
+++ b/src/library/grid/src/register.c
@@ -1,7 +1,7 @@
 /*
  *  R : A Computer Language for Statistical Data Analysis
  *  Copyright (C) 2001-3  Paul Murrell
- *                2003-12 The R Core Team
+ *                2003-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
@@ -15,82 +15,81 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  */
 
 /* Code to register grid functions with R
  */
+#include <R_ext/Visibility.h>
 #include <R_ext/Rdynload.h>
 #include "grid.h"
 
+#define LCALLDEF(name, n)  {#name, (DL_FUNC) &L_##name, n}
+
 static const R_CallMethodDef callMethods[] = {
-    {"L_initGrid", (DL_FUNC) &L_initGrid, 1},
-    {"L_killGrid", (DL_FUNC) &L_killGrid, 0},
-    {"L_gridDirty", (DL_FUNC) &L_gridDirty, 0},
-    {"L_currentViewport", (DL_FUNC) &L_currentViewport, 0},
-    {"L_setviewport", (DL_FUNC) &L_setviewport, 2}, 
-    {"L_downviewport", (DL_FUNC) &L_downviewport, 2}, 
-    {"L_downvppath", (DL_FUNC) &L_downvppath, 3}, 
-    {"L_unsetviewport", (DL_FUNC) &L_unsetviewport, 1},  
-    {"L_upviewport", (DL_FUNC) &L_upviewport, 1},  
-    {"L_getDisplayList", (DL_FUNC) &L_getDisplayList, 0},
-    {"L_setDisplayList", (DL_FUNC) &L_setDisplayList, 1},
-    {"L_getDLelt", (DL_FUNC) &L_getDLelt, 1},
-    {"L_setDLelt", (DL_FUNC) &L_setDLelt, 1},
-    {"L_getDLindex", (DL_FUNC) &L_getDLindex, 0}, 
-    {"L_setDLindex", (DL_FUNC) &L_setDLindex, 1},
-    {"L_getDLon", (DL_FUNC) &L_getDLon, 0},
-    {"L_setDLon", (DL_FUNC) &L_setDLon, 1},
-    {"L_getEngineDLon", (DL_FUNC) &L_getEngineDLon, 0},
-    {"L_setEngineDLon", (DL_FUNC) &L_setEngineDLon, 1},
-    {"L_getCurrentGrob", (DL_FUNC) &L_getCurrentGrob, 0},
-    {"L_setCurrentGrob", (DL_FUNC) &L_setCurrentGrob, 1},
-    {"L_getEngineRecording", (DL_FUNC) &L_getEngineRecording, 0},
-    {"L_setEngineRecording", (DL_FUNC) &L_setEngineRecording, 1},
-    {"L_currentGPar", (DL_FUNC) &L_currentGPar, 0},
-    {"L_newpagerecording", (DL_FUNC) &L_newpagerecording, 0},
-    {"L_newpage", (DL_FUNC) &L_newpage, 0},
-    {"L_initGPar", (DL_FUNC) &L_initGPar, 0},
-    {"L_initViewportStack", (DL_FUNC) &L_initViewportStack, 0},
-    {"L_initDisplayList", (DL_FUNC) &L_initDisplayList, 0},
-    {"L_moveTo", (DL_FUNC) &L_moveTo, 2},
-    {"L_lineTo", (DL_FUNC) &L_lineTo, 3}, 
-    {"L_lines", (DL_FUNC) &L_lines, 4}, 
-    {"L_segments", (DL_FUNC) &L_segments, 5}, 
-    {"L_arrows", (DL_FUNC) &L_arrows, 12}, 
-    {"L_path", (DL_FUNC) &L_path, 4},
-    {"L_polygon", (DL_FUNC) &L_polygon, 3},
-    {"L_xspline", (DL_FUNC) &L_xspline, 7},
-    {"L_circle", (DL_FUNC) &L_circle, 3},
-    {"L_rect", (DL_FUNC) &L_rect, 6},
-    {"L_raster", (DL_FUNC) &L_raster, 8},
-    {"L_cap", (DL_FUNC) &L_cap, 0},
-    {"L_text", (DL_FUNC) &L_text, 7},
-    {"L_points", (DL_FUNC) &L_points, 4},
-    {"L_clip", (DL_FUNC) &L_clip, 6},
-    {"L_pretty", (DL_FUNC) &L_pretty, 1},
-    {"L_locator", (DL_FUNC) &L_locator, 0},
-    {"L_convert", (DL_FUNC) &L_convert, 4},
-    {"L_layoutRegion", (DL_FUNC) &L_layoutRegion, 2},
+    LCALLDEF(initGrid, 1),
+    LCALLDEF(killGrid, 0),
+    LCALLDEF(gridDirty, 0),
+    LCALLDEF(currentViewport, 0),
+    LCALLDEF(setviewport, 2), 
+    LCALLDEF(downviewport, 2), 
+    LCALLDEF(downvppath, 3), 
+    LCALLDEF(unsetviewport, 1), 
+    LCALLDEF(upviewport, 1), 
+    LCALLDEF(getDisplayList, 0),
+    LCALLDEF(setDisplayList, 1),
+    LCALLDEF(getDLelt, 1),
+    LCALLDEF(setDLelt, 1),
+    LCALLDEF(getDLindex, 0), 
+    LCALLDEF(setDLindex, 1),
+    LCALLDEF(getDLon, 0),
+    LCALLDEF(setDLon, 1),
+    LCALLDEF(getEngineDLon, 0),
+    LCALLDEF(setEngineDLon, 1),
+    LCALLDEF(getCurrentGrob, 0),
+    LCALLDEF(setCurrentGrob, 1),
+    LCALLDEF(getEngineRecording, 0),
+    LCALLDEF(setEngineRecording, 1),
+    LCALLDEF(currentGPar, 0),
+    LCALLDEF(newpagerecording, 0),
+    LCALLDEF(newpage, 0),
+    LCALLDEF(initGPar, 0),
+    LCALLDEF(initViewportStack, 0),
+    LCALLDEF(initDisplayList, 0),
+    LCALLDEF(moveTo, 2),
+    LCALLDEF(lineTo, 3), 
+    LCALLDEF(lines, 4), 
+    LCALLDEF(segments, 5), 
+    LCALLDEF(arrows, 12), 
+    LCALLDEF(path, 4),
+    LCALLDEF(polygon, 3),
+    LCALLDEF(xspline, 7),
+    LCALLDEF(circle, 3),
+    LCALLDEF(rect, 6),
+    LCALLDEF(raster, 8),
+    LCALLDEF(cap, 0),
+    LCALLDEF(text, 7),
+    LCALLDEF(points, 4),
+    LCALLDEF(clip, 6),
+    LCALLDEF(pretty, 1),
+    LCALLDEF(locator, 0),
+    LCALLDEF(convert, 4),
+    LCALLDEF(layoutRegion, 2),
+    LCALLDEF(getGPar, 0),
+    LCALLDEF(setGPar, 1),
+    LCALLDEF(circleBounds, 4),
+    LCALLDEF(locnBounds, 3),
+    LCALLDEF(rectBounds, 7),
+    LCALLDEF(textBounds, 7),
+    LCALLDEF(xsplineBounds, 8),
+    LCALLDEF(xsplinePoints, 8),
+    LCALLDEF(stringMetric, 1),
     {"validUnits", (DL_FUNC) &validUnits, 1},
-    {"L_getGPar", (DL_FUNC) &L_getGPar, 0},
-    {"L_setGPar", (DL_FUNC) &L_setGPar, 1},
-    {"L_circleBounds", (DL_FUNC) &L_circleBounds, 4},
-    {"L_locnBounds", (DL_FUNC) &L_locnBounds, 3},
-    {"L_rectBounds", (DL_FUNC) &L_rectBounds, 7},
-    {"L_textBounds", (DL_FUNC) &L_textBounds, 7},
-    {"L_xsplineBounds", (DL_FUNC) &L_xsplineBounds, 8},
-    {"L_xsplinePoints", (DL_FUNC) &L_xsplinePoints, 8},
-    {"L_stringMetric", (DL_FUNC) &L_stringMetric, 1},
     { NULL, NULL, 0 }
 };
 
 
-void
-#ifdef HAVE_VISIBILITY_ATTRIBUTE
-__attribute__ ((visibility ("default")))
-#endif
-R_init_grid(DllInfo *dll) 
+void attribute_visible R_init_grid(DllInfo *dll) 
 {
     /* No .C, .Fortran, or .External routines => NULL
      */
diff --git a/src/library/grid/src/state.c b/src/library/grid/src/state.c
index a6e68d6..f965a0d 100644
--- a/src/library/grid/src/state.c
+++ b/src/library/grid/src/state.c
@@ -15,10 +15,11 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  */
 
 #include "grid.h"
+#include <string.h>
 
 int gridRegisterIndex;
 
@@ -240,26 +241,41 @@ SEXP gridCallback(GEevent task, pGEDevDesc dd, SEXP data) {
 		/* The graphics engine is about to replay the display list
 		 * So we "clear" the device and reset the grid graphics state
 		 */
-		/* There are two main situations in which this occurs:
-		 * (i) a screen is resized
-		 *     In this case, it is ok-ish to do a GENewPage
-		 *     because that has the desired effect and no 
-		 *     undesirable effects because it only happens on
-		 *     a screen device -- a new page is the same as
-		 *     clearing the screen
-		 * (ii) output on one device is copied to another device
-		 *     In this case, a GENewPage is NOT a good thing, however,
-		 *     here we will start with a new device and it will not
-		 *     have any grid output so this section will not get called
-		 *     SO we will not get any unwanted blank pages.
-		 *
-		 * All this is a bit fragile;  ultimately, what would be ideal
-		 * is a dev->clearPage primitive for all devices in addition
-		 * to the dev->newPage primitive
+		/* 
+                 * ONLY start a new page if 'grid' drawing is first entry
+                 * on the DL.
+                 * Determine this by checking for "C_par" or "C_plot_new"
+                 * at head of DL (assumes that 'graphics' is only other
+                 * possible graphics system).
+                 * This is a NASTY solution to a RARE problem.
+                 * RARE because it will only occur when resizing a 
+                 * window, copying between devices, or replaying a
+                 * recorded plot when the engine DL contains a mix
+                 * of 'graphics' and 'grid'.
+                 * NASTY because it requires 'grid' to know about
+                 * 'graphics' internals and the engine DL internals.
 		 */ 
-		currentgp = gridStateElement(dd, GSS_GPAR);
-		gcontextFromgpar(currentgp, 0, &gc, dd);
-		GENewPage(&gc, dd);
+                /* 'data' is engine DL */
+                if (data != R_NilValue) {
+                    SEXP firstDLentry = CAR(data);
+                    SEXP args = CADR(firstDLentry);
+                    int newpage = 1;
+                    if (isVector(CAR(args))) {
+                        SEXP name = VECTOR_ELT(CAR(args), 0);
+                        if (isString(name) &&
+                            (!strcmp(CHAR(STRING_ELT(name, 0)), 
+                                     "C_par") ||
+                             !strcmp(CHAR(STRING_ELT(name, 0)), 
+                                     "C_plot_new"))) {
+                            newpage = 0;
+                        }
+                    }
+                    if (newpage) {
+                        currentgp = gridStateElement(dd, GSS_GPAR);
+                        gcontextFromgpar(currentgp, 0, &gc, dd);
+                        GENewPage(&gc, dd);
+                    }
+                }
 		initGPar(dd);
 		initVP(dd);
 		initOtherState(dd);
@@ -276,16 +292,128 @@ SEXP gridCallback(GEevent task, pGEDevDesc dd, SEXP data) {
 	}
 	break;
     case GE_CopyState:
+        { 
+            if (!isNull(gridStateElement(dd, GSS_DL))) {
+                int dlIndex = INTEGER(gridStateElement(dd, GSS_DLINDEX))[0];
+                if (dlIndex > 0) {
+                    /* called from GEcopyDisplayList */
+                    pGEDevDesc curdd = GEcurrentDevice();
+                    /* See GE_RestoreSnapshotState for explanation of this 
+                     * dirtying 
+                     */
+                    SEXP gsd, griddev;
+                    gsd = (SEXP) curdd->gesd[gridRegisterIndex]->systemSpecific;
+                    PROTECT(griddev = allocVector(LGLSXP, 1));
+                    LOGICAL(griddev)[0] = TRUE;
+                    SET_VECTOR_ELT(gsd, GSS_GRIDDEVICE, griddev);
+                    UNPROTECT(1);
+                    GEdirtyDevice(curdd);
+                    setGridStateElement(curdd, GSS_DL, 
+                                        gridStateElement(dd, GSS_DL));
+                    setGridStateElement(curdd, GSS_DLINDEX, 
+                                        gridStateElement(dd, GSS_DLINDEX));
+                }
+            }
+        }
 	break;
     case GE_CheckPlot:
 	PROTECT(valid = allocVector(LGLSXP, 1));
 	LOGICAL(valid)[0] = TRUE;
 	UNPROTECT(1);
 	result = valid;
+        break;
     case GE_SaveSnapshotState:
+        {
+            SEXP pkgName;
+            /*
+             * Save the current 'grid' DL.
+             */
+            PROTECT(result = allocVector(VECSXP, 2));
+            SET_VECTOR_ELT(result, 0, gridStateElement(dd, GSS_DL));
+            SET_VECTOR_ELT(result, 1, gridStateElement(dd, GSS_DLINDEX));
+            PROTECT(pkgName = mkString("grid"));
+            setAttrib(result, install("pkgName"), pkgName);
+            UNPROTECT(2);
+        }
 	break;
     case GE_RestoreSnapshotState:
-	break;
+        { 
+            int i, nState = LENGTH(data) - 1;
+            SEXP gridState, snapshotEngineVersion;
+            PROTECT(gridState = R_NilValue);
+            /* Prior to engine version 11, "pkgName" was not stored.
+             * (can tell because "engineVersion" was not stored either.)
+             * Assume 'grid' is second state in snapshot
+             * (or first, if only one state)
+             * (though this could be fatal).
+             */
+            PROTECT(snapshotEngineVersion = 
+                    getAttrib(data, install("engineVersion")));
+            if (isNull(snapshotEngineVersion)) {
+                gridState = VECTOR_ELT(data, imin2(nState, 2));
+            } else {
+                for (i=0; i<nState; i++) {
+                    SEXP state = VECTOR_ELT(data, i + 1);
+                    if (!strcmp(CHAR(STRING_ELT(getAttrib(state, 
+                                                          install("pkgName")), 
+                                                0)), 
+                                "grid")) {
+                        gridState = state;
+                    }
+                }
+            }
+            /* The recorded plot may have been recorded WITHOUT 'grid' loaded
+             * OR it might have been recorded with 'grid' loaded, but WITHOUT
+             * any grid drawing
+             */
+            if (!isNull(gridState) && !isNull(VECTOR_ELT(gridState, 0))) {
+                int dlIndex = INTEGER(VECTOR_ELT(gridState, 1))[0];
+                if (dlIndex > 0) {
+                    /*
+                     * Dirty the device, in a 'grid' sense, 
+                     * (in case this is first 'grid' drawing on device) 
+                     * to stop first element on 'grid' DL
+                     * (which will be a call to L_gridDirty()) 
+                     * from resetting the 'grid' DL.
+                     * This will have the side effect of stopping L_gridDirty()
+                     * from starting a new page (if the device is clean)
+                     * which is important because this 
+                     * GE_RestoreSnapshotState will be followed by 
+                     * GE_RestoreState, which will start a new page
+                     * (and which will call initVP() by the way).
+                     *
+                     * NOTE to my future self:  don't try to do this with
+                     * a call to dirtyGridDevice() - seriously, I tried it
+                     * and it's a BAD idea.  The logic and interactions
+                     * with device drivers is just insanely complicated.
+                     * Leave it alone.
+                     */
+                    if (!LOGICAL(gridStateElement(dd, GSS_GRIDDEVICE))[0]) {
+                        SEXP gsd, griddev;
+                        gsd = (SEXP) dd->gesd[gridRegisterIndex]->systemSpecific;
+                        PROTECT(griddev = allocVector(LGLSXP, 1));
+                        LOGICAL(griddev)[0] = TRUE;
+                        SET_VECTOR_ELT(gsd, GSS_GRIDDEVICE, griddev);
+                        UNPROTECT(1);
+                        /* If the device is 'grid' dirty, make sure it is
+                         * also dirty overall
+                         */
+                        GEdirtyDevice(dd);
+                    }
+                    /*
+                     * Restore the saved 'grid' DL.
+                     * (the 'grid' vpTree will be recreated by replay of 
+                     *  'grid' DL)
+                     */
+                    setGridStateElement(dd, GSS_DL, 
+                                        VECTOR_ELT(gridState, 0));
+                    setGridStateElement(dd, GSS_DLINDEX, 
+                                        VECTOR_ELT(gridState, 1));
+                }
+            }
+            UNPROTECT(2);
+        }
+        break;
     case GE_ScalePS:
 	/*
 	 * data is a numeric scale factor
diff --git a/src/library/grid/src/unit.c b/src/library/grid/src/unit.c
index 2d9459e..bfd3414 100644
--- a/src/library/grid/src/unit.c
+++ b/src/library/grid/src/unit.c
@@ -1,7 +1,7 @@
 /*
  *  R : A Computer Language for Statistical Data Analysis
  *  Copyright (C) 2001-3 Paul Murrell
- *                2003-2013 The R Core Team
+ *                2003-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
@@ -15,7 +15,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  */
 
 #include "grid.h"
@@ -1918,6 +1918,3 @@ SEXP validUnits(SEXP units)
     }
     return answer;
 }
-    
-
-
diff --git a/src/library/grid/src/util.c b/src/library/grid/src/util.c
index 3780cb1..2a7c448 100644
--- a/src/library/grid/src/util.c
+++ b/src/library/grid/src/util.c
@@ -15,7 +15,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  */
 
 #include "grid.h"
diff --git a/src/library/grid/src/viewport.c b/src/library/grid/src/viewport.c
index 2900441..697b029 100644
--- a/src/library/grid/src/viewport.c
+++ b/src/library/grid/src/viewport.c
@@ -1,7 +1,7 @@
 /*
  *  R : A Computer Language for Statistical Data Analysis
  *  Copyright (C) 2001-3 Paul Murrell
- *                2003-5 The R Core Team
+ *                2003-2014 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
@@ -15,14 +15,12 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  */
 
 #include "grid.h"
 #include <string.h>
 
-extern int gridRegisterIndex;
-
 /* Some access methods for viewports */
 SEXP viewportX(SEXP vp) {
     return VECTOR_ELT(vp, VP_X);
@@ -240,7 +238,7 @@ void calcViewportTransform(SEXP vp, SEXP parent, Rboolean incremental,
 	parentgc.lineheight = 1.2;
 	parentgc.cex = 1;
 	parentgc.fontface = 1;
-	parentgc.fontfamily[0] = '\0';
+	parentgc.fontfamily[0] = '\0';  // This picks up the device default
 	/* The device is not rotated
 	 */
 	parentAngle = 0;
diff --git a/src/library/grid/tests/testls.Rout.save b/src/library/grid/tests/testls.Rout.save
index 2465235..53d3d5a 100644
--- a/src/library/grid/tests/testls.Rout.save
+++ b/src/library/grid/tests/testls.Rout.save
@@ -1,7 +1,7 @@
 
-R version 3.1.2 RC (2014-10-29 r66897) -- "Pumpkin Helmet"
-Copyright (C) 2014 The R Foundation for Statistical Computing
-Platform: x86_64-unknown-linux-gnu (64-bit)
+R version 3.4.0 RC (2017-04-18 r72543) -- "You Stupid Darkness"
+Copyright (C) 2017 The R Foundation for Statistical Computing
+Platform: x86_64-pc-linux-gnu (64-bit)
 
 R is free software and comes with ABSOLUTELY NO WARRANTY.
 You are welcome to redistribute it under certain conditions.
@@ -340,4 +340,4 @@ List of 6
 > 
 > proc.time()
    user  system elapsed 
-  0.212   0.008   0.211 
+  0.247   0.013   0.254 
diff --git a/src/library/grid/tests/units.R b/src/library/grid/tests/units.R
index a81cec5..04800ad 100644
--- a/src/library/grid/tests/units.R
+++ b/src/library/grid/tests/units.R
@@ -16,10 +16,10 @@ unitCheck(rep(simpleUnit, each=2),
           unit(rep(1:4, each=2), "npc"))
 unitCheck(rep(simpleUnit, c(2, 1, 2, 1)),
           unit(rep(1:4, c(2, 1, 2, 1)), "npc"))
-unitCheck(rep(simpleUnit, each=2, len=4),
-          unit(rep(1:4, each=2, len=4), "npc"))
-unitCheck(rep(simpleUnit, each=2, len=10),
-          unit(rep(1:4, each=2, len=10), "npc"))
+unitCheck(rep(simpleUnit, each=2, length.out=4),
+          unit(rep(1:4, each=2, length.out=4), "npc"))
+unitCheck(rep(simpleUnit, each=2, length.out=10),
+          unit(rep(1:4, each=2, length.out=10), "npc"))
 unitCheck(rep(simpleUnit, each=2, times=3),
           unit(rep(1:4, each=2, times=3), "npc"))
 
@@ -33,12 +33,12 @@ unitCheck(rep(simpleUnitMixed, each=2),
 unitCheck(rep(simpleUnitMixed, c(2, 1, 2, 1)),
           unit(rep(1:4, c(2, 1, 2, 1)),
                rep(c("npc", "cm"), c(2, 1))))
-unitCheck(rep(simpleUnitMixed, each=2, len=4),
-          unit(rep(1:4, each=2, len=4),
-               rep(c("npc", "cm"), each=2, len=4)))
-unitCheck(rep(simpleUnitMixed, each=2, len=10),
-          unit(rep(1:4, each=2, len=10),
-               rep(c("npc", "cm"), each=2, len=10)))
+unitCheck(rep(simpleUnitMixed, each=2, length.out=4),
+          unit(rep(1:4, each=2, length.out=4),
+               rep(c("npc", "cm"), each=2, length.out=4)))
+unitCheck(rep(simpleUnitMixed, each=2, length.out=10),
+          unit(rep(1:4, each=2, length.out=10),
+               rep(c("npc", "cm"), each=2, length.out=10)))
 unitCheck(rep(simpleUnitMixed, each=2, times=3),
           unit(rep(1:4, each=2, times=3),
                rep(c("npc", "cm"), each=2, times=3)))
@@ -58,14 +58,14 @@ unitCheck(rep(unitWithData, c(2, 1, 2, 1)),
           unit(rep(1:4, c(2, 1, 2, 1)),
                rep(units, c(2, 1, 2, 1)),
                rep(dataL, c(2, 1, 2, 1))))
-unitCheck(rep(unitWithData, each=2, len=4),
-          unit(rep(1:4, each=2, len=4),
-               rep(units, each=2, len=4),
-               rep(dataL, each=2, len=4)))
-unitCheck(rep(unitWithData, each=2, len=10),
-          unit(rep(1:4, each=2, len=10),
-               rep(units, each=2, len=10),
-               rep(dataL, each=2, len=10)))
+unitCheck(rep(unitWithData, each=2, length.out=4),
+          unit(rep(1:4, each=2, length.out=4),
+               rep(units, each=2, length.out=4),
+               rep(dataL, each=2, length.out=4)))
+unitCheck(rep(unitWithData, each=2, length.out=10),
+          unit(rep(1:4, each=2, length.out=10),
+               rep(units, each=2, length.out=10),
+               rep(dataL, each=2, length.out=10)))
 unitCheck(rep(unitWithData, each=2, times=3),
           unit(rep(1:4, each=2, times=3),
                rep(units, each=2, times=3),
@@ -80,10 +80,10 @@ unitCheck(rep(unitArith, each=2),
           unit(1, "npc") + unit(rep(1:2, each=2), "inch"))
 unitCheck(rep(unitArith, c(2, 1)),
           unit(1, "npc") + unit(rep(1:2, c(2 ,1)), "inch"))
-unitCheck(rep(unitArith, each=2, len=3),
-          unit(1, "npc") + unit(rep(1:2, each=2, len=3), "inch"))
-unitCheck(rep(unitArith, each=2, len=5),
-          unit(1, "npc") + unit(rep(1:2, each=2, len=5), "inch"))
+unitCheck(rep(unitArith, each=2, length.out=3),
+          unit(1, "npc") + unit(rep(1:2, each=2, length.out=3), "inch"))
+unitCheck(rep(unitArith, each=2, length.out=5),
+          unit(1, "npc") + unit(rep(1:2, each=2, length.out=5), "inch"))
 unitCheck(rep(unitArith, each=2, times=3),
           unit(1, "npc") + unit(rep(1:2, each=2, times=3), "inch"))
 
@@ -98,10 +98,10 @@ unitCheck(rep(unitList, each=2),
           unit.c(rep(arg1, each=2), rep(arg2, 2)))
 unitCheck(rep(unitList, c(2, 1, 2)),
           unit.c(rep(arg1, c(2, 1)), rep(arg2, 2)))
-unitCheck(rep(unitList, each=2, len=4),
+unitCheck(rep(unitList, each=2, length.out=4),
           rep(arg1, each=2))
-unitCheck(rep(unitList, each=2, len=8),
-          unit.c(rep(arg1, each=2), rep(arg2, 2), rep(arg1, each=2, len=2)))
+unitCheck(rep(unitList, each=2, length.out=8),
+          unit.c(rep(arg1, each=2), rep(arg2, 2), rep(arg1, each=2, length.out=2)))
 unitCheck(rep(unitList, each=2, times=3),
           unit.c(rep(arg1, each=2), rep(arg2, 2),
                  rep(arg1, each=2), rep(arg2, 2),
@@ -133,3 +133,39 @@ x <- unit(1, "cm")
 stopifnot(length(unit.pmax(x)) == 1L, length(unit.pmin(x)) == 1L)
 ## was 3 in R <= 2.12.0
 
+# Unit subassignment
+a <- unit(1:3, c("cm", "in", "npc"))
+b <- a + unit(1, "npc")
+a[2] <- unit(2,"pt")
+b[2] <- unit(2,"npc")
+
+unitCheck(a, unit(1:3, c("cm", "pt", "npc")))
+unitCheck(b, unit.c(unit(1, "cm") + unit(1, "npc"),
+                    unit(2, "npc"),
+                    unit(3, "npc") + unit(1, "npc")))
+
+c <- unit(1:10, "mm")
+
+# assign to range
+c[5:9] <- unit(9:5, "pt")
+unitCheck(c, unit(c(1:4, 9:5, 10),
+                  c(rep("mm", 4), rep("pt", 5), "mm")))
+
+# recycle
+c[2:3] <- unit(1, "in") + unit(.5, "npc")
+unitCheck(c, unit.c(unit(1, "mm"),
+                    rep(unit(1, "in") + unit(.5, "npc"), 2),
+                    unit(4, "mm"),
+                    unit(9:5, "pt"),
+                    unit(10, "mm")))
+
+# recycle non-multiple
+c[6:8] <- stringWidth(c("a", "b"))
+unitCheck(c, unit.c(unit(1, "mm"),
+                    rep(unit(1, "in") + unit(.5, "npc"), 2),
+                    unit(4, "mm"),
+                    unit(9, "pt"),
+                    stringWidth(c("a", "b", "a")),
+                    unit(5, "pt"),
+                    unit(10, "mm")))
+
diff --git a/src/library/grid/vignettes/displaylist.Rnw b/src/library/grid/vignettes/displaylist.Rnw
index 7f28236..e024a2f 100644
--- a/src/library/grid/vignettes/displaylist.Rnw
+++ b/src/library/grid/vignettes/displaylist.Rnw
@@ -1,5 +1,5 @@
 % File src/library/grid/vignettes/displaylist.Rnw
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 2001-13 Paul Murrell and the R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/grid/vignettes/frame.Rnw b/src/library/grid/vignettes/frame.Rnw
index 7da6306..e9b7609 100644
--- a/src/library/grid/vignettes/frame.Rnw
+++ b/src/library/grid/vignettes/frame.Rnw
@@ -1,5 +1,5 @@
 % File src/library/grid/vignettes/frame.Rnw
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 2001-13 Paul Murrell and the R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/grid/vignettes/grid.Rnw b/src/library/grid/vignettes/grid.Rnw
index 6102134..275874f 100644
--- a/src/library/grid/vignettes/grid.Rnw
+++ b/src/library/grid/vignettes/grid.Rnw
@@ -1,5 +1,5 @@
 % File src/library/grid/vignettes/grid.Rnw
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 2001-13 Paul Murrell and the R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/grid/vignettes/grid.Rnw-nolattice b/src/library/grid/vignettes/grid.Rnw-nolattice
index 10f891f..99a3056 100644
--- a/src/library/grid/vignettes/grid.Rnw-nolattice
+++ b/src/library/grid/vignettes/grid.Rnw-nolattice
@@ -1,5 +1,5 @@
 % File src/library/grid/vignettes/grid.Rnw-nolattice
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 2001-13 Paul Murrell and the R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/grid/vignettes/grobs.Rnw b/src/library/grid/vignettes/grobs.Rnw
index a8e5581..636b008 100644
--- a/src/library/grid/vignettes/grobs.Rnw
+++ b/src/library/grid/vignettes/grobs.Rnw
@@ -1,5 +1,5 @@
 % File src/library/grid/vignettes/grobs.Rnw
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 2001-13 Paul Murrell and the R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/grid/vignettes/interactive.Rnw b/src/library/grid/vignettes/interactive.Rnw
index 596de2d..4065e16 100644
--- a/src/library/grid/vignettes/interactive.Rnw
+++ b/src/library/grid/vignettes/interactive.Rnw
@@ -1,5 +1,5 @@
 % File src/library/grid/vignettes/interactive.Rnw
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 2001-13 Paul Murrell and the R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/grid/vignettes/locndimn.Rnw b/src/library/grid/vignettes/locndimn.Rnw
index e12c0d4..5db4469 100644
--- a/src/library/grid/vignettes/locndimn.Rnw
+++ b/src/library/grid/vignettes/locndimn.Rnw
@@ -1,5 +1,5 @@
 % File src/library/grid/vignettes/locndimn.Rnw
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 2001-13 Paul Murrell and the R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/grid/vignettes/moveline.Rnw b/src/library/grid/vignettes/moveline.Rnw
index 83e705c..3815b78 100644
--- a/src/library/grid/vignettes/moveline.Rnw
+++ b/src/library/grid/vignettes/moveline.Rnw
@@ -1,5 +1,5 @@
 % File src/library/grid/vignettes/moveline.Rnw
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 2001-13 Paul Murrell and the R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/grid/vignettes/nonfinite.Rnw b/src/library/grid/vignettes/nonfinite.Rnw
index 031de7d..6a18150 100644
--- a/src/library/grid/vignettes/nonfinite.Rnw
+++ b/src/library/grid/vignettes/nonfinite.Rnw
@@ -1,5 +1,5 @@
 % File src/library/grid/vignettes/nonfinite.Rnw
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 2001-13 Paul Murrell and the R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/grid/vignettes/plotexample.Rnw b/src/library/grid/vignettes/plotexample.Rnw
index 97f8828..5327d34 100644
--- a/src/library/grid/vignettes/plotexample.Rnw
+++ b/src/library/grid/vignettes/plotexample.Rnw
@@ -1,5 +1,5 @@
 % File src/library/grid/vignettes/plotexample.Rnw
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 2001-13 Paul Murrell and the R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/grid/vignettes/rotated.Rnw b/src/library/grid/vignettes/rotated.Rnw
index 7e0db6e..f181e4b 100644
--- a/src/library/grid/vignettes/rotated.Rnw
+++ b/src/library/grid/vignettes/rotated.Rnw
@@ -1,5 +1,5 @@
 % File src/library/grid/vignettes/rotated.Rnw
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 2001-13 Paul Murrell and the R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/grid/vignettes/saveload.Rnw b/src/library/grid/vignettes/saveload.Rnw
index 6ffff7c..a55d545 100644
--- a/src/library/grid/vignettes/saveload.Rnw
+++ b/src/library/grid/vignettes/saveload.Rnw
@@ -1,5 +1,5 @@
 % File src/library/grid/vignettes/saveload.Rnw
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 2001-13 Paul Murrell and the R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/grid/vignettes/sharing.Rnw b/src/library/grid/vignettes/sharing.Rnw
index 038e967..fb08bd9 100644
--- a/src/library/grid/vignettes/sharing.Rnw
+++ b/src/library/grid/vignettes/sharing.Rnw
@@ -1,5 +1,5 @@
 % File src/library/grid/vignettes/sharing.Rnw
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 2001-13 Paul Murrell and the R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/grid/vignettes/viewports.Rnw b/src/library/grid/vignettes/viewports.Rnw
index 1e513aa..bbbca66 100644
--- a/src/library/grid/vignettes/viewports.Rnw
+++ b/src/library/grid/vignettes/viewports.Rnw
@@ -1,5 +1,5 @@
 % File src/library/grid/vignettes/viewports.Rnw
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 2001-13 Paul Murrell and the R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/methods/DESCRIPTION.in b/src/library/methods/DESCRIPTION.in
index e23c4c2..b28439b 100644
--- a/src/library/methods/DESCRIPTION.in
+++ b/src/library/methods/DESCRIPTION.in
@@ -1,12 +1,14 @@
 Package: methods
 Version: @VERSION@
 Priority: base
-Imports: utils
+Imports: utils, stats
 Title: Formal Methods and Classes
 Author: R Core Team
 Maintainer: R Core Team <R-core at r-project.org>
 Description: Formally defined methods and classes for R objects,
-  plus other programming tools, as described in the reference
+  plus other programming tools, as described in the reference.
 References: John M. Chambers (2008)
   ``Software for Data Analysis: Programming with R''; Springer NY.
 License: Part of R @VERSION@
+Suggests: codetools
+NeedsCompilation: yes
diff --git a/src/library/methods/Makefile.in b/src/library/methods/Makefile.in
index 256fddc..281301b 100644
--- a/src/library/methods/Makefile.in
+++ b/src/library/methods/Makefile.in
@@ -17,7 +17,8 @@ pkg = methods
 RSRC = `LC_COLLATE=C ls $(srcdir)/R/*.R`
 
 R_EXE = $(top_builddir)/bin/R --vanilla --slave
-EXTRAS = @BYTE_COMPILE_PACKAGES_TRUE@ R_COMPILE_PKGS=1 R_COMPILER_SUPPRESS_ALL=1
+## Note that R_COMPILER_SUPPRESS_ALL is now on by default
+EXTRAS = @BYTE_COMPILE_PACKAGES_TRUE@ _R_COMPILE_PKGS_=1 R_COMPILER_SUPPRESS_ALL=1
 
 all: Makefile DESCRIPTION
 	@$(ECHO) "building package '$(pkg)'"
diff --git a/src/library/methods/Makefile.win b/src/library/methods/Makefile.win
index 2dc66ef..1888d4f 100644
--- a/src/library/methods/Makefile.win
+++ b/src/library/methods/Makefile.win
@@ -12,7 +12,7 @@ include $(top_builddir)/Makeconf
 pkg = methods
 
 RSRC = `LC_COLLATE=C ls $(srcdir)/R/*.R`
-EXTRAS = R_COMPILE_PKGS=1 R_COMPILER_SUPPRESS_ALL=1
+EXTRAS = _R_COMPILE_PKGS_=1 R_COMPILER_SUPPRESS_ALL=1
 
 all:
 	@$(ECHO) "building package '$(pkg)'"
diff --git a/src/library/methods/NAMESPACE b/src/library/methods/NAMESPACE
index 4a429ec..58f4ce4 100644
--- a/src/library/methods/NAMESPACE
+++ b/src/library/methods/NAMESPACE
@@ -1,12 +1,16 @@
 useDynLib(methods, .registration = TRUE, .fixes = "C_")
 
-importFrom(utils, find)
+## The methods namespace is loaded very early in the startup sequence
+## (if in R_DEFAULT_PACKAGES), so adding other namespaces here has the
+## undesirable effect of loading them early too (e.g. onLoad hooks are
+## likely to be not yet set).
 
 
 exportPattern("^\\.__C__")
 exportPattern("^\\.__M__")
 exportPattern("^\\.__T__")
 
+export(.S4methods)
 export(.TraceWithMethods)
 export(.untracedFunction)
 export(.doTracePrint)
@@ -60,7 +64,7 @@ export(defaultPrototype)
 export(doPrimitiveMethod)
 export(dumpMethod)
 export(dumpMethods)
-export(el, "el<-")
+export(el, "el<-")# (now unused)
 export(elNamed, "elNamed<-")
 export(empty.dump)
 export(emptyMethodsList)
@@ -70,6 +74,7 @@ export(evalSource)
 export(existsFunction)
 export(existsMethod)
 export(extends)
+export(externalRefMethod)
 export(finalDefaultMethod)
 export(findClass)
 export(findFunction)
@@ -208,9 +213,13 @@ export(testVirtual)
 export(traceOff)
 export(traceOn)
 export(tryNew)
+export(isRematched)
 export(unRematchDefinition)
 export(validObject)
 export(validSlotNames)
+export(.isMethodDebugged)
+export(.debugMethod)
+export(.undebugMethod)
 
 ## the next 2 would not be needed if R_initMethods looked in the namespace, not globalenv
 export(.ShortPrimitiveSkeletons)
diff --git a/src/library/methods/R/BasicClasses.R b/src/library/methods/R/BasicClasses.R
index f29c293..c2e0af4 100644
--- a/src/library/methods/R/BasicClasses.R
+++ b/src/library/methods/R/BasicClasses.R
@@ -1,7 +1,7 @@
 #  File src/library/methods/R/BasicClasses.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
-#  Copyright (C) 1995-2013 The R Core Team
+#  Copyright (C) 1995-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
@@ -14,7 +14,8 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
+
 
 ## a few class name definitions needed elsewhere
 .anyClassName <- structure("ANY", package = "methods")
@@ -34,11 +35,9 @@
            function(name, properties, prototype, extends, where) {
                list(properties=properties, prototype = prototype, extends = extends)
            }, envir)
-    clList = character()
-    setClass("VIRTUAL", where = envir); clList <- c(clList, "VIRTUAL")
-    setClass("ANY", where = envir); clList <- c(clList, "ANY")
-    setClass("vector", where = envir); clList <- c(clList, "vector")
-    setClass("missing", where = envir); clList <- c(clList, "missing")
+    clList <- c("VIRTUAL", "ANY", "vector", "missing")
+    for(.class in clList)
+        setClass(.class, where = envir)
     ## "numeric" is the class returned by class() for double vectors
     vClasses <- c("logical", "numeric", "character",
                   "complex", "integer", "raw",
@@ -50,6 +49,7 @@
     .setBaseClass("expression", prototype = expression(), where = envir)
     clList <- c(clList, vClasses)
     nullF <- function()NULL; environment(nullF) <- .GlobalEnv
+    nullF <- utils::removeSource(nullF)
     attr(nullF, "source") <- NULL
     .setBaseClass("function", prototype = nullF, where = envir); clList <- c(clList, "function")
 
@@ -156,7 +156,8 @@
         if(is.list(el) && length(el) > 1)
             setOldClass(el[[1L]], prototype = el[[2L]],  where = envir)
         else
-            warning(gettextf("OOPS: something wrong with line %d in '.OldClassesPrototypes'", i), domain = NA)
+	    warning(gettextf("OOPS: something wrong with '.OldClassesPrototypes[[%d]]'", i),
+		    domain = NA)
     }
     setGeneric("slotsFromS3", where = envir)
     ## the method for "oldClass" is really a constant, just hard to express that way
@@ -201,16 +202,7 @@
               },
               where = envir)
     setClass("factor", contains = "integer", representation(levels = "character"),
-	     validity = function(object) {
-		 levs <- levels(object)
-		 if (!is.character(levs))
-		     return("factor levels must be \"character\"")
-		 if (d <- anyDuplicated(levs))
-		     return(sprintf("duplicated level [%d] in factor", d))
-		 ## 'else'	ok :
-		 TRUE
-	     },
-	     where = envir)
+	     validity = base::.valid.factor, where = envir)
     setOldClass("factor", S4Class = "factor", where = envir)
     if(!isGeneric("show", envir))
         setGeneric("show", where = envir, simpleInheritanceOnly = TRUE)
@@ -235,16 +227,16 @@
         }
         NULL
     }, where = envir)
-   .initS3 <- function(.Object, ...) {
-         if(nargs() < 2)
-           return(.Object)
-         Class <- class(.Object)
-         ClassDef <- getClass(Class)
-         S3Class <- attr(ClassDef at prototype, ".S3Class")
-         if(is.null(S3Class)) # not a class set up by setOldClass()
-             return(callNextMethod())
+    .initS3 <- function(.Object, ...) {
+	if(nargs() < 2)
+	    return(.Object)
+	Class <- class(.Object)
+	ClassDef <- getClass(Class)
+	S3Class <- attr(ClassDef at prototype, ".S3Class")
+	if(is.null(S3Class)) # not a class set up by setOldClass()
+	    return(callNextMethod())
         S3ClassP <- S3Class[[1L]]
-         args <- list(...)
+	args <- list(...)
         ## separate the slots, superclass objects
         snames <- allNames(args)
         which <- nzchar(snames)
@@ -252,32 +244,32 @@
         supers <- args[!which]
         thisExtends <- names(ClassDef at contains)
         slotDefs <- ClassDef at slots
-        dataPart <- elNamed(slotDefs, ".Data")
+        dataPart <- slotDefs[[".Data"]]
         if(is.null(dataPart))
           dataPart <- "missing" # nothing will extend this => no data part args allowed
-        if(length(supers) > 0) {
-            for(i in rev(seq_along(supers))) {
-                obj <- el(supers, i)
-                Classi <- class(obj)
-                defi <- getClassDef(Classi)
-                if(is.null(defi))
-                  stop(gettextf("unnamed argument to initialize() for S3 class must have a class definition; %s does not",
-                                dQuote(Classi)),
-                       domain = NA)
-                if(is(obj, S3ClassP)) {
-                    ## eligible to be the S3 part; merge other slots from prototype;
-                    ## obj then becomes the object, with its original class as the S3Class
-                    if(is.null(attr(obj, ".S3Class"))) # must be an S3 object; use its own class
-                       attr(obj, ".S3Class") <- Classi
-                    .Object <- .asS4(.mergeAttrs(obj, .Object))
-                }
-                else if(is(obj, dataPart)) {
-                    ## the S3Class stays from the prototype
-                    .Object <- .mergeAttrs(obj, .Object)
-                }
-                else stop(gettextf("unnamed argument must extend either the S3 class or the class of the data part; not true of class %s", dQuote(Classi)), domain = NA)
-
+        for(i in rev(seq_along(supers))) {
+            obj <- supers[[i]]
+            Classi <- class(obj)
+            defi <- getClassDef(Classi)
+            if(is.null(defi))
+                stop(gettextf(
+                    "unnamed argument to initialize() for S3 class must have a class definition; %s does not",
+                    dQuote(Classi)),
+                     domain = NA)
+            if(is(obj, S3ClassP)) {
+                ## eligible to be the S3 part; merge other slots from prototype;
+                ## obj then becomes the object, with its original class as the S3Class
+                if(is.null(attr(obj, ".S3Class"))) # must be an S3 object; use its own class
+                    attr(obj, ".S3Class") <- Classi
+                .Object <- .asS4(.mergeAttrs(obj, .Object))
+            }
+            else if(is(obj, dataPart)) {
+                ## the S3Class stays from the prototype
+                .Object <- .mergeAttrs(obj, .Object)
             }
+            else stop(gettextf(
+	"unnamed argument must extend either the S3 class or the class of the data part; not true of class %s",
+			       dQuote(Classi)), domain = NA)
         }
         ## named slots are done as in the default method, which will also call validObject()
         if(length(elements)>0) {
@@ -299,16 +291,37 @@
              representation(names = "character", row.names = "data.frameRowLabels"),
              contains = "list", prototype = unclass(data.frame()), where = envir) # the S4 version
     setOldClass("data.frame", S4Class = "data.frame", where = envir)
-    ## the S3 method for $<- does some stupid things to class()
+    ## the S3 methods for $<-, [[<- and [<- do some stupid things to class()
     ## This buffers the effect from S4 classes
     setMethod("$<-", "data.frame", where = envir,
               function(x, name, value) {
-                  x at .Data <- as.list(`$<-.data.frame`(structure(x at .Data, names = x at names,
-                         row.names = x at row.names, class = "data.frame"),
-                     name, value))
-                  ## Assert:  the only slot/attribute that can change
-                  ## in $<-.data.frame is "names", and the assignment
-                  ## of the .Data "slot" copies in the new names
+                  S3Part(x) <- `$<-.data.frame`(S3Part(x, TRUE), name, value)
+                  x
+              })
+    callBracketReplaceGeneric <- function() {
+        call <- sys.call(sys.parent())
+        which.ij <- if (length(call) > 4L) 3:4 else 3L
+        ij <- as.list(call[which.ij])
+        present <- logical(length(ij))
+        for (a in seq_along(ij)) {
+            arg <- ij[[a]]
+            present[a] <- !missing(arg)
+        }
+        ij[present] <- head(c(quote(i), quote(j)), length(ij))[present]
+        call <- as.call(c(call[[1L]], quote(x3), ij, quote(...),
+                          value=quote(value)))
+        eval(call, parent.frame())
+    }
+    setMethod("[<-", "data.frame", where = envir,
+              function (x, i, j, ..., value) {
+                  x3 <- S3Part(x, TRUE)
+                  S3Part(x) <- callBracketReplaceGeneric()
+                  x
+              })
+    setMethod("[[<-", "data.frame", where = envir,
+              function (x, i, j, ..., value) {
+                  x3 <- S3Part(x, TRUE)
+                  S3Part(x) <- callBracketReplaceGeneric()
                   x
               })
     ## methods to go from S4 to S3; first, using registered class; second, general S4 object
@@ -352,7 +365,8 @@
                       if(match(".Data", names(slots), 0L) > 0L) {
                           data <- unclass(from)
                           if(!is(data, slots[[".Data"]]))
-                            stop(gettextf("object must be a valid data part for class %s; not true of type %s", dQuote(cl), dQuote(class(data))),
+                            stop(gettextf("object must be a valid data part for class %s; not true of type %s",
+					  dQuote(cl), dQuote(class(data))),
                                  domain = NA)
                           value at .Data <- unclass(from)
                       }
@@ -436,7 +450,7 @@
     setMethod("initialize", "matrix", where = where,
               function(.Object, ...) {
 		  if(nargs() < 2) # guaranteed to be called with .Object from new
-                    return(.Object)
+                      return(.Object)
 		  else {
                       if(isMixin(getClass(class(.Object)))) # other superclasses
                           callNextMethod()
@@ -497,17 +511,18 @@
 
 }
 
-## .OldClassList is a purely heuristic list of known old-style classes, with emphasis
+## .OldClassesList is a purely heuristic list of known old-style classes, with emphasis
 ## on old-style class inheritiance.  Used in .InitBasicClasses to call setOldClass for
 ## each known class pattern.
 ## .OldClassesPrototypes is a list of S3 classes for which prototype
-## objects are known & reasonable.  The classes will reappear in
-## .OldClassesList, but will have been initialized first in
-## .InitBasicClasses.  NB:  the methods package will NOT set up
-## prototypes for S3 classes except those in package base and for "ts"
-## (and would rather not do those either).  The package that owns the
-## S3 class should have code to call setOldClass in its
-## initialization.
+## objects are known & reasonable.
+## Its classes should not reappear in .OldClassesList (as these become VIRTUAL)
+## and will have been initialized first in .InitBasicClasses().
+## NB: the methods package will NOT set up prototypes for S3 classes
+##     except those in package base and for "ts" and "formula"
+##     (and would rather not do those either).
+## Ideally, the package that owns the S3 class should have code to call
+## setOldClass in its initialization.
 .OldClassesPrototypes <-
   list(
        list("data.frame",  data.frame(), "data.frame"),
@@ -516,6 +531,7 @@
        list("table",  table(factor())),
        list("summary.table",  summary.table(table(factor())))
        , list("ts", stats::ts())
+       , list("formula", stats::formula())
        )
 .OldClassesList <-
     list(
@@ -530,7 +546,6 @@
          c("POSIXlt", "POSIXt"),
          "Date",
          "dump.frames",
-         c("ordered", "factor"),
          c("glm.null", "glm", "lm"),
          c("anova.glm.null", "anova.glm"),
          "hsearch",
@@ -539,24 +554,20 @@
          "libraryIQR",
          "packageIQR",
          "mtable",
-         "table",
          c("summaryDefault","table"),
-         "summary.table",
          "recordedplot",
          "socket",
          "packageIQR",
          "density",
-         "formula",
          "logLik",
          "rle"
 )
 
 .InitSpecialTypesAndClasses <- function(where) {
-    if(!exists(".S3MethodsClasses", envir = where, inherits = FALSE)) {
+    if(is.null(S3table <- where$.S3MethodsClasses)) {
       S3table <- new.env()
       assign(".S3MethodsClasses", S3table, envir = where)
     }
-    else S3table <- get(".S3MethodsClasses", envir = where)
     specialClasses <- .indirectAbnormalClasses
     specialTypes <- .AbnormalTypes # only part matching classes used
     for(i in seq_along(specialClasses)) {
@@ -579,8 +590,9 @@
         print(structure(object at .Data, names=object at names))
         showExtraSlots(object, getClass("namedList"))
     })
-    setClass("listOfMethods", representation(  arguments = "character",
-                                                 signatures = "list", generic = "genericFunction"), contains = "namedList",
+    setClass("listOfMethods", representation(arguments = "character",
+					     signatures = "list", generic = "genericFunction"),
+             contains = "namedList",
              where = where)
     specialClasses <- c(specialClasses, "namedList", "listOfMethods")
     assign(".SealedClasses", c(get(".SealedClasses", where), specialClasses), where)
@@ -619,7 +631,7 @@
                       localObjs <- is.na(match(objs, slots))
                       if(any(localObjs)) {
                           for(what in objs[localObjs])
-                              assign(what, elNamed(args, what), envir = selfEnv)
+                              selfEnv[[what]] <- args[[what]]
                           objs <- objs[!localObjs]
                           args <- args[!localObjs]
                       }
diff --git a/src/library/methods/R/BasicFunsList.R b/src/library/methods/R/BasicFunsList.R
index 66292b0..b136c5a 100644
--- a/src/library/methods/R/BasicFunsList.R
+++ b/src/library/methods/R/BasicFunsList.R
@@ -1,7 +1,7 @@
 #  File src/library/methods/R/BasicFunsList.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
-#  Copyright (C) 1995-2012 The R Core Team
+#  Copyright (C) 1995-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
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 ## Lists of functions and expressions used in dispatch of functions
 ## defined internally (as .Primitive's) for which formal argument lists
@@ -22,9 +22,8 @@
 ## needs to have a special form (e.g., belonging to one of the
 ## predefined groups of functions).
 
-## The list is expanded in .makeBasicFuns by adding the S4 group generics
-## and the remaining primitives.
-
+##' The list is expanded in .makeBasicFuns() -> ./makeBasicFunsList.R by
+##' adding the S4 group generics and the remaining primitives.
 .BasicFunsList <-
 list(
 ### subset/subassignment ops are regarded as language elements
@@ -46,8 +45,7 @@ list(
 , "%*%" = function(x, y) standardGeneric("%*%")
 , "xtfrm" = function(x) standardGeneric("xtfrm")
 ### these have a different arglist from the primitives
-, "c" = structure(function(x, ..., recursive = FALSE) standardGeneric("c"),
-                  signature="x")
+, "c" = structure(function(x, ...) standardGeneric("c"), signature="x")
 , "all" = structure(function(x, ..., na.rm = FALSE) standardGeneric("all"),
                     signature="x")
 , "any" = structure(function(x, ..., na.rm = FALSE) standardGeneric("any"),
@@ -77,26 +75,38 @@ list(
 ## functions.
 
 .addBasicGeneric <-
-    function(funslist, f, fdef, group = list())
+    function(funslist, f, fdef, group = list(), internal = FALSE,
+             internalArgs = names(formals(deflt)))
 {
-    signature <- attr(fdef, "signature") #typically NULL, but see the case for "$"
-    deflt <- get(f, "package:base")
+    deflt <- .BaseNamespaceEnv[[f]]
     ## use the arguments of the base package function
     ##FIXME:  should also deal with the functions having ... as the first
     ## argument, but needs to create a generic with different args from the deflt
     ## => constructing a call to the base function from the default
     if(is.primitive(deflt)) {
-        body(fdef, envir = globalenv()) <-
+        signature <- attr(fdef, "signature") #typically NULL, but see the case for "$"
+        body(fdef, envir = topenv()) <-
             substitute(standardGeneric(FNAME, DEFLT), list(FNAME=f, DEFLT=deflt))
     }
     else {
+        if (internal) {
+	    ## "forgets" the *defaults* of arguments, e.g. the "any" of as.vector():
+	    ## formals(deflt) <- setNames(rep(alist(x=), length(internalArgs)),
+	    ##                            internalArgs)
+            call <- as.call(c(as.name(f), lapply(internalArgs, as.name)))
+            body(deflt, envir = baseenv()) <-
+                substitute(.Internal(CALL), list(CALL=call))
+        }
         fdef <- deflt
-        body(fdef, envir = globalenv()) <-
+        body(fdef, envir = topenv()) <-
             substitute(standardGeneric(FNAME), list(FNAME=f))
     }
-    deflt <- .derivedDefaultMethod(deflt)
-    elNamed(funslist, f) <- makeGeneric(f, fdef, deflt, group = group, package = "base",
-                                        signature = signature)
+    deflt <- .derivedDefaultMethod(deflt, internal = if (internal) f)
+    if (internal) {
+        signature <- names(formals(deflt))[1L]
+    }
+    funslist[[f]] <- makeGeneric(f, fdef, deflt, group = group, package = "base",
+                                 signature = signature)
     funslist
 }
 
@@ -122,24 +132,26 @@ list(
 
 ## temporary versions while primitives are still handled by a global table
 
-genericForPrimitive <- function(f, where = topenv(parent.frame()), mustFind = TRUE) {
-#    if(.matchBasic(f, .ExcludePrimitiveGenerics, FALSE))
-#        stop(gettextf("methods may not be defined for primitive function %s in this version of R", sQuote(f)), domain = NA)
-    env <- .findBasicFuns(where)
-    funs <- get(".BasicFunsList", envir = env)
-    ans <- elNamed(funs, f)
-    ## this element may not exist (yet, during loading), dom't test null
+isBaseFun <- function(fun) {
+    is.primitive(fun) || identical(environment(fun), .BaseNamespaceEnv)
+}
+
+inBasicFuns <- function(f) {
+    !is.null(.BasicFunsList[[f]])
+}
+
+dispatchIsInternal <- function(fdef) {
+    is.primitive(fdef at default) || is(fdef at default, "internalDispatchMethod")
+}
+
+genericForBasic <- function(f, where = topenv(parent.frame()),
+                            mustFind = TRUE)
+{
+    ans <- .BasicFunsList[[f]]
+    ## this element may not exist (yet, during loading), don't test null
     if(mustFind && identical(ans, FALSE))
         stop(gettextf("methods may not be defined for primitive function %s in this version of R",
                       sQuote(f)),
              domain = NA)
     ans
 }
-
-.findBasicFuns <- function(where) {
-    allWhere <- .findAll(".BasicFunsList", where = where)
-    if(length(allWhere) == 0)
-        .methodsNamespace
-    else
-        as.environment(allWhere[[1L]])
-}
diff --git a/src/library/methods/R/ClassExtensions.R b/src/library/methods/R/ClassExtensions.R
index 120a186..7137cd6 100644
--- a/src/library/methods/R/ClassExtensions.R
+++ b/src/library/methods/R/ClassExtensions.R
@@ -1,7 +1,7 @@
 #  File src/library/methods/R/ClassExtensions.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
-#  Copyright (C) 1995-2012 The R Core Team
+#  Copyright (C) 1995-2015 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
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 .InitExtensions <- function(where) {
     ## to be called from the initialization
@@ -185,7 +185,7 @@ makeExtends <- function(Class, to,
     distance <- 1
     ##FIX ME:  when by is supplied, should use the existing extension information
     ## to compute distance
-    dataPartClass <- elNamed(slots, ".Data")
+    dataPartClass <- elNamed(slots, ".Data") # This seems to be the only elNamed that has to stay
     dataPart <- FALSE
     if(simple && !is.null(dataPartClass)) {
         if(!(is.null(getClassDef(dataPartClass)) || is.null(getClassDef(to)))) {
@@ -198,7 +198,7 @@ makeExtends <- function(Class, to,
     if(is.null(coerce)) {
         coerce <- .simpleExtCoerce
         if(isXS3Class(classDef2)) {
-            allNames <- names(slots)
+##            allNames <- names(slots)
             body(coerce, envir = packageEnv) <-
                 substitute({
                     if(strict) S3Part(from, S3Class = S3CLASS)
@@ -234,7 +234,7 @@ makeExtends <- function(Class, to,
     }
     if(is.null(replace)) {
         if(dataPart) {
-            extn <- elNamed(classDef2 at contains, dataPartClass)
+            extn <- classDef2 at contains[[dataPartClass]]
             if(is(extn, "SClassExtension"))
                 easy <- extn at simple
             else
@@ -383,7 +383,7 @@ makeExtends <- function(Class, to,
         if(exti at distance == 1)
             next # asserted that this was done by makeExtends
         what <- superClasses[[i]]
-        whatDef <- getClassDef(what, where)
+        whatDef <- getClassDef(what, package=packageSlot(exti))
         if(is.null(whatDef) # but shouldn't happen,
            || !isXS3Class(whatDef))
             next
diff --git a/src/library/methods/R/ClassUnion.R b/src/library/methods/R/ClassUnion.R
index 8d418e7..8fff80a 100644
--- a/src/library/methods/R/ClassUnion.R
+++ b/src/library/methods/R/ClassUnion.R
@@ -1,5 +1,5 @@
 #  File src/library/methods/R/ClassUnion.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
 #  Copyright (C) 1995-2012 The R Core Team
 #
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 .InitClassUnion <- function(where) {
     setClass("ClassUnionRepresentation",  "classRepresentation",
diff --git a/src/library/methods/R/Defunct.R b/src/library/methods/R/Defunct.R
index 90655e7..026a66c 100644
--- a/src/library/methods/R/Defunct.R
+++ b/src/library/methods/R/Defunct.R
@@ -1,5 +1,5 @@
 #  File src/library/methods/R/Defunct.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
 #  Copyright (C) 1995-2012 The R Core Team
 #
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 ## old access functions that do nothing but get a slot
 ## likely to be made defunct & disappear.
diff --git a/src/library/methods/R/Methods.R b/src/library/methods/R/Methods.R
index 7ee7a99..ffb3a07 100644
--- a/src/library/methods/R/Methods.R
+++ b/src/library/methods/R/Methods.R
@@ -1,7 +1,7 @@
 #  File src/library/methods/R/Methods.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
-#  Copyright (C) 1995-2013 The R Core Team
+#  Copyright (C) 1995-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
@@ -14,7 +14,11 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
+
+## copy here to avoid importing from stats and hence loading stats
+## namespace when methods if loaded
+setNames <- stats::setNames
 
 
 setGeneric <-
@@ -37,12 +41,13 @@ setGeneric <-
     if(is.character(.isSingleName(name)))
         stop(gettextf("invalid argument 'name': %s",
                       .isSingleName(name)), domain = NA)
-    if(exists(name, "package:base") &&
-       is.primitive(get(name, "package:base"))) { # primitives
+    if(exists(name, "package:base") && inBasicFuns(name)) {
 
         name <- switch(name, "as.double" = "as.numeric", name)
         fdef <- getGeneric(name) # will fail if this can't have methods
-        if(nargs() <= 1) {
+        compatibleSignature <- nargs() == 2L && !missing(signature) &&
+            identical(signature, fdef at signature)
+        if(nargs() <= 1 || compatibleSignature) {
             ## generics for primitives are global, so can & must always be cached
             .cacheGeneric(name, fdef)
             return(name)
@@ -50,7 +55,7 @@ setGeneric <-
         ## you can only conflict with a primitive if you supply
         ## useAsDefault to signal you really mean a different function
         if(!is.function(useAsDefault) && !identical(useAsDefault, FALSE)) {
-            msg <- gettextf("%s is a primitive function;  methods can be defined, but the generic function is implicit, and cannot be changed.", sQuote(name))
+            msg <- gettextf("%s dispatches internally;  methods can be defined, but the generic function is implicit, and cannot be changed.", sQuote(name))
             stop(msg, domain = NA)
         }
     }
@@ -216,33 +221,30 @@ setGeneric <-
     assign(name, fdef, where)
     .cacheGeneric(name, fdef)
     methods <- fdef at default # empty or containing the default
-    assignMethodsMetaData(name, methods, fdef, where, finalDefaultMethod(fdef at default))
+    assignMethodsMetaData(name, methods, fdef, where)
     .assignMethodsTableMetaData(name, fdef, where)
     name
 }
 
 ## Mimic the search for a function in the standard search() list for packages
 ## with namespace, to be consistent with the evaluator's search for objects
+### Deprecate? Seems like we should search the imports, not the search path
 .standardPackageNamespaces <- new.env()
 .standardPackages <- c("stats", "graphics", "grDevices", "utils", "datasets", "methods")
 .getFromStandardPackages <- function(name) {
-    where <- objects(.standardPackageNamespaces)
-    if(!length(where)) { # initialize the table of namespaces
-        for(pkg in .standardPackages) {
-            ## the tryCatch nonsense is needed because this code gets called
-            ## while installing methods (why?) and throws an error on that namespace
-            ns <- tryCatch(loadNamespace(pkg), error = function(e) new.env())
-            assign(pkg, ns, envir = .standardPackageNamespaces)
-        }
-        where <- .standardPackages
-    }
-    ## search
-    for(pkg in where) {
-        ns <- get(pkg, envir = .standardPackageNamespaces)
-        if(exists(name, envir = ns, inherits = FALSE)) {
-            obj <- get(name, envir = ns)
+    namespaces <- as.list(.standardPackageNamespaces, all.names=TRUE)
+    if(length(namespaces) == 0L) { # initialize the table of namespaces
+        namespaces <- lapply(.standardPackages, function(pkg) {
+            tryCatch(loadNamespace(pkg),
+                     error = function(e) new.env())
+        })
+        names(namespaces) <- .standardPackages
+        list2env(namespaces, .standardPackageNamespaces)
+    } else {
+        for(ns in namespaces) {
+            obj <- ns[[name]]
             if(is.function(obj))
-                return(obj)
+              return(obj)
         }
     }
     return(NULL)
@@ -271,12 +273,12 @@ isGeneric <-
     if(is.null(fdef))
       return(FALSE)
     ## check primitives. These are never found as explicit generic functions.
-    if(is.primitive(fdef)) {
+    if(isBaseFun(fdef)) {
         if(is.character(f) && f %in% "as.double") f <- "as.numeric"
-        ## the definition of isGeneric() for a primitive is that methods are defined
+        ## the definition of isGeneric() for a base function is that methods are defined
         ## (other than the default primitive)
-        gen <- genericForPrimitive(f, mustFind = FALSE)
-        return(is.function(gen) && length(objects(.getMethodsTable(gen), all.names=TRUE)) > 1L)
+        gen <- genericForBasic(f, mustFind = FALSE)
+        return(is.function(gen) && length(names(.getMethodsTable(gen))) > 1L)
     }
     if(!is(fdef, "genericFunction"))
         return(FALSE)
@@ -301,14 +303,12 @@ removeGeneric <-
   ##
     function(f, where = topenv(parent.frame()))
 {
-    ev <- fdef <- NULL
+    fdef <- NULL
     allEv <- findFunction(f, where = where)
     for(maybeEv in allEv) {
         fdef <- get(f, maybeEv)
-        if(is(fdef, "genericFunction")) {
-            ev <- maybeEv
+        if(is(fdef, "genericFunction"))
             break
-        }
     }
     found <- is(fdef, "genericFunction")
     if(found) {
@@ -350,30 +350,14 @@ getMethods <-
     function(f, where = topenv(parent.frame()), table = FALSE)
 {
     if(!table)
-      .MlistDeprecated("getMethods", "findMethods")
+      .MlistDefunct("getMethods", "findMethods")
     nowhere <- missing(where)
     fdef <- getGeneric(f, where = where)
     f <- fdef at generic
     if(!is.null(fdef)) {
         if(table)
           return(getMethodsForDispatch(fdef, TRUE))
-        value <-
-            (if(nowhere) {
-                if(is(fdef, "genericFunction"))
-                    .makeMlistFromTable(fdef) # else NULL
-            }
-            else if(.noMlists())
-		.makeMlistFromTable(fdef, where)
-            else getMethodsMetaData(f, where = where)
-             )
-
-        if(is.null(value)) ## return empty methods list
-            new("MethodsList", argument = fdef at default@argument) # but deprecated from 2.11.0
-        else
-            value
-    }
-    else
-      NULL
+    } ## else NULL
 }
 
 getMethodsForDispatch <- function(fdef, inherited = FALSE)
@@ -398,8 +382,7 @@ getMethodsForDispatch <- function(fdef, inherited = FALSE)
     }
 }
 
-##NB used internally in MethodsListSelect.  Must NOT use the standard version
-## to prevent recursion
+## Must NOT use the standard version to prevent recursion  {still true ?}
 .getMethodsForDispatch <- function(fdef) {
     ev <- base::environment(fdef)
     if(base::exists(".Methods", envir = ev))
@@ -460,7 +443,7 @@ setMethod <-
     else if(is.function(f)) {
         if(is.primitive(f)) {
             f <- .primname(f)
-            fdef <- genericForPrimitive(f)
+            fdef <- genericForBasic(f)
             gwhere <- .genEnv(f)
         }
         else
@@ -524,21 +507,24 @@ setMethod <-
     if(!hasMethods) {
         ## create using the visible non-generic as a pattern and default method
         setGeneric(f, where = where)
+        doMessage <- !isS3Generic(fdef)
         fdef <- getGeneric(f, where = where)
-        thisPackage <- getPackageName(where)
-        thisPName <- if(identical(thisPackage, ".GlobalEnv"))
-            "the global environment" else paste("package", sQuote(thisPackage))
-        if(identical(as.character(fdef at package), thisPackage))
-          message(gettextf("Creating a generic function from function %s in %s",
-                           sQuote(f), thisPName), domain = NA)
-        else
-          message(gettextf("Creating a generic function for %s from package %s in %s",
-                           sQuote(f), sQuote(fdef at package), thisPName),
-                  domain = NA)
+        if(doMessage) {
+            thisPackage <- getPackageName(where)
+            thisPName <- if(identical(thisPackage, ".GlobalEnv"))
+                             "the global environment" else paste("package", sQuote(thisPackage))
+            if(identical(as.character(fdef at package), thisPackage))
+                message(gettextf("Creating a generic function from function %s in %s",
+                                 sQuote(f), thisPName), domain = NA)
+            else
+                message(gettextf("Creating a generic function for %s from package %s in %s",
+                                 sQuote(f), sQuote(fdef at package), thisPName),
+                        domain = NA)
+        }
     }
     else if(identical(gwhere, NA)) {
         ## better be a primitive since getGeneric returned a generic, but none was found
-        if(is.null(elNamed(.BasicFunsList, f)))
+	if(is.null(.BasicFunsList[[f]]))
             stop(sprintf("apparent internal error: a generic function was found for \"%s\", but no corresponding object was found searching from \"%s\"",
                           f, getPackageName(where)), domain = NA)
         if(!isGeneric(f))
@@ -607,13 +593,11 @@ setMethod <-
         definition at generic <- fdef at generic
     }
     is.not.base <- !identical(where, baseenv())
-##    do.mlist <- is.not.base && (!.noMlists() || all(signature == "ANY"))
-    do.mlist <- is.not.base && !.noMlists()
-    if(do.mlist)
-        whereMethods <- insertMethod(.getOrMakeMethodsList(f, where, fdef),
-                                     signature, margs, definition)
-    else
-        whereMethods <- NULL
+    whereMethods <-
+	## do.mlist <- is.not.base && (!.noMlists() || all(signature == "ANY"))
+	if(is.not.base && !.noMlists()) # do.mlist
+	    insertMethod(.getOrMakeMethodsList(f, where, fdef),
+			 signature, margs, definition) ## else NULL
     mtable <- getMethodsForDispatch(fdef)
     if(cacheOnAssign(where)) { # will be FALSE for sourceEnvironment's
         ## cache in both direct and inherited tables
@@ -625,7 +609,7 @@ setMethod <-
     }
     ## assigns the methodslist object
     ## and deals with flags for primitives & for updating group members
-    assignMethodsMetaData(f, whereMethods, fdef, where, deflt)
+    assignMethodsMetaData(f, whereMethods, fdef, where)
     f
 }
 
@@ -634,7 +618,7 @@ removeMethod <- function(f, signature = character(), where = topenv(parent.frame
       if(is(f, "genericFunction"))
          { fdef <- f; f <- f at generic}
       else if(is.primitive(f))
-        { f <- .primname(f); fdef <- genericForPrimitive(f)}
+        { f <- .primname(f); fdef <- genericForBasic(f, mustFind=FALSE)}
       else
         stop("function supplied as argument 'f' must be a generic")
     }
@@ -675,7 +659,7 @@ findMethod <- function(f, signature, where = topenv(parent.frame())) {
         f <- fdef at generic
     }
     else
-      fdef <- getGeneric(f, where = where)
+	fdef <- getGeneric(f, where = where)
     if(is.null(fdef)) {
         warning(gettextf("no generic function %s found",
                          sQuote(f)),
@@ -688,13 +672,16 @@ findMethod <- function(f, signature, where = topenv(parent.frame())) {
     for(i in seq_along(where)) {
         wherei <- where[[i]]
         table <- get(fM, wherei, inherits=FALSE)
-        mi <- .findMethodInTable(signature, table, fdef)
+        ## because we are using the table from the package, we must
+        ## search for both the unexpanded & expanded signature, which
+        ## .findMethodInTable does not do.
+        mi <- .findMethodForFdef(signature, table, fdef)
         found[i] <- !is.null(mi)
     }
     value <- where[found]
     ## to conform to the API, try to return a numeric or character vector
     ## if possible
-    what <- sapply(value, class)
+    what <- vapply(value, class, "", USE.NAMES=FALSE)
     if(identical(what, "numeric") || identical(what, "character"))
         unlist(value)
     else
@@ -716,9 +703,9 @@ getMethod <-
     }
     if(missing(fdef)) {
         if(missing(where))
-          fdef <-  getGeneric(f, FALSE)
+          fdef <- getGeneric(f, FALSE)
         else {
-            fdef <-  getGeneric(f, FALSE, where = where)
+            fdef <- getGeneric(f, FALSE, where = where)
             if(is.null(fdef))
               fdef <- getGeneric(f, FALSE)
         }
@@ -730,12 +717,12 @@ getMethod <-
 	if(!is.character(f)) f <- deparse(substitute(f))
 	stop(gettextf("no generic function found for '%s'", f), domain = NA)
     }
-    if(missing(mlist)) {
-	if(missing(where))
-	    mlist <- getMethodsForDispatch(fdef)
-	else
-	    mlist <- .getMethodsTableMetaData(fdef, where, optional)
-    }
+    if(missing(mlist))
+	mlist <-
+	    if(missing(where))
+		getMethodsForDispatch(fdef)
+	    else
+		.getMethodsTableMetaData(fdef, where, optional)
     if(is.environment(mlist)) {
 	signature <- matchSignature(signature, fdef)
 	value <- .findMethodInTable(signature, mlist, fdef)
@@ -749,51 +736,8 @@ getMethod <-
     else if(is.null(mlist)) return(mlist)
 
     ## the rest of the code will be executed only if a methods list object is supplied
-    ## as an argument.  Should be deleted from 2.8.0
-    message("Warning: using defunct methods list search", domain = NA)
-    i <- 1
-    argNames <- fdef at signature
-    signature <- matchSignature(signature, fdef)
-    Classes <- signature # a copy just for possible error message
-    while(length(signature) && is(mlist, "MethodsList")) {
-        if(!identical(argNames[[i]], as.character(mlist at argument)))
-            stop(sprintf("apparent inconsistency in the methods for function %s; argument %s in the signature corresponds to %s in the methods list object",
-                          sQuote(.genericName(f)),
-                          sQuote(argNames[[i]]),
-                          sQuote(as.character(mlist at argument))),
-                 domain = NA)
-        Class <- signature[[1L]]
-        signature <- signature[-1L]
-        methods <- slot(mlist, "methods")
-        mlist <- elNamed(methods, Class)# may be function, MethodsList or NULL
-        i <- i + 1
-    }
-    if(length(signature) == 0L) {
-        ## process the implicit remaining "ANY" elements
-        if(is(mlist, "MethodsList"))
-            mlist <- finalDefaultMethod(mlist)
-        if(is(mlist, "function"))
-            return(mlist) # the only successful outcome
-    }
-    if(optional)
-        mlist                           ## may be NULL or a MethodsList object
-    else {
-        ## for friendliness, look for (but don't return!) an S3 method
-        if(length(Classes) == 1L && exists(paste(.genericName(f), Classes, sep="."), where))
-            stop(sprintf("no S4 method for function %s and signature %s; consider getS3method() if you wanted the S3 method",
-                         sQuote(.genericName(f)), Classes),
-                 domain = NA)
-        if(length(Classes)) {
-            length(argNames) <- length(Classes)
-            Classes <- paste(argNames," = \"", unlist(Classes),
-                             "\"", sep = "", collapse = ", ")
-        }
-        else
-            Classes <- "\"ANY\""
-        stop(sprintf("no method defined in methods list object for function %s and signature %s",
-                     sQuote(.genericName(f)), Classes),
-             domain = NA)
-    }
+    ## as an argument.  Should be deleted from 2.8.0 --> Error from 3.2.0
+    stop("defunct methods list search", domain = NA)
 }
 
 dumpMethod <-
@@ -954,13 +898,14 @@ signature <-
     value <- list(...)
     names <- names(value)
     for(i in seq_along(value)) {
-        sigi <- el(value, i)
+        sigi <- value[[i]]
         if(!is.character(sigi) || length(sigi) != 1L)
-            stop(gettextf("bad class specified for element %d (should be a single character string)", i), domain = NA)
+            stop(gettextf(
+		"bad class specified for element %d (should be a single character string)",
+		i), domain = NA)
+
     }
-      value <- as.character(value)
-      names(value) <- names
-      value
+    setNames(as.character(value), names)
 }
 
 showMethods <-
@@ -1037,7 +982,139 @@ showMethods <-
         invisible(printTo)
 }
 
+.methods_info <-
+    ## (not exported) simplify construction of standard data.frame
+    ## return value from .S4methodsFor*
+    function(generic=character(), signature=character(),
+             visible=rep(TRUE, length(signature)), from=character())
+{
+    if (length(signature))
+        signature <- paste0(generic, ",", signature, "-method")
+    keep <- !duplicated(signature)
+    data.frame(visible=visible[keep], from=from[keep],
+               generic=generic[keep], isS4=rep(TRUE, sum(keep)),
+               row.names=signature[keep], stringsAsFactors=FALSE)
+}
+
+.S4methodsForClass <-
+    ## (not exported) discover methods for specific class;
+    ## generic.function ignored
+    function(generic.function, class)
+{
+    def <- tryCatch(getClass(class), error=function(...) NULL)
+    if (is.null(def))
+        return(.methods_info())
+
+    classes <- c(class, names(getClass(class)@contains))
+    generics <- as.vector(getGenerics(where=search()))
+    nms <- setNames(generics, generics)
+
+    packages <- lapply(nms, function(generic) {
+	table <- environment(getGeneric(generic))[[".MTable"]]
+	lapply(table, function(m) environmentName(environment(m)))
+    })
+    methods <- lapply(nms, function(generic) {
+	table <- environment(getGeneric(generic))[[".MTable"]]
+	lapply(table, function(m) {
+            if (is(m, "MethodDefinition") && any(m at defined %in% classes))
+                setNames(as.vector(m at defined), names(m at defined))
+            ## else NULL
+        })
+    })
+
+    geom <- lapply(methods, function(method) {
+        !vapply(method, is.null, logical(1))
+    })
+    filter <- function(elt, geom) elt[geom]
+    packages <- Map(filter, packages, geom)
+    methods  <- Map(filter, methods,  geom)
+    non0 <- lengths(methods) != 0L
+    packages <- packages[non0]
+    methods  <-  methods[non0]
+
+    ## only derived methods
+    geom <- lapply(methods, function(method, classes) {
+        sig <- simplify2array(method)
+        if (!is.matrix(sig))
+            sig <- matrix(sig, ncol=length(method))
+        idx <- apply(sig, 2, match, classes, 0)
+        if (!is.matrix(idx))
+            idx <- matrix(idx, ncol=ncol(sig))
+        keep <- colSums(idx != 0) != 0
+        sidx <- idx[,keep, drop=FALSE]
+
+        ## 'nearest' method
+        shift <- c(0, cumprod(pmax(1, apply(sidx, 1, max)))[-nrow(sidx)])
+        score <- colSums(sidx + shift)
+        sig0 <- sig <- sig[,keep, drop=FALSE]
+        sig0[sidx != 0] <- "*"
+        sig0 <- apply(sig0, 2, paste, collapse="#")
+        split(score, sig0) <-
+            lapply(split(score, sig0), function(elt) elt == min(elt))
+        score == 1
+    }, classes)
+
+    packages <- Map(filter, packages, geom)
+    methods  <- Map(filter, methods,  geom)
+
+    generic <- rep(names(methods), lengths(methods))
+    signature <- unlist(lapply(methods, function(method) {
+        vapply(method, paste0, character(1L), collapse=",")
+    }), use.names=FALSE)
+    package <- unlist(packages, use.names=FALSE)
+
+    .methods_info(generic=generic, signature=signature, from=package)
+}
 
+.S4methodsForGeneric <-
+    ## (not exported) discover methods for specific generic; class
+    ## ignored.
+    function(generic.function, class)
+{
+    if (is.null(getGeneric(generic.function)))
+        return(.methods_info())
+
+    mtable <- ".MTable"
+    generic <- generic.function
+    table <- get(mtable, environment(getGeneric(generic)))
+    packages <- sapply(names(table), function(nm, table) {
+        environmentName(environment(table[[nm]]))
+    }, table)
+
+    methods <- names(table)
+    signatures <- lapply(methods, function(method, classes) {
+        m <- table[[method]]
+        if (is(m, "MethodDefinition"))
+            setNames(as.vector(m at defined), names(m at defined))
+        else
+            NULL
+    })
+
+    geom <- vapply(signatures, Negate(is.null), logical(1))
+    packages <- packages[geom]
+    methods <- methods[geom]
+    signatures <- sapply(signatures[geom], function(elt) {
+        paste0(as.vector(elt), collapse=",")
+    })
+
+    .methods_info(generic=rep(generic.function, length(packages)), from=packages,
+                  signature=signatures)
+}
+
+.S4methods <-
+    ## discover methods by generic or class, primarily for interactive
+    ## display via utils::methods()
+    function(generic.function, class)
+{
+    info <- if (!missing(generic.function))
+        .S4methodsForGeneric(generic.function, class)
+    else if (!missing(class))
+        .S4methodsForClass(generic.function, class)
+    else
+        stop("must supply 'generic.function' or 'class'")
+    structure(rownames(info), info=info, byclass=missing(generic.function),
+              class="MethodsFunction")
+}
 
 removeMethods <-
   ## removes all the methods defined for this generic function.  Returns `TRUE' if
@@ -1183,64 +1260,48 @@ isGroup <-
     is(fdef, "groupGenericFunction")
   }
 
-callGeneric <- function(...)
-{
-    frame <- sys.parent()
-    envir <- parent.frame()
-    call <- sys.call(frame)
-
-    ## localArgs == is the evaluation in a method that adds special arguments
-    ## to the generic.  If so, look back for the call to generic.  Also expand  "..."
-    localArgs <- FALSE
-    ## the  lines below this comment do what the previous version
-    ## did in the expression fdef <- sys.function(frame)
-    if(exists(".Generic", envir = envir, inherits = FALSE))
-	fdef <- get(get(".Generic", envir = envir), envir = envir)
-    else { # in a local method (special arguments), or	an error
-        localArgs <- identical(as.character(call[[1L]]), ".local")
-	if(localArgs)
-	    call <- sys.call(sys.parent(2))
-	if (is.name(call[[1L]]))
-	    fdef <- get(as.character(call[[1L]]), envir = envir)
-	else fdef <- call[[1L]]
-    }
-
-    if(is.primitive(fdef)) {
-        if(nargs() == 0)
-            stop("'callGeneric' with a primitive needs explicit arguments (no formal args defined)")
-        else {
-            call <- substitute(fdef(...))
-        }
+getGenericFromCall <- function(call, methodEnv) {
+    generic <- methodEnv$.Generic
+    if(is.null(generic)) {
+        fdef <- if (is.name(call[[1L]]))
+            getGeneric(as.character(call[[1L]]), mustFind=TRUE, where=methodEnv)
+        else call[[1L]]
+        generic <- environment(fdef)$.Generic
     }
-    else {
-        env <- environment(fdef)
-        if(!exists(".Generic", env, inherits = FALSE))
-            stop("'callGeneric' must be called from a generic function or method")
-        f <- get(".Generic", env, inherits = FALSE)
-        fname <- as.name(f)
-        if(nargs() == 0) {
-            call[[1L]] <- as.name(fname) # in case called from .local
-            ## if ... appears as an arg name, must be a nested callGeneric()
-            ##  or callNextMethod?  If so, leave alone so "..." will be evaluated
-            if("..." %in% names(call)) {  }
-            else {
-                ## expand the ... if this is  a locally modified argument list.
-                ## This is a somewhat ambiguous case and may not do what the
-                ## user expects.  Not clear there is a single solution.  Should we warn?
-                call <- match.call(fdef, call, expand.dots = localArgs)
-                anames <- names(call)
-                matched <- !is.na(match(anames, names(formals(fdef))))
-                for(i in seq_along(anames))
-                  if(matched[[i]])
-                    call[[i]] <- as.name(anames[[i]])
-            }
-        }
-        else {
-            call <- sys.call() # just use the arguments to callGeneric()
-            call[[1]] <- fname
-        }
+    generic
+}
+
+fromNextMethod <- function(call) {
+  identical(call[[1L]], quote(.nextMethod))
+}
+
+callGeneric <- function(...) {
+    call <- sys.call(sys.parent(1L))
+    .local <- identical(call[[1L]], quote(.local))
+    methodCtxInd <- 1L + if (.local) 1L else 0L
+    callerCtxInd <- methodCtxInd + 1L
+    methodCall <- sys.call(sys.parent(methodCtxInd))
+    if (fromNextMethod(methodCall)) {
+        methodCtxInd <- methodCtxInd + 1L
+    }
+    methodFrame <- parent.frame(methodCtxInd)
+    genericName <- getGenericFromCall(methodCall, methodFrame)
+    if (is.null(genericName)) {
+        stop("callGeneric() must be called from within a method body")
+    }
+    if (nargs() == 0L) {
+        callerFrame <- sys.frame(sys.parent(callerCtxInd))
+        methodDef <- sys.function(sys.parent(1L))
+        call <- match.call(methodDef,
+                           methodCall,
+                           expand.dots=FALSE,
+                           envir=callerFrame)
+        call[-1L] <- lapply(names(call[-1L]), as.name)
+    } else {
+        call <- sys.call()
     }
-    eval(call, sys.frame(sys.parent()))
+    call[[1L]] <- as.name(genericName)
+    eval(call, parent.frame())
 }
 
 ## This uses 'where' to record the methods namespace: default may not be that
@@ -1330,13 +1391,16 @@ implicitGeneric <- function(...) NULL
             return(NULL)  # no implicit generic
           env <- environment(fdefault) # the environment for an implicit generic table
           fdefault <- .derivedDefaultMethod(fdefault)
-          if(is.primitive(fdefault)) {
-              value <- genericForPrimitive(name)
-              if(!missing(generic) && !identical(value, generic))
-                  stop(gettextf("%s is a primitive function; its generic form cannot be redefined",
-                                sQuote(name)),
-                       domain = NA)
-              generic <- value
+          if(isBaseFun(fdefault)) {
+              value <- genericForBasic(name)
+              if (is.function(value)) {
+                  if(!missing(generic) && !identical(value, generic))
+                      stop(gettextf("%s is a primitive function; its generic form cannot be redefined",
+                                    sQuote(name)),
+                           domain = NA)
+                  generic <- value
+                  fdefault <- generic at default
+              }
               package <- "base"
           }
           else
@@ -1391,9 +1455,8 @@ registerImplicitGenerics <- function(what = .ImplicitGenericsTable(where),
     if(!is.environment(what))
         stop(gettextf("must provide an environment table; got class %s",
                       dQuote(class(what))), domain = NA)
-    objs <- objects(what, all.names = TRUE)
-    for(f in objs)
-        .cacheImplicitGeneric(f, get(f, envir = what))
+    objs <- as.list(what, all.names = TRUE)
+    mapply(.cacheImplicitGeneric, names(objs), objs)
     NULL
 }
 
@@ -1415,11 +1478,10 @@ registerImplicitGenerics <- function(what = .ImplicitGenericsTable(where),
 .getImplicitGeneric <- function(name, where, pkg = "")
 {
     value <- .getImplicitGenericFromCache(name, where, pkg)
-    if(is.null(value) && exists(.ImplicitGenericsMetaName, where, inherits = FALSE)) {
-        tbl <-  get(.ImplicitGenericsMetaName, where)
-        value <- .getGenericFromCacheTable(name, where, pkg, tbl)
-    }
-    value
+    if(is.null(value) && !is.null(tbl <- where[[.ImplicitGenericsMetaName]]))
+       .getGenericFromCacheTable(name, where, pkg, tbl)
+    else
+        value
 }
 
 ## only called from setGeneric, f1 = supplied, f2 = implicit
@@ -1463,7 +1525,8 @@ registerImplicitGenerics <- function(what = .ImplicitGenericsTable(where),
 	return(gettextf("value classes differ: %s, %s",
                         .dQ(gpString(f1 at valueClass)),
                         .dQ(gpString(f2 at valueClass))))
-    if(!identical(body(f1d), body(f2d)))
+    if(!identical(body(utils::removeSource(f1d)),
+                  body(utils::removeSource(f2d))))
 	return("function body differs")
     if(!identical(f1 at signature, f2 at signature))
 	return(gettextf("signatures differ:  (%s), (%s)",
@@ -1495,10 +1558,9 @@ registerImplicitGenerics <- function(what = .ImplicitGenericsTable(where),
 }
 
 .getImplicitGroup <- function(name, where) {
-    if(exists(.ImplicitGroupMetaName, where, inherits = FALSE)) {
-        tbl <- get(.ImplicitGroupMetaName, where)
-        if(exists(name, envir = tbl, inherits = FALSE))
-            return(get(name, envir = tbl))
+    if(!is.null(tbl <- where[[.ImplicitGroupMetaName]])) {
+	if(!is.null(r <- tbl[[name]]))
+	    return(r)
     }
     list()
 }
@@ -1537,21 +1599,19 @@ findMethods <- function(f, where, classes = character(), inherited = FALSE, pack
       table <- get(if(inherited) ".AllMTable" else ".MTable", envir = environment(fdef))
     else {
         if(!identical(inherited, FALSE))
-          stop("only FALSE is meaningful for 'inherited', when 'where' is supplied (got ", inherited, "\"")
+          stop(gettextf("only FALSE is meaningful for 'inherited', when 'where' is supplied (got %s)", inherited), domain = NA)
         where <- as.environment(where)
         what <- .TableMetaName(f, fdef at package)
-        if(exists(what, envir = where, inherits = FALSE))
-          table <- get(what, envir = where)
-        else
+        if(is.null(table <- where[[what]]))
           return(object)
     }
-    objNames <- objects(table, all.names = TRUE)
+    objNames <- sort(names(table))
     if(length(classes)) {
         classesPattern <- paste0("#", classes, "#", collapse = "|")
         which <- grep(classesPattern, paste0("#",objNames,"#"))
         objNames <- objNames[which]
     }
-    object at .Data <- lapply(objNames, function(x)get(x, envir = table))
+    object at .Data <- mget(objNames, table)
     object at names <- objNames
     object at signatures <- strsplit(objNames, "#", fixed = TRUE)
     object
@@ -1574,7 +1634,7 @@ findMethodSignatures <- function(..., target = TRUE, methods = findMethods(...))
         sigs <- lapply(methods, function(x)
                        if(is.primitive(x)) anySig else as.character(x at defined))
     }
-    lens <- unique(sapply(sigs, length))
+    lens <- unique(vapply(sigs, length, 1, USE.NAMES=FALSE))
     if(length(lens) == 0)
         return(matrix(character(), 0, length(methods at arguments)))
     if(length(lens) > 1L) {
@@ -1625,7 +1685,7 @@ hasMethods <- function(f, where, package = "")
     what <- .TableMetaName(f, package)
     testEv <- function(ev)
       exists(what, envir = ev, inherits = FALSE) &&
-    length(objects(get(what, envir = ev), all.names = TRUE))
+        length(names(get(what, envir = ev))) > 0L
     if(nowhere) {
         for(i in seq_along(search())) {
             if(testEv(as.environment(i)))
diff --git a/src/library/methods/R/MethodsList.R b/src/library/methods/R/MethodsList.R
index a2a52e5..71c4978 100644
--- a/src/library/methods/R/MethodsList.R
+++ b/src/library/methods/R/MethodsList.R
@@ -1,7 +1,7 @@
 #  File src/library/methods/R/MethodsList.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
-#  Copyright (C) 1995-2013 The R Core Team
+#  Copyright (C) 1995-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
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 MethodsList <-
   ## Create a MethodsList object out of the arguments.
@@ -34,6 +34,7 @@ MethodsList <-
   ## methods and, in R, to emulate S4-style methods.
   function(.ArgName, ...)
 {
+    .MlistDeprecated("MethodsList()")
     value <- makeMethodsList(list(...))
     if(is.name(.ArgName)){}
     else if(is.character(.ArgName) && length(.ArgName) == 1)
@@ -45,6 +46,7 @@ MethodsList <-
 
 makeMethodsList <- function(object, level=1)
 {
+    .MlistDeprecated("makeMethodsList()")
     mnames <- allNames(object)
     if(.noMlists()) {
         keep <- mnames %in% c("", "ANY")
@@ -55,7 +57,7 @@ makeMethodsList <- function(object, level=1)
     i <- match("", mnames)
     if(!is.na(i)) {
         ## convert to ANY
-        el(mnames, i) <- "ANY"
+        mnames[[i]] <- "ANY"
         names(object) <- mnames
     }
     if(anyDuplicated(mnames))
@@ -63,12 +65,12 @@ makeMethodsList <- function(object, level=1)
              level, paste("\"", unique(mnames[duplicated(mnames)]), "\"",
                           collapse=", ")), domain = NA)
     for(i in seq_along(object)) {
-        eli <- el(object, i)
+        eli <- object[[i]]
         if(is(eli, "function")
            || is(eli, "MethodsList")) {}
         else if(is(eli, "list") ||
                 is(eli, "named"))
-            el(object, i) <- Recall(eli, NULL, level+1)
+            object[[i]] <- Recall(eli, NULL, level+1)
         else
             stop(gettextf("element %d at level %d (class %s) cannot be interpreted as a function or named list",
                           i, level, dQuote(class(eli))),
@@ -89,15 +91,16 @@ SignatureMethod <-
   ## the signatures.
   function(names, signature, definition)
 {
+    .MlistDeprecated("SignatureMethod()")
     n <- length(signature)
     if(n > length(names))
         stop("arguments 'names' and 'signature' must have the same length")
     if(n == 0)
         return(definition)
-    Class <- el(signature,n)
-    name <- el(names, n)
+    Class <- signature[[n]]
+    name <- names[[n]]
     m <- MethodsList(name)
-    elNamed(slot(m, "methods"), Class) <- definition
+    slot(m, "methods")[[Class]] <- definition
     slot(m, "argument") <- as.name(name)
     SignatureMethod(names[-n], signature[-n], m)
 }
@@ -108,6 +111,7 @@ insertMethod <-
   ## the signature, and return the modified MethodsList.
   function(mlist, signature, args, def, cacheOnly = FALSE)
 {
+    .MlistDeprecated("insertMethod()")
     if(.noMlists() && !identical(unique(signature), "ANY"))
       return(mlist)
     ## Checks for assertions about valid calls.
@@ -130,9 +134,9 @@ insertMethod <-
              domain = NA)
     if(length(args) > 1 && !cacheOnly)
         mlist <- balanceMethodsList(mlist, args)
-    Class <- el(signature, 1)
+    Class <- signature[[1]]
     methods <- if(cacheOnly) mlist at allMethods else mlist at methods
-    current <- elNamed(methods, Class)
+    current <- methods[[Class]]
     if(is(current, "MethodsList")) {
         nextArg <- as.character(current at argument)
         sigArgs <- args
@@ -151,7 +155,7 @@ insertMethod <-
     if(length(signature) == 1) {
         if(is.null(current)) {
             if(!is.null(def))
-                elNamed(methods, Class) <- def
+                methods[[Class]] <- def
             ## else, no change
         }
         else {
@@ -160,7 +164,7 @@ insertMethod <-
                 ## delete the method
                 methods <- methods[-which]
             else
-                el(methods, which) <- def
+                methods[[which]] <- def
         }
     }
     else { ## recursively merge, initializing current if necessary
@@ -169,7 +173,7 @@ insertMethod <-
         else if(is.function(current))
             current <- new("MethodsList", argument = as.name(args[2L]),
 			   methods = list(ANY = current))
-        elNamed(methods, Class) <-
+        methods[[Class]] <-
             Recall(current, signature[-1L], args[-1L], def, cacheOnly)
     }
     mlist at allMethods <- methods
@@ -201,6 +205,7 @@ MethodsListSelect <-
              resetAllowed = TRUE # FALSE when called from selectMethod, .findNextMethod
  )
 {
+    .MlistDeprecated("MethodsListSelect()")
     if(!resetAllowed) # ensure we restore the real methods for this function
 	resetMlist <- .getMethodsForDispatch(fdef)
     ## look for call from C dispatch code during another call to MethodsListSelect
@@ -344,7 +349,7 @@ MethodsListSelect <-
                 if(is.null(value)) resetMlist <- mlist else resetMlist <- value
             }
             .setMethodsForDispatch(f, fdef, resetMlist)
-            if(is.primitive(finalDefault))
+            if(dispatchIsInternal(fdef))
                 setPrimitiveMethods(f, finalDefault, "set", fdef, resetMlist)
         }
 
@@ -353,11 +358,13 @@ MethodsListSelect <-
 }
 
 emptyMethodsList <- function(mlist, thisClass = "ANY", sublist = list()) {
+    .MlistDeprecated("emptyMethodsList()")
     sublist[thisClass] <- list(NULL)
     new("EmptyMethodsList", argument = mlist at argument, sublist = sublist)
 }
 
 insertMethodInEmptyList <- function(mlist, def) {
+    .MlistDeprecated("insertMethodInEmptyList()")
     value <- new("MethodsList", argument = mlist at argument)
     sublist <- mlist at sublist
     submethods <- sublist[[1L]]
@@ -379,14 +386,16 @@ finalDefaultMethod <-
   function(method)
 {
     repeat {
-        if(is.function(method) #somewhat liberal, but catches both methods and primitives
+        if(is.function(method) # <- somewhat liberal, but catches both methods and primitives
            || is.null(method))
           break
-        value <- NULL
-        if(is(method, "MethodsList"))
-            method <-  elNamed(slot(method, "methods"), "ANY")
-        else
-          stop(gettextf("default method must be a method definition, a primitive or NULL: got an object of class %s", dQuote(class(method))),
+        if(is(method, "MethodsList")) {
+	    .MlistDeprecated()
+            method <-  slot(method, "methods")[["ANY"]]
+        } else
+          stop(gettextf(
+	"default method must be a method definition, a primitive or NULL: got an object of class %s",
+			dQuote(class(method))),
                domain = NA)
     }
     method
@@ -403,8 +412,9 @@ inheritedSubMethodLists <-
   ## on which methods were previously used.  See the detailed discussion of methods.)
   function(object, thisClass, mlist, ev)
 {
+  .MlistDeprecated("inheritedSubMethodLists()")
   methods <- slot(mlist, "methods")## only direct methods
-  defaultMethod <- elNamed(methods, "ANY")## maybe NULL
+  defaultMethod <- methods[["ANY"]]## maybe NULL
   classes <- names(methods)
   value <- list()
   if(.identC(thisClass, "missing")) {
@@ -423,28 +433,28 @@ inheritedSubMethodLists <-
           superClasses <- names(classDef at contains)
           classes <- superClasses[!is.na(match(superClasses, classes))]
           for(which in seq_along(classes)) {
-              tryClass <- el(classes, which)
+              tryClass <- classes[[which]]
               ## TODO:  There is potential bug here:  If the is relation is conditional,
               ## we should not cache this selection.  Needs another trick in the environment
               ## to FORCE no caching regardless of what happens elsewhere; e.g., storing a
               ## special object in .Class
               if(is.null(object) || is(object, tryClass)) {
-                  elNamed(value, tryClass) <- elNamed(methods, tryClass)
+                  value[[tryClass]] <- methods[[tryClass]]
               }
           }
       }
       else {
           for(which in seq_along(classes)) {
-              tryClass <- el(classes, which)
+              tryClass <- classes[[which]]
               tryClassDef <- getClassDef(tryClass, ev)
               if(!is.null(tryClassDef) &&
                  !is.na(match(thisClass, names(tryClassDef at subclasses))))
-                  elNamed(value, tryClass) <- el(methods, which)
+                  value[[tryClass]] <- methods[[which]]
           }
       }
   }
   if(!is.null(defaultMethod))
-      elNamed(value, "ANY") <- defaultMethod
+      value[["ANY"]] <- defaultMethod
   value
 }
 
@@ -532,40 +542,40 @@ matchSignature <-
 	       length(which), length(anames), sQuote(fun at generic)), domain = NA)
     }
     else {
-    ## construct a function call with the same naming pattern  &
-      ## values as signature
-    sigList <- signature
-    for(i in seq_along(sigList))
-        sigList[[i]] <- c(sigClasses[[i]], pkgs[[i]])
-    fcall <- do.call("call", c("fun", sigList))
-    ## match the call to the formal signature (usually the formal args)
-    if(identical(anames, formalArgs(fun)))
-        smatch <- match.call(fun, fcall)
-    else {
-        fmatch <- fun
-        ff <- as.list(anames); names(ff) <- anames
-        formals(fmatch, envir = environment(fun)) <- ff
-        smatch <- match.call(fmatch, fcall)
-    }
-    snames <- names(smatch)[-1L]
-    which <- match(snames, anames)
-    ## Assertion:  match.call has permuted the args into the order of formal args,
-    ## and carried along the values.  Get the supplied classes in that
-    ## order, from the matched args in the call object.
-    if(anyNA(which))
-        stop(sprintf(ngettext(sum(is.na(which)),
-                              "in the method signature for function %s invalid argument name in the signature: %s",
-                              "in the method signature for function %s invalid argument names in the signature: %s"),
-                     sQuote(fun at generic),
-                     paste(snames[is.na(which)], collapse = ", ")),
-             domain = NA)
-    smatch <- smatch[-1]
-    for(i in seq_along(smatch)) {
-        eli <- smatch[[i]]
-        sigClasses[[i]] <- eli[[1]]
-        pkgs[[i]] <- eli[[2]]
+        ## construct a function call with the same naming pattern  &
+        ## values as signature
+        sigList <- signature
+        for(i in seq_along(sigList))
+            sigList[[i]] <- c(sigClasses[[i]], pkgs[[i]])
+        fcall <- do.call("call", c("fun", sigList))
+        ## match the call to the formal signature (usually the formal args)
+        if(identical(anames, formalArgs(fun)))
+            smatch <- match.call(fun, fcall)
+        else {
+            fmatch <- fun
+            ff <- as.list(anames); names(ff) <- anames
+            formals(fmatch, envir = environment(fun)) <- ff
+            smatch <- match.call(fmatch, fcall)
+        }
+        snames <- names(smatch)[-1L]
+        which <- match(snames, anames)
+        ## Assertion:  match.call has permuted the args into the order of formal args,
+        ## and carried along the values.  Get the supplied classes in that
+        ## order, from the matched args in the call object.
+        if(anyNA(which))
+            stop(sprintf(ngettext(sum(is.na(which)),
+                                  "in the method signature for function %s invalid argument name in the signature: %s",
+                                  "in the method signature for function %s invalid argument names in the signature: %s"),
+                         sQuote(fun at generic),
+                         paste(snames[is.na(which)], collapse = ", ")),
+                 domain = NA)
+        smatch <- smatch[-1]
+        for(i in seq_along(smatch)) {
+            eli <- smatch[[i]]
+            sigClasses[[i]] <- eli[[1]]
+            pkgs[[i]] <- eli[[2]]
+        }
     }
-}
     n <- length(anames)
     value <- rep("ANY", n)
     valueP <- rep("methods", n)
@@ -593,6 +603,7 @@ showMlist <-
 function(mlist, includeDefs = TRUE, inherited = TRUE, classes = NULL, useArgNames = TRUE,
          printTo = stdout())
 {
+    .MlistDeprecated("showMlist()")
     if(identical(printTo, FALSE)) {
         tmp <- tempfile()
         con <- file(tmp, "w")
@@ -604,7 +615,7 @@ function(mlist, includeDefs = TRUE, inherited = TRUE, classes = NULL, useArgName
   signatures <- object at classes
   args <- object at arguments
   if(!is.null(classes) && length(signatures)>0) {
-    keep <- !sapply(signatures, function(x, y)all(is.na(match(x, y))), classes)
+    keep <- !vapply(signatures, function(x, y) all(is.na(match(x, y))), NA, classes)
     methods <- methods[keep]
     signatures <- signatures[keep]
     args <- args[keep]
@@ -736,6 +747,7 @@ promptMethods <- function(f, filename = NULL, methods)
     invisible(filename)
 }
 
+##' only called from showMlist() above, which has been deprecated in R 3.2.0 (Apr.2015):
 linearizeMlist <-
     ## Undo the recursive nature of the methods list, making a list of
     ## function definitions, with the names of the list being the
@@ -751,8 +763,8 @@ linearizeMlist <-
         methods <- mlist at methods
         allMethods <- mlist at allMethods
         if(inherited && length(allMethods) >= length(methods)) {
-            anames <- names(allMethods)
-            inh <- is.na(match(anames, names(methods)))
+##            anames <- names(allMethods)
+##            inh <- is.na(match(anames, names(methods)))
             methods <- allMethods
         }
         preC <- function(y, x)c(x,y) # used with lapply below
@@ -769,6 +781,7 @@ linearizeMlist <-
                 arguments <- c(arguments, list(argname))
             }
             else if(is(mi, "MethodsList")) {
+		.MlistDeprecated()
                 mi <- Recall(mi, inherited)
                 value <- c(value, mi at methods)
                 classes <- c(classes, lapply(mi at classes, preC, cnames[[i]]))
@@ -787,6 +800,7 @@ print.MethodsList <- function(x, ...)
     showMlist(x)
 
 
+## In R's own code, this is *only* used in mergeMethods(), deprecated in R 3.2.0 (Apr.2015)
 listFromMlist <-
   ## linearizes the MethodsList object into list(sigs, methods); `prefix' is the partial
   ## signature (a named list of classes) to be prepended to the signatures in this object.
@@ -800,17 +814,17 @@ listFromMlist <-
     sigs <- list()
     methods <- list()
     for(i in seq_along(methodSlot)) {
-        thisMethod <- el(methodSlot, i)
-        thisClass <- el(mnames, i)
-        elNamed(prefix, argName) <- thisClass
+        thisMethod <- methodSlot[i]
+        thisClass <- mnames[[i]]
+        prefix[[argName]] <- thisClass
         if(is.function(thisMethod)) {
             if(sigs.) sigs <- c(sigs, list(prefix))
             if(methods.) methods <- c(methods, list(thisMethod))
         }
         else {
             more <- Recall(thisMethod, prefix)
-            if(sigs.) sigs <- c(sigs, el(more, 1))
-            if(methods.) methods <- c(methods, el(more, 2))
+            if(sigs.) sigs <- c(sigs, more[[1]])
+            if(methods.) methods <- c(methods, more[[2]])
         }
     }
     list(sigs, methods)
@@ -818,6 +832,7 @@ listFromMlist <-
 
 .insertCachedMethods <- function(mlist, argName, Class, fromClass, def) {
     if(is(def, "MethodsList")) {
+        .MlistDeprecated()
         ## insert all the cached methods in def
         newArg <- c(argName, as.character(def at argument))
         newDefs <- def at allMethods
@@ -847,7 +862,7 @@ listFromMlist <-
 ## The real version requires several class definitions as well as
 ## methods for as<-
 asMethodDefinition <- function(def, signature = list(.anyClassName), sealed = FALSE, fdef = def) {
-  if(is.primitive(def))
+  if(is.primitive(def) || is(def, "MethodDefinition"))
     def
   else {
     value = new("MethodDefinition")
@@ -882,15 +897,34 @@ asMethodDefinition <- function(def, signature = list(.anyClassName), sealed = FA
         else
             assign(this, TRUE, envir = .MlistDepTable)
     }
-    if(missing(this))
-        msg <-"Use of the \"MethodsList\" meta data objects is deprecated."
-    else if(is.character(this))
-        msg <- gettextf("%s, along with other use of the \"MethodsList\" metadata objects, is deprecated.", dQuote(this))
+    msg <-
+        if(missing(this))
+            "Use of the \"MethodsList\" meta data objects is deprecated."
+        else if(is.character(this))
+            gettextf(
+	"%s, along with other use of the \"MethodsList\" metadata objects, is deprecated.",
+                 dQuote(this))
     else
-        msg <- gettextf("in %s: use of \"MethodsList\" metadata objects is deprecated.", deparse(this))
+        gettextf("in %s: use of \"MethodsList\" metadata objects is deprecated.",
+                 deparse(this))
     if(!missing(instead))
-      msg <- paste(msg, gettextf("use %s instead.", dQuote(instead)))
+	msg <- paste(msg, gettextf("use %s instead.", dQuote(instead)))
     msg <- paste(msg, "see ?MethodsList. (This warning is shown once per session.)")
     base::.Deprecated(msg = msg)
 }
 
+.MlistDefunct <- function(this = "<default>", instead) {
+    msg <-
+        if(missing(this))
+            "Use of the \"MethodsList\" meta data objects is defunct."
+        else if(is.character(this))
+            gettextf("%s, along with other use of the \"MethodsList\" metadata objects, is defunct.",
+                     dQuote(this))
+        else
+            gettextf("in %s: use of \"MethodsList\" metadata objects is defunct.",
+                     deparse(this))
+    if(!missing(instead))
+        msg <- paste(msg, gettextf("use %s instead.", dQuote(instead)))
+    msg <- paste(msg, "see ?MethodsList.")
+    base::.Defunct(msg = msg)
+}
diff --git a/src/library/methods/R/MethodsListClass.R b/src/library/methods/R/MethodsListClass.R
index d8ba9d5..e430975 100644
--- a/src/library/methods/R/MethodsListClass.R
+++ b/src/library/methods/R/MethodsListClass.R
@@ -1,7 +1,7 @@
 #  File src/library/methods/R/MethodsListClass.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
-#  Copyright (C) 1995-2013 The R Core Team
+#  Copyright (C) 1995-2015 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
@@ -14,13 +14,15 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 .InitMethodsListClass <- function(envir)
 {
-    if(exists(classMetaName("MethodsList"), envir))
+    if(exists(classMetaName("EmptyMethodsList"), envir))
         return(FALSE)
     clList <- character()
+    ## Even though it is defunct from R 3.2.0, other functions using it are
+    ## only deprecated: So we define it and give .MlistDeprecated() messages there:
     setClass("MethodsList",
              representation(methods = "list", argument = "name", allMethods = "list"),
              where = envir); clList <- c(clList, "MethodsList")
@@ -37,7 +39,8 @@
     setIs("PossibleMethod", "optionalMethod", where = envir)
     setIs("NULL", "optionalMethod", where = envir)
     ## prior to 2.11.0, the default slot in generic function objects was a MethodsList or NULL
-    setIs("MethodsList", "optionalMethod", where = envir) #only until MethodsList class is defunct
+    ## from 3.2.0, no longer:
+    ## setIs("MethodsList", "optionalMethod", where = envir) #only until MethodsList class is defunct
 
     ## signatures -- multiple class names w. package slot in ||
     setClass("signature", representation("character", names = "character", package = "character"), where = envir); clList <- c(clList, "signature")
@@ -52,6 +55,9 @@
              where = envir); clList <- c(clList, "MethodDefinition")
     ## class for default methods made from ordinary functions
     setClass("derivedDefaultMethod", "MethodDefinition")
+    ## class for methods that call and dispatch inside .Internal()
+    setClass("internalDispatchMethod", contains = "derivedDefaultMethod",
+             representation(internal = "character"))
     ## class for methods with precomputed information for callNextMethod
     setClass("MethodWithNext",
              representation("MethodDefinition", nextMethod = "PossibleMethod", excluded = "list"), where = envir); clList <- c(clList, "MethodWithNext")
@@ -190,14 +196,13 @@
                   args <- list(...)
                   objs <- names(args)
                   for(what in objs)
-                      assign(what, elNamed(args, what), envir = value)
+                      value[[what]] <- args[[what]]
                   value
               }, where = envir)
-    ## from 2.11.0, the MethodsList classs is deprecated
-    setMethod("initialize", "MethodsList", function(.Object, ...) {
-        .MlistDeprecated()
-        callNextMethod()
-    }, where = envir)
+    ## from 2.11.0, the MethodsList class is deprecated
+    ## from 3.2.0, it is defunct
+    setMethod("initialize", "MethodsList", function(.Object, ...) .MlistDefunct(),
+              where = envir)
 
     ## make sure body(m) <- .... leaves a method as a method
     setGeneric("body<-", where = envir)
@@ -261,26 +266,26 @@
 	       where = envir)
     ## and its default methods:
     setMethod("cbind2", signature(x = "ANY", y = "ANY"),
-	      function(x,y) .__H__.cbind(deparse.level = 0, x, y) )
+	      function(x,y, ...) .Internal(cbind(-1L, x, y)))
     setMethod("cbind2", signature(x = "ANY", y = "missing"),
-	      function(x,y) .__H__.cbind(deparse.level = 0, x) )
+	      function(x,y, ...) .Internal(cbind(-1L, x)))
 
     setGeneric("rbind2", function(x, y, ...) standardGeneric("rbind2"),
 	       where = envir)
     ## and its default methods:
     setMethod("rbind2", signature(x = "ANY", y = "ANY"),
-	      function(x,y) .__H__.rbind(deparse.level = 0, x, y) )
+	      function(x,y, ...) .Internal(rbind(-1L, x, y)))
     setMethod("rbind2", signature(x = "ANY", y = "missing"),
-	      function(x,y) .__H__.rbind(deparse.level = 0, x) )
+	      function(x,y, ...) .Internal(rbind(-1L, x)))
 
-    setGeneric("kronecker", where = envir)
+    setGeneric("kronecker", where = envir)# <- unneeded?
 
     setMethod("kronecker", signature(X = "ANY", Y = "ANY"),
 	      function(X, Y, FUN = "*", make.dimnames = FALSE, ...)
               .kronecker(X, Y, FUN = FUN, make.dimnames = make.dimnames, ...))
 
     .InitStructureMethods(envir)
-### Uncomment next line if we want special initialize methods for basic classes
+    ## we want special initialize methods for basic classes:
     .InitBasicClassMethods(envir)
 }
 
@@ -353,7 +358,7 @@
               function(x, digits) {
                   value <- x
                   x <- x at .Data
-                  value at Data  <- callGeneric()
+                  value at .Data  <- callGeneric()
                   value
               })
     ## some methods for nonStructure, ensuring that the class and slots
@@ -415,9 +420,15 @@
             if(is.null(sigArgs))
               names(signature) <- formalNames[seq_along(classes)]
             else if(length(sigArgs) && any(is.na(match(sigArgs, formalNames))))
-              stop(gettextf("the names in signature for method (%s) do not match %s's arguments (%s)",
+                if(is(fdef, "genericFunction"))
+                      stop(sprintf(gettext("the names in signature for method (%s) do not match %s's arguments (%s)", domain = "R-methods"),
+                            paste(sigArgs, collapse = ", "),
+                            fdef at generic,
+                            paste(formalNames, collapse = ", ")),
+                   domain = NA)
+                else
+                      stop(sprintf(gettext("the names in signature for method (%s) do not match function's arguments (%s)", domain = "R-methods"),
                             paste(sigArgs, collapse = ", "),
-                            if(is(fdef, "genericFunction")) fdef at generic else "function",
                             paste(formalNames, collapse = ", ")),
                    domain = NA)
         }
diff --git a/src/library/methods/R/NextMethod.R b/src/library/methods/R/NextMethod.R
index 01aeed3..215eadc 100644
--- a/src/library/methods/R/NextMethod.R
+++ b/src/library/methods/R/NextMethod.R
@@ -1,7 +1,7 @@
 #  File src/library/methods/R/NextMethod.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
-#  Copyright (C) 1995-2012 The R Core Team
+#  Copyright (C) 1995-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
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 callNextMethod <- function(...) {
     method <- nextMethod <-  NULL
@@ -24,37 +24,42 @@ callNextMethod <- function(...) {
     ## Because of the .local mechanism used to allow variable argument lists
     ## in methods (see rematchDefinition) these may be different.
     parent <- sys.parent(1)
-    maybeMethod <- sys.function(parent)
+    methodFun <- maybeMethod <- sys.function(parent)
     if(is(maybeMethod, "MethodDefinition")) {
         callEnv <- methodEnv <- parent.frame(1)
         mcall <- sys.call(parent)
-        i <- 1
+        dotsenv <- parent.frame(2)
+        i <- 1L
     }
     else {
         callEnv <- parent.frame(1)
         methodEnv <- parent.frame(2)
         mcall <- sys.call(sys.parent(2))
-        i <- 2
+        dotsenv <- parent.frame(3)
+        maybeMethod <- sys.function(sys.parent(2))
+        i <- 2L
     }
     ## set up the nextMethod object, load it
     ## into the calling environment, and cache it
-    if(exists(".Method", envir = methodEnv, inherits = FALSE)) {
+    if(!is.null(method <- methodEnv$.Method)) {
         ## call to standardGeneric(f)
-        method <- get(".Method", envir = methodEnv, inherits = FALSE)
-        if(exists(".nextMethod", envir = callEnv, inherits = FALSE))
-            nextMethod <- get(".nextMethod", envir = callEnv)
-        f <- get(".Generic", envir = methodEnv)
+        nextMethod <- callEnv$.nextMethod
+        f <- methodEnv$.Generic
     }
     else if(identical(mcall[[1L]], dotNextMethod)) {
         ## a call from another callNextMethod()
-        nextMethodEnv <- parent.frame(i+1)
-        nextMethod <- get(".nextMethod", nextMethodEnv)
-        f <- get(".Generic", envir = nextMethodEnv)
+        nextMethodEnv <- parent.frame(i+1L)
+        nextMethod <- nextMethodEnv$.nextMethod
+        f <- nextMethodEnv$.Generic
     }
     else {
         ## may be a method call for a primitive; not available as .Method
-        f <- as.character(mcall[[1L]])
-        fdef <- genericForPrimitive(f)
+        if (is.primitive(mcall[[1L]])) {
+            f <- .primname(mcall[[1L]])
+        } else {
+            f <- as.character(mcall[[1L]])
+        }
+        fdef <- genericForBasic(f)
         ## check that this could be a basic function with methods
         if(is.null(fdef))
             stop(gettextf("a call to callNextMethod() appears in a call to %s, but the call does not seem to come from either a generic function or another 'callNextMethod'",
@@ -94,6 +99,8 @@ callNextMethod <- function(...) {
     else
         stop(gettextf("bad object found as method (class %s)",
                       dQuote(class(method))), domain = NA)
+    if (is.null(nextMethod))
+        stop("No next method available")
     subsetCase <- !is.na(match(f, .BasicSubsetFunctions))
     if(nargs()>0) {
       call <- sys.call()
@@ -113,22 +120,25 @@ callNextMethod <- function(...) {
                if(is.na(i) || i > length(call))
                    length(fnames) <- length(call)
                else {
-                   i <- i-1
+                   i <- i-1L
                    length(fnames) <- i
                    fnames <- c(fnames, rep("", length(call) - i))
                }
+               if (substring(f, nchar(f)-1L) == "<-")
+                   fnames[length(fnames)] <- "value"
                names(call) <- fnames
                call <- as.call(call)
            }
         }
         else
-            call <- match.call(method, mcall, expand.dots = FALSE)
+            call <- match.call(methodFun, mcall, expand.dots = FALSE,
+                               envir = dotsenv)
         .Call(C_R_nextMethodCall, call, callEnv)
     }
 }
 
-loadMethod <- function(method, fname, envir)
-    method
+## Skeleton for the generic in ./MethodsListClass.R :
+loadMethod <- function(method, fname, envir) method
 
 .doSubNextCall <- function(call, method) {
     idrop <- match("drop", names(call))
@@ -144,7 +154,10 @@ loadMethod <- function(method, fname, envir)
     else {
         i <- i-1
         length(fnames) <- i
-        fnames <- c(fnames, rep("", length(call) - i))
+        cnames <- if (is.null(names(call)))
+                      rep("", length(call) - i)
+                  else tail(names(call), -i)
+        fnames <- c(fnames, cnames)
     }
     names(call) <- fnames
     if(hasDrop)
diff --git a/src/library/methods/R/RClassUtils.R b/src/library/methods/R/RClassUtils.R
index 9d63fd6..80679e6 100644
--- a/src/library/methods/R/RClassUtils.R
+++ b/src/library/methods/R/RClassUtils.R
@@ -1,7 +1,7 @@
 #  File src/library/methods/R/RClassUtils.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
-#  Copyright (C) 1995-2013 The R Core Team
+#  Copyright (C) 1995-2015 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
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 testVirtual <-
   ## Test for a Virtual Class.
@@ -31,7 +31,7 @@ testVirtual <-
             return(TRUE)
         ## does the class extend a known non-virtual class?
         for(what in en) {
-            enDef <- getClassDef(what, where)
+            enDef <- getClassDef(what, package=packageSlot(extends[[what]]))
             if(!is.null(enDef) && identical(enDef at virtual, FALSE))
                 return(FALSE)
         }
@@ -62,7 +62,7 @@ makePrototypeFromClassDef <-
     snames <- names(slots)
     ## try for a single superclass that is not virtual
     supers <- names(extends)
-    virtual <- NA
+##    virtual <- NA
     dataPartClass <- elNamed(slots, ".Data")
     prototype <- ClassDef at prototype
     dataPartDone <- is.null(dataPartClass)  || is(prototype, dataPartClass)# don't look for data part in supreclasses
@@ -81,18 +81,18 @@ makePrototypeFromClassDef <-
         exti <- extends[[i]]
         if(identical(exti at simple, FALSE))
             next ## only simple contains rel'ns give slots
-        if(identical(what, "VIRTUAL"))
+        if(identical(what, "VIRTUAL")) {
             ## the class is virtual, and the prototype usually NULL
-            virtual <- TRUE
-        else if(isClass(what, where = where)) {
-            cli <- getClass(what, where = where)
+##            virtual <- TRUE
+        } else if(isClass(what, where=packageSlot(exti))) {
+            cli <- getClassDef(what, package=packageSlot(exti))
             slotsi <- names(cli at slots)
             pri <- cli at prototype
             ## once in a while
             if(is.null(prototype)) {
                 prototype <- pri
                 pnames <- names(attributes(prototype))
-                fromClass <- what
+##                fromClass <- what
             }
             else if(length(slots)) {
                 for(slotName in slotsi) {
@@ -170,7 +170,7 @@ makePrototypeFromClassDef <-
                          paste(extra, collapse=", ")),
                 domain = NA)
     ## now check the elements of the prototype against the class definition
-    slotDefs <- getSlots(ClassDef); slotNames <- names(slotDefs)
+    slotDefs <- ClassDef at slots; slotNames <- names(slotDefs)
     pnames <- names(attributes(prototype))
     pnames <- pnames[!is.na(match(pnames, slotNames))]
     check <- rep.int(FALSE, length(pnames))
@@ -224,9 +224,9 @@ completeClassDefinition <-
     properties <- ClassDef at slots
     prototype <- makePrototypeFromClassDef(properties, ClassDef, immediate, where)
     virtual <- ClassDef at virtual
-    validity <- ClassDef at validity
-    access <- ClassDef at access
-    package <- ClassDef at package
+#    validity <- ClassDef at validity
+#    access <- ClassDef at access
+#    package <- ClassDef at package
     extends    <- if(doExtends) completeExtends   (ClassDef, where = where) else ClassDef at contains
     subclasses <- if(doExtends) completeSubclasses(ClassDef, where = where) else ClassDef at subclasses
     if(is.na(virtual))
@@ -255,9 +255,9 @@ completeClassDefinition <-
 
 .completeClassSlots <- function(ClassDef, where) {
         properties <- ClassDef at slots
-        simpleContains <- ClassDef at contains
-        Class <- ClassDef at className
-        package <- ClassDef at package
+##        simpleContains <- ClassDef at contains
+##        Class <- ClassDef at className
+##        package <- ClassDef at package
         ext <- getAllSuperClasses(ClassDef, TRUE)
         ## ext has the names of all the direct and indirect superClasses but NOT those that do
         ## an explicit coerce (we can't conclude anything about slots, etc. from them)
@@ -317,11 +317,9 @@ completeClassDefinition <-
             }
         }
         if(any(undefClasses))
-            warning(gettextf("undefined slot classes in definition of %s: %s",
+            warning(sprintf(gettext("undefined slot classes in definition of %s: %s", domain = "R-methods"),
                              .dQ(ClassDef at className),
-                             paste(names(properties)[undefClasses], "(class ",
-                                   .dQ(unlist(properties, recursive = FALSE)[undefClasses]),
-                                   ")", collapse = ", ", sep = "")),
+                             paste0(names(properties)[undefClasses], gettextf("(class %s)", .dQ(unlist(properties, recursive = FALSE)[undefClasses])), collapse = ", ")),
                     call. = FALSE, domain = NA)
         ClassDef at slots <- properties
         ClassDef
@@ -335,7 +333,7 @@ completeClassDefinition <-
     else {
         prev <- slot(ClassDef, slotName)
         if(length(prev)) {
-            indir <- sapply(prev, .isIndirectExtension)
+            indir <- vapply(prev, .isIndirectExtension, NA)
             slot(ClassDef, slotName) <- slot(ClassDef, slotName)[!indir]
         }
         ClassDef
@@ -346,14 +344,13 @@ completeClassDefinition <-
     is(object, "SClassExtension") && length(object at by) > 0
 }
 
-.mergeSlots <- function(classDef1, classDef2) {
-
-}
+## .mergeSlots <- function(classDef1, classDef2) {
+## }
 
 .directSubClasses <- function(ClassDef) {
     ## no checks for input here:
     if(length(sc <- ClassDef at subclasses)) {
-        names(sc)[sapply(sc, function(cc) cc at distance == 1L)]
+        names(sc)[vapply(sc, function(cc) cc at distance == 1L, NA)]
     } ## else NULL
 }
 
@@ -461,8 +458,8 @@ selectSuperClasses <-
     addCond <- function(xpr, prev)
         if(length(prev)) substitute(P && N, list(P = prev, N = xpr)) else xpr
     C <- if(dropVirtual) {
-        ## NB the default 'where' in getClass() may depend on specific superClass:
-        isVirtualExt <- function(x) getClass(x at superClass)@virtual
+             isVirtualExt <- function(x)
+                 getClassDef(x at superClass, package=packageSlot(x))@virtual
         quote(!isVirtualExt(exti))
     } else expression()
     if(directOnly) C <- addCond(quote(length(exti at by) == 0), C)
@@ -480,8 +477,11 @@ inheritedSlotNames <- function(Class, where = topenv(parent.frame()))
         Class at contains
     else if(isClass(Class, where = where))
         getClass(Class, where = where)@contains
-    supcl <- .selectSuperClasses(ext) ## maybe  simpleOnly = FALSE or use as argument?
-    unique(unlist(lapply(lapply(supcl, getClassDef), slotNames), use.names=FALSE))
+    supcl <- .selectSuperClasses(ext, namesOnly=FALSE) ## maybe  simpleOnly = FALSE or use as argument?
+    supdefs <- lapply(supcl, function(s) {
+        getClassDef(s at superClass, package=packageSlot(s))
+    })
+    unique(unlist(lapply(supdefs, slotNames), use.names=FALSE))
     ## or just the non-simplified part (*with* names):
     ##     lapply(sapply(supcl, getClassDef, simplify=FALSE), slotNames)
 }
@@ -711,7 +711,7 @@ reconcilePropertiesAndPrototype <-
                                 dQuote(elNamed(properties, ".Data")),
                                 dQuote(dataPartClass)),
                        domain = NA)
-              pslots <- NULL
+##              pslots <- NULL
               if(is.null(prototype)) {
                   if(dataPartValue)
                       prototype <- newObject
@@ -755,8 +755,7 @@ reconcilePropertiesAndPrototype <-
       }
       ## check for conflicts in the slots
       allProps <- properties
-      for(i in seq_along(superClasses)) {
-          cl <- superClasses[[i]]
+      for(cl in superClasses) {
           clDef <- getClassDef(cl, where)
           if(is(clDef, "classRepresentation")) {
               theseProperties <- getSlots(clDef)
@@ -938,9 +937,9 @@ showExtends <-
             if(!eli at simple) {
                 if(is.function(eli at test) && !identical(body(eli at test), TRUE)) {
                     how[i] <-
-                        paste(how[i], if(is.function(eli at coerce))
+                        paste0(how[i], if(is.function(eli at coerce))
                               ", with explicit test and coerce" else
-                              ", with explicit test", sep="")
+                              ", with explicit test")
                 }
                 else if(is.function(eli at coerce))
                     how[i] <- paste0(how[i], ", with explicit coerce")
@@ -980,38 +979,28 @@ possibleExtends <- function(class1, class2, ClassDef1, ClassDef2)
 {
     if(.identC(class1[[1L]], class2) || .identC(class2, "ANY"))
         return(TRUE)
-    ext <- TRUE # may become a list of extends definitions
     if(is.null(ClassDef1)) # class1 not defined
         return(FALSE)
     ## else
     ext <- ClassDef1 at contains
-    nm1 <- names(ext)
-    i <- match(class2, nm1)
-    if(is.na(i)) {
-        ## look for class1 in the known subclasses of class2
-        if(!is.null(ClassDef2)) {
-            ext <- ClassDef2 at subclasses
-            ## check for a classUnion definition, not a plain "classRepresentation"
-            if(!.identC(class(ClassDef2), "classRepresentation") &&
-               isClassUnion(ClassDef2))
-                ## a simple TRUE iff class1 or one of its superclasses belongs to the union
-		i <- as.logical(anyDuplicated(c(class1, unique(nm1),
-						names(ext))))
-            else {
-                ## class1 could be multiple classes here.
-                ## I think we want to know if any extend
-                i <- match(class1, names(ext))
-                ii <- i[!is.na(i)]
-                i <- if(length(ii))  ii[1L] else i[1L]
-            }
-        }
+    if(!is.null(contained <- ext[[class2]]))
+	contained
+    else if (is.null(ClassDef2))
+	FALSE
+    else { ## look for class1 in the known subclasses of class2
+	subs <- ClassDef2 at subclasses
+	## check for a classUnion definition, not a plain "classRepresentation"
+	if(!.identC(class(ClassDef2), "classRepresentation") && isClassUnion(ClassDef2))
+	    ## a simple TRUE iff class1 or one of its superclasses belongs to the union
+	    any(c(class1, names(ext)) %in% names(subs))
+	else {
+	    ## class1 could be multiple classes here.
+	    ## I think we want to know if any extend
+	    i <- match(class1, names(subs))
+	    i <- i[!is.na(i)]
+	    if(length(i)) subs[[ i[1L] ]] else FALSE
+	}
     }
-    if(is.na(i))
-        FALSE
-    else if(is.logical(i))
-        i
-    else
-        el(ext, i)
 }
 
   ## complete the extends information in the class definition, by following
@@ -1087,7 +1076,7 @@ completeSubclasses <-
         for(i in seq_along(contains)) {
             obji <- contains[[i]]
             cli <- contains[[i]]@superClass
-            cliDef <- getClassDef(cli, where)
+            cliDef <- getClassDef(cli, package=packageSlot(obji))
             ## don't override existing relations
             ## TODO:  have a metric that picks the "closest" relationship
             if(!extends(classDef2, cliDef))
@@ -1112,8 +1101,8 @@ completeSubclasses <-
     what <- names(ext)
     for(i in seq_along(ext)) { # note that this loops only over the original ext
         by <- what[[i]]
-        if(isClass(by, where = where)) {
-            byDef <- getClass(by, where = where)
+        if(isClass(by, where = packageSlot(ext[[i]]))) {
+            byDef <- getClassDef(by, package=packageSlot(ext[[i]]))
             exti <-  slot(byDef, slotName)
             coni <- attr(exti, "conflicts") # .resolveSuperclasses makes this
             if(superClassCase && length(coni) > 0) {
@@ -1165,7 +1154,7 @@ completeSubclasses <-
         ext <- ext[ok]
     }
     ## require superclasses to be sorted by distance
-    distOrder <- sort.list(sapply(ext, function(x)x at distance))
+    distOrder <- sort.list(vapply(ext, function(x) x at distance, 1))
     ext <- ext[distOrder]
     if(superClassCase && (anyDuplicated(what) || length(conflicts) > 0))
         ext <- .resolveSuperclasses(ClassDef, ext, where, conflicts)
@@ -1178,8 +1167,9 @@ completeSubclasses <-
     for(i in seq_along(ext)) {
         by <- what[[i]]
         ## report only the direct superclass from which inconsistencies are inherited
-        if(identical(ext[[i]]@distance, 1) && isClass(by, where = where)) {
-            byDef <- getClass(by, where = where)
+        wherei <- packageSlot(ext[[i]])
+        if(identical(ext[[i]]@distance, 1) && isClass(by, where = wherei)) {
+            byDef <- getClassDef(by, package=wherei)
             exti <-  byDef at contains
             coni <- attr(exti, "conflicts") # .resolveSuperclasses makes this
             if( length(coni) > 0) {
@@ -1204,7 +1194,7 @@ completeSubclasses <-
 .resolveSuperclasses <- function(classDef, ext, where, conflicts = attr(ext, "conflicts")) {
   ## find conditional extensions, ignored in superclass ordering
   .condExts <- function(contains)
-      sapply(contains, function(x) is(x, "conditionalExtension" ))
+      vapply(contains, function(x) is(x, "conditionalExtension" ), NA)
   .noncondExtsClass <- function(cl) {
     if(isClass(cl, where = where) ) {
       contains <- getClass(cl, where = where)@contains
@@ -1230,7 +1220,7 @@ completeSubclasses <-
       }
       ## else, go on with conditionals eliminated
     }
-    directSupers <- sapply(classDef at contains, function(x) identical(x at distance, 1))
+    directSupers <- vapply(classDef at contains, function(x) identical(x at distance, 1), NA)
     directSupers <- unique(names(classDef at contains[directSupers]))
     ## form a list of the superclass orderings of the direct superclasses
     ## to check consistency with each way to eliminate duplicates
@@ -1297,7 +1287,12 @@ requireMethods <-
         method <- getMethod(f, optional = TRUE)
         if(!is.function(method))
             method <- getGeneric(f, where = where)
-        body(method) <- substitute(stop(methods:::.missingMethod(FF, MESSAGE, if(exists(".Method")).Method else NULL), domain=NA), list(FF=f, MESSAGE=message))
+        ## this is not eval()ed in this namespace
+	body(method) <-
+            substitute(stop(methods:::.missingMethod(FF, MESSAGE,
+                                                     if(exists(".Method")) .Method),
+                            domain = NA),
+                       list(FF = f, MESSAGE = message))
         environment(method) <- .GlobalEnv
         setMethod(f, signature, method, where = where)
     }
@@ -1514,7 +1509,7 @@ setDataPart <- function(object, value, check = TRUE) {
 }
 
 .transitiveSubclasses <- function(by, to, toExt, moreExts, strictBy) {
-    what <- names(moreExts)
+##    what <- names(moreExts)
 ###    if(!strictBy) message("Subclasses: ",by, ": ", paste(what, collapse = ", "))
     for(i in seq_along(moreExts)) {
         byExt <- moreExts[[i]]
@@ -1529,10 +1524,9 @@ setDataPart <- function(object, value, check = TRUE) {
         ## construct the composite coerce method, taking into account the strict=
         ## argument.
         f <- toExt at coerce
-        fR <- toExt at replace
-            toExpr <- body(f)
-            fBy <- byExt at coerce
-            byExpr <- body(fBy)
+	toExpr <- body(f)
+	fBy <- byExt at coerce
+	byExpr <- body(fBy)
         ## if both are simple extensions, so is the composition
         if(byExt at simple && toExt at simple) {
             expr <- (if(byExt at dataPart)
@@ -1572,14 +1566,26 @@ setDataPart <- function(object, value, check = TRUE) {
         f <- byExt at replace
         byExpr <- body(f)
         if(!strictBy) {
-            toDef <- getClassDef(to)
-            byDef <- getClassDef(by)
+            toDef <- getClassDef(to, package=packageSlot(toExt))
+            byDef <- getClassDef(by, package=packageSlot(byExt))
             strictBy <- is.null(toDef) || is.null(byDef) || toDef at virtual || byDef at virtual
         }
-        ## Is there a danger of infinite loop below?
-        expr <- substitute({.value <- as(from, BY, STRICT); as(.value, TO) <- value; value <- .value; BYEXPR},
-                           list(BY=by, TO = to, BYEXPR = byExpr, STRICT = strictBy))
-        body(f, envir = environment(f)) <- expr
+        if (isVirtualClass(by, .requirePackage(packageSlot(byExt)))) {
+            skipDef <- getClassDef(by, package=packageSlot(byExt))
+            skipExt <- skipDef at contains[[to]]
+            if (!is.null(skipExt)) {
+                body(f, envir = environment(f)) <-
+                    call("as", body(skipExt at replace), byExt at subClass)
+            }
+        } else {
+            expr <- substitute({
+                .value <- as(from, BY, STRICT)
+                as(.value, TO) <- value
+                value <- .value
+                BYEXPR
+            }, list(BY=by, TO = to, BYEXPR = byExpr, STRICT = strictBy))
+            body(f, envir = environment(f)) <- expr
+        }
         toExt at replace <- f
         toExt at by <- toExt at subClass
         toExt at subClass <- byExt at subClass
@@ -1785,15 +1791,17 @@ substituteFunctionArgs <-
 ..requirePackage <- function(package, mustFind = TRUE) {
     value <- package
     if(nzchar(package)) {
-        if(package %in% loadedNamespaces())
+        ## lookup as lightning fast as possible:
+	if (.Internal(exists(package, .Internal(getNamespaceRegistry()),
+			     "any", FALSE)))
             value <- getNamespace(package)
         else {
             if(identical(package, ".GlobalEnv"))
                 return(.GlobalEnv)
             if(identical(package, "methods"))
                 return(topenv(parent.frame())) # booting methods
-            if(exists(package, envir = .PackageEnvironments, inherits = FALSE))
-                return(get(package, envir = .PackageEnvironments)) #cached, but only if no namespace
+            if(!is.null(pkg <- .PackageEnvironments[[package]]))
+                return(pkg) #cached, but only if no namespace
         }
     }
     if(is.environment(value))
@@ -1801,8 +1809,8 @@ substituteFunctionArgs <-
     topEnv <- options()$topLevelEnvironment
     if(is.null(topEnv))
         topEnv <- .GlobalEnv
-    if(exists(".packageName", topEnv, inherits=TRUE) &&
-       .identC(package, get(".packageName", topEnv)))
+    if(!is.null(pkgN <- get0(".packageName", topEnv, inherits=TRUE)) &&
+       .identC(package, pkgN))
         return(topEnv) # kludge for source'ing package code
     if(nzchar(package) && require(package, character.only = TRUE)) {}
     else {
@@ -1828,7 +1836,7 @@ substituteFunctionArgs <-
         .GlobalEnv
     else {
         ##FIXME:  the paste should not be needed
-        pkg <- paste("package", package, sep=":")
+        pkg <- paste0("package:", package)
         ## need to allow for versioned installs: prefer exact match.
         m <- charmatch(pkg, search())
         if(is.na(m)) # not attached, better be an available namespace
@@ -1917,6 +1925,7 @@ substituteFunctionArgs <-
 ## See .cacheGeneric, etc. for analogous computations for generics
 .classTable <- new.env(TRUE, baseenv())
 assign("#HAS_DUPLICATE_CLASS_NAMES", FALSE, envir = .classTable)
+## FIXME We've seen duplicated classes in .classTable
 .duplicateClassesExist <- function(on) {
     value <- get("#HAS_DUPLICATE_CLASS_NAMES", envir = .classTable)
     if(nargs())
@@ -1927,35 +1936,36 @@ assign("#HAS_DUPLICATE_CLASS_NAMES", FALSE, envir = .classTable)
 .cacheClass <- function(name, def, doSubclasses = FALSE, env) {
     if(!identical(doSubclasses, FALSE))
       .recacheSubclasses(def at className, def, doSubclasses, env)
-    if(exists(name, envir = .classTable, inherits = FALSE)) {
-        newpkg <- def at package
-        prev <- get(name, envir = .classTable)
-        if(is(prev, "classRepresentation")) {
-            if(identical(prev, def))
-               return()
-            pkg <- prev at package # start a per-package list
-            if(identical(pkg, newpkg)) { # redefinition
-                ## cache for S3, to override possible previous cache
-                base:::.cache_class(name, .extendsForS3(def))
-##                base:::.cache_class(name, extends(def))
-                return(assign(name, def, envir = .classTable))
-            }
-            else if(.simpleDuplicateClass(def, prev))
-                return()
-            prev <- list(prev)
-            names(prev) <- pkg
-        }
-        i <- match(newpkg, names(prev))
-        if(is.na(i))
-           prev[[newpkg]] <- def
-        else if(identical(def, prev[[i]]))
-          return()
-        else
-            prev[[i]] <- def
-        def <- prev
-        .duplicateClassesExist(TRUE)
-    }
-    assign(name, def, envir = .classTable)
+    if(!is.null(prev <- .classTable[[name]])) {
+	newpkg <- def at package
+	if(is(prev, "classRepresentation")) {
+	    if(identical(prev, def))
+		return()
+	    pkg <- prev at package # start a per-package list
+	    if(identical(pkg, newpkg)) { # redefinition
+		## cache for S3, to override possible previous cache
+		.cache_class(name, .extendsForS3(def))
+		return(.classTable[[name]] <- def)
+	    }
+	    else if(.simpleDuplicateClass(def, prev))
+		return()
+	    prev <- list(prev)
+	    names(prev) <- pkg
+	}
+	## now  prev  is a named list of class definitions (>= 1),
+	## where the names are names of packages (rather: namespaces)
+	i <- match(newpkg, names(prev))
+	if(is.na(i))
+	    prev[[newpkg]] <- def
+	else if(identical(def, prev[[i]]))
+	    return()
+	else # replace previous
+	    prev[[i]] <- def
+	def <- prev
+	if(length(def) > 1L)
+	    .duplicateClassesExist(TRUE)
+    }
+    .classTable[[name]] <- def # return()s invisibly
 }
 
 ## test for identical def, prev class definitions
@@ -1967,17 +1977,11 @@ assign("#HAS_DUPLICATE_CLASS_NAMES", FALSE, envir = .classTable)
     if(length(supers) != length(prevSupers) ||
        any(is.na(match(supers, prevSupers))))
         return(FALSE)
-    warnLevel <- getOption("warn")
+    verbose <- getOption("verbose")
     S3 <- "oldClass" %in% supers
     if(S3) {
         ## it is possible one  of these is inconsistent, but unlikely
-        ## and we will get here often from multiple setOldClass(...)'s
-        if(warnLevel)
-            message(gettextf("Note: the specification for S3 class %s in package %s seems equivalent to one from package %s: not turning on duplicate class definitions for this class.",
-                             dQuote(def at className),
-                             sQuote(def at package),
-                             sQuote(prev at package)),
-                    domain = NA)
+        ## and S3 class attributes have no package so duplicates are useless
         return(TRUE)
     }
     ## if there are already duplicate classes, we check duplicates
@@ -1986,7 +1990,7 @@ assign("#HAS_DUPLICATE_CLASS_NAMES", FALSE, envir = .classTable)
     if(dupsExist) {
         dups <- match(supers, multipleClasses(), 0) > 0
         if(any(dups)) {
-            if(warnLevel)
+            if(verbose)
                 message(gettextf("Note: some superclasses of class %s in package %s have duplicate definitions.  This definition is not being treated as equivalent to that from package %s",
                                  dQuote(def at className),
                                  sQuote(def at package),
@@ -2011,7 +2015,7 @@ assign("#HAS_DUPLICATE_CLASS_NAMES", FALSE, envir = .classTable)
               as.character(packageSlot(prevWhat)))))
             return(FALSE)
     }
-    if(warnLevel)
+    if(verbose)
         message(gettextf("Note: the specification for class %s in package %s seems equivalent to one from package %s: not turning on duplicate class definitions for this class.",
                          dQuote(def at className),
                          sQuote(def at package),
@@ -2021,48 +2025,76 @@ assign("#HAS_DUPLICATE_CLASS_NAMES", FALSE, envir = .classTable)
 }
 
 .uncacheClass <- function(name, def) {
-    if(exists(name, envir = .classTable, inherits = FALSE)) {
+    if(!is.null(prev <- .classTable[[name]])) {
         if(is(def, "classRepresentation")) # paranoia: should only be called this way
             newpkg <- def at package
         else
             newpkg <- ""
-        prev <- get(name, envir = .classTable)
-        if(is(prev, "classRepresentation") &&
-           identical(prev at package, newpkg) )
+        if(is(prev, "classRepresentation") && identical(prev at package, newpkg) )
             return(remove(list = name, envir = .classTable))
-         i <- match(newpkg, names(prev))
+        i <- match(newpkg, names(prev))
         if(!is.na(i))
-           prev[[i]] <- NULL
+            prev[[i]] <- NULL
         else # we might warn about unchaching more than once
-          return()
+            return()
         if(length(prev) == 0L)
-          return(remove(list = name, envir = .classTable))
+            return(remove(list = name, envir = .classTable))
         else if(length(prev) == 1L)
-          prev <- prev[[1L]]
+            prev <- prev[[1L]]
         assign(name, prev, envir  = .classTable)
     }
 }
 
-## the workhorse of class access
+## .getClassesFromCache() and .resolveClassList()
+## are the workhorses of class access
 ## The underlying C code will return name if it is not a character vector
 ## in the assumption this is a classRepresentation or subclass of that.
 ## In principle, this could replace the checks on class(name) in getClassDef
 ## and new(), which don't work for subclasses of classRepresentation anyway.
-.getClassFromCache <- function(name, where) {
-	value <- .Call(C_R_getClassFromCache, name, .classTable)
-	if(is.list(value)) { ## multiple classes with this name
-	    pkg <- packageSlot(name)
-	    if(is.null(pkg))
-		pkg <- if(is.character(where)) where else getPackageName(where, FALSE) # may be ""
+.getClassesFromCache <- function(name) {
+    .Call(C_R_getClassFromCache, name, .classTable)
+}
+
+## When .simpleGetClassFromCache returns a list, pick the most appropriate
+.resolveClassList <- function(value, where, package, resolve.confl = "first",
+                              resolve.msg = TRUE)
+{
+    if(is.null(package))
+        package <- if(is.character(where)) where
+                   else getPackageName(where, FALSE) # may be ""
 	    pkgs <- names(value)
-	    i <- match(pkg, pkgs, 0L)
-	    if(i == 0L) ## try 'methods':
+	    i <- match(package, pkgs, 0L)
+	    if(i == 0L && package != "methods") ## try 'methods':
 		i <- match("methods", pkgs, 0L)
-	    if(i > 0L) value[[i]]
-            else NULL
+	    if(i > 0L)
+                value[[i]]
+	    else { ## still NULL -- but we *do* want to return one of the class definitions!
+		switch(resolve.confl,
+		       "none" = NULL,
+		       "first" = {
+			   if(resolve.msg) {
+			       message(gettextf(
+				"Found more than one class \"%s\" in cache; using the first, from namespace '%s'",
+                           value[[1]]@className, pkgs[1]), domain=NA)
+                               message("Also defined by ",
+                                       paste(sQuote(pkgs[-1]), collapse = " "))
+                           }
+			   value[[1]]
+		       },
+		       "all" = value) # return all, a list
+	    }
 	}
-	else #either a class definition or NULL
-	    value
+
+.getClassFromCache <- function(name, where, package = packageSlot(name),
+                               resolve.confl = "first", resolve.msg = TRUE)
+{
+    value <- .getClassesFromCache(name)
+    if(is.list(value)) {
+        ## multiple classes with this name -- choose at most one
+        value <- .resolveClassList(value, where, package, resolve.confl,
+                                   resolve.msg)
+    }
+    value
 }
 
 ### insert superclass information into all the subclasses of this
@@ -2073,7 +2105,9 @@ assign("#HAS_DUPLICATE_CLASS_NAMES", FALSE, envir = .classTable)
     subNames <- names(subs)
     for(i in seq_along(subs)) {
         what <- subNames[[i]]
-        subDef <- getClassDef(what, env)
+        subDef <- getClassDef(what, package=packageSlot(subs[[i]]))
+        if(is.null(subDef))
+            subDef <- getClassDef(what, env) # may be the case for members of a classUnion
         if(is.null(subDef))
             warning(gettextf("undefined subclass %s of class %s; definition not updated",
                              .dQ(what), .dQ(def at className)))
@@ -2081,7 +2115,7 @@ assign("#HAS_DUPLICATE_CLASS_NAMES", FALSE, envir = .classTable)
             ## insert the new superclass to maintain order by distance
             cntns <- subDef at contains
             cntns[[class]] <- subs[[i]]
-            cntns <- cntns[sort.list(sapply(cntns, function(x)x at distance))]
+            cntns <- cntns[sort.list(vapply(cntns, function(x) x at distance, 1))]
             subDef at contains <- cntns
             .cacheClass(what, subDef, FALSE, env)
         }
@@ -2135,10 +2169,11 @@ assign("#HAS_DUPLICATE_CLASS_NAMES", FALSE, envir = .classTable)
     if(length(classDef at contains)) {
         superclasses <- names(classDef at contains)
         for(what in superclasses) {
-            cdef <- .getClassFromCache(what)
-            ## TODO:  handle the case of multiple packages with this class
-            if(is(cdef, "classRepresentation"))
-                .removeSubClass(what, Class, cdef)
+            cdef <- .getClassFromCache(what, classWhere, resolve.confl = "all")
+	    if(is(cdef, "classRepresentation"))
+		.removeSubClass(what, Class, cdef)
+	    else if(is.list(cdef))
+		lapply(cdef, function(cl) .removeSubClass(what, Class, cl))
         }
     }
     NULL
@@ -2166,8 +2201,7 @@ assign("#HAS_DUPLICATE_CLASS_NAMES", FALSE, envir = .classTable)
         if(pos) {
             penv <- as.environment(pname)
             cmeta <- classMetaName(class)
-            if(exists(cmeta, envir = penv, inherits = FALSE)) {
-                cdefp <- get(cmeta, envir = penv)
+            if(!is.null(cdefp <- penv[[cmeta]])) {
                 if(subclass %in% names(cdefp at subclasses)) {
                     newdef <- .deleteSubClass(cdefp, subclass)
                     if(!is.null(newdef)) {
@@ -2177,7 +2211,7 @@ assign("#HAS_DUPLICATE_CLASS_NAMES", FALSE, envir = .classTable)
                         if(bindingIsLocked(cmeta, penv))
                             .assignOverBinding(cmeta, newdef, penv, FALSE)
                         else
-                            assign(cmeta, newdef, envir = penv)
+                            penv[[cmeta]] <- newdef
                     }
                 }
             }
@@ -2206,7 +2240,7 @@ assign("#HAS_DUPLICATE_CLASS_NAMES", FALSE, envir = .classTable)
 ## remove superclass from  definition of class in the cache & in environments
 ## on search list
 .removeSuperClass <- function(class, superclass) {
-    cdef <- .getClassFromCache(class, where)
+    cdef <- getClassDef(class)
     if(is.null(cdef)) {}
     else {
         newdef <- .deleteSuperClass(cdef, superclass)
@@ -2221,8 +2255,7 @@ assign("#HAS_DUPLICATE_CLASS_NAMES", FALSE, envir = .classTable)
     evv <- findClass(class, .GlobalEnv) # what about hidden classes?  how to find them?
     mname <- classMetaName(class)
     for(where in evv) {
-        if(exists(mname, envir = where, inherits = FALSE)) {
-            cdef <- get(mname, envir = where)
+        if(!is.null(cdef <- where[[mname]])) {
             newdef <- .deleteSuperClass(cdef, superclass)
             if(!is.null(newdef)) {
               assignClassDef(class, newdef,  where, TRUE)
@@ -2234,17 +2267,17 @@ assign("#HAS_DUPLICATE_CLASS_NAMES", FALSE, envir = .classTable)
 }
 
 .deleteSuperClass <- function(cdef, superclass) {
-        superclasses <- cdef at contains
-        ii <- match(superclass, names(superclasses), 0)
-        if(ii > 0) {
-            cdef at contains <- superclasses[-ii]
-            for(subclass in names(cdef at subclasses))
-              .removeSuperClass(subclass, superclass)
-            cdef
-        }
-        else
-          NULL
+    superclasses <- cdef at contains
+    ii <- match(superclass, names(superclasses), 0L)
+    if(ii) {
+	cdef at contains <- superclasses[-ii]
+	for(subclass in names(cdef at subclasses))
+	    .removeSuperClass(subclass, superclass)
+	cdef
     }
+    else
+	NULL
+}
 
 classesToAM <- function(classes, includeSubclasses = FALSE,
                         abbreviate = 2) {
@@ -2274,9 +2307,9 @@ classesToAM <- function(classes, includeSubclasses = FALSE,
   if(length(abbr) != 1 || is.na(abbr))
     stop("argument 'abbreviate' must be 0, 1, 2, or 3")
   if(abbr %% 2)
-    dimnames(value)[[1]] <- base::abbreviate(dimnames(value)[[1]])
+    dimnames(value)[[1]] <- abbreviate(dimnames(value)[[1]])
   if(abbr %/% 2)
-    dimnames(value)[[2]] <- base::abbreviate(dimnames(value)[[2]])
+    dimnames(value)[[2]] <- abbreviate(dimnames(value)[[2]])
   value
 }
 
@@ -2285,7 +2318,7 @@ classesToAM <- function(classes, includeSubclasses = FALSE,
         superclasses <- names(extensions)
         edges <- numeric()
         for(what in superclasses) {
-            whatDef <- getClassDef(what)
+            whatDef <- getClassDef(what, package=packageSlot(extensions[[what]]))
             ifrom <- match(what, nodes)
             if(is.null(whatDef) || is.na(ifrom))
               next
@@ -2355,36 +2388,31 @@ classesToAM <- function(classes, includeSubclasses = FALSE,
                               function(x,y)mapply(c,x,y, SIMPLIFY=FALSE))
     }
     ## check each way to make the list unique against each superclass extension
-    problems <- function(x,y) any(diff(match(y, x))<0)
+    problems <- function(x,y) any(diff(match(y, x)) < 0)
     possibles <- lapply(candidates, function(x, names)names[-x], names=allNames)
     ## the next could be vectorized, but here we choose instead to exit early.
     scores <- vector("list", length(possibles))
     for(i in seq_along(possibles)) {
-        score <- sapply(subNames, problems, x=possibles[[i]])
+        score <- vapply(subNames, problems, NA, x=possibles[[i]])
         scores[[i]] <- whichCase[score]
         if(!any(score))
           return(-candidates[[i]]+1)
     }
     # the first min. scoring possibility and its score
-    i <- which.min(sapply(scores, length))
+    i <- which.min(lengths(scores))
     list(-candidates[[i]]+1, scores[[i]])
 }
 
 .checkGeneric <- function(what, where) {
   .checkFun <-  function(x) {
-      maybe <- (if(exists(x, where)) {
-        f <- get(x, where)
-        is.function(f)
-      }
-      else
-        FALSE)
+      maybe <- if(!is.null(f <- get0(x, where))) is.function(f) else FALSE
       if(maybe)
         maybe <- is(f, "genericFunction") ||
               (length(grep("UseMethod", deparse(f))) > 0) ||
               is.primitive(f)
       maybe
     }
-  sapply(what, .checkFun)
+  vapply(what, .checkFun, NA)
 }
 
 
@@ -2395,7 +2423,7 @@ S3forS4Methods <- function(where, checkClasses = character()) {
   if(length(allClasses) == 0)
     return(allClasses)
   pattern <- paste0("([.]",allClasses, "$)", collapse="|")
-  allObjects <- objects(where, all.names = TRUE)
+  allObjects <- names(where)
   allObjects <- allObjects[-grep("^[.][_][_]", allObjects)] # remove meta data
   allObjects <- grep(pattern, allObjects, value = TRUE)
   if(length(allObjects) > 0) {
diff --git a/src/library/methods/R/RMethodUtils.R b/src/library/methods/R/RMethodUtils.R
index 73e7062..dabd358 100644
--- a/src/library/methods/R/RMethodUtils.R
+++ b/src/library/methods/R/RMethodUtils.R
@@ -1,7 +1,7 @@
 #  File src/library/methods/R/RMethodUtils.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
-#  Copyright (C) 1995-2013 The R Core Team
+#  Copyright (C) 1995-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
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 ## The real version of makeGeneric, to be installed after there are some
 ## generic functions to boot the definition (in particular, coerce and coerce<-)
@@ -47,12 +47,15 @@
             stop(gettextf("must supply either a generic function or a function as default for %s",
                           sQuote(f)),
                  domain = NA)
-        else if(is.primitive(fdefault)) {
-            return(genericForPrimitive(f))
+        else if(isBaseFun(fdefault)) {
+            fun <- genericForBasic(f)
+            if (is.function(fun)) {
+                return(fun)
+            }
         }
         fdef <- fdefault
         body(fdef) <- substitute(standardGeneric(NAME), list(NAME = f))
-        environment(fdef) <- .methodsNamespace
+        environment(fdef) <- asNamespace(package)
     }
     ## give the function a new environment, to cache methods later
     ev <- new.env()
@@ -96,7 +99,7 @@
         stop("no suitable arguments to dispatch methods in this function")
     attr(signature, "simpleOnly") <- simpleInheritanceOnly # usually NULL
     value at signature <- signature
-    name <- signature[[1L]]
+##    name <- signature[[1L]]
     if(is.null(fdefault))
         {} # pre 2.11.0: methods <- MethodsList(name)
     else {
@@ -104,10 +107,11 @@
         if(!identical(formalArgs(fdefault), formalArgs(fdef)) &&
            !is.primitive(fdefault))
             stop(sprintf(ngettext(length(fdef),
-                                  "the formal argument of the generic function for %s (%s) differs from that of the non-generic to be used as the default (%s)",
-                                  "the formal arguments of the generic function for %s (%s) differ from those of the non-generic to be used as the default (%s)"),
-                          paste(formalArgs(fdef), collapse = ", "),
-                          paste(formalArgs(fdefault), collapse = ", ")),
+	"the formal argument of the generic function for %s (%s) differs from that of the non-generic to be used as the default (%s)",
+	"the formal arguments of the generic function for %s (%s) differ from those of the non-generic to be used as the default (%s)"),
+			 f,
+			 paste(formalArgs(fdef), collapse = ", "),
+			 paste(formalArgs(fdefault), collapse = ", ")),
                  domain = NA)
         fdefault <- asMethodDefinition(fdefault, fdef = value)
         if(is(fdefault, "MethodDefinition"))
@@ -191,39 +195,28 @@ makeGeneric <-
     value
 }
 
-
+### FIXME: Not used by methods, but exposed through namespace. Deprecate?
 makeStandardGeneric <-
-  ## a utility function that makes a valid function calling standardGeneric for name f
-  ## Works (more or less) even if the actual definition, fdef, is not a proper function,
-  ## that is, it is a primitive or internal
+  ## a utility function that makes a valid function calling
+  ## standardGeneric for name f Works (more or less) even if the
+  ## actual definition, fdef, is not a proper function, that is, it is
+  ## a primitive or internal
   function(f, fdef)
 {
     fgen <- fdef
     body(fgen) <- substitute(standardGeneric(FNAME), list(FNAME=f))
     ## detect R specials and builtins:  these don't provide an argument list
     if(typeof(fdef) != "closure") {
-        ## Look in a list of pre-defined functions (and also of functions for which
-        ## methods are prohibited)
-        fgen <- genericForPrimitive(f)
-        if(identical(fgen, FALSE))
-            stop(gettextf("special function %s is not permitted to have methods",
-                          sQuote(f)),
-                 domain = NA)
-        if(is.null(fgen)) {
-            warning(gettextf("special function %s has no known argument list; will assume '(x, ...)'",
-                             sQuote(f)),
-                    domain = NA)
-            ## unknown
-            fgen <- function(x, ...) {}
-        }
-        else {
-            message(gettextf("making a generic for special function %s",
-                             sQuote(f)),
-                    domain = NA)
-            setPrimitiveMethods(f, fdef, "reset", fgen, NULL)
-        }
-        ## Note that the body of the function comes from the list.  In a few cases ("$"),
-        ## this body is not just a call to standardGeneric
+        ## Look in a list of pre-defined functions (and also of
+        ## functions for which methods are prohibited)
+        fgen <- genericForBasic(f)
+        message(gettextf("making a generic for special function %s",
+                         sQuote(f)),
+                domain = NA)
+        setPrimitiveMethods(f, fdef, "reset", fgen, NULL)
+        ## Note that the body of the function comes from the list.  In
+        ## a few cases ("$"), this body is not just a call to
+        ## standardGeneric
     }
     fgen
 }
@@ -240,8 +233,10 @@ generic.skeleton <- function(name, fdef, fdefault)
     }
     if(is.null(fdefault)) {
         fdefault <- fdef
-        body(fdefault) <- substitute(stop(MESSAGE, domain = NA), list(MESSAGE=
-                                                   gettextf("invalid call in method dispatch to '%s' (no default method)", name)))
+	msg <- gettextf("invalid call in method dispatch to '%s' (no default method)",
+			name)
+	body(fdefault) <- substitute(stop(MESSAGE, domain = NA),
+				     list(MESSAGE = msg))
         environment(fdefault) <- baseenv()
     }
     skeleton[[1L]] <- fdefault
@@ -265,19 +260,20 @@ mergeMethods <-
     ## and return the merged result.
     function(m1, m2, genericLabel = character())
 {
+    .MlistDeprecated("mergeMethods()")
     if(length(genericLabel) && is(m2, "MethodsList"))
         m2 <- .GenericInPrimitiveMethods(m2, genericLabel)
     if(is.null(m1) || is(m1, "EmptyMethodsList"))
         return(m2)
     tmp <- listFromMlist(m2)
-    sigs <- el(tmp, 1)
-    methods <- el(tmp, 2)
+    sigs <- tmp[[1]]
+    methods <- tmp[[2]]
     for(i in seq_along(sigs)) {
-        sigi <- el(sigs, i)
+        sigi <- sigs[[i]]
         if(.noMlists() && !identical(unique(sigi), "ANY"))
           next
         args <- names(sigi)
-        m1 <- insertMethod(m1, as.character(sigi), args, el(methods, i), FALSE)
+        m1 <- insertMethod(m1, as.character(sigi), args, methods[[i]], FALSE)
     }
     m1
 }
@@ -294,8 +290,7 @@ doPrimitiveMethod <-
     cat("called doPrimitiveMethod\n\n")
     ## Store a local version of function 'name' back where the current version was
     ## called.  Restore the previous state there on exit, either removing or re-assigning.
-    if(exists(name, envir=ev, inherits=FALSE)) {
-        prev <- get(name, envir=ev)
+    if(!is.null(prev <- ev[[name]])) {
         on.exit(assign(name, prev, envir = ev))
     }
     else
@@ -361,8 +356,7 @@ conformMethod <- function(signature, mnames, fnames,
         n <- n - 1L
     length(signature) <- n
     length(fsig) <- n
-    names(signature) <- fsig
-    signature
+    setNames(signature, fsig)
 }
 
 rematchDefinition <- function(definition, generic, mnames, fnames, signature)
@@ -404,9 +398,11 @@ rematchDefinition <- function(definition, generic, mnames, fnames, signature)
 	trailingArgs <- fnames[seq.int(to = length(fnames), length.out = ntrail)]
 	if(!identical(	mnames[seq.int(to = length(mnames), length.out = ntrail)],
 		      trailingArgs))
-	    stop(gettextf("arguments (%s) after '...' in the generic must appear in the method, in the same place at the end of the argument list",
-			  paste(trailingArgs, collapse=", ")),
-                 call. = TRUE, domain = NA)
+	    stop(gettextf("%s arguments (%s) after %s in the generic must appear in the method, in the same place at the end of the argument list",
+                          .renderSignature(generic at generic, signature),
+			  paste(sQuote(trailingArgs), collapse = ", "),
+                          sQuote("...")),
+                 call. = FALSE, domain = NA)
 	newCallNames <- character(length(newCall))
 	newCallNames[seq.int(to = length(newCallNames), length.out = ntrail)] <-
 	    trailingArgs
@@ -420,19 +416,25 @@ rematchDefinition <- function(definition, generic, mnames, fnames, signature)
     generic
 }
 
-unRematchDefinition <- function(definition)
+
+isRematched <- function(definition)
 {
-    ## undo the effects of rematchDefiniition, if it was used.
+    ## detect the effects of rematchDefinition, if it was used.
     ## Has the obvious disadvantage of depending on the implementation.
     ## If we considered the rematching part of the API, a cleaner solution
     ## would be to include the "as given to setMethod" definition as a slot
+
     bdy <- body(definition)
     if(.identC(class(bdy),"{") && length(bdy) > 1L) {
         bdy <- bdy[[2L]]
-        if(.identC(class(bdy), "<-") &&
-           identical(bdy[[2L]], as.name(".local")))
-            definition <- bdy[[3L]]
-    }
+        .identC(class(bdy), "<-") && identical(bdy[[2L]], as.name(".local"))
+    } else FALSE
+}
+
+unRematchDefinition <- function(definition)
+{
+    if(isRematched(definition))
+        definition <-  body(definition)[[2]][[3]] # value in assignmt to .local
     definition
 }
 
@@ -447,21 +449,16 @@ getGeneric <-
         if(is(f, "genericFunction"))
             return(f)
         else if(is.primitive(f))
-            return(genericForPrimitive(.primname(f)))
+            return(genericForBasic(.primname(f), mustFind=mustFind))
         else
             stop("argument 'f' must be a string, generic function, or primitive: got an ordinary function")
     }
     value <- if(missing(where))
-	.getGeneric(f, , package) else
-    .getGeneric(f, where, package)
-    if(is.null(value) && exists(f, envir = baseenv(), inherits = FALSE)) {
-        ## check for primitives
-        baseDef <- get(f, envir = baseenv())
-        if(is.primitive(baseDef)) {
-            value <- genericForPrimitive(f)
-            if(!is.function(value) && mustFind)
-                stop(gettextf("methods cannot be defined for the primitive function %s",
-                              sQuote(f)), domain = NA)
+		  .getGeneric(f,      , package)
+	     else .getGeneric(f, where, package)
+    if(is.null(value) && !is.null(baseDef <- baseenv()[[f]])) {
+        if(is.function(baseDef)) {
+            value <- genericForBasic(f, mustFind=FALSE)
             if(is(value, "genericFunction"))
                 value <- .cacheGeneric(f, value)
         }
@@ -470,20 +467,17 @@ getGeneric <-
         value
     else {
         if(nzchar(package) && is.na(match(package, c("methods", "base")))) {
-            ## try to load package, or attach it if necessary
-            ev <- tryCatch(loadNamespace(package), error = function(e)e)
-            if(is(ev, "error") &&
-               require(package, character.only =TRUE))
-                ev <- as.environment(paste("package",package,sep=":"))
-            if(is.environment(ev))
-                value <- .getGeneric(f, ev, package)
+            value <- tryCatch({
+                ## load package namespace or error
+                ev <- getNamespace(package)
+                .getGeneric(f, ev, package)
+            }, error = function(e) NULL)
         }
         if(is.function(value))
             value
         else if(mustFind)
             ## the C code will have thrown an error if f is not a single string
-            stop(gettextf("no generic function found for %s",
-                          sQuote(f)),
+            stop(gettextf("no generic function found for %s", sQuote(f)),
                  domain = NA)
         else
             NULL
@@ -495,10 +489,8 @@ getGeneric <-
                         package = "")
 {
     ## do not search the cache if getGeneric() was called with explicit where=
-    if(missing(where))
-        value <- .getGenericFromCache(f, where,  package)
-    else
-        value <- NULL
+    value <- if(missing(where))
+        .getGenericFromCache(f, where,  package) ## else NULL
     if(is.null(value)) {
         if(is.character(f) && f %in% "as.double") f <- "as.numeric"
         if(is.character(f) && !nzchar(f)) {
@@ -508,8 +500,8 @@ getGeneric <-
         value <- .Call(C_R_getGeneric, f, FALSE, as.environment(where), package)
         ## cache public generics (usually these will have been cached already
         ## and we get to this code for non-exported generics)
-        if(!is.null(value) && exists(f, .GlobalEnv) &&
-           identical(get(f, .GlobalEnv), value))
+        if(!is.null(value) && !is.null(vv <- .GlobalEnv[[f]]) &&
+           identical(vv, value))
             .cacheGeneric(f, value)
     }
     ##     if(is.null(value) && nzchar(package) && !identical(package, "base")) {
@@ -536,9 +528,8 @@ getGeneric <-
 .cacheGenericTable <- function(name, def, table)
 {
     fdef <- def
-    if(exists(name, envir = table, inherits = FALSE)) {
+    if(!is.null(prev <- table[[name]])) {
         newpkg <- def at package
-        prev <- get(name, envir = table)
         if(is.function(prev)) {
             if(identical(prev, def))
                 return(fdef)
@@ -546,7 +537,7 @@ getGeneric <-
             ##  fdef <- def <- .makeGenericForCache(def)
             pkg <- prev at package
             if(identical(pkg, newpkg)) { # redefinition
-                assign(name, def, envir = table)
+                table[[name]] <- def
                 return(fdef)
             }
             prev <- list(prev)          # start a per-package list
@@ -563,7 +554,7 @@ getGeneric <-
     }
 
     .getMethodsTable(fdef)              # force initialization
-    assign(name, def, envir = table)
+    table[[name]] <- def
     fdef
 }
 
@@ -594,10 +585,10 @@ getGeneric <-
 }
 
 .getGenericFromCache <- function(name, where,  pkg = "")
-   .getGenericFromCacheTable(name,where, pkg, .genericTable)
+   .getGenericFromCacheTable(name, where, pkg, .genericTable)
 
 .getImplicitGenericFromCache <- function(name, where,  pkg = "")
-   .getGenericFromCacheTable(name,where, pkg, .implicitTable)
+   .getGenericFromCacheTable(name, where, pkg, .implicitTable)
 
 .getGenericFromCacheTable <- function(name, where, pkg = "", table)
 {
@@ -650,7 +641,7 @@ getGeneric <-
         fdef <- getFunction(name, TRUE, FALSE, penv)
         if(!is(fdef, "genericFunction")) {
             if(is.primitive(fdef))
-                fdef <- genericForPrimitive(name, penv)
+                fdef <- genericForBasic(name, penv)
             else
                 fdef <- implicitGeneric(name, penv)
         }
@@ -666,22 +657,18 @@ getGeneric <-
 {
     value <- fdef
     ev <- environment(fdef)
-    environment(value) <- newEv <- new.env(TRUE, parent.env(ev))
-    for(what in objects(ev, all.names=TRUE)) {
-        obj <- get(what, envir = ev)
+    objs <- lapply(as.list(ev, all.names=TRUE), function(obj) {
         if(is.environment(obj))
             obj <- .copyEnv(obj)
-        assign(what, obj, envir = newEv)
-    }
+        obj
+    })
+    environment(value) <- list2env(objs, hash=TRUE, parent=parent.env(ev))
     value
 }
 
 .copyEnv <- function(env)
 {
-    value <- new.env(TRUE, parent.env(env))
-    for(what in objects(env, all.names = TRUE))
-        assign(what, get(what, envir = env), envir = value)
-    value
+    list2env(as.list(env, all.names=TRUE), hash=TRUE, parent=parent.env(env))
 }
 
 getGroup <-
@@ -739,10 +726,11 @@ assignMethodsMetaData <-
   ## assign value to be the methods metadata for generic f on database where.
   ## as of R 2.7.0 the mlist metadata is deprecated.
   ## If value is not a MethodsList,  only turns on primitives & groups
-  function(f, value, fdef, where, deflt)
+  function(f, value, fdef, where)
 {
     where <- as.environment(where)
     if(is(value, "MethodsList")) {
+	.MlistDeprecated()
         mname <- methodsPackageMetaName("M",fdef at generic, fdef at package)
         if(exists(mname, envir = where, inherits = FALSE) &&
            bindingIsLocked(mname, where))
@@ -750,8 +738,8 @@ assignMethodsMetaData <-
         else
           assign(mname, value, where)
     }
-    if(is.primitive(deflt))
-        setPrimitiveMethods(f, deflt, "reset", fdef, NULL)
+    if(dispatchIsInternal(fdef))
+        setPrimitiveMethods(f, fdef at default, "reset", fdef, NULL)
     if(is(fdef, "groupGenericFunction")) # reset or turn on members of group
         cacheGenericsMetaData(f, fdef, where = where, package = fdef at package)
 }
@@ -773,21 +761,17 @@ getGenerics <- function(where, searchForm = FALSE)
     if(missing(where)) {
         ## all the packages cached ==? all packages with methods
         ## globally visible.  Assertion based on cacheMetaData + setMethod
-        fnames <- as.list(objects(.genericTable, all.names=TRUE))
-        packages <- vector("list", length(fnames))
-        for(i in seq_along(fnames)) {
-            obj <- get(fnames[[i]], envir = .genericTable)
-            if(is.list(obj))
-                fnames[[i]] <-  names(obj)
-            packages[[i]] <- .packageForGeneric(obj)
-        }
+        fdefs <- as.list(.genericTable, all.names=TRUE, sorted=TRUE)
+        fnames <- mapply(function(nm, obj) {
+            if (is.list(obj)) names(obj) else nm
+        }, names(fdefs), fdefs, SIMPLIFY=FALSE)
+        packages <- lapply(fdefs, .packageForGeneric)
         new("ObjectsWithPackage", unlist(fnames), package=unlist(packages))
     }
     else {
         if(is.environment(where)) where <- list(where)
-        these <- character()
-        for(i in where)
-            these <- c(these, objects(i, all.names=TRUE))
+        ## The order matters ... and there might be no objects.
+        these <- unlist(lapply(where, objects, all.names=TRUE), use.names=FALSE)
         metaNameUndo(unique(these), prefix = "T", searchForm = searchForm)
     }
 }
@@ -801,29 +785,26 @@ getGenerics <- function(where, searchForm = FALSE)
 {
     if(missing(where)) where <- .envSearch(topenv(parent.frame()))
     else if(is.environment(where)) where <- list(where)
-    these <- character()
-    for(i in where) these <- c(these, objects(i, all.names=TRUE))
-    these <- allThese <- unique(these)
-    these <- these[substr(these, 1L, 6L) == ".__T__"]
+    these <- unlist(lapply(where, objects, all.names=TRUE), use.names=FALSE)
+    these <- unique(these)
+    these <- these[startsWith(these, ".__T__")]
     if(length(these) == 0L)
         return(character())
-    funNames <- gsub(".__T__(.*):([^:]+)", "\\1", these)
-    if(length(funNames) == 0L &&
-       length(these[substr(these, 1L, 6L) == ".__M__"]))
-        warning(sprintf("package %s seems to have out-of-date methods; need to reinstall from source",
-                         sQuote(getPackageName(where[[1L]]))))
+    funNames <- gsub("^.__T__(.*):([^:]+)", "\\1", these)
+    ## FIXME: length(funNames) == length(these) != 0   ==> this never triggers:
+    ## if(length(funNames) == 0L && any(startsWith(these, ".__M__")))
+    ##     warning(sprintf("package %s seems to have out-of-date methods; need to reinstall from source",
+    ##                      sQuote(getPackageName(where[[1L]]))))
     packageNames <- gsub(".__T__(.*):([^:]+(.*))", "\\2", these)
     attr(funNames, "package") <- packageNames
     ## Would prefer following, but may be trouble bootstrapping methods
     ## funNames <- new("ObjectsWithPackage", funNames, package = packageNames)
     if(identical(trim, TRUE))
         funNames
-    else {
-        if(identical(trim, FALSE))
-            these
-        else
-            gsub(".__T__", as.character(trim), these)
-    }
+    else if(identical(trim, FALSE))
+        these
+    else
+        gsub(".__T__", as.character(trim), these)
 }
 
 cacheMetaData <-
@@ -834,14 +815,19 @@ cacheMetaData <-
     ## to update class and method information.
     pkg <- getPackageName(where)
     classes <- getClasses(where)
-    for(cl in classes) {
-        cldef <- (if(attach) get(classMetaName(cl), where) # NOT getClassDef, it will use cache
-                  else  getClassDef(cl, searchWhere))
-        if(is(cldef, "classRepresentation")) {
-            if(attach) {
-                .cacheClass(cl, cldef, is(cldef, "ClassUnionRepresentation"), where)
-            }
-            else if(identical(cldef at package, pkg)) {
+    if (attach) {
+        for(cl in classes) {
+            ## NOT getClassDef, it will use cache
+            cldef <- get(classMetaName(cl), where)
+            if(is(cldef, "classRepresentation"))
+                .cacheClass(cl, cldef, is(cldef, "ClassUnionRepresentation"),
+                            where)
+        }
+    } else {
+        for(cl in classes) {
+            cldef <- getClassDef(cl, searchWhere)
+            if(is(cldef, "classRepresentation") &&
+               identical(cldef at package, pkg)) {
                 .uncacheClass(cl, cldef)
                 .removeSuperclassBackRefs(cl, cldef, searchWhere)
             }
@@ -917,7 +903,7 @@ cacheGenericsMetaData <- function(f, fdef, attach = TRUE,
 ### Assertion: methods argument unused except for primitives
 ### and then only for the old non-table case.
     deflt <- finalDefaultMethod(fdef at default) #only to detect primitives
-    if(is.primitive(deflt)) {
+    if(dispatchIsInternal(fdef)) {
 	if(missing(methods)) ## "reset"
 	    setPrimitiveMethods(f, deflt, "reset", fdef, NULL)
 	else ## "set"
@@ -942,12 +928,10 @@ setPrimitiveMethods <-
     .Call(C_R_M_setPrimitiveMethods, f, fdef, code, generic, mlist)
 
 ### utility to turn ALL primitive methods on or off (to avoid possible inf. recursion)
-.allowPrimitiveMethods <-
-  function(onOff) {
-      if(onOff) code <- "SET"
-      else code <- "CLEAR"
-      .Call(C_R_M_setPrimitiveMethods, "", NULL, code, NULL, NULL)
-  }
+.allowPrimitiveMethods <- function(onOff) {
+    code <- if(onOff) "SET" else "CLEAR"
+    .Call(C_R_M_setPrimitiveMethods, "", NULL, code, NULL, NULL)
+}
 
 
 findUnique <- function(what, message, where = topenv(parent.frame()))
@@ -986,6 +970,7 @@ MethodAddCoerce <- function(method, argName, thisClass, methodClass)
             body(method, envir = environment(method)) <- newBody
         }
         else if(is(method, "MethodsList")) {
+	    .MlistDeprecated()
             methods <- method at allMethods
             for(i in seq_along(methods))
                 methods[[i]] <- Recall(methods[[i]], addExpr)
@@ -1003,6 +988,7 @@ missingArg <- function(symbol, envir = parent.frame(), eval = FALSE)
 
 balanceMethodsList <- function(mlist, args, check = TRUE)
 {
+    .MlistDeprecated("balanceMethodsList()")
     moreArgs <- args[-1L]
     if(length(moreArgs) == 0L)
         return(mlist)
@@ -1099,7 +1085,8 @@ methodSignatureMatrix <- function(object, sigSlots = c("target", "defined"))
     allMethods <- getMethodsMetaData(f, where = where)
     if(is.null(allMethods)) {
         argName <- genericFun at signature[[1L]]
-        allMethods <- new("MethodsList", argument = as.name(argName))
+	warning("\"MethodsList\" is defunct; allMethods now are empty")
+##-        allMethods <- new("MethodsList", argument = as.name(argName))
 #         other <- getMethodsMetaData(f)
 #         if(is.null(other))
 #             ## this utility is called AFTER ensuring the existence of a generic for f
@@ -1133,8 +1120,10 @@ methodSignatureMatrix <- function(object, sigSlots = c("target", "defined"))
     ## include tests for value
     fbody <- body(fdef)
     body(fdef, envir = environment(fdef)) <-
-        substitute(.valueClassTest(EXPR, VALUECLASS, FNAME),
-                   list(EXPR = fbody, VALUECLASS = valueClass, FNAME = name))
+        substitute({
+            ans <- EXPR
+            .valueClassTest(ans, VALUECLASS, FNAME)
+        }, list(EXPR = fbody, VALUECLASS = valueClass, FNAME = name))
     fdef
 }
 
@@ -1224,9 +1213,10 @@ metaNameUndo <- function(strings, prefix, searchForm = FALSE)
                 substitute({.Generic <- FF; BODY},
                            list(FF = f,BODY = body(mi)))
         }
-        else if(is(mi, "MethodsList"))
+	else if(is(mi, "MethodsList")) {
+	    .MlistDeprecated()
             mi <- Recall(mi, f)
-        else
+	} else
             stop(sprintf("internal error: Bad methods list object in fixing methods for primitive function %s",
                           sQuote(f)),
                  domain = NA)
@@ -1391,10 +1381,14 @@ metaNameUndo <- function(strings, prefix, searchForm = FALSE)
 }
 
 ## Mark the method as derived from a non-generic.
-.derivedDefaultMethod <- function(fdef)
+.derivedDefaultMethod <- function(fdef, internal = NULL)
 {
     if(is.function(fdef) && !is.primitive(fdef)) {
-        value <- new("derivedDefaultMethod")
+        if (!is.null(internal)) {
+            value <- new("internalDispatchMethod", internal = internal)
+        } else {
+            value <- new("derivedDefaultMethod")
+        }
         value at .Data <- fdef
         value at target <- value at defined <- .newSignature(.anyClassName, formalArgs(fdef))
         value
@@ -1524,7 +1518,7 @@ getGroupMembers <- function(group, recursive = FALSE, character = TRUE)
     if(!is.null(ns))
         asNamespace(ns)
     else {
-        i <- match(paste("package", what, sep=":"), search())
+        i <- match(paste0("package:", what), search())
         if(is.na(i))
             .GlobalEnv
         else
@@ -1554,10 +1548,14 @@ getGroupMembers <- function(group, recursive = FALSE, character = TRUE)
     value
 }
 
-
-.hasS4MetaData <- function(env)
-  (length(objects(env, all.names = TRUE,
-                          pattern = "^[.]__[CTA]_")))
+## is this really right?
+## cf .methodsPackageMetaNamePattern <- "^[.]__[A-Z]+__"
+.hasS4MetaData <- function(env) {
+    nms <- names(env)
+    any(startsWith(nms, ".__C__")) ||
+    any(startsWith(nms, ".__T__")) ||
+    any(startsWith(nms, ".__A__"))
+}
 
 ## turn ordinary generic into one that dispatches on "..."
 ## currently only called in one place from setGeneric()
@@ -1577,6 +1575,8 @@ getGroupMembers <- function(group, recursive = FALSE, character = TRUE)
 
 utils::globalVariables(c(".MTable", ".AllMTable", ".dotsCall"))
 
+## NB this is used with a modified environment in .dotsGeneric,
+## so methods::: calls are necessary.
 .standardGenericDots <- function(name)
 {
     env <- sys.frame(sys.parent())
@@ -1594,7 +1594,7 @@ utils::globalVariables(c(".MTable", ".AllMTable", ".dotsCall"))
 .quoteCall <- quote(.Method(...))
 .makeDotsCall <- function(formals)
 {
-    call <- methods:::.quoteCall
+    call <- .quoteCall
     if(length(formals)  > 1L) {
         idots <- match("...", formals)
         for(what in formals[-idots]) {
@@ -1612,8 +1612,8 @@ utils::globalVariables(c(".MTable", ".AllMTable", ".dotsCall"))
     .pasteC <- function(names) paste0('"', names, '"', collapse = ", ")
     found <- character()
     distances <- numeric()
-    methods <- objects(mtable, all.names = TRUE)
-    direct <- match(classes, methods, 0L) > 0L
+    methods <- names(mtable)
+    direct <- classes %in% methods
     if(all(direct)) {
         if(length(classes) > 1L) {
             warning(gettextf("multiple direct matches: %s; using the first of these", .pasteC(classes)), domain = NA)
@@ -1621,7 +1621,7 @@ utils::globalVariables(c(".MTable", ".AllMTable", ".dotsCall"))
         }
         else if(length(classes) == 0L)
             return( if(is.na(match("ANY", methods))) NULL else get("ANY", envir = mtable))
-        return(get(classes,envir = mtable))
+        return(mtable[[classes]])
     }
     if(is.null(allmtable))
         return(NULL)
@@ -1640,9 +1640,9 @@ utils::globalVariables(c(".MTable", ".AllMTable", ".dotsCall"))
         extendsi <- defi at contains
         namesi <- c(classi, names(extendsi))
         if(i == 1)
-            namesi <- namesi[match(namesi, methods, 0L) > 0L]
+            namesi <- namesi[namesi %in% methods]
         else { # only the superclass methods matching all arguments are kept
-            namesi <- namesi[match(namesi, found, 0L) > 0L]
+            namesi <- namesi[namesi %in% found]
             found <- namesi
             if(length(found) == 0L) break # no possible non-default match
         }
@@ -1733,9 +1733,8 @@ if(FALSE) {
         ## else, an error
         classi <- classes[[i]]
         pkgi <- pkgs[[i]]
-        classDefi <- getClass(classi, where = where)
-        if(checkDups &&
-           classi %in% mulipleClasses()) { # hardly ever, we hope
+        classDefi <- getClassDef(classi, where=if (pkgi == "") where else pkgi)
+        if(checkDups && classi %in% multipleClasses()) { # hardly ever, we hope
             clDefsi <- get(classi, envir = .classTable)
             if(nzchar(pkgi) && pkgi %in% names(clDefsi))
                 ## use the chosen class, no message
@@ -1811,11 +1810,6 @@ if(FALSE) {
     if(!exists(actionListName, envir = where, inherits = FALSE))
         return(list())
     actions <- get(actionListName, envir = where)
-    ## check sanity:  methods must be loaded
-    if(! "package:methods" %in% search()) {
-        warning("trying to execute load actions without 'methods' package")
-        library(methods)
-    }
     for(what in actions) {
         aname <- .actionMetaName(what)
         if(!exists(aname, envir = where, inherits = FALSE)) {
@@ -1942,3 +1936,11 @@ evalqOnLoad <- function(expr, where = topenv(parent.frame()), aname = "")
         0L
 }
 
+## test whether this function could be an S3 generic, either
+## a primitive or a function calling UseMethod()
+isS3Generic <- function(fdef) {
+    if(is.primitive(fdef))
+        identical(typeof(fdef), "builtin")
+    else
+        "UseMethod" %in% .getGlobalFuns(fdef) # from refClass.R
+}
diff --git a/src/library/methods/R/SClasses.R b/src/library/methods/R/SClasses.R
index e29ca1c..287e2de 100644
--- a/src/library/methods/R/SClasses.R
+++ b/src/library/methods/R/SClasses.R
@@ -1,7 +1,7 @@
 #  File src/library/methods/R/SClasses.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
-#  Copyright (C) 1995-2013 The R Core Team
+#  Copyright (C) 1995-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
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 setClass <-
     ## Define Class to be an S4 class.
@@ -35,9 +35,8 @@ setClass <-
         if(!missing(representation))
             stop("Argument \"representation\" cannot be used if argument \"slots\" is supplied")
         properties <- inferProperties(slots, "slot")
-        classDef <- makeClassRepresentation(Class, properties,contains, prototype, package,
-                                             validity, access, version, sealed, where = where)
-        superClasses <- names(classDef at contains)
+        classDef <- makeClassRepresentation(Class, properties, contains, prototype, package,
+                                            validity, access, version, sealed, where = where)
     }
     else if(is(representation, "classRepresentation")) {
         ## supplied a class definition object
@@ -47,7 +46,6 @@ setClass <-
             stop("only arguments 'Class' and 'where' can be supplied when argument 'representation' is a 'classRepresentation' object")
         if(length(classDef at package) == 0L)
             classDef at package <- package # the default
-        superClasses <- allNames(classDef at contains)
     }
     else {
         ## catch the special case of a single class name as the representation
@@ -57,10 +55,10 @@ setClass <-
         slots <- nzchar(allNames(representation))
         superClasses <- c(as.character(representation[!slots]), contains)
         properties <- representation[slots]
-        classDef <- makeClassRepresentation(Class, properties,superClasses, prototype, package,
-                                             validity, access, version, sealed, where = where)
-        superClasses <- names(classDef at contains)
+        classDef <- makeClassRepresentation(Class, properties, superClasses, prototype, package,
+                                            validity, access, version, sealed, where = where)
     }
+    superClasses <- names(classDef at contains)
     classDef <- completeClassDefinition(Class, classDef, where, doExtends = FALSE)
     ## uncache an old definition for this package, if one is cached
     .uncacheClass(Class, classDef)
@@ -69,6 +67,8 @@ setClass <-
         classDef at sealed <- FALSE # to allow setIs to work anyway; will be reset later
         assignClassDef(Class, classDef, where)
         badContains <- character()
+### FIXME: need to iterate over contains, not superclass to get
+### package for getClassDef()
         for(class2 in superClasses) {
             if(is(try(setIs(Class, class2, classDef = classDef, where = where)), "try-error"))
                 badContains <- c(badContains, class2)
@@ -127,7 +127,7 @@ representation <-
     ## since set SClass works separately with the slots and extends arguments.
     anames <- allNames(value)
     for(i in seq_along(value)) {
-        ei <- el(value, i)
+        ei <- value[[i]]
         if(!is.character(ei) || length(ei) != 1L)
             stop(gettextf("element %d of the representation was not a single character string", i), domain = NA)
     }
@@ -179,7 +179,9 @@ makeClassRepresentation <-
   ## The formal definition of the class is set according to the arguments.
   ##
   ## Users should call setClass instead of this function.
-  function(name, slots = list(), superClasses = character(), prototype = NULL, package, validity = NULL, access = list(), version = .newExternalptr(), sealed = FALSE, virtual = NA, where)
+  function(name, slots = list(), superClasses = character(), prototype = NULL,
+	   package, validity = NULL, access = list(), version = .newExternalptr(),
+	   sealed = FALSE, virtual = NA, where)
 {
     if(any(superClasses %in% .AbnormalTypes))
         superClasses <- .addAbnormalDataType(superClasses)
@@ -193,23 +195,24 @@ makeClassRepresentation <-
     if(nzchar(package))
         packageSlot(name) <- package
     for(what in superClasses) {
-        if(is(what, "classRepresentation"))
-            whatClassDef <- what
-        else if(is.null(packageSlot(what)))
-            whatClassDef <- getClass(what, where = where)
-        else
-            whatClassDef <- getClass(what)
+	whatClassDef <-
+	    if(is(what, "classRepresentation"))
+		what
+	    else if(is.null(packageSlot(what)))
+		getClass(what, where = where)
+	    else
+		getClass(what)
         what <- whatClassDef at className # includes package name as attribute
         ## Create the SClassExtension objects (will be simple, possibly dataPart).
         ## The slots are supplied explicitly, since `name' is currently an undefined class
-        elNamed(contains, what) <- makeExtends(name, what, slots = slots,
+        contains[[what]] <- makeExtends(name, what, slots = slots,
                                               classDef2 = whatClassDef, package = package)
     }
     validity <- .makeValidityMethod(name, validity)
     if(is.na(virtual)) {
         virtual <- testVirtual(slots, contains, prototype, where)
         if(virtual && !is.na(match("VIRTUAL", superClasses)))
-            elNamed(contains, "VIRTUAL") <- NULL
+            contains[["VIRTUAL"]] <- NULL
     }
     # new() must return an S4 object, except perhaps for basic classes
     if(!is.null(prototype) && is.na(match(name, .BasicClasses)))
@@ -232,25 +235,29 @@ getClassDef <-
   function(Class, where = topenv(parent.frame()), package = packageSlot(Class),
            inherits = TRUE)
 {
-    if(inherits) #includes both the lookup and Class being alread a definition
-      value <- .getClassFromCache(Class, where)
-    else # want to force a search for the metadata in this case (Why?)
-      value <- NULL
+    if(inherits) {
+                 value <- .getClassesFromCache(Class)
+                 if(is.list(value))
+                     value <- .resolveClassList(value, where, package)
+    } else
+        value <- NULL
+    
     if(is.null(value)) {
-	cname <-
-	    classMetaName(if(length(Class) > 1L)
+	cname <- classMetaName(if(length(Class) > 1L)
 			  ## S3 class; almost certainly has no packageSlot,
 			  ## but we'll continue anyway
 			  Class[[1L]] else Class)
 	## a string with a package slot strongly implies the class definition
 	## should be in that package.
-	if(identical(nzchar(package), TRUE)) {
+        if(is.character(where)) {
+            package <- where
+        }
+	if(isTRUE(nzchar(package))) {
 	    whereP <- .requirePackage(package)
-	    if(exists(cname, whereP, inherits = inherits))
-		value <- get(cname, whereP)
+	    value <- get0(cname, whereP, inherits = inherits) # NULL if not existing
 	}
-	if(is.null(value) && exists(cname, where, inherits = inherits))
-	    value <- get(cname, where)
+	if(is.null(value))
+	    value <- get0(cname, where, inherits = inherits) # NULL if not existing
     }
     value
 }
@@ -261,10 +268,8 @@ getClass <-
   function(Class, .Force = FALSE,
 	   where = .classEnv(Class, topenv(parent.frame()), FALSE))
 {
-    value <- .getClassFromCache(Class, where) # the quick way
+    value <- getClassDef(Class, where)
     if(is.null(value)) {
-        value <- getClassDef(Class, where) # searches
-        if(is.null(value)) {
             if(!.Force)
                 stop(gettextf("%s is not a defined class",
                               dQuote(Class)),
@@ -272,7 +277,6 @@ getClass <-
             else
                 value <- makeClassRepresentation(Class, package = "base",
                                                  virtual = TRUE, where = where)
-        }
     }
     value
 }
@@ -303,7 +307,7 @@ checkSlotAssignment <- function(obj, name, value)
 {
     cl <- class(obj)
     ClassDef <- getClass(cl) # fails if cl not a defined class (!)
-    slotClass <- elNamed(ClassDef at slots, name)
+    slotClass <- ClassDef at slots[[name]]
     if(is.null(slotClass))
         stop(gettextf("%s is not a slot in class %s",
                       sQuote(name), dQuote(cl)),
@@ -329,7 +333,7 @@ checkSlotAssignment <- function(obj, name, value)
 checkAtAssignment <- function(cl, name, valueClass)
 {
     ClassDef <- getClass(cl) # fails if cl not a defined class (!)
-    slotClass <- elNamed(ClassDef at slots, name)
+    slotClass <- ClassDef at slots[[name]]
     if(is.null(slotClass))
         stop(gettextf("%s is not a slot in class %s",
                       sQuote(name), dQuote(cl)),
@@ -366,8 +370,8 @@ slotNames <- function(x)
 
 .slotNames <- function(x)
 {
-    classDef <-
-	getClassDef(if(is.character(x) && length(x) == 1L) x else class(x))
+    classDef <- getClassDef(
+	if(!isS4(x) && is.character(x) && length(x) == 1L) x else class(x))
     if(is.null(classDef))
 	character()
     else
@@ -386,7 +390,8 @@ removeClass <-  function(Class, where = topenv(parent.frame())) {
             return(FALSE)
         }
         if(length(classWhere) > 1L)
-            warning(gettextf("class %s has multiple definitions visible; only the first removed",
+	    warning(gettextf(
+		"class %s has multiple definitions visible; only the first removed",
                              dQuote(Class)),
                     domain = NA)
         classWhere <- classWhere[[1L]]
@@ -395,7 +400,7 @@ removeClass <-  function(Class, where = topenv(parent.frame())) {
     classDef <- getClassDef(Class, where=classWhere)
     if(length(classDef at subclasses)) {
       subclasses <- names(classDef at subclasses)
-      found <- sapply(subclasses, isClass, where = where)
+      found <- vapply(subclasses, isClass, NA, where = where, USE.NAMES=TRUE)
       for(what in subclasses[found])
           .removeSuperClass(what, Class)
     }
@@ -437,15 +442,17 @@ getClasses <-
   function(where = .externalCallerEnv(), inherits = missing(where))
 {
     pat <- paste0("^",classMetaName(""))
+    if(!is.environment(where)) ## e.g. for "package:stats4"
+	where <- as.environment(where)
     if(inherits) {
         evList <- .parentEnvList(where)
         clNames <- character()
         for(ev in evList)
-            clNames <- c(clNames, objects(ev, pattern = pat, all.names = TRUE))
+            clNames <- c(clNames, grep(pat, names(ev), value=TRUE))
         clNames <- unique(clNames)
     }
     else
-        clNames <- objects(where, pattern = pat, all.names = TRUE)
+        clNames <- grep(pat, names(where), value=TRUE)
     ## strip off the leading pattern (this implicitly assumes the characters
     ## in classMetaName("") are either "." or not metacharacters
     substring(clNames, nchar(pat, "c"))
@@ -518,7 +525,7 @@ validObject <- function(object, test = FALSE, complete = FALSE)
 	superClass <- exti at superClass
 	if(!exti at simple && !is(object, superClass))
 	    next ## skip conditional relations that don't hold for this object
-	superDef <- getClassDef(superClass, where = where)
+	superDef <- getClassDef(superClass, package = packageSlot(exti))
 	if(is.null(superDef)) {
 	    errors <- c(errors,
 			paste0("superclass \"", superClass,
@@ -605,7 +612,7 @@ resetClass <- function(Class, classDef, where) {
                 stop(gettextf("argument 'classDef' must be a string or a class representation; got an object of class %s",
                               dQuote(class(classDef))),
                      domain = NA)
-            package <- getPackageName(where)
+#            package <- getPackageName(where)
         }
         if(classDef at sealed)
             warning(gettextf("class %s is sealed; 'resetClass' will have no effect",
@@ -637,11 +644,11 @@ initialize <- function(.Object, ...) {
         supers <- args[!which]
         thisExtends <- names(ClassDef at contains)
         slotDefs <- ClassDef at slots
-        dataPart <- elNamed(slotDefs, ".Data")
+        dataPart <- slotDefs[[".Data"]]
         if(is.null(dataPart)) dataPart <- "missing"
         if(length(supers)) {
             for(i in rev(seq_along(supers))) {
-                obj <- el(supers, i)
+                obj <- supers[[i]]
                 Classi <- class(obj)
                 if(length(Classi) > 1L)
                     Classi <- Classi[[1L]] #possible S3 inheritance
@@ -694,10 +701,10 @@ initialize <- function(.Object, ...) {
                      domain = NA)
             firstTime <- TRUE
             for(i in seq_along(snames)) {
-                slotName <- el(snames, i)
-                slotClass <- elNamed(slotDefs, slotName)
-                slotClassDef <- getClassDef(slotClass, package=ClassDef at package)
-                slotVal <- el(elements, i)
+                slotName <- snames[[i]]
+                slotClass <- slotDefs[[slotName]]
+                slotClassDef <- getClassDef(slotClass, package = ClassDef at package)
+                slotVal <- elements[[i]]
                 ## perform non-strict coercion, but leave the error messages for
                 ## values not conforming to the slot definitions to validObject(),
                 ## hence the check = FALSE argument in the slot assignment
@@ -733,13 +740,10 @@ findClass <- function(Class, where = topenv(parent.frame()), unique = "") {
     else {
         pkg <- packageSlot(Class)
         if(is.null(pkg))
-          pkg <- ""
+	    pkg <- ""
         classDef <- getClassDef(Class, where, pkg)
     }
-    if(missing(where) && nzchar(pkg))
-            where <- .requirePackage(pkg)
-    else
-        where <- as.environment(where)
+    where <- if(missing(where) && nzchar(pkg)) .requirePackage(pkg) else as.environment(where)
     what <- classMetaName(Class)
     where <- .findAll(what, where)
     if(length(where) > 1L && nzchar(pkg)) {
@@ -851,19 +855,17 @@ names(.indirectAbnormalClasses) <- .AbnormalTypes
   supers <- names(classDef at contains)
   allNeeded <- get(".NeedPrimitiveMethods", envir = .methodsNamespace)
   specials <- names(allNeeded)
-  needed <- match(specials, supers, 0) > 0
+  needed <- match(specials, supers, 0L) > 0L
   if(any(needed)) {
     generics <- unique(allNeeded[needed])
-    packages <- character()
-    for(g in generics) {
-      def <- getGeneric(g)
-      packages <- c(packages, def at package) # must be "methods" ?
-      cacheGenericsMetaData(g, def, TRUE, where, def at package)
-    }
-    if(exists(".requireCachedGenerics",  where, inherits = FALSE))
-      previous <- get(".requireCachedGenerics",  where)
-    else
-      previous <- character()
+    packages <- vapply(generics, function(g) {
+        def <- getGeneric(g)
+        pkg <- def at package # must be "methods" ?
+        cacheGenericsMetaData(g, def, TRUE, where, pkg)
+        pkg
+    }, character(1))
+    previous <- if(exists(".requireCachedGenerics", where, inherits = FALSE))
+		      get(".requireCachedGenerics", where) else character()
     packages <- c(attr(previous, "package"), packages)
     gg <- c(previous, generics)
     attr(gg, "package") <- packages
@@ -889,16 +891,9 @@ names(.indirectAbnormalClasses) <- .AbnormalTypes
   }
 
 multipleClasses <- function(details = FALSE) {
-    ctable <- .classTable
-    cnames <- objects(ctable, all.names = TRUE)
-    dups <- sapply(cnames, function(x) is.list(get(x, envir = ctable)))
-    if(details) {
-        value <- lapply(cnames[dups], function(x) get(x, envir = ctable))
-        names(value) <- cnames[dups]
-        value
-    }
-    else
-        cnames[dups]
+    classes <- as.list(.classTable, all.names=TRUE)
+    dups <- Filter(is.list, classes)
+    if(details) dups else names(dups)
 }
 
 className <- function(class, package) {
diff --git a/src/library/methods/R/addedFunctions.R b/src/library/methods/R/addedFunctions.R
index 3a6d33d..4e1127d 100644
--- a/src/library/methods/R/addedFunctions.R
+++ b/src/library/methods/R/addedFunctions.R
@@ -1,7 +1,7 @@
 #  File src/library/methods/R/addedFunctions.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
-#  Copyright (C) 1995-2012 The R Core Team
+#  Copyright (C) 1995-2015 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
@@ -14,17 +14,12 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 
-functionBody <- base::body #was get("body", mode = "function")
+functionBody <- body
 
-`functionBody<-` <- base::`body<-`
-## was
-## .ff <- function(fun, envir = environment(fun), value) fun
-## body(.ff, envir = .GlobalEnv) <- body(get("body<-"))
-## "functionBody<-" <- .ff
-## rm(.ff)
+`functionBody<-` <- `body<-`
 
 allNames <-
   ## the character vector of names (unlike names(), never returns NULL)
@@ -51,10 +46,8 @@ getFunction <- function(name, generic = TRUE, mustFind = TRUE,
     lastEnv <- if(isNamespace(where)) function(where) isBaseNamespace(where) else
     function(where) identical(where, baseenv())
     repeat {
-        if(exists(name, envir = where, mode = "function", inherits = FALSE)) {
-            f <- get(name, envir = where)
+      if(!is.null(f <- get0(name, envir = where, mode = "function", inherits = FALSE)))
             found <- generic || !is(f, "genericFunction")
-        }
         if(found || lastEnv(where))
             break
         where <- parent.env(where)
@@ -92,7 +85,7 @@ elNamed <-
         else NULL
     }
     else
-        el(x,i)
+        x[[i]]
 }
 
 "elNamed<-" <-
@@ -118,8 +111,7 @@ findFunction <-
     ok <- logical(length(allWhere))
     for(i in seq_along(allWhere)) {
 	wherei <- allWhere[[i]]
-	if(exists(f, wherei, inherits = FALSE)) {
-	    fdef <- get(f, wherei)
+	if(!is.null(fdef <- wherei[[f]])) {
 	    ok[i] <- is.function(fdef) && (generic || is.primitive(fdef) || !isGeneric(f, wherei, fdef))
 	}## else ok[i] <- FALSE
     }
diff --git a/src/library/methods/R/as.R b/src/library/methods/R/as.R
index 065d57b..ec25b62 100644
--- a/src/library/methods/R/as.R
+++ b/src/library/methods/R/as.R
@@ -1,7 +1,7 @@
 #  File src/library/methods/R/as.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
-#  Copyright (C) 1995-2013 The R Core Team
+#  Copyright (C) 1995-2015 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
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 as <-
   ## Returns the version of this object coerced to be the given `Class'.
@@ -125,7 +125,7 @@ as <-
     ## be the equivalent of new("toClass", fromObject)
     ## But must check that replacement is defined, in the case
     ## of nonstandard superclass relations
-    replaceMethod <- elNamed(ClassDef at contains, fromClass)
+    replaceMethod <- ClassDef at contains[[fromClass]]
     if(is(replaceMethod, "SClassExtension") &&
        !identical(as(replaceMethod at replace, "function"), .ErrorReplace)) {
         f <- function(from, to) NULL
@@ -149,13 +149,13 @@ as <-
   function(object, Class, value) {
     thisClass <- .class1(object)
     if(!.identC(.class1(value), Class))
-      value <- as(value, Class, strict = FALSE)
+        value <- as(value, Class, strict = FALSE)
     where <- .classEnv(class(object))
     coerceFun <- getGeneric("coerce<-", where = where)
     coerceMethods <- getMethodsForDispatch(coerceFun)
     asMethod <- .quickCoerceSelect(thisClass, Class, coerceFun, coerceMethods, where)
     if(is.null(asMethod)) {
-        sig <-  c(from=thisClass, to = Class)
+        sig <- c(from = thisClass, to = Class)
         canCache <- TRUE
         inherited <- FALSE
         asMethod <- selectMethod("coerce<-", sig, TRUE, FALSE, #optional, no inheritance
@@ -261,7 +261,7 @@ setAs <-
                             domain = NA)
                 }
                 method <- eval(function(from, to, value)NULL)
-                functionBody(method, envir = .GlobalEnv) <- replace
+                body(method, envir = .GlobalEnv) <- replace
             }
             setMethod("coerce<-", c(from, to), method, where = where)
         }
@@ -338,6 +338,17 @@ setAs <-
             as.name(from)
         })
   setMethod("coerce", c("ANY","name"), method, where = where)
+  ## Proposed on R-devel, Dec. 7, 2015, by JMC, this is too radical,
+  ## coercing to "double" in too many cases where "numeric" data remained "integer":
+  ## setMethod("coerce", c("integer", "numeric"),
+  ##           ## getMethod("coerce", c("ANY", "numeric"), where = envir) -- not yet available
+  ##           function (from, to, strict = TRUE) {
+  ##               value <- as.numeric(from)
+  ##               if(strict)
+  ##                   attributes(value) <- NULL
+  ##               value
+  ##           }, where = where)
+
   ## not accounted for and maybe not needed:  real, pairlist, double
 }
 
@@ -424,6 +435,7 @@ canCoerce <- function(object, Class) {
     fdef <- eval(fdef)
     body(fdef, environment(def)) <- body(def)
     attr(fdef, "source") <- deparse(fdef) # because it's wrong from the quote()
+    utils::removeSource(fdef)
     sig <- new("signature")
     sig at .Data <- c(thisClass, ClassDef at className)
     sig at names <- c("from", "to")
diff --git a/src/library/methods/R/cbind.R b/src/library/methods/R/cbind.R
index dafd9fc..7eb662d 100644
--- a/src/library/methods/R/cbind.R
+++ b/src/library/methods/R/cbind.R
@@ -1,7 +1,7 @@
 #  File src/library/methods/R/cbind.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
-#  Copyright (C) 1995-2012 The R Core Team
+#  Copyright (C) 1995-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
@@ -14,15 +14,16 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 #### cbind() and rbind()  which build on  cbind2() / rbind2()
 #### --------------------------------------------------------
 ### NOTE: We rely on
 ### o	dim(.) working reliably for all arguments of [cr]bind2()
 ### o	All [cr]bind2() methods are assumed to
-###	       1) correctly set (row/col)names
-###	       2) correctly set (col/row)names for *matrix*(like) arguments
+###	correctly *use* (row/col)names of their matrix arguments
+###     but cannot look at arguments for deparsing them
+###  => all (row/col)names setting depending on deparse.level must be done *here
 
 ### Note that this
 ### 1) is namespace-hidden usually,
@@ -33,31 +34,38 @@
 
 cbind <- function(..., deparse.level = 1)
 {
-    na <- nargs() - !missing(deparse.level)
+    has.dl <- !missing(deparse.level)
     deparse.level <- as.integer(deparse.level)
+    if(identical(deparse.level, -1L)) deparse.level <- 0L # our hack
     stopifnot(0 <= deparse.level, deparse.level <= 2)
 
     argl <- list(...)
     ## remove trailing 'NULL's:
-    while(na > 0 && is.null(argl[[na]])) { argl <- argl[-na]; na <- na - 1 }
+    na <- nargs() - has.dl
+    while(na > 0L && is.null(argl[[na]])) { argl <- argl[-na]; na <- na - 1L }
     if(na == 0) return(NULL)
+    symarg <- as.list(substitute(list(...)))[-1L] # symbolic argument (names)
+    nmsym <- names(symarg)
+    ## Give *names* depending on deparse.level {for non-matrix}:
+    nm <- c( ## 0:
+	function(i) NULL,
+	## 1:
+	function(i) if(is.symbol(s <- symarg[[i]])) deparse(s) else NULL,
+	## 2:
+	function(i) deparse(symarg[[i]])[[1L]])[[ 1L + deparse.level ]]
+    Nms <- function(i) { if(!is.null(s <- nmsym[i]) && nzchar(s)) s else nm(i) }
     if(na == 1) {
-	if(isS4(..1)) return(cbind2(..1))
+	if(isS4(..1)) {
+	    r <- cbind2(..1)
+	    if(length(dim(..1)) < 2L && length(dim(r)) == 2L)
+		colnames(r) <- Nms(1)
+	    return(r)
+	}
 	else return(.__H__.cbind(..., deparse.level = deparse.level))
     }
 
     ## else :  na >= 2
 
-    if(deparse.level) {
-	symarg <- as.list(sys.call()[-1L])[1L:na] # the unevaluated arguments
-	## For default 'deparse.level = 1', cbind(a, b) has to give *names*!
-	Nms <- function(i) { # possibly 'deparsed' names of argument  i
-	    if(is.null(r <- names(symarg[i])) || r == "") {
-		if(is.symbol(r <- symarg[[i]]) || deparse.level == 2)
-		    deparse(r)		# else NULL
-	    } else r
-	}
-    }
     if(na == 2) {
 	r <- ..2
 	fix.na <- FALSE
@@ -66,18 +74,18 @@ cbind <- function(..., deparse.level = 1)
 	## determine nrow(<result>)  for e.g.,	cbind(diag(2), 1, 2)
 	## only when the last two argument have *no* dim attribute:
 	nrs <- unname(lapply(argl, nrow)) # of length na
-	iV <- sapply(nrs, is.null)# is 'vector'
-	fix.na <- identical(nrs[(na-1):na], list(NULL,NULL))
+	iV <- vapply(nrs, is.null, NA)# is 'vector'
+	fix.na <- identical(nrs[(na-1L):na], list(NULL,NULL))
 	if(fix.na) {
 	    ## "fix" last argument, using 1-column `matrix' of proper nrow():
-	    nr <- max(if(all(iV)) sapply(argl, length) else unlist(nrs[!iV]))
+	    nr <- max(if(all(iV)) lengths(argl) else unlist(nrs[!iV]))
 	    argl[[na]] <- cbind(rep(argl[[na]], length.out = nr),
 				deparse.level = 0)
 	    ## and since it's a 'matrix' now, cbind() below may not name it
 	}
 	## need to pass argl, the evaluated arg list to do.call();
 	## OTOH, these may have lost their original 'symbols'
-	if(deparse.level) {
+	## if(deparse.level) {
 	    if(fix.na)
 		fix.na <- !is.null(Nna <- Nms(na))
 	    if(!is.null(nmi <- names(argl))) iV <- iV & (nmi == "")
@@ -88,14 +96,14 @@ cbind <- function(..., deparse.level = 1)
 		for(i in ii[iV[ii]])
 		    if (!is.null(nmi <- Nms(i))) names(argl)[i] <- nmi
 	    }
-	}
+	## }
 	r <- do.call(cbind, c(argl[-1L], list(deparse.level=deparse.level)))
     }
 
     d2 <- dim(r)
     r <- cbind2(..1, r)
-    if(deparse.level == 0)
-	return(r)
+    ## if(deparse.level == 0)
+    ##     return(r)
     ism1 <- !is.null(d1 <- dim(..1)) && length(d1) == 2L
     ism2 <- !is.null(d2)	     && length(d2) == 2L && !fix.na
     if(ism1 && ism2) ## two matrices
@@ -105,8 +113,8 @@ cbind <- function(..., deparse.level = 1)
     ##	       when one was not a matrix [needs some diligence!]
     Ncol <- function(x) {
 	d <- dim(x); if(length(d) == 2L) d[2L] else as.integer(length(x) > 0L) }
-    nn1 <- !is.null(N1 <- if((l1 <- Ncol(..1)) && !ism1) Nms(1)) # else NULL
-    nn2 <- !is.null(N2 <- if(na == 2 && Ncol(..2) && !ism2) Nms(2))
+    nn1 <- !is.null(N1 <- if(    (l1 <- Ncol(..1)) && !ism1) Nms(1)) # else NULL
+    nn2 <- !is.null(N2 <- if(na == 2 && Ncol(..2)  && !ism2) Nms(2))
     if(nn1 || nn2 || fix.na) {
 	if(is.null(colnames(r)))
 	    colnames(r) <- rep.int("", ncol(r))
@@ -123,6 +131,8 @@ cbind <- function(..., deparse.level = 1)
 ## This may be called on loading methods, see ./zzz.R
 bind_activation <- function(on = TRUE)
 {
+    if(on)
+        warning("methods:::bind_activation(TRUE) is deprecated;\n you should rather provide methods for cbind2() / rbind2()")
     inBase <- function(x, value, ns)
     {
         unlockBinding(x, ns)
diff --git a/src/library/methods/R/debug.R b/src/library/methods/R/debug.R
new file mode 100644
index 0000000..1a20ced
--- /dev/null
+++ b/src/library/methods/R/debug.R
@@ -0,0 +1,75 @@
+.debugMethod <- function(fun, text = "", condition = NULL, signature,
+                         once = FALSE)
+{
+    stopifnot(is.null(condition), identical(text, ""))
+    if (is.primitive(fun))
+        fun <- getGeneric(fun)
+    if(!is(fun, "standardGeneric"))
+        stop("Function must be an S4 generic")
+    
+    if(isdebugged(fun, signature = signature))
+        return(invisible(NULL))
+    
+    m <- selectMethod(fun, signature)
+    bd <- body(m)
+
+    isrematch <- isRematched(m)
+    if(isrematch)
+        bd <- body(bd[[2L]][[3L]])
+
+    at <- if(is(bd, "{")) 2L else numeric()
+    
+    tracer <- if(once) {
+        ## If the method is rematched we're in .local so we need to reach up one
+        ## frame to get the generic and target in that case
+        if (isrematch)
+            quote(quote({untrace(sys.frame(2L)$.Generic,
+                                 signature = sys.frame(2L)$.target);
+                browser()}))
+        else
+            quote(quote({untrace(.Generic,
+                                 signature = .target); browser()}))
+    } else {
+        quote(browser)
+    }
+    eval(substitute(trace(fun, tracer, signature = signature, print = TRUE,
+                          at = at),
+                    list(tracer=tracer)))
+
+    invisible(NULL)
+}
+
+.undebugMethod <- function(fun, signature) {
+    if (!isdebugged(fun, signature)) {
+        warning("method is not being debugged")
+    } else {
+        if (is.primitive(fun))
+            fun <- getGeneric(fun)
+        untrace(fun, signature = signature)
+    }
+}
+
+.isMethodDebugged <- function(fun, signature) {
+    meth <- selectMethod(fun, signature)
+    if(!is(meth, "MethodDefinitionWithTrace"))
+        return(FALSE)
+    bd <- body(meth)
+    if(isRematched(meth)) {
+        ## detect the .doTrace block that gets inserted.
+        ## This should be specific enough to only catch traces
+        ## added by debug (or fully equivalent trace calls)
+        is(bd[[3L]], "{") &&
+            identical(bd[[3L]][[2L]][1L], quote(.doTrace())) &&
+                identical(bd[[3L]][[2L]][[2L]][1:3],
+                          quote(trace(.local, tracer = browser)))
+    } else {
+        fstexp <- bd
+        ## we need to cover function(x) x at y and function(x) {x;y;z} cases
+        ## so peel off brackets until there aren't any, because "debugging"
+        ## here translates to putting .doTrace(browser()) as the first
+        ## non-bracket evaluated expression
+        while(is(bd, "{"))
+            bd <- bd[[2L]]
+        identical(bd[1:2], quote(.doTrace(browser())))
+    }
+}
diff --git a/src/library/methods/R/fixPrevious.R b/src/library/methods/R/fixPrevious.R
index d1f5994..ec660c2 100644
--- a/src/library/methods/R/fixPrevious.R
+++ b/src/library/methods/R/fixPrevious.R
@@ -1,7 +1,7 @@
 #  File src/library/methods/R/fixPrevious.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
-#  Copyright (C) 1995-2012 The R Core Team
+#  Copyright (C) 1995-2015 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
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 ## fixPre1.8(names)
 ##   The objects in names should have been loaded from a version of R
@@ -27,7 +27,7 @@
 fixPre1.8 <- function(names, where = topenv(parent.frame())) {
     done <- character()
     for(what in names) {
-        objWhere <- methods:::.findAll(what, where)
+        objWhere <- .findAll(what, where)
         if(length(objWhere) == 0) {
             warning(gettextf("object %s not found",
                              sQuote(what)),
diff --git a/src/library/methods/R/is.R b/src/library/methods/R/is.R
index b8488d1..054f537 100644
--- a/src/library/methods/R/is.R
+++ b/src/library/methods/R/is.R
@@ -1,7 +1,7 @@
 #  File src/library/methods/R/is.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
-#  Copyright (C) 1995-2012 The R Core Team
+#  Copyright (C) 1995-2015 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
@@ -14,45 +14,52 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
-is <-
+
+is <- function(object, class2)
+{
   # With two arguments, tests whether `object' can be treated as from `class2'.
   #
   # With one argument, returns all the super-classes of this object's class.
-function(object, class2)
-{
-    cl <- class(object)
-    S3Case <- length(cl) > 1L
+    class1 <- class(object)
+    S3Case <- length(class1) > 1L
     if(S3Case)
-      cl <- cl[[1L]]
+        class1 <- class1[[1L]]
     if(missing(class2))
-        return(extends(cl))
-    class1Def <- getClassDef(cl)
+        return(extends(class1))
+    class1Def <- getClassDef(class1)
     if(is.null(class1Def)) # an unregistered S3 class
-      return(inherits(object, class2))
+        return(inherits(object, class2))
     if(is.character(class2))
-      class2Def <- getClassDef(class2, .classDefEnv(class1Def))
+        class2Def <- getClassDef(class2, .classDefEnv(class1Def))
     else {
         class2Def <- class2
         class2 <- class2Def@ className
     }
-    ## S3 inheritance is applied if the object is not S4 and class2 is either a basic
-    ## class or an S3 class (registered or not)
-    S3Case <- S3Case || (is.object(object) && !isS4(object)) # first requirement
+    ## S3 inheritance is applied if the object is not S4 and class2 is either
+    ## a basic class or an S3 class (registered or not)
+    S3Case <- S3Case || (is.object(object) && !isS4(object))
     S3Case <- S3Case && (is.null(class2Def) || class2 %in% .BasicClasses ||
                          extends(class2Def, "oldClass"))
     if(S3Case)
-        return(inherits(object, class2))
-    if(.identC(cl, class2) || .identC(class2, "ANY"))
-        return(TRUE)
-    ext <- possibleExtends(cl, class2, class1Def, class2Def)
-    if(is.logical(ext))
-        ext
-    else if(ext at simple)
+        inherits(object, class2)
+    else if(.identC(class1, class2) || .identC(class2, "ANY"))
         TRUE
-    else
-       ext at test(object)
+    else { ## look for class1 in the known subclasses of class2
+        if(!is.null(contained <- class1Def at contains[[class2]]))
+            contained at simple || contained at test(object)
+        else if (is.null(class2Def))
+            FALSE
+        else if(!.identC(class(class2Def), "classRepresentation") &&
+                isClassUnion(class2Def))
+            any(c(class1, names(class1Def at contains)) %in%
+                names(class2Def at subclasses))
+        else {
+            ext <- class2Def at subclasses[[class1]]
+            !is.null(ext) && (ext at simple || ext at test(object))
+        }
+    }
 }
 
 extends <-
@@ -76,11 +83,11 @@ extends <-
         ext <- classDef1 at contains
         if(!identical(maybe, TRUE) && length(ext) > 0)
         {
-            noTest <- sapply(ext, function(obj)identical(body(obj at test), TRUE))
+            noTest <- vapply(ext, function(obj)identical(body(obj at test), TRUE), NA)
             ext <- ext[noTest]
         }
         if(fullInfo) {
-            elNamed(ext, class1) <- TRUE
+            ext[[class1]] <- TRUE
             return(ext)
         }
         else
@@ -143,15 +150,18 @@ setIs <-
     ## be retained by saving the corresponding image)
     m1 <- classMetaName(class1)
     local1 <- exists(m1, where, inherits = FALSE) &&
-    !(classDef at sealed || bindingIsLocked(m1, where))
-    m2 <- classMetaName(class2)
-    local2 <- exists(m2, where, inherits = FALSE) &&
-    !(classDef2 at sealed || bindingIsLocked(m2, where))
-    if(!(local1 || local2) )
-        stop(gettextf("cannot create a 'setIs' relation when neither of the classes (%s and %s) is local and modifiable in this package",
-                      dQuote(class1),
-                      dQuote(class2)),
-             domain = NA)
+	!(classDef at sealed || bindingIsLocked(m1, where))
+    if(!local1) {
+	m2 <- classMetaName(class2)
+	local2 <- exists(m2, where, inherits = FALSE) &&
+	    !(classDef2 at sealed || bindingIsLocked(m2, where))
+	if(!local2)
+	    stop(gettextf(
+		"cannot create a 'setIs' relation when neither of the classes (%s and %s) is local and modifiable in this package",
+			dQuote(class1),
+			dQuote(class2)),
+		 domain = NA)
+    }
     if(classDef at sealed && !isClassUnion(classDef2))
         stop(gettextf("class %s is sealed; new superclasses can not be defined, except by 'setClassUnion'",
                       dQuote(class1)),
@@ -169,7 +179,7 @@ setIs <-
     if(!identical(ok, TRUE))
       stop(ok)
     where2 <- .findOrCopyClass(class2, classDef2, where, "subclass")
-    elNamed(classDef2 at subclasses, class1) <- obj
+    classDef2 at subclasses[[class1]] <- obj
     if(doComplete)
         classDef2 at subclasses <- completeSubclasses(classDef2, class1, obj, where)
     ## try to provide a valid prototype for virtual classes
@@ -206,7 +216,8 @@ setIs <-
     if(length(whereIs))
       whereIs[[1L]]
     else {
-        warning(gettextf("class %s is defined (with package slot %s) but no metadata object found to revise %s information---not exported?  Making a copy in package %s",
+        if(purpose != "subclass")
+            warning(gettextf("class %s is defined (with package slot %s) but no metadata object found to revise %s information---not exported?  Making a copy in package %s",
                          .dQ(class), sQuote(classDef at package), purpose,
                          sQuote(getPackageName(where, FALSE))),
                 call. = FALSE, domain = NA)
@@ -240,7 +251,7 @@ setIs <-
                                  paste(n2[is.na(match(n2, n1))], collapse = ", "))))
             bad <- character()
             for(what in n2)
-                if(!extends(elNamed(slots1, what), elNamed(slots2, what)))
+                if(!extends(slots1[[what]], slots2[[what]]))
                     bad <- c(bad, what)
             if(length(bad))
                 return(c(.msg(class1, class2), ": ",
@@ -259,7 +270,7 @@ setIs <-
     superclasses <- names(contains)
     if(length(superclasses2) == 0 || length(superclasses) == 0 ||
        all(is.na(match(superclasses2, superclasses))))
-      elNamed(contains, class2) <- value
+      contains[[class2]] <- value
     else {
         sq <- seq_along(superclasses)
         before <- (sq[match(superclasses, superclasses2,0)>0])[[1]]
diff --git a/src/library/methods/R/languageEl.R b/src/library/methods/R/languageEl.R
index 6a7e648..054aa8e 100644
--- a/src/library/methods/R/languageEl.R
+++ b/src/library/methods/R/languageEl.R
@@ -1,7 +1,7 @@
 #  File src/library/methods/R/languageEl.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
-#  Copyright (C) 1995-2012 The R Core Team
+#  Copyright (C) 1995-2014 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
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 languageEl <-
   ## extract an element of a language object, consistently
diff --git a/src/library/methods/R/makeBasicFunsList.R b/src/library/methods/R/makeBasicFunsList.R
index ee520ee..14b111a 100644
--- a/src/library/methods/R/makeBasicFunsList.R
+++ b/src/library/methods/R/makeBasicFunsList.R
@@ -1,11 +1,11 @@
 #  File src/library/methods/R/makeBasicFunsList.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
-#  Copyright (C) 1995-2013 The R Core Team
+#  Copyright (C) 1995-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
-#  the Free Software Foundation; either version 2 of the License, or
+#  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,
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 ## the executable code to complete the generics corresponding to primitives,
 ## and to define the group generics for these functions.
@@ -38,18 +38,18 @@ utils::globalVariables(".addBasicGeneric")
     }
 
     ## Next, add the remaining primitive generics
-    prims <- ls(.GenericArgsEnv, all.names=TRUE)
-    new_prims <- prims[!prims %in% names(funs)]
+    prims <- names(.GenericArgsEnv)
+    new_prims <- setdiff(prims, names(funs))
     for(nm in new_prims) {
-        f <- get(nm, envir = .GenericArgsEnv)
+        f <- .GenericArgsEnv[[nm]]
         body(f) <- substitute(standardGeneric(ff), list(ff=val))
         funs <- .addBasicGeneric(funs, nm, f, "")
     }
 
     ## Then add all the primitives that are not already there.
-    ff <- ls("package:base", all.names=TRUE)
-    prims <- ff[sapply(ff, function(x) is.primitive(get(x, "package:base")))]
-    new_prims <- prims[!prims %in% names(funs)]
+    ff <- as.list(baseenv(), all.names=TRUE)
+    prims <- ff[vapply(ff, is.primitive, logical(1L))]
+    new_prims <- setdiff(names(prims), names(funs))
     add <- rep(list(FALSE), length(new_prims))
     names(add) <- new_prims
     funs <- c(funs, add)
@@ -158,6 +158,12 @@ utils::globalVariables(".addBasicGeneric")
     setGroupGeneric(where=where,"Complex", function(z)NULL,
 		    knownMembers = members, package = "base")
 
+    funs <- .addBasicGeneric(funs, "unlist", internal=TRUE)
+### TODO: bring back if/when .Internal(is.unsorted()) is useful to override 
+    ## funs <- .addBasicGeneric(funs, "is.unsorted", internal=TRUE,
+    ##                          internalArgs=c("x", "strictly"))
+    funs <- .addBasicGeneric(funs, "as.vector", internal=TRUE)
+    
     assign(".BasicFunsList", funs, envir=where)
     rm(.addBasicGeneric, envir=where)
 }
@@ -177,6 +183,12 @@ utils::globalVariables(".addBasicGeneric")
 	       signature = "x", where = where)
     setGenericImplicit("chol2inv", where, FALSE)
 
+    setGeneric ("determinant", function(x, logarithm=TRUE, ...) standardGeneric("determinant"),
+		useAsDefault = function(x, logarithm=TRUE, ...)
+		base::determinant(x, logarithm, ...),
+		signature = c("x", "logarithm"), where = where)
+    setGenericImplicit("determinant", where, FALSE)
+
     setGeneric("rcond", function(x, norm, ...) standardGeneric("rcond"),
 	       useAsDefault = function(x, norm, ...) base::rcond(x, norm, ...),
 	       signature = c("x", "norm"), where = where)
@@ -185,6 +197,9 @@ utils::globalVariables(".addBasicGeneric")
     setGeneric("norm", function(x, type, ...) standardGeneric("norm"),
 	       useAsDefault = function(x, type, ...) base::norm(x, type, ...),
 	       signature = c("x", "type"), where = where)
+    ## this method *belong*s to the generic:
+    setMethod("norm", signature(x = "ANY", type = "missing"),
+              function (x, type, ...) norm(x, type = "O", ...))
     setGenericImplicit("norm", where, FALSE)
 
     setGeneric("backsolve", function(r, x, k = ncol(r), upper.tri = TRUE, transpose = FALSE, ...)
@@ -221,6 +236,15 @@ utils::globalVariables(".addBasicGeneric")
     setGenericImplicit("rowMeans", where, FALSE)
     setGenericImplicit("rowSums",  where, FALSE)
 
+    setGeneric("crossprod", function(x, y = NULL, ...) standardGeneric("crossprod"),
+	       useAsDefault = function(x, y = NULL, ...) base::crossprod(x, y),
+	       signature = c("x", "y"), where = where)
+    setGeneric("tcrossprod", function(x, y = NULL, ...) standardGeneric("tcrossprod"),
+	       useAsDefault = function(x, y = NULL, ...) base::tcrossprod(x, y),
+	       signature = c("x", "y"), where = where)
+    setGenericImplicit("crossprod",  where, FALSE)
+    setGenericImplicit("tcrossprod",  where, FALSE)
+
     setGeneric("sample", function(x, size, replace = FALSE, prob = NULL, ...)
 			standardGeneric("sample"),
 	       useAsDefault = function(x, size, replace = FALSE, prob = NULL, ...)
@@ -228,6 +252,19 @@ utils::globalVariables(".addBasicGeneric")
 	       signature = c("x", "size"), where = where)
     setGenericImplicit("sample", where, FALSE)
 
+    ## qr.R(): signature should only have "qr", args should have "..."
+    setGeneric("qr.R", function(qr, complete = FALSE, ...) standardGeneric("qr.R"),
+	       useAsDefault= function(qr, complete = FALSE, ...)
+                   base::qr.R(qr, complete=complete),
+	       signature = "qr", where = where)
+    setGenericImplicit("qr.R", where, FALSE)
+
+    ## our toeplitz() only has 'x'; want the generic "here" rather than "out there"
+    setGeneric("toeplitz", function(x, ...) standardGeneric("toeplitz"),
+	       useAsDefault= function(x, ...) stats::toeplitz(x),
+	       signature = "x", where = where)
+    setGenericImplicit("toeplitz", where, FALSE)
+
     ## not implicitGeneric() which is not yet available "here"
     registerImplicitGenerics(where = where)
 }
diff --git a/src/library/methods/R/method.skeleton.R b/src/library/methods/R/method.skeleton.R
index 86cda4e..abdfd30 100644
--- a/src/library/methods/R/method.skeleton.R
+++ b/src/library/methods/R/method.skeleton.R
@@ -1,5 +1,5 @@
 #  File src/library/methods/R/method.skeleton.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
 #  Copyright (C) 1995-2012 The R Core Team
 #
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 method.skeleton <- function (generic, signature, file, external = FALSE,
 			     where = topenv(parent.frame()))
diff --git a/src/library/methods/R/methods-defunct.R b/src/library/methods/R/methods-defunct.R
index d9e6e82..5410098 100644
--- a/src/library/methods/R/methods-defunct.R
+++ b/src/library/methods/R/methods-defunct.R
@@ -1,5 +1,5 @@
 #  File src/library/methods/R/methods-deprecated.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
 #  Copyright (C) 1995-2012 The R Core Team
 #
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 
 ## <entry>
diff --git a/src/library/methods/R/methods-deprecated.R b/src/library/methods/R/methods-deprecated.R
index 406599c..ac8b480 100644
--- a/src/library/methods/R/methods-deprecated.R
+++ b/src/library/methods/R/methods-deprecated.R
@@ -1,5 +1,5 @@
 #  File src/library/methods/R/methods-deprecated.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
 #  Copyright (C) 1995-2012 The R Core Team
 #
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 
 ## <entry>
diff --git a/src/library/methods/R/methodsTable.R b/src/library/methods/R/methodsTable.R
index c8ef86b..0f698b5 100644
--- a/src/library/methods/R/methodsTable.R
+++ b/src/library/methods/R/methodsTable.R
@@ -1,7 +1,7 @@
 #  File src/library/methods/R/methodsTable.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
-#  Copyright (C) 1995-2012 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
@@ -14,33 +14,30 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 ### merge version called from namespace imports code.  Hope to avoid using generic
 .mergeMethodsTable2 <- function(table, newtable, envir, metaname) {
-    old <- objects(envir=table, all.names=TRUE)
+    old <- as.list(table, all.names=TRUE)
     mm <- 1
     for( what in old) {
-      mm <- get(what, envir =table)
-      if(is(mm, "MethodDefinition")) {
-          mm <- length(mm at defined)
+      if(is(what, "MethodDefinition")) {
+          mm <- length(what at defined)
           break
       }
     }
-    new <- objects(envir=newtable, all.names=TRUE)
+    new <- as.list(newtable, all.names=TRUE)
     ## check that signature length doesn't change
     canStore <- TRUE
     for(what in new) {
-        obj <- get(what, envir = newtable)
-        if(is(obj, "MethodDefinition") &&
-           length(obj at defined) != mm) {
+        if(is(what, "MethodDefinition") &&
+           length(what at defined) != mm) {
             canStore <- FALSE
             break
         }
     }
     if(canStore) {
-        for(what in new)
-          assign(what, get(what, envir = newtable), envir = table)
+        list2env(new, table)
         table
     }
     else { # rats! have to get the generic function
@@ -55,35 +52,31 @@
 ## action on attach, detach to merge methods tables
 .mergeMethodsTable <- function(generic, table, newtable, add = TRUE) {
   fenv <- environment(generic)
-  signature <- generic at signature
+##  signature <- generic at signature
   if(!exists(".SigLength", envir = fenv, inherits = FALSE))
      .setupMethodsTables(generic)
-  if(add)
-      allTable <- NULL # .AllMTable but only if required
-  else
-      allTable <- get(".AllMTable", envir = fenv)
+  allTable <- if(!add) get(".AllMTable", envir = fenv) ## else NULL
+                                        # .AllMTable but only if required
   n <- get(".SigLength", envir = fenv)
   anySig <- rep("ANY", n) # assert doesn't need to be a real signature
-  anyLabel <- .sigLabel(anySig)
-  newMethods <- objects(envir=newtable, all.names=TRUE)
+##  anyLabel <- .sigLabel(anySig)
+  newMethods <- names(newtable)
   for(what in newMethods) {
-    obj <- get(what, envir = newtable)
+    obj <- newtable[[what]]
     if(is.primitive(obj))
       sig <- anySig
     else if(is(obj, "MethodDefinition"))
       sig <- obj at defined
     else if(is.environment(obj)) {
-       objsWhat <- objects(obj, all.names=TRUE)
+       objsWhat <- as.list(obj, all.names=TRUE, sorted=TRUE)
        if(length(objsWhat) == 0)
            next # empty environment, ignore
-       sig <- NULL
-       for(ww in objsWhat) {
-           objw <- get(ww, envir = obj)
-           if(is(objw, "MethodDefinition"))
-               sig <- objw at defined
-       }
-       if(is.null(sig))
+       isDef <- vapply(objsWhat, is, logical(1L), "MethodDefinition")
+       if (any(isDef)) {
+           sig <- objsWhat[[utils::tail(which(isDef), 1L)]]@defined
+       } else {
            sig <- anySig
+       }
     }
     else
       stop(gettextf("invalid object in meta table of methods for %s, label %s, had class %s",
@@ -110,7 +103,7 @@
         signames <- generic at signature
         length(signames) <- ns
         .resetTable(table, ns, signames)
-        assign(".SigLength", ns, envir = fenv)
+        fenv[[".SigLength"]] <- ns
         n <- ns
       }
     }
@@ -120,9 +113,9 @@
             ## must replace in .AllMTable also
             if(is.null(allTable))
                 allTable <- get(".AllMTable", envir = fenv)
-            assign(what, obj, envir = allTable)
+            allTable[[what]] <- obj
         }
-        assign(what, obj, envir = table)
+        table[[what]] <- obj
     }
     else if(exists(what, envir = table, inherits = FALSE) &&
             !all(obj at defined == "ANY") ) {
@@ -141,8 +134,8 @@
         obj at target <- sig
     }
     else if(is.environment(obj)) {
-        xtrPkg <- rep("methods", nadd)
-        for(what in objects(obj)) {
+##        xtrPkg <- rep("methods", nadd)
+        for(what in names(obj)) {
             objw <- get(what, envir = obj)
             if(is(objw, "MethodDefinition")) {
                 sigw <- objw at defined
@@ -155,7 +148,7 @@
                 objw at defined <- objw at target <- sigw
                 remove(list = what, envir = obj)
                 var <- .pkgMethodLabel(objw)
-                if(nzchar(var)) assign(var, objw, envir = obj)
+                if(nzchar(var)) obj[[var]] <- objw
             }
         }
     }
@@ -179,9 +172,7 @@
     current <- get(what, envir = table)
     if(is.environment(current)) {
         if(is.environment(obj))
-            for(whatObj in objects(obj, all.names = TRUE))
-                assign(whatObj, get(whatObj, envir = obj),
-                       envir = current)
+            list2env(as.list(obj, all.names=TRUE), current)
         else if(is(obj, "MethdodDefinition")) {
             var <- .pkgMethodLabel(obj)
             if(nzchar(var)) assign(var, obj, envir = current)
@@ -207,9 +198,7 @@
         else if(is.environment(obj)) {
             merge <- new.env()
             assign(.pkgMethodLabel(current), current, envir = merge)
-            for(whatObj in objects(obj, all.names = TRUE))
-                assign(whatObj, get(whatObj, envir = obj),
-                       envir = merge)
+            list2env(as.list(obj, all.names=TRUE), merge)
             return(merge)
         }
         ## else adding a primitive, should do nothing
@@ -239,9 +228,9 @@
     ## once generic functions are installed from 2.11.0 or later, this should
     ## only be called with mlist a method or NULL.
     if(is.null(mlist)) return(table)
-    m <- (if(is(mlist, "MethodsList")) mlist at methods
-        else list(ANY=mlist)
-        )
+    m <- if(is(mlist, "MethodsList")) { .MlistDeprecated(); mlist at methods }
+	 else list(ANY=mlist)
+
   ## once MethodsList is defunct, this should be rewritten (and renamed!)
 
   ## the methods slot is a list named by class, with elements either
@@ -257,6 +246,7 @@
         remove(list = .sigLabel(sig), envir = table)
     }
     else if(is(el,"MethodsList")) {
+	.MlistDeprecated()
       i1 <- i+1
       if(i1 >= length(sig)) {
         ## a reset of the labels will be needed
@@ -266,7 +256,8 @@
       Recall(table, sig, el, i1, add, fenv)
     }
     else
-      stop(gettextf("invalid mlist element for signature %s at level %d (should be methods list or method, had class %s)",
+      stop(gettextf(
+   "invalid mlist element for signature %s at level %d (should be MethodDefinition or .Primitive, had class %s)",
                     sQuote(classes[[j]]),
                     i,
                     dQuote(class(el))),
@@ -279,8 +270,7 @@
                                 table = get(".AllMTable", envir = fenv)) {
     ## store method in cache table.
     ## called from setMethod()
-    ## also Called from cacheMethod (from as(),
-  ## as<-())
+    ## also Called from cacheMethod (from as(), as<-())
   fenv <- environment(fdef)
   if(missing(table) && !exists(".AllMTable", envir = fenv, inherits = FALSE))
     .setupMethodsTables(fdef)
@@ -413,7 +403,7 @@
     anyLabel <- rep("ANY", n)
     anyPkg <- rep("methods", n)
     seqN <- 1L:n
-    labels <- objects(envir=table, all.names = TRUE)
+    labels <- names(table)
     for(what in labels) {
         method <- get(what, envir = table)
         if(is.primitive(method)) # stored as default ?
@@ -468,8 +458,7 @@
     ## signature, with "missing" for missing args
     if(!is.environment(table)) {
         if(is(fdef, "standardGeneric"))
-          stop("invalid or unset methods table in generic function \"",
-               fdef at generic,"\"", damain = NA)
+          stop(gettextf("invalid or unset methods table in generic function %s", sQuote(fdef at generic)), damain = NA)
         else
           stop("trying to find a methods table in a non-generic function")
     }
@@ -531,13 +520,10 @@
 	cat(" .fI> length(unique(method labels)) = ", length(labels))
 	if(verbose >= 2) { cat(";  labels = \n") ; print(labels) }
     }
-    allMethods <- objects(envir=table, all.names=TRUE)
-    found <- match(labels, allMethods, 0L) > 0L
-    nFound <- length(lab.found <- labels[found])
-    methods <- list() # =?= vector("list", nFound) ; but fails??
-    for(label in lab.found)
-      methods[[label]] <- get(label, envir = table)
-    if(verbose) cat(" >> found: ", nFound, "\n")
+    allMethods <- names(table)
+    found <- labels %in% allMethods
+    methods <- mget(labels[found], table)
+    if(verbose) cat(" >> found: ", length(methods), "\n")
     if(hasGroup) {
         ##  add the  group methods recursively found but each time
         ## only those not already included in found.
@@ -586,7 +572,7 @@
         if(length(select) > 1L) {
             if(verbose) cat(" .fI> found", length(select)," best methods\n")
 
-            target <- .sigLabel(classes)
+##            target <- .sigLabel(classes)
             condAction <- getOption("ambiguousMethodSelection")
             if(is.null(condAction))
               condAction <- .ambiguousMethodMessage
@@ -632,14 +618,11 @@
 }
 
 .checkDuplicateMethodClasses <- function(classDefs, env, label){
-    matches <- list()
     supers <- strsplit(label, "#", TRUE)[[1]]
-    plabels <- strsplit(objects(env, all.names = TRUE), "#", TRUE)
-    for(plabel in plabels) {
-        if(.hasThisSubclass(classDefs, supers, plabel))
-            matches[[plabel]] <- get(plabel, envir = env)
-    }
-    matches
+    plabels <- strsplit(sort(names(env)), "#", TRUE)
+    hasSubclass <- vapply(plabels, .hasThisSubclass, logical(1L),
+                          classDefs=classDefs, supers=supers)
+    mget(plabels[hasSubclass], env)
 }
 
 .hasThisSubclass <- function(classDefs, supers, plabel) {
@@ -687,11 +670,11 @@
       what
     else {
 	eligible <-
-	    sapply(contains,
+	    vapply(contains,
 		   if(simpleOnly)
 		   function(x) (is.logical(x) && x) || x at simple
 		   else # eliminate conditional inheritance
-		   function(x) (is.logical(x) && x) || x at simple || identical(body(x at test), TRUE))
+		   function(x) (is.logical(x) && x) || x at simple || identical(body(x at test), TRUE), NA)
 	what[eligible]
     }
 }
@@ -716,7 +699,7 @@
 {
     fdef <- getGeneric(f)
     env <- environment(fdef)
-    target <- method at target
+##    target <- method at target
     n <- get(".SigLength", envir = env)
     defined <- method at defined
     m <- length(defined)
@@ -727,7 +710,10 @@
       ## have package attribute--see .sigLabel
       defined <-  new("signature", fdef, c(defined at .Data, rep("ANY", n-m)))
     excluded <- c(prev, .sigLabel(defined))
-    methods <- .findInheritedMethods(defined, fdef, mtable = NULL, excluded = excluded)
+    allTable <- .getMethodsTable(fdef, inherited = TRUE)
+    methods <- .findInheritedMethods(defined, fdef, mtable = NULL,
+                                     table = allTable,
+                                     excluded = excluded)
     if(length(methods) == 0L) # use default method, maybe recursively.
         methods <- list(finalDefaultMethod(fdef at default)) #todo: put a label on it?
     if(length(methods) > 1L)
@@ -749,7 +735,7 @@
   if(length(methods) == 1L)
     return(methods[[1L]]) # the method
   else if(length(methods) == 0L) {
-    cnames <- paste0("\"", sapply(classes, as.character), "\"",
+    cnames <- paste0("\"", vapply(classes, as.character, ""), "\"",
 		     collapse = ", ")
     stop(gettextf("unable to find an inherited method for function %s for signature %s",
                   sQuote(fdef at generic),
@@ -760,19 +746,28 @@
     stop("Internal error in finding inherited methods; didn't return a unique method", domain = NA)
 }
 
-.findMethodInTable <- function(signature, table, fdef = NULL)
+.findMethodForFdef <- function(signature, table, fdef = NULL) {
+    value <- .findMethodInTable(signature, table, fdef)
+    if(is.null(value) && is(fdef, "genericFunction")) { # try without expanding signature
+        fullSig <- .matchSigLength(signature, fdef, environment(fdef), FALSE)
+        if(!identical(fullSig, signature))
+            value <- .findMethodInTable(signature, table, fdef, FALSE)
+    }
+    value
+}
+
+.findMethodInTable <- function(signature, table, fdef = NULL , expdSig = TRUE)
 {
-    if(is(fdef, "genericFunction"))
+    if(is(fdef, "genericFunction") && expdSig)
         signature <- .matchSigLength(signature, fdef, environment(fdef), FALSE)
     label <- .sigLabel(signature)
 ##     allMethods <- objects(table, all.names=TRUE)
 ##     if(match(label, allMethods, nomatch = 0L))
-    if(exists(label, envir = table, inherits = FALSE)) {
-        value <- get(label, envir = table) ## else NULL
+    if(!is.null(value <- table[[label]])) {
         if(is.environment(value)) {
-            pkgs <- objects(value, all.names = TRUE)
+            pkgs <- names(value)
             if(length(pkgs) == 1)
-                value <- get(pkgs, envir = value)
+                value <- value[[pkgs]]
             else if(length(pkgs) == 0)
                 value <- NULL
             ## else, return the environment indicating multiple possibilities
@@ -815,6 +810,7 @@
 	cli <- defClasses[i,]
 	dist <- dist + ihi[match(cli, names(ihi))]
     }
+    ## These should be integers, so we do not need to worry about a decimal point
     if(verbose) cat("** final methods' distances: (",
 		    paste(formatC(dist), collapse= ", "), ")\n", sep='')
     best <- dist == min(dist)
@@ -901,9 +897,9 @@
   }
   ## prefer partially direct methods
   if(length(which) > 1) {
-    direct <- sapply(methods[which], function(x, target)
+    direct <- vapply(methods[which], function(x, target)
                      (is(x, "MethodDefinition") && any(target == x at defined)),
-                     target = target)
+		     NA, target = target)
     if(any(direct) && !all(direct)) {
       which <- which[direct]
       note <- c(note, sprintf(ngettext(length(which),
@@ -979,14 +975,15 @@
 .updateMethodsInTable <- function(generic, where, attach) {
   fenv <- environment(generic)
   reset <- identical(attach, "reset")
-  if(!exists(".MTable", envir = fenv, inherits = FALSE))
-    .setupMethodsTables(generic)
-  mtable <- get(".MTable", envir = fenv)
+  if(is.null(mtable <- fenv$.MTable)) {
+      .setupMethodsTables(generic)
+      mtable <- get(".MTable", envir = fenv)
+  }
   if(!reset) {
     env <- as.environment(where)
     tname <- .TableMetaName(generic at generic, generic at package)
-    if(exists(tname, envir = env, inherits = FALSE)) {
-      .mergeMethodsTable(generic, mtable, get(tname, envir = env), attach)
+    if(!is.null(tt <- env[[tname]])) {
+      .mergeMethodsTable(generic, mtable, tt, attach)
     }
     ## else used to warn, but the generic may be implicitly required
     ## by class inheritance, without any explicit methods in this package
@@ -1009,13 +1006,12 @@
 
 .resetInheritedMethods <- function(fenv, mtable) {
     allObjects <- character()
-    direct <- objects(mtable, all.names=TRUE)
-    if(exists(".AllMTable", envir = fenv, inherits = FALSE)) {
+    direct <- names(mtable)
+    if(!is.null(allTable <- fenv$.AllMTable)) {
         ## remove all inherited methods.  Note that code (e.g. setMethod) that asigns
         ## a new method to mtable is responsible for copying it to allTable as well.
-        allTable <- get(".AllMTable", envir = fenv)
-        allObjects <- objects(allTable, all.names=TRUE)
-        remove(list= allObjects[is.na(match(allObjects, direct))], envir = allTable)
+        allObjects <- names(allTable)
+        remove(list = setdiff(allObjects, direct), envir = allTable)
     }
     else {
         allTable <- new.env(TRUE, fenv)
@@ -1023,9 +1019,12 @@
     }
     ## check for missing direct objects; usually a non-existent AllMTable?
     if(any(is.na(match(direct, allObjects)))) {
-        direct <- objects(mtable, all.names=TRUE)
-        for(what in direct)
-          assign(what, get(what, envir = mtable), envir = allTable)
+        list2env(as.list(mtable, all.names=TRUE), allTable)
+    }
+    for (d in direct) {
+        m <- allTable[[d]]
+        if (is(m, "MethodWithNext"))
+            allTable[[d]] <- as(m, "MethodDefinition")
     }
     NULL
 }
@@ -1039,19 +1038,19 @@
     cf <- function(...) cat(file = printTo, sep = "", ...)
     sigString <- function(sig)
 	paste0(names(sig), "=\"", as.character(sig), "\"", collapse = ", ")
-    qs <- function(what) paste0('"', what, '"', collapse = ", ")
+##    qs <- function(what) paste0('"', what, '"', collapse = ", ")
     doFun <- function(func, pkg) cf("Function: ", func, " (package ", pkg, ")\n")
     env <- environment(generic)
-    signature <- generic at signature
+##    signature <- generic at signature
     table <- get(if(inherited) ".AllMTable" else ".MTable", envir = env)
     f <- generic at generic
     p <- packageSlot(f)
     if(is.null(p)) p <- "base"
     deflt <- new("signature", generic, "ANY")
-    labels <- objects(envir=table, all.names = TRUE)
-    if(!is.null(classes) && length(labels)) {
+    labels <- sort(names(table))
+    if(!is.null(classes) && length(labels) > 0L) {
 	sigL <- strsplit(labels, split = "#")
-	keep <- !sapply(sigL, function(x, y) all(is.na(match(x, y))), classes)
+	keep <- !vapply(sigL, function(x, y) all(is.na(match(x, y))), NA, y=classes)
 	labels <- labels[keep]
     }
     if(length(labels) == 0L) {
@@ -1063,12 +1062,11 @@
     }
     ## else: non-empty methods list
     doFun(f,p)
-    for(what in labels) {
-	m <- get(what, envir = table)
-        if(is.environment(m)) {  ## duplicate class case -- compare .findMethodInTable()
-            pkgs <- objects(m)
+    for(m in mget(labels, table)) {
+	if(is.environment(m)) {  ## duplicate class case -- compare .findMethodInTable()
+            pkgs <- names(m)
             if(length(pkgs) == 1)
-                m <- get(pkgs, envir = m)
+                m <- m[[pkgs]]
             else if(length(pkgs) > 1)
                 cf("  (", length(pkgs), " methods defined for this signature, with different packages)\n")
         }
@@ -1136,14 +1134,13 @@ useMTable <- function(onOff = NA)
                     dQuote(class(gen))),
            domain = NA)
     table <- .getMethodsTable(gen)
-    allMethods <- objects(envir=table, all.names = TRUE)
+    allMethods <- sort(names(table))
     ## TODO:  possible for .SigLength to differ between group &
     ## members.  Requires expanding labels to max. length
     newFound <- rep(FALSE, length(found))
-    newFound[!found] <- (match(labels[!found], allMethods, 0L) > 0L)
+    newFound[!found] <- labels[!found] %in% allMethods
     found <- found | newFound
-    for(what in labels[newFound])
-      methods[[what]] <- get(what, envir = table)
+    methods[labels[newFound]] <- mget(labels[newFound], table)
   }
   methods
 }
@@ -1207,9 +1204,11 @@ useMTable <- function(onOff = NA)
               domain = NA)
     else {
       ev <- environment(fdef)
-      if(!exists(".SigLength", envir = ev, inherits = FALSE))
-        .setupMethodsTables(fdef)
-      sigs[i] <- get(".SigLength", envir = ev)
+      if(is.null(sigl <- ev$.SigLength)) {
+	  .setupMethodsTables(fdef)
+	  sigl <- get(".SigLength", envir = ev)
+      }
+      sigs[i] <- sigl
     }
   }
   n <- max(sigs)
@@ -1289,10 +1288,9 @@ outerLabels <- function(labels, new) {
     ## TODO:  nSig should be a slot in the table
   tname <- .TableMetaName(fdef at generic, fdef at package)
   where <- as.environment(where)
-  if(exists(tname, envir =where, inherits = FALSE)) {
-     table <- get(tname, envir = where)
-     if(length(signature) > nSig)
-       .resetTable(table, length(signature), fdef at signature[seq_along(signature)])
+  if(!is.null(table <- where[[tname]])) {
+    if(length(signature) > nSig)
+      .resetTable(table, length(signature), fdef at signature[seq_along(signature)])
   }
   else {
     table <- new.env(TRUE, environment(fdef))
@@ -1303,7 +1301,7 @@ outerLabels <- function(labels, new) {
 
 ## Assertion: following is unused
 .assignMethodsMetaTable <- function(mlist, generic, where, overwrite = TRUE) {
-    .MlistDeprecated(".assignMethodsMetaTable")
+    .MlistDefunct(".assignMethodsMetaTable")
     tname <- .TableMetaName(generic at generic, generic at package)
     if(overwrite || !exists(tname, envir = where, inherits = FALSE)) {
         table <- .mlistAddToTable(generic, mlist) # asserted never to be called.
@@ -1337,7 +1335,7 @@ tableNames <- function(generic, where, table) {
 	    if(missing(where)) .getMethodsTable(fdef)
 	    else get(.TableMetaName(fdef at generic, fdef at package),
                      envir = as.environment(where), inherits = FALSE)
-    objects(envir=table, all.names=TRUE)
+    names(table)
 }
 
 listFromMethods <- function(generic, where, table) {
@@ -1349,8 +1347,8 @@ listFromMethods <- function(generic, where, table) {
 		     envir = as.environment(where), inherits = FALSE)
     fev <- environment(fdef)
     nSigArgs <- .getGenericSigLength(fdef, fev)
-    names <- objects(envir=table, all.names=TRUE)
-    methods <- lapply(names, function(x)get(x, envir = table))
+    methods <- as.list(table, all.names=TRUE)
+    names <- names(methods)
     if(nSigArgs > 1) {
         n <- length(names)
         sigs <- vector("list", n)
@@ -1365,6 +1363,7 @@ listFromMethods <- function(generic, where, table) {
 }
 
 .makeMlist1 <- function(arg, objects, j = 1) {
+    .MlistDefunct(".makeMlist1()")
     mnames <- character(length(objects))
     for(i in seq_along(objects)) {
         what <- objects[[i]]
@@ -1380,6 +1379,7 @@ listFromMethods <- function(generic, where, table) {
 
 .makeMlist2 <- function(args, objects, j = 1) {
     ## make a list according to  argument j, convert these as needed
+    .MlistDefunct(".makeMlist2()")
     mlists <- list()
     for(what in objects) {
         sig <- if(!is.primitive(what)) what at defined # else NULL
@@ -1407,12 +1407,7 @@ listFromMethods <- function(generic, where, table) {
 }
 
 .makeMlistFromTable <- function(generic, where = NULL) {
-    .getAll <- function(what, table) {
-        value <- list(length(what))
-        for(i in seq_along(what))
-          value[[i]] <- get(what[[i]], envir = table)
-        value
-    }
+    .MlistDefunct(".makeMlistFromTable()")
     if(is.null(where)) {
         what <- ".MTable"
         where <- environment(generic)
@@ -1426,22 +1421,23 @@ listFromMethods <- function(generic, where, table) {
     else
         table <- new.env()
     value <- new("MethodsList", argument = as.name(generic at signature[[1]]))
-    allNames <- objects(envir=table, all.names = TRUE)
+    allNames <- sort(names(table))
     if(length(allNames) == 0L)
       return(value)
     argNames <- generic at signature
     ## USES THE PATTERN OF class#class#.... in the methods tables
     nargs <- nchar(unique(gsub("[^#]","", allNames)))+1
     if(length(nargs) > 1L) {
-        warning("something weird:  inconsistent number of args in methods table strings:", paste(nargs,collapse = ", ")," (using the largest value)",
+	warning("something weird:  inconsistent number of args in methods table strings:",
+		paste(nargs,collapse = ", ")," (using the largest value)",
                 domain = NA)
         nargs <- max(nargs)
     }
     length(argNames) <- nargs # the number of args used
     if(nargs == 1)
-        .makeMlist1(as.name(argNames[[1L]]), .getAll(allNames, table))
+        .makeMlist1(as.name(argNames[[1L]]), mget(allNames, table))
     else
-      .makeMlist2(argNames, .getAll(allNames, table))
+      .makeMlist2(argNames, mget(allNames, table))
  }
 
 ## assign a methods meta-data table, by default (and usually) a copy of the table
@@ -1449,14 +1445,14 @@ listFromMethods <- function(generic, where, table) {
 .assignMethodsTableMetaData <- function(name, generic, where, table) {
     what <-  .TableMetaName(generic at generic, generic at package)
     if(missing(table))
-          table <- .copyEnv(.getMethodsTable(generic))
+	table <- .copyEnv(.getMethodsTable(generic))
     assign(what, table, envir = as.environment(where))
 }
 
 .getMethodsTableMetaData <-  function(generic, where, optional = FALSE) {
-    what <-  .TableMetaName(generic at generic, generic at package)
-    if(exists(what, envir = where, inherits = FALSE))
-      get(what, envir = where )
+    what <- .TableMetaName(generic at generic, generic at package)
+    if(!is.null(f <- get0(what, envir = where, inherits = FALSE)))
+	f
     else if(optional)
       NULL
     else
@@ -1489,14 +1485,11 @@ listFromMethods <- function(generic, where, table) {
 testInheritedMethods <- function(f, signatures, test = TRUE,  virtual = FALSE,
                                  groupMethods = TRUE,  where = .GlobalEnv)
 {
-  getSigs <- function(fdef)
-      objects(methods:::.getMethodsTable(fdef), all.names = TRUE)
-
   ## Function relevantClasses is defined here to set object .undefClasses
   ## in testInheritedMethods as a marker to warn about undefined subclasses
   .relevantClasses <- function(classes, excludeVirtual, where, doinheritance) {
     classDefs <- lapply(classes, getClassDef, where)
-    undefs <- sapply(classDefs, is.null)
+    undefs <- vapply(classDefs, is.null, NA)
     if(any(undefs)) {
       .undefClasses <<- unique(c(.undefClasses, classes[undefs]))
       classes <- classes[!undefs]
@@ -1526,7 +1519,7 @@ testInheritedMethods <- function(f, signatures, test = TRUE,  virtual = FALSE,
       classDefs[[iAny]] <- getClassDef(".Other")
     }
     if(excludeVirtual)
-      classes <- classes[sapply(classDefs, function(def) identical(def at virtual, FALSE))]
+      classes <- classes[vapply(classDefs, function(def) identical(def at virtual, FALSE), NA)]
     unique(c(classes, allSubs))
   }
   ## end of .relevantClasses
@@ -1620,9 +1613,9 @@ testInheritedMethods <- function(f, signatures, test = TRUE,  virtual = FALSE,
           nsig
       }
       else if(is.null(x))
-        rep("<NONE>", length(sig))
+        rep_len("<NONE>", length(sig))
       else # primitive
-        rep("ANY", length(sig))
+        rep_len("ANY", length(sig))
     }
     signatures <- lapply(signatures, doSelect)
   }
diff --git a/src/library/methods/R/oldClass.R b/src/library/methods/R/oldClass.R
index c3eddfb..f3ed67f 100644
--- a/src/library/methods/R/oldClass.R
+++ b/src/library/methods/R/oldClass.R
@@ -1,7 +1,7 @@
 #  File src/library/methods/R/oldClass.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
-#  Copyright (C) 1995-2012 The R Core Team
+#  Copyright (C) 1995-2015 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
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 ## assumes oldClass has been defined as a virtual class
 
@@ -60,11 +60,10 @@ setOldClass <- function(Classes, prototype = NULL,
     ## to convert S4 objects in S3 method dispatch.
     ## TODO:  should provide an optional argument to setOldClass()
     ## to prevednt this conversion if it's not needed
-    if(!exists(".S3MethodsClasses", envir = where, inherits = FALSE)) {
+    if(is.null(S3table <- where$.S3MethodsClasses)) {
       S3table <- new.env()
       assign(".S3MethodsClasses", S3table, envir = where)
     }
-    else S3table <- get(".S3MethodsClasses", envir = where)
     dataPartClass <- NULL
     for(cl in rev(Classes)) {
        S3Class <- c(cl, S3Class)
@@ -142,11 +141,19 @@ setOldClass <- function(Classes, prototype = NULL,
     def at slots <- c(def at slots, curDef at slots)
     ext <- c(def at contains, curDef at contains)
     ## correct ordering & duplicate resolution: copied from .walkClassGraph
-    distOrder <- sort.list(sapply(ext, function(x)x at distance))
+    distOrder <- sort.list(vapply(ext, function(x) x at distance, 1))
     ext <- ext[distOrder]
     if(anyDuplicated(names(ext)))
         ext <- .resolveSuperclasses(def, ext, where)
     def at contains <- ext
+    oldSupers <- setdiff(names(def at contains), names(curDef at contains))
+    addSubclass <- function(super) {
+      superDef <- getClassDef(super, where)
+      superWhere <- .findOrCopyClass(super, superDef, where, "subclass")
+      superDef at subclasses[[Class]] <- def at contains[[super]]
+      assignClassDef(super, superDef, superWhere, TRUE)
+    }
+    lapply(oldSupers, addSubclass)
     subcls <- curDef at subclasses
     if(length(subcls) > 0) {
       def at subclasses[names(subcls)]  <- subcls
@@ -177,11 +184,11 @@ setOldClass <- function(Classes, prototype = NULL,
         n1 <- names(slots1)
         bad <- character()
         for(what in n2[match(n2, n1, 0) > 0])
-          if(!extends(elNamed(slots1, what), elNamed(slots2, what))) {
+          if(!extends(slots1[[what]], slots2[[what]])) {
               message(gettextf("slot %s: class %s should extend class %s",
                                sQuote(what),
-                               dQuote(elNamed(slots1, what)),
-                               dQuote(elNamed(slots2, what))),
+                               dQuote(slots1[[what]]),
+                               dQuote(slots2[[what]])),
                       domain = NA)
               bad <- c(bad, what)
           }
@@ -266,7 +273,7 @@ S3Class <- function(object) {
 
 .addS3Class <- function(class, prototype, contains, where) {
     for(what in contains) {
-        whatDef <- getClassDef(what at superClass, where = where)
+        whatDef <- getClassDef(what at superClass, package=packageSlot(what))
         if(isXS3Class(whatDef))
           class <- c(class, attr(whatDef at prototype, ".S3Class"))
     }
@@ -296,7 +303,7 @@ S3Class <- function(object) {
 ## name are added, other than the className slot and the super/sub class names
 ## in the contains, subclasses slots respectively.
 .renameClassDef <- function(def, className) {
-    oldName <- def at className
+##    oldName <- def at className
     validObject(def) # to catch any non-SClassExtension objects
     def at className <- className
     comp <- def at contains
diff --git a/src/library/methods/R/packageName.R b/src/library/methods/R/packageName.R
index 83dbe04..46b0e56 100644
--- a/src/library/methods/R/packageName.R
+++ b/src/library/methods/R/packageName.R
@@ -1,7 +1,7 @@
 #  File src/library/methods/R/packageName.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
-#  Copyright (C) 1995-2012 The R Core Team
+#  Copyright (C) 1995-2015 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
@@ -14,23 +14,21 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 ## utilities to manage package names
 
 getPackageName <- function(where = topenv(parent.frame()), create = TRUE) {
-    pkg <- ""
-    hasNameSaved <- exists(".packageName", where, inherits = FALSE)
-    if(hasNameSaved)
-        pkg <- get(".packageName", where)
-    else  if(identical(where, 1) || identical(as.environment(where), topenv(parent.frame())))
-        pkg <- Sys.getenv("R_PACKAGE_NAME")
     env <- as.environment(where)
-    envName <- environmentName(env)
-    if(nzchar(envName)) {
-        if(regexpr("package:", envName, fixed = TRUE) == 1L)
-          pkg <- sub("package:","", envName, fixed = TRUE)
+    notSaved <- is.null(pkg <- get0(".packageName", env, inherits = FALSE))
+    if(notSaved) {
+	pkg <- if(identical(where, 1) || identical(env, topenv(parent.frame())))
+	    Sys.getenv("R_PACKAGE_NAME")
+	else ""
     }
+    envName <- environmentName(env)
+    if(nzchar(envName) && regexpr("package:", envName, fixed = TRUE) == 1L)
+	pkg <- .rmpkg(envName)
     if(!nzchar(pkg)) { ## is still ""
         if(identical(env, .GlobalEnv))
             pkg <- ".GlobalEnv"
@@ -45,12 +43,12 @@ getPackageName <- function(where = topenv(parent.frame()), create = TRUE) {
                         pkg <- db; break
                     }
             }
-            else if(nzchar(environmentName(env)))
-                pkg <- environmentName(env)
+            else if(nzchar(envName))
+                pkg <- envName
             else
                 pkg <- as.character(where)
-            if(identical(substr(pkg, 1L, 8L), "package:"))
-                pkg <- substr(pkg, 9L, nchar(pkg, "c"))
+
+	    pkg <- .rmpkg(pkg)
         }
 #  Problem:  the library() function should now be putting .packageName in package environments
 #   but namespace makes them invisible from outside.
@@ -63,13 +61,19 @@ getPackageName <- function(where = topenv(parent.frame()), create = TRUE) {
 #              warning("The package name \"", pkg, "\" was inferred, but not found in that package")
 #         }
     }
+    if (!nzchar(pkg)) {
+        top <- topenv(env)
+        if (!identical(top, env)) {
+            pkg <- getPackageName(top, create=create)
+        }
+    }
     if(!nzchar(pkg) && create) {
         pkg <- as.character(Sys.time())
         warning(gettextf("Created a package name, %s, when none found",
                          sQuote(pkg)),
                 domain = NA)
         assign(pkg, env, envir = .PackageEnvironments)
-        if(!(hasNameSaved || environmentIsLocked(env)))
+	if(notSaved && !environmentIsLocked(env))
             setPackageName(pkg, env)
     }
     pkg
diff --git a/src/library/methods/R/promptClass.R b/src/library/methods/R/promptClass.R
index 90ddad7..88aedea 100644
--- a/src/library/methods/R/promptClass.R
+++ b/src/library/methods/R/promptClass.R
@@ -1,7 +1,7 @@
 #  File src/library/methods/R/promptClass.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
-#  Copyright (C) 1995-2012 The R Core Team
+#  Copyright (C) 1995-2014 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
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 promptClass <-
 function (clName, filename = NULL, type = "class",
@@ -68,7 +68,7 @@ function (clName, filename = NULL, type = "class",
     cleanPrompt <- function(object, name) {
         ## get the prompt() result and clean out the junk
         ## lines that prompt() creates
-        value <- prompt(object, name = name, filename = NA)
+        value <- utils::prompt(object, name = name, filename = NA)
         for(i in seq_along(value)) {
             item <- value[[i]]
             bad <- grepl("^ *%", item)
@@ -90,7 +90,7 @@ function (clName, filename = NULL, type = "class",
     if(!missing(where) && !is.na(match(clName, getClasses(where))))
       whereClass <- where
     else {
-        whereClass <- find(classMetaName(clName))
+        whereClass <- utils::find(classMetaName(clName))
         if(length(whereClass) == 0L)
             stop(gettextf("no definition of class %s found",
                           dQuote(clName)), domain = NA)
@@ -318,7 +318,7 @@ refClassPrompt <- function(clDef, Rdtxt, nmeths, nslots, .meths.head) {
     methodDefs <- as.list(clDef at refMethods)
     nmethods <- length(methodDefs)
     if(nmethods > 0) {
-        thisClassDefs <- match(sapply(methodDefs, function(x) x at refClassName), clDef at className, 0) > 0
+        thisClassDefs <- match(vapply(methodDefs, function(x) x at refClassName, ""), clDef at className, 0) > 0
         otherMethods <- methodDefs[!thisClassDefs]
         methodDefs <- methodDefs[thisClassDefs]
         .methods <-
@@ -334,8 +334,8 @@ refClassPrompt <- function(clDef, Rdtxt, nmeths, nslots, .meths.head) {
 
 .refMethodDescription <- function(methodDefs, fieldnames, otherMethods) {
     methodnames <- names(methodDefs)
-    methodargs <- sapply(methodDefs, function(x)
-			 paste0("(", paste(formalArgs(x), collapse=", "), ")"))
+    methodargs <- vapply(methodDefs, function(x)
+			 paste0("(", paste(formalArgs(x), collapse=", "), ")"), "")
     if(length(methodnames) > 0) {
         .methods.head <- "  \\describe{"
         .methods.body <-
@@ -346,8 +346,8 @@ refClassPrompt <- function(clDef, Rdtxt, nmeths, nslots, .meths.head) {
     }
     else
         .methods <- character()
-    methodclasses <- sapply(otherMethods,
-              function(x) if(is(x, "refMethodDef")) x at refClassName else "<unknown>")
+    methodclasses <- vapply(otherMethods,
+	      function(x) if(is(x, "refMethodDef")) x at refClassName else "<unknown>", "")
     ## don't report the standard methods from envRefClass
     superclass <- methodclasses != "envRefClass"
     otherMethods <- otherMethods[superclass]
diff --git a/src/library/methods/R/rbind.R b/src/library/methods/R/rbind.R
index 5559c51..6c39f8a 100644
--- a/src/library/methods/R/rbind.R
+++ b/src/library/methods/R/rbind.R
@@ -1,7 +1,7 @@
 #  File src/library/methods/R/rbind.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
-#  Copyright (C) 1995-2012 The R Core Team
+#  Copyright (C) 1995-2015 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
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 #### S4-ized  rbind() --- this is entirely parallel to ./cbind() --- KEEP IN SYNC!
 ###  -------------------- built by
@@ -23,31 +23,38 @@
 
 rbind <- function(..., deparse.level = 1)
 {
-    na <- nargs() - !missing(deparse.level)
+    has.dl <- !missing(deparse.level)
     deparse.level <- as.integer(deparse.level)
+    if(identical(deparse.level, -1L)) deparse.level <- 0L # our hack
     stopifnot(0 <= deparse.level, deparse.level <= 2)
 
     argl <- list(...)
     ## remove trailing 'NULL's:
-    while(na > 0 && is.null(argl[[na]])) { argl <- argl[-na]; na <- na - 1 }
+    na <- nargs() - has.dl
+    while(na > 0L && is.null(argl[[na]])) { argl <- argl[-na]; na <- na - 1L }
     if(na == 0) return(NULL)
+    symarg <- as.list(substitute(list(...)))[-1L] # symbolic argument (names)
+    nmsym <- names(symarg)
+    ## Give *names* depending on deparse.level {for non-matrix}:
+    nm <- c( ## 0:
+	function(i) NULL,
+	## 1:
+	function(i) if(is.symbol(s <- symarg[[i]])) deparse(s) else NULL,
+	## 2:
+	function(i) deparse(symarg[[i]])[[1L]])[[ 1L + deparse.level ]]
+    Nms <- function(i) { if(!is.null(s <- nmsym[i]) && nzchar(s)) s else nm(i) }
     if(na == 1) {
-	if(isS4(..1)) return(rbind2(..1))
+	if(isS4(..1)) {
+	    r <- rbind2(..1)
+	    if(length(dim(..1)) < 2L && length(dim(r)) == 2L)
+		rownames(r) <- Nms(1)
+	    return(r)
+	}
 	else return(.__H__.rbind(..., deparse.level = deparse.level))
     }
 
     ## else :  na >= 2
 
-    if(deparse.level) {
-	symarg <- as.list(sys.call()[-1L])[1L:na] # the unevaluated arguments
-	## For default 'deparse.level = 1', rbind(a, b) has to give *names*!
-	Nms <- function(i) { # possibly 'deparsed' names of argument  i
-	    if(is.null(r <- names(symarg[i])) || r == "") {
-		if(is.symbol(r <- symarg[[i]]) || deparse.level == 2)
-		    deparse(r)		# else NULL
-	    } else r
-	}
-    }
     if(na == 2) {
 	r <- ..2
 	fix.na <- FALSE
@@ -56,18 +63,18 @@ rbind <- function(..., deparse.level = 1)
 	## determine ncol(<result>)  for e.g.,	rbind(diag(2), 1, 2)
 	## only when the last two argument have *no* dim attribute:
 	nrs <- unname(lapply(argl, ncol)) # of length na
-	iV <- sapply(nrs, is.null)# is 'vector'
-	fix.na <- identical(nrs[(na-1):na], list(NULL,NULL))
+	iV <- vapply(nrs, is.null, NA)# is 'vector'
+	fix.na <- identical(nrs[(na-1L):na], list(NULL,NULL))
 	if(fix.na) {
 	    ## "fix" last argument, using 1-row `matrix' of proper ncol():
-	    nr <- max(if(all(iV)) sapply(argl, length) else unlist(nrs[!iV]))
+	    nr <- max(if(all(iV)) lengths(argl) else unlist(nrs[!iV]))
 	    argl[[na]] <- rbind(rep(argl[[na]], length.out = nr),
 				deparse.level = 0)
 	    ## and since it's a 'matrix' now, rbind() below may not name it
 	}
 	## need to pass argl, the evaluated arg list to do.call();
 	## OTOH, these may have lost their original 'symbols'
-	if(deparse.level) {
+	## if(deparse.level) {
 	    if(fix.na)
 		fix.na <- !is.null(Nna <- Nms(na))
 	    if(!is.null(nmi <- names(argl))) iV <- iV & (nmi == "")
@@ -78,12 +85,12 @@ rbind <- function(..., deparse.level = 1)
 		for(i in ii[iV[ii]])
 		    if (!is.null(nmi <- Nms(i))) names(argl)[i] <- nmi
 	    }
-	}
+	## }
 	r <- do.call(rbind, c(argl[-1L], list(deparse.level=deparse.level)))
     }
 
     d2 <- dim(r)
-    r <- rbind2(..1, r)
+    r <- rbind2(..1, r) ## FIXME: add colnames depending on deparse.level
     if(deparse.level == 0)
 	return(r)
     ism1 <- !is.null(d1 <- dim(..1)) && length(d1) == 2L
diff --git a/src/library/methods/R/refClass.R b/src/library/methods/R/refClass.R
index 245008c..31cdd93 100644
--- a/src/library/methods/R/refClass.R
+++ b/src/library/methods/R/refClass.R
@@ -1,7 +1,7 @@
 #  File src/library/methods/R/refClass.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
-#  Copyright (C) 1995-2013 The R Core Team
+#  Copyright (C) 1995-2015 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
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 
 ## Classes to support OOP-style classes with reference-semantics for fields
@@ -47,22 +47,20 @@ self from reference class thisClass.'
 }
 
 installClassMethod <- function(def, self, me, selfEnv, thisClass) {
-    if(!is(def, "refMethodDef")) {  #should not happen? => need warning
-        warning(sprintf("method %s from class %s was not processed into a class method until being installed.  Possible corruption of the methods in the class.",
-                         me, thisClass at className),
-                domain = NA)
-        def <- makeClassMethod(def, me, thisClass at className, "", objects(thisClass at refMethods, all.names = TRUE))
-        .checkFieldsInMethod(def, names(thisClass at fieldClasses))
-        ## cache the analysed method definition
+    if(is(def, "externalMethodDef") || !is(def, "refMethodDef")) {
+        ## Don't process either an external method (not needed),
+        ## or a special object in the class refMethods
+        ## environment (will cause an error).  Assign it unchanged.
         assign(me, def, envir = thisClass at refMethods)
+        return(def)
     }
     depends <- def at mayCall
     environment(def) <- selfEnv # for access to fields and methods
     assign(me, def, envir = selfEnv)
     ## process those that are not in the instance environment, now that
     ## this method has been assigned.
-    done <- objects(selfEnv, all.names = TRUE)
-    notDone <- depends[is.na(match(depends, done))]
+    done <- names(selfEnv)
+    notDone <- setdiff(depends, done)
     superCase <- match("callSuper", notDone, 0)
     if(superCase > 0) {
         if(nzchar(def at superClassMethod))
@@ -105,6 +103,15 @@ installClassMethod <- function(def, self, me, selfEnv, thisClass) {
 }
 
 makeClassMethod <- function(def, name, Class, superClassMethod = "", allMethods) {
+    if(identical(formalArgs(def)[[1]], ".self"))
+        def <- externalRefMethod(def)
+    if(is(def, "externalRefMethod")) { # either just created or passed in as argument
+        ## the method just passes .self and its arguments to the actual method function
+        def at name <- name
+        def at refClassName <- Class
+        def at superClassMethod <- superClassMethod
+        return(def)
+    }
     depends <- .getGlobalFuns(def)
     ## find the field methods called ...
     if("usingMethods" %in% depends) { # including those declared
@@ -148,7 +155,14 @@ envRefSetField <- function(object, field,
 .initForEnvRefClass <- function(.Object, ...) {
     Class <- class(.Object)
     classDef <- getClass(Class)
-    selfEnv <- new.env(TRUE, .NamespaceOrPackage(classDef at package))
+    objectParent <- classDef at refMethods$.objectParent
+    if(is.null(objectParent)) {
+        ## This warning would be reasonable if we required re-installing packages for R 3.3.0
+        ## warning(
+        ##     gettextf("Class definition for Class \"%s\" doesn't have a parent environment for objects defined.\n A package  may need to be re-installed", Class))
+        objectParent <- .NamespaceOrPackage(classDef at package)
+    }
+    selfEnv <- new.env(TRUE, objectParent)
     ## the parent environment will be used by field methods, to make
     ## them consistent with functions in this class's package
     .Object at .xData <- selfEnv
@@ -164,10 +178,7 @@ envRefSetField <- function(object, field,
             if(is(fp, "defaultBindingFunction")) {
                 ## ensure an initial value
                 class <- fieldClasses[[field]]
-                if(isVirtualClass(class))
-                    value <- NULL
-                else
-                    value <- new(class)
+		value <- if(!isVirtualClass(class)) new(class) # else NULL
                 assign(.bindingMetaName(field), value, envir = selfEnv)
             }
         }
@@ -189,9 +200,13 @@ envRefSetField <- function(object, field,
         }
     }
     if(is.function(classDef at refMethods$finalize))
-        reg.finalizer(selfEnv, function(x) x$.self$finalize())
+        reg.finalizer(selfEnv, function(x) x$.self$finalize(), TRUE)
     lockBinding(".self", selfEnv)
     lockBinding(".refClassDef", selfEnv)
+    ## validObject was called from the S4 initialize; check that
+    ## a method specified for the ref. class is satisfied, if there is one
+    if(is(classDef at validity, "function"))
+        validObject(.Object)
     .Object
 }
 
@@ -258,6 +273,7 @@ initRefFields <- function(.Object, classDef, selfEnv, args) {
     invisible(x)
 }
 
+utils::globalVariables(".envRefMethods")# (codetools analysis)
 .envRefMethods <-
     list(
          export = function(Class) {
@@ -286,7 +302,7 @@ Class.  No effect on the object itself.
                  value
              }
              else if(is(classDef, "classRepresentation")) # use standard S4 as()
-                 methods::as(.self, Class)
+                  methods::as(.self, Class)
              else if(is.character(Class) && length(Class) == 1)
                  stop(gettextf("%s is not a defined class in this environment",
                                dQuote(Class)),
@@ -351,12 +367,12 @@ that class itself, but then you could just overrwite the object).
          },
          getRefClass = function(Class = .refClassDef) methods::getRefClass(Class),
          getClass = function(...) if(nargs()) methods::getClass(...) else .refClassDef,
-         field = function(name, value) if(missing(value)) get(name, envir = .self) else {
+         field = function(name, value) if(missing(value)) base::get(name, envir = .self) else {
              if(is.na(match(name, names(.refClassDef at fieldClasses))))
                  stop(gettextf("%s is not a field in this class",
                                sQuote(name)),
                       domain = NA)
-             assign(name, value, envir = .self)
+             base::assign(name, value, envir = .self)
          },
          trace = function(..., classMethod = FALSE) {
              ' Insert trace debugging for the specified method.  The arguments are
@@ -372,7 +388,7 @@ that class itself, but then you could just overrwite the object).
          untrace = function(..., classMethod = FALSE) {
              ' Untrace the method given as the first argument.
 '
-             .TraceWithMethods(..., untrace = TRUE,  where = .self, classMethod = classMethod)
+             .TraceWithMethods(..., untrace=TRUE, where = .self, classMethod=classMethod)
          },
          show = function() {
 	     if(is.null(cl <- tryCatch(class(.self), error=function(e)NULL))) {
@@ -407,6 +423,9 @@ makeEnvRefMethods <- function() {
         methods[[method]] <- makeClassMethod(methods[[method]],
                    method, "envRefClass", "", allMethods)
     }
+    ## some values to bootstrap the parent environment for objects
+    methods$.objectParent <- .methodsNamespace
+    methods$.objectPackage <- "methods"
     methods
 }
 
@@ -443,6 +462,7 @@ makeEnvRefMethods <- function() {
     ## class to mark uninitialized fields
     setClass("uninitializedField",
              representation(field = "character", className = "character"))
+    ## class for (internal) ref. methods, with object as function's environment
     setClass("refMethodDef",
              representation(mayCall = "character", name = "character",
                             refClassName = "character",
@@ -451,6 +471,11 @@ makeEnvRefMethods <- function() {
     ## and make a traceable version of the class
     .makeTraceClass(.traceClassName("refMethodDef"), "refMethodDef", FALSE)
     setIs("refMethodDef", "SuperClassMethod", where = envir)
+    ## external ref. methods with explicit .self argument, standard environment
+    gen <- setClass("externalRefMethod",
+         slots = c(actual = "function"),
+                    contains = "refMethodDef", where = envir)
+    assign("externalRefMethod", gen, envir = envir)
     setClass("envRefClass", contains = c("environment","refClass"), where =envir)
     ## bootstrap envRefClass as a refClass
     def <- new("refClassRepresentation",
@@ -459,7 +484,7 @@ makeEnvRefMethods <- function() {
     assignClassDef("envRefClass", def, where = envir)
     setMethod("initialize", "envRefClass", methods:::.initForEnvRefClass,
               where = envir)
-    ## NOTE:  "$" method requires setting in methods:::.InitStructureMethods
+    ## NOTE:  "$" method requires setting in .InitStructureMethods()
     setMethod("$", "envRefClass", .dollarForEnvRefClass, where = envir)
     setMethod("$<-", "envRefClass", .dollarGetsForEnvRefClass, where = envir)
     setMethod("show", "envRefClass",
@@ -487,6 +512,17 @@ makeEnvRefMethods <- function() {
               function(object) showRefClassDef(object$def, "Generator for class"),
               where = envir)
     setMethod("show", "refMethodDef", showClassMethod, where = envir)
+    setMethod("show", "externalRefMethod", showClassMethod, where = envir)
+    setMethod("initialize", "externalRefMethod",
+              function(.Object, def, ...) {
+                  .Object at .Data <- eval(substitute(
+                      function(...) {
+                          .f <- DEF
+                          .f(.self, ...)
+                      }, list(DEF = def)))
+                  .Object at actual <- def
+                  callNextMethod(.Object, ...)
+              }, where = envir)
     ## Now do "localRefClass"; doesn't need to be precisely here
     ## but this ensures it is not done too early or too late
     setRefClass("localRefClass", methods = .localRefMethods,
@@ -515,24 +551,44 @@ getRefSuperClasses <- function(classes, classDefs) {
     unique(supers)
 }
 
+.getMethodDefs <- function(what, env) {
+    methods <- objects(envir = env, all.names = TRUE)
+    missing <- is.na(match(what, methods))
+    if(any(missing)) {
+        warning(gettextf(
+            "Methods not found: %s", paste(dQuote(methods[missing]), collapse = ", ")))
+        what <- what[!missing]
+    }
+    if(length(what) < 1)
+        return(NULL)
+    else if(length(what) == 1)
+        get(what, envir = env)
+    else
+        lapply(what, function(x) get(x, envir = env))
+}
+
 .GeneratorMethods <- list(methods =  function(...) {
     methodsEnv <- def at refMethods
     if(nargs() == 0)
-        return(objects(methodsEnv, all.names = TRUE))
+        return(sort(names(methodsEnv)))
+    methodDefs <- list(...)
+    if(nargs() == 1 && is(methodDefs[[1]], "character"))
+        return(.getMethodDefs(methodDefs[[1]], methodsEnv))
     if(methods:::.classDefIsLocked(def))
         stop(gettextf("the definition of class %s in package %s is locked, methods may not be redefined",
                       dQuote(def at className),
                       sQuote(def at package)),
              domain = NA)
-    methodDefs <- list(...)
     ## allow either name=function, ... or a single list
     if(length(methodDefs) == 1 && is.list(methodDefs[[1]]))
         methodDefs <- methodDefs[[1]]
+    ## append existing local methods, so they are re-analysed for new method names
+    methodDefs <- c(methodDefs, .thisClassMethods(methodsEnv, def at className))
     mnames <- names(methodDefs)
     if(is.null(mnames) || !all(nzchar(mnames)))
         stop("arguments to methods() must be named, or one named list")
     ## look for methods to remove (new definition is NULL)
-    removeThese <- sapply(methodDefs, is.null)
+    removeThese <- vapply(methodDefs, is.null, NA)
     if(any(removeThese)) {
         rmNames <- mnames[removeThese]
         mnames <- mnames[!removeThese]
@@ -551,9 +607,9 @@ getRefSuperClasses <- function(classes, classDefs) {
     ## as load actions.  Use the topenv() if that seems like
     ## the namespace in preparation, or the namespace if available
     env <- topenv(parent.frame()); declare <- TRUE
-    if(exists(".packageName", envir = env) &&
-       get(".packageName", envir = env) == def at package) {}
-    else if(def at package %in% loadedNamespaces())
+    if(!is.null(pkg <- get0(".packageName", envir = env)) && pkg == def at package)
+	{}
+    else if(isNamespaceLoaded(def at package))
         env <- asNamespace(def at package)
     else
         declare <- FALSE
@@ -655,7 +711,7 @@ accessors = function(...) {
     methods(accessors)
     invisible(accessors)
 }
-)
+)## end{ .GeneratorMethods }
 
 .localRefMethods <-
     list(
@@ -670,9 +726,9 @@ class method modifies a field.
 
 .makeCall <- function(name, x) {
     n <- length(argls <- formals(x))
-    noDeflt <- if(n > 0) sapply(argls,function(x)  !is.name(x) || nzchar(as.character(x)))
+    noDeflt <- if(n > 0) vapply(argls, function(x) !is.name(x) || nzchar(as.character(x)), NA)
     if (n) {
-        arg.names <- arg.n <- names(argls)
+        arg.names <- names(argls)
     }
     Call <- paste0("$", name, "(")
     for (i in seq_len(n)) {
@@ -720,6 +776,7 @@ class method modifies a field.
             if(missing(value))
                 dummyFieldName
             else {
+                ## this is not eval()ed in this namespace
                 methods:::.setDummyField(.self, dummyField, dummyClass, thisField, TRUE, value)
                 value
             }
@@ -730,6 +787,7 @@ class method modifies a field.
             if(missing(value))
                 dummyFieldName
             else {
+                ## this is not eval()ed in this namespace
                 methods:::.setDummyField(.self, dummyField, dummyClass, thisField, FALSE, value)
                 value
             }
@@ -751,12 +809,15 @@ class method modifies a field.
     if(is(value, fieldClass))
         value <- as(value, fieldClass, strict = FALSE) # could be more efficient?
     else
-        stop(gettextf("invalid assignment for reference class field %s, should be from class %s or a subclass (was class %s)",
-                       sQuote(fieldName), dQuote(fieldClass), dQuote(class(value))), call. = FALSE)
+        stop(gettextf(
+	"invalid assignment for reference class field %s, should be from class %s or a subclass (was class %s)",
+		      sQuote(fieldName), dQuote(fieldClass), dQuote(class(value))),
+             call. = FALSE)
     selfEnv <- as.environment(self)
     if(onceOnly) {
         if(bindingIsLocked(metaName, selfEnv))
-            stop(gettextf("invalid replacement: reference class field %s is read-only", sQuote(fieldName)),
+            stop(gettextf("invalid replacement: reference class field %s is read-only",
+                          sQuote(fieldName)),
                  call. = FALSE)
         else {
             assign(metaName, value, envir = selfEnv)
@@ -780,15 +841,15 @@ refClassInformation <- function(Class, contains, fields, refMethods, where) {
                                                        dQuote(class(what))),
                                               domain = NA)
                                  })
-        missingDefs <- sapply(superClassDefs, is.null)
+        missingDefs <- vapply(superClassDefs, is.null, NA)
         if(any(missingDefs))
             stop(gettextf("no definition found for inherited class: %s",
                           paste0('"',contains[missingDefs], '"', collapse = ", ")),
                  domain = NA)
         superClasses <- unlist(lapply(superClassDefs,
                           function(def) def at className), FALSE)
-        isRefSuperClass <- sapply(superClassDefs, function(def)
-                              is(def, "refClassRepresentation"))
+        isRefSuperClass <- vapply(superClassDefs, function(def)
+				  is(def, "refClassRepresentation"), NA)
     }
     else {
         superClassDefs <- list()
@@ -838,8 +899,7 @@ refClassInformation <- function(Class, contains, fields, refMethods, where) {
         }
         else if(is.function(thisField)) {
             fieldClasses[[i]] <- "activeBindingFunction"
-            fieldPrototypes[[thisName]] <-
-                .makeActiveBinding(thisField)
+	    fieldPrototypes[[thisName]] <- .makeActiveBinding(thisField)
         }
         else
             stop(gettextf("field %s was supplied as an object of class %s; must be a class name or a binding function",
@@ -848,7 +908,7 @@ refClassInformation <- function(Class, contains, fields, refMethods, where) {
                  domain = NA)
     }
     ## assemble inherited information
-    fc <- fp <- cm <- list(); fr <- character()
+    fc <- fp <- cm <- list() #; fr <- character()
     ## assign in reverse order so nearer superclass overrides
     for(cl in rev(superClassDefs[isRefSuperClass])) {
         fcl <- cl at fieldClasses
@@ -877,19 +937,14 @@ insertClassMethods <- function(methods, Class, value, fieldNames, returnAll) {
     theseMethods <- names(value)
     prevMethods <- names(methods) # catch refs to inherited methods as well
     allMethods <- unique(c(theseMethods, prevMethods))
-    if(returnAll)
-        returnMethods <- methods
-    else
-        returnMethods <- value
+    returnMethods <- if(returnAll) methods else value
     check <- TRUE
     for(method in theseMethods) {
         prevMethod <- methods[[method]] # NULL or superClass method
         if(is.null(prevMethod)) {
             ## kludge because default version of $initialize() breaks bootstrapping of methods package
-            if(identical(method, "initialize"))
-                superClassMethod <- "initFields"
-            else
-                superClassMethod <- ""
+            superClassMethod <- if(identical(method, "initialize"))
+                "initFields" else ""
         }
         else if(identical(prevMethod at refClassName, Class))
             superClassMethod <- prevMethod at superClassMethod
@@ -923,9 +978,10 @@ setRefClass <- function(Class, fields = character(),
                         contains = character(),
                         methods = list(),
                         where = topenv(parent.frame()),
+                        inheritPackage = FALSE,
                         ...) {
     fields <- inferProperties(fields, "field")
-    theseMethods <- names(methods) # non-inherited, for processing later
+##    theseMethods <- names(methods) # non-inherited, for processing later
     ## collect the method and field definitions
     info <- refClassInformation(Class, contains, fields, methods, where)
     ## make codetools happy:
@@ -948,6 +1004,8 @@ setRefClass <- function(Class, fields = character(),
                     refMethods = as.environment(refMethods),
                     fieldPrototypes = as.environment(fieldPrototypes),
                     refSuperClasses = refSuperClasses)
+    .setObjectParent(classDef at refMethods,
+          if(inheritPackage) refSuperClasses else NULL, where)
     assignClassDef(Class, classDef, where)
     generator <- new("refGeneratorSlot")
     env <- as.environment(generator)
@@ -1012,19 +1070,25 @@ showClassMethod <- function(object) {
     if(!.identC(cl, "refMethodDef"))
         cat(sprintf(" (class %s)", dQuote(cl)))
     cat(sprintf(" for method %s()\n", object at name))
-    show(as(object, "function"))
+    if(is(object, "externalRefMethod"))
+        show(object at actual)
+    else
+        show(as(object, "function"))
     if(length(object at mayCall))
-        .printNames("Methods used: ", object at mayCall)
+        .printNames("\nMethods used: ", object at mayCall)
 }
 
 .printNames <- function(header, names, separateLine = TRUE) {
-    if(separateLine)
-        cat("\n",header,"\n    ")
-    else
-        cat(header,": ",sep="")
-    cat(paste0('"', names, '"'), sep = ", ", fill = TRUE)
-    cat("\n")
+    names <- paste0('"', names, '"')
+    if(separateLine) {
+        cat(header, "\n", sep = "")
+        cat(names, sep = ", ", fill = TRUE, labels = "    ")
+    } else {
+        cat(header, ": ", sep = "")
+        cat(names, sep = ", ", fill = TRUE)
     }
+    cat("\n")
+}
 
 showRefClassDef <- function(object, title = "Reference Class") {
     cat(title," \"", object at className,"\":\n", sep="")
@@ -1037,9 +1101,9 @@ showRefClassDef <- function(object, title = "Reference Class") {
     }
     else
         cat("\nNo fields defined\n")
-    methods <- objects(object at refMethods, all.names = TRUE)
+    methods <- names(object at refMethods)
     if(length(methods))
-        .printNames("Class Methods: ", methods)
+        .printNames("\nClass Methods: ", methods)
     else
         cat ("\nNo Class Methods\n")
     supers <- object at refSuperClasses
@@ -1048,31 +1112,6 @@ showRefClassDef <- function(object, title = "Reference Class") {
 }
 
 
-## all.equal and identical both screw up on environments
-## but a bigger change is needed to all.equal than the following
-## because it also screws up on, e.g., externalptr objects
-if(FALSE) {
-all.equal.environment <- function(target, current, ...) {
-    nt <- sort(objects(target, all.names = TRUE))
-    nc <- sort(objects(current, all.names = TRUE))
-    tmp <- all.equal(nt, nc, ...)
-    if(!identical(tmp, TRUE))
-        return(paste("Different objects in target, current:", tmp))
-    if(length(nt) == 0)
-        return(TRUE)
-    differ <- sapply(nt, function(what) {
-        tmp <- all.equal(get(what, envir = target),
-                         get(what, envir = current), ...)
-        if(identical(tmp, TRUE)) FALSE
-        else TRUE
-    })
-    if(any(differ))
-        paste("Objects differ: ", paste(nt[differ], collapse = ", "))
-    else
-        TRUE
-}
-}
-
 .assignExpr <- function(e) {
     value <- list()
     value[[codetools::getAssignedVar(e)]] <- deparse(e, nlines = 1L)
@@ -1081,10 +1120,9 @@ all.equal.environment <- function(target, current, ...) {
 
 .mergeAssigns <- function(previous, new) {
     for(what in names(new)) {
-        if(is.null(previous[[what]]))
-            previous[[what]] <- new[[what]]
-        else
-            previous[[what]] <- paste(previous[[what]], new[[what]], sep="; ")
+	previous[[what]] <-
+	    if(is.null(previous[[what]])) new[[what]]
+	    else paste(previous[[what]],  new[[what]], sep="; ")
     }
     previous
 }
@@ -1223,10 +1261,45 @@ all.equal.environment <- function(target, current, ...) {
     invisible(env)
 }
 
+## set ".objectParent" as the parent environment for objects from this ref. class.
+## If there are no ref superclasses from another package, it will be "where", normally
+## the namespace of this package; otherwise it will be the .objectParent from the
+## superclass(es).  These must agree.
+## Also sets .objectPackage with the package name, for infomation purposes
+.setObjectParent <- function(refMethods, refSuperClasses, where) {
+    env <- empty <- emptyenv()
+    for(cl in refSuperClasses) {
+        if(identical(cl, "envRefClass"))
+            break # finished all application classes
+        clRefMethods <- getClass(cl)@refMethods
+        clEnv <- clRefMethods$.objectParent
+        if(identical(env, empty)) { # use this one
+            env <- clEnv
+            pkg <- clRefMethods$.objectPackage
+        }
+        else if(!identical(clEnv, env)) {
+            .nQuote <- function(what) paste0('"', what, '"')
+            stop(gettextf("Reference superclasses must come from the same package for the environment to be defined:  got %s and %s",
+                          .nQuote(clRefMethods$.objectPackage), .nQuote(pkg)))
+        }
+    }
+    if(identical(env, empty)) {
+        pkg <- where$.packageName
+        if(is.null(pkg))
+            pkg <- ".GlobalEnv"
+        refMethods$.objectParent <- where
+        refMethods$.objectPackage <- pkg
+    }
+    else {
+        refMethods$.objectParent <- env
+        refMethods$.objectPackage <- pkg
+    }
+}
+
 ## declare field and method names global to avoid spurious
 ## messages from codetools
 .declareVariables <- function(def, env) {
-    utils::globalVariables(c(names(def at fieldClasses), objects(def at refMethods)),
+    utils::globalVariables(c(names(def at fieldClasses), names(def at refMethods)),
                            env)
 }
 
@@ -1258,7 +1331,7 @@ getMethodsAndAccessors <- function(Class) {
         stop(gettextf("%s is not a reference class",
              dQuote(def at className)))
     ff <- def at fieldPrototypes
-    accs <- sapply(ff, function(what) is(what, "activeBindingFunction") && !is(what, "defaultBindingFunction"))
+    accs <- vapply(ff, function(what) is(what, "activeBindingFunction") && !is(what, "defaultBindingFunction"), NA)
     c(as.list(def at refMethods), as.list(ff)[accs])
 }
 
@@ -1285,8 +1358,7 @@ getMethodsAndAccessors <- function(Class) {
         locals <- list()
     ## the object should be assigned in environment where=
     what <- NULL
-    for(objName in objects(envir = where, all.names = TRUE)) {
-        obj <- get(objName, envir = where)
+    for(obj in as.list(where, all.names=TRUE)) {
         if(is(obj, "envRefClass") && identical(selfEnv, as.environment(obj))) {
             what <- obj
             break
@@ -1304,10 +1376,20 @@ getMethodsAndAccessors <- function(Class) {
 ## a shallow copy of a reference object
 ## This code depends on knowledge of how classes extend "environment"
 .shallowCopy <- function(object, selfEnv) {
-    newEnv <- new.env()
-    for(what in objects(envir = selfEnv, all.names = TRUE))
-        assign(what, get(what, envir = selfEnv), envir = newEnv)
+    newEnv <- list2env(as.list(selfEnv, all.names=TRUE), hash=TRUE)
     attr(object, ".xData") <- newEnv
     assign(".self", object, envir = newEnv)
     object
 }
+
+## return a list of all the methods from this class previously stored in
+## the class's methods environment
+.thisClassMethods <- function(methodsEnv, className) {
+    value <- list()
+    for(what in names(methodsEnv)) {
+        def <- get(what, envir = methodsEnv)
+        if(is(def, "refMethodDef") && def at refClassName == className)
+            value[[what]] <- def at .Data # the function only
+    }
+    value
+}
diff --git a/src/library/methods/R/show.R b/src/library/methods/R/show.R
index 0760c3c..1b8aa4a 100644
--- a/src/library/methods/R/show.R
+++ b/src/library/methods/R/show.R
@@ -1,7 +1,7 @@
 #  File src/library/methods/R/show.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
-#  Copyright (C) 1995-2012 The R Core Team
+#  Copyright (C) 1995-2014 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
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 showDefault <- function(object, oldMethods = TRUE)
 {
diff --git a/src/library/methods/R/substituteDirect.R b/src/library/methods/R/substituteDirect.R
index 727017f..2827907 100644
--- a/src/library/methods/R/substituteDirect.R
+++ b/src/library/methods/R/substituteDirect.R
@@ -1,7 +1,7 @@
 #  File src/library/methods/R/substituteDirect.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
-#  Copyright (C) 1995-2012 The R Core Team
+#  Copyright (C) 1995-2014 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
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 substituteDirect <-
   ## subsitute the for the variables named in the second argument the corresponding
diff --git a/src/library/methods/R/trace.R b/src/library/methods/R/trace.R
index 971a6cd..7939f99 100644
--- a/src/library/methods/R/trace.R
+++ b/src/library/methods/R/trace.R
@@ -1,7 +1,7 @@
 #  File src/library/methods/R/trace.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
-#  Copyright (C) 1995-2013 The R Core Team
+#  Copyright (C) 1995-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
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 ## some temporary (!) hooks to trace the tracing code
 .doTraceTrace <- function(on) {
@@ -38,27 +38,27 @@
 .InvalidTracedFunctions <- c("if", "where", "for", "repeat", "(", "{",
                             "next", "break", ".Call", ".Internal", ".Primitive")
 
-.TraceWithMethods <- function(what, tracer = NULL, exit = NULL, at =
-                              numeric(), print = TRUE, signature =
-                              NULL, where = .GlobalEnv, edit = FALSE,
-                              from = NULL, untrace = FALSE, classMethod = FALSE) {
-    if(is.function(where)) {
-        ## start from the function's environment:  important for
-        ## tracing from a namespace
-        if(is(where, "genericFunction"))
-            where <- parent.env(environment(where))
-        else
-            where <- environment(where)
-        fromPackage <- getPackageName(where)
-    }
-    else fromPackage <- ""
+.TraceWithMethods <- function(what, tracer = NULL, exit = NULL, at = numeric(),
+			      print = TRUE, signature = NULL,
+			      where = .GlobalEnv, edit = FALSE, from = NULL,
+			      untrace = FALSE, classMethod = FALSE) {
+    fromPackage <-
+        if(is.function(where)) {
+            ## start from the function's environment:  important for
+            ## tracing from a namespace
+            where <- if(is(where, "genericFunction"))
+                parent.env(environment(where))
+            else
+                environment(where)
+            getPackageName(where)
+        } else ""
     doEdit <- !identical(edit, FALSE)
     whereF <- NULL
     pname <- character()
     def <- NULL
     tracingWhere <- "in package"
     refCase <- isS4(where) && (is(where, "envRefClass") ||
-                       is(where, "refClassRepresentation"))
+                               is(where, "refClassRepresentation"))
     if(refCase) {
         ## some error checking
         if(!is.null(signature))
@@ -81,7 +81,8 @@
         if(!is(def, "refMethodDef")) {
             thisName <- substitute(what)
             stop(gettextf("%s is not a method for reference class %s",
-                          sQuote(as.character(if(is.symbol(thisName)) thisName else what)),
+			  sQuote(as.character(if(is.symbol(thisName)) thisName
+					      else what)),
                           dQuote(class(where))),
                  domain = NA)
         }
@@ -106,7 +107,7 @@
             else if(is.call(fname) && identical(fname[[1L]], as.name("::"))) {
                 whereF <- as.character(fname[[2L]])
                 require(whereF, character.only = TRUE)
-                whereF <- as.environment(paste("package", whereF, sep=":"))
+                whereF <- as.environment(paste0("package:", whereF))
                 pname <-  fname[[2L]]
                 what <- as.character(fname[[3L]])
             }
@@ -133,21 +134,23 @@
         temp <- .findFunEnvAndName(what, where, signature)
         whereF <- temp$whereF
         pname <- temp$pname
+        fname <- what
     }
     if(what %in% .InvalidTracedFunctions)
         stop(gettextf("tracing the internal function %s is not allowed",
-                      sQuote(what)))
+		      sQuote(what)), domain = NA)
     if(.traceTraceState) {
         message(".TraceWithMethods: after computing what, whereF", domain = NA)
         browser()
     }
-    if(nargs() == 1)
-        return(.primTrace(what)) # for back compatibility
+    if(nargs() == 1) # for back compatibility
+	return(if(untrace) .primUntrace(what) else .primTrace(what))
+## FIXME: for trace(stats:::.....)  we really want -- how can this be solved
+##    	return(if(untrace) .primUntrace(frame) else .primTrace(fname))
     if(is.null(whereF)) {
         allWhere <- findFunction(what, where = where)
         if(length(allWhere)==0)
-            stop(gettextf("no function definition for %s found",
-                          sQuote(what)),
+	    stop(gettextf("no function definition for %s found", sQuote(what)),
                  domain = NA)
         whereF <- as.environment(allWhere[[1L]])
     }
@@ -159,8 +162,22 @@
     if(is(def, "traceable") && identical(edit, FALSE) && !untrace)
         def <- .untracedFunction(def)
     if(!is.null(signature)) {
-        fdef <- if(is.primitive(def))  getGeneric(what, TRUE, where) else def
+        fdef <- if (!is(def, "genericFunction"))
+                    getGeneric(as.character(fname), TRUE, where)
+                else def
         def <- selectMethod(what, signature, fdef = fdef, optional = TRUE)
+        if(isRematched(def)) {
+            expr <- substitute(trace(.local, tracer = tr, at = at,
+                                     exit = ex,  print = pr,
+                                     edit = ed,
+                                     where = sys.frame(sys.nframe())),
+                               list( tr = substitute(tracer),
+                                    ex = exit, at = at, pr = print,
+                                    ed = edit))
+            at <- 3L
+            tracer <- expr
+            print <- FALSE
+        }
         if(is.null(def)) {
             warning(gettextf("cannot untrace method for %s; no method defined for this signature: %s",
                              sQuote(what),
@@ -184,6 +201,8 @@
             }
             else {
                 .primUntrace(what) # to be safe--no way to know if it's traced or not
+### or sometimes rather _FIXME_ ?
+###             .primUntrace(fname) # (rather than 'what')
                 return(what)
             }
         }
@@ -248,14 +267,26 @@
             .assignOverBinding(what, newFun, whereF, global)
         else
             assign(what, newFun, whereF)
+        if (length(pname) != 0) {
+            ## update the function also in "imports:" environments of already
+            ## loaded packages that import package pname
+
+            spname <- sub("^namespace:", "", pname)
+                # catching error in case when spname is not a name of a namespace, but
+                # e.g. a reference class
+            ipkgs <- tryCatch(getNamespaceUsers(spname), error=function(e){c()})
+            for(importingPkg in ipkgs) {
+              .updateInImportsEnv(what, newFun, importingPkg)
+            }
+        }
         if(length(grep("[^.]+[.][^.]+", what)) > 0) { #possible S3 method
             ## check for a registered version of the object
             S3MTableName <- ".__S3MethodsTable__."
-            tracedFun <- get(what, envir = whereF, inherits = TRUE)
-            if(exists(S3MTableName, envir = whereF, inherits = FALSE)) {
-                tbl <- get(S3MTableName, envir = whereF, inherits = FALSE)
-                if(exists(what, envir = tbl, inherits = FALSE))
-                    assign(what, tracedFun, envir = tbl)
+            if(!is.null(tbl <- get0(S3MTableName, envir = whereF, inherits = FALSE))) {
+                if(exists(what, envir = tbl, inherits = FALSE)) {
+		    tracedFun <- get(what, envir = whereF, inherits = TRUE)
+		    assign(what, tracedFun, envir = tbl)
+                }
             }
         }
     }
@@ -289,13 +320,17 @@
             }
         }
         else paste0(" as seen from package \"", fromPackage, "\"")
-        object <- if(refCase) "reference method" else if(is.null(signature)) "function" else "specified method for function"
+	object <- if(refCase) "reference method"
+		  else if(is.null(signature)) "function"
+		  else "specified method for function"
         object <- paste0(" ", object, " \"", what, "\" ")
         .message(action, object, location)
-        if(nameSpaceCase && !untrace && exists(what, envir = .GlobalEnv)) {
-            untcall<- paste("untrace(\"", what, "\", where = getNamespace(\"",
-                            pname, "\"))", sep="")
-            .message("Warning: Tracing only in the namespace; to untrace you will need:\n    ",untcall, "\n")
+        ## tracing methods (signature not null) works without setting where
+        if(nameSpaceCase && !untrace && is.null(signature) && exists(what, envir = .GlobalEnv)) {
+	    untcall <- paste0("untrace(\"", what,
+			      "\", where = getNamespace(\"", pname, "\"))")
+            .message("Warning: Tracing only in the namespace; to untrace you will need:\n    ",
+                     untcall, "\n")
         }
     }
     what
@@ -303,12 +338,18 @@
 
 .makeTracedFunction <- function(def, tracer, exit, at, print, doEdit) {
     switch(typeof(def),
-           builtin = , special = {
+           builtin = {
                fBody <- substitute({.prim <- DEF; .prim(...)},
                                    list(DEF = def))
                def <- eval(function(...)NULL)
                body(def, envir = .GlobalEnv) <- fBody
-               warning("making a traced version of a primitive; arguments will be treated as '...'")
+           },
+           special = {
+               fBody <- substitute({do.call(DEF, list(...))},
+                                   list(DEF = def))
+               def <- eval(function(...)NULL)
+               body(def, envir = .GlobalEnv) <- fBody
+               warning("making a traced version of a special; arguments may be altered")
            }
            )
     if(!identical(doEdit, FALSE)) {
@@ -450,8 +491,8 @@ setCacheOnAssign <- function(env, onOff = cacheOnAssign(env))
         as(.Object, oldClass) <- def # to get other slots in def
     .Object at original <- def
     if(nargs() > 2) {
-        if(!is.null(elNamed(getSlots(getClass(class(def))), ".Data")))
-          def <- def at .Data
+	if(!is.null(elNamed(getSlots(getClass(class(def))), ".Data")))
+	    def <- def at .Data
         .Object at .Data <- .makeTracedFunction(def, tracer, exit, at, print, doEdit)
     }
     .Object
@@ -537,9 +578,29 @@ setCacheOnAssign <- function(env, onOff = cacheOnAssign(env))
     }
 }
 
+.getImportsEnv <- function(pkg) {
+    iname = paste0("imports:", pkg)
+    empty = emptyenv()
+    env = asNamespace(pkg)
+
+    while(!identical(env, empty)) {
+        if (identical(attr(env, "name"), iname))
+            return(env)
+        env = parent.env(env)
+    }
+    NULL
+}
+
+.updateInImportsEnv <- function(what, newFun, importingPkg) {
+    where = .getImportsEnv(importingPkg)
+    if (!is.null(where) && (what %in% names(where))) {
+        .assignOverBinding(what, newFun, where, FALSE)
+    }
+}
+
 ### finding the package name for a loaded namespace
 .searchNamespaceNames <- function(env)
-    paste("namespace", getNamespaceName(env), sep=":")
+    paste0("namespace:", getNamespaceName(env))
 
 .findFunEnvAndName <- function(what, where, signature = NULL) {
     pname <- character()
@@ -615,11 +676,12 @@ utils::globalVariables("fdef")
     paste(c(f,signature), collapse="#")
 
 .guessPackageName <- function(env) {
-    allObjects <- objects(env, all.names = TRUE)
+    allObjects <- names(env)
     allObjects <- allObjects[is.na(match(allObjects, .functionsOverriden))]
     ## counts of packaages containing objects; objects not found don't count
-    possible <- sort(table(unlist(lapply(allObjects, find))), decreasing = TRUE)
-    message <- ""
+    possible <- sort(table(unlist(lapply(allObjects, utils::find))),
+                     decreasing = TRUE)
+##    message <- ""
     if(length(possible) == 0)
         stop("none of the objects in the source code could be found:  need to attach or specify the package")
     else if(length(possible) > 1L) {
@@ -634,7 +696,7 @@ utils::globalVariables("fdef")
                                    collapse = ", ")),
                     domain = NA)
     }
-    sub("package:","", names(possible[1L])) # the package name, or .GlobalEnv
+    .rmpkg(names(possible[1L])) # the package name, or .GlobalEnv
 }
 
 ## extract the new definitions from the source file
@@ -642,15 +704,15 @@ evalSource <- function(source, package = "", lock = TRUE, cache = FALSE) {
     if(!nzchar(package))
         envp <- .GlobalEnv # will look for the package after evaluating source
     else {
-        pstring <- paste("package",package, sep=":")
+        pstring <- paste0("package:",package)
         packageIsVisible <- pstring %in% search()
         if(packageIsVisible) {
             envp <- as.environment(pstring)
-            envns <- tryCatch(asNamespace(package), error = function(cond) NULL)
+##            envns <- tryCatch(asNamespace(package), error = function(cond) NULL)
         }
         else {
             envp <- tryCatch(asNamespace(package), error = function(cond) NULL)
-            envns <- envp
+##            envns <- envp
         }
         if(is.null(envp))
             stop(gettextf("package %s is not attached and no namespace found for it",
@@ -686,8 +748,8 @@ insertSource <- function(source, package = "",
         allObjects[!(grepl(MPattern, allObjects) | grepl(CPattern, allObjects) | ".cacheOnAssign" == allObjects)]
     allMethodTables <- function()
         allObjects[grepl(MPattern, allObjects)]
-    allClassDefs <- function()
-        allObjects[grepl(CPattern, allObjects)]
+##    allClassDefs <- function()
+##        allObjects[grepl(CPattern, allObjects)]
     differs <- function(f1, f2)
         !(identical(body(f1), body(f2)) && identical(args(f1), args(f2)))
     if(is.environment(source) && !nzchar(package)) {
@@ -736,7 +798,7 @@ insertSource <- function(source, package = "",
     packageSlot(env) <- package
     ## at this point, envp is the target environment (package or other)
     ## and envns is the corresponding namespace if any, or NULL
-    allObjects <- objects(envir = env, all.names = TRUE)
+    allObjects <- names(env)
     ## Figure out what to trace.
     if(!missing(functions)) {
         notThere <- is.na(match(functions, allObjects))
@@ -749,9 +811,8 @@ insertSource <- function(source, package = "",
     }
     .mnames <- allMethodTables()
     if(length(methods) > 0) {
-        notThere <- sapply(methods,
-         function(fname) (length(grep(fname, .mnames, fixed = TRUE)) == 0)
-        )
+	notThere <- vapply(methods, function(fname)
+	    length(grep(fname, .mnames, fixed = TRUE)) == 0, NA)
         if(any(notThere)) {
             warning(gettextf("cannot insert methods for these functions (methods table not found in source): %s",
                     paste('"',methods[notThere],'"',
@@ -759,9 +820,8 @@ insertSource <- function(source, package = "",
                     domain = NA)
             methods <- methods[!notThere]
         }
-        methodNames <- sapply(methods,
-         function(fname) .mnames[[grep(fname, .mnames, fixed = TRUE)[[1]]]]
-        )
+        methodNames <- vapply(methods, function(fname)
+                              .mnames[[grep(fname, .mnames, fixed = TRUE)[[1]]]], "")
     }
     else {
         methodNames <- .mnames
@@ -847,21 +907,19 @@ insertSource <- function(source, package = "",
         return(NULL)
     }
     curTable <- getMethodsForDispatch(fdef)
-    allObjects <- objects(table, all.names = TRUE)
-    methodsInserted <- character()
+    allObjects <- sort(names(table))
     if(length(allObjects) > 0) {
-        for(this in allObjects) {
+        methodsInserted <- as.character(Filter(function(this) {
             def <- get(this, envir = table)
-            curdef <- (if(exists(this, envir = curTable, inherits = FALSE))
-                get(this, envir = curTable)
-                       else NULL)
+            curdef <- curTable[[this]]
             if(differs(def, curdef)) {
                 suppressMessages(
                    .TraceWithMethods(f, signature = this, where = envwhere,
                               edit = env))
-                methodsInserted <- c(methodsInserted, this)
-            }
-        }
+                TRUE
+            } else
+                FALSE
+        }, allObjects))
         if(length(methodsInserted) > 0)
             message(gettextf("Methods inserted for function %s(): %s",
                   f, paste(methodsInserted, collapse =", ")),
@@ -886,15 +944,15 @@ insertSource <- function(source, package = "",
         ## we don't know the package for the generic (which may not
         ## be active), so we search for the string w/o package
         table <- .TableMetaName(what, "")
-        allObjects <- objects(env, all.names = TRUE)
+        allObjects <- sort(names(env))
         i <- grep(table, allObjects, fixed = TRUE)
         if(length(i) == 1)
-            table <- get(allObjects[[i]], envir = env)
+            table <- env[[allObjects[[i]]]]
         else if(length(i) >1) {
             table <- allObjects[[i[[1]]]]
             warning(gettextf("multiple generics match pattern, using table %s", table)
                 , domain = NA)
-            table <- get(table, envir = env)
+            table <- env[[table]]
         }
         else
             stop(gettextf("does not seem to be a method table for generic %s in tracing environment",
diff --git a/src/library/methods/R/zzz.R b/src/library/methods/R/zzz.R
index c9ff8ae..4e3fdbd 100644
--- a/src/library/methods/R/zzz.R
+++ b/src/library/methods/R/zzz.R
@@ -1,7 +1,7 @@
 #  File src/library/methods/R/zzz.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
-#  Copyright (C) 1995-2013 The R Core Team
+#  Copyright (C) 1995-2015 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
@@ -14,9 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
-
-## utils::globalVariables("...onLoad")
+#  https://www.R-project.org/Licenses/
 
 ## Initial version of .onLoad
 ...onLoad  <-
@@ -49,7 +47,10 @@
     .makeBasicFuns(where)
     rm(.makeGeneric, .newClassRepresentation, .possibleExtends,
        ..mergeClassDefSlots, .classGeneratorFunction, ..classEnv,
-       ..addToMetaTable, ..extendsForS3, envir = where)
+       ..addToMetaTable, ..extendsForS3,
+       .InitClassDefinition, .InitBasicClasses, .initClassSupport,
+       .InitMethodsListClass, .setCoerceGeneric, .makeBasicFuns,
+       envir = where)
     .InitMethodDefinitions(where)
     .InitShowMethods(where)
     assign(".isPrototype", ..isPrototype, envir = where)
@@ -72,22 +73,25 @@
     assign(".checkRequiredGenerics", ..checkRequiredGenerics, envir = where)
     assign(".methodPackageSlots", ..methodPackageSlots, envir = where)
     rm(..isPrototype, .isSealedMethod, ..requirePackage, .implicitGeneric,
-       ..checkRequiredGenerics, ..methodPackageSlots, envir = where)
+       ..checkRequiredGenerics, ..methodPackageSlots, .envRefMethods,
+       .InitBasicClassMethods, .InitExtensions, .InitStructureMethods,
+       .InitMethodDefinitions, .InitShowMethods, .InitClassUnion,
+       .InitS3Classes, .InitSpecialTypesAndClasses, .InitTraceFunctions,
+       .InitRefClasses, .initImplicitGenerics,
+       envir = where)
     ## unlock some bindings that must be modifiable
     unlockBinding(".BasicFunsList", where)
     assign(".saveImage", TRUE, envir = where)
     cat(" done\n")
 
     assign("envRefMethodNames",
-	   ls(getClassDef("envRefClass")@refMethods, all.names = TRUE),
-	   envir = where)
+	   names(getClassDef("envRefClass")@refMethods), envir = where)
     assign(".onLoad", ..onLoad, envir = where)
     rm(...onLoad, ..onLoad, envir = where)
     dbbase <- file.path(libname, pkgname, "R", pkgname)
     ns <- asNamespace(pkgname)
-    vars <- ls(envir = ns, all.names = TRUE)
     ## we need to exclude the registration vars
-    vars <- grep("^C_", vars, invert = TRUE, value = TRUE)
+    vars <- grep("^C_", names(ns), invert = TRUE, value = TRUE)
     tools:::makeLazyLoadDB(ns, dbbase, variables = vars)
 }
 
@@ -106,14 +110,14 @@
     ## assign to baseenv also, signalling methods loaded
     assign(".methodsNamespace", where, baseenv())
     if(Sys.getenv("R_S4_BIND") == "active")
-        methods:::bind_activation(TRUE)
+        bind_activation(TRUE)
 }
 
 .onUnload <- function(libpath)
 {
     message("unloading 'methods' package ...") # see when this is called
     .isMethodsDispatchOn(FALSE)
-    methods:::bind_activation(FALSE)
+    bind_activation(FALSE)
     library.dynam.unload("methods", libpath)
 }
 
@@ -123,23 +127,21 @@
     env <- environment(sys.function())
     ## unlock some bindings that must be modifiable
     unlockBinding(".BasicFunsList", env)
-    if(methods:::.hasS4MetaData(.GlobalEnv)) {
+    if(.hasS4MetaData(.GlobalEnv)) {
         result <- try(cacheMetaData(.GlobalEnv, TRUE))
         ## still attach  methods package if global env has bad objets
-        if(is(result, "try-error"))
+        if(inherits(result, "try-error"))
           warning("apparently bad method or class metadata in saved environment;\n",
                   "move the file or remove the class/method")
     }
 }
 
-.onDetach <- function(libpath) methods:::.onUnload(libpath)
-
-## redefining it here, invalidates the one above:
-## Why don't we unload "methods" on detach() ?
-.onDetach <- function(libpath) .isMethodsDispatchOn(FALSE)
+## Q: Why don't we unload "methods" on detach() ?
+## A: Because the user chooses detach(*, unload= .), so detach() will unload if ..
+## .onDetach <- function(libpath) { <nothing> }
 
 ## used for .methodsIsLoaded
 .saveImage <- FALSE
 
-## want ASCII quotes, not fancy nor translated ones
+## cheap dQuote(): want ASCII quotes, not fancy nor translated ones
 .dQ <- function (x) paste0('"', x, '"')
diff --git a/src/library/methods/man/BasicClasses.Rd b/src/library/methods/man/BasicClasses.Rd
index b952626..9cfd8e1 100644
--- a/src/library/methods/man/BasicClasses.Rd
+++ b/src/library/methods/man/BasicClasses.Rd
@@ -1,5 +1,5 @@
 % File src/library/methods/man/BasicClasses.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2007 R Core Team
 % Distributed under GPL 2 or later
 
@@ -68,7 +68,7 @@
             # the names attribute
 }
 \section{Objects from the Classes}{
-  If a class is not virtual (see section in \code{\link{Classes}}),
+  If a class is not virtual (see section in \code{\link{Classes_Details}}),
   objects can be created by calls of the form \code{new(Class, ...)},
   where \code{Class} is the quoted class name, and the remaining
   arguments if any are objects to be interpreted as vectors of this
diff --git a/src/library/methods/man/Classes.Rd b/src/library/methods/man/Classes.Rd
index b40ab5c..d182a30 100644
--- a/src/library/methods/man/Classes.Rd
+++ b/src/library/methods/man/Classes.Rd
@@ -1,351 +1,28 @@
 % File src/library/methods/man/Classes.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2011 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2016 R Core Team
 % Distributed under GPL 2 or later
 
 \name{Classes}
 \alias{Classes}
-\alias{__ClassMetaData}
-\alias{.environment-class}
-\alias{.externalptr-class}
-\alias{.name-class}
-\alias{.NULL-class}
-\title{Class Definitions}
+\title{S4 Class Documentation}
 \description{
-  Class definitions are objects that contain the formal definition of a
-  class of \R objects, usually referred to as an S4 class, to
-  distinguish them from the informal S3 classes.
-  This document gives an overview of S4 classes; for
-  details of the class representation objects, see help for the class
-  \code{\linkS4class{classRepresentation}}.
-}
-\section{Metadata Information}{
-  When a class is defined, an object is stored that contains the
-  information about that class.  The object, known as the
-  \emph{metadata} defining the class, is not stored under the name of
-  the class (to allow programmers to write generating functions of
-  that name), but under a specially constructed name.
-  To examine the class definition, call \code{\link{getClass}}.  The
-  information in the metadata object includes:
-
-  \describe{
-    \item{Slots:}{
-
-        The data contained in an object from an S4 class is defined by
-        the \emph{slots} in the class definition.
-
-        Each slot in an object is a component of the object;
-        like components (that is, elements) of a
-      list, these may be extracted and set, using the
-      function \code{\link{slot}()} or more often the operator
-        \code{"\link{@}"}.  However, they
-      differ from list components in important ways.
-      First, slots can only be referred to by name, not by position,
-      and there is no partial matching of names as with list elements.
-
-      All the objects from a particular class have the same set of slot
-      names; specifically, the slot names that are contained in the
-      class definition.  Each slot in each object always is an object
-      of  the
-      class specified for this slot in the definition of the current class.
-      The word \dQuote{is} corresponds to the \R function of the same
-      name (\code{\link{is}}), meaning that the class of the object in
-      the slot must be the same as the class specified in the
-      definition, or some class that extends the one in the
-      definition (a \emph{subclass}).
-
-      A special slot name, \code{.Data}, stands for the
-      \sQuote{data part} of the object.  An object from a class with a
-      data part is defined by specifying that the class contains one
-      of the \R object types or one of the special pseudo-classes,
-      \code{matrix} or \code{array}, usually because the definition of
-      the class, or of one of its superclasses, has included the type
-      or pseudo-class in its \code{contains} argument.  A second
-      special slot name, \code{.xData}, is used to enable inheritance
-      from abnormal types such as \code{"environment"}
-      See the section on inheriting from non-S4 classes
-      for details on the representation and
-      for the behavior of S3 methods with objects from these classes.
-
-      Some slot names correspond to attributes used in old-style S3
-      objects and in \R objects without an explicit class, for
-      example, the \code{names} attribute.  If you define a class for
-      which that attribute will be set, such as a subclass of named
-      vectors, you should include \code{"names"} as a slot.  See the
-      definition of class \code{"namedList"} for an example.  Using the
-      \code{names()} assignment to set such names will generate a
-      warning if there is no names slot and an error if the object in
-      question is not a vector type.  A slot called \code{"names"} can
-      be used anywhere, but only if it is assigned as a slot, not via
-      the default \code{names()} assignment.
-
-    }
-    \item{Superclasses:}{
-
-      The definition of a class includes the \emph{superclasses} ---the
-      classes that this class extends.  A
-      class \code{Fancy}, say, extends a class \code{Simple} if an
-      object from the \code{Fancy} class has all the capabilities of
-      the \code{Simple} class (and probably some more as well).  In
-      particular, and very usefully, any method defined to work for a
-      \code{Simple} object can be applied to a \code{Fancy} object as
-      well.
-
-      This relationship is expressed equivalently by saying that
-      \code{Simple} is a superclass of \code{Fancy}, or that
-      \code{Fancy} is a subclass of \code{Simple}.
-
-      The direct superclasses of a class are those superclasses
-      explicitly defined.   Direct superclasses can be defined in
-      three ways.  Most commonly, the superclasses are listed in the
-      \code{contains=} argument in the call to \code{\link{setClass}}
-      that creates the subclass.   In this case the subclass will
-      contain all the slots of the superclass, and the relation
-      between the class is called \emph{simple}, as it in fact is.
-      Superclasses can also be defined
-      explicitly by a call to \code{\link{setIs}}; in this case, the
-      relation requires methods to be specified to go from subclass to
-      superclass.   Thirdly, a class union is a superclass of all the
-      members of the union.  In this case too the relation is simple,
-      but notice that the relation is defined when the superclass is
-      created, not when the subclass is created as with the
-      \code{contains=} mechanism.
-
-      The definition of a superclass will also potentially contain
-      its own direct superclasses.  These are considered (and shown) as
-      superclasses at distance 2 from the original class; their direct
-      superclasses are at distance 3, and so on.  All these are
-      legitimate superclasses for purposes such as method selection.
-
-      When superclasses are defined  by including the names of
-      superclasses in the \code{contains=} argument to
-      \code{\link{setClass}}, an object from the class will have all the
-      slots defined for its own class \emph{and} all the slots defined
-      for all its superclasses as well.
-
-      The information about the relation between a class and a
-      particular superclass is encoded as an object of class
-      \code{\linkS4class{SClassExtension}}.  A list of such objects for
-      the superclasses (and sometimes for the subclasses) is included in
-      the metadata object defining the class.  If you need to compute
-      with these objects (for example, to compare the distances), call
-      the function \code{\link{extends}} with argument \code{fullInfo=TRUE}.
-
-    }
-    \item{Prototype:}{
-
-      The objects from a class created by a call to
-      \code{\link{new}}
-      are defined by the \emph{prototype} object for the class and by
-      additional arguments in the call to \code{\link{new}}, which are
-      passed to a method for that class for the function
-      \code{\link{initialize}}.
-
-      Each class representation object contains a prototype object
-      for the class (although for a virtual class the prototype may be
-      \code{NULL}). The prototype object must have values for all the
-      slots of the class.
-      By default, these are the prototypes of the corresponding slot
-      classes.  However, the definition of the class can specify any
-      valid object for any of the slots.
-    }
-  }
-}
-\section{Virtual classes; Basic classes}{
-
-      Classes exist for which no actual objects can be created by a
-      call to \code{\link{new}}, the \emph{virtual} classes, in fact a
-      very important programming tool.  They are used to group together
-      ordinary classes that want to share some programming behavior,
-      without necessarily restricting how the behavior is implemented.
-      Virtual class definitions may if you want include
-      slots (to provide some common behavior without fully defining
-      the object---see the class \code{\linkS4class{traceable}} for an example).
-
-      A simple and useful form of virtual class is the \emph{class
-        union}, a virtual class that is defined in a call to
-      \code{\link{setClassUnion}} by listing one or
-      more of subclasses (classes that extend the class union).  Class
-      unions can include as subclasses basic object types (whose
-      definition is otherwise sealed).
+  You have navigated to an old link to documentation of S4 classes.
 
-      There are a number of \sQuote{basic} classes, corresponding to the
-      ordinary kinds of data occurring in \R.  For example,
-      \code{"numeric"} is a class corresponding to numeric vectors.
-      The other vector basic classes are \code{"logical"}, \code{"integer"},
-      \code{"complex"}, \code{"character"},  \code{"raw"}, \code{"list"}
-      and \code{"expression"}.
-      The prototypes for
-      the vector classes are vectors of length 0 of the corresponding
-      type.  Notice that basic classes are unusual in that the
-      prototype object is from the class itself.
+  For basic use of classes and methods, see \link{Introduction}; to
+  create new class definitions, see \code{\link{setClass}}; for
+  technical details on S4 classes, see \link{Classes_Details}.
 
-      In addition to the vector classes there are also basic classes
-      corresponding to objects in the
-      language, such as \code{"function"} and \code{"call"}.
-      These classes are subclasses of the virtual class \code{"language"}.
-      Finally, there are object types and corresponding basic classes for
-      \dQuote{abnormal} objects, such as \code{"environment"} and
-      \code{"externalptr"}.
-      These objects do not follow the
-      functional behavior of the language; in particular, they are not
-      copied and so cannot have attributes or slots defined locally.
-
-     All these classes can be used as slots or as
-      superclasses for any other class definitions, although they do
-      not themselves come with an explicit class.  For the abnormal
-      object types, a special mechanism is used to enable inheritance
-      as described below.
-
-
-}
-% S3 classes
-
-\section{Inheriting from non-S4 Classes}{
-  A class definition can extend classes other than
-  regular S4 classes, usually by specifying them in the
-  \code{contains=} argument to \code{\link{setClass}}.  Three groups
-  of such classes behave distinctly:
-\enumerate{
-\item
-S3 classes, which must have been registered by a previous call to
-\code{\link{setOldClass}} (you can check that this has been done
-  by calling \code{\link{getClass}}, which should return a class that
-  extends \linkS4class{oldClass});
-
-\item
-  One of the \R object types, typically a vector type, which then
-    defines the type of the S4 objects, but also a type such as
-    \code{\link{environment}} that can not be used directly as a type
-    for an S4 object.  See
-    below.
-
-\item
-  One of the pseudo-classes \code{\linkS4class{matrix}}
-      and \code{\linkS4class{array}}, implying objects with
-      arbitrary vector types plus the \code{dim} and \code{dimnames}
-      attributes.
-  }
-
-  This section describes the approach to combining S4 computations
-  with older S3 computations by using such classes as superclasses. The
-  design goal is to allow the S4 class to inherit S3 methods and
-  default computations in as consistent a form as possible.
-
-  As part of a general effort to make the S4 and S3 code in R more
-  consistent, when objects from an S4 class are used as the first
-  argument to a non-default S3 method, either for an S3 generic function
-  (one that calls \code{\link{UseMethod}}) or for one of the primitive
-  functions that dispatches S3 methods, an effort is made to provide a
-  valid object for that method.  In particular, if the S4 class extends
-  an S3 class or \code{matrix} or \code{array}, and there is an S3
-  method matching one of these classes, the S4 object will be coerced to
-  a valid S3 object, to the extent that is possible given that there is
-  no formal definition of an S3 class.
-
-  For example, suppose \code{"myFrame"} is an S4 class that includes the
-  S3 class \code{"data.frame"} in the \code{contains=} argument to
-  \code{\link{setClass}}.  If an object from this S4 class is passed to
-  a function, say \code{\link{as.matrix}}, that has an S3 method for
-  \code{"data.frame"}, the internal code for \code{\link{UseMethod}}
-  will convert the object to a data frame; in particular, to an S3
-  object whose class attribute will be the vector corresponding to the
-  S3 class (possibly containing multiple class names). Similarly for an
-  S4 object inheriting from \code{"matrix"} or \code{"array"}, the S4
-  object will be converted to a valid S3 matrix or array.
-
-  Note that the conversion is \emph{not} applied when an S4 object is
-  passed to the default S3 method.  Some S3 generics attempt to deal
-  with general objects, including S4 objects.  Also, no transformation
-  is applied to S4 objects that do not correspond to a selected S3
-  method; in particular, to objects from a class that does not contain
-  either an S3 class or one of the basic types.  See \code{\link{asS4}}
-  for the transformation details.
-
-      In addition to explicit S3 generic functions, S3 methods are
-      defined for a variety of operators and functions implemented as
-      primitives.  These methods are dispatched by some internal C
-      code that operates partly through the same code as real S3
-      generic functions and partly via special considerations (for
-      example, both arguments to a binary operator are examined when
-      looking for methods).  The same mechanism for adapting S4
-      objects to S3 methods has been applied to these computations as
-      well, with a few exceptions such as generating an error if an S4
-      object that does not extend an appropriate S3 class or type is
-      passed to a binary operator.
-
-      The remainder of this section discusses the mechanisms for
-      inheriting from  basic object types. See \code{\linkS4class{matrix}}
-      or \code{\linkS4class{array}}
-      for inhering from the matrix and array
-      pseudo-classes, or from time-series.  For the
-      corresponding details for inheritance
-      from S3 classes, see \code{\link{setOldClass}}.
-
-      An object from a class that directly and simply contains one
-      of the basic object types in \R, has implicitly a corresponding
-      \code{.Data} slot of that type, allowing computations to extract
-      or replace the data part while leaving other slots
-      unchanged. If the type is one that can accept attributes and is
-      duplicated normally, the inheritance also determines the type of the
-      object; if the class definition has a \code{.Data} slot
-      corresponding to a normal type, the class of the
-      slot determines the type of the object (that is, the value of
-      \code{\link{typeof}(x)}).
-      For such classes,  \code{.Data} is a pseudo-slot; that
-      is, extracting or setting it modifies the non-slot data in the
-      object.  The functions \code{\link{getDataPart}} and
-      \code{\link{setDataPart}} are a cleaner, but essentially
-      equivalent way to deal with the data part.
-
-      Extending a basic type this way allows objects to
-      use old-style code for the corresponding type as well as S4
-      methods.  Any basic type can be used for \code{.Data}, but
-      a few types are treated differently because they do not behave like ordinary objects;
-      for example, \code{"NULL"}, environments, and external pointers.
-      Classes extend these types by having a slot, \code{.xData},
-      itself inherited from an internally defined S4 class.  This
-      slot actually contains an object of the inherited type, to
-      protect computations from the reference semantics of the type.
-      Coercing to the nonstandard object type then requires an
-      actual computation, rather than the \code{"simple"} inclusion
-      for other types and classes.  The intent is that programmers
-      will not need to take account of the mechanism, but one
-      implication is that you should \emph{not} explicitly use the
-      type of an S4 object to detect inheritance from an arbitrary
-      object type.  Use
-      \code{\link{is}} and similar functions instead.
 }
 
 
-
 \references{
- Chambers, John M. (2008)
- \emph{Software for Data Analysis: Programming with R}
-  Springer.  (For the R version.)
-
- Chambers, John M. (1998)
- \emph{Programming with Data}
- Springer (For the original S4 version.)
-
-  Chambers, John M.  and Hastie, Trevor  J. eds (1992)
-  \emph{Statistical Models in S.}
-  Wadsworth & Brooks/Cole (Appendix A for S3 classes.)
-
-  Becker, R. A., Chambers, J. M. and Wilks, A. R. (1988)
-  \emph{The New S Language}.
-  Wadsworth & Brooks/Cole. (Out of print.) (The description of
-  vectors, matrix, array and time-series objects.)
+ Chambers, John M. (2016)
+ \emph{Extending R},
+  Chapman & Hall.
+(Chapters 9 and 10.)
 }
 
-\seealso{
-  \code{\link{Methods}} for analogous discussion of methods,
-  \code{\link{setClass}} for details of specifying class definitions,
-  \code{\link{is}},
-  \code{\link{as}},
-  \code{\link{new}},
-  \code{\link{slot}}
-}
 \keyword{programming}
 \keyword{classes}
 \keyword{methods}
diff --git a/src/library/methods/man/Classes_Details.Rd b/src/library/methods/man/Classes_Details.Rd
new file mode 100644
index 0000000..e3a12cf
--- /dev/null
+++ b/src/library/methods/man/Classes_Details.Rd
@@ -0,0 +1,324 @@
+% File src/library/methods/man/Classes.Rd
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2016 R Core Team
+% Distributed under GPL 2 or later
+
+\name{Classes_Details}
+\alias{Classes_Details}
+\alias{__ClassMetaData}
+\alias{.environment-class}
+\alias{.externalptr-class}
+\alias{.name-class}
+\alias{.NULL-class}
+\title{Class Definitions}
+\description{
+  Class definitions are objects that contain the formal definition of a
+  class of \R objects, usually referred to as an S4 class, to
+  distinguish them from the informal S3 classes.
+  This document gives an overview of S4 classes; for
+  details of the class representation objects, see help for the class
+  \code{\linkS4class{classRepresentation}}.
+}
+\section{Metadata Information}{
+  When a class is defined, an object is stored that contains the
+  information about that class.  The object, known as the
+  \emph{metadata} defining the class, is not stored under the name of
+  the class (to allow programmers to write generating functions of
+  that name), but under a specially constructed name.
+  To examine the class definition, call \code{\link{getClass}}.  The
+  information in the metadata object includes:
+
+  \describe{
+    \item{Slots:}{
+
+        The data contained in an object from an S4 class is defined by
+        the \emph{slots} in the class definition.
+
+        Each slot in an object is a component of the object;
+        like components (that is, elements) of a
+      list, these may be extracted and set, using the
+      function \code{\link{slot}()} or more often the operator
+        \code{"\link{@}"}.  However, they
+      differ from list components in important ways.
+      First, slots can only be referred to by name, not by position,
+      and there is no partial matching of names as with list elements.
+
+      All the objects from a particular class have the same set of slot
+      names; specifically, the slot names that are contained in the
+      class definition.  Each slot in each object always is an object
+      of  the
+      class specified for this slot in the definition of the current class.
+      The word \dQuote{is} corresponds to the \R function of the same
+      name (\code{\link{is}}), meaning that the class of the object in
+      the slot must be the same as the class specified in the
+      definition, or some class that extends the one in the
+      definition (a \emph{subclass}).
+
+      A special slot name, \code{.Data}, stands for the
+      \sQuote{data part} of the object.  An object from a class with a
+      data part is defined by specifying that the class contains one
+      of the \R object types or one of the special pseudo-classes,
+      \code{matrix} or \code{array}, usually because the definition of
+      the class, or of one of its superclasses, has included the type
+      or pseudo-class in its \code{contains} argument.  A second
+      special slot name, \code{.xData}, is used to enable inheritance
+      from abnormal types such as \code{"environment"}
+      See the section on inheriting from non-S4 classes
+      for details on the representation and
+      for the behavior of S3 methods with objects from these classes.
+
+      Some slot names correspond to attributes used in old-style S3
+      objects and in \R objects without an explicit class, for
+      example, the \code{names} attribute.  If you define a class for
+      which that attribute will be set, such as a subclass of named
+      vectors, you should include \code{"names"} as a slot.  See the
+      definition of class \code{"namedList"} for an example.  Using the
+      \code{names()} assignment to set such names will generate a
+      warning if there is no names slot and an error if the object in
+      question is not a vector type.  A slot called \code{"names"} can
+      be used anywhere, but only if it is assigned as a slot, not via
+      the default \code{names()} assignment.
+
+    }
+    \item{Superclasses:}{
+
+      The definition of a class includes the \emph{superclasses} ---the
+      classes that this class extends.  A
+      class \code{Fancy}, say, extends a class \code{Simple} if an
+      object from the \code{Fancy} class has all the capabilities of
+      the \code{Simple} class (and probably some more as well).  In
+      particular, and very usefully, any method defined to work for a
+      \code{Simple} object can be applied to a \code{Fancy} object as
+      well.
+
+      This relationship is expressed equivalently by saying that
+      \code{Simple} is a superclass of \code{Fancy}, or that
+      \code{Fancy} is a subclass of \code{Simple}.
+
+      The direct superclasses of a class are those superclasses
+      explicitly defined.   Direct superclasses can be defined in
+      three ways.  Most commonly, the superclasses are listed in the
+      \code{contains=} argument in the call to \code{\link{setClass}}
+      that creates the subclass.   In this case the subclass will
+      contain all the slots of the superclass, and the relation
+      between the class is called \emph{simple}, as it in fact is.
+      Superclasses can also be defined
+      explicitly by a call to \code{\link{setIs}}; in this case, the
+      relation requires methods to be specified to go from subclass to
+      superclass.   Thirdly, a class union is a superclass of all the
+      members of the union.  In this case too the relation is simple,
+      but notice that the relation is defined when the superclass is
+      created, not when the subclass is created as with the
+      \code{contains=} mechanism.
+
+      The definition of a superclass will also potentially contain
+      its own direct superclasses.  These are considered (and shown) as
+      superclasses at distance 2 from the original class; their direct
+      superclasses are at distance 3, and so on.  All these are
+      legitimate superclasses for purposes such as method selection.
+
+      When superclasses are defined  by including the names of
+      superclasses in the \code{contains=} argument to
+      \code{\link{setClass}}, an object from the class will have all the
+      slots defined for its own class \emph{and} all the slots defined
+      for all its superclasses as well.
+
+      The information about the relation between a class and a
+      particular superclass is encoded as an object of class
+      \code{\linkS4class{SClassExtension}}.  A list of such objects for
+      the superclasses (and sometimes for the subclasses) is included in
+      the metadata object defining the class.  If you need to compute
+      with these objects (for example, to compare the distances), call
+      the function \code{\link{extends}} with argument \code{fullInfo=TRUE}.
+
+    }
+    \item{Prototype:}{
+
+      The objects from a class created by a call to
+      \code{\link{new}}
+      are defined by the \emph{prototype} object for the class and by
+      additional arguments in the call to \code{\link{new}}, which are
+      passed to a method for that class for the function
+      \code{\link{initialize}}.
+
+      Each class representation object contains a prototype object
+      for the class (although for a virtual class the prototype may be
+      \code{NULL}). The prototype object must have values for all the
+      slots of the class.
+      By default, these are the prototypes of the corresponding slot
+      classes.  However, the definition of the class can specify any
+      valid object for any of the slots.
+    }
+  }
+}
+\section{Basic classes}{
+
+      There are a number of \sQuote{basic} classes, corresponding to the
+      ordinary kinds of data occurring in \R.  For example,
+      \code{"numeric"} is a class corresponding to numeric vectors.
+      The other vector basic classes are \code{"logical"}, \code{"integer"},
+      \code{"complex"}, \code{"character"},  \code{"raw"}, \code{"list"}
+      and \code{"expression"}.
+      The prototypes for
+      the vector classes are vectors of length 0 of the corresponding
+      type.  Notice that basic classes are unusual in that the
+      prototype object is from the class itself.
+
+      In addition to the vector classes there are also basic classes
+      corresponding to objects in the
+      language, such as \code{"function"} and \code{"call"}.
+      These classes are subclasses of the virtual class \code{"language"}.
+      Finally, there are object types and corresponding basic classes for
+      \dQuote{abnormal} objects, such as \code{"environment"} and
+      \code{"externalptr"}.
+      These objects do not follow the
+      functional behavior of the language; in particular, they are not
+      copied and so cannot have attributes or slots defined locally.
+
+     All these classes can be used as slots or as
+      superclasses for any other class definitions, although they do
+      not themselves come with an explicit class.  For the abnormal
+      object types, a special mechanism is used to enable inheritance
+      as described below.
+
+
+}
+% S3 classes
+
+\section{Inheriting from non-S4 Classes}{
+  A class definition can extend classes other than
+  regular S4 classes, usually by specifying them in the
+  \code{contains=} argument to \code{\link{setClass}}.  Three groups
+  of such classes behave distinctly:
+\enumerate{
+\item
+S3 classes, which must have been registered by a previous call to
+\code{\link{setOldClass}} (you can check that this has been done
+  by calling \code{\link{getClass}}, which should return a class that
+  extends \linkS4class{oldClass});
+
+\item
+  One of the \R object types, typically a vector type, which then
+    defines the type of the S4 objects, but also a type such as
+    \code{\link{environment}} that can not be used directly as a type
+    for an S4 object.  See
+    below.
+
+\item
+  One of the pseudo-classes \code{\linkS4class{matrix}}
+      and \code{\linkS4class{array}}, implying objects with
+      arbitrary vector types plus the \code{dim} and \code{dimnames}
+      attributes.
+  }
+
+  This section describes the approach to combining S4 computations
+  with older S3 computations by using such classes as superclasses. The
+  design goal is to allow the S4 class to inherit S3 methods and
+  default computations in as consistent a form as possible.
+
+  As part of a general effort to make the S4 and S3 code in R more
+  consistent, when objects from an S4 class are used as the first
+  argument to a non-default S3 method, either for an S3 generic function
+  (one that calls \code{\link{UseMethod}}) or for one of the primitive
+  functions that dispatches S3 methods, an effort is made to provide a
+  valid object for that method.  In particular, if the S4 class extends
+  an S3 class or \code{matrix} or \code{array}, and there is an S3
+  method matching one of these classes, the S4 object will be coerced to
+  a valid S3 object, to the extent that is possible given that there is
+  no formal definition of an S3 class.
+
+  For example, suppose \code{"myFrame"} is an S4 class that includes the
+  S3 class \code{"data.frame"} in the \code{contains=} argument to
+  \code{\link{setClass}}.  If an object from this S4 class is passed to
+  a function, say \code{\link{as.matrix}}, that has an S3 method for
+  \code{"data.frame"}, the internal code for \code{\link{UseMethod}}
+  will convert the object to a data frame; in particular, to an S3
+  object whose class attribute will be the vector corresponding to the
+  S3 class (possibly containing multiple class names). Similarly for an
+  S4 object inheriting from \code{"matrix"} or \code{"array"}, the S4
+  object will be converted to a valid S3 matrix or array.
+
+  Note that the conversion is \emph{not} applied when an S4 object is
+  passed to the default S3 method.  Some S3 generics attempt to deal
+  with general objects, including S4 objects.  Also, no transformation
+  is applied to S4 objects that do not correspond to a selected S3
+  method; in particular, to objects from a class that does not contain
+  either an S3 class or one of the basic types.  See \code{\link{asS4}}
+  for the transformation details.
+
+      In addition to explicit S3 generic functions, S3 methods are
+      defined for a variety of operators and functions implemented as
+      primitives.  These methods are dispatched by some internal C
+      code that operates partly through the same code as real S3
+      generic functions and partly via special considerations (for
+      example, both arguments to a binary operator are examined when
+      looking for methods).  The same mechanism for adapting S4
+      objects to S3 methods has been applied to these computations as
+      well, with a few exceptions such as generating an error if an S4
+      object that does not extend an appropriate S3 class or type is
+      passed to a binary operator.
+
+      The remainder of this section discusses the mechanisms for
+      inheriting from  basic object types. See \code{\linkS4class{matrix}}
+      or \code{\linkS4class{array}}
+      for inhering from the matrix and array
+      pseudo-classes, or from time-series.  For the
+      corresponding details for inheritance
+      from S3 classes, see \code{\link{setOldClass}}.
+
+      An object from a class that directly and simply contains one
+      of the basic object types in \R, has implicitly a corresponding
+      \code{.Data} slot of that type, allowing computations to extract
+      or replace the data part while leaving other slots
+      unchanged. If the type is one that can accept attributes and is
+      duplicated normally, the inheritance also determines the type of the
+      object; if the class definition has a \code{.Data} slot
+      corresponding to a normal type, the class of the
+      slot determines the type of the object (that is, the value of
+      \code{\link{typeof}(x)}).
+      For such classes,  \code{.Data} is a pseudo-slot; that
+      is, extracting or setting it modifies the non-slot data in the
+      object.  The functions \code{\link{getDataPart}} and
+      \code{\link{setDataPart}} are a cleaner, but essentially
+      equivalent way to deal with the data part.
+
+      Extending a basic type this way allows objects to
+      use old-style code for the corresponding type as well as S4
+      methods.  Any basic type can be used for \code{.Data}, but
+      a few types are treated differently because they do not behave like ordinary objects;
+      for example, \code{"NULL"}, environments, and external pointers.
+      Classes extend these types by having a slot, \code{.xData},
+      itself inherited from an internally defined S4 class.  This
+      slot actually contains an object of the inherited type, to
+      protect computations from the reference semantics of the type.
+      Coercing to the nonstandard object type then requires an
+      actual computation, rather than the \code{"simple"} inclusion
+      for other types and classes.  The intent is that programmers
+      will not need to take account of the mechanism, but one
+      implication is that you should \emph{not} explicitly use the
+      type of an S4 object to detect inheritance from an arbitrary
+      object type.  Use
+      \code{\link{is}} and similar functions instead.
+}
+
+
+
+
+\references{
+ Chambers, John M. (2016)
+ \emph{Extending R},
+  Chapman & Hall.
+(Chapters 9 and 10.)
+}
+
+\seealso{
+  \code{\link{Methods_Details}} for analogous discussion of methods,
+  \code{\link{setClass}} for details of specifying class definitions,
+  \code{\link{is}},
+  \code{\link{as}},
+  \code{\link{new}},
+  \code{\link{slot}}
+}
+\keyword{programming}
+\keyword{classes}
+\keyword{methods}
diff --git a/src/library/methods/man/Documentation.Rd b/src/library/methods/man/Documentation.Rd
index 94427a2..08000f2 100644
--- a/src/library/methods/man/Documentation.Rd
+++ b/src/library/methods/man/Documentation.Rd
@@ -1,5 +1,5 @@
 % File src/library/methods/man/Documentation.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2007 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/methods/man/EmptyMethodsList-class.Rd b/src/library/methods/man/EmptyMethodsList-class.Rd
index 23d3fe2..cd48e2f 100644
--- a/src/library/methods/man/EmptyMethodsList-class.Rd
+++ b/src/library/methods/man/EmptyMethodsList-class.Rd
@@ -1,6 +1,6 @@
 % File src/library/methods/man/EmptyMethodsList-class.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2007 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2015 R Core Team
 % Distributed under GPL 2 or later
 
 \name{EmptyMethodsList-class}
@@ -34,9 +34,9 @@
   signature.
 }
 \seealso{
-  Function \code{\link{MethodsListSelect}} uses the objects;
-  see the class \code{\linkS4class{MethodsList}} for the non-empty
-  methods list objects.
+  Function \code{\link{MethodsListSelect}} (deprecated since \R version
+  3.2.0) uses the objects;
+  class \code{\linkS4class{MethodsList}} is formally defunct since \R 3.2.0.
 }
 \keyword{classes}
 \keyword{internal}
diff --git a/src/library/methods/man/EnvironmentClass.Rd b/src/library/methods/man/EnvironmentClass.Rd
index f808664..f874e87 100644
--- a/src/library/methods/man/EnvironmentClass.Rd
+++ b/src/library/methods/man/EnvironmentClass.Rd
@@ -1,5 +1,5 @@
 % File src/library/methods/man/EnvironmentClass.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2007 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/methods/man/GenericFunctions.Rd b/src/library/methods/man/GenericFunctions.Rd
index 72dcffb..8ec3b8f 100644
--- a/src/library/methods/man/GenericFunctions.Rd
+++ b/src/library/methods/man/GenericFunctions.Rd
@@ -1,6 +1,6 @@
 % File src/library/methods/man/GenericFunctions.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2007 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2016 R Core Team
 % Distributed under GPL 2 or later
 
 \name{GenericFunctions}
@@ -173,20 +173,6 @@ getGenerics(where, searchForm = FALSE)
 
 \section{Details}{
   \describe{
-    \item{\code{setGeneric}:}{
-      If there is already a non-generic function of this name, it will
-      be used to define the generic unless \code{def} is supplied, and
-      the current function will become the default method for the
-      generic.
-
-      If \code{def} is supplied, this defines the generic function, and
-      no default method will exist (often a good feature, if the
-      function should only be available for a meaningful subset of all
-      objects).
-
-      Arguments \code{group} and \code{valueClass} are retained for
-      consistency with S-Plus, but are currently not used.
-    }
     \item{\code{isGeneric}:}{
       If the \code{fdef} argument is supplied, take this as the
       definition of the generic, and test whether it is really a
@@ -238,14 +224,12 @@ getGenerics(where, searchForm = FALSE)
   }
 }
 \references{
- Chambers, John M. (2008)
- \emph{Software for Data Analysis: Programming with R}
-  Springer.  (For the R version.)
-
- Chambers, John M. (1998)
- \emph{Programming with Data}
- Springer (For the original S4 version.)
+ Chambers, John M. (2016)
+ \emph{Extending R},
+  Chapman & Hall.
+(Chapters 9 and 10.)
 }
+
 \seealso{
   \code{\link{getMethod}} (also for \code{selectMethod}),
   \code{\link{setGeneric}},
@@ -287,7 +271,7 @@ mustDie(standardGeneric("show"))  # a generic, but not called from its body
 
 ## method dumping ------------------------------------
 
-setClass("A", representation(a="numeric"))
+setClass("A", slots = c(a="numeric"))
 setMethod("plot", "A", function(x,y,...){ cat("A meth\n") })
 dumpMethod("plot","A", file="")
 \dontrun{
diff --git a/src/library/methods/man/Introduction.Rd b/src/library/methods/man/Introduction.Rd
new file mode 100644
index 0000000..9e2995e
--- /dev/null
+++ b/src/library/methods/man/Introduction.Rd
@@ -0,0 +1,158 @@
+\name{Introduction}
+\alias{Introduction}
+
+\title{Basic use of S4 Methods and Classes}
+
+\description{
+The majority of applications using methods and classes will be in \R
+packages implementing new computations for an application, using new \emph{classes}
+of objects that represent the data and results.
+Computations will be implemented using \emph{methods} that implement
+functional computations when one or more of the arguments is an object
+from these classes.
+
+Calls to the functions \code{\link{setClass}()} define the new classes;
+calls to \code{\link{setMethod}} define the methods.
+These, along with ordinary \R computations, are sufficient to get
+started for most applications.
+
+Classes are defined in terms of the data in them and what other
+classes of data they inherit from.
+Section \sQuote{Defining Classes} outlines the basic design of new classes.
+
+Methods are \R functions, often implementing basic computations as
+they apply to the new classes of objects.
+Section \sQuote{Defining Methods} discusses basic requirements and
+special tools for defining methods.
+
+The classes discussed here are the original functional classes.
+\R also supports formal classes and methods similar to those in other
+languages such as Python, in which methods are part of class
+definitions and invoked on an object.
+These are more appropriate when computations expect references to
+objects that are persistent, making changes to the object over time.
+See \link{ReferenceClasses} and Chapter 9 of the reference for the
+choice between these and S4 classes.
+}
+
+\section{Defining Classes}{
+All objects in \R belong to a class; ordinary vectors and other basic
+objects are built-in (\link{builtin-class}).
+A new class is defined in terms of the named \emph{slots} that is has
+and/or in terms of existing classes that it inherits from, or
+\emph{contains} (discussed in \sQuote{Class Inheritance} below).
+A call to \code{\link{setClass}()} names a new class and uses the corresponding arguments to
+define it.
+
+For example, suppose we want a class of objects to represent a
+collection of positions, perhaps from GPS readings.
+A natural way to think of these in \R would have vectors of numeric values for
+latitude, longitude and altitude.
+A class with three corresponding slots could be defined by:
+
+\code{
+Pos <- setClass("Pos", slots = c(latitude = "numeric",
+            longitude = "numeric", altitude = "numeric"))
+}
+
+The value returned is a function, typically assigned as here with the
+name of the class.  Calling this function returns an object from the
+class; its arguments are named with the slot names.
+If a function in the class had read the corresponding data, perhaps
+from a CSV file or from a data base, it could return an object from
+the class by:
+
+\code{Pos(latitude = x, longitude = y, altitude = z)}
+
+The slots are accessed by the
+\code{\link{@}} operator; for example, if \code{g} is an object from
+the class, \code{g at latitude}.
+
+In addition to returning a generator function the call to
+\code{\link{setClass}()} assigns a definition of the class in a
+special metadata object in the package's namespace.
+When the package is loaded into an \R session, the class definition is
+added to a table of known classes.
+
+To make the class and the generating function publicly available, the
+package should include \code{POS} in \code{exportClasses()} and
+\code{export()} directives in its \code{NAMESPACE} file:
+
+\code{exportClasses(Pos); export(Pos)}
+}
+
+\section{Defining Methods}{
+Defining methods for an \R function makes that function
+\emph{generic}.
+Instead of a call to the function always being carried out by the same
+method, there will be several alternatives.
+These are selected by matching the classes of the arguments in the call to a
+table  in the generic function, indexed by classes for one or more formal arguments to the
+function, known as the \emph{signatures} for the methods.
+
+
+A method definition then specifies three things:  the name of the
+function, the signature and the method definition itself.
+The definition must be a function with the same formal arguments as
+the generic.
+
+For example, a method to make a plot of an object from class
+\code{"Pos"} could be defined by:
+
+\code{setMethod("plot", c("Pos", "missing"), function(x, y, ...) \{
+  plotPos(x, y) \})}
+
+This method will match a call to \code{\link{plot}()} if the first
+argument is from class \code{"Pos"} or a subclass of that.
+The second argument must be missing; only a missing argument matches
+that class in the signature.
+Any object will match class \code{"ANY"} in the corresponding position
+of the signature.
+}
+
+\section{Class Inheritance}{
+
+A class may inherit all the slots and methods of one or more existing
+classes by specifying the names of the inherited classes in the \code{contains =} argument to
+\code{\link{setClass}()}.
+
+To define a class that extends class \code{"Pos"} to a class
+\code{"GPS"} with a slot for the observation times:
+
+\code{GPS <- setClass("GPS", slots = c(time = "POSIXt"), contains = "Pos")}
+
+The inherited classes may be S4 classes, S3
+classes or basic data types.
+S3 classes need to be identified as such by a call to
+\code{\link{setOldClass}()}; most S3 classes in the base package and
+many in the other built-in packages are already declared, as is
+\code{"POSIXt"}.
+If it had not been, the application package should contain:
+
+\code{setOldClass("POSIXt")}
+
+Inheriting from one of the \R types is special.  Objects from the new
+class will have the same type.  A class
+\code{Currency} that contains numeric data plus a slot \code{"unit"}
+would be created by
+
+\code{Currency <- setClass("Currency", slots = c(unit = "character"),
+  contains = "numeric")}
+
+Objects created from this class will have type \code{"numeric"} and
+inherit all the builtin arithmetic and other computations for that
+type.
+Classes can only inherit from at most one such type; if the class does
+not inherit from a type, objects from the class will have type
+\code{"S4"}.
+
+}
+
+
+\references{
+ Chambers, John M. (2016)
+ \emph{Extending R},
+  Chapman & Hall.
+(Chapters 9 and 10.)
+}
+
diff --git a/src/library/methods/man/LanguageClasses.Rd b/src/library/methods/man/LanguageClasses.Rd
index d080d52..257368b 100644
--- a/src/library/methods/man/LanguageClasses.Rd
+++ b/src/library/methods/man/LanguageClasses.Rd
@@ -1,9 +1,10 @@
 % File src/library/methods/man/LanguageClasses.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2008 R Core Team
 % Distributed under GPL 2 or later
 
 \name{language-class}
+\title{Classes to Represent Unevaluated Language Objects}
 \docType{class}
 \alias{language-class}
 \alias{(-class}
@@ -15,8 +16,6 @@
 \alias{while-class}
 \alias{name-class}
 \alias{\{-class}
-
-\title{Classes to Represent Unevaluated Language Objects }
 \description{  The virtual class \code{"language"} and the specific
   classes that extend it represent unevaluated objects, as produced for
   example by the parser or by functions such as \code{\link{quote}}.
@@ -35,7 +34,7 @@
 "repeat"
 "while"
 "name"
-"\{"
+"{"
 
 ### Each of the classes above extends the virtual class
 "language"
@@ -44,17 +43,23 @@
   \code{"language"} is a virtual class; no objects may be created from
   it.
 
-Objects from the other classes can be generated by a call to
-\code{new(Class, ...)}, where \code{Class} is the quoted class name, and
-the \dots arguments are either empty or a \emph{single} object that is
-from this class (or an extension).}
-
-
+  Objects from the other classes can be generated by a call to
+  \code{new(Class, ...)}, where \code{Class} is the quoted class name, and
+  the \dots arguments are either empty or a \emph{single} object that is
+  from this class (or an extension).
+}
 \section{Methods}{
   \describe{
     \item{coerce}{\code{signature(from = "ANY", to = "call")}.  A method
       exists for \code{as(object, "call")}, calling \code{as.call()}. }
   }
+}
+\examples{
+showClass("language")
+
+is( quote(sin(x)) ) # "call"  "language"
 
+(ff <- new("if"))  ; is(ff) # "if" "language"
+(ff <- new("for")) ; is(ff) # "for" "language"
 }
 \keyword{classes}
diff --git a/src/library/methods/man/LinearMethodsList-class.Rd b/src/library/methods/man/LinearMethodsList-class.Rd
index 6d8919f..d7f37fe 100644
--- a/src/library/methods/man/LinearMethodsList-class.Rd
+++ b/src/library/methods/man/LinearMethodsList-class.Rd
@@ -1,5 +1,5 @@
 % File src/library/methods/man/LinearMethodsList-class.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2007 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/methods/man/MethodDefinition-class.Rd b/src/library/methods/man/MethodDefinition-class.Rd
index b750e7e..3556b65 100644
--- a/src/library/methods/man/MethodDefinition-class.Rd
+++ b/src/library/methods/man/MethodDefinition-class.Rd
@@ -1,5 +1,5 @@
 % File src/library/methods/man/MethodDefinition-class.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2007 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/methods/man/MethodSupport.Rd b/src/library/methods/man/MethodSupport.Rd
index 69023af..fc08144 100644
--- a/src/library/methods/man/MethodSupport.Rd
+++ b/src/library/methods/man/MethodSupport.Rd
@@ -1,17 +1,16 @@
 % File src/library/methods/man/MethodSupport.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2009 R Core Team
 % Distributed under GPL 2 or later
 
 \name{MethodSupport}
 \title{Additional (Support) Functions for Methods}
-\alias{OldEvalSelectedMethod}
 \alias{getMethodsForDispatch}
 \alias{cacheMethod}
 \alias{resetGeneric}
 \alias{listFromMethods}
 \description{
-  These are support routines for computations on formal methods.
+  These are \emph{internal} support routines for computations on formal methods.
 }
 \usage{
 listFromMethods(generic, where, table)
diff --git a/src/library/methods/man/MethodWithNext-class.Rd b/src/library/methods/man/MethodWithNext-class.Rd
index 868babf..0999e61 100644
--- a/src/library/methods/man/MethodWithNext-class.Rd
+++ b/src/library/methods/man/MethodWithNext-class.Rd
@@ -1,5 +1,5 @@
 % File src/library/methods/man/MethodWithNext-class.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2007 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/methods/man/Methods.Rd b/src/library/methods/man/Methods.Rd
index 4e3e4c9..08d84c2 100644
--- a/src/library/methods/man/Methods.Rd
+++ b/src/library/methods/man/Methods.Rd
@@ -1,638 +1,28 @@
 % File src/library/methods/man/Methods.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2010 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2016 R Core Team
 % Distributed under GPL 2 or later
 
 \name{Methods}
 \alias{Methods}
-\title{General Information on Methods}
+\title{S4 Class Documentation}
 \description{
-  This documentation section covers some general topics on how methods
-  work and how the \pkg{methods} package interacts with the rest of \R.  The
-  information is usually not needed to get started with methods and
-  classes, but may be helpful for moderately ambitious projects, or when
-  something doesn't work as expected.
+  You have navigated to an old link to documentation of S4 methods.
 
-  The section \dQuote{How Methods Work} describes the underlying
-  mechanism; \dQuote{S3 Methods and Generic Functions} gives the rules applied when S4
-  classes and methods interact with older S3 methods; \dQuote{Method Selection and Dispatch} provides more
-  details on how class definitions determine which methods are used;
-  \dQuote{Generic Functions} discusses generic functions as objects.
-  For additional information specifically about class definitions, see \code{\link{Classes}}.
-}
-
-\section{How Methods Work}{
-  A generic function  has associated with it a
-  collection of other functions (the methods), all of which have the same
-  formal arguments as the generic.  See the \dQuote{Generic
-    Functions} section below for more on generic functions themselves.
-
-  Each \R package will include  methods metadata objects
-  corresponding to each generic function  for which methods have been
-  defined in that package.
-  When the package is loaded into an \R session, the methods for each
-  generic function are \emph{cached}, that is, stored in the
-  environment of the generic function along with the methods from
-  previously loaded packages.  This merged table of methods is used to
-  dispatch or select methods from the generic, using class inheritance
-  and possibly group generic functions (see
-  \code{\link{GroupGenericFunctions}}) to find an applicable method.
-  See the \dQuote{Method Selection and Dispatch} section below.
-  The caching computations ensure that only one version of each
-  generic function is visible globally; although different attached
-  packages may contain a copy of the generic function, these behave
-  identically with respect to method selection.
-  In contrast, it is possible for the same function name to refer to
-  more than one generic function, when these have different
-  \code{package} slots.  In the latter case, \R considers the
-  functions unrelated:  A generic function is defined by the
-  combination of name and package.  See the \dQuote{Generic Functions}
-  section below.
-
-  The methods for a generic are stored according to the
-  corresponding \code{signature} in the call to \code{\link{setMethod}}
- that defined  the method.  The signature associates one
-  class name with each of a subset of the formal arguments to the
-  generic function.  Which formal arguments are available, and the
-  order in which they appear, are determined by the \code{"signature"}
-  slot of the generic function itself.  By default, the signature of the
-  generic consists of all the formal arguments except \dots, in the
-  order they appear in the function definition.
-
-  Trailing arguments in the signature of the generic will be \emph{inactive}  if no
-  method has yet been specified that included those arguments in its signature.
-  Inactive arguments are not needed or used in labeling the cached
-  methods.  (The distinction does not change which methods are
-  dispatched, but ignoring inactive arguments improves the
-  efficiency of dispatch.)
-
-  All arguments in the signature of the generic function will be evaluated when the
-  function is called, rather than using the traditional lazy
-  evaluation rules of S.  Therefore, it's important to \emph{exclude}
-  from the signature any arguments that need to be dealt with
-  symbolically (such as the first argument to function
-  \code{\link{substitute}}).  Note that only actual arguments are
-  evaluated, not default expressions.
-  A missing argument enters into the method selection as class
-  \code{"missing"}.
-
-  The cached methods are stored in an
-  environment object.  The names used for assignment are a
-  concatenation of the class names for the active arguments in the method signature.
-
-}
-
-\section{Methods for S3 Generic Functions}{
-
-S4 methods may be wanted for functions that also have S3 methods, corresponding to classes for the first
-formal argument of an S3 generic function--either a regular R function in which there is a
-call to the S3 dispatch function, \code{\link{UseMethod}},
-or one of a fixed set of primitive
-functions, which are not true functions but go directly to C code.
-In either case S3 method dispatch looks at the class of the first
-argument or the class of either
-argument in a call to one of the primitive binary operators.
-S3 methods are ordinary functions with the same arguments as the
-generic function (for primitives the formal arguments are not actually
-part of the object, but are simulated when the object is printed or
-viewed by \code{\link{args}()}).
-The \dQuote{signature} of an S3 method is identified  by the name to
-which the method is assigned, composed of the name of the
-generic function, followed by \code{"."}, followed by the name of the class.
-For details, see \link{S3Methods}.
-
-To implement a method for one of these functions corresponding to S4
-classes, there are two possibilities: either an S4 method or an S3 method with the
-S4 class name.
-The S3 method is only possible if the intended signature has the
-first argument and nothing else.
-In this case,
-the recommended approach is to define the S3 method and also supply the
-identical function as the definition of the S4 method.
-If the S3 generic function was \code{f3(x, ...)} and the S4 class for
-the new method was
-\code{"myClass"}:
-
- \code{f3.myClass <- function(x, ...) { ..... }}
-
- \code{setMethod("f3", "myClass", f3.myClass)}
-
-The reasons for defining both S3 and S4 methods are as follows:
-\enumerate{
-  \item An S4 method alone will not be seen if the S3 generic function
-    is called directly.  However, primitive functions and operators
-    are exceptions:  The internal C code will look for S4 methods
-    if and only if the object is an S4 object.  In the examples, the method
-    for \code{`[`} for class \code{"myFrame"} will always be called
-    for objects of this class.
-
-    For the same reason, an S4 method defined for an S3 class will not be called from
-    internal code for a non-S4 object. (See the example for function
-    \code{Math} and
-    class \code{"data.frame"} in the examples.)
-  \item An S3 method alone will not be called if there is \emph{any}
-    eligible non-default S4 method. (See the example for function
-    \code{f3} and class \code{"classA"} in the examples.)
-}
-Details of the selection computations are given below.
-
-When an S4 method is defined for an existing function that is not an
-S4 generic function (whether or not the existing function is an S3 generic),
-an S4 generic function will be created corresponding to the existing
-function and the package in which it is found (more precisely,
-according to the implicit generic function either specified or
-inferred from the ordinary function; see \code{\link{implicitGeneric}}).
-A message is printed after the initial call to
-\code{\link{setMethod}}; this is not an error, just a reminder that
-you have created the generic.
-Creating the generic explicitly by the call
-
-  \code{setGeneric("f3")}
-
-avoids the message, but has the same effect.
-The existing function becomes the default method for
-the S4 generic function.
-Primitive functions work the same way, but
-the S4 generic function is not explicitly created (as discussed below).
-
-
-S4 and S3 method selection are designed to follow compatible rules of
-inheritance, as far as possible.
-S3 classes can be used for any S4 method selection, provided that the
-S3 classes have been registered by a call to
-\code{\link{setOldClass}}, with that call specifying the correct S3
-inheritance pattern.
-S4 classes can be used for any S3 method selection; when an S4 object
-is detected, S3 method selection uses the contents of
-\code{\link{extends}(class(x))} as the equivalent of the S3
-inheritance (the inheritance is cached after the first call).
-
-An existing S3 method may not behave as desired for an S4 subclass, in
-which case utilities such as \code{\link{asS3}} and
-\code{\link{S3Part}} may be useful.  If the S3 method fails on the S4
-object, \code{asS3(x)} may be passed instead; if the object returned
-by the S3 method needs to be incorporated in the S4 object, the
-replacement function for \code{S3Part} may be useful, as in the method
-for class \code{"myFrame"} in the examples.
-
-Here are details explaining the reasons for defining both S3 and S4 methods.
-Calls still accessing the S3 generic function
-directly will not see S4 methods, except in the case of primitive
-functions.
-This means that calls to the generic function from namespaces that
-import the S3 generic but not the S4 version will only see S3
-methods.
-On the other hand, S3 methods will only be selected from the
-S4 generic function as part of its default (\code{"ANY"}) method.
-If there are inherited S4 non-default methods, these will be chosen in
-preference to \emph{any} S3 method.
-
-S3 generic functions implemented as primitive functions (including
-binary operators) are an exception to recognizing only
-S3 methods.
-These functions dispatch both S4 and S3 methods from
-the internal C code.
-There is no explicit generic function, either S3 or S4.
-The internal code looks for S4 methods if the first
-argument, or either of the arguments in the case of a binary operator,
-is an S4 object.
-If no S4 method is found, a search is made for an S3 method.
-
-S4 methods can be defined for an S3 generic function and an S3 class,
-but if the function is a primitive, such methods will not be selected
-if the object in question is not an S4 object.
-In the examples below, for instance,  an S4 method for signature
-\code{"data.frame"} for function \code{f3()} would be called for the
-S3 object \code{df1}.
-A similar S4 method for primitive function
-\code{`[`} would be ignored for that object, but would be called for
-the S4 object \code{mydf1} that inherits from \code{"data.frame"}.
-Defining both an S3 and S4 method removes this inconsistency.
-
-
-}
-\section{Method Selection and Dispatch: Details}{
-
-When a call to a generic function is evaluated, a method is selected corresponding
-to the classes of the actual arguments in the signature.
-First, the cached methods table is searched for an  exact match;
-that is, a method stored under the signature defined by
-the string value of \code{class(x)} for each non-missing
-argument, and \code{"missing"} for each missing argument.
-If no method is found directly for the actual arguments in a call to a
-generic function, an attempt is made to match the available methods to
-the arguments by using the superclass information about the actual classes.
-
-Each class definition may include a list of  one or more
-\emph{superclasses} of the new class.
-The simplest and most common specification is by the \code{contains=} argument in
-the  call to \code{\link{setClass}}.
-Each class named in this argument is a superclass of the new class.
-Two additional mechanisms for defining
-superclasses exist.
-A call to \code{\link{setClassUnion}} creates a union class that
-is a
-superclass of each of the members of the union.
- A call to
-\code{\link{setIs}} can create an inheritance relationship that is not the simple one of
-containing the superclass representation in the new class.
-Arguments \code{coerce} and \code{replace} supply methods to convert
-to the superclass and to replace the part corresponding to the superclass.
-(In addition, a \code{test=} argument allows conditional inheritance;  conditional inheritance is not
-recommended and is not used in method selection.)
-All three mechanisms are treated equivalently for purposes of
-method selection:  they define the \emph{direct} superclasses of a
-particular class.
-For more details on the mechanisms, see \code{\link{Classes}}.
-
-The direct superclasses themselves may
-have superclasses, defined by any of the same mechanisms, and
-similarly through further generations.  Putting all this information together produces
-the full list of superclasses for this class.
-The superclass list is included in the definition of the class that is
-cached during the \R session.
-Each element of the list describes the nature of the relationship (see
-\code{\linkS4class{SClassExtension}} for details).
-Included in the element is a \code{distance} slot containing
-the path length for the relationship:
-\code{1} for direct superclasses (regardless of which mechanism
-defined them), then \code{2} for the direct superclasses of those
-classes, and so on.
-In addition, any class implicitly has class \code{"ANY"} as a superclass.  The
-distance to \code{"ANY"} is treated as larger than the distance to any
-actual class.
-The special class \code{"missing"} corresponding to missing arguments
-has only \code{"ANY"} as a superclass, while \code{"ANY"} has no
-superclasses.
-
-When a class definition is created or modified, the superclasses
-are ordered, first by a stable sort of the all superclasses by
-distance.
-If the set of superclasses has duplicates (that is, if some class is
-inherited through more than one relationship), these are removed, if
-possible, so that the list of superclasses is consistent with the
-superclasses of all direct superclasses.
-See the reference on inheritance for details.
-
-The information about superclasses is summarized when a class
-definition is printed.
-
-When a method is to be selected by inheritance, a search is made in
-the table for all methods directly corresponding to a combination of
-either the direct class or one of its superclasses, for each argument
-in the active signature.
-For an example, suppose there is only one argument in the signature and that the class of
-the corresponding object was \code{"dgeMatrix"} (from the recommended package
-\code{Matrix}).
-This class has two direct superclasses and through these 4 additional superclasses.
-Method selection finds all the methods in the table of directly
-specified methods labeled by one of these classes, or by
-\code{"ANY"}.
-
-When there are multiple arguments in the signature, each argument will
-generate a similar  list of inherited classes.
-The possible matches are now all the combinations of classes from each
-argument (think of the function \code{outer} generating an array of
-all possible combinations).
-The search now finds all the methods matching any of this combination
-of classes.
-For each argument, the position in the list of superclasses of that
-argument's class defines which method or methods (if the same class
-appears more than once) match best.
-When there is only one argument, the best match is unambiguous.
-With more than one argument, there may be zero or one match that is
-among the best matches for \emph{all} arguments.
-
-If there is no best match, the selection is ambiguous and a message is
-printed noting which method was selected (the first method
-lexicographically in the ordering) and what other methods could have
-been selected.
-Since the ambiguity is usually nothing the end user could control,
-this is not a warning.
-Package authors should examine their package for possible ambiguous
-inheritance by calling \code{\link{testInheritedMethods}}.
-
-When the inherited method has been selected, the selection is cached
-in the generic function so that future calls with the same class will
-not require repeating the search.  Cached inherited selections are
-not themselves used in future inheritance searches, since that could result
-in invalid selections.
-If you want inheritance computations to be done again (for example,
-because a newly loaded package has a more direct method than one
-that has already been used in this session), call
-\code{\link{resetGeneric}}.  Because classes and methods involving
-them tend to come from the same package, the current implementation
-does not reset all generics every time a new package is loaded.
-
-Besides being initiated through calls to the generic function, method
-selection can be done explicitly by calling the function
-\code{\link{selectMethod}}.
-
-Once a method has been selected, the evaluator creates a new context
-in which a call to the method is evaluated.
-The context is initialized with the arguments from the call to the
-generic function.
-These arguments are not rematched.  All the arguments in the signature
-of the generic will have been evaluated (including any that are
-currently inactive); arguments that are not in the signature will obey
-the usual lazy evaluation rules of the language.
-If an argument was missing in the call, its default expression if any
-will \emph{not} have been evaluated, since method dispatch always uses
-class \code{missing} for such arguments.
-
-A call to a generic function therefore has two contexts:  one for the
-function and a second for the method.
-The argument objects will be copied to the second context, but not any
-local objects created in a nonstandard generic function.
-The other important distinction is that the parent
-(\dQuote{enclosing}) environment of the second context is the environment
-of the method as a function, so that all \R programming techniques
-using such environments apply to method definitions as ordinary functions.
-
-
-For further discussion of method selection and dispatch,  see the
-first reference.
-
-}
-
-\section{Generic Functions}{
-In principle, a generic function could be any function that evaluates
-a call to \code{standardGeneric()}, the internal function that selects
-a method and evaluates a call to  the selected method.  In practice,
-generic functions are special objects that in addition to being from a
-subclass of class \code{"function"} also extend the class
-\code{\linkS4class{genericFunction}}.  Such objects have slots to define
-information needed to deal with their methods.  They also have
-specialized environments, containing the tables used in method
-selection.
-
-The slots \code{"generic"} and  \code{"package"} in the object are the
-character string names of the generic function itself and of the
-package from which the  function is defined.
-As with classes, generic functions are uniquely defined in \R by the
-combination of the two names.
-There can be generic functions of the same name associated with
-different packages (although inevitably keeping such functions cleanly
-distinguished is not always easy).
-On the other hand, \R will enforce that only one definition of a
-generic function can be associated with a particular combination of
-function and package name, in the current session or other active
-version of \R.
-
-Tables of methods for a particular generic function, in this sense,
-will often be spread over several other packages.
-The total set of methods for a given generic function may change
-during a session, as additional packages are loaded.
-Each table must be consistent in the signature assumed for the generic
-function.
-
-\R distinguishes \emph{standard} and \emph{nonstandard} generic
-functions, with the former having a function body that does nothing
-but dispatch a method.
-For the most part, the distinction is just one of simplicity:  knowing
-that a generic function only dispatches a method call allows some
-efficiencies and also removes some uncertainties.
-
-In most cases, the generic function is the visible function
-corresponding to that name, in the corresponding package.
-There are two exceptions, \emph{implicit} generic
-functions and the special computations required to deal with \R's
-\emph{primitive} functions.
-Packages can contain a table of implicit generic versions of functions
-in the package, if the package wishes to leave a function non-generic
-but to constrain what the function would be like if it were generic.
-Such implicit generic functions are created during the installation of
-the package, essentially by defining the generic function and
-possibly methods for it, and then reverting the function to its
-non-generic form. (See \link{implicitGeneric} for how this is done.)
-The mechanism is mainly used for functions in the older packages in
-\R, which may prefer to ignore S4 methods.
-Even in this case, the actual mechanism is only needed if something
-special has to be specified.
-All functions have a corresponding implicit generic version defined
-automatically (an implicit, implicit generic function one might say).
-This function is a standard generic with the same arguments as the
-non-generic function, with the non-generic version as the default (and only)
-method, and with the generic signature being all the formal arguments
-except \dots.
-
-The implicit generic mechanism is needed only to override some aspect
-of the default definition.
-One reason to do so would be to remove some arguments from the
-signature.
-Arguments that may need to be interpreted literally, or for which the
-lazy evaluation mechanism of the language is needed, must \emph{not}
-be included in the signature of the generic function, since all
-arguments in the signature will be evaluated in order to select a
-method.
-For example, the argument \code{expr} to the function
-\code{\link{with}} is treated literally and must therefore be excluded
-from the signature.
-
-One would also need to define an implicit generic if the existing
-non-generic function were not suitable as the default method.
-Perhaps the function only applies to some classes of objects, and the
-package designer prefers to have no general default method.
-In the other direction, the package designer might have some ideas
-about suitable methods for some classes, if the function were generic.
-With reasonably modern packages, the simple approach in all these
-cases is just to define the function as a generic.
-The implicit generic mechanism is mainly attractive for older packages
-that do not want to require the methods package to be available.
-
-Generic functions will also be defined but not obviously visible for
-functions implemented as \emph{primitive} functions in the base
-package.
-Primitive functions look like ordinary functions when printed but are
-in fact not function objects but objects of two types interpreted by
-the \R evaluator to call underlying C code directly.
-Since their entire justification is efficiency, \R refuses to hide
-primitives behind a generic function object.
-Methods may be defined for most primitives, and corresponding metadata
-objects will be created to store them.
-Calls to the primitive still go directly to the C code, which will
-sometimes check for applicable methods.
-The definition of \dQuote{sometimes} is that methods must have been
-detected for the function in some package loaded in the session and
-\code{isS4(x)} is \code{TRUE} for  the first argument (or for the
-second argument, in the case of binary operators).
-You can test whether methods have been detected by calling
-\code{\link{isGeneric}} for the relevant function and you can examine
-the generic function by calling \code{\link{getGeneric}}, whether or
-not methods have been detected.
-For more on generic functions, see the first reference and also section 2 of \emph{R Internals}.
-
-}
-
-\section{Method Definitions}{
-All method definitions are stored as objects from the
-\code{\linkS4class{MethodDefinition}} class.
-Like the class of generic functions, this class extends ordinary \R
-functions with some additional slots: \code{"generic"}, containing the
-name and package of the generic function, and two signature slots,
-\code{"defined"} and \code{"target"}, the first being the signature supplied when
-the method was defined by a call to \code{\link{setMethod}}.
-The  \code{"target"} slot starts off equal to the \code{"defined"}
-  slot.  When an inherited method is cached after being selected, as
-  described above, a copy is made with the  appropriate \code{"target"}  signature.
-  Output from \code{\link{showMethods}}, for example, includes both
-  signatures.
-
-  Method definitions are required to have the same formal arguments as
-  the generic function, since the method dispatch mechanism does not
-  rematch arguments, for reasons of both efficiency and consistency.
-}
-
-\examples{
-## A class that extends a registered S3 class inherits that class' S3
-## methods.
-
-setClass("myFrame", contains = "data.frame",
-    representation(timestamps = "POSIXt"))
-
-df1 <- data.frame(x = 1:10, y = rnorm(10), z = sample(letters,10))
-
-mydf1 <- new("myFrame", df1, timestamps = Sys.time())
-
-## "myFrame" objects inherit "data.frame" S3 methods; e.g., for `[`
-
-mydf1[1:2, ] # a data frame object (with extra attributes)
-
-## a method explicitly for "myFrame" class
-
-
-setMethod("[",
-    signature(x = "myFrame"),
-    function (x, i, j, ..., drop = TRUE)
-    {
-        S3Part(x) <- callNextMethod()
-        x at timestamps <- c(Sys.time(), as.POSIXct(x at timestamps))
-        x
-    }
-)
-
-\donttest{mydf1[1:2, ]}
-
-
-setClass("myDateTime", contains = "POSIXt")
-
-now <- Sys.time() # class(now) is c("POSIXct", "POSIXt")
-nowLt <- as.POSIXlt(now)# class(nowLt) is c("POSIXlt", "POSIXt")
-
-mCt <- new("myDateTime", now)
-mLt <- new("myDateTime", nowLt)
-
-## S3 methods for an S4 object will be selected using S4 inheritance
-## Objects mCt and mLt have different S3Class() values, but this is
-## not used.
-f3 <- function(x)UseMethod("f3") # an S3 generic to illustrate inheritance
-
-f3.POSIXct <- function(x) "The POSIXct result"
-f3.POSIXlt <- function(x) "The POSIXlt result"
-f3.POSIXt <- function(x) "The POSIXt result"
-
-stopifnot(identical(f3(mCt), f3.POSIXt(mCt)))
-stopifnot(identical(f3(mLt), f3.POSIXt(mLt)))
-
-
-
-## An S4 object selects S3 methods according to its S4 "inheritance"
-
-
-setClass("classA", contains = "numeric",
-   representation(realData = "numeric"))
-
-Math.classA <- function(x) {(getFunction(.Generic))(x at realData)}
-setMethod("Math", "classA", Math.classA)
-
-
-x <- new("classA", log(1:10), realData = 1:10)
-
-stopifnot(identical(abs(x), 1:10))
-
-setClass("classB", contains = "classA")
-
-y <- new("classB", x)
-
-stopifnot(identical(abs(y), 1:10)) # (version 2.9.0 or earlier fails here)
-
-## an S3 generic: just for demonstration purposes
-f3 <- function(x, ...) UseMethod("f3")
-
-f3.default <- function(x, ...) "Default f3"
-
-## S3 method (only) for classA
-f3.classA <- function(x, ...) "Class classA for f3"
-
-## S3 and S4 method for numeric
-f3.numeric <- function(x, ...) "Class numeric for f3"
-setMethod("f3", "numeric", f3.numeric)
-
-## The S3 method for classA and the closest inherited S3 method for classB
-## are not found.
-
-f3(x); f3(y) # both choose "numeric" method
-
-## to obtain the natural inheritance, set identical S3 and S4 methods
-setMethod("f3", "classA", f3.classA)
-
-f3(x); f3(y) # now both choose "classA" method
-
-## Need to define an S3 as well as S4 method to use on an S3 object
-## or if called from a package without the S4 generic
-
-MathFun <- function(x) { # a smarter "data.frame" method for Math group
-  for (i in seq(length = ncol(x))[sapply(x, is.numeric)])
-    x[, i] <- (getFunction(.Generic))(x[, i])
-  x
-}
-setMethod("Math", "data.frame", MathFun)
-
-## S4 method works for an S4 class containing data.frame,
-## but not for data.frame objects (not S4 objects)
-
-try(logIris <- log(iris)) #gets an error from the old method
-
-## Define an S3 method with the same computation
-
-Math.data.frame <- MathFun
-
-logIris <- log(iris)
-
-
-
-
-\dontshow{
-removeClass("classA"); removeClass("classB"); rm(x,y)
-removeGeneric("f3")
-removeClass("myDateTime")
-removeMethod("Math", "data.frame"); rm(Math.data.frame, MathFun, logIris)
-}
+  For basic use of classes and methods, see \link{Introduction}; to
+  create new method definitions, see \code{\link{setMethod}}; for
+  technical details on S4 methods, see \link{Methods_Details}.
 
 }
 
 
 \references{
- Chambers, John M. (2008)
- \emph{Software for Data Analysis: Programming with R}
-  Springer.  (For the R version: see section 10.6 for method
-  selection and section 10.5 for generic functions).
-
- Chambers, John M.(2009)
- \emph{Developments in Class Inheritance and Method Selection}
- \url{http://stat.stanford.edu/~jmc4/classInheritance.pdf}.
-
- Chambers, John M. (1998)
- \emph{Programming with Data}
- Springer (For the original S4 version.)
+ Chambers, John M. (2016)
+ \emph{Extending R},
+  Chapman & Hall.
+(Chapters 9 and 10.)
 }
-\seealso{
-For more specific information, see
-  \code{\link{setGeneric}}, \code{\link{setMethod}}, and
-  \code{\link{setClass}}.
 
-For the use of \dots in methods, see  \link{dotsMethods}.
-}
 \keyword{programming}
 \keyword{classes}
 \keyword{methods}
diff --git a/src/library/methods/man/MethodsList-class.Rd b/src/library/methods/man/MethodsList-class.Rd
index a590e4a..0a2a2b4 100644
--- a/src/library/methods/man/MethodsList-class.Rd
+++ b/src/library/methods/man/MethodsList-class.Rd
@@ -1,16 +1,16 @@
 % File src/library/methods/man/MethodsList-class.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2007 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2015 R Core Team
 % Distributed under GPL 2 or later
 
 \name{MethodsList-class}
 \alias{MethodsList-class}
 \alias{body<-,MethodDefinition-method}
 \docType{class}
-\title{Class MethodsList, Deprecated Representation of Methods }
+\title{Class MethodsList, Defunct Representation of Methods }
 \description{ This class of objects was used in the original
   implementation of the package to control method dispatch.  Its use
-  is now deprecated, but object appear as the default method slot in
+  is now defunct, but object appear as the default method slot in
   generic functions.  This and any other remaining uses will be
   removed in the future.
 
@@ -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} }
+    any inherited methods.  Ignored when methods tables are used for dispatch (see \link{Methods_Details} }
 }}
 
 \details{
diff --git a/src/library/methods/man/MethodsList.Rd b/src/library/methods/man/MethodsList.Rd
index a24088c..34f4fc7 100644
--- a/src/library/methods/man/MethodsList.Rd
+++ b/src/library/methods/man/MethodsList.Rd
@@ -1,11 +1,22 @@
 % File src/library/methods/man/MethodsList.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2007 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2016 R Core Team
 % Distributed under GPL 2 or later
 
-\newcommand{\sspace}{\ifelse{latex}{\out{~}}{ }}
-
 \name{MethodsList}
+\title{MethodsList Objects}
+%
+\alias{listFromMlist}%  only used in listFromMlist(), deprecated below
+\alias{linearizeMlist}% only used in showMlist(), deprecated below
+%
+% but finalDefaultMethod() and loadMethod() seem somewhat important :
+\alias{finalDefaultMethod}
+\alias{loadMethod}
+\alias{loadMethod-methods}
+\alias{loadMethod,ANY-method}
+\alias{loadMethod,MethodDefinition-method}
+\alias{loadMethod,MethodWithNext-method}
+%% ALl the following are deprecated since R 3.2.0:
 \alias{MethodsList}
 \alias{makeMethodsList}
 \alias{SignatureMethod}
@@ -15,22 +26,13 @@
 \alias{print.MethodsList}
 \alias{emptyMethodsList}
 \alias{insertMethodInEmptyList}
-\alias{listFromMlist}
-\alias{linearizeMlist}
-\alias{finalDefaultMethod}
 \alias{mergeMethods}
-\alias{loadMethod}
-\alias{loadMethod-methods}
-\alias{loadMethod,ANY-method}
-\alias{loadMethod,MethodDefinition-method}
-\alias{loadMethod,MethodWithNext-method}
 \alias{MethodsListSelect}
-\title{MethodsList Objects}
 \description{
   These functions create and manipulate \code{MethodsList} objects, the
-  objects formerly used in R to store methods for dispatch.  Use of
-  these objects is no longer required, and while not yet formally
-  deprecated, will rarely be a good idea.  Where methods dispatch is
+  objects formerly used in \R to store methods for dispatch.  Use of
+  these objects is deprecated since \R 3.2.0, as it will rarely be a
+  good idea.  Where methods dispatch is
   to be studied, see \code{\link{selectMethod}}.  For computations
   that iterate over methods or over method signatures, see
   \code{\link{findMethods}}, which returns a linearized methods list
@@ -38,90 +40,83 @@
   than the recursive \code{MethodsList} objects.
 }
 \usage{
-MethodsList(.ArgName, ...)
+listFromMlist(mlist, prefix = list(), sigs. = TRUE, methods. = TRUE)
 
-makeMethodsList(object, level=1)
+linearizeMlist(mlist, inherited = TRUE)
 
-SignatureMethod(names, signature, definition)
+finalDefaultMethod(method)
 
-insertMethod(mlist, signature, args, def, cacheOnly)
+loadMethod(method, fname, envir)
 
+##--------- These are all deprecated, since R 3.2.0 ----------
+
+MethodsList(.ArgName, ...)
+makeMethodsList(object, level=1)
+SignatureMethod(names, signature, definition)
+insertMethod(mlist, signature, args, def, cacheOnly)
 inheritedSubMethodLists(object, thisClass, mlist, ev)
 
 showMlist(mlist, includeDefs = TRUE, inherited = TRUE,
    classes, useArgNames, printTo = stdout() )
-
 \method{print}{MethodsList}(x, ...)
 
-listFromMlist(mlist, prefix = list(), sigs. = TRUE, methods. = TRUE)
-
-linearizeMlist(mlist, inherited = TRUE)
-
-finalDefaultMethod(method)
-
 mergeMethods(m1, m2, genericLabel)
-
-loadMethod(method, fname, envir)
-
-MethodsListSelect(f, env, mlist, fEnv, finalDefault, evalArgs,
-                  useInherited, fdef, resetAllowed)
-
 }
 
 \section{Details}{
 
   \describe{
 
-    \item{\code{MethodsList}:}{
-      Create a MethodsList object out of the arguments.
-
-      Conceptually, this object is a named collection of methods to be
-      dispatched when the (first) argument in a function call matches
-      the class corresponding to one of the names.  A final, unnamed
-      element (i.e., with name \code{""}) corresponds to the default
-      method.
-
-      The elements can be either a function, or another MethodsList.  In
-      the second case, this list implies dispatching on the second
-      argument to the function using that list, given a selection of
-      this element on the first argument.  Thus, method dispatching on
-      an arbitrary number of arguments is defined.
-
-      MethodsList objects are used primarily to dispatch OOP-style
-      methods and, in R, to emulate S4-style methods.
-    }
-
-    \item{\code{SignatureMethod}:}{
-      construct a MethodsList object containing (only) this method,
-      corresponding to the signature; i.e., such that
-      \code{signature[[1]]} is the match for the first argument,
-      \code{signature[[2]]} for the second argument, and so on.  The
-      string \code{"missing"} means a match for a missing argument, and
-      \code{"ANY"} means use this as the default setting at this level.
-
-      The first argument is the argument names to be used for dispatch
-      corresponding to the signatures.
-    }
-
-    \item{\code{insertMethod}:}{
-      insert the definition \code{def} into the MethodsList object,
-      \code{mlist}, corresponding to the signature.  By default, insert
-      it in the slot \code{"methods"}, but \code{cacheOnly=TRUE} inserts
-      it into the \code{"allMethods"} slot (used for dispatch but not saved).
-    }
-
-    \item{\code{inheritedSubMethodLists}:}{
-      Utility function to match the object  or the class (if the object
-      is \code{NULL}) to the elements of a methods list.
-      Used in finding inherited methods, and not meant to be called
-      directly.
-    }
-
-    \item{\code{showMlist}:}{
-      Prints the contents of the MethodsList.  If \code{includeDefs} the
-      signatures and the corresponding definitions will be printed;
-      otherwise, only the signatures.
-    }
+    %% \item{\code{MethodsList}:}{
+    %%   Create a MethodsList object out of the arguments.
+
+    %%   Conceptually, this object is a named collection of methods to be
+    %%   dispatched when the (first) argument in a function call matches
+    %%   the class corresponding to one of the names.  A final, unnamed
+    %%   element (i.e., with name \code{""}) corresponds to the default
+    %%   method.
+
+    %%   The elements can be either a function, or another MethodsList.  In
+    %%   the second case, this list implies dispatching on the second
+    %%   argument to the function using that list, given a selection of
+    %%   this element on the first argument.  Thus, method dispatching on
+    %%   an arbitrary number of arguments is defined.
+
+    %%   MethodsList objects are used primarily to dispatch OOP-style
+    %%   methods and, in R, to emulate S4-style methods.
+    %% }
+
+    %% \item{\code{SignatureMethod}:}{
+    %%   construct a MethodsList object containing (only) this method,
+    %%   corresponding to the signature; i.e., such that
+    %%   \code{signature[[1]]} is the match for the first argument,
+    %%   \code{signature[[2]]} for the second argument, and so on.  The
+    %%   string \code{"missing"} means a match for a missing argument, and
+    %%   \code{"ANY"} means use this as the default setting at this level.
+
+    %%   The first argument is the argument names to be used for dispatch
+    %%   corresponding to the signatures.
+    %% }
+
+    %% \item{\code{insertMethod}:}{
+    %%   insert the definition \code{def} into the MethodsList object,
+    %%   \code{mlist}, corresponding to the signature.  By default, insert
+    %%   it in the slot \code{"methods"}, but \code{cacheOnly=TRUE} inserts
+    %%   it into the \code{"allMethods"} slot (used for dispatch but not saved).
+    %% }
+
+    %% \item{\code{inheritedSubMethodLists}:}{
+    %%   Utility function to match the object  or the class (if the object
+    %%   is \code{NULL}) to the elements of a methods list.
+    %%   Used in finding inherited methods, and not meant to be called
+    %%   directly.
+    %% }
+
+    %% \item{\code{showMlist}:}{
+    %%   Prints the contents of the MethodsList.  If \code{includeDefs} the
+    %%   signatures and the corresponding definitions will be printed;
+    %%   otherwise, only the signatures.
+    %% }
 
     \item{\code{listFromMlist}:}{
       Undo the recursive nature of the methods list, making a list of
@@ -151,12 +146,12 @@ MethodsListSelect(f, env, mlist, fEnv, finalDefault, evalArgs,
       value given it is a method definition, primitive or NULL.
     }
 
-    \item{\code{mergeMethods}:}{
-      Merges the methods in the second MethodsList object into the
-      first, and returns the merged result.  Called from
-      \code{\link{getAllMethods}}.  For a primitive function,
-      \code{genericLabel} is supplied as the name of the generic.
-    }
+    %% \item{\code{mergeMethods}:}{
+    %%   Merges the methods in the second MethodsList object into the
+    %%   first, and returns the merged result.  Called from
+    %%   \code{\link{getAllMethods}}.  For a primitive function,
+    %%   \code{genericLabel} is supplied as the name of the generic.
+    %% }
 
     \item{\code{loadMethod}:}{
       Called, if necessary, just before a call to \code{method} is
@@ -175,23 +170,22 @@ MethodsListSelect(f, env, mlist, fEnv, finalDefault, evalArgs,
       \code{method} argument.
     }
 
-  \item{\code{MethodsListSelect}}{
-      The function \code{MethodsListSelect} performs a full search
-      (including all inheritance and group generic information: see the
-      \link{Methods} documentation page for details on how this works).
-      The call returns a possibly revised methods list object,
-      incorporating any method found as part of the \code{allMethods}
-      slot.  This search was used by the evaluator when methods lists
-      were the metadata for methods dispatch.  This function is now deprecated.
-
-    }
+  %% \item{\code{MethodsListSelect}}{
+  %%     The function \code{MethodsListSelect} performs a full search
+  %%     (including all inheritance and group generic information: see the
+  %%     \link{Methods} documentation page for details on how this works).
+  %%     The call returns a possibly revised methods list object,
+  %%     incorporating any method found as part of the \code{allMethods}
+  %%     slot.  This search was used by the evaluator when methods lists
+  %%     were the metadata for methods dispatch.  This function is now deprecated.
+  %%   }
   }
 }
-\note{
-  Note that \code{MethodsList} objects represent methods only in the \R
-  implementation.  You can use them to find or manipulate information about
-  methods, but avoid doing so if you want your code to port to S-Plus.
-}
+%% \note{
+%%   Note that \code{MethodsList} objects represent methods only in the \R
+%%   implementation.  You can use them to find or manipulate information about
+%%   methods, but avoid doing so if you want your code to port to S-Plus.
+%% }
 \references{
  Chambers, John M. (2008)
  \emph{Software for Data Analysis: Programming with R}
diff --git a/src/library/methods/man/Methods_Details.Rd b/src/library/methods/man/Methods_Details.Rd
new file mode 100644
index 0000000..2701438
--- /dev/null
+++ b/src/library/methods/man/Methods_Details.Rd
@@ -0,0 +1,401 @@
+% File src/library/methods/man/Methods.Rd
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2016 R Core Team
+% Distributed under GPL 2 or later
+
+\name{Methods_Details}
+\alias{Methods_Details}
+\title{General Information on Methods}
+\description{
+  This documentation covers some general topics on how methods
+  work and how the \pkg{methods} package interacts with the rest of \R.  The
+  information is usually not needed to get started with methods and
+  classes, but may be helpful for moderately ambitious projects, or when
+  something doesn't work as expected.
+
+  For additional information  see documentation for
+  the important steps: (\code{\link{setMethod}()},
+  \code{\link{setClass}()} and \code{\link{setGeneric}()}). Also
+  \code{\link{Methods_for_Nongenerics}} on defining formal methods for
+  functions  that are not currently generic functions;
+  \link{Methods_for_S3} for the relation to S3 classes and methods;
+  \code{\link{Classes_Details}} for class definitions and
+  Chapters 9 and 10 of the reference.
+}
+
+\section{How Methods Work}{
+  A call to a generic function selects a method matching the actual
+  arguments in the call. The body of the method is evaluated in the
+  frame of the call to the generic function.
+  A generic function is identified by its name and by the package to
+  which it correspond.  Unlike ordinary functions, the generic has a
+  slot that specifies its package.
+
+  In an \R session, there is one version of each such generic,
+  regardless of where the call to that generic originated, and
+  the generic function has a table of all the methods currently
+  available for it; that is, all the methods
+  in packages currently loaded into the session.
+
+  Methods are frequently defined for functions that are non-generic in
+  their original package,.
+  for example, for function \code{plot()} in
+  package \pkg{graphics}.
+  An identical version of the corresponding generic function may exist
+  in several packages.  All methods will be dispatched consistently
+  from the \R session.
+
+  Each \R package with a call to \code{\link{setMethod}} in its source code
+  will include  a methods metadata object for that generic.
+  When the package is loaded into an \R session, the methods for each
+  generic function are \emph{cached}, that is, added to the
+  environment of the generic function.  This merged table of methods is used to
+  dispatch or select methods from the generic, using class inheritance
+  and possibly group generic functions (see
+  \code{\link{GroupGenericFunctions}}) to find an applicable method.
+  See the \dQuote{Method Selection and Dispatch} section below.
+  The caching computations ensure that only one version of each
+  generic function is visible globally; although different attached
+  packages may contain a copy of the generic function, these behave
+  identically with respect to method selection.
+
+  In contrast, it is possible for the same function name to refer to
+  more than one generic function, when these have different
+  \code{package} slots.  In the latter case, \R considers the
+  functions unrelated:  A generic function is defined by the
+  combination of name and package.  See the \dQuote{Generic Functions}
+  section below.
+
+  The methods for a generic are stored according to the
+  corresponding \code{signature} in the call to \code{\link{setMethod}}
+ that defined  the method.  The signature associates one
+  class name with each of a subset of the formal arguments to the
+  generic function.  Which formal arguments are available, and the
+  order in which they appear, are determined by the \code{"signature"}
+  slot of the generic function itself.  By default, the signature of the
+  generic consists of all the formal arguments except \dots, in the
+  order they appear in the function definition.
+
+  Trailing arguments in the signature of the generic will be \emph{inactive}  if no
+  method has yet been specified that included those arguments in its signature.
+  Inactive arguments are not needed or used in labeling the cached
+  methods.  (The distinction does not change which methods are
+  dispatched, but ignoring inactive arguments improves the
+  efficiency of dispatch.)
+
+  All arguments in the signature of the generic function will be evaluated when the
+  function is called, rather than using lazy
+  evaluation.  Therefore, it's important to \emph{exclude}
+  from the signature any arguments that need to be dealt with
+  symbolically (such as the \code{expr} argument to function
+  \code{\link{with}}).  Note that only actual arguments are
+  evaluated, not default expressions.
+  A missing argument enters into the method selection as class
+  \code{"missing"}.
+
+  The cached methods are stored in an
+  environment object.  The names used for assignment are a
+  concatenation of the class names for the active arguments in the method signature.
+
+}
+\section{Method Selection: Details}{
+
+When a call to a generic function is evaluated, a method is selected corresponding
+to the classes of the actual arguments in the signature.
+First, the cached methods table is searched for an  exact match;
+that is, a method stored under the signature defined by
+the string value of \code{class(x)} for each non-missing
+argument, and \code{"missing"} for each missing argument.
+If no method is found directly for the actual arguments in a call to a
+generic function, an attempt is made to match the available methods to
+the arguments by using the superclass information about the actual
+classes.
+A method found by this search is cached
+in the generic function so that future calls with the same argument classes will
+not require repeating the search.  In any likely application, the
+search for inherited methods will be a negligible overhead.
+
+Each class definition may include a list of  one or more direct
+\emph{superclasses} of the new class.
+The simplest and most common specification is by the \code{contains=} argument in
+the  call to \code{\link{setClass}}.
+Each class named in this argument is a superclass of the new class.
+A class will also have as a direct superclass any class union to which
+it is a member.
+Class unions are created by
+a call to \code{\link{setClassUnion}}.
+Additional members can be added to the union by a simple call to
+\code{\link{setIs}}.
+Superclasses specified by either mechanism are the \emph{direct} superclasses.
+
+
+Inheritance specified in either of these forms is \emph{simple} in the
+sense that all the information needed for the superclass is asserted
+to be directly available from the object.
+\R inherited from S a more general form of inheritance in which
+inheritance may require some transformation or be conditional on a
+test.
+This more general form has not proved to be useful in general
+practical situations.   Since it also adds some computational costs
+non-simple inheritance is not recommended.  See \code{\link{setIs}}
+for the general version.
+
+The direct superclasses themselves may
+have  direct superclasses and
+similarly through further generations.  Putting all this information together produces
+the full list of superclasses for this class.
+The superclass list is included in the definition of the class that is
+cached during the \R session.
+The \emph{distance} between the two classes is defined to be the
+number of generations:
+\code{1} for direct superclasses (regardless of which mechanism
+defined them), then \code{2} for the direct superclasses of those
+classes, and so on.
+To see all the superclasses, with their distance, print the class
+definition by calling \code{\link{getClass}}.
+In addition, any class implicitly has class \code{"ANY"} as a superclass.  The
+distance to \code{"ANY"} is treated as larger than the distance to any
+actual class.
+The special class \code{"missing"} corresponding to missing arguments
+has only \code{"ANY"} as a superclass, while \code{"ANY"} has no
+superclasses.
+
+When a method is to be selected by inheritance, a search is made in
+the table for all methods corresponding to a combination of
+either the direct class or one of its superclasses, for each argument
+in the active signature.
+For an example, suppose there is only one argument in the signature and that the class of
+the corresponding object was \code{"dgeMatrix"} (from the recommended package
+\code{Matrix}).
+This class has (currently) three direct superclasses and through these
+additional superclasses at distances 2 through 4.
+A method that had been defined for any of these classes or for class
+\code{"ANY"} (the default method) would be eligible.
+Methods for the shortest difference are preferred.
+If there is only one best method in this sense, method selection is unambiguous.
+
+When there are multiple arguments in the signature, each argument will
+generate a similar  list of inherited classes.
+The possible matches are now all the combinations of classes from each
+argument (think of the function \code{outer} generating an array of
+all possible combinations).
+The search now finds all the methods matching any of this combination
+of classes.
+For each argument, the distance to the superclass defines which
+method(s) are preferred for that argument.
+A method is considered best for selection if it is among the best
+(i.e., has the least distance) for
+each argument.
+
+The end result is that zero, one or more methods may be \dQuote{best}.
+If one, this method is selected and cached in the table of methods.
+If there is more than one best match, the selection is ambiguous and a message is
+printed noting which method was selected (the first method
+lexicographically in the ordering) and what other methods could have
+been selected.
+Since the ambiguity is usually nothing the end user could control,
+this is not a warning.
+Package authors should examine their package for possible ambiguous
+inheritance by calling \code{\link{testInheritedMethods}}.
+
+Cached inherited selections are
+not themselves used in future inheritance searches, since that could result
+in invalid selections.
+If you want inheritance computations to be done again (for example,
+because a newly loaded package has a more direct method than one
+that has already been used in this session), call
+\code{\link{resetGeneric}}.  Because classes and methods involving
+them tend to come from the same package, the current implementation
+does not reset all generics every time a new package is loaded.
+
+Besides being initiated through calls to the generic function, method
+selection can be done explicitly by calling the function
+\code{\link{selectMethod}}.
+Note that some computations may use this function directly, with
+optional arguments.
+The prime example is the use of \code{\link{coerce}()} methods by
+function \code{\link{as}()}.
+There has been some confusion from comparing coerce methods to a call
+to \code{\link{selectMethod}} with other options.
+}
+
+\section{Method Evaluation: Details}{
+
+Once a method has been selected, the evaluator creates a new context
+in which a call to the method is evaluated.
+The context is initialized with the arguments from the call to the
+generic function.
+These arguments are not rematched.  All the arguments in the signature
+of the generic will have been evaluated (including any that are
+currently inactive); arguments that are not in the signature will obey
+the usual lazy evaluation rules of the language.
+If an argument was missing in the call, its default expression if any
+will \emph{not} have been evaluated, since method dispatch always uses
+class \code{missing} for such arguments.
+
+A call to a generic function therefore has two contexts:  one for the
+function and a second for the method.
+The argument objects will be copied to the second context, but not any
+local objects created in a nonstandard generic function.
+The other important distinction is that the parent
+(\dQuote{enclosing}) environment of the second context is the environment
+of the method as a function, so that all \R programming techniques
+using such environments apply to method definitions as ordinary functions.
+
+
+For further discussion of method selection and dispatch,  see the
+references in the sections indicated.
+
+}
+
+\section{Generic Functions}{
+In principle, a generic function could be any function that evaluates
+a call to \code{standardGeneric()}, the internal function that selects
+a method and evaluates a call to  the selected method.  In practice,
+generic functions are special objects that in addition to being from a
+subclass of class \code{"function"} also extend the class
+\code{\linkS4class{genericFunction}}.  Such objects have slots to define
+information needed to deal with their methods.  They also have
+specialized environments, containing the tables used in method
+selection.
+
+The slots \code{"generic"} and  \code{"package"} in the object are the
+character string names of the generic function itself and of the
+package from which the  function is defined.
+As with classes, generic functions are uniquely defined in \R by the
+combination of the two names.
+There can be generic functions of the same name associated with
+different packages (although inevitably keeping such functions cleanly
+distinguished is not always easy).
+On the other hand, \R will enforce that only one definition of a
+generic function can be associated with a particular combination of
+function and package name, in the current session or other active
+version of \R.
+
+Tables of methods for a particular generic function, in this sense,
+will often be spread over several other packages.
+The total set of methods for a given generic function may change
+during a session, as additional packages are loaded.
+Each table must be consistent in the signature assumed for the generic
+function.
+
+\R distinguishes \emph{standard} and \emph{nonstandard} generic
+functions, with the former having a function body that does nothing
+but dispatch a method.
+For the most part, the distinction is just one of simplicity:  knowing
+that a generic function only dispatches a method call allows some
+efficiencies and also removes some uncertainties.
+
+In most cases, the generic function is the visible function
+corresponding to that name, in the corresponding package.
+There are two exceptions, \emph{implicit} generic
+functions and the special computations required to deal with \R's
+\emph{primitive} functions.
+Packages can contain a table of implicit generic versions of functions
+in the package, if the package wishes to leave a function non-generic
+but to constrain what the function would be like if it were generic.
+Such implicit generic functions are created during the installation of
+the package, essentially by defining the generic function and
+possibly methods for it, and then reverting the function to its
+non-generic form. (See \link{implicitGeneric} for how this is done.)
+The mechanism is mainly used for functions in the older packages in
+\R, which may prefer to ignore S4 methods.
+Even in this case, the actual mechanism is only needed if something
+special has to be specified.
+All functions have a corresponding implicit generic version defined
+automatically (an implicit, implicit generic function one might say).
+This function is a standard generic with the same arguments as the
+non-generic function, with the non-generic version as the default (and only)
+method, and with the generic signature being all the formal arguments
+except \dots.
+
+The implicit generic mechanism is needed only to override some aspect
+of the default definition.
+One reason to do so would be to remove some arguments from the
+signature.
+Arguments that may need to be interpreted literally, or for which the
+lazy evaluation mechanism of the language is needed, must \emph{not}
+be included in the signature of the generic function, since all
+arguments in the signature will be evaluated in order to select a
+method.
+For example, the argument \code{expr} to the function
+\code{\link{with}} is treated literally and must therefore be excluded
+from the signature.
+
+One would also need to define an implicit generic if the existing
+non-generic function were not suitable as the default method.
+Perhaps the function only applies to some classes of objects, and the
+package designer prefers to have no general default method.
+In the other direction, the package designer might have some ideas
+about suitable methods for some classes, if the function were generic.
+With reasonably modern packages, the simple approach in all these
+cases is just to define the function as a generic.
+The implicit generic mechanism is mainly attractive for older packages
+that do not want to require the methods package to be available.
+
+Generic functions will also be defined but not obviously visible for
+functions implemented as \emph{primitive} functions in the base
+package.
+Primitive functions look like ordinary functions when printed but are
+in fact not function objects but objects of two types interpreted by
+the \R evaluator to call underlying C code directly.
+Since their entire justification is efficiency, \R refuses to hide
+primitives behind a generic function object.
+Methods may be defined for most primitives, and corresponding metadata
+objects will be created to store them.
+Calls to the primitive still go directly to the C code, which will
+sometimes check for applicable methods.
+The definition of \dQuote{sometimes} is that methods must have been
+detected for the function in some package loaded in the session and
+\code{isS4(x)} is \code{TRUE} for  the first argument (or for the
+second argument, in the case of binary operators).
+You can test whether methods have been detected by calling
+\code{\link{isGeneric}} for the relevant function and you can examine
+the generic function by calling \code{\link{getGeneric}}, whether or
+not methods have been detected.
+For more on generic functions, see the references and also section 2
+of the \emph{R Internals} document supplied with \R.
+
+}
+
+\section{Method Definitions}{
+All method definitions are stored as objects from the
+\code{\linkS4class{MethodDefinition}} class.
+Like the class of generic functions, this class extends ordinary \R
+functions with some additional slots: \code{"generic"}, containing the
+name and package of the generic function, and two signature slots,
+\code{"defined"} and \code{"target"}, the first being the signature supplied when
+the method was defined by a call to \code{\link{setMethod}}.
+The  \code{"target"} slot starts off equal to the \code{"defined"}
+  slot.  When an inherited method is cached after being selected, as
+  described above, a copy is made with the  appropriate \code{"target"}  signature.
+  Output from \code{\link{showMethods}}, for example, includes both
+  signatures.
+
+  Method definitions are required to have the same formal arguments as
+  the generic function, since the method dispatch mechanism does not
+  rematch arguments, for reasons of both efficiency and consistency.
+}
+
+
+\references{
+ Chambers, John M. (2016)
+ \emph{Extending R},
+  Chapman & Hall.
+(Chapters 9 and 10.)
+
+ Chambers, John M. (2008)
+ \emph{Software for Data Analysis: Programming with R}
+  Springer. (Section 10.5 for some details.)
+}
+
+\seealso{
+For more specific information, see
+  \code{\link{setGeneric}}, \code{\link{setMethod}}, and
+  \code{\link{setClass}}.
+
+For the use of \dots in methods, see  \link{dotsMethods}.
+}
+\keyword{programming}
+\keyword{classes}
+\keyword{methods}
diff --git a/src/library/methods/man/Methods_for_Nongenerics.Rd b/src/library/methods/man/Methods_for_Nongenerics.Rd
new file mode 100644
index 0000000..1678146
--- /dev/null
+++ b/src/library/methods/man/Methods_for_Nongenerics.Rd
@@ -0,0 +1,320 @@
+\name{Methods_for_Nongenerics}
+\alias{Methods_for_Nongenerics}
+\title{Methods for Non-Generic Functions in Other Packages}
+
+\description{
+In writing methods for an \R package, it's common for these methods to
+apply to a function (in another package) that is not  generic in that
+package; that is, there are no formal methods for the function in its
+own package, although it may have S3 methods.
+The programming in this case involves one extra step, to call
+\code{\link{setGeneric}()} to declare that the function \emph{is}
+generic in your package.
+
+Calls to the function in your package will then use all methods
+defined there or in any other loaded package that creates the same
+generic function. Similarly, calls to the function in those packages
+will use your methods.
+
+The original version, however, remains non-generic.  Calls
+in that package or in other packages that use that version will  not dispatch your methods
+except for special circumstances:
+\enumerate{
+\item If the function is one of the primitive functions that accept
+  methods, the internal C implementation will dispatch methods if one
+  of the arguments is an S4 object, as should be the case.
+\item If the other version of the function dispatches S3 methods
+  \emph{and} your methods are also registered as S3 methods, the
+  method will usually be dispatched as that S3 method.
+\item Otherwise, you will need to ensure that all calls to the
+  function come from a package in which the function is generic,
+  perhaps by copying code to your package.
+}
+ Details and the underlying reasons are discussed in the following sections.
+}
+
+\section{Generic and Non-Generic Calls}{
+Creating methods for a function (any function) in a package means that
+calls to the function in that package will select methods according to
+the actual arguments.
+However, if the function was originally a non-generic in another
+package, calls to the function from that package will \emph{not}
+dispatch methods.
+In addition, calls from any third package that imports the non-generic version
+will also not dispatch methods.
+This section considers the reason and how one might deal with the
+consequences.
+
+The reason is simply the \R namespace mechanism and its role in
+evaluating function calls.
+When a name (such as the name of a function) needs to be evaluated in
+a call to a function from some package, the evaluator looks first in the frame of the call,
+then in the namespace of the package and then in the imports to that
+package.
+
+Defining methods for a function in a package ensures that calls to the
+function in that package will select the methods, because a generic
+version of the function is created in the namespace.
+Similarly, calls from another package that has or imports the generic
+version will select methods.
+Because the generic versions are identical, all methods will be
+available in all these packages.
+
+However, calls from any package that imports the old version or just
+selects it from the search list will usually \emph{not} select methods.
+
+A an example, consider the function
+\code{\link{data.frame}()} in the base package.
+This function takes any number of objects as arguments and attempts to combine
+them as variables into a data frame object.
+It does this by calling \code{\link{as.data.frame}()}, also in the
+base package, for each of the objects.
+
+A reasonable goal would be to extend the classes of objects that can
+be included in a data frame by defining methods for
+\code{\link{as.data.frame}()}.
+But calls to \code{\link{data.frame}()},
+will still use the version of that function in the base package, which
+continues to call the non-generic \code{\link{as.data.frame}()} in
+that package.
+
+The details of what happens and options for dealing with it depend on
+the form of the function:  a primitive function; a function that
+dispatches S3 methods; or an ordinary \R function.
+
+Primitive functions are not actual \R function objects.
+They go directly to internal C code.
+Some of them, however, have been implemented to recognize methods.
+These functions dispatch both S4 and S3 methods from
+the internal C code.
+There is no explicit generic function, either S3 or S4.
+The internal code looks for S4 methods if the first
+argument, or either of the arguments in the case of a binary operator,
+is an S4 object.
+If no S4 method is found, a search is made for an S3 method.
+So defining methods for these functions works as long as the relevant
+classes have been defined, which should always be the case.
+
+A function dispatches S3 methods by calling
+\code{\link{UseMethod}()}, which does \emph{not} look for
+formal methods regardless of whether the first argument is an S4
+object or not.
+This applies to the \code{\link{as.data.frame}()} example above.
+To have methods called in this situation, your package must also define the
+method as an S3 method, if possible. See section \sQuote{S3
+  \dQuote{Generic} Functions}.
+
+In the third possibility, the function is defined with no expectation
+of methods.
+For example, the base package has a number of functions that compute
+numerical decompositions of matrix arguments.
+Some, such as \code{\link{chol}()} and \code{\link{qr}()}
+are implemented to dispatch S3 methods; others, such as
+\code{\link{svd}()} are implemented directly as a specific
+computation.
+A generic version of the latter functions can be written and called
+directly to define formal methods, but no code in another package that
+does not import this generic version will dispatch such methods.
+
+In this case, you need to have the generic version used in all the indirect calls to the
+function supplying arguments that should dispatch methods.
+This may require supplying new functions that dispatch methods and
+then call the function they replace.
+For example, if S3 methods did not work for
+\code{\link{as.data.frame}()}, one could call a function that
+applied the generic version to all its arguments and then called
+\code{\link{data.frame}()} as a replacement for that function.
+If all else fails, it might be necessary to copy over the relevant
+functions so that they would find the generic versions.
+}
+
+\section{S3 \dQuote{Generic} Functions}{
+
+S3 method dispatch looks at the class of the first
+argument.
+S3 methods are ordinary functions with the same arguments as the
+generic function.
+The \dQuote{signature} of an S3 method is identified  by the name to
+which the method is assigned, composed of the name of the
+generic function, followed by \code{"."}, followed by the name of the class.
+For details, see \code{\link{UseMethod}}.
+
+To implement a method for one of these functions corresponding to S4
+classes, there are two possibilities: either an S4 method or an S3 method with the
+S4 class name.
+The S3 method is only possible if the intended signature has the
+first argument and nothing else.
+In this case,
+the recommended approach is to define the S3 method and also supply the
+identical function as the definition of the S4 method.
+If the S3 generic function was \code{f3(x, ...)} and the S4 class for
+the new method was
+\code{"myClass"}:
+
+ \code{f3.myClass <- function(x, ...) { ..... }}
+
+ \code{setMethod("f3", "myClass", f3.myClass)}
+
+Defining both methods usually ensures that all calls to the original
+function will dispatch the intended method.
+The S4 method alone would not be called from other packages using the
+original version of the function.
+On the other hand,
+ an S3 method alone will not be called if there is \emph{any}
+    eligible non-default S4 method.
+
+S4 and S3 method selection are designed to follow compatible rules of
+inheritance, as far as possible.
+S3 classes can be used for any S4 method selection, provided that the
+S3 classes have been registered by a call to
+\code{\link{setOldClass}}, with that call specifying the correct S3
+inheritance pattern.
+S4 classes can be used for any S3 method selection; when an S4 object
+is detected, S3 method selection uses the contents of
+\code{\link{extends}(class(x))} as the equivalent of the S3
+inheritance (the inheritance is cached after the first call).
+
+An existing S3 method may not behave as desired for an S4 subclass, in
+which case utilities such as \code{\link{asS3}} and
+\code{\link{S3Part}} may be useful.  If the S3 method fails on the S4
+object, \code{asS3(x)} may be passed instead; if the object returned
+by the S3 method needs to be incorporated in the S4 object, the
+replacement function for \code{S3Part} may be useful.}
+
+
+\references{
+ Chambers, John M. (2016)
+ \emph{Extending R},
+  Chapman & Hall.
+(Chapters 9 and 10.)
+}
+
+\seealso{
+  \link{Methods_for_S3} for suggested implementation of methods
+  that work for both S3 and S4 dispatch.
+}
+
+\examples{
+## A class that extends a registered S3 class inherits that class' S3
+## methods.
+
+setClass("myFrame", contains = "data.frame",
+         slots = c(timestamps = "POSIXt"))
+df1 <- data.frame(x = 1:10, y = rnorm(10), z = sample(letters,10))
+mydf1 <- new("myFrame", df1, timestamps = Sys.time())
+
+## "myFrame" objects inherit "data.frame" S3 methods; e.g., for `[`
+
+\donttest{% random
+mydf1[1:2, ] # a data frame object (with extra attributes)
+}
+
+## a method explicitly for "myFrame" class
+
+setMethod("[",
+    signature(x = "myFrame"),
+    function (x, i, j, ..., drop = TRUE)
+    {
+        S3Part(x) <- callNextMethod()
+        x at timestamps <- c(Sys.time(), as.POSIXct(x at timestamps))
+        x
+    }
+)
+
+\donttest{mydf1[1:2, ]}
+
+setClass("myDateTime", contains = "POSIXt")
+
+now <- Sys.time() # class(now) is c("POSIXct", "POSIXt")
+nowLt <- as.POSIXlt(now)# class(nowLt) is c("POSIXlt", "POSIXt")
+
+mCt <- new("myDateTime", now)
+mLt <- new("myDateTime", nowLt)
+
+## S3 methods for an S4 object will be selected using S4 inheritance
+## Objects mCt and mLt have different S3Class() values, but this is
+## not used.
+f3 <- function(x)UseMethod("f3") # an S3 generic to illustrate inheritance
+
+f3.POSIXct <- function(x) "The POSIXct result"
+f3.POSIXlt <- function(x) "The POSIXlt result"
+f3.POSIXt <- function(x) "The POSIXt result"
+
+stopifnot(identical(f3(mCt), f3.POSIXt(mCt)))
+stopifnot(identical(f3(mLt), f3.POSIXt(mLt)))
+
+
+
+## An S4 object selects S3 methods according to its S4 "inheritance"
+
+setClass("classA", contains = "numeric",
+         slots = c(realData = "numeric"))
+
+Math.classA <- function(x) { (getFunction(.Generic))(x at realData) }
+setMethod("Math", "classA", Math.classA)
+
+
+x <- new("classA", log(1:10), realData = 1:10)
+
+stopifnot(identical(abs(x), 1:10))
+
+setClass("classB", contains = "classA")
+
+y <- new("classB", x)
+
+stopifnot(identical(abs(y), abs(x))) # (version 2.9.0 or earlier fails here)
+
+## an S3 generic: just for demonstration purposes
+f3 <- function(x, ...) UseMethod("f3")
+
+f3.default <- function(x, ...) "Default f3"
+
+## S3 method (only) for classA
+f3.classA <- function(x, ...) "Class classA for f3"
+
+## S3 and S4 method for numeric
+f3.numeric <- function(x, ...) "Class numeric for f3"
+setMethod("f3", "numeric", f3.numeric)
+
+## The S3 method for classA and the closest inherited S3 method for classB
+## are not found.
+
+f3(x); f3(y) # both choose "numeric" method
+
+## to obtain the natural inheritance, set identical S3 and S4 methods
+setMethod("f3", "classA", f3.classA)
+
+f3(x); f3(y) # now both choose "classA" method
+
+## Need to define an S3 as well as S4 method to use on an S3 object
+## or if called from a package without the S4 generic
+
+MathFun <- function(x) { # a smarter "data.frame" method for Math group
+  for (i in seq(length = ncol(x))[sapply(x, is.numeric)])
+    x[, i] <- (getFunction(.Generic))(x[, i])
+  x
+}
+setMethod("Math", "data.frame", MathFun)
+
+## S4 method works for an S4 class containing data.frame,
+## but not for data.frame objects (not S4 objects)
+
+try(logIris <- log(iris)) #gets an error from the old method
+
+## Define an S3 method with the same computation
+
+Math.data.frame <- MathFun
+
+logIris <- log(iris)
+
+
+
+
+\dontshow{
+removeClass("classA"); removeClass("classB"); rm(x,y)
+removeGeneric("f3")
+removeClass("myDateTime")
+removeMethod("Math", "data.frame"); rm(Math.data.frame, MathFun, logIris)
+}
+
+}
diff --git a/src/library/methods/man/Methods_for_S3.Rd b/src/library/methods/man/Methods_for_S3.Rd
new file mode 100644
index 0000000..b786468
--- /dev/null
+++ b/src/library/methods/man/Methods_for_S3.Rd
@@ -0,0 +1,147 @@
+% File src/library/methods/man/Methods_for_S3.Rd
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2016 R Core Team
+% Distributed under GPL 2 or later
+\name{Methods_for_S3}
+\alias{Methods_for_S3}
+\title{Methods For S3 and S4 Dispatch}
+
+\description{
+
+The S3 and S4 software in \R are two generations implementing
+functional object-oriented programming.
+S3 is the original, simpler for initial programming but less general,
+less formal and less open to validation.
+The S4 formal methods and classes provide these features but require
+more programming.
+
+In modern \R, the two versions attempt to work together.  This
+documentation outlines how to write methods for both systems by
+defining an S4 method for a function that dispatches S3 methods.
+
+The systems can also be combined by using an S3 class with S4 method
+dispatch or in S4 class definitions.  See \code{\link{setOldClass}}.
+
+}
+\section{S3 Method Dispatch}{
+
+The \R evaluator will \sQuote{dispatch} a method from a function call
+either when the body of the function calls the special primitive
+\code{\link{UseMethod}} or when the call is to one of the builtin
+primitives such as the \code{math} functions or the binary operators.
+
+
+S3 method dispatch looks at the class of the first
+argument or the class of either
+argument in a call to one of the primitive binary operators.
+In pure S3 situations, \sQuote{class} in this context means the class
+attribute or the implied class for a basic data type such as
+\code{"numeric"}.
+The first S3 method that matches a name in the class is called and the
+value of that call is the value of the original function call.
+For details, see \link{S3Methods}.
+
+In modern \R, a function \code{meth} in a package is registered as an S3 method
+for function \code{fun} and class \code{Class} by
+including in the package's \code{NAMESPACE} file the directive
+
+\code{S3method(fun, Class, meth)}
+
+By default (and traditionally), the third argument is taken to be the
+function \code{fun.Class}; that is,
+the name of the
+generic function, followed by \code{"."}, followed by the name of the
+class.
+
+As with S4 methods, a method that has been registered will be added to
+a table of methods for this function when the corresponding package is
+loaded into the session.
+Older versions of \R, copying the mechanism in S, looked for the
+method in the current search list, but packages should now always
+register S3 methods rather than requiring the package to be attached.
+}
+
+\section{Methods for S4 Classes}{
+
+Two possible mechanisms for implementing a method  corresponding to an
+S4 class, there are two possibilities are to register it as an S3 method with the
+S4 class name or to define and set an S4 method, which will have the
+side effect of creating an S4 generic version of this function.
+
+For most situations either works, but
+the recommended approach is to do both: register the S3 method and supply the
+identical function as the definition of the S4 method.
+This ensures that the proposed method will be dispatched for any
+applicable call to the function.
+
+As an example, suppose an S4 class \code{"uncased"} is defined,
+extending \code{"character"} and intending to ignore upper- and
+lower-case.
+The base function \code{\link{unique}} dispatches S3 methods.
+To define the class and a method for this function:
+
+\code{setClass("uncased", contains = "character")}
+
+\code{unique.uncased <- function(x, incomparables = FALSE, ...)
+  nextMethod(tolower(x))}
+
+\code{setMethod("unique", "uncased", unique.uncased)}
+
+In addition, the \code{NAMESPACE} for the package should contain:
+
+\code{S3method(unique, uncased)}
+
+\code{exportMethods(unique)}
+
+The result is to define identical S3 and S4 methods and ensure that all
+calls to \code{unique} will dispatch that method when appropriate.
+}
+
+\section{Details}{
+
+The reasons for defining both S3 and S4 methods are as follows:
+\enumerate{
+  \item An S4 method alone will not be seen if the S3 generic function
+    is called directly. This will be the case, for example, if some
+    function calls \code{unique()} from a package that does not make
+    that function  an S4 generic.
+
+    However, primitive functions and operators
+    are exceptions:  The internal C code will look for S4 methods
+    if and only if the object is an S4 object.  S4 method dispatch
+    would be used to dispatch any binary operator calls where either
+    of the operands was an S4 object, for example.
+
+  \item An S3 method alone will not be called if there is \emph{any}
+    eligible non-default S4 method.
+
+    So if a package defined an S3
+    method for \code{unique} for an S4 class but another package
+    defined an S4 method for a superclass of that class, the
+    superclass method would be chosen, probably not what was
+    intended.
+}
+
+S4 and S3 method selection are designed to follow compatible rules of
+inheritance, as far as possible.
+S3 classes can be used for any S4 method selection, provided that the
+S3 classes have been registered by a call to
+\code{\link{setOldClass}}, with that call specifying the correct S3
+inheritance pattern.
+S4 classes can be used for any S3 method selection; when an S4 object
+is detected, S3 method selection uses the contents of
+\code{\link{extends}(class(x))} as the equivalent of the S3
+inheritance (the inheritance is cached after the first call).
+
+
+For the details of S4 and S3
+dispatch see \link{Methods_Details} and \link{S3Methods}.
+
+}
+
+\references{
+ Chambers, John M. (2016)
+ \emph{Extending R},
+  Chapman & Hall.
+(Chapters 9 and 10.)
+}
diff --git a/src/library/methods/man/NextMethod.Rd b/src/library/methods/man/NextMethod.Rd
index ccde21a..a6909ed 100644
--- a/src/library/methods/man/NextMethod.Rd
+++ b/src/library/methods/man/NextMethod.Rd
@@ -1,6 +1,6 @@
 % File src/library/methods/man/NextMethod.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2011 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2017 R Core Team
 % Distributed under GPL 2 or later
 
 \name{callNextMethod}
@@ -38,29 +38,21 @@ callNextMethod(...)
   \code{defined} slot of the method from which \code{callNextMethod} is
   called) is deleted from a copy of the methods for the current generic,
   and \code{\link{selectMethod}} is called to find the next method (the
-  result is cached in a special object, so the search only typically
-  happens once per session per combination of argument classes).
-
-  Note that the preceding definition means that the next method is
-  defined uniquely when \code{setMethod} inserts the method containing
-  the \code{callNextMethod} call, given the definitions of the classes
-  in the signature. The choice does not depend on the path that gets us
-  to that method (for example, through inheritance or from another
-  \code{callNextMethod} call). This definition was not enforced in
-  versions of \R prior to 2.3.0, where the method was selected based on
-  the target signature, and so could vary depending on the actual
-  arguments.
-
-  It is also legal, and often useful, for the method called by
-  \code{callNextMethod} to itself have a call to
-  \code{callNextMethod}. This generally works as you would expect, but
-  for completeness be aware that it is possible to have ambiguous
-  inheritance in the S structure, in the sense that the same two
-  classes can appear as superclasses \emph{in the opposite order} in
-  two other class definitions.  In this case the effect of a nested
-  instance of \code{callNextMethod} is not well defined.  Such
-  inconsistent class hierarchies are both rare and nearly always the
-  result of bad design, but they are possible, and currently undetected.
+  result is cached in the method object where the call occurred, so the search typically
+  happens only once per session per combination of argument classes).
+
+  The next method is defined from the \emph{signature} of the current
+  method, not from the actual classes of the arguments.
+  In particular, modifying any of the arguments has no effect on the
+  selection.
+  As a result, the selected next method can be called with invalid
+  arguments if the calling function assigns objects of a different
+  class before the \code{callNextMethod()} call.
+  Be careful of any assignments to such arguments.
+
+  It is possible for the selection of the next method to be ambiguous,
+  even though the original set of methods was consistent.
+  See the section \dQuote{Ambiguous Selection}.
 
   The statement that the method is called with the current arguments is
   more precisely as follows.  Arguments that were missing in the current
@@ -71,81 +63,210 @@ callNextMethod(...)
   means that the next method sees the same actual arguments, but
   arguments are evaluated only once.
 }
+\section{Ambiguous Selection}{
+There are two fairly common situations in which the choice of a next
+method is ambiguous, even when the original set of methods uniquely
+defines all method selection unambiguously.
+In these situations, \code{callNextMethod()} should be replaced,
+either by a call to a specific function or by recalling the generic
+with different arguments.
+
+The most likely situation arises with methods for binary operators,
+typically through one of the group generic functions.
+See the example for class \code{"rnum"} below.
+Examples of this sort usually require three methods: two for the case
+that the first or the second argument comes from the class, and a
+third for the case that both arguments come from the class.
+If that last method uses \code{callNextMethod}, the other two methods
+are equally valid.  The ambiguity is exactly the same that required
+defining the two-argument method in the first place.
+
+In fact, the two possibilities are equally valid conceptually as well
+as formally.
+As in the example below, the logic of the application usually requires
+selecting a computation explicitly or else calling the generic
+function with modified arguments to select an appropriate method.
+
+The other likely source of ambiguity arises from a class that inherits
+directly from more than one other class (a \dQuote{mixin} in standard
+terminology).
+If the generic has methods corresponding to both superclasses, a
+method for the current class is again needed to resolve ambiguity.
+Using \code{callNextMethod} will again reimpose the ambiguity.
+Again, some explicit choice has to be made in the calling method
+instead.
+
+These ambiguities are not the result of bad design, but they do
+require workarounds.
+Other ambiguities usually reflect inconsistencies in the tree of
+inheritances, such as a class appearing in more than one place among
+the superclasses.
+Such cases should be rare, but with the independent definition of
+classes in multiple packages, they can't be ruled out.
+
+}
 \value{
   The value returned by the selected method.
 }
 \references{
- Chambers, John M. (2008)
- \emph{Software for Data Analysis: Programming with R}
-  Springer.  (For the R version.)
-
- Chambers, John M. (1998)
- \emph{Programming with Data}
- Springer (For the original S4 version.)
+  Chambers, John M. (2016)
+ \emph{Extending R},
+  Chapman & Hall.
+(Chapters 9 and 10.)
 }
 \seealso{\code{\link{callGeneric}} to call the generic function with the
  current dispatch rules (typically for a group generic function);
- \link{Methods} for the general behavior of method dispatch.
+ \link{Methods_Details} for the general behavior of method dispatch.
 }
 
 \examples{
+## callNextMethod() used for the Math, Math2 group generic functions
+
+## A class to automatically round numeric results to "d" digits
+
+rnum <- setClass("rnum", slots = c(d = "integer"), contains = "numeric")
+
+## Math functions operate on the rounded numbers, return a plain
+## vector.  The next method will always be the default, usually a primitive.
+setMethod("Math", "rnum",
+          function(x)
+              callNextMethod(round(as.numeric(x), x at d)))
+setMethod("Math2", "rnum",
+          function(x, digits)
+              callNextMethod(round(as.numeric(x), x at d), digits))
+
+## Examples of callNextMethod with two arguments in the signature.
+
+## For arithmetic and one rnum with anything, callNextMethod with no arguments
+## round the full accuracy result, and return as plain vector
+setMethod("Arith", c(e1 ="rnum"),
+          function(e1, e2)
+              as.numeric(round(callNextMethod(), e1 at d)))
+setMethod("Arith", c(e2 ="rnum"),
+          function(e1, e2)
+              as.numeric(round(callNextMethod(), e2 at d)))
+
+## A method for BOTH arguments from "rnum" would be ambiguous
+## for callNextMethod(): the two methods above are equally valid.
+## The method chooses the smaller number of digits,
+## and then calls the generic function, postponing the method selection
+## until it's not ambiguous.
+setMethod("Arith", c(e1 ="rnum", e2 = "rnum"),
+          function(e1, e2) {
+              if(e1 at d <= e2 at d)
+                  callGeneric(e1, as.numeric(e2))
+              else
+                  callGeneric(as.numeric(e1), e2)
+          })
+
+## For comparisons, callNextMethod with the rounded arguments
+setMethod("Compare", c(e1 = "rnum"),
+          function(e1, e2)
+              callNextMethod(round(e1, e1 at d), round(e2, e1 at d)))
+setMethod("Compare", c(e2 = "rnum"),
+          function(e1, e2)
+              callNextMethod(round(e1, e2 at d), round(e2, e2 at d)))
+
+## similarly to the Arith case, the method for two "rnum" objects
+## can not unambiguously use callNextMethod().  Instead, we rely on
+## The rnum() method inhertited from Math2 to return plain vectors.
+setMethod("Compare", c(e1 ="rnum", e2 = "rnum"),
+          function(e1, e2) {
+              d <- min(e1 at d, e2 at d)
+              callGeneric(round(e1, d), round(e2, d))
+          })
+
+
+
+
+set.seed(867)
+
+x1 <- rnum(10*runif(5), d=1L)
+x2 <- rnum(10*runif(5), d=2L)
+
+x1+1
+x2*2
+x1-x2
+
+## Simple examples to illustrate callNextMethod with and without arguments
+B0 <- setClass("B0", slots = c(s0 = "numeric"))
+
+## and a function to illustrate callNextMethod
+
+f <- function(x, text = "default") {
+    str(x) # print a summary
+    paste(text, ":", class(x))
+}
 
-## some class definitions with simple inheritance
-setClass("B0" , representation(b0 = "numeric"))
+setGeneric("f")
+setMethod("f", "B0", function(x, text = "B0") {
+    cat("B0 method called with s0 =", x at s0, "\n")
+    callNextMethod()
+})
 
-setClass("B1", representation(b1 = "character"), contains = "B0")
+b0 <- B0(s0 = 1)
 
-setClass("B2", representation(b2 = "logical"), contains = "B1")
+## call f() with 2 arguments: callNextMethod passes both to the default method
+f(b0, "first test")
 
-## and a rather silly function to illustrate callNextMethod
+## call f() with 1 argument:  the default "B0" is not passed by callNextMethod
+f(b0)
 
-f <- function(x) class(x)
+## Now, a class that extends B0, with no methods for f()
+B1 <- setClass("B1", slots = c(s1 = "character"), contains = "B0")
+b1 <- B1(s0 = 2, s1 = "Testing B1")
 
-setMethod("f", "B0", function(x) c(x at b0^2, callNextMethod()))
-setMethod("f", "B1", function(x) c(paste(x at b1,":"), callNextMethod()))
-setMethod("f", "B2", function(x) c(x at b2, callNextMethod()))
+## the two cases work as before, by inheriting the "B0" method
 
-b1 <- new("B1", b0 = 2, b1 = "Testing")
+f(b1, b1 at s1)
 
-b2 <- new("B2", b2 = FALSE, b1 = "More testing", b0 = 10)
+f(b1)
 
-f(b2)
-stopifnot(identical(f(b2), c(b2 at b2, paste(b2 at b1,":"), b2 at b0^2, "B2")))
+B2 <- setClass("B2", contains = "B1")
 
-f(b1)
+## And, a method for "B2" that calls with explicit arguments.
+## Note that the method selection in callNextMethod
+## uses the class of the *argument* to consistently select the "B0" method
+
+setMethod("f", "B2", function(x, text = "B1 method") {
+    y <- B1(s0 = -x at s0, s1 ="Modified x")
+    callNextMethod(y, text)
+})
+
+b2 <- B2(s1 = "Testing B2", s0 = 10)
+
+f(b2, b2 at s1)
 
-## a sneakier method: the *changed* x is used:
-setMethod("f", "B2",
-          function(x) {x at b0 <- 111; c(x at b2, callNextMethod())})
 f(b2)
-stopifnot(identical(f(b2), c(b2 at b2, paste(b2 at b1,":"), 111^2, "B2")))
 
-\dontshow{
-## a version of the example with 1 more layer of nesting
 
-## next methods calling next methods, with arguments; using group generics
-setMethod("Ops", "B2",
-    function(e1, e2) callNextMethod())
-setMethod("Ops", c("B0"),
-    function(e1, e2) callNextMethod(e1 at b0, e2))
+## Be careful:  the argument passed must be legal for the method selected
+## Although the argument here is numeric, it's still the "B0" method that's called
+setMethod("f", "B2", function(x, text = "B1 method") {
+    callNextMethod(x at s0, text)
+})
+
+##  Now the call will cause an error:
 
-b2 + 1 # 11
+tryCatch(f(b2), error = function(e) cat(e$message,"\n"))
 
-b1 == 2 # TRUE
 
+\dontshow{
+##$
 removeClass("B2"); removeClass("B1"); removeClass("B0")
 
 removeGeneric("f")
 
-removeMethods("Ops")
+removeMethods(all=FALSE,"Arith"); removeMethods(all=FALSE,"Compare")
+removeMethods(all=FALSE,"Math"); removeMethods(all=FALSE,"Math2")
 
 ## tests of multiple callNextMethod
-setClass("m1", representation(count = "numeric"), contains = "matrix",
+setClass("m1", slots = c(count = "numeric"), contains = "matrix",
          prototype = prototype(count = 0))
 mm1 <- new("m1", matrix(1:12, 3,4))
 setMethod("[", "m1", function(x, i, j, ..., drop) callNextMethod())
 
-setClass("m2", representation(sum = "numeric"), contains = "m1")
+setClass("m2", slots = c(sum = "numeric"), contains = "m1")
 
 setMethod("Ops", c("m1", "m1"), function(e1, e2) {
     as(e1, "matrix") <- callNextMethod()
@@ -156,7 +277,7 @@ mm2 <- new("m2", matrix(1:12, 3, 4), sum = sum(1:12))
 
 stopifnot(identical(mm2[,2], 4:6))
 
-setClass("m3", representation(rowtags = "character"),contains = "m2")
+setClass("m3", slots = c(rowtags = "character"),contains = "m2")
 
 setMethod("[", signature(x="m3", i = "character", j = "missing",
                          drop = "missing"),
@@ -179,7 +300,8 @@ removeClass("m3")
 removeClass("m2")
 removeClass("m1")
 
-removeMethods("[")
+removeMethods(all=FALSE,"[")
+removeMethods(all=FALSE,"Ops")
 }
 
 }
diff --git a/src/library/methods/man/ObjectsWithPackage-class.Rd b/src/library/methods/man/ObjectsWithPackage-class.Rd
index 7a4f0eb..b1554e8 100644
--- a/src/library/methods/man/ObjectsWithPackage-class.Rd
+++ b/src/library/methods/man/ObjectsWithPackage-class.Rd
@@ -1,5 +1,5 @@
 % File src/library/methods/man/ObjectsWithPackage-class.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2007 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/methods/man/RClassUtils.Rd b/src/library/methods/man/RClassUtils.Rd
index defd385..35305ad 100644
--- a/src/library/methods/man/RClassUtils.Rd
+++ b/src/library/methods/man/RClassUtils.Rd
@@ -1,7 +1,7 @@
 % File src/library/methods/man/RClassUtils.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2013 R Core Team
-% Copyright 2008-2011 The R Foundation
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2015 R Core Team
+% Copyright 2008-2015 The R Foundation
 % Distributed under GPL 2 or later
 
 \name{RClassUtils}
@@ -297,10 +297,12 @@ setDataPart(object, value, check = TRUE)
         and, if appropriate, the package from which the class came.
     }
 
-    \item{\code{.classEnv}: }{
+    \item{\code{.classEnv}: }{% is called from C level  R_check_class_etc()
         Returns the environment, typically a namespace, in which the
-        \code{Class} has been defined.
-	%% is called from C level  R_check_class_etc()
+        \code{Class} has been defined.  \code{Class} should typically be
+        the result of \code{\link{class}()} (and hence contain a
+        \code{"package"} attribute) or \code{\link{getClass}} (or
+        \code{\link{getClassDef}}).
     }
 
     \item{\code{completeExtends}:}{
@@ -397,9 +399,10 @@ if(get4 <- !any("package:stats4" == search()))
 stopifnot(TRUE
  , identical(.classEnv("data.frame"), meth.ns)
  , identical(.classEnv(class(new("data.frame"))), meth.ns)
+ , identical(.classEnv(     "mle"       ), meth.ns) # <- *not* 'stats4'
  , identical(.classEnv(class(new("mle"))), asNamespace("stats4"))
+ , identical(.classEnv(getClass ("mle") ), asNamespace("stats4"))
  )
 if(get4) detach("package:stats4")
-
 }
 \keyword{internal}
diff --git a/src/library/methods/man/RMethodUtils.Rd b/src/library/methods/man/RMethodUtils.Rd
index fdf4d7e..b49a248 100644
--- a/src/library/methods/man/RMethodUtils.Rd
+++ b/src/library/methods/man/RMethodUtils.Rd
@@ -1,9 +1,10 @@
 % File src/library/methods/man/RMethodUtils.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2013 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2015 R Core Team
 % Distributed under GPL 2 or later
 
 \name{RMethodUtils}
+\title{Method Utilities}
 %% FIXME:  undocumented utilities (Sep. 23/02)
 \alias{asMethodDefinition}
 \alias{standardGeneric-class}
@@ -15,6 +16,7 @@
 \alias{PossibleMethod-class}
 \alias{optionalMethod-class}
 \alias{derivedDefaultMethod-class}
+\alias{internalDispatchMethod-class}
 %%
 \alias{substituteFunctionArgs}
 \alias{makeGeneric}
@@ -39,6 +41,7 @@
 \alias{balanceMethodsList}
 \alias{sigToEnv}
 \alias{rematchDefinition}
+\alias{isRematched}
 \alias{unRematchDefinition}
 \alias{addNextMethod,MethodDefinition-method}
 \alias{addNextMethod,MethodWithNext-method}
@@ -48,7 +51,6 @@
 %% Not for the user to know about!
 \alias{.ShortPrimitiveSkeletons} %% used from C code
 \alias{.EmptyPrimitiveSkeletons}
-\title{Method Utilities}
 \description{
   Utility functions to support the definition and use of formal
   methods.  Most of these functions will not normally be called directly
@@ -61,7 +63,7 @@ getGroup(fdef, recursive, where)
 getGroupMembers(group, recursive = FALSE, character = TRUE)
 
 getMethodsMetaData(f, where)
-assignMethodsMetaData (f, value, fdef, where, deflt)
+assignMethodsMetaData (f, value, fdef, where)
 
 makeGeneric(f, fdef, fdefault =, group=list(), valueClass=character(),
             package =, signature = NULL, genericFunction = NULL,
@@ -93,18 +95,19 @@ setPrimitiveMethods(f, fdef, code, generic, mlist)
 
 missingArg(symbol, envir = parent.frame(), eval)
 
-balanceMethodsList(mlist, args, check = TRUE)
-
 sigToEnv(signature, generic)
 
 rematchDefinition(definition, generic, mnames, fnames, signature)
 unRematchDefinition(definition)
+isRematched(definition)
 
 asMethodDefinition(def, signature, sealed = FALSE, fdef)
 
 addNextMethod(method, f, mlist, optional, envir)
 
 insertClassMethods(methods, Class, value, fieldNames, returnAll)
+
+balanceMethodsList(mlist, args, check = TRUE) # <- deprecated since R 3.2.0
 }
 \section{Summary of Functions}{
 
@@ -228,17 +231,19 @@ insertClassMethods(methods, Class, value, fieldNames, returnAll)
     }
 
     \item{\code{balanceMethodsList}:}{
-      Called from \code{\link{setMethod}} to ensure that all nodes in
-      the list have the same depth (i.e., the same number of levels of
-      arguments).  Balance is needed to ensure that all necessary
-      arguments are examined when inherited methods are being found and
-      added to the \code{allMethods} slot.  No actual recomputation is
-      needed usually except when a new method uses a longer signature
-      than has appeared before.
-
-      Balance requires that \emph{all} methods be added to the generic
-      via \code{setMethod} (how else could you do it?) or by the initial
-      \code{setGeneric} call converting the ordinary function.
+      Used to be called from \code{setMethod()} and is \emph{deprecated}
+      since \R version 3.2.0.
+    %%   Called from \code{\link{setMethod}} to ensure that all nodes in
+    %%   the list have the same depth (i.e., the same number of levels of
+    %%   arguments).  Balance is needed to ensure that all necessary
+    %%   arguments are examined when inherited methods are being found and
+    %%   added to the \code{allMethods} slot.  No actual recomputation is
+    %%   needed usually except when a new method uses a longer signature
+    %%   than has appeared before.
+
+    %%   Balance requires that \emph{all} methods be added to the generic
+    %%   via \code{setMethod} (how else could you do it?) or by the initial
+    %%   \code{setGeneric} call converting the ordinary function.
     }
 
     \item{\code{sigToEnv}:}{
@@ -256,14 +261,17 @@ insertClassMethods(methods, Class, value, fieldNames, returnAll)
     }
 
     \item{\code{rematchDefinition},
-      \code{unRematchDefinition}:}{
+      \code{unRematchDefinition},
+      \code{isRematched}:}{
       If the specified method in a call to \code{\link{setMethod}}
       specializes the argument list (by replacing \dots), then
       \code{rematchDefinition} constructs the actual method stored.
       Using knowledge of how \code{rematchDefinition} works,
       \code{unRematchDefinition} reverses the procedure; if given a
       function or method definition that does not correspond to this
-      form, it just returns its argument.
+      form, it just returns its argument. \code{isRematched} returns a
+      logical value indicating whether rematching was used when
+      constructing a given method.
     }
 
     \item{\code{asMethodDefinition}:}{
diff --git a/src/library/methods/man/S3Part.Rd b/src/library/methods/man/S3Part.Rd
index 190cdcb..762bb0f 100644
--- a/src/library/methods/man/S3Part.Rd
+++ b/src/library/methods/man/S3Part.Rd
@@ -1,9 +1,10 @@
 % File src/library/methods/man/S3Part.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 2008 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 2008-2016 R Core Team
 % Distributed under GPL 2 or later
 
 \name{S3Part}
+\title{ S4 Classes that Contain S3 Classes}
 \alias{S3Part}
 \alias{S3Part<-}
 \alias{S3Class}
@@ -16,158 +17,104 @@
 \alias{coerce,oldClass,S3-method}
 \alias{coerce,ANY,S4-method}
 \alias{S3-class}
-\title{ S3-style Objects and S4-class Objects}
 \description{
-  Old-style (S3) classes may be registered as S4 classes (by calling
-  \code{\link{setOldClass}}, and many have been.  These classes can
-  then be contained in (that is, superclasses of) regular S4 classes, allowing formal methods
-  and slots to be added to the S3 behavior.  The function
-  \code{S3Part} extracts or replaces
-  the S3 part of such an object.
-  \code{S3Class} extracts or
-  replaces the S3-style class.  \code{S3Class} also applies to object
-  from an S4 class with \code{S3methods=TRUE} in the call to \code{\link{setClass}}.
-
-See the details below.
-  Also discussed are S3 <-> S4 coercion; see the section
-  \dQuote{S3 and S4 objects}
+  A regular (S4) class may contain an S3 class, if that class has been registered (by calling
+  \code{\link{setOldClass}}).  The functions described here provide
+  information about contained S3 classes.  See the section \sQuote{Functions}.
+
+  In modern \R, these functions are not
+  usually needed to program with objects from the S4 class.  Standard computations work as expected, including method selection
+  for both S4 and S3.  To coerce an object to its contained S3 class,
+  use either of the expressions:
+
+\code{as(object, S3Class); as(object, "S3")} 
+
+  where
+  \code{S3Class} evaluates to the name of the contained class.  These
+  return slightly different objects, which in rare cases may need to
+  be distinguished.  See the section \dQuote{Contained S3 Objects}.
+
+
 }
-\usage{
 
+\usage{
 S3Part(object, strictS3 = FALSE, S3Class)
 
-S3Part(object, strictS3 = FALSE, needClass = ) <- value
-
 S3Class(object)
 
-S3Class(object) <-  value
-
 isXS3Class(classDef)
 
 slotsFromS3(object)
 
+## the replacement versions of the functions are not recommended
+## Create a new object from the class or use the replacement version of as().
+
+
+S3Part(object, strictS3 = FALSE, needClass = ) <- value
+
+S3Class(object) <-  value
+
 }
-%- maybe also 'usage' for other objects documented here.
 \arguments{
+  \item{object}{an object from some class that extends a registered
+    S3 class, or a basic
+    vector, matrix or array object type.
+
+    For most of the functions, an S3 object can also be supplied,
+    with the interpretation that it is its own S3 part.
+  }
+  \item{strictS3}{If \code{TRUE}, the value returned by
+    \code{S3Part} will be an S3 object, with all the S4 slots
+    removed.  Otherwise, an S4 object will always
+    be returned; for example, from the S4 class created by
+    \code{\link{setOldClass}} as a proxy for an S3 class, rather than
+    the underlying S3 object.
+  }
+  \item{S3Class}{the \code{\link{character}} vector to be stored as the
+    S3 class slot in the object.  Usually, and by default, retains
+    the slot from \code{object}, but an S3 superclass is allowed.
+    }
 
-  \item{object}{ An object from some class that extends a registered
-      S3 class,
-      usually because the class has as
-      one of its superclasses an S3 class registered by a call to
-      \code{\link{setOldClass}}, or from a class that extends a basic
-      vector, matrix or array object type.  See the details.
-
-      For most of the functions, an S3 object can also be supplied,
-      with the interpretation that it is its own S3 part.
- }
-    \item{strictS3}{  If \code{TRUE}, the value returned by
-        \code{S3Part} will be an S3 object, with all the S4 slots
-        removed.  Otherwise, an S4 object will always
-        be returned; for example, from the S4 class created by
-  \code{\link{setOldClass}} as a proxy for an S3 class, rather than
-  the underlying S3 object.
-        }
-  \item{S3Class}{ The character vector to be stored as the S3 class
-      slot in the object.  Usually, and by default, retains
-      the slot from \code{object}.
-      }
+  \item{classDef}{a class definition object, as returned by
+    \code{\link{getClass}}.
 
-  \item{needClass}{Require that the replacement value be this class or a
-      subclass of it.
-      }
-
-  \item{value}{ For \code{S3Part<-}, the replacement value for the S3 part of the object.
-      This does \emph{not} need to be an S4 object; in fact, the
-      usual way to create objects from these classes is by giving an
-      S3 object of the right class as an argument to
-      \code{\link{new}}.
-
-      For \code{S3Class<-}, the character vector that will be used as
-      a proxy for \code{class(x)} in S3 method dispatch.  This
-      replacement function can be used to control S3 per-object method
-      selection.
-    }
+\emph{The remaining arguments apply only to the replacement versions,
+  which are not recommended.}
+  }
 
 
-    \item{classDef}{ A class definition object, as returned by \code{\link{getClass}}.
-        }
+  \item{needClass}{Require that the replacement value be this class or a
+    subclass of it.}
 
+  \item{value}{For \code{S3Part<-}, the replacement value for the
+    S3 part of the object.
 
+    For \code{S3Class<-}, the character vector that will be used as
+    a proxy for \code{class(x)} in S3 method dispatch.
+  }
 }
-\details{
-  Classes that register S3 classes by a call to
-  \code{\link{setOldClass}} have slot \code{".S3Class"} to hold
-  the corresponding S3 vector of class strings.
-  The prototype of such
-  a class has the value for this slot determined  by the argument to
-  \code{\link{setOldClass}}.
-  Other S4 classes will have the same slot if the argument
-  \code{S3methods = TRUE} is supplied to \code{\link{setClass}}; in
-  this case, the slot is set to the S4 inheritance of the class.
-
-  New S4 classes that extend (contain) such
-  classes also have the same slot, and by default the prototype has
-  the value determined  by the \code{contains=} argument to
-  \code{\link{setClass}}.
-  Individual objects from the S4 class may
-  have
-  an S3 class corresponding to the value in the prototype or to an
-  (S3) subclass of that value.  See the examples below.
-
-  \code{S3Part()}  with \code{strictS3 = TRUE} constructs the underlying S3 object by eliminating
+
+\section{Functions}{
+
+\code{S3Part}:  Returns an object from the S3 class that appeared
+   in the \code{contains=} argument to \code{\link{setClass}}.
+
+   If called with \code{strictS3 = TRUE}, \code{S3Part()} constructs the underlying
+  S3 object by eliminating
   all the formally defined slots and turning off the S4 bit of the
-  object.  With  \code{strictS3 = FALSE} the object returned is from
+  object.  With \code{strictS3 = FALSE} the object returned is from
   the corresponding S4 class.  For consistency and generality,
   \code{S3Part()} works also for classes that extend the basic vector,
-  matrix and array classes.  Since \R is somewhat arbitrary about what
-  it treats as an S3 class (\code{"ts"} is, but \code{"matrix"} is
-  not), \code{S3Part()} tries to return an S3 (that is, non-S4) object
-  whenever the S4 class has a suitable superclass, of either S3 or
-  basic object type.
-
-  One general application that relies on this generality is to use
-  \code{S3Part()} to get a superclass object that is guaranteed not to
-  be an S4 object.  If you are calling some function that checks for
-  S4 objects, you need to be careful not to end up in a closed loop
-  (\code{fooS4} calls \code{fooS3}, which checks for an S4 object and
-  calls \code{fooS4} again, maybe indirectly).  Using \code{S3Part()}
-  with \code{strictS3 = TRUE} is a mechanism to avoid such loops.
-
-
-  Because the contents of S3 class objects have no definition or
-  guarantee, the computations involving S3 parts  do
-  \emph{not} check for slot validity.  Slots are implemented
-  internally in \R as attributes, which are copied when present in the
-  S3 part.  Grave problems can occur if an S4 class
-  extending an S3 class uses the name of an S3 attribute as the name
-  of an S4 slot, and S3 code sets the attribute to an object from an
-  invalid class according to the S4 definition.
-
-  Frequently, \code{S3Part} can and should be avoided by simply
-  coercing objects to the desired class; methods are automatically
-  defined to deal correctly with the slots when \code{\link{as}} is
-  called to extract or replace superclass objects.
+  matrix and array classes.
 
-  The function \code{slotsFromS3()} is a generic function used
-  internally to access the slots associated with the S3 part of the
-  object.  Methods for this function are created automatically when
-  \code{\link{setOldClass}} is called with the \code{S4Class}
-  argument.  Usually, there is only one S3 slot, containing the S3
-  class, but the \code{S4Class} argument may provide additional slots,
-  in the case that the S3 class has some guaranteed attributes that
-  can be used as formal S4 slots.  See the corresponding section in
-  the documentation of \code{\link{setOldClass}}.
-}
-\value{
+  A call to is equivalent coercing the object to class \code{"S3"} for
+  the strict case, or to whatever the specific S3 class was, for the
+  non-strict case.  The \code{as()} calls are usually easier for
+  readers to understand.
 
-\code{S3Part}:  Returns or sets  the S3 information
-  (and possibly some S4 slots as well, depending on arguments
-  \code{S3Class} and \code{keepSlots}).  See the discussion of
-  argument \code{strict} above.  If it is \code{TRUE} the value
-  returned is an S3 object.
 
 
-\code{S3Class}:  Returns or sets the character vector of S3 class(es) stored in
+\code{S3Class}:  Returns the character vector of S3 class(es) stored in
   the object, if the class has the corresponding \code{.S3Class} slot.
   Currently, the function defaults to \code{\link{class}} otherwise.
 
@@ -178,6 +125,59 @@ slotsFromS3(object)
 
 \code{slotsFromS3}: returns a list of the relevant slot classes, or an
 empty list for any other object.
+
+
+  The function \code{slotsFromS3()} is a generic function used
+  internally to access the slots associated with the S3 part of the
+  object.  Methods for this function are created automatically when
+  \code{\link{setOldClass}} is called with the \code{S4Class}
+  argument.  Usually, there is only one S3 slot, containing the S3
+  class, but the \code{S4Class} argument may provide additional slots,
+  in the case that the S3 class has some guaranteed attributes that
+  can be used as formal S4 slots.  See the corresponding section in
+  the documentation of \code{\link{setOldClass}}.
+
+}
+
+\section{Contained S3 Objects}{
+  Registering an S3 class defines an S4 class.  Objects from this
+  class are essentially identical in content to an object from the S3
+  class, except for two differences.  The value returned by
+  \code{\link{class}()} will always be a single string for the S4
+  object, and \code{\link{isS4}()} will return \code{TRUE} or
+  \code{FALSE} in the two cases.  See the example below.  It is barely
+  possible that some S3 code will not work with the S4 object; if so,
+  use \code{as(x, "S3")}.
+
+  Objects from a class that extends an S3 class will have some basic type and
+  possibly some attributes.  For an S3 class that has an equivalent S4
+  definition (e.g., \code{"data.frame"}), an extending S4 class will
+  have a data part and slots.  For other S3 classes (e.g., \code{"lm"}) an
+  object from the extending S4 class will be some sort of basic type,
+  nearly always a vector type (e.g., \code{"list"} for \code{"lm"}),
+  but the data part will not have a formal definition.
+
+  Registering an S3 class by a call to
+  \code{\link{setOldClass}} creates a class of the same name with a slot \code{".S3Class"} to hold
+  the corresponding S3 vector of class strings.
+  New S4 classes that extend such
+  classes also have the same slot, set to the S3 class of the
+  contained S3 \emph{object},
+  which may be  an
+  (S3) subclass of the registered class.
+  For example, an S4 class might contain the S3 class \code{"lm"}, but
+  an object from the class might contain an object from class
+  \code{"mlm"}, as in the \code{"xlm"}example below.
+  
+  \R is somewhat arbitrary about what
+  it treats as an S3 class: \code{"ts"} is, but \code{"matrix"} and \code{"array"}
+  are not.
+  For classes that extend
+  those, assuming they contain an S3 class is incorrect and will cause some
+  confusion---not usually disastrous, but the better strategy
+  is to stick to the explicit \dQuote{class}.
+  Thus \code{as(x, "matrix")} rather than \code{as(x, "S3")} or \code{S3Part(x)}.
+
 }
 
 \section{S3 and S4 Objects: Conversion Mechanisms}{
@@ -218,70 +218,44 @@ empty list for any other object.
 }
 
 \references{
- Chambers, John M. (2008)
- \emph{Software for Data Analysis: Programming with R}
-  Springer.  (For the R version).
-
- Chambers, John M. (1998)
- \emph{Programming with Data}
- Springer (For the original S4 version.)
+ Chambers, John M. (2016)
+ \emph{Extending R},
+  Chapman & Hall.
+(Chapters 9 and 10, particularly Section 10.8)
 }
+
+\seealso{  \code{\link{setOldClass}} }
 \examples{
-## two examples extending S3 class "lm", class "xlm" directly
-## and "ylm" indirectly
-setClass("xlm", representation(eps = "numeric"), contains = "lm")
-setClass("ylm", representation(header = "character"), contains = "xlm")
-\dontshow{
-ctl <- c(4.17,5.58,5.18,6.11,4.50,4.61,5.17,4.53,5.33,5.14)
-trt <- c(4.81,4.17,4.41,3.59,5.87,3.83,6.03,4.89,4.32,4.69)
-group <- gl(2,10,20, labels=c("Ctl","Trt"))
-weight <- c(ctl, trt)
-lm.D9 <- lm(weight ~ group)
-}
-## lm.D9 is as computed in the example for stats::lm
-y1 = new("ylm", lm.D9, header = "test", eps = .1)
-xx = new("xlm", lm.D9, eps =.1)
-y2 = new("ylm", xx, header = "test")
-stopifnot(inherits(y2, "lm"))
-stopifnot(identical(y1, y2))
-stopifnot(identical(S3Part(y1, strict = TRUE), lm.D9))
 
-## note the these classes can insert an S3 subclass of "lm" as the S3 part:
-myData <- data.frame(time = 1:10, y = (1:10)^.5)
-myLm <- lm(cbind(y, y^3)  ~ time, myData) # S3 class: c("mlm", "lm")
-ym1 = new("ylm", myLm, header = "Example", eps = 0.)
+## an "mlm" object, regressing two variables on two others
 
-##similar classes to "xlm" and "ylm", but extending S3 class c("mlm", "lm")
-setClass("xmm", representation(eps = "numeric"), contains = "mlm")
-setClass("ymm", representation(header="character"), contains = "xmm")
+sepal <- as.matrix(datasets::iris[,c("Sepal.Width", "Sepal.Length")])
+fit <- lm(sepal ~ Petal.Length + Petal.Width + Species, data = datasets::iris)
+class(fit) # S3 class: "mlm", "lm"
 
-ym2 <- new("ymm", myLm, header = "Example2", eps = .001)
+## a class that contains "mlm"
+myReg <- setClass("myReg", slots = c(title = "character"), contains = "mlm")
 
-# but for class "ymm", an S3 part of class "lm" is an error:
-try(new("ymm", lm.D9, header = "Example2", eps = .001))
+fit2 <- myReg(fit, title = "Sepal Regression for iris data")
 
-setClass("dataFrameD", representation(date = "Date"),
-         contains = "data.frame")
-myDD <- new("dataFrameD", myData, date = Sys.Date())
+fit2 # shows the inherited "mlm" object and the title
 
-## S3Part() applied to classes with a data part (.Data slot)
+identical(S3Part(fit2), as(fit2, "mlm"))
 
-setClass("NumX", contains="numeric", representation(id="character"))
-nn = new("NumX", 1:10, id="test")
-stopifnot(identical(1:10, S3Part(nn, strict = TRUE)))
+class(as(fit2, "mlm")) # the S4 class, "mlm"
 
-m1 = cbind(group, weight)
-setClass("MatX", contains = "matrix", representation(date = "Date"))
-mx1 = new("MatX", m1, date = Sys.Date())
-stopifnot(identical(m1, S3Part(mx1, strict = TRUE)))
+class(as(fit2, "S3")) # the S3 class, c("mlm", "lm")
 
-\dontshow{
+## An object may contain an S3 class from a subclass of that declared:
+xlm <- setClass("xlm", slots = c(eps = "numeric"), contains = "lm")
 
-for(cl in c("ylm", "xlm", "ymm", "xmm", "dataFrameD", "NumX", "MatX"))
-    removeClass(cl)
+xfit <- xlm(fit, eps = .Machine$double.eps)
 
+xfit at .S3Class # c("mlm", lm")
+
+\dontshow{
+    removeClass("myReg")
 }
 }
-\seealso{  \code{\link{setOldClass}} }
 \keyword{ programming }
 \keyword{ classes }
diff --git a/src/library/methods/man/S4groupGeneric.Rd b/src/library/methods/man/S4groupGeneric.Rd
index 306301a..c819701 100644
--- a/src/library/methods/man/S4groupGeneric.Rd
+++ b/src/library/methods/man/S4groupGeneric.Rd
@@ -1,6 +1,6 @@
 % File src/library/methods/man/S4groupGeneric.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2013 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2016 R Core Team
 % Distributed under GPL 2 or later
 
 \name{S4groupGeneric}
@@ -59,7 +59,7 @@ Complex(z)
   specified directly for the member function for the same signature.
   The effect is that group generic definitions are selected before
   inherited methods but after directly specified methods.  For more on
-  method selection, see \code{\link{Methods}}.
+  method selection, see \code{\link{Methods_Details}}.
 
 There are also
   S3 groups \code{Math}, \code{Ops}, \code{Summary} and
@@ -105,7 +105,7 @@ There are also
   functions, and many of them are defined as primitives.  However, you can still define
   formal methods for them, both individually and via the group generics.  It all works more or less as you
   might expect, admittedly via a bit of trickery in the background.
-  See \link{Methods} for details.
+  See \link{Methods_Details} for details.
 
   Note that two members of the \code{Math} group, \code{\link{log}} and
   \code{\link{trunc}}, have \dots as an extra formal argument.
@@ -114,17 +114,20 @@ There are also
   them with the extra argument(s).
 
   For further details about group generic functions see section 10.5 of
-  \emph{Software for Data Analysis}.
+  the second reference.
 
 }
 \references{
+ Chambers, John M. (2016)
+ \emph{Extending R},
+  Chapman & Hall.
+(Chapters 9 and 10.)
+
+
  Chambers, John M. (2008)
  \emph{Software for Data Analysis: Programming with R}
-  Springer.  (For the R version.)
+  Springer. (Section 10.5)
 
- Chambers, John M. (1998)
- \emph{Programming with Data}
- Springer (For the original S4 version).
 }
 \seealso{ The function \code{\link{callGeneric}} is nearly always
   relevant when writing a method for a group generic.  See the
@@ -133,7 +136,7 @@ There are also
   See \link{S3groupGeneric} for S3 group generics.
 }
 \examples{
-setClass("testComplex", representation(zz = "complex"))
+setClass("testComplex", slots = c(zz = "complex"))
 ## method for whole group "Complex"
 setMethod("Complex", "testComplex",
           function(z) c("groupMethod", callGeneric(z at zz)))
diff --git a/src/library/methods/man/SClassExtension-class.Rd b/src/library/methods/man/SClassExtension-class.Rd
index 89ab9a4..06ca71b 100644
--- a/src/library/methods/man/SClassExtension-class.Rd
+++ b/src/library/methods/man/SClassExtension-class.Rd
@@ -1,5 +1,5 @@
 % File src/library/methods/man/SClassExtension-class.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2013 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/methods/man/StructureClasses.Rd b/src/library/methods/man/StructureClasses.Rd
index fff3752..84050aa 100644
--- a/src/library/methods/man/StructureClasses.Rd
+++ b/src/library/methods/man/StructureClasses.Rd
@@ -1,5 +1,5 @@
 % File src/library/methods/man/StructureClasses.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2011 R Core Team
 % Distributed under GPL 2 or later
 
@@ -77,7 +77,7 @@
   have a  \code{.Data} slot with that class.  This is the only use of
   \code{.Data} other than as a pseudo-class indicating the type of the
   object.  In this case the type of the object will be the type of the
-  contained matrix or array. See \code{\link{Classes}} for a general
+  contained matrix or array. See \code{\link{Classes_Details}} for a general
   discussion.
 
   The class \code{"ts"}  is basically an S3 class
diff --git a/src/library/methods/man/TraceClasses.Rd b/src/library/methods/man/TraceClasses.Rd
index 23792bc..ac6fd3e 100644
--- a/src/library/methods/man/TraceClasses.Rd
+++ b/src/library/methods/man/TraceClasses.Rd
@@ -1,5 +1,5 @@
 % File src/library/methods/man/TraceClasses.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2007 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/methods/man/as.Rd b/src/library/methods/man/as.Rd
index ebeb497..3c5ab3f 100644
--- a/src/library/methods/man/as.Rd
+++ b/src/library/methods/man/as.Rd
@@ -1,49 +1,24 @@
 % File src/library/methods/man/as.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2010 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2016 R Core Team
 % Distributed under GPL 2 or later
 
 \name{as}
 \alias{as}
 \alias{as<-}
-\alias{coerce}
-\alias{coerce<-}
-\alias{setAs}
-\alias{coerce-methods}
-\alias{coerce,ANY,array-method}
-\alias{coerce,ANY,call-method}
-\alias{coerce,ANY,character-method}
-\alias{coerce,ANY,complex-method}
-\alias{coerce,ANY,environment-method}
-\alias{coerce,ANY,expression-method}
-\alias{coerce,ANY,function-method}
-\alias{coerce,ANY,integer-method}
-\alias{coerce,ANY,list-method}
-\alias{coerce,ANY,logical-method}
-\alias{coerce,ANY,matrix-method}
-\alias{coerce,ANY,name-method}
-\alias{coerce,ANY,numeric-method}
-\alias{coerce,ANY,single-method}
-\alias{coerce,ANY,ts-method}
-\alias{coerce,ANY,vector-method}
-\alias{coerce,ANY,NULL-method}
 \title{Force an Object to Belong to a Class}
 \description{
-  These functions manage the relations that allow coercing an object to
-  a given class.
+  Coerce an object to a given class.
 }
 \usage{
 as(object, Class, strict=TRUE, ext)
 
 as(object, Class) <- value
 
-setAs(from, to, def, replace, where = topenv(parent.frame()))
-
 }
-\section{Summary of Functions}{
-  \describe{
-    \item{\code{as}:}{
-      Returns the version of this object coerced to be the given
+\section{Description}{
+    \code{as(object)}
+      returns the version of this object coerced to be the given
       \code{Class}.  When used in the replacement form on the left of
       an assignment, the portion of the object corresponding to
       \code{Class} is replaced by \code{value}.
@@ -51,32 +26,19 @@ setAs(from, to, def, replace, where = topenv(parent.frame()))
       The operation of \code{as()} in either form depends on the
       definition of coerce methods.  Methods are defined automatically
       when the two classes are related by inheritance; that is, when
-      one of the classes is a subclass of the other.  See the section
-      on inheritance  below for details.
+      one of the classes is a subclass of the other.
 
       Coerce methods are also predefined for basic classes (including all
-      the types of vectors, functions and a few others). See
-      \code{showMethods(coerce)} for a list of these.
+      the types of vectors, functions and a few others).
 
       Beyond these two sources of methods, further methods are defined
-      by calls to the \code{setAs} function.
-
-    }
-
-    \item{\code{setAs}:}{
-      Define methods for coercing an object of class \code{from} to be of class \code{to}; the \code{def} argument provides for direct coercing and the \code{replace} argument, if included, provides for replacement.  See the \dQuote{How} section below for details.
-    }
-
-    \item{\code{coerce}, \code{coerce<-}:}{
-      Coerce \code{from} to be of the same class as \code{to}.
-
-      These functions should not be called explicitly.  The function
-      \code{\link{setAs}} creates methods for them for the
-      \code{as} function to use.
-    }
+      by calls to the \code{\link{setAs}} function.  See that
+      documentation also for details of how coerce methods work. Use
+      \code{showMethods(coerce)} for a list of all currently defined methods, as in the
+      example below.
 
+ 
   }
-}
 \arguments{
   \item{object}{any \R object.}
   \item{Class}{the name of the class to which \code{object} should be
@@ -94,227 +56,44 @@ setAs(from, to, def, replace, where = topenv(parent.frame()))
     discussion below).  You should supply an object with class
     \code{Class}; some coercion is done, but you're unwise to rely on
     it.}
-
-  \item{from, to}{The classes between which the coerce methods
-      \code{def} and \code{replace} perform coercion.
-    }
-  \item{def}{function of one argument.  It will get an object from
-    class \code{from} and had better return an object of class
-    \code{to}. The convention is that
-    the name of the argument is \code{from}; if another argument name
-    is used, \code{setAs} will attempt to substitute \code{from}. }
-  \item{replace}{if supplied, the function to use as a replacement
-    method, when \code{as} is used on the left of an assignment.
-    Should be a function of two arguments, \code{from, value},
-    although \code{setAs} will attempt to substitute if the arguments differ.}
-  \item{where}{the position or environment in which to store the
-    resulting methods. For most applications, it is recommended to
-    omit this argument and to include the call to \code{setAs} in source code that is evaluated at the top level; that is, either in an R session by something equivalent to a call to \code{\link{source}}, or as part of the R source code for a package.}
-  \item{ext}{the optional object
+  \item{ext}{an optional object
     defining how \code{Class} is extended by the class of the
     object (as returned by \code{\link{possibleExtends}}).
-    This argument is used internally (to provide essential
-    information for non-public classes), but you are unlikely to want
-    to use it directly.
+    This argument is used internally;
+    do not use it directly.
   }
 }
 
-\section{Inheritance and Coercion}{
-
- Objects from one class can turn into objects from another class
-  either automatically or by an explicit call to the \code{as}
-  function.  Automatic conversion is special, and comes from the
-  designer of one class of objects asserting that this class extends
-  another class.  The most common case is that one or more class names
-  are supplied in the \code{contains=} argument to \code{setClass}, in
-  which case the new class extends each of the earlier classes (in the
-  usual terminology, the earlier classes are \emph{superclasses} of
-  the new class and it is a \emph{subclass} of each of them).
-
-This form of inheritance is called \emph{simple} inheritance in \R.
-See \code{\link{setClass}} for details.
-Inheritance can also be defined explicitly by a call to
-\code{\link{setIs}}.
-The two versions have slightly different implications for coerce methods.
-Simple inheritance implies that inherited slots behave identically in the subclass and the superclass.
-Whenever two classes are related by simple inheritance, corresponding coerce methods
-are defined for both direct and replacement use of \code{as}.
-In the case of simple inheritance, these methods do the obvious
-computation:  they extract or replace the slots in the object that
-correspond to those in the superclass definition.
-
-The implicitly defined coerce methods may be overridden by a call
-to \code{setAs}; note, however, that the implicit methods are defined for each
-subclass-superclass pair, so that you must override each of these
-explicitly, not rely on inheritance.
-
-When inheritance is defined by a call to \code{setIs}, the coerce methods are provided explicitly, not generated automatically.
-Inheritance will apply (to the \code{from} argument, as described in  the section below).
-You could also supply methods via \code{setAs} for non-inherited relationships, and now these also can be inherited.
-
-For further on the distinction between simple and explicit inheritance, see \code{\link{setIs}}.
-
-}
-\section{How Functions 'as' and 'setAs' Work}{
-  The function \code{as}  turns \code{object} into an object
-  of class \code{Class}.  In doing so, it applies a \dQuote{coerce
-    method}, using S4
-  classes and methods, but in a somewhat special way.
-Coerce methods are methods for the function \code{coerce} or, in the
-replacement case the function \code{`coerce<-`}.
-These functions have two arguments in method signatures, \code{from}
-and \code{to}, corresponding to the class of the object and the
-desired coerce class.
-These functions must not be called directly, but are used to store
-tables of methods for the use of \code{as}, directly and for
-replacements.
-In this section we will describe the direct case, but except where
-noted the replacement case works the same way, using \code{`coerce<-`}
-and the \code{replace} argument to \code{setAs}, rather than
-\code{coerce} and the \code{def} argument.
-
-Assuming the \code{object} is not already of the desired class,
-\code{as} first looks for a method in the table of methods
- for the function
-  \code{coerce} for the signature \code{c(from = class(object), to =
-    Class)}, in the same way method selection would do its initial lookup.
-To be precise, this means the table of both direct and inherited
-methods, but inheritance is used specially in this case (see below).
-
-If no method is found, \code{as} looks for one.
-First, if either \code{Class} or \code{class(object)} is a superclass
-of the other, the class definition will contain the information needed
-to construct a coerce method.
-In the usual case that the subclass contains the superclass (i.e., has
-all its slots), the method is constructed either by extracting or
-replacing the inherited slots.
-Non-simple extensions (the result of a call to \code{\link{setIs}})
-will usually contain explicit methods, though possibly not for replacement.
-
- If no subclass/superclass relationship provides a method, \code{as}
- looks for an inherited method, but applying, inheritance for the argument \code{from} only, not for
-  the argument \code{to} (if you think about it, you'll probably agree
-  that you wouldn't want the result to be from some class other than the
-  \code{Class} specified). Thus,
-  \code{selectMethod("coerce", sig, useInherited= c(from=TRUE, to= FALSE))}
-  replicates the method selection used by \code{as()}.
-
-In nearly all cases the method found in this way will be cached in the
-table of coerce methods (the exception being subclass relationships with a test, which
-are legal but discouraged).
-So the detailed calculations should be done only on the first
-occurrence of a coerce from \code{class(object)} to \code{Class}.
-
-Note that  \code{coerce} is not a standard generic function.  It is
-not intended to be called directly.  To prevent accidentally caching
-an invalid inherited method, calls are routed to an equivalent call to
-\code{as}, and a warning is issued.  Also, calls to
-\code{\link{selectMethod}} for this function may not represent the
-method that \code{as} will choose.  You can only trust the result if
-the corresponding call to \code{as} has occurred previously in this
-session.
-
-  With this explanation as background, the function \code{setAs} does a
-  fairly obvious computation:  It constructs and sets a method for the function
-  \code{coerce} with signature \code{c(from, to)}, using the \code{def}
-  argument to define the body of the method.  The function supplied as
-  \code{def} can have one argument (interpreted as an object to be
-  coerced) or two arguments (the \code{from} object and the \code{to}
-  class).  Either way, \code{setAs} constructs a function of two
-  arguments, with the second defaulting to the name of the \code{to}
-  class.  The method will be called from \code{as} with the object
-  as the \code{from} argument and no \code{to} argument, with the default for this argument being the name of the intended
-  \code{to} class, so the method can use this information in messages.
 
-The direct version of the \code{as} function also has a \code{strict=} argument that defaults to \code{TRUE}.
-Calls during the evaluation of methods for other functions will set this argument to \code{FALSE}.
-The distinction is relevant when the object being coerced is from a simple subclass of the \code{to} class; if \code{strict=FALSE} in this case, nothing need be done.
-For most user-written coerce methods, when the two classes have no subclass/superclass, the \code{strict=} argument is irrelevant.
-
-The \code{replace} argument to \code{setAs} provides a method for
-\code{`coerce<-`}.
-As with all replacement methods, the last argument of the method must
-have the name \code{value} for the object on the right of the
-assignment.
-As with the \code{coerce} method, the first two arguments are
-\code{from, to}; there is no \code{strict=} option for the replace case.
-
-  The function \code{coerce} exists as a repository for
-  such methods, to be selected as described above by the \code{as}
-  function.  Actually dispatching the methods using
-  \code{standardGeneric} could produce incorrect inherited methods, by using
-   inheritance on the
-  \code{to} argument; as mentioned, this is not the logic used for
-  \code{as}.
-  To prevent selecting and caching invalid methods, calls to
-  \code{coerce} are
-  currently mapped into calls to \code{as}, with a warning message.
-}
 
 
 \section{Basic Coercion Methods}{
   Methods are pre-defined for coercing any object to one of the basic
   datatypes.  For example, \code{as(x, "numeric")} uses the existing
-  \code{as.numeric} function.  These built-in methods can be listed by
-  \code{showMethods("coerce")}.
+  \code{as.numeric} function.  These and all other existing methods
+  can be listed as shown in the example.
 }
 
 \seealso{
   If you think of using \code{try(as(x, cl))}, consider
   \code{\link{canCoerce}(x, cl)} instead.
 }
-\references{
- Chambers, John M. (2008)
- \emph{Software for Data Analysis: Programming with R}
-  Springer.  (For the R version.)
 
- Chambers, John M. (1998)
- \emph{Programming with Data}
- Springer (For the original S4 version.)
-}
 \examples{
-## using the definition of class "track" from \link{setClass}
-
-\dontshow{
-setClass("track",
-         representation(x="numeric", y="numeric"))
-setClass("trackCurve",
-         representation("track", smooth = "numeric"))
-}
-
-setAs("track", "numeric", function(from) from at y)
-
-t1 <- new("track", x=1:20, y=(1:20)^2)
-
-as(t1, "numeric")
 
-## The next example shows:
-##  1. A virtual class to define setAs for several classes at once.
-##  2. as() using inherited information
+## Show all the existing methods for as()
+showMethods("coerce")
 
-setClass("ca", representation(a = "character", id = "numeric"))
-
-setClass("cb", representation(b = "character", id = "numeric"))
-
-setClass("id")
-setIs("ca", "id")
-setIs("cb", "id")
-
-
-setAs("id", "numeric", function(from) from at id)
-
-CA <- new("ca", a = "A", id = 1)
-CB <- new("cb", b = "B", id = 2)
+}
 
-setAs("cb", "ca", function(from, to )new(to, a=from at b, id = from at id))
+\references{
+ Chambers, John M. (2016)
+ \emph{Extending R},
+  Chapman & Hall.
+(Chapters 9 and 10.)
+}
 
-as(CB, "numeric")
 
-\dontshow{
-## should generate an error (should have been a function of one argument)
-try(setAs("track", "numeric", function(x, y,z)x at y))
-}
-}
 \keyword{programming}
 \keyword{classes}
 \keyword{methods}
diff --git a/src/library/methods/man/callGeneric.Rd b/src/library/methods/man/callGeneric.Rd
index 73af3f7..2dfcd95 100644
--- a/src/library/methods/man/callGeneric.Rd
+++ b/src/library/methods/man/callGeneric.Rd
@@ -1,5 +1,5 @@
 % File src/library/methods/man/callGeneric.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2007 R Core Team
 % Distributed under GPL 2 or later
 
@@ -48,16 +48,18 @@ callGeneric(...)
   The value returned by the new call.
 }
 \references{
+ Chambers, John M. (2016)
+ \emph{Extending R},
+  Chapman & Hall.
+(Chapters 9 and 10.)
+
  Chambers, John M. (2008)
  \emph{Software for Data Analysis: Programming with R}
-  Springer.  (For the R version.)
+  Springer. (Section 10.4 for some details.)
 
- Chambers, John M. (1998)
- \emph{Programming with Data}
- Springer (For the original S4 version.)
 }
 \seealso{\code{\link{GroupGenericFunctions}} for other information
-  about group generic functions; \link{Methods} for the general behavior
+  about group generic functions; \link{Methods_Details} for the general behavior
   of method dispatch
 }
 \examples{
diff --git a/src/library/methods/man/canCoerce.Rd b/src/library/methods/man/canCoerce.Rd
index 94204ea..6f71b5b 100644
--- a/src/library/methods/man/canCoerce.Rd
+++ b/src/library/methods/man/canCoerce.Rd
@@ -1,5 +1,5 @@
 % File src/library/methods/man/canCoerce.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2007 R Core Team
 % Distributed under GPL 2 or later
 
@@ -20,7 +20,7 @@ canCoerce(object, Class)
 }
 \value{
   a scalar logical, \code{TRUE} if there is a \code{coerce} method
-  (as defined by \code{\link{setAs}}, e.g.) for the signature
+  (as defined by e.g.\sspace{}\code{\link{setAs}}) for the signature
   \code{(from = class(object), to = Class)}.
 }
 \seealso{\code{\link{as}}, \code{\link{setAs}},
diff --git a/src/library/methods/man/cbind2.Rd b/src/library/methods/man/cbind2.Rd
index 1433737..e12887c 100644
--- a/src/library/methods/man/cbind2.Rd
+++ b/src/library/methods/man/cbind2.Rd
@@ -1,11 +1,9 @@
 % File src/library/methods/man/cbind2.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2011 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2015 R Core Team
 % Copyright 2001-2011 The R Foundation
 % Distributed under GPL 2 or later
 
-\newcommand{\CRANpkg}{\href{http://CRAN.R-project.org/package=#1}{\pkg{#1}}}
-
 \name{cbind2}
 \alias{cbind2}
 \alias{rbind2}
@@ -20,23 +18,36 @@
 \title{Combine two Objects by Columns or Rows}
 \description{
   Combine two matrix-like \R objects by columns (\code{cbind2})
-  or rows (\code{rbind2}). These are (S4) generic functions with default
+  or rows (\code{rbind2}).  These are (S4) generic functions with default
   methods.
 }
 \details{
-  The main use of \code{cbind2} (\code{rbind2}) is to be called by
-  \code{\link{cbind}()}  (\code{rbind()})
-  \bold{if} these are activated.  This allows \code{cbind}
-  (\code{rbind}) to work for formally classed (aka \sQuote{S4})
-  objects by providing S4 methods for these objects.  Currently, a call\cr
-  \code{methods:::bind_activation(TRUE)}\cr
-  is needed to install a
-  \code{cbind2}-calling version of \code{cbind} (into the
-  \pkg{base} namespace) and the same for \code{rbind}.\cr
-  \code{methods:::bind_activation(FALSE)} reverts to the
-  previous internal version of \code{cbind} which does not build on
-  \code{cbind2}, see the examples.
+  The main use of \code{cbind2} (\code{rbind2}) is to be called
+  recursively by \code{\link{cbind}()} (\code{rbind()}) when both of
+  these requirements are met:
+  \itemize{
+    \item{There is at least one argument that is an S4 object,
+      and}
+    \item{S3 dispatch fails (see the Dispatch section under \link{cbind}).}
+  }
+  The methods on \code{cbind2} and \code{rbind2} effectively define the
+  type promotion policy when combining a heterogeneous set of
+  arguments.  The homogeneous case, where all objects derive from some S4
+  class, can be handled via S4 dispatch on the \code{\dots} argument via
+  an externally defined S4 \code{cbind} (\code{rbind}) generic.
+
+  Since (for legacy reasons) S3 dispatch is attempted first, it is
+  generally a good idea to additionally define an S3 method on
+  \code{cbind} (\code{rbind}) for the S4 class.  The S3 method will be
+  invoked when the arguments include objects of the S4 class, along with
+  arguments of classes for which no S3 method exists.  Also, in case there
+  is an argument that selects a different S3 method (like the one for
+  \code{data.frame}), this S3 method serves to introduce an ambiguity in
+  dispatch that triggers the recursive fallback to \code{cbind2}
+  (\code{rbind2}). Otherwise, the other S3 method would be called, which
+  may not be appropriate.
 }
+
 \usage{
 cbind2(x, y, ...)
 rbind2(x, y, ...)
@@ -58,7 +69,11 @@ rbind2(x, y, ...)
 %% The R code is currently in ../R/MethodsListClass.R + ../R/cbind-rbind.R
 \value{
   A matrix (or matrix like object) combining the columns (or rows) of
-  \code{x} and \code{y}.
+  \code{x} and \code{y}.  Note that methods must construct
+  \code{\link{colnames}} and \code{\link{rownames}} from the
+  corresponding column and row names of \code{x} and \code{y} (but not
+  from deparsing argument names such as in \code{\link{cbind}(...,
+    deparse.level = d)} for \eqn{d \ge 1}{d >= 1}).
 }
 \seealso{\code{\link{cbind}}, \code{\link{rbind}};
   further, \code{\link[Matrix]{cBind}}, \code{\link[Matrix]{rBind}} in
@@ -69,6 +84,24 @@ cbind2(1:3, 4)
 m <- matrix(3:8, 2,3, dimnames=list(c("a","b"), LETTERS[1:3]))
 cbind2(1:2, m) # keeps dimnames from m
 
+## rbind() and cbind() now make use of rbind2()/cbind2() methods
+setClass("Num", contains="numeric")
+setMethod("cbind2", c("Num", "missing"),
+          function(x,y, ...) { cat("Num-miss--meth\n"); as.matrix(x)})
+setMethod("cbind2", c("Num","ANY"), function(x,y, ...) {
+    cat("Num-A.--method\n") ; cbind(getDataPart(x), y, ...) })
+setMethod("cbind2", c("ANY","Num"), function(x,y, ...) {
+    cat("A.-Num--method\n") ; cbind(x, getDataPart(y), ...) })
+
+a <- new("Num", 1:3)
+trace("cbind2")
+cbind(a)
+cbind(a, four=4, 7:9)# calling cbind2() twice
+
+cbind(m,a, ch=c("D","E"), a*3)
+cbind(1,a, m) # ok with a warning
+untrace("cbind2")
+\dontshow{%% FIXME -- do deprecate  bind_activation() !
 ### Note: Use the following activation if you want cbind() to work
 ### ----  on S4 objects -- be careful otherwise!
 
@@ -78,17 +111,16 @@ cbind(a=1:3)# no call to cbind2()
 cbind(a=1:3, four=4, 7:9)# calling cbind2() twice
 untrace("cbind2")
 
-\dontshow{
 cbind(m,m+1,m+2)
 cbind(m,a=1, ch=c("D","E"))
 cbind(1,a=1:3, m) # ok with a warning
 cbind(A=1, B=3, m, C=4)
-}
 
 cbind(m, a=1, b=3)
 
 ## turn off the `special cbind()' :
 methods:::bind_activation(FALSE)
+}%dont
 }
 \keyword{array}
 \keyword{manip}
diff --git a/src/library/methods/man/className.Rd b/src/library/methods/man/className.Rd
index d81f1f3..6a110f0 100644
--- a/src/library/methods/man/className.Rd
+++ b/src/library/methods/man/className.Rd
@@ -1,5 +1,5 @@
 % File src/library/methods/man/className.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 2011-2 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/methods/man/classRepresentation-class.Rd b/src/library/methods/man/classRepresentation-class.Rd
index 45d2f70..9d47fd3 100644
--- a/src/library/methods/man/classRepresentation-class.Rd
+++ b/src/library/methods/man/classRepresentation-class.Rd
@@ -1,5 +1,5 @@
 % File src/library/methods/man/classRepresentation-class.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2007 R Core Team
 % Distributed under GPL 2 or later
 
@@ -74,6 +74,6 @@
 \seealso{
   See function \code{\link{setClass}} to supply the information in the
   class definition.
-  See \link{Classes} for a more basic discussion of class information.
+  See \link{Classes_Details} for a more basic discussion of class information.
 }
 \keyword{classes}
diff --git a/src/library/methods/man/dotsMethods.Rd b/src/library/methods/man/dotsMethods.Rd
index 24f4354..95700b4 100644
--- a/src/library/methods/man/dotsMethods.Rd
+++ b/src/library/methods/man/dotsMethods.Rd
@@ -1,6 +1,6 @@
 % File src/library/methods/man/dotsMethods.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2007 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2016 R Core Team
 % Distributed under GPL 2 or later
 
 \name{dotsMethods}
@@ -41,7 +41,7 @@
 
 }
 \section{Method Selection and Dispatch for "..."}{
-  See \link{Methods} for a general discussion.  The following assumes
+  See \link{Methods_Details} for a general discussion.  The following assumes
   you have read the \dQuote{Method Selection and Dispatch} section of
   that documentation.
 
@@ -134,9 +134,9 @@ setClassUnion("Number", c("numeric", "complex"))
 
 setMethod("cc", "Number", function(...) sum(...))
 
-setClass("cdate", contains = "character", representation(date = "Date"))
+setClass("cdate", contains = "character", slots = c(date = "Date"))
 
-setClass("vdate", contains = "vector", representation(date = "Date"))
+setClass("vdate", contains = "vector", slots = c(date = "Date"))
 
 cd1 <- new("cdate", "abcdef", date = Sys.Date())
 
@@ -190,7 +190,7 @@ for(cl in c("Number", "vdate", "cdate")) removeClass(cl)
  Springer (For the original S4 version.)
 }
 \seealso{
-For the general discussion of methods, see  \link{Methods} and links
+For the general discussion of methods, see  \link{Methods_Details} and links
 from there.
 }
 \keyword{programming}
diff --git a/src/library/methods/man/evalSource.Rd b/src/library/methods/man/evalSource.Rd
index b1c9377..c0ca8bd 100644
--- a/src/library/methods/man/evalSource.Rd
+++ b/src/library/methods/man/evalSource.Rd
@@ -1,5 +1,5 @@
 % File src/library/methods/man/evalSource.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 2010-2 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/methods/man/findClass.Rd b/src/library/methods/man/findClass.Rd
index 0adcbc7..be8cf14 100644
--- a/src/library/methods/man/findClass.Rd
+++ b/src/library/methods/man/findClass.Rd
@@ -1,28 +1,34 @@
 % File src/library/methods/man/findClass.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2007 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2015 R Core Team
 % Distributed under GPL 2 or later
 
 \name{findClass}
+\title{Find Class Definitions}
 \alias{removeClass}
 \alias{resetClass}
 \alias{isClass}
 \alias{getClasses}
 \alias{findClass}
 \alias{sealClass}
-\title{Computations with Classes}
 \description{
-  Functions to find and manipulate class definitions.
+  Functions to find classes:  \code{isClass} tests for a class;
+  \code{findClass} returns the name(s) of packages containing the
+  class; \code{getClasses} returns the names of all the classes in an
+  environment, typically a namespace.  To examine the definition of a class, use \code{\link{getClass}}.
 }
 \usage{
-removeClass(Class, where)
-
 isClass(Class, formal=TRUE, where)
 
 getClasses(where, inherits = missing(where))
 
 findClass(Class, where, unique = "")
 
+## The remaining functions are retained for compatibility
+## but not generally recommended
+
+removeClass(Class, where)
+
 resetClass(Class, classDef, where)
 
 sealClass(Class, where)
@@ -33,16 +39,19 @@ sealClass(Class, where)
     usually take a class definition instead of the string.  To restrict
     the class to those defined in a particular package, set the
     \code{\link{packageSlot}} of the character string.}
-  \item{where}{the \code{\link{environment}} in which to modify or
-    remove the definition.  Defaults to the top-level environment of the
-    calling function (the global environment for ordinary computations,
-    but the environment or namespace of a package in the source for a
-    package).
-
-    When searching for class definitions, \code{where} defines where to
-    do the search, and the default is to search from the top-level
-    environment or namespace of the caller to this function.
+  \item{where}{the \code{\link{environment}} in which to search for
+    the class definition.  Defaults to the top-level environment of the
+    calling function.  When called from the command line, this has the
+    effect of using all the package environments in the search list.
+
+    To restrict the search to classes in a particular package, use \code{where =
+      asNamespace(pkg)} with \code{pkg} the package name;  to restrict
+    it to
+    the \emph{exported} classes, use \code{where = "package:pkg"} after the
+    package is attached to the search list.
   }
+  \item{formal}{\code{\link{logical}} is a formal definition
+    required? For S compatibility, and always treated as \code{TRUE}.}
   \item{unique}{if \code{findClass} expects a unique location for the
     class, \code{unique} is a character string explaining the purpose
     of the search (and is used in warning and error messages).  By
@@ -54,88 +63,73 @@ sealClass(Class, where)
     environment only?  Defaults to \code{TRUE} if \code{where} is
     omitted, and to \code{FALSE} otherwise.
   }
-  \item{formal}{ Should a formal definition be required? }
-  \item{classDef}{ For \code{removeClass}, the optional class
-    definition (but usually it's better for \code{Class} to be the
-    class definition, and to omit \code{classDef}).
+  \item{classDef}{ For \code{resetClass}, the optional class
+    definition.
   }
 }
 
-\details{
-  These are the functions that test and manipulate formal class
-  definitions.  Brief documentation is provided below.  See the
-  references for an introduction and for more details.
+\section{Functions}{
 
   \describe{
-    \item{\code{removeClass}:}{
-      Remove the definition of this class, from the environment
-      \code{where} if this argument is supplied; if not,
-      \code{removeClass} will search for a definition, starting in the
-      top-level environment of the call to \code{removeClass}, and
-      remove the (first) definition found.
-    }
     \item{\code{isClass}:}{
-      Is this the name of a formally defined class? (Argument
-      \code{formal} is for compatibility and is ignored.)
+      Is this the name of a formally defined class?
     }
     \item{\code{getClasses}:}{
       The names of all the classes formally defined on \code{where}.  If
       called with no argument, all the classes visible from the
       calling function (if called from the top-level, all the classes
       in any of the environments on the search list).  The
-      \code{inherits} argument can be used to search a particular
-      environment and all its parents, but usually the default setting
-      is what you want.
+      \code{where} argument is used to search only in a particular package.
     }
     \item{\code{findClass}:}{
-      The list of environments or positions on the search list in
+      The list of environments in
       which a class definition of \code{Class} is found.  If
-      \code{where} is supplied, this is an environment (or namespace)
-      from which the search takes place; otherwise the top-level
-      environment of the caller is used.  If \code{unique} is supplied
-      as a character string, \code{findClass} returns a single
-      environment or position.  By default, it always returns a list.
-      The calling function should select, say, the first element as a
-      position or environment for functions such as \code{\link{get}}.
+      \code{where} is supplied, a list is still returned, either empty
+      or containing the environment corresponding to \code{where}.
+      By default when called from the \R session, the global
+      environment and all the currently
+      attached packages are searched.
 
       If \code{unique} is supplied as a character string,
       \code{findClass} will warn if there is more than one definition
       visible (using the string to identify the purpose of the call),
       and will generate an error if no definition can be found.
+
+      \emph{The remaining functions are retained for
+        back-compatibility and internal use, but not generally recommended.}
+    }
+    \item{\code{removeClass}:}{
+      Remove the definition of this class.  This can't be used if the
+      class is in another package, and would rarely be needed in
+      source code defining classes in a package.
     }
     \item{\code{resetClass}:}{
-      Reset the internal definition of a class.  Causes the complete
-      definition of the class to be re-computed, from the
-      representation and superclasses specified in the original
-      call to \code{setClass}.
-
-      This function is called when aspects of the class definition are
-      changed.  You would need to call it explicitly if you changed the
-      definition of a class that this class extends (but doing that in
-      the  middle of a session is living dangerously, since it may
-      invalidate existing objects).
+      Reset the internal definition of a class.  Not legitimate for a
+      class definition not in this package and rarely needed otherwise.
     }
     \item{\code{sealClass}:}{ Seal the current definition of the specified
-      class, to prevent further changes.  It is possible to seal a class
-      in the call to \code{setClass}, but sometimes further changes have
-      to be made (e.g., by calls to \code{setIs}).  If so, call
-      \code{sealClass} after all the relevant changes have been made.
+      class, to prevent further changes, by setting the corresponding
+      slot in the class definition.  This is rarely used, since
+      classes in loaded packages are sealed by locking their namespace.
     }
   }
 }
 
 \references{
+ Chambers, John M. (2016)
+ \emph{Extending R},
+  Chapman & Hall.
+(Chapters 9 and 10.)
+
  Chambers, John M. (2008)
  \emph{Software for Data Analysis: Programming with R}
-  Springer.  (For the R version.)
-
- Chambers, John M. (1998)
- \emph{Programming with Data}
- Springer (For the original S4 version.)
+  Springer. (Chapter 9 has some details not in the later reference.)
 }
+
 \seealso{
-  \code{\link{setClassUnion}},
-  \code{\link{Methods}},
+  \code{\link{getClass}},
+  \code{\link{Classes_Details}},
+  \code{\link{Methods_Details}},
   \code{\link{makeClassRepresentation}}
 }
 %% should add Examples section
diff --git a/src/library/methods/man/findMethods.Rd b/src/library/methods/man/findMethods.Rd
index f3be648..80be069 100644
--- a/src/library/methods/man/findMethods.Rd
+++ b/src/library/methods/man/findMethods.Rd
@@ -1,6 +1,6 @@
 % File src/library/methods/man/findMethods.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 2008 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 2008-2015 R Core Team
 % Distributed under GPL 2 or later
 
 \name{findMethods}
@@ -39,7 +39,7 @@ the objects in the table.
   function \code{f} in the environment or search position \code{where}
   (or for the generic function generally if \code{where} is missing).
 
-  The deprecated function \code{getMethods} is an older alternative to
+  The defunct function \code{getMethods} is an older alternative to
   \code{findMethods} , returning information in the form of an object of
   class \code{MethodsList}, previously used for method dispatch.  It is
   not recommended, since this class of objects is deprecated generally
@@ -53,7 +53,7 @@ findMethodSignatures(..., target = TRUE, methods = )
 
 hasMethods(f, where, package)
 
-### DEPRECATED
+## Deprecated in 2010 and defunct in 2015 for \code{table = FALSE}:
 getMethods(f, where, table = FALSE)
 }
 \arguments{
@@ -167,7 +167,7 @@ Class \code{"\linkS4class{vector}"}, by class \code{"namedList"}, distance 3.
 }
 
 
-\seealso{ \code{\link{showMethods}}, \code{\link{selectMethod}}, \link{Methods} }
+\seealso{ \code{\link{showMethods}}, \code{\link{selectMethod}}, \link{Methods_Details} }
 \examples{
 mm <-  findMethods("Ops")
 findMethodSignatures(methods = mm)
diff --git a/src/library/methods/man/fixPrevious.Rd b/src/library/methods/man/fixPrevious.Rd
index afb314b..0ad80ed 100644
--- a/src/library/methods/man/fixPrevious.Rd
+++ b/src/library/methods/man/fixPrevious.Rd
@@ -1,5 +1,5 @@
 % File src/library/methods/man/fixPrevious.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2007 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/methods/man/genericFunction-class.Rd b/src/library/methods/man/genericFunction-class.Rd
index ab914c2..147fc22 100644
--- a/src/library/methods/man/genericFunction-class.Rd
+++ b/src/library/methods/man/genericFunction-class.Rd
@@ -1,5 +1,5 @@
 % File src/library/methods/man/genericFunction-class.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2007 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/methods/man/getClass.Rd b/src/library/methods/man/getClass.Rd
index 38563fe..02a2183 100644
--- a/src/library/methods/man/getClass.Rd
+++ b/src/library/methods/man/getClass.Rd
@@ -1,6 +1,6 @@
 % File src/library/methods/man/getClass.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2007 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2015 R Core Team
 % Distributed under GPL 2 or later
 
 \name{getClass}
@@ -11,7 +11,7 @@
   Get the definition of a class.
 }
 \usage{
-getClass(Class, .Force = FALSE, where)
+getClass   (Class, .Force = FALSE, where)
 getClassDef(Class, where, package, inherits = TRUE)
 }
 \arguments{
@@ -30,10 +30,9 @@ getClassDef(Class, where, package, inherits = TRUE)
       used, if any.  There will usually be a package attribute if
       \code{Class} comes from \code{class(x)} for some object.
     }
-  \item{inherits}{ Should the class definition be retrieved from any
-      enclosing environment and also from the cache?  If \code{FALSE}
-      only a definition in the environment \code{where} will be returned.
-    }
+  \item{inherits}{logical; should the class definition be retrieved from
+    any enclosing environment and also from the cache?  If \code{FALSE}
+    only a definition in the environment \code{where} will be returned.}
 }
 \details{
   Class definitions are stored in metadata objects in a package
@@ -59,22 +58,20 @@ getClassDef(Class, where, package, inherits = TRUE)
   sensible in user code.
 
   The non-null returned value is an object of class
-  \code{\linkS4class{classRepresentation}}.  For all reasonable
-  purposes, use this object only to extract information, rather than trying
-  to modify it: Use functions such as \code{\link{setClass}} and
-  \code{\link{setIs}} to create or modify class definitions.
+  \code{\linkS4class{classRepresentation}}.
+
+  Use functions such as \code{\link{setClass}} and
+  \code{\link{setClassUnion}} to create class definitions.
 }
 \references{
- Chambers, John M. (2008)
- \emph{Software for Data Analysis: Programming with R}
-  Springer.  (For the R version.)
-
- Chambers, John M. (1998)
- \emph{Programming with Data}
- Springer (For the original S4 version.)
+ Chambers, John M. (2016)
+ \emph{Extending R},
+  Chapman & Hall.
+(Chapters 9 and 10.)
 }
+
 \seealso{
-  \link{Classes},
+  \linkS4class{classRepresentation},
   \code{\link{setClass}},
   \code{\link{isClass}}.
 }
diff --git a/src/library/methods/man/getMethod.Rd b/src/library/methods/man/getMethod.Rd
index 989bc25..dfe5f11 100644
--- a/src/library/methods/man/getMethod.Rd
+++ b/src/library/methods/man/getMethod.Rd
@@ -1,89 +1,140 @@
 % File src/library/methods/man/getMethod.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2012 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2016 R Core Team
 % Distributed under GPL 2 or later
 
 \name{getMethod}
+\title{Get or Test for the Definition of a Method}
 \alias{getMethod}
 \alias{findMethod}
 \alias{existsMethod}
 \alias{selectMethod}
 \alias{hasMethod}
-\title{ Get or Test for the Definition of a Method }
 \description{
-  Functions to look for a method corresponding to a given generic function and signature.
-  The functions \code{getMethod} and \code{selectMethod} return the method; the functions
-  \code{existsMethod} and \code{hasMethod} test for its existence.  In both
-  cases the first function only gets direct definitions and the second
-  uses inheritance.  In all cases, the search is in the generic function itself or in
-  the package/environment specified by argument \code{where}.
-
-  The function \code{findMethod} returns the package(s) in the search
-  list (or in the packages specified by the \code{where} argument) that
-  contain a method for this function and signature.
-}
-\usage{
-getMethod(f, signature=character(), where, optional = FALSE,
-          mlist, fdef)
+  The function \code{selectMethod()} returns the method that
+  would be selected for a call to function \code{f} if the arguments had
+  classes as specified by \code{signature}.  Failing to find a method
+  is an error, unless argument \code{optional = TRUE}, in which case
+  \code{NULL} is returned.
 
-existsMethod(f, signature = character(), where)
+  The function \code{findMethod()} returns a list of
+  environments that contain a method for the specified function and signature; by
+  default, these are a subset of the packages in the current search
+  list.  See section \dQuote{Using \code{findMethod()}} for details.
 
-findMethod(f, signature, where)
+The function \code{getMethod()} returns the method corresponding to the
+function and signature supplied similarly to \code{selectMethod}, but
+without using inheritance or group generics.
 
-selectMethod(f, signature, optional = FALSE, useInherited =,
-             mlist = , fdef = , verbose = , doCache = )
+The functions  \code{hasMethod()}  and
+\code{existsMethod()} test whether \code{selectMethod()} or
+\code{getMethod()}, respectively, finds a matching method.
 
-hasMethod(f, signature=character(), where)
 
 }
-\arguments{
-  \item{f}{A  generic function or the character-string name of one.}
-  \item{signature}{the signature of classes to match to the arguments
-    of \code{f}.  See the details below.
+\usage{
+  selectMethod(f, signature, optional = FALSE, useInherited =,
+             mlist = , fdef = , verbose = , doCache = )
+
+  findMethod(f, signature, where)
 
-  }
-  \item{where}{The position or environment in which to look for the
-    method(s):  by default, the table of methods defined in the generic function itself is used.}
+  getMethod(f, signature = character(), where, optional = FALSE,
+             mlist, fdef)
 
-  \item{optional}{If the selection in \code{selectMethod} does not find a valid method
-    an error is generated, unless this argument is \code{TRUE}.  In that
-    case, the value returned is \code{NULL} if no method matches.}
-  \item{mlist, fdef, useInherited, verbose, doCache}{Optional
-      arguments  to  \code{getMethod} and \code{selectMethod} for
-      internal use.  Avoid
-      these: some will work as expected and others will not, and none of them is required for normal use of the functions.
-    }
+  existsMethod(f, signature = character(), where)
 
+  hasMethod(f, signature = character(), where)
+}
+\arguments{
+  \item{f}{a generic function or the character-string name of one.}
+  \item{signature}{the signature of classes to match to the arguments
+    of \code{f}.  See the details below.}
+  \item{where}{the environment in which to look for the
+    method(s).  By default, if the call comes from the command line, the table of methods defined in the generic
+    function itself is used, except for \code{findMethod} (see the
+    section below).}
+
+  \item{optional}{if the selection in \code{selectMethod} does not find
+    a valid method an error is generated, unless \code{optional} is
+    \code{TRUE},  in which case the value returned is \code{NULL}.}
+
+  \item{mlist, fdef, useInherited, verbose, doCache}{optional arguments
+    to  \code{getMethod} and \code{selectMethod} for internal use.  Avoid
+    these: some will work as expected and others will not, and none of
+    them is required for normal use of the functions.  But see the
+    section \dQuote{Methods for \code{as()}} for nonstandard inheritance.}
+}
+\section{Using \code{findMethod()}}{
+As its name suggests, this function is intended to behave like
+\code{\link{find}}, which produces a list of the packages on the
+current search list which have, and have exported, the object named.
+That's what \code{findMethod} does also, by default.  The
+\dQuote{exported} part in this case means that the package's namespace
+has an \code{exportMethods} directive for this generic function.
+
+An important distinction is that the absence of such a directive does
+not prevent methods from the package from being called once the
+package is loaded.  Otherwise, the code in the package could not use
+un-exported methods.
+
+So, if your question is whether loading package \code{thisPkg} will define a
+method for this function and signature, you need to ask that question
+about the namespace of the package:
+
+\code{findMethod(f, signature, where = asNamespace("thisPkg"))}
+
+If the package did not export the method, attaching it and calling
+\code{findMethod} with no \code{where} argument will not find the
+method.
+
+Notice also that the length of the signature must be what the
+corresponding package used.  If \code{thisPkg} had only methods for
+one argument, only length-1 signatures will match (no trailing
+\code{"ANY"}), even if another currently loaded package had signatures
+with more arguments.
+}
+\section{Methods for \code{as()}}{
+The function \code{\link{setAs}} allows packages to define methods for
+coercing one class of objects to another class.  This works internally
+by defining methods for the generic function \code{\link{coerce}(from,
+to)},
+which can not be called directly.
+
+The \R evaluator selects
+methods for this purpose using a different form of inheritance.  While
+methods can be inherited for the object being coerced, they cannot
+inherit for the target class, since the result would not be a valid
+object from that class.
+If you want to
+examine the selection procedure, you must supply the optional argument
+\code{useInherited = c(TRUE, FALSE)} to \code{selectMethod}.
 }
 \details{
-  The \code{signature} argument specifies classes, corresponding to formal arguments of the generic function; to be precise, to the \code{signature} slot of the generic function object.
-    The argument may be a vector of strings identifying
-    classes, and may be named or not.  Names, if supplied, match the
-    names of those formal arguments included in the signature of the
-    generic.  That signature is normally all the arguments except
-    \dots.  However, generic functions can be specified with only a
-    subset of the arguments permitted, or with the signature taking
-    the arguments in a different order.
-
-    It's a good idea to name the arguments in the signature to avoid
-    confusion, if you're dealing with a generic that does something
-    special with its signature.   In any case, the elements of the
-    signature are matched to the formal signature by the same rules
-    used in matching arguments in function calls (see
-    \code{\link{match.call}}).
-
-    The strings in the signature may be class names, \code{"missing"}
-    or \code{"ANY"}.  See \link{Methods} for the meaning of these in
-    method selection.  Arguments not supplied in the signature
-    implicitly correspond to class \code{"ANY"}; in particular, giving
-    an empty signature means to look for the default method.
+  The \code{signature} argument specifies classes, corresponding to
+  formal arguments of the generic function; to be precise, to the
+  \code{signature} slot of the generic function object.  The argument
+  may be a vector of strings identifying classes, and may be named or
+  not.  Names, if supplied, match the names of those formal arguments
+  included in the signature of the generic.  That signature is normally
+  all the arguments except \dots.  However, generic functions can be
+  specified with only a subset of the arguments permitted, or with the
+  signature taking the arguments in a different order.
+
+  It's a good idea to name the arguments in the signature to avoid
+  confusion, if you're dealing with a generic that does something
+  special with its signature.  In any case, the elements of the
+  signature are matched to the formal signature by the same rules used
+  in matching arguments in function calls (see
+  \code{\link{match.call}}).
+
+  The strings in the signature may be class names, \code{"missing"} or
+  \code{"ANY"}.  See \link{Methods_Details} for the meaning of these in method
+  selection.  Arguments not supplied in the signature implicitly
+  correspond to class \code{"ANY"}; in particular, giving an empty
+  signature means to look for the default method.
 
   A call to \code{getMethod} returns the method for a particular
-  function and signature.  As with other \code{get} functions,
-  argument \code{where} controls where the function looks (by default
-  anywhere in the search list) and argument \code{optional} controls
-  whether the function returns \code{NULL} or generates an error if
-  the method is not found.  The search for the method makes no use of
+  function and signature.   The search for the method makes no use of
   inheritance.
 
   The function \code{selectMethod} also looks for a method given the
@@ -95,6 +146,15 @@ hasMethod(f, signature=character(), where)
   returns \code{NULL} or generates an error if
   the method is not found, depending on the argument \code{optional}.
 
+Both \code{selectMethod} and \code{getMethod} will normally use the
+current version of the generic function in the R session, which has a
+table of the methods obtained from all the packages loaded in the
+session. Optional arguments can cause a search for the generic function from a
+specified environment, but this is rarely a useful idea.  In contrast,
+\code{findMethod} has a different default and the optional
+\code{where=} argument may be needed.  See the  section \dQuote{Using
+  \code{findMethod()}}.
+
   The functions \code{existsMethod} and \code{hasMethod} return
   \code{TRUE} or \code{FALSE} according to whether a method is found,
   the first corresponding to \code{getMethod} (no inheritance) and the
@@ -111,43 +171,52 @@ hasMethod(f, signature=character(), where)
 
 The returned method object is a
   \code{\linkS4class{MethodDefinition}} object, \emph{except} that the default method for a primitive function is required to be the primitive itself.
-Note therefore that the only reliable test that the search failed is \code{is.null()}.
+Note therefore that the only reliable test that the search failed is
+\code{is.null()}.
+
+The returned value of \code{findMethod} is a list of
+environments in which a corresponding method was found; that is, a
+table of methods including the one specified.
 
 }
 \references{
+ Chambers, John M. (2016)
+ \emph{Extending R},
+  Chapman & Hall.
+(Chapters 9 and 10.)
+
  Chambers, John M. (2008)
  \emph{Software for Data Analysis: Programming with R}
-  Springer.  (For the R version.)
-
- Chambers, John M. (1998)
- \emph{Programming with Data}
- Springer (For the original S4 version.)
+  Springer. (Section 10.6 for some details of method selection.)
 }
-\seealso{\code{\link{Methods}} for the details of method
+\seealso{\code{\link{Methods_Details}} for the details of method
   selection; \code{\link{GenericFunctions}} for other functions
   manipulating methods and generic function objects;
   \code{\linkS4class{MethodDefinition}} for the class that represents
   method definitions.}
 \examples{
-setGeneric("testFun", function(x)standardGeneric("testFun"))
+testFun <-  function(x)x
+setGeneric("testFun")
 setMethod("testFun", "numeric", function(x)x+1)
-hasMethod("testFun", "numeric")
-\dontrun{[1] TRUE}
-hasMethod("testFun", "integer") #inherited
-\dontrun{[1] TRUE}
-existsMethod("testFun", "integer")
-\dontrun{[1] FALSE}
-hasMethod("testFun") # default method
-\dontrun{[1] FALSE}
+
+hasMethod("testFun", "numeric") # TRUE
+
+hasMethod("testFun", "integer") #TRUE, inherited
+
+existsMethod("testFun", "integer") #FALSE
+
+hasMethod("testFun") # TRUE, default method
+
 hasMethod("testFun", "ANY")
-\dontrun{[1] FALSE}
+
 \dontshow{
+## Verify the example
 stopifnot(isGeneric("testFun"),
           hasMethod("testFun", "numeric"),
           hasMethod("testFun", "integer"),
           !existsMethod("testFun", "integer"),
-          !hasMethod("testFun"),
-          !hasMethod("testFun", "ANY") )
+          hasMethod("testFun"),
+          hasMethod("testFun", "ANY") )
 removeGeneric("testFun")
 }
 }
diff --git a/src/library/methods/man/getPackageName.Rd b/src/library/methods/man/getPackageName.Rd
index bc7b20b..1e8c3d3 100644
--- a/src/library/methods/man/getPackageName.Rd
+++ b/src/library/methods/man/getPackageName.Rd
@@ -1,5 +1,5 @@
 % File src/library/methods/man/getPackageName.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2013 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/methods/man/hasArg.Rd b/src/library/methods/man/hasArg.Rd
index abec9b2..bf32b30 100644
--- a/src/library/methods/man/hasArg.Rd
+++ b/src/library/methods/man/hasArg.Rd
@@ -1,5 +1,5 @@
 % File src/library/methods/man/hasArg.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2013 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/methods/man/implicitGeneric.Rd b/src/library/methods/man/implicitGeneric.Rd
index 03babd9..6acbb4c 100644
--- a/src/library/methods/man/implicitGeneric.Rd
+++ b/src/library/methods/man/implicitGeneric.Rd
@@ -1,5 +1,5 @@
 % File src/library/methods/man/implicitGeneric.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2007 R Core Team
 % Distributed under GPL 2 or later
 
@@ -11,9 +11,20 @@
 \alias{implicit generic}
 \title{Manage Implicit Versions of Generic Functions}
 \description{
-  Create or access implicit generic functions, used to enforce
-  consistent generic versions of functions that are not currently
-  generic.  Function \code{implicitGeneric()} returns the implicit
+  The implicit generic mechanism stores generic versions of
+  functions
+  in a table in a package. The package does not want the current
+  version of the function to be a generic, however, and retains the
+  non-generic version.
+
+  When a call to \code{\link{setMethod}} or
+  \code{\link{setGeneric}} creates a generic version for one of these
+  functions, the object in the table is used.
+  This mechanism is only needed if special arguments were used to
+  create the generic; e.g., the \code{signature} or the \code{valueClass}
+  options.
+
+    Function \code{implicitGeneric()} returns the implicit
   generic version, \code{setGenericImplicit()} turns a generic implicit,
   \code{prohibitGeneric()} prevents your function from being made
   generic, and \code{registerImplicitGenerics()} saves a set of implicit
@@ -30,74 +41,69 @@ registerImplicitGenerics(what, where)
   \item{name}{ Character string name of the function.}
   \item{where}{ Package or environment in which to register the implicit
     generics.  When using the functions from the top level of your own
-    package source, this argument can usually be omitted (and should
-    be).}
-  \item{generic}{ Optionally, the generic function definition to be
-    cached, but usually omitted.   See Details section.}
+    package source, this argument should be omitted.}
+  \item{generic}{ Obsolete, and likely to be deprecated.}
   \item{restore}{Should the non-generic version of the function be
-    restored after the current.}
-  \item{what}{For \code{registerImplicitGenerics()}, Optional table of
-    the implicit generics to register, but nearly always omitted.   See
-    Details section.}
+    restored?.}
+  \item{what}{Optional table of
+    the implicit generics to register, but nearly always omitted, when
+    it defaults to a standard metadata name.}
 }
 \details{
-  Multiple packages may define methods for the same function, using the
-  version of a function stored in one package.  All these methods should
-  be marshaled and dispatched consistently when a user calls the
-  function.  For consistency, the generic version of the function must
-  have a unique definition (the same arguments allowed in methods
-  signatures, the same values for optional slots such as the value
-  class, and the same standard or non-standard definition of the
-  function itself).
-
-  If the original function is already an S4 generic, there is no
-  problem.  The implicit generic mechanism enforces consistency when the
-  version in the package owning the function is \emph{not} generic.  If
-  a call to \code{\link{setGeneric}()} attempts to turn a function in
-  another package into a generic, the mechanism compares the proposed
-  new generic function to the implicit generic version of that
-  function. If the two agree, all is well. If not, and if the function
-  belongs to another package, then the new generic will not be
-  associated with that package.  Instead, a warning is issued and a
-  separate generic function is created, with its package slot set to the
-  current package, not the one that owns the non-generic version of the
-  function. The effect is that the new package can still define methods
-  for this function, but it will not share the methods in other
-  packages, since it is forcing a different definition of the generic
-  function.
-
-  The right way to proceed in nearly all cases is to call
-  \code{\link{setGeneric}("foo")}, giving \emph{only} the name of the
-  function; this will automatically use the implicit generic version.
-  If you don't like that version, the best solution is to convince the
-  owner of the other package to agree with you and to insert code to
-  define the non-default properties of the function (even if the owner
-  does not want \code{foo()} to be a generic by default).
-
-  For any function, the implicit generic form is a standard generic in
-  which all formal arguments, except for \code{\dots}, are allowed in
-  the signature of methods. If that is the suitable generic for a
-  function, no action is needed. If not, the best mechanism is to set up
-  the generic in the code of the package owning the function, and to
-  then call \code{setGenericImplicit()} to record the implicit generic
-  and restore the non-generic version.  See the example.
-
-  Note that the package can define methods for the implicit generic as
+
+  Multiple packages may define methods for the same function, to apply
+  to classes defined in that package.  Arithmetic and other operators,
+  \code{plot()} and many other basic computations are typical
+  examples. It's essential that all such packages write methods for
+  the \emph{same} definition of the generic function.  So long as that
+  generic uses the default choice for signature and other parameters,
+  nothing needs to be done.
+
+  If the generic has special properties, these need to be ensured for
+  all packages creating methods for it.  The simplest solution is just
+  to make the function generic in the package that originally owned
+  it.  If for some reason the owner(s) of that package are unwilling
+  to do this, the alternative is to define the correct generic,
+  save it in a special table and restore the non-generic version by
+  calling \code{setGenericImplicit}.
+  
+
+  Note that the package containing the function can define methods for the implicit generic as
   well; when the implicit generic is made a real generic, those methods
   will be included.
 
-  Other than predefining  methods, the usual reason for having a
+  The usual reason for having a
   non-default implicit generic is to provide a non-default signature,
   and the usual reason for \emph{that} is to allow lazy evaluation of
-  some arguments.  See the example.  All arguments in the signature of a
+  some arguments.  All arguments in the signature of a
   generic function must be evaluated at the time the function needs to
-  select a method.  (But those arguments can be missing, with or without
-  a default expression being defined; you can always examine
-  \code{missing(x)} even for arguments in the signature.)
+  select a method.
+  In the base function \code{with()} in the example below, evaluation of the argument
+  \code{expr} must be delayed; therefore, it is excluded from the signature.
 
   If you want to completely prohibit anyone from turning your function
   into a generic, call \code{prohibitGeneric()}.
+
+  Function \code{implicitGeneric()} returns the implicit generic
+  version of the named function.  If there is no table of these or if
+  this function is not in the table, the result of a simple call
+  \code{setGeneric(name)} is returned.
 }
+
+\section{Implicit Generics for Base Functions}{
+Implicit generic versions exist for some functions in the packages
+supplied in the distribution of \R itself.  These are stored in the
+\sQuote{methods} package itself and will always be available.
+
+As emphasized repeatedly in the documentation,
+\code{\link{setGeneric}()} calls for a function in  another package
+should never have non-default settings for arguments such as
+\code{signature}.
+The reasoning applies specially to functions in supplied packages,
+since methods for these are likely to exist in multiple packages.
+A call to \code{implicitGeneric()} will show the generic version.
+}
+
 \value{
   Function \code{implicitGeneric()} returns the implicit generic
   definition (and caches that definition the first time if it has to
@@ -106,28 +112,28 @@ registerImplicitGenerics(what, where)
   The other functions exist for their side effect and return nothing
   useful.
 }
+
 \seealso{\code{\link{setGeneric}}}
 \examples{
 
-### How we would make the function \link{with}() into a generic:
+### How we would make the function with() into a generic:
 
 ## Since the second argument, 'expr' is used literally, we want
 ## with() to only have "data" in the signature.
 
-## Note that 'methods'-internal code now has already extended  with()
-## to do the equivalent of the following
 \dontrun{
 setGeneric("with", signature = "data")
 ## Now we could predefine methods for "with" if we wanted to.
 
-## When ready, we store the generic as implicit, and restore the original
-setGenericImplicit("with")
+## When ready, we store the generic as implicit, and restore the
+original
 
-## (This example would only work if we "owned" function with(),
-##  but it is in base.)}
+setGenericImplicit("with")
+}
 
 implicitGeneric("with")
-}
 
+# (This implicit generic is stored in the 'methods' package.)
+}
 \keyword{programming}
 \keyword{methods}
diff --git a/src/library/methods/man/inheritedSlotNames.Rd b/src/library/methods/man/inheritedSlotNames.Rd
index 2b7d8d0..cec09d1 100644
--- a/src/library/methods/man/inheritedSlotNames.Rd
+++ b/src/library/methods/man/inheritedSlotNames.Rd
@@ -1,6 +1,6 @@
 % File src/library/methods/man/inheritedSlotNames.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 2009-12 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 2009-2014 R Core Team
 % Distributed under GPL 2 or later
 
 \name{inheritedSlotNames}
@@ -34,8 +34,6 @@ inheritedSlotNames(Class, where = topenv(parent.frame()))
 library(stats4)
 inheritedSlotNames("mle")
 
-%% this is not run currently, as it makes later examples fail:
-\dontrun{
 if(require("Matrix")) {
   print( inheritedSlotNames("Matrix") ) # NULL
   ## whereas
@@ -46,6 +44,7 @@ if(require("Matrix")) {
 
   print( inheritedSlotNames(cl) ) # *all* six slots are inherited
 }
+\dontrun{
 % currently, don't do this when running all examples: classes remain
 % cached anyway :
 ## detach package we've attached above:
diff --git a/src/library/methods/man/initialize-methods.Rd b/src/library/methods/man/initialize-methods.Rd
index 1484de7..0d8a200 100644
--- a/src/library/methods/man/initialize-methods.Rd
+++ b/src/library/methods/man/initialize-methods.Rd
@@ -1,5 +1,5 @@
 % File src/library/methods/man/initialize-methods.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2007 R Core Team
 % Distributed under GPL 2 or later
 
@@ -73,7 +73,7 @@
       This is a method for internal use only.
       It takes an optional \code{functionDef} argument to provide a
       generic function with a \code{signature} slot to define the
-      argument names.  See \link{Methods} for details.
+      argument names.  See \link{Methods_Details} for details.
     }
   }
 }
diff --git a/src/library/methods/man/is.Rd b/src/library/methods/man/is.Rd
index 4cd5d7b..edee9b6 100644
--- a/src/library/methods/man/is.Rd
+++ b/src/library/methods/man/is.Rd
@@ -1,69 +1,21 @@
 % File src/library/methods/man/is.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2009 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2016 R Core Team
 % Distributed under GPL 2 or later
 
 \name{is}
 \alias{is}
 \alias{extends}
-\alias{setIs}
 \title{Is an Object from a Class?}
 \description{
   Functions to test inheritance relationships between an object and a
-  class (\code{is}) or between two classes (\code{extends}), and to
-  establish such relationships (\code{setIs}, an explicit alternative
-  to the \code{contains=} argument to \code{\link{setClass}}).
+  class or between two classes (\code{extends}).
 }
-\section{Summary of Functions}{
-  \describe{
-    \item{\code{is}:}{
-      With two arguments, tests whether \code{object} can be treated as from
-      \code{class2}.
 
-      With one argument, returns all the super-classes of this object's class.
-    }
-    \item{\code{extends}:}{
-      Does the first class extend the second class?
-      The call returns \code{maybe} if the extension includes a test.
-
-      When called with one argument, the value is a vector of the
-      superclasses of \code{class1}.  If argument \code{fullInfo}  is
-      \code{TRUE}, the call returns a named list of objects of class
-      \code{\linkS4class{SClassExtension}}; otherwise, just the names of
-      the superclasses.
-    }
-    \item{\code{setIs}:}{
-      Defines \code{class1} to be an extension (subclass) of
-      \code{class2}.
-      If \code{class2} is an existing virtual class, such as a class
-      union, then only the two classes need to be supplied in the
-      call, if the implied inherited methods work for \code{class1}.
-      See the details section below.
-
-      Alternatively, arguments \code{coerce} and \code{replace} should
-      be supplied, defining methods to coerce to the superclass and to
-      replace the part corresponding to the superclass. As discussed in
-      the details and other sections below, this form is often less
-      recommended than the corresponding call to \code{\link{setAs}}, to
-      which it is an alternative.
-
-      Argument \code{test} allows conditional inheritance, in which
-      the \code{is()} result is tested for each object rather than
-      being determined by the class definition.  This form is
-      discouraged when it can be avoided; in particular, note that
-      conditional inheritance is \emph{not} used to select methods for
-      dispatch.
-    }
-  }
-}
 \usage{
 is(object, class2)
 
 extends(class1, class2, maybe = TRUE, fullInfo = FALSE)
-
-setIs(class1, class2, test=NULL, coerce=NULL, replace=NULL,
-      by = character(), where = topenv(parent.frame()), classDef =,
-      extensionObject = NULL, doComplete = TRUE)
 }
 \arguments{
   \item{object}{any \R object.}
@@ -72,323 +24,105 @@ setIs(class1, class2, test=NULL, coerce=NULL, replace=NULL,
     examined defined, or (more efficiently) the class definition
     objects for the classes.}
 
-  \item{maybe, fullInfo}{
-    In a call to \code{extends}, \code{maybe} is the value returned if
-    a relation is conditional. In a call with \code{class2} missing,
+  \item{fullInfo}{
+    In a call to \code{extends}, with \code{class2} missing,
     \code{fullInfo} is a flag, which if \code{TRUE} causes a list of
-    objects of class \code{classExtension} to be returned, rather than
-    just the names of the classes.}
-
-  \item{coerce, replace}{
-    In a call to \code{setIs}, functions optionally supplied to coerce the object to
-    \code{class2}, and to alter the object so that \code{is(object, class2)}
-    is identical to \code{value}.  See the details section below.}
-
-  \item{test}{
-    In a call to \code{setIs}, a \emph{conditional} relationship is
-    defined by supplying this function.  Conditional relations are
-    discouraged and are not included in selecting methods.  See the details section below.
-
-  The remaining arguments are for internal use and/or usually omitted.}
-
-  \item{extensionObject}{ alternative to the \code{test, coerce,
-    replace, by} arguments; an object from class
-    \code{SClassExtension} describing the relation.  (Used in internal calls.)}
-
-  \item{doComplete}{when \code{TRUE}, the class definitions will be
-    augmented with indirect relations as well.  (Used in internal calls.)}
-  \item{by}{
-    In a call to \code{setIs}, the name of an intermediary class.
-    Coercion will proceed by first coercing to this class and from there
-    to the target class.  (The intermediate coercions have to be valid.)}
-  \item{where}{
-    In a call to \code{setIs}, where to store the metadata defining the
-    relationship.  Default is the global environment for calls from the
-    top level of the session or a source file evaluated there.  When the
-    call occurs in the top level of a file in the source of a package,
-    the default will be the namespace or environment of the package.
-    Other uses are tricky and not usually a good idea, unless you really
-    know what you are doing.}
-  \item{classDef}{
-    Optional class definition for \code{class} , required internally
-    when \code{setIs} is called during the initial definition of the
-    class by a call to \code{\link{setClass}}. \emph{Don't} use this
-    argument, unless you really know why you're doing so.}
-}
+    objects of class \code{\linkS4class{SClassExtension}} to be returned, rather than
+    just the names of the classes.  Only the distance slot is likely to
+    be useful in practice; see the \sQuote{Selecting Superclasses} section;
 
-\section{Details}{
-  Arranging for a class to inherit from another class is a key tool in
-  programming.  In \R, there are three basic techniques, the first two
-  providing what is called  \dQuote{simple} inheritance, the preferred form:
-  %%
-  \enumerate{
-  \item
-    By the \code{contains=} argument in a call to \code{\link{setClass}}.  This
-      is and should be the most common mechanism.  It arranges that the new
-      class contains all the structure of the existing class, and in
-      particular all the slots with the same class specified.  The
-      resulting class extension is defined to be \code{simple}, with
-      important implications for method definition (see the section on
-      this topic below).
-
-  \item
-     Making \code{class1} a subclass of a virtual class
-      either by a call to \code{\link{setClassUnion}} to make the
-      subclass a member of a new class union, or by a call to
-      \code{setIs} to add a class to an existing class union or as a new
-      subclass of an existing virtual class.  In either case, the
-      implication should be that methods defined for the class union or
-      other superclass all work correctly for the subclass.  This may
-      depend on some similarity in the structure of the subclasses or
-      simply indicate that the superclass methods are defined in terms
-      of generic functions that apply to all the subclasses.  These
-      relationships are also generally simple.
-
-
-  \item
-    Supplying \code{coerce}  and \code{replace} arguments to \code{setAs}.
-      \R allows arbitrary inheritance relationships, using the same
-      mechanism for defining coerce methods by a call to
-      \code{\link{setAs}}.  The difference between the  two is simply
-      that \code{\link{setAs}} will require a call to \code{\link{as}}
-      for a conversion to take place, whereas after the call to
-      \code{\link{setIs}}, objects will be automatically converted to
-      the superclass.
-
-      The automatic feature is the dangerous part, mainly because it
-      results in the subclass potentially inheriting methods that do
-      not work.  See the section on inheritance below.  If the two
-      classes involved do not actually inherit a large collection of
-      methods, as in the first example below, the danger may be
-      relatively slight.
-
-      If the superclass inherits methods where the subclass has only a
-      default or remotely inherited method, problems are more likely.
-      In this case, a general
-      recommendation is to use the \code{\link{setAs}} mechanism
-      instead, unless there is a strong counter reason. Otherwise, be prepared to
-      override some of  the methods inherited.
   }
-
-  With this caution given, the rest of this section describes what
-  happens when \code{coerce=} and \code{replace=} arguments are supplied
-  to \code{setIs}.
-
-  The \code{coerce} and \code{replace} arguments are functions that
-  define how to coerce a \code{class1} object to \code{class2}, and
-  how to replace the part of the subclass object that corresponds to
-  \code{class2}.  The first of these is a function of one argument
-  which should be \code{from}, and the second of two arguments
-  (\code{from}, \code{value}).  For details, see the section on coerce
-  functions below .
-
-  When \code{by} is specified, the coerce process first coerces to
-  this class and then to \code{class2}.  It's unlikely you
-  would use the \code{by} argument directly, but it is used in defining
-  cached information about classes.
-
-  The value returned (invisibly) by
-  \code{setIs} is the revised class definition of \code{class1}.
+  \item{maybe}{
+    What to return for conditional inheritance.  But such
+    relationships are rarely used and not recommended, so this
+    argument should not be needed.
+  }
 }
 
-\section{Coerce, replace, and test functions}{
-
-  The  \code{coerce} argument is a function that turns a
-  \code{class1} object into a \code{class2} object.  The
-  \code{replace} argument is a function of two arguments that modifies a \code{class1}
-  object (the first argument) to replace the part of it that
-  corresponds to \code{class2} (supplied as \code{value}, the second
-  argument).  It then returns the modified object as the value of the
-  call.  In other words, it acts as a replacement method to
-  implement the expression \code{as(object, class2) <- value}.
-
-  The easiest way to think of the  \code{coerce} and \code{replace}
-  functions is by thinking of the case that  \code{class1}
-  contains \code{class2} in the usual sense, by including the slots of
-  the second class.  (To repeat, in this situation you would not call
-  \code{setIs}, but the analogy shows what happens when you do.)
-
-  The \code{coerce} function in this case would just make a
-  \code{class2} object by extracting the corresponding slots from the
-  \code{class1} object. The \code{replace} function would replace in
-  the \code{class1} object the slots corresponding to \code{class2},
-  and return the modified object as its value.
-
-  For additional discussion of these functions, see
-  the documentation of the
-   \code{\link{setAs}} function.  (Unfortunately, argument
-   \code{def} to that function corresponds to argument \code{coerce} here.)
-
-  The inheritance relationship can also be conditional, if a function is supplied as the
-  \code{test} argument.  This should be a function of one argument
-  that returns \code{TRUE} or \code{FALSE} according to whether the
-  object supplied satisfies the relation \code{is(object, class2)}.
-  Conditional relations between
-  classes are discouraged in general because they require a per-object
-  calculation to determine their validity. They cannot be applied
-  as efficiently as ordinary relations and tend to make the code that
-  uses them harder to interpret.  \emph{NOTE:  conditional inheritance
-    is not used to dispatch methods.}  Methods for conditional
-  superclasses will not be inherited.  Instead, a method for the
-  subclass should be defined that tests the conditional relationship.
+\section{Selecting Superclasses}{
+
+  A call to  \code{\link{selectSuperClasses}(cl)} returns a list of
+  superclasses, similarly to
+  \code{extends(cl)}.  Additional arguments restrict the class names
+  returned to direct superclasses and/or to non-virtual classes.
+
+  Either way, programming with the result, particularly using
+  \code{\link{sapply}}, can be useful.
+
+  To find superclasses with more generally defined properties, one can program
+  with the result returned by \code{extends} when called with one
+  class as argument.
+  By default, the call returns a character vector including the name of the class
+  itself and of all its superclasses.
+  Alternatively,
+  if \code{extends} is called with \code{fullInfo =
+    TRUE}, the return value is a named list, its names being the previous
+  character vector.  The elements of the list corresponding to
+  superclasses are objects of class
+  \code{\linkS4class{SClassExtension}}. Of the information in these objects, one piece can be useful:
+  the number of generations between the classes, given by the
+  \code{"distance"} slot.
+
+  Programming with the result of the call to \code{extends}, particularly using
+  \code{\link{sapply}}, can select superclasses.
+  The programming technique is to define a test function that returns
+  \code{TRUE} for superclasses or relationships obeying some
+  requirement. For example, to find only next-to-direct superclasses,
+  use this function with the list of extension objects:
+
+  \code{function(what) is(what, "SClassExtension") && what at distance == 2}
+
+  or, to find only superclasses from \code{"myPkg"}, use this function
+  with the simple vector of names:
+
+  \code{function(what) getClassDef(what)@package == "myPkg"}
+
+  Giving such functions as an argument to \code{\link{sapply}} called on the output of
+  \code{extends} allows you to find
+  superclasses with desired properties.  See the examples below.
+
+  Note that the function using extension objects must test the class of its argument since,
+  unfortunately for this purpose, the list returned by \code{extends} includes
+  \code{class1} itself, as the object \code{TRUE}.
 }
-\section{Inherited methods}{
-  A method written for a particular signature (classes matched to one
-  or more formal arguments to the function) naturally assumes that the
-  objects corresponding to the arguments can be treated as coming from
-  the corresponding classes.  The objects will have all the slots and
-  available methods for the classes.
-
-  The code that selects and dispatches the methods ensures that this
-  assumption is correct.  If the inheritance was \dQuote{simple}, that
-  is, defined by one or more uses of the \code{contains=} argument in
-  a call to \code{\link{setClass}}, no extra work is generally
-  needed.  Classes are inherited from the superclass, with the same
-  definition.
-
-  When inheritance is defined by a general call to
-  \code{setIs}, extra computations are required.  This form of
-  inheritance implies that the subclass does \emph{not} just contain
-  the slots of the superclass, but instead requires the explicit call
-  to the coerce and/or replace method.  To ensure correct computation,
-  the inherited method is supplemented by calls to \code{\link{as}}
-  before the body of the method is evaluated.
-
-  The calls to \code{\link{as}} generated in this case have the
-  argument \code{strict = FALSE}, meaning that extra information can
-  be left in the converted object, so long as it has all the
-  appropriate slots.  (It's this option that allows simple subclass
-  objects to be used without any change.)  When you are writing your
-  coerce method, you may want to take advantage of that option.
 
-  Methods inherited through non-simple extensions can result in ambiguities
-  or unexpected selections.  If \code{class2} is a specialized class
-  with just a few applicable methods, creating the inheritance
-  relation may have little effect on the behavior of \code{class1}.
-  But if \code{class2} is a class with many methods, you may
-  find that you now inherit some undesirable methods for
-  \code{class1}, in some cases, fail to inherit expected methods.
-  In the second example below, the non-simple inheritance from class
-  \code{"factor"} might be assumed to inherit S3 methods via that
-  class.  But the S3 class is ambiguous, and in fact is
-  \code{"character"} rather than \code{"factor"}.
 
-  For some generic functions, methods inherited by non-simple
-  extensions are either known to be invalid or sufficiently likely to
-  be so that the generic function has been defined to exclude such
-  inheritance.  For example \code{\link{initialize}} methods must
-  return an object of the target class; this is straightforward if the
-  extension is simple, because no change is made to the argument
-  object, but is essentially impossible.  For this reason, the generic
-  function insists on only simple extensions for inheritance.  See the
-  \code{simpleInheritanceOnly} argument to \code{\link{setGeneric}}
-  for the mechanism.  You can use this mechanism when defining new
-  generic functions.
-
-  If you get into problems with functions that do allow non-simple
-  inheritance, there are two basic choices.  Either
-  back off from the \code{setIs} call and settle for explicit coercing
-  defined by a call to \code{\link{setAs}}; or, define explicit
-  methods involving \code{class1} to override the bad inherited
-  methods.  The first choice is the safer, when there are serious
-  problems.
-
-}
 \seealso{
-  \code{\link{inherits}} is nearly always equivalent to
-  \code{is}, both for S4 and non-S4 objects, and is somewhat faster.
-  The non-equivalence applies to classes that have conditional
-  superclasses, with a non-trivial \code{test=} in the relation (not
-  common and discouraged):  for these, \code{is} tests for the
-  relation but \code{inherits} by definition ignores conditional
-  inheritance for S4 objects.
+  Although \code{\link{inherits}} is defined for S3 classes, it has
+  been modified so that the result returned is nearly always equivalent to
+  \code{is}, both for S4 and non-S4 objects. Since it is implemented
+  in C, it is somewhat faster.
+  The only non-equivalences arise from use of \code{\link{setIs}},
+  which should rarely be encountered.
 
 
-  \code{\link{selectSuperClasses}(cl)} has similar semantics as
-  \code{extends(cl)}, typically returning subsets of the latter.
-}
-\references{
- Chambers, John M. (2008)
- \emph{Software for Data Analysis: Programming with R}
-  Springer.  (For the R version.)
+ }
 
- Chambers, John M. (1998)
- \emph{Programming with Data}
- Springer (For the original S4 version.)
-}
-\examples{
-\dontshow{
-## A simple class with two slots
-setClass("track",
-         representation(x="numeric", y="numeric"))
-## A class extending the previous, adding one more slot
-}
-## Two examples of setIs() with coerce= and replace= arguments
-## The first one works fairly well, because neither class has many
-## inherited methods do be disturbed by the new inheritance
-
-## The second example does NOT work well, because the new superclass,
-## "factor", causes methods to be inherited that should not be.
-
-## First example:
-## a class definition (see \link{setClass} for class "track")
-setClass("trackCurve", contains = "track",
-         representation( smooth = "numeric"))
-## A class similar to "trackCurve", but with different structure
-## allowing matrices for the "y" and "smooth" slots
-setClass("trackMultiCurve",
-         representation(x="numeric", y="matrix", smooth="matrix"),
-         prototype = structure(list(), x=numeric(), y=matrix(0,0,0),
-
-                               smooth= matrix(0,0,0)))
-## Automatically convert an object from class "trackCurve" into
-## "trackMultiCurve", by making the y, smooth slots into 1-column matrices
-setIs("trackCurve",
-      "trackMultiCurve",
-      coerce = function(obj) {
-        new("trackMultiCurve",
-            x = obj at x,
-            y = as.matrix(obj at y),
-            smooth = as.matrix(obj at smooth))
-      },
-      replace = function(obj, value) {
-        obj at y <- as.matrix(value at y)
-        obj at x <- value at x
-        obj at smooth <- as.matrix(value at smooth)
-        obj})
-
-
-\dontshow{
-removeClass("trackMultiCurve")
-removeClass("trackCurve")
-removeClass("track")
+\references{
+ Chambers, John M. (2016)
+ \emph{Extending R},
+  Chapman & Hall.
+(Chapters 9 and 10.)
 }
 
-## Second Example:
-## A class that adds a slot to "character"
-setClass("stringsDated", contains = "character",
-         representation(stamp="POSIXt"))
+\examples{
+\dontrun{
+## this example can be run if package XRPython from CRAN is installed.
+supers <- extends("PythonInterface")
+## find all the superclasses from package XR
+fromXR <- sapply(supers,
+    function(what) getClassDef(what)@package == "XR")
+## print them
+supers[fromXR]
+
+## find all the superclasses at distance 2
+superRelations <- extends("PythonInterface", fullInfo = TRUE)
+dist2 <- sapply(superRelations,
+    function(what) is(what, "SClassExtension") && what at distance == 2)
+## print them
+names(superRelations)[dist2]
 
-## Convert automatically to a factor by explicit coerce
-setIs("stringsDated", "factor",
-      coerce = function(from) factor(from at .Data),
-      replace= function(from, value) {
-                  from at .Data <- as.character(value); from })
-\dontshow{
-set.seed(750)
 }
-ll <- sample(letters, 10, replace = TRUE)
-ld <- new("stringsDated", ll, stamp = Sys.time())
-
-levels(as(ld, "factor"))
-levels(ld) # will be NULL--see comment in section on inheritance above.
-
-## In contrast, a class that simply extends "factor"
-## has no such ambiguities
-setClass("factorDated", contains = "factor",
-         representation(stamp="POSIXt"))
-fd <- new("factorDated", factor(ll), stamp = Sys.time())
-identical(levels(fd), levels(as(fd, "factor")))
 }
 \keyword{programming}
 \keyword{classes}
diff --git a/src/library/methods/man/isSealedMethod.Rd b/src/library/methods/man/isSealedMethod.Rd
index 637add2..a2ece97 100644
--- a/src/library/methods/man/isSealedMethod.Rd
+++ b/src/library/methods/man/isSealedMethod.Rd
@@ -1,6 +1,6 @@
 % File src/library/methods/man/isSealedMethod.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2007 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2016 R Core Team
 % Distributed under GPL 2 or later
 
 \name{isSealedMethod}
@@ -65,8 +65,7 @@ isSealedClass(Class, where)
 isSealedMethod("+", c("numeric", "character"))
 isSealedClass("matrix")
 
-setClass("track",
-            representation(x="numeric", y="numeric"))
+setClass("track", slots = c(x="numeric", y="numeric"))
 ## but this is FALSE
 isSealedClass("track")
 ## and so is this
diff --git a/src/library/methods/man/languageEl.Rd b/src/library/methods/man/languageEl.Rd
index 61868fe..f98e54c 100644
--- a/src/library/methods/man/languageEl.Rd
+++ b/src/library/methods/man/languageEl.Rd
@@ -1,5 +1,5 @@
 % File src/library/methods/man/languageEl.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2007 R Core Team
 % Distributed under GPL 2 or later
 
@@ -15,7 +15,6 @@
 languageEl(object, which)
 
 isGrammarSymbol(symbol)
-
 }
 \section{Summary of Functions}{
   \describe{
diff --git a/src/library/methods/man/localRefClass.Rd b/src/library/methods/man/localRefClass.Rd
index 6c81ea6..2cb8aa8 100644
--- a/src/library/methods/man/localRefClass.Rd
+++ b/src/library/methods/man/localRefClass.Rd
@@ -1,5 +1,5 @@
 % File src/library/methods/man/refClass.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 2010-2013 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/methods/man/method.skeleton.Rd b/src/library/methods/man/method.skeleton.Rd
index 4950de6..0f273e0 100644
--- a/src/library/methods/man/method.skeleton.Rd
+++ b/src/library/methods/man/method.skeleton.Rd
@@ -1,6 +1,6 @@
 % File src/library/methods/man/method.skeleton.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2007 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2016 R Core Team
 % Distributed under GPL 2 or later
 
 \name{method.skeleton}
@@ -46,7 +46,7 @@ method.skeleton(generic, signature, file, external = FALSE, where)
 }
 \examples{
 \dontshow{oWD <- setwd(tempdir())}
-setClass("track", representation(x ="numeric", y="numeric"))
+setClass("track", slots = c(x ="numeric", y="numeric"))
 method.skeleton("show", "track")            ## writes show_track.R
 method.skeleton("Ops", c("track", "track")) ## writes "Ops_track_track.R"
 
diff --git a/src/library/methods/man/methodUtilities.Rd b/src/library/methods/man/methodUtilities.Rd
index 921f030..86dc341 100644
--- a/src/library/methods/man/methodUtilities.Rd
+++ b/src/library/methods/man/methodUtilities.Rd
@@ -1,5 +1,5 @@
 % File src/library/methods/man/methodUtilities.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2009 R Core Team
 % Distributed under GPL 2 or later
 
@@ -20,9 +20,9 @@
 \alias{methodSignatureMatrix}
 \title{Utility Functions for Methods and S-Plus Compatibility}
 \description{
-  These are utilities, currently in the \pkg{methods} package, that
-  either provide some functionality needed by the package (e.g., element
-  matching by name), or add compatibility with S-Plus, or both.
+  These are \emph{internal} utilities, currently in the \pkg{methods}
+  package, that either provide some functionality needed by the package
+  (e.g., element matching by name), or add compatibility with S-Plus, or both.
 }
 \usage{
 functionBody(fun=sys.function(sys.parent()))
@@ -37,7 +37,7 @@ elNamed(x, name, mustFind=FALSE)
 
 formalArgs(def)
 
-Quote()
+Quote(expr)
 
 showDefault(object, oldMethods = TRUE)
 
@@ -54,9 +54,12 @@ methodSignatureMatrix(object, sigSlots = c("target", "defined"))
     \item{\code{getFunction}:}{
       find the object as a function.
     }
+    \item{\code{el}:}{\code{el(object, i)} is equivalent to
+      \code{object[i][[1]]} (and should typically be replaceable by object[[i]]).
+    }
     \item{\code{elNamed}:}{
       get the element of the vector corresponding to name.  Unlike the
-      \code{[}, \code{[[}, and \code{$} operators, this function %$
+      \code{\link{[}}, \code{\link{[[}}, and \code{\link{$}} operators, this function
       requires \code{name} to match the element name exactly (no partial
       matching).
     }
@@ -89,12 +92,15 @@ methodSignatureMatrix(object, sigSlots = c("target", "defined"))
       \code{.isMethodsDispatchOn(FALSE)}---a very gutsy thing to do),
       calling this function should turn dispatch back on again.
     }
-  \item{\code{methodSignatureMatrix}:}{
+    \item{\code{methodSignatureMatrix}:}{
       Returns a matrix with the contents of the specified slots as
       rows.  The slots should be named character strings of the same
       length.  Basically used to turn the signatures of a
       \code{"MethodDefinition"} object into a matrix for printing.
     }
+    \item{\code{Quote}:}{is a synonym of \code{\link{quote}()} and
+      considered deprecated.
+    }
   }
 }
 \keyword{internal}
diff --git a/src/library/methods/man/methods-defunct.Rd b/src/library/methods/man/methods-defunct.Rd
index 96ba0f4..b798eeb 100644
--- a/src/library/methods/man/methods-defunct.Rd
+++ b/src/library/methods/man/methods-defunct.Rd
@@ -1,5 +1,5 @@
 % File src/library/methods/man/methods-defunct.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2012 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/methods/man/methods-deprecated.Rd b/src/library/methods/man/methods-deprecated.Rd
index 7bcb3fb..6c7ae18 100644
--- a/src/library/methods/man/methods-deprecated.Rd
+++ b/src/library/methods/man/methods-deprecated.Rd
@@ -1,5 +1,5 @@
 % File src/library/methods/man/methods-deprecated.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2009 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/methods/man/methods-package.Rd b/src/library/methods/man/methods-package.Rd
index 3b6a7d1..f92a790 100644
--- a/src/library/methods/man/methods-package.Rd
+++ b/src/library/methods/man/methods-package.Rd
@@ -1,5 +1,5 @@
 % File src/library/methods/man/methods-package.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2007 R Core Team
 % Distributed under GPL 2 or later
 
@@ -14,27 +14,52 @@ Formally defined methods and classes for R objects, plus
 other programming tools, as described in the references.
 }
 \details{
-  This package provides the \sQuote{S4} or \sQuote{S version 4}
+  This package provides the \dQuote{S4} or \dQuote{S version 4}
   approach to methods and classes in a functional language.
 
-  See the documentation entries \code{\link{Classes}},
-  \code{\link{Methods}}, and \code{\link{GenericFunctions}} for general discussion of these topics, at a
-  fairly technical level.  Links from those pages, and the
-  documentation of \code{\link{setClass}} and \code{\link{setMethod}}
-  cover the main programming tools needed.
+  For basic use of the techniques, start with \link{Introduction} and
+  follow the links there to the key functions for programming, notably
+  \code{\link{setClass}} and \code{\link{setMethod}}.
+
+  Some specific topics:
+
+\describe{
+    \item{Classes:}{ Creating one, see \code{\link{setClass}};
+        examining definitions, see \code{\link{getClassDef}} and
+        \linkS4class{classRepresentation}; inheritance and coercing,
+      see \code{\link{is}} and \code{\link{as}}
+      }
+
+  \item{Generic functions:}{  Basic programming, see
+      \code{\link{setGeneric}}; the class of objects, see
+      \linkS4class{genericFunction}; other functions to examine or
+      manipulate them, see \link{GenericFunctions}.
+      }
+   \item{S3:}{Using classes, see \code{\link{setOldClass}}; methods,
+       see \link{Methods_for_S3}.
+     }
+     \item{Reference classes:}{See \link{ReferenceClasses}.
+         }
+    \item{Class unions; virtual classes}{See \code{\link{setClassUnion}}.
+         }
+ 
+}
+These pages will have additional links to related topics.
 
   For a complete
   list of functions and classes, use \code{library(help="methods")}.
 }
 
 \references{
+ Chambers, John M. (2016)
+ \emph{Extending R},
+  Chapman & Hall.
+(Chapters 9 and 10.)
+
  Chambers, John M. (2008)
  \emph{Software for Data Analysis: Programming with R}
-  Springer.  (For the R version.)
+  Springer.  (Chapter 10 has some additional details.)
 
- Chambers, John M. (1998)
- \emph{Programming with Data}
- Springer (For the original S4 version.)
 }
 \author{
 R Core Team
diff --git a/src/library/methods/man/new.Rd b/src/library/methods/man/new.Rd
index ad07241..939a462 100644
--- a/src/library/methods/man/new.Rd
+++ b/src/library/methods/man/new.Rd
@@ -1,6 +1,6 @@
 % File src/library/methods/man/new.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2010 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2017 R Core Team
 % Distributed under GPL 2 or later
 
 \name{new}
@@ -8,9 +8,17 @@
 \alias{initialize}
 \title{ Generate an Object from a Class }
 \description{
-  Given the name or the definition of a class, plus optionally data
-  to be included in the object, \code{new} returns an object from that
-  class.
+  A call to  \code{new} returns a newly allocated object from the
+  class identified by the first argument.  This call in turn calls the
+  method for the generic function \code{initialize} corresponding to
+  the specified class, passing the \code{\dots} arguments to this
+method.
+In the default method for \code{initialize()}, named arguments provide
+values for the corresponding slots and unnamed arguments must be
+objects from superclasses of this class.
+
+A call to a generating function for a class (see
+\code{\link{setClass}}) will pass its \dots arguments to a corresponding call to \code{new()}.
 }
 \usage{
 new(Class, ...)
@@ -20,56 +28,44 @@ initialize(.Object, ...)
 \arguments{
   \item{Class}{either the name of a class, a \code{\link{character}}
     string, (the usual case) or the object describing the class (e.g.,
-    the value returned by \code{getClass}).}
-  \item{\dots}{data to include in the new object.  Named arguments
-    correspond to slots in the class definition. Unnamed arguments must
-    be objects from classes that this class extends.}
-  \item{.Object}{ An object:  see the Details section.}
+    the value returned by \code{getClass}). Note that the character
+    string passed from a generating function includes the package name
+  as an attribute, avoiding ambiguity if two packages have identically
+named classes.}
+  \item{\dots}{arguments to specify properties of the new object, to
+      be passed to \code{initialize()}.}
+  \item{.Object}{ An object:  see the \dQuote{Initialize Methods} section.}
 }
-\details{
-  The function \code{new} begins by copying the prototype object from
-  the class definition.  Then information is inserted according to the
-  \code{\dots} arguments, if any.  As of version 2.4 of R, the type of
-  the prototype object, and therefore of all objects returned by
-  \code{new()}, is \code{"S4"} except for classes that extend
-  one of the basic types, where the prototype has that basic type.  User
-  functions that depend on \code{\link{typeof}(object)} should be
-  careful to handle \code{"S4"} as a possible type.
-
-  Note that the \emph{name} of the first argument, \code{"Class"}
-  entails that \code{"Class"} is an undesirable slot name in any formal
-  class: \code{new("myClass", Class = <value>)} will not work.
-
-  The interpretation of the \code{\dots} arguments can be specialized to
-  particular classes, if an appropriate method has been defined for the
-  generic function \code{"initialize"}.  The \code{new} function calls
-  \code{initialize} with the object generated from the prototype as the
-  \code{.Object} argument to \code{initialize}.
-
-  By default, unnamed arguments in the \code{\dots} are interpreted as
+\section{Initialize Methods}{
+The generic function \code{initialize} is not called directly.
+A call to \code{new} begins by copying the prototype object from
+  the class definition, and then calls \code{intialize()} with this
+  object as the first argument, followed by the \dots{} arguments. 
+
+  The interpretation of the \code{\dots} arguments in a call to a
+  generator function or to \code{new()} can be specialized to
+  particular classes, by defining an appropriate method for \code{"initialize"}. 
+
+  In the default method, unnamed arguments in the \code{\dots} are interpreted as
   objects from a superclass, and named arguments are interpreted as
-  objects to be assigned into the correspondingly named slots.  Thus,
-  explicit slots override inherited information for the same slot,
+  objects to be assigned into the correspondingly named slots.
+  Explicitly specified slots override inherited information for the same slot,
   regardless of the order in which the arguments appear.
 
   The \code{initialize} methods do not have to have \code{\dots} as
   their second argument (see the examples).  Initialize methods are
   often written when the natural parameters describing the new object
   are not the names of the slots.  If you do define such a method,
-  note the implications for future subclasses of your class.  If these
-  have additional slots, and your \code{initialize} method has
-  \code{\dots} as a formal argument, then your method should pass such
-  arguments along via \code{\link{callNextMethod}}.  If your method
-  does not have this argument, then either a subclass must have its
-  own method or else the added slots must be specified by users in
-  some way other than as arguments to \code{new}.
-
-  For examples of \code{initialize} methods, see
-  \code{\link{initialize-methods}} for existing methods for
-  classes \code{"traceable"} and \code{"environment"}, among
-  others. See the comments there on subclasses of
-  \code{"environment"}; any \code{initialize} methods for these should
-  be sure to allocate a new environment.
+you should include  \code{\dots} as a formal argument, and your method should pass such
+  arguments along via \code{\link{callNextMethod}}. 
+ This helps the definition of future subclasses of your class.  If these
+  have additional slots and your method
+  does \emph{not} have this argument, it will be difficult for these
+  slots to be included in an initializing call.
+
+  See
+  \code{\link{initialize-methods}} for a discussion of some classes with existing
+  methods. 
 
   Methods for \code{initialize} can be inherited only by simple
   inheritance, since it is a requirement that the method return an
@@ -79,27 +75,25 @@ initialize(.Object, ...)
 
   Note that the basic vector classes, \code{"numeric"}, etc. are
   implicitly defined, so one can use \code{new} for these classes.
+  The \dots arguments are interpreted as objects of this type and are
+  concatenated into the resulting vector.
 }
 \references{
- Chambers, John M. (2008)
- \emph{Software for Data Analysis: Programming with R}
-  Springer.  (For the R version.)
-
- Chambers, John M. (1998)
- \emph{Programming with Data}
- Springer (For the original S4 version.)
+ Chambers, John M. (2016)
+ \emph{Extending R},
+  Chapman & Hall.
+(Chapters 9 and 10.)
 }
-\seealso{ \link{Classes} for an overview of defining class, and
+\seealso{ \link{Classes_Details} for details of class definitions, and
   \code{\link{setOldClass}} for the relation to S3 classes. }
 
 \examples{
 ## using the definition of class "track" from \link{setClass}
 
 \dontshow{
-setClass("track",
-         representation(x="numeric", y="numeric"))
-setClass("trackCurve",
-         representation("track", smooth = "numeric"))
+setClass("track", slots = c(x="numeric", y="numeric"))
+setClass("trackCurve", contains = "track",
+          slots = c(smooth = "numeric"))
 
 ydata <- stats::rnorm(10); ysmooth <- 1:10
 }
@@ -111,40 +105,34 @@ t1 <- new("track", x = seq_along(ydata), y = ydata)
 t2 <- new("trackCurve", t1, smooth = ysmooth)
 
 ### define a method for initialize, to ensure that new objects have
-### equal-length x and y slots.
-
-setMethod("initialize",
-          "track",
-          function(.Object, x = numeric(0), y = numeric(0)) {
-            if(nargs() > 1) {
+### equal-length x and y slots.  In this version, the slots must still be
+### supplied by name.
+
+setMethod("initialize", "track", 
+    function(.Object, ...) {
+      .Object <- callNextMethod()
+      if(length(.Object at x) != length(.Object at y))
+      stop("specified x and y of different lengths")
+      .Object
+    })
+
+### An alternative version that allows x and y to be supplied
+### unnamed.  A still more friendly version would make the default x
+### a vector of the same length as y, and vice versa.
+
+setMethod("initialize", "track",
+          function(.Object, x = numeric(0), y = numeric(0), ...) {
+              .Object <- callNextMethod(.Object, ...)
               if(length(x) != length(y))
-                stop("specified x and y of different lengths")
+                  stop("specified x and y of different lengths")
               .Object at x <- x
               .Object at y <- y
-            }
-            .Object
+              .Object
           })
 
-### the next example will cause an error (x will be numeric(0)),
-### because we didn't build in defaults for x,
-### although we could with a more elaborate method for initialize
-
-try(new("track", y = sort(stats::rnorm(10))))
-
-## a better way to implement the previous initialize method.
-## Why?  By using callNextMethod to call the default initialize method
-## we don't inhibit classes that extend "track" from using the general
-## form of the new() function.  In the previous version, they could only
-## use x and y as arguments to new, unless they wrote their own
-## initialize method.
-
-setMethod("initialize", "track", function(.Object, ...) {
-    .Object <- callNextMethod()
-    if(length(.Object at x) != length(.Object at y))
-     stop("specified x and y of different lengths")
-    .Object
-  })
-
+\dontshow{
+removeMethod("initialize", "track")
+}
 }
 \keyword{programming}
 \keyword{classes}
diff --git a/src/library/methods/man/nonStructure-class.Rd b/src/library/methods/man/nonStructure-class.Rd
index 8ee5be2..a15dae7 100644
--- a/src/library/methods/man/nonStructure-class.Rd
+++ b/src/library/methods/man/nonStructure-class.Rd
@@ -1,5 +1,5 @@
 % File src/library/methods/man/nonStructure-class.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 2009-12 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/methods/man/promptClass.Rd b/src/library/methods/man/promptClass.Rd
index 17819d3..74b0eca 100644
--- a/src/library/methods/man/promptClass.Rd
+++ b/src/library/methods/man/promptClass.Rd
@@ -1,6 +1,6 @@
 % File src/library/methods/man/promptClass.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2007 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2016 R Core Team
 % Distributed under GPL 2 or later
 
 \name{promptClass}
@@ -93,14 +93,14 @@ promptClass(clName, filename = NULL, type = "class",
 ## from setClass
 ## A simple class with two slots
 setClass("track",
-         representation(x="numeric", y="numeric"))
+         slots = c(x="numeric", y="numeric"))
 ## A class extending the previous, adding one more slot
-setClass("trackCurve",
-         representation("track", smooth = "numeric"))
+setClass("trackCurve", contains = "track",
+         slots = c(smooth = "numeric"))
 ## A class similar to "trackCurve", but with different structure
 ## allowing matrices for the "y" and "smooth" slots
 setClass("trackMultiCurve",
-         representation(x="numeric", y="matrix", smooth="matrix"),
+         slots = c(x="numeric", y="matrix", smooth="matrix"),
          prototype = list(x=numeric(), y=matrix(0,0,0), smooth= matrix(0,0,0)))
 
 setIs("trackMultiCurve", "trackCurve",
diff --git a/src/library/methods/man/promptMethods.Rd b/src/library/methods/man/promptMethods.Rd
index 9c67afe..528c24a 100644
--- a/src/library/methods/man/promptMethods.Rd
+++ b/src/library/methods/man/promptMethods.Rd
@@ -1,5 +1,5 @@
 % File src/library/methods/man/promptMethods.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2007 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/methods/man/refClass.Rd b/src/library/methods/man/refClass.Rd
index cc4f973..53933c7 100644
--- a/src/library/methods/man/refClass.Rd
+++ b/src/library/methods/man/refClass.Rd
@@ -1,5 +1,5 @@
 % File src/library/methods/man/refClass.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 2010-2014 R Core Team
 % Distributed under GPL 2 or later
 
@@ -23,24 +23,45 @@
 \alias{SuperClassMethod-class}
 \alias{show,envRefClass-method}
 \alias{show,refMethodDef-method}
+\alias{show,externalRefMethod-method}
 \alias{show,refClassRepresentation-method}
+\alias{externalRefMethod}
+\alias{externalRefMethod-class}
 \description{
-The software described here supports reference classes whose objects have
-fields
-accessed by reference in the style of \dQuote{OOP} languages such as Java and
+The software described here allows packages to define \emph{reference
+  classes} that behave in the style of \dQuote{OOP} languages such as Java and
 C++.
-Computations with these objects invoke methods on them and
-extract or set their fields.
+This model for OOP differs from the functional model implemented by S4
+(and S3) classes and methods, in which methods are defined for generic
+functions.
+Methods for reference classes are \dQuote{encapsulated} in the class definition.
+
+Computations with objects from reference classes invoke methods on them and
+extract or set their fields, using  the \code{`$`} operator in \R.%$
 The field and method computations potentially modify the object.
 All computations referring to the objects see the modifications, in contrast to
 the usual functional programming model in \R.
-Reference classes can be used to program in \R directly or in combination
-with an interface to an OOP-style language, allowing \R-written methods to
-extend the interface.
+
+A call to
+\code{setRefClass} in the source code for a package defines the class and returns a generator object.
+Subsequent calls to the \code{$methods()} %$
+method of the generator will define methods for the class.
+As with functional classes, if the class is exported from the package,
+it will be available when the package is loaded.
+
+Methods are \R functions.  In their usual implementation, they refer to fields
+and other methods of the class directly by name. See the section on
+\dQuote{Writing Reference Methods}.
+
+As with functional classes, reference classes can inherit from other
+reference classes via a \code{contains=} argument to
+\code{setRefClass}.  Fields and methods will be inherited, except where the
+new class overrides method definitions.  See the section on \dQuote{Inheritance}.
+
 }
 \usage{
 setRefClass(Class, fields = , contains = , methods =,
-     where =, ...)
+     where =, inheritPackage =, ...)
 
 getRefClass(Class, where =)
 }
@@ -49,34 +70,22 @@ getRefClass(Class, where =)
 character string name for the class.
 
 In the call to \code{getRefClass()} this argument can also be any
-object from the relevant class;  note also the corresponding reference
-class methods documented in the section on \dQuote{Writing Reference Methods}.
+object from the relevant class.
+
 }
   \item{fields}{
 either a character vector of field names or
 a named list of the fields.  The resulting fields will be accessed with reference semantics (see
-the  section on \dQuote{Reference Objects}).  If the argument is a list, the
-elements of the list can be the character string name of a class, in
-which case the field must be from that class or a subclass.
-
- The element in the list can alternatively be an \emph{accessor
-   function}, a function of one argument that returns
-the field if called with no argument or sets it to the value of the
-argument otherwise.
-Accessor functions are used internally and for inter-system interface
-applications.
-Their definition follows the rules for writing methods for the class:
-they can refer to other fields and can call other methods for this
-class or its superclasses.
-See the section on \dQuote{Implementation} for the internal mechanism
-used by accessor functions.
+the  section on \dQuote{Reference Objects}).  If the argument is a list, each
+element of the list should usually be the character string name of a class, in
+which case the object in the field must be from that class or a
+subclass.  An alternative, but not generally recommended, is to supply an  \emph{accessor
+   function}; see the section on \dQuote{Implementation} for accessor
+ functions and the related internal mechanism.
 
 Note that fields are distinct from
-the slots, if any, in the object.  Slots are, as always, handled by
-standard \R{} object management.
-It is not generally a good idea to mix slots and fields in the same
-class; this confuses the distinction in behavior between reference
-classes and regular S4 classes.  See the comments in the
+slots.  Reference classes should not define class-specific slots. See
+the note on slots in the
 \dQuote{Implementation} section.
 }
   \item{contains}{
@@ -88,26 +97,21 @@ a named list of function definitions that can be invoked on objects
 from this class.  These can also be created by invoking the
 \code{$methods} method on the generator object returned. %$
 See the section on \dQuote{Writing Reference Methods} for details.
-
-Two optional method names are interpreted specially, \code{initialize}
-and \code{finalize}. If an \code{initialize} method is defined, it
-will be invoked when an object is generated from the class.  See the
-discussion of method \code{$new(...)} %$
-in the section \dQuote{Reference Object Generators}.
-
-If a \code{finalize} method is defined, a function will be
-\link[=reg.finalizer]{registered} to invoke it before the environment
-in the object is discarded by the garbage collector. See the matrix
-viewer example for both initialize and finalize methods.}
+}
 
   \item{where}{
-the environment in which to store the class definition (or to begin the
-search for it, in
-the case of \code{getRefClass()}).  Defaults to
-the package namespace or environment for code that is part of an \R{}
-package, and to the global environment for code sourced directly at
-the session top level.
-}
+for \code{setRefClass}, the environment in which to store the class definition.  Should be
+omitted in calls from a package's source code.
+
+For \code{getRefClass}, the environment from which to search for the definition.  If the
+package is not loaded or you need to be specific, use
+\code{\link{asNamespace}} with the package name.
+}
+  \item{inheritPackage}{
+Should objects from the new class inherit the package environment of a
+contained superclass?  Default \code{FALSE}.  See the Section \dQuote{Inter-Package Superclasses
+  and External Methods}.
+} 
   \item{\dots}{
 other arguments to be passed to \code{\link{setClass}}.
 }
@@ -130,48 +134,6 @@ other arguments to be passed to \code{\link{setClass}}.
   with reference class methods for various utilities.  See the section
   on reference class generator objects below.
 
-If the class has a method defined for \code{$initialize()}, %$
-this method will be called once the reference object has been
-created.  You should write such a method for a class that needs to do
-some special initialization.
-In particular, a reference method is recommended rather than a method
-for the S4 generic function \code{initialize()}, because some special initialization is
-required for reference objects \emph{before} the initialization of
-fields.
-As with S4 classes, methods are written for \code{$initialize()} %$
-and not for \code{$new()}, %$
-both for the previous reason and also because \code{$new()} %$
-is invoked on the generator object and would be a method for that class.
-
-The default method for \code{$initialize()} %$
-is equivalent to invoking the method \code{$initFields(...)}. %$
-Named arguments assign initial values to the corresponding fields.
-Unnamed arguments must be objects from this class or a reference
-superclass of this class.
-Fields will be initialized to the contents of the fields in such
-objects, but named arguments override the corresponding inherited
-fields.
-Note that fields are simply assigned.  If the field is itself a
-reference object, that object is not copied.
-The new and previous object will share the reference.
-Also, a field assigned from an unnamed argument counts as an
-assignment for locked fields.
-To override an inherited value for a locked field, the new value must
-be one of the named arguments in the initializing call.
-A later assignment of the field will result in an error.
-
-Initialization methods need some care in design.
-The generator
-for a reference class will be called with no arguments, for example
-when copying the object.
-To ensure that these calls do not fail, the method must have defaults
-for all arguments or check for \code{missing()}.
-The method
-should include \code{\dots} as an argument and
-pass this on via \code{$callSuper()} (or \code{$initFields()} if
-you know that your superclasses have no initialization methods).
-This allows future class definitions that subclass this class, with
-additional fields.
 
 \code{getRefClass()} also returns the generator function for the
 class.  Note that the package slot in the value is the correct package
@@ -222,12 +184,6 @@ created.
 The field itself can optionally have a specified class, meaning that only objects
 from this class or one of its subclasses can be assigned to the field.
 By default, fields have class \code{"ANY"}.
-Fields may also be defined by supplying an accessor function which
-will be called to get or set the field.
-Accessor functions are likely when reference classes are part of an
-inter-system interface.
-The interface will usually supply the accessor functions automatically
-based on the definition of the corresponding class in the other language.
 
 Fields are accessed by reference.
 In particular, invoking a method may modify the content of
@@ -237,15 +193,19 @@ Programming for such classes involves writing new methods for a
 particular class.
 In the \R implementation, these methods are \R functions, with zero or
 more formal arguments.
-The object on which the methods are invoked is not an explicit
+For standard reference methods, the object itself is not an explicit
 argument to the method.
 Instead, fields and methods for the class can be referred to by name
 in the method definition.
-The implementation uses \R environments to make fields and methods
-available by name.
-Additional special fields allow reference to the complete object and
-to the definition of the class.  See the section on \dQuote{Writing
+The implementation uses \R environments to make fields and other methods
+available by name within the method.
+Specifically, the parent environment of the method is the object itself.
+  See the section on \dQuote{Writing
   Reference Methods}.
+This special use of environments is optional.  If a method is defined
+with an initial formal argument \code{.self}, that will be passed in
+as the whole object, and the method follows the standard rules for any
+function in a package.  See the section on \dQuote{External Methods}
 
 The goal of the software described here is to provide a uniform
 programming style in \R for software dealing with reference classes, whether
@@ -257,14 +217,30 @@ languages.
 \section{Writing Reference Methods}{
 Reference methods are functions supplied as elements of a named list,
 either
-when invoking \code{g$methods()} %$}
+when invoking \code{$methods()} %$}
 on a generator object \code{g} or as
 the argument \code{methods} in a call to \code{setRefClass}.
-They are written as ordinary \R functions but have some special
-features and restrictions.
+The two mechanisms have the same effect, but the first makes the code more readable.
+
+Methods are written as ordinary \R functions but have some special
+features and restrictions in their usual form.
+In contrast to some other languages (e.g., Python), the object itself
+does not need to be an argument in the method definition.
 The body of the function can contain calls to any other reference method,
 including those inherited from other reference classes and may refer
-to fields in the object by name.
+to methods and to fields in the object by name.
+
+Alternatively, a method may be an \emph{external} method.
+This is signalled by \code{.self} being the first formal argument to the method.
+The body of the method then works like any ordinary function.
+The methods are called like other methods (without the \code{.self}
+argument, which is supplied internally and always refers to the object
+itself).
+Inside the method, fields and other methods are accessed in the form
+\code{.self$x}. %$
+External methods exist so that reference classes can inherit the
+package environment of superclasses
+in other packages; see the section on \dQuote{External Methods}.
 
 Fields may be modified in a method by using the
 non-local assignment operator, \code{<<-}, as in the \code{$edit} and \code{$undo}
@@ -285,30 +261,37 @@ In particular, methods should not use non-exported entries in the
 package's namespace, because the methods may be inherited by a
 reference class in another package.
 
-Methods for \code{$initialize()} %$
-have special requirements.  See the comments in the \dQuote{Value}
-section.
+Two method names are interpreted specially, \code{initialize}
+and \code{finalize}. If an \code{initialize} method is defined, it
+will be invoked when an object is generated from the class.  See the
+discussion of method \code{$new(...)} %$
+in the section \dQuote{Initialization Methods}.
+
+If a \code{finalize} method is defined, a function will be
+\link[=reg.finalizer]{registered} to invoke it before the environment in
+the object is discarded by the garbage collector; finalizers are
+registered with \code{atexit=TRUE}, and so are also run at the end of
+\R{} sessions. See the matrix viewer example for both initialize and
+finalize methods.
 
 Reference methods can not themselves be generic functions; if you want
 additional function-based method dispatch, write a separate generic
 function and call that from the method.
 
+Two special object names are available.
 The entire object can be referred to in a method by the reserved
-name \code{.self}, as shown in the \code{save=} method of the
-example.
-The special object \code{.refClassDef} contains the definition of the
+name \code{.self}.
+The object \code{.refClassDef} contains the definition of the
 class of the object.
-These fields are read-only (it makes no sense to modify these
-references), with one exception.
+These are accessed as fields but are read-only, with one exception.
 In principal, the \code{.self} field can be modified in the \code{$initialize} %$
 method, because the object is still being created at this stage.
-This is definitely not recommended, unless to set some
-non-reference properties of the object defined for this class, which
-is itself not recommended if it mixes slots and fields.
+This is not recommended, as it can invalidate the object with respect
+to its class.
 
 
 The methods available include methods inherited from superclasses, as
-discussed in the next section.
+discussed in the section \dQuote{Inheritance}.
 
 Only methods actually used will be included in the environment
 corresponding to an individual object.  To declare that a method requires a
@@ -332,6 +315,52 @@ If the first element of the body of the method is a literal character
 string (possibly multi-line), that string is interpreted as documentation.
 See the method definitions in the example.
 }
+
+\section{Initialization Methods}{
+If the class has a method defined for \code{$initialize()}, %$
+this method will be called once the reference object has been
+created.  You should write such a method for a class that needs to do
+some special initialization.
+In particular, a reference method is recommended rather than a method
+for the S4 generic function \code{initialize()}, because some special initialization is
+required for reference objects \emph{before} the initialization of
+fields.
+As with S4 classes, methods are written for \code{$initialize()} %$
+and not for \code{$new()}, %$
+both for the previous reason and also because \code{$new()} %$
+is invoked on the generator object and would be a method for that class.
+
+The default method for \code{$initialize()} %$
+is equivalent to invoking the method \code{$initFields(...)}. %$
+Named arguments assign initial values to the corresponding fields.
+Unnamed arguments must be objects from this class or a reference
+superclass of this class.
+Fields will be initialized to the contents of the fields in such
+objects, but named arguments override the corresponding inherited
+fields.
+Note that fields are simply assigned.  If the field is itself a
+reference object, that object is not copied.
+The new and previous object will share the reference.
+Also, a field assigned from an unnamed argument counts as an
+assignment for locked fields.
+To override an inherited value for a locked field, the new value must
+be one of the named arguments in the initializing call.
+A later assignment of the field will result in an error.
+
+Initialization methods need some care in design.
+The generator
+for a reference class will be called with no arguments, for example
+when copying the object.
+To ensure that these calls do not fail, the method must have defaults
+for all arguments or check for \code{missing()}.
+The method
+should include \code{\dots} as an argument and
+pass this on via \code{$callSuper()} (or \code{$initFields()} if
+you know that your superclasses have no initialization methods).
+This allows future class definitions that subclass this class, with
+additional fields.
+
+}
 \section{Inheritance}{
 Reference classes inherit from other reference classes by using the
 standard \R inheritance; that is, by including the superclasses in the
@@ -355,9 +384,12 @@ way as directly specified methods.
 A method may override a method of the same name in a superclass.
 The overriding method can call the superclass method by
 \code{callSuper(...)} as described below.
+}
 
-All reference classes inherit from the class \code{"envRefClass"},
-which provides the following methods.
+\section{Methods Provided for all Objects}{
+
+All reference classes inherit from the class \code{"envRefClass"}.
+All reference objects can use the following methods.
 
 \describe{
 \item{\code{$callSuper(...)}}{ %$
@@ -485,6 +517,73 @@ implementation may use such names for special purposes.
 
 }
 
+\section{External Methods; Inter-Package Superclasses }{
+The environment of a method in a reference class is the object itself,
+as an environment.
+This allows the method to refer directly to fields and other methods,
+without using the whole object and the \code{"$"} %$
+operator.
+The parent of that environment is the namespace of the package in
+which the reference class is defined.
+Computations in the method have access to all the objects in the
+package's namespace, exported or not.
+
+When defining a class that contains a reference superclass in another
+package, there is an ambiguity about which package namespace should
+have that role.
+The argument \code{inheritPackage} to \code{setRefClass()} controls
+whether the environment of new objects should inherit from an
+inherited class in another package or continue to inherit from the
+current package's namespace.
+
+If the superclass is \dQuote{lean}, with few methods, or exists
+primarily to support a family of subclasses, then it may be better to
+continue to use the new package's environment.
+On the other hand, if the superclass was originally written as a
+standalone, this choice may invalidate existing superclass methods.
+For the superclass methods to continue to work, they must use only
+exported functions in their package and the new package must import
+these.
+
+Either way, some methods may need to be written that do \emph{not}
+assume the standard model for reference class methods, but behave
+essentially as ordinary functions would in dealing with reference
+class objects.
+
+The mechanism is to recognize \emph{external methods}.
+An external method  is
+written as a function in which the first argument, named \code{.self},
+stands for the reference class object.
+This function is supplied as the definition for a reference class method.
+The method will be called, automatically, with the first argument
+being the current object and the other arguments, if any, passed along
+from the actual call.
+
+Since an external method is an ordinary function in the source code
+for its package, it has access to all the objects in the namespace.
+Fields and methods in the reference class must be referred to in the
+form \code{.self$name}.%$
+
+If for some reason you do not want to use \code{.self} as the first
+argument, a function \code{f()} can be converted explicitly as
+\code{externalRefMethod(f)}, which returns an object of class
+\code{"externalRefMethod"} that can be supplied as a method for the
+class.
+The first argument will still correspond to the whole object.
+
+External methods can be supplied for any reference class, but there is no
+obvious advantage unless they are needed.
+They are more work to write, harder to read and (slightly) slower to
+execute.
+
+\emph{NOTE:} If you are the author of a package whose reference
+classes are likely to be subclassed in other packages, you can avoid
+these questions entirely by writing methods that \emph{only} use
+exported functions from your package, so that all the methods will
+work from another package that imports yours.
+
+}
+
 \section{Reference Class Generators}{
 The call to \code{setRefClass} defines the specified class and
 returns a \dQuote{generator function} object for that class.
@@ -530,16 +629,19 @@ If no topic is given or if the topic is not a method name, the
 definition of the class is printed.
 }
 \item{\code{$methods(...)}}{ %$
-With no arguments, returns a list of the reference methods for this
+With no arguments, returns the names of the reference methods for this
 class.
+With one character string argument, returns the method of that name.
 
 Named arguments
 are method definitions, which will be
 installed in the class, as if they had been supplied in the
 \code{methods} argument to \code{setRefClass()}.
 Supplying methods in this way, rather than in the call to
-\code{setRefClass()}, is largely for the sake of clearer source code
-when many or large methods are being defined.
+\code{setRefClass()}, is recommended for the sake of clearer source
+code.
+See the section on \dQuote{Writing Reference Methods} for details.
+
 All methods for a class should be defined in the source code that
 defines the class, typically as part of a package.
 In particular, methods can not be redefined in a class in an attached
@@ -617,7 +719,7 @@ functions as described in the section on \dQuote{Reference Objects}.
 } %% end of \describe
 } %% end of \section
 
-\section{Implementation}{
+\section{Implementation; Reference Classes as S4 Classes}{
 Reference classes are implemented as S4 classes with a data part of
 type \code{"environment"}.
 Fields correspond to named objects in the environment.
@@ -626,14 +728,24 @@ A field associated with a function is implemented as an
 In particular, fields with a specified class are implemented as a
 special form of active binding to enforce valid assignment to the
 field.
+
+As a related feature,  the element in the \code{fields=} list supplied
+to \code{setRefClass} can be an \emph{accessor
+   function}, a function of one argument that returns
+the field if called with no argument or sets it to the value of the
+argument otherwise.
+Accessor functions are used internally and for inter-system interface
+applications, but not generally recommended as they blur the concept
+of fields as data within the object.
+
 A field, say \code{data}, can be accessed generally by an expression
 of the form \code{x$data} %$}
 for any object from the relevant class.
-In a method for this class, the field can be accessed by the name
+In an internal method for this class, the field can be accessed by the name
 \code{data}.
 A field that is not locked can be set by an expression of the form
 \code{x$data <- value}.%$
-Inside a method, a field can be assigned by an expression of the form
+Inside an internal method, a field can be assigned by an expression of the form
 \code{x <<- value}.
 Note the \link[=assignOps]{non-local assignment} operator.
 The standard \R interpretation of this operator works to assign it in
@@ -645,70 +757,36 @@ When a method is invoked on an object, the function defining the method is
 installed in the object's environment, with the same environment as the
 environment of the function.
 
-Because of the implementation, new reference classes can inherit from
-non-reference S4 classes as well as reference classes.
+Reference classes can have validity methods in the same sense as any
+S4 class (see \code{\link{setValidity}}).
+Such methods are often a good idea; they will be called by calling
+\code{\link{validObject}} and a validity method, if one is defined,
+will be called when a reference object is created (from version 3.4 of
+\R on).
+Just remember that these are S4 methods.  The function will be called
+with the \code{object} as its argument.  Fields and methods must be
+accessed using \code{$}.%$
+
+\emph{Note: Slots.} Because of the implementation, new reference classes can inherit from
+non-reference S4 classes as well as reference classes, and can include
+class-specific slots in the definition.
 This is usually a bad idea, if the slots from the non-reference
 class are thought of as alternatives to fields.
-Unless there is some special argument in favor, mixing the functional
-and reference paradigms for properties of the same object is
-conceptually unclear.
+Slots will as always be treated functionally.
+Therefore, changes to the slots and the fields will behave inconsistently,
+mixing the functional
+and reference paradigms for properties of the same object,
+conceptually unclear and prone to errors.
 In addition, the initialization method for the class will have to sort
 out fields from slots, with a good chance of creating anomalous
 behavior for subclasses of this class.
-Better in general to define fields analogous to the slots in the S4
-class, and to initialize those from an S4 object of that class.
+
+Inheriting from a \link[=setClassUnion]{class union}, however, is a reasonable strategy (with
+all members of the union likely to be reference classes).
 
 }
 
-\section{Inter-System Interfaces}{
-A number of
-languages use a similar reference-based programming model with classes
-and class-based methods.
-Aside from differences in choice of terminology and other details,
-many of these languages are compatible with the programming style
-described here.
-\R interfaces to the languages exist in a number of packages.
-
-The reference class definitions here provide a hook for
-classes in the foreign language to be exposed in \R.
-Access to fields and/or methods in the class can be
-implemented by defining an \R reference class corresponding to
-classes made available through the interface.
-Typically, the inter-system interface will take care of the details of
-creating the \R class, given a description of the foreign class (what fields
-and methods it has, the classes for the fields, whether any are
-read-only, etc.)
-The specifics for the fields and methods can be implemented via
-reference methods for the \R class.
-In particular, the use of active bindings allows field access for
-getting and setting, with
-actual access handled by the inter-system interface.
-
-\R methods and/or fields can be included in the class definition as for any
-reference class.
-The methods can use or set fields and can call other methods transparently
-whether the field or method comes from the interface or is defined
-directly in \R.
-
-For an inter-system interface using this approach, see the code for package \code{Rcpp}, version
-0.8.7 or later.
-}
-% \value{
-% \code{setRefClass()} and \code{getRefClass()} both return a generator object for the class. This is
-% itself a reference object, with methods to generate objects from the
-% class and also for defining new methods and for help-style
-% documentation. See the
-% section on \dQuote{Reference Class Generator Objects} for details.
-% Note that \code{Class} in the call to \code{getRefClass()} can be an
-% object from the corresponding class, and that a similar reference
-% class method \code{$getRefClass()} %$
-% is available as well.
-
-% \code{setRefClass} defines the class and stores its class definition.
-% \code{getRefClass} requires that the class has been defined as a
-% reference class.
-
-% }
+
 \section{Debugging}{
 The standard \R{} debugging and tracing facilities can be applied to
 reference methods.
@@ -738,17 +816,24 @@ interactive debugging and  \code{trace(what, edit = TRUE)} to edit the
 reference method interactively.
 
 }
-\author{
-  John Chambers
+
+\references{
+ Chambers, John M. (2016)
+ \emph{Extending R},
+  Chapman & Hall.
+(Chapters 9 and 11.)
 }
 
+
 \examples{
 ## a simple editor for matrix objects.  Method  $edit() changes some
 ## range of values; method $undo() undoes the last edit.
 mEdit <- setRefClass("mEdit",
       fields = list( data = "matrix",
-        edits = "list"),
-      methods = list(
+        edits = "list"))
+
+## The basic edit, undo methods
+mEdit$methods(
      edit = function(i, j, value) {
        ## the following string documents the edit method
        'Replaces the range [i, j] of the
@@ -771,7 +856,10 @@ mEdit <- setRefClass("mEdit",
          ## trim the edits list
          length(edits) <<- length(edits) - 2
          invisible(prev)
-     },
+     })
+
+## A method to automatically print objects
+mEdit$methods(
      show = function() {
        'Method for automatically printing matrix editors'
        cat("Reference matrix editor object of class",
@@ -780,7 +868,7 @@ mEdit <- setRefClass("mEdit",
        methods::show(data)
        cat("Undo list is of length", length(edits), "\n")
      }
-     ))
+     )
 
 xMat <- matrix(1:12,4,3)
 xx <- mEdit(data = xMat)
@@ -790,9 +878,9 @@ xx$undo()
 mEdit$help("undo")
 stopifnot(all.equal(xx$data, xMat))
 
-utils::str(xx) # show fields and names of non-trivial methods
+utils::str(xx) # show fields and names of methods
 
-## add a method to save the object
+## A method to save the object
 mEdit$methods(
      save = function(file) {
        'Save the current object on the file
diff --git a/src/library/methods/man/removeMethod.Rd b/src/library/methods/man/removeMethod.Rd
new file mode 100644
index 0000000..3fb3ac9
--- /dev/null
+++ b/src/library/methods/man/removeMethod.Rd
@@ -0,0 +1,37 @@
+% File src/library/methods/man/setMethod.Rd
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2007 R Core Team
+% Distributed under GPL 2 or later
+
+\name{removeMethod}
+\alias{removeMethod}
+\title{ Remove a Method }
+\description{
+  Remove the method for a given function and signature.  Obsolete for
+  ordinary applications: Method definitions in a package should never
+  need to remove methods and it's very bad practice to remove methods
+  that were defined in other packages.
+}
+\usage{
+removeMethod(f, signature, where)
+}
+\arguments{
+  \item{f, signature, where}{  As for \code{\link{setMethod}()}.
+}
+}
+\value{
+   \code{TRUE} if a method
+  was found to be removed.
+}
+
+\references{
+ Chambers, John M. (2016)
+ \emph{Extending R},
+  Chapman & Hall.
+(Chapters 9 and 10.)
+}
+
+
+\keyword{programming}
+\keyword{classes}
+\keyword{methods}
diff --git a/src/library/methods/man/representation.Rd b/src/library/methods/man/representation.Rd
index bd7ed92..7ac9d07 100644
--- a/src/library/methods/man/representation.Rd
+++ b/src/library/methods/man/representation.Rd
@@ -1,6 +1,6 @@
 % File src/library/methods/man/representation.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2013 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2016 R Core Team
 % Distributed under GPL 2 or later
 
 \name{representation}
@@ -84,6 +84,11 @@ else
   stopifnot(identical(getClassDef("class3"), prev))}
 }
 
+###  >>> This *is* old syntax -- use 'contains=*, slots=*' instead <<<
+###                ==========         ----------  ------   ======
+
+%% Just kept here for "back compatibility" ...............
+
 setClass("Character",representation("character"))
 setClass("TypedCharacter",representation("Character",type="character"),
           prototype(character(0),type="plain"))
diff --git a/src/library/methods/man/selectSuperClasses.Rd b/src/library/methods/man/selectSuperClasses.Rd
index 1bc96a9..1ec2087 100644
--- a/src/library/methods/man/selectSuperClasses.Rd
+++ b/src/library/methods/man/selectSuperClasses.Rd
@@ -1,6 +1,6 @@
 % File src/library/methods/man/selectSuperClass.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 2009-12 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 2009-2016 R Core Team
 % Distributed under GPL 2 or later
 
 \name{selectSuperClasses}
@@ -53,9 +53,9 @@ selectSuperClasses(Class, dropVirtual = FALSE, namesOnly = TRUE,
 }
 \examples{
 setClass("Root")
-setClass("Base", contains = "Root", representation(length = "integer"))
-setClass("A", contains = "Base", representation(x = "numeric"))
-setClass("B", contains = "Base", representation(y = "character"))
+setClass("Base", contains = "Root", slots = c(length = "integer"))
+setClass("A", contains = "Base", slots = c(x = "numeric"))
+setClass("B", contains = "Base", slots = c(y = "character"))
 setClass("C", contains = c("A", "B"))
 
 extends("C")   #-->  "C"  "A" "B"  "Base" "Root"
diff --git a/src/library/methods/man/setAs.Rd b/src/library/methods/man/setAs.Rd
new file mode 100644
index 0000000..e820cf8
--- /dev/null
+++ b/src/library/methods/man/setAs.Rd
@@ -0,0 +1,262 @@
+% File src/library/methods/man/setAs.Rd
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2016 R Core Team
+% Distributed under GPL 2 or later
+
+\name{setAs}
+\alias{coerce}
+\alias{coerce<-}
+\alias{setAs}
+\alias{coerce-methods}
+\alias{coerce,ANY,array-method}
+\alias{coerce,ANY,call-method}
+\alias{coerce,ANY,character-method}
+\alias{coerce,ANY,complex-method}
+\alias{coerce,ANY,environment-method}
+\alias{coerce,ANY,expression-method}
+\alias{coerce,ANY,function-method}
+\alias{coerce,ANY,integer-method}
+\alias{coerce,ANY,list-method}
+\alias{coerce,ANY,logical-method}
+\alias{coerce,ANY,matrix-method}
+\alias{coerce,ANY,name-method}
+\alias{coerce,ANY,numeric-method}
+\alias{coerce,ANY,single-method}
+\alias{coerce,ANY,ts-method}
+\alias{coerce,ANY,vector-method}
+\alias{coerce,ANY,NULL-method}
+\title{Methods for Coercing an Object to a Class}
+\description{
+  A call to \code{setAs} defines a method for coercing an object of
+  class \code{from} to class \code{to}.  The methods will then be used
+  by calls to \code{\link{as}} for objects with class \code{from},
+  including calls that replace part of the object.
+
+  Methods for this purpose work indirectly, by defining methods for
+  function \code{coerce}.  The \code{coerce} function is \emph{not} to
+  be called directly, and method selection uses class inheritance only
+  on the first argument.
+}
+\usage{
+setAs(from, to, def, replace, where = topenv(parent.frame()))
+}
+\arguments{
+  \item{from, to}{The classes between which the coerce methods
+    \code{def} and \code{replace} perform coercion.
+  }
+  \item{def}{function of one argument.  It will get an object from
+    class \code{from} and had better return an object of class
+    \code{to}.  The convention is that
+    the name of the argument is \code{from}; if another argument name
+    is used, \code{setAs} will attempt to substitute \code{from}. }
+  \item{replace}{if supplied, the function to use as a replacement
+    method, when \code{as} is used on the left of an assignment.
+    Should be a function of two arguments, \code{from, value},
+    although \code{setAs} will attempt to substitute if the arguments
+    differ.
+
+\emph{The remaining argument will not be used in standard applications.}
+  }
+
+  \item{where}{the position or environment in which to store the
+    resulting methods. Do not use this argument when defining a method
+    in a package.  Only the default, the namespace of the package,
+    should be used in normal situations.
+    }
+}
+
+\section{Inheritance and Coercion}{
+
+ Objects from one class can turn into objects from another class
+  either automatically or by an explicit call to the \code{as}
+  function.  Automatic conversion is special, and comes from the
+  designer of one class of objects asserting that this class extends
+  another class.  The most common case is that one or more class names
+  are supplied in the \code{contains=} argument to \code{setClass}, in
+  which case the new class extends each of the earlier classes (in the
+  usual terminology, the earlier classes are \emph{superclasses} of
+  the new class and it is a \emph{subclass} of each of them).
+
+This form of inheritance is called \emph{simple} inheritance in \R.
+See \code{\link{setClass}} for details.
+Inheritance can also be defined explicitly by a call to
+\code{\link{setIs}}.
+The two versions have slightly different implications for coerce methods.
+Simple inheritance implies that inherited slots behave identically in the subclass and the superclass.
+Whenever two classes are related by simple inheritance, corresponding coerce methods
+are defined for both direct and replacement use of \code{as}.
+In the case of simple inheritance, these methods do the obvious
+computation:  they extract or replace the slots in the object that
+correspond to those in the superclass definition.
+
+The implicitly defined coerce methods may be overridden by a call
+to \code{setAs}; note, however, that the implicit methods are defined for each
+subclass-superclass pair, so that you must override each of these
+explicitly, not rely on inheritance.
+
+When inheritance is defined by a call to \code{setIs}, the coerce methods are provided explicitly, not generated automatically.
+Inheritance will apply (to the \code{from} argument, as described in  the section below).
+You could also supply methods via \code{setAs} for non-inherited relationships, and now these also can be inherited.
+
+For further on the distinction between simple and explicit inheritance, see \code{\link{setIs}}.
+
+}
+\section{How Functions 'as' and 'setAs' Work}{
+  The function \code{as}  turns \code{object} into an object
+  of class \code{Class}.  In doing so, it applies a \dQuote{coerce
+    method}, using S4
+  classes and methods, but in a somewhat special way.
+Coerce methods are methods for the function \code{coerce} or, in the
+replacement case the function \code{`coerce<-`}.
+These functions have two arguments in method signatures, \code{from}
+and \code{to}, corresponding to the class of the object and the
+desired coerce class.
+These functions must not be called directly, but are used to store
+tables of methods for the use of \code{as}, directly and for
+replacements.
+In this section we will describe the direct case, but except where
+noted the replacement case works the same way, using \code{`coerce<-`}
+and the \code{replace} argument to \code{setAs}, rather than
+\code{coerce} and the \code{def} argument.
+
+Assuming the \code{object} is not already of the desired class,
+\code{as} first looks for a method in the table of methods
+ for the function
+  \code{coerce} for the signature \code{c(from = class(object), to =
+    Class)}, in the same way method selection would do its initial lookup.
+To be precise, this means the table of both direct and inherited
+methods, but inheritance is used specially in this case (see below).
+
+If no method is found, \code{as} looks for one.
+First, if either \code{Class} or \code{class(object)} is a superclass
+of the other, the class definition will contain the information needed
+to construct a coerce method.
+In the usual case that the subclass contains the superclass (i.e., has
+all its slots), the method is constructed either by extracting or
+replacing the inherited slots.
+Non-simple extensions (the result of a call to \code{\link{setIs}})
+will usually contain explicit methods, though possibly not for replacement.
+
+ If no subclass/superclass relationship provides a method, \code{as}
+ looks for an inherited method, but applying, inheritance for the argument \code{from} only, not for
+  the argument \code{to} (if you think about it, you'll probably agree
+  that you wouldn't want the result to be from some class other than the
+  \code{Class} specified). Thus,
+  \code{selectMethod("coerce", sig, useInherited= c(from=TRUE, to= FALSE))}
+  replicates the method selection used by \code{as()}.
+
+In nearly all cases the method found in this way will be cached in the
+table of coerce methods (the exception being subclass relationships with a test, which
+are legal but discouraged).
+So the detailed calculations should be done only on the first
+occurrence of a coerce from \code{class(object)} to \code{Class}.
+
+Note that  \code{coerce} is not a standard generic function.  It is
+not intended to be called directly.  To prevent accidentally caching
+an invalid inherited method, calls are routed to an equivalent call to
+\code{as}, and a warning is issued.  Also, calls to
+\code{\link{selectMethod}} for this function may not represent the
+method that \code{as} will choose.  You can only trust the result if
+the corresponding call to \code{as} has occurred previously in this
+session.
+
+  With this explanation as background, the function \code{setAs} does a
+  fairly obvious computation:  It constructs and sets a method for the function
+  \code{coerce} with signature \code{c(from, to)}, using the \code{def}
+  argument to define the body of the method.  The function supplied as
+  \code{def} can have one argument (interpreted as an object to be
+  coerced) or two arguments (the \code{from} object and the \code{to}
+  class).  Either way, \code{setAs} constructs a function of two
+  arguments, with the second defaulting to the name of the \code{to}
+  class.  The method will be called from \code{as} with the object
+  as the \code{from} argument and no \code{to} argument, with the default for this argument being the name of the intended
+  \code{to} class, so the method can use this information in messages.
+
+The direct version of the \code{as} function also has a \code{strict=} argument that defaults to \code{TRUE}.
+Calls during the evaluation of methods for other functions will set this argument to \code{FALSE}.
+The distinction is relevant when the object being coerced is from a simple subclass of the \code{to} class; if \code{strict=FALSE} in this case, nothing need be done.
+For most user-written coerce methods, when the two classes have no subclass/superclass, the \code{strict=} argument is irrelevant.
+
+The \code{replace} argument to \code{setAs} provides a method for
+\code{`coerce<-`}.
+As with all replacement methods, the last argument of the method must
+have the name \code{value} for the object on the right of the
+assignment.
+As with the \code{coerce} method, the first two arguments are
+\code{from, to}; there is no \code{strict=} option for the replace case.
+
+  The function \code{coerce} exists as a repository for
+  such methods, to be selected as described above by the \code{as}
+  function.  Actually dispatching the methods using
+  \code{standardGeneric} could produce incorrect inherited methods, by using
+   inheritance on the
+  \code{to} argument; as mentioned, this is not the logic used for
+  \code{as}.
+  To prevent selecting and caching invalid methods, calls to
+  \code{coerce} are
+  currently mapped into calls to \code{as}, with a warning message.
+}
+
+
+\section{Basic Coercion Methods}{
+  Methods are pre-defined for coercing any object to one of the basic
+  datatypes.  For example, \code{as(x, "numeric")} uses the existing
+  \code{as.numeric} function.  These built-in methods can be listed by
+  \code{showMethods("coerce")}.
+}
+
+\seealso{
+  If you think of using \code{try(as(x, cl))}, consider
+  \code{\link{canCoerce}(x, cl)} instead.
+}
+\references{
+ Chambers, John M. (2016)
+ \emph{Extending R},
+  Chapman & Hall.
+(Chapters 9 and 10.)
+}
+
+\examples{
+## using the definition of class "track" from \link{setClass}
+
+\dontshow{
+setClass("track", slots = c(x="numeric", y="numeric"))
+setClass("trackCurve", contains = "track", slots = c(smooth = "numeric"))
+}
+
+setAs("track", "numeric", function(from) from at y)
+
+t1 <- new("track", x=1:20, y=(1:20)^2)
+
+as(t1, "numeric")
+
+## The next example shows:
+##  1. A virtual class to define setAs for several classes at once.
+##  2. as() using inherited information
+
+setClass("ca", slots = c(a = "character", id = "numeric"))
+
+setClass("cb", slots = c(b = "character", id = "numeric"))
+
+setClass("id")
+setIs("ca", "id")
+setIs("cb", "id")
+
+
+setAs("id", "numeric", function(from) from at id)
+
+CA <- new("ca", a = "A", id = 1)
+CB <- new("cb", b = "B", id = 2)
+
+setAs("cb", "ca", function(from, to )new(to, a=from at b, id = from at id))
+
+as(CB, "numeric")
+
+\dontshow{
+## should generate an error (should have been a function of one argument)
+try(setAs("track", "numeric", function(x, y,z)x at y))
+}
+}
+\keyword{programming}
+\keyword{classes}
+\keyword{methods}
diff --git a/src/library/methods/man/setClass.Rd b/src/library/methods/man/setClass.Rd
index 228c371..7eefe65 100644
--- a/src/library/methods/man/setClass.Rd
+++ b/src/library/methods/man/setClass.Rd
@@ -1,6 +1,6 @@
 % File src/library/methods/man/setClass.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2013 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2017 R Core Team
 % Distributed under GPL 2 or later
 
 \name{setClass}
@@ -8,14 +8,20 @@
 \alias{classGeneratorFunction-class}
 \title{Create a Class Definition}
 \description{
-  Create  a class definition, specifying the representation (the
-  slots) and/or the classes contained in this one (the superclasses),
-  plus other optional details.  As a side effect, the class definition
-  is stored in the specified environment.  A generator function
-  is returned as the value of \code{setClass()}, suitable for creating
-  objects from the class if the class is not virtual.  Of the many
-  arguments to the function only \code{Class},
-  \code{slots=} and \code{contains=} are usually needed.
+  Create  a class definition and return a generator function to create
+  objects from the class.  Typical usage will be
+  of the style:
+
+   \code{myClass <- setClass("myClass", slots= ...., contains =....)}
+
+ where the first argument is the name of the new class and, if supplied, the arguments    
+  \code{slots=} and \code{contains=} specify the slots
+  in the new class and existing classes from which the new class
+  should inherit.  Calls to \code{setClass()} are normally found in the
+  source of a package; when the package is loaded the class will be
+  defined in the package's namespace.  Assigning the generator
+  function with the name of the class is  convenient for users, but
+  not a requirement.
 }
 \usage{
 setClass(Class, representation, prototype, contains=character(),
@@ -24,61 +30,74 @@ setClass(Class, representation, prototype, contains=character(),
 }
 \arguments{
   \item{Class}{character string name for the class.}
-  \item{slots}{ a named list or named character vector.
-    The names are the names of the slots in the new class and
-    the elements are the character string names of  the
-    corresponding classes.
-
-    In rare cases where there is ambiguity about the class of a slot,
-    because two classes of the same name are imported from different
-    packages, the corresponding element of the argument must have a
-    \code{"package"} attribute to disambiguate the choice.
-
-    It is allowed to provide an unnamed character vector as a limiting
-    case, with the elements taken as slot names and all slots having
-    the unrestricted class \code{"ANY"}.
-
-    }
-  \item{contains}{ the names (and optionally package slots) for the
-    \emph{superclasses} of this class.  The special superclass
-    \code{"VIRTUAL"} causes the new class to be created as a
-    virtual class; see the section on virtual classes in \link{Classes}.}
-  \item{prototype}{ an object providing the default
-    data for the slots in this class.  By default, each will be the
-    prototype object for the superclass.  If provided, using a call to
-    \code{\link{prototype}} will carry out some checks. }
-  \item{where}{ the environment in which to store the definition.
-    Should not be supplied in standard use.  For calls to
-    \code{setClass()} appearing in the source code for a package, will
-    default to the namespace of the package.  For calls typed or sourced
-    at the top level in a session, will default to the global environment.
+  \item{slots}{  The names and classes for the slots in the new class.  This argument
+      must be supplied by name, \code{slots=}, in the call, for back compatibility
+      with other arguments no longer recommended.
+
+      The argument must be  vector with a names attribute, the names being those of the slots in
+      the new class.  Each element of the vector specifies an
+      existing class; the corresponding slot must be from this class
+      or a subclass of it.  Usually, this is a character vector
+      naming the classes.  It's also legal for the elements of the
+      vector to be class representation objects, as returned by \code{\link{getClass}}.
+
+
+    As a limiting
+    case,  the argument may be an unnamed character
+    vector;  the elements are  taken as slot names and all slots have
+    the unrestricted class \code{"ANY"}. 
   }
-  \item{validity}{ if supplied, should be a validity-checking method
-    for objects from this class (a function that returns \code{TRUE} if
-    its argument is a valid object of this class and one or more strings
-    describing the failures otherwise).  See \code{\link{validObject}}
-    for details.}
-  \item{S3methods, representation, access, version }{ All these
-      arguments are deprecated from version 3.0.0 of \R and should be
-      avoided.
+  \item{contains}{ A vector specifying existing classes from which
+      this class should inherit. The new class will have all the slots
+      of the superclasses, with the same requirements on the classes
+      of these slots.  This argument
+      must be supplied by name, \code{contains=}, in the call, for back compatibility
+      with other arguments no longer recommended.
       
-      \code{S3methods} is a flag indicating that old-style methods
-      will be written involving this class.  Modern versions of \R
-      attempt to match formal and old-style methods consistently, so
-      this argument is largely irrelevant.
-
-      \code{representation} is an argument inherited from S that
-      included both \code{slots} and \code{contains}, but the use of
-      the latter two arguments is clearer and recommended.
-
-      \code{access} and \code{version} are included for
-      historical compatibility with S-Plus, but ignored.}
-  \item{sealed}{ if \code{TRUE}, the class definition will be sealed,
-    so that another call to \code{setClass} will fail on this class name.
+      See the section \sQuote{Virtual Classes} for the special
+      superclass  \code{"VIRTUAL"}.
+      
+    }
+  \item{prototype, where, validity, sealed, package}{
+      \emph{These arguments are currently allowed, but either they are unlikely to be
+        useful or there are modern alternatives that are preferred.}
+
+     \code{prototype}: supplies an object with the default
+    data for the slots in this class.  A more flexible approach is to
+    write a method for \code{\link{initialize}()}.
+
+  \code{where}: supplies an environment in which to store the definition.
+    Should not be used:  For calls to
+    \code{setClass()} appearing in the source code for a package the
+    definition will be stored in the namespace of the package.
+
+  \code{validity}: supplied a validity-checking method
+    for objects from this class.  For clearer code, use a separate
+    call to \code{\link{setValidity}()}.
+
+  \code{sealed}: if \code{TRUE}, the class definition will be sealed,
+    so that another call to \code{setClass} will fail on this class
+    name.  But the definition is automatically sealed after the
+    namespace is loaded, so explicit sealing it is not needed.
+
+  \code{package}: supplies an optional package name for the class, but
+  the class attribute should be  the package in which the class
+  definition is assigned, as it is by default.
   }
-  \item{package}{ an optional package name for the class.  Should very
-      rarely be used. By default
-    the name of the package in which the class definition is assigned.
+
+  \item{representation, access, version, S3methods }{\emph{All these
+    arguments are deprecated from version 3.0.0 of \R and should be
+    avoided}.
+
+    \code{representation} is an argument inherited from S that
+    included both \code{slots} and \code{contains}, but the use of
+    the latter two arguments is clearer and recommended.
+
+    \code{access} and \code{version} are included for
+    historical compatibility with S-Plus, but ignored.
+ 
+    \code{S3methods} is a flag indicating that old-style methods
+    will be written involving this class; ignored now.
   }
 }
 
@@ -89,7 +108,8 @@ setClass(Class, representation, prototype, contains=character(),
   which will be passed on to the initialize method.  If no
   \code{initialize} method is defined for the class or one of its
   superclasses, the default method expects named arguments with the
-  name of one of the slots.
+  name of one of the slots and unnamed arguments that are objects from
+  one of the contained classes.
 
   Typically the generator function is assigned the name of the class,
   for programming clarity.  This is not a requirement and objects
@@ -112,30 +132,68 @@ of all the slots and the classes required for each of them.
 
 The name of the class determines
 which methods apply directly to objects from this class.  The
-inheritance information specifies which methods apply indirectly,
-through inheritance.  See \link{Methods}.
+superclass information specifies which methods apply indirectly,
+through inheritance.  See \link{Methods_Details} for inheritance in method
+selection.
+
 
 The slots in a class definition will be the union of all the slots
 specified directly by \code{slots} and all the slots in all
 the contained classes.
-There can only be one slot with a given name; specifically, the
-direct and inherited slot names must be unique.
-That does not, however, prevent the same class from being inherited
-via more than one path.
+There can only be one slot with a given name.
+A class may override the definition of a slot with a given name, but
+\emph{only} if the newly specified class is a subclass of the
+inherited one.
+For example, if the contained class had a slot \code{a} with class
+\code{"ANY"}, then a subclass could specify \code{a} with class
+\code{"numeric"},
+but if the original specification for the slot was class
+\code{"character"}, the new call to \code{setClass} would generate an error.
 
-One kind of element in the \code{contains=} argument is special, specifying one of the \R
-object types or one of a few other special \R types (\code{matrix} and
-\code{array}).
-See the section on inheriting from object types, below.
 
 
   Slot names \code{"class"} and \code{"Class"} are not allowed.
   There are other slot names with a special meaning; these names start with
   the \code{"."} character.  To be safe, you should define all of
   your own slots with names starting with an alphabetic character.
+
+Some inherited classes will be treated specially---object types, S3
+classes and a few special cases---whether inherited
+directly or indirectly.  See the next three sections.
 }
 
+\section{Virtual Classes}{
+
+      Classes exist for which no actual objects can be created, the
+      \emph{virtual} classes.
+
+
+      The most common and useful form of virtual class is the \emph{class
+        union}, a virtual class that is defined in a call to
+      \code{\link{setClassUnion}()} rather than a call to
+      \code{setClass()}.
+      This call lists the \emph{members} of the union---subclasses
+      that extend the new class.
+      Methods that are written with the class union in the signature
+      are eligible for use with objects from any of the member classes.
+      Class
+      unions can include as members classes whose
+      definition is otherwise sealed, including basic \R data types.
+
+      Calls to \code{setClass()} will also create a virtual class,
+      either when only the \code{Class} argument is supplied (no slots
+      or superclasses) or when the \code{contains=} argument includes
+      the special class name \code{"VIRTUAL"}.
+
+      In the latter case, a
+      virtual class may include
+      slots to provide some common behavior without fully defining
+      the object---see the class \code{\linkS4class{traceable}} for an
+      example.
+      Note that  \code{"VIRTUAL"} does not carry over to subclasses; a
+      class that contains a virtual class is not itself automatically virtual.
 
+}
 
 \section{Inheriting from Object Types}{
 In addition to containing other S4 classes, a class definition can
@@ -146,6 +204,9 @@ object types or one of the special \R pseudo-classes \code{"matrix"} and
 A class can contain at most one of the object types, directly or indirectly.
 When it does, that contained class determines the \dQuote{data part}
 of the class.
+This appears as a pseudo-slot, \code{".Data"} and can be treated as a
+slot but actually determines
+the type of objects from this slot.
 
 Objects from the new class try to inherit the built in
 behavior of the contained type.
@@ -172,18 +233,18 @@ classes (either S4 or S3) because setting an attribute overwrites the
 object in all contexts.
 It is possible to define a class that inherits from such types,
 through an indirect mechanism that stores the inherited object in a
-reserved slot.
+reserved slot, \code{".xData"}.
 See the
 example for class \code{"stampedEnv"} below.
+An object from such a class does \emph{not} have a \code{".Data"} pseudo-slot.
+
+For most computations, these classes behave transparently as if they
+inherited directly from the anomalous type.
 S3 method dispatch and the relevant \code{as.}\emph{type}\code{()}
 functions should behave correctly, but code that uses the type of the
 object directly will not.
-
-Also, keep in mind that the object passed to low-level computations
-will be the underlying object type, \emph{without} any of the slots
-defined in the class.
-To return the full information, you will usually have to define a
-method that sets the data part.
+For example, \code{as.environment(e1)} would work as expected with the
+\code{"stampedEnv"} class, but \code{typeof(e1)} is \code{"S4"}.
 
 }
 
@@ -205,7 +266,8 @@ Given an S4 object, S3 method dispatch and the \code{\link{inherits}}
 function should use the S4 inheritance information.
 Given an S3 object, an S4 generic function will dispatch S4 methods
 using the S3 inheritance, provided that inheritance has been declared via
-\code{\link{setOldClass}}.
+\code{\link{setOldClass}}.  For details, see \code{\link{setOldClass}}
+and Section 10.8 of the reference.
 
 }
 
@@ -215,7 +277,7 @@ Class definitions normally belong to packages (but can be defined in
 the  global environment as well, by evaluating the expression on the
 command line or in a file sourced from the command line).
 The corresponding package name is part of the class definition; that
-is, part of the \code{classRepresentation} object holding that
+is, part of the \code{\linkS4class{classRepresentation}} object holding that
 definition.  Thus, two classes with the same name can exist in
 different packages, for most purposes.
 
@@ -225,30 +287,30 @@ corresponding class definition will be found, looking from the
 namespace of the current package, assuming the call in question appears directly in the source for the
 package, as it should to avoid ambiguity.
 The  class definition
-must be found in the namespace of the current package, in the imports for that
-namespace or in the basic classes defined by the methods package.
-(The methods package must be included in the \code{Depends} directive
-of the package's \code{"DESCRIPTION"} file in order for the
-\code{"CMD check"} utility to find these classes.)
-
-When this rule does not identify a class uniquely (because it appears
-in more than one imported package) then the \code{\link{packageSlot}}
-of the character string name needs to be supplied with the name.
+must be already defined in this package, in the imports directives of
+the package's \code{DESCRIPTION} and
+\code{NAMESPACE} files or in the basic classes defined by the methods package.
+(The \sQuote{methods} package must be included in the imports directives
+for any package that uses
+S4 methods and classes, to satisfy the
+\code{"CMD check"} utility.)
+
+If a package imports two classes of the same name from separate packages, the \code{\link{packageSlot}}
+of the \code{name} argument needs to be set to the package name of the
+particular class.
 This should be a rare occurrence.
 }
 
 \references{
- Chambers, John M. (2008)
- \emph{Software for Data Analysis: Programming with R}
-  Springer.  (For the R version.)
-
- Chambers, John M. (1998)
- \emph{Programming with Data}
- Springer (For the original S4 version.)
+ Chambers, John M. (2016)
+ \emph{Extending R},
+  Chapman & Hall.
+(Chapters 9 and 10.)
 }
+
 \seealso{
-\code{\link{Classes}} for a general discussion of classes,
-  \code{\link{Methods}} for an analogous discussion of methods,
+  \code{\link{Classes_Details}} for a general discussion of classes,
+  \code{\link{Methods_Details}} for an analogous discussion of methods,
   \code{\link{makeClassRepresentation}}
 }
 \examples{
@@ -258,15 +320,14 @@ This should be a rare occurrence.
  if(isClass("track"))           removeClass("track")
 }
 ## A simple class with two slots
-track <- setClass("track",
-         slots = c(x="numeric", y="numeric"))
+track <- setClass("track", slots = c(x="numeric", y="numeric"))
 ## an object from the class
 t1 <- track(x = 1:10, y = 1:10 + rnorm(10))
 
 ## A class extending the previous, adding one more slot
 trackCurve <- setClass("trackCurve",
-    slots = c(smooth = "numeric"),
-    contains = "track")
+		slots = c(smooth = "numeric"),
+		contains = "track")
 
 ## an object containing a superclass object
 t1s <- trackCurve(t1, smooth = 1:10)
@@ -277,7 +338,6 @@ setClass("trackMultiCurve",
          slots = c(x="numeric", y="matrix", smooth="matrix"),
          prototype = list(x=numeric(), y=matrix(0,0,0),
                           smooth= matrix(0,0,0)))
-## See ?setIs for further examples using these classes
 
 ## A class that extends the built-in data type "numeric"
 
@@ -287,8 +347,8 @@ numWithId <- setClass("numWithId", slots = c(id = "character"),
 numWithId(1:3, id = "An Example")
 
 ## inherit from reference object of type "environment"
-stampedEnv <-setClass("stampedEnv", contains = "environment",
-      slots = c(update = "POSIXct"))
+stampedEnv <- setClass("stampedEnv", contains = "environment",
+                       slots = c(update = "POSIXct"))
 setMethod("[[<-", c("stampedEnv", "character", "missing"),
    function(x, i, j, ..., value) {
        ev <- as(x, "environment")
diff --git a/src/library/methods/man/setClassUnion.Rd b/src/library/methods/man/setClassUnion.Rd
index bdd486d..7e58fda 100644
--- a/src/library/methods/man/setClassUnion.Rd
+++ b/src/library/methods/man/setClassUnion.Rd
@@ -1,6 +1,6 @@
 % File src/library/methods/man/setClassUnion.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2007 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2016 R Core Team
 % Distributed under GPL 2 or later
 
 \name{setClassUnion}
@@ -20,11 +20,10 @@ isClassUnion(Class)
 }
 \arguments{
   \item{name}{ the name for the new union class. }
-  \item{members}{ the classes that should be members of this union.}
-  \item{where}{ where to save the new class definition; by default,
-      the environment of the package in which the \code{setClassUnion}
-      call appears, or the global environment if called outside of the
-      source of a package.}
+  \item{members}{ the names of the classes that should be members of this union.}
+  \item{where}{ where to save the new class definition.  In calls from
+    a package's source code, should be omitted to save the definition
+    in the package's namespace.}
 
 
   \item{Class}{ the name or definition of a class.
@@ -36,29 +35,22 @@ isClassUnion(Class)
       union, as shown in the example below. Class unions can be
       members of other class unions.
 
-      The prototype object in the class union definition will be
-      \code{NULL} if class \code{"NULL"} is a member of the union and
-      the prototype object of the first member class otherwise (as of
-      version 2.15.0 of R; earlier versions had a \code{NULL} prototype even if
-      that was not valid).
-
-  Class unions are the only way to create a class that is extended by
-      a class whose definition is sealed (for example, the
-      basic datatypes or other classes defined in the base or methods
-      package in R are sealed).  You cannot say \code{setIs("function", "other")}
-      unless \code{"other"} is a class union.  In general, a
-      \code{setIs} call of this form changes the definition of the
-      first class mentioned (adding \code{"other"} to the list of
-      superclasses contained in the definition of \code{"function"}).
-
-      Class unions get around this by not modifying the first class
-  definition, relying instead on storing information in the subclasses
-  slot of the class union.  In order for this technique to work, the
-  internal computations for expressions such as
-  \code{\link{extends}(class1, class2)} work
-  differently for class unions than for regular classes; specifically,
-  they test whether any class is in common between the superclasses of
-  \code{class1} and the subclasses of \code{class2}.
+ 
+  Class unions are the only way to create a new superclass of
+      a class whose definition is sealed.  The namespace of all
+      packages is sealed when the package is loaded, protecting the
+      class and other definitions from being overwritten from another
+      class or from the global environment.  A call to
+      \code{\link{setIs}} that tried to define a new superclass for
+      class \code{"numeric"}, for example, would cause an error.
+
+   Class unions are the exception; the class union
+   \code{"maybeNumber"} in the examples defines itself as a new
+   superclass of \code{"numeric"}.  Technically, it does not alter the
+   metadata object in the other package's namespace and, of course,
+   the effect of the class union depends on loading the package it
+   belongs to.  But, basically, class unions are sufficiently useful
+   to justify the exemption.
 
   The different behavior for class unions is made possible because the
   class definition object for class unions has itself a special class,
@@ -67,21 +59,19 @@ isClassUnion(Class)
   }
 
 \references{
- Chambers, John M. (2008)
- \emph{Software for Data Analysis: Programming with R}
-  Springer.  (For the R version.)
-
- Chambers, John M. (1998)
- \emph{Programming with Data}
- Springer (For the original S4 version.)
+ Chambers, John M. (2016)
+ \emph{Extending R},
+  Chapman & Hall.
+(Chapters 9 and 10.)
 }
 
+
 \examples{
 ## a class for either numeric or logical data
 setClassUnion("maybeNumber", c("numeric", "logical"))
 
 ## use the union as the data part of another class
-setClass("withId", representation("maybeNumber", id = "character"))
+setClass("withId", contains = "maybeNumber", slots = c(id = "character"))
 
 w1 <- new("withId", 1:10, id = "test 1")
 w2 <- new("withId", sqrt(w1)\%\%1 < .01, id = "Perfect squares")
diff --git a/src/library/methods/man/setGeneric.Rd b/src/library/methods/man/setGeneric.Rd
index c80f18a..c140b5d 100644
--- a/src/library/methods/man/setGeneric.Rd
+++ b/src/library/methods/man/setGeneric.Rd
@@ -1,99 +1,87 @@
 % File src/library/methods/man/setGeneric.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2007 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2016 R Core Team
 % Distributed under GPL 2 or later
 
 \name{setGeneric}
 \alias{setGeneric}
-\alias{setGroupGeneric}
-\title{Define a New Generic Function}
+\title{Create a Generic Version of a Function}
 \description{
-  Create a new generic function of the given name, that is, a function
-  that dispatches methods according to the classes of the arguments,
-  from among the formal methods defined for this function.
+  Create a generic version of the named function so that methods may
+  be defined for it.  A call to \code{\link{setMethod}} will call
+  \code{setGeneric} automatically if applied to a non-generic
+  function.
+
+  An explicit call to \code{setGeneric} is usually not required, but
+  doesn't hurt and makes explicit that methods are being defined for a
+  non-generic function.
+
+  Standard calls will be of the form:
+  
+  \code{setGeneric(name)}
+
+  where \code{name} specifies an existing function, possibly in another
+  package.  An alternative when creating a new generic function in this package is:
+
+  \code{setGeneric(name, def)}
+
+  where the function definition \code{def} specifies the formal
+  arguments and becomes the default method.
+
 }
 \usage{
 setGeneric(name, def= , group=list(), valueClass=character(),
            where= , package= , signature= , useAsDefault= ,
            genericFunction= , simpleInheritanceOnly = )
-
-setGroupGeneric(name, def= , group=list(), valueClass=character(),
-                knownMembers=list(), package= , where= )
 }
 \arguments{
   \item{name}{ The character string name of the generic function.
-    The simplest (and recommended) call, \code{setGeneric(name)},
-    looks for a function with this name and creates a corresponding
-    generic function,  if the function found was not generic.  In the
-    latter case, the existing function becomes the default method.
   }
-  \item{def}{An optional function object, defining the generic.
-    Don't supply this argument if you want to turn an existing non-generic
-    function into a generic. In this case, you usually want to use the
-    simple call with one argument.
-
-    Do supply \code{def} if there is no
-    current function of this name or for some reason you do not want
-    to use that function to define the generic. In that case, the
-    formal arguments and
-    default values for the generic are taken from \code{def}.  In most
-    cases, the body of \code{def} will then define the default method,
-    as the existing function did in the one-argument call.
-
-    If you want to create a new generic function with \emph{no}
-    default method, then \code{def} should be only a call to
-    \code{\link{standardGeneric}} with the same character string as
-    \code{name}.
+  \item{def}{An optional function object, defining the non-generic
+      version, to become the default method.  This is equivalent in
+      effect to assigning \code{def} as the function and then using
+      the one-argument call to \code{setGeneric}.
 
+      \emph{The following arguments are specialized, optionally used
+        when creating a new generic function with non-standard
+        features. They should not be used when the non-generic is in
+        another package.}
 
   }
-  \item{group}{ Optionally, a character string giving the name of the group
-    generic function to which this function belongs.    See
-    \link{Methods} for details of group generic functions in method selection.
+  \item{group}{ The name of the group
+    generic function to which this function belongs.  See
+    \link{Methods_Details} for details of group generic functions in method
+    selection and \link{S4groupGeneric} for existing groups.
   }
-  \item{valueClass}{ An optional character vector of one or more class
+  \item{valueClass}{ A character vector specifying one or more class
     names.  The value returned by the generic function must
     have (or extend) this class, or one of the classes; otherwise,
     an error is generated.
   }
-  \item{package}{ The name of the package with which this function is
-    associated.  Usually determined automatically (as the package
-    containing the non-generic version if there is one, or else the
-    package where this generic is to be saved).
-  }
-  \item{where}{ Where to store the resulting initial methods definition,
-    and possibly the generic function; by
-    default, stored into the top-level environment.
-  }
   \item{signature}{
-    Optionally, the vector of names, from among the formal arguments to
-    the function, that can appear in the signature of methods for this
-    function, in calls to \code{\link{setMethod}}.  If \dots is one of
-    the formal arguments, it is treated specially.  Starting with
-    version 2.8.0 of \R, \dots may be signature of the generic function.
-    Methods will then be selected if their signature matches all the
-    \dots arguments.  See the documentation for topic \link{dotsMethods}
-    for details.  In the present version, it is not possible to mix
-    \dots and other arguments in the signature (this restriction may be
-    lifted in later versions).
-
-    By default, the signature is inferred from the implicit generic
-    function corresponding to a non-generic function.  If no implicit
-    generic function has been defined, the default is all the formal
-    arguments except \dots, in the order they appear in the function
-    definition. In the case that \dots is the only formal argument, that
-    is also the default signature.  To use \dots as the signature in a
-    function that has any other arguments, you must supply the signature
-    argument explicitly.  See the \dQuote{Implicit Generic} section
-    below for more details.
-  }
-  \item{useAsDefault}{
-    Override the usual choice of default argument.
-    Argument \code{useAsDefault} can be supplied, either as a function
-    to use for the default, or as a logical value.
-    This argument is now rarely needed.
-    See
-    the section on details.
+    The vector of names from among the formal arguments to
+    the function, that will be allowed in the signature of methods for this
+    function, in calls to \code{\link{setMethod}}.  By default and
+    usually, this will be all formal arguments except \code{\dots}.
+
+    A non-standard signature for the generic function may be
+    used to exclude arguments that take advantage of lazy evaluation;
+    in particular, if the argument may \emph{not} be evaluated then it
+    cannot be part of the signature.
+
+    While \code{\dots} cannot be used as part of a general signature,
+    it is possible to have this as the \emph{only} element of the
+    signature.
+    Methods will then be selected if their signature matches
+    all the \code{\dots} arguments.  See the documentation for topic
+    \link{dotsMethods} for details.  It is not
+    possible to mix \code{\dots} and other arguments in the signature.
+
+    It's usually a mistake to omit arguments from the signature in the
+    belief that this improves efficiency.  For method selection, the
+    arguments that are used in the signatures for the \emph{methods}
+    are what counts, and then only seriously on the first call to the
+    function with that combination of classes.
   }
   \item{simpleInheritanceOnly}{
     Supply this argument as \code{TRUE} to require that methods selected
@@ -107,117 +95,144 @@ setGroupGeneric(name, def= , group=list(), valueClass=character(),
     because by definition it must return an object from the same class
     as its argument, and \code{\link{show}}, because it claims to give a
     full description of the object provided as its argument.
+
   }
-  \item{genericFunction}{Don't use; for (possible) internal use only.}
+  \item{useAsDefault}{
+    Override the usual default method mechanism.  Only relevant when
+    defining a nonstandard generic function.
+    See the section \sQuote{Specialized Local Generics}.
 
-  \item{knownMembers}{
-    (For \code{setGroupGeneric} only.)  The names of functions that are
-    known to be members of this group.  This information is used to
-    reset cached definitions of the member generics when information
-    about the group generic is changed.
+    \emph{The remaining arguments are obsolete for normal applications.}
   }
+  \item{package}{ The name of the package with which this function is
+    associated.  Should be determined automatically from the
+    non-generic version.
+     
+  }
+  \item{where}{ Where to store the resulting objects as side effects.
+      The default, to store in the package's namespace, is the only
+      safe choice.
+  }
+  \item{genericFunction}{Obsolete.}
 }
 \section{Basic Use}{
   The \code{setGeneric} function is called to initialize a generic
   function as preparation for defining some methods for that function.
 
-  The simplest and most common situation is that \code{name} is already
-  an ordinary non-generic non-primitive function, and you now want to
-  turn this function into a generic.  In this case you will most often
+  The simplest and most common situation is that \code{name} specifies
+  an existing function, usually in another package. You now want to
+  define methods for this function.  In this case you should
   supply only \code{name}, for example:
 
     \code{setGeneric("colSums")}
 
-  There must be an existing function of this name, on some attached
-  package (in this case package \code{"base"}).  A generic version of
-  this function will be created in the current package (or in the global
-  environment if the call to \code{setGeneric()} is from an ordinary
-  source file or is entered on the command line).  The existing function
+  There must be an existing function of this name (in this case in
+  package \code{"base"}).  The non-generic function can be in the same
+  package as the call, typically the case when you are creating a new
+  function plus methods for it. When the function is in
+  another package, it must be available by name, for
+  example through an \code{importFrom()} directive in this package's
+  \code{NAMESPACE} file. Not required for functions in \code{"base"},
+  which are implicitly imported.
+
+  A generic version of
+  the function will be created in the current package.  The existing function
   becomes the default method, and the package slot of the new generic
   function is set to the location of the original function
-  (\code{"base"} in the example).  It's an important feature that the
-  same generic function definition is created each time, depending in
-  the example only on the definition of \code{print} and where it is
-  found.  The \code{signature} of the generic function, defining which
-  of the formal arguments can be used in specifying methods, is set by
-  default to all the formal arguments except \dots.
-
-  Note that calling \code{setGeneric()} in this form is not strictly
-  necessary before calling \code{setMethod()} for the same function.  If
+  (\code{"base"} in the example).  
+
+  Two special types of non-generic should be noted.
+  Functions that dispatch S3 methods by calling
+  \code{\link{UseMethod}} are ordinary functions, not objects from the
+  \code{"genericFunction"} class.  They are made generic like any
+  other function, but some special considerations apply to ensure that
+  S4 and S3 method dispatch is consistent (see \link{Methods_for_S3}).
+
+  Primitive functions are handled in C code and don't exist as normal
+  functions.
+  A call to \code{setGeneric} is allowed in the simple form, but no
+  actual generic function object is created.  Method dispatch will
+  take place in the C code. See the section on Primitive Functions for
+  more details.
+
+  It's an important feature that the
+  identical generic function definition is created in every package that
+  uses the same \code{setGeneric()} call.
+  When any of these packages is loaded into an \R session, this
+  function will be added to a table of generic functions, and will
+  contain a methods table of all the available methods for the
+  function.
+
+  Calling \code{setGeneric()} is not strictly
+  necessary before calling \code{setMethod()}.  If
   the function specified in the call to \code{setMethod} is not generic,
   \code{setMethod} will execute the call to \code{setGeneric} itself.
-  Declaring explicitly that you want the function to be generic can be
-  considered better programming style; the only difference in the
-  result, however, is that not doing so produces a message noting the
-  creation of the generic function.
-
-  You cannot (and never need to) create an explicit generic version of
-  the primitive functions in the base package.  Those which can be
-  treated as generic functions have methods selected and dispatched from
-  the internal C code, to satisfy concerns for efficiency, and the
-  others cannot be made generic.  See the section on Primitive Functions
-  below.
-
-  The description above is the effect when the package that owns the
-  non-generic function has not created an implicit generic version.
-  Otherwise, it is this implicit generic function that is used. See the
-  section on Implicit Generic Functions below.  Either way, the
-  essential result is that the \emph{same} version of the generic
-  function will be created each time.
+  In the case that the non-generic is in another package, does not
+  dispatch S3 methods and is not a primitive, a message is printed noting the
+  creation of the generic function the first time \code{setMethod} is called.
 
   The second common use of \code{setGeneric()} is to create a new
-  generic function, unrelated to any existing function, and frequently
-  having no default method.  In this case, you need to supply a skeleton
-  of the function definition, to define the arguments for the function.
-  The body of a generic function is usually a standard form,
-  \code{standardGeneric(name)} where \code{name} is the quoted name of
-  the generic function.  When calling \code{setGeneric} in this form,
-  you would normally supply the \code{def} argument as a function of
-  this form.  See the second and third examples below.
-
-  The \code{useAsDefault} argument controls the default method for the
-  new generic.  If not told otherwise, \code{setGeneric} will try to
-  find a non-generic version of the function to use as a default.  So,
-  if you do have a suitable default method, it is often simpler to first
-  set this up as a non-generic function, and then use the one-argument
-  call to \code{setGeneric} at the beginning of this section.  See the
-  first example in the Examples section below.
-
-  If you \emph{don't} want the existing function to be taken as default,
-  supply the argument \code{useAsDefault}.  That argument can be the
-  function you want to be the default method, or \code{FALSE} to force
-  no default (i.e., to cause an error if there is no direct or inherited
-  method selected for a call to the function).
+  generic function, unrelated to any existing function.  See the
+  \code{asRObject()} example below.
+  This case can be handled just like the previous examples, with only
+  the difference that the non-generic function exists in the
+  current package.
+  Again, the non-generic version becomes the default method.
+  For clarity it's best for the assignment to immediately precede the
+  call to \code{setGeneric()} in the source code.
+
+  Exactly the same result can be obtained by supplying the default as
+  the \code{def} argument instead of assigning it.
+  In some applications, there will be no completely general default
+  method. While there is a special mechanism for this (see the
+  \sQuote{Specialized Local Generics} section), the recommendation is to provide a
+  default method that signals an error, but with a message that
+  explains as clearly as you can why a non-default method is needed.
+
 }
-\section{Details}{
+\section{Specialized Local Generics}{
   The great majority of calls to \code{setGeneric()} should either
   have one argument to ensure that an existing function can have
   methods, or arguments \code{name} and \code{def} to create a new
-  generic function and optionally a default method.  If that's not
-  what you plan to do, read on.
+  generic function and optionally a default method.
 
-  If you want to change the behavior of an existing function (typically,
-  one in another package) when you create a generic version, you must
-  supply arguments to \code{setGeneric} correspondingly.  Whatever
-  changes are made, the new generic function will be assigned with a
+  It is possible to create generic functions with nonstandard
+  signatures, or functions that do additional computations besides
+  method dispatch or that belong to a group of generic functions.
+
+  None of these mechanisms should be used with a non-generic function
+  from a \emph{different} package, because the result is to create a
+  generic function that may not be consistent from one package to another.
+  When any such options are used,
+  the new generic function will be assigned with a
   package slot set to the \emph{current} package, not the one in which
-  the non-generic version of the function is found.  This step is
-  required because the version you are creating is no longer the same as
-  that implied by the function in the other package.  A message will be
-  printed to indicate that this has taken place and noting one of the
-  differences between the two functions.  It tends to be a bad idea,
-  because the two versions are now competing for methods, with many
-  chances for mistakes in programming.
+  the non-generic version of the function is found.
+
+  There is a mechanism to define a specialized generic version of a
+  non-generic function, the \code{\link{implicitGeneric}}
+  construction.
+  This defines the generic version, but then reverts the function to
+  it non-generic form, saving the implicit generic in a table to be
+  activated when methods are defined.
+  However, the mechanism can only legitimately be used either for a non-generic
+  in the same package or by the \code{"methods"} package itself.
+  And in the first case, there is no compelling reason not to simply
+  make the function generic, with the non-generic as the default
+  method.
+  See \code{\link{implicitGeneric}} for details.
 
   The body of a generic function usually does nothing except for
   dispatching methods by a call to \code{standardGeneric}.  Under some
   circumstances you might just want to do some additional computation in
   the generic function itself.  As long as your function eventually
-  calls \code{standardGeneric} that is permissible (though perhaps not a
-  good idea, in that it may make the behavior of your function less easy
-  to understand).  If your explicit definition of the generic function
-  does \emph{not} call \code{standardGeneric} you are in trouble,
-  because none of the methods for the function will ever be dispatched.
+  calls \code{standardGeneric} that is permissible.
+  See the example \code{"authorNames"} below.
+
+  In this case, the \code{def} argument will define the nonstandard
+  generic, not the default method.
+  An existing non-generic of the same name and calling sequence should
+  be pre-assigned.  It will become the default method, as usual.
+  (An alternative is the \code{useAsDefault} argument.)
 
   By default, the generic function can return any object.  If
   \code{valueClass} is supplied, it should be a vector of class names;
@@ -227,56 +242,24 @@ setGroupGeneric(name, def= , group=list(), valueClass=character(),
   that more complicated requirements on the result can be specified
   explicitly, by defining a non-standard generic function.
 
-  The \code{setGroupGeneric} function behaves like \code{setGeneric}
-  except that it constructs a group generic function, differing in two
-  ways from an ordinary generic function.  First, this function cannot
-  be called directly, and the body of the function created will contain
-  a stop call with this information.  Second, the group generic function
-  contains information about the known members of the group, used to
-  keep the members up to date when the group definition changes, through
-  changes in the search list or direct specification of methods, etc.
-}
-\section{Implicit Generic Functions}{
-  Saying that a non-generic function \dQuote{is converted to a generic}
-  is more precisely state that the function is converted to the
-  corresponding \emph{implicit} generic function.  If no special action
-  has been taken, any function corresponds implicitly to a generic
-  function with the same arguments, in which all arguments other than
-  \dots can be used.  The signature of this generic function is the
-  vector of formal arguments, in order, except for \dots.
-
-  The source code for a package can define an implicit generic function
-  version of any function in that package (see \link{implicitGeneric}
-  for the mechanism).  You can not, generally, define an implicit
-  generic function in someone else's package. The usual reason for
-  defining an implicit generic is to prevent certain arguments from
-  appearing in the signature, which you must do if you want the
-  arguments to be used literally or if you want to enforce lazy
-  evaluation for any reason.  An implicit generic can also contain some
-  methods that you want to be predefined; in fact, the implicit generic
-  can be any generic version of the non-generic function.  The implicit
-  generic mechanism can also be used to prohibit a generic version (see
-  \code{\link{prohibitGeneric}}).
-
-  Whether defined or inferred automatically, the implicit generic will
-  be compared with the generic function that \code{setGeneric} creates,
-  when the implicit generic is in another package.  If the two functions
-  are identical, then the \code{package} slot of the created generic
-  will have the name of the package containing the implicit generic.
-  Otherwise, the slot will be the name of the package in which the
-  generic is assigned.
-
-  The purpose of this rule is to ensure that all methods defined for a
-  particular combination of generic function and package names
-  correspond to a single, consistent version of the generic function.
-  Calling \code{setGeneric} with only \code{name} and possibly
-  \code{package} as arguments guarantees getting the implicit generic
-  version, if one exists.
-
-  Including any of the other arguments can force a new, local version of
-  the generic function.  If you don't want to create a new version,
-  don't use the extra arguments.
+  If the \code{def} argument calls \code{standardGeneric()} (with or
+  without additional computations) and there is no existing
+  non-generic version of the function, the generic is created without
+  a default method.  This is not usually a good idea:  better to have a
+    default method that signals an error with a message explaining why
+    the default case is not defined.
+
+  A new generic function can be created belonging to an existing group
+  by including the \code{group} argument.  The argument list of the
+  new generic must agree with that of the group. See
+  \code{\link{setGroupGeneric}} for defining a new group generic.
+   For the role of group generics in
+  dispatching methods, see \link{GroupGenericFunctions} and section
+  10.5 of the second reference.
+
+
 }
+
 \section{Generic Functions and Primitive Functions}{
   A number of the basic \R functions are specially implemented as
   primitive functions, to be evaluated directly in the underlying C code
@@ -285,12 +268,23 @@ setGroupGeneric(name, def= , group=list(), valueClass=character(),
   generic as soon as methods (including group methods) are defined on
   them.  Others cannot be made generic.
 
-  Even when methods are defined for such functions, the generic version
-  is not visible on the search list, in order that the C version
-  continues to be called.  Method selection will be initiated in the C
-  code.  Note, however, that the result is to restrict methods for
+
+  Calling \code{setGeneric()} for
+  the primitive functions in the base package differs in that it does not, in fact,
+  generate an explicit generic function.
+  Methods for primitives are selected and dispatched from
+  the internal C code, to satisfy concerns for efficiency.
+  The same is true for a few
+  non-primitive functions that dispatch internally. These include
+  \code{unlist} and \code{as.vector}.
+
+  Note, that the implementation restrict methods for
   primitive functions to signatures in which at least one of the classes
   in the signature is a formal S4 class.
+  Otherwise the internal C code will not look for methods.
+  This is a desirable restriction in principle, since optional
+  packages should not be allowed to change the behavior of basic R
+  computations on existing data types.
 
   To see the generic version of a primitive function, use
   \code{\link{getGeneric}(name)}.  The function
@@ -300,35 +294,31 @@ setGroupGeneric(name, def= , group=list(), valueClass=character(),
   Note that S4 methods can only be set on those primitives which are
   \sQuote{\link{internal generic}}, plus \code{\%*\%}.
 }
+
 \value{
   The \code{setGeneric} function exists for its side effect: saving the
   generic function to allow methods to be specified later.  It returns
   \code{name}.
 }
 \references{
+ Chambers, John M. (2016)
+ \emph{Extending R},
+  Chapman & Hall.
+(Chapters 9 and 10.)
+
  Chambers, John M. (2008)
  \emph{Software for Data Analysis: Programming with R}
-  Springer.  (For the R version.)
+  Springer. (Section 10.5 for some details.)
 
- Chambers, John M. (1998)
- \emph{Programming with Data}
- Springer (For the original S4 version.)
 }
 \examples{
-\dontshow{
-setClass("track", representation(x="numeric", y="numeric"))
-}
+
+## Specify that this package will define methods for plot()
+setGeneric("plot")
 
 ## create a new generic function, with a default method
 setGeneric("props", function(object) attributes(object))
 
-## A new generic function with no default method
-setGeneric("increment",
-  function(object, step, ...)
-    standardGeneric("increment")
-)
-
-
 ###   A non-standard generic function.  It insists that the methods
 ###   return a non-empty character vector (a stronger requirement than
 ###    valueClass = "character" in the call to setGeneric)
@@ -341,6 +331,15 @@ setGeneric("authorNames",
       value
       })
 
+## the asRObject generic function, from package XR
+## Its default method just returns object
+## See the reference, Chapter 12 for methods
+
+setGeneric("asRObject", function(object, evaluator) {
+        object
+})
+
+
 \dontshow{
 setMethod("authorNames", "character", function(text)text)
 
@@ -349,43 +348,38 @@ stopifnot(identical(authorNames(c("me", "you")), c("me", "you")),
           is(tryIt(authorNames(character())), "error"), # empty value
           is(tryIt(authorNames(NULL)), "error"))        # no default method
 }
-
-## An example of group generic methods, using the class
-## "track"; see the documentation of \link{setClass} for its definition
-
-## define a method for the Arith group
-
-setMethod("Arith", c("track", "numeric"),
- function(e1, e2) {
-  e1 at y <- callGeneric(e1 at y , e2)
-  e1
-})
-
-setMethod("Arith", c("numeric", "track"),
- function(e1, e2) {
-  e2 at y <- callGeneric(e1, e2 at y)
-  e2
-})
-
-## now arithmetic operators  will dispatch methods:
-
-t1 <- new("track", x=1:10, y=sort(stats::rnorm(10)))
-
-t1 - 100
-1/t1
-
 \dontshow{
 removeGeneric("authorNames")
-removeClass("track")
-removeMethods("Arith")
 removeGeneric("props")
-removeGeneric("increment")
+removeGeneric("asRObject")
 }
 }
 \seealso{
-  \code{\link{Methods}} and the links there for a general discussion,
+  \code{\link{Methods_Details}} and the links there for a general discussion,
   \code{\link{dotsMethods}} for methods that dispatch on
-  \dQuote{\dots}, and \code{\link{setMethod}} for method definitions.
+  \code{\dots}, and \code{\link{setMethod}} for method definitions.
 }
 \keyword{ programming }
 \keyword{ methods }
+
+
+  % The description above is the effect when the package that owns the
+  % non-generic function has not created an implicit generic version.
+  % Otherwise, it is this implicit generic function that is used. See the
+  % section on Implicit Generic Functions below.  Either way, the
+  % essential result is that the \emph{same} version of the generic
+  % function will be created each time.
+
+  % The \code{useAsDefault} argument controls the default method for the
+  % new generic.  If not told otherwise, \code{setGeneric} will try to
+  % find a non-generic version of the function to use as a default.  So,
+  % if you do have a suitable default method, it is often simpler to first
+  % set this up as a non-generic function, and then use the one-argument
+  % call to \code{setGeneric} at the beginning of this section.  See the
+  % first example in the Examples section below.
+
+  % If you \emph{don't} want the existing function to be taken as default,
+  % supply the argument \code{useAsDefault}.  That argument can be the
+  % function you want to be the default method, or \code{FALSE} to force
+  % no default (i.e., to cause an error if there is no direct or inherited
+  % method selected for a call to the function).
diff --git a/src/library/methods/man/setGroupGeneric.Rd b/src/library/methods/man/setGroupGeneric.Rd
new file mode 100644
index 0000000..19e7e74
--- /dev/null
+++ b/src/library/methods/man/setGroupGeneric.Rd
@@ -0,0 +1,69 @@
+% File src/library/methods/man/setGeneric.Rd
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2016 R Core Team
+% Distributed under GPL 2 or later
+
+\name{setGroupGeneric}
+\alias{setGroupGeneric}
+\title{Create a Group Generic Version of a Function}
+\description{
+
+  The \code{setGroupGeneric} function behaves like \code{\link{setGeneric}}
+  except that it constructs a group generic function, differing in two
+  ways from an ordinary generic function.  First, this function cannot
+  be called directly, and the body of the function created will contain
+  a stop call with this information.  Second, the group generic function
+  contains information about the known members of the group, used to
+  keep the members up to date when the group definition changes, through
+  changes in the search list or direct specification of methods, etc.
+
+  All members of the group must have the identical argument list.
+}
+\usage{
+setGroupGeneric(name, def= , group=list(), valueClass=character(),
+                knownMembers=list(), package= , where= )
+}
+\arguments{
+  \item{name}{the character string name of the generic function.
+   }
+  \item{def}{A function object.  There isn't likely to be an existing
+    nongeneric of this name, so some function needs to be supplied.  Any
+    known member or other function with the same argument list will do,
+    because the group generic cannot be called directly.
+  }
+  \item{group, valueClass}{arguments to pass to
+    \code{\link{setGeneric}}.
+  }
+  \item{knownMembers}{the names of functions that are
+    known to be members of this group.  This information is used to
+    reset cached definitions of the member generics when information
+    about the group generic is changed.
+  }
+  \item{package, where}{passed to \code{\link{setGeneric}}, but
+    obsolete and to be avoided.}
+}
+\value{
+  The \code{setGroupGeneric} function exists for its side effect: saving the
+  generic function to allow methods to be specified later.  It returns
+  \code{name}.
+}
+\references{
+ Chambers, John M. (2016)
+ \emph{Extending R}
+  Chapman & Hall
+}
+\examples{
+\dontrun{
+## the definition of the "Logic" group generic in the methods package
+setGroupGeneric("Logic", function(e1, e2) NULL,
+    knownMembers = c("&", "|"))
+}
+}
+
+\seealso{
+  \code{\link{Methods_Details}} and the links there for a general discussion,
+  \code{\link{dotsMethods}} for methods that dispatch on
+  \code{\dots}, and \code{\link{setMethod}} for method definitions.
+}
+\keyword{ programming }
+\keyword{ methods }
diff --git a/src/library/methods/man/setIs.Rd b/src/library/methods/man/setIs.Rd
new file mode 100644
index 0000000..6f9108f
--- /dev/null
+++ b/src/library/methods/man/setIs.Rd
@@ -0,0 +1,332 @@
+% File src/library/methods/man/setIs.Rd
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2016 R Core Team
+% Distributed under GPL 2 or later
+
+\name{setIs}
+\alias{setIs}
+\title{Specify a Superclass Explicitly}
+\description{
+  \code{setIs} is an explicit alternative
+  to the \code{contains=} argument to \code{\link{setClass}}.  It is
+  only needed to create relations with explicit test or coercion.
+  These have not proved to be of much practical value, so this
+  function should not likely be needed in applications.
+
+  Where the programming goal is to define methods for transforming one
+  class of objects to another, it is usually better practice to call
+  \code{\link{setAs}()}, which requires the transformations to be done explicitly.
+}
+
+\usage{
+setIs(class1, class2, test=NULL, coerce=NULL, replace=NULL,
+      by = character(), where = topenv(parent.frame()), classDef =,
+      extensionObject = NULL, doComplete = TRUE)
+}
+\arguments{
+  \item{class1, class2}{
+    the names of the classes between which \code{is} relations are to be
+    examined defined, or (more efficiently) the class definition
+    objects for the classes.}
+
+  \item{coerce, replace}{
+    functions optionally supplied to coerce the object to
+    \code{class2}, and to alter the object so that \code{is(object, class2)}
+    is identical to \code{value}.  See the details section below.}
+
+  \item{test}{
+    a \emph{conditional} relationship is
+    defined by supplying this function.  Conditional relations are
+    discouraged and are not included in selecting methods.  See the details section below.
+
+  The remaining arguments are for internal use and/or usually omitted.}
+
+  \item{extensionObject}{ alternative to the \code{test, coerce,
+    replace, by} arguments; an object from class
+    \code{SClassExtension} describing the relation.  (Used in internal calls.)}
+
+  \item{doComplete}{when \code{TRUE}, the class definitions will be
+    augmented with indirect relations as well.  (Used in internal calls.)}
+  \item{by}{
+    In a call to \code{setIs}, the name of an intermediary class.
+    Coercion will proceed by first coercing to this class and from there
+    to the target class.  (The intermediate coercions have to be valid.)}
+  \item{where}{
+    In a call to \code{setIs}, where to store the metadata defining the
+    relationship.  Default is the global environment for calls from the
+    top level of the session or a source file evaluated there.  When the
+    call occurs in the top level of a file in the source of a package,
+    the default will be the namespace or environment of the package.
+    Other uses are tricky and not usually a good idea, unless you really
+    know what you are doing.}
+  \item{classDef}{
+    Optional class definition for \code{class} , required internally
+    when \code{setIs} is called during the initial definition of the
+    class by a call to \code{\link{setClass}}. \emph{Don't} use this
+    argument, unless you really know why you're doing so.}
+}
+
+\section{Details}{
+  Arranging for a class to inherit from another class is a key tool in
+  programming.  In \R, there are three basic techniques, the first two
+  providing what is called  \dQuote{simple} inheritance, the preferred form:
+  %%
+  \enumerate{
+  \item
+    By the \code{contains=} argument in a call to \code{\link{setClass}}.  This
+      is and should be the most common mechanism.  It arranges that the new
+      class contains all the structure of the existing class, and in
+      particular all the slots with the same class specified.  The
+      resulting class extension is defined to be \code{simple}, with
+      important implications for method definition (see the section on
+      this topic below).
+
+  \item
+     Making \code{class1} a subclass of a virtual class
+      either by a call to \code{\link{setClassUnion}} to make the
+      subclass a member of a new class union, or by a call to
+      \code{setIs} to add a class to an existing class union or as a new
+      subclass of an existing virtual class.  In either case, the
+      implication should be that methods defined for the class union or
+      other superclass all work correctly for the subclass.  This may
+      depend on some similarity in the structure of the subclasses or
+      simply indicate that the superclass methods are defined in terms
+      of generic functions that apply to all the subclasses.  These
+      relationships are also generally simple.
+
+
+  \item
+    Supplying \code{coerce}  and \code{replace} arguments to \code{setAs}.
+      \R allows arbitrary inheritance relationships, using the same
+      mechanism for defining coerce methods by a call to
+      \code{\link{setAs}}.  The difference between the  two is simply
+      that \code{\link{setAs}} will require a call to \code{\link{as}}
+      for a conversion to take place, whereas after the call to
+      \code{\link{setIs}}, objects will be automatically converted to
+      the superclass.
+
+      The automatic feature is the dangerous part, mainly because it
+      results in the subclass potentially inheriting methods that do
+      not work.  See the section on inheritance below.  If the two
+      classes involved do not actually inherit a large collection of
+      methods, as in the first example below, the danger may be
+      relatively slight.
+
+      If the superclass inherits methods where the subclass has only a
+      default or remotely inherited method, problems are more likely.
+      In this case, a general
+      recommendation is to use the \code{\link{setAs}} mechanism
+      instead, unless there is a strong counter reason. Otherwise, be prepared to
+      override some of  the methods inherited.
+  }
+
+  With this caution given, the rest of this section describes what
+  happens when \code{coerce=} and \code{replace=} arguments are supplied
+  to \code{setIs}.
+
+  The \code{coerce} and \code{replace} arguments are functions that
+  define how to coerce a \code{class1} object to \code{class2}, and
+  how to replace the part of the subclass object that corresponds to
+  \code{class2}.  The first of these is a function of one argument
+  which should be \code{from}, and the second of two arguments
+  (\code{from}, \code{value}).  For details, see the section on coerce
+  functions below .
+
+  When \code{by} is specified, the coerce process first coerces to
+  this class and then to \code{class2}.  It's unlikely you
+  would use the \code{by} argument directly, but it is used in defining
+  cached information about classes.
+
+  The value returned (invisibly) by
+  \code{setIs} is the revised class definition of \code{class1}.
+}
+
+\section{Coerce, replace, and test functions}{
+
+  The  \code{coerce} argument is a function that turns a
+  \code{class1} object into a \code{class2} object.  The
+  \code{replace} argument is a function of two arguments that modifies a \code{class1}
+  object (the first argument) to replace the part of it that
+  corresponds to \code{class2} (supplied as \code{value}, the second
+  argument).  It then returns the modified object as the value of the
+  call.  In other words, it acts as a replacement method to
+  implement the expression \code{as(object, class2) <- value}.
+
+  The easiest way to think of the  \code{coerce} and \code{replace}
+  functions is by thinking of the case that  \code{class1}
+  contains \code{class2} in the usual sense, by including the slots of
+  the second class.  (To repeat, in this situation you would not call
+  \code{setIs}, but the analogy shows what happens when you do.)
+
+  The \code{coerce} function in this case would just make a
+  \code{class2} object by extracting the corresponding slots from the
+  \code{class1} object. The \code{replace} function would replace in
+  the \code{class1} object the slots corresponding to \code{class2},
+  and return the modified object as its value.
+
+  For additional discussion of these functions, see
+  the documentation of the
+   \code{\link{setAs}} function.  (Unfortunately, argument
+   \code{def} to that function corresponds to argument \code{coerce} here.)
+
+  The inheritance relationship can also be conditional, if a function is supplied as the
+  \code{test} argument.  This should be a function of one argument
+  that returns \code{TRUE} or \code{FALSE} according to whether the
+  object supplied satisfies the relation \code{is(object, class2)}.
+  Conditional relations between
+  classes are discouraged in general because they require a per-object
+  calculation to determine their validity. They cannot be applied
+  as efficiently as ordinary relations and tend to make the code that
+  uses them harder to interpret.  \emph{NOTE:  conditional inheritance
+    is not used to dispatch methods.}  Methods for conditional
+  superclasses will not be inherited.  Instead, a method for the
+  subclass should be defined that tests the conditional relationship.
+}
+\section{Inherited methods}{
+  A method written for a particular signature (classes matched to one
+  or more formal arguments to the function) naturally assumes that the
+  objects corresponding to the arguments can be treated as coming from
+  the corresponding classes.  The objects will have all the slots and
+  available methods for the classes.
+
+  The code that selects and dispatches the methods ensures that this
+  assumption is correct.  If the inheritance was \dQuote{simple}, that
+  is, defined by one or more uses of the \code{contains=} argument in
+  a call to \code{\link{setClass}}, no extra work is generally
+  needed.  Classes are inherited from the superclass, with the same
+  definition.
+
+  When inheritance is defined by a general call to
+  \code{setIs}, extra computations are required.  This form of
+  inheritance implies that the subclass does \emph{not} just contain
+  the slots of the superclass, but instead requires the explicit call
+  to the coerce and/or replace method.  To ensure correct computation,
+  the inherited method is supplemented by calls to \code{\link{as}}
+  before the body of the method is evaluated.
+
+  The calls to \code{\link{as}} generated in this case have the
+  argument \code{strict = FALSE}, meaning that extra information can
+  be left in the converted object, so long as it has all the
+  appropriate slots.  (It's this option that allows simple subclass
+  objects to be used without any change.)  When you are writing your
+  coerce method, you may want to take advantage of that option.
+
+  Methods inherited through non-simple extensions can result in ambiguities
+  or unexpected selections.  If \code{class2} is a specialized class
+  with just a few applicable methods, creating the inheritance
+  relation may have little effect on the behavior of \code{class1}.
+  But if \code{class2} is a class with many methods, you may
+  find that you now inherit some undesirable methods for
+  \code{class1}, in some cases, fail to inherit expected methods.
+  In the second example below, the non-simple inheritance from class
+  \code{"factor"} might be assumed to inherit S3 methods via that
+  class.  But the S3 class is ambiguous, and in fact is
+  \code{"character"} rather than \code{"factor"}.
+
+  For some generic functions, methods inherited by non-simple
+  extensions are either known to be invalid or sufficiently likely to
+  be so that the generic function has been defined to exclude such
+  inheritance.  For example \code{\link{initialize}} methods must
+  return an object of the target class; this is straightforward if the
+  extension is simple, because no change is made to the argument
+  object, but is essentially impossible.  For this reason, the generic
+  function insists on only simple extensions for inheritance.  See the
+  \code{simpleInheritanceOnly} argument to \code{\link{setGeneric}}
+  for the mechanism.  You can use this mechanism when defining new
+  generic functions.
+
+  If you get into problems with functions that do allow non-simple
+  inheritance, there are two basic choices.  Either
+  back off from the \code{setIs} call and settle for explicit coercing
+  defined by a call to \code{\link{setAs}}; or, define explicit
+  methods involving \code{class1} to override the bad inherited
+  methods.  The first choice is the safer, when there are serious
+  problems.
+
+}
+
+
+\references{
+ Chambers, John M. (2016)
+ \emph{Extending R},
+  Chapman & Hall.
+(Chapters 9 and 10.)
+}
+
+\examples{
+\dontshow{
+## A simple class with two slots
+setClass("track",
+         slots = c(x="numeric", y="numeric"))
+## A class extending the previous, adding one more slot
+}
+## Two examples of setIs() with coerce= and replace= arguments
+## The first one works fairly well, because neither class has many
+## inherited methods do be disturbed by the new inheritance
+
+## The second example does NOT work well, because the new superclass,
+## "factor", causes methods to be inherited that should not be.
+
+## First example:
+## a class definition (see \link{setClass} for class "track")
+setClass("trackCurve", contains = "track",
+         slots = c( smooth = "numeric"))
+## A class similar to "trackCurve", but with different structure
+## allowing matrices for the "y" and "smooth" slots
+setClass("trackMultiCurve",
+         slots = c(x="numeric", y="matrix", smooth="matrix"),
+         prototype = structure(list(), x=numeric(), y=matrix(0,0,0),
+
+                               smooth= matrix(0,0,0)))
+## Automatically convert an object from class "trackCurve" into
+## "trackMultiCurve", by making the y, smooth slots into 1-column matrices
+setIs("trackCurve",
+      "trackMultiCurve",
+      coerce = function(obj) {
+        new("trackMultiCurve",
+            x = obj at x,
+            y = as.matrix(obj at y),
+            smooth = as.matrix(obj at smooth))
+      },
+      replace = function(obj, value) {
+        obj at y <- as.matrix(value at y)
+        obj at x <- value at x
+        obj at smooth <- as.matrix(value at smooth)
+        obj})
+
+
+\dontshow{
+removeClass("trackMultiCurve")
+removeClass("trackCurve")
+removeClass("track")
+}
+
+## Second Example:
+## A class that adds a slot to "character"
+setClass("stringsDated", contains = "character",
+         slots = c(stamp="POSIXt"))
+
+## Convert automatically to a factor by explicit coerce
+setIs("stringsDated", "factor",
+      coerce = function(from) factor(from at .Data),
+      replace= function(from, value) {
+                  from at .Data <- as.character(value); from })
+\dontshow{
+set.seed(750)
+}
+ll <- sample(letters, 10, replace = TRUE)
+ld <- new("stringsDated", ll, stamp = Sys.time())
+
+levels(as(ld, "factor"))
+levels(ld) # will be NULL--see comment in section on inheritance above.
+
+## In contrast, a class that simply extends "factor"
+## has no such ambiguities
+setClass("factorDated", contains = "factor",
+         slots = c(stamp="POSIXt"))
+fd <- new("factorDated", factor(ll), stamp = Sys.time())
+identical(levels(fd), levels(as(fd, "factor")))
+}
+\keyword{programming}
+\keyword{classes}
+\keyword{methods}
diff --git a/src/library/methods/man/setLoadActions.Rd b/src/library/methods/man/setLoadActions.Rd
index 044330e..b5a5b2f 100644
--- a/src/library/methods/man/setLoadActions.Rd
+++ b/src/library/methods/man/setLoadActions.Rd
@@ -1,5 +1,5 @@
 % File src/library/methods/man/setLoadActions.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 2012-2014 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/methods/man/setMethod.Rd b/src/library/methods/man/setMethod.Rd
index 4aa41fc..33ce80c 100644
--- a/src/library/methods/man/setMethod.Rd
+++ b/src/library/methods/man/setMethod.Rd
@@ -1,49 +1,121 @@
 % File src/library/methods/man/setMethod.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2007 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2016 R Core Team
 % Distributed under GPL 2 or later
 
 \name{setMethod}
 \alias{setMethod}
-\alias{removeMethod}
 \title{ Create and Save a Method }
 \description{
-  Create and save a formal method for a given function and list of classes.
+Create a method for a generic function, corresponding to a signature of classes for the arguments. Standard usage will be of the form:
+
+\code{setMethod(f, signature, definition)}
+
+where \code{f} is the name of the function, \code{signature} specifies the argument classes for which the method applies and \code{definition} is the function definition for the method. 
 }
 \usage{
 setMethod(f, signature=character(), definition,
           where = topenv(parent.frame()),
           valueClass = NULL, sealed = FALSE)
-
-removeMethod(f, signature, where)
 }
 \arguments{
-  \item{f}{ A generic function or the character-string name of the function. }
-  \item{signature}{ A match of formal argument names for \code{f} with
-    the character-string names of corresponding classes.  See the
-    details below; however, if the signature is not trivial, you should use \code{\link{method.skeleton}} to generate a valid call to \code{setMethod}.}
+  \item{f}{ The character-string name of the generic function. The unquoted name usually works as well (evaluating to the generic function), except for a few functions in the base package.}
+  \item{signature}{ The classes required for some of the arguments. Most applications just require one or two character strings matching the first argument(s) in the signature. More complicated cases follow R's rule for argument matching. See the details below; however, if the signature is not trivial, you should use \code{\link{method.skeleton}} to generate a valid call to \code{setMethod}.}
   \item{definition}{ A function definition, which will become the method
     called when the arguments in a call to \code{f} match the
-    classes in \code{signature}, directly or through inheritance. }
-  \item{where}{the environment in which to store the definition of the
-    method.
-For \code{setMethod}, it is recommended to omit this argument and to include the call in source code that is evaluated at the top level; that is, either in an R session by something equivalent to a call to \code{\link{source}}, or as part of the R source code for a package.
-
-    For \code{removeMethod}, the default is the location of the (first)
-    instance of the method for this signature.}
-  \item{valueClass}{ Obsolete and unused, but see the same argument for \code{\link{setGeneric}}. }
-  \item{sealed}{ If \code{TRUE}, the method so defined cannot be
-      redefined by another call to \code{setMethod} (although it can
-      be removed and then re-assigned).}
+    classes in \code{signature}, directly or through inheritance.
+    The definition must be a function with the same formal arguments
+    as the generic; however, \code{setMethod()} will handle methods
+    that add arguments, if \code{\dots} is a formal argument to the generic.
+  See the Details section.
+  }
+  \item{where, valueClass, sealed}{\emph{These arguments are allowed
+        but either obsolete or rarely appropriate.}
+
+      \code{where}: where to store the definition; should be the
+      default, the namespace for the package.
+
+  \code{valueClass}{ Obsolete. }
+
+  \code{sealed}{ prevents the method being redefined, but should never
+    be needed when the method is defined in the source code of a
+    package.}
+}
 }
 \value{
-  These functions exist for their side-effect, in setting or removing a
-  method in the object defining methods for the specified generic.
+  The function exists for its side-effect. The definition will be stored in a special metadata object and incorporated in the generic function when the corresponding package is loaded into an R session. 
+  
+}
+\section{Method Selection: Avoiding Ambiguity}{
+When defining methods, it's important to ensure that methods are
+selected correctly; in particular, packages should be designed to
+avoid ambiguous method selection.
+
+To describe method selection, consider first the case where only one
+formal argument is in the active signature; that is, there is only one
+argument, \code{x} say, for which methods have been defined.
+The generic function has a table of methods, indexed by the class for
+the argument in the calls to \code{setMethod}.
+If there is a method in the table for the class of \code{x} in the
+call, this method is selected.
+
+If not, the next best methods would correspond to the direct
+superclasses of \code{class(x)}---those appearing in the
+\code{contains=} argument when that class was defined.
+If there is no method for any of these, the next best would correspond
+to the direct superclasses of the first set of superclasses, and so
+on.
+
+The first possible source of ambiguity arises if the class has several
+direct superclasses and methods have been defined for more than one of
+those;
+\R will consider these equally valid and report an ambiguous choice.
+If your package has the class definition for \code{class(x)}, then you
+need to define a method explicitly for this combination of generic
+function and class.
+
+When more than one formal argument appears in the method signature, \R
+requires the \dQuote{best} method to be chosen  unambiguously for each
+argument.
+Ambiguities arise when one method is specific about one argument while
+another is specific about a different argument.
+A call that satisfies both requirements is then ambiguous:  The two
+methods look equally valid, which should be chosen?
+In such cases the package needs to add a third method requiring both
+arguments to match.
+
+The most common examples arise with binary operators.  Methods may be
+defined for individual operators, for special groups of operators such as
+\code{\link{Arith}} or for group \code{\link{Ops}}.
 
-  The value returned by \code{removeMethod} is \code{TRUE} if a method
-  was found to be removed.
 }
-\details{
+\section{Exporting Methods}{
+If a package defines methods for generic functions, those methods
+should be exported if any of the classes involved are exported; in
+other words, if someone using the package might expect these methods
+to be called.
+Methods are exported by including an \code{exportMethods()} directive
+in the \code{NAMESPACE} file for the package, with the arguments to
+the directive being the names of the generic functions for which
+methods have been defined.
+
+Exporting methods is always desirable in the sense of declaring what
+you want to happen, in that you do expect users to find such methods.
+It can be essential in the case that the method was defined for a
+function that is not originally a generic function in its own package
+(for example, \code{plot()} in the \code{graphics} package).  In this
+case it may be that the version of the function in the \R session is
+not generic, and your methods will not be called.
+
+Exporting methods for a function also exports the generic version of
+the function.
+Keep in mind that this does \emph{not} conflict with the function as
+it was originally defined in another package; on the contrary, it's
+designed to ensure that the function in the \R session dispatches
+methods correctly for your classes and continues to behave as expected
+when no specific methods apply.  See \link{Methods_Details} for the actual mechanism.
+}
+\section{Details}{
 The call to \code{setMethod} stores the supplied method definition  in
 the metadata table for this generic function in the environment,
 typically the global environment or the namespace of a package.
@@ -93,9 +165,10 @@ the table in the generic function itself, for the duration of the session.
 
 
   Method definitions can
-  have default expressions for arguments, but a current limitation is
-  that the generic function must have \emph{some} default expression for the
-  same argument in order for the method's defaults to be used.
+  have default expressions for arguments, but only if
+  the generic function must have \emph{some} default expression for the
+  same argument. (This restriction is imposed by the way \R manages
+  formal arguments.)
   If so, and if the corresponding argument is
   missing in the call to the generic function, the default expression
   in the method is used.  If the method definition has no default for
@@ -103,12 +176,13 @@ the table in the generic function itself, for the duration of the session.
   generic function itself is used, but note that this expression will
   be evaluated using the enclosing environment of the method, not of
   the generic function.
-  Note also that specifying class \code{"missing"} in the signature
-  does not require any default expressions, and method selection does
+  Method selection does
   not evaluate default expressions.
   All actual (non-missing) arguments in the signature of the
   generic function will be evaluated when a method is selected---when
   the call to \code{standardGeneric(f)} occurs.
+  Note that specifying class \code{"missing"} in the signature
+  does not require any default expressions.
 
   It is possible to have some differences between the
   formal arguments to a method supplied to \code{setMethod} and those
@@ -133,73 +207,80 @@ the table in the generic function itself, for the duration of the session.
   the inheritance calculations only need to be done once per session
   per sequence of actual classes.
   See
-  \link{Methods} for more details.
-
-The function \code{removeMethod} removes the specified method from the
-metadata table in the corresponding environment.
-It's not a function that is used much, since one normally wants to
-redefine a method rather than leave no definition.
+  \link{Methods_Details} and Section 10.7 of the reference for more details.
 
 }
-\references{
- Chambers, John M. (2008)
- \emph{Software for Data Analysis: Programming with R}
-  Springer.  (For the R version.)
 
- Chambers, John M. (1998)
- \emph{Programming with Data}
- Springer (For the original S4 version.)
+\references{
+ Chambers, John M. (2016)
+ \emph{Extending R},
+  Chapman & Hall.
+(Chapters 9 and 10.)
 }
+
 \examples{
-\dontshow{  require(stats)
-  setClass("track",
-    representation(x="numeric", y = "numeric"))
-  setClass("trackCurve", representation("track",
-    smooth = "numeric"))
-  setClass("trackMultiCurve", representation(x="numeric", y="matrix", smooth="matrix"),
-          prototype = list(x=numeric(), y=matrix(0,0,0), smooth=
-  matrix(0,0,0)))
-}
+
+## examples for a simple class with two numeric slots.
+## (Run example(setMethod) to see the class and function definitions)
+\dontshow{
+  setClass("track", slots = c(x="numeric", y = "numeric"))
+
+  cumdist <- function(x, y) c(0., cumsum(sqrt(diff(x)^2 + diff(y)^2)))
+  setClass("trackMultiCurve", slots = c(x="numeric", y="matrix", smooth="matrix"),
+          prototype = list(x=numeric(), y=matrix(0,0,0), smooth= matrix(0,0,0)))
 
 require(graphics)
-## methods for plotting track objects (see the example for \link{setClass})
+}
+
+## methods for plotting track objects 
 ##
-## First, with only one object as argument:
+## First, with only one object as argument, plot the two slots
+##  y must be included in the signature, it would default to "ANY"
 setMethod("plot", signature(x="track", y="missing"),
-  function(x,  y, ...) plot(slot(x, "x"), slot(x, "y"), ...)
+  function(x,  y, ...) plot(x at x, x at y, ...)
 )
-## Second, plot the data from the track on the y-axis against anything
-## as the x data.
-setMethod("plot", signature(y = "track"),
- function(x, y, ...) plot(x, slot(y, "y"), ...)
+
+## plot numeric data on either axis against a track object
+## (reducing the track object to the cumulative distance along the track)
+## Using a short form for the signature, which matches like formal arguments
+setMethod("plot", c("track", "numeric"),
+ function(x, y, ...) plot(cumdist(x at x, x at y), y,  xlab = "Distance",...)
 )
-## and similarly with the track on the x-axis (using the short form of
-## specification for signatures)
-setMethod("plot", "track",
- function(x, y, ...) plot(slot(x, "y"), y,  ...)
+
+## and similarly for the other axis
+setMethod("plot", c("numeric", "track"),
+ function(x, y, ...) plot(x, cumdist(y at x, y at y),  ylab = "Distance",...)
 )
+
 t1 <- new("track", x=1:20, y=(1:20)^2)
-tc1 <- new("trackCurve", t1)
-slot(tc1, "smooth") <- smooth.spline(slot(tc1, "x"), slot(tc1, "y"))$y #$
 plot(t1)
 plot(qnorm(ppoints(20)), t1)
-## An example of inherited methods, and of conforming method arguments
-## (note the dotCurve argument in the method, which will be pulled out
-## of ... in the generic.
-setMethod("plot", c("trackCurve", "missing"),
-function(x, y, dotCurve = FALSE, ...) {
-  plot(as(x, "track"))
-  if(length(slot(x, "smooth") > 0))
-    lines(slot(x, "x"), slot(x, "smooth"),
-         lty = if(dotCurve) 2 else 1)
+
+## Now a class that inherits from "track", with a vector for data at
+## the points 
+  setClass("trackData", contains = c("numeric", "track"))
+
+
+tc1 <- new("trackData", t1, rnorm(20))
+
+
+## a method for plotting the object
+## This method has an extra argument, allowed because ... is an
+## argument to the generic function.
+setMethod("plot", c("trackData", "missing"),
+function(x, y, maxRadius = max(par("cin")), ...) {
+  plot(x at x, x at y, type = "n", ...)
+  symbols(x at x, x at y, circles = abs(x), inches = maxRadius)
   }
 )
-## the plot of tc1 alone has an added curve; other uses of tc1
-## are treated as if it were a "track" object.
-plot(tc1, dotCurve = TRUE)
+plot(tc1)
+
+## Without other methods for "trackData", methods for "track"
+## will be selected by inheritance
+
 plot(qnorm(ppoints(20)), tc1)
 
-## defining methods for a special function.
+## defining methods for primitive function.
 ## Although "[" and "length" are not ordinary functions
 ## methods can be defined for them.
 setMethod("[", "track",
@@ -212,216 +293,47 @@ plot(t1[1:15])
 setMethod("length", "track", function(x)length(x at y))
 length(t1)
 
-## methods can be defined for missing arguments as well
-setGeneric("summary") ## make the function into a generic
-
-## A method for summary()
-## The method definition can include the arguments, but
-## if they're omitted, class "missing" is assumed.
-
-setMethod("summary", "missing", function() "<No Object>")
-
-\dontshow{
-
-stopifnot(identical(summary(), "<No Object>"))
-
-removeMethods("summary")
-
-## for the primitives
-## inherited methods
-
-length(tc1)
-tc1[-1]
+## Methods for binary operators
+## A method for the group generic "Ops" will apply to all operators
+## unless a method for a more specific operator has been defined.
 
-## make sure old-style methods still work.
-t11 <- t1[1:15]
-identical(t1 at y[1:15], t11 at y)
+## For one trackData argument, go on with just the data part
+setMethod("Ops", signature(e1 = "trackData"),
+    function(e1, e2) callGeneric(e1 at .Data, e2))
 
-## S3 methods, with nextMethod
-form <- y ~ x
-form[1]
+setMethod("Ops", signature(e2 = "trackData"),
+    function(e1, e2) callGeneric(e1, e2 at .Data))
 
-## S3 arithmetic methods
-ISOdate(1990, 12, 1)- ISOdate(1980, 12, 1)
+## At this point, the choice of a method for a call with BOTH
+## arguments from "trackData" is ambiguous.  We must define a method.
 
-## group methods
+setMethod("Ops", signature(e1 = "trackData", e2 = "trackData"),
+    function(e1, e2) callGeneric(e1 at .Data, e2 at .Data))
+## (well, really we should only do this if the "track" part
+## of the two arguments matched)
 
-setMethod("Arith", c("track", "numeric"), function(e1, e2){e1 at y <-
-  callGeneric(e1 at y , e2); e1})
+tc1 +1
 
+1/tc1
 
-t1  - 100.
-
-t1/2
-
-
-## check it hasn't screwed up S3 methods
-ISOdate(1990, 12, 1)- ISOdate(1980, 12, 1)
-
-## test the .Generic mechanism
-
-setMethod("Compare", signature("track", "track"),
-  function(e1,e2) {
-  switch(.Generic,
-   "==" = e1 at y == e2 at y,
-  NA)
- })
-
-#stopifnot(all(t1==t1))
-#stopifnot(identical(t1<t1, NA))
-
-
-## A test of nested calls to "[" with matrix-style arguments
-## applied to data.frames (S3 methods)
-
-setMethod("[", c("trackMultiCurve", "numeric", "numeric"), function(x, i, j, ..., drop) {
-### FIXME:  a better version has only 1st arg in signature
-### and uses callNextMethod, when this works with primitives.
-    x at y <- x at y[i, j, drop=FALSE]
-    x at x <- x at x[i]
-    x
-})
-
-
-"testFunc" <-
-function(cur) {
-    sorted <- cur[order(cur[,1]),]
-    sorted[ !is.na(sorted[,1]), ]
-}
-
-Nrow <- 1000 # at one time, values this large triggered a bug in gc/protect
-## the loop here was a trigger for the bug
-Niter <- 10
-for(i in 1:Niter)  {
-    yy <- matrix(stats::rnorm(10*Nrow), 10, Nrow)
-    tDF <- as.data.frame(yy)
-    testFunc(tDF)
-}
-
-
-tMC <- new("trackMultiCurve", x=seq_len(Nrow), y = yy)
-## not enough functions have methods for this class to use testFunc
-
-stopifnot(identical(tMC[1:10, 1:10]@y, yy[1:10, 1:10]))
-
-
-## verify we can remove methods and generic
-
-removeMethods("-")
-removeMethod("length", "track")
-removeMethods("Arith")
-removeMethods("Compare")
-
-## repeat the test one more time on the primitives
-
-length(ISOdate(1990, 12, 1)- ISOdate(1980, 12, 1))
-
-removeMethods("length")
-
-## methods for \%*\%, which isn't done by the same C code as other ops
-
-setClass("foo", representation(m="matrix"))
-m1 <- matrix(1:12,3,4)
-f1 = new("foo", m=m1)
-f2 = new("foo", m=t(m1))
-
-setMethod("\%*\%", c("foo", "foo"),
- function(x,y)callGeneric(x at m, y at m))
-
-stopifnot(identical(f1\%*\%f2, m1\%*\% t(m1)))
-
-removeMethods("\%*\%")
-
-removeMethods("plot")
-
-## Hold until removeMethods revised: stopifnot(existsFunction("plot", FALSE) && !isGeneric("plot", 1))
-
-## methods for plotData
-plotData <- function(x, y, ...) plot(x, y, ...)
-
-setGeneric("plotData")
-
-setMethod("plotData", signature(x="track", y="missing"),
-  function(x,  y, ...) plot(slot(x, "x"), slot(x, "y"), ...)
-)
-## and now remove the whole generic
-removeGeneric("plotData")
-
-stopifnot(!exists("plotData", 1))
-
-##  Tests of method inheritance & multiple dispatch
-setClass("A0", representation(a0 = "numeric"))
-
-setClass("A1", representation("A0", a1 = "character"))
-
-setClass("B0" ,representation(b0 = "numeric"))
-
-setClass("B1", "B0")
-
-setClass("B2", representation("B1", b2 = "logical"))
-
-setClass("AB0", representation("A1", "B2", ab0 = "matrix"))
-
-f1 <- function(x,  y)"ANY"
-
-setGeneric("f1")
-
-setMethod("f1", c("A0", "B1"), function(x, y)"A0 B1")
-setMethod("f1", c("B1", "A0"), function(x, y)"B1 A0")
-
-a0 <- new("A0")
-a1 <- new("A1")
-b0 <- new("B0")
-b1 <- new("B1")
-b2 <- new("B2")
-
-deparseText <- function(expr)
-    paste(deparse(expr), collapse = "\\  ")
-
-mustEqual <- function(e1, e2){
-    if(!identical(e1, e2))
-        stop(paste("!identical(", deparseText(substitute(e1)),
-                   ", ", deparseText(substitute(e2)), ")", sep=""))
-}
-
-mustEqual(f1(a0, b0), "ANY")
-mustEqual(f1(a1,b0), "ANY")
-mustEqual(f1(a1,b1), "A0 B1")
-mustEqual(f1(b1,a1), "B1 A0")
-mustEqual(f1(b1,b1), "ANY")
-
-## remove classes:  order matters so as not to undefine earlier classes
-for(.cl in c("AB0", "A1", "A0", "B2", "B1", "B0"))
-    removeClass(.cl)
-
-removeGeneric("f1")
-
-## test of nonstandard generic definition
-
-setGeneric("doubleAnything", function(x) {
-  methodValue <- standardGeneric("doubleAnything")
-  c(methodValue, methodValue)
-})
-
-setMethod("doubleAnything", "ANY", function(x)x)
-
-setMethod("doubleAnything", "character",
-function(x)paste("<",x,">",sep=""))
-
-mustEqual(doubleAnything(1:10), c(1:10, 1:10))
-mustEqual(doubleAnything("junk"), rep("<junk>",2))
-
-removeGeneric("doubleAnything")
-
+all(tc1 == tc1)
 
+\dontshow{
+removeClass("trackData")
+removeClass("track")
 }
 }
 
 \seealso{
 
+\link{Methods_for_Nongenerics} discusses method definition for
+functions that are not generic functions in their original package;
+\link{Methods_for_S3} discusses the integration of formal methods with the
+older S3 methods.
+
 \code{\link{method.skeleton}}, which is the recommended way to generate a skeleton of the call to \code{setMethod}, with the correct formal arguments and other details.
 
-\link{Methods} and the links there for a general discussion, \code{\link{dotsMethods}} for methods that dispatch on
+\link{Methods_Details} and the links there for a general discussion, \code{\link{dotsMethods}} for methods that dispatch on
   \dQuote{\dots}, and \code{\link{setGeneric}} for generic functions.
 }
 
diff --git a/src/library/methods/man/setOldClass.Rd b/src/library/methods/man/setOldClass.Rd
index 555c066..bd918b5 100644
--- a/src/library/methods/man/setOldClass.Rd
+++ b/src/library/methods/man/setOldClass.Rd
@@ -1,6 +1,6 @@
 % File src/library/methods/man/setOldClass.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2010 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2010, 2016 R Core Team
 % Distributed under GPL 2 or later
 
 \name{setOldClass}
@@ -50,12 +50,24 @@
 \title{Register Old-Style (S3) Classes and Inheritance}
 \description{
   Register an old-style (a.k.a. \sQuote{S3}) class as a formally defined
-  class. The \code{Classes} argument is the character vector used as the
-  \code{class} attribute; in particular, if there is more than one
-  string, old-style class inheritance is mimicked.  Registering via
-  \code{setOldClass} allows S3 classes to appear in method signatures,
-  as a slot in an S4 class, or as a superclass of an S4 class.
+  class. Simple usage will be of the form:
+
+\code{setOldClass(Classes)}
+
+
+where \code{Classes} is the character vector that would be the
+  \code{class} attribute of the S3 object. Calls to
+  \code{setOldClass()} in the code for a package
+  allow the class to be used as a slot in formal (S4) classes and in
+  signatures for methods (see \link{Methods_for_S3}).
+  Formal classes can also contain a registered S3 class (see
+  \link{S3Part} for details).
+
+  If the S3 class has a known set of attributes, an
+  equivalent S4 class can be specified by \code{S4Class=} in the call to
+  \code{setOldClass()}; see the section  \dQuote{Known Attributes}.
 }
+
 \usage{
 setOldClass(Classes, prototype, where, test = FALSE, S4Class)
 }
@@ -69,79 +81,64 @@ setOldClass(Classes, prototype, where, test = FALSE, S4Class)
     can be specified, if the S3 class is known to require its data to
     be of that form.
   }
-\item{prototype}{
-    An optional object to use as the prototype.  This should be provided
-    as the default S3 object for the class.  If omitted, the S4 class
-    created to register the S3 class is \code{VIRTUAL}.  See the
-    details.
-  }
-  \item{where}{
-    Where to store the class definitions, the global or top-level
-    environment by default.  (When either function is called in the
-    source for a package, the class definitions will be included in the
-    package's environment by default.)
-  }
-  \item{test}{flag, if \code{TRUE}, arrange to test inheritance
-    explicitly for each object, needed if the S3 class can have a
-    different set of class strings, with the same first string.
-    This is a different mechanism in implementation and should be
-    specified separately for each pair of classes that have an
-    optional inheritance.  See the \sQuote{Details}.
-  }
   \item{S4Class}{ optionally, the class definition or the class name
     of an S4 class.  The new class will have all the slots and other
-    properties of this class, plus its S3 inheritance as defined by
-    the \code{Classses} argument.  Arguments \code{prototype} and
-    \code{test} must not be supplied in this case.  See the section
+    properties of this class, plus any S3 inheritance implied by
+    multiple names in the \code{Classes} argument.  See the section
     on \dQuote{S3 classes with known attributes} below.
   }
+  \item{prototype, where, test}{\emph{These arguments are currently
+        allowed, but not recommended in typical applications.}
+
+  \code{prototype}:
+    An optional object to use as the prototype.  If the S3 class is
+    not to be \code{VIRTUAL} (the default), the use of \code{S4Class=} is
+    preferred. 
+  
+  \code{where}:
+    Where to store the class definitions. Should be the default (the
+    package namespace) for normal use in an application package.
+  
+  \code{test}: flag, if \code{TRUE}, arrange to test inheritance
+    explicitly for each object, needed if the S3 class can have a
+    different set of class strings, with the same first string.
+    Such classes are inherently malformed, are rare, and should be avoided.
+  }
 }
 \details{
-  Each of the names will be defined as an S4 class, extending the
-  remaining classes in \code{Classes}, and the class \code{oldClass},
-  which is the \sQuote{root} of all old-style classes. S3 classes have
-  no formal definition, and therefore no formally defined slots. If a
-  \code{prototype} argument is supplied in the call to
-  \code{setOldClass()}, objects from the class can be generated, by a
-  call to \code{\link{new}}; however, this usually not as relevant as
-  generating objects from subclasses (see the section on extending S3
-  classes below).   If  a prototype is not provided,
-   the class will be created as a virtual S4 class.
-  The main disadvantage is that the prototype object in an S4 class that
-  uses this class as a slot will have a \code{NULL} object in that slot,
-  which can sometimes lead to confusion.
-
-  Beginning with version 2.8.0 of \R, support is provided for using a
-  (registered) S3 class as a superclass of a new S4 class.  See the
-  section on extending S3 classes below, and the examples.
-
-  See \link{Methods} for the details of method dispatch and
-  inheritance.
+  The name (or each of the names) in \code{Classes} will be defined as an S4 class, extending class \code{oldClass},
+  which is the \sQuote{root} of all old-style classes.  S3 classes
+  with multiple names in their class attribute will have a
+  corresponding inheritance as formal classes.  See the \code{"mlm"} example.
+
+  S3 classes have
+  no formal definition, and therefore no formally defined slots.
+  If no S4 class is supplied as a model, the class created will be a
+  virtual class.
+  If a virtual class (any virtual class) is used for a slot in another class, then the
+  initializing method for the class needs to put something legal in
+  that slot; otherwise it will be set to \code{NULL}.
+
+  See \link{Methods_for_S3} for the details of method dispatch and
+  inheritance with mixed S3 and S4 methods.
 
   Some S3 classes cannot be represented as an ordinary combination of S4
-  classes and superclasses, because objects from the S3 class can have a
-  variable set of strings in the class. It is still possible to register
+  classes and superclasses, because objects with the same initial
+  string in the class attribute can have different strings following.
+  Such  classes are fortunately rare.  They violate the basic idea of
+  object-oriented programming and should be avoided.  
+  If you must deal with them, it is still possible to register
   such classes as S4 classes, but now the inheritance has to be verified
   for each object, and you must call \code{setOldClass} with argument
-  \code{test=TRUE} once for each superclass.
-
-  For example, ordered factors \emph{always} have the S3
-  class \code{c("ordered", "factor")}.  This is proper behavior, and
-  maps simply into two S4 classes, with \code{"ordered"} extending
-  \code{"factor"}.
-
-  But objects whose class attribute has \code{"POSIXt"} as the first
-  string may have either (or neither) of \code{"POSIXct"} or
-  \code{"POSIXlt"} as the second string.  This behavior can be mapped
-  into S4 classes but now to evaluate \code{is(x, "POSIXlt")}, for
-  example, requires checking the S3 class attribute on each object.
-  Supplying the \code{test=TRUE} argument to \code{setOldClass} causes
-  an explicit test to be included in the class definitions.  It's
-  never wrong to have this test, but since it adds significant
-  overhead to methods defined for the inherited classes, you should
-  only supply this argument if it's known that object-specific tests
-  are needed.
+  \code{test=TRUE}.
+}
 
+\section{Pre-Defined Old Classes}{
+
+  Many of the widely used S3 classes in the standard R distribution
+  come pre-defined for use with S4.  These don't need to be explicitly
+  declared in your package (although it does no harm to do so).
+ 
   The list \code{.OldClassesList} contains the old-style classes that
   are defined by the methods package.  Each element of the list is a
   character vector, with multiple strings if inheritance is included.
@@ -151,82 +148,6 @@ setOldClass(Classes, prototype, where, test = FALSE, S4Class)
   the list.
 }
 
-\section{Extending S3 classes}{
-  A call to \code{setOldClass} creates formal classes corresponding
-  to S3 classes, allows these to be used as slots in other classes or in
-  a signature in \code{\link{setMethod}}, and mimics the S3
-  inheritance.
-
-  In documentation for the initial implementation of S4 classes in \R,
-  users were warned against defining S4 classes that contained S3
-  classes, even if those had been registered.  The warning was based
-  mainly on two points.  1: The S3 behavior of the objects would fail
-  because the S3 class would not be visible, for example, when S3
-  methods are dispatched.  2: Because S3 classes have no formal
-  definition, nothing can be asserted in general about the S3 part of
-  an object from such a class.  (The warning was repeated as recently
-  as the first reference below.)
-
-  Nevertheless, defining S4 classes to contain an S3 class and extend
-  its behavior is attractive in many applications.  The alternative is
-  to be stuck with S3 programming, without the flexibility and security of
-  formal class and method definitions.
-
-  Beginning with version 2.8.0, \R provides support for extending
-  registered S3 classes; that is, for new classes defined by a call to
-  \code{\link{setClass}} in which the \code{contains=} argument
-  includes an S3 class.  See the examples below.  The support is aimed
-  primarily at providing the S3 class information for all classes that
-  extend class \linkS4class{oldClass}, in particular by ensuring that
-  all objects from such classes contain the S3 class in a special
-  slot.
-
-  There are three different ways to indicate an extension to an existing
-  S3 class:  \code{setOldClass()},  \code{setClass()} and
-  \code{setIs()}.  In most cases, calling \code{setOldClass} is the
-  best approach,  but the alternatives may be preferred in the special
-  circumstances described below.
-
-  Suppose \code{"A"} is any class extending \code{"oldClass"}. then
-
-  \code{setOldClass(c("B", "A"))}
-
-  creates a new class \code{"B"} whose S3 class
-  concatenates \code{"B"}  with \code{S3Class("A")}.  The new class is a
-  virtual class.  If \code{"A"} was defined with known attribute/slots,
-  then \code{"B"} has these slots also; therefore, you must believe that
-  the corresponding S3 objects from class \code{"B"} do indeed have the
-  claimed attributes.  Notice that you can supply an S4 definition for the
-  new class to specify additional attributes (as described in the next
-  section.)
-  The first alternative call produces a non-virtual class.
-
-  \code{setClass("B", contains = "A")}
-
-  This creates a non-virtual class with the same slots and superclasses
-  as class \code{"A"}.  However, class \code{"B"} is not included in
-  the S3 class slot of the new class, unless you provide it explicitly
-  in the prototype.
-
-  \code{setClass("B"); setIs("B", "A", .....)}
-
-  This creates a virtual class that extends \code{"A"}, but does not
-  contain the slots of \code{"A"}.  The additional arguments to
-  \code{\link{setIs}} should provide a coerce and replacement method.
-  In order for the new class to inherit S3 methods, the coerce method must
-  ensure that the class \code{"A"} object produced has a suitable S3
-  class.  The only likely reason to prefer this third approach is that
-  class \code{"B"} is not consistent with known attributes in class
-  \code{"A"}.
-
-  Beginning with version 2.9.0 of \R, objects from a class extending an
-  S3 class will be converted to the corresponding S3 class when being
-  passed to an S3 method defined for that class (that is, for one of the
-  strings in the S3 class attribute).  This is intended to ensure, as
-  far as possible, that such methods will work if they work for ordinary
-  S3 objects.  See \code{\link{Classes}} for details.
-}
-
 \section{S3 Classes with known attributes}{
   A further specification of an S3 class can be made \emph{if} the
   class is guaranteed to have some attributes of known class (where as
@@ -235,15 +156,19 @@ setOldClass(Classes, prototype, where, test = FALSE, S4Class)
 
   In this case, the call to \code{setOldClass()} can supply an S4 class
   definition representing the known structure.  Since S4 slots are
-  implemented as attributes (largely for just this reason), the know
+  implemented as attributes (largely for just this reason), the known
   attributes can be specified in the representation of the S4 class.
   The usual technique will be to create an S4 class with the desired
   structure, and then supply the class name or definition as the
-  argument \code{S4Class} to \code{setOldClass()}.
+  argument \code{S4Class=} to \code{setOldClass()}.
+
+  See the definition of class \code{"ts"} in the examples below and
+  the \code{data.frame} example in Section 10.2 of the reference.
+  The call to \code{\link{setClass}} to create the S4 class can use the same
+  class name, as here, so long as the call to \code{setOldClass}
+  follows in the same package.  For clarity it should be the next
+  expression in the same file.
 
-  See the definition of class \code{"ts"} in the examples below.  The
-  call to \code{\link{setClass}} to create the S4 class can use the same
-  class name, as here, so long as the class definition is not sealed.
   In the example, we define \code{"ts"} as a vector structure with a
   numeric slot for \code{"tsp"}.  The validity of this definition relies
   on an assertion that all the S3 code for this class is consistent with
@@ -257,9 +182,7 @@ setOldClass(Classes, prototype, where, test = FALSE, S4Class)
   consistently with these (in the example, time-series objects are
   asserted to be consistent with the \linkS4class{structure} class).
 
-  For another example, look at the S4 class definition for \code{"data.frame"}.
-
-  Be warned that failures of the S3 class to live up to its asserted
+  Failures of the S3 class to live up to its asserted
   behavior will usually go uncorrected, since S3 classes inherently
   have no definition, and the resulting invalid S4 objects can cause
   all sorts of grief.  Many S3 classes are not candidates for known
@@ -269,12 +192,12 @@ setOldClass(Classes, prototype, where, test = FALSE, S4Class)
   a list rather than attributes (e.g., \code{"lm"}).  An attribute
   that is sometimes missing cannot be represented as a slot, not even
   by pretending that it is present with class \code{"NULL"}, because
-  attributes unlike slots can not have value \code{NULL}.
+  attributes, unlike slots, can not have value \code{NULL}.
 
   One irregularity that is usually tolerated, however, is to optionally
   add other attributes to those guaranteed to exist (for example,
   \code{"terms"} in \code{"data.frame"} objects returned by
-  \code{\link{model.frame}}).  As of version 2.8.0, validity checks by
+  \code{\link{model.frame}}).  Validity checks by
   \code{\link{validObject}} ignore extra attributes; even if this check
   is tightened in the future, classes extending S3 classes would likely
   be exempted because extra attributes are so common.
@@ -284,37 +207,50 @@ setOldClass(Classes, prototype, where, test = FALSE, S4Class)
   \code{\link{setClass}}, \code{\link{setMethod}}
 }
 
+
 \references{
-  Chambers, John M. (2008)
-  \emph{Software for Data Analysis: Programming with R}
-  Springer.  (For the R version: see section 10.6 for method
-  selection and section 13.4 for generic functions).
-
-  Chambers, John M. (1998)
-  \emph{Programming with Data}
-  Springer (For the original S4 version.)
+ Chambers, John M. (2016)
+ \emph{Extending R},
+  Chapman & Hall.
+(Chapters 9 and 10, particularly Section 10.8)
 }
 
+
 \examples{
+\dontshow{
+## All the predefined S3 classes with S4 versions
+sort(unlist(.OldClassesList))
+}
+
 require(stats)
-setOldClass(c("mlm", "lm"))
-setGeneric("dfResidual", function(model)standardGeneric("dfResidual"))
+
+## "lm" and "mlm" are predefined; if they were not this would do it:
+\dontrun{
+setOldClass(c("mlm", "lm"))}
+
+## Define a new generic function to compute the residual degrees of freedom
+setGeneric("dfResidual",
+  function(model) stop(gettextf(
+    "This function only works for fitted model objects, not class \%s",
+                                class(model))))
+
 setMethod("dfResidual", "lm", function(model)model$df.residual)
 
 ## dfResidual will work on mlm objects as well as lm objects
 myData <- data.frame(time = 1:10, y = (1:10)^.5)
 myLm <- lm(cbind(y, y^3)  ~ time, myData)
 
+\dontshow{
 showClass("data.frame")# to see the predefined S4 "oldClass"
+}
 
-## two examples extending S3 class "lm", class "xlm" directly
+## two examples extending S3 class "lm": class "xlm" directly
 ## and "ylm" indirectly
-setClass("xlm", representation(eps = "numeric"), contains = "lm")
-setClass("ylm", representation(header = "character"), contains = "xlm")
+setClass("xlm", slots = c(eps = "numeric"), contains = "lm")
+setClass("ylm", slots = c(header = "character"), contains = "xlm")
 ym1 = new("ylm", myLm, header = "Example", eps = 0.)
 ## for more examples, see ?\link{S3Class}.
 
-utils::str(.OldClassesList)
 
 \dontshow{
 stopifnot(identical(dfResidual(myLm), myLm$df.residual))
@@ -322,60 +258,13 @@ removeClass("ylm"); removeClass("xlm")
 rm(myData, myLm)
 removeGeneric("dfResidual")}
 
-## Examples of S3 classes with guaranteed attributes
-## an S3 class "stamped" with a vector and  a "date" attribute
-## Here is a generator function and an S3 print method.
-## NOTE:  it's essential that the generator checks the attribute classes
-stamped <- function(x, date = Sys.time()) {
-    if(!inherits(date, "POSIXt"))
-      stop("bad date argument")
-    if(!is.vector(x))
-      stop("x must be a vector")
-    attr(x, "date") <- date
-    class(x) <- "stamped"
-    x
-}
-
-print.stamped <- function(x, ...) {
-    print(as.vector(x))
-    cat("Date: ",  format(attr(x,"date")), "\n")
-}
-
-## Now, an S4 class with the same structure:
-setClass("stamped4", contains = "vector", representation(date = "POSIXt"))
-
-## We can use the S4 class to register "stamped", with its attributes:
-setOldClass("stamped", S4Class = "stamped4")
-selectMethod("show", "stamped")
-## and then remove "stamped4" to clean up
-removeClass("stamped4")
-\dontshow{
-set.seed(113)}
-someLetters <- stamped(sample(letters, 10),
-                       ISOdatetime(2008, 10, 15, 12, 0, 0))
-
-st <- new("stamped", someLetters)
-st
-# show() method prints the object's class, then calls the S3 print method.
-
-stopifnot(identical(S3Part(st, TRUE), someLetters))
-
-# creating the S4 object directly from its data part and slots
-new("stamped", 1:10, date = ISOdatetime(1976, 5, 5, 15, 10, 0))
-
 \dontrun{
 ## The code in R that defines "ts" as an S4 class
-setClass("ts", contains = "structure",
-      representation(tsp = "numeric"),
-      prototype(NA, tsp = rep(1,3)))
-# prototype to be a legal S3 time-series
+setClass("ts", contains = "structure", slots = c(tsp = "numeric"),
+         prototype(NA, tsp = rep(1,3)))
+       # prototype to be a legal S3 time-series
 ## and now registers it as an S3 class
-    setOldClass("ts", S4Class = "ts", where = envir)
-}
-
-\dontshow{
-  removeClass("stamped")
-  rm(someLetters, st)
+setOldClass("ts", S4Class = "ts", where = envir)
 }
 
 }
diff --git a/src/library/methods/man/setSClass.Rd b/src/library/methods/man/setSClass.Rd
index a56bf66..2064455 100644
--- a/src/library/methods/man/setSClass.Rd
+++ b/src/library/methods/man/setSClass.Rd
@@ -1,6 +1,6 @@
 % File src/library/methods/man/setSClass.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2007 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2015 R Core Team
 % Distributed under GPL 2 or later
 
 \name{makeClassRepresentation}
@@ -24,7 +24,7 @@ makeClassRepresentation(name, slots=list(), superClasses=character(),
     superClasses if any.}
   \item{superClasses}{what classes does this class extend}
   \item{prototype}{an object providing the default data for the class,
-    e.g, the result of a call to \code{\link{prototype}}.}
+    e.g., the result of a call to \code{\link{prototype}}.}
   \item{package}{The character string name for the package in which
     the class will be stored; see \code{\link{getPackageName}}.}
   \item{validity}{Optional validity method.  See
diff --git a/src/library/methods/man/show.Rd b/src/library/methods/man/show.Rd
index b928ab7..8ce7010 100644
--- a/src/library/methods/man/show.Rd
+++ b/src/library/methods/man/show.Rd
@@ -1,6 +1,6 @@
 % File src/library/methods/man/show.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2007 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2016 R Core Team
 % Distributed under GPL 2 or later
 
 \name{show}
@@ -52,10 +52,8 @@ the discussion in \code{\link{setIs}} for the general concept.
 }
 \examples{
 ## following the example shown in the setMethod documentation ...
-setClass("track",
-         representation(x="numeric", y="numeric"))
-setClass("trackCurve",
-         representation("track", smooth = "numeric"))
+setClass("track", slots = c(x="numeric", y="numeric"))
+setClass("trackCurve", contains = "track", slots = c(smooth = "numeric"))
 
 t1 <- new("track", x=1:20, y=(1:20)^2)
 
diff --git a/src/library/methods/man/showMethods.Rd b/src/library/methods/man/showMethods.Rd
index 599c5b4..a486517 100644
--- a/src/library/methods/man/showMethods.Rd
+++ b/src/library/methods/man/showMethods.Rd
@@ -1,11 +1,12 @@
 % File src/library/methods/man/showMethods.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2007 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2016 R Core Team
 % Distributed under GPL 2 or later
 
 \name{showMethods}
 \alias{showMethods}
-\title{Show all the methods for the specified function(s)}
+\alias{.S4methods}
+\title{Show all the methods for the specified function(s) or class}
 \description{
   Show a summary of the methods for one or more generic functions,
   possibly restricted to those involving specified classes.
@@ -15,6 +16,7 @@ showMethods(f = character(), where = topenv(parent.frame()),
             classes = NULL, includeDefs = FALSE,
             inherited = !includeDefs,
             showEmpty, printTo = stdout(), fdef)
+.S4methods(generic.function, class)
 }
 \arguments{
   \item{f}{one or more function names.  If omitted, all functions
@@ -52,8 +54,11 @@ showMethods(f = character(), where = topenv(parent.frame()),
   \item{fdef}{Optionally, the generic function definition to use; if
     missing, one is found, looking in \code{where} if that is specified.
     See also comment in \sQuote{Details}.}
+  \item{generic.function, class}{See \code{methods}.}
 }
 \details{
+  See \code{methods} for a description of \code{.S4methods}.
+
   The name and package of the generic are followed by the list of
   signatures for which methods are currently defined, according to the
   criteria determined by the various arguments.  Note that the package
@@ -85,12 +90,14 @@ showMethods(f = character(), where = topenv(parent.frame()),
   for other tools involving methods;
   \code{\link{selectMethod}} will show you the method dispatched for a
   particular function and signature of classes for the arguments.
+
+  \code{\link{methods}} provides method discovery tools for light-weight
+  interactive use.
 }
 \examples{
 require(graphics)
 \dontshow{
- setClass("track",
-          representation(x="numeric", y="numeric"))
+ setClass("track", slots = c(x="numeric", y="numeric"))
  ## First, with only one object as argument:
  setMethod("plot", signature(x="track", y="missing"),
            function(x,  y, ...) plot(slot(x, "x"), slot(x, "y"), ...))
@@ -118,12 +125,11 @@ showMethods(class = "Matrix")# everything
 showMethods(Matrix:::isDiagonal) # a non-exported generic
 }%end{dontrun}
 
-%% FIXME: This should be an example of showing methods from a loaded,
-%% but not attached namespace. Except it doesn't work.
-%% Much simpler situation of attach()ing when needed:
-not.there <- !any("package:stats4" == search())
-if(not.there) library(stats4)
-showMethods(classes = "mle")
-if(not.there) detach("package:stats4")
+%% An example of showing methods from a loaded,
+%% but not attached namespace.
+if(no4 <- is.na(match("stats4", loadedNamespaces())))
+   loadNamespace("stats4")
+showMethods(classes = "mle") # -> a method for show()
+if(no4) unloadNamespace("stats4")
 }
 \keyword{methods}
diff --git a/src/library/methods/man/signature-class.Rd b/src/library/methods/man/signature-class.Rd
index b72f612..f637d51 100644
--- a/src/library/methods/man/signature-class.Rd
+++ b/src/library/methods/man/signature-class.Rd
@@ -1,5 +1,5 @@
 % File src/library/methods/man/signature-class.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2007 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/methods/man/slot.Rd b/src/library/methods/man/slot.Rd
index 0806962..1f178d0 100644
--- a/src/library/methods/man/slot.Rd
+++ b/src/library/methods/man/slot.Rd
@@ -1,6 +1,6 @@
 % File src/library/methods/man/slot.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2013 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2016 R Core Team
 % Copyright 2005-2010 The R Foundation
 % Distributed under GPL 2 or later
 
@@ -93,9 +93,8 @@ getSlots(x)
   \code{\link{attr<-}}, and such assignments are not checked for
   legitimate slot names.
 
-  Note that the \code{"@"} operators for extraction and (since \R 3.0.0)
-  replacement are primitive and actually reside in the \pkg{base}
-  package.
+  Note that the \code{"@"} operators for extraction and replacement are
+  primitive and actually reside in the \pkg{base} package.
 
   The replacement versions of  \code{"@"} and \code{slot()} differ in
   the computations done to coerce the right side of the assignment to
@@ -123,15 +122,15 @@ getSlots(x)
 }
 \seealso{
   \code{\link{@}},
-  \code{\link{Classes}},
-  \code{\link{Methods}},
+  \code{\link{Classes_Details}},
+  \code{\link{Methods_Details}},
   \code{\link{getClass}},
   \code{\link{names}}.
 }
 \examples{
 \dontshow{if(isClass("track")) removeClass("track")}
 
-setClass("track", representation(x="numeric", y="numeric"))
+setClass("track", slots = c(x="numeric", y="numeric"))
 myTrack <- new("track", x = -4:4, y = exp(-4:4))
 slot(myTrack, "x")
 slot(myTrack, "y") <- log(slot(myTrack, "y"))
diff --git a/src/library/methods/man/stdRefClass.Rd b/src/library/methods/man/stdRefClass.Rd
index f1eb2a2..d5a47f4 100644
--- a/src/library/methods/man/stdRefClass.Rd
+++ b/src/library/methods/man/stdRefClass.Rd
@@ -1,5 +1,5 @@
 % File src/library/methods/man/stdRefClass.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 2010-2014 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/methods/man/substituteDirect.Rd b/src/library/methods/man/substituteDirect.Rd
index bd55b9c..c65dda7 100644
--- a/src/library/methods/man/substituteDirect.Rd
+++ b/src/library/methods/man/substituteDirect.Rd
@@ -1,5 +1,5 @@
 % File src/library/methods/man/substituteDirect.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2007 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/methods/man/testInheritedMethods.Rd b/src/library/methods/man/testInheritedMethods.Rd
index 38b2bee..4adbc20 100644
--- a/src/library/methods/man/testInheritedMethods.Rd
+++ b/src/library/methods/man/testInheritedMethods.Rd
@@ -1,6 +1,6 @@
 % File src/library/methods/man/testInheritedMethods.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 2009-12 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 2009-2015 R Core Team
 % Distributed under GPL 2 or later
 
 \name{testInheritedMethods}
@@ -101,8 +101,7 @@ testInheritedMethods(f, signatures, test = TRUE, virtual = FALSE,
 
   Chambers, John M. (2009)
   \emph{Class Inheritance in R}
-  \url{http://stat.stanford.edu/~jmc4/classInheritance.pdf} (to be
-  submitted to the R Journal).
+  \url{https://statweb.stanford.edu/~jmc4/classInheritance.pdf}.
 }
 \examples{
 ## if no other attached packages have methods for `+` or its group
diff --git a/src/library/methods/man/validObject.Rd b/src/library/methods/man/validObject.Rd
index 1fb490a..e5b537d 100644
--- a/src/library/methods/man/validObject.Rd
+++ b/src/library/methods/man/validObject.Rd
@@ -1,6 +1,6 @@
 % File src/library/methods/man/validObject.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2007 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2017 R Core Team
 % Distributed under GPL 2 or later
 
 \name{validObject}
@@ -9,17 +9,33 @@
 \alias{setValidity}
 \title{ Test the Validity of an Object }
 \description{
-  The validity of \code{object} related to its class definition is
-  tested.  If the object is valid, \code{TRUE} is returned; otherwise,
-  either a vector of strings describing validity failures is returned,
-  or an error is generated (according to whether \code{test} is
-  \code{TRUE}).  Optionally, all slots in the object can also be validated.
-
-  The function \code{setValidity} sets the validity method of a class
-  (but more normally, this method will be supplied as the
-  \code{validity} argument to \code{\link{setClass}}).  The method
-  should be a function of one object that returns \code{TRUE} or a
+  \code{validObject()} tests the validity of \code{object} related to
+  its class definition; specifically, it checks that all slots
+  specified in the class definition are present and that the object in
+  the slot is from the required class or a subclass of that class.
+
+  If the object is valid, \code{TRUE} is returned; otherwise, an error
+  is generated, reporting all the validity failures encountered.
+If argument \code{test} is
+  \code{TRUE}, the errors are returned as a character vector rather
+  than generating an error.
+  
+
+  When an object from a class is initialized, the default method for
+  \code{\link{initialize}()} calls \code{validObject}.
+
+A class definition may have a validity method, set by a call to
+  the function \code{setValidity}, in the package or environment that
+  defines the class (or via the \code{validity} argument to \code{\link{setClass}}).  The method
+  should be a function of one object that returns \code{TRUE} or a character-string
   description of the non-validity.
+  If such a method exists, it will be called from \code{validObject}
+  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.
+
+
 }
 \usage{
 validObject(object, test = FALSE, complete = FALSE)
@@ -35,8 +51,8 @@ getValidity(ClassDef)
     function returns a vector of strings describing the problems.  If
     \code{test} is \code{FALSE} (the default) validity failure generates
     an error.}
-  \item{complete}{logical; if \code{TRUE}, validity methods will be
-    applied recursively to any of the slots that have such methods.}
+  \item{complete}{logical; if \code{TRUE}, \code{validObject} is
+      called recursively for each of the slots.  The default is \code{FALSE}.}
   \item{Class}{the name or class definition of the class whose validity
     method is to be set.}
   \item{ClassDef}{a class definition object, as from
@@ -48,35 +64,46 @@ getValidity(ClassDef)
     are found.  Unlike \code{validObject}, it should never generate an
     error.
   }
-  \item{where}{the modified class definition will be stored in this
-    environment.}
-
-  Note that validity methods do not have to check validity of
-  superclasses: the logic of \code{validObject} ensures these tests are
-  done once only.  As a consequence, if one validity method wants to use
-  another, it should extract and call the method from the other
-  definition of the other class by calling \code{getValidity()}: it
-  should \emph{not} call \code{validObject}.
+  \item{where}{an environment to store the modified class
+      definition. Should be omitted, specifically  for calls from a package that defines the class.
+    The definition will be stored in the
+    namespace of the package.}
+
+}
+\section{Validity methods}{
+ A validity method must be a function of one argument; formally, that
+argument should be named \code{object}.
+If the argument has a different name, \code{setValidity} makes the
+substitution but in obscure cases that might fail, so it's wiser to
+name the
+ argument \code{object}.
+
+A good method checks all the possible errors and returns a character
+vector citing all the exceptions found, rather than returning after
+the first one.
+\code{validObject} will accumulate these errors in its error message
+or its return value.
+
+Note that validity methods do not have to check validity of
+  superclasses: \code{validObject} calls such methods explicitly.
 }
 \details{
-  Validity testing takes place \sQuote{bottom up}: Optionally, if
-  \code{complete=TRUE}, the validity of the object's slots, if any, is
-  tested.  Then, in all cases, for each of the classes that this class
+  Validity testing takes place \sQuote{bottom up}, checking the slots,
+  then the superclasses, then the object's own validity method, if
+  there is one.
+
+For each slot and superclass, the existence of the specified class is
+checked.
+For each slot, the object in the slot is tested for inheritance from
+the corresponding class.
+If  \code{complete} is {TRUE},   \code{validObject} is called
+recursively for the object in the slot.
+
+Then, for each of the classes that this class
   extends (the \sQuote{superclasses}), the explicit validity method of
   that class is called, if one exists.  Finally, the validity method of
   \code{object}'s class is called, if there is one.
 
-  Testing generally stops at the first stage of finding an error, except
-  that all the slots will be examined even if a slot has failed its
-  validity test.
-
-  The standard validity test (with \code{complete=FALSE}) is applied
-  when an object is created via \code{\link{new}} with any optional
-  arguments (without the extra arguments the result is just the class
-  prototype object).
-
-  An attempt is made to fix up the definition of a validity method if
-  its argument is not \code{object}.
 }
 \value{
   \code{validObject} returns \code{TRUE} if the object is valid.
@@ -85,20 +112,17 @@ getValidity(ClassDef)
   with the corresponding strings in the error message.
 }
 \references{
- Chambers, John M. (2008)
- \emph{Software for Data Analysis: Programming with R}
-  Springer.  (For the R version.)
-
- Chambers, John M. (1998)
- \emph{Programming with Data}
- Springer (For the original S4 version.)
+Chambers, John M. (2016)
+ \emph{Extending R},
+  Chapman & Hall.
+(Chapters 9 and 10.)
 }
 \seealso{\code{\link{setClass}};
   class \code{\linkS4class{classRepresentation}}.
 }
 \examples{
 setClass("track",
-          representation(x="numeric", y = "numeric"))
+          slots = c(x="numeric", y = "numeric"))
 t1 <- new("track", x=1:10, y=sort(stats::rnorm(10)))
 ## A valid "track" object has the same number of x, y values
 validTrackObject <- function(object) {
@@ -117,15 +141,15 @@ t2 at x <- 1:20
 \dontrun{try(validObject(t2))}
 \dontshow{stopifnot(is(try(validObject(t2)), "try-error"))}
 
-setClass("trackCurve",
-         representation("track", smooth = "numeric"))
+setClass("trackCurve", contains = "track",
+         slots = c(smooth = "numeric"))
 
 ## all superclass validity methods are used when validObject
 ## is called from initialize() with arguments, so this fails
 \dontrun{trynew("trackCurve", t2)}
 \dontshow{stopifnot(is(try(new("trackCurve", t2)), "try-error"))}
 
-setClass("twoTrack", representation(tr1 = "track", tr2 ="track"))
+setClass("twoTrack", slots = c(tr1 = "track", tr2 ="track"))
 
 ## validity tests are not applied recursively by default,
 ## so this object is created (invalidly)
diff --git a/src/library/methods/man/zBasicFunsList.Rd b/src/library/methods/man/zBasicFunsList.Rd
index 63350f0..8f9c07d 100644
--- a/src/library/methods/man/zBasicFunsList.Rd
+++ b/src/library/methods/man/zBasicFunsList.Rd
@@ -1,5 +1,5 @@
 % File src/library/methods/man/zBasicFunsList.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2007 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/methods/po/R-da.po b/src/library/methods/po/R-da.po
index b628ff1..1f1b219 100644
--- a/src/library/methods/po/R-da.po
+++ b/src/library/methods/po/R-da.po
@@ -2,7 +2,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: R 3.0.0\n"
 "Report-Msgid-Bugs-To: bugs.r-project.org\n"
-"POT-Creation-Date: 2013-11-25 05:14\n"
+"POT-Creation-Date: 2016-04-01 09:50\n"
 "PO-Revision-Date: 2011-12-01 22:45+0200\n"
 "Last-Translator: Joe <joedalton2 at yahoo.dk>\n"
 "Language-Team: LANGUAGE <LL at li.org>\n"
@@ -14,7 +14,7 @@ msgstr ""
 "X-Generator: Pootle 2.1.6\n"
 
 #, fuzzy
-msgid "OOPS: something wrong with line %d in '.OldClassesPrototypes'"
+msgid "OOPS: something wrong with '.OldClassesPrototypes[[%d]]'"
 msgstr "UPS: Noget galt med linjen"
 
 msgid ""
@@ -131,8 +131,8 @@ msgid "invalid argument 'name': %s"
 msgstr ""
 
 msgid ""
-"%s is a primitive function;  methods can be defined, but the generic "
-"function is implicit, and cannot be changed."
+"%s dispatches internally;  methods can be defined, but the generic function "
+"is implicit, and cannot be changed."
 msgstr ""
 
 msgid ""
@@ -253,6 +253,9 @@ msgid ""
 "object of class %s)"
 msgstr ""
 
+msgid "must supply 'generic.function' or 'class'"
+msgstr ""
+
 msgid "%s is not an S4 generic function in %s; methods not removed"
 msgstr ""
 
@@ -273,12 +276,7 @@ msgstr ""
 msgid "Function %s is a group generic; do not call it directly"
 msgstr ""
 
-msgid ""
-"'callGeneric' with a primitive needs explicit arguments (no formal args "
-"defined)"
-msgstr ""
-
-msgid "'callGeneric' must be called from a generic function or method"
+msgid "callGeneric() must be called from within a method body"
 msgstr ""
 
 msgid "expected a non-empty character string for argument name"
@@ -336,12 +334,10 @@ msgstr ""
 msgid "non-generic function '%s' given to findMethods()"
 msgstr ""
 
-msgid "only FALSE is meaningful for 'inherited', when 'where' is supplied (got"
+msgid ""
+"only FALSE is meaningful for 'inherited', when 'where' is supplied (got %s)"
 msgstr ""
 
-msgid "\""
-msgstr "\""
-
 msgid "argument 'f' must be a generic function or %s"
 msgstr ""
 
@@ -437,6 +433,13 @@ msgstr ""
 msgid "use %s instead."
 msgstr ""
 
+msgid ""
+"%s, along with other use of the \"MethodsList\" metadata objects, is defunct."
+msgstr ""
+
+msgid "in %s: use of \"MethodsList\" metadata objects is defunct."
+msgstr ""
+
 msgid "invalid object for formal method definition: type %s"
 msgstr ""
 
@@ -461,6 +464,10 @@ msgid "the names in signature for method (%s) do not match %s's arguments (%s)"
 msgstr ""
 
 msgid ""
+"the names in signature for method (%s) do not match function's arguments (%s)"
+msgstr ""
+
+msgid ""
 "a call to callNextMethod() appears in a call to %s, but the call does not "
 "seem to come from either a generic function or another 'callNextMethod'"
 msgstr ""
@@ -473,6 +480,9 @@ msgstr ""
 msgid "bad object found as method (class %s)"
 msgstr ""
 
+msgid "No next method available"
+msgstr ""
+
 msgid ""
 "in constructing the prototype for class %s: prototype has class %s, but the "
 "data part specifies class %s"
@@ -496,6 +506,9 @@ msgstr ""
 msgid "undefined slot classes in definition of %s: %s"
 msgstr ""
 
+msgid "(class %s)"
+msgstr ""
+
 msgid ""
 "in definition of class %s, information for superclass %s is of class %s "
 "(expected \"SClassExtension\")"
@@ -608,12 +621,6 @@ msgid "unable to find an environment containing class %s"
 msgstr ""
 
 msgid ""
-"Note: the specification for S3 class %s in package %s seems equivalent to "
-"one from package %s: not turning on duplicate class definitions for this "
-"class."
-msgstr ""
-
-msgid ""
 "Note: some superclasses of class %s in package %s have duplicate "
 "definitions.  This definition is not being treated as equivalent to that "
 "from package %s"
@@ -624,6 +631,11 @@ msgid ""
 "from package %s: not turning on duplicate class definitions for this class."
 msgstr ""
 
+msgid ""
+"Found more than one class \"%s\" in cache; using the first, from namespace "
+"'%s'"
+msgstr ""
+
 msgid "undefined subclass %s of class %s; definition not updated"
 msgstr ""
 
@@ -664,12 +676,6 @@ msgstr ""
 msgid "no suitable arguments to dispatch methods in this function"
 msgstr ""
 
-msgid "special function %s is not permitted to have methods"
-msgstr ""
-
-msgid "special function %s has no known argument list; will assume '(x, ...)'"
-msgstr ""
-
 msgid "making a generic for special function %s"
 msgstr ""
 
@@ -705,25 +711,21 @@ msgid ""
 "ordinary function"
 msgstr ""
 
-msgid "methods cannot be defined for the primitive function %s"
-msgstr ""
-
 msgid "no generic function found for %s"
 msgstr ""
 
 msgid "Empty function name in .getGeneric"
 msgstr ""
 
-msgid ""
-"package %s seems to have out-of-date methods; need to reinstall from source"
-msgstr ""
-
 msgid "no methods found for %s; cacheGenericsMetaData() will have no effect"
 msgstr ""
 
 msgid "invalid value from generic function %s, class %s, expected %s"
 msgstr ""
 
+msgid "\"MethodsList\" is defunct; allMethods now are empty"
+msgstr ""
+
 msgid ""
 "the body of the generic function for %s calls 'standardGeneric' to dispatch "
 "on a different name (\"%s\")!"
@@ -793,9 +795,6 @@ msgstr ""
 msgid "no definition found for class %s"
 msgstr "\", fik en af klasse \""
 
-msgid "trying to execute load actions without 'methods' package"
-msgstr ""
-
 msgid "missing function for load action: %s"
 msgstr ""
 
@@ -991,6 +990,12 @@ msgid ""
 "methods currently exist for coercing from %s to %s; they will be replaced."
 msgstr ""
 
+msgid "Function must be an S4 generic"
+msgstr ""
+
+msgid "method is not being debugged"
+msgstr ""
+
 msgid "object %s not found"
 msgstr ""
 
@@ -1053,8 +1058,8 @@ msgid "invalid object in meta table of methods for %s, label %s, had class %s"
 msgstr ""
 
 msgid ""
-"invalid mlist element for signature %s at level %d (should be methods list "
-"or method, had class %s)"
+"invalid mlist element for signature %s at level %d (should be "
+"MethodDefinition or .Primitive, had class %s)"
 msgstr ""
 
 msgid "bad method object stored in method table, class %s"
@@ -1065,7 +1070,7 @@ msgid ""
 "class %s"
 msgstr ""
 
-msgid "invalid or unset methods table in generic function \""
+msgid "invalid or unset methods table in generic function %s"
 msgstr ""
 
 msgid "trying to find a methods table in a non-generic function"
@@ -1238,6 +1243,9 @@ msgstr ""
 msgid "%s is not a field in this class"
 msgstr ""
 
+msgid "Methods not found: %s"
+msgstr ""
+
 msgid ""
 "the definition of class %s in package %s is locked, methods may not be "
 "redefined"
@@ -1338,6 +1346,11 @@ msgid "field %s of class %s has a non-default binding and cannot be locked"
 msgstr ""
 
 msgid ""
+"Reference superclasses must come from the same package for the environment "
+"to be defined:  got %s and %s"
+msgstr ""
+
+msgid ""
 "Class %s is not a subclass of %s; functional semantics not defined for this "
 "class"
 msgstr ""
@@ -1380,8 +1393,7 @@ msgstr ""
 msgid "the method for %s for this signature was not being traced"
 msgstr ""
 
-msgid ""
-"making a traced version of a primitive; arguments will be treated as '...'"
+msgid "making a traced version of a special; arguments may be altered"
 msgstr ""
 
 msgid ""
@@ -1586,6 +1598,9 @@ msgid_plural ""
 msgstr[0] ""
 msgstr[1] ""
 
+#~ msgid "\""
+#~ msgstr "\""
+
 #~ msgid "replacement value is not a matrix"
 #~ msgstr "erstatningsværdi er ikke en matrix"
 
diff --git a/src/library/methods/po/R-de.po b/src/library/methods/po/R-de.po
index 12c28a9..c5e74a6 100644
--- a/src/library/methods/po/R-de.po
+++ b/src/library/methods/po/R-de.po
@@ -4,20 +4,20 @@
 # Detlef Steuer <steuer at hsu-hh.de>, 2007-2014.
 msgid ""
 msgstr ""
-"Project-Id-Version: R-3.1.0\n"
+"Project-Id-Version: R-3.3.0\n"
 "Report-Msgid-Bugs-To: bugs.r-project.org\n"
-"POT-Creation-Date: 2013-11-25 05:14\n"
-"PO-Revision-Date: 2014-03-16 16:02+0100\n"
+"POT-Creation-Date: 2015-06-06 13:51\n"
+"PO-Revision-Date: 2016-04-08 11:31+0200\n"
 "Last-Translator: Detlef Steuer <detlef.steuer at hsu-hh.de>\n"
 "Language-Team: R-core <R-core at r-project.org>\n"
-"Language: \n"
+"Language: de\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
 "Plural-Forms: nplurals=2; plural=n == 1 ? 0 : 1;\n"
 
-msgid "OOPS: something wrong with line %d in '.OldClassesPrototypes'"
-msgstr "OOPS: irgendetwas falsch mit der Zeile %d in '.OldClassesPrototype'"
+msgid "OOPS: something wrong with '.OldClassesPrototypes[[%d]]'"
+msgstr "OOPS: irgendetwas ist falsch mit '.OldClassesPrototypes[[%d]]'"
 
 msgid ""
 "unnamed argument to initialize() for S3 class must have a class definition; "
@@ -80,9 +80,7 @@ msgstr ""
 
 msgid ""
 "the 'S3Class' argument must be a superclass of %s:  not true of class %s"
-msgstr ""
-"das S3Class Argument muss eine Oberklasse von %s sein: gilt nicht für Klasse "
-"%s"
+msgstr "das 'S3Class' Argument muss eine Superklasse von %s sein: gilt nicht für Klasse %s"
 
 msgid "replacement value must extend class %s, got %s"
 msgstr "Ersetzung muss die Klasse %s erweitern, bekam %s"
@@ -106,9 +104,9 @@ msgid ""
 "the computation: 'as(object,\"%s\") <- value' is valid when object has class "
 "%s only if 'is(value, \"%s\")' is TRUE ('class(value)' was %s)"
 msgstr ""
-"Die Berechnung: 'as(object,\"%s\") <- value' ist nur zulässig für ein\n"
-"Objekt aus der Klasse %s nur, wenn 'is(value, \"%s\")'  TRUE ergibt ('class"
-"(value)' war %s)"
+"Die Berechnung: 'as(object,\"%s\") <- value' ist nur zulässig für ein Objekt "
+"aus der Klasse %s, wenn 'is(value, \"%s\")' TRUE ergibt ('class(value)' war "
+"%s)"
 
 msgid ""
 "there is no automatic definition for 'as(object, \"%s\") <- value' when "
@@ -116,8 +114,8 @@ msgid ""
 "be an error"
 msgstr ""
 "es gibt keine automatische Definition für 'as(object, \"%s\") <- value', \n"
-"wenn das Objekt aus der Klasse %s ist und kein 'replace' Argument\n"
-"angegeben wird; Ersetzen wird einen Fehler erzeugen"
+"wenn das Objekt aus der Klasse %s ist und kein 'replace' Argument angegeben "
+"wird; Ersetzen wird einen Fehler erzeugen"
 
 msgid ""
 "the 'replace' argument to setIs() should be a function of 2 or 3 arguments, "
@@ -147,15 +145,15 @@ msgid ""
 "if the 'def' argument is supplied, it must be a function that calls "
 "standardGeneric(\"%s\") or is the default"
 msgstr ""
-"wenn das 'def' Argument angegeben wird, muss es eine Funktion sein,\n"
-"die standardGeneric(\"%s\") aufruft oder der default ist"
+"wenn das 'def' Argument angegeben wird, muss es eine Funktion sein, die "
+"standardGeneric(\"%s\") aufruft oder der default ist"
 
 msgid ""
 "must supply a function skeleton for %s, explicitly or via an existing "
 "function"
 msgstr ""
 "es muss ein Funktionsskelett für %s angegeben werden, entweder explizit oder "
-"über eine exisitierende Funktion"
+"über eine existierende Funktion"
 
 msgid ""
 "Creating a generic function for %s from %s in %s\n"
@@ -171,12 +169,12 @@ msgid ""
 "no generic version of %s on package %s is allowed;\n"
 "   a new generic will be assigned for %s"
 msgstr ""
-"Generische Version von %s für Paket %s ist nicht erlaubt; \n"
+"generische Version von %s für Paket %s ist nicht erlaubt; \n"
 "  eine neue Generische wird für %s zugewiesen"
 
 msgid "function %s appears to be a generic function, but with generic name %s"
 msgstr ""
-"Funkton %s scheint eine generische Funktion zu sein, aber mit dem "
+"Funktion %s scheint eine generische Funktion zu sein, aber mit dem "
 "generischen Namen %s"
 
 msgid "generic function %s not found for removal"
@@ -289,6 +287,10 @@ msgstr ""
 "erstes Argument sollte(n) Name(n) generischer Funktion(en) sein (bekam "
 "Objekt der Klasse %s"
 
+msgid "must supply 'generic.function' or 'class'"
+msgstr ""
+"entweder eine 'generic.function' oder eine 'class' muss angegeben werden"
+
 msgid "%s is not an S4 generic function in %s; methods not removed"
 msgstr "%s ist keine generische S4 Funktion in %s; Methoden nicht entfernt"
 
@@ -312,17 +314,8 @@ msgstr "Funktion %s ist bereits gruppengenerisch; keine Änderung"
 msgid "Function %s is a group generic; do not call it directly"
 msgstr "Funktion %s ist gruppengenerisch; nicht direkt aufrufen"
 
-msgid ""
-"'callGeneric' with a primitive needs explicit arguments (no formal args "
-"defined)"
-msgstr ""
-"'callGeneric' mit einem Primitiv benötigt explizite Argumente (keine "
-"formalen Argumente definiert)"
-
-msgid "'callGeneric' must be called from a generic function or method"
-msgstr ""
-"'callGeneric' muss von einer generischen Funktion oder Methode aufgerufen "
-"werden"
+msgid "callGeneric() must be called from within a method body"
+msgstr "'callGeneric' muss in einer Methode aufgerufen werden"
 
 msgid "expected a non-empty character string for argument name"
 msgstr "erwarte nicht-leere Zeichenkette als Argumentnamen"
@@ -332,7 +325,7 @@ msgstr "angegebene generische Funktion nicht für \"%s\" erzeugt"
 
 msgid "%s is a primitive function; its generic form cannot be redefined"
 msgstr ""
-"%s ist eine primitive Funktion, generische Form und kann nicht umdefiniert "
+"%s ist eine primitive Funktion, ihre generische Form kann nicht umdefiniert "
 "werden"
 
 msgid ""
@@ -367,7 +360,7 @@ msgid "signatures differ:  (%s), (%s)"
 msgstr "Signaturen unterscheiden sich: (%s), (%s)"
 
 msgid "package slots  differ: %s, %s"
-msgstr "Paketslots unterscheiden sich: %s, %s"
+msgstr "Paket-Slots unterscheiden sich: %s, %s"
 
 msgid "groups differ: %s, %s"
 msgstr "Gruppen unterscheiden sich: %s, %s"
@@ -379,17 +372,16 @@ msgid ""
 "argument %s must be a generic function or a single character string; got an "
 "object of class %s"
 msgstr ""
-"Argument %s muss eine generische Funktion oder eine Zeichenkette sein;\n"
-"bekam ein Objekt aus Klasse %s"
+"Argument %s muss eine generische Funktion oder eine Zeichenkette sein; bekam "
+"ein Objekt aus Klasse %s"
 
 msgid "non-generic function '%s' given to findMethods()"
 msgstr "nicht-generische Funktion '%s' an findMethods() übergeben"
 
-msgid "only FALSE is meaningful for 'inherited', when 'where' is supplied (got"
-msgstr "nur FALSE sinnvoll für 'inherited', wenn 'where' angegeben (bekam"
-
-msgid "\""
-msgstr "\""
+msgid ""
+"only FALSE is meaningful for 'inherited', when 'where' is supplied (got %s)"
+msgstr ""
+"nur FALSE sinnvoll für 'inherited', wenn 'where' angegeben wurde (bekam %s)"
 
 msgid "argument 'f' must be a generic function or %s"
 msgstr "Argument 'f' muss eine generische Funktion oder %s sein"
@@ -452,8 +444,7 @@ msgid ""
 "object of class %s"
 msgstr ""
 "die Standardmethode muss eine Methodendefinition, eine Primitive oder NULL "
-"sein:\n"
-" Bekam Objekt der Klasse %s"
+"sein: Bekam Objekt der Klasse %s"
 
 msgid ""
 "trying to match a method signature to an object (of class %s) that is not a "
@@ -469,14 +460,14 @@ msgid ""
 "invalid element in a list for \"signature\" argument; element %d is neither "
 "a class definition nor a class name"
 msgstr ""
-"unzlässiges Element in einer Liste für das \"signature\" Argument;\n"
-"Element %d ist weder eine Klassendefinition noch ein Klassenname"
+"unzlässiges Element in einer Liste für das \"signature\" Argument; Element "
+"%d ist weder eine Klassendefinition noch ein Klassenname"
 
 msgid ""
 "trying to match a method signature of class %s; expects a list or a "
 "character vector"
 msgstr ""
-"Vesuche eine Methodensignatur mit Klasse %s einzupassen; erwartet eine Liste "
+"Versuche eine Methodensignatur mit Klasse %s zu matchen; erwartet eine Liste "
 "oder einen Zeichenkettenvektor "
 
 msgid ""
@@ -492,8 +483,8 @@ msgid ""
 "more elements in the method signature (%d) than in the generic signature "
 "(%d) for function %s"
 msgstr ""
-"mehr Elemente in der Methodensignatur (%d) als in der generischen\n"
-"Signatur (%d) für Funktion %s"
+"mehr Elemente in der Methodensignatur (%d) als in der generischen Signatur "
+"(%d) für Funktion %s"
 
 msgid "no generic function found corresponding to %s"
 msgstr "keine generische Funktion korrespondierend mit %s gefunden"
@@ -505,7 +496,7 @@ msgid ""
 "%s, along with other use of the \"MethodsList\" metadata objects, is "
 "deprecated."
 msgstr ""
-"%s ist, zusammen mit der Nutzung der \"MethodsList\" Metsdatenobjekte. "
+"%s ist, zusammen mit der Nutzung der \"MethodsList\" Metadatenobjekte, "
 "veraltet."
 
 msgid "in %s: use of \"MethodsList\" metadata objects is deprecated."
@@ -514,12 +505,22 @@ msgstr "In %s: Nutzung der \"MethodsList\" Metadatenobjekte ist veraltet"
 msgid "use %s instead."
 msgstr "nutze stattdessen %s."
 
+msgid ""
+"%s, along with other use of the \"MethodsList\" metadata objects, is defunct."
+msgstr ""
+"%s ist, zusammen mit der Nutzung der \"MethodsList\" Metadatenobjekte,\n"
+" nicht mehr vorhanden."
+
+msgid "in %s: use of \"MethodsList\" metadata objects is defunct."
+msgstr "In %s: Nutzung der \"MethodsList\" Metadatenobjekte ist nicht mehr möglich"
+
 msgid "invalid object for formal method definition: type %s"
 msgstr "unzulässiges Objekt für die formale Methodendefinition: Typ %s"
 
 msgid "missing package slot (%s) in object of class %s (package info added)"
 msgstr ""
-"fehender Paketslot (%s) in Objekt der Klasse %s (Paketinformation hinzugefügt"
+"fehlender Paketslot (%s) in Objekt der Klasse %s (Paketinformation "
+"hinzugefügt)"
 
 msgid ""
 "'initialize' method returned an object of class %s instead of the required "
@@ -543,6 +544,12 @@ msgstr ""
 "Argumenten von %s (%s)"
 
 msgid ""
+"the names in signature for method (%s) do not match function's arguments (%s)"
+msgstr ""
+"die Namen in der Signatur für die Methode (%s) passen nicht zu den\n"
+"Argumenten der Funktion (%s)"
+
+msgid ""
 "a call to callNextMethod() appears in a call to %s, but the call does not "
 "seem to come from either a generic function or another 'callNextMethod'"
 msgstr ""
@@ -560,6 +567,9 @@ msgstr ""
 msgid "bad object found as method (class %s)"
 msgstr "ungültiges Objekt als Methode (Klasse %s) gefunden"
 
+msgid "No next method available"
+msgstr "Keine weitere Methode verfügbar"
+
 msgid ""
 "in constructing the prototype for class %s: prototype has class %s, but the "
 "data part specifies class %s"
@@ -591,11 +601,14 @@ msgstr ""
 msgid "undefined slot classes in definition of %s: %s"
 msgstr "nicht definierte Slotklassen in der Definition von %s: %s"
 
+msgid "(class %s)"
+msgstr "(Klasse %s)"
+
 msgid ""
 "in definition of class %s, information for superclass %s is of class %s "
 "(expected \"SClassExtension\")"
 msgstr ""
-"in der Definition der Klasse %s: Information über Oberklasse %s ist aus "
+"in der Definition der Klasse %s: Information über Superklasse %s ist aus "
 "Klasse %s (erwartet \"SClassExtension\")"
 
 msgid "class %s extends an undefined class, %s"
@@ -612,7 +625,7 @@ msgstr ""
 "muss ein \"classRepresentation\"-Objekt angegeben werden"
 
 msgid "assigning as %s a class representation with internal name %s"
-msgstr "Zuweisen als %s einer Klassenrepresentation mit internem Namen %s"
+msgstr "Zuweisen als %s einer Klassenrepräsentation mit internem Namen %s"
 
 msgid "class %s has a locked definition in package %s"
 msgstr "Klasse %s besitzt eine gesicherte Definition in Paket %s"
@@ -637,7 +650,7 @@ msgstr ""
 msgid ""
 "no definition was found for superclass %s in the specification of class %s"
 msgstr ""
-"keine Definiton für  Oberklasse %s in der Spezifikation der Klasse %s "
+"keine Definition für Superklasse %s in der Spezifikation der Klasse %s "
 "gefunden"
 
 msgid "conflicting definition of data part: .Data = %s, superclass implies %s"
@@ -681,7 +694,7 @@ msgid ""
 "function prototype() to avoid trouble."
 msgstr ""
 "Prototyp ist eine Liste mit benannten Elementen (könnte zweideutig sein): "
-"sicherheitshalber lieber die Funktion prototype() nutzen)"
+"sicherheitshalber lieber die Funktion prototype() nutzen"
 
 msgid "the '%s' list for class %s, includes an undefined class %s"
 msgstr "die '%s' Liste für Klasse %s enhält eine undefinierte Klasse %s"
@@ -719,7 +732,7 @@ msgstr "mehr als eine mögliche Klasse für den Datenteil: nutze %s statt %s"
 msgid "class cannot have both an ordinary and hidden data type"
 msgstr ""
 "Eine Klasse kann nicht sowohl einen gewöhnlichen und einen versteckten "
-"Datentypen haben"
+"Datentyp haben"
 
 msgid ""
 "a validity method must be a function of one argument, got an object of class "
@@ -739,36 +752,36 @@ msgid ""
 "one from package %s: not turning on duplicate class definitions for this "
 "class."
 msgstr ""
-"die Spezifikation für die S3 Klasse %s in Paket %s scheint äquivlant\n"
-"zu einer aus Paket %s; für diese Klasse werden  die\n"
-"Klassendefinitionen nicht dubliziert"
+"die Spezifikation für die S3 Klasse %s in Paket %s scheint äquivalent zu "
+"einer aus Paket %s; für diese Klasse werden  die Klassendefinitionen nicht "
+"dupliziert"
 
 msgid ""
 "Note: some superclasses of class %s in package %s have duplicate "
 "definitions.  This definition is not being treated as equivalent to that "
 "from package %s"
 msgstr ""
-"Einige Oberklassen der Klasse %s in Paket %s haben dublizierte Definitionen. "
-"Diese Definition wird nicht als äquivalent zu der aus Paket %s behandelt."
+"Einige Superklassen der Klasse %s in Paket %s haben duplizierte "
+"Definitionen. Diese Definition wird nicht als äquivalent zu der aus Paket %s "
+"behandelt."
 
 msgid ""
 "Note: the specification for class %s in package %s seems equivalent to one "
 "from package %s: not turning on duplicate class definitions for this class."
 msgstr ""
-"Die Spezifikation für die Klasse %s in Paket %s scheint äquivalent\n"
-"zu einer aus Paket %s; für diese Klasse werden  die\n"
-"Klassendefinitionen nicht dubliziert"
-
+"Die Spezifikation für die Klasse %s in Paket %s scheint äquivalent zu einer "
+"aus Paket %s; für diese Klasse werden  die Klassendefinitionen nicht "
+"dupliziert"
 
 msgid "undefined subclass %s of class %s; definition not updated"
 msgstr ""
-"Nicht definierte Unterklasse %s  von Klasse %s; Definition nicht aktualisiert"
+"Nicht definierte Subklasse %s von Klasse %s; Definition nicht aktualisiert"
 
 msgid ""
 "subclass %s of class %s is not local and cannot be updated for new "
 "inheritance information; consider setClassUnion()"
 msgstr ""
-"Unterklasse %s der Klasse %s ist nicht lokal und kann nicht für neue "
+"Subklasse %s der Klasse %s ist nicht lokal und kann nicht für neue "
 "Vererbungsinformation aktualisiert werden; evtl. setClassUnion() nutzen?"
 
 msgid ""
@@ -782,7 +795,7 @@ msgid ""
 "argument 'includeSubclasses' must be a logical, either one value or a vector "
 "of the same length as argument 'classes'"
 msgstr ""
-"Argument 'includeSubclasses' muss Boole'sch sein, entweder ein Wert oder ein "
+"Argument 'includeSubclasses' muss boolesch sein, entweder ein Wert oder ein "
 "Vektor der Länge der Argumentklassen"
 
 msgid "argument 'abbreviate' must be 0, 1, 2, or 3"
@@ -796,7 +809,7 @@ msgid ""
 "currently traced; the function used will have tracing removed"
 msgstr ""
 "die als %s zur Erzeugung einer generischen Funktion %s genutzte Funktion "
-"wird momentan verfolgt; die aktuell genutzte Funktion wird die  Verfolgung "
+"wird momentan verfolgt; die aktuell genutzte Funktion wird die Verfolgung "
 "entfernen"
 
 msgid "must supply either a generic function or a function as default for %s"
@@ -808,20 +821,12 @@ msgid ""
 "the %s argument must be NULL or a generic function object; got an object of "
 "class %s"
 msgstr ""
-"das Argument %s muss NULL oder eine generisches Funktionsobjekt sein; bekam "
+"das Argument %s muss NULL oder ein generisches Funktionsobjekt sein; bekam "
 "Objekt der Klasse %s"
 
 msgid "no suitable arguments to dispatch methods in this function"
 msgstr "keine passenden Argumende für Methodendispatch in dieser Funktion"
 
-msgid "special function %s is not permitted to have methods"
-msgstr "spezielle Funktion %s darf keine Methoden besitzen"
-
-msgid "special function %s has no known argument list; will assume '(x, ...)'"
-msgstr ""
-"spezielle Funktion %s hat keine bekannte Argumentliste; unterstelle "
-"'(x, ...)'"
-
 msgid "making a generic for special function %s"
 msgstr "erzeuge eine Generische für die spezielle Funktion %s"
 
@@ -842,7 +847,7 @@ msgid ""
 "signature"
 msgstr ""
 "formale Argumente (%s), die in der Methodendefinition ausgelassen wurden, "
-"können nicht in der Signatur  sein"
+"können nicht in der Signatur sein"
 
 msgid "expanding the signature to include omitted arguments in definition: %s"
 msgstr "erweitere Signatur um ausgelassene Argumente in Definition: %s"
@@ -858,7 +863,7 @@ msgid ""
 "arguments (%s) after '...' in the generic must appear in the method, in the "
 "same place at the end of the argument list"
 msgstr ""
-"Argumente (%s) nach '...' in der Generischen  müssen in der Methode an "
+"Argumente (%s) nach '...' in der Generischen müssen in der Methode an "
 "derselben Stelle am Ende der Argumentliste auftreten"
 
 msgid ""
@@ -892,12 +897,15 @@ msgid "invalid value from generic function %s, class %s, expected %s"
 msgstr ""
 "unzulässiger Wert aus der generischen Funktion %s, Klasse %s, erwartet war %s"
 
+msgid "\"MethodsList\" is defunct; allMethods now are empty"
+msgstr "\"MethodsList\" exisitiert nicht mehr; allMethods sind jetzt leer"
+
 msgid ""
 "the body of the generic function for %s calls 'standardGeneric' to dispatch "
 "on a different name (\"%s\")!"
 msgstr ""
-"Der Funktionsbody der generischen Funktion für %s ruft\n"
-"'standardGeneric' auf, um in einen anderen Namen (\"%s\") zu dispatchen!"
+"Der Funktionsbody der generischen Funktion für %s ruft 'standardGeneric' "
+"auf, um in einen anderen Namen (\"%s\") zu dispatchen!"
 
 msgid ""
 "trying to change the formal arguments in %s in an object of class %s; "
@@ -910,7 +918,7 @@ msgid ""
 "trying to change the formal arguments in %s, but getting the new formals "
 "from an object of class %s; expected a function definition"
 msgstr ""
-"Versuch die formalen Argumente in %s  zu ändern, bekomme aber die neuen "
+"Versuch die formalen Argumente in %s zu ändern, bekomme aber die neuen "
 "Formalen von einem Objekt der Klasse %s; erwartet war eine "
 "Funktionsdefinition"
 
@@ -918,7 +926,7 @@ msgid ""
 "trying to change the formal arguments in %s, but the number of existing "
 "arguments is less than the number of new arguments: (%s) vs (%s)"
 msgstr ""
-"Versuch die formalen Argumente in %s  zu ändern,  aber die Zahl der "
+"Versuch die formalen Argumente in %s zu ändern, aber die Zahl der "
 "existierenden Argumente ist kleiner als die Zahl der neuen Argumente: (%s) "
 "vs. (%s)"
 
@@ -927,7 +935,7 @@ msgid ""
 "arguments is greater than the number of new arguments (the extra arguments "
 "won't be used): (%s) vs (%s)"
 msgstr ""
-"Versuch die formalen Argumente in %s  zu ändern,  aber die Zahl der "
+"Versuch die formalen Argumente in %s zu ändern, aber die Zahl der "
 "existierenden Argumente ist kleiner als die Zahl der neuen Argumente "
 "(zusätzliche Argumente werden nicht genutzt): (%s) vs. (%s)"
 
@@ -935,7 +943,7 @@ msgid ""
 "in changing formal arguments in %s, some of the old names are not in fact "
 "arguments: %s"
 msgstr ""
-"beim Ändern der formalen Argumente in %s; Einige der alten Namen sind keine "
+"beim Ändern der formalen Argumente in %s; einige der alten Namen sind keine "
 "Argumente: %s"
 
 msgid "got a negative maximum number of frames to look at"
@@ -954,11 +962,11 @@ msgid "no method or default matching the \"...\" arguments in %s"
 msgstr "keine Methode und kein Standard passen auf  \"...\" in %s"
 
 msgid "multiple direct matches: %s; using the first of these"
-msgstr "mehrfache direkte Übereinstimmungen: %s; nutze den ersten von diesen"
+msgstr "mehrfache direkte Übereinstimmungen: %s; nutze die erste von diesen"
 
 msgid "multiple equivalent inherited matches: %s; using the first of these"
 msgstr ""
-"mehrfache äquivalente, vererbte Übereinstimmungen: %s; nutze den ersten von "
+"mehrfache äquivalente, vererbte Übereinstimmungen: %s; nutze die erste von "
 "diesen"
 
 msgid "single string; got an object of class %s"
@@ -968,14 +976,14 @@ msgid ""
 "multiple definitions exist for class %s, but the supplied package (%s) is "
 "not one of them (%s)"
 msgstr ""
-"Mehrfache Definitionen existieren für Klasse %s, aber dasangegebenen Paket "
+"Mehrfache Definitionen existieren für Klasse %s, aber das angegebene Paket "
 "(%s) ist keins davon (%s)"
 
 msgid ""
 "multiple definitions exist for class %s; should specify one of them (%s), e."
 "g. by className()"
 msgstr ""
-"es existieren mehrere Definitionen für die Klasse %s; z.B. durchclassName() "
+"es existieren mehrere Definitionen für die Klasse %s; z.B. durch className() "
 "sollte eine von diesen (%s) spezifiziert werden"
 
 msgid "no definition found for class %s"
@@ -1007,8 +1015,8 @@ msgstr ""
 msgid ""
 "Argument \"representation\" cannot be used if argument \"slots\" is supplied"
 msgstr ""
-"Argument \"representation\" kann nicht benutzt werden, wenn Argumen\n"
-"\"slot\" angegeben wird"
+"Argument \"representation\" kann nicht benutzt werden, wenn Argument \"slot"
+"\" angegeben wird"
 
 msgid ""
 "only arguments 'Class' and 'where' can be supplied when argument "
@@ -1035,8 +1043,8 @@ msgid ""
 "error in contained classes (%s) for class %s and unable to restore previous "
 "definition from %s"
 msgstr ""
-"Fehler in den enthaltenen Klassen (%s) für Klasse %s und kann die "
-"frühereDefinition nicht aus %s wiederherstellen"
+"Fehler in den enthaltenen Klassen (%s) für Klasse %s und kann die frühere "
+"Definition nicht aus %s wiederherstellen"
 
 msgid ""
 "error in contained classes (%s) for class %s; previous definition restored "
@@ -1088,13 +1096,13 @@ msgstr ""
 "eine Validitätsmethode muss NULL oder eine Funktion eines Argumentes sein"
 
 msgid "class %s not found on %s; 'resetClass' will have no effect"
-msgstr "Klasse %s nicht in %s gefunden; 'resetClass' hat keinen Effekt "
+msgstr "Klasse %s nicht in %s gefunden; 'resetClass' hat keinen Effekt"
 
 msgid ""
 "argument 'classDef' must be a string or a class representation; got an "
 "object of class %s"
 msgstr ""
-"Argument 'classDef' muss eine Zeichenkette oder eine Klassenrepresentation "
+"Argument 'classDef' muss eine Zeichenkette oder eine Klassenrepräsentation "
 "sein; bekam ein Objekt aus Klasse %s"
 
 msgid "class %s is sealed; 'resetClass' will have no effect"
@@ -1161,8 +1169,8 @@ msgstr ""
 msgid ""
 "argument %s must be a list or a character vector; got an object of class %s"
 msgstr ""
-"Argument %s muss eine Liste oder eine Zeichenkette sein;\n"
-"bekam ein Objekt aus Klasse %s"
+"Argument %s muss eine Liste oder eine Zeichenkette sein; bekam ein Objekt "
+"aus Klasse %s"
 
 msgid "no function %s found"
 msgstr "keine Funktion %s gefunden"
@@ -1178,7 +1186,7 @@ msgstr "keine Methode und kein Standard um %s in %s umzuwandeln"
 
 msgid "no method or default for as() replacement of %s with Class=\"%s\""
 msgstr ""
-"keine Methode und keine Standard für einen Ersatz mit as() von %s mit Class="
+"keine Methode und kein Standard für einen Ersatz mit as() von %s mit Class="
 "\"%s\""
 
 msgid "trying to set an 'as' relation from %s to itself"
@@ -1198,8 +1206,8 @@ msgid ""
 "'as' method should have one argument, or match the arguments of coerce(): "
 "got  (%s)"
 msgstr ""
-"'as' Methode sollte ein Argument haben oder mit coerce() übereinstimmen:\n"
-" bekam (%s)"
+"'as' Methode sollte ein Argument haben oder mit coerce() übereinstimmen:  "
+"bekam (%s)"
 
 msgid ""
 "a 'replace' method definition in 'setAs' must be a function of two "
@@ -1276,7 +1284,7 @@ msgid ""
 "revise %s information---not exported?  Making a copy in package %s"
 msgstr ""
 "Klasse %s ist definiert (mit Paketslot %s) aber kein Metadatenobjekt "
-"gefunden, um %s Inforation zu überprüfen -- nicht exportiert? Erzeuge Kopie "
+"gefunden, um %s Information zu überprüfen -- nicht exportiert? Erzeuge Kopie "
 "in Paket %s"
 
 msgid "class %s cannot extend class %s"
@@ -1299,14 +1307,12 @@ msgstr "Skelett der Methode geschrieben in %s"
 
 msgid "invalid object in meta table of methods for %s, label %s, had class %s"
 msgstr ""
-"Ungültiges Objekt im Metatable der Methoden für %s, Label %s, hatte Klasse %s"
+"ungültiges Objekt im Metatable der Methoden für %s, Label %s, hatte Klasse %s"
 
 msgid ""
-"invalid mlist element for signature %s at level %d (should be methods list "
-"or method, had class %s)"
-msgstr ""
-"ungültiges mlist Element für die Signatur %s auf Stufe %d (sollte\n"
-"Methodenliste oder Methode sein, hat Klasse %s)"
+"invalid mlist element for signature %s at level %d (should be "
+"MethodDefinition or .Primitive, had class %s)"
+msgstr "ungültiges mlist Element für die Signatur %s auf Stufe %d (sollte MethodDefinition oder .Primitive sein, hat Klasse %s)"
 
 msgid "bad method object stored in method table, class %s"
 msgstr "ungültiges Methodenobjekt in der Methodentabelle, Klasse %s"
@@ -1315,12 +1321,12 @@ msgid ""
 "invalid object in methods table (%s), expected a method, got an object of "
 "class %s"
 msgstr ""
-"ungültiges Objekt in der Methodentabelle (%s), Methode war erwartet,\n"
-"bekam Objekt der Klasse %s"
+"ungültiges Objekt in der Methodentabelle (%s), Methode war erwartet, bekam "
+"Objekt der Klasse %s"
 
-msgid "invalid or unset methods table in generic function \""
+msgid "invalid or unset methods table in generic function %s"
 msgstr ""
-"ungültige oder zurückgesetzte Methodentabelle in generischer Funktion \""
+"ungültige oder zurückgesetzte Methodentabelle in generischer Funktion %s"
 
 msgid "trying to find a methods table in a non-generic function"
 msgstr ""
@@ -1367,21 +1373,21 @@ msgid ""
 "trying to check signature length of group generic '%s', but it is not a "
 "group generic"
 msgstr ""
-"Versuch der Überprüfung der Signaturlänge der Gruppengenerischen '%s',\n"
-"ist aber gar keine Gruppengenerische"
+"Versuch der Überprüfung der Signaturlänge der Gruppengenerischen '%s', ist "
+"aber gar keine Gruppengenerische"
 
 msgid ""
 "trying to check signature length of generic '%s', but it is not a generic "
 "function: i = %d, funs = %s, gnames = %s"
 msgstr ""
-"Versuch der Überprüfung der Signaturlänge der Generischen '%s',ist aber gar "
+"Versuch der Überprüfung der Signaturlänge der Generischen '%s', ist aber gar "
 "keine Generische: i = %d, funs = %s, gnames = %s"
 
 msgid "no methods table for generic %s from package %s in package %s"
-msgstr "keine Methodentabelle für generische %s aus  Paket %s in Paket %s"
+msgstr "keine Methodentabelle für generische %s aus Paket %s in Paket %s"
 
 msgid "undefined classes (%s) will be ignored for argument '%s'"
-msgstr "nicht definerte Klassen (%s) werden für Argument '%s' ignoriert"
+msgstr "nicht definierte Klassen (%s) werden für Argument '%s' ignoriert"
 
 msgid ""
 "argument 'signatures' must be a character matrix whose rows are method "
@@ -1423,7 +1429,7 @@ msgid ""
 "invalid S4 class corresponding to S3 class: slots in  S4 version must extend "
 "corresponding slots in S3 version: fails for %s"
 msgstr ""
-"Unzulässige S4 Klasse korrespondiert mit S3 Klasse: Slots in der S4 Version  "
+"Unzulässige S4 Klasse korrespondiert mit S3 Klasse: Slots in der S4 Version "
 "müssen entsprechende Slots in der S3 Version erweitern; schlägt fehl für %s"
 
 msgid "explicit coercion of old-style class (%s) is not defined"
@@ -1447,8 +1453,8 @@ msgid ""
 "inconsistent old-style class information for %s (maybe mixing old and new "
 "classes?)"
 msgstr ""
-"inkonsistente Klasseninformation für %s im alten Stil (werden evtl. alten "
-"und neue Klassen vermischt?)"
+"inkonsistente Klasseninformation für %s im alten Stil (werden evtl. alte und "
+"neue Klassen vermischt?)"
 
 msgid ""
 "'S3Class' only defined for extensions of %s or classes with a data part:  "
@@ -1475,7 +1481,7 @@ msgstr "mehrfache Definitionen von %s gefunden; benutze die auf %s"
 
 msgid "%s is not a valid field or method name for reference class %s"
 msgstr ""
-"Feld %s ist keine gültiges Feld und kein Methodenname für die Referenzklasse "
+"Feld %s ist kein gültiges Feld und kein Methodenname für die Referenzklasse "
 "%s"
 
 msgid ""
@@ -1483,7 +1489,7 @@ msgid ""
 "definition of this method for class %s"
 msgstr ""
 "in der Methode \"%s\" ist ein Aufruf von superClass(), aber es gibt keine "
-"Oberklassendefiniton dieser Methode für die Klasse %s"
+"Superklassendefiniton dieser Methode für die Klasse %s"
 
 msgid "methods declared in usingMethods() but not found: %s"
 msgstr "Methoden deklariert in usingMethods() aber nicht gefunden: %s"
@@ -1499,7 +1505,7 @@ msgid ""
 "object of class %s"
 msgstr ""
 "Unbenannte Argumente für $new() müssen Objekte einer Referenzklasse sein; "
-"bekan ein Objekt der Klasse %s"
+"bekam ein Objekt der Klasse %s"
 
 msgid "%s is not a valid field or method name for this class"
 msgstr "%s ist keine gültiges Feld und kein Methodenname für diese Klasse"
@@ -1525,8 +1531,7 @@ msgid ""
 "method"
 msgstr ""
 "direkte Aufrufe von callSuper() sind unzulässig: sollte nur von einer "
-"anderen\n"
-"Methode aufgerufen werden"
+"anderen Methode aufgerufen werden"
 
 msgid "%s is not a field in this class"
 msgstr "%s ist kein Feld dieser Klasse"
@@ -1561,15 +1566,15 @@ msgid ""
 "the overriding class (\"%s\") of field %s is not a subclass of the existing "
 "field definition (\"%s\")"
 msgstr ""
-"Die überschreibende Klasse (\"%s\") des Feldes %s ist keine Unterklasse\n"
+"die überschreibende Klasse (\"%s\") des Feldes %s ist keine Subklasse\n"
 "der existierenden Felddefinition (\"%s\")"
 
 msgid ""
 "invalid assignment for reference class field %s, should be from class %s or "
 "a subclass (was class %s)"
 msgstr ""
-"Unzulässige Zueiwsung für Referenzklassenfeld %s, sollte aus Klasse %s oder eine "
-"Unterklasse sein (war Klasse %s)"
+"unzulässige Zuweiwsung für Referenzklassenfeld %s, sollte aus Klasse %s oder "
+"eine Subklasse sein (war Klasse %s)"
 
 msgid "invalid replacement: reference class field %s is read-only"
 msgstr "ungültige Ersetzung: Referenzklassenfeld %s ist nur lesbar"
@@ -1578,7 +1583,7 @@ msgid ""
 "the 'contains' argument should be the names of superclasses:  got an element "
 "of class %s"
 msgstr ""
-"Das 'contains' Argument sollten Namen von Oberklassen sein: bekam Element "
+"Das 'contains' Argument sollten Namen von Superklassen sein: bekam Element "
 "der Klasse %s"
 
 msgid "no definition found for inherited class: %s"
@@ -1655,15 +1660,15 @@ msgstr "Feld %s ist bereits gesichert"
 
 msgid "field %s of class %s has a non-default binding and cannot be locked"
 msgstr ""
-"Feld %s der Klasse %s hat eine nicht-standard Bindung und kann\n"
-"nicht gesichert werden."
+"Feld %s der Klasse %s hat eine nicht-standard Bindung und kann nicht "
+"gesichert werden."
 
 msgid ""
 "Class %s is not a subclass of %s; functional semantics not defined for this "
 "class"
 msgstr ""
-"Klasse %s ist keine Unterklasse von %s: funktionale Semantik nicht\n"
-"definiert für diese Klasse"
+"Klasse %s ist keine Subklasse von %s: funktionale Semantik nicht definiert "
+"für diese Klasse"
 
 msgid "Could not find local object in supplied environment"
 msgstr "konnte lokales Objekt in angegebener Umgebung nicht finden"
@@ -1673,8 +1678,7 @@ msgid ""
 "vector, got an object of class %s"
 msgstr ""
 "Unzulässiges 'ignore' Argument; sollte eine Klassendefinition oder eine "
-"Zeichenkette sein;\n"
-" bekam ein Objekt aus Klasse \"%s\""
+"Zeichenkette sein; bekam ein Objekt aus Klasse \"%s\""
 
 msgid "An object of class %s"
 msgstr "Ein Objekt der Klasse %s"
@@ -1736,7 +1740,7 @@ msgstr "kann das 'at' Argument nicht ohne Traceexpression nutzen"
 msgid ""
 "cannot use 'at' argument unless the function body has the form '{ ... }'"
 msgstr ""
-"kann das 'at' Argument nur nutzen, wenn der Funtionskörper die Form "
+"kann das 'at' Argument nur nutzen, wenn der Funktionskörper die Form "
 "'{ ... }' besitzt"
 
 msgid "assigning over the binding of symbol %s in environment/package %s"
@@ -1760,7 +1764,7 @@ msgid ""
 "specify the package"
 msgstr ""
 "keines der Objekte aus dem Quelltext konnte gefunden werden; entweder muss "
-"das Paket attached werden oder zumindest spezifiziert"
+"das Paket attached oder zumindest spezifiziert werden"
 
 msgid "objects found in multiple packages: using %s and ignoring %s"
 msgstr "Objekte in mehreren Paketen gefunden: nutze %s, ignoriere %s"
@@ -1790,11 +1794,11 @@ msgid ""
 "source): %s"
 msgstr ""
 "kann keine Methoden für diese Funktionen einfügen (Methodentabelle nicht im "
-"Quelltext: %s"
+"Quelltext): %s"
 
 msgid "Non-function objects are not currently inserted (not traceable): %s"
 msgstr ""
-"nicht-funktionen Objekte sind aktuell nicht eingefügt (nicht verfolgbar): %s"
+"Nicht-Funktionen Objekte sind aktuell nicht eingefügt (nicht verfolgbar): %s"
 
 msgid "New functions are not currently inserted (not untraceable): %s"
 msgstr "Neue Funktionen sind aktuell nicht eingefügt (nicht verfolgbar): %s"
@@ -1810,7 +1814,7 @@ msgstr ""
 "nicht eingefügt"
 
 msgid "Methods inserted for function %s(): %s"
-msgstr "Methoden eingefügt für Funktion %s(). %s"
+msgstr "Methoden eingefügt für Funktion %s(): %s"
 
 msgid "no definition for object %s found in tracing environment"
 msgstr "keine Definition für das Objekt %s in der Verfolgungsumgebung gefunden"
@@ -1825,7 +1829,7 @@ msgstr ""
 "Verfolgungsumgebung zu sein"
 
 msgid "no method in methods table for %s for signature %s"
-msgstr "keine Methode in der Methodentabelle für  %s für Signatur %s"
+msgstr "keine Methode in der Methodentabelle für %s für Signatur %s"
 
 msgid "unloading 'methods' package ..."
 msgstr "entferne 'methods' Paket ... "
@@ -1971,6 +1975,25 @@ msgstr[1] ""
 "keine Definiton der Klasse %s an der angegebenen Position, %s, Definitionen "
 "bei: %s"
 
+#~ msgid "special function %s is not permitted to have methods"
+#~ msgstr "spezielle Funktion %s darf keine Methoden besitzen"
+
+#~ msgid ""
+#~ "special function %s has no known argument list; will assume '(x, ...)'"
+#~ msgstr ""
+#~ "spezielle Funktion %s hat keine bekannte Argumentliste; unterstelle "
+#~ "'(x, ...)'"
+
+#~ msgid ""
+#~ "'callGeneric' with a primitive needs explicit arguments (no formal args "
+#~ "defined)"
+#~ msgstr ""
+#~ "'callGeneric' mit einem Primitiv benötigt explizite Argumente (keine "
+#~ "formalen Argumente definiert)"
+
+#~ msgid "\""
+#~ msgstr "\""
+
 #~ msgid ""
 #~ "could not find superclass %s to clean up when removing subclass "
 #~ "references to class %s"
@@ -2020,8 +2043,8 @@ msgstr[1] ""
 #~ "no S4 method for function %s and signature %s; consider getS3method() if "
 #~ "you wanted the S3 method"
 #~ msgstr ""
-#~ "keine S4 Methode für Funktion %s und Signatur %s; beachten Sie getS3method"
-#~ "(), falls S3 Methode gewünscht"
+#~ "keine S4 Methode für Funktion %s und Signatur %s; beachten Sie "
+#~ "getS3method(), falls S3 Methode gewünscht"
 
 #~ msgid ""
 #~ "no method defined in methods list object for function %s and signature %s"
@@ -2166,9 +2189,6 @@ msgstr[1] ""
 #~ "Klassenmethode behandelt,\n"
 #~ "Mögliche Beschädigung der Methoden der Klasse"
 
-#~ msgid "(class %s)"
-#~ msgstr "(Klasse %s)"
-
 #~ msgid "for method %s()"
 #~ msgstr "für Methode %s()"
 
diff --git a/src/library/methods/po/R-fr.po b/src/library/methods/po/R-fr.po
index 1180041..f2c434f 100644
--- a/src/library/methods/po/R-fr.po
+++ b/src/library/methods/po/R-fr.po
@@ -7,7 +7,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: R 2.12.0\n"
 "Report-Msgid-Bugs-To: bugs.r-project.org\n"
-"POT-Creation-Date: 2013-11-25 05:14\n"
+"POT-Creation-Date: 2016-04-01 09:50\n"
 "PO-Revision-Date: 2014-03-17 10:55+0100\n"
 "Last-Translator: Philippe Grosjean <phgrosjean at sciviews.org>\n"
 "Language-Team: French <R-core at r-project.org>\n"
@@ -18,7 +18,8 @@ msgstr ""
 "Plural-Forms: nplurals=2; plural=(n > 1);\n"
 "X-Generator: Poedit 1.6.4\n"
 
-msgid "OOPS: something wrong with line %d in '.OldClassesPrototypes'"
+#, fuzzy
+msgid "OOPS: something wrong with '.OldClassesPrototypes[[%d]]'"
 msgstr ""
 "OOPS : il y a un probl�me avec la ligne %d dans '.OldClassesPrototypes'"
 
@@ -143,9 +144,10 @@ msgstr ""
 msgid "invalid argument 'name': %s"
 msgstr "argument 'name' erron� : %s"
 
+#, fuzzy
 msgid ""
-"%s is a primitive function;  methods can be defined, but the generic "
-"function is implicit, and cannot be changed."
+"%s dispatches internally;  methods can be defined, but the generic function "
+"is implicit, and cannot be changed."
 msgstr ""
 "%s est une fonction primitive ; Les m�thodes peuvent �tre d�finies, mais la "
 "fonction g�n�rique est implicite et ne peut �tre modifi�e."
@@ -300,6 +302,12 @@ msgstr ""
 "le premier argument doit �tre le ou les noms des fonctions g�n�riques (un "
 "objet de classe %s est fourni)"
 
+#, fuzzy
+msgid "must supply 'generic.function' or 'class'"
+msgstr ""
+"il faut fournir soit une fonction g�n�rique, soit une fonction par d�faut "
+"pour %s"
+
 msgid "%s is not an S4 generic function in %s; methods not removed"
 msgstr ""
 "%s n'est pas une fonction g�n�rique S4 dans %s ; Les m�thodes ne sont pas "
@@ -326,14 +334,8 @@ msgstr "La fonction %s est d
 msgid "Function %s is a group generic; do not call it directly"
 msgstr "La fonction %s est un groupe g�n�rique ; Ne l'appelez pas directement"
 
-msgid ""
-"'callGeneric' with a primitive needs explicit arguments (no formal args "
-"defined)"
-msgstr ""
-"'callGeneric' avec une primitive n�cessite des arguments explicites (pas "
-"d'arguments formels d�finis)"
-
-msgid "'callGeneric' must be called from a generic function or method"
+#, fuzzy
+msgid "callGeneric() must be called from within a method body"
 msgstr ""
 "'callGeneric' doit �tre appel� depuis une fonction g�n�rique ou une m�thode"
 
@@ -398,14 +400,13 @@ msgstr ""
 msgid "non-generic function '%s' given to findMethods()"
 msgstr "fonction non g�n�rique '%s' fournie � findMethods()"
 
-msgid "only FALSE is meaningful for 'inherited', when 'where' is supplied (got"
+#, fuzzy
+msgid ""
+"only FALSE is meaningful for 'inherited', when 'where' is supplied (got %s)"
 msgstr ""
 "seul FALSE a un sens pour 'inherited', lorsque 'where' est fourni (il s'agit "
 "de"
 
-msgid "\""
-msgstr "\""
-
 msgid "argument 'f' must be a generic function or %s"
 msgstr "l'argument 'f' doit �tre une fonction g�n�rique ou %s"
 
@@ -532,6 +533,18 @@ msgstr ""
 msgid "use %s instead."
 msgstr "utilisez %s � la place."
 
+#, fuzzy
+msgid ""
+"%s, along with other use of the \"MethodsList\" metadata objects, is defunct."
+msgstr ""
+"%s, ainsi que d'autres utilisations des objets metadonn�es \"MethodList\", "
+"sont obsol�tes"
+
+#, fuzzy
+msgid "in %s: use of \"MethodsList\" metadata objects is defunct."
+msgstr ""
+"dans %s : l'utilisation des objets de m�tadonn�e \"MethodList\" est obsol�te."
+
 msgid "invalid object for formal method definition: type %s"
 msgstr "objet incorrect pour la d�finition formelle de m�thode : type %s"
 
@@ -560,6 +573,13 @@ msgstr ""
 "les noms dans la signature pour la m�thode (%s) ne correspondent pas aux "
 "arguments de la fonction %s (%s)"
 
+#, fuzzy
+msgid ""
+"the names in signature for method (%s) do not match function's arguments (%s)"
+msgstr ""
+"les noms dans la signature pour la m�thode (%s) ne correspondent pas aux "
+"arguments de la fonction %s (%s)"
+
 msgid ""
 "a call to callNextMethod() appears in a call to %s, but the call does not "
 "seem to come from either a generic function or another 'callNextMethod'"
@@ -577,6 +597,9 @@ msgstr ""
 msgid "bad object found as method (class %s)"
 msgstr "mauvais objet trouv� comme m�thode (class %s)"
 
+msgid "No next method available"
+msgstr ""
+
 msgid ""
 "in constructing the prototype for class %s: prototype has class %s, but the "
 "data part specifies class %s"
@@ -608,6 +631,9 @@ msgstr ""
 msgid "undefined slot classes in definition of %s: %s"
 msgstr "slot non d�fini dans la d�finition de classe de %s : %s"
 
+msgid "(class %s)"
+msgstr "(classe %s)"
+
 msgid ""
 "in definition of class %s, information for superclass %s is of class %s "
 "(expected \"SClassExtension\")"
@@ -753,15 +779,6 @@ msgid "unable to find an environment containing class %s"
 msgstr "impossible de trouver un environnement contenant la classe %s"
 
 msgid ""
-"Note: the specification for S3 class %s in package %s seems equivalent to "
-"one from package %s: not turning on duplicate class definitions for this "
-"class."
-msgstr ""
-"Note: une sp�cification de classe S3 %s dans le package %s semble "
-"�quivalente de celle dans le package %s et ne conduit pas � une d�finition "
-"dupliqu�e de classe"
-
-msgid ""
 "Note: some superclasses of class %s in package %s have duplicate "
 "definitions.  This definition is not being treated as equivalent to that "
 "from package %s"
@@ -778,6 +795,11 @@ msgstr ""
 "celle du package %s et ne conduit donc pas � une d�finition dupliqu�e pour "
 "cette classe"
 
+msgid ""
+"Found more than one class \"%s\" in cache; using the first, from namespace "
+"'%s'"
+msgstr ""
+
 msgid "undefined subclass %s of class %s; definition not updated"
 msgstr ""
 "Sous-classe ind�finie, %s, de la classe %s ; la d�finition n'est pas mise � "
@@ -836,14 +858,6 @@ msgid "no suitable arguments to dispatch methods in this function"
 msgstr ""
 "pas d'arguments corrects pour dispatcher les m�thodes de cette fonction"
 
-msgid "special function %s is not permitted to have methods"
-msgstr "la fonction sp�ciale %s ne peut recevoir des d�finitions de m�thodes"
-
-msgid "special function %s has no known argument list; will assume '(x, ...)'"
-msgstr ""
-"la fonction sp�ciale %s n'a pas de liste d'arguments connue ; les arguments "
-"'(x, ...)' seront consid�r�s par d�faut"
-
 msgid "making a generic for special function %s"
 msgstr "cr�ation d'un fonction g�n�rique pour la fonction sp�ciale %s"
 
@@ -893,21 +907,12 @@ msgstr ""
 "L'argument 'f' doit �tre une cha�ne de caract�res, une fonction g�n�rique, "
 "ou une primitive : il s'agit d'une fonction ordinaire"
 
-msgid "methods cannot be defined for the primitive function %s"
-msgstr "des m�thodes ne peuvent �tre d�finies pour la fonction primitive %s"
-
 msgid "no generic function found for %s"
 msgstr "aucune fonction g�n�rique n'est trouv�e pour %s"
 
 msgid "Empty function name in .getGeneric"
 msgstr "nom de fonction vide dans .getGeneric"
 
-msgid ""
-"package %s seems to have out-of-date methods; need to reinstall from source"
-msgstr ""
-"le package %s semble avoir des m�thodes p�rim�es ; il faut le r�installer "
-"depuis ses sources"
-
 msgid "no methods found for %s; cacheGenericsMetaData() will have no effect"
 msgstr ""
 "aucune m�thode n'est trouv�e pour %s ; cacheGenericMetaData() n'aura aucun "
@@ -917,6 +922,9 @@ msgid "invalid value from generic function %s, class %s, expected %s"
 msgstr ""
 "valeur incorrecte pour la fonction g�n�rique %s, classe %s, mais attendu %s"
 
+msgid "\"MethodsList\" is defunct; allMethods now are empty"
+msgstr ""
+
 msgid ""
 "the body of the generic function for %s calls 'standardGeneric' to dispatch "
 "on a different name (\"%s\")!"
@@ -1013,10 +1021,6 @@ msgstr ""
 msgid "no definition found for class %s"
 msgstr "aucune d�finition de la classe %s n'est trouv�e"
 
-msgid "trying to execute load actions without 'methods' package"
-msgstr ""
-"tentative d'ex�cution les actions de chargement sans le package 'methods'"
-
 msgid "missing function for load action: %s"
 msgstr "aucune d�finition n'existe pour la fonction load : %s"
 
@@ -1272,6 +1276,13 @@ msgstr ""
 "des m�thodes existent actuellement pour convertir automatiquement de %s vers "
 "%s ; Elles seront remplac�es."
 
+#, fuzzy
+msgid "Function must be an S4 generic"
+msgstr "nom de fonction vide dans .getGeneric"
+
+msgid "method is not being debugged"
+msgstr ""
+
 msgid "object %s not found"
 msgstr "objet %s introuvable"
 
@@ -1348,9 +1359,10 @@ msgstr ""
 "objet incorrect dans la table de m�tadonn�es des m�thodes pour %s, "
 "l'�tiquette %s, avait la classe %s"
 
+#, fuzzy
 msgid ""
-"invalid mlist element for signature %s at level %d (should be methods list "
-"or method, had class %s)"
+"invalid mlist element for signature %s at level %d (should be "
+"MethodDefinition or .Primitive, had class %s)"
 msgstr ""
 "�l�ment mlist incorrect pour la signature %s au niveau %d (devrait �tre la "
 "liste des m�thodes, a la classe %s)"
@@ -1366,7 +1378,8 @@ msgstr ""
 "objets incorrects dans la table des m�thodes (%s) : une m�thode est attendue "
 "et un objet de classe %s est fourni"
 
-msgid "invalid or unset methods table in generic function \""
+#, fuzzy
+msgid "invalid or unset methods table in generic function %s"
 msgstr ""
 "table de m�thodes incorrecte ou non d�finie pour la fonction g�n�rique \""
 
@@ -1590,6 +1603,10 @@ msgstr ""
 msgid "%s is not a field in this class"
 msgstr "%s n'est pas un champ de cette classe"
 
+#, fuzzy
+msgid "Methods not found: %s"
+msgstr "objet %s introuvable"
+
 msgid ""
 "the definition of class %s in package %s is locked, methods may not be "
 "redefined"
@@ -1722,6 +1739,11 @@ msgstr ""
 "le champ %s de la classe %s a un lien non standard et ne peut �tre verrouill�"
 
 msgid ""
+"Reference superclasses must come from the same package for the environment "
+"to be defined:  got %s and %s"
+msgstr ""
+
+msgid ""
 "Class %s is not a subclass of %s; functional semantics not defined for this "
 "class"
 msgstr ""
@@ -1773,8 +1795,8 @@ msgstr ""
 msgid "the method for %s for this signature was not being traced"
 msgstr "la m�thode pour %s pour cette signature ne sera pas d�bogu�e (trac�e)"
 
-msgid ""
-"making a traced version of a primitive; arguments will be treated as '...'"
+#, fuzzy
+msgid "making a traced version of a special; arguments may be altered"
 msgstr ""
 "cr�ation d'une version de d�boguage d'une primitive ; Les arguments seront "
 "trait�s comme '...'"
@@ -2045,6 +2067,49 @@ msgstr[1] ""
 "d�finitions dans : %s"
 
 #~ msgid ""
+#~ "Note: the specification for S3 class %s in package %s seems equivalent to "
+#~ "one from package %s: not turning on duplicate class definitions for this "
+#~ "class."
+#~ msgstr ""
+#~ "Note: une sp�cification de classe S3 %s dans le package %s semble "
+#~ "�quivalente de celle dans le package %s et ne conduit pas � une "
+#~ "d�finition dupliqu�e de classe"
+
+#~ msgid "methods cannot be defined for the primitive function %s"
+#~ msgstr "des m�thodes ne peuvent �tre d�finies pour la fonction primitive %s"
+
+#~ msgid ""
+#~ "package %s seems to have out-of-date methods; need to reinstall from "
+#~ "source"
+#~ msgstr ""
+#~ "le package %s semble avoir des m�thodes p�rim�es ; il faut le r�installer "
+#~ "depuis ses sources"
+
+#~ msgid "trying to execute load actions without 'methods' package"
+#~ msgstr ""
+#~ "tentative d'ex�cution les actions de chargement sans le package 'methods'"
+
+#~ msgid "special function %s is not permitted to have methods"
+#~ msgstr ""
+#~ "la fonction sp�ciale %s ne peut recevoir des d�finitions de m�thodes"
+
+#~ msgid ""
+#~ "special function %s has no known argument list; will assume '(x, ...)'"
+#~ msgstr ""
+#~ "la fonction sp�ciale %s n'a pas de liste d'arguments connue ; les "
+#~ "arguments '(x, ...)' seront consid�r�s par d�faut"
+
+#~ msgid ""
+#~ "'callGeneric' with a primitive needs explicit arguments (no formal args "
+#~ "defined)"
+#~ msgstr ""
+#~ "'callGeneric' avec une primitive n�cessite des arguments explicites (pas "
+#~ "d'arguments formels d�finis)"
+
+#~ msgid "\""
+#~ msgstr "\""
+
+#~ msgid ""
 #~ "could not find superclass %s to clean up when removing subclass "
 #~ "references to class %s"
 #~ msgstr ""
@@ -2241,9 +2306,6 @@ msgstr[1] ""
 #~ "La m�thode %s de la classe %s n'a pas �t� trait�e comme m�thode de classe "
 #~ "avant installation. Les m�thodes de la classe sont peut-�tre corrompues."
 
-#~ msgid "(class %s)"
-#~ msgstr "(classe %s)"
-
 #~ msgid "for method %s()"
 #~ msgstr "pour la m�thode %s()"
 
diff --git a/src/library/methods/po/R-ja.po b/src/library/methods/po/R-ja.po
index 6a52352..78fd2ba 100644
--- a/src/library/methods/po/R-ja.po
+++ b/src/library/methods/po/R-ja.po
@@ -2,18 +2,20 @@ msgid ""
 msgstr ""
 "Project-Id-Version: R 2.5.0 \n"
 "Report-Msgid-Bugs-To: bugs.r-project.org\n"
-"POT-Creation-Date: 2013-11-25 05:14\n"
-"PO-Revision-Date: 2014-03-26 13:54+0200 \n"
+"POT-Creation-Date: 2016-04-01 09:50\n"
+"PO-Revision-Date: 2015-03-27 14:52+0900 \n"
 "Last-Translator: Masafumi  \n"
 "Language-Team: RjpWiki Message Translation Team <mokada at md.tsukuba.ac.jp> \n"
 "Language: ja \n"
 "MIME-Version: 1.0 \n"
-"Content-Type: text/plain; charset=utf-8 \n"
+"Content-Type: text/plain; charset=UTF-8 \n"
 "Content-Transfer-Encoding: 8bit \n"
 "Plural-Forms: nplurals=1; plural=0; \n"
-"X-Generator: Pootle 2.0.5 \n"
+"X-Generator: Pootle 2.5.1.1 \n"
+"X-POOTLE-MTIME: 1427435556.000000 \n"
 
-msgid "OOPS: something wrong with line %d in '.OldClassesPrototypes'"
+#, fuzzy
+msgid "OOPS: something wrong with '.OldClassesPrototypes[[%d]]'"
 msgstr " おや、'.OldClassesPrototypes' の第 %d 行目が何か変です "
 
 msgid ""
@@ -138,9 +140,10 @@ msgstr " union クラスを生成できません: メンバー %s を設定で
 msgid "invalid argument 'name': %s"
 msgstr " 不正な引数 'name' です: %s "
 
+#, fuzzy
 msgid ""
-"%s is a primitive function;  methods can be defined, but the generic "
-"function is implicit, and cannot be changed."
+"%s dispatches internally;  methods can be defined, but the generic function "
+"is implicit, and cannot be changed."
 msgstr ""
 " %s はプリミティブな関数です; メソッドを定義できますが、総称的関数は隠匿され"
 "ており、変更できません "
@@ -149,8 +152,8 @@ msgid ""
 "if the 'def' argument is supplied, it must be a function that calls "
 "standardGeneric(\"%s\") or is the default"
 msgstr ""
-" もし 'def' 引数が与えられるなら、それはメソッドを割り当てる standardGeneric"
-"(\"%s\") を呼び出す関数である必要があります "
+" もし 'def' 引数が与えられるなら、それはメソッドを割り当てる "
+"standardGeneric(\"%s\") を呼び出す関数である必要があります "
 
 msgid ""
 "must supply a function skeleton for %s, explicitly or via an existing "
@@ -291,6 +294,9 @@ msgstr ""
 " 最初の引数はより総称的な関数の一つの名前であるべきです (クラス %s のオブジェ"
 "クトを得ました) "
 
+msgid "must supply 'generic.function' or 'class'"
+msgstr " 'generic.function' か 'class' を与える必要があります "
+
 msgid "%s is not an S4 generic function in %s; methods not removed"
 msgstr ""
 " %s は %s 中の S4 総称的関数ではありません; メソッドは取り除かれませんでした "
@@ -314,15 +320,8 @@ msgstr " 関数 %s は既にグループ総称的です; 変更しません "
 msgid "Function %s is a group generic; do not call it directly"
 msgstr " 関数 %s はグループ総称的です;直接呼び出さないで下さい "
 
-msgid ""
-"'callGeneric' with a primitive needs explicit arguments (no formal args "
-"defined)"
-msgstr ""
-" プリミティブを伴う 'callGeneric' は明示的な引数 (形式的引数が定義されていな"
-"い) を必要とします "
-
-msgid "'callGeneric' must be called from a generic function or method"
-msgstr " 'callGeneric' は総称的関数かメソッドから呼び出されなくてはなりません "
+msgid "callGeneric() must be called from within a method body"
+msgstr " callGeneric() はメソッド本体から呼び出されなくてはなりません "
 
 msgid "expected a non-empty character string for argument name"
 msgstr " 引数の名前には空ではない文字列が必要です "
@@ -383,13 +382,11 @@ msgstr ""
 msgid "non-generic function '%s' given to findMethods()"
 msgstr " findMethods() に総称的でない関数 '%s' が与えられました "
 
-msgid "only FALSE is meaningful for 'inherited', when 'where' is supplied (got"
+msgid ""
+"only FALSE is meaningful for 'inherited', when 'where' is supplied (got %s)"
 msgstr ""
 " 'where' が与えられた時は、'inherited' に対しては FALSE だけが意味を持ちます "
-"(以下が与えられました "
-
-msgid "\""
-msgstr " \" "
+"(%s が与えられました) "
 
 msgid "argument 'f' must be a generic function or %s"
 msgstr " 引数 'f' に対する関数は総称的関数または %s でなければなりません "
@@ -513,6 +510,15 @@ msgstr ""
 msgid "use %s instead."
 msgstr " %s を代わりに使ってください. "
 
+msgid ""
+"%s, along with other use of the \"MethodsList\" metadata objects, is defunct."
+msgstr ""
+" %s を別の \"MethodsList\" メタデータオブジェクトとともに使うことは廃止されま"
+"した "
+
+msgid "in %s: use of \"MethodsList\" metadata objects is defunct."
+msgstr " %s :\"MethodsList\" メタデータオブジェクトの使用は廃止されました "
+
 msgid "invalid object for formal method definition: type %s"
 msgstr " 形式的なメソッド定義に対する不正なオブジェクト:タイプ %s "
 
@@ -542,6 +548,11 @@ msgstr ""
 " メソッド (%s) に対するシグナチャ中の名前が %s の引数 (%s) にマッチしません "
 
 msgid ""
+"the names in signature for method (%s) do not match function's arguments (%s)"
+msgstr ""
+" メソッド (%s) に対するシグネチャ中の名前が関数の引数 (%s) にマッチしません "
+
+msgid ""
 "a call to callNextMethod() appears in a call to %s, but the call does not "
 "seem to come from either a generic function or another 'callNextMethod'"
 msgstr ""
@@ -558,6 +569,9 @@ msgstr ""
 msgid "bad object found as method (class %s)"
 msgstr " 間違ったオブジェクトがメソッド (クラス %s) として見付かりました "
 
+msgid "No next method available"
+msgstr " 次のメソッドは利用可能ではありません "
+
 msgid ""
 "in constructing the prototype for class %s: prototype has class %s, but the "
 "data part specifies class %s"
@@ -589,6 +603,9 @@ msgstr ""
 msgid "undefined slot classes in definition of %s: %s"
 msgstr " %s の定義中に未定義のスロットクラス: %s "
 
+msgid "(class %s)"
+msgstr " (クラス \"%s\") "
+
 msgid ""
 "in definition of class %s, information for superclass %s is of class %s "
 "(expected \"SClassExtension\")"
@@ -726,14 +743,6 @@ msgid "unable to find an environment containing class %s"
 msgstr " クラス %s を含む環境を見付けることが出来ません "
 
 msgid ""
-"Note: the specification for S3 class %s in package %s seems equivalent to "
-"one from package %s: not turning on duplicate class definitions for this "
-"class."
-msgstr ""
-" 注意: パッケージ %2$s 中の S3 クラス %1$s  はパッケージ %3$s からのものと同"
-"値に見えますので、このクラスに対する重複クラス定義は行いません "
-
-msgid ""
 "Note: some superclasses of class %s in package %s have duplicate "
 "definitions.  This definition is not being treated as equivalent to that "
 "from package %s"
@@ -748,6 +757,11 @@ msgstr ""
 " 注意: パッケージ %2$s 中の S3 クラス %1$s はパッケージ %3$s からのものと同値"
 "に見えますので、このクラスに対する重複クラス定義は行いません "
 
+msgid ""
+"Found more than one class \"%s\" in cache; using the first, from namespace "
+"'%s'"
+msgstr ""
+
 msgid "undefined subclass %s of class %s; definition not updated"
 msgstr " 未定義のサブクラス %s (クラスは %s) です; 定義は更新されません "
 
@@ -798,12 +812,6 @@ msgstr ""
 msgid "no suitable arguments to dispatch methods in this function"
 msgstr " この関数中にはメソッドを割り当てるための適切な引数がありません "
 
-msgid "special function %s is not permitted to have methods"
-msgstr " 特殊関数 %s はメソッドを持つことが出来ません "
-
-msgid "special function %s has no known argument list; will assume '(x, ...)'"
-msgstr " 特殊関数 %s は引数リストを持っていません; '(x, ...)' と仮定します "
-
 msgid "making a generic for special function %s"
 msgstr " 特殊関数 %s のジェネリックを作ります "
 
@@ -848,21 +856,12 @@ msgstr ""
 " 引数 'f' は文字列、総称的関数またはプリミティブである必要がありますが、普通"
 "の関数が得られました "
 
-msgid "methods cannot be defined for the primitive function %s"
-msgstr " プリミティブ関数 %s に対してはメソッドを定義できません "
-
 msgid "no generic function found for %s"
 msgstr " %s に対する総称的関数は見付かりません "
 
 msgid "Empty function name in .getGeneric"
 msgstr " .getGeneric の中に空の関数名 "
 
-msgid ""
-"package %s seems to have out-of-date methods; need to reinstall from source"
-msgstr ""
-" パッケージ %s は時代遅れのメソッドを持つようです; ソースから再インストールす"
-"る必要があります "
-
 msgid "no methods found for %s; cacheGenericsMetaData() will have no effect"
 msgstr ""
 " %s に対するメソッドはありません; cacheGenericsMetaData() は効果を持ちません "
@@ -870,6 +869,9 @@ msgstr ""
 msgid "invalid value from generic function %s, class %s, expected %s"
 msgstr " 総称的関数 %s からの不正な値、クラス %s ですが %s が期待されます "
 
+msgid "\"MethodsList\" is defunct; allMethods now are empty"
+msgstr ""
+
 msgid ""
 "the body of the generic function for %s calls 'standardGeneric' to dispatch "
 "on a different name (\"%s\")!"
@@ -954,9 +956,6 @@ msgstr ""
 msgid "no definition found for class %s"
 msgstr " クラス %s に対する定義はありません "
 
-msgid "trying to execute load actions without 'methods' package"
-msgstr " 'methods' パッケージ無しにロード動作の実行を試みています "
-
 msgid "missing function for load action: %s"
 msgstr " ロード動作に対する関数がありません; %s "
 
@@ -1195,6 +1194,13 @@ msgstr ""
 " %s から %s への強制変換のためのメソッドが現在存在します; これらを交換しま"
 "す。 "
 
+#, fuzzy
+msgid "Function must be an S4 generic"
+msgstr " .getGeneric の中に空の関数名 "
+
+msgid "method is not being debugged"
+msgstr ""
+
 msgid "object %s not found"
 msgstr " オブジェクト %s は存在しません "
 
@@ -1269,9 +1275,10 @@ msgstr ""
 " %s、ラベル %s、に対するメソッドのメタテーブル中に不正なオブジェクトがありま"
 "す。クラス %s でした "
 
+#, fuzzy
 msgid ""
-"invalid mlist element for signature %s at level %d (should be methods list "
-"or method, had class %s)"
+"invalid mlist element for signature %s at level %d (should be "
+"MethodDefinition or .Primitive, had class %s)"
 msgstr ""
 " シグネチャ %s (レベル %d) に対する不正な mlist (メソッドのリストかメソッドで"
 "なければなりません、クラス %s でした) "
@@ -1286,8 +1293,8 @@ msgstr ""
 " メソッドテーブル (%s) 中に不正なオブジェクトがあります。メソッドが期待されま"
 "すが、クラス %s のオブジェクトが得られました "
 
-msgid "invalid or unset methods table in generic function \""
-msgstr " 以下の総称的関数中に不正か未設定のメソッドがあります \" "
+msgid "invalid or unset methods table in generic function %s"
+msgstr " 総称的関数 %s 中に不正か未設定のメソッドテーブルがあります "
 
 msgid "trying to find a methods table in a non-generic function"
 msgstr " 総称的でない関数中にメソッドテーブルを探しています "
@@ -1498,6 +1505,10 @@ msgstr ""
 msgid "%s is not a field in this class"
 msgstr " %s はこのクラス中の欄ではありません "
 
+#, fuzzy
+msgid "Methods not found: %s"
+msgstr " オブジェクト %s は存在しません "
+
 msgid ""
 "the definition of class %s in package %s is locked, methods may not be "
 "redefined"
@@ -1624,6 +1635,11 @@ msgstr ""
 " フィールド %s (クラス %s)は既定の結合を持たないためロックできません "
 
 msgid ""
+"Reference superclasses must come from the same package for the environment "
+"to be defined:  got %s and %s"
+msgstr ""
+
+msgid ""
 "Class %s is not a subclass of %s; functional semantics not defined for this "
 "class"
 msgstr ""
@@ -1673,8 +1689,8 @@ msgstr ""
 msgid "the method for %s for this signature was not being traced"
 msgstr " このシグナチャの %s に対するメソッドはトレースされていませんでした "
 
-msgid ""
-"making a traced version of a primitive; arguments will be treated as '...'"
+#, fuzzy
+msgid "making a traced version of a special; arguments may be altered"
 msgstr ""
 " プリミティブの traced バージョンを作っています; 引数は '...' として扱われま"
 "す "
@@ -1898,6 +1914,44 @@ msgstr[0] ""
 " クラス %s の定義は指定された位置 %s にありません、以下に関する定義です: %s "
 
 #~ msgid ""
+#~ "Note: the specification for S3 class %s in package %s seems equivalent to "
+#~ "one from package %s: not turning on duplicate class definitions for this "
+#~ "class."
+#~ msgstr ""
+#~ " 注意: パッケージ %2$s 中の S3 クラス %1$s  はパッケージ %3$s からのものと"
+#~ "同値に見えますので、このクラスに対する重複クラス定義は行いません "
+
+#~ msgid "methods cannot be defined for the primitive function %s"
+#~ msgstr " プリミティブ関数 %s に対してはメソッドを定義できません "
+
+#~ msgid ""
+#~ "package %s seems to have out-of-date methods; need to reinstall from "
+#~ "source"
+#~ msgstr ""
+#~ " パッケージ %s は時代遅れのメソッドを持つようです; ソースから再インストー"
+#~ "ルする必要があります "
+
+#~ msgid "trying to execute load actions without 'methods' package"
+#~ msgstr " 'methods' パッケージ無しにロード動作の実行を試みています "
+
+#~ msgid "special function %s is not permitted to have methods"
+#~ msgstr " 特殊関数 %s はメソッドを持つことが出来ません "
+
+#~ msgid ""
+#~ "special function %s has no known argument list; will assume '(x, ...)'"
+#~ msgstr " 特殊関数 %s は引数リストを持っていません; '(x, ...)' と仮定します "
+
+#~ msgid ""
+#~ "'callGeneric' with a primitive needs explicit arguments (no formal args "
+#~ "defined)"
+#~ msgstr ""
+#~ " プリミティブを伴う 'callGeneric' は明示的な引数 (形式的引数が定義されてい"
+#~ "ない) を必要とします "
+
+#~ msgid "\""
+#~ msgstr " \" "
+
+#~ msgid ""
 #~ "could not find superclass %s to clean up when removing subclass "
 #~ "references to class %s"
 #~ msgstr ""
@@ -2085,9 +2139,6 @@ msgstr[0] ""
 #~ " メソッド %s (クラス %s からの)はインストールされるまでクラスメソッドとし"
 #~ "て処理されません. このクラス中のメソッドに混乱がある可能性があります. "
 
-#~ msgid "(class %s)"
-#~ msgstr " (クラス \"%s\") "
-
 #~ msgid "for method %s()"
 #~ msgstr " メソッド %s() 用 "
 
diff --git a/src/library/methods/po/R-ko.po b/src/library/methods/po/R-ko.po
index dfe53d3..b6fb5cd 100644
--- a/src/library/methods/po/R-ko.po
+++ b/src/library/methods/po/R-ko.po
@@ -1,28 +1,36 @@
 # Korean translation for R methods package
-# src/library/methods/po/R-ko.po
-# Copyright (C) 1995-2014 The R Core Team
+# ./methods/po/R-ko.po
+#
+# Copyright (C) 1995-2016 The R Core Team
+#
 # This file is distributed under the same license as the R methods package.
-# Chel Hee Lee <chl948 at mail.usask.ca>, 2008-2014.
+# Maintained by Chel Hee Lee <chl948 at mail.usask.ca>, 2008-2016.
+# Contact: Chel Hee Lee <gnustats at gmail.com>
+#
+# Notes:
+# Under development (unstable) starting from 11-APR-2016 for R-3.3.1 - QC: in progress
+# Freezed on 10-APR-2016 for R-3.3.0 - QC: PASS
+# Freezed on 30-MAR-2015 for R-3.2.0 - QC: PASS
+# Freezed on 06-FEB-2015 for R-3.1.3 - QC: PASS
 #
 msgid ""
 msgstr ""
-"Project-Id-Version: R 3.1.0\n"
+"Project-Id-Version: R-3.3.0\n"
 "Report-Msgid-Bugs-To: bugs.r-project.org\n"
-"POT-Creation-Date: 2013-11-25 05:14\n"
-"PO-Revision-Date: 2014-03-27 13:32-0600\n"
+"POT-Creation-Date: 2016-04-01 09:50\n"
+"PO-Revision-Date: 2016-04-11 13:08-0600\n"
 "Last-Translator: Chel Hee Lee <chl948 at mail.usask.ca>\n"
-"Language-Team:  <chl948 at mail.usask.ca>\n"
+"Language-Team: Chel Hee Lee <chl948 at mail.usask.ca>\n"
 "Language: ko\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
 "Plural-Forms: nplurals=1; plural=0;\n"
-"X-Poedit-SourceCharset: UTF-8\n"
-"X-Generator: Poedit 1.5.4\n"
 
-msgid "OOPS: something wrong with line %d in '.OldClassesPrototypes'"
+msgid "OOPS: something wrong with '.OldClassesPrototypes[[%d]]'"
 msgstr ""
-"아이쿠: '.OldClassesPrototypes'내의 %d번째 줄에 무엇인가 잘못되었습니다"
+"OOPS: 무엇인가가 '.OldClassesPrototypes[[%d]]'를 사용함에 있어서 잘못되었습니"
+"다."
 
 msgid ""
 "unnamed argument to initialize() for S3 class must have a class definition; "
@@ -112,8 +120,8 @@ msgid ""
 "the computation: 'as(object,\"%s\") <- value' is valid when object has class "
 "%s only if 'is(value, \"%s\")' is TRUE ('class(value)' was %s)"
 msgstr ""
-"연산: 만약 'is(value, \"%3$s\")'가 TRUE ('class(value)' was %4$s)인 경우 'as"
-"(object,\"%1$s\") <- value'는 객체가 클래스 %2$s를 가질 때  유효합니다"
+"연산: 만약 'is(value, \"%3$s\")'가 TRUE ('class(value)' was %4$s)인 경우 "
+"'as(object,\"%1$s\") <- value'는 객체가 클래스 %2$s를 가질 때  유효합니다"
 
 msgid ""
 "there is no automatic definition for 'as(object, \"%s\") <- value' when "
@@ -143,11 +151,9 @@ msgid "invalid argument 'name': %s"
 msgstr "인자 'name'이 올바르지 않습니다: %s"
 
 msgid ""
-"%s is a primitive function;  methods can be defined, but the generic "
-"function is implicit, and cannot be changed."
+"%s dispatches internally;  methods can be defined, but the generic function "
+"is implicit, and cannot be changed."
 msgstr ""
-"%s는 프리미티브 함수입니다; 따라서 메소드들이 정의되어 질 수 있지만, 제네릭 "
-"함수는 절대적이고, 변경되어 질 수 없습니다."
 
 msgid ""
 "if the 'def' argument is supplied, it must be a function that calls "
@@ -287,6 +293,9 @@ msgid ""
 "object of class %s)"
 msgstr ""
 
+msgid "must supply 'generic.function' or 'class'"
+msgstr "반드시 'generic.function' 또는 'class'를 제공해야 합니다."
+
 msgid "%s is not an S4 generic function in %s; methods not removed"
 msgstr ""
 "%1$s는 %2$s내에 있는 S4 제네릭 함수가 아닙니다; 따라서 메소드들이 제거되지 않"
@@ -310,17 +319,13 @@ msgid "Function %s is already a group generic; no change"
 msgstr "함수 %s는 이미 그룹제네릭입니다; 변경하지 않습니다"
 
 msgid "Function %s is a group generic; do not call it directly"
-msgstr "함수 %s는 그룹제네릭입니다; 직접적으로 호출할 수 없습니다"
-
-msgid ""
-"'callGeneric' with a primitive needs explicit arguments (no formal args "
-"defined)"
 msgstr ""
-"프리미티브와 함께 사용되는 'callGeneric'는 명시적인 인자들을 필요로 합니다 "
-"(정의된 형식 인자들이 없습니다)"
+"함수 %s는 그룹제네릭(group generic)이므로 직접적으로 호출하지 말아야 합니다."
 
-msgid "'callGeneric' must be called from a generic function or method"
-msgstr "'callGeneric'은 반드시 제네릭 함수 또는 메소드로부터 호출되어야 합니다"
+msgid "callGeneric() must be called from within a method body"
+msgstr ""
+"'callGeneric'은 반드시 메소드 본체(method body)의 내부로부터 호출되어야 합니"
+"다."
 
 msgid "expected a non-empty character string for argument name"
 msgstr "인자의 이름에는 빈 문자열이 와서는 안됩니다"
@@ -382,13 +387,11 @@ msgstr ""
 msgid "non-generic function '%s' given to findMethods()"
 msgstr "findMethods()에 제네릭이 아닌 함수 '%s'가 주어졌습니다"
 
-msgid "only FALSE is meaningful for 'inherited', when 'where' is supplied (got"
+msgid ""
+"only FALSE is meaningful for 'inherited', when 'where' is supplied (got %s)"
 msgstr ""
-"'where'이 주어졌을 때, 'inherited'에 대해서 오로지 FALSE만이 의미가 있습니다 "
-"(다음이 주어졌습니다"
-
-msgid "\""
-msgstr "\""
+"'where'가 주어진 경우 (%s를 가짐), 'inherited'은 오로지 FALSE 인 경우에만 의"
+"미가 있습니다."
 
 msgid "argument 'f' must be a generic function or %s"
 msgstr "인자 'f'는 반드시 제네릭 함수 또는 %s이어야 합니다"
@@ -508,6 +511,13 @@ msgstr ""
 msgid "use %s instead."
 msgstr "대신 %s을 사용하세요."
 
+msgid ""
+"%s, along with other use of the \"MethodsList\" metadata objects, is defunct."
+msgstr ""
+
+msgid "in %s: use of \"MethodsList\" metadata objects is defunct."
+msgstr ""
+
 msgid "invalid object for formal method definition: type %s"
 msgstr "형식 메소드 정의에 대한 객체가 올바르지 않습니다: 유형 %s"
 
@@ -537,6 +547,12 @@ msgstr ""
 "다"
 
 msgid ""
+"the names in signature for method (%s) do not match function's arguments (%s)"
+msgstr ""
+"메소드에 대한 서명(signature)내에 있는 이름(%s)들이 함수의 인자(%s)들과 일치"
+"하지 않습니다."
+
+msgid ""
 "a call to callNextMethod() appears in a call to %s, but the call does not "
 "seem to come from either a generic function or another 'callNextMethod'"
 msgstr ""
@@ -554,6 +570,9 @@ msgstr ""
 msgid "bad object found as method (class %s)"
 msgstr ""
 
+msgid "No next method available"
+msgstr ""
+
 msgid ""
 "in constructing the prototype for class %s: prototype has class %s, but the "
 "data part specifies class %s"
@@ -579,6 +598,9 @@ msgstr ""
 msgid "undefined slot classes in definition of %s: %s"
 msgstr "%1$s의 정의내에 정의되어지지 않은 슬롯 클래스들입니다: %2$s"
 
+msgid "(class %s)"
+msgstr ""
+
 msgid ""
 "in definition of class %s, information for superclass %s is of class %s "
 "(expected \"SClassExtension\")"
@@ -716,15 +738,6 @@ msgid "unable to find an environment containing class %s"
 msgstr "클래스 %s를 포함하고 있는 환경을 찾을 수 없습니다"
 
 msgid ""
-"Note: the specification for S3 class %s in package %s seems equivalent to "
-"one from package %s: not turning on duplicate class definitions for this "
-"class."
-msgstr ""
-"노트: 패키지 %2$s내에 있는 S3 클래스 %1$s에 대한 세부사항들이 패키지 %3$s내"
-"에 있는 것과 같아 보입니다: 이 클래스에 대한 클래스 정의들이 중복되어 있는 "
-"것 같습니다."
-
-msgid ""
 "Note: some superclasses of class %s in package %s have duplicate "
 "definitions.  This definition is not being treated as equivalent to that "
 "from package %s"
@@ -740,6 +753,11 @@ msgstr ""
 "노트: 패키지 %2$s내 클래스 %1$s는 패키지 %3$s과 같아보입니다: 이 클래스에 대"
 "하여 중복된 클래스를 실행시키지 않습니다."
 
+msgid ""
+"Found more than one class \"%s\" in cache; using the first, from namespace "
+"'%s'"
+msgstr ""
+
 msgid "undefined subclass %s of class %s; definition not updated"
 msgstr ""
 "클래스 %2$s의 서브 클래스 %1$s가 정의되지 않았습니다; 업데이트된 정의가 아닙"
@@ -790,14 +808,6 @@ msgstr ""
 msgid "no suitable arguments to dispatch methods in this function"
 msgstr "이 함수의 디스패치를 위한 적절한 인자가 없습니다"
 
-msgid "special function %s is not permitted to have methods"
-msgstr "특이 함수 %s는 메소드를 가질 수 없습니다"
-
-msgid "special function %s has no known argument list; will assume '(x, ...)'"
-msgstr ""
-"특이 함수 %s는 알려진 인자 목록을 가지고 있지 않습니다; 따라서 '(x, ...)'를 "
-"가진다고 가정됩니다"
-
 msgid "making a generic for special function %s"
 msgstr "특이 함수 %s에 대한 제네릭을 생성합니다"
 
@@ -840,20 +850,12 @@ msgstr ""
 "인자 'f'는 반드시 문자열, 제네릭 함수, 또는 프리미티브이어야합니다: 그러나 일"
 "반 함수를 가지고 있습니다"
 
-msgid "methods cannot be defined for the primitive function %s"
-msgstr "프리미티브 함수 %s에 대해서 메소드들이 정의될 수 없습니다"
-
 msgid "no generic function found for %s"
 msgstr "%s에 대한 제네릭 함수를 찾을 수 없습니다"
 
 msgid "Empty function name in .getGeneric"
 msgstr ".getGeneric내에 이름이 없는 함수가 있습니다"
 
-msgid ""
-"package %s seems to have out-of-date methods; need to reinstall from source"
-msgstr ""
-"패키지 %s는  seems to have out-of-date methods; need to reinstall from source"
-
 msgid "no methods found for %s; cacheGenericsMetaData() will have no effect"
 msgstr ""
 "%s에 대한 메소드를 찾을 수 없습니다; 따라서 cacheGenericsMetaData()는 아무런 "
@@ -862,6 +864,9 @@ msgstr ""
 msgid "invalid value from generic function %s, class %s, expected %s"
 msgstr ""
 
+msgid "\"MethodsList\" is defunct; allMethods now are empty"
+msgstr ""
+
 msgid ""
 "the body of the generic function for %s calls 'standardGeneric' to dispatch "
 "on a different name (\"%s\")!"
@@ -945,9 +950,6 @@ msgstr ""
 msgid "no definition found for class %s"
 msgstr "클래스 %s에 대한 정의를 찾을 수 없습니다"
 
-msgid "trying to execute load actions without 'methods' package"
-msgstr "'methods' 패키지 없이 로드 액션들의 실행을 시도합니다"
-
 msgid "missing function for load action: %s"
 msgstr "로드 액션에 대하여 다음 함수들이 누락되었습니다: %s"
 
@@ -1177,6 +1179,12 @@ msgstr ""
 "%1$s에서 %2$s로의 강제로 변환하는 메소드는 현재 존재하지 않습니다; 이것들은 "
 "대체되어질 것입니다."
 
+msgid "Function must be an S4 generic"
+msgstr ""
+
+msgid "method is not being debugged"
+msgstr ""
+
 msgid "object %s not found"
 msgstr "객체 %s를 찾을 수 없습니다"
 
@@ -1249,8 +1257,8 @@ msgid "invalid object in meta table of methods for %s, label %s, had class %s"
 msgstr ""
 
 msgid ""
-"invalid mlist element for signature %s at level %d (should be methods list "
-"or method, had class %s)"
+"invalid mlist element for signature %s at level %d (should be "
+"MethodDefinition or .Primitive, had class %s)"
 msgstr ""
 
 msgid "bad method object stored in method table, class %s"
@@ -1263,8 +1271,9 @@ msgstr ""
 "메소드 테이블 (%s)내에 잘못된 객체가 있습니다, 메소드가 와야 하는데, 클래스 "
 "%s 객체를 가집니다"
 
-msgid "invalid or unset methods table in generic function \""
+msgid "invalid or unset methods table in generic function %s"
 msgstr ""
+"제네릭 함수 %s내에 있는 메소드 테이블이 올바르지 않거나 설정되지 않았습니다."
 
 msgid "trying to find a methods table in a non-generic function"
 msgstr ""
@@ -1448,6 +1457,9 @@ msgstr ""
 msgid "%s is not a field in this class"
 msgstr "%s는 이 클래스 내에 있는 항목이 아닙니다"
 
+msgid "Methods not found: %s"
+msgstr ""
+
 msgid ""
 "the definition of class %s in package %s is locked, methods may not be "
 "redefined"
@@ -1565,6 +1577,11 @@ msgstr ""
 "클래스 %2$s의 항목 %1$s는 디폴트 바인딩이 아니기 때문에 잠겨질 수 없습니다"
 
 msgid ""
+"Reference superclasses must come from the same package for the environment "
+"to be defined:  got %s and %s"
+msgstr ""
+
+msgid ""
 "Class %s is not a subclass of %s; functional semantics not defined for this "
 "class"
 msgstr ""
@@ -1612,8 +1629,7 @@ msgstr ""
 msgid "the method for %s for this signature was not being traced"
 msgstr "이 서명에 대하여 %s에 대한 메소드는 추적될 수 없습니다"
 
-msgid ""
-"making a traced version of a primitive; arguments will be treated as '...'"
+msgid "making a traced version of a special; arguments may be altered"
 msgstr ""
 
 msgid ""
@@ -1836,5 +1852,57 @@ msgid_plural ""
 msgstr[0] ""
 msgstr[1] ""
 
+#~ msgid ""
+#~ "%s is a primitive function;  methods can be defined, but the generic "
+#~ "function is implicit, and cannot be changed."
+#~ msgstr ""
+#~ "%s는 프리미티브 함수입니다; 따라서 메소드들이 정의되어 질 수 있지만, 제네"
+#~ "릭 함수는 절대적이고, 변경되어 질 수 없습니다."
+
+#~ msgid ""
+#~ "Note: the specification for S3 class %s in package %s seems equivalent to "
+#~ "one from package %s: not turning on duplicate class definitions for this "
+#~ "class."
+#~ msgstr ""
+#~ "노트: 패키지 %2$s내에 있는 S3 클래스 %1$s에 대한 세부사항들이 패키지 %3$s"
+#~ "내에 있는 것과 같아 보입니다: 이 클래스에 대한 클래스 정의들이 중복되어 있"
+#~ "는 것 같습니다."
+
+#~ msgid "methods cannot be defined for the primitive function %s"
+#~ msgstr "프리미티브 함수 %s에 대해서 메소드들이 정의될 수 없습니다"
+
+#~ msgid ""
+#~ "package %s seems to have out-of-date methods; need to reinstall from "
+#~ "source"
+#~ msgstr ""
+#~ "패키지 %s는  seems to have out-of-date methods; need to reinstall from "
+#~ "source"
+
+#~ msgid "trying to execute load actions without 'methods' package"
+#~ msgstr "'methods' 패키지 없이 로드 액션들의 실행을 시도합니다"
+
+#~ msgid "OOPS: something wrong with line %d in '.OldClassesPrototypes'"
+#~ msgstr ""
+#~ "아이쿠: '.OldClassesPrototypes'내의 %d번째 줄에 무엇인가 잘못되었습니다"
+
+#~ msgid "special function %s is not permitted to have methods"
+#~ msgstr "특이 함수 %s는 메소드를 가질 수 없습니다"
+
+#~ msgid ""
+#~ "special function %s has no known argument list; will assume '(x, ...)'"
+#~ msgstr ""
+#~ "특이 함수 %s는 알려진 인자 목록을 가지고 있지 않습니다; 따라서 "
+#~ "'(x, ...)'를 가진다고 가정됩니다"
+
+#~ msgid ""
+#~ "'callGeneric' with a primitive needs explicit arguments (no formal args "
+#~ "defined)"
+#~ msgstr ""
+#~ "프리미티브와 함께 사용되는 'callGeneric'는 명시적인 인자들을 필요로 합니"
+#~ "다 (정의된 형식 인자들이 없습니다)"
+
+#~ msgid "\""
+#~ msgstr "\""
+
 #~ msgid "replacement value is not a matrix"
 #~ msgstr "치환값은 행렬이 아닙니다"
diff --git a/src/library/methods/po/R-methods.pot b/src/library/methods/po/R-methods.pot
index 0fc75d1..d1c94a1 100644
--- a/src/library/methods/po/R-methods.pot
+++ b/src/library/methods/po/R-methods.pot
@@ -1,8 +1,7 @@
 msgid ""
 msgstr ""
-"Project-Id-Version: R 3.1.0\n"
-"Report-Msgid-Bugs-To: bugs.r-project.org\n"
-"POT-Creation-Date: 2013-11-25 05:14\n"
+"Project-Id-Version: methods 3.4.0\n"
+"POT-Creation-Date: 2016-04-01 09:50\n"
 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
 "Last-Translator: FULL NAME <EMAIL at ADDRESS>\n"
 "Language-Team: LANGUAGE <LL at li.org>\n"
@@ -11,7 +10,7 @@ msgstr ""
 "Content-Transfer-Encoding: 8bit\n"
 
 
-msgid "OOPS: something wrong with line %d in '.OldClassesPrototypes'"
+msgid "OOPS: something wrong with '.OldClassesPrototypes[[%d]]'"
 msgstr ""
 
 msgid "unnamed argument to initialize() for S3 class must have a class definition; %s does not"
@@ -80,7 +79,7 @@ msgstr ""
 msgid "invalid argument 'name': %s"
 msgstr ""
 
-msgid "%s is a primitive function;  methods can be defined, but the generic function is implicit, and cannot be changed."
+msgid "%s dispatches internally;  methods can be defined, but the generic function is implicit, and cannot be changed."
 msgstr ""
 
 msgid "if the 'def' argument is supplied, it must be a function that calls standardGeneric(\"%s\") or is the default"
@@ -176,6 +175,9 @@ msgstr ""
 msgid "first argument should be the names of one of more generic functions (got object of class %s)"
 msgstr ""
 
+msgid "must supply 'generic.function' or 'class'"
+msgstr ""
+
 msgid "%s is not an S4 generic function in %s; methods not removed"
 msgstr ""
 
@@ -194,10 +196,7 @@ msgstr ""
 msgid "Function %s is a group generic; do not call it directly"
 msgstr ""
 
-msgid "'callGeneric' with a primitive needs explicit arguments (no formal args defined)"
-msgstr ""
-
-msgid "'callGeneric' must be called from a generic function or method"
+msgid "callGeneric() must be called from within a method body"
 msgstr ""
 
 msgid "expected a non-empty character string for argument name"
@@ -251,10 +250,7 @@ msgstr ""
 msgid "non-generic function '%s' given to findMethods()"
 msgstr ""
 
-msgid "only FALSE is meaningful for 'inherited', when 'where' is supplied (got"
-msgstr ""
-
-msgid "\""
+msgid "only FALSE is meaningful for 'inherited', when 'where' is supplied (got %s)"
 msgstr ""
 
 msgid "argument 'f' must be a generic function or %s"
@@ -329,6 +325,12 @@ msgstr ""
 msgid "use %s instead."
 msgstr ""
 
+msgid "%s, along with other use of the \"MethodsList\" metadata objects, is defunct."
+msgstr ""
+
+msgid "in %s: use of \"MethodsList\" metadata objects is defunct."
+msgstr ""
+
 msgid "invalid object for formal method definition: type %s"
 msgstr ""
 
@@ -350,6 +352,9 @@ msgstr ""
 msgid "the names in signature for method (%s) do not match %s's arguments (%s)"
 msgstr ""
 
+msgid "the names in signature for method (%s) do not match function's arguments (%s)"
+msgstr ""
+
 msgid "a call to callNextMethod() appears in a call to %s, but the call does not seem to come from either a generic function or another 'callNextMethod'"
 msgstr ""
 
@@ -359,6 +364,9 @@ msgstr ""
 msgid "bad object found as method (class %s)"
 msgstr ""
 
+msgid "No next method available"
+msgstr ""
+
 msgid "in constructing the prototype for class %s: prototype has class %s, but the data part specifies class %s"
 msgstr ""
 
@@ -374,6 +382,9 @@ msgstr ""
 msgid "undefined slot classes in definition of %s: %s"
 msgstr ""
 
+msgid "(class %s)"
+msgstr ""
+
 msgid "in definition of class %s, information for superclass %s is of class %s (expected \"SClassExtension\")"
 msgstr ""
 
@@ -461,15 +472,15 @@ msgstr ""
 msgid "unable to find an environment containing class %s"
 msgstr ""
 
-msgid "Note: the specification for S3 class %s in package %s seems equivalent to one from package %s: not turning on duplicate class definitions for this class."
-msgstr ""
-
 msgid "Note: some superclasses of class %s in package %s have duplicate definitions.  This definition is not being treated as equivalent to that from package %s"
 msgstr ""
 
 msgid "Note: the specification for class %s in package %s seems equivalent to one from package %s: not turning on duplicate class definitions for this class."
 msgstr ""
 
+msgid "Found more than one class \"%s\" in cache; using the first, from namespace '%s'"
+msgstr ""
+
 msgid "undefined subclass %s of class %s; definition not updated"
 msgstr ""
 
@@ -500,12 +511,6 @@ msgstr ""
 msgid "no suitable arguments to dispatch methods in this function"
 msgstr ""
 
-msgid "special function %s is not permitted to have methods"
-msgstr ""
-
-msgid "special function %s has no known argument list; will assume '(x, ...)'"
-msgstr ""
-
 msgid "making a generic for special function %s"
 msgstr ""
 
@@ -533,24 +538,21 @@ msgstr ""
 msgid "argument 'f' must be a string, generic function, or primitive: got an ordinary function"
 msgstr ""
 
-msgid "methods cannot be defined for the primitive function %s"
-msgstr ""
-
 msgid "no generic function found for %s"
 msgstr ""
 
 msgid "Empty function name in .getGeneric"
 msgstr ""
 
-msgid "package %s seems to have out-of-date methods; need to reinstall from source"
-msgstr ""
-
 msgid "no methods found for %s; cacheGenericsMetaData() will have no effect"
 msgstr ""
 
 msgid "invalid value from generic function %s, class %s, expected %s"
 msgstr ""
 
+msgid "\"MethodsList\" is defunct; allMethods now are empty"
+msgstr ""
+
 msgid "the body of the generic function for %s calls 'standardGeneric' to dispatch on a different name (\"%s\")!"
 msgstr ""
 
@@ -602,9 +604,6 @@ msgstr ""
 msgid "no definition found for class %s"
 msgstr ""
 
-msgid "trying to execute load actions without 'methods' package"
-msgstr ""
-
 msgid "missing function for load action: %s"
 msgstr ""
 
@@ -764,6 +763,12 @@ msgstr ""
 msgid "methods currently exist for coercing from %s to %s; they will be replaced."
 msgstr ""
 
+msgid "Function must be an S4 generic"
+msgstr ""
+
+msgid "method is not being debugged"
+msgstr ""
+
 msgid "object %s not found"
 msgstr ""
 
@@ -815,7 +820,7 @@ msgstr ""
 msgid "invalid object in meta table of methods for %s, label %s, had class %s"
 msgstr ""
 
-msgid "invalid mlist element for signature %s at level %d (should be methods list or method, had class %s)"
+msgid "invalid mlist element for signature %s at level %d (should be MethodDefinition or .Primitive, had class %s)"
 msgstr ""
 
 msgid "bad method object stored in method table, class %s"
@@ -824,7 +829,7 @@ msgstr ""
 msgid "invalid object in methods table (%s), expected a method, got an object of class %s"
 msgstr ""
 
-msgid "invalid or unset methods table in generic function \""
+msgid "invalid or unset methods table in generic function %s"
 msgstr ""
 
 msgid "trying to find a methods table in a non-generic function"
@@ -953,6 +958,9 @@ msgstr ""
 msgid "%s is not a field in this class"
 msgstr ""
 
+msgid "Methods not found: %s"
+msgstr ""
+
 msgid "the definition of class %s in package %s is locked, methods may not be redefined"
 msgstr ""
 
@@ -1019,6 +1027,9 @@ msgstr ""
 msgid "field %s of class %s has a non-default binding and cannot be locked"
 msgstr ""
 
+msgid "Reference superclasses must come from the same package for the environment to be defined:  got %s and %s"
+msgstr ""
+
 msgid "Class %s is not a subclass of %s; functional semantics not defined for this class"
 msgstr ""
 
@@ -1055,7 +1066,7 @@ msgstr ""
 msgid "the method for %s for this signature was not being traced"
 msgstr ""
 
-msgid "making a traced version of a primitive; arguments will be treated as '...'"
+msgid "making a traced version of a special; arguments may be altered"
 msgstr ""
 
 msgid "the editing in trace() can only change the body of the function; got an object of class %s"
diff --git a/src/library/methods/po/R-pl.po b/src/library/methods/po/R-pl.po
index d263f6d..e0665eb 100644
--- a/src/library/methods/po/R-pl.po
+++ b/src/library/methods/po/R-pl.po
@@ -1,8 +1,8 @@
 msgid ""
 msgstr ""
-"Project-Id-Version: R 3.1.0\n"
+"Project-Id-Version: R 3.4.0\n"
 "Report-Msgid-Bugs-To: bugs.r-project.org\n"
-"POT-Creation-Date: 2013-11-25 05:14\n"
+"POT-Creation-Date: 2016-04-04 08:15\n"
 "PO-Revision-Date: \n"
 "Last-Translator: Łukasz Daniel <lukasz.daniel at gmail.com>\n"
 "Language-Team: Łukasz Daniel <lukasz.daniel at gmail.com>\n"
@@ -13,299 +13,295 @@ msgstr ""
 "na-Revision-Date: 2012-05-29 07:55+0100\n"
 "Plural-Forms: nplurals=3; plural=(n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 "
 "|| n%100>=20) ? 1 : 2);\n"
-"X-Poedit-SourceCharset: iso-8859-1\n"
-"X-Generator: Poedit 1.5.4\n"
+"X-Poedit-SourceCharset: UTF-8\n"
+"X-Generator: Poedit 1.8.7\n"
 
-# methods/R/BasicClasses.R: 159
-# warning(gettextf("OOPS: something wrong with line %d in '.OldClassesPrototypes'", i), domain = NA)
-msgid "OOPS: something wrong with line %d in '.OldClassesPrototypes'"
-msgstr "OOPS: coś nie tak z linią %d w '.OldClassesPrototypes'"
+#. R/RMethodUtils.R: warning("\"MethodsList\" is defunct; allMethods now are empty")
+#: R/RMethodUtils.R:0
+msgid "\"MethodsList\" is defunct; allMethods now are empty"
+msgstr "\"MethodsList\" zostało zlikwidowane; 'allMethods' są teraz puste"
 
-# methods/R/BasicClasses.R: 264
-# stop(gettextf("unnamed argument to initialize() for S3 class must have a class definition; %s does not",
-#                                 dQuote(Classi)),
-#                        domain = NA)
-msgid ""
-"unnamed argument to initialize() for S3 class must have a class definition; "
-"%s does not"
+#. R/RClassUtils.R: stop("\"class\" is a reserved slot name and cannot be redefined")
+#: R/RClassUtils.R:0
+msgid "\"class\" is a reserved slot name and cannot be redefined"
 msgstr ""
-"nienazwany argument przekazany do metody 'initialize()' dla klasy S3 musi "
-"posiadać definicję klasy; a %s takiej nie posiada"
+"'class' jest zarezerwowaną nazwą gniazda i nie może zostać przedefiniowana"
+
+#. R/MethodsListClass.R: gettextf("%d: target \"%s\": chose \"%s\" (others: %s)", i, target[[i]],     selected[[i]], paste0("\"", these, "\"", collapse = ", "))
+#: R/MethodsListClass.R:0
+msgid "%d: target \"%s\": chose \"%s\" (others: %s)"
+msgstr "%d: cel \"%s\": wybrano \"%s\" (inne: %s)"
 
-# methods/R/BasicClasses.R: 278
-# stop(gettextf("unnamed argument must extend either the S3 class or the class of the data part; not true of class %s", dQuote(Classi)), domain = NA)
+#. R/MethodsList.R: gettextf("%f is not a valid generic function: methods list was an object of class %s",     sQuote(f), dQuote(class(mlist)))
+#: R/MethodsList.R:0
 msgid ""
-"unnamed argument must extend either the S3 class or the class of the data "
-"part; not true of class %s"
+"%f is not a valid generic function: methods list was an object of class %s"
 msgstr ""
-"nienazwany argument musi rozszerzać albo klasę S3 albo klasę części danych; "
-"nie jest to prawdą dla klasy %s"
+"%f nie jest poprawną ogólną funkcją: lista metod była obiektem klasy %s"
 
-# methods/R/BasicClasses.R: 331
-# stop(gettextf("class %s does not have an S3 data part, and so is of type \"S4\"; no S3 equivalent",
-#                                        dQuote(class(from))),
-#                               domain = NA)
+#. R/Methods.R: gettextf("%s dispatches internally;  methods can be defined, but the generic function is implicit, and cannot be changed.",     sQuote(name))
+#: R/Methods.R:0
 msgid ""
-"class %s does not have an S3 data part, and so is of type \"S4\"; no S3 "
-"equivalent"
+"%s dispatches internally;  methods can be defined, but the generic function "
+"is implicit, and cannot be changed."
 msgstr ""
-"klasa %s nie ma części danych S3, i dlatego też jest typu S4; brak "
-"ekwiwalentu S3"
+"%s rozdziela wewnętrzne; metody mogą zostać zdefiniowane, ale ogólna funkcja "
+"jest niejawna i nie może być zmieniona."
 
-# methods/R/BasicClasses.R: 346
-# stop(gettextf("class %s is VIRTUAL; not meaningful to create an S4 object from this class",
-#                                       dQuote(cl)),
-#                              domain = NA)
-msgid ""
-"class %s is VIRTUAL; not meaningful to create an S4 object from this class"
-msgstr "klasa %s jest WIRTUALNA; nie ma sensu tworzyć obiektu S4 z tej klasy"
+#. R/SClasses.R: gettextf("%s has a sealed class definition and cannot be redefined",     dQuote(Class))
+#: R/SClasses.R:0
+msgid "%s has a sealed class definition and cannot be redefined"
+msgstr "Klasa %s ma zablokowaną definicję klasy i nie może być przedefiniowana"
 
-# methods/R/BasicClasses.R: 355
-# stop(gettextf("object must be a valid data part for class %s; not true of type %s", dQuote(cl), dQuote(class(data))),
-#                                  domain = NA)
-msgid "object must be a valid data part for class %s; not true of type %s"
-msgstr ""
-"obiekt musi być poprawną częścią danych dla klasy %s; nie jest to prawdą dla "
-"typu %s"
+#. R/Methods.R: gettextf("%s has no methods defined", sQuote(f))
+#: R/Methods.R:0
+msgid "%s has no methods defined"
+msgstr "%s nie ma zdefiniowanych metod"
 
-# methods/R/BasicClasses.R: 419
-# stop("cannot specify matrix() arguments when specifying '.Data'")
-msgid "cannot specify matrix() arguments when specifying '.Data'"
+#. R/Methods.R: gettextf("%s is a primitive function; its generic form cannot be redefined",     sQuote(name))
+#: R/Methods.R:0
+msgid "%s is a primitive function; its generic form cannot be redefined"
 msgstr ""
-"nie można określić argumentów metody 'matrix()' gdy określane jest '.Data'"
+"%s jest prymitywną funkcją; jej ogólna forma nie może zostać przedefiniowana"
 
-# methods/R/BasicClasses.R: 461
-# stop("cannot specify array() arguments when specifying '.Data'")
-msgid "cannot specify array() arguments when specifying '.Data'"
-msgstr ""
-"nie można określić argumentów metody 'array()' gdy określane jest '.Data'"
+#. R/SClasses.R: gettextf("%s is not a defined class", dQuote(Class))
+#: R/SClasses.R:0
+msgid "%s is not a defined class"
+msgstr "%s nie jest zdefiniowaną klasą"
 
-# methods/R/BasicClasses.R: 600
-# stop("cannot have more than one unnamed argument as environment")
-msgid "cannot have more than one unnamed argument as environment"
-msgstr "nie można mieć więcej niż jeden nienazwany argument jako środowisko"
+#. R/refClass.R: gettextf("%s is not a defined class in this environment", dQuote(Class))
+#: R/refClass.R:0
+msgid "%s is not a defined class in this environment"
+msgstr " %s nie jest zdefiniowaną klasą w tym środowisku"
 
-# methods/R/BasicClasses.R: 606
-# stop("unnamed argument to new() must be an environment for the new object")
-msgid "unnamed argument to new() must be an environment for the new object"
+#. R/refClass.R: gettextf("%s is not a field in class %s", sQuote(field), dQuote(thisClass at className))
+#. R/refClass.R: gettextf("%s is not a field in class %s", sQuote(what), dQuote(def at className))
+#. R/refClass.R: gettextf("%s is not a field in class %s", sQuote(what), dQuote(className))
+#: R/refClass.R:0
+msgid "%s is not a field in class %s"
+msgstr "%s nie jest polem w klasie %s"
+
+#. R/refClass.R: gettextf("%s is not a field in this class", sQuote(name))
+#: R/refClass.R:0
+msgid "%s is not a field in this class"
+msgstr "%s nie jest polem w tej klasie"
+
+#. R/RMethodUtils.R: gettextf("%s is not a generic function (or not visible here)",     sQuote(f))
+#: R/RMethodUtils.R:0
+msgid "%s is not a generic function (or not visible here)"
+msgstr "%s nie jest ogólną funkcją (albo nie jest widoczna)"
+
+#. R/trace.R: gettextf("%s is not a method for reference class %s", sQuote(as.character(if (is.symbol(thisName)) thisName else what)),     dQuote(class(where)))
+#: R/trace.R:0
+msgid "%s is not a method for reference class %s"
+msgstr "%s nie jest metodą dla klasy referencyjnej %s"
+
+#. R/refClass.R: gettextf("%s is not a reference class", dQuote(Class))
+#. R/refClass.R: gettextf("%s is not a reference class", dQuote(def at className))
+#: R/refClass.R:0
+msgid "%s is not a reference class"
+msgstr "%s nie jest klasą referencyjną"
+
+#. R/SClasses.R: gettextf("%s is not a slot in class %s", sQuote(name), dQuote(cl))
+#. R/SClasses.R: gettextf("%s is not a slot in class %s", sQuote(name), dQuote(cl))
+#: R/SClasses.R:0
+msgid "%s is not a slot in class %s"
+msgstr "%s nie jest gniazdem w klasie %s"
+
+#. R/refClass.R: gettextf("%s is not a valid field or method name for reference class %s",     sQuote(field), dQuote(thisClass at className))
+#: R/refClass.R:0
+msgid "%s is not a valid field or method name for reference class %s"
 msgstr ""
-"nienazwany argument przekazywany do metody 'new()' musi być środowiskiem dla "
-"nowego obiektu"
+"%s nie jest poprawnym polem lub nazwą metody dla klasy referencyjnej %s"
 
-# methods/R/BasicFunsList.R: 127
-# stop(gettextf("methods may not be defined for primitive function %s in this version of R", sQuote(f)), domain = NA)
-# methods/R/BasicFunsList.R: 133
-# stop(gettextf("methods may not be defined for primitive function %s in this version of R",
-#                       sQuote(f)),
-#              domain = NA)
-msgid ""
-"methods may not be defined for primitive function %s in this version of R"
+#. R/refClass.R: gettextf("%s is not a valid field or method name for this class",     sQuote(what))
+#: R/refClass.R:0
+msgid "%s is not a valid field or method name for this class"
+msgstr "%s nie jest poprawnym polem lub nazwą metody dla tej klasy"
+
+#. R/Methods.R: gettextf("%s is not an S4 generic function in %s; methods not removed",     sQuote(f), sQuote(getPackageName(where)))
+#: R/Methods.R:0
+msgid "%s is not an S4 generic function in %s; methods not removed"
 msgstr ""
-"metody nie mogą być zdefiniowane dla prymitywnej funkcji %s w tej wersji R"
+"'%s' nie jest ogólną funkcją S4 w pakiecie %s; metody nie zostały usunięte"
 
-# methods/R/ClassExtensions.R: 87
-# stop(gettextf("S3Part() is only defined for classes set up by setOldCLass(), basic classes or subclasses of these:  not true of class %s", dQuote(class(object))), domain = NA)
+#. R/Methods.R: gettextf("%s is not currently a generic:  define it first to create a non-default implicit form",     sQuote(name))
+#: R/Methods.R:0
 msgid ""
-"S3Part() is only defined for classes set up by setOldCLass(), basic classes "
-"or subclasses of these:  not true of class %s"
+"%s is not currently a generic:  define it first to create a non-default "
+"implicit form"
 msgstr ""
-"metoda 'S3Part()' jest zdefiniowana tylko dla klas ustawionych przez metodę "
-"'setOldCLass()', podstawowe klasy lub ich podklasy: nie jest to prawdą dla "
-"klasy %s"
+"%s nie jest aktualnie funkcją ogólną: zdefiniuj ją najpierw aby utworzyć "
+"niedomyślną niejawną formę"
 
-# methods/R/ClassExtensions.R: 98
-# stop(gettextf("the 'S3Class' argument must be a superclass of %s:  not true of class %s", dQuote(class(object)), dQuote(S3Class)), domain = NA)
+#. R/RClassUtils.R: gettextf("%s is not eligible to be the data part of another class (must be a basic class or a virtual class with no slots)",     dQuote(dataPartClass))
+#: R/RClassUtils.R:0
 msgid ""
-"the 'S3Class' argument must be a superclass of %s:  not true of class %s"
+"%s is not eligible to be the data part of another class (must be a basic "
+"class or a virtual class with no slots)"
 msgstr ""
-"argument 'S3Class' musi być superklasą %s: nie jest to prawdą dla klasy %s"
+"%s nie kwalifikuje się aby być częścią danych innej klasy (musi być "
+"podstawową klasą albo klasą wirtualną bez gniazd)"
 
-# methods/R/ClassExtensions.R: 118
-# stop(gettextf("replacement value must extend class %s, got %s", dQuote(needClass), dQuote(S3Class[[1L]])), domain = NA)
-msgid "replacement value must extend class %s, got %s"
-msgstr "wartość zastępcza musi rozszerzać klasę %s, otrzymano %s"
+#. R/addedFunctions.R: gettextf("%s is not one of the element names", sQuote(name))
+#: R/addedFunctions.R:0
+msgid "%s is not one of the element names"
+msgstr "%s nie jest jedną z nazw elementów"
 
-# methods/R/ClassExtensions.R: 147
-# stop(gettextf("replacement value must be of class %s, got one of class %s",
-#                                dQuote(CLASS),
-#                                dQuote(class(value)[[1L]])))
-msgid "replacement value must be of class %s, got one of class %s"
-msgstr "wartość zastępcza musi być klasy %s, otrzymano jedną klasy %s"
+#. R/refClass.R: gettextf("%s is not one of the reference super classes for this object",     dQuote(Class))
+#: R/refClass.R:0
+msgid "%s is not one of the reference super classes for this object"
+msgstr "Klasa %s nie jest jedną z referencyjnych superklas dla tego obiektu"
 
-# methods/R/ClassExtensions.R: 159
-# stop(gettextf("no 'replace' method was defined for 'as(x, \"%s\") <- value' for class %s",
-#                   to, dQuote(class(from))), domain = NA)
+#. R/MethodsList.R: gettextf("%s must be TRUE, FALSE, or a named logical vector of those values; got an object of class %s",     sQuote("useInherited"), dQuote(class(useInherited)))
+#: R/MethodsList.R:0
 msgid ""
-"no 'replace' method was defined for 'as(x, \"%s\") <- value' for class %s"
+"%s must be TRUE, FALSE, or a named logical vector of those values; got an "
+"object of class %s"
 msgstr ""
-"nie zdefiniowano metody 'replace' dla 'as(x, \"%s\") <- value' dla klasy %s"
+"%s musi być TRUE, FALSE, lub nazwanym wektorem logicznym tych wartości; "
+"otrzymano obiekt klasy %s"
 
-# methods/R/ClassExtensions.R: 225
-# stop(gettextf("the 'coerce' argument to 'setIs' should be a function of one argument, got an object of class %s",
-#                        dQuote(class(coerce))), domain = NA)
+#. R/trace.R: gettextf("%s() is not a generic function in the target environment -- methods will not be inserted",     f)
+#: R/trace.R:0
 msgid ""
-"the 'coerce' argument to 'setIs' should be a function of one argument, got "
-"an object of class %s"
+"%s() is not a generic function in the target environment -- methods will not "
+"be inserted"
 msgstr ""
-"argument 'coerce' przekazywany do 'setIs' powinien być funkcją jednego "
-"argumentu, otrzymano obiekt klasy %s"
+"'%s()' nie jest ogólną funkcją w docelowym środowisku -- metody nie zostaną "
+"wstawione"
 
-# methods/R/ClassExtensions.R: 267
-# stop(gettextf("the computation: 'as(object,\"%s\") <- value' is valid when object has class %s only if 'is(value, \"%s\")' is TRUE ('class(value)' was %s)\n",
-#                                  TO, dQuote(FROM), TO, dQuote(class(value))), domain = NA)
+#. R/MethodsList.R: gettextf("%s, along with other use of the \"MethodsList\" metadata objects, is defunct.",     dQuote(this))
+#: R/MethodsList.R:0
 msgid ""
-"the computation: 'as(object,\"%s\") <- value' is valid when object has class "
-"%s only if 'is(value, \"%s\")' is TRUE ('class(value)' was %s)"
+"%s, along with other use of the \"MethodsList\" metadata objects, is defunct."
 msgstr ""
-"obliczenie: 'as(object,\"%s\") <- value' jest poprawne gdy obiekt posiada "
-"klasę %s tylko jeśli 'is(value, \"%s\")' jest TRUE ('class(value)' było %s)"
+"%s, razem z innym użyciem obiektów metadanych 'MethodsList' zostało "
+"zlikwidowane."
 
-# methods/R/ClassExtensions.R: 301
-# warning(gettextf("there is no automatic definition for 'as(object, \"%s\") <- value' when object has class %s and no 'replace' argument was supplied; replacement will be an error",
-#                              to, dQuote(Class)), domain = NA)
+#. R/MethodsList.R: gettextf("%s, along with other use of the \"MethodsList\" metadata objects, is deprecated.",     dQuote(this))
+#: R/MethodsList.R:0
 msgid ""
-"there is no automatic definition for 'as(object, \"%s\") <- value' when "
-"object has class %s and no 'replace' argument was supplied; replacement will "
-"be an error"
+"%s, along with other use of the \"MethodsList\" metadata objects, is "
+"deprecated."
 msgstr ""
-"nie ma automatycznej definicji dla 'as(obiekt, \"%s\") <- value', gdy obiekt "
-"posiada klasę %s oraz brak dostarczonego argumentu 'replace'; wartość "
-"zastępcza będzie błędem"
+"%s, razem z innym użyciem obiektów metadanych 'MethodsList' jest "
+"przestarzałe."
 
-# methods/R/ClassExtensions.R: 316
-# stop(gettextf("the 'replace' argument to setIs() should be a function of 2 or 3 arguments, got an object of class %s",
-#                       dQuote(class(replace))), domain = NA)
-msgid ""
-"the 'replace' argument to setIs() should be a function of 2 or 3 arguments, "
-"got an object of class %s"
+#. R/Methods.R: gettextf("'%s' is not a known generic function {and 'package' not specified}",     f)
+#: R/Methods.R:0
+msgid "'%s' is not a known generic function {and 'package' not specified}"
 msgstr ""
-"argument 'replace' przekazywany do 'setIs()' powinien być funkcją 2 lub 3 "
-"argumentów, otrzymano obiekt klasy %s"
-
-# methods/R/ClassUnion.R: 40
-# stop(gettextf("the member classes must be defined: not true of %s",
-#                           paste(.dQ(as(members[!membersDefined], "character")), collapse=", ")), domain = NA)
-msgid "the member classes must be defined: not true of %s"
-msgstr "klasy członkowe muszą być zdefiniowane: nie jest to prawda dla %s"
-
-# methods/R/ClassUnion.R: 65
-# stop(gettextf("unable to create union class:  could not set members %s",
-#                       paste(.dQ(failed), collapse=", ")), domain = NA)
-msgid "unable to create union class:  could not set members %s"
-msgstr "nie można utworzyć uni klas:  nie można ustawić członków %s"
+"'%s' nie jest znaną ogólną funkcją {oraz 'package' nie został określony}"
 
-# methods/R/Methods.R: 38
-# stop(gettextf("invalid argument 'name': %s",
-#                       .isSingleName(name)), domain = NA)
-msgid "invalid argument 'name': %s"
-msgstr "niepoprawny argument 'name': %s"
+#. R/RClassUtils.R: stop("'Class' must be a valid class definition or class")
+#: R/RClassUtils.R:0
+msgid "'Class' must be a valid class definition or class"
+msgstr "Argument 'Class' musi być poprawną definicją klasy lub klasą"
 
-# methods/R/Methods.R: 53
-# gettextf("%s is a primitive function;  methods can be defined, but the generic function is implicit, and cannot be changed.", sQuote(name))
+#. R/oldClass.R: gettextf("'S3Class' can only assign to S4 objects that extend \"oldClass\"; not true of class %s",     dQuote(class(object)))
+#: R/oldClass.R:0
 msgid ""
-"%s is a primitive function;  methods can be defined, but the generic "
-"function is implicit, and cannot be changed."
+"'S3Class' can only assign to S4 objects that extend \"oldClass\"; not true "
+"of class %s"
 msgstr ""
-"%s jest prymitywną funkcją; metody mogą zostać zdefiniowane, ale ogólna "
-"funkcja jest niejawna i nie może być zmieniona."
+"'S3Class' może być przypisana do obiektów S4, które rozszerzają \"oldClass"
+"\"; nie jest to prawda dla klasy %s"
 
-# methods/R/Methods.R: 110
-# stop(gettextf("if the 'def' argument is supplied, it must be a function that calls standardGeneric(\"%s\") or is the default",
-#                           name), domain = NA)
+#. R/oldClass.R: gettextf("'S3Class' only defined for extensions of %s or classes with a data part:  not true of class %s",     dQuote("oldClass"), dQuote(class(object)))
+#: R/oldClass.R:0
 msgid ""
-"if the 'def' argument is supplied, it must be a function that calls "
-"standardGeneric(\"%s\") or is the default"
+"'S3Class' only defined for extensions of %s or classes with a data part:  "
+"not true of class %s"
 msgstr ""
-"jeśli dostarczono argument 'def', musi być funkcją, która wywołuje "
-"standardGeneric(\"%s\") lub musi być funkcją domyślną"
+"'S3Class' zdefiniowana tylko dla rozszerzeń %s lub klas z częściami danych: "
+"nie jest to prawda dla klasy %s"
 
-# methods/R/Methods.R: 129
-# stop(gettextf("must supply a function skeleton for %s, explicitly or via an existing function", sQuote(name)), domain = NA)
+#. R/as.R: gettextf("'as' method should have one argument, or match the arguments of coerce(): got  (%s)",     paste(formalArgs(def), collapse = ", "))
+#: R/as.R:0
 msgid ""
-"must supply a function skeleton for %s, explicitly or via an existing "
-"function"
+"'as' method should have one argument, or match the arguments of coerce(): "
+"got  (%s)"
 msgstr ""
-"potrzeba dostarczyć strukturę funkcji dla %s, jawnie lub poprzez istniejącą "
-"funkcję"
+"metod 'as()' powinna mieć jeden argument lub zgadzać się z argumentami "
+"'coerce()': otrzymano (%s)"
+
+#. R/is.R: stop("'class1' must be the name of a class or a class definition")
+#: R/is.R:0
+msgid "'class1' must be the name of a class or a class definition"
+msgstr "'class1' musi być nazwą klasy albo definicją klasy"
+
+#. R/is.R: stop("'class2' must be the name of a class or a class definition")
+#: R/is.R:0
+msgid "'class2' must be the name of a class or a class definition"
+msgstr "'class2' musi być nazwą klasy albo definicją klasy"
+
+#. R/RClassUtils.R: stop("'externalptr' objects cannot be initialized from new()")
+#: R/RClassUtils.R:0
+msgid "'externalptr' objects cannot be initialized from new()"
+msgstr "obiekty 'externalptr' nie mogą być inicjalizowane z funkcji 'new()'"
 
-# methods/R/Methods.R: 174
-# message(gettextf(
-#                        "Creating a generic function for %s from %s in %s\n    (from the saved implicit definition)",
-#                                      sQuote(name), sQuote(package),
-#                                      thisPName), domain = NA)
+#. R/Methods.R: stop("'file' must be a character string or a connection")
+#. R/Methods.R: stop("'file' must be a character string or a connection")
+#: R/Methods.R:0
+msgid "'file' must be a character string or a connection"
+msgstr "'file' musi być łańcuchem tekstowym lub połączeniem"
+
+#. R/MethodsListClass.R: gettextf("'initialize' method returned an object of class %s instead of the required class %s",     paste(dQuote(class(value)), collapse = ", "), dQuote(class(.Object)))
+#: R/MethodsListClass.R:0
 msgid ""
-"Creating a generic function for %s from %s in %s\n"
-"    (from the saved implicit definition)"
+"'initialize' method returned an object of class %s instead of the required "
+"class %s"
 msgstr ""
-"Tworzenie ogólnej funkcji dla %s z pakietu %s w pakiecie %s (z zachowanej "
-"niejawnej definicji)"
+"metoda 'initialize' zwróciła obiekt klasy %s zamiast wymaganej klasy %s"
 
-# methods/R/Methods.R: 181
-# message(gettextf(
-#                          "Creating a new generic function for %s in %s",
-#                                      sQuote(name), thisPName),
-#                         domain = NA)
-msgid "Creating a new generic function for %s in %s"
-msgstr "Tworzenie nowej ogólnej funkcji dla %s w pakiecie %s"
+#. R/RClassUtils.R: gettextf("(class %s)", .dQ(unlist(properties, recursive = FALSE)[undefClasses]))
+#: R/RClassUtils.R:0
+msgid "(class %s)"
+msgstr "(klasa %s)"
 
-# methods/R/Methods.R: 189
-# warning(gettextf(
-# 			"no generic version of %s on package %s is allowed;\n   a new generic will be assigned for %s",
-#                                  sQuote(name), sQuote(package),
-#                                  thisPName),
-#                         domain = NA)
+#. R/SClasses.R: gettextf("All %s names must be distinct in:\n(%s)", what, paste(sQuote(propNames),     collapse = ", "))
+#: R/SClasses.R:0
 msgid ""
-"no generic version of %s on package %s is allowed;\n"
-"   a new generic will be assigned for %s"
+"All %s names must be distinct in:\n"
+"(%s)"
 msgstr ""
-"żadna ogólna wersja %s w pakiecie %s nie jest dozwolona; nowa ogólna funkcja "
-"będzie przypisana dla pakietu %s"
-
-# methods/R/Methods.R: 291
-# warning(gettextf("function %s appears to be a generic function, but with generic name %s",
-#                          sQuote(f), sQuote(gen)),
-#                 domain = NA)
-msgid "function %s appears to be a generic function, but with generic name %s"
-msgstr "funkcja %s wygląda na ogólną funkcję ale z ogólną nazwą %s"
+"Wszystkie nazwy %s muszą być różne w:\n"
+"(%s)"
 
-# methods/R/Methods.R: 325
-# warning(gettextf("generic function %s not found for removal",
-#                          sQuote(f)),
-#                 domain = NA)
-msgid "generic function %s not found for removal"
-msgstr "nie znaleziono ogólnej funkcji %s do usunięcia"
+#. R/SClasses.R: gettextf("All %s names must be nonempty in:\n(%s)", what, paste(sQuote(propNames),     collapse = ", "))
+#: R/SClasses.R:0
+msgid ""
+"All %s names must be nonempty in:\n"
+"(%s)"
+msgstr ""
+"Wszystkie nazwy %s muszą być niepuste w:\n"
+"(%s)"
 
-# methods/R/Methods.R: 467
-# stop("a function for argument 'f' must be a generic function")
-# methods/R/trace.R: 597
-# stop("a function for argument 'f' must be a generic function")
-msgid "a function for argument 'f' must be a generic function"
-msgstr "funkcja dla argumentu 'f' musi być ogólną funkcją"
+#. R/show.R: gettextf("An object of class %s", dQuote(class(object)))
+#: R/show.R:0
+msgid "An object of class %s"
+msgstr "Obiekt klasy %s"
 
-# methods/R/Methods.R: 480
-# stop(gettextf("the environment %s is locked; cannot assign methods for function %s",
-#                       sQuote(getPackageName(where)),
-#                       sQuote(f)),
-#              domain = NA)
-msgid "the environment %s is locked; cannot assign methods for function %s"
+#. R/SClasses.R: stop("Argument \"representation\" cannot be used if argument \"slots\" is supplied")
+#: R/SClasses.R:0
+msgid ""
+"Argument \"representation\" cannot be used if argument \"slots\" is supplied"
 msgstr ""
-"środowisko %s jest zablokowane; nie można przypisać metod dla funkcji %s"
+"Argument 'representation' nie może być użyty, jeśli dostarczony został "
+"argument 'slots'"
 
-# methods/R/Methods.R: 505
-# stop(gettextf("the 'where' environment (%s) is a locked namespace; cannot assign methods there",
-#                                   getPackageName(where)), domain = NA)
+#. R/refClass.R: gettextf("Class %s is not a subclass of %s; functional semantics not defined for this class",     dQuote(class(object)), dQuote("envRefClass"))
+#: R/refClass.R:0
 msgid ""
-"the 'where' environment (%s) is a locked namespace; cannot assign methods "
-"there"
+"Class %s is not a subclass of %s; functional semantics not defined for this "
+"class"
 msgstr ""
-"środowisko 'where' (%s) jest zablokowaną przestrzenią nazw; nie można "
-"przypisać tam metod"
+"Klasa %s nie jest podklasą %s; semantyka funkcjonalna nie jest zdefiniowana "
+"dla tej klasy"
 
-# methods/R/Methods.R: 508
-# gettextf("Copying the generic function %s to environment %s, because the previous version was in a sealed namespace (%s)",
-#                              sQuote(f),
-#                              sQuote(getPackageName(where)),
-#                              sQuote(getPackageName(gwhere)))
+#. R/Methods.R: gettextf("Copying the generic function %s to environment %s, because the previous version was in a sealed namespace (%s)",     sQuote(f), sQuote(getPackageName(where)), sQuote(getPackageName(gwhere)))
+#: R/Methods.R:0
 msgid ""
 "Copying the generic function %s to environment %s, because the previous "
 "version was in a sealed namespace (%s)"
@@ -313,45 +309,61 @@ msgstr ""
 "Kopiowanie ogólnej funkcji %s do środowiska %s, ponieważ poprzednia wersja "
 "była w zamkniętej przestrzeni nazw (%s)"
 
-# methods/R/Methods.R: 521
-# stop(gettextf("no existing definition for function %s",
-#                       sQuote(f)),
-#              domain = NA)
-msgid "no existing definition for function %s"
-msgstr "brak istniejącej definicji dla funkcji %s"
+#. R/refClass.R: stop("Could not find local object in supplied environment")
+#: R/refClass.R:0
+msgid "Could not find local object in supplied environment"
+msgstr "Nie można znaleźć lokalnego obiektu w dostarczonym środowisku"
 
-# methods/R/Methods.R: 532
-# message(gettextf("Creating a generic function from function %s in %s",
-#                            sQuote(f), thisPName), domain = NA)
-msgid "Creating a generic function from function %s in %s"
-msgstr "Tworzenie nowej ogólnej funkcji z funkcji %s w pakiecie %s"
+#. R/packageName.R: gettextf("Created a package name, %s, when none found", sQuote(pkg))
+#: R/packageName.R:0
+msgid "Created a package name, %s, when none found"
+msgstr "Utworzono nazwę pakietu, %s, gdy nie znaleziono żadnej"
+
+#. R/Methods.R: gettextf("Creating a generic function for %s from %s in %s\n    (from the saved implicit definition)",     sQuote(name), sQuote(package), thisPName)
+#: R/Methods.R:0
+msgid ""
+"Creating a generic function for %s from %s in %s\n"
+"    (from the saved implicit definition)"
+msgstr ""
+"Tworzenie ogólnej funkcji dla %s z pakietu %s w pakiecie %s (z zachowanej "
+"niejawnej definicji)"
 
-# methods/R/Methods.R: 535
-# message(gettextf("Creating a generic function for %s from package %s in %s",
-#                            sQuote(f), sQuote(fdef at package), thisPName),
-#                   domain = NA)
+#. R/Methods.R: gettextf("Creating a generic function for %s from package %s in %s",     sQuote(f), sQuote(fdef at package), thisPName)
+#: R/Methods.R:0
 msgid "Creating a generic function for %s from package %s in %s"
 msgstr "Tworzenie ogólnej funkcji dla %s z pakietu %s w pakiecie %s"
 
-# methods/R/Methods.R: 548
-# stop(gettextf("the method for function %s and signature %s is sealed and cannot be re-defined",
-#                       sQuote(f),
-#                       .signatureString(fdef, signature)),
-#              domain = NA)
+#. R/Methods.R: gettextf("Creating a generic function from function %s in %s",     sQuote(f), thisPName)
+#: R/Methods.R:0
+msgid "Creating a generic function from function %s in %s"
+msgstr "Tworzenie nowej ogólnej funkcji z funkcji %s w pakiecie %s"
+
+#. R/Methods.R: gettextf("Creating a new generic function for %s in %s", sQuote(name),     thisPName)
+#: R/Methods.R:0
+msgid "Creating a new generic function for %s in %s"
+msgstr "Tworzenie nowej ogólnej funkcji dla %s w pakiecie %s"
+
+#. R/RClassUtils.R: stop("Data part is undefined for general S4 object")
+#: R/RClassUtils.R:0
+msgid "Data part is undefined for general S4 object"
+msgstr ""
+"Część 'Data' (gniazdo '.Data') jest niezdefiniowana dla ogólnego obiektu S4"
+
+#. R/RMethodUtils.R: message("Empty function name in .getGeneric")
+#: R/RMethodUtils.R:0
+msgid "Empty function name in .getGeneric"
+msgstr "Pusta nazwa funkcji w '.getGeneric'"
+
+#. R/trace.R: gettextf("Environment of class %s is locked; using global environment for new class",     dQuote(className))
+#: R/trace.R:0
 msgid ""
-"the method for function %s and signature %s is sealed and cannot be re-"
-"defined"
+"Environment of class %s is locked; using global environment for new class"
 msgstr ""
-"metoda dla funkcji %s oraz sygnatury %s jest zamknięta i nie może być "
-"przedefiniowana"
+"Środowisko klasy %s jest zablokowane; używanie globalnego środowiska dla "
+"nowej klasy"
 
-# methods/R/Methods.R: 562
-# warning(gettextf("For function %s, signature %s: argument in method definition changed from (%s) to (%s)",
-# 					sQuote(f),
-#                                         sQuote(signature),
-#                                         mnames,
-#                                         fnames),
-#                                domain = NA, call. = FALSE)
+#. R/Methods.R: gettextf("For function %s, signature %s: argument in method definition changed from (%s) to (%s)",     sQuote(f), sQuote(signature), mnames, fnames)
+#: R/Methods.R:0
 msgid ""
 "For function %s, signature %s: argument in method definition changed from "
 "(%s) to (%s)"
@@ -359,291 +371,240 @@ msgstr ""
 "Dla funkcji %s, sygnatura %s: argument w definicji metody zmienił się z (%s) "
 "na (%s)"
 
-# methods/R/Methods.R: 592
-# stop("primitive functions cannot be methods; they must be enclosed in a regular function")
+#. R/RClassUtils.R: gettextf("Found more than one class \"%s\" in cache; using the first, from namespace '%s'",     name, pkgs[1])
+#: R/RClassUtils.R:0
 msgid ""
-"primitive functions cannot be methods; they must be enclosed in a regular "
-"function"
+"Found more than one class \"%s\" in cache; using the first, from namespace "
+"'%s'"
 msgstr ""
-"prymitywne funkcje nie mogą być metodami; muszą być zawarte w regularnej "
-"funkcji"
+"Znaleziono więcej niż jedną klasę \"%s\" w cache; używanie pierwszej, z "
+"przestrzeni nazw '%s'"
 
-# methods/R/Methods.R: 597
-# stop(gettextf("invalid method definition: expected a function, got an object of class %s",
-# 			 dQuote(class(definition))), domain = NA)
-msgid ""
-"invalid method definition: expected a function, got an object of class %s"
-msgstr ""
-"niepoprawna definicja metody: oczekiwano funkcji, otrzymano obiekt klasy %s"
+#. R/Methods.R: gettextf("Function %s is a group generic; do not call it directly",     sQuote(name))
+#: R/Methods.R:0
+msgid "Function %s is a group generic; do not call it directly"
+msgstr "Funkcja %s jest w grupie ogólnej; nie wywołuj jej bezpośrednio"
 
-# methods/R/Methods.R: 639
-# stop("function supplied as argument 'f' must be a generic")
-msgid "function supplied as argument 'f' must be a generic"
-msgstr "funkcja dostarczona jako argument 'f' musi być ogólną funkcją"
+#. R/Methods.R: gettextf("Function %s is already a group generic; no change",     sQuote(name))
+#: R/Methods.R:0
+msgid "Function %s is already a group generic; no change"
+msgstr "funkcja %s już jest w grupie ogólnej; brak zmian"
 
-# methods/R/Methods.R: 644
-# warning(gettextf("no generic function %s found", sQuote(f)),
-#                 domain = NA)
-# methods/R/Methods.R: 663
-# warning(gettextf("no generic function %s found",
-#                          sQuote(f)),
-#                 domain = NA)
-# methods/R/Methods.R: 680
-# warning(gettextf("no generic function %s found",
-#                          sQuote(f)),
-#                 domain = NA)
-msgid "no generic function %s found"
-msgstr "nie znaleziono ogólnej funkcji %s "
+#. R/debug.R: stop("Function must be an S4 generic")
+#: R/debug.R:0
+msgid "Function must be an S4 generic"
+msgstr "Funkcja musi być generyczną funkcją klasy S4"
 
-# methods/R/Methods.R: 649
-# warning(gettextf("no method found for function %s and signature %s",
-#                          sQuote(fdef at generic),
-#                          paste(.dQ(signature), collapse =", ")),
-#                 domain = NA)
-msgid "no method found for function %s and signature %s"
-msgstr "nie znaleziono metody dla funkcji %s oraz sygnatury %s"
+#. R/trace.R: gettextf("Methods inserted for function %s(): %s", f, paste(methodsInserted,     collapse = ", "))
+#: R/trace.R:0
+msgid "Methods inserted for function %s(): %s"
+msgstr "Metody wstawione dla funkcji '%s()': %s"
 
-# methods/R/Methods.R: 713
-# stop(gettextf("no environment or package corresponding to argument where=%s",
-#                deparse(where)), domain = NA)
-msgid "no environment or package corresponding to argument where=%s"
-msgstr "brak środowiska lub pakietu odpowiadającego argumentowi 'where=%s'"
+#. R/refClass.R: gettextf("Methods not found: %s", paste(dQuote(methods[missing]),     collapse = ", "))
+#: R/refClass.R:0
+msgid "Methods not found: %s"
+msgstr "Metody nie zostały znalezione: %s"
 
-# methods/R/Methods.R: 731
-# stop(gettextf("no generic function found for '%s'", f), domain = NA)
-msgid "no generic function found for '%s'"
-msgstr "nie znaleziono ogólnej funkcji dla '%s'"
+#. R/trace.R: gettextf("Modified functions inserted through trace(): %s", paste(objectsDone,     collapse = ", "))
+#: R/trace.R:0
+msgid "Modified functions inserted through trace(): %s"
+msgstr "Zmodyfikowane funkcje wstawione poprzez 'trace()': %s"
 
-# methods/R/Methods.R: 744
-# stop(gettextf("no method found for function '%s' and signature %s",
-# 			  f, paste(signature, collapse = ", ")))
-msgid "no method found for function '%s' and signature %s"
-msgstr "nie znaleziono metody dla funkcji '%s' oraz sygnatury %s"
+#. R/trace.R: gettextf("New functions are not currently inserted (not untraceable): %s",     paste(newObjects, collapse = ", "))
+#: R/trace.R:0
+msgid "New functions are not currently inserted (not untraceable): %s"
+msgstr "nowe funkcje nie są aktualnie wstawione (nie są śledzone): %s"
 
-# methods/R/Methods.R: 817
-# stop("'file' must be a character string or a connection")
-# methods/R/Methods.R: 844
-# stop("'file' must be a character string or a connection")
-msgid "'file' must be a character string or a connection"
-msgstr "'file' musi być łańcuchem tekstowym lub połączeniem"
+#. R/SClasses.R: gettextf("No %s names supplied", what)
+#: R/SClasses.R:0
+msgid "No %s names supplied"
+msgstr "Nie dostarczono nazw %s"
 
-# methods/R/Methods.R: 834
-# warning("argument 'signature' is not meaningful with the current implementation and is ignored \n(extract a subset of the methods list instead)")
+#. R/NextMethod.R: stop("No next method available")
+#: R/NextMethod.R:0
+msgid "No next method available"
+msgstr "Brak dostępnej następnej metody"
+
+#. R/methodsTable.R: gettextf("No simply inherited methods found for function %s; using non-simple method",     sQuote(fdef at generic))
+#: R/methodsTable.R:0
 msgid ""
-"argument 'signature' is not meaningful with the current implementation and "
-"is ignored \n"
-"(extract a subset of the methods list instead)"
+"No simply inherited methods found for function %s; using non-simple method"
 msgstr ""
-"argument 'signature' nie ma sensu razem z bieżącą implementacją tak więc "
-"zostaje zignorowany \n"
-"(zamiast tego wyodrębnij podzbiór listy metod)"
-
-# methods/R/Methods.R: 870
-# stop(gettextf("no method for %s matches class %s",
-#                             sQuote("..."), dQuote(signature)),
-#                    domain = NA)
-msgid "no method for %s matches class %s"
-msgstr "żadna metoda dla %s nie zgadza się z klasą %s"
-
-# methods/R/Methods.R: 900
-# stop(gettextf("no method found for signature %s",
-# 			       paste(signature, collapse=", ")))
-msgid "no method found for signature %s"
-msgstr "nie znaleziono metody dla sygnatury %s"
+"Nie znaleziono prostych dziedziczonych metod dla funkcji %s; używanie "
+"nieprostej metody"
 
-# methods/R/Methods.R: 910
-# stop(gettextf("%s has no methods defined",
-#                           sQuote(f)),
-#                  domain = NA)
-msgid "%s has no methods defined"
-msgstr "%s nie ma zdefiniowanych metod"
+#. R/trace.R: gettextf("Non-function objects are not currently inserted (not traceable): %s",     paste(notTraceable, collapse = ", "))
+#: R/trace.R:0
+msgid "Non-function objects are not currently inserted (not traceable): %s"
+msgstr ""
+"niefunkcjonalne obiekty nie są aktualnie wstawione (nie są śledzone): %s"
 
-# methods/R/Methods.R: 959
-# stop(gettextf("bad class specified for element %d (should be a single character string)", i), domain = NA)
+#. R/methodsTable.R: gettextf("Note: method with signature %s chosen for function %s,\n target signature %s.\n %s would also be valid",     sQuote(selected), sQuote(attr(cond, "generic")), sQuote(attr(cond,         "target")), paste0("\"", possible[is.na(match(possible,         selected))], "\"", collapse = ", "))
+#: R/methodsTable.R:0
 msgid ""
-"bad class specified for element %d (should be a single character string)"
+"Note: method with signature %s chosen for function %s,\n"
+" target signature %s.\n"
+" %s would also be valid"
 msgstr ""
-"określono błędną klasę dla elementu %d (powinien być jednym łańcuchem "
-"tekstowym)"
+"Uwaga: metoda z sygnaturą %s wybrana dla funkcji %s,\n"
+" docelowa sygnatura %s.\n"
+" %s również byłaby poprawna"
 
-# methods/R/Methods.R: 998
-# stop(gettextf("first argument should be the names of one of more generic functions (got object of class %s)",
-#                       dQuote(class(f))), domain = NA)
+#. R/RClassUtils.R: gettextf("Note: some superclasses of class %s in package %s have duplicate definitions.  This definition is not being treated as equivalent to that from package %s",     dQuote(def at className), sQuote(def at package), sQuote(prev at package))
+#: R/RClassUtils.R:0
 msgid ""
-"first argument should be the names of one of more generic functions (got "
-"object of class %s)"
+"Note: some superclasses of class %s in package %s have duplicate "
+"definitions.  This definition is not being treated as equivalent to that "
+"from package %s"
 msgstr ""
-"pierwszy argument powinien być nazwami jeden lub więcej ogólnych funkcji "
-"(otrzymano obiekt klasy %s)"
+"Uwaga: niektóre superklasy klasy %s w pakiecie %s posiadają powtórzone "
+"definicje. Ta definicja nie jest traktowana jako równoważna tej z pakietu %s"
 
-# methods/R/Methods.R: 1062
-# warning(gettextf("%s is not an S4 generic function in %s; methods not removed",
-#                          sQuote(f),
-#                          sQuote(getPackageName(where))),
-#                 domain = NA)
-msgid "%s is not an S4 generic function in %s; methods not removed"
+#. R/RClassUtils.R: gettextf("Note: the specification for class %s in package %s seems equivalent to one from package %s: not turning on duplicate class definitions for this class.",     dQuote(def at className), sQuote(def at package), sQuote(prev at package))
+#: R/RClassUtils.R:0
+msgid ""
+"Note: the specification for class %s in package %s seems equivalent to one "
+"from package %s: not turning on duplicate class definitions for this class."
 msgstr ""
-"'%s' nie jest ogólną funkcją S4 w pakiecie %s; metody nie zostały usunięte"
+"Uwaga: specyfikacja dla klasy S3 %s w pakiecie %s wydaje się być równoważna "
+"tej z pakietu %s i nie jest duplikatem definicji klasy dla tej klasy"
 
-# methods/R/Methods.R: 1085
-# warning(gettextf("cannot remove methods for %s in locked environment/package %s",
-#                                  sQuote(f), sQuote(getPackageName(db))),
-#                         domain = NA)
-msgid "cannot remove methods for %s in locked environment/package %s"
-msgstr "nie można usunąć metod dla %s w zablokowanym środowisku/pakiecie %s"
+#. R/MethodsListClass.R: gettextf("\n    Notes: %s.\n", notei)
+#: R/MethodsListClass.R:0
+msgid "Notes: %s."
+msgstr "Uwagi: %s."
 
-# methods/R/Methods.R: 1110
-# message(gettextf("Restoring default function definition of %s",
-#                                      sQuote(f)),
-#                             domain = NA)
-msgid "Restoring default function definition of %s"
-msgstr "Przywracanie domyślnej definicji funkcji %s"
+#. R/BasicClasses.R: gettextf("OOPS: something wrong with '.OldClassesPrototypes[[%d]]'",     i)
+#: R/BasicClasses.R:0
+msgid "OOPS: something wrong with '.OldClassesPrototypes[[%d]]'"
+msgstr "OOPS: coś nie tak z '.OldClassesPrototypes[[%d]]'"
 
-# methods/R/Methods.R: 1135
-# stop(gettextf("error in updating S4 generic function %s; the function definition is not an S4 generic function (class %s)", sQuote(f), dQuote(class(fdef))),
-#                  domain = NA)
+#. R/refClass.R: gettextf("Reference superclasses must come from the same package for the environment to be defined:  got %s and %s",     .nQuote(clRefMethods$.objectPackage), .nQuote(pkg))
+#: R/refClass.R:0
 msgid ""
-"error in updating S4 generic function %s; the function definition is not an "
-"S4 generic function (class %s)"
+"Reference superclasses must come from the same package for the environment "
+"to be defined:  got %s and %s"
 msgstr ""
-"błąd w aktualizacji ogólnej funkcji S4 %s; definicja funkcji nie jest ogólną "
-"funkcją S4 (klasa %s)"
-
-# methods/R/Methods.R: 1156
-# message(gettextf("Function %s is already a group generic; no change",
-#                                  sQuote(name)),
-#                         domain = NA)
-msgid "Function %s is already a group generic; no change"
-msgstr "funkcja %s już jest w grupie ogólnej; brak zmian"
+"Referencyjna superklasa musi pochodzi z tego samego pakietu aby środowisko "
+"było zdefiniowane: otrzymano %s oraz %s"
 
-# methods/R/Methods.R: 1167
-# gettextf("Function %s is a group generic; do not call it directly",
-#                             sQuote(name))
-msgid "Function %s is a group generic; do not call it directly"
-msgstr "Funkcja %s jest w grupie ogólnej; nie wywołuj jej bezpośrednio"
+#. R/Methods.R: gettextf("Restoring default function definition of %s", sQuote(f))
+#: R/Methods.R:0
+msgid "Restoring default function definition of %s"
+msgstr "Przywracanie domyślnej definicji funkcji %s"
 
-# methods/R/Methods.R: 1210
-# stop("'callGeneric' with a primitive needs explicit arguments (no formal args defined)")
+#. R/ClassExtensions.R: gettextf("S3Part() is only defined for classes set up by setOldCLass(), basic classes or subclasses of these:  not true of class %s",     dQuote(class(object)))
+#: R/ClassExtensions.R:0
 msgid ""
-"'callGeneric' with a primitive needs explicit arguments (no formal args "
-"defined)"
+"S3Part() is only defined for classes set up by setOldCLass(), basic classes "
+"or subclasses of these:  not true of class %s"
 msgstr ""
-"'callGeneric' z prymitywną funkcją potrzebuje jawnych argumentów (nie "
-"zdefiniowano formalnych argumentów)"
-
-# methods/R/Methods.R: 1218
-# stop("'callGeneric' must be called from a generic function or method")
-msgid "'callGeneric' must be called from a generic function or method"
-msgstr "'callGeneric' musi być wywołana z ogólnej funkcji lub metody"
-
-# methods/R/addedFunctions.R: 45
-# stop(gettextf('expected a non-empty character string for argument name'), domain = NA)
-# methods/R/Methods.R: 1320
-# stop(gettextf('expected a non-empty character string for argument name'), domain = NA)
-msgid "expected a non-empty character string for argument name"
-msgstr "oczekiwano niepustego łańcucha tekstowego dla nazwy argumentu"
+"metoda 'S3Part()' jest zdefiniowana tylko dla klas ustawionych przez metodę "
+"'setOldCLass()', podstawowe klasy lub ich podklasy: nie jest to prawdą dla "
+"klasy %s"
 
-# methods/R/Methods.R: 1322
-# stop(gettextf('generic function supplied was not created for %s',
-#                       sQuote(name)),
-#              domain = NA)
-msgid "generic function supplied was not created for %s"
-msgstr "dostarczona funkcja ogólna nie została utworzona dla %s"
+#. R/method.skeleton.R: gettextf("Skeleton of method written to %s", if (is.character(file)) file else "connection")
+#: R/method.skeleton.R:0
+msgid "Skeleton of method written to %s"
+msgstr "struktura metody zapisana w %s"
 
-# methods/R/Methods.R: 1335
-# stop(gettextf("%s is a primitive function; its generic form cannot be redefined",
-#                                 sQuote(name)),
-#                        domain = NA)
-msgid "%s is a primitive function; its generic form cannot be redefined"
+#. R/as.R: gettextf("a 'replace' method definition in 'setAs' must be a function of two arguments, got %d",     length(args))
+#: R/as.R:0
+msgid ""
+"a 'replace' method definition in 'setAs' must be a function of two "
+"arguments, got %d"
 msgstr ""
-"%s jest prymitywną funkcją; jej ogólna forma nie może zostać przedefiniowana"
+"definicja metody 'replace' w 'setAs' musi być funkcją dwóch argumentów, "
+"otrzymano %d"
 
-# methods/R/Methods.R: 1367
-# warning(gettextf("%s is not currently a generic:  define it first to create a non-default implicit form",
-#                          sQuote(name)),
-#                 domain = NA)
+#. R/NextMethod.R: gettextf("a call to callNextMethod() appears in a call to %s, but the call does not seem to come from either a generic function or another 'callNextMethod'",     sQuote(f))
+#: R/NextMethod.R:0
 msgid ""
-"%s is not currently a generic:  define it first to create a non-default "
-"implicit form"
+"a call to callNextMethod() appears in a call to %s, but the call does not "
+"seem to come from either a generic function or another 'callNextMethod'"
 msgstr ""
-"%s nie jest aktualnie funkcją ogólną: zdefiniuj ją najpierw aby utworzyć "
-"niedomyślną niejawną formę"
+"wywołanie 'callNextMethod()' pojawia się w wywołaniu %s, ale wywołanie nie "
+"wygląda na pochodzące ani z ogólnej funkcji albo drugiego 'callNextMethod'"
 
-# methods/R/Methods.R: 1391
-# stop(gettextf("must provide an environment table; got class %s",
-#                       dQuote(class(what))), domain = NA)
-msgid "must provide an environment table; got class %s"
-msgstr "potrzeba dostarczyć tablicę środowiska; otrzymano klasę %s"
+#. R/refClass.R: gettextf("a call to superClass() is in the method %s but there is no superclass definition of this method for class %s",     sQuote(me), dQuote(thisClass at className))
+#: R/refClass.R:0
+msgid ""
+"a call to superClass() is in the method %s but there is no superclass "
+"definition of this method for class %s"
+msgstr ""
+"wywołanie 'superClass()' jest w metodzie %s, ale brak tam definicji "
+"superklasy tej metody dla klasy %s"
 
-# methods/R/Methods.R: 1434
-# gettext("original function is prohibited as a generic function")
-msgid "original function is prohibited as a generic function"
-msgstr "oryginalna funkcja jest zakazana jako ogólna funkcja"
+#. R/Methods.R: stop("a function for argument 'f' must be a generic function")
+#. R/trace.R: stop("a function for argument 'f' must be a generic function")
+#: R/Methods.R:0 R/trace.R:0
+msgid "a function for argument 'f' must be a generic function"
+msgstr "funkcja dla argumentu 'f' musi być ogólną funkcją"
 
-# methods/R/Methods.R: 1436
-# gettext("not both functions!")
-msgid "not both functions!"
-msgstr "jeden z argumentów nie jest funkcją!"
+#. R/RClassUtils.R: gettextf("a prototype object was supplied with object slot of class %s, but the class definition requires an object that is class %s",     dQuote(class(prototype at object)), dQuote(dataPartClass))
+#: R/RClassUtils.R:0
+msgid ""
+"a prototype object was supplied with object slot of class %s, but the class "
+"definition requires an object that is class %s"
+msgstr ""
+"obiekt prototypu został dostarczony z gniazdami klasy %s, ale definicja "
+"klasy wymaga obiektu klasy %s"
 
-# methods/R/Methods.R: 1441
-# gettextf("argument %s is not S4",
-#                                   deparse(substitute(f1)))
-# methods/R/Methods.R: 1443
-# gettextf("argument %s is not S4",
-#                                   deparse(substitute(f2)))
-msgid "argument %s is not S4"
-msgstr "argument '%s' nie jest S4"
+#. R/RClassUtils.R: gettextf("a prototype was supplied of class %s, but the class definition requires an object that is class %s",     dQuote(class(prototype)), dQuote(dataPartClass))
+#: R/RClassUtils.R:0
+msgid ""
+"a prototype was supplied of class %s, but the class definition requires an "
+"object that is class %s"
+msgstr ""
+"został dostarczony prototyp klasy %s, ale definicja klasy wymaga obiektu "
+"klasy %s"
 
-# methods/R/Methods.R: 1451
-# gettext("formal arguments differ (in default values?)")
-msgid "formal arguments differ (in default values?)"
-msgstr "formalne argumenty różnią się (w wartościach domyślnych?)"
+#. R/refClass.R: gettextf("a single class name is needed for field %s, got a character vector of length %d",     sQuote(thisName), length(thisField))
+#: R/refClass.R:0
+msgid ""
+"a single class name is needed for field %s, got a character vector of length "
+"%d"
+msgstr ""
+"potrzeba pojedynczej nazwy klasy dla pola %s, otrzymano wektor tekstowy o "
+"długości %d"
 
-# methods/R/Methods.R: 1457
-# gettextf("formal arguments differ: (%s), (%s)",
-# 			    paste(a1, collapse = ", "),
-# 			    paste(a2, collapse = ", "))
-msgid "formal arguments differ: (%s), (%s)"
-msgstr "formalne argumenty różnią się: (%s), (%s)"
+#. R/RClassUtils.R: gettextf("a validity method must be a function of one argument, got an object of class %s",     dQuote(class(validity)))
+#: R/RClassUtils.R:0
+msgid ""
+"a validity method must be a function of one argument, got an object of class "
+"%s"
+msgstr ""
+"metoda poprawności musi być funkcją jednego argumentu, otrzymano obiekt "
+"klasy %s"
 
-# methods/R/Methods.R: 1462
-# gettextf("value classes differ: %s, %s",
-#                         .dQ(gpString(f1 at valueClass)),
-#                         .dQ(gpString(f2 at valueClass)))
-msgid "value classes differ: %s, %s"
-msgstr "wartości klas różnią się: %s, %s"
+#. R/SClasses.R: gettextf("abnormal type %s is not supported as a superclass of a class definition",     dQuote(type))
+#: R/SClasses.R:0
+msgid "abnormal type %s is not supported as a superclass of a class definition"
+msgstr "nienormalny typ %s nie jest wspierany jako superklasa definicji klasy"
 
-# methods/R/Methods.R: 1468
-# gettextf("signatures differ:  (%s), (%s)",
-#                         paste(f1 at signature, collapse = ", "),
-#                         paste(f2 at signature, collapse = ", "))
-msgid "signatures differ:  (%s), (%s)"
-msgstr "sygnatury różnią się:  (%s), (%s)"
+#. R/RMethodUtils.R: gettextf("action function %s has no arguments, should have at least 1",     sQuote(fname))
+#: R/RMethodUtils.R:0
+msgid "action function %s has no arguments, should have at least 1"
+msgstr "funkcja akcji %s nie posiada argumentów, a powinna mieć przynajmniej 1"
 
-# methods/R/Methods.R: 1472
-# gettextf("package slots  differ: %s, %s",
-#                         .dQ(gpString(f1 at package)),
-#                         .dQ(gpString(f2 at package)))
-msgid "package slots  differ: %s, %s"
-msgstr "gniazda pakietów różnią się: %s, %s"
+#. R/as.R: warning("ambiguous object (length != 1) to coerce to \"name\"")
+#: R/as.R:0
+msgid "ambiguous object (length != 1) to coerce to \"name\""
+msgstr "dwuznaczny obiekt (długość różna od 1) do przekształcenia w \"name\""
 
-# methods/R/Methods.R: 1476
-# gettextf("groups differ: %s, %s",
-#                         .dQ(gpString(f1 at group)),
-#                         .dQ(gpString(f2 at group)))
-msgid "groups differ: %s, %s"
-msgstr "grupy różnią się: %s, %s"
+#. R/zzz.R: warning("apparently bad method or class metadata in saved environment;\n",     "move the file or remove the class/method")
+#: R/zzz.R:0
+msgid "apparently bad method or class metadata in saved environment;"
+msgstr "najwyraźniej złe metadane metody lub klasy w zapisanym środowisku;"
 
-# methods/R/Methods.R: 1481
-# gettextf("generic names differ: %s, %s",
-#                         .dQ(f1 at generic), .dQ(f2 at generic))
-msgid "generic names differ: %s, %s"
-msgstr "ogólne nazwy różnią się: %s, %s"
+#. R/Methods.R: gettextf("argument %s is not S4", deparse(substitute(f1)))
+#. R/Methods.R: gettextf("argument %s is not S4", deparse(substitute(f2)))
+#: R/Methods.R:0
+msgid "argument %s is not S4"
+msgstr "argument '%s' nie jest S4"
 
-# methods/R/Methods.R: 1521
-# stop(gettextf("argument %s must be a generic function or a single character string; got an object of class %s",
-#                       sQuote("f"), dQuote(class(f))),
-#              domain = NA)
+#. R/Methods.R: gettextf("argument %s must be a generic function or a single character string; got an object of class %s",     sQuote("f"), dQuote(class(f)))
+#: R/Methods.R:0
 msgid ""
 "argument %s must be a generic function or a single character string; got an "
 "object of class %s"
@@ -651,303 +612,194 @@ msgstr ""
 "argument %s musi być funkcją ogólną lub pojedynczym łańcuchem tekstowym; "
 "otrzymano obiekt klasy %s"
 
-# methods/R/Methods.R: 1529
-# warning(gettextf("non-generic function '%s' given to findMethods()", f),
-#                 domain = NA)
-msgid "non-generic function '%s' given to findMethods()"
-msgstr "nieogólna funkcja '%s' przekazana do 'findMethods()'"
-
-# methods/R/Methods.R: 1539
-# stop("only FALSE is meaningful for 'inherited', when 'where' is supplied (got ", inherited, "\"")
-msgid "only FALSE is meaningful for 'inherited', when 'where' is supplied (got"
-msgstr ""
-"tylko FALSE ma sens dla 'inherited', gdy dostarczono 'where' (otrzymano"
-
-# methods/R/MethodsList.R: 62
-# stop(gettextf("duplicate element names in 'MethodsList' at level %d: %s",
-#              level, paste("\"", unique(mnames[duplicated(mnames)]), "\"",
-#                           collapse=", ")), domain = NA)
-# methods/R/RMethodUtils.R: 1270
-# stop(gettextf("trying to change the formal arguments in %s, but the number of existing arguments is less than the number of new arguments: (%s) vs (%s)",
-#                       msg, paste0("\"", old, "\"", collapse=", "),
-#                       paste0("\"", new, "\"", collapse=", ")),
-#              domain = NA)
-# methods/R/RMethodUtils.R: 1275
-# warning(gettextf("trying to change the formal arguments in %s, but the number of existing arguments is greater than the number of new arguments (the extra arguments won't be used): (%s) vs (%s)",
-#                          msg, paste0("\"", old, "\"", collapse=", "),
-#                          paste0("\"", new, "\"", collapse=", ")),
-#                 domain = NA)
-# methods/R/RMethodUtils.R: 1290
-# stop(gettextf("in changing formal arguments in %s, some of the old names are not in fact arguments: %s",
-# 		      msg, paste0("\"", old[is.na(match(old, names(dlist)))], "\"", collapse=", ")),
-# 	     domain = NA)
-# methods/R/methodsTable.R: 471
-# stop("invalid or unset methods table in generic function \"",
-#                fdef at generic,"\"", damain = NA)
-# methods/R/Methods.R: 1539
-# stop("only FALSE is meaningful for 'inherited', when 'where' is supplied (got ", inherited, "\"")
-msgid "\""
-msgstr "\""
-
-# methods/R/Methods.R: 1604
-# stop(gettextf("argument 'f' must be a generic function or %s",
-#                       .notSingleString(f)), domain = NA)
-msgid "argument 'f' must be a generic function or %s"
-msgstr "argument 'f' musi być funkcją ogólną lub %s"
-
-# methods/R/Methods.R: 1619
-# stop(gettextf("'%s' is not a known generic function {and 'package' not specified}",
-# 			      f),
-# 		     domain = NA)
-msgid "'%s' is not a known generic function {and 'package' not specified}"
+#. R/SClasses.R: gettextf("argument %s must be a list or a character vector; got an object of class %s",     dQuote(what), dQuote(class(fields)))
+#: R/SClasses.R:0
+msgid ""
+"argument %s must be a list or a character vector; got an object of class %s"
 msgstr ""
-"'%s' nie jest znaną ogólną funkcją {oraz 'package' nie został określony}"
+"argument %s musi być listą  lub wektorem tekstowym; otrzymano obiekt klasy %s"
 
-# methods/R/MethodsList.R: 41
-# stop("invalid first argument: should be the name of the first argument in the dispatch")
+#. R/oldClass.R: gettextf("argument 'Classes' must be a vector of two classes; got an argument of length %d",     length(Classes))
+#: R/oldClass.R:0
 msgid ""
-"invalid first argument: should be the name of the first argument in the "
-"dispatch"
+"argument 'Classes' must be a vector of two classes; got an argument of "
+"length %d"
 msgstr ""
-"niepoprawny pierwszy argument: powinna to być nazwa pierwszego argumentu w "
-"wysyłce"
-
-# methods/R/MethodsList.R: 62
-# stop(gettextf("duplicate element names in 'MethodsList' at level %d: %s",
-#              level, paste("\"", unique(mnames[duplicated(mnames)]), "\"",
-#                           collapse=", ")), domain = NA)
-msgid "duplicate element names in 'MethodsList' at level %d: %s"
-msgstr "powtórzone nazwy elementów w 'MethodsList' na poziomie %d: %s"
+"argument 'Classes' musi być wektorem dwóch klas; otrzymano argument o "
+"długości %d"
 
-# methods/R/MethodsList.R: 73
-# stop(gettextf("element %d at level %d (class %s) cannot be interpreted as a function or named list",
-#                           i, level, dQuote(class(eli))),
-#                  domain = NA)
+#. R/oldClass.R: gettextf("argument 'S4Class' must be a class definition: got an object of class %s",     dQuote(class(S4Class)))
+#: R/oldClass.R:0
 msgid ""
-"element %d at level %d (class %s) cannot be interpreted as a function or "
-"named list"
-msgstr ""
-"element %d na poziomie %d (klasa %s) nie może być interpretowany jak funkcja "
-"lub nazwana lista"
+"argument 'S4Class' must be a class definition: got an object of class %s"
+msgstr "argument 'S4Class' musi być definicją klasy: otrzymano obiekt klasy %s"
 
-# methods/R/MethodsList.R: 94
-# stop("arguments 'names' and 'signature' must have the same length")
-msgid "arguments 'names' and 'signature' must have the same length"
-msgstr "argumenty 'names' oraz 'signature' muszą posiadać tę samą długość"
+#. R/RClassUtils.R: stop("argument 'abbreviate' must be 0, 1, 2, or 3")
+#: R/RClassUtils.R:0
+msgid "argument 'abbreviate' must be 0, 1, 2, or 3"
+msgstr "argument 'abbreviate' musi mieć wartość 0, 1, 2, lub 3"
+
+#. R/SClasses.R: stop("argument 'classDef' must be a class definition or the name of a class")
+#: R/SClasses.R:0
+msgid "argument 'classDef' must be a class definition or the name of a class"
+msgstr "argument 'classDef' musi być definicją klasy lub nazwą klasy"
 
-# methods/R/MethodsList.R: 117
-# stop(gettextf("inserting method with invalid signature matching argument '...' to class %s",
-#                          dQuote(signature[[1L]])),
-#                 domain = NA)
+#. R/SClasses.R: gettextf("argument 'classDef' must be a string or a class representation; got an object of class %s",     dQuote(class(classDef)))
+#: R/SClasses.R:0
 msgid ""
-"inserting method with invalid signature matching argument '...' to class %s"
+"argument 'classDef' must be a string or a class representation; got an "
+"object of class %s"
 msgstr ""
-"wstawianie metody z niepoprawną sygnaturą pasującą do argumentu '...' do "
-"klasy %s"
-
-# methods/R/MethodsList.R: 126
-# stop("inserting method corresponding to empty signature")
-msgid "inserting method corresponding to empty signature"
-msgstr "wstawienie metody odpowiadającej pustej sygnaturze"
-
-# methods/R/MethodsList.R: 128
-# stop(gettextf("inserting method into non-methods-list object (class %s)",
-#                       dQuote(.class1(mlist))),
-#              domain = NA)
-msgid "inserting method into non-methods-list object (class %s)"
-msgstr "wstawienie metody w obiekt nie będący listą metod (klasa %s)"
+"argument 'classDef' musi być łańcuchem albo reprezentacją klasy; otrzymano "
+"obiekt klasy %s"
 
-# methods/R/MethodsList.R: 221
-# stop("invalid method sublist")
-msgid "invalid method sublist"
-msgstr "niepoprawne podlista metod"
+#. R/Methods.R: gettextf("argument 'f' must be a generic function or %s", .notSingleString(f))
+#: R/Methods.R:0
+msgid "argument 'f' must be a generic function or %s"
+msgstr "argument 'f' musi być funkcją ogólną lub %s"
 
-# methods/R/MethodsList.R: 223
-# stop(gettextf("%f is not a valid generic function: methods list was an object of class %s",
-#                           sQuote(f), dQuote(class(mlist))),
-#                  domain = NA)
+#. R/RMethodUtils.R: stop("argument 'f' must be a string, generic function, or primitive: got an ordinary function")
+#: R/RMethodUtils.R:0
 msgid ""
-"%f is not a valid generic function: methods list was an object of class %s"
+"argument 'f' must be a string, generic function, or primitive: got an "
+"ordinary function"
 msgstr ""
-"%f nie jest poprawną ogólną funkcją: lista metod była obiektem klasy %s"
+"argument 'f' musi być łańcuchem, ogólną funkcją, lub funkcją prymitywną: "
+"otrzymano zwykłą funkcję"
 
-# methods/R/MethodsList.R: 228
-# stop(gettextf("%s must be TRUE, FALSE, or a named logical vector of those values; got an object of class %s",
-#                       sQuote("useInherited"),
-#                       dQuote(class(useInherited))),
-#              domain = NA)
+#. R/RClassUtils.R: stop("argument 'includeSubclasses' must be a logical, either one value or a vector of the same length as argument 'classes'")
+#: R/RClassUtils.R:0
 msgid ""
-"%s must be TRUE, FALSE, or a named logical vector of those values; got an "
-"object of class %s"
+"argument 'includeSubclasses' must be a logical, either one value or a vector "
+"of the same length as argument 'classes'"
 msgstr ""
-"%s musi być TRUE, FALSE, lub nazwanym wektorem logicznym tych wartości; "
-"otrzymano obiekt klasy %s"
+"argument 'includeSubclasses' musi być argumentem logicznym posiadającym "
+"jedną wartość lub wektorem o tej samej długości jak argument 'classes'"
 
-# methods/R/MethodsList.R: 389
-# stop(gettextf("default method must be a method definition, a primitive or NULL: got an object of class %s", dQuote(class(method))),
-#                domain = NA)
+#. R/trace.R: stop("argument 'signature' is not meaningful for tracing reference methods")
+#: R/trace.R:0
+msgid "argument 'signature' is not meaningful for tracing reference methods"
+msgstr "argument 'signature' nie ma sensu dla śledzenia metod referencyjnych"
+
+#. R/Methods.R: warning("argument 'signature' is not meaningful with the current implementation and is ignored \n(extract a subset of the methods list instead)")
+#: R/Methods.R:0
 msgid ""
-"default method must be a method definition, a primitive or NULL: got an "
-"object of class %s"
+"argument 'signature' is not meaningful with the current implementation and "
+"is ignored \n"
+"(extract a subset of the methods list instead)"
 msgstr ""
-"domyślna metoda musi być definicją metody, prymitywną funkcją lub wartością "
-"NULL: otrzymano obiekt klasy %s"
+"argument 'signature' nie ma sensu razem z bieżącą implementacją tak więc "
+"zostaje zignorowany \n"
+"(zamiast tego wyodrębnij podzbiór listy metod)"
 
-# methods/R/MethodsList.R: 460
-# stop(gettextf("trying to match a method signature to an object (of class %s) that is not a generic function",
-#                       dQuote(class(fun))),
-#              domain = NA)
+#. R/methodsTable.R: stop("argument 'signatures' must be a character matrix whose rows are method signatures")
+#: R/methodsTable.R:0
 msgid ""
-"trying to match a method signature to an object (of class %s) that is not a "
-"generic function"
+"argument 'signatures' must be a character matrix whose rows are method "
+"signatures"
 msgstr ""
-"próba dopasowania sygnatury metody do obiektu (klasy %s), który nie jest "
-"ogólną funkcją"
+"argument 'signatures' musi być macierzą tekstową której wiersze są "
+"sygnaturami metod"
 
-# methods/R/MethodsList.R: 471
-# stop("invalid 'package' slot or attribute, wrong length")
-msgid "invalid 'package' slot or attribute, wrong length"
-msgstr "niepoprawna gniazdo 'package' lub atrybut; niepoprawna długość"
+#. R/trace.R: stop("argument 'what' should be the name of a function")
+#: R/trace.R:0
+msgid "argument 'what' should be the name of a function"
+msgstr "argument 'what' musi być nazwą funkcji"
 
-# methods/R/MethodsList.R: 489
-# stop(gettextf("invalid element in a list for \"signature\" argument; element %d is neither a class definition nor a class name",
-#                      i), domain = NA)
-msgid ""
-"invalid element in a list for \"signature\" argument; element %d is neither "
-"a class definition nor a class name"
-msgstr ""
-"niepoprawny element na liście dla argumentu 'signature'; element %d nie jest "
-"ani definicją klasy ani nazwą klasy"
+#. R/RMethodUtils.R: stop("argument f must be a generic function with signature \"...\"")
+#: R/RMethodUtils.R:0
+msgid "argument f must be a generic function with signature \"...\""
+msgstr "argument 'f' musi być ogólną funkcją z sygnaturą '...'"
 
-# methods/R/MethodsList.R: 494
-# stop(gettextf("trying to match a method signature of class %s; expects a list or a character vector",
-#                       dQuote(class(signature))),
-#              domain = NA)
+#. R/as.R: gettextf("argument names in 'replace' changed to agree with 'coerce<-' generic:\n%s",     paste(deparse(replace), sep = "\n    "))
+#: R/as.R:0
 msgid ""
-"trying to match a method signature of class %s; expects a list or a "
-"character vector"
+"argument names in 'replace' changed to agree with 'coerce<-' generic:\n"
+"%s"
 msgstr ""
-"próba dopasowania sygnatury metody klasy %s; oczekuje listy lub wektor "
-"tekstowego"
+"nazwy argumentów w metodzie 'replace' zostały zmienione aby zgadzać się z "
+"ogólnym 'coerce<-':\n"
+"%s"
 
-# methods/R/MethodsList.R: 523
-# stop(gettextf("object to use as a method signature for function %s does not look like a legitimate signature (a vector of single class names): there were %d class names, but %d elements in the signature object",
-#                       sQuote(fun at generic),
-#                       length(sigClasses),
-#                       length(signature)),
-#              domain = NA)
-msgid ""
-"object to use as a method signature for function %s does not look like a "
-"legitimate signature (a vector of single class names): there were %d class "
-"names, but %d elements in the signature object"
-msgstr ""
-"obiekt do użycia jako sygnatura metody dla funkcji %s nie wygląda na "
-"poprawną sygnaturę (wektor pojedynczych nazw klas): było %d nazw klas, ale "
-"%d elementów w obiekcie sygnatury"
+#. R/MethodsList.R: stop("arguments 'names' and 'signature' must have the same length")
+#: R/MethodsList.R:0
+msgid "arguments 'names' and 'signature' must have the same length"
+msgstr "argumenty 'names' oraz 'signature' muszą posiadać tę samą długość"
 
-# methods/R/MethodsList.R: 531
-# stop(gettextf("more elements in the method signature (%d) than in the generic signature (%d) for function %s",
-# 	       length(which), length(anames), sQuote(fun at generic)), domain = NA)
+#. R/RMethodUtils.R: gettextf("arguments (%s) after '...' in the generic must appear in the method, in the same place at the end of the argument list",     paste(trailingArgs, collapse = ", "))
+#: R/RMethodUtils.R:0
 msgid ""
-"more elements in the method signature (%d) than in the generic signature "
-"(%d) for function %s"
+"arguments (%s) after '...' in the generic must appear in the method, in the "
+"same place at the end of the argument list"
 msgstr ""
-"więcej elementów w sygnaturze metody (%d) niż w ogólnej sygnaturze (%d) dla "
-"funkcji %s"
-
-# methods/R/MethodsList.R: 672
-# stop(gettextf("no generic function found corresponding to %s",
-#                       sQuote(f)),
-# 	     domain = NA)
-msgid "no generic function found corresponding to %s"
-msgstr "nie znaleziono ogólnej funkcji odpowiadającej %s"
+"argumenty (%s) po '...' w ogólnej funkcji muszą pojawić się w metodzie w tym "
+"samym miejscu na końcu listy argumentów"
 
-msgid "skipping methods list element %s of unexpected class %s"
-msgstr "pomijanie elementów listy metod %s nieoczekiwanej klasy %s"
+#. R/refClass.R: stop("arguments must all be character string names of fields")
+#: R/refClass.R:0
+msgid "arguments must all be character string names of fields"
+msgstr "wszystkie argumenty muszą być łańcuchami tekstowymi nazw pól"
 
-# methods/R/MethodsList.R: 888
-# gettextf("%s, along with other use of the \"MethodsList\" metadata objects, is deprecated.", dQuote(this))
-msgid ""
-"%s, along with other use of the \"MethodsList\" metadata objects, is "
-"deprecated."
+#. R/refClass.R: stop("arguments to methods() must be named, or one named list")
+#: R/refClass.R:0
+msgid "arguments to methods() must be named, or one named list"
 msgstr ""
-"%s, razem z innym użyciem obiektów metadanych 'MethodsList' jest "
-"przestarzałe."
-
-# methods/R/MethodsList.R: 890
-# gettextf("in %s: use of \"MethodsList\" metadata objects is deprecated.", deparse(this))
-msgid "in %s: use of \"MethodsList\" metadata objects is deprecated."
-msgstr "w %s: użycie obiektów metadanych \"MethodsList\" jest przestarzałe."
+"argumenty przekazane do 'methods()' muszą być nazwane lub być jedną nazwaną "
+"listą"
 
-# methods/R/MethodsList.R: 892
-# gettextf("use %s instead.", dQuote(instead))
-msgid "use %s instead."
-msgstr "użyj wzamian %s."
+#. R/RClassUtils.R: gettextf("assigning as %s a class representation with internal name %s",     dQuote(Class), dQuote(def at className))
+#: R/RClassUtils.R:0
+msgid "assigning as %s a class representation with internal name %s"
+msgstr "przypisywanie jako %s reprezentacji klasy z wewnętrzną nazwą %s"
 
-# methods/R/MethodsListClass.R: 97
-# stop(gettextf("invalid object for formal method definition: type %s",
-#                              dQuote(typeof(def))),
-#                     domain = NA)
-msgid "invalid object for formal method definition: type %s"
-msgstr "niepoprawny obiekt dla definicji formalnej metody: typ %s"
+#. R/trace.R: gettextf("assigning over the binding of symbol %s in environment/package %s",     sQuote(what), sQuote(pname))
+#: R/trace.R:0
+msgid "assigning over the binding of symbol %s in environment/package %s"
+msgstr "przypisywanie poprzez powiązanie symbolu %s w środowisku/pakiecie %s"
 
-# methods/R/MethodsListClass.R: 154
-# warning(gettextf("missing package slot (%s) in object of class %s (package info added)",
-#                                          packageSlot(co),
-#                                          dQuote(class(.Object))),
-#                                 domain = NA)
-msgid "missing package slot (%s) in object of class %s (package info added)"
+#. R/SClasses.R: gettextf("assignment of an object of class %s is not valid for @%s in an object of class %s; is(value, \"%s\") is not TRUE",     dQuote(valueClass), sQuote(name), dQuote(cl), slotClass)
+#: R/SClasses.R:0
+msgid ""
+"assignment of an object of class %s is not valid for @%s in an object of "
+"class %s; is(value, \"%s\") is not TRUE"
 msgstr ""
-"brakujące gniazdo pakietu (%s) w obiekcie klasy %s (dodana informacja o "
-"pakiecie)"
+"przypisanie obiektu klasy %s nie jest poprawny dla @%s w obiekcie klasy %s; "
+"'is(value, \"%s\")' nie ma wartości TRUE"
 
-# methods/R/MethodsListClass.R: 164
-# stop(gettextf("'initialize' method returned an object of class %s instead of the required class %s",
-#                                   paste(dQuote(class(value)), collapse=", "),
-#                                   dQuote(class(.Object))),
-#                          domain = NA)
+#. R/SClasses.R: gettextf("assignment of an object of class %s is not valid for slot %s in an object of class %s; is(value, \"%s\") is not TRUE",     dQuote(valueClass), sQuote(name), dQuote(cl), slotClass)
+#: R/SClasses.R:0
 msgid ""
-"'initialize' method returned an object of class %s instead of the required "
-"class %s"
+"assignment of an object of class %s is not valid for slot %s in an object of "
+"class %s; is(value, \"%s\") is not TRUE"
 msgstr ""
-"metoda 'initialize' zwróciła obiekt klasy %s zamiast wymaganej klasy %s"
-
-msgid "%d: target \"%s\": chose \"%s\" (others: %s)"
-msgstr "%d: cel \"%s\": wybrano \"%s\" (inne: %s)"
+"przypisanie obiektu klasy %s nie jest poprawny dla gniazda %s w obiekcie "
+"klasy %s; 'is(value, %s)' nie ma wartości TRUE"
 
-msgid "Notes: %s."
-msgstr "Uwagi: %s."
+#. R/Methods.R: gettextf("bad class specified for element %d (should be a single character string)",     i)
+#: R/Methods.R:0
+msgid ""
+"bad class specified for element %d (should be a single character string)"
+msgstr ""
+"określono błędną klasę dla elementu %d (powinien być jednym łańcuchem "
+"tekstowym)"
 
-# methods/R/MethodsListClass.R: 254
-# gettextf("class generator function for class %s from package %s\n",
-#                                dQuote(object at className),
-#                                sQuote(object at package))
-msgid "class generator function for class %s from package %s"
-msgstr "funkcja generatora klas dla klasy %s z pakietu %s"
+#. R/methodsTable.R: gettextf("bad method object stored in method table, class %s",     dQuote(class(current)))
+#: R/methodsTable.R:0
+msgid "bad method object stored in method table, class %s"
+msgstr "błędny obiekt metody przechowywany w tablicy metod, klasy %s"
 
-# methods/R/MethodsListClass.R: 418
-# stop(gettextf("the names in signature for method (%s) do not match %s's arguments (%s)",
-#                             paste(sigArgs, collapse = ", "),
-#                             if(is(fdef, "genericFunction")) fdef at generic else "function",
-#                             paste(formalNames, collapse = ", ")),
-#                    domain = NA)
-msgid "the names in signature for method (%s) do not match %s's arguments (%s)"
-msgstr ""
-"nazwy w sygnaturze dla metody (%s) nie zgadzają się z argumentami %s (%s)"
+#. R/NextMethod.R: gettextf("bad object found as method (class %s)", dQuote(class(method)))
+#: R/NextMethod.R:0
+msgid "bad object found as method (class %s)"
+msgstr "znaleziono błędny obiekt jako metodę (klasa %s)"
 
-# methods/R/NextMethod.R: 60
-# stop(gettextf("a call to callNextMethod() appears in a call to %s, but the call does not seem to come from either a generic function or another 'callNextMethod'",
-#                           sQuote(f)),
-#                  domain = NA)
-msgid ""
-"a call to callNextMethod() appears in a call to %s, but the call does not "
-"seem to come from either a generic function or another 'callNextMethod'"
-msgstr ""
-"wywołanie 'callNextMethod()' pojawia się w wywołaniu %s, ale wywołanie nie "
-"wygląda na pochodzące ani z ogólnej funkcji albo drugiego 'callNextMethod'"
+#. R/is.R: gettext("both classes must be defined")
+#: R/is.R:0
+msgid "both classes must be defined"
+msgstr "obie klasy muszą być zdefiniowane"
 
-# methods/R/NextMethod.R: 81
-# stop("call to 'callNextMethod' does not appear to be in a 'method' or 'callNextMethod' context")
+#. R/NextMethod.R: stop("call to 'callNextMethod' does not appear to be in a 'method' or 'callNextMethod' context")
+#: R/NextMethod.R:0
 msgid ""
 "call to 'callNextMethod' does not appear to be in a 'method' or "
 "'callNextMethod' context"
@@ -955,510 +807,418 @@ msgstr ""
 "wywołanie 'callNextMethod' nie wygląda aby było w kontekście 'method' lub "
 "'callNextMethod'"
 
-# methods/R/NextMethod.R: 95
-# stop(gettextf("bad object found as method (class %s)",
-#                       dQuote(class(method))), domain = NA)
-msgid "bad object found as method (class %s)"
-msgstr "znaleziono błędny obiekt jako metodę (klasa %s)"
+#. R/Methods.R: stop("callGeneric() must be called from within a method body")
+#: R/Methods.R:0
+msgid "callGeneric() must be called from within a method body"
+msgstr "'callGeneric()' musi być wywołana z wewnątrz ciała ogólnej metody"
 
-# methods/R/RClassUtils.R: 147
-# stop(gettextf("in constructing the prototype for class %s: prototype has class %s, but the data part specifies class %s",
-#                               dQuote(className),
-#                               dQuote(.class1(prototype)),
-#                               dQuote(dataPartClass)),
-#                      domain = NA)
+#. R/is.R: gettextf("cannot create a 'setIs' relation when neither of the classes (%s and %s) is local and modifiable in this package",     dQuote(class1), dQuote(class2))
+#: R/is.R:0
 msgid ""
-"in constructing the prototype for class %s: prototype has class %s, but the "
-"data part specifies class %s"
+"cannot create a 'setIs' relation when neither of the classes (%s and %s) is "
+"local and modifiable in this package"
 msgstr ""
-"podczas konstruowaniu prototypu dla klasy %s: prototyp posiada klasę %s, ale "
-"dane określają klasę %s"
+"nie można utworzyć relacji 'setIs' kiedy żadna z klas (%s oraz %s) nie jest "
+"lokalna oraz modyfikowalna w tym pakiecie"
+
+#. R/trace.R: gettextf("cannot find an environment corresponding to package name '%s\"",     package)
+#: R/trace.R:0
+msgid "cannot find an environment corresponding to package name '%s\""
+msgstr "nie można znaleźć środowiska odpowiadającego nazwie pakietu '%s'"
+
+#. R/BasicClasses.R: stop("cannot have more than one unnamed argument as environment")
+#: R/BasicClasses.R:0
+msgid "cannot have more than one unnamed argument as environment"
+msgstr "nie można mieć więcej niż jeden nienazwany argument jako środowisko"
 
-# methods/R/RClassUtils.R: 168
-# warning(gettextf("in constructing the prototype for class %s, slots in prototype and not in class: %s",
-#                          dQuote(className),
-#                          paste(extra, collapse=", ")),
-#                 domain = NA)
+#. R/trace.R: gettextf("cannot insert methods for these functions (methods table not found in source): %s",     paste("\"", methods[notThere], "\"", sep = "", collapse = ", "))
+#: R/trace.R:0
 msgid ""
-"in constructing the prototype for class %s, slots in prototype and not in "
-"class: %s"
+"cannot insert methods for these functions (methods table not found in "
+"source): %s"
 msgstr ""
-"podczas konstruowaniu prototypu dla klasy %s, gniazda są w prototypie a nie "
-"w klasie: %s"
+"nie można wstawić metod dla tych funkcji (tablica metod nie została "
+"znaleziona w źródle): %s"
 
-# methods/R/RClassUtils.R: 190
-# stop(gettextf("in making the prototype for class %s elements of the prototype failed to match the corresponding slot class: %s",
-#                       dQuote(className),
-#                       paste(pnames[check],
-#                             "(class",
-#                             .dQ(slotDefs[match(pnames[check], slotNames)]),
-#                             ")",
-#                             collapse = ", ")),
-#              domain = NA)
-msgid ""
-"in making the prototype for class %s elements of the prototype failed to "
-"match the corresponding slot class: %s"
+#. R/trace.R: gettextf("cannot insert these (not found in source): %s", paste("\"",     functions[notThere], "\"", sep = "", collapse = ", "))
+#: R/trace.R:0
+msgid "cannot insert these (not found in source): %s"
+msgstr "nie można ich wstawić (nie znaleziono w źródle): %s"
+
+#. R/Methods.R: gettextf("cannot remove methods for %s in locked environment/package %s",     sQuote(f), sQuote(getPackageName(db)))
+#: R/Methods.R:0
+msgid "cannot remove methods for %s in locked environment/package %s"
+msgstr "nie można usunąć metod dla %s w zablokowanym środowisku/pakiecie %s"
+
+#. R/BasicClasses.R: stop("cannot specify array() arguments when specifying '.Data'")
+#: R/BasicClasses.R:0
+msgid "cannot specify array() arguments when specifying '.Data'"
 msgstr ""
-"podczas tworzenia prototypu dla klasy %s elementy prototypu nie zgodziły się "
-"z odpowiadającymi gniazdami klasy: %s"
+"nie można określić argumentów metody 'array()' gdy określane jest '.Data'"
 
-# methods/R/RClassUtils.R: 248
-# warning(gettextf("potential cycle in class inheritance: %s has duplicates in superclasses and subclasses (%s)",
-#                          dQuote(Class),
-#                          paste(bad, collapse = ", ")),
-#                 domain = NA)
-msgid ""
-"potential cycle in class inheritance: %s has duplicates in superclasses and "
-"subclasses (%s)"
+#. R/BasicClasses.R: stop("cannot specify matrix() arguments when specifying '.Data'")
+#: R/BasicClasses.R:0
+msgid "cannot specify matrix() arguments when specifying '.Data'"
 msgstr ""
-"potencjalny cykl w dziedziczeniu klasy: %s ma powtórzenia w superklasach "
-"oraz podklasach (%s)"
+"nie można określić argumentów metody 'matrix()' gdy określane jest '.Data'"
 
-# methods/R/RClassUtils.R: 320
-# warning(gettextf("undefined slot classes in definition of %s: %s",
-#                              .dQ(ClassDef at className),
-#                              paste(names(properties)[undefClasses], "(class ",
-#                                    .dQ(unlist(properties, recursive = FALSE)[undefClasses]),
-#                                    ")", collapse = ", ", sep = "")),
-#                     call. = FALSE, domain = NA)
-msgid "undefined slot classes in definition of %s: %s"
-msgstr "niezdefiniowane gniazda klas w definicji %s: %s"
+#. R/trace.R: gettextf("cannot untrace method for %s; no method defined for this signature: %s",     sQuote(what), paste(signature, collapse = ", "))
+#: R/trace.R:0
+msgid "cannot untrace method for %s; no method defined for this signature: %s"
+msgstr ""
+"nie można zwolnić śledzenia metody dla %s; nie zdefiniowano metody dla tej "
+"sygnatury: %s"
 
-# methods/R/RClassUtils.R: 408
-# stop(gettextf("in definition of class %s, information for superclass %s is of class %s (expected \"SClassExtension\")",
-#                           dQuote(ClassDef at className),
-#                           dQuote(what),
-#                           dQuote(class(exti))),
-#                  domain = NA)
+#. R/trace.R: stop("cannot use 'at' argument unless the function body has the form '{ ... }'")
+#: R/trace.R:0
 msgid ""
-"in definition of class %s, information for superclass %s is of class %s "
-"(expected \"SClassExtension\")"
+"cannot use 'at' argument unless the function body has the form '{ ... }'"
+msgstr "nie można użyć argumentu 'at' o ile ciało funkcji ma formę '{ ... }'"
+
+#. R/trace.R: stop("cannot use 'at' argument without a trace expression")
+#: R/trace.R:0
+msgid "cannot use 'at' argument without a trace expression"
+msgstr "nie można użyć argumentu 'at' bez wyrażenia śledzenia"
+
+#. R/SClasses.R: gettextf("cannot use object of class %s in new():  class %s does not extend that class",     dQuote(Classi), dQuote(Class))
+#: R/SClasses.R:0
+msgid ""
+"cannot use object of class %s in new():  class %s does not extend that class"
 msgstr ""
-"w definicji klasy %s, informacja dla superklasy %s jest klasy %s (oczekiwano "
-"'SClassExtension')"
+"nie można użyć obiektu klasy %s w 'new()': klasa %s nie rozszerza tej klasy"
 
-# methods/R/RClassUtils.R: 415
-# warning(gettextf("class %s extends an undefined class, %s",
-#                                  dQuote(ClassDef at className),
-#                                  dQuote(what)),
-#                         domain = NA)
-msgid "class %s extends an undefined class, %s"
-msgstr "klasa %s rozszerza niezdefiniowaną klasę, %s"
+#. R/is.R: gettextf("class %s cannot extend class %s", dQuote(class1), dQuote(class2))
+#: R/is.R:0
+msgid "class %s cannot extend class %s"
+msgstr "klasa %s nie może rozszerzyć klasy %s"
 
-# methods/R/RClassUtils.R: 451
-# stop("'Class' must be a valid class definition or class")
-msgid "'Class' must be a valid class definition or class"
-msgstr "Argument 'Class' musi być poprawną definicją klasy lub klasą"
+#. R/RClassUtils.R: gettextf("class %s does not have a data part (a .Data slot) defined",     dQuote(class(object)))
+#: R/RClassUtils.R:0
+msgid "class %s does not have a data part (a .Data slot) defined"
+msgstr "klasa %s nie ma zdefiniowanej części danych (gniazdo '.Data')"
 
-# methods/R/RClassUtils.R: 507
-# stop(gettextf("trying to assign an object of class %s as the definition of class %s: must supply a \"classRepresentation\" object",
-#                         dQuote(class(def)),
-#                         dQuote(Class)),
-#                domain = NA)
+#. R/BasicClasses.R: gettextf("class %s does not have an S3 data part, and so is of type \"S4\"; no S3 equivalent",     dQuote(class(from)))
+#: R/BasicClasses.R:0
 msgid ""
-"trying to assign an object of class %s as the definition of class %s: must "
-"supply a \"classRepresentation\" object"
+"class %s does not have an S3 data part, and so is of type \"S4\"; no S3 "
+"equivalent"
 msgstr ""
-"próba przypisania obiekt klasy %s jako definicję klasy %s: potrzeba "
-"dostarczyć obiekt 'classRepresentation'"
+"klasa %s nie ma części danych S3, i dlatego też jest typu S4; brak "
+"ekwiwalentu S3"
 
-# methods/R/RClassUtils.R: 513
-# stop(gettextf("assigning as %s a class representation with internal name %s",
-#                         dQuote(Class),
-#                         dQuote(def at className)),
-#                domain = NA)
-msgid "assigning as %s a class representation with internal name %s"
-msgstr "przypisywanie jako %s reprezentacji klasy z wewnętrzną nazwą %s"
+#. R/RClassUtils.R: gettextf("class %s extends an undefined class (%s)", dQuote(name),     dQuote(cl))
+#: R/RClassUtils.R:0
+msgid "class %s extends an undefined class (%s)"
+msgstr "klasa %s rozszerza niezdefiniowaną klasę (%s)"
+
+#. R/RClassUtils.R: gettextf("class %s extends an undefined class, %s", dQuote(ClassDef at className),     dQuote(what))
+#: R/RClassUtils.R:0
+msgid "class %s extends an undefined class, %s"
+msgstr "klasa %s rozszerza niezdefiniowaną klasę, %s"
+
+#. R/refClass.R: gettextf("class %s for field %s is not defined", dQuote(thisField),     sQuote(thisName))
+#: R/refClass.R:0
+msgid "class %s for field %s is not defined"
+msgstr "klasa %s dla pola %s nie jest zdefiniowana"
 
-# methods/R/RClassUtils.R: 528
-# stop(gettextf("class %s has a locked definition in package %s",
-#                           dQuote(Class), sQuote(getPackageName(where))))
+#. R/RClassUtils.R: gettextf("class %s has a locked definition in package %s", dQuote(Class),     sQuote(getPackageName(where)))
+#: R/RClassUtils.R:0
 msgid "class %s has a locked definition in package %s"
 msgstr "klasa %s ma zablokowaną definicję w pakiecie %s"
 
-# methods/R/RClassUtils.R: 612
-# stop("'externalptr' objects cannot be initialized from new()")
-msgid "'externalptr' objects cannot be initialized from new()"
-msgstr "obiekty 'externalptr' nie mogą być inicjalizowane z funkcji 'new()'"
-
-# methods/R/RClassUtils.R: 636
-# gettextf("initializing objects from class %s with these arguments is not supported",
-#                                        dQuote(Class))
-msgid ""
-"initializing objects from class %s with these arguments is not supported"
+#. R/SClasses.R: gettextf("class %s has multiple definitions visible; only the first removed",     dQuote(Class))
+#: R/SClasses.R:0
+msgid "class %s has multiple definitions visible; only the first removed"
 msgstr ""
-"inicjalizowanie obiektów z klasy %s z tymi argumentami nie jest wspierane"
+"klasa %s posiada widoczne wielokrotne definicje; usunięto tylko pierwszą"
+
+#. R/is.R: gettextf("class %s has no visible definition from package or environment %s",     dQuote(class2), sQuote(getPackageName(where)))
+#: R/is.R:0
+msgid "class %s has no visible definition from package or environment %s"
+msgstr "klasa %s nie ma widocznej definicji w pakiecie lub środowisku %s"
 
-# methods/R/RClassUtils.R: 681
-# stop(gettextf("in defining class %s, the supplied data part class, %s is not valid (must be a basic class or a virtual class combining basic classes)",
-#                         dQuote(name), dQuote(dataPartClass)),
-#                domain = NA)
+#. R/BasicClasses.R: gettextf("class %s is VIRTUAL; not meaningful to create an S4 object from this class",     dQuote(cl))
+#: R/BasicClasses.R:0
 msgid ""
-"in defining class %s, the supplied data part class, %s is not valid (must be "
-"a basic class or a virtual class combining basic classes)"
-msgstr ""
-"podczas definiowania klasy %s, dostarczona część danych klasy, %s nie jest "
-"poprawna (musi być podstawową klasą lub klasą wirtualną łączącą podstawowe "
-"klasy)"
+"class %s is VIRTUAL; not meaningful to create an S4 object from this class"
+msgstr "klasa %s jest WIRTUALNA; nie ma sensu tworzyć obiektu S4 z tej klasy"
 
-# methods/R/RClassUtils.R: 692
-# stop(gettextf("no definition was found for superclass %s in the specification of class %s",
-#                               dQuote(cl), dQuote(name)),
-#                      domain = NA)
+#. R/as.R: gettextf("class %s is a class union: 'coerce' relations to a class union are not meaningful",     dQuote(to))
+#: R/as.R:0
 msgid ""
-"no definition was found for superclass %s in the specification of class %s"
-msgstr "nie znaleziono definicji dla superklasy %s w specyfikacji klasy %s"
+"class %s is a class union: 'coerce' relations to a class union are not "
+"meaningful"
+msgstr "klasa %s jest unią klas: relacje 'coerce' dla uni klas nie mają sensu"
 
-# methods/R/RClassUtils.R: 710
-# stop(gettextf("conflicting definition of data part: .Data = %s, superclass implies %s",
-#                                 dQuote(elNamed(properties, ".Data")),
-#                                 dQuote(dataPartClass)),
-#                        domain = NA)
-msgid "conflicting definition of data part: .Data = %s, superclass implies %s"
+#. R/is.R: gettextf("class %s is defined (with package slot %s) but no metadata object found to revise %s information---not exported?  Making a copy in package %s",     .dQ(class), sQuote(classDef at package), purpose, sQuote(getPackageName(where,         FALSE)))
+#: R/is.R:0
+msgid ""
+"class %s is defined (with package slot %s) but no metadata object found to "
+"revise %s information---not exported?  Making a copy in package %s"
 msgstr ""
-"sprzeczne definicje części danych: '.Data = %s', superklasa sugeruje %s"
+"klasa %s jest zdefiniowana (z gniazdem pakietu %s), ale nie znaleziono "
+"obiektu metadanych do przeglądu informacji %s -- nie wyeksportowano? "
+"Tworzenie kopii w pakiecie %s"
+
+#. R/refClass.R: gettextf("class %s is defined but is not a reference class",     dQuote(Class))
+#: R/refClass.R:0
+msgid "class %s is defined but is not a reference class"
+msgstr "klasa %s jest zdefiniowana, ale nie jest referencyjną klasą"
 
-# methods/R/RClassUtils.R: 740
-# stop(gettextf("a prototype object was supplied with object slot of class %s, but the class definition requires an object that is class %s",
-#                                         dQuote(class(prototype at object)),
-#                                         dQuote(dataPartClass)),
-#                                domain = NA)
+#. R/SClasses.R: gettextf("class %s is defined, with package %s, but no corresponding metadata object was found (not exported?)",     dQuote(Class), sQuote(classDef at package))
+#: R/SClasses.R:0
 msgid ""
-"a prototype object was supplied with object slot of class %s, but the class "
-"definition requires an object that is class %s"
+"class %s is defined, with package %s, but no corresponding metadata object "
+"was found (not exported?)"
 msgstr ""
-"obiekt prototypu został dostarczony z gniazdami klasy %s, ale definicja "
-"klasy wymaga obiektu klasy %s"
+"klasa %s jest zdefiniowana z pakietem %s, ale nie znaleziono odpowiadającego "
+"jej obiektu metadanych (nie wyeksportowano?)"
 
-# methods/R/RClassUtils.R: 746
-# stop(gettextf("a prototype was supplied of class %s, but the class definition requires an object that is class %s",
-#                                     dQuote(class(prototype)),
-#                                     dQuote(dataPartClass)),
-#                            domain = NA)
+#. R/RClassUtils.R: gettextf("class %s is inheriting an inconsistent superclass structure from class %s, inconsistent with %s",     .dQ(className), .dQ(by), paste(.dQ(coni), collapse = ", "))
+#: R/RClassUtils.R:0
 msgid ""
-"a prototype was supplied of class %s, but the class definition requires an "
-"object that is class %s"
+"class %s is inheriting an inconsistent superclass structure from class %s, "
+"inconsistent with %s"
 msgstr ""
-"został dostarczony prototyp klasy %s, ale definicja klasy wymaga obiektu "
-"klasy %s"
+"klasa %s dziedziczy niespójną strukturę superklasy z klasy %s, niespójną z %s"
 
-# methods/R/RClassUtils.R: 768
-# stop(gettextf("slot %s in class %s currently defined (or inherited) as \"%s\", conflicts with an inherited definition in class %s",
-#                                     sQuote(dup),
-#                                     dQuote(name),
-#                                     elNamed(allProps, dup),
-#                                     dQuote(cl)),
-#                            domain = NA)
-msgid ""
-"slot %s in class %s currently defined (or inherited) as \"%s\", conflicts "
-"with an inherited definition in class %s"
-msgstr ""
-"gniazdo %s w klasie %s aktualnie zdefiniowane (lub odziedziczone) jako %s, "
-"jest w konflikcie z odziedziczoną definicją w klasie %s"
+#. R/as.R: gettextf("class %s is not defined in this environment", dQuote(to))
+#: R/as.R:0
+msgid "class %s is not defined in this environment"
+msgstr "klasa %s nie jest zdefiniowana w tym środowisku"
 
-# methods/R/RClassUtils.R: 779
-# stop(gettextf("class %s extends an undefined class (%s)",
-#                             dQuote(name), dQuote(cl)),
-#                    domain = NA)
-msgid "class %s extends an undefined class (%s)"
-msgstr "klasa %s rozszerza niezdefiniowaną klasę (%s)"
+#. R/SClasses.R: gettextf("class %s is sealed; 'resetClass' will have no effect",     dQuote(Class))
+#: R/SClasses.R:0
+msgid "class %s is sealed; 'resetClass' will have no effect"
+msgstr "klasa %s jest zamknięta; 'resetClass' nie będzie mieć efektu"
 
-# methods/R/RClassUtils.R: 801
-# stop(gettextf("%s is not eligible to be the data part of another class (must be a basic class or a virtual class with no slots)",
-#                             dQuote(dataPartClass)),
-#                    domain = NA)
+#. R/is.R: gettextf("class %s is sealed; new superclasses can not be defined, except by 'setClassUnion'",     dQuote(class1))
+#: R/is.R:0
 msgid ""
-"%s is not eligible to be the data part of another class (must be a basic "
-"class or a virtual class with no slots)"
+"class %s is sealed; new superclasses can not be defined, except by "
+"'setClassUnion'"
 msgstr ""
-"%s nie kwalifikuje się aby być częścią danych innej klasy (musi być "
-"podstawową klasą albo klasą wirtualną bez gniazd)"
+"klasa %s jest zamknięta; nowa superklasa nie może zostać zdefiniowana, za "
+"wyjątkiem 'setClassUnion'"
 
-# methods/R/RClassUtils.R: 808
-# warning("prototype is a list with named elements (could be ambiguous):  better to use function prototype() to avoid trouble.")
-msgid ""
-"prototype is a list with named elements (could be ambiguous):  better to use "
-"function prototype() to avoid trouble."
+#. R/SClasses.R: gettextf("class %s not found on %s; 'resetClass' will have no effect",     dQuote(Class), sQuote(getPackageName(where)))
+#: R/SClasses.R:0
+msgid "class %s not found on %s; 'resetClass' will have no effect"
 msgstr ""
-"prototyp jest listą z nazwanymi elementami (mogą być niejednoznaczne):  "
-"lepiej używać funkcji 'prototype()' aby uniknąć kłopotów."
+"klasa %s nie została znaleziona w %s; 'resetClass' nie będzie miał efektu"
 
-# methods/R/RClassUtils.R: 1137
-# stop(gettextf("the '%s' list for class %s, includes an undefined class %s",
-#                           if(superClassCase) "superClass" else "subClass",
-#                           dQuote(className),
-#                           dQuote(.className(by))),
-#                  domain = NA)
-msgid "the '%s' list for class %s, includes an undefined class %s"
-msgstr "lista '%s' dla klasy %s, zawiera w sobie niezdefiniowaną klasę %s"
+#. R/RClassUtils.R: stop("class cannot have both an ordinary and hidden data type")
+#: R/RClassUtils.R:0
+msgid "class cannot have both an ordinary and hidden data type"
+msgstr "klasa nie może mieć jednocześnie zwykłego oraz ukrytego typu danych"
 
-# methods/R/RClassUtils.R: 1186
-# warning(gettextf("class %s is inheriting an inconsistent superclass structure from class %s, inconsistent with %s",
-#                                  .dQ(className), .dQ(by),
-#                                  paste(.dQ(coni), collapse = ", ")),
-#                         call. = FALSE, domain = NA)
-msgid ""
-"class %s is inheriting an inconsistent superclass structure from class %s, "
-"inconsistent with %s"
+#. R/SClasses.R: gettextf("class definition cannot extend more than one of these data types: %s",     paste0("\"", type, "\"", collapse = ", "))
+#: R/SClasses.R:0
+msgid "class definition cannot extend more than one of these data types: %s"
 msgstr ""
-"klasa %s dziedziczy niespójną strukturę superklasy z klasy %s, niespójną z %s"
+"definicja klasy nie może rozszerzać więcej niż jednego z tych typów danych: "
+"%s"
+
+#. R/SClasses.R: gettextf("class definition for %s not found (no action taken)",     dQuote(Class))
+#: R/SClasses.R:0
+msgid "class definition for %s not found (no action taken)"
+msgstr "nie znaleziono definicji klasy dla %s (nie podjęto żadnej akcji)"
 
-# methods/R/RClassUtils.R: 1196
-# warning(gettextf("unable to find a consistent ordering of superclasses for class %s: order chosen is inconsistent with the superclasses of %s",
-#                            .dQ(className),
-#                            paste(.dQ(setdiff(newconflicts, conflicts)),
-#                                  collapse = ", ")),
-#                   call. = FALSE, domain = NA)
+#. R/MethodsListClass.R: gettextf("class generator function for class %s from package %s\n",     dQuote(object at className), sQuote(object at package))
+#: R/MethodsListClass.R:0
+msgid "class generator function for class %s from package %s"
+msgstr "funkcja generatora klas dla klasy %s z pakietu %s"
+
+#. R/refClass.R: gettextf("class must be a reference class representation or a character string; got an object of class %s",     dQuote(class(Class)))
+#: R/refClass.R:0
 msgid ""
-"unable to find a consistent ordering of superclasses for class %s: order "
-"chosen is inconsistent with the superclasses of %s"
+"class must be a reference class representation or a character string; got an "
+"object of class %s"
 msgstr ""
-"nie można znaleźć spójnego uporządkowania superklas dla klasy %s: wybrany "
-"porządek jest niespójny z superklasami %s"
+"klasa musi być referencyjną reprezentacją klasy lub łańcuchem tekstowym; "
+"otrzymano obiekt klasy %s"
 
-# methods/R/RClassUtils.R: 1338
-# stop("\"class\" is a reserved slot name and cannot be redefined")
-msgid "\"class\" is a reserved slot name and cannot be redefined"
+#. R/refClass.R: gettextf("code for methods in class %s was not checked for suspicious field assignments (recommended package %s not available?)",     dQuote(Class), sQuote("codetools"))
+#: R/refClass.R:0
+msgid ""
+"code for methods in class %s was not checked for suspicious field "
+"assignments (recommended package %s not available?)"
 msgstr ""
-"'class' jest zarezerwowaną nazwą gniazda i nie może zostać przedefiniowana"
+"kod dla metod w klasie %s nie był sprawdzony pod kątem podejrzanych "
+"przypisań pól (rekomendowany pakiet %s nie jest dostępny?)"
 
-# methods/R/RClassUtils.R: 1350
-# stop("Data part is undefined for general S4 object")
-msgid "Data part is undefined for general S4 object"
+#. R/RClassUtils.R: gettextf("conflicting definition of data part: .Data = %s, superclass implies %s",     dQuote(elNamed(properties, ".Data")), dQuote(dataPartClass))
+#: R/RClassUtils.R:0
+msgid "conflicting definition of data part: .Data = %s, superclass implies %s"
 msgstr ""
-"Część 'Data' (gniazdo '.Data') jest niezdefiniowana dla ogólnego obiektu S4"
-
-# methods/R/RClassUtils.R: 1361
-# stop(gettextf("no '.Data' slot defined for class %s",
-#                      dQuote(class(object))),
-#             domain = NA)
-msgid "no '.Data' slot defined for class %s"
-msgstr "nie zdefiniowano gniazda '.Data' dla klasy %s"
-
-# methods/R/RClassUtils.R: 1406
-# stop(gettextf("class %s does not have a data part (a .Data slot) defined",
-#                         dQuote(class(object))),
-#                domain = NA)
-msgid "class %s does not have a data part (a .Data slot) defined"
-msgstr "klasa %s nie ma zdefiniowanej części danych (gniazdo '.Data')"
+"sprzeczne definicje części danych: '.Data = %s', superklasa sugeruje %s"
 
-# methods/R/RClassUtils.R: 1460
-# warning(gettextf("more than one possible class for the data part: using %s rather than %s",
-#                   .dQ(prevDataPartClass), .dQ(value)), domain = NA)
-msgid "more than one possible class for the data part: using %s rather than %s"
+#. R/MethodsList.R: gettextf("default method must be a method definition, a primitive or NULL: got an object of class %s",     dQuote(class(method)))
+#: R/MethodsList.R:0
+msgid ""
+"default method must be a method definition, a primitive or NULL: got an "
+"object of class %s"
 msgstr ""
-"więcej niż jedna możliwa klasa dla części danych: używanie %s zamiast %s"
+"domyślna metoda musi być definicją metody, prymitywną funkcją lub wartością "
+"NULL: otrzymano obiekt klasy %s"
 
-# methods/R/RClassUtils.R: 1471
-# stop("class cannot have both an ordinary and hidden data type")
-msgid "class cannot have both an ordinary and hidden data type"
-msgstr "klasa nie może mieć jednocześnie zwykłego oraz ukrytego typu danych"
+#. R/refClass.R: stop("direct calls to callSuper() are invalid:  should only be called from another method")
+#: R/refClass.R:0
+msgid ""
+"direct calls to callSuper() are invalid:  should only be called from another "
+"method"
+msgstr ""
+"bezpośrednie wywołania 'callSuper()' są niepoprawne:  powinna być wywoływana "
+"tylko z innej metody"
 
-# methods/R/RClassUtils.R: 1737
-# stop(gettextf("a validity method must be a function of one argument, got an object of class %s",
-#                           dQuote(class(validity))),
-#                  domain = NA)
+#. R/trace.R: gettextf("does not seem to be a method table for generic %s in tracing environment",     sQuote(what))
+#: R/trace.R:0
 msgid ""
-"a validity method must be a function of one argument, got an object of class "
-"%s"
+"does not seem to be a method table for generic %s in tracing environment"
 msgstr ""
-"metoda poprawności musi być funkcją jednego argumentu, otrzymano obiekt "
-"klasy %s"
+"nie wygląda na tablicę metod dla funkcji ogólnej %s w śledzonym środowisku"
 
-# methods/R/RClassUtils.R: 1807
-# stop(gettextf("unable to find required package %s",
-#                         sQuote(package)),
-#                domain = NA)
-msgid "unable to find required package %s"
-msgstr "nie można znaleźć wymaganego pakietu %s"
+#. R/SClasses.R: gettextf("duplicate class names among superclasses: %s", paste(.dQ(includes[duplicated(includes)]),     collapse = ", "))
+#: R/SClasses.R:0
+msgid "duplicate class names among superclasses: %s"
+msgstr "powtórzone nazwy klasy pośród superklas: %s"
 
-# methods/R/RClassUtils.R: 1870
-# stop(gettextf("unable to find an environment containing class %s",
-# 			  dQuote(Class)),
-#                  domain = NA)
-msgid "unable to find an environment containing class %s"
-msgstr "nie można znaleźć środowiska zawierającego klasę %s"
+#. R/MethodsList.R: gettextf("duplicate element names in 'MethodsList' at level %d: %s",     level, paste("\"", unique(mnames[duplicated(mnames)]), "\"",         collapse = ", "))
+#: R/MethodsList.R:0
+msgid "duplicate element names in 'MethodsList' at level %d: %s"
+msgstr "powtórzone nazwy elementów w 'MethodsList' na poziomie %d: %s"
 
-# methods/R/RClassUtils.R: 1973
-# message(gettextf("Note: the specification for S3 class %s in package %s seems equivalent to one from package %s: not turning on duplicate class definitions for this class.",
-#                              dQuote(def at className),
-#                              sQuote(def at package),
-#                              sQuote(prev at package)),
-#                     domain = NA)
-msgid ""
-"Note: the specification for S3 class %s in package %s seems equivalent to "
-"one from package %s: not turning on duplicate class definitions for this "
-"class."
-msgstr ""
-"Uwaga: specyfikacja dla klasy S3 %s w pakiecie %s wydaje się być równoważna "
-"tej z pakietu %s i nie jest duplikatem definicji klasy dla tej klasy"
+#. R/SClasses.R: gettextf("duplicated slot names: %s", paste(sQuote(snames[duplicated(snames)]),     collapse = ", "))
+#: R/SClasses.R:0
+msgid "duplicated slot names: %s"
+msgstr "powtórzona nazwa gniazda: %s"
 
-# methods/R/RClassUtils.R: 1987
-# message(gettextf("Note: some superclasses of class %s in package %s have duplicate definitions.  This definition is not being treated as equivalent to that from package %s",
-#                                  dQuote(def at className),
-#                                  sQuote(def at package),
-#                                  sQuote(prev at package)),
-#                     domain = NA)
+#. R/MethodsList.R: gettextf("element %d at level %d (class %s) cannot be interpreted as a function or named list",     i, level, dQuote(class(eli)))
+#: R/MethodsList.R:0
 msgid ""
-"Note: some superclasses of class %s in package %s have duplicate "
-"definitions.  This definition is not being treated as equivalent to that "
-"from package %s"
+"element %d at level %d (class %s) cannot be interpreted as a function or "
+"named list"
 msgstr ""
-"Uwaga: niektóre superklasy klasy %s w pakiecie %s posiadają powtórzone "
-"definicje. Ta definicja nie jest traktowana jako równoważna tej z pakietu %s"
+"element %d na poziomie %d (klasa %s) nie może być interpretowany jak funkcja "
+"lub nazwana lista"
 
-# methods/R/RClassUtils.R: 2012
-# message(gettextf("Note: the specification for class %s in package %s seems equivalent to one from package %s: not turning on duplicate class definitions for this class.",
-#                          dQuote(def at className),
-#                          sQuote(def at package),
-#                          sQuote(prev at package)),
-#                     domain = NA)
-msgid ""
-"Note: the specification for class %s in package %s seems equivalent to one "
-"from package %s: not turning on duplicate class definitions for this class."
-msgstr ""
-"Uwaga: specyfikacja dla klasy S3 %s w pakiecie %s wydaje się być równoważna "
-"tej z pakietu %s i nie jest duplikatem definicji klasy dla tej klasy"
+#. R/SClasses.R: gettextf("element %d of the representation was not a single character string",     i)
+#: R/SClasses.R:0
+msgid "element %d of the representation was not a single character string"
+msgstr "element %d reprezentacji nie był pojedynczym łańcuchem tekstowym"
 
-# methods/R/RClassUtils.R: 2075
-# warning(gettextf("undefined subclass %s of class %s; definition not updated",
-#                              .dQ(what), .dQ(def at className)))
-msgid "undefined subclass %s of class %s; definition not updated"
+#. R/SClasses.R: gettextf("error in contained classes (%s) for class %s and unable to remove definition from %s",     msg, dQuote(Class), sQuote(getPackageName(where)))
+#: R/SClasses.R:0
+msgid ""
+"error in contained classes (%s) for class %s and unable to remove definition "
+"from %s"
 msgstr ""
-"niezdefiniowana podklasa %s klasy %s; definicja nie została zaktualizowana"
+"błąd w zawartych klasach (%s) dla klasy %s przez co nie można usunąć "
+"definicji z %s"
 
-# methods/R/RClassUtils.R: 2112
-# warning(gettextf("subclass %s of class %s is not local and cannot be updated for new inheritance information; consider setClassUnion()",
-#                            .dQ(what), .dQ(class)),
-#                   call. = FALSE, domain = NA)
+#. R/SClasses.R: gettextf("error in contained classes (%s) for class %s and unable to restore previous definition from %s",     msg, dQuote(Class), sQuote(getPackageName(where)))
+#: R/SClasses.R:0
 msgid ""
-"subclass %s of class %s is not local and cannot be updated for new "
-"inheritance information; consider setClassUnion()"
+"error in contained classes (%s) for class %s and unable to restore previous "
+"definition from %s"
 msgstr ""
-"podklasa %s klasy %s nie jest lokalna i nie może być zaktualizowana dla "
-"nowych dziedziczonych informacji; rozważ 'setClassUnion()'"
+"błąd w zawartych klasach (%s) dla klasy %s przez co nie można przywrócić "
+"poprzedniej definicji z %s"
 
-# methods/R/RClassUtils.R: 2119
-# warning(gettextf("no definition of inheritance from %s to %s, though the relation was implied by the setIs() from %s",
-#                            .dQ(what), .dQ(def2 at className), .dQ(class)),
-#                   call. = FALSE, domain = NA)
+#. R/SClasses.R: gettextf("error in contained classes (%s) for class %s; class definition removed from %s",     msg, dQuote(Class), sQuote(getPackageName(where)))
+#: R/SClasses.R:0
 msgid ""
-"no definition of inheritance from %s to %s, though the relation was implied "
-"by the setIs() from %s"
+"error in contained classes (%s) for class %s; class definition removed from "
+"%s"
 msgstr ""
-"brak definicji dziedziczenia z %s do %s mimo, że relacja została "
-"zasugerowana przez 'setIs()' z %s"
+"błąd w zawartych klasach (%s) dla klasy %s; definicja klasy została usunięta "
+"z %s"
 
-# methods/R/RClassUtils.R: 2263
-# stop("argument 'includeSubclasses' must be a logical, either one value or a vector of the same length as argument 'classes'")
+#. R/SClasses.R: gettextf("error in contained classes (%s) for class %s; previous definition restored to %s",     msg, dQuote(Class), sQuote(getPackageName(where)))
+#: R/SClasses.R:0
 msgid ""
-"argument 'includeSubclasses' must be a logical, either one value or a vector "
-"of the same length as argument 'classes'"
+"error in contained classes (%s) for class %s; previous definition restored "
+"to %s"
 msgstr ""
-"argument 'includeSubclasses' musi być argumentem logicznym posiadającym "
-"jedną wartość lub wektorem o tej samej długości jak argument 'classes'"
-
-# methods/R/RClassUtils.R: 2272
-# stop("argument 'abbreviate' must be 0, 1, 2, or 3")
-msgid "argument 'abbreviate' must be 0, 1, 2, or 3"
-msgstr "argument 'abbreviate' musi mieć wartość 0, 1, 2, lub 3"
+"błąd w zawartych klasach (%s) dla klasy %s; poprzednia definicja została "
+"przywrócona w %s"
 
-# methods/R/RClassUtils.R: 2306
-# stop(gettextf("needed the supplied labels vector of length %d, got %d",
-#                               length(nodes), length(short)), domain = NA)
-msgid "needed the supplied labels vector of length %d, got %d"
-msgstr "potrzebowano dostarczyć wektora etykiet o długości %d, otrzymano %d"
+#. R/RMethodUtils.R: gettextf("error in load action %s for package %s: %s: %s", aname,     getPackageName(where), callString, value$message)
+#: R/RMethodUtils.R:0
+msgid "error in load action %s for package %s: %s: %s"
+msgstr "błąd w akcji ładowania %s dla pakietu %s: %s: %s"
 
-# methods/R/RMethodUtils.R: 36
-# warning(gettextf("the function being used as %s in making a generic function for %s is currently traced; the function used will have tracing removed",
-#                              what,
-#                              sQuote(f)),
-#                     domain = NA)
+#. R/Methods.R: gettextf("error in updating S4 generic function %s; the function definition is not an S4 generic function (class %s)",     sQuote(f), dQuote(class(fdef)))
+#: R/Methods.R:0
 msgid ""
-"the function being used as %s in making a generic function for %s is "
-"currently traced; the function used will have tracing removed"
+"error in updating S4 generic function %s; the function definition is not an "
+"S4 generic function (class %s)"
 msgstr ""
-"funkcja użyta jako %s podczas tworzenia ogólnej funkcji dla %s jest "
-"aktualnie śledzona; użyta funkcja będzie miała usunięte śledzenie"
+"błąd w aktualizacji ogólnej funkcji S4 %s; definicja funkcji nie jest ogólną "
+"funkcją S4 (klasa %s)"
 
-# methods/R/RMethodUtils.R: 47
-# stop(gettextf("must supply either a generic function or a function as default for %s",
-#                           sQuote(f)),
-#                  domain = NA)
-msgid "must supply either a generic function or a function as default for %s"
+#. R/RMethodUtils.R: gettextf("expanding the signature to include omitted arguments in definition: %s",     paste(sigNames[omittedSig], "= \"missing\"", collapse = ", "))
+#: R/RMethodUtils.R:0
+msgid "expanding the signature to include omitted arguments in definition: %s"
 msgstr ""
-"potrzeba dostarczyć albo ogólną funkcję albo funkcję jako domyślną dla %s"
+"rozszerzanie sygnatury aby uwzględnić pominięte argumenty w definicji: %s"
+
+#. R/Methods.R: gettextf("expected a non-empty character string for argument name")
+#. R/addedFunctions.R: gettextf("expected a non-empty character string for argument name")
+#: R/Methods.R:0 R/addedFunctions.R:0
+msgid "expected a non-empty character string for argument name"
+msgstr "oczekiwano niepustego łańcucha tekstowego dla nazwy argumentu"
+
+#. R/oldClass.R: gettextf("explicit coercion of old-style class (%s) is not defined",     paste(class(from), collapse = ", "))
+#: R/oldClass.R:0
+msgid "explicit coercion of old-style class (%s) is not defined"
+msgstr "nie zdefiniowano jawnego przekształcenia klasy starego stylu (%s)"
 
-# methods/R/RMethodUtils.R: 72
-# stop(gettextf("the %s argument must be NULL or a generic function object; got an object of class %s",
-#                       sQuote("genericFunction"),
-#                       dQuote(class(genericFunction))),
-#              domain = NA)
+#. R/oldClass.R: gettextf("explicit replacement not defined for as(x, \"%s\") <- value for old-style class %s",     to, dQuote(class(from)[1L]))
+#: R/oldClass.R:0
 msgid ""
-"the %s argument must be NULL or a generic function object; got an object of "
+"explicit replacement not defined for as(x, \"%s\") <- value for old-style "
 "class %s"
 msgstr ""
-"argument %s musi być wartością NULL lub obiektem ogólnej funkcji; otrzymano "
-"obiekt klasy %s"
+"nie zdefiniowano jawnej zamiany dla 'as(x, \"%s\") <- value' dla klasy "
+"starego stylu %s"
 
-# methods/R/RMethodUtils.R: 96
-# stop("no suitable arguments to dispatch methods in this function")
-# methods/R/RMethodUtils.R: 174
-# stop("no suitable arguments to dispatch methods in this function")
-msgid "no suitable arguments to dispatch methods in this function"
-msgstr "brak odpowiednich argumentów do rozdzielenia metod w tej funkcji"
+#. R/methodsTable.R: stop("failed to find expected group generic function: ", what)
+#: R/methodsTable.R:0
+msgid "failed to find expected group generic function:"
+msgstr "nie udało się znaleźć oczekiwanej funkcji grupy ogólnej:"
 
-# methods/R/RMethodUtils.R: 209
-# stop(gettextf("special function %s is not permitted to have methods",
-#                           sQuote(f)),
-#                  domain = NA)
-msgid "special function %s is not permitted to have methods"
-msgstr "specjalna funkcja %s nie ma prawa posiadać metod"
-
-# methods/R/RMethodUtils.R: 213
-# warning(gettextf("special function %s has no known argument list; will assume '(x, ...)'",
-#                              sQuote(f)),
-#                     domain = NA)
-msgid "special function %s has no known argument list; will assume '(x, ...)'"
-msgstr ""
-"specjalna funkcja %s nie ma znanej listy argumentów; zostanie założone "
-"'(x, ...)'"
-
-# methods/R/RMethodUtils.R: 220
-# message(gettextf("making a generic for special function %s",
-#                              sQuote(f)),
-#                     domain = NA)
-msgid "making a generic for special function %s"
-msgstr "tworzenie ogólnej funkcji dla funkcji specjalnej %s"
+#. R/refClass.R: gettextf("field %s is already locked", sQuote(what))
+#: R/refClass.R:0
+msgid "field %s is already locked"
+msgstr "pole %s jest już zablokowane"
 
-# methods/R/RMethodUtils.R: 244
-# gettextf("invalid call in method dispatch to '%s' (no default method)", name)
-msgid "invalid call in method dispatch to '%s' (no default method)"
+#. R/refClass.R: gettextf("field %s of class %s has a non-default binding and cannot be locked",     sQuote(what), dQuote(className))
+#: R/refClass.R:0
+msgid "field %s of class %s has a non-default binding and cannot be locked"
 msgstr ""
-"niepoprawne wywołanie w metodzie rozdziału do %s (brak domyślnej metody)"
+"pole %s klasy %s posiada niedomyślne powiązanie i nie może zostać zablokowane"
 
-# methods/R/RMethodUtils.R: 313
-# gettextf("in method for %s with signature %s: ", sQuote(f), sQuote(msig))
-msgid "in method for %s with signature %s:"
-msgstr "W metodzie dla %s z sygnaturą %s:"
+#. R/refClass.R: gettextf("field %s was supplied as an object of class %s; must be a class name or a binding function",     sQuote(thisName), dQuote(class(thisField)))
+#: R/refClass.R:0
+msgid ""
+"field %s was supplied as an object of class %s; must be a class name or a "
+"binding function"
+msgstr ""
+"pole %s zostało dostarczone jako obiekt klasy %s; musi być nazwa klasy lub "
+"funkcja wiążąca"
 
-# methods/R/RMethodUtils.R: 326
-# stop(.renderSignature(f, signature),
-#              "formal arguments in method and generic do not appear in the same order",
-#              call. = FALSE)
-# methods/R/RMethodUtils.R: 390
-# stop(.renderSignature(generic at generic, signature),
-#              "formal arguments in method and generic do not appear in the same order",
-#              call. = FALSE)
-msgid "formal arguments in method and generic do not appear in the same order"
+#. R/Methods.R: gettextf("first argument should be the names of one of more generic functions (got object of class %s)",     dQuote(class(f)))
+#: R/Methods.R:0
+msgid ""
+"first argument should be the names of one of more generic functions (got "
+"object of class %s)"
 msgstr ""
-"formalne argumenty w metodzie i ogólnej funkcji nie pojawiają się w tej "
-"samej kolejności"
+"pierwszy argument powinien być nazwami jeden lub więcej ogólnych funkcji "
+"(otrzymano obiekt klasy %s)"
 
-# methods/R/RMethodUtils.R: 346
-# stop(.renderSignature(f, sig0),
-#              gettextf("formal arguments (%s) omitted in the method definition cannot be in the signature", bad2),
-#              call. = TRUE, domain = NA)
+#. R/RMethodUtils.R: gettextf("formal arguments (%s) omitted in the method definition cannot be in the signature",     bad2)
+#: R/RMethodUtils.R:0
 msgid ""
 "formal arguments (%s) omitted in the method definition cannot be in the "
 "signature"
@@ -1466,153 +1226,80 @@ msgstr ""
 "formalne argumenty (%s) pominięte w definicji metody nie mogą pojawić się w "
 "sygnaturze"
 
-# methods/R/RMethodUtils.R: 352
-# message("Note: ", .renderSignature(f, sig0),
-#                  gettextf("expanding the signature to include omitted arguments in definition: %s",
-#                           paste(sigNames[omittedSig], "= \"missing\"",collapse = ", ")))
-msgid "expanding the signature to include omitted arguments in definition: %s"
-msgstr ""
-"rozszerzanie sygnatury aby uwzględnić pominięte argumenty w definicji: %s"
-
-# methods/R/RMethodUtils.R: 379
-# stop(gettextf("methods can add arguments to the generic %s only if '...' is an argument to the generic", sQuote(generic at generic)),
-#              call. = TRUE)
-msgid ""
-"methods can add arguments to the generic %s only if '...' is an argument to "
-"the generic"
-msgstr ""
-"metody mogą dodawać argumenty do ogólnej funkcji %s tylko jeśli '...' jest "
-"argumentem dla ogólnej funkcji"
+#. R/Methods.R: gettext("formal arguments differ (in default values?)")
+#: R/Methods.R:0
+msgid "formal arguments differ (in default values?)"
+msgstr "formalne argumenty różnią się (w wartościach domyślnych?)"
 
-# methods/R/RMethodUtils.R: 407
-# stop(gettextf("arguments (%s) after '...' in the generic must appear in the method, in the same place at the end of the argument list",
-# 			  paste(trailingArgs, collapse=", ")),
-#                  call. = TRUE, domain = NA)
-msgid ""
-"arguments (%s) after '...' in the generic must appear in the method, in the "
-"same place at the end of the argument list"
-msgstr ""
-"argumenty (%s) po '...' w ogólnej funkcji muszą pojawić się w metodzie w tym "
-"samym miejscu na końcu listy argumentów"
+#. R/Methods.R: gettextf("formal arguments differ: (%s), (%s)", paste(a1, collapse = ", "),     paste(a2, collapse = ", "))
+#: R/Methods.R:0
+msgid "formal arguments differ: (%s), (%s)"
+msgstr "formalne argumenty różnią się: (%s), (%s)"
 
-# methods/R/RMethodUtils.R: 452
-# stop("argument 'f' must be a string, generic function, or primitive: got an ordinary function")
-msgid ""
-"argument 'f' must be a string, generic function, or primitive: got an "
-"ordinary function"
+#. R/RMethodUtils.R: stop(.renderSignature(f, signature), "formal arguments in method and generic do not appear in the same order",     call. = FALSE)
+#. R/RMethodUtils.R: stop(.renderSignature(generic at generic, signature), "formal arguments in method and generic do not appear in the same order",     call. = FALSE)
+#: R/RMethodUtils.R:0
+msgid "formal arguments in method and generic do not appear in the same order"
 msgstr ""
-"argument 'f' musi być łańcuchem, ogólną funkcją, lub funkcją prymitywną: "
-"otrzymano zwykłą funkcję"
+"formalne argumenty w metodzie i ogólnej funkcji nie pojawiają się w tej "
+"samej kolejności"
 
-# methods/R/RMethodUtils.R: 463
-# stop(gettextf("methods cannot be defined for the primitive function %s",
-#                               sQuote(f)), domain = NA)
-msgid "methods cannot be defined for the primitive function %s"
-msgstr "metody nie mogą być zdefiniowane dla prymitywnej funkcji %s"
+#. R/Methods.R: gettextf("function %s appears to be a generic function, but with generic name %s",     sQuote(f), sQuote(gen))
+#: R/Methods.R:0
+msgid "function %s appears to be a generic function, but with generic name %s"
+msgstr "funkcja %s wygląda na ogólną funkcję ale z ogólną nazwą %s"
 
-# methods/R/RMethodUtils.R: 485
-# stop(gettextf("no generic function found for %s",
-#                           sQuote(f)),
-#                  domain = NA)
-msgid "no generic function found for %s"
-msgstr "nie znaleziono ogólnej funkcji dla %s"
+#. R/Methods.R: stop("function supplied as argument 'f' must be a generic")
+#: R/Methods.R:0
+msgid "function supplied as argument 'f' must be a generic"
+msgstr "funkcja dostarczona jako argument 'f' musi być ogólną funkcją"
 
-# methods/R/RMethodUtils.R: 505
-# message("Empty function name in .getGeneric")
-msgid "Empty function name in .getGeneric"
-msgstr "Pusta nazwa funkcji w '.getGeneric'"
-
-# methods/R/RMethodUtils.R: 813
-# warning(sprintf("package %s seems to have out-of-date methods; need to reinstall from source",
-#                          sQuote(getPackageName(where[[1L]]))))
-msgid ""
-"package %s seems to have out-of-date methods; need to reinstall from source"
-msgstr ""
-"pakiet %s wydaje się mieć nieaktualne metody; potrzeba przeinstalować ze "
-"źródła"
+#. R/Methods.R: gettextf("generic function %s not found for removal", sQuote(f))
+#: R/Methods.R:0
+msgid "generic function %s not found for removal"
+msgstr "nie znaleziono ogólnej funkcji %s do usunięcia"
 
-# methods/R/RMethodUtils.R: 910
-# warning(gettextf("no methods found for %s; cacheGenericsMetaData() will have no effect",
-# 			 sQuote(f)),
-# 		domain = NA)
-msgid "no methods found for %s; cacheGenericsMetaData() will have no effect"
-msgstr ""
-"nie znaleziono metod dla %s; 'cacheGenericsMetaData()' nie będzie miał efektu"
+#. R/Methods.R: gettextf("generic function supplied was not created for %s",     sQuote(name))
+#: R/Methods.R:0
+msgid "generic function supplied was not created for %s"
+msgstr "dostarczona funkcja ogólna nie została utworzona dla %s"
 
-# methods/R/RMethodUtils.R: 1086
-# stop(gettextf("invalid value from generic function %s, class %s, expected %s",
-#                       sQuote(fname),
-#                       dQuote(class(object)),
-#                       paste(dQuote(classes), collapse = " or ")),
-#              domain = NA)
-msgid "invalid value from generic function %s, class %s, expected %s"
-msgstr ""
-"niepoprawna wartość z ogólnej funkcji %s, klasa %s, oczekiwano jednego z %s"
+#. R/Methods.R: gettextf("generic names differ: %s, %s", .dQ(f1 at generic), .dQ(f2 at generic))
+#: R/Methods.R:0
+msgid "generic names differ: %s, %s"
+msgstr "ogólne nazwy różnią się: %s, %s"
 
-# methods/R/RMethodUtils.R: 1182
-# warning(gettextf("the body of the generic function for %s calls 'standardGeneric' to dispatch on a different name (\"%s\")!",
-#                                  sQuote(fname),
-#                                  paste(as.character(x[[2L]]), collapse = "\n")),
-#                         domain = NA)
-msgid ""
-"the body of the generic function for %s calls 'standardGeneric' to dispatch "
-"on a different name (\"%s\")!"
-msgstr ""
-"ciało ogólnej funkcji dla %s wywołuje 'standardGeneric' by rozdzielić pod "
-"inna nazwą ('%s')!"
+#. R/RMethodUtils.R: stop("got a negative maximum number of frames to look at")
+#: R/RMethodUtils.R:0
+msgid "got a negative maximum number of frames to look at"
+msgstr "utrzymano ujemną maksymalną liczbę ramek"
 
-# methods/R/RMethodUtils.R: 1260
-# stop(gettextf("trying to change the formal arguments in %s in an object of class %s; expected a function definition",
-#                       msg, dQuote(class(def))),
-#              domain = NA)
-msgid ""
-"trying to change the formal arguments in %s in an object of class %s; "
-"expected a function definition"
-msgstr ""
-"próba zmiany formalnych argumentów w %s w obiekcie klasy %s; oczekiwano "
-"definicji funkcji"
+#. R/Methods.R: gettextf("groups differ: %s, %s", .dQ(gpString(f1 at group)), .dQ(gpString(f2 at group)))
+#: R/Methods.R:0
+msgid "groups differ: %s, %s"
+msgstr "grupy różnią się: %s, %s"
 
-# methods/R/RMethodUtils.R: 1264
-# stop(gettextf("trying to change the formal arguments in %s, but getting the new formals from an object of class %s; expected a function definition",
-#                       msg, dQuote(class(def))),
-#              domain = NA)
+#. R/Methods.R: gettextf("if the 'def' argument is supplied, it must be a function that calls standardGeneric(\"%s\") or is the default",     name)
+#: R/Methods.R:0
 msgid ""
-"trying to change the formal arguments in %s, but getting the new formals "
-"from an object of class %s; expected a function definition"
+"if the 'def' argument is supplied, it must be a function that calls "
+"standardGeneric(\"%s\") or is the default"
 msgstr ""
-"próba zmiany formalnych argumentów w %s, ale otrzymano nowe argumenty "
-"formalne z obiektu klasy %s; oczekiwano definicji funkcji"
+"jeśli dostarczono argument 'def', musi być funkcją, która wywołuje "
+"standardGeneric(\"%s\") lub musi być funkcją domyślną"
 
-# methods/R/RMethodUtils.R: 1270
-# stop(gettextf("trying to change the formal arguments in %s, but the number of existing arguments is less than the number of new arguments: (%s) vs (%s)",
-#                       msg, paste0("\"", old, "\"", collapse=", "),
-#                       paste0("\"", new, "\"", collapse=", ")),
-#              domain = NA)
-msgid ""
-"trying to change the formal arguments in %s, but the number of existing "
-"arguments is less than the number of new arguments: (%s) vs (%s)"
-msgstr ""
-"próba zmiany formalnych argumentów w %s, ale liczba istniejących argumentów "
-"jest mniejsza niż liczba nowych argumentów: (%s) względem (%s)"
+#. R/MethodsList.R: gettextf("in %s: use of \"MethodsList\" metadata objects is defunct.",     deparse(this))
+#: R/MethodsList.R:0
+msgid "in %s: use of \"MethodsList\" metadata objects is defunct."
+msgstr "w %s: użycie obiektów metadanych \"MethodsList\" zostało zlikwidowane."
 
-# methods/R/RMethodUtils.R: 1275
-# warning(gettextf("trying to change the formal arguments in %s, but the number of existing arguments is greater than the number of new arguments (the extra arguments won't be used): (%s) vs (%s)",
-#                          msg, paste0("\"", old, "\"", collapse=", "),
-#                          paste0("\"", new, "\"", collapse=", ")),
-#                 domain = NA)
-msgid ""
-"trying to change the formal arguments in %s, but the number of existing "
-"arguments is greater than the number of new arguments (the extra arguments "
-"won't be used): (%s) vs (%s)"
-msgstr ""
-"próba zmiany formalnych argumentów w %s, ale liczba istniejących argumentów "
-"jest większa niż liczba nowych argumentów (dodatkowe argumenty nie będą "
-"użyte): (%s) względem (%s)"
+#. R/MethodsList.R: gettextf("in %s: use of \"MethodsList\" metadata objects is deprecated.",     deparse(this))
+#: R/MethodsList.R:0
+msgid "in %s: use of \"MethodsList\" metadata objects is deprecated."
+msgstr "w %s: użycie obiektów metadanych \"MethodsList\" jest przestarzałe."
 
-# methods/R/RMethodUtils.R: 1290
-# stop(gettextf("in changing formal arguments in %s, some of the old names are not in fact arguments: %s",
-# 		      msg, paste0("\"", old[is.na(match(old, names(dlist)))], "\"", collapse=", ")),
-# 	     domain = NA)
+#. R/RMethodUtils.R: gettextf("in changing formal arguments in %s, some of the old names are not in fact arguments: %s",     msg, paste0("\"", old[is.na(match(old, names(dlist)))], "\"",         collapse = ", "))
+#: R/RMethodUtils.R:0
 msgid ""
 "in changing formal arguments in %s, some of the old names are not in fact "
 "arguments: %s"
@@ -1620,1660 +1307,1293 @@ msgstr ""
 "podczas zmiany formalnych argumentów w %s, niektóre ze starych nazw nie są "
 "tak naprawdę argumentami: %s"
 
-# methods/R/RMethodUtils.R: 1351
-# stop("got a negative maximum number of frames to look at")
-msgid "got a negative maximum number of frames to look at"
-msgstr "utrzymano ujemną maksymalną liczbę ramek"
-
-# methods/R/RMethodUtils.R: 1455
-# warning(gettextf("%s is not a generic function (or not visible here)",
-#                          sQuote(f)),
-#                 domain = NA)
-msgid "%s is not a generic function (or not visible here)"
-msgstr "%s nie jest ogólną funkcją (albo nie jest widoczna)"
-
-# methods/R/RMethodUtils.R: 1480
-# stop(gettextf("invalid element in the \"groupMembers\" slot (class %s)",
-# 				  dQuote(class(x))),
-#                          domain = NA)
-msgid "invalid element in the \"groupMembers\" slot (class %s)"
-msgstr "niepoprawny element w gnieździe \"groupMembers\" (klasa %s)"
-
-# methods/R/RMethodUtils.R: 1569
-# stop("argument f must be a generic function with signature \"...\"")
-msgid "argument f must be a generic function with signature \"...\""
-msgstr "argument 'f' musi być ogólną funkcją z sygnaturą '...'"
-
-# methods/R/RMethodUtils.R: 1587
-# stop(gettextf("no method or default matching the \"...\" arguments in %s",
-#                       deparse(sys.call(sys.parent()), nlines = 1)), domain = NA)
-msgid "no method or default matching the \"...\" arguments in %s"
-msgstr "brak metody lub domyślnego dopasowania argumentów \"...\" w %s"
-
-# methods/R/RMethodUtils.R: 1619
-# warning(gettextf("multiple direct matches: %s; using the first of these", .pasteC(classes)), domain = NA)
-msgid "multiple direct matches: %s; using the first of these"
-msgstr "wielokrotne bezpośrednie dopasowania: %s; używanie pierwszego z nich"
-
-# methods/R/RMethodUtils.R: 1665
-# warning(gettextf("multiple equivalent inherited matches: %s; using the first of these",
-#                              .pasteC(classes)), domain = NA)
-msgid "multiple equivalent inherited matches: %s; using the first of these"
-msgstr ""
-"wiele równoważnie dziedziczonych dopasowań: %s; używanie pierwszego z nich"
-
-# methods/R/RMethodUtils.R: 1687
-# gettextf("single string; got an object of class %s",
-#                  dQuote(class(what)[[1L]]))
-msgid "single string; got an object of class %s"
-msgstr "pojedynczy łańcuch; otrzymano obiekt klasy %s"
-
-# methods/R/RMethodUtils.R: 1747
-# gettextf("multiple definitions exist for class %s, but the supplied package (%s) is not one of them (%s)",
-#                                    dQuote(classi), sQuote(pkgi),
-#                                    paste(dQuote(get(classi, envir = .classTable)), collapse = ", "))
+#. R/RClassUtils.R: gettextf("in constructing the prototype for class %s, slots in prototype and not in class: %s",     dQuote(className), paste(extra, collapse = ", "))
+#: R/RClassUtils.R:0
 msgid ""
-"multiple definitions exist for class %s, but the supplied package (%s) is "
-"not one of them (%s)"
+"in constructing the prototype for class %s, slots in prototype and not in "
+"class: %s"
 msgstr ""
-"istnieją wielokrotne definicje dla klasy %s, ale dostarczony pakiet (%s) nie "
-"jest jedną z nich (%s)"
+"podczas konstruowaniu prototypu dla klasy %s, gniazda są w prototypie a nie "
+"w klasie: %s"
 
-# methods/R/RMethodUtils.R: 1754
-# gettextf("multiple definitions exist for class %s; should specify one of them (%s), e.g. by className()",
-#                                    dQuote(classi),
-#                                    paste(dQuote(get(classi, envir = .classTable)), collapse = ", "))
+#. R/RClassUtils.R: gettextf("in constructing the prototype for class %s: prototype has class %s, but the data part specifies class %s",     dQuote(className), dQuote(.class1(prototype)), dQuote(dataPartClass))
+#: R/RClassUtils.R:0
 msgid ""
-"multiple definitions exist for class %s; should specify one of them (%s), e."
-"g. by className()"
+"in constructing the prototype for class %s: prototype has class %s, but the "
+"data part specifies class %s"
 msgstr ""
-"istnieją wielokrotne definicje dla klasy %s; powinieneś określić jedną z "
-"nich (%s), na przykład poprzez 'className()'"
-
-# methods/R/RMethodUtils.R: 1769
-# gettextf("no definition found for class %s",
-#                                  dQuote(classi))
-msgid "no definition found for class %s"
-msgstr "nie znaleziono definicji dla klasy %s"
-
-# methods/R/RMethodUtils.R: 1816
-# warning("trying to execute load actions without 'methods' package")
-msgid "trying to execute load actions without 'methods' package"
-msgstr "próba wykonania akcji ładowania bez pakietu 'methods'"
-
-# methods/R/RMethodUtils.R: 1822
-# warning(gettextf("missing function for load action: %s", what))
-msgid "missing function for load action: %s"
-msgstr "brakująca funkcja dla akcji ładowania: %s"
-
-# methods/R/RMethodUtils.R: 1830
-# stop(gettextf("error in load action %s for package %s: %s: %s",
-#                           aname, getPackageName(where), callString, value$message))
-msgid "error in load action %s for package %s: %s: %s"
-msgstr "błąd w akcji ładowania %s dla pakietu %s: %s: %s"
-
-# methods/R/RMethodUtils.R: 1855
-# stop(gettextf("non-function action: %s",
-#                           sQuote(fname)),
-#                  domain = NA)
-msgid "non-function action: %s"
-msgstr "akcja nie-funkcji: %s"
-
-# methods/R/RMethodUtils.R: 1859
-# stop(gettextf("action function %s has no arguments, should have at least 1",
-#                           sQuote(fname)),
-#                  domain = NA)
-msgid "action function %s has no arguments, should have at least 1"
-msgstr "funkcja akcji %s nie posiada argumentów, a powinna mieć przynajmniej 1"
-
-# methods/R/RMethodUtils.R: 1910
-# warning(gettextf("some actions are missing: %s",
-#                              paste(actions[!allExists], collapse =", ")),
-#                     domain = NA)
-msgid "some actions are missing: %s"
-msgstr "brakuje niektórych akcji: %s"
-
-# methods/R/SClasses.R: 29
-# stop(gettextf("%s has a sealed class definition and cannot be redefined",
-#                       dQuote(Class)),
-#              domain = NA)
-msgid "%s has a sealed class definition and cannot be redefined"
-msgstr "Klasa %s ma zablokowaną definicję klasy i nie może być przedefiniowana"
+"podczas konstruowaniu prototypu dla klasy %s: prototyp posiada klasę %s, ale "
+"dane określają klasę %s"
 
-# methods/R/SClasses.R: 36
-# stop("Argument \"representation\" cannot be used if argument \"slots\" is supplied")
+#. R/RClassUtils.R: gettextf("in defining class %s, the supplied data part class, %s is not valid (must be a basic class or a virtual class combining basic classes)",     dQuote(name), dQuote(dataPartClass))
+#: R/RClassUtils.R:0
 msgid ""
-"Argument \"representation\" cannot be used if argument \"slots\" is supplied"
+"in defining class %s, the supplied data part class, %s is not valid (must be "
+"a basic class or a virtual class combining basic classes)"
 msgstr ""
-"Argument 'representation' nie może być użyty, jeśli dostarczony został "
-"argument 'slots'"
+"podczas definiowania klasy %s, dostarczona część danych klasy, %s nie jest "
+"poprawna (musi być podstawową klasą lub klasą wirtualną łączącą podstawowe "
+"klasy)"
 
-# methods/R/SClasses.R: 47
-# stop("only arguments 'Class' and 'where' can be supplied when argument 'representation' is a 'classRepresentation' object")
+#. R/RClassUtils.R: gettextf("in definition of class %s, information for superclass %s is of class %s (expected \"SClassExtension\")",     dQuote(ClassDef at className), dQuote(what), dQuote(class(exti)))
+#: R/RClassUtils.R:0
 msgid ""
-"only arguments 'Class' and 'where' can be supplied when argument "
-"'representation' is a 'classRepresentation' object"
+"in definition of class %s, information for superclass %s is of class %s "
+"(expected \"SClassExtension\")"
 msgstr ""
-"tylko argumenty 'Class' oraz 'where' mogą być dostarczone gdy argument "
-"'representation' jest obiektem klasy \"classRepresentation\""
+"w definicji klasy %s, informacja dla superklasy %s jest klasy %s (oczekiwano "
+"'SClassExtension')"
 
-# methods/R/SClasses.R: 86
-# stop(gettextf("error in contained classes (%s) for class %s and unable to remove definition from %s",
-#                               msg, dQuote(Class),
-#                               sQuote(getPackageName(where))),
-#                      domain = NA)
+#. R/RClassUtils.R: gettextf("in making the prototype for class %s elements of the prototype failed to match the corresponding slot class: %s",     dQuote(className), paste(pnames[check], "(class", .dQ(slotDefs[match(pnames[check],         slotNames)]), ")", collapse = ", "))
+#: R/RClassUtils.R:0
 msgid ""
-"error in contained classes (%s) for class %s and unable to remove definition "
-"from %s"
+"in making the prototype for class %s elements of the prototype failed to "
+"match the corresponding slot class: %s"
 msgstr ""
-"błąd w zawartych klasach (%s) dla klasy %s przez co nie można usunąć "
-"definicji z %s"
+"podczas tworzenia prototypu dla klasy %s elementy prototypu nie zgodziły się "
+"z odpowiadającymi gniazdami klasy: %s"
 
-# methods/R/SClasses.R: 91
-# stop(gettextf("error in contained classes (%s) for class %s; class definition removed from %s",
-#                               msg, dQuote(Class),
-#                               sQuote(getPackageName(where))),
-#                      domain = NA)
+#. R/RMethodUtils.R: gettextf("in method for %s with signature %s: ", sQuote(f), sQuote(msig))
+#: R/RMethodUtils.R:0
+msgid "in method for %s with signature %s:"
+msgstr "W metodzie dla %s z sygnaturą %s:"
+
+#. R/oldClass.R: gettextf("inconsistent old-style class information for %s (maybe mixing old and new classes?)",     dQuote(cl))
+#: R/oldClass.R:0
 msgid ""
-"error in contained classes (%s) for class %s; class definition removed from "
-"%s"
+"inconsistent old-style class information for %s (maybe mixing old and new "
+"classes?)"
 msgstr ""
-"błąd w zawartych klasach (%s) dla klasy %s; definicja klasy została usunięta "
-"z %s"
+"niespójna informacja o starym stylu klasy dla %s (być może mieszanie starych "
+"oraz nowych klas?)"
 
-# methods/R/SClasses.R: 96
-# stop(gettextf("error in contained classes (%s) for class %s and unable to restore previous definition from %s",
-#                               msg, dQuote(Class),
-#                               sQuote(getPackageName(where))),
-#                      domain = NA)
+#. R/oldClass.R: gettextf("inconsistent old-style class information for %s; the class is defined but does not extend %s and is not valid as the data part",     dQuote(cl), dQuote(prevClass))
+#: R/oldClass.R:0
 msgid ""
-"error in contained classes (%s) for class %s and unable to restore previous "
-"definition from %s"
+"inconsistent old-style class information for %s; the class is defined but "
+"does not extend %s and is not valid as the data part"
 msgstr ""
-"błąd w zawartych klasach (%s) dla klasy %s przez co nie można przywrócić "
-"poprzedniej definicji z %s"
+"niespójny stary styl informacji o klasie dla %s; klasa jest zdefiniowana, "
+"ale nie rozszerza %s oraz nie jest poprawna jako część danych"
 
-# methods/R/SClasses.R: 101
-# stop(gettextf("error in contained classes (%s) for class %s; previous definition restored to %s",
-#                               msg, dQuote(Class),
-#                               sQuote(getPackageName(where))),
-#                      domain = NA)
+#. R/RClassUtils.R: gettextf("initializing objects from class %s with these arguments is not supported",     dQuote(Class))
+#: R/RClassUtils.R:0
 msgid ""
-"error in contained classes (%s) for class %s; previous definition restored "
-"to %s"
+"initializing objects from class %s with these arguments is not supported"
 msgstr ""
-"błąd w zawartych klasach (%s) dla klasy %s; poprzednia definicja została "
-"przywrócona w %s"
+"inicjalizowanie obiektów z klasy %s z tymi argumentami nie jest wspierane"
 
-# methods/R/SClasses.R: 132
-# stop(gettextf("element %d of the representation was not a single character string", i), domain = NA)
-msgid "element %d of the representation was not a single character string"
-msgstr "element %d reprezentacji nie był pojedynczym łańcuchem tekstowym"
+#. R/MethodsList.R: stop("inserting method corresponding to empty signature")
+#: R/MethodsList.R:0
+msgid "inserting method corresponding to empty signature"
+msgstr "wstawienie metody odpowiadającej pustej sygnaturze"
 
-# methods/R/SClasses.R: 136
-# stop(gettextf("duplicate class names among superclasses: %s",
-#                       paste(.dQ(includes[duplicated(includes)]),
-#                             collapse = ", ")),
-#              domain = NA)
-msgid "duplicate class names among superclasses: %s"
-msgstr "powtórzone nazwy klasy pośród superklas: %s"
+#. R/MethodsList.R: gettextf("inserting method into non-methods-list object (class %s)",     dQuote(.class1(mlist)))
+#: R/MethodsList.R:0
+msgid "inserting method into non-methods-list object (class %s)"
+msgstr "wstawienie metody w obiekt nie będący listą metod (klasa %s)"
 
-# methods/R/SClasses.R: 165
-# stop("only one data object (unnamed argument to prototype) allowed")
-msgid "only one data object (unnamed argument to prototype) allowed"
+#. R/MethodsList.R: gettextf("inserting method with invalid signature matching argument '...' to class %s",     dQuote(signature[[1L]]))
+#: R/MethodsList.R:0
+msgid ""
+"inserting method with invalid signature matching argument '...' to class %s"
 msgstr ""
-"tylko jeden obiekt danych (nienazwany argument przekazany do funkcji "
-"'prototype()') jest dozwolony"
-
-# methods/R/SClasses.R: 269
-# stop(gettextf("%s is not a defined class",
-#                               dQuote(Class)),
-#                      domain = NA)
-msgid "%s is not a defined class"
-msgstr "%s nie jest zdefiniowaną klasą"
+"wstawianie metody z niepoprawną sygnaturą pasującą do argumentu '...' do "
+"klasy %s"
 
-# methods/R/SClasses.R: 308
-# stop(gettextf("%s is not a slot in class %s",
-#                       sQuote(name), dQuote(cl)),
-#              domain = NA)
-# methods/R/SClasses.R: 334
-# stop(gettextf("%s is not a slot in class %s",
-#                       sQuote(name), dQuote(cl)),
-#              domain = NA)
-msgid "%s is not a slot in class %s"
-msgstr "%s nie jest gniazdem w klasie %s"
+#. R/refClass.R: stop("invalid 'Class' argument:  should be a single string")
+#: R/refClass.R:0
+msgid "invalid 'Class' argument:  should be a single string"
+msgstr "niepoprawny argument 'Class': powinien być pojedycznym łańcuchem"
 
-# methods/R/SClasses.R: 319
-# stop(gettextf("assignment of an object of class %s is not valid for slot %s in an object of class %s; is(value, \"%s\") is not TRUE",
-# 		     dQuote(valueClass), sQuote(name), dQuote(cl), slotClass),
-#             domain = NA)
+#. R/show.R: gettextf("invalid 'ignore' argument; should be a class definition or a character vector, got an object of class %s",     dQuote(class(ignore)))
+#: R/show.R:0
 msgid ""
-"assignment of an object of class %s is not valid for slot %s in an object of "
-"class %s; is(value, \"%s\") is not TRUE"
+"invalid 'ignore' argument; should be a class definition or a character "
+"vector, got an object of class %s"
 msgstr ""
-"przypisanie obiektu klasy %s nie jest poprawny dla gniazda %s w obiekcie "
-"klasy %s; 'is(value, %s)' nie ma wartości TRUE"
+"niepoprawny argument 'ignore'; powinien być definicją klasy lub łańcuchem "
+"tekstowym; otrzymano obiekt klasy %s"
+
+#. R/MethodsList.R: stop("invalid 'package' slot or attribute, wrong length")
+#: R/MethodsList.R:0
+msgid "invalid 'package' slot or attribute, wrong length"
+msgstr "niepoprawna gniazdo 'package' lub atrybut; niepoprawna długość"
 
-# methods/R/SClasses.R: 344
-# stop(gettextf("assignment of an object of class %s is not valid for @%s in an object of class %s; is(value, \"%s\") is not TRUE",
-# 		     dQuote(valueClass), sQuote(name), dQuote(cl), slotClass),
-#             domain = NA)
+#. R/trace.R: gettextf("invalid 'source' argument: expected file names or a connection but got an object of class %s",     dQuote(class(source)[[1L]]))
+#: R/trace.R:0
 msgid ""
-"assignment of an object of class %s is not valid for @%s in an object of "
-"class %s; is(value, \"%s\") is not TRUE"
+"invalid 'source' argument: expected file names or a connection but got an "
+"object of class %s"
 msgstr ""
-"przypisanie obiektu klasy %s nie jest poprawny dla @%s w obiekcie klasy %s; "
-"'is(value, \"%s\")' nie ma wartości TRUE"
-
-# methods/R/SClasses.R: 383
-# warning(gettextf("class definition for %s not found (no action taken)",
-#                              dQuote(Class)),
-#                     domain = NA)
-msgid "class definition for %s not found (no action taken)"
-msgstr "nie znaleziono definicji klasy dla %s (nie podjęto żadnej akcji)"
+"niepoprawny argument 'source': oczekiwano nazw plików lub połączenia, a "
+"otrzymano obiekt klasy %s"
 
-# methods/R/SClasses.R: 389
-# warning(gettextf("class %s has multiple definitions visible; only the first removed",
-#                              dQuote(Class)),
-#                     domain = NA)
-msgid "class %s has multiple definitions visible; only the first removed"
+#. R/oldClass.R: gettextf("invalid S4 class corresponding to S3 class: slots in  S4 version must extend corresponding slots in S3 version: fails for %s",     paste0("\"", bad, "\"", collapse = ", "))
+#: R/oldClass.R:0
+msgid ""
+"invalid S4 class corresponding to S3 class: slots in  S4 version must extend "
+"corresponding slots in S3 version: fails for %s"
 msgstr ""
-"klasa %s posiada widoczne wielokrotne definicje; usunięto tylko pierwszą"
+"niepoprawna klasa S4 odpowiadająca klasie S3: gniazda w wersji S4 muszą "
+"rozszerzać odpowiadające im sloty w wersji S3: nie powiodło się dla %s"
 
-# methods/R/SClasses.R: 543
-# gettextf("invalid class %s object", dQuote(Class))
-msgid "invalid class %s object"
-msgstr "niepoprawny obiekt klasy %s"
+#. R/Methods.R: gettextf("invalid argument 'name': %s", .isSingleName(name))
+#: R/Methods.R:0
+msgid "invalid argument 'name': %s"
+msgstr "niepoprawny argument 'name': %s"
 
-# methods/R/SClasses.R: 568
-# stop("validity method must be NULL or a function of one argument")
-msgid "validity method must be NULL or a function of one argument"
+#. R/refClass.R: gettextf("invalid assignment for reference class field %s, should be from class %s or a subclass (was class %s)",     sQuote(fieldName), dQuote(fieldClass), dQuote(class(value)))
+#: R/refClass.R:0
+msgid ""
+"invalid assignment for reference class field %s, should be from class %s or "
+"a subclass (was class %s)"
 msgstr ""
-"metoda poprawności musi być wartością NULL lub funkcją jednego argumentu"
+"niepoprawne przypisanie dla pola %s klasy referencyjnej, powinien być z "
+"klasy %s lub podklasy (była klasa %s)"
 
-# methods/R/SClasses.R: 597
-# warning(gettextf("class %s not found on %s; 'resetClass' will have no effect",
-#                                      dQuote(Class),
-#                                      sQuote(getPackageName(where))),
-#                             domain = NA)
-msgid "class %s not found on %s; 'resetClass' will have no effect"
+#. R/RMethodUtils.R: gettextf("invalid call in method dispatch to '%s' (no default method)",     name)
+#: R/RMethodUtils.R:0
+msgid "invalid call in method dispatch to '%s' (no default method)"
 msgstr ""
-"klasa %s nie została znaleziona w %s; 'resetClass' nie będzie miał efektu"
+"niepoprawne wywołanie w metodzie rozdziału do %s (brak domyślnej metody)"
 
-# methods/R/SClasses.R: 605
-# stop(gettextf("argument 'classDef' must be a string or a class representation; got an object of class %s",
-#                               dQuote(class(classDef))),
-#                      domain = NA)
+#. R/show.R: gettextf("invalid call to 'classLabel': expected a name or a class definition, got an object of class %s",     classLabel(class(Class)))
+#: R/show.R:0
 msgid ""
-"argument 'classDef' must be a string or a class representation; got an "
+"invalid call to 'classLabel': expected a name or a class definition, got an "
 "object of class %s"
 msgstr ""
-"argument 'classDef' musi być łańcuchem albo reprezentacją klasy; otrzymano "
-"obiekt klasy %s"
+"niepoprawne wywołanie przekazane do 'classLabel': oczekiwano nazwy lub "
+"definicji klasy, otrzymano obiekt klasy %s"
 
-# methods/R/SClasses.R: 611
-# warning(gettextf("class %s is sealed; 'resetClass' will have no effect",
-#                              dQuote(Class)),
-#                     domain = NA)
-msgid "class %s is sealed; 'resetClass' will have no effect"
-msgstr "klasa %s jest zamknięta; 'resetClass' nie będzie mieć efektu"
+#. R/SClasses.R: gettextf("invalid class %s object", dQuote(Class))
+#: R/SClasses.R:0
+msgid "invalid class %s object"
+msgstr "niepoprawny obiekt klasy %s"
 
-# methods/R/SClasses.R: 674
-# stop(gettextf("cannot use object of class %s in new():  class %s does not extend that class",
-#                                       dQuote(Classi),
-#                                       dQuote(Class)),
-#                              domain = NA)
+#. R/MethodsList.R: gettextf("invalid element in a list for \"signature\" argument; element %d is neither a class definition nor a class name",     i)
+#: R/MethodsList.R:0
 msgid ""
-"cannot use object of class %s in new():  class %s does not extend that class"
+"invalid element in a list for \"signature\" argument; element %d is neither "
+"a class definition nor a class name"
 msgstr ""
-"nie można użyć obiektu klasy %s w 'new()': klasa %s nie rozszerza tej klasy"
+"niepoprawny element na liście dla argumentu 'signature'; element %d nie jest "
+"ani definicją klasy ani nazwą klasy"
 
-# methods/R/SClasses.R: 143
-# stop(sprintf(ngettext(length(dslots),
-#                               "duplicated slot name: %s",
-#                               "duplicated slot names: %s"),
-#                      paste(sQuote(dslots), collapse="")),
-#              domain = NA)
-# methods/R/SClasses.R: 684
-# stop(gettextf("duplicated slot names: %s",
-#                               paste(sQuote(snames[duplicated(snames)]),
-#                                     collapse = ", ")), domain = NA)
-msgid "duplicated slot names: %s"
-msgstr "powtórzona nazwa gniazda: %s"
+#. R/RMethodUtils.R: gettextf("invalid element in the \"groupMembers\" slot (class %s)",     dQuote(class(x)))
+#: R/RMethodUtils.R:0
+msgid "invalid element in the \"groupMembers\" slot (class %s)"
+msgstr "niepoprawny element w gnieździe \"groupMembers\" (klasa %s)"
 
-# methods/R/SClasses.R: 756
-# stop(gettextf("class %s is defined, with package %s, but no corresponding metadata object was found (not exported?)",
-#                               dQuote(Class),
-#                               sQuote(classDef at package)),
-#                      domain = NA)
+#. R/MethodsList.R: stop("invalid first argument: should be the name of the first argument in the dispatch")
+#: R/MethodsList.R:0
 msgid ""
-"class %s is defined, with package %s, but no corresponding metadata object "
-"was found (not exported?)"
+"invalid first argument: should be the name of the first argument in the "
+"dispatch"
 msgstr ""
-"klasa %s jest zdefiniowana z pakietem %s, ale nie znaleziono odpowiadającego "
-"jej obiektu metadanych (nie wyeksportowano?)"
+"niepoprawny pierwszy argument: powinna to być nazwa pierwszego argumentu w "
+"wysyłce"
 
-# methods/R/SClasses.R: 761
-# stop(gettextf("no definition of %s to use for %s",
-#                               dQuote(Class),
-#                               unique),
-#                      domain = NA)
-msgid "no definition of %s to use for %s"
-msgstr "brak definicji %s do użycia dla %s"
+#. R/methodsTable.R: gettextf("invalid group generic function in search for inherited method (class %s)",     dQuote(class(gen)))
+#: R/methodsTable.R:0
+msgid ""
+"invalid group generic function in search for inherited method (class %s)"
+msgstr ""
+"niepoprawna funkcja grupy ogólnej w poszukiwaniu dziedziczonej metody (klasa "
+"%s)"
 
-# methods/R/SClasses.R: 829
-# stop(gettextf("class definition cannot extend more than one of these data types: %s",
-# 		  paste0('"',type, '"', collapse = ", ")),
-#          domain = NA)
-msgid "class definition cannot extend more than one of these data types: %s"
+#. R/languageEl.R: stop("invalid index for function argument")
+#: R/languageEl.R:0
+msgid "invalid index for function argument"
+msgstr "niepoprawny indeks dla argumentu funkcji"
+
+#. R/Methods.R: gettextf("invalid method definition: expected a function, got an object of class %s",     dQuote(class(definition)))
+#: R/Methods.R:0
+msgid ""
+"invalid method definition: expected a function, got an object of class %s"
 msgstr ""
-"definicja klasy nie może rozszerzać więcej niż jednego z tych typów danych: "
-"%s"
+"niepoprawna definicja metody: oczekiwano funkcji, otrzymano obiekt klasy %s"
 
-# methods/R/SClasses.R: 834
-# stop(gettextf("abnormal type %s is not supported as a superclass of a class definition",
-#                   dQuote(type)),
-#          domain = NA)
-msgid "abnormal type %s is not supported as a superclass of a class definition"
-msgstr "nienormalny typ %s nie jest wspierany jako superklasa definicji klasy"
+#. R/MethodsList.R: stop("invalid method sublist")
+#: R/MethodsList.R:0
+msgid "invalid method sublist"
+msgstr "niepoprawne podlista metod"
 
-# methods/R/SClasses.R: 923
-# warning(gettextf("multiple class definitions for %s from packages: %s; picking the first",
-#                                  dQuote(className),
-#                                  paste(sQuote(pkgs), collapse = ", ")),
-#                         domain = NA)
-msgid "multiple class definitions for %s from packages: %s; picking the first"
+#. R/methodsTable.R: stop("invalid methods table request")
+#: R/methodsTable.R:0
+msgid "invalid methods table request"
+msgstr "niepoprawne żądanie tablicy metod"
+
+#. R/methodsTable.R: gettextf("invalid mlist element for signature %s at level %d (should be MethodDefinition or .Primitive, had class %s)",     sQuote(classes[[j]]), i, dQuote(class(el)))
+#: R/methodsTable.R:0
+msgid ""
+"invalid mlist element for signature %s at level %d (should be "
+"MethodDefinition or .Primitive, had class %s)"
 msgstr ""
-"wielokrotne definicje klasy dla %s z pakietów: %s; wybieranie pierwszego"
+"niepoprawny element 'mlist' dla sygnatury %s na poziomie %d (powinno być "
+"'MethodDefinition' lub '.Primitive', otrzymano klasę %s)"
 
-# methods/R/SClasses.R: 930
-# stop(gettextf("no package name supplied and no class definition found for %s",
-#                               dQuote(className)),
-#                      domain = NA)
-msgid "no package name supplied and no class definition found for %s"
+#. R/MethodsListClass.R: gettextf("invalid object for formal method definition: type %s",     dQuote(typeof(def)))
+#: R/MethodsListClass.R:0
+msgid "invalid object for formal method definition: type %s"
+msgstr "niepoprawny obiekt dla definicji formalnej metody: typ %s"
+
+#. R/methodsTable.R: gettextf("invalid object in meta table of methods for %s, label %s, had class %s",     sQuote(generic at generic), sQuote(what), dQuote(class(obj)))
+#: R/methodsTable.R:0
+msgid "invalid object in meta table of methods for %s, label %s, had class %s"
 msgstr ""
-"nie dostarczono nazwy pakietu oraz nie znaleziono definicji klasy dla klasy "
+"niepoprawny obiekt w meta tablicy metod dla %s, etykieta %s, otrzymano klasę "
 "%s"
 
-# methods/R/SClasses.R: 962
-# stop("argument 'classDef' must be a class definition or the name of a class")
-msgid "argument 'classDef' must be a class definition or the name of a class"
-msgstr "argument 'classDef' musi być definicją klasy lub nazwą klasy"
+#. R/methodsTable.R: gettextf("invalid object in methods table (%s), expected a method, got an object of class %s",     sQuote(what), dQuote(class(method)))
+#: R/methodsTable.R:0
+msgid ""
+"invalid object in methods table (%s), expected a method, got an object of "
+"class %s"
+msgstr ""
+"niepoprawny obiekt w tablicy metod (%s), oczekiwano metody, otrzymano obiekt "
+"klasy %s"
 
-# methods/R/SClasses.R: 981
-# stop(gettextf("No %s names supplied", what),
-#                  domain = NA, call. = FALSE)
-msgid "No %s names supplied"
-msgstr "Nie dostarczono nazw %s"
+#. R/methodsTable.R: gettextf("invalid or unset methods table in generic function %s",     sQuote(fdef at generic))
+#: R/methodsTable.R:0
+msgid "invalid or unset methods table in generic function %s"
+msgstr "niepoprawna lub nieustawiona tablica metod w ogólnej funkcji %s"
+
+#. R/refClass.R: gettextf("invalid replacement: reference class field %s is read-only",     sQuote(fieldName))
+#: R/refClass.R:0
+msgid "invalid replacement: reference class field %s is read-only"
+msgstr "niepoprawna zamiana: pole %s klasy referencyjnej jest tylko do odczytu"
+
+#. R/RMethodUtils.R: gettextf("invalid value from generic function %s, class %s, expected %s",     sQuote(fname), dQuote(class(object)), paste(dQuote(classes),         collapse = " or "))
+#: R/RMethodUtils.R:0
+msgid "invalid value from generic function %s, class %s, expected %s"
+msgstr ""
+"niepoprawna wartość z ogólnej funkcji %s, klasa %s, oczekiwano jednego z %s"
 
-# methods/R/SClasses.R: 984
-# stop(gettextf("All %s names must be nonempty in:\n(%s)", what,
-#                           paste(sQuote(propNames), collapse = ", ")),
-#                  domain = NA, call. = FALSE)
+#. R/refClass.R: gettextf("local assignment to field name will not change the field:\n    %s\n Did you mean to use \"<<-\"? ( in method %s for class %s)",     paste(unlist(assigned$locals)[localsAreFields], collapse = "; "),     methodName, className)
+#: R/refClass.R:0
 msgid ""
-"All %s names must be nonempty in:\n"
-"(%s)"
+"local assignment to field name will not change the field:\n"
+"    %s\n"
+" Did you mean to use \"<<-\"? ( in method %s for class %s)"
 msgstr ""
-"Wszystkie nazwy %s muszą być niepuste w:\n"
-"(%s)"
+"lokalne przypisanie do nazwy pola nie zmieni pola:\n"
+"    %s\n"
+" Czy chciałeś użyć \"<<-\"? ( w metodzie %s klasy %s)"
 
-# methods/R/SClasses.R: 988
-# stop(gettextf("All %s names must be distinct in:\n(%s)", what,
-#                           paste(sQuote(propNames), collapse = ", ")),
-#                  domain = NA, call. = FALSE)
+#. R/RMethodUtils.R: gettextf("making a generic for special function %s", sQuote(f))
+#: R/RMethodUtils.R:0
+msgid "making a generic for special function %s"
+msgstr "tworzenie ogólnej funkcji dla funkcji specjalnej %s"
+
+#. R/trace.R: warning("making a traced version of a special; arguments may be altered")
+#: R/trace.R:0
+msgid "making a traced version of a special; arguments may be altered"
+msgstr ""
+"tworzenie śledzonej wersji specjalnej funkcji; argumenty mogą zostać "
+"zmienione"
+
+#. R/debug.R: warning("method is not being debugged")
+#: R/debug.R:0
+msgid "method is not being debugged"
+msgstr "metoda nie jest debugowana"
+
+#. R/RMethodUtils.R: gettextf("methods can add arguments to the generic %s only if '...' is an argument to the generic",     sQuote(generic at generic))
+#: R/RMethodUtils.R:0
 msgid ""
-"All %s names must be distinct in:\n"
-"(%s)"
+"methods can add arguments to the generic %s only if '...' is an argument to "
+"the generic"
 msgstr ""
-"Wszystkie nazwy %s muszą być różne w:\n"
-"(%s)"
+"metody mogą dodawać argumenty do ogólnej funkcji %s tylko jeśli '...' jest "
+"argumentem dla ogólnej funkcji"
 
-# methods/R/SClasses.R: 1011
-# stop(gettextf("argument %s must be a list or a character vector; got an object of class %s",
-#                       dQuote(what), dQuote(class(fields))),
-#              domain = NA)
+#. R/as.R: gettextf("methods currently exist for coercing from %s to %s; they will be replaced.",     dQuote(from), dQuote(to))
+#: R/as.R:0
 msgid ""
-"argument %s must be a list or a character vector; got an object of class %s"
+"methods currently exist for coercing from %s to %s; they will be replaced."
 msgstr ""
-"argument %s musi być listą  lub wektorem tekstowym; otrzymano obiekt klasy %s"
+"metody aktualnie istnieją dla przekształcenia z %s w %s; będą zastąpione."
 
-# methods/R/addedFunctions.R: 63
-# stop(if(generic)
-# 	     gettextf("no function %s found", sQuote(name)) else
-# 	     gettextf("no non-generic function %s found", sQuote(name)),
-# 	     domain = NA)
-msgid "no function %s found"
-msgstr "nie znaleziono funkcji %s"
+#. R/refClass.R: gettextf("methods declared in usingMethods() but not found: %s",     paste0(declared[!declared %in% allMethods], collapse = ", "))
+#: R/refClass.R:0
+msgid "methods declared in usingMethods() but not found: %s"
+msgstr ""
+"metody zostały zadeklarowanie w 'usingMethods() ', ale nie znaleziono: %s"
 
-# methods/R/addedFunctions.R: 63
-# stop(if(generic)
-# 	     gettextf("no function %s found", sQuote(name)) else
-# 	     gettextf("no non-generic function %s found", sQuote(name)),
-# 	     domain = NA)
-msgid "no non-generic function %s found"
-msgstr "nie znaleziono nie-ogólnej funkcji %s"
+#. R/BasicFunsList.R: gettextf("methods may not be defined for primitive function %s in this version of R",     sQuote(f))
+#: R/BasicFunsList.R:0
+msgid ""
+"methods may not be defined for primitive function %s in this version of R"
+msgstr ""
+"metody nie mogą być zdefiniowane dla prymitywnej funkcji %s w tej wersji R"
 
-# methods/R/addedFunctions.R: 89
-# stop(gettextf("%s is not one of the element names",
-#                           sQuote(name)),
-#                  domain = NA)
-msgid "%s is not one of the element names"
-msgstr "%s nie jest jedną z nazw elementów"
+#. R/RMethodUtils.R: gettextf("missing function for load action: %s", what)
+#: R/RMethodUtils.R:0
+msgid "missing function for load action: %s"
+msgstr "brakująca funkcja dla akcji ładowania: %s"
 
-# methods/R/as.R: 80
-# stop(gettextf("no method or default for coercing %s to %s",
-# 			      dQuote(thisClass),
-#                               dQuote(Class)),
-#                      domain = NA)
-msgid "no method or default for coercing %s to %s"
-msgstr "brak metody lub domyślnego schematu przekształcania %s w %s"
+#. R/MethodsListClass.R: gettextf("missing package slot (%s) in object of class %s (package info added)",     packageSlot(co), dQuote(class(.Object)))
+#: R/MethodsListClass.R:0
+msgid "missing package slot (%s) in object of class %s (package info added)"
+msgstr ""
+"brakujące gniazdo pakietu (%s) w obiekcie klasy %s (dodana informacja o "
+"pakiecie)"
 
-# methods/R/as.R: 191
-# stop(gettextf("no method or default for as() replacement of %s with Class=\"%s\"",
-#                       dQuote(thisClass),
-#                       Class),
-#              domain = NA)
-msgid "no method or default for as() replacement of %s with Class=\"%s\""
+#. R/MethodsList.R: gettextf("more elements in the method signature (%d) than in the generic signature (%d) for function %s",     length(which), length(anames), sQuote(fun at generic))
+#: R/MethodsList.R:0
+msgid ""
+"more elements in the method signature (%d) than in the generic signature "
+"(%d) for function %s"
 msgstr ""
-"brak metody lub wartości domyślnej dla zamiany 'as()' %s z 'class=\"%s\"'"
+"więcej elementów w sygnaturze metody (%d) niż w ogólnej sygnaturze (%d) dla "
+"funkcji %s"
 
-# methods/R/as.R: 215
-# stop(gettextf("trying to set an 'as' relation from %s to itself",
-#                           dQuote(.class1(from))),
-#                  domain = NA)
-msgid "trying to set an 'as' relation from %s to itself"
-msgstr "próba ustawienia relacji 'as' z %s na siebie samą"
+#. R/RClassUtils.R: gettextf("more than one possible class for the data part: using %s rather than %s",     .dQ(prevDataPartClass), .dQ(value))
+#: R/RClassUtils.R:0
+msgid "more than one possible class for the data part: using %s rather than %s"
+msgstr ""
+"więcej niż jedna możliwa klasa dla części danych: używanie %s zamiast %s"
 
-# methods/R/as.R: 222
-# stop(gettextf("class %s is not defined in this environment",
-#                           dQuote(to)),
-#                  domain = NA)
-msgid "class %s is not defined in this environment"
-msgstr "klasa %s nie jest zdefiniowana w tym środowisku"
+#. R/zzz.R: warning("apparently bad method or class metadata in saved environment;\n",     "move the file or remove the class/method")
+#: R/zzz.R:0
+msgid "move the file or remove the class/method"
+msgstr "przenieś plik lub usuń klasę/metodę"
 
-# methods/R/as.R: 226
-# stop(gettextf("class %s is a class union: 'coerce' relations to a class union are not meaningful",
-#                           dQuote(to)),
-#                  domain = NA)
-msgid ""
-"class %s is a class union: 'coerce' relations to a class union are not "
-"meaningful"
-msgstr "klasa %s jest unią klas: relacje 'coerce' dla uni klas nie mają sensu"
+#. R/SClasses.R: gettextf("multiple class definitions for %s from packages: %s; picking the first",     dQuote(className), paste(sQuote(pkgs), collapse = ", "))
+#: R/SClasses.R:0
+msgid "multiple class definitions for %s from packages: %s; picking the first"
+msgstr ""
+"wielokrotne definicje klasy dla %s z pakietów: %s; wybieranie pierwszego"
 
-# methods/R/as.R: 238
-# stop(gettextf("'as' method should have one argument, or match the arguments of coerce(): got  (%s)",
-#                            paste(formalArgs(def), collapse = ", ")),
-#                   domain = NA)
+#. R/RMethodUtils.R: gettextf("multiple definitions exist for class %s, but the supplied package (%s) is not one of them (%s)",     dQuote(classi), sQuote(pkgi), paste(dQuote(get(classi, envir = .classTable)),         collapse = ", "))
+#: R/RMethodUtils.R:0
 msgid ""
-"'as' method should have one argument, or match the arguments of coerce(): "
-"got  (%s)"
+"multiple definitions exist for class %s, but the supplied package (%s) is "
+"not one of them (%s)"
 msgstr ""
-"metod 'as()' powinna mieć jeden argument lub zgadzać się z argumentami "
-"'coerce()': otrzymano (%s)"
+"istnieją wielokrotne definicje dla klasy %s, ale dostarczony pakiet (%s) nie "
+"jest jedną z nich (%s)"
 
-# methods/R/as.R: 254
-# stop(gettextf("a 'replace' method definition in 'setAs' must be a function of two arguments, got %d", length(args)), domain = NA)
+#. R/RMethodUtils.R: gettextf("multiple definitions exist for class %s; should specify one of them (%s), e.g. by className()",     dQuote(classi), paste(dQuote(get(classi, envir = .classTable)),         collapse = ", "))
+#: R/RMethodUtils.R:0
 msgid ""
-"a 'replace' method definition in 'setAs' must be a function of two "
-"arguments, got %d"
+"multiple definitions exist for class %s; should specify one of them (%s), e."
+"g. by className()"
 msgstr ""
-"definicja metody 'replace' w 'setAs' musi być funkcją dwóch argumentów, "
-"otrzymano %d"
+"istnieją wielokrotne definicje dla klasy %s; powinieneś określić jedną z "
+"nich (%s), na przykład poprzez 'className()'"
 
-# methods/R/as.R: 260
-# warning(gettextf("argument names in 'replace' changed to agree with 'coerce<-' generic:\n%s", paste(deparse(replace), sep="\n    ")),
-#                             domain = NA)
-msgid ""
-"argument names in 'replace' changed to agree with 'coerce<-' generic:\n"
-"%s"
+#. R/promptClass.R: gettextf("multiple definitions of %s found; using the one on %s",     dQuote(clName), whereClass)
+#: R/promptClass.R:0
+msgid "multiple definitions of %s found; using the one on %s"
+msgstr "znaleziono wielokrotne definicje %s; używanie jednej z %s"
+
+#. R/RMethodUtils.R: gettextf("multiple direct matches: %s; using the first of these",     .pasteC(classes))
+#: R/RMethodUtils.R:0
+msgid "multiple direct matches: %s; using the first of these"
+msgstr "wielokrotne bezpośrednie dopasowania: %s; używanie pierwszego z nich"
+
+#. R/RMethodUtils.R: gettextf("multiple equivalent inherited matches: %s; using the first of these",     .pasteC(classes))
+#: R/RMethodUtils.R:0
+msgid "multiple equivalent inherited matches: %s; using the first of these"
 msgstr ""
-"nazwy argumentów w metodzie 'replace' zostały zmienione aby zgadzać się z "
-"ogólnym 'coerce<-':\n"
-"%s"
+"wiele równoważnie dziedziczonych dopasowań: %s; używanie pierwszego z nich"
 
-# methods/R/as.R: 337
-# warning("ambiguous object (length != 1) to coerce to \"name\"")
-msgid "ambiguous object (length != 1) to coerce to \"name\""
-msgstr "dwuznaczny obiekt (długość różna od 1) do przekształcenia w \"name\""
+#. R/trace.R: gettextf("multiple generics match pattern, using table %s", table)
+#: R/trace.R:0
+msgid "multiple generics match pattern, using table %s"
+msgstr "wielokrotne dopasowania wzorca funkcji ogólnej, używanie tablicy %s"
 
-# methods/R/as.R: 345
-# stop("undefined 'coerce' method")
-msgid "undefined 'coerce' method"
-msgstr "nieokreślona metoda 'coerce'"
+#. R/Methods.R: gettextf("must provide an environment table; got class %s", dQuote(class(what)))
+#: R/Methods.R:0
+msgid "must provide an environment table; got class %s"
+msgstr "potrzeba dostarczyć tablicę środowiska; otrzymano klasę %s"
+
+#. R/Methods.R: stop("must supply 'generic.function' or 'class'")
+#: R/Methods.R:0
+msgid "must supply 'generic.function' or 'class'"
+msgstr "'generic.function' lub 'class' muszą być dostarczone"
 
-# methods/R/as.R: 394
-# warning(gettextf("methods currently exist for coercing from %s to %s; they will be replaced.",
-#                              dQuote(from),
-#                              dQuote(to)),
-#                     domain = NA)
+#. R/Methods.R: gettextf("must supply a function skeleton for %s, explicitly or via an existing function",     sQuote(name))
+#: R/Methods.R:0
 msgid ""
-"methods currently exist for coercing from %s to %s; they will be replaced."
+"must supply a function skeleton for %s, explicitly or via an existing "
+"function"
 msgstr ""
-"metody aktualnie istnieją dla przekształcenia z %s w %s; będą zastąpione."
+"potrzeba dostarczyć strukturę funkcji dla %s, jawnie lub poprzez istniejącą "
+"funkcję"
 
-# methods/R/fixPrevious.R: 32
-# warning(gettextf("object %s not found",
-#                              sQuote(what)),
-#                     domain = NA)
-msgid "object %s not found"
-msgstr "obiekt %s nie został znaleziony"
+#. R/RMethodUtils.R: gettextf("must supply either a generic function or a function as default for %s",     sQuote(f))
+#: R/RMethodUtils.R:0
+msgid "must supply either a generic function or a function as default for %s"
+msgstr ""
+"potrzeba dostarczyć albo ogólną funkcję albo funkcję jako domyślną dla %s"
 
-# methods/R/fixPrevious.R: 54
-# warning(gettextf("object %s not changed (it is not consistent with the current definition of class %s from %s)",
-#                                      sQuote(what),
-#                                      dQuote(Class),
-#                                      sQuote(ClassDef at package)),
-#                             domain = NA)
+#. R/method.skeleton.R: stop("need a definition for the method here")
+#: R/method.skeleton.R:0
+msgid "need a definition for the method here"
+msgstr "potrzeba tutaj definicji dla metody"
+
+#. R/RClassUtils.R: gettextf("needed the supplied labels vector of length %d, got %d",     length(nodes), length(short))
+#: R/RClassUtils.R:0
+msgid "needed the supplied labels vector of length %d, got %d"
+msgstr "potrzebowano dostarczyć wektora etykiet o długości %d, otrzymano %d"
+
+#. R/RClassUtils.R: gettextf("no '.Data' slot defined for class %s", dQuote(class(object)))
+#: R/RClassUtils.R:0
+msgid "no '.Data' slot defined for class %s"
+msgstr "nie zdefiniowano gniazda '.Data' dla klasy %s"
+
+#. R/ClassExtensions.R: gettextf("no 'replace' method was defined for 'as(x, \"%s\") <- value' for class %s",     to, dQuote(class(from)))
+#: R/ClassExtensions.R:0
 msgid ""
-"object %s not changed (it is not consistent with the current definition of "
-"class %s from %s)"
+"no 'replace' method was defined for 'as(x, \"%s\") <- value' for class %s"
 msgstr ""
-"obiekt %s nie został zmieniony (nie jest spójny z bieżącą definicją klasy %s "
-"z %s)"
+"nie zdefiniowano metody 'replace' dla 'as(x, \"%s\") <- value' dla klasy %s"
+
+#. R/trace.R: gettextf("no definition for object %s found in tracing environment",     sQuote(what), source)
+#: R/trace.R:0
+msgid "no definition for object %s found in tracing environment"
+msgstr "nie znaleziono definicji dla obiektu %s w śledzonym środowisku"
 
-# methods/R/fixPrevious.R: 61
-# warning(gettextf("no definition for the class of %s (class %s) found",
-#                                  sQuote(what),
-#                                  dQuote(class)),
-#                         domain = NA)
+#. R/fixPrevious.R: gettextf("no definition for the class of %s (class %s) found",     sQuote(what), dQuote(class))
+#: R/fixPrevious.R:0
 msgid "no definition for the class of %s (class %s) found"
 msgstr "nie znaleziono definicji dla klasy z %s (klasa %s)"
 
-# methods/R/fixPrevious.R: 67
-# warning(gettextf("object %s not changed (it does not appear to be from a version of R earlier than 1.8.0)",
-#                              sQuote(what)),
-#                     domain = NA)
-msgid ""
-"object %s not changed (it does not appear to be from a version of R earlier "
-"than 1.8.0)"
-msgstr ""
-"obiekt %s nie został zmieniony (nie wygląda aby był z wersji R wcześniejszej "
-"niż 1.8.0)"
+#. R/RMethodUtils.R: gettextf("no definition found for class %s", dQuote(classi))
+#: R/RMethodUtils.R:0
+msgid "no definition found for class %s"
+msgstr "nie znaleziono definicji dla klasy %s"
 
-# methods/R/is.R: 72
-# stop("'class1' must be the name of a class or a class definition")
-msgid "'class1' must be the name of a class or a class definition"
-msgstr "'class1' musi być nazwą klasy albo definicją klasy"
+#. R/refClass.R: gettextf("no definition found for inherited class: %s", paste0("\"",     contains[missingDefs], "\"", collapse = ", "))
+#: R/refClass.R:0
+msgid "no definition found for inherited class: %s"
+msgstr "nie znaleziono definicji dla dziedziczonej klasy: %s"
 
-# methods/R/is.R: 104
-# stop("'class2' must be the name of a class or a class definition")
-msgid "'class2' must be the name of a class or a class definition"
-msgstr "'class2' musi być nazwą klasy albo definicją klasy"
+#. R/SClasses.R: gettextf("no definition of %s to use for %s", dQuote(Class),     unique)
+#: R/SClasses.R:0
+msgid "no definition of %s to use for %s"
+msgstr "brak definicji %s do użycia dla %s"
 
-# methods/R/is.R: 137
-# stop(gettextf("class %s has no visible definition from package or environment %s",
-#                       dQuote(class2),
-#                       sQuote(getPackageName(where))),
-#              domain = NA)
-msgid "class %s has no visible definition from package or environment %s"
-msgstr "klasa %s nie ma widocznej definicji w pakiecie lub środowisku %s"
+#. R/promptClass.R: gettextf("no definition of class %s found", dQuote(clName))
+#: R/promptClass.R:0
+msgid "no definition of class %s found"
+msgstr "nie znaleziono definicji klasy %s"
 
-# methods/R/is.R: 151
-# stop(gettextf("cannot create a 'setIs' relation when neither of the classes (%s and %s) is local and modifiable in this package",
-#                       dQuote(class1),
-#                       dQuote(class2)),
-#              domain = NA)
+#. R/RClassUtils.R: gettextf("no definition of inheritance from %s to %s, though the relation was implied by the setIs() from %s",     .dQ(what), .dQ(def2 at className), .dQ(class))
+#: R/RClassUtils.R:0
 msgid ""
-"cannot create a 'setIs' relation when neither of the classes (%s and %s) is "
-"local and modifiable in this package"
+"no definition of inheritance from %s to %s, though the relation was implied "
+"by the setIs() from %s"
 msgstr ""
-"nie można utworzyć relacji 'setIs' kiedy żadna z klas (%s oraz %s) nie jest "
-"lokalna oraz modyfikowalna w tym pakiecie"
+"brak definicji dziedziczenia z %s do %s mimo, że relacja została "
+"zasugerowana przez 'setIs()' z %s"
 
-# methods/R/is.R: 156
-# stop(gettextf("class %s is sealed; new superclasses can not be defined, except by 'setClassUnion'",
-#                       dQuote(class1)),
-#              domain = NA)
+#. R/RClassUtils.R: gettextf("no definition was found for superclass %s in the specification of class %s",     dQuote(cl), dQuote(name))
+#: R/RClassUtils.R:0
 msgid ""
-"class %s is sealed; new superclasses can not be defined, except by "
-"'setClassUnion'"
-msgstr ""
-"klasa %s jest zamknięta; nowa superklasa nie może zostać zdefiniowana, za "
-"wyjątkiem 'setClassUnion'"
+"no definition was found for superclass %s in the specification of class %s"
+msgstr "nie znaleziono definicji dla superklasy %s w specyfikacji klasy %s"
 
-# methods/R/is.R: 209
-# warning(gettextf("class %s is defined (with package slot %s) but no metadata object found to revise %s information---not exported?  Making a copy in package %s",
-#                          .dQ(class), sQuote(classDef at package), purpose,
-#                          sQuote(getPackageName(where, FALSE))),
-#                 call. = FALSE, domain = NA)
-msgid ""
-"class %s is defined (with package slot %s) but no metadata object found to "
-"revise %s information---not exported?  Making a copy in package %s"
-msgstr ""
-"klasa %s jest zdefiniowana (z gniazdem pakietu %s), ale nie znaleziono "
-"obiektu metadanych do przeglądu informacji %s -- nie wyeksportowano? "
-"Tworzenie kopii w pakiecie %s"
+#. R/Methods.R: gettextf("no environment or package corresponding to argument where=%s",     deparse(where))
+#: R/Methods.R:0
+msgid "no environment or package corresponding to argument where=%s"
+msgstr "brak środowiska lub pakietu odpowiadającego argumentowi 'where=%s'"
 
-# methods/R/is.R: 220
-# gettextf("class %s cannot extend class %s",
-#                  dQuote(class1),
-#                  dQuote(class2))
-msgid "class %s cannot extend class %s"
-msgstr "klasa %s nie może rozszerzyć klasy %s"
+#. R/Methods.R: gettextf("no existing definition for function %s", sQuote(f))
+#: R/Methods.R:0
+msgid "no existing definition for function %s"
+msgstr "brak istniejącej definicji dla funkcji %s"
 
-# methods/R/is.R: 226
-# gettext("both classes must be defined")
-msgid "both classes must be defined"
-msgstr "obie klasy muszą być zdefiniowane"
+#. R/addedFunctions.R: gettextf("no function %s found", sQuote(name))
+#: R/addedFunctions.R:0
+msgid "no function %s found"
+msgstr "nie znaleziono funkcji %s"
 
-# methods/R/languageEl.R: 74
-# stop("invalid index for function argument")
-msgid "invalid index for function argument"
-msgstr "niepoprawny indeks dla argumentu funkcji"
+#. R/trace.R: gettextf("no function definition for %s found", sQuote(what))
+#: R/trace.R:0
+msgid "no function definition for %s found"
+msgstr "nie znaleziono definicji funkcji dla %s"
 
-# methods/R/method.skeleton.R: 26
-# stop(gettextf("no function definition found for %s",
-#                           sQuote(generic)),
-#                  domain = NA)
+#. R/method.skeleton.R: gettextf("no function definition found for %s", sQuote(generic))
+#: R/method.skeleton.R:0
 msgid "no function definition found for %s"
 msgstr "nie znaleziono definicji funkcji dla %s"
 
-# methods/R/method.skeleton.R: 42
-# stop("need a definition for the method here")
-msgid "need a definition for the method here"
-msgstr "potrzeba tutaj definicji dla metody"
+#. R/Methods.R: gettextf("no generic function %s found", sQuote(f))
+#. R/Methods.R: gettextf("no generic function %s found", sQuote(f))
+#. R/Methods.R: gettextf("no generic function %s found", sQuote(f))
+#: R/Methods.R:0
+msgid "no generic function %s found"
+msgstr "nie znaleziono ogólnej funkcji %s "
 
-# methods/R/method.skeleton.R: 60
-# message(gettextf("Skeleton of method written to %s",
-#                      if (is.character(file)) file else "connection"),
-#             domain = NA)
-msgid "Skeleton of method written to %s"
-msgstr "struktura metody zapisana w %s"
+#. R/MethodsList.R: gettextf("no generic function found corresponding to %s", sQuote(f))
+#: R/MethodsList.R:0
+msgid "no generic function found corresponding to %s"
+msgstr "nie znaleziono ogólnej funkcji odpowiadającej %s"
 
-# methods/R/methodsTable.R: 89
-# stop(gettextf("invalid object in meta table of methods for %s, label %s, had class %s",
-#                     sQuote(generic at generic),
-#                     sQuote(what),
-#                     dQuote(class(obj))),
-#            domain = NA)
-msgid "invalid object in meta table of methods for %s, label %s, had class %s"
-msgstr ""
-"niepoprawny obiekt w meta tablicy metod dla %s, etykieta %s, otrzymano klasę "
-"%s"
+#. R/RMethodUtils.R: gettextf("no generic function found for %s", sQuote(f))
+#: R/RMethodUtils.R:0
+msgid "no generic function found for %s"
+msgstr "nie znaleziono ogólnej funkcji dla %s"
 
-# methods/R/methodsTable.R: 269
-# stop(gettextf("invalid mlist element for signature %s at level %d (should be methods list or method, had class %s)",
-#                     sQuote(classes[[j]]),
-#                     i,
-#                     dQuote(class(el))),
-#            domain = NA)
+#. R/Methods.R: gettextf("no generic function found for '%s'", f)
+#: R/Methods.R:0
+msgid "no generic function found for '%s'"
+msgstr "nie znaleziono ogólnej funkcji dla '%s'"
+
+#. R/Methods.R: gettextf("no generic version of %s on package %s is allowed;\n   a new generic will be assigned for %s",     sQuote(name), sQuote(package), thisPName)
+#: R/Methods.R:0
 msgid ""
-"invalid mlist element for signature %s at level %d (should be methods list "
-"or method, had class %s)"
+"no generic version of %s on package %s is allowed;\n"
+"   a new generic will be assigned for %s"
 msgstr ""
-"niepoprawny element 'mlist' dla sygnatury %s na poziomie %d (powinna być "
-"lista metod lub metoda, otrzymano klasę %s)"
+"żadna ogólna wersja %s w pakiecie %s nie jest dozwolona; nowa ogólna funkcja "
+"będzie przypisana dla pakietu %s"
 
-# methods/R/methodsTable.R: 339
-# stop(
-#                          gettextf("bad method object stored in method table, class %s",
-#                                   dQuote(class(current))),
-#                          domain = NA)
-msgid "bad method object stored in method table, class %s"
-msgstr "błędny obiekt metody przechowywany w tablicy metod, klasy %s"
+#. R/Methods.R: gettextf("no method for %s matches class %s", sQuote("..."),     dQuote(signature))
+#: R/Methods.R:0
+msgid "no method for %s matches class %s"
+msgstr "żadna metoda dla %s nie zgadza się z klasą %s"
 
-# methods/R/methodsTable.R: 428
-# stop(gettextf("invalid object in methods table (%s), expected a method, got an object of class %s",
-#                           sQuote(what),
-#                           dQuote(class(method))),
-#                  domain = NA)
-msgid ""
-"invalid object in methods table (%s), expected a method, got an object of "
-"class %s"
-msgstr ""
-"niepoprawny obiekt w tablicy metod (%s), oczekiwano metody, otrzymano obiekt "
-"klasy %s"
+#. R/Methods.R: gettextf("no method found for function %s and signature %s",     sQuote(fdef at generic), paste(.dQ(signature), collapse = ", "))
+#: R/Methods.R:0
+msgid "no method found for function %s and signature %s"
+msgstr "nie znaleziono metody dla funkcji %s oraz sygnatury %s"
 
-# methods/R/methodsTable.R: 471
-# stop("invalid or unset methods table in generic function \"",
-#                fdef at generic,"\"", damain = NA)
-msgid "invalid or unset methods table in generic function \""
-msgstr "niepoprawna lub nieustawiona tablica metod w ogólnej funkcji \""
+#. R/Methods.R: gettextf("no method found for function '%s' and signature %s",     f, paste(signature, collapse = ", "))
+#: R/Methods.R:0
+msgid "no method found for function '%s' and signature %s"
+msgstr "nie znaleziono metody dla funkcji '%s' oraz sygnatury %s"
 
-# methods/R/methodsTable.R: 474
-# stop("trying to find a methods table in a non-generic function")
-msgid "trying to find a methods table in a non-generic function"
-msgstr "próba znalezienia tablicy metod w nieogólnej funkcji"
+#. R/Methods.R: gettextf("no method found for signature %s", paste(signature,     collapse = ", "))
+#: R/Methods.R:0
+msgid "no method found for signature %s"
+msgstr "nie znaleziono metody dla sygnatury %s"
 
-# methods/R/methodsTable.R: 594
-# stop(gettextf("the \"ambiguousMethodSelection\" option should be a function to be called as the condition action; got an object of class %s",
-#                             dQuote(class(condAction))),
-#                    domain = NA)
-msgid ""
-"the \"ambiguousMethodSelection\" option should be a function to be called as "
-"the condition action; got an object of class %s"
-msgstr ""
-"opcja \"ambiguousMethodSelection\" powinna być funkcją wywoływaną jako akcja "
-"warunkowa; otrzymano obiekt klasy %s"
+#. R/trace.R: gettextf("no method in methods table for %s for signature %s",     sQuote(what), sQuote(signature))
+#: R/trace.R:0
+msgid "no method in methods table for %s for signature %s"
+msgstr "brak metod w tablicy metod dla %s dla sygnatury %s"
 
-# methods/R/methodsTable.R: 611
-# message(gettextf("No simply inherited methods found for function %s; using non-simple method",
-#                            sQuote(fdef at generic)),
-#                   domain = NA)
-msgid ""
-"No simply inherited methods found for function %s; using non-simple method"
+#. R/as.R: gettextf("no method or default for as() replacement of %s with Class=\"%s\"",     dQuote(thisClass), Class)
+#: R/as.R:0
+msgid "no method or default for as() replacement of %s with Class=\"%s\""
 msgstr ""
-"Nie znaleziono prostych dziedziczonych metod dla funkcji %s; używanie "
-"nieprostej metody"
+"brak metody lub wartości domyślnej dla zamiany 'as()' %s z 'class=\"%s\"'"
 
-# methods/R/methodsTable.R: 670
-# message(gettextf("Note: method with signature %s chosen for function %s,\n target signature %s.\n %s would also be valid",
-#                      sQuote(selected),
-#                      sQuote(attr(cond, "generic")),
-#                      sQuote(attr(cond, "target")),
-# 		     paste0('"', possible[is.na(match(possible, selected))], '"',
-# 			    collapse=", ")),
-#             domain = NA)
-msgid ""
-"Note: method with signature %s chosen for function %s,\n"
-" target signature %s.\n"
-" %s would also be valid"
+#. R/as.R: gettextf("no method or default for coercing %s to %s", dQuote(thisClass),     dQuote(Class))
+#: R/as.R:0
+msgid "no method or default for coercing %s to %s"
+msgstr "brak metody lub domyślnego schematu przekształcania %s w %s"
+
+#. R/RMethodUtils.R: gettextf("no method or default matching the \"...\" arguments in %s",     deparse(sys.call(sys.parent()), nlines = 1))
+#: R/RMethodUtils.R:0
+msgid "no method or default matching the \"...\" arguments in %s"
+msgstr "brak metody lub domyślnego dopasowania argumentów \"...\" w %s"
+
+#. R/RMethodUtils.R: gettextf("no methods found for %s; cacheGenericsMetaData() will have no effect",     sQuote(f))
+#: R/RMethodUtils.R:0
+msgid "no methods found for %s; cacheGenericsMetaData() will have no effect"
 msgstr ""
-"Uwaga: metoda z sygnaturą %s wybrana dla funkcji %s,\n"
-" docelowa sygnatura %s.\n"
-" %s również byłaby poprawna"
+"nie znaleziono metod dla %s; 'cacheGenericsMetaData()' nie będzie miał efektu"
 
-# methods/R/methodsTable.R: 754
-# stop(gettextf("unable to find an inherited method for function %s for signature %s",
-#                   sQuote(fdef at generic),
-#                   sQuote(cnames)),
-#          domain = NA)
-msgid "unable to find an inherited method for function %s for signature %s"
-msgstr "nie można znaleźć dziedziczonej metody dla funkcji %s dla sygnatury %s"
+#. R/methodsTable.R: gettextf("no methods table for generic %s from package %s in package %s",     sQuote(generic at generic), sQuote(generic at package), sQuote(getPackageName(where)))
+#: R/methodsTable.R:0
+msgid "no methods table for generic %s from package %s in package %s"
+msgstr "brak tablicy metod dla ogolnej funkcji %s z pakietu %s w pakiecie %s"
 
-# methods/R/methodsTable.R: 1114
-# stop("failed to find expected group generic function: ",
-#                                     what)
-msgid "failed to find expected group generic function:"
-msgstr "nie udało się znaleźć oczekiwanej funkcji grupy ogólnej:"
+#. R/addedFunctions.R: gettextf("no non-generic function %s found", sQuote(name))
+#: R/addedFunctions.R:0
+msgid "no non-generic function %s found"
+msgstr "nie znaleziono nie-ogólnej funkcji %s"
 
-# methods/R/methodsTable.R: 1135
-# stop(gettextf("invalid group generic function in search for inherited method (class %s)",
-#                     dQuote(class(gen))),
-#            domain = NA)
-msgid ""
-"invalid group generic function in search for inherited method (class %s)"
+#. R/SClasses.R: gettextf("no package name supplied and no class definition found for %s",     dQuote(className))
+#: R/SClasses.R:0
+msgid "no package name supplied and no class definition found for %s"
 msgstr ""
-"niepoprawna funkcja grupy ogólnej w poszukiwaniu dziedziczonej metody (klasa "
-"%s)"
+"nie dostarczono nazwy pakietu oraz nie znaleziono definicji klasy dla klasy "
+"%s"
 
-# methods/R/methodsTable.R: 1158
-# stop("invalid methods table request")
-msgid "invalid methods table request"
-msgstr "niepoprawne żądanie tablicy metod"
+#. R/RMethodUtils.R: stop("no suitable arguments to dispatch methods in this function")
+#. R/RMethodUtils.R: stop("no suitable arguments to dispatch methods in this function")
+#: R/RMethodUtils.R:0
+msgid "no suitable arguments to dispatch methods in this function"
+msgstr "brak odpowiednich argumentów do rozdzielenia metod w tej funkcji"
 
-# methods/R/methodsTable.R: 1178
-# warning(gettextf("trying to check signature length of group generic '%s', but it is not a group generic", what),
-#               domain = NA)
-msgid ""
-"trying to check signature length of group generic '%s', but it is not a "
-"group generic"
-msgstr ""
-"próba sprawdzenia długości sygnatury grupy ogólnej '%s', ale to nie jest "
-"grupa ogólna"
+#. R/RMethodUtils.R: gettextf("non-function action: %s", sQuote(fname))
+#: R/RMethodUtils.R:0
+msgid "non-function action: %s"
+msgstr "akcja nie-funkcji: %s"
+
+#. R/Methods.R: gettextf("non-generic function '%s' given to findMethods()",     f)
+#: R/Methods.R:0
+msgid "non-generic function '%s' given to findMethods()"
+msgstr "nieogólna funkcja '%s' przekazana do 'findMethods()'"
 
-# methods/R/methodsTable.R: 1204
-# warning(gettextf("trying to check signature length of generic '%s', but it is not a generic function: i = %d, funs = %s, gnames = %s",
-#                        what,  i, paste(unlist(funs), collapse = ", "),
-#                        paste(as.character(gnames), collapse = ", ")),
-#               domain = NA)
+#. R/refClass.R: gettextf("non-local assignment to method names is not allowed\n    %s\n( in method %s for class %s)",     paste(unlist(assigned$globals)[globalsInMethods], collapse = "; "),     methodName, className)
+#: R/refClass.R:0
 msgid ""
-"trying to check signature length of generic '%s', but it is not a generic "
-"function: i = %d, funs = %s, gnames = %s"
+"non-local assignment to method names is not allowed\n"
+"    %s\n"
+"( in method %s for class %s)"
 msgstr ""
-"próba sprawdzenia długości sygnatury funkcji ogólnej '%s', ale to nie jest "
-"funkcja ogólna: i = %d, funs = %s, gnames = %s"
-
-# methods/R/methodsTable.R: 1463
-# stop(gettextf("no methods table for generic %s from package %s in package %s",
-#                     sQuote(generic at generic),
-#                     sQuote(generic at package),
-#                     sQuote(getPackageName(where))),
-#            domain = NA)
-msgid "no methods table for generic %s from package %s in package %s"
-msgstr "brak tablicy metod dla ogolnej funkcji %s z pakietu %s w pakiecie %s"
+"nielokalne przypisanie do nazw metod nie jest dozwolone\n"
+"    %s\n"
+"(w metodzie %s dla klasy %s)"
 
-# methods/R/methodsTable.R: 1581
-# warning(gettextf("undefined classes (%s) will be ignored for argument '%s'",
-#                          paste0('"',unique(.undefClasses),'"', collapse=", "),
-#                          colnames(sigs)[[j]]), domain = NA)
-msgid "undefined classes (%s) will be ignored for argument '%s'"
-msgstr "niezdefiniowane klasy (%s) zostaną zignorowane dla argumentu '%s'"
+#. R/refClass.R: gettextf("non-local assignment to non-field names (possibly misspelled?)\n    %s\n( in method %s for class %s)",     paste(unlist(assigned$globals)[globalsNotFields], collapse = "; "),     methodName, className)
+#: R/refClass.R:0
+msgid ""
+"non-local assignment to non-field names (possibly misspelled?)\n"
+"    %s\n"
+"( in method %s for class %s)"
+msgstr ""
+"nielokalne przypisanie do nazw nie-pól (prawdopodobne literówki?)\n"
+"    %s\n"
+"( w metodzie %s klasy %s)"
 
-# methods/R/methodsTable.R: 1598
-# stop("argument 'signatures' must be a character matrix whose rows are method signatures")
+#. R/trace.R: stop("none of the objects in the source code could be found:  need to attach or specify the package")
+#: R/trace.R:0
 msgid ""
-"argument 'signatures' must be a character matrix whose rows are method "
-"signatures"
+"none of the objects in the source code could be found:  need to attach or "
+"specify the package"
 msgstr ""
-"argument 'signatures' musi być macierzą tekstową której wiersze są "
-"sygnaturami metod"
+"żaden z obiektów w kodzie źródłowym nie mógł zostać znaleziony:  potrzeba "
+"dołączyć lub określić pakiet"
+
+#. R/refClass.R: gettextf("not a reference class: %s", ClassDef at name)
+#. R/refClass.R: gettextf("not a reference class: %s", ClassDef at name)
+#: R/refClass.R:0
+msgid "not a reference class: %s"
+msgstr "to nie jest referencja klasy: %s"
 
-# methods/R/oldClass.R: 29
-# stop("not allowed to have test==TRUE and an S4Class definition")
+#. R/oldClass.R: stop("not allowed to have test==TRUE and an S4Class definition")
+#: R/oldClass.R:0
 msgid "not allowed to have test==TRUE and an S4Class definition"
 msgstr "niedozwolone by mieć 'test==TRUE' oraz definicję S4Class"
 
-# methods/R/oldClass.R: 38
-# stop(gettextf("argument 'S4Class' must be a class definition: got an object of class %s",
-#                             dQuote(class(S4Class))),
-#                    domain = NA)
-msgid ""
-"argument 'S4Class' must be a class definition: got an object of class %s"
-msgstr "argument 'S4Class' musi być definicją klasy: otrzymano obiekt klasy %s"
+#. R/Methods.R: gettext("not both functions!")
+#: R/Methods.R:0
+msgid "not both functions!"
+msgstr "jeden z argumentów nie jest funkcją!"
 
-# methods/R/oldClass.R: 77
-# stop(gettextf("inconsistent old-style class information for %s; the class is defined but does not extend %s and is not valid as the data part",
-#                                 dQuote(cl),
-#                                 dQuote(prevClass)),
-#                        domain = NA)
+#. R/fixPrevious.R: gettextf("object %s not changed (it does not appear to be from a version of R earlier than 1.8.0)",     sQuote(what))
+#: R/fixPrevious.R:0
 msgid ""
-"inconsistent old-style class information for %s; the class is defined but "
-"does not extend %s and is not valid as the data part"
+"object %s not changed (it does not appear to be from a version of R earlier "
+"than 1.8.0)"
 msgstr ""
-"niespójny stary styl informacji o klasie dla %s; klasa jest zdefiniowana, "
-"ale nie rozszerza %s oraz nie jest poprawna jako część danych"
+"obiekt %s nie został zmieniony (nie wygląda aby był z wersji R wcześniejszej "
+"niż 1.8.0)"
 
-# methods/R/oldClass.R: 101
-# stop(gettextf('the S3 class of the prototype, "%s", is undefined; only allowed when this is the S3 class being registered ("%s")', .class1(prototype), mainClass), domain = NA)
+#. R/fixPrevious.R: gettextf("object %s not changed (it is not consistent with the current definition of class %s from %s)",     sQuote(what), dQuote(Class), sQuote(ClassDef at package))
+#: R/fixPrevious.R:0
 msgid ""
-"the S3 class of the prototype, \"%s\", is undefined; only allowed when this "
-"is the S3 class being registered (\"%s\")"
+"object %s not changed (it is not consistent with the current definition of "
+"class %s from %s)"
 msgstr ""
-"klasa S3 prototypu, \"%s\", jest niezdefiniowana; dozwolone tylko jeśli jest "
-"to klasa S3 będąca w trakcie rejestracji (\"%s\")"
-
-# methods/R/oldClass.R: 121
-# message(gettextf("restoring definition of class %s", dQuote(cl)),
-#             domain = NA)
-msgid "restoring definition of class %s"
-msgstr "przywracanie definicji klasy %s"
+"obiekt %s nie został zmieniony (nie jest spójny z bieżącą definicją klasy %s "
+"z %s)"
 
-# methods/R/oldClass.R: 181
-# message(gettextf("slot %s: class %s should extend class %s",
-#                                sQuote(what),
-#                                dQuote(elNamed(slots1, what)),
-#                                dQuote(elNamed(slots2, what))),
-#                       domain = NA)
-msgid "slot %s: class %s should extend class %s"
-msgstr "gniazdo %s: klasa %s powinna rozszerzać klasę %s"
+#. R/fixPrevious.R: gettextf("object %s not found", sQuote(what))
+#: R/fixPrevious.R:0
+msgid "object %s not found"
+msgstr "obiekt %s nie został znaleziony"
 
-# methods/R/oldClass.R: 189
-# stop(
-#                gettextf("invalid S4 class corresponding to S3 class: slots in  S4 version must extend corresponding slots in S3 version: fails for %s",
-#                         paste0('"', bad, '"',  collapse = ", ")),
-#                domain = NA)
-msgid ""
-"invalid S4 class corresponding to S3 class: slots in  S4 version must extend "
-"corresponding slots in S3 version: fails for %s"
+#. R/BasicClasses.R: gettextf("object must be a valid data part for class %s; not true of type %s",     dQuote(cl), dQuote(class(data)))
+#: R/BasicClasses.R:0
+msgid "object must be a valid data part for class %s; not true of type %s"
 msgstr ""
-"niepoprawna klasa S4 odpowiadająca klasie S3: gniazda w wersji S4 muszą "
-"rozszerzać odpowiadające im sloty w wersji S3: nie powiodło się dla %s"
-
-# methods/R/oldClass.R: 207
-# stop(gettextf("explicit coercion of old-style class (%s) is not defined", paste(class(from), collapse = ", ")), domain = NA)
-msgid "explicit coercion of old-style class (%s) is not defined"
-msgstr "nie zdefiniowano jawnego przekształcenia klasy starego stylu (%s)"
+"obiekt musi być poprawną częścią danych dla klasy %s; nie jest to prawdą dla "
+"typu %s"
 
-# methods/R/oldClass.R: 211
-# stop(gettextf("explicit replacement not defined for as(x, \"%s\") <- value for old-style class %s",
-#                   to, dQuote(class(from)[1L])),
-#          domain = NA)
+#. R/MethodsList.R: gettextf("object to use as a method signature for function %s does not look like a legitimate signature (a vector of single class names): there were %d class names, but %d elements in the signature object",     sQuote(fun at generic), length(sigClasses), length(signature))
+#: R/MethodsList.R:0
 msgid ""
-"explicit replacement not defined for as(x, \"%s\") <- value for old-style "
-"class %s"
+"object to use as a method signature for function %s does not look like a "
+"legitimate signature (a vector of single class names): there were %d class "
+"names, but %d elements in the signature object"
 msgstr ""
-"nie zdefiniowano jawnej zamiany dla 'as(x, \"%s\") <- value' dla klasy "
-"starego stylu %s"
+"obiekt do użycia jako sygnatura metody dla funkcji %s nie wygląda na "
+"poprawną sygnaturę (wektor pojedynczych nazw klas): było %d nazw klas, ale "
+"%d elementów w obiekcie sygnatury"
 
-# methods/R/oldClass.R: 222
-# stop(gettextf("argument 'Classes' must be a vector of two classes; got an argument of length %d", length(Classes)), domain = NA)
-msgid ""
-"argument 'Classes' must be a vector of two classes; got an argument of "
-"length %d"
+#. R/trace.R: gettextf("objects found in multiple packages: using %s and ignoring %s",     sQuote(names(possible[[1L]])), paste(sQuote(names(possible[-1L])),         collapse = ", "))
+#: R/trace.R:0
+msgid "objects found in multiple packages: using %s and ignoring %s"
 msgstr ""
-"argument 'Classes' musi być wektorem dwóch klas; otrzymano argument o "
-"długości %d"
+"obiekty zostały znalezione w wielu pakietach: używanie %s oraz ignorowanie %s"
 
-# methods/R/oldClass.R: 226
-# warning(gettextf("inconsistent old-style class information for %s (maybe mixing old and new classes?)",
-#                                  dQuote(cl)), domain = NA)
+#. R/Methods.R: gettextf("only FALSE is meaningful for 'inherited', when 'where' is supplied (got %s)",     inherited)
+#: R/Methods.R:0
 msgid ""
-"inconsistent old-style class information for %s (maybe mixing old and new "
-"classes?)"
+"only FALSE is meaningful for 'inherited', when 'where' is supplied (got %s)"
 msgstr ""
-"niespójna informacja o starym stylu klasy dla %s (być może mieszanie starych "
-"oraz nowych klas?)"
+"tylko FALSE ma sens dla 'inherited', gdy dostarczono 'where' (otrzymano %s)"
 
-# methods/R/oldClass.R: 252
-# stop(gettextf("'S3Class' only defined for extensions of %s or classes with a data part:  not true of class %s",
-#                               dQuote("oldClass"),
-#                               dQuote(class(object))),
-#                      domain = NA)
+#. R/SClasses.R: stop("only arguments 'Class' and 'where' can be supplied when argument 'representation' is a 'classRepresentation' object")
+#: R/SClasses.R:0
 msgid ""
-"'S3Class' only defined for extensions of %s or classes with a data part:  "
-"not true of class %s"
+"only arguments 'Class' and 'where' can be supplied when argument "
+"'representation' is a 'classRepresentation' object"
 msgstr ""
-"'S3Class' zdefiniowana tylko dla rozszerzeń %s lub klas z częściami danych: "
-"nie jest to prawda dla klasy %s"
+"tylko argumenty 'Class' oraz 'where' mogą być dostarczone gdy argument "
+"'representation' jest obiektem klasy \"classRepresentation\""
 
-# methods/R/oldClass.R: 282
-# stop(gettextf("'S3Class' can only assign to S4 objects that extend \"oldClass\"; not true of class %s",
-#                              dQuote(class(object))),
-#                     domain = NA)
-msgid ""
-"'S3Class' can only assign to S4 objects that extend \"oldClass\"; not true "
-"of class %s"
+#. R/SClasses.R: stop("only one data object (unnamed argument to prototype) allowed")
+#: R/SClasses.R:0
+msgid "only one data object (unnamed argument to prototype) allowed"
 msgstr ""
-"'S3Class' może być przypisana do obiektów S4, które rozszerzają \"oldClass"
-"\"; nie jest to prawda dla klasy %s"
-
-# methods/R/packageName.R: 68
-# warning(gettextf("Created a package name, %s, when none found",
-#                          sQuote(pkg)),
-#                 domain = NA)
-msgid "Created a package name, %s, when none found"
-msgstr "Utworzono nazwę pakietu, %s, gdy nie znaleziono żadnej"
-
-# methods/R/promptClass.R: 95
-# stop(gettextf("no definition of class %s found",
-#                           dQuote(clName)), domain = NA)
-msgid "no definition of class %s found"
-msgstr "nie znaleziono definicji klasy %s"
+"tylko jeden obiekt danych (nienazwany argument przekazany do funkcji "
+"'prototype()') jest dozwolony"
 
-# methods/R/promptClass.R: 100
-# warning(gettextf("multiple definitions of %s found; using the one on %s",
-#                                  dQuote(clName), whereClass), domain = NA)
-msgid "multiple definitions of %s found; using the one on %s"
-msgstr "znaleziono wielokrotne definicje %s; używanie jednej z %s"
+#. R/Methods.R: gettext("original function is prohibited as a generic function")
+#: R/Methods.R:0
+msgid "original function is prohibited as a generic function"
+msgstr "oryginalna funkcja jest zakazana jako ogólna funkcja"
 
-# methods/R/refClass.R: 41
-# stop(gettextf("%s is not a valid field or method name for reference class %s",
-#                           sQuote(field),
-#                           dQuote(thisClass at className)),
-#                  domain = NA)
-msgid "%s is not a valid field or method name for reference class %s"
+#. R/trace.R: gettextf("package %s is not attached and no namespace found for it",     sQuote(package))
+#: R/trace.R:0
+msgid "package %s is not attached and no namespace found for it"
 msgstr ""
-"%s nie jest poprawnym polem lub nazwą metody dla klasy referencyjnej %s"
+"pakiet %s nie jest dołączony przez co nie znaleziono dla niego przestrzeni "
+"nazw"
 
-# methods/R/refClass.R: 71
-# stop(gettextf("a call to superClass() is in the method %s but there is no superclass definition of this method for class %s",
-#                           sQuote(me),
-#                           dQuote(thisClass at className)),
-#                  domain = NA)
-msgid ""
-"a call to superClass() is in the method %s but there is no superclass "
-"definition of this method for class %s"
-msgstr ""
-"wywołanie 'superClass()' jest w metodzie %s, ale brak tam definicji "
-"superklasy tej metody dla klasy %s"
+#. R/Methods.R: gettextf("package slots  differ: %s, %s", .dQ(gpString(f1 at package)),     .dQ(gpString(f2 at package)))
+#: R/Methods.R:0
+msgid "package slots  differ: %s, %s"
+msgstr "gniazda pakietów różnią się: %s, %s"
 
-# methods/R/refClass.R: 114
-# warning(gettextf("methods declared in usingMethods() but not found: %s",
-#                 paste0(declared[! declared %in% allMethods], collapse = ", ")))
-msgid "methods declared in usingMethods() but not found: %s"
+#. R/RClassUtils.R: gettextf("potential cycle in class inheritance: %s has duplicates in superclasses and subclasses (%s)",     dQuote(Class), paste(bad, collapse = ", "))
+#: R/RClassUtils.R:0
+msgid ""
+"potential cycle in class inheritance: %s has duplicates in superclasses and "
+"subclasses (%s)"
 msgstr ""
-"metody zostały zadeklarowanie w 'usingMethods() ', ale nie znaleziono: %s"
-
-# methods/R/refClass.R: 129
-# stop(gettextf("%s is not a reference class",
-#                       dQuote(Class)),
-#              domain = NA)
-# methods/R/refClass.R: 1260
-# stop(gettextf("%s is not a reference class",
-#              dQuote(def at className)))
-msgid "%s is not a reference class"
-msgstr "%s nie jest klasą referencyjną"
-
-# methods/R/refClass.R: 139
-# stop(gettextf("%s is not a field in class %s",
-#                       sQuote(field),
-#                       dQuote(thisClass at className)),
-#              domain = NA)
-# methods/R/refClass.R: 628
-# stop(gettextf("%s is not a field in class %s",
-#                           sQuote(what),
-#                           dQuote(def at className)),
-#                  domain = NA)
-# methods/R/refClass.R: 1200
-# stop(gettextf("%s is not a field in class %s",
-#                           sQuote(what),
-#                           dQuote(className)),
-#                  domain = NA)
-msgid "%s is not a field in class %s"
-msgstr "%s nie jest polem w klasie %s"
+"potencjalny cykl w dziedziczeniu klasy: %s ma powtórzenia w superklasach "
+"oraz podklasach (%s)"
 
-# methods/R/refClass.R: 213
-# warning(gettextf("unnamed arguments to $new() must be objects from a reference class; got an object of class %s",
-#                                  dQuote(class(super))),
-#                         domain = NA)
+#. R/Methods.R: stop("primitive functions cannot be methods; they must be enclosed in a regular function")
+#: R/Methods.R:0
 msgid ""
-"unnamed arguments to $new() must be objects from a reference class; got an "
-"object of class %s"
+"primitive functions cannot be methods; they must be enclosed in a regular "
+"function"
 msgstr ""
-"nienazwane argumenty przekazane do '$new()' muszą być obiektami z klasy "
-"referencyjnej; otrzymano obiekt klasy %s"
-
-# methods/R/refClass.R: 247
-# stop(gettextf("%s is not a valid field or method name for this class",
-#                       sQuote(what)),
-#              domain = NA)
-msgid "%s is not a valid field or method name for this class"
-msgstr "%s nie jest poprawnym polem lub nazwą metody dla tej klasy"
+"prymitywne funkcje nie mogą być metodami; muszą być zawarte w regularnej "
+"funkcji"
 
-# methods/R/refClass.R: 282
-# stop(gettextf("the class of field %s in the object is not compatible with the desired class %s in the target",
-#                                        sQuote(field),
-#                                        dQuote(fieldClasses[[field]])),
-#                               domain = NA)
-# methods/R/refClass.R: 319
-# stop(gettextf("the class of field %s in the object is not compatible with the desired class %s in the target",
-#                                        sQuote(field),
-#                                        dQuote(fieldClasses[[field]])),
-#                               domain = NA)
+#. R/RClassUtils.R: warning("prototype is a list with named elements (could be ambiguous):  better to use function prototype() to avoid trouble.")
+#: R/RClassUtils.R:0
 msgid ""
-"the class of field %s in the object is not compatible with the desired class "
-"%s in the target"
-msgstr "klasa pola %s w obiekcie nie jest zgodna z pożądaną klasą %s w celu"
+"prototype is a list with named elements (could be ambiguous):  better to use "
+"function prototype() to avoid trouble."
+msgstr ""
+"prototyp jest listą z nazwanymi elementami (mogą być niejednoznaczne):  "
+"lepiej używać funkcji 'prototype()' aby uniknąć kłopotów."
 
-# methods/R/refClass.R: 293
-# stop(gettextf("%s is not a defined class in this environment",
-#                                dQuote(Class)),
-#                       domain = NA)
-msgid "%s is not a defined class in this environment"
-msgstr " %s nie jest zdefiniowaną klasą w tym środowisku"
+#. R/ClassExtensions.R: gettextf("replacement value must be of class %s, got one of class %s",     dQuote(CLASS), dQuote(class(value)[[1L]]))
+#: R/ClassExtensions.R:0
+msgid "replacement value must be of class %s, got one of class %s"
+msgstr "wartość zastępcza musi być klasy %s, otrzymano jedną klasy %s"
 
-# methods/R/refClass.R: 297
-# stop("invalid 'Class' argument:  should be a single string")
-msgid "invalid 'Class' argument:  should be a single string"
-msgstr "niepoprawny argument 'Class': powinien być pojedycznym łańcuchem"
+#. R/ClassExtensions.R: gettextf("replacement value must extend class %s, got %s", dQuote(needClass),     dQuote(S3Class[[1L]]))
+#: R/ClassExtensions.R:0
+msgid "replacement value must extend class %s, got %s"
+msgstr "wartość zastępcza musi rozszerzać klasę %s, otrzymano %s"
 
-# methods/R/refClass.R: 328
-# stop(gettextf("%s is not one of the reference super classes for this object",
-#                                dQuote(Class)),
-#                       domain = NA)
-msgid "%s is not one of the reference super classes for this object"
-msgstr "Klasa %s nie jest jedną z referencyjnych superklas dla tego obiektu"
+#. R/oldClass.R: gettextf("restoring definition of class %s", dQuote(cl))
+#: R/oldClass.R:0
+msgid "restoring definition of class %s"
+msgstr "przywracanie definicji klasy %s"
 
-# methods/R/refClass.R: 332
-# stop("direct calls to callSuper() are invalid:  should only be called from another method")
+#. R/trace.R: gettextf("setting a method over the binding of symbol %s in environment/package %s",     sQuote(what), sQuote(getPackageName(where)))
+#: R/trace.R:0
 msgid ""
-"direct calls to callSuper() are invalid:  should only be called from another "
-"method"
+"setting a method over the binding of symbol %s in environment/package %s"
 msgstr ""
-"bezpośrednie wywołania 'callSuper()' są niepoprawne:  powinna być wywoływana "
-"tylko z innej metody"
+"ustawianie metody poprzez powiązanie symbolu %s w środowisku/pakiecie %s"
 
-# methods/R/refClass.R: 358
-# stop(gettextf("%s is not a field in this class",
-#                                sQuote(name)),
-#                       domain = NA)
-msgid "%s is not a field in this class"
-msgstr "%s nie jest polem w tej klasie"
+#. R/Methods.R: gettextf("signatures differ:  (%s), (%s)", paste(f1 at signature,     collapse = ", "), paste(f2 at signature, collapse = ", "))
+#: R/Methods.R:0
+msgid "signatures differ:  (%s), (%s)"
+msgstr "sygnatury różnią się:  (%s), (%s)"
 
-# methods/R/refClass.R: 519
-# stop(gettextf("the definition of class %s in package %s is locked, methods may not be redefined",
-#                       dQuote(def at className),
-#                       sQuote(def at package)),
-#              domain = NA)
-msgid ""
-"the definition of class %s in package %s is locked, methods may not be "
-"redefined"
-msgstr ""
-"definicja klasy %s w pakiecie %s jest zablokowana, metody nie mogą zostać "
-"przedefiniowane"
+#. R/RMethodUtils.R: gettextf("single string; got an object of class %s", dQuote(class(what)[[1L]]))
+#: R/RMethodUtils.R:0
+msgid "single string; got an object of class %s"
+msgstr "pojedynczy łańcuch; otrzymano obiekt klasy %s"
 
-# methods/R/refClass.R: 529
-# stop("arguments to methods() must be named, or one named list")
-msgid "arguments to methods() must be named, or one named list"
-msgstr ""
-"argumenty przekazane do 'methods()' muszą być nazwane lub być jedną nazwaną "
-"listą"
+#. R/MethodsList.R: gettextf("skipping methods list element %s of unexpected class %s\n\n",     paste(cnames[i], collapse = ", "), dQuote(.class1(mi)))
+#: R/MethodsList.R:0
+msgid "skipping methods list element %s of unexpected class %s"
+msgstr "pomijanie elementów listy metod %s nieoczekiwanej klasy %s"
 
+#. R/RClassUtils.R: gettextf("slot %s in class %s currently defined (or inherited) as \"%s\", conflicts with an inherited definition in class %s",     sQuote(dup), dQuote(name), elNamed(allProps, dup), dQuote(cl))
+#: R/RClassUtils.R:0
 msgid ""
-"topic %s is not a method name in class %s\n"
-"The class definition follows"
+"slot %s in class %s currently defined (or inherited) as \"%s\", conflicts "
+"with an inherited definition in class %s"
 msgstr ""
-"temat %s nie jest nazwą metody w klasie %s\n"
-"Definicja klasy przedstawia się następująco"
+"gniazdo %s w klasie %s aktualnie zdefiniowane (lub odziedziczone) jako %s, "
+"jest w konflikcie z odziedziczoną definicją w klasie %s"
 
-# methods/R/refClass.R: 614
-# stop(gettextf("the definition of class %s in package %s is locked so fields may not be modified",
-#                       dQuote(def at className),
-#                       sQuote(def at package)),
-#              domain = NA)
-# methods/R/refClass.R: 1186
-# stop(gettextf("the definition of class %s in package %s is locked so fields may not be modified",
-#                       dQuote(def at className),
-#                       sQuote(def at package)),
-#              domain = NA)
-msgid ""
-"the definition of class %s in package %s is locked so fields may not be "
-"modified"
-msgstr ""
-"definicja klasy %s w pakiecie %s jest zablokowana, pola nie mogą zostać "
-"zmodyfikowane"
+#. R/oldClass.R: gettextf("slot %s: class %s should extend class %s", sQuote(what),     dQuote(slots1[[what]]), dQuote(slots2[[what]]))
+#: R/oldClass.R:0
+msgid "slot %s: class %s should extend class %s"
+msgstr "gniazdo %s: klasa %s powinna rozszerzać klasę %s"
 
-# methods/R/refClass.R: 693
-# stop(gettextf("the overriding class (\"%s\") of field %s is not a subclass of the existing field definition (\"%s\")",
-#                               value[[field]],
-#                               sQuote(field),
-#                               fieldList[[field]]),
-#                      domain = NA)
-msgid ""
-"the overriding class (\"%s\") of field %s is not a subclass of the existing "
-"field definition (\"%s\")"
-msgstr ""
-"nadrzędna 'class(\"%s\")' pola %s nie jest podklasą istniejącej definicji "
-"pola (\"%s\")"
+#. R/RMethodUtils.R: gettextf("some actions are missing: %s", paste(actions[!allExists],     collapse = ", "))
+#: R/RMethodUtils.R:0
+msgid "some actions are missing: %s"
+msgstr "brakuje niektórych akcji: %s"
 
-# methods/R/refClass.R: 752
-# stop(gettextf("invalid assignment for reference class field %s, should be from class %s or a subclass (was class %s)",
-#                        sQuote(fieldName), dQuote(fieldClass), dQuote(class(value))), call. = FALSE)
+#. R/RClassUtils.R: gettextf("subclass %s of class %s is not local and cannot be updated for new inheritance information; consider setClassUnion()",     .dQ(what), .dQ(class))
+#: R/RClassUtils.R:0
 msgid ""
-"invalid assignment for reference class field %s, should be from class %s or "
-"a subclass (was class %s)"
+"subclass %s of class %s is not local and cannot be updated for new "
+"inheritance information; consider setClassUnion()"
 msgstr ""
-"niepoprawne przypisanie dla pola %s klasy referencyjnej, powinien być z "
-"klasy %s lub podklasy (była klasa %s)"
+"podklasa %s klasy %s nie jest lokalna i nie może być zaktualizowana dla "
+"nowych dziedziczonych informacji; rozważ 'setClassUnion()'"
 
-# methods/R/refClass.R: 757
-# stop(gettextf("invalid replacement: reference class field %s is read-only", sQuote(fieldName)),
-#                  call. = FALSE)
-msgid "invalid replacement: reference class field %s is read-only"
-msgstr "niepoprawna zamiana: pole %s klasy referencyjnej jest tylko do odczytu"
+#. R/trace.R: gettextf("supplied package, %s, differs from package inferred from source, %s",     sQuote(package), sQuote(envPackage))
+#: R/trace.R:0
+msgid "supplied package, %s, differs from package inferred from source, %s"
+msgstr ""
+"dostarczony pakiet, %s, różni się od pakietu wywnioskowanego ze źródła, %s"
 
-# methods/R/refClass.R: 777
-# stop(gettextf("the 'contains' argument should be the names of superclasses:  got an element of class %s",
-#                                                        dQuote(class(what))),
-#                                               domain = NA)
+#. R/methodsTable.R: gettextf("the \"ambiguousMethodSelection\" option should be a function to be called as the condition action; got an object of class %s",     dQuote(class(condAction)))
+#: R/methodsTable.R:0
 msgid ""
-"the 'contains' argument should be the names of superclasses:  got an element "
-"of class %s"
+"the \"ambiguousMethodSelection\" option should be a function to be called as "
+"the condition action; got an object of class %s"
 msgstr ""
-"argument 'contains' powinien być nazwami superklas: otrzymano element klasy "
-"%s"
-
-# methods/R/refClass.R: 783
-# stop(gettextf("no definition found for inherited class: %s",
-#                           paste0('"',contains[missingDefs], '"', collapse = ", ")),
-#                  domain = NA)
-msgid "no definition found for inherited class: %s"
-msgstr "nie znaleziono definicji dla dziedziczonej klasy: %s"
+"opcja \"ambiguousMethodSelection\" powinna być funkcją wywoływaną jako akcja "
+"warunkowa; otrzymano obiekt klasy %s"
 
-# methods/R/refClass.R: 819
-# stop(gettextf("a single class name is needed for field %s, got a character vector of length %d",
-#                               sQuote(thisName),
-#                               length(thisField)),
-#                      domain = NA)
+#. R/RMethodUtils.R: gettextf("the %s argument must be NULL or a generic function object; got an object of class %s",     sQuote("genericFunction"), dQuote(class(genericFunction)))
+#: R/RMethodUtils.R:0
 msgid ""
-"a single class name is needed for field %s, got a character vector of length "
-"%d"
+"the %s argument must be NULL or a generic function object; got an object of "
+"class %s"
 msgstr ""
-"potrzeba pojedynczej nazwy klasy dla pola %s, otrzymano wektor tekstowy o "
-"długości %d"
+"argument %s musi być wartością NULL lub obiektem ogólnej funkcji; otrzymano "
+"obiekt klasy %s"
 
-# methods/R/refClass.R: 824
-# stop(gettextf("class %s for field %s is not defined",
-#                               dQuote(thisField),
-#                               sQuote(thisName)),
-#                      domain = NA)
-msgid "class %s for field %s is not defined"
-msgstr "klasa %s dla pola %s nie jest zdefiniowana"
+#. R/RClassUtils.R: gettextf("the '%s' list for class %s, includes an undefined class %s",     if (superClassCase) "superClass" else "subClass", dQuote(className),     dQuote(.className(by)))
+#: R/RClassUtils.R:0
+msgid "the '%s' list for class %s, includes an undefined class %s"
+msgstr "lista '%s' dla klasy %s, zawiera w sobie niezdefiniowaną klasę %s"
 
-# methods/R/refClass.R: 843
-# stop(gettextf("field %s was supplied as an object of class %s; must be a class name or a binding function",
-#                           sQuote(thisName),
-#                           dQuote(class(thisField))),
-#                  domain = NA)
+#. R/ClassExtensions.R: gettextf("the 'S3Class' argument must be a superclass of %s:  not true of class %s",     dQuote(class(object)), dQuote(S3Class))
+#: R/ClassExtensions.R:0
 msgid ""
-"field %s was supplied as an object of class %s; must be a class name or a "
-"binding function"
+"the 'S3Class' argument must be a superclass of %s:  not true of class %s"
 msgstr ""
-"pole %s zostało dostarczone jako obiekt klasy %s; musi być nazwa klasy lub "
-"funkcja wiążąca"
+"argument 'S3Class' musi być superklasą %s: nie jest to prawdą dla klasy %s"
 
-# methods/R/refClass.R: 904
-# message(gettextf("code for methods in class %s was not checked for suspicious field assignments (recommended package %s not available?)",
-#                          dQuote(Class),
-#                          sQuote("codetools"))
-#                 , domain = NA)
+#. R/ClassExtensions.R: gettextf("the 'coerce' argument to 'setIs' should be a function of one argument, got an object of class %s",     dQuote(class(coerce)))
+#: R/ClassExtensions.R:0
 msgid ""
-"code for methods in class %s was not checked for suspicious field "
-"assignments (recommended package %s not available?)"
+"the 'coerce' argument to 'setIs' should be a function of one argument, got "
+"an object of class %s"
 msgstr ""
-"kod dla metod w klasie %s nie był sprawdzony pod kątem podejrzanych "
-"przypisań pól (rekomendowany pakiet %s nie jest dostępny?)"
-
-# methods/R/refClass.R: 971
-# stop(gettextf("class %s is defined but is not a reference class",
-#                           dQuote(Class)),
-#                  domain = NA)
-msgid "class %s is defined but is not a reference class"
-msgstr "klasa %s jest zdefiniowana, ale nie jest referencyjną klasą"
+"argument 'coerce' przekazywany do 'setIs' powinien być funkcją jednego "
+"argumentu, otrzymano obiekt klasy %s"
 
-# methods/R/refClass.R: 976
-# stop(gettextf("class must be a reference class representation or a character string; got an object of class %s",
-#                       dQuote(class(Class))),
-#              domain = NA)
+#. R/refClass.R: gettextf("the 'contains' argument should be the names of superclasses:  got an element of class %s",     dQuote(class(what)))
+#: R/refClass.R:0
 msgid ""
-"class must be a reference class representation or a character string; got an "
-"object of class %s"
+"the 'contains' argument should be the names of superclasses:  got an element "
+"of class %s"
 msgstr ""
-"klasa musi być referencyjną reprezentacją klasy lub łańcuchem tekstowym; "
-"otrzymano obiekt klasy %s"
-
-# methods/R/refClass.R: 994
-# stop(gettextf("not a reference class: %s", ClassDef at name),
-#              domain = NA)
-# methods/R/refClass.R: 1003
-# stop(gettextf("not a reference class: %s", ClassDef at name),
-#              domain = NA)
-msgid "not a reference class: %s"
-msgstr "to nie jest referencja klasy: %s"
+"argument 'contains' powinien być nazwami superklas: otrzymano element klasy "
+"%s"
 
-# methods/R/refClass.R: 1131
-# warning(gettextf("local assignment to field name will not change the field:\n    %s\n Did you mean to use \"<<-\"? ( in method %s for class %s)",
-#                 paste(unlist(assigned$locals)[localsAreFields], collapse="; "), methodName, className),
-#                 domain = NA)
+#. R/ClassExtensions.R: gettextf("the 'replace' argument to setIs() should be a function of 2 or 3 arguments, got an object of class %s",     dQuote(class(replace)))
+#: R/ClassExtensions.R:0
 msgid ""
-"local assignment to field name will not change the field:\n"
-"    %s\n"
-" Did you mean to use \"<<-\"? ( in method %s for class %s)"
+"the 'replace' argument to setIs() should be a function of 2 or 3 arguments, "
+"got an object of class %s"
 msgstr ""
-"lokalne przypisanie do nazwy pola nie zmieni pola:\n"
-"    %s\n"
-" Czy chciałeś użyć \"<<-\"? ( w metodzie %s klasy %s)"
+"argument 'replace' przekazywany do 'setIs()' powinien być funkcją 2 lub 3 "
+"argumentów, otrzymano obiekt klasy %s"
 
-# methods/R/refClass.R: 1139
-# warning(gettextf("non-local assignment to non-field names (possibly misspelled?)\n    %s\n( in method %s for class %s)",
-#                 paste(unlist(assigned$globals)[globalsNotFields], collapse="; "), methodName, className),
-#                 domain = NA)
+#. R/Methods.R: gettextf("the 'where' environment (%s) is a locked namespace; cannot assign methods there",     getPackageName(where))
+#: R/Methods.R:0
 msgid ""
-"non-local assignment to non-field names (possibly misspelled?)\n"
-"    %s\n"
-"( in method %s for class %s)"
+"the 'where' environment (%s) is a locked namespace; cannot assign methods "
+"there"
 msgstr ""
-"nielokalne przypisanie do nazw nie-pól (prawdopodobne literówki?)\n"
-"    %s\n"
-"( w metodzie %s klasy %s)"
+"środowisko 'where' (%s) jest zablokowaną przestrzenią nazw; nie można "
+"przypisać tam metod"
 
-# methods/R/refClass.R: 1144
-# stop(gettextf("non-local assignment to method names is not allowed\n    %s\n( in method %s for class %s)",
-#                 paste(unlist(assigned$globals)[globalsInMethods], collapse="; "), methodName, className),
-#                 domain = NA)
+#. R/oldClass.R: gettextf("the S3 class of the prototype, \"%s\", is undefined; only allowed when this is the S3 class being registered (\"%s\")",     .class1(prototype), mainClass)
+#: R/oldClass.R:0
 msgid ""
-"non-local assignment to method names is not allowed\n"
-"    %s\n"
-"( in method %s for class %s)"
+"the S3 class of the prototype, \"%s\", is undefined; only allowed when this "
+"is the S3 class being registered (\"%s\")"
 msgstr ""
-"nielokalne przypisanie do nazw metod nie jest dozwolone\n"
-"    %s\n"
-"(w metodzie %s dla klasy %s)"
+"klasa S3 prototypu, \"%s\", jest niezdefiniowana; dozwolone tylko jeśli jest "
+"to klasa S3 będąca w trakcie rejestracji (\"%s\")"
 
-# methods/R/refClass.R: 1184
-# stop("arguments must all be character string names of fields")
-msgid "arguments must all be character string names of fields"
-msgstr "wszystkie argumenty muszą być łańcuchami tekstowymi nazw pól"
+#. R/RMethodUtils.R: gettextf("the body of the generic function for %s calls 'standardGeneric' to dispatch on a different name (\"%s\")!",     sQuote(fname), paste(as.character(x[[2L]]), collapse = "\n"))
+#: R/RMethodUtils.R:0
+msgid ""
+"the body of the generic function for %s calls 'standardGeneric' to dispatch "
+"on a different name (\"%s\")!"
+msgstr ""
+"ciało ogólnej funkcji dla %s wywołuje 'standardGeneric' by rozdzielić pod "
+"inna nazwą ('%s')!"
 
-# methods/R/refClass.R: 1194
-# warning(gettextf("field %s is already locked", sQuote(what)),
-#                     domain = NA)
-msgid "field %s is already locked"
-msgstr "pole %s jest już zablokowane"
+#. R/refClass.R: gettextf("the class of field %s in the object is not compatible with the desired class %s in the target",     sQuote(field), dQuote(fieldClasses[[field]]))
+#. R/refClass.R: gettextf("the class of field %s in the object is not compatible with the desired class %s in the target",     sQuote(field), dQuote(fieldClasses[[field]]))
+#: R/refClass.R:0
+msgid ""
+"the class of field %s in the object is not compatible with the desired class "
+"%s in the target"
+msgstr "klasa pola %s w obiekcie nie jest zgodna z pożądaną klasą %s w celu"
 
-# methods/R/refClass.R: 1209
-# stop(gettextf("field %s of class %s has a non-default binding and cannot be locked",
-#                               sQuote(what),
-#                               dQuote(className)),
-#                      domain = NA)
-msgid "field %s of class %s has a non-default binding and cannot be locked"
+#. R/ClassExtensions.R: gettextf("the computation: 'as(object,\"%s\") <- value' is valid when object has class %s only if 'is(value, \"%s\")' is TRUE ('class(value)' was %s)\n",     TO, dQuote(FROM), TO, dQuote(class(value)))
+#: R/ClassExtensions.R:0
+msgid ""
+"the computation: 'as(object,\"%s\") <- value' is valid when object has class "
+"%s only if 'is(value, \"%s\")' is TRUE ('class(value)' was %s)"
 msgstr ""
-"pole %s klasy %s posiada niedomyślne powiązanie i nie może zostać zablokowane"
+"obliczenie: 'as(object,\"%s\") <- value' jest poprawne gdy obiekt posiada "
+"klasę %s tylko jeśli 'is(value, \"%s\")' jest TRUE ('class(value)' było %s)"
 
-# methods/R/refClass.R: 1278
-# stop(gettextf("Class %s is not a subclass of %s; functional semantics not defined for this class", dQuote(class(object)), dQuote("envRefClass")))
+#. R/refClass.R: gettextf("the definition of class %s in package %s is locked so fields may not be modified",     dQuote(def at className), sQuote(def at package))
+#. R/refClass.R: gettextf("the definition of class %s in package %s is locked so fields may not be modified",     dQuote(def at className), sQuote(def at package))
+#: R/refClass.R:0
 msgid ""
-"Class %s is not a subclass of %s; functional semantics not defined for this "
-"class"
+"the definition of class %s in package %s is locked so fields may not be "
+"modified"
 msgstr ""
-"Klasa %s nie jest podklasą %s; semantyka funkcjonalna nie jest zdefiniowana "
-"dla tej klasy"
-
-# methods/R/refClass.R: 1298
-# stop("Could not find local object in supplied environment")
-msgid "Could not find local object in supplied environment"
-msgstr "Nie można znaleźć lokalnego obiektu w dostarczonym środowisku"
+"definicja klasy %s w pakiecie %s jest zablokowana, pola nie mogą zostać "
+"zmodyfikowane"
 
-# methods/R/show.R: 83
-# stop(gettextf("invalid 'ignore' argument; should be a class definition or a character vector, got an object of class %s", dQuote(class(ignore))),
-#            domain = NA)
+#. R/refClass.R: gettextf("the definition of class %s in package %s is locked, methods may not be redefined",     dQuote(def at className), sQuote(def at package))
+#: R/refClass.R:0
 msgid ""
-"invalid 'ignore' argument; should be a class definition or a character "
-"vector, got an object of class %s"
+"the definition of class %s in package %s is locked, methods may not be "
+"redefined"
 msgstr ""
-"niepoprawny argument 'ignore'; powinien być definicją klasy lub łańcuchem "
-"tekstowym; otrzymano obiekt klasy %s"
+"definicja klasy %s w pakiecie %s jest zablokowana, metody nie mogą zostać "
+"przedefiniowane"
 
-# methods/R/show.R: 153
-# message(gettextf("An object of class %s", dQuote(class(object))),
-#                 domain = NA)
-msgid "An object of class %s"
-msgstr "Obiekt klasy %s"
+#. R/trace.R: stop("the editing in trace() can only change the body of the function, not the arguments or defaults")
+#: R/trace.R:0
+msgid ""
+"the editing in trace() can only change the body of the function, not the "
+"arguments or defaults"
+msgstr ""
+"edytowanie w 'trace()' może zmienić jedynie ciało funkcji, a nie argumenty "
+"lub wartości domyślne"
 
-# methods/R/show.R: 181
-# stop(gettextf("invalid call to 'classLabel': expected a name or a class definition, got an object of class %s", classLabel(class(Class))), domain = NA)
+#. R/trace.R: gettextf("the editing in trace() can only change the body of the function; got an object of class %s",     dQuote(class(def2)))
+#: R/trace.R:0
 msgid ""
-"invalid call to 'classLabel': expected a name or a class definition, got an "
+"the editing in trace() can only change the body of the function; got an "
 "object of class %s"
 msgstr ""
-"niepoprawne wywołanie przekazane do 'classLabel': oczekiwano nazwy lub "
-"definicji klasy, otrzymano obiekt klasy %s"
+"edytowanie w 'trace()' może zmienić jedynie ciało funkcji; otrzymano obiekt "
+"klasy %s"
 
-# methods/R/trace.R: 65
-# stop("argument 'signature' is not meaningful for tracing reference methods")
-msgid "argument 'signature' is not meaningful for tracing reference methods"
-msgstr "argument 'signature' nie ma sensu dla śledzenia metod referencyjnych"
+#. R/Methods.R: gettextf("the environment %s is locked; cannot assign methods for function %s",     sQuote(getPackageName(where)), sQuote(f))
+#: R/Methods.R:0
+msgid "the environment %s is locked; cannot assign methods for function %s"
+msgstr ""
+"środowisko %s jest zablokowane; nie można przypisać metod dla funkcji %s"
 
-# methods/R/trace.R: 83
-# stop(gettextf("%s is not a method for reference class %s",
-#                           sQuote(as.character(if(is.symbol(thisName)) thisName else what)),
-#                           dQuote(class(where))),
-#                  domain = NA)
-msgid "%s is not a method for reference class %s"
-msgstr "%s nie jest metodą dla klasy referencyjnej %s"
+#. R/RMethodUtils.R: gettextf("the function being used as %s in making a generic function for %s is currently traced; the function used will have tracing removed",     what, sQuote(f))
+#: R/RMethodUtils.R:0
+msgid ""
+"the function being used as %s in making a generic function for %s is "
+"currently traced; the function used will have tracing removed"
+msgstr ""
+"funkcja użyta jako %s podczas tworzenia ogólnej funkcji dla %s jest "
+"aktualnie śledzona; użyta funkcja będzie miała usunięte śledzenie"
 
-# methods/R/trace.R: 119
-# stop("argument 'what' should be the name of a function")
-msgid "argument 'what' should be the name of a function"
-msgstr "argument 'what' musi być nazwą funkcji"
+#. R/ClassUnion.R: gettextf("the member classes must be defined: not true of %s",     paste(.dQ(as(members[!membersDefined], "character")), collapse = ", "))
+#: R/ClassUnion.R:0
+msgid "the member classes must be defined: not true of %s"
+msgstr "klasy członkowe muszą być zdefiniowane: nie jest to prawda dla %s"
 
-# methods/R/trace.R: 138
-# stop(gettextf("tracing the internal function %s is not allowed",
-#                       sQuote(what)))
-msgid "tracing the internal function %s is not allowed"
-msgstr "śledzenie wewnętrznej funkcji %s nie jest dozwolone"
+#. R/trace.R: gettextf("the method for %s for this signature was not being traced",     sQuote(what))
+#: R/trace.R:0
+msgid "the method for %s for this signature was not being traced"
+msgstr "metoda dla %s dla tej sygnatury nie była śledzona"
 
-# methods/R/trace.R: 149
-# stop(gettextf("no function definition for %s found",
-#                           sQuote(what)),
-#                  domain = NA)
-msgid "no function definition for %s found"
-msgstr "nie znaleziono definicji funkcji dla %s"
+#. R/Methods.R: gettextf("the method for function %s and signature %s is sealed and cannot be re-defined",     sQuote(f), .signatureString(fdef, signature))
+#: R/Methods.R:0
+msgid ""
+"the method for function %s and signature %s is sealed and cannot be re-"
+"defined"
+msgstr ""
+"metoda dla funkcji %s oraz sygnatury %s jest zamknięta i nie może być "
+"przedefiniowana"
 
-# methods/R/trace.R: 165
-# warning(gettextf("cannot untrace method for %s; no method defined for this signature: %s",
-#                              sQuote(what),
-#                              paste(signature, collapse = ", ")),
-#                     domain = NA)
-msgid "cannot untrace method for %s; no method defined for this signature: %s"
+#. R/MethodsListClass.R: gettext("the names in signature for method (%s) do not match %s's arguments (%s)",     domain = "R-methods")
+#: R/MethodsListClass.R:0
+msgid "the names in signature for method (%s) do not match %s's arguments (%s)"
 msgstr ""
-"nie można zwolnić śledzenia metody dla %s; nie zdefiniowano metody dla tej "
-"sygnatury: %s"
+"nazwy w sygnaturze dla metody (%s) nie zgadzają się z argumentami %s (%s)"
 
-# methods/R/trace.R: 194
-# warning(gettextf("the method for %s for this signature was not being traced",
-#                                  sQuote(what)),
-#                         domain = NA)
-msgid "the method for %s for this signature was not being traced"
-msgstr "metoda dla %s dla tej sygnatury nie była śledzona"
+#. R/MethodsListClass.R: gettext("the names in signature for method (%s) do not match function's arguments (%s)",     domain = "R-methods")
+#: R/MethodsListClass.R:0
+msgid ""
+"the names in signature for method (%s) do not match function's arguments (%s)"
+msgstr ""
+"nazwy w sygnaturze dla metody (%s) nie zgadzają się z argumentami funkcji "
+"(%s)"
 
-# methods/R/trace.R: 311
-# warning("making a traced version of a primitive; arguments will be treated as '...'")
+#. R/refClass.R: gettextf("the overriding class (\"%s\") of field %s is not a subclass of the existing field definition (\"%s\")",     value[[field]], sQuote(field), fieldList[[field]])
+#: R/refClass.R:0
 msgid ""
-"making a traced version of a primitive; arguments will be treated as '...'"
+"the overriding class (\"%s\") of field %s is not a subclass of the existing "
+"field definition (\"%s\")"
 msgstr ""
-"tworzenie śledzonej wersji funkcji prymitywnej; argumenty będą traktowane "
-"jak  '...'"
+"nadrzędna 'class(\"%s\")' pola %s nie jest podklasą istniejącej definicji "
+"pola (\"%s\")"
 
-# methods/R/trace.R: 338
-# stop(gettextf("the editing in trace() can only change the body of the function; got an object of class %s",
-#                           dQuote(class(def2))),
-#                  domain = NA)
+#. R/ClassExtensions.R: gettextf("there is no automatic definition for 'as(object, \"%s\") <- value' when object has class %s and no 'replace' argument was supplied; replacement will be an error",     to, dQuote(Class))
+#: R/ClassExtensions.R:0
 msgid ""
-"the editing in trace() can only change the body of the function; got an "
-"object of class %s"
+"there is no automatic definition for 'as(object, \"%s\") <- value' when "
+"object has class %s and no 'replace' argument was supplied; replacement will "
+"be an error"
 msgstr ""
-"edytowanie w 'trace()' może zmienić jedynie ciało funkcji; otrzymano obiekt "
-"klasy %s"
+"nie ma automatycznej definicji dla 'as(obiekt, \"%s\") <- value', gdy obiekt "
+"posiada klasę %s oraz brak dostarczonego argumentu 'replace'; wartość "
+"zastępcza będzie błędem"
 
-# methods/R/trace.R: 342
-# stop("the editing in trace() can only change the body of the function, not the arguments or defaults")
+#. R/refClass.R: gettextf("topic %s is not a method name in class %s\nThe class definition follows\n",     sQuote(topic), dQuote(className))
+#: R/refClass.R:0
 msgid ""
-"the editing in trace() can only change the body of the function, not the "
-"arguments or defaults"
+"topic %s is not a method name in class %s\n"
+"The class definition follows"
 msgstr ""
-"edytowanie w 'trace()' może zmienić jedynie ciało funkcji, a nie argumenty "
-"lub wartości domyślne"
+"temat %s nie jest nazwą metody w klasie %s\n"
+"Definicja klasy przedstawia się następująco"
 
-# methods/R/trace.R: 350
-# stop("cannot use 'at' argument without a trace expression")
-msgid "cannot use 'at' argument without a trace expression"
-msgstr "nie można użyć argumentu 'at' bez wyrażenia śledzenia"
+#. R/trace.R: gettextf("tracing the internal function %s is not allowed", sQuote(what))
+#: R/trace.R:0
+msgid "tracing the internal function %s is not allowed"
+msgstr "śledzenie wewnętrznej funkcji %s nie jest dozwolone"
 
-# methods/R/trace.R: 352
-# stop("cannot use 'at' argument unless the function body has the form '{ ... }'")
+#. R/RClassUtils.R: gettextf("trying to assign an object of class %s as the definition of class %s: must supply a \"classRepresentation\" object",     dQuote(class(def)), dQuote(Class))
+#: R/RClassUtils.R:0
 msgid ""
-"cannot use 'at' argument unless the function body has the form '{ ... }'"
-msgstr "nie można użyć argumentu 'at' o ile ciało funkcji ma formę '{ ... }'"
-
-# methods/R/trace.R: 485
-# gettextf("assigning over the binding of symbol %s in environment/package %s",
-#                      sQuote(what), sQuote(pname))
-msgid "assigning over the binding of symbol %s in environment/package %s"
-msgstr "przypisywanie poprzez powiązanie symbolu %s w środowisku/pakiecie %s"
+"trying to assign an object of class %s as the definition of class %s: must "
+"supply a \"classRepresentation\" object"
+msgstr ""
+"próba przypisania obiekt klasy %s jako definicję klasy %s: potrzeba "
+"dostarczyć obiekt 'classRepresentation'"
 
-# methods/R/trace.R: 514
-# warning(gettextf("setting a method over the binding of symbol %s in environment/package %s",
-#                          sQuote(what),
-#                          sQuote(getPackageName(where))),
-#                 domain = NA)
+#. R/RMethodUtils.R: gettextf("trying to change the formal arguments in %s in an object of class %s; expected a function definition",     msg, dQuote(class(def)))
+#: R/RMethodUtils.R:0
 msgid ""
-"setting a method over the binding of symbol %s in environment/package %s"
+"trying to change the formal arguments in %s in an object of class %s; "
+"expected a function definition"
 msgstr ""
-"ustawianie metody poprzez powiązanie symbolu %s w środowisku/pakiecie %s"
+"próba zmiany formalnych argumentów w %s w obiekcie klasy %s; oczekiwano "
+"definicji funkcji"
 
-# methods/R/trace.R: 572
-# message(gettextf("Environment of class %s is locked; using global environment for new class",
-#                      dQuote(className)),
-#             domain = NA)
+#. R/RMethodUtils.R: gettextf("trying to change the formal arguments in %s, but getting the new formals from an object of class %s; expected a function definition",     msg, dQuote(class(def)))
+#: R/RMethodUtils.R:0
 msgid ""
-"Environment of class %s is locked; using global environment for new class"
+"trying to change the formal arguments in %s, but getting the new formals "
+"from an object of class %s; expected a function definition"
 msgstr ""
-"Środowisko klasy %s jest zablokowane; używanie globalnego środowiska dla "
-"nowej klasy"
+"próba zmiany formalnych argumentów w %s, ale otrzymano nowe argumenty "
+"formalne z obiektu klasy %s; oczekiwano definicji funkcji"
 
-# methods/R/trace.R: 624
-# stop("none of the objects in the source code could be found:  need to attach or specify the package")
+#. R/RMethodUtils.R: gettextf("trying to change the formal arguments in %s, but the number of existing arguments is greater than the number of new arguments (the extra arguments won't be used): (%s) vs (%s)",     msg, paste0("\"", old, "\"", collapse = ", "), paste0("\"",         new, "\"", collapse = ", "))
+#: R/RMethodUtils.R:0
 msgid ""
-"none of the objects in the source code could be found:  need to attach or "
-"specify the package"
+"trying to change the formal arguments in %s, but the number of existing "
+"arguments is greater than the number of new arguments (the extra arguments "
+"won't be used): (%s) vs (%s)"
 msgstr ""
-"żaden z obiektów w kodzie źródłowym nie mógł zostać znaleziony:  potrzeba "
-"dołączyć lub określić pakiet"
+"próba zmiany formalnych argumentów w %s, ale liczba istniejących argumentów "
+"jest większa niż liczba nowych argumentów (dodatkowe argumenty nie będą "
+"użyte): (%s) względem (%s)"
 
-# methods/R/trace.R: 631
-# warning(gettextf("objects found in multiple packages: using %s and ignoring %s",
-#                              sQuote(names(possible[[1L]])),
-#                              paste(sQuote(names(possible[-1L])),
-#                                    collapse = ", ")),
-#                     domain = NA)
-msgid "objects found in multiple packages: using %s and ignoring %s"
+#. R/RMethodUtils.R: gettextf("trying to change the formal arguments in %s, but the number of existing arguments is less than the number of new arguments: (%s) vs (%s)",     msg, paste0("\"", old, "\"", collapse = ", "), paste0("\"",         new, "\"", collapse = ", "))
+#: R/RMethodUtils.R:0
+msgid ""
+"trying to change the formal arguments in %s, but the number of existing "
+"arguments is less than the number of new arguments: (%s) vs (%s)"
 msgstr ""
-"obiekty zostały znalezione w wielu pakietach: używanie %s oraz ignorowanie %s"
+"próba zmiany formalnych argumentów w %s, ale liczba istniejących argumentów "
+"jest mniejsza niż liczba nowych argumentów: (%s) względem (%s)"
 
-# methods/R/trace.R: 656
-# stop(gettextf("package %s is not attached and no namespace found for it",
-#                           sQuote(package)),
-#                  domain = NA)
-msgid "package %s is not attached and no namespace found for it"
+#. R/methodsTable.R: gettextf("trying to check signature length of generic '%s', but it is not a generic function: i = %d, funs = %s, gnames = %s",     what, i, paste(unlist(funs), collapse = ", "), paste(as.character(gnames),         collapse = ", "))
+#: R/methodsTable.R:0
+msgid ""
+"trying to check signature length of generic '%s', but it is not a generic "
+"function: i = %d, funs = %s, gnames = %s"
 msgstr ""
-"pakiet %s nie jest dołączony przez co nie znaleziono dla niego przestrzeni "
-"nazw"
+"próba sprawdzenia długości sygnatury funkcji ogólnej '%s', ale to nie jest "
+"funkcja ogólna: i = %d, funs = %s, gnames = %s"
 
-# methods/R/trace.R: 669
-# stop(gettextf("invalid 'source' argument: expected file names or a connection but got an object of class %s",
-#                       dQuote(class(source)[[1L]])),
-#              domain = NA)
+#. R/methodsTable.R: gettextf("trying to check signature length of group generic '%s', but it is not a group generic",     what)
+#: R/methodsTable.R:0
 msgid ""
-"invalid 'source' argument: expected file names or a connection but got an "
-"object of class %s"
+"trying to check signature length of group generic '%s', but it is not a "
+"group generic"
 msgstr ""
-"niepoprawny argument 'source': oczekiwano nazw plików lub połączenia, a "
-"otrzymano obiekt klasy %s"
+"próba sprawdzenia długości sygnatury grupy ogólnej '%s', ale to nie jest "
+"grupa ogólna"
 
-# methods/R/trace.R: 717
-# stop(gettextf(
-#                      "cannot find an environment corresponding to package name \'%s\"",
-#                      package), domain = NA)
-msgid "cannot find an environment corresponding to package name '%s\""
-msgstr "nie można znaleźć środowiska odpowiadającego nazwie pakietu '%s'"
+#. R/methodsTable.R: stop("trying to find a methods table in a non-generic function")
+#: R/methodsTable.R:0
+msgid "trying to find a methods table in a non-generic function"
+msgstr "próba znalezienia tablicy metod w nieogólnej funkcji"
 
-# methods/R/trace.R: 733
-# warning(gettextf("supplied package, %s, differs from package inferred from source, %s",
-#                          sQuote(package), sQuote(envPackage)),
-#                 domain = NA)
-msgid "supplied package, %s, differs from package inferred from source, %s"
+#. R/MethodsList.R: gettextf("trying to match a method signature of class %s; expects a list or a character vector",     dQuote(class(signature)))
+#: R/MethodsList.R:0
+msgid ""
+"trying to match a method signature of class %s; expects a list or a "
+"character vector"
 msgstr ""
-"dostarczony pakiet, %s, różni się od pakietu wywnioskowanego ze źródła, %s"
-
-# methods/R/trace.R: 744
-# warning(gettextf("cannot insert these (not found in source): %s",
-#                     paste('"',functions[notThere],'"',
-#                           sep = "", collapse = ", ")),
-#                     domain = NA)
-msgid "cannot insert these (not found in source): %s"
-msgstr "nie można ich wstawić (nie znaleziono w źródle): %s"
+"próba dopasowania sygnatury metody klasy %s; oczekuje listy lub wektor "
+"tekstowego"
 
-# methods/R/trace.R: 756
-# warning(gettextf("cannot insert methods for these functions (methods table not found in source): %s",
-#                     paste('"',methods[notThere],'"',
-#                           sep = "", collapse = ", ")),
-#                     domain = NA)
+#. R/MethodsList.R: gettextf("trying to match a method signature to an object (of class %s) that is not a generic function",     dQuote(class(fun)))
+#: R/MethodsList.R:0
 msgid ""
-"cannot insert methods for these functions (methods table not found in "
-"source): %s"
+"trying to match a method signature to an object (of class %s) that is not a "
+"generic function"
 msgstr ""
-"nie można wstawić metod dla tych funkcji (tablica metod nie została "
-"znaleziona w źródle): %s"
+"próba dopasowania sygnatury metody do obiektu (klasy %s), który nie jest "
+"ogólną funkcją"
+
+#. R/as.R: gettextf("trying to set an 'as' relation from %s to itself",     dQuote(.class1(from)))
+#: R/as.R:0
+msgid "trying to set an 'as' relation from %s to itself"
+msgstr "próba ustawienia relacji 'as' z %s na siebie samą"
+
+#. R/ClassUnion.R: gettextf("unable to create union class:  could not set members %s",     paste(.dQ(failed), collapse = ", "))
+#: R/ClassUnion.R:0
+msgid "unable to create union class:  could not set members %s"
+msgstr "nie można utworzyć uni klas:  nie można ustawić członków %s"
 
-# methods/R/trace.R: 814
-# message(gettextf("Non-function objects are not currently inserted (not traceable): %s",
-#                          paste(notTraceable, collapse = ", ")), domain = NA)
-msgid "Non-function objects are not currently inserted (not traceable): %s"
+#. R/RClassUtils.R: gettextf("unable to find a consistent ordering of superclasses for class %s: order chosen is inconsistent with the superclasses of %s",     .dQ(className), paste(.dQ(setdiff(newconflicts, conflicts)),         collapse = ", "))
+#: R/RClassUtils.R:0
+msgid ""
+"unable to find a consistent ordering of superclasses for class %s: order "
+"chosen is inconsistent with the superclasses of %s"
 msgstr ""
-"niefunkcjonalne obiekty nie są aktualnie wstawione (nie są śledzone): %s"
+"nie można znaleźć spójnego uporządkowania superklas dla klasy %s: wybrany "
+"porządek jest niespójny z superklasami %s"
 
-# methods/R/trace.R: 817
-# message(gettextf("New functions are not currently inserted (not untraceable): %s",
-#                          paste(newObjects, collapse = ", ")), domain = NA)
-msgid "New functions are not currently inserted (not untraceable): %s"
-msgstr "nowe funkcje nie są aktualnie wstawione (nie są śledzone): %s"
+#. R/RClassUtils.R: gettextf("unable to find an environment containing class %s",     dQuote(Class))
+#: R/RClassUtils.R:0
+msgid "unable to find an environment containing class %s"
+msgstr "nie można znaleźć środowiska zawierającego klasę %s"
 
-# methods/R/trace.R: 820
-# message(gettextf("Modified functions inserted through trace(): %s",
-#                          paste(objectsDone, collapse = ", ")), domain = NA)
-msgid "Modified functions inserted through trace(): %s"
-msgstr "Zmodyfikowane funkcje wstawione poprzez 'trace()': %s"
+#. R/methodsTable.R: gettextf("unable to find an inherited method for function %s for signature %s",     sQuote(fdef at generic), sQuote(cnames))
+#: R/methodsTable.R:0
+msgid "unable to find an inherited method for function %s for signature %s"
+msgstr "nie można znaleźć dziedziczonej metody dla funkcji %s dla sygnatury %s"
 
-# methods/R/trace.R: 845
-# message(gettextf("%s() is not a generic function in the target environment -- methods will not be inserted",
-#                          f), domain = NA)
-msgid ""
-"%s() is not a generic function in the target environment -- methods will not "
-"be inserted"
-msgstr ""
-"'%s()' nie jest ogólną funkcją w docelowym środowisku -- metody nie zostaną "
-"wstawione"
+#. R/RClassUtils.R: gettextf("unable to find required package %s", sQuote(package))
+#: R/RClassUtils.R:0
+msgid "unable to find required package %s"
+msgstr "nie można znaleźć wymaganego pakietu %s"
 
-# methods/R/trace.R: 866
-# message(gettextf("Methods inserted for function %s(): %s",
-#                   f, paste(methodsInserted, collapse =", ")),
-#                   domain = NA)
-msgid "Methods inserted for function %s(): %s"
-msgstr "Metody wstawione dla funkcji '%s()': %s"
+#. R/as.R: stop("undefined 'coerce' method")
+#: R/as.R:0
+msgid "undefined 'coerce' method"
+msgstr "nieokreślona metoda 'coerce'"
 
-# methods/R/trace.R: 881
-# stop(gettextf("no definition for object %s found in tracing environment",
-#                           sQuote(what), source),
-#                  domain = NA)
-msgid "no definition for object %s found in tracing environment"
-msgstr "nie znaleziono definicji dla obiektu %s w śledzonym środowisku"
+#. R/methodsTable.R: gettextf("undefined classes (%s) will be ignored for argument '%s'",     paste0("\"", unique(.undefClasses), "\"", collapse = ", "),     colnames(sigs)[[j]])
+#: R/methodsTable.R:0
+msgid "undefined classes (%s) will be ignored for argument '%s'"
+msgstr "niezdefiniowane klasy (%s) zostaną zignorowane dla argumentu '%s'"
 
-# methods/R/trace.R: 895
-# warning(gettextf("multiple generics match pattern, using table %s", table)
-#                 , domain = NA)
-msgid "multiple generics match pattern, using table %s"
-msgstr "wielokrotne dopasowania wzorca funkcji ogólnej, używanie tablicy %s"
+#. R/RClassUtils.R: gettext("undefined slot classes in definition of %s: %s", domain = "R-methods")
+#: R/RClassUtils.R:0
+msgid "undefined slot classes in definition of %s: %s"
+msgstr "niezdefiniowane gniazda klas w definicji %s: %s"
 
-# methods/R/trace.R: 900
-# stop(gettextf("does not seem to be a method table for generic %s in tracing environment",
-#                           sQuote(what)),
-#                  domain = NA)
-msgid ""
-"does not seem to be a method table for generic %s in tracing environment"
+#. R/RClassUtils.R: gettextf("undefined subclass %s of class %s; definition not updated",     .dQ(what), .dQ(def at className))
+#: R/RClassUtils.R:0
+msgid "undefined subclass %s of class %s; definition not updated"
 msgstr ""
-"nie wygląda na tablicę metod dla funkcji ogólnej %s w śledzonym środowisku"
-
-# methods/R/trace.R: 906
-# stop(gettextf("no method in methods table for %s for signature %s",
-#                         sQuote(what),
-#                         sQuote(signature)),
-#                domain = NA)
-msgid "no method in methods table for %s for signature %s"
-msgstr "brak metod w tablicy metod dla %s dla sygnatury %s"
+"niezdefiniowana podklasa %s klasy %s; definicja nie została zaktualizowana"
 
-# methods/R/zzz.R: 109
-# message("unloading 'methods' package ...")
+#. R/zzz.R: message("unloading 'methods' package ...")
+#: R/zzz.R:0
 msgid "unloading 'methods' package ..."
 msgstr "zwalnianie pakietu 'methods'..."
 
-# methods/R/zzz.R: 125
-# warning("apparently bad method or class metadata in saved environment;\n",
-#                   "move the file or remove the class/method")
-msgid "apparently bad method or class metadata in saved environment;"
-msgstr "najwyraźniej złe metadane metody lub klasy w zapisanym środowisku;"
+#. R/BasicClasses.R: gettextf("unnamed argument must extend either the S3 class or the class of the data part; not true of class %s",     dQuote(Classi))
+#: R/BasicClasses.R:0
+msgid ""
+"unnamed argument must extend either the S3 class or the class of the data "
+"part; not true of class %s"
+msgstr ""
+"nienazwany argument musi rozszerzać albo klasę S3 albo klasę części danych; "
+"nie jest to prawdą dla klasy %s"
 
-# methods/R/zzz.R: 125
-# warning("apparently bad method or class metadata in saved environment;\n",
-#                   "move the file or remove the class/method")
-msgid "move the file or remove the class/method"
-msgstr "przenieś plik lub usuń klasę/metodę"
+#. R/BasicClasses.R: gettextf("unnamed argument to initialize() for S3 class must have a class definition; %s does not",     dQuote(Classi))
+#: R/BasicClasses.R:0
+msgid ""
+"unnamed argument to initialize() for S3 class must have a class definition; "
+"%s does not"
+msgstr ""
+"nienazwany argument przekazany do metody 'initialize()' dla klasy S3 musi "
+"posiadać definicję klasy; a %s takiej nie posiada"
 
-# methods/R/MethodsList.R: 514
-# sprintf(ngettext(length(unknown),
-# 				 "no definition for class %s",
-# 				 "no definition for classes %s"),
-# 			paste(dQuote(unknown), collapse = ", "))
-msgid "no definition for class %s"
-msgid_plural "no definition for classes %s"
-msgstr[0] "brak definicji dla klasy %s"
-msgstr[1] "brak definicji dla klas %s"
-msgstr[2] "brak definicji dla klas %s"
+#. R/BasicClasses.R: stop("unnamed argument to new() must be an environment for the new object")
+#: R/BasicClasses.R:0
+msgid "unnamed argument to new() must be an environment for the new object"
+msgstr ""
+"nienazwany argument przekazywany do metody 'new()' musi być środowiskiem dla "
+"nowego obiektu"
 
-# methods/R/MethodsList.R: 556
-# stop(sprintf(ngettext(sum(is.na(which)),
-#                               "in the method signature for function %s invalid argument name in the signature: %s",
-#                               "in the method signature for function %s invalid argument names in the signature: %s"),
-#                      sQuote(fun at generic),
-#                      paste(snames[is.na(which)], collapse = ", ")),
-#              domain = NA)
+#. R/refClass.R: gettextf("unnamed arguments to $new() must be objects from a reference class; got an object of class %s",     dQuote(class(super)))
+#: R/refClass.R:0
 msgid ""
-"in the method signature for function %s invalid argument name in the "
-"signature: %s"
-msgid_plural ""
-"in the method signature for function %s invalid argument names in the "
-"signature: %s"
-msgstr[0] ""
-"w sygnaturze metody dla funkcji %s znajduje się niepoprawna nazwa argumentu "
-"w sygnaturze: %s"
-msgstr[1] ""
-"w sygnaturze metody dla funkcji %s znajdują się niepoprawne nazwy argumentów "
-"w sygnaturze: %s"
-msgstr[2] ""
-"w sygnaturze metody dla funkcji %s znajdują się niepoprawne nazwy argumentów "
-"w sygnaturze: %s"
+"unnamed arguments to $new() must be objects from a reference class; got an "
+"object of class %s"
+msgstr ""
+"nienazwane argumenty przekazane do '$new()' muszą być obiektami z klasy "
+"referencyjnej; otrzymano obiekt klasy %s"
+
+#. R/MethodsList.R: gettextf("use %s instead.", dQuote(instead))
+#. R/MethodsList.R: gettextf("use %s instead.", dQuote(instead))
+#: R/MethodsList.R:0
+msgid "use %s instead."
+msgstr "użyj wzamian %s."
+
+#. R/SClasses.R: stop("validity method must be NULL or a function of one argument")
+#: R/SClasses.R:0
+msgid "validity method must be NULL or a function of one argument"
+msgstr ""
+"metoda poprawności musi być wartością NULL lub funkcją jednego argumentu"
+
+#. R/Methods.R: gettextf("value classes differ: %s, %s", .dQ(gpString(f1 at valueClass)),     .dQ(gpString(f2 at valueClass)))
+#: R/Methods.R:0
+msgid "value classes differ: %s, %s"
+msgstr "wartości klas różnią się: %s, %s"
+
+#. R/methodsTable.R: ngettext(length(candidates), "Choosing method %s from %d ambiguous possibility",     "Choosing method %s from %d ambiguous possibilities")
+#: R/methodsTable.R:0
+msgid "Choosing method %s from %d ambiguous possibility"
+msgid_plural "Choosing method %s from %d ambiguous possibilities"
+msgstr[0] "Wybieranie metody %s z %d niejednoznacznej możliwości"
+msgstr[1] "Wybieranie metody %s z %d niejednoznacznych możliwości"
+msgstr[2] "Wybieranie metody %s z %d niejednoznacznych możliwości"
 
+#. R/MethodsListClass.R: ngettext(nreport, "Reported %d ambiguous selection out of %d for function %s\n",     "Reported %d ambiguous selections out of %d for function %s\n")
+#: R/MethodsListClass.R:0
 msgid "Reported %d ambiguous selection out of %d for function %s\n"
 msgid_plural "Reported %d ambiguous selections out of %d for function %s\n"
 msgstr[0] "Odnotowano %d niejednoznaczny wybór z możliwych %d dla funkcji %s\n"
@@ -3282,94 +2602,92 @@ msgstr[1] ""
 msgstr[2] ""
 "Odnotowano %d niejednoznacznych wyborów z możliwych %d dla funkcji %s\n"
 
-# methods/R/RClassUtils.R: 818
-# stop(sprintf(ngettext(sum(is.na(match(pnames, slots))),
-#                                     "named elements of prototype do not correspond to slot name: %s",
-#                                     "named elements of prototype do not correspond to slot names: %s"),
-#                            paste(.dQ(pnames[is.na(match(pnames, slots))]),
-#                                  collapse =", ")),
-#                    domain = NA)
-msgid "named elements of prototype do not correspond to slot name: %s"
-msgid_plural "named elements of prototype do not correspond to slot names: %s"
-msgstr[0] "nazwane elementy prototypu nie odnoszą się do nazwy gniazda: %s"
-msgstr[1] "nazwane elementy prototypu nie odnoszą się do nazw gniazd: %s"
-msgstr[2] "nazwane elementy prototypu nie odnoszą się do nazw gniazd: %s"
+#. R/methodsTable.R: ngettext(which2, "Selecting %d method of minimum distance", "Selecting %d methods of minimum distance")
+#: R/methodsTable.R:0
+msgid "Selecting %d method of minimum distance"
+msgid_plural "Selecting %d methods of minimum distance"
+msgstr[0] "Wybieranie %d metody minimalnej odległości"
+msgstr[1] "Wybieranie %d metod minimalnej odległości"
+msgstr[2] "Wybieranie %d metod minimalnej odległości"
 
-# methods/R/RMethodUtils.R: 85
-# stop(sprintf(ngettext(sum(is.na(match(signature, args))),
-#                               "non-argument found in the signature: %s",
-#                               "non-arguments found in the signature: %s"),
-#                      paste(signature[is.na(match(signature, args))], collapse = ", ")),
-#              domain = NA)
-# methods/R/RMethodUtils.R: 164
-# stop(sprintf(ngettext(sum(is.na(match(signature, args))),
-#                               "non-argument found in the signature: %s",
-#                               "non-arguments found in the signature: %s"),
-#                      paste(signature[is.na(match(signature, args))], collapse = ", ")),
-#              domain = NA)
-msgid "non-argument found in the signature: %s"
-msgid_plural "non-arguments found in the signature: %s"
-msgstr[0] "nie znaleziono argumentu w sygnaturze: %s"
-msgstr[1] "nie znaleziono argumentów w sygnaturze: %s"
-msgstr[2] "nie znaleziono argumentów w sygnaturze: %s"
+#. R/methodsTable.R: ngettext(length(which), "Selecting %d non-group method", "Selecting %d non-group methods")
+#: R/methodsTable.R:0
+msgid "Selecting %d non-group method"
+msgid_plural "Selecting %d non-group methods"
+msgstr[0] "Wybieranie %d nie-grupowej metody"
+msgstr[1] "Wybieranie %d nie-grupowych metod"
+msgstr[2] "Wybieranie %d nie-grupowych metod"
+
+#. R/methodsTable.R: ngettext(length(which), "Selecting %d partially exact-matching method",     "Selecting %d partially exact-matching methods")
+#: R/methodsTable.R:0
+msgid "Selecting %d partially exact-matching method"
+msgid_plural "Selecting %d partially exact-matching methods"
+msgstr[0] "Wybieranie %d w pełni pasującej metody"
+msgstr[1] "Wybieranie %d w pełni pasujących metod"
+msgstr[2] "Wybieranie %d w pełni pasujących metod"
 
-# methods/R/RMethodUtils.R: 106
-# stop(sprintf(ngettext(length(fdef),
-#                                   "the formal argument of the generic function for %s (%s) differs from that of the non-generic to be used as the default (%s)",
-#                                   "the formal arguments of the generic function for %s (%s) differ from those of the non-generic to be used as the default (%s)"),
-#                           paste(formalArgs(fdef), collapse = ", "),
-#                           paste(formalArgs(fdefault), collapse = ", ")),
-#                  domain = NA)
+#. R/is.R: ngettext(sum(is.na(match(n2, n1))), "class %s is missing slot from class %s (%s), and no coerce method was supplied",     "class %s is missing slots from class %s (%s), and no coerce method was supplied")
+#: R/is.R:0
 msgid ""
-"the formal argument of the generic function for %s (%s) differs from that of "
-"the non-generic to be used as the default (%s)"
+"class %s is missing slot from class %s (%s), and no coerce method was "
+"supplied"
 msgid_plural ""
-"the formal arguments of the generic function for %s (%s) differ from those "
-"of the non-generic to be used as the default (%s)"
+"class %s is missing slots from class %s (%s), and no coerce method was "
+"supplied"
 msgstr[0] ""
-"formalny argument ogólnej funkcji dla %s (%s) różni się od tej dla "
-"nieogólnej, która ma być użyta jako domyślna (%s)"
+"klasie %s brakuje gniazda z klasy %s (%s), przez co nie dostarczono żadnej "
+"metody przekształcenia"
 msgstr[1] ""
-"formalne argumenty ogólnej funkcji dla %s (%s) różnią się od tych dla "
-"nieogólnej, która ma być użyta jako domyślna (%s)"
+"klasie %s brakuje gniazd z klasy %s (%s), przez co nie dostarczono żadnej "
+"metody przekształcenia"
 msgstr[2] ""
-"formalne argumenty ogólnej funkcji dla %s (%s) różnią się od tych dla "
-"nieogólnej, która ma być użyta jako domyślna (%s)"
+"klasie %s brakuje gniazd z klasy %s (%s), przez co nie dostarczono żadnej "
+"metody przekształcenia"
 
-# methods/R/SClasses.R: 143
-# stop(sprintf(ngettext(length(dslots),
-#                               "duplicated slot name: %s",
-#                               "duplicated slot names: %s"),
-#                      paste(sQuote(dslots), collapse="")),
-#              domain = NA)
+#. R/SClasses.R: ngettext(length(dslots), "duplicated slot name: %s", "duplicated slot names: %s")
+#: R/SClasses.R:0
 msgid "duplicated slot name: %s"
 msgid_plural "duplicated slot names: %s"
 msgstr[0] "powtórzona nazwa gniazda: %s"
 msgstr[1] "powtórzone nazwy gniazd: %s"
 msgstr[2] "powtórzone nazwy gniazd: %s"
 
-# methods/R/SClasses.R: 689
-# stop(sprintf(ngettext(sum(is.na(which)),
-#                                       "invalid name for slot of class %s: %s",
-#                                       "invalid names for slots of class %s: %s"),
-#                               dQuote(Class),
-#                               paste(snames[is.na(which)], collapse=", ")),
-#                      domain = NA)
+#. R/methodsTable.R: ngettext(length(methods), "found %d equally good next method",     "found %d equally good next methods")
+#: R/methodsTable.R:0
+msgid "found %d equally good next method"
+msgid_plural "found %d equally good next methods"
+msgstr[0] "znaleziono %d równie dobrą kolejną metodę"
+msgstr[1] "znaleziono %d równie dobre kolejne metody"
+msgstr[2] "znaleziono %d równie dobrych kolejnych metod"
+
+#. R/MethodsList.R: ngettext(sum(is.na(which)), "in the method signature for function %s invalid argument name in the signature: %s",     "in the method signature for function %s invalid argument names in the signature: %s")
+#: R/MethodsList.R:0
+msgid ""
+"in the method signature for function %s invalid argument name in the "
+"signature: %s"
+msgid_plural ""
+"in the method signature for function %s invalid argument names in the "
+"signature: %s"
+msgstr[0] ""
+"w sygnaturze metody dla funkcji %s znajduje się niepoprawna nazwa argumentu "
+"w sygnaturze: %s"
+msgstr[1] ""
+"w sygnaturze metody dla funkcji %s znajdują się niepoprawne nazwy argumentów "
+"w sygnaturze: %s"
+msgstr[2] ""
+"w sygnaturze metody dla funkcji %s znajdują się niepoprawne nazwy argumentów "
+"w sygnaturze: %s"
+
+#. R/SClasses.R: ngettext(sum(is.na(which)), "invalid name for slot of class %s: %s",     "invalid names for slots of class %s: %s")
+#: R/SClasses.R:0
 msgid "invalid name for slot of class %s: %s"
 msgid_plural "invalid names for slots of class %s: %s"
 msgstr[0] "niepoprawna nazwa gniazda klasy %s: %s"
 msgstr[1] "niepoprawne nazwy gniazd klasy %s: %s"
 msgstr[2] "niepoprawne nazwy gniazd klasy %s: %s"
 
-# methods/R/SClasses.R: 777
-# warning(sprintf(ngettext(length(pkgs),
-#                                          "multiple definition of class %s visible (%s); using the definition\n   in package %s for %s",
-#                                          "multiple definitions of class %s visible (%s); using the definition\n   in package %s for %s"),
-#                                 dQuote(Class),
-#                                 paste(sQuote(pkgs), collapse = ", "),
-#                                 sQuote(pkgs[[1L]]),
-#                                 unique),
-#                         domain = NA)
+#. R/SClasses.R: ngettext(length(pkgs), "multiple definition of class %s visible (%s); using the definition\n   in package %s for %s",     "multiple definitions of class %s visible (%s); using the definition\n   in package %s for %s")
+#: R/SClasses.R:0
 msgid ""
 "multiple definition of class %s visible (%s); using the definition\n"
 "   in package %s for %s"
@@ -3386,36 +2704,43 @@ msgstr[2] ""
 "wielokrotne definicje klasy %s są widoczne (%s); używanie definicji\n"
 "   w pakiecie %s dla %s"
 
-# methods/R/is.R: 235
-# sprintf(ngettext(sum(is.na(match(n2, n1))),
-#                                           "class %s is missing slot from class %s (%s), and no coerce method was supplied",
-#                                           "class %s is missing slots from class %s (%s), and no coerce method was supplied"),
-#                                  dQuote(class1),
-#                                  dQuote(class2),
-#                                  paste(n2[is.na(match(n2, n1))], collapse = ", "))
+#. R/RClassUtils.R: ngettext(sum(is.na(match(pnames, slots))), "named elements of prototype do not correspond to slot name: %s",     "named elements of prototype do not correspond to slot names: %s")
+#: R/RClassUtils.R:0
+msgid "named elements of prototype do not correspond to slot name: %s"
+msgid_plural "named elements of prototype do not correspond to slot names: %s"
+msgstr[0] "nazwane elementy prototypu nie odnoszą się do nazwy gniazda: %s"
+msgstr[1] "nazwane elementy prototypu nie odnoszą się do nazw gniazd: %s"
+msgstr[2] "nazwane elementy prototypu nie odnoszą się do nazw gniazd: %s"
+
+#. R/MethodsList.R: ngettext(length(unknown), "no definition for class %s", "no definition for classes %s")
+#: R/MethodsList.R:0
+msgid "no definition for class %s"
+msgid_plural "no definition for classes %s"
+msgstr[0] "brak definicji dla klasy %s"
+msgstr[1] "brak definicji dla klas %s"
+msgstr[2] "brak definicji dla klas %s"
+
+#. R/promptClass.R: ngettext(length(whereClass), "no definition of class %s in the specified position, %s, definition on : %s",     "no definition of class %s in the specified position, %s, definitions on : %s")
+#: R/promptClass.R:0
 msgid ""
-"class %s is missing slot from class %s (%s), and no coerce method was "
-"supplied"
+"no definition of class %s in the specified position, %s, definition on : %s"
 msgid_plural ""
-"class %s is missing slots from class %s (%s), and no coerce method was "
-"supplied"
-msgstr[0] ""
-"klasie %s brakuje gniazda z klasy %s (%s), przez co nie dostarczono żadnej "
-"metody przekształcenia"
-msgstr[1] ""
-"klasie %s brakuje gniazd z klasy %s (%s), przez co nie dostarczono żadnej "
-"metody przekształcenia"
-msgstr[2] ""
-"klasie %s brakuje gniazd z klasy %s (%s), przez co nie dostarczono żadnej "
-"metody przekształcenia"
+"no definition of class %s in the specified position, %s, definitions on : %s"
+msgstr[0] "brak definicji klasy %s we wskazanym położeniu, %s, definicja: %s"
+msgstr[1] "brak definicji klasy %s we wskazanym położeniu, %s, definicje: %s"
+msgstr[2] "brak definicji klasy %s we wskazanym położeniu, %s, definicje: %s"
+
+#. R/RMethodUtils.R: ngettext(sum(is.na(match(signature, args))), "non-argument found in the signature: %s",     "non-arguments found in the signature: %s")
+#. R/RMethodUtils.R: ngettext(sum(is.na(match(signature, args))), "non-argument found in the signature: %s",     "non-arguments found in the signature: %s")
+#: R/RMethodUtils.R:0
+msgid "non-argument found in the signature: %s"
+msgid_plural "non-arguments found in the signature: %s"
+msgstr[0] "nie znaleziono argumentu w sygnaturze: %s"
+msgstr[1] "nie znaleziono argumentów w sygnaturze: %s"
+msgstr[2] "nie znaleziono argumentów w sygnaturze: %s"
 
-# methods/R/is.R: 247
-# sprintf(ngettext(length(bad),
-#                                           "slot in class %s must extend corresponding slot in class %s: fails for %s",
-#                                           "slots in class %s must extend corresponding slots in class %s: fails for %s"),
-#                                  dQuote(class1),
-#                                  dQuote(class2),
-#                                  paste(bad, collapse = ", "))
+#. R/is.R: ngettext(length(bad), "slot in class %s must extend corresponding slot in class %s: fails for %s",     "slots in class %s must extend corresponding slots in class %s: fails for %s")
+#: R/is.R:0
 msgid ""
 "slot in class %s must extend corresponding slot in class %s: fails for %s"
 msgid_plural ""
@@ -3430,73 +2755,42 @@ msgstr[2] ""
 "gniazda w klasie %s muszą rozszerzać odpowiadające im gniazda w klasie %s: "
 "nie udało się dla %s"
 
-# methods/R/methodsTable.R: 734
-# warning(sprintf(ngettext(length(methods),
-#                                  "found %d equally good next method",
-#                                  "found %d equally good next methods"),
-#                         length(methods)),
-#                 domain = NA)
-msgid "found %d equally good next method"
-msgid_plural "found %d equally good next methods"
-msgstr[0] "znaleziono %d równie dobrą kolejną metodę"
-msgstr[1] "znaleziono %d równie dobre kolejne metody"
-msgstr[2] "znaleziono %d równie dobrych kolejnych metod"
-
-# methods/R/methodsTable.R: 888
-# sprintf(ngettext(which2,
-#                                "Selecting %d method of minimum distance",
-#                                "Selecting %d methods of minimum distance"),
-#                       which2)
-msgid "Selecting %d method of minimum distance"
-msgid_plural "Selecting %d methods of minimum distance"
-msgstr[0] "Wybieranie %d metody minimalnej odległości"
-msgstr[1] "Wybieranie %d metod minimalnej odległości"
-msgstr[2] "Wybieranie %d metod minimalnej odległości"
-
-# methods/R/methodsTable.R: 897
-# sprintf(ngettext(length(which),
-#                                       "Selecting %d non-group method",
-#                                       "Selecting %d non-group methods"),
-#                              length(which))
-msgid "Selecting %d non-group method"
-msgid_plural "Selecting %d non-group methods"
-msgstr[0] "Wybieranie %d nie-grupowej metody"
-msgstr[1] "Wybieranie %d nie-grupowych metod"
-msgstr[2] "Wybieranie %d nie-grupowych metod"
-
-# methods/R/methodsTable.R: 909
-# sprintf(ngettext(length(which),
-#                                        "Selecting %d partially exact-matching method",
-#                                        "Selecting %d partially exact-matching methods"),
-#                               length(which))
-msgid "Selecting %d partially exact-matching method"
-msgid_plural "Selecting %d partially exact-matching methods"
-msgstr[0] "Wybieranie %d w pełni pasującej metody"
-msgstr[1] "Wybieranie %d w pełni pasujących metod"
-msgstr[2] "Wybieranie %d w pełni pasujących metod"
-
-# methods/R/methodsTable.R: 920
-# sprintf(ngettext(length(candidates),
-#                           "Choosing method %s from %d ambiguous possibility",
-#                           "Choosing method %s from %d ambiguous possibilities"),
-#                  sQuote(selected), length(candidates))
-msgid "Choosing method %s from %d ambiguous possibility"
-msgid_plural "Choosing method %s from %d ambiguous possibilities"
-msgstr[0] "Wybieranie metody %s z %d niejednoznacznej możliwości"
-msgstr[1] "Wybieranie metody %s z %d niejednoznacznych możliwości"
-msgstr[2] "Wybieranie metody %s z %d niejednoznacznych możliwości"
-
-# methods/R/promptClass.R: 107
-# stop(sprintf(ngettext(length(whereClass),
-#                                           "no definition of class %s in the specified position, %s, definition on : %s",
-#                                           "no definition of class %s in the specified position, %s, definitions on : %s"),
-#                                  dQuote(clName), where,
-#                                  paste(whereClass, collapse = ", ")),
-#                          domain = NA)
+#. R/RMethodUtils.R: ngettext(length(fdef), "the formal argument of the generic function for %s (%s) differs from that of the non-generic to be used as the default (%s)",     "the formal arguments of the generic function for %s (%s) differ from those of the non-generic to be used as the default (%s)")
+#: R/RMethodUtils.R:0
 msgid ""
-"no definition of class %s in the specified position, %s, definition on : %s"
+"the formal argument of the generic function for %s (%s) differs from that of "
+"the non-generic to be used as the default (%s)"
 msgid_plural ""
-"no definition of class %s in the specified position, %s, definitions on : %s"
-msgstr[0] "brak definicji klasy %s we wskazanym położeniu, %s, definicja: %s"
-msgstr[1] "brak definicji klasy %s we wskazanym położeniu, %s, definicje: %s"
-msgstr[2] "brak definicji klasy %s we wskazanym położeniu, %s, definicje: %s"
+"the formal arguments of the generic function for %s (%s) differ from those "
+"of the non-generic to be used as the default (%s)"
+msgstr[0] ""
+"formalny argument ogólnej funkcji dla %s (%s) różni się od tej dla "
+"nieogólnej, która ma być użyta jako domyślna (%s)"
+msgstr[1] ""
+"formalne argumenty ogólnej funkcji dla %s (%s) różnią się od tych dla "
+"nieogólnej, która ma być użyta jako domyślna (%s)"
+msgstr[2] ""
+"formalne argumenty ogólnej funkcji dla %s (%s) różnią się od tych dla "
+"nieogólnej, która ma być użyta jako domyślna (%s)"
+
+#~ msgid ""
+#~ "Note: the specification for S3 class %s in package %s seems equivalent to "
+#~ "one from package %s: not turning on duplicate class definitions for this "
+#~ "class."
+#~ msgstr ""
+#~ "Uwaga: specyfikacja dla klasy S3 %s w pakiecie %s wydaje się być "
+#~ "równoważna tej z pakietu %s i nie jest duplikatem definicji klasy dla tej "
+#~ "klasy"
+
+#~ msgid "methods cannot be defined for the primitive function %s"
+#~ msgstr "metody nie mogą być zdefiniowane dla prymitywnej funkcji %s"
+
+#~ msgid ""
+#~ "package %s seems to have out-of-date methods; need to reinstall from "
+#~ "source"
+#~ msgstr ""
+#~ "pakiet %s wydaje się mieć nieaktualne metody; potrzeba przeinstalować ze "
+#~ "źródła"
+
+#~ msgid "trying to execute load actions without 'methods' package"
+#~ msgstr "próba wykonania akcji ładowania bez pakietu 'methods'"
diff --git a/src/library/methods/po/R-pt_BR.po b/src/library/methods/po/R-pt_BR.po
index 33ef04d..1ba8063 100644
--- a/src/library/methods/po/R-pt_BR.po
+++ b/src/library/methods/po/R-pt_BR.po
@@ -6,7 +6,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: R 2.2.0\n"
 "Report-Msgid-Bugs-To: bugs.r-project.org\n"
-"POT-Creation-Date: 2013-11-25 05:14\n"
+"POT-Creation-Date: 2016-04-01 09:50\n"
 "PO-Revision-Date: 2011-03-26 08:56-0300\n"
 "Last-Translator: Fernando Henrique <pessoal at fernandohrosa.com.br>\n"
 "Language-Team: http://www.feferraz.net/br/P/Projeto_Traducao_R_Portugues\n"
@@ -18,7 +18,7 @@ msgstr ""
 "X-Generator: Pootle 2.0.5\n"
 
 #, fuzzy
-msgid "OOPS: something wrong with line %d in '.OldClassesPrototypes'"
+msgid "OOPS: something wrong with '.OldClassesPrototypes[[%d]]'"
 msgstr "OOPS: algo errado com a linha"
 
 #, fuzzy
@@ -156,9 +156,10 @@ msgstr "impossível criar classe união: não foi possível definir os membros %
 msgid "invalid argument 'name': %s"
 msgstr "Argumento inválido  \"name\": %s"
 
+#, fuzzy
 msgid ""
-"%s is a primitive function;  methods can be defined, but the generic "
-"function is implicit, and cannot be changed."
+"%s dispatches internally;  methods can be defined, but the generic function "
+"is implicit, and cannot be changed."
 msgstr ""
 "'%s' é uma função primitiva; métodos podem ser definidos, mas a função "
 "genérica está implícita e não pode ser modificada"
@@ -335,6 +336,10 @@ msgstr ""
 "especificado objeto de classe \"%s\""
 
 #, fuzzy
+msgid "must supply 'generic.function' or 'class'"
+msgstr "a definição genérica de função fornecida para"
+
+#, fuzzy
 msgid "%s is not an S4 generic function in %s; methods not removed"
 msgstr "\"%s\" não é uma função genérica S4 em \"%s\"; métodos não removidos"
 
@@ -364,14 +369,8 @@ msgstr "função \"%s\" já um genérico de grupo; nenhuma mudança"
 msgid "Function %s is a group generic; do not call it directly"
 msgstr "função \"%s\" é um genérico de grupo; não chame-a diretamente"
 
-msgid ""
-"'callGeneric' with a primitive needs explicit arguments (no formal args "
-"defined)"
-msgstr ""
-"'callGeneric' com uma primitiva requer argumentos explícitos (nenhum "
-"argumento formal definido)"
-
-msgid "'callGeneric' must be called from a generic function or method"
+#, fuzzy
+msgid "callGeneric() must be called from within a method body"
 msgstr ""
 "'callGeneric' deve ser chamada a partir de uma função ou método genérico"
 
@@ -449,14 +448,12 @@ msgid "non-generic function '%s' given to findMethods()"
 msgstr "função não-genérica '%s' fornecida para findMethods()"
 
 #, fuzzy
-msgid "only FALSE is meaningful for 'inherited', when 'where' is supplied (got"
+msgid ""
+"only FALSE is meaningful for 'inherited', when 'where' is supplied (got %s)"
 msgstr ""
 "Somente 'FALSE' faz sentido para 'inherited', quando 'where' é fornecido "
 "(obtido"
 
-msgid "\""
-msgstr "\""
-
 #, fuzzy
 msgid "argument 'f' must be a generic function or %s"
 msgstr "argumento \"f\" deve ser uma função genérica ou %s"
@@ -594,6 +591,19 @@ msgid "use %s instead."
 msgstr ""
 
 #, fuzzy
+msgid ""
+"%s, along with other use of the \"MethodsList\" metadata objects, is defunct."
+msgstr ""
+"%s, junto com outro uso de  \"MethodsList\" em objetos meta dados, está "
+"obsoleto"
+
+#, fuzzy
+msgid "in %s: use of \"MethodsList\" metadata objects is defunct."
+msgstr ""
+"%s, junto com outro uso de  \"MethodsList\" em objetos meta dados, está "
+"obsoleto"
+
+#, fuzzy
 msgid "invalid object for formal method definition: type %s"
 msgstr "objeto inválido para definição formal do método: tipo \"%s\""
 
@@ -628,6 +638,13 @@ msgstr ""
 
 #, fuzzy
 msgid ""
+"the names in signature for method (%s) do not match function's arguments (%s)"
+msgstr ""
+"os nomes na assinatura do método (%s) não correspondem aos argumentos da "
+"função %s (%s)"
+
+#, fuzzy
+msgid ""
 "a call to callNextMethod() appears in a call to %s, but the call does not "
 "seem to come from either a generic function or another 'callNextMethod'"
 msgstr ""
@@ -646,6 +663,9 @@ msgstr ""
 msgid "bad object found as method (class %s)"
 msgstr "objeto inválido encontrado como método (classe \"%s\")"
 
+msgid "No next method available"
+msgstr ""
+
 #, fuzzy
 msgid ""
 "in constructing the prototype for class %s: prototype has class %s, but the "
@@ -681,6 +701,9 @@ msgstr ""
 msgid "undefined slot classes in definition of %s: %s"
 msgstr "classes de slot não definidas na definição de \"%s\": %s"
 
+msgid "(class %s)"
+msgstr ""
+
 #, fuzzy
 msgid ""
 "in definition of class %s, information for superclass %s is of class %s "
@@ -839,12 +862,6 @@ msgid "unable to find an environment containing class %s"
 msgstr "não foi possível encontrar um ambiente contendo a classe \"%s\""
 
 msgid ""
-"Note: the specification for S3 class %s in package %s seems equivalent to "
-"one from package %s: not turning on duplicate class definitions for this "
-"class."
-msgstr ""
-
-msgid ""
 "Note: some superclasses of class %s in package %s have duplicate "
 "definitions.  This definition is not being treated as equivalent to that "
 "from package %s"
@@ -855,6 +872,11 @@ msgid ""
 "from package %s: not turning on duplicate class definitions for this class."
 msgstr ""
 
+msgid ""
+"Found more than one class \"%s\" in cache; using the first, from namespace "
+"'%s'"
+msgstr ""
+
 msgid "undefined subclass %s of class %s; definition not updated"
 msgstr "subclasse %s da classe %s não definida; definição não atualizada"
 
@@ -899,12 +921,6 @@ msgstr ""
 msgid "no suitable arguments to dispatch methods in this function"
 msgstr ""
 
-msgid "special function %s is not permitted to have methods"
-msgstr ""
-
-msgid "special function %s has no known argument list; will assume '(x, ...)'"
-msgstr ""
-
 #, fuzzy
 msgid "making a generic for special function %s"
 msgstr "Criando uma nova função genérica a partir da função \"%s\""
@@ -944,27 +960,21 @@ msgid ""
 msgstr "argumento \"f\" deve ser uma função genérica ou %s"
 
 #, fuzzy
-msgid "methods cannot be defined for the primitive function %s"
-msgstr ""
-"métodos não podem ser definidos para função primitiva '%s' nessa versão do R"
-
-#, fuzzy
 msgid "no generic function found for %s"
 msgstr "nenhuma função genérica '%s' encontrada"
 
 msgid "Empty function name in .getGeneric"
 msgstr ""
 
-msgid ""
-"package %s seems to have out-of-date methods; need to reinstall from source"
-msgstr ""
-
 msgid "no methods found for %s; cacheGenericsMetaData() will have no effect"
 msgstr ""
 
 msgid "invalid value from generic function %s, class %s, expected %s"
 msgstr ""
 
+msgid "\"MethodsList\" is defunct; allMethods now are empty"
+msgstr ""
+
 msgid ""
 "the body of the generic function for %s calls 'standardGeneric' to dispatch "
 "on a different name (\"%s\")!"
@@ -1044,9 +1054,6 @@ msgstr ""
 msgid "no definition found for class %s"
 msgstr "nenhuma definição existente para função '%s'"
 
-msgid "trying to execute load actions without 'methods' package"
-msgstr ""
-
 #, fuzzy
 msgid "missing function for load action: %s"
 msgstr "nenhuma definição existente para função \"%s\""
@@ -1265,6 +1272,13 @@ msgid ""
 msgstr ""
 
 #, fuzzy
+msgid "Function must be an S4 generic"
+msgstr "Função fornecida como argumento \"f\" deve ser genérica"
+
+msgid "method is not being debugged"
+msgstr ""
+
+#, fuzzy
 msgid "object %s not found"
 msgstr "nenhuma função genérica '%s' encontrada"
 
@@ -1337,8 +1351,8 @@ msgstr ""
 
 #, fuzzy
 msgid ""
-"invalid mlist element for signature %s at level %d (should be methods list "
-"or method, had class %s)"
+"invalid mlist element for signature %s at level %d (should be "
+"MethodDefinition or .Primitive, had class %s)"
 msgstr ""
 "argumento 'f' inválido, esperada uma função ou seu nome, mas foi obtido um "
 "objeto de classe  \"%s\""
@@ -1356,7 +1370,7 @@ msgstr ""
 "um objeto de classe \"%s\""
 
 #, fuzzy
-msgid "invalid or unset methods table in generic function \""
+msgid "invalid or unset methods table in generic function %s"
 msgstr "Tentando encontrar uma tabela de métodos em uma função não-genérica"
 
 #, fuzzy
@@ -1572,6 +1586,10 @@ msgid "%s is not a field in this class"
 msgstr "\"%s\" não é um campo definido nessa classe"
 
 #, fuzzy
+msgid "Methods not found: %s"
+msgstr "nenhuma função genérica '%s' encontrada"
+
+#, fuzzy
 msgid ""
 "the definition of class %s in package %s is locked, methods may not be "
 "redefined"
@@ -1688,6 +1706,11 @@ msgid "field %s of class %s has a non-default binding and cannot be locked"
 msgstr ""
 
 msgid ""
+"Reference superclasses must come from the same package for the environment "
+"to be defined:  got %s and %s"
+msgstr ""
+
+msgid ""
 "Class %s is not a subclass of %s; functional semantics not defined for this "
 "class"
 msgstr ""
@@ -1743,8 +1766,7 @@ msgstr ""
 msgid "the method for %s for this signature was not being traced"
 msgstr "no método %s com assinatura %s:"
 
-msgid ""
-"making a traced version of a primitive; arguments will be treated as '...'"
+msgid "making a traced version of a special; arguments may be altered"
 msgstr ""
 
 #, fuzzy
@@ -1986,6 +2008,22 @@ msgid_plural ""
 msgstr[0] "nenhuma definição existente para função '%s'"
 msgstr[1] "nenhuma definição existente para função '%s'"
 
+#, fuzzy
+#~ msgid "methods cannot be defined for the primitive function %s"
+#~ msgstr ""
+#~ "métodos não podem ser definidos para função primitiva '%s' nessa versão "
+#~ "do R"
+
+#~ msgid ""
+#~ "'callGeneric' with a primitive needs explicit arguments (no formal args "
+#~ "defined)"
+#~ msgstr ""
+#~ "'callGeneric' com uma primitiva requer argumentos explícitos (nenhum "
+#~ "argumento formal definido)"
+
+#~ msgid "\""
+#~ msgstr "\""
+
 #~ msgid "no class %s found as expected in removing subclass %s"
 #~ msgstr ""
 #~ "nenhuma classe \"%s\" encontrada como esperado na remoção da subclasse %s"
diff --git a/src/library/methods/po/R-ru.po b/src/library/methods/po/R-ru.po
index d44d371..080e9a0 100644
--- a/src/library/methods/po/R-ru.po
+++ b/src/library/methods/po/R-ru.po
@@ -10,50 +10,33 @@ msgid ""
 msgstr ""
 "Project-Id-Version: R 2.11.0\n"
 "Report-Msgid-Bugs-To: bugs.r-project.org\n"
-"POT-Creation-Date: 2013-11-25 05:14\n"
-"PO-Revision-Date: 2014-03-11 10:30-0600\n"
+"POT-Creation-Date: 2015-06-06 13:51\n"
+"PO-Revision-Date: 2016-04-05 18:14-0600\n"
 "Last-Translator: Alexey Shipunov <dactylorhiza at gmail.com>\n"
 "Language-Team: Russian <ru at li.org>\n"
 "Language: ru\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=koi8-r\n"
 "Content-Transfer-Encoding: 8bit\n"
-"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n"
-"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
+"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
 
-msgid "OOPS: something wrong with line %d in '.OldClassesPrototypes'"
-msgstr "OOPS: ���-�� �� ��� �� ������� %d � '.OldClassesPrototypes'"
+msgid "OOPS: something wrong with '.OldClassesPrototypes[[%d]]'"
+msgstr "OOPS: ���-�� �� ��� � '.OldClassesPrototypes[[%d]]'"
 
-msgid ""
-"unnamed argument to initialize() for S3 class must have a class definition; "
-"%s does not"
-msgstr ""
-"���������� �������� � initialize() ��� S3-������ ������ ����� ����������� "
-"������; � %s -- �� �����"
+msgid "unnamed argument to initialize() for S3 class must have a class definition; %s does not"
+msgstr "���������� �������� � initialize() ��� S3-������ ������ ����� ����������� ������; � %s -- �� �����"
 
-msgid ""
-"unnamed argument must extend either the S3 class or the class of the data "
-"part; not true of class %s"
-msgstr ""
-"���������� �������� ������ ��������� ���� S3-�����, ���� ����� ����� ������; "
-"��� �� ��� ��� ������ %s"
+msgid "unnamed argument must extend either the S3 class or the class of the data part; not true of class %s"
+msgstr "���������� �������� ������ ��������� ���� S3-�����, ���� ����� ����� ������; ��� �� ��� ��� ������ %s"
 
-msgid ""
-"class %s does not have an S3 data part, and so is of type \"S4\"; no S3 "
-"equivalent"
-msgstr ""
-"����� %s �� ����� ������������� S3-������� ������, � ������� �� ���� \"S4\"; "
-"S3 ����������� ���"
+msgid "class %s does not have an S3 data part, and so is of type \"S4\"; no S3 equivalent"
+msgstr "����� %s �� ����� ������������� S3-������� ������, � ������� �� ���� \"S4\"; S3 ����������� ���"
 
-msgid ""
-"class %s is VIRTUAL; not meaningful to create an S4 object from this class"
-msgstr ""
-"r���� %s ���������; �� ����� ������ ��������� S4-������ �� ����� ������"
+msgid "class %s is VIRTUAL; not meaningful to create an S4 object from this class"
+msgstr "r���� %s ���������; �� ����� ������ ��������� S4-������ �� ����� ������"
 
 msgid "object must be a valid data part for class %s; not true of type %s"
-msgstr ""
-"������ ������ ���� ���������� ������ ������ ��� ������ %s; ��� �� ��� � ���� "
-"%s"
+msgstr "������ ������ ���� ���������� ������ ������ ��� ������ %s; ��� �� ��� � ���� %s"
 
 msgid "cannot specify matrix() arguments when specifying '.Data'"
 msgstr "�� ���� ���������� ��������� matrix(), ����� ��������� '.Data'"
@@ -65,25 +48,16 @@ msgid "cannot have more than one unnamed argument as environment"
 msgstr "���������� ����� ����� ������ �������������� ��������� � ���������"
 
 msgid "unnamed argument to new() must be an environment for the new object"
-msgstr ""
-"������������� �������� � new() ������ ���� ���������� ��� ������ �������"
+msgstr "������������� �������� � new() ������ ���� ���������� ��� ������ �������"
 
-msgid ""
-"methods may not be defined for primitive function %s in this version of R"
-msgstr ""
-"� ���� ������ R ������ �� ����� ���� ���������� ��� ������������ ������� %s"
+msgid "methods may not be defined for primitive function %s in this version of R"
+msgstr "� ���� ������ R ������ �� ����� ���� ���������� ��� ������������ ������� %s"
 
-msgid ""
-"S3Part() is only defined for classes set up by setOldCLass(), basic classes "
-"or subclasses of these:  not true of class %s"
-msgstr ""
-"S3Part() ���������� ������ ��� ������� ������������� ����� setOldCLass(), �� "
-"������� ������ ��� ���������: ��� ����� ��� ������ %s"
+msgid "S3Part() is only defined for classes set up by setOldCLass(), basic classes or subclasses of these:  not true of class %s"
+msgstr "S3Part() ���������� ������ ��� ������� ������������� ����� setOldCLass(), �� ������� ������ ��� ���������: ��� ����� ��� ������ %s"
 
-msgid ""
-"the 'S3Class' argument must be a superclass of %s:  not true of class %s"
-msgstr ""
-"�������� 'S3Class' ������ ���� ������������ %s: ��� �� ��� ��� ������ %s"
+msgid "the 'S3Class' argument must be a superclass of %s:  not true of class %s"
+msgstr "�������� 'S3Class' ������ ���� ������������ %s: ��� �� ��� ��� ������ %s"
 
 msgid "replacement value must extend class %s, got %s"
 msgstr "���������� �������� ������ ��������� ����� %s, ������� %s"
@@ -91,41 +65,20 @@ msgstr "
 msgid "replacement value must be of class %s, got one of class %s"
 msgstr "���������� �������� ������ ��������� ����� %s, ������� %s"
 
-msgid ""
-"no 'replace' method was defined for 'as(x, \"%s\") <- value' for class %s"
-msgstr ""
-"�� ���� ���������� 'replace' ������ ��� 'as(x, \"%s\") <- value' ��� ������ "
-"%s"
+msgid "no 'replace' method was defined for 'as(x, \"%s\") <- value' for class %s"
+msgstr "�� ���� ���������� 'replace' ������ ��� 'as(x, \"%s\") <- value' ��� ������ %s"
 
-msgid ""
-"the 'coerce' argument to 'setIs' should be a function of one argument, got "
-"an object of class %s"
-msgstr ""
-"�������� 'coerce' ��� 'setIs' ������ ���� �������� ������ ���������, ������� "
-"������ ������ %s"
+msgid "the 'coerce' argument to 'setIs' should be a function of one argument, got an object of class %s"
+msgstr "�������� 'coerce' ��� 'setIs' ������ ���� �������� ������ ���������, ������� ������ ������ %s"
 
-msgid ""
-"the computation: 'as(object,\"%s\") <- value' is valid when object has class "
-"%s only if 'is(value, \"%s\")' is TRUE ('class(value)' was %s)"
-msgstr ""
-"����������: 'as(object,\"%s\") <- value' ���������, ����� ������ ����� ����� "
-"%s ������ ���� 'is(value, \"%s\")' �������� TRUE ('class(value)' ���� %s)"
+msgid "the computation: 'as(object,\"%s\") <- value' is valid when object has class %s only if 'is(value, \"%s\")' is TRUE ('class(value)' was %s)"
+msgstr "����������: 'as(object,\"%s\") <- value' ���������, ����� ������ ����� ����� %s ������ ���� 'is(value, \"%s\")' �������� TRUE ('class(value)' ���� %s)"
 
-msgid ""
-"there is no automatic definition for 'as(object, \"%s\") <- value' when "
-"object has class %s and no 'replace' argument was supplied; replacement will "
-"be an error"
-msgstr ""
-"��� ��������������� ����������� ��� 'as(������, \"%s\") <- value', ��� "
-"������ ����� ����� %s � �������� 'replace' �� ��� ������������; ������ ����� "
-"�������"
+msgid "there is no automatic definition for 'as(object, \"%s\") <- value' when object has class %s and no 'replace' argument was supplied; replacement will be an error"
+msgstr "��� ��������������� ����������� ��� 'as(������, \"%s\") <- value', ��� ������ ����� ����� %s � �������� 'replace' �� ��� ������������; ������ ����� �������"
 
-msgid ""
-"the 'replace' argument to setIs() should be a function of 2 or 3 arguments, "
-"got an object of class %s"
-msgstr ""
-"�������� 'replace' ��� setIs() ������ ���� �������� 2 ��� 3 ����������, � "
-"������� ������ ������ %s"
+msgid "the 'replace' argument to setIs() should be a function of 2 or 3 arguments, got an object of class %s"
+msgstr "�������� 'replace' ��� setIs() ������ ���� �������� 2 ��� 3 ����������, � ������� ������ ������ %s"
 
 msgid "the member classes must be defined: not true of %s"
 msgstr "������-����� ������ ������ ���� ����������: �� ����� ��� %s"
@@ -136,25 +89,14 @@ msgstr "
 msgid "invalid argument 'name': %s"
 msgstr "������������ 'name' ���������: %s"
 
-msgid ""
-"%s is a primitive function;  methods can be defined, but the generic "
-"function is implicit, and cannot be changed."
-msgstr ""
-"\"%s\" �������� ������������ ��������; ������ ����� ���� ����������, �� "
-"����� ������� ��������������� � �� ����� ���� ��������."
+msgid "%s is a primitive function;  methods can be defined, but the generic function is implicit, and cannot be changed."
+msgstr "\"%s\" �������� ������������ ��������; ������ ����� ���� ����������, �� ����� ������� ��������������� � �� ����� ���� ��������."
 
-msgid ""
-"if the 'def' argument is supplied, it must be a function that calls "
-"standardGeneric(\"%s\") or is the default"
-msgstr ""
-"���� ������������ �������� 'def' , �� ������ ���� ��������, ������� �������� "
-"standardGeneric(\"%s\") ��� ���������"
+msgid "if the 'def' argument is supplied, it must be a function that calls standardGeneric(\"%s\") or is the default"
+msgstr "���� ������������ �������� 'def' , �� ������ ���� ��������, ������� �������� standardGeneric(\"%s\") ��� ���������"
 
-msgid ""
-"must supply a function skeleton for %s, explicitly or via an existing "
-"function"
-msgstr ""
-"���������� ������������ ������ %s, ���� ���� ����� ����� ������������ �������"
+msgid "must supply a function skeleton for %s, explicitly or via an existing function"
+msgstr "���������� ������������ ������ %s, ���� ���� ����� ����� ������������ �������"
 
 msgid ""
 "Creating a generic function for %s from %s in %s\n"
@@ -185,19 +127,11 @@ msgstr "
 msgid "the environment %s is locked; cannot assign methods for function %s"
 msgstr "��������� %s �������������; �� ���� ��������� ������ ��� ������� %s"
 
-msgid ""
-"the 'where' environment (%s) is a locked namespace; cannot assign methods "
-"there"
-msgstr ""
-"��������� 'where' (%s) �������� ��������������� ������������� ����; �� ���� "
-"���������� ��� ������"
+msgid "the 'where' environment (%s) is a locked namespace; cannot assign methods there"
+msgstr "��������� 'where' (%s) �������� ��������������� ������������� ����; �� ���� ���������� ��� ������"
 
-msgid ""
-"Copying the generic function %s to environment %s, because the previous "
-"version was in a sealed namespace (%s)"
-msgstr ""
-"������� ����� ������� %s � ��������� %s, ������ ��� ���������� ������ ���� � "
-"������������ ������������ ���� (%s)"
+msgid "Copying the generic function %s to environment %s, because the previous version was in a sealed namespace (%s)"
+msgstr "������� ����� ������� %s � ��������� %s, ������ ��� ���������� ������ ���� � ������������ ������������ ���� (%s)"
 
 msgid "no existing definition for function %s"
 msgstr "��� ������������� ����������� ��� ������� %s"
@@ -208,29 +142,17 @@ msgstr "
 msgid "Creating a generic function for %s from package %s in %s"
 msgstr "�������� ����� ����� ������� ��� %s �� ������ %s � %s"
 
-msgid ""
-"the method for function %s and signature %s is sealed and cannot be re-"
-"defined"
+msgid "the method for function %s and signature %s is sealed and cannot be re-defined"
 msgstr "����� ��� ������� %s � ������� %s ���������� � �� ����� ���� ��������"
 
-msgid ""
-"For function %s, signature %s: argument in method definition changed from "
-"(%s) to (%s)"
-msgstr ""
-"��� ������� %s, �������������� %s: �������� � ����������� ������ ������� � "
-"(%s) �� (%s)"
+msgid "For function %s, signature %s: argument in method definition changed from (%s) to (%s)"
+msgstr "��� ������� %s, �������������� %s: �������� � ����������� ������ ������� � (%s) �� (%s)"
 
-msgid ""
-"primitive functions cannot be methods; they must be enclosed in a regular "
-"function"
-msgstr ""
-"������������ ������� �� ����� ���� ��������; ��� ������ ���� ������� � "
-"���������� �������"
+msgid "primitive functions cannot be methods; they must be enclosed in a regular function"
+msgstr "������������ ������� �� ����� ���� ��������; ��� ������ ���� ������� � ���������� �������"
 
-msgid ""
-"invalid method definition: expected a function, got an object of class %s"
-msgstr ""
-"�������� ����������� ������: ��������� �������, � ������� ������ ������ %s"
+msgid "invalid method definition: expected a function, got an object of class %s"
+msgstr "�������� ����������� ������: ��������� �������, � ������� ������ ������ %s"
 
 msgid "function supplied as argument 'f' must be a generic"
 msgstr "�������, ��������������� ���������� 'f' ������ ���� �����"
@@ -254,8 +176,7 @@ msgid "'file' must be a character string or a connection"
 msgstr "'file' ������ ���� ��������� ������� ��� �����������"
 
 msgid ""
-"argument 'signature' is not meaningful with the current implementation and "
-"is ignored \n"
+"argument 'signature' is not meaningful with the current implementation and is ignored \n"
 "(extract a subset of the methods list instead)"
 msgstr ""
 "�������� 'signature' ������ �� ������ � ��������� ����� � �������� \n"
@@ -270,18 +191,14 @@ msgstr "
 msgid "%s has no methods defined"
 msgstr "%s �� �������� ������������ �������"
 
-msgid ""
-"bad class specified for element %d (should be a single character string)"
-msgstr ""
-"��� �������� %d ���������� �������� ����� (������ ���� �������������� "
-"�������)"
+msgid "bad class specified for element %d (should be a single character string)"
+msgstr "��� �������� %d ���������� �������� ����� (������ ���� �������������� �������)"
 
-msgid ""
-"first argument should be the names of one of more generic functions (got "
-"object of class %s)"
-msgstr ""
-"������ �������� ������ ���� ������(-���) ����� ������� (� ������� ������ "
-"������ %s)"
+msgid "first argument should be the names of one of more generic functions (got object of class %s)"
+msgstr "������ �������� ������ ���� ������(-���) ����� ������� (� ������� ������ ������ %s)"
+
+msgid "must supply 'generic.function' or 'class'"
+msgstr "���� ������� 'generic.function' ��� 'class'"
 
 msgid "%s is not an S4 generic function in %s; methods not removed"
 msgstr "%s �� �������� ����� �������� S4 � %s; ������ �� �������"
@@ -292,12 +209,8 @@ msgstr "
 msgid "Restoring default function definition of %s"
 msgstr "�������������� ����������� �� ��������� ��� ������� %s"
 
-msgid ""
-"error in updating S4 generic function %s; the function definition is not an "
-"S4 generic function (class %s)"
-msgstr ""
-"������ � ���������� ����� ������� S4 %s; ����������� ������� �� �������� "
-"����� �������� S4 (����� %s)"
+msgid "error in updating S4 generic function %s; the function definition is not an S4 generic function (class %s)"
+msgstr "������ � ���������� ����� ������� S4 %s; ����������� ������� �� �������� ����� �������� S4 (����� %s)"
 
 msgid "Function %s is already a group generic; no change"
 msgstr "������� %s ��� � ������ �����; ��� ���������"
@@ -305,15 +218,8 @@ msgstr "
 msgid "Function %s is a group generic; do not call it directly"
 msgstr "������� %s �������� �������������; �� ��������� �� ��������"
 
-msgid ""
-"'callGeneric' with a primitive needs explicit arguments (no formal args "
-"defined)"
-msgstr ""
-"'callGeneric' � ���������� ��������� � ����� ���������� (�� ���������� "
-"���������� ���������)"
-
-msgid "'callGeneric' must be called from a generic function or method"
-msgstr "'callGeneric' ������ ���� ������� �� ����� ������� ��� ������"
+msgid "callGeneric() must be called from within a method body"
+msgstr "callGeneric() ������ ���� ������� �� ���� ������"
 
 msgid "expected a non-empty character string for argument name"
 msgstr "������ �������� ��������� ������ ��� ����� ���������"
@@ -324,12 +230,8 @@ msgstr "
 msgid "%s is a primitive function; its generic form cannot be redefined"
 msgstr "%s �������� ����������� �������� � �� ����� ���� ��������������"
 
-msgid ""
-"%s is not currently a generic:  define it first to create a non-default "
-"implicit form"
-msgstr ""
-"%s � ��������� ����� �� �������� ����� ��������: ���������� �� ������, ����� "
-"������� �� ������������ ��������������� �����"
+msgid "%s is not currently a generic:  define it first to create a non-default implicit form"
+msgstr "%s � ��������� ����� �� �������� ����� ��������: ���������� �� ������, ����� ������� �� ������������ ��������������� �����"
 
 msgid "must provide an environment table; got class %s"
 msgstr "����� ������� ������� ���������; ������� ����� %s"
@@ -364,22 +266,14 @@ msgstr "
 msgid "generic names differ: %s, %s"
 msgstr "����� ����� �����������: %s, %s"
 
-msgid ""
-"argument %s must be a generic function or a single character string; got an "
-"object of class %s"
-msgstr ""
-"�������� %s ������ ���� ����� �������� ��� ����� ��������� �������; ������� "
-"������ ������ %s"
+msgid "argument %s must be a generic function or a single character string; got an object of class %s"
+msgstr "�������� %s ������ ���� ����� �������� ��� ����� ��������� �������; ������� ������ ������ %s"
 
 msgid "non-generic function '%s' given to findMethods()"
 msgstr "�� ����� ������� '%s' ������ findMethods()"
 
-msgid "only FALSE is meaningful for 'inherited', when 'where' is supplied (got"
-msgstr ""
-"������ FALSE ����� �������� ��� 'inherited', ����� ������� 'where' (�������"
-
-msgid "\""
-msgstr "\""
+msgid "only FALSE is meaningful for 'inherited', when 'where' is supplied (got %s)"
+msgstr "������ FALSE ����� �������� ��� 'inherited', ����� ������� 'where' (������� %s)"
 
 msgid "argument 'f' must be a generic function or %s"
 msgstr "�������� 'f' ������ ���� ����� �������� ��� %s"
@@ -387,29 +281,20 @@ msgstr "
 msgid "'%s' is not a known generic function {and 'package' not specified}"
 msgstr "'%s' �� �������� ��������� ����� �������� {� 'package' �� ������}"
 
-msgid ""
-"invalid first argument: should be the name of the first argument in the "
-"dispatch"
+msgid "invalid first argument: should be the name of the first argument in the dispatch"
 msgstr "�������� ������ ��������: ������ ���� ��� ������� ��������� � ��������"
 
 msgid "duplicate element names in 'MethodsList' at level %d: %s"
 msgstr "������������� ����� ��������� � 'MethodsList' �� ������ %d: %s"
 
-msgid ""
-"element %d at level %d (class %s) cannot be interpreted as a function or "
-"named list"
-msgstr ""
-"������� %d �� ������ %d (����� %s) �� ����� ���� ��������������� ��� ������� "
-"��� ����������� ������"
+msgid "element %d at level %d (class %s) cannot be interpreted as a function or named list"
+msgstr "������� %d �� ������ %d (����� %s) �� ����� ���� ��������������� ��� ������� ��� ����������� ������"
 
 msgid "arguments 'names' and 'signature' must have the same length"
 msgstr "��������� '�����' � '�������������' ������ ���� ���������� �����"
 
-msgid ""
-"inserting method with invalid signature matching argument '...' to class %s"
-msgstr ""
-"������� ������ � �������� ���������������, ����������� � ���������� '...' � "
-"����� %s"
+msgid "inserting method with invalid signature matching argument '...' to class %s"
+msgstr "������� ������ � �������� ���������������, ����������� � ���������� '...' � ����� %s"
 
 msgid "inserting method corresponding to empty signature"
 msgstr "�������� ����� ��������������� ������� ��������������"
@@ -420,65 +305,32 @@ msgstr "
 msgid "invalid method sublist"
 msgstr "�������� ��������� �������"
 
-msgid ""
-"%f is not a valid generic function: methods list was an object of class %s"
-msgstr ""
-"%f �� �������� ���������� ����� ��������: ������ ������� ��� �������� ������ "
-"%s"
+msgid "%f is not a valid generic function: methods list was an object of class %s"
+msgstr "%f �� �������� ���������� ����� ��������: ������ ������� ��� �������� ������ %s"
 
-msgid ""
-"%s must be TRUE, FALSE, or a named logical vector of those values; got an "
-"object of class %s"
-msgstr ""
-"%s ������ ���� TRUE, FALSE, ��� ����������� ���������� �������� ���� "
-"��������; ������� ������ ������ %s"
+msgid "%s must be TRUE, FALSE, or a named logical vector of those values; got an object of class %s"
+msgstr "%s ������ ���� TRUE, FALSE, ��� ����������� ���������� �������� ���� ��������; ������� ������ ������ %s"
 
-msgid ""
-"default method must be a method definition, a primitive or NULL: got an "
-"object of class %s"
-msgstr ""
-"����� �� ��������� ������ ���� ������������ ������, ���������� ��� NULL: "
-"������� ������ ������ %s"
+msgid "default method must be a method definition, a primitive or NULL: got an object of class %s"
+msgstr "����� �� ��������� ������ ���� ������������ ������, ���������� ��� NULL: ������� ������ ������ %s"
 
-msgid ""
-"trying to match a method signature to an object (of class %s) that is not a "
-"generic function"
-msgstr ""
-"������� ����������� ������������� ������ � �������� (������ %s), ������� �� "
-"�������� ����� ��������"
+msgid "trying to match a method signature to an object (of class %s) that is not a generic function"
+msgstr "������� ����������� ������������� ������ � �������� (������ %s), ������� �� �������� ����� ��������"
 
 msgid "invalid 'package' slot or attribute, wrong length"
 msgstr "������������ ������� ����� ��� ��������, ������������ �����"
 
-msgid ""
-"invalid element in a list for \"signature\" argument; element %d is neither "
-"a class definition nor a class name"
-msgstr ""
-"������������ ������� � ������ ���������� \"signature\"; ������� %d -- �� "
-"����������� � �� ��� ������"
+msgid "invalid element in a list for \"signature\" argument; element %d is neither a class definition nor a class name"
+msgstr "������������ ������� � ������ ���������� \"signature\"; ������� %d -- �� ����������� � �� ��� ������"
 
-msgid ""
-"trying to match a method signature of class %s; expects a list or a "
-"character vector"
-msgstr ""
-"������� ��������� ����� �������������� ������ %s; ��������� ������ ��� "
-"���������� ������"
+msgid "trying to match a method signature of class %s; expects a list or a character vector"
+msgstr "������� ��������� ����� �������������� ������ %s; ��������� ������ ��� ���������� ������"
 
-msgid ""
-"object to use as a method signature for function %s does not look like a "
-"legitimate signature (a vector of single class names): there were %d class "
-"names, but %d elements in the signature object"
-msgstr ""
-"������ ��� ������������� � �������� �������������� ������ ��� ������� %s �� "
-"�������� ���������� ��������������� (�������� ���������� ������ ����): ��� "
-"���� %d ������� ����, �� %d ��������� � ��������������"
+msgid "object to use as a method signature for function %s does not look like a legitimate signature (a vector of single class names): there were %d class names, but %d elements in the signature object"
+msgstr "������ ��� ������������� � �������� �������������� ������ ��� ������� %s �� �������� ���������� ��������������� (�������� ���������� ������ ����): ��� ���� %d ������� ����, �� %d ��������� � ��������������"
 
-msgid ""
-"more elements in the method signature (%d) than in the generic signature "
-"(%d) for function %s"
-msgstr ""
-"� �������������� ������ (%d) ������ ���������, ��� � ����� �������������� "
-"(%d) ������� %s"
+msgid "more elements in the method signature (%d) than in the generic signature (%d) for function %s"
+msgstr "� �������������� ������ (%d) ������ ���������, ��� � ����� �������������� (%d) ������� %s"
 
 msgid "no generic function found corresponding to %s"
 msgstr "��� ����� �������, ��������������� %s"
@@ -486,33 +338,29 @@ msgstr "
 msgid "skipping methods list element %s of unexpected class %s"
 msgstr "��������� ������� ������ ������� %s ������������ ������ %s"
 
-msgid ""
-"%s, along with other use of the \"MethodsList\" metadata objects, is "
-"deprecated."
-msgstr ""
-"%s, ����� ��� � ���� ������������� �������� ���������� \"MethodsList\", �� "
-"�������������."
+msgid "%s, along with other use of the \"MethodsList\" metadata objects, is deprecated."
+msgstr "%s, ����� ��� � ���� ������������� �������� ���������� \"MethodsList\", �� �������������."
 
 msgid "in %s: use of \"MethodsList\" metadata objects is deprecated."
-msgstr ""
-"� %s: ������������� ������� ���������� \"MethodsList\" �� �������������."
+msgstr "� %s: ������������� ������� ���������� \"MethodsList\" �� �������������."
 
 msgid "use %s instead."
 msgstr "������ ����� ����������� %s."
 
+msgid "%s, along with other use of the \"MethodsList\" metadata objects, is defunct."
+msgstr "%s, ����� ��� � ���� ������������� �������� ���������� \"MethodsList\", ������ �� ��������."
+
+msgid "in %s: use of \"MethodsList\" metadata objects is defunct."
+msgstr "� %s: ������������� ������� ���������� \"MethodsList\" ������ �� ��������."
+
 msgid "invalid object for formal method definition: type %s"
 msgstr "�������� ������ ��� ����������� ����������� ������: ��� %s"
 
 msgid "missing package slot (%s) in object of class %s (package info added)"
-msgstr ""
-"����������� ������� ������ (%s) � ������� ������ %s (��������� ���������� � "
-"������)"
+msgstr "����������� ������� ������ (%s) � ������� ������ %s (��������� ���������� � ������)"
 
-msgid ""
-"'initialize' method returned an object of class %s instead of the required "
-"class %s"
-msgstr ""
-"����� 'initialize' ��������� ������ ������ %s ������ ���������� ������ %s"
+msgid "'initialize' method returned an object of class %s instead of the required class %s"
+msgstr "����� 'initialize' ��������� ������ ������ %s ������ ���������� ������ %s"
 
 msgid "%d: target \"%s\": chose \"%s\" (others: %s)"
 msgstr "%d: ���� \"%s\": ������� \"%s\" (������: %s)"
@@ -524,63 +372,43 @@ msgid "class generator function for class %s from package %s"
 msgstr "�������� ����� ������������ ������� ��� ������ %s �� ������ %s"
 
 msgid "the names in signature for method (%s) do not match %s's arguments (%s)"
-msgstr ""
-"����� � �������������� ��� ������ (%s) �� ��������� � %s ����������� ������� "
-"(%s)"
+msgstr "����� � �������������� ��� ������ (%s) �� ��������� � %s ����������� ������� (%s)"
 
-msgid ""
-"a call to callNextMethod() appears in a call to %s, but the call does not "
-"seem to come from either a generic function or another 'callNextMethod'"
-msgstr ""
-"��� ��������� � %s, ������ ��� ������ callNextMethod(), �� ������ ����� �� "
-"���, ������, ���������� ������ ����� �������� ��� ������ 'callNextMethod'"
+msgid "the names in signature for method (%s) do not match function's arguments (%s)"
+msgstr "����� � �������������� ��� ������ (%s) �� ��������� � ����������� ������� (%s)"
 
-msgid ""
-"call to 'callNextMethod' does not appear to be in a 'method' or "
-"'callNextMethod' context"
-msgstr ""
-"����� 'callNextMethod' ������, �� ������ � �������� 'method' ���� "
-"'callNextMethod'"
+msgid "a call to callNextMethod() appears in a call to %s, but the call does not seem to come from either a generic function or another 'callNextMethod'"
+msgstr "��� ��������� � %s, ������ ��� ������ callNextMethod(), �� ������ ����� �� ���, ������, ���������� ������ ����� �������� ��� ������ 'callNextMethod'"
+
+msgid "call to 'callNextMethod' does not appear to be in a 'method' or 'callNextMethod' context"
+msgstr "����� 'callNextMethod' ������, �� ������ � �������� 'method' ���� 'callNextMethod'"
 
 msgid "bad object found as method (class %s)"
 msgstr "������ ������ ������ � �������� ������ (����� %s)"
 
-msgid ""
-"in constructing the prototype for class %s: prototype has class %s, but the "
-"data part specifies class %s"
-msgstr ""
-"��� ��������������� ��������� ��� ������ %s: �������� �������� ������� %s, "
-"�� ��� ������ ��������� �� ����� %s"
+msgid "No next method available"
+msgstr "��� ���������� ���������� ������"
 
-msgid ""
-"in constructing the prototype for class %s, slots in prototype and not in "
-"class: %s"
-msgstr ""
-"��� ��������������� ��������� ������ %s, ����� � ��������� � �� � ������: %s"
+msgid "in constructing the prototype for class %s: prototype has class %s, but the data part specifies class %s"
+msgstr "��� ��������������� ��������� ��� ������ %s: �������� �������� ������� %s, �� ��� ������ ��������� �� ����� %s"
 
-msgid ""
-"in making the prototype for class %s elements of the prototype failed to "
-"match the corresponding slot class: %s"
-msgstr ""
-"��� �������� ��������� ��� ������ %s �������� ��������� �� ��������� � "
-"��������������� ������ ������: %s"
+msgid "in constructing the prototype for class %s, slots in prototype and not in class: %s"
+msgstr "��� ��������������� ��������� ������ %s, ����� � ��������� � �� � ������: %s"
 
-msgid ""
-"potential cycle in class inheritance: %s has duplicates in superclasses and "
-"subclasses (%s)"
-msgstr ""
-"��������� ���� � ������������ ������: %s ����� ������� � ������������ � "
-"���������� (%s)"
+msgid "in making the prototype for class %s elements of the prototype failed to match the corresponding slot class: %s"
+msgstr "��� �������� ��������� ��� ������ %s �������� ��������� �� ��������� � ��������������� ������ ������: %s"
+
+msgid "potential cycle in class inheritance: %s has duplicates in superclasses and subclasses (%s)"
+msgstr "��������� ���� � ������������ ������: %s ����� ������� � ������������ � ���������� (%s)"
 
 msgid "undefined slot classes in definition of %s: %s"
 msgstr "�������������� �������� ������ � ����������� %s: %s"
 
-msgid ""
-"in definition of class %s, information for superclass %s is of class %s "
-"(expected \"SClassExtension\")"
-msgstr ""
-"� ����������� ������ %s, ���������� ��� ����������� %s ����������� ������ %s "
-"(��������� \"SClassExtension\")"
+msgid "(class %s)"
+msgstr "(����� %s)"
+
+msgid "in definition of class %s, information for superclass %s is of class %s (expected \"SClassExtension\")"
+msgstr "� ����������� ������ %s, ���������� ��� ����������� %s ����������� ������ %s (��������� \"SClassExtension\")"
 
 msgid "class %s extends an undefined class, %s"
 msgstr "����� %s ��������� �������������� �����, %s"
@@ -588,12 +416,8 @@ msgstr "
 msgid "'Class' must be a valid class definition or class"
 msgstr "'Class' ������ ���� ���������� ������������ ������ ���� �������"
 
-msgid ""
-"trying to assign an object of class %s as the definition of class %s: must "
-"supply a \"classRepresentation\" object"
-msgstr ""
-"������� ��������� ������ ������ %s ������������ ������ %s: ���������� "
-"������������ ������ \"classRepresentation\""
+msgid "trying to assign an object of class %s as the definition of class %s: must supply a \"classRepresentation\" object"
+msgstr "������� ��������� ������ ������ %s ������������ ������ %s: ���������� ������������ ������ \"classRepresentation\""
 
 msgid "assigning as %s a class representation with internal name %s"
 msgstr "�������� ��� %s ������������� ������ � ���������� ������ %s"
@@ -604,88 +428,47 @@ msgstr "
 msgid "'externalptr' objects cannot be initialized from new()"
 msgstr "'externalptr' ������� �� ����� ���� ���������������� �� new()"
 
-msgid ""
-"initializing objects from class %s with these arguments is not supported"
-msgstr ""
-"������������� �������� �� ������ %s � ������ ����������� �� ��������������"
+msgid "initializing objects from class %s with these arguments is not supported"
+msgstr "������������� �������� �� ������ %s � ������ ����������� �� ��������������"
 
-msgid ""
-"in defining class %s, the supplied data part class, %s is not valid (must be "
-"a basic class or a virtual class combining basic classes)"
-msgstr ""
-"��� ����������� ������ %s, ��������������� ����� ������ ������, %s �� ����� "
-"(������ ���� �������� ������� ��� ����������� �������, ���������� �������� "
-"������)"
+msgid "in defining class %s, the supplied data part class, %s is not valid (must be a basic class or a virtual class combining basic classes)"
+msgstr "��� ����������� ������ %s, ��������������� ����� ������ ������, %s �� ����� (������ ���� �������� ������� ��� ����������� �������, ���������� �������� ������)"
 
-msgid ""
-"no definition was found for superclass %s in the specification of class %s"
+msgid "no definition was found for superclass %s in the specification of class %s"
 msgstr "� ������������ ������ %s ��� ����������� ��� ����������� %s"
 
 msgid "conflicting definition of data part: .Data = %s, superclass implies %s"
-msgstr ""
-"������������� ����������� ����� ������: .Data = %s, ���������� ������������� "
-"%s"
+msgstr "������������� ����������� ����� ������: .Data = %s, ���������� ������������� %s"
 
-msgid ""
-"a prototype object was supplied with object slot of class %s, but the class "
-"definition requires an object that is class %s"
-msgstr ""
-"�������� ��� ������������ ������ � ��������� ������ ������ %s, �� "
-"����������� ������ ������� ������, ���������� ������� %s"
+msgid "a prototype object was supplied with object slot of class %s, but the class definition requires an object that is class %s"
+msgstr "�������� ��� ������������ ������ � ��������� ������ ������ %s, �� ����������� ������ ������� ������, ���������� ������� %s"
 
-msgid ""
-"a prototype was supplied of class %s, but the class definition requires an "
-"object that is class %s"
-msgstr ""
-"�������� ��� ������������ ������� %s, �� ����������� ������ ������� ������, "
-"���������� ������� %s"
+msgid "a prototype was supplied of class %s, but the class definition requires an object that is class %s"
+msgstr "�������� ��� ������������ ������� %s, �� ����������� ������ ������� ������, ���������� ������� %s"
 
-msgid ""
-"slot %s in class %s currently defined (or inherited) as \"%s\", conflicts "
-"with an inherited definition in class %s"
-msgstr ""
-"���� %s � ������ %s � ������ ������ ��������� (��� ����������) ��� \"%s\", "
-"���������� � ������������� ������������ � ������ %s"
+msgid "slot %s in class %s currently defined (or inherited) as \"%s\", conflicts with an inherited definition in class %s"
+msgstr "���� %s � ������ %s � ������ ������ ��������� (��� ����������) ��� \"%s\", ���������� � ������������� ������������ � ������ %s"
 
 msgid "class %s extends an undefined class (%s)"
 msgstr "����� %s ��������� �������������� ����� (%s)"
 
-msgid ""
-"%s is not eligible to be the data part of another class (must be a basic "
-"class or a virtual class with no slots)"
-msgstr ""
-"%s �� ����� ���� �������� ������ ������ ������� ������ (������ ���� �������� "
-"������� ���� ����������� ������� ��� ������)"
+msgid "%s is not eligible to be the data part of another class (must be a basic class or a virtual class with no slots)"
+msgstr "%s �� ����� ���� �������� ������ ������ ������� ������ (������ ���� �������� ������� ���� ����������� ������� ��� ������)"
 
-msgid ""
-"prototype is a list with named elements (could be ambiguous):  better to use "
-"function prototype() to avoid trouble."
-msgstr ""
-"�������� �������� ������� � ������������ ���������� (����� ������� "
-"���������������):  ����� ������������ ������� prototype() ����� �������� "
-"������������."
+msgid "prototype is a list with named elements (could be ambiguous):  better to use function prototype() to avoid trouble."
+msgstr "�������� �������� ������� � ������������ ���������� (����� ������� ���������������):  ����� ������������ ������� prototype() ����� �������� ������������."
 
 msgid "the '%s' list for class %s, includes an undefined class %s"
 msgstr "������ '%s' ��� ������ %s, �������� �������������� ����� %s"
 
-msgid ""
-"class %s is inheriting an inconsistent superclass structure from class %s, "
-"inconsistent with %s"
-msgstr ""
-"����� %s ��������� ������������� ��������� ����������� �� ������ %s, "
-"������������� � %s"
+msgid "class %s is inheriting an inconsistent superclass structure from class %s, inconsistent with %s"
+msgstr "����� %s ��������� ������������� ��������� ����������� �� ������ %s, ������������� � %s"
 
-msgid ""
-"unable to find a consistent ordering of superclasses for class %s: order "
-"chosen is inconsistent with the superclasses of %s"
-msgstr ""
-"�� ���� ����� ������������ ������� ������������ ��� ������ %s: ��������� "
-"������� ����������� � ������������� %s"
+msgid "unable to find a consistent ordering of superclasses for class %s: order chosen is inconsistent with the superclasses of %s"
+msgstr "�� ���� ����� ������������ ������� ������������ ��� ������ %s: ��������� ������� ����������� � ������������� %s"
 
 msgid "\"class\" is a reserved slot name and cannot be redefined"
-msgstr ""
-"\"class\" �������� ����������������� ��������� ����� � �� ����� ���� "
-"��������������"
+msgstr "\"class\" �������� ����������������� ��������� ����� � �� ����� ���� ��������������"
 
 msgid "Data part is undefined for general S4 object"
 msgstr "� ������ S4 ������� �� ���������� ���������� ������"
@@ -702,12 +485,8 @@ msgstr "
 msgid "class cannot have both an ordinary and hidden data type"
 msgstr "� ������ �� ����� ���� ������������ �������� � �������� ���� ������"
 
-msgid ""
-"a validity method must be a function of one argument, got an object of class "
-"%s"
-msgstr ""
-"����� �������� ������������ ������ ���� �������� ������ ���������, ������� "
-"������ ������ %s"
+msgid "a validity method must be a function of one argument, got an object of class %s"
+msgstr "����� �������� ������������ ������ ���� �������� ������ ���������, ������� ������ ������ %s"
 
 msgid "unable to find required package %s"
 msgstr "�� ���� ����� ��������� ����� %s"
@@ -715,56 +494,26 @@ msgstr "
 msgid "unable to find an environment containing class %s"
 msgstr "�� ���� ����� ���������, ���������� ����� %s"
 
-#, fuzzy
-msgid ""
-"Note: the specification for S3 class %s in package %s seems equivalent to "
-"one from package %s: not turning on duplicate class definitions for this "
-"class."
-msgstr ""
-"������������ ������ S3 %s � ������ %s ������ �� ������������ �� ������ %s � "
-"�� ������������ � ������������� ����������� ��� ����� ������"
+msgid "Note: the specification for S3 class %s in package %s seems equivalent to one from package %s: not turning on duplicate class definitions for this class."
+msgstr "���������: ������������ ������ S3 %s � ������ %s ������ �� ������������ �� ������ %s: �� ������������ � ������������� ����������� ��� ����� ������."
 
-#, fuzzy
-msgid ""
-"Note: some superclasses of class %s in package %s have duplicate "
-"definitions.  This definition is not being treated as equivalent to that "
-"from package %s"
-msgstr ""
-"��������� �����-������ ������ %s ������ %s ����� ������� �����������. ��� "
-"����������� �� ����� ��������������� ��� ��������������� ����������� �� "
-"������ %s"
+msgid "Note: some superclasses of class %s in package %s have duplicate definitions.  This definition is not being treated as equivalent to that from package %s"
+msgstr "���������: ��������� �����-������ ������ %s ������ %s ����� ������� �����������. ��� ����������� �� ����� ��������������� ��� ��������������� ����������� �� ������ %s"
 
-#, fuzzy
-msgid ""
-"Note: the specification for class %s in package %s seems equivalent to one "
-"from package %s: not turning on duplicate class definitions for this class."
-msgstr ""
-"������������ ������ %s ������ %s ������ �� ������������ �� ������ %s � �� "
-"����� ���������� ����������� ����� ������"
+msgid "Note: the specification for class %s in package %s seems equivalent to one from package %s: not turning on duplicate class definitions for this class."
+msgstr "���������: ������������ ������ %s ������ %s ������ �� ������������ �� ������ %s: �� ����� ���������� ����������� ����� ������."
 
 msgid "undefined subclass %s of class %s; definition not updated"
 msgstr "�������������� �������� %s ������ \"%s\"; ����������� �� ���������"
 
-msgid ""
-"subclass %s of class %s is not local and cannot be updated for new "
-"inheritance information; consider setClassUnion()"
-msgstr ""
-"�������� %s ������ %s �� �������� ��������� � �� ����� ���� ��������; "
-"����������� setClassUnion()"
+msgid "subclass %s of class %s is not local and cannot be updated for new inheritance information; consider setClassUnion()"
+msgstr "�������� %s ������ %s �� �������� ��������� � �� ����� ���� ��������; ����������� setClassUnion()"
 
-msgid ""
-"no definition of inheritance from %s to %s, though the relation was implied "
-"by the setIs() from %s"
-msgstr ""
-"��� ����������� ������������ �� %s � %s, ������ ��������������� ����������� "
-"����� setIs() �� %s"
+msgid "no definition of inheritance from %s to %s, though the relation was implied by the setIs() from %s"
+msgstr "��� ����������� ������������ �� %s � %s, ������ ��������������� ����������� ����� setIs() �� %s"
 
-msgid ""
-"argument 'includeSubclasses' must be a logical, either one value or a vector "
-"of the same length as argument 'classes'"
-msgstr ""
-"�������� 'includeSubclasses' ������ ���� ����������, ���� ����� ���� "
-"�������� ��� ���� �������� ��� �� �����, ��� � ������ ���������"
+msgid "argument 'includeSubclasses' must be a logical, either one value or a vector of the same length as argument 'classes'"
+msgstr "�������� 'includeSubclasses' ������ ���� ����������, ���� ����� ���� �������� ��� ���� �������� ��� �� �����, ��� � ������ ���������"
 
 msgid "argument 'abbreviate' must be 0, 1, 2, or 3"
 msgstr "�������� 'abbreviate' ������ ���� 0, 1, 2, ��� 3"
@@ -772,34 +521,18 @@ msgstr "
 msgid "needed the supplied labels vector of length %d, got %d"
 msgstr "����� ���������� ����� ������� ����� %d, � �������� %d"
 
-msgid ""
-"the function being used as %s in making a generic function for %s is "
-"currently traced; the function used will have tracing removed"
-msgstr ""
-"�������, ������������ ��� %s ��� �������� ����� ������� ��� %s � ������ "
-"������ �������������; ��� ������������ ������� ����������� ����� �������"
+msgid "the function being used as %s in making a generic function for %s is currently traced; the function used will have tracing removed"
+msgstr "�������, ������������ ��� %s ��� �������� ����� ������� ��� %s � ������ ������ �������������; ��� ������������ ������� ����������� ����� �������"
 
 msgid "must supply either a generic function or a function as default for %s"
 msgstr "���� ���������� ���� ����� �������, ���� ������� �� ��������� ��� %s"
 
-msgid ""
-"the %s argument must be NULL or a generic function object; got an object of "
-"class %s"
-msgstr ""
-"�������� %s ������ ���� NULL ��� �������� ����� �������; ������� ������ "
-"������ %s"
+msgid "the %s argument must be NULL or a generic function object; got an object of class %s"
+msgstr "�������� %s ������ ���� NULL ��� �������� ����� �������; ������� ������ ������ %s"
 
 msgid "no suitable arguments to dispatch methods in this function"
 msgstr "��� ���������� ���������� ��� ������� �������� � ������ �������"
 
-msgid "special function %s is not permitted to have methods"
-msgstr "����������� ������� %s �� ��������� ����� �������"
-
-msgid "special function %s has no known argument list; will assume '(x, ...)'"
-msgstr ""
-"����������� ������� %s �� ����� ���������� ������ ����������; ����� "
-"��������� '(x, ...)'"
-
 msgid "making a generic for special function %s"
 msgstr "������ ����� ��� ����������� ������� %s"
 
@@ -810,41 +543,22 @@ msgid "in method for %s with signature %s:"
 msgstr "� ������ ��� %s � ��������������� %s:"
 
 msgid "formal arguments in method and generic do not appear in the same order"
-msgstr ""
-"���������� ��������� � ������ � ����� ������� ���������� �� � ���������� "
-"�������"
+msgstr "���������� ��������� � ������ � ����� ������� ���������� �� � ���������� �������"
 
-msgid ""
-"formal arguments (%s) omitted in the method definition cannot be in the "
-"signature"
-msgstr ""
-"���������� ��������� (%s), ��������� � ����������� ������, �� ����� ���� � "
-"��������������"
+msgid "formal arguments (%s) omitted in the method definition cannot be in the signature"
+msgstr "���������� ��������� (%s), ��������� � ����������� ������, �� ����� ���� � ��������������"
 
 msgid "expanding the signature to include omitted arguments in definition: %s"
-msgstr ""
-"�������� ������������� ��� ��������� ��������� ���������� � �����������: %s"
+msgstr "�������� ������������� ��� ��������� ��������� ���������� � �����������: %s"
 
-msgid ""
-"methods can add arguments to the generic %s only if '...' is an argument to "
-"the generic"
-msgstr ""
-"������ ����� ��������� ��������� � ����� %s ������ ���� '...' �������� "
-"���������� ��� �����"
+msgid "methods can add arguments to the generic %s only if '...' is an argument to the generic"
+msgstr "������ ����� ��������� ��������� � ����� %s ������ ���� '...' �������� ���������� ��� �����"
 
-msgid ""
-"arguments (%s) after '...' in the generic must appear in the method, in the "
-"same place at the end of the argument list"
-msgstr ""
-"��������� (%s) ����� '...' � ����� ������ ��������� � ������, � ��� �� "
-"������� � ����� ������ ����������"
+msgid "arguments (%s) after '...' in the generic must appear in the method, in the same place at the end of the argument list"
+msgstr "��������� (%s) ����� '...' � ����� ������ ��������� � ������, � ��� �� ������� � ����� ������ ����������"
 
-msgid ""
-"argument 'f' must be a string, generic function, or primitive: got an "
-"ordinary function"
-msgstr ""
-"�������� 'f' ������ ���� �������, ����� ��������, ��� ����������: �������� "
-"������� �������"
+msgid "argument 'f' must be a string, generic function, or primitive: got an ordinary function"
+msgstr "�������� 'f' ������ ���� �������, ����� ��������, ��� ����������: �������� ������� �������"
 
 msgid "methods cannot be defined for the primitive function %s"
 msgstr "������ �� ����� ���� ���������� ��� ������������ ������� %s"
@@ -855,62 +569,35 @@ msgstr "
 msgid "Empty function name in .getGeneric"
 msgstr "������ ��� ������� � .getGeneric"
 
-msgid ""
-"package %s seems to have out-of-date methods; need to reinstall from source"
-msgstr ""
-"����� %s ��������, �������� ���������� ������; ���������� �������������� ��� "
-"�� ���������"
+msgid "package %s seems to have out-of-date methods; need to reinstall from source"
+msgstr "����� %s ��������, �������� ���������� ������; ���������� �������������� ��� �� ���������"
 
 msgid "no methods found for %s; cacheGenericsMetaData() will have no effect"
-msgstr ""
-"�� ������� ������� ��� %s; cacheGenericsMetaData() �� ����� ����� �������"
+msgstr "�� ������� ������� ��� %s; cacheGenericsMetaData() �� ����� ����� �������"
 
 msgid "invalid value from generic function %s, class %s, expected %s"
 msgstr "�������� �������� �� ����� ������� %s, ����� %s, ��������� %s"
 
-msgid ""
-"the body of the generic function for %s calls 'standardGeneric' to dispatch "
-"on a different name (\"%s\")!"
-msgstr ""
-"���� ����� ������� ��� %s �������� 'standardGeneric' ��� �������� ��� ������ "
-"������ (\"%s\")!"
+msgid "\"MethodsList\" is defunct; allMethods now are empty"
+msgstr "\"MethodsList\" ������ �� ��������������; allMethods ������ �����"
 
-msgid ""
-"trying to change the formal arguments in %s in an object of class %s; "
-"expected a function definition"
-msgstr ""
-"������� �������� ���������� ��������� � %s, ������� ������ %s; ��������� "
-"����������� �������"
+msgid "the body of the generic function for %s calls 'standardGeneric' to dispatch on a different name (\"%s\")!"
+msgstr "���� ����� ������� ��� %s �������� 'standardGeneric' ��� �������� ��� ������ ������ (\"%s\")!"
 
-msgid ""
-"trying to change the formal arguments in %s, but getting the new formals "
-"from an object of class %s; expected a function definition"
-msgstr ""
-"������� �������� ���������� ��������� � %s, �� ������� ����� ���������� "
-"��������� �� ������� ������ %s; ��������� ����������� �������"
+msgid "trying to change the formal arguments in %s in an object of class %s; expected a function definition"
+msgstr "������� �������� ���������� ��������� � %s, ������� ������ %s; ��������� ����������� �������"
 
-msgid ""
-"trying to change the formal arguments in %s, but the number of existing "
-"arguments is less than the number of new arguments: (%s) vs (%s)"
-msgstr ""
-"������� �������� ���������� ��������� � %s, �� ����� ������������ ���������� "
-"������, ��� ����� ����� ����������: (%s) ������ (%s)"
+msgid "trying to change the formal arguments in %s, but getting the new formals from an object of class %s; expected a function definition"
+msgstr "������� �������� ���������� ��������� � %s, �� ������� ����� ���������� ��������� �� ������� ������ %s; ��������� ����������� �������"
 
-msgid ""
-"trying to change the formal arguments in %s, but the number of existing "
-"arguments is greater than the number of new arguments (the extra arguments "
-"won't be used): (%s) vs (%s)"
-msgstr ""
-"������� �������� ���������� ��������� � %s, �� ����� ������������ ���������� "
-"������, ��� ����� ����� ���������� (�������������� ��������� �� ����� "
-"������������): (%s) ������ (%s)"
+msgid "trying to change the formal arguments in %s, but the number of existing arguments is less than the number of new arguments: (%s) vs (%s)"
+msgstr "������� �������� ���������� ��������� � %s, �� ����� ������������ ���������� ������, ��� ����� ����� ����������: (%s) ������ (%s)"
 
-msgid ""
-"in changing formal arguments in %s, some of the old names are not in fact "
-"arguments: %s"
-msgstr ""
-"��� ��������� ���������� ���������� � %s, ��������� ������ ����� �� �������� "
-"�����������: %s"
+msgid "trying to change the formal arguments in %s, but the number of existing arguments is greater than the number of new arguments (the extra arguments won't be used): (%s) vs (%s)"
+msgstr "������� �������� ���������� ��������� � %s, �� ����� ������������ ���������� ������, ��� ����� ����� ���������� (�������������� ��������� �� ����� ������������): (%s) ������ (%s)"
+
+msgid "in changing formal arguments in %s, some of the old names are not in fact arguments: %s"
+msgstr "��� ��������� ���������� ���������� � %s, ��������� ������ ����� �� �������� �����������: %s"
 
 msgid "got a negative maximum number of frames to look at"
 msgstr "�������� ������������� ������������ ����� �������� ��� ������"
@@ -936,19 +623,11 @@ msgstr "
 msgid "single string; got an object of class %s"
 msgstr "������� ������; ������� ������ ������ %s"
 
-msgid ""
-"multiple definitions exist for class %s, but the supplied package (%s) is "
-"not one of them (%s)"
-msgstr ""
-"���������� ��������� ����������� ������ %s, �� �������������� ����� (%s) �� "
-"�� ��� (%s)"
+msgid "multiple definitions exist for class %s, but the supplied package (%s) is not one of them (%s)"
+msgstr "���������� ��������� ����������� ������ %s, �� �������������� ����� (%s) �� �� ��� (%s)"
 
-msgid ""
-"multiple definitions exist for class %s; should specify one of them (%s), e."
-"g. by className()"
-msgstr ""
-"���� ����� ����������� ������ %s; ���� ������� ���� �� ��� (%s), ��������, "
-"����� className()"
+msgid "multiple definitions exist for class %s; should specify one of them (%s), e.g. by className()"
+msgstr "���� ����� ����������� ������ %s; ���� ������� ���� �� ��� (%s), ��������, ����� className()"
 
 msgid "no definition found for class %s"
 msgstr "��� ����������� ������ %s"
@@ -972,49 +651,25 @@ msgid "some actions are missing: %s"
 msgstr "��������� �������� ���������: %s"
 
 msgid "%s has a sealed class definition and cannot be redefined"
-msgstr ""
-"%s ����� ������������ ����������� ������ � �� ����� ���� ��������������"
+msgstr "%s ����� ������������ ����������� ������ � �� ����� ���� ��������������"
 
-msgid ""
-"Argument \"representation\" cannot be used if argument \"slots\" is supplied"
-msgstr ""
-"�������� \"representation\" ������ ������������ ���� ������ �������� \"slots"
-"\""
+msgid "Argument \"representation\" cannot be used if argument \"slots\" is supplied"
+msgstr "�������� \"representation\" ������ ������������ ���� ������ �������� \"slots\""
 
-msgid ""
-"only arguments 'Class' and 'where' can be supplied when argument "
-"'representation' is a 'classRepresentation' object"
-msgstr ""
-"������ ��������� 'Class' � 'where' ����� ���� ������������� ����� �������� "
-"'representation' �������� �������� ������ 'classRepresentation'"
+msgid "only arguments 'Class' and 'where' can be supplied when argument 'representation' is a 'classRepresentation' object"
+msgstr "������ ��������� 'Class' � 'where' ����� ���� ������������� ����� �������� 'representation' �������� �������� ������ 'classRepresentation'"
 
-msgid ""
-"error in contained classes (%s) for class %s and unable to remove definition "
-"from %s"
-msgstr ""
-"������ � ������������ ������� (%s) ��� ������ %s � �� �������� ������� "
-"����������� �� %s"
+msgid "error in contained classes (%s) for class %s and unable to remove definition from %s"
+msgstr "������ � ������������ ������� (%s) ��� ������ %s � �� �������� ������� ����������� �� %s"
 
-msgid ""
-"error in contained classes (%s) for class %s; class definition removed from "
-"%s"
-msgstr ""
-"������ � ������������ ������� (%s) ��� ������ %s; ����������� ������ ������� "
-"�� %s"
+msgid "error in contained classes (%s) for class %s; class definition removed from %s"
+msgstr "������ � ������������ ������� (%s) ��� ������ %s; ����������� ������ ������� �� %s"
 
-msgid ""
-"error in contained classes (%s) for class %s and unable to restore previous "
-"definition from %s"
-msgstr ""
-"������ � ������������ ������� (%s) ��� ������ %s � �� �������� ������������ "
-"���������� ����������� �� %s"
+msgid "error in contained classes (%s) for class %s and unable to restore previous definition from %s"
+msgstr "������ � ������������ ������� (%s) ��� ������ %s � �� �������� ������������ ���������� ����������� �� %s"
 
-msgid ""
-"error in contained classes (%s) for class %s; previous definition restored "
-"to %s"
-msgstr ""
-"������ � ������������ ������� (%s) ��� ������ %s; ���������� ����������� "
-"������������� � %s"
+msgid "error in contained classes (%s) for class %s; previous definition restored to %s"
+msgstr "������ � ������������ ������� (%s) ��� ������ %s; ���������� ����������� ������������� � %s"
 
 msgid "element %d of the representation was not a single character string"
 msgstr "������� %d ������������� �� ��� ��������� ���������� �������"
@@ -1031,23 +686,14 @@ msgstr "%s 
 msgid "%s is not a slot in class %s"
 msgstr "%s �� �������� �������� ������ %s"
 
-msgid ""
-"assignment of an object of class %s is not valid for slot %s in an object of "
-"class %s; is(value, \"%s\") is not TRUE"
-msgstr ""
-"���������� ������� ������ %s ������� ��� ������� %s � ������� ������ %s; is"
-"(value, \"%s\") �� �������� TRUE"
+msgid "assignment of an object of class %s is not valid for slot %s in an object of class %s; is(value, \"%s\") is not TRUE"
+msgstr "���������� ������� ������ %s ������� ��� ������� %s � ������� ������ %s; is(value, \"%s\") �� �������� TRUE"
 
-msgid ""
-"assignment of an object of class %s is not valid for @%s in an object of "
-"class %s; is(value, \"%s\") is not TRUE"
-msgstr ""
-"���������� ������� ������ %s ������� ��� ������� %s � ������� ������ %s; is"
-"(value, \"%s\") �� �������� TRUE"
+msgid "assignment of an object of class %s is not valid for @%s in an object of class %s; is(value, \"%s\") is not TRUE"
+msgstr "���������� ������� ������ %s ������� ��� ������� %s � ������� ������ %s; is(value, \"%s\") �� �������� TRUE"
 
 msgid "class definition for %s not found (no action taken)"
-msgstr ""
-"����������� ������ ��� %s �� �������  (�� ����������� ������� ��������)"
+msgstr "����������� ������ ��� %s �� �������  (�� ����������� ������� ��������)"
 
 msgid "class %s has multiple definitions visible; only the first removed"
 msgstr "����� %s ����� ��������� ������� �����������; ������� ������ ������"
@@ -1061,42 +707,29 @@ msgstr "
 msgid "class %s not found on %s; 'resetClass' will have no effect"
 msgstr "����� %s �� ������ �� %s; 'resetClass' ��������� ��� �������"
 
-msgid ""
-"argument 'classDef' must be a string or a class representation; got an "
-"object of class %s"
-msgstr ""
-"�������� 'classDef' ������ ���� ������� ���� �������������� ������; ������� "
-"������ ������ %s"
+msgid "argument 'classDef' must be a string or a class representation; got an object of class %s"
+msgstr "�������� 'classDef' ������ ���� ������� ���� �������������� ������; ������� ������ ������ %s"
 
 msgid "class %s is sealed; 'resetClass' will have no effect"
 msgstr "����� %s ���������; 'resetClass' �� ����� ����� �������"
 
-msgid ""
-"cannot use object of class %s in new():  class %s does not extend that class"
-msgstr ""
-"�� ���� ������������ ������ ������ %s � new():  ����� %s �� ����� ��������� "
-"������ �����"
+msgid "cannot use object of class %s in new():  class %s does not extend that class"
+msgstr "�� ���� ������������ ������ ������ %s � new():  ����� %s �� ����� ��������� ������ �����"
 
 msgid "duplicated slot names: %s"
 msgstr "����������� ����� ������: %s"
 
-msgid ""
-"class %s is defined, with package %s, but no corresponding metadata object "
-"was found (not exported?)"
-msgstr ""
-"����� %s ��������� � ������� %s, �� ���������������� ������� ���������� �� "
-"������� (�� �������������?)"
+msgid "class %s is defined, with package %s, but no corresponding metadata object was found (not exported?)"
+msgstr "����� %s ��������� � ������� %s, �� ���������������� ������� ���������� �� ������� (�� �������������?)"
 
 msgid "no definition of %s to use for %s"
 msgstr "��� ����������� %s ��� ������������� � %s"
 
 msgid "class definition cannot extend more than one of these data types: %s"
-msgstr ""
-"����������� ������ �� ����� ��������� ����� ��� ���� �� ���� ����� ������: %s"
+msgstr "����������� ������ �� ����� ��������� ����� ��� ���� �� ���� ����� ������: %s"
 
 msgid "abnormal type %s is not supported as a superclass of a class definition"
-msgstr ""
-"������������ ��� %s �� �������������� ��� ���������� ��� ����������� ������"
+msgstr "������������ ��� %s �� �������������� ��� ���������� ��� ����������� ������"
 
 msgid "multiple class definitions for %s from packages: %s; picking the first"
 msgstr "����� ����������� ������ ��� %s �� �������: %s; ���� ������"
@@ -1124,11 +757,8 @@ msgstr ""
 "��� ����� %s ������ ���� ��������� �:\n"
 "(%s)"
 
-msgid ""
-"argument %s must be a list or a character vector; got an object of class %s"
-msgstr ""
-"�������� %s ������ ���� ����� �������� ��� ����� ��������� �������; ������� "
-"������ ������ %s"
+msgid "argument %s must be a list or a character vector; got an object of class %s"
+msgstr "�������� %s ������ ���� ����� �������� ��� ����� ��������� �������; ������� ������ ������ %s"
 
 msgid "no function %s found"
 msgstr "�� ������� ������� %s"
@@ -1143,8 +773,7 @@ msgid "no method or default for coercing %s to %s"
 msgstr "��� ������ ��� �������� �� ��������� ��� ���������� %s � %s"
 
 msgid "no method or default for as() replacement of %s with Class=\"%s\""
-msgstr ""
-"��� ������ ��� �������� �� ��������� ��� as() ��������� %s �� Class=\"%s\""
+msgstr "��� ������ ��� �������� �� ��������� ��� as() ��������� %s �� Class=\"%s\""
 
 msgid "trying to set an 'as' relation from %s to itself"
 msgstr "������� ���������� ��������� 'as' �� %s �� ����"
@@ -1152,26 +781,14 @@ msgstr "
 msgid "class %s is not defined in this environment"
 msgstr "����� %s �� ��������� � ���� ���������"
 
-msgid ""
-"class %s is a class union: 'coerce' relations to a class union are not "
-"meaningful"
-msgstr ""
-"����� %s �������� ������������ �������: ��������� 'coerce' ��� ����������� "
-"������� ������������"
+msgid "class %s is a class union: 'coerce' relations to a class union are not meaningful"
+msgstr "����� %s �������� ������������ �������: ��������� 'coerce' ��� ����������� ������� ������������"
 
-msgid ""
-"'as' method should have one argument, or match the arguments of coerce(): "
-"got  (%s)"
-msgstr ""
-"����� 'as' ������ ����� ���� ��������, ��� ��������������� ���������� coerce"
-"(): �������� (%s)"
+msgid "'as' method should have one argument, or match the arguments of coerce(): got  (%s)"
+msgstr "����� 'as' ������ ����� ���� ��������, ��� ��������������� ���������� coerce(): �������� (%s)"
 
-msgid ""
-"a 'replace' method definition in 'setAs' must be a function of two "
-"arguments, got %d"
-msgstr ""
-"����������� ������ 'replace' � 'setAs' ������ ���� �������� ���� ����������, "
-"�������� %d"
+msgid "a 'replace' method definition in 'setAs' must be a function of two arguments, got %d"
+msgstr "����������� ������ 'replace' � 'setAs' ������ ���� �������� ���� ����������, �������� %d"
 
 msgid ""
 "argument names in 'replace' changed to agree with 'coerce<-' generic:\n"
@@ -1186,27 +803,20 @@ msgstr "
 msgid "undefined 'coerce' method"
 msgstr "����� \"coerce' �� ���������"
 
-msgid ""
-"methods currently exist for coercing from %s to %s; they will be replaced."
+msgid "methods currently exist for coercing from %s to %s; they will be replaced."
 msgstr "������ ��� ���������� %s � %s ��� ����������; ��� ����� ��������."
 
 msgid "object %s not found"
 msgstr "������ %s �� ������"
 
-msgid ""
-"object %s not changed (it is not consistent with the current definition of "
-"class %s from %s)"
-msgstr ""
-"������ %s �� ������� (�� �� ��������� � ������� ������������ ������ %s �� %s)"
+msgid "object %s not changed (it is not consistent with the current definition of class %s from %s)"
+msgstr "������ %s �� ������� (�� �� ��������� � ������� ������������ ������ %s �� %s)"
 
 msgid "no definition for the class of %s (class %s) found"
 msgstr "�� ������� ����������� ��� ������ �� %s (����� %s)"
 
-msgid ""
-"object %s not changed (it does not appear to be from a version of R earlier "
-"than 1.8.0)"
-msgstr ""
-"������ %s �� ������� (�������, ��� �� �� �� ������ R ����� ������, ��� 1.8.0)"
+msgid "object %s not changed (it does not appear to be from a version of R earlier than 1.8.0)"
+msgstr "������ %s �� ������� (�������, ��� �� �� �� ������ R ����� ������, ��� 1.8.0)"
 
 msgid "'class1' must be the name of a class or a class definition"
 msgstr "'class1' ������ ���� ������ ������ ���� ������������ ������"
@@ -1217,26 +827,14 @@ msgstr "'class2' 
 msgid "class %s has no visible definition from package or environment %s"
 msgstr "����� %s �� ����� �������� ����������� � ������ ���� ��������� %s"
 
-msgid ""
-"cannot create a 'setIs' relation when neither of the classes (%s and %s) is "
-"local and modifiable in this package"
-msgstr ""
-"�� ���� ������� 'setIs' ��������� �.�. �� ���� �� ������� (%s � %s) �� "
-"�������� ��������� � �������������� � ���� ������"
+msgid "cannot create a 'setIs' relation when neither of the classes (%s and %s) is local and modifiable in this package"
+msgstr "�� ���� ������� 'setIs' ��������� �.�. �� ���� �� ������� (%s � %s) �� �������� ��������� � �������������� � ���� ������"
 
-msgid ""
-"class %s is sealed; new superclasses can not be defined, except by "
-"'setClassUnion'"
-msgstr ""
-"����� %s ���������; ����� ����������� ������ ����������, �� ����������� "
-"'setClassUnion'"
+msgid "class %s is sealed; new superclasses can not be defined, except by 'setClassUnion'"
+msgstr "����� %s ���������; ����� ����������� ������ ����������, �� ����������� 'setClassUnion'"
 
-msgid ""
-"class %s is defined (with package slot %s) but no metadata object found to "
-"revise %s information---not exported?  Making a copy in package %s"
-msgstr ""
-"����� %s ��������� (�� ������ ������ %s), �� �� ������ ������ ���������� ��� "
-"�������� %s ���������� -- �� �������������? ����� ����� � ������ %s"
+msgid "class %s is defined (with package slot %s) but no metadata object found to revise %s information---not exported?  Making a copy in package %s"
+msgstr "����� %s ��������� (�� ������ ������ %s), �� �� ������ ������ ���������� ��� �������� %s ���������� -- �� �������������? ����� ����� � ������ %s"
 
 msgid "class %s cannot extend class %s"
 msgstr "����� %s �� ����� ��������� ����� %s"
@@ -1257,44 +855,28 @@ msgid "Skeleton of method written to %s"
 msgstr "������ ������ ������� � %s"
 
 msgid "invalid object in meta table of methods for %s, label %s, had class %s"
-msgstr ""
-"�������� ������ � ����-������� ������� ��� %s, ����� %s, ����� ����� %s"
+msgstr "�������� ������ � ����-������� ������� ��� %s, ����� %s, ����� ����� %s"
 
-msgid ""
-"invalid mlist element for signature %s at level %d (should be methods list "
-"or method, had class %s)"
-msgstr ""
-"������������ ������� mlist ��� ������� %s �� ������ %d (������ ���� ������� "
-"������� ���� �������, ����� ����� %s)"
+msgid "invalid mlist element for signature %s at level %d (should be MethodDefinition or .Primitive, had class %s)"
+msgstr "������������ ������� mlist ��� ������� %s �� ������ %d (������ ���� MethodDefinition ���� .Primitive, ����� ����� %s)"
 
 msgid "bad method object stored in method table, class %s"
 msgstr "������ ������ ������ � �������� ������ (����� %s)"
 
-msgid ""
-"invalid object in methods table (%s), expected a method, got an object of "
-"class %s"
-msgstr ""
-"�������� ������ � ������� ������� (%s): �������� �����, � ������� ������ "
-"������ %s"
+msgid "invalid object in methods table (%s), expected a method, got an object of class %s"
+msgstr "�������� ������ � ������� ������� (%s): �������� �����, � ������� ������ ������ %s"
 
-msgid "invalid or unset methods table in generic function \""
-msgstr "�������� ��� ��������������� ������� ������� � ����� ������� \""
+msgid "invalid or unset methods table in generic function %s"
+msgstr "�������� ��� ��������������� ������� ������� � ����� ������� %s"
 
 msgid "trying to find a methods table in a non-generic function"
 msgstr "������� ����� ������� ������� � ��-����� �������"
 
-msgid ""
-"the \"ambiguousMethodSelection\" option should be a function to be called as "
-"the condition action; got an object of class %s"
-msgstr ""
-"����� \"ambiguousMethodSelection\" ������ ���� �������� ��� ������ � "
-"�������� ��������� �������; ������� ������ ������ %s"
+msgid "the \"ambiguousMethodSelection\" option should be a function to be called as the condition action; got an object of class %s"
+msgstr "����� \"ambiguousMethodSelection\" ������ ���� �������� ��� ������ � �������� ��������� �������; ������� ������ ������ %s"
 
-msgid ""
-"No simply inherited methods found for function %s; using non-simple method"
-msgstr ""
-"�� ������� ������ ��������������� ������ ��� ������� %s; ��������� ��������� "
-"�����"
+msgid "No simply inherited methods found for function %s; using non-simple method"
+msgstr "�� ������� ������ ��������������� ������ ��� ������� %s; ��������� ��������� �����"
 
 msgid ""
 "Note: method with signature %s chosen for function %s,\n"
@@ -1311,28 +893,17 @@ msgstr "
 msgid "failed to find expected group generic function:"
 msgstr "�� ���� ����� ��������� ��������� ����� �������:"
 
-msgid ""
-"invalid group generic function in search for inherited method (class %s)"
-msgstr ""
-"�������� ��������� ����� ������� � ������ ��� �������������� ������ (����� "
-"%s)"
+msgid "invalid group generic function in search for inherited method (class %s)"
+msgstr "�������� ��������� ����� ������� � ������ ��� �������������� ������ (����� %s)"
 
 msgid "invalid methods table request"
 msgstr "�������� ������ � ������� �������"
 
-msgid ""
-"trying to check signature length of group generic '%s', but it is not a "
-"group generic"
-msgstr ""
-"������� ��������� ����� �������������� ����� ������ '%s', �� ��� �� ����� "
-"������"
+msgid "trying to check signature length of group generic '%s', but it is not a group generic"
+msgstr "������� ��������� ����� �������������� ����� ������ '%s', �� ��� �� ����� ������"
 
-msgid ""
-"trying to check signature length of generic '%s', but it is not a generic "
-"function: i = %d, funs = %s, gnames = %s"
-msgstr ""
-"������� ��������� ����� ������� ����� '%s', �� ��� �� ����� �������: i = %d, "
-"funs = %s, gnames = %s"
+msgid "trying to check signature length of generic '%s', but it is not a generic function: i = %d, funs = %s, gnames = %s"
+msgstr "������� ��������� ����� ������� ����� '%s', �� ��� �� ����� �������: i = %d, funs = %s, gnames = %s"
 
 msgid "no methods table for generic %s from package %s in package %s"
 msgstr "�� ���� ����� ������� ������� ��� ������ %s �� ������ %s � ������ %s"
@@ -1340,34 +911,20 @@ msgstr "
 msgid "undefined classes (%s) will be ignored for argument '%s'"
 msgstr "�������������� ������ (%s) ����� ��������������� ��� ��������� '%s'"
 
-msgid ""
-"argument 'signatures' must be a character matrix whose rows are method "
-"signatures"
-msgstr ""
-"�������� 'signatures' ������ ���� ���������� ��������, ��� ������ -- ������� "
-"������"
+msgid "argument 'signatures' must be a character matrix whose rows are method signatures"
+msgstr "�������� 'signatures' ������ ���� ���������� ��������, ��� ������ -- ������� ������"
 
 msgid "not allowed to have test==TRUE and an S4Class definition"
 msgstr "�� ����������� ����� test==TRUE � S4Class-�����������"
 
-msgid ""
-"argument 'S4Class' must be a class definition: got an object of class %s"
-msgstr ""
-"�������� 'S4Class' ������ ���� ������������ ������: ������� ������ ������ %s"
+msgid "argument 'S4Class' must be a class definition: got an object of class %s"
+msgstr "�������� 'S4Class' ������ ���� ������������ ������: ������� ������ ������ %s"
 
-msgid ""
-"inconsistent old-style class information for %s; the class is defined but "
-"does not extend %s and is not valid as the data part"
-msgstr ""
-"��������������, � ������ ����� ���������� ��� %s; ����� ���������, �� �� "
-"��������� %s � ���������� ��� ����� ������"
+msgid "inconsistent old-style class information for %s; the class is defined but does not extend %s and is not valid as the data part"
+msgstr "��������������, � ������ ����� ���������� ��� %s; ����� ���������, �� �� ��������� %s � ���������� ��� ����� ������"
 
-msgid ""
-"the S3 class of the prototype, \"%s\", is undefined; only allowed when this "
-"is the S3 class being registered (\"%s\")"
-msgstr ""
-"S3-����� ���������, \"%s\", �� ���������; ����� ����������� ������ ���� ��� "
-"S3-����� � �������� ����������� (\"%s\")"
+msgid "the S3 class of the prototype, \"%s\", is undefined; only allowed when this is the S3 class being registered (\"%s\")"
+msgstr "S3-����� ���������, \"%s\", �� ���������; ����� ����������� ������ ���� ��� S3-����� � �������� ����������� (\"%s\")"
 
 msgid "restoring definition of class %s"
 msgstr "�������������� ����������� ������ %s"
@@ -1375,50 +932,26 @@ msgstr "
 msgid "slot %s: class %s should extend class %s"
 msgstr "������� %s: ����� %s ������ ��������� ����� %s"
 
-msgid ""
-"invalid S4 class corresponding to S3 class: slots in  S4 version must extend "
-"corresponding slots in S3 version: fails for %s"
-msgstr ""
-"������������ S4 ����� ������������� S3 ������: ����� � S4 ������ ������ "
-"��������� ���������������� ����� � S3 ������: �� ������� ��� %s"
+msgid "invalid S4 class corresponding to S3 class: slots in  S4 version must extend corresponding slots in S3 version: fails for %s"
+msgstr "������������ S4 ����� ������������� S3 ������: ����� � S4 ������ ������ ��������� ���������������� ����� � S3 ������: �� ������� ��� %s"
 
 msgid "explicit coercion of old-style class (%s) is not defined"
 msgstr "�� ���������� ������� ���������� ��� ����������� ������ (%s)"
 
-msgid ""
-"explicit replacement not defined for as(x, \"%s\") <- value for old-style "
-"class %s"
-msgstr ""
-"�� ���������� ������ ������ ��� as(x, \"%s\") <- value ��� ����������� "
-"������ %s"
+msgid "explicit replacement not defined for as(x, \"%s\") <- value for old-style class %s"
+msgstr "�� ���������� ������ ������ ��� as(x, \"%s\") <- value ��� ����������� ������ %s"
 
-msgid ""
-"argument 'Classes' must be a vector of two classes; got an argument of "
-"length %d"
-msgstr ""
-"�������� 'Classes' ������ ���� �������� ���� �������; ������� �������� ����� "
-"%d"
+msgid "argument 'Classes' must be a vector of two classes; got an argument of length %d"
+msgstr "�������� 'Classes' ������ ���� �������� ���� �������; ������� �������� ����� %d"
 
-msgid ""
-"inconsistent old-style class information for %s (maybe mixing old and new "
-"classes?)"
-msgstr ""
-"��������������, � ������ ����� ���������� ��� ������ %s (�������� ����� "
-"����� �������� ������ � ����� �������?)"
+msgid "inconsistent old-style class information for %s (maybe mixing old and new classes?)"
+msgstr "��������������, � ������ ����� ���������� ��� ������ %s (�������� ����� ����� �������� ������ � ����� �������?)"
 
-msgid ""
-"'S3Class' only defined for extensions of %s or classes with a data part:  "
-"not true of class %s"
-msgstr ""
-"'S3Class' ��������� ������ ��� ���������� %s ��� ������� � �������-�������: "
-"��� �� ��� � ������ %s"
+msgid "'S3Class' only defined for extensions of %s or classes with a data part:  not true of class %s"
+msgstr "'S3Class' ��������� ������ ��� ���������� %s ��� ������� � �������-�������: ��� �� ��� � ������ %s"
 
-msgid ""
-"'S3Class' can only assign to S4 objects that extend \"oldClass\"; not true "
-"of class %s"
-msgstr ""
-"'S3Class' ����� ���� ��������� ������ ��� ����� S4-��������, ������� "
-"��������� \"oldClass\"; ��� �� ��� ��� ������ %s"
+msgid "'S3Class' can only assign to S4 objects that extend \"oldClass\"; not true of class %s"
+msgstr "'S3Class' ����� ���� ��������� ������ ��� ����� S4-��������, ������� ��������� \"oldClass\"; ��� �� ��� ��� ������ %s"
 
 msgid "Created a package name, %s, when none found"
 msgstr "������� ��� ������, %s, � �� ����� ��� �� ������ �� �������"
@@ -1430,15 +963,10 @@ msgid "multiple definitions of %s found; using the one on %s"
 msgstr "������� ��������� ����������� %s; ��������� ���� �� %s"
 
 msgid "%s is not a valid field or method name for reference class %s"
-msgstr ""
-"���� \"%s\" -- ������������ ���� ��� ��� ������ ��� ���������� ������ %s"
+msgstr "���� \"%s\" -- ������������ ���� ��� ��� ������ ��� ���������� ������ %s"
 
-msgid ""
-"a call to superClass() is in the method %s but there is no superclass "
-"definition of this method for class %s"
-msgstr ""
-"����� superClass() ���� � ������ %s, �� ��� ��� ����������� ���������������� "
-"������ ��� ������ %s"
+msgid "a call to superClass() is in the method %s but there is no superclass definition of this method for class %s"
+msgstr "����� superClass() ���� � ������ %s, �� ��� ��� ����������� ���������������� ������ ��� ������ %s"
 
 msgid "methods declared in usingMethods() but not found: %s"
 msgstr "������ ��������� � usingMethods(), �� �� �������: %s"
@@ -1449,19 +977,13 @@ msgstr "%s 
 msgid "%s is not a field in class %s"
 msgstr "%s �� �������� ����� ������ %s"
 
-msgid ""
-"unnamed arguments to $new() must be objects from a reference class; got an "
-"object of class %s"
-msgstr ""
-"��������������� ��������� $new() ������ ���� ��������� ���������� ������; "
-"������� ������ ������ %s"
+msgid "unnamed arguments to $new() must be objects from a reference class; got an object of class %s"
+msgstr "��������������� ��������� $new() ������ ���� ��������� ���������� ������; ������� ������ ������ %s"
 
 msgid "%s is not a valid field or method name for this class"
 msgstr "���� %s -- ������������ ���� ��� ��� ������ ��� ����� ������"
 
-msgid ""
-"the class of field %s in the object is not compatible with the desired class "
-"%s in the target"
+msgid "the class of field %s in the object is not compatible with the desired class %s in the target"
 msgstr "����� ��� ���� %s ������� ������������ � �������� ������� %s ����"
 
 msgid "%s is not a defined class in this environment"
@@ -1473,26 +995,17 @@ msgstr "
 msgid "%s is not one of the reference super classes for this object"
 msgstr "%s �� �������� ����� �� ������ ����������� �� ���� ������"
 
-msgid ""
-"direct calls to callSuper() are invalid:  should only be called from another "
-"method"
-msgstr ""
-"������ ������ callSuper() �����������:  ����� �������� ������ �� ������� "
-"������"
+msgid "direct calls to callSuper() are invalid:  should only be called from another method"
+msgstr "������ ������ callSuper() �����������:  ����� �������� ������ �� ������� ������"
 
 msgid "%s is not a field in this class"
 msgstr "%s �� �������� ����� � ���� ������"
 
-msgid ""
-"the definition of class %s in package %s is locked, methods may not be "
-"redefined"
-msgstr ""
-"����������� ������ %s � ������ %s �������������, ������ ������ ��������������"
+msgid "the definition of class %s in package %s is locked, methods may not be redefined"
+msgstr "����������� ������ %s � ������ %s �������������, ������ ������ ��������������"
 
 msgid "arguments to methods() must be named, or one named list"
-msgstr ""
-"��������� � methods() ������ ���� �����������, ��� ������� ���� ����������� "
-"������"
+msgstr "��������� � methods() ������ ���� �����������, ��� ������� ���� ����������� ������"
 
 msgid ""
 "topic %s is not a method name in class %s\n"
@@ -1501,70 +1014,41 @@ msgstr ""
 "����� %s �� �������� ������ ������ � ������ %s\n"
 "����������� ������ ����"
 
-msgid ""
-"the definition of class %s in package %s is locked so fields may not be "
-"modified"
-msgstr ""
-"����������� ������ %s � ������ %s �������������, ��� ��� ���� �������� ������"
+msgid "the definition of class %s in package %s is locked so fields may not be modified"
+msgstr "����������� ������ %s � ������ %s �������������, ��� ��� ���� �������� ������"
 
-msgid ""
-"the overriding class (\"%s\") of field %s is not a subclass of the existing "
-"field definition (\"%s\")"
-msgstr ""
-"������������� class(\"%s\") ��� ���� %s �� �������� ���������� � ������� "
-"����������� ���� (\"%s\")"
+msgid "the overriding class (\"%s\") of field %s is not a subclass of the existing field definition (\"%s\")"
+msgstr "������������� class(\"%s\") ��� ���� %s �� �������� ���������� � ������� ����������� ���� (\"%s\")"
 
-msgid ""
-"invalid assignment for reference class field %s, should be from class %s or "
-"a subclass (was class %s)"
-msgstr ""
-"������������ ������ ��� ���� ������ %s, ������ ���� �� ������ %s ��� "
-"��������� (��� ����� %s)"
+msgid "invalid assignment for reference class field %s, should be from class %s or a subclass (was class %s)"
+msgstr "������������ ������ ��� ���� ������ %s, ������ ���� �� ������ %s ��� ��������� (��� ����� %s)"
 
 msgid "invalid replacement: reference class field %s is read-only"
 msgstr "������������ ������: ���� ���������� ������ %s ������ ��� ������"
 
-msgid ""
-"the 'contains' argument should be the names of superclasses:  got an element "
-"of class %s"
-msgstr ""
-"�������� 'contains' ������ ���� ������� ������������: ������� ������� ������ "
-"%s"
+msgid "the 'contains' argument should be the names of superclasses:  got an element of class %s"
+msgstr "�������� 'contains' ������ ���� ������� ������������: ������� ������� ������ %s"
 
 msgid "no definition found for inherited class: %s"
 msgstr "��� ����������� ��� ��������������� ������: %s"
 
-msgid ""
-"a single class name is needed for field %s, got a character vector of length "
-"%d"
+msgid "a single class name is needed for field %s, got a character vector of length %d"
 msgstr "����� ���� ��� ������ ��� ���� %s, � �������� ��������� ������ %d"
 
 msgid "class %s for field %s is not defined"
 msgstr "����� %s ��� ���� %s �� ���������"
 
-msgid ""
-"field %s was supplied as an object of class %s; must be a class name or a "
-"binding function"
-msgstr ""
-"���� %s ���������� ��� ������ ������ %s; � ������ ���� ������ ������ ��� "
-"�������� ��������"
+msgid "field %s was supplied as an object of class %s; must be a class name or a binding function"
+msgstr "���� %s ���������� ��� ������ ������ %s; � ������ ���� ������ ������ ��� �������� ��������"
 
-msgid ""
-"code for methods in class %s was not checked for suspicious field "
-"assignments (recommended package %s not available?)"
-msgstr ""
-"��� ������� � ������ %s �� ��� �������� �� �������������� ���������� ����� "
-"(�������������� ����� %s �� ��������?)"
+msgid "code for methods in class %s was not checked for suspicious field assignments (recommended package %s not available?)"
+msgstr "��� ������� � ������ %s �� ��� �������� �� �������������� ���������� ����� (�������������� ����� %s �� ��������?)"
 
 msgid "class %s is defined but is not a reference class"
 msgstr "����� %s ��  ��������� ��� ��������� �����"
 
-msgid ""
-"class must be a reference class representation or a character string; got an "
-"object of class %s"
-msgstr ""
-"����� ������ ���� ��������� �������������� ������ ��� ��������� �������; "
-"������� ������ ������ %s"
+msgid "class must be a reference class representation or a character string; got an object of class %s"
+msgstr "����� ������ ���� ��������� �������������� ������ ��� ��������� �������; ������� ������ ������ %s"
 
 msgid "not a reference class: %s"
 msgstr "�� ��������� �����: %s"
@@ -1603,36 +1087,22 @@ msgid "field %s is already locked"
 msgstr "���� %s ��� �������������"
 
 msgid "field %s of class %s has a non-default binding and cannot be locked"
-msgstr ""
-"���� %s  ������ %s ����� ������������� �� �� ��������� � �� ����� ���� "
-"�������������"
+msgstr "���� %s  ������ %s ����� ������������� �� �� ��������� � �� ����� ���� �������������"
 
-msgid ""
-"Class %s is not a subclass of %s; functional semantics not defined for this "
-"class"
-msgstr ""
-"����� %s �� �������� ���������� %s; �������������� ��������� � ���� ������ "
-"�� ����������"
+msgid "Class %s is not a subclass of %s; functional semantics not defined for this class"
+msgstr "����� %s �� �������� ���������� %s; �������������� ��������� � ���� ������ �� ����������"
 
 msgid "Could not find local object in supplied environment"
 msgstr "�� ���� ����� ��������� ������ � �������������� ���������"
 
-msgid ""
-"invalid 'ignore' argument; should be a class definition or a character "
-"vector, got an object of class %s"
-msgstr ""
-"������������ 'ignore' argument; ������ ���� ����������� ������ ��� ��������� "
-"�������; ������� ������ ������ %s"
+msgid "invalid 'ignore' argument; should be a class definition or a character vector, got an object of class %s"
+msgstr "������������ 'ignore' argument; ������ ���� ����������� ������ ��� ��������� �������; ������� ������ ������ %s"
 
 msgid "An object of class %s"
 msgstr "������ ������ %s"
 
-msgid ""
-"invalid call to 'classLabel': expected a name or a class definition, got an "
-"object of class %s"
-msgstr ""
-"�������� ����� 'classLabel': ��������� ��� ���� ����������� ������, ������� "
-"������ ������ %s"
+msgid "invalid call to 'classLabel': expected a name or a class definition, got an object of class %s"
+msgstr "�������� ����� 'classLabel': ��������� ��� ���� ����������� ������, ������� ������ ������ %s"
 
 msgid "argument 'signature' is not meaningful for tracing reference methods"
 msgstr "�������� 'signature' �� ����� �������� ��� ��������� ������� ������"
@@ -1650,59 +1120,37 @@ msgid "no function definition for %s found"
 msgstr "�� ������� ����������� ������� ��� %s"
 
 msgid "cannot untrace method for %s; no method defined for this signature: %s"
-msgstr ""
-"�� ���� �������������� ����� ��� %s; �� ���������� ������ ��� ������ "
-"�������: %s"
+msgstr "�� ���� �������������� ����� ��� %s; �� ���������� ������ ��� ������ �������: %s"
 
 msgid "the method for %s for this signature was not being traced"
 msgstr "������ ����� ��� %s ��� ������ ������� �� ����� ���� ��������"
 
-msgid ""
-"making a traced version of a primitive; arguments will be treated as '...'"
-msgstr ""
-"������ ������������� ������ ���������; ��������� ����� ���������� ���  '...'"
+msgid "making a traced version of a primitive; arguments will be treated as '...'"
+msgstr "������ ������������� ������ ���������; ��������� ����� ���������� ���  '...'"
 
-msgid ""
-"the editing in trace() can only change the body of the function; got an "
-"object of class %s"
-msgstr ""
-"�������������� � trace() ����� ������ ������ ���� �������; ������� ������ "
-"������ %s"
+msgid "the editing in trace() can only change the body of the function; got an object of class %s"
+msgstr "�������������� � trace() ����� ������ ������ ���� �������; ������� ������ ������ %s"
 
-msgid ""
-"the editing in trace() can only change the body of the function, not the "
-"arguments or defaults"
-msgstr ""
-"�������������� � trace() ����� ������ ������ ���� �������, � �� ��������� "
-"��� �������� �� ���������"
+msgid "the editing in trace() can only change the body of the function, not the arguments or defaults"
+msgstr "�������������� � trace() ����� ������ ������ ���� �������, � �� ��������� ��� �������� �� ���������"
 
 msgid "cannot use 'at' argument without a trace expression"
 msgstr "�� ���� ������������ �������� 'at' ��� �������������� ���������"
 
-msgid ""
-"cannot use 'at' argument unless the function body has the form '{ ... }'"
-msgstr ""
-"�� ���� ������������ �������� 'at' ���� ���� ������� ����� ����� '{ ... }'"
+msgid "cannot use 'at' argument unless the function body has the form '{ ... }'"
+msgstr "�� ���� ������������ �������� 'at' ���� ���� ������� ����� ����� '{ ... }'"
 
 msgid "assigning over the binding of symbol %s in environment/package %s"
 msgstr "���������� ����� ����� ������� %s � ���������/������ %s"
 
-msgid ""
-"setting a method over the binding of symbol %s in environment/package %s"
+msgid "setting a method over the binding of symbol %s in environment/package %s"
 msgstr "��������� ������ ����� ���������� ������� %s � ���������/������ %s"
 
-msgid ""
-"Environment of class %s is locked; using global environment for new class"
-msgstr ""
-"��������� ������ %s �������������; ��������� ���������� ��������� ��� ������ "
-"������"
+msgid "Environment of class %s is locked; using global environment for new class"
+msgstr "��������� ������ %s �������������; ��������� ���������� ��������� ��� ������ ������"
 
-msgid ""
-"none of the objects in the source code could be found:  need to attach or "
-"specify the package"
-msgstr ""
-"�� ���� ����� �� ������ ������� ��������� ����: ����� ��������� ��� ������� "
-"�����"
+msgid "none of the objects in the source code could be found:  need to attach or specify the package"
+msgstr "�� ���� ����� �� ������ ������� ��������� ����: ����� ��������� ��� ������� �����"
 
 msgid "objects found in multiple packages: using %s and ignoring %s"
 msgstr "������� ������� �� ������ �������: ��������� %s � ��������� %s"
@@ -1710,34 +1158,23 @@ msgstr "
 msgid "package %s is not attached and no namespace found for it"
 msgstr "����� %s �� ����������� � ��� ������������ ���� �� �������"
 
-msgid ""
-"invalid 'source' argument: expected file names or a connection but got an "
-"object of class %s"
-msgstr ""
-"������������ �������� ��������: ���� ����� ������ ��� ����������, � ������� "
-"������ ������ %s"
+msgid "invalid 'source' argument: expected file names or a connection but got an object of class %s"
+msgstr "������������ �������� ��������: ���� ����� ������ ��� ����������, � ������� ������ ������ %s"
 
 msgid "cannot find an environment corresponding to package name '%s\""
 msgstr "�� ���� ����� ���������, ��������������� ����� ������ '%s\""
 
 msgid "supplied package, %s, differs from package inferred from source, %s"
-msgstr ""
-"������������ �����, %s, ���������� �� ������, ���������� � ����������, %s"
+msgstr "������������ �����, %s, ���������� �� ������, ���������� � ����������, %s"
 
 msgid "cannot insert these (not found in source): %s"
 msgstr "�� ���� �������� ��� (� ���������� �� �������): %s"
 
-msgid ""
-"cannot insert methods for these functions (methods table not found in "
-"source): %s"
-msgstr ""
-"�� ���� �������� ������ ��� ���� ������� (������� ������� �� ������� � "
-"����������): %s"
+msgid "cannot insert methods for these functions (methods table not found in source): %s"
+msgstr "�� ���� �������� ������ ��� ���� ������� (������� ������� �� ������� � ����������): %s"
 
 msgid "Non-function objects are not currently inserted (not traceable): %s"
-msgstr ""
-"����������������� ������� � ��������� ����� �� ��������� (�� ������������): "
-"%s"
+msgstr "����������������� ������� � ��������� ����� �� ��������� (�� ������������): %s"
 
 msgid "New functions are not currently inserted (not untraceable): %s"
 msgstr "����� ������� ������ �� ��������� (�� ��-������������): %s"
@@ -1745,12 +1182,8 @@ msgstr "
 msgid "Modified functions inserted through trace(): %s"
 msgstr "���������� ������� ��������� ����� trace(): %s"
 
-msgid ""
-"%s() is not a generic function in the target environment -- methods will not "
-"be inserted"
-msgstr ""
-"%s() �� �������� ����� �������� � ������� ��������� -- ������ �� ���� "
-"���������"
+msgid "%s() is not a generic function in the target environment -- methods will not be inserted"
+msgstr "%s() �� �������� ����� �������� � ������� ��������� -- ������ �� ���� ���������"
 
 msgid "Methods inserted for function %s(): %s"
 msgstr "������, ����������� ��� ������� %s(): %s"
@@ -1761,10 +1194,8 @@ msgstr "
 msgid "multiple generics match pattern, using table %s"
 msgstr "������������� ����� ����������� ��������, ��������� ������� %s"
 
-msgid ""
-"does not seem to be a method table for generic %s in tracing environment"
-msgstr ""
-"������, ��� ��� ������  %s ��� ������� ������� � ������������� ���������"
+msgid "does not seem to be a method table for generic %s in tracing environment"
+msgstr "������, ��� ��� ������  %s ��� ������� ������� � ������������� ���������"
 
 msgid "no method in methods table for %s for signature %s"
 msgstr "� ������� ������� ��� ������ ��� %s ��� ������� %s"
@@ -1784,21 +1215,11 @@ msgstr[0] "
 msgstr[1] "��� ����������� ������� \"%s\""
 msgstr[2] "��� ����������� ������� \"%s\""
 
-msgid ""
-"in the method signature for function %s invalid argument name in the "
-"signature: %s"
-msgid_plural ""
-"in the method signature for function %s invalid argument names in the "
-"signature: %s"
-msgstr[0] ""
-"� �������������� ������ ��� ������� %s �������� ����� ��������� � "
-"��������������: %s"
-msgstr[1] ""
-"� �������������� ������ ��� ������� %s �������� ����� ���������� � "
-"��������������: %s"
-msgstr[2] ""
-"� �������������� ������ ��� ������� %s �������� ����� ���������� � "
-"��������������: %s"
+msgid "in the method signature for function %s invalid argument name in the signature: %s"
+msgid_plural "in the method signature for function %s invalid argument names in the signature: %s"
+msgstr[0] "� �������������� ������ ��� ������� %s �������� ����� ��������� � ��������������: %s"
+msgstr[1] "� �������������� ������ ��� ������� %s �������� ����� ���������� � ��������������: %s"
+msgstr[2] "� �������������� ������ ��� ������� %s �������� ����� ���������� � ��������������: %s"
 
 msgid "Reported %d ambiguous selection out of %d for function %s\n"
 msgid_plural "Reported %d ambiguous selections out of %d for function %s\n"
@@ -1818,21 +1239,11 @@ msgstr[0] "
 msgstr[1] "�� ������� ���������� � ��������������: %s"
 msgstr[2] "�� ������� ���������� � ��������������: %s"
 
-msgid ""
-"the formal argument of the generic function for %s (%s) differs from that of "
-"the non-generic to be used as the default (%s)"
-msgid_plural ""
-"the formal arguments of the generic function for %s (%s) differ from those "
-"of the non-generic to be used as the default (%s)"
-msgstr[0] ""
-"���������� �������� ����� ������� ��� \"%s\" (%s) ���������� �� ��-������, "
-"������������� �� ��������� (%s)"
-msgstr[1] ""
-"���������� ��������� ����� ������� ��� \"%s\" (%s) ���������� �� ��-�����, "
-"������������ �� ��������� (%s)"
-msgstr[2] ""
-"���������� ��������� ����� ������� ��� \"%s\" (%s) ���������� �� ��-�����, "
-"������������ �� ��������� (%s)"
+msgid "the formal argument of the generic function for %s (%s) differs from that of the non-generic to be used as the default (%s)"
+msgid_plural "the formal arguments of the generic function for %s (%s) differ from those of the non-generic to be used as the default (%s)"
+msgstr[0] "���������� �������� ����� ������� ��� \"%s\" (%s) ���������� �� ��-������, ������������� �� ��������� (%s)"
+msgstr[1] "���������� ��������� ����� ������� ��� \"%s\" (%s) ���������� �� ��-�����, ������������ �� ��������� (%s)"
+msgstr[2] "���������� ��������� ����� ������� ��� \"%s\" (%s) ���������� �� ��-�����, ������������ �� ��������� (%s)"
 
 msgid "duplicated slot name: %s"
 msgid_plural "duplicated slot names: %s"
@@ -1862,34 +1273,17 @@ msgstr[2] ""
 "������� ��������� ������� ����������� ������ %s (%s); ��������� �����������\n"
 "   � ������ %s ��� %s"
 
-msgid ""
-"class %s is missing slot from class %s (%s), and no coerce method was "
-"supplied"
-msgid_plural ""
-"class %s is missing slots from class %s (%s), and no coerce method was "
-"supplied"
-msgstr[0] ""
-"� ������ %s ����������� ���� �� ������ %s (%s), � �� ������������ ����� "
-"����������"
-msgstr[1] ""
-"� ������ %s ����������� ����� �� ������ %s (%s), � �� ������������ ����� "
-"����������"
-msgstr[2] ""
-"� ������ %s ����������� ����� �� ������ %s (%s), � �� ������������ ����� "
-"����������"
+msgid "class %s is missing slot from class %s (%s), and no coerce method was supplied"
+msgid_plural "class %s is missing slots from class %s (%s), and no coerce method was supplied"
+msgstr[0] "� ������ %s ����������� ���� �� ������ %s (%s), � �� ������������ ����� ����������"
+msgstr[1] "� ������ %s ����������� ����� �� ������ %s (%s), � �� ������������ ����� ����������"
+msgstr[2] "� ������ %s ����������� ����� �� ������ %s (%s), � �� ������������ ����� ����������"
 
-msgid ""
-"slot in class %s must extend corresponding slot in class %s: fails for %s"
-msgid_plural ""
-"slots in class %s must extend corresponding slots in class %s: fails for %s"
-msgstr[0] ""
-"���� � ������ %s ������ ��������� ��������������� ���� � ������ %s: ���� � %s"
-msgstr[1] ""
-"����� � ������ %s ������ ��������� ��������������� ����� � ������ %s: ���� � "
-"%s"
-msgstr[2] ""
-"����� � ������ %s ������ ��������� ��������������� ����� � ������ %s: ���� � "
-"%s"
+msgid "slot in class %s must extend corresponding slot in class %s: fails for %s"
+msgid_plural "slots in class %s must extend corresponding slots in class %s: fails for %s"
+msgstr[0] "���� � ������ %s ������ ��������� ��������������� ���� � ������ %s: ���� � %s"
+msgstr[1] "����� � ������ %s ������ ��������� ��������������� ����� � ������ %s: ���� � %s"
+msgstr[2] "����� � ������ %s ������ ��������� ��������������� ����� � ������ %s: ���� � %s"
 
 msgid "found %d equally good next method"
 msgid_plural "found %d equally good next methods"
@@ -1921,30 +1315,39 @@ msgstr[0] "
 msgstr[1] "������ ����� %s �� %d ������������ ������������"
 msgstr[2] "������ ����� %s �� %d ������������ ������������"
 
-msgid ""
-"no definition of class %s in the specified position, %s, definition on : %s"
-msgid_plural ""
-"no definition of class %s in the specified position, %s, definitions on : %s"
+msgid "no definition of class %s in the specified position, %s, definition on : %s"
+msgid_plural "no definition of class %s in the specified position, %s, definitions on : %s"
 msgstr[0] "��� ����������� ������ %s � ��������� �������, %s, �����������: %s"
 msgstr[1] "��� ����������� ������ %s � ��������� �������, %s, �����������: %s"
 msgstr[2] "��� ����������� ������ %s � ��������� �������, %s, �����������: %s"
 
+#~ msgid "special function %s is not permitted to have methods"
+#~ msgstr "����������� ������� %s �� ��������� ����� �������"
+#~ msgid ""
+#~ "special function %s has no known argument list; will assume '(x, ...)'"
+#~ msgstr ""
+#~ "����������� ������� %s �� ����� ���������� ������ ����������; ����� "
+#~ "��������� '(x, ...)'"
+#~ msgid ""
+#~ "'callGeneric' with a primitive needs explicit arguments (no formal args "
+#~ "defined)"
+#~ msgstr ""
+#~ "'callGeneric' � ���������� ��������� � ����� ���������� (�� ���������� "
+#~ "���������� ���������)"
+#~ msgid "\""
+#~ msgstr "\""
 #~ msgid ""
 #~ "could not find superclass %s to clean up when removing subclass "
 #~ "references to class %s"
 #~ msgstr ""
 #~ "�� ���� ����� ���������� %s ��� ������� ��� �������� ������ ��������� �� "
 #~ "����� %s"
-
 #~ msgid "no class %s found as expected in removing subclass %s"
 #~ msgstr "�� ������� ������ %s, ���������� ��� �������� ��������� %s"
-
 #~ msgid "replacement value is not a matrix"
 #~ msgstr "���������� �������� �� �������� ��������"
-
 #~ msgid "field %s is read-only"
 #~ msgstr "���� %s ������ ��� ������"
-
 #~ msgid "not a package name: %s"
 #~ msgstr "�� �������� ������ ������: %s"
 
@@ -1961,48 +1364,39 @@ msgstr[2] "
 #~ msgstr ""
 #~ "���� ��������� ������ ���� ������� ������� ���� ��� �����������, ��� "
 #~ "������ ������� �����, � ������� ������ ������ %s"
-
 #~ msgid "Warning:  using defunct methods list search"
 #~ msgstr "��������������: ��������� ��������� ������ ������ � ������"
-
 #~ msgid ""
 #~ "apparent inconsistency in the methods for function %s; argument %s in the "
 #~ "signature corresponds to %s in the methods list object"
 #~ msgstr ""
 #~ "��������� ���������������� � ������� ������� %s; �������� %s � "
 #~ "�������������� ������������� %s � ������� ������ �������."
-
 #~ msgid ""
 #~ "no S4 method for function %s and signature %s; consider getS3method() if "
 #~ "you wanted the S3 method"
 #~ msgstr ""
 #~ "��� S4 ������ ��� ������� %s � �������������� %s; �������� �������� �� "
 #~ "getS3method() ���� ������ ������������ S3 �����"
-
 #~ msgid ""
 #~ "no method defined in methods list object for function %s and signature %s"
 #~ msgstr "�� ���������� ������ ��� ������� %s � �������������� %s"
-
 #~ msgid ""
 #~ "Methods list objects are not maintained in this version of R:  request "
 #~ "for function %s may return incorrect information"
 #~ msgstr ""
 #~ "������, ������������� �������, �� �������������� � ���� ������ R:  ������ "
 #~ "������� %s ����� ������� ������������ ����������"
-
 #~ msgid "multiple equivalent inherited matches:"
 #~ msgstr "������������� ������������� �������������� ������������:"
-
 #~ msgid "; using the first of these"
 #~ msgstr "; ��������� ������ �� ���"
-
 #~ msgid ""
 #~ "'traceOn' is deprecated: use the function 'trace' in the 'methods' "
 #~ "package instead"
 #~ msgstr ""
 #~ "'traceOn' �� ������������� � �������������: ������ ����� ����������� "
 #~ "������� 'trace' � ������ 'methods'"
-
 #~ msgid ""
 #~ "'traceOff' is deprecated: use the function 'untrace' in the 'methods' "
 #~ "package instead"
@@ -2016,44 +1410,35 @@ msgstr[2] "
 #~ "class %s in the target"
 #~ msgstr ""
 #~ "����� ��� ���� \"%s\" ������� ������������ � �������� ������� %s ����"
-
 #~ msgid "in .OldClassesPrototypes"
 #~ msgstr "� .OldClassesPrototypes"
-
 #~ msgid ""
 #~ "internal error: did not get a valid generic function object for function "
 #~ "%s"
 #~ msgstr ""
 #~ "���������� ������: �� ������� ������ ������ ����� ������� ��� ������� %s"
-
 #~ msgid ""
 #~ "apparent internal error: a generic function was found for \"%s\", but no "
 #~ "corresponding object was found searching from \"%s\""
 #~ msgstr ""
 #~ "��������� ���������� ������: ��� \"%s\" ���� ������� ����� �������, �� "
 #~ "������� �� \"%s\" �� ���� ������� ���������������� �������"
-
 #~ msgid "selectMethod(): mlist is not an environment or NULL :"
 #~ msgstr "selectMethod(): mlist �� �������� ���������� ��� NULL :"
-
 #~ msgid "** should no longer happen!"
 #~ msgstr "** ������ �� ������ ���������!"
-
 #~ msgid "Classes: %s, %s"
 #~ msgstr "������: %s, %s"
-
 #~ msgid ""
 #~ "internal error: Bad methods list object in fixing methods for primitive "
 #~ "function %s"
 #~ msgstr ""
 #~ "���������� ������: ������ ������ ������ ������� � ������������� ������� "
 #~ "��� ������������ ������� %s"
-
 #~ msgid "botched namespace: failed to find 'base' namespace in its parents"
 #~ msgstr ""
 #~ "������������ ������������ ����: �� ���� ����� ������������ ���� 'base' � "
 #~ "��� ��������"
-
 #~ msgid "multiple direct matches:"
 #~ msgstr "������������� ������ ������������:"
 
@@ -2069,128 +1454,91 @@ msgstr[2] "
 #~ msgstr ""
 #~ "���������� �������� � as(): \"%s\" is(������, \"%s\") �������� TRUE, �� "
 #~ "���������� ����������, ��� 'is' ����������� �������� FALSE"
-
 #~ msgid "connection"
 #~ msgstr "����������"
-
 #~ msgid ""
 #~ "Internal error in finding inherited methods; didn't return a unique method"
 #~ msgstr ""
 #~ "���������� ������ ��� ������ ������������� �������; �� ��������� "
 #~ "���������� �����"
-
 #~ msgid "\", but it is not a group generic"
 #~ msgstr "\", �� �� �������� ��������� �����"
-
 #~ msgid "Trying to check signature length of generic \""
 #~ msgstr "������� ��������� ����� �������������� ����� \""
-
 #~ msgid "\", but it is not a  generic function: i ="
 #~ msgstr "\", �� �� ��������  ����� ��������: i ="
-
 #~ msgid ", funs ="
 #~ msgstr ", funs ="
-
 #~ msgid ","
 #~ msgstr ","
-
 #~ msgid "; gnames ="
 #~ msgstr "; gnames ="
-
 #~ msgid ""
 #~ "Something weird:  inconsistent number of args in methods table strings:"
 #~ msgstr ""
 #~ "���-�� �� ���: ����������������� ���������� ���������� � ������� ������� "
 #~ "�������:"
-
 #~ msgid "(using the largest value)"
 #~ msgstr "(��������� ���������� ��������)"
-
 #~ msgid "Undefined classes ("
 #~ msgstr "�������������� ������ ("
-
 #~ msgid ""
 #~ "Method %s from class %s was not processed into a class method until being "
 #~ "installed.  Possible corruption of the methods in the class."
 #~ msgstr ""
 #~ "����� %s �� ������ %s �� ��� ������������ � ����� ������, ������ �� ��� "
 #~ "����������. �������� ����������� ������� � ������."
-
-#~ msgid "(class %s)"
-#~ msgstr "(����� %s)"
-
 #~ msgid "for method %s()"
 #~ msgstr "��� ������ %s()"
-
 #~ msgid ".TraceWithMethods: after computing what, whereF"
 #~ msgstr ".TraceWithMethods: ����� �������, ���, whereF"
-
 #~ msgid ".TraceWithMethods: untrace case"
 #~ msgstr ".TraceWithMethods: �� ������������ ������"
-
 #~ msgid ".TraceWithMethods: about to assign or setMethod"
 #~ msgstr ".TraceWithMethods: ������ � ���������� ���� � setMethod"
 
 #, fuzzy
 #~ msgid "Constructing traceable class %s"
 #~ msgstr "��������������� �������������� ������ \""
-
 #~ msgid "Pretend we inserted class"
 #~ msgstr "�����������, �� �������� �����"
-
 #~ msgid "= \"missing\""
 #~ msgstr "= \"�����������\""
-
 #~ msgid "found"
 #~ msgstr "�������"
-
 #~ msgid "Invalid mlist element for signature \""
 #~ msgstr "�������� mlist ������� ��� �������������� \""
-
 #~ msgid "\" at level"
 #~ msgstr "\" �� ������"
-
 #~ msgid "\")"
 #~ msgstr "\")"
-
 #~ msgid "Invalid object in methods table (\""
 #~ msgstr "�������� ������ � ������� ������� (\""
-
 #~ msgid "\"), expected a method, got an object of class \""
 #~ msgstr "\"), �������� �����, ������� ������ ������ \""
-
 #~ msgid "Environment of class \""
 #~ msgstr "��������� ������ \""
-
 #~ msgid "Replacement value must be of class \""
 #~ msgstr "���������� �������� ������ ���� ������ \""
-
 #~ msgid "\", got one of class \""
 #~ msgstr "\", ������� ������ \""
-
 #~ msgid "\", for signature"
 #~ msgstr "\", ��� ��������������"
-
 #~ msgid "Field \""
 #~ msgstr "���� \""
-
 #~ msgid "the supplied generic function definition for"
 #~ msgstr "��������� ����������� ����� ������� ���"
-
 #~ msgid ""
 #~ "does not seem to call 'standardGeneric'; no methods will be dispatched!"
 #~ msgstr "������, �� ������� 'standardGeneric'; ������ �� ����� ��������!"
-
 #~ msgid "no generic function \"'%s\" found"
 #~ msgstr "�� ������� ����� ������� \"'%s\""
-
 #~ msgid ""
 #~ "Restoring the implicit generic function for %s from package %s\n"
 #~ "    into package %s; the generic differs from the default conversion (%s)"
 #~ msgstr ""
 #~ "�������������� ����������� ����� ������� ��� %s �� ������ %s\n"
 #~ "    � ����� %s; ����� ����������� ����� ��������� �� ��������� (%s)"
-
 #~ msgid ""
 #~ "Creating a generic for %s in package %s\n"
 #~ "    (the supplied definition differs from and overrides the implicit "
@@ -2201,17 +1549,14 @@ msgstr[2] "
 #~ "    (������������ ����������� ���������� �� � ������������ ����������� "
 #~ "�����\n"
 #~ "    � ������ %s: %s)"
-
 #~ msgid ""
 #~ "\" is not a known action (warn, stop, once, ignore); no action recorded "
 #~ "for function \""
 #~ msgstr ""
 #~ "\" �� ��������� � ��������� ������ (warn, stop, once, ignore); ����� ��� "
 #~ "������� �� �������� \""
-
 #~ msgid "must give named list of refdefined fields"
 #~ msgstr "���� ���� ������ ���������������� �����"
-
 #~ msgid "Only accessor fields can be replaced:  field \"%s\" has class \"%s\""
 #~ msgstr ""
 #~ "������ ���������������� ���� ����� ���� ��������:  ���� \"%s\" ����� "
@@ -2240,7 +1585,6 @@ msgstr[2] "
 #, fuzzy
 #~ msgid "Trying to set a read-only field ("
 #~ msgstr "������� ���������� ��������� 'as' �� \"%s\" �� ����"
-
 #~ msgid ")"
 #~ msgstr ")"
 
@@ -2251,7 +1595,6 @@ msgstr[2] "
 #, fuzzy
 #~ msgid "Invalid accessor function list: %s"
 #~ msgstr "�������� ������ ��� ��������� �������"
-
 #~ msgid "Defining type \"%s\" as a superclass via class \"%s\""
 #~ msgstr "��������� ��� \"%s\" ��� ���������� ����� ����� \"%s\""
 
@@ -2262,7 +1605,6 @@ msgstr[2] "
 #~ msgstr ""
 #~ "�������� �������� \"f\", ��������� ������� ��� �� ���, ������� ������ "
 #~ "������ \"%s\""
-
 #~ msgid ""
 #~ "in the method signature for function \"%s\" no definition for class: %s"
 #~ msgid_plural ""
@@ -2273,7 +1615,6 @@ msgstr[2] "
 #~ "� �������������� ������ ��� ������� \"%s\" ��� ����������� ��� �������: %s"
 #~ msgstr[2] ""
 #~ "� �������������� ������ ��� ������� \"%s\" ��� ����������� ��� �������: %s"
-
 #~ msgid ""
 #~ "None of the orderings of the superclasses of class \"%s\" is consistent "
 #~ "with the superclass ordering of  its direct superclasses; using an "
@@ -2282,39 +1623,30 @@ msgstr[2] "
 #~ "�� ���� �� ������������ ������������ ������ \"%s\" �� ������������� "
 #~ "�������������� ����������� ��� ������ ������������; ��������� "
 #~ "��������������, ������� ����������� � %s"
-
 #~ msgid "Some of the superclasses in the definition of class \""
 #~ msgstr "��������� ����������� � ����������� ������ \""
-
 #~ msgid ""
 #~ "S3 methods written for S4 classes will fail inheritance!\n"
 #~ "Package"
 #~ msgstr ""
 #~ "S3 ������, ���������� ��� S4 �������, �� ������ �������������!\n"
 #~ "�����"
-
 #~ msgid "apparently has"
 #~ msgstr "�������� �����"
-
 #~ msgid "such methods  for the functions"
 #~ msgstr "����� ������ ��� �������"
-
 #~ msgid "Possible dangerous methods:"
 #~ msgstr "��������� ������� ������:"
-
 #~ msgid "(Warnings generated once per package per session)"
 #~ msgstr "(�������������� �������� ���� �� ����� �� ������)"
-
 #~ msgid "There are apparent S3 methods for class \""
 #~ msgstr "���� ��������� S3 ������ ��� ������ \""
-
 #~ msgid ""
 #~ "\"\n"
 #~ "DANGER: any subclasses of this class will not inherit the methods"
 #~ msgstr ""
 #~ "\"\n"
 #~ "������: ����� �������� ����� ������ �� ����� ����������� ������"
-
 #~ msgid ""
 #~ "\" have apparent S3 methods.\n"
 #~ "\n"
@@ -2325,59 +1657,45 @@ msgstr[2] "
 #~ "\n"
 #~ "������: ����� ����� �� ����� ����������� ��� ������.\n"
 #~ "����������� ������ ����������� �����������."
-
 #~ msgid "signature must be a vector of classes or an environment"
 #~ msgstr "������������� ������ ���� �������� ������� ��� ����������"
-
 #~ msgid "selectMethod(): .SelectMethodOn - old stuff - please report"
 #~ msgstr "selectMethod(): .SelectMethodOn - ��� ������ - ����������, ��������"
-
 #~ msgid "no unique method corresponding to this signature"
 #~ msgstr ""
 #~ "�� ���������� ������������� ������ ���������������� ������� ��������������"
-
 #~ msgid "unable to match signature to methods"
 #~ msgstr "���������� ����������� ������������� � �������"
-
 #~ msgid "class \"%s\" cannot be used as the data part of another class"
 #~ msgstr ""
 #~ "����� \"%s\" �� ����� ���� ����������� ��� ����� ������ ������� ������"
-
 #~ msgid "internal error: bad code for 'setPrimitiveMethods': %s"
 #~ msgstr "���������� ������: ������ ��� ��� 'setPrimitiveMethods': %s"
-
 #~ msgid "Ambiguous method selection for \"%s\", target \"%s\""
 #~ msgstr "����������� ����� ������ ��� \"%s\", ���� \"%s\""
-
 #~ msgid ""
 #~ "(the first of the signatures shown will be used)\n"
 #~ "%s"
 #~ msgstr ""
 #~ "(����� ����������� ������ �� ���������� ���������������)\n"
 #~ "%s"
-
 #~ msgid ""
 #~ "Couldn't find methods table for \"%s\", package \"%s\" may be out of date"
 #~ msgstr ""
 #~ "�� ���� ����� ������� ������� ��� \"%s\", ����� \"%s\" ����� ���� "
 #~ "����������"
-
 #~ msgid "The class to be removed  (\""
 #~ msgstr "������ ����� ����� ������  (\""
-
 #~ msgid "\") has defined subclasses that should also be removed: ("
 #~ msgstr "\") �������� ������������ ���������, ������� ������ ���� �������: ("
-
 #~ msgid ""
 #~ "'NextMethod' not defined because the current method is not a "
 #~ "'MethodDefinition' object"
 #~ msgstr ""
 #~ "'NextMethod' �� ���������, ������-��� ������� ����� �� �������� �������� "
 #~ "'MethodDefinition'"
-
 #~ msgid "expected a list of signature objects, got \"%s\""
 #~ msgstr "�������� ������ ���������������, ������� \"%s\""
-
 #~ msgid ""
 #~ "New generic for \"%s\" does not agree with implicit generic from package "
 #~ "\"%s\"; a new generic will be assigned with package \"%s\""
@@ -2385,40 +1703,34 @@ msgstr[2] "
 #~ "����� ����� ������� ��� \"%s\" �� ����������� � ��������������� ����� "
 #~ "�������� �� ������ \"%s\"; ����� ����� ������� ����� ��������� ������ \"%s"
 #~ "\""
-
 #~ msgid "Function \"%s\" may not be used as a generic (implicitly prohibited)"
 #~ msgstr ""
 #~ "������� \"%s\" �� ����� ���� ������������ � �������� ����� (����������� "
 #~ "�������������)"
-
 #~ msgid ""
 #~ "Implicit generic exists for \"%s\", but will be overriden by explicit "
 #~ "call to setGeneric()"
 #~ msgstr ""
 #~ "��������������� ����� ������� ��� \"%s\" ����������, �� ����� ���������� "
 #~ "������ ������� setGeneric()"
-
 #~ msgid ""
 #~ "Unable to find package environment for class \"%s\" to revise subclass "
 #~ "information"
 #~ msgstr ""
 #~ "�� ���� ����� ��������� ������ ��� ������ \"%s\" ��� ���������� "
 #~ "���������� ���������"
-
 #~ msgid ""
 #~ "No generic function found for \"%s\"; no action taken in "
 #~ "removeMethodsObject"
 #~ msgstr ""
 #~ "�� ������� ����� ������� ��� \"%s\"; �� ����������� ������� �������� � "
 #~ "removeMethodsObject"
-
 #~ msgid ""
 #~ "the environment/package \"%s\" is locked; cannot remove methods data for "
 #~ "\"%s\""
 #~ msgstr ""
 #~ "���������/����� \"%s\" �������������; �� ���� ������� ������ ������� ��� "
 #~ "\"%s\""
-
 #~ msgid ""
 #~ "the methods object name for \"%s\" must include the name of the package "
 #~ "that contains the generic function, but no generic function of this name "
@@ -2426,50 +1738,39 @@ msgstr[2] "
 #~ msgstr ""
 #~ "��� ������� ������� ��� \"%s\" ������ �������� ��� ������, ����������� "
 #~ "����� �������, �� ����� ������� � ����� ������ �� �������"
-
 #~ msgid ""
 #~ "no way to associate a generic function with an object of class \"%s\""
 #~ msgstr "��� ������� ������������� ����� ������� � �������� ������ \"%s\""
-
 #~ msgid "Could not find generic function \"%s\" to initialize cached methods"
 #~ msgstr ""
 #~ "�� ���� ����� ����� ������� \"%s\" ��� ������������� ������������ �������"
-
 #~ msgid ""
 #~ "trying to change the argument list of %s with %d arguments to have "
 #~ "arguments (%s)"
 #~ msgstr ""
 #~ "������� �������� ������ ���������� %s � %d ����������� ����� ����� "
 #~ "��������� (%s)"
-
 #~ msgid ""
 #~ "get rid of variables in definition %s (%s); they conflict with the needed "
 #~ "change to argument names (%s)"
 #~ msgstr ""
 #~ "���������� �� ���������� � ����������� %s (%s); ��� ����������� � "
 #~ "����������� ���������� � ������ ��������� (%s)"
-
 #~ msgid "arguments in definition %s changed from (%s) to (%s)"
 #~ msgstr "��������� � ����������� %s �������� � (%s) �� (%s)"
-
 #~ msgid "no methods found for generic \"%s\""
 #~ msgstr "�� ������� ������� ��� ����� ������� \"%s\""
-
 #~ msgid "\"%s\" is not one of the basic functions"
 #~ msgstr "\"%s\" �� �������� ����� �� �������� �������"
-
 #~ msgid "cannot reset \"%s\", the definition is not a generic function object"
 #~ msgstr ""
 #~ "�� ���� �������� \"%s\", ����������� �� �������� �������� ����� �������"
-
 #~ msgid "No nongeneric version of function \"%s\" exists to be restored"
 #~ msgstr ""
 #~ "�� ���������� �� ����� ������ ������� \"%s\" ��� ���� ����� �� "
 #~ "������������"
-
 #~ msgid "\"%s\" from \"%s\" is a non-generic function; no methods available"
 #~ msgstr "\"%s\" �� \"%s\" �� �������� ����� �������; ��� ��������� �������"
-
 #~ msgid ""
 #~ "invalid 'fdef' for \"%s\" in 'getAllMethods'; expected either a "
 #~ "'genericFunction object' or a primitive function, got an object of class "
@@ -2478,15 +1779,12 @@ msgstr[2] "
 #~ "�������� 'fdef' ��� \"%s\" � 'getAllMethods'; ��������� ���� "
 #~ "'genericFunction object' ���� ������������ �������, ������� ������ ������ "
 #~ "\"%s\""
-
 #~ msgid "Methods list for generic \""
 #~ msgstr "������ ������� ��� ����� \""
-
 #~ msgid "\" not found"
 #~ msgstr "\" �� �������"
-
 #~ msgid ".UsingMethodsTables: 'onOff' is not TRUE or FALSE"
 #~ msgstr ".UsingMethodsTables: 'onOff' �� �������� TRUE ���� FALSE"
-
 #~ msgid "Package \"%s\" is not loaded"
 #~ msgstr "����� \"%s\" �� ��������"
+
diff --git a/src/library/methods/po/R-zh_CN.po b/src/library/methods/po/R-zh_CN.po
index 137463f..cf0044f 100644
--- a/src/library/methods/po/R-zh_CN.po
+++ b/src/library/methods/po/R-zh_CN.po
@@ -7,17 +7,18 @@ msgid ""
 msgstr ""
 "Project-Id-Version: R 2.3.0\n"
 "Report-Msgid-Bugs-To: bugs.r-project.org\n"
-"POT-Creation-Date: 2013-11-25 05:14\n"
+"POT-Creation-Date: 2016-04-01 09:50\n"
 "PO-Revision-Date: 2005-03-15 08:37+0000\n"
 "Last-Translator: 陈斐 <feic at normipaiva.com>\n"
 "Language-Team: Chinese\n"
-"Language: \n"
+"Language: zh_CN\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
 "Plural-Forms: nplurals=1; plural=0;\n"
 
-msgid "OOPS: something wrong with line %d in '.OldClassesPrototypes'"
+#, fuzzy
+msgid "OOPS: something wrong with '.OldClassesPrototypes[[%d]]'"
 msgstr "啊呀:'.OldClassesPrototypes'里第%d行哪里出错了"
 
 msgid ""
@@ -88,8 +89,8 @@ msgid ""
 "the computation: 'as(object,\"%s\") <- value' is valid when object has class "
 "%s only if 'is(value, \"%s\")' is TRUE ('class(value)' was %s)"
 msgstr ""
-"运算出错:当object的类别是%2$s时,'as(object,\"%1$s\") <- value'只能在'is"
-"(value, \"%3$s\")'值为TRUE的时候才能用('class(value) '的值不能是%4$s)"
+"运算出错:当object的类别是%2$s时,'as(object,\"%1$s\") <- value'只能"
+"在'is(value, \"%3$s\")'值为TRUE的时候才能用('class(value) '的值不能是%4$s)"
 
 msgid ""
 "there is no automatic definition for 'as(object, \"%s\") <- value' when "
@@ -114,9 +115,10 @@ msgstr "无法建立併集类别: 无法设定%s成员"
 msgid "invalid argument 'name': %s"
 msgstr "参数'name'无效: %s"
 
+#, fuzzy
 msgid ""
-"%s is a primitive function;  methods can be defined, but the generic "
-"function is implicit, and cannot be changed."
+"%s dispatches internally;  methods can be defined, but the generic function "
+"is implicit, and cannot be changed."
 msgstr ""
 "%s是基元函数; 能够为其设定方法,但泛型函数是隱含定义的,无法对之进行改动。"
 
@@ -245,6 +247,10 @@ msgid ""
 "object of class %s)"
 msgstr "第一个参数应当为泛型函数的名称(现在却是类别为%s的对象)"
 
+#, fuzzy
+msgid "must supply 'generic.function' or 'class'"
+msgstr "必需为%s提供一个作默认用的泛型函数或函数"
+
 msgid "%s is not an S4 generic function in %s; methods not removed"
 msgstr "%s不是在%s里的S4泛型函数;因此方法没有被删除掉"
 
@@ -265,12 +271,8 @@ msgstr "函数%s已经是群体泛型函数了;没有变动"
 msgid "Function %s is a group generic; do not call it directly"
 msgstr "函数%s是群体泛型函数;不能直接調用"
 
-msgid ""
-"'callGeneric' with a primitive needs explicit arguments (no formal args "
-"defined)"
-msgstr "带基元的'callGeneric'需要明确的参数(没有设定正式参数)"
-
-msgid "'callGeneric' must be called from a generic function or method"
+#, fuzzy
+msgid "callGeneric() must be called from within a method body"
 msgstr "'callGeneric'只能由泛型函数或方法来調用"
 
 msgid "expected a non-empty character string for argument name"
@@ -329,12 +331,11 @@ msgstr ""
 msgid "non-generic function '%s' given to findMethods()"
 msgstr "findMethods()不适用于非泛型函数'%s'"
 
-msgid "only FALSE is meaningful for 'inherited', when 'where' is supplied (got"
+#, fuzzy
+msgid ""
+"only FALSE is meaningful for 'inherited', when 'where' is supplied (got %s)"
 msgstr "用'where'时,FALSE只对于'inherited'有意义,(得到了"
 
-msgid "\""
-msgstr "\""
-
 msgid "argument 'f' must be a generic function or %s"
 msgstr "参数'f'必需是泛型函数,或为%s"
 
@@ -434,6 +435,15 @@ msgstr "%s里:\"MethodsList\"元数据目标对象已经不推荐使用了。"
 msgid "use %s instead."
 msgstr "请用%s。"
 
+#, fuzzy
+msgid ""
+"%s, along with other use of the \"MethodsList\" metadata objects, is defunct."
+msgstr "%s和其他\"MethodsList\"元数据目标对象都已经不推荐使用了"
+
+#, fuzzy
+msgid "in %s: use of \"MethodsList\" metadata objects is defunct."
+msgstr "%s里:\"MethodsList\"元数据目标对象已经不推荐使用了。"
+
 msgid "invalid object for formal method definition: type %s"
 msgstr "正式方法定义的对象不对: %s种类"
 
@@ -457,6 +467,11 @@ msgstr "程辑包\"%2$s\"里用于\"%1$s\"这一类的类生成函数"
 msgid "the names in signature for method (%s) do not match %s's arguments (%s)"
 msgstr "方法(%s)标记里的名字同函数%s参数(%s)不相对应"
 
+#, fuzzy
+msgid ""
+"the names in signature for method (%s) do not match function's arguments (%s)"
+msgstr "方法(%s)标记里的名字同函数%s参数(%s)不相对应"
+
 msgid ""
 "a call to callNextMethod() appears in a call to %s, but the call does not "
 "seem to come from either a generic function or another 'callNextMethod'"
@@ -472,6 +487,9 @@ msgstr "調用'callNextMethod'既不在'method'也不在'callNextMethod'的文
 msgid "bad object found as method (class %s)"
 msgstr "作为方法的对象(类别%s)出了错"
 
+msgid "No next method available"
+msgstr ""
+
 msgid ""
 "in constructing the prototype for class %s: prototype has class %s, but the "
 "data part specifies class %s"
@@ -495,6 +513,9 @@ msgstr "类别继承里有可能有循环: %s在父类别和子类别(%s)里有
 msgid "undefined slot classes in definition of %s: %s"
 msgstr "在%s的定义中不存在这种槽类别: %s"
 
+msgid "(class %s)"
+msgstr "(类别%s)"
+
 msgid ""
 "in definition of class %s, information for superclass %s is of class %s "
 "(expected \"SClassExtension\")"
@@ -617,15 +638,6 @@ msgstr "找不到包含类别%s的环境"
 
 #, fuzzy
 msgid ""
-"Note: the specification for S3 class %s in package %s seems equivalent to "
-"one from package %s: not turning on duplicate class definitions for this "
-"class."
-msgstr ""
-"程序包%2$s里的%1$s S3类别定义似乎与程序包%3$s里的类别定义相当,因此不打开重复"
-"的类别定义"
-
-#, fuzzy
-msgid ""
 "Note: some superclasses of class %s in package %s have duplicate "
 "definitions.  This definition is not being treated as equivalent to that "
 "from package %s"
@@ -641,6 +653,11 @@ msgstr ""
 "程序包%2$s里的%1$s类别定义似乎与程序包%3$s里的类别定义相当,因此不打开重复的"
 "类别定义"
 
+msgid ""
+"Found more than one class \"%s\" in cache; using the first, from namespace "
+"'%s'"
+msgstr ""
+
 msgid "undefined subclass %s of class %s; definition not updated"
 msgstr "%2$s类别的子类别%1$s没有定义;因此没有更新"
 
@@ -687,12 +704,6 @@ msgstr "%s的参数要么是NULL,要么是泛型函数对象;现在却是类
 msgid "no suitable arguments to dispatch methods in this function"
 msgstr "此函数里没有合适的参数可用来分配方法"
 
-msgid "special function %s is not permitted to have methods"
-msgstr "特殊函数%s不可以有方法"
-
-msgid "special function %s has no known argument list; will assume '(x, ...)'"
-msgstr "特殊函数%s没有已知的参数串列;假设用'(x, ...)'"
-
 msgid "making a generic for special function %s"
 msgstr "为特殊函数 %s制造泛型函数"
 
@@ -730,25 +741,21 @@ msgid ""
 msgstr ""
 "'f'参数要么是字符,要么是泛型函数,要么是原始函数:现在得到的却是普通函数"
 
-msgid "methods cannot be defined for the primitive function %s"
-msgstr "无法为基元函数%s定义方法"
-
 msgid "no generic function found for %s"
 msgstr "为'%s'找不到泛型函数"
 
 msgid "Empty function name in .getGeneric"
 msgstr ".getGeneric里不能有空的函数名字"
 
-msgid ""
-"package %s seems to have out-of-date methods; need to reinstall from source"
-msgstr "程序包%s里的方法好象过时了;请重新安装"
-
 msgid "no methods found for %s; cacheGenericsMetaData() will have no effect"
 msgstr "%s找不到方法;'cacheGenericsMetaData()'没有作用"
 
 msgid "invalid value from generic function %s, class %s, expected %s"
 msgstr "类别为%2$s的泛型函数'%1$s'的值不对, 所要求的是%3$s"
 
+msgid "\"MethodsList\" is defunct; allMethods now are empty"
+msgstr ""
+
 msgid ""
 "the body of the generic function for %s calls 'standardGeneric' to dispatch "
 "on a different name (\"%s\")!"
@@ -823,9 +830,6 @@ msgstr "%s类别存在多个定义;应该指定用一个(%s),比如通过cla
 msgid "no definition found for class %s"
 msgstr "类别%s的定义不存在"
 
-msgid "trying to execute load actions without 'methods' package"
-msgstr "没有'methods'程序包时进行加载操作"
-
 msgid "missing function for load action: %s"
 msgstr "荷载操作时找不到函数:%s"
 
@@ -1034,6 +1038,13 @@ msgid ""
 "methods currently exist for coercing from %s to %s; they will be replaced."
 msgstr "目前存在着強制转换%s成%s的方法;这些方法将会被替换掉。"
 
+#, fuzzy
+msgid "Function must be an S4 generic"
+msgstr ".getGeneric里不能有空的函数名字"
+
+msgid "method is not being debugged"
+msgstr ""
+
 msgid "object %s not found"
 msgstr "找不到%s这个对象"
 
@@ -1099,9 +1110,10 @@ msgstr "方法骨架写于%s "
 msgid "invalid object in meta table of methods for %s, label %s, had class %s"
 msgstr "元方法表里方法%1$s,标签%2$s的对象不对,类别不应该是%3$s"
 
+#, fuzzy
 msgid ""
-"invalid mlist element for signature %s at level %d (should be methods list "
-"or method, had class %s)"
+"invalid mlist element for signature %s at level %d (should be "
+"MethodDefinition or .Primitive, had class %s)"
 msgstr "无效的mlist元素的标签%s的%d级(应该是方法列表或方法,类另是%s)"
 
 msgid "bad method object stored in method table, class %s"
@@ -1112,7 +1124,8 @@ msgid ""
 "class %s"
 msgstr "方法表(%s)里的对象定义不对:应该是方法,现在却是个类别为%s的对象"
 
-msgid "invalid or unset methods table in generic function \""
+#, fuzzy
+msgid "invalid or unset methods table in generic function %s"
 msgstr "泛型函数的方法表不对,或还没有设制\""
 
 msgid "trying to find a methods table in a non-generic function"
@@ -1291,6 +1304,10 @@ msgstr "不能直接调用callSuper():只能用其它的方法来调用它"
 msgid "%s is not a field in this class"
 msgstr "%s不是这个类别里的场"
 
+#, fuzzy
+msgid "Methods not found: %s"
+msgstr "找不到%s这个对象"
+
 msgid ""
 "the definition of class %s in package %s is locked, methods may not be "
 "redefined"
@@ -1399,6 +1416,11 @@ msgid "field %s of class %s has a non-default binding and cannot be locked"
 msgstr "%1$s类别的%2$s场有非默认的约束力,因此不能被锁定"
 
 msgid ""
+"Reference superclasses must come from the same package for the environment "
+"to be defined:  got %s and %s"
+msgstr ""
+
+msgid ""
 "Class %s is not a subclass of %s; functional semantics not defined for this "
 "class"
 msgstr "%s类别不是%s的子类别;这没有功能语义定义"
@@ -1444,8 +1466,8 @@ msgstr "无法将%s删除追踪;这一标记没有与之相对应的方法:%
 msgid "the method for %s for this signature was not being traced"
 msgstr "此标记的%s方法没有被追踪"
 
-msgid ""
-"making a traced version of a primitive; arguments will be treated as '...'"
+#, fuzzy
+msgid "making a traced version of a special; arguments may be altered"
 msgstr "创造一个被追踪的基元函数版本;其参数将被当作'...'来用"
 
 msgid ""
@@ -1634,6 +1656,41 @@ msgid_plural ""
 "no definition of class %s in the specified position, %s, definitions on : %s"
 msgstr[0] "在指定的%2$s这个位置不存在类别%1$s的定义, 定义在: %3$s"
 
+#, fuzzy
+#~ msgid ""
+#~ "Note: the specification for S3 class %s in package %s seems equivalent to "
+#~ "one from package %s: not turning on duplicate class definitions for this "
+#~ "class."
+#~ msgstr ""
+#~ "程序包%2$s里的%1$s S3类别定义似乎与程序包%3$s里的类别定义相当,因此不打开"
+#~ "重复的类别定义"
+
+#~ msgid "methods cannot be defined for the primitive function %s"
+#~ msgstr "无法为基元函数%s定义方法"
+
+#~ msgid ""
+#~ "package %s seems to have out-of-date methods; need to reinstall from "
+#~ "source"
+#~ msgstr "程序包%s里的方法好象过时了;请重新安装"
+
+#~ msgid "trying to execute load actions without 'methods' package"
+#~ msgstr "没有'methods'程序包时进行加载操作"
+
+#~ msgid "special function %s is not permitted to have methods"
+#~ msgstr "特殊函数%s不可以有方法"
+
+#~ msgid ""
+#~ "special function %s has no known argument list; will assume '(x, ...)'"
+#~ msgstr "特殊函数%s没有已知的参数串列;假设用'(x, ...)'"
+
+#~ msgid ""
+#~ "'callGeneric' with a primitive needs explicit arguments (no formal args "
+#~ "defined)"
+#~ msgstr "带基元的'callGeneric'需要明确的参数(没有设定正式参数)"
+
+#~ msgid "\""
+#~ msgstr "\""
+
 #~ msgid ""
 #~ "could not find superclass %s to clean up when removing subclass "
 #~ "references to class %s"
@@ -1796,9 +1853,6 @@ msgstr[0] "在指定的%2$s这个位置不存在类别%1$s的定义, 定义在:
 #~ msgstr ""
 #~ "在安装之前类别%s里的%s方法无法被处理成类别方法。在类别里有能出现方法损坏"
 
-#~ msgid "(class %s)"
-#~ msgstr "(类别%s)"
-
 #~ msgid "for method %s()"
 #~ msgstr "为方法%s()"
 
diff --git a/src/library/methods/po/da.po b/src/library/methods/po/da.po
index 82a73c1..720ba8d 100644
--- a/src/library/methods/po/da.po
+++ b/src/library/methods/po/da.po
@@ -5,8 +5,8 @@
 msgid ""
 msgstr ""
 "Project-Id-Version: R 3.0.0\n"
-"Report-Msgid-Bugs-To: bugs.r-project.org\n"
-"POT-Creation-Date: 2013-07-20 09:38+0100\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2016-04-01 10:01-0700\n"
 "PO-Revision-Date: 2011-11-29 09:10+0200\n"
 "Last-Translator: Joe <joedalton2 at yahoo.dk>\n"
 "Language-Team: LANGUAGE <LL at li.org>\n"
@@ -42,18 +42,18 @@ msgstr ""
 "ingen 'allMethods'-slot fundet i objekt af klasse »%s« brugt som metodeliste "
 "for funktion '%s'"
 
-#: methods_list_dispatch.c:434
+#: methods_list_dispatch.c:443
 #, c-format
 msgid "no generic function definition found for '%s'"
 msgstr "ingen generisk funktionsdefinition fundet for '%s'"
 
-#: methods_list_dispatch.c:437
+#: methods_list_dispatch.c:446
 #, fuzzy, c-format
 msgid ""
 "no generic function definition found for '%s' in the supplied environment"
 msgstr "Ingen generisk funktionsdefinition fundet for '%s' i det angivne miljø"
 
-#: methods_list_dispatch.c:472
+#: methods_list_dispatch.c:481
 #, c-format
 msgid ""
 "invalid generic function object for method selection for function '%s': "
@@ -62,21 +62,21 @@ msgstr ""
 "ugyldig generisk funktionsobjekt for metodevalg for funktion '%s': "
 "forventede en funktion eller en grundform, fik et objekt af klasse »%s«"
 
-#: methods_list_dispatch.c:487
+#: methods_list_dispatch.c:496
 #, c-format
 msgid "no direct or inherited method for function '%s' for this call"
 msgstr "ingen direkte eller arvet metode for funktion '%s' for dette kald"
 
-#: methods_list_dispatch.c:513 methods_list_dispatch.c:1046
+#: methods_list_dispatch.c:526 methods_list_dispatch.c:1071
 msgid "invalid object (non-function) used as method"
 msgstr "ugyldig objekt (ikkefunktion) brugt som metode"
 
-#: methods_list_dispatch.c:534
+#: methods_list_dispatch.c:547
 #, c-format
 msgid "could not find symbol '%s' in frame of call"
 msgstr "kunne ikke finde symbol '%s' i kaldramme"
 
-#: methods_list_dispatch.c:542
+#: methods_list_dispatch.c:555
 #, c-format
 msgid ""
 "invalid symbol in checking for missing argument in method dispatch: expected "
@@ -85,11 +85,11 @@ msgstr ""
 "ugyldigt symbol under kontrol af manglende argument i metodeafsendelse: "
 "forventede et navn, fik et objekt af klasse »%s«"
 
-#: methods_list_dispatch.c:545
+#: methods_list_dispatch.c:558
 msgid "use of NULL environment is defunct"
 msgstr "brug af NULL-miljø er ikke længere i brug"
 
-#: methods_list_dispatch.c:549
+#: methods_list_dispatch.c:562
 #, c-format
 msgid ""
 "invalid environment in checking for missing argument, '%s', in methods "
@@ -98,7 +98,7 @@ msgstr ""
 "ugyldigt miljø under kontrol af manglende argument, '%s', i "
 "metodeafsendelse: fik et objekt af klasse »%s«"
 
-#: methods_list_dispatch.c:575
+#: methods_list_dispatch.c:588
 #, c-format
 msgid ""
 "object of class \"%s\" used as methods list for function '%s' ( no "
@@ -107,7 +107,7 @@ msgstr ""
 "objekt af klasse »%s« brugt som metodeliste for funktion '%s' (intet "
 "'argument'-slot)"
 
-#: methods_list_dispatch.c:586
+#: methods_list_dispatch.c:599
 #, c-format
 msgid ""
 "(in selecting a method for function '%s') '...' and related variables cannot "
@@ -116,7 +116,7 @@ msgstr ""
 "(under valg af metode for funktion '%s') '...' og relaterede variabler kan "
 "ikke bruges for metodeafsendelse"
 
-#: methods_list_dispatch.c:589
+#: methods_list_dispatch.c:602
 #, c-format
 msgid ""
 "(in selecting a method for function '%s') the 'environment' argument for "
@@ -125,8 +125,8 @@ msgstr ""
 "(under valg af metode for funktion '%s') 'miljø'-argumentet for afsendelse "
 "skal være et R-miljø; fik et objekt af klasse »%s«"
 
-#: methods_list_dispatch.c:603 methods_list_dispatch.c:615
-#: methods_list_dispatch.c:999
+#: methods_list_dispatch.c:616 methods_list_dispatch.c:628
+#: methods_list_dispatch.c:1017
 #, c-format
 msgid ""
 "error in evaluating the argument '%s' in selecting a method for function "
@@ -135,57 +135,49 @@ msgstr ""
 "fejl under evaluering af argument '%s' under valg af metode for funktion "
 "'%s': %s"
 
-#: methods_list_dispatch.c:623
+#: methods_list_dispatch.c:636
 #, c-format
 msgid "no matching method for function '%s' (argument '%s', with class \"%s\")"
 msgstr ""
 "ingen matchende metode for funktion '%s' (argument '%s', med klasse »%s«)"
 
-#: methods_list_dispatch.c:630
+#: methods_list_dispatch.c:643
 #, c-format
 msgid ""
 "recursive use of function '%s' in method selection, with no default method"
 msgstr "rekursiv brug af funktion '%s' i metodevalg, uden en standardmetode"
 
-#: methods_list_dispatch.c:693
-msgid ""
-"in processing 'callNextMethod', found a '...' in the matched call, but no "
-"corresponding '...' argument"
-msgstr ""
-"under behandling af 'callnextMethod', fandt en '...' i det matchede kald, "
-"men intet tilsvarende '...'-argument"
-
-#: methods_list_dispatch.c:706
+#: methods_list_dispatch.c:712
 #, c-format
 msgid "error in evaluating a 'primitive' next method: %s"
 msgstr "fejl under evaluering af en 'primitive' next-metode: %s"
 
-#: methods_list_dispatch.c:801
+#: methods_list_dispatch.c:810
 #, c-format
 msgid "'%s' must be a single string (got a character vector of length %d)"
 msgstr "'%s' skal være en enkelt streng (fik en tegnvektor med længden %d)"
 
-#: methods_list_dispatch.c:805
+#: methods_list_dispatch.c:814
 #, c-format
 msgid "'%s' must be a non-empty string; got an empty string"
 msgstr "'%s' skal være en udfyldt streng; fik en tom streng"
 
-#: methods_list_dispatch.c:809
+#: methods_list_dispatch.c:818
 #, c-format
 msgid "'%s' must be a single string (got an object of class \"%s\")"
 msgstr "'%s' skal være en enkel streng (fik et objekt af klasse »%s«)"
 
-#: methods_list_dispatch.c:880
+#: methods_list_dispatch.c:895
 #, fuzzy
 msgid "class should be either a character-string name or a class definition"
 msgstr "Klasse skal enten være et tegn-streng navn eller en klassedefinition"
 
-#: methods_list_dispatch.c:959
+#: methods_list_dispatch.c:975
 #, fuzzy, c-format
 msgid "failed to get the generic for the primitive \"%s\""
 msgstr "Kunne ikke indhente den generiske for primitive »%s«"
 
-#: methods_list_dispatch.c:965
+#: methods_list_dispatch.c:982
 #, fuzzy, c-format
 msgid ""
 "expected a generic function or a primitive for dispatch, got an object of "
@@ -195,6 +187,13 @@ msgstr ""
 "objekt af klassen »%s«"
 
 #~ msgid ""
+#~ "in processing 'callNextMethod', found a '...' in the matched call, but no "
+#~ "corresponding '...' argument"
+#~ msgstr ""
+#~ "under behandling af 'callnextMethod', fandt en '...' i det matchede kald, "
+#~ "men intet tilsvarende '...'-argument"
+
+#~ msgid ""
 #~ "S language method selection got an error when called from internal "
 #~ "dispatch for function '%s'"
 #~ msgstr ""
diff --git a/src/library/methods/po/de.po b/src/library/methods/po/de.po
index 49922e1..3c08d22 100644
--- a/src/library/methods/po/de.po
+++ b/src/library/methods/po/de.po
@@ -5,12 +5,12 @@
 msgid ""
 msgstr ""
 "Project-Id-Version: R-3.1.0\n"
-"Report-Msgid-Bugs-To: bugs.r-project.org\n"
-"POT-Creation-Date: 2013-07-20 09:38+0100\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2016-04-01 10:01-0700\n"
 "PO-Revision-Date: 2013-03-12 10:39+0100\n"
 "Last-Translator: Detlef Steuer <steuer at hsu-hh.de>\n"
 "Language-Team: R-core <R-core at r-project.org>\n"
-"Language: \n"
+"Language: de\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
@@ -32,7 +32,7 @@ msgid ""
 "very bad things to happen"
 msgstr ""
 "konnte die Skelettaufrufe für 'methods' nicht finden (Paket entfernt?): "
-"erwarte,dass wirklich schlimme Dinge passieren"
+"erwarte, dass wirklich schlimme Dinge passieren"
 
 #: methods_list_dispatch.c:215
 #, c-format
@@ -43,12 +43,12 @@ msgstr ""
 "kein \"allMethods\" Slot im Objekt der Klasse \"%s\", das als Methodenliste "
 "für Funktion '%s' genutzt wird"
 
-#: methods_list_dispatch.c:434
+#: methods_list_dispatch.c:443
 #, c-format
 msgid "no generic function definition found for '%s'"
 msgstr "keine generische Funktionsdefinition für '%s' gefunden"
 
-#: methods_list_dispatch.c:437
+#: methods_list_dispatch.c:446
 #, c-format
 msgid ""
 "no generic function definition found for '%s' in the supplied environment"
@@ -56,7 +56,7 @@ msgstr ""
 "keine generische Funktionsdefinition für '%s' in der angegebenen Umgebung "
 "gefunden"
 
-#: methods_list_dispatch.c:472
+#: methods_list_dispatch.c:481
 #, c-format
 msgid ""
 "invalid generic function object for method selection for function '%s': "
@@ -66,22 +66,22 @@ msgstr ""
 "'%s': erwartete eine Funktion oder eine Primitive, bekam Objekt der Klasse "
 "\"%s\""
 
-#: methods_list_dispatch.c:487
+#: methods_list_dispatch.c:496
 #, c-format
 msgid "no direct or inherited method for function '%s' for this call"
 msgstr ""
 "keine direkte oder vererbte Methode für Funktion '%s' für diesen Aufruf"
 
-#: methods_list_dispatch.c:513 methods_list_dispatch.c:1046
+#: methods_list_dispatch.c:526 methods_list_dispatch.c:1071
 msgid "invalid object (non-function) used as method"
 msgstr "unzulässiges Objekt (keine Funktion) als Methode benutzt"
 
-#: methods_list_dispatch.c:534
+#: methods_list_dispatch.c:547
 #, c-format
 msgid "could not find symbol '%s' in frame of call"
 msgstr "konnte Symbol '%s' nicht im Rahmen des Aufrufs finden"
 
-#: methods_list_dispatch.c:542
+#: methods_list_dispatch.c:555
 #, c-format
 msgid ""
 "invalid symbol in checking for missing argument in method dispatch: expected "
@@ -90,11 +90,11 @@ msgstr ""
 "unzulässiges Symbol bei der Überprüfung auf fehlende Argumente im "
 "Methodendispatch: erwartete einen Namen, bekam Objekt der Klasse \"%s\""
 
-#: methods_list_dispatch.c:545
+#: methods_list_dispatch.c:558
 msgid "use of NULL environment is defunct"
 msgstr "Nutzen der NULL Umgebung nicht mehr möglich"
 
-#: methods_list_dispatch.c:549
+#: methods_list_dispatch.c:562
 #, c-format
 msgid ""
 "invalid environment in checking for missing argument, '%s', in methods "
@@ -103,7 +103,7 @@ msgstr ""
 "unzulässige Umgebung bei der Überprüfung auf fehlende Argumente, '%s', im "
 "Methodendispatch: bekam Objekt der Klasse \"%s\""
 
-#: methods_list_dispatch.c:575
+#: methods_list_dispatch.c:588
 #, c-format
 msgid ""
 "object of class \"%s\" used as methods list for function '%s' ( no "
@@ -112,16 +112,16 @@ msgstr ""
 "Objekt der Klasse \"%s\" als Methodenliste für Funktion '%s' genutzt (kein "
 "'argument' Slot)"
 
-#: methods_list_dispatch.c:586
+#: methods_list_dispatch.c:599
 #, c-format
 msgid ""
 "(in selecting a method for function '%s') '...' and related variables cannot "
 "be used for methods dispatch"
 msgstr ""
 "(bei der Auswahl einer Methode für Funktion '%s') '...' und damit "
-"zusammenhängende Variablenkönnen nicht für Methodendispatch gennutzt werden"
+"zusammenhängende Variablen können nicht für Methodendispatch gennutzt werden"
 
-#: methods_list_dispatch.c:589
+#: methods_list_dispatch.c:602
 #, c-format
 msgid ""
 "(in selecting a method for function '%s') the 'environment' argument for "
@@ -130,23 +130,24 @@ msgstr ""
 "(bei der Auswahl einer Methode für Funktion '%s') das 'environment' Argument "
 "für den Dispatch muss eine R Umgebung sein; bekam Objekt der Klasse \"%s\""
 
-#: methods_list_dispatch.c:603 methods_list_dispatch.c:615
-#: methods_list_dispatch.c:999
+#: methods_list_dispatch.c:616 methods_list_dispatch.c:628
+#: methods_list_dispatch.c:1017
 #, c-format
 msgid ""
 "error in evaluating the argument '%s' in selecting a method for function "
 "'%s': %s"
 msgstr ""
-"Fehler bei der Auswertung des Argumentes '%s' bei der Methodenauswahl\n"
-"für Funktion '%s': %s"
+"Fehler bei der Auswertung des Argumentes '%s' bei der Methodenauswahl für "
+"Funktion '%s': %s"
 
-#: methods_list_dispatch.c:623
+#: methods_list_dispatch.c:636
 #, c-format
 msgid "no matching method for function '%s' (argument '%s', with class \"%s\")"
 msgstr ""
-"kein passende Methode für die Funktion '%s' (Argument '%s', mit Klasse \"%s\""
+"kein passende Methode für die Funktion '%s' (Argument '%s', mit Klasse \"%s"
+"\")"
 
-#: methods_list_dispatch.c:630
+#: methods_list_dispatch.c:643
 #, c-format
 msgid ""
 "recursive use of function '%s' in method selection, with no default method"
@@ -154,50 +155,42 @@ msgstr ""
 "rekursive Benutzung der Funktion '%s' in der Methodenwahl, ohne "
 "Standardmethode"
 
-#: methods_list_dispatch.c:693
-msgid ""
-"in processing 'callNextMethod', found a '...' in the matched call, but no "
-"corresponding '...' argument"
-msgstr ""
-"bei der Verarbeitung von 'callNextMethod' ein '...' im Aufruf gefunden, aber "
-"keinnkorrespondierendes '...' Argument"
-
-#: methods_list_dispatch.c:706
+#: methods_list_dispatch.c:712
 #, c-format
 msgid "error in evaluating a 'primitive' next method: %s"
 msgstr "Fehler in der Bestimmung einer 'primitive' next-Methode: %s"
 
-#: methods_list_dispatch.c:801
+#: methods_list_dispatch.c:810
 #, c-format
 msgid "'%s' must be a single string (got a character vector of length %d)"
 msgstr ""
 "\"%s\" muss eine einzelne Zeichenkette sein (bekam Zeichenkettenvektor der "
 "Länge %d)"
 
-#: methods_list_dispatch.c:805
+#: methods_list_dispatch.c:814
 #, c-format
 msgid "'%s' must be a non-empty string; got an empty string"
 msgstr ""
 "'%s' muss eine nicht-leere Zeichenkette sein; bekam eine leere Zeichenkette"
 
-#: methods_list_dispatch.c:809
+#: methods_list_dispatch.c:818
 #, c-format
 msgid "'%s' must be a single string (got an object of class \"%s\")"
 msgstr ""
 "'%s' muss eine einzelne Zeichenkette sein (bekam ein Objekt der Klasse \"%s"
 "\")"
 
-#: methods_list_dispatch.c:880
+#: methods_list_dispatch.c:895
 msgid "class should be either a character-string name or a class definition"
 msgstr ""
 "class sollte entweder ein Zeichenkettenname oder eine Klassendefinition sein"
 
-#: methods_list_dispatch.c:959
+#: methods_list_dispatch.c:975
 #, c-format
 msgid "failed to get the generic for the primitive \"%s\""
 msgstr "bekam keine Generische für die Primitive \"%s\""
 
-#: methods_list_dispatch.c:965
+#: methods_list_dispatch.c:982
 #, c-format
 msgid ""
 "expected a generic function or a primitive for dispatch, got an object of "
@@ -207,6 +200,13 @@ msgstr ""
 "bekam Objekt der Klasse \"%s\""
 
 #~ msgid ""
+#~ "in processing 'callNextMethod', found a '...' in the matched call, but no "
+#~ "corresponding '...' argument"
+#~ msgstr ""
+#~ "bei der Verarbeitung von 'callNextMethod' ein '...' im Aufruf gefunden, "
+#~ "aber keinnkorrespondierendes '...' Argument"
+
+#~ msgid ""
 #~ "S language method selection got an error when called from internal "
 #~ "dispatch for function '%s'"
 #~ msgstr ""
diff --git a/src/library/methods/po/fr.po b/src/library/methods/po/fr.po
index 34731e5..e3a4138 100644
--- a/src/library/methods/po/fr.po
+++ b/src/library/methods/po/fr.po
@@ -6,8 +6,8 @@
 msgid ""
 msgstr ""
 "Project-Id-Version: R 2.12.0\n"
-"Report-Msgid-Bugs-To: bugs.r-project.org\n"
-"POT-Creation-Date: 2013-07-20 09:38+0100\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2016-04-01 10:01-0700\n"
 "PO-Revision-Date: 2013-03-18 22:05+0100\n"
 "Last-Translator: Philippe Grosjean <phgrosjean at sciviews.org>\n"
 "Language-Team: French <R-core at r-project.org>\n"
@@ -45,12 +45,12 @@ msgstr ""
 " pas de \"allMethods\" slot trouv� dans l'objet de classe \"%s\" utilis� "
 "comme liste de methodes pour la fonction '%s'"
 
-#: methods_list_dispatch.c:434
+#: methods_list_dispatch.c:443
 #, c-format
 msgid "no generic function definition found for '%s'"
 msgstr "pas de d�finition de fonction g�n�rique trouv�e pour '%s'"
 
-#: methods_list_dispatch.c:437
+#: methods_list_dispatch.c:446
 #, c-format
 msgid ""
 "no generic function definition found for '%s' in the supplied environment"
@@ -58,7 +58,7 @@ msgstr ""
 "pas de d�finition de fonction g�n�rique trouv�e pour '%s' dans "
 "l'environnement fourni"
 
-#: methods_list_dispatch.c:472
+#: methods_list_dispatch.c:481
 #, c-format
 msgid ""
 "invalid generic function object for method selection for function '%s': "
@@ -68,22 +68,22 @@ msgstr ""
 "fonction '%s' : une fonction ou une primitive �tait attendue et un objet de "
 "classe \"%s\" est renvoy�"
 
-#: methods_list_dispatch.c:487
+#: methods_list_dispatch.c:496
 #, c-format
 msgid "no direct or inherited method for function '%s' for this call"
 msgstr "pas de m�thode directe ou h�rit�e pour la fonction '%s' dans cet appel"
 
-#: methods_list_dispatch.c:513 methods_list_dispatch.c:1046
+#: methods_list_dispatch.c:526 methods_list_dispatch.c:1071
 msgid "invalid object (non-function) used as method"
 msgstr ""
 "objet incorrect (autre chose qu'une fonction) utilis� dans cette m�thode"
 
-#: methods_list_dispatch.c:534
+#: methods_list_dispatch.c:547
 #, c-format
 msgid "could not find symbol '%s' in frame of call"
 msgstr "impossible de trouver le symbole '%s' dans le cadre de l'appel"
 
-#: methods_list_dispatch.c:542
+#: methods_list_dispatch.c:555
 #, c-format
 msgid ""
 "invalid symbol in checking for missing argument in method dispatch: expected "
@@ -93,11 +93,11 @@ msgstr ""
 "dispatcheur de m�thode : un nom est attendu et un objet de classe \"%s\" est "
 "renvoy�"
 
-#: methods_list_dispatch.c:545
+#: methods_list_dispatch.c:558
 msgid "use of NULL environment is defunct"
 msgstr "l'utilisation de l'environnement NULL n'est plus autoris�e"
 
-#: methods_list_dispatch.c:549
+#: methods_list_dispatch.c:562
 #, c-format
 msgid ""
 "invalid environment in checking for missing argument, '%s', in methods "
@@ -106,7 +106,7 @@ msgstr ""
 "environnmenet incorrect lors de la v�rification de l'argument manquant, "
 "'%s', dans le dispatcheur de m�thodes : un objet de classe \"%s\" est renvoy�"
 
-#: methods_list_dispatch.c:575
+#: methods_list_dispatch.c:588
 #, c-format
 msgid ""
 "object of class \"%s\" used as methods list for function '%s' ( no "
@@ -115,7 +115,7 @@ msgstr ""
 "l'objet de classe \"%s\" utilis� comme m�thode pour la fonction '%s' (pas de "
 "slot 'argument')"
 
-#: methods_list_dispatch.c:586
+#: methods_list_dispatch.c:599
 #, c-format
 msgid ""
 "(in selecting a method for function '%s') '...' and related variables cannot "
@@ -125,7 +125,7 @@ msgstr ""
 "variables correspondantes ne peuvent  �tre utilis�s pour le dispatching des "
 "m�thodes"
 
-#: methods_list_dispatch.c:589
+#: methods_list_dispatch.c:602
 #, c-format
 msgid ""
 "(in selecting a method for function '%s') the 'environment' argument for "
@@ -135,8 +135,8 @@ msgstr ""
 "'environnement' pour le dispatching doit �tre un environnement R ; Un objet "
 "de classe \"%s\" est renvoy�"
 
-#: methods_list_dispatch.c:603 methods_list_dispatch.c:615
-#: methods_list_dispatch.c:999
+#: methods_list_dispatch.c:616 methods_list_dispatch.c:628
+#: methods_list_dispatch.c:1017
 #, c-format
 msgid ""
 "error in evaluating the argument '%s' in selecting a method for function "
@@ -145,14 +145,14 @@ msgstr ""
 "erreur d'�valuation de l'argument '%s' lors de la s�lection d'une m�thode "
 "pour la fonction '%s' : %s"
 
-#: methods_list_dispatch.c:623
+#: methods_list_dispatch.c:636
 #, c-format
 msgid "no matching method for function '%s' (argument '%s', with class \"%s\")"
 msgstr ""
 "pas de m�thode correspondante pour la fonction '%s' (argument '%s', avec la "
 "classe \"%s\")"
 
-#: methods_list_dispatch.c:630
+#: methods_list_dispatch.c:643
 #, c-format
 msgid ""
 "recursive use of function '%s' in method selection, with no default method"
@@ -160,53 +160,45 @@ msgstr ""
 "utilisation r�cursive de la fonction '%s' dans la s�lection de m�thode, avec "
 "aucune m�thode d�finie par d�faut"
 
-#: methods_list_dispatch.c:693
-msgid ""
-"in processing 'callNextMethod', found a '...' in the matched call, but no "
-"corresponding '...' argument"
-msgstr ""
-"lors du calcul de 'callNextMethod', un '...' est trouv� dans l'appel "
-"correspondant, mais aucun '...' n'est trouv� dans l'argument en question"
-
-#: methods_list_dispatch.c:706
+#: methods_list_dispatch.c:712
 #, c-format
 msgid "error in evaluating a 'primitive' next method: %s"
 msgstr ""
 "erreur lors de l'�valuation d'une 'primitive' comme m�thode suivante : %s"
 
-#: methods_list_dispatch.c:801
+#: methods_list_dispatch.c:810
 #, c-format
 msgid "'%s' must be a single string (got a character vector of length %d)"
 msgstr ""
 "'%s' doit �tre une cha�ne de caract�res unique (un vecteur de caract�res de "
 "longueur %d est renvoy�)"
 
-#: methods_list_dispatch.c:805
+#: methods_list_dispatch.c:814
 #, c-format
 msgid "'%s' must be a non-empty string; got an empty string"
 msgstr ""
 "'%s' doit �tre une cha�ne de caract�res non vide ; Une cha�ne de caract�res "
 "vide est renvoy�e"
 
-#: methods_list_dispatch.c:809
+#: methods_list_dispatch.c:818
 #, c-format
 msgid "'%s' must be a single string (got an object of class \"%s\")"
 msgstr ""
 "'%s' doit �tre une cha�ne de caract�res unique (un objet de classe \"%s\" "
 "est renvoy�)"
 
-#: methods_list_dispatch.c:880
+#: methods_list_dispatch.c:895
 msgid "class should be either a character-string name or a class definition"
 msgstr ""
 "class doit �tre soit un nom sous forme de cha�ne de caract�res, soit une "
 "d�finition de classe"
 
-#: methods_list_dispatch.c:959
+#: methods_list_dispatch.c:975
 #, c-format
 msgid "failed to get the generic for the primitive \"%s\""
 msgstr "Impossible de trouver la fonction g�n�rique pour la primitive \"%s\""
 
-#: methods_list_dispatch.c:965
+#: methods_list_dispatch.c:982
 #, c-format
 msgid ""
 "expected a generic function or a primitive for dispatch, got an object of "
@@ -216,6 +208,13 @@ msgstr ""
 "un objet de classe \"%s\" est renvoy� � la place"
 
 #~ msgid ""
+#~ "in processing 'callNextMethod', found a '...' in the matched call, but no "
+#~ "corresponding '...' argument"
+#~ msgstr ""
+#~ "lors du calcul de 'callNextMethod', un '...' est trouv� dans l'appel "
+#~ "correspondant, mais aucun '...' n'est trouv� dans l'argument en question"
+
+#~ msgid ""
 #~ "S language method selection got an error when called from internal "
 #~ "dispatch for function '%s'"
 #~ msgstr ""
diff --git a/src/library/methods/po/ja.po b/src/library/methods/po/ja.po
index 4091d7d..fbb94bb 100644
--- a/src/library/methods/po/ja.po
+++ b/src/library/methods/po/ja.po
@@ -6,14 +6,14 @@
 msgid ""
 msgstr ""
 "Project-Id-Version: R 2.5.0 \n"
-"Report-Msgid-Bugs-To: bugs.r-project.org\n"
-"POT-Creation-Date: 2013-07-20 09:38+0100\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2016-04-01 10:01-0700\n"
 "PO-Revision-Date: 2013-03-01 04:12+0200 \n"
 "Last-Translator: Triad sou  \n"
 "Language-Team: RjpWiki Message Translation Team <mokada at md.tsukuba.ac.jp> \n"
 "Language: ja \n"
 "MIME-Version: 1.0 \n"
-"Content-Type: text/plain; charset=utf-8 \n"
+"Content-Type: text/plain; charset=UTF-8 \n"
 "Content-Transfer-Encoding: 8bit \n"
 "Plural-Forms: nplurals=1; plural=0; \n"
 "X-Generator: Pootle 2.0.5 \n"
@@ -44,18 +44,18 @@ msgstr ""
 " 関数 '%s' のメソッドリストとして使われるクラス \"%s\" のオブジェクト中に "
 "\"allMethods\" スロットが見付かりませんでした "
 
-#: methods_list_dispatch.c:434
+#: methods_list_dispatch.c:443
 #, c-format
 msgid "no generic function definition found for '%s'"
 msgstr " '%s' に対する総称的関数は定義されていません "
 
-#: methods_list_dispatch.c:437
+#: methods_list_dispatch.c:446
 #, c-format
 msgid ""
 "no generic function definition found for '%s' in the supplied environment"
 msgstr " 与えられた環境中では '%s' に対する総称的関数は定義されていません "
 
-#: methods_list_dispatch.c:472
+#: methods_list_dispatch.c:481
 #, c-format
 msgid ""
 "invalid generic function object for method selection for function '%s': "
@@ -64,22 +64,22 @@ msgstr ""
 " 関数 '%s' のメソッド選択に対する不正な総称的関数オブジェクト: 関数かプリミ"
 "ティブを期待しましたが、クラス \"%s\" のオブジェクトを得ました "
 
-#: methods_list_dispatch.c:487
+#: methods_list_dispatch.c:496
 #, c-format
 msgid "no direct or inherited method for function '%s' for this call"
 msgstr ""
 " この呼び出しでは 関数 '%s' に対する直接的または継承メソッドはありません "
 
-#: methods_list_dispatch.c:513 methods_list_dispatch.c:1046
+#: methods_list_dispatch.c:526 methods_list_dispatch.c:1071
 msgid "invalid object (non-function) used as method"
 msgstr " (関数ではない) 不正なオブジェクトがメソッドとして使われました "
 
-#: methods_list_dispatch.c:534
+#: methods_list_dispatch.c:547
 #, c-format
 msgid "could not find symbol '%s' in frame of call"
 msgstr " 呼び出しのフレーム中ではシンボル '%s' を見付けられませんでした "
 
-#: methods_list_dispatch.c:542
+#: methods_list_dispatch.c:555
 #, c-format
 msgid ""
 "invalid symbol in checking for missing argument in method dispatch: expected "
@@ -88,11 +88,11 @@ msgstr ""
 " メソッド割り当て時、欠損引数のチェックで不正なシンボルがありました: 名前を期"
 "待しましたがクラス \"%s\" のオブジェクトでした "
 
-#: methods_list_dispatch.c:545
+#: methods_list_dispatch.c:558
 msgid "use of NULL environment is defunct"
 msgstr " NULL 環境の使用は廃止予定です "
 
-#: methods_list_dispatch.c:549
+#: methods_list_dispatch.c:562
 #, c-format
 msgid ""
 "invalid environment in checking for missing argument, '%s', in methods "
@@ -101,7 +101,7 @@ msgstr ""
 " メソッド割り当て時、欠損引数 '%s' に対するチェックで不正な環境がありました: "
 "クラス \"%s\" のオブジェクトでした "
 
-#: methods_list_dispatch.c:575
+#: methods_list_dispatch.c:588
 #, c-format
 msgid ""
 "object of class \"%s\" used as methods list for function '%s' ( no "
@@ -110,7 +110,7 @@ msgstr ""
 " クラス \"%s\" のオブジェクトが関数 '%s' のメソッドリストととして使われまし"
 "た ('argument' スロットがありません) "
 
-#: methods_list_dispatch.c:586
+#: methods_list_dispatch.c:599
 #, c-format
 msgid ""
 "(in selecting a method for function '%s') '...' and related variables cannot "
@@ -119,7 +119,7 @@ msgstr ""
 " (関数 '%s' に対するメソッドの選択時) '...' と関連する変数はメソッド割り当て"
 "には使えません "
 
-#: methods_list_dispatch.c:589
+#: methods_list_dispatch.c:602
 #, c-format
 msgid ""
 "(in selecting a method for function '%s') the 'environment' argument for "
@@ -128,8 +128,8 @@ msgstr ""
 " (関数 '%s' に対するメソッドの選択時) 割り当て用の 'environment' 引数は R 環"
 "境でなければなりません; クラス \"%s\" のオブジェクトでした "
 
-#: methods_list_dispatch.c:603 methods_list_dispatch.c:615
-#: methods_list_dispatch.c:999
+#: methods_list_dispatch.c:616 methods_list_dispatch.c:628
+#: methods_list_dispatch.c:1017
 #, c-format
 msgid ""
 "error in evaluating the argument '%s' in selecting a method for function "
@@ -138,60 +138,52 @@ msgstr ""
 " 引数 '%s' の評価中にエラーが起きました (関数 '%s' に対するメソッドの選択"
 "時): %s "
 
-#: methods_list_dispatch.c:623
+#: methods_list_dispatch.c:636
 #, c-format
 msgid "no matching method for function '%s' (argument '%s', with class \"%s\")"
 msgstr ""
 " 関数 '%s' に対するマッチするメソッド (引数 '%s' でクラス \"%s\" を持つ) はあ"
 "りませんでした "
 
-#: methods_list_dispatch.c:630
+#: methods_list_dispatch.c:643
 #, c-format
 msgid ""
 "recursive use of function '%s' in method selection, with no default method"
 msgstr " 既定メソッド無しの、メソッド選択時の関数 '%s' の再帰的使用です "
 
-#: methods_list_dispatch.c:693
-msgid ""
-"in processing 'callNextMethod', found a '...' in the matched call, but no "
-"corresponding '...' argument"
-msgstr ""
-" 'callNextMethod' の処理中、マッチする呼び出し中に '...' がありますが、対応す"
-"る '...' 引数がありません "
-
-#: methods_list_dispatch.c:706
+#: methods_list_dispatch.c:712
 #, c-format
 msgid "error in evaluating a 'primitive' next method: %s"
 msgstr " 'primitive' なメソッド %s の評価中にエラーが起きました "
 
-#: methods_list_dispatch.c:801
+#: methods_list_dispatch.c:810
 #, c-format
 msgid "'%s' must be a single string (got a character vector of length %d)"
 msgstr ""
 " '%s' は単一の文字列でなければなりません(長さ %d の文字ベクトルでした) "
 
-#: methods_list_dispatch.c:805
+#: methods_list_dispatch.c:814
 #, c-format
 msgid "'%s' must be a non-empty string; got an empty string"
 msgstr " '%s' は空でない文字列でなければなりません; 空の文字列でした "
 
-#: methods_list_dispatch.c:809
+#: methods_list_dispatch.c:818
 #, c-format
 msgid "'%s' must be a single string (got an object of class \"%s\")"
 msgstr ""
 " '%s' は単一の文字列でなければなりません (クラス \"%s\" のオブジェクトでし"
 "た) "
 
-#: methods_list_dispatch.c:880
+#: methods_list_dispatch.c:895
 msgid "class should be either a character-string name or a class definition"
 msgstr " クラスは文字列の名前かクラス定義のどちらかでなければなりません "
 
-#: methods_list_dispatch.c:959
+#: methods_list_dispatch.c:975
 #, c-format
 msgid "failed to get the generic for the primitive \"%s\""
 msgstr " プリミティブな \"%s\" に対する総称 (generic) を得るのに失敗しました "
 
-#: methods_list_dispatch.c:965
+#: methods_list_dispatch.c:982
 #, c-format
 msgid ""
 "expected a generic function or a primitive for dispatch, got an object of "
@@ -201,6 +193,13 @@ msgstr ""
 "られたのはクラス \"%s\" のオブジェクトでした "
 
 #~ msgid ""
+#~ "in processing 'callNextMethod', found a '...' in the matched call, but no "
+#~ "corresponding '...' argument"
+#~ msgstr ""
+#~ " 'callNextMethod' の処理中、マッチする呼び出し中に '...' がありますが、対"
+#~ "応する '...' 引数がありません "
+
+#~ msgid ""
 #~ "S language method selection got an error when called from internal "
 #~ "dispatch for function '%s'"
 #~ msgstr ""
diff --git a/src/library/methods/po/ko.po b/src/library/methods/po/ko.po
index 7805880..5399020 100644
--- a/src/library/methods/po/ko.po
+++ b/src/library/methods/po/ko.po
@@ -1,24 +1,31 @@
 # Korean translation for R methods package
-# src/library/methods/po/ko.po
-# Copyright (C) 1995-2014 The R Core Team
+# ./methods/po/ko.po
+#
+# Copyright (C) 1995-2016 The R Core Team
+#
 # This file is distributed under the same license as the R methods package.
-# Chel Hee Lee <chl948 at mail.usask.ca>, 2008-2014.
+# Maintained by Chel Hee Lee <chl948 at mail.usask.ca>, 2008-2016.
+# Contact: Chel Hee Lee <gnustats at gmail.com>
+#
+# Notes:
+# Under development (unstable) starting from 11-APR-2016 for R-3.3.1 - QC: in progress
+# Freezed on 10-APR-2016 for R-3.3.0 - QC: PASS
+# Freezed on 30-MAR-2015 for R-3.2.0 - QC: PASS
+# Freezed on 06-FEB-2015 for R-3.1.3 - QC: PASS
 #
 msgid ""
 msgstr ""
-"Project-Id-Version: R 3.1.0\n"
+"Project-Id-Version: R-3.3.0\n"
 "Report-Msgid-Bugs-To: bugs.r-project.org\n"
-"POT-Creation-Date: 2013-07-20 09:38+0100\n"
-"PO-Revision-Date: 2014-03-27 09:07-0600\n"
+"POT-Creation-Date: 2016-04-01 10:01-0700\n"
+"PO-Revision-Date: 2016-04-11 13:08-0600\n"
 "Last-Translator: Chel Hee Lee <chl948 at mail.usask.ca>\n"
-"Language-Team:  <chl948 at mail.usask.ca>\n"
+"Language-Team: Chel Hee Lee <chl948 at mail.usask.ca>\n"
 "Language: ko\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
 "Plural-Forms: nplurals=1; plural=0;\n"
-"X-Poedit-SourceCharset: UTF-8\n"
-"X-Generator: Poedit 1.5.4\n"
 
 #: class_support.c:32
 msgid "calling the C routine used as an initializer for 'externalptr' objects"
@@ -45,18 +52,18 @@ msgstr ""
 "함수 '%2$s'에 대한 메소드 목록으로서 사용될 클래스 \"%1$s\"의 객체 내에서 "
 "\"allMethods\" 슬롯을 찾을 수 없습니다"
 
-#: methods_list_dispatch.c:434
+#: methods_list_dispatch.c:443
 #, c-format
 msgid "no generic function definition found for '%s'"
 msgstr "'%s'을 위한 제네릭 함수정의를 찾을 수 없습니다"
 
-#: methods_list_dispatch.c:437
+#: methods_list_dispatch.c:446
 #, c-format
 msgid ""
 "no generic function definition found for '%s' in the supplied environment"
 msgstr "주어진 environment에서 '%s'를 위한 제네릭 함수정의를 찾을 수 없습니다"
 
-#: methods_list_dispatch.c:472
+#: methods_list_dispatch.c:481
 #, c-format
 msgid ""
 "invalid generic function object for method selection for function '%s': "
@@ -65,21 +72,21 @@ msgstr ""
 "함수 '%1$s'를 위한 메소드선택에 유효하지 않은 제네릭 함수객체입니다:  함수 또"
 "는 프리미티브가 와야하는데 클래스 \"%2$s\"의 객체를 얻었습니다"
 
-#: methods_list_dispatch.c:487
+#: methods_list_dispatch.c:496
 #, c-format
 msgid "no direct or inherited method for function '%s' for this call"
 msgstr "이 호출을 위해 함수 '%s'에 대한 직접적 또는 상속적인 메소드가 없습니다"
 
-#: methods_list_dispatch.c:513 methods_list_dispatch.c:1046
+#: methods_list_dispatch.c:526 methods_list_dispatch.c:1071
 msgid "invalid object (non-function) used as method"
 msgstr "메소드로서 사용된 유효하지 않은 객체입니다"
 
-#: methods_list_dispatch.c:534
+#: methods_list_dispatch.c:547
 #, c-format
 msgid "could not find symbol '%s' in frame of call"
 msgstr "호출 프레임에서 심볼 '%s'를 찾을 수 없었습니다"
 
-#: methods_list_dispatch.c:542
+#: methods_list_dispatch.c:555
 #, c-format
 msgid ""
 "invalid symbol in checking for missing argument in method dispatch: expected "
@@ -88,11 +95,11 @@ msgstr ""
 "메소드 디스패치에서 누락된 인자를 확인하는데 유효하지 않은 심볼입니다:  이름"
 "이 와야하는데 클래스 \"%s\"의 객체를 얻었습니다"
 
-#: methods_list_dispatch.c:545
+#: methods_list_dispatch.c:558
 msgid "use of NULL environment is defunct"
 msgstr "NULL environment의 사용은 더이상 지원되지 않습니다"
 
-#: methods_list_dispatch.c:549
+#: methods_list_dispatch.c:562
 #, c-format
 msgid ""
 "invalid environment in checking for missing argument, '%s', in methods "
@@ -101,7 +108,7 @@ msgstr ""
 "메소드 디스패치에 누락된 인자 '%1$s'를 확인하는데 유효하지 않은 environment인"
 "데, 클래스 \"%2$s\"의 객체를 얻었습니다"
 
-#: methods_list_dispatch.c:575
+#: methods_list_dispatch.c:588
 #, c-format
 msgid ""
 "object of class \"%s\" used as methods list for function '%s' ( no "
@@ -110,7 +117,7 @@ msgstr ""
 "함수 '%2$s'를 위한 메소드 목록으로서 사용된 클래스 \"%1$s\"의 객체입니다 "
 "('argument' 슬롯이 없습니다)"
 
-#: methods_list_dispatch.c:586
+#: methods_list_dispatch.c:599
 #, c-format
 msgid ""
 "(in selecting a method for function '%s') '...' and related variables cannot "
@@ -119,7 +126,7 @@ msgstr ""
 "(함수 '%s'를 위한 메소드를 선택을 할 때) '...'와 관계가 있는 변수들은 메소드 "
 "디스패치에 사용될 수 없습니다"
 
-#: methods_list_dispatch.c:589
+#: methods_list_dispatch.c:602
 #, c-format
 msgid ""
 "(in selecting a method for function '%s') the 'environment' argument for "
@@ -128,8 +135,8 @@ msgstr ""
 "(함수 '%1$s'를 위한 메소드를 선택할 때) 디스패치를 위한 'environment' 인자는 "
 "반드시 R environment이어야 하는데, 클래스 \"%2$s\"를 얻습니다"
 
-#: methods_list_dispatch.c:603 methods_list_dispatch.c:615
-#: methods_list_dispatch.c:999
+#: methods_list_dispatch.c:616 methods_list_dispatch.c:628
+#: methods_list_dispatch.c:1017
 #, c-format
 msgid ""
 "error in evaluating the argument '%s' in selecting a method for function "
@@ -138,59 +145,51 @@ msgstr ""
 "함수 '%2$s'를 위한 메소드 선택시 인수 '%1$s'를 평가하는데 오류가 발생했습니"
 "다: %3$s"
 
-#: methods_list_dispatch.c:623
+#: methods_list_dispatch.c:636
 #, c-format
 msgid "no matching method for function '%s' (argument '%s', with class \"%s\")"
 msgstr ""
 "함수 '%1$s'에 일치하는 메소드가 없습니다 (클래스 \"%3$s\"을 가지는 인자 "
 "'%2$s')"
 
-#: methods_list_dispatch.c:630
+#: methods_list_dispatch.c:643
 #, c-format
 msgid ""
 "recursive use of function '%s' in method selection, with no default method"
 msgstr "메소드 선택시 기본 메소드가 없는 함수 '%s'의 재귀적 사용입니다"
 
-#: methods_list_dispatch.c:693
-msgid ""
-"in processing 'callNextMethod', found a '...' in the matched call, but no "
-"corresponding '...' argument"
-msgstr ""
-"'callNextMethod'를 처리중, 일치하는 호출에서 '...'를 찾았지만, 상응하느느 "
-"'...' 인자는 없었습니다"
-
-#: methods_list_dispatch.c:706
+#: methods_list_dispatch.c:712
 #, c-format
 msgid "error in evaluating a 'primitive' next method: %s"
 msgstr "'primitive' 다음 메소드를 평가하는 중에 에러가 발생했습니다:%s"
 
-#: methods_list_dispatch.c:801
+#: methods_list_dispatch.c:810
 #, c-format
 msgid "'%s' must be a single string (got a character vector of length %d)"
 msgstr ""
 "'%s'는 반드시 단일 문자열이어야 합니다 (길이가 %d인 문자형 벡터를 얻습니다)"
 
-#: methods_list_dispatch.c:805
+#: methods_list_dispatch.c:814
 #, c-format
 msgid "'%s' must be a non-empty string; got an empty string"
 msgstr "'%s'는 반드시 빈 문자열이어야 하는데, 빈 문자열을 얻었습니다"
 
-#: methods_list_dispatch.c:809
+#: methods_list_dispatch.c:818
 #, c-format
 msgid "'%s' must be a single string (got an object of class \"%s\")"
 msgstr ""
 "'%s'는 반드시 단일 문자열이어야 합니다 (클래스 \"%s\"의 객체를 얻었습니다)"
 
-#: methods_list_dispatch.c:880
+#: methods_list_dispatch.c:895
 msgid "class should be either a character-string name or a class definition"
 msgstr "클래스는 문자열 이름 또는 클래스 정의 중 하나 이어야 합니다"
 
-#: methods_list_dispatch.c:959
+#: methods_list_dispatch.c:975
 #, c-format
 msgid "failed to get the generic for the primitive \"%s\""
 msgstr "프리미티브 \"%s\"를 위한 제네릭을 얻는데 실패했습니다"
 
-#: methods_list_dispatch.c:965
+#: methods_list_dispatch.c:982
 #, c-format
 msgid ""
 "expected a generic function or a primitive for dispatch, got an object of "
@@ -198,3 +197,10 @@ msgid ""
 msgstr ""
 "제네릭 함수 또는 디스패치를 위한 프리미티브가 와야 하는데, 클래스 \"%s\"의 객"
 "체를 얻었습니다"
+
+#~ msgid ""
+#~ "in processing 'callNextMethod', found a '...' in the matched call, but no "
+#~ "corresponding '...' argument"
+#~ msgstr ""
+#~ "'callNextMethod'를 처리중, 일치하는 호출에서 '...'를 찾았지만, 상응하느느 "
+#~ "'...' 인자는 없었습니다"
diff --git a/src/library/methods/po/methods.pot b/src/library/methods/po/methods.pot
index 5b4a836..82e2725 100644
--- a/src/library/methods/po/methods.pot
+++ b/src/library/methods/po/methods.pot
@@ -1,14 +1,14 @@
 # SOME DESCRIPTIVE TITLE.
-# Copyright (C) YEAR The R Core Team
+# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
 # This file is distributed under the same license as the PACKAGE package.
 # FIRST AUTHOR <EMAIL at ADDRESS>, YEAR.
 #
 #, fuzzy
 msgid ""
 msgstr ""
-"Project-Id-Version: R 3.1.0\n"
-"Report-Msgid-Bugs-To: bugs.r-project.org\n"
-"POT-Creation-Date: 2013-07-20 09:38+0100\n"
+"Project-Id-Version: methods 3.4.0\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2016-04-01 10:01-0700\n"
 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
 "Last-Translator: FULL NAME <EMAIL at ADDRESS>\n"
 "Language-Team: LANGUAGE <LL at li.org>\n"
@@ -38,132 +38,126 @@ msgid ""
 "for function '%s'"
 msgstr ""
 
-#: methods_list_dispatch.c:434
+#: methods_list_dispatch.c:443
 #, c-format
 msgid "no generic function definition found for '%s'"
 msgstr ""
 
-#: methods_list_dispatch.c:437
+#: methods_list_dispatch.c:446
 #, c-format
 msgid ""
 "no generic function definition found for '%s' in the supplied environment"
 msgstr ""
 
-#: methods_list_dispatch.c:472
+#: methods_list_dispatch.c:481
 #, c-format
 msgid ""
 "invalid generic function object for method selection for function '%s': "
 "expected a function or a primitive, got an object of class \"%s\""
 msgstr ""
 
-#: methods_list_dispatch.c:487
+#: methods_list_dispatch.c:496
 #, c-format
 msgid "no direct or inherited method for function '%s' for this call"
 msgstr ""
 
-#: methods_list_dispatch.c:513 methods_list_dispatch.c:1046
+#: methods_list_dispatch.c:526 methods_list_dispatch.c:1071
 msgid "invalid object (non-function) used as method"
 msgstr ""
 
-#: methods_list_dispatch.c:534
+#: methods_list_dispatch.c:547
 #, c-format
 msgid "could not find symbol '%s' in frame of call"
 msgstr ""
 
-#: methods_list_dispatch.c:542
+#: methods_list_dispatch.c:555
 #, c-format
 msgid ""
 "invalid symbol in checking for missing argument in method dispatch: expected "
 "a name, got an object of class \"%s\""
 msgstr ""
 
-#: methods_list_dispatch.c:545
+#: methods_list_dispatch.c:558
 msgid "use of NULL environment is defunct"
 msgstr ""
 
-#: methods_list_dispatch.c:549
+#: methods_list_dispatch.c:562
 #, c-format
 msgid ""
 "invalid environment in checking for missing argument, '%s', in methods "
 "dispatch: got an object of class \"%s\""
 msgstr ""
 
-#: methods_list_dispatch.c:575
+#: methods_list_dispatch.c:588
 #, c-format
 msgid ""
 "object of class \"%s\" used as methods list for function '%s' ( no "
 "'argument' slot)"
 msgstr ""
 
-#: methods_list_dispatch.c:586
+#: methods_list_dispatch.c:599
 #, c-format
 msgid ""
 "(in selecting a method for function '%s') '...' and related variables cannot "
 "be used for methods dispatch"
 msgstr ""
 
-#: methods_list_dispatch.c:589
+#: methods_list_dispatch.c:602
 #, c-format
 msgid ""
 "(in selecting a method for function '%s') the 'environment' argument for "
 "dispatch must be an R environment; got an object of class \"%s\""
 msgstr ""
 
-#: methods_list_dispatch.c:603 methods_list_dispatch.c:615
-#: methods_list_dispatch.c:999
+#: methods_list_dispatch.c:616 methods_list_dispatch.c:628
+#: methods_list_dispatch.c:1017
 #, c-format
 msgid ""
 "error in evaluating the argument '%s' in selecting a method for function "
 "'%s': %s"
 msgstr ""
 
-#: methods_list_dispatch.c:623
+#: methods_list_dispatch.c:636
 #, c-format
 msgid "no matching method for function '%s' (argument '%s', with class \"%s\")"
 msgstr ""
 
-#: methods_list_dispatch.c:630
+#: methods_list_dispatch.c:643
 #, c-format
 msgid ""
 "recursive use of function '%s' in method selection, with no default method"
 msgstr ""
 
-#: methods_list_dispatch.c:693
-msgid ""
-"in processing 'callNextMethod', found a '...' in the matched call, but no "
-"corresponding '...' argument"
-msgstr ""
-
-#: methods_list_dispatch.c:706
+#: methods_list_dispatch.c:712
 #, c-format
 msgid "error in evaluating a 'primitive' next method: %s"
 msgstr ""
 
-#: methods_list_dispatch.c:801
+#: methods_list_dispatch.c:810
 #, c-format
 msgid "'%s' must be a single string (got a character vector of length %d)"
 msgstr ""
 
-#: methods_list_dispatch.c:805
+#: methods_list_dispatch.c:814
 #, c-format
 msgid "'%s' must be a non-empty string; got an empty string"
 msgstr ""
 
-#: methods_list_dispatch.c:809
+#: methods_list_dispatch.c:818
 #, c-format
 msgid "'%s' must be a single string (got an object of class \"%s\")"
 msgstr ""
 
-#: methods_list_dispatch.c:880
+#: methods_list_dispatch.c:895
 msgid "class should be either a character-string name or a class definition"
 msgstr ""
 
-#: methods_list_dispatch.c:959
+#: methods_list_dispatch.c:975
 #, c-format
 msgid "failed to get the generic for the primitive \"%s\""
 msgstr ""
 
-#: methods_list_dispatch.c:965
+#: methods_list_dispatch.c:982
 #, c-format
 msgid ""
 "expected a generic function or a primitive for dispatch, got an object of "
diff --git a/src/library/methods/po/pl.po b/src/library/methods/po/pl.po
index 4cbe239..8067f84 100644
--- a/src/library/methods/po/pl.po
+++ b/src/library/methods/po/pl.po
@@ -1,8 +1,8 @@
 msgid ""
 msgstr ""
-"Project-Id-Version: R 3.1.0\n"
-"Report-Msgid-Bugs-To: bugs.r-project.org\n"
-"POT-Creation-Date: 2013-07-20 09:38+0100\n"
+"Project-Id-Version: R 3.4.0\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2016-04-01 10:01-0700\n"
 "PO-Revision-Date: \n"
 "Last-Translator: Łukasz Daniel <lukasz.daniel at gmail.com>\n"
 "Language-Team: Łukasz Daniel <lukasz.daniel at gmail.com>\n"
@@ -13,24 +13,18 @@ msgstr ""
 "na-Revision-Date: 2012-05-29 07:55+0100\n"
 "Plural-Forms: nplurals=3; plural=(n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 "
 "|| n%100>=20) ? 1 : 2);\n"
-"X-Poedit-SourceCharset: iso-8859-1\n"
-"X-Generator: Poedit 1.5.4\n"
+"X-Poedit-SourceCharset: UTF-8\n"
+"X-Generator: Poedit 1.8.7\n"
 
-# methods/src/class_support.c: 32
-# error(_("calling the C routine used as an initializer for 'externalptr' objects"))
 #: class_support.c:32
 msgid "calling the C routine used as an initializer for 'externalptr' objects"
 msgstr ""
 "wywołanie procedury C użyte jako inicjalizator dla obiektów 'externalptr'"
 
-# methods/src/do_substitute_direct.c: 41
-# error(_("invalid list for substitution"))
 #: do_substitute_direct.c:41
 msgid "invalid list for substitution"
 msgstr "niepoprawna lista do podmiany"
 
-# methods/src/methods_list_dispatch.c: 149
-# error(_("could not find the skeleton calls for 'methods' (package detached?): expect very bad things to happen"))
 #: methods_list_dispatch.c:149
 msgid ""
 "could not find the skeleton calls for 'methods' (package detached?): expect "
@@ -39,9 +33,6 @@ msgstr ""
 "nie można znaleźć głównych wywołań dla 'methods' (odłączony pakiet?): "
 "oczekuj pojawienia się bardzo złych rzeczy"
 
-# methods/src/methods_list_dispatch.c: 215
-# error(_("no \"allMethods\" slot found in object of class \"%s\" used as methods list for function '%s'"),
-# 	      class_string(mlist), CHAR(asChar(fname)))
 #: methods_list_dispatch.c:215
 #, c-format
 msgid ""
@@ -51,28 +42,19 @@ msgstr ""
 "nie znaleziono gniazd 'allMethods' w obiekcie klasy \"%s\" użytej jako listy "
 "metod dla funkcji '%s'"
 
-# methods/src/methods_list_dispatch.c: 434
-# error(_("no generic function definition found for '%s'"),
-# 		  CHAR(asChar(name)))
-#: methods_list_dispatch.c:434
+#: methods_list_dispatch.c:443
 #, c-format
 msgid "no generic function definition found for '%s'"
 msgstr "nie znaleziono definicji ogólnej funkcji dla '%s'"
 
-# methods/src/methods_list_dispatch.c: 437
-# error(_("no generic function definition found for '%s' in the supplied environment"),
-# 		  CHAR(asChar(name)))
-#: methods_list_dispatch.c:437
+#: methods_list_dispatch.c:446
 #, c-format
 msgid ""
 "no generic function definition found for '%s' in the supplied environment"
 msgstr ""
 "nie znaleziono definicji ogólnej funkcji dla '%s' w dostarczonym środowisku"
 
-# methods/src/methods_list_dispatch.c: 472
-# error(_("invalid generic function object for method selection for function '%s': expected a function or a primitive, got an object of class \"%s\""),
-# 		   CHAR(asChar(fsym)), class_string(fdef))
-#: methods_list_dispatch.c:472
+#: methods_list_dispatch.c:481
 #, c-format
 msgid ""
 "invalid generic function object for method selection for function '%s': "
@@ -81,36 +63,23 @@ msgstr ""
 "niepoprawny obiekt ogólnej funkcji dla wyboru metody dla funkcji '%s': "
 "oczekiwano funkcji lub typu prymitywnego, otrzymano obiekt klasy '%s'"
 
-# methods/src/methods_list_dispatch.c: 487
-# error(_("no direct or inherited method for function '%s' for this call"),
-# 		  CHAR(asChar(fname)))
-#: methods_list_dispatch.c:487
+#: methods_list_dispatch.c:496
 #, c-format
 msgid "no direct or inherited method for function '%s' for this call"
 msgstr ""
 "Brak bezpośredniej lub dziedziczonej metody dla funkcji '%s' dla tego "
 "wywołania"
 
-# methods/src/methods_list_dispatch.c: 513
-# error(_("invalid object (non-function) used as method"))
-# methods/src/methods_list_dispatch.c: 1046
-# error(_("invalid object (non-function) used as method"))
-#: methods_list_dispatch.c:513 methods_list_dispatch.c:1046
+#: methods_list_dispatch.c:526 methods_list_dispatch.c:1071
 msgid "invalid object (non-function) used as method"
 msgstr "niepoprawny obiekt (nie-funkcja) użyty jako metoda"
 
-# methods/src/methods_list_dispatch.c: 534
-# error(_("could not find symbol '%s' in frame of call"),
-# 	      CHAR(PRINTNAME(symbol)))
-#: methods_list_dispatch.c:534
+#: methods_list_dispatch.c:547
 #, c-format
 msgid "could not find symbol '%s' in frame of call"
 msgstr "nie można było znaleźć symbolu '%s' w strukturze wywołania"
 
-# methods/src/methods_list_dispatch.c: 542
-# error(_("invalid symbol in checking for missing argument in method dispatch: expected a name, got an object of class \"%s\""),
-# 	     class_string(symbol))
-#: methods_list_dispatch.c:542
+#: methods_list_dispatch.c:555
 #, c-format
 msgid ""
 "invalid symbol in checking for missing argument in method dispatch: expected "
@@ -119,16 +88,11 @@ msgstr ""
 "niepoprawny symbol w sprawdzaniu brakującego argumentu w wysyłaniu metody: "
 "oczekiwano nazwy, otrzymano obiekt klasy '%s'"
 
-# methods/src/methods_list_dispatch.c: 545
-# error(_("use of NULL environment is defunct"))
-#: methods_list_dispatch.c:545
+#: methods_list_dispatch.c:558
 msgid "use of NULL environment is defunct"
 msgstr "użycie środowiska NULL jest przestarzałe"
 
-# methods/src/methods_list_dispatch.c: 549
-# error(_("invalid environment in checking for missing argument, '%s', in methods dispatch: got an object of class \"%s\""),
-# 	     CHAR(PRINTNAME(symbol)), class_string(ev))
-#: methods_list_dispatch.c:549
+#: methods_list_dispatch.c:562
 #, c-format
 msgid ""
 "invalid environment in checking for missing argument, '%s', in methods "
@@ -137,10 +101,7 @@ msgstr ""
 "niepoprawne środowisko w sprawdzaniu brakującego argumentu '%s' w wysyłaniu "
 "metod: otrzymano obiekt klasy '%s'"
 
-# methods/src/methods_list_dispatch.c: 575
-# error(_("object of class \"%s\" used as methods list for function '%s' ( no 'argument' slot)"),
-# 	      class_string(mlist), CHAR(asChar(fname)))
-#: methods_list_dispatch.c:575
+#: methods_list_dispatch.c:588
 #, c-format
 msgid ""
 "object of class \"%s\" used as methods list for function '%s' ( no "
@@ -149,10 +110,7 @@ msgstr ""
 "obiekt klasy '%s' został użyty jako lista metod dla funkcji '%s' ( brak "
 "gniazda 'argument')"
 
-# methods/src/methods_list_dispatch.c: 586
-# error(_("(in selecting a method for function '%s') '...' and related variables cannot be used for methods dispatch"),
-# 	      CHAR(asChar(fname)))
-#: methods_list_dispatch.c:586
+#: methods_list_dispatch.c:599
 #, c-format
 msgid ""
 "(in selecting a method for function '%s') '...' and related variables cannot "
@@ -161,10 +119,7 @@ msgstr ""
 "(przy wybieraniu metody dla funkcji '%s') '...' oraz powiązane zmienne nie "
 "mogą być użyte dla wysyłania metod"
 
-# methods/src/methods_list_dispatch.c: 589
-# error(_("(in selecting a method for function '%s') the 'environment' argument for dispatch must be an R environment; got an object of class \"%s\""),
-# 	    CHAR(asChar(fname)), class_string(ev))
-#: methods_list_dispatch.c:589
+#: methods_list_dispatch.c:602
 #, c-format
 msgid ""
 "(in selecting a method for function '%s') the 'environment' argument for "
@@ -173,20 +128,8 @@ msgstr ""
 "(przy wybieraniu metody dla funkcji '%s') argument 'environment' dla "
 "wysyłania musi być środowiskiem R; otrzymano obiekt klasy '%s'"
 
-# methods/src/methods_list_dispatch.c: 603
-# error(_("error in evaluating the argument '%s' in selecting a method for function '%s': %s"),
-# 		      CHAR(PRINTNAME(arg_sym)),CHAR(asChar(fname)),
-# 		      R_curErrorBuf())
-# methods/src/methods_list_dispatch.c: 615
-# error(_("error in evaluating the argument '%s' in selecting a method for function '%s': %s"),
-# 		  CHAR(PRINTNAME(arg_sym)),CHAR(asChar(fname)),
-# 		  R_curErrorBuf())
-# methods/src/methods_list_dispatch.c: 999
-# error(_("error in evaluating the argument '%s' in selecting a method for function '%s': %s"),
-# 		      CHAR(PRINTNAME(arg_sym)),CHAR(asChar(fname)),
-# 		      R_curErrorBuf())
-#: methods_list_dispatch.c:603 methods_list_dispatch.c:615
-#: methods_list_dispatch.c:999
+#: methods_list_dispatch.c:616 methods_list_dispatch.c:628
+#: methods_list_dispatch.c:1017
 #, c-format
 msgid ""
 "error in evaluating the argument '%s' in selecting a method for function "
@@ -195,18 +138,12 @@ msgstr ""
 "błąd podczas obliczania argumentu '%s' przy wybieraniu metody dla funkcji "
 "'%s': %s"
 
-# methods/src/methods_list_dispatch.c: 623
-# error(_("no matching method for function '%s' (argument '%s', with class \"%s\")"),
-# 	      EncodeChar(asChar(fname)), EncodeChar(PRINTNAME(arg_sym)), class)
-#: methods_list_dispatch.c:623
+#: methods_list_dispatch.c:636
 #, c-format
 msgid "no matching method for function '%s' (argument '%s', with class \"%s\")"
 msgstr "brak pasującej metody dla funkcji '%s' (argument '%s', z klasą '%s')"
 
-# methods/src/methods_list_dispatch.c: 630
-# error(_("recursive use of function '%s' in method selection, with no default method"),
-# 		  CHAR(asChar(fname)))
-#: methods_list_dispatch.c:630
+#: methods_list_dispatch.c:643
 #, c-format
 msgid ""
 "recursive use of function '%s' in method selection, with no default method"
@@ -214,66 +151,37 @@ msgstr ""
 "rekursywne użycie funkcji '%s' w wyborze metody, z brakiem określonej metody "
 "domyślnej"
 
-# methods/src/methods_list_dispatch.c: 693
-# error(_("in processing 'callNextMethod', found a '...' in the matched call, but no corresponding '...' argument"))
-#: methods_list_dispatch.c:693
-msgid ""
-"in processing 'callNextMethod', found a '...' in the matched call, but no "
-"corresponding '...' argument"
-msgstr ""
-"przy przetwarzaniu 'callNextMethod', znaleziono '...' w dopasowanym "
-"wywołaniu, ale nie ma odpowiedniego argumentu '...'"
-
-# methods/src/methods_list_dispatch.c: 706
-# error(_("error in evaluating a 'primitive' next method: %s"),
-# 		     R_curErrorBuf())
-#: methods_list_dispatch.c:706
+#: methods_list_dispatch.c:712
 #, c-format
 msgid "error in evaluating a 'primitive' next method: %s"
 msgstr "błąd w trakcie obliczania 'primitive' następnej metody: %s"
 
-# methods/src/methods_list_dispatch.c: 801
-# error(_("'%s' must be a single string (got a character vector of length %d)"),
-# 		  what, length(obj))
-#: methods_list_dispatch.c:801
+#: methods_list_dispatch.c:810
 #, c-format
 msgid "'%s' must be a single string (got a character vector of length %d)"
 msgstr ""
 "'%s' musi być pojedynczym łańcuchem (otrzymano wektor tekstowy o długości %d)"
 
-# methods/src/methods_list_dispatch.c: 805
-# error(_("'%s' must be a non-empty string; got an empty string"),
-# 		  what)
-#: methods_list_dispatch.c:805
+#: methods_list_dispatch.c:814
 #, c-format
 msgid "'%s' must be a non-empty string; got an empty string"
 msgstr "'%s' musi być niepustym łańcuchem; otrzymano pusty łańcuch"
 
-# methods/src/methods_list_dispatch.c: 809
-# error(_("'%s' must be a single string (got an object of class \"%s\")"),
-# 	      what, class_string(obj))
-#: methods_list_dispatch.c:809
+#: methods_list_dispatch.c:818
 #, c-format
 msgid "'%s' must be a single string (got an object of class \"%s\")"
 msgstr "'%s' musi być pojedynczym łańcuchem (otrzymano obiekt klasy '%s')"
 
-# methods/src/methods_list_dispatch.c: 880
-# error(_("class should be either a character-string name or a class definition"))
-#: methods_list_dispatch.c:880
+#: methods_list_dispatch.c:895
 msgid "class should be either a character-string name or a class definition"
 msgstr "klasa powinna być albo nazwą tekstową albo definicją klasy"
 
-# methods/src/methods_list_dispatch.c: 959
-# error(_("failed to get the generic for the primitive \"%s\""), CHAR(asChar(fname)))
-#: methods_list_dispatch.c:959
+#: methods_list_dispatch.c:975
 #, c-format
 msgid "failed to get the generic for the primitive \"%s\""
 msgstr "nie udało się uzyskać ogólnej funkcji dla typu prymitywnego \"%s\""
 
-# methods/src/methods_list_dispatch.c: 965
-# error(_("expected a generic function or a primitive for dispatch, got an object of class \"%s\""),
-# 	      class_string(fdef))
-#: methods_list_dispatch.c:965
+#: methods_list_dispatch.c:982
 #, c-format
 msgid ""
 "expected a generic function or a primitive for dispatch, got an object of "
@@ -281,3 +189,10 @@ msgid ""
 msgstr ""
 "oczekiwano ogólnej funkcji lub typu prymitywnego dla wysyłania, otrzymano "
 "obiekt klasy \"%s\""
+
+#~ msgid ""
+#~ "in processing 'callNextMethod', found a '...' in the matched call, but no "
+#~ "corresponding '...' argument"
+#~ msgstr ""
+#~ "przy przetwarzaniu 'callNextMethod', znaleziono '...' w dopasowanym "
+#~ "wywołaniu, ale nie ma odpowiedniego argumentu '...'"
diff --git a/src/library/methods/po/pt_BR.po b/src/library/methods/po/pt_BR.po
index a731ca2..763f1e3 100644
--- a/src/library/methods/po/pt_BR.po
+++ b/src/library/methods/po/pt_BR.po
@@ -5,8 +5,8 @@
 msgid ""
 msgstr ""
 "Project-Id-Version: R 2.2.0\n"
-"Report-Msgid-Bugs-To: bugs.r-project.org\n"
-"POT-Creation-Date: 2013-07-20 09:38+0100\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2016-04-01 10:01-0700\n"
 "PO-Revision-Date: 2011-03-26 08:54-0300\n"
 "Last-Translator: Fernando Henrique <pessoal at fernandohrosa.com.br>\n"
 "Language-Team: http://www.feferraz.net/br/P/Projeto_Traducao_R_Portugues\n"
@@ -43,12 +43,12 @@ msgstr ""
 "nenhum slot \"allMethods\" encontrado no objeto de classe \"%s\", usado como "
 "lista de métodos para a função '%s'"
 
-#: methods_list_dispatch.c:434
+#: methods_list_dispatch.c:443
 #, c-format
 msgid "no generic function definition found for '%s'"
 msgstr "nenhuma definição genérica de função encontrada para '%s'"
 
-#: methods_list_dispatch.c:437
+#: methods_list_dispatch.c:446
 #, fuzzy, c-format
 msgid ""
 "no generic function definition found for '%s' in the supplied environment"
@@ -56,7 +56,7 @@ msgstr ""
 "Nenhuma definição genérica de função encontrada para '%s' no ambiente "
 "especificado"
 
-#: methods_list_dispatch.c:472
+#: methods_list_dispatch.c:481
 #, c-format
 msgid ""
 "invalid generic function object for method selection for function '%s': "
@@ -66,22 +66,22 @@ msgstr ""
 "uma função ou primitiva era esperada, mas foi especificado um objeto de "
 "classe \"%s\""
 
-#: methods_list_dispatch.c:487
+#: methods_list_dispatch.c:496
 #, c-format
 msgid "no direct or inherited method for function '%s' for this call"
 msgstr ""
 "nenhum método direto ou obtido por herança para a função '%s' nessa chamada"
 
-#: methods_list_dispatch.c:513 methods_list_dispatch.c:1046
+#: methods_list_dispatch.c:526 methods_list_dispatch.c:1071
 msgid "invalid object (non-function) used as method"
 msgstr "objeto inválido (não-função) usado como método"
 
-#: methods_list_dispatch.c:534
+#: methods_list_dispatch.c:547
 #, c-format
 msgid "could not find symbol '%s' in frame of call"
 msgstr "não foi possível encontrar o símbolo '%s' no escopo da chamada"
 
-#: methods_list_dispatch.c:542
+#: methods_list_dispatch.c:555
 #, c-format
 msgid ""
 "invalid symbol in checking for missing argument in method dispatch: expected "
@@ -90,11 +90,11 @@ msgstr ""
 "símbolo inválido na verificação de argumento faltante no dispacho de método: "
 "um nome era esperado, mas foi especificado um objeto de classe \"%s\""
 
-#: methods_list_dispatch.c:545
+#: methods_list_dispatch.c:558
 msgid "use of NULL environment is defunct"
 msgstr "uso do ambiente NULL foi extinto"
 
-#: methods_list_dispatch.c:549
+#: methods_list_dispatch.c:562
 #, c-format
 msgid ""
 "invalid environment in checking for missing argument, '%s', in methods "
@@ -103,7 +103,7 @@ msgstr ""
 "ambiente inválido na verificação de argumento faltante, '%s',  no "
 "despachamento dos métodos: foi especificado um objeto de classe \"%s\""
 
-#: methods_list_dispatch.c:575
+#: methods_list_dispatch.c:588
 #, c-format
 msgid ""
 "object of class \"%s\" used as methods list for function '%s' ( no "
@@ -112,7 +112,7 @@ msgstr ""
 "objeto de classe \"%s\" usado como lista de métodos para a função '%s' (sem "
 "slot 'argument')"
 
-#: methods_list_dispatch.c:586
+#: methods_list_dispatch.c:599
 #, c-format
 msgid ""
 "(in selecting a method for function '%s') '...' and related variables cannot "
@@ -121,7 +121,7 @@ msgstr ""
 "(na seleção de um método para a função '%s') '...' e variáveis relacionadas "
 "não podem ser usadas no despachamento dos métodos"
 
-#: methods_list_dispatch.c:589
+#: methods_list_dispatch.c:602
 #, c-format
 msgid ""
 "(in selecting a method for function '%s') the 'environment' argument for "
@@ -130,8 +130,8 @@ msgstr ""
 "(na seleção de um método para a função '%s') o argumento 'environment' para "
 "o dispachamento deve ser um ambiente R; foi obtido um objeto de classe \"%s\""
 
-#: methods_list_dispatch.c:603 methods_list_dispatch.c:615
-#: methods_list_dispatch.c:999
+#: methods_list_dispatch.c:616 methods_list_dispatch.c:628
+#: methods_list_dispatch.c:1017
 #, c-format
 msgid ""
 "error in evaluating the argument '%s' in selecting a method for function "
@@ -140,62 +140,54 @@ msgstr ""
 "erro na avaliação do argumento '%s' na seleção do método para a função '%s': "
 "'%s'"
 
-#: methods_list_dispatch.c:623
+#: methods_list_dispatch.c:636
 #, c-format
 msgid "no matching method for function '%s' (argument '%s', with class \"%s\")"
 msgstr ""
 "nenhum método correspondente encontrado para a função '%s' (argumento '%s', "
 "com classe \"%s\")"
 
-#: methods_list_dispatch.c:630
+#: methods_list_dispatch.c:643
 #, c-format
 msgid ""
 "recursive use of function '%s' in method selection, with no default method"
 msgstr ""
 "uso recursivo da função '%s' na seleção do método, sem um método padrão"
 
-#: methods_list_dispatch.c:693
-msgid ""
-"in processing 'callNextMethod', found a '...' in the matched call, but no "
-"corresponding '...' argument"
-msgstr ""
-"no processamento de 'callNextMethod', encontrado um '...' na chamada "
-"correspondente, mas nenhum argumento '...' foi encontrado"
-
-#: methods_list_dispatch.c:706
+#: methods_list_dispatch.c:712
 #, c-format
 msgid "error in evaluating a 'primitive' next method: %s"
 msgstr "erro na avaliação de um próximo método 'primitive': %s"
 
-#: methods_list_dispatch.c:801
+#: methods_list_dispatch.c:810
 #, c-format
 msgid "'%s' must be a single string (got a character vector of length %d)"
 msgstr ""
 "'%s' deve ser uma única string (foi especificado um vetor de caracteres de "
 "comprimento %d)"
 
-#: methods_list_dispatch.c:805
+#: methods_list_dispatch.c:814
 #, c-format
 msgid "'%s' must be a non-empty string; got an empty string"
 msgstr "'%s' deve ser uma string não-vazia; foi obtida uma string vazia"
 
-#: methods_list_dispatch.c:809
+#: methods_list_dispatch.c:818
 #, c-format
 msgid "'%s' must be a single string (got an object of class \"%s\")"
 msgstr "'%s' deve ser uma string única (foi obtido um objeto da classe \"%s\")"
 
-#: methods_list_dispatch.c:880
+#: methods_list_dispatch.c:895
 #, fuzzy
 msgid "class should be either a character-string name or a class definition"
 msgstr ""
 "Class deve ser ou um nome cadeia de caracteres ou uma definição de classe"
 
-#: methods_list_dispatch.c:959
+#: methods_list_dispatch.c:975
 #, fuzzy, c-format
 msgid "failed to get the generic for the primitive \"%s\""
 msgstr "Falha ao obter a genérica primitiva '%s"
 
-#: methods_list_dispatch.c:965
+#: methods_list_dispatch.c:982
 #, fuzzy, c-format
 msgid ""
 "expected a generic function or a primitive for dispatch, got an object of "
@@ -205,6 +197,13 @@ msgstr ""
 "obtido um objeto de classe \"%s\""
 
 #~ msgid ""
+#~ "in processing 'callNextMethod', found a '...' in the matched call, but no "
+#~ "corresponding '...' argument"
+#~ msgstr ""
+#~ "no processamento de 'callNextMethod', encontrado um '...' na chamada "
+#~ "correspondente, mas nenhum argumento '...' foi encontrado"
+
+#~ msgid ""
 #~ "S language method selection got an error when called from internal "
 #~ "dispatch for function '%s'"
 #~ msgstr ""
diff --git a/src/library/methods/po/ru.po b/src/library/methods/po/ru.po
index a03add8..277e51c 100644
--- a/src/library/methods/po/ru.po
+++ b/src/library/methods/po/ru.po
@@ -9,217 +9,165 @@ msgid ""
 msgstr ""
 "Project-Id-Version: R 2.9.0\n"
 "Report-Msgid-Bugs-To: bugs.r-project.org\n"
-"POT-Creation-Date: 2013-07-20 09:38+0100\n"
-"PO-Revision-Date: 2013-03-19 21:02-0600\n"
+"POT-Creation-Date: 2015-06-06 13:51+0100\n"
+"PO-Revision-Date: 2016-04-05 18:14-0600\n"
 "Last-Translator: Alexey Shipunov <dactylorhiza at gmail.com>\n"
 "Language-Team: Russian <dactylorhiza at gmail>\n"
-"Language: \n"
+"Language: ru\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=KOI8-R\n"
 "Content-Transfer-Encoding: 8bit\n"
-"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n"
-"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
+"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
 
 #: class_support.c:32
 msgid "calling the C routine used as an initializer for 'externalptr' objects"
-msgstr ""
-"������� C ���������, ������������ ��� ��������� ��� 'externalptr' ��������"
+msgstr "������� C ���������, ������������ ��� ��������� ��� 'externalptr' ��������"
 
 #: do_substitute_direct.c:41
 msgid "invalid list for substitution"
 msgstr "�������� ������ ��� �����������"
 
 #: methods_list_dispatch.c:149
-msgid ""
-"could not find the skeleton calls for 'methods' (package detached?): expect "
-"very bad things to happen"
-msgstr ""
-"�� ���� ����� �������� ������ ��� 'methods' (����� ��������?): �������� "
-"��������� ���-�� ����� ������"
+msgid "could not find the skeleton calls for 'methods' (package detached?): expect very bad things to happen"
+msgstr "�� ���� ����� �������� ������ ��� 'methods' (����� ��������?): �������� ��������� ���-�� ����� ������"
 
 #: methods_list_dispatch.c:215
 #, c-format
-msgid ""
-"no \"allMethods\" slot found in object of class \"%s\" used as methods list "
-"for function '%s'"
-msgstr ""
-"�� ������ \"allMethods\" ���� � ������� ������ \"%s\", ���������������� ��� "
-"������ ������� ��� ������� '%s'"
+msgid "no \"allMethods\" slot found in object of class \"%s\" used as methods list for function '%s'"
+msgstr "�� ������ \"allMethods\" ���� � ������� ������ \"%s\", ���������������� ��� ������ ������� ��� ������� '%s'"
 
-#: methods_list_dispatch.c:434
+#: methods_list_dispatch.c:443
 #, c-format
 msgid "no generic function definition found for '%s'"
 msgstr "�� ������� ����������� ����� ������� ��� '%s'"
 
-#: methods_list_dispatch.c:437
+#: methods_list_dispatch.c:446
 #, c-format
-msgid ""
-"no generic function definition found for '%s' in the supplied environment"
-msgstr ""
-"�� ������� ����������� ����� ������� ��� '%s' � ��������������� ���������"
+msgid "no generic function definition found for '%s' in the supplied environment"
+msgstr "�� ������� ����������� ����� ������� ��� '%s' � ��������������� ���������"
 
-#: methods_list_dispatch.c:472
+#: methods_list_dispatch.c:481
 #, c-format
-msgid ""
-"invalid generic function object for method selection for function '%s': "
-"expected a function or a primitive, got an object of class \"%s\""
-msgstr ""
-"�� ������ ������ ����� ������� ��� ������ ������ ��� ������� '%s': ��������� "
-"������� ��� ��������, ������� ������ ������ \"%s\""
+msgid "invalid generic function object for method selection for function '%s': expected a function or a primitive, got an object of class \"%s\""
+msgstr "�� ������ ������ ����� ������� ��� ������ ������ ��� ������� '%s': ��������� ������� ��� ��������, ������� ������ ������ \"%s\""
 
-#: methods_list_dispatch.c:487
+#: methods_list_dispatch.c:496
 #, c-format
 msgid "no direct or inherited method for function '%s' for this call"
-msgstr ""
-"��� ������� ��� �������������� ������ ��� ������� '%s' ��� ������� ������"
+msgstr "��� ������� ��� �������������� ������ ��� ������� '%s' ��� ������� ������"
 
-#: methods_list_dispatch.c:513 methods_list_dispatch.c:1046
+#: methods_list_dispatch.c:522
+#: methods_list_dispatch.c:1045
 msgid "invalid object (non-function) used as method"
 msgstr "�� ������ ������ (�� �������) ����������� ��� �����"
 
-#: methods_list_dispatch.c:534
+#: methods_list_dispatch.c:543
 #, c-format
 msgid "could not find symbol '%s' in frame of call"
 msgstr "�� ������ ������ '%s' � ��������� ������"
 
-#: methods_list_dispatch.c:542
+#: methods_list_dispatch.c:551
 #, c-format
-msgid ""
-"invalid symbol in checking for missing argument in method dispatch: expected "
-"a name, got an object of class \"%s\""
-msgstr ""
-"��� �������� �������������� ��������� � �������� ������ ������ ������������ "
-"������: ��������� ���, ������� ������ ������ \"%s\""
+msgid "invalid symbol in checking for missing argument in method dispatch: expected a name, got an object of class \"%s\""
+msgstr "��� �������� �������������� ��������� � �������� ������ ������ ������������ ������: ��������� ���, ������� ������ ������ \"%s\""
 
-#: methods_list_dispatch.c:545
+#: methods_list_dispatch.c:554
 msgid "use of NULL environment is defunct"
 msgstr "������������� NULL ��������� ����� �� ��������������"
 
-#: methods_list_dispatch.c:549
+#: methods_list_dispatch.c:558
 #, c-format
-msgid ""
-"invalid environment in checking for missing argument, '%s', in methods "
-"dispatch: got an object of class \"%s\""
-msgstr ""
-"��� �������� �������������� ��������� ���������� �������� ���������, '%s', � "
-"������� ��������: ������� ������ ������ \"%s\""
+msgid "invalid environment in checking for missing argument, '%s', in methods dispatch: got an object of class \"%s\""
+msgstr "��� �������� �������������� ��������� ���������� �������� ���������, '%s', � ������� ��������: ������� ������ ������ \"%s\""
 
-#: methods_list_dispatch.c:575
+#: methods_list_dispatch.c:584
 #, c-format
-msgid ""
-"object of class \"%s\" used as methods list for function '%s' ( no "
-"'argument' slot)"
-msgstr ""
-"������ ������ \"%s\" ����������� ��� ������ ������� ��� ������� '%s' ( ��� "
-"����� 'argument' )"
+msgid "object of class \"%s\" used as methods list for function '%s' ( no 'argument' slot)"
+msgstr "������ ������ \"%s\" ����������� ��� ������ ������� ��� ������� '%s' ( ��� ����� 'argument' )"
 
-#: methods_list_dispatch.c:586
+#: methods_list_dispatch.c:595
 #, c-format
-msgid ""
-"(in selecting a method for function '%s') '...' and related variables cannot "
-"be used for methods dispatch"
-msgstr ""
-"(��� ������ ������ ��� ������� '%s') '...' � ����������� ���������� �� ����� "
-"���� ������������ ��� �������� �������"
+msgid "(in selecting a method for function '%s') '...' and related variables cannot be used for methods dispatch"
+msgstr "(��� ������ ������ ��� ������� '%s') '...' � ����������� ���������� �� ����� ���� ������������ ��� �������� �������"
 
-#: methods_list_dispatch.c:589
+#: methods_list_dispatch.c:598
 #, c-format
-msgid ""
-"(in selecting a method for function '%s') the 'environment' argument for "
-"dispatch must be an R environment; got an object of class \"%s\""
-msgstr ""
-"(��� ������ ������ ��� ������� '%s') �������� 'environment' ��� �������� "
-"������ ���� R ����������; ������� ������ ������ \"%s\""
+msgid "(in selecting a method for function '%s') the 'environment' argument for dispatch must be an R environment; got an object of class \"%s\""
+msgstr "(��� ������ ������ ��� ������� '%s') �������� 'environment' ��� �������� ������ ���� R ����������; ������� ������ ������ \"%s\""
 
-#: methods_list_dispatch.c:603 methods_list_dispatch.c:615
-#: methods_list_dispatch.c:999
+#: methods_list_dispatch.c:612
+#: methods_list_dispatch.c:624
+#: methods_list_dispatch.c:995
 #, c-format
-msgid ""
-"error in evaluating the argument '%s' in selecting a method for function "
-"'%s': %s"
-msgstr ""
-"������ ��� ������ ��������� '%s' ��� ������ ������ ��� ������� '%s': %s"
+msgid "error in evaluating the argument '%s' in selecting a method for function '%s': %s"
+msgstr "������ ��� ������ ��������� '%s' ��� ������ ������ ��� ������� '%s': %s"
 
-#: methods_list_dispatch.c:623
+#: methods_list_dispatch.c:632
 #, c-format
 msgid "no matching method for function '%s' (argument '%s', with class \"%s\")"
-msgstr ""
-"��� ���������������� ������ ��� ������� '%s' (�������� '%s', � ������� \"%s"
-"\")"
+msgstr "��� ���������������� ������ ��� ������� '%s' (�������� '%s', � ������� \"%s\")"
 
-#: methods_list_dispatch.c:630
+#: methods_list_dispatch.c:639
 #, c-format
-msgid ""
-"recursive use of function '%s' in method selection, with no default method"
-msgstr ""
-"����������� ������������� ������� '%s' � ������ ������, � ����������� ������ "
-"��-���������"
-
-#: methods_list_dispatch.c:693
-msgid ""
-"in processing 'callNextMethod', found a '...' in the matched call, but no "
-"corresponding '...' argument"
-msgstr ""
-"��� ������� 'callNextMethod', ������ '...' � ����������� ������, �� ��� "
-"���������������� ��������� '...'"
+msgid "recursive use of function '%s' in method selection, with no default method"
+msgstr "����������� ������������� ������� '%s' � ������ ������, � ����������� ������ ��-���������"
 
-#: methods_list_dispatch.c:706
+#: methods_list_dispatch.c:698
 #, c-format
 msgid "error in evaluating a 'primitive' next method: %s"
 msgstr "������ ��� ������ 'primitive' ���������� ������: %s"
 
-#: methods_list_dispatch.c:801
+#: methods_list_dispatch.c:796
 #, c-format
 msgid "'%s' must be a single string (got a character vector of length %d)"
-msgstr ""
-"'%s' ������ ���� ��������� ������� (������� ���������� ������ ����� %d)"
+msgstr "'%s' ������ ���� ��������� ������� (������� ���������� ������ ����� %d)"
 
-#: methods_list_dispatch.c:805
+#: methods_list_dispatch.c:800
 #, c-format
 msgid "'%s' must be a non-empty string; got an empty string"
 msgstr "'%s' ������ ���� �� ������ �������; �������� ������ ������"
 
-#: methods_list_dispatch.c:809
+#: methods_list_dispatch.c:804
 #, c-format
 msgid "'%s' must be a single string (got an object of class \"%s\")"
 msgstr "'%s' ������ ���� ��������� ������� (������� ������ ������ \"%s\")"
 
-#: methods_list_dispatch.c:880
+#: methods_list_dispatch.c:875
 msgid "class should be either a character-string name or a class definition"
-msgstr ""
-"����� ������ ���� ���� ������-��������� ������� ���� ������������ ������"
+msgstr "����� ������ ���� ���� ������-��������� ������� ���� ������������ ������"
 
-#: methods_list_dispatch.c:959
+#: methods_list_dispatch.c:955
 #, c-format
 msgid "failed to get the generic for the primitive \"%s\""
 msgstr "�� ���� ����� ����� ������� ��� ��������� \"%s\""
 
-#: methods_list_dispatch.c:965
+#: methods_list_dispatch.c:961
 #, c-format
-msgid ""
-"expected a generic function or a primitive for dispatch, got an object of "
-"class \"%s\""
-msgstr ""
-"��������� ����� ������� ���� �������� ��� ��������, ������� ������ ������ "
-"\"%s\""
+msgid "expected a generic function or a primitive for dispatch, got an object of class \"%s\""
+msgstr "��������� ����� ������� ���� �������� ��� ��������, ������� ������ ������ \"%s\""
 
 #~ msgid ""
+#~ "in processing 'callNextMethod', found a '...' in the matched call, but no "
+#~ "corresponding '...' argument"
+#~ msgstr ""
+#~ "��� ������� 'callNextMethod', ������ '...' � ����������� ������, �� ��� "
+#~ "���������������� ��������� '...'"
+#~ msgid ""
 #~ "S language method selection got an error when called from internal "
 #~ "dispatch for function '%s'"
 #~ msgstr ""
 #~ "����� ������ ����� S ������ ������, ����� ��� ������ �� ���������� "
 #~ "�������� ��� ������� '%s'"
-
 #~ msgid ""
 #~ "internal error in 'callNextMethod': '.nextMethod' was not assigned in the "
 #~ "frame of the method call"
 #~ msgstr ""
 #~ "���������� ������ � 'callNextMethod': '.nextMethod' �� ��� �������� �  "
 #~ "��������� ������ ������"
-
 #~ msgid ""
 #~ "Generic \"%s\" seems not to have been initialized for table dispatch---"
 #~ "need to have .SigArgs and .AllMtable assigned in its environment"
 #~ msgstr ""
 #~ "����� \"%s\", �������, �� ���� ���������������� ��� ������� ��������---"
 #~ "���������� ����� .SigArgs � .AllMtable �������������� � ���� ���������"
+
diff --git a/src/library/methods/po/zh_CN.po b/src/library/methods/po/zh_CN.po
index 336d220..b1230b9 100644
--- a/src/library/methods/po/zh_CN.po
+++ b/src/library/methods/po/zh_CN.po
@@ -6,12 +6,12 @@
 msgid ""
 msgstr ""
 "Project-Id-Version: R 2.4.0\n"
-"Report-Msgid-Bugs-To: bugs.r-project.org\n"
-"POT-Creation-Date: 2013-07-20 09:38+0100\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2016-04-01 10:01-0700\n"
 "PO-Revision-Date: 2005-02-04 08:37+0000\n"
 "Last-Translator: 陈斐 <feic at normipaiva.com>\n"
 "Language-Team: Chinese\n"
-"Language: \n"
+"Language: zh_CN\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
@@ -41,18 +41,18 @@ msgstr ""
 "当函数'%2$s'方法串列来用的,类别为\"%1$s\" 的对象缺少\"allMethods\"这么一个"
 "槽。"
 
-#: methods_list_dispatch.c:434
+#: methods_list_dispatch.c:443
 #, c-format
 msgid "no generic function definition found for '%s'"
 msgstr "没有为'%s'找到适用的泛型函数"
 
-#: methods_list_dispatch.c:437
+#: methods_list_dispatch.c:446
 #, c-format
 msgid ""
 "no generic function definition found for '%s' in the supplied environment"
 msgstr "在提供的环境里'%s'没有同属函数定义"
 
-#: methods_list_dispatch.c:472
+#: methods_list_dispatch.c:481
 #, c-format
 msgid ""
 "invalid generic function object for method selection for function '%s': "
@@ -61,21 +61,21 @@ msgstr ""
 "函数'%s'方法选择时其同属函数对象出了错:需要的是函数或原始函数,得到的却是类"
 "别为\"%s\"的对象"
 
-#: methods_list_dispatch.c:487
+#: methods_list_dispatch.c:496
 #, c-format
 msgid "no direct or inherited method for function '%s' for this call"
 msgstr "调用时找不到用于'%s'函数的直接或继承的方法"
 
-#: methods_list_dispatch.c:513 methods_list_dispatch.c:1046
+#: methods_list_dispatch.c:526 methods_list_dispatch.c:1071
 msgid "invalid object (non-function) used as method"
 msgstr "当方法用的对象(非函数)出了错"
 
-#: methods_list_dispatch.c:534
+#: methods_list_dispatch.c:547
 #, c-format
 msgid "could not find symbol '%s' in frame of call"
 msgstr "调用框里找不到'%s'这个符号"
 
-#: methods_list_dispatch.c:542
+#: methods_list_dispatch.c:555
 #, c-format
 msgid ""
 "invalid symbol in checking for missing argument in method dispatch: expected "
@@ -84,18 +84,18 @@ msgstr ""
 "方法调度在检查短少参数时符号出了错:需要的是个名字,得到的却是类别为\"%s\"的"
 "对象"
 
-#: methods_list_dispatch.c:545
+#: methods_list_dispatch.c:558
 msgid "use of NULL environment is defunct"
 msgstr "NULL环境不再有用"
 
-#: methods_list_dispatch.c:549
+#: methods_list_dispatch.c:562
 #, c-format
 msgid ""
 "invalid environment in checking for missing argument, '%s', in methods "
 "dispatch: got an object of class \"%s\""
 msgstr "方法调度在检查短少参数'%s'时环境出了错:不需要类别为\"%s\"的对象"
 
-#: methods_list_dispatch.c:575
+#: methods_list_dispatch.c:588
 #, c-format
 msgid ""
 "object of class \"%s\" used as methods list for function '%s' ( no "
@@ -103,14 +103,14 @@ msgid ""
 msgstr ""
 "函数'%s'里不能把类别为\"%s\"的对象当作方法串列来用(没有'argument'这样一个槽)"
 
-#: methods_list_dispatch.c:586
+#: methods_list_dispatch.c:599
 #, c-format
 msgid ""
 "(in selecting a method for function '%s') '...' and related variables cannot "
 "be used for methods dispatch"
 msgstr "(在为'%s'函数选择方法时)'...'和其他有关的变量不能在方法调度时使用"
 
-#: methods_list_dispatch.c:589
+#: methods_list_dispatch.c:602
 #, c-format
 msgid ""
 "(in selecting a method for function '%s') the 'environment' argument for "
@@ -119,62 +119,55 @@ msgstr ""
 "(在为'%s'函数选择方法时) 调度时的'environment'参数必需是R环境;不需要类别为"
 "\"%s\"的对象"
 
-#: methods_list_dispatch.c:603 methods_list_dispatch.c:615
-#: methods_list_dispatch.c:999
+#: methods_list_dispatch.c:616 methods_list_dispatch.c:628
+#: methods_list_dispatch.c:1017
 #, c-format
 msgid ""
 "error in evaluating the argument '%s' in selecting a method for function "
 "'%s': %s"
 msgstr "在为'%2$s'函数选择方法时评估'%1$s'参数出了错: %3$s "
 
-#: methods_list_dispatch.c:623
+#: methods_list_dispatch.c:636
 #, c-format
 msgid "no matching method for function '%s' (argument '%s', with class \"%s\")"
 msgstr "找不到与'%s'函数相配的方法(参数是'%s',类别为\"%s\")"
 
-#: methods_list_dispatch.c:630
+#: methods_list_dispatch.c:643
 #, c-format
 msgid ""
 "recursive use of function '%s' in method selection, with no default method"
 msgstr "在方法选择时函数'%s'不能有无默认方法的递归使用"
 
-#: methods_list_dispatch.c:693
-msgid ""
-"in processing 'callNextMethod', found a '...' in the matched call, but no "
-"corresponding '...' argument"
-msgstr ""
-"在处理'callNextMethod'时,吻合的调用里有'...',但与之相应的'...'参数却不存在"
-
-#: methods_list_dispatch.c:706
+#: methods_list_dispatch.c:712
 #, c-format
 msgid "error in evaluating a 'primitive' next method: %s"
 msgstr "評估'primitive'其次方法时出了错: %s "
 
-#: methods_list_dispatch.c:801
+#: methods_list_dispatch.c:810
 #, c-format
 msgid "'%s' must be a single string (got a character vector of length %d)"
 msgstr "'%s'必需是单一字符串(现在它是长度为%d的字符向量)"
 
-#: methods_list_dispatch.c:805
+#: methods_list_dispatch.c:814
 #, c-format
 msgid "'%s' must be a non-empty string; got an empty string"
 msgstr "'%s'必需是非空字符串;现在它是空的字符串"
 
-#: methods_list_dispatch.c:809
+#: methods_list_dispatch.c:818
 #, c-format
 msgid "'%s' must be a single string (got an object of class \"%s\")"
 msgstr "'%s'必需是单一字符串(现在它是类别为\"%s\"的对象)"
 
-#: methods_list_dispatch.c:880
+#: methods_list_dispatch.c:895
 msgid "class should be either a character-string name or a class definition"
 msgstr "类别必需是字符串名字或类别定义"
 
-#: methods_list_dispatch.c:959
+#: methods_list_dispatch.c:975
 #, c-format
 msgid "failed to get the generic for the primitive \"%s\""
 msgstr "没有能够为原始\"%s\"找到同属函数"
 
-#: methods_list_dispatch.c:965
+#: methods_list_dispatch.c:982
 #, c-format
 msgid ""
 "expected a generic function or a primitive for dispatch, got an object of "
@@ -182,6 +175,13 @@ msgid ""
 msgstr "需要的是同属函数或原始函数,现在得到的却是类别为\"%s\"的对象"
 
 #~ msgid ""
+#~ "in processing 'callNextMethod', found a '...' in the matched call, but no "
+#~ "corresponding '...' argument"
+#~ msgstr ""
+#~ "在处理'callNextMethod'时,吻合的调用里有'...',但与之相应的'...'参数却不存"
+#~ "在"
+
+#~ msgid ""
 #~ "S language method selection got an error when called from internal "
 #~ "dispatch for function '%s'"
 #~ msgstr "在为函数'%s'进行内部調度时S语言方法选择出了错"
diff --git a/src/library/methods/src/RSMethods.h b/src/library/methods/src/RSMethods.h
index d387706..d968e09 100644
--- a/src/library/methods/src/RSMethods.h
+++ b/src/library/methods/src/RSMethods.h
@@ -14,7 +14,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  */
 
 #ifndef R_RSMETHODS_H
diff --git a/src/library/methods/src/class_support.c b/src/library/methods/src/class_support.c
index b269bc5..b95b388 100644
--- a/src/library/methods/src/class_support.c
+++ b/src/library/methods/src/class_support.c
@@ -1,6 +1,6 @@
 /*
  *  R : A Computer Language for Statistical Data Analysis
- *  Copyright (C) 2002-2007   The R Core Team.
+ *  Copyright (C) 2002-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
@@ -14,23 +14,19 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  */
 
 
 #include <R.h>
-#include <Rinternals.h>
-#include <R_ext/Rdynload.h> /* for DL_FUNC */
+#include <Rinternals.h> // defines R_MakeExternalPtrFn
 
-/* from Rdynpriv.h, but that pulls in too much */
-SEXP R_MakeExternalPtrFn(DL_FUNC p, SEXP tag, SEXP prot);
 
 #include "methods.h"
 
-SEXP R_dummy_extern_place()
+SEXP NORET R_dummy_extern_place()
 {
     error(_("calling the C routine used as an initializer for 'externalptr' objects"));
-    return R_NilValue; /* -Wall */
 }
 
 SEXP R_externalptr_prototype_object()
diff --git a/src/library/methods/src/do_substitute_direct.c b/src/library/methods/src/do_substitute_direct.c
index f50fab6..4cf7549 100644
--- a/src/library/methods/src/do_substitute_direct.c
+++ b/src/library/methods/src/do_substitute_direct.c
@@ -14,16 +14,16 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  */
 
-#include <R.h>
-#include <Rdefines.h>
-#define NewEnvironment		Rf_NewEnvironment
-#define substitute		Rf_substitute
-#include "methods.h"
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+#define NO_NLS
+#include <Defn.h>
 
-extern SEXP NewEnvironment(SEXP namelist, SEXP valuelist, SEXP rho);
+#include "methods.h"
 
 /* substitute in an _evaluated_ object, with an explicit list as
    second arg (although old-style lists and environments are allowed).
diff --git a/src/library/methods/src/init.c b/src/library/methods/src/init.c
index f67ea8a..b048a4d 100644
--- a/src/library/methods/src/init.c
+++ b/src/library/methods/src/init.c
@@ -1,6 +1,6 @@
 /*
  *  R : A Computer Language for Statistical Data Analysis
- *  Copyright (C) 2005-12   The R Core Team.
+ *  Copyright (C) 2005-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
@@ -14,7 +14,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  */
 
 #include <R.h>
@@ -22,6 +22,7 @@
 
 #include "methods.h"
 #include <R_ext/Rdynload.h>
+#include <R_ext/Visibility.h>
 
 #define CALLDEF(name, n)  {#name, (DL_FUNC) &name, n}
 
@@ -55,13 +56,10 @@ static const R_CallMethodDef CallEntries[] = {
     {NULL, NULL, 0}
 };
 
-void
-#ifdef HAVE_VISIBILITY_ATTRIBUTE
-__attribute__ ((visibility ("default")))
-#endif
+void attribute_visible
 R_init_methods(DllInfo *dll)
 {
     R_registerRoutines(dll, NULL, CallEntries, NULL, NULL);
     R_useDynamicSymbols(dll, FALSE);
-//    R_forceSymbols(dll, TRUE);
+    R_forceSymbols(dll, TRUE);
 }
diff --git a/src/library/methods/src/methods.h b/src/library/methods/src/methods.h
index 924261c..5b8f1a2 100644
--- a/src/library/methods/src/methods.h
+++ b/src/library/methods/src/methods.h
@@ -14,7 +14,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  */
 
 #include <Rinternals.h>
@@ -31,7 +31,7 @@
 SEXP R_M_setPrimitiveMethods(SEXP fname, SEXP op, SEXP code_vec,
 			     SEXP fundef, SEXP mlist);
 SEXP R_clear_method_selection();
-SEXP R_dummy_extern_place();
+SEXP NORET R_dummy_extern_place();
 SEXP R_el_named(SEXP object, SEXP what);
 SEXP R_externalptr_prototype_object();
 SEXP R_getGeneric(SEXP name, SEXP mustFind, SEXP env, SEXP package);
diff --git a/src/library/methods/src/methods_list_dispatch.c b/src/library/methods/src/methods_list_dispatch.c
index 77c7d2b..877b04d 100644
--- a/src/library/methods/src/methods_list_dispatch.c
+++ b/src/library/methods/src/methods_list_dispatch.c
@@ -1,6 +1,6 @@
 /*
  *  R : A Computer Language for Statistical Data Analysis
- *  Copyright (C) 2001-2013   The R Core Team.
+ *  Copyright (C) 2001-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
@@ -14,7 +14,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  */
 
 /* <UTF8>
@@ -272,27 +272,36 @@ SEXP R_quick_dispatch(SEXP args, SEXP genericEnv, SEXP fdef)
     mtable = findVarInFrame(genericEnv, R_allmtable);
     if(mtable == R_UnboundValue || TYPEOF(mtable) != ENVSXP)
 	return R_NilValue;
+    PROTECT(mtable);
     object = findVarInFrame(genericEnv, R_siglength);
-    if(object == R_UnboundValue)
+    if(object == R_UnboundValue) {
+	UNPROTECT(1); /* mtable */
 	return R_NilValue;
+    }
     switch(TYPEOF(object)) {
     case REALSXP:
 	if(LENGTH(object) > 0)
 	    nsig = (int) REAL(object)[0];
-	else
+	else {
+	    UNPROTECT(1); /* mtable */
 	    return R_NilValue;
+	}
 	break;
     case INTSXP:
 	if(LENGTH(object) > 0)
 	    nsig = (int) INTEGER(object)[0];
-	else
+	else {
+	    UNPROTECT(1); /* mtable */
 	    return R_NilValue;
+	}
 	break;
     default:
+	UNPROTECT(1); /* mtable */
 	return R_NilValue;
     }
     buf[0] = '\0'; ptr = buf;
     nargs = 0;
+    nprotect = 1; /* mtable */
     while(!isNull(args) && nargs < nsig) {
 	object = CAR(args); args = CDR(args);
 	if(TYPEOF(object) == PROMSXP) {
@@ -328,7 +337,7 @@ SEXP R_quick_dispatch(SEXP args, SEXP genericEnv, SEXP fdef)
 	}
 	ptr = strcpy(ptr, "#"); ptr +=1;
 	ptr = strcpy(ptr, "missing"); ptr += strlen("missing");
-    }	    
+    }
     value = findVarInFrame(mtable, install(buf));
     if(value == R_UnboundValue)
 	value = R_NilValue;
@@ -377,7 +386,7 @@ static SEXP get_generic(SEXP symbol, SEXP rho, SEXP package)
 {
     SEXP vl, generic = R_UnboundValue, gpackage; const char *pkg; Rboolean ok;
     if(!isSymbol(symbol))
-	symbol = install(CHAR(asChar(symbol)));
+	symbol = installTrChar(asChar(symbol));
     pkg = CHAR(STRING_ELT(package, 0)); /* package is guaranteed single string */
 
     while (rho != R_NilValue) {
@@ -497,9 +506,13 @@ SEXP R_standardGeneric(SEXP fname, SEXP ev, SEXP fdef)
     switch(TYPEOF(f)) {
     case CLOSXP:
 	{
-	    SEXP R_execMethod(SEXP, SEXP);
-	    PROTECT(f); nprotect++; /* is this needed?? */
-	    val = R_execMethod(f, ev);
+	    if (inherits(f, "internalDispatchMethod")) {
+                val = R_deferred_default_method();
+            } else {
+                SEXP R_execMethod(SEXP, SEXP);
+                PROTECT(f); nprotect++; /* is this needed?? */
+                val = R_execMethod(f, ev);
+            }
 	}
 	break;
     case SPECIALSXP: case BUILTINSXP:
@@ -530,7 +543,7 @@ static Rboolean is_missing_arg(SEXP symbol, SEXP ev)
     /* Sanity check, so don't translate */
     if (!isSymbol(symbol)) error("'symbol' must be a SYMSXP");
     loc = R_findVarLocInFrame(ev, symbol);
-    if (loc == NULL)
+    if (R_VARLOC_IS_NULL(loc))
 	error(_("could not find symbol '%s' in frame of call"),
 	      CHAR(PRINTNAME(symbol)));
     return R_GetVarLocMISSING(loc);
@@ -581,7 +594,7 @@ static SEXP do_dispatch(SEXP fname, SEXP ev, SEXP mlist, int firstTry,
     else
 	/* shouldn't happen, since argument in class MethodsList has class
 	   "name" */
-	arg_sym = install(CHAR(asChar(arg_slot)));
+	arg_sym = installTrChar(asChar(arg_slot));
     if(arg_sym == R_DotsSymbol || DDVAL(arg_sym) > 0)
 	error(_("(in selecting a method for function '%s') '...' and related variables cannot be used for methods dispatch"),
 	      CHAR(asChar(fname)));
@@ -647,55 +660,48 @@ SEXP R_M_setPrimitiveMethods(SEXP fname, SEXP op, SEXP code_vec,
 			     SEXP fundef, SEXP mlist)
 {
     return R_set_prim_method(fname, op, code_vec, fundef, mlist);
+    // -> ../../../main/objects.c
 }
 
 SEXP R_nextMethodCall(SEXP matched_call, SEXP ev)
 {
-    SEXP e, val, args, argsp, this_sym, op;
-    int nprotect = 0, i, nargs = length(matched_call)-1, error_flag;
-    Rboolean prim_case, dotsDone;
+    SEXP e, val, args, this_sym, op;
+    int i, nargs = length(matched_call)-1, error_flag;
+    Rboolean prim_case;
     /* for primitive .nextMethod's, suppress further dispatch to avoid
      * going into an infinite loop of method calls
     */
-    op = findVarInFrame3(ev, R_dot_nextMethod, TRUE);
+    PROTECT(op = findVarInFrame3(ev, R_dot_nextMethod, TRUE));
     if(op == R_UnboundValue)
 	error("internal error in 'callNextMethod': '.nextMethod' was not assigned in the frame of the method call");
-    /* If "..." is an argument, need to pass it down to next method;
-     * (this was motivated by issues with match.call; are these still
-     * valid in rev. 2.12 ? )*/
-    dotsDone = (findVarInFrame3(ev, R_DotsSymbol, TRUE) == R_UnboundValue);
-    {PROTECT(e = duplicate(matched_call)); nprotect++;}
-    if(!dotsDone) {
-	SEXP ee = e, dots;
-	PROTECT(dots = allocVector(LANGSXP, 1)); nprotect++;
-	SETCAR(dots, R_DotsSymbol);
-	for(ee = e; CDR(ee) != R_NilValue; ee = CDR(ee));
-	SETCDR(ee, dots); /* append ... symbol, with NULL CDR() */
-    }
+    PROTECT(e = duplicate(matched_call));
     prim_case = isPrimitive(op);
+    if (!prim_case) {
+        if (inherits(op, "internalDispatchMethod")) {
+	    SEXP generic = findVarInFrame3(ev, R_dot_Generic, TRUE);
+	    if(generic == R_UnboundValue)
+	        error("internal error in 'callNextMethod': '.Generic' was not assigned in the frame of the method call");
+	    op = INTERNAL(installTrChar(asChar(generic)));
+	    prim_case = TRUE;
+	}
+    }
     if(prim_case) {
 	/* retain call to primitive function, suppress method
 	   dispatch for it */
         do_set_prim_method(op, "suppress", R_NilValue, R_NilValue);
-	PROTECT(op); nprotect++; /* needed? */
     }
     else
 	SETCAR(e, R_dot_nextMethod); /* call .nextMethod instead */
-    args = CDR(e); argsp = e;
+    args = CDR(e);
     /* e is a copy of a match.call, with expand.dots=FALSE.  Turn each
     <TAG>=value into <TAG> = <TAG>, except  ...= is skipped (if it
     appears) in which case ... was appended. */
     for(i=0; i<nargs; i++) {
 	this_sym = TAG(args);
-	if(this_sym == R_DotsSymbol) {
-	    /* skip this; will have been appended */
-	    if(dotsDone)
-		error(_("in processing 'callNextMethod', found a '...' in the matched call, but no corresponding '...' argument"));
-	    SETCDR(argsp, CDR(args));
-	}
-	else if(CAR(args) != R_MissingArg) /* "missing" only possible in primitive */
+  /* "missing" only possible in primitive */
+        if(this_sym != R_NilValue && CAR(args) != R_MissingArg)
 	    SETCAR(args, this_sym);
-	argsp = args; args = CDR(args);
+	args = CDR(args);
     }
     if(prim_case) {
 	val = R_tryEvalSilent(e, ev, &error_flag);
@@ -708,7 +714,7 @@ SEXP R_nextMethodCall(SEXP matched_call, SEXP ev)
     }
     else
 	val = eval(e, ev);
-    UNPROTECT(nprotect);
+    UNPROTECT(2);
     return val;
 }
 
@@ -735,20 +741,20 @@ static SEXP R_loadMethod(SEXP def, SEXP fname, SEXP ev)
 	else if(t == R_nextMethod)  {
 	    defineVar(R_dot_nextMethod, CAR(s), ev); found++;
 	}
-	else if(t == R_SourceSymbol)  {
+	else if(t == R_SourceSymbol || t == s_generic)  {
 	    /* ignore */ found++;
 	}
     }
     defineVar(R_dot_Method, def, ev);
-    UNPROTECT(1);
 
-    /* this shouldn't be needed but check the generic being
-       "loadMethod", which would produce a recursive loop */
-    if(strcmp(CHAR(asChar(fname)), "loadMethod") == 0)
-	return def;
     if(found < length(attrib)) {
+        /* this shouldn't be needed but check the generic being
+           "loadMethod", which would produce a recursive loop */
+        if(strcmp(CHAR(asChar(fname)), "loadMethod") == 0) {
+	    UNPROTECT(1);
+            return def;
+	}
 	SEXP e, val;
-	PROTECT(def);
 	PROTECT(e = allocVector(LANGSXP, 4));
 	SETCAR(e, R_loadMethod_name); val = CDR(e);
 	SETCAR(val, def); val = CDR(val);
@@ -758,7 +764,10 @@ static SEXP R_loadMethod(SEXP def, SEXP fname, SEXP ev)
 	UNPROTECT(2);
 	return val;
     }
-    else return def;
+    else {
+	UNPROTECT(1);
+	return def;
+    }
 }
 
 static SEXP R_selectByPackage(SEXP table, SEXP classes, int nargs) {
@@ -769,8 +778,8 @@ static SEXP R_selectByPackage(SEXP table, SEXP classes, int nargs) {
 	thisPkg = PACKAGE_SLOT(VECTOR_ELT(classes, i));
 	if(thisPkg == R_NilValue)
 	    thisPkg = s_base;
-	lwidth += strlen(STRING_VALUE(thisPkg)) + 1;
-    }	
+	lwidth += (int) strlen(STRING_VALUE(thisPkg)) + 1;
+    }
     /* make the label */
     const void *vmax = vmaxget();
     buf = (char *) R_alloc(lwidth + 1, sizeof(char));
@@ -827,7 +836,12 @@ static const char *class_string(SEXP obj)
 }
 
 /* internal version of paste(".", prefix, name, sep="__"),
-   for speed so few checks */
+   for speed so few checks
+
+   If you decide to change this:
+   - don't, you will break all installed S4-using packages!
+   - change the hard-coded ".__M__" in namespace.R
+*/
 SEXP R_methodsPackageMetaName(SEXP prefix, SEXP name, SEXP pkg)
 {
     char str[501];
@@ -850,7 +864,7 @@ SEXP R_identC(SEXP e1, SEXP e2)
 {
     if(TYPEOF(e1) == STRSXP && TYPEOF(e2) == STRSXP &&
        LENGTH(e1) == 1 && LENGTH(e2) == 1 &&
-       streql(CHAR(STRING_ELT(e1, 0)), CHAR(STRING_ELT(e2, 0))))
+       STRING_ELT(e1, 0) == STRING_ELT(e2, 0))
 	return R_TRUE;
     else
 	return R_FALSE;
@@ -860,8 +874,9 @@ SEXP R_getClassFromCache(SEXP class, SEXP table)
 {
     SEXP value;
     if(TYPEOF(class) == STRSXP) {
+	if (LENGTH(class) == 0) return R_NilValue;
 	SEXP package = PACKAGE_SLOT(class);
-	value = findVarInFrame(table, install(CHAR(STRING_ELT(class, 0))));
+	value = findVarInFrame(table, installTrChar(STRING_ELT(class, 0)));
 	if(value == R_UnboundValue)
 	    return R_NilValue;
 	else if(TYPEOF(package) == STRSXP) {
@@ -882,7 +897,7 @@ SEXP R_getClassFromCache(SEXP class, SEXP table)
     } else /* assumes a class def, but might check */
 	return class;
 }
-	
+
 
 static SEXP do_inherited_table(SEXP class_objs, SEXP fdef, SEXP mtable, SEXP ev)
 {
@@ -907,12 +922,13 @@ static SEXP dots_class(SEXP ev, int *checkerrP)
     if(call == NULL) {
 	SEXP dotFind, f, R_dots;
 	dotFind = install(".dotsClass");
-	f = findFun(dotFind, R_MethodsNamespace);
+	PROTECT(f = findFun(dotFind, R_MethodsNamespace));
 	R_dots = install("...");
 	call = allocVector(LANGSXP, 2);
 	R_PreserveObject(call);
 	SETCAR(call,f); ee = CDR(call);
 	SETCAR(ee, R_dots);
+	UNPROTECT(1);
     }
     return R_tryEvalSilent(call, ev, checkerrP);
 }
@@ -937,7 +953,7 @@ SEXP R_dispatchGeneric(SEXP fname, SEXP ev, SEXP fdef)
 {
     static SEXP R_mtable = NULL, R_allmtable, R_sigargs, R_siglength, R_dots;
     int nprotect = 0;
-    SEXP mtable, classes, thisClass = R_NilValue /* -Wall */, sigargs, 
+    SEXP mtable, classes, thisClass = R_NilValue /* -Wall */, sigargs,
 	siglength, f_env = R_NilValue, method, f, val = R_NilValue;
     char *buf, *bufptr;
     int nargs, i, lwidth = 0;
@@ -956,7 +972,8 @@ SEXP R_dispatchGeneric(SEXP fname, SEXP ev, SEXP fdef)
     case SPECIALSXP: case BUILTINSXP:
 	PROTECT(fdef = R_primitive_generic(fdef)); nprotect++;
 	if(TYPEOF(fdef) != CLOSXP) {
-	    error(_("failed to get the generic for the primitive \"%s\""), CHAR(asChar(fname)));
+	    error(_("failed to get the generic for the primitive \"%s\""),
+		  CHAR(asChar(fname)));
 	    return R_NilValue;
 	}
 	f_env = CLOENV(fdef);
@@ -985,23 +1002,24 @@ SEXP R_dispatchGeneric(SEXP fname, SEXP ev, SEXP fdef)
 	    thisClass = s_missing;
 	else {
 	    /*  get its class */
-	    SEXP arg; int check_err;
+	    SEXP arg; int check_err = 0;
 	    if(arg_sym == R_dots) {
 		thisClass = dots_class(ev, &check_err);
 	    }
 	    else {
-		PROTECT(arg = R_tryEvalSilent(arg_sym, ev, &check_err));
-		if(!check_err)
-		    thisClass = R_data_class(arg, TRUE);
-		UNPROTECT(1); /* for arg */
+		arg = eval(arg_sym, ev);
+		/* PROTECT(arg = R_tryEvalSilent(arg_sym, ev, &check_err)); // <- related to bug PR#16111 */
+		/* if(!check_err) */
+		thisClass = R_data_class(arg, TRUE);
+		/* UNPROTECT(1); /\* for arg *\/ */
 	    }
 	    if(check_err)
 		error(_("error in evaluating the argument '%s' in selecting a method for function '%s': %s"),
-		      CHAR(PRINTNAME(arg_sym)),CHAR(asChar(fname)),
+		      CHAR(PRINTNAME(arg_sym)), CHAR(asChar(fname)),
 		      R_curErrorBuf());
 	}
 	SET_VECTOR_ELT(classes, i, thisClass);
-	lwidth += strlen(STRING_VALUE(thisClass)) + 1;
+	lwidth += (int) strlen(STRING_VALUE(thisClass)) + 1;
     }
     /* make the label */
     const void *vmax = vmaxget();
@@ -1017,22 +1035,29 @@ SEXP R_dispatchGeneric(SEXP fname, SEXP ev, SEXP fdef)
     }
     method = findVarInFrame(mtable, install(buf));
     vmaxset(vmax);
-    if(DUPLICATE_CLASS_CASE(method))
+    if(DUPLICATE_CLASS_CASE(method)) {
+	PROTECT(method);
 	method = R_selectByPackage(method, classes, nargs);
+	UNPROTECT(1);
+    }
     if(method == R_UnboundValue) {
 	method = do_inherited_table(classes, fdef, mtable, ev);
     }
     /* the rest of this is identical to R_standardGeneric;
        hence the f=method to remind us  */
     f = method;
-    if(isObject(f))
-	f = R_loadMethod(f, fname, ev);
     switch(TYPEOF(f)) {
     case CLOSXP:
     {
-	SEXP R_execMethod(SEXP, SEXP);
-	PROTECT(f); nprotect++; /* is this needed?? */
-	val = R_execMethod(f, ev);
+        if (inherits(f, "internalDispatchMethod")) {
+            val = R_deferred_default_method();
+        } else {
+            SEXP R_execMethod(SEXP, SEXP);
+            if(isObject(f))
+                f = R_loadMethod(f, fname, ev);
+            PROTECT(f); nprotect++; /* is this needed?? */
+            val = R_execMethod(f, ev);
+        }
     }
     break;
     case SPECIALSXP: case BUILTINSXP:
diff --git a/src/library/methods/src/slot.c b/src/library/methods/src/slot.c
index ba41952..ad80927 100644
--- a/src/library/methods/src/slot.c
+++ b/src/library/methods/src/slot.c
@@ -14,7 +14,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  */
 
 #include <R.h>
diff --git a/src/library/methods/src/tests.c b/src/library/methods/src/tests.c
index ce67184..c272cdb 100644
--- a/src/library/methods/src/tests.c
+++ b/src/library/methods/src/tests.c
@@ -14,7 +14,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  */
 
 #include <R.h>
@@ -23,18 +23,22 @@
 
 SEXP R_methods_test_MAKE_CLASS(SEXP className)
 {
+  SEXP classNameChar = PROTECT(asChar(className));
   const char *class;
-  class = CHAR(asChar(className));
-  return MAKE_CLASS(class);
+  class = CHAR(classNameChar);
+  SEXP res = MAKE_CLASS(class);
+  UNPROTECT(1);
+  return res;
 }
 
 SEXP R_methods_test_NEW(SEXP className)
 {
-  SEXP clDef;
+  SEXP classNameChar = PROTECT(asChar(className));
   const char *class;
-  class = CHAR(asChar(className));
-  clDef = MAKE_CLASS(class);
-  return NEW_OBJECT(clDef);
+  class = CHAR(classNameChar);
+  SEXP clDef;
+  PROTECT(clDef = MAKE_CLASS(class));
+  SEXP res = NEW_OBJECT(clDef);
+  UNPROTECT(2);
+  return res;
 }
-
-
diff --git a/src/library/methods/src/utils.c b/src/library/methods/src/utils.c
index aeab9ac..742bb1a 100644
--- a/src/library/methods/src/utils.c
+++ b/src/library/methods/src/utils.c
@@ -14,7 +14,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  */
 
 #include <config.h>
diff --git a/src/library/methods/tests/basicRefClass.R b/src/library/methods/tests/basicRefClass.R
index 028e382..ae92cee 100644
--- a/src/library/methods/tests/basicRefClass.R
+++ b/src/library/methods/tests/basicRefClass.R
@@ -325,7 +325,8 @@ ff <- mv( data = xMat)
 stopifnot(identical(markViewer, "ON")) # check initialize
 ff$edit(2,2,0)
 ff$data
-stopifnot(identical(ff$counts(), length(ff$edits[[1]][[3]])))
+if(methods:::.hasCodeTools())  # otherwise 'counter' is not visible
+    stopifnot(identical(ff$counts(), length(ff$edits[[1]][[3]])))
 ff$undo()
 stopifnot(all.equal(ff$data, xMat))
 rm(ff)
diff --git a/src/library/methods/tests/duplicateClass.R b/src/library/methods/tests/duplicateClass.R
index 7cd3f61..34c088f 100644
--- a/src/library/methods/tests/duplicateClass.R
+++ b/src/library/methods/tests/duplicateClass.R
@@ -1,7 +1,7 @@
 ## Tests for handling classes with same name & different package slots
 ## First:  Can we define the classes and get the separate definitions
 ## from the appropriate namespace or from the package slot in class(x)?
-stopifnot(require(Matrix))
+if(!require(Matrix)) q()
 
 ## from: example(chol)
 sy2 <- new("dsyMatrix", Dim = as.integer(c(2,2)), x = c(14, NA,32,77))
diff --git a/src/library/methods/tests/envRefClass.R b/src/library/methods/tests/envRefClass.R
new file mode 100644
index 0000000..0e7312b
--- /dev/null
+++ b/src/library/methods/tests/envRefClass.R
@@ -0,0 +1,18 @@
+### Moved from reg-tests-1c.R
+
+## envRefClass prototypes are a bit special -- broke all.equal() for baseenv()
+rc <- getClass("refClass")
+rp <- rc at prototype
+str(rp) ## failed
+rp ## show() failed ..
+(ner <- new("envRefClass")) # show() failed
+stopifnot(all.equal(rp,rp), all.equal(ner,ner))
+be <- baseenv()
+system.time(stopifnot(all.equal(be,be)))## <- takes a few sec's
+stopifnot(
+    grepl("not identical.*character", print(all.equal(rp, ner))),
+    grepl("not identical.*character", print(all.equal(ner, rp))))
+system.time(stopifnot(all.equal(globalenv(), globalenv())))
+## Much of the above failed in  R <= 3.2.0
+
+proc.time()
diff --git a/src/library/methods/tests/testGroupGeneric.R b/src/library/methods/tests/testGroupGeneric.R
index 47cccbe..08e53f8 100644
--- a/src/library/methods/tests/testGroupGeneric.R
+++ b/src/library/methods/tests/testGroupGeneric.R
@@ -14,11 +14,11 @@ stopifnot(logical() == a & a)
 removeClass("A")
 
 ### Find inherited group methods:
-stopifnot(require(Matrix))
-sm <- selectMethod("-", c("dgCMatrix", "numeric"))# direct match with "Arith"
-s2 <- selectMethod("-", c("dtCMatrix", "numeric"))# ambiguity match with "Arith"
-stopifnot(sm at generic == "Arith",
-          s2 at generic == "Arith")
+if(require(Matrix)) { ## , lib.loc = .Library
+    sm <- selectMethod("-", c("dgCMatrix", "numeric"))# direct match with "Arith"
+    s2 <- selectMethod("-", c("dtCMatrix", "numeric"))# ambiguity match with "Arith"
+    stopifnot(sm at generic == "Arith", s2 at generic == "Arith")
+}
 ## was not ok in R 2.14.x
 
 ## some tests of callGeneric().  It's reccommended for use with group generics
@@ -35,8 +35,8 @@ f2 <- function(b,c,d, a) {
 
 ## use callGeneric both directly (f1) and indirectly (f2)
 ## Latter failed pre rev. 66408; Bug ID 15937
-stopifnot(all.equal(c(1,2,3,4), as.vector(unlist(f1(2,3,4)))))
-stopifnot(all.equal(c(1,2,3,4), as.vector(unlist(f2(2,3,4)))))
+stopifnot(identical(c(1,2,3,4), as.vector(unlist(f1(2,3,4)))))
+stopifnot(identical(c(1,2,3,4), as.vector(unlist(f2(2,3,4)))))
 
 ## test callGeneric() with no arguments.  This is rarely used
 ## because nearly all applications use the groups Ops, etc.
diff --git a/src/library/methods/tests/testIs.R b/src/library/methods/tests/testIs.R
index 912cf06..6e648a8 100644
--- a/src/library/methods/tests/testIs.R
+++ b/src/library/methods/tests/testIs.R
@@ -29,3 +29,33 @@ setMethod("size", "vector", function(x)length(x))
 stopifnot(identical(size(xyc), length(x1)))
 removeClass("xy")
 removeGeneric("size")
+
+
+### Related to  numeric <-> double <-> integer  proposals, end of 2015, on R-devel
+myN   <- setClass("myN",   contains="numeric")
+myNid <- setClass("myNid", contains="numeric", representation(id="character"))
+NN <-    setClass("NN", representation(x="numeric"))
+
+(m1 <- myN  (1:3))
+(m2 <- myNid(1:3, id = "i3"))
+tools::assertError(NN (1:3))# in all R versions
+nn <- myN(2*pi)
+##                     # current R  |  (not existing)
+##                     # -----------|----------
+class(getDataPart(m1)) # integer    |  numeric
+class(getDataPart(m2)) # integer    |  numeric
+## check for now [[conceivably, these *could* change !]] :
+stopifnot(identical(getDataPart(m1), 1:3),
+	  identical(getDataPart(m2), 1:3),
+	  identical(S3Part(m1, strict=TRUE), 1:3),
+	  identical(S3Part(m2, strict=TRUE), 1:3),
+	  identical(2*pi, S3Part(nn, strict = TRUE)))
+
+if(FALSE) ## --- all these fail still:
+stopifnot(
+    identical(as(1L, "numeric"), as.numeric(1L))
+    ,
+    identical(as(1L, "numeric"), 1.0)
+    ,
+    is.double(as(1L, "double"))
+    )
diff --git a/src/library/parallel/DESCRIPTION.in b/src/library/parallel/DESCRIPTION.in
index bc7c1b6..d4f986e 100644
--- a/src/library/parallel/DESCRIPTION.in
+++ b/src/library/parallel/DESCRIPTION.in
@@ -8,5 +8,7 @@ Description: Support for parallel computation, including by forking
    (taken from package multicore), by sockets (taken from package snow)
    and random-number generation.
 License: Part of R @VERSION@
-Imports: tools
+Imports: tools, compiler
+Suggests: methods
 Enhances: snow, nws, Rmpi
+NeedsCompilation: yes
diff --git a/src/library/parallel/R/RngStream.R b/src/library/parallel/R/RngStream.R
index 4eaacec..990655b 100644
--- a/src/library/parallel/R/RngStream.R
+++ b/src/library/parallel/R/RngStream.R
@@ -1,7 +1,7 @@
 #  File src/library/parallel/R/RngStream.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
-#  Copyright (C) 1995-2012 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
@@ -14,19 +14,19 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 nextRNGStream <- function(seed)
 {
     if(!is.integer(seed) || seed[1L] %% 100L != 7L)
-        stop("invalid value of 'seed'")
+	stop(gettextf("invalid value of %s", "'seed'"), domain = NA)
     .Call(C_nextStream, seed)
 }
 
 nextRNGSubStream <- function(seed)
 {
     if(!is.integer(seed) || seed[1L] %% 100L != 7L)
-        stop("invalid value of 'seed'")
+	stop(gettextf("invalid value of %s", "'seed'"), domain = NA)
     .Call(C_nextSubStream, seed)
 }
 
@@ -62,7 +62,7 @@ RNGenv <- new.env()
 mc.reset.stream <- function() {
     if (RNGkind()[1L] == "L'Ecuyer-CMRG") {
         if (!exists(".Random.seed", envir = .GlobalEnv, inherits = FALSE))
-            runif(1)
+            sample.int(1L)
         assign("LEcuyer.seed",
                get(".Random.seed", envir = .GlobalEnv, inherits = FALSE),
                envir = RNGenv)
@@ -76,7 +76,7 @@ mc.advance.stream <- function(reset = FALSE)
         if (reset ||
             !exists("LEcuyer.seed", envir = RNGenv, inherits = FALSE)) {
             if (!exists(".Random.seed", envir = .GlobalEnv, inherits = FALSE))
-                runif(1)
+                sample.int(1L)
             assign("LEcuyer.seed",
                    get(".Random.seed", envir = .GlobalEnv, inherits = FALSE),
                    envir = RNGenv)
diff --git a/src/library/parallel/R/clusterApply.R b/src/library/parallel/R/clusterApply.R
index 08e8f2e..621ad5e 100644
--- a/src/library/parallel/R/clusterApply.R
+++ b/src/library/parallel/R/clusterApply.R
@@ -1,7 +1,7 @@
 #  File src/library/parallel/R/clusterApply.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
-#  Copyright (C) 1995-2013 The R Core Team
+#  Copyright (C) 1995-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
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 ## Derived from snow 0.3-6 by Luke Tierney
 
@@ -99,7 +99,7 @@ clusterMap <- function (cl = NULL, fun, ..., MoreArgs = NULL, RECYCLE = TRUE,
     args <- list(...)
     if (length(args) == 0) stop("need at least one argument")
     .scheduling <- match.arg(.scheduling)
-    n <- sapply(args, length)
+    n <- lengths(args)
     if (RECYCLE) {
         vlen <- max(n)
         if(vlen && min(n) == 0L)
@@ -143,7 +143,7 @@ splitIndices <- function(nx, ncl) {
     else if (ncl == 1L || nx == 1L) list(i)
     else {
         fuzz <- min((nx - 1L) / 1000, 0.4 * nx / ncl)
-        breaks <- seq(1 - fuzz, nx + fuzz, length = ncl + 1L)
+        breaks <- seq(1 - fuzz, nx + fuzz, length.out = ncl + 1L)
         structure(split(i, cut(i, breaks)), names = NULL)
     }
 }
@@ -290,7 +290,7 @@ parApply <- function(cl = NULL, X, MARGIN, FUN, ...)
 
     ans.names <- names(ans[[1L]])
     if(!ans.list)
-	ans.list <- any(unlist(lapply(ans, length)) != l.ans)
+	ans.list <- any(lengths(ans) != l.ans)
     if(!ans.list && length(ans.names)) {
         all.same <- vapply(ans, function(x) identical(names(x), ans.names), NA)
         if (!all(all.same)) ans.names <- NULL
diff --git a/src/library/parallel/R/detectCores.R b/src/library/parallel/R/detectCores.R
index 0839f65..8b14ce8 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, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
-#  Copyright (C) 1995-2014 The R Core Team
+#  Copyright (C) 1995-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
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 ## In part based on code in package multicore 0.1-6 by Simon Urbanek
 
@@ -23,26 +23,29 @@ detectCores <-
         function(all.tests = FALSE, logical = TRUE) {
             ## result is # cores, logical processors.
             res <- .Call(C_ncpus, FALSE)
-            ifelse(logical, res[2L], res[1L]);
+	    res[if(logical) 2L else 1L]
         }
     } else {
-        function(all.tests = FALSE, logical = FALSE) {
+        function(all.tests = FALSE, logical = TRUE) {
             ## Commoner OSes first
             systems <-
-                list(linux = "grep processor /proc/cpuinfo 2>/dev/null | wc -l",
-darwin = "/usr/sbin/sysctl -n hw.ncpu 2>/dev/null",
+                list(linux =
+                     if(logical) "grep processor /proc/cpuinfo 2>/dev/null | wc -l" else "cat /proc/cpuinfo | grep 'cpu cores'| uniq | cut -f2 -d:",
+                     ## 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",
                      freebsd = "/sbin/sysctl -n hw.ncpu 2>/dev/null",
+                     openbsd = "/sbin/sysctl -n hw.ncpu 2>/dev/null",
                      irix  = c("hinv | grep Processors | sed 's: .*::'", "hinv | grep '^Processor '| wc -l"))
             for (i in seq(systems))
                 if(all.tests ||
 		   length(grep(paste0("^", names(systems)[i]), R.version$os)))
                     for (cmd in systems[i]) {
-                        a <- try(suppressWarnings(system(cmd, TRUE)),
-                                 silent = TRUE)
-                        if(inherits(a, "try-error")) next
+			if(is.null(a <- tryCatch(suppressWarnings(system(cmd, TRUE)),
+						 error = function(e) NULL)))
+			    next
                         a <- gsub("^ +","", a[1])
-                        if (length(grep("^[1-9]", a))) return(as.integer(a))
+                        if (grepl("^[1-9]", a)) return(as.integer(a))
                     }
             NA_integer_
         }
diff --git a/src/library/parallel/R/snow.R b/src/library/parallel/R/snow.R
index f7ba1ff..f1de890 100644
--- a/src/library/parallel/R/snow.R
+++ b/src/library/parallel/R/snow.R
@@ -1,7 +1,7 @@
 #  File src/library/parallel/R/snow.R
-#  Part of the R package, http://www.R-project.org
+#  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
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 ## Derived from snow 0.3-6 by Luke Tierney
 
@@ -84,8 +84,15 @@ initDefaultClusterOptions <- function(libname)
     rscript <- file.path(R.home("bin"), "Rscript")
     port <- Sys.getenv("R_PARALLEL_PORT")
     port <- if (identical(port, "random")) NA else as.integer(port)
-    if (is.na(port))
-        port <- 11000 + 1000 * ((stats::runif(1L) + unclass(Sys.time())/300) %% 1)
+    if (is.na(port)) {
+	seed <- .GlobalEnv$.Random.seed
+        ran1 <- sample.int(.Machine$integer.max - 1L, 1L) / .Machine$integer.max
+        port <- 11000 + 1000 * ((ran1 + unclass(Sys.time()) / 300) %% 1)
+	if(is.null(seed)) ## there was none, initially
+	    rm(    ".Random.seed",       envir = .GlobalEnv, inherits = FALSE)
+	else # reset
+	    assign(".Random.seed", seed, envir = .GlobalEnv, inherits = FALSE)
+    }
     Sys.i <- Sys.info()
     options <- list(port = as.integer(port),
                     timeout = 60 * 60 * 24 * 30, # 30 days
@@ -163,6 +170,8 @@ stopCluster.default <- function(cl) for (n in cl) stopNode(n)
 sendCall <- function (con, fun, args, return = TRUE, tag = NULL)
 {
     timing <-  .snowTimingData$running()
+    if (timing)
+        start <- proc.time()[3L]
     postNode(con, "EXEC",
              list(fun = fun, args = args, return = return, tag = tag))
     if (timing)
diff --git a/src/library/parallel/R/snowSOCK.R b/src/library/parallel/R/snowSOCK.R
index 1eeb2f1..c5e5a88 100644
--- a/src/library/parallel/R/snowSOCK.R
+++ b/src/library/parallel/R/snowSOCK.R
@@ -1,5 +1,5 @@
 #  File src/library/parallel/R/snowSOCK.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
 #  Copyright (C) 1995-2014 The R Core Team
 #
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 ## Derived from snow 0.3-6 by Luke Tierney
 ## Uses solely Rscript, and a function in the package rather than scripts.
@@ -41,13 +41,13 @@ newPSOCKnode <- function(machine = "localhost", ...,
                  " PORT=", port,
                  " OUT=", outfile,
                  " TIMEOUT=", timeout,
-                 " METHODS=", methods,
                  " XDR=", useXDR)
     arg <- "parallel:::.slaveRSOCK()"
     rscript <- if (getClusterOption("homogeneous", options)) {
         shQuote(getClusterOption("rscript", options))
     } else "Rscript"
     rscript_args <- getClusterOption("rscript_args", options)
+    if(methods) rscript_args <-c("--default-packages=datasets,utils,grDevices,graphics,stats,methods",  rscript_args)
 
     ## in principle we should quote these,
     ## but the current possible values do not need quoting
@@ -65,7 +65,7 @@ newPSOCKnode <- function(machine = "localhost", ...,
 
     if (manual) {
         cat("Manually start worker on", machine, "with\n    ", cmd, "\n")
-        flush.console()
+        utils::flush.console()
     } else {
         ## add the remote shell command if needed
         if (machine != "localhost") {
@@ -186,12 +186,10 @@ print.SOCKnode <- print.SOCK0node <- function(x, ...)
                PORT = {port <- value},
                OUT = {outfile <- value},
                TIMEOUT = {timeout <- value},
-               METHODS = {methods <- value},
                XDR = {useXDR <- as.logical(value)})
     }
     if (is.na(port)) stop("PORT must be specified")
 
-    if(as.logical(methods)) library("methods") ## because Rscript does not load methods by default
     ## We should not need to attach parallel, as we are running in the namespace.
 
     sinkWorkerOutput(outfile)
diff --git a/src/library/parallel/R/unix/forkCluster.R b/src/library/parallel/R/unix/forkCluster.R
index fdc39ef..baed8ee 100644
--- a/src/library/parallel/R/unix/forkCluster.R
+++ b/src/library/parallel/R/unix/forkCluster.R
@@ -1,5 +1,5 @@
 #  File src/library/parallel/R/unix/forkCluster.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
 #  Copyright (C) 1995-2014 The R Core Team
 #
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 makeForkCluster <- function(nnodes = getOption("mc.cores", 2L), ...)
 {
diff --git a/src/library/parallel/R/unix/mcfork.R b/src/library/parallel/R/unix/mcfork.R
index 67f9b5c..849955b 100644
--- a/src/library/parallel/R/unix/mcfork.R
+++ b/src/library/parallel/R/unix/mcfork.R
@@ -1,5 +1,5 @@
 #  File src/library/parallel/R/unix/mcfork.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
 #  Copyright (C) 1995-2013 The R Core Team
 #
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 ### Derived from multicore version 0.1-6 by Simon Urbanek
 
@@ -28,7 +28,12 @@ clean_pids <- function(e)
 
 mcfork <- function(estranged = FALSE) {
     r <- .Call(C_mc_fork, estranged)
-    processClass <- if (!r[1L]) "masterProcess" else
+
+    # Disable JIT in the child process because it could lead to repeated
+    # compilation of the same functions in each forked R process. Ideally
+    # the compiled code would propagate to other processes, but it is not
+    # currently possible.
+    processClass <- if (!r[1L]) { compiler::enableJIT(0) ; "masterProcess" }  else
     		    if (is.na(r[2L])) "estrangedProcess" else "childProcess"
     structure(list(pid = r[1L], fd = r[2:3]), class = c(processClass, "process"))
 }
@@ -89,7 +94,7 @@ processID <- function(process) {
               domain = NA)
 }
 
-# unused
+# unused in the package
 sendChildStdin <- function(child, what)
 {
     if (inherits(child, "process") || is.list(child)) child <- processID(child)
diff --git a/src/library/parallel/R/unix/mclapply.R b/src/library/parallel/R/unix/mclapply.R
index eda3acc..b88e5b3 100644
--- a/src/library/parallel/R/unix/mclapply.R
+++ b/src/library/parallel/R/unix/mclapply.R
@@ -1,5 +1,5 @@
 #  File src/library/parallel/R/unix/mclapply.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
 #  Copyright (C) 1995-2014 The R Core Team
 #
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 ### Derived from multicore version 0.1-6 by Simon Urbanek
 
@@ -22,7 +22,6 @@ mclapply <- function(X, FUN, ..., mc.preschedule = TRUE, mc.set.seed = TRUE,
                      mc.silent = FALSE, mc.cores = getOption("mc.cores", 2L),
                      mc.cleanup = TRUE, mc.allow.recursive = TRUE)
 {
-    env <- parent.frame()
     cores <- as.integer(mc.cores)
     if(is.na(cores) || cores < 1L) stop("'mc.cores' must be >= 1")
     .check_ncores(cores)
@@ -31,6 +30,7 @@ mclapply <- function(X, FUN, ..., mc.preschedule = TRUE, mc.set.seed = TRUE,
         return(lapply(X = X, FUN = FUN, ...))
 
     if(mc.set.seed) mc.reset.stream()
+    if(!length(X)) return(list())
 
     jobs <- list()
     cleanup <- function() {
diff --git a/src/library/parallel/R/unix/mcmapply.R b/src/library/parallel/R/unix/mcmapply.R
index 0b11a2e..1d40fab 100644
--- a/src/library/parallel/R/unix/mcmapply.R
+++ b/src/library/parallel/R/unix/mcmapply.R
@@ -1,5 +1,5 @@
 #  File src/library/parallel/R/unix/mcmapply.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
 #  Copyright (C) 1995-2012 The R Core Team
 #
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 mcmapply <-
     function(FUN, ..., MoreArgs = NULL, SIMPLIFY = TRUE, USE.NAMES = TRUE,
diff --git a/src/library/parallel/R/unix/mcparallel.R b/src/library/parallel/R/unix/mcparallel.R
index 6780ec9..f2e28d2 100644
--- a/src/library/parallel/R/unix/mcparallel.R
+++ b/src/library/parallel/R/unix/mcparallel.R
@@ -1,5 +1,5 @@
 #  File src/library/parallel/R/unix/mcparallel.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
 #  Copyright (C) 1995-2013 The R Core Team
 #
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 ### Derived from multicore version 0.1-6 by Simon Urbanek
 
@@ -51,25 +51,27 @@ mccollect <- function(jobs, wait = TRUE, timeout = 0, intermediate = FALSE)
 {
     if (missing(jobs)) jobs <- children()
     if (!length(jobs)) return (NULL)
-    if (isTRUE(intermediate)) intermediate <- str
+    if (isTRUE(intermediate)) intermediate <- utils::str
+    pids <- if (inherits(jobs, "process") || is.list(jobs))
+        processID(jobs) else jobs
+    if (!length(pids)) return(NULL)
+    if (!is.numeric(pids)) stop("invalid 'jobs' argument")
+    pids <- as.integer(pids)
+    pnames <- as.character(pids)
+    if (!inherits(jobs, "process") && is.list(jobs))
+        for(i in seq(jobs))
+            if (!is.null(jobs[[i]]$name))
+                pnames[i] <- as.character(jobs[[i]]$name)
+
     if (!wait) {
         s <- selectChildren(jobs, timeout)
         if (is.logical(s) || !length(s)) return(NULL)
-        lapply(s, function(x) {
+        res <- lapply(s, function(x) {
             r <- readChild(x)
             if (is.raw(r)) unserialize(r) else NULL
         })
+        names(res) <- pnames[match(s, pids)]
     } else {
-        pids <- if (inherits(jobs, "process") || is.list(jobs))
-            processID(jobs) else jobs
-        if (!length(pids)) return(NULL)
-        if (!is.numeric(pids)) stop("invalid 'jobs' argument")
-        pids <- as.integer(pids)
-        pnames <- as.character(pids)
-        if (!inherits(jobs, "process") && is.list(jobs))
-            for(i in seq(jobs))
-                if (!is.null(jobs[[i]]$name))
-                    pnames[i] <- as.character(jobs[[i]]$name)
         res <- lapply(pids, function(x) NULL)
         names(res) <- pnames
         fin <- rep(FALSE, length(jobs))
@@ -85,6 +87,6 @@ mccollect <- function(jobs, wait = TRUE, timeout = 0, intermediate = FALSE)
                 if (is.function(intermediate)) intermediate(res)
             } else if (all(is.na(match(pids, processID(children()))))) break
         }
-        res
     }
+    res
 }
diff --git a/src/library/parallel/R/unix/pvec.R b/src/library/parallel/R/unix/pvec.R
index 653705a..44c5e66 100644
--- a/src/library/parallel/R/unix/pvec.R
+++ b/src/library/parallel/R/unix/pvec.R
@@ -1,5 +1,5 @@
 #  File src/library/parallel/R/unix/pvec.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
 #  Copyright (C) 1995-2014 The R Core Team
 #
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 ### Derived from multicore version 0.1-6 by Simon Urbanek
 
@@ -23,7 +23,6 @@ pvec <- function(v, FUN, ..., mc.set.seed = TRUE, mc.silent = FALSE,
 {
     if (!is.vector(v)) stop("'v' must be a vector")
 
-    env <- parent.frame()
     cores <- as.integer(mc.cores)
     if(cores < 1L) stop("'mc.cores' must be >= 1")
     if(cores == 1L) return(FUN(v, ...))
diff --git a/src/library/parallel/R/windows/forkCluster.R b/src/library/parallel/R/windows/forkCluster.R
index c836642..0f49a04 100644
--- a/src/library/parallel/R/windows/forkCluster.R
+++ b/src/library/parallel/R/windows/forkCluster.R
@@ -1,5 +1,5 @@
 #  File src/library/parallel/R/windows/forkCluster.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
 #  Copyright (C) 1995-2012 The R Core Team
 #
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 makeForkCluster <- function(nnodes = getOption("mc.cores", 2L), ...)
     stop("fork clusters are not supported on Windows")
diff --git a/src/library/parallel/R/windows/mcdummies.R b/src/library/parallel/R/windows/mcdummies.R
index 85f640c..4d98b53 100644
--- a/src/library/parallel/R/windows/mcdummies.R
+++ b/src/library/parallel/R/windows/mcdummies.R
@@ -1,5 +1,5 @@
 #  File src/library/parallel/R/windows/mcdummies.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
 #  Copyright (C) 1995-2012 The R Core Team
 #
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 mclapply <- function(X, FUN, ..., mc.preschedule = TRUE, mc.set.seed = TRUE,
                      mc.silent = FALSE, mc.cores = 1L,
diff --git a/src/library/parallel/R/worker.R b/src/library/parallel/R/worker.R
index e542c60..69eb36b 100644
--- a/src/library/parallel/R/worker.R
+++ b/src/library/parallel/R/worker.R
@@ -1,5 +1,5 @@
 #  File src/library/parallel/R/worker.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
 #  Copyright (C) 1995-2012 The R Core Team
 #
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 ## Derived from snow 0.3-6 by Luke Tierney
 
@@ -44,7 +44,9 @@ slaveLoop <- function(master)
                 t2 <- proc.time()
                 value <- list(type = "VALUE", value = value, success = success,
                               time = t2 - t1, tag = msg$data$tag)
+                msg <- NULL ## release for GC
                 sendData(master, value)
+                value <- NULL ## release for GC
             }
         }, interrupt = function(e) NULL)
 }
diff --git a/src/library/parallel/R/zzz.R b/src/library/parallel/R/zzz.R
index 1940add..5efe7bf 100644
--- a/src/library/parallel/R/zzz.R
+++ b/src/library/parallel/R/zzz.R
@@ -1,7 +1,7 @@
 #  File src/library/parallel/R/zzz.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
-#  Copyright (C) 1995-2013 The R Core Team
+#  Copyright (C) 1995-2014 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
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 .noGenerics <- TRUE
 
diff --git a/src/library/parallel/inst/doc/parallel.pdf b/src/library/parallel/inst/doc/parallel.pdf
index 63a11fb..3774ee1 100644
Binary files a/src/library/parallel/inst/doc/parallel.pdf and b/src/library/parallel/inst/doc/parallel.pdf differ
diff --git a/src/library/parallel/man/RngStream.Rd b/src/library/parallel/man/RngStream.Rd
index 4df6e86..a8ce133 100644
--- a/src/library/parallel/man/RngStream.Rd
+++ b/src/library/parallel/man/RngStream.Rd
@@ -1,10 +1,8 @@
 % File src/library/parallel/man/RngStream.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 2011 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 2011-2014 R Core Team
 % Distributed under GPL 2 or later
 
-\newcommand{\CRANpkg}{\href{http://CRAN.R-project.org/package=#1}{\pkg{#1}}}
-
 \name{RNGstreams}
 \alias{nextRNGStream}
 \alias{nextRNGSubStream}
diff --git a/src/library/parallel/man/clusterApply.Rd b/src/library/parallel/man/clusterApply.Rd
index cc3dabb..b81527d 100644
--- a/src/library/parallel/man/clusterApply.Rd
+++ b/src/library/parallel/man/clusterApply.Rd
@@ -1,10 +1,8 @@
 % File src/library/parallel/man/clusterApply.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 2003-2012 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 2003-2014 R Core Team
 % Distributed under GPL 2 or later
 
-\newcommand{\CRANpkg}{\href{http://CRAN.R-project.org/package=#1}{\pkg{#1}}}
-
 \name{clusterApply}
 
 \alias{clusterApply}
diff --git a/src/library/parallel/man/detectCores.Rd b/src/library/parallel/man/detectCores.Rd
index 0744228..04b4edc 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, http://www.R-project.org
-% Copyright 2011-2014 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 2011-2016 R Core Team
 % Distributed under GPL 2 or later
 
 \name{detectCores}
@@ -10,34 +10,36 @@
   Attempt to detect the number of CPU cores on the current host.
 }
 \usage{
-#ifdef windows
 detectCores(all.tests = FALSE, logical = TRUE)
-#endif
-#ifdef unix
-detectCores(all.tests = FALSE, logical = FALSE)
-#endif
 }
 \arguments{
   \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}).}
+    (if \code{FALSE}) or logical CPUs (if \code{TRUE}).  Currently this
+    is honoured only on Linux, macOS, Sparc Solaris and Windows.}
 }
 \details{
-  This attempts to detect the number of CPU cores in the current
-  machine.
+  This attempts to detect the number of available CPU cores.
 
-  It has methods to do so for Linux, OS X, FreeBSD, Solaris,
+  It has methods to do so for Linux, macOS, FreeBSD, OpenBSD, Solaris,
   Irix and Windows.  \code{detectCores(TRUE)} could be tried on other
   Unix-alike systems.
+
+  Prior to \R 3.3.0 the default was \code{logical = FALSE} except on
+  Windows, but \code{logical = TRUE} had an effect only on Sparc Solaris
+  and Windows (where it was the default).
 }
 \value{
   An integer, \code{NA} if the answer is unknown.
 
   Exactly what this represents is OS-dependent: where possible by
-  default it represents physical cores and not logical
-  (e.g., hyperthreaded) CPUs.
+  default it counts logical (e.g., hyperthreaded) CPUs and not physical
+  cores or packages.
+
+  Under macOS there is a further distinction between \sQuote{available in
+    the current power management mode} and \sQuote{could be available
+    this boot}, and this function returns the first.
 
-  On Windows the default is the number of logical CPUs.
 #ifdef windows
   Only versions of Windows since XP SP3 are supported.  Microsoft
   documents that \code{logical = FALSE} it will report the number of
@@ -45,16 +47,15 @@ detectCores(all.tests = FALSE, logical = FALSE)
   or Server 2003: however it reported correctly on the XP systems we
   tested.
 #endif
-% http://msdn.microsoft.com/en-us/library/ms683194%28v=VS.85%29.aspx
+% https://msdn.microsoft.com/en-us/library/ms683194%28v=VS.85%29.aspx
 
-  Currently \code{logical} makes a difference on Sparc Solaris: there
-  \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 physical CPU
-  with 8 cores, and each core supports 8 hardware threads.  So
-  \code{detectCores(logical = FALSE)} returns 8, and
+  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
+  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
@@ -67,15 +68,12 @@ detectCores(all.tests = FALSE, logical = FALSE)
 \note{
   This is not suitable for use directly for the \code{mc.cores} argument
   of \code{mclapply} nor specifying the number of cores in
-  \code{makeCluster}.  First because it may return \code{NA}, and second
-  because it does not give the number of \emph{allowed} cores.
+  \code{makeCluster}.  First because it may return \code{NA}, second
+  because it does not give the number of \emph{allowed} cores, and third
+  because on Sparc Solaris and some Windows boxes it is not reasonable
+  to try to use all the logical CPUs at once.
 }
 \examples{
 detectCores()
-#ifdef unix
-detectCores(logical = TRUE)
-#endif
-#ifdef windows
 detectCores(logical = FALSE)
-#endif
 }
diff --git a/src/library/parallel/man/makeCluster.Rd b/src/library/parallel/man/makeCluster.Rd
index 5d3a3fa..eb40b36 100644
--- a/src/library/parallel/man/makeCluster.Rd
+++ b/src/library/parallel/man/makeCluster.Rd
@@ -1,10 +1,8 @@
 % File src/library/parallel/man/makePSOCKcluster.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 2003-2014 R Core Team
 % Distributed under GPL 2 or later
 
-\newcommand{\CRANpkg}{\href{http://CRAN.R-project.org/package=#1}{\pkg{#1}}}
-
 \name{makeCluster}
 \alias{makeCluster}
 \alias{makePSOCKcluster}
@@ -63,7 +61,7 @@ setDefaultCluster(cl = NULL)
     \item{\code{master}}{The host name of the master, as known to the
       workers.  This may not be the same as it is known to the master,
       and on private subnets it may be necessary to specify this as a
-      numeric IP address.  For example, OS X is likely to detect a
+      numeric IP address.  For example, macOS is likely to detect a
       machine as \samp{somename.local}, a name known only to itself.}
     \item{\code{port}}{The port number for the socket connection,
       default taken from the environment variable \env{R_PARALLEL_PORT},
@@ -89,7 +87,7 @@ setDefaultCluster(cl = NULL)
     \item{\code{rscript_args}}{Character vector of additional
       arguments for \command{Rscript} such as \option{--no-environ}.}
     \item{\code{renice}}{A numerical \sQuote{niceness} to set for the
-      worker processes, e.g.{} \code{15} for a low priority.
+      worker processes, e.g.\sspace{}\code{15} for a low priority.
       OS-dependent: see \code{\link{psnice}} for details.}
     \item{\code{rshcmd}}{The command to be run on the master to launch a
       process on another host.  Defaults to \command{ssh}.}
diff --git a/src/library/parallel/man/parallel-package.Rd b/src/library/parallel/man/parallel-package.Rd
index 8f4d66a..b12cd1a 100644
--- a/src/library/parallel/man/parallel-package.Rd
+++ b/src/library/parallel/man/parallel-package.Rd
@@ -1,10 +1,8 @@
 % File src/library/parallel/man/parallel-package.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 2011 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 2011-2016 R Core Team
 % Distributed under GPL 2 or later
 
-\newcommand{\CRANpkg}{\href{http://CRAN.R-project.org/package=#1}{\pkg{#1}}}
-
 \name{parallel-package}
 \alias{parallel-package}
 \alias{parallel}
@@ -16,18 +14,20 @@
   Support for parallel computation, including random-number generation.
 }
 \details{
-  This package is under development: a first version was released with
-  \R 2.14.0.
+  This package was first included with \R 2.14.0 in 2011.
 
   There is support for multiple RNG streams with the
   \samp{"L'Ecuyer-CMRG"} \link{RNG}: see \code{\link{nextRNGStream}}.
 
   It contains functionality derived from and pretty much equivalent to
-  that contained in packages \CRANpkg{multicore} (with some low-level
-  functions renamed and not exported) and \CRANpkg{snow} (for socket
-  clusters only, but MPI and NWS clusters generated by
-  \CRANpkg{snow} are also supported).  This package also provides
-  \code{\link{makeForkCluster}}.
+  that contained in packages \pkg{multicore} (formerly on
+  \acronym{CRAN}, with some low-level functions renamed and not
+  exported) and \CRANpkg{snow} (for socket clusters only, but MPI and
+  NWS clusters generated by \CRANpkg{snow} are also supported). There
+  have been many enhancements and bug fixes since 2011.
+
+  This package also provides \code{\link{makeForkCluster}} to create
+  socket clusters by forking (not Windows).
 
   For a complete list of exported functions, use
   \code{library(help = "parallel")}.
diff --git a/src/library/parallel/man/splitIndices.Rd b/src/library/parallel/man/splitIndices.Rd
index c8d548d..9715966 100644
--- a/src/library/parallel/man/splitIndices.Rd
+++ b/src/library/parallel/man/splitIndices.Rd
@@ -1,6 +1,6 @@
 % File src/library/parallel/man/splitIndices.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 2003-2011 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 2003-2014 R Core Team
 % Distributed under GPL 2 or later
 
 \name{splitIndices}
diff --git a/src/library/parallel/man/unix/children.Rd b/src/library/parallel/man/unix/children.Rd
index d624de2..5181c4e 100644
--- a/src/library/parallel/man/unix/children.Rd
+++ b/src/library/parallel/man/unix/children.Rd
@@ -1,10 +1,8 @@
 % File src/library/parallel/man/unix/children.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 2009-2011 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 2009-2016 R Core Team
 % Distributed under GPL 2 or later
 
-\newcommand{\CRANpkg}{\href{http://CRAN.R-project.org/package=#1}{\pkg{#1}}}
-
 \name{mcchildren}
 \alias{children}
 \alias{readChild}
@@ -58,7 +56,8 @@ mckill(process, signal = 2L)
 \details{
   \code{children} returns currently active children.
 
-  \code{readChild} reads data from a given child process.
+  \code{readChild} reads data (sent by \code{sendMaster}) from a given
+  child process.
 
   \code{selectChildren} checks children for available data.
 
@@ -101,10 +100,15 @@ mckill(process, signal = 2L)
 \author{
   Simon Urbanek and R Core.
 
-  Derived from the \CRANpkg{multicore} package.
+  Derived from the \pkg{multicore} package formerly on \acronym{CRAN}.
 }
 \section{Warning}{
-  This is a very low-level API for expert use only.
+  This is a very low-level interface for expert use only: it not
+  regarded as part of the \R API and subject to change without notice.
+
+  \code{sendMaster}, \code{readChild} and \code{sendChildStdin} did not
+  support long vectors prior to \R 3.4.0 and so were limited to
+  \eqn{2^{31} - 1}{2^31 - 1} bytes (and still are on 32-bit platforms).
 }
 \seealso{
   \code{\link{mcfork}}, \code{\link{sendMaster}}, \code{\link{mcparallel}}
diff --git a/src/library/parallel/man/unix/mcaffinity.Rd b/src/library/parallel/man/unix/mcaffinity.Rd
index 0fbc036..042ec24 100644
--- a/src/library/parallel/man/unix/mcaffinity.Rd
+++ b/src/library/parallel/man/unix/mcaffinity.Rd
@@ -1,10 +1,8 @@
 % File src/library/parallel/man/unix/mcaffinity.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 2009-2011 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 2009-2014 R Core Team
 % Distributed under GPL 2 or later
 
-\newcommand{\CRANpkg}{\href{http://CRAN.R-project.org/package=#1}{\pkg{#1}}}
-
 \name{mcaffinity}
 \alias{mcaffinity}
 
diff --git a/src/library/parallel/man/unix/mcfork.Rd b/src/library/parallel/man/unix/mcfork.Rd
index 5ac9af1..d058d43 100644
--- a/src/library/parallel/man/unix/mcfork.Rd
+++ b/src/library/parallel/man/unix/mcfork.Rd
@@ -1,11 +1,8 @@
 % File src/library/parallel/man/unix/mcfork.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 2009-2014 R Core Team
 % Distributed under GPL 2 or later
 
-\newcommand{\CRANpkg}{\href{http://CRAN.R-project.org/package=#1}{\pkg{#1}}}
-\newcommand{\sspace}{\ifelse{latex}{\out{~}}{ }}
-
 \name{mcfork}
 \alias{mcfork}
 \alias{mcexit}
@@ -84,7 +81,7 @@ mcexit(exit.code = 0L, send = NULL)
   because it leads to several processes sharing the same GUI which will
   likely cause chaos (and possibly crashes).  Child processes should
   never use on-screen graphics devices.  Some precautions have been
-  taken to make this usable in \command{R.app} on OS X, but users of
+  taken to make this usable in \command{R.app} on macOS, but users of
   third-party front-ends should consult their documentation.
 
   This can also apply to other connections (e.g., to an X server) created
@@ -99,7 +96,7 @@ mcexit(exit.code = 0L, send = NULL)
 \author{
   Simon Urbanek and R Core.
 
-  Derived from the \CRANpkg{multicore} package.
+  Derived from the \pkg{multicore} package formerly on \acronym{CRAN}.
 }
 \section{Warning}{
   This is a very low-level API for expert use only.
diff --git a/src/library/parallel/man/unix/mclapply.Rd b/src/library/parallel/man/unix/mclapply.Rd
index 0dac68f..8a38710 100644
--- a/src/library/parallel/man/unix/mclapply.Rd
+++ b/src/library/parallel/man/unix/mclapply.Rd
@@ -1,11 +1,8 @@
 % File src/library/parallel/man/mclapply.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 2009-2013 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 2009-2016 R Core Team
 % Distributed under GPL 2 or later
 
-\newcommand{\CRANpkg}{\href{http://CRAN.R-project.org/package=#1}{\pkg{#1}}}
-\newcommand{\sspace}{\ifelse{latex}{\out{~}}{ }}
-
 \name{mclapply}
 \alias{mclapply}
 \alias{mcmapply}
@@ -85,9 +82,9 @@ mcMap(f, ...)
 
   By default (\code{mc.preschedule = TRUE}) the input \code{X} is split
   into as many parts as there are cores (currently the values are spread
-  across the cores sequentially, i.e.\sspace{}first value to core 1, second to
-  core 2, \ldots (core + 1)-th value to core 1 etc.) and then one process
-  is forked to each core and the results are collected.
+  across the cores sequentially, i.e.\sspace{}first value to core 1,
+  second to core 2, \ldots (core + 1)-th value to core 1 etc.) and then
+  one process is forked to each core and the results are collected.
 
   Without prescheduling, a separate job is forked for each value of
   \code{X}.  To ensure that no more than \code{mc.cores} jobs are
@@ -106,7 +103,12 @@ mcMap(f, ...)
   than 100 cores or so (see \code{ulimit -n} or similar in your OS
   documentation) unless you raise the limit of permissible open file
   descriptors (fork will fail with error \code{"unable to create a
-  pipe"}).
+    pipe"}).
+  
+  Prior to \R 3.4.0 and on a 32-bit platform, the \link{serialize}d
+  result from each forked process is limited to \eqn{2^{31} - 1}{2^31 -
+    1} bytes.  (Returning very large results via serialization is
+  inefficient and should be avoided.)
 }
 
 \value{
@@ -134,7 +136,7 @@ mcMap(f, ...)
   devices.
 
   Some precautions have been taken to make this usable in
-  \command{R.app} on OS X, but users of third-party front-ends
+  \command{R.app} on macOS, but users of third-party front-ends
   should consult their documentation.
 
   Note that \pkg{tcltk} counts as a GUI for these purposes since
@@ -146,7 +148,7 @@ mcMap(f, ...)
 \author{
   Simon Urbanek and R Core.
 
-  Derived from the \CRANpkg{multicore} package.
+  Derived from the \pkg{multicore} package formerly on \acronym{CRAN}.
 }
 \seealso{
   \code{\link{mcparallel}}, \code{\link{pvec}},
diff --git a/src/library/parallel/man/unix/mcparallel.Rd b/src/library/parallel/man/unix/mcparallel.Rd
index bc197c4..325da62 100644
--- a/src/library/parallel/man/unix/mcparallel.Rd
+++ b/src/library/parallel/man/unix/mcparallel.Rd
@@ -1,11 +1,8 @@
 % File src/library/parallel/man/unix/mcparallel.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 2009-2013 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 2009-2016 R Core Team
 % Distributed under GPL 2 or later
 
-\newcommand{\CRANpkg}{\href{http://CRAN.R-project.org/package=#1}{\pkg{#1}}}
-\newcommand{\sspace}{\ifelse{latex}{\out{~}}{ }}
-
 \name{mcparallel}
 \alias{mccollect}
 \alias{mcparallel}
@@ -121,18 +118,18 @@ mccollect(jobs, wait = TRUE, timeout = 0, intermediate = FALSE)
 }
 
 \note{
-  Package \CRANpkg{multicore} also exported functions \code{collect} and
-  \code{parallel}.  These names are easily masked (for example package
-  \CRANpkg{lattice} also has a function \code{parallel}) and they are not
-  supplied in this package.
+    Prior to \R 3.4.0 and on a 32-bit platform, the \link{serialize}d
+  result from each forked process is limited to \eqn{2^{31} - 1}{2^31 -
+    1} bytes.  (Returning very large results via serialization is
+  inefficient and should be avoided.)
 }
 
 
 \author{
   Simon Urbanek and R Core.
 
-  Derived from the \CRANpkg{multicore} package (but with different
-  handling of the RNG stream).
+  Derived from the \pkg{multicore} package formerly on
+  \acronym{CRAN}. (but with different handling of the RNG stream).
 }
 \seealso{
   \code{\link{pvec}}, \code{\link{mclapply}}
diff --git a/src/library/parallel/man/unix/pvec.Rd b/src/library/parallel/man/unix/pvec.Rd
index 73cf311..1baabb2 100644
--- a/src/library/parallel/man/unix/pvec.Rd
+++ b/src/library/parallel/man/unix/pvec.Rd
@@ -1,11 +1,8 @@
 % File src/library/parallel/man/unix/pvec.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 2009-2014 R Core Team
 % Distributed under GPL 2 or later
 
-\newcommand{\CRANpkg}{\href{http://CRAN.R-project.org/package=#1}{\pkg{#1}}}
-\newcommand{\sspace}{\ifelse{latex}{\out{~}}{ }}
-
 \name{pvec}
 \alias{pvec}
 \title{Parallelize a Vector Map Function using Forking}
@@ -85,7 +82,7 @@ pvec(v, FUN, ..., mc.set.seed = TRUE, mc.silent = FALSE,
 \author{
   Simon Urbanek and R Core.
 
-  Derived from the \CRANpkg{multicore} package.
+  Derived from the \pkg{multicore} package formerly on \acronym{CRAN}.
 }
 \seealso{
   \code{\link{mcparallel}}, \code{\link{mclapply}},
diff --git a/src/library/parallel/man/windows/mcdummies.Rd b/src/library/parallel/man/windows/mcdummies.Rd
index 7c006a7..dabe4c5 100644
--- a/src/library/parallel/man/windows/mcdummies.Rd
+++ b/src/library/parallel/man/windows/mcdummies.Rd
@@ -1,10 +1,8 @@
 % File src/library/parallel/man/windows/mcdummies.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 2009-2011 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 2009-2014 R Core Team
 % Distributed under GPL 2 or later
 
-\newcommand{\sspace}{\ifelse{latex}{\out{~}}{ }}
-
 \name{mclapply}
 \alias{mclapply}
 \alias{pvec}
diff --git a/src/library/parallel/po/R-da.po b/src/library/parallel/po/R-da.po
index 0c5627d..b49e97a 100644
--- a/src/library/parallel/po/R-da.po
+++ b/src/library/parallel/po/R-da.po
@@ -2,7 +2,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: R 3.0.0\n"
 "Report-Msgid-Bugs-To: bugs.r-project.org\n"
-"POT-Creation-Date: 2013-02-19 07:12\n"
+"POT-Creation-Date: 2014-09-21 07:12\n"
 "PO-Revision-Date: 2012-01-07 21:49+0200\n"
 "Last-Translator: Joe <joedalton2 at yahoo.dk>\n"
 "Language-Team: LANGUAGE <LL at li.org>\n"
@@ -41,6 +41,10 @@ msgstr "ikke en gyldig klynge"
 msgid "unknown cluster type"
 msgstr "ukendt klyngetype"
 
+#, fuzzy
+msgid "numeric 'names' must be >= 1"
+msgstr "»nnodes« skal være >= 1"
+
 msgid "node of a socket cluster on host %s with pid %d"
 msgstr "knude for en sokkelklynge på vært %s med pid %d"
 
diff --git a/src/library/parallel/po/R-de.po b/src/library/parallel/po/R-de.po
index 3341e78..514aa64 100644
--- a/src/library/parallel/po/R-de.po
+++ b/src/library/parallel/po/R-de.po
@@ -4,13 +4,13 @@
 # Detlef Steuer <steuer at hsu-hh.de>, 2011-2014.
 msgid ""
 msgstr ""
-"Project-Id-Version: R 3.1.0\n"
+"Project-Id-Version: R 3.2.0\n"
 "Report-Msgid-Bugs-To: bugs.r-project.org\n"
-"POT-Creation-Date: 2013-02-19 07:12\n"
-"PO-Revision-Date: 2013-03-01 16:31+0100\n"
+"POT-Creation-Date: 2014-09-21 07:12\n"
+"PO-Revision-Date: 2015-03-20 16:16+0100\n"
 "Last-Translator: Detlef Steuer <steuer at hsu-hh.de>\n"
 "Language-Team: R-Core <r-core at r-project.org>\n"
-"Language: \n"
+"Language: de\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
@@ -24,7 +24,7 @@ msgstr "benötige mindestens ein Argument"
 
 msgid "zero-length inputs cannot be mixed with those of non-zero length"
 msgstr ""
-"Eingaben mit Länge Null können nicht mit Eingaben anderer Länge\n"
+"Eingaben mit Länge Null können nicht mit Eingaben anderer Länge "
 "gemischt werden"
 
 msgid "dim(X) must have a positive length"
@@ -45,6 +45,9 @@ msgstr "kein zulässiger Cluster"
 msgid "unknown cluster type"
 msgstr "unbekannter Clustertyp"
 
+msgid "numeric 'names' must be >= 1"
+msgstr "numerisches 'names' muss >= 1 sein"
+
 msgid "node of a socket cluster on host %s with pid %d"
 msgstr "Knoten des Socketclusters auf System %s mit PID %d"
 
@@ -81,7 +84,7 @@ msgstr "alle verplanten Kerne berichten Fehler im Benutzerkode"
 
 msgid "Zero-length inputs cannot be mixed with those of non-zero length"
 msgstr ""
-"Eingaben mit Länge Null können nicht mit Eingaben anderer Länge\n"
+"Eingaben mit Länge Null können nicht mit Eingaben anderer Länge "
 "gemischt werden"
 
 msgid "invalid 'jobs' argument"
@@ -112,7 +115,7 @@ msgid_plural ""
 "scheduled cores %s encountered errors in user code, all values of the jobs "
 "will be affected"
 msgstr[0] ""
-"eingeplanter Kern %s widerfuhr Fehler in Benutzerkode, alle Werte des Jobs "
+"eingeplanter Kern %s berichtet Fehler in Benutzerkode, alle Werte des Jobs "
 "werden betroffen sein"
 msgstr[1] ""
 "eingeplante Kerne %s berichten Fehler in Benutzerkode, alle Werte der Jobs "
diff --git a/src/library/parallel/po/R-fr.po b/src/library/parallel/po/R-fr.po
index 2722ca3..acd17a2 100644
--- a/src/library/parallel/po/R-fr.po
+++ b/src/library/parallel/po/R-fr.po
@@ -7,7 +7,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: R 2.14.0\n"
 "Report-Msgid-Bugs-To: bugs.r-project.org\n"
-"POT-Creation-Date: 2013-02-19 07:12\n"
+"POT-Creation-Date: 2014-09-21 07:12\n"
 "PO-Revision-Date: 2013-03-18 22:08+0100\n"
 "Last-Translator: Philippe Grosjean <phgrosjean at sciviews.org>\n"
 "Language-Team: French <R-core at r-project.org>\n"
@@ -47,6 +47,10 @@ msgstr "groupe de processus invalide"
 msgid "unknown cluster type"
 msgstr "groupe de processus de type inconnu"
 
+#, fuzzy
+msgid "numeric 'names' must be >= 1"
+msgstr "'nnodes' doit �tre >= 1"
+
 msgid "node of a socket cluster on host %s with pid %d"
 msgstr "noeud d'un groupe de processus socket sur l'h�te %s avec le pid %d"
 
diff --git a/src/library/parallel/po/R-ko.po b/src/library/parallel/po/R-ko.po
index f0fc6bc..6234eb3 100644
--- a/src/library/parallel/po/R-ko.po
+++ b/src/library/parallel/po/R-ko.po
@@ -1,30 +1,37 @@
 # Korean translation for R parallel package
-# src/library/parallel/po/R-ko.po
-# Copyright (C) 1995-2014 The R Core Team
+# ./parallel/po/R-ko.po
+#
+# Copyright (C) 1995-2016 The R Core Team
+#
 # This file is distributed under the same license as the R parallel package.
-# Chel Hee Lee <chl948 at mail.usask.ca>, 2008-2014.
+# Maintained by Chel Hee Lee <chl948 at mail.usask.ca>, 2008-2016.
+# Contact: Chel Hee Lee <gnustats at gmail.com>
+#
+# Notes:
+# Under development (unstable) starting from 11-APR-2016 for R-3.3.1 - QC: in progress
+# Freezed on 10-APR-2016 for R-3.3.0 - QC: PASS
+# Freezed on 30-MAR-2015 for R-3.2.0 - QC: PASS
+# Freezed on 06-FEB-2015 for R-3.1.3 - QC: PASS
 #
 msgid ""
 msgstr ""
-"Project-Id-Version: R 3.1.0\n"
+"Project-Id-Version: R-3.3.0\n"
 "Report-Msgid-Bugs-To: bugs.r-project.org\n"
-"POT-Creation-Date: 2013-03-07 08:36\n"
-"PO-Revision-Date: 2014-03-27 09:06-0600\n"
+"POT-Creation-Date: 2014-09-21 07:12\n"
+"PO-Revision-Date: 2016-04-11 13:08-0600\n"
 "Last-Translator: Chel Hee Lee <chl948 at mail.usask.ca>\n"
-"Language-Team:  <chl948 at mail.usask.ca>\n"
+"Language-Team: Chel Hee Lee <chl948 at mail.usask.ca>\n"
 "Language: ko\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
 "Plural-Forms: nplurals=1; plural=0;\n"
-"X-Poedit-SourceCharset: UTF-8\n"
-"X-Generator: Poedit 1.5.4\n"
 
 msgid "invalid value of 'seed'"
-msgstr "유효하지 않은 'seed'값입니다"
+msgstr "'seed'값이 올바르지 않습니다."
 
 msgid "need at least one argument"
-msgstr "최소한 하나의 인수를 필요로 합니다"
+msgstr "최소한 하나 이상의 인자가 필요합니다."
 
 msgid "zero-length inputs cannot be mixed with those of non-zero length"
 msgstr "길이가 0인 입력은 길이가 0이 아닌 입력들과 혼용될 수 없습니다"
@@ -47,6 +54,9 @@ msgstr "유효한 클러스터가 아닙니다"
 msgid "unknown cluster type"
 msgstr "알 수 없는 클러스터 유형입니다"
 
+msgid "numeric 'names' must be >= 1"
+msgstr "'names'는 반드시 1보다 크거나 같아야 합니다."
+
 msgid "node of a socket cluster on host %s with pid %d"
 msgstr "pid가 %2$d인 호스트 %1$s에 있는 소켓 클러스터의 노드입니다"
 
@@ -54,7 +64,7 @@ msgid "PORT must be specified"
 msgstr "PORT가 반드시 지정되어야 합니다"
 
 msgid "'nnodes' must be >= 1"
-msgstr "'nnodes'는 반드시 1보다 크거나 같아야 합니다"
+msgstr "'nnodes'는 반드시 1보다 크거나 같아야 합니다."
 
 msgid "invalid 'child' argument"
 msgstr "유효하지 않은 'child' 인자입니다"
@@ -72,7 +82,7 @@ msgid "'what' must be a character or raw vector"
 msgstr "'what'은 반드시 문자 또는 raw 벡터이어야 합니다"
 
 msgid "'mc.cores' must be >= 1"
-msgstr "'mc.cores'는 반드시 1보다 크거나 같아야 합니다"
+msgstr "'mc.cores'는 1보다 크거나 같아야 합니다."
 
 msgid "%d function calls resulted in an error"
 msgstr "%d번의 함수 호출결과 에러가 발생했습니다"
@@ -84,10 +94,10 @@ msgid "Zero-length inputs cannot be mixed with those of non-zero length"
 msgstr "길이가 0인 입력은 길이가 0이 아닌 입력들과 혼용될 수 없습니다"
 
 msgid "invalid 'jobs' argument"
-msgstr "유효하지 않은 'jobs' 인자입니다"
+msgstr "올바르지 않은 'jobs' 인자입니다."
 
 msgid "'v' must be a vector"
-msgstr "'v'는 반드시 벡터이어야 합니다"
+msgstr "'v'는 벡터이어야 합니다."
 
 msgid "some results may be missing, folded or caused an error"
 msgstr "일부 결과가 누락될 수도 있고, 오류를 접하거나 발생시켰을 수 있습니다"
diff --git a/src/library/parallel/po/R-parallel.pot b/src/library/parallel/po/R-parallel.pot
index 0d0dec3..f794cff 100644
--- a/src/library/parallel/po/R-parallel.pot
+++ b/src/library/parallel/po/R-parallel.pot
@@ -1,8 +1,7 @@
 msgid ""
 msgstr ""
-"Project-Id-Version: R 3.1.0\n"
-"Report-Msgid-Bugs-To: bugs.r-project.org\n"
-"POT-Creation-Date: 2013-03-07 08:36\n"
+"Project-Id-Version: parallel 3.4.0\n"
+"POT-Creation-Date: 2016-04-01 09:50\n"
 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
 "Last-Translator: FULL NAME <EMAIL at ADDRESS>\n"
 "Language-Team: LANGUAGE <LL at li.org>\n"
@@ -38,6 +37,9 @@ msgstr ""
 msgid "unknown cluster type"
 msgstr ""
 
+msgid "numeric 'names' must be >= 1"
+msgstr ""
+
 msgid "node of a socket cluster on host %s with pid %d"
 msgstr ""
 
diff --git a/src/library/parallel/po/R-pl.po b/src/library/parallel/po/R-pl.po
index 19dfd77..5c7992a 100644
--- a/src/library/parallel/po/R-pl.po
+++ b/src/library/parallel/po/R-pl.po
@@ -1,8 +1,8 @@
 msgid ""
 msgstr ""
-"Project-Id-Version: R 3.1.0\n"
+"Project-Id-Version: R 3.4.0\n"
 "Report-Msgid-Bugs-To: bugs.r-project.org\n"
-"POT-Creation-Date: 2013-03-07 08:36\n"
+"POT-Creation-Date: 2016-04-04 08:15\n"
 "PO-Revision-Date: \n"
 "Last-Translator: Łukasz Daniel <lukasz.daniel at gmail.com>\n"
 "Language-Team: Łukasz Daniel <lukasz.daniel at gmail.com>\n"
@@ -13,185 +13,162 @@ msgstr ""
 "na-Revision-Date: 2012-05-29 07:55+0100\n"
 "Plural-Forms: nplurals=3; plural=(n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 "
 "|| n%100>=20) ? 1 : 2);\n"
-"X-Poedit-SourceCharset: iso-8859-1\n"
-"X-Generator: Poedit 1.5.4\n"
+"X-Poedit-SourceCharset: UTF-8\n"
+"X-Generator: Poedit 1.8.7\n"
 
-# parallel/R/RngStream.R: 22
-# stop("invalid value of 'seed'")
-# parallel/R/RngStream.R: 29
-# stop("invalid value of 'seed'")
-msgid "invalid value of 'seed'"
-msgstr "niepoprawna wartość 'seed'"
-
-# parallel/R/clusterApply.R: 100
-# stop("need at least one argument")
-msgid "need at least one argument"
-msgstr "co najmniej jeden argument jest wymagany"
-
-# parallel/R/clusterApply.R: 106
-# stop("zero-length inputs cannot be mixed with those of non-zero length")
-msgid "zero-length inputs cannot be mixed with those of non-zero length"
-msgstr ""
-"wejścia o zerowej długości nie mogą być pomieszane z tymi o niezerowej "
-"długości"
-
-# parallel/R/clusterApply.R: 236
-# stop("dim(X) must have a positive length")
-msgid "dim(X) must have a positive length"
-msgstr "'dim(X)' musi mieć dodatnią długość"
+#. R/unix/mclapply.R: gettextf("%d function calls resulted in an error", has.errors)
+#: R/unix/mclapply.R:0
+msgid "%d function calls resulted in an error"
+msgstr "wywołania funkcji %d spowodowało błąd"
 
-# parallel/R/clusterApply.R: 249
-# stop("'X' must have named dimnames")
+#. R/clusterApply.R: stop("'X' must have named dimnames")
+#: R/clusterApply.R:0
 msgid "'X' must have named dimnames"
 msgstr "'X' musi mieć nazwane wymiary"
 
-# parallel/R/clusterApply.R: 252
-# stop("not all elements of 'MARGIN' are names of dimensions")
-msgid "not all elements of 'MARGIN' are names of dimensions"
-msgstr "nie wszystkie elementy 'MARGIN' są nazwami wymiarów"
-
-# parallel/R/snow.R: 27
-# stop("no cluster 'cl' supplied and none is registered")
-msgid "no cluster 'cl' supplied and none is registered"
-msgstr ""
-"nie dostarczono argumentu klastr 'cl' oraz żaden nie jest zarejestrowany"
-
-# parallel/R/snow.R: 43
-# stop("not a valid cluster")
-msgid "not a valid cluster"
-msgstr "to nie jest poprawny klaster"
+#. R/unix/mcfork.R: stop("'child' must be a valid child process")
+#: R/unix/mcfork.R:0
+msgid "'child' must be a valid child process"
+msgstr "argument 'child' musi być poprawnym procesem potomnym"
 
-# parallel/R/snow.R: 141
-# stop("unknown cluster type")
-msgid "unknown cluster type"
-msgstr "nieznany typ klastra"
+#. R/unix/mcfork.R: stop("'children' must be a list of processes or a single process")
+#. R/unix/mcfork.R: stop("'children' must be a list of processes or a single process")
+#: R/unix/mcfork.R:0
+msgid "'children' must be a list of processes or a single process"
+msgstr "argument 'children' musi być listą procesów lub pojedynczym procesem"
 
-# parallel/R/snowSOCK.R: 144
-# gettextf("node of a socket cluster on host %s with pid %d",
-#                     sQuote(x[["host"]]), pid)
-msgid "node of a socket cluster on host %s with pid %d"
-msgstr "węzeł gniazda klastra na hoście %s z pid %d"
+#. R/windows/mcdummies.R: stop("'mc.cores' > 1 is not supported on Windows")
+#. R/windows/mcdummies.R: stop("'mc.cores' > 1 is not supported on Windows")
+#. R/windows/mcdummies.R: stop("'mc.cores' > 1 is not supported on Windows")
+#: R/windows/mcdummies.R:0
+msgid "'mc.cores' > 1 is not supported on Windows"
+msgstr "argument 'mc.cores' > 1 nie jest wspierany w systemach Windows"
 
-# parallel/R/snowSOCK.R: 182
-# stop("PORT must be specified")
-msgid "PORT must be specified"
-msgstr "argument 'port' musi być określony"
+#. R/unix/mclapply.R: stop("'mc.cores' must be >= 1")
+#. R/unix/pvec.R: stop("'mc.cores' must be >= 1")
+#. R/windows/mcdummies.R: stop("'mc.cores' must be >= 1")
+#. R/windows/mcdummies.R: stop("'mc.cores' must be >= 1")
+#. R/windows/mcdummies.R: stop("'mc.cores' must be >= 1")
+#: R/unix/mclapply.R:0 R/unix/pvec.R:0 R/windows/mcdummies.R:0
+msgid "'mc.cores' must be >= 1"
+msgstr "argument 'mc.cores' musi być >= 1"
 
-# parallel/R/unix/forkCluster.R: 21
-# stop("'nnodes' must be >= 1")
+#. R/unix/forkCluster.R: stop("'nnodes' must be >= 1")
+#: R/unix/forkCluster.R:0
 msgid "'nnodes' must be >= 1"
 msgstr "argument 'nnodes' musi być >= 1"
 
-# parallel/R/unix/mcfork.R: 44
-# stop("invalid 'child' argument")
-# parallel/R/unix/mcfork.R: 64
-# stop("invalid 'child' argument")
-msgid "invalid 'child' argument"
-msgstr "niepoprawny argument 'child'"
-
-# parallel/R/unix/mcfork.R: 55
-# stop("'children' must be a list of processes or a single process")
-# parallel/R/unix/mcfork.R: 57
-# stop("'children' must be a list of processes or a single process")
-msgid "'children' must be a list of processes or a single process"
-msgstr "argument 'children' musi być listą procesów lub pojedynczym procesem"
-
-# parallel/R/unix/mcfork.R: 88
-# stop(gettextf("'process' must be of class %s", dQuote("process")),
-#               domain = NA)
+#. R/unix/mcfork.R: gettextf("'process' must be of class %s", dQuote("process"))
+#: R/unix/mcfork.R:0
 msgid "'process' must be of class %s"
 msgstr "argument 'process' musi być klasy %s"
 
-# parallel/R/unix/mcfork.R: 97
-# stop("'child' must be a valid child process")
-msgid "'child' must be a valid child process"
-msgstr "argument 'child' musi być poprawnym procesem potomnym"
+#. R/unix/pvec.R: stop("'v' must be a vector")
+#. R/windows/mcdummies.R: stop("'v' must be a vector")
+#: R/unix/pvec.R:0 R/windows/mcdummies.R:0
+msgid "'v' must be a vector"
+msgstr "argument 'v' musi być wektorem"
 
-# parallel/R/unix/mcfork.R: 100
-# stop("'what' must be a character or raw vector")
+#. R/unix/mcfork.R: stop("'what' must be a character or raw vector")
+#: R/unix/mcfork.R:0
 msgid "'what' must be a character or raw vector"
 msgstr "argument 'what' musi być tekstem albo pustym wektorem"
 
-# parallel/R/unix/mclapply.R: 27
-# stop("'mc.cores' must be >= 1")
-# parallel/R/unix/pvec.R: 28
-# stop("'mc.cores' must be >= 1")
-# parallel/R/windows/mcdummies.R: 24
-# stop("'mc.cores' must be >= 1")
-# parallel/R/windows/mcdummies.R: 34
-# stop("'mc.cores' must be >= 1")
-# parallel/R/windows/mcdummies.R: 45
-# stop("'mc.cores' must be >= 1")
-msgid "'mc.cores' must be >= 1"
-msgstr "argument 'mc.cores' musi być >= 1"
-
-# parallel/R/unix/mclapply.R: 111
-# warning(gettextf("%d function calls resulted in an error",
-#                              has.errors), domain = NA)
-msgid "%d function calls resulted in an error"
-msgstr "wywołania funkcji %d spowodowało błąd"
-
-# parallel/R/unix/mclapply.R: 173
-# warning("all scheduled cores encountered errors in user code")
-msgid "all scheduled cores encountered errors in user code"
-msgstr "wszystkie zaplanowane jądra napotkały błędy w kodzie użytkownika"
+#. R/snowSOCK.R: stop("PORT must be specified")
+#: R/snowSOCK.R:0
+msgid "PORT must be specified"
+msgstr "argument 'port' musi być określony"
 
-# parallel/R/unix/mcmapply.R: 31
-# stop("Zero-length inputs cannot be mixed with those of non-zero length")
+#. R/unix/mcmapply.R: stop("Zero-length inputs cannot be mixed with those of non-zero length")
+#: R/unix/mcmapply.R:0
 msgid "Zero-length inputs cannot be mixed with those of non-zero length"
 msgstr ""
 "Wejścia o zerowej długości nie mogą być pomieszane z tymi o niezerowej "
 "długości"
 
-# parallel/R/unix/mcparallel.R: 66
-# stop("invalid 'jobs' argument")
+#. R/unix/mclapply.R: warning("all scheduled cores encountered errors in user code")
+#: R/unix/mclapply.R:0
+msgid "all scheduled cores encountered errors in user code"
+msgstr "wszystkie zaplanowane jądra napotkały błędy w kodzie użytkownika"
+
+#. R/clusterApply.R: stop("dim(X) must have a positive length")
+#: R/clusterApply.R:0
+msgid "dim(X) must have a positive length"
+msgstr "'dim(X)' musi mieć dodatnią długość"
+
+#. R/windows/forkCluster.R: stop("fork clusters are not supported on Windows")
+#: R/windows/forkCluster.R:0
+msgid "fork clusters are not supported on Windows"
+msgstr "rozgałęzione klastry nie są obsługiwane w systemie Windows"
+
+#. R/unix/mcfork.R: stop("invalid 'child' argument")
+#. R/unix/mcfork.R: stop("invalid 'child' argument")
+#: R/unix/mcfork.R:0
+msgid "invalid 'child' argument"
+msgstr "niepoprawny argument 'child'"
+
+#. R/unix/mcparallel.R: stop("invalid 'jobs' argument")
+#: R/unix/mcparallel.R:0
 msgid "invalid 'jobs' argument"
 msgstr "niepoprawny argument 'jobs'"
 
-# parallel/R/unix/pvec.R: 24
-# stop("'v' must be a vector")
-# parallel/R/windows/mcdummies.R: 32
-# stop("'v' must be a vector")
-msgid "'v' must be a vector"
-msgstr "argument 'v' musi być wektorem"
+#. R/RngStream.R: stop("invalid value of 'seed'")
+#. R/RngStream.R: stop("invalid value of 'seed'")
+#: R/RngStream.R:0
+msgid "invalid value of 'seed'"
+msgstr "niepoprawna wartość 'seed'"
+
+#. R/clusterApply.R: stop("need at least one argument")
+#: R/clusterApply.R:0
+msgid "need at least one argument"
+msgstr "co najmniej jeden argument jest wymagany"
+
+#. R/snow.R: stop("no cluster 'cl' supplied and none is registered")
+#: R/snow.R:0
+msgid "no cluster 'cl' supplied and none is registered"
+msgstr ""
+"nie dostarczono argumentu klastr 'cl' oraz żaden nie jest zarejestrowany"
+
+#. R/snowSOCK.R: gettextf("node of a socket cluster on host %s with pid %d", sQuote(x[["host"]]),     pid)
+#: R/snowSOCK.R:0
+msgid "node of a socket cluster on host %s with pid %d"
+msgstr "węzeł gniazda klastra na hoście %s z pid %d"
+
+#. R/snow.R: stop("not a valid cluster")
+#: R/snow.R:0
+msgid "not a valid cluster"
+msgstr "to nie jest poprawny klaster"
 
-# parallel/R/unix/pvec.R: 71
-# warning("some results may be missing, folded or caused an error")
+#. R/clusterApply.R: stop("not all elements of 'MARGIN' are names of dimensions")
+#: R/clusterApply.R:0
+msgid "not all elements of 'MARGIN' are names of dimensions"
+msgstr "nie wszystkie elementy 'MARGIN' są nazwami wymiarów"
+
+#. R/snowSOCK.R: stop("numeric 'names' must be >= 1")
+#: R/snowSOCK.R:0
+msgid "numeric 'names' must be >= 1"
+msgstr "argument 'names' musi być >= 1"
+
+#. R/unix/pvec.R: warning("some results may be missing, folded or caused an error")
+#: R/unix/pvec.R:0
 msgid "some results may be missing, folded or caused an error"
 msgstr ""
 "niektórych wyników może brakować, mogą być zwinięte lub spowodowały błąd"
 
-# parallel/R/windows/forkCluster.R: 20
-# stop("fork clusters are not supported on Windows")
-msgid "fork clusters are not supported on Windows"
-msgstr "rozgałęzione klastry nie są obsługiwane w systemie Windows"
-
-# parallel/R/windows/mcdummies.R: 25
-# stop("'mc.cores' > 1 is not supported on Windows")
-# parallel/R/windows/mcdummies.R: 35
-# stop("'mc.cores' > 1 is not supported on Windows")
-# parallel/R/windows/mcdummies.R: 46
-# stop("'mc.cores' > 1 is not supported on Windows")
-msgid "'mc.cores' > 1 is not supported on Windows"
-msgstr "argument 'mc.cores' > 1 nie jest wspierany w systemach Windows"
+#. R/snow.R: stop("unknown cluster type")
+#: R/snow.R:0
+msgid "unknown cluster type"
+msgstr "nieznany typ klastra"
 
-# parallel/R/snowSOCK.R: 131
-# sprintf(ngettext(length(hosts),
-#                             "socket cluster with %d nodes on host %s",
-#                             "socket cluster with %d nodes on hosts %s"),
-#                    nc, paste(sQuote(hosts), collapse = ", "))
-msgid "socket cluster with %d nodes on host %s"
-msgid_plural "socket cluster with %d nodes on hosts %s"
-msgstr[0] "gniazdo klastra z %d węzłem na hoście %s"
-msgstr[1] "gniazdo klastra z %d węzłami na hoście %s"
-msgstr[2] "gniazdo klastra z %d węzłami na hoście %s"
+#. R/clusterApply.R: stop("zero-length inputs cannot be mixed with those of non-zero length")
+#: R/clusterApply.R:0
+msgid "zero-length inputs cannot be mixed with those of non-zero length"
+msgstr ""
+"wejścia o zerowej długości nie mogą być pomieszane z tymi o niezerowej "
+"długości"
 
-# parallel/R/unix/mclapply.R: 175
-# warning(sprintf(ngettext(has.errors,
-#                                      "scheduled core %s encountered error in user code, all values of the job will be affected",
-#                                      "scheduled cores %s encountered errors in user code, all values of the jobs will be affected"),
-#                             paste(has.errors, collapse = ", ")),
-#                     domain = NA)
+#. R/unix/mclapply.R: ngettext(has.errors, "scheduled core %s encountered error in user code, all values of the job will be affected",     "scheduled cores %s encountered errors in user code, all values of the jobs will be affected")
+#: R/unix/mclapply.R:0
 msgid ""
 "scheduled core %s encountered error in user code, all values of the job will "
 "be affected"
@@ -207,3 +184,11 @@ msgstr[1] ""
 msgstr[2] ""
 "zaplanowane jądra '%s' napotkały błędy w kodzie użytkownika, wpłynie to na "
 "wszystkie wartości zadań"
+
+#. R/snowSOCK.R: ngettext(length(hosts), "socket cluster with %d nodes on host %s",     "socket cluster with %d nodes on hosts %s")
+#: R/snowSOCK.R:0
+msgid "socket cluster with %d nodes on host %s"
+msgid_plural "socket cluster with %d nodes on hosts %s"
+msgstr[0] "gniazdo klastra z %d węzłem na hoście %s"
+msgstr[1] "gniazdo klastra z %d węzłami na hoście %s"
+msgstr[2] "gniazdo klastra z %d węzłami na hoście %s"
diff --git a/src/library/parallel/po/R-ru.po b/src/library/parallel/po/R-ru.po
index 3bbff1f..40d6583 100644
--- a/src/library/parallel/po/R-ru.po
+++ b/src/library/parallel/po/R-ru.po
@@ -8,8 +8,8 @@ msgid ""
 msgstr ""
 "Project-Id-Version: R 2.14.0\n"
 "Report-Msgid-Bugs-To: bugs.r-project.org\n"
-"POT-Creation-Date: 2013-02-19 07:12\n"
-"PO-Revision-Date: 2013-03-19 21:03-0600\n"
+"POT-Creation-Date: 2014-09-21 07:12\n"
+"PO-Revision-Date: 2016-04-05 18:08-0600\n"
 "Last-Translator: Alexey Shipunov <dactylorhiza at gmail.com>\n"
 "Language-Team: Russian <ru at li.org>\n"
 "Language: ru\n"
@@ -45,6 +45,9 @@ msgstr "
 msgid "unknown cluster type"
 msgstr "����������� ��� ��������"
 
+msgid "numeric 'names' must be >= 1"
+msgstr "�������� 'names' ������ ���� >= 1"
+
 msgid "node of a socket cluster on host %s with pid %d"
 msgstr "���� �� ��������-��������� �� ����� %s � pid %d"
 
diff --git a/src/library/parallel/po/R-zh_CN.po b/src/library/parallel/po/R-zh_CN.po
index 6270453..043411e 100644
--- a/src/library/parallel/po/R-zh_CN.po
+++ b/src/library/parallel/po/R-zh_CN.po
@@ -7,11 +7,11 @@ msgid ""
 msgstr ""
 "Project-Id-Version: R 2.15.0\n"
 "Report-Msgid-Bugs-To: bugs.r-project.org\n"
-"POT-Creation-Date: 2013-03-07 08:36\n"
+"POT-Creation-Date: 2014-09-21 07:12\n"
 "PO-Revision-Date: 2012-02-29 14:00+0000\n"
 "Last-Translator: Fei Chen <feic at normipaiva.com>\n"
 "Language-Team: Chinese\n"
-"Language: \n"
+"Language: zh_CN\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
@@ -44,6 +44,10 @@ msgstr "群集不对"
 msgid "unknown cluster type"
 msgstr "未知的集群类型"
 
+#, fuzzy
+msgid "numeric 'names' must be >= 1"
+msgstr "'nnodes'必需>=1"
+
 msgid "node of a socket cluster on host %s with pid %d"
 msgstr "pid是%2$d的在主机%1$s上插座集群的节点"
 
diff --git a/src/library/parallel/po/da.po b/src/library/parallel/po/da.po
index 5e60d58..52db462 100644
--- a/src/library/parallel/po/da.po
+++ b/src/library/parallel/po/da.po
@@ -5,8 +5,8 @@
 msgid ""
 msgstr ""
 "Project-Id-Version: R 3.0.0\n"
-"Report-Msgid-Bugs-To: bugs.r-project.org\n"
-"POT-Creation-Date: 2014-03-18 13:52+0000\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2016-04-01 10:28-0700\n"
 "PO-Revision-Date: 2011-11-29 09:15+0200\n"
 "Last-Translator: Joe <joedalton2 at yahoo.dk>\n"
 "Language-Team: LANGUAGE <LL at li.org>\n"
@@ -17,76 +17,76 @@ msgstr ""
 "Plural-Forms: nplurals=2; plural=(n != 1);\n"
 "X-Generator: Pootle 2.1.6\n"
 
-#: fork.c:206 fork.c:209
+#: fork.c:251 fork.c:254
 msgid "unable to create a pipe"
 msgstr "kan ikke oprette en datakanal"
 
-#: fork.c:226
+#: fork.c:272
 #, c-format
 msgid "unable to fork, possible reason: %s"
 msgstr "kan ikke forgrene, mulig årsag: %s"
 
-#: fork.c:272
+#: fork.c:318
 msgid "memory allocation error"
 msgstr "allokeringsfejl for hukommelse"
 
-#: fork.c:325
+#: fork.c:371
 msgid "only children can send data to the master process"
 msgstr "kun underprocesser kan sende data til overprocessen"
 
-#: fork.c:327
+#: fork.c:373
 msgid "there is no pipe to the master process"
 msgstr "der er ingen datakanal til overprocessen"
 
-#: fork.c:329
+#: fork.c:375
 msgid "content to send must be RAW, use serialize() if needed"
 msgstr "indhold at sende skal være RAW (RÅ), brug serialize() hvis krævet"
 
-#: fork.c:338 fork.c:345 fork.c:667
+#: fork.c:384 fork.c:391 fork.c:715
 msgid "write error, closing pipe to the master"
 msgstr "skrivefejl, lukke datakanal til overproces"
 
-#: fork.c:358
+#: fork.c:404
 msgid "only the master process can send data to a child process"
 msgstr "kun overprocessen kan sende data til en underproces"
 
-#: fork.c:365
+#: fork.c:411
 #, c-format
 msgid "child %d does not exist"
 msgstr "underproces %d findes ikke"
 
-#: fork.c:371
+#: fork.c:417
 msgid "write error"
 msgstr "skrivefejl"
 
-#: fork.c:439 fork.c:561
+#: fork.c:485 fork.c:609
 #, c-format
 msgid "error '%s' in select"
 msgstr "fejl '%s' i select"
 
-#: fork.c:649
+#: fork.c:697
 #, fuzzy
 msgid "'mckill' failed"
 msgstr "mckill fejlede"
 
-#: fork.c:659
+#: fork.c:707
 #, fuzzy
 msgid "'mcexit' can only be used in a child process"
 msgstr "mcexit kan kun bruges i en underproces"
 
-#: fork.c:680
+#: fork.c:728
 #, fuzzy
 msgid "'mcexit' failed"
 msgstr "mcexit fejlede"
 
-#: fork.c:710 fork.c:719
+#: fork.c:757 fork.c:766
 msgid "invalid CPU affinity specification"
 msgstr ""
 
-#: fork.c:730
+#: fork.c:777
 msgid "requested CPU set is too large for this system"
 msgstr ""
 
-#: fork.c:753
+#: fork.c:800
 msgid "retrieving CPU affinity set failed"
 msgstr ""
diff --git a/src/library/parallel/po/de.po b/src/library/parallel/po/de.po
index aaa1c62..930360b 100644
--- a/src/library/parallel/po/de.po
+++ b/src/library/parallel/po/de.po
@@ -5,84 +5,84 @@
 msgid ""
 msgstr ""
 "Project-Id-Version: R 3.1.0\n"
-"Report-Msgid-Bugs-To: bugs.r-project.org\n"
-"POT-Creation-Date: 2014-03-18 13:52+0000\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2016-04-01 10:28-0700\n"
 "PO-Revision-Date: 2013-03-01 16:29+0100\n"
 "Last-Translator: Detlef Steuer <steuer at hsu-hh.de>\n"
 "Language-Team: R-core <R-core at r-project.org>\n"
-"Language: \n"
+"Language: de\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
 "Plural-Forms: nplurals=2; plural=n == 1 ? 0 : 1;\n"
 
-#: fork.c:206 fork.c:209
+#: fork.c:251 fork.c:254
 msgid "unable to create a pipe"
 msgstr "kann keine pipe erzeugen"
 
-#: fork.c:226
+#: fork.c:272
 #, c-format
 msgid "unable to fork, possible reason: %s"
 msgstr "kann nicht forken, möglicher Grund: %s"
 
-#: fork.c:272
+#: fork.c:318
 msgid "memory allocation error"
 msgstr "Speicherallozierungsfehler"
 
-#: fork.c:325
+#: fork.c:371
 msgid "only children can send data to the master process"
 msgstr "nur Kindprozesse können Daten zum Elternprozess schicken"
 
-#: fork.c:327
+#: fork.c:373
 msgid "there is no pipe to the master process"
 msgstr "es gibt keine pipe zum Elternprozess"
 
-#: fork.c:329
+#: fork.c:375
 msgid "content to send must be RAW, use serialize() if needed"
 msgstr "zu schickender Inhalt muss RAW sein, nutze serialize() wenn nötig"
 
-#: fork.c:338 fork.c:345 fork.c:667
+#: fork.c:384 fork.c:391 fork.c:715
 msgid "write error, closing pipe to the master"
 msgstr "Schreibfehler, schließe pipe zum Elternprozess"
 
-#: fork.c:358
+#: fork.c:404
 msgid "only the master process can send data to a child process"
 msgstr "nur der Elternprozess kann Daten zum Kindprozess schicken"
 
-#: fork.c:365
+#: fork.c:411
 #, c-format
 msgid "child %d does not exist"
 msgstr "Kindprozess %d existiert nicht"
 
-#: fork.c:371
+#: fork.c:417
 msgid "write error"
 msgstr "Schreibfehler"
 
-#: fork.c:439 fork.c:561
+#: fork.c:485 fork.c:609
 #, c-format
 msgid "error '%s' in select"
 msgstr "Fehler '%s' in select"
 
-#: fork.c:649
+#: fork.c:697
 msgid "'mckill' failed"
 msgstr "'mckill' fehlgeschlagen"
 
-#: fork.c:659
+#: fork.c:707
 msgid "'mcexit' can only be used in a child process"
 msgstr "'mcexit' kann nur von Kindprozessen genutzt werden"
 
-#: fork.c:680
+#: fork.c:728
 msgid "'mcexit' failed"
 msgstr "'mcexit' fehlgeschlagen"
 
-#: fork.c:710 fork.c:719
+#: fork.c:757 fork.c:766
 msgid "invalid CPU affinity specification"
 msgstr "unzulässige CPU-Affinitätsspezifikation "
 
-#: fork.c:730
+#: fork.c:777
 msgid "requested CPU set is too large for this system"
 msgstr "angeforderte CPU Menge ist für dieses System zu groß"
 
-#: fork.c:753
+#: fork.c:800
 msgid "retrieving CPU affinity set failed"
 msgstr "anfordern einer CPU-Affinitätsmenge fehlgeschlagen"
diff --git a/src/library/parallel/po/fr.po b/src/library/parallel/po/fr.po
index ab91a82..0c00824 100644
--- a/src/library/parallel/po/fr.po
+++ b/src/library/parallel/po/fr.po
@@ -6,8 +6,8 @@
 msgid ""
 msgstr ""
 "Project-Id-Version: R 2.14.0\n"
-"Report-Msgid-Bugs-To: bugs.r-project.org\n"
-"POT-Creation-Date: 2014-03-18 13:52+0000\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2016-04-01 10:28-0700\n"
 "PO-Revision-Date: 2013-03-18 22:07+0100\n"
 "Last-Translator: Philippe Grosjean <phgrosjean at sciviews.org>\n"
 "Language-Team: French <R-core at r-project.org>\n"
@@ -18,75 +18,75 @@ msgstr ""
 "Plural-Forms: nplurals=2;plural=(n > 1);\n"
 "X-Generator: Poedit 1.5.5\n"
 
-#: fork.c:206 fork.c:209
+#: fork.c:251 fork.c:254
 msgid "unable to create a pipe"
 msgstr "impossible de cr�er un canal (pipe)"
 
-#: fork.c:226
+#: fork.c:272
 #, c-format
 msgid "unable to fork, possible reason: %s"
 msgstr "impossible de cr�er une nouvelle branche, raison possible : %s"
 
-#: fork.c:272
+#: fork.c:318
 msgid "memory allocation error"
 msgstr "erreur d'allocation m�moire"
 
-#: fork.c:325
+#: fork.c:371
 msgid "only children can send data to the master process"
 msgstr ""
 "seuls des processus enfants peuvent envoyer des donn�es � un processus ma�tre"
 
-#: fork.c:327
+#: fork.c:373
 msgid "there is no pipe to the master process"
 msgstr "aucun canal vers le processus ma�tre"
 
-#: fork.c:329
+#: fork.c:375
 msgid "content to send must be RAW, use serialize() if needed"
 msgstr "le contenu � envoyer doit �tre RAW, utilisez serialize() si n�cessaire"
 
-#: fork.c:338 fork.c:345 fork.c:667
+#: fork.c:384 fork.c:391 fork.c:715
 msgid "write error, closing pipe to the master"
 msgstr "erreur d'�criture, fermeture du canal vers le processus ma�tre"
 
-#: fork.c:358
+#: fork.c:404
 msgid "only the master process can send data to a child process"
 msgstr ""
 "seul le processus ma�tre peut envoyer des donn�es vers un processus fils"
 
-#: fork.c:365
+#: fork.c:411
 #, c-format
 msgid "child %d does not exist"
 msgstr "le processus fils %d n'existe pas"
 
-#: fork.c:371
+#: fork.c:417
 msgid "write error"
 msgstr "erreur d'�criture"
 
-#: fork.c:439 fork.c:561
+#: fork.c:485 fork.c:609
 #, c-format
 msgid "error '%s' in select"
 msgstr "erreur '%s' lors de la s�lection"
 
-#: fork.c:649
+#: fork.c:697
 msgid "'mckill' failed"
 msgstr "'mckill' a �chou�"
 
-#: fork.c:659
+#: fork.c:707
 msgid "'mcexit' can only be used in a child process"
 msgstr "'mcexit' peut seulement �tre utilis� avec un processus fils"
 
-#: fork.c:680
+#: fork.c:728
 msgid "'mcexit' failed"
 msgstr "'mcexit' a �chou�"
 
-#: fork.c:710 fork.c:719
+#: fork.c:757 fork.c:766
 msgid "invalid CPU affinity specification"
 msgstr "sp�cification d'affinit� CPU incorrecte"
 
-#: fork.c:730
+#: fork.c:777
 msgid "requested CPU set is too large for this system"
 msgstr "le set de CPU demand� est trop large pour ce syst�me"
 
-#: fork.c:753
+#: fork.c:800
 msgid "retrieving CPU affinity set failed"
 msgstr "la r�cup�ration de l'affinit� CPU a �chou�"
diff --git a/src/library/parallel/po/ko.po b/src/library/parallel/po/ko.po
index b3b5de8..b97c23c 100644
--- a/src/library/parallel/po/ko.po
+++ b/src/library/parallel/po/ko.po
@@ -1,93 +1,99 @@
 # Korean translation for R parallel package
-# src/library/parallel/po/ko.po
-# Copyright (C) 1995-2014 The R Core Team
+# ./parallel/po/ko.po
+#
+# Copyright (C) 1995-2016 The R Core Team
+#
 # This file is distributed under the same license as the R parallel package.
-# Chel Hee Lee <chl948 at mail.usask.ca>, 2008-2014.
+# Maintained by Chel Hee Lee <chl948 at mail.usask.ca>, 2008-2016.
+# Contact: Chel Hee Lee <gnustats at gmail.com>
+#
+# Notes:
+# Under development (unstable) starting from 11-APR-2016 for R-3.3.1 - QC: in progress
+# Freezed on 10-APR-2016 for R-3.3.0 - QC: PASS
+# Freezed on 30-MAR-2015 for R-3.2.0 - QC: PASS
+# Freezed on 06-FEB-2015 for R-3.1.3 - QC: PASS
 #
 msgid ""
 msgstr ""
-"Project-Id-Version: R 3.1.0\n"
+"Project-Id-Version: R-3.3.0\n"
 "Report-Msgid-Bugs-To: bugs.r-project.org\n"
-"POT-Creation-Date: 2014-03-18 13:52+0000\n"
-"PO-Revision-Date: 2014-03-26 20:57-0600\n"
+"POT-Creation-Date: 2016-04-01 10:28-0700\n"
+"PO-Revision-Date: 2016-04-11 13:08-0600\n"
 "Last-Translator: Chel Hee Lee <chl948 at mail.usask.ca>\n"
-"Language-Team:  <chl948 at mail.usask.ca>\n"
+"Language-Team: Chel Hee Lee <chl948 at mail.usask.ca>\n"
 "Language: ko\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
 "Plural-Forms: nplurals=1; plural=0;\n"
-"X-Poedit-SourceCharset: UTF-8\n"
-"X-Generator: Poedit 1.5.4\n"
 
-#: fork.c:206 fork.c:209
+#: fork.c:251 fork.c:254
 msgid "unable to create a pipe"
-msgstr "파이프를 생성할 수 없습니다"
+msgstr "파이프(pipe)를 생성할 수 없습니다."
 
-#: fork.c:226
+#: fork.c:272
 #, c-format
 msgid "unable to fork, possible reason: %s"
-msgstr "포크할 수 없습니다. 가능한 이유는 다음과 같습니다: %s"
+msgstr "포크할 수 없습니다. 아마도 다음과 같은 이유때문입니다: %s"
 
-#: fork.c:272
+#: fork.c:318
 msgid "memory allocation error"
 msgstr "메모리 할당 에러입니다"
 
-#: fork.c:325
+#: fork.c:371
 msgid "only children can send data to the master process"
-msgstr "오로지  자식들만이 데이터를 마스터 프로세스에 보낼 수 있습니다"
+msgstr "오로지 자식 프로세스들만이 데이터를 마스터 프로세스에 보낼 수 있습니다"
 
-#: fork.c:327
+#: fork.c:373
 msgid "there is no pipe to the master process"
-msgstr "마스터 프로세스로 연결된 파이프가 없습니다"
+msgstr "마스터 프로세스에 연결된 파이프가 없습니다."
 
-#: fork.c:329
+#: fork.c:375
 msgid "content to send must be RAW, use serialize() if needed"
-msgstr ""
-"보내야할 컨텐츠는 반드시 RAW이어야 하며, 필요하다면 serialize()를 이용하세요"
+msgstr "보내야할 컨텐츠는 반드시 RAW이어야 하며, 필요하다면 serialize()를 이용하세요"
 
-#: fork.c:338 fork.c:345 fork.c:667
+#: fork.c:384 fork.c:391 fork.c:715
 msgid "write error, closing pipe to the master"
-msgstr "쓰기 에러입니다.  마스에 연결된 파이프를 닫습니다"
+msgstr "쓰기 에러입니다.  마스터에 연결된 파이프를 닫습니다"
 
-#: fork.c:358
+#: fork.c:404
 msgid "only the master process can send data to a child process"
 msgstr "오로지 마스터 프로세스만이 데이터를 자식프로세스에 보낼 수 있습니다"
 
-#: fork.c:365
+#: fork.c:411
 #, c-format
 msgid "child %d does not exist"
 msgstr "child %d는 존재하지 않습니다"
 
-#: fork.c:371
+#: fork.c:417
 msgid "write error"
-msgstr "쓰기 에러입니다"
+msgstr "쓰기 에러가 발생했습니다."
 
-#: fork.c:439 fork.c:561
+#: fork.c:485 fork.c:609
 #, c-format
 msgid "error '%s' in select"
-msgstr "선택중 에러 '%s'가 발생했습니다"
+msgstr "select 에서 에러 '%s'가 발생했습니다"
 
-#: fork.c:649
+#: fork.c:697
 msgid "'mckill' failed"
 msgstr "'mckill' 실패했습니다"
 
-#: fork.c:659
+#: fork.c:707
 msgid "'mcexit' can only be used in a child process"
 msgstr "'mcexit'는 오로지 자식 프로세스에서만 사용됩니다"
 
-#: fork.c:680
+#: fork.c:728
 msgid "'mcexit' failed"
 msgstr "'mcexit' 실패했습니다"
 
-#: fork.c:710 fork.c:719
+#: fork.c:757 fork.c:766
 msgid "invalid CPU affinity specification"
 msgstr "유효하지 않은 CPU affinity 지정입니다"
 
-#: fork.c:730
+#: fork.c:777
 msgid "requested CPU set is too large for this system"
 msgstr "요청된 CPU 셋은 이 시스템에 너무 큽니다"
 
-#: fork.c:753
+#: fork.c:800
 msgid "retrieving CPU affinity set failed"
 msgstr "CPU affiniy 셋을 검색하는데 실패했습니다"
diff --git a/src/library/parallel/po/parallel.pot b/src/library/parallel/po/parallel.pot
index e4dedb5..4ffdd69 100644
--- a/src/library/parallel/po/parallel.pot
+++ b/src/library/parallel/po/parallel.pot
@@ -1,14 +1,14 @@
 # SOME DESCRIPTIVE TITLE.
-# Copyright (C) YEAR The R Core Team
+# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
 # This file is distributed under the same license as the PACKAGE package.
 # FIRST AUTHOR <EMAIL at ADDRESS>, YEAR.
 #
 #, fuzzy
 msgid ""
 msgstr ""
-"Project-Id-Version: R 3.1.0\n"
-"Report-Msgid-Bugs-To: bugs.r-project.org\n"
-"POT-Creation-Date: 2014-03-18 13:52+0000\n"
+"Project-Id-Version: parallel 3.4.0\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2016-04-01 10:28-0700\n"
 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
 "Last-Translator: FULL NAME <EMAIL at ADDRESS>\n"
 "Language-Team: LANGUAGE <LL at li.org>\n"
@@ -17,73 +17,73 @@ msgstr ""
 "Content-Type: text/plain; charset=CHARSET\n"
 "Content-Transfer-Encoding: 8bit\n"
 
-#: fork.c:206 fork.c:209
+#: fork.c:251 fork.c:254
 msgid "unable to create a pipe"
 msgstr ""
 
-#: fork.c:226
+#: fork.c:272
 #, c-format
 msgid "unable to fork, possible reason: %s"
 msgstr ""
 
-#: fork.c:272
+#: fork.c:318
 msgid "memory allocation error"
 msgstr ""
 
-#: fork.c:325
+#: fork.c:371
 msgid "only children can send data to the master process"
 msgstr ""
 
-#: fork.c:327
+#: fork.c:373
 msgid "there is no pipe to the master process"
 msgstr ""
 
-#: fork.c:329
+#: fork.c:375
 msgid "content to send must be RAW, use serialize() if needed"
 msgstr ""
 
-#: fork.c:338 fork.c:345 fork.c:667
+#: fork.c:384 fork.c:391 fork.c:715
 msgid "write error, closing pipe to the master"
 msgstr ""
 
-#: fork.c:358
+#: fork.c:404
 msgid "only the master process can send data to a child process"
 msgstr ""
 
-#: fork.c:365
+#: fork.c:411
 #, c-format
 msgid "child %d does not exist"
 msgstr ""
 
-#: fork.c:371
+#: fork.c:417
 msgid "write error"
 msgstr ""
 
-#: fork.c:439 fork.c:561
+#: fork.c:485 fork.c:609
 #, c-format
 msgid "error '%s' in select"
 msgstr ""
 
-#: fork.c:649
+#: fork.c:697
 msgid "'mckill' failed"
 msgstr ""
 
-#: fork.c:659
+#: fork.c:707
 msgid "'mcexit' can only be used in a child process"
 msgstr ""
 
-#: fork.c:680
+#: fork.c:728
 msgid "'mcexit' failed"
 msgstr ""
 
-#: fork.c:710 fork.c:719
+#: fork.c:757 fork.c:766
 msgid "invalid CPU affinity specification"
 msgstr ""
 
-#: fork.c:730
+#: fork.c:777
 msgid "requested CPU set is too large for this system"
 msgstr ""
 
-#: fork.c:753
+#: fork.c:800
 msgid "retrieving CPU affinity set failed"
 msgstr ""
diff --git a/src/library/parallel/po/pl.po b/src/library/parallel/po/pl.po
index 1df6b42..1e939b6 100644
--- a/src/library/parallel/po/pl.po
+++ b/src/library/parallel/po/pl.po
@@ -1,8 +1,8 @@
 msgid ""
 msgstr ""
-"Project-Id-Version: R 3.1.0\n"
-"Report-Msgid-Bugs-To: bugs.r-project.org\n"
-"POT-Creation-Date: 2014-03-18 13:52+0000\n"
+"Project-Id-Version: R 3.4.0\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2016-04-01 10:28-0700\n"
 "PO-Revision-Date: \n"
 "Last-Translator: Łukasz Daniel <lukasz.daniel at gmail.com>\n"
 "Language-Team: Łukasz Daniel <lukasz.daniel at gmail.com>\n"
@@ -13,122 +13,78 @@ msgstr ""
 "na-Revision-Date: 2012-05-29 07:55+0100\n"
 "Plural-Forms: nplurals=3; plural=(n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 "
 "|| n%100>=20) ? 1 : 2);\n"
-"X-Poedit-SourceCharset: iso-8859-1\n"
-"X-Generator: Poedit 1.5.4\n"
-
-# parallel/src/fork.c: 206
-# error(_("unable to create a pipe"))
-# parallel/src/fork.c: 209
-# error(_("unable to create a pipe"))
-#: fork.c:206 fork.c:209
+"X-Poedit-SourceCharset: UTF-8\n"
+"X-Generator: Poedit 1.8.7\n"
+
+#: fork.c:251 fork.c:254
 msgid "unable to create a pipe"
 msgstr "nie można utworzyć potoku"
 
-# parallel/src/fork.c: 226
-# error(_("unable to fork, possible reason: %s"), strerror(errno))
-#: fork.c:226
+#: fork.c:272
 #, c-format
 msgid "unable to fork, possible reason: %s"
 msgstr "nie można rozdzielić, prawdopodobny powód: %s"
 
-# parallel/src/fork.c: 272
-# error(_("memory allocation error"))
-#: fork.c:272
+#: fork.c:318
 msgid "memory allocation error"
 msgstr "błąd przydziału pamięci"
 
-# parallel/src/fork.c: 325
-# error(_("only children can send data to the master process"))
-#: fork.c:325
+#: fork.c:371
 msgid "only children can send data to the master process"
 msgstr "tylko potomne procesy mogą przesłać dane do procesu głównego"
 
-# parallel/src/fork.c: 327
-# error(_("there is no pipe to the master process"))
-#: fork.c:327
+#: fork.c:373
 msgid "there is no pipe to the master process"
 msgstr "nie ma potoku do procesu głównego"
 
-# parallel/src/fork.c: 329
-# error(_("content to send must be RAW, use serialize() if needed"))
-#: fork.c:329
+#: fork.c:375
 msgid "content to send must be RAW, use serialize() if needed"
 msgstr ""
 "zawartość do wysłania musi być PUSTA, użyj 'serialize()' jeśli konieczne"
 
-# parallel/src/fork.c: 338
-# error(_("write error, closing pipe to the master"))
-# parallel/src/fork.c: 345
-# error(_("write error, closing pipe to the master"))
-# parallel/src/fork.c: 667
-# error(_("write error, closing pipe to the master"))
-#: fork.c:338 fork.c:345 fork.c:667
+#: fork.c:384 fork.c:391 fork.c:715
 msgid "write error, closing pipe to the master"
 msgstr "błąd zapisu, zamykanie potoku do procesu głównego"
 
-# parallel/src/fork.c: 358
-# error(_("only the master process can send data to a child process"))
-#: fork.c:358
+#: fork.c:404
 msgid "only the master process can send data to a child process"
 msgstr "tylko główny proces może przesłać dane do potomnego procesu"
 
-# parallel/src/fork.c: 365
-# error(_("child %d does not exist"), pid)
-#: fork.c:365
+#: fork.c:411
 #, c-format
 msgid "child %d does not exist"
 msgstr "potomny proces %d nie istnieje"
 
-# parallel/src/fork.c: 371
-# error(_("write error"))
-#: fork.c:371
+#: fork.c:417
 msgid "write error"
 msgstr "błąd zapisu"
 
-# parallel/src/fork.c: 439
-# warning(_("error '%s' in select"), strerror(errno))
-# parallel/src/fork.c: 561
-# warning(_("error '%s' in select"), strerror(errno))
-#: fork.c:439 fork.c:561
+#: fork.c:485 fork.c:609
 #, c-format
 msgid "error '%s' in select"
 msgstr "błąd '%s' przy wyborze"
 
-# parallel/src/fork.c: 649
-# error(_("'mckill' failed"))
-#: fork.c:649
+#: fork.c:697
 msgid "'mckill' failed"
 msgstr "'mckill' nie powiodło się"
 
-# parallel/src/fork.c: 659
-# error(_("'mcexit' can only be used in a child process"))
-#: fork.c:659
+#: fork.c:707
 msgid "'mcexit' can only be used in a child process"
 msgstr "'mcexit' może być użyty jedynie w potomnym procesie"
 
-# parallel/src/fork.c: 680
-# error(_("'mcexit' failed"))
-#: fork.c:680
+#: fork.c:728
 msgid "'mcexit' failed"
 msgstr "'mcexit' nie powiodło się"
 
-# parallel/src/fork.c: 710
-# error(_("invalid CPU affinity specification"))
-# parallel/src/fork.c: 719
-# error(_("invalid CPU affinity specification"))
-#: fork.c:710 fork.c:719
+#: fork.c:757 fork.c:766
 msgid "invalid CPU affinity specification"
 msgstr "niepoprawne określenie koligacji CPU"
 
-# parallel/src/fork.c: 730
-# error(_("requested CPU set is too large for this system"))
-#: fork.c:730
+#: fork.c:777
 msgid "requested CPU set is too large for this system"
 msgstr "zażądane ustawienie CPU jest zbyt duże dla tego systemu"
 
-# parallel/src/fork.c: 753
-# error(_("retrieving CPU affinity set failed"))
-#: fork.c:753
+#: fork.c:800
 msgid "retrieving CPU affinity set failed"
 msgstr "pozyskiwanie ustawienia koligacji CPU nie powiodło się"
 
diff --git a/src/library/parallel/po/ru.po b/src/library/parallel/po/ru.po
index 22f2881..ee128f8 100644
--- a/src/library/parallel/po/ru.po
+++ b/src/library/parallel/po/ru.po
@@ -8,84 +8,89 @@ msgid ""
 msgstr ""
 "Project-Id-Version: R 2.14.0\n"
 "Report-Msgid-Bugs-To: bugs.r-project.org\n"
-"POT-Creation-Date: 2014-03-18 13:52+0000\n"
-"PO-Revision-Date: 2013-03-19 21:05-0600\n"
+"POT-Creation-Date: 2015-06-06 13:51+0100\n"
+"PO-Revision-Date: 2016-04-05 18:08-0600\n"
 "Last-Translator: Alexey Shipunov <dactylorhiza at gmail.com>\n"
 "Language-Team: Russian <ru at li.org>\n"
 "Language: ru\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=koi8-r\n"
 "Content-Transfer-Encoding: 8bit\n"
-"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n"
-"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
+"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
 
-#: fork.c:206 fork.c:209
+#: fork.c:253
+#: fork.c:256
 msgid "unable to create a pipe"
 msgstr "�� ���� ������� �����"
 
-#: fork.c:226
+#: fork.c:274
 #, c-format
 msgid "unable to fork, possible reason: %s"
 msgstr "�� ���� ����������, ��������� �������: %s"
 
-#: fork.c:272
+#: fork.c:320
 msgid "memory allocation error"
 msgstr "������ ������������� ������"
 
-#: fork.c:325
+#: fork.c:373
 msgid "only children can send data to the master process"
 msgstr "������ �������� �������� ����� �������� ������ ������-��������"
 
-#: fork.c:327
+#: fork.c:375
 msgid "there is no pipe to the master process"
 msgstr "��� ����� � ������-��������"
 
-#: fork.c:329
+#: fork.c:377
 msgid "content to send must be RAW, use serialize() if needed"
 msgstr "���������� ������� ������ ���� RAW, ����������� serialize(), ���� ����"
 
-#: fork.c:338 fork.c:345 fork.c:667
+#: fork.c:386
+#: fork.c:393
+#: fork.c:717
 msgid "write error, closing pipe to the master"
 msgstr "������ ������, �������� ����� � �������"
 
-#: fork.c:358
+#: fork.c:406
 msgid "only the master process can send data to a child process"
 msgstr "������ ������-������� ����� �������� ������ ��������� ��������"
 
-#: fork.c:365
+#: fork.c:413
 #, c-format
 msgid "child %d does not exist"
 msgstr "�������� ������� %d �� ����������"
 
-#: fork.c:371
+#: fork.c:419
 msgid "write error"
 msgstr "������ ������"
 
-#: fork.c:439 fork.c:561
+#: fork.c:487
+#: fork.c:611
 #, c-format
 msgid "error '%s' in select"
 msgstr "������ '%s' � ������"
 
-#: fork.c:649
+#: fork.c:699
 msgid "'mckill' failed"
 msgstr "'mckill' �� ������"
 
-#: fork.c:659
+#: fork.c:709
 msgid "'mcexit' can only be used in a child process"
 msgstr "'mcexit' ����� ���� ����������� ������ � �������� ��������"
 
-#: fork.c:680
+#: fork.c:730
 msgid "'mcexit' failed"
 msgstr "'mcexit' �� ������"
 
-#: fork.c:710 fork.c:719
+#: fork.c:759
+#: fork.c:768
 msgid "invalid CPU affinity specification"
 msgstr "������������ �������� �������� CPU"
 
-#: fork.c:730
+#: fork.c:779
 msgid "requested CPU set is too large for this system"
 msgstr "����������� ��������� CPU ������� ������ ��� ���� �������"
 
-#: fork.c:753
+#: fork.c:802
 msgid "retrieving CPU affinity set failed"
 msgstr "�������� �������� ��������� CPU �� �������"
+
diff --git a/src/library/parallel/po/zh_CN.po b/src/library/parallel/po/zh_CN.po
index f00a6c7..4a679e3 100644
--- a/src/library/parallel/po/zh_CN.po
+++ b/src/library/parallel/po/zh_CN.po
@@ -6,83 +6,83 @@
 msgid ""
 msgstr ""
 "Project-Id-Version: R 2.15.0\n"
-"Report-Msgid-Bugs-To: bugs.r-project.org\n"
-"POT-Creation-Date: 2014-03-18 13:52+0000\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2016-04-01 10:28-0700\n"
 "PO-Revision-Date: 2012-02-29 14:00+0000\n"
 "Last-Translator: Fei Chen <feic at normipaiva.com>\n"
 "Language-Team: Chinese\n"
-"Language: \n"
+"Language: zh_CN\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
 
-#: fork.c:206 fork.c:209
+#: fork.c:251 fork.c:254
 msgid "unable to create a pipe"
 msgstr "无法建立管道"
 
-#: fork.c:226
+#: fork.c:272
 #, c-format
 msgid "unable to fork, possible reason: %s"
 msgstr "无法分叉,可能的原因是:%s"
 
-#: fork.c:272
+#: fork.c:318
 msgid "memory allocation error"
 msgstr "内存分配错误"
 
-#: fork.c:325
+#: fork.c:371
 msgid "only children can send data to the master process"
 msgstr "只有子进程才能给主进程发送数据"
 
-#: fork.c:327
+#: fork.c:373
 msgid "there is no pipe to the master process"
 msgstr "有没可以接到主进程的管道"
 
-#: fork.c:329
+#: fork.c:375
 msgid "content to send must be RAW, use serialize() if needed"
 msgstr "发送的内容必须是原始的,如果需要的话请用serialize()"
 
-#: fork.c:338 fork.c:345 fork.c:667
+#: fork.c:384 fork.c:391 fork.c:715
 msgid "write error, closing pipe to the master"
 msgstr "书写错误,请关闭通往主进程的管道"
 
-#: fork.c:358
+#: fork.c:404
 msgid "only the master process can send data to a child process"
 msgstr "只有主进程才能给子进程发送数据"
 
-#: fork.c:365
+#: fork.c:411
 #, c-format
 msgid "child %d does not exist"
 msgstr "不存在%d这个子进程"
 
-#: fork.c:371
+#: fork.c:417
 msgid "write error"
 msgstr "书写错误"
 
-#: fork.c:439 fork.c:561
+#: fork.c:485 fork.c:609
 #, c-format
 msgid "error '%s' in select"
 msgstr "选择时出了'%s'这样一个错"
 
-#: fork.c:649
+#: fork.c:697
 msgid "'mckill' failed"
 msgstr "'mckill'失败"
 
-#: fork.c:659
+#: fork.c:707
 msgid "'mcexit' can only be used in a child process"
 msgstr "'mcexit'只能用于子进程"
 
-#: fork.c:680
+#: fork.c:728
 msgid "'mcexit' failed"
 msgstr "'mcexit'失败"
 
-#: fork.c:710 fork.c:719
+#: fork.c:757 fork.c:766
 msgid "invalid CPU affinity specification"
 msgstr "CPU亲和力规范不对"
 
-#: fork.c:730
+#: fork.c:777
 msgid "requested CPU set is too large for this system"
 msgstr "所需要的CPU设置对于这个系统来说太大了"
 
-#: fork.c:753
+#: fork.c:800
 msgid "retrieving CPU affinity set failed"
 msgstr "无法收取CPU亲和力"
diff --git a/src/library/parallel/src/fork.c b/src/library/parallel/src/fork.c
index 8b4d756..ef04e1f 100644
--- a/src/library/parallel/src/fork.c
+++ b/src/library/parallel/src/fork.c
@@ -1,7 +1,7 @@
 /*
  *  R : A Computer Language for Statistical Data Analysis
- *  (C) Copyright 2008-11 Simon Urbanek
- *      Copyright 2011-2014 R Core Team.
+ *  (C) Copyright 2008-2011 Simon Urbanek
+ *      Copyright 2011-2016 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
@@ -15,7 +15,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
 
    fork.c
    interface to system-level tools for spawning copies of the current
@@ -25,8 +25,10 @@
 */
 
 #ifdef HAVE_CONFIG_H
-#include <config.h> /* for affinity function checks and sigaction */
+# include <config.h> /* for affinity function checks and sigaction */
 #endif
+#define NO_NLS
+#include <Defn.h> // for R_isForkedChild
 
 #include "parallel.h"
 
@@ -40,8 +42,6 @@
 #include <errno.h>
 #include <fcntl.h>
 
-#include <R.h>
-#include <Rinternals.h>
 #include <Rinterface.h> /* for R_Interactive */
 
 #ifndef FILE_LOG
@@ -108,7 +108,6 @@ static void terminated_child(int pid) {
 	if (ci->pid == pid) {
 	    if (ci->pfd > 0) { close(ci->pfd); ci->pfd = -1; }
             if (ci->sifd > 0) { close(ci->sifd); ci->sifd = -1; }
-	    ci->pid = 0;
 	    break;
 	}
 	ci = ci->next;
@@ -208,7 +207,6 @@ static void parent_sig_handler(int sig, siginfo_t *info, void *context) {
 #endif			
 			if (ci->pfd > 0)  { close(ci->pfd); ci->pfd = -1; }
 			if (ci->sifd > 0) { close(ci->sifd); ci->sifd = -1; }
-			ci->pid = 0;
 		    }
 		    break;
 		}
@@ -240,17 +238,14 @@ static void parent_sig_handler(int sig) {
 }
 #endif
 
-/* from Defn.h */
-extern Rboolean R_isForkedChild;
-
 SEXP mc_fork(SEXP sEstranged)
 {
     int pipefd[2]; /* write end, read end */
     int sipfd[2];
     pid_t pid;
+    int estranged = (asInteger(sEstranged) > 0);
     SEXP res = allocVector(INTSXP, 3);
     int *res_i = INTEGER(res);
-    int estranged = (asInteger(sEstranged) > 0);
 
     if (!estranged) {
 	if (pipe(pipefd)) error(_("unable to create a pipe"));
@@ -368,18 +363,20 @@ SEXP mc_close_fds(SEXP sFDS)
     return ScalarLogical(1);
 }
 
+/* This format is read by read_child_ci (only).
+   Prior to R 3.4.0 len was unsigned int and the format did not
+   allow long vectors.
+ */
 SEXP mc_send_master(SEXP what)
 {
-    unsigned char *b;
-    unsigned int len = 0, i = 0;
     if (is_master)
 	error(_("only children can send data to the master process"));
     if (master_fd == -1) 
 	error(_("there is no pipe to the master process"));
     if (TYPEOF(what) != RAWSXP) 
 	error(_("content to send must be RAW, use serialize() if needed"));
-    len = LENGTH(what);
-    b = RAW(what);
+    R_xlen_t len = XLENGTH(what);
+    unsigned char *b = RAW(what);
 #ifdef MC_DEBUG
     Dprintf("child %d: send_master (%d bytes)\n", getpid(), len);
 #endif
@@ -388,22 +385,20 @@ SEXP mc_send_master(SEXP what)
 	master_fd = -1;
 	error(_("write error, closing pipe to the master"));
     }
-    while (i < len) {
-	ssize_t n = write(master_fd, b + i, len - i);
+    ssize_t n;
+    for (R_xlen_t i = 0; i < len; i += n) {
+	n = write(master_fd, b + i, len - i);
 	if (n < 1) {
 	    close(master_fd);
 	    master_fd = -1;
 	    error(_("write error, closing pipe to the master"));
 	}
-	i += n;
     }
     return ScalarLogical(1);
 }
 
 SEXP mc_send_child_stdin(SEXP sPid, SEXP what) 
 {
-    unsigned char *b;
-    unsigned int len = 0, i = 0, fd;
     int pid = asInteger(sPid);
     if (!is_master) 
 	error(_("only the master process can send data to a child process"));
@@ -414,10 +409,10 @@ SEXP mc_send_child_stdin(SEXP sPid, SEXP what)
 	ci = ci -> next;
     }
     if (!ci) error(_("child %d does not exist"), pid);
-    len = LENGTH(what);
-    b = RAW(what);
-    fd = ci -> sifd;
-    while (i < len) {
+    R_xlen_t  len = XLENGTH(what);
+    unsigned char *b = RAW(what);
+     unsigned int fd = ci -> sifd;
+    for (R_xlen_t i = 0; i < len;) {
 	ssize_t n = write(fd, b + i, len - i);
 	if (n < 1) error(_("write error"));
 	i += n;
@@ -520,7 +515,7 @@ SEXP mc_select_children(SEXP sTimeout, SEXP sWhich)
 
 static SEXP read_child_ci(child_info_t *ci) 
 {
-    unsigned int len = 0;
+    R_xlen_t len;
     int fd = ci->pfd;
     ssize_t n = read(fd, &len, sizeof(len));
 #ifdef MC_DEBUG
@@ -535,7 +530,7 @@ static SEXP read_child_ci(child_info_t *ci)
     } else {
 	SEXP rv = allocVector(RAWSXP, len);
 	unsigned char *rvb = RAW(rv);
-	unsigned int i = 0;
+	R_xlen_t i = 0;
 	while (i < len) {
 	    n = read(fd, rvb + i, len - i);
 #ifdef MC_DEBUG
@@ -553,8 +548,10 @@ static SEXP read_child_ci(child_info_t *ci)
 	PROTECT(rv);
 	{
 	    SEXP pa = allocVector(INTSXP, 1);
+	    PROTECT(pa);
 	    INTEGER(pa)[0] = ci->pid;
 	    setAttrib(rv, install("pid"), pa);
+	    UNPROTECT(1);
 	}
 	UNPROTECT(1);
 	return rv;
@@ -653,8 +650,12 @@ SEXP mc_children()
 	/* in theory signals can flag a pid as closed in the
 	   meantime, we may end up with fewer children than
 	   expected - highly unlikely but possible */
-	if (pids - INTEGER(res) < LENGTH(res))
-	    SETLENGTH(res, (int)(pids - INTEGER(res)));
+	if (pids - INTEGER(res) < LENGTH(res)) {
+	    R_len_t len = (R_len_t) (pids - INTEGER(res));
+	    PROTECT(res);
+	    res = lengthgets(res, len);
+	    UNPROTECT(1);
+	}
     }
     return res;
 }
@@ -701,7 +702,7 @@ SEXP mc_kill(SEXP sPid, SEXP sSig)
     return ScalarLogical(1);
 }
 
-SEXP mc_exit(SEXP sRes) 
+SEXP NORET mc_exit(SEXP sRes)
 {
     int res = asInteger(sRes);
 #ifdef MC_DEBUG
@@ -729,7 +730,6 @@ SEXP mc_exit(SEXP sRes)
 #endif
     _exit(res);
     error(_("'mcexit' failed"));
-    return R_NilValue;
 }
 
 /* NA = query, TRUE/FALSE = set R_Interactive accordingly */
diff --git a/src/library/parallel/src/init.c b/src/library/parallel/src/init.c
index 796c385..a2b75dd 100644
--- a/src/library/parallel/src/init.c
+++ b/src/library/parallel/src/init.c
@@ -1,6 +1,6 @@
 /*
  *  R : A Computer Language for Statistical Data Analysis
- *  Copyright (C) 2011   The R Core Team.
+ *  Copyright (C) 2011-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
@@ -14,47 +14,48 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  */
 
 #include <R.h>
 #include "parallel.h"
 #include <R_ext/Rdynload.h>
+#include <R_ext/Visibility.h>
+
+#define CALLDEF(name, n)  {#name, (DL_FUNC) &name, n}
 
 static const R_CallMethodDef callMethods[] = {
-    {"nextStream", (DL_FUNC) &nextStream, 1},
-    {"nextSubStream", (DL_FUNC) &nextSubStream, 1},
+    CALLDEF(nextStream, 1),
+    CALLDEF(nextSubStream, 1),
 #ifndef _WIN32
-    {"mc_children", (DL_FUNC) &mc_children, 0},
-    {"mc_close_fds", (DL_FUNC) &mc_close_fds, 1},
-    {"mc_close_stderr", (DL_FUNC) &mc_close_stderr, 1},
-    {"mc_close_stdout", (DL_FUNC) &mc_close_stdout, 1},
-    {"mc_exit", (DL_FUNC) &mc_exit, 1},
-    {"mc_fds", (DL_FUNC) &mc_fds, 1},
-    {"mc_fork", (DL_FUNC) &mc_fork, 1},
-    {"mc_is_child", (DL_FUNC) &mc_is_child, 0},
-    {"mc_kill", (DL_FUNC) &mc_kill, 2},
-    {"mc_master_fd", (DL_FUNC) &mc_master_fd, 0},
-    {"mc_read_child", (DL_FUNC) &mc_read_child, 1},
-    {"mc_read_children", (DL_FUNC) &mc_read_children, 1},
-    {"mc_rm_child", (DL_FUNC) &mc_rm_child, 1},
-    {"mc_send_master", (DL_FUNC) &mc_send_master, 1},
-    {"mc_select_children", (DL_FUNC) &mc_select_children, 2},
-    {"mc_send_child_stdin", (DL_FUNC) &mc_send_child_stdin, 2},
-    {"mc_affinity", (DL_FUNC) &mc_affinity, 1},
-    {"mc_interactive", (DL_FUNC) &mc_interactive, 1},
+    CALLDEF(mc_children, 0),
+    CALLDEF(mc_close_fds, 1),
+    CALLDEF(mc_close_stderr, 1),
+    CALLDEF(mc_close_stdout, 1),
+    CALLDEF(mc_exit, 1),
+    CALLDEF(mc_fds, 1),
+    CALLDEF(mc_fork, 1),
+    CALLDEF(mc_is_child, 0),
+    CALLDEF(mc_kill, 2),
+    CALLDEF(mc_master_fd, 0),
+    CALLDEF(mc_read_child, 1),
+    CALLDEF(mc_read_children, 1),
+    CALLDEF(mc_rm_child, 1),
+    CALLDEF(mc_send_master, 1),
+    CALLDEF(mc_select_children, 2),
+    CALLDEF(mc_send_child_stdin, 2),
+    CALLDEF(mc_affinity, 1),
+    CALLDEF(mc_interactive, 1),
 #else
-    {"ncpus", (DL_FUNC) &ncpus, 1},
+    CALLDEF(ncpus, 1),
 #endif
     {NULL, NULL, 0}
 };
 
-void
-#ifdef HAVE_VISIBILITY_ATTRIBUTE
-__attribute__ ((visibility ("default")))
-#endif
+void attribute_visible
 R_init_parallel(DllInfo *dll)
 {
     R_registerRoutines(dll, NULL, callMethods, NULL, NULL);
     R_useDynamicSymbols(dll, FALSE);
+    R_forceSymbols(dll, FALSE);
 }
diff --git a/src/library/parallel/src/ncpus.c b/src/library/parallel/src/ncpus.c
index 5db78a4..ef65cff 100644
--- a/src/library/parallel/src/ncpus.c
+++ b/src/library/parallel/src/ncpus.c
@@ -14,7 +14,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  */
 
 #include <R.h>
diff --git a/src/library/parallel/src/parallel.h b/src/library/parallel/src/parallel.h
index d1a6f8a..a3674c8 100644
--- a/src/library/parallel/src/parallel.h
+++ b/src/library/parallel/src/parallel.h
@@ -14,7 +14,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  */
 
 #ifndef R_PARALLEL_H
diff --git a/src/library/parallel/src/rngstream.c b/src/library/parallel/src/rngstream.c
index c39ff48..3de81fb 100644
--- a/src/library/parallel/src/rngstream.c
+++ b/src/library/parallel/src/rngstream.c
@@ -14,7 +14,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  */
 
 #include "parallel.h"
diff --git a/src/library/parallel/tests/RSeed.R b/src/library/parallel/tests/RSeed.R
new file mode 100644
index 0000000..fd0b303
--- /dev/null
+++ b/src/library/parallel/tests/RSeed.R
@@ -0,0 +1,25 @@
+Sys.unsetenv("R_PARALLEL_PORT")
+
+check.RS <- function(verbose = TRUE) {
+    s1 <- get0(".Random.seed", envir = .GlobalEnv, inherits = FALSE)
+    if(verbose) { cat("current .Random.seed :\n"); utils::str(s1) }
+    if(any("parallel" == loadedNamespaces())) unloadNamespace("parallel")
+    loadNamespace("parallel")
+    s2 <- get0(".Random.seed", envir = .GlobalEnv, inherits = FALSE)
+    stopifnot(all.equal(s1, s2)) ## both NULL (if there was none); equal also otherwise
+    unloadNamespace("parallel")
+    invisible(s1)
+}
+
+s1 <- check.RS()
+for(n in 1:3) check.RS(verbose=FALSE)
+
+if(is.null(s1)) { ## create one
+    runif(1)
+} else { # remove it
+    rm(.Random.seed)
+}
+s2 <- check.RS()
+
+stopifnot(xor(is.null(s1),
+	      is.null(s2)))
diff --git a/src/library/parallel/tests/multicore2.RR b/src/library/parallel/tests/multicore2.RR
index 6a5c977..ac1afb8 100644
--- a/src/library/parallel/tests/multicore2.RR
+++ b/src/library/parallel/tests/multicore2.RR
@@ -1,14 +1,15 @@
 library(parallel)
 
-library(boot)
-cd4.rg <- function(data, mle) MASS::mvrnorm(nrow(data), mle$m, mle$v)
-cd4.mle <- list(m = colMeans(cd4), v = var(cd4))
-mc <- getOption("mc.cores", 2)
-run1 <- function(...) boot(cd4, corr, R = 500, sim = "parametric",
-                           ran.gen = cd4.rg, mle = cd4.mle)
-## To make this reproducible:
-set.seed(123, "L'Ecuyer"); mc.reset.stream()
-res <- mclapply(seq_len(mc), run1)
-cd4.boot <- do.call(c, res)
-boot.ci(cd4.boot,  type = c("norm", "basic", "perc"),
-        conf = 0.9, h = atanh, hinv = tanh)
+if(require(boot)) {
+    cd4.rg <- function(data, mle) MASS::mvrnorm(nrow(data), mle$m, mle$v)
+    cd4.mle <- list(m = colMeans(cd4), v = var(cd4))
+    mc <- getOption("mc.cores", 2)
+    run1 <- function(...) boot(cd4, corr, R = 500, sim = "parametric",
+                               ran.gen = cd4.rg, mle = cd4.mle)
+    ## To make this reproducible:
+    set.seed(123, "L'Ecuyer"); mc.reset.stream()
+    res <- mclapply(seq_len(mc), run1)
+    cd4.boot <- do.call(c, res)
+    boot.ci(cd4.boot,  type = c("norm", "basic", "perc"),
+            conf = 0.9, h = atanh, hinv = tanh)
+}
diff --git a/src/library/parallel/tests/multicore2.Rout.save b/src/library/parallel/tests/multicore2.Rout.save
index 56820d7..174df25 100644
--- a/src/library/parallel/tests/multicore2.Rout.save
+++ b/src/library/parallel/tests/multicore2.Rout.save
@@ -1,7 +1,7 @@
 
-R version 3.1.2 RC (2014-10-29 r66897) -- "Pumpkin Helmet"
-Copyright (C) 2014 The R Foundation for Statistical Computing
-Platform: x86_64-unknown-linux-gnu (64-bit)
+R version 3.4.0 RC (2017-04-18 r72543) -- "You Stupid Darkness"
+Copyright (C) 2017 The R Foundation for Statistical Computing
+Platform: x86_64-pc-linux-gnu (64-bit)
 
 R is free software and comes with ABSOLUTELY NO WARRANTY.
 You are welcome to redistribute it under certain conditions.
@@ -17,18 +17,20 @@ Type 'q()' to quit R.
 
 > library(parallel)
 > 
-> library(boot)
-> cd4.rg <- function(data, mle) MASS::mvrnorm(nrow(data), mle$m, mle$v)
-> cd4.mle <- list(m = colMeans(cd4), v = var(cd4))
-> mc <- getOption("mc.cores", 2)
-> run1 <- function(...) boot(cd4, corr, R = 500, sim = "parametric",
-+                            ran.gen = cd4.rg, mle = cd4.mle)
-> ## To make this reproducible:
-> set.seed(123, "L'Ecuyer"); mc.reset.stream()
-> res <- mclapply(seq_len(mc), run1)
-> cd4.boot <- do.call(c, res)
-> boot.ci(cd4.boot,  type = c("norm", "basic", "perc"),
-+         conf = 0.9, h = atanh, hinv = tanh)
+> if(require(boot)) {
++     cd4.rg <- function(data, mle) MASS::mvrnorm(nrow(data), mle$m, mle$v)
++     cd4.mle <- list(m = colMeans(cd4), v = var(cd4))
++     mc <- getOption("mc.cores", 2)
++     run1 <- function(...) boot(cd4, corr, R = 500, sim = "parametric",
++                                ran.gen = cd4.rg, mle = cd4.mle)
++     ## To make this reproducible:
++     set.seed(123, "L'Ecuyer"); mc.reset.stream()
++     res <- mclapply(seq_len(mc), run1)
++     cd4.boot <- do.call(c, res)
++     boot.ci(cd4.boot,  type = c("norm", "basic", "perc"),
++             conf = 0.9, h = atanh, hinv = tanh)
++ }
+Loading required package: boot
 BOOTSTRAP CONFIDENCE INTERVAL CALCULATIONS
 Based on 1000 bootstrap replicates
 
@@ -43,4 +45,4 @@ Calculations on Transformed Scale;  Intervals on Original Scale
 > 
 > proc.time()
    user  system elapsed 
-  0.133   0.014   0.270 
+  0.223   0.033   0.271 
diff --git a/src/library/parallel/tests/multicore3.RR b/src/library/parallel/tests/multicore3.RR
index b6faf1a..4a353cb 100644
--- a/src/library/parallel/tests/multicore3.RR
+++ b/src/library/parallel/tests/multicore3.RR
@@ -1,7 +1,9 @@
 library(parallel)
 
-simplify2array(mclapply(rep(4, 5), rnorm))
 # use the same random numbers for all values
 set.seed(1)
+simplify2array(mclapply(rep(4, 5), rnorm))
+
+set.seed(1)
 simplify2array(mclapply(rep(4, 5), rnorm, mc.preschedule = FALSE,
                 mc.set.seed = FALSE))
diff --git a/src/library/parallel/tests/snow1.RR b/src/library/parallel/tests/snow1.RR
index bd37abc..6f7402b 100644
--- a/src/library/parallel/tests/snow1.RR
+++ b/src/library/parallel/tests/snow1.RR
@@ -20,21 +20,22 @@ parSapply(cl, 1:20, get("+"), 3)
 ## PR14898
 parSapply(cl, 1, identity)
 
-
-## A bootstrapping example, which can be done in many ways:
-clusterEvalQ(cl, {
-  ## set up each worker.  Could also use clusterExport()
-  library(boot)
-  cd4.rg <- function(data, mle) MASS::mvrnorm(nrow(data), mle$m, mle$v)
-  cd4.mle <- list(m = colMeans(cd4), v = var(cd4))
-  NULL
-})
-res <- clusterEvalQ(cl, boot(cd4, corr, R = 100,
-                    sim = "parametric", ran.gen = cd4.rg, mle = cd4.mle))
-library(boot)
-cd4.boot <- do.call(c, res)
-boot.ci(cd4.boot,  type = c("norm", "basic", "perc"),
-        conf = 0.9, h = atanh, hinv = tanh)
+if(require(boot)) {
+    set.seed(11)
+    ## A bootstrapping example, which can be done in many ways:
+    clusterEvalQ(cl, {
+        ## set up each worker.  Could also use clusterExport()
+        library(boot)
+        cd4.rg <- function(data, mle) MASS::mvrnorm(nrow(data), mle$m, mle$v)
+        cd4.mle <- list(m = colMeans(cd4), v = var(cd4))
+        NULL
+    })
+    res <- clusterEvalQ(cl, boot(cd4, corr, R = 100,
+                                 sim = "parametric", ran.gen = cd4.rg, mle = cd4.mle))
+    cd4.boot <- do.call(c, res)
+    print(boot.ci(cd4.boot,  type = c("norm", "basic", "perc"),
+                  conf = 0.9, h = atanh, hinv = tanh))
+}
 stopCluster(cl)
 
 
diff --git a/src/library/parallel/tests/snow2.RR b/src/library/parallel/tests/snow2.RR
index f3d60a3..523ef8b 100644
--- a/src/library/parallel/tests/snow2.RR
+++ b/src/library/parallel/tests/snow2.RR
@@ -2,18 +2,19 @@
 
 library(parallel)
 
-library(boot)
-run1 <- function(...) {
-   library(boot)
-   cd4.rg <- function(data, mle) MASS::mvrnorm(nrow(data), mle$m, mle$v)
-   cd4.mle <- list(m = colMeans(cd4), v = var(cd4))
-   boot(cd4, corr, R = 500, sim = "parametric",
-        ran.gen = cd4.rg, mle = cd4.mle)
+if(require(boot)) {
+    run1 <- function(...) {
+        library(boot)
+        cd4.rg <- function(data, mle) MASS::mvrnorm(nrow(data), mle$m, mle$v)
+        cd4.mle <- list(m = colMeans(cd4), v = var(cd4))
+        boot(cd4, corr, R = 500, sim = "parametric",
+             ran.gen = cd4.rg, mle = cd4.mle)
+    }
+    cl <- makeCluster(mc <- 2)
+    clusterSetRNGStream(cl, 123)
+    cd4.boot <- do.call(c, parLapply(cl, seq_len(mc), run1))
+    print(boot.ci(cd4.boot,  type = c("norm", "basic", "perc"),
+                  conf = 0.9, h = atanh, hinv = tanh))
+    stopCluster(cl)
 }
-cl <- makeCluster(mc <- 2)
-clusterSetRNGStream(cl, 123)
-cd4.boot <- do.call(c, parLapply(cl, seq_len(mc), run1))
-boot.ci(cd4.boot,  type = c("norm", "basic", "perc"),
-        conf = 0.9, h = atanh, hinv = tanh)
-stopCluster(cl)
 
diff --git a/src/library/parallel/tests/snow2.Rout.save b/src/library/parallel/tests/snow2.Rout.save
index 96d5be9..cb912a3 100644
--- a/src/library/parallel/tests/snow2.Rout.save
+++ b/src/library/parallel/tests/snow2.Rout.save
@@ -1,7 +1,7 @@
 
-R version 3.1.2 RC (2014-10-29 r66897) -- "Pumpkin Helmet"
-Copyright (C) 2014 The R Foundation for Statistical Computing
-Platform: x86_64-unknown-linux-gnu (64-bit)
+R version 3.4.0 RC (2017-04-18 r72543) -- "You Stupid Darkness"
+Copyright (C) 2017 The R Foundation for Statistical Computing
+Platform: x86_64-pc-linux-gnu (64-bit)
 
 R is free software and comes with ABSOLUTELY NO WARRANTY.
 You are welcome to redistribute it under certain conditions.
@@ -19,19 +19,22 @@ Type 'q()' to quit R.
 > 
 > library(parallel)
 > 
-> library(boot)
-> run1 <- function(...) {
-+    library(boot)
-+    cd4.rg <- function(data, mle) MASS::mvrnorm(nrow(data), mle$m, mle$v)
-+    cd4.mle <- list(m = colMeans(cd4), v = var(cd4))
-+    boot(cd4, corr, R = 500, sim = "parametric",
-+         ran.gen = cd4.rg, mle = cd4.mle)
+> if(require(boot)) {
++     run1 <- function(...) {
++         library(boot)
++         cd4.rg <- function(data, mle) MASS::mvrnorm(nrow(data), mle$m, mle$v)
++         cd4.mle <- list(m = colMeans(cd4), v = var(cd4))
++         boot(cd4, corr, R = 500, sim = "parametric",
++              ran.gen = cd4.rg, mle = cd4.mle)
++     }
++     cl <- makeCluster(mc <- 2)
++     clusterSetRNGStream(cl, 123)
++     cd4.boot <- do.call(c, parLapply(cl, seq_len(mc), run1))
++     print(boot.ci(cd4.boot,  type = c("norm", "basic", "perc"),
++                   conf = 0.9, h = atanh, hinv = tanh))
++     stopCluster(cl)
 + }
-> cl <- makeCluster(mc <- 2)
-> clusterSetRNGStream(cl, 123)
-> cd4.boot <- do.call(c, parLapply(cl, seq_len(mc), run1))
-> boot.ci(cd4.boot,  type = c("norm", "basic", "perc"),
-+         conf = 0.9, h = atanh, hinv = tanh)
+Loading required package: boot
 BOOTSTRAP CONFIDENCE INTERVAL CALCULATIONS
 Based on 1000 bootstrap replicates
 
@@ -43,9 +46,8 @@ Intervals :
 Level      Normal              Basic              Percentile     
 90%   ( 0.4705,  0.8589 )   ( 0.4620,  0.8597 )   ( 0.4900,  0.8689 )  
 Calculations on Transformed Scale;  Intervals on Original Scale
-> stopCluster(cl)
 > 
 > 
 > proc.time()
    user  system elapsed 
-  0.157   0.015   0.534 
+  0.147   0.021   0.588 
diff --git a/src/library/parallel/vignettes/parallel.Rnw b/src/library/parallel/vignettes/parallel.Rnw
index ae190e2..d99ce03 100644
--- a/src/library/parallel/vignettes/parallel.Rnw
+++ b/src/library/parallel/vignettes/parallel.Rnw
@@ -1,6 +1,6 @@
 % File src/library/parallel/vignettes/parallel.Rnw
-% Part of the R package, http://www.R-project.org
-% Copyright 2011-3 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 2011-2016  R Core Team
 % Distributed under GPL 2 or later
 
 \documentclass[a4paper]{article}
@@ -97,7 +97,7 @@ processes.  They can be created in one of three ways:
   This should be available on all \R{} platforms, although it is
   conceivable that zealous security measures could block the
   inter-process communication \emph{via} sockets.  Users of Windows
-  and OS X may expect pop-up dialog boxes from the firewall asking
+  and macOS may expect pop-up dialog boxes from the firewall asking
   if an \R{} process should accept incoming connections.
 
   Following \CRANpkg{snow}, a pool of worker processes listening
@@ -105,7 +105,7 @@ processes.  They can be created in one of three ways:
   `cluster' of nodes.
 
 \item \emph{Via} forking.  \emph{Fork} is a
-  concept\footnote{\url{http://en.wikipedia.org/wiki/Fork_(operating_system)}}
+  concept\footnote{\url{https://en.wikipedia.org/wiki/Fork_(operating_system)}}
   from POSIX operating systems, and should be available on all \R{}
   platforms except Windows.  This creates a new \R{} process by taking
   a complete copy of the master process, including the workspace and
@@ -117,8 +117,8 @@ processes.  They can be created in one of three ways:
 
   Note that as it does share the complete process, it also shares any
   GUI elements, for example an \R{} console and on-screen devices.
-  This can cause havoc.\footnote{Some precautions are taken on Mac OS
-    X: for example the event loops for \command{R.app} and the
+  This can cause havoc.\footnote{Some precautions are taken on macOS:
+    for example the event loops for \command{R.app} and the
     \code{quartz} device are inhibited in the child.  This information
     is available at C level in the \code{Rboolean} variable
     \code{R\_isForkedChild}.}
@@ -197,7 +197,7 @@ But in so far as it is a useful guideline, function
 \code{detectCores()} tries to determine the number of CPU cores in the
 machine on which \R{} is running: it has ways to do so on all known
 current \R{} platforms.  What exactly it measures is OS-specific: we
-try where possible to report the number of physical cores available.
+try where possible to report the number of logical cores available.
 
 On Windows the default is to report the number of logical CPUs.  On
 modern hardware (e.g.{} Intel \emph{Core i7}) the latter may not be
@@ -383,8 +383,8 @@ of two:
   z_n &=& (x_n - y_n) \mod{4294967087}\\
   u_n &=& z_n/4294967088\ \mbox{unless $z_n = 0$}
 \end{eqnarray*}
-The `seed' then consists of $(x_n, x_{n-1}, x_{n-2}, y_n, y_{n-1},
-y_{n-2})$, and the recursion for each of $x_n$ and $y_n$ can have
+The `seed' then consists of $(x_{n-3}, x_{n-2}, x_{n-1}, y_{n-3}, y_{n-2}, y_{n-1})$,
+and the recursion for each of $x_n$ and $y_n$ can have
 pre-computed coefficients for $k$ steps ahead.  For $k = 2^{127}$, the
 seed is advanced by $k$ steps by \R{} call
 \code{.Random.seed <- nextRNGStream(.Random.seed)}.
@@ -766,10 +766,6 @@ loop for \command{R.app} and the event loop for the \code{quartz}
 graphics device.  This has been replaced by recording a flag in the
 \R{} executable for a child process.
 
-The version of \code{detectCores} here is biased towards the number of
-physical CPUs.  This was occasioned by serious problems on Sparc Solaris
-where \CRANpkg{multicore} defaulted to a silly number of processes.
-
 Functions \code{fork} and \code{kill} have \code{mc} prefixes and are
 not exported.  This avoids confusion with other packages (such as
 package \CRANpkg{fork}), and note that \code{mckill} is not as general as
diff --git a/src/library/parallel/vignettes/parallel.bib b/src/library/parallel/vignettes/parallel.bib
index 5116e1f..2b78d56 100644
--- a/src/library/parallel/vignettes/parallel.bib
+++ b/src/library/parallel/vignettes/parallel.bib
@@ -34,7 +34,7 @@ url = {http://www.iro.umontreal.ca/~lecuyer/myftp/papers/streams00.pdf}
   title = 	 {\texttt{rlecuyer}: {R} interface to {RNG}
                   with multiple streams},
   year = 	 "2004--present",
-url = "http://cran.r-project.org/package=rlecuyer"
+url = "https://cran.r-project.org/package=rlecuyer"
 }
 
 @Misc{multicore,
@@ -42,21 +42,21 @@ url = "http://cran.r-project.org/package=rlecuyer"
   title = 	 {\texttt{multicore}: {Parallel} processing of {R}
                   code on machines with multiple cores or {CPUs}},
   year = 	 "2009--present",
-url = "http://cran.r-project.org/package=multicore"
+url = "https://cran.r-project.org/package=multicore"
 }
 
 @Misc{rstream,
   author = 	 {Josef Leydold},
   title = 	 {\texttt{rstream}: Streams of random numbers},
   year = 	 {2005--present},
-url = "http://cran.r-project.org/package=rstream"
+url = "https://cran.r-project.org/package=rstream"
 }
 
 @Misc{boot,
   author = 	 {Angelo Canty and Brian D. Ripley},
   title = 	 {\texttt{boot}: Bootstrap Functions},
   year = 	 {1999--present},
-url = "http://cran.r-project.org/package=boot"
+url = "https://cran.r-project.org/package=boot"
 }
 
 @Book{Davison.Hinkley.97,
diff --git a/src/library/profile/Common.R b/src/library/profile/Common.R
index 80faf7b..c272f0b 100644
--- a/src/library/profile/Common.R
+++ b/src/library/profile/Common.R
@@ -1,9 +1,9 @@
 ### This is the system Rprofile file. It is always run on startup.
 ### Additional commands can be placed in site or user Rprofile files
-#
-#  Copyright (C) 1995-2012 The R Core Team
 ### (see ?Rprofile).
 
+### Copyright (C) 1995-2015 The R Core Team
+
 ### Notice that it is a bad idea to use this file as a template for
 ### personal startup files, since things will be executed twice and in
 ### the wrong environment (user profiles are run in .GlobalEnv).
@@ -40,7 +40,7 @@ if(!interactive() && is.null(getOption("showErrorCalls")))
     options(showErrorCalls = TRUE)
 
 local({dp <- Sys.getenv("R_DEFAULT_PACKAGES")
-       if(identical(dp, "")) # marginally faster to do methods last
+       if(identical(dp, "")) ## it fact methods is done first
            dp <- c("datasets", "utils", "grDevices", "graphics",
                    "stats", "methods")
        else if(identical(dp, "NULL")) dp <- character(0)
@@ -55,6 +55,13 @@ Sys.setenv(R_LIBS_SITE =
 Sys.setenv(R_LIBS_USER =
            .expand_R_libs_env_var(Sys.getenv("R_LIBS_USER")))
 
+local({
+    if(nzchar(tl <- Sys.getenv("R_SESSION_TIME_LIMIT_CPU")))
+        setSessionTimeLimit(cpu = tl)
+    if(nzchar(tl <- Sys.getenv("R_SESSION_TIME_LIMIT_ELAPSED")))
+        setSessionTimeLimit(elapsed = tl)
+})
+
 .First.sys <- function()
 {
     for(pkg in getOption("defaultPackages")) {
@@ -62,18 +69,19 @@ Sys.setenv(R_LIBS_USER =
                        character.only = TRUE)
         if(!res)
             warning(gettextf('package %s in options("defaultPackages") was not found', sQuote(pkg)),
-                    call.=FALSE, domain = NA)
+                    call. = FALSE, domain = NA)
     }
 }
 
+## called at C level in the startup process prior to .First.sys
 .OptRequireMethods <- function()
 {
-      if("methods" %in% getOption("defaultPackages")) {
-        res <- require("methods", quietly = TRUE, warn.conflicts = FALSE,
-                       character.only = TRUE)
-        if(!res)
-            warning('package "methods" in options("defaultPackages") was not found', call.=FALSE)
-    }
+    pkg <- "methods" # done this way to avoid R CMD check warning
+    if(pkg %in% getOption("defaultPackages"))
+        if(!require(pkg, quietly = TRUE, warn.conflicts = FALSE,
+                    character.only = TRUE))
+            warning('package "methods" in options("defaultPackages") was not found',
+                    call. = FALSE)
 }
 
 if(nzchar(Sys.getenv("R_BATCH"))) {
diff --git a/src/library/profile/Rprofile.unix b/src/library/profile/Rprofile.unix
index bc8b22d..fa65df3 100644
--- a/src/library/profile/Rprofile.unix
+++ b/src/library/profile/Rprofile.unix
@@ -37,7 +37,7 @@ options(papersize = papersize,
         useFancyQuotes = TRUE)
 })
 
-## non standard settings for the R.app GUI of the Mac OS X port
+## non standard settings for the R.app GUI of the macOS port
 if(.Platform$GUI == "AQUA") {
     ## this is set to let RAqua use both X11 device and X11/TclTk
     if (Sys.getenv("DISPLAY") == "")
@@ -47,7 +47,7 @@ if(.Platform$GUI == "AQUA") {
     Sys.setenv("PATH" = paste(Sys.getenv("PATH"),":/usr/local/bin",sep = ""))
 }## end "Aqua"
 
-## de-dupe the environment on OS X (bug in Yosemite which affects things like PATH)
+## de-dupe the environment on macOS (bug in Yosemite which affects things like PATH)
 if (grepl("^darwin", R.version$os)) local({
     ## we have to de-dupe one at a time and re-check since the bug affects how
     ## environment modifications propagate
diff --git a/src/library/profile/Rprofile.windows b/src/library/profile/Rprofile.windows
index f670e0b..1d8926e 100644
--- a/src/library/profile/Rprofile.windows
+++ b/src/library/profile/Rprofile.windows
@@ -51,4 +51,8 @@ local({
     if(!is.na(br)) options(browser = br)
     tests_startup <- Sys.getenv("R_TESTS")
     if(nzchar(tests_startup)) source(tests_startup)
+    ca_cert <- Sys.getenv("CURL_CA_BUNDLE", NA_character_)
+    if(!is.na(ca_cert) &&
+       file.exists(ca_path <- file.path(R.home("etc"), "curl-ca-bundle.crt")))
+        Sys.setenv(CURL_CA_BUNDLE = ca_path)
 })
diff --git a/src/library/splines/DESCRIPTION.in b/src/library/splines/DESCRIPTION.in
index d30b880..cb3ba00 100644
--- a/src/library/splines/DESCRIPTION.in
+++ b/src/library/splines/DESCRIPTION.in
@@ -6,5 +6,7 @@ Title: Regression Spline Functions and Classes
 Author: Douglas M. Bates <bates at stat.wisc.edu> and
  William N. Venables <Bill.Venables at csiro.au>
 Maintainer: R Core Team <R-core at r-project.org>
-Description: Regression spline functions and classes
+Description: Regression spline functions and classes.
 License: Part of R @VERSION@
+Suggests: Matrix, methods
+NeedsCompilation: yes
diff --git a/src/library/splines/NAMESPACE b/src/library/splines/NAMESPACE
index 61ec3f1..3ab192f 100644
--- a/src/library/splines/NAMESPACE
+++ b/src/library/splines/NAMESPACE
@@ -10,7 +10,7 @@ export(as.polySpline, asVector, backSpline, bs, interpSpline, ns,
 #        predict.ppolySpline)
 
 importFrom(graphics, plot)
-importFrom(stats, as.formula, coef, makepredictcall, na.fail, predict)
+importFrom(stats, as.formula, coef, makepredictcall, na.fail, predict, quantile)
 
 S3method(as.data.frame, xyVector)
 S3method(asVector, xyVector)
diff --git a/src/library/splines/R/splineClasses.R b/src/library/splines/R/splineClasses.R
index 6e670b6..5c453e8 100644
--- a/src/library/splines/R/splineClasses.R
+++ b/src/library/splines/R/splineClasses.R
@@ -1,5 +1,6 @@
 #  File src/library/splines/R/splineClasses.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
+#  Copyright (C) 2000-2017 The R Core Team
 #  Copyright (C) 1998 Douglas M. Bates and William N. Venables.
 #
 #  This program is free software; you can redistribute it and/or modify
@@ -13,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 #### Classes and methods for determining and manipulating interpolation
 #### splines.
@@ -36,15 +37,18 @@
 
 splineDesign <-
     ## Creates the "design matrix" for a collection of B-splines.
-    function(knots, x, ord = 4, derivs = integer(nx), outer.ok = FALSE,
+    function(knots, x, ord = 4, derivs = 0L, outer.ok = FALSE,
              sparse = FALSE)
 {
-    knots <- sort(as.numeric(knots))
-    if((nk <- length(knots)) <= 0) stop("must have at least 'ord' knots")
+    if((nk <- length(knots <- as.numeric(knots))) <= 0)
+        stop("must have at least 'ord' knots")
+    if(is.unsorted(knots)) knots <- sort.int(knots)
     x <- as.numeric(x)
     nx <- length(x)
-    if(length(derivs) != nx)
-	stop("length of 'derivs' must match length of 'x'")
+    ## derivs is re-cycled to length(x) in C
+    if(length(derivs) > nx)
+	stop("length of 'derivs' is larger than length of 'x'")
+    if(length(derivs) < 1L) stop("empty 'derivs'")
     ord <- as.integer(ord)
     if(ord > nk || ord < 1)
 	stop("'ord' must be positive integer, at most the number of knots")
@@ -58,21 +62,23 @@ splineDesign <-
     o1 <- ord - 1L
 ### FIXME: the 'outer.ok && need.outer' handling would more efficiently happen
 ###        in the underlying C code - with some programming effort though..
-    if(need.outer <- any(out.x <- x < knots[ord] | knots[nk - o1] < x)) {
+    if(need.outer <- any(x < knots[ord] | knots[nk - o1] < x)) {
         if(outer.ok) { ## x[] is allowed to be 'anywhere'
-            ## extend knots set "temporarily"
-            in.x <- knots[1L] < x & x < knots[nk]
-	    knots <- knots[c(rep.int(1L, o1), 1L:nk, rep.int(nk, o1))]
-            if((x.out <- !all(in.x))) {
-                x <- x[in.x]
-                nnx <- length(x)
-            }
+	    in.x <- knots[1L] <= x & x <= knots[nk]
+	    if((x.out <- !all(in.x))) {
+		x <- x[in.x]
+		nnx <- length(x)
+	    }
+	    ## extend knots set "temporarily": the boundary knots must be repeated >= 'ord' times.
+            ## NB: If these are already repeated originally, then, on the *right* only, we need
+            ##    to make sure not to add more than needed
+            dkn <- diff(knots)[(nk-1L):1] # >= 0, since they are sorted
+	    knots <- knots[c(rep.int(1L, o1), seq_len(nk),
+                             rep.int(nk, max(0L, ord - match(TRUE, dkn > 0))))]
 	} else
-	stop(gettextf("the 'x' data must be in the range %g to %g unless you set '%s'",
-		      knots[ord],
-                      knots[nk - o1],
-                      "outer.ok = TRUE"),
-             domain = NA)
+	    stop(gettextf("the 'x' data must be in the range %g to %g unless you set '%s'",
+			  knots[ord], knots[nk - o1], "outer.ok = TRUE"),
+		 domain = NA)
     }
     temp <- .Call(C_spline_basis, knots, ord, x, derivs)
     ncoef <- nk - ord
@@ -88,23 +94,17 @@ splineDesign <-
 	    stop(gettextf("%s needs package 'Matrix' correctly installed",
                           "splineDesign(*, sparse=TRUE)"),
                  domain = NA)
-
 	if(need.outer) { ## shift column numbers and drop those "outside"
 	    jj <- jj - o1 - 1L
 	    ok <- 0 <= jj & jj < ncoef
-	    as(new("dgTMatrix",
-		   i = ii[ok] - 1L,
-		   j = jj[ok],
-		   x = as.double(temp[ok]),
-		   Dim = c(nx, ncoef)), "CsparseMatrix")
+	    methods::as(methods::new("dgTMatrix", i = ii[ok] - 1L, j = jj[ok],
+				     x = as.double(temp[ok]), # vector, not matrix
+				     Dim = c(nx, ncoef)), "CsparseMatrix")
 	}
 	else
-	    as(new("dgTMatrix",
-		   i = ii - 1L,
-		   j = jj - 1L,
-		   x = as.double(temp),
-		   Dim = c(nx, ncoef)), "CsparseMatrix")
-
+	    methods::as(methods::new("dgTMatrix", i = ii - 1L, j = jj - 1L,
+				     x = as.double(temp), # vector
+				     Dim = c(nx, ncoef)), "CsparseMatrix")
     } else { ## traditional (dense) matrix
 	design <- matrix(double(nx * ncoef), nx, ncoef)
 	if(need.outer) { ## shift column numbers and drop those "outside"
@@ -120,14 +120,14 @@ splineDesign <-
 
 interpSpline <-
     ## Determine the natural interpolation spline.
-    function(obj1, obj2, bSpline = FALSE, period = NULL, na.action = na.fail)
+    function(obj1, obj2, bSpline = FALSE, period = NULL, na.action = na.fail, sparse = FALSE)
     UseMethod("interpSpline")
 
 interpSpline.default <-
-    function(obj1, obj2, bSpline = FALSE, period = NULL, na.action = na.fail)
+    function(obj1, obj2, bSpline = FALSE, period = NULL, na.action = na.fail, sparse = FALSE)
 {
-    ord <- 4 # spline order -- future: want to use other 'order'/'degree'!
-    deg <- ord - 1
+    ord <- 4L # spline order -- future: want to use other 'order'/'degree' as *argument* !
+    deg <- ord - 1L
 
     frm <- na.action(data.frame(x = as.numeric(obj1), y = as.numeric(obj2)))
     frm <- frm[order(frm$x), ]
@@ -141,7 +141,7 @@ interpSpline.default <-
     derivs <- c(2, integer(ndat), 2) # 2nd derivs coerced to 0 in solve() below
     x	   <- c(x[1L], x, x[ndat])
 ## Solving the system of equations for the spline coefficients can be
-## simplified by using banded matrices but the required Linpack routines
+## simplified by using banded matrices but the required LINPACK routines
 ## are not loaded as part of S.
 ##  z <- .C("spline_basis",
 ##	as.double(knots),
@@ -174,12 +174,13 @@ interpSpline.default <-
 ##	ipvt = z$ipvt,
 ##	b = c(0, y, 0),
 ##	job = 1L)
-    des <- splineDesign(knots, x, ord, derivs)
-    coeff <- solve(as.matrix(des), c(0, frm$y, 0))
-    value <- list(knots = knots, coefficients = coeff, order = ord)
-    attr(value, "formula") <-
-	do.call("~", list(substitute(obj2), substitute(obj1)))
-    class(value) <- c("nbSpline", "bSpline", "spline")
+    des <- splineDesign(knots, x, ord, derivs, sparse=sparse)
+    y <- c(0, frm$y, 0)
+    coeff <- if(sparse) Matrix::solve(des, Matrix::..2dge(y), sparse=TRUE)
+             else solve(des, y)
+    value <- structure(list(knots = knots, coefficients = coeff, order = ord),
+		       formula = do.call("~", list(substitute(obj2), substitute(obj1))),
+		       class = c("nbSpline", "bSpline", "spline"))
     if (bSpline) return(value)
     ## else convert from B- to poly-Spline:
     value <- polySpline(value)
@@ -191,7 +192,7 @@ interpSpline.default <-
 }
 
 interpSpline.formula <-
-    function(obj1, obj2, bSpline = FALSE, period = NULL, na.action = na.fail)
+    function(obj1, obj2, bSpline = FALSE, period = NULL, na.action = na.fail, sparse = FALSE)
 {
     form <- as.formula(obj1)
     if (length(form) != 3)
@@ -200,7 +201,7 @@ interpSpline.formula <-
     value <- interpSpline(as.numeric(eval(form[[3L]], local)),
 			  as.numeric(eval(form[[2L]], local)),
 			  bSpline = bSpline, period = period,
-			  na.action = na.action)
+			  na.action = na.action, sparse = sparse)
     attr(value, "formula") <- form
     value
 }
@@ -225,7 +226,7 @@ periodicSpline.default <-
     if(any((x[-1L] - x[ - lenx]) <= 0))
 	stop("values of 'x' must be strictly increasing")
     if(ord < 2) stop("'ord' must be >= 2")
-    o1 <- ord - 1
+    o1 <- ord - 1 # = degree
     if(!missing(knots)) {
 	period <- knots[length(knots) - o1] - knots[1L]
     }
@@ -236,16 +237,15 @@ periodicSpline.default <-
 	stop("the range of 'x' values exceeds one period")
     y <- y[ind]
     coeff.mat <- splineDesign(knots, x, ord)
+    i1 <- seq_len(o1)
     sys.mat <- coeff.mat[, (1L:lenx)]
-    sys.mat[, seq_len(o1)] <- sys.mat[, seq_len(o1)] +
-	coeff.mat[, lenx + seq_len(o1)]
+    sys.mat[, i1] <- sys.mat[, i1] + coeff.mat[, lenx + i1]
     coeff <- qr.coef(qr(sys.mat), y)
-    coeff <- c(coeff, coeff[seq_len(o1)])
-    value <- list(knots = knots, coefficients = coeff, order = ord,
-		  period = period)
-    attr(value, "formula") <- do.call("~", as.list(sys.call())[3:2])
-    class(value) <- c("pbSpline", "bSpline", "spline")
-    value
+    coeff <- c(coeff, coeff[i1])
+    structure(list(knots = knots, coefficients = coeff,
+		   order = ord, period = period),
+	      formula = do.call("~", as.list(sys.call())[3:2]),
+	      class = c("pbSpline", "bSpline", "spline"))
 }
 
 periodicSpline.formula <- function(obj1, obj2, knots, period = 2 * pi, ord = 4)
@@ -255,11 +255,10 @@ periodicSpline.formula <- function(obj1, obj2, knots, period = 2 * pi, ord = 4)
 	stop("'formula' must be of the form \"y ~ x\"")
     local <- if (missing(obj2)) sys.parent(1) else as.data.frame(obj2)
     ## 'missing(knots)' is transfered :
-    value <-  periodicSpline(as.numeric(eval(form[[3L]], local)),
-			     as.numeric(eval(form[[2L]], local)),
-			     knots = knots, period = period, ord = ord)
-    attr(value, "formula") <- form
-    value
+    structure(periodicSpline.default(as.numeric(eval(form[[3L]], local)),
+				     as.numeric(eval(form[[2L]], local)),
+				     knots = knots, period = period, ord = ord),
+	      formula = form)
 }
 
 polySpline <-
@@ -287,17 +286,15 @@ polySpline.bSpline <- function(object, ...)
 		prod(1L:(i - 1))
 	}
     }
-    value <- list(knots = knots, coefficients = coeff)
-    attr(value, "formula") <- attr(object, "formula")
-    class(value) <- c("polySpline", "spline")
-    value
+    structure(list(knots = knots, coefficients = coeff),
+	      formula = attr(object, "formula"),
+	      class = c("polySpline", "spline"))
 }
 
 polySpline.nbSpline <- function(object, ...)
 {
-    value <- NextMethod("polySpline")
-    class(value) <- c("npolySpline", "polySpline", "spline")
-    value
+    structure(NextMethod("polySpline"),
+              class = c("npolySpline", "polySpline", "spline"))
 }
 
 polySpline.pbSpline <- function(object, ...)
@@ -332,9 +329,8 @@ xyVector <- ## Constructor for the xyVector class
 {
     x <- as.vector(x)
     y <- as.vector(y)
-    if(length(x) != length(y)) {
+    if(length(x) != length(y))
 	stop("lengths of 'x' and 'y' must be the same")
-    }
     structure(list(x = x, y = y), class = "xyVector")
 }
 
diff --git a/src/library/splines/R/splines.R b/src/library/splines/R/splines.R
index ebfafd1..9d1c8cc 100644
--- a/src/library/splines/R/splines.R
+++ b/src/library/splines/R/splines.R
@@ -1,7 +1,7 @@
 #  File src/library/splines/R/splines.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
-#  Copyright (C) 1995-2012 The R Core Team
+#  Copyright (C) 1995-2015 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
@@ -14,24 +14,23 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 bs <- function(x, df = NULL, knots = NULL, degree = 3, intercept = FALSE,
                Boundary.knots = range(x))
 {
+    ord <- 1L + (degree <- as.integer(degree))
+    if(ord <= 1) stop("'degree' must be integer >= 1")
     nx <- names(x)
     x <- as.vector(x)
     nax <- is.na(x)
     if(nas <- any(nax))
         x <- x[!nax]
-    if(!missing(Boundary.knots)) {
+    outside <- if(!missing(Boundary.knots)) {
         Boundary.knots <- sort(Boundary.knots)
-        outside <- (ol <- x < Boundary.knots[1L]) | (or <- x > Boundary.knots[2L])
-    }
-    else outside <- FALSE #rep(FALSE, length = length(x))
+        (ol <- x < Boundary.knots[1L]) | (or <- x > Boundary.knots[2L])
+    } else FALSE
 
-    ord <- 1L + (degree <- as.integer(degree))
-    if(ord <= 1) stop("'degree' must be integer >= 1")
     if(!is.null(df) && is.null(knots)) {
 	nIknots <- df - ord + (1L - intercept) # ==  #{inner knots}
         if(nIknots < 0L) {
@@ -43,7 +42,7 @@ bs <- function(x, df = NULL, knots = NULL, degree = 3, intercept = FALSE,
             if(nIknots > 0L) {
                 knots <- seq.int(from = 0, to = 1,
                                  length.out = nIknots + 2L)[-c(1L, nIknots + 2L)]
-                stats::quantile(x[!outside], knots)
+                quantile(x[!outside], knots)
             }
     }
     Aknots <- sort(c(rep(Boundary.knots, ord), knots))
@@ -52,17 +51,20 @@ bs <- function(x, df = NULL, knots = NULL, degree = 3, intercept = FALSE,
         derivs <- 0:degree
         scalef <- gamma(1L:ord)# factorials
         basis <- array(0, c(length(x), length(Aknots) - degree - 1L))
+	e <- 1/4 # in theory anything in (0,1); was (implicitly) 0 in R <= 3.2.2
         if(any(ol)) {
-            k.pivot <- Boundary.knots[1L]
+	    ## left pivot inside, i.e., a bit to the right of the boundary knot
+	    k.pivot <- (1-e)*Boundary.knots[1L] + e*Aknots[ord+1]
             xl <- cbind(1, outer(x[ol] - k.pivot, 1L:degree, "^"))
             tt <- splineDesign(Aknots, rep(k.pivot, ord), ord, derivs)
-            basis[ol,  ] <- xl %*% (tt/scalef)
+            basis[ol, ] <- xl %*% (tt/scalef)
         }
         if(any(or)) {
-            k.pivot <- Boundary.knots[2L]
+	    ## right pivot inside, i.e., a bit to the left of the boundary knot:
+	    k.pivot <- (1-e)*Boundary.knots[2L] + e*Aknots[length(Aknots)-ord]
             xr <- cbind(1, outer(x[or] - k.pivot, 1L:degree, "^"))
             tt <- splineDesign(Aknots, rep(k.pivot, ord), ord, derivs)
-            basis[or,  ] <- xr %*% (tt/scalef)
+            basis[or, ] <- xr %*% (tt/scalef)
         }
         if(any(inside <- !outside))
             basis[inside,  ] <- splineDesign(Aknots, x[inside], ord)
@@ -108,7 +110,7 @@ ns <- function(x, df = NULL, knots = NULL, intercept = FALSE,
         knots <- if(nIknots > 0L) {
             knots <- seq.int(0, 1,
                              length.out = nIknots + 2L)[-c(1L, nIknots + 2L)]
-            stats::quantile(x[!outside], knots)
+            quantile(x[!outside], knots)
         } ## else  NULL
     } else nIknots <- length(knots)
     Aknots <- sort(c(rep(Boundary.knots, 4L), knots))
@@ -193,8 +195,10 @@ makepredictcall.bs <- function(var, call)
 spline.des <- function(knots, x, ord = 4, derivs = integer(length(x)),
 		       outer.ok = FALSE, sparse = FALSE)
 {
-    list(knots = sort(as.vector(knots)), order = ord, derivs = derivs,
+    if(is.unsorted(knots <- as.numeric(knots)))
+	knots <- sort.int(knots)
+    list(knots = knots, order = ord, derivs = derivs,
 	 design = splineDesign(knots, x, ord, derivs,
-	 outer.ok = outer.ok, sparse = sparse))
+			       outer.ok = outer.ok, sparse = sparse))
 }
 ## splineDesign() is in ./splineClasses.R
diff --git a/src/library/splines/R/zzz.R b/src/library/splines/R/zzz.R
index 01ccd5e..ef4d760 100644
--- a/src/library/splines/R/zzz.R
+++ b/src/library/splines/R/zzz.R
@@ -1,5 +1,5 @@
 #  File src/library/splines/R/zzz.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
 #  Copyright (C) 1995-2012 The R Core Team
 #
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 .noGenerics <- TRUE
 
diff --git a/src/library/splines/man/asVector.Rd b/src/library/splines/man/asVector.Rd
index e9ceeb6..bdd76b6 100644
--- a/src/library/splines/man/asVector.Rd
+++ b/src/library/splines/man/asVector.Rd
@@ -1,5 +1,5 @@
 % File src/library/splines/man/asVector.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2007 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/splines/man/backSpline.Rd b/src/library/splines/man/backSpline.Rd
index c41e074..e99e836 100644
--- a/src/library/splines/man/backSpline.Rd
+++ b/src/library/splines/man/backSpline.Rd
@@ -1,5 +1,5 @@
 % File src/library/splines/man/backSpline.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2007 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/splines/man/bs.Rd b/src/library/splines/man/bs.Rd
index a9ef6e9..0b689a6 100644
--- a/src/library/splines/man/bs.Rd
+++ b/src/library/splines/man/bs.Rd
@@ -1,6 +1,6 @@
 % File src/library/splines/man/bs.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2013 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2015 R Core Team
 % Distributed under GPL 2 or later
 
 \name{bs}
@@ -30,9 +30,10 @@ bs(x, df = NULL, knots = NULL, degree = 3, intercept = FALSE,
   \item{intercept}{if \code{TRUE}, an intercept is included in the
     basis; default is \code{FALSE}.}
   \item{Boundary.knots}{boundary points at which to anchor the B-spline
-    basis (default the range of the data). If both \code{knots} and
-    \code{Boundary.knots} are supplied, the basis parameters do not
-    depend on \code{x}. Data can extend beyond \code{Boundary.knots}.}
+    basis (default the range of the non-\code{\link{NA}} data).  If both
+    \code{knots} and \code{Boundary.knots} are supplied, the basis
+    parameters do not depend on \code{x}.  Data can extend beyond
+    \code{Boundary.knots}.}
 }
 \details{
   \code{bs} is based on the function \code{\link{spline.des}}.
@@ -41,6 +42,12 @@ bs(x, df = NULL, knots = NULL, degree = 3, intercept = FALSE,
   interior knots and degree, evaluated at the values of \code{x}.  A
   primary use is in modeling formulas to directly specify a piecewise
   polynomial term in a model.
+
+  When \code{Boundary.knots} are set \emph{inside} \code{range(x)},
+  \code{bs()} now uses a \sQuote{pivot} inside the respective boundary
+  knot which is important for derivative evaluation.  In \R versions
+  \eqn{\le}{<=} 3.2.2, the boundary knot itself had been used as
+  pivot, which lead to somewhat wrong extrapolations.
 }
 \value{
   A matrix of dimension \code{c(length(x), df)}, where either \code{df}
@@ -54,6 +61,10 @@ bs(x, df = NULL, knots = NULL, degree = 3, intercept = FALSE,
   \code{\link{ns}}, \code{\link{poly}}, \code{\link{smooth.spline}},
   \code{\link{predict.bs}}, \code{\link{SafePrediction}}
 }
+\author{Douglas Bates and Bill Venables.  Tweaks by R Core, and a patch
+  fixing extrapolation \dQuote{outside} \code{Boundary.knots} by Trevor
+  Hastie.
+}
 \references{
   Hastie, T. J. (1992)
   Generalized additive models.
diff --git a/src/library/splines/man/interpSpline.Rd b/src/library/splines/man/interpSpline.Rd
index 211f7c5..5bf6071 100644
--- a/src/library/splines/man/interpSpline.Rd
+++ b/src/library/splines/man/interpSpline.Rd
@@ -1,6 +1,6 @@
 % File src/library/splines/man/interpSpline.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2007 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2015 R Core Team
 % Distributed under GPL 2 or later
 
 \name{interpSpline}
@@ -8,21 +8,22 @@
 \title{Create an Interpolation Spline}
 \description{
   Create an interpolation spline, either from \code{x} and \code{y}
-  vectors, or from a formula/data.frame combination.
+  vectors (\code{default} method), or from a \code{formula} / \code{data.frame}
+  combination (\code{formula} method).
 }
 \usage{
 interpSpline(obj1, obj2, bSpline = FALSE, period = NULL,
-             na.action = na.fail)
+             na.action = na.fail, sparse = FALSE)
 }
 \arguments{
- \item{obj1}{Either a numeric vector of \code{x} values or a formula.}
- \item{obj2}{If \code{obj1} is numeric this should be a numeric vector
+ \item{obj1}{either a numeric vector of \code{x} values or a formula.}
+ \item{obj2}{if \code{obj1} is numeric this should be a numeric vector
    of the same length.  If \code{obj1} is a formula this can be an
    optional data frame in which to evaluate the names in the formula.}
- \item{bSpline}{If \code{TRUE} the b-spline representation is returned,
+ \item{bSpline}{if \code{TRUE} the b-spline representation is returned,
    otherwise the piecewise polynomial representation is returned.
    Defaults to \code{FALSE}.}
- \item{period}{An optional positive numeric value giving a period for a
+ \item{period}{an optional positive numeric value giving a period for a
    periodic interpolation spline.}
  \item{na.action}{a optional function which indicates what should happen
    when the data contain \code{NA}s.  The default action
@@ -30,9 +31,12 @@ interpSpline(obj1, obj2, bSpline = FALSE, period = NULL,
    alternative action \code{na.fail} causes \code{interpSpline} to print
    an error message and terminate if there are any incomplete
    observations.}
+ \item{sparse}{logical passed to the underlying
+   \code{\link{splineDesign}}.  If true, saves memory and is faster when
+   there are more than a few hundred points.}
 }
 \value{
-  An object that inherits from class \code{spline}. The object can be in
+  An object that inherits from (S3) class \code{spline}. The object can be in
   the B-spline representation, in which case it will be of class
   \code{nbSpline} for natural B-spline, or in the piecewise polynomial
   representation, in which case it will be of class \code{npolySpline}.
@@ -43,7 +47,7 @@ interpSpline(obj1, obj2, bSpline = FALSE, period = NULL,
   \code{\link{splineOrder}},
   \code{\link{periodicSpline}}.
 }
-\examples{
+\examples{% tests also in ../tests/spline-tst.R
 require(graphics); require(stats)
 ispl <- interpSpline( women$height, women$weight )
 ispl2 <- interpSpline( weight ~ height,  women )
diff --git a/src/library/splines/man/ns.Rd b/src/library/splines/man/ns.Rd
index 9b3f1a9..0484128 100644
--- a/src/library/splines/man/ns.Rd
+++ b/src/library/splines/man/ns.Rd
@@ -1,5 +1,5 @@
 % File src/library/splines/man/ns.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2013 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/splines/man/periodicSpline.Rd b/src/library/splines/man/periodicSpline.Rd
index a367c93..dc7af09 100644
--- a/src/library/splines/man/periodicSpline.Rd
+++ b/src/library/splines/man/periodicSpline.Rd
@@ -1,5 +1,5 @@
 % File src/library/splines/man/periodicSpline.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2007 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/splines/man/polySpline.Rd b/src/library/splines/man/polySpline.Rd
index 7f7920f..ecb3553 100644
--- a/src/library/splines/man/polySpline.Rd
+++ b/src/library/splines/man/polySpline.Rd
@@ -1,5 +1,5 @@
 % File src/library/splines/man/polySpline.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2007 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/splines/man/predict.bSpline.Rd b/src/library/splines/man/predict.bSpline.Rd
index efe1dcb..2eff8e1 100644
--- a/src/library/splines/man/predict.bSpline.Rd
+++ b/src/library/splines/man/predict.bSpline.Rd
@@ -1,5 +1,5 @@
 % File src/library/splines/man/predict.bSpline.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2007 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/splines/man/predict.bs.Rd b/src/library/splines/man/predict.bs.Rd
index d51ac66..ec202d1 100644
--- a/src/library/splines/man/predict.bs.Rd
+++ b/src/library/splines/man/predict.bs.Rd
@@ -1,5 +1,5 @@
 % File src/library/splines/man/predict.bs.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2007 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/splines/man/splineDesign.Rd b/src/library/splines/man/splineDesign.Rd
index 323d471..589be1f 100644
--- a/src/library/splines/man/splineDesign.Rd
+++ b/src/library/splines/man/splineDesign.Rd
@@ -1,10 +1,8 @@
 % File src/library/splines/man/splineDesign.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2013 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2015 R Core Team
 % Distributed under GPL 2 or later
 
-\newcommand{\CRANpkg}{\href{http://CRAN.R-project.org/package=#1}{\pkg{#1}}}
-
 \name{splineDesign}
 \alias{splineDesign}
 \alias{spline.des}
@@ -20,31 +18,33 @@ spline.des  (knots, x, ord = 4, derivs, outer.ok = FALSE,
              sparse = FALSE)
 }
 \arguments{
-  \item{knots}{a numeric vector of knot positions with non-decreasing
-    values.}
+  \item{knots}{a numeric vector of knot positions (which will be sorted
+    increasingly if needed).}
   \item{x}{a numeric vector of values at which to evaluate the B-spline
     functions or derivatives.  Unless \code{outer.ok} is true, the
-    values in \code{x} must be between \code{knots[ord]} and
-    \code{knots[ length(knots) + 1 - ord ]}.}
+    values in \code{x} must be between the \dQuote{inner} knots
+    \code{knots[ord]} and \code{knots[ length(knots) - (ord-1)]}.}
   \item{ord}{a positive integer giving the order of the spline function.
     This is the number of coefficients in each piecewise polynomial
     segment, thus a cubic spline has order 4.  Defaults to 4.}
-  \item{derivs}{an integer vector of the same length as \code{x} and with
-    values between \code{0} and \code{ord - 1}.  The derivative of the
-    given order is evaluated at the \code{x} positions.  Defaults to a
-    vector of zeroes of the same length as \code{x}.}
+  \item{derivs}{an integer vector with values between \code{0} and
+    \code{ord - 1}, conceptually recycled to the length of \code{x}.
+    The derivative of the given order is evaluated at the \code{x}
+    positions.  Defaults to zero (or a vector of zeroes of the same
+    length as \code{x}).}
   \item{outer.ok}{logical indicating if \code{x} should be allowed
     outside the \emph{inner} knots, see the \code{x} argument.}
   \item{sparse}{logical indicating if the result should inherit from class
-    \code{\linkS4class{sparseMatrix}} (package \CRANpkg{Matrix}).}
+    \code{"\link[Matrix:sparseMatrix-class]{sparseMatrix}"} (from package \CRANpkg{Matrix}).}
+%    \code{\linkS4class{sparseMatrix}} (from package \CRANpkg{Matrix}).}
 }
 \value{
-  A matrix with \code{length( x )} rows and \code{length( knots ) - ord}
+  A matrix with \code{length(x)} rows and \code{length(knots) - ord}
   columns.  The i'th row of the matrix contains the coefficients of the
   B-splines (or the indicated derivative of the B-splines) defined by
   the \code{knot} vector and evaluated at the i'th value of \code{x}.
   Each B-spline is defined by a set of \code{ord} successive knots so
-  the total number of B-splines is \code{length(knots)-ord}.
+  the total number of B-splines is \code{length(knots) - ord}.
 }
 \note{The older \code{spline.des} function takes the same arguments but
   returns a list with several components including \code{knots},
@@ -56,6 +56,7 @@ spline.des  (knots, x, ord = 4, derivs, outer.ok = FALSE,
 \examples{
 require(graphics)
 splineDesign(knots = 1:10, x = 4:7)
+splineDesign(knots = 1:10, x = 4:7, deriv = 1)
 ## visualize band structure
 \donttest{Matrix::drop0(zapsmall(6*splineDesign(knots = 1:40, x = 4:37, sparse = TRUE)))}
 
diff --git a/src/library/splines/man/splineKnots.Rd b/src/library/splines/man/splineKnots.Rd
index b5a21de..a79c0b1 100644
--- a/src/library/splines/man/splineKnots.Rd
+++ b/src/library/splines/man/splineKnots.Rd
@@ -1,5 +1,5 @@
 % File src/library/splines/man/splineKnots.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2007 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/splines/man/splineOrder.Rd b/src/library/splines/man/splineOrder.Rd
index 34b0cc8..778c1d6 100644
--- a/src/library/splines/man/splineOrder.Rd
+++ b/src/library/splines/man/splineOrder.Rd
@@ -1,5 +1,5 @@
 % File src/library/splines/man/splineOrder.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2007 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/splines/man/splines-package.Rd b/src/library/splines/man/splines-package.Rd
index 7c4593b..2f018e3 100644
--- a/src/library/splines/man/splines-package.Rd
+++ b/src/library/splines/man/splines-package.Rd
@@ -1,5 +1,5 @@
 % File src/library/splines/man/splines-package.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2007 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/splines/man/xyVector.Rd b/src/library/splines/man/xyVector.Rd
index b24d67d..a2c57fa 100644
--- a/src/library/splines/man/xyVector.Rd
+++ b/src/library/splines/man/xyVector.Rd
@@ -1,5 +1,5 @@
 % File src/library/splines/man/xyVector.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2007 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/splines/po/R-da.po b/src/library/splines/po/R-da.po
index 45e68de..d08776c 100644
--- a/src/library/splines/po/R-da.po
+++ b/src/library/splines/po/R-da.po
@@ -2,7 +2,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: R 3.0.0\n"
 "Report-Msgid-Bugs-To: bugs.r-project.org\n"
-"POT-Creation-Date: 2012-09-24 08:30\n"
+"POT-Creation-Date: 2016-04-01 09:50\n"
 "PO-Revision-Date: 2012-01-28 15:52+0200\n"
 "Last-Translator: Joe <joedalton2 at yahoo.dk>\n"
 "Language-Team: LANGUAGE <LL at li.org>\n"
@@ -16,9 +16,13 @@ msgstr ""
 msgid "must have at least 'ord' knots"
 msgstr "skal have mindst »ord« knob"
 
-msgid "length of 'derivs' must match length of 'x'"
+#, fuzzy
+msgid "length of 'derivs' is larger than length of 'x'"
 msgstr "længden for »drivs« skal matche længden for »x«"
 
+msgid "empty 'derivs'"
+msgstr ""
+
 msgid "'ord' must be positive integer, at most the number of knots"
 msgstr "»ord« skal være et positivt heltal, højst antallet af knob"
 
diff --git a/src/library/splines/po/R-de.po b/src/library/splines/po/R-de.po
index c636551..c798bfe 100644
--- a/src/library/splines/po/R-de.po
+++ b/src/library/splines/po/R-de.po
@@ -7,11 +7,11 @@ msgid ""
 msgstr ""
 "Project-Id-Version: R 3.1.0\n"
 "Report-Msgid-Bugs-To: bugs.r-project.org\n"
-"POT-Creation-Date: 2012-09-24 08:30\n"
+"POT-Creation-Date: 2016-04-01 09:50\n"
 "PO-Revision-Date: 2013-03-01 16:34+0100\n"
 "Last-Translator: Detlef Steuer <detlef.steuer at hsu-hh.de>\n"
 "Language-Team: R-core <R-core at r-project.org>\n"
-"Language: \n"
+"Language: de\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
@@ -20,9 +20,13 @@ msgstr ""
 msgid "must have at least 'ord' knots"
 msgstr "muss zumindest 'ord' Knoten haben"
 
-msgid "length of 'derivs' must match length of 'x'"
+#, fuzzy
+msgid "length of 'derivs' is larger than length of 'x'"
 msgstr "Länge von 'derivs' muss der Länge von 'x' entsprechen"
 
+msgid "empty 'derivs'"
+msgstr ""
+
 msgid "'ord' must be positive integer, at most the number of knots"
 msgstr ""
 "'ord' muss eine positive ganze Zahl sein, maximal die Anzahl der Knoten"
@@ -31,7 +35,8 @@ msgid "need at least %s (=%d) knots"
 msgstr "brauche mindestens %s (=%d) Knoten"
 
 msgid "the 'x' data must be in the range %g to %g unless you set '%s'"
-msgstr "die 'x' Daten müssen im Bereich %g bis %g liegen, außer es ist %s gesetzt"
+msgstr ""
+"die 'x' Daten müssen im Bereich %g bis %g liegen, außer es ist %s gesetzt"
 
 msgid "%s needs package 'Matrix' correctly installed"
 msgstr "%s benötigt das korrekt installierte Paket 'Matrix'"
@@ -77,5 +82,5 @@ msgstr "'df' war zu klein; habe %d benutzt"
 
 msgid "some 'x' values beyond boundary knots may cause ill-conditioned bases"
 msgstr ""
-"einige 'x' Werte ausserhalb der Begrenzungsknoten erzeugen eventuwll "
+"einige 'x' Werte ausserhalb der Begrenzungsknoten erzeugen eventuell "
 "schlecht konditionierte Basis"
diff --git a/src/library/splines/po/R-fr.po b/src/library/splines/po/R-fr.po
index 63a4f3e..2576d14 100644
--- a/src/library/splines/po/R-fr.po
+++ b/src/library/splines/po/R-fr.po
@@ -7,7 +7,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: R 2.12.0\n"
 "Report-Msgid-Bugs-To: bugs.r-project.org\n"
-"POT-Creation-Date: 2012-09-24 08:30\n"
+"POT-Creation-Date: 2016-04-01 09:50\n"
 "PO-Revision-Date: 2013-03-18 22:10+0100\n"
 "Last-Translator: Philippe Grosjean <phgrosjean at sciviews.org>\n"
 "Language-Team: French <R-core at r-project.org>\n"
@@ -21,9 +21,13 @@ msgstr ""
 msgid "must have at least 'ord' knots"
 msgstr "il faut au moins 'ord' noeuds"
 
-msgid "length of 'derivs' must match length of 'x'"
+#, fuzzy
+msgid "length of 'derivs' is larger than length of 'x'"
 msgstr "la longueur de 'derivs' doit correspondre � la longueur de 'x'"
 
+msgid "empty 'derivs'"
+msgstr ""
+
 msgid "'ord' must be positive integer, at most the number of knots"
 msgstr "'ord' doit �tre un entier positif, au nombre de noeuds au mieux"
 
diff --git a/src/library/splines/po/R-ja.po b/src/library/splines/po/R-ja.po
index 29309a6..acd8b07 100644
--- a/src/library/splines/po/R-ja.po
+++ b/src/library/splines/po/R-ja.po
@@ -2,7 +2,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: R 2.3.0 \n"
 "Report-Msgid-Bugs-To: bugs.r-project.org\n"
-"POT-Creation-Date: 2013-03-07 08:36\n"
+"POT-Creation-Date: 2016-04-01 09:50\n"
 "PO-Revision-Date: 2013-02-28 04:15+0200 \n"
 "Last-Translator: Triad sou  \n"
 "Language-Team: RjpWiki Message Translation Team <mokada at md.tsukuba.ac.jp> \n"
@@ -16,9 +16,13 @@ msgstr ""
 msgid "must have at least 'ord' knots"
 msgstr " 少なくとも 'ord' 個のノットを持たなければなりません "
 
-msgid "length of 'derivs' must match length of 'x'"
+#, fuzzy
+msgid "length of 'derivs' is larger than length of 'x'"
 msgstr " 'derivs' の長さは 'x' の長さと合わせる必要があります "
 
+msgid "empty 'derivs'"
+msgstr ""
+
 msgid "'ord' must be positive integer, at most the number of knots"
 msgstr " 'ord' は正の整数で、多くてもノット数です "
 
diff --git a/src/library/splines/po/R-ko.po b/src/library/splines/po/R-ko.po
index 796c480..9fe2854 100644
--- a/src/library/splines/po/R-ko.po
+++ b/src/library/splines/po/R-ko.po
@@ -1,30 +1,40 @@
 # Korean translation for R splines package
-# src/library/splines/po/R-ko.po
-# Copyright (C) 1995-2014 The R Core Team
+# ./splines/po/R-ko.po
+#
+# Copyright (C) 1995-2016 The R Core Team
+#
 # This file is distributed under the same license as the R splines package.
-# Chel Hee Lee <chl948 at mail.usask.ca>, 2008-2014.
+# Maintained by Chel Hee Lee <chl948 at mail.usask.ca>, 2008-2016.
+# Contact: Chel Hee Lee <gnustats at gmail.com>
+#
+# Notes:
+# Under development (unstable) starting from 11-APR-2016 for R-3.3.1 - QC: in progress
+# Freezed on 10-APR-2016 for R-3.3.0 - QC: PASS
+# Freezed on 30-MAR-2015 for R-3.2.0 - QC: PASS
+# Freezed on 06-FEB-2015 for R-3.1.3 - QC: PASS
 #
 msgid ""
 msgstr ""
-"Project-Id-Version: R 3.1.0\n"
+"Project-Id-Version: R-3.3.0\n"
 "Report-Msgid-Bugs-To: bugs.r-project.org\n"
-"POT-Creation-Date: 2012-12-10 18:35\n"
-"PO-Revision-Date: 2014-03-26 20:59-0600\n"
+"POT-Creation-Date: 2016-04-01 09:50\n"
+"PO-Revision-Date: 2016-04-11 13:08-0600\n"
 "Last-Translator: Chel Hee Lee <chl948 at mail.usask.ca>\n"
-"Language-Team:  <chl948 at mail.usask.ca>\n"
+"Language-Team: Chel Hee Lee <chl948 at mail.usask.ca>\n"
 "Language: ko\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
 "Plural-Forms: nplurals=1; plural=0;\n"
-"X-Poedit-SourceCharset: UTF-8\n"
-"X-Generator: Poedit 1.5.4\n"
 
 msgid "must have at least 'ord' knots"
 msgstr "반드시 적어도 'ord' 놋트를 가져야 합니다"
 
-msgid "length of 'derivs' must match length of 'x'"
-msgstr "'derivs'의 길이는 반드시 'x'의 길이와 일치해야 합니다"
+msgid "length of 'derivs' is larger than length of 'x'"
+msgstr "'derivs'의 길이가 'x'의 길이보다 깁니다."
+
+msgid "empty 'derivs'"
+msgstr ""
 
 msgid "'ord' must be positive integer, at most the number of knots"
 msgstr "'ord'는 반드시 양의 정수이며 최대 놋트의 수만큼입니다"
@@ -83,3 +93,6 @@ msgid "some 'x' values beyond boundary knots may cause ill-conditioned bases"
 msgstr ""
 "boundary knots를 넘어서는 일부 'x'값들은 올바르지 ill-conditioned bases를 유"
 "발할 수 있습니다"
+
+#~ msgid "length of 'derivs' must match length of 'x'"
+#~ msgstr "'derivs'의 길이는 반드시 'x'의 길이와 일치해야 합니다"
diff --git a/src/library/splines/po/R-pl.po b/src/library/splines/po/R-pl.po
index daf62ef..d3b9d58 100644
--- a/src/library/splines/po/R-pl.po
+++ b/src/library/splines/po/R-pl.po
@@ -1,8 +1,8 @@
 msgid ""
 msgstr ""
-"Project-Id-Version: R 3.1.0\n"
+"Project-Id-Version: R 3.4.0\n"
 "Report-Msgid-Bugs-To: bugs.r-project.org\n"
-"POT-Creation-Date: 2013-03-07 08:36\n"
+"POT-Creation-Date: 2016-04-04 08:15\n"
 "PO-Revision-Date: \n"
 "Last-Translator: Łukasz Daniel <lukasz.daniel at gmail.com>\n"
 "Language-Team: Łukasz Daniel <lukasz.daniel at gmail.com>\n"
@@ -13,130 +13,118 @@ msgstr ""
 "na-Revision-Date: 2012-05-29 07:55+0100\n"
 "Plural-Forms: nplurals=3; plural=(n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 "
 "|| n%100>=20) ? 1 : 2);\n"
-"X-Poedit-SourceCharset: iso-8859-1\n"
-"X-Generator: Poedit 1.5.4\n"
+"X-Poedit-SourceCharset: UTF-8\n"
+"X-Generator: Poedit 1.8.7\n"
 
-# splines/R/splineClasses.R: 43
-# stop("must have at least 'ord' knots")
-msgid "must have at least 'ord' knots"
-msgstr "potrzeba mieć przynajmniej węzły 'ord'"
-
-# splines/R/splineClasses.R: 47
-# stop("length of 'derivs' must match length of 'x'")
-msgid "length of 'derivs' must match length of 'x'"
-msgstr "długość 'derivs' musi zgadzać się z długością 'x'"
-
-# splines/R/splineClasses.R: 50
-# stop("'ord' must be positive integer, at most the number of knots")
-msgid "'ord' must be positive integer, at most the number of knots"
-msgstr ""
-"'ord' musi być dodatnią liczbą całkowitą, równą co najwyżej liczbie węzłów"
-
-# splines/R/splineClasses.R: 54
-# stop(gettextf("need at least %s (=%d) knots",
-#                       "2*ord -1", 2*ord -1),
-#              domain = NA)
-msgid "need at least %s (=%d) knots"
-msgstr "potrzeba przynamniej %s (=%d) wezłów"
-
-# splines/R/splineClasses.R: 71
-# stop(gettextf("the 'x' data must be in the range %g to %g unless you set '%s'",
-# 		      knots[ord],
-#                       knots[nk - o1],
-#                       "outer.ok = TRUE"),
-#              domain = NA)
-msgid "the 'x' data must be in the range %g to %g unless you set '%s'"
-msgstr "dane 'x' muszą być w przedziale od %g do %g chyba, że ustawiono '%s'"
-
-# splines/R/splineClasses.R: 88
-# stop(gettextf("%s needs package 'Matrix' correctly installed",
-#                           "splineDesign(*, sparse=TRUE)"),
-#                  domain = NA)
+#. R/splineClasses.R: gettextf("%s needs package 'Matrix' correctly installed", "splineDesign(*, sparse=TRUE)")
+#: R/splineClasses.R:0
 msgid "%s needs package 'Matrix' correctly installed"
 msgstr "'%s' potrzebuje poprawnie zainstalowanego pakietu 'Matrix'"
 
-# splines/R/splineClasses.R: 137
-# stop("values of 'x' must be distinct")
-# splines/R/splineClasses.R: 224
-# stop("values of 'x' must be distinct")
-msgid "values of 'x' must be distinct"
-msgstr "wartości 'x' muszą być różne"
+#. R/splines.R: stop("'degree' must be integer >= 1")
+#: R/splines.R:0
+msgid "'degree' must be integer >= 1"
+msgstr "'degree' musi być liczbą całkowitą >= 1"
 
-# splines/R/splineClasses.R: 198
-# stop("'formula' must be of the form \"y ~ x\"")
-# splines/R/splineClasses.R: 255
-# stop("'formula' must be of the form \"y ~ x\"")
-msgid "'formula' must be of the form \"y ~ x\""
-msgstr "'formula' musi posiadać formę \"y ~ x\""
+#. R/splineClasses.R: gettextf("'deriv' must be between 0 and %d", ord - 1)
+#. R/splineClasses.R: gettextf("'deriv' must be between 0 and %d", ord - 1)
+#: R/splineClasses.R:0
+msgid "'deriv' must be between 0 and %d"
+msgstr "'deriv' musi być pomiędzy 0 a %d"
 
-# splines/R/splineClasses.R: 220
-# stop("lengths of 'x' and 'y' must match")
-msgid "lengths of 'x' and 'y' must match"
-msgstr "długości 'x' oraz 'y' muszą być zgodne"
+#. R/splines.R: gettextf("'df' was too small; have used %d", ord - (1L - intercept))
+#. R/splines.R: gettextf("'df' was too small; have used %d", 1L + intercept)
+#: R/splines.R:0
+msgid "'df' was too small; have used %d"
+msgstr "'df' było zbyt małe; użyto %d"
 
-# splines/R/splineClasses.R: 226
-# stop("values of 'x' must be strictly increasing")
-msgid "values of 'x' must be strictly increasing"
-msgstr "wartości 'x' muszą być ściśle rosnące"
+#. R/splineClasses.R: stop("'formula' must be of the form \"y ~ x\"")
+#. R/splineClasses.R: stop("'formula' must be of the form \"y ~ x\"")
+#: R/splineClasses.R:0
+msgid "'formula' must be of the form \"y ~ x\""
+msgstr "'formula' musi posiadać formę \"y ~ x\""
 
-# splines/R/splineClasses.R: 227
-# stop("'ord' must be >= 2")
+#. R/splineClasses.R: stop("'ord' must be >= 2")
+#: R/splineClasses.R:0
 msgid "'ord' must be >= 2"
 msgstr "'ord' musi być >= 2"
 
-# splines/R/splineClasses.R: 236
-# stop("the range of 'x' values exceeds one period")
-msgid "the range of 'x' values exceeds one period"
-msgstr "zakres wartości 'x' przekracza jeden okres"
+#. R/splineClasses.R: stop("'ord' must be positive integer, at most the number of knots")
+#: R/splineClasses.R:0
+msgid "'ord' must be positive integer, at most the number of knots"
+msgstr ""
+"'ord' musi być dodatnią liczbą całkowitą, równą co najwyżej liczbie węzłów"
 
-# splines/R/splineClasses.R: 280
-# stop("knot positions must be non-decreasing")
-# splines/R/splineClasses.R: 386
-# stop("knot positions must be non-decreasing")
+#. R/splineClasses.R: stop("empty 'derivs'")
+#: R/splineClasses.R:0
+msgid "empty 'derivs'"
+msgstr "puste 'derivs'"
+
+#. R/splineClasses.R: stop("knot positions must be non-decreasing")
+#. R/splineClasses.R: stop("knot positions must be non-decreasing")
+#: R/splineClasses.R:0
 msgid "knot positions must be non-decreasing"
 msgstr "pozycje węzłów muszą być niemalejące"
 
-# splines/R/splineClasses.R: 336
-# stop("lengths of 'x' and 'y' must be the same")
-msgid "lengths of 'x' and 'y' must be the same"
-msgstr "długości 'x' oraz 'y' muszą być takie same"
-
-# splines/R/splineClasses.R: 367
-# stop(gettextf("'deriv' must be between 0 and %d", ord - 1),
-#              domain = NA)
-# splines/R/splineClasses.R: 389
-# stop(gettextf("'deriv' must be between 0 and %d", ord - 1),
-#              domain = NA)
-msgid "'deriv' must be between 0 and %d"
-msgstr "'deriv' musi być pomiędzy 0 a %d"
-
-# splines/R/splineClasses.R: 566
-# stop("knot positions must be strictly increasing")
+#. R/splineClasses.R: stop("knot positions must be strictly increasing")
+#: R/splineClasses.R:0
 msgid "knot positions must be strictly increasing"
 msgstr "pozycje węzłów muszą być ściśle rosnące"
 
-# splines/R/splineClasses.R: 575
-# stop("spline must be monotone")
-msgid "spline must be monotone"
-msgstr "funkcja sklejana musi być funkcją monotoniczną"
+#. R/splineClasses.R: stop("length of 'derivs' is larger than length of 'x'")
+#: R/splineClasses.R:0
+msgid "length of 'derivs' is larger than length of 'x'"
+msgstr "długość 'derivs' jest większa niż długość 'x'"
 
-# splines/R/splines.R: 34
-# stop("'degree' must be integer >= 1")
-msgid "'degree' must be integer >= 1"
-msgstr "'degree' musi być liczbą całkowitą >= 1"
+#. R/splineClasses.R: stop("lengths of 'x' and 'y' must be the same")
+#: R/splineClasses.R:0
+msgid "lengths of 'x' and 'y' must be the same"
+msgstr "długości 'x' oraz 'y' muszą być takie same"
 
-# splines/R/splines.R: 39
-# warning(gettextf("'df' was too small; have used %d",
-#                              ord - (1L - intercept)), domain = NA)
-# splines/R/splines.R: 105
-# warning(gettextf("'df' was too small; have used %d",
-#                              1L + intercept), domain = NA)
-msgid "'df' was too small; have used %d"
-msgstr "'df' było zbyt małe; użyto %d"
+#. R/splineClasses.R: stop("lengths of 'x' and 'y' must match")
+#: R/splineClasses.R:0
+msgid "lengths of 'x' and 'y' must match"
+msgstr "długości 'x' oraz 'y' muszą być zgodne"
+
+#. R/splineClasses.R: stop("must have at least 'ord' knots")
+#: R/splineClasses.R:0
+msgid "must have at least 'ord' knots"
+msgstr "potrzeba mieć przynajmniej węzły 'ord'"
 
-# splines/R/splines.R: 51
-# warning("some 'x' values beyond boundary knots may cause ill-conditioned bases")
+#. R/splineClasses.R: gettextf("need at least %s (=%d) knots", "2*ord -1", 2 * ord -     1)
+#: R/splineClasses.R:0
+msgid "need at least %s (=%d) knots"
+msgstr "potrzeba przynamniej %s (=%d) wezłów"
+
+#. R/splines.R: warning("some 'x' values beyond boundary knots may cause ill-conditioned bases")
+#: R/splines.R:0
 msgid "some 'x' values beyond boundary knots may cause ill-conditioned bases"
 msgstr ""
 "niektóre wartości 'x' poza zakresem węzłów mogą powodować źle uwarunkowane "
 "bazy"
+
+#. R/splineClasses.R: stop("spline must be monotone")
+#: R/splineClasses.R:0
+msgid "spline must be monotone"
+msgstr "funkcja sklejana musi być funkcją monotoniczną"
+
+#. R/splineClasses.R: gettextf("the 'x' data must be in the range %g to %g unless you set '%s'",     knots[ord], knots[nk - o1], "outer.ok = TRUE")
+#: R/splineClasses.R:0
+msgid "the 'x' data must be in the range %g to %g unless you set '%s'"
+msgstr "dane 'x' muszą być w przedziale od %g do %g chyba, że ustawiono '%s'"
+
+#. R/splineClasses.R: stop("the range of 'x' values exceeds one period")
+#: R/splineClasses.R:0
+msgid "the range of 'x' values exceeds one period"
+msgstr "zakres wartości 'x' przekracza jeden okres"
+
+#. R/splineClasses.R: stop("values of 'x' must be distinct")
+#. R/splineClasses.R: stop("values of 'x' must be distinct")
+#: R/splineClasses.R:0
+msgid "values of 'x' must be distinct"
+msgstr "wartości 'x' muszą być różne"
+
+#. R/splineClasses.R: stop("values of 'x' must be strictly increasing")
+#: R/splineClasses.R:0
+msgid "values of 'x' must be strictly increasing"
+msgstr "wartości 'x' muszą być ściśle rosnące"
diff --git a/src/library/splines/po/R-pt_BR.po b/src/library/splines/po/R-pt_BR.po
index b579c58..8145d59 100644
--- a/src/library/splines/po/R-pt_BR.po
+++ b/src/library/splines/po/R-pt_BR.po
@@ -6,11 +6,11 @@ msgid ""
 msgstr ""
 "Project-Id-Version: R 2.3.0\n"
 "Report-Msgid-Bugs-To: bugs.r-project.org\n"
-"POT-Creation-Date: 2012-09-24 08:30\n"
+"POT-Creation-Date: 2016-04-01 09:50\n"
 "PO-Revision-Date: 2011-03-26 08:57-0300\n"
 "Last-Translator: Fernando Henrique Ferraz P. da Rosa <feferraz at .ime.usp.br>\n"
 "Language-Team: http://www.feferraz.net/br/P/Projeto_Traducao_R_Portugues\n"
-"Language: \n"
+"Language: pt_BR\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
@@ -20,9 +20,13 @@ msgstr ""
 msgid "must have at least 'ord' knots"
 msgstr "pelo menos os nós 'ord' devem estar presentes"
 
-msgid "length of 'derivs' must match length of 'x'"
+#, fuzzy
+msgid "length of 'derivs' is larger than length of 'x'"
 msgstr "comprimento de 'derivs' deve ser igual ao comprimento de 'x'"
 
+msgid "empty 'derivs'"
+msgstr ""
+
 msgid "'ord' must be positive integer, at most the number of knots"
 msgstr ""
 "'ord' deve ser um inteiro positivo, sendo no máximo igual ao número de nós"
diff --git a/src/library/splines/po/R-ru.po b/src/library/splines/po/R-ru.po
index 5958968..c30f4cd 100644
--- a/src/library/splines/po/R-ru.po
+++ b/src/library/splines/po/R-ru.po
@@ -10,10 +10,10 @@ msgstr ""
 "Project-Id-Version: R 2.9.0\n"
 "Report-Msgid-Bugs-To: bugs.r-project.org\n"
 "POT-Creation-Date: 2012-09-24 08:30\n"
-"PO-Revision-Date: 2013-03-19 21:07-0600\n"
+"PO-Revision-Date: 2016-04-05 18:08-0600\n"
 "Last-Translator: Alexey Shipunov <dactylorhiza at gmail.com>\n"
 "Language-Team: Russian\n"
-"Language: \n"
+"Language: ru\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=KOI8-R\n"
 "Content-Transfer-Encoding: 8bit\n"
diff --git a/src/library/splines/po/R-splines.pot b/src/library/splines/po/R-splines.pot
index 3328602..f489d62 100644
--- a/src/library/splines/po/R-splines.pot
+++ b/src/library/splines/po/R-splines.pot
@@ -1,8 +1,7 @@
 msgid ""
 msgstr ""
-"Project-Id-Version: R 3.1.0\n"
-"Report-Msgid-Bugs-To: bugs.r-project.org\n"
-"POT-Creation-Date: 2013-03-07 08:36\n"
+"Project-Id-Version: splines 3.4.0\n"
+"POT-Creation-Date: 2016-04-01 09:50\n"
 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
 "Last-Translator: FULL NAME <EMAIL at ADDRESS>\n"
 "Language-Team: LANGUAGE <LL at li.org>\n"
@@ -14,7 +13,10 @@ msgstr ""
 msgid "must have at least 'ord' knots"
 msgstr ""
 
-msgid "length of 'derivs' must match length of 'x'"
+msgid "length of 'derivs' is larger than length of 'x'"
+msgstr ""
+
+msgid "empty 'derivs'"
 msgstr ""
 
 msgid "'ord' must be positive integer, at most the number of knots"
diff --git a/src/library/splines/po/R-zh_CN.po b/src/library/splines/po/R-zh_CN.po
index 3504c3c..919b942 100644
--- a/src/library/splines/po/R-zh_CN.po
+++ b/src/library/splines/po/R-zh_CN.po
@@ -7,11 +7,11 @@ msgid ""
 msgstr ""
 "Project-Id-Version: R 2.4.0\n"
 "Report-Msgid-Bugs-To: bugs.r-project.org\n"
-"POT-Creation-Date: 2013-03-07 08:36\n"
+"POT-Creation-Date: 2016-04-01 09:50\n"
 "PO-Revision-Date: 2005-02-04 08:37+0000\n"
 "Last-Translator: 陈斐 <feic at normipaiva.com>\n"
 "Language-Team: Chinese\n"
-"Language: \n"
+"Language: zh_CN\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
@@ -20,9 +20,13 @@ msgstr ""
 msgid "must have at least 'ord' knots"
 msgstr "至少需要有'ord'个结"
 
-msgid "length of 'derivs' must match length of 'x'"
+#, fuzzy
+msgid "length of 'derivs' is larger than length of 'x'"
 msgstr "'derivs'和'x'的长度必需匹配"
 
+msgid "empty 'derivs'"
+msgstr ""
+
 msgid "'ord' must be positive integer, at most the number of knots"
 msgstr "'ord'必需为正整数,最多不能超过结的数目"
 
diff --git a/src/library/splines/po/da.po b/src/library/splines/po/da.po
index b599701..d3e2f5c 100644
--- a/src/library/splines/po/da.po
+++ b/src/library/splines/po/da.po
@@ -5,8 +5,8 @@
 msgid ""
 msgstr ""
 "Project-Id-Version: R 3.0.0\n"
-"Report-Msgid-Bugs-To: bugs.r-project.org\n"
-"POT-Creation-Date: 2013-11-25 05:14+0000\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2016-04-01 10:28-0700\n"
 "PO-Revision-Date: 2011-11-28 22:23+0200\n"
 "Last-Translator: Joe <joedalton2 at yahoo.dk>\n"
 "Language-Team: LANGUAGE <LL at li.org>\n"
@@ -17,6 +17,6 @@ msgstr ""
 "Plural-Forms: nplurals=2; plural=(n != 1);\n"
 "X-Generator: Pootle 2.1.6\n"
 
-#: splines.c:155
+#: splines.c:153
 msgid "'ord' must be a positive integer"
 msgstr "'ord' skal være et positivt heltal"
diff --git a/src/library/splines/po/de.po b/src/library/splines/po/de.po
index d1ebd22..6aaa0df 100644
--- a/src/library/splines/po/de.po
+++ b/src/library/splines/po/de.po
@@ -6,17 +6,17 @@
 msgid ""
 msgstr ""
 "Project-Id-Version: R 3.1.0\n"
-"Report-Msgid-Bugs-To: bugs.r-project.org\n"
-"POT-Creation-Date: 2013-11-25 05:14+0000\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2016-04-01 10:28-0700\n"
 "PO-Revision-Date: 2009-10-07 14:28+0200\n"
 "Last-Translator: Detlef Steuer <detlef.steuer at hsu-hh.de>\n"
 "Language-Team: R-core <R-core at r-project.org>\n"
-"Language: \n"
+"Language: de\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
 "Plural-Forms: nplurals=2; plural=n == 1 ? 0 : 1;\n"
 
-#: splines.c:155
+#: splines.c:153
 msgid "'ord' must be a positive integer"
 msgstr "'ord' muss eine positive ganze Zahl sein"
diff --git a/src/library/splines/po/fr.po b/src/library/splines/po/fr.po
index cfc40ce..899ddff 100644
--- a/src/library/splines/po/fr.po
+++ b/src/library/splines/po/fr.po
@@ -6,8 +6,8 @@
 msgid ""
 msgstr ""
 "Project-Id-Version: R 2.12.0\n"
-"Report-Msgid-Bugs-To: bugs.r-project.org\n"
-"POT-Creation-Date: 2013-11-25 05:14+0000\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2016-04-01 10:28-0700\n"
 "PO-Revision-Date: 2010-10-01 21:00+0100\n"
 "Last-Translator: Philippe Grosjean <phgrosjean at sciviews.org>\n"
 "Language-Team: French <R-core at r-project.org>\n"
@@ -18,6 +18,6 @@ msgstr ""
 "Plural-Forms: nplurals=2; plural=(n > 1);\n"
 "X-Poedit-Language: French\n"
 
-#: splines.c:155
+#: splines.c:153
 msgid "'ord' must be a positive integer"
 msgstr "'ord' doit �tre un entier positif"
diff --git a/src/library/splines/po/ja.po b/src/library/splines/po/ja.po
index 5266b23..0d61e14 100644
--- a/src/library/splines/po/ja.po
+++ b/src/library/splines/po/ja.po
@@ -6,8 +6,8 @@
 msgid ""
 msgstr ""
 "Project-Id-Version: R 2.1.1 \n"
-"Report-Msgid-Bugs-To: bugs.r-project.org\n"
-"POT-Creation-Date: 2013-11-25 05:14+0000\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2016-04-01 10:28-0700\n"
 "PO-Revision-Date: 2005-06-02 16:10+0900 \n"
 "Last-Translator: Nobuo Funao \n"
 "Language-Team: RjpWiki Message Translation Team <mokada at md.tsukuba.ac.jp> \n"
@@ -16,6 +16,6 @@ msgstr ""
 "Content-Type: text/plain; charset=UTF-8 \n"
 "Content-Transfer-Encoding: 8bit \n"
 
-#: splines.c:155
+#: splines.c:153
 msgid "'ord' must be a positive integer"
 msgstr " 'ord' は正の値でなければいけません "
diff --git a/src/library/splines/po/ko.po b/src/library/splines/po/ko.po
index 2987ac8..0e92427 100644
--- a/src/library/splines/po/ko.po
+++ b/src/library/splines/po/ko.po
@@ -1,25 +1,32 @@
 # Korean translation for R splines package
-# src/library/splines/po/ko.po
-# Copyright (C) 1995-2014 The R Core Team
+# ./splines/po/ko.po
+#
+# Copyright (C) 1995-2016 The R Core Team
+#
 # This file is distributed under the same license as the R splines package.
-# Chel Hee Lee <chl948 at mail.usask.ca>, 2008-2014.
+# Maintained by Chel Hee Lee <chl948 at mail.usask.ca>, 2008-2016.
+# Contact: Chel Hee Lee <gnustats at gmail.com>
+#
+# Notes:
+# Under development (unstable) starting from 11-APR-2016 for R-3.3.1 - QC: in progress
+# Freezed on 10-APR-2016 for R-3.3.0 - QC: PASS
+# Freezed on 30-MAR-2015 for R-3.2.0 - QC: PASS
+# Freezed on 06-FEB-2015 for R-3.1.3 - QC: PASS
 #
 msgid ""
 msgstr ""
-"Project-Id-Version: R 3.1.0\n"
+"Project-Id-Version: R-3.3.0\n"
 "Report-Msgid-Bugs-To: bugs.r-project.org\n"
-"POT-Creation-Date: 2013-11-25 05:14+0000\n"
-"PO-Revision-Date: 2014-03-26 20:59-0600\n"
+"POT-Creation-Date: 2016-04-01 10:28-0700\n"
+"PO-Revision-Date: 2016-04-11 13:08-0600\n"
 "Last-Translator: Chel Hee Lee <chl948 at mail.usask.ca>\n"
-"Language-Team:  <chl948 at mail.usask.ca>\n"
+"Language-Team: Chel Hee Lee <chl948 at mail.usask.ca>\n"
 "Language: ko\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
 "Plural-Forms: nplurals=1; plural=0;\n"
-"X-Poedit-SourceCharset: UTF-8\n"
-"X-Generator: Poedit 1.5.4\n"
 
-#: splines.c:155
+#: splines.c:153
 msgid "'ord' must be a positive integer"
-msgstr "'ord'는 반드시 양의 정수이어야 합니다"
+msgstr "'ord'는 반드시 양의 정수이어야 합니다."
diff --git a/src/library/splines/po/pl.po b/src/library/splines/po/pl.po
index faeabd0..fa77d7e 100644
--- a/src/library/splines/po/pl.po
+++ b/src/library/splines/po/pl.po
@@ -1,8 +1,8 @@
 msgid ""
 msgstr ""
-"Project-Id-Version: R 3.1.0\n"
-"Report-Msgid-Bugs-To: bugs.r-project.org\n"
-"POT-Creation-Date: 2013-11-25 05:14+0000\n"
+"Project-Id-Version: R 3.4.0\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2016-04-01 10:28-0700\n"
 "PO-Revision-Date: \n"
 "Last-Translator: Łukasz Daniel <lukasz.daniel at gmail.com>\n"
 "Language-Team: Łukasz Daniel <lukasz.daniel at gmail.com>\n"
@@ -13,11 +13,9 @@ msgstr ""
 "na-Revision-Date: 2012-05-29 07:55+0100\n"
 "Plural-Forms: nplurals=3; plural=(n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 "
 "|| n%100>=20) ? 1 : 2);\n"
-"X-Poedit-SourceCharset: iso-8859-1\n"
-"X-Generator: Poedit 1.5.4\n"
+"X-Poedit-SourceCharset: UTF-8\n"
+"X-Generator: Poedit 1.8.7\n"
 
-# splines/src/splines.c: 155
-# error(_("'ord' must be a positive integer"))
-#: splines.c:155
+#: splines.c:153
 msgid "'ord' must be a positive integer"
 msgstr "argument 'ord' musi być dodatnią liczbą całkowitą"
diff --git a/src/library/splines/po/pt_BR.po b/src/library/splines/po/pt_BR.po
index e71cd52..58890bc 100644
--- a/src/library/splines/po/pt_BR.po
+++ b/src/library/splines/po/pt_BR.po
@@ -5,18 +5,18 @@
 msgid ""
 msgstr ""
 "Project-Id-Version: R 2.2.0\n"
-"Report-Msgid-Bugs-To: bugs.r-project.org\n"
-"POT-Creation-Date: 2013-11-25 05:14+0000\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2016-04-01 10:28-0700\n"
 "PO-Revision-Date: 2011-03-26 08:57-0300\n"
 "Last-Translator: Fernando Henrique Ferraz P. da Rosa <feferraz at .ime.usp.br>\n"
 "Language-Team: http://www.feferraz.net/br/P/Projeto_Traducao_R_Portugues\n"
-"Language: \n"
+"Language: pt_BR\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
 "Plural-Forms: nplurals=2; plural=(n > 1);\n"
 "X-Generator: Translate Toolkit 1.7.0\n"
 
-#: splines.c:155
+#: splines.c:153
 msgid "'ord' must be a positive integer"
 msgstr "'ord' deve ser um inteiro positivo"
diff --git a/src/library/splines/po/ru.po b/src/library/splines/po/ru.po
index d95a8c4..828d8ee 100644
--- a/src/library/splines/po/ru.po
+++ b/src/library/splines/po/ru.po
@@ -9,17 +9,17 @@ msgid ""
 msgstr ""
 "Project-Id-Version: R 2.9.0\n"
 "Report-Msgid-Bugs-To: bugs.r-project.org\n"
-"POT-Creation-Date: 2013-11-25 05:14+0000\n"
-"PO-Revision-Date: 2013-03-19 21:07-0600\n"
+"POT-Creation-Date: 2015-06-06 13:51+0100\n"
+"PO-Revision-Date: 2016-04-05 18:08-0600\n"
 "Last-Translator: Alexey Shipunov <dactylorhiza at gmail.com>\n"
 "Language-Team: Russian\n"
-"Language: \n"
+"Language: ru\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=KOI8-R\n"
 "Content-Transfer-Encoding: 8bit\n"
-"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n"
-"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
+"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
 
-#: splines.c:155
+#: splines.c:147
 msgid "'ord' must be a positive integer"
 msgstr "'ord' ������ ���� ������������� �����"
+
diff --git a/src/library/splines/po/splines.pot b/src/library/splines/po/splines.pot
index a098525..b28c358 100644
--- a/src/library/splines/po/splines.pot
+++ b/src/library/splines/po/splines.pot
@@ -1,14 +1,14 @@
 # SOME DESCRIPTIVE TITLE.
-# Copyright (C) YEAR The R Core Team
+# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
 # This file is distributed under the same license as the PACKAGE package.
 # FIRST AUTHOR <EMAIL at ADDRESS>, YEAR.
 #
 #, fuzzy
 msgid ""
 msgstr ""
-"Project-Id-Version: R 3.1.0\n"
-"Report-Msgid-Bugs-To: bugs.r-project.org\n"
-"POT-Creation-Date: 2013-11-25 05:14+0000\n"
+"Project-Id-Version: splines 3.4.0\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2016-04-01 10:28-0700\n"
 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
 "Last-Translator: FULL NAME <EMAIL at ADDRESS>\n"
 "Language-Team: LANGUAGE <LL at li.org>\n"
@@ -17,6 +17,6 @@ msgstr ""
 "Content-Type: text/plain; charset=CHARSET\n"
 "Content-Transfer-Encoding: 8bit\n"
 
-#: splines.c:155
+#: splines.c:153
 msgid "'ord' must be a positive integer"
 msgstr ""
diff --git a/src/library/splines/po/zh_CN.po b/src/library/splines/po/zh_CN.po
index 3723974..7886960 100644
--- a/src/library/splines/po/zh_CN.po
+++ b/src/library/splines/po/zh_CN.po
@@ -6,17 +6,17 @@
 msgid ""
 msgstr ""
 "Project-Id-Version: R 2.4.0\n"
-"Report-Msgid-Bugs-To: bugs.r-project.org\n"
-"POT-Creation-Date: 2013-11-25 05:14+0000\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2016-04-01 10:28-0700\n"
 "PO-Revision-Date: 2005-02-04 08:37+0000\n"
 "Last-Translator: 陈斐 <feic at avaya.com>\n"
 "Language-Team: Chinese\n"
-"Language: \n"
+"Language: zh_CN\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
 "Plural-Forms: nplurals=1; plural=0;\n"
 
-#: splines.c:155
+#: splines.c:153
 msgid "'ord' must be a positive integer"
 msgstr "'ord'的值必需为正整数"
diff --git a/src/library/splines/src/Makefile.in b/src/library/splines/src/Makefile.in
index 56b1c09..df18073 100644
--- a/src/library/splines/src/Makefile.in
+++ b/src/library/splines/src/Makefile.in
@@ -18,6 +18,8 @@ SOURCES_F =
 DEPENDS = $(SOURCES_C:.c=.d)
 OBJECTS = $(SOURCES_C:.c=.o) $(SOURCES_F:.f=.o)
 
+PKG_CFLAGS = $(C_VISIBILITY)
+
 SHLIB = $(pkg)@SHLIB_EXT@
 
 all: Makedeps
diff --git a/src/library/splines/src/splines.c b/src/library/splines/src/splines.c
index ccfaecb..1bbae7b 100644
--- a/src/library/splines/src/splines.c
+++ b/src/library/splines/src/splines.c
@@ -2,6 +2,7 @@
  *  S or S-PLUS or R.
  *
  *     Copyright (C) 1998 Douglas M. Bates and William N. Venables.
+ *     Copyright (C) 1999-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 the
@@ -15,7 +16,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  *
  * The routines are loosely based on the pseudo-code in Schumacher (Wiley,
  * 1981) and the CMLIB library DBSPLINES.
@@ -23,6 +24,7 @@
 
 #include <R.h>
 #include <Rinternals.h>
+#include <string.h> // for memcpy
 
 #ifdef ENABLE_NLS
 #include <libintl.h>
@@ -88,17 +90,21 @@ diff_table(splPTR sp, double x, int ndiff)
 static void
 basis_funcs(splPTR sp, double x, double *b)
 {
-    int j, r;
-    double saved, term;
-
     diff_table(sp, x, sp->ordm1);
     b[0] = 1.;
-    for (j = 1; j <= sp->ordm1; j++) {
-	saved = 0.;
-	for (r = 0; r < j; r++) { // FIXME: divides by zero
-	    term = b[r]/(sp->rdel[r] + sp->ldel[j - 1 - r]);
-	    b[r] = saved + sp->rdel[r] * term;
-	    saved = sp->ldel[j - 1 - r] * term;
+    for (int j = 1; j <= sp->ordm1; j++) {
+	double saved = 0.;
+	for (int r = 0; r < j; r++) { // do not divide by zero
+	    double den = sp->rdel[r] + sp->ldel[j - 1 - r];
+	    if(den != 0) {
+		double term = b[r]/den;
+		b[r] = saved + sp->rdel[r] * term;
+		saved = sp->ldel[j - 1 - r] * term;
+	    } else {
+		if(r != 0 || sp->rdel[r] != 0.)
+		    b[r] = saved;
+		saved = 0.;
+	    }
 	}
 	b[j] = saved;
     }
@@ -135,41 +141,41 @@ spline_value(SEXP knots, SEXP coeff, SEXP order, SEXP x, SEXP deriv)
     SEXP val;
     splPTR sp;
     double *xx, *kk;
-    int der, i, n, nk;
+    int n, nk;
 
     PROTECT(knots = coerceVector(knots, REALSXP));
     kk = REAL(knots); nk = length(knots);
     PROTECT(coeff = coerceVector(coeff, REALSXP));
     PROTECT(x = coerceVector(x, REALSXP));
-    n = length(x);
-    xx = REAL(x);
-    PROTECT(order = coerceVector(order, INTSXP));
-    PROTECT(deriv = coerceVector(deriv, INTSXP));
-    der = INTEGER(deriv)[0];
-    PROTECT(val = allocVector(REALSXP, n));
+    xx = REAL(x); n = length(x);
+    int ord = asInteger(order);
+    int der = asInteger(deriv);
+    if (ord == NA_INTEGER || ord <= 0)
+	error(_("'ord' must be a positive integer"));
 
     /* populate the spl_struct */
-
     sp = (struct spl_struct *) R_alloc(1, sizeof(struct spl_struct));
-    sp->order = INTEGER(order)[0];
-    if (sp->order <= 0) { error(_("'ord' must be a positive integer")); }
-    sp->ordm1 = sp->order - 1;
+    sp->order = ord;
+    sp->ordm1 = ord - 1;
     sp->ldel = (double *) R_alloc(sp->ordm1, sizeof(double));
     sp->rdel = (double *) R_alloc(sp->ordm1, sizeof(double));
     sp->knots = kk; sp->nknots = nk;
     sp->coeff = REAL(coeff);
     sp->a = (double *) R_alloc(sp->order, sizeof(double));
 
-    for (i = 0; i < n; i++) {
+    PROTECT(val = allocVector(REALSXP, n));
+    double *rval = REAL(val);
+
+    for (int i = 0; i < n; i++) {
 	set_cursor(sp, xx[i]);
 	if (sp->curs < sp->order || sp->curs > (nk - sp->order)) {
-	    REAL(val)[i] = R_NaN;
+	    rval[i] = R_NaN;
 	} else {
-	    Memcpy(sp->a, REAL(coeff) + sp->curs - sp->order, sp->order);
-	    REAL(val)[i] = evaluate(sp, xx[i], der);
+	    Memcpy(sp->a, sp->coeff + sp->curs - sp->order, sp->order);
+	    rval[i] = evaluate(sp, xx[i], der);
 	}
     }
-    UNPROTECT(6);
+    UNPROTECT(4);
     return val;
 }
 
@@ -179,68 +185,69 @@ spline_basis(SEXP knots, SEXP order, SEXP xvals, SEXP derivs)
 {
 /* evaluate the non-zero B-spline basis functions (or their derivatives)
  * at xvals.  */
-    int nd, nk, nx, i, j, *ders;
-    double *kk, *xx;
-    SEXP val, offsets;
-    splPTR sp = (struct spl_struct *) R_alloc(1, sizeof(struct spl_struct));
 
     PROTECT(knots = coerceVector(knots, REALSXP));
-    kk = REAL(knots); nk = length(knots);
-    PROTECT(order = coerceVector(order, INTSXP));
+    double *kk = REAL(knots); int nk = length(knots);
+    int ord = asInteger(order);
     PROTECT(xvals = coerceVector(xvals, REALSXP));
-    xx = REAL(xvals); nx = length(xvals);
+    double *xx = REAL(xvals); int nx = length(xvals);
     PROTECT(derivs = coerceVector(derivs, INTSXP));
-    ders = INTEGER(derivs); nd = length(derivs);
+    int *ders = INTEGER(derivs), nd = length(derivs);
 
+    splPTR sp = (struct spl_struct *) R_alloc(1, sizeof(struct spl_struct));
     /* fill sp : */
-    sp->order = INTEGER(order)[0];
-    sp->ordm1 = sp->order - 1;
+    sp->order = ord;
+    sp->ordm1 = ord - 1;
     sp->rdel = (double *) R_alloc(sp->ordm1, sizeof(double));
     sp->ldel = (double *) R_alloc(sp->ordm1, sizeof(double));
     sp->knots = kk; sp->nknots = nk;
     sp->a = (double *) R_alloc(sp->order, sizeof(double));
-    PROTECT(val = allocMatrix(REALSXP, sp->order, nx));
-    PROTECT(offsets = allocVector(INTSXP, nx));
+    SEXP val = PROTECT(allocMatrix(REALSXP, sp->order, nx)),
+	offsets = PROTECT(allocVector(INTSXP, nx));
+    double *valM = REAL(val);
+    int *ioff = INTEGER(offsets);
 
-    for(i = 0; i < nx; i++) {
+    for(int i = 0; i < nx; i++) {
 	set_cursor(sp, xx[i]);
-	INTEGER(offsets)[i] = j = sp->curs - sp->order;
-	if (j < 0 || j > nk) {
-	    for (j = 0; j < sp->order; j++) {
-		REAL(val)[i * sp->order + j] = R_NaN;
+	int io = ioff[i] = sp->curs - sp->order;
+	if (io < 0 || io > nk) {
+	    for (int j = 0; j < sp->order; j++) {
+		valM[i * sp->order + j] = R_NaN;
 	    }
-	} else {
-	    if (ders[i % nd] > 0) { /* slow method for derivatives */
-		int ii;
-		for(ii = 0; ii < sp->order; ii++) {
-		    for(j = 0; j < sp->order; j++) sp->a[j] = 0;
-		    sp->a[ii] = 1;
-		    REAL(val)[i * sp->order + ii] =
-			evaluate(sp, xx[i], ders[i % nd]);
-		}
-	    } else {		/* fast method for value */
-		basis_funcs(sp, xx[i], REAL(val) + i * sp->order);
+	} else if (ders[i % nd] > 0) { /* slow method for derivatives */
+	    for(int ii = 0; ii < sp->order; ii++) {
+		for(int j = 0; j < sp->order; j++) sp->a[j] = 0;
+		sp->a[ii] = 1;
+		valM[i * sp->order + ii] =
+		    evaluate(sp, xx[i], ders[i % nd]);
 	    }
+	} else {		/* fast method for value */
+	    basis_funcs(sp, xx[i], valM + i * sp->order);
 	}
     }
     setAttrib(val, install("Offsets"), offsets);
-    UNPROTECT(6);
+    UNPROTECT(5);
     return val;
 }
 
 #include <R_ext/Rdynload.h>
 
-const static R_CallMethodDef R_CallDef[] = {
-   {"spline_basis", (DL_FUNC)&spline_basis, 4},
-   {"spline_value", (DL_FUNC)&spline_value, 5},
-   {NULL, NULL, 0}
+#define CALLDEF(name, n)  {#name, (DL_FUNC) &name, n}
+
+static const R_CallMethodDef R_CallDef[] = {
+    CALLDEF(spline_basis, 4),
+    CALLDEF(spline_value, 5),
+    {NULL, NULL, 0}
 };
 
 
 void
+#ifdef HAVE_VISIBILITY_ATTRIBUTE
+__attribute__ ((visibility ("default")))
+#endif
 R_init_splines(DllInfo *dll)
 {
     R_registerRoutines(dll, NULL, R_CallDef, NULL, NULL);
     R_useDynamicSymbols(dll, FALSE);
-//    R_forceSymbols(dll, TRUE); // too few to worry about, used in cobs*
+    R_forceSymbols(dll, TRUE);
 }
diff --git a/src/library/splines/tests/sparse-tst.R b/src/library/splines/tests/sparse-tst.R
new file mode 100644
index 0000000..feacc54
--- /dev/null
+++ b/src/library/splines/tests/sparse-tst.R
@@ -0,0 +1,35 @@
+###----------------- sparse / dense   interpSpline() ---------------------------
+
+## This requires recommended package Matrix.
+
+if(!requireNamespace("Matrix", quietly = TRUE)) q()
+
+require("splines")
+
+## from  help(interpSpline) -- ../man/interpSpline.Rd
+ispl <- interpSpline( women$height, women$weight)
+isp. <- interpSpline( women$height, women$weight, sparse=TRUE)
+stopifnot(all.equal(ispl, isp., tol = 1e-12)) # seen 1.65e-14
+
+##' @title Interpolate size-n version of the 'women' data sparsely and densely
+##' @param n size of "women-like" data to interpolate
+##' @return list with dense and sparse \code{\link{system.time}()}s
+##' @author Martin Maechler
+ipStime <- function(n) { # and using 'ispl'
+    h <- seq(55, 75, length.out = n)
+    w <- predict(ispl, h)$y
+    c.d <- system.time(is.d <- interpSpline(h, w, sparse=FALSE))
+    c.s <- system.time(is.s <- interpSpline(h, w, sparse=TRUE ))
+    stopifnot(all.equal(is.d, is.s, tol = 1e-7)) # seen 9.4e-10 (n=1000), 1.3e-7 (n=5000)
+    list(d.time = c.d, s.time = c.s)
+}
+
+n.s <- 25 * round(2^seq(1,6, by=.5))
+if(!interactive())# save 'check time'
+    n.s <- n.s[100 <= n.s & n.s <= 800]
+(ipL <- lapply(setNames(n.s, paste0("n=",n.s)), ipStime))
+## sparse is *an order of magnitude* faster for n ~= 1000 but somewhat slower for n ~< 200:
+sapply(ipL, function(ip) round(ip$d.time / ip$s.time, 1)[c(1,3)])
+##           n=50 n=75 n=100 n=150 n=200 n=275 n=400 n=575 n=800 n=1125 n=1600 -- nb-mm4, i7-5600U
+## user.self  0.5  0.5   0.5   0.5   0.7   2.5   4.3  12.3  33.7   70.5  116.1
+## elapsed    0.5  0.3   0.5   0.7   1.0   2.5   4.3  13.0  26.2   57.4  117.3
diff --git a/src/library/splines/tests/spline-tst.R b/src/library/splines/tests/spline-tst.R
new file mode 100644
index 0000000..3f49e65
--- /dev/null
+++ b/src/library/splines/tests/spline-tst.R
@@ -0,0 +1,224 @@
+require("splines")
+
+## Bug report PR#16549 - 'bad value from splineDesign'
+## Date: Wed, 30 Sep 2015 12:12:47 +0000
+## https://bugs.r-project.org/bugzilla/show_bug.cgi?id=16549
+
+## Reporter: roconnor at health.usf.edu  (extended original example code)
+
+kn8.01 <- c(0,0,0,0,1,1,1,1)
+m1  <- rbind(c(1, 0,0,0))
+m.1 <- rbind(c(0,0,0, 1))
+stopifnot(
+    ## the first gave (0 0 0 0) instead of m1 :
+    all.equal(splineDesign(kn8.01, c(0,2),    outer.ok = TRUE), rbind(m1, 0)),
+    all.equal(splineDesign(kn8.01, c( 0,1,2), outer.ok = TRUE), rbind(m1, m.1, 0)),
+    all.equal(splineDesign(kn8.01, c(-1,0,1), outer.ok = TRUE), rbind(0, m1, m.1)),
+    all.equal(splineDesign(kn8.01, 0, outer.ok = TRUE), m1),
+    all.equal(splineDesign(kn8.01, 0), m1),
+    TRUE)
+
+## The original fix proposal introduced a new bug, visible here:
+S <- splineDesign(c(-3, -3, -2, 0, 2, 3, 3), x= -3:3, outer.ok=TRUE)
+## (had a NaN in the lower-right corner)
+stopifnot(all.equal(S,
+		    rbind(0, c(22,3,0)/45, c(193, 6*23, 9)/360,
+			  c(1,3,1)/5,
+			  c(9, 6*23, 193)/360,
+			  c(0,3,22)/45, 0),
+		    tolerance = 1e-14))
+
+chkSum.Ok <- TRUE ## for check
+chkSum <- function(knots, n = 1 + 2^9, ord = 4) {
+    stopifnot(is.numeric(knots), !is.unsorted(knots), (n.k <- length(knots)) >= ord)
+    dk <- diff(rk <- range(uk <- unique(knots)))
+    if(dk == 0) dk <- uk[1]/4
+    d.x <- dk / (2*n.k)
+    ## x: the unique knots
+    x <- sort(c(uk, seq.int(min(knots)-d.x, max(knots)+d.x, length.out = n)))
+    bb <- splineDesign(knots, x = x, ord = ord, outer.ok = TRUE)
+    is.x.in <- knots[ord] <= x & x <= knots[n.k-(ord-1)]
+    ##                   ~~~~     ~~~~  same as in splineDesign(*, outer.ok=TRUE)
+    ##
+### no longer needed:
+    ## work around "infelicity" (or not; not sure if to call "bug")
+    ## n.RHk := #{duplicated RHS boundary knots}
+    ## n.RHk <- match(FALSE, rev(duplicated(knots)))
+    ## if(ord > 1 && n.RHk > ord) { ## the (ord == 1) case "works" via spike = 1
+    ##     ## <==> knots[n.k -j ] == knots[n.k] for j = 0,1,..,(n.RHk-1)
+    ##     ## then spl(x= RHS-knot, knots) == 0, even though "should" be 1
+    ##     ## "FIX it up" for here. FIXME: do in splineDesign() or it's C code ?!
+    ##     iR <- which(x == knots[n.k])
+    ##     ## ncol(bb) == n.k - ord
+    ##     j <- n.k - n.RHk # == ncol(bb) - (n.RHk - ord)
+    ##     if(any(bb[iR, j] == 0)) bb[iR, j] <- 1
+    ## }
+    sumB <- rowSums(bb)
+    if(any(iBad <- !is.finite(sumB))) {
+	chkSum.Ok <<- FALSE ## for check
+	cat("** _FIXME_ NON-finite values in sumB: ord = ", ord, "; |knots| =", n.k,"\n")
+	cat("knots <- "); dput(knots)
+	cat("non-finite at x = "); dput(x[iBad])
+    } else if(length(bb)) { # only when bb[] is not 0-dimensional
+	eps <- 3*.Machine$double.eps
+	stopifnot(abs(1 - sumB[is.x.in]) <= 2*eps, 0 <= sumB+eps, sumB-2*eps <= 1)
+	## TODO: now also check derivatives
+    }
+    invisible(bb)
+}
+
+plotSplD <- function(knots, n = 2^10, ord = 4, type = "l",
+		     ylim = c(0,1), ylab = "B-splines", ...) {
+    stopifnot(is.numeric(knots), !is.unsorted(knots), (n.k <- length(knots)) >= ord)
+    dk <- diff(range(uk <- unique(knots)))
+    if(dk == 0) dk <- uk[1]/4
+    d.x <- dk / (2*n.k)
+    ## x: will contain the unique knots uk
+    x <- sort(c(uk, seq.int(min(knots)-d.x, max(knots)+d.x, length.out = n)))
+    bb <- splineDesign(knots, x = x, ord = ord, outer.ok = TRUE)
+    matplot(x, bb, type=type, ylim=ylim, ylab=ylab, ...)
+    sumB <- rowSums(bb)
+    abline(v = knots, lty = 3, col = "light gray")
+    abline(v = knots[c(ord, n.k-(ord-1))], lty = 3, col = "gray10")
+    lines(x, sumB, col = adjustcolor("red", 0.4), lwd = 3)
+    abline(h=1, lty=2, col = adjustcolor(1, 0.4), lwd = 2)
+    ## lty, col,: from matplot()
+    legend(mean(x), 0.98, legend = paste0("B_", 1:ncol(bb)), lty=1:5, col=1:6,
+	   bty = "n", xjust = 0.5)
+    invisible(list(x=x, splineDesign = bb))
+}
+
+if(!dev.interactive(orNone=TRUE)) pdf("spline-tst.pdf")
+
+plotSplD(kn8.01)
+chkSum  (kn8.01)
+
+## from ../man/splineDesign.Rd :
+knots <- c(1,1.8,3:5,6.5,7,8.1,9.2,10)  # 10 => 10-4 = 6 Basis splines
+str(plotSplD(knots))       # cubic     splines, adding to 1 in [ 4, 7 ]
+str(plotSplD(knots, ord=3))# quadratic splines, adding to 1 in [ 3, 8.1]
+str(plotSplD(knots, ord=2))# linear    splines, adding to 1 in [1.8,9.2]
+str(plotSplD(knots, ord=1))# constant  splines, adding to 1 in [1, 10]
+
+chkSum(knots)
+chkSum(knots, ord=3)
+chkSum(knots, ord=2)
+chkSum(knots, ord=1)
+
+## cases that failed too {Linux lynne 4.1.6 x86_64}
+chkSum(c(1:5, 9,9),     ord=2) # ok for ord in {1,3,4}
+chkSum(c(1:4, 9,9,9),   ord=3)
+chkSum(c(1:3, 9,9,9,9), ord=4)
+## These failed in R <= 3.2.2 (but not after first fix):
+chkSum(c(0,0,0,0, 1:3), ord=4)
+chkSum(c(0,0,0,   1:4), ord=3)
+chkSum(c(0,0,     1:5), ord=2)
+
+## This should be symmetric, but was not;
+## the graphic is maybe most convincing:
+k6.01 <- c(0,0,0, 1,1,1)
+round(with(plotSplD(k6.01, ord=2, n=16), cbind(x, splineDesign)), 4)
+x8 <- (0:8)/8
+sp8 <- splineDesign(k6.01, x=x8, ord=2)
+print.table(8*sp8, zero.print=".")
+stopifnot(all.equal(8*sp8,
+		    cbind(0, 8:0, 0:8, 0), tol = 1e-14))
+## or just
+splineDesign(k6.01, x=0:1, ord=2)
+##  0 1 0 0
+##  0 0 1 0 --- [finally !]
+stopifnot(identical(cbind(0, diag(2), 0),
+		    splineDesign(k6.01, x=0:1, ord=2)))
+
+## Further:
+for(k in 0:8)
+    chkSum(c(0:k, 9,9,9),     ord=2)
+for(k in 0:8)
+    chkSum(c(0:k, 9,9,9,9),   ord=3)
+for(k in 0:8)
+    chkSum(c(0:k, 9,9,9,9,9), ord=4)
+
+## look at two examples
+r  <- plotSplD(c(0:4, 8.9,9,9,9), ord=3)# B_6 is narrow spike
+r. <- plotSplD(c(0:4,  9, 9,9,9), ord=3)# B_6 diverged to all zero.
+if(interactive())
+    round(with(r., cbind(x, splineDesign)), 4)
+stopifnot(r.$splineDesign[, 6] == 0)
+## one could argue that B_6 should also have finite area, and hence be "a delta".
+## ==> sum_j B_j(x = 9) would then be Inf or undefined ..
+## more sensible: B_6 should be omitted and should have B_5(9) == 1
+## now implemented:
+stopifnot(identical(c(0, 0, 0, 0, 1, 0),
+		    with(r., splineDesign[x == 9,])))
+
+## Everything is fine, if  left-right  mirrored / reversed :
+r03 <- plotSplD(c(0,0,0,0,  1:5), ord=3)
+## here, B_1 is "delta" and should rather be omitted
+stopifnot(identical(c(0, 1, 0, 0, 0, 0),
+		    with(r03, splineDesign[x == 0,])))
+## 0 1 0 0 0 0 -- as it should be ..
+round(with(r03, cbind(x, splineDesign)[50:60,]), 4)
+
+r04 <- plotSplD(c(0,0,0,0,  1:5), ord=4)
+## here, B_1 is "delta" and should rather be omitted
+stopifnot(identical(c(1, 0, 0, 0, 0),
+		    with(r04, splineDesign[x == 0,])))
+round(with(r04, cbind(x, splineDesign)[50:60,]), 4)
+
+r0.4 <- plotSplD(c(0,0,0, 1:5), ord=4) # basis is nice and correct
+
+
+set.seed(17)
+
+for(n in 1:1000) {
+    if(n %% 50 == 0) cat(sprintf("n = %4d\n",n))
+    kn <- sort.int(round(10* rnorm(4 + rpois(1, lambda=4))))
+    for(oo in 1:4)
+	## if(inherits(r <- tryCatch(chkSum(kn, ord=oo), error=identity), "error"))
+	##     cat(r$message, "\n chkSum(", deparse(kn), ", ord = ", oo, ")\n")
+	chkSum(kn, ord = oo)
+}
+
+## One of the cases with NaN {when used  ( . <= x & x <= . )}:
+
+bb <- chkSum(c(-14, -4, 3, 5, 6, 15, 15))
+stopifnot(is.finite(rowSums(bb)))
+
+
+stopifnot(chkSum.Ok)
+
+proc.time()
+
+###---- "Bug report" (to R-core) from Trevor Hastie ---
+###---->  bs(*, Boundary.knots = .)
+### needing boundary ajustment for correct extrapolation
+
+## Trevor's Example, slightly modified and extended:
+x <- seq(1.5, 8.5, by = 1/4)
+set.seed(13)
+y <- x + .01*(x - 5)^3 + rnorm(x)
+
+fit0 <- lm(y ~ bs(x, degree=3, knots=4))
+fit0.<- lm(y ~ bs(x, degree=3, knots=4, Boundary.knots=c(1,9)))# *NOT* outside
+fit1 <- lm(y ~ bs(x, degree=3, knots=4, Boundary.knots=c(1,8)))# warning
+fit2 <- lm(y ~ bs(x, degree=3, knots=4, Boundary.knots=c(2,8)))# warning "2 x"
+
+jx <- seq(from=-2,to=12, by=0.1)
+p0 <- predict(fit0, list(x=jx))
+p0.<- predict(fit0, list(x=jx))
+p1 <- predict(fit1, list(x=jx))
+p2 <- predict(fit2, list(x=jx))
+stopifnot(all.equal(p0, p0.,tol=1e-14),
+          all.equal(p0, p1, tol=1e-14),
+          all.equal(p0, p2, tol=1e-14))
+## ^^  p1 and p2 differed from p0 in R <= 3.2.2
+## See numerical fuzz:
+all.equal(p0, p0., tol=0)
+all.equal(p0, p1,  tol=0)
+all.equal(p0, p2,  tol=0)
+all.equal(p1, p2,  tol=0)# interestingly almost the same
+
+## formula ==> print for default method
+ispl <- with(women, interpSpline( height, weight ))
+stopifnot(identical(format(formula(ispl)),
+		    "weight ~ height")) ## was wrongly .Primitive(\"~\")(wei...
diff --git a/src/library/stats/COPYRIGHTS.modreg b/src/library/stats/COPYRIGHTS.modreg
index be2b1ec..ee91db0 100644
--- a/src/library/stats/COPYRIGHTS.modreg
+++ b/src/library/stats/COPYRIGHTS.modreg
@@ -17,7 +17,7 @@ src/stxwx.f
   From the public domain source of the package GAMFIT by T. Hastie and
   R. Tibshirani, converted to double precision and with consistency
   changes to the calls to bvalue. 
-  Original at http://lib.stat.cmu.edu/general/gamfit.
+  Originally derived from http://lib.stat.cmu.edu/general/gamfit (now defunct).
 
 src/loessc.c
 src/loessf.f
diff --git a/src/library/stats/DESCRIPTION.in b/src/library/stats/DESCRIPTION.in
index 257ff8f..c13605b 100644
--- a/src/library/stats/DESCRIPTION.in
+++ b/src/library/stats/DESCRIPTION.in
@@ -4,5 +4,8 @@ Priority: base
 Title: The R Stats Package
 Author: R Core Team and contributors worldwide
 Maintainer: R Core Team <R-core at r-project.org>
-Description: R statistical functions
+Description: R statistical functions.
 License: Part of R @VERSION@
+Imports: utils, grDevices, graphics
+Suggests: MASS, Matrix, SuppDists, methods, stats4
+NeedsCompilation: yes
diff --git a/src/library/stats/NAMESPACE b/src/library/stats/NAMESPACE
index 29b7bfa..d1666dc 100644
--- a/src/library/stats/NAMESPACE
+++ b/src/library/stats/NAMESPACE
@@ -2,9 +2,10 @@
 useDynLib(stats, .registration = TRUE, .fixes = "C_")
 
 import(graphics)
-importFrom(grDevices, dev.interactive, palette, extendrange, xy.coords)
-importFrom(utils, str)
-
+importFrom(grDevices, as.graphicsAnnot, dev.cur, dev.flush, dev.hold,
+           dev.interactive, dev.new, dev.set, devAskNewPage,
+           extendrange, n2mfrow, palette, xy.coords)
+importFrom(utils, count.fields, flush.console, str, tail)
 
 export(.checkMFClasses, .getXlevels, .MFclass, .nknots.smspl,
        acf, acf2AR, add.scope,
@@ -62,7 +63,7 @@ export(.checkMFClasses, .getXlevels, .MFclass, .nknots.smspl,
        rlnorm, rlogis, rmultinom, rnbinom, rnorm, rpois, rsignrank,
        rstandard, rstudent, rt, runif, runmed, rweibull, rwilcox,
        rWishart, scatter.smooth, screeplot, sd, se.contrast,
-       selfStart, setNames, simulate, smooth, smooth.spline,
+       selfStart, setNames, sigma, simulate, smooth, smooth.spline,
        smoothEnds, sortedXyData, spec.ar, spec.pgram, spec.taper,
        spectrum, spline, splinefun, splinefunH, SSD, SSasymp,
        SSasympOff, SSasympOrig, SSbiexp, SSfol, SSfpl, SSgompertz,
@@ -165,6 +166,7 @@ S3method(coef, aov)
 S3method(coef, Arima)
 S3method(coef, default)
 S3method(coef, listof)
+S3method(coef, maov)
 S3method(coef, nls)
 S3method(confint, default)
 S3method(confint, glm)
@@ -244,6 +246,7 @@ S3method(getInitial, default)
 S3method(getInitial, formula)
 S3method(getInitial, selfStart)
 S3method(hatvalues, lm)
+S3method(hatvalues, smooth.spline)
 S3method(identify, hclust)
 S3method(influence, glm)
 S3method(influence, lm)
@@ -453,6 +456,8 @@ S3method(se.contrast, aov)
 S3method(se.contrast, aovlist)
 S3method(selfStart, default)
 S3method(selfStart, formula)
+S3method(sigma, default)
+S3method(sigma, mlm)
 S3method(simulate, lm)
 S3method(sortedXyData, default)
 S3method(str, dendrogram)
diff --git a/src/library/stats/R/AIC.R b/src/library/stats/R/AIC.R
index 18d93e9..8a97c76 100644
--- a/src/library/stats/R/AIC.R
+++ b/src/library/stats/R/AIC.R
@@ -1,7 +1,7 @@
 #  File src/library/stats/R/AIC.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
-#  Copyright (C) 2001-3 The R Core Team
+#  Copyright (C) 2001-2015 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
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 #### Return the value of Akaike's Information Criterion
 ### originally from package nlne.
@@ -28,7 +28,7 @@ AIC.logLik <- function(object, ..., k = 2)
 AIC.default <- function(object, ..., k = 2)
 {
     ## AIC for various fitted objects --- any for which there's a logLik() method:
-    ll <- if("stats4" %in% loadedNamespaces()) stats4:::logLik else logLik
+    ll <- if(isNamespaceLoaded("stats4")) stats4::logLik else logLik
     if(!missing(...)) {# several objects: produce data.frame
 	lls <- lapply(list(object, ...), ll)
         vals <- sapply(lls, function(el) {
@@ -59,9 +59,9 @@ BIC.logLik <- function(object, ...)
 
 BIC.default <- function(object, ...)
 {
-    ll <- if("stats4" %in% loadedNamespaces()) stats4:::logLik else logLik
-    Nobs <- if("stats4" %in% loadedNamespaces()) stats4:::nobs else nobs
-    if(!missing(...)) {
+    ll   <- if(isNamespaceLoaded("stats4")) stats4::logLik else logLik
+    Nobs <- if(isNamespaceLoaded("stats4")) stats4::nobs   else nobs
+    if(!missing(...)) {# several objects: produce data.frame
         lls <- lapply(list(object, ...), ll)
         vals <- sapply(lls, function(el) {
             no <- attr(el, "nobs")
@@ -76,16 +76,15 @@ BIC.default <- function(object, ...)
         unknown <- is.na(val$nobs)
         if(any(unknown))
             val$nobs[unknown] <-
-                sapply(list(object, ...)[unknown],
-                       function(x, f) tryCatch(f(x), error = function(e) NA_real_),
-                       f = Nobs)
+		sapply(list(object, ...)[unknown],
+		       function(x) tryCatch(Nobs(x), error = function(e) NA_real_))
         val <- data.frame(df = val$df, BIC = -2*val$ll + log(val$nobs)*val$df)
         row.names(val) <- as.character(match.call()[-1L])
         val
     } else {
         lls <- ll(object)
         nos <- attr(lls, "nobs")
-        if (is.null(nos))
+	if (is.null(nos)) ## helps if has nobs() method, but logLik() gives no "nobs":
             nos <- tryCatch(Nobs(object), error = function(e) NA_real_)
         -2 * as.numeric(lls) + log(nos) * attr(lls, "df")
     }
diff --git a/src/library/stats/R/ARMAtheory.R b/src/library/stats/R/ARMAtheory.R
index 285a942..054eabf 100644
--- a/src/library/stats/R/ARMAtheory.R
+++ b/src/library/stats/R/ARMAtheory.R
@@ -1,7 +1,7 @@
 #  File src/library/stats/R/ARMAtheory.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
-#  Copyright (C) 1995-2012 The R Core Team
+#  Copyright (C) 1995-2015 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
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 ARMAacf <- function(ar = numeric(), ma = numeric(), lag.max = r,
                     pacf = FALSE)
@@ -29,18 +29,21 @@ ARMAacf <- function(ar = numeric(), ma = numeric(), lag.max = r,
                 ar <- c(ar, rep(0, r - p))
                 p <- r
             }
-            A <- matrix(0, p + 1L, 2L * p + 1L)
-            ind <- as.matrix(expand.grid(1L:(p + 1), 1L:(p+1)))[, 2L:1L]
+            p1 <- p + 1L
+            p2.1 <- p + p1 # = 2p + 1
+            A <- matrix(0, p1, p2.1)
+            ind <- seq_len(p1)
+            ind <- as.matrix(expand.grid(ind, ind))[, 2L:1L]
             ind[, 2] <- ind[, 1L] + ind[, 2L] - 1L
             A[ind] <- c(1, -ar)
-            A[,  1L:p] <- A[, 1L:p] + A[, (2L * p + 1L):(p + 2L)]
+            A[, 1L:p] <- A[, 1L:p] + A[, p2.1:(p + 2L)]
             rhs <- c(1, rep(0, p))
             if(q > 0) {
                 psi <- c(1, ARMAtoMA(ar, ma, q))
                 theta <- c(1, ma, rep(0, q+1L))
-                for(k in 1 + 0:q) rhs[k] <- sum(psi * theta[k + 0:q])
+                for(k in 1L + 0:q) rhs[k] <- sum(psi * theta[k + 0:q])
             }
-            ind <- (p+1):1
+            ind <- p1:1
             Acf <- solve(A[ind, ind], rhs)
 	    Acf <- Acf[-1L]/Acf[1L]
         } else Acf <- ar
diff --git a/src/library/stats/R/C.R b/src/library/stats/R/C.R
index 3be0581..2d65d4a 100644
--- a/src/library/stats/R/C.R
+++ b/src/library/stats/R/C.R
@@ -1,5 +1,5 @@
 #  File src/library/stats/R/C.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
 #  Copyright (C) 1998 B. D. Ripley
 #  Copyright (C) 1995-2012 The R Core Team
@@ -15,7 +15,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 C <- function(object, contr, how.many, ...)
 {
diff --git a/src/library/stats/R/HoltWinters.R b/src/library/stats/R/HoltWinters.R
index c694b4b..92b0c4b 100644
--- a/src/library/stats/R/HoltWinters.R
+++ b/src/library/stats/R/HoltWinters.R
@@ -1,7 +1,7 @@
 #  File src/library/stats/R/HoltWinters.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
-#  Copyright (C) 2002-2013 The R Core Team
+#  Copyright (C) 2002-2015 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
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 # Originally contributed by David Meyer
 
@@ -74,12 +74,13 @@ function (x,
         st <- decompose(ts(x[1L:wind], start = start(x), frequency = f),
                         seasonal)
 
-        ## level & intercept
-        dat <- na.omit(st$trend)
-        m   <- lm(dat ~ seq_along(dat))
-
-        if (is.null(l.start)) l.start <- as.vector(coef(m)[1L])
-        if (is.null(b.start)) b.start <- as.vector(coef(m)[2L])
+	if (is.null(l.start) || is.null(b.start)) {
+	    ## level & intercept
+	    dat <- na.omit(st$trend)
+	    cf <- coef(.lm.fit(x=cbind(1,seq_along(dat)), y=dat))
+	    if (is.null(l.start)) l.start <- cf[1L]
+	    if (is.null(b.start)) b.start <- cf[2L]
+	}
         if (is.null(s.start)) s.start <- st$figure
     }
 
diff --git a/src/library/stats/R/Kalman.R b/src/library/stats/R/Kalman.R
index aa249e9..bb4e0d5 100644
--- a/src/library/stats/R/Kalman.R
+++ b/src/library/stats/R/Kalman.R
@@ -1,5 +1,5 @@
 #  File src/library/stats/R/Kalman.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
 #  Copyright (C) 2002-2014 The R Core Team
 #
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 
 ## There is a bare-bones version of this in StructTS.
diff --git a/src/library/stats/R/StructTS.R b/src/library/stats/R/StructTS.R
index 59b4fff..de6a80f 100644
--- a/src/library/stats/R/StructTS.R
+++ b/src/library/stats/R/StructTS.R
@@ -1,5 +1,5 @@
 #  File src/library/stats/R/StructTS.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
 #  Copyright (C) 2002-2014 The R Core Team
 #
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 StructTS <- function(x, type = c("level", "trend", "BSM"),
                      init = NULL, fixed = NULL, optim.control = NULL)
diff --git a/src/library/stats/R/TukeyHSD.R b/src/library/stats/R/TukeyHSD.R
index fd50fb2..da8726f 100644
--- a/src/library/stats/R/TukeyHSD.R
+++ b/src/library/stats/R/TukeyHSD.R
@@ -1,8 +1,8 @@
 #  File src/library/stats/R/TukeyHSD.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
 #  Copyright (C) 2000-2001  Douglas M. Bates
-#  Copyright (C) 2002-2013  The R Core Team
+#  Copyright (C) 2002-2015  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
@@ -15,7 +15,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 ###
 ###               Tukey multiple comparisons for R
@@ -32,7 +32,8 @@ TukeyHSD.aov <-
     mm <- model.tables(x, "means")
     if(is.null(mm$n))
         stop("no factors in the fitted model")
-    tabs <- mm$tables[-1L]
+    tabs <- mm$tables
+    if(names(tabs)[1L] == "Grand mean") tabs <- tabs[-1L]
     tabs <- tabs[which]
     ## mm$n need not be complete -- factors only -- so index by names
     nn <- mm$n[names(tabs)]
@@ -49,7 +50,7 @@ TukeyHSD.aov <-
     for (nm in names(tabs)) {
         tab <- tabs[[nm]]
         means <- as.vector(tab)
-        nms <- if(length(d <- dim(tab)) > 1L) {
+        nms <- if(length(dim(tab)) > 1L) {
             dn <- dimnames(tab)
             apply(do.call("expand.grid", dn), 1L, paste, collapse = ":")
         } else names(tab)
diff --git a/src/library/stats/R/acf.R b/src/library/stats/R/acf.R
index 44d6381..5e21b07 100644
--- a/src/library/stats/R/acf.R
+++ b/src/library/stats/R/acf.R
@@ -1,7 +1,7 @@
 #  File src/library/stats/R/acf.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
-#  Copyright (C) 1999-2013 The R Core Team
+#  Copyright (C) 1999-2015 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
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 acf <-
     function (x, lag.max = NULL,
@@ -24,6 +24,7 @@ acf <-
     type <- match.arg(type)
     if(type == "partial") {
         m <- match.call()
+        ## need stats:: for non-standard evaluation
         m[[1L]] <- quote(stats::pacf)
         m$type <- NULL
         return(eval(m, parent.frame()))
@@ -173,9 +174,7 @@ plot.acf <-
         iind <- (I-1)*nr + 1L:nr
         jind <- (J-1)*nr + 1L:nr
         if(verbose)
-            message("Page [",I,",",J,"]: i =",
-                    paste(iind,collapse=","),"; j =",
-                    paste(jind,collapse=","), domain = NA)
+            message(gettextf("Page [%d,%d]: i =%s; j =%s", I, J, paste(iind,collapse=","), paste(jind,collapse=",")), domain = NA)
         for (i in iind) for (j in jind)
             if(max(i,j) > nser) {
                 frame(); box(col = "light gray")
diff --git a/src/library/stats/R/add.R b/src/library/stats/R/add.R
index ff3b3d1..a239f9e 100644
--- a/src/library/stats/R/add.R
+++ b/src/library/stats/R/add.R
@@ -1,5 +1,5 @@
 #  File src/library/stats/R/add.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
 #  Copyright (C) 1994-8 W. N. Venables and B. D. Ripley
 #  Copyright (C) 1998-2012 The R Core Team
@@ -15,7 +15,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 
 ## version to return NA for df = 0, as R did before 2.7.0
@@ -58,7 +58,7 @@ add1.default <- function(object, scope, scale = 0, test=c("none", "Chisq"),
 	tt <- scope[i]
 	if(trace > 1) {
 	    cat("trying +", tt, "\n", sep = "")
-	    utils::flush.console()
+	    flush.console()
 	}
 	nfit <- update(object, as.formula(paste("~ . +", tt)),
                        evaluate = FALSE)
@@ -135,7 +135,7 @@ add1.lm <- function(object, scope, scale = 0, test=c("none", "Chisq", "F"),
     RSS <- numeric(ns+1)
     names(dfs) <- names(RSS) <- c("<none>", scope)
     add.rhs <- paste(scope, collapse = "+")
-    add.rhs <- eval(parse(text = paste("~ . +", add.rhs)))
+    add.rhs <- eval(parse(text = paste("~ . +", add.rhs), keep.source = FALSE))
     new.form <- update.formula(object, add.rhs)
     Terms <- terms(new.form)
     if(is.null(x)) {
@@ -245,7 +245,7 @@ add1.glm <- function(object, scope, scale = 0, test=c("none", "Rao", "LRT",
     dfs <- dev <- score <- numeric(ns+1)
     names(dfs) <- names(dev) <- names(score) <- c("<none>", scope)
     add.rhs <- paste(scope, collapse = "+")
-    add.rhs <- eval(parse(text = paste("~ . +", add.rhs)))
+    add.rhs <- eval(parse(text = paste("~ . +", add.rhs), keep.source = FALSE))
     new.form <- update.formula(object, add.rhs)
     Terms <- terms(new.form)
     y <- object$y
@@ -384,7 +384,7 @@ drop1.default <- function(object, scope, scale = 0, test=c("none", "Chisq"),
 	tt <- scope[i]
 	if(trace > 1) {
 	    cat("trying -", tt, "\n", sep = "")
-	    utils::flush.console()
+	    flush.console()
         }
         nfit <- update(object, as.formula(paste("~ . -", tt)),
                        evaluate = FALSE)
@@ -779,7 +779,7 @@ step <- function(object, scope, scale = 0,
     if(trace) {
 	cat("Start:  AIC=", format(round(bAIC, 2)), "\n",
 	    cut.string(deparse(formula(fit))), "\n\n", sep = "")
-        utils::flush.console()
+        flush.console()
     }
 
     ## FIXME think about df.residual() here
@@ -798,7 +798,7 @@ step <- function(object, scope, scale = 0,
 	    aod <- drop1(fit, scope$drop, scale = scale,
                          trace = trace, k = k, ...)
 	    rn <- row.names(aod)
-	    row.names(aod) <- c(rn[1L], paste("-", rn[-1L], sep=" "))
+	    row.names(aod) <- c(rn[1L], paste("-", rn[-1L]))
             ## drop zero df terms first: one at time since they
             ## may mask each other
 	    if(any(aod$Df == 0, na.rm=TRUE)) {
@@ -811,7 +811,7 @@ step <- function(object, scope, scale = 0,
 		aodf <- add1(fit, scope$add, scale = scale,
                              trace = trace, k = k, ...)
 		rn <- row.names(aodf)
-		row.names(aodf) <- c(rn[1L], paste("+", rn[-1L], sep=" "))
+		row.names(aodf) <- c(rn[1L], paste("+", rn[-1L]))
 		aod <-
                     if(is.null(aod)) aodf
                     else rbind(aod, aodf[-1, , drop = FALSE])
@@ -843,7 +843,7 @@ step <- function(object, scope, scale = 0,
 	if(trace) {
 	    cat("\nStep:  AIC=", format(round(bAIC, 2)), "\n",
 		cut.string(deparse(formula(fit))), "\n\n", sep = "")
-            utils::flush.console()
+            flush.console()
         }
         ## add a tolerance as dropping 0-df terms might increase AIC slightly
 	if(bAIC >= AIC + 1e-7) break
diff --git a/src/library/stats/R/addmargins.R b/src/library/stats/R/addmargins.R
index 0217b12..593fe12 100644
--- a/src/library/stats/R/addmargins.R
+++ b/src/library/stats/R/addmargins.R
@@ -1,7 +1,7 @@
 #  File src/library/stats/R/addmargins.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
-#  Copyright (C) 1995-2012 The R Core Team
+#  Copyright (C) 2004-2015 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
@@ -14,22 +14,22 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 addmargins <-
     function(A, margin = seq_along(dim(A)), FUN = sum, quiet = FALSE)
 {
-### The workhorse for this margin-expansion is the function
-### expand.one, which is defined and called at the bottom.
-###
-### All this initial stuff is just to check consistency of
-### specifications, and form maximally sensible margin names
-###
-### BxC, August 2003
-###	 Sept	2003: Single margins caused crash. Fixed.
-### Duncan Murdoch, Feb 2004: Machinery to derive functionnames
-###			      from unnamed lists
-###-------------------------------------------------------------
+    ## The workhorse for this margin-expansion is the function
+    ## expand.one, which is defined and called at the bottom.
+    ##
+    ## All this initial stuff is just to check consistency of
+    ## specifications, and form maximally sensible margin names
+    ##
+    ## BxC, August 2003
+    ##	 Sept	2003: Single margins caused crash. Fixed.
+    ## Duncan Murdoch, Feb 2004: Machinery to derive functionnames
+    ##			      from unnamed lists
+    ##-------------------------------------------------------------
 
     if(is.null(dim(A))) stop("'A' must be an array or table")
     ## How many dimensions of A, and how many sides do we touch?
@@ -76,7 +76,8 @@ addmargins <-
 	if(length(FUN) == 1L)
 	    FUN <- rep(FUN, n.sid)
 	else
-	    stop(gettextf("length of FUN, %d,\n does not match the length of the margins, %d",
+	    stop(gettextf(
+		"length of FUN, %d,\n does not match the length of the margins, %d",
 			  length(FUN), n.sid), domain = NA)
     }
 
@@ -97,13 +98,12 @@ addmargins <-
 	    fnames[[i]][blank] <- seq_along(blank)[blank]
 	    if (topname == "") {
 		fnames[[i]][blank] <-
-		    paste("Margin ", margin[i], ".", fnames[[i]][blank],
-			  sep = "")
+		    paste0("Margin ", margin[i], ".", fnames[[i]][blank])
 	    } else {
 		fnames[[i]] <- paste0(topname, ".", fnames[[i]])
 	    }
-	} else
-	    if (fnames[[i]] == "") fnames[[i]] <- paste("Margin", margin[i])
+	} else if (fnames[[i]] == "")
+            fnames[[i]] <- paste("Margin", margin[i])
     }
 
     ## So finally we have the relevant form of FUN and fnames to pass
@@ -128,8 +128,10 @@ addmargins <-
 	## Define the dimensions of the new table with the margins
 	newdim <- d
 	newdim[margin] <- newdim[margin] + n.mar
-	newdimnames <- dimnames(A)
-	newdimnames[[margin]] <- c(newdimnames[[margin]], fnames)
+	if(is.null(dnA <- dimnames(A))) dnA <- vector("list", n.dim)
+	dnA[[margin]] <-
+	    c(if(is.null(dnA[[margin]])) rep("", d[[margin]]) else dnA[[margin]],
+	      fnames)
 
 	## Number of elements in the expanded array
 	n.new <- prod(newdim)
@@ -149,9 +151,10 @@ addmargins <-
 
 	## Then sucessively compute and fill in the required margins
 	for(i in 1L:n.mar) {
-	    mtab <- if(n.dim > 1) {
-		apply(A, (1L:n.dim)[-margin], FUN[[i]])
-	    } else FUN[[i]](A)
+	    mtab <- if(n.dim > 1)
+			apply(A, (1L:n.dim)[-margin], FUN[[i]])
+		    else
+			FUN[[i]](A)
 	    ## Vector the same length as the number of margins
 	    select <- rep_len(FALSE, n.mar)
 	    ## The position of the current margin
@@ -163,12 +166,8 @@ addmargins <-
 	    values[mpos] <- as.vector(mtab)
 	}
 
-	## Then define the new table with contents and margins
-	##
-	new.A <- array(values, dim=newdim, dimnames=newdimnames)
-	if(inherits(A, "table")) # result shall be table, too
-	    class(new.A) <- c("table", class(new.A))
-	new.A
+	## the new table with contents and margins
+	array(values, dim=newdim, dimnames=dnA)
     }
 
     ## Once defined, we can use the expand.one function repeatedly
@@ -176,6 +175,8 @@ addmargins <-
     for(i in 1L:n.sid)
 	new.A <- expand.one(A = new.A, margin = margin[i], FUN = FUN[[i]],
 			    fnames = fnames[[i]])
+    if(inherits(A, "table")) # result shall be table, too
+        class(new.A) <- c("table", class(new.A))
 
     ## Done! Now print it.
     ##
diff --git a/src/library/stats/R/aggregate.R b/src/library/stats/R/aggregate.R
index feaeb0d..07d3262 100644
--- a/src/library/stats/R/aggregate.R
+++ b/src/library/stats/R/aggregate.R
@@ -1,7 +1,7 @@
 #  File src/library/stats/R/aggregate.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
-#  Copyright (C) 1995-2013 The R Core Team
+#  Copyright (C) 1995-2015 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
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 aggregate <-
 function(x, ...)
@@ -30,7 +30,7 @@ function(x, ...)
 }
 
 aggregate.data.frame <-
-function(x, by, FUN, ..., simplify = TRUE)
+function(x, by, FUN, ..., simplify = TRUE, drop = TRUE)
 {
     if(!is.data.frame(x)) x <- as.data.frame(x)
     ## Do this here to avoid masking by non-function (could happen)
@@ -44,38 +44,49 @@ function(x, by, FUN, ..., simplify = TRUE)
     if(!is.list(by))
         stop("'by' must be a list")
     if(is.null(names(by)) && length(by))
-        names(by) <- paste("Group", seq_along(by), sep = ".")
+        names(by) <- paste0("Group.", seq_along(by))
     else {
         nam <- names(by)
         ind <- which(!nzchar(nam))
-        names(by)[ind] <- paste("Group", ind, sep = ".")
+        names(by)[ind] <- paste0("Group.", ind)
     }
- 
+
     nrx <- NROW(x)
 
-    if(any(unlist(lapply(by, length)) != nrx))
+    if(any(lengths(by) != nrx))
         stop("arguments must have same length")
-	
+
     y <- as.data.frame(by, stringsAsFactors = FALSE)
     keep <- complete.cases(by)
     y <- y[keep, , drop = FALSE]
     x <- x[keep, , drop = FALSE]
-    
+
     nrx <- NROW(x)
 
-    # Generate a group identifier vector with integers and dots.
-    ident <- function(x){
-           y <- as.integer(as.factor(x))
-           z <- gsub(" ", "0", format(y, scientific = FALSE)) # for right sort order
-           return(z)
+    ## Generate a group identifier vector with integers and dots.
+    ident <- function(x) {
+        y <- as.factor(x)
+        l <- length(levels(y))
+        s <- as.character(seq_len(l))
+        n <- nchar(s)
+        levels(y) <- paste0(strrep("0", n[l] - n), s)
+        as.character(y)
     }
-    if (ncol(y))
-	grp <- rank(do.call(paste, c(lapply(rev(y), ident), list(sep = "."))), 
-                ties.method = "min")
-    else
-	grp <- integer(nrx)
-
-    y <- y[match(sort(unique(grp)), grp, 0L), , drop = FALSE]
+    grp <- if(ncol(y)) {
+        grp <- lapply(rev(y), ident)
+        names(grp) <- NULL
+        do.call(paste, c(grp, list(sep = ".")))
+    } else
+	integer(nrx)
+
+    if(!drop && ncol(y)) {
+        y <- expand.grid(lapply(y, function(e) sort(unique(e))))
+        lev <- lapply(rev(y), ident)
+        names(lev) <- NULL
+        lev <- do.call(paste, c(lev, list(sep = ".")))
+        grp <- factor(grp, levels = lev)
+    } else
+        y <- y[match(sort(unique(grp)), grp, 0L), , drop = FALSE]
     nry <- NROW(y)
     z <- lapply(x,
                 function(e) {
@@ -83,7 +94,7 @@ function(x, by, FUN, ..., simplify = TRUE)
                     ## the transpose of what we need ...
                     ans <- lapply(X = split(e, grp), FUN = FUN, ...)
                     if(simplify &&
-                       length(len <- unique(sapply(ans, length))) == 1L) {
+                       length(len <- unique(lengths(ans))) == 1L) {
                         ## this used to lose classes
                         if(len == 1L) {
                             cl <- lapply(ans, oldClass)
@@ -128,6 +139,7 @@ function(formula, data, FUN, ..., subset, na.action = na.omit)
     if(is.matrix(eval(m$data, parent.frame())))
         m$data <- as.data.frame(data)
     m$... <- m$FUN <- NULL
+    ## need stats:: for non-standard evaluation
     m[[1L]] <- quote(stats::model.frame)
 
     if (formula[[2L]] == ".") {
diff --git a/src/library/stats/R/anova.R b/src/library/stats/R/anova.R
index f34a745..5f01df5 100644
--- a/src/library/stats/R/anova.R
+++ b/src/library/stats/R/anova.R
@@ -1,7 +1,7 @@
 #  File src/library/stats/R/anova.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
-#  Copyright (C) 1995-2012 The R Core Team
+#  Copyright (C) 1995-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
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 ## utility for anova.FOO(), FOO in "lmlist", "glm", "glmlist"
 ## depending on the ordering of the models this might get called with
@@ -64,7 +64,8 @@ printCoefmat <-
 	     dig.tst = max(1L, min(5L, digits - 1L)),
 	     cs.ind = 1:k, tst.ind = k+1, zap.ind = integer(),
 	     P.values = NULL,
-	     has.Pvalue = nc >= 4 && substr(colnames(x)[nc], 1, 3) == "Pr(",
+	     has.Pvalue = nc >= 4L &&
+                 substr(colnames(x)[nc], 1L, 3L) %in% c("Pr(", "p-v"),
              eps.Pvalue = .Machine$double.eps,
 	     na.print = "NA", ...)
 {
@@ -159,7 +160,7 @@ printCoefmat <-
 	    sleg <- strwrap(sleg, width = w - 2, prefix = "  ")
 	##"FIXME": Double space __ is for reproducibility, rather than by design
 	cat("---\nSignif. codes:  ", sleg, sep = "",
-	    fill = w+4 + max(nchar(sleg,"bytes") - nchar(sleg)))# +4: "---" 
+	    fill = w+4 + max(nchar(sleg,"bytes") - nchar(sleg)))# +4: "---"
     }
     invisible(x)
 }
diff --git a/src/library/stats/R/ansari.test.R b/src/library/stats/R/ansari.test.R
index 63f0114..526aa9a 100644
--- a/src/library/stats/R/ansari.test.R
+++ b/src/library/stats/R/ansari.test.R
@@ -1,7 +1,7 @@
 #  File src/library/stats/R/ansari.test.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
-#  Copyright (C) 1995-2013 The R Core Team
+#  Copyright (C) 1995-2015 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
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 ansari.test <- function(x, ...) UseMethod("ansari.test")
 
@@ -253,6 +253,7 @@ function(formula, data, subset, na.action, ...)
     m <- match.call(expand.dots = FALSE)
     if(is.matrix(eval(m$data, parent.frame())))
         m$data <- as.data.frame(data)
+    ## need stats:: for non-standard evaluation
     m[[1L]] <- quote(stats::model.frame)
     m$... <- NULL
     mf <- eval(m, parent.frame())
diff --git a/src/library/stats/R/aov.R b/src/library/stats/R/aov.R
index 61d802e..606982e 100644
--- a/src/library/stats/R/aov.R
+++ b/src/library/stats/R/aov.R
@@ -1,7 +1,7 @@
 #  File src/library/stats/R/aov.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
-#  Copyright (C) 1995-2014 The R Core Team
+#  Copyright (C) 1995-2016 The R Core Team
 #  Copyright (C) 1998 B. D. Ripley
 #
 #  This program is free software; you can redistribute it and/or modify
@@ -15,13 +15,14 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 aov <- function(formula, data = NULL, projections = FALSE, qr = TRUE,
                 contrasts = NULL, ...)
 {
-    Terms <- if(missing(data)) terms(formula, "Error")
-    else terms(formula, "Error", data = data)
+    Terms <- if(missing(data))
+		  terms(formula, "Error")
+	     else terms(formula, "Error", data = data)
     indError <- attr(Terms, "specials")$Error
     ## NB: this is only used for n > 1, so singular form makes no sense
     ## in English.  But some languages have multiple plurals.
@@ -31,20 +32,21 @@ aov <- function(formula, data = NULL, projections = FALSE, qr = TRUE,
                               "there are %d Error terms: only 1 is allowed"),
                      length(indError)), domain = NA)
     lmcall <- Call <- match.call()
+    ## need stats:: for non-standard evaluation
     lmcall[[1L]] <- quote(stats::lm)
     lmcall$singular.ok <- TRUE
     if(projections) qr <- lmcall$qr <- TRUE
     lmcall$projections <- NULL
     if(is.null(indError)) {
-        ## no Error term
-        fit <- eval(lmcall, parent.frame())
-        if(projections) fit$projections <- proj(fit)
-        class(fit) <- if(inherits(fit, "mlm"))
-            c("maov", "aov", oldClass(fit)) else c("aov", oldClass(fit))
-        fit$call <- Call
-        return(fit)
+	## no Error term
+	fit <- eval(lmcall, parent.frame())
+	fit$call <- Call # fixup 'lmcall'
+	structure(fit,
+		  class = c(if(inherits(fit, "mlm")) "maov",
+			    "aov", oldClass(fit)),
+		  projections = if(projections) proj(fit))
     } else {
-        if(pmatch("weights", names(match.call()), 0L))
+	if(pmatch("weights", names(Call), 0L))
             stop("weights are not supported in a multistratum aov() fit")
         ##  Helmert contrasts can be helpful: do we want to force them?
         ##  this version does for the Error model.
@@ -52,7 +54,7 @@ aov <- function(formula, data = NULL, projections = FALSE, qr = TRUE,
         options(contrasts = c("contr.helmert", "contr.poly"))
         on.exit(options(opcons))
         allTerms <- Terms
-        errorterm <-  attr(Terms, "variables")[[1 + indError]]
+        errorterm <- attr(Terms, "variables")[[1L + indError]]
         eTerm <- deparse(errorterm[[2L]], width.cutoff = 500L, backtick = TRUE)
         intercept <- attr(Terms, "intercept")
         ecall <- lmcall
@@ -82,13 +84,15 @@ aov <- function(formula, data = NULL, projections = FALSE, qr = TRUE,
         maxasgn <- length(nmstrata) - 1L
         nobs <- NROW(qty)
 	len <- if(nobs > rank.e) {
-	    asgn.e[(rank.e+1):nobs] <- maxasgn + 1L
+	    asgn.e[(rank.e+1L):nobs] <- maxasgn + 1L
 	    nmstrata <- c(nmstrata, "Within")
 	    maxasgn + 2L
 	} else maxasgn + 1L
         result <- setNames(vector("list", len), nmstrata)
         lmcall$formula <- form <-
-            update(formula, paste(". ~ .-", deparse(errorterm, width.cutoff = 500L, backtick = TRUE)))
+            update(formula,
+                   paste(". ~ .-",
+                         deparse(errorterm, width.cutoff = 500L, backtick = TRUE)))
         Terms <- terms(form)
         lmcall$method <- "model.frame"
         mf <- eval(lmcall, parent.frame())
@@ -133,21 +137,20 @@ aov <- function(formula, data = NULL, projections = FALSE, qr = TRUE,
             class(fiti) <- c(if(maov) "maov", "aov", oldClass(er.fit))
             result[[i]] <- fiti
         }
-        ## drop empty strata
-        result <- result[!sapply(result, is.null)]
-        class(result) <- c("aovlist", "listof")
-        if(qr) attr(result, "error.qr") <- qr.e
-        attr(result, "call") <- Call
-        if(length(wts)) attr(result, "weights") <- wts
-        attr(result, "terms") <- allTerms
-        attr(result, "contrasts") <- cons
-        attr(result, "xlevels") <- xlev
-        result
+        structure(class = c("aovlist", "listof"),
+                  ## drop empty strata:
+                  result[!vapply(result, is.null, NA)],
+                  error.qr = if(qr) qr.e,
+                  call = Call,
+                  weights = if(length(wts)) wts,
+                  terms = allTerms,
+                  contrasts = cons,
+                  xlevels = xlev)
     }
 }
 
 print.aov <-
-function(x, intercept = FALSE, tol = .Machine$double.eps^0.5, ...)
+function(x, intercept = FALSE, tol = sqrt(.Machine$double.eps), ...)
 {
     if(!is.null(cl <- x$call)) {
         cat("Call:\n   ")
@@ -161,7 +164,7 @@ function(x, intercept = FALSE, tol = .Machine$double.eps^0.5, ...)
     rdf <- x$df.residual
     resid <- as.matrix(x$residuals)
     wt <- x$weights
-    if(!is.null(wt)) resid <- resid * wt^0.5
+    if(!is.null(wt)) resid <- resid * sqrt(wt)
     RSS <- colSums(resid^2)
     uasgn <- unique(asgn)
     nmeffect <- c("(Intercept)", attr(x$terms, "term.labels"))[1+uasgn]
@@ -301,7 +304,7 @@ summary.aov <- function(object, intercept = FALSE, split,
     coef <- as.matrix(object$coefficients)
     resid <- as.matrix(object$residuals)
     wt <- object$weights
-    if(!is.null(wt)) resid <- resid * wt^0.5
+    if(!is.null(wt)) resid <- resid * sqrt(wt)
     nresp <- NCOL(resid)
     ans <- vector("list", nresp)
     if(nresp > 1) {
@@ -350,7 +353,7 @@ summary.aov <- function(object, intercept = FALSE, split,
                 nmi <- nmeffect[1 + uasgn[i]]
                 nmrows <- c(nmrows, nmi)
                 if(!missing(split) && !is.na(int <- match(nmi, ns))) {
-                    df <- c(df, unlist(lapply(split[[int]], length)))
+		    df <- c(df, lengths(split[[int]]))
                     if(is.null(nms <- names(split[[int]])))
                         nms <- paste0("C", seq_along(split[[int]]))
                     ss <- c(ss, unlist(lapply(split[[int]],
@@ -407,6 +410,12 @@ coef.aov <- function(object, ...)
     z[!is.na(z)]
 }
 
+# For maov objects, the coefficients are a matrix and
+# NAs can't sensibly be removed (PR#16380)
+
+coef.maov <- function(object, ...)
+    object$coefficients
+
 alias <- function(object, ...) UseMethod("alias")
 
 alias.formula <- function(object, data, ...)
@@ -593,7 +602,7 @@ se.contrast.aov <-
     if(rdf == 0L) stop("no degrees of freedom for residuals")
     resid <- as.matrix(object$residuals)
     wt <- object$weights
-    if(!is.null(wt)) resid <- resid * wt^0.5
+    if(!is.null(wt)) resid <- resid * sqrt(wt)
     rse <- sum(resid^2)/rdf
     if(!is.matrix(contrast.obj)) sqrt(sum(weights) * rse)
     else sqrt(rse * colSums(weights))
@@ -607,7 +616,7 @@ se.contrast.aovlist <-
     contrast.weight.aovlist <- function(object, contrast)
     {
         e.qr <- attr(object, "error.qr")
-        if(!is.qr(e.qr))
+        if(!inherits(e.qr, "qr"))
             stop("'object' does not include an error 'qr' component")
         c.qr <- qr.qty(e.qr, contrast)
         e.assign <- attr(e.qr$qr, "assign")
@@ -647,7 +656,7 @@ se.contrast.aovlist <-
         if(rdf == 0L) return(NA)
         resid <- as.matrix(aov.object$residuals)
         wt <- aov.object$weights
-        if(!is.null(wt)) resid <- resid * wt^0.5
+        if(!is.null(wt)) resid <- resid * sqrt(wt)
         sum(resid^2)/rdf
     }
     if(is.null(attr(object, "error.qr"))) {
diff --git a/src/library/stats/R/approx.R b/src/library/stats/R/approx.R
index f276074..4e5dae2 100644
--- a/src/library/stats/R/approx.R
+++ b/src/library/stats/R/approx.R
@@ -1,7 +1,7 @@
 #  File src/library/stats/R/approx.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
-#  Copyright (C) 1995-2012 The R Core Team
+#  Copyright (C) 1995-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
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 ### approx() and approxfun() are *very similar* -- keep in sync!
 
@@ -24,7 +24,7 @@
 ## (except if ties=="ordered", then not unique)
 
 regularize.values <- function(x, y, ties) {
-    x <- xy.coords(x, y) # -> (x,y) numeric of same length
+    x <- xy.coords(x, y, setLab = FALSE) # -> (x,y) numeric of same length
     y <- x$y
     x <- x$x
     if(any(na <- is.na(x) | is.na(y))) {
diff --git a/src/library/stats/R/ar.R b/src/library/stats/R/ar.R
index f6f0975..8a97a9f 100644
--- a/src/library/stats/R/ar.R
+++ b/src/library/stats/R/ar.R
@@ -1,5 +1,5 @@
 #  File src/library/stats/R/ar.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
 #  Copyright (C) 1999-2012 The R Core Team
 #
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 ## based on, especially multivariate case, code by Martyn Plummer
 ar <-
diff --git a/src/library/stats/R/arima.R b/src/library/stats/R/arima.R
index 9c56a3b..27c1f76 100644
--- a/src/library/stats/R/arima.R
+++ b/src/library/stats/R/arima.R
@@ -1,7 +1,7 @@
 #  File src/library/stats/R/arima.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
-#  Copyright (C) 2002-2014 The R Core Team
+#  Copyright (C) 2002-2015 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
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 arima <- function(x, order = c(0L, 0L, 0L),
                   seasonal = list(order = c(0L, 0L, 0L), period = NA),
@@ -48,7 +48,7 @@ arima <- function(x, order = c(0L, 0L, 0L),
 
     arimaSS <- function(y, mod)
     {
-        ## next call changes mod elemnts a, P, Pn so beware!
+        ## next call changes mod components a, P, Pn so beware!
         .Call(C_ARIMA_Like, y, mod, 0L, TRUE)
     }
 
@@ -62,7 +62,7 @@ arima <- function(x, order = c(0L, 0L, 0L),
 				 error = function(e) NULL)))
 	    return(.Machine$double.xmax)# bad parameters giving error, e.g. in solve(.)
         if(ncxreg > 0) x <- x - xreg %*% par[narma + (1L:ncxreg)]
-        ## next call changes objects a, P, Pn so beware!
+        ## next call changes Z components a, P, Pn so beware!
         res <- .Call(C_ARIMA_Like, x, Z, 0L, FALSE)
         s2 <- res[1L]/res[3L]
         0.5*(log(s2) + res[2L]/res[3L])
@@ -170,8 +170,7 @@ arima <- function(x, order = c(0L, 0L, 0L),
     if (method == "CSS" || method == "CSS-ML") {
         ncond <- order[2L] + seasonal$order[2L] * seasonal$period
         ncond1 <- order[1L] + seasonal$period * seasonal$order[1L]
-        ncond <- if (!missing(n.cond)) ncond + max(n.cond, ncond1)
-        else ncond + ncond1
+	ncond <- ncond + if(!missing(n.cond)) max(n.cond, ncond1) else ncond1
     } else ncond <- 0
 
     if (is.null(fixed)) fixed <- rep(NA_real_, narma + ncxreg)
@@ -213,7 +212,8 @@ arima <- function(x, order = c(0L, 0L, 0L),
             ## Degenerate model. Proceed anyway so as not to break old code
             fit <- lm(x ~ xreg - 1, na.action = na.omit)
         }
-        n.used <- sum(!is.na(resid(fit))) - length(Delta)
+        isna <- is.na(x) | apply(xreg, 1L, anyNA)
+        n.used <- sum(!isna) - length(Delta)
         init0 <- c(init0, coef(fit))
         ses <- summary(fit)$coefficients[, 2L]
         parscale <- c(parscale, 10 * ses)
@@ -295,7 +295,7 @@ arima <- function(x, order = c(0L, 0L, 0L),
             list(convergence = 0, par = numeric(),
                  value = armafn(numeric(), as.logical(transform.pars)))
         else
-            optim(init[mask], armafn,  method = optim.method,
+            optim(init[mask], armafn, method = optim.method,
                   hessian = TRUE, control = optim.control,
                   trans = as.logical(transform.pars))
         if(res$convergence > 0)
@@ -364,7 +364,8 @@ arima <- function(x, order = c(0L, 0L, 0L),
     structure(list(coef = coef, sigma2 = sigma2, var.coef = var, mask = mask,
 		   loglik = -0.5 * value, aic = aic, arma = arma,
 		   residuals = resid, call = match.call(), series = series,
-		   code = res$convergence, n.cond = ncond, model = mod),
+		   code = res$convergence, n.cond = ncond, nobs = n.used,
+		   model = mod),
 	      class = "Arima")
 }
 
@@ -442,9 +443,9 @@ predict.Arima <-
         se <- ts(sqrt(z[[2L]] * object$sigma2),
                  start = xtsp[2L] + deltat(rsd),
                  frequency = xtsp[3L])
-        return(list(pred=pred, se=se))
+        list(pred=pred, se=se)
     }
-    else return(pred)
+    else pred
 }
 
 
@@ -494,7 +495,7 @@ vcov.Arima <- function (object, ...) object$var.coef
 
 logLik.Arima <- function (object, ...) {
     res <- if(is.na(object$aic)) NA
-    else structure(object$loglik, df=sum(object$mask) + 1)
+    else structure(object$loglik, df = sum(object$mask) + 1, nobs = object$nobs)
     class(res) <- "logLik"
     res
 }
diff --git a/src/library/stats/R/arma0.R b/src/library/stats/R/arma0.R
index 65adfa3..efbc493 100644
--- a/src/library/stats/R/arma0.R
+++ b/src/library/stats/R/arma0.R
@@ -1,5 +1,5 @@
 #  File src/library/stats/R/arma0.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
 #  Copyright (C) 1999-2012 The R Core Team
 #
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 arima0 <- function(x, order = c(0, 0, 0),
                    seasonal = list(order = c(0, 0, 0), period = NA),
diff --git a/src/library/stats/R/ave.R b/src/library/stats/R/ave.R
index 832e943..db28296 100644
--- a/src/library/stats/R/ave.R
+++ b/src/library/stats/R/ave.R
@@ -1,5 +1,5 @@
 #  File src/library/stats/R/ave.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
 #  Copyright (C) 1995-2012 The R Core Team
 #
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 ave <- function (x, ..., FUN = mean)
 {
diff --git a/src/library/stats/R/bandwidths.R b/src/library/stats/R/bandwidths.R
index 47622f5..24c5b8f 100644
--- a/src/library/stats/R/bandwidths.R
+++ b/src/library/stats/R/bandwidths.R
@@ -1,8 +1,8 @@
 #  File src/library/stats/R/bandwidths.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
 #  Copyright (C) 1994-2001 W. N. Venables and B. D. Ripley
-#  Copyright (C) 2001-2012 The R Core Team
+#  Copyright (C) 2001-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
@@ -15,7 +15,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 
 #====           bandwidth selection rules              ====
@@ -37,6 +37,21 @@ bw.nrd <- function (x)
     1.06 * min(sqrt(var(x)), h) * length(x)^(-1/5)
 }
 
+
+## switch-over at n > nb/2 found by empirical timing.
+bw_pair_cnts <- function(x, nb, binned)
+{
+    if(binned) {
+        r <- range(x)
+        d <- diff(r) * 1.01/nb
+        ## Emulate exactly how the C code does its binning.
+        xx <- trunc(abs(x)/d) *sign(x)
+        xx <- xx - min(xx) + 1
+        xxx <- tabulate(xx, nb)
+        list(d, .Call(C_bw_den_binned, xxx))
+    } else .Call(C_bw_den, nb, x)
+}
+
 bw.SJ <- function(x, nb = 1000L, lower = 0.1*hmax, upper = hmax,
                   method = c("ste", "dpi"), tol = 0.1*lower)
 {
@@ -50,11 +65,10 @@ bw.SJ <- function(x, nb = 1000L, lower = 0.1*hmax, upper = hmax,
 
     method <- match.arg(method)
 
-    fSD <- function(h) ( c1 / SDh(alph2 * h^(5/7)) )^(1/5) - h
-    SDh <- function(h) .Call(C_bw_phi4, n, d, cnt, as.double(h))
-    TDh <- function(h) .Call(C_bw_phi6, n, d, cnt, as.double(h))
+    SDh <- function(h) .Call(C_bw_phi4, n, d, cnt, h)
+    TDh <- function(h) .Call(C_bw_phi6, n, d, cnt, h)
 
-    Z <- .Call(C_bw_den, nb, x)
+    Z <- bw_pair_cnts(x, nb, n > nb/2)
     d <- Z[[1L]]; cnt <- Z[[2L]]
     scale <- min(sd(x), IQR(x)/1.349)
     a <- 1.24 * scale * n^(-1/7)
@@ -74,6 +88,7 @@ bw.SJ <- function(x, nb = 1000L, lower = 0.1*hmax, upper = hmax,
         if(!is.finite(alph2))
             stop("sample is too sparse to find alph2", domain  = NA)
         itry <- 1L
+        fSD <- function(h) ( c1 / SDh(alph2 * h^(5/7)) )^(1/5) - h
 	while (fSD(lower) * fSD(upper) > 0) {
 	    if(itry > 99L || !bnd.Miss) # 1.2 ^ 99 = 69'014'979 .. enough
 		stop("no solution in the specified range of bandwidths")
@@ -101,8 +116,9 @@ bw.ucv <- function(x, nb = 1000L, lower = 0.1*hmax, upper = hmax,
     storage.mode(x) <- "double"
 
     hmax <- 1.144 * sqrt(var(x)) * n^(-1/5)
-    Z <- .Call(C_bw_den, nb, x); d <- Z[[1L]]; cnt <- Z[[2L]]
-    fucv <- function(h) .Call(C_bw_ucv, n, d, cnt, as.double(h))
+    Z <- bw_pair_cnts(x, nb, n > nb/2)
+    d <- Z[[1L]]; cnt <- Z[[2L]]
+    fucv <- function(h) .Call(C_bw_ucv, n, d, cnt, h)
     h <- optimize(fucv, c(lower, upper), tol = tol)$minimum
     if(h < lower+tol | h > upper-tol)
         warning("minimum occurred at one end of the range")
@@ -121,8 +137,9 @@ bw.bcv <- function(x, nb = 1000L, lower = 0.1*hmax, upper = hmax,
     storage.mode(x) <- "double"
 
     hmax <- 1.144 * sqrt(var(x)) * n^(-1/5)
-    Z <- .Call(C_bw_den, nb, x); d <- Z[[1L]]; cnt <- Z[[2L]]
-    fbcv <- function(h) .Call(C_bw_bcv, n, d, cnt, as.double(h))
+    Z <- bw_pair_cnts(x, nb, n > nb/2)
+    d <- Z[[1L]]; cnt <- Z[[2L]]
+    fbcv <- function(h) .Call(C_bw_bcv, n, d, cnt, h)
     h <- optimize(fbcv, c(lower, upper), tol = tol)$minimum
     if(h < lower+tol | h > upper-tol)
         warning("minimum occurred at one end of the range")
diff --git a/src/library/stats/R/bartlett.test.R b/src/library/stats/R/bartlett.test.R
index c6e5b94..607f37d 100644
--- a/src/library/stats/R/bartlett.test.R
+++ b/src/library/stats/R/bartlett.test.R
@@ -1,7 +1,7 @@
 #  File src/library/stats/R/bartlett.test.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
-#  Copyright (C) 1995-2013 The R Core Team
+#  Copyright (C) 1995-2015 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
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 bartlett.test <- function(x, ...) UseMethod("bartlett.test")
 
@@ -48,7 +48,7 @@ function(x, g, ...)
 
     if (LM) {
         n <- sapply(x, function(obj) obj$df.resid)
-        v <- sapply(x, function(obj) sum(obj$residuals^2))
+        v <- sapply(x, function(obj) sum(obj$residuals^2))/n
     } else {
         n <- sapply(x, "length") - 1
         if (any(n <= 0))
@@ -82,6 +82,7 @@ function(formula, data, subset, na.action, ...)
     m <- match.call(expand.dots = FALSE)
     if(is.matrix(eval(m$data, parent.frame())))
         m$data <- as.data.frame(data)
+    ## need stats:: for non-standard evaluation
     m[[1L]] <- quote(stats::model.frame)
     mf <- eval(m, parent.frame())
     if(length(mf) != 2L)
diff --git a/src/library/stats/R/binom.test.R b/src/library/stats/R/binom.test.R
index 4087102..5ec1c87 100644
--- a/src/library/stats/R/binom.test.R
+++ b/src/library/stats/R/binom.test.R
@@ -1,5 +1,5 @@
 #  File src/library/stats/R/binom.test.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
 #  Copyright (C) 1995-2012 The R Core Team
 #
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 binom.test <-
 function(x, n, p = 0.5, alternative = c("two.sided", "less", "greater"),
diff --git a/src/library/stats/R/biplot.R b/src/library/stats/R/biplot.R
index 50149e7..9310117 100644
--- a/src/library/stats/R/biplot.R
+++ b/src/library/stats/R/biplot.R
@@ -1,5 +1,5 @@
 #  File src/library/stats/R/biplot.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
 #  Copyright (C) 1995-2012 The R Core Team
 #
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 biplot <- function(x, ...) UseMethod("biplot")
 
diff --git a/src/library/stats/R/birthday.R b/src/library/stats/R/birthday.R
index a4062c7..3f81594 100644
--- a/src/library/stats/R/birthday.R
+++ b/src/library/stats/R/birthday.R
@@ -1,5 +1,5 @@
 #  File src/library/stats/R/birthday.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
 #  Copyright (C) 1995-2012 The R Core Team
 #
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 
 qbirthday <- function(prob = 0.5, classes = 365, coincident = 2)
diff --git a/src/library/stats/R/cancor.R b/src/library/stats/R/cancor.R
index 01f91b7..cd10e84 100644
--- a/src/library/stats/R/cancor.R
+++ b/src/library/stats/R/cancor.R
@@ -1,5 +1,5 @@
 #  File src/library/stats/R/cancor.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
 #  Copyright (C) 1995-2012 The R Core Team
 #
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 ## Seber pages 506-507, after a Golub original
 
diff --git a/src/library/stats/R/chisq.test.R b/src/library/stats/R/chisq.test.R
index fb5a437..b511578 100644
--- a/src/library/stats/R/chisq.test.R
+++ b/src/library/stats/R/chisq.test.R
@@ -1,5 +1,5 @@
 #  File src/library/stats/R/chisq.test.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
 #  Copyright (C) 1995-2013 The R Core Team
 #
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 chisq.test <- function(x, y = NULL, correct = TRUE,
 		       p = rep(1/length(x), length(x)),
@@ -103,6 +103,8 @@ chisq.test <- function(x, y = NULL, correct = TRUE,
 	}
     }
     else {
+        if(length(dim(x)) > 2L)
+            stop("invalid 'x'")
 	if (length(x) == 1L)
 	    stop("'x' must at least have 2 elements")
 	if (length(x) != length(p))
diff --git a/src/library/stats/R/cmdscale.R b/src/library/stats/R/cmdscale.R
index babbaad..ea9c17e 100644
--- a/src/library/stats/R/cmdscale.R
+++ b/src/library/stats/R/cmdscale.R
@@ -1,7 +1,7 @@
 #  File src/library/stats/R/cmdscale.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
-#  Copyright (C) 1995-2013 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
@@ -14,12 +14,17 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
-cmdscale <- function (d, k = 2, eig = FALSE, add = FALSE, x.ret = FALSE)
+cmdscale <- function (d, k = 2, eig = FALSE, add = FALSE, x.ret = FALSE,
+		      list. = eig || add || x.ret)
 {
     if (anyNA(d))
 	stop("NA values not allowed in 'd'")
+    if(!list.) {
+	if (eig)  warning(  "eig=TRUE is disregarded when list.=FALSE")
+	if(x.ret) warning("x.ret=TRUE is disregarded when list.=FALSE")
+    }
     if (is.null(n <- attr(d, "Size"))) {
         if(add) d <- as.matrix(d)
 	x <- as.matrix(d^2)
@@ -27,7 +32,7 @@ cmdscale <- function (d, k = 2, eig = FALSE, add = FALSE, x.ret = FALSE)
 	if ((n <- nrow(x)) != ncol(x))
 	    stop("distances must be result of 'dist' or a square matrix")
         rn <- rownames(x)
-    } else {
+    } else { # d is  dist()-like  object
         rn <- attr(d, "Labels")
 	x <- matrix(0, n, n) # must be double
         if (add) d0 <- x
@@ -40,7 +45,8 @@ cmdscale <- function (d, k = 2, eig = FALSE, add = FALSE, x.ret = FALSE)
     }
     n <- as.integer(n)
     ## we need to handle nxn internally in dblcen
-    if(is.na(n) || n > 46340) stop("invalid value of 'n'")
+    if(is.na(n) || n > 46340)
+	stop(gettextf("invalid value of %s", "'n'"), domain = NA)
     if((k <- as.integer(k)) > n - 1 || k < 1)
         stop("'k' must be in {1, 2, ..  n - 1}")
     ## NB: this alters argument x, which is OK as it is re-assigned.
@@ -73,7 +79,7 @@ cmdscale <- function (d, k = 2, eig = FALSE, add = FALSE, x.ret = FALSE)
     }
     points <- evec * rep(sqrt(ev), each=n)
     dimnames(points) <- list(rn, NULL)
-    if (eig || x.ret || add) {
+    if (list.) {
         evalus <- e$values # Cox & Cox have sum up to n-1, though
         list(points = points, eig = if(eig) evalus, x = if(x.ret) x,
              ac = if(add) add.c else 0,
diff --git a/src/library/stats/R/complete.cases.R b/src/library/stats/R/complete.cases.R
index b5db8a8..165a5d9 100644
--- a/src/library/stats/R/complete.cases.R
+++ b/src/library/stats/R/complete.cases.R
@@ -1,5 +1,5 @@
 #  File src/library/stats/R/complete.cases.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
 #  Copyright (C) 1995-2012 The R Core Team
 #
@@ -14,6 +14,6 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 complete.cases <- function(...) .External(C_compcases, ...)
diff --git a/src/library/stats/R/confint.R b/src/library/stats/R/confint.R
index a74455f..774d657 100644
--- a/src/library/stats/R/confint.R
+++ b/src/library/stats/R/confint.R
@@ -1,5 +1,5 @@
 #  File src/library/stats/R/confint.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
 #  Copyright (C) 1994-2003 W. N. Venables and B. D. Ripley
 #  Copyright (C) 2003-2012 The R Core Team
@@ -15,7 +15,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 confint <- function(object, parm, level = 0.95, ...) UseMethod("confint")
 
@@ -42,12 +42,23 @@ confint.lm <- function(object, parm, level = 0.95, ...)
     ci
 }
 
-
+## loading the MASS namespace will overwrite these in the registry.
+## stub is a specialized version of MASS:::confint.xxx with specific message
 confint.glm <- function(object, parm, level = 0.95, ...)
-    try(MASS:::confint.glm(object, parm, level, ...))
+{
+    if(!requireNamespace("MASS", quietly = TRUE))
+        stop("package 'MASS' must be installed")
+    confint.glm <- get("confint.glm", asNamespace("MASS"), inherits = FALSE)
+    confint.glm(object, parm, level, ...)
+}
 
 confint.nls <- function(object, parm, level = 0.95, ...)
-    try(MASS:::confint.nls(object, parm, level, ...))
+{
+    if(!requireNamespace("MASS", quietly = TRUE))
+        stop("package 'MASS' must be installed")
+    confint.nls <- get("confint.nls", asNamespace("MASS"), inherits = FALSE)
+    confint.nls(object, parm, level, ...)
+}
 
 confint.default <- function (object, parm, level = 0.95, ...)
 {
diff --git a/src/library/stats/R/constrOptim.R b/src/library/stats/R/constrOptim.R
index 464bf72..0c1e2a4 100644
--- a/src/library/stats/R/constrOptim.R
+++ b/src/library/stats/R/constrOptim.R
@@ -1,5 +1,5 @@
 #  File src/library/stats/R/constrOptim.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
 #  Copyright (C) 1995-2012 The R Core Team
 #
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 
 constrOptim <-
diff --git a/src/library/stats/R/contr.poly.R b/src/library/stats/R/contr.poly.R
index 52696bc..34535b1 100644
--- a/src/library/stats/R/contr.poly.R
+++ b/src/library/stats/R/contr.poly.R
@@ -1,7 +1,7 @@
 #  File src/library/stats/R/contr.poly.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
-#  Copyright (C) 1995-2013 The R Core Team
+#  Copyright (C) 1995-2015 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
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 contr.poly <- function (n, scores = 1:n, contrasts = TRUE, sparse = FALSE)
 {
@@ -63,77 +63,69 @@ contr.poly <- function (n, scores = 1:n, contrasts = TRUE, sparse = FALSE)
     }
 }
 
-poly <- function(x, ..., degree = 1, coefs = NULL, raw = FALSE)
+poly <- function(x, ..., degree = 1, coefs = NULL, raw = FALSE, simple = FALSE)
 {
     dots <- list(...)
     if(nd <- length(dots)) {
         if(nd == 1 && length(dots[[1L]]) == 1L) # unnamed degree
             degree <- dots[[1L]]
-        else return(polym(x, ..., degree = degree, raw = raw))
+        else return(polym(x, ..., degree = degree, coefs=coefs, raw = raw))
     }
-    if(is.matrix(x)) {
+    if(is.matrix(x)) { ## FIXME: fails when combined with 'unnamed degree' above
         m <- unclass(as.data.frame(cbind(x, ...)))
-        return(do.call("polym", c(m, degree = degree, raw = raw)))
+	return(do.call(polym, c(m, degree = degree, raw = raw,
+				list(coefs=coefs))))
     }
     if(degree < 1)
         stop("'degree' must be at least 1")
-    if(anyNA(x)) stop("missing values are not allowed in 'poly'")
-    n <- degree + 1
     if(raw) {
         Z <- outer(x, 1L:degree, "^")
         colnames(Z) <- 1L:degree
-        attr(Z, "degree") <- 1L:degree
-        class(Z) <- c("poly", "matrix")
-        return(Z)
-    }
-    if(is.null(coefs)) { # fitting
-        if(degree >= length(unique(x)))
-            stop("'degree' must be less than number of unique points")
-        xbar <- mean(x)
-        x <- x - xbar
-        X <- outer(x, seq_len(n) - 1, "^")
-        QR <- qr(X)
-        if(QR$rank < degree)
-            stop("'degree' must be less than number of unique points")
-        z <- QR$qr
-        z <- z * (row(z) == col(z))
-        raw <- qr.qy(QR, z)
-        norm2 <- colSums(raw^2)
-        alpha <- (colSums(x*raw^2)/norm2 + xbar)[1L:degree]
-        Z <- raw / rep(sqrt(norm2), each = length(x))
-        colnames(Z) <- 1L:n - 1L
-        Z <- Z[, -1, drop = FALSE]
-        attr(Z, "degree") <- 1L:degree
-        attr(Z, "coefs") <- list(alpha = alpha, norm2 = c(1, norm2))
-        class(Z) <- c("poly", "matrix")
-    } else {            # prediction
-        alpha <- coefs$alpha; norm2 <- coefs$norm2
-        Z <- matrix(, length(x), n)
-        Z[, 1] <- 1
-        Z[, 2] <- x - alpha[1L]
-        if(degree > 1)
-            for(i in 2:degree)
-                Z[, i+1] <- (x - alpha[i]) * Z[, i]  -
-                    (norm2[i+1] / norm2[i]) * Z[, i-1]
+    } else {
+	if(is.null(coefs)) { # fitting
+	    if(anyNA(x)) stop("missing values are not allowed in 'poly'")
+	    if(degree >= length(unique(x)))
+		stop("'degree' must be less than number of unique points")
+	    xbar <- mean(x)
+	    x <- x - xbar
+	    X <- outer(x, 0L:degree, "^")
+	    QR <- qr(X)
+	    if(QR$rank < degree)
+		stop("'degree' must be less than number of unique points")
+	    z <- QR$qr
+	    z <- z * (row(z) == col(z))
+	    Z <- qr.qy(QR, z)
+	    norm2 <- colSums(Z^2)
+	    alpha <- (colSums(x*Z^2)/norm2 + xbar)[1L:degree]
+	    norm2 <- c(1, norm2) # to use "common" code below
+	} else {            # prediction
+	    alpha <- coefs$alpha; norm2 <- coefs$norm2
+	    Z <- matrix(1, length(x), degree + 1L) # Z[,1] == 1
+	    Z[, 2] <- x - alpha[1L]
+	    if(degree > 1)
+		for(i in 2:degree)
+		    Z[, i+1] <- (x - alpha[i]) * Z[, i]  -
+				    (norm2[i+1] / norm2[i]) * Z[, i-1]
+        }
         Z <- Z / rep(sqrt(norm2[-1L]), each = length(x))
-        colnames(Z) <- 0:degree
+        colnames(Z) <- 0L:degree
         Z <- Z[, -1, drop = FALSE]
-        ## we may want to use the prediction to clone another prediction
-        attr(Z, "degree") <- 1L:degree
-        attr(Z, "coefs") <- list(alpha = alpha, norm2 = norm2)
-        class(Z) <- c("poly", "matrix")
+        if(!simple) ## we may want to use the prediction to clone another prediction
+            attr(Z, "coefs") <- list(alpha = alpha, norm2 = norm2)
     }
-    Z
+    if(simple) Z else structure(Z, degree = 1L:degree, class = c("poly", "matrix"))
 }
 
 predict.poly <- function(object, newdata, ...)
 {
-    if(missing(newdata)) return(object)
-    if(is.null(attr(object, "coefs")))
-       poly(newdata, degree = max(attr(object, "degree")), raw = TRUE)
+    if(missing(newdata))
+	object
+    else if(is.null(attr(object, "coefs")))
+	poly(newdata, degree = max(attr(object, "degree")),
+             raw = TRUE, simple = TRUE)
     else
-       poly(newdata, degree = max(attr(object, "degree")),
-            coefs = attr(object, "coefs"))
+	poly(newdata, degree = max(attr(object, "degree")),
+	     coefs = attr(object, "coefs"), simple = TRUE)
 }
 
 makepredictcall.poly  <- function(var, call)
@@ -143,23 +135,52 @@ makepredictcall.poly  <- function(var, call)
     call
 }
 
-polym <- function(..., degree = 1, raw = FALSE)
+polym <- function (..., degree = 1, coefs = NULL, raw = FALSE)
 {
     dots <- list(...)
-    nd <- length(dots)
-    if(nd == 0) stop("must supply one or more vectors")
-    if(nd == 1) return(poly(dots[[1L]], degree, raw = raw))
-    n <- sapply(dots, length)
-    if(any(n != n[1L]))
-        stop("arguments must have the same length")
-    z <- do.call("expand.grid", rep.int(list(0:degree), nd))
+    nd <- length(if(is.null(coefs)) dots else coefs)  # number of variables
+    if (nd == 0)
+        stop("must supply one or more vectors")
+    ## z:= combinations of (0:degree) of all variables
+    z <- do.call(expand.grid,
+                 c(rep.int(list(0:degree), nd), KEEP.OUT.ATTRS = FALSE))
+    ## sum of all degrees must be in  1:degree :
     s <- rowSums(z)
-    ind <- (s > 0) & (s <= degree)
-    z <- z[ind, ]; s <- s[ind]
-    res <- cbind(1, poly(dots[[1L]], degree, raw = raw))[, 1 + z[, 1]]
-    for(i in 2:nd)
-        res <- res * cbind(1, poly(dots[[i]], degree, raw = raw))[, 1 + z[, i]]
-    colnames(res) <- apply(z, 1L, function(x) paste(x, collapse = "."))
-    attr(res, "degree") <- as.vector(s)
-    res
+    ind <- 0 < s  &  s <= degree
+    z <- z[ind, , drop=FALSE]
+    s <- s[ind]
+    if(is.null(coefs)) {
+	aPoly <- poly(dots[[1L]], degree, raw = raw, simple = raw && nd > 1)
+	if (nd == 1)
+	    return(aPoly)
+	## nd >= 2 from here on
+	n <- lengths(dots)
+	if (any(n != n[1L]))
+	    stop("arguments must have the same length")
+	res <- cbind(1, aPoly)[, 1L +z[, 1]]
+	## attribute "coefs" = list of coefs from individual variables
+	if (!raw) coefs <- list(attr(aPoly, "coefs"))
+	for (i in 2:nd) {
+	    aPoly <- poly(dots[[i]], degree, raw = raw, simple = raw)
+	    res <- res * cbind(1, aPoly)[, 1L +z[, i]]
+	    if (!raw) coefs <- c(coefs, list(attr(aPoly, "coefs")))
+	}
+	colnames(res) <- apply(z, 1L, function(x) paste(x, collapse = "."))
+	structure(res,
+		  degree =  as.vector(s),
+		  coefs = if (!raw) coefs,
+		  class = c("poly", "matrix"))
+    } else { ## use 'coefs' for prediction
+	newdata <- as.data.frame(dots) # new data
+	if (nd != ncol(newdata))
+	    stop("wrong number of columns in new data: ", deparse(substitute(...)))
+	res <- cbind(1, poly(newdata[[1]], degree=degree,
+			     coefs=coefs[[1]], simple=TRUE))[, 1L +z[, 1]]
+	if(nd > 1) for (i in 2:nd)
+            res <- res*cbind(1, poly(newdata[[i]], degree=degree,
+                                     coefs=coefs[[i]], simple=TRUE))[, 1L +z[, i]]
+	colnames(res) <- apply(z, 1L, function(x) paste(x, collapse = "."))
+        ## no 'coefs' and 'degree', nor "poly" class
+	res
+    }
 }
diff --git a/src/library/stats/R/contrast.R b/src/library/stats/R/contrast.R
index 8b639e2..2823670 100644
--- a/src/library/stats/R/contrast.R
+++ b/src/library/stats/R/contrast.R
@@ -1,5 +1,5 @@
 #  File src/library/stats/R/contrast.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
 #  Copyright (C) 1995-2012 The R Core Team
 #
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 
 ## This is also called from C : do_model_matrix() { ../../../main/model.c }:
@@ -91,7 +91,7 @@ contrasts <- function (x, contrasts = TRUE, sparse = FALSE)
 	    stop(gettextf("%s needs package 'Matrix' correctly installed",
                           "contr*(.., sparse=TRUE)"),
                  domain = NA)
-	new("ddiMatrix", diag = "U", Dim = d, Dimnames = dn)
+	methods::new("ddiMatrix", diag = "U", Dim = d, Dimnames = dn)
     } else
 	array(c(rep.int(c(1, numeric(n)), n-1L), 1), d, dn)
 }
@@ -102,7 +102,7 @@ contrasts <- function (x, contrasts = TRUE, sparse = FALSE)
 	stop(gettextf("%s needs package 'Matrix' correctly installed",
                       "contr*(.., sparse=TRUE)"),
              domain = NA)
-    as(m, "sparseMatrix")
+    methods::as(m, "sparseMatrix")
 }
 
 ## contr.poly() is in ./contr.poly.R
diff --git a/src/library/stats/R/cor.R b/src/library/stats/R/cor.R
index 5a9a808..c86d93b 100644
--- a/src/library/stats/R/cor.R
+++ b/src/library/stats/R/cor.R
@@ -1,5 +1,5 @@
 #  File src/library/stats/R/cor.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
 #  Copyright (C) 1995-2012 The R Core Team
 #
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 #### cor() , cov() and var() : Based on the same C code
 
diff --git a/src/library/stats/R/cor.test.R b/src/library/stats/R/cor.test.R
index 023e7c9..586f320 100644
--- a/src/library/stats/R/cor.test.R
+++ b/src/library/stats/R/cor.test.R
@@ -1,7 +1,7 @@
 #  File src/library/stats/R/cor.test.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
-#  Copyright (C) 1995-2012 The R Core Team
+#  Copyright (C) 1995-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
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 cor.test <- function(x, ...) UseMethod("cor.test")
 
@@ -36,7 +36,6 @@ function(x, y, alternative = c("two.sided", "less", "greater"),
     y <- y[OK]
     n <- length(x)
 
-    PVAL <- NULL
     NVAL <- 0
     conf.int <- FALSE
 
@@ -50,7 +49,6 @@ function(x, y, alternative = c("two.sided", "less", "greater"),
 	ESTIMATE <- c(cor = r)
 	PARAMETER <- c(df = df)
 	STATISTIC <- c(t = sqrt(df) * r / sqrt(1 - r^2))
-	p <- pt(STATISTIC, df)
         if(n > 3) { ## confidence int.
             if(!missing(conf.level) &&
                (length(conf.level) != 1 || !is.finite(conf.level) ||
@@ -68,6 +66,11 @@ function(x, y, alternative = c("two.sided", "less", "greater"),
             cint <- tanh(cint)
             attr(cint, "conf.level") <- conf.level
         }
+	PVAL <- switch(alternative,
+		       "less" = pt(STATISTIC, df),
+		       "greater" = pt(STATISTIC, df, lower.tail=FALSE),
+		       "two.sided" = 2 * min(pt(STATISTIC, df),
+					     pt(STATISTIC, df, lower.tail=FALSE)))
     }
     else {
 	if(n < 2)
@@ -90,6 +93,7 @@ function(x, y, alternative = c("two.sided", "less", "greater"),
                     exact <- (n < 50)
                 if(exact && !TIES) {
                     q <- round((r + 1) * n * (n - 1) / 4)
+                    STATISTIC <- c(T = q)
                     pkendall <- function(q, n) .Call(C_pKendall, q, n)
                     PVAL <-
                         switch(alternative,
@@ -102,7 +106,6 @@ function(x, y, alternative = c("two.sided", "less", "greater"),
                                },
                                "greater" = 1 - pkendall(q - 1, n),
                                "less" = pkendall(q, n))
-                    STATISTIC <- c(T = q)
                 } else {
                     xties <- table(x[duplicated(x)]) + 1
                     yties <- table(y[duplicated(y)]) + 1
@@ -121,11 +124,15 @@ function(x, y, alternative = c("two.sided", "less", "greater"),
                         v1 / (2 * n * (n - 1)) +
                             v2 / (9 * n * (n - 1) * (n - 2))
 
-                    if (continuity) S <- sign(S) * (abs(S) - 1)
-                    STATISTIC <- c(z = S / sqrt(var_S))
-                    p <- pnorm(STATISTIC)
                     if(exact && TIES)
                         warning("Cannot compute exact p-value with ties")
+                    if (continuity) S <- sign(S) * (abs(S) - 1)
+                    STATISTIC <- c(z = S / sqrt(var_S))
+		    PVAL <- switch(alternative,
+				   "less" = pnorm(STATISTIC),
+				   "greater" = pnorm(STATISTIC, lower.tail=FALSE),
+				   "two.sided" = 2 * min(pnorm(STATISTIC),
+							 pnorm(STATISTIC, lower.tail=FALSE)))
                 }
             }
 	} else {
@@ -178,12 +185,6 @@ function(x, y, alternative = c("two.sided", "less", "greater"),
         }
     }
 
-    if(is.null(PVAL)) # for "pearson" only, currently
-	PVAL <- switch(alternative,
-		       "less" = p,
-		       "greater" = 1 - p,
-		       "two.sided" = 2 * min(p, 1 - p))
-
     RVAL <- list(statistic = STATISTIC,
                  parameter = PARAMETER,
                  p.value = as.numeric(PVAL),
@@ -208,6 +209,7 @@ function(formula, data, subset, na.action, ...)
     m <- match.call(expand.dots = FALSE)
     if(is.matrix(eval(m$data, parent.frame())))
         m$data <- as.data.frame(data)
+    ## need stats:: for non-standard evaluation
     m[[1L]] <- quote(stats::model.frame)
     m$... <- NULL
     mf <- eval(m, environment(formula))
diff --git a/src/library/stats/R/cov.wt.R b/src/library/stats/R/cov.wt.R
index 01bd85a..6575054 100644
--- a/src/library/stats/R/cov.wt.R
+++ b/src/library/stats/R/cov.wt.R
@@ -1,5 +1,5 @@
 #  File src/library/stats/R/cov.wt.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
 #  Copyright (C) 1995-2012 The R Core Team
 #
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 cov.wt <- function(x, wt = rep(1/nrow(x), nrow(x)), cor = FALSE, center = TRUE,
                    method = c("unbiased", "ML"))
diff --git a/src/library/stats/R/cpgram.R b/src/library/stats/R/cpgram.R
index eba94f9..fa9846b 100644
--- a/src/library/stats/R/cpgram.R
+++ b/src/library/stats/R/cpgram.R
@@ -1,5 +1,5 @@
 #  File src/library/stats/R/cpgram.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
 #  Copyright (C) 1994-9  W. N. Venables and B. D. Ripley
 #  Copyright (C) 1999-2012 The R Core Team
@@ -15,7 +15,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 ## from MASS package
 
diff --git a/src/library/stats/R/cutree.R b/src/library/stats/R/cutree.R
index f756fbc..eb6969a 100644
--- a/src/library/stats/R/cutree.R
+++ b/src/library/stats/R/cutree.R
@@ -1,5 +1,5 @@
 #  File src/library/stats/R/cutree.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
 #  Copyright (C) 1995-2012 The R Core Team
 #
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 cutree <- function(tree, k=NULL, h=NULL)
 {
diff --git a/src/library/stats/R/dendrogram.R b/src/library/stats/R/dendrogram.R
index ff9fd15..f7f7b00 100644
--- a/src/library/stats/R/dendrogram.R
+++ b/src/library/stats/R/dendrogram.R
@@ -1,7 +1,7 @@
 #  File src/library/stats/R/dendrogram.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
-#  Copyright (C) 1995-2013 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
@@ -14,25 +14,26 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 as.dendrogram <- function(object, ...) UseMethod("as.dendrogram")
 
 as.dendrogram.dendrogram <- function(object, ...) object
 
-as.dendrogram.hclust <- function (object, hang = -1, ...)
+as.dendrogram.hclust <- function (object, hang = -1, check = TRUE, ...)
 ## hang = 0.1  is default for plot.hclust
 {
-    stopifnot(length(object$order) > 0L)
-    if (is.null(object$labels))
+    nolabels <- is.null(object$labels)
+    merge <- object$merge
+    if(check && !isTRUE(msg <- .validity.hclust(object, merge, order=nolabels)))
+	stop(msg)
+    if(nolabels)
 	object$labels <- seq_along(object$order)
     z <- list()
     nMerge <- length(oHgt <- object$height)
-    if (nMerge != nrow(object$merge))
-	stop("'merge' and 'height' do not fit!")
     hMax <- oHgt[nMerge]
     for (k in 1L:nMerge) {
-	x <- object$merge[k, ]# no sort() anymore!
+	x <- merge[k, ]# no sort() anymore!
 	if (any(neg <- x < 0))
 	    h0 <- if (hang < 0) 0 else max(0, oHgt[k] - hang * hMax)
 	if (all(neg)) {			# two leaves
@@ -77,87 +78,142 @@ as.dendrogram.hclust <- function (object, hang = -1, ...)
 	attr(zk, "height") <- oHgt[k]
 	z[[as.character(k)]] <- zk
     }
-    z <- z[[as.character(k)]]
-    class(z) <- "dendrogram"
-    z
+    structure(z[[as.character(k)]], class = "dendrogram")
 }
 
-## Reversing the above (as much as possible)
+## Count the number of leaves in a dendrogram.
+nleaves <- function (node) {
+    if (is.leaf(node))
+	return(1L)
+
+    todo <- NULL # Non-leaf nodes to traverse after this one.
+    count <- 0L
+    repeat {
+	## For each child: count iff a leaf, add to todo list otherwise.
+	while (length(node)) {
+	    child <- node[[1L]]
+	    node <- node[-1L]
+	    if (is.leaf(child)) {
+		count <- count + 1L
+	    } else {
+		todo <- list(node=child, todo=todo)
+	    }
+	}
+	## Advance to next node, terminating when no nodes left to count.
+	if (is.null(todo)) {
+	    break
+	} else {
+	    node <- todo$node
+	    todo <- todo$todo
+	}
+    }
+    count
+}
+
+## Reversing   as.dendrogram.hclust() above (as much as possible)
 ## is only possible for dendrograms with *binary* splits
 as.hclust.dendrogram <- function(x, ...)
 {
-    stopifnot(is.list(x), length(x) == 2)
-    n <- length(ord <- as.integer(unlist(x)))
-    iOrd <- sort.list(ord)
-    if(!identical(ord[iOrd], seq_len(n)))
-	stop(gettextf(
-	    "dendrogram entries must be 1,2,..,%d (in any order), to be coercable to \"hclust\"",
-	    n), domain=NA)
+    stopifnot(is.list(x), length(x) == 2L)
+    n <- nleaves(x)
     stopifnot(n == attr(x, "members"))
+
+    ## Ord and labels for each leaf node (in preorder).
+    ord <- integer(n)
+    labsu <- character(n)
+
+    ## Height and (parent,index) for each internal node (in preorder).
     n.h <- n - 1L
-    ## labels: not sure, if we'll use this; there should be a faster way!
-    labsu <- unlist(labels(x))
-    labs <- labsu[iOrd]
-    x <- .add.dendrInd(x)
-
-    SIMP <- function(d) {
-	if(is.leaf(d)) {
-	    - as.vector(d)# dropping attributes
-	} else {
-	    j <<- j + 1L
-	    height[j] <<- attr(d, "height")
-	    inds[[j]] <<- attr(d, ".indx.")
-	    attributes(d) <- NULL # drop all, incl. class
-	    ## recursively apply to components:
-	    d[] <- lapply(d, SIMP)
-	    d
+    height <- numeric(n.h)
+    myIdx <- matrix(NA_integer_, 2L, n.h)
+
+    ## Record merges initially in preorder traversal
+    ## We will resort into merge order at end.
+    merge <- matrix(NA_integer_, 2L, n.h)
+
+    ## Starting at root, traverse dendrogram recording
+    ## information above about leaves and nodes encountered
+    position <- 0L  # position within current node
+    stack <- NULL   # parents of current node plus saved state
+    leafCount <- 0L # number of leaves seen
+    nodeCount <- 0L # number of nodes seen
+    repeat {
+        ## Pre-order traversal of the current node.
+        ## Will descend into non-leaf children pushing parents onto stack.
+	while (length(x)) {
+            ## Record height and index list on first visit to each internal node.
+	    if (position == 0L) {
+		nodeCount <- nodeCount + 1L
+                myNodeIndex <- nodeCount
+                if (nodeCount != 1L) {
+                    myIdx[,nodeCount] <- c(stack$position, stack$myNodeIndex)
+                }
+		height[nodeCount] <- attr(x, "height")
+	    }
+	    position <- position + 1L
+	    child <- x[[1L]]
+	    x <- x[-1L]
+	    if (is.leaf(child)) {
+                ## Record information about leaf nodes.
+                leafCount <- leafCount + 1L
+                labsu[leafCount] <- attr(child,'label')
+                ord[leafCount] <- as.integer(child)
+                merge[position,myNodeIndex] <- - ord[leafCount]
+            } else {
+                stopifnot (length(child)==2L)
+                ## Descend into non-leaf nodes, saving state on stack.
+		stack <- list(node=x, position=position,
+                              myNodeIndex=myNodeIndex, stack=stack)
+		x <- child
+		position <- 0L
+	    }
+	}
+        ## All children of current node have been traversed.
+
+        ## Terminate if current node was the root node.
+	if (is.null(stack)) {
+	    break
 	}
+
+        ## Otherwise, pop parent node and state.
+	position <- stack$position   # Restore position in parent node.
+	x <- stack$node
+        myNodeIndex <- stack$myNodeIndex
+	stack <- stack$stack
     }
 
-    height <- numeric(n.h);  inds <- vector("list",n.h);  j <- 0L
-    xS <- SIMP(x)
-    ii <- sort.list(height) ## FIXME? - May only work if there are no 'inversion's !
+    iOrd <- sort.list(ord)
+    if(!identical(ord[iOrd], seq_len(n)))
+	stop(gettextf(
+	    "dendrogram entries must be 1,2,..,%d (in any order), to be coercible to \"hclust\"",
+	    n), domain=NA)
 
-    merge <- matrix(NA_integer_, 2L, n.h)
-    for(k in seq_len(n.h)) {
-	if(k < n.h) { in.k <- inds[[ ii[k] ]] ; s <- xS[[in.k]] } else s <- xS
-	if(getOption("as.hclust.dendr", FALSE)) {
-	    cat(sprintf("ii[k=%2d]=%2d -> s=xS[[in.k]]=", k, ii[k]))
-	    str(s)
+    ## ties: break ties "compatibly" with above preorder traversal -- relies on stable sort here:
+    ii <- sort.list(height, decreasing=TRUE)[n.h:1L]
+    stopifnot(ii[n.h] == 1L)
+
+    ## Record internal merges
+    k <- seq_len(n.h-1L)
+    merge[t(myIdx[,ii[k]])] <- + k
+
+    if (getOption("as.hclust.dendr", FALSE)) { # be verbose
+	for(k in seq_len(n.h)) {
+	    cat(sprintf("ii[k=%2d]=%2d ", k, ii[k]))
+	    cat("-> s=merge[[,ii[k]]]=")
+	    str(merge[,ii[k]])
 	}
-	stopifnot(length(s) == 2L, all( vapply(s, is.integer, NA) ))# checking..
-	merge[,k] <- unlist(s)
-	if(k < n.h)
-	    xS[[in.k]] <- + k
     }
 
-    structure(list(merge = t(merge),
-		   height = height[ii],
+    structure(list(merge = t(merge[,ii]),  # Resort into merge order
+		   height = height[ii], # Resort into merge order
 		   order = ord,
-		   labels = labs,
+		   labels = labsu[iOrd],
 		   call = match.call(),
 		   method = NA_character_,
 		   dist.method = NA_character_),
 	      class = "hclust")
 }
 
-##' add the c(i1,i2,..) list indices to each non-leaf of a dendrogram
-##' --> allowing "random access" into the dendrogram
-.add.dendrInd <- function(x)
-{
-    add.I <- function(x, ind) {
-        if(!is.leaf(x)) {
-            for(i in seq_along(x))
-                x[[i]] <- add.I(x[[i]], c(ind, i))
-            attr(x, ".indx.") <- ind
-        }
-        x
-    }
-    ## apply recursively:
-    add.I(x, integer())
-}
-
-
 ### MM: 'FIXME'	 (2002-05-14):
 ###	 =====
 ## We currently (mis)use a node's "members" attribute for two things:
@@ -185,23 +241,46 @@ midcache.dendrogram <- function (x, type = "hclust", quiet=FALSE)
 
     type <- match.arg(type) ## currently only "hclust"
     stopifnot( inherits(x, "dendrogram") )
+    verbose <- getOption("verbose", 0) >= 2 # non-public
     setmid <- function(d, type) {
-	if(is.leaf(d))# no "midpoint"
-	    return(d)
-	k <- length(d)
-	if(k < 1)
-	    stop("dendrogram node with non-positive #{branches}")
-	r <- d # incl. attributes!
-	midS <- 0
-	for(j in 1L:k) {
-	    r[[j]] <- unclass(setmid(d[[j]], type))
-	    midS <- midS + .midDend(r[[j]])
+	depth <- 0L
+	kk <- integer()
+	jj <- integer()
+	dd <- list()
+	repeat {
+	    if(!is.leaf(d)) {# no "midpoint" for leaf
+		k <- length(d)
+		if(k < 1)
+		    stop("dendrogram node with non-positive #{branches}")
+		depth <- depth + 1L
+		if(verbose) cat(sprintf(" depth(+)=%4d, k=%d\n", depth, k))
+		kk[depth] <- k
+		if(storage.mode(jj) != storage.mode(kk)) # (long vectors)
+		    storage.mode(jj) <- storage.mode(kk)
+		dd[[depth]] <- d
+		d <- d[[jj[depth] <- 1L]]
+		next
+	    }
+	    while(depth) {
+		k <- kk[depth]
+		j <- jj[depth]
+		r <- dd[[depth]] # incl. attributes!
+		r[[j]] <- unclass(d)
+		if(j < k) break
+		depth <- depth - 1L
+		if(verbose) cat(sprintf(" depth(-)=%4d, k=%d\n", depth, k))
+		midS <- sum(vapply(r, .midDend, 0))
+		if(!quiet && type == "hclust" && k != 2)
+		    warning("midcache() of non-binary dendrograms only partly implemented")
+		## compatible to as.dendrogram.hclust() {MM: doubtful if k > 2}
+		attr(r, "midpoint") <- (.memberDend(r[[1L]]) + midS) / 2
+		d <- r
+	    }
+	    if(!depth) break
+	    dd[[depth]] <- r
+	    d <- r[[jj[depth] <- j + 1L]]
 	}
-	if(!quiet && type == "hclust" && k != 2)
-	    warning("midcache() of non-binary dendrograms only partly implemented")
-	## compatible to as.dendrogram.hclust() {MM: doubtful if k > 2}
-	attr(r, "midpoint") <- (.memberDend(d[[1L]]) + midS) / 2
-	r
+	d
     }
     setmid(x, type=type)
 }
@@ -224,7 +303,7 @@ print.dendrogram <- function(x, digits = getOption("digits"), ...)
 
 str.dendrogram <-
 function (object, max.level = NA, digits.d = 3L, give.attr = FALSE,
-          wid = getOption("width"), nest.lev = 0, indent.str = "",
+          wid = getOption("width"), nest.lev = 0L, indent.str = "",
           last.str = getOption("str.dendrogram.last"), stem = "--", ...)
 {
 ## TO DO: when object is part of a larger structure which is str()ed
@@ -239,44 +318,57 @@ function (object, max.level = NA, digits.d = 3L, give.attr = FALSE,
 	paste(paste(names(fl), fl, sep = sep), collapse = ", ")
     }
 
-    ## when  indent.str  ends in a blank, i.e. "last" (see below)
-    istr <- sub(" $", last.str, indent.str)
-    cat(istr, stem, sep = "")
-
-    at <- attributes(object)
-    memb <- at[["members"]]
-    hgt	 <- at[["height"]]
-    if(!is.leaf(object)) {
-	le <- length(object)
-	if(give.attr) {
-	    if(nzchar(at <- pasteLis(at, c("class", "height", "members"))))
-		at <- paste(",", at)
-	}
-	cat("[dendrogram w/ ", le, " branches and ", memb, " members at h = ",
-            format(hgt, digits = digits.d), if(give.attr) at,
-            "]", if(!is.na(max.level) && nest.lev == max.level)" ..", "\n",
-            sep = "")
-	if (is.na(max.level) || nest.lev < max.level) {
-	    for(i in 1L:le) {
-		##cat(indent.str, nam.ob[i], ":", sep = "")
-		str(object[[i]], nest.lev = nest.lev + 1,
-		    indent.str = paste(indent.str, if(i < le) " |" else "  "),
-                    last.str = last.str, stem = stem,
-		    max.level = max.level, digits.d = digits.d,
-		    give.attr = give.attr, wid = wid)
+    todo <- NULL # Nodes to process after this one
+    repeat {
+        ## when  indent.str  ends in a blank, i.e. "last" (see below)
+	istr <- sub(" $", last.str, indent.str)
+	cat(istr, stem, sep = "")
+
+	at <- attributes(object)
+	memb <- at[["members"]]
+	hgt  <- at[["height"]]
+	if(!is.leaf(object)) {
+	    le <- length(object)
+	    if(give.attr) {
+		if(nzchar(at <- pasteLis(at, c("class", "height", "members"))))
+		    at <- paste(",", at)
 	    }
+	    cat("[dendrogram w/ ", le, " branches and ", memb, " members at h = ",
+		format(hgt, digits = digits.d), if(give.attr) at, "]",
+		if(!is.na(max.level) && nest.lev == max.level)" ..", "\n", sep = "")
+	    if (is.na(max.level) || nest.lev < max.level) {
+		## Push children onto todo list in reverse order.
+		## Assumes at least one child.
+		nest.lev <- nest.lev + 1L
+		todo <- list(object=object[[le]], nest.lev = nest.lev,
+			     indent.str = paste(indent.str, "  "), todo = todo)
+		indent.str <- paste (indent.str, " |")
+		while ((le <- le - 1L) > 0L) {
+		    todo <- list(object=object[[le]], nest.lev = nest.lev,
+				 indent.str = indent.str, todo = todo)
+		}
+	    }
+	} else { ## leaf
+	    cat("leaf",
+		if(is.character(at$label)) paste("", at$label,"", sep = '"') else
+		format(object, digits = digits.d),"")
+	    any.at <- hgt != 0
+	    if(any.at) cat("(h=",format(hgt, digits = digits.d))
+	    if(memb != 1) #MM: when can this happen?
+		cat(if(any.at)", " else {any.at <- TRUE; "("}, "memb= ", memb, sep = "")
+	    at <- pasteLis(at, c("class", "height", "members", "leaf", "label"))
+	    if(any.at || nzchar(at)) cat(if(!any.at)"(", at, ")")
+	    cat("\n")
+	}
+        ## Advance to next node, if any.
+	if (is.null(todo)) {
+	    break
+	} else {
+	    object <- todo$object
+	    nest.lev <- todo$nest.lev
+	    indent.str <- todo$indent.str
+	    todo <- todo$todo
 	}
-    } else { ## leaf
-	cat("leaf",
-	    if(is.character(at$label)) paste("", at$label,"", sep = '"') else
-	    format(object, digits = digits.d),"")
-	any.at <- hgt != 0
-	if(any.at) cat("(h=",format(hgt, digits = digits.d))
-	if(memb != 1) #MM: when can this happen?
-	    cat(if(any.at)", " else {any.at <- TRUE; "("}, "memb= ", memb, sep = "")
-	at <- pasteLis(at, c("class", "height", "members", "leaf", "label"))
-	if(any.at || nzchar(at)) cat(if(!any.at)"(", at, ")")
-	cat("\n")
     }
     invisible()
 }
@@ -347,10 +439,19 @@ plotNode <-
     function(x1, x2, subtree, type, center, leaflab, dLeaf,
 	     nodePar, edgePar, horiz = FALSE)
 {
+  wholetree <- subtree
+  depth <- 0L
+  llimit <- list()
+  KK <- integer()
+  kk <- integer()
+
+  repeat {
     inner <- !is.leaf(subtree) && x1 != x2
     yTop <- attr(subtree, "height")
     bx <- plotNodeLimit(x1, x2, subtree, center)
     xTop <- bx$x
+    depth <- depth + 1L
+    llimit[[depth]] <- bx$limit
 
     ## handle node specific parameters in "nodePar":
     hasP <- !is.null(nPar <- attr(subtree, "nodePar"))
@@ -490,11 +591,34 @@ plotNode <-
                          font = t.font)
                 }
 	    }
-	    plotNode(bx$limit[k], bx$limit[k + 1], subtree = child,
-		     type, center, leaflab, dLeaf, nodePar, edgePar, horiz)
 	}
     }
-    invisible()
+
+    if (inner && length(subtree)) {
+	KK[depth] <- length(subtree)
+	if (storage.mode(kk) != storage.mode(KK))
+	    storage.mode(kk) <- storage.mode(KK)
+
+	## go to first child
+	kk[depth] <- 1L
+	x1 <- bx$limit[1L]
+	x2 <- bx$limit[2L]
+	subtree <- subtree[[1L]]
+    }
+    else {
+	repeat {
+	    depth <- depth - 1L
+	    if (!depth || kk[depth] < KK[depth]) break
+	}
+	if (!depth) break
+	length(kk) <- depth
+	kk[depth] <- k <- kk[depth] + 1L
+	x1 <- llimit[[depth]][k]
+	x2 <- llimit[[depth]][k + 1L]
+	subtree <- wholetree[[kk]]
+    }
+  } ## repeat
+  invisible()
 }
 
 plotNodeLimit <- function(x1, x2, subtree, center)
@@ -502,21 +626,21 @@ plotNodeLimit <- function(x1, x2, subtree, center)
     ## get the left borders limit[k] of all children k=1..K, and
     ## the handle point `x' for the edge connecting to the parent.
     inner <- !is.leaf(subtree) && x1 != x2
-    if(inner) {
-	K <- length(subtree)
-	mTop <- .memberDend(subtree)
-	limit <- integer(K)
-	xx1 <- x1
-	for(k in 1L:K) {
-	    m <- .memberDend(subtree[[k]])
-	    ##if(is.null(m)) m <- 1
-	    xx1 <- xx1 + (if(center) (x2-x1) * m/mTop else m)
-	    limit[k] <- xx1
-	}
-	limit <- c(x1, limit)
-    } else { ## leaf
-	limit <- c(x1, x2)
-    }
+    limit <- c(x1,
+	       if(inner) {
+		   K <- length(subtree)
+		   mTop <- .memberDend(subtree)
+		   limit <- integer(K)
+		   xx1 <- x1
+		   for(k in 1L:K) {
+		       m <- .memberDend(subtree[[k]])
+		       ##if(is.null(m)) m <- 1
+		       xx1 <- xx1 + (if(center) (x2-x1) * m/mTop else m)
+		       limit[k] <- xx1
+		   }
+		   limit
+	       } else ## leaf
+		   x2)
     mid <- attr(subtree, "midpoint")
     center <- center || (inner && !is.numeric(mid))
     x <- if(center) mean(c(x1,x2)) else x1 + (if(inner) mid else 0)
@@ -595,22 +719,40 @@ reorder.dendrogram <- function(x, wts, agglo.FUN = sum, ...)
 	stop("'reorder.dendrogram' requires a dendrogram")
     agglo.FUN <- match.fun(agglo.FUN)
     oV <- function(x, wts) {
-	if(is.leaf(x)) {
-	    attr(x, "value") <- wts[x[1L]]
-	    return(x)
+	depth <- 0L
+	kk <- jj <- integer()
+	xx <- list()
+	repeat {
+	    if(is.leaf(x))
+		attr(x, "value") <- wts[x[1L]]
+	    else {
+		k <- length(x)
+		if(k == 0L) stop("invalid (length 0) node in dendrogram")
+		depth <- depth + 1L
+		kk[depth] <- k
+		if(storage.mode(jj) != storage.mode(kk))
+		    storage.mode(jj) <- storage.mode(kk)
+		## insert/compute 'wts' recursively down the branches:
+		xx[[depth]] <- x
+		x <- x[[jj[depth] <- 1L]]
+		next
+	    }
+	    while(depth) {
+		b <- x
+		x <- xx[[depth]]
+		j <- jj[depth]
+		x[[j]] <- b
+		if(j < kk[depth]) break
+		depth <- depth - 1L
+		vals <- vapply(x, attr, numeric(1L), which="value")
+		iOrd <- sort.list(vals)
+		attr(x, "value") <- agglo.FUN(vals[iOrd])
+		x[] <- x[iOrd]
+	    }
+	    if(!depth) break
+	    xx[[depth]] <- x
+	    x <- x[[jj[depth] <- j + 1L]]
 	}
-        k <- length(x)
-        if(k == 0L) stop("invalid (length 0) node in dendrogram")
-        vals <- numeric(k)
-        for(j in 1L:k) {
-            ## insert/compute 'wts' recursively down the branches:
-            b <- oV(x[[j]], wts)
-            x[[j]] <- b
-            vals[j] <- attr(b, "value")
-        }
-        iOrd <- sort.list(vals)
-	attr(x, "value") <- agglo.FUN(vals[iOrd])
-        x[] <- x[iOrd]
         x
     }
     midcache.dendrogram( oV(x, wts) )
@@ -629,9 +771,12 @@ rev.dendrogram <- function(x) {
     midcache.dendrogram( r )
 }
 
-## This is cheap
-labels.dendrogram <- function(object, ...)
-    unlist(dendrapply(object, function(n) attr(n,"label")))
+labels.dendrogram <- function(object, ...) {
+    if(is.list(object))
+        rapply(object, function(n) attr(n,"label"))
+    else # can "end" in a leaf here
+        attr(object, "label")
+}
 
 merge.dendrogram <- function(x, y, ..., height,
                              adjust = c("auto", "add.max", "none"))
@@ -851,7 +996,7 @@ function (x, Rowv=NULL, Colv=if(symm)"Rowv" else NULL,
     if(!is.null(ylab)) mtext(ylab, side = 4, line = margins[2L] - 1.25)
 
     if (!missing(add.expr))
-	eval(substitute(add.expr))
+	eval.parent(substitute(add.expr))
 
     ## the two dendrograms :
     par(mar = c(margins[1L], 0, 0, 0))
diff --git a/src/library/stats/R/density.R b/src/library/stats/R/density.R
index 1703803..a0466bc 100644
--- a/src/library/stats/R/density.R
+++ b/src/library/stats/R/density.R
@@ -1,7 +1,7 @@
 #  File src/library/stats/R/density.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
-#  Copyright (C) 1995-2012 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
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 density <- function(x, ...) UseMethod("density")
 
@@ -26,7 +26,7 @@ density.default <-
 	     give.Rkern = FALSE,
 	     n = 512, from, to, cut = 3, na.rm = FALSE, ...)
 {
-    if(!missing(...)) warning("non-matched further arguments are disregarded")
+    chkDots(...)
     if(!missing(window) && missing(kernel))
 	kernel <- window
     kernel <- match.arg(kernel)
@@ -52,7 +52,7 @@ density.default <-
         else stop("'x' contains missing values")
     }
     N <- nx <- as.integer(length(x))
-    if(is.na(N)) stop("invalid value of length(x)")
+    if(is.na(N)) stop(gettextf("invalid value of %s", "length(x)"), domain = NA)
     x.finite <- is.finite(x)
     if(any(!x.finite)) {
         x <- x[x.finite]
diff --git a/src/library/stats/R/deriv.R b/src/library/stats/R/deriv.R
index 1f7c7b5..2471e4f 100644
--- a/src/library/stats/R/deriv.R
+++ b/src/library/stats/R/deriv.R
@@ -1,5 +1,5 @@
 #  File src/library/stats/R/deriv.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
 #  Copyright (C) 1995-2012 The R Core Team
 #
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 D <- function(expr, name) .External(C_doD, expr, name)
 
diff --git a/src/library/stats/R/diffinv.R b/src/library/stats/R/diffinv.R
index 5d36680..f99d444 100644
--- a/src/library/stats/R/diffinv.R
+++ b/src/library/stats/R/diffinv.R
@@ -1,5 +1,5 @@
 #  File src/library/stats/R/diffinv.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
 #  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
@@ -12,10 +12,10 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
-## Copyright (C) 1997-1999  Adrian Trapletti
-## Cppyright (C) 2003-2013  R Core Team
+## Cppyright (C) 2003-2017  R Core Team
+## Copyright     1997-1999  Adrian Trapletti
 ## This version distributed under GPL (version 2 or later)
 
 diffinv <- function (x, ...) { UseMethod("diffinv") }
@@ -33,7 +33,7 @@ diffinv.vector <- function (x, lag = 1L, differences = 1L, xi, ...)
         x <- as.double(x)
         xi <- as.double(xi)
         n <- as.integer(length(x))
-        if (is.na(n)) stop ("invalid value of length(x)")
+        if(is.na(n)) stop(gettextf("invalid value of %s", "length(x)"), domain = NA)
 #        y <- c(xi[1L:lag], double(n))
 #        z <- .C(C_R_intgrt_vec, x, y = y, as.integer(lag), n)$y
         .Call(C_intgrt_vec, x, xi, lag)
@@ -73,17 +73,9 @@ diffinv.ts <- function (x, lag = 1, differences = 1, xi, ...)
     ts(y, frequency = frequency(x), end = end(x))
 }
 
-toeplitz <- function (x, ...)
+toeplitz <- function (x)
 {
     if(!is.vector(x)) stop("'x' is not a vector")
-    if(!missing(...)) {
-        na <- length(list(...))
-        warning(sprintf(ngettext(na,
-                                 "extra argument %s will be disregarded",
-                                 "extra arguments %s will be disregarded"),
-                        paste(sQuote(names(list(...))), collapse = ", ")),
-		domain = NA)
-    }
     n <- length(x)
     A <- matrix(raw(), n, n)
     matrix(x[abs(col(A) - row(A)) + 1L], n, n)
diff --git a/src/library/stats/R/dist.R b/src/library/stats/R/dist.R
index 6f94e45..b584dc4 100644
--- a/src/library/stats/R/dist.R
+++ b/src/library/stats/R/dist.R
@@ -1,5 +1,5 @@
 #  File src/library/stats/R/dist.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
 #  Copyright (C) 1995-2012 The R Core Team
 #
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 dist <- function(x, method = "euclidean", diag = FALSE, upper = FALSE, p = 2)
 {
diff --git a/src/library/stats/R/distn.R b/src/library/stats/R/distn.R
index 9231878..71e8150 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, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
-#  Copyright (C) 1995-2012 The R Core Team
+#  Copyright (C) 1995-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
@@ -14,42 +14,42 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 
-dexp <- function(x, rate=1, log = FALSE) .External(C_dexp, x, 1/rate, log)
+dexp <- function(x, rate=1, log = FALSE) .Call(C_dexp, x, 1/rate, log)
 pexp <- function(q, rate=1, lower.tail = TRUE, log.p = FALSE)
-    .External(C_pexp, q, 1/rate, lower.tail, log.p)
+    .Call(C_pexp, q, 1/rate, lower.tail, log.p)
 qexp <- function(p, rate=1, lower.tail = TRUE, log.p = FALSE)
-    .External(C_qexp, p, 1/rate, lower.tail, log.p)
-rexp <- function(n, rate=1) .External(C_rexp, n, 1/rate)
+    .Call(C_qexp, p, 1/rate, lower.tail, log.p)
+rexp <- function(n, rate=1) .Call(C_rexp, n, 1/rate)
 
 dunif <- function(x, min=0, max=1, log = FALSE)
-    .External(C_dunif, x, min, max, log)
+    .Call(C_dunif, x, min, max, log)
 punif <- function(q, min=0, max=1, lower.tail = TRUE, log.p = FALSE)
-    .External(C_punif, q, min, max, lower.tail, log.p)
+    .Call(C_punif, q, min, max, lower.tail, log.p)
 qunif <- function(p, min=0, max=1, lower.tail = TRUE, log.p = FALSE)
-    .External(C_qunif, p, min, max, lower.tail, log.p)
-runif <- function(n, min=0, max=1) .External(C_runif, n, min, max)
+    .Call(C_qunif, p, min, max, lower.tail, log.p)
+runif <- function(n, min=0, max=1) .Call(C_runif, n, min, max)
 
 dnorm <- function(x, mean=0, sd=1, log=FALSE)
-    .External(C_dnorm, x, mean, sd, log)
+    .Call(C_dnorm, x, mean, sd, log)
 pnorm <- function(q, mean=0, sd=1, lower.tail = TRUE, log.p = FALSE)
-    .External(C_pnorm, q, mean, sd, lower.tail, log.p)
+    .Call(C_pnorm, q, mean, sd, lower.tail, log.p)
 qnorm <- function(p, mean=0, sd=1, lower.tail = TRUE, log.p = FALSE)
-    .External(C_qnorm, p, mean, sd, lower.tail, log.p)
-rnorm <- function(n, mean=0, sd=1) .External(C_rnorm, n, mean, sd)
+    .Call(C_qnorm, p, mean, sd, lower.tail, log.p)
+rnorm <- function(n, mean=0, sd=1) .Call(C_rnorm, n, mean, sd)
 
 dcauchy <- function(x, location=0, scale=1, log = FALSE)
-    .External(C_dcauchy, x, location, scale, log)
+    .Call(C_dcauchy, x, location, scale, log)
 pcauchy <-
     function(q, location=0, scale=1, lower.tail = TRUE, log.p = FALSE)
-    .External(C_pcauchy, q, location, scale, lower.tail, log.p)
+    .Call(C_pcauchy, q, location, scale, lower.tail, log.p)
 qcauchy <-
     function(p, location=0, scale=1, lower.tail = TRUE, log.p = FALSE)
-    .External(C_qcauchy, p, location, scale, lower.tail, log.p)
+    .Call(C_qcauchy, p, location, scale, lower.tail, log.p)
 rcauchy <-
-    function(n, location=0, scale=1) .External(C_rcauchy, n, location, scale)
+    function(n, location=0, scale=1) .Call(C_rcauchy, n, location, scale)
 
 ## allow a fuzz of ca 20ulp here.
 dgamma <- function(x, shape, rate = 1, scale = 1/rate, log = FALSE)
@@ -60,7 +60,7 @@ dgamma <- function(x, shape, rate = 1, scale = 1/rate, log = FALSE)
         else
             stop("specify 'rate' or 'scale' but not both")
     }
-    .External(C_dgamma, x, shape, scale, log)
+    .Call(C_dgamma, x, shape, scale, log)
 }
 pgamma <- function(q, shape, rate = 1, scale = 1/rate,
                    lower.tail = TRUE, log.p = FALSE)
@@ -71,7 +71,7 @@ pgamma <- function(q, shape, rate = 1, scale = 1/rate,
         else
             stop("specify 'rate' or 'scale' but not both")
     }
-    .External(C_pgamma, q, shape, scale, lower.tail, log.p)
+    .Call(C_pgamma, q, shape, scale, lower.tail, log.p)
 }
 qgamma <- function(p, shape, rate = 1, scale = 1/rate,
                    lower.tail = TRUE, log.p = FALSE)
@@ -82,7 +82,7 @@ qgamma <- function(p, shape, rate = 1, scale = 1/rate,
         else
             stop("specify 'rate' or 'scale' but not both")
     }
-    .External(C_qgamma, p, shape, scale, lower.tail, log.p)
+    .Call(C_qgamma, p, shape, scale, lower.tail, log.p)
 }
 rgamma <- function(n, shape, rate = 1, scale = 1/rate)
 {
@@ -92,48 +92,49 @@ rgamma <- function(n, shape, rate = 1, scale = 1/rate)
         else
             stop("specify 'rate' or 'scale' but not both")
     }
-    .External(C_rgamma, n, shape, scale)
+    .Call(C_rgamma, n, shape, scale)
 }
 dlnorm <- function(x, meanlog=0, sdlog=1, log=FALSE)
-    .External(C_dlnorm, x, meanlog, sdlog, log)
+    .Call(C_dlnorm, x, meanlog, sdlog, log)
 plnorm <- function(q, meanlog=0, sdlog=1, lower.tail = TRUE, log.p = FALSE)
-    .External(C_plnorm, q, meanlog, sdlog, lower.tail, log.p)
+    .Call(C_plnorm, q, meanlog, sdlog, lower.tail, log.p)
 qlnorm <- function(p, meanlog=0, sdlog=1, lower.tail = TRUE, log.p = FALSE)
-    .External(C_qlnorm, p, meanlog, sdlog, lower.tail, log.p)
+    .Call(C_qlnorm, p, meanlog, sdlog, lower.tail, log.p)
 rlnorm <- function(n, meanlog=0, sdlog=1)
-    .External(C_rlnorm, n, meanlog, sdlog)
+    .Call(C_rlnorm, n, meanlog, sdlog)
 
 dlogis <- function(x, location=0, scale=1, log = FALSE)
-    .External(C_dlogis, x, location, scale, log)
+    .Call(C_dlogis, x, location, scale, log)
 plogis <- function(q, location=0, scale=1, lower.tail = TRUE, log.p = FALSE)
-    .External(C_plogis, q, location, scale, lower.tail, log.p)
+    .Call(C_plogis, q, location, scale, lower.tail, log.p)
 qlogis <- function(p, location=0, scale=1, lower.tail = TRUE, log.p = FALSE)
-    .External(C_qlogis, p, location, scale, lower.tail, log.p)
+    .Call(C_qlogis, p, location, scale, lower.tail, log.p)
 rlogis <- function(n, location=0, scale=1)
-    .External(C_rlogis, n, location, scale)
+    .Call(C_rlogis, n, location, scale)
 
 dweibull <- function(x, shape, scale=1, log = FALSE)
-    .External(C_dweibull, x, shape, scale, log)
+    .Call(C_dweibull, x, shape, scale, log)
 pweibull <- function(q, shape, scale=1, lower.tail = TRUE, log.p = FALSE)
-    .External(C_pweibull, q, shape, scale, lower.tail, log.p)
+    .Call(C_pweibull, q, shape, scale, lower.tail, log.p)
 qweibull <- function(p, shape, scale=1, lower.tail = TRUE, log.p = FALSE)
-    .External(C_qweibull, p, shape, scale, lower.tail, log.p)
-rweibull <- function(n, shape, scale=1) .External(C_rweibull, n, shape, scale)
+    .Call(C_qweibull, p, shape, scale, lower.tail, log.p)
+rweibull <- function(n, shape, scale=1) .Call(C_rweibull, n, shape, scale)
 
 dbeta <- function(x, shape1, shape2, ncp=0, log = FALSE) {
-    if(missing(ncp)) .External(C_dbeta, x, shape1, shape2, log)
-    else .External(C_dnbeta, x, shape1, shape2, ncp, log)
+    if(missing(ncp)) .Call(C_dbeta, x, shape1, shape2, log)
+    else .Call(C_dnbeta, x, shape1, shape2, ncp, log)
 }
 pbeta <- function(q, shape1, shape2, ncp=0, lower.tail = TRUE, log.p = FALSE) {
-    if(missing(ncp)) .External(C_pbeta, q, shape1, shape2, lower.tail, log.p)
-    else .External(C_pnbeta, q, shape1, shape2, ncp, lower.tail, log.p)
+    if(missing(ncp)) .Call(C_pbeta, q, shape1, shape2, lower.tail, log.p)
+    else .Call(C_pnbeta, q, shape1, shape2, ncp, lower.tail, log.p)
 }
 qbeta <- function(p, shape1, shape2, ncp=0, lower.tail = TRUE, log.p = FALSE) {
-    if(missing(ncp)) .External(C_qbeta, p, shape1, shape2, lower.tail, log.p)
-    else .External(C_qnbeta, p, shape1, shape2, ncp, lower.tail, log.p)
+    if(missing(ncp)) .Call(C_qbeta, p, shape1, shape2, lower.tail, log.p)
+    else .Call(C_qnbeta, p, shape1, shape2, ncp, lower.tail, log.p)
 }
 rbeta <- function(n, shape1, shape2, ncp = 0) {
-    if(ncp == 0) .External(C_rbeta, n, shape1, shape2)
+    if(is.na(ncp)) { warning("NAs produced"); rep(NaN, n) }
+    else if(ncp == 0) .Call(C_rbeta, n, shape1, shape2)
     else {
         X <- rchisq(n, 2*shape1, ncp =ncp)
         X/(X + rchisq(n, 2*shape2))
@@ -141,12 +142,12 @@ rbeta <- function(n, shape1, shape2, ncp = 0) {
 }
 
 dbinom <- function(x, size, prob, log = FALSE)
-    .External(C_dbinom, x, size, prob, log)
+    .Call(C_dbinom, x, size, prob, log)
 pbinom <- function(q, size, prob, lower.tail = TRUE, log.p = FALSE)
-    .External(C_pbinom, q, size, prob, lower.tail, log.p)
+    .Call(C_pbinom, q, size, prob, lower.tail, log.p)
 qbinom <- function(p, size, prob, lower.tail = TRUE, log.p = FALSE)
-    .External(C_qbinom, p, size, prob, lower.tail, log.p)
-rbinom <- function(n, size, prob) .External(C_rbinom, n, size, prob)
+    .Call(C_qbinom, p, size, prob, lower.tail, log.p)
+rbinom <- function(n, size, prob) .Call(C_rbinom, n, size, prob)
 
 ## Multivariate: that's why there's no C interface (yet) for d...():
 dmultinom <- function(x, size = NULL, prob, log = FALSE)
@@ -177,155 +178,157 @@ dmultinom <- function(x, size = NULL, prob, log = FALSE)
     r <- lgamma(size+1) + sum(x*log(prob) - lgamma(x+1))
     if(log) r else exp(r)
 }
-rmultinom <- function(n, size, prob) .External(C_rmultinom, n, size, prob)
+rmultinom <- function(n, size, prob) .Call(C_rmultinom, n, size, prob)
 
 dchisq <- function(x, df, ncp=0, log = FALSE) {
-    if(missing(ncp)) .External(C_dchisq, x, df, log)
-    else .External(C_dnchisq, x, df, ncp, log)
+    if(missing(ncp)) .Call(C_dchisq, x, df, log)
+    else .Call(C_dnchisq, x, df, ncp, log)
 }
 pchisq <- function(q, df, ncp=0, lower.tail = TRUE, log.p = FALSE) {
-    if(missing(ncp)) .External(C_pchisq, q, df, lower.tail, log.p)
-    else .External(C_pnchisq, q, df, ncp, lower.tail, log.p)
+    if(missing(ncp)) .Call(C_pchisq, q, df, lower.tail, log.p)
+    else .Call(C_pnchisq, q, df, ncp, lower.tail, log.p)
 }
 qchisq <- function(p, df, ncp=0, lower.tail = TRUE, log.p = FALSE) {
-    if(missing(ncp)) .External(C_qchisq, p, df, lower.tail, log.p)
-    else .External(C_qnchisq, p, df, ncp, lower.tail, log.p)
+    if(missing(ncp)) .Call(C_qchisq, p, df, lower.tail, log.p)
+    else .Call(C_qnchisq, p, df, ncp, lower.tail, log.p)
 }
 rchisq <- function(n, df, ncp=0) {
-    if(missing(ncp)) .External(C_rchisq, n, df)
-    else .External(C_rnchisq, n, df, ncp)
+    if(missing(ncp)) .Call(C_rchisq, n, df)
+    else .Call(C_rnchisq, n, df, ncp)
 }
 
 df <- function(x, df1, df2, ncp, log = FALSE) {
-    if(missing(ncp)) .External(C_df, x, df1, df2, log)
-    else .External(C_dnf, x, df1, df2, ncp, log)
+    if(missing(ncp)) .Call(C_df, x, df1, df2, log)
+    else .Call(C_dnf, x, df1, df2, ncp, log)
 }
 pf <- function(q, df1, df2, ncp, lower.tail = TRUE, log.p = FALSE) {
-    if(missing(ncp)) .External(C_pf, q, df1, df2, lower.tail, log.p)
-    else .External(C_pnf, q, df1, df2, ncp, lower.tail, log.p)
+    if(missing(ncp)) .Call(C_pf, q, df1, df2, lower.tail, log.p)
+    else .Call(C_pnf, q, df1, df2, ncp, lower.tail, log.p)
 }
 qf <- function(p, df1, df2, ncp, lower.tail = TRUE, log.p = FALSE) {
-    if(missing(ncp)) .External(C_qf, p, df1, df2, lower.tail, log.p)
-    else .External(C_qnf, p, df1, df2, ncp, lower.tail, log.p)
+    if(missing(ncp)) .Call(C_qf, p, df1, df2, lower.tail, log.p)
+    else .Call(C_qnf, p, df1, df2, ncp, lower.tail, log.p)
 }
 rf <- function(n, df1, df2, ncp)
 {
-    if(missing(ncp)) .External(C_rf, n, df1, df2)
+    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)
 }
 
-dgeom <- function(x, prob, log = FALSE) .External(C_dgeom, x, prob, log)
+dgeom <- function(x, prob, log = FALSE) .Call(C_dgeom, x, prob, log)
 pgeom <- function(q, prob, lower.tail = TRUE, log.p = FALSE)
-    .External(C_pgeom, q, prob, lower.tail, log.p)
+    .Call(C_pgeom, q, prob, lower.tail, log.p)
 qgeom <- function(p, prob, lower.tail = TRUE, log.p = FALSE)
-    .External(C_qgeom, p, prob, lower.tail, log.p)
-rgeom <- function(n, prob) .External(C_rgeom, n, prob)
+    .Call(C_qgeom, p, prob, lower.tail, log.p)
+rgeom <- function(n, prob) .Call(C_rgeom, n, prob)
 
 dhyper <- function(x, m, n, k, log = FALSE)
-    .External(C_dhyper, x, m, n, k, log)
+    .Call(C_dhyper, x, m, n, k, log)
 phyper <- function(q, m, n, k, lower.tail = TRUE, log.p = FALSE)
-    .External(C_phyper, q, m, n, k, lower.tail, log.p)
+    .Call(C_phyper, q, m, n, k, lower.tail, log.p)
 qhyper <- function(p, m, n, k, lower.tail = TRUE, log.p = FALSE)
-    .External(C_qhyper, p, m, n, k, lower.tail, log.p)
-rhyper <- function(nn, m, n, k) .External(C_rhyper, nn, m, n, k)
+    .Call(C_qhyper, p, m, n, k, lower.tail, log.p)
+rhyper <- function(nn, m, n, k) .Call(C_rhyper, nn, m, n, k)
 
 dnbinom <- function(x, size, prob, mu, log = FALSE)
 {
     if (!missing(mu)) {
 	if (!missing(prob)) stop("'prob' and 'mu' both specified")
-	.External(C_dnbinom_mu, x, size, mu, log)
+	.Call(C_dnbinom_mu, x, size, mu, log)
     }
     else
-	.External(C_dnbinom, x, size, prob, log)
+	.Call(C_dnbinom, x, size, prob, log)
 }
 pnbinom <- function(q, size, prob, mu, lower.tail = TRUE, log.p = FALSE)
 {
     if (!missing(mu)) {
 	if (!missing(prob)) stop("'prob' and 'mu' both specified")
-	.External(C_pnbinom_mu, q, size, mu, lower.tail, log.p)
+	.Call(C_pnbinom_mu, q, size, mu, lower.tail, log.p)
     }
     else
-	.External(C_pnbinom, q, size, prob, lower.tail, log.p)
+	.Call(C_pnbinom, q, size, prob, lower.tail, log.p)
 }
 qnbinom <- function(p, size, prob, mu, lower.tail = TRUE, log.p = FALSE)
 {
     if (!missing(mu)) {
 	if (!missing(prob)) stop("'prob' and 'mu' both specified")
-### FIXME: implement qnbinom_mu(...) properly
-	prob <- size/(size + mu)
+	.Call(C_qnbinom_mu, p, size, mu, lower.tail, log.p)
     }
-    .External(C_qnbinom, p, size, prob, lower.tail, log.p)
+    else
+	.Call(C_qnbinom, p, size, prob, lower.tail, log.p)
 }
 rnbinom <- function(n, size, prob, mu)
 {
     if (!missing(mu)) {
         if (!missing(prob)) stop("'prob' and 'mu' both specified")
-        .External(C_rnbinom_mu, n, size, mu)
-    } else .External(C_rnbinom, n, size, prob)
+        .Call(C_rnbinom_mu, n, size, mu)
+    } else .Call(C_rnbinom, n, size, prob)
 }
 
-dpois <- function(x, lambda, log = FALSE) .External(C_dpois, x, lambda, log)
+dpois <- function(x, lambda, log = FALSE) .Call(C_dpois, x, lambda, log)
 ppois <- function(q, lambda, lower.tail = TRUE, log.p = FALSE)
-    .External(C_ppois, q, lambda, lower.tail, log.p)
+    .Call(C_ppois, q, lambda, lower.tail, log.p)
 qpois <- function(p, lambda, lower.tail = TRUE, log.p = FALSE)
-    .External(C_qpois, p, lambda, lower.tail, log.p)
-rpois <- function(n, lambda) .External(C_rpois, n, lambda)
+    .Call(C_qpois, p, lambda, lower.tail, log.p)
+rpois <- function(n, lambda) .Call(C_rpois, n, lambda)
 
 dt <- function(x, df, ncp, log = FALSE) {
-    if(missing(ncp)) .External(C_dt, x, df, log)
-    else .External(C_dnt, x, df, ncp, log)
+    if(missing(ncp)) .Call(C_dt, x, df, log)
+    else .Call(C_dnt, x, df, ncp, log)
 }
 pt <- function(q, df, ncp, lower.tail = TRUE, log.p = FALSE) {
-    if(missing(ncp)) .External(C_pt, q, df, lower.tail, log.p)
-    else .External(C_pnt, q, df, ncp, lower.tail, log.p)
+    if(missing(ncp)) .Call(C_pt, q, df, lower.tail, log.p)
+    else .Call(C_pnt, q, df, ncp, lower.tail, log.p)
 }
 qt <- function(p, df, ncp, lower.tail = TRUE, log.p = FALSE) {
-    if(missing(ncp)) .External(C_qt, p, df, lower.tail, log.p)
-    else .External(C_qnt,p, df, ncp, lower.tail, log.p)
+    if(missing(ncp)) .Call(C_qt, p, df, lower.tail, log.p)
+    else .Call(C_qnt,p, df, ncp, lower.tail, log.p)
 }
 rt <- function(n, df, ncp) {
-    if(missing(ncp)) .External(C_rt, n, df)
+    if(missing(ncp)) .Call(C_rt, n, df)
+    else if(is.na(ncp)) { warning("NAs produced"); rep(NaN, n) }
     else rnorm(n, ncp)/sqrt(rchisq(n, df)/df)
 }
 
 ptukey <- function(q, nmeans, df, nranges=1, lower.tail = TRUE, log.p = FALSE)
-    .External(C_ptukey, q, nranges, nmeans, df, lower.tail, log.p)
+    .Call(C_ptukey, q, nranges, nmeans, df, lower.tail, log.p)
 qtukey <- function(p, nmeans, df, nranges=1, lower.tail = TRUE, log.p = FALSE)
-    .External(C_qtukey, p, nranges, nmeans, df, lower.tail, log.p)
+    .Call(C_qtukey, p, nranges, nmeans, df, lower.tail, log.p)
 
 dwilcox <- function(x, m, n, log = FALSE)
 {
     on.exit(.External(C_wilcox_free))
-    .External(C_dwilcox, x, m, n, log)
+    .Call(C_dwilcox, x, m, n, log)
 }
 pwilcox <- function(q, m, n, lower.tail = TRUE, log.p = FALSE)
 {
     on.exit(.External(C_wilcox_free))
-    .External(C_pwilcox, q, m, n, lower.tail, log.p)
+    .Call(C_pwilcox, q, m, n, lower.tail, log.p)
 }
 qwilcox <- function(p, m, n, lower.tail = TRUE, log.p = FALSE)
 {
     on.exit(.External(C_wilcox_free))
-    .External(C_qwilcox, p, m, n, lower.tail, log.p)
+    .Call(C_qwilcox, p, m, n, lower.tail, log.p)
 }
-rwilcox <- function(nn, m, n) .External(C_rwilcox, nn, m, n)
+rwilcox <- function(nn, m, n) .Call(C_rwilcox, nn, m, n)
 
 dsignrank <- function(x, n, log = FALSE)
 {
     on.exit(.External(C_signrank_free))
-    .External(C_dsignrank, x, n, log)
+    .Call(C_dsignrank, x, n, log)
 }
 psignrank <- function(q, n, lower.tail = TRUE, log.p = FALSE)
 {
     on.exit(.External(C_signrank_free))
-    .External(C_psignrank, q, n, lower.tail, log.p)
+    .Call(C_psignrank, q, n, lower.tail, log.p)
 }
 qsignrank <- function(p, n, lower.tail = TRUE, log.p = FALSE)
 {
     on.exit(.External(C_signrank_free))
-    .External(C_qsignrank, p, n, lower.tail, log.p)
+    .Call(C_qsignrank, p, n, lower.tail, log.p)
 }
-rsignrank <- function(nn, n) .External(C_rsignrank, nn, n)
+rsignrank <- function(nn, n) .Call(C_rsignrank, nn, n)
 
 ##' Random sample from a Wishart distribution
 rWishart <- function(n, df, Sigma) .Call(C_rWishart, n, df, Sigma)
diff --git a/src/library/stats/R/dummy.coef.R b/src/library/stats/R/dummy.coef.R
index 209e06f..b0ef08c 100644
--- a/src/library/stats/R/dummy.coef.R
+++ b/src/library/stats/R/dummy.coef.R
@@ -1,8 +1,8 @@
 #  File src/library/stats/R/dummy.coef.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
 #  Copyright (C) 1998 B. D. Ripley
-#  Copyright (C) 1998-2013 The R Core Team
+#  Copyright (C) 1998-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
@@ -15,7 +15,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 dummy.coef <- function(object, ...) UseMethod("dummy.coef")
 
@@ -29,40 +29,47 @@ dummy.coef.lm <- function(object, use.na=FALSE, ...)
     int <- attr(Terms, "intercept")
     facs <- attr(Terms, "factors")[-1, , drop=FALSE]
     Terms <- delete.response(Terms)
-    vars <- all.vars(Terms) # e.g. drops I(.), ...
-    nxl <- setNames(rep.int(1, length(vars)), vars)
-    tmp <- vapply(xl, length, 1L)
-    nxl[names(tmp)] <- tmp
+    mf <- object$model
+    if (is.null(mf)) mf <- model.frame(object)
+    vars <- dimnames(facs)[[1]] # names
+    xtlv <- lapply(mf[,vars, drop=FALSE], levels) ## levels
+    nxl <- pmax(lengths(xtlv), 1L)  ## (named) number of levels
     lterms <- apply(facs, 2L, function(x) prod(nxl[x > 0]))
     nl <- sum(lterms)
-    args <- setNames(vector("list", length(vars)), vars)
-    for(i in vars)
-	args[[i]] <- if(nxl[[i]] == 1) rep.int(1, nl)
-	else factor(rep.int(xl[[i]][1L], nl), levels = xl[[i]])
-    dummy <- do.call("data.frame", args)
-    pos <- 0
+    ## dummy: data frame of vars
+    args <- sapply(vars, function(i)
+	if (nxl[i] == 1) rep.int(1, nl)
+	else factor(rep.int(xtlv[[i]][1L], nl), levels = xtlv[[i]]),
+	simplify=FALSE)
+    ## dummy <- as.data.frame(args) # slightly more efficiently:
+    dummy <- do.call(data.frame, args); names(dummy) <- vars
+    pos <- 0L
     rn <- rep.int(tl, lterms)
-    rnn <- rep.int("", nl)
+    rnn <- character(nl) # all "" --- will be names of rows
     for(j in tl) {
 	i <- vars[facs[, j] > 0]
 	ifac <- i[nxl[i] > 1]
+	lt.j <- lterms[[j]]
 	if(length(ifac) == 0L) {        # quantitative factor
-	    rnn[pos+1] <- j
-	} else if(length(ifac) == 1L) {	# main effect
-	    dummy[ pos+1L:lterms[j], ifac ] <- xl[[ifac]]
-	    rnn[ pos+1L:lterms[j] ] <- as.character(xl[[ifac]])
-	} else {			# interaction
-	    tmp <- expand.grid(xl[ifac])
-	    dummy[ pos+1L:lterms[j], ifac ] <- tmp
-	    rnn[ pos+1L:lterms[j] ] <-
-		apply(as.matrix(tmp), 1L, function(x) paste(x, collapse=":"))
+	    rnn[pos+1L] <- j
+	} else {
+	    p.j <- pos + seq_len(lt.j)
+	    if(length(ifac) == 1L) {	# main effect
+		dummy[p.j, ifac] <- x.i <- xtlv[[ifac]]
+		rnn[p.j] <- as.character(x.i)
+	    } else {			# interaction
+		tmp <- expand.grid(xtlv[ifac], KEEP.OUT.ATTRS=FALSE)
+		dummy[p.j, ifac] <- tmp
+		rnn[p.j] <- apply(as.matrix(tmp), 1L, paste, collapse = ":")
+	    }
 	}
-	pos <- pos + lterms[j]
+	pos <- pos + lt.j
     }
-    ## some terms like poly(x,1) will give problems here, so allow
-    ## NaNs and set to NA afterwards.
-    mf <- model.frame(Terms, dummy, na.action=function(x)x, xlev=xl)
-    mm <- model.matrix(Terms, mf, object$contrasts, xl)
+    attr(dummy,"terms") <- attr(mf,"terms")
+    lcontr <- object$contrasts
+    lci <- vapply(dummy, is.factor, NA)
+    lcontr <- lcontr[names(lci)[lci]] ## factors with 1 level have disappeared (?)
+    mm <- model.matrix(Terms, dummy, lcontr, xl)
     if(anyNA(mm)) {
         warning("some terms will have NAs due to the limits of the method")
         mm[is.na(mm)] <- NA
@@ -71,115 +78,214 @@ dummy.coef.lm <- function(object, use.na=FALSE, ...)
     if(!use.na) coef[is.na(coef)] <- 0
     asgn <- attr(mm,"assign")
     res <- setNames(vector("list", length(tl)), tl)
-    for(j in seq_along(tl)) {
-	keep <- asgn == j
-	ij <- rn == tl[j]
-	res[[j]] <-
-	    setNames(drop(mm[ij, keep, drop=FALSE] %*% coef[keep]), rnn[ij])
-    }
-    if(int > 0) {
-	res <- c(list("(Intercept)" = coef[int]), res)
+    if(isM <- is.matrix(coef)) { # isM is true for "mlm", multivariate lm (incl manova)
+	for(j in seq_along(tl)) {
+	    keep <- which(asgn == j)
+	    cf <- coef[keep, , drop=FALSE]
+	    ij <- rn == tl[j]
+	    cf <-
+		if (any(na <- is.na(cf))) {
+		    if(ncol(cf) >= 2)
+			stop("multivariate case with missing coefficients is not yet implemented")
+		    ## else: 1 column --> treat 'cf' as vector
+		    rj <- t( mm[ij, keep[!na], drop=FALSE] %*% cf[!na])
+		    rj[apply(mm[ij, keep[ na], drop=FALSE] != 0, 1L, any)] <- NA
+		    rj
+		} else
+		    t(mm[ij, keep, drop = FALSE] %*% cf)
+	    dimnames(cf) <- list(colnames(coef), rnn[ij])
+	    res[[j]] <- cf
+	}
+    } else { ## regular univariate lm case
+	for(j in seq_along(tl)) {
+	    keep <- which(asgn == j)
+	    cf <- coef[keep]
+	    ij <- rn == tl[j]
+	    res[[j]] <-
+		if (any(na <- is.na(cf))) {
+		    rj <- setNames(drop(mm[ij, keep[!na], drop = FALSE] %*%
+					cf[!na]), rnn[ij])
+		    rj[apply(mm[ij, keep[na], drop=FALSE] != 0, 1L, any)] <- NA
+		    rj
+		} else
+		    setNames(drop(mm[ij, keep, drop = FALSE] %*% cf), rnn[ij])
+	}
     }
-    class(res) <- "dummy_coef"
-    res
+    if(int > 0)
+	res <- c(list("(Intercept)" = if(isM) coef[int, ] else coef[int]), res)
+    structure(res, class = "dummy_coef",  matrix = isM)
 }
 
+## NB: This is very much duplication from dummy.coef.lm -- keep in sync !
 dummy.coef.aovlist <- function(object, use.na = FALSE, ...)
 {
+    xl <- attr(object, "xlevels")
+    if(!length(xl)) # no factors in model
+	return(as.list(coef(object)))
     Terms <- terms(object, specials="Error")
     err <- attr(Terms,"specials")$Error - 1
     tl <- attr(Terms, "term.labels")[-err]
     int <- attr(Terms, "intercept")
     facs <- attr(Terms, "factors")[-c(1,1+err), -err, drop=FALSE]
-    vars <- rownames(facs)
-    xl <- attr(object, "xlevels")
-    if(!length(xl)) {			# no factors in model
-	return(as.list(coef(object)))
-    }
-    nxl <- setNames(rep.int(1, length(vars)), vars)
-    tmp <- unlist(lapply(xl, length))
-    nxl[names(tmp)] <- tmp
+    stopifnot(length(names(object)) == (N <- length(object)))
+    mf <- object$model
+    if (is.null(mf)) mf <- model.frame(object)
+    vars <- dimnames(facs)[[1]] # names
+    xtlv <- lapply(mf[,vars, drop=FALSE], levels) ## levels
+    nxl <- pmax(lengths(xtlv), 1L)  ## (named) number of levels
     lterms <- apply(facs, 2L, function(x) prod(nxl[x > 0]))
     nl <- sum(lterms)
     args <- setNames(vector("list", length(vars)), vars)
     for(i in vars)
 	args[[i]] <- if(nxl[[i]] == 1) rep.int(1, nl)
-	else factor(rep.int(xl[[i]][1L], nl), levels = xl[[i]])
-    dummy <- do.call("data.frame", args)
-    pos <- 0
+                     else factor(rep.int(xl[[i]][1L], nl), levels = xl[[i]])
+    ## dummy <- as.data.frame(args) # slightly more efficiently:
+    dummy <- do.call(data.frame, args); names(dummy) <- vars
+    pos <- 0L
     rn <- rep.int(tl, lterms)
-    rnn <- rep.int("", nl)
+    rnn <- character(nl) # all "" --- will be names of rows
     for(j in tl) {
 	i <- vars[facs[, j] > 0]
 	ifac <- i[nxl[i] > 1]
+	lt.j <- lterms[[j]]
 	if(length(ifac) == 0L) {        # quantitative factor
-	    rnn[pos + 1] <- j
-	} else if(length(ifac) == 1L) {	# main effect
-	    dummy[ pos+1L:lterms[j], ifac ] <- xl[[ifac]]
-	    rnn[ pos+1L:lterms[j] ] <- as.character(xl[[ifac]])
-	} else {			# interaction
-	    tmp <- expand.grid(xl[ifac])
-	    dummy[ pos+1L:lterms[j], ifac ] <- tmp
-	    rnn[ pos+1L:lterms[j] ] <-
-		apply(as.matrix(tmp), 1L, function(x) paste(x, collapse=":"))
-	}
-	pos <- pos + lterms[j]
+	    rnn[pos+1L] <- j
+	} else {
+	    p.j <- pos + seq_len(lt.j)
+	    if(length(ifac) == 1L) {	# main effect
+		dummy[p.j, ifac] <- x.i <- xtlv[[ifac]]
+		rnn[p.j] <- as.character(x.i)
+	    } else {			# interaction
+		tmp <- expand.grid(xtlv[ifac], KEEP.OUT.ATTRS=FALSE)
+		dummy[p.j, ifac] <- tmp
+		rnn[p.j] <- apply(as.matrix(tmp), 1L, paste, collapse = ":")
+	    }
+        }
+	pos <- pos + lt.j
     }
-    form <- paste("~", paste(tl, collapse = " + "))
-    if (!int) form <- paste(form, "- 1")
-    mm <- model.matrix(terms(formula(form)), dummy,
-		       attr(object, "contrasts"), xl)
+    form <- paste0("~", paste0(tl, collapse = " + "), if(!int) "- 1")
+    lcontr <- object$contrasts
+    lci <- vapply(dummy, is.factor, NA)
+    lcontr <- lcontr[names(lci)[lci]] ## factors with 1 level have disappeared
+    mm <- model.matrix(terms(formula(form)), dummy, lcontr, xl)
     tl <- c("(Intercept)", tl)
-    res <- setNames(vector("list", length(object)), names(object))
+    res <- setNames(vector("list", N), names(object))
     allasgn <- attr(mm, "assign")
     for(i in names(object)) {
 	coef <- object[[i]]$coefficients
 	if(!use.na) coef[is.na(coef)] <- 0
 	asgn <- object[[i]]$assign
 	uasgn <- unique(asgn)
-	tll <- tl[1 + uasgn]
+	tll <- tl[1L + uasgn]
 	mod <- setNames(vector("list", length(tll)), tll)
-	for(j in uasgn) {
-	    mod[[tl[1+j]]] <-
-		if(j == 0) {
-		    structure(coef[asgn == j], names="(Intercept)")
-		} else {
-		    ij <- rn == tl[1+j]
-		    setNames(drop(mm[ij, allasgn == j, drop=FALSE] %*%
-				  coef[asgn == j]),
-			     rnn[ij])
-		}
+### FIXME --- npk.aovE --- fails : "N"  gets  length 0 !!!!
+	if((isM <- is.matrix(coef))) { # "mlm", multivariate lm (incl manova)
+	    for(j in uasgn) {
+		keep <- which(asgn == j)
+		cf <- coef[keep, , drop=FALSE]
+		ij <- rn == tl[j]
+		cf <-
+		    if (any(na <- is.na(cf))) {
+			if(ncol(cf) >= 2)
+			    stop("multivariate case with missing coefficients is not yet implemented")
+			if(j == 0) {
+			    structure(cf[!na], names="(Intercept)")
+			} else {
+			    ## else: 1 column --> treat 'cf' as vector
+			    rj <- t( mm[ij, keep[!na], drop=FALSE] %*% cf[!na])
+			    rj[apply(mm[ij, keep[ na], drop=FALSE] != 0, 1L, any)] <- NA
+			    rj
+			}
+		    } else { # no NA's
+			if(j == 0)
+			    structure(cf, names="(Intercept)")
+			else
+			    t(mm[ij, keep, drop=FALSE] %*% cf)
+		    }
+		dimnames(cf) <- list(colnames(coef), rnn[ij])
+		mod[[tl[j+1L]]] <- cf
+	    }
+	} else { ## regular univariate lm case
+	    for(j in uasgn) {
+		keep <- which(asgn == j)
+		cf <- coef[keep]
+		mod[[tl[j+1L]]] <-
+		    if(j == 0) {
+			structure(cf, names="(Intercept)")
+		    } else {
+			ij <- rn == tl[j+1L]
+			if (any(na <- is.na(cf))) {
+			    rj <- setNames(drop(mm[ij, keep[!na], drop = FALSE] %*%
+						cf[!na]), rnn[ij])
+			    rj[apply(mm[ij, keep[na], drop=FALSE] != 0, 1L, any)] <- NA
+			    rj
+			} else
+			    setNames(drop(mm[ij, allasgn == j, drop=FALSE] %*% cf),
+				     rnn[ij])
+		    }
+	    }
 	}
-	res[[i]] <- mod
-    }
-    class(res) <- "dummy_coef_list"
-    res
+	res[[i]] <- structure(mod, matrix = isM)
+    } ## for( i )
+
+    structure(res, class = "dummy_coef_list")
 }
 
 print.dummy_coef <- function(x, ..., title)
 {
     terms <- names(x)
     n <- length(x)
-    nm <- max(vapply(x, length, 1L))
-    ans <- matrix("", 2L*n, nm)
-    rn <- rep.int("", 2L*n)
-    line <- 0
-    for (j in seq_len(n)) {
-	this <- x[[j]]
-	n1 <- length(this)
-	if(n1 > 1) {
-	    line <- line + 2
-	    ans[line-1, 1L:n1] <- names(this)
-	    ans[line, 1L:n1] <- format(this, ...)
-	    rn[line-1] <- paste0(terms[j], ":   ")
-	} else {
-	    line <- line + 1
-	    ans[line, 1L:n1] <- format(this, ...)
-	    rn[line] <- paste0(terms[j], ":   ")
+    isM <- attr(x, "matrix")
+    nr.x <- if(isM) vapply(x, NROW, 1L) else lengths(x)
+    line <- 0L # 'lineEnd'
+    if(isM) { # "mlm" - multivariate case
+	ansnrow <- sum(1L + nr.x)
+	addcol <- max(nr.x) - 1L
+	nm <- addcol + if(isM) max(vapply(x, NCOL, 1L)) else 1L
+	ans <- matrix("", ansnrow , nm)
+	rn <- character(ansnrow)
+	for (j in seq_len(n)) {
+	    this <- as.matrix(x[[j]])
+	    nr1 <- nrow(this)
+	    nc1 <- ncol(this)
+	    dn <- dimnames(this)
+	    dimnames(this) <-
+		list(if(is.null(dn[[1]])) character(nr1) else dn[[1]],
+		     if(is.null(dn[[2]])) character(nc1) else dn[[2]])
+	    if(nc1 > 1L) {
+		lin0 <- line + 2L
+		line <- line + nr1 + 1L
+		ans[lin0 - 1L, addcol + (1L:nc1)] <- colnames(this)
+		ans[lin0:line, addcol + (1L:nc1)] <- format(this, ...)
+		rn[lin0 - 1L] <- paste0(terms[j], ":   ")
+	    } else {
+		lin0 <- line + 1L
+		line <- line + nr1
+		ans[lin0:line, addcol + 1L] <- format(this, ...)
+		rn[lin0] <- paste0(terms[j], ":   ")
+	    }
+	    if(addcol > 0) ans[lin0:line, addcol] <- rownames(this)
+	}
+    } else { ## regular univariate lm case
+	nm <- max(nr.x)
+	ans <- matrix("", 2L*n, nm)
+	rn <- character(2L*n) # ""
+	for (j in seq_len(n)) {
+	    this <- x[[j]]
+	    n1 <- length(this)
+	    if(n1 > 1) {
+		line <- line + 2L
+		ans[line-1L, 1L:n1] <- names(this)
+		ans[line,    1L:n1] <- format(this, ...)
+		rn [line-1L] <- paste0(terms[j], ":   ")
+	    } else {
+		line <- line + 1L
+		ans[line, 1L:n1] <- format(this, ...)
+		rn[line] <- paste0(terms[j], ":   ")
+	    }
 	}
     }
-    rownames(ans) <- rn
-    colnames(ans) <- rep.int("", nm)
+    dimnames(ans) <- list(rn, character(nm))
     cat(if(missing(title)) "Full coefficients are" else title, "\n")
     print(ans[1L:line, , drop=FALSE], quote=FALSE, right=TRUE)
     invisible(x)
diff --git a/src/library/stats/R/ecdf.R b/src/library/stats/R/ecdf.R
index 7443e2f..5c09e95 100644
--- a/src/library/stats/R/ecdf.R
+++ b/src/library/stats/R/ecdf.R
@@ -1,7 +1,7 @@
 #  File src/library/stats/R/ecdf.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
-#  Copyright (C) 1995-2012 The R Core Team
+#  Copyright (C) 1995-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
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 #### Empirical Cumulative Distribution Functions :  "ecdf"
 ##--  inherit from  "stepfun"
@@ -60,7 +60,7 @@ summary.ecdf <- function(object, ...)
 print.summary.ecdf <- function(x, ...)
 {
     cat(attr(x, "header"))
-    y <- unclass(x); attr(y, "header") <- NULL
+    y <- x; attr(y, "header") <- NULL; class(y) <- "summaryDefault"
     print(y, ...)
     invisible(x)
 }
diff --git a/src/library/stats/R/embed.R b/src/library/stats/R/embed.R
index 5d89735..7d2cc81 100644
--- a/src/library/stats/R/embed.R
+++ b/src/library/stats/R/embed.R
@@ -1,5 +1,5 @@
 #  File src/library/stats/R/embed.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
 # Copyright (C) 1997-1999  Adrian Trapletti
 #
@@ -17,7 +17,7 @@
 #
 # You should have received a copy of the GNU General Public License
 # along with this program; if not, a copy is available at
-# http://www.r-project.org/Licenses/
+# https://www.R-project.org/Licenses/
 
 embed <- function (x, dimension = 1)
 {
diff --git a/src/library/stats/R/expand.model.frame.R b/src/library/stats/R/expand.model.frame.R
index 3238a46..3215abb 100644
--- a/src/library/stats/R/expand.model.frame.R
+++ b/src/library/stats/R/expand.model.frame.R
@@ -1,5 +1,5 @@
 #  File src/library/stats/R/expand.model.frame.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
 #  Copyright (C) 1995-2012 The R Core Team
 #
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 expand.model.frame <- function(model, extras,
                                envir=environment(formula(model)),
diff --git a/src/library/stats/R/factanal.R b/src/library/stats/R/factanal.R
index 2f905aa..ac7f160 100644
--- a/src/library/stats/R/factanal.R
+++ b/src/library/stats/R/factanal.R
@@ -1,7 +1,7 @@
 #  File src/library/stats/R/factanal.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
-#  Copyright (C) 1995-2013 The R Core Team
+#  Copyright (C) 1995-2015 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
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 ## Hmm, MM thinks diag(.) needs checking { diag(vec) when length(vec)==1 !}
 ## However, MM does not understand that factor analysis
@@ -69,6 +69,7 @@ factanal <-
             names(mf)[names(mf) == "x"] <- "formula"
             mf$factors <- mf$covmat <- mf$scores <- mf$start <-
                 mf$rotation <- mf$control <- mf$... <- NULL
+            ## need stats:: for non-standard evaluation
             mf[[1L]] <- quote(stats::model.frame)
             mf <- eval.parent(mf)
             na.act <- attr(mf, "na.action")
@@ -249,7 +250,7 @@ print.loadings <- function(x, digits = 3L, cutoff = 0.1, sort = FALSE, ...)
     cat("\nLoadings:\n")
     fx <- setNames(format(round(Lambda, digits)), NULL)
     nc <- nchar(fx[1L], type="c")
-    fx[abs(Lambda) < cutoff] <- paste(rep(" ", nc), collapse = "")
+    fx[abs(Lambda) < cutoff] <- strrep(" ", nc)
     print(fx, quote = FALSE, ...)
     vx <- colSums(x^2)
     varex <- rbind("SS loadings" = vx)
diff --git a/src/library/stats/R/family.R b/src/library/stats/R/family.R
index 78ed12f..cf545d7 100644
--- a/src/library/stats/R/family.R
+++ b/src/library/stats/R/family.R
@@ -1,5 +1,5 @@
 #  File src/library/stats/R/family.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
 #  Copyright (C) 1995-2012 The R Core Team
 #
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 family <- function(object, ...) UseMethod("family")
 
@@ -532,9 +532,8 @@ inverse.gaussian <- function(link = "1/mu^2")
     })
     validmu <- function(mu) TRUE
     simfun <- function(object, nsim) {
-        if(is.null(tryCatch(loadNamespace("SuppDists"),
-                            error = function(e) NULL)))
-            stop("need CRAN package 'SuppDists' for the 'inverse.gaussian' family")
+        if(!requireNamespace("SuppDists", quietly = TRUE))
+            stop("need CRAN package 'SuppDists' for simulation from the 'inverse.gaussian' family")
         wts <- object$prior.weights
         if (any(wts != 1)) message("using weights as inverse variances")
         ftd <- fitted(object)
diff --git a/src/library/stats/R/fft.R b/src/library/stats/R/fft.R
index 7179a35..4254209 100644
--- a/src/library/stats/R/fft.R
+++ b/src/library/stats/R/fft.R
@@ -1,5 +1,5 @@
 #  File src/library/stats/R/fft.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
 #  Copyright (C) 1995-2012 The R Core Team
 #
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 fft <- function(z, inverse=FALSE) .Call(C_fft, z, inverse)
 
diff --git a/src/library/stats/R/filter.R b/src/library/stats/R/filter.R
index 8a23f4f..7c5dc88 100644
--- a/src/library/stats/R/filter.R
+++ b/src/library/stats/R/filter.R
@@ -1,7 +1,7 @@
 #  File src/library/stats/R/filter.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
-#  Copyright (C) 1999-2013 The R Core Team
+#  Copyright (C) 1999-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
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 filter <- function(x, filter, method = c("convolution", "recursive"),
                    sides = 2L, circular = FALSE, init=NULL)
@@ -24,11 +24,12 @@ filter <- function(x, filter, method = c("convolution", "recursive"),
     storage.mode(x) <- "double"
     xtsp <- tsp(x)
     n <- as.integer(NROW(x))
-    if (is.na(n)) stop("invalid value of nrow(x)", domain = NA)
+    if (is.na(n)) stop(gettextf("invalid value of %s", "NROW(x)"), domain = NA)
     nser <- NCOL(x)
     filter <- as.double(filter)
     nfilt <- as.integer(length(filter))
-    if (is.na(n)) stop("invalid value of length(filter)", domain = NA)
+    if (is.na(nfilt)) stop(gettextf("invalid value of %s", "length(filter)"),
+                           domain = NA)
     if(anyNA(filter)) stop("missing values in 'filter'")
 
     if(method == "convolution") {
@@ -52,10 +53,11 @@ filter <- function(x, filter, method = c("convolution", "recursive"),
             if(ni != nfilt)
                 stop("length of 'init' must equal length of 'filter'")
             if(NCOL(init) != 1L && NCOL(init) != nser) {
-                ## Need to do it this way for languages without plurals.
-                if(nser == 1L) stop("'init' must have 1 column")
-                else stop(gettextf("'init' must have 1 or %d columns", nser),
-                          domain = NA)
+                stop(sprintf(ngettext(nser,
+                                      "'init' must have %d column",
+                                      "'init' must have 1 or %d columns",
+                                      domain = "R-stats"),
+                             nser), domain = NA)
             }
             if(!is.matrix(init)) dim(init) <- c(nfilt, nser)
         }
diff --git a/src/library/stats/R/fisher.test.R b/src/library/stats/R/fisher.test.R
index 52a9972..f1aaafe 100644
--- a/src/library/stats/R/fisher.test.R
+++ b/src/library/stats/R/fisher.test.R
@@ -1,5 +1,5 @@
 #  File src/library/stats/R/fisher.test.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
 #  Copyright (C) 1995-2013 The R Core Team
 #
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 fisher.test <-
 function(x, y = NULL, workspace = 200000, hybrid = FALSE,
diff --git a/src/library/stats/R/fivenum.R b/src/library/stats/R/fivenum.R
index 4f4f32e..a6641d4 100644
--- a/src/library/stats/R/fivenum.R
+++ b/src/library/stats/R/fivenum.R
@@ -1,5 +1,5 @@
 #  File src/library/stats/R/fivenum.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
 #  Copyright (C) 1995-2012 The R Core Team
 #
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 fivenum <- function(x, na.rm=TRUE)
 {
diff --git a/src/library/stats/R/fligner.test.R b/src/library/stats/R/fligner.test.R
index 70e04e9..e69abd0 100644
--- a/src/library/stats/R/fligner.test.R
+++ b/src/library/stats/R/fligner.test.R
@@ -1,7 +1,7 @@
 #  File src/library/stats/R/fligner.test.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
-#  Copyright (C) 1995-2013 The R Core Team
+#  Copyright (C) 1995-2014 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
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 fligner.test <- function(x, ...) UseMethod("fligner.test")
 
diff --git a/src/library/stats/R/friedman.test.R b/src/library/stats/R/friedman.test.R
index a85dc35..841f254 100644
--- a/src/library/stats/R/friedman.test.R
+++ b/src/library/stats/R/friedman.test.R
@@ -1,7 +1,7 @@
 #  File src/library/stats/R/friedman.test.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
-#  Copyright (C) 1995-2013 The R Core Team
+#  Copyright (C) 1995-2015 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
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 friedman.test <- function(y, ...) UseMethod("friedman.test")
 
@@ -46,11 +46,13 @@ function(y, groups, blocks, ...)
     }
 
     k <- nlevels(groups)
-    y <- matrix(unlist(split(y, blocks)), ncol = k, byrow = TRUE)
+    ## <FIXME split.matrix>
+    y <- matrix(unlist(split(c(y), blocks)), ncol = k, byrow = TRUE)
     y <- y[complete.cases(y), ]
     n <- nrow(y)
     r <- t(apply(y, 1L, rank))
-    TIES <- tapply(r, row(r), table)
+    ## <FIXME split.matrix>
+    TIES <- tapply(c(r), row(r), table)
     STATISTIC <- ((12 * sum((colSums(r) - n * (k + 1) / 2)^2)) /
                   (n * k * (k + 1)
                    - (sum(unlist(lapply(TIES, function (u) {u^3 - u}))) /
@@ -88,6 +90,7 @@ function(formula, data, subset, na.action, ...)
     m$formula <- formula
     if(is.matrix(eval(m$data, parent.frame())))
         m$data <- as.data.frame(data)
+    ## need stats:: for non-standard evaluation
     m[[1L]] <- quote(stats::model.frame)
     mf <- eval(m, parent.frame())
     DNAME <- paste(names(mf), collapse = " and ")
diff --git a/src/library/stats/R/ftable.R b/src/library/stats/R/ftable.R
index 48e3bc1..88a6766 100644
--- a/src/library/stats/R/ftable.R
+++ b/src/library/stats/R/ftable.R
@@ -1,7 +1,7 @@
 #  File src/library/stats/R/ftable.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
-#  Copyright (C) 1995-2013 The R Core Team
+#  Copyright (C) 1995-2015 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
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 ftable <- function(x, ...) UseMethod("ftable")
 
@@ -160,8 +160,8 @@ as.table.ftable <- function(x, ...)
     xrv <- rev(attr(x, "row.vars"))
     xcv <- rev(attr(x, "col.vars"))
     x <- array(data = c(x),
-               dim = c(sapply(xrv, length),
-                       sapply(xcv, length)),
+               dim = c(lengths(xrv),
+                       lengths(xcv)),
                dimnames = c(xrv, xcv))
     nrv <- length(xrv)
     ncv <- length(xcv)
@@ -179,7 +179,7 @@ format.ftable <-
 	stop("'x' must be an \"ftable\" object")
     charQuote <- function(s) if(quote && length(s)) paste0("\"", s, "\"") else s
     makeLabels <- function(lst) {
-	lens <- sapply(lst, length)
+	lens <- lengths(lst)
 	cplensU <- c(1, cumprod(lens))
 	cplensD <- rev(c(1, cumprod(rev(lens))))
 	y <- NULL
@@ -288,7 +288,7 @@ read.ftable <- function(file, sep = "", quote = "\"", row.var.names,
         on.exit({close(file);unlink(tmpf)}, add=TRUE)
     }
 
-    z <- utils::count.fields(file, sep, quote, skip)
+    z <- count.fields(file, sep, quote, skip)
     n.row.vars <- z[max(which(z == max(z)))] - z[length(z)] + 1
 
     seek(file, where = 0)
@@ -364,12 +364,12 @@ read.ftable <- function(file, sep = "", quote = "\"", row.var.names,
             n.col.vars <- length(col.vars)
             if(is.null(names(col.vars)))
                 names(col.vars) <-
-                    paste("Factor", seq_along(col.vars), sep = ".")
+                    paste0("Factor.", seq_along(col.vars))
             else {
                 nam <- names(col.vars)
                 ind <- which(!nzchar(nam))
                 names(col.vars)[ind] <-
-                    paste("Factor", ind, sep = ".")
+                    paste0("Factor.", ind)
             }
         }
     }
@@ -393,8 +393,8 @@ read.ftable <- function(file, sep = "", quote = "\"", row.var.names,
         len <- length(tmp)
     }
     values <- matrix(values,
-                     nrow = prod(sapply(row.vars, length)),
-                     ncol = prod(sapply(col.vars, length)),
+                     nrow = prod(lengths(row.vars)),
+                     ncol = prod(lengths(col.vars)),
                      byrow = TRUE)
     structure(values,
               row.vars = row.vars,
@@ -414,7 +414,7 @@ function(x, sep = "_", ...)
 
     make_dimnames <- function(vars) {
         structure(list(do.call(paste,
-                               c(rev(expand.grid(rev(vars))), 
+                               c(rev(expand.grid(rev(vars))),
                                  list(sep=sep)))),
                   names = paste(collapse=sep, names(vars)))
     }
@@ -424,4 +424,4 @@ function(x, sep = "_", ...)
                            make_dimnames(attr(x, "col.vars"))),
               row.vars = NULL,
               col.vars = NULL)
-}    
+}
diff --git a/src/library/stats/R/glm.R b/src/library/stats/R/glm.R
index c0cc874..261b045 100644
--- a/src/library/stats/R/glm.R
+++ b/src/library/stats/R/glm.R
@@ -1,7 +1,7 @@
 #  File src/library/stats/R/glm.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
-#  Copyright (C) 1995-2013 The R Core Team
+#  Copyright (C) 1995-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
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 utils::globalVariables("n", add = TRUE)
 
@@ -48,6 +48,7 @@ glm <- function(formula, family = gaussian, data, weights,
                  "etastart", "mustart", "offset"), names(mf), 0L)
     mf <- mf[c(1L, m)]
     mf$drop.unused.levels <- TRUE
+    ## need stats:: for non-standard evaluation
     mf[[1L]] <- quote(stats::model.frame)
     mf <- eval(mf, parent.frame())
     if(identical(method, "model.frame")) return(mf)
@@ -189,7 +190,7 @@ glm.fit <-
         if (!validmu(mu))
             stop("invalid fitted means in empty model", call. = FALSE)
         dev <- sum(dev.resids(y, mu, weights))
-        w <- ((weights * mu.eta(eta)^2)/variance(mu))^0.5
+        w <- sqrt((weights * mu.eta(eta)^2)/variance(mu))
         residuals <- (y - mu)/mu.eta(eta)
         good <- rep_len(TRUE, length(residuals))
         boundary <- conv <- TRUE
@@ -237,7 +238,6 @@ glm.fit <-
             }
             z <- (eta - offset)[good] + (y - mu)[good]/mu.eta.val[good]
             w <- sqrt((weights[good] * mu.eta.val[good]^2)/variance(mu)[good])
-            ngoodobs <- as.integer(nobs - sum(!good))
             ## call Fortran code via C wrapper
             fit <- .Call(C_Cdqrls, x[good, , drop = FALSE] * w, z * w,
                          min(1e-7, control$epsilon/1000), check=FALSE)
@@ -851,9 +851,9 @@ model.frame.glm <- function (formula, ...)
     if (length(nargs) || is.null(formula$model)) {
 	fcall <- formula$call
 	fcall$method <- "model.frame"
+        ## need stats:: for non-standard evaluation
 	fcall[[1L]] <- quote(stats::glm)
         fcall[names(nargs)] <- nargs
-#	env <- environment(fcall$formula)  # always NULL
         env <- environment(formula$terms)
 	if (is.null(env)) env <- parent.frame()
 	eval(fcall, env)
diff --git a/src/library/stats/R/hclust.R b/src/library/stats/R/hclust.R
index 91eceeb..e8f9449 100644
--- a/src/library/stats/R/hclust.R
+++ b/src/library/stats/R/hclust.R
@@ -1,7 +1,7 @@
 #  File src/library/stats/R/hclust.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
-#  Copyright (C) 1995-2014 The R Core Team
+#  Copyright (C) 1995-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
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 ## Hierarchical clustering, on raw input data; we will use Euclidean
 ## distance.  A range of criteria are supported; also there is a
@@ -112,6 +112,28 @@ hclust <- function(d, method="complete", members=NULL)
 	      class = "hclust")
 }
 
+##' @title Check hclust() object for validity
+##' @param x "hclust" object
+##' @param merge (= x$merge, passing it may save memory)
+##' @param order logical indicating if 'x$order' should be checked, too
+##' @return character vector with message or TRUE
+##' @author Martin Maechler
+.validity.hclust <- function(x, merge = x$merge, order = TRUE) {
+    if (!is.matrix(merge) || ncol(merge) != 2)
+	return("invalid dendrogram")
+    ## merge should be integer but might not be after dump/restore.
+    if (any(as.integer(merge) != merge))
+	return("'merge' component in dendrogram must be integer")
+    n1 <- nrow(merge) # == #{obs} - 1
+    n <- n1+1L
+    if(length(x$height) != n1) return("'height' is of wrong length")
+    if(order && length(x$order ) != n ) return("'order' is of wrong length")
+    if(identical(sort(as.integer(merge)), c(-(n:1L), +seq_len(n-2L))))
+	TRUE
+    else
+	"'merge' matrix has invalid contents"
+}
+
 plot.hclust <-
     function (x, labels = NULL, hang = 0.1, check = TRUE,
               axes = TRUE, frame.plot = FALSE, ann = TRUE,
@@ -119,23 +141,12 @@ plot.hclust <-
               sub = NULL, xlab = NULL, ylab = "Height", ...)
 {
     merge <- x$merge
-    if(check) {
-        if (!is.matrix(merge) || ncol(merge) != 2)
-            stop("invalid dendrogram")
-        ## merge should be integer but might not be after dump/restore.
-        if (any(as.integer(merge) != merge))
-            stop("'merge' component in dendrogram must be integer")
-    }
+    if(check && !isTRUE(msg <- .validity.hclust(x,merge)))
+	stop(msg)
     storage.mode(merge) <- "integer"
     n1 <- nrow(merge) # == #{obs} - 1
     n <- n1+1L
     height <- as.double(x$height)
-    if(check) {
-	stopifnot(length(x$order) == n,
-		  length( height) == n1)
-	if(!identical(sort(merge), c(-(n:1L), +seq_len(n-2))))
-	       stop("'merge' matrix has invalid contents")
-    }
     labels <-
 	if(missing(labels) || is.null(labels)) {
 	    as.character(if(is.null(x$labels)) seq_len(n) else x$labels)
@@ -252,7 +263,7 @@ function(x)
     lens <- sapply(children, attr, "Size")
     m <- matrix(attr(x, "height"), sum(lens), sum(lens))
     ## This seems a bit slower:
-    ##    inds <- split(seq(length = sum(lens)),
+    ##    inds <- split(seq(length.out = sum(lens)),
     ##                  rep.int(seq_along(lens), lens))
     ##    for(i in seq_along(inds))
     ##         m[inds[[i]], inds[[i]]] <- as.matrix(children[[i]])
diff --git a/src/library/stats/R/htest.R b/src/library/stats/R/htest.R
index 08cb82d..f649581 100644
--- a/src/library/stats/R/htest.R
+++ b/src/library/stats/R/htest.R
@@ -1,7 +1,7 @@
 #  File src/library/stats/R/htest.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
-#  Copyright (C) 1995-2012 The R Core Team
+#  Copyright (C) 1995-2015 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
@@ -14,23 +14,23 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
-print.htest <- function(x, digits = 4L, quote = TRUE, prefix = "", ...)
+print.htest <- function(x, digits = getOption("digits"), prefix = "\t", ...)
 {
     cat("\n")
-    cat(strwrap(x$method, prefix = "\t"), sep = "\n")
+    cat(strwrap(x$method, prefix = prefix), sep = "\n")
     cat("\n")
     cat("data:  ", x$data.name, "\n", sep = "")
     out <- character()
     if(!is.null(x$statistic))
 	out <- c(out, paste(names(x$statistic), "=",
-			    format(round(x$statistic, 4))))
+			    format(signif(x$statistic, max(1L, digits - 2L)))))
     if(!is.null(x$parameter))
 	out <- c(out, paste(names(x$parameter), "=",
-			    format(round(x$parameter, 3))))
+			    format(signif(x$parameter, max(1L, digits - 2L)))))
     if(!is.null(x$p.value)) {
-	fp <- format.pval(x$p.value, digits = digits)
+	fp <- format.pval(x$p.value, digits = max(1L, digits - 3L))
 	out <- c(out, paste("p-value",
 			    if(substr(fp, 1L, 1L) == "<") fp else paste("=",fp)))
     }
@@ -49,7 +49,7 @@ print.htest <- function(x, digits = 4L, quote = TRUE, prefix = "", ...)
 	    }
 	    else {
 		cat(x$alternative, "\nnull values:\n", sep = "")
-		print(x$null.value, ...)
+		print(x$null.value, digits=digits, ...)
 	    }
 	}
 	else cat(x$alternative, "\n", sep = "")
@@ -62,7 +62,7 @@ print.htest <- function(x, digits = 4L, quote = TRUE, prefix = "", ...)
     }
     if(!is.null(x$estimate)) {
 	cat("sample estimates:\n")
-	print(x$estimate, ...)
+	print(x$estimate, digits=digits, ...)
     }
     cat("\n")
     invisible(x)
diff --git a/src/library/stats/R/identify.hclust.R b/src/library/stats/R/identify.hclust.R
index 03b274e..0093ca4 100644
--- a/src/library/stats/R/identify.hclust.R
+++ b/src/library/stats/R/identify.hclust.R
@@ -1,5 +1,5 @@
 #  File src/library/stats/R/identify.hclust.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
 #  Copyright (C) 1995-2012 The R Core Team
 #
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 rect.hclust <- function(tree, k=NULL, which=NULL,
                         x=NULL, h=NULL, border=2, cluster=NULL)
@@ -78,11 +78,11 @@ identify.hclust <- function(x, FUN = NULL, N = 20, MAXCLUSTER = 20,
     retval <- list()
     oldk <- NULL
     oldx <- NULL
-    DEV.x <- grDevices::dev.cur()
+    DEV.x <- dev.cur()
 
     for(n in 1L:N){
 
-        grDevices::dev.set(DEV.x)
+        dev.set(DEV.x)
         X <- locator(1)
         if(is.null(X))
             break
@@ -98,7 +98,7 @@ identify.hclust <- function(x, FUN = NULL, N = 20, MAXCLUSTER = 20,
                                           border = "red"))
         if(!is.null(FUN)){
             if(!is.null(DEV.FUN)){
-                grDevices::dev.set(DEV.FUN)
+                dev.set(DEV.FUN)
             }
             retval[[n]] <- FUN(retval[[n]], ...)
         }
@@ -106,6 +106,6 @@ identify.hclust <- function(x, FUN = NULL, N = 20, MAXCLUSTER = 20,
         oldx <- X$x
         oldk <- k
     }
-    grDevices::dev.set(DEV.x)
+    dev.set(DEV.x)
     invisible(retval)
 }
diff --git a/src/library/stats/R/integrate.R b/src/library/stats/R/integrate.R
index e232055..5d9af20 100644
--- a/src/library/stats/R/integrate.R
+++ b/src/library/stats/R/integrate.R
@@ -1,7 +1,7 @@
 #  File src/library/stats/R/integrate.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
-#  Copyright (C) 1995-2012 The R Core Team
+#  Copyright (C) 1995-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
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 integrate <- function(f, lower, upper, ..., subdivisions = 100L,
                       rel.tol = .Machine$double.eps^.25,
@@ -34,20 +34,20 @@ integrate <- function(f, lower, upper, ..., subdivisions = 100L,
 			as.double(abs.tol), as.double(rel.tol),
 			limit = limit)
     } else { # indefinite integral
-	if(is.na(lower) || is.na(upper)) stop("a limit is missing")
+	if(anyNA(lower) || anyNA(upper)) stop("a limit is NA or NaN")
 	if (is.finite(lower)) {
-	    inf <- 1
+	    inf <- 1L
 	    bound <- lower
 	} else if (is.finite(upper)) {
-	    inf <- -1
+	    inf <- -1L
 	    bound <- upper
 	} else {
-	    inf <- 2
+	    inf <- 2L
 	    bound <- 0.0
 	}
 	wk <- .External(C_call_dqagi,
 			ff, rho = environment(),
-			as.double(bound), as.integer(inf),
+			as.double(bound), inf,
 			as.double(abs.tol), as.double(rel.tol),
 			limit = limit)
     }
diff --git a/src/library/stats/R/interaction.plot.R b/src/library/stats/R/interaction.plot.R
index 2c0f751..9f85d91 100644
--- a/src/library/stats/R/interaction.plot.R
+++ b/src/library/stats/R/interaction.plot.R
@@ -1,5 +1,5 @@
 #  File src/library/stats/R/interaction.plot.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
 #  Copyright (C) 1995-2013 The R Core Team
 #
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 interaction.plot <-
     function(x.factor, trace.factor, response, fun=mean,
diff --git a/src/library/stats/R/isoreg.R b/src/library/stats/R/isoreg.R
index 0a8deee..a6cb91c 100644
--- a/src/library/stats/R/isoreg.R
+++ b/src/library/stats/R/isoreg.R
@@ -1,5 +1,5 @@
 #  File src/library/stats/R/isoreg.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
 #  Copyright (C) 1995-2013 The R Core Team
 #
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 ### Isotonic Regression --- original code is simplification of MASS' Shepard():
 ##
diff --git a/src/library/stats/R/kernel.R b/src/library/stats/R/kernel.R
index 33a5663..9624bd2 100644
--- a/src/library/stats/R/kernel.R
+++ b/src/library/stats/R/kernel.R
@@ -1,5 +1,5 @@
 #  File src/library/stats/R/kernel.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
 #  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
@@ -12,7 +12,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 ## Copyright (C) 1997-1999  Adrian Trapletti
 ## Copyright (C) 1999-2013  The R Core Team
diff --git a/src/library/stats/R/kmeans.R b/src/library/stats/R/kmeans.R
index 111c1bd..5f7ccde 100644
--- a/src/library/stats/R/kmeans.R
+++ b/src/library/stats/R/kmeans.R
@@ -1,7 +1,7 @@
 #  File src/library/stats/R/kmeans.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
-#  Copyright (C) 1995-2013 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
@@ -14,17 +14,19 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 kmeans <-
-function(x, centers, iter.max = 10, nstart = 1,
-	 algorithm = c("Hartigan-Wong", "Lloyd", "Forgy", "MacQueen"), trace=FALSE)
+function(x, centers, iter.max = 10L, nstart = 1L,
+	 algorithm = c("Hartigan-Wong", "Lloyd", "Forgy", "MacQueen"),
+         trace = FALSE)
 {
+    .Mimax <- .Machine$integer.max
     do_one <- function(nmeth) {
         switch(nmeth,
            {                            # 1 : Hartigan-Wong
-               isteps.Qtran <- 50 * m
-               iTran <- c(as.integer(isteps.Qtran), integer(max(0,k-1)))
+	       isteps.Qtran <- as.integer(min(.Mimax, 50 * m))
+	       iTran <- c(isteps.Qtran, integer(max(0,k-1)))
                Z <- .Fortran(C_kmns, x, m, p,
                              centers = centers,
                              as.integer(k), c1 = integer(m), c2 = integer(m),
@@ -63,41 +65,39 @@ function(x, centers, iter.max = 10, nstart = 1,
 	if(m23 <- any(nmeth == c(2L, 3L))) {
 	    if(any(Z$nc == 0))
 		warning("empty cluster: try a better set of initial centers",
-			call.=FALSE)
+			call. = FALSE)
 	}
 	if(Z$iter > iter.max) {
 	    warning(sprintf(ngettext(iter.max,
 				     "did not converge in %d iteration",
 				     "did not converge in %d iterations"),
-			    iter.max), call.=FALSE, domain = NA)
+			    iter.max), call. = FALSE, domain = NA)
 	    if(m23) Z$ifault <- 2L
 	}
         if(nmeth %in% c(2L, 3L)) {
             if(any(Z$nc == 0))
                 warning("empty cluster: try a better set of initial centers",
-                        call.=FALSE)
+                        call. = FALSE)
         }
 	Z
     }
     x <- as.matrix(x)
-    m <- as.integer(nrow(x))
-    if(is.na(m)) stop("invalid nrow(x)")
-    p <- as.integer(ncol(x))
-    if(is.na(p)) stop("invalid ncol(x)")
+    ## as.integer(<too large>) gives NA ==> not allowing too large nrow() / ncol():
+    m <- as.integer(nrow(x)); if(is.na(m)) stop("invalid nrow(x)")
+    p <- as.integer(ncol(x)); if(is.na(p)) stop("invalid ncol(x)")
     if(missing(centers))
 	stop("'centers' must be a number or a matrix")
     nmeth <- switch(match.arg(algorithm),
-                    "Hartigan-Wong" = 1,
-                    "Lloyd" = 2, "Forgy" = 2,
-                    "MacQueen" = 3)
+                    "Hartigan-Wong" = 1L,
+                    "Lloyd" = 2L, "Forgy" = 2L,
+                    "MacQueen" = 3L)
     storage.mode(x) <- "double"
     if(length(centers) == 1L) {
-	if (centers == 1) nmeth <- 3
 	k <- centers
         ## we need to avoid duplicates here
-        if(nstart == 1)
+        if(nstart == 1L)
             centers <- x[sample.int(m, k), , drop = FALSE]
-        if(nstart >= 2 || any(duplicated(centers))) {
+        if(nstart >= 2L || any(duplicated(centers))) {
             cn <- unique(x)
             mm <- nrow(cn)
             if(mm < k)
@@ -114,15 +114,16 @@ function(x, centers, iter.max = 10, nstart = 1,
             stop("more cluster centers than data points")
     }
     k <- as.integer(k)
-    if(is.na(k)) stop("'invalid value of 'k'")
+    if(is.na(k)) stop(gettextf("invalid value of %s", "'k'"), domain = NA)
+    if (k == 1L) nmeth <- 3L # Hartigan-Wong, (Fortran) needs k > 1
     iter.max <- as.integer(iter.max)
-    if(is.na(iter.max) || iter.max < 1) stop("'iter.max' must be positive")
+    if(is.na(iter.max) || iter.max < 1L) stop("'iter.max' must be positive")
     if(ncol(x) != ncol(centers))
 	stop("must have same number of columns in 'x' and 'centers'")
     storage.mode(centers) <- "double"
     Z <- do_one(nmeth)
     best <- sum(Z$wss)
-    if(nstart >= 2 && !is.null(cn))
+    if(nstart >= 2L && !is.null(cn))
 	for(i in 2:nstart) {
 	    centers <- cn[sample.int(mm, k), , drop=FALSE]
 	    ZZ <- do_one(nmeth)
@@ -148,18 +149,19 @@ function(x, centers, iter.max = 10, nstart = 1,
 print.kmeans <- function(x, ...)
 {
     cat("K-means clustering with ", length(x$size), " clusters of sizes ",
-        paste(x$size, collapse=", "), "\n", sep="")
+        paste(x$size, collapse = ", "), "\n", sep = "")
     cat("\nCluster means:\n")
     print(x$centers, ...)
     cat("\nClustering vector:\n")
     print(x$cluster, ...)
     cat("\nWithin cluster sum of squares by cluster:\n")
     print(x$withinss, ...)
-    cat(sprintf(" (between_SS / total_SS = %5.1f %%)\n",
-		100 * x$betweenss/x$totss),
-	"Available components:\n", sep="\n")
+    ratio <- sprintf(" (between_SS / total_SS = %5.1f %%)\n",
+                     100 * x$betweenss/x$totss)
+    cat(sub(".", getOption("OutDec"), ratio, fixed = TRUE),
+	"Available components:\n", sep = "\n")
     print(names(x))
-    if(!is.null(x$ifault) && x$ifault == 2)
+    if(!is.null(x$ifault) && x$ifault == 2L)
 	cat("Warning: did *not* converge in specified number of iterations\n")
     invisible(x)
 }
@@ -167,7 +169,7 @@ print.kmeans <- function(x, ...)
 fitted.kmeans <- function(object, method = c("centers", "classes"), ...)
 {
 	method <- match.arg(method)
-	if (method == "centers") object$centers[object$cl, , drop=FALSE]
+	if (method == "centers") object$centers[object$cl, , drop = FALSE]
 	else object$cl
 }
 
diff --git a/src/library/stats/R/kruskal.test.R b/src/library/stats/R/kruskal.test.R
index b41dcc1..df925c4 100644
--- a/src/library/stats/R/kruskal.test.R
+++ b/src/library/stats/R/kruskal.test.R
@@ -1,7 +1,7 @@
 #  File src/library/stats/R/kruskal.test.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
-#  Copyright (C) 1995-2013 The R Core Team
+#  Copyright (C) 1995-2015 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
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 kruskal.test <- function(x, ...) UseMethod("kruskal.test")
 
@@ -24,13 +24,17 @@ function(x, g, ...)
     if (is.list(x)) {
         if (length(x) < 2L)
             stop("'x' must be a list with at least 2 elements")
+        if (!missing(g))
+            warning("'x' is a list, so ignoring argument 'g'")
         DNAME <- deparse(substitute(x))
         x <- lapply(x, function(u) u <- u[complete.cases(u)])
+        if (!all(sapply(x, is.numeric)))
+            warning("some elements of 'x' are not numeric and will be coerced to numeric")
         k <- length(x)
         l <- sapply(x, "length")
-        if (any(l == 0))
+        if (any(l == 0L))
             stop("all groups must contain data")
-        g <- factor(rep(1 : k, l))
+        g <- factor(rep.int(seq_len(k), l))
         x <- unlist(x)
     }
     else {
@@ -45,19 +49,20 @@ function(x, g, ...)
             stop("all group levels must be finite")
         g <- factor(g)
         k <- nlevels(g)
-        if (k < 2)
+        if (k < 2L)
             stop("all observations are in the same group")
     }
 
     n <- length(x)
-    if (n < 2)
+    if (n < 2L)
         stop("not enough observations")
     r <- rank(x)
     TIES <- table(x)
     STATISTIC <- sum(tapply(r, g, "sum")^2 / tapply(r, g, "length"))
+    ## keep as n+1 to avoid (implausible) integer overflows
     STATISTIC <- ((12 * STATISTIC / (n * (n + 1)) - 3 * (n + 1)) /
                   (1 - sum(TIES^3 - TIES) / (n^3 - n)))
-    PARAMETER <- k - 1
+    PARAMETER <- k - 1L
     PVAL <- pchisq(STATISTIC, PARAMETER, lower.tail = FALSE)
     names(STATISTIC) <- "Kruskal-Wallis chi-squared"
     names(PARAMETER) <- "df"
@@ -79,6 +84,7 @@ function(formula, data, subset, na.action, ...)
     m <- match.call(expand.dots = FALSE)
     if(is.matrix(eval(m$data, parent.frame())))
         m$data <- as.data.frame(data)
+    ## need stats:: for non-standard evaluation
     m[[1L]] <- quote(stats::model.frame)
     mf <- eval(m, parent.frame())
     if(length(mf) > 2L)
diff --git a/src/library/stats/R/ks.test.R b/src/library/stats/R/ks.test.R
index 4c03e80..f235b14 100644
--- a/src/library/stats/R/ks.test.R
+++ b/src/library/stats/R/ks.test.R
@@ -1,5 +1,5 @@
 #  File src/library/stats/R/ks.test.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
 #  Copyright (C) 1995-2012 The R Core Team
 #
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 ks.test <-
     function(x, y, ..., alternative = c("two.sided", "less", "greater"),
diff --git a/src/library/stats/R/ksmooth.R b/src/library/stats/R/ksmooth.R
index d13ff96..0937bd9 100644
--- a/src/library/stats/R/ksmooth.R
+++ b/src/library/stats/R/ksmooth.R
@@ -1,5 +1,5 @@
 #  File src/library/stats/R/ksmooth.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
 #  Copyright (C) 1998-2012 The R Core Team
 #
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 ksmooth <-
   function(x, y, kernel = c("box", "normal"), bandwidth = 0.5,
diff --git a/src/library/stats/R/lag.R b/src/library/stats/R/lag.R
index d6029a0..72e6855 100644
--- a/src/library/stats/R/lag.R
+++ b/src/library/stats/R/lag.R
@@ -1,5 +1,5 @@
 #  File src/library/stats/R/lag.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
 #  Copyright (C) 1995-2012 The R Core Team
 #
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 lag <- function(x, ...) UseMethod("lag")
 
diff --git a/src/library/stats/R/lag.plot.R b/src/library/stats/R/lag.plot.R
index 08a7a36..d64a6d4 100644
--- a/src/library/stats/R/lag.plot.R
+++ b/src/library/stats/R/lag.plot.R
@@ -1,5 +1,5 @@
 #  File src/library/stats/R/lag.plot.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
 #  Copyright (C) 1999-2012 The R Core Team
 #
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 ## Function exists in S-plus
 
@@ -53,7 +53,7 @@ lag.plot <- function(x, lags = 1, layout = NULL, set.lags = 1L:lags,
     if(is.null(layout))
         layout <-
             if(prod(pmf <- par("mfrow")) >= tot.lags) pmf
-            else grDevices::n2mfrow(tot.lags)
+            else n2mfrow(tot.lags)
 
     ## Plotting
     ## avoid resetting mfrow and using outer margins for just one plot
diff --git a/src/library/stats/R/lm.R b/src/library/stats/R/lm.R
index 963ab52..fe35c1e 100644
--- a/src/library/stats/R/lm.R
+++ b/src/library/stats/R/lm.R
@@ -1,7 +1,7 @@
 #  File src/library/stats/R/lm.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
-#  Copyright (C) 1995-2014 The R Core Team
+#  Copyright (C) 1995-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
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 
 lm <- function (formula, data, subset, weights, na.action,
@@ -30,6 +30,7 @@ lm <- function (formula, data, subset, weights, na.action,
                names(mf), 0L)
     mf <- mf[c(1L, m)]
     mf$drop.unused.levels <- TRUE
+    ## need stats:: for non-standard evaluation
     mf[[1L]] <- quote(stats::model.frame)
     mf <- eval(mf, parent.frame())
     if (method == "model.frame")
@@ -109,13 +110,7 @@ lm.fit <- function (x, y, offset = NULL, method = "qr", tol = 1e-07,
     if(method != "qr")
 	warning(gettextf("method = '%s' is not supported. Using 'qr'", method),
                 domain = NA)
-    dots <- list(...)
-    if(length(dots) > 1L)
-	warning("extra arguments ", paste(sQuote(names(dots)), sep=", "),
-                " are disregarded.", domain = NA)
-    else if(length(dots) == 1L)
-	warning("extra argument ", sQuote(names(dots)),
-                " is disregarded.", domain = NA)
+    chkDots(...)
     z <- .Call(C_Cdqrls, x, y, tol, FALSE)
     if(!singular.ok && z$rank < p) stop("singular fit encountered")
     coef <- z$coefficients
@@ -168,13 +163,7 @@ lm.wfit <- function (x, y, w, offset = NULL, method = "qr", tol = 1e-7,
     if(method != "qr")
 	warning(gettextf("method = '%s' is not supported. Using 'qr'", method),
                 domain = NA)
-    dots <- list(...)
-    if(length(dots) > 1L)
-	warning("extra arguments ", paste(sQuote(names(dots)), sep=", "),
-                " are disregarded.", domain = NA)
-    else if(length(dots) == 1L)
-	warning("extra argument ", sQuote(names(dots)),
-                " is disregarded.", domain = NA)
+    chkDots(...)
     x.asgn <- attr(x, "assign")# save
     zero.weights <- any(w == 0)
     if (zero.weights) {
@@ -334,11 +323,9 @@ summary.lm <- function (object, correlation = FALSE, symbolic.cor = FALSE, ...)
     ans <- z[c("call", "terms", if(!is.null(z$weights)) "weights")]
     ans$residuals <- r
     ans$coefficients <-
-	cbind(est, se, tval, 2*pt(abs(tval), rdf, lower.tail = FALSE))
-    dimnames(ans$coefficients) <-
-	list(names(z$coefficients)[Qr$pivot[p1]],
-	     c("Estimate", "Std. Error", "t value", "Pr(>|t|)"))
-    ans$aliased <- is.na(coef(object))  # used in print method
+	cbind(Estimate = est, "Std. Error" = se, "t value" = tval,
+	      "Pr(>|t|)" = 2*pt(abs(tval), rdf, lower.tail = FALSE))
+    ans$aliased <- is.na(z$coefficients)  # used in print method
     ans$sigma <- sqrt(resvar)
     ans$df <- c(p, rdf, NCOL(Qr$qr))
     if (p != attr(z$terms, "intercept")) {
@@ -397,7 +384,7 @@ print.summary.lm <-
                 " not defined because of singularities)\n", sep = "")
         else cat("\nCoefficients:\n")
         coefs <- x$coefficients
-        if(!is.null(aliased <- x$aliased) && any(aliased)) {
+        if(any(aliased <- x$aliased)) {
             cn <- names(aliased)
             coefs <- matrix(NA, length(aliased), 4, dimnames=list(cn, colnames(coefs)))
             coefs[!aliased, ] <- x$coefficients
@@ -480,16 +467,24 @@ simulate.lm <- function(object, nsim = 1, seed = NULL, ...)
         RNGstate <- structure(seed, kind = as.list(RNGkind()))
         on.exit(assign(".Random.seed", R.seed, envir = .GlobalEnv))
     }
+    fam <- if(inherits(object, "glm")) object$family$family else "gaussian"
     ftd <- fitted(object)             # == napredict(*, object$fitted)
-    nm <- names(ftd)
+    isMlm <- identical(fam, "gaussian") && is.matrix(ftd)
+    nm <- if(isMlm) dimnames(ftd) else names(ftd)
+    if(isMlm) ## Not hard. Biggest question: how exactly the data frame should look
+	stop("simulate() is not yet implemented for multivariate lm()")
     n <- length(ftd)
     ntot <- n * nsim
-    fam <- if(inherits(object, "glm")) object$family$family else "gaussian"
     val <- switch(fam,
                   "gaussian" = {
                       vars <- deviance(object)/ df.residual(object)
-                      if (!is.null(object$weights)) vars <- vars/object$weights
-                      ftd + rnorm(ntot, sd = sqrt(vars))
+                      if(isMlm) {
+                          ## _TODO_
+                          ## weights ==> "vars / weights" as matrix with  dim(ftd)
+                      } else {
+                          if (!is.null(object$weights)) vars <- vars/object$weights
+                          ftd + rnorm(ntot, sd = sqrt(vars))
+                      }
                   },
                   if(!is.null(object$family$simulate))
                       object$family$simulate(object, nsim)
@@ -497,12 +492,15 @@ simulate.lm <- function(object, nsim = 1, seed = NULL, ...)
                             domain = NA)
                   )
 
-    if(!is.list(val)) {
+    if(isMlm) {
+        ## _TODO_
+    } else if(!is.list(val)) {
         dim(val) <- c(n, nsim)
         val <- as.data.frame(val)
     } else
         class(val) <- "data.frame"
-    names(val) <- paste("sim", seq_len(nsim), sep="_")
+    ## isMlm: conceptually, each "sim_i" could be a *matrix* [unusually]
+    names(val) <- paste0("sim_", seq_len(nsim))
     if (!is.null(nm)) row.names(val) <- nm
     attr(val, "seed") <- RNGstate
     val
@@ -534,6 +532,7 @@ model.frame.lm <- function(formula, ...)
                      "offset"), names(fcall), 0L)
         fcall <- fcall[c(1L, m)]
         fcall$drop.unused.levels <- TRUE
+        ## need stats:: for non-standard evaluation
         fcall[[1L]] <- quote(stats::model.frame)
         fcall$xlev <- formula$xlevels
         ## We want to copy over attributes here, especially predvars.
@@ -582,7 +581,7 @@ anova.lm <- function(object, ...)
         nmeffects <- c("(Intercept)", attr(object$terms, "term.labels"))
         tlabels <- nmeffects[1 + unique(asgn)]
         ss <- c(unlist(lapply(split(comp^2,asgn), sum)), ssr)
-        df <- c(unlist(lapply(split(asgn,  asgn), length)), dfr)
+        df <- c(lengths(split(asgn,  asgn)), dfr)
     } else {
         ss <- ssr
         df <- dfr
@@ -762,10 +761,6 @@ predict.lm <-
 	asgn <- split(order(aa), aaa)
 	if (hasintercept) {
 	    asgn$"(Intercept)" <- NULL
-	    if(!mmDone) {
-                mm <- model.matrix(object)
-                mmDone <- TRUE
-            }
 	    avx <- colMeans(mm)
 	    termsconst <- sum(avx[piv] * beta[piv])
 	}
diff --git a/src/library/stats/R/lm.influence.R b/src/library/stats/R/lm.influence.R
index ebca76f..cd8b602 100644
--- a/src/library/stats/R/lm.influence.R
+++ b/src/library/stats/R/lm.influence.R
@@ -1,11 +1,11 @@
 #  File src/library/stats/R/lm.influence.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
-#  Copyright (C) 1995-2012 The R Core Team
+#  Copyright (C) 1995-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
-#  the Free Software Foundation; either version 2 of the License, or
+#  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,
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 ### "lm"  *and*	 "glm"	 leave-one-out influence measures
 
@@ -102,16 +102,16 @@ influence.glm <- function(model, do.coef = TRUE, ...) {
 }
 
 hatvalues <- function(model, ...) UseMethod("hatvalues")
-hatvalues.lm <- function(model, infl = lm.influence(model, do.coef=FALSE), ...)
-{
-    setNames(infl$hat, names(infl$wt.res))
-}
+hatvalues.lm <- function(model, infl = lm.influence(model, do.coef=FALSE), ...) infl$hat
 
 rstandard <- function(model, ...) UseMethod("rstandard")
 rstandard.lm <- function(model, infl = lm.influence(model, do.coef=FALSE),
-                         sd = sqrt(deviance(model)/df.residual(model)), ...)
+                         sd = sqrt(deviance(model)/df.residual(model)),
+                         type = c("sd.1", "predictive"), ...)
 {
-    res <- infl$wt.res / (sd * sqrt(1 - infl$hat))
+    type <- match.arg(type)
+    res <- infl$wt.res / switch(type, "sd.1" = sd * sqrt(1 - infl$hat),
+				"predictive" = 1 - infl$hat)
     res[is.infinite(res)] <- NaN
     res
 }
@@ -245,7 +245,7 @@ influence.measures <- function(model)
     h <- infl$hat
     dfbetas <- infl$coefficients / outer(infl$sigma, sqrt(diag(xxi)))
     vn <- variable.names(model); vn[vn == "(Intercept)"] <- "1_"
-    colnames(dfbetas) <- paste("dfb",abbreviate(vn),sep=".")
+    colnames(dfbetas) <- paste0("dfb.", abbreviate(vn))
     ## Compatible to dffits():
     dffits <- e*sqrt(h)/(si*(1-h))
     if(any(ii <- is.infinite(dffits))) dffits[ii] <- NaN
diff --git a/src/library/stats/R/loess.R b/src/library/stats/R/loess.R
index e749c3d..b64cc4a 100644
--- a/src/library/stats/R/loess.R
+++ b/src/library/stats/R/loess.R
@@ -1,7 +1,7 @@
 #  File src/library/stats/R/loess.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
-#  Copyright (C) 1998-2013 The R Core Team
+#  Copyright (C) 1998-2015 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
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 loess <-
 function(formula, data, weights, subset, na.action, model = FALSE,
@@ -30,6 +30,7 @@ function(formula, data, weights, subset, na.action, model = FALSE,
     mf$model <- mf$span <- mf$enp.target <- mf$degree <-
 	mf$parametric <- mf$drop.square <- mf$normalize <- mf$family <-
 	    mf$method <- mf$control <- mf$... <- NULL
+    ## need stats:: for non-standard evaluation
     mf[[1L]] <- quote(stats::model.frame)
     mf <- eval(mf, parent.frame())
     if (match.arg(method) == "model.frame") return(mf)
@@ -46,7 +47,7 @@ function(formula, data, weights, subset, na.action, model = FALSE,
     drop.square <- match(nmx, nmx[drop.square], 0L) > 0L
     parametric <- match(nmx, nmx[parametric], 0L) > 0L
     if(!match(degree, 0L:2L, 0L)) stop("'degree' must be 0, 1 or 2")
-    iterations <- if(family == "gaussian") 1 else control$iterations
+    iterations <- if(family == "gaussian") 1L else control$iterations
     if(!missing(enp.target))
 	if(!missing(span))
 	    warning("both 'span' and 'enp.target' specified: 'span' will be used")
@@ -59,9 +60,11 @@ function(formula, data, weights, subset, na.action, model = FALSE,
        !is.character(control$statistics) || !is.character(control$trace.hat) ||
        !is.numeric(control$cell) || !is.numeric(iterations))
         stop("invalid 'control' argument")
-    fit <- simpleLoess(y, x, w, span, degree, parametric, drop.square,
-		       normalize, control$statistics, control$surface,
-		       control$cell, iterations, control$trace.hat)
+    fit <- simpleLoess(y, x, w, span, degree=degree, parametric=parametric,
+                       drop.square=drop.square, normalize=normalize,
+                       statistics=control$statistics, surface=control$surface,
+                       cell=control$cell, iterations=iterations,
+                       iterTrace=control$iterTrace, trace.hat=control$trace.hat)
     fit$call <- match.call()
     fit$terms <- mt
     fit$xnames <- nmx
@@ -75,22 +78,25 @@ function(formula, data, weights, subset, na.action, model = FALSE,
 
 loess.control <-
   function(surface = c("interpolate", "direct"),
-	   statistics = c("approximate", "exact"),
+	   statistics = c("approximate", "exact", "none"),
 	   trace.hat = c("exact", "approximate"),
-	   cell = 0.2, iterations = 4L, ...)
+	   cell = 0.2, iterations = 4L, iterTrace = FALSE, ...)
 {
-    list(surface=match.arg(surface),
-	 statistics=match.arg(statistics),
-	 trace.hat=match.arg(trace.hat),
-	 cell=cell, iterations=iterations)
+    stopifnot(length(iterations) == 1L, !is.na(iterations), as.integer(iterations) > 0L,
+	      length(iterTrace) == 1L,  !is.na(iterTrace),  as.integer(iterTrace) >= 0L)
+    list(surface = match.arg(surface),
+	 statistics = match.arg(statistics),
+	 trace.hat = match.arg(trace.hat),
+	 cell=cell, iterations=iterations, iterTrace=iterTrace)
 }
 
 
-simpleLoess <-
-  function(y, x, weights, span = 0.75, degree = 2L, parametric = FALSE,
-	   drop.square = FALSE, normalize = TRUE,
-	   statistics = "approximate", surface = "interpolate",
-	   cell = 0.2, iterations = 1L, trace.hat = "exact")
+simpleLoess <- function(y, x, weights, span = 0.75, degree = 2L,
+	parametric = FALSE, drop.square = FALSE, normalize = TRUE,
+	statistics = "approximate", surface = "interpolate",
+	cell, iterations, ## iter. == 1 <==> "gaussian"
+        ## tol = 1e-4, ## <- TODO stop iteration if converged := {rel.change <= tol}
+	iterTrace, trace.hat)
 {
     ## loess_ translated to R.
 
@@ -98,23 +104,23 @@ simpleLoess <-
     if (is.na(D)) stop("invalid NCOL(X)")
     if(D > 4) stop("only 1-4 predictors are allowed")
     N <- as.integer(NROW(x))
-    if (is.na(N)) stop("invalid NCOL(X)")
+    if (is.na(N)) stop("invalid NROW(X)")
     if(!N || !D)	stop("invalid 'x'")
-    if(!length(y))	stop("invalid 'y'")
+    if(length(y) != N)	stop("invalid 'y'")
     x <- as.matrix(x)
     storage.mode(x) <- "double"
     storage.mode(y) <- "double"
     storage.mode(weights) <- "double"
-    max.kd <-  max(N, 200)
+    max.kd <- max(N, 200L)
     robust <- rep_len(1, N)
-    divisor <- rep_len(1, D)
     if(normalize && D > 1L) {
 	trim <- ceiling(0.1 * N)
 	divisor <-
 	    sqrt(apply(apply(x, 2L, sort)[seq(trim+1, N-trim), , drop = FALSE],
 		       2L, var))
 	x <- x/rep(divisor, rep_len(N, D))
-    }
+    } else
+	divisor <- 1
     sum.drop.sqr <- sum(drop.square)
     sum.parametric <- sum(parametric)
     nonparametric <- sum(!parametric)
@@ -126,20 +132,28 @@ simpleLoess <-
     if(D == 1L && sum.drop.sqr)
 	stop("specified the square of a predictor to be dropped with only one numeric predictor")
     if(sum.parametric == D) stop("specified parametric for all predictors")
+    if (length(span) != 1L) stop("invalid argument 'span'")
+    if (length(cell) != 1L) stop("invalid argument 'cell'")
+    if (length(degree) != 1L) stop("invalid argument 'degree'")
 
-    if(iterations)
+    if(surface == "interpolate" && statistics == "approximate") # default
+        statistics <- if(trace.hat == "exact") "1.approx"
+                      else "2.approx" # trace.hat == "approximate"
+    surf.stat <- paste(surface, statistics, sep = "/")
+    do.rob <- (iterations > 1L) # will do robustness iter.
+    if(!do.rob && iterTrace) {
+	warning("iterTrace = ", iterTrace," not obeyed as iterations = ", iterations)
+	iterTrace <- FALSE
+    }
+    no.st <- (statistics == "none")
+    if(iterTrace) wRSS <- NA
     for(j in seq_len(iterations)) {
-	robust <- weights * robust
-	if(j > 1) statistics <- "none"
-	else if(surface == "interpolate" && statistics == "approximate")
-	    statistics <- if(trace.hat == "exact") "1.approx"
-            else "2.approx" # trace.hat == "approximate"
-	surf.stat <- paste(surface, statistics, sep = "/")
-        if (length(span) != 1L) stop("invalid argument 'span'")
-        if (length(cell) != 1L) stop("invalid argument 'cell'")
-        if (length(degree) != 1L) stop("invalid argument 'degree'")
+        no.st <- (statistics == "none")
 	z <- .C(C_loess_raw, # ../src/loessc.c
-		y, x, weights, robust, D, N,
+		y, x,
+		if(no.st) 1 else weights,
+		if(no.st) weights * robust else 1,
+                D, N,
 		as.double(span),
 		as.integer(degree),
 		as.integer(nonparametric),
@@ -158,73 +172,96 @@ simpleLoess <-
 		delta1 = double(1L),
 		delta2 = double(1L),
 		as.integer(surf.stat == "interpolate/exact"))
-	if(j==1) {
+	fitted.residuals <- y - z$fitted.values
+	if(j < iterations) { ## update robustness weights,
+	    ## not for *last* iteration, so they remain consistent with 'fitted.values'
+	    if(iterTrace) old.rob <- robust
+	    robust <- .Fortran(C_lowesw, fitted.residuals, N,
+			       robust = double(N), integer(N))$robust
+        }
+	if(j == 1) {
 	    trace.hat.out <- z$trL
 	    one.delta <- z$delta1
 	    two.delta <- z$delta2
+	    if(do.rob) {
+		statistics <- "none"
+		surf.stat <- paste(surface, statistics, sep = "/")
+		no.st <- TRUE
+	    }
 	}
-	fitted.residuals <- y - z$fitted.values
-	if(j < iterations)
-	    robust <- .Fortran(C_lowesw, fitted.residuals, N,
-			       robust = double(N), integer(N))$robust
+	if(iterTrace) {
+	    oSS <- wRSS
+	    wRSS <- sum(weights * fitted.residuals^2)
+	    del.SS <- abs(oSS-wRSS)/(if(wRSS == 0) 1 else wRSS)
+	    d.rob.w <- if(j < iterations) ## have updated 'robust', see above
+			   sum(abs(old.rob - robust)) / sum(robust) else NA
+	    cat(sprintf(
+		"iter.%2d: wRSS=%#14.9g, rel. changes: (SS=%#9.4g, rob.wgts=%#9.4g)\n",
+		j, wRSS, del.SS, d.rob.w))
+	    if(iterTrace >= 2 && j < iterations) {
+		cat("robustness weights:\n")
+		print(quantile(robust, probs=(0:8)/8), digits=3)
+	    }
+	}
+    } ## end { iterations }
+
+    if(surface == "interpolate") {
+        pars <- setNames(z$parameter,
+                         c("d", "n", "vc", "nc", "nv", "liv", "lv"))
+        enough <- (D + 1L) * pars[["nv"]]
+        fit.kd <- list(parameter=pars, a=z$a[1L:pars[4L]], xi=z$xi[1L:pars[4L]],
+                       vert=z$vert, vval=z$vval[1L:enough])
     }
-    if(surface == "interpolate")
-    {
-	pars <- setNames(z$parameter,
-			 c("d", "n", "vc", "nc", "nv", "liv", "lv"))
-	enough <- (D + 1L) * pars["nv"]
-	fit.kd <- list(parameter=pars, a=z$a[1L:pars[4L]], xi=z$xi[1L:pars[4L]],
-		       vert=z$vert, vval=z$vval[1L:enough])
+    if(do.rob) {
+        pseudovalues <- .Fortran(C_lowesp, # lowesp() in  ../src/loessf.f
+                                 N,
+                                 as.double(y),
+                                 as.double(z$fitted.values),
+                                 as.double(weights), # 'pwgts'
+                                 as.double(robust),  # 'rwgts'
+                                 integer(N),
+                                 pseudovalues = double(N))$pseudovalues
+        zz <- .C(C_loess_raw, pseudovalues,
+                 x, weights, weights, D, N,
+                 as.double(span),
+                 as.integer(degree),
+                 as.integer(nonparametric),
+                 as.integer(order.drop.sqr),
+                 as.integer(sum.drop.sqr),
+                 as.double(span*cell),
+                 as.character(surf.stat), ## == <surface>/none
+                 fitted = double(N),
+                 parameter = integer(7L),
+                 a = integer(max.kd),
+                 xi = double(max.kd),
+                 vert = double(2L*D),
+                 vval = double((D+1L)*max.kd),
+                 diagonal = double(N),
+                 trL = double(1L),
+                 delta1 = double(1L),
+                 delta2 = double(1L),
+                 0L)[["fitted"]]
+        pseudo.resid <- pseudovalues - zz
     }
-    if(iterations > 1L) {
-	pseudovalues <- .Fortran(C_lowesp,
-				 N,
-				 as.double(y),
-				 as.double(z$fitted.values),
-				 as.double(weights),
-				 as.double(robust),
-				 integer(N),
-				 pseudovalues = double(N))$pseudovalues
-	zz <- .C(C_loess_raw,
-		as.double(pseudovalues), # ? needed
-		x, weights, weights, D, N,
-		as.double(span),
-		as.integer(degree),
-		as.integer(nonparametric),
-		as.integer(order.drop.sqr),
-		as.integer(sum.drop.sqr),
-		as.double(span*cell),
-		as.character(surf.stat),
-		temp = double(N),
-		parameter = integer(7L),
-		a = integer(max.kd),
-		xi = double(max.kd),
-		vert = double(2L*D),
-		vval = double((D+1L)*max.kd),
-		diagonal = double(N),
-		trL = double(1L),
-		delta1 = double(1L),
-		delta2 = double(1L),
-		0L)
-	pseudo.resid <- pseudovalues - zz$temp
-    }
-    sum.squares <- if(iterations <= 1L) sum(weights * fitted.residuals^2)
-    else sum(weights * pseudo.resid^2)
+    sum.squares <- if(do.rob)
+		       sum (weights * pseudo.resid^2)
+		   else sum(weights * fitted.residuals^2)
     enp <- one.delta + 2*trace.hat.out - N
     s <- sqrt(sum.squares/one.delta)
-    pars <- list(robust = robust, span = span, degree = degree,
-                 normalize = normalize,
-		 parametric = parametric, drop.square = drop.square,
-		 surface = surface, cell = cell,
-                 family = if(iterations <= 1L) "gaussian" else "symmetric",
-		 iterations = iterations)
-    fit <- list(n = N, fitted = z$fitted.values, residuals = fitted.residuals,
-		enp = enp, s = s, one.delta = one.delta, two.delta = two.delta,
-		trace.hat = trace.hat.out, divisor = divisor)
-    fit$pars <- pars
-    if(surface == "interpolate") fit$kd <- fit.kd
-    class(fit) <- "loess"
-    fit
+
+    ## return
+    structure(
+        class = "loess",
+        list(n = N, fitted = z$fitted.values, residuals = fitted.residuals,
+             enp = enp, s = s, one.delta = one.delta, two.delta = two.delta,
+             trace.hat = trace.hat.out, divisor = divisor, robust = robust,
+             pars = list(span = span, degree = degree,
+                         normalize = normalize,
+                         parametric = parametric, drop.square = drop.square,
+                         surface = surface, cell = cell,
+                         family = if(iterations <= 1L) "gaussian" else "symmetric",
+			 trace.hat = trace.hat, iterations = iterations),
+             kd = if(surface == "interpolate") fit.kd))
 }
 
 predict.loess <-
@@ -235,19 +272,21 @@ predict.loess <-
     if(is.null(newdata) && !se)
 	return(fitted(object))
 
-    newx <- if(is.null(newdata)) object$x
-    else if(is.data.frame(newdata))
-        as.matrix(model.frame(delete.response(terms(object)), newdata,
-                              na.action = na.action))
-    else as.matrix(newdata) # this case is undocumented
-    res <-
-        with(object, predLoess(y, x, newx, s, weights, pars$robust,
-                               pars$span, pars$degree, pars$normalize,
-                               pars$parametric, pars$drop.square, pars$surface,
-                               pars$cell, pars$family, kd, divisor, se = se))
+    op <- object$pars
+    res <- predLoess(object$y, object$x,
+                     newx = if(is.null(newdata)) object$x
+                            else if(is.data.frame(newdata))
+                                as.matrix(model.frame(delete.response(terms(object)), newdata,
+                                                      na.action = na.action))
+                            else as.matrix(newdata), # this case is undocumented
+                     object$ s, object$ weights, object$ robust,
+                     op$span, op$degree, op$normalize,
+                     op$parametric, op$drop.square, op$surface,
+                     op$cell, op$family,
+                     object$ kd, object$ divisor, se = se)
     if(!is.null(out.attrs <- attr(newdata, "out.attrs"))) { # expand.grid used
         if(se) {
-            res$fit <- array(res$fit, out.attrs$dim, out.attrs$dimnames)
+            res$fit    <- array(res$fit,    out.attrs$dim, out.attrs$dimnames)
             res$se.fit <- array(res$se.fit, out.attrs$dim, out.attrs$dimnames)
         } else res <- array(res, out.attrs$dim, out.attrs$dimnames)
     }
@@ -264,8 +303,10 @@ predLoess <-
     ## translation of pred_
     D <- NCOL(x); N <- NROW(x); M <- NROW(newx)
     x <- as.matrix(x); newx <- as.matrix(newx)
-    newx <- newx/rep(divisor, rep_len(M, D))
-    x <- x/rep(divisor, rep_len(N, D))
+    if(any(divisor != 1)) {
+        newx <- newx/rep(divisor, rep_len(M, D))
+        x    <- x   /rep(divisor, rep_len(N, D))
+    }
     sum.drop.sqr <- sum(drop.square)
     nonparametric <- sum(!parametric)
     order.parametric <- order(parametric)
@@ -275,7 +316,7 @@ predLoess <-
     storage.mode(x) <- "double"
     storage.mode(y) <- "double"
     if(surface == "direct") {
-        nas <- rowSums(is.na(newx)) > 0L
+        nas <- rowSums(is.na(newx)) > 0
         fit <- rep_len(NA_real_, length(nas))
         x.evaluate <- x.evaluate[!nas,, drop = FALSE]
         M <- nrow(x.evaluate)
@@ -299,8 +340,8 @@ predLoess <-
 		    fit = double(M),
 		    L = double(N*M))[c("fit", "L")]
 	    fit[!nas] <- z$fit
-	    ses <- (matrix(z$L^2, M, N)/rep(weights, rep_len(M,N))) %*% rep_len(1,N)
-	    se.fit[!nas] <- drop(s * sqrt(ses))
+	    ses <- rowSums(matrix(z$L^2, M, N) / rep(weights, rep_len(M,N)))
+	    se.fit[!nas] <- s * sqrt(ses)
 	} else {
 	    fit[!nas] <- .C(C_loess_dfit,
                             y,
@@ -320,11 +361,10 @@ predLoess <-
     }
     else { ## interpolate
 	## need to eliminate points outside original range - not in pred_
-	inside <- matrix(FALSE, M, ncol = D)
 	ranges <- apply(x, 2L, range)
-	inside <- (x.evaluate <= rep(ranges[2L,], rep_len(M, D))) &
-	(x.evaluate >= rep(ranges[1L,], rep_len(M, D)))
-	inside <- inside %*% rep_len(1, D) == D
+	inside <-
+            rowSums((x.evaluate <= rep(ranges[2L,], rep_len(M, D))) &
+                    (x.evaluate >= rep(ranges[1L,], rep_len(M, D)))) == D
         inside[is.na(inside)] <- FALSE
 	M1 <- sum(inside)
 	fit <- rep_len(NA_real_, M)
@@ -356,8 +396,8 @@ predLoess <-
 			double(M1),
 			L = double(N*M1)
 			)$L
-		tmp <- (matrix(L^2, M1, N)/rep(weights, rep_len(M1,N))) %*% rep_len(1,N)
-		se.fit[inside] <- drop(s * sqrt(tmp))
+		tmp <- rowSums(matrix(L^2, M1, N) / rep(weights, rep_len(M1,N)))
+		se.fit[inside] <- s * sqrt(tmp)
 	    }
 	}
     }
@@ -401,19 +441,11 @@ summary.loess <- function(object, ...)
 print.summary.loess <-
     function(x, digits = max(3L, getOption("digits") - 3L), ...)
 {
-    if(!is.null(cl <- x$call)) {
-	cat("Call:\n")
-	dput(cl, control=NULL)
-    }
-    cat("\nNumber of Observations:", x$n, "\n")
-    cat("Equivalent Number of Parameters:", format(round(x$enp, 2)), "\n")
-    if(x$pars$family == "gaussian")
-	cat("Residual Standard Error:", format(signif(x$s, digits)), "\n")
-    else cat("Residual Scale Estimate:", format(signif(x$s, digits)), "\n")
-    cat("Trace of smoother matrix:", format(round(x$trace.hat, 2L)), "\n")
+    print.loess(x, digits=digits, ...)
+    cat("Trace of smoother matrix: ", format(round(x$trace.hat, 2L)),
+        "  (",x$pars$trace.hat, ")\n", sep="")
     cat("\nControl settings:\n")
-    cat("  normalize: ", x$pars$normalize, "\n")
-    cat("  span	    : ", format(x$pars$span), "\n")
+    cat("  span     : ", format(x$pars$span), "\n")
     cat("  degree   : ", x$pars$degree, "\n")
     cat("  family   : ", x$pars$family)
     if(x$pars$family != "gaussian")
@@ -421,7 +453,9 @@ print.summary.loess <-
     cat("\n  surface  : ", x$pars$surface)
     if(x$pars$surface == "interpolate")
 	cat("	  cell =", format(x$pars$cell))
-    cat("\n")
+    cat("\n  normalize: ", x$pars$normalize)
+    cat("\n parametric: ", x$pars$parametric)
+    cat("\ndrop.square: ", x$pars$drop.square, "\n")
     invisible(x)
 }
 
@@ -450,17 +484,16 @@ loess.smooth <-
 	   evaluation = 50, ...)
 {
     notna <- !(is.na(x) | is.na(y))
-    new.x <- seq.int(min(x[notna]), max(x[notna]), length.out = evaluation)
-
-    control <- loess.control(...)
     x <- x[notna]; y <- y[notna]
+    new.x <- seq.int(min(x), max(x), length.out = evaluation)
+    control <- loess.control(...)
     w <- rep_len(1, length(y))
     family <- match.arg(family)
     iterations <- if(family == "gaussian") 1L else control$iterations
-    fit <- simpleLoess(y, x, w, span, degree, FALSE, FALSE,
-		       normalize=FALSE, "none", "interpolate",
-		       control$cell, iterations, control$trace.hat)
-    kd <- fit$kd
+    kd <- simpleLoess(y, x, w, span, degree=degree, parametric=FALSE, drop.square=FALSE,
+                      normalize=FALSE, statistics="none", surface="interpolate",
+                      cell=control$cell, iterations=iterations,
+                      iterTrace=control$iterTrace, trace.hat=control$trace.hat)$kd
     z <- .C(C_loess_ifit,
 	    as.integer(kd$parameter),
 	    as.integer(kd$a), as.double(kd$xi),
diff --git a/src/library/stats/R/logLik.R b/src/library/stats/R/logLik.R
index 3bbd707..6b0cd9a 100644
--- a/src/library/stats/R/logLik.R
+++ b/src/library/stats/R/logLik.R
@@ -1,7 +1,7 @@
 #  File src/library/stats/R/logLik.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
-#  Copyright (C) 2001-12 The R Core Team
+#  Copyright (C) 2001-2014 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
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 ### originally from package nlne.
 
@@ -123,7 +123,9 @@ nobs.nls <- function(object, ...)
 nobs.default <- function(object, use.fallback = FALSE, ...)
 {
     ## MASS::loglm  and MASS::polr fits have an 'nobs' component
-    if(is.list(object) && !is.null(n <- object[["nobs"]])) n
+    if((is.L <- is.list(object)) && !is.null(n <- object[["nobs"]])) n
+    ## cov.wt() unfortunately uses 'n.obs':
+    else if(is.L && !is.null(n <- object[["n.obs"]])) n
     else if(use.fallback) {
         if(!is.null(w <- object[["weights"]])) sum(w != 0)
         else if("residuals" %in% names(object))
diff --git a/src/library/stats/R/loglin.R b/src/library/stats/R/loglin.R
index c9a117b..4527752 100644
--- a/src/library/stats/R/loglin.R
+++ b/src/library/stats/R/loglin.R
@@ -1,5 +1,5 @@
 #  File src/library/stats/R/loglin.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
 #  Copyright (C) 1995-2013 The R Core Team
 #
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 loglin <- function(table, margin, start = rep(1, length(table)), fit =
                    FALSE, eps = 0.1, iter = 20L, param = FALSE, print =
diff --git a/src/library/stats/R/lowess.R b/src/library/stats/R/lowess.R
index a422d9b..0e6efea 100644
--- a/src/library/stats/R/lowess.R
+++ b/src/library/stats/R/lowess.R
@@ -1,7 +1,7 @@
 #  File src/library/stats/R/lowess.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
-#  Copyright (C) 1995-2012 The R Core Team
+#  Copyright (C) 1995-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
@@ -14,12 +14,12 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 lowess <- function(x, y = NULL, f = 2/3, iter = 3L,
                    delta = 0.01 * diff(range(x)))
 {
-    xy <- xy.coords(x,y)
+    xy <- xy.coords(x,y, setLab = FALSE)
     o <- order(xy$x)
     x <- as.double(xy$x[o])
     list(x = x, y = .Call(C_lowess, x, as.double(xy$y[o]), f, iter, delta))
diff --git a/src/library/stats/R/lsfit.R b/src/library/stats/R/lsfit.R
index 553070e..3c29acc 100644
--- a/src/library/stats/R/lsfit.R
+++ b/src/library/stats/R/lsfit.R
@@ -1,7 +1,7 @@
 #  File src/library/stats/R/lsfit.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
-#  Copyright (C) 1995-2013 The R Core Team
+#  Copyright (C) 1995-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
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 lsfit <- function(x, y, wt = NULL, intercept = TRUE, tolerance = 1e-07,
                   yname = NULL)
@@ -83,7 +83,7 @@ lsfit <- function(x, y, wt = NULL, intercept = TRUE, tolerance = 1e-07,
 	if(any(wt < 0)) stop("negative weights not allowed")
 	if(nwts != nry)
             stop(gettextf("number of weights = %d should equal %d (number of responses)", nwts, nry), domain = NA)
-	wtmult <- wt^0.5
+	wtmult <- sqrt(wt)
 	if(any(wt == 0)) {
 	    xzero <- as.matrix(x)[wt == 0, ]
 	    yzero <- as.matrix(y)[wt == 0, ]
@@ -167,7 +167,7 @@ ls.diag <- function(ls.out)
     if( !is.null(ls.out$wt) ) {
 	if( any(ls.out$wt[good] == 0) )
 	    warning("observations with 0 weight not used in calculating standard deviation")
-	resids <- resids * ls.out$wt[good]^0.5
+	resids <- resids * sqrt(ls.out$wt[good])
     }
 
     ## initialize
@@ -186,12 +186,12 @@ ls.diag <- function(ls.out)
 
     ## calculate diagnostics
 
-    stddev <- (colSums(as.matrix(resids^2))/(n - p))^0.5
+    stddev <- sqrt(colSums(as.matrix(resids^2))/(n - p))
     stddevmat <- matrix(stddev, nrow=sum(good), ncol=ncol(resids), byrow=TRUE)
-    stdres[good, ] <- resids/((1-hatdiag[good])^0.5 * stddevmat)
-    studres[good, ] <- (stdres[good, ]*stddevmat)/
-        (((n-p)*stddevmat^2 - resids^2/(1-hatdiag[good]))/(n-p-1))^0.5
-    dfits[good, ] <- (hatdiag[good]/(1-hatdiag[good]))^0.5 * studres[good, ]
+    stdres[good, ] <- resids/(sqrt(1-hatdiag[good]) * stddevmat)
+    studres[good, ] <- (stdres[good, ]*stddevmat) /
+        sqrt(((n-p)*stddevmat^2 - resids^2/(1-hatdiag[good]))/(n-p-1))
+    dfits[good, ] <- sqrt(hatdiag[good]/(1-hatdiag[good])) * studres[good, ]
     Cooks[good, ] <- ((stdres[good, ]^2 * hatdiag[good])/p)/(1-hatdiag[good])
     if(ncol(resids)==1 && is.null(yname)) {
 	stdres <- as.vector(stdres)
@@ -214,8 +214,8 @@ ls.diag <- function(ls.out)
 
     ## calculate correlation matrix
 
-    cormat <- covmat.scaled/
-	(outer(diag(covmat.scaled), diag(covmat.scaled))^0.5)
+    cormat <- covmat.scaled /
+	sqrt(outer(diag(covmat.scaled), diag(covmat.scaled)))
 
     ## calculate standard error
 
@@ -236,7 +236,7 @@ ls.print <- function(ls.out, digits = 4L, print.it = TRUE)
     if( !is.null(ls.out$wt) ) {
 	if(any(ls.out$wt == 0))
 	    warning("observations with 0 weights not used")
-	resids <- resids * ls.out$wt^0.5
+	resids <- resids * sqrt(ls.out$wt)
     }
     n <- apply(resids, 2L, length) - colSums(is.na(resids))
     lsqr <- ls.out$qr
diff --git a/src/library/stats/R/mad.R b/src/library/stats/R/mad.R
index 947d466..fff7636 100644
--- a/src/library/stats/R/mad.R
+++ b/src/library/stats/R/mad.R
@@ -1,5 +1,5 @@
 #  File src/library/stats/R/mad.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
 #  Copyright (C) 1995-2012 The R Core Team
 #
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 mad <- function(x, center = median(x), constant = 1.4826,
                 na.rm = FALSE, low = FALSE, high = FALSE)
diff --git a/src/library/stats/R/mahalanobis.R b/src/library/stats/R/mahalanobis.R
index 906ab9a..a1904d2 100644
--- a/src/library/stats/R/mahalanobis.R
+++ b/src/library/stats/R/mahalanobis.R
@@ -1,7 +1,7 @@
 #  File src/library/stats/R/mahalanobis.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
-#  Copyright (C) 1995-2012 The R Core Team
+#  Copyright (C) 1995-2014 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
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 if(FALSE)
 mahalanobis. <- function(x, center, cov, inverted=FALSE, ...)
@@ -31,9 +31,10 @@ mahalanobis. <- function(x, center, cov, inverted=FALSE, ...)
 mahalanobis <- function(x, center, cov, inverted=FALSE, ...)
 {
     x <- if(is.vector(x)) matrix(x, ncol=length(x)) else as.matrix(x)
-    ## save speed in customary case:
-    ## if(any(center != 0))
-    x <- sweep(x, 2, center)# = (x - center)
+    ## save speed in customary case
+    if(!identical(center, FALSE))
+	x <- sweep(x, 2L, center)# = "x - center"
+    ## NB:  sweep(...., check.margin=FALSE) does not measurably save time
 
     ## The following would be considerably faster for  small nrow(x) and
     ## slower otherwise; probably always faster if the t(.) wasn't needed:
@@ -42,5 +43,5 @@ mahalanobis <- function(x, center, cov, inverted=FALSE, ...)
     ## retval <- colSums(x * if(inverted) cov %*% x else solve(cov,x, ...))
     if(!inverted)
 	cov <- solve(cov, ...)
-    setNames(rowSums((x%*%cov) * x), rownames(x))
+    setNames(rowSums(x %*% cov * x), rownames(x))
 }
diff --git a/src/library/stats/R/manova.R b/src/library/stats/R/manova.R
index cb40727..f676a3f 100644
--- a/src/library/stats/R/manova.R
+++ b/src/library/stats/R/manova.R
@@ -1,7 +1,7 @@
 #  File src/library/stats/R/manova.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
-#  Copyright (C) 1995-2013 The R Core Team
+#  Copyright (C) 1995-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
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 manova <- function(...)
 {
@@ -56,7 +56,7 @@ summary.manova <-
     nmeffect <- c("(Intercept)", attr(object$terms, "term.labels"))
     resid <- as.matrix(object$residuals)
     wt <- object$weights
-    if (!is.null(wt)) resid <- resid * wt^0.5
+    if (!is.null(wt)) resid <- resid * sqrt(wt)
     nresp <- NCOL(resid)
     if(nresp <= 1) stop("need multiple responses")
 
@@ -91,16 +91,13 @@ summary.manova <-
         ss[[nt]] <- crossprod(resid)
         names(ss)[nt] <- nmrows[nt] <- "Residuals"
         ok <- df[-nt] > 0
-        eigs <- array(NA, c(nterms, nresp))
-        dimnames(eigs) <- list(nmrows[-nt], NULL)
-        stats <- matrix(NA, nt, 5)
-        dimnames(stats) <-  list(nmrows,
-                                 c(test, "approx F", "num Df", "den Df",
-                                   "Pr(>F)"))
-        sc <- sqrt(diag(ss[[nt]]))
-        ## Let us try to distnguish bad scaling and near-perfect fit
-        sss <- sc^2
-        for(i in seq_len(nterms)[ok]) sss <- sss +  diag(ss[[i]])
+        eigs <- array(NA, c(nterms, nresp), dimnames =
+                          list(nmrows[-nt], NULL))
+        stats <- matrix(NA, nt, 5, dimnames = list(nmrows, c(test,
+                                       "approx F", "num Df", "den Df", "Pr(>F)")))
+        sc <- sqrt(sss <- diag(ss[[nt]]))
+        ## Let us try to distinguish bad scaling and near-perfect fit
+        for(i in seq_len(nterms)[ok]) sss <- sss + diag(ss[[i]])
         sc[sc < sqrt(sss)*1e-6] <- 1
         D <- diag(1/sc)
         rss.qr <- qr(D %*% ss[[nt]] %*% D, tol=tol)
@@ -110,17 +107,17 @@ summary.manova <-
         if(!is.null(rss.qr))
             for(i in seq_len(nterms)[ok]) {
                 A1 <- qr.coef(rss.qr, D %*% ss[[i]] %*% D)
-                eigs[i, ] <- Re(eigen(A1, symmetric = FALSE)$values)
-                stats[i, 1L:4] <-
+                eigs[i, ] <- Re(eigen(A1, symmetric = FALSE, only.values = TRUE)$values)
+                stats[i, 1L:4L] <-
                     switch(test,
-                           "Pillai" = Pillai(eigs[i,  ], df[i], df[nt]),
-                           "Wilks" = Wilks(eigs[i,  ], df[i], df[nt]),
-                           "Hotelling-Lawley" = HL(eigs[i,  ], df[i], df[nt]),
-                           "Roy" = Roy(eigs[i,  ], df[i], df[nt]))
-                ok <- stats[, 2] >= 0 & stats[, 3] > 0 & stats[, 4] > 0
+			   "Pillai" = 		Pillai(eigs[i, ], df[i], df[nt]),
+			   "Wilks" = 		Wilks (eigs[i, ], df[i], df[nt]),
+			   "Hotelling-Lawley" = HL    (eigs[i, ], df[i], df[nt]),
+			   "Roy" =		Roy   (eigs[i, ], df[i], df[nt]))
+                ok <- stats[, 2L] >= 0 & stats[, 3L] > 0 & stats[, 4L] > 0
                 ok <- !is.na(ok) & ok
-                stats[ok, 5] <- pf(stats[ok, 2], stats[ok, 3], stats[ok, 4],
-                                   lower.tail = FALSE)
+                stats[ok, 5L] <- pf(stats[ok, 2L], stats[ok, 3L], stats[ok, 4L],
+                                    lower.tail = FALSE)
 
             }
         x <- list(row.names = nmrows, SS = ss,
diff --git a/src/library/stats/R/mantelhaen.test.R b/src/library/stats/R/mantelhaen.test.R
index 25a0424..050bd68 100644
--- a/src/library/stats/R/mantelhaen.test.R
+++ b/src/library/stats/R/mantelhaen.test.R
@@ -1,5 +1,5 @@
 #  File src/library/stats/R/mantelhaen.test.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
 #  Copyright (C) 1995-2013 The R Core Team
 #
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 mantelhaen.test <-
 function(x, y = NULL, z = NULL,
diff --git a/src/library/stats/R/mcnemar.test.R b/src/library/stats/R/mcnemar.test.R
index 93441a9..ff4f1d6 100644
--- a/src/library/stats/R/mcnemar.test.R
+++ b/src/library/stats/R/mcnemar.test.R
@@ -1,5 +1,5 @@
 #  File src/library/stats/R/mcnemar.test.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
 #  Copyright (C) 1995-2013 The R Core Team
 #
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 mcnemar.test <- function(x, y = NULL, correct = TRUE)
 {
diff --git a/src/library/stats/R/median.R b/src/library/stats/R/median.R
index 945c26d..036bdb1 100644
--- a/src/library/stats/R/median.R
+++ b/src/library/stats/R/median.R
@@ -1,7 +1,7 @@
 #  File src/library/stats/R/median.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
-#  Copyright (C) 1995-2013 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
@@ -14,11 +14,11 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
-median <- function(x, na.rm=FALSE) UseMethod("median")
+median <- function(x, na.rm=FALSE, ...) UseMethod("median")
 
-median.default <- function(x, na.rm = FALSE)
+median.default <- function(x, na.rm = FALSE, ...)
 {
     if(is.factor(x) || is.data.frame(x)) stop("need numeric data")
     ## all other objects only need is.na(), sort() & mean() to be working
diff --git a/src/library/stats/R/medpolish.R b/src/library/stats/R/medpolish.R
index e311b01..0697093 100644
--- a/src/library/stats/R/medpolish.R
+++ b/src/library/stats/R/medpolish.R
@@ -1,5 +1,5 @@
 #  File src/library/stats/R/medpolish.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
 #  Copyright (C) 1995-2012 The R Core Team
 #
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 medpolish <-
     function (x, eps = 0.01, maxiter = 10L, trace.iter = TRUE, na.rm = FALSE)
diff --git a/src/library/stats/R/mlm.R b/src/library/stats/R/mlm.R
index f004308..d802596 100644
--- a/src/library/stats/R/mlm.R
+++ b/src/library/stats/R/mlm.R
@@ -1,5 +1,5 @@
 #  File src/library/stats/R/mlm.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
 #  Copyright (C) 1998 B. D. Ripley
 #  Copyright (C) 1998-2012 The R Core Team
@@ -15,7 +15,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 ## mlm := multivariate lm()
 summary.mlm <- function(object, ...)
@@ -202,7 +202,7 @@ sphericity <- function(object, Sigma=diag(nrow=p),
     pp <- nrow(T)
     U <- solve(Psi,B)
     sigma <- Tr(U)/pp/object$df
-    lambda <- Re(eigen(U)$values)
+    lambda <- Re(eigen(U, only.values = TRUE)$values)
     GG.eps <- sum(lambda)^2/sum(lambda^2)/pp
     n <- object$df
     HF.eps <- ((n + 1) * pp * GG.eps - 2) / (pp * (n - pp * GG.eps))
@@ -318,27 +318,23 @@ anova.mlm <-
                 stop(gettextf("residuals have rank %s < %s", rss.qr$rank, pp),
                      domain = NA)
             eigs <- array(NA, c(nmodels, pp))
-            stats <- matrix(NA, nmodels+1L, 5L)
-            colnames(stats) <- c(test, "approx F", "num Df", "den Df", "Pr(>F)")
-
+            stats <- matrix(NA, nmodels+1L, 5L,
+                            dimnames = list(NULL, c(test,
+                                "approx F", "num Df", "den Df", "Pr(>F)")))
             for(i in seq_len(nmodels)) {
                 eigs[i, ] <- Re(eigen(qr.coef(rss.qr,
                                               (T %*% ss[[i]] %*% t(T)) * scm),
-                                      symmetric = FALSE)$values)
+                                      symmetric = FALSE, only.values = TRUE)$values)
                 stats[i, 1L:4L] <-
                     switch(test,
-                           "Pillai" = Pillai(eigs[i,  ],
-                           df[i], df.res),
-                           "Wilks" = Wilks(eigs[i,  ],
-                           df[i], df.res),
-                           "Hotelling-Lawley" = HL(eigs[i,  ],
-                           df[i], df.res),
-                           "Roy" = Roy(eigs[i,  ],
-                           df[i], df.res))
+			   "Pillai" =		Pillai(eigs[i, ], df[i], df.res),
+			   "Wilks" =		Wilks (eigs[i, ], df[i], df.res),
+			   "Hotelling-Lawley" = HL    (eigs[i, ], df[i], df.res),
+			   "Roy" =		Roy   (eigs[i, ], df[i], df.res))
                 ok <- stats[, 2L] >= 0 & stats[, 3L] > 0 & stats[, 4L] > 0
                 ok <- !is.na(ok) & ok
-                stats[ok, 5L] <- pf(stats[ok, 2], stats[ok, 3L], stats[ok, 4L],
-                                   lower.tail = FALSE)
+                stats[ok, 5L] <- pf(stats[ok, 2L], stats[ok, 3L], stats[ok, 4L],
+                                    lower.tail = FALSE)
             }
 
         }
@@ -467,8 +463,8 @@ anova.mlmlist <- function (object, ...,
                             c("Res.Df", "Df", "Gen.var."))
 
     title <- "Analysis of Variance Table\n"
-    topnote <- paste("Model ", format(seq_len(nmodels)),": ",
-		     variables, sep = "", collapse = "\n")
+    topnote <- paste0("Model ", format(seq_len(nmodels)),": ", variables,
+		      collapse = "\n")
     transformnote <- if (!missing(T))
         c("\nContrast matrix", apply(format(T), 1L, paste, collapse = " "))
     else
@@ -549,7 +545,7 @@ anova.mlmlist <- function (object, ...,
             eigs[i, ] <- Re(eigen(qr.coef(rss.qr,
                                           sg * (T %*% deltassd[[i-1]] %*%
                                           t(T)) * scm),
-                                  symmetric = FALSE)$values)
+                                  symmetric = FALSE, only.values = TRUE)$values)
             stats[i, 1L:4] <-
                 switch(test,
                        "Pillai" = Pillai(eigs[i,  ],
@@ -576,10 +572,8 @@ anova.mlmlist <- function (object, ...,
 
 deviance.mlm <- function(object, ...)
 {
-    res <-
-	if(is.null(w <- object$weights)) object$residuals^2
-	else w * object$residuals^2
-    drop(rep.int(1, nrow(res)) %*% res)
+    colSums(if(is.null(w <- object$weights)) object$residuals^2
+	    else w * object$residuals^2)
 }
 
 plot.mlm <- function (x, ...) .NotYetImplemented()
diff --git a/src/library/stats/R/model.tables.R b/src/library/stats/R/model.tables.R
index bd2cd60..481b6fc 100644
--- a/src/library/stats/R/model.tables.R
+++ b/src/library/stats/R/model.tables.R
@@ -1,8 +1,8 @@
 #  File src/library/stats/R/model.tables.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
-#  Copyright (C) 1998 B. D. Ripley
-#  Copyright (C) 1998-2013 The R Core Team
+#  Copyright     1998 B. D. Ripley
+#  Copyright (C) 1998-2015 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
@@ -15,7 +15,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 model.tables <- function(x, ...) UseMethod("model.tables")
 
@@ -66,7 +66,7 @@ model.tables.aov <- function(x, type = "effects", se = FALSE, cterms, ...)
 	    message("Design is unbalanced - use se.contrast() for se's")
 	    se <- FALSE
 	} else se.tables <- se.aov(x, n, type = type)
-    if(type == "means") {
+    if(type == "means" && "(Intercept)" %in% colnames(prjs)) {
 	gmtable <- mean(prjs[,"(Intercept)"])
 	class(gmtable) <- "mtable"
 	tables <- c("Grand mean" = gmtable, tables)
@@ -110,7 +110,7 @@ model.tables.aovlist <- function(x, type = "effects", se = FALSE, ...)
     factors <- lapply(prjs, attr, "factors")
     dn.proj <- unlist(lapply(factors, names), recursive = FALSE)
     m.factors <- unlist(factors, recursive = FALSE)
-    dn.strata <- rep.int(names(factors), vapply(factors, length, 1L))
+    dn.strata <- rep.int(names(factors), lengths(factors))
     names(dn.strata) <- names(m.factors) <- names(dn.proj) <- unlist(dn.proj)
     t.factor <- attr(prjs, "t.factor")
     efficiency <- FALSE
@@ -304,7 +304,7 @@ replications <- function(formula, data = NULL, na.action)
     labels <- attr(formula, "term.labels")
     vars <- as.character(attr(formula, "variables"))[-1L]
     if(is.null(data)) {
-	v <- c(quote(stats::data.frame), attr(formula, "variables"))
+	v <- c(quote(data.frame), attr(formula, "variables"))
 	data <- eval(as.call(v), parent.frame())
     }
     if(!is.function(na.action)) stop("na.action must be a function")
@@ -376,7 +376,8 @@ print.tables_aov <- function(x, digits = 4L, ...)
 		    c(list(format(c(rownames(table), rep.int("rep", dim.t[1L])))),
                       dimnames(table)[-1L])
 		ctable <- eval(parse(text = paste(
-				     "ctable[as.numeric(t(matrix(seq(nrow(ctable)),ncol=2)))", paste(rep.int(", ", d - 2), collapse = " "), "]")))
+				     "ctable[as.numeric(t(matrix(seq(nrow(ctable)),ncol=2)))", paste(rep.int(", ", d - 2), collapse = " "), "]"),
+                                     keep.source = FALSE))
 		names(dimnames(ctable)) <- names(dimnames(table))
 		class(ctable) <- "mtable"
 		print.mtable(ctable, digits = digits, ...)
@@ -482,6 +483,7 @@ model.frame.aovlist <- function(formula, data = NULL, ...)
     args$formula <- form
     env <- environment(Terms)
     if (is.null(env)) env <- parent.frame()
+    ## need stats:: for non-standard evaluation
     fcall <- c(list(quote(stats::model.frame)), args)
     eval(as.call(fcall), env)
 }
diff --git a/src/library/stats/R/models.R b/src/library/stats/R/models.R
index c9631ec..ab66922 100644
--- a/src/library/stats/R/models.R
+++ b/src/library/stats/R/models.R
@@ -1,7 +1,7 @@
 #  File src/library/stats/R/models.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
-#  Copyright (C) 1995-2014 The R Core Team
+#  Copyright (C) 1995-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
@@ -14,10 +14,10 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 formula <- function(x, ...) UseMethod("formula")
-formula.default <- function (x, env = parent.frame(), ...)
+formula.default <- function (x = NULL, env = parent.frame(), ...)
 {
     notAtomic <- !is.atomic(x)
     notnull <- function(z) notAtomic && !is.null(z)
@@ -28,8 +28,9 @@ formula.default <- function (x, env = parent.frame(), ...)
     else if (!is.null(attr(x, "formula"))) attr(x, "formula")
     else {
         form <- switch(mode(x),
-                       NULL = structure(NULL, class = "formula"),
-                       character = formula(eval(parse(text = x)[[1L]])),
+                       NULL = structure(list(), class = "formula"),
+                       character = formula(
+                           eval(parse(text = x, keep.source = FALSE)[[1L]])),
                        call = eval(x), stop("invalid formula"))
         environment(form) <- env
         form
@@ -56,7 +57,8 @@ formula.data.frame <- function (x, ...)
         rhs <- nm[1L]
         lhs <- NULL
     } else stop("cannot create a formula from a zero-column data frame")
-    ff <- parse(text = paste(lhs, paste(rhs, collapse = "+"), sep = "~"))
+    ff <- parse(text = paste(lhs, paste(rhs, collapse = "+"), sep = "~"),
+                keep.source = FALSE)
     ff <- eval(ff)
     environment(ff) <- parent.frame()
     ff
@@ -64,7 +66,7 @@ formula.data.frame <- function (x, ...)
 
 formula.character <- function(x, env = parent.frame(), ...)
 {
-    ff <- formula(eval(parse(text=x)[[1L]]))
+    ff <- formula(eval(parse(text=x, keep.source = FALSE)[[1L]]))
     environment(ff) <- env
     ff
 }
@@ -81,7 +83,7 @@ print.formula <- function(x, showEnv = !identical(e, .GlobalEnv), ...)
 `[.formula` <- function(x,i) {
     ans <- NextMethod("[")
     ## as.character gives a vector.
-    if(as.character(ans[[1L]])[1L] == "~") {
+    if(length(ans) == 0L || as.character(ans[[1L]])[1L] == "~") {
 	class(ans) <- "formula"
         environment(ans) <- environment(x)
     }
@@ -152,7 +154,7 @@ reformulate <- function (termlabels, response=NULL, intercept = TRUE)
 		      paste(termlabels, collapse = "+"),
 		      collapse = "")
     if(!intercept) termtext <- paste(termtext, "- 1")
-    rval <- eval(parse(text = termtext)[[1L]])
+    rval <- eval(parse(text = termtext, keep.source = FALSE)[[1L]])
     if(has.resp) rval[[2L]] <-
         if(is.character(response)) as.symbol(response) else response
     ## response can be a symbol or call as  Surv(ftime, case)
@@ -173,7 +175,29 @@ drop.terms <- function(termobj, dropx = NULL, keep.response = FALSE)
 				  if (keep.response) termobj[[2L]] else NULL,
                                   attr(termobj, "intercept"))
         environment(newformula) <- environment(termobj)
-	terms(newformula, specials=names(attr(termobj, "specials")))
+	result <- terms(newformula, specials=names(attr(termobj, "specials")))
+
+	# Edit the optional attributes
+
+	response <- attr(termobj, "response")
+	if (response && !keep.response)
+	    # we have a response in termobj, but not in the result
+	    dropOpt <- c(response, dropx + length(response))
+	else
+	    dropOpt <- dropx + max(response)
+
+	if (!is.null(predvars <- attr(termobj, "predvars"))) {
+	    # predvars is a language expression giving a list of
+	    # values corresponding to terms in the model
+            # so add 1 for the name "list"
+	    attr(result, "predvars") <- predvars[-(dropOpt+1)]
+	}
+	if (!is.null(dataClasses <- attr(termobj, "dataClasses"))) {
+	    # dataClasses is a character vector of
+	    # values corresponding to terms in the model
+	    attr(result, "dataClasses") <- dataClasses[-dropOpt]
+	}
+	result
     }
 }
 
@@ -185,7 +209,33 @@ drop.terms <- function(termobj, dropx = NULL, keep.response = FALSE)
     if (length(newformula) == 0L) newformula <- "1"
     newformula <- reformulate(newformula, resp, attr(termobj, "intercept"))
     environment(newformula) <- environment(termobj)
-    terms(newformula, specials = names(attr(termobj, "specials")))
+    result <- terms(newformula, specials = names(attr(termobj, "specials")))
+
+    # Edit the optional attributes
+
+    addindex <- function(index, offset)
+        # add a non-negative offset to a possibly negative index
+    	ifelse(index < 0, index - offset,
+    	       ifelse(index == 0, 0, index + offset))
+
+    if (is.logical(i))
+    	i <- which(rep_len(i, length.out = length(attr(termobj, "term.labels"))))
+
+    response <- attr(termobj, "response")
+    if (response)
+	iOpt <- c(if (max(i) > 0) response, # inclusive indexing
+	          addindex(i, max(response)))
+    else
+	iOpt <- i
+
+    if (!is.null(predvars <- attr(termobj, "predvars")))
+	attr(result, "predvars") <- predvars[c(if (max(iOpt) > 0) 1,
+	                                     addindex(iOpt, 1))]
+
+    if (!is.null(dataClasses <- attr(termobj, "dataClasses")))
+	attr(result, "dataClasses") <- dataClasses[iOpt]
+
+    result
 }
 
 
@@ -322,7 +372,7 @@ offset <- function(object) object
     ## Character vectors may be auto-converted to factors, but keep them separate for now
     if(is.character(x)) return("character")
     if(is.matrix(x) && is.numeric(x))
-        return(paste("nmatrix", ncol(x), sep="."))
+        return(paste0("nmatrix.", ncol(x)))
     ## this is unclear.  Prior to 2.6.0 we assumed numeric with attributes
     ## meant something, but at least for now model.matrix does not
     ## treat it differently.
@@ -340,7 +390,7 @@ model.frame.default <-
     ## and note the number of rows.
     possible_newdata <-
         !missing(data) && is.data.frame(data) &&
-        identical(deparse(substitute(data)), "newdata") &&
+        identical(substitute(data), quote(newdata)) &&
         (nr <- nrow(data)) > 0
 
     ## were we passed just a fitted model object?
@@ -354,6 +404,7 @@ model.frame.default <-
         m <- match(c("formula", "data", "subset", "weights", "na.action"),
                    names(fcall), 0)
         fcall <- fcall[c(1, m)]
+        ## need stats:: for non-standard evaluation
         fcall[[1L]] <- quote(stats::model.frame)
         env <- environment(formula$terms)
 	if (is.null(env)) env <- parent.frame()
@@ -439,6 +490,7 @@ model.frame.default <-
 		    warning(gettextf("variable '%s' is not a factor", nm),
                             domain = NA)
 		else {
+		    ctr <- attr(xi, "contrasts")
 		    xi <- xi[, drop = TRUE] # drop unused levels
                     nxl <- levels(xi)
 		    if(any(m <- is.na(match(nxl, xl))))
@@ -448,14 +500,22 @@ model.frame.default <-
                                      nm, paste(nxl[m], collapse=", ")),
                              domain = NA)
 		    data[[nm]] <- factor(xi, levels=xl, exclude=NULL)
+		    if (!identical(attr(data[[nm]], "contrasts"), ctr))
+		    	warning(gettext(sprintf("contrasts dropped from factor %s", nm), domain = NA),
+		    	        call. = FALSE)
 		}
 	    }
     } else if(drop.unused.levels) {
 	for(nm in names(data)) {
 	    x <- data[[nm]]
 	    if(is.factor(x) &&
-	       length(unique(x[!is.na(x)])) < length(levels(x)))
-		data[[nm]] <- data[[nm]][, drop = TRUE]
+	       length(unique(x[!is.na(x)])) < length(levels(x))) {
+	        ctr <- attr(x, "contrasts")
+		data[[nm]] <- x[, drop = TRUE]
+		if (!identical(attr(data[[nm]], "contrasts"), ctr))
+		    warning(gettext(sprintf("contrasts dropped from factor %s due to missing levels", nm), domain = NA),
+		            call. = FALSE)
+	    }
 	}
     }
     attr(formula, "dataClasses") <- vapply(data, .MFclass, "")
@@ -645,7 +705,8 @@ get_all_vars <- function(formula, data = NULL, ...)
     env <- environment(formula)
     rownames <- .row_names_info(data, 0L) #attr(data, "row.names")
     varnames <- all.vars(formula)
-    inp <- parse(text=paste("list(", paste(varnames, collapse=","), ")"))
+    inp <- parse(text = paste("list(", paste(varnames, collapse = ","), ")"),
+                 keep.source = FALSE)
     variables <- eval(inp, data, env)
     if(is.null(rownames) && (resp <- attr(formula, "response")) > 0) {
         ## see if we can get rownames from the response
diff --git a/src/library/stats/R/monthplot.R b/src/library/stats/R/monthplot.R
index e01a500..c5ef20d 100644
--- a/src/library/stats/R/monthplot.R
+++ b/src/library/stats/R/monthplot.R
@@ -1,5 +1,5 @@
 #  File src/library/stats/R/monthplot.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
 #  Copyright (C) 1995-2013 The R Core Team
 #
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 monthplot <- function(x, ...) UseMethod("monthplot")
 
diff --git a/src/library/stats/R/mood.test.R b/src/library/stats/R/mood.test.R
index d23787b..72de24b 100644
--- a/src/library/stats/R/mood.test.R
+++ b/src/library/stats/R/mood.test.R
@@ -1,7 +1,7 @@
 #  File src/library/stats/R/mood.test.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
-#  Copyright (C) 1995-2013 The R Core Team
+#  Copyright (C) 1995-2015 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
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 mood.test <- function(x, ...) UseMethod("mood.test")
 
@@ -74,6 +74,7 @@ function(formula, data, subset, na.action, ...)
     m <- match.call(expand.dots = FALSE)
     if(is.matrix(eval(m$data, parent.frame())))
         m$data <- as.data.frame(data)
+    ## need stats:: for non-standard evaluation
     m[[1L]] <- quote(stats::model.frame)
     m$... <- NULL
     mf <- eval(m, parent.frame())
diff --git a/src/library/stats/R/na.ts.R b/src/library/stats/R/na.ts.R
index 5f981fe..e120d43 100644
--- a/src/library/stats/R/na.ts.R
+++ b/src/library/stats/R/na.ts.R
@@ -1,5 +1,5 @@
 #  File src/library/stats/R/na.ts.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
 #  Copyright (C) 1995-2012 The R Core Team
 #
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 na.contiguous <- function(object, ...) UseMethod("na.contiguous")
 
diff --git a/src/library/stats/R/nafns.R b/src/library/stats/R/nafns.R
index 92a5982..3594178 100644
--- a/src/library/stats/R/nafns.R
+++ b/src/library/stats/R/nafns.R
@@ -1,5 +1,5 @@
 #  File src/library/stats/R/nafns.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
 #  Copyright (C) 1995-2013 The R Core Team
 #
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 na.pass <- function(object, ...) object
 na.action <- function(object, ...) UseMethod("na.action")
diff --git a/src/library/stats/R/nlm.R b/src/library/stats/R/nlm.R
index faaa419..8623bf9 100644
--- a/src/library/stats/R/nlm.R
+++ b/src/library/stats/R/nlm.R
@@ -1,5 +1,5 @@
 #  File src/library/stats/R/nlm.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
 #  Copyright (C) 1995-2013 The R Core Team
 #
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 nlm <- function(f, p, ..., hessian=FALSE, typsize=rep(1,length(p)),
 		fscale=1, print.level=0, ndigit=12, gradtol=1e-6,
diff --git a/src/library/stats/R/nlminb.R b/src/library/stats/R/nlminb.R
index 1b176ce..7e676fb 100644
--- a/src/library/stats/R/nlminb.R
+++ b/src/library/stats/R/nlminb.R
@@ -1,5 +1,5 @@
 #  File src/library/stats/R/nlminb.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
 #  Copyright (C) 1995-2012 The R Core Team
 #
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 ##' used here and in nls(... algorithm = "port")
 port_msg <- function(iv1) {
diff --git a/src/library/stats/R/nls-profile.R b/src/library/stats/R/nls-profile.R
index 282318b..7f567cf 100644
--- a/src/library/stats/R/nls-profile.R
+++ b/src/library/stats/R/nls-profile.R
@@ -1,5 +1,5 @@
 #  File src/library/stats/R/nls-profile.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
 #  Copyright (C) 1999-1999 Saikat DebRoy and Douglas M. Bates
 #  Copyright (C) 1999-2011  The R Core Team
@@ -15,7 +15,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 ###
 ### Profiling nonlinear least squares for R
diff --git a/src/library/stats/R/nls.R b/src/library/stats/R/nls.R
index 1a77bae..7b368f5 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, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
 #  Copyright (C) 1999-1999 Saikat DebRoy, Douglas M. Bates, Jose C. Pinheiro
-#  Copyright (C) 2000-2013 The R Core Team
+#  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
@@ -15,7 +15,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 ###
 ###            Nonlinear least squares for R
@@ -119,11 +119,8 @@ nlsModel.plinear <- function(form, data, start, wts)
         dtdot <- function(A, b) apply(A, MARGIN = c(2L,3L), FUN = "%*%", b)
     }
 
-    getPars.noVarying <- function()
-        unlist(setNames(lapply(names(ind), get, envir = env), names(ind)))
-    getPars.varying <- function()
-        unlist(setNames(lapply(names(ind), get, envir = env),
-                        names(ind)))[useParams]
+    getPars.noVarying <- function() unlist(mget(names(ind), env))
+    getPars.varying   <- function() unlist(mget(names(ind), env))[useParams]
     getPars <- getPars.noVarying
 
     internalPars <- getPars()
@@ -159,7 +156,7 @@ nlsModel.plinear <- function(form, data, start, wts)
                  B <- qr.qty(QR.rhs, .swts * ddot(attr(rhs, "gradient"), lin))
                  B[1L:p1, ] <- dtdot(.swts * attr(rhs, "gradient"), rr)
                  R <- t( qr.R(QR.rhs)[1L:p1, ] )
-                 if(p1 == 1) B[1, ] <- B[1, ]/R
+                 if(p1 == 1) B[1, ] <- B[1, ]/ c(R)
                  else B[1L:p1, ] <- forwardsolve(R, B[1L:p1, ])
                  assign("QR.B", qr(B), envir = thisEnv)
                  rr <- qr.qty(QR.B, cc)
@@ -235,8 +232,7 @@ nlsModel <- function(form, data, start, wts, upper=NULL)
         ind[[i]] <- parLength + seq_along(start[[i]])
         parLength <- parLength + length(start[[i]])
     }
-    getPars.noVarying <- function()
-        unlist(setNames(lapply(names(ind), get, envir = env), names(ind)))
+    getPars.noVarying <- function() unlist(mget(names(ind), env))
     getPars <- getPars.noVarying
     internalPars <- getPars()
 
@@ -296,9 +292,7 @@ nlsModel <- function(form, data, start, wts, upper=NULL)
     if(QR$rank < qrDim)
         stop("singular gradient matrix at initial parameter estimates")
 
-    getPars.varying <- function()
-        unlist(setNames(lapply(names(ind), get, envir = env),
-                        names(ind)))[useParams]
+    getPars.varying <- function() unlist(mget(names(ind), env))[useParams]
     setPars.noVarying <- function(newPars)
     {
         assign("internalPars", newPars, envir = thisEnv)
@@ -419,7 +413,6 @@ nls_port_fit <- function(m, start, lower, upper, control, trace, give.v=FALSE)
     if (trace)
         iv[port_cpos[["trace"]]] <- 1L
     scale <- 1
-    low <- upp <- NULL
     if (any(lower != -Inf) || any(upper != Inf)) {
         low <- rep_len(as.double(lower), length(par))
         upp <- rep_len(as.double(upper), length(par))
@@ -427,7 +420,9 @@ nls_port_fit <- function(m, start, lower, upper, control, trace, give.v=FALSE)
             iv[1L] <- 300
 	    return(if(give.v) list(iv = iv, v = v[seq_len(18L)]) else iv)
         }
-    }
+    } else
+    	low <- upp <- numeric()
+
     if(p > 0) {
         ## driver routine port_nlsb() in ../src/port.c -- modifies m & iv
         .Call(C_port_nlsb, m,
@@ -564,6 +559,7 @@ nls <-
                            env = environment(formula))
             mf$start <- mf$control <- mf$algorithm <- mf$trace <- mf$model <- NULL
             mf$lower <- mf$upper <- NULL
+            ## need stats:: for non-standard evaluation
             mf[[1L]] <- quote(stats::model.frame)
             mf <- eval.parent(mf)
             n <- nrow(mf)
diff --git a/src/library/stats/R/nlsFunc.R b/src/library/stats/R/nlsFunc.R
index 7f5571b..9d48fb5 100644
--- a/src/library/stats/R/nlsFunc.R
+++ b/src/library/stats/R/nlsFunc.R
@@ -1,5 +1,5 @@
 #  File src/library/stats/R/nlsFunc.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
 #  Copyright (C) 1997,1999 Jose C. Pinheiro and  Douglas M. Bates
 #            (C) 1999 Saikat DebRoy
@@ -15,7 +15,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 ###
 ###            Utility functions used with nls
diff --git a/src/library/stats/R/oneway.test.R b/src/library/stats/R/oneway.test.R
index f0c6743..998db50 100644
--- a/src/library/stats/R/oneway.test.R
+++ b/src/library/stats/R/oneway.test.R
@@ -1,7 +1,7 @@
 #  File src/library/stats/R/oneway.test.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
-#  Copyright (C) 1995-2013 The R Core Team
+#  Copyright (C) 1995-2015 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
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 oneway.test <-
 function(formula, data, subset, na.action, var.equal = FALSE)
@@ -29,6 +29,7 @@ function(formula, data, subset, na.action, var.equal = FALSE)
     if(is.matrix(eval(m$data, parent.frame())))
         m$data <- as.data.frame(data)
     m$var.equal <- NULL
+    ## need stats:: for non-standard evaluation
     m[[1L]] <- quote(stats::model.frame)
     mf <- eval(m, parent.frame())
     response <- attr(attr(mf, "terms"), "response")
diff --git a/src/library/stats/R/optim.R b/src/library/stats/R/optim.R
index ecc3e5b..cb70ffc 100644
--- a/src/library/stats/R/optim.R
+++ b/src/library/stats/R/optim.R
@@ -1,5 +1,5 @@
 #  File src/library/stats/R/optim.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
 #  Copyright (C) 2000-12 The R Core Team
 #
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 optim <-
     function(par, fn, gr = NULL, ...,
diff --git a/src/library/stats/R/p.adjust.R b/src/library/stats/R/p.adjust.R
index 70a0bb4..b816ca1 100644
--- a/src/library/stats/R/p.adjust.R
+++ b/src/library/stats/R/p.adjust.R
@@ -1,5 +1,5 @@
 #  File src/library/stats/R/p.adjust.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
 #  Copyright (C) 1995-2012 The R Core Team
 #
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 p.adjust.methods <-
     c("holm", "hochberg", "hommel", "bonferroni", "BH", "BY", "fdr", "none")
diff --git a/src/library/stats/R/pairwise.R b/src/library/stats/R/pairwise.R
index 7e4770c..41ee2b5 100644
--- a/src/library/stats/R/pairwise.R
+++ b/src/library/stats/R/pairwise.R
@@ -1,7 +1,7 @@
 #  File src/library/stats/R/pairwise.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
-#  Copyright (C) 1995-2012 The R Core Team
+#  Copyright (C) 1995-2015 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
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 pairwise.t.test <-
 function(x, g, p.adjust.method = p.adjust.methods, pool.sd = !paired,
@@ -133,11 +133,11 @@ function(compare.levels, level.names, p.adjust.method)
 }
 
 print.pairwise.htest <-
-function(x, ...)
+function(x, digits = max(1L, getOption("digits") - 5L), ...)
 {
     cat("\n\tPairwise comparisons using", x$method, "\n\n")
     cat("data: ", x$data.name, "\n\n")
-    pp <- format.pval(x$p.value, 2, na.form="-")
+    pp <- format.pval(x$p.value, digits=digits, na.form="-")
     attributes(pp) <- attributes(x$p.value)
     print(pp, quote=FALSE, ...)
     cat("\nP value adjustment method:", x$p.adjust.method, "\n")
diff --git a/src/library/stats/R/plot.lm.R b/src/library/stats/R/plot.lm.R
index 313702c..64ea8d4 100644
--- a/src/library/stats/R/plot.lm.R
+++ b/src/library/stats/R/plot.lm.R
@@ -1,7 +1,7 @@
 #  File src/library/stats/R/plot.lm.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
-#  Copyright (C) 1995-2013 The R Core Team
+#  Copyright (C) 1995-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
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 plot.lm <-
 function (x, which = c(1L:3L,5L), ## was which = 1L:4L,
@@ -28,7 +28,7 @@ function (x, which = c(1L:3L,5L), ## was which = 1L:4L,
 	  id.n = 3, labels.id = names(residuals(x)), cex.id = 0.75,
 	  qqline = TRUE, cook.levels = c(0.5, 1.0),
 	  add.smooth = getOption("add.smooth"),
-	  label.pos = c(4,2), cex.caption = 1)
+	  label.pos = c(4,2), cex.caption = 1, cex.oma.main = 1.25)
 {
     dropInf <- function(x, h) {
 	if(any(isInf <- h >= 1.0)) {
@@ -60,12 +60,14 @@ function (x, which = c(1L:3L,5L), ## was which = 1L:4L,
     n <- length(r)
     if (any(show[2L:6L])) {
 	s <- if (inherits(x, "rlm")) x$s
-        else if(isGlm) sqrt(summary(x)$dispersion)
-        else sqrt(deviance(x)/df.residual(x))
-	hii <- lm.influence(x, do.coef = FALSE)$hat
+	     else if(isGlm) sqrt(summary(x)$dispersion)
+	     else sqrt(deviance(x)/df.residual(x))
+	hii <- (infl <- influence(x, do.coef = FALSE))$hat
 	if (any(show[4L:6L])) {
-	    cook <- if (isGlm) cooks.distance(x)
-            else cooks.distance(x, sd = s, res = r)
+	    cook <-
+		if (isGlm)
+		    cooks.distance (x, infl = infl)
+		else cooks.distance(x, infl = infl, sd = s, res = r, hat = hii)
 	}
     }
     if (any(show[2L:3L])) {
@@ -172,7 +174,7 @@ function (x, which = c(1L:3L,5L), ## was which = 1L:4L,
 	    text.id(yhn0[show.rs], sqrtabsr[show.rs], show.rs)
         dev.flush()
     }
-    if (show[4L]) {
+    if (show[4L]) { ## Cook's Distances
 	if(id.n > 0) {
 	    show.r <- order(-cook)[iid]# index of largest 'id.n' ones
 	    ymx <- cook[show.r[1L]] * 1.075
@@ -249,7 +251,7 @@ function (x, which = c(1L:3L,5L), ## was which = 1L:4L,
             if (one.fig)
                 title(sub = sub.caption, ...)
             if(length(cook.levels)) {
-                p <- length(coef(x))
+                p <- x$rank # not length(coef(x))
                 usr <- par("usr")
                 hh <- seq.int(min(r.hat[1L], r.hat[2L]/100), usr[2L],
                               length.out = 101)
@@ -262,9 +264,8 @@ function (x, which = c(1L:3L,5L), ## was which = 1L:4L,
                        lty = 2, col = 2, bty = "n")
                 xmax <- min(0.99, usr[2L])
                 ymult <- sqrt(p*(1-xmax)/xmax)
-                aty <- c(-sqrt(rev(cook.levels))*ymult,
-                         sqrt(cook.levels)*ymult)
-                axis(4, at = aty,
+                aty <- sqrt(cook.levels)*ymult
+                axis(4, at = c(-rev(aty), aty),
                      labels = paste(c(rev(cook.levels), cook.levels)),
                      mgp = c(.25,.25,0), las = 2, tck = 0,
                      cex.axis = cex.id, col.axis = 2)
@@ -294,7 +295,7 @@ function (x, which = c(1L:3L,5L), ## was which = 1L:4L,
 	axis(1, at = athat/(1-athat), labels = paste(athat))
 	if (one.fig)
 	    title(sub = sub.caption, ...)
-	p <- length(coef(x))
+	p <- x$rank
 	bval <- pretty(sqrt(p*cook/g), 5)
 
 	usr <- par("usr")
@@ -302,14 +303,14 @@ function (x, which = c(1L:3L,5L), ## was which = 1L:4L,
 	ymax <- usr[4L]
 	for(i in seq_along(bval)) {
 	    bi2 <- bval[i]^2
-	    if(ymax > bi2*xmax) {
+	    if(p*ymax > bi2*xmax) {
 		xi <- xmax + strwidth(" ")/3
-		yi <- bi2*xi
+		yi <- bi2*xi/p
 		abline(0, bi2, lty = 2)
 		text(xi, yi, paste(bval[i]), adj = 0, xpd = TRUE)
 	    } else {
 		yi <- ymax - 1.5*strheight(" ")
-		xi <- yi/bi2
+		xi <- p*yi/bi2
 		lines(c(0, xi), c(0, yi), lty = 2)
 		text(xi, ymax-0.8*strheight(" "), paste(bval[i]),
 		     adj = 0.5, xpd = TRUE)
@@ -327,6 +328,6 @@ function (x, which = c(1L:3L,5L), ## was which = 1L:4L,
     }
 
     if (!one.fig && par("oma")[3L] >= 1)
-	mtext(sub.caption, outer = TRUE, cex = 1.25)
+	mtext(sub.caption, outer = TRUE, cex = cex.oma.main)
     invisible()
 }
diff --git a/src/library/stats/R/poisson.test.R b/src/library/stats/R/poisson.test.R
index fb6ac59..0925dcc 100644
--- a/src/library/stats/R/poisson.test.R
+++ b/src/library/stats/R/poisson.test.R
@@ -1,5 +1,5 @@
 #  File src/library/stats/R/poisson.tests.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
 #  Copyright (C) 1995-2012 The R Core Team
 #
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 
 poisson.test <- function(x, T = 1, r = 1, alternative =
diff --git a/src/library/stats/R/power.R b/src/library/stats/R/power.R
index 08bf15f..638967e 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, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
-#  Copyright (C) 1995-2012 The R Core Team
+#  Copyright (C) 1995-2015 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
@@ -14,12 +14,13 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 power.t.test <-
     function(n=NULL, delta=NULL, sd=1, sig.level=0.05, power=NULL,
 	     type=c("two.sample", "one.sample", "paired"),
-	     alternative=c("two.sided", "one.sided"), strict=FALSE)
+	     alternative=c("two.sided", "one.sided"), strict=FALSE,
+	     tol = .Machine$double.eps^0.25)
 {
     if ( sum(sapply(list(n, delta, sd, power, sig.level), is.null)) != 1 )
 	stop("exactly one of 'n', 'delta', 'sd', 'power', and 'sig.level' must be NULL")
@@ -34,31 +35,33 @@ power.t.test <-
     tside <- switch(alternative, one.sided = 1, two.sided = 2)
     if (tside == 2 && !is.null(delta)) delta <- abs(delta)
 
-    p.body <- quote({nu <- (n - 1) * tsample
-		     pt(qt(sig.level/tside, nu, lower.tail = FALSE),
-			nu, ncp = sqrt(n/tsample) * delta/sd, lower.tail = FALSE)})
-    if (strict & tside == 2) # count rejections in opposite tail
-      p.body <- quote({
-	  nu <- (n - 1) * tsample
-	  qu <- qt(sig.level/tside, nu, lower.tail = FALSE)
-	  pt(qu, nu, ncp = sqrt(n/tsample) * delta/sd, lower.tail = FALSE) +
-	    pt(-qu, nu, ncp = sqrt(n/tsample) * delta/sd, lower.tail = TRUE)
-      })
+    p.body <-
+        if (strict && tside == 2) # count rejections in opposite tail
+            quote({
+                nu <- (n - 1) * tsample
+                qu <- qt(sig.level/tside, nu, lower.tail = FALSE)
+                pt( qu, nu, ncp = sqrt(n/tsample) * delta/sd, lower.tail = FALSE) +
+                pt(-qu, nu, ncp = sqrt(n/tsample) * delta/sd, lower.tail = TRUE)
+            })
+        else ## normal case:
+            quote({nu <- (n - 1) * tsample
+                   pt(qt(sig.level/tside, nu, lower.tail = FALSE),
+                      nu, ncp = sqrt(n/tsample) * delta/sd, lower.tail = FALSE)})
 
     if (is.null(power))
 	power <- eval(p.body)
     else if (is.null(n))
 	n <- uniroot(function(n) eval(p.body) - power,
-		     c(2,1e7))$root
+		     c(2, 1e7), tol=tol, extendInt = "upX")$root
     else if (is.null(sd))
 	sd <- uniroot(function(sd) eval(p.body) - power,
-		      delta * c(1e-7,1e+7))$root
+		      delta * c(1e-7, 1e+7), tol=tol, extendInt = "downX")$root
     else if (is.null(delta))
 	delta <- uniroot(function(delta) eval(p.body) - power,
-		      sd * c(1e-7,1e+7))$root
+		      sd * c(1e-7, 1e+7), tol=tol, extendInt = "upX")$root
     else if (is.null(sig.level))
 	sig.level <- uniroot(function(sig.level) eval(p.body) - power,
-		      c(1e-10,1-1e-10))$root
+		      c(1e-10, 1-1e-10), tol=tol, extendInt = "yes")$root
     else # Shouldn't happen
 	stop("internal error", domain = NA)
     NOTE <- switch(type,
@@ -79,7 +82,8 @@ power.t.test <-
 
 power.prop.test <-
     function(n=NULL, p1=NULL, p2=NULL, sig.level=0.05, power=NULL,
-	     alternative=c("two.sided", "one.sided"), strict=FALSE)
+	     alternative=c("two.sided", "one.sided"), strict=FALSE,
+	     tol = .Machine$double.eps^0.25)
 {
     if ( sum(sapply(list(n, p1, p2, power, sig.level), is.null)) != 1 )
 	stop("exactly one of 'n', 'p1', 'p2', 'power', and 'sig.level' must be NULL")
@@ -88,44 +92,44 @@ power.prop.test <-
 	stop("'sig.level' must be numeric in [0, 1]")
 
     alternative <- match.arg(alternative)
-
     tside <- switch(alternative, one.sided = 1, two.sided = 2)
 
-    p.body <- quote(pnorm(((sqrt(n) * abs(p1 - p2)
-			    - (qnorm(sig.level/tside, lower.tail = FALSE)
-			       * sqrt((p1 + p2) * (1 - (p1 + p2)/2))))
-			   / sqrt(p1 * (1 - p1) + p2 * (1 - p2)))))
+    p.body <-
+        if (strict && tside == 2) # count rejections in opposite tail
+            quote({
+                qu <- qnorm(sig.level/tside, lower.tail = FALSE)
+                d <- abs(p1 - p2)
+                q1 <- 1 - p1
+                q2 <- 1 - p2
+                pbar <- (p1 + p2)/2
+                qbar <- 1 - pbar
+                v1 <- p1 * q1
+                v2 <- p2 * q2
+                vbar <- pbar * qbar
+                pnorm((sqrt(n)*d - qu * sqrt(2 * vbar) ) / sqrt(v1 + v2)) +
+                pnorm((sqrt(n)*d + qu * sqrt(2 * vbar) ) / sqrt(v1 + v2),
+                      lower.tail=FALSE)
+            })
+        else ## normal case:
+            quote(pnorm((sqrt(n) * abs(p1 - p2)
+                          - (qnorm(sig.level/tside, lower.tail = FALSE)
+                             * sqrt((p1 + p2) * (1 - (p1 + p2)/2))))
+                         / sqrt(p1 * (1 - p1) + p2 * (1 - p2))))
 
-    if (strict & tside == 2) # count rejections in opposite tail
-      p.body <- quote({
-	  qu <- qnorm(sig.level/tside, lower.tail = FALSE)
-	  d <- abs(p1 - p2)
-	  q1 <- 1 - p1
-	  q2 <- 1 - p2
-	  pbar <- (p1 + p2)/2
-	  qbar <- 1 - pbar
-	  v1 <- p1 * q1
-	  v2 <- p2 * q2
-	  vbar <- pbar * qbar
-	  pnorm((sqrt(n)*d - qu * sqrt(2 * vbar) )
-		/ sqrt(v1 + v2)) +
-	  pnorm((sqrt(n)*d + qu * sqrt(2 * vbar) )
-		/ sqrt(v1 + v2), lower.tail=FALSE)
-      })
     if (is.null(power))
 	power <- eval(p.body)
     else if (is.null(n))
 	n <- uniroot(function(n) eval(p.body) - power,
-		     c(1,1e7))$root
+		     c(1,1e7), tol=tol, extendInt = "upX")$root
     else if (is.null(p1))
 	p1 <- uniroot(function(p1) eval(p.body) - power,
-		      c(0,p2))$root
+		      c(0,p2), tol=tol, extendInt = "yes")$root
     else if (is.null(p2))
 	p2 <- uniroot(function(p2) eval(p.body) - power,
-		      c(p1,1))$root
+		      c(p1,1), tol=tol, extendInt = "yes")$root
     else if (is.null(sig.level))
 	sig.level <- uniroot(function(sig.level) eval(p.body) - power,
-		      c(1e-10,1-1e-10))$root
+		      c(1e-10, 1-1e-10), tol=tol, extendInt = "upX")$root
     else # Shouldn't happen
 	stop("internal error", domain = NA)
 
@@ -139,14 +143,13 @@ power.prop.test <-
 	      class="power.htest")
 }
 
-print.power.htest <-
-function(x, ...)
+print.power.htest <- function(x, digits = getOption("digits"), ...)
 {
     cat("\n    ", x$method, "\n\n")
     note <- x$note
     x[c("method", "note")] <- NULL
     cat(paste(format(names(x), width = 15L, justify = "right"),
-	      format(x), sep = " = "), sep = "\n")
+	      format(x, digits=digits), sep = " = "), sep = "\n")
     if(!is.null(note)) cat("\n", "NOTE: ", note, "\n\n", sep = "") else cat("\n")
     invisible(x)
 }
diff --git a/src/library/stats/R/power.anova.test.R b/src/library/stats/R/power.anova.test.R
index a509bad..2c3fb65 100644
--- a/src/library/stats/R/power.anova.test.R
+++ b/src/library/stats/R/power.anova.test.R
@@ -1,5 +1,5 @@
 #  File src/library/stats/R/power.anova.test.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
 #  Copyright (C) 1995-2012 The R Core Team
 #
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 power.anova.test <-
 function (groups = NULL, n = NULL, between.var = NULL, within.var = NULL,
diff --git a/src/library/stats/R/ppoints.R b/src/library/stats/R/ppoints.R
index b99967e..2ab4c9f 100644
--- a/src/library/stats/R/ppoints.R
+++ b/src/library/stats/R/ppoints.R
@@ -1,7 +1,7 @@
 #  File src/library/stats/R/ppoints.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
-#  Copyright (C) 1995-2012 The R Core Team
+#  Copyright (C) 1995-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
@@ -14,9 +14,9 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
-ppoints <- function (n, a = ifelse(n <= 10, 3/8, 1/2))
+ppoints <- function (n, a = if(n <= 10) 3/8 else 1/2)
 {
     if(length(n) > 1L) n <- length(n)
     if(n > 0) (1L:n - a)/(n + 1-2*a) else numeric()
diff --git a/src/library/stats/R/ppr.R b/src/library/stats/R/ppr.R
index dcda0b8..e66b95e 100644
--- a/src/library/stats/R/ppr.R
+++ b/src/library/stats/R/ppr.R
@@ -1,8 +1,8 @@
 #  File src/library/stats/R/ppr.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
 #  Copyright (C) 1998 B. D. Ripley
-#  Copyright (C) 2000-2013 The R Core Team
+#  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
@@ -15,7 +15,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 ppr <- function(x, ...) UseMethod("ppr")
 
@@ -26,6 +26,7 @@ function(formula, data, weights, subset,
     call <- match.call()
     m <- match.call(expand.dots = FALSE)
     m$contrasts <- m$... <- NULL
+    ## need stats:: for non-standard evaluation
     m[[1L]] <- quote(stats::model.frame)
     m <- eval(m, parent.frame())
     Terms <- attr(m, "terms")
@@ -49,12 +50,13 @@ function(formula, data, weights, subset,
 ppr.default <-
 function(x, y, weights=rep(1,n), ww=rep(1,q), nterms, max.terms=nterms,
 	 optlevel=2, sm.method=c("supsmu", "spline", "gcvspline"),
-	 bass=0, span=0, df=5, gcvpen=1, ...)
+	 bass=0, span=0, df=5, gcvpen=1, trace = FALSE, ...)
 {
     call <- match.call()
     call[[1L]] <- as.name("ppr")
     sm.method <- match.arg(sm.method)
-    ism <- switch(sm.method, supsmu=0, spline=1, gcvspline=2)
+    ism <- switch(sm.method, supsmu = 0L, spline = 1L, gcvspline = 2L)
+    if(trace) ism <- -(ism + 1L)
     if(missing(nterms)) stop("'nterms' is missing with no default")
     mu <- nterms; ml <- max.terms
     x <- as.matrix(x)
@@ -65,10 +67,8 @@ function(x, y, weights=rep(1,n), ww=rep(1,q), nterms, max.terms=nterms,
     if(nrow(y) != n) stop("mismatched 'x' and 'y'")
     p <- ncol(x)
     q <- ncol(y)
-    if(!is.null(dimnames(x))) xnames <- dimnames(x)[[2L]]
-    else xnames <- paste0("X", 1L:p)
-    if(!is.null(dimnames(y))) ynames <- dimnames(y)[[2L]]
-    else ynames <- paste0("Y", 1L:q)
+    xnames <- if(!is.null(dimnames(x))) dimnames(x)[[2L]] else paste0("X", 1L:p)
+    ynames <- if(!is.null(dimnames(y))) dimnames(y)[[2L]] else paste0("Y", 1L:q)
     msmod <- ml*(p+q+2*n)+q+7+ml+1	# for asr
     nsp <- n*(q+15)+q+3*p
     ndp <- p*(p+1)/2+6*p
@@ -144,9 +144,9 @@ print.summary.ppr <- function(x, ...)
 {
     print.ppr(x, ...)
     mu <- x$mu
-    cat("\nProjection direction vectors:\n")
+    cat("\nProjection direction vectors ('alpha'):\n")
     print(format(x$alpha, ...), quote=FALSE)
-    cat("\nCoefficients of ridge terms:\n")
+    cat("\nCoefficients of ridge terms ('beta'):\n")
     print(format(x$beta, ...), quote=FALSE)
     if(any(x$edf >0)) {
 	cat("\nEquivalent df for ridge terms:\n")
@@ -156,7 +156,11 @@ print.summary.ppr <- function(x, ...)
     invisible(x)
 }
 
-plot.ppr <- function(x, ask, type="o", ...)
+plot.ppr <- function(x, ask, type = "o", cex = 1/2,
+                     main = quote(bquote(
+                         "term"[.(i)]*":" ~~ hat(beta[.(i)]) == .(bet.i))),
+                     xlab = quote(bquote(bold(alpha)[.(i)]^T * bold(x))),
+                     ylab = "", ...)
 {
     ppr.funs <- function(obj)
     {
@@ -177,9 +181,13 @@ plot.ppr <- function(x, ask, type="o", ...)
     }
     for(i in 1L:x$mu) {
 	ord <- order(obj$x[ ,i])
-	plot(obj$x[ord, i], obj$y[ord, i], type = type,
-	     xlab = paste("term", i), ylab = "", ...)
+        bet.i <- format(x$beta[[i]], digits = 3)
+	plot(obj$x[ord, i], obj$y[ord, i], type = type, cex = cex,
+	     main = if(is.call(main)) eval(main) else main,
+	     xlab = if(is.call(xlab)) eval(xlab) else xlab,
+             ylab = ylab, ...)
     }
+    force(bet.i)# codetools
     invisible()
 }
 
diff --git a/src/library/stats/R/prcomp.R b/src/library/stats/R/prcomp.R
index 072014c..24d19a3 100644
--- a/src/library/stats/R/prcomp.R
+++ b/src/library/stats/R/prcomp.R
@@ -1,7 +1,7 @@
 #  File src/library/stats/R/prcomp.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
-#  Copyright (C) 1995-2013 The R Core Team
+#  Copyright (C) 1995-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
@@ -14,31 +14,41 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 prcomp <- function (x, ...) UseMethod("prcomp")
 
 prcomp.default <-
-    function(x, retx = TRUE, center = TRUE, scale. = FALSE, tol = NULL, ...)
+    function(x, retx = TRUE, center = TRUE, scale. = FALSE, tol = NULL,
+             rank. = NULL, ...)
 {
+    chkDots(...)
     x <- as.matrix(x)
     x <- scale(x, center = center, scale = scale.)
     cen <- attr(x, "scaled:center")
     sc <- attr(x, "scaled:scale")
     if(any(sc == 0))
         stop("cannot rescale a constant/zero column to unit variance")
-    s <- svd(x, nu = 0)
-    s$d <- s$d / sqrt(max(1, nrow(x) - 1))
+    n <- nrow(x)
+    p <- ncol(x)
+    k <- if(!is.null(rank.)) {
+	     stopifnot(length(rank.) == 1, is.finite(rank.), as.integer(rank.) > 0)
+	     min(as.integer(rank.), n, p)
+	     ## Note that La.svd() *still* needs a (n x p) and a (p x p) auxiliary
+	 } else
+	     min(n, p)
+    s <- svd(x, nu = 0, nv = k)
+    j <- seq_len(k)
+    s$d <- s$d / sqrt(max(1, n - 1))
     if (!is.null(tol)) {
         ## we get rank at least one even for a 0 matrix.
         rank <- sum(s$d > (s$d[1L]*tol))
-        if (rank < ncol(x)) {
-            s$v <- s$v[, 1L:rank, drop = FALSE]
-            s$d <- s$d[1L:rank]
+        if (rank < k) {
+            j <- seq_len(k <- rank)
+            s$v <- s$v[,j , drop = FALSE]
         }
     }
-    dimnames(s$v) <-
-        list(colnames(x), paste0("PC", seq_len(ncol(s$v))))
+    dimnames(s$v) <- list(colnames(x), paste0("PC", j))
     r <- list(sdev = s$d, rotation = s$v,
               center = if(is.null(cen)) FALSE else cen,
               scale = if(is.null(sc)) FALSE else sc)
@@ -55,6 +65,7 @@ prcomp.formula <- function (formula, data = NULL, subset, na.action, ...)
     cl <- match.call()
     mf <- match.call(expand.dots = FALSE)
     mf$... <- NULL
+    ## need stats:: for non-standard evaluation
     mf[[1L]] <- quote(stats::model.frame)
     mf <- eval.parent(mf)
     ## this is not a `standard' model-fitting function,
@@ -81,9 +92,10 @@ plot.prcomp <- function(x, main = deparse(substitute(x)), ...)
     screeplot.default(x, main = main, ...)
 
 print.prcomp <- function(x, print.x = FALSE, ...) {
-    cat("Standard deviations:\n")
+    cat(sprintf("Standard deviations (1, .., p=%d):\n", length(x$sdev)))
     print(x$sdev, ...)
-    cat("\nRotation:\n")
+    d <- dim(x$rotation)
+    cat(sprintf("\nRotation (n x k) = (%d x %d):\n", d[1], d[2]))
     print(x$rotation, ...)
     if (print.x && length(x$x)) {
         cat("\nRotated variables:\n")
@@ -94,12 +106,14 @@ print.prcomp <- function(x, print.x = FALSE, ...) {
 
 summary.prcomp <- function(object, ...)
 {
+    chkDots(...)
     vars <- object$sdev^2
     vars <- vars/sum(vars)
     importance <- rbind("Standard deviation" = object$sdev,
                         "Proportion of Variance" = round(vars, 5),
                         "Cumulative Proportion" = round(cumsum(vars), 5))
-    colnames(importance) <- colnames(object$rotation)
+    k <- ncol(object$rotation)
+    colnames(importance) <- c(colnames(object$rotation), rep("", length(vars) - k))
     object$importance <- importance
     class(object) <- "summary.prcomp"
     object
@@ -108,13 +122,21 @@ summary.prcomp <- function(object, ...)
 print.summary.prcomp <-
 function(x, digits = max(3L, getOption("digits") - 3L), ...)
 {
-    cat("Importance of components:\n")
-    print(x$importance, digits = digits, ...)
+    dr <- dim(x$rotation); k <- dr[2]
+    p <- length(x$sdev)
+    if(k < p) {
+	cat(sprintf("Importance of first k=%d (out of %d) components:\n", k, p))
+	print(x$importance[, 1:k, drop=FALSE], digits = digits, ...)
+    } else {
+	cat("Importance of components%s:\n")
+	print(x$importance, digits = digits, ...)
+    }
     invisible(x)
 }
 
 predict.prcomp <- function(object, newdata, ...)
 {
+    chkDots(...)
     if (missing(newdata)) {
         if(!is.null(object$x)) return(object$x)
         else stop("no scores are available: refit with 'retx=TRUE'")
diff --git a/src/library/stats/R/predict.R b/src/library/stats/R/predict.R
index 9f0733d..8e273b7 100644
--- a/src/library/stats/R/predict.R
+++ b/src/library/stats/R/predict.R
@@ -1,5 +1,5 @@
 #  File src/library/stats/R/predict.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
 #  Copyright (C) 1995-2012 The R Core Team
 #
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 predict <- function(object,...) UseMethod("predict")
 
diff --git a/src/library/stats/R/predict.glm.R b/src/library/stats/R/predict.glm.R
index 9de774e..922eee0 100644
--- a/src/library/stats/R/predict.glm.R
+++ b/src/library/stats/R/predict.glm.R
@@ -1,5 +1,5 @@
 #  File src/library/stats/R/predict.glm.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
 #  Copyright (C) 1995-2012 The R Core Team
 #
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 predict.glm <-
   function(object, newdata = NULL, type = c("link", "response", "terms"),
diff --git a/src/library/stats/R/princomp-add.R b/src/library/stats/R/princomp-add.R
index e4f4b1b..a245eae 100644
--- a/src/library/stats/R/princomp-add.R
+++ b/src/library/stats/R/princomp-add.R
@@ -1,7 +1,7 @@
 #  File src/library/stats/R/princomp-add.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
-#  Copyright (C) 1995-2012 The R Core Team
+#  Copyright (C) 1995-2014 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
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 predict.princomp <- function(object, newdata, ...)
 {
@@ -57,7 +57,7 @@ print.summary.princomp <-
         cat("\nLoadings:\n")
         cx <- format(round(x$loadings, digits = digits))
         cx[abs(x$loadings) < cutoff] <-
-            paste(rep(" ", nchar(cx[1,1], type="w")), collapse="")
+            strrep(" ", nchar(cx[1,1], type="w"))
         print(cx, quote = FALSE, ...)
     }
     invisible(x)
diff --git a/src/library/stats/R/princomp.R b/src/library/stats/R/princomp.R
index 63bf1bf..851d996 100644
--- a/src/library/stats/R/princomp.R
+++ b/src/library/stats/R/princomp.R
@@ -1,7 +1,7 @@
 #  File src/library/stats/R/princomp.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
-#  Copyright (C) 1995-2013 The R Core Team
+#  Copyright (C) 1995-2015 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
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 princomp <- function(x, ...) UseMethod("princomp")
 
@@ -26,6 +26,7 @@ princomp.formula <- function(formula, data = NULL, subset, na.action, ...)
     cl <- match.call()
     mf <- match.call(expand.dots = FALSE)
     mf$... <- NULL
+    ## need stats:: for non-standard evaluation
     mf[[1L]] <- quote(stats::model.frame)
     mf <- eval.parent(mf)
     ## this is not a `standard' model-fitting function,
@@ -52,6 +53,7 @@ princomp.default <-
     function(x, cor = FALSE, scores = TRUE, covmat = NULL,
              subset = rep_len(TRUE, nrow(as.matrix(x))), ...)
 {
+    chkDots(...)
     cl <- match.call()
     cl[[1L]] <- as.name("princomp")
     z <- if(!missing(x)) as.matrix(x)[subset, , drop = FALSE]
diff --git a/src/library/stats/R/profile.R b/src/library/stats/R/profile.R
index b5dd523..f98a4aa 100644
--- a/src/library/stats/R/profile.R
+++ b/src/library/stats/R/profile.R
@@ -1,5 +1,5 @@
 #  File src/library/stats/R/profile.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
 #  Copyright (C) 1995-2012 The R Core Team
 #
@@ -14,6 +14,6 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 profile <- function(fitted, ...) UseMethod("profile")
diff --git a/src/library/stats/R/proj.R b/src/library/stats/R/proj.R
index 2415c9b..6228dc2 100644
--- a/src/library/stats/R/proj.R
+++ b/src/library/stats/R/proj.R
@@ -1,8 +1,8 @@
 #  File src/library/stats/R/proj.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
 #  Copyright (C) 1998 B. D. Ripley
-#  Copyright (C) 1998-2012 The R Core Team
+#  Copyright (C) 1998-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
@@ -15,13 +15,13 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 proj <- function(object, ...) UseMethod("proj")
 
 proj.default <- function(object, onedf = TRUE, ...)
 {
-    if(!is.qr(object$qr))
+    if(!inherits(object$qr, "qr"))
 	stop("argument does not include a 'qr' component")
     if(is.null(object$effects))
 	stop("argument does not include an 'effects' component")
diff --git a/src/library/stats/R/prop.test.R b/src/library/stats/R/prop.test.R
index 9070360..7f3e0d8 100644
--- a/src/library/stats/R/prop.test.R
+++ b/src/library/stats/R/prop.test.R
@@ -1,5 +1,5 @@
 #  File src/library/stats/R/prop.test.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
 #  Copyright (C) 1995-2012 The R Core Team
 #
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 prop.test <-
 function(x, n, p = NULL, alternative = c("two.sided", "less", "greater"),
diff --git a/src/library/stats/R/prop.trend.test.R b/src/library/stats/R/prop.trend.test.R
index e54d7b3..3e8220b 100644
--- a/src/library/stats/R/prop.trend.test.R
+++ b/src/library/stats/R/prop.trend.test.R
@@ -1,11 +1,11 @@
 #  File src/library/stats/R/prop.trend.test.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
-#  Copyright (C) 1995-2012 The R Core Team
+#  Copyright (C) 1995-2015 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
-#  the Free Software Foundation; either version 2 of the License, or
+#  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,
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 prop.trend.test <- function (x, n, score = seq_along(x))
 {
@@ -25,19 +25,15 @@ prop.trend.test <- function (x, n, score = seq_along(x))
     ## Tabular input has caused grief, get rid of dim() attributes:
     x <- as.vector(x)
     n <- as.vector(n)
-    score <- as.vector(score)
 
-    freq <- x/n
     p <- sum(x)/sum(n)
-    w <- n/p/(1 - p)
-    a <- anova(lm(freq ~ score, weights = w))
-    chisq <- a["score", "Sum Sq"]
-    names(chisq) <- "X-squared"
-    df <- c(df = 1)
-    pval <- pchisq(chisq, 1, lower.tail = FALSE)
-    rval <- list(statistic = chisq, parameter = df,
-                 p.value = as.numeric(pval),
-                 method = method, data.name = dname)
-    class(rval) <- "htest"
-    return(rval)
+    w <- n/p/(1 - p) # <- workaround 'codetools' inability to see the 'weights' in 'data':
+    a <- anova(lm(freq ~ score, data = list(freq = x/n, score = as.vector(score)),
+		  weights = w))
+    chisq <- c("X-squared" = a["score", "Sum Sq"])
+    structure(list(statistic = chisq,
+                   parameter = c(df = 1),
+                   p.value = pchisq(as.numeric(chisq), 1, lower.tail = FALSE),
+                   method = method, data.name = dname),
+              class = "htest")
 }
diff --git a/src/library/stats/R/qqnorm.R b/src/library/stats/R/qqnorm.R
index b40e79c..df02ebc 100644
--- a/src/library/stats/R/qqnorm.R
+++ b/src/library/stats/R/qqnorm.R
@@ -1,5 +1,5 @@
 #  File src/library/stats/R/qqnorm.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
 #  Copyright (C) 1995-2012 The R Core Team
 #
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 qqnorm <- function(y, ...) UseMethod("qqnorm")
 
diff --git a/src/library/stats/R/qqplot.R b/src/library/stats/R/qqplot.R
index 69881a9..89fd1fa 100644
--- a/src/library/stats/R/qqplot.R
+++ b/src/library/stats/R/qqplot.R
@@ -1,5 +1,5 @@
 #  File src/library/stats/R/qqplot.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
 #  Copyright (C) 1995-2012 The R Core Team
 #
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 qqplot <- function(x, y, plot.it = TRUE, xlab = deparse(substitute(x)),
 		   ylab = deparse(substitute(y)), ...)
diff --git a/src/library/stats/R/quade.test.R b/src/library/stats/R/quade.test.R
index aaba3bf..7457a0c 100644
--- a/src/library/stats/R/quade.test.R
+++ b/src/library/stats/R/quade.test.R
@@ -1,7 +1,7 @@
 #  File src/library/stats/R/quade.test.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
-#  Copyright (C) 1995-2013 The R Core Team
+#  Copyright (C) 1995-2015 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
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 quade.test <- function(y, ...) UseMethod("quade.test")
 
@@ -41,7 +41,8 @@ function(y, groups, blocks, ...)
     }
     k <- nlevels(groups)
     b <- nlevels(blocks)
-    y <- matrix(unlist(split(y, blocks)), ncol = k, byrow = TRUE)
+    ## <FIXME split.matrix>
+    y <- matrix(unlist(split(c(y), blocks)), ncol = k, byrow = TRUE)
     y <- y[complete.cases(y), ]
 #    n <- nrow(y)
     r <- t(apply(y, 1L, rank))
@@ -94,6 +95,7 @@ function(formula, data, subset, na.action, ...)
     m$formula <- formula
     if(is.matrix(eval(m$data, parent.frame())))
         m$data <- as.data.frame(data)
+    ## need stats:: for non-standard evaluation
     m[[1L]] <- quote(stats::model.frame)
     mf <- eval(m, parent.frame())
     DNAME <- paste(names(mf), collapse = " and ")
diff --git a/src/library/stats/R/quantile.R b/src/library/stats/R/quantile.R
index 9e0127f..94051f5 100644
--- a/src/library/stats/R/quantile.R
+++ b/src/library/stats/R/quantile.R
@@ -1,7 +1,7 @@
 #  File src/library/stats/R/quantile.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
-#  Copyright (C) 1995-2013 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
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 quantile <- function(x, ...) UseMethod("quantile")
 
@@ -26,7 +26,10 @@ quantile.default <-
              type = 7, ...)
 {
     if(is.factor(x)) {
-        if(!is.ordered(x) || ! type %in% c(1L, 3L))
+	if(is.ordered(x)) {
+	   if(!any(type == c(1L, 3L)))
+	       stop("'type' must be 1 or 3 for ordered factors")
+	} else
             stop("factors are not allowed")
         lx <- levels(x)
     } else lx <- NULL
@@ -51,7 +54,7 @@ quantile.default <-
             hi <- ceiling(index)
             x <- sort(x, partial = unique(c(lo, hi)))
             qs <- x[lo]
-	    i <- which(index > lo)
+	    i <- which(index > lo & x[hi] != qs) # '!=' for '>' working w/ complex
 	    h <- (index - lo)[i] # > 0	by construction
 ##	    qs[i] <- qs[i] + .minus(x[hi[i]], x[lo[i]]) * (index[i] - lo[i])
 ##	    qs[i] <- ifelse(h == 0, qs[i], (1 - h) * qs[i] + h * x[hi[i]])
@@ -91,7 +94,7 @@ quantile.default <-
             ## also h*x might be invalid ... e.g. Dates and ordered factors
             qs <- x[j+2L]
             qs[h == 1] <- x[j+3L][h == 1]
-            other <- (0 < h) & (h < 1)
+	    other <- (0 < h) & (h < 1) & (x[j+2L] != x[j+3L]) # '!=' for '<' in complex case
             if(any(other)) qs[other] <- ((1-h)*x[j+2L] + h*x[j+3L])[other]
         }
     } else {
@@ -100,11 +103,7 @@ quantile.default <-
     if(is.character(lx))
         qs <- factor(qs, levels = seq_along(lx), labels = lx, ordered = TRUE)
     if(names && np > 0L) {
-	dig <- max(2L, getOption("digits"))
-	names(qs) <- paste0(## formatC is slow for long probs
-                            if(np < 100) formatC(100*probs, format = "fg", width = 1, digits = dig)
-                            else format(100 * probs, trim = TRUE, digits = dig),
-                            "%")
+	names(qs) <- format_perc(probs)
     }
     if(na.p) { # do this more elegantly (?!)
         o.pr[p.ok] <- qs
@@ -114,6 +113,20 @@ quantile.default <-
     } else qs
 }
 
+##' Formatting() percentages the same way as quantile(*, names=TRUE).
+##' Should be exported
+##' (and format.pval() moved to stats; both documented on same page)
+format_perc <- function(x, digits = max(2L, getOption("digits")),
+			probability = TRUE, use.fC = length(x) < 100, ...)
+{
+    if(length(x)) {
+	if(probability) x <- 100 * x
+	paste0(if(use.fC) ## formatC is slow for long x
+		   formatC(x, format = "fg", width = 1, digits=digits)
+	       else format(x, trim = TRUE, digits=digits, ...), "%")
+    } else character(0)
+}
+
 IQR <- function (x, na.rm = FALSE, type = 7)
     diff(quantile(as.numeric(x), c(0.25, 0.75), na.rm=na.rm, names = FALSE,
 		  type = type))
diff --git a/src/library/stats/R/r2dtable.R b/src/library/stats/R/r2dtable.R
index d45b61e..d1109d0 100644
--- a/src/library/stats/R/r2dtable.R
+++ b/src/library/stats/R/r2dtable.R
@@ -1,5 +1,5 @@
 #  File src/library/stats/R/r2dtable.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
 #  Copyright (C) 1995-2013 The R Core Team
 #
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 r2dtable <- function(n, r, c)
 {
diff --git a/src/library/stats/R/relevel.R b/src/library/stats/R/relevel.R
index d8de1e5..add900b 100644
--- a/src/library/stats/R/relevel.R
+++ b/src/library/stats/R/relevel.R
@@ -1,5 +1,5 @@
 #  File src/library/stats/R/relevel.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
 #  Copyright (C) 1995-2012 The R Core Team
 #
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 relevel <- function(x, ref, ...) UseMethod("relevel")
 
diff --git a/src/library/stats/R/reorder.factor.R b/src/library/stats/R/reorder.factor.R
index f8afa5e..29ec68e 100644
--- a/src/library/stats/R/reorder.factor.R
+++ b/src/library/stats/R/reorder.factor.R
@@ -1,5 +1,5 @@
 #  File src/library/stats/R/reorder.factor.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
 #  Copyright (C) 1995-2012 The R Core Team
 #
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 reorder.default <- function(x, X, FUN = mean, ..., order = is.ordered(x))
 {
diff --git a/src/library/stats/R/reshape.R b/src/library/stats/R/reshape.R
index 775cef5..32011e8 100644
--- a/src/library/stats/R/reshape.R
+++ b/src/library/stats/R/reshape.R
@@ -1,5 +1,5 @@
 #  File src/library/stats/R/reshape.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
 #  Copyright (C) 1995-2013 The R Core Team
 #
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 reshape <-
     function(data, varying = NULL, v.names = NULL, timevar = "time",
@@ -63,7 +63,8 @@ reshape <-
             ll <- unlist(lapply(varying,length))
             if (any(ll != ll[1L]))
                 stop("'varying' arguments must be the same length")
-            if (ll[1L] != length(times)) stop("'times' is wrong length")
+            if (ll[1L] != length(times))
+                stop("'lengths(varying)' must all match 'length(times)'")
 
             if (!is.null(drop)) {
                 if (is.character(drop))
@@ -77,54 +78,32 @@ reshape <-
 
             ## multiple id variables
             if (length(idvar) > 1L) {
-                repeat({
-                    tempidname <- basename(tempfile("tempID"))
-                    if (!(tempidname %in% names(data))) break
-                })
-                data[ ,tempidname] <- interaction(data[, idvar], drop=TRUE)
-                idvar <- tempidname
-                drop.idvar <- TRUE
-            } else drop.idvar <- FALSE
-
+                ids <- interaction(data[, idvar], drop=TRUE)
+            } else if (idvar %in% names(data)) {
+                ids <- data[, idvar]
+            }
 
             d <- data
             all.varying <- unlist(varying)
             d <- d[,!(names(data) %in% all.varying), drop = FALSE]
-            d[,timevar] <- times[1L]
 
             if (is.null(v.names))
-                v.names <- unlist(lapply(varying, function(x) x[1L]))
-
-            for(i in seq_along(v.names))
-                d[, v.names[i]] <- data[, varying[[i]][1L] ]
-
-            if (!(idvar %in% names(data))) d[, idvar] <- ids
-
-            rval <- d
-
-            if (length(times) == 1L) {
-                if (drop.idvar) rval[, idvar] <- NULL
-                return(rval)
-            }
-            if (is.null(new.row.names))
-                row.names(rval) <- paste(d[, idvar], times[1L], sep = ".")
-            else
-                row.names(rval) <- new.row.names[1L:NROW(rval)]
-
-            for(i in 2L:length(times)) {
-                d[,timevar] <- times[i]
-                for(j in seq_along(v.names))
-                    d[, v.names[j]] <- data[, varying[[j]][i]]
-
+                v.names <- vapply(varying, `[`, 1L, FUN.VALUE=character(1L))
+                
+            rval <- do.call(rbind, lapply(seq_along(times), function(i) {
+                d[, timevar] <- times[i]
+                varying.i <- vapply(varying, `[`, i, FUN.VALUE=character(1L))
+                d[, v.names] <- data[, varying.i]
                 if (is.null(new.row.names))
-                    row.names(d) <- paste(d[, idvar], times[i], sep = ".")
+                    row.names(d) <- paste(ids, times[i], sep = ".")
                 else
-                    row.names(d) <- new.row.names[NROW(rval) + 1L:NROW(d)]
-                rval <- rbind(rval, d) ##inefficient. So sue me.
-            }
+                    row.names(d) <- new.row.names[(i-1L)*NROW(d) + 1L:NROW(d)]
+                d
+            }))
 
-            ## if we created a temporary id variable, drop it
-            if (drop.idvar) rval[, idvar] <- NULL
+            if (length(idvar) == 1L && !(idvar %in% names(data))) {
+                rval[, idvar] <- ids
+            }
 
             attr(rval,"reshapeLong") <- undoInfo
             return(rval)
@@ -240,8 +219,10 @@ reshape <-
                times <- back$times
            }
 
-           if (is.matrix(varying))
-               varying <- split(varying, row(varying))
+           if (is.matrix(varying)) {
+               ## <FIXME split.matrix>
+               varying <- split(c(varying), row(varying))
+           }
            if (is.null(varying))
                stop("'varying' must be nonempty list or vector")
            if(is.atomic(varying)) {
diff --git a/src/library/stats/R/runmed.R b/src/library/stats/R/runmed.R
index d606aaa..0182a41 100644
--- a/src/library/stats/R/runmed.R
+++ b/src/library/stats/R/runmed.R
@@ -1,11 +1,12 @@
 #  File src/library/stats/R/runmed.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
+#  Copyright (C) 2003-2017 The R Foundation
+
 #  Copyright (C) 1995 Berwin A. Turlach
 #  Ported to R, added interface to Stuetzle's code and further enhanced
 #  by Martin Maechler,
 #  Copyright (C) 1996-2002 Martin Maechler
-#  Copyright (C) 2003 The R Foundation
 #
 #  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
@@ -18,16 +19,16 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 
 runmed <- function(x, k, endrule = c("median","keep","constant"),
                    algorithm = NULL, print.level = 0)
 {
     n <- as.integer(length(x))
-    if(is.na(n)) stop("invalid value of length(x)")
+    if(is.na(n)) stop(gettextf("invalid value of %s", "length(x)"), domain = NA)
     k <- as.integer(k)
-    if(is.na(k)) stop("invalid value of 'k'")
+    if(is.na(k)) stop(gettextf("invalid value of %s", "'k'"), domain = NA)
     if(k < 0L) stop("'k' must be positive")
     if(k %% 2L == 0L)
         warning(gettextf("'k' must be odd!  Changing 'k' to %d",
@@ -109,7 +110,7 @@ smoothEnds <- function(y, k = 3)
         if (k >= 3L) {
             for (i in 3:k) {
                 j <- 2L*i - 1L
-                sm  [i]   <- med.odd( y [1L:j] ,     j) #- left border
+                sm  [i]    <- med.odd( y[1L:j]      , j) #- left border
                 sm[n-i+1L] <- med.odd( y[(n+1L-j):n], j) #- right border
             }
         }
@@ -118,6 +119,6 @@ smoothEnds <- function(y, k = 3)
     ##--- For the very first and last pt.:  Use Tukey's end-point rule: ---
     ## Ysm[1L]:= Median(Ysm[2L],X1,Z_0), where Z_0 is extrapol. from Ysm[2L],Ysm[3L]
     sm[1L] <- med3(y[1L], sm [2L] , 3*sm [2L]  - 2*sm [3L])
-    sm[n] <- med3(y[n], sm[n-1L], 3*sm[n-1L] - 2*sm[n-2L])
+    sm[n]  <- med3(y[n],  sm[n-1L], 3*sm[n-1L] - 2*sm[n-2L])
     sm
 }
diff --git a/src/library/stats/R/sd.R b/src/library/stats/R/sd.R
index f30492f..afb31f8 100644
--- a/src/library/stats/R/sd.R
+++ b/src/library/stats/R/sd.R
@@ -1,7 +1,7 @@
 #  File src/library/stats/R/sd.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
-#  Copyright (C) 1995-2013 The R Core Team
+#  Copyright (C) 1995-2015 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
@@ -14,8 +14,8 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 sd <- function(x, na.rm = FALSE)
-    sqrt(var(if(is.vector(x)) x else as.double(x), na.rm = na.rm))
+    sqrt(var(if(is.vector(x) || is.factor(x)) x else as.double(x), na.rm = na.rm))
 
diff --git a/src/library/stats/R/selfStart.R b/src/library/stats/R/selfStart.R
index 49e3e6e..dc8062d 100644
--- a/src/library/stats/R/selfStart.R
+++ b/src/library/stats/R/selfStart.R
@@ -1,5 +1,5 @@
 #  File src/library/stats/R/selfStart.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
 #  Copyright (C) 1997,1999 Jose C. Pinheiro and Douglas M. Bates
 #  Copyright (C) 2001-12  The R Core Team
@@ -15,7 +15,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 ###
 ###            self-starting nonlinear regression models
diff --git a/src/library/stats/R/shapiro.test.R b/src/library/stats/R/shapiro.test.R
index d2e4906..f7541fe 100644
--- a/src/library/stats/R/shapiro.test.R
+++ b/src/library/stats/R/shapiro.test.R
@@ -1,5 +1,5 @@
 #  File src/library/stats/R/shapiro.test.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
 #  Copyright (C) 1995-2012 The R Core Team
 #
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 shapiro.test <- function(x)
 {
diff --git a/src/library/stats/R/smooth.R b/src/library/stats/R/smooth.R
index 9a6a572..fe2c8ec 100644
--- a/src/library/stats/R/smooth.R
+++ b/src/library/stats/R/smooth.R
@@ -1,7 +1,7 @@
 #  File src/library/stats/R/smooth.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
-#  Copyright (C) 1995-2013 The R Core Team
+#  Copyright (C) 1995-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
@@ -14,23 +14,22 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 ## do.ends = TRUE  is compatible with older behavior in R
 ## --------------  but *NOT*  with Colin Goodalls "smoother" "spl()"
 
 smooth <- function(x, kind = c("3RS3R", "3RSS", "3RSR", "3R", "3", "S"),
                    twiceit = FALSE,
-                   endrule = "Tukey", do.ends = FALSE)
+                   endrule = c("Tukey", "copy"), do.ends = FALSE)
 {
     if(!is.numeric(x)) stop("attempt to smooth non-numeric values")
     if(anyNA(x)) stop("attempt to smooth NA values")
+    endrule <- match.arg(endrule)
     rules <- c("copy","Tukey")#- exact order matters!
     if(is.na(iend <- pmatch(endrule, rules))) stop("invalid 'endrule' argument")
-    n <- as.integer(length(x))
-    if(is.na(n)) stop("invalid length(x)")
     kind <- match.arg(kind)
-    if(substr(kind ,1L, 3L) == "3RS" && !do.ends) iend <- -iend
+    if(substr(kind, 1L, 3L) == "3RS" && !do.ends) iend <- -iend
     else if(kind == "S") iend <- as.logical(do.ends)
     type <- match(kind, c("3RS3R", "3RSS", "3RSR", "3R", "3", "S"))
     smo <- .Call(C_Rsm, as.double(x), type, iend)
diff --git a/src/library/stats/R/smspline.R b/src/library/stats/R/smspline.R
index b9ca075..1c317e6 100644
--- a/src/library/stats/R/smspline.R
+++ b/src/library/stats/R/smspline.R
@@ -1,7 +1,7 @@
 #  File src/library/stats/R/smspline.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
-#  Copyright (C) 1995-2014 The R Core Team
+#  Copyright (C) 1995-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
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 .nknots.smspl <- function(n) {
     ## Number of inner knots
@@ -36,10 +36,12 @@ n.knots <- function(n) {
 }
 
 smooth.spline <-
-    function(x, y = NULL, w = NULL, df, spar = NULL, cv = FALSE,
+    function(x, y = NULL, w = NULL, df, spar = NULL, lambda = NULL, cv = FALSE,
              all.knots = FALSE, nknots = .nknots.smspl, keep.data = TRUE,
              df.offset = 0, penalty = 1, control.spar = list(),
-             tol = 1e-6 * IQR(x))
+	     tol = 1e-6 * IQR(x),
+	     keep.stuff = FALSE) # was "fix" till R 3.3.x
+
 {
     contr.sp <- list(low = -1.5, # low = 0.      was default till R 1.3.x
                      high = 1.5,
@@ -47,19 +49,21 @@ smooth.spline <-
                      eps = 2e-8, # eps = 0.00244 was default till R 1.3.x
                      maxit = 500, trace = getOption("verbose"))
     contr.sp[names(control.spar)] <- control.spar
-    if(!all(sapply(contr.sp[1:4], is.numeric)) ||
+    ctrl.Num <- contr.sp[1:4]
+    if(!all(vapply(ctrl.Num, is.numeric, NA)) ||
        contr.sp$tol < 0 || contr.sp$eps <= 0 || contr.sp$maxit <= 0)
         stop("invalid 'control.spar'")
 
-    xy <- xy.coords(x, y)
+    xy <- xy.coords(x, y, setLab=FALSE)
     y <- xy$y
     x <- xy$x
     if(!all(is.finite(c(x, y))))
         stop("missing or infinite values in inputs are not allowed")
     n <- length(x)
     if(is.na(n)) stop("invalid number of points")
+    no.wgts <- is.null(w)
     w <-
-	if(is.null(w)) rep_len(1, n)
+	if(no.wgts) 1 # rep_len(1, n)
 	else {
 	    if(n != length(w)) stop("lengths of 'x' and 'w' must match")
 	    if(any(w < 0)) stop("all weights should be non-negative")
@@ -70,6 +74,7 @@ smooth.spline <-
     ## Replace y[], w[] for same x[] (to a precision of 'tol') by their mean :
     if(!is.finite(tol) || tol <= 0)
         stop("'tol' must be strictly positive and finite")
+    if(!match(keep.stuff, c(FALSE,TRUE))) stop("invalid 'keep.stuff'")
     xx <- round((x - mean(x))/tol)  # de-mean to avoid possible overflow
     nd <- !duplicated(xx); ux <- sort(x[nd]); uxx <- sort(xx[nd])
     nx <- length(ux)
@@ -85,9 +90,11 @@ smooth.spline <-
 		   simplify = simplify, USE.NAMES = FALSE)
 	}
 	tmp <- matrix(unlist(tapply1(seq_len(n), ox,
-				     function(i, y, w)
-				     c(sum(w[i]), sum(w[i]*y[i]),sum(w[i]*y[i]^2)),
-				     y = y, w = w), use.names = FALSE),
+				     if(length(w) == 1L) function(i)
+					 c(length(i), sum(y[i]), sum(y[i]^2))
+				     else function(i)
+					 c(sum(w[i]), sum(w[i]*y[i]),sum(w[i]*y[i]^2))),
+                             use.names = FALSE),
 		      ncol = 3, byrow = TRUE)
     }
     wbar <- tmp[, 1L]
@@ -101,33 +108,53 @@ smooth.spline <-
         warning("cross-validation with non-unique 'x' values seems doubtful")
     r.ux <- ux[nx] - ux[1L]
     xbar <- (ux - ux[1L])/r.ux           # scaled to [0,1]
-    if(all.knots) {
-        if(!missing(nknots) && !is.null(nknots))
-            warning("'all.knots' is TRUE; 'nknots' specification is disregarded")
-        nknots <- nx
-    } else if(is.null(nknots))# <- for back compatibility
-	nknots <- .nknots.smspl(nx)
-    else {
-	if(is.function(nknots))
-	    nknots <- nknots(nx)
-	else if(!is.numeric(nknots))
-	    stop("'nknots' must be numeric (in {1,..,n})")
-	if(nknots < 1)
-	    stop("'nknots' must be at least 1")
-	else if(nknots > nx)
-	    stop("cannot use more inner knots than unique 'x' values")
+    if(is.numeric(all.knots)) {
+	if(is.unsorted(all.knots, strictly = TRUE))
+	    stop("Numeric 'all.knots' must be strictly increasing")
+	if(!missing(nknots) && !is.null(nknots))
+	    warning("'all.knots' is vector of knots; 'nknots' specification is disregarded")
+	nknots <- length(all.knots)
+	if(0 < all.knots[1] || all.knots[nknots] < 1)
+	    stop("numeric 'all.knots' must cover [0,1] (= the transformed data-range)")
+        ## otherwise, it seg.faults when .Fortran() is returning (why ?)
+        knot <- c(rep(all.knots[1 ], 3),
+                  all.knots,
+                  rep(all.knots[nknots], 3))
+    } else {
+        if(all.knots) {
+            if(!missing(nknots) && !is.null(nknots))
+                warning("'all.knots' is TRUE; 'nknots' specification is disregarded")
+            nknots <- nx
+        } else if(is.null(nknots))# <- for back compatibility
+            nknots <- .nknots.smspl(nx)
+        else { ## all.knots is false; nknots not NULL
+            if(is.function(nknots))
+                nknots <- nknots(nx)
+            else if(!is.numeric(nknots))
+                stop("'nknots' must be numeric (in {1,..,n})")
+            if(nknots < 1)
+                stop("'nknots' must be at least 1")
+            else if(nknots > nx)
+                stop("cannot use more inner knots than unique 'x' values")
+        }
+        knot <- c(rep(xbar[1 ], 3),
+                  if(all.knots) xbar else xbar[seq.int(1, nx, length.out = nknots)],
+                  rep(xbar[nx], 3))
     }
-    knot <- c(rep(xbar[1 ], 3),
-              if(all.knots) xbar else xbar[seq.int(1, nx, length.out = nknots)],
-              rep(xbar[nx], 3))
     nk <- nknots + 2L ## == length(knot) - 4
 
-    ## ispar != 1 : compute spar (later)
-    ispar <-
-        if(is.null(spar) || missing(spar)) { ## || spar == 0
-            if(contr.sp$trace) -1L else 0L
-        } else 1L
-    spar <- if(ispar == 1L) as.double(spar) else double(1)
+    spar.is.lambda <- !missing(lambda)
+    if (spar.is.lambda <- !missing(lambda)) {
+        if(!missing(spar)) stop("must not specify both 'spar' and 'lambda'")
+        ispar <- 1L
+    } else
+        ## ispar != 1 : compute spar (later)
+        ispar <-
+            if(is.null(spar) || missing(spar)) { ## || spar == 0
+                if(contr.sp$trace) -1L else 0L
+            } else 1L
+    spar <- if(spar.is.lambda) as.double(lambda)
+            else if(ispar == 1L) as.double(spar) else double(1)
     ## was <- if(missing(spar)) 0 else if(spar < 1.01e-15) 0 else  1
     ## but package forecast passed a length-0 vector.
     if(length(spar) != 1) stop("'spar' must be of length 1")
@@ -138,17 +165,14 @@ smooth.spline <-
     dofoff <- df.offset
     if(!missing(df)) { # not when cv was NA
 	if(df > 1 && df <= nx) {
-	    if(!missing(cv))
-		warning("specified both 'df' and 'cv'; will disregard the latter")
 	    icrit <- 3L
 	    dofoff <- df
-	} else warning("you must supply 1 < df <= n,  n = #{unique x} = ", nx)
+	} else warning("not using invalid df; must have 1 < df <= n := #{unique x} = ", nx)
     }
-    iparms <- c(icrit=icrit, ispar=ispar, iter=as.integer(contr.sp$maxit))
-
-    keep.stuff <- FALSE ## << to become an argument in the future
+    iparms <- c(icrit=icrit, ispar=ispar, iter = as.integer(contr.sp$maxit),
+                spar.is.lambda)
     ans.names <- c("coef","ty","lev","spar","parms","crit","iparms","ier",
-                   if(keep.stuff) "scratch")
+		   if(keep.stuff) "scratch")
     fit <- .Fortran(C_rbart,		# code in ../src/qsbart.f
 		    as.double(penalty),
 		    as.double(dofoff),
@@ -165,27 +189,25 @@ smooth.spline <-
 		    crit = double(1),
 		    iparms = iparms,
 		    spar = spar,
-		    parms = unlist(contr.sp[1:4]),
-		    scratch = double(17L * nk + 1L),
+		    parms = c(unlist(ctrl.Num), ratio = -1.), # no NA here
+		    scratch = double((17L+1L) * nk + 1L),#
 		    ld4  = 4L,
 		    ldnk = 1L,
 		    ier = integer(1L)
 		    )[ans.names]
-    ## now we have clobbered wbar, recompute it.
-    wbar <- tmp[, 1]
 
     if(is.na(cv)) lev <- df <- NA
-    else {
+    else { # now when dpfa() with 'tol', signals error earlier, happens less often:
 	lev <- fit$lev
 	df <- sum(lev)
 	if(is.na(df))
 	    stop("NA lev[]; probably smoothing parameter 'spar' way too large!")
     }
     if(fit$ier > 0L ) {
-        sml <- fit$spar < 0.5
-	wtxt <- paste("smoothing parameter value too",
-                      if(sml) "small" else "large")
-        if(sml) {
+	offKind <- if(spar.is.lambda) "extreme" # not easy to know if small | large
+		   else if(sml <- fit$spar < 0.5) "small" else "large"
+	wtxt <- paste("smoothing parameter value too", offKind)
+        if(spar.is.lambda || sml) {
             ## used to give warning too and mean() as below, but that's rubbish
             stop(wtxt)
         } else {
@@ -196,27 +218,40 @@ smooth.spline <-
     }
     cv.crit <-
 	if(is.na(cv)) NA
-	else if(cv) {
-	    ww <- wbar
-	    ww[!(ww > 0)] <- 1
-	    weighted.mean(((y - fit$ty[ox])/(1 - (lev[ox] * w)/ww[ox]))^2, w)
-	} else weighted.mean((y - fit$ty[ox])^2, w)/
-	    (1 - (df.offset + penalty * df)/n)^2
-    pen.crit <- sum(wbar * (ybar - fit$ty)^2)
-    fit.object <- list(knot = knot, nk = nk, min = ux[1L], range = r.ux,
-		       coef = fit$coef)
-    class(fit.object) <- "smooth.spline.fit"
-    ## parms :  c(low = , high = , tol = , eps = )
-    object <- list(x = ux, y = fit$ty, w = wbar, yin = ybar,
-                   data = if(keep.data) list(x = x, y = y, w = w),
-		   lev = lev, cv.crit = cv.crit, pen.crit = pen.crit,
-                   crit = fit$crit,
-                   df = df, spar = fit$spar,
-                   lambda = unname(fit$parms["low"]),
-                   iparms = fit$iparms, # c(icrit= , ispar= , iter= )
-                   fit = fit.object, call = match.call())
-    class(object) <- "smooth.spline"
-    object
+	else {
+	    r <- y - fit$ty[ox]
+	    if(cv) {
+		ww <- wbar
+		ww[ww == 0] <- 1
+		r <- r / (1 - (lev[ox] * w)/ww[ox])
+		if(no.wgts) mean(r^2) else weighted.mean(r^2, w)
+	    } else
+		(if(no.wgts) mean(r^2) else weighted.mean(r^2, w)) /
+		    (1 - (df.offset + penalty * df)/n)^2
+        }
+    ## return :
+    structure(
+	## parms :  c(low = , high = , tol = , eps = )
+	list(x = ux, y = fit$ty, w = wbar, yin = ybar, tol = tol,
+	     data = if(keep.data) list(x = x, y = y, w = w), no.weights = no.wgts,
+	     lev = lev, cv.crit = cv.crit,
+	     pen.crit = sum(wbar * (ybar - fit$ty)^2),
+	     crit = fit$crit,
+	     df = df,
+	     spar = if(spar.is.lambda) NA else fit$spar,
+	     ratio= if(spar.is.lambda) NA else fit$parms[["ratio"]],
+	     lambda = fit$parms[["low"]],
+	     iparms = c(fit$iparms, errorI = if(fit$ier) fit$ier else NA),#c(icrit= ,ispar= ,iter= )
+	     auxM = if(keep.stuff)
+			list(XWy  = fit$scratch[      seq_len(nk)],
+			     XWX  = fit$scratch[nk  + seq_len(4*nk)],
+			     Sigma= fit$scratch[5*nk+ seq_len(4*nk)],
+			     R    = fit$scratch[9*nk+ seq_len(4*nk)] ),
+	     fit = structure(list(knot = knot, nk = nk, min = ux[1L], range = r.ux,
+				  coef = fit$coef),
+			     class = "smooth.spline.fit"),
+	     call = match.call()),
+	class = "smooth.spline")
 }
 
 fitted.smooth.spline <- function(object, ...) {
@@ -248,6 +283,15 @@ residuals.smooth.spline <-
     res
 }
 
+hatvalues.smooth.spline <- function (model, ...) {
+    if(!is.list(dat <- model$data))
+        stop("need result of smooth.spline(keep.data = TRUE)")
+    ## "expand" leverages:
+    hat <- model$lev
+    hat[hat > 1 - 10 * .Machine$double.eps] <- 1 # as in hatvalues.lm
+    hat[match(dat$x, model$x)]
+}
+
 
 print.smooth.spline <- function(x, digits = getOption("digits"), ...)
 {
@@ -264,10 +308,11 @@ print.smooth.spline <- function(x, digits = getOption("digits"), ...)
     cat("\n")
     cat("Equivalent Degrees of Freedom (Df):", format(x$df,digits=digits))
     cat("\n")
-    cat("Penalized Criterion:", format(x$pen.crit, digits=digits))
-    cat("\n")
+    cat(sprintf("Penalized Criterion (%sRSS): %s\n",
+		if(x$no.weights) "" else "weighted ",
+		format(x$pen.crit, digits=digits)))
     if(!is.na(cv))
-        cat(if(cv) "PRESS: " else "GCV: ",
+	cat(if(cv) "PRESS(l.o.o. CV): " else "GCV: ",
             format(x$cv.crit, digits = digits), "\n", sep = "")
     invisible(x)
 }
@@ -328,15 +373,15 @@ predict.smooth.spline.fit <- function(object, x, deriv = 0, ...)
 }
 
 supsmu <-
-  function(x, y, wt = rep(1, n), span = "cv", periodic = FALSE, bass = 0)
+  function(x, y, wt = rep(1, n), span = "cv", periodic = FALSE, bass = 0, trace = FALSE)
 {
     if(span == "cv") span <- 0
+    else if(span < 0 || span > 1) stop("'span' must be between 0 and 1.")
     n <- length(y)
     if(!n || !is.numeric(y)) stop("'y' must be numeric vector")
     if(length(x) != n) stop("number of observations in 'x' and 'y' must match.")
     if(length(wt) != n)
 	stop("number of weights must match number of observations.")
-    if(span < 0 || span > 1) stop("'span' must be between 0 and 1.")
     if(periodic) {
 	iper <- 2L
 	xrange <- range(x)
@@ -355,7 +400,7 @@ supsmu <-
                                  "%d observation with NA, NaN or Inf deleted",
                                  "%d observations with NAs, NaNs and/or Infs deleted"),
                         diff), domain = NA)
-    .Fortran(C_setsmu)
+    .Fortran(C_setsmu, as.integer(trace))
     smo <- .Fortran(C_supsmu,
 		    as.integer(leno),
 		    as.double(xo),
diff --git a/src/library/stats/R/spectrum.R b/src/library/stats/R/spectrum.R
index 150cb48..398a5ac 100644
--- a/src/library/stats/R/spectrum.R
+++ b/src/library/stats/R/spectrum.R
@@ -1,8 +1,8 @@
 #  File src/library/stats/R/spectrum.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
 #  Copyright (C) 1994-9 W. N. Venables and B. D. Ripley
-#  Copyright (C) 1999-2013 The R Core Team
+#  Copyright (C) 1999-2015 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
@@ -15,7 +15,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 ## based on code by Martyn Plummer, plus kernel code by Adrian Trapletti
 spectrum <- function (x, ..., method = c("pgram", "ar"))
@@ -215,11 +215,13 @@ plot.spec <-
     log <- match.arg(log)
     m <- match.call()
     if(plot.type == "coherency") {
+        ## need stats:: for non-standard evaluation
         m[[1L]] <- quote(stats::plot.spec.coherency)
         m$plot.type <- m$log <- m$add <- NULL
         return(eval(m, parent.frame()))
     }
     if(plot.type == "phase") {
+        ## need stats:: for non-standard evaluation
         m[[1L]] <- quote(stats::plot.spec.phase)
         m$plot.type <- m$log <- m$add <- NULL
         return(eval(m, parent.frame()))
diff --git a/src/library/stats/R/spline.R b/src/library/stats/R/spline.R
index a72ae01..d2d782c 100644
--- a/src/library/stats/R/spline.R
+++ b/src/library/stats/R/spline.R
@@ -1,7 +1,7 @@
 #  File src/library/stats/R/spline.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
-#  Copyright (C) 1995-2012 The R Core Team
+#  Copyright (C) 1995-2017 The R Core Team
 #                2002 Simon N. Wood
 #
 #  This program is free software; you can redistribute it and/or modify
@@ -15,7 +15,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 #### 'spline' and 'splinefun' are very similar --- keep in sync!
 ####               --------- has more
@@ -32,8 +32,7 @@ spline <-
     y <- x$y
     x <- x$x
     nx <- as.integer(length(x))
-    if(is.na(nx)) stop("invalid value of length(x)")
-
+    if(is.na(nx)) stop(gettextf("invalid value of %s", "length(x)"), domain = NA)
     if(nx == 0) stop("zero non-NA points")
 
     if(method == 1L && y[1L] != y[nx]) { # periodic
diff --git a/src/library/stats/R/splinefun.R b/src/library/stats/R/splinefun.R
index 4dd60e5..99a0bec 100644
--- a/src/library/stats/R/splinefun.R
+++ b/src/library/stats/R/splinefun.R
@@ -1,7 +1,7 @@
 #  File src/library/stats/R/splinefun.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
-#  Copyright (C) 1995-2013 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
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 #### 'spline' and 'splinefun' are very similar --- keep in sync!
 ####  also consider ``compatibility'' with  'approx' and 'approxfun'
@@ -28,7 +28,7 @@ splinefun <-
     y <- x$y
     x <- x$x
     nx <- as.integer(length(x))
-    if(is.na(nx)) stop("invalid value of length(x)")
+    if(is.na(nx)) stop(gettextf("invalid value of %s", "length(x)"), domain = NA)
     if(nx == 0) stop("zero non-NA points")
     method <- match.arg(method)
     if(method == "periodic" && y[1L] != y[nx]) {
@@ -143,7 +143,6 @@ splinefunH0 <- function(x0, y0, m, dx = x0[-1L] - x0[-length(x0)])
 	else # deriv == 3
 	    interp <- function(x, i) {
 		h <- dx[i]
-		t <- (x - x0[i]) / h
 		## 3rd derivative of Hermite polynomials h00, h01,h10, h11
 		h01 <- -12 # h00 = - h01
 		h10 <- 6
diff --git a/src/library/stats/R/stats-defunct.R b/src/library/stats/R/stats-defunct.R
index e13339f..8385da9 100644
--- a/src/library/stats/R/stats-defunct.R
+++ b/src/library/stats/R/stats-defunct.R
@@ -1,5 +1,5 @@
 #  File src/library/stats/R/stats-defunct.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
 #  Copyright (C) 1995-2012 The R Core Team
 #
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 ## <entry>
 ## Deprecated in 1.4.0
diff --git a/src/library/stats/R/stats-deprecated.R b/src/library/stats/R/stats-deprecated.R
index 5e13569..d124b8a 100644
--- a/src/library/stats/R/stats-deprecated.R
+++ b/src/library/stats/R/stats-deprecated.R
@@ -1,5 +1,5 @@
 #  File src/library/stats/R/stats-deprecated.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
 #  Copyright (C) 1995-2013 The R Core Team
 #
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 ## <entry>
 ## Deprecated in 2.10.0
diff --git a/src/library/stats/R/stepfun.R b/src/library/stats/R/stepfun.R
index 424bbfd..d4e1525 100644
--- a/src/library/stats/R/stepfun.R
+++ b/src/library/stats/R/stepfun.R
@@ -1,7 +1,7 @@
 #  File src/library/stats/R/stepfun.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
-#  Copyright (C) 1995-2012 The R Core Team
+#  Copyright (C) 1995-2014 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
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 ## Constructor for  Step Functions:
 
diff --git a/src/library/stats/R/stl.R b/src/library/stats/R/stl.R
index 0a95883..bc389fe 100644
--- a/src/library/stats/R/stl.R
+++ b/src/library/stats/R/stl.R
@@ -1,7 +1,7 @@
 #  File src/library/stats/R/stl.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
-#  Copyright (C) 1995-2012 The R Core Team
+#  Copyright (C) 1995-2014 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
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 stl <- function(x, s.window,
 		s.degree = 0,
@@ -36,7 +36,7 @@ stl <- function(x, s.window,
     deg.check <- function(deg) {
 	degname <- deparse(substitute(deg))
 	deg <- as.integer(deg)
-	if(deg < 0 || deg > 1) stop(degname, " must be 0 or 1")
+	if(deg < 0 || deg > 1) stop(gettextf("%s must be 0 or 1", degname), domain = NA)
 	deg
     }
     x <- na.action(as.ts(x))
diff --git a/src/library/stats/R/symnum.R b/src/library/stats/R/symnum.R
index a08ae15..1352c10 100644
--- a/src/library/stats/R/symnum.R
+++ b/src/library/stats/R/symnum.R
@@ -1,5 +1,5 @@
 #  File src/library/stats/R/symnum.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
 #  Copyright (C) 1995-2012 The R Core Team
 #
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 symnum <- function(x, cutpoints = c(  .3,  .6,	 .8,  .9, .95),
 		   symbols = if(numeric.x) c(" ", ".", ",", "+", "*", "B")
diff --git a/src/library/stats/R/t.test.R b/src/library/stats/R/t.test.R
index e25c695..3df63be 100644
--- a/src/library/stats/R/t.test.R
+++ b/src/library/stats/R/t.test.R
@@ -1,7 +1,7 @@
 #  File src/library/stats/R/t.test.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
-#  Copyright (C) 1995-2013 The R Core Team
+#  Copyright (C) 1995-2015 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
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 t.test <- function(x, ...) UseMethod("t.test")
 
@@ -132,6 +132,7 @@ function(formula, data, subset, na.action, ...)
     m <- match.call(expand.dots = FALSE)
     if(is.matrix(eval(m$data, parent.frame())))
         m$data <- as.data.frame(data)
+    ## need stats:: for non-standard evaluation
     m[[1L]] <- quote(stats::model.frame)
     m$... <- NULL
     mf <- eval(m, parent.frame())
diff --git a/src/library/stats/R/termplot.R b/src/library/stats/R/termplot.R
index f91ae6e..67be5c3 100644
--- a/src/library/stats/R/termplot.R
+++ b/src/library/stats/R/termplot.R
@@ -1,7 +1,7 @@
 #  File src/library/stats/R/termplot.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
-#  Copyright (C) 1995-2013 The R Core Team
+#  Copyright (C) 1995-2014 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
@@ -14,9 +14,9 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
-termplot <- function(model, data = NULL,envir = environment(formula(model)),
+termplot <- function(model, data = NULL, envir = environment(formula(model)),
                      partial.resid = FALSE,
 		     rug = FALSE, terms = NULL, se = FALSE,
                      xlabs = NULL, ylabs = NULL,
@@ -49,7 +49,7 @@ termplot <- function(model, data = NULL,envir = environment(formula(model)),
     if (any(grepl(":", nmt, fixed = TRUE)))
         warning("'model' appears to involve interactions: see the help page",
                 domain = NA, immediate. = TRUE)
-    cn <- parse(text = nmt)
+    cn <- parse(text = nmt, keep.source = FALSE)
     ## Defaults:
     if (!is.null(smooth))
       smooth <- match.fun(smooth)
diff --git a/src/library/stats/R/ts-tests.R b/src/library/stats/R/ts-tests.R
index 31cda8d..7475cb9 100644
--- a/src/library/stats/R/ts-tests.R
+++ b/src/library/stats/R/ts-tests.R
@@ -1,7 +1,7 @@
 #  File src/library/stats/R/ts-tests.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
-#  Copyright (C) 1995-2012 The R Core Team
+#  Copyright (C) 1995-2015 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
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 Box.test <- function (x, lag = 1, type=c("Box-Pierce", "Ljung-Box"), fitdf=0)
 {
@@ -56,12 +56,12 @@ PP.test <- function (x, lshort = TRUE)
     yt <- z[,1]
     yt1 <- z[,2]
     n <- length (yt)
-    tt <- (1L:n)-n/2
-    res <- lm (yt~1+tt+yt1)
+    u <- (1L:n)-n/2
+    res <- lm(yt ~ 1 + u + yt1)
     if (res$rank < 3)
         stop ("singularities in regression")
-    res.sum <- summary (res)
-    tstat <- (res.sum$coefficients[3,1]-1)/res.sum$coefficients[3,2]
+    cf <- coef(summary(res))
+    tstat <- (cf[3,1] - 1) / cf[3,2]
     u <- residuals (res)
     ssqru <- sum(u^2)/n
     l <- if (lshort) trunc(4*(n/100)^0.25) else trunc(12*(n/100)^0.25)
diff --git a/src/library/stats/R/ts.R b/src/library/stats/R/ts.R
index f3dfd14..ccb0968 100644
--- a/src/library/stats/R/ts.R
+++ b/src/library/stats/R/ts.R
@@ -1,7 +1,7 @@
 #  File src/library/stats/R/ts.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
-#  Copyright (C) 1995-2013 The R Core Team
+#  Copyright (C) 1995-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
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 start	  <- function(x, ...) UseMethod("start")
 end	  <- function(x, ...) UseMethod("end")
@@ -90,10 +90,13 @@ tsp <- function(x) attr(x, "tsp")
 {
     cl <- oldClass(x)
     attr(x, "tsp") <- value # does error-checking internally
-    if (inherits(x, "ts") && is.null(value))
-        class(x) <- if(!identical(cl,"ts")) cl["ts" != cl]
-    else if (inherits(x, "mts") && is.null(value))
-        class(x) <- if(!identical(cl,"mts")) cl["mts" != cl]
+    if (is.null(value)) {
+        if (inherits(x, "ts"))
+	    cl <- cl["ts" != cl]
+        if (inherits(x, "mts"))
+	    cl <- cl["mts" != cl]
+        class(x) <- cl
+    }
     x
 }
 
@@ -487,25 +490,26 @@ plot.ts <-
 	    on.exit(par(oldpar))
 	    for(i in 1L:nser) {
 		plot.default(x[, i], axes = FALSE, xlab="", ylab="",
-		     log = log, col = col, bg = bg, pch = pch, ann = ann,
-		     type = "n", ...)
-		panel(x[, i], col = col, bg = bg, pch = pch, type=type, ...)
+                             log = log, col = col, bg = bg, pch = pch, ann = ann,
+                             type = "n", ...)
+		panel(x[, i], col = col, bg = bg, pch = pch,
+		      cex = cex, lwd = lwd, lty = lty, type = type, ...)
 		if(frame.plot) box(...)
 		y.side <- if (i %% 2 || !yax.flip) 2 else 4
 		do.xax <- i %% nr == 0 || i == nser
 		if(axes) {
 		    axis(y.side, xpd = NA, cex.axis = cex.axis,
-                         col.axis = col.axis, font.axis = font.axis)
+			 col.axis = col.axis, font.axis = font.axis, ...)
 		    if(do.xax)
 			axis(1, xpd = NA, cex.axis = cex.axis,
-                             col.axis = col.axis, font.axis = font.axis)
+			     col.axis = col.axis, font.axis = font.axis, ...)
 		}
 		if(ann) {
 		    mtext(nm[i], y.side, line=3, cex=cex.lab, col=col.lab,
                           font=font.lab, ...)
 		    if(do.xax)
 			mtext(xlab, side=1, line=3, cex=cex.lab, col=col.lab,
-                          font=font.lab, ...)
+			      font=font.lab, ...)
 		}
 	    }
 	    if(ann && !is.null(main)) {
@@ -526,26 +530,29 @@ plot.ts <-
 		xy <- ts.intersect(x, y)
 		xy <- xy.coords(xy[,1], xy[,2], xlabel, ylabel, log)
 	    } else
-	    xy <- xy.coords(x, y, xlabel, ylabel, log)
+		xy <- xy.coords(x, y, xlabel, ylabel, log)
 	    xlab <- if (missing(xlab)) xy$xlab else xlab
 	    ylab <- if (missing(ylab)) xy$ylab else ylab
 	    xlim <- if (is.null(xlim)) range(xy$x[is.finite(xy$x)]) else xlim
 	    ylim <- if (is.null(ylim)) range(xy$y[is.finite(xy$y)]) else ylim
-	    n <- length(xy $ x)		  #-> default for xy.l(ines|abels)
+	    n <- length(xy $ x)
 	    if(missing(xy.labels)) xy.labels <- (n <= 150)
-	    if(!is.logical(xy.labels)) {
-		if(!is.character(xy.labels))
-		    stop("'xy.labels' must be logical or character")
-		do.lab <- TRUE
-	    } else do.lab <- xy.labels
+	    do.lab <-
+		if(is.logical(xy.labels))
+		    xy.labels
+		else {
+		    if(!is.character(xy.labels))
+			stop("'xy.labels' must be logical or character")
+		    TRUE
+		}
+	    ptype <- if(do.lab) "n" else if(missing(type)) "p" else type
 
             dev.hold(); on.exit(dev.flush())
-	    ptype <-
-		if(do.lab) "n" else if(missing(type)) "p" else type
 	    plot.default(xy, type = ptype,
 			 xlab = xlab, ylab = ylab,
 			 xlim = xlim, ylim = ylim, log = log, col = col, bg = bg,
-			 pch = pch, axes = axes, frame.plot = frame.plot,
+			 pch=pch, cex=cex, lty=lty, lwd=lwd,
+                         axes = axes, frame.plot = frame.plot,
 			 ann = ann, main = main, ...)
 	    if(missing(xy.lines)) xy.lines <- do.lab
 	    if(do.lab)
@@ -572,10 +579,10 @@ plot.ts <-
 	    k <- ncol(x)
 	    tx <- time(x)
 	    xy <- xy.coords(x = matrix(rep.int(tx, k), ncol = k),
-			    y = x, log = log)
+			    y = x, log = log, setLab = FALSE)
 	    xy$x <- tx
 	}
-	else xy <- xy.coords(x, NULL, log = log)
+	else xy <- xy.coords(x, NULL, log = log, setLab = FALSE)
 	if(is.null(xlim)) xlim <- range(xy$x)
 	if(is.null(ylim)) ylim <- range(xy$y[is.finite(xy$y)])
 	plot.new()
@@ -588,11 +595,13 @@ plot.ts <-
 			      lwd = lwd[(i-1L) %% length(lwd) + 1L],
 			      bg  = bg [(i-1L) %% length(bg) + 1L],
 			      pch = pch[(i-1L) %% length(pch) + 1L],
+			      cex = cex[(i-1L) %% length(cex) + 1L],
 			      type = type)
 	}
 	else {
 	    lines.default(xy$x, x, col = col[1L], bg = bg, lty = lty[1L],
-			  lwd = lwd[1L], pch = pch[1L], type = type)
+			  lwd = lwd[1L], pch = pch[1L],
+			  cex = cex[1L], type = type)
 	}
 	if (ann)
 	    title(main = main, xlab = xlab, ylab = ylab, ...)
@@ -601,7 +610,8 @@ plot.ts <-
 	    axis(2, ...)
 	}
 	if (frame.plot) box(...)
-    }
+    }## {plotts}
+
     xlabel <- if (!missing(x)) deparse(substitute(x))# else NULL
     ylabel <- if (!missing(y)) deparse(substitute(y))
     plotts(x = x, y = y, plot.type = plot.type,
@@ -711,6 +721,7 @@ window.ts <- function (x, ...) as.ts(window.default(x, ...))
     m <- match.call(expand.dots = FALSE)
     m$value <- NULL
     m$extend <- TRUE
+    ## need stats:: for non-standard evaluation
     m[[1L]] <- quote(stats::window)
     xx <- eval.parent(m)
     xxtsp <- tsp(xx)
diff --git a/src/library/stats/R/tukeyline.R b/src/library/stats/R/tukeyline.R
index 8d26174..d1f66f4 100644
--- a/src/library/stats/R/tukeyline.R
+++ b/src/library/stats/R/tukeyline.R
@@ -1,7 +1,7 @@
 #  File src/library/stats/R/tukeyline.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
-#  Copyright (C) 1995-2012 The R Core Team
+#  Copyright (C) 1995-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
@@ -14,11 +14,11 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 line <- function(x, y = NULL)
 {
-    xy <- xy.coords(x, y)
+    xy <- xy.coords(x, y, setLab = FALSE)
     ok <- complete.cases(xy$x,xy$y)
     Call <- sys.call()
     structure(.Call(C_tukeyline, as.double(xy$x[ok]), as.double(xy$y[ok]),
diff --git a/src/library/stats/R/update.R b/src/library/stats/R/update.R
index 8c7e4dc..607dbf8 100644
--- a/src/library/stats/R/update.R
+++ b/src/library/stats/R/update.R
@@ -1,5 +1,5 @@
 #  File src/library/stats/R/update.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
 #  Copyright (C) 1995-2012 The R Core Team
 #
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 getCall <- function(x, ...) UseMethod("getCall")
 getCall.default <- function(x, ...) getElement(x, "call")
diff --git a/src/library/stats/R/var.test.R b/src/library/stats/R/var.test.R
index 1948082..0f4e0e9 100644
--- a/src/library/stats/R/var.test.R
+++ b/src/library/stats/R/var.test.R
@@ -1,7 +1,7 @@
 #  File src/library/stats/R/var.test.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
-#  Copyright (C) 1995-2012 The R Core Team
+#  Copyright (C) 1995-2015 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
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 var.test <- function(x, ...) UseMethod("var.test")
 
@@ -93,6 +93,7 @@ function(formula, data, subset, na.action, ...)
     m <- match.call(expand.dots = FALSE)
     if(is.matrix(eval(m$data, parent.frame())))
         m$data <- as.data.frame(data)
+    ## need stats:: for non-standard evaluation
     m[[1L]] <- quote(stats::model.frame)
     m$... <- NULL
     mf <- eval(m, parent.frame())
diff --git a/src/library/stats/R/vcov.R b/src/library/stats/R/vcov.R
index 4b4fc48..12d5bd2 100644
--- a/src/library/stats/R/vcov.R
+++ b/src/library/stats/R/vcov.R
@@ -1,5 +1,5 @@
 #  File src/library/stats/R/vcov.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
 #  Copyright (C) 1994-2002 W. N. Venables and B. D. Ripley
 #  Copyright (C) 2002-11 The R Core Team
@@ -15,7 +15,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 vcov <- function(object, ...) UseMethod("vcov")
 
@@ -43,3 +43,16 @@ vcov.summary.lm  <- function(object, ...) object$sigma^2 * object$cov.unscaled
 
 ## gls and lme methods moved to nlme in 2.6.0
 
+
+### "The" sigma in lm/nls - "like" models:
+
+sigma <- function(object, ...) UseMethod("sigma")
+
+## works whenever deviance(), nobs() and coef() do fine:
+sigma.default <- function (object, use.fallback=TRUE, ...)
+    sqrt(deviance(object, ...) /
+             (nobs(object, use.fallback=use.fallback) - length(coef(object))))
+
+sigma.mlm <- function (object, ...)
+    sqrt(colSums(object$residuals^2) / object$df.residual)
+
diff --git a/src/library/stats/R/weighted.mean.R b/src/library/stats/R/weighted.mean.R
index c2db0cb..d9e0f11 100644
--- a/src/library/stats/R/weighted.mean.R
+++ b/src/library/stats/R/weighted.mean.R
@@ -1,5 +1,5 @@
 #  File src/library/stats/R/weighted.mean.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
 #  Copyright (C) 1995-2012 The R Core Team
 #
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 weighted.mean <- function(x, w, ...) UseMethod("weighted.mean")
 
diff --git a/src/library/stats/R/wilcox.test.R b/src/library/stats/R/wilcox.test.R
index 356069d..a2109e2 100644
--- a/src/library/stats/R/wilcox.test.R
+++ b/src/library/stats/R/wilcox.test.R
@@ -1,7 +1,7 @@
 #  File src/library/stats/R/wilcox.test.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
-#  Copyright (C) 1995-2013 The R Core Team
+#  Copyright (C) 1995-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
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 wilcox.test <- function(x, ...) UseMethod("wilcox.test")
 
@@ -147,89 +147,115 @@ function(x, y = NULL, alternative = c("two.sided", "less", "greater"),
                 ## Algorithm not published, thus better documented here.
                 x <- x + mu
                 alpha <- 1 - conf.level
-                ## These are sample based limits for the median
-                ## [They don't work if alpha is too high]
-                mumin <- min(x)
-                mumax <- max(x)
-                ## wdiff(d, zq) returns the absolute difference between
-                ## the asymptotic Wilcoxon statistic of x - mu - d and
-                ## the quantile zq.
-                wdiff <- function(d, zq) {
-                    xd <- x - d
-                    xd <- xd[xd != 0]
-                    nx <- length(xd)
-                    dr <- rank(abs(xd))
-		    zd <- sum(dr[xd > 0]) - nx * (nx + 1)/4
-		    NTIES.CI <- table(dr)
-		    SIGMA.CI <- sqrt(nx * (nx + 1) * (2 * nx + 1) / 24
-				     - sum(NTIES.CI^3 - NTIES.CI) / 48)
-                    if (SIGMA.CI == 0)
-                        stop("cannot compute confidence interval when all observations are tied", call.=FALSE)
-		    CORRECTION.CI <-
-			if(correct) {
-                            switch(alternative,
-                                   "two.sided" = sign(zd) * 0.5,
-                                   "greater" = 0.5,
-                                   "less" = -0.5)
-			} else 0
-		    (zd - CORRECTION.CI) / SIGMA.CI - zq
-                }
-                ## Here we optimize the function wdiff in d over the set
-                ## c(mumin, mumax).
-                ## This returns a value from c(mumin, mumax) for which
-                ## the asymptotic Wilcoxon statistic is equal to the
-                ## quantile zq.  This means that the statistic is not
-                ## within the critical region, and that implies that d
-                ## is a confidence limit for the median.
-                ##
-                ## As in the exact case, interchange quantiles.
-                cint <- switch(alternative, "two.sided" = {
-                  repeat {
-                      mindiff <- wdiff(mumin,zq = qnorm(alpha/2, lower.tail = FALSE))
-                      maxdiff <- wdiff(mumax,zq = qnorm(alpha/2))
-                      if(mindiff < 0 || maxdiff > 0)  alpha <- alpha*2  else break
-                  }
-                  if(1 - conf.level < alpha*0.75) {
-                    conf.level <- 1 - alpha
-                    warning("requested conf.level not achievable")
-                  }
-                  l <- uniroot(wdiff, c(mumin, mumax), tol=1e-4,
-                               zq=qnorm(alpha/2, lower.tail=FALSE))$root
-                  u <- uniroot(wdiff, c(mumin, mumax), tol=1e-4,
-                               zq = qnorm(alpha/2))$root
-                  c(l, u)
-                }, "greater" = {
-                  repeat {
-                      mindiff <- wdiff(mumin, zq = qnorm(alpha, lower.tail = FALSE))
-                      if(mindiff < 0)  alpha <- alpha*2  else break
-                  }
-                  if(1 - conf.level < alpha*0.75) {
-                    conf.level <- 1 - alpha
-                    warning("requested conf.level not achievable")
-                  }
-                  l <- uniroot(wdiff, c(mumin, mumax), tol = 1e-4,
-                               zq = qnorm(alpha, lower.tail = FALSE))$root
-                  c(l, +Inf)
-                }, "less" = {
-                  repeat {
-                      maxdiff <- wdiff(mumax, zq = qnorm(alpha))
-                      if(maxdiff > 0)  alpha <- alpha * 2  else break
-                  }
-                  if (1 - conf.level < alpha*0.75) {
-                    conf.level <- 1 - alpha
-                    warning("requested conf.level not achievable")
-                  }
-                  u <- uniroot(wdiff, c(mumin, mumax), tol=1e-4,
-                               zq = qnorm(alpha))$root
-                  c(-Inf, u)
-                })
-                attr(cint, "conf.level") <- conf.level
-		correct <- FALSE # no continuity correction for estimate
-		ESTIMATE <- c("(pseudo)median" =
-			      uniroot(wdiff, c(mumin, mumax), tol=1e-4,
-				      zq = 0)$root)
-            }
+		if(n > 0) {
+		    ## These are sample based limits for the median
+		    ## [They don't work if alpha is too high]
+		    mumin <- min(x)
+		    mumax <- max(x)
+		    ## wdiff(d, zq) returns the absolute difference between
+		    ## the asymptotic Wilcoxon statistic of x - mu - d and
+		    ## the quantile zq.
+                    W <- function(d) { ## also fn(x, correct, alternative)
+			xd <- x - d
+			xd <- xd[xd != 0]
+			nx <- length(xd)
+			dr <- rank(abs(xd))
+			zd <- sum(dr[xd > 0]) - nx * (nx + 1)/4
+			NTIES.CI <- table(dr)
+			SIGMA.CI <- sqrt(nx * (nx + 1) * (2 * nx + 1) / 24
+					 - sum(NTIES.CI^3 - NTIES.CI) / 48)
+			if (SIGMA.CI == 0)
+			    warning(
+			"cannot compute confidence interval when all observations are zero or tied",
+				    call.=FALSE)
+			CORRECTION.CI <-
+			    if(correct) {
+				switch(alternative,
+				       "two.sided" = sign(zd) * 0.5,
+				       "greater" = 0.5,
+				       "less" = -0.5)
+			    } else 0
+			(zd - CORRECTION.CI) / SIGMA.CI
+		    }
+		    Wmumin <- W(mumin)
+		    Wmumax <- if(!is.finite(Wmumin)) NA else W(mumax) # if(): warn only once
+		}
+		if(n == 0 || !is.finite(Wmumax)) { # incl. "all zero / ties" warning above
+		    cint <- structure(c(if(alternative == "less"   ) -Inf else NaN,
+					if(alternative == "greater") +Inf else NaN),
+				      conf.level = 0)
+		    ESTIMATE <- if(n > 0) c(midrange = (mumin+mumax)/2) else NaN
+		} else { # (Wmumin, Wmumax) are finite
+                    wdiff <- function(d, zq) W(d) - zq
+                    ## Here we optimize the function wdiff in d over the set
+                    ## c(mumin, mumax).
+                    ## This returns a value from c(mumin, mumax) for which
+                    ## the asymptotic Wilcoxon statistic is equal to the
+                    ## quantile zq.  This means that the statistic is not
+                    ## within the critical region, and that implies that d
+                    ## is a confidence limit for the median.
+                    ##
+                    ## As in the exact case, interchange quantiles.
+                    root <- function(zq) {
+                        uniroot(wdiff, lower = mumin, upper = mumax,
+                                f.lower = Wmumin - zq, f.upper = Wmumax - zq,
+                                tol = 1e-4, zq = zq)$root
+                    }
 
+		    cint <- switch(alternative, "two.sided" = {
+			repeat { ## FIXME: no need to loop for finding boundary alpha !!
+			    mindiff <- Wmumin - qnorm(alpha/2, lower.tail = FALSE)
+			    maxdiff <- Wmumax - qnorm(alpha/2)
+			    if(mindiff < 0 || maxdiff > 0)  alpha <- alpha*2  else break
+			}
+			if (alpha >= 1 || 1 - conf.level < alpha*0.75) {
+			    conf.level <- 1 - pmin(1, alpha)
+			    warning("requested conf.level not achievable")
+			}
+			if(alpha < 1) {
+			    l <- root(zq = qnorm(alpha/2, lower.tail = FALSE))
+			    u <- root(zq = qnorm(alpha/2))
+			    c(l, u)
+			} else { ## alpha >= 1
+			    rep(median(x), 2)
+			}
+		    }, "greater" = {
+			repeat { ## FIXME: no need to loop for finding boundary alpha !!
+			    mindiff <- Wmumin - qnorm(alpha, lower.tail = FALSE)
+			    if(mindiff < 0)  alpha <- alpha*2  else break
+			}
+			if (alpha >= 1 || 1 - conf.level < alpha*0.75) {
+			    conf.level <- 1 - pmin(1, alpha)
+			    warning("requested conf.level not achievable")
+			}
+			l <- if(alpha < 1)
+				 root(zq = qnorm(alpha, lower.tail = FALSE))
+			     else   ## alpha >= 1
+				 median(x)
+			c(l, +Inf)
+
+		    }, "less" = {
+			repeat { ## FIXME: no need to loop for finding boundary alpha !!
+			    maxdiff <- Wmumax - qnorm(alpha/2)
+			    if(maxdiff > 0)  alpha <- alpha * 2  else break
+			}
+			if (alpha >= 1 || 1 - conf.level < alpha*0.75) {
+			    conf.level <- 1 - pmin(1, alpha)
+			    warning("requested conf.level not achievable")
+			}
+			u <- if(alpha < 1)
+				 root(zq = qnorm(alpha))
+			     else
+				 median(x)
+			c(-Inf, u)
+		    })
+		    attr(cint, "conf.level") <- conf.level
+		    correct <- FALSE # for W(): no continuity correction for estimate
+		    ESTIMATE <- c("(pseudo)median" =
+				  uniroot(W, lower = mumin, upper = mumax,
+					  tol = 1e-4)$root)
+                } # regular (Wmumin, Wmumax)
+            } # end{conf.int}
             if(exact && TIES) {
                 warning("cannot compute exact p-value with ties")
                 if(conf.int)
@@ -303,7 +329,7 @@ function(x, y = NULL, alternative = c("two.sided", "less", "greater"),
                 ESTIMATE <- c("difference in location" = median(diffs))
             }
         }
-        else {
+        else { ## not exact, maybe ties or zeroes
             NTIES <- table(r)
             z <- STATISTIC - n.x * n.y / 2
             SIGMA <- sqrt((n.x * n.y / 12) *
@@ -333,11 +359,10 @@ function(x, y = NULL, alternative = c("two.sided", "less", "greater"),
                 alpha <- 1 - conf.level
                 mumin <- min(x) - max(y)
                 mumax <- max(x) - min(y)
-                wdiff <- function(d, zq) {
+                W <- function(d) { ## also fn (x, y, n.x, n.y, correct, alternative)
                     dr <- rank(c(x - d, y))
                     NTIES.CI <- table(dr)
-                    dz <- (sum(dr[seq_along(x)])
-                           - n.x * (n.x + 1) / 2 - n.x * n.y / 2)
+                    dz <- sum(dr[seq_along(x)]) - n.x * (n.x + 1) / 2 - n.x * n.y / 2
 		    CORRECTION.CI <-
 			if(correct) {
                             switch(alternative,
@@ -350,17 +375,22 @@ function(x, y = NULL, alternative = c("two.sided", "less", "greater"),
                                       - sum(NTIES.CI^3 - NTIES.CI)
                                       / ((n.x + n.y) * (n.x + n.y - 1))))
                     if (SIGMA.CI == 0)
-                        stop("cannot compute confidence interval when all observations are tied", call.=FALSE)
-                    (dz - CORRECTION.CI) / SIGMA.CI - zq
+			warning(
+			"cannot compute confidence interval when all observations are tied",
+                                call.=FALSE)
+                    (dz - CORRECTION.CI) / SIGMA.CI
                 }
+                wdiff <- function(d, zq) W(d) - zq
+                Wmumin <- W(mumin)
+                Wmumax <- W(mumax)
                 root <- function(zq) {
                     ## in extreme cases we need to return endpoints,
                     ## e.g.  wilcox.test(1, 2:60, conf.int=TRUE)
-                    f.lower <- wdiff(mumin, zq)
+                    f.lower <- Wmumin - zq
                     if(f.lower <= 0) return(mumin)
-                    f.upper <- wdiff(mumax, zq)
+                    f.upper <- Wmumax - zq
                     if(f.upper >= 0) return(mumax)
-                    uniroot(wdiff, c(mumin, mumax),
+                    uniroot(wdiff, lower=mumin, upper=mumax,
                             f.lower = f.lower, f.upper = f.upper,
                             tol = 1e-4, zq = zq)$root
                 }
@@ -379,10 +409,10 @@ function(x, y = NULL, alternative = c("two.sided", "less", "greater"),
                                    c(-Inf, u)
                                })
                 attr(cint, "conf.level") <- conf.level
-		correct <- FALSE # no continuity correction for estimate
+		correct <- FALSE # for W(): no continuity correction for estimate
 		ESTIMATE <- c("difference in location" =
-			      uniroot(wdiff, c(mumin, mumax), tol = 1e-4,
-				      zq = 0)$root)
+			      uniroot(W, lower=mumin, upper=mumax,
+				      tol = 1e-4)$root)
             }
 
             if(exact && TIES) {
@@ -419,6 +449,7 @@ function(formula, data, subset, na.action, ...)
     m <- match.call(expand.dots = FALSE)
     if(is.matrix(eval(m$data, parent.frame())))
         m$data <- as.data.frame(data)
+    ## need stats:: for non-standard evaluation
     m[[1L]] <- quote(stats::model.frame)
     m$... <- NULL
     mf <- eval(m, parent.frame())
diff --git a/src/library/stats/R/xtabs.R b/src/library/stats/R/xtabs.R
index b96cb55..2de1c1e 100644
--- a/src/library/stats/R/xtabs.R
+++ b/src/library/stats/R/xtabs.R
@@ -1,7 +1,7 @@
 #  File src/library/stats/R/xtabs.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
-#  Copyright (C) 1995-2013 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
@@ -14,10 +14,11 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 xtabs <- function(formula = ~., data = parent.frame(), subset, sparse = FALSE,
-		  na.action, exclude = c(NA, NaN), drop.unused.levels = FALSE)
+		  na.action, addNA = FALSE, exclude = if(!addNA) c(NA, NaN),
+		  drop.unused.levels = FALSE)
 {
     if (missing(formula) && missing(data))
 	stop("must supply either 'formula' or 'data'")
@@ -33,7 +34,9 @@ xtabs <- function(formula = ~., data = parent.frame(), subset, sparse = FALSE,
     m <- match.call(expand.dots = FALSE)
     if (is.matrix(eval(m$data, parent.frame())))
 	m$data <- as.data.frame(data)
-    m$... <- m$exclude <- m$drop.unused.levels <- m$sparse <- NULL
+    m$... <- m$exclude <- m$drop.unused.levels <- m$sparse <- m$addNA <- NULL
+    if(addNA && missing(na.action)) m$na.action <- quote(na.pass)
+    ## need stats:: for non-standard evaluation
     m[[1L]] <- quote(stats::model.frame)
     mf <- eval(m, parent.frame())
     if(length(formula) == 2L) {
@@ -52,21 +55,26 @@ xtabs <- function(formula = ~., data = parent.frame(), subset, sparse = FALSE,
             u <- factor(as.character(u),
                         levels = setdiff(levels(u), exclude),
                         exclude=NULL)
+	if(addNA) u <- addNA(u, ifany=TRUE)
 	u[ , drop = drop.unused.levels]
     })
-    if(!sparse) { ## identical to stats::xtabs
+    naAct <- if(!is.null(m$na.action)) m$na.action
+	     else getOption("na.action", default = quote(na.omit))
+    na.rm <- ## true iff na.action is na.omit
+	identical(naAct, quote(na.omit)) || identical(naAct, na.omit) ||
+        identical(naAct, "na.omit")
+    if(!sparse) {
 	x <-
 	    if(is.null(y))
-		do.call("table", by)
+		table(by, dnn = names(by))
 	    else if(NCOL(y) == 1L)
-		tapply(y, by, sum)
+		tapply(y, by, sum, na.rm=na.rm, default = 0L)
 	    else {
-		z <- lapply(as.data.frame(y), tapply, by, sum)
+		z <- lapply(as.data.frame(y), tapply, by, sum, na.rm=na.rm, default = 0L)
 		array(unlist(z),
 		      dim = c(dim(z[[1L]]), length(z)),
 		      dimnames = c(dimnames(z[[1L]]), list(names(z))))
 	    }
-	x[is.na(x)] <- 0
 	class(x) <- c("xtabs", "table")
 	attr(x, "call") <- match.call()
 	x
@@ -81,27 +89,31 @@ xtabs <- function(formula = ~., data = parent.frame(), subset, sparse = FALSE,
             stop(gettextf("%s needs package 'Matrix' correctly installed",
                           "xtabs(*, sparse=TRUE)"),
                  domain = NA)
-        if(length(i.ex <- unique(unlist(lapply(by,function(f) which(is.na(f)))))))
-            by <- lapply(by, `[`, -i.ex)
+	if(length(i.ex <- unique(unlist(lapply(by, function(f) which(is.na(f))))))) {
+	    by <- lapply(by, `[`, -i.ex)
+	    if(!is.null(y)) y <- y[-i.ex]
+	}
+	if(na.rm && !is.null(y) && any(isN <- is.na(y))) {
+	    ok <- !isN
+	    by <- lapply(by, `[`, ok)
+	    y <- y[ok]
+	}
 	rows <- by[[1L]]
 	cols <- by[[2L]]
-	rl <- levels(rows)
-	cl <- levels(cols)
-	if (is.null(y))
-	    y <- rep.int(1, length(rows))
-	as(new("dgTMatrix",
-	       i = as.integer(rows) - 1L,
-	       j = as.integer(cols) - 1L,
-	       x = as.double(y),
-	       Dim = c(length(rl), length(cl)),
-	       Dimnames = list(rl, cl)), "CsparseMatrix")
+        dnms <- lapply(by, levels)
+	x <- if (is.null(y)) rep.int(1, length(rows)) else as.double(y)
+	methods::as(methods::new("dgTMatrix", x = x, Dimnames = dnms,
+				 i = as.integer(rows) - 1L,
+				 j = as.integer(cols) - 1L,
+				 Dim = lengths(dnms, use.names=FALSE)),
+		    "CsparseMatrix")
     }
 }
 
-print.xtabs <- function(x, ...)
+print.xtabs <- function(x, na.print = "", ...) ## na.print = "NA" is more cautious
 {
     ox <- x
     attr(x, "call") <- NULL
-    print.table(x, ...)
+    print.table(x, na.print=na.print, ...)
     invisible(ox)
 }
diff --git a/src/library/stats/R/zzModels.R b/src/library/stats/R/zzModels.R
index 3521f2d..538b3e5 100644
--- a/src/library/stats/R/zzModels.R
+++ b/src/library/stats/R/zzModels.R
@@ -1,5 +1,5 @@
 #  File src/library/stats/R/zzModels.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
 #  Copyright 1997, 1999 (C) Jose C. Pinheiro and Douglas M. Bates
 #  Copyright 1999-2012 The R Core Team
@@ -15,7 +15,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 ##*## SSasymp - asymptotic regression model
 
diff --git a/src/library/stats/R/zzz.R b/src/library/stats/R/zzz.R
index e7fefbd..20ab64c 100644
--- a/src/library/stats/R/zzz.R
+++ b/src/library/stats/R/zzz.R
@@ -1,5 +1,5 @@
 #  File src/library/stats/R/zzz.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
 #  Copyright (C) 1995-2012 The R Core Team
 #
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 .noGenerics <- TRUE
 
diff --git a/src/library/stats/demo/lm.glm.R b/src/library/stats/demo/lm.glm.R
index d291e53..2d93e6d 100644
--- a/src/library/stats/demo/lm.glm.R
+++ b/src/library/stats/demo/lm.glm.R
@@ -3,7 +3,7 @@
 ###
 ### == with some additions ==
 
-#  Copyright (C) 1997-2008 The R Core Team
+#  Copyright (C) 1997-2015 The R Core Team
 
 require(stats); require(graphics)
 
@@ -102,8 +102,7 @@ anova(z, update(z, dead ~ dose -1))
 ## Anther Data (Page 84)
 ## Note that the proportions below are not exactly
 ## in accord with the sample sizes quoted below.
-## In particular, the value 0.555 does not seem sensible.
-##	[MM: huh?  round(round(n*p)/n, 3) looks almost exactly like "p" !]
+## In particular, the last value, 5/9, should have been 0.556 instead of 0.555:
 n <- c(102,  99,   108,	 76,   81,   90)
 p <- c(0.539,0.525,0.528,0.724,0.617,0.555)
 x <- round(n*p)
diff --git a/src/library/stats/loess-README b/src/library/stats/loess-README
index 43d1d89..efe66be 100644
--- a/src/library/stats/loess-README
+++ b/src/library/stats/loess-README
@@ -24,7 +24,7 @@ loess()		        [R] ../R/loess.R
     |	 |              |
     |	 |              |--> ehg106	{partial sort (for median etc)}
     |	 |              |
-    |	 |              |--> "Linpack" [QR,SVD..]
+    |	 |              |--> "LINPACK" [QR,SVD..]
     |	 |              |
     |    |              \--> ehg184	{warning}
     |	 |
diff --git a/src/library/stats/man/AIC.Rd b/src/library/stats/man/AIC.Rd
index 1f08181..c362cf9 100644
--- a/src/library/stats/man/AIC.Rd
+++ b/src/library/stats/man/AIC.Rd
@@ -1,5 +1,5 @@
 % File src/library/stats/man/AIC.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2013 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/stats/man/ARMAacf.Rd b/src/library/stats/man/ARMAacf.Rd
index f5badd2..63f8c6e 100644
--- a/src/library/stats/man/ARMAacf.Rd
+++ b/src/library/stats/man/ARMAacf.Rd
@@ -1,6 +1,6 @@
 % File src/library/stats/man/ARMAacf.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2012 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2015 R Core Team
 % Distributed under GPL 2 or later
 
 \name{ARMAacf}
@@ -43,8 +43,12 @@ ARMAacf(ar = numeric(), ma = numeric(), lag.max = r, pacf = FALSE)
 ARMAacf(c(1.0, -0.25), 1.0, lag.max = 10)
 
 ## Example from Brockwell & Davis (1991, pp.92-4)
-## answer 2^(-n) * (32/3 + 8 * n) /(32/3)
-n <- 1:10; 2^(-n) * (32/3 + 8 * n) /(32/3)
+## answer: 2^(-n) * (32/3 + 8 * n) /(32/3)
+n <- 1:10
+a.n <- 2^(-n) * (32/3 + 8 * n) /(32/3)
+(A.n <- ARMAacf(c(1.0, -0.25), 1.0, lag.max = 10))
+stopifnot(all.equal(unname(A.n), c(1, a.n)))
+
 ARMAacf(c(1.0, -0.25), 1.0, lag.max = 10, pacf = TRUE)
 zapsmall(ARMAacf(c(1.0, -0.25), lag.max = 10, pacf = TRUE))
 
diff --git a/src/library/stats/man/ARMAtoMA.Rd b/src/library/stats/man/ARMAtoMA.Rd
index 5718bda..c8770ab 100644
--- a/src/library/stats/man/ARMAtoMA.Rd
+++ b/src/library/stats/man/ARMAtoMA.Rd
@@ -1,5 +1,5 @@
 % File src/library/stats/man/ARMAtoMA.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2012 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/stats/man/Beta.Rd b/src/library/stats/man/Beta.Rd
index d1e5c24..52d1f9d 100644
--- a/src/library/stats/man/Beta.Rd
+++ b/src/library/stats/man/Beta.Rd
@@ -1,10 +1,8 @@
 % File src/library/stats/man/Beta.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2013 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2016 R Core Team
 % Distributed under GPL 2 or later
 
-\newcommand{\sspace}{\ifelse{latex}{\out{~}}{ }}
-
 \name{Beta}
 \alias{Beta}
 \alias{dbeta}
@@ -86,14 +84,15 @@ rbeta(n, shape1, shape2, ncp = 0)
   values of \code{ncp} very near zero.
 }
 \source{
-  The central \code{dbeta} is based on a binomial probability, using code
+ \itemize{
+  \item The central \code{dbeta} is based on a binomial probability, using code
   contributed by Catherine Loader (see \code{\link{dbinom}}) if either
   shape parameter is larger than one, otherwise directly from the definition.
   The non-central case is based on the derivation as a Poisson
   mixture of betas (Johnson \emph{et al}, 1995, pp.\sspace{}502--3).
 
-  The central \code{pbeta} uses a C translation (and enhancement for
-  \code{log_p = TRUE}) of
+  \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)
   Algorithm 708: Significant digit computation of the incomplete beta
@@ -104,8 +103,15 @@ rbeta(n, shape1, shape2, ncp = 0)
   Certification of algorithm 708: Significant digit computation of the
   incomplete beta,
   \emph{ACM Transactions on Mathematical Software}, \bold{20}, 393--397.)
+  \cr %%
+  We have slightly tweaked the original \dQuote{TOMS 708} algorithm, and
+  enhanced for \code{log.p = TRUE}.  For that (log-scale) case,
+  underflow to \code{-Inf} (i.e., \eqn{P = 0}) or \code{0}, (i.e.,
+  \eqn{P = 1}) still happens because the original algorithm was designed
+  without log-scale considerations.  Underflow to \code{-Inf} now
+  typically signals a \code{\link{warning}}.
 
-  The non-central \code{pbeta} uses a C translation of
+  \item The non-central \code{pbeta} uses a C translation of
 
   Lenth, R. V. (1987) Algorithm AS226: Computing noncentral beta
   probabilities. \emph{Appl. Statist}, \bold{36}, 241--244,
@@ -118,18 +124,19 @@ rbeta(n, shape1, shape2, ncp = 0)
   cancellation and a warning will be given when this is likely to be
   significant.
 
-  The central case of \code{qbeta} is based on a C translation of
+  \item The central case of \code{qbeta} is based on a C translation of
 
   Cran, G. W., K. J. Martin and G. E. Thomas (1977).
   Remark AS R19 and Algorithm AS 109,
   \emph{Applied Statistics},  \bold{26}, 111--114,
   and subsequent remarks (AS83 and correction).
 
-  The central case of \code{rbeta} is based on a C translation of
+  \item  The central case of \code{rbeta} is based on a C translation of
 
   R. C. H. Cheng (1978).
   Generating beta variates with nonintegral shape parameters.
   \emph{Communications of the ACM}, \bold{21}, 317--322.
+ }
 }
 \references{
   Becker, R. A., Chambers, J. M. and Wilks, A. R. (1988)
diff --git a/src/library/stats/man/Binomial.Rd b/src/library/stats/man/Binomial.Rd
index 5279746..24046a3 100644
--- a/src/library/stats/man/Binomial.Rd
+++ b/src/library/stats/man/Binomial.Rd
@@ -1,5 +1,5 @@
 % File src/library/stats/man/Binomial.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2014 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/stats/man/Cauchy.Rd b/src/library/stats/man/Cauchy.Rd
index d138ba0..7736299 100644
--- a/src/library/stats/man/Cauchy.Rd
+++ b/src/library/stats/man/Cauchy.Rd
@@ -1,6 +1,6 @@
 % File src/library/stats/man/Cauchy.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2013 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2014 R Core Team
 % Distributed under GPL 2 or later
 
 \name{Cauchy}
diff --git a/src/library/stats/man/Chisquare.Rd b/src/library/stats/man/Chisquare.Rd
index 784d5be..171f759 100644
--- a/src/library/stats/man/Chisquare.Rd
+++ b/src/library/stats/man/Chisquare.Rd
@@ -1,6 +1,6 @@
 % File src/library/stats/man/Chisquare.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2013 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2015 R Core Team
 % Distributed under GPL 2 or later
 
 \name{Chisquare}
@@ -42,8 +42,8 @@ rchisq(n, df, ncp = 0)
 
   The length of the result is determined by \code{n} for
   \code{rchisq}, and is the maximum of the lengths of the
-  numerical arguments for the other functions.  
-  
+  numerical arguments for the other functions.
+
   The numerical arguments other than \code{n} are recycled to the
   length of the result.  Only the first elements of the logical
   arguments are used.
@@ -72,6 +72,11 @@ rchisq(n, df, ncp = 0)
   non-integer, and also \eqn{n = 0} which is relevant for
   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
+  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}.
 
   Note that \code{ncp} values larger than about 1e5 may give inaccurate
   results with many warnings for \code{pchisq} and \code{qchisq}.
diff --git a/src/library/stats/man/Distributions.Rd b/src/library/stats/man/Distributions.Rd
index 7473854..b91166e 100644
--- a/src/library/stats/man/Distributions.Rd
+++ b/src/library/stats/man/Distributions.Rd
@@ -1,5 +1,5 @@
 % File src/library/stats/man/Distributions.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 2010-2011 R Core Team
 % Distributed under GPL 2 or later
 
@@ -63,7 +63,7 @@
   \code{\link{RNG}} about random number generation in \R.
 
   The CRAN task view on distributions,
-  \url{http://cran.r-project.org/web/views/Distributions.html},
+  \url{https://CRAN.R-project.org/view=Distributions},
   mentioning several CRAN packages for additional distributions.
 }
 \keyword{distribution}
diff --git a/src/library/stats/man/Exponential.Rd b/src/library/stats/man/Exponential.Rd
index 7a746b6..549779c 100644
--- a/src/library/stats/man/Exponential.Rd
+++ b/src/library/stats/man/Exponential.Rd
@@ -1,6 +1,6 @@
 % File src/library/stats/man/Exponential.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2013 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2014 R Core Team
 % Distributed under GPL 2 or later
 
 \name{Exponential}
diff --git a/src/library/stats/man/Fdist.Rd b/src/library/stats/man/Fdist.Rd
index e0fe7a1..946a004 100644
--- a/src/library/stats/man/Fdist.Rd
+++ b/src/library/stats/man/Fdist.Rd
@@ -1,6 +1,6 @@
 % File src/library/stats/man/Fdist.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2013 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2014 R Core Team
 % Distributed under GPL 2 or later
 
 \name{FDist}
diff --git a/src/library/stats/man/GammaDist.Rd b/src/library/stats/man/GammaDist.Rd
index 3019129..dd891a5 100644
--- a/src/library/stats/man/GammaDist.Rd
+++ b/src/library/stats/man/GammaDist.Rd
@@ -1,10 +1,8 @@
 % File src/library/stats/man/GammaDist.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2013 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2017 R Core Team
 % Distributed under GPL 2 or later
 
-\newcommand{\CRANpkg}{\href{http://CRAN.R-project.org/package=#1}{\pkg{#1}}}
-
 \name{GammaDist}
 \alias{GammaDist}
 \alias{dgamma}
@@ -91,9 +89,8 @@ rgamma(n, shape, rate = 1, scale = 1/rate)
 %   \code{scale < 1e-10}.
 \note{
   The S (Becker \emph{et al} (1988) parametrization was via \code{shape}
-  and \code{rate}: S had no \code{scale} parameter.  In \R 2.x.y
-  \code{scale} took precedence over \code{rate}, but now it is an error
-  to supply both.
+  and \code{rate}: S had no \code{scale} parameter. It is an error
+  to supply and \code{scale} and \code{rate}.
 
   \code{pgamma} is closely related to the incomplete gamma function.  As
   defined by Abramowitz and Stegun 6.5.1 (and by \sQuote{Numerical
@@ -115,7 +112,7 @@ rgamma(n, shape, rate = 1, scale = 1/rate)
   \eqn{\Gamma(a,x)}) from package \CRANpkg{gsl}.
 
   See also
-  \url{http://en.wikipedia.org/wiki/Incomplete_gamma_function}, or
+  \url{https://en.wikipedia.org/wiki/Incomplete_gamma_function}, or
   \url{http://dlmf.nist.gov/8.2#i}.
 }
 \source{
diff --git a/src/library/stats/man/Geometric.Rd b/src/library/stats/man/Geometric.Rd
index 69d7056..64afa7e 100644
--- a/src/library/stats/man/Geometric.Rd
+++ b/src/library/stats/man/Geometric.Rd
@@ -1,6 +1,6 @@
 % File src/library/stats/man/Geometric.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2013 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2014 R Core Team
 % Distributed under GPL 2 or later
 
 \name{Geometric}
diff --git a/src/library/stats/man/HoltWinters.Rd b/src/library/stats/man/HoltWinters.Rd
index 98495e8..ee2b4f6 100644
--- a/src/library/stats/man/HoltWinters.Rd
+++ b/src/library/stats/man/HoltWinters.Rd
@@ -1,6 +1,6 @@
 % File src/library/stats/man/HoltWinters.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2010 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2016 R Core Team
 % Distributed under GPL 2 or later
 
 \name{HoltWinters}
@@ -107,9 +107,9 @@ HoltWinters(x, alpha = NULL, beta = NULL, gamma = NULL,
 }
 \references{
   C. C. Holt (1957)
-  Forecasting trends and seasonals by exponentially weighted
-  moving averages,
+  Forecasting seasonals and trends by exponentially weighted moving averages,
   \emph{ONR Research Memorandum, Carnegie Institute of Technology} \bold{52}.
+  (reprint at \url{http://dx.doi.org/10.1016/j.ijforecast.2003.09.015}).
 
   P. R. Winters (1960)
   Forecasting sales by exponentially weighted moving averages,
@@ -124,7 +124,7 @@ HoltWinters(x, alpha = NULL, beta = NULL, gamma = NULL,
 
 % Differences seen on 32-bit Linux at -O3
 \examples{
-\testonly{od <- options(digits = 5)}
+\dontshow{od <- options(digits = 5)}
 require(graphics)
 
 ## Seasonal Holt-Winters
@@ -143,6 +143,6 @@ plot(m)
 ## Exponential Smoothing
 m2 <- HoltWinters(x, gamma = FALSE, beta = FALSE)
 lines(fitted(m2)[,1], col = 3)
-\testonly{options(od)}
+\dontshow{options(od)}
 }
 \keyword{ts}
diff --git a/src/library/stats/man/Hypergeometric.Rd b/src/library/stats/man/Hypergeometric.Rd
index b6958ca..5c7a722 100644
--- a/src/library/stats/man/Hypergeometric.Rd
+++ b/src/library/stats/man/Hypergeometric.Rd
@@ -1,6 +1,6 @@
 % File src/library/stats/man/Hypergeometric.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2013 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2016 R Core Team
 % Distributed under GPL 2 or later
 
 \name{Hypergeometric}
@@ -28,7 +28,7 @@ rhyper(nn, m, n, k)
   \item{n}{the number of black balls in the urn.}
   \item{k}{the number of balls drawn from the urn.}
   \item{p}{probability, it must be between 0 and 1.}
-  \item{nn}{number of observations. If \code{length(nn) > 1}, the length
+  \item{nn}{number of observations.  If \code{length(nn) > 1}, the length
     is taken to be the number required.}
   \item{log, log.p}{logical; if TRUE, probabilities p are given as log(p).}
   \item{lower.tail}{logical; if TRUE (default), probabilities are
@@ -44,8 +44,8 @@ rhyper(nn, m, n, k)
 
   The length of the result is determined by \code{n} for
   \code{rhyper}, and is the maximum of the lengths of the
-  numerical arguments for the other functions.  
-  
+  numerical arguments for the other functions.
+
   The numerical arguments other than \code{n} are recycled to the
   length of the result.  Only the first elements of the logical
   arguments are used.
@@ -60,8 +60,23 @@ rhyper(nn, m, n, k)
   }{p(x) =      choose(m, x) choose(n, k-x) / choose(m+n, k)}
   for \eqn{x = 0, \ldots, k}.
 
+  Note that \eqn{p(x)} is non-zero only for
+  \eqn{\max(0, k-n) \le x \le \min(k, m)}{max(0, k-n) <= x <= min(k, m)}.
+
+  With \eqn{p := m/(m+n)} (hence \eqn{Np = N \times p} in the
+  reference's notation), the first two moments are mean
+  \deqn{E[X] = \mu = k p} and variance
+  \deqn{\mbox{Var}(X) = k p (1 - p) \frac{m+n-k}{m+n-1},}{%
+               Var(X) = k p (1 - p) * (m+n-k)/(m+n-1),}
+  which shows the closeness to the Binomial\eqn{(k,p)} (where the
+  hypergeometric has smaller variance unless \eqn{k = 1}).
+
   The quantile is defined as the smallest value \eqn{x} such that
   \eqn{F(x) \ge p}, where \eqn{F} is the distribution function.
+
+  If one of \eqn{m, n, k}, exceeds \code{\link{.Machine}$integer.max},
+  currently the equivalent of \code{qhyper(runif(nn), m,n,k)} is used,
+  when a binomial approximation may be considerably more efficient.
 }
 \source{
   \code{dhyper} computes via binomial probabilities, using code
diff --git a/src/library/stats/man/IQR.Rd b/src/library/stats/man/IQR.Rd
index 022138c..002b487 100644
--- a/src/library/stats/man/IQR.Rd
+++ b/src/library/stats/man/IQR.Rd
@@ -1,5 +1,5 @@
 % File src/library/stats/man/IQR.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2010 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/stats/man/KalmanLike.Rd b/src/library/stats/man/KalmanLike.Rd
index 5ce6716..ddd868d 100644
--- a/src/library/stats/man/KalmanLike.Rd
+++ b/src/library/stats/man/KalmanLike.Rd
@@ -1,5 +1,5 @@
 % File src/library/stats/man/KalmanLike.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2014 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/stats/man/Logistic.Rd b/src/library/stats/man/Logistic.Rd
index 6bec073..10a9403 100644
--- a/src/library/stats/man/Logistic.Rd
+++ b/src/library/stats/man/Logistic.Rd
@@ -1,6 +1,6 @@
 % File src/library/stats/man/Logistic.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2013 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2014 R Core Team
 % Distributed under GPL 2 or later
 
 \name{Logistic}
diff --git a/src/library/stats/man/Lognormal.Rd b/src/library/stats/man/Lognormal.Rd
index 4d44472..8f0cd4c 100644
--- a/src/library/stats/man/Lognormal.Rd
+++ b/src/library/stats/man/Lognormal.Rd
@@ -1,5 +1,5 @@
 % File src/library/stats/man/Lognormal.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2014 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/stats/man/Multinom.Rd b/src/library/stats/man/Multinom.Rd
index b1d1dfc..ace4d15 100644
--- a/src/library/stats/man/Multinom.Rd
+++ b/src/library/stats/man/Multinom.Rd
@@ -1,5 +1,5 @@
 % File src/library/stats/man/Multinomal.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2014 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/stats/man/NLSstAsymptotic.Rd b/src/library/stats/man/NLSstAsymptotic.Rd
index 9baa330..4681110 100644
--- a/src/library/stats/man/NLSstAsymptotic.Rd
+++ b/src/library/stats/man/NLSstAsymptotic.Rd
@@ -1,5 +1,5 @@
 % File src/library/stats/man/NLSstAsymptotic.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2010 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/stats/man/NLSstClosestX.Rd b/src/library/stats/man/NLSstClosestX.Rd
index d286bfe..3f94462 100644
--- a/src/library/stats/man/NLSstClosestX.Rd
+++ b/src/library/stats/man/NLSstClosestX.Rd
@@ -1,5 +1,5 @@
 % File src/library/stats/man/NLSstClosestX.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2010 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/stats/man/NLSstLfAsymptote.Rd b/src/library/stats/man/NLSstLfAsymptote.Rd
index 45bda88..e7bbb52 100644
--- a/src/library/stats/man/NLSstLfAsymptote.Rd
+++ b/src/library/stats/man/NLSstLfAsymptote.Rd
@@ -1,5 +1,5 @@
 % File src/library/stats/man/NLSstLfAsymptote.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2010 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/stats/man/NLSstRtAsymptote.Rd b/src/library/stats/man/NLSstRtAsymptote.Rd
index 24385ff..fea105e 100644
--- a/src/library/stats/man/NLSstRtAsymptote.Rd
+++ b/src/library/stats/man/NLSstRtAsymptote.Rd
@@ -1,5 +1,5 @@
 % File src/library/stats/man/NLSstRtAsymptote.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2010 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/stats/man/NegBinomial.Rd b/src/library/stats/man/NegBinomial.Rd
index d081102..75c7c23 100644
--- a/src/library/stats/man/NegBinomial.Rd
+++ b/src/library/stats/man/NegBinomial.Rd
@@ -1,6 +1,6 @@
 % File src/library/stats/man/NegBinomial.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2013 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2015 R Core Team
 % Distributed under GPL 2 or later
 
 \name{NegBinomial}
@@ -46,7 +46,7 @@ rnbinom(n, size, prob, mu)
 
   This represents the number of failures which occur in a sequence of
   Bernoulli trials before a target number of successes is reached.
-  The mean is \eqn{n(1-p)/p} and variance \eqn{n(1-p)/p^2}.
+  The mean is \eqn{\mu = n(1-p)/p} and variance \eqn{n(1-p)/p^2}.
 
   A negative binomial distribution can also arise as a mixture of
   Poisson distributions with mean distributed as a gamma distribution
@@ -55,7 +55,7 @@ rnbinom(n, size, prob, mu)
   values of \code{size}.)
 
   An alternative parametrization (often used in ecology) is by the
-  \emph{mean} \code{mu}, and \code{size}, the \emph{dispersion
+  \emph{mean} \code{mu} (see above), and \code{size}, the \emph{dispersion
   parameter}, where \code{prob} = \code{size/(size+mu)}.  The variance
   is \code{mu + mu^2/size} in this parametrization.
 
diff --git a/src/library/stats/man/Normal.Rd b/src/library/stats/man/Normal.Rd
index e750287..db4b310 100644
--- a/src/library/stats/man/Normal.Rd
+++ b/src/library/stats/man/Normal.Rd
@@ -1,5 +1,5 @@
 % File src/library/stats/man/Normal.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2014 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/stats/man/Poisson.Rd b/src/library/stats/man/Poisson.Rd
index 4646826..5370bc2 100644
--- a/src/library/stats/man/Poisson.Rd
+++ b/src/library/stats/man/Poisson.Rd
@@ -1,6 +1,6 @@
 % File src/library/stats/man/Poisson.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2013 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2016 R Core Team
 % Distributed under GPL 2 or later
 
 \name{Poisson}
@@ -40,8 +40,8 @@ rpois(n, lambda)
 
   The length of the result is determined by \code{n} for
   \code{rpois}, and is the maximum of the lengths of the
-  numerical arguments for the other functions.  
-  
+  numerical arguments for the other functions.
+
   The numerical arguments other than \code{n} are recycled to the
   length of the result.  Only the first elements of the logical
   arguments are used.
@@ -53,6 +53,9 @@ rpois(n, lambda)
   for \eqn{x = 0, 1, 2, \ldots} .
   The mean and variance are \eqn{E(X) = Var(X) = \lambda}.
 
+  Note that \eqn{\lambda = 0} is really a limit case (setting
+  \eqn{0^0 = 1}) resulting in a point mass at \eqn{0}, see also the example.
+
   If an element of \code{x} is not integer, the result of \code{dpois}
   is zero, with a warning.
   \eqn{p(x)} is computed using Loader's algorithm, see the reference in
@@ -101,5 +104,10 @@ x <- seq(-0.01, 5, 0.01)
 plot(x, ppois(x, 1), type = "s", ylab = "F(x)", main = "Poisson(1) CDF")
 plot(x, pbinom(x, 100, 0.01), type = "s", ylab = "F(x)",
      main = "Binomial(100, 0.01) CDF")
+
+## The (limit) case  lambda = 0 :
+stopifnot(identical(dpois(0,0), 1),
+	  identical(ppois(0,0), 1),
+	  identical(qpois(1,0), 0))
 }
 \keyword{distribution}
diff --git a/src/library/stats/man/SSD.Rd b/src/library/stats/man/SSD.Rd
index 7cdda8b..c1c0190 100644
--- a/src/library/stats/man/SSD.Rd
+++ b/src/library/stats/man/SSD.Rd
@@ -1,5 +1,5 @@
 % File src/library/stats/man/SSD.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2007 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/stats/man/SSasymp.Rd b/src/library/stats/man/SSasymp.Rd
index ffb0e0f..f4f1ef3 100644
--- a/src/library/stats/man/SSasymp.Rd
+++ b/src/library/stats/man/SSasymp.Rd
@@ -1,5 +1,5 @@
 % File src/library/stats/man/SSasymp.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2010 R Core Team
 % Distributed under GPL 2 or later
 
@@ -37,7 +37,7 @@ SSasymp(input, Asym, R0, lrc)
   \code{\link{nls}}, \code{\link{selfStart}}
 }
 \examples{
-\testonly{options(show.nls.convergence=FALSE)}
+\dontshow{options(show.nls.convergence=FALSE)}
 Lob.329 <- Loblolly[ Loblolly$Seed == "329", ]
 SSasymp( Lob.329$age, 100, -8.5, -3.2 )  # response only
 Asym <- 100
diff --git a/src/library/stats/man/SSasympOff.Rd b/src/library/stats/man/SSasympOff.Rd
index 411ef6d..c3c1eaf 100644
--- a/src/library/stats/man/SSasympOff.Rd
+++ b/src/library/stats/man/SSasympOff.Rd
@@ -1,5 +1,5 @@
 % File src/library/stats/man/SSasympOff.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2010 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/stats/man/SSasympOrig.Rd b/src/library/stats/man/SSasympOrig.Rd
index 5cbf3e2..ac732f2 100644
--- a/src/library/stats/man/SSasympOrig.Rd
+++ b/src/library/stats/man/SSasympOrig.Rd
@@ -1,5 +1,5 @@
 % File src/library/stats/man/SSasympOrig.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2010 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/stats/man/SSbiexp.Rd b/src/library/stats/man/SSbiexp.Rd
index 38a5019..970f57b 100644
--- a/src/library/stats/man/SSbiexp.Rd
+++ b/src/library/stats/man/SSbiexp.Rd
@@ -1,5 +1,5 @@
 % File src/library/stats/man/SSbiexp.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2014 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/stats/man/SSfol.Rd b/src/library/stats/man/SSfol.Rd
index 2a1fbc7..fa34984 100644
--- a/src/library/stats/man/SSfol.Rd
+++ b/src/library/stats/man/SSfol.Rd
@@ -1,5 +1,5 @@
 % File src/library/stats/man/SSfol.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2010 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/stats/man/SSfpl.Rd b/src/library/stats/man/SSfpl.Rd
index 597f9e8..60a197d 100644
--- a/src/library/stats/man/SSfpl.Rd
+++ b/src/library/stats/man/SSfpl.Rd
@@ -1,5 +1,5 @@
 % File src/library/stats/man/SSfpl.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2010 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/stats/man/SSgompertz.Rd b/src/library/stats/man/SSgompertz.Rd
index 2e53990..54c1a7a 100644
--- a/src/library/stats/man/SSgompertz.Rd
+++ b/src/library/stats/man/SSgompertz.Rd
@@ -1,5 +1,5 @@
 % File src/library/stats/man/SSgompertz.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2007 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/stats/man/SSlogis.Rd b/src/library/stats/man/SSlogis.Rd
index f30eb8d..090969e 100644
--- a/src/library/stats/man/SSlogis.Rd
+++ b/src/library/stats/man/SSlogis.Rd
@@ -1,5 +1,5 @@
 % File src/library/stats/man/SSlogis.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2007 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/stats/man/SSmicmen.Rd b/src/library/stats/man/SSmicmen.Rd
index 94333c1..4f526c7 100644
--- a/src/library/stats/man/SSmicmen.Rd
+++ b/src/library/stats/man/SSmicmen.Rd
@@ -1,5 +1,5 @@
 % File src/library/stats/man/SSmicmen.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2010 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/stats/man/SSweibull.Rd b/src/library/stats/man/SSweibull.Rd
index 3b84474..b7f1482 100644
--- a/src/library/stats/man/SSweibull.Rd
+++ b/src/library/stats/man/SSweibull.Rd
@@ -1,5 +1,5 @@
 % File src/library/stats/man/SSweibull.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2007 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/stats/man/SignRank.Rd b/src/library/stats/man/SignRank.Rd
index f009b93..5a97177 100644
--- a/src/library/stats/man/SignRank.Rd
+++ b/src/library/stats/man/SignRank.Rd
@@ -1,6 +1,6 @@
 % File src/library/stats/man/SignRank.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2013 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2014 R Core Team
 % Distributed under GPL 2 or later
 
 \name{SignRank}
diff --git a/src/library/stats/man/StructTS.Rd b/src/library/stats/man/StructTS.Rd
index e04d167..906a04d 100644
--- a/src/library/stats/man/StructTS.Rd
+++ b/src/library/stats/man/StructTS.Rd
@@ -1,5 +1,5 @@
 % File src/library/stats/man/StructTS.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2009 R Core Team
 % Distributed under GPL 2 or later
 
@@ -20,7 +20,7 @@ StructTS(x, type = c("level", "trend", "BSM"), init = NULL,
 
   \item{type}{the class of structural model.  If omitted, a BSM is used
     for a time series with \code{frequency(x) > 1}, and a local trend
-    model otherwise.}
+    model otherwise.  Can be abbreviated.}
 
   \item{init}{initial values of the variance parameters.}
 
diff --git a/src/library/stats/man/TDist.Rd b/src/library/stats/man/TDist.Rd
index c548b1e..c060ae0 100644
--- a/src/library/stats/man/TDist.Rd
+++ b/src/library/stats/man/TDist.Rd
@@ -1,6 +1,6 @@
 % File src/library/stats/man/TDist.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2013 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2014 R Core Team
 % Distributed under GPL 2 or later
 
 \name{TDist}
diff --git a/src/library/stats/man/Tukey.Rd b/src/library/stats/man/Tukey.Rd
index b098fbe..9fbff2e 100644
--- a/src/library/stats/man/Tukey.Rd
+++ b/src/library/stats/man/Tukey.Rd
@@ -1,6 +1,6 @@
 % File src/library/stats/man/Tukey.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2013 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2014 R Core Team
 % Distributed under GPL 2 or later
 
 \name{Tukey}
diff --git a/src/library/stats/man/TukeyHSD.Rd b/src/library/stats/man/TukeyHSD.Rd
index f4267d4..fce0041 100644
--- a/src/library/stats/man/TukeyHSD.Rd
+++ b/src/library/stats/man/TukeyHSD.Rd
@@ -1,10 +1,8 @@
 % File src/library/stats/man/TukeyHSD.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2013 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2015 R Core Team
 % Distributed under GPL 2 or later
 
-\newcommand{\CRANpkg}{\href{http://CRAN.R-project.org/package=#1}{\pkg{#1}}}
-
 \name{TukeyHSD}
 \alias{TukeyHSD}
 %\alias{TukeyHSD.aov}
@@ -37,6 +35,9 @@ TukeyHSD(x, which, ordered = FALSE, conf.level = 0.95, \dots)
  \item{\dots}{Optional additional arguments.  None are used at present.}
 }
 \details{
+  This is a generic function: the description here applies to the method
+  for fits of class \code{"aov"}.
+  
   When comparing the means for the levels of a factor in an analysis of
   variance, a simple comparison using t-tests will inflate the
   probability of declaring a significant difference when it is not in
@@ -57,10 +58,7 @@ TukeyHSD(x, which, ordered = FALSE, conf.level = 0.95, \dots)
   designs.
 
   If \code{which} specifies non-factor terms these will be dropped with
-  a warning: if no terms are left this is a an error.
-
-  In \R 2.15.2 and earlier the results were \code{NA} for fits with
-  \code{na.action} methods such as \code{\link{na.exclude}}.
+  a warning: if no terms are left this is an error.
 }
 \value{
   A list of class \code{c("multicomp", "TukeyHSD")},
diff --git a/src/library/stats/man/Uniform.Rd b/src/library/stats/man/Uniform.Rd
index d31b3bf..7f36918 100644
--- a/src/library/stats/man/Uniform.Rd
+++ b/src/library/stats/man/Uniform.Rd
@@ -1,6 +1,6 @@
 % File src/library/stats/man/Uniform.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2013 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2014 R Core Team
 % Distributed under GPL 2 or later
 
 \name{Uniform}
diff --git a/src/library/stats/man/Weibull.Rd b/src/library/stats/man/Weibull.Rd
index da56865..303dfdf 100644
--- a/src/library/stats/man/Weibull.Rd
+++ b/src/library/stats/man/Weibull.Rd
@@ -1,5 +1,5 @@
 % File src/library/stats/man/Weibull.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2014 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/stats/man/Wilcoxon.Rd b/src/library/stats/man/Wilcoxon.Rd
index 85f3c1b..b3ce02f 100644
--- a/src/library/stats/man/Wilcoxon.Rd
+++ b/src/library/stats/man/Wilcoxon.Rd
@@ -1,6 +1,6 @@
 % File src/library/stats/man/Wilcoxon.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2013 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2014 R Core Team
 % Distributed under GPL 2 or later
 
 \name{Wilcoxon}
diff --git a/src/library/stats/man/acf.Rd b/src/library/stats/man/acf.Rd
index 29d4a56..42cac1a 100644
--- a/src/library/stats/man/acf.Rd
+++ b/src/library/stats/man/acf.Rd
@@ -1,5 +1,5 @@
 % File src/library/stats/man/acf.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2007 R Core Team
 % Distributed under GPL 2 or later
 
@@ -43,7 +43,7 @@ ccf(x, y, lag.max = NULL, type = c("correlation", "covariance"),
   \item{type}{character string giving the type of acf to be computed.
     Allowed values are
     \code{"correlation"} (the default), \code{"covariance"} or
-    \code{"partial"}.}
+    \code{"partial"}.  Will be partially matched.}
   \item{plot}{logical. If \code{TRUE} (the default) the acf is plotted.}
   \item{na.action}{function to be called to handle missing
     values. \code{na.pass} can be used.}
diff --git a/src/library/stats/man/acf2AR.Rd b/src/library/stats/man/acf2AR.Rd
index 2ff85e1..ed06212 100644
--- a/src/library/stats/man/acf2AR.Rd
+++ b/src/library/stats/man/acf2AR.Rd
@@ -1,5 +1,5 @@
 % File src/library/stats/man/acf2AR.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2007 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/stats/man/add1.Rd b/src/library/stats/man/add1.Rd
index 5a3dc38..4410a53 100644
--- a/src/library/stats/man/add1.Rd
+++ b/src/library/stats/man/add1.Rd
@@ -1,5 +1,5 @@
 % File src/library/stats/man/add1.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2013 R Core Team
 % Distributed under GPL 2 or later
 
@@ -55,6 +55,7 @@ drop1(object, scope, \dots)
     \code{"Rao"} for likelihood ratio tests and Rao's efficient score test.
     The former is synonymous with \code{"Chisq"} (although both have
     an asymptotic chi-square distribution).
+    Values can be abbreviated.
     }
   \item{k}{the penalty constant in AIC / \eqn{C_p}{Cp}.}
   \item{trace}{if \code{TRUE}, print out progress reports.}
@@ -134,7 +135,7 @@ drop1(object, scope, \dots)
   \code{\link{extractAIC}}, \code{\link{anova}}
 }
 \examples{
-\testonly{od <- options(digits = 5)}
+\dontshow{od <- options(digits = 5)}
 require(graphics); require(utils)
 ## following example(swiss)
 lm1 <- lm(Fertility ~ ., data = swiss)
@@ -146,6 +147,6 @@ drop1(lm1, test = "F")  # So called 'type II' anova
 drop1(glm.D93, test = "Chisq")
 drop1(glm.D93, test = "F")
 add1(glm.D93, scope = ~outcome*treatment, test = "Rao") ## Pearson Chi-square
-\testonly{options(od)}
+\dontshow{options(od)}
 }
 \keyword{models}
diff --git a/src/library/stats/man/addmargins.Rd b/src/library/stats/man/addmargins.Rd
index 48c23e6..ba4330d 100644
--- a/src/library/stats/man/addmargins.Rd
+++ b/src/library/stats/man/addmargins.Rd
@@ -1,5 +1,5 @@
 % File src/library/stats/man/addmargins.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2009 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/stats/man/aggregate.Rd b/src/library/stats/man/aggregate.Rd
index 9c203ca..61e2a7c 100644
--- a/src/library/stats/man/aggregate.Rd
+++ b/src/library/stats/man/aggregate.Rd
@@ -1,5 +1,5 @@
 % File src/library/stats/man/aggregate.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2012 R Core Team
 % Distributed under GPL 2 or later
 
@@ -15,7 +15,7 @@ aggregate(x, \dots)
 
 \method{aggregate}{default}(x, \dots)
 
-\method{aggregate}{data.frame}(x, by, FUN, \dots, simplify = TRUE)
+\method{aggregate}{data.frame}(x, by, FUN, \dots, simplify = TRUE, drop = TRUE)
 
 \method{aggregate}{formula}(formula, data, FUN, \dots,
           subset, na.action = na.omit)
@@ -36,6 +36,8 @@ aggregate(x, \dots)
     applied to all data subsets.}
   \item{simplify}{a logical indicating whether results should be
     simplified to a vector or matrix if possible.}
+  \item{drop}{a logical indicating whether to drop unused combinations
+    of grouping values.}
   \item{formula}{a \link{formula}, such as \code{y ~ x} or
     \code{cbind(y1, y2) ~ x1 + x2}, where the \code{y} variables are
     numeric data to be split into groups according to the grouping
diff --git a/src/library/stats/man/alias.Rd b/src/library/stats/man/alias.Rd
index b2eb0a8..37f25b4 100644
--- a/src/library/stats/man/alias.Rd
+++ b/src/library/stats/man/alias.Rd
@@ -1,10 +1,8 @@
 % File src/library/stats/man/alias.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2014 R Core Team
 % Distributed under GPL 2 or later
 
-\newcommand{\CRANpkg}{\href{http://CRAN.R-project.org/package=#1}{\pkg{#1}}}
-
 \name{alias}
 \title{Find Aliases (Dependencies) in a Model}
 \usage{
diff --git a/src/library/stats/man/anova.Rd b/src/library/stats/man/anova.Rd
index 9e133f0..d1a661e 100644
--- a/src/library/stats/man/anova.Rd
+++ b/src/library/stats/man/anova.Rd
@@ -1,5 +1,5 @@
 % File src/library/stats/man/anova.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2013 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/stats/man/anova.glm.Rd b/src/library/stats/man/anova.glm.Rd
index d81ef33..bb50671 100644
--- a/src/library/stats/man/anova.glm.Rd
+++ b/src/library/stats/man/anova.glm.Rd
@@ -1,5 +1,5 @@
 % File src/library/stats/man/anova.glm.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2013 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/stats/man/anova.lm.Rd b/src/library/stats/man/anova.lm.Rd
index afe674f..ed44757 100644
--- a/src/library/stats/man/anova.lm.Rd
+++ b/src/library/stats/man/anova.lm.Rd
@@ -1,5 +1,5 @@
 % File src/library/stats/man/anova.lm.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2013 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/stats/man/anova.mlm.Rd b/src/library/stats/man/anova.mlm.Rd
index b71554f..ddbe5f2 100644
--- a/src/library/stats/man/anova.mlm.Rd
+++ b/src/library/stats/man/anova.mlm.Rd
@@ -1,10 +1,8 @@
 % File src/library/stats/man/anova.mlm.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2007 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2014 R Core Team
 % Distributed under GPL 2 or later
 
-\newcommand{\sspace}{\ifelse{latex}{\out{~}}{ }}
-
 \name{anova.mlm}
 \alias{anova.mlm}
 %\alias{anova.mlmlist}
@@ -24,7 +22,7 @@
 \arguments{
   \item{object}{an object of class \code{"mlm"}.}
   \item{\dots}{further objects of class \code{"mlm"}.}
-  \item{test}{choice of test statistic (see below).}
+  \item{test}{choice of test statistic (see below).  Can be abbreviated.}
   \item{Sigma}{(only relevant if  \code{test == "Spherical"}).  Covariance
     matrix assumed proportional to \code{Sigma}.}
   \item{T}{transformation matrix.  By default computed from \code{M} and
diff --git a/src/library/stats/man/ansari.test.Rd b/src/library/stats/man/ansari.test.Rd
index 66c3d00..1efe01a 100644
--- a/src/library/stats/man/ansari.test.Rd
+++ b/src/library/stats/man/ansari.test.Rd
@@ -1,10 +1,8 @@
 % File src/library/stats/man/ansari.test.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2008 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2014 R Core Team
 % Distributed under GPL 2 or later
 
-\newcommand{\CRANpkg}{\href{http://CRAN.R-project.org/package=#1}{\pkg{#1}}}
-
 \name{ansari.test}
 \alias{ansari.test}
 \alias{ansari.test.default}
diff --git a/src/library/stats/man/aov.Rd b/src/library/stats/man/aov.Rd
index cafc51d..975da33 100644
--- a/src/library/stats/man/aov.Rd
+++ b/src/library/stats/man/aov.Rd
@@ -1,10 +1,8 @@
 % File src/library/stats/man/aov.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2013 R Core Team
 % Distributed under GPL 2 or later
 
-\newcommand{\CRANpkg}{\href{http://CRAN.R-project.org/package=#1}{\pkg{#1}}}
-
 \name{aov}
 \alias{aov}
 \alias{print.aov}
diff --git a/src/library/stats/man/approxfun.Rd b/src/library/stats/man/approxfun.Rd
index 92d7207..b285765 100644
--- a/src/library/stats/man/approxfun.Rd
+++ b/src/library/stats/man/approxfun.Rd
@@ -1,6 +1,6 @@
 % File src/library/stats/man/approxfun.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2012 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2014 R Core Team
 % Distributed under GPL 2 or later
 
 \name{approxfun}
diff --git a/src/library/stats/man/ar.Rd b/src/library/stats/man/ar.Rd
index 91fc1e2..a834075 100644
--- a/src/library/stats/man/ar.Rd
+++ b/src/library/stats/man/ar.Rd
@@ -1,5 +1,5 @@
 % File src/library/stats/man/ar.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2007 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/stats/man/ar.ols.Rd b/src/library/stats/man/ar.ols.Rd
index 8133fbf..04f56c6 100644
--- a/src/library/stats/man/ar.ols.Rd
+++ b/src/library/stats/man/ar.ols.Rd
@@ -1,10 +1,8 @@
 % File src/library/stats/man/ar.ols.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2007 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2014 R Core Team
 % Distributed under GPL 2 or later
 
-\newcommand{\sspace}{\ifelse{latex}{\out{~}}{ }}
-
 \name{ar.ols}
 \alias{ar.ols}
 \title{Fit Autoregressive Models to Time Series by OLS}
diff --git a/src/library/stats/man/arima.Rd b/src/library/stats/man/arima.Rd
index b412a8c..cc09f00 100644
--- a/src/library/stats/man/arima.Rd
+++ b/src/library/stats/man/arima.Rd
@@ -1,6 +1,6 @@
 % File src/library/stats/man/arima.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2014 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2015 R Core Team
 % Distributed under GPL 2 or later
 
 \name{arima}
@@ -64,7 +64,7 @@ arima(x, order = c(0L, 0L, 0L),
   \item{method}{fitting method: maximum likelihood or minimize
     conditional sum-of-squares.  The default (unless there are missing
     values) is to use conditional-sum-of-squares to find starting
-    values, then maximum likelihood.}
+    values, then maximum likelihood.  Can be abbreviated.}
 
   \item{n.cond}{only used if fitting by conditional-sum-of-squares: the
     number of initial observations to ignore.  It will be ignored if
@@ -72,7 +72,7 @@ arima(x, order = c(0L, 0L, 0L),
 
   \item{SSinit}{a string specifying the algorithm to compute the
     state-space initialization of the likelihood; see
-    \code{\link{KalmanLike}} for details.}
+    \code{\link{KalmanLike}} for details.   Can be abbreviated.}
 
   \item{optim.method}{The value passed as the \code{method} argument to
     \code{\link{optim}}.}
@@ -175,6 +175,10 @@ arima(x, order = c(0L, 0L, 0L),
 
   \item{n.cond}{the number of initial observations not used in the fitting.}
 
+  \item{nobs}{the number of \dQuote{used} observations for the fitting,
+    can also be extracted via \code{\link{nobs}()} and is used by
+    \code{\link{BIC}}.}
+
   \item{model}{A list representing the Kalman Filter used in the
     fitting.  See \code{\link{KalmanLike}}.}
 }
@@ -198,7 +202,7 @@ arima(x, order = c(0L, 0L, 0L),
 
   Ripley, B. D. (2002) Time series in \R 1.5.0.
   \emph{R News}, \bold{2/2}, 2--7.
-  \url{http://www.r-project.org/doc/Rnews/Rnews_2002-2.pdf}
+  \url{https://www.r-project.org/doc/Rnews/Rnews_2002-2.pdf}
 }
 
 \note{
@@ -238,9 +242,15 @@ arima(LakeHuron, order = c(2,0,0), xreg = time(LakeHuron) - 1920)
 ## graphs in example(acf) suggest order 1 or 3
 require(graphics)
 (fit1 <- arima(presidents, c(1, 0, 0)))
+nobs(fit1)
 tsdiag(fit1)
 (fit3 <- arima(presidents, c(3, 0, 0)))  # smaller AIC
 tsdiag(fit3)
+BIC(fit1, fit3)
+## compare a whole set of models; BIC() would choose the smallest
+AIC(fit1, arima(presidents, c(2,0,0)),
+          arima(presidents, c(2,0,1)), # <- chosen (barely) by AIC
+    fit3, arima(presidents, c(3,0,1)))
 
 ## An example of ARIMA forecasting:
 predict(fit3, 3)
diff --git a/src/library/stats/man/arima.sim.Rd b/src/library/stats/man/arima.sim.Rd
index 11e49d6..593a5dd 100644
--- a/src/library/stats/man/arima.sim.Rd
+++ b/src/library/stats/man/arima.sim.Rd
@@ -1,5 +1,5 @@
 % File src/library/stats/man/arima.sim.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2012 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/stats/man/arima0.Rd b/src/library/stats/man/arima0.Rd
index bc4e00b..b2da323 100644
--- a/src/library/stats/man/arima0.Rd
+++ b/src/library/stats/man/arima0.Rd
@@ -1,6 +1,6 @@
 % File src/library/stats/man/arima0.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2012 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2014 R Core Team
 % Distributed under GPL 2 or later
 
 \name{arima0}
@@ -63,7 +63,7 @@ arima0(x, order = c(0, 0, 0),
     will be ignored.}
 
   \item{method}{Fitting method: maximum likelihood or minimize
-    conditional sum-of-squares.}
+    conditional sum-of-squares.  Can be abbreviated.}
 
   \item{n.cond}{Only used if fitting by conditional-sum-of-squares: the
     number of initial observations to ignore.  It will be ignored if
diff --git a/src/library/stats/man/as.hclust.Rd b/src/library/stats/man/as.hclust.Rd
index 9af77ee..a864769 100644
--- a/src/library/stats/man/as.hclust.Rd
+++ b/src/library/stats/man/as.hclust.Rd
@@ -1,10 +1,8 @@
 % File src/library/stats/man/as.hclust.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2013 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2014 R Core Team
 % Distributed under GPL 2 or later
 
-\newcommand{\CRANpkg}{\href{http://CRAN.R-project.org/package=#1}{\pkg{#1}}}
-
 \name{as.hclust}
 \alias{as.hclust}
 \alias{as.hclust.default}
diff --git a/src/library/stats/man/asOneSidedFormula.Rd b/src/library/stats/man/asOneSidedFormula.Rd
index d972410..d58dec3 100644
--- a/src/library/stats/man/asOneSidedFormula.Rd
+++ b/src/library/stats/man/asOneSidedFormula.Rd
@@ -1,5 +1,5 @@
 % File src/library/stats/man/asOneSidedFormula.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2010 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/stats/man/ave.Rd b/src/library/stats/man/ave.Rd
index 44258f9..f92912d 100644
--- a/src/library/stats/man/ave.Rd
+++ b/src/library/stats/man/ave.Rd
@@ -1,5 +1,5 @@
 % File src/library/stats/man/ave.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2007 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/stats/man/bandwidth.Rd b/src/library/stats/man/bandwidth.Rd
index d50b56a..0a8c379 100644
--- a/src/library/stats/man/bandwidth.Rd
+++ b/src/library/stats/man/bandwidth.Rd
@@ -1,10 +1,8 @@
 % File src/library/stats/man/bandwidth.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2013 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2017 R Core Team
 % Distributed under GPL 2 or later
 
-\newcommand{\CRANpkg}{\href{http://CRAN.R-project.org/package=#1}{\pkg{#1}}}
-
 \name{bandwidth}
 \alias{bw.nrd0}
 \alias{bw.nrd}
@@ -34,7 +32,7 @@ bw.SJ(x, nb = 1000, lower = 0.1 * hmax, upper = hmax,
     almost always satisfactory.  \code{hmax} is calculated internally
     from a normal reference bandwidth.}
   \item{method}{either \code{"ste"} ("solve-the-equation") or
-    \code{"dpi"} ("direct plug-in").}
+    \code{"dpi"} ("direct plug-in").   Can be abbreviated.}
   \item{tol}{for method \code{"ste"}, the convergence tolerance for
     \code{\link{uniroot}}.  The default leads to bandwidth estimates
     with only slightly more than one digit accuracy, which is sufficient
@@ -67,11 +65,24 @@ bw.SJ(x, nb = 1000, lower = 0.1 * hmax, upper = hmax,
   \code{\link{uniroot}}) and because of that, enlarges the interval
   \code{c(lower, upper)} when the boundaries were not user-specified and
   do not bracket the root.
+
+  The last three methods use all pairwise binned distances: they are of
+  complexity \eqn{O(n^2)} up to \code{n = nb/2} and \eqn{O(n)}
+  thereafter.  Because of the binning, the results differ slightly when
+  \code{x} is translated or sign-flipped.
 }
 \value{
   A bandwidth on a scale suitable for the \code{bw} argument
   of \code{density}.
 }
+\note{
+  Long vectors \code{x} are not supported, but neither are they by
+  \code{\link{density}} and kernel density estimation and for more than
+  a few thousand points a histogram would be preferred.
+}
+\author{
+  B. D. Ripley, taken from early versions of package \pkg{MASS}.
+}
 \seealso{
   \code{\link{density}}.
 
diff --git a/src/library/stats/man/bartlett.test.Rd b/src/library/stats/man/bartlett.test.Rd
index 35284e8..f4b3b6f 100644
--- a/src/library/stats/man/bartlett.test.Rd
+++ b/src/library/stats/man/bartlett.test.Rd
@@ -1,5 +1,5 @@
 % File src/library/stats/man/bartlett.test.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2007 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/stats/man/binom.test.Rd b/src/library/stats/man/binom.test.Rd
index 227fa83..2456025 100644
--- a/src/library/stats/man/binom.test.Rd
+++ b/src/library/stats/man/binom.test.Rd
@@ -1,5 +1,5 @@
 % File src/library/stats/man/binom.test.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2007 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/stats/man/biplot.Rd b/src/library/stats/man/biplot.Rd
index f23d080..95a3a2e 100644
--- a/src/library/stats/man/biplot.Rd
+++ b/src/library/stats/man/biplot.Rd
@@ -1,5 +1,5 @@
 % File src/library/stats/man/biplot.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2010 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/stats/man/biplot.princomp.Rd b/src/library/stats/man/biplot.princomp.Rd
index 2c6908d..7c1569c 100644
--- a/src/library/stats/man/biplot.princomp.Rd
+++ b/src/library/stats/man/biplot.princomp.Rd
@@ -1,5 +1,5 @@
 % File src/library/stats/man/biplot.princomp.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2007 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/stats/man/birthday.Rd b/src/library/stats/man/birthday.Rd
index e72aee5..baea62b 100644
--- a/src/library/stats/man/birthday.Rd
+++ b/src/library/stats/man/birthday.Rd
@@ -1,6 +1,6 @@
 % File src/library/stats/man/birthday.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2011 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2014 R Core Team
 % Distributed under GPL 2 or later
 
 \name{birthday}
diff --git a/src/library/stats/man/box.test.Rd b/src/library/stats/man/box.test.Rd
index fcb17c1..d67a04e 100644
--- a/src/library/stats/man/box.test.Rd
+++ b/src/library/stats/man/box.test.Rd
@@ -1,10 +1,8 @@
 % File src/library/stats/man/box.test.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2009 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2014 R Core Team
 % Distributed under GPL 2 or later
 
-\newcommand{\sspace}{\ifelse{latex}{\out{~}}{ }}
-
 \name{Box.test}
 \alias{Box.test}
 \concept{portmanteau}
diff --git a/src/library/stats/man/cancor.Rd b/src/library/stats/man/cancor.Rd
index eeaebc1..dcbec5a 100644
--- a/src/library/stats/man/cancor.Rd
+++ b/src/library/stats/man/cancor.Rd
@@ -1,10 +1,8 @@
 % File src/library/stats/man/cancor.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2007 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2014 R Core Team
 % Distributed under GPL 2 or later
 
-\newcommand{\sspace}{\ifelse{latex}{\out{~}}{ }}
-
 \name{cancor}
 \title{Canonical Correlations}
 \alias{cancor}
diff --git a/src/library/stats/man/case.names.Rd b/src/library/stats/man/case.names.Rd
index d9f850e..4e16559 100644
--- a/src/library/stats/man/case.names.Rd
+++ b/src/library/stats/man/case.names.Rd
@@ -1,5 +1,5 @@
 % File src/library/stats/man/case.names.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2011 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/stats/man/checkMFClasses.Rd b/src/library/stats/man/checkMFClasses.Rd
index 2318f3f..41dcbd5 100644
--- a/src/library/stats/man/checkMFClasses.Rd
+++ b/src/library/stats/man/checkMFClasses.Rd
@@ -1,5 +1,5 @@
 % File src/library/stats/man/checkMFClasses.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2007 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/stats/man/chisq.test.Rd b/src/library/stats/man/chisq.test.Rd
index 27f2176..9a18ccf 100644
--- a/src/library/stats/man/chisq.test.Rd
+++ b/src/library/stats/man/chisq.test.Rd
@@ -1,6 +1,6 @@
 % File src/library/stats/man/chisq.test.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2010 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2014 R Core Team
 % Distributed under GPL 2 or later
 
 \name{chisq.test}
@@ -121,7 +121,7 @@ chisq.test(x, y = NULL, correct = TRUE,
 
 ## From Agresti(2007) p.39
 M <- as.table(rbind(c(762, 327, 468), c(484, 239, 477)))
-dimnames(M) <- list(gender = c("M","F"),
+dimnames(M) <- list(gender = c("F", "M"),
                     party = c("Democrat","Independent", "Republican"))
 (Xsq <- chisq.test(M))  # Prints test summary
 Xsq$observed   # observed counts (same as M)
diff --git a/src/library/stats/man/cmdscale.Rd b/src/library/stats/man/cmdscale.Rd
index 3c8930f..5e3b80f 100644
--- a/src/library/stats/man/cmdscale.Rd
+++ b/src/library/stats/man/cmdscale.Rd
@@ -1,21 +1,19 @@
 % File src/library/stats/man/cmdscale.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2010 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2015 R Core Team
 % Distributed under GPL 2 or later
 
-\newcommand{\CRANpkg}{\href{http://CRAN.R-project.org/package=#1}{\pkg{#1}}}
-\newcommand{\sspace}{\ifelse{latex}{\out{~}}{ }}
-
 \name{cmdscale}
 \alias{cmdscale}
 \concept{ordination}
 \concept{MDS}
 \title{Classical (Metric) Multidimensional Scaling}
 \usage{
-cmdscale(d, k = 2, eig = FALSE, add = FALSE, x.ret = FALSE)
+cmdscale(d, k = 2, eig = FALSE, add = FALSE, x.ret = FALSE,
+         list. = eig || add || x.ret)
 }
 \description{
-  Classical multidimensional scaling of a data matrix.
+  Classical multidimensional scaling (MDS) of a data matrix.
   Also known as \emph{principal coordinates analysis} (Gower, 1966).
 }
 \arguments{
@@ -29,6 +27,8 @@ cmdscale(d, k = 2, eig = FALSE, add = FALSE, x.ret = FALSE)
     the modified dissimilarities are Euclidean.}
   \item{x.ret}{indicates whether the doubly centred symmetric distance
     matrix should be returned.}
+  \item{list.}{logical indicating if a \code{\link{list}} should be
+    returned or just the \eqn{n \times k}{n * k} matrix, see \sQuote{Value:}.}
 }
 \details{
   Multidimensional scaling takes a set of dissimilarities and returns a
@@ -49,7 +49,7 @@ cmdscale(d, k = 2, eig = FALSE, add = FALSE, x.ret = FALSE)
   \R platforms (see \code{\link{prcomp}}).
 
   When \code{add = TRUE}, a minimal additive constant \eqn{c*} is
-  computed such that the the dissimilarities \eqn{d_{ij} + c*}{d[i,j] +
+  computed such that the dissimilarities \eqn{d_{ij} + c*}{d[i,j] +
   c*} are Euclidean and hence can be represented in \code{n - 1}
   dimensions.  Whereas S (Becker \emph{et al}, 1988) computes this
   constant using an approximation suggested by Torgerson, \R uses the
@@ -59,11 +59,11 @@ cmdscale(d, k = 2, eig = FALSE, add = FALSE, x.ret = FALSE)
   could be in fewer than \code{n - 1} dimensions.
 }
 \value{
-  If \code{eig = FALSE}, \code{add = FALSE} and \code{x.ret = FALSE}
-  (default), a matrix with \code{k} columns whose rows give the
-  coordinates of the points chosen to represent the dissimilarities.
+  If \code{.list} is false (as per default), a matrix with \code{k}
+  columns whose rows give the coordinates of the points chosen to
+  represent the dissimilarities.
 
-  Otherwise, a list containing the following components.
+  Otherwise, a \code{\link{list}} containing the following components.
   \item{points}{a matrix with up to \code{k} columns whose rows give the
     coordinates of the points chosen to represent the dissimilarities.}
   \item{eig}{the \eqn{n} eigenvalues computed during the scaling process if
diff --git a/src/library/stats/man/coef.Rd b/src/library/stats/man/coef.Rd
index ed8098d..420440a 100644
--- a/src/library/stats/man/coef.Rd
+++ b/src/library/stats/man/coef.Rd
@@ -1,5 +1,5 @@
 % File src/library/stats/man/coef.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2012 R Core Team
 % Distributed under GPL 2 or later
 
@@ -33,6 +33,7 @@ coefficients(object, \dots)
   Coefficients extracted from the model object \code{object}.
 
   For standard model fitting classes this will be a named numeric vector.
+  For \code{"maov"} objects (produced by \code{\link{aov}}) it will be a matrix.
 }
 \seealso{
   \code{\link{fitted.values}} and \code{\link{residuals}} for related methods;
diff --git a/src/library/stats/man/complete.cases.Rd b/src/library/stats/man/complete.cases.Rd
index cfabd45..66bdc41 100644
--- a/src/library/stats/man/complete.cases.Rd
+++ b/src/library/stats/man/complete.cases.Rd
@@ -1,6 +1,6 @@
 % File src/library/stats/man/complete.cases.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2007 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2015 R Core Team
 % Distributed under GPL 2 or later
 
 \name{complete.cases}
@@ -20,6 +20,14 @@ complete.cases(\dots)
   A logical vector specifying which observations/rows have no missing
   values across the entire sequence.
 }
+\note{
+  A current limitation of this function is that it uses low level
+  functions to determine lengths and missingness, ignoring the 
+  class.  This will lead to spurious errors when some columns
+  have classes with \code{\link{length}} or \code{\link{is.na}}
+  methods, for example \code{"\link{POSIXlt}"}, as described
+  in \PR{16648}.
+}
 \seealso{
   \code{\link{is.na}},
   \code{\link{na.omit}},
diff --git a/src/library/stats/man/confint.Rd b/src/library/stats/man/confint.Rd
index 2c7d2dc..0ed607d 100644
--- a/src/library/stats/man/confint.Rd
+++ b/src/library/stats/man/confint.Rd
@@ -1,10 +1,8 @@
 % File src/library/stats/man/confint.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2013 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2015 R Core Team
 % Distributed under GPL 2 or later
 
-\newcommand{\CRANpkg}{\href{http://CRAN.R-project.org/package=#1}{\pkg{#1}}}
-
 \name{confint}
 \title{Confidence Intervals for Model Parameters}
 \alias{confint}
@@ -40,9 +38,11 @@ confint(object, parm, level = 0.95, \dots)
   For objects of class \code{"lm"} the direct formulae based on \eqn{t}
   values are used.
 
-  There are stub methods for classes \code{"glm"} and \code{"nls"} which
-  invoke those in package \CRANpkg{MASS} which are based on profile
-  likelihoods.
+  There are stub methods in package \pkg{stats} for classes \code{"glm"}
+  and \code{"nls"} which call those in package \CRANpkg{MASS} (if
+  installed): if the \CRANpkg{MASS} namespace has been loaded, its
+  methods will be used directly.  (Those methods are based on profile
+  likelihood.)
 }
 \seealso{
   \code{\link[MASS:confint]{confint.glm}} and
@@ -57,7 +57,7 @@ confint(fit, "wt")
 counts <- c(18,17,15,20,10,20,25,13,12)
 outcome <- gl(3, 1, 9); treatment <- gl(3, 3)
 glm.D93 <- glm(counts ~ outcome + treatment, family = poisson())
-confint(glm.D93) # needs MASS to be present on the system
+confint(glm.D93) # needs MASS to be installed
 confint.default(glm.D93)  # based on asymptotic normality}
 }
 \keyword{models}
diff --git a/src/library/stats/man/constrOptim.Rd b/src/library/stats/man/constrOptim.Rd
index 5d9ca46..d7f955e 100644
--- a/src/library/stats/man/constrOptim.Rd
+++ b/src/library/stats/man/constrOptim.Rd
@@ -1,5 +1,5 @@
 % File src/library/stats/man/constrOptim.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2010 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/stats/man/contrast.Rd b/src/library/stats/man/contrast.Rd
index 0cecaa3..7586b73 100644
--- a/src/library/stats/man/contrast.Rd
+++ b/src/library/stats/man/contrast.Rd
@@ -1,11 +1,8 @@
 % File src/library/stats/man/contrast.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2009 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2014 R Core Team
 % Distributed under GPL 2 or later
 
-\newcommand{\CRANpkg}{\href{http://CRAN.R-project.org/package=#1}{\pkg{#1}}}
-\newcommand{\sspace}{\ifelse{latex}{\out{~}}{ }}
-
 \name{contrast}
 \alias{contr.helmert}
 \alias{contr.poly}
diff --git a/src/library/stats/man/contrasts.Rd b/src/library/stats/man/contrasts.Rd
index fda3b86..26e5dc3 100644
--- a/src/library/stats/man/contrasts.Rd
+++ b/src/library/stats/man/contrasts.Rd
@@ -1,11 +1,8 @@
 % File src/library/stats/man/contrasts.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2013 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2014 R Core Team
 % Distributed under GPL 2 or later
 
-\newcommand{\CRANpkg}{\href{http://CRAN.R-project.org/package=#1}{\pkg{#1}}}
-\newcommand{\sspace}{\ifelse{latex}{\out{~}}{ }}
-
 \name{contrasts}
 \alias{contrasts}
 \alias{contrasts<-}
diff --git a/src/library/stats/man/convolve.Rd b/src/library/stats/man/convolve.Rd
index 374949d..98d7e40 100644
--- a/src/library/stats/man/convolve.Rd
+++ b/src/library/stats/man/convolve.Rd
@@ -1,5 +1,5 @@
 % File src/library/stats/man/convolve.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2007 R Core Team
 % Distributed under GPL 2 or later
 
@@ -18,11 +18,11 @@ convolve(x, y, conj = TRUE, type = c("circular", "open", "filter"))
     convolved.}
   \item{conj}{logical; if \code{TRUE}, take the complex \emph{conjugate}
     before back-transforming (default, and used for usual convolution).}
-  \item{type}{character; one of \code{"circular"}, \code{"open"},
-    \code{"filter"} (beginning of word is ok).  For \code{circular}, the
+  \item{type}{character; partially matched to \code{"circular"}, \code{"open"},
+    \code{"filter"}.  For \code{"circular"}, the
     two sequences are treated as \emph{circular}, i.e., periodic.
 
-    For \code{open} and \code{filter}, the sequences are padded with
+    For \code{"open"} and \code{"filter"}, the sequences are padded with
     \code{0}s (from left and right) first; \code{"filter"} returns the
     middle sub-vector of \code{"open"}, namely, the result of running a
     weighted mean of \code{x} with weights \code{y}.}
diff --git a/src/library/stats/man/cophenetic.Rd b/src/library/stats/man/cophenetic.Rd
index 0358d0a..33112b2 100644
--- a/src/library/stats/man/cophenetic.Rd
+++ b/src/library/stats/man/cophenetic.Rd
@@ -1,11 +1,8 @@
 % File src/library/stats/man/cophenetic.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2007 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2014 R Core Team
 % Distributed under GPL 2 or later
 
-\newcommand{\CRANpkg}{\href{http://CRAN.R-project.org/package=#1}{\pkg{#1}}}
-\newcommand{\sspace}{\ifelse{latex}{\out{~}}{ }}
-
 \name{cophenetic}
 \alias{cophenetic}
 \alias{cophenetic.default}
diff --git a/src/library/stats/man/cor.Rd b/src/library/stats/man/cor.Rd
index abb1380..351b572 100644
--- a/src/library/stats/man/cor.Rd
+++ b/src/library/stats/man/cor.Rd
@@ -1,10 +1,8 @@
 % File src/library/stats/man/cor.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2012 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2016 R Core Team
 % Distributed under GPL 2 or later
 
-\newcommand{\CRANpkg}{\href{http://CRAN.R-project.org/package=#1}{\pkg{#1}}}
-
 \name{cor}
 \title{Correlation, Variance and Covariance (Matrices)}
 \usage{
@@ -45,13 +43,13 @@ cov2cor(V)
     \code{"na.or.complete"}, or \code{"pairwise.complete.obs"}.}
   \item{method}{a character string indicating which correlation
     coefficient (or covariance) is to be computed.  One of
-    \code{"pearson"} (default), \code{"kendall"}, or \code{"spearman"},
+    \code{"pearson"} (default), \code{"kendall"}, or \code{"spearman"}:
     can be abbreviated.}
   \item{V}{symmetric numeric matrix, usually positive definite such as a
     covariance matrix.}
 }
 \value{For \code{r <- cor(*, use = "all.obs")}, it is now guaranteed that
-  \code{all(r <= 1)}.
+  \code{all(abs(r) <= 1)}.
 }
 \details{
   For \code{cov} and \code{cor} one must \emph{either} give a matrix or
@@ -110,6 +108,9 @@ cov2cor(V)
   based on complete observations, or based on pairwise completeness with
   reranking for each pair.
 
+  When there are ties, Kendall's \eqn{\tau_b}{tau_b} is computed, as
+  proposed by Kendall (1945).
+
   Scaling a covariance matrix into a correlation one can be achieved in
   many ways, mathematically most appealing by multiplication with a
   diagonal matrix from left and right, or more efficiently by using
@@ -127,6 +128,12 @@ cov2cor(V)
   Becker, R. A., Chambers, J. M. and Wilks, A. R. (1988)
   \emph{The New S Language}.
   Wadsworth & Brooks/Cole.
+
+  Kendall, M. G. (1938)  A new measure of rank correlation,
+  \emph{Biometrika} \bold{30}, 81--93. \url{https://dx.doi.org/10.1093/biomet/30.1-2.81}
+
+  Kendall, M. G. (1945)  The treatment of ties in rank problems.
+  \emph{Biometrika} \bold{33} 239--251. \url{https://dx.doi.org/10.1093/biomet/33.3.239}
 }
 \seealso{
   \code{\link{cor.test}} for confidence intervals (and tests).
diff --git a/src/library/stats/man/cor.test.Rd b/src/library/stats/man/cor.test.Rd
index 429ca71..f43ee1b 100644
--- a/src/library/stats/man/cor.test.Rd
+++ b/src/library/stats/man/cor.test.Rd
@@ -1,10 +1,8 @@
 % File src/library/stats/man/cor.test.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2009 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2014 R Core Team
 % Distributed under GPL 2 or later
 
-\newcommand{\CRANpkg}{\href{http://CRAN.R-project.org/package=#1}{\pkg{#1}}}
-
 \name{cor.test}
 \alias{cor.test}
 \alias{cor.test.default}
diff --git a/src/library/stats/man/cov.wt.Rd b/src/library/stats/man/cov.wt.Rd
index 4c4a838..f1818f0 100644
--- a/src/library/stats/man/cov.wt.Rd
+++ b/src/library/stats/man/cov.wt.Rd
@@ -1,5 +1,5 @@
 % File src/library/stats/man/cov.wt.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2007 R Core Team
 % Distributed under GPL 2 or later
 
@@ -27,7 +27,7 @@ cov.wt(x, wt = rep(1/nrow(x), nrow(x)), cor = FALSE, center = TRUE,
     used.  If \code{center} is numeric, its length must equal the number
     of columns of \code{x}.}
   \item{method}{string specifying how the result is scaled, see
-    \sQuote{Details} below.}
+    \sQuote{Details} below.  Can be abbreviated.}
 }
 \value{
   A list containing the following named components:
diff --git a/src/library/stats/man/cpgram.Rd b/src/library/stats/man/cpgram.Rd
index d06ce4c..4bc94dd 100644
--- a/src/library/stats/man/cpgram.Rd
+++ b/src/library/stats/man/cpgram.Rd
@@ -1,10 +1,8 @@
 % File src/library/stats/man/cpgram.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2007 R Core Team
 % Distributed under GPL 2 or later
 
-\newcommand{\CRANpkg}{\href{http://CRAN.R-project.org/package=#1}{\pkg{#1}}}
-
 % file cpgram.Rd
 % copyright (C) 1994-9 W. N. Venables and B. D. Ripley
 %
diff --git a/src/library/stats/man/cutree.Rd b/src/library/stats/man/cutree.Rd
index 5b0066c..6c995fd 100644
--- a/src/library/stats/man/cutree.Rd
+++ b/src/library/stats/man/cutree.Rd
@@ -1,5 +1,5 @@
 % File src/library/stats/man/cutree.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2007 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/stats/man/decompose.Rd b/src/library/stats/man/decompose.Rd
index d1f0f36..25ab449 100644
--- a/src/library/stats/man/decompose.Rd
+++ b/src/library/stats/man/decompose.Rd
@@ -1,10 +1,8 @@
 % File src/library/stats/man/decompose.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2012 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2017 R Core Team
 % Distributed under GPL 2 or later
 
-\newcommand{\sspace}{\ifelse{latex}{\out{~}}{ }}
-
 \name{decompose}
 \alias{decompose}
 \alias{plot.decomposed.ts}
@@ -50,7 +48,7 @@ decompose(x, type = c("additive", "multiplicative"), filter = NULL)
 }
 \value{
   An object of class \code{"decomposed.ts"} with following components:
-  \item{x}{The original series.  (Only since \R 2.14.0.)}
+  \item{x}{The original series.}
   \item{seasonal}{The seasonal component (i.e., the repeated seasonal figure).}
   \item{figure}{The estimated seasonal figure only.}
   \item{trend}{The trend component.}
diff --git a/src/library/stats/man/delete.response.Rd b/src/library/stats/man/delete.response.Rd
index e09aadb..7ec9c0f 100644
--- a/src/library/stats/man/delete.response.Rd
+++ b/src/library/stats/man/delete.response.Rd
@@ -1,6 +1,6 @@
 % File src/library/stats/man/delete.response.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2013 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2014 R Core Team
 % Distributed under GPL 2 or later
 
 \name{delete.response}
diff --git a/src/library/stats/man/dendrapply.Rd b/src/library/stats/man/dendrapply.Rd
index 4df7929..013c059 100644
--- a/src/library/stats/man/dendrapply.Rd
+++ b/src/library/stats/man/dendrapply.Rd
@@ -1,6 +1,6 @@
 % File src/library/stats/man/dendrapply.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2007 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2015 R Core Team
 % Distributed under GPL 2 or later
 
 \name{dendrapply}
@@ -30,8 +30,13 @@ dendrapply(X, FUN, ...)
   i.e., returning the node with some attributes added or changed.
 }
 \author{Martin Maechler}
-\note{this is still somewhat experimental, and suggestions for
-  enhancements (or nice examples of usage) are very welcome.}
+\note{
+  The implementation is somewhat experimental and suggestions for
+  enhancements (or nice examples of usage) are very welcome.  The
+  current implementation is \emph{recursive} and inefficient for
+  dendrograms with many non-leaves.  See the \sQuote{Warning} in
+  \code{\link{dendrogram}}.
+}
 \seealso{\code{\link{as.dendrogram}}, \code{\link{lapply}} for applying
   a function to each component of a \code{list}, \code{\link{rapply}}
   for doing so to each non-list component of a nested list.
diff --git a/src/library/stats/man/dendrogram.Rd b/src/library/stats/man/dendrogram.Rd
index b7f30fd..6f42045 100644
--- a/src/library/stats/man/dendrogram.Rd
+++ b/src/library/stats/man/dendrogram.Rd
@@ -1,7 +1,7 @@
 % File src/library/stats/man/dendrogram.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2014 R Core Team
-% Copyright 2002-2014 The R Foundation
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2016 R Core Team
+% Copyright 2002-2015 The R Foundation
 % Distributed under GPL 2 or later
 
 \name{dendrogram}
@@ -29,7 +29,7 @@
 }
 \usage{
 as.dendrogram(object, \dots)
-\method{as.dendrogram}{hclust}(object, hang = -1, \dots)
+\method{as.dendrogram}{hclust}(object, hang = -1, check = TRUE, \dots)
 
 \method{as.hclust}{dendrogram}(x, \dots)
 
@@ -67,6 +67,11 @@ is.leaf(object)
   \item{hang}{numeric scalar indicating how the \emph{height} of leaves
     should be computed from the heights of their parents; see
     \code{\link{plot.hclust}}.}
+  \item{check}{logical indicating if \code{object} should be checked for
+    validity.  This check is not necessary when \code{x} is known to be
+    valid such as when it is the direct result of \code{hclust()}.  The
+    default is \code{check=TRUE}, e.g.\sspace{}for protecting against memory
+    explosion with invalid inputs.}
   \item{type}{type of plot.}
   \item{center}{logical; if \code{TRUE}, nodes are plotted centered with
     respect to the leaves in the branch.  Otherwise (default), plot them
@@ -206,10 +211,11 @@ is.leaf(object)
   }
 }
 \section{Warning}{
-  Some operations on dendrograms (including plotting) make use of
-  recursion.  For very deep trees It may be necessary to increase
-  \code{\link{options}("expressions")}: if you do you are likely to need
-  to set the C stack size larger than the default where possible.
+  Some operations on dendrograms such as \code{merge()} make use of
+  recursion.  For deep trees it may be necessary to increase
+  \code{\link{options}("expressions")}: if you do, you are likely to need
+  to set the C stack size (\code{\link{Cstack_info}()[["size"]]}) larger
+  than the default where possible.
 }
 \seealso{
   \code{\link{dendrapply}} for applying a function to \emph{each} node.
diff --git a/src/library/stats/man/density.Rd b/src/library/stats/man/density.Rd
index 0e3e16c..1735130 100644
--- a/src/library/stats/man/density.Rd
+++ b/src/library/stats/man/density.Rd
@@ -1,6 +1,6 @@
 % File src/library/stats/man/density.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2013 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2017 R Core Team
 % Distributed under GPL 2 or later
 
 \name{density}
@@ -19,7 +19,8 @@ density(x, \dots)
         n = 512, from, to, cut = 3, na.rm = FALSE, \dots)
 }
 \arguments{
-  \item{x}{the data from which the estimate is to be computed.}
+  \item{x}{the data from which the estimate is to be computed.  For the
+    default method a numeric vector: long vectors are not supported.}
 
   \item{bw}{the smoothing bandwidth to be used.  The kernels are scaled
     such that this is the standard deviation of the smoothing kernel.
@@ -40,7 +41,7 @@ density(x, \dots)
     bandwidth.}
 
   \item{kernel, window}{a character string giving the smoothing kernel
-    to be used. This must be one of \code{"gaussian"},
+    to be used. This must partially match one of \code{"gaussian"},
     \code{"rectangular"}, \code{"triangular"}, \code{"epanechnikov"},
     \code{"biweight"}, \code{"cosine"} or \code{"optcosine"}, with default
     \code{"gaussian"}, and may be abbreviated to a unique prefix (single
diff --git a/src/library/stats/man/deriv.Rd b/src/library/stats/man/deriv.Rd
index c0af8eb..a989d0b 100644
--- a/src/library/stats/man/deriv.Rd
+++ b/src/library/stats/man/deriv.Rd
@@ -1,9 +1,10 @@
 % File src/library/stats/man/deriv.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2013 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2013, 2017 R Core Team
 % Distributed under GPL 2 or later
 
 \name{deriv}
+\title{Symbolic and Algorithmic Derivatives of Simple Expressions}
 \alias{D}
 \alias{deriv}
 \alias{deriv.default}
@@ -11,9 +12,8 @@
 \alias{deriv3}
 \alias{deriv3.default}
 \alias{deriv3.formula}
-\title{Symbolic and Algorithmic Derivatives of Simple Expressions}
 \description{
-  Compute derivatives of simple expressions, symbolically.
+  Compute derivatives of simple expressions, symbolically and algorithmically.
 }
 \usage{
     D (expr, name)
@@ -31,12 +31,12 @@ deriv3(expr, \dots)
        hessian = TRUE, \dots)
 }
 \arguments{
-  \item{expr}{A \code{\link{expression}} or \code{\link{call}} or
+  \item{expr}{a \code{\link{expression}} or \code{\link{call}} or
     (except \code{D}) a formula with no lhs.}
   \item{name,namevec}{character vector, giving the variable names (only
     one for \code{D()}) with respect to which derivatives will be
     computed.}
-  \item{function.arg}{If specified and non-\code{NULL}, a character
+  \item{function.arg}{if specified and non-\code{NULL}, a character
     vector of arguments for a function return, or a function (with empty
     body) or \code{TRUE}, the latter indicating that a function with
     argument names \code{namevec} should be used.}
@@ -72,6 +72,11 @@ deriv3(expr, \dots)
   \code{digamma} and \code{trigamma}, as well as \code{psigamma} for one
   or two arguments (but derivative only with respect to the first).
   (Note that only the standard normal distribution is considered.)
+  \cr
+  Since \R 3.4.0, the single-variable functions \code{\link{log1p}},
+  \code{expm1}, \code{log2}, \code{log10}, \code{\link{cospi}},
+  \code{sinpi}, \code{tanpi}, \code{\link{factorial}}, and
+  \code{lfactorial} are supported as well.
 }
 \value{
   \code{D} returns a call and therefore can easily be iterated
@@ -134,6 +139,11 @@ deriv((y ~ sin(cos(x) * y)), c("x","y"), func = TRUE)
              function(b0, b1, th, x = 1:7){} ) )
 fx(2, 3, 4)
 
+## First derivative
+
+D(expression(x^2), "x")
+stopifnot(D(as.name("x"), "x") == 1)
+
 ## Higher derivatives
 deriv3(y ~ b0 + b1 * 2^(-x/th), c("b0", "b1", "th"),
      c("b0", "b1", "th", "x") )
@@ -150,8 +160,27 @@ DD(expression(sin(x^2)), "x", 3)
 -sin(x^2) * (2 * x) * 2 + ((cos(x^2) * (2 * x) * (2 * x) + sin(x^2) *
     2) * (2 * x) + sin(x^2) * (2 * x) * 2)
 }
+
+## New (R 3.4.0, 2017):
+D(quote(log1p(x^2)), "x") ## log1p(x) = log(1 + x)
+stopifnot(identical(
+       D(quote(log1p(x^2)), "x"),
+       D(quote(log(1+x^2)), "x")))
+D(quote(expm1(x^2)), "x") ## expm1(x) = exp(x) - 1
+stopifnot(identical(
+       D(quote(expm1(x^2)), "x") -> Dex1,
+       D(quote(exp(x^2)-1), "x")),
+       identical(Dex1, quote(exp(x^2) * (2 * x))))
+
+D(quote(sinpi(x^2)), "x") ## sinpi(x) = sin(pi*x)
+D(quote(cospi(x^2)), "x") ## cospi(x) = cos(pi*x)
+D(quote(tanpi(x^2)), "x") ## tanpi(x) = tan(pi*x)
+
+stopifnot(identical(D(quote(log2 (x^2)), "x"),
+                    quote(2 * x/(x^2 * log(2)))),
+          identical(D(quote(log10(x^2)), "x"),
+                    quote(2 * x/(x^2 * log(10)))))
+
 }
 \keyword{math}
 \keyword{nonlinear}
-
-
diff --git a/src/library/stats/man/deviance.Rd b/src/library/stats/man/deviance.Rd
index 22c94bc..4c42806 100644
--- a/src/library/stats/man/deviance.Rd
+++ b/src/library/stats/man/deviance.Rd
@@ -1,5 +1,5 @@
 % File src/library/stats/man/deviance.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2007 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/stats/man/df.residual.Rd b/src/library/stats/man/df.residual.Rd
index c780c4a..f61c4c9 100644
--- a/src/library/stats/man/df.residual.Rd
+++ b/src/library/stats/man/df.residual.Rd
@@ -1,5 +1,5 @@
 % File src/library/stats/man/df.residual.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2007 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/stats/man/diffinv.Rd b/src/library/stats/man/diffinv.Rd
index 22eed52..12de548 100644
--- a/src/library/stats/man/diffinv.Rd
+++ b/src/library/stats/man/diffinv.Rd
@@ -1,5 +1,5 @@
 % File src/library/stats/man/diffinv.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2007 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/stats/man/dist.Rd b/src/library/stats/man/dist.Rd
index 282571e..afa93af 100644
--- a/src/library/stats/man/dist.Rd
+++ b/src/library/stats/man/dist.Rd
@@ -1,10 +1,8 @@
 % File src/library/stats/man/dist.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2010 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2014 R Core Team
 % Distributed under GPL 2 or later
 
-\newcommand{\CRANpkg}{\href{http://CRAN.R-project.org/package=#1}{\pkg{#1}}}
-
 \name{dist}
 \alias{dist}
 \alias{print.dist}
diff --git a/src/library/stats/man/dummy.coef.Rd b/src/library/stats/man/dummy.coef.Rd
index 4ba2f9b..6bffcde 100644
--- a/src/library/stats/man/dummy.coef.Rd
+++ b/src/library/stats/man/dummy.coef.Rd
@@ -1,5 +1,5 @@
 % File src/library/stats/man/dummy.coef.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2013 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/stats/man/ecdf.Rd b/src/library/stats/man/ecdf.Rd
index 842dfe4..579cc30 100644
--- a/src/library/stats/man/ecdf.Rd
+++ b/src/library/stats/man/ecdf.Rd
@@ -1,7 +1,7 @@
 % File src/library/stats/man/ecdf.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2013 R Core Team
-% Copyright 2002-2011 The R Foundation
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2016 R Core Team
+% Copyright 2002-2016 The R Foundation
 % Distributed under GPL 2 or later
 
 \name{ecdf}
@@ -102,7 +102,7 @@ summary(Fn12)
 summary.stepfun(Fn12)
 
 ## Advanced: What's inside the function closure?
-print(ls.Fn12 <- ls(environment(Fn12)))
+ls(environment(Fn12))
 ##[1] "f"  "method"  "n"  "x"  "y"  "yleft"  "yright"
 utils::ls.str(environment(Fn12))
 stopifnot(all.equal(quantile(Fn12), quantile(y)))
diff --git a/src/library/stats/man/eff.aovlist.Rd b/src/library/stats/man/eff.aovlist.Rd
index c4dcf91..6fab6e9 100644
--- a/src/library/stats/man/eff.aovlist.Rd
+++ b/src/library/stats/man/eff.aovlist.Rd
@@ -1,6 +1,6 @@
 % File src/library/stats/man/eff.aovlist.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2007 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2014 R Core Team
 % Distributed under GPL 2 or later
 
 \name{eff.aovlist}
diff --git a/src/library/stats/man/effects.Rd b/src/library/stats/man/effects.Rd
index 5e9f1b1..fae6fa6 100644
--- a/src/library/stats/man/effects.Rd
+++ b/src/library/stats/man/effects.Rd
@@ -1,5 +1,5 @@
 % File src/library/stats/man/effects.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2007 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/stats/man/embed.Rd b/src/library/stats/man/embed.Rd
index 7d34568..c1410f5 100644
--- a/src/library/stats/man/embed.Rd
+++ b/src/library/stats/man/embed.Rd
@@ -1,5 +1,5 @@
 % File src/library/stats/man/embed.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2007 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/stats/man/expand.model.frame.Rd b/src/library/stats/man/expand.model.frame.Rd
index 302e097..0eea60d 100644
--- a/src/library/stats/man/expand.model.frame.Rd
+++ b/src/library/stats/man/expand.model.frame.Rd
@@ -1,5 +1,5 @@
 % File src/library/stats/man/expand.model.frame.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2007 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/stats/man/extractAIC.Rd b/src/library/stats/man/extractAIC.Rd
index 6e6beb7..b8f2161 100644
--- a/src/library/stats/man/extractAIC.Rd
+++ b/src/library/stats/man/extractAIC.Rd
@@ -1,10 +1,8 @@
 % File src/library/stats/man/extractAIC.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2011 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2014 R Core Team
 % Distributed under GPL 2 or later
 
-\newcommand{\CRANpkg}{\href{http://CRAN.R-project.org/package=#1}{\pkg{#1}}}
-
 %-- This page by Martin Maechler,  improvements welcome!
 \name{extractAIC}
 \title{Extract AIC from a Fitted Model}
diff --git a/src/library/stats/man/factanal.Rd b/src/library/stats/man/factanal.Rd
index 6c32f53..58ee2df 100644
--- a/src/library/stats/man/factanal.Rd
+++ b/src/library/stats/man/factanal.Rd
@@ -1,11 +1,8 @@
 % File src/library/stats/man/factanal.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2012 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2014 R Core Team
 % Distributed under GPL 2 or later
 
-\newcommand{\CRANpkg}{\href{http://CRAN.R-project.org/package=#1}{\pkg{#1}}}
-\newcommand{\sspace}{\ifelse{latex}{\out{~}}{ }}
-
 \name{factanal}
 \alias{factanal}
 \encoding{UTF-8}
@@ -64,9 +61,9 @@ factanal(x, factors, data = NULL, covmat = NULL, n.obs = NA,
 \details{
   The factor analysis model is
   \deqn{x = \Lambda f + e}
-  for a \eqn{p}--element row-vector \eqn{x}, a \eqn{p \times k}{p x k}
+  for a \eqn{p}--element vector \eqn{x}, a \eqn{p \times k}{p x k}
   matrix \eqn{\Lambda} of \emph{loadings}, a \eqn{k}--element vector
-  \eqn{f} of \emph{scores} and a \eqn{p}--element vector \eqn{e}of
+  \eqn{f} of \emph{scores} and a \eqn{p}--element vector \eqn{e} of
   errors.  None of the components other than \eqn{x} is observed, but
   the major restriction is that the scores be uncorrelated and of unit
   variance, and that the errors be independent with variances
@@ -75,7 +72,7 @@ factanal(x, factors, data = NULL, covmat = NULL, n.obs = NA,
 
   Thus factor analysis is in essence a model for the correlation matrix
   of \eqn{x},
-  \deqn{\Sigma = \Lambda^\prime\Lambda + \Psi}{\Sigma = \Lambda'\Lambda + \Psi}
+  \deqn{\Sigma = \Lambda\Lambda^\prime + \Psi}{\Sigma = \Lambda \Lambda' + \Psi}
   There is still some indeterminacy in the model for it is unchanged
   if \eqn{\Lambda} is replaced by \eqn{G \Lambda} for
   any orthogonal matrix \eqn{G}.  Such matrices \eqn{G} are known as
@@ -135,7 +132,7 @@ factanal(x, factors, data = NULL, covmat = NULL, n.obs = NA,
   \item{uniquenesses}{The uniquenesses computed.}
   \item{correlation}{The correlation matrix used.}
   \item{criteria}{The results of the optimization: the value of the
-    negative log-likelihood and information on the iterations used.}
+    criterion (a linear function of the negative log-likelihood) and information on the iterations used.}
   \item{factors}{The argument \code{factors}.}
   \item{dof}{The number of degrees of freedom of the factor analysis model.}
   \item{method}{The method: always \code{"mle"}.}
diff --git a/src/library/stats/man/factor.scope.Rd b/src/library/stats/man/factor.scope.Rd
index 52663f4..653232d 100644
--- a/src/library/stats/man/factor.scope.Rd
+++ b/src/library/stats/man/factor.scope.Rd
@@ -1,5 +1,5 @@
 % File src/library/stats/man/factor.scope.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2007 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/stats/man/family.Rd b/src/library/stats/man/family.Rd
index 006ab54..9d9256c 100644
--- a/src/library/stats/man/family.Rd
+++ b/src/library/stats/man/family.Rd
@@ -1,10 +1,8 @@
 % File src/library/stats/man/family.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2014 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2015 R Core Team
 % Distributed under GPL 2 or later
 
-\newcommand{\sspace}{\ifelse{latex}{\out{~}}{ }}
-
 \name{family}
 \alias{family}
 \alias{binomial}
@@ -139,9 +137,9 @@ quasipoisson(link = "log")
   \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}}.}
-  \item{valid.mu}{logical function.  Returns \code{TRUE} if a mean
+  \item{validmu}{logical function.  Returns \code{TRUE} if a mean
     vector \code{mu} is within the domain of \code{variance}.}
-  \item{valid.eta}{logical function.   Returns \code{TRUE} if a linear
+  \item{valideta}{logical function.   Returns \code{TRUE} if a linear
     predictor \code{eta} is within the domain of \code{linkinv}.}
   \item{simulate}{(optional) function \code{simulate(object, nsim)} to be
     called by the \code{"lm"} method of \code{\link{simulate}}.  It will
diff --git a/src/library/stats/man/fft.Rd b/src/library/stats/man/fft.Rd
index 99f9d32..1443b41 100644
--- a/src/library/stats/man/fft.Rd
+++ b/src/library/stats/man/fft.Rd
@@ -1,14 +1,15 @@
 % File src/library/stats/man/fft.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2012 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2017 R Core Team
 % Distributed under GPL 2 or later
 
 \name{fft}
 \alias{fft}
 \alias{mvfft}
-\title{Fast Discrete Fourier Transform}
+\title{Fast Discrete Fourier Transform (FFT)}
 \description{
-  Performs the Fast Fourier Transform of an array.
+  Computes the Discrete Fourier Transform (DFT) of an array with a fast
+  algorithm, the \dQuote{Fast Fourier Transform} (FFT).
 }
 \usage{
 fft(z, inverse = FALSE)
@@ -16,19 +17,21 @@ mvfft(z, inverse = FALSE)
 }
 \arguments{
   \item{z}{a real or complex array containing the values to be
-    transformed.}
+    transformed.  Long vectors are not supported.}
   \item{inverse}{if \code{TRUE}, the unnormalized inverse transform is
     computed (the inverse has a \code{+} in the exponent of \eqn{e},
     but here, we do \emph{not} divide by \code{1/length(x)}).}
 }
 \value{
   When \code{z} is a vector, the value computed and returned by
-  \code{fft} is the unnormalized univariate Fourier transform of the
-  sequence of values in \code{z}.
-  %%
-  %% Here, we should really have a nice  \deqn{}{} giving the definition
-  %% of the DFT !
-  %%
+  \code{fft} is the unnormalized univariate discrete Fourier transform of the
+  sequence of values in \code{z}.  Specifically, \code{y <- fft(z)} returns
+  \deqn{y[h] = \sum_{k=1}^n z[k] \exp(-2\pi i (k-1) (h-1)/n)}{%
+        y[h] =  sum_{k=1}^n z[k]*exp(-2*pi*1i*(k-1)*(h-1)/n)}
+  for \eqn{h = 1,\ldots,n}{h = 1, ..., n} where n = \code{length(y)}.  If
+  \code{inverse} is \code{TRUE}, \eqn{\exp(-2\pi\ldots)}{exp(-2*pi...)}
+  is replaced with \eqn{\exp(2\pi\ldots)}{exp(2*pi...)}.
+
   When \code{z} contains an array, \code{fft} computes and returns the
   multivariate (spatial) transform.  If \code{inverse} is \code{TRUE},
   the (unnormalized) inverse Fourier transform is returned, i.e.,
@@ -58,6 +61,11 @@ mvfft(z, inverse = FALSE)
   in \emph{Programs for Digital Signal Processing},
   IEEE Digital Signal Processing Committee eds.
   IEEE Press.
+
+  Cooley, James W., and Tukey, John W. (1965)
+  An algorithm for the machine calculation of complex Fourier series,
+  \emph{Math. Comput.} \bold{19}(90), 297--301.
+  \url{https://dx.doi.org/10.1090/S0025-5718-1965-0178586-1}
 }
 \seealso{
   \code{\link{convolve}}, \code{\link{nextn}}.
@@ -66,6 +74,22 @@ mvfft(z, inverse = FALSE)
 x <- 1:4
 fft(x)
 fft(fft(x), inverse = TRUE)/length(x)
+
+## Slow Discrete Fourier Transform (DFT) - e.g., for checking the formula
+fft0 <- function(z, inverse=FALSE) {
+  n <- length(z)
+  if(n == 0) return(z)
+  k <- 0:(n-1)
+  ff <- (if(inverse) 1 else -1) * 2*pi * 1i * k/n
+  vapply(1:n, function(h) sum(z * exp(ff*(h-1))), complex(1))
 }
+
+relD <- function(x,y) 2* abs(x - y) / abs(x + y)
+n <- 2^8
+z <- complex(n, rnorm(n), rnorm(n))
+\donttest{## relative differences in the order of 4*10^{-14} :
+summary(relD(fft(z), fft0(z)))
+summary(relD(fft(z, inverse=TRUE), fft0(z, inverse=TRUE)))
+}}
 \keyword{math}
 \keyword{dplot}
diff --git a/src/library/stats/man/filter.Rd b/src/library/stats/man/filter.Rd
index 0392756..b5a27c5 100644
--- a/src/library/stats/man/filter.Rd
+++ b/src/library/stats/man/filter.Rd
@@ -1,5 +1,5 @@
 % File src/library/stats/man/filter.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2007 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/stats/man/fisher.test.Rd b/src/library/stats/man/fisher.test.Rd
index 66a7b52..1c46957 100644
--- a/src/library/stats/man/fisher.test.Rd
+++ b/src/library/stats/man/fisher.test.Rd
@@ -1,10 +1,8 @@
 % File src/library/stats/man/fisher.test.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2011 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2014 R Core Team
 % Distributed under GPL 2 or later
 
-\newcommand{\CRANpkg}{\href{http://CRAN.R-project.org/package=#1}{\pkg{#1}}}
-
 \name{fisher.test}
 \alias{fisher.test}
 \title{Fisher's Exact Test for Count Data}
diff --git a/src/library/stats/man/fitted.values.Rd b/src/library/stats/man/fitted.values.Rd
index 5a4019f..7f1e19d 100644
--- a/src/library/stats/man/fitted.values.Rd
+++ b/src/library/stats/man/fitted.values.Rd
@@ -1,5 +1,5 @@
 % File src/library/stats/man/fitted.values.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2007 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/stats/man/fivenum.Rd b/src/library/stats/man/fivenum.Rd
index 54612bb..1e1f938 100644
--- a/src/library/stats/man/fivenum.Rd
+++ b/src/library/stats/man/fivenum.Rd
@@ -1,5 +1,5 @@
 % File src/library/stats/man/fivenum.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2007 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/stats/man/fligner.test.Rd b/src/library/stats/man/fligner.test.Rd
index 8e30f6c..f703e3c 100644
--- a/src/library/stats/man/fligner.test.Rd
+++ b/src/library/stats/man/fligner.test.Rd
@@ -1,5 +1,5 @@
 % File src/library/stats/man/fligner.test.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2007 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/stats/man/formula.Rd b/src/library/stats/man/formula.Rd
index e98ba91..327646c 100644
--- a/src/library/stats/man/formula.Rd
+++ b/src/library/stats/man/formula.Rd
@@ -1,5 +1,5 @@
 % File src/library/stats/man/formula.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2013 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/stats/man/formula.nls.Rd b/src/library/stats/man/formula.nls.Rd
index 3076ffc..cefd6ad 100644
--- a/src/library/stats/man/formula.nls.Rd
+++ b/src/library/stats/man/formula.nls.Rd
@@ -1,5 +1,5 @@
 % File src/library/stats/man/formula.nls.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2010 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/stats/man/friedman.test.Rd b/src/library/stats/man/friedman.test.Rd
index 3c55206..55c676d 100644
--- a/src/library/stats/man/friedman.test.Rd
+++ b/src/library/stats/man/friedman.test.Rd
@@ -1,5 +1,5 @@
 % File src/library/stats/man/friedman.test.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2007 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/stats/man/ftable.Rd b/src/library/stats/man/ftable.Rd
index ef77d72..06bdfda 100644
--- a/src/library/stats/man/ftable.Rd
+++ b/src/library/stats/man/ftable.Rd
@@ -1,5 +1,5 @@
 % File src/library/stats/man/ftable.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2013 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/stats/man/ftable.formula.Rd b/src/library/stats/man/ftable.formula.Rd
index 80fa7b5..48f4f85 100644
--- a/src/library/stats/man/ftable.formula.Rd
+++ b/src/library/stats/man/ftable.formula.Rd
@@ -1,5 +1,5 @@
 % File src/library/stats/man/ftable.formula.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2007 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/stats/man/getInitial.Rd b/src/library/stats/man/getInitial.Rd
index 758fe2d..a2c23fd 100644
--- a/src/library/stats/man/getInitial.Rd
+++ b/src/library/stats/man/getInitial.Rd
@@ -1,5 +1,5 @@
 % File src/library/stats/man/getInitial.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2010 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/stats/man/glm.Rd b/src/library/stats/man/glm.Rd
index 241a758..3637cac 100644
--- a/src/library/stats/man/glm.Rd
+++ b/src/library/stats/man/glm.Rd
@@ -1,11 +1,8 @@
 % File src/library/stats/man/glm.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2013 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2015 R Core Team
 % Distributed under GPL 2 or later
 
-\newcommand{\CRANpkg}{\href{http://CRAN.R-project.org/package=#1}{\pkg{#1}}}
-\newcommand{\sspace}{\ifelse{latex}{\out{~}}{ }}
-
 \name{glm}
 \title{Fitting Generalized Linear Models}
 \alias{glm}
@@ -41,9 +38,10 @@ glm.fit(x, y, weights = rep(1, nobs),
     under \sQuote{Details}.}
 
   \item{family}{a description of the error distribution and link
-    function to be used in the model. This can be a character string
-    naming a family function, a family function or the result of a call
-    to a family function.  (See \code{\link{family}} for details of
+    function to be used in the model.  For \code{glm} this can be a
+    character string naming a family function, a family function or the
+    result of a call to a family function.  For \code{glm.fit} only the
+    third option is supported.  (See \code{\link{family}} for details of
     family functions.)}
 
   \item{data}{an optional data frame, list or environment (or object
@@ -114,7 +112,7 @@ glm.fit(x, y, weights = rep(1, nobs),
 
   \item{object}{an object inheriting from class \code{"glm"}.}
   \item{type}{character, partial matching allowed.  Type of weights to
-    extract from the fitted model object.}
+    extract from the fitted model object.  Can be abbreviated.}
 
   \item{\dots}{
     For \code{glm}: arguments to be used to form the default
@@ -135,7 +133,7 @@ glm.fit(x, y, weights = rep(1, nobs),
   indicates all the terms in \code{first} together with all the terms in
   \code{second} with any duplicates removed.
 
-  A specification of the form \code{first:second} indicates the the set
+  A specification of the form \code{first:second} indicates the set
   of terms obtained by taking the interactions of all terms in
   \code{first} with all terms in \code{second}.  The specification
   \code{first*second} indicates the \emph{cross} of \code{first} and
@@ -157,8 +155,8 @@ glm.fit(x, y, weights = rep(1, nobs),
 
 
   \code{glm.fit} is the workhorse function: it is not normally called
-  directly but can be more efficient where the response vector and
-  design matrix have already been calculated.
+  directly but can be more efficient where the response vector, design
+  matrix and family have already been calculated.
 
   If more than one of \code{etastart}, \code{start} and \code{mustart}
   is specified, the first in the list will be used.  It is often
diff --git a/src/library/stats/man/glm.control.Rd b/src/library/stats/man/glm.control.Rd
index 2bbae4f..61628bf 100644
--- a/src/library/stats/man/glm.control.Rd
+++ b/src/library/stats/man/glm.control.Rd
@@ -1,5 +1,5 @@
 % File src/library/stats/man/glm.control.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2009 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/stats/man/glm.summaries.Rd b/src/library/stats/man/glm.summaries.Rd
index 7914a9e..bc6300f 100644
--- a/src/library/stats/man/glm.summaries.Rd
+++ b/src/library/stats/man/glm.summaries.Rd
@@ -1,5 +1,5 @@
 % File src/library/stats/man/glm.summaries.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2007 R Core Team
 % Distributed under GPL 2 or later
 
@@ -18,7 +18,8 @@
     a call to \code{\link{glm}}.}
   \item{type}{the type of residuals which should be returned.
     The alternatives are: \code{"deviance"} (default), \code{"pearson"},
-    \code{"working"}, \code{"response"}, and \code{"partial"}.}
+    \code{"working"}, \code{"response"}, and \code{"partial"}.
+    Can be abbreviated.}
   \item{\dots}{further arguments passed to or from other methods.}
 }
 \description{
diff --git a/src/library/stats/man/hclust.Rd b/src/library/stats/man/hclust.Rd
index d758253..34b4480 100644
--- a/src/library/stats/man/hclust.Rd
+++ b/src/library/stats/man/hclust.Rd
@@ -1,10 +1,8 @@
 % File src/library/stats/man/hclust.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2014 R Core Team
 % Distributed under GPL 2 or later
 
-\newcommand{\CRANpkg}{\href{http://CRAN.R-project.org/package=#1}{\pkg{#1}}}
-
 \name{hclust}
 \title{Hierarchical Clustering}
 \alias{hclust}
@@ -240,6 +238,22 @@ opar <- par(mfrow = c(1, 2))
 plot(hc,  labels = FALSE, hang = -1, main = "Original Tree")
 plot(hc1, labels = FALSE, hang = -1, main = "Re-start from 10 clusters")
 par(opar)
+
+### Example 2: Straight-line distances among 10 US cities
+##  Compare the results of algorithms "ward.D" and "ward.D2"
+
+data(UScitiesD)
+
+mds2 <- -cmdscale(UScitiesD)
+plot(mds2, type="n", axes=FALSE, ann=FALSE)
+text(mds2, labels=rownames(mds2), xpd = NA)
+
+hcity.D  <- hclust(UScitiesD, "ward.D") # "wrong"
+hcity.D2 <- hclust(UScitiesD, "ward.D2")
+opar <- par(mfrow = c(1, 2))
+plot(hcity.D,  hang=-1)
+plot(hcity.D2, hang=-1)
+par(opar)
 }
 \keyword{multivariate}
 \keyword{cluster}
diff --git a/src/library/stats/man/heatmap.Rd b/src/library/stats/man/heatmap.Rd
index 0715479..61ab406 100644
--- a/src/library/stats/man/heatmap.Rd
+++ b/src/library/stats/man/heatmap.Rd
@@ -1,10 +1,8 @@
 % File src/library/stats/man/heatmap.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2011 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2014 R Core Team
 % Distributed under GPL 2 or later
 
-\newcommand{\CRANpkg}{\href{http://CRAN.R-project.org/package=#1}{\pkg{#1}}}
-
 \name{heatmap}
 \alias{heatmap}
 \title{ Draw a Heat Map }
@@ -149,7 +147,7 @@ heatmap(x, Colv = NA, col = cm.colors(256), scale = "column",
         RowSideColors = rc, margins = c(5,10),
         xlab = "specification variables", ylab =  "Car Models",
         main = "heatmap(<Mtcars data>, ..., scale = \"column\")")
-\testonly{
+\dontshow{
 ## no row dendrogram (nor reordering) at all:
 heatmap(x, Rowv = NA, col = cm.colors(256), scale = "column",
         ColSideColors = cc, margins = c(5,10),
diff --git a/src/library/stats/man/identify.hclust.Rd b/src/library/stats/man/identify.hclust.Rd
index 7f17b78..0940ea9 100644
--- a/src/library/stats/man/identify.hclust.Rd
+++ b/src/library/stats/man/identify.hclust.Rd
@@ -1,5 +1,5 @@
 % File src/library/stats/man/identify.hclust.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2007 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/stats/man/influence.measures.Rd b/src/library/stats/man/influence.measures.Rd
index 7d2bd39..09fc873 100644
--- a/src/library/stats/man/influence.measures.Rd
+++ b/src/library/stats/man/influence.measures.Rd
@@ -1,6 +1,6 @@
 % File src/library/stats/man/influence.measures.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2013 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2016 R Core Team
 % Distributed under GPL 2 or later
 
 \name{influence.measures}
@@ -12,10 +12,11 @@
 \concept{Covariance ratios}
 \concept{DFBETAs}
 \concept{DFFITs}
+\concept{PRESS}
 
 \alias{influence.measures}
 %\alias{print.infl}
-%\alias{summary.infl}
+%\alias{summary.infl} <- To document: has 'digits' & return()s
 \alias{hat}
 \alias{hatvalues}
 \alias{hatvalues.lm}
@@ -39,7 +40,8 @@ influence.measures(model)
 
 rstandard(model, \dots)
 \method{rstandard}{lm}(model, infl = lm.influence(model, do.coef = FALSE),
-          sd = sqrt(deviance(model)/df.residual(model)), \dots)
+          sd = sqrt(deviance(model)/df.residual(model)),
+          type = c("sd.1", "predictive"), \dots)
 \method{rstandard}{glm}(model, infl = influence(model, do.coef = FALSE),
           type = c("deviance", "pearson"), \dots)
 
@@ -86,7 +88,9 @@ hat(x, intercept = TRUE)
   \item{dispersion}{dispersion (for \code{\link{glm}} objects) to use,
     see default.}
   \item{hat}{hat values \eqn{H_{ii}}{H[i,i]}, see default.}
-  \item{type}{type of residuals for \code{glm} method for \code{rstandard.}}
+  \item{type}{type of residuals for \code{rstandard}, with different
+    options and meanings for \code{lm} and \code{glm}.  Can be
+    abbreviated.}
 
   \item{x}{the \eqn{X} or design matrix.}
   \item{intercept}{should an intercept column be prepended to \code{x}?}
@@ -129,6 +133,11 @@ hat(x, intercept = TRUE)
   \code{na.action = na.exclude}, suitable values are filled in for the
   cases excluded during fitting.
 
+  For linear models, \code{rstandard(*, type = "predictive")} provides
+  leave-one-out cross validation residuals, and the \dQuote{PRESS}
+  statistic (\bold{PRE}dictive \bold{S}um of \bold{S}quares, the same as
+  the CV score) of model \code{model} is \preformatted{   PRESS <- sum(rstandard(model, type="pred")^2)}
+
   The function \code{hat()} exists mainly for S (version 2)
   compatibility; we recommend using \code{hatvalues()} instead.
 }
@@ -158,14 +167,19 @@ hat(x, intercept = TRUE)
 
   Fox, J. (2002)
   \emph{An R and S-Plus Companion to Applied Regression}.
-  Sage Publ.; \url{http://www.socsci.mcmaster.ca/jfox/Books/Companion/}.
+  Sage Publ.
+
+  Fox, J. and Weisberg, S. (2011)
+  \emph{An R Companion to Applied Regression}, second edition.
+  Sage Publ;
+  \url{https://socserv.mcmaster.ca/jfox/Books/Companion/index.html}.
 }
 \seealso{
   \code{\link{influence}} (containing \code{\link{lm.influence}}).
 
   \sQuote{\link{plotmath}} for the use of \code{hat} in plot annotation.
 }
-\examples{\donttest{
+\examples{
 require(graphics)
 
 ## Analysis of the life-cycle savings data
@@ -176,8 +190,9 @@ inflm.SR <- influence.measures(lm.SR)
 which(apply(inflm.SR$is.inf, 1, any))
 # which observations 'are' influential
 summary(inflm.SR) # only these
-inflm.SR          # all
+\donttest{inflm.SR          # all}
 plot(rstudent(lm.SR) ~ hatvalues(lm.SR)) # recommended by some
+plot(lm.SR, which = 5) # an enhanced version of that via plot(<lm>)
 
 ## The 'infl' argument is not needed, but avoids recomputation:
 rs <- rstandard(lm.SR)
@@ -185,12 +200,27 @@ iflSR <- influence(lm.SR)
 identical(rs, rstandard(lm.SR, infl = iflSR))
 ## to "see" the larger values:
 1000 * round(dfbetas(lm.SR, infl = iflSR), 3)
+cat("PRESS :"); (PRESS <- sum( rstandard(lm.SR, type = "predictive")^2 ))
+stopifnot(all.equal(PRESS, sum( (residuals(lm.SR) / (1 - iflSR$hat))^2)))
+
+## Show that "PRE-residuals"  ==  L.O.O. Crossvalidation (CV) errors:
+X <- model.matrix(lm.SR)
+y <- model.response(model.frame(lm.SR))
+## Leave-one-out CV least-squares prediction errors (relatively fast)
+rCV <- vapply(seq_len(nrow(X)), function(i)
+              y[i] - X[i,] \%*\% .lm.fit(X[-i,], y[-i])$coef,
+              numeric(1))
+## are the same as the *faster* rstandard(*, "pred") :
+stopifnot(all.equal(rCV, unname(rstandard(lm.SR, type = "predictive"))))
+
 
 ## Huber's data [Atkinson 1985]
 xh <- c(-4:0, 10)
 yh <- c(2.48, .73, -.04, -1.44, -1.32, 0)
-summary(lmH <- lm(yh ~ xh))
-(im <- influence.measures(lmH))
+lmH <- lm(yh ~ xh)
+\donttest{summary(lmH)}
+im <- influence.measures(lmH)
+\donttest{ im }
 plot(xh,yh, main = "Huber's data: L.S. line and influential obs.")
 abline(lmH); points(xh[im$is.inf], yh[im$is.inf], pch = 20, col = 2)
 
@@ -198,10 +228,12 @@ abline(lmH); points(xh[im$is.inf], yh[im$is.inf], pch = 20, col = 2)
 xi <- 1:5
 yi <- c(0,2,14,19,30)    # number of mice responding to dose xi
 mi <- rep(40, 5)         # number of mice exposed
-summary(lmI <- glm(cbind(yi, mi -yi) ~ xi, family = binomial))
-signif(cooks.distance(lmI), 3)   # ~= Ci in Table 3, p.184
-(imI <- influence.measures(lmI))
+glmI <- glm(cbind(yi, mi -yi) ~ xi, family = binomial)
+\donttest{summary(glmI)}
+signif(cooks.distance(glmI), 3)   # ~= Ci in Table 3, p.184
+imI <- influence.measures(glmI)
+\donttest{ imI }
 stopifnot(all.equal(imI$infmat[,"cook.d"],
-          cooks.distance(lmI)))
-}}
+          cooks.distance(glmI)))
+}
 \keyword{regression}
diff --git a/src/library/stats/man/integrate.Rd b/src/library/stats/man/integrate.Rd
index 4566206..76f1c5d 100644
--- a/src/library/stats/man/integrate.Rd
+++ b/src/library/stats/man/integrate.Rd
@@ -1,6 +1,6 @@
 % File src/library/stats/man/integrate.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2013 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2016 R Core Team
 % Distributed under GPL 2 or later
 
 \name{integrate}
@@ -43,6 +43,10 @@ integrate(f, lower, upper, \dots, subdivisions = 100L,
 
   \code{rel.tol} cannot be less than \code{max(50*.Machine$double.eps,
     0.5e-28)} if \code{abs.tol <= 0}.
+
+  In \R versions \eqn{\le}{<=} 3.2.x, the first entries of
+  \code{lower} and \code{upper} were used whereas an error is signalled
+  now if they are not of length one.
 }
 \note{
   Like all numerical integration routines, these evaluate the function
@@ -110,6 +114,10 @@ integrate(dnorm, 0, 200)
 integrate(dnorm, 0, 2000)
 integrate(dnorm, 0, 20000) ## fails on many systems
 integrate(dnorm, 0, Inf)   ## works
+\dontshow{tools::assertError(}
+integrate(dnorm, 0:1, 20) #-> error!
+## "silently" gave  integrate(dnorm, 0, 20)  in earlier versions of R
+\dontshow{ , verbose=TRUE)}
 }
 \keyword{math}
 \keyword{utilities}
diff --git a/src/library/stats/man/interaction.plot.Rd b/src/library/stats/man/interaction.plot.Rd
index c08e333..515f629 100644
--- a/src/library/stats/man/interaction.plot.Rd
+++ b/src/library/stats/man/interaction.plot.Rd
@@ -1,5 +1,5 @@
 % File src/library/stats/man/interaction.plot.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2007 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/stats/man/is.empty.Rd b/src/library/stats/man/is.empty.Rd
index 73ad255..d01c61e 100644
--- a/src/library/stats/man/is.empty.Rd
+++ b/src/library/stats/man/is.empty.Rd
@@ -1,5 +1,5 @@
 % File src/library/stats/man/is.empty.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2007 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/stats/man/isoreg.Rd b/src/library/stats/man/isoreg.Rd
index 4d8fbfa..bc64064 100644
--- a/src/library/stats/man/isoreg.Rd
+++ b/src/library/stats/man/isoreg.Rd
@@ -1,10 +1,8 @@
 % File src/library/stats/man/isoreg.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2008 R Core Team
 % Distributed under GPL 2 or later
 
-\newcommand{\CRANpkg}{\href{http://CRAN.R-project.org/package=#1}{\pkg{#1}}}
-
 \name{isoreg}
 \title{Isotonic / Monotone Regression}
 \alias{isoreg}
diff --git a/src/library/stats/man/kernapply.Rd b/src/library/stats/man/kernapply.Rd
index 9880c11..d1503c2 100644
--- a/src/library/stats/man/kernapply.Rd
+++ b/src/library/stats/man/kernapply.Rd
@@ -1,5 +1,5 @@
 % File src/library/stats/man/kernapply.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2011 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/stats/man/kernel.Rd b/src/library/stats/man/kernel.Rd
index 8aa983c..2c0cb0f 100644
--- a/src/library/stats/man/kernel.Rd
+++ b/src/library/stats/man/kernel.Rd
@@ -1,10 +1,8 @@
 % File src/library/stats/man/kernel.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2010 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2014 R Core Team
 % Distributed under GPL 2 or later
 
-\newcommand{\sspace}{\ifelse{latex}{\out{~}}{ }}
-
 \name{kernel}
 \alias{kernel}
 \alias{bandwidth.kernel}
diff --git a/src/library/stats/man/kmeans.Rd b/src/library/stats/man/kmeans.Rd
index 3f1df19..31e4ef3 100644
--- a/src/library/stats/man/kmeans.Rd
+++ b/src/library/stats/man/kmeans.Rd
@@ -1,10 +1,8 @@
 % File src/library/stats/man/kmeans.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2013 R Core Team
 % Distributed under GPL 2 or later
 
-\newcommand{\sspace}{\ifelse{latex}{\out{~}}{ }}
-
 \name{kmeans}
 \alias{kmeans}
 \alias{print.kmeans}
diff --git a/src/library/stats/man/kruskal.test.Rd b/src/library/stats/man/kruskal.test.Rd
index fb13173..5337318 100644
--- a/src/library/stats/man/kruskal.test.Rd
+++ b/src/library/stats/man/kruskal.test.Rd
@@ -1,10 +1,8 @@
 % File src/library/stats/man/kruskal.test.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2013 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2014 R Core Team
 % Distributed under GPL 2 or later
 
-\newcommand{\CRANpkg}{\href{http://CRAN.R-project.org/package=#1}{\pkg{#1}}}
-
 \name{kruskal.test}
 \alias{kruskal.test}
 \alias{kruskal.test.default}
@@ -22,10 +20,11 @@ kruskal.test(x, \dots)
 }
 \arguments{
   \item{x}{a numeric vector of data values, or a list of numeric data
-    vectors.}
+    vectors.  Non-numeric elements of a list will be coerced, with a
+    warning.}
   \item{g}{a vector or factor object giving the group for the
-    corresponding elements of \code{x}.  Ignored if \code{x} is a
-    list.}
+    corresponding elements of \code{x}.  Ignored with a warning if
+    \code{x} is a list.}
   \item{formula}{a formula of the form \code{response ~ group} where
     \code{response} gives the data values and \code{group} a vector or
     factor of the corresponding groups.} 
diff --git a/src/library/stats/man/ks.test.Rd b/src/library/stats/man/ks.test.Rd
index c74681d..a3a1cc1 100644
--- a/src/library/stats/man/ks.test.Rd
+++ b/src/library/stats/man/ks.test.Rd
@@ -1,5 +1,5 @@
 % File src/library/stats/man/ks.test.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2011 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/stats/man/ksmooth.Rd b/src/library/stats/man/ksmooth.Rd
index a7f0b2f..4e3b0c6 100644
--- a/src/library/stats/man/ksmooth.Rd
+++ b/src/library/stats/man/ksmooth.Rd
@@ -1,10 +1,8 @@
 % File src/library/stats/man/ksmooth.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2012 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2014 R Core Team
 % Distributed under GPL 2 or later
 
-\newcommand{\CRANpkg}{\href{http://CRAN.R-project.org/package=#1}{\pkg{#1}}}
-
 \name{ksmooth}
 \alias{ksmooth}
 \title{Kernel Regression Smoother}
@@ -19,7 +17,7 @@ ksmooth(x, y, kernel = c("box", "normal"), bandwidth = 0.5,
 \arguments{
  \item{x}{input x values.  Long vectors are supported.}
  \item{y}{input y values.  Long vectors are supported.}
- \item{kernel}{the kernel to be used.}
+ \item{kernel}{the kernel to be used.  Can be abbreviated.}
  \item{bandwidth}{the bandwidth. The kernels are scaled so that their
    quartiles (viewed as probability densities) are at
    \eqn{\pm}{+/-} \code{0.25*bandwidth}.}
diff --git a/src/library/stats/man/lag.Rd b/src/library/stats/man/lag.Rd
index 2b858f4..aa6041c 100644
--- a/src/library/stats/man/lag.Rd
+++ b/src/library/stats/man/lag.Rd
@@ -1,5 +1,5 @@
 % File src/library/stats/man/lag.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2014 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/stats/man/lag.plot.Rd b/src/library/stats/man/lag.plot.Rd
index 81205c4..9e66a3c 100644
--- a/src/library/stats/man/lag.plot.Rd
+++ b/src/library/stats/man/lag.plot.Rd
@@ -1,6 +1,6 @@
 % File src/library/stats/man/lag.plot.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2007 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2014 R Core Team
 % Distributed under GPL 2 or later
 
 \name{lag.plot}
diff --git a/src/library/stats/man/line.Rd b/src/library/stats/man/line.Rd
index ab4aa0f..3ad2ba3 100644
--- a/src/library/stats/man/line.Rd
+++ b/src/library/stats/man/line.Rd
@@ -1,5 +1,5 @@
 % File src/library/stats/man/line.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2012 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/stats/man/listof.Rd b/src/library/stats/man/listof.Rd
index 0fab40c..42ae0c5 100644
--- a/src/library/stats/man/listof.Rd
+++ b/src/library/stats/man/listof.Rd
@@ -1,5 +1,5 @@
 % File src/library/stats/man/listof.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2014 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/stats/man/lm.Rd b/src/library/stats/man/lm.Rd
index 956005a..9630d74 100644
--- a/src/library/stats/man/lm.Rd
+++ b/src/library/stats/man/lm.Rd
@@ -1,10 +1,8 @@
 % File src/library/stats/man/lm.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2013 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2014 R Core Team
 % Distributed under GPL 2 or later
 
-\newcommand{\CRANpkg}{\href{http://CRAN.R-project.org/package=#1}{\pkg{#1}}}
-
 \name{lm}
 \alias{lm}
 %\alias{print.lm}
diff --git a/src/library/stats/man/lm.influence.Rd b/src/library/stats/man/lm.influence.Rd
index 49d499d..23e5f02 100644
--- a/src/library/stats/man/lm.influence.Rd
+++ b/src/library/stats/man/lm.influence.Rd
@@ -1,6 +1,6 @@
 % File src/library/stats/man/lm.influence.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2007 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2015 R Core Team
 % Distributed under GPL 2 or later
 
 \name{lm.influence}
diff --git a/src/library/stats/man/lm.summaries.Rd b/src/library/stats/man/lm.summaries.Rd
index 0c6e687..f3c86d2 100644
--- a/src/library/stats/man/lm.summaries.Rd
+++ b/src/library/stats/man/lm.summaries.Rd
@@ -1,5 +1,5 @@
 % File src/library/stats/man/lm.summaries.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2011 R Core Team
 % Distributed under GPL 2 or later
 
@@ -25,7 +25,7 @@
   \item{object, x}{an object inheriting from class \code{lm}, usually
     the result of a call to \code{\link{lm}} or \code{\link{aov}}.}
   \item{\dots}{further arguments passed to or from other methods.}
-  \item{type}{the type of residuals which should be returned.}
+  \item{type}{the type of residuals which should be returned.  Can be abbreviated.}
 }
 \description{
   All these functions are \code{\link{methods}} for class \code{"lm"}  objects.
diff --git a/src/library/stats/man/lmfit.Rd b/src/library/stats/man/lmfit.Rd
index db64a95..eeeb572 100644
--- a/src/library/stats/man/lmfit.Rd
+++ b/src/library/stats/man/lmfit.Rd
@@ -1,5 +1,5 @@
 % File src/library/stats/man/lmfit.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2014 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/stats/man/loadings.Rd b/src/library/stats/man/loadings.Rd
index 5622d4b..d0c567e 100644
--- a/src/library/stats/man/loadings.Rd
+++ b/src/library/stats/man/loadings.Rd
@@ -1,5 +1,5 @@
 % File src/library/stats/man/loadings.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2014 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/stats/man/loess.Rd b/src/library/stats/man/loess.Rd
index 18b0920..d3d0d30 100644
--- a/src/library/stats/man/loess.Rd
+++ b/src/library/stats/man/loess.Rd
@@ -1,6 +1,6 @@
 % File src/library/stats/man/loess.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2012 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2015 R Core Team
 % Distributed under GPL 2 or later
 
 \name{loess}
@@ -47,13 +47,14 @@ loess(formula, data, weights, subset, na.action, model = FALSE,
   \item{normalize}{should the predictors be normalized to a common scale
     if there is more than one?  The normalization used is to set the
     10\% trimmed standard deviation to one.  Set to false for spatial
-    coordinate predictors and others know to be a common scale.}
+    coordinate predictors and others known to be on a common scale.}
   \item{family}{if \code{"gaussian"} fitting is by least-squares, and if
     \code{"symmetric"} a re-descending M estimator is used with Tukey's
-    biweight function.}
-  \item{method}{fit the model or just extract the model frame.}
+    biweight function.  Can be abbreviated.}
+  \item{method}{fit the model or just extract the model frame.  Can be abbreviated.}
   \item{control}{control parameters: see \code{\link{loess.control}}.}
-  \item{\dots}{control parameters can also be supplied directly.}
+  \item{\dots}{control parameters can also be supplied directly
+    (\emph{if} \code{control} is not specified).}
 }
 \description{
   Fit a polynomial surface determined by one or more numerical
@@ -82,7 +83,7 @@ loess(formula, data, weights, subset, na.action, model = FALSE,
   speed.  See \code{\link{loess.control}} for details.
 }
 \value{
-  An object of class \code{"loess"}.
+  An object of class \code{"loess"}.% otherwise entirely unspecified (!)
 }
 \references{
   W. S. Cleveland, E. Grosse and W. M. Shyu (1992) Local regression
diff --git a/src/library/stats/man/loess.control.Rd b/src/library/stats/man/loess.control.Rd
index 6482d01..5c38812 100644
--- a/src/library/stats/man/loess.control.Rd
+++ b/src/library/stats/man/loess.control.Rd
@@ -1,30 +1,36 @@
 % File src/library/stats/man/loess.control.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2011 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2015 R Core Team
 % Distributed under GPL 2 or later
 
 \name{loess.control}
 \title{Set Parameters for Loess}
 \usage{
 loess.control(surface = c("interpolate", "direct"),
-              statistics = c("approximate", "exact"),
+              statistics = c("approximate", "exact", "none"),
               trace.hat = c("exact", "approximate"),
-              cell = 0.2, iterations = 4, \dots)
+              cell = 0.2, iterations = 4, iterTrace = FALSE, \dots)
 }
 \alias{loess.control}
 \arguments{
- \item{surface}{should the fitted surface be computed exactly or via
-   interpolation from a kd tree?}
- \item{statistics}{should the statistics be computed exactly or
-   approximately? Exact computation can be very slow.}
- \item{trace.hat}{should the trace of the smoother matrix be computed
-   exactly or approximately? It is recommended to use the approximation
-   for more than about 1000 data points.}
+ \item{surface}{should the fitted surface be computed exactly
+   (\code{"direct"}) or via interpolation from a kd tree?  Can be abbreviated.}
+ \item{statistics}{should the statistics be computed exactly,
+   approximately or not at all?  Exact computation can be very slow.
+   Can be abbreviated.}
+ \item{trace.hat}{Only for the (default) case \code{(surface =
+     "interpolate", statistics = "approximate")}: should the trace of
+   the smoother matrix be computed exactly or approximately?  It is recommended to use the approximation
+   for more than about 1000 data points.  Can be abbreviated.}
  \item{cell}{if interpolation is used this controls the accuracy of the
    approximation via the maximum number of points in a  cell in the kd
    tree. Cells with more than \code{floor(n*span*cell)} points are subdivided.}
- \item{iterations}{the number of iterations used in robust fitting.}
-  \item{\dots}{further arguments which are ignored.}
+ \item{iterations}{the number of iterations used in robust fitting,
+   i.e. only if \code{family} is \code{"symmetric"}.}
+ \item{iterTrace}{logical (or integer) determining if tracing
+   information during the robust iterations (\code{iterations}\eqn{\ge
+     2}{>= 2}) is produced.}
+ \item{\dots}{further arguments which are ignored.}
 }
 \description{
   Set control parameters for \code{loess} fits.
@@ -36,6 +42,7 @@ loess.control(surface = c("interpolate", "direct"),
   \item{trace.hat}{}
   \item{cell}{}
   \item{iterations}{}
+  \item{iterTrace}{}
   with meanings as explained under \sQuote{Arguments}.
 }
 \seealso{\code{\link{loess}}}
diff --git a/src/library/stats/man/logLik.Rd b/src/library/stats/man/logLik.Rd
index ded8d28..177e233 100644
--- a/src/library/stats/man/logLik.Rd
+++ b/src/library/stats/man/logLik.Rd
@@ -1,11 +1,8 @@
 % File src/library/stats/man/logLik.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2013 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2014 R Core Team
 % Distributed under GPL 2 or later
 
-\newcommand{\CRANpkg}{\href{http://CRAN.R-project.org/package=#1}{\pkg{#1}}}
-\newcommand{\sspace}{\ifelse{latex}{\out{~}}{ }}
-
 \name{logLik}
 \encoding{UTF-8}
 \alias{logLik}
diff --git a/src/library/stats/man/loglin.Rd b/src/library/stats/man/loglin.Rd
index b042ad2..4b04fd5 100644
--- a/src/library/stats/man/loglin.Rd
+++ b/src/library/stats/man/loglin.Rd
@@ -1,10 +1,8 @@
 % File src/library/stats/man/loglin.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2007 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2014 R Core Team
 % Distributed under GPL 2 or later
 
-\newcommand{\CRANpkg}{\href{http://CRAN.R-project.org/package=#1}{\pkg{#1}}}
-
 \name{loglin}
 \alias{loglin}
 \title{Fitting Log-Linear Models}
diff --git a/src/library/stats/man/lowess.Rd b/src/library/stats/man/lowess.Rd
index 1bc1cfe..47b8cb0 100644
--- a/src/library/stats/man/lowess.Rd
+++ b/src/library/stats/man/lowess.Rd
@@ -1,5 +1,5 @@
 % File src/library/stats/man/lowess.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2013 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/stats/man/ls.diag.Rd b/src/library/stats/man/ls.diag.Rd
index 95eeea4..e6620bc 100644
--- a/src/library/stats/man/ls.diag.Rd
+++ b/src/library/stats/man/ls.diag.Rd
@@ -1,5 +1,5 @@
 % File src/library/stats/man/ls.diag.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2007 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/stats/man/ls.print.Rd b/src/library/stats/man/ls.print.Rd
index 24b5409..11f1410 100644
--- a/src/library/stats/man/ls.print.Rd
+++ b/src/library/stats/man/ls.print.Rd
@@ -1,5 +1,5 @@
 % File src/library/stats/man/ls.print.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2009 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/stats/man/lsfit.Rd b/src/library/stats/man/lsfit.Rd
index 0f87960..24c95d8 100644
--- a/src/library/stats/man/lsfit.Rd
+++ b/src/library/stats/man/lsfit.Rd
@@ -1,5 +1,5 @@
 % File src/library/stats/man/lsfit.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2007 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/stats/man/mad.Rd b/src/library/stats/man/mad.Rd
index bee7425..7784477 100644
--- a/src/library/stats/man/mad.Rd
+++ b/src/library/stats/man/mad.Rd
@@ -1,5 +1,5 @@
 % File src/library/stats/man/mad.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2007 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/stats/man/mahalanobis.Rd b/src/library/stats/man/mahalanobis.Rd
index d7eff2f..d5319cb 100644
--- a/src/library/stats/man/mahalanobis.Rd
+++ b/src/library/stats/man/mahalanobis.Rd
@@ -1,6 +1,6 @@
 % File src/library/stats/man/mahalanobis.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2007 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright (C) 1995-2014 R Core Team
 % Distributed under GPL 2 or later
 
 \name{mahalanobis}
@@ -12,7 +12,8 @@ mahalanobis(x, center, cov, inverted = FALSE, ...)
 \arguments{
   \item{x}{vector or matrix of data with, say, \eqn{p} columns.}
   \item{center}{mean vector of the distribution or second data vector of
-    length \eqn{p}.}
+    length \eqn{p} or recyclable to that length.  If set to
+    \code{\link{FALSE}}, the centering step is skipped.}
   \item{cov}{covariance matrix (\eqn{p \times p}{p x p}) of the distribution.}
   \item{inverted}{logical.  If \code{TRUE}, \code{cov} is supposed to
     contain the \emph{inverse} of the covariance matrix.}
diff --git a/src/library/stats/man/make.link.Rd b/src/library/stats/man/make.link.Rd
index 1ac2c36..3fdbdb5 100644
--- a/src/library/stats/man/make.link.Rd
+++ b/src/library/stats/man/make.link.Rd
@@ -1,5 +1,5 @@
 % File src/library/stats/man/make.link.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2007 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/stats/man/makepredictcall.Rd b/src/library/stats/man/makepredictcall.Rd
index f1cb7fc..f28dde0 100644
--- a/src/library/stats/man/makepredictcall.Rd
+++ b/src/library/stats/man/makepredictcall.Rd
@@ -1,5 +1,5 @@
 % File src/library/stats/man/makepredictcall.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2014 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/stats/man/manova.Rd b/src/library/stats/man/manova.Rd
index f0604aa..4c70ea4 100644
--- a/src/library/stats/man/manova.Rd
+++ b/src/library/stats/man/manova.Rd
@@ -1,6 +1,6 @@
 % File src/library/stats/man/manova.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2013 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2016 R Core Team
 % Distributed under GPL 2 or later
 
 \name{manova}
@@ -36,6 +36,10 @@ manova(\dots)
   \emph{Multivariate Analysis of Variance and Repeated Measures.}
   Chapman and Hall.
 }
+\seealso{
+  \code{\link{aov}}, \code{\link{summary.manova}}, the latter containing
+  more examples.
+}
 \examples{
 ## Set orthogonal contrasts.
 op <- options(contrasts = c("contr.helmert", "contr.poly"))
@@ -47,11 +51,5 @@ summary(npk2.aov)
 
 ( npk2.aovE <- manova(cbind(yield, foo) ~  N*P*K + Error(block), npk2) )
 summary(npk2.aovE)
-
-
-}
-\seealso{
-  \code{\link{aov}}, \code{\link{summary.manova}}, the latter containing
-  examples.
 }
 \keyword{models}
diff --git a/src/library/stats/man/mantelhaen.test.Rd b/src/library/stats/man/mantelhaen.test.Rd
index 4bfeed1..ca34468 100644
--- a/src/library/stats/man/mantelhaen.test.Rd
+++ b/src/library/stats/man/mantelhaen.test.Rd
@@ -1,5 +1,5 @@
 % File src/library/stats/man/mantelhaen.test.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2008 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/stats/man/mauchly.test.Rd b/src/library/stats/man/mauchly.test.Rd
index 790a693..6b2830b 100644
--- a/src/library/stats/man/mauchly.test.Rd
+++ b/src/library/stats/man/mauchly.test.Rd
@@ -1,5 +1,5 @@
 % File src/library/stats/man/mauchly.test.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2007 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/stats/man/mcnemar.test.Rd b/src/library/stats/man/mcnemar.test.Rd
index 7a69fd6..2fe8121 100644
--- a/src/library/stats/man/mcnemar.test.Rd
+++ b/src/library/stats/man/mcnemar.test.Rd
@@ -1,5 +1,5 @@
 % File src/library/stats/man/mcnemar.test.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2007 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/stats/man/median.Rd b/src/library/stats/man/median.Rd
index 0ebaa5b..abb6b96 100644
--- a/src/library/stats/man/median.Rd
+++ b/src/library/stats/man/median.Rd
@@ -1,6 +1,6 @@
 % File src/library/stats/man/median.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2013 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2017 R Core Team
 % Distributed under GPL 2 or later
 
 \name{median}
@@ -8,13 +8,15 @@
 \alias{median}
 \alias{median.default}
 \usage{
-median(x, na.rm = FALSE)
+median(x, na.rm = FALSE, \dots)
 }
 \arguments{
   \item{x}{an object for which a method has been defined, or a
     numeric vector containing the values whose median is to be computed.}
   \item{na.rm}{a logical value indicating whether \code{NA}
     values should be stripped before the computation proceeds.}
+  \item{\dots}{potentially further arguments for methods; not used in
+    the default method.}
 }
 \description{
   Compute the sample median.
@@ -29,8 +31,8 @@ median(x, na.rm = FALSE)
 }
 \value{
   The default method returns a length-one object of the same type as
-  \code{x}, except when \code{x} is integer of even length, when the
-  result will be double.
+  \code{x}, except when \code{x} is logical or integer of even length,
+  when the result will be double.
 
   If there are no values or if \code{na.rm = FALSE} and there are \code{NA}
   values the result is \code{NA} of the same type as \code{x} (or more
diff --git a/src/library/stats/man/medpolish.Rd b/src/library/stats/man/medpolish.Rd
index fdde7cc..7a7026b 100644
--- a/src/library/stats/man/medpolish.Rd
+++ b/src/library/stats/man/medpolish.Rd
@@ -1,13 +1,15 @@
 % File src/library/stats/man/medpolish.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2007 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2016 R Core Team
 % Distributed under GPL 2 or later
 
 \name{medpolish}
+\title{Median Polish (Robust Twoway Decomposition) of a Matrix}
 \alias{medpolish}
-\title{Median Polish of a Matrix}
+\concept{twoway}% S-plus name
 \description{
-  Fits an additive model using Tukey's \emph{median polish} procedure.
+  Fits an additive model (twoway decomposition) using Tukey's
+  \emph{median polish} procedure.
 }
 \usage{
 medpolish(x, eps = 0.01, maxiter = 10, trace.iter = TRUE,
diff --git a/src/library/stats/man/model.extract.Rd b/src/library/stats/man/model.extract.Rd
index fd65846..c4a8f58 100644
--- a/src/library/stats/man/model.extract.Rd
+++ b/src/library/stats/man/model.extract.Rd
@@ -1,10 +1,8 @@
 % File src/library/stats/man/model.extract.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2007 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2014 R Core Team
 % Distributed under GPL 2 or later
 
-\newcommand{\sspace}{\ifelse{latex}{\out{~}}{ }}
-
 \name{model.extract}
 \title{Extract Components from a Model Frame}
 \usage{
diff --git a/src/library/stats/man/model.frame.Rd b/src/library/stats/man/model.frame.Rd
index 656decf..de06f6c 100644
--- a/src/library/stats/man/model.frame.Rd
+++ b/src/library/stats/man/model.frame.Rd
@@ -1,11 +1,8 @@
 % File src/library/stats/man/model.frame.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2011 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2017 R Core Team
 % Distributed under GPL 2 or later
 
-\newcommand{\CRANpkg}{\href{http://CRAN.R-project.org/package=#1}{\pkg{#1}}}
-\newcommand{\sspace}{\ifelse{latex}{\out{~}}{ }}
-
 \name{model.frame}
 \alias{model.frame}
 \alias{model.frame.default}
@@ -18,8 +15,8 @@
 model.frame(formula, \dots)
 
 \method{model.frame}{default}(formula, data = NULL,
-           subset = NULL, na.action = na.fail,
-           drop.unused.levels = FALSE, xlev = NULL, \dots)
+            subset = NULL, na.action = na.fail,
+            drop.unused.levels = FALSE, xlev = NULL, \dots)
 
 \method{model.frame}{aovlist}(formula, data = NULL, \dots)
 
@@ -55,11 +52,15 @@ get_all_vars(formula, data, \dots)
   \item{xlev}{a named list of character vectors giving the full set of levels
     to be assumed for each factor.}
 
-  \item{\dots}{further arguments such as \code{data}, \code{na.action},
-    \code{subset}.  Any additional arguments such as \code{offset} and
-    \code{weights} which reach the default method are used to create
-    further columns in the model frame, with parenthesised names such as
-    \code{"(offset)"}.}
+  \item{\dots}{for \code{model.frame} methods, a mix of further
+    arguments such as \code{data}, \code{na.action}, \code{subset} to pass
+    to the default method.  Any additional arguments (such as
+    \code{offset} and \code{weights} or other named arguments) which
+    reach the default method are used to create further columns in the
+    model frame, with parenthesised names such as \code{"(offset)"}.
+
+    For \code{get_all_vars}, further named columns to include
+    in the model frame.}
 }
 \description{
   \code{model.frame} (a generic function) and its methods return a
@@ -115,7 +116,8 @@ get_all_vars(formula, data, \dots)
   excludes lists.
 
   \code{get_all_vars} returns a \code{\link{data.frame}} containing the
-  variables used in \code{formula} plus those specified \code{\dots}.
+  variables used in \code{formula} plus those specified in \code{\dots}
+  which are recycled to the number of data frame rows.
   Unlike \code{model.frame.default}, it returns the input variables and
   not those resulting from function calls in \code{formula}.
 }
diff --git a/src/library/stats/man/model.matrix.Rd b/src/library/stats/man/model.matrix.Rd
index babb29e..b8dd335 100644
--- a/src/library/stats/man/model.matrix.Rd
+++ b/src/library/stats/man/model.matrix.Rd
@@ -1,6 +1,6 @@
 % File src/library/stats/man/model.matrix.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2013 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2016 R Core Team
 % Distributed under GPL 2 or later
 
 \name{model.matrix}
@@ -29,7 +29,9 @@ model.matrix(object, \dots)
   \item{\dots}{further arguments passed to or from other methods.}
 }
 \description{
-  \code{model.matrix} creates a design (or model) matrix.
+  \code{model.matrix} creates a design (or model) matrix, e.g., by
+  expanding factors to a set of dummy variables (depending on the
+  contrasts) and expanding interactions similarly.
 }
 \details{
   \code{model.matrix} creates a design matrix from the description
@@ -81,6 +83,10 @@ model.matrix(object, \dots)
 \seealso{
   \code{\link{model.frame}}, \code{\link{model.extract}},
   \code{\link{terms}}
+
+  \code{\link[Matrix]{sparse.model.matrix}} from package
+  \CRANpkg{Matrix} for creating \emph{sparse} model matrices, which may
+  be more efficient in large dimensions.
 }
 \examples{
 ff <- log(Volume) ~ log(Height) + log(Girth)
diff --git a/src/library/stats/man/model.tables.Rd b/src/library/stats/man/model.tables.Rd
index 2ebcd28..ada33d3 100644
--- a/src/library/stats/man/model.tables.Rd
+++ b/src/library/stats/man/model.tables.Rd
@@ -1,6 +1,6 @@
 % File src/library/stats/man/model.tables.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2013 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2015 R Core Team
 % Distributed under GPL 2 or later
 
 \name{model.tables}
@@ -22,7 +22,7 @@ model.tables(x, \dots)
 \arguments{
   \item{x}{a model object, usually produced by \code{aov}}
   \item{type}{type of table: currently only \code{"effects"} and
-    \code{"means"} are implemented.}
+    \code{"means"} are implemented.  Can be abbreviated.}
   \item{se}{should standard errors be computed?}
   \item{cterms}{A character vector giving the names of the terms for
     which tables should be computed. The default is all tables.}
diff --git a/src/library/stats/man/monthplot.Rd b/src/library/stats/man/monthplot.Rd
index 8fadd7c..5e0d572 100644
--- a/src/library/stats/man/monthplot.Rd
+++ b/src/library/stats/man/monthplot.Rd
@@ -1,5 +1,5 @@
 % File src/library/stats/man/monthplot.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2007 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/stats/man/mood.test.Rd b/src/library/stats/man/mood.test.Rd
index 0332d03..e78fade 100644
--- a/src/library/stats/man/mood.test.Rd
+++ b/src/library/stats/man/mood.test.Rd
@@ -1,5 +1,5 @@
 % File src/library/stats/man/mood.test.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2008 R Core Team
 % Distributed under GPL 2 or later
 
@@ -54,7 +54,7 @@ mood.test(x, \dots)
   \item{statistic}{the value of the test statistic.}
   \item{p.value}{the p-value of the test.}
   \item{alternative}{a character string describing the alternative
-    hypothesis.}
+    hypothesis.   You can specify just the initial letter.}
   \item{method}{the character string \code{"Mood two-sample test of scale"}.}
   \item{data.name}{a character string giving the names of the data.}
 }
diff --git a/src/library/stats/man/na.action.Rd b/src/library/stats/man/na.action.Rd
index d958e93..f25e905 100644
--- a/src/library/stats/man/na.action.Rd
+++ b/src/library/stats/man/na.action.Rd
@@ -1,5 +1,5 @@
 % File src/library/stats/man/na.action.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2008 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/stats/man/na.contiguous.Rd b/src/library/stats/man/na.contiguous.Rd
index f6c2273..cf2fb5c 100644
--- a/src/library/stats/man/na.contiguous.Rd
+++ b/src/library/stats/man/na.contiguous.Rd
@@ -1,5 +1,5 @@
 % File src/library/stats/man/na.contiguous.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2007 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/stats/man/na.fail.Rd b/src/library/stats/man/na.fail.Rd
index 9cfa339..546e7a8 100644
--- a/src/library/stats/man/na.fail.Rd
+++ b/src/library/stats/man/na.fail.Rd
@@ -1,5 +1,5 @@
 % File src/library/stats/man/na.fail.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2007 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/stats/man/nafns.Rd b/src/library/stats/man/nafns.Rd
index feeb680..0204cf8 100644
--- a/src/library/stats/man/nafns.Rd
+++ b/src/library/stats/man/nafns.Rd
@@ -1,10 +1,8 @@
 % File src/library/stats/man/nafns.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2011 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2014 R Core Team
 % Distributed under GPL 2 or later
 
-\newcommand{\CRANpkg}{\href{http://CRAN.R-project.org/package=#1}{\pkg{#1}}}
-
 \name{naresid}
 \alias{naresid}
 \alias{naresid.default}
diff --git a/src/library/stats/man/naprint.Rd b/src/library/stats/man/naprint.Rd
index 1900f80..ca03f7b 100644
--- a/src/library/stats/man/naprint.Rd
+++ b/src/library/stats/man/naprint.Rd
@@ -1,5 +1,5 @@
 % File src/library/stats/man/naprint.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2007 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/stats/man/nextn.Rd b/src/library/stats/man/nextn.Rd
index 53bf92a..881cbfd 100644
--- a/src/library/stats/man/nextn.Rd
+++ b/src/library/stats/man/nextn.Rd
@@ -1,5 +1,5 @@
 % File src/library/stats/man/nextn.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2007 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/stats/man/nlm.Rd b/src/library/stats/man/nlm.Rd
index 2c36e52..0b354ac 100644
--- a/src/library/stats/man/nlm.Rd
+++ b/src/library/stats/man/nlm.Rd
@@ -1,6 +1,6 @@
 % File src/library/stats/man/nlm.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2012 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2014 R Core Team
 % Distributed under GPL 2 or later
 
 \name{nlm}
@@ -78,9 +78,6 @@ nlm(f, p, \dots, hessian = FALSE, typsize = rep(1, length(p)),
   The functions supplied should always return finite (including not
   \code{NA} and not \code{NaN}) values: for the function value itself
   non-finite values are replaced by the maximum positive value with a warning.
-
-  The parameter vector passed to \code{f} and \code{hessian} has special
-  semantics and is shared between calls.  The functions should not copy it.
 }
 \value{
   A list containing the following components:
diff --git a/src/library/stats/man/nlminb.Rd b/src/library/stats/man/nlminb.Rd
index 06955a5..44e2cd4 100644
--- a/src/library/stats/man/nlminb.Rd
+++ b/src/library/stats/man/nlminb.Rd
@@ -1,6 +1,6 @@
 % File src/library/stats/man/nlminb.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2013 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2017 R Core Team
 % Distributed under GPL 2 or later
 
 \name{nlminb}
@@ -51,17 +51,12 @@ nlminb(start, objective, gradient = NULL, hessian = NULL, \dots,
   applicable, \code{gradient} and \code{hessian}.  The parameter vector
   will be coerced to double.
 
-  The PORT documentation is at
-  \url{http://netlib.bell-labs.com/cm/cs/cstr/153.pdf}.
+  %% The PORT documentation is at
+  %% \url{http://netlib.bell-labs.com/cm/cs/cstr/153.pdf}.
 
-  The parameter vector passed to \code{objective}, \code{gradient} and
-  \code{hessian} had special semantics prior to \R 3.1.0 and was shared
-  between calls.  The functions should not copy it.
-
-  If any of the functions returns \code{NA} or \code{NaN} the internal code
-  could infinite-loop in \R prior to 2.15.2: this is now an error for
-  the gradient and Hessian, and such values for function evaluation are
-  replaced by \code{+Inf} with a warning.
+  If any of the functions returns \code{NA} or \code{NaN} this is an
+  error for the gradient and Hessian, and such values for function
+  evaluation are replaced by \code{+Inf} with a warning.
 }
 % see PR#15052.
 \value{
@@ -107,7 +102,15 @@ nlminb(start, objective, gradient = NULL, hessian = NULL, \dots,
       objective function value.}% ETA0  42
   }
 }
-\source{ \url{http://netlib.bell-labs.com/netlib/port/} }
+\source{
+  \url{http://www.netlib.org/port/}
+}
+\references{
+  David M. Gay (1990),
+  Usage summary for selected optimization routines.
+  Computing Science Technical Report 153, AT&T Bell Laboratories, Murray
+  Hill.
+}  
 \author{
   \R port: Douglas Bates and Deepayan Sarkar.
 
diff --git a/src/library/stats/man/nls.Rd b/src/library/stats/man/nls.Rd
index 373d6c7..ce6126c 100644
--- a/src/library/stats/man/nls.Rd
+++ b/src/library/stats/man/nls.Rd
@@ -1,6 +1,6 @@
 % File src/library/stats/man/nls.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2013 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2014 R Core Team
 % Distributed under GPL 2 or later
 
 \name{nls}
@@ -32,7 +32,8 @@ nls(formula, data, start, control, algorithm,
     The default algorithm is a Gauss-Newton algorithm.  Other possible
     values are \code{"plinear"} for the Golub-Pereyra algorithm for
     partially linear least-squares models and \code{"port"} for the
-    \sQuote{nl2sol} algorithm from the Port library -- see the references.}
+    \sQuote{nl2sol} algorithm from the Port library -- see the references.
+    Can be abbreviated.}
   \item{trace}{logical value indicating if a trace of the iteration
     progress should be printed.  Default is \code{FALSE}.  If
     \code{TRUE} the residual (weighted) sum-of-squares and the
@@ -155,7 +156,7 @@ nls(formula, data, start, control, algorithm,
   \code{\link{selfStart}}.
 }
 \examples{
-\testonly{od <- options(digits=5)}
+\dontshow{od <- options(digits=5)}
 require(graphics)
 
 DNase1 <- subset(DNase, Run == 1)
@@ -301,7 +302,7 @@ b <- coef(musc.1)
 musc.2 <- nls(Length ~ a[Strip] + b[Strip]*exp(-Conc/th), muscle,
               start = list(a = rep(b[2], 21), b = rep(b[3], 21), th = b[1]))
 summary(musc.2)}
-\testonly{options(od)}
+\dontshow{options(od)}
 }
 \keyword{nonlinear}
 \keyword{regression}
diff --git a/src/library/stats/man/nls.control.Rd b/src/library/stats/man/nls.control.Rd
index 2ca1097..aaff3d3 100644
--- a/src/library/stats/man/nls.control.Rd
+++ b/src/library/stats/man/nls.control.Rd
@@ -1,5 +1,5 @@
 % File src/library/stats/man/nls.control.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2007 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/stats/man/nobs.Rd b/src/library/stats/man/nobs.Rd
index c26ce75..a51cb98 100644
--- a/src/library/stats/man/nobs.Rd
+++ b/src/library/stats/man/nobs.Rd
@@ -1,5 +1,5 @@
 % File src/library/stats/man/nobs.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2012 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/stats/man/numericDeriv.Rd b/src/library/stats/man/numericDeriv.Rd
index 4397de0..1296ed6 100644
--- a/src/library/stats/man/numericDeriv.Rd
+++ b/src/library/stats/man/numericDeriv.Rd
@@ -1,5 +1,5 @@
 % File src/library/stats/man/numericDeriv.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2008 R Core Team
 % Distributed under GPL 2 or later
 
@@ -36,13 +36,13 @@ numericDeriv(expr, theta, rho = parent.frame(), dir = 1.0)
 }
 \author{Saikat DebRoy \email{saikat at stat.wisc.edu}}
 \examples{
-\testonly{od <- options(digits = 4)}
+\dontshow{od <- options(digits = 4)}
 myenv <- new.env()
 assign("mean", 0., envir = myenv)
 assign("sd", 1., envir = myenv)
 assign("x", seq(-3., 3., len = 31), envir = myenv)
 numericDeriv(quote(pnorm(x, mean, sd)), c("mean", "sd"), myenv)
-\testonly{options(od)}
+\dontshow{options(od)}
 }
 \keyword{models}
 
diff --git a/src/library/stats/man/offset.Rd b/src/library/stats/man/offset.Rd
index 31f4b3a..1ac0e1c 100644
--- a/src/library/stats/man/offset.Rd
+++ b/src/library/stats/man/offset.Rd
@@ -1,10 +1,8 @@
 % File src/library/stats/man/offset.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2007 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2014 R Core Team
 % Distributed under GPL 2 or later
 
-\newcommand{\CRANpkg}{\href{http://CRAN.R-project.org/package=#1}{\pkg{#1}}}
-
 \name{offset}
 \title{Include an Offset in a Model Formula}
 \usage{
diff --git a/src/library/stats/man/oneway.test.Rd b/src/library/stats/man/oneway.test.Rd
index 53a798e..c8ec1d6 100644
--- a/src/library/stats/man/oneway.test.Rd
+++ b/src/library/stats/man/oneway.test.Rd
@@ -1,5 +1,5 @@
 % File src/library/stats/man/oneway.test.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2014 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/stats/man/optim.Rd b/src/library/stats/man/optim.Rd
index 0694d5a..d484658 100644
--- a/src/library/stats/man/optim.Rd
+++ b/src/library/stats/man/optim.Rd
@@ -1,10 +1,8 @@
 % File src/library/stats/man/optim.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2013 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2014 R Core Team
 % Distributed under GPL 2 or later
 
-\newcommand{\sspace}{\ifelse{latex}{\out{~}}{ }}
-
 \name{optim}
 \alias{optim}
 \alias{optimHess}
@@ -40,7 +38,7 @@ optimHess(par, fn, gr = NULL, \dots, control = list())
    candidate point.  If it is \code{NULL} a default Gaussian Markov
    kernel is used.}
  \item{\dots}{Further arguments to be passed to \code{fn} and \code{gr}.}
- \item{method}{The method to be used. See \sQuote{Details}.}
+ \item{method}{The method to be used. See \sQuote{Details}.  Can be abbreviated.}
  \item{lower, upper}{Bounds on the variables for the \code{"L-BFGS-B"}
    method, or bounds in which to \emph{search} for method \code{"Brent"}.}
  \item{control}{A list of control parameters. See \sQuote{Details}.}
diff --git a/src/library/stats/man/optimize.Rd b/src/library/stats/man/optimize.Rd
index 0e86d31..c63e755 100644
--- a/src/library/stats/man/optimize.Rd
+++ b/src/library/stats/man/optimize.Rd
@@ -1,16 +1,16 @@
 % File src/library/stats/man/optimize.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2012 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2016 R Core Team
 % Distributed under GPL 2 or later
 
 \name{optimize}
 \title{One Dimensional Optimization}
 \usage{
-optimize(f = , interval = ,  \dots, lower = min(interval),
-         upper = max(interval), maximum = FALSE,
+optimize(f, interval, \dots, lower = min(interval), upper = max(interval),
+         maximum = FALSE,
          tol = .Machine$double.eps^0.25)
-optimise(f = , interval = ,  \dots, lower = min(interval),
-         upper = max(interval), maximum = FALSE,
+optimise(f, interval, \dots, lower = min(interval), upper = max(interval),
+         maximum = FALSE,
          tol = .Machine$double.eps^0.25)
 }
 \alias{optimize}
diff --git a/src/library/stats/man/order.dendrogram.Rd b/src/library/stats/man/order.dendrogram.Rd
index 3e99902..9a236ab 100644
--- a/src/library/stats/man/order.dendrogram.Rd
+++ b/src/library/stats/man/order.dendrogram.Rd
@@ -1,5 +1,5 @@
 % File src/library/stats/man/order.dendrogram.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2010 R Core Team
 % Copyright 2002-2010 The R Foundation
 % Distributed under GPL 2 or later
diff --git a/src/library/stats/man/p.adjust.Rd b/src/library/stats/man/p.adjust.Rd
index e63751e..4ee5356 100644
--- a/src/library/stats/man/p.adjust.Rd
+++ b/src/library/stats/man/p.adjust.Rd
@@ -1,5 +1,5 @@
 % File src/library/stats/man/p.adjust.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2013 R Core Team
 % Distributed under GPL 2 or later
 
@@ -19,7 +19,7 @@ p.adjust.methods
 \arguments{
   \item{p}{numeric vector of p-values (possibly with \code{\link{NA}}s).
     Any other \R is coerced by \code{\link{as.numeric}}.}
-  \item{method}{correction method}
+  \item{method}{correction method.  Can be abbreviated.}
   \item{n}{number of comparisons, must be at least \code{length(p)};
     only set this (to non-default) when you know what you are doing!}
 }
diff --git a/src/library/stats/man/pairwise.prop.test.Rd b/src/library/stats/man/pairwise.prop.test.Rd
index 059458b..f84f198 100644
--- a/src/library/stats/man/pairwise.prop.test.Rd
+++ b/src/library/stats/man/pairwise.prop.test.Rd
@@ -1,5 +1,5 @@
 % File src/library/stats/man/pairwise.prop.test.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2007 R Core Team
 % Distributed under GPL 2 or later
 
@@ -18,7 +18,7 @@ pairwise.prop.test(x, n, p.adjust.method = p.adjust.methods, ...)
    giving the counts of successes and failures, respectively. }
  \item{n}{ Vector of counts of trials; ignored if \code{x} is a matrix.}
  \item{p.adjust.method}{Method for adjusting p values
-   (see \code{\link{p.adjust}}) }
+   (see \code{\link{p.adjust}}).  Can be abbreviated. }
  \item{\dots}{ Additional arguments to pass to \code{prop.test} }
 }
 \value{
diff --git a/src/library/stats/man/pairwise.t.test.Rd b/src/library/stats/man/pairwise.t.test.Rd
index b2f553e..7573de5 100644
--- a/src/library/stats/man/pairwise.t.test.Rd
+++ b/src/library/stats/man/pairwise.t.test.Rd
@@ -1,5 +1,5 @@
 % File src/library/stats/man/pairwise.t.test.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2007 R Core Team
 % Distributed under GPL 2 or later
 
@@ -25,7 +25,7 @@ pairwise.t.test(x, g, p.adjust.method = p.adjust.methods,
     t-tests. }
  \item{alternative}{ a character string specifying the alternative
     hypothesis, must be one of \code{"two.sided"} (default),
-    \code{"greater"} or \code{"less"}.  }
+    \code{"greater"} or \code{"less"}.  Can be abbreviated.}
  \item{\dots}{ additional arguments to pass to \code{t.test}. }
 }
 \details{ The \code{pool.sd} switch calculates a common SD for all
diff --git a/src/library/stats/man/pairwise.table.Rd b/src/library/stats/man/pairwise.table.Rd
index bb97a08..444f6ad 100644
--- a/src/library/stats/man/pairwise.table.Rd
+++ b/src/library/stats/man/pairwise.table.Rd
@@ -1,6 +1,6 @@
 % File src/library/stats/man/pairwise.table.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2007 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2014 R Core Team
 % Distributed under GPL 2 or later
 
 \name{pairwise.table}
@@ -17,7 +17,7 @@ pairwise.table(compare.levels, level.names, p.adjust.method)
  \item{compare.levels}{ Function to compute (raw) p value given indices
    \code{i} and \code{j} }
  \item{level.names}{ Names of the group levels}
- \item{p.adjust.method}{Method for multiple testing adjustment}
+ \item{p.adjust.method}{Method for multiple testing adjustment.  Can be abbreviated.}
 }
 \details{
   Functions that do multiple group comparisons create separate
diff --git a/src/library/stats/man/pairwise.wilcox.test.Rd b/src/library/stats/man/pairwise.wilcox.test.Rd
index 43860ee..55d8584 100644
--- a/src/library/stats/man/pairwise.wilcox.test.Rd
+++ b/src/library/stats/man/pairwise.wilcox.test.Rd
@@ -1,5 +1,5 @@
 % File src/library/stats/man/pairwise.wilcox.test.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2007 R Core Team
 % Distributed under GPL 2 or later
 
@@ -18,7 +18,7 @@ pairwise.wilcox.test(x, g, p.adjust.method = p.adjust.methods,
   \item{x}{ response vector. }
   \item{g}{ grouping vector or factor. }
   \item{p.adjust.method}{ method for adjusting p values (see
-    \code{\link{p.adjust}}). }
+    \code{\link{p.adjust}}). Can be abbreviated.}
   \item{paired}{a logical indicating whether you want a paired test.}
   \item{\dots}{additional arguments to pass to \code{\link{wilcox.test}}.}
 }
diff --git a/src/library/stats/man/plot.HoltWinters.Rd b/src/library/stats/man/plot.HoltWinters.Rd
index 9726fc6..ef13fbd 100644
--- a/src/library/stats/man/plot.HoltWinters.Rd
+++ b/src/library/stats/man/plot.HoltWinters.Rd
@@ -1,5 +1,5 @@
 % File src/library/stats/man/plot.HoltWinters.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2009 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/stats/man/plot.acf.Rd b/src/library/stats/man/plot.acf.Rd
index 746d29f..9bdc280 100644
--- a/src/library/stats/man/plot.acf.Rd
+++ b/src/library/stats/man/plot.acf.Rd
@@ -1,5 +1,5 @@
 % File src/library/stats/man/plot.acf.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2007 R Core Team
 % Distributed under GPL 2 or later
 
@@ -35,7 +35,7 @@
   \item{main}{overall title for the plot.}
   \item{ci.col}{colour to plot the confidence interval lines.}
   \item{ci.type}{should the confidence limits assume a white noise
-    input or for lag \eqn{k} an MA(\eqn{k-1}) input?}
+    input or for lag \eqn{k} an MA(\eqn{k-1}) input?   Can be abbreviated.}
   \item{max.mfrow}{positive integer; for multivariate \code{x}
     indicating how many rows and columns of plots should be put on one
     page, using \code{\link{par}(mfrow = c(m,m))}.}
diff --git a/src/library/stats/man/plot.density.Rd b/src/library/stats/man/plot.density.Rd
index a4a44d8..08eccf1 100644
--- a/src/library/stats/man/plot.density.Rd
+++ b/src/library/stats/man/plot.density.Rd
@@ -1,5 +1,5 @@
 % File src/library/stats/man/plot.density.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2007 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/stats/man/plot.isoreg.Rd b/src/library/stats/man/plot.isoreg.Rd
index a37a65a..834477b 100644
--- a/src/library/stats/man/plot.isoreg.Rd
+++ b/src/library/stats/man/plot.isoreg.Rd
@@ -1,5 +1,5 @@
 % File src/library/stats/man/plot.isoreg.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2007 R Core Team
 % Distributed under GPL 2 or later
 
@@ -28,7 +28,7 @@
   \item{x}{an \code{\link{isoreg}} object.}
   \item{plot.type}{character indicating which type of plot is desired.
     The first (default) only draws the data and the fit, where the
-    others add a plot of the cumulative data and fit.}
+    others add a plot of the cumulative data and fit.  Can be abbreviated.}
   \item{main}{main title of plot, see \code{\link{title}}.}
   \item{main2}{title for second (cumulative) plot.}
   \item{xlab, ylab}{x- and y- axis annotation.}
diff --git a/src/library/stats/man/plot.lm.Rd b/src/library/stats/man/plot.lm.Rd
index 9e18d69..6e47d73 100644
--- a/src/library/stats/man/plot.lm.Rd
+++ b/src/library/stats/man/plot.lm.Rd
@@ -1,10 +1,8 @@
 % File src/library/stats/man/plot.lm.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2013 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2016 R Core Team
 % Distributed under GPL 2 or later
 
-\newcommand{\sspace}{\ifelse{latex}{\out{~}}{ }}
-
 \name{plot.lm}
 \alias{plot.lm}
 % \alias{plot.mlm} %which is .NotYetImplemented()
@@ -22,17 +20,19 @@
      id.n = 3, labels.id = names(residuals(x)), cex.id = 0.75,
      qqline = TRUE, cook.levels = c(0.5, 1.0),
      add.smooth = getOption("add.smooth"), label.pos = c(4,2),
-     cex.caption = 1)
+     cex.caption = 1, cex.oma.main = 1.25)
 }
 \arguments{
   \item{x}{\code{lm} object, typically result of \code{\link{lm}} or
     \code{\link{glm}}.}
   \item{which}{if a subset of the plots is required, specify a subset of
-    the numbers \code{1:6}.}
+    the numbers \code{1:6}, see \code{caption} below (and the
+    \sQuote{Details}) for the different kinds.}
   \item{caption}{captions to appear above the plots;
     \code{\link{character}} vector or \code{\link{list}} of valid
-    graphics annotations, see \code{\link{as.graphicsAnnot}}.
-    Can be set to \code{""} or \code{NA} to suppress all captions.
+    graphics annotations, see \code{\link{as.graphicsAnnot}}, of length
+    6, the j-th entry corresponding to \code{which[j]}.  Can be set to
+    \code{""} or \code{NA} to suppress all captions.
   }
   \item{panel}{panel function.  The useful alternative to
     \code{\link{points}}, \code{\link{panel.smooth}} can be chosen
@@ -52,13 +52,15 @@
     points will be chosen.  \code{NULL} uses observation numbers.}
   \item{cex.id}{magnification of point labels.}
   \item{qqline}{logical indicating if a \code{\link{qqline}()} should be
-  added to the normal Q-Q plot.}
+    added to the normal Q-Q plot.}
   \item{cook.levels}{levels of Cook's distance at which to draw contours.}
   \item{add.smooth}{logical indicating if a smoother should be added to
     most plots; see also \code{panel} above.}
   \item{label.pos}{positioning of labels, for the left half and right
     half of the graph respectively, for plots 1-3.}
   \item{cex.caption}{controls the size of \code{caption}.}
+  \item{cex.oma.main}{controls the size of the \code{sub.caption} only if
+    that is \emph{above} the figures when there is more than one.}
 }
 \description{
   Six plots (selectable by \code{which}) are currently available: a plot
@@ -67,7 +69,8 @@
   against fitted values, a Normal Q-Q plot, a
   plot of Cook's distances versus row labels, a plot of residuals
   against leverages, and a plot of Cook's distances against
-  leverage/(1-leverage).  By default, the first three and \code{5} are provided.
+  leverage/(1-leverage).  By default, the first three and \code{5} are
+  provided.
 }
 \details{
   \code{sub.caption}---by default the function call---is shown as
@@ -97,8 +100,9 @@
   the x-axis.  (The factor levels are ordered by mean fitted value.)
 
   In the Cook's distance vs leverage/(1-leverage) plot, contours of
-  standardized residuals that are equal in magnitude are lines through
-  the origin.  The contour lines are labelled with the magnitudes.
+  standardized residuals (\code{\link{rstandard}(.)}) that are equal in
+  magnitude are lines through the origin.  The contour lines are
+  labelled with the magnitudes.
 }
 \references{
   Belsley, D. A., Kuh, E. and Welsch, R. E. (1980)
diff --git a/src/library/stats/man/plot.ppr.Rd b/src/library/stats/man/plot.ppr.Rd
index 4728da5..7e3c138 100644
--- a/src/library/stats/man/plot.ppr.Rd
+++ b/src/library/stats/man/plot.ppr.Rd
@@ -1,6 +1,6 @@
 % File src/library/stats/man/plot.ppr.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2007 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2016 R Core Team
 % Distributed under GPL 2 or later
 
 % file modreg/man/plot.ppr.Rd
@@ -8,29 +8,33 @@
 %
 \name{plot.ppr}
 \alias{plot.ppr}
-\title{
-Plot Ridge Functions for Projection Pursuit Regression Fit
-}
+\title{Plot Ridge Functions for Projection Pursuit Regression Fit}
 \description{
-Plot ridge functions for projection pursuit regression fit.
+  Plot the ridge functions for a projection pursuit regression
+  (\code{\link{ppr}}) fit.
 }
 \usage{
-\method{plot}{ppr}(x, ask, type = "o", \dots)
+\method{plot}{ppr}(x, ask, type = "o", cex = 1/2,
+     main = quote(bquote(
+         "term"[.(i)]*":" ~~ hat(beta[.(i)]) == .(bet.i))),
+     xlab = quote(bquote(bold(alpha)[.(i)]^T * bold(x))),
+     ylab = "", \dots)
 }
 \arguments{
-  \item{x}{
-    A fit of class \code{"ppr"} as produced by a call to \code{ppr}.
-  }
+  \item{x}{an \R object of class \code{"ppr"} as produced by a call to
+    \code{ppr}.}
   \item{ask}{
-    the graphics parameter \code{ask}: see \code{par} for details.
+    the graphics parameter \code{ask}: see \code{\link{par}} for details.
     If set to \code{TRUE} will ask between the plot of each cross-section.
   }
-  \item{type}{
-    the type of line to draw
-  }
-  \item{\dots}{
-    further graphical parameters
-  }
+  \item{type}{the type of line (see \code{\link{plot.default}}) to draw.}
+  \item{cex}{plot symbol expansion factor (\emph{relative} to
+    \code{\link{par}("cex")}).}
+  \item{main, xlab, ylab}{axis annotations, see also
+    \code{\link{title}}.  Can be an expression (depending on \code{i} and
+    \code{bet.i}), as by default which will be \code{eval()}uated.}
+  \item{\dots}{further graphical parameters, passed to
+    \code{\link{plot}()}.}
 }
 \value{
   None
@@ -45,15 +49,13 @@ Plot ridge functions for projection pursuit regression fit.
 \examples{
 require(graphics)
 
-with(rock, {
-area1 <- area/10000; peri1 <- peri/10000
+rock1 <- within(rock, { area1 <- area/10000; peri1 <- peri/10000 })
 par(mfrow = c(3,2)) # maybe: , pty = "s")
 rock.ppr <- ppr(log(perm) ~ area1 + peri1 + shape,
-                data = rock, nterms = 2, max.terms = 5)
+                data = rock1, nterms = 2, max.terms = 5)
 plot(rock.ppr, main = "ppr(log(perm)~ ., nterms=2, max.terms=5)")
 plot(update(rock.ppr, bass = 5), main = "update(..., bass = 5)")
 plot(update(rock.ppr, sm.method = "gcv", gcvpen = 2),
      main = "update(..., sm.method=\"gcv\", gcvpen=2)")
-})
 }
 \keyword{hplot}
diff --git a/src/library/stats/man/plot.profile.nls.Rd b/src/library/stats/man/plot.profile.nls.Rd
index 592f0cb..4ec1011 100644
--- a/src/library/stats/man/plot.profile.nls.Rd
+++ b/src/library/stats/man/plot.profile.nls.Rd
@@ -1,5 +1,5 @@
 % File src/library/stats/man/plot.profile.nls.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2011 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/stats/man/plot.spec.Rd b/src/library/stats/man/plot.spec.Rd
index 6ebaec5..f5deb7f 100644
--- a/src/library/stats/man/plot.spec.Rd
+++ b/src/library/stats/man/plot.spec.Rd
@@ -1,5 +1,5 @@
 % File src/library/stats/man/plot.spec.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2007 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/stats/man/plot.stepfun.Rd b/src/library/stats/man/plot.stepfun.Rd
index 6439ea6..c11b7da 100644
--- a/src/library/stats/man/plot.stepfun.Rd
+++ b/src/library/stats/man/plot.stepfun.Rd
@@ -1,5 +1,5 @@
 % File src/library/stats/man/plot.stepfun.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2009 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/stats/man/plot.ts.Rd b/src/library/stats/man/plot.ts.Rd
index d18f1d2..ced413b 100644
--- a/src/library/stats/man/plot.ts.Rd
+++ b/src/library/stats/man/plot.ts.Rd
@@ -1,5 +1,5 @@
 % File src/library/stats/man/plot.ts.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2007 R Core Team
 % Distributed under GPL 2 or later
 
@@ -22,7 +22,8 @@
   \item{x, y}{time series objects, usually inheriting from class \code{"ts"}.}
 
   \item{plot.type}{for multivariate time series, should the series by
-    plotted separately (with a common time axis) or on a single plot?}
+    plotted separately (with a common time axis) or on a single plot?
+    Can be abbreviated.}
 
   \item{xy.labels}{logical, indicating if \code{\link{text}()} labels
     should be used for an x-y plot, \emph{or} character, supplying a
diff --git a/src/library/stats/man/poisson.test.Rd b/src/library/stats/man/poisson.test.Rd
index d723468..b5226d4 100644
--- a/src/library/stats/man/poisson.test.Rd
+++ b/src/library/stats/man/poisson.test.Rd
@@ -1,5 +1,5 @@
 % File src/library/stats/man/poisson.test.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2011 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/stats/man/poly.Rd b/src/library/stats/man/poly.Rd
index e205e7c..f2a3ab7 100644
--- a/src/library/stats/man/poly.Rd
+++ b/src/library/stats/man/poly.Rd
@@ -1,19 +1,17 @@
 % File src/library/stats/man/poly.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2014 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2017 R Core Team
 % Distributed under GPL 2 or later
 
-\newcommand{\sspace}{\ifelse{latex}{\out{~}}{ }}
-
 \name{poly}
+\title{Compute Orthogonal Polynomials}
 \alias{poly}
 \alias{polym}
 \alias{predict.poly}
 \alias{makepredictcall.poly}
-\title{Compute Orthogonal Polynomials}
 \usage{
-poly(x, \dots, degree = 1, coefs = NULL, raw = FALSE)
-polym(\dots, degree = 1, raw = FALSE)
+poly(x, \dots, degree = 1, coefs = NULL, raw = FALSE, simple = FALSE)
+polym  (\dots, degree = 1, coefs = NULL, raw = FALSE)
 
 \method{predict}{poly}(object, newdata, \dots)
 }
@@ -28,9 +26,12 @@ polym(\dots, degree = 1, raw = FALSE)
    polynomial. \code{x} can also be a matrix.  Missing values are not
    allowed in \code{x}.}
  \item{degree}{the degree of the polynomial.  Must be less than the
-   number of unique points if \code{raw = TRUE}.}
+   number of unique points when \code{raw} is false, as by default.}
  \item{coefs}{for prediction, coefficients from a previous fit.}
  \item{raw}{if true, use raw and not orthogonal polynomials.}
+ \item{simple}{logical indicating if a simple matrix (with no further
+   \code{\link{attributes}} but \code{\link{dimnames}}) should be
+   returned.  For speedup only.}
  \item{object}{an object inheriting from class \code{"poly"}, normally
    the result of a call to \code{poly} with a single vector argument.}
  \item{\dots}{\code{poly}, \code{polym}: further vectors.\cr
@@ -38,21 +39,23 @@ polym(\dots, degree = 1, raw = FALSE)
  }
 }
 \value{
-  For \code{poly} with a single vector argument:\cr
+  For \code{poly} and \code{polym()} (when \code{simple=FALSE} and
+  \code{coefs=NULL} as per default):\cr
   A matrix with rows corresponding to points in \code{x} and columns
   corresponding to the degree, with attributes \code{"degree"} specifying
   the degrees of the columns and (unless \code{raw = TRUE})
   \code{"coefs"} which contains the centering and normalization
-  constants used in constructing the orthogonal polynomials.  The matrix
-  has given class \code{c("poly", "matrix")}.
+  constants used in constructing the orthogonal polynomials and
+  class \code{c("poly", "matrix")}.
 
-  For \code{poly} and \code{polym} with more than one input, and
-  \code{predict.poly}: a matrix.
+  For \code{poly(*, simple=TRUE)}, \code{polym(*, coefs=<non-NULL>)},
+  and \code{predict.poly()}: a matrix.
 }
 \details{
   Although formally \code{degree} should be named (as it follows
   \code{\dots}), an unnamed second argument of length 1 will be
-  interpreted as the degree.
+  interpreted as the degree, such that \code{poly(x, 3)} can be used in
+  formulas.
 
   The orthogonal polynomial is summarized by the coefficients, which can
   be used to evaluate it via the three-term recursion given in Kennedy
@@ -69,6 +72,10 @@ polym(\dots, degree = 1, raw = FALSE)
   \code{contr.poly}: it does not attempt to orthogonalize to
   machine accuracy.
 }
+\author{
+  R Core Team.  Keith Jewell (Campden BRI Group, UK) contributed
+  improvements for correct prediction on subsets.
+}
 \references{
   Chambers, J. M. and Hastie, T. J. (1992)
   \emph{Statistical Models in S}.
@@ -90,8 +97,10 @@ od <- options(digits = 3) # avoid too much visual clutter
 predict(z, seq(2, 4, 0.5))
 zapsmall(poly(seq(4, 6, 0.5), 3, coefs = attr(z, "coefs")))
 
-zapsmall(polym(1:4, c(1, 4:6), degree = 3)) # or just poly()
-zapsmall(poly(cbind(1:4, c(1, 4:6)), degree = 3))
+ zm <- zapsmall(polym (    1:4, c(1, 4:6),  degree = 3)) # or just poly():
+(z1 <- zapsmall(poly(cbind(1:4, c(1, 4:6)), degree = 3)))
+## they are the same :
+stopifnot(all.equal(zm, z1, tol = 1e-15))
 options(od)
 }
 \keyword{math}
diff --git a/src/library/stats/man/power.Rd b/src/library/stats/man/power.Rd
index f99cbfc..f60b05b 100644
--- a/src/library/stats/man/power.Rd
+++ b/src/library/stats/man/power.Rd
@@ -1,5 +1,5 @@
 % File src/library/stats/man/power.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2007 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/stats/man/power.anova.test.Rd b/src/library/stats/man/power.anova.test.Rd
index 8d759e1..30a056d 100644
--- a/src/library/stats/man/power.anova.test.Rd
+++ b/src/library/stats/man/power.anova.test.Rd
@@ -1,5 +1,5 @@
 % File src/library/stats/man/power.anova.test.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2007 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/stats/man/power.prop.test.Rd b/src/library/stats/man/power.prop.test.Rd
index 424d6bb..c4879e6 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, http://www.R-project.org
-% Copyright 1995-2007 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright (C) 1995-2014 R Core Team
 % Distributed under GPL 2 or later
 
 \name{power.prop.test}
@@ -8,22 +8,25 @@
 \encoding{UTF-8}
 \title{Power Calculations for Two-Sample Test for Proportions}
 \description{
-  Compute power of test, or determine parameters to obtain target power.
+  Compute the power of the two-sample test for proportions, or determine
+  parameters to obtain a target power.
 }
 \usage{
 power.prop.test(n = NULL, p1 = NULL, p2 = NULL, sig.level = 0.05,
                 power = NULL,
                 alternative = c("two.sided", "one.sided"),
-                strict = FALSE)
+                strict = FALSE, tol = .Machine$double.eps^0.25)
 }
 \arguments{
-  \item{n}{Number of observations (per group)}
+  \item{n}{number of observations (per group)}
   \item{p1}{probability in one group}
   \item{p2}{probability in other group}
-  \item{sig.level}{Significance level (Type I error probability)}
-  \item{power}{Power of test (1 minus Type II error probability)}
-  \item{alternative}{One- or two-sided test}
-  \item{strict}{Use strict interpretation in two-sided case}
+  \item{sig.level}{significance level (Type I error probability)}
+  \item{power}{power of test (1 minus Type II error probability)}
+  \item{alternative}{one- or two-sided test.  Can be abbreviated.}
+  \item{strict}{use strict interpretation in two-sided case}
+  \item{tol}{numerical tolerance used in root finding, the default
+    providing (at least) four significant digits.}
 }
 \details{
   Exactly one of the parameters \code{n}, \code{p1}, \code{p2},
@@ -48,17 +51,20 @@ power.prop.test(n = NULL, p1 = NULL, p2 = NULL, sig.level = 0.05,
 \note{
   \code{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
+  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.
 }
 
 \seealso{\code{\link{prop.test}}, \code{\link{uniroot}}}
 
-
 \examples{
- power.prop.test(n = 50, p1 = .50, p2 = .75)
- power.prop.test(p1 = .50, p2 = .75, power = .90)
- power.prop.test(n = 50, p1 = .5, power = .90)
+power.prop.test(n = 50, p1 = .50, p2 = .75)      ## => power = 0.740
+power.prop.test(p1 = .50, p2 = .75, power = .90) ## =>     n = 76.7
+power.prop.test(n = 50, p1 = .5, power = .90)    ## =>    p2 = 0.8026
+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
 }
 \keyword{ htest }
diff --git a/src/library/stats/man/power.t.test.Rd b/src/library/stats/man/power.t.test.Rd
index 34c38fb..caa1354 100644
--- a/src/library/stats/man/power.t.test.Rd
+++ b/src/library/stats/man/power.t.test.Rd
@@ -1,6 +1,6 @@
 % File src/library/stats/man/power.t.test.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2007 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright (C) 1995-2014 R Core Team
 % Distributed under GPL 2 or later
 
 \name{power.t.test}
@@ -12,32 +12,35 @@ power.t.test(n = NULL, delta = NULL, sd = 1, sig.level = 0.05,
              power = NULL,
              type = c("two.sample", "one.sample", "paired"),
              alternative = c("two.sided", "one.sided"),
-             strict = FALSE)
+             strict = FALSE, tol = .Machine$double.eps^0.25)
 }
 \arguments{
- \item{n}{Number of observations (per group)}
- \item{delta}{True difference in means}
- \item{sd}{Standard deviation}
- \item{sig.level}{Significance level (Type I error probability)}
- \item{power}{Power of test (1 minus Type II error probability)}
- \item{type}{Type of t test}
- \item{alternative}{One- or two-sided test}
- \item{strict}{Use strict interpretation in two-sided case}
+ \item{n}{number of observations (per group)}
+ \item{delta}{true difference in means}
+ \item{sd}{standard deviation}
+ \item{sig.level}{significance level (Type I error probability)}
+ \item{power}{power of test (1 minus Type II error probability)}
+ \item{type}{string specifying the type of t test.  Can be abbreviated.}
+ \item{alternative}{one- or two-sided test.  Can be abbreviated.}
+ \item{strict}{use strict interpretation in two-sided case}
+  \item{tol}{numerical tolerance used in root finding, the default
+    providing (at least) four significant digits.}
 }
 \description{
- Compute power of test, or determine parameters to obtain target power.
+  Compute the power of the one- or two- sample t test,
+  or determine parameters to obtain a target power.
 }
 
 \details{
   Exactly one of the parameters \code{n}, \code{delta}, \code{power},
-  \code{sd}, and \code{sig.level} must be passed as NULL, and that
-  parameter is determined from the others. Notice that the last two have
-  non-NULL defaults so NULL must be explicitly passed if you want to
+  \code{sd}, and \code{sig.level} must be passed as \code{NULL}, and that
+  parameter is determined from the others.  Notice that the last two have
+  non-NULL defaults, so NULL must be explicitly passed if you want to
   compute them.
 
   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.
 }
 \value{
@@ -50,7 +53,7 @@ power.t.test(n = NULL, delta = NULL, sd = 1, sig.level = 0.05,
   \enc{Ekstrøm}{Ekstroem}}
 
 \note{
-  \code{uniroot} is used to solve power equation for unknowns, so
+  \code{uniroot} is used to solve the power equation for unknowns, so
   you may see errors from it, notably about inability to bracket the
   root when invalid arguments are given.
 }
diff --git a/src/library/stats/man/pp.test.Rd b/src/library/stats/man/pp.test.Rd
index cbc85ae..b0da5e2 100644
--- a/src/library/stats/man/pp.test.Rd
+++ b/src/library/stats/man/pp.test.Rd
@@ -1,6 +1,6 @@
 % File src/library/stats/man/pp.test.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2008 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2014 R Core Team
 % Distributed under GPL 2 or later
 
 \name{PP.test}
diff --git a/src/library/stats/man/ppoints.Rd b/src/library/stats/man/ppoints.Rd
index b1305e0..e3f37b1 100644
--- a/src/library/stats/man/ppoints.Rd
+++ b/src/library/stats/man/ppoints.Rd
@@ -1,12 +1,12 @@
 % File src/library/stats/man/ppoints.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2007 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2017 R Core Team
 % Distributed under GPL 2 or later
 
 \name{ppoints}
 \title{Ordinates for Probability Plotting}
 \usage{
-ppoints(n, a = ifelse(n <= 10, 3/8, 1/2))
+ppoints(n, a = if(n <= 10) 3/8 else 1/2)
 }
 \alias{ppoints}
 \arguments{
@@ -50,6 +50,31 @@ ppoints(n, a = ifelse(n <= 10, 3/8, 1/2))
 ppoints(4) # the same as  ppoints(1:4)
 ppoints(10)
 ppoints(10, a = 1/2)
+
+## Visualize including the fractions :
+require(graphics)\dontshow{lNs <- loadedNamespaces()}
+p.ppoints <- function(n, ..., add = FALSE, col = par("col")) {
+  pn <- ppoints(n, ...)
+  if(add)
+      points(pn, pn, col = col)
+  else {
+      tit <- match.call(); tit[[1]] <- quote(ppoints)
+      plot(pn,pn, main = deparse(tit), col=col,
+           xlim = 0:1, ylim = 0:1, xaxs = "i", yaxs = "i")
+      abline(0, 1, col = adjustcolor(1, 1/4), lty = 3)
+  }
+  if(!add && requireNamespace("MASS", quietly = TRUE))
+    text(pn, pn, as.character(MASS::fractions(pn)),
+         adj = c(0,0)-1/4, cex = 3/4, xpd = NA, col=col)
+  abline(h = pn, v = pn, col = adjustcolor(col, 1/2), lty = 2, lwd = 1/2)
+}
+
+p.ppoints(4)
+p.ppoints(10)
+p.ppoints(10, a = 1/2)
+p.ppoints(21)
+p.ppoints(8) ; p.ppoints(8, a = 1/2, add=TRUE, col="tomato")
+\dontshow{if(!any("MASS" == lNs)) unloadNamespace("MASS")}
 }
 \keyword{dplot}
 \keyword{arith}
diff --git a/src/library/stats/man/ppr.Rd b/src/library/stats/man/ppr.Rd
index 6105fe0..16ed61f 100644
--- a/src/library/stats/man/ppr.Rd
+++ b/src/library/stats/man/ppr.Rd
@@ -1,15 +1,12 @@
 % File src/library/stats/man/ppr.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2013 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2016 R Core Team
 % Distributed under GPL 2 or later
 
 % file stats/man/ppr.Rd
 % copyright (C) 1995-8 B. D. Ripley
 % copyright (C) 2000-3   The R Core Team
 
-\newcommand{\CRANpkg}{\href{http://CRAN.R-project.org/package=#1}{\pkg{#1}}}
-\newcommand{\sspace}{\ifelse{latex}{\out{~}}{ }}
-
 \name{ppr}
 \alias{ppr}
 \alias{ppr.default}
@@ -27,7 +24,7 @@ ppr(x, \dots)
 \method{ppr}{default}(x, y, weights = rep(1, n),
     ww = rep(1, q), nterms, max.terms = nterms, optlevel = 2,
     sm.method = c("supsmu", "spline", "gcvspline"),
-    bass = 0, span = 0, df = 5, gcvpen = 1, \dots)
+    bass = 0, span = 0, df = 5, gcvpen = 1, trace = FALSE, \dots)
 }
 \arguments{
   \item{formula}{
@@ -74,11 +71,14 @@ ppr(x, \dots)
     section.
   }
   \item{sm.method}{
-    the method used for smoothing the ridge functions.  The default is to
-    use Friedman's super smoother \code{supsmu}.  The alternatives are to use
-    the smoothing spline code underlying \code{smooth.spline}, either with a
-    specified (equivalent) degrees of freedom for each ridge functions, or
-    to allow the smoothness to be chosen by GCV.
+    the method used for smoothing the ridge functions.  The default is
+    to use Friedman's super smoother \code{\link{supsmu}}.  The
+    alternatives are to use the smoothing spline code underlying
+    \code{\link{smooth.spline}}, either with a specified (equivalent)
+    degrees of freedom for each ridge functions, or to allow the
+    smoothness to be chosen by GCV.
+
+    Can be abbreviated.
   }
   \item{bass}{
     super smoother bass tone control used with automatic span selection
@@ -86,7 +86,7 @@ ppr(x, \dots)
     resulting in increased smoothing.
   }
   \item{span}{
-    super smoother span control (see \code{supsmu}).  The default, \code{0},
+    super smoother span control (see \code{\link{supsmu}}).  The default, \code{0},
     results in automatic span selection by local cross validation. \code{span}
     can also take a value in \code{(0, 1]}.
   }
@@ -98,6 +98,9 @@ ppr(x, \dots)
     if \code{sm.method} is \code{"gcvspline"} this is the penalty used
     in the GCV selection for each degree of freedom used.
   }
+  \item{trace}{logical indicating if each spline fit should produce
+    diagnostic output (about \code{lambda} and \code{df}), and the
+    supsmu fit about its steps.}
   \item{\dots}{arguments to be passed to or from other methods.}
   \item{model}{logical.  If true, the model frame is returned.}
 }
@@ -199,7 +202,7 @@ summary(rock.ppr)
 # .....  (same as above)
 # .....
 #
-# Projection direction vectors:
+# Projection direction vectors ('alpha'):
 #       term 1      term 2
 # area1  0.34357179  0.37071027
 # peri1 -0.93781471 -0.61923542
diff --git a/src/library/stats/man/prcomp.Rd b/src/library/stats/man/prcomp.Rd
index 06b0943..e27630e 100644
--- a/src/library/stats/man/prcomp.Rd
+++ b/src/library/stats/man/prcomp.Rd
@@ -1,9 +1,10 @@
 % File src/library/stats/man/prcomp.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2012 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2016 R Core Team
 % Distributed under GPL 2 or later
 
 \name{prcomp}
+\title{Principal Components Analysis}
 \alias{prcomp}
 \alias{prcomp.formula}
 \alias{prcomp.default}
@@ -13,7 +14,6 @@
 \alias{summary.prcomp}
 \alias{print.summary.prcomp}
 \concept{PCA}
-\title{Principal Components Analysis}
 \description{
   Performs a principal components analysis on the given data matrix
   and returns the results as an object of class \code{prcomp}.}
@@ -23,7 +23,7 @@ prcomp(x, \dots)
 \method{prcomp}{formula}(formula, data = NULL, subset, na.action, \dots)
 
 \method{prcomp}{default}(x, retx = TRUE, center = TRUE, scale. = FALSE,
-       tol = NULL, \dots)
+       tol = NULL, rank. = NULL, \dots)
 
 \method{predict}{prcomp}(object, newdata, \dots)
 }
@@ -41,7 +41,7 @@ prcomp(x, \dots)
     the \code{na.action} setting of \code{\link{options}}, and is
     \code{\link{na.fail}} if that is unset. The \sQuote{factory-fresh}
     default is \code{\link{na.omit}}.}
-  \item{\dots}{arguments passed to or from other methods. If \code{x} is
+  \item{\dots}{arguments passed to or from other methods.  If \code{x} is
     a formula one might specify \code{scale.} or \code{tol}.}
   \item{x}{a numeric or complex matrix (or data frame) which provides
     the data for the principal components analysis.}
@@ -53,19 +53,24 @@ prcomp(x, \dots)
     The value is passed to \code{scale}.}
   \item{scale.}{a logical value indicating whether the variables should
     be scaled to have unit variance before the analysis takes
-    place. The default is \code{FALSE} for consistency with S, but
+    place.  The default is \code{FALSE} for consistency with S, but
     in general scaling is advisable.  Alternatively, a vector of length
     equal the number of columns of \code{x} can be supplied.  The
     value is passed to \code{\link{scale}}.}
   \item{tol}{a value indicating the magnitude below which components
     should be omitted. (Components are omitted if their
     standard deviations are less than or equal to \code{tol} times the
-    standard deviation of the first component.)
-    With the default null setting, no components
-    are omitted.  Other settings for tol could be \code{tol = 0} or
-    \code{tol = sqrt(.Machine$double.eps)}, which would omit
-    essentially constant components.}
-  \item{object}{Object of class inheriting from \code{"prcomp"}}
+    standard deviation of the first component.)  With the default null
+    setting, no components are omitted (unless \code{rank.} is specified
+    less than \code{min(dim(x))}.).  Other settings for tol could be
+    \code{tol = 0} or \code{tol = sqrt(.Machine$double.eps)}, which
+    would omit essentially constant components.}
+  \item{rank.}{optionally, a number specifying the maximal rank, i.e.,
+    maximal number of principal components to be used.  Can be set as
+    alternative or in addition to \code{tol}, useful notably when the
+    desired rank is considerably smaller than the dimensions of the matrix.}
+
+  \item{object}{object of class inheriting from \code{"prcomp"}}
   \item{newdata}{An optional data frame or matrix in which to look for
     variables with which to predict.  If omitted, the scores are used.
     If the original fit used a formula or a data frame or a matrix with
@@ -127,9 +132,23 @@ prcomp(x, \dots)
   \code{\link{princomp}}, \code{\link{cor}}, \code{\link{cov}},
   \code{\link{svd}}, \code{\link{eigen}}.
 }
-\examples{\donttest{## signs are random
-require(graphics)
+\examples{
+C <- chol(S <- toeplitz(.9 ^ (0:31))) # Cov.matrix and its root
+all.equal(S, crossprod(C))
+set.seed(17)
+X <- matrix(rnorm(32000), 1000, 32)
+Z <- X \%*\% C  ## ==>  cov(Z) ~=  C'C = S
+all.equal(cov(Z), S, tol = 0.08)
+pZ <- prcomp(Z, tol = 0.1)
+summary(pZ) # only ~14 PCs (out of 32)
+## or choose only 3 PCs more directly:
+pz3 <- prcomp(Z, rank. = 3)
+summary(pz3) # same numbers as the first 3 above
+stopifnot(ncol(pZ$rotation) == 14, ncol(pz3$rotation) == 3,
+          all.equal(pz3$sdev, pZ$sdev, tol = 1e-15)) # exactly equal typically
 
+\donttest{## signs are random
+require(graphics)
 ## the variances of the variables in the
 ## USArrests data vary by orders of magnitude, so scaling is appropriate
 prcomp(USArrests)  # inappropriate
@@ -138,5 +157,6 @@ prcomp(~ Murder + Assault + Rape, data = USArrests, scale = TRUE)
 plot(prcomp(USArrests))
 summary(prcomp(USArrests, scale = TRUE))
 biplot(prcomp(USArrests, scale = TRUE))
-}}
+}
+}
 \keyword{multivariate}
diff --git a/src/library/stats/man/predict.HoltWinters.Rd b/src/library/stats/man/predict.HoltWinters.Rd
index d837438..fda4852 100644
--- a/src/library/stats/man/predict.HoltWinters.Rd
+++ b/src/library/stats/man/predict.HoltWinters.Rd
@@ -1,5 +1,5 @@
 % File src/library/stats/man/predict.HoltWinters.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2009 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/stats/man/predict.Rd b/src/library/stats/man/predict.Rd
index 60d9821..65ce2d6 100644
--- a/src/library/stats/man/predict.Rd
+++ b/src/library/stats/man/predict.Rd
@@ -1,6 +1,6 @@
 % File src/library/stats/man/predict.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2014 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2017 R Core Team
 % Distributed under GPL 2 or later
 
 \name{predict}
@@ -64,16 +64,19 @@ predict (object, \dots)
   Wadsworth & Brooks/Cole.
 }
 \examples{
-\testonly{old <- Sys.setlocale("LC_COLLATE", "C")}
+\dontshow{old <- Sys.setlocale("LC_COLLATE", "C")}
 require(utils)
 
 ## All the "predict" methods found
 ## NB most of the methods in the standard packages are hidden.
+## Output will depend on what namespaces are (or have been) loaded.
+## IGNORE_RDIFF_BEGIN
 for(fn in methods("predict"))
    try({
        f <- eval(substitute(getAnywhere(fn)$objs[[1]], list(fn = fn)))
        cat(fn, ":\n\t", deparse(args(f)), "\n")
        }, silent = TRUE)
-\testonly{old <- Sys.setlocale("LC_COLLATE", old)}
+## IGNORE_RDIFF_END
+\dontshow{old <- Sys.setlocale("LC_COLLATE", old)}
 }
 \keyword{methods}
diff --git a/src/library/stats/man/predict.arima.Rd b/src/library/stats/man/predict.arima.Rd
index 668e7c5..0186a0a 100644
--- a/src/library/stats/man/predict.arima.Rd
+++ b/src/library/stats/man/predict.arima.Rd
@@ -1,10 +1,8 @@
 % File src/library/stats/man/predict.arima.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2007 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2014 R Core Team
 % Distributed under GPL 2 or later
 
-\newcommand{\sspace}{\ifelse{latex}{\out{~}}{ }}
-
 \name{predict.Arima}
 \alias{predict.Arima}
 \title{Forecast from ARIMA fits}
diff --git a/src/library/stats/man/predict.glm.Rd b/src/library/stats/man/predict.glm.Rd
index 5de66ff..5c3ffe2 100644
--- a/src/library/stats/man/predict.glm.Rd
+++ b/src/library/stats/man/predict.glm.Rd
@@ -1,5 +1,5 @@
 % File src/library/stats/man/predict.glm.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2013 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/stats/man/predict.lm.Rd b/src/library/stats/man/predict.lm.Rd
index 11d2ebb..16b1344 100644
--- a/src/library/stats/man/predict.lm.Rd
+++ b/src/library/stats/man/predict.lm.Rd
@@ -1,6 +1,6 @@
 % File src/library/stats/man/predict.lm.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2014 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2015 R Core Team
 % Distributed under GPL 2 or later
 
 \name{predict.lm}
@@ -25,17 +25,17 @@
   \item{se.fit}{A switch indicating if standard errors are required.}
   \item{scale}{Scale parameter for std.err. calculation.}
   \item{df}{Degrees of freedom for scale.}
-  \item{interval}{Type of interval calculation.}
+  \item{interval}{Type of interval calculation.  Can be abbreviated.}
   \item{level}{Tolerance/confidence level.}
-  \item{type}{Type of prediction (response or model term).}
+  \item{type}{Type of prediction (response or model term).  Can be abbreviated.}
   \item{terms}{If \code{type = "terms"}, which terms (default is all
     terms), a \code{\link{character}} vector.}
   \item{na.action}{function determining what should be done with missing
     values in \code{newdata}.  The default is to predict \code{NA}.}
   \item{pred.var}{the variance(s) for future observations to be assumed
     for prediction intervals.  See \sQuote{Details}.}
-  \item{weights}{variance weights for prediction. This can be a numeric
-    vector or a one-sided model formula. In the latter case, it is
+  \item{weights}{variance weights for prediction.  This can be a numeric
+    vector or a one-sided model formula.  In the latter case, it is
     interpreted as an expression evaluated in \code{newdata}.}
   \item{\dots}{further arguments passed to or from other methods.}
 }
@@ -66,15 +66,14 @@
 
   The prediction intervals are for a single observation at each case in
   \code{newdata} (or by default, the data used for the fit) with error
-  variance(s) \code{pred.var}. This can be a multiple of \code{res.var},
-  the estimated
-  value of \eqn{\sigma^2}: the default is to assume that future
-  observations have the same error variance as those
-  used for fitting. If \code{weights} is supplied, the inverse of this
-  is used as a scale factor. For a weighted fit, if the prediction
+  variance(s) \code{pred.var}.  This can be a multiple of \code{res.var},
+  the estimated value of \eqn{\sigma^2}: the default is to assume that
+  future observations have the same error variance as those
+  used for fitting.  If \code{weights} is supplied, the inverse of this
+  is used as a scale factor.  For a weighted fit, if the prediction
   is for the original data frame, \code{weights} defaults to the weights
   used for the  model fit, with a warning since it might not be the
-  intended result. If the fit was weighted and \code{newdata} is given, the
+  intended result.  If the fit was weighted and \code{newdata} is given, the
   default is to assume constant prediction variance, with a warning.
 }
 \value{
@@ -100,7 +99,7 @@
 
   Notice that prediction variances and prediction intervals always refer
   to \emph{future} observations, possibly corresponding to the same
-  predictors as used for the fit. The variance of the \emph{residuals}
+  predictors as used for the fit.  The variance of the \emph{residuals}
   will be smaller.
 
   Strictly speaking, the formula used for prediction limits assumes that
diff --git a/src/library/stats/man/predict.loess.Rd b/src/library/stats/man/predict.loess.Rd
index 1de7742..ca42eb6 100644
--- a/src/library/stats/man/predict.loess.Rd
+++ b/src/library/stats/man/predict.loess.Rd
@@ -1,6 +1,6 @@
 % File src/library/stats/man/predict.loess.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2010 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2014 R Core Team
 % Distributed under GPL 2 or later
 
 \name{predict.loess}
diff --git a/src/library/stats/man/predict.nls.Rd b/src/library/stats/man/predict.nls.Rd
index 67a9450..1d99b22 100644
--- a/src/library/stats/man/predict.nls.Rd
+++ b/src/library/stats/man/predict.nls.Rd
@@ -1,5 +1,5 @@
 % File src/library/stats/man/predict.nls.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2007 R Core Team
 % Distributed under GPL 2 or later
 
@@ -72,7 +72,7 @@
   if it was supplied.
 }
 \examples{
-\testonly{od <- options(digits = 5)}
+\dontshow{od <- options(digits = 5)}
 require(graphics)
 
 fm <- nls(demand ~ SSasympOrig(Time, A, lrc), data = BOD)
@@ -85,7 +85,7 @@ plot(demand ~ Time, data = BOD, col = 4,
 tt <- seq(0, 8, length = 101)
 lines(tt, predict(fm, list(Time = tt)))
 par(opar)
-\testonly{options(od)}
+\dontshow{options(od)}
 }
 \keyword{nonlinear}
 \keyword{regression}
diff --git a/src/library/stats/man/predict.smooth.spline.Rd b/src/library/stats/man/predict.smooth.spline.Rd
index b8f0cb7..60d4837 100644
--- a/src/library/stats/man/predict.smooth.spline.Rd
+++ b/src/library/stats/man/predict.smooth.spline.Rd
@@ -1,5 +1,5 @@
 % File src/library/stats/man/predict.smooth.spline.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2007 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/stats/man/preplot.Rd b/src/library/stats/man/preplot.Rd
index 179ce9f..defed20 100644
--- a/src/library/stats/man/preplot.Rd
+++ b/src/library/stats/man/preplot.Rd
@@ -1,5 +1,5 @@
 % File src/library/stats/man/preplot.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2007 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/stats/man/princomp.Rd b/src/library/stats/man/princomp.Rd
index a1ecb41..f544849 100644
--- a/src/library/stats/man/princomp.Rd
+++ b/src/library/stats/man/princomp.Rd
@@ -1,10 +1,8 @@
 % File src/library/stats/man/princomp.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2013 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2014 R Core Team
 % Distributed under GPL 2 or later
 
-\newcommand{\CRANpkg}{\href{http://CRAN.R-project.org/package=#1}{\pkg{#1}}}
-
 \name{princomp}
 \alias{princomp}
 \alias{princomp.formula}
diff --git a/src/library/stats/man/print.power.htest.Rd b/src/library/stats/man/print.power.htest.Rd
index 83c1afa..08c6d80 100644
--- a/src/library/stats/man/print.power.htest.Rd
+++ b/src/library/stats/man/print.power.htest.Rd
@@ -1,22 +1,33 @@
 % File src/library/stats/man/print.power.htest.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2007 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2015 R Core Team
 % Distributed under GPL 2 or later
 
 \name{print.power.htest}
+\title{Print Methods for Hypothesis Tests and Power Calculation Objects}
+\alias{print.htest}
 \alias{print.power.htest}
-\title{Print method for power calculation object}
 \description{
-  Print object of class \code{"power.htest"} in nice layout.
+  Printing objects of class \code{"htest"} or \code{"power.htest"},
+  respectively, by simple \code{\link{print}} methods.
 }
 \usage{
-\method{print}{power.htest}(x, \dots)
+\method{print}{htest}(x, digits = getOption("digits"), prefix = "\t", \dots)
+
+\method{print}{power.htest}(x, digits = getOption("digits"), \dots)
 }
 \arguments{
-  \item{x}{Object of class \code{"power.htest"}.}
+  \item{x}{object of class \code{"htest"} or \code{"power.htest"}.}
+  \item{digits}{number of significant digits to be used.}
+  \item{prefix}{string, passed to \code{\link{strwrap}} for displaying
+    the \code{method} component of the \code{htest} object.}
   \item{\dots}{further arguments to be passed to or from methods.}
 }
 \details{
+  Both \code{\link{print}} methods traditionally have not obeyed the
+  \code{digits} argument properly.  They now do, the \code{htest}
+  method mostly in expressions like \code{max(1, digits - 2)}.
+
   A \code{power.htest} object is just a named list of numbers and
   character strings, supplemented with \code{method} and \code{note}
   elements.  The \code{method} is displayed as a title, the \code{note}
@@ -24,12 +35,18 @@
   \sQuote{name = value} format.
 }
 \value{
-  none
+  the argument \code{x}, invisibly, as for all \code{\link{print}}
+  methods.
 }
-\author{Peter Dalgaard}
+\author{Peter Dalgaard}% and MMaechler for 'digits'
 
 \seealso{
   \code{\link{power.t.test}},
   \code{\link{power.prop.test}}
 }
+\examples{
+(ptt <- power.t.test(n = 20, delta = 1))
+print(ptt, digits =  4) # using less digits than default
+print(ptt, digits = 12) # using more  "       "     "
+}
 \keyword{htest}
diff --git a/src/library/stats/man/print.ts.Rd b/src/library/stats/man/print.ts.Rd
index 5082740..297a530 100644
--- a/src/library/stats/man/print.ts.Rd
+++ b/src/library/stats/man/print.ts.Rd
@@ -1,6 +1,6 @@
 % File src/library/stats/man/print.ts.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2007 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2014 R Core Team
 % Distributed under GPL 2 or later
 
 \name{print.ts}
diff --git a/src/library/stats/man/printCoefmat.Rd b/src/library/stats/man/printCoefmat.Rd
index b94fdd6..39e37cb 100644
--- a/src/library/stats/man/printCoefmat.Rd
+++ b/src/library/stats/man/printCoefmat.Rd
@@ -1,6 +1,6 @@
 % File src/library/stats/man/printCoefmat.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2013 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2016 R Core Team
 % Distributed under GPL 2 or later
 
 \name{printCoefmat}
@@ -21,7 +21,7 @@ printCoefmat(x, digits = max(3, getOption("digits") - 2),
              cs.ind = 1L:k, tst.ind = k + 1L,
              zap.ind = integer(), P.values = NULL,
              has.Pvalue = nc >= 4L &&
-                          substr(colnames(x)[nc], 1L, 3L) == "Pr(",
+                          substr(colnames(x)[nc], 1L, 3L) \%in\% c("Pr(", "p-v"),
              eps.Pvalue = .Machine$double.eps,
              na.print = "NA", \dots)
 }
diff --git a/src/library/stats/man/profile.Rd b/src/library/stats/man/profile.Rd
index 5ad81a4..5db229a 100644
--- a/src/library/stats/man/profile.Rd
+++ b/src/library/stats/man/profile.Rd
@@ -1,10 +1,8 @@
 % File src/library/stats/man/profile.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2007 R Core Team
 % Distributed under GPL 2 or later
 
-\newcommand{\CRANpkg}{\href{http://CRAN.R-project.org/package=#1}{\pkg{#1}}}
-
 \name{profile}
 \alias{profile}
 \title{Generic Function for Profiling Models}
diff --git a/src/library/stats/man/profile.nls.Rd b/src/library/stats/man/profile.nls.Rd
index fde75bf..9ee3a68 100644
--- a/src/library/stats/man/profile.nls.Rd
+++ b/src/library/stats/man/profile.nls.Rd
@@ -1,5 +1,5 @@
 % File src/library/stats/man/profile.nls.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2008 R Core Team
 % Distributed under GPL 2 or later
 
@@ -51,7 +51,7 @@
   \code{\link{nls}}, \code{\link{profile}}, \code{\link{plot.profile.nls}}
 }
 \examples{
-\testonly{od <- options(digits = 4)}
+\dontshow{od <- options(digits = 4)}
 # obtain the fitted object
 fm1 <- nls(demand ~ SSasympOrig(Time, A, lrc), data = BOD)
 # get the profile for the fitted model: default level is too extreme
@@ -60,7 +60,7 @@ pr1 <- profile(fm1, alpha = 0.05)
 pr1$A
 pr1$lrc
 # see also example(plot.profile.nls)
-\testonly{options(od)}
+\dontshow{options(od)}
 }
 \keyword{nonlinear}
 \keyword{regression}
diff --git a/src/library/stats/man/proj.Rd b/src/library/stats/man/proj.Rd
index 9a0d562..30b8b68 100644
--- a/src/library/stats/man/proj.Rd
+++ b/src/library/stats/man/proj.Rd
@@ -1,6 +1,6 @@
 % File src/library/stats/man/proj.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2007 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2014 R Core Team
 % Distributed under GPL 2 or later
 
 \name{proj}
diff --git a/src/library/stats/man/prop.test.Rd b/src/library/stats/man/prop.test.Rd
index ef08f3d..b1a6c4b 100644
--- a/src/library/stats/man/prop.test.Rd
+++ b/src/library/stats/man/prop.test.Rd
@@ -1,5 +1,5 @@
 % File src/library/stats/man/prop.test.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2010 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/stats/man/prop.trend.test.Rd b/src/library/stats/man/prop.trend.test.Rd
index 4605ac2..eafb6aa 100644
--- a/src/library/stats/man/prop.trend.test.Rd
+++ b/src/library/stats/man/prop.trend.test.Rd
@@ -1,5 +1,5 @@
 % File src/library/stats/man/prop.trend.test.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2009 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/stats/man/qqnorm.Rd b/src/library/stats/man/qqnorm.Rd
index 04977bb..d89b48f 100644
--- a/src/library/stats/man/qqnorm.Rd
+++ b/src/library/stats/man/qqnorm.Rd
@@ -1,5 +1,5 @@
 % File src/library/stats/man/qqnorm.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2012 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/stats/man/quade.test.Rd b/src/library/stats/man/quade.test.Rd
index fda558c..f58cb56 100644
--- a/src/library/stats/man/quade.test.Rd
+++ b/src/library/stats/man/quade.test.Rd
@@ -1,5 +1,5 @@
 % File src/library/stats/man/quade.test.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2013 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/stats/man/quantile.Rd b/src/library/stats/man/quantile.Rd
index bcf6ef3..e9c5ac2 100644
--- a/src/library/stats/man/quantile.Rd
+++ b/src/library/stats/man/quantile.Rd
@@ -1,10 +1,8 @@
 % File src/library/stats/man/quantile.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2013 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2017 R Core Team
 % Distributed under GPL 2 or later
 
-\newcommand{\sspace}{\ifelse{latex}{\out{~}}{ }}
-
 \name{quantile}
 \title{Sample Quantiles}
 \alias{quantile}
@@ -161,10 +159,12 @@ quantile(x <- rnorm(1001)) # Extremes & Quartiles by default
 quantile(x,  probs = c(0.1, 0.5, 1, 2, 5, 10, 50, NA)/100)
 
 ### Compare different types
+quantAll <- function(x, prob, ...)
+  t(vapply(1:9, function(typ) quantile(x, prob=prob, type = typ, ...), quantile(x, prob, type=1)))
 p <- c(0.1, 0.5, 1, 2, 5, 10, 50)/100
-res <- matrix(as.numeric(NA), 9, 7)
-for(type in 1:9) res[type, ] <- y <- quantile(x,  p, type = type)
-dimnames(res) <- list(1:9, names(y))
-round(res, 3)
+signif(quantAll(x, p), 4)
+## for complex numbers:
+z <- complex(re=x, im = -10*x)
+signif(quantAll(z, p), 4)
 }
 \keyword{univar}
diff --git a/src/library/stats/man/r2dtable.Rd b/src/library/stats/man/r2dtable.Rd
index 8914d99..739ec00 100644
--- a/src/library/stats/man/r2dtable.Rd
+++ b/src/library/stats/man/r2dtable.Rd
@@ -1,5 +1,5 @@
 % File src/library/stats/man/r2dtable.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2007 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/stats/man/rWishart.Rd b/src/library/stats/man/rWishart.Rd
index 65aabf6..3658dfa 100644
--- a/src/library/stats/man/rWishart.Rd
+++ b/src/library/stats/man/rWishart.Rd
@@ -1,5 +1,5 @@
 % File src/library/stats/man/rWishart.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 2012-2014 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/stats/man/read.ftable.Rd b/src/library/stats/man/read.ftable.Rd
index 9101849..b4ad4ad 100644
--- a/src/library/stats/man/read.ftable.Rd
+++ b/src/library/stats/man/read.ftable.Rd
@@ -1,5 +1,5 @@
 % File src/library/stats/man/read.ftable.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2014 R Core Team
 % Copyright 2002-2013 The R Foundation
 % Distributed under GPL 2 or later
@@ -50,7 +50,7 @@ write.ftable(x, file = "", quote = TRUE, append = FALSE,
     use for (the cell entries of) \code{x}.}
   \item{method}{string specifying how the \code{"ftable"} object is formatted
     (and printed if used as in \code{write.ftable()} or the \code{print}
-    method).  Available methods are (see the examples):
+    method).  Can be abbreviated.  Available methods are (see the examples):
     \describe{
       \item{"non.compact"}{the default representation of an
         \code{"ftable"} object.}
diff --git a/src/library/stats/man/rect.hclust.Rd b/src/library/stats/man/rect.hclust.Rd
index 51ce1af..901addf 100644
--- a/src/library/stats/man/rect.hclust.Rd
+++ b/src/library/stats/man/rect.hclust.Rd
@@ -1,5 +1,5 @@
 % File src/library/stats/man/rect.hclust.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2007 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/stats/man/relevel.Rd b/src/library/stats/man/relevel.Rd
index 0aa5103..8ca286c 100644
--- a/src/library/stats/man/relevel.Rd
+++ b/src/library/stats/man/relevel.Rd
@@ -1,6 +1,6 @@
 % File src/library/stats/man/relevel.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2007 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2007, 2016 R Core Team
 % Distributed under GPL 2 or later
 
 \name{relevel}
@@ -13,9 +13,9 @@
 relevel(x, ref, \dots)
 }
 \arguments{
-    \item{x}{An unordered factor.}
-    \item{ref}{The reference level.}
-    \item{\dots}{Additional arguments for future methods.}
+  \item{x}{an unordered factor.}
+  \item{ref}{the reference level, typically a string.}
+  \item{\dots}{additional arguments for future methods.}
 }
 \description{
     The levels of a factor are re-ordered so that the level specified by
@@ -26,7 +26,10 @@ relevel(x, ref, \dots)
 \value{
   A factor of the same length as \code{x}.
 }
-
+\details{
+  This, as \code{\link{reorder}()}, is a special case of simply calling
+  \code{\link{factor}(x, levels = levels(x)[....])}.
+}
 \seealso{
   \code{\link{factor}}, \code{\link{contr.treatment}},
   \code{\link{levels}}, \code{\link{reorder}}.
diff --git a/src/library/stats/man/reorder.dendrogram.Rd b/src/library/stats/man/reorder.dendrogram.Rd
index dc6aee6..2f331ef 100644
--- a/src/library/stats/man/reorder.dendrogram.Rd
+++ b/src/library/stats/man/reorder.dendrogram.Rd
@@ -1,5 +1,5 @@
 % File src/library/stats/man/reorder.dendrogram.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2007 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/stats/man/reorder.factor.Rd b/src/library/stats/man/reorder.factor.Rd
index 205d4e7..dd24ab1 100644
--- a/src/library/stats/man/reorder.factor.Rd
+++ b/src/library/stats/man/reorder.factor.Rd
@@ -1,6 +1,6 @@
 % File src/library/stats/man/reorder.factor.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2007 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2016 R Core Team
 % Distributed under GPL 2 or later
 
 \name{reorder.default}
@@ -21,20 +21,18 @@ reorder(x, \dots)
 
 }
 \arguments{
-  \item{x}{
-    An atomic vector, usually a factor (possibly ordered).  The vector
-    is treated as a categorical variable whose levels will be reordered.
-    If \code{x} is not a factor, its unique values will be used as
-    the implicit levels.
+  \item{x}{an atomic vector, usually a \code{\link{factor}} (possibly
+    ordered).  The vector is treated as a categorical variable whose
+    levels will be reordered.  If \code{x} is not a factor, its unique
+    values will be used as the implicit levels.
   }
   \item{X}{ a vector of the same length as \code{x}, whose subset
     of values for each unique level of \code{x} determines the
     eventual order of that level.
   }
-  \item{FUN}{ a function whose first argument is a vector and
-    returns a scalar, to be applied to each subset of \code{X}
-    determined by the levels of \code{x}.
-  }
+  \item{FUN}{a \code{\link{function}} whose first argument is a vector
+    and returns a scalar, to be applied to each subset of \code{X}
+    determined by the levels of \code{x}.}
   \item{\dots}{ optional: extra arguments supplied to \code{FUN}}
   \item{order}{ logical, whether return value will be an ordered factor
     rather than a factor.
@@ -52,7 +50,10 @@ reorder(x, \dots)
   \code{X} (in the original order of the levels of \code{x}) is returned
   as the \code{"scores"} attribute.
 }
-
+\details{
+  This, as \code{\link{relevel}()}, is a special case of simply calling
+  \code{\link{factor}(x, levels = levels(x)[....])}.
+}
 \author{Deepayan Sarkar \email{deepayan.sarkar at r-project.org}}
 
 \seealso{
diff --git a/src/library/stats/man/replications.Rd b/src/library/stats/man/replications.Rd
index 0c5e628..ea23e09 100644
--- a/src/library/stats/man/replications.Rd
+++ b/src/library/stats/man/replications.Rd
@@ -1,6 +1,6 @@
 % File src/library/stats/man/replications.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2007 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2014 R Core Team
 % Distributed under GPL 2 or later
 
 \name{replications}
diff --git a/src/library/stats/man/reshape.Rd b/src/library/stats/man/reshape.Rd
index 5347e1f..222abce 100644
--- a/src/library/stats/man/reshape.Rd
+++ b/src/library/stats/man/reshape.Rd
@@ -1,5 +1,5 @@
 % File src/library/stats/man/reshape.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2012 R Core Team
 % Distributed under GPL 2 or later
 
@@ -47,8 +47,9 @@ reshape(data, varying = NULL, v.names = NULL, timevar = "time",
   \item{times}{the values to use for a newly created \code{timevar}
     variable in long format.  See \sQuote{Details}.}
   \item{drop}{a vector of names of variables to drop before reshaping.}
-  \item{direction}{character string, either \code{"wide"} to reshape to
-    wide format, or \code{"long"} to reshape to long format.}
+  \item{direction}{character string, partially matched to either
+    \code{"wide"} to reshape to wide format, or \code{"long"} to reshape
+    to long format.}
   \item{new.row.names}{character or \code{NULL}: a non-null value will be
     used for the row names of the result.}
   \item{sep}{A character vector of length 1, indicating a separating
diff --git a/src/library/stats/man/residuals.Rd b/src/library/stats/man/residuals.Rd
index 2db475f..33a3013 100644
--- a/src/library/stats/man/residuals.Rd
+++ b/src/library/stats/man/residuals.Rd
@@ -1,5 +1,5 @@
 % File src/library/stats/man/residuals.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2013 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/stats/man/runmed.Rd b/src/library/stats/man/runmed.Rd
index b097a7c..b7e08b8 100644
--- a/src/library/stats/man/runmed.Rd
+++ b/src/library/stats/man/runmed.Rd
@@ -1,5 +1,5 @@
 % File src/library/stats/man/runmed.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2012 R Core Team
 % Distributed under GPL 2 or later
 
@@ -26,6 +26,7 @@ runmed(x, k, endrule = c("median", "keep", "constant"),
     isolated outliers.}
   \item{endrule}{character string indicating how the values at the
     beginning and the end (of the data) should be treated.
+    Can be abbreviated.  Possible values are:
     \describe{
       \item{\code{"keep"}}{keeps the first and last \eqn{k_2}{k2} values
         at both ends, where \eqn{k_2}{k2} is the half-bandwidth
diff --git a/src/library/stats/man/scatter.smooth.Rd b/src/library/stats/man/scatter.smooth.Rd
index 03c9842..fec2402 100644
--- a/src/library/stats/man/scatter.smooth.Rd
+++ b/src/library/stats/man/scatter.smooth.Rd
@@ -1,5 +1,5 @@
 % File src/library/stats/man/scatter.smooth.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2012 R Core Team
 % Distributed under GPL 2 or later
 
@@ -28,7 +28,8 @@ loess.smooth(x, y, span = 2/3, degree = 1,
   \item{span}{smoothness parameter for \code{loess}.}
   \item{degree}{degree of local polynomial used.}
   \item{family}{if \code{"gaussian"} fitting is by least-squares, and if
-    \code{family = "symmetric"} a re-descending M estimator is used.}
+    \code{family = "symmetric"} a re-descending M estimator is used.
+    Can be abbreviated.}
   \item{xlab}{label for x axis.}
   \item{ylab}{label for y axis.}
   \item{ylim}{the y limits of the plot.}
diff --git a/src/library/stats/man/screeplot.Rd b/src/library/stats/man/screeplot.Rd
index f951f1a..b41d75d 100644
--- a/src/library/stats/man/screeplot.Rd
+++ b/src/library/stats/man/screeplot.Rd
@@ -1,5 +1,5 @@
 % File src/library/stats/man/screeplot.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2007 R Core Team
 % Distributed under GPL 2 or later
 
@@ -16,7 +16,7 @@
   \item{x}{an object containing a \code{sdev} component, such as that
     returned by \code{\link{princomp}()} and \code{\link{prcomp}()}.}
   \item{npcs}{the number of components to be plotted.}
-  \item{type}{the type of plot.}
+  \item{type}{the type of plot.  Can be abbreviated.}
   \item{main, \dots}{graphics parameters.}
 }
 \description{
diff --git a/src/library/stats/man/sd.Rd b/src/library/stats/man/sd.Rd
index e2e2fe7..c27e9eb 100644
--- a/src/library/stats/man/sd.Rd
+++ b/src/library/stats/man/sd.Rd
@@ -1,6 +1,6 @@
 % File src/library/stats/man/sd.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2013 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2015 R Core Team
 % Distributed under GPL 2 or later
 
 \name{sd}
@@ -17,7 +17,7 @@ sd(x, na.rm = FALSE)
 }
 \arguments{
   \item{x}{a numeric vector or an \R object which is coercible to one
-    by \code{as.vector(x, "numeric")}.}
+    by \code{as.double(x)}.}
   \item{na.rm}{logical.  Should missing values be removed?}
 }
 \details{
diff --git a/src/library/stats/man/se.contrast.Rd b/src/library/stats/man/se.contrast.Rd
index e1478b7..cf046f6 100644
--- a/src/library/stats/man/se.contrast.Rd
+++ b/src/library/stats/man/se.contrast.Rd
@@ -1,6 +1,6 @@
 % File src/library/stats/man/se.contrast.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2007 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2014 R Core Team
 % Distributed under GPL 2 or later
 
 \name{se.contrast}
diff --git a/src/library/stats/man/selfStart.Rd b/src/library/stats/man/selfStart.Rd
index 7a30868..ebb2f16 100644
--- a/src/library/stats/man/selfStart.Rd
+++ b/src/library/stats/man/selfStart.Rd
@@ -1,5 +1,5 @@
 % File src/library/stats/man/selfStart.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2013 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/stats/man/setNames.Rd b/src/library/stats/man/setNames.Rd
index 8fe05cc..8650e1f 100644
--- a/src/library/stats/man/setNames.Rd
+++ b/src/library/stats/man/setNames.Rd
@@ -1,5 +1,5 @@
 % File src/library/stats/man/setNames.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2012 R Core Team
 % Copyright 2005-2012 The R Foundation
 % Distributed under GPL 2 or later
diff --git a/src/library/stats/man/shapiro.test.Rd b/src/library/stats/man/shapiro.test.Rd
index b25f265..de7c237 100644
--- a/src/library/stats/man/shapiro.test.Rd
+++ b/src/library/stats/man/shapiro.test.Rd
@@ -1,6 +1,6 @@
 % File src/library/stats/man/shapiro.test.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2007 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2016 R Core Team
 % Distributed under GPL 2 or later
 
 \name{shapiro.test}
@@ -40,7 +40,7 @@ shapiro.test(x)
 }
 \source{
   The algorithm used is a C translation of the Fortran code described in
-  Royston (1995) and found at \url{http://lib.stat.cmu.edu/apstat/R94}.
+  Royston (1995). % and was found at \url{http://lib.stat.cmu.edu/apstat/R94}.
   The calculation of the p value is exact for \eqn{n = 3}, otherwise
   approximations are used, separately for \eqn{4 \le n \le 11} and
   \eqn{n \ge 12}.
diff --git a/src/library/stats/man/sigma.Rd b/src/library/stats/man/sigma.Rd
new file mode 100644
index 0000000..39e866a
--- /dev/null
+++ b/src/library/stats/man/sigma.Rd
@@ -0,0 +1,103 @@
+\name{sigma}
+\title{Extract Residual Standard Deviation 'Sigma'}
+\alias{sigma}
+\alias{sigma.default}% lm, nls, glm
+\alias{sigma.mlm}
+\description{
+  Extract the estimated standard deviation of the errors, the
+  \dQuote{residual standard deviation} (misnomed also
+  \dQuote{residual standard error}, e.g., in
+  \code{\link{summary.lm}()}'s output, from a fitted model).
+
+  Many classical statistical models have a \emph{scale parameter},
+  typically the standard deviation of a zero-mean normal (or Gaussian)
+  random variable which is denoted as \eqn{\sigma}.
+  \code{sigma(.)} extracts the \emph{estimated} parameter from a fitted
+  model, i.e., \eqn{\hat\sigma}{sigma^}.
+}
+\usage{
+sigma(object, ...)
+
+\S3method{sigma}{default}(object, use.fallback = TRUE, ...)
+}
+\arguments{
+  \item{object}{an \R object, typically resulting from a model fitting
+    function such as \code{\link{lm}}.}
+  \item{use.fallback}{logical, passed to \code{\link{nobs}}.}
+  \item{\dots}{potentially further arguments passed to and from
+    methods.  Passed to \code{\link{deviance}(*, ...)} for the default method.}
+}
+\details{
+ The \pkg{stats} package provides the S3 generic and a default method.
+ The latter is correct typically for (asymptotically / approximately)
+ generalized gaussian (\dQuote{least squares}) problems, since it is
+ defined as \preformatted{%
+   sigma.default <- function (object, use.fallback = TRUE, ...)
+                      sqrt( deviance(object, ...) / (NN - PP) )
+ } where \code{NN <- \link{nobs}(object, use.fallback = use.fallback)}
+ and \code{PP <- length(\link{coef}(object))}.
+}
+\value{
+  typically a number, the estimated standard deviation of the
+  errors (\dQuote{residual standard deviation}) for Gaussian
+  models, and---less interpretably---the square root of the residual
+  deviance per degree of freedom in more general models.
+  In some generalized linear modelling (\code{\link{glm}}) contexts,
+  \eqn{sigma^2} (\code{sigma(.)^2}) is called \dQuote{dispersion
+    (parameter)}.  Consequently, for well-fitting binomial or Poisson
+  GLMs, \code{sigma} is around 1.
+
+  Very strictly speaking, \eqn{\hat{\sigma}}{\sigma^} (\dQuote{\eqn{\sigma} hat})
+  is actually \eqn{\sqrt{\widehat{\sigma^2}}}{\sqrt(hat(\sigma^2))}.
+
+  For multivariate linear models (class \code{"mlm"}), a \emph{vector}
+  of sigmas is returned, each corresponding to one column of \eqn{Y}.
+}
+\note{
+  The misnomer \dQuote{Residual standard \bold{error}} has been part of
+  too many \R (and S) outputs to be easily changed there.
+}
+\seealso{
+  \code{\link{deviance}}, \code{\link{nobs}}, \code{\link{vcov}}.
+}
+\examples{
+## -- lm() ------------------------------
+lm1 <- lm(Fertility ~ . , data = swiss)
+sigma(lm1) # ~= 7.165  = "Residual standard error"  printed from summary(lm1)
+stopifnot(all.equal(sigma(lm1), summary(lm1)$sigma, tol=1e-15))
+
+## -- nls() -----------------------------
+DNase1 <- subset(DNase, Run == 1)
+fm.DN1 <- nls(density ~ SSlogis(log(conc), Asym, xmid, scal), DNase1)
+sigma(fm.DN1) # ~= 0.01919  as from summary(..)
+stopifnot(all.equal(sigma(fm.DN1), summary(fm.DN1)$sigma, tol=1e-15))
+
+% example from ./predict.glm.R
+## -- glm() -----------------------------
+## -- a) Binomial -- Example from MASS
+ldose <- rep(0:5, 2)
+numdead <- c(1, 4, 9, 13, 18, 20, 0, 2, 6, 10, 12, 16)
+sex <- factor(rep(c("M", "F"), c(6, 6)))
+SF <- cbind(numdead, numalive = 20-numdead)
+sigma(budworm.lg <- glm(SF ~ sex*ldose, family = binomial))
+
+## -- b) Poisson -- from ?glm :
+## Dobson (1990) Page 93: Randomized Controlled Trial :
+counts <- c(18,17,15,20,10,20,25,13,12)
+outcome <- gl(3,1,9)
+treatment <- gl(3,3)
+sigma(glm.D93 <- glm(counts ~ outcome + treatment, family = poisson()))
+## (currently) *differs* from
+summary(glm.D93)$dispersion # == 1
+## and the *Quasi*poisson's dispersion
+sigma(glm.qD93 <- update(glm.D93, family = quasipoisson()))
+sigma (glm.qD93)^2 # 1.282285 is close, but not the same
+summary(glm.qD93)$dispersion # == 1.2933
+
+## -- Multivariate lm() "mlm" -----------
+utils::example("SSD", echo=FALSE)
+sigma(mlmfit) # is the same as {but more efficient than}
+sqrt(diag(estVar(mlmfit)))
+\dontshow{stopifnot(all.equal(sigma(mlmfit), sqrt(diag(estVar(mlmfit)))))}
+}
+\keyword{models}
diff --git a/src/library/stats/man/simulate.Rd b/src/library/stats/man/simulate.Rd
index d12c2d5..cee0643 100644
--- a/src/library/stats/man/simulate.Rd
+++ b/src/library/stats/man/simulate.Rd
@@ -1,10 +1,8 @@
 % File src/library/stats/man/simulate.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2011 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2014 R Core Team
 % Distributed under GPL 2 or later
 
-\newcommand{\CRANpkg}{\href{http://CRAN.R-project.org/package=#1}{\pkg{#1}}}
-
 \name{simulate}
 \title{Simulate Responses}
 \description{
@@ -73,7 +71,7 @@ simulate(object, nsim = 1, seed = NULL, \dots)
 
   For an inverse gaussian GLM the model assumed is
   \eqn{IG(\mu_i, \lambda w_i)} (see
-  \url{http://en.wikipedia.org/wiki/Inverse_Gaussian_distribution})
+  \url{https://en.wikipedia.org/wiki/Inverse_Gaussian_distribution})
   where \eqn{\lambda} is estimated by the inverse of the dispersion
   estimate for the fit.  The variance is
   \eqn{\mu_i^3/(\lambda w_i)} and
diff --git a/src/library/stats/man/smooth.Rd b/src/library/stats/man/smooth.Rd
index babf10f..f8618d1 100644
--- a/src/library/stats/man/smooth.Rd
+++ b/src/library/stats/man/smooth.Rd
@@ -1,6 +1,6 @@
 % File src/library/stats/man/smooth.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2007 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2016 R Core Team
 % Distributed under GPL 2 or later
 
 \name{smooth}
@@ -11,7 +11,7 @@
 }
 \usage{
 smooth(x, kind = c("3RS3R", "3RSS", "3RSR", "3R", "3", "S"),
-       twiceit = FALSE, endrule = "Tukey", do.ends = FALSE)
+       twiceit = FALSE, endrule = c("Tukey", "copy"), do.ends = FALSE)
 }
 \arguments{
   \item{x}{a vector or time series}
diff --git a/src/library/stats/man/smooth.spline.Rd b/src/library/stats/man/smooth.spline.Rd
index 23fec93..cb43a79 100644
--- a/src/library/stats/man/smooth.spline.Rd
+++ b/src/library/stats/man/smooth.spline.Rd
@@ -1,21 +1,22 @@
 % File src/library/stats/man/smooth.spline.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2014 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2016 R Core Team
 % Distributed under GPL 2 or later
 
 \name{smooth.spline}
 \alias{smooth.spline}
 \alias{.nknots.smspl}
 %\alias{print.smooth.spline}% is not exported
+%\alias{hatvalues.smooth.spline}% is not exported
 \title{Fit a Smoothing Spline}
 \description{
   Fits a cubic smoothing spline to the supplied data.
 }
 \usage{
-smooth.spline(x, y = NULL, w = NULL, df, spar = NULL, cv = FALSE,
+smooth.spline(x, y = NULL, w = NULL, df, spar = NULL, lambda = NULL, cv = FALSE,
               all.knots = FALSE, nknots = .nknots.smspl,
               keep.data = TRUE, df.offset = 0, penalty = 1,
-              control.spar = list(), tol = 1e-6 * IQR(x))
+              control.spar = list(), tol = 1e-6 * IQR(x), keep.stuff = FALSE)
 }
 \arguments{
  \item{x}{a vector giving the values of the predictor variable, or  a
@@ -26,19 +27,34 @@ smooth.spline(x, y = NULL, w = NULL, df, spar = NULL, cv = FALSE,
  \item{w}{optional vector of weights of the same length as \code{x};
    defaults to all 1.}
  \item{df}{the desired equivalent number of degrees of freedom (trace of
-   the smoother matrix).}
+   the smoother matrix).  Must be in \eqn{(1,n_x]}{(1,nx]},
+   \eqn{n_x}{nx} the number of unique x values, see below.}
  \item{spar}{smoothing parameter, typically (but not necessarily) in
-   \eqn{(0,1]}.  The coefficient \eqn{\lambda} of the integral of the
-   squared second derivative in the fit (penalized log likelihood)
-   criterion is a monotone function of \code{spar}, see the details
-   below.}
- \item{cv}{ordinary (\code{TRUE}) or \sQuote{generalized} cross-validation
-   (GCV) when \code{FALSE}; setting it to \code{NA} skips the evaluation
-   of leverages and any score.}
- \item{all.knots}{if \code{TRUE}, all distinct points in \code{x} are used as
-   knots.  If \code{FALSE} (default), a subset of \code{x[]} is used,
+   \eqn{(0,1]}.  When \code{spar} is specified, the coefficient
+   \eqn{\lambda} of the integral of the squared second derivative in the
+   fit (penalized log likelihood) criterion is a monotone function of
+   \code{spar}, see the details below.  Alternatively \code{lambda} may
+   be specified instead of the \emph{scale free} \code{spar}=\eqn{s}.}
+ \item{lambda}{if desired, the internal design-dependent smoothing
+   parameter \eqn{\lambda} can be specified instead of \code{spar}.
+   This may be desirable for resampling algorithms such as cross
+   validation or the bootstrap.}
+ \item{cv}{ordinary leave-one-out (\code{TRUE}) or \sQuote{generalized}
+   cross-validation (GCV) when \code{FALSE}; is used for smoothing
+   parameter computation only when both \code{spar} and \code{df} are
+   not specified; it is used however to determine \code{cv.crit} in the
+   result.  Setting it to \code{NA} for speedup skips the evaluation of
+   leverages and any score.}
+ \item{all.knots}{if \code{TRUE}, all distinct points in \code{x} are used
+   as knots.  If \code{FALSE} (default), a subset of \code{x[]} is used,
    specifically \code{x[j]} where the \code{nknots} indices are evenly
-   spaced in \code{1:n}, see also the next argument \code{nknots}.}
+   spaced in \code{1:n}, see also the next argument \code{nknots}.
+
+   Alternatively, a strictly increasing \code{\link{numeric}} vector
+   specifying \dQuote{all the knots} to be used; must be rescaled
+   to \eqn{[0, 1]} already such that it corresponds to the
+   \code{ans $ fit$knots} sequence returned, not repeating the boundary
+   knots.}
  \item{nknots}{integer or \code{\link{function}} giving the number of
    knots to use when \code{all.knots = FALSE}.  If a function (as by
    default), the number of knots is \code{nknots(nx)}.  By default for
@@ -79,6 +95,9 @@ smooth.spline(x, y = NULL, w = NULL, df, spar = NULL, cv = FALSE,
    values.  The values are binned into bins of size \code{tol} and
    values which fall into the same bin are regarded as the same.  Must
    be strictly positive (and finite).}
+ \item{keep.stuff}{an experimental \code{\link{logical}} indicating if
+   the result should keep extras from the internal computations.  Should
+   allow to reconstruct the \eqn{X} matrix and more.}
 }
 \details{
   Neither \code{x} nor \code{y} are allowed to containing missing or
@@ -89,7 +108,8 @@ smooth.spline(x, y = NULL, w = NULL, df, spar = NULL, cv = FALSE,
   regarded as the same are replaced by the first of their values and the
   corresponding \code{y} and \code{w} are pooled accordingly.
 
-  The computational \eqn{\lambda} used (as a function of
+  Unless \code{lambda} has been specified instead of \code{lambda},
+  the computational \eqn{\lambda} used (as a function of
   \eqn{s=spar}{\code{spar}}) is
   \eqn{\lambda = r * 256^{3 s - 1}}{\lambda = r * 256^(3*spar - 1)}
   where
@@ -108,10 +128,12 @@ smooth.spline(x, y = NULL, w = NULL, df, spar = NULL, cv = FALSE,
   \eqn{c} is the solution of the (ridge regression)
   \eqn{(X' W X + \lambda \Sigma) c = X' W y}.
 
-  If \code{spar} is missing or \code{NULL}, the value of \code{df} is used to
-  determine the degree of smoothing.  If both are missing, leave-one-out
-  cross-validation (ordinary or \sQuote{generalized} as determined by
-  \code{cv}) is used to determine \eqn{\lambda}.
+  If \code{spar} and \code{lambda} are missing or \code{NULL}, the value
+  of \code{df} is used to determine the degree of smoothing.  If
+  \code{df} is missing as well, leave-one-out cross-validation (ordinary
+  or \sQuote{generalized} as determined by \code{cv}) is used to
+  determine \eqn{\lambda}.
+
   Note that from the above relation,
 %%  lam      = r * 256^(3s - 1)
 %%  log(lam) = log(r) + (3s - 1) * log(256)
@@ -131,8 +153,11 @@ smooth.spline(x, y = NULL, w = NULL, df, spar = NULL, cv = FALSE,
   happen for values larger than 2 or so. Don't think of setting
   \code{spar} or the controls \code{low} and \code{high} outside such a
   safe range, unless you know what you are doing!
+  Similarly, specifying \code{lambda} instead of \code{spar} is
+  delicate, notably as the range of \dQuote{safe} values for
+  \code{lambda} is not scale-invariant and hence entirely data dependent.
 
-  The \sQuote{generalized} cross-validation method will work correctly when
+  The \sQuote{generalized} cross-validation method GCV will work correctly when
   there are duplicated points in \code{x}.  However, it is ambiguous what
   leave-one-out cross-validation means with duplicated points, and the
   internal code uses an approximation that involves leaving out groups
@@ -162,6 +187,7 @@ smooth.spline(x, y = NULL, w = NULL, df, spar = NULL, cv = FALSE,
   \item{y}{the fitted values corresponding to \code{x}.}
   \item{w}{the weights used at the unique values of \code{x}.}
   \item{yin}{the y values used at the unique \code{y} values.}
+  \item{tol}{the \code{tol} argument (whose default depends on \code{x}).}
   \item{data}{only if \code{keep.data = TRUE}: itself a
     \code{\link{list}} with components \code{x}, \code{y} and \code{w}
     of the same length.  These are the original \eqn{(x_i,y_i,w_i),
@@ -169,26 +195,37 @@ smooth.spline(x, y = NULL, w = NULL, df, spar = NULL, cv = FALSE,
     hence be longer than the above \code{x} component; see details.
     }
   \item{lev}{(when \code{cv} was not \code{NA}) leverages, the diagonal
-  values of the smoother matrix.}
+    values of the smoother matrix.}
   \item{cv.crit}{cross-validation score, \sQuote{generalized} or true, depending
-    on \code{cv}.}
-  \item{pen.crit}{penalized criterion}
+    on \code{cv}.  The CV score is often called \dQuote{PRESS} (and
+    labeled on \code{\link{print}()}), for \sQuote{\bold{PRE}diction
+      \bold{S}um of \bold{S}quares}.}
+  \item{pen.crit}{the penalized criterion, a non-negative number; simply
+    the (weighted) residual sum of squares (RSS), \code{ sum(.$w * residuals(.)^2) }.}
   \item{crit}{the criterion value minimized in the underlying
-    \code{.Fortran} routine \file{sslvrg}.}
+    \code{.Fortran} routine \file{sslvrg}.  When \code{df} has been specified,
+    the criterion is \eqn{3 + (tr(S_\lambda) - df)^2}{3 + (tr(S[lambda]) - df)^2},
+    where the \eqn{3 +} is there for numerical (and historical) reasons.}
   \item{df}{equivalent degrees of freedom used.  Note that (currently)
     this value may become quite imprecise when the true \code{df} is
     between and 1 and 2.
   }
-  \item{spar}{the value of \code{spar} computed or given.}
+  \item{spar}{the value of \code{spar} computed or given, unless it has been
+    given as \code{c(lambda = *)}, when it set to \code{NA} here.}
+  \item{ratio}{(when \code{spar} above is not \code{NA}), the value
+    \eqn{r}, the ratio of two matrix traces.}
   \item{lambda}{the value of \eqn{\lambda} corresponding to \code{spar},
     see the details above.}
   \item{iparms}{named integer(3) vector where \code{..$ipars["iter"]}
     gives number of spar computing iterations used.}
+  \item{auxMat}{experimental; when \code{keep.stuff} was true, a
+    \dQuote{flat} numeric vector containing parts of the internal computations.}
   \item{fit}{list for use by \code{\link{predict.smooth.spline}}, with
     components
     \describe{
       \item{knot:}{the knot sequence (including the repeated boundary
-        knots).}
+        knots), scaled into \eqn{[0, 1]} (via \code{min} and
+	\code{range}).}
       \item{nk:}{number of coefficients or number of \sQuote{proper}
         knots plus 2.}
       \item{coef:}{coefficients for the spline basis used.}
@@ -197,6 +234,9 @@ smooth.spline(x, y = NULL, w = NULL, df, spar = NULL, cv = FALSE,
     }
   }
   \item{call}{the matched call.}
+
+  \code{method(class = "smooth.spline")} shows a
+  \code{\link{hatvalues}()} method based on the \code{lev} vector above.
 }
 \references{
   Chambers, J. M. and Hastie, T. J. (1992)
@@ -215,8 +255,9 @@ smooth.spline(x, y = NULL, w = NULL, df, spar = NULL, cv = FALSE,
 }
 \source{
   This function is based on code in the \code{GAMFIT} Fortran program by
-  T. Hastie and R. Tibshirani (\url{http://lib.stat.cmu.edu/general/}),
-  which makes use of spline code by Finbarr O'Sullivan.  Its design
+  T. Hastie and R. Tibshirani (originally taken from
+  \url{http://lib.stat.cmu.edu/general/gamfit})
+   which makes use of spline code by Finbarr O'Sullivan.  Its design
   parallels the \code{smooth.spline} function of Chambers & Hastie (1992).
 }
 \seealso{
@@ -225,23 +266,21 @@ smooth.spline(x, y = NULL, w = NULL, df, spar = NULL, cv = FALSE,
 }
 \examples{
 require(graphics)
-
-attach(cars)
-plot(speed, dist, main = "data(cars)  &  smoothing splines")
-cars.spl <- smooth.spline(speed, dist)
-(cars.spl)
+plot(dist ~ speed, data = cars, main = "data(cars)  &  smoothing splines")
+cars.spl <- with(cars, smooth.spline(speed, dist))
+cars.spl
 ## This example has duplicate points, so avoid cv = TRUE
 \dontshow{
-  stopifnot(cars.spl $ w == table(speed)) # weights = multiplicities
+  stopifnot(cars.spl $ w == table(cars$speed)) # weights = multiplicities
   utils::str(cars.spl, digits = 5, vec.len = 6)
   cars.spl$fit
 }
 lines(cars.spl, col = "blue")
-lines(smooth.spline(speed, dist, df = 10), lty = 2, col = "red")
+ss10 <- smooth.spline(cars[,"speed"], cars[,"dist"], df = 10)
+lines(ss10, lty = 2, col = "red")
 legend(5,120,c(paste("default [C.V.] => df =",round(cars.spl$df,1)),
                "s( * , df = 10)"), col = c("blue","red"), lty = 1:2,
        bg = 'bisque')
-detach()
 
 
 ## Residual (Tukey Anscombe) plot:
@@ -269,16 +308,21 @@ axis(4, at=.nknots.smspl(10000), line=-.5, col=c..,col.axis=c.., las=1)
 ##-- artificial example
 y18 <- c(1:3, 5, 4, 7:3, 2*(2:5), rep(10, 4))
 xx  <- seq(1, length(y18), len = 201)
-(s2  <- smooth.spline(y18)) # GCV
+(s2   <- smooth.spline(y18)) # GCV
 (s02  <- smooth.spline(y18, spar = 0.2))
 (s02. <- smooth.spline(y18, spar = 0.2, cv = NA))
 plot(y18, main = deparse(s2$call), col.main = 2)
 lines(s2, col = "gray"); lines(predict(s2, xx), col = 2)
 lines(predict(s02, xx), col = 3); mtext(deparse(s02$call), col = 3)
 
+## Specifying 'lambda' instead of usual spar :
+(s2. <- smooth.spline(y18, lambda = s2$lambda, tol = s2$tol))
+
 \dontshow{
-stopifnot(all.equal(predict(s02, xx),
-		    predict(s02., xx), tolerance = 1e-15))
+nD <- c("spar", "ratio", "iparms", "call"); nn <- setdiff(names(s2), nD)
+stopifnot(all.equal(s2[nn], s2.[nn], tol = 7e-7), # seen 6.86e-8
+          all.equal(predict(s02 , xx),
+		    predict(s02., xx), tol = 1e-15))
 }
 \donttest{
 ## The following shows the problematic behavior of 'spar' searching:
diff --git a/src/library/stats/man/smoothEnds.Rd b/src/library/stats/man/smoothEnds.Rd
index e68187a..c1cc4c0 100644
--- a/src/library/stats/man/smoothEnds.Rd
+++ b/src/library/stats/man/smoothEnds.Rd
@@ -1,5 +1,5 @@
 % File src/library/stats/man/smoothEnds.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2007 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/stats/man/sortedXyData.Rd b/src/library/stats/man/sortedXyData.Rd
index bf21d73..4adaf29 100644
--- a/src/library/stats/man/sortedXyData.Rd
+++ b/src/library/stats/man/sortedXyData.Rd
@@ -1,5 +1,5 @@
 % File src/library/stats/man/sortedXyData.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2010 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/stats/man/spec.ar.Rd b/src/library/stats/man/spec.ar.Rd
index 3c35055..fdcca53 100644
--- a/src/library/stats/man/spec.ar.Rd
+++ b/src/library/stats/man/spec.ar.Rd
@@ -1,5 +1,5 @@
 % File src/library/stats/man/spec.ar.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2007 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/stats/man/spec.pgram.Rd b/src/library/stats/man/spec.pgram.Rd
index 301fd50..ea5818f 100644
--- a/src/library/stats/man/spec.pgram.Rd
+++ b/src/library/stats/man/spec.pgram.Rd
@@ -1,10 +1,8 @@
 % File src/library/stats/man/spec.pgram.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2007 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2014 R Core Team
 % Distributed under GPL 2 or later
 
-\newcommand{\sspace}{\ifelse{latex}{\out{~}}{ }}
-
 \name{spec.pgram}
 \alias{spec.pgram}
 \title{Estimate Spectral Density of a Time Series by a Smoothed
diff --git a/src/library/stats/man/spec.taper.Rd b/src/library/stats/man/spec.taper.Rd
index 7ec4a9e..fc0dae5 100644
--- a/src/library/stats/man/spec.taper.Rd
+++ b/src/library/stats/man/spec.taper.Rd
@@ -1,5 +1,5 @@
 % File src/library/stats/man/spec.taper.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2007 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/stats/man/spectrum.Rd b/src/library/stats/man/spectrum.Rd
index 3636ac9..c4ce9a5 100644
--- a/src/library/stats/man/spectrum.Rd
+++ b/src/library/stats/man/spectrum.Rd
@@ -1,5 +1,5 @@
 % File src/library/stats/man/spectrum.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2008 R Core Team
 % Distributed under GPL 2 or later
 
@@ -18,7 +18,7 @@ spectrum(x, \dots, method = c("pgram", "ar"))
   \item{x}{A univariate or multivariate time series.}
   \item{method}{String specifying the method used to estimate the
     spectral density.  Allowed methods are \code{"pgram"} (the default)
-    and \code{"ar"}.}
+    and \code{"ar"}.  Can be abbreviated.}
   \item{\dots}{Further arguments to specific spec methods or
     \code{plot.spec}.}
 }
diff --git a/src/library/stats/man/splinefun.Rd b/src/library/stats/man/splinefun.Rd
index 276afe7..0a5fcd5 100644
--- a/src/library/stats/man/splinefun.Rd
+++ b/src/library/stats/man/splinefun.Rd
@@ -1,6 +1,6 @@
 % File src/library/stats/man/splinefun.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2012 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2017 R Core Team
 % Distributed under GPL 2 or later
 
 \name{splinefun}
@@ -36,7 +36,7 @@ splinefunH(x, y, m)
     piecewise cubic, (only) \emph{once} differentiable continuously.}
   \item{method}{specifies the type of spline to be used.  Possible
     values are \code{"fmm"}, \code{"natural"}, \code{"periodic"},
-    \code{"monoH.FC"} and \code{"hyman"}.}
+    \code{"monoH.FC"} and \code{"hyman"}.  Can be abbreviated.}
   \item{n}{if \code{xout} is left unspecified, interpolation takes place
        at \code{n} equally spaced points spanning the interval
        [\code{xmin}, \code{xmax}].}
@@ -65,7 +65,7 @@ splinefunH(x, y, m)
 
   Method \code{"hyman"} computes a \emph{monotone} cubic spline using
   Hyman filtering of an \code{method = "fmm"} fit for strictly monotonic
-  inputs.  (Added in \R 2.15.2.)
+  inputs.
 
   These interpolation splines can also be used for extrapolation, that is
   prediction at points outside the range of \code{x}.  Extrapolation
diff --git a/src/library/stats/man/start.Rd b/src/library/stats/man/start.Rd
index 889730d..242fc66 100644
--- a/src/library/stats/man/start.Rd
+++ b/src/library/stats/man/start.Rd
@@ -1,5 +1,5 @@
 % File src/library/stats/man/start.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2007 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/stats/man/stat.anova.Rd b/src/library/stats/man/stat.anova.Rd
index 84a9186..fa31580 100644
--- a/src/library/stats/man/stat.anova.Rd
+++ b/src/library/stats/man/stat.anova.Rd
@@ -1,6 +1,6 @@
 % File src/library/stats/man/stat.anova.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2007 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2015 R Core Team
 % Distributed under GPL 2 or later
 
 \name{stat.anova}
@@ -13,7 +13,7 @@ stat.anova(table, test = c("Rao","LRT", "Chisq", "F", "Cp"),
 \arguments{
  \item{table}{numeric matrix as results from
    \code{\link{anova.glm}(\dots, test = NULL)}.}
- \item{test}{a character string, matching one of \code{"Rao"},
+ \item{test}{a character string, partially matching one of \code{"Rao"},
    \code{"LRT"}, \code{"Chisq"}, \code{"F"} or \code{"Cp"}.}
  \item{scale}{a residual mean square or other scale estimate to be used
    as the denominator in an F test.}
diff --git a/src/library/stats/man/stats-defunct.Rd b/src/library/stats/man/stats-defunct.Rd
index 4e8985c..517a6e6 100644
--- a/src/library/stats/man/stats-defunct.Rd
+++ b/src/library/stats/man/stats-defunct.Rd
@@ -1,5 +1,5 @@
 % File src/library/stats/man/stats-defunct.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2013 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/stats/man/stats-deprecated.Rd b/src/library/stats/man/stats-deprecated.Rd
index e1860f2..37d3483 100644
--- a/src/library/stats/man/stats-deprecated.Rd
+++ b/src/library/stats/man/stats-deprecated.Rd
@@ -1,6 +1,6 @@
 % File src/library/stats/man/stats-deprecated.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2013 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2014 R Core Team
 % Distributed under GPL 2 or later
 
 \name{stats-deprecated}
diff --git a/src/library/stats/man/stats-package.Rd b/src/library/stats/man/stats-package.Rd
index 2ff7bc2..682f301 100644
--- a/src/library/stats/man/stats-package.Rd
+++ b/src/library/stats/man/stats-package.Rd
@@ -1,5 +1,5 @@
 % File src/library/stats/man/stats-package.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2007 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/stats/man/step.Rd b/src/library/stats/man/step.Rd
index 6e72552..b5ddd01 100644
--- a/src/library/stats/man/step.Rd
+++ b/src/library/stats/man/step.Rd
@@ -1,10 +1,8 @@
 % File src/library/stats/man/step.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2007 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2014 R Core Team
 % Distributed under GPL 2 or later
 
-\newcommand{\CRANpkg}{\href{http://CRAN.R-project.org/package=#1}{\pkg{#1}}}
-
 \name{step}
 \alias{step}
 \title{
@@ -40,7 +38,7 @@ step(object, scope, scale = 0,
     the mode of stepwise search, can be one of \code{"both"},
     \code{"backward"}, or \code{"forward"}, with a default of \code{"both"}.
     If the \code{scope} argument is missing the default for
-    \code{direction} is \code{"backward"}.
+    \code{direction} is \code{"backward"}.  Values can be abbreviated.
   }
   \item{trace}{
     if positive, information is printed during the running of \code{step}.
diff --git a/src/library/stats/man/stepfun.Rd b/src/library/stats/man/stepfun.Rd
index f4a2810..83f5eac 100644
--- a/src/library/stats/man/stepfun.Rd
+++ b/src/library/stats/man/stepfun.Rd
@@ -1,16 +1,16 @@
 % File src/library/stats/man/stepfun.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2013 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2014 R Core Team
 % Distributed under GPL 2 or later
 
 \name{stepfun}
+\title{Step Functions - Creation and Class}
 \alias{stepfun}
 \alias{is.stepfun}
 \alias{as.stepfun}
 \alias{print.stepfun}
 \alias{summary.stepfun}
 \alias{knots}
-\title{Step Function Class}
 \usage{
 stepfun(x, y, f = as.numeric(right), ties = "ordered",
         right = FALSE)
@@ -54,14 +54,16 @@ as.stepfun(x, \dots)
   The value of the constant \eqn{c_i}{c[i]} above depends on the
   \sQuote{continuity} parameter \code{f}.
   For the default, \code{right = FALSE, f = 0},
-  \code{fn} is a \emph{cadlag} function, i.e., continuous at right,
-  limit (\sQuote{the point}) at left.
+  \code{fn} is a \emph{cadlag} function, i.e., continuous from the right,
+  limits from the left, so that the function is piecewise constant on
+  intervals that include their \emph{left} endpoint.
   In general, \eqn{c_i}{c[i]} is interpolated in between the
   neighbouring \eqn{y} values,
   \eqn{c_i= (1-f) y_i + f\cdot y_{i+1}}{c[i] = (1-f)*y[i] + f*y[i+1]}.
   Therefore, for non-0 values of \code{f}, \code{fn} may no longer be a proper
   step function, since it can be discontinuous from both sides, unless
-  \code{right = TRUE, f = 1} which is right-continuous.
+  \code{right = TRUE, f = 1} which is left-continuous (i.e., constant
+  pieces contain their right endpoint).
 }
 \value{
   A function of class \code{"stepfun"}, say \code{fn}.
diff --git a/src/library/stats/man/stl.Rd b/src/library/stats/man/stl.Rd
index 27d5c75..39ffcba 100644
--- a/src/library/stats/man/stl.Rd
+++ b/src/library/stats/man/stl.Rd
@@ -1,6 +1,6 @@
 % File src/library/stats/man/stl.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2007 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2015 R Core Team
 % Distributed under GPL 2 or later
 
 \name{stl}
@@ -29,7 +29,7 @@ stl(x, s.window, s.degree = 0,
     greater than one.}
   \item{s.window}{either the character string \code{"periodic"} or the span (in
     lags) of the loess window for seasonal extraction, which should
-    be odd.  This has no default.}
+    be odd and at least 7, according to Cleveland et al.  This has no default.}
   \item{s.degree}{degree of locally-fitted polynomial in seasonal
     extraction.  Should be zero or one.}
   \item{t.window}{the span (in lags) of the loess window for trend
@@ -108,7 +108,7 @@ stl(x, s.window, s.degree = 0,
 require(graphics)
 
 plot(stl(nottem, "per"))
-plot(stl(nottem, s.window = 4, t.window = 50, t.jump = 1))
+plot(stl(nottem, s.window = 7, t.window = 50, t.jump = 1))
 
 plot(stllc <- stl(log(co2), s.window = 21))
 summary(stllc)
diff --git a/src/library/stats/man/stlmethods.Rd b/src/library/stats/man/stlmethods.Rd
index 0189555..9392d21 100644
--- a/src/library/stats/man/stlmethods.Rd
+++ b/src/library/stats/man/stlmethods.Rd
@@ -1,5 +1,5 @@
 % File src/library/stats/man/stlmethods.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2007 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/stats/man/summary.aov.Rd b/src/library/stats/man/summary.aov.Rd
index 1b5b528..300d95f 100644
--- a/src/library/stats/man/summary.aov.Rd
+++ b/src/library/stats/man/summary.aov.Rd
@@ -1,5 +1,5 @@
 % File src/library/stats/man/summary.aov.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2007 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/stats/man/summary.glm.Rd b/src/library/stats/man/summary.glm.Rd
index 8f830dc..67994b5 100644
--- a/src/library/stats/man/summary.glm.Rd
+++ b/src/library/stats/man/summary.glm.Rd
@@ -1,5 +1,5 @@
 % File src/library/stats/man/summary.glm.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2013 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/stats/man/summary.lm.Rd b/src/library/stats/man/summary.lm.Rd
index 338ac5e..84db7cb 100644
--- a/src/library/stats/man/summary.lm.Rd
+++ b/src/library/stats/man/summary.lm.Rd
@@ -1,5 +1,5 @@
 % File src/library/stats/man/summary.lm.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2013 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/stats/man/summary.manova.Rd b/src/library/stats/man/summary.manova.Rd
index 57cfe6d..4d1af13 100644
--- a/src/library/stats/man/summary.manova.Rd
+++ b/src/library/stats/man/summary.manova.Rd
@@ -1,5 +1,5 @@
 % File src/library/stats/man/summary.manova.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2008 R Core Team
 % Distributed under GPL 2 or later
 
@@ -87,8 +87,8 @@ gloss <- c(9.5, 9.9, 9.6, 9.6, 9.2, 9.1, 10.0, 9.9, 9.5, 9.4,
 opacity <- c(4.4, 6.4, 3.0, 4.1, 0.8, 5.7, 2.0, 3.9, 1.9, 5.7,
              2.8, 4.1, 3.8, 1.6, 3.4, 8.4, 5.2, 6.9, 2.7, 1.9)
 Y <- cbind(tear, gloss, opacity)
-rate <- factor(gl(2,10), labels = c("Low", "High"))
-additive <- factor(gl(2, 5, length = 20), labels = c("Low", "High"))
+rate     <- gl(2,10, labels = c("Low", "High"))
+additive <- gl(2, 5, length = 20, labels = c("Low", "High"))
 
 fit <- manova(Y ~ rate * additive)
 summary.aov(fit)             # univariate ANOVA tables
diff --git a/src/library/stats/man/summary.nls.Rd b/src/library/stats/man/summary.nls.Rd
index 358f219..d63847f 100644
--- a/src/library/stats/man/summary.nls.Rd
+++ b/src/library/stats/man/summary.nls.Rd
@@ -1,5 +1,5 @@
 % File src/library/stats/man/summary.nls.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2009 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/stats/man/summary.princomp.Rd b/src/library/stats/man/summary.princomp.Rd
index e8eb20e..de1c565 100644
--- a/src/library/stats/man/summary.princomp.Rd
+++ b/src/library/stats/man/summary.princomp.Rd
@@ -1,6 +1,6 @@
 % File src/library/stats/man/summary.princomp.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2007 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2014 R Core Team
 % Distributed under GPL 2 or later
 
 \name{summary.princomp}
diff --git a/src/library/stats/man/supsmu.Rd b/src/library/stats/man/supsmu.Rd
index 07a2e36..d073661 100644
--- a/src/library/stats/man/supsmu.Rd
+++ b/src/library/stats/man/supsmu.Rd
@@ -1,10 +1,8 @@
-% File src/library/stats/man/supsmu.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2007 R Core Team
+ % File src/library/stats/man/supsmu.Rd
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2016 R Core Team
 % Distributed under GPL 2 or later
 
-\newcommand{\sspace}{\ifelse{latex}{\out{~}}{ }}
-
 \name{supsmu}
 \alias{supsmu}
 \title{Friedman's SuperSmoother}
@@ -12,7 +10,7 @@
   Smooth the (x, y) values by Friedman's \sQuote{super smoother}.
 }
 \usage{
-supsmu(x, y, wt, span = "cv", periodic = FALSE, bass = 0)
+supsmu(x, y, wt =, span = "cv", periodic = FALSE, bass = 0, trace = FALSE)
 }
 \arguments{
   \item{x}{x values for smoothing}
@@ -23,8 +21,10 @@ supsmu(x, y, wt, span = "cv", periodic = FALSE, bass = 0)
     cross-validation.}
   \item{periodic}{if \code{TRUE}, the x values are assumed to be in
     \code{[0, 1]} and of period 1.}
-  \item{bass}{controls the smoothness of the fitted curve. Values of up
+  \item{bass}{controls the smoothness of the fitted curve.  Values of up
     to 10 indicate increasing smoothness.}
+  \item{trace}{logical, if true, prints one line of info \dQuote{per
+      spar}, notably useful for \code{"cv"}.}
 }
 \details{
   \code{supsmu} is a running lines smoother which chooses between three
diff --git a/src/library/stats/man/symnum.Rd b/src/library/stats/man/symnum.Rd
index 74a2b27..31ffaa5 100644
--- a/src/library/stats/man/symnum.Rd
+++ b/src/library/stats/man/symnum.Rd
@@ -1,5 +1,5 @@
 % File src/library/stats/man/symnum.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2009 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/stats/man/t.test.Rd b/src/library/stats/man/t.test.Rd
index b8bbe04..7134f26 100644
--- a/src/library/stats/man/t.test.Rd
+++ b/src/library/stats/man/t.test.Rd
@@ -1,5 +1,5 @@
 % File src/library/stats/man/t.test.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2007 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/stats/man/termplot.Rd b/src/library/stats/man/termplot.Rd
index 4cbeef0..94fb127 100644
--- a/src/library/stats/man/termplot.Rd
+++ b/src/library/stats/man/termplot.Rd
@@ -1,11 +1,8 @@
 % File src/library/stats/man/termplot.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2014 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2015 R Core Team
 % Distributed under GPL 2 or later
 
-\newcommand{\CRANpkg}{\href{http://CRAN.R-project.org/package=#1}{\pkg{#1}}}
-\newcommand{\sspace}{\ifelse{latex}{\out{~}}{ }}
-
 \name{termplot}
 \alias{termplot}
 \title{Plot Regression Terms}
@@ -120,14 +117,14 @@ termplot(model, partial.resid = TRUE, se = TRUE, main = TRUE)
 termplot(model, partial.resid = TRUE, smooth = panel.smooth, span.smth = 1/4)
 if(!had.splines && rs) detach("package:splines")
 
-if (require(MASS)) {
-    hills.lm <- lm(log(time) ~ log(climb)+log(dist), data=hills)
-    termplot(hills.lm, partial.resid = TRUE, smooth = panel.smooth,
-             terms = "log(dist)", main = "Original")
-    termplot(hills.lm, transform.x = TRUE, partial.resid = TRUE,
-	     terms = "log(dist)", main = "Transformed",
-	     smooth=panel.smooth)
-}
-}
+\donttest{## requires recommended package MASS
+hills.lm <- lm(log(time) ~ log(climb)+log(dist), data = MASS::hills)
+termplot(hills.lm, partial.resid = TRUE, smooth = panel.smooth,
+        terms = "log(dist)", main = "Original")
+termplot(hills.lm, transform.x = TRUE,
+         partial.resid = TRUE, smooth = panel.smooth,
+	 terms = "log(dist)", main = "Transformed")
+
+}}
 \keyword{hplot}
 \keyword{regression}
diff --git a/src/library/stats/man/terms.Rd b/src/library/stats/man/terms.Rd
index 51c37b6..f357313 100644
--- a/src/library/stats/man/terms.Rd
+++ b/src/library/stats/man/terms.Rd
@@ -1,5 +1,5 @@
 % File src/library/stats/man/terms.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2013 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/stats/man/terms.formula.Rd b/src/library/stats/man/terms.formula.Rd
index 993360c..74cea26 100644
--- a/src/library/stats/man/terms.formula.Rd
+++ b/src/library/stats/man/terms.formula.Rd
@@ -1,5 +1,5 @@
 % File src/library/stats/man/terms.formula.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2012 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/stats/man/terms.object.Rd b/src/library/stats/man/terms.object.Rd
index bee8240..f99bdc6 100644
--- a/src/library/stats/man/terms.object.Rd
+++ b/src/library/stats/man/terms.object.Rd
@@ -1,10 +1,8 @@
 % File src/library/stats/man/terms.object.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2012 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2014 R Core Team
 % Distributed under GPL 2 or later
 
-\newcommand{\CRANpkg}{\href{http://CRAN.R-project.org/package=#1}{\pkg{#1}}}
-
 \name{terms.object}
 \title{Description of Terms Objects}
 \alias{terms.object}
@@ -23,8 +21,11 @@
     appear in which terms.  The entries are 0 if the variable does not
     occur in the term, 1 if it does occur and should be coded by
     contrasts, and 2 if it occurs and should be coded via dummy
-    variables for all levels (as when an intercept or lower-order term
-    is missing).  If there are no terms other than an intercept and offsets,
+    variables for all levels (as when a lower-order term
+    is missing).  Note that variables in main effects always receive 1,
+    even if the intercept is missing (in which case the first one
+    should be coded with dummy variables).
+    If there are no terms other than an intercept and offsets,
     this is \code{numeric(0)}.}
   \item{term.labels}{A character vector containing the labels for each
     of the terms in the model, except for offsets.  Note that these are
@@ -50,6 +51,8 @@
     \code{variables} attribute which contain these special functions.}
   \item{dataClasses}{optional.  A named character vector giving the classes
     (as given by \code{\link{.MFclass}}) of the variables used in a fit.}
+  \item{predvars}{optional.  An expression to help in computing 
+    predictions at new covariate values; see \code{\link{makepredictcall}}.}
 
   The object has class \code{c("terms", "formula")}.
 }
diff --git a/src/library/stats/man/time.Rd b/src/library/stats/man/time.Rd
index e5cc6a3..bf0dbd6 100644
--- a/src/library/stats/man/time.Rd
+++ b/src/library/stats/man/time.Rd
@@ -1,5 +1,5 @@
 % File src/library/stats/man/time.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2007 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/stats/man/toeplitz.Rd b/src/library/stats/man/toeplitz.Rd
index 1c766c9..8faee8c 100644
--- a/src/library/stats/man/toeplitz.Rd
+++ b/src/library/stats/man/toeplitz.Rd
@@ -1,17 +1,16 @@
 % File src/library/stats/man/toeplitz.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2012 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2015 R Core Team
 % Distributed under GPL 2 or later
 
 \name{toeplitz}
 \title{Form Symmetric Toeplitz Matrix}
 \usage{
-toeplitz(x, \dots)
+toeplitz(x)
 }
 \alias{toeplitz}
 \arguments{
   \item{x}{the first row to form the Toeplitz matrix.}
-  \item{\dots}{potential further arguments (for methods); none here.}
 }
 \description{
   Forms a symmetric Toeplitz matrix given its first row.
diff --git a/src/library/stats/man/ts-methods.Rd b/src/library/stats/man/ts-methods.Rd
index f521175..e8c4741 100644
--- a/src/library/stats/man/ts-methods.Rd
+++ b/src/library/stats/man/ts-methods.Rd
@@ -1,5 +1,5 @@
 % File src/library/stats/man/ts-methods.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2007 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/stats/man/ts.Rd b/src/library/stats/man/ts.Rd
index 450d776..e2c7fb5 100644
--- a/src/library/stats/man/ts.Rd
+++ b/src/library/stats/man/ts.Rd
@@ -1,6 +1,6 @@
 % File src/library/stats/man/ts.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2013 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2014 R Core Team
 % Distributed under GPL 2 or later
 
 \name{ts}
@@ -105,7 +105,7 @@ is.ts(x)
   
   For other definitions of \sQuote{time series} (e.g.,
   time-ordered observations) see the CRAN task view at
-  \url{http://cran.r-project.org/web/views/TimeSeries.html}.
+  \url{https://CRAN.R-project.org/view=TimeSeries}.
 }
 \examples{
 require(graphics)
diff --git a/src/library/stats/man/ts.plot.Rd b/src/library/stats/man/ts.plot.Rd
index 5d202c7..816d103 100644
--- a/src/library/stats/man/ts.plot.Rd
+++ b/src/library/stats/man/ts.plot.Rd
@@ -1,5 +1,5 @@
 % File src/library/stats/man/ts.plot.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2007 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/stats/man/ts.union.Rd b/src/library/stats/man/ts.union.Rd
index 4ae269b..fdd880e 100644
--- a/src/library/stats/man/ts.union.Rd
+++ b/src/library/stats/man/ts.union.Rd
@@ -1,5 +1,5 @@
 % File src/library/stats/man/ts.union.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2007 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/stats/man/tsSmooth.Rd b/src/library/stats/man/tsSmooth.Rd
index 258bcb8..7df2a9b 100644
--- a/src/library/stats/man/tsSmooth.Rd
+++ b/src/library/stats/man/tsSmooth.Rd
@@ -1,5 +1,5 @@
 % File src/library/stats/man/tsSmooth.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2007 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/stats/man/tsdiag.Rd b/src/library/stats/man/tsdiag.Rd
index 322c710..65484a5 100644
--- a/src/library/stats/man/tsdiag.Rd
+++ b/src/library/stats/man/tsdiag.Rd
@@ -1,5 +1,5 @@
 % File src/library/stats/man/tsdiag.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2007 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/stats/man/tsp.Rd b/src/library/stats/man/tsp.Rd
index d98140c..5c27d2a 100644
--- a/src/library/stats/man/tsp.Rd
+++ b/src/library/stats/man/tsp.Rd
@@ -1,10 +1,8 @@
 % File src/library/stats/man/tsp.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2014 R Core Team
 % Distributed under GPL 2 or later
 
-\newcommand{\sspace}{\ifelse{latex}{\out{~}}{ }}
-
 \name{tsp}
 \title{Tsp Attribute of Time-Series-like Objects}
 \alias{tsp}
diff --git a/src/library/stats/man/uniroot.Rd b/src/library/stats/man/uniroot.Rd
index 4b4fc68..06cb333 100644
--- a/src/library/stats/man/uniroot.Rd
+++ b/src/library/stats/man/uniroot.Rd
@@ -1,6 +1,6 @@
 % File src/library/stats/man/uniroot.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2013 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2014 R Core Team
 % Distributed under GPL 2 or later
 
 \name{uniroot}
@@ -29,7 +29,7 @@ uniroot(f, interval, \dots,
     \code{c(lower,upper)} should be extended or directly produce an error
     when \code{f()} does not have differing signs at the endpoints.  The
     default, \code{"no"}, keeps the search interval and hence produces
-    an error.}
+    an error.  Can be abbreviated.}
   \item{check.conv}{logical indicating whether a convergence warning of the
     underlying \code{\link{uniroot}} should be caught as an error and if
     non-convergence in \code{maxiter} iterations should be an error
diff --git a/src/library/stats/man/update.Rd b/src/library/stats/man/update.Rd
index 61306f1..f0299fb 100644
--- a/src/library/stats/man/update.Rd
+++ b/src/library/stats/man/update.Rd
@@ -1,5 +1,5 @@
 % File src/library/stats/man/update.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2011 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/stats/man/update.formula.Rd b/src/library/stats/man/update.formula.Rd
index e602a3c..466b558 100644
--- a/src/library/stats/man/update.formula.Rd
+++ b/src/library/stats/man/update.formula.Rd
@@ -1,6 +1,6 @@
 % File src/library/stats/man/update.formula.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2009 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2014 R Core Team
 % Distributed under GPL 2 or later
 
 \name{update.formula}
@@ -43,5 +43,6 @@
 \examples{
 update(y ~ x,    ~ . + x2) #> y ~ x + x2
 update(y ~ x, log(.) ~ . ) #> log(y) ~ x
+update(. ~ u+v, res  ~ . ) #> res ~ u + v
 }
 \keyword{models}
diff --git a/src/library/stats/man/var.test.Rd b/src/library/stats/man/var.test.Rd
index 6782f88..fa84aac 100644
--- a/src/library/stats/man/var.test.Rd
+++ b/src/library/stats/man/var.test.Rd
@@ -1,5 +1,5 @@
 % File src/library/stats/man/var.test.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2007 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/stats/man/varimax.Rd b/src/library/stats/man/varimax.Rd
index 8d3df91..fceec6a 100644
--- a/src/library/stats/man/varimax.Rd
+++ b/src/library/stats/man/varimax.Rd
@@ -1,5 +1,5 @@
 % File src/library/stats/man/varimax.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2007 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/stats/man/vcov.Rd b/src/library/stats/man/vcov.Rd
index f120d67..dff9e6f 100644
--- a/src/library/stats/man/vcov.Rd
+++ b/src/library/stats/man/vcov.Rd
@@ -1,10 +1,8 @@
 % File src/library/stats/man/vcov.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2011 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2014 R Core Team
 % Distributed under GPL 2 or later
 
-\newcommand{\CRANpkg}{\href{http://CRAN.R-project.org/package=#1}{\pkg{#1}}}
-
 \name{vcov}
 \alias{vcov}
 \alias{vcov.lm}
diff --git a/src/library/stats/man/weighted.mean.Rd b/src/library/stats/man/weighted.mean.Rd
index 59f1c15..f17cf7e 100644
--- a/src/library/stats/man/weighted.mean.Rd
+++ b/src/library/stats/man/weighted.mean.Rd
@@ -1,5 +1,5 @@
 % File src/library/stats/man/weighted.mean.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2014 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/stats/man/weighted.residuals.Rd b/src/library/stats/man/weighted.residuals.Rd
index 86f3bb4..a7eab48 100644
--- a/src/library/stats/man/weighted.residuals.Rd
+++ b/src/library/stats/man/weighted.residuals.Rd
@@ -1,5 +1,5 @@
 % File src/library/stats/man/weighted.residuals.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2007 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/stats/man/weights.Rd b/src/library/stats/man/weights.Rd
index ecc15f3..4ff1842 100644
--- a/src/library/stats/man/weights.Rd
+++ b/src/library/stats/man/weights.Rd
@@ -1,5 +1,5 @@
 % File src/library/stats/man/fitted.values.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2011 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/stats/man/wilcox.test.Rd b/src/library/stats/man/wilcox.test.Rd
index c9f1dd5..171ffa4 100644
--- a/src/library/stats/man/wilcox.test.Rd
+++ b/src/library/stats/man/wilcox.test.Rd
@@ -1,16 +1,14 @@
 % File src/library/stats/man/wilcox.test.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2011 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2016 R Core Team
 % Distributed under GPL 2 or later
 
-\newcommand{\CRANpkg}{\href{http://CRAN.R-project.org/package=#1}{\pkg{#1}}}
-
 \name{wilcox.test}
+\title{Wilcoxon Rank Sum and Signed Rank Tests}
 \alias{wilcox.test}
 \alias{wilcox.test.default}
 \alias{wilcox.test.formula}
 \concept{Mann-Whitney Test}
-\title{Wilcoxon Rank Sum and Signed Rank Tests}
 \description{
   Performs one- and two-sample Wilcoxon tests on vectors of data; the
   latter is also known as \sQuote{Mann-Whitney} test.
@@ -104,6 +102,12 @@ wilcox.test(x, \dots)
   With small samples it may not be possible to achieve very high
   confidence interval coverages. If this happens a warning will be given
   and an interval with lower coverage will be substituted.
+
+  When \code{x} (and \code{y} if applicable) are valid, the function now
+  always returns, also in the \code{conf.int = TRUE} case when a
+  confidence interval cannot be computed, in which case the interval
+  boundaries and sometimes the \code{estimate} now contain
+  \code{\link{NaN}}.
 }
 \value{
   A list with class \code{"htest"} containing the following components:
diff --git a/src/library/stats/man/window.Rd b/src/library/stats/man/window.Rd
index f725467..3d4631d 100644
--- a/src/library/stats/man/window.Rd
+++ b/src/library/stats/man/window.Rd
@@ -1,5 +1,5 @@
 % File src/library/stats/man/window.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2007 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/stats/man/xtabs.Rd b/src/library/stats/man/xtabs.Rd
index 9586ee2..267e4f0 100644
--- a/src/library/stats/man/xtabs.Rd
+++ b/src/library/stats/man/xtabs.Rd
@@ -1,10 +1,8 @@
 % File src/library/stats/man/xtabs.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2013 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2017 R Core Team
 % Distributed under GPL 2 or later
 
-\newcommand{\CRANpkg}{\href{http://CRAN.R-project.org/package=#1}{\pkg{#1}}}
-
 \name{xtabs}
 \alias{xtabs}
 \alias{print.xtabs}
@@ -16,7 +14,10 @@
 }
 \usage{
 xtabs(formula = ~., data = parent.frame(), subset, sparse = FALSE,
-      na.action, exclude = c(NA, NaN), drop.unused.levels = FALSE)
+      na.action, addNA = FALSE, exclude = if(!addNA) c(NA, NaN),
+      drop.unused.levels = FALSE)
+
+\method{print}{xtabs}(x, na.print = "", \dots)
 }
 \arguments{
   \item{formula}{a \link{formula} object with the cross-classifying variables
@@ -39,7 +40,14 @@ xtabs(formula = ~., data = parent.frame(), subset, sparse = FALSE,
     are no higher-order sparse array classes yet).
   }
   \item{na.action}{a function which indicates what should happen when
-    the data contain \code{NA}s.}
+    the data contain \code{\link{NA}}s.  If unspecified, and
+    \code{addNA} is true, this is set to \code{\link{na.pass}}.  When it
+    is \code{na.pass} and \code{formula} has a left hand side (with
+    counts), \code{\link{sum}(*, na.rm = TRUE)} is used instead of
+    \code{sum(*)} for the counts.}
+  \item{addNA}{logical indicating if \code{NA}s should get a separate
+    level and be counted, using \code{\link{addNA}(*, ifany=TRUE)} and
+    setting the default for \code{na.action}.}
   \item{exclude}{a vector of values to be excluded when forming the
     set of levels of the classifying factors.}
   \item{drop.unused.levels}{a logical indicating whether to drop unused
@@ -47,6 +55,13 @@ xtabs(formula = ~., data = parent.frame(), subset, sparse = FALSE,
     there are unused levels, the table will contain zero marginals, and
     a subsequent chi-squared test for independence of the factors will
     not work.}
+
+  \item{x}{an object of class \code{"xtabs"}.}
+  \item{na.print}{character string (or \code{NULL}) indicating how
+    \code{\link{NA}} are printed.  The default (\code{""}) does not show
+    \code{NA}s clearly, and \code{na.print = "NA"} maybe advisable
+    instead.}
+  \item{\dots}{further arguments passed to or from other methods.}
 }
 \details{
   There is a \code{summary} method for contingency table objects created
@@ -58,9 +73,12 @@ xtabs(formula = ~., data = parent.frame(), subset, sparse = FALSE,
   If a left hand side is given in \code{formula}, its entries are simply
   summed over the cells corresponding to the right hand side; this also
   works if the lhs does not give counts.
-  
+
   For variables in \code{formula} which are factors, \code{exclude}
-  must be specified explicitly; the default exclusions will not be used.  
+  must be specified explicitly; the default exclusions will not be used.
+
+  In \R versions before 3.4.0, e.g., when \code{na.action = na.pass},
+  sometimes zeroes (\code{0}) were returned instead of \code{NA}s.
 }
 \value{
   By default, when \code{sparse = FALSE},
@@ -99,8 +117,17 @@ xtabs(Freq ~ Gender + Admit, DF)
 ## And for testing independence ...
 summary(xtabs(Freq ~ ., DF))
 
+## with NA's
+DN <- DF; DN[cbind(6:9, c(1:2,4,1))] <- NA; DN
+tools::assertError(# 'na.fail' should fail :
+     xtabs(Freq ~ Gender + Admit, DN, na.action=na.fail))
+xtabs(Freq ~ Gender + Admit, DN)
+xtabs(Freq ~ Gender + Admit, DN, na.action = na.pass)
+## The Female:Rejected combination has NA 'Freq' (and NA prints 'invisibly' as "")
+xtabs(Freq ~ Gender + Admit, DN, addNA = TRUE) # ==> count NAs
+
 ## Create a nice display for the warp break data.
-warpbreaks$replicate <- rep(1:9, len = 54)
+warpbreaks$replicate <- rep_len(1:9, 54)
 ftable(xtabs(breaks ~ wool + tension + replicate, data = warpbreaks))
 
 ### ---- Sparse Examples ----
@@ -113,7 +140,7 @@ ftable(xtabs(breaks ~ wool + tension + replicate, data = warpbreaks))
  set.seed(15) # a subset of cases:
  print(xtabs(~ Type + Subj, data = d.ergo[sample(36, 10), ], sparse = TRUE))
 
- ## Hypothetical two level setup:
+ ## Hypothetical two-level setup:
  inner <- factor(sample(letters[1:25], 100, replace = TRUE))
  inout <- factor(sample(LETTERS[1:5], 25, replace = TRUE))
  fr <- data.frame(inner = inner, outer = inout[as.integer(inner)])
diff --git a/src/library/stats/man/zC.Rd b/src/library/stats/man/zC.Rd
index bb4a673..109889e 100644
--- a/src/library/stats/man/zC.Rd
+++ b/src/library/stats/man/zC.Rd
@@ -1,5 +1,5 @@
 % File src/library/stats/man/zC.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2007 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/stats/po/R-da.po b/src/library/stats/po/R-da.po
index 26dc5d1..8698824 100644
--- a/src/library/stats/po/R-da.po
+++ b/src/library/stats/po/R-da.po
@@ -2,7 +2,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: R 3.0.0\n"
 "Report-Msgid-Bugs-To: bugs.r-project.org\n"
-"POT-Creation-Date: 2014-03-27 07:47\n"
+"POT-Creation-Date: 2016-04-01 09:50\n"
 "PO-Revision-Date: 2012-01-28 01:18+0200\n"
 "Last-Translator: Joe <joedalton2 at yahoo.dk>\n"
 "Language-Team: LANGUAGE <LL at li.org>\n"
@@ -105,6 +105,9 @@ msgstr "x$lag skal have mindst 1 kolonne"
 msgid "can use ci.type=\"ma\" only if first lag is 0"
 msgstr "kan kun bruge ci-type=»ma« hvis første lag er 0"
 
+msgid "Page [%d,%d]: i =%s; j =%s"
+msgstr ""
+
 msgid "univariate time series only"
 msgstr "kun univariate tidsserier"
 
@@ -463,6 +466,12 @@ msgstr ""
 msgid "NA values not allowed in 'd'"
 msgstr ""
 
+msgid "eig=TRUE is disregarded when list.=FALSE"
+msgstr ""
+
+msgid "x.ret=TRUE is disregarded when list.=FALSE"
+msgstr ""
+
 msgid "distances must be result of 'dist' or a square matrix"
 msgstr ""
 
@@ -475,6 +484,9 @@ msgstr ""
 msgid "only %d of the first %d eigenvalues are > 0"
 msgstr ""
 
+msgid "package 'MASS' must be installed"
+msgstr ""
+
 msgid "initial value is not in the interior of the feasible region"
 msgstr ""
 
@@ -516,6 +528,9 @@ msgstr ""
 msgid "arguments must have the same length"
 msgstr ""
 
+msgid "wrong number of columns in new data:"
+msgstr ""
+
 msgid "contrasts apply only to factors"
 msgstr ""
 
@@ -609,7 +624,9 @@ msgstr ""
 msgid "elements of 'k' must be between 1 and %d"
 msgstr ""
 
-msgid "'merge' and 'height' do not fit!"
+msgid ""
+"dendrogram entries must be 1,2,..,%d (in any order), to be coercible to "
+"\"hclust\""
 msgstr ""
 
 msgid "dendrogram node with non-positive #{branches}"
@@ -663,9 +680,6 @@ msgstr ""
 msgid "'RowSideColors' must be a character vector of length nrow(x)"
 msgstr ""
 
-msgid "non-matched further arguments are disregarded"
-msgstr ""
-
 msgid "argument 'x' must be numeric"
 msgstr ""
 
@@ -738,7 +752,7 @@ msgstr ""
 msgid "x[] and prob[] must be equal length vectors."
 msgstr ""
 
-msgid "probabilities cannot be negative nor all 0"
+msgid "probabilities must be finite, non-negative and not all 0"
 msgstr ""
 
 msgid "'x' must be non-negative"
@@ -753,6 +767,9 @@ msgstr ""
 msgid "some terms will have NAs due to the limits of the method"
 msgstr ""
 
+msgid "multivariate case with missing coefficients is not yet implemented"
+msgstr ""
+
 msgid "'x' must have 1 or more non-missing values"
 msgstr ""
 
@@ -856,7 +873,9 @@ msgstr ""
 msgid "positive values only are allowed for the 'inverse.gaussian' family"
 msgstr ""
 
-msgid "need CRAN package 'SuppDists' for the 'inverse.gaussian' family"
+msgid ""
+"need CRAN package 'SuppDists' for simulation from the 'inverse.gaussian' "
+"family"
 msgstr ""
 
 msgid "using weights as inverse variances"
@@ -885,14 +904,6 @@ msgstr ""
 msgid "length of 'init' must equal length of 'filter'"
 msgstr ""
 
-#, fuzzy
-msgid "'init' must have 1 column"
-msgstr "x$lag skal have mindst 1 kolonne"
-
-#, fuzzy
-msgid "'init' must have 1 or %d columns"
-msgstr "x$lag skal have mindst 1 kolonne"
-
 msgid "'x' must have at least 2 rows and columns"
 msgstr ""
 
@@ -1111,12 +1122,6 @@ msgstr ""
 msgid "invalid length of members"
 msgstr ""
 
-msgid "invalid dendrogram"
-msgstr ""
-
-msgid "'merge' component in dendrogram must be integer"
-msgstr ""
-
 msgid "argument 'x' cannot be coerced to class %s"
 msgstr ""
 
@@ -1144,7 +1149,7 @@ msgstr ""
 msgid "invalid parameter values"
 msgstr ""
 
-msgid "a limit is missing"
+msgid "a limit is NA or NaN"
 msgstr ""
 
 msgid "missing values not allowed"
@@ -1222,6 +1227,12 @@ msgstr ""
 msgid "must have same number of columns in 'x' and 'centers'"
 msgstr ""
 
+msgid "'x' is a list, so ignoring argument 'g'"
+msgstr ""
+
+msgid "some elements of 'x' are not numeric and will be coerced to numeric"
+msgstr ""
+
 msgid "not enough 'x' data"
 msgstr ""
 
@@ -1345,6 +1356,9 @@ msgstr ""
 msgid "only 1-4 predictors are allowed"
 msgstr ""
 
+msgid "invalid NROW(X)"
+msgstr ""
+
 msgid "invalid 'y'"
 msgstr ""
 
@@ -1369,6 +1383,13 @@ msgstr ""
 msgid "invalid argument 'degree'"
 msgstr ""
 
+msgid "iterTrace ="
+msgstr ""
+
+#, fuzzy
+msgid "not obeyed as iterations ="
+msgstr "ikke nok »y-observationer«"
+
 msgid "first argument must be a \"loess\" object"
 msgstr ""
 
@@ -1872,7 +1893,7 @@ msgstr ""
 msgid "'varying' arguments must be the same length"
 msgstr ""
 
-msgid "'times' is wrong length"
+msgid "'lengths(varying)' must all match 'length(times)'"
 msgstr ""
 
 msgid "there are records with missing times, which will be dropped."
@@ -1931,6 +1952,9 @@ msgstr ""
 msgid "invalid 'endrule' argument"
 msgstr ""
 
+msgid ".nknots.smspl() is now exported; use it instead of n.knots()"
+msgstr ""
+
 msgid "invalid 'control.spar'"
 msgstr ""
 
@@ -2067,8 +2091,9 @@ msgstr ""
 msgid "'plot.stepfun' called with wrong type of argument 'x'"
 msgstr ""
 
-msgid "must be 0 or 1"
-msgstr ""
+#, fuzzy
+msgid "%s must be 0 or 1"
+msgstr "»acf« skal have længden to eller længere"
 
 msgid "only univariate series are allowed"
 msgstr ""
@@ -2331,11 +2356,6 @@ msgid_plural "extra arguments %s are not of class \"%s\"s"
 msgstr[0] ""
 msgstr[1] ""
 
-msgid "extra argument %s will be disregarded"
-msgid_plural "extra arguments %s will be disregarded"
-msgstr[0] ""
-msgstr[1] ""
-
 msgid "%d factor is too many for %d variables"
 msgid_plural "%d factors are too many for %d variables"
 msgstr[0] ""
@@ -2351,6 +2371,12 @@ msgid_plural "unable to optimize from these starting values"
 msgstr[0] ""
 msgstr[1] ""
 
+#, fuzzy
+msgid "'init' must have %d column"
+msgid_plural "'init' must have 1 or %d columns"
+msgstr[0] "x$lag skal have mindst 1 kolonne"
+msgstr[1] "x$lag skal have mindst 1 kolonne"
+
 msgid "X matrix has rank %d, but only %d observation"
 msgid_plural "X matrix has rank %d, but only %d observations"
 msgstr[0] ""
@@ -2440,3 +2466,7 @@ msgid "'start.innov' is too short: need %d point"
 msgid_plural "'start.innov' is too short: need %d points"
 msgstr[0] ""
 msgstr[1] ""
+
+#, fuzzy
+#~ msgid "'init' must have 1 or %d columns"
+#~ msgstr "x$lag skal have mindst 1 kolonne"
diff --git a/src/library/stats/po/R-de.po b/src/library/stats/po/R-de.po
index ec70ae7..6df0e00 100644
--- a/src/library/stats/po/R-de.po
+++ b/src/library/stats/po/R-de.po
@@ -5,13 +5,13 @@
 #
 msgid ""
 msgstr ""
-"Project-Id-Version: R-3.1.0\n"
+"Project-Id-Version: R-3.2.0\n"
 "Report-Msgid-Bugs-To: bugs.r-project.org\n"
-"POT-Creation-Date: 2014-03-27 07:47\n"
-"PO-Revision-Date: 2013-03-18 10:10+0100\n"
+"POT-Creation-Date: 2015-06-06 13:51\n"
+"PO-Revision-Date: 2016-04-08 12:31+0200\n"
 "Last-Translator: Detlef Steuer <steuer at hsu-hh.de>\n"
 "Language-Team: R Core <r-core at r-project.org>\n"
-"Language: \n"
+"Language: de\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
@@ -83,10 +83,11 @@ msgid "'which' specified no factors"
 msgstr "'which' spezifizierte keine Faktoren"
 
 msgid "'which' specified some non-factors which will be dropped"
-msgstr "'which' spezifizert einige Nicht-Faktoren, diese werden nicht beachtet"
+msgstr ""
+"'which' spezifiziert einige Nicht-Faktoren, diese werden nicht beachtet"
 
 msgid "'sampleT' and 'nser' must be integer"
-msgstr "'sampleT' und 'nser' müssemn ganzzahlig sein"
+msgstr "'sampleT' und 'nser' müssen ganzzahlig sein"
 
 msgid "'lag.max' must be at least 0"
 msgstr "'lag.max' muss mindestens 0 sein"
@@ -103,6 +104,9 @@ msgstr "x$lag muss mindestens 1 Spalte haben"
 msgid "can use ci.type=\"ma\" only if first lag is 0"
 msgstr "kann ci.type=\"ma\" nur benutzen, wenn lag gleich 0 ist"
 
+msgid "Page [%d,%d]: i =%s; j =%s"
+msgstr "Seite [%d,%d]: i=%s; j=%s"
+
 msgid "univariate time series only"
 msgstr "nur univariate Zeitreihen"
 
@@ -148,10 +152,12 @@ msgstr "'A' muss ein Array oder eine Tabelle sein"
 msgid ""
 "length of FUN, %d,\n"
 " does not match the length of the margins, %d"
-msgstr "Länge von FUN, %d,\\n entspricht nicht der Länge der Ränder, %d"
+msgstr ""
+"Länge von FUN, %d,\n"
+" entspricht nicht der Länge der Ränder, %d"
 
 msgid "no rows to aggregate"
-msgstr "keine Zeile für die Aggragation"
+msgstr "keine Zeile für die Aggregation"
 
 msgid "'by' must be a list"
 msgstr "'by' muss eine Liste sein"
@@ -172,7 +178,7 @@ msgid "'x' must be coefficient matrix/data frame"
 msgstr "'x' muss eine Koeffizientenmatrix oder Dataframe sein"
 
 msgid "option \"show.coef.Pvalues\" is invalid: assuming TRUE"
-msgstr "option \"show.coef.Pvalues\" is unzulässig: nehme TRUE an"
+msgstr "option \"show.coef.Pvalues\" ist unzulässig: nehme TRUE an"
 
 msgid "'P.values' is TRUE, but 'has.Pvalue' is not"
 msgstr "'P.values' ist TRUE, aber 'has.Pvalue' nicht"
@@ -181,7 +187,7 @@ msgid "wrong k / cs.ind"
 msgstr "falsches k / cs.ind"
 
 msgid "option \"show.signif.stars\" is invalid: assuming TRUE"
-msgstr "Option \"show.signif.starts\" is unzulässig: nehme TRUE an"
+msgstr "Option \"show.signif.stars\" ist unzulässig: nehme TRUE an"
 
 msgid "'anova' object must have colnames"
 msgstr "'anova' Objekt muss Spaltennamen haben"
@@ -197,14 +203,14 @@ msgstr "nicht genug 'y' Beobachtungen"
 
 msgid "samples differ in location: cannot compute confidence set, returning NA"
 msgstr ""
-"Stichproben unterscheiden sich in der Lage: kann keinenKonfidenzbereich "
+"Stichproben unterscheiden sich in der Lage: kann keinen Konfidenzbereich "
 "angeben, gebe NA zurück"
 
 msgid "cannot compute confidence set, returning NA"
 msgstr "kann keinen Konfidenzbereich berechnen, gebe NA zurück"
 
 msgid "cannot compute asymptotic confidence set or estimator"
-msgstr "kann keinen asymptotischen Konfidenzbereich oder Schäter berechnen"
+msgstr "kann keinen asymptotischen Konfidenzbereich oder Schätzer berechnen"
 
 msgid "cannot compute estimate, returning NA"
 msgstr "kann keinen Schätzer berechnen, gebe NA zurück"
@@ -261,7 +267,7 @@ msgid "collapsing to unique 'x' values"
 msgstr "Reduktion auf einmalige 'x' Werte"
 
 msgid "invalid interpolation method"
-msgstr "unzulässige Interpolationsmehtode"
+msgstr "unzulässige Interpolationsmethode"
 
 msgid "need at least two non-NA values to interpolate"
 msgstr "benötige mindestens zwei nicht-NA Werte zur Interpolation"
@@ -382,7 +388,7 @@ msgid "increasing bw.SJ() search interval (%d) to [%.4g,%.4g]"
 msgstr "vergrößere bw.SJ() Suchintervall (%d) auf [%.4g,%.4g]"
 
 msgid "minimum occurred at one end of the range"
-msgstr "Minimum trat am Rand der Bereichs auf"
+msgstr "Minimum trat am Rand des Bereichs auf"
 
 msgid "'x' must be a list with at least 2 elements"
 msgstr "'x' muss eine Liste mit höchstens 2 Elementen sein"
@@ -397,7 +403,7 @@ msgid "there must be at least 2 observations in each group"
 msgstr "es müssen zumindest 2 Beobachtungen in jeder Gruppe sein"
 
 msgid "'formula' should be of the form response ~ group"
-msgstr "'formul' sollte von der Art response ~ group sein"
+msgstr "'formula' sollte von der Art response ~ group sein"
 
 msgid "'x' must be nonnegative and integer"
 msgstr "'x' muss nicht-negativ und ganzzahlig sein"
@@ -412,7 +418,7 @@ msgid "'p' must be a single number between 0 and 1"
 msgstr "'p' muss eine einzelne Zahl zwischen 0 und 1 sein"
 
 msgid "length of choices must be 2"
-msgstr "Länge der Auswahlen muss 2 sein"
+msgstr "Länge der Auswahl muss 2 sein"
 
 msgid "object '%s' has no scores"
 msgstr "Objekt '%s' hat keine Scores"
@@ -436,7 +442,7 @@ msgid "'y' has rank 0"
 msgstr "'y' hat Rang 0"
 
 msgid "'x' and 'y' must have the same length"
-msgstr "'x' und 'y'müssen dieselbe Länge haben"
+msgstr "'x' und 'y' müssen dieselbe Länge haben"
 
 msgid "'x' and 'y' must have at least 2 levels"
 msgstr "'x' und 'y' müssen mindestens 2 Stufen haben"
@@ -491,7 +497,7 @@ msgid "Objective function increased at outer iteration %d"
 msgstr "Zielfunktion angestiegen bei der äußeren Iteration %d"
 
 msgid "Objective function decreased at outer iteration %d"
-msgstr "Zilfunktion gefallen bei der äußeren Iteration %d"
+msgstr "Zielfunktion gefallen bei der äußeren Iteration %d"
 
 msgid "contrasts not defined for %d degrees of freedom"
 msgstr "Kontraste für %d Freiheitsgrade nicht definiert"
@@ -541,7 +547,7 @@ msgid "numeric contrasts or contrast name expected"
 msgstr "numerische Kontraste oder ein Kontrastname erwartet"
 
 msgid "%s needs package 'Matrix' correctly installed"
-msgstr "%s benötig das Paket 'Matrix' korrekt installiert"
+msgstr "%s benötigt das korrekt installierte Paket 'Matrix'"
 
 msgid "not enough degrees of freedom to define contrasts"
 msgstr "zu wenig Freiheitsgrade, um Kontraste zu definieren"
@@ -613,13 +619,17 @@ msgid "either 'k' or 'h' must be specified"
 msgstr "entweder 'k' oder 'h' muss angegeben werden"
 
 msgid "the 'height' component of 'tree' is not sorted (increasingly)"
-msgstr "die Koponente 'height' von 'tree' ist nicht (aufsteigend) sortiert"
+msgstr "die Komponente 'height' von 'tree' ist nicht (aufsteigend) sortiert"
 
 msgid "elements of 'k' must be between 1 and %d"
 msgstr "Elemente von 'k' müssen zwischen 1 und %d sein"
 
-msgid "'merge' and 'height' do not fit!"
-msgstr "'merge' und 'height' passen nicht"
+msgid ""
+"dendrogram entries must be 1,2,..,%d (in any order), to be coercible to "
+"\"hclust\""
+msgstr ""
+"Dendogrammeinträge müssen 1,2,..,%d (in beliebiger Reihenfolge) sein, damit "
+"sie in \"hclust\" umgewandelt werden können"
 
 msgid "dendrogram node with non-positive #{branches}"
 msgstr "Dendrogrammknoten mit nicht-positiver #{Verzweigungen}"
@@ -652,7 +662,7 @@ msgid "'x' must be a numeric matrix"
 msgstr "'x' muss numerische Matrix sein"
 
 msgid "'x' must have at least 2 rows and 2 columns"
-msgstr "'x' muss mindestens 2 Spalten und 2 Zeilen haben"
+msgstr "'x' muss mindestens 2 Zeilen und 2 Spalten haben"
 
 msgid "'margins' must be a numeric vector of length 2"
 msgstr "'margins' muss ein numerischer Vektor der Länge 2 sein"
@@ -672,9 +682,6 @@ msgstr "'ColSideColors' muss ein Zeichenkettenvektor der Länge ncol(x) sein"
 msgid "'RowSideColors' must be a character vector of length nrow(x)"
 msgstr "'RowSideColors' muss ein Zeichenkettenvektor der Länge nrow(x) sein"
 
-msgid "non-matched further arguments are disregarded"
-msgstr "übrige Argumente ohne Entsprechung werden verworfen"
-
 msgid "argument 'x' must be numeric"
 msgstr "Argument 'x' muss numerisch sein"
 
@@ -721,7 +728,7 @@ msgid "'x' is not a vector"
 msgstr "'x' ist kein Vektor"
 
 msgid "bad value for 'lag' or 'differences'"
-msgstr "ungültiger Wert für lag' oder 'differences'"
+msgstr "ungültiger Wert für 'lag' oder 'differences'"
 
 msgid "'xi' does not have the right length"
 msgstr "'xi' hat nicht die richtige Länge"
@@ -747,8 +754,9 @@ msgstr "bitte 'rate' oder 'scale' aber nicht beides angeben"
 msgid "x[] and prob[] must be equal length vectors."
 msgstr "x[] und prob[] müssen gleich lange Vektoren sein"
 
-msgid "probabilities cannot be negative nor all 0"
-msgstr "Wahrscheinlichkeiten können weder negativ noch alle gleich 0 sein"
+msgid "probabilities must be finite, non-negative and not all 0"
+msgstr ""
+"Wahrscheinlichkeiten müssen endlich, nicht-negativ und nicht alle 0 sein"
 
 msgid "'x' must be non-negative"
 msgstr "'x' muss nicht-negativ sein"
@@ -819,14 +827,14 @@ msgstr "negative Werte sind für die 'quasiPoisson'-Familie nicht zulässig"
 
 msgid "link \"%s\" not available for gaussian family; available links are %s"
 msgstr ""
-"Link \"%s\" ist für die Gaussfamilie nicht verfügbar; verfügbar sind %s"
+"Link \"%s\" ist für die Gauss-Familie nicht verfügbar; verfügbar sind %s"
 
 msgid "cannot find valid starting values: please specify some"
 msgstr "kann keine Startwerte finden; bitte welche angeben"
 
 msgid "link \"%s\" not available for binomial family; available links are %s"
 msgstr ""
-"Link \"%s\"ist für die Binomialfamilie nicht verfügbar; verfügbar sind %s"
+"Link \"%s\"ist für die Binomial-Familie nicht verfügbar; verfügbar sind %s"
 
 msgid "y values must be 0 <= y <= 1"
 msgstr "y Werte müssen in [0, 1] liegen"
@@ -841,9 +849,9 @@ msgid ""
 "for the 'binomial' family, y must be a vector of 0 and 1's\n"
 "or a 2 column matrix where col 1 is no. successes and col 2 is no. failures"
 msgstr ""
-"für die 'binmial'-Familie muss y entweder ein Vektor aus Nullen und\n"
+"für die 'binomial'-Familie muss y entweder ein Vektor aus Nullen und\n"
 "Einsen oder eine zweispaltige Matrix mit Erfolgen in der ersten und "
-"Mißerfolgen in der zweiten Spalte sein"
+"Misserfolgen in der zweiten Spalte sein"
 
 msgid "cannot simulate from non-integer prior.weights"
 msgstr ""
@@ -852,15 +860,15 @@ msgstr ""
 msgid ""
 "link \"%s\" not available for quasibinomial family; available links are %s"
 msgstr ""
-"Link \"%s\" für die Quasibinomialfamilie nicht verfügbar; verfügbar sind %s"
+"Link \"%s\" für die Quasibinomial-Familie nicht verfügbar; verfügbar sind %s"
 
 msgid ""
 "for the 'quasibinomial' family, y must be a vector of 0 and 1's\n"
 "or a 2 column matrix where col 1 is no. successes and col 2 is no. failures"
 msgstr ""
-"für die 'quasibinmial'-Familie muss y entweder ein Vektor aus Nullen und\n"
+"für die 'quasibinomial'-Familie muss y entweder ein Vektor aus Nullen und\n"
 "Einsen oder eine zweispaltige Matrix mit Erfolgen in der ersten und "
-"Mißerfolgen in der zweiten Spalte sein"
+"Misserfolgen in der zweiten Spalte sein"
 
 msgid "link \"%s\" not available for gamma family; available links are %s"
 msgstr ""
@@ -908,22 +916,16 @@ msgid "argument 'sides' must be 1 or 2"
 msgstr "Argument 'sides' muss 1 oder 2 sein"
 
 msgid "'circular' must be logical and not NA"
-msgstr "'circular' muss boole'sch und nicht NA sein"
+msgstr "'circular' muss boolesch und nicht NA sein"
 
 msgid "length of 'init' must equal length of 'filter'"
 msgstr "Länge von 'init' muss der Länge von 'filter' entsprechen"
 
-msgid "'init' must have 1 column"
-msgstr "'init'  muss  1 Spalte haben"
-
-msgid "'init' must have 1 or %d columns"
-msgstr "'init' muss 1 oder %d Spalte(n) haben"
-
 msgid "'x' must have at least 2 rows and columns"
 msgstr "'x' muss mindestens 2 Zeilen und Spalten haben"
 
 msgid "'x' has entries too large to be integer"
-msgstr "'x' enthält Einträge, die zu groß für ein Ingeger sind"
+msgstr "'x' enthält Einträge, die zu groß für ein Integer sind"
 
 msgid "'x' has been rounded to integer: %s"
 msgstr "'x' wurde gerundet auf ganze Zahl: %s"
@@ -1032,7 +1034,7 @@ msgstr ""
 msgid ""
 "fitting to calculate the null deviance did not converge -- increase 'maxit'?"
 msgstr ""
-"Anpassung um die Null-Abweichung zu berechnen hat nicht konvergiert --\n"
+"Anpassung um die Null-Abweichung zu berechnen hat nicht konvergiert -- "
 "'maxit' erhöhen?"
 
 msgid "value of 'epsilon' must be > 0"
@@ -1116,7 +1118,7 @@ msgstr "F-Test bei fester Dispersion unangemessen"
 
 msgid "models with response %s removed because response differs from model 1"
 msgstr ""
-"Modelle mit Antwortvariable %s entfernt, diese sich von Modell 1 "
+"Modelle mit Antwortvariable %s entfernt, da diese sich von Modell 1 "
 "unterscheidet"
 
 msgid "models were not all fitted to the same size of dataset"
@@ -1131,6 +1133,8 @@ msgstr ""
 msgid ""
 "The \"ward\" method has been renamed to \"ward.D\"; note new \"ward.D2\""
 msgstr ""
+"Die \"ward\" Methode wurde in \"ward.D\" umbenannt; beachte das neue \"ward."
+"D2\""
 
 msgid "invalid clustering method"
 msgstr "unzulässige Clustring-Methode"
@@ -1150,12 +1154,6 @@ msgstr "n >= 2 Objekte nötig, um zu clustern"
 msgid "invalid length of members"
 msgstr "unzulässige Anzahl von Teilnehmern"
 
-msgid "invalid dendrogram"
-msgstr "unzulässiges Dendrogramm"
-
-msgid "'merge' component in dendrogram must be integer"
-msgstr "Die 'merge' Komponente in einem Dendrogramm muss ganzzahlig sein"
-
 msgid "argument 'x' cannot be coerced to class %s"
 msgstr "Argument 'x' kann nicht in die Klasse %s gewandelt werden"
 
@@ -1163,7 +1161,7 @@ msgid "Consider providing an as.hclust.%s() method"
 msgstr "Evtl. eine as.hclust.%s()-Methode bereitstellen"
 
 msgid "need dendrograms where all leaves have labels"
-msgstr "benötige Dendrogramme in denen alle Blätter Label haben"
+msgstr "benötige Dendrogramme, in denen alle Blätter Label haben"
 
 msgid "'k' and 'h' must be a scalar"
 msgstr "'k' und 'h' muss ein Skalar sein"
@@ -1178,7 +1176,7 @@ msgid "specify exactly one of 'which' and 'x'"
 msgstr "es muss enweder nur 'which' oder nur 'x' angegeben werden"
 
 msgid "all elements of 'which' must be between 1 and %d"
-msgstr "all Elemente von 'which' müssen zwischen 1 und %d liegen"
+msgstr "alle Elemente von 'which' müssen zwischen 1 und %d liegen"
 
 msgid "invalid parameter values"
 msgstr "unzulässige Parameterwerte"
@@ -1199,7 +1197,7 @@ msgid "'r' is less than 0"
 msgstr "'r' ist kleiner als 0"
 
 msgid "'m' must be numeric with non-negative integers"
-msgstr "'m' muss numerishc mit nicht-negativen, ganzen Zahlen sein"
+msgstr "'m' muss numerisch mit nicht-negativen, ganzen Zahlen sein"
 
 msgid "unknown named kernel"
 msgstr "unbekannter, benannter Kernel"
@@ -1211,7 +1209,7 @@ msgid "'coef' does not have the correct length"
 msgstr "'coef' hat falsche Länge"
 
 msgid "coefficients do not add to 1"
-msgstr "Koeffizienten addieren sich nicht zu 1 auf"
+msgstr "Koeffizienten addieren sich nicht zu 1"
 
 msgid "'k' is not a kernel"
 msgstr "'k' ist kein Kernel"
@@ -1260,7 +1258,15 @@ msgid "'iter.max' must be positive"
 msgstr "'iter.max' muss positiv sein"
 
 msgid "must have same number of columns in 'x' and 'centers'"
-msgstr "'x' und 'centers' müssen die selbe Zahl von Spalten haben"
+msgstr "'x' und 'centers' müssen dieselbe Zahl von Spalten haben"
+
+msgid "'x' is a list, so ignoring argument 'g'"
+msgstr "'x' ist eine Liste, also ignoriere Argument 'g'"
+
+msgid "some elements of 'x' are not numeric and will be coerced to numeric"
+msgstr ""
+"einige Elemente von 'x' sind nicht numerisch und werden nach numerisch "
+"gewandelt"
 
 msgid "not enough 'x' data"
 msgstr "zu wenig 'x' Daten"
@@ -1321,10 +1327,8 @@ msgstr ""
 "Freiheitsgrade der Residuen legt nahe, dass es sich nicht um einen \"lm\" "
 "Fit handelt"
 
-#, fuzzy
 msgid "essentially perfect fit: summary may be unreliable"
-msgstr ""
-"ANOVA F-Tests auf einem im Wesentlichen perfekten Fit sind unzuverlässig"
+msgstr "im Wesentlichen ein perfekter Fit: summary kann unzuverlässig sein"
 
 msgid ""
 "lm object does not have a proper 'qr' component.\n"
@@ -1356,11 +1360,11 @@ msgid ""
 "assuming prediction variance inversely proportional to weights used for "
 "fitting"
 msgstr ""
-"nehme die Vorhersagevarianz als umgehrt proportional zu den beim Fit "
+"nehme die Vorhersagevarianz als umgekehrt proportional zu den beim Fit "
 "genutzten Gewichten an"
 
 msgid "Assuming constant prediction variance even though model fit is weighted"
-msgstr "Nehme konstante Vorhersagevarianz an, obwphl gewichtet gefittet wurde"
+msgstr "Nehme konstante Vorhersagevarianz an, obwohl gewichtet gefittet wurde"
 
 msgid "'weights' as formula should be one-sided"
 msgstr "'weights' als Formel sollte einseitig sein"
@@ -1375,13 +1379,13 @@ msgid "invalid model QR matrix"
 msgstr "ungültige Modell QR Matrix"
 
 msgid "non-NA residual length does not match cases used in fitting"
-msgstr "Länge der nicht-NA Rsiduen passt nicht zur Anzahl Fälle im Fit"
+msgstr "Länge der nicht-NA Residuen passt nicht zur Anzahl Fälle im Fit"
 
 msgid "too few cases, n < k"
 msgstr "zu wenig Fälle, n < k"
 
 msgid "predictors must all be numeric"
-msgstr "Prediktoren müssen alle numerisch sein"
+msgstr "Prädiktoren müssen alle numerisch sein"
 
 msgid "'degree' must be 0, 1 or 2"
 msgstr "'degree' muss 0, 1 oder 2 sein"
@@ -1404,18 +1408,18 @@ msgstr "unzulässiges 'y'"
 msgid ""
 "specified the square of a factor predictor to be dropped when degree = 1"
 msgstr ""
-"das Quadrat eines Faktors als Predictor als zu vernachlässigen angenommen, "
+"das Quadrat eines Faktors als Prädiktor als zu vernachlässigen angenommen, "
 "wenn Grad = 1"
 
 msgid ""
 "specified the square of a predictor to be dropped with only one numeric "
 "predictor"
 msgstr ""
-"das Quadrat eines Predictor als zu vernachlässigen angenommen, wenn nur ein "
-"numerischer Prediktor angegeben"
+"das Quadrat eines Prädiktors als zu vernachlässigen angenommen, wenn nur ein "
+"numerischer Prädiktor angegeben"
 
 msgid "specified parametric for all predictors"
-msgstr "alle Prediktoren als parametrisch spezifiziert"
+msgstr "alle Prädiktoren als parametrisch spezifiziert"
 
 msgid "invalid argument 'span'"
 msgstr "unzulässiges Argument 'span'"
@@ -1439,14 +1443,14 @@ msgid "'logLik.lm' does not support multiple responses"
 msgstr "'logLik.lm' ist für multiple Zielgrößen nicht implementiert"
 
 msgid "no \"nobs\" attribute is available"
-msgstr "keine \"nobs\" Attribut verfügbar"
+msgstr "kein \"nobs\" Attribut verfügbar"
 
 msgid "no 'nobs' method is available"
 msgstr "keine 'nobs' Methode verfügbar"
 
 msgid "'margin' must contain names or numbers corresponding to 'table'"
 msgstr ""
-"'margin' muss Namen oder Zahlen enthalten die mit 'table' korrespondieren"
+"'margin' muss Namen oder Zahlen enthalten, die mit 'table' korrespondieren"
 
 msgid "'start' and 'table' must be same length"
 msgstr "'start' und 'table' müssen dieselbe Länge haben"
@@ -1490,10 +1494,10 @@ msgid "'x' must be a 3-dimensional array"
 msgstr "'x' muss ein 3-dimensionales Array sein"
 
 msgid "if 'x' is not an array, 'y' must be given"
-msgstr "wenn 'x' kein array ist, muss 'y' angegeben werden"
+msgstr "wenn 'x' kein Array ist, muss 'y' angegeben werden"
 
 msgid "if 'x' is not an array, 'z' must be given"
-msgstr "wenn 'x' kein array ist, muss 'z' angegeben werden"
+msgstr "wenn 'x' kein Array ist, muss 'z' angegeben werden"
 
 msgid "'x', 'y', and 'z' must have the same length"
 msgstr "'x', 'y' und 'z' müssen gleich lang sein"
@@ -1505,10 +1509,10 @@ msgid "'x' must be square with at least two rows and columns"
 msgstr "'x' muss quadratisch sein, mindestens 2x2"
 
 msgid "'x' and 'y' must have the same number of levels (minimum 2)"
-msgstr "'x' und 'y' müssen die selbe Zahl Faktorstufen haben (>= 2)"
+msgstr "'x' und 'y' müssen dieselbe Zahl Faktorstufen haben (>= 2)"
 
 msgid "need numeric data"
-msgstr "benötige nummerische Daten"
+msgstr "benötige numerische Daten"
 
 msgid "'mlm' objects with weights are not supported"
 msgstr "Gewichtete 'mlm' Objekte werden nicht unterstützt"
@@ -1520,7 +1524,7 @@ msgid "residuals have rank %s < %s"
 msgstr "Residuen haben Rang %s < %s"
 
 msgid "'model.tables' is not implemented for multiple responses"
-msgstr "'model.tablee' für multiple Antworten nicht implementiert"
+msgstr "'model.tables' für multiple Antworten nicht implementiert"
 
 msgid "type '%s' is not implemented yet"
 msgstr "Typ '%s' noch nicht implementiert"
@@ -1546,7 +1550,7 @@ msgstr ""
 "Standardfehler können über 'se.contrast' berechnet werden"
 
 msgid "SEs for type '%s' are not yet implemented"
-msgstr "SES für Typ '%s' sind noch nicht implementiert"
+msgstr "SEs für Typ '%s' sind noch nicht implementiert"
 
 msgid "na.action must be a function"
 msgstr "na.action muss eine Funktion sein"
@@ -1562,7 +1566,7 @@ msgid "cannot create a formula from a zero-column data frame"
 msgstr "kann aus einem Dataframe ohne Spalten keine Formel generieren"
 
 msgid "no terms component nor attribute"
-msgstr "keine terms Komponente noch Attribut"
+msgstr "weder terms Komponente noch Attribut"
 
 msgid "'termlabels' must be a character vector of length at least one"
 msgstr "'termlabels' muss ein Zeichenkettenvektor mit Länge >= 1 sein"
@@ -1578,13 +1582,13 @@ msgid "variables %s were specified with different types from the fit"
 msgstr "die Variablen %s wurden mit anderen Typen als im Fit angegeben"
 
 msgid "'data' must be a data.frame, not a matrix or an array"
-msgstr "'data' muss ein Dataframe sein, weder Matrix noch array"
+msgstr "'data' muss ein Dataframe sein, weder Matrix noch Array"
 
 msgid "variable '%s' is not a factor"
 msgstr "Variable '%s' is kein Faktor"
 
 msgid "'offset' must be numeric"
-msgstr "'offset' muss nummerisch sein"
+msgstr "'offset' muss numerisch sein"
 
 msgid "model frame and formula mismatch in model.matrix()"
 msgstr "Modellframe und Formel passen in model.matrix() nicht zusammen"
@@ -1651,7 +1655,7 @@ msgid "'control' argument must be a named list"
 msgstr "'control' Argument muss eine benannte Liste sein"
 
 msgid "logical 'hessian' argument not allowed.  See documentation."
-msgstr "Boolesches 'hessian' Argument nicht erlaubt. Siehe Dokumentation'"
+msgstr "Boolesches 'hessian' Argument nicht erlaubt. Siehe Dokumentation."
 
 msgid "'params' has wrong length"
 msgstr "'params' hat falsche Länge"
@@ -1663,7 +1667,7 @@ msgid "'varying' has wrong length"
 msgstr "'varying' hat falsche Länge"
 
 msgid "'varying' must be logical, integer or character"
-msgstr "'varying' muss logisch, ganzzahlig oder Charakter sein "
+msgstr "'varying' muss logisch, ganzzahlig oder Zeichenkette sein "
 
 msgid "invalid argument to 'getProfile'"
 msgstr "unzulässiges Argument für 'getProfile'"
@@ -1787,7 +1791,7 @@ msgid ""
 " and there are no factor predictors; no plot no. 5"
 msgstr ""
 "Schätzwerte sind alle = %s\n"
-"und es gibt keine faktoriellen Prediktoren; kein Plot Nr. 5"
+"und es gibt keine faktoriellen Prädiktoren; keinen Plot Nr. 5"
 
 msgid "'x' and 'T' have incompatible length"
 msgstr "'x' und 'T' haben inkompatible Längen"
@@ -1818,8 +1822,8 @@ msgstr "'sig.level' muss numerisch aus [0, 1] sein"
 
 msgid "exactly one of 'n', 'p1', 'p2', 'power', and 'sig.level' must be NULL"
 msgstr ""
-"genau eine der Variablen  'n', 'p1', 'p2', 'power', und 'sig.level' muss "
-"NULL sein"
+"genau eine der Variablen 'n', 'p1', 'p2', 'power', und 'sig.level' muss NULL "
+"sein"
 
 msgid ""
 "exactly one of 'groups', 'n', 'between.var', 'within.var', 'power', and 'sig."
@@ -1872,7 +1876,8 @@ msgid "both 'x' and 'covmat' were supplied: 'x' will be ignored"
 msgstr "sowohl 'x' als auch 'covmat' sind angegeben: 'x' wird ignoriert"
 
 msgid "'princomp' can only be used with more units than variables"
-msgstr "'princomp' kann nur mit mehr Einheiten als Variablen genutzt werden"
+msgstr ""
+"'princomp' kann nur mit mehr Beobachtungen als Variablen genutzt werden"
 
 msgid "cannot use 'cor = TRUE' with a constant variable"
 msgstr "kann 'cor=TRUE' mit einer konstanten Variablen nicht nutzen"
@@ -1896,7 +1901,7 @@ msgid "elements of 'n' must be positive"
 msgstr "Elemente von 'n' müsse positiv sein"
 
 msgid "elements of 'x' must be nonnegative"
-msgstr "Elemente von 'x' myssen nicht-negativ sein"
+msgstr "Elemente von 'x' müssen nicht-negativ sein"
 
 msgid "elements of 'x' must not be greater than those of 'n'"
 msgstr "Elemente von 'x' dürfen nicht größer sein als die in 'n'"
@@ -1932,7 +1937,7 @@ msgid "invalid argument 'c'"
 msgstr "unzulässiges Argument 'c'"
 
 msgid "arguments 'r' and 'c' must have the same sums"
-msgstr "Argumente 'r' und 'c' müssen die selben Summen besitzen"
+msgstr "Argumente 'r' und 'c' müssen dieselben Summen besitzen"
 
 msgid "'relevel' only for factors"
 msgstr "'relevel' nur für Faktoren"
@@ -1941,7 +1946,7 @@ msgid "'ref' must be of length one"
 msgstr "'ref' muss Länge eins haben"
 
 msgid "'ref' must be an existing level"
-msgstr "'ref' muss eine exisiterende Faktorstufe sein"
+msgstr "'ref' muss eine existierende Faktorstufe sein"
 
 msgid "ref = %d must be in 1L:%d"
 msgstr "ref = %d muss in 1L:%d liegen"
@@ -1950,7 +1955,7 @@ msgid "'sep' must be a character string"
 msgstr "'sep' muss eine Zeichenkette sein"
 
 msgid "failed to guess time-varying variables from their names"
-msgstr "konnte die zeit-veränderlichen Variablen nicht aus den Namen raten"
+msgstr "konnte die zeit-veränderlichen Variablen nicht aus den Namen erraten"
 
 msgid "'varying' arguments must be the same length"
 msgstr "'varying' Argumente müssen gleich lang sein"
@@ -2015,6 +2020,9 @@ msgstr "Versuch NAs zu glätten"
 msgid "invalid 'endrule' argument"
 msgstr "unzulässiges 'endrule' Argument"
 
+msgid ".nknots.smspl() is now exported; use it instead of n.knots()"
+msgstr ".nknots.smspl() wird jetzt exportiert; bitte statt n.knots() nutzen"
+
 msgid "invalid 'control.spar'"
 msgstr "unzulässiges 'control.spar'"
 
@@ -2065,7 +2073,7 @@ msgid "specified both 'df' and 'cv'; will disregard the latter"
 msgstr "sowohl 'df' als auch 'cv' angegeben; letzteres wird ignoriert"
 
 msgid "you must supply 1 < df <= n,  n = #{unique x} ="
-msgstr "Es muss df angegeben werden. 1< df <= n, n=#{verschiedene x} ="
+msgstr "Es muss df angegeben werden. 1 < df <= n, n = #{verschiedene x} ="
 
 msgid "NA lev[]; probably smoothing parameter 'spar' way too large!"
 msgstr ""
@@ -2081,13 +2089,13 @@ msgid "type = \"partial\" is not yet implemented"
 msgstr "type = \"partial' ist noch nicht implementiert"
 
 msgid "not a valid \"smooth.spline\" object"
-msgstr "kein zulässiges \"smooth.splie\" Objekt"
+msgstr "kein zulässiges \"smooth.spline\" Objekt"
 
 msgid "'y' must be numeric vector"
 msgstr "'y' muss ein numerischer Vektor sein"
 
 msgid "number of observations in 'x' and 'y' must match."
-msgstr "Anzahl der Beobahtungen in 'x' und 'y' muss übereinstimmen"
+msgstr "Anzahl der Beobachtungen in 'x' und 'y' muss übereinstimmen"
 
 msgid "number of weights must match number of observations."
 msgstr "Anzahl der Gewichte muss mit der Zahl der Beobachtungen übereinstimmen"
@@ -2155,8 +2163,8 @@ msgstr "keine zulässige Treppenfunktion"
 msgid "'plot.stepfun' called with wrong type of argument 'x'"
 msgstr "'plot.stepfun' mit einem Argument 'x' vom falschen Typ aufgerufen"
 
-msgid "must be 0 or 1"
-msgstr "muss 0 oder 1 sein"
+msgid "%s must be 0 or 1"
+msgstr "%s muss 0 oder 1 sein"
 
 msgid "only univariate series are allowed"
 msgstr "nur univariate Zeitreihen erlaubt"
@@ -2168,10 +2176,10 @@ msgid "unknown string value for s.window"
 msgstr "unbekannter Zeichenkettenwert für s.window"
 
 msgid "'cutpoints' must be unique in 0 < cuts < 1, but are ="
-msgstr "'cutpoints'müssen in 0 < cuts < 1 eindeutig sein, aber sind ="
+msgstr "'cutpoints' müssen in 0 < cuts < 1 eindeutig sein, aber sind ="
 
 msgid "'cutpoints' must be unique, but are ="
-msgstr "'cutpoits' müssen eindeutig sein, aber sind ="
+msgstr "'cutpoints' müssen eindeutig sein, aber sind ="
 
 msgid "'x' must be between -1 and 1"
 msgstr "'x' muss zwischen -1 und 1 liegen"
@@ -2184,13 +2192,14 @@ msgstr ""
 "Anzahl der 'cutpoints' muss eins kleiner sein als die Anzahl der Symbole"
 
 msgid "number of 'cutpoints' must be one more than number of symbols"
-msgstr "Anzahl der 'cutpoint' muss eins kleiner sein als die Zahl der Symbole"
+msgstr ""
+"Anzahl der 'cutpoints' muss eins kleiner sein als die Anzahl der Symbole"
 
 msgid "must have 2 'symbols' for logical 'x' argument"
 msgstr "benötige 2 'symbols' für boolesches 'x' Argument"
 
 msgid "invalid 'abbr.colnames'"
-msgstr "unzulässige 'abbr.collnames'"
+msgstr "unzulässige 'abbr.colnames'"
 
 msgid "'mu' must be a single number"
 msgstr "'mu' muss einzelne Zahl sein"
@@ -2223,31 +2232,31 @@ msgid "not all series have the same frequency"
 msgstr "nicht alle Zeitreihen haben gleiche Frequenz"
 
 msgid "non-intersecting series"
-msgstr "schnittfreie Zeireihen"
+msgstr "schnittfreie Zeitreihen"
 
 msgid "non-time series not of the correct length"
-msgstr "nicht-Zeitreihe het falsche Länge"
+msgstr "nicht-Zeitreihe hat falsche Länge"
 
 msgid "time series contains internal NAs"
-msgstr "Zeireihe enthält innere NAs"
+msgstr "Zeitreihe enthält innere NAs"
 
 msgid "series is corrupt, with no 'tsp' attribute"
-msgstr "Zeitreihe ist korrupt, kein 'tsp' Attribut"
+msgstr "Zeitreihe ist beschädigt, kein 'tsp' Attribut"
 
 msgid "series is corrupt: length %d with 'tsp' implying %d"
-msgstr "Zeitreihe ist korrupt: Länge %d bei 'tsp' das %d impliziert"
+msgstr "Zeitreihe ist beschädigt: Länge %d bei 'tsp' das %d impliziert"
 
 msgid "cannot plot more than 10 series as \"multiple\""
-msgstr "kann nicht mehr als 10 Reihe als \"multiple\" plotten"
+msgstr "kann nicht mehr als 10 Reihen als \"multiple\" plotten"
 
 msgid "scatter plots only for univariate time series"
 msgstr "Scatterplots nur für univariate Zeitreihen"
 
 msgid "'xy.labels' must be logical or character"
-msgstr "'xy.labels' müssen boolesch oder Charakter sein"
+msgstr "'xy.labels' müssen boolesch oder Zeichenkette sein"
 
 msgid "'frequency' and 'deltat' are both supplied and are inconsistent"
-msgstr "'frequncy' und 'deltat' angegeben aber inkosistent."
+msgstr "'frequency' und 'deltat' angegeben aber inkosistent"
 
 msgid "'frequency' not changed"
 msgstr "'frequency' nicht geändert"
@@ -2299,7 +2308,7 @@ msgid "'ar' part of model is not stationary"
 msgstr "'ar' Teil des Modells ist nicht stationär"
 
 msgid "burn-in 'n.start' must be as long as 'ar + ma'"
-msgstr "Vorlaudf 'n.start' muss so lang sein wie 'ar + ma'"
+msgstr "Vorlauf 'n.start' muss so lang sein wie 'ar + ma'"
 
 msgid "'model$order' must be of length 3"
 msgstr "'model$order' muss Länge 3 haben"
@@ -2352,7 +2361,7 @@ msgstr "%s ist nur für zweifache Tabellen anwendbar"
 
 msgid "too few distinct input values to fit an asymptotic regression model"
 msgstr ""
-"zu wenig verschiedene Eingabewerte, um asymtotisches REgreesionsmodell "
+"zu wenig verschiedene Eingabewerte, um asymtotisches Regressionsmodell "
 "anzupassen"
 
 msgid "cannot fit an asymptotic regression model to these data"
@@ -2375,10 +2384,11 @@ msgstr ""
 "anzupassen"
 
 msgid "must have length of response = length of second argument to 'SSfol'"
-msgstr "es muss Länge der Zielgröße = Länge des zweiten Argumentes gelten"
+msgstr ""
+"es muss Länge der Zielgröße = Länge des zweiten Argumentes für 'SSfol' gelten"
 
 msgid "must have at least 4 observations to fit an 'SSfol' model"
-msgstr "mindestens 4 Beobachtungen nötig, um ein 'ssfol' Modell anzupassen"
+msgstr "mindestens 4 Beobachtungen nötig, um ein 'SSfol' Modell anzupassen"
 
 msgid "too few distinct input values to fit a four-parameter logistic"
 msgstr ""
@@ -2435,11 +2445,6 @@ msgid_plural "extra arguments %s are not of class \"%s\"s"
 msgstr[0] "zusätzliches Argument %s ist nicht aus Klasse \"%s\""
 msgstr[1] "zusätzliche Argumente %s sind nicht aus Klasse \"%s\""
 
-msgid "extra argument %s will be disregarded"
-msgid_plural "extra arguments %s will be disregarded"
-msgstr[0] "zusätzliches Argument %s wird verworfen"
-msgstr[1] "zusätzliche Argumente %s werden verworfen"
-
 msgid "%d factor is too many for %d variables"
 msgid_plural "%d factors are too many for %d variables"
 msgstr[0] "%d Faktor ist zu viel für %d Variablen"
@@ -2455,6 +2460,11 @@ msgid_plural "unable to optimize from these starting values"
 msgstr[0] "kann von diesem Startwert aus nicht optimieren"
 msgstr[1] "kann von diesen Startwerten aus nicht optimieren"
 
+msgid "'init' must have %d column"
+msgid_plural "'init' must have 1 or %d columns"
+msgstr[0] "'init' muss %d Spalte haben"
+msgstr[1] "'init' muss 1 oder %d Spalten haben"
+
 msgid "X matrix has rank %d, but only %d observation"
 msgid_plural "X matrix has rank %d, but only %d observations"
 msgstr[0] "X Matrix hat Rang %d, aber nur %d Beobachtung"
@@ -2545,6 +2555,29 @@ msgid_plural "'start.innov' is too short: need %d points"
 msgstr[0] "'start.innov' ist zu kurz: benötige %d Punkt"
 msgstr[1] "'start.innov' ist zu kurz: benötige %d Punkte"
 
+#~ msgid "non-matched further arguments are disregarded"
+#~ msgstr "übrige Argumente ohne Entsprechung werden verworfen"
+
+#~ msgid "extra argument %s will be disregarded"
+#~ msgid_plural "extra arguments %s will be disregarded"
+#~ msgstr[0] "zusätzliches Argument %s wird verworfen"
+#~ msgstr[1] "zusätzliche Argumente %s werden verworfen"
+
+#~ msgid "'merge' and 'height' do not fit!"
+#~ msgstr "'merge' und 'height' passen nicht"
+
+#~ msgid "invalid dendrogram"
+#~ msgstr "unzulässiges Dendrogramm"
+
+#~ msgid "'merge' component in dendrogram must be integer"
+#~ msgstr "Die 'merge' Komponente in einem Dendrogramm muss ganzzahlig sein"
+
+#~ msgid "probabilities cannot be negative nor all 0"
+#~ msgstr "Wahrscheinlichkeiten können weder negativ noch alle gleich 0 sein"
+
+#~ msgid "'init' must have 1 or %d columns"
+#~ msgstr "'init' muss 1 oder %d Spalte(n) haben"
+
 #~ msgid "'deriv' must be between 0 and 2"
 #~ msgstr "'deriv' muss zwischen 0 und 2 liegen"
 
diff --git a/src/library/stats/po/R-fr.po b/src/library/stats/po/R-fr.po
index 6ecfaf0..8db90fe 100644
--- a/src/library/stats/po/R-fr.po
+++ b/src/library/stats/po/R-fr.po
@@ -7,7 +7,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: R 2.12.0\n"
 "Report-Msgid-Bugs-To: bugs.r-project.org\n"
-"POT-Creation-Date: 2014-03-27 07:47\n"
+"POT-Creation-Date: 2016-04-01 09:50\n"
 "PO-Revision-Date: 2014-03-17 11:23+0100\n"
 "Last-Translator: Philippe Grosjean <phgrosjean at sciviews.org>\n"
 "Language-Team: French <R-core at r-project.org>\n"
@@ -110,6 +110,9 @@ msgstr "x$lag doit avoir au moins une colonne"
 msgid "can use ci.type=\"ma\" only if first lag is 0"
 msgstr "ci.type=\"ma\" ne peut �tre utilis� que si le premier d�calage vaut 0"
 
+msgid "Page [%d,%d]: i =%s; j =%s"
+msgstr ""
+
 msgid "univariate time series only"
 msgstr "s�ries temporelles univari�es seulement"
 
@@ -483,6 +486,12 @@ msgstr "l'approximation du Chi-2 est peut-
 msgid "NA values not allowed in 'd'"
 msgstr "NA non autoris�es dans 'd'"
 
+msgid "eig=TRUE is disregarded when list.=FALSE"
+msgstr ""
+
+msgid "x.ret=TRUE is disregarded when list.=FALSE"
+msgstr ""
+
 msgid "distances must be result of 'dist' or a square matrix"
 msgstr "les distances doivent provenir de 'dist' ou d'une matrice carr�e"
 
@@ -495,6 +504,9 @@ msgstr "'k' doit 
 msgid "only %d of the first %d eigenvalues are > 0"
 msgstr "seulement %d des premi�res  %d valeurs propres sont positives"
 
+msgid "package 'MASS' must be installed"
+msgstr ""
+
 msgid "initial value is not in the interior of the feasible region"
 msgstr ""
 "la valeur initiale ne se trouve pas � l'int�rieur de la r�gion admissible"
@@ -541,6 +553,10 @@ msgstr "vous devez fournir un ou plusieurs vecteurs"
 msgid "arguments must have the same length"
 msgstr "les arguments doivent avoir la m�me longueur"
 
+#, fuzzy
+msgid "wrong number of columns in new data:"
+msgstr "le nombre de colonnes de 'x' est incorrect"
+
 msgid "contrasts apply only to factors"
 msgstr "les contrastes s'appliquent uniquement aux facteurs"
 
@@ -636,8 +652,10 @@ msgstr "la composante 'height' de 'tree' n'est pas tri
 msgid "elements of 'k' must be between 1 and %d"
 msgstr "les �l�ments de 'k' doivent �tre compris entre 1 et %d"
 
-msgid "'merge' and 'height' do not fit!"
-msgstr "'merge' et 'height' ne se correspondent pas"
+msgid ""
+"dendrogram entries must be 1,2,..,%d (in any order), to be coercible to "
+"\"hclust\""
+msgstr ""
 
 msgid "dendrogram node with non-positive #{branches}"
 msgstr "un noeud du dendrogramme a un nombre de branches < 1"
@@ -696,9 +714,6 @@ msgstr "'ColSideColors' doit 
 msgid "'RowSideColors' must be a character vector of length nrow(x)"
 msgstr "'RowSideColors' doit �tre un vecteur de caract�res de longueur nrow(x)"
 
-msgid "non-matched further arguments are disregarded"
-msgstr "les arguments non nomm�s ult�rieurs sont ignor�s"
-
 msgid "argument 'x' must be numeric"
 msgstr "l'argument 'x' doit �tre num�rique"
 
@@ -774,8 +789,9 @@ msgstr "sp
 msgid "x[] and prob[] must be equal length vectors."
 msgstr "x[] et prob[] doivent �tre des vecteur de m�me longueur"
 
-msgid "probabilities cannot be negative nor all 0"
-msgstr "les probabilit�s ne peuvent pas �tre n�gatives, ni toutes nulles"
+#, fuzzy
+msgid "probabilities must be finite, non-negative and not all 0"
+msgstr "les probabilit�s doivent �tre positives ou nulles"
 
 msgid "'x' must be non-negative"
 msgstr "'x' doit �tre positif ou nul"
@@ -789,6 +805,9 @@ msgstr "'prob' et 'mu' sp
 msgid "some terms will have NAs due to the limits of the method"
 msgstr "certains termes auront des NAs du fait des limites de la m�thode"
 
+msgid "multivariate case with missing coefficients is not yet implemented"
+msgstr ""
+
 msgid "'x' must have 1 or more non-missing values"
 msgstr "'x' doit avoir au moins une valeur non manquante"
 
@@ -918,7 +937,10 @@ msgstr ""
 "seules les valeurs positives sont autoris�es pour la famille 'inverse."
 "gaussian'"
 
-msgid "need CRAN package 'SuppDists' for the 'inverse.gaussian' family"
+#, fuzzy
+msgid ""
+"need CRAN package 'SuppDists' for simulation from the 'inverse.gaussian' "
+"family"
 msgstr ""
 "le package 'SuppDists' de CRAN est n�cessaire pour la famille 'inverse."
 "gaussian'"
@@ -951,12 +973,6 @@ msgstr "'circular' doit 
 msgid "length of 'init' must equal length of 'filter'"
 msgstr "la longueur de 'init' doit �tre �gale � la longueur de 'filter'"
 
-msgid "'init' must have 1 column"
-msgstr "'init' doit avoir une colonne"
-
-msgid "'init' must have 1 or %d columns"
-msgstr "'init' doit avoir 1 ou %d colonnes"
-
 msgid "'x' must have at least 2 rows and columns"
 msgstr "'x' doit avoir au moins 2 lignes et colonnes"
 
@@ -1188,12 +1204,6 @@ msgstr "il faut n >= 2 objets pour une classification"
 msgid "invalid length of members"
 msgstr "longueur des membres incorrecte"
 
-msgid "invalid dendrogram"
-msgstr "dendrogramme incorrect"
-
-msgid "'merge' component in dendrogram must be integer"
-msgstr "la composante 'merge' du dendrogramme doit �tre un entier"
-
 msgid "argument 'x' cannot be coerced to class %s"
 msgstr ""
 "l'argument 'x' ne peut pas �tre converti automatiquement en objet de classe "
@@ -1223,8 +1233,8 @@ msgstr "tous les 
 msgid "invalid parameter values"
 msgstr "valeurs des param�tres incorrectes"
 
-msgid "a limit is missing"
-msgstr "il manque une limite"
+msgid "a limit is NA or NaN"
+msgstr ""
 
 msgid "missing values not allowed"
 msgstr "valeurs manquantes non autoris�es"
@@ -1303,6 +1313,12 @@ msgstr "'iter.max' doit 
 msgid "must have same number of columns in 'x' and 'centers'"
 msgstr "'x' et 'centers' doivent avoir le m�me nombre de colonnes"
 
+msgid "'x' is a list, so ignoring argument 'g'"
+msgstr ""
+
+msgid "some elements of 'x' are not numeric and will be coerced to numeric"
+msgstr ""
+
 msgid "not enough 'x' data"
 msgstr "pas assez de donn�es 'x'"
 
@@ -1451,6 +1467,10 @@ msgstr "NCOL(X) incorrect"
 msgid "only 1-4 predictors are allowed"
 msgstr "pas plus de 4 pr�dicteurs autoris�s"
 
+#, fuzzy
+msgid "invalid NROW(X)"
+msgstr "NCOL(X) incorrect"
+
 msgid "invalid 'y'"
 msgstr "'y' incorrect"
 
@@ -1479,6 +1499,13 @@ msgstr "argument 'cell' incorrect"
 msgid "invalid argument 'degree'"
 msgstr "argument 'degree' incorrect"
 
+msgid "iterTrace ="
+msgstr ""
+
+#, fuzzy
+msgid "not obeyed as iterations ="
+msgstr "aucune observation finie"
+
 msgid "first argument must be a \"loess\" object"
 msgstr "le premier argument doit �tre un objet \"loess\""
 
@@ -1697,8 +1724,8 @@ msgstr "pas de changement de signe apr
 msgid ""
 "did not succeed extending the interval endpoints for f(lower) * f(upper) <= 0"
 msgstr ""
-"impossible d'�tendre l'intervalle des points extr�mes pour f(lower) * f"
-"(upper) <= 0"
+"impossible d'�tendre l'intervalle des points extr�mes pour f(lower) * "
+"f(upper) <= 0"
 
 msgid "f() values at end points not of opposite sign"
 msgstr "les valeurs de f() aux points extr�mes ne sont pas de signe oppos�"
@@ -2025,8 +2052,8 @@ msgstr ""
 msgid "'varying' arguments must be the same length"
 msgstr "les arguments varying doivent avoir la m�me longueur"
 
-msgid "'times' is wrong length"
-msgstr "'times' n'a pas la bonne longueur"
+msgid "'lengths(varying)' must all match 'length(times)'"
+msgstr ""
 
 msgid "there are records with missing times, which will be dropped."
 msgstr ""
@@ -2089,6 +2116,9 @@ msgstr "tentative de lisser des valeurs NA"
 msgid "invalid 'endrule' argument"
 msgstr "argument 'endrule' incorrect"
 
+msgid ".nknots.smspl() is now exported; use it instead of n.knots()"
+msgstr ""
+
 msgid "invalid 'control.spar'"
 msgstr "'control.spar' incorrect"
 
@@ -2235,7 +2265,8 @@ msgstr "ce n'est pas une fonction step correcte"
 msgid "'plot.stepfun' called with wrong type of argument 'x'"
 msgstr "appel � 'plot.stepfun' avec un argument 'x' de type incorrect"
 
-msgid "must be 0 or 1"
+#, fuzzy
+msgid "%s must be 0 or 1"
 msgstr "doit �tre 0 ou 1"
 
 msgid "only univariate series are allowed"
@@ -2527,11 +2558,6 @@ msgid_plural "extra arguments %s are not of class \"%s\"s"
 msgstr[0] "l'argument suppl�mentaire %s n'est pas un \"%s\""
 msgstr[1] "les arguments suppl�mentaires %s ne sont pas des \"%s\""
 
-msgid "extra argument %s will be disregarded"
-msgid_plural "extra arguments %s will be disregarded"
-msgstr[0] "argument suppl�mentaire %s ignor�s"
-msgstr[1] "arguments suppl�mentaires %s ignor�s"
-
 msgid "%d factor is too many for %d variables"
 msgid_plural "%d factors are too many for %d variables"
 msgstr[0] "%d facteur, c'est trop pour %d variables"
@@ -2547,6 +2573,12 @@ msgid_plural "unable to optimize from these starting values"
 msgstr[0] "optimisation impossible � partir de la valeur initiale"
 msgstr[1] "optimisation impossible � partir de ces valeurs initiales"
 
+#, fuzzy
+msgid "'init' must have %d column"
+msgid_plural "'init' must have 1 or %d columns"
+msgstr[0] "'init' doit avoir une colonne"
+msgstr[1] "'init' doit avoir une colonne"
+
 msgid "X matrix has rank %d, but only %d observation"
 msgid_plural "X matrix has rank %d, but only %d observations"
 msgstr[0] "la matrice X est de rang %d, mais n'a que %d observation"
@@ -2637,6 +2669,35 @@ msgid_plural "'start.innov' is too short: need %d points"
 msgstr[0] "'start.innov' est trop court : il faut %d point"
 msgstr[1] "'start.innov' est trop court : il faut %d points"
 
+#~ msgid "a limit is missing"
+#~ msgstr "il manque une limite"
+
+#~ msgid "'times' is wrong length"
+#~ msgstr "'times' n'a pas la bonne longueur"
+
+#~ msgid "non-matched further arguments are disregarded"
+#~ msgstr "les arguments non nomm�s ult�rieurs sont ignor�s"
+
+#~ msgid "extra argument %s will be disregarded"
+#~ msgid_plural "extra arguments %s will be disregarded"
+#~ msgstr[0] "argument suppl�mentaire %s ignor�s"
+#~ msgstr[1] "arguments suppl�mentaires %s ignor�s"
+
+#~ msgid "'merge' and 'height' do not fit!"
+#~ msgstr "'merge' et 'height' ne se correspondent pas"
+
+#~ msgid "invalid dendrogram"
+#~ msgstr "dendrogramme incorrect"
+
+#~ msgid "'merge' component in dendrogram must be integer"
+#~ msgstr "la composante 'merge' du dendrogramme doit �tre un entier"
+
+#~ msgid "probabilities cannot be negative nor all 0"
+#~ msgstr "les probabilit�s ne peuvent pas �tre n�gatives, ni toutes nulles"
+
+#~ msgid "'init' must have 1 or %d columns"
+#~ msgstr "'init' doit avoir 1 ou %d colonnes"
+
 #~ msgid "'deriv' must be between 0 and 2"
 #~ msgstr "'deriv' doit �tre compris entre 0 et 2"
 
diff --git a/src/library/stats/po/R-it.po b/src/library/stats/po/R-it.po
index 5b14d29..ef8693b 100644
--- a/src/library/stats/po/R-it.po
+++ b/src/library/stats/po/R-it.po
@@ -2,7 +2,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: R 2.3.0\n"
 "Report-Msgid-Bugs-To: bugs.r-project.org\n"
-"POT-Creation-Date: 2014-03-27 07:47\n"
+"POT-Creation-Date: 2016-04-01 09:50\n"
 "PO-Revision-Date: 2005-04-14 18:07+0200\n"
 "Last-Translator: stefano iacus <>\n"
 "Language-Team: Italian <it at li.org>\n"
@@ -111,6 +111,9 @@ msgstr "x$lag deve avere almeno 1 colonna"
 msgid "can use ci.type=\"ma\" only if first lag is 0"
 msgstr "si può usare ci.type=\"ma\" solo se il primo lag è 0"
 
+msgid "Page [%d,%d]: i =%s; j =%s"
+msgstr ""
+
 msgid "univariate time series only"
 msgstr "solo serie storiche unidimensionali"
 
@@ -489,6 +492,12 @@ msgstr "L'approssimazione al Chi-quadrato potrebbe essere inesatta"
 msgid "NA values not allowed in 'd'"
 msgstr "valori NA non ammessi in 'd'"
 
+msgid "eig=TRUE is disregarded when list.=FALSE"
+msgstr ""
+
+msgid "x.ret=TRUE is disregarded when list.=FALSE"
+msgstr ""
+
 msgid "distances must be result of 'dist' or a square matrix"
 msgstr ""
 "le distanze devono essere il risultato di 'dist' o una matrice quadrata"
@@ -504,6 +513,9 @@ msgstr "'k' deve essere in {1, 2, ..  n - 1}"
 msgid "only %d of the first %d eigenvalues are > 0"
 msgstr "alcuni dei primi %d autovalori sono < 0"
 
+msgid "package 'MASS' must be installed"
+msgstr ""
+
 #, fuzzy
 msgid "initial value is not in the interior of the feasible region"
 msgstr "valore iniziale non ammissimibile"
@@ -550,6 +562,10 @@ msgstr "fornire uno o più vettori"
 msgid "arguments must have the same length"
 msgstr "gli argomenti devono avere la stessa lunghezza"
 
+#, fuzzy
+msgid "wrong number of columns in new data:"
+msgstr "numero di colonne sbagliate in 'x'"
+
 msgid "contrasts apply only to factors"
 msgstr "i contrasti si applicano solo a variabili factor"
 
@@ -652,8 +668,10 @@ msgstr ""
 msgid "elements of 'k' must be between 1 and %d"
 msgstr "gli elementi di 'k' devono essere tra 1 e %d"
 
-msgid "'merge' and 'height' do not fit!"
-msgstr "'merge' e 'height' in disaccordo!"
+msgid ""
+"dendrogram entries must be 1,2,..,%d (in any order), to be coercible to "
+"\"hclust\""
+msgstr ""
 
 msgid "dendrogram node with non-positive #{branches}"
 msgstr "nodo del dendrogramma con #{branches} non positivi"
@@ -711,10 +729,6 @@ msgstr "'ColSideColors' deve essere un vettore carattere di lunghezza ncol(x)"
 msgid "'RowSideColors' must be a character vector of length nrow(x)"
 msgstr "'RowSideColors' deve essere un vettore carattere di lunghezza nrow(x)"
 
-#, fuzzy
-msgid "non-matched further arguments are disregarded"
-msgstr "argometni extra ignorati"
-
 msgid "argument 'x' must be numeric"
 msgstr "l'argomento 'x' deve essere numerico"
 
@@ -793,8 +807,8 @@ msgid "x[] and prob[] must be equal length vectors."
 msgstr "x[] e prob[] devono essere vettore della stessa lunghezza."
 
 #, fuzzy
-msgid "probabilities cannot be negative nor all 0"
-msgstr "le probaiblità non possono essere negative o tutte 0"
+msgid "probabilities must be finite, non-negative and not all 0"
+msgstr "le probabilità devono essere non negative."
 
 msgid "'x' must be non-negative"
 msgstr "'x' deve essere non negativo"
@@ -808,6 +822,9 @@ msgstr "'prob' e 'mu' specificate entrambi"
 msgid "some terms will have NAs due to the limits of the method"
 msgstr "alcuni termini saranno NA a causa della limitazione del metodo"
 
+msgid "multivariate case with missing coefficients is not yet implemented"
+msgstr ""
+
 msgid "'x' must have 1 or more non-missing values"
 msgstr "'x' deve avere 1 o più valori non mancanti"
 
@@ -946,7 +963,9 @@ msgid "positive values only are allowed for the 'inverse.gaussian' family"
 msgstr "sono ammessi solo valori positivi per la famiglia gaussiana inversa"
 
 #, fuzzy
-msgid "need CRAN package 'SuppDists' for the 'inverse.gaussian' family"
+msgid ""
+"need CRAN package 'SuppDists' for simulation from the 'inverse.gaussian' "
+"family"
 msgstr "sono ammessi solo valori positivi per la famiglia gaussiana inversa"
 
 msgid "using weights as inverse variances"
@@ -977,14 +996,6 @@ msgstr ""
 msgid "length of 'init' must equal length of 'filter'"
 msgstr "la lunghezza di 'init' deve essere uguale a quella di 'filter' "
 
-#, fuzzy
-msgid "'init' must have 1 column"
-msgstr "'init'; deve avere 1 o %d colonne"
-
-#, fuzzy
-msgid "'init' must have 1 or %d columns"
-msgstr "'init'; deve avere 1 o %d colonne"
-
 msgid "'x' must have at least 2 rows and columns"
 msgstr "'x' deve avere almeno 2 righe e colonne"
 
@@ -1220,12 +1231,6 @@ msgstr "si devono avere n >= 2 oggetti per una cluster"
 msgid "invalid length of members"
 msgstr "lunghezza dei membri non valida"
 
-msgid "invalid dendrogram"
-msgstr "dendrogramma non valido"
-
-msgid "'merge' component in dendrogram must be integer"
-msgstr "la componente 'merge' del dendrogramma deve essere di tipo integer"
-
 #, fuzzy
 msgid "argument 'x' cannot be coerced to class %s"
 msgstr "l'argomento 'x' non può essere trasformato di classe \"hclust\""
@@ -1254,8 +1259,8 @@ msgstr "tutti gli elementi di 'which' devono essere tra 1 e %d"
 msgid "invalid parameter values"
 msgstr "valori dei parametri non validi"
 
-msgid "a limit is missing"
-msgstr "manca un limite"
+msgid "a limit is NA or NaN"
+msgstr ""
 
 #, fuzzy
 msgid "missing values not allowed"
@@ -1338,6 +1343,12 @@ msgstr "'iter.max' deve essere positivo"
 msgid "must have same number of columns in 'x' and 'centers'"
 msgstr "'x' e 'centers' devono avere lo stesso numero di colonne"
 
+msgid "'x' is a list, so ignoring argument 'g'"
+msgstr ""
+
+msgid "some elements of 'x' are not numeric and will be coerced to numeric"
+msgstr ""
+
 msgid "not enough 'x' data"
 msgstr "dati 'x' insufficienti"
 
@@ -1473,6 +1484,10 @@ msgstr "'x' non valida"
 msgid "only 1-4 predictors are allowed"
 msgstr "permessi solo 1-4 predittori"
 
+#, fuzzy
+msgid "invalid NROW(X)"
+msgstr "'x' non valida"
+
 msgid "invalid 'y'"
 msgstr "'y' non valida"
 
@@ -1500,6 +1515,13 @@ msgstr "argomento 'omit' non valido"
 msgid "invalid argument 'degree'"
 msgstr "argomento 'omit' non valido"
 
+msgid "iterTrace ="
+msgstr ""
+
+#, fuzzy
+msgid "not obeyed as iterations ="
+msgstr "non ci sono abbastanza osservazioni finite"
+
 msgid "first argument must be a \"loess\" object"
 msgstr "il primo argomento deve essere un oggetto \"loess\""
 
@@ -2061,8 +2083,8 @@ msgstr ""
 msgid "'varying' arguments must be the same length"
 msgstr "gli argomenti 'varying' devono avere la stessa lunghezza"
 
-msgid "'times' is wrong length"
-msgstr "'times' ha lunghezza sbagliata"
+msgid "'lengths(varying)' must all match 'length(times)'"
+msgstr ""
 
 msgid "there are records with missing times, which will be dropped."
 msgstr "ci sono record con 'times' mancanti, saranno ignorati"
@@ -2129,6 +2151,9 @@ msgstr "tentativo di allisciare valori NA"
 msgid "invalid 'endrule' argument"
 msgstr "argomento 'data' non valido"
 
+msgid ".nknots.smspl() is now exported; use it instead of n.knots()"
+msgstr ""
+
 msgid "invalid 'control.spar'"
 msgstr "'control.spar' non valido"
 
@@ -2280,7 +2305,8 @@ msgstr "non è una funzione a gradini valida"
 msgid "'plot.stepfun' called with wrong type of argument 'x'"
 msgstr "'plot.stepfun' chiamata con argomento 'x' di tipo sbagliato"
 
-msgid "must be 0 or 1"
+#, fuzzy
+msgid "%s must be 0 or 1"
 msgstr "deve essere 0 o 1"
 
 msgid "only univariate series are allowed"
@@ -2576,12 +2602,6 @@ msgstr[0] "argometni extra ignorati"
 msgstr[1] "argometni extra ignorati"
 
 #, fuzzy
-msgid "extra argument %s will be disregarded"
-msgid_plural "extra arguments %s will be disregarded"
-msgstr[0] "argometni extra ignorati"
-msgstr[1] "argometni extra ignorati"
-
-#, fuzzy
 msgid "%d factor is too many for %d variables"
 msgid_plural "%d factors are too many for %d variables"
 msgstr[0] "%d variabili factor sono troppe per %d variabili"
@@ -2600,6 +2620,12 @@ msgstr[0] "impossibile ottimizzare partendo da questi valori"
 msgstr[1] "impossibile ottimizzare partendo da questi valori"
 
 #, fuzzy
+msgid "'init' must have %d column"
+msgid_plural "'init' must have 1 or %d columns"
+msgstr[0] "'init'; deve avere 1 o %d colonne"
+msgstr[1] "'init'; deve avere 1 o %d colonne"
+
+#, fuzzy
 msgid "X matrix has rank %d, but only %d observation"
 msgid_plural "X matrix has rank %d, but only %d observations"
 msgstr[0] "la matrice X ha rango %d, ma solo %d osservazioni"
@@ -2702,6 +2728,39 @@ msgid_plural "'start.innov' is too short: need %d points"
 msgstr[0] ""
 msgstr[1] ""
 
+#~ msgid "a limit is missing"
+#~ msgstr "manca un limite"
+
+#~ msgid "'times' is wrong length"
+#~ msgstr "'times' ha lunghezza sbagliata"
+
+#, fuzzy
+#~ msgid "non-matched further arguments are disregarded"
+#~ msgstr "argometni extra ignorati"
+
+#, fuzzy
+#~ msgid "extra argument %s will be disregarded"
+#~ msgid_plural "extra arguments %s will be disregarded"
+#~ msgstr[0] "argometni extra ignorati"
+#~ msgstr[1] "argometni extra ignorati"
+
+#~ msgid "'merge' and 'height' do not fit!"
+#~ msgstr "'merge' e 'height' in disaccordo!"
+
+#~ msgid "invalid dendrogram"
+#~ msgstr "dendrogramma non valido"
+
+#~ msgid "'merge' component in dendrogram must be integer"
+#~ msgstr "la componente 'merge' del dendrogramma deve essere di tipo integer"
+
+#, fuzzy
+#~ msgid "probabilities cannot be negative nor all 0"
+#~ msgstr "le probaiblità non possono essere negative o tutte 0"
+
+#, fuzzy
+#~ msgid "'init' must have 1 or %d columns"
+#~ msgstr "'init'; deve avere 1 o %d colonne"
+
 #, fuzzy
 #~ msgid "'deriv' must be between 0 and 2"
 #~ msgstr "'p' deve essere tra 0 e 0.5"
diff --git a/src/library/stats/po/R-ja.po b/src/library/stats/po/R-ja.po
index 90a18bb..48b854b 100644
--- a/src/library/stats/po/R-ja.po
+++ b/src/library/stats/po/R-ja.po
@@ -2,8 +2,8 @@ msgid ""
 msgstr ""
 "Project-Id-Version: R 2.3.0 \n"
 "Report-Msgid-Bugs-To: bugs.r-project.org\n"
-"POT-Creation-Date: 2014-03-27 07:47\n"
-"PO-Revision-Date: 2014-03-26 10:17+0200 \n"
+"POT-Creation-Date: 2016-04-01 09:50\n"
+"PO-Revision-Date: 2015-03-27 14:18+0900 \n"
 "Last-Translator: Masafumi  \n"
 "Language-Team: RjpWiki Message Translation Team <mokada at md.tsukuba.ac.jp> \n"
 "Language: ja \n"
@@ -11,7 +11,8 @@ msgstr ""
 "Content-Type: text/plain; charset=UTF-8 \n"
 "Content-Transfer-Encoding: 8bit \n"
 "Plural-Forms: nplurals=1; plural=0; \n"
-"X-Generator: Pootle 2.0.5 \n"
+"X-Generator: Pootle 2.5.1.1 \n"
+"X-POOTLE-MTIME: 1427433504.000000 \n"
 
 msgid "models are not all fitted to the same number of observations"
 msgstr " モデルあてはめに使用した観察数が全て同じではありません "
@@ -101,6 +102,9 @@ msgstr " x$lag は少なくとも 1 つの列を含まねばなりません "
 msgid "can use ci.type=\"ma\" only if first lag is 0"
 msgstr " 第一ラグが 0 であるときだけ ci.type=\"ma\" を使用することができます "
 
+msgid "Page [%d,%d]: i =%s; j =%s"
+msgstr " ページ [%d,%d]: i =%s; j =%s "
+
 msgid "univariate time series only"
 msgstr " 一変量時系列専用です "
 
@@ -468,6 +472,12 @@ msgstr " カイ自乗近似は不正確かもしれません "
 msgid "NA values not allowed in 'd'"
 msgstr " 'd' 中には NA 値は許されません "
 
+msgid "eig=TRUE is disregarded when list.=FALSE"
+msgstr ""
+
+msgid "x.ret=TRUE is disregarded when list.=FALSE"
+msgstr ""
+
 msgid "distances must be result of 'dist' or a square matrix"
 msgstr " 距離は 'dist' の結果であるか、正方行列である必要があります "
 
@@ -480,6 +490,9 @@ msgstr " 'k' は {1, 2, .. n - 1} 内にある必要があります "
 msgid "only %d of the first %d eigenvalues are > 0"
 msgstr " %d 個の固有値 (最初の %d 個のうち) だけが正です "
 
+msgid "package 'MASS' must be installed"
+msgstr ""
+
 msgid "initial value is not in the interior of the feasible region"
 msgstr " 初期値は実行可能な範囲の内部にありません "
 
@@ -521,6 +534,10 @@ msgstr " 1 つ以上のベクトルを与えなければなりません "
 msgid "arguments must have the same length"
 msgstr " 引数は同じ長さでなければなりません "
 
+#, fuzzy
+msgid "wrong number of columns in new data:"
+msgstr " 'x' の列数が間違っています "
+
 msgid "contrasts apply only to factors"
 msgstr " 対比は因子にしか適用できません "
 
@@ -615,8 +632,12 @@ msgstr " 'tree' の 'height' 成分は昇順にソートされていません "
 msgid "elements of 'k' must be between 1 and %d"
 msgstr " 'k' の要素は 1 と %d の間になければなりません "
 
-msgid "'merge' and 'height' do not fit!"
-msgstr " 'merge' と 'height' が合致していません! "
+msgid ""
+"dendrogram entries must be 1,2,..,%d (in any order), to be coercible to "
+"\"hclust\""
+msgstr ""
+" \"hclust\"に適合するためには、デンドログラムの要素は1,2,...,%d (順序は問わな"
+"い)である必要があります "
 
 msgid "dendrogram node with non-positive #{branches}"
 msgstr " 枝数が正でないデンドログラムノードです "
@@ -671,9 +692,6 @@ msgstr " 'ColSideColors' は長さの ncol(x) の文字ベクトルでなけれ
 msgid "'RowSideColors' must be a character vector of length nrow(x)"
 msgstr " 'RowSideColors' は長さ nrow(x) の文字ベクトルでなければなりません "
 
-msgid "non-matched further arguments are disregarded"
-msgstr " 余計な引数は捨てられました "
-
 msgid "argument 'x' must be numeric"
 msgstr " 引数 'x' は数値でなければなりません "
 
@@ -746,8 +764,10 @@ msgstr " 'rate' または 'scale' のどちらか一方を指定してくださ
 msgid "x[] and prob[] must be equal length vectors."
 msgstr " x[] と prob[] は等しい長さのベクトルでなければなりません "
 
-msgid "probabilities cannot be negative nor all 0"
-msgstr " 確率は負になれませんし、全てが 0 にはなり得ません "
+msgid "probabilities must be finite, non-negative and not all 0"
+msgstr ""
+" probabilities は有限であり、負ではない値であって、すべてが0であってはいけま"
+"せん "
 
 msgid "'x' must be non-negative"
 msgstr " 'x' は非負でなければなりません "
@@ -761,6 +781,9 @@ msgstr " 'prob' と 'mu' の双方が指定されました "
 msgid "some terms will have NAs due to the limits of the method"
 msgstr " メソッドの限界のために幾つかの項は NA 値を持つでしょう "
 
+msgid "multivariate case with missing coefficients is not yet implemented"
+msgstr ""
+
 msgid "'x' must have 1 or more non-missing values"
 msgstr " 'x' は 1 つ以上の非欠損値を持たなければなりません "
 
@@ -884,7 +907,10 @@ msgstr ""
 msgid "positive values only are allowed for the 'inverse.gaussian' family"
 msgstr " 'inverse.gaussian' ファミリでは正の値しか許されません "
 
-msgid "need CRAN package 'SuppDists' for the 'inverse.gaussian' family"
+#, fuzzy
+msgid ""
+"need CRAN package 'SuppDists' for simulation from the 'inverse.gaussian' "
+"family"
 msgstr ""
 " 'inverse.gaussian' ファミリには CRAN パッケージ 'SuppDists' が必要です "
 
@@ -916,12 +942,6 @@ msgstr " 'circular' は NA ではない論理値である必要があります "
 msgid "length of 'init' must equal length of 'filter'"
 msgstr " 'init' の長さは 'filter' の長さに等しくなければなりません; "
 
-msgid "'init' must have 1 column"
-msgstr " 'init' は 1 列でなければなりません "
-
-msgid "'init' must have 1 or %d columns"
-msgstr " 'init' は 1列もしくは%d 列でなければなりません "
-
 msgid "'x' must have at least 2 rows and columns"
 msgstr " 'x' は少なくとも 2 つの行及び列を持たなければなりません "
 
@@ -1126,6 +1146,8 @@ msgstr " 重みが 0 の観測値は標準偏差の計算で使われません "
 msgid ""
 "The \"ward\" method has been renamed to \"ward.D\"; note new \"ward.D2\""
 msgstr ""
+" \"ward\"法は \"ward.D\" 法に名称変更されました。新しい \"ward.D2\"もありま"
+"す "
 
 msgid "invalid clustering method"
 msgstr " 無効なクラスタリング法です "
@@ -1145,12 +1167,6 @@ msgstr " クラスタリングすべき 2 以上のオブジェクトが必要
 msgid "invalid length of members"
 msgstr " メンバーの長さが無効です "
 
-msgid "invalid dendrogram"
-msgstr " 無効なデンドログラムです "
-
-msgid "'merge' component in dendrogram must be integer"
-msgstr " dendrogram の 'merge' 成分は整数でなければなりません "
-
 msgid "argument 'x' cannot be coerced to class %s"
 msgstr " 引数 'x' をクラス %s に強制変換できません "
 
@@ -1179,8 +1195,8 @@ msgstr " 'which' のすべての要素は 1 と %d の間になければなり
 msgid "invalid parameter values"
 msgstr " 無効なパラメータ値です "
 
-msgid "a limit is missing"
-msgstr " 限界がありません "
+msgid "a limit is NA or NaN"
+msgstr ""
 
 msgid "missing values not allowed"
 msgstr " 欠測値は許されません "
@@ -1257,6 +1273,12 @@ msgstr " 'iter.max' は正でなければなりません "
 msgid "must have same number of columns in 'x' and 'centers'"
 msgstr " 'x' と中心 ('centers') の列数は同じでなければなりません "
 
+msgid "'x' is a list, so ignoring argument 'g'"
+msgstr " ’x’はリストなので、引数 'g' は無視します "
+
+msgid "some elements of 'x' are not numeric and will be coerced to numeric"
+msgstr " 'x'のうちいくつかの要素は数値ではないので,数値に強制変換されます "
+
 msgid "not enough 'x' data"
 msgstr " 'x' データの数が十分ではありません "
 
@@ -1315,9 +1337,8 @@ msgstr ""
 " オブジェクト中の残り自由度はこれは \"lm\" オブジェクトではないことを示唆しま"
 "す "
 
-#, fuzzy
 msgid "essentially perfect fit: summary may be unreliable"
-msgstr " 完全なフィットに対する ANOVA F 検定には信頼性がありません "
+msgstr " ほぼ完全なフィットなので,summary には信頼性がない場合があります "
 
 msgid ""
 "lm object does not have a proper 'qr' component.\n"
@@ -1390,6 +1411,10 @@ msgstr " 無効な NCOL(X) "
 msgid "only 1-4 predictors are allowed"
 msgstr " 1-4 個の予測子しか許されません "
 
+#, fuzzy
+msgid "invalid NROW(X)"
+msgstr " 無効な NCOL(X) "
+
 msgid "invalid 'y'"
 msgstr " 無効な 'y' "
 
@@ -1414,6 +1439,13 @@ msgstr " 無効な引数 'cell' です "
 msgid "invalid argument 'degree'"
 msgstr " 無効な引数 'degree' です "
 
+msgid "iterTrace ="
+msgstr ""
+
+#, fuzzy
+msgid "not obeyed as iterations ="
+msgstr " 有限な観測値がありません "
+
 msgid "first argument must be a \"loess\" object"
 msgstr " 最初の引数は \"loess\" オブジェクトでなければなりません "
 
@@ -1938,8 +1970,8 @@ msgstr " 時間変動変数を名前から推測できませんでした "
 msgid "'varying' arguments must be the same length"
 msgstr " 'varying' 引数は同じ長さでなければなりません "
 
-msgid "'times' is wrong length"
-msgstr " 'times' の長さが誤っています "
+msgid "'lengths(varying)' must all match 'length(times)'"
+msgstr ""
 
 msgid "there are records with missing times, which will be dropped."
 msgstr " 時間が欠損した記録がありますので、取り除きます "
@@ -1999,6 +2031,11 @@ msgstr " NA 値を平滑化しようとしました "
 msgid "invalid 'endrule' argument"
 msgstr " 無効な引数 'endrule' です "
 
+msgid ".nknots.smspl() is now exported; use it instead of n.knots()"
+msgstr ""
+" .nknots.smspl() がエクスポートされるようになりましたから,n.knots() の代わり"
+"にこちらを用いてください "
+
 msgid "invalid 'control.spar'"
 msgstr " 無効な 'control.spar' です "
 
@@ -2138,8 +2175,8 @@ msgstr " 適正な階段関数ではありません "
 msgid "'plot.stepfun' called with wrong type of argument 'x'"
 msgstr " 関数 'plot.stepfun' が誤ったタイプの引数 'x' で呼ばれました "
 
-msgid "must be 0 or 1"
-msgstr " 0 か 1 でなければなりません "
+msgid "%s must be 0 or 1"
+msgstr " %s は 0 か 1 でなければなりません "
 
 msgid "only univariate series are allowed"
 msgstr " 一変量系列だけが許されます "
@@ -2401,10 +2438,6 @@ msgid "extra argument %s is not of class \"%s\""
 msgid_plural "extra arguments %s are not of class \"%s\"s"
 msgstr[0] " 追加入力された引数 %s は \"%s\" クラスではありません "
 
-msgid "extra argument %s will be disregarded"
-msgid_plural "extra arguments %s will be disregarded"
-msgstr[0] " 追加入力された引数 %s は無視されました "
-
 msgid "%d factor is too many for %d variables"
 msgid_plural "%d factors are too many for %d variables"
 msgstr[0] " %d 個の因子は %d 個の変数に対しては多すぎます "
@@ -2417,6 +2450,10 @@ msgid "unable to optimize from this starting value"
 msgid_plural "unable to optimize from these starting values"
 msgstr[0] " 指定された初期値からは最適化を行うことができませんでした "
 
+msgid "'init' must have %d column"
+msgid_plural "'init' must have 1 or %d columns"
+msgstr[0] " 'init' は %d 列でなければなりません "
+
 msgid "X matrix has rank %d, but only %d observation"
 msgid_plural "X matrix has rank %d, but only %d observations"
 msgstr[0] " 行列 X のランクは %d ですが、観測値が %d 個しかありません "
@@ -2489,6 +2526,34 @@ msgid "'start.innov' is too short: need %d point"
 msgid_plural "'start.innov' is too short: need %d points"
 msgstr[0] " 'start.innov' が短すぎます: %d 個の点が必要です "
 
+#~ msgid "a limit is missing"
+#~ msgstr " 限界がありません "
+
+#~ msgid "'times' is wrong length"
+#~ msgstr " 'times' の長さが誤っています "
+
+#~ msgid "non-matched further arguments are disregarded"
+#~ msgstr " 余計な引数は捨てられました "
+
+#~ msgid "extra argument %s will be disregarded"
+#~ msgid_plural "extra arguments %s will be disregarded"
+#~ msgstr[0] " 追加入力された引数 %s は無視されました "
+
+#~ msgid "'merge' and 'height' do not fit!"
+#~ msgstr " 'merge' と 'height' が合致していません! "
+
+#~ msgid "invalid dendrogram"
+#~ msgstr " 無効なデンドログラムです "
+
+#~ msgid "'merge' component in dendrogram must be integer"
+#~ msgstr " dendrogram の 'merge' 成分は整数でなければなりません "
+
+#~ msgid "probabilities cannot be negative nor all 0"
+#~ msgstr " 確率は負になれませんし、全てが 0 にはなり得ません "
+
+#~ msgid "'init' must have 1 or %d columns"
+#~ msgstr " 'init' は 1列もしくは%d 列でなければなりません "
+
 #~ msgid "'deriv' must be between 0 and 2"
 #~ msgstr " 'deriv' は 0 と 2 の間になければなりません "
 
diff --git a/src/library/stats/po/R-ko.po b/src/library/stats/po/R-ko.po
index a606438..17a2e90 100644
--- a/src/library/stats/po/R-ko.po
+++ b/src/library/stats/po/R-ko.po
@@ -1,30 +1,37 @@
 # Korean translation for R stats package
-# src/library/stats/po/R-ko.po
-# Copyright (C) 1995-2014 The R Core Team
+# ./stats/po/R-ko.po
+#
+# Copyright (C) 1995-2016 The R Core Team
+#
 # This file is distributed under the same license as the R stats package.
-# Chel Hee Lee <chl948 at mail.usask.ca>, 2008-2014.
+# Maintained by Chel Hee Lee <chl948 at mail.usask.ca>, 2008-2016.
+# Contact: Chel Hee Lee <gnustats at gmail.com>
+#
+# Notes:
+# Under development (unstable) starting from 11-APR-2016 for R-3.3.1 - QC: in progress
+# Freezed on 10-APR-2016 for R-3.3.0 - QC: PASS
+# Freezed on 30-MAR-2015 for R-3.2.0 - QC: PASS
+# Freezed on 06-FEB-2015 for R-3.1.3 - QC: PASS
 #
 msgid ""
 msgstr ""
-"Project-Id-Version: R 3.1.0\n"
+"Project-Id-Version: R-3.3.0\n"
 "Report-Msgid-Bugs-To: bugs.r-project.org\n"
-"POT-Creation-Date: 2014-03-27 07:47\n"
-"PO-Revision-Date: 2014-03-27 13:33-0600\n"
+"POT-Creation-Date: 2016-04-01 09:50\n"
+"PO-Revision-Date: 2016-04-11 13:08-0600\n"
 "Last-Translator: Chel Hee Lee <chl948 at mail.usask.ca>\n"
-"Language-Team:  <chl948 at mail.usask.ca>\n"
+"Language-Team: Chel Hee Lee <chl948 at mail.usask.ca>\n"
 "Language: ko\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
 "Plural-Forms: nplurals=1; plural=0;\n"
-"X-Poedit-SourceCharset: UTF-8\n"
-"X-Generator: Poedit 1.5.4\n"
 
 msgid "models are not all fitted to the same number of observations"
-msgstr ""
+msgstr "모델적합에 사용된 관측치의 개수들이 같지 않습니다."
 
 msgid "empty model supplied"
-msgstr ""
+msgstr "주어진 모델이 없습니다."
 
 msgid "'acf' must be of length two or more"
 msgstr "'acf'는 반드시 길이가 2 또는 그 이상이어야 합니다"
@@ -110,6 +117,9 @@ msgstr "x$lag은 적어도 1개의 열을 반드시 가지고 있어야 합니
 msgid "can use ci.type=\"ma\" only if first lag is 0"
 msgstr "만약 첫번째 lag이 0인 경우만 ci.type=\"ma\"를 사용할 수 있습니다"
 
+msgid "Page [%d,%d]: i =%s; j =%s"
+msgstr ""
+
 msgid "univariate time series only"
 msgstr "일변량 시계열만 가능합니다"
 
@@ -480,6 +490,12 @@ msgstr "카이제곱 approximation은 정확하지 않을수도 있습니다"
 msgid "NA values not allowed in 'd'"
 msgstr "NA값들은 'd'에서 사용할 수 없습니다"
 
+msgid "eig=TRUE is disregarded when list.=FALSE"
+msgstr "list.=FALSE가 주어진 경우에 eig=TRUE는 사용되지 않습니다."
+
+msgid "x.ret=TRUE is disregarded when list.=FALSE"
+msgstr "list.=FALSE가 주어진 경우에 x.ret=TRUE는 사용되지 않습니다."
+
 msgid "distances must be result of 'dist' or a square matrix"
 msgstr "distances는 반드시 'dist'의 결과이거나 정방행렬이어야 합니다"
 
@@ -492,6 +508,9 @@ msgstr "'k'는 반드시 {1, 2, .. n - 1} 내에 있어야 합니다"
 msgid "only %d of the first %d eigenvalues are > 0"
 msgstr "처음 %2$d개의 고유치들 중 %1$d개만이 양수입니다"
 
+msgid "package 'MASS' must be installed"
+msgstr "패키지 'MASS'가 반드시 설치되어야 합니다."
+
 msgid "initial value is not in the interior of the feasible region"
 msgstr "초기값이 feasible region의 내부에 있지 않습니다"
 
@@ -534,6 +553,9 @@ msgstr "하나 이상의 벡터들이 제공되어야 합니다"
 msgid "arguments must have the same length"
 msgstr "인자들은 반드시 같은 길이를 가지고 있어야 합니다"
 
+msgid "wrong number of columns in new data:"
+msgstr ""
+
 msgid "contrasts apply only to factors"
 msgstr "contrasts는 요인들에만 적용합니다"
 
@@ -631,8 +653,10 @@ msgstr "'tree'의 구성요소 'height'는 오름차순으로 정렬되어 있
 msgid "elements of 'k' must be between 1 and %d"
 msgstr "'which'의 모든 구성요소들은 반드시 1과 %d 사이에 있어야 합니다"
 
-msgid "'merge' and 'height' do not fit!"
-msgstr "'merge'와 'height'가 서로 맞아떨어지지 않습니다!"
+msgid ""
+"dendrogram entries must be 1,2,..,%d (in any order), to be coercible to "
+"\"hclust\""
+msgstr ""
 
 msgid "dendrogram node with non-positive #{branches}"
 msgstr "양수가 아닌 #{branches}가 사용된 덴드로그램 노드입니다"
@@ -685,9 +709,6 @@ msgstr "'ColSideColors'는 반드시 길이가 ncol(x)인 문자형 벡터이어
 msgid "'RowSideColors' must be a character vector of length nrow(x)"
 msgstr "'RowSideColors'는 반드시 길이 nrow(x)인 문자형 벡터이어야 합니다"
 
-msgid "non-matched further arguments are disregarded"
-msgstr ""
-
 msgid "argument 'x' must be numeric"
 msgstr "인자 'x'는 반드시 수치형이어야 합니다"
 
@@ -701,7 +722,7 @@ msgid "'x' and 'weights' have unequal length"
 msgstr "'x'와 'weights'는 서로 다른 길이를 가지고 있습니다"
 
 msgid "'weights' must all be finite"
-msgstr ""
+msgstr "'weights'는 모두 유한한 값을 가지고 있어야 합니다. "
 
 msgid "'weights' must not be negative"
 msgstr "'weights'는 반드시 음수이어야 합니다"
@@ -761,8 +782,10 @@ msgstr "'rate' 또는 'scale' 중 하나만 지정해야 합니다"
 msgid "x[] and prob[] must be equal length vectors."
 msgstr "x[]와 prob[]는 반드시 같은 길이를 가지는 벡터이어야 합니다"
 
-msgid "probabilities cannot be negative nor all 0"
-msgstr "확률값은 음의 값을 가질 수 없고 모두 0일 수도 없습니다"
+msgid "probabilities must be finite, non-negative and not all 0"
+msgstr ""
+"확률값들은 반드시 유한(finite)하고, 음의 값을 가지지 않아야 하며 모두가 0이어"
+"야서는 안됩니다."
 
 msgid "'x' must be non-negative"
 msgstr "'x'는 반드시 음수가 아니어야 합니다"
@@ -776,6 +799,9 @@ msgstr "'prob'와 'mu' 모두 지정되어 있습니다"
 msgid "some terms will have NAs due to the limits of the method"
 msgstr "메소드의 한계로 인하여 일부 항들이 NA를 가질 것입니다"
 
+msgid "multivariate case with missing coefficients is not yet implemented"
+msgstr ""
+
 msgid "'x' must have 1 or more non-missing values"
 msgstr "'x'는 반드시 한 개 또는 그 이상의 결측되지 않은 값들이 있어야 합니다"
 
@@ -898,8 +924,10 @@ msgstr ""
 msgid "positive values only are allowed for the 'inverse.gaussian' family"
 msgstr "'inverse.gaussian' 페밀링에서는 양수값들만 사용할 수 있습니다"
 
-msgid "need CRAN package 'SuppDists' for the 'inverse.gaussian' family"
-msgstr "'inverse.gaussian' 페밀리는 CRAN 패키지 'SuppDists'를 필요로 합니다"
+msgid ""
+"need CRAN package 'SuppDists' for simulation from the 'inverse.gaussian' "
+"family"
+msgstr ""
 
 msgid "using weights as inverse variances"
 msgstr "weights를 inverse variances 로 사용합니다"
@@ -929,12 +957,6 @@ msgstr "'circular'는 반드시 논리값이고 NA가 아니어야 합니다"
 msgid "length of 'init' must equal length of 'filter'"
 msgstr "'init'의 길이는 반드시 'filter'의 길이와 같아야 합니다"
 
-msgid "'init' must have 1 column"
-msgstr "'init'는 반드시 1개의 열을 가지고 있어야 합니다"
-
-msgid "'init' must have 1 or %d columns"
-msgstr "'init'는 반드시 1개 또는 %d개의 열을 가지고 있어야 합니다"
-
 msgid "'x' must have at least 2 rows and columns"
 msgstr "'x'는 반드시 적어도 2개의 행과 열을 가져야 합니다"
 
@@ -1161,12 +1183,6 @@ msgstr ""
 msgid "invalid length of members"
 msgstr ""
 
-msgid "invalid dendrogram"
-msgstr "유효하지 않은 덴드로그램입니다"
-
-msgid "'merge' component in dendrogram must be integer"
-msgstr "덴드로그램에서 'merge'요소는 반드시 정수이어야 합니다"
-
 msgid "argument 'x' cannot be coerced to class %s"
 msgstr "인수 'x'를 클래스  %s로 강제형변환을 할 수 없습니다"
 
@@ -1194,11 +1210,11 @@ msgstr "'which'의 모든 구성요소들은 반드시 1과 %d사이에 있어
 msgid "invalid parameter values"
 msgstr "유효하지 않은 파라미터 값입니다"
 
-msgid "a limit is missing"
-msgstr ""
+msgid "a limit is NA or NaN"
+msgstr "limit은 NA 또는 NaN이어야 합니다."
 
 msgid "missing values not allowed"
-msgstr ""
+msgstr "결측값들은 사용할 수 없습니다."
 
 msgid "'r' is less than 1"
 msgstr "'r'은 1보다 적습니다"
@@ -1273,6 +1289,12 @@ msgstr "'iter.max'는 반드시 양수이어야 합니다"
 msgid "must have same number of columns in 'x' and 'centers'"
 msgstr "'x'와 'centers'는 반드시 같은수의 열을 가져야 합니다"
 
+msgid "'x' is a list, so ignoring argument 'g'"
+msgstr ""
+
+msgid "some elements of 'x' are not numeric and will be coerced to numeric"
+msgstr ""
+
 msgid "not enough 'x' data"
 msgstr "충분하지 않은 'x' 데이터입니다"
 
@@ -1375,7 +1397,7 @@ msgid "'object' has no 'effects' component"
 msgstr "'object'는 'effects' 구성요소를 가지고 있지 않습니다"
 
 msgid "the 'se.fit' argument is not yet implemented for \"mlm\" objects"
-msgstr ""
+msgstr "'se.fit' 인자는 아직 \"mlm\" 객체의 경우에 구현되지 않았습니다."
 
 msgid "invalid model QR matrix"
 msgstr ""
@@ -1402,6 +1424,9 @@ msgid "invalid NCOL(X)"
 msgstr "유효하지 않은 NCOL(X)입니다"
 
 msgid "only 1-4 predictors are allowed"
+msgstr "오로지 1-4개의 설명변수만이 허용됩니다."
+
+msgid "invalid NROW(X)"
 msgstr ""
 
 msgid "invalid 'y'"
@@ -1428,6 +1453,12 @@ msgstr "유효하지 않은 인자 'cell'입니다"
 msgid "invalid argument 'degree'"
 msgstr "유효하지 않은 인자 'degree'입니다"
 
+msgid "iterTrace ="
+msgstr ""
+
+msgid "not obeyed as iterations ="
+msgstr ""
+
 msgid "first argument must be a \"loess\" object"
 msgstr "첫번째 인자는 반드시 \"loess\" 객체이어야 합니다"
 
@@ -1948,8 +1979,8 @@ msgstr ""
 msgid "'varying' arguments must be the same length"
 msgstr "'varying' 인자들은 반드시 같은 길이이어야 합니다"
 
-msgid "'times' is wrong length"
-msgstr "'times'의 길이가 잘 못되었습니다"
+msgid "'lengths(varying)' must all match 'length(times)'"
+msgstr ""
 
 msgid "there are records with missing times, which will be dropped."
 msgstr "누락된 times와 함께 있는 레코드는 이용되지 않을 것입니다"
@@ -2009,6 +2040,9 @@ msgstr ""
 msgid "invalid 'endrule' argument"
 msgstr "유효하지 않은 'endrule'인자입니다"
 
+msgid ".nknots.smspl() is now exported; use it instead of n.knots()"
+msgstr ""
+
 msgid "invalid 'control.spar'"
 msgstr "유효하지 않은 'control.spar'입니다"
 
@@ -2131,10 +2165,10 @@ msgid "stepfun: 'x' must be ordered increasingly"
 msgstr ""
 
 msgid "'x' must have length >= 1"
-msgstr "'x'는 반드시 길이가 1보다 크거나 같아야 합니다"
+msgstr "'x'는 반드시 길이가 1보다 크거나 같아야 합니다."
 
 msgid "'y' must be one longer than 'x'"
-msgstr "'y'는 반드시 'x'보다 길어야 합니다"
+msgstr "'y'는 반드시 'x'보다 길어야 합니다."
 
 msgid "no 'as.stepfun' method available for 'x'"
 msgstr "'x'에 사용가능한 'as.stepfun' 메소드가 없습니다"
@@ -2145,8 +2179,8 @@ msgstr "유효한 step function이 아닙니다"
 msgid "'plot.stepfun' called with wrong type of argument 'x'"
 msgstr ""
 
-msgid "must be 0 or 1"
-msgstr "반드시 0 또는 1 이어야 합니다"
+msgid "%s must be 0 or 1"
+msgstr "%s는 반드시 0 또는 1 이어야 합니다."
 
 msgid "only univariate series are allowed"
 msgstr "오로지 단변량 시리즈만이 허용됩니다"
@@ -2201,13 +2235,13 @@ msgid "singularities in regression"
 msgstr ""
 
 msgid "'ts' object must have one or more observations"
-msgstr "'ts' 객체는 반드시 하나 또는 그 이상의 관찰값들을 가집니다"
+msgstr "'ts' 객체는 반드시 하나 또는 그 이상의 관찰값들을 가지고 있습니다."
 
 msgid "'start' cannot be after 'end'"
-msgstr "'start'는 'end' 뒤에 놓일 수 없습니다"
+msgstr "'start'는 'end' 뒤에 올 수 없습니다."
 
 msgid "no time series supplied"
-msgstr "제공된 시계열이 없습니다"
+msgstr "주어진 시계열(time series)이 없습니다"
 
 msgid "not all series have the same frequency"
 msgstr ""
@@ -2234,28 +2268,29 @@ msgid "scatter plots only for univariate time series"
 msgstr ""
 
 msgid "'xy.labels' must be logical or character"
-msgstr "'xy.labels'는 반드시 논리값 또는 문자이어야 합니다"
+msgstr ""
+"'xy.labels'는 반드시 논리형(logical) 또는 문자형(character)이어야 합니다."
 
 msgid "'frequency' and 'deltat' are both supplied and are inconsistent"
-msgstr ""
+msgstr "'frequency'와 'deltat' 모두 제공되었으나 서로 일치하지 않습니다."
 
 msgid "'frequency' not changed"
-msgstr "변경되지 않은 'frequency'입니다"
+msgstr "변경되지 않은 'frequency'입니다."
 
 msgid "bad value for 'start'"
-msgstr "잘못된 'start' 값입니다"
+msgstr "잘못된 'start' 값입니다."
 
 msgid "'start' value not changed"
-msgstr "변경되지 않은 'start'값입니다"
+msgstr "변경되지 않은 'start'값입니다."
 
 msgid "bad value for 'end'"
-msgstr "잘못된 'end' 값입니다"
+msgstr "잘못된 'end' 값입니다."
 
 msgid "'end' value not changed"
-msgstr "변경되지 않은 'end' 값입니다"
+msgstr "변경되지 않은 'end' 값입니다."
 
 msgid "'start' > 'end'"
-msgstr "'start'는 'end'보다 큽니다"
+msgstr "'start'는 'end'보다 큽니다."
 
 msgid "extending time series when replacing values"
 msgstr ""
@@ -2267,7 +2302,7 @@ msgid "no replacement values supplied"
 msgstr "제공된 치환값들이 없습니다"
 
 msgid "too many replacement values supplied"
-msgstr "제공된 치환값들이 너무 많습니다"
+msgstr "제공된 치환값(replacement values)들이 너무 많습니다."
 
 msgid ""
 "number of values supplied is not a sub-multiple of the number of values to "
@@ -2278,10 +2313,10 @@ msgid "only replacement of elements is allowed"
 msgstr ""
 
 msgid "'model' must be list"
-msgstr "'model'은 반드시 리스트이어야 합니다"
+msgstr "'model'은 반드시 리스트(list)이어야 합니다."
 
 msgid "'n' must be strictly positive"
-msgstr "'n'은 반드시 양수이어야 합니다"
+msgstr "'n'은 반드시 양수이어야 합니다."
 
 msgid "'ar' part of model is not stationary"
 msgstr "모델의 'ar' 파트가 stationary 하지 않습니다"
@@ -2290,31 +2325,31 @@ msgid "burn-in 'n.start' must be as long as 'ar + ma'"
 msgstr ""
 
 msgid "'model$order' must be of length 3"
-msgstr "'model$order'는 길이가 반드시 3이어야 합니다"
+msgstr "'model$order'의 길이는 반드시 3이어야 합니다."
 
 msgid "inconsistent specification of 'ar' order"
-msgstr "'ar'의 순서에 부합하지 않는 지정입니다"
+msgstr "'ar'의 순서에 일치하지 않는 지정입니다."
 
 msgid "inconsistent specification of 'ma' order"
-msgstr "'ma'의 순서에 부합하지 않는 지정입니다"
+msgstr "'ma'의 순서에 일치하지 않는 지정입니다."
 
 msgid "number of differences must be a positive integer"
-msgstr ""
+msgstr "차이의 개수(number of differences)는 반드시 양의 정수이어야 합니다."
 
 msgid "need an object with call component"
-msgstr "호출요소를 가진 객체가 필요합니다"
+msgstr "호출요소(call component)를 가진 객체가 필요합니다"
 
 msgid "'ratio' must be a single positive number"
-msgstr "'ratio'는 반드시 양의 값을 가지는 하나의 숫자이어야 합니다"
+msgstr "'ratio'는 반드시 양의 값을 가지는 하나의 숫자이어야 합니다."
 
 msgid "'x' and 'w' must have the same length"
-msgstr "'x'와 'w'는 반드시 같은 길이를 가져야 합니다"
+msgstr "'x'와 'w'는 반드시 같은 길이를 가져야 합니다."
 
 msgid "not enough (finite) 'x' observations"
 msgstr ""
 
 msgid "requested conf.level not achievable"
-msgstr "성취 될 수 없는 conf.level이 요청되었습니다"
+msgstr "수행할 수 없는 conf.level의 값이 주어졌습니다."
 
 msgid "cannot compute confidence interval when all observations are tied"
 msgstr "모든 관측치들의 값이 같다면 신뢰구간을 계산 할 수 없습니다"
@@ -2329,66 +2364,83 @@ msgid "cannot compute exact confidence interval with zeroes"
 msgstr ""
 
 msgid "Requested conf.level not achievable"
-msgstr "성취될 수 없는 conf.level이 요청되었습니다"
+msgstr "수행할 수 없는 conf.level의 값이 주어졌습니다."
 
 msgid "must supply either 'formula' or 'data'"
 msgstr "'formula' 또는 'data' 둘 중 하나는 반드시 제공되어야 합니다"
 
 msgid "%s applies only to two-way tables"
-msgstr "%s는 2차원 테이블에만 적용합니다"
+msgstr "%s는 2차원 테이블에만 적용됩니다."
 
 msgid "too few distinct input values to fit an asymptotic regression model"
 msgstr ""
-"asymptotic regression model을 적합하기 하기에는 너무 적은 수의 고유한 값을 가"
-"지는 입력입니다"
+"점근회귀모형(asymptotic regression model)을 적합하기 하기에는 너무 적은 개수"
+"의 고유한 값(distinct input values)들이 입력되었습니다."
 
 msgid "cannot fit an asymptotic regression model to these data"
-msgstr "asymptotic regression model을 이러한 데이터에 적합할 수 없습니다"
+msgstr ""
+"점근회귀모형(asymptotic regression model)은 주어진 데이터에 적합할 수 없습니"
+"다."
 
 msgid "too few observations to fit an asymptotic regression model"
-msgstr "asymptotic regression model을 적합하는데 너무 적은 관측치입니다"
+msgstr ""
+"점근회귀모형(asymptotic regression model)을 적합하기에는 관측치의 수가 너무 "
+"적습니다."
 
 msgid "too few distinct input values to fit the 'asympOff' model"
 msgstr ""
-"'asympOff' model을 적합하기에는 너무 적은 숫자의 고유한 값을 가지는 입력입니"
-"다"
+"'asympOff' 모형을 적합하기에는 너무 적은 개수의 고유한 값(distinct input "
+"values)들이 입력되었습니다."
 
 msgid "too few distinct input values to fit the 'asympOrig' model"
 msgstr ""
-"'asympOrig' model을 적합하기에는 너무 적은 숫자의 고유한 값을 가지는 입력입니"
-"다"
+"'asympOrig' 모형을 적합하기에는 너무 적은 개수의 고유한 값(distinct input "
+"values)들이 입력되었습니다."
 
 msgid "too few distinct input values to fit a biexponential"
 msgstr ""
+"biexponent 모형을 적합하기에는 너무 적은 개수의 고유한 값(distinct input "
+"values)들이 입력되었습니다."
 
 msgid "must have length of response = length of second argument to 'SSfol'"
 msgstr ""
+"응답변수(response)의 길이는 반드시 'SSfol'에 전달되는 두번째 인자의 길이와 같"
+"아야 합니다."
 
 msgid "must have at least 4 observations to fit an 'SSfol' model"
 msgstr ""
-"'SSfol' model을 적합하기 위해서는 적어도 4개의 관측치들이 있어야 합니다"
+"'SSfol' 모형을 적합하기 위해서는 적어도 4개의 관측치들을 가지고 있어야 합니"
+"다. "
 
 msgid "too few distinct input values to fit a four-parameter logistic"
 msgstr ""
-"4개의 파라미터를 가지는 로지스틱을 적합하기에는 너무 적은 수의 고유값을 가진 "
-"입력입니다"
+"4개의 파라미터를 가지는 로지스틱(logistic)을 적합하기에는 너무 적은 개수의 고"
+"유한 값(distinct input values)들이 입력되었습니다."
 
 msgid "too few distinct input values to fit a logistic model"
-msgstr "로지스틱 모델을 적합하기에는 너무 적은 수의 고유값을 가진 입력입니다"
+msgstr ""
+"로지스틱 모형(logistic model)을 적합하기에는 너무 적은 개수의 고유한 값"
+"(distinct input values)들이 입력되었습니다."
 
 msgid "too few distinct input values to fit a Michaelis-Menten model"
 msgstr ""
-"Michaelis-Menten model을 적합하기에는 너무 적은 수의 고유값을 가진 입력입니다"
+"Michaelis-Menten model을 적합하기에는 너무 적은 개수의 고유한 값(distinct "
+"input values)들이 입력되었습니다."
 
 msgid "too few distinct input values to fit the Gompertz model"
-msgstr "Gompertz model을 적합하기에는 너무 적은 수의 고유값을 가진 입력입니다"
+msgstr ""
+"곰페르츠 모형(Gompertz model)을 적합하기에는 너무 적은 개수의 고유한 값"
+"(distinct input values)들이 입력되었습니다."
 
 msgid "too few distinct input values to fit the Weibull growth model"
 msgstr ""
-"Weibull growth model을 적합하기에는 너무 적은 수의 고유값을 가진 입력입니다"
+"와이블 성장모형(Weibull growth model)을 적합하기에는 너무 적은 개수의 고유한 "
+"값(distinct input values)들이 입력되었습니다."
 
 msgid "all 'x' values must be non-negative to fit the Weibull growth model"
 msgstr ""
+"와이블 성장모형(Weibuill growth model)을 적합하기 위해서는 모든 'x'의 값들이 "
+"반드시 음이 아닌 수이어야 합니다."
 
 msgid "using the %d/%d row from a combined fit"
 msgid_plural "using the %d/%d rows from a combined fit"
@@ -2414,26 +2466,26 @@ msgid "extra argument %s is not of class \"%s\""
 msgid_plural "extra arguments %s are not of class \"%s\"s"
 msgstr[0] "추가 인자 %1$s는 클래스 \"%2$s\"가 아닙니다"
 
-msgid "extra argument %s will be disregarded"
-msgid_plural "extra arguments %s will be disregarded"
-msgstr[0] "추가 인자 %s는 사용되지 않을 것입니다"
-
 msgid "%d factor is too many for %d variables"
 msgid_plural "%d factors are too many for %d variables"
 msgstr[0] ""
 
 msgid "'start' must have %d row"
 msgid_plural "'start' must have %d rows"
-msgstr[0] "'start'은 반드시  %d 행을 가지고 있습니다"
+msgstr[0] "'start'은 반드시  %d 개의 행을 가지고 있어야 합니다."
 
 msgid "unable to optimize from this starting value"
 msgid_plural "unable to optimize from these starting values"
 msgstr[0] "이 초기값으로부터는 최적화된 솔루션을 찾을 수 없습니다"
 
+msgid "'init' must have %d column"
+msgid_plural "'init' must have 1 or %d columns"
+msgstr[0] "'init'는 반드시 %d개의 열을 가지고 있어야 합니다."
+
 msgid "X matrix has rank %d, but only %d observation"
 msgid_plural "X matrix has rank %d, but only %d observations"
 msgstr[0] ""
-"X 행렬은 rank %1$d를 가지고 있으나  %2$d개의 관측치 만을 가지고 있습니다"
+"X 행렬은 rank %1$d를 가지고 있으나  %2$d개의 관측치 만을 가지고 있습니다."
 
 msgid "did not converge in %d iteration"
 msgid_plural "did not converge in %d iterations"
@@ -2445,11 +2497,11 @@ msgstr[0] ""
 
 msgid "'X' matrix has %d case (row)"
 msgid_plural "'X' matrix has %d cases (rows)"
-msgstr[0] "'X' 행렬은 %d 개의 케이스들을 가집니다 (행방향)"
+msgstr[0] "'X' 행렬은 %d 개의 케이스(행의 개수)들을 가지고 있습니다."
 
 msgid "'Y' has %d case (row)"
 msgid_plural "'Y' has %d cases (rows)"
-msgstr[0] ""
+msgstr[0] "'Y'는 %d개의 케이스(행의 개수)들을 가지고 있습니다."
 
 msgid "only %d case"
 msgid_plural "only %d cases"
@@ -2461,23 +2513,23 @@ msgstr[0] ""
 
 msgid "medpolish() did not converge in %d iteration"
 msgid_plural "medpolish() did not converge in %d iterations"
-msgstr[0] ""
+msgstr[0] "medpolish()는 %d 번째 반복에서 수렴하지 않았습니다."
 
 msgid "'newdata' had %d row"
 msgid_plural "'newdata' had %d rows"
-msgstr[0] "'newdata'는 %d 행을 가지고 있었습니다"
+msgstr[0] "'newdata'는 %d 개의 행을 가지고 있었습니다."
 
 msgid "but variable found had %d row"
 msgid_plural "but variables found have %d rows"
-msgstr[0] ""
+msgstr[0] "그러나 찾아진 변수는 %d개의 행을 가지고 있었습니다."
 
 msgid "factor %s has new level %s"
 msgid_plural "factor %s has new levels %s"
-msgstr[0] ""
+msgstr[0] "요인(factor) %s는 %s개의 새로운 수준(levels)들을 가지고 있습니다."
 
 msgid "%d observation deleted due to missingness"
 msgid_plural "%d observations deleted due to missingness"
-msgstr[0] ""
+msgstr[0] "결측(missingness)으로 인하여 %d개의 관측치가 삭제되었습니다."
 
 msgid "_NOT_ converged in %d iteration"
 msgid_plural "_NOT_ converged in %d iterations"
@@ -2493,16 +2545,42 @@ msgstr[0] ""
 
 msgid "parameter %s does not occur in the model formula"
 msgid_plural "parameters %s do not occur in the model formula"
-msgstr[0] ""
+msgstr[0] "모수 %s(들)를 모델식(model formula)로부터 찾을 수 없습니다."
 
 msgid "%d observation with NA, NaN or Inf deleted"
 msgid_plural "%d observations with NAs, NaNs and/or Infs deleted"
-msgstr[0] "NA, NaNs 그리고/또는 Infs를 가지는 %d개의 관측치들은 삭제되었습니다"
+msgstr[0] ""
+"NA, NaNs 그리고/또는 Infs를 가지는 %d 개의 관측치들이 삭제되었습니다."
 
 msgid "'start.innov' is too short: need %d point"
 msgid_plural "'start.innov' is too short: need %d points"
 msgstr[0] ""
 
+#~ msgid "need CRAN package 'SuppDists' for the 'inverse.gaussian' family"
+#~ msgstr "'inverse.gaussian' 페밀리는 CRAN 패키지 'SuppDists'를 필요로 합니다"
+
+#~ msgid "'times' is wrong length"
+#~ msgstr "'times'의 길이가 잘 못되었습니다"
+
+#~ msgid "extra argument %s will be disregarded"
+#~ msgid_plural "extra arguments %s will be disregarded"
+#~ msgstr[0] "추가 인자 %s는 사용되지 않을 것입니다."
+
+#~ msgid "'merge' and 'height' do not fit!"
+#~ msgstr "'merge'와 'height'가 서로 맞아떨어지지 않습니다!"
+
+#~ msgid "invalid dendrogram"
+#~ msgstr "유효하지 않은 덴드로그램입니다"
+
+#~ msgid "'merge' component in dendrogram must be integer"
+#~ msgstr "덴드로그램에서 'merge'요소는 반드시 정수이어야 합니다"
+
+#~ msgid "probabilities cannot be negative nor all 0"
+#~ msgstr "확률값은 음의 값을 가질 수 없고 모두 0일 수도 없습니다"
+
+#~ msgid "'init' must have 1 or %d columns"
+#~ msgstr "'init'는 반드시 1개 또는 %d개의 열을 가지고 있어야 합니다"
+
 #~ msgid "'deriv' must be between 0 and 2"
 #~ msgstr "'deriv'는 반드시 0과 2사이에 있어야 합니다"
 
diff --git a/src/library/stats/po/R-pl.po b/src/library/stats/po/R-pl.po
index cb74229..67856b7 100644
--- a/src/library/stats/po/R-pl.po
+++ b/src/library/stats/po/R-pl.po
@@ -1,8 +1,8 @@
 msgid ""
 msgstr ""
-"Project-Id-Version: R 3.1.0\n"
+"Project-Id-Version: R 3.4.0\n"
 "Report-Msgid-Bugs-To: bugs.r-project.org\n"
-"POT-Creation-Date: 2014-03-27 07:47\n"
+"POT-Creation-Date: 2016-04-04 19:01\n"
 "PO-Revision-Date: \n"
 "Last-Translator: Łukasz Daniel <lukasz.daniel at gmail.com>\n"
 "Language-Team: Łukasz Daniel <lukasz.daniel at gmail.com>\n"
@@ -13,5089 +13,4481 @@ msgstr ""
 "na-Revision-Date: 2012-05-29 07:55+0100\n"
 "Plural-Forms: nplurals=3; plural=(n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 "
 "|| n%100>=20) ? 1 : 2);\n"
-"X-Poedit-SourceCharset: iso-8859-1\n"
-"X-Generator: Poedit 1.5.4\n"
+"X-Poedit-SourceCharset: UTF-8\n"
+"X-Generator: Poedit 1.8.7\n"
 "X-Poedit-Bookmarks: -1,20,-1,-1,-1,-1,-1,-1,-1,-1\n"
 
-# stats/R/AIC.R: 42
-# warning("models are not all fitted to the same number of observations")
-# stats/R/AIC.R: 74
-# warning("models are not all fitted to the same number of observations")
-msgid "models are not all fitted to the same number of observations"
-msgstr "nie wszystkie modele są dopasowane do tej samej liczby obserwacji"
+#. R/xtabs.R: gettextf("%s applies only to two-way tables", "xtabs(*, sparse=TRUE)")
+#: R/xtabs.R:0
+msgid "%s applies only to two-way tables"
+msgstr "'%s' stosuje się jedynie do dwukierunkowych tabel"
 
-# stats/R/ARMAtheory.R: 24
-# stop("empty model supplied")
-msgid "empty model supplied"
-msgstr "dostarczono pusty model"
+#. R/family.R: gettextf("%s link not recognised", sQuote(link))
+#: R/family.R:0
+msgid "%s link not recognised"
+msgstr "link %s nie został rozpoznany"
 
-# stats/R/ARMAtheory.R: 66
-# stop("'acf' must be of length two or more")
-msgid "'acf' must be of length two or more"
-msgstr "'acf' musi być długości równej dwa lub więcej"
+#. R/stl.R: gettextf("%s must be 0 or 1", degname)
+#: R/stl.R:0
+msgid "%s must be 0 or 1"
+msgstr "%s musi wynosić 0 lub 1"
 
-# stats/R/C.R: 22
-# stop("object not interpretable as a factor")
-msgid "object not interpretable as a factor"
-msgstr "argument 'object' nie jest interpretowalny jako czynnik"
+#. R/contrast.R: gettextf("%s needs package 'Matrix' correctly installed", "contr*(.., sparse=TRUE)")
+#. R/contrast.R: gettextf("%s needs package 'Matrix' correctly installed", "contr*(.., sparse=TRUE)")
+#. R/xtabs.R: gettextf("%s needs package 'Matrix' correctly installed", "xtabs(*, sparse=TRUE)")
+#: R/contrast.R:0 R/xtabs.R:0
+msgid "%s needs package 'Matrix' correctly installed"
+msgstr "'%s' potrzebuje poprawnie zainstalowanego pakietu 'Matrix'"
 
-# stats/R/HoltWinters.R: 46
-# stop ("cannot fit models without level ('alpha' must not be 0 or FALSE)")
-msgid "cannot fit models without level ('alpha' must not be 0 or FALSE)"
-msgstr ""
-"nie można dopasować do modeli bez poziomu ('alpha' nie może być zerem lub "
-"wartością FALSE)"
+#. R/nlsFunc.R: gettextf("'%s' cannot be of mode '%s'", substitute(object), mode(object))
+#: R/nlsFunc.R:0
+msgid "'%s' cannot be of mode '%s'"
+msgstr "argument '%s' nie może być trybu '%s'"
 
-# stats/R/HoltWinters.R: 49
-# stop ("'alpha', 'beta' and 'gamma' must be within the unit interval")
-msgid "'alpha', 'beta' and 'gamma' must be within the unit interval"
+#. R/addmargins.R: stop("'A' must be an array or table")
+#: R/addmargins.R:0
+msgid "'A' must be an array or table"
+msgstr "argument 'A' musi być tablicą lub tabelą"
+
+#. R/dendrogram.R: stop("'ColSideColors' must be a character vector of length ncol(x)")
+#: R/dendrogram.R:0
+msgid "'ColSideColors' must be a character vector of length ncol(x)"
 msgstr ""
-"'alpha', 'beta' oraz 'gamma' muszą być wewnątrz jednostkowego przedziału"
+"argument 'ColSideColors' musi być wektorem tekstowym o długości 'ncol(x)'"
 
-# stats/R/HoltWinters.R: 52
-# stop ("data must be non-zero for multiplicative Holt-Winters")
-msgid "data must be non-zero for multiplicative Holt-Winters"
-msgstr "dane muszą być niezerowe dla multiplikatywnego modelu Holta-Wintersa"
+#. R/anova.R: stop("'P.values' is TRUE, but 'has.Pvalue' is not")
+#: R/anova.R:0
+msgid "'P.values' is TRUE, but 'has.Pvalue' is not"
+msgstr "argument 'P.values' wynosi TRUE, ale argument 'has.Pvalue' już nie"
 
-# stats/R/HoltWinters.R: 54
-# stop ("need at least 2 periods to compute seasonal start values")
-msgid "need at least 2 periods to compute seasonal start values"
-msgstr "potrzeba co najmniej 2 okresów aby obliczyć sezonowe wartości startowe"
+#. R/dendrogram.R: stop("'RowSideColors' must be a character vector of length nrow(x)")
+#: R/dendrogram.R:0
+msgid "'RowSideColors' must be a character vector of length nrow(x)"
+msgstr ""
+"argument 'RowSideColors' musi być wektorem tekstowym o długości 'nrow(x)'"
 
-# stats/R/HoltWinters.R: 88
-# stop("invalid length(x)")
-# stats/R/approx.R: 64
-# stop("invalid length(x)")
-# stats/R/approx.R: 97
-# stop("invalid length(x)")
-# stats/R/stl.R: 45
-# stop("invalid length(x)")
-# stats/R/bandwidths.R: 45
-# stop("invalid length(x)")
-# stats/R/bandwidths.R: 97
-# stop("invalid length(x)")
-# stats/R/bandwidths.R: 117
-# stop("invalid length(x)")
-# stats/R/smooth.R: 31
-# stop("invalid length(x)")
-msgid "invalid length(x)"
-msgstr "niepoprawna wartość 'length(x)'"
+#. R/poisson.test.R: stop("'T' must be nonnegative")
+#: R/poisson.test.R:0
+msgid "'T' must be nonnegative"
+msgstr "argument 'T' musi być nieujemny"
 
-# stats/R/HoltWinters.R: 131
-# warning(gettextf("optimization difficulties: %s",
-#                                          sol$message), domain = NA)
-# stats/R/HoltWinters.R: 148
-# warning(gettextf("optimization difficulties: %s",
-#                                          sol$message), domain = NA)
-# stats/R/HoltWinters.R: 167
-# warning(gettextf("optimization difficulties: %s",
-#                                          sol$message), domain = NA)
-# stats/R/HoltWinters.R: 194
-# warning(gettextf("optimization difficulties: %s",
-#                                          sol$message), domain = NA)
-msgid "optimization difficulties: %s"
-msgstr "problemy optymalizacji: %s"
+#. R/cor.R: stop("'V' is not a square numeric matrix")
+#: R/cor.R:0
+msgid "'V' is not a square numeric matrix"
+msgstr "'V' nie jest kwadratową macierzą liczbową"
 
-# stats/R/HoltWinters.R: 133
-# stop("optimization failure")
-# stats/R/HoltWinters.R: 150
-# stop("optimization failure")
-# stats/R/HoltWinters.R: 169
-# stop("optimization failure")
-# stats/R/HoltWinters.R: 196
-# stop("optimization failure")
-msgid "optimization failure"
-msgstr "niepowodzenie optymalizacji"
+#. R/dendrogram.R: stop("'X' is not a dendrogram")
+#: R/dendrogram.R:0
+msgid "'X' is not a dendrogram"
+msgstr "'X' nie jest drzewem celu"
 
-# stats/R/HoltWinters.R: 366
-# stop("time series has no or less than 2 periods")
-msgid "time series has no or less than 2 periods"
-msgstr "szereg czasowy nie posiada okresów lub ma ich mniej niż 2"
+#. R/lsfit.R: warning("'X' matrix was collinear")
+#: R/lsfit.R:0
+msgid "'X' matrix was collinear"
+msgstr "macierz 'X' była współliniowa"
 
-# stats/R/StructTS.R: 27
-# stop("the series is entirely NA")
-# stats/R/StructTS.R: 40
-# stop("the series is entirely NA")
-# stats/R/StructTS.R: 61
-# stop("the series is entirely NA")
-msgid "the series is entirely NA"
-msgstr "seria jest całkowicie wypełniona wartościami 'NA'"
+#. R/ARMAtheory.R: stop("'acf' must be of length two or more")
+#: R/ARMAtheory.R:0
+msgid "'acf' must be of length two or more"
+msgstr "'acf' musi być długości równej dwa lub więcej"
 
-# stats/R/StructTS.R: 51
-# stop("frequency must be a positive integer >= 2 for BSM")
-msgid "frequency must be a positive integer >= 2 for BSM"
+#. R/smspline.R: warning("'all.knots' is TRUE; 'nknots' specification is disregarded")
+#: R/smspline.R:0
+msgid "'all.knots' is TRUE; 'nknots' specification is disregarded"
 msgstr ""
-"częstotliwość musi być dodatnią liczbą całkowitą >= 2 dla Podstawowego "
-"Modelowania Strukturalnego (BSM)"
+"argument 'all.knots' ma wartość TRUE; specyfikacja 'nknots' została odrzucona"
 
-# stats/R/StructTS.R: 82
-# stop("only implemented for univariate time series")
-# stats/R/arma0.R: 59
-# stop("only implemented for univariate time series")
-# stats/R/cpgram.R: 29
-# stop("only implemented for univariate time series")
-# stats/R/arima.R: 107
-# stop("only implemented for univariate time series")
-msgid "only implemented for univariate time series"
-msgstr "zaimplementowane tylko dla jednowymiarowego szeregu czasowego"
+#. R/HoltWinters.R: stop("'alpha', 'beta' and 'gamma' must be within the unit interval")
+#: R/HoltWinters.R:0
+msgid "'alpha', 'beta' and 'gamma' must be within the unit interval"
+msgstr ""
+"'alpha', 'beta' oraz 'gamma' muszą być wewnątrz jednostkowego przedziału"
 
-# stats/R/wilcox.test.R: 37
-# stop("'x' must be numeric")
-# stats/R/StructTS.R: 85
-# stop("'x' must be numeric")
-# stats/R/ar.R: 53
-# stop("'x' must be numeric")
-# stats/R/ar.R: 266
-# stop("'x' must be numeric")
-# stats/R/ar.R: 344
-# stop("'x' must be numeric")
-# stats/R/cor.R: 35
-# stop("'x' must be numeric")
-# stats/R/arma0.R: 63
-# stop("'x' must be numeric")
-# stats/R/arima.R: 112
-# stop("'x' must be numeric")
-# stats/R/acf.R: 36
-# stop("'x' must be numeric")
-# stats/R/acf.R: 68
-# stop("'x' must be numeric")
-msgid "'x' must be numeric"
-msgstr "argument 'x' musi być liczbą"
+#. R/nls.R: stop("'anova' is only defined for sequences of \"nls\" objects")
+#: R/nls.R:0
+msgid "'anova' is only defined for sequences of \"nls\" objects"
+msgstr "'anova' jest zdefiniowana jedynie dla sekwencji obiektów 'nls'"
 
-# stats/R/StructTS.R: 88
-# stop("the first value of the time series must not be missing")
-msgid "the first value of the time series must not be missing"
-msgstr "pierwsza wartość szeregu czasowego nie może być brakującą"
+#. R/anova.R: stop("'anova' object must have colnames")
+#: R/anova.R:0
+msgid "'anova' object must have colnames"
+msgstr "obiekt klasy \"anova\" musi posiadać nazwy kolumn"
 
-# stats/R/StructTS.R: 104
-# stop("all parameters were fixed")
-# stats/R/arma0.R: 116
-# stop("all parameters were fixed")
-# stats/R/arima.R: 180
-# stop("all parameters were fixed")
-msgid "all parameters were fixed"
-msgstr "wszystkie parametry zostały ustalone"
+#. R/approx.R: stop("'approx' requires n >= 1")
+#: R/approx.R:0
+msgid "'approx' requires n >= 1"
+msgstr "'approx' wymaga n >= 1"
 
-# stats/R/StructTS.R: 113
-# warning(gettextf("possible convergence problem: 'optim' gave code = %d and message %s",
-#                              res$convergence, sQuote(res$message)), domain = NA)
-msgid "possible convergence problem: 'optim' gave code = %d and message %s"
+#. R/ts.R: stop("'ar' part of model is not stationary")
+#: R/ts.R:0
+msgid "'ar' part of model is not stationary"
+msgstr "część 'ar' modelu nie jest stacjonarna"
+
+#. R/density.R: stop("'bw' is not positive.")
+#: R/density.R:0
+msgid "'bw' is not positive."
+msgstr "argument 'bw' nie jest dodatni"
+
+#. R/aggregate.R: stop("'by' must be a list")
+#: R/aggregate.R:0
+msgid "'by' must be a list"
+msgstr "argument 'by' musi być listą"
+
+#. R/kmeans.R: stop("'centers' must be a number or a matrix")
+#: R/kmeans.R:0
+msgid "'centers' must be a number or a matrix"
+msgstr "'centers' musi być liczbą lub macierzą"
+
+#. R/filter.R: stop("'circular' must be logical and not NA")
+#: R/filter.R:0
+msgid "'circular' must be logical and not NA"
 msgstr ""
-"prawdopodobny problem zbieżności: 'optim' zwrócił kod= %d oraz wiadomość %s"
+"argument 'circular' musi być wartością logiczną oraz nie może być wartością "
+"NA"
 
-# stats/R/TukeyHSD.R: 34
-# stop("no factors in the fitted model")
-msgid "no factors in the fitted model"
-msgstr "brak czynników w dopasowanym modelu"
+#. R/kernel.R: stop("'coef' does not have the correct length")
+#: R/kernel.R:0
+msgid "'coef' does not have the correct length"
+msgstr "argument 'coef' nie ma poprawnej długości"
 
-# stats/R/TukeyHSD.R: 41
-# stop("'which' specified no factors")
-msgid "'which' specified no factors"
-msgstr "'which' nie określa czynników"
+#. R/kernel.R: stop("'coef' must be a vector")
+#: R/kernel.R:0
+msgid "'coef' must be a vector"
+msgstr "argument 'coef' musi być wektorem"
 
-# stats/R/TukeyHSD.R: 43
-# warning("'which' specified some non-factors which will be dropped")
-msgid "'which' specified some non-factors which will be dropped"
-msgstr "'which' określił kilka nie-czynników które zostaną usunięte"
+#. R/aov.R: stop("'coef' must define a contrast, i.e., sum to 0")
+#. R/aov.R: stop("'coef' must define a contrast, i.e., sum to 0")
+#: R/aov.R:0
+msgid "'coef' must define a contrast, i.e., sum to 0"
+msgstr "argument 'coef' musi definiować kontrast, tzn., musi sumować się do 0"
 
-# stats/R/acf.R: 40
-# stop("'sampleT' and 'nser' must be integer")
-msgid "'sampleT' and 'nser' must be integer"
-msgstr "argumenty 'sampleT' oraz 'nser' muszą być liczbami całkowitymi"
+#. R/aov.R: stop("'coef' must have same length as 'contrast.obj'")
+#. R/aov.R: stop("'coef' must have same length as 'contrast.obj'")
+#: R/aov.R:0
+msgid "'coef' must have same length as 'contrast.obj'"
+msgstr "argument 'coef' musi mieć tę samą długość co argument 'contrast.obj'"
 
-# stats/R/acf.R: 45
-# stop("'lag.max' must be at least 0")
-msgid "'lag.max' must be at least 0"
-msgstr "argument 'lag.max' musi wynosić co najmniej 0"
+#. R/ftable.R: stop("'col.vars' missing or incorrect")
+#: R/ftable.R:0
+msgid "'col.vars' missing or incorrect"
+msgstr "brakuje argumentu 'col.vars' lub jest niepoprawny"
 
-# stats/R/acf.R: 75
-# stop("'lag.max' must be at least 1")
-msgid "'lag.max' must be at least 1"
-msgstr "argument 'lag.max' musi wynosić co najmniej 1"
+#. R/ansari.test.R: stop("'conf.level' must be a single number between 0 and 1")
+#. R/binom.test.R: stop("'conf.level' must be a single number between 0 and 1")
+#. R/cor.test.R: stop("'conf.level' must be a single number between 0 and 1")
+#. R/fisher.test.R: stop("'conf.level' must be a single number between 0 and 1")
+#. R/mantelhaen.test.R: stop("'conf.level' must be a single number between 0 and 1")
+#. R/prop.test.R: stop("'conf.level' must be a single number between 0 and 1")
+#. R/t.test.R: stop("'conf.level' must be a single number between 0 and 1")
+#. R/var.test.R: stop("'conf.level' must be a single number between 0 and 1")
+#. R/wilcox.test.R: stop("'conf.level' must be a single number between 0 and 1")
+#: R/ansari.test.R:0 R/binom.test.R:0 R/cor.test.R:0 R/fisher.test.R:0
+#: R/mantelhaen.test.R:0 R/prop.test.R:0 R/t.test.R:0 R/var.test.R:0
+#: R/wilcox.test.R:0
+msgid "'conf.level' must be a single number between 0 and 1"
+msgstr "'conf.level' musi być pojedynczą liczbą pomiędzy 0 a 1"
 
-# stats/R/ar.R: 54
-# stop("NAs in 'x'")
-# stats/R/ar.R: 264
-# stop("NAs in 'x'")
-# stats/R/ar.R: 339
-# stop("NAs in 'x'")
-# stats/R/ar.R: 478
-# stop("NAs in 'x'")
-# stats/R/ar.R: 543
-# stop("NAs in 'x'")
-# stats/R/ar.R: 599
-# stop("NAs in 'x'")
-# stats/R/acf.R: 78
-# stop("NAs in 'x'")
-msgid "NAs in 'x'"
-msgstr "wartości NA w 'x'"
+#. R/nlminb.R: stop("'control' argument must be a named list")
+#. R/nls.R: stop("'control' argument must be a named list")
+#: R/nlminb.R:0 R/nls.R:0
+msgid "'control' argument must be a named list"
+msgstr "argument 'control' musi być nazwaną listą"
 
-# stats/R/acf.R: 119
-# stop("x$lag must have at least 1 column")
-msgid "x$lag must have at least 1 column"
-msgstr "'x$lag' musi mieć jak przynajmniej 1 kolumnę"
+#. R/factanal.R: stop("'covmat' is not a valid covariance list")
+#. R/princomp.R: stop("'covmat' is not a valid covariance list")
+#: R/factanal.R:0 R/princomp.R:0
+msgid "'covmat' is not a valid covariance list"
+msgstr "'covmat' nie jest poprawną listą kowariancji"
 
-# stats/R/acf.R: 131
-# warning("can use ci.type=\"ma\" only if first lag is 0")
-msgid "can use ci.type=\"ma\" only if first lag is 0"
-msgstr "można użyć 'ci.type=\"ma\"' tylko jeśli pierwsze opóźnienie wynosi 0"
+#. R/factanal.R: stop("'covmat' is of unknown type")
+#. R/princomp.R: stop("'covmat' is of unknown type")
+#: R/factanal.R:0 R/princomp.R:0
+msgid "'covmat' is of unknown type"
+msgstr "'covmat' jest nieznanego typu"
 
-# stats/R/acf.R: 218
-# stop("univariate time series only")
-msgid "univariate time series only"
-msgstr "tylko jednowymiarowe szeregi czasowe"
+#. R/model.tables.R: stop("'cterms' argument must match terms in model object")
+#: R/model.tables.R:0
+msgid "'cterms' argument must match terms in model object"
+msgstr "argument 'cterms' musi zgadzać się z członami w obiekcie modelu"
 
-# stats/R/add.R: 42
-# stop("no terms in scope")
-# stats/R/add.R: 124
-# stop("no terms in scope")
-msgid "no terms in scope"
-msgstr "brak członów w zakresie"
+#. R/symnum.R: gettext("'cutpoints' must be unique in 0 < cuts < 1, but are = ")
+#: R/symnum.R:0
+msgid "'cutpoints' must be unique in 0 < cuts < 1, but are ="
+msgstr "'cutpoints' muszą być unikalne w przedziale '0 < cuts < 1', ale są ="
 
-# stats/R/add.R: 46
-# stop("no terms in scope for adding to object")
-# stats/R/add.R: 128
-# stop("no terms in scope for adding to object")
-# stats/R/add.R: 241
-# stop("no terms in scope for adding to object")
-msgid "no terms in scope for adding to object"
-msgstr "brak członów w zakresie do dodania do obiektu"
+#. R/symnum.R: gettext("'cutpoints' must be unique, but are = ")
+#: R/symnum.R:0
+msgid "'cutpoints' must be unique, but are ="
+msgstr "'cutpoints' muszą być unikalne, ale są ="
 
-# stats/R/add.R: 69
-# stop("number of rows in use has changed: remove missing values?")
-# stats/R/add.R: 395
-# stop("number of rows in use has changed: remove missing values?")
-# stats/R/add.R: 838
-# stop("number of rows in use has changed: remove missing values?")
-msgid "number of rows in use has changed: remove missing values?"
-msgstr "liczba wierszy w użyciu zmieniła się: usunąć brakujące wartości?"
+#. R/smspline.R: stop("'cv' must not be NA when 'df' is specified")
+#: R/smspline.R:0
+msgid "'cv' must not be NA when 'df' is specified"
+msgstr "argument 'cv' nie może mieć wartości NA, gdy określono argument 'df'"
 
-# stats/R/add.R: 104
-# warning("attempting model selection on an essentially perfect fit is nonsense",
-# 		call. = FALSE)
-msgid "attempting model selection on an essentially perfect fit is nonsense"
-msgstr "próba wyboru modelu dla idealnego dopasowania jest bez sensu"
+#. R/models.R: stop("'data' must be a data.frame, not a matrix or an array")
+#. R/models.R: stop("'data' must be a data.frame, not a matrix or an array")
+#: R/models.R:0
+msgid "'data' must be a data.frame, not a matrix or an array"
+msgstr "'data' musi być ramką danych, nie macierzą lub tablicą"
 
-# stats/R/add.R: 349
-# warning(gettextf("F test assumes quasi%s family", fam),
-#                     domain = NA)
-msgid "F test assumes quasi%s family"
-msgstr "Test Fishera zakłada rodzinę kwazi-%s"
+#. R/nls.R: stop("'data' must be a list or an environment")
+#: R/nls.R:0
+msgid "'data' must be a list or an environment"
+msgstr "'data' musi być listą albo środowiskiem"
 
-# stats/R/add.R: 362
-# stop("no 'add1' method implemented for \"mlm\" models")
-msgid "no 'add1' method implemented for \"mlm\" models"
-msgstr "brak zaimplementowanej metody 'add1' dla modeli 'mlm'"
+#. R/loess.R: stop("'degree' must be 0, 1 or 2")
+#: R/loess.R:0
+msgid "'degree' must be 0, 1 or 2"
+msgstr "argument 'degree' musi mieć wartość 0, 1, lub 2"
 
-# stats/R/add.R: 375
-# stop("scope is not a subset of term labels")
-# stats/R/add.R: 431
-# stop("scope is not a subset of term labels")
-# stats/R/add.R: 511
-# stop("scope is not a subset of term labels")
-msgid "scope is not a subset of term labels"
-msgstr "zakres nie jest podzbiorem etykiet członów"
+#. R/contr.poly.R: stop("'degree' must be at least 1")
+#: R/contr.poly.R:0
+msgid "'degree' must be at least 1"
+msgstr "argument 'degree' musi wynosić co najmniej 1"
 
-# stats/R/add.R: 494
-# stop("no 'drop1' method for \"mlm\" models")
-msgid "no 'drop1' method for \"mlm\" models"
-msgstr "brak metody 'drop1' dla modeli 'mlm'"
+#. R/contr.poly.R: stop("'degree' must be less than number of unique points")
+#. R/contr.poly.R: stop("'degree' must be less than number of unique points")
+#: R/contr.poly.R:0
+msgid "'degree' must be less than number of unique points"
+msgstr "'degree' musi być mniejsze niż liczba unikalnych punktów"
 
-# stats/R/add.R: 584
-# warning(gettextf("F test assumes 'quasi%s' family", fam),
-#                     domain = NA)
-msgid "F test assumes 'quasi%s' family"
-msgstr "Test Fishera zakłada rodzinę kwazi-%s"
+#. R/splinefun.R: stop("'deriv' must be between 0 and 3")
+#. R/splinefun.R: stop("'deriv' must be between 0 and 3")
+#: R/splinefun.R:0
+msgid "'deriv' must be between 0 and 3"
+msgstr "argument 'deriv' musi być pomiędzy 0 a 3"
 
-# stats/R/add.R: 774
-# stop("AIC is not defined for this model, so 'step' cannot proceed")
-msgid "AIC is not defined for this model, so 'step' cannot proceed"
-msgstr ""
-"Kryterium informacyjne Akaikego nie jest zdefiniowane dla tego modelu, tak "
-"więc 'step' nie może zostać wykonany"
+#. R/ts.R: warning("'end' value not changed")
+#: R/ts.R:0
+msgid "'end' value not changed"
+msgstr "argument 'end' nie został zmieniony"
 
-# stats/R/add.R: 776
-# stop("AIC is -infinity for this model, so 'step' cannot proceed")
-msgid "AIC is -infinity for this model, so 'step' cannot proceed"
-msgstr ""
-"AIC wynosi minus nieskończoność dla tego modelu, tak więc 'step' nie może "
-"zostać wykonany"
+#. R/glm.R: stop("'family' argument seems not to be a valid family object",     call. = FALSE)
+#: R/glm.R:0
+msgid "'family' argument seems not to be a valid family object"
+msgstr "argument 'family' nie wygląda na poprawny obiekt rodziny"
 
-# stats/R/addmargins.R: 34
-# stop("'A' must be an array or table")
-msgid "'A' must be an array or table"
-msgstr "argument 'A' musi być tablicą lub tabelą"
+#. R/glm.R: stop("'family' not recognized")
+#: R/glm.R:0
+msgid "'family' not recognized"
+msgstr "argument 'family' nie został rozpoznany"
 
-# stats/R/addmargins.R: 79
-# stop(gettextf("length of FUN, %d,\n does not match the length of the margins, %d",
-# 			  length(FUN), n.sid), domain = NA)
-msgid ""
-"length of FUN, %d,\n"
-" does not match the length of the margins, %d"
-msgstr "długość 'FUN', %d, nie zgadza się z długością marginesów, %d"
+#. R/ftable.R: stop("'file' must be a character string or connection")
+#: R/ftable.R:0
+msgid "'file' must be a character string or connection"
+msgstr "argument 'file' musi być łańcuchem tekstowym lub połączeniem"
 
-# stats/R/aggregate.R: 38
-# stop("no rows to aggregate")
-msgid "no rows to aggregate"
-msgstr "brak wierszy do zagregowania"
+#. R/filter.R: stop("'filter' is longer than time series")
+#: R/filter.R:0
+msgid "'filter' is longer than time series"
+msgstr "'filter' jest dłuższy niż szeregi czasowe"
 
-# stats/R/aggregate.R: 45
-# stop("'by' must be a list")
-msgid "'by' must be a list"
-msgstr "argument 'by' musi być listą"
+#. R/ftable.R: stop("'formula' has '.' in both left and right hand sides")
+#: R/ftable.R:0
+msgid "'formula' has '.' in both left and right hand sides"
+msgstr "'formula' ma '.' po lewej oraz prawej stronie"
 
-# stats/R/aggregate.R: 57
-# stop("arguments must have same length")
-msgid "arguments must have same length"
-msgstr "argumenty muszą mieć tę samą długość"
+#. R/quade.test.R: stop("'formula' missing")
+#: R/quade.test.R:0
+msgid "'formula' missing"
+msgstr "brakuje argumentu 'formula'"
 
-# stats/R/ansari.test.R: 252
-# stop("'formula' missing or incorrect")
-# stats/R/wilcox.test.R: 418
-# stop("'formula' missing or incorrect")
-# stats/R/fligner.test.R: 83
-# stop("'formula' missing or incorrect")
-# stats/R/bartlett.test.R: 81
-# stop("'formula' missing or incorrect")
-# stats/R/xtabs.R: 29
-# stop("'formula' missing or incorrect")
-# stats/R/oneway.test.R: 23
-# stop("'formula' missing or incorrect")
-# stats/R/t.test.R: 131
-# stop("'formula' missing or incorrect")
-# stats/R/ftable.R: 89
-# stop("'formula' missing or incorrect")
-# stats/R/var.test.R: 92
-# stop("'formula' missing or incorrect")
-# stats/R/kruskal.test.R: 78
-# stop("'formula' missing or incorrect")
-# stats/R/aggregate.R: 123
-# stop("'formula' missing or incorrect")
-# stats/R/mood.test.R: 73
-# stop("'formula' missing or incorrect")
+#. R/aggregate.R: stop("'formula' missing or incorrect")
+#. R/ansari.test.R: stop("'formula' missing or incorrect")
+#. R/bartlett.test.R: stop("'formula' missing or incorrect")
+#. R/fligner.test.R: stop("'formula' missing or incorrect")
+#. R/ftable.R: stop("'formula' missing or incorrect")
+#. R/kruskal.test.R: stop("'formula' missing or incorrect")
+#. R/mood.test.R: stop("'formula' missing or incorrect")
+#. R/oneway.test.R: stop("'formula' missing or incorrect")
+#. R/t.test.R: stop("'formula' missing or incorrect")
+#. R/var.test.R: stop("'formula' missing or incorrect")
+#. R/wilcox.test.R: stop("'formula' missing or incorrect")
+#. R/xtabs.R: stop("'formula' missing or incorrect")
+#: R/aggregate.R:0 R/ansari.test.R:0 R/bartlett.test.R:0 R/fligner.test.R:0
+#: R/ftable.R:0 R/kruskal.test.R:0 R/mood.test.R:0 R/oneway.test.R:0
+#: R/t.test.R:0 R/var.test.R:0 R/wilcox.test.R:0 R/xtabs.R:0
 msgid "'formula' missing or incorrect"
 msgstr "brakuje argumentu 'formula' lub jest niepoprawny"
 
-# stats/R/ftable.R: 91
-# stop("'formula' must have both left and right hand sides")
-# stats/R/aggregate.R: 125
-# stop("'formula' must have both left and right hand sides")
+#. R/cor.test.R: stop("'formula' missing or invalid")
+#: R/cor.test.R:0
+msgid "'formula' missing or invalid"
+msgstr "brakuje argumentu 'formula' lub jest niepoprawny"
+
+#. R/aggregate.R: stop("'formula' must have both left and right hand sides")
+#. R/ftable.R: stop("'formula' must have both left and right hand sides")
+#: R/aggregate.R:0 R/ftable.R:0
 msgid "'formula' must have both left and right hand sides"
 msgstr "'formula' musi mieć jednocześnie lewą i prawą stronę"
 
-# stats/R/aggregate.R: 198
-# stop(gettextf("cannot change frequency from %g to %g",
-#                       ofrequency, nfrequency), domain = NA)
-msgid "cannot change frequency from %g to %g"
-msgstr "nie można zmienić częstotliwości z %g na %g"
+#. R/bartlett.test.R: stop("'formula' should be of the form response ~ group")
+#. R/fligner.test.R: stop("'formula' should be of the form response ~ group")
+#. R/kruskal.test.R: stop("'formula' should be of the form response ~ group")
+#: R/bartlett.test.R:0 R/fligner.test.R:0 R/kruskal.test.R:0
+msgid "'formula' should be of the form response ~ group"
+msgstr "argument 'formula' powinien mieć formę 'zmienna zależna ~ grupa'"
 
-# stats/R/anova.R: 81
-# stop("'x' must be coefficient matrix/data frame")
-msgid "'x' must be coefficient matrix/data frame"
-msgstr "argument 'x' musi być macierzą współczynników lub ramką danych"
+#. R/ts.R: stop("'frequency' and 'deltat' are both supplied and are inconsistent")
+#: R/ts.R:0
+msgid "'frequency' and 'deltat' are both supplied and are inconsistent"
+msgstr ""
+"oba argumenty 'frequency' oraz 'deltat' zostały dostarczone oraz oba są "
+"niezgodne"
 
-# stats/R/anova.R: 86
-# warning("option \"show.coef.Pvalues\" is invalid: assuming TRUE")
-msgid "option \"show.coef.Pvalues\" is invalid: assuming TRUE"
-msgstr "opcja \"show.coef.Pvalues\" jest niepoprawna: zakładanie TRUE"
+#. R/ts.R: warning("'frequency' not changed")
+#: R/ts.R:0
+msgid "'frequency' not changed"
+msgstr "argument 'frequency' nie został zmieniony"
 
-# stats/R/anova.R: 92
-# stop("'P.values' is TRUE, but 'has.Pvalue' is not")
-msgid "'P.values' is TRUE, but 'has.Pvalue' is not"
-msgstr "argument 'P.values' wynosi TRUE, ale argument 'has.Pvalue' już nie"
+#. R/dendrogram.R: gettextf("'height' must be at least %g, the maximal height of its components",     h.max)
+#: R/dendrogram.R:0
+msgid "'height' must be at least %g, the maximal height of its components"
+msgstr ""
+"'height' musi być równe co najmniej %g, maksymalnej wysokości jego "
+"komponentów"
 
-# stats/R/anova.R: 101
-# stop("wrong k / cs.ind")
-msgid "wrong k / cs.ind"
-msgstr "niepoprawny 'k' / 'cs.ind'"
+#. R/fisher.test.R: warning("'hybrid' is ignored for a 2 x 2 table")
+#: R/fisher.test.R:0
+msgid "'hybrid' is ignored for a 2 x 2 table"
+msgstr "argument 'hybrid' jest ignorowany dla tabeli o wymiarach 2 x 2"
 
-# stats/R/anova.R: 140
-# warning("option \"show.signif.stars\" is invalid: assuming TRUE")
-msgid "option \"show.signif.stars\" is invalid: assuming TRUE"
-msgstr "opcja \"show.signif.stars\" jest niepoprawna: zakładanie TRUE"
+#. R/plot.lm.R: gettextf("'id.n' must be in {1,..,%d}", n)
+#: R/plot.lm.R:0
+msgid "'id.n' must be in {1,..,%d}"
+msgstr "argument 'id.n' musi być w przedziale {1,..,%d}"
 
-# stats/R/anova.R: 173
-# stop("'anova' object must have colnames")
-msgid "'anova' object must have colnames"
-msgstr "obiekt klasy \"anova\" musi posiadać nazwy kolumn"
+#. R/arima.R: stop("'init' is of the wrong length")
+#. R/arma0.R: stop("'init' is of the wrong length")
+#: R/arima.R:0 R/arma0.R:0
+msgid "'init' is of the wrong length"
+msgstr "argument 'init' ma niepoprawną długość"
 
-# stats/R/ansari.test.R: 31
-# stop("'conf.level' must be a single number between 0 and 1")
-# stats/R/wilcox.test.R: 34
-# stop("'conf.level' must be a single number between 0 and 1")
-# stats/R/binom.test.R: 52
-# stop("'conf.level' must be a single number between 0 and 1")
-# stats/R/mantelhaen.test.R: 62
-# stop("'conf.level' must be a single number between 0 and 1")
-# stats/R/fisher.test.R: 76
-# stop("'conf.level' must be a single number between 0 and 1")
-# stats/R/t.test.R: 33
-# stop("'conf.level' must be a single number between 0 and 1")
-# stats/R/var.test.R: 33
-# stop("'conf.level' must be a single number between 0 and 1")
-# stats/R/cor.test.R: 58
-# stop("'conf.level' must be a single number between 0 and 1")
-# stats/R/prop.test.R: 76
-# stop("'conf.level' must be a single number between 0 and 1")
-msgid "'conf.level' must be a single number between 0 and 1"
-msgstr "'conf.level' musi być pojedynczą liczbą pomiędzy 0 a 1"
+#. R/nlm.R: stop("'interval' must be a vector of length 2")
+#: R/nlm.R:0
+msgid "'interval' must be a vector of length 2"
+msgstr "argument 'interval' musi być wektorem liczbowym o długości 2"
 
-# stats/R/ansari.test.R: 39
-# stop("not enough 'x' observations")
-# stats/R/t.test.R: 60
-# stop("not enough 'x' observations")
-# stats/R/t.test.R: 72
-# stop("not enough 'x' observations")
-# stats/R/var.test.R: 46
-# stop("not enough 'x' observations")
-msgid "not enough 'x' observations"
-msgstr "niewystarczająca liczba obserwacji 'x'"
+#. R/kmeans.R: stop("'invalid value of 'k'")
+#: R/kmeans.R:0
+msgid "'invalid value of 'k'"
+msgstr "niepoprawna wartość 'k'"
 
-# stats/R/ansari.test.R: 42
-# stop("not enough 'y' observations")
-# stats/R/wilcox.test.R: 247
-# stop("not enough 'y' observations")
-# stats/R/t.test.R: 74
-# stop("not enough 'y' observations")
-# stats/R/var.test.R: 50
-# stop("not enough 'y' observations")
-msgid "not enough 'y' observations"
-msgstr "niewystarczająca liczba obserwacji 'y'"
+#. R/kmeans.R: stop("'iter.max' must be positive")
+#: R/kmeans.R:0
+msgid "'iter.max' must be positive"
+msgstr "argument 'iter.max' musi być dodatni"
 
-# stats/R/ansari.test.R: 86
-# warning("samples differ in location: cannot compute confidence set, returning NA")
-# stats/R/ansari.test.R: 197
-# warning("samples differ in location: cannot compute confidence set, returning NA")
-msgid "samples differ in location: cannot compute confidence set, returning NA"
-msgstr ""
-"próby różnią się położeniem: nie można obliczyć przedziału ufności, "
-"zwracanie wartości NA"
+#. R/loess.R: gettextf("'iterTrace = %s' not obeyed as iterations = %d", iterTrace,     iterations)
+#: R/loess.R:0
+msgid "'iterTrace = %s' not obeyed as iterations = %d"
+msgstr "'iterTrace = %s' nie jest przestrzegane, ponieważ iteracje = %d"
 
-# stats/R/ansari.test.R: 111
-# warning("cannot compute confidence set, returning NA")
-msgid "cannot compute confidence set, returning NA"
-msgstr "nie można obliczyć przedziału ufności, zwracanie wartości NA"
+#. R/identify.hclust.R: stop("'k' and 'h' must be a scalar")
+#: R/identify.hclust.R:0
+msgid "'k' and 'h' must be a scalar"
+msgstr "argumenty 'k' oraz 'h' muszą być skalarami"
 
-# stats/R/ansari.test.R: 188
-# warning("cannot compute asymptotic confidence set or estimator")
-msgid "cannot compute asymptotic confidence set or estimator"
-msgstr "nie można obliczyć asymptotycznego przedziału ufności lub estymatora"
+#. R/runmed.R: gettextf("'k' is bigger than 'n'!  Changing 'k' to %d", k <- as.integer(1 +     2 * ((n - 1)%/%2)))
+#: R/runmed.R:0
+msgid "'k' is bigger than 'n'!  Changing 'k' to %d"
+msgstr "'k' jest większe niż 'n'!  Zmienianie 'k' na %d"
 
-# stats/R/ansari.test.R: 219
-# warning("cannot compute estimate, returning NA")
-msgid "cannot compute estimate, returning NA"
-msgstr "nie można obliczyć estymatora, zwracanie wartości NA"
+#. R/kernel.R: stop("'k' is not a kernel")
+#. R/kernel.R: stop("'k' is not a kernel")
+#: R/kernel.R:0
+msgid "'k' is not a kernel"
+msgstr "argument 'k' nie jest jądrem"
 
-# stats/R/ansari.test.R: 225
-# warning("cannot compute exact p-value with ties")
-# stats/R/wilcox.test.R: 234
-# warning("cannot compute exact p-value with ties")
-# stats/R/wilcox.test.R: 389
-# warning("cannot compute exact p-value with ties")
-# stats/R/ks.test.R: 47
-# warning("cannot compute exact p-value with ties")
-msgid "cannot compute exact p-value with ties"
-msgstr ""
-"nie można obliczyć dokładnej wartości prawdopodobieństwa z powtórzonymi "
-"wartościami"
+#. R/lag.R: warning("'k' is not an integer")
+#: R/lag.R:0
+msgid "'k' is not an integer"
+msgstr "argument 'k' nie jest liczbą całkowitą"
 
-# stats/R/ansari.test.R: 227
-# warning("cannot compute exact confidence intervals with ties")
-# stats/R/wilcox.test.R: 391
-# warning("cannot compute exact confidence intervals with ties")
-msgid "cannot compute exact confidence intervals with ties"
-msgstr ""
-"nie można obliczyć dokładnych przedziałów ufności z powtórzonymi wartościami"
+#. R/cmdscale.R: stop("'k' must be in {1, 2, ..  n - 1}")
+#: R/cmdscale.R:0
+msgid "'k' must be in {1, 2, ..  n - 1}"
+msgstr "'k' musi być w zakresie {1, 2, ..  n - 1}"
 
-# stats/R/ansari.test.R: 264
-# stop("grouping factor must have exactly 2 levels")
-# stats/R/wilcox.test.R: 430
-# stop("grouping factor must have exactly 2 levels")
-# stats/R/t.test.R: 143
-# stop("grouping factor must have exactly 2 levels")
-# stats/R/var.test.R: 104
-# stop("grouping factor must have exactly 2 levels")
-# stats/R/mood.test.R: 85
-# stop("grouping factor must have exactly 2 levels")
-msgid "grouping factor must have exactly 2 levels"
-msgstr "grupujący czynnik musi mieć dokładnie 2 poziomy"
+#. R/runmed.R: gettextf("'k' must be odd!  Changing 'k' to %d", k <- as.integer(1 +     2 * (k%/%2)))
+#: R/runmed.R:0
+msgid "'k' must be odd!  Changing 'k' to %d"
+msgstr "'k' musi być nieparzyste!  Zmienianie 'k' na %d"
 
-# stats/R/aov.R: 48
-# stop("weights are not supported in a multistratum aov() fit")
-msgid "weights are not supported in a multistratum aov() fit"
-msgstr "wagi nie są wspierane w wielowarstwowym dopasowaniu 'aov()'"
+#. R/runmed.R: stop("'k' must be positive")
+#: R/runmed.R:0
+msgid "'k' must be positive"
+msgstr "argument 'k' musi być dodatni"
 
-# stats/R/aov.R: 77
-# warning("Error() model is singular")
-msgid "Error() model is singular"
-msgstr "model 'Error()' jest osobliwy"
+#. R/kernel.R: stop("'kernapply' is not available for object 'x'")
+#: R/kernel.R:0
+msgid "'kernapply' is not available for object 'x'"
+msgstr "'kernapply' nie jest dostępny dla obiektu 'x'"
 
-# stats/R/aov.R: 316
-# stop("the 'split' argument must be a list")
-msgid "the 'split' argument must be a list"
-msgstr "argument 'split' musi być listą"
+#. R/acf.R: stop("'lag.max' must be at least 0")
+#: R/acf.R:0
+msgid "'lag.max' must be at least 0"
+msgstr "argument 'lag.max' musi wynosić co najmniej 0"
 
-# stats/R/aov.R: 563
-# stop("'coef' must define a contrast, i.e., sum to 0")
-# stats/R/aov.R: 658
-# stop("'coef' must define a contrast, i.e., sum to 0")
-msgid "'coef' must define a contrast, i.e., sum to 0"
-msgstr "argument 'coef' musi definiować kontrast, tzn., musi sumować się do 0"
+#. R/acf.R: stop("'lag.max' must be at least 1")
+#: R/acf.R:0
+msgid "'lag.max' must be at least 1"
+msgstr "argument 'lag.max' musi wynosić co najmniej 1"
 
-# stats/R/aov.R: 565
-# stop("'coef' must have same length as 'contrast.obj'")
-# stats/R/aov.R: 660
-# stop("'coef' must have same length as 'contrast.obj'")
-msgid "'coef' must have same length as 'contrast.obj'"
-msgstr "argument 'coef' musi mieć tę samą długość co argument 'contrast.obj'"
+#. R/logLik.R: stop("'logLik.lm' does not support multiple responses")
+#: R/logLik.R:0
+msgid "'logLik.lm' does not support multiple responses"
+msgstr "funkcja 'logLik.lm()' nie wspiera wielokrotnych zmiennych zależnych"
 
-# stats/R/aov.R: 571
-# stop(gettextf("each element of '%s' must be logical",
-#                                      substitute(contrasts.list)),
-#                             domain = NA)
-# stats/R/aov.R: 666
-# stop(gettextf("each element of '%s' must be logical",
-#                                          substitute(contrasts.obj)),
-#                                 domain = NA)
-msgid "each element of '%s' must be logical"
-msgstr "każdy element '%s' musi być elementem logicznym"
+#. R/mad.R: stop("'low' and 'high' cannot be both TRUE")
+#: R/mad.R:0
+msgid "'low' and 'high' cannot be both TRUE"
+msgstr "'low' oraz 'high' nie mogą jednocześnie być TRUE"
 
-# stats/R/aov.R: 577
-# stop("the contrast defined is empty (has no TRUE elements)")
-# stats/R/aov.R: 672
-# stop("the contrast defined is empty (has no TRUE elements)")
-msgid "the contrast defined is empty (has no TRUE elements)"
-msgstr "zdefiniowany kontrast jest pusty (nie ma elementów TRUE)"
+#. R/optim.R: stop("'lower' and 'upper' must be finite values")
+#: R/optim.R:0
+msgid "'lower' and 'upper' must be finite values"
+msgstr "'lower' oraz 'upper' muszą być skończonymi wartościami"
 
-# stats/R/aov.R: 582
-# stop("columns of 'contrast.obj' must define a contrast (sum to zero)")
-# stats/R/aov.R: 678
-# stop("columns of 'contrast.obj' must define a contrast(sum to zero)")
-msgid "columns of 'contrast.obj' must define a contrast (sum to zero)"
-msgstr "kolumny 'contrast.obj' muszą określać konstrast (sumować się do zera)"
+#. R/kernel.R: stop("'m' is less than 1")
+#. R/kernel.R: stop("'m' is less than 1")
+#: R/kernel.R:0
+msgid "'m' is less than 1"
+msgstr "wartość argumentu 'm' jest mniejsza niż 1"
 
-# stats/R/aov.R: 588
-# stop("no degrees of freedom for residuals")
-msgid "no degrees of freedom for residuals"
-msgstr "brak stopni swobody dla reszt"
+#. R/kernel.R: stop("'m' must be numeric with non-negative integers")
+#: R/kernel.R:0
+msgid "'m' must be numeric with non-negative integers"
+msgstr "argument 'm' musi być wektorem z nieujemnymi liczbami całkowitymi"
 
-# stats/R/aov.R: 606
-# stop("'object' does not include an error 'qr' component")
-msgid "'object' does not include an error 'qr' component"
-msgstr "argument 'object' nie uwzględnia komponentu błędu 'qr'"
+#. R/termplot.R: stop("'main' must be TRUE, FALSE, NULL or character (vector).")
+#. R/termplot.R: stop("'main' must be TRUE, FALSE, NULL or character (vector).")
+#: R/termplot.R:0
+msgid "'main' must be TRUE, FALSE, NULL or character (vector)."
+msgstr "'main' musi być TRUE, FALSE, NULL lub być tekstem (wektor)."
 
-# stats/R/aov.R: 649
-# message("Refitting model to allow projection")
-msgid "Refitting model to allow projection"
-msgstr "Ponowne dopasowywanie modelu aby umożliwić rzutowanie"
+#. R/loglin.R: stop("'margin' must contain names or numbers corresponding to 'table'")
+#: R/loglin.R:0
+msgid "'margin' must contain names or numbers corresponding to 'table'"
+msgstr ""
+"argument 'margin' musi zawierać nazwy lub liczby odpowiadające argumentowi "
+"'table'"
 
-# stats/R/aov.R: 582
-# stop("columns of 'contrast.obj' must define a contrast (sum to zero)")
-# stats/R/aov.R: 678
-# stop("columns of 'contrast.obj' must define a contrast(sum to zero)")
-msgid "columns of 'contrast.obj' must define a contrast(sum to zero)"
-msgstr "kolumny 'contrast.obj' muszą określać kontrast (sumować się do zera)"
+#. R/dendrogram.R: stop("'margins' must be a numeric vector of length 2")
+#: R/dendrogram.R:0
+msgid "'margins' must be a numeric vector of length 2"
+msgstr "argument 'margins' musi być wektorem liczbowym o długości 2"
 
-# stats/R/approx.R: 42
-# warning("collapsing to unique 'x' values")
-msgid "collapsing to unique 'x' values"
-msgstr "zwijanie do unikalnych wartości 'x'"
+#. R/mlm.R: stop("'mlm' objects with weights are not supported")
+#: R/mlm.R:0
+msgid "'mlm' objects with weights are not supported"
+msgstr "obiekty klasy \"mlm\" z wagami nie są wspierane"
 
-# stats/R/approx.R: 57
-# stop("invalid interpolation method")
-# stats/R/approx.R: 90
-# stop("invalid interpolation method")
-# stats/R/spline.R: 29
-# stop("invalid interpolation method")
-msgid "invalid interpolation method"
-msgstr "niepoprawna metoda interpolacji"
+#. R/ts.R: stop("'model$order' must be of length 3")
+#: R/ts.R:0
+msgid "'model$order' must be of length 3"
+msgstr "'model$order' musi być długości 3"
 
-# stats/R/approx.R: 67
-# stop("need at least two non-NA values to interpolate")
-# stats/R/approx.R: 101
-# stop("need at least two non-NA values to interpolate")
-msgid "need at least two non-NA values to interpolate"
-msgstr "co najmniej dwie wartości nie-NA są wymagane do interpolacji"
+#. R/ts.R: stop("'model' must be list")
+#: R/ts.R:0
+msgid "'model' must be list"
+msgstr "argument 'model' musi być listą"
 
-# stats/R/splinefun.R: 32
-# stop("zero non-NA points")
-# stats/R/approx.R: 68
-# stop("zero non-NA points")
-# stats/R/approx.R: 102
-# stop("zero non-NA points")
-# stats/R/spline.R: 37
-# stop("zero non-NA points")
-msgid "zero non-NA points"
-msgstr "zero punktów o wartości nie-NA"
+#. R/model.tables.R: stop("'model.tables' is not implemented for multiple responses")
+#: R/model.tables.R:0
+msgid "'model.tables' is not implemented for multiple responses"
+msgstr ""
+"funkcja 'model.tables()' nie jest zaimplementowana dla wielu zmiennych "
+"zależnych"
 
-# stats/R/approx.R: 77
-# stop("'approx' requires n >= 1")
-msgid "'approx' requires n >= 1"
-msgstr "'approx' wymaga n >= 1"
+#. R/t.test.R: stop("'mu' must be a single number")
+#. R/wilcox.test.R: stop("'mu' must be a single number")
+#: R/t.test.R:0 R/wilcox.test.R:0
+msgid "'mu' must be a single number"
+msgstr "argument 'mu' musi być pojedynczą liczbą"
 
-# stats/R/ar.R: 63
-# stop("'order.max' must be >= 1")
-# stats/R/ar.R: 491
-# stop("'order.max' must be >= 1")
-# stats/R/ar.R: 555
-# stop("'order.max' must be >= 1")
-msgid "'order.max' must be >= 1"
-msgstr "'order.max' musi być >= 1"
+#. R/fisher.test.R: stop("'mult' must be integer >= 2, typically = 30")
+#: R/fisher.test.R:0
+msgid "'mult' must be integer >= 2, typically = 30"
+msgstr "argument 'mult' musi być liczbą całkowitą >= 2, na ogół = 30"
 
-# stats/R/ar.R: 64
-# stop("'order.max' must be < 'n.used'")
-# stats/R/ar.R: 276
-# stop("'order.max' must be < 'n.used'")
-# stats/R/ar.R: 357
-# stop("'order.max' must be < 'n.used'")
-# stats/R/ar.R: 556
-# stop("'order.max' must be < 'n.used'")
-msgid "'order.max' must be < 'n.used'"
-msgstr "argument 'order.max' musi być < argument 'n.used'"
+#. R/binom.test.R: stop("'n' must be a positive integer >= 'x'")
+#: R/binom.test.R:0
+msgid "'n' must be a positive integer >= 'x'"
+msgstr "argument 'n' musi być dodatnią liczbą całkowitą >= argumentu 'x'"
 
-# stats/R/ar.R: 128
-# stop("zero-variance series")
-# stats/R/ar.R: 562
-# stop("zero-variance series")
-msgid "zero-variance series"
-msgstr "seria o zerowej wariancji"
+#. R/ts.R: stop("'n' must be strictly positive")
+#: R/ts.R:0
+msgid "'n' must be strictly positive"
+msgstr "argument 'n' musi być ściśle dodatni"
 
-# stats/R/ar.R: 195
-# stop("'n.ahead' must be at least 1")
+#. R/ar.R: stop("'n.ahead' must be at least 1")
+#: R/ar.R:0
 msgid "'n.ahead' must be at least 1"
 msgstr "argument 'n.ahead' musi wynosić co najmniej 1"
 
-# stats/R/ar.R: 210
-# stop("number of series in 'object' and 'newdata' do not match")
-msgid "number of series in 'object' and 'newdata' do not match"
-msgstr "liczba serii w 'object' oraz 'newdata' nie zgadzają się"
-
-# stats/R/ar.R: 228
-# warning("'se.fit' not yet implemented for multivariate models")
-msgid "'se.fit' not yet implemented for multivariate models"
-msgstr ""
-"funkcja 'se.fit()' nie jest jeszcze zaimplementowana dla wielowymiarowych "
-"modeli"
-
-# stats/R/ar.R: 262
-# stop("MLE only implemented for univariate series")
-msgid "MLE only implemented for univariate series"
+#. R/prcomp.R: stop("'newdata' does not have named columns matching one or more of the original columns")
+#. R/princomp-add.R: stop("'newdata' does not have named columns matching one or more of the original columns")
+#: R/prcomp.R:0 R/princomp-add.R:0
+msgid ""
+"'newdata' does not have named columns matching one or more of the original "
+"columns"
 msgstr ""
-"Estymacja największej wiarygodności jest zaimplementowana jedynie dla "
-"jednowymiarowych serii"
+"'newdata' nie ma nazwanych kolumn pasujących do jednej lub więcej "
+"oryginalnych kolumn"
 
-# stats/R/ar.R: 275
-# stop ("'order.max' must be >= 0")
-# stats/R/ar.R: 356
-# stop("'order.max' must be >= 0")
-msgid "'order.max' must be >= 0"
-msgstr "'order.max' musi być >= 0"
+#. R/prcomp.R: stop("'newdata' does not have the correct number of columns")
+#. R/princomp-add.R: stop("'newdata' does not have the correct number of columns")
+#: R/prcomp.R:0 R/princomp-add.R:0
+msgid "'newdata' does not have the correct number of columns"
+msgstr "'newdata' nie ma poprawnej liczby kolumn"
 
-# stats/R/arma0.R: 69
-# stop("'order' must be a non-negative numeric vector of length 3")
-# stats/R/arima.R: 119
-# stop("'order' must be a non-negative numeric vector of length 3")
-msgid "'order' must be a non-negative numeric vector of length 3"
-msgstr "'order' musi być nieujemnym wektorem liczbowym o długości 3"
+#. R/prcomp.R: stop("'newdata' must be a matrix or data frame")
+#. R/princomp-add.R: stop("'newdata' must be a matrix or data frame")
+#: R/prcomp.R:0 R/princomp-add.R:0
+msgid "'newdata' must be a matrix or data frame"
+msgstr "'newdata' musi być macierzą lub ramką danych"
 
-# stats/R/arma0.R: 73
-# stop("'seasonal' must be a list with component 'order'")
-# stats/R/arma0.R: 80
-# stop("'seasonal' must be a list with component 'order'")
-# stats/R/arima.R: 123
-# stop("'seasonal' must be a list with component 'order'")
-# stats/R/arima.R: 130
-# stop("'seasonal' must be a list with component 'order'")
-msgid "'seasonal' must be a list with component 'order'"
-msgstr "'seasonal' musi być listą z komponentem 'order'"
+#. R/smspline.R: stop("'nknots' must be at least 1")
+#: R/smspline.R:0
+msgid "'nknots' must be at least 1"
+msgstr "argument 'nknots' musi wynosić co najmniej 1"
 
-# stats/R/arma0.R: 76
-# stop("'seasonal$order' must be a non-negative numeric vector of length 3")
-# stats/R/arima.R: 126
-# stop("'seasonal$order' must be a non-negative numeric vector of length 3")
-msgid "'seasonal$order' must be a non-negative numeric vector of length 3"
-msgstr "'seasonal$order' musi być nieujemnym wektorem liczbowym o długości 3"
+#. R/smspline.R: stop("'nknots' must be numeric (in {1,..,n})")
+#: R/smspline.R:0
+msgid "'nknots' must be numeric (in {1,..,n})"
+msgstr "'nknots' musi być liczbą (w przedziale {1,..,n})"
 
-# stats/R/arma0.R: 102
-# stop("lengths of 'x' and 'xreg' do not match")
-# stats/R/arima.R: 151
-# stop("lengths of 'x' and 'xreg' do not match")
-msgid "lengths of 'x' and 'xreg' do not match"
-msgstr "długości argumentów 'x' oraz 'xreg' muszą się zgadzać"
+#. R/ppr.R: stop("'nterms' is missing with no default")
+#: R/ppr.R:0
+msgid "'nterms' is missing with no default"
+msgstr "brakuje wartości dla 'nterms', a nie ma określonej wartości domyślnej"
 
-# stats/R/arma0.R: 114
-# stop("wrong length for 'fixed'")
-# stats/R/arima.R: 178
-# stop("wrong length for 'fixed'")
-msgid "wrong length for 'fixed'"
-msgstr "niepoprawna długość dla argumentu 'fixed'"
+#. R/aov.R: stop("'object' does not include an error 'qr' component")
+#: R/aov.R:0
+msgid "'object' does not include an error 'qr' component"
+msgstr "argument 'object' nie uwzględnia komponentu błędu 'qr'"
 
-# stats/R/arima.R: 186
-# warning("some AR parameters were fixed: setting transform.pars = FALSE")
-msgid "some AR parameters were fixed: setting transform.pars = FALSE"
-msgstr ""
-"niektóre parametry autoregresji zostały ustalone: ustawianie 'transform.pars "
-"= FALSE'"
+#. R/lm.R: stop("'object' has no 'effects' component")
+#: R/lm.R:0
+msgid "'object' has no 'effects' component"
+msgstr "'object' nie ma komponentu 'effects'"
 
-# stats/R/arima.R: 221
-# stop("too few non-missing observations")
-msgid "too few non-missing observations"
-msgstr "zbyt mało niebrakujących obserwacji"
+#. R/models.R: stop("'offset' must be numeric")
+#: R/models.R:0
+msgid "'offset' must be numeric"
+msgstr "argument 'offset' musi być liczbą"
 
-# stats/R/arma0.R: 160
-# stop("'init' is of the wrong length")
-# stats/R/arima.R: 225
-# stop("'init' is of the wrong length")
-msgid "'init' is of the wrong length"
-msgstr "argument 'init' ma niepoprawną długość"
+#. R/fisher.test.R: stop("'or' must be a single number between 0 and Inf")
+#: R/fisher.test.R:0
+msgid "'or' must be a single number between 0 and Inf"
+msgstr "argument 'or' musi być pojedynczą liczbą pomiędzy 0 a Inf"
 
-# stats/R/arma0.R: 168
-# stop("non-stationary AR part")
-# stats/R/arima.R: 231
-# stop("non-stationary AR part")
-msgid "non-stationary AR part"
-msgstr "niestacjonarna część autoregresji"
+#. R/arima.R: stop("'order' must be a non-negative numeric vector of length 3")
+#. R/arma0.R: stop("'order' must be a non-negative numeric vector of length 3")
+#: R/arima.R:0 R/arma0.R:0
+msgid "'order' must be a non-negative numeric vector of length 3"
+msgstr "'order' musi być nieujemnym wektorem liczbowym o długości 3"
 
-# stats/R/arma0.R: 171
-# stop("non-stationary seasonal AR part")
-# stats/R/arima.R: 234
-# stop("non-stationary seasonal AR part")
-msgid "non-stationary seasonal AR part"
-msgstr "niestacjonarna sezonowa część autoregresji"
+#. R/dendrogram.R: stop("'order.dendrogram' requires a dendrogram")
+#: R/dendrogram.R:0
+msgid "'order.dendrogram' requires a dendrogram"
+msgstr "'order.dendrogram' wymaga drzewa celu"
 
-# stats/R/arma0.R: 192
-# warning(gettextf("possible convergence problem: optim gave code = %d",
-#                          code), domain = NA)
-# stats/R/arima.R: 251
-# warning(gettextf("possible convergence problem: optim gave code = %d",
-#                              res$convergence), domain = NA)
-# stats/R/arima.R: 302
-# warning(gettextf("possible convergence problem: optim gave code = %d",
-#                              res$convergence), domain = NA)
-msgid "possible convergence problem: optim gave code = %d"
-msgstr "prawdopodobny problem zbieżności: 'optim' zwrócił kod= %d"
+#. R/ar.R: stop("'order.max' must be < 'n.used'")
+#. R/ar.R: stop("'order.max' must be < 'n.used'")
+#. R/ar.R: stop("'order.max' must be < 'n.used'")
+#. R/ar.R: stop("'order.max' must be < 'n.used'")
+#: R/ar.R:0
+msgid "'order.max' must be < 'n.used'"
+msgstr "argument 'order.max' musi być < argument 'n.used'"
 
-# stats/R/arima.R: 274
-# stop("non-stationary AR part from CSS")
-msgid "non-stationary AR part from CSS"
-msgstr "niestacjonarna część autoregresji z warunkowej sumy kwadratów"
+#. R/ar.R: stop("'order.max' must be >= 0")
+#. R/ar.R: stop("'order.max' must be >= 0")
+#: R/ar.R:0
+msgid "'order.max' must be >= 0"
+msgstr "'order.max' musi być >= 0"
 
-# stats/R/arima.R: 277
-# stop("non-stationary seasonal AR part from CSS")
-msgid "non-stationary seasonal AR part from CSS"
-msgstr "niestacjonarna sezonowa część autoregresji z warunkowej sumy kwadratów"
+#. R/ar.R: stop("'order.max' must be >= 1")
+#. R/ar.R: stop("'order.max' must be >= 1")
+#. R/ar.R: stop("'order.max' must be >= 1")
+#: R/ar.R:0
+msgid "'order.max' must be >= 1"
+msgstr "'order.max' musi być >= 1"
 
-# stats/R/arma0.R: 280
-# stop("'xreg' and 'newxreg' have different numbers of columns")
-# stats/R/arima.R: 411
-# stop("'xreg' and 'newxreg' have different numbers of columns")
-msgid "'xreg' and 'newxreg' have different numbers of columns"
-msgstr "'xreg' oraz 'newxreg' mają różne liczby kolumn"
+#. R/binom.test.R: stop("'p' must be a single number between 0 and 1")
+#: R/binom.test.R:0
+msgid "'p' must be a single number between 0 and 1"
+msgstr "argument 'p' musi być pojedynczą liczbą pomiędzy 0 a 1"
 
-# stats/R/arma0.R: 300
-# warning("MA part of model is not invertible")
-# stats/R/arima.R: 431
-# warning("MA part of model is not invertible")
-msgid "MA part of model is not invertible"
-msgstr "część średniej kroczącej modelu nie jest odwracalna"
+#. R/spectrum.R: stop("'p' must be between 0 and 0.5")
+#: R/spectrum.R:0
+msgid "'p' must be between 0 and 0.5"
+msgstr "argument 'p' musi być pomiędzy 0 a 0.5"
 
-# stats/R/arma0.R: 305
-# warning("seasonal MA part of model is not invertible")
-# stats/R/arima.R: 436
-# warning("seasonal MA part of model is not invertible")
-msgid "seasonal MA part of model is not invertible"
-msgstr "sezonowa część średniej kroczącej modelu nie jest odwracalna"
+#. R/prop.test.R: stop("'p' must have the same length as 'x' and 'n'")
+#: R/prop.test.R:0
+msgid "'p' must have the same length as 'x' and 'n'"
+msgstr "argumenty 'p' musi mieć tę samą długość co 'x' oraz 'n'"
 
-# stats/R/arima.R: 455
-# warning(gettextf("NAs in '%s'", "phi"), domain=NA)
-# stats/R/arima.R: 456
-# warning(gettextf("NAs in '%s'", "theta"), domain=NA)
-msgid "NAs in '%s'"
-msgstr "wartości NA w '%s'"
+#. R/nls-profile.R: stop("'params' has wrong length")
+#: R/nls-profile.R:0
+msgid "'params' has wrong length"
+msgstr "argument 'params' ma niepoprawną długość"
 
-# stats/R/arima.R: 484
-# stop("invalid 'SSinit'")
-msgid "invalid 'SSinit'"
-msgstr "niepoprawna wartość 'SSinit'"
+#. R/stepfun.R: stop("'plot.stepfun' called with wrong type of argument 'x'")
+#: R/stepfun.R:0
+msgid "'plot.stepfun' called with wrong type of argument 'x'"
+msgstr "'plot.stepfun' wywołana z błędnym typem argumentu 'x'"
 
-# stats/R/arma0.R: 49
-# warning("converting non-invertible initial MA values")
-msgid "converting non-invertible initial MA values"
-msgstr "konwertowanie nieodwracalnych wartości początkowych kroczącej średniej"
+#. R/ppr.R: stop("'ppr' applies only to numerical variables")
+#: R/ppr.R:0
+msgid "'ppr' applies only to numerical variables"
+msgstr "'ppr' stosuje się jedynie do zmiennych liczbowych"
 
-# stats/R/arma0.R: 118
-# warning("some ARMA parameters were fixed: setting transform.pars = FALSE")
-msgid "some ARMA parameters were fixed: setting transform.pars = FALSE"
+#. R/princomp.R: stop("'princomp' can only be used with more units than variables")
+#: R/princomp.R:0
+msgid "'princomp' can only be used with more units than variables"
 msgstr ""
-"niektóre parametry modelu kroczącej średniej autoregresji zostały ustalone: "
-"ustawianie 'transform.pars = FALSE'"
+"'princomp' może zostać użyte jedynie, gdy jednostek jest więcej niż zmiennych"
 
-# stats/R/arma0.R: 126
-# stop("'xreg' is collinear")
-msgid "'xreg' is collinear"
-msgstr "argument 'xreg' jest współliniowy"
+#. R/nlm.R: stop("'print.level' must be in {0,1,2}")
+#: R/nlm.R:0
+msgid "'print.level' must be in {0,1,2}"
+msgstr "argument 'print.level' musi być liczbą w przedziale [0, 1, 2]"
 
-# stats/R/arma0.R: 133
-# warning("NAs present: setting 'delta' to -1")
-msgid "NAs present: setting 'delta' to -1"
-msgstr "wartości NA są obecne: ustawianie 'delta' na wartość -1"
+#. R/distn.R: stop("'prob' and 'mu' both specified")
+#. R/distn.R: stop("'prob' and 'mu' both specified")
+#. R/distn.R: stop("'prob' and 'mu' both specified")
+#. R/distn.R: stop("'prob' and 'mu' both specified")
+#: R/distn.R:0
+msgid "'prob' and 'mu' both specified"
+msgstr "określono jednocześnie argumenty 'prob' oraz 'mu'"
 
-# stats/R/arma0.R: 164
-# warning("transformed ARMA parameters were fixed")
-msgid "transformed ARMA parameters were fixed"
+#. R/quantile.R: stop("'probs' outside [0,1]")
+#: R/quantile.R:0
+msgid "'probs' outside [0,1]"
+msgstr "argument 'probs' jest poza przedziałem [0,1]"
+
+#. R/proj.R: stop("'proj' is not implemented for multiple responses")
+#. R/proj.R: stop("'proj' is not implemented for multiple responses")
+#: R/proj.R:0
+msgid "'proj' is not implemented for multiple responses"
 msgstr ""
-"przetransformowane parametry kroczącej średniej autoregresji zostały ustalone"
+"funkcja 'proj()' nie jest zaimplementowana dla wielokrotnych zmiennych "
+"zależnych"
 
-# stats/R/bandwidths.R: 25
-# stop("need at least 2 data points")
-# stats/R/bandwidths.R: 34
-# stop("need at least 2 data points")
-# stats/R/bandwidths.R: 43
-# stop("need at least 2 data points")
-# stats/R/bandwidths.R: 95
-# stop("need at least 2 data points")
-# stats/R/bandwidths.R: 115
-# stop("need at least 2 data points")
-msgid "need at least 2 data points"
-msgstr "potrzeba przynajmniej 2 punktów"
+#. R/kernel.R: stop("'r' is less than 0")
+#: R/kernel.R:0
+msgid "'r' is less than 0"
+msgstr "wartość argumentu 'r' jest mniejsza niż 0"
 
-# stats/R/loess.R: 102
-# stop("invalid 'x'")
-# stats/R/bandwidths.R: 46
-# stop("invalid 'x'")
-# stats/R/bandwidths.R: 98
-# stop("invalid 'x'")
-# stats/R/bandwidths.R: 118
-# stop("invalid 'x'")
-msgid "invalid 'x'"
-msgstr "niepoprawna wartość 'x'"
+#. R/kernel.R: stop("'r' is less than 1")
+#: R/kernel.R:0
+msgid "'r' is less than 1"
+msgstr "wartość argumentu 'r' jest mniejsza niż 1"
 
-# stats/R/bandwidths.R: 48
-# stop("invalid 'nb'")
-# stats/R/bandwidths.R: 100
-# stop("invalid 'nb'")
-# stats/R/bandwidths.R: 120
-# stop("invalid 'nb'")
-msgid "invalid 'nb'"
-msgstr "niepoprawna wartość 'nb'"
+#. R/poisson.test.R: stop("'r' must be a single positive number")
+#: R/poisson.test.R:0
+msgid "'r' must be a single positive number"
+msgstr "argument 'r' musi być pojedynczą dodatnią liczbą"
 
-# stats/R/bandwidths.R: 79
-# stop("no solution in the specified range of bandwidths")
-msgid "no solution in the specified range of bandwidths"
-msgstr "brak rozwiązania we wskazanym zakresie pasma"
+#. R/var.test.R: stop("'ratio' must be a single positive number")
+#: R/var.test.R:0
+msgid "'ratio' must be a single positive number"
+msgstr "argument 'ratio' musi być pojedynczą dodatnią liczbą"
 
-# stats/R/bandwidths.R: 82
-# message(gettextf("increasing bw.SJ() search interval (%d) to [%.4g,%.4g]",
-#                                  itry, lower, upper), domain = NA)
-msgid "increasing bw.SJ() search interval (%d) to [%.4g,%.4g]"
-msgstr "zwiększanie przeszukiwanego przedziału 'bw.SJ()' (%d) do [%.4g,%.4g]"
+#. R/relevel.R: stop("'ref' must be an existing level")
+#: R/relevel.R:0
+msgid "'ref' must be an existing level"
+msgstr "'ref' musi być istniejącym poziomem"
 
-# stats/R/bandwidths.R: 108
-# warning("minimum occurred at one end of the range")
-# stats/R/bandwidths.R: 128
-# warning("minimum occurred at one end of the range")
-msgid "minimum occurred at one end of the range"
-msgstr "odnotowano wartość minimalną na jednym z końców zakresu"
+#. R/relevel.R: stop("'ref' must be of length one")
+#: R/relevel.R:0
+msgid "'ref' must be of length one"
+msgstr "argument 'ref' musi być długości 1"
 
-# stats/R/fligner.test.R: 28
-# stop("'x' must be a list with at least 2 elements")
-# stats/R/bartlett.test.R: 27
-# stop("'x' must be a list with at least 2 elements")
-# stats/R/kruskal.test.R: 26
-# stop("'x' must be a list with at least 2 elements")
-msgid "'x' must be a list with at least 2 elements"
-msgstr "'x' musi być listą z co najmniej 2 elementami"
-
-# stats/R/fligner.test.R: 40
-# stop("'x' and 'g' must have the same length")
-# stats/R/bartlett.test.R: 37
-# stop("'x' and 'g' must have the same length")
-# stats/R/kruskal.test.R: 38
-# stop("'x' and 'g' must have the same length")
-msgid "'x' and 'g' must have the same length"
-msgstr "argumenty 'x' oraz 'g' muszą mieć tę samą długość"
-
-# stats/R/fligner.test.R: 51
-# stop("all observations are in the same group")
-# stats/R/bartlett.test.R: 45
-# stop("all observations are in the same group")
-# stats/R/kruskal.test.R: 49
-# stop("all observations are in the same group")
-msgid "all observations are in the same group"
-msgstr "wszystkie obserwacje są w tej samej grupie"
+#. R/relevel.R: stop("'relevel' only for factors")
+#. R/relevel.R: stop("'relevel' only for factors")
+#: R/relevel.R:0
+msgid "'relevel' only for factors"
+msgstr "'relevel' tylko dla czynników"
 
-# stats/R/bartlett.test.R: 55
-# stop("there must be at least 2 observations in each group")
-msgid "there must be at least 2 observations in each group"
-msgstr "potrzeba co najmniej 2 obserwacji w każdej grupie"
+#. R/dendrogram.R: stop("'reorder.dendrogram' requires a dendrogram")
+#: R/dendrogram.R:0
+msgid "'reorder.dendrogram' requires a dendrogram"
+msgstr "'reorder.dendrogram' wymaga drzewa celu"
 
-# stats/R/fligner.test.R: 90
-# stop("'formula' should be of the form response ~ group")
-# stats/R/bartlett.test.R: 88
-# stop("'formula' should be of the form response ~ group")
-# stats/R/kruskal.test.R: 85
-# stop("'formula' should be of the form response ~ group")
-msgid "'formula' should be of the form response ~ group"
-msgstr "argument 'formula' powinien mieć formę 'zmienna zależna ~ grupa'"
+#. R/ftable.R: stop("'row.var.names' missing")
+#: R/ftable.R:0
+msgid "'row.var.names' missing"
+msgstr "brakuje 'row.var.names'"
 
-# stats/R/binom.test.R: 27
-# stop("'x' must be nonnegative and integer")
-msgid "'x' must be nonnegative and integer"
-msgstr "argument 'x' musi być nieujemną liczbą całkowitą"
+#. R/acf.R: stop("'sampleT' and 'nser' must be integer")
+#: R/acf.R:0
+msgid "'sampleT' and 'nser' must be integer"
+msgstr "argumenty 'sampleT' oraz 'nser' muszą być liczbami całkowitymi"
 
-# stats/R/binom.test.R: 39
-# stop("'n' must be a positive integer >= 'x'")
-msgid "'n' must be a positive integer >= 'x'"
-msgstr "argument 'n' musi być dodatnią liczbą całkowitą >= argumentu 'x'"
+#. R/biplot.R: warning("'scale' is outside [0, 1]")
+#. R/biplot.R: warning("'scale' is outside [0, 1]")
+#: R/biplot.R:0
+msgid "'scale' is outside [0, 1]"
+msgstr "argument 'scale' jest poza przedziałem [0,1]"
 
-# stats/R/binom.test.R: 44
-# stop("incorrect length of 'x'")
-msgid "incorrect length of 'x'"
-msgstr "niepoprawna długość argumentu 'x'"
+#. R/contr.poly.R: stop("'scores' argument is of the wrong length")
+#: R/contr.poly.R:0
+msgid "'scores' argument is of the wrong length"
+msgstr "argument 'scores' ma niepoprawną długość"
 
-# stats/R/binom.test.R: 47
-# stop ("'p' must be a single number between 0 and 1")
-msgid "'p' must be a single number between 0 and 1"
-msgstr "argument 'p' musi być pojedynczą liczbą pomiędzy 0 a 1"
+#. R/contr.poly.R: stop("'scores' must all be different numbers")
+#: R/contr.poly.R:0
+msgid "'scores' must all be different numbers"
+msgstr "wszystkie wartości 'scores' muszą być różnymi liczbami"
 
-# stats/R/biplot.R: 84
-# stop("length of choices must be 2")
-# stats/R/biplot.R: 101
-# stop("length of choices must be 2")
-msgid "length of choices must be 2"
-msgstr "długość 'choices' musi wynosić 2"
+#. R/ar.R: warning("'se.fit' not yet implemented for multivariate models")
+#: R/ar.R:0
+msgid "'se.fit' not yet implemented for multivariate models"
+msgstr ""
+"funkcja 'se.fit()' nie jest jeszcze zaimplementowana dla wielowymiarowych "
+"modeli"
 
-# stats/R/biplot.R: 86
-# stop(gettextf("object '%s' has no scores", deparse(substitute(x))),
-#              domain = NA)
-# stats/R/biplot.R: 103
-# stop(gettextf("object '%s' has no scores", deparse(substitute(x))),
-#              domain = NA)
-msgid "object '%s' has no scores"
-msgstr "obiekt '%s' nie ma punktów"
+#. R/arima.R: stop("'seasonal$order' must be a non-negative numeric vector of length 3")
+#. R/arma0.R: stop("'seasonal$order' must be a non-negative numeric vector of length 3")
+#: R/arima.R:0 R/arma0.R:0
+msgid "'seasonal$order' must be a non-negative numeric vector of length 3"
+msgstr "'seasonal$order' musi być nieujemnym wektorem liczbowym o długości 3"
 
-# stats/R/biplot.R: 91
-# warning("'scale' is outside [0, 1]")
-# stats/R/biplot.R: 110
-# warning("'scale' is outside [0, 1]")
-msgid "'scale' is outside [0, 1]"
-msgstr "argument 'scale' jest poza przedziałem [0,1]"
+#. R/arima.R: stop("'seasonal' must be a list with component 'order'")
+#. R/arima.R: stop("'seasonal' must be a list with component 'order'")
+#. R/arma0.R: stop("'seasonal' must be a list with component 'order'")
+#. R/arma0.R: stop("'seasonal' must be a list with component 'order'")
+#: R/arima.R:0 R/arma0.R:0
+msgid "'seasonal' must be a list with component 'order'"
+msgstr "'seasonal' musi być listą z komponentem 'order'"
 
-# stats/R/biplot.R: 106
-# stop("biplots are not defined for complex PCA")
-msgid "biplots are not defined for complex PCA"
-msgstr ""
-"wykresy dwuwymiarowego modelu dyspersji dla grup nie są zdefiniowane dla "
-"analizy zespolonych głównych komponentów"
+#. R/reshape.R: stop("'sep' must be a character string")
+#: R/reshape.R:0
+msgid "'sep' must be a character string"
+msgstr "'sep' musi być łańcuchem tekstowym"
 
-# stats/R/cancor.R: 25
-# stop("unequal number of rows in 'cancor'")
-msgid "unequal number of rows in 'cancor'"
-msgstr "nierówna liczba wierszy w 'cancor()'"
+#. R/power.R: stop("'sig.level' must be numeric in [0, 1]")
+#. R/power.R: stop("'sig.level' must be numeric in [0, 1]")
+#. R/power.anova.test.R: stop("'sig.level' must be numeric in [0, 1]")
+#: R/power.R:0 R/power.anova.test.R:0
+msgid "'sig.level' must be numeric in [0, 1]"
+msgstr "argument 'sig.level' musi być liczbą w przedziale [0, 1]"
 
-# stats/R/cancor.R: 28
-# stop("dimension 0 in 'x' or 'y'")
-msgid "dimension 0 in 'x' or 'y'"
-msgstr "zerowy wymiar w argumencie 'x' lub 'y'"
+#. R/smspline.R: stop("'span' must be between 0 and 1.")
+#: R/smspline.R:0
+msgid "'span' must be between 0 and 1."
+msgstr "argument 'span' musi być pomiędzy 0 a 1"
 
-# stats/R/cancor.R: 53
-# stop("'x' has rank 0")
-msgid "'x' has rank 0"
-msgstr "argument 'x' ma rangę 0"
+#. R/smspline.R: stop("'spar' must be of length 1")
+#: R/smspline.R:0
+msgid "'spar' must be of length 1"
+msgstr "argument 'spar' musi mieć długość 1"
 
-# stats/R/cancor.R: 54
-# stop("'y' has rank 0")
-msgid "'y' has rank 0"
-msgstr "argument 'y' ma rangę 0"
+#. R/spline.R: stop("'spline' requires n >= 1")
+#: R/spline.R:0
+msgid "'spline' requires n >= 1"
+msgstr "'spline' wymaga n >= 1"
 
-# stats/R/wilcox.test.R: 44
-# stop("'x' and 'y' must have the same length")
-# stats/R/chisq.test.R: 32
-# stop("'x' and 'y' must have the same length")
-# stats/R/mcnemar.test.R: 33
-# stop("'x' and 'y' must have the same length")
-# stats/R/fisher.test.R: 49
-# stop("'x' and 'y' must have the same length")
-# stats/R/cor.test.R: 31
-# stop("'x' and 'y' must have the same length")
-msgid "'x' and 'y' must have the same length"
-msgstr "argumenty 'x' oraz 'y' muszą mieć tę samą długość"
+#. R/ts.R: stop("'start' > 'end'")
+#: R/ts.R:0
+msgid "'start' > 'end'"
+msgstr "'start' > 'end'"
 
-# stats/R/mantelhaen.test.R: 44
-# stop("'x' and 'y' must have at least 2 levels")
-# stats/R/chisq.test.R: 41
-# stop("'x' and 'y' must have at least 2 levels")
-# stats/R/fisher.test.R: 57
-# stop("'x' and 'y' must have at least 2 levels")
-msgid "'x' and 'y' must have at least 2 levels"
-msgstr "argumenty 'x' oraz 'y' muszą mieć co najmniej 2 poziomy"
+#. R/loglin.R: stop("'start' and 'table' must be same length")
+#: R/loglin.R:0
+msgid "'start' and 'table' must be same length"
+msgstr "argumenty 'start' oraz 'table' muszą mieć tę samą długość"
 
-# stats/R/chisq.test.R: 53
-# stop("all entries of 'x' must be nonnegative and finite")
-# stats/R/mcnemar.test.R: 26
-# stop("all entries of 'x' must be nonnegative and finite")
-# stats/R/fisher.test.R: 33
-# stop("all entries of 'x' must be nonnegative and finite")
-msgid "all entries of 'x' must be nonnegative and finite"
-msgstr "wszystkie wpisy 'x' muszą być nieujemne oraz skończone"
+#. R/ts.R: stop("'start' cannot be after 'end'")
+#. R/ts.R: stop("'start' cannot be after 'end'")
+#: R/ts.R:0
+msgid "'start' cannot be after 'end'"
+msgstr "'start' nie może być po 'end'"
 
-# stats/R/chisq.test.R: 55
-# stop("at least one entry of 'x' must be positive")
-msgid "at least one entry of 'x' must be positive"
-msgstr "przynajmniej jeden wpis w 'x' musi być dodatni"
+#. R/ts.R: warning("'start' value not changed")
+#: R/ts.R:0
+msgid "'start' value not changed"
+msgstr "argument 'start' nie został zmieniony"
 
-# stats/R/chisq.test.R: 92
-# warning("cannot compute simulated p-value with zero marginals")
-msgid "cannot compute simulated p-value with zero marginals"
+#. R/models.R: stop("'termlabels' must be a character vector of length at least one")
+#: R/models.R:0
+msgid "'termlabels' must be a character vector of length at least one"
 msgstr ""
-"nie można obliczyć symulowanej wartości prawdopodobieństwa z zerowymi "
-"granicami"
-
-# stats/R/chisq.test.R: 107
-# stop("'x' must at least have 2 elements")
-msgid "'x' must at least have 2 elements"
-msgstr "'x' musi mieć przynajmniej 2 elementy"
-
-# stats/R/chisq.test.R: 109
-# stop("'x' and 'p' must have the same number of elements")
-msgid "'x' and 'p' must have the same number of elements"
-msgstr "argumenty 'x' oraz 'p' muszą mieć tę samą liczbę elementów"
+"argument 'termlabels' musi być wektorem tekstowym o długości co najmniej 1"
 
-# stats/R/chisq.test.R: 110
-# stop("probabilities must be non-negative.")
-msgid "probabilities must be non-negative."
-msgstr "prawdopodobieństwa muszą być nieujemne."
+#. R/models.R: gettextf("'termobj' must be a object of class %s", dQuote("terms"))
+#: R/models.R:0
+msgid "'termobj' must be a object of class %s"
+msgstr "argument 'termobj' musi być obiektem klasy %s"
 
-# stats/R/chisq.test.R: 113
-# stop("probabilities must sum to 1.")
-msgid "probabilities must sum to 1."
-msgstr "prawdopodobieństwa muszą sumować się do 1."
+#. R/reshape.R: stop("'times' is wrong length")
+#: R/reshape.R:0
+msgid "'times' is wrong length"
+msgstr "argument 'times' ma niepoprawną długość"
 
-# stats/R/chisq.test.R: 138
-# warning("Chi-squared approximation may be incorrect")
-# stats/R/prop.test.R: 139
-# warning("Chi-squared approximation may be incorrect")
-msgid "Chi-squared approximation may be incorrect"
-msgstr "Aproksymacja chi-kwadrat może być niepoprawna"
+#. R/smspline.R: stop("'tol' must be strictly positive and finite")
+#: R/smspline.R:0
+msgid "'tol' must be strictly positive and finite"
+msgstr "argument 'tol' musi być ściśle dodatni i skończony"
 
-# stats/R/cmdscale.R: 22
-# stop("NA values not allowed in 'd'")
-msgid "NA values not allowed in 'd'"
-msgstr "wartości NA w argumencie 'd' nie są dozwolone"
+#. R/optim.R: stop("'trace != 0' needs 'REPORT >= 1'")
+#: R/optim.R:0
+msgid "'trace != 0' needs 'REPORT >= 1'"
+msgstr "'trace != 0' potrzebuje 'REPORT >= 1'"
 
-# stats/R/cmdscale.R: 28
-# stop("distances must be result of 'dist' or a square matrix")
-msgid "distances must be result of 'dist' or a square matrix"
-msgstr "odległości muszą być wynikiem 'dist' lub być kwadratową macierzą"
+#. R/ts.R: stop("'ts' object must have one or more observations")
+#: R/ts.R:0
+msgid "'ts' object must have one or more observations"
+msgstr "obiekt 'ts' musi mieć jedną lub więcej obserwacji"
 
-# stats/R/cmdscale.R: 43
-# stop("invalid value of 'n'")
-msgid "invalid value of 'n'"
-msgstr "niepoprawna wartość 'n'"
+#. R/family.R: gettextf("'variance' \"%s\" is invalid: possible values are \"mu(1-mu)\", \"mu\", \"mu^2\", \"mu^3\" and \"constant\"",     variance_nm)
+#: R/family.R:0
+msgid ""
+"'variance' \"%s\" is invalid: possible values are \"mu(1-mu)\", \"mu\", "
+"\"mu^2\", \"mu^3\" and \"constant\""
+msgstr ""
+"'variance' '%s' jest niepoprawna: możliwe wartości to: 'mu(1-mu)', 'mu', "
+"'mu^2', 'mu^3' oraz 'constant'"
 
-# stats/R/cmdscale.R: 45
-# stop("'k' must be in {1, 2, ..  n - 1}")
-msgid "'k' must be in {1, 2, ..  n - 1}"
-msgstr "'k' musi być w zakresie {1, 2, ..  n - 1}"
+#. R/reshape.R: stop("'varying' arguments must be the same length")
+#: R/reshape.R:0
+msgid "'varying' arguments must be the same length"
+msgstr "argumenty 'varying' muszą być tej samej długości"
 
-# stats/R/cmdscale.R: 69
-# warning(gettextf("only %d of the first %d eigenvalues are > 0", k1, k),
-#                 domain = NA)
-msgid "only %d of the first %d eigenvalues are > 0"
-msgstr "tylko %d pierwszych %d wartości własnych jest > 0"
+#. R/nls-profile.R: stop("'varying' has wrong length")
+#: R/nls-profile.R:0
+msgid "'varying' has wrong length"
+msgstr "argument 'varying' ma niepoprawną długość"
 
-# stats/R/constrOptim.R: 48
-# stop("initial value is not in the interior of the feasible region")
-msgid "initial value is not in the interior of the feasible region"
-msgstr "wartość początkowa nie jest wewnątrz możliwego regionu"
+#. R/nls-profile.R: stop("'varying' must be in seq_along(pars)")
+#. R/nls-profile.R: stop("'varying' must be in seq_along(pars)")
+#: R/nls-profile.R:0
+msgid "'varying' must be in seq_along(pars)"
+msgstr "'varying' musi być w przedziale 'seq_along(pars)'"
 
-# stats/R/constrOptim.R: 75
-# gettext("Barrier algorithm ran out of iterations and did not converge")
-msgid "Barrier algorithm ran out of iterations and did not converge"
-msgstr "Algorytmowi bariery zabrakło iteracji przez co nie zbiegł się"
+#. R/nls-profile.R: stop("'varying' must be logical, integer or character")
+#: R/nls-profile.R:0
+msgid "'varying' must be logical, integer or character"
+msgstr "'varying' musi być wartością tekstową, logiczną lub liczbą całkowitą"
 
-# stats/R/constrOptim.R: 79
-# gettextf("Objective function increased at outer iteration %d", i)
-msgid "Objective function increased at outer iteration %d"
-msgstr "Funkcja celu zwiększyła się w zewnętrznej iteracji %d"
+#. R/reshape.R: stop("'varying' must be nonempty list or vector")
+#: R/reshape.R:0
+msgid "'varying' must be nonempty list or vector"
+msgstr "'varying' musi być niepustą listą lub wektorem"
 
-# stats/R/constrOptim.R: 83
-# gettextf("Objective function decreased at outer iteration %d", i)
-msgid "Objective function decreased at outer iteration %d"
-msgstr "Funkcja celu zmalała w zewnętrznej iteracji %d"
+#. R/lm.R: stop("'weights' as formula should be one-sided")
+#: R/lm.R:0
+msgid "'weights' as formula should be one-sided"
+msgstr "'weights' jako formuła powinna być jednostronna"
 
-# stats/R/contrast.R: 145
-# stop(gettextf("contrasts not defined for %d degrees of freedom",
-#                           n - 1L), domain = NA)
-# stats/R/contr.poly.R: 44
-# stop(gettextf("contrasts not defined for %d degrees of freedom",
-#                       n - 1), domain = NA)
-msgid "contrasts not defined for %d degrees of freedom"
-msgstr "kontrasty nie są zdefiniowane dla %d stopni swobody"
+#. R/density.R: stop("'weights' must all be finite")
+#: R/density.R:0
+msgid "'weights' must all be finite"
+msgstr "argument 'weights' musi w całości być skończony"
 
-# stats/R/contr.poly.R: 47
-# stop(gettextf("orthogonal polynomials cannot be represented accurately enough for %d degrees of freedom", n-1), domain = NA)
-msgid ""
-"orthogonal polynomials cannot be represented accurately enough for %d "
-"degrees of freedom"
-msgstr ""
-"ortogonalne wielomiany nie mogą być reprezentowane wystarczająco dokładnie "
-"dla %d stopni swobody"
+#. R/glm.R: stop("'weights' must be a numeric vector")
+#. R/lm.R: stop("'weights' must be a numeric vector")
+#: R/glm.R:0 R/lm.R:0
+msgid "'weights' must be a numeric vector"
+msgstr "argument 'weight' musi być wektorem liczbowym"
 
-# stats/R/contr.poly.R: 49
-# stop("'scores' argument is of the wrong length")
-msgid "'scores' argument is of the wrong length"
-msgstr "argument 'scores' ma niepoprawną długość"
+#. R/density.R: stop("'weights' must not be negative")
+#: R/density.R:0
+msgid "'weights' must not be negative"
+msgstr "argument 'weights' nie może być ujemny"
 
-# stats/R/contr.poly.R: 51
-# stop("'scores' must all be different numbers")
-msgid "'scores' must all be different numbers"
-msgstr "wszystkie wartości 'scores' muszą być różnymi liczbami"
+#. R/plot.lm.R: stop("'which' must be in 1:6")
+#: R/plot.lm.R:0
+msgid "'which' must be in 1:6"
+msgstr "'which' musi być w przedziale 1:6"
 
-# stats/R/contr.poly.R: 79
-# stop("'degree' must be at least 1")
-msgid "'degree' must be at least 1"
-msgstr "argument 'degree' musi wynosić co najmniej 1"
+#. R/TukeyHSD.R: stop("'which' specified no factors")
+#: R/TukeyHSD.R:0
+msgid "'which' specified no factors"
+msgstr "'which' nie określa czynników"
 
-# stats/R/contr.poly.R: 80
-# stop("missing values are not allowed in 'poly'")
-msgid "missing values are not allowed in 'poly'"
-msgstr "brakujące wartości w 'poly()' nie są dozwolone"
+#. R/TukeyHSD.R: warning("'which' specified some non-factors which will be dropped")
+#: R/TukeyHSD.R:0
+msgid "'which' specified some non-factors which will be dropped"
+msgstr "'which' określił kilka nie-czynników które zostaną usunięte"
 
-# stats/R/contr.poly.R: 91
-# stop("'degree' must be less than number of unique points")
-# stats/R/contr.poly.R: 97
-# stop("'degree' must be less than number of unique points")
-msgid "'degree' must be less than number of unique points"
-msgstr "'degree' musi być mniejsze niż liczba unikalnych punktów"
+#. R/poisson.test.R: stop("'x' and 'T' have incompatible length")
+#: R/poisson.test.R:0
+msgid "'x' and 'T' have incompatible length"
+msgstr "argumenty 'x' oraz 'T' mają niezgodne długości"
 
-# stats/R/contr.poly.R: 150
-# stop("must supply one or more vectors")
-msgid "must supply one or more vectors"
-msgstr "potrzeba dostarczyć jeden lub więecj wektorów"
+#. R/bartlett.test.R: stop("'x' and 'g' must have the same length")
+#. R/fligner.test.R: stop("'x' and 'g' must have the same length")
+#. R/kruskal.test.R: stop("'x' and 'g' must have the same length")
+#: R/bartlett.test.R:0 R/fligner.test.R:0 R/kruskal.test.R:0
+msgid "'x' and 'g' must have the same length"
+msgstr "argumenty 'x' oraz 'g' muszą mieć tę samą długość"
 
-# stats/R/contr.poly.R: 154
-# stop("arguments must have the same length")
-msgid "arguments must have the same length"
-msgstr "argumenty muszą mieć tę samą długość"
+#. R/pairwise.R: stop("'x' and 'n' must have the same length")
+#. R/prop.test.R: stop("'x' and 'n' must have the same length")
+#: R/pairwise.R:0 R/prop.test.R:0
+msgid "'x' and 'n' must have the same length"
+msgstr "argumenty 'x' oraz 'n' muszą mieć tę samą długość"
 
-# stats/R/contrast.R: 25
-# stop("contrasts apply only to factors")
-# stats/R/contrast.R: 50
-# stop("contrasts apply only to factors")
-msgid "contrasts apply only to factors"
-msgstr "kontrasty mają zastosowanie jedynie do czynników"
+#. R/chisq.test.R: stop("'x' and 'p' must have the same number of elements")
+#: R/chisq.test.R:0
+msgid "'x' and 'p' must have the same number of elements"
+msgstr "argumenty 'x' oraz 'p' muszą mieć tę samą liczbę elementów"
 
-# stats/R/contrast.R: 52
-# stop("contrasts can be applied only to factors with 2 or more levels")
-msgid "contrasts can be applied only to factors with 2 or more levels"
-msgstr ""
-"kontrasty można zastosować jedynie do czynników z dwoma lub więcej poziomami"
+#. R/weighted.mean.R: stop("'x' and 'w' must have the same length")
+#: R/weighted.mean.R:0
+msgid "'x' and 'w' must have the same length"
+msgstr "argumenty 'x' oraz 'w' muszą mieć tę samą długość"
 
-# stats/R/contrast.R: 60
-# stop("wrong number of contrast matrix rows")
-msgid "wrong number of contrast matrix rows"
-msgstr "niepoprawna liczba wierszy macierzy kontrastu"
+#. R/density.R: stop("'x' and 'weights' have unequal length")
+#: R/density.R:0
+msgid "'x' and 'weights' have unequal length"
+msgstr "argumenty 'x' oraz 'weights' mają niezgodne długości"
 
-# stats/R/contrast.R: 67
-# stop("singular contrast matrix")
-msgid "singular contrast matrix"
-msgstr "osobliwa macierz kontrastów"
+#. R/chisq.test.R: stop("'x' and 'y' must have at least 2 levels")
+#. R/fisher.test.R: stop("'x' and 'y' must have at least 2 levels")
+#. R/mantelhaen.test.R: stop("'x' and 'y' must have at least 2 levels")
+#: R/chisq.test.R:0 R/fisher.test.R:0 R/mantelhaen.test.R:0
+msgid "'x' and 'y' must have at least 2 levels"
+msgstr "argumenty 'x' oraz 'y' muszą mieć co najmniej 2 poziomy"
 
-# stats/R/contrast.R: 77
-# stop("numeric contrasts or contrast name expected")
-msgid "numeric contrasts or contrast name expected"
-msgstr "oczekiwano kontrastów liczbowych lub nazwy kontrastu"
+#. R/chisq.test.R: stop("'x' and 'y' must have the same length")
+#. R/cor.test.R: stop("'x' and 'y' must have the same length")
+#. R/fisher.test.R: stop("'x' and 'y' must have the same length")
+#. R/mcnemar.test.R: stop("'x' and 'y' must have the same length")
+#. R/wilcox.test.R: stop("'x' and 'y' must have the same length")
+#: R/chisq.test.R:0 R/cor.test.R:0 R/fisher.test.R:0 R/mcnemar.test.R:0
+#: R/wilcox.test.R:0
+msgid "'x' and 'y' must have the same length"
+msgstr "argumenty 'x' oraz 'y' muszą mieć tę samą długość"
 
-# stats/R/contrast.R: 91
-# stop(gettextf("%s needs package 'Matrix' correctly installed",
-#                           "contr*(.., sparse=TRUE)"),
-#                  domain = NA)
-# stats/R/contrast.R: 102
-# stop(gettextf("%s needs package 'Matrix' correctly installed",
-#                       "contr*(.., sparse=TRUE)"),
-#              domain = NA)
-# stats/R/xtabs.R: 81
-# stop(gettextf("%s needs package 'Matrix' correctly installed",
-#                           "xtabs(*, sparse=TRUE)"),
-#                  domain = NA)
-msgid "%s needs package 'Matrix' correctly installed"
-msgstr "'%s' potrzebuje poprawnie zainstalowanego pakietu 'Matrix'"
+#. R/mcnemar.test.R: stop("'x' and 'y' must have the same number of levels (minimum 2)")
+#: R/mcnemar.test.R:0
+msgid "'x' and 'y' must have the same number of levels (minimum 2)"
+msgstr "'x' oraz 'y' muszą mieć tę samą liczbę poziomów (minimum 2)"
 
-# stats/R/contrast.R: 115
-# stop("not enough degrees of freedom to define contrasts")
-# stats/R/contrast.R: 136
-# stop("not enough degrees of freedom to define contrasts")
-# stats/R/contrast.R: 159
-# stop("not enough degrees of freedom to define contrasts")
-msgid "not enough degrees of freedom to define contrasts"
-msgstr "niewystarczająca liczba stopni swobody do zdefiniowania kontrastów"
+#. R/density.R: stop("'x' contains missing values")
+#: R/density.R:0
+msgid "'x' contains missing values"
+msgstr "argument 'x' zawiera brakujące wartości"
 
-# stats/R/contrast.R: 148
-# stop("baseline group number out of range")
-msgid "baseline group number out of range"
-msgstr "numer grupy bazowej jest poza zakresem"
+#. R/fisher.test.R: gettextf("'x' has been rounded to integer: %s", ax)
+#: R/fisher.test.R:0
+msgid "'x' has been rounded to integer: %s"
+msgstr "argument 'x' został zaokrąglony do wartości całkowitej: %s"
 
-# stats/R/cor.R: 27
-# stop("invalid 'use' argument")
-# stats/R/cor.R: 130
-# stop("invalid 'use' argument")
-# stats/R/cor.R: 181
-# stop("invalid 'use' argument")
-msgid "invalid 'use' argument"
-msgstr "niepoprawny argument 'use'"
+#. R/fisher.test.R: stop("'x' has entries too large to be integer")
+#: R/fisher.test.R:0
+msgid "'x' has entries too large to be integer"
+msgstr "argument 'x' posiada wpisy zbyt duże aby były liczbami całkowitymi"
 
-# stats/R/cor.R: 32
-# stop("supply both 'x' and 'y' or a matrix-like 'x'")
-# stats/R/cor.R: 135
-# stop("supply both 'x' and 'y' or a matrix-like 'x'")
-msgid "supply both 'x' and 'y' or a matrix-like 'x'"
-msgstr "dostarcz oba 'x' oraz 'y' lub 'x' przypominające macierz"
+#. R/cancor.R: stop("'x' has rank 0")
+#: R/cancor.R:0
+msgid "'x' has rank 0"
+msgstr "argument 'x' ma rangę 0"
 
-# stats/R/wilcox.test.R: 39
-# stop("'y' must be numeric")
-# stats/R/cor.R: 38
-# stop("'y' must be numeric")
-msgid "'y' must be numeric"
-msgstr "argument 'y' musi być liczbą"
+#. R/kruskal.test.R: warning("'x' is a list, so ignoring argument 'g'")
+#: R/kruskal.test.R:0
+msgid "'x' is a list, so ignoring argument 'g'"
+msgstr "argument 'x' jest listą, więc ignorowanie argumentu 'g'"
 
-# stats/src/cov.c: 704
-# error(_("'x' is empty"))
-# stats/R/cor.R: 77
-# stop("'x' is empty")
+#. R/cor.R: stop("'x' is empty")
+#: R/cor.R:0
 msgid "'x' is empty"
 msgstr "argument 'x' jest pusty"
 
-# stats/R/cor.R: 100
-# stop("both 'x' and 'y' must be non-empty")
-msgid "both 'x' and 'y' must be non-empty"
-msgstr "oba 'x' oraz 'y' muszą być niepuste"
+#. R/kernel.R: stop("'x' is not a kernel")
+#: R/kernel.R:0
+msgid "'x' is not a kernel"
+msgstr "argument 'x' nie jest jądrem"
 
-# stats/R/cor.R: 172
-# stop("cannot handle 'pairwise.complete.obs'")
-msgid "cannot handle 'pairwise.complete.obs'"
-msgstr "nie można obsłużyć 'pairwise.complete.obs'"
+#. R/diffinv.R: stop("'x' is not a vector")
+#. R/diffinv.R: stop("'x' is not a vector")
+#. R/kernel.R: stop("'x' is not a vector")
+#: R/diffinv.R:0 R/kernel.R:0
+msgid "'x' is not a vector"
+msgstr "argument 'x' nie jest wektorem"
 
-# stats/R/cor.R: 196
-# stop("'V' is not a square numeric matrix")
-msgid "'V' is not a square numeric matrix"
-msgstr "'V' nie jest kwadratową macierzą liczbową"
+#. R/diffinv.R: stop("'x' is not a vector or matrix")
+#. R/embed.R: stop("'x' is not a vector or matrix")
+#: R/diffinv.R:0 R/embed.R:0
+msgid "'x' is not a vector or matrix"
+msgstr "argument 'x' nie jest wektorem ani macierzą"
 
-# stats/R/cor.R: 199
-# warning("diag(.) had 0 or NA entries; non-finite result is doubtful")
-msgid "diag(.) had 0 or NA entries; non-finite result is doubtful"
-msgstr "'diag(.)' miał 0 lub wpisy NA; nieskończony rezultat jest wątpliwy"
+#. R/kernel.R: stop("'x' is shorter than kernel 'k'")
+#: R/kernel.R:0
+msgid "'x' is shorter than kernel 'k'"
+msgstr "'x' jest krótsze niż jądro 'k'"
 
-# stats/R/cor.test.R: 32
-# stop("'x' must be a numeric vector")
-msgid "'x' must be a numeric vector"
-msgstr "argument 'x' musi być wektorem liczbowym"
+#. R/chisq.test.R: stop("'x' must at least have 2 elements")
+#: R/chisq.test.R:0
+msgid "'x' must at least have 2 elements"
+msgstr "'x' musi mieć przynajmniej 2 elementy"
 
-# stats/R/cor.test.R: 33
-# stop("'y' must be a numeric vector")
-msgid "'y' must be a numeric vector"
-msgstr "argument 'y' musi być wektorem liczbowym"
+#. R/splinefun.R: stop("'x' must be *strictly* increasing (non - NA)")
+#: R/splinefun.R:0
+msgid "'x' must be *strictly* increasing (non - NA)"
+msgstr "'x' musi być *ściśle* rosnące (nie - NA)"
 
-# stats/R/cor.test.R: 45
-# stop("not enough finite observations")
-# stats/R/cor.test.R: 74
-# stop("not enough finite observations")
-msgid "not enough finite observations"
-msgstr "niewystarczająca liczba skończonych obserwacji"
-
-# stats/R/cor.test.R: 128
-# warning("Cannot compute exact p-value with ties")
-# stats/R/cor.test.R: 164
-# warning("Cannot compute exact p-value with ties")
-msgid "Cannot compute exact p-value with ties"
-msgstr ""
-"nie można obliczyć dokładnej wartości prawdopodobieństwa z powtórzonymi "
-"wartościami"
+#. R/mantelhaen.test.R: stop("'x' must be a 3-dimensional array")
+#: R/mantelhaen.test.R:0
+msgid "'x' must be a 3-dimensional array"
+msgstr "'x' musi być 3-wymiarową tablicą"
 
-# stats/R/cor.test.R: 207
-# stop("'formula' missing or invalid")
-msgid "'formula' missing or invalid"
-msgstr "brakuje argumentu 'formula' lub jest niepoprawny"
+#. R/bartlett.test.R: stop("'x' must be a list with at least 2 elements")
+#. R/fligner.test.R: stop("'x' must be a list with at least 2 elements")
+#. R/kruskal.test.R: stop("'x' must be a list with at least 2 elements")
+#: R/bartlett.test.R:0 R/fligner.test.R:0 R/kruskal.test.R:0
+msgid "'x' must be a list with at least 2 elements"
+msgstr "'x' musi być listą z co najmniej 2 elementami"
 
-# stats/R/models.R: 33
-# stop("invalid formula")
-# stats/R/cor.test.R: 215
-# stop("invalid formula")
-msgid "invalid formula"
-msgstr "niepoprawna formuła"
+#. R/lm.R: stop("'x' must be a matrix")
+#. R/lm.R: stop("'x' must be a matrix")
+#: R/lm.R:0
+msgid "'x' must be a matrix"
+msgstr "'x' musi być macierzą"
 
-# stats/R/cov.wt.R: 25
-# stop("'x' must be a matrix or a data frame")
+#. R/cov.wt.R: stop("'x' must be a matrix or a data frame")
+#: R/cov.wt.R:0
 msgid "'x' must be a matrix or a data frame"
 msgstr "'x' musi być macierzą lub ramką danych"
 
-# stats/R/cov.wt.R: 27
-# stop("'x' must contain finite values only")
-msgid "'x' must contain finite values only"
-msgstr "'x' musi zawierać tylko skończone wartości"
-
-# stats/R/cov.wt.R: 31
-# stop("length of 'wt' must equal the number of rows in 'x'")
-msgid "length of 'wt' must equal the number of rows in 'x'"
-msgstr "długość 'wt' musi być równa liczbie wierszy w 'x'"
-
-# stats/R/cov.wt.R: 33
-# stop("weights must be non-negative and not all zero")
-msgid "weights must be non-negative and not all zero"
-msgstr "wagi muszą być nieujemne oraz nie wszystkie równe zero"
-
-# stats/R/cov.wt.R: 40
-# stop("length of 'center' must equal the number of columns in 'x'")
-msgid "length of 'center' must equal the number of columns in 'x'"
-msgstr "długość 'center' musi równać się liczbie kolumn w 'x'"
-
-# stats/R/cutree.R: 22
-# stop("invalid 'tree' ('merge' component)")
-msgid "invalid 'tree' ('merge' component)"
-msgstr "niepoprawny argument 'tree' (komponent 'merge')"
+#. R/dendrogram.R: stop("'x' must be a numeric matrix")
+#: R/dendrogram.R:0
+msgid "'x' must be a numeric matrix"
+msgstr "'x' musi być macierzą liczbową"
 
-# stats/R/cutree.R: 25
-# stop("either 'k' or 'h' must be specified")
-msgid "either 'k' or 'h' must be specified"
-msgstr "jedno z 'k' lub 'h' musi zostać określone"
+#. R/cor.test.R: stop("'x' must be a numeric vector")
+#: R/cor.test.R:0
+msgid "'x' must be a numeric vector"
+msgstr "argument 'x' musi być wektorem liczbowym"
 
-# stats/R/cutree.R: 28
-# stop("the 'height' component of 'tree' is not sorted (increasingly)")
-msgid "the 'height' component of 'tree' is not sorted (increasingly)"
-msgstr "komponent 'height' w 'tree' nie jest (rosnąco) posortowany"
+#. R/spectrum.R: stop("'x' must be a time series or an ar() fit")
+#: R/spectrum.R:0
+msgid "'x' must be a time series or an ar() fit"
+msgstr "'x' musi być szeregiem czasowym lub dopasowaniem 'ar()'"
 
-# stats/R/cutree.R: 38
-# stop(gettextf("elements of 'k' must be between 1 and %d", n),
-#                  domain = NA)
-msgid "elements of 'k' must be between 1 and %d"
-msgstr "elementy 'k' muszą być pomiędzy 1 a %d"
+#. R/ftable.R: stop("'x' must be an \"ftable\" object")
+#. R/ftable.R: stop("'x' must be an \"ftable\" object")
+#. R/ftable.R: stop("'x' must be an \"ftable\" object")
+#: R/ftable.R:0
+msgid "'x' must be an \"ftable\" object"
+msgstr "argument 'mu' musi być obiektem klasy \"ftable\""
 
-# stats/R/dendrogram.R: 32
-# stop("'merge' and 'height' do not fit!")
-msgid "'merge' and 'height' do not fit!"
-msgstr "argumenty 'merge' oraz 'height' nie pasują!"
+#. R/symnum.R: gettextf("'x' must be between %s and %s", format(minc), format(maxc))
+#: R/symnum.R:0
+msgid "'x' must be between %s and %s"
+msgstr "argument 'x' musi być pomiędzy %s a %s"
 
-# stats/R/dendrogram.R: 188
-# stop("dendrogram node with non-positive #{branches}")
-msgid "dendrogram node with non-positive #{branches}"
-msgstr "węzeł drzewa celów z wartościami nie-dodatnimi #{gałęziami}"
+#. R/symnum.R: gettext("'x' must be between -1 and 1")
+#: R/symnum.R:0
+msgid "'x' must be between -1 and 1"
+msgstr "wartość 'x' musi być pomiędzy -1 a 1"
 
-# stats/R/dendrogram.R: 196
-# warning("midcache() of non-binary dendrograms only partly implemented")
-msgid "midcache() of non-binary dendrograms only partly implemented"
-msgstr ""
-"'midcache()' dla niebinarnych drzew celu tylko częściowo zaimplementowane"
+#. R/smspline.R: stop("'x' must be between 0 and 1 for periodic smooth")
+#: R/smspline.R:0
+msgid "'x' must be between 0 and 1 for periodic smooth"
+msgstr "'x' musi być pomiedzy 0 a 1 dla periodycznego wygładzania"
 
-# stats/R/dendrogram.R: 527
-# stop("non-leaf subtree of length 0")
-msgid "non-leaf subtree of length 0"
-msgstr "bezlistne poddrzewo o długości 0"
+#. R/anova.R: stop("'x' must be coefficient matrix/data frame")
+#: R/anova.R:0
+msgid "'x' must be coefficient matrix/data frame"
+msgstr "argument 'x' musi być macierzą współczynników lub ramką danych"
 
-# stats/R/dendrogram.R: 565
-# stop("'order.dendrogram' requires a dendrogram")
-msgid "'order.dendrogram' requires a dendrogram"
-msgstr "'order.dendrogram' wymaga drzewa celu"
+#. R/poisson.test.R: stop("'x' must be finite, nonnegative, and integer")
+#: R/poisson.test.R:0
+msgid "'x' must be finite, nonnegative, and integer"
+msgstr "argument 'x' musi być skończoną nieujemną liczbą całkowitą"
 
-# stats/R/dendrogram.R: 588
-# stop("'reorder.dendrogram' requires a dendrogram")
-msgid "'reorder.dendrogram' requires a dendrogram"
-msgstr "'reorder.dendrogram' wymaga drzewa celu"
+#. R/distn.R: stop("'x' must be non-negative")
+#: R/distn.R:0
+msgid "'x' must be non-negative"
+msgstr "argument 'x' musi być nieujemny"
 
-# stats/R/dendrogram.R: 596
-# stop("invalid (length 0) node in dendrogram")
-msgid "invalid (length 0) node in dendrogram"
-msgstr "niepoprawny (długość równa 0) węzeł w drzewie celu"
+#. R/binom.test.R: stop("'x' must be nonnegative and integer")
+#: R/binom.test.R:0
+msgid "'x' must be nonnegative and integer"
+msgstr "argument 'x' musi być nieujemną liczbą całkowitą"
 
-# stats/R/dendrogram.R: 618
-# stop("dendrogram non-leaf node with non-positive #{branches}")
-msgid "dendrogram non-leaf node with non-positive #{branches}"
-msgstr "bezliściowy węzeł drzewa celu z wartościami nie-dodatnimi #{gałęziami}"
+#. R/StructTS.R: stop("'x' must be numeric")
+#. R/acf.R: stop("'x' must be numeric")
+#. R/acf.R: stop("'x' must be numeric")
+#. R/ar.R: stop("'x' must be numeric")
+#. R/ar.R: stop("'x' must be numeric")
+#. R/ar.R: stop("'x' must be numeric")
+#. R/arima.R: stop("'x' must be numeric")
+#. R/arma0.R: stop("'x' must be numeric")
+#. R/cor.R: stop("'x' must be numeric")
+#. R/wilcox.test.R: stop("'x' must be numeric")
+#: R/StructTS.R:0 R/acf.R:0 R/ar.R:0 R/arima.R:0 R/arma0.R:0 R/cor.R:0
+#: R/wilcox.test.R:0
+msgid "'x' must be numeric"
+msgstr "argument 'x' musi być liczbą"
 
-# stats/R/dendrogram.R: 650
-# gettextf("'height' must be at least %g, the maximal height of its components", h.max)
-msgid "'height' must be at least %g, the maximal height of its components"
+#. R/mcnemar.test.R: stop("'x' must be square with at least two rows and columns")
+#: R/mcnemar.test.R:0
+msgid "'x' must be square with at least two rows and columns"
 msgstr ""
-"'height' musi być równe co najmniej %g, maksymalnej wysokości jego "
-"komponentów"
+"'x' musi być kwadratową macierzą z co najmniej dwoma wierszami oraz kolumnami"
 
-# stats/R/dendrogram.R: 664
-# stop("'X' is not a dendrogram")
-msgid "'X' is not a dendrogram"
-msgstr "'X' nie jest drzewem celu"
+#. R/cov.wt.R: stop("'x' must contain finite values only")
+#: R/cov.wt.R:0
+msgid "'x' must contain finite values only"
+msgstr "'x' musi zawierać tylko skończone wartości"
 
-# stats/R/dendrogram.R: 696
-# stop("'x' must be a numeric matrix")
-msgid "'x' must be a numeric matrix"
-msgstr "'x' musi być macierzą liczbową"
+#. R/ecdf.R: stop("'x' must have 1 or more non-missing values")
+#: R/ecdf.R:0
+msgid "'x' must have 1 or more non-missing values"
+msgstr "'x' musi mieć 1 lub więcej niebrakujących wartości"
+
+#. R/pairwise.R: stop("'x' must have 2 columns")
+#. R/prop.test.R: stop("'x' must have 2 columns")
+#: R/pairwise.R:0 R/prop.test.R:0
+msgid "'x' must have 2 columns"
+msgstr "'x' musi mieć 2 kolumny"
 
-# stats/R/dendrogram.R: 700
-# stop("'x' must have at least 2 rows and 2 columns")
+#. R/dendrogram.R: stop("'x' must have at least 2 rows and 2 columns")
+#: R/dendrogram.R:0
 msgid "'x' must have at least 2 rows and 2 columns"
 msgstr "'x' musi mieć przynajmniej 2 wiersze oraz 2 kolumny"
 
-# stats/R/dendrogram.R: 702
-# stop("'margins' must be a numeric vector of length 2")
-msgid "'margins' must be a numeric vector of length 2"
-msgstr "argument 'margins' musi być wektorem liczbowym o długości 2"
-
-# stats/R/dendrogram.R: 723
-# stop("row dendrogram ordering gave index of wrong length")
-msgid "row dendrogram ordering gave index of wrong length"
-msgstr ""
-"porządkowanie drzewa celu względem wierszy zwróciło indeks o niepoprawnej "
-"długości"
-
-# stats/R/dendrogram.R: 732
-# stop('Colv = "Rowv" but nrow(x) != ncol(x)')
-msgid "Colv = \"Rowv\" but nrow(x) != ncol(x)"
-msgstr "'Colv = \"Rowv\"', ale 'nrow(x) != ncol(x)'"
+#. R/fisher.test.R: stop("'x' must have at least 2 rows and columns")
+#: R/fisher.test.R:0
+msgid "'x' must have at least 2 rows and columns"
+msgstr "argument 'x' musi mieć przynajmniej 2 wiersze oraz 2 kolumny"
 
-# stats/R/dendrogram.R: 742
-# stop("column dendrogram ordering gave index of wrong length")
-msgid "column dendrogram ordering gave index of wrong length"
-msgstr ""
-"porządkowanie drzewa celu względem kolumn zwróciło indeks o niepoprawnej "
-"długości"
+#. R/stepfun.R: stop("'x' must have length >= 1")
+#: R/stepfun.R:0
+msgid "'x' must have length >= 1"
+msgstr "argument 'x' musi mieć długość >= 1"
 
-# stats/R/dendrogram.R: 775
-# stop("'ColSideColors' must be a character vector of length ncol(x)")
-msgid "'ColSideColors' must be a character vector of length ncol(x)"
-msgstr ""
-"argument 'ColSideColors' musi być wektorem tekstowym o długości 'ncol(x)'"
+#. R/mantelhaen.test.R: stop("'x', 'y', and 'z' must have the same length")
+#: R/mantelhaen.test.R:0
+msgid "'x', 'y', and 'z' must have the same length"
+msgstr "argumenty 'x', 'y' oraz 'z' muszą mieć tę samą długość"
 
-# stats/R/dendrogram.R: 781
-# stop("'RowSideColors' must be a character vector of length nrow(x)")
-msgid "'RowSideColors' must be a character vector of length nrow(x)"
-msgstr ""
-"argument 'RowSideColors' musi być wektorem tekstowym o długości 'nrow(x)'"
+#. R/diffinv.R: stop("'xi' does not have the right length")
+#: R/diffinv.R:0
+msgid "'xi' does not have the right length"
+msgstr "'xi' nie ma poprawnej długości"
 
-# stats/R/density.R: 29
-# warning("non-matched further arguments are disregarded")
-msgid "non-matched further arguments are disregarded"
-msgstr "dalsze niedopasowane argumenty zostały odrzucone"
+#. R/arima.R: stop("'xreg' and 'newxreg' have different numbers of columns")
+#. R/arma0.R: stop("'xreg' and 'newxreg' have different numbers of columns")
+#: R/arima.R:0 R/arma0.R:0
+msgid "'xreg' and 'newxreg' have different numbers of columns"
+msgstr "'xreg' oraz 'newxreg' mają różne liczby kolumn"
 
-# stats/R/density.R: 46
-# stop("argument 'x' must be numeric")
-# stats/R/ks.test.R: 117
-# stop("argument 'x' must be numeric")
-msgid "argument 'x' must be numeric"
-msgstr "argument 'x' musi być liczbą"
+#. R/arma0.R: stop("'xreg' is collinear")
+#: R/arma0.R:0
+msgid "'xreg' is collinear"
+msgstr "argument 'xreg' jest współliniowy"
 
-# stats/R/density.R: 52
-# stop("'x' contains missing values")
-msgid "'x' contains missing values"
-msgstr "argument 'x' zawiera brakujące wartości"
+#. R/ts.R: stop("'xy.labels' must be logical or character")
+#: R/ts.R:0
+msgid "'xy.labels' must be logical or character"
+msgstr "'xy.labels' musi być tekstem lub zmienną logiczną"
 
-# stats/R/splinefun.R: 31
-# stop("invalid value of length(x)")
-# stats/R/runmed.R: 28
-# stop("invalid value of length(x)")
-# stats/R/density.R: 55
-# stop("invalid value of length(x)")
-# stats/R/diffinv.R: 36
-# stop ("invalid value of length(x)")
-# stats/R/spline.R: 35
-# stop("invalid value of length(x)")
-msgid "invalid value of length(x)"
-msgstr "niepoprawna wartość 'length(x)'"
+#. R/cancor.R: stop("'y' has rank 0")
+#: R/cancor.R:0
+msgid "'y' has rank 0"
+msgstr "argument 'y' ma rangę 0"
 
-# stats/R/density.R: 69
-# stop("'x' and 'weights' have unequal length")
-msgid "'x' and 'weights' have unequal length"
-msgstr "argumenty 'x' oraz 'weights' mają niezgodne długości"
+#. R/t.test.R: stop("'y' is missing for paired test")
+#. R/wilcox.test.R: stop("'y' is missing for paired test")
+#: R/t.test.R:0 R/wilcox.test.R:0
+msgid "'y' is missing for paired test"
+msgstr "brakuje 'y' do sparowanego testu"
 
-# stats/R/density.R: 71
-# stop("'weights' must all be finite")
-msgid "'weights' must all be finite"
-msgstr "argument 'weights' musi w całości być skończony"
+#. R/cor.test.R: stop("'y' must be a numeric vector")
+#: R/cor.test.R:0
+msgid "'y' must be a numeric vector"
+msgstr "argument 'y' musi być wektorem liczbowym"
 
-# stats/R/density.R: 73
-# stop("'weights' must not be negative")
-msgid "'weights' must not be negative"
-msgstr "argument 'weights' nie może być ujemny"
+#. R/spline.R: stop("'y' must be increasing or decreasing")
+#. R/splinefun.R: stop("'y' must be increasing or decreasing")
+#: R/spline.R:0 R/splinefun.R:0
+msgid "'y' must be increasing or decreasing"
+msgstr "'y' musi być rosnące lub malejące"
 
-# stats/R/density.R: 82
-# warning("sum(weights) != 1  -- will not get true density")
-msgid "sum(weights) != 1  -- will not get true density"
-msgstr "'sum(weights)  !=  1' -- nie uzyska się prawdziwej gęstości"
+#. R/cor.R: stop("'y' must be numeric")
+#. R/wilcox.test.R: stop("'y' must be numeric")
+#: R/cor.R:0 R/wilcox.test.R:0
+msgid "'y' must be numeric"
+msgstr "argument 'y' musi być liczbą"
 
-# stats/R/density.R: 109
-# stop("need at least 2 points to select a bandwidth automatically")
-msgid "need at least 2 points to select a bandwidth automatically"
+#. R/ks.test.R: stop("'y' must be numeric or a function or a string naming a valid function")
+#: R/ks.test.R:0
+msgid "'y' must be numeric or a function or a string naming a valid function"
 msgstr ""
-"co najmniej 2 punkty są potrzebne aby automatycznie wybrać szerokość pasma"
+"'y' musi być liczbą lub funkcją lub łańcuchem o poprawnej nazwie funkcji"
 
-# stats/R/density.R: 117
-# stop("unknown bandwidth rule")
-msgid "unknown bandwidth rule"
-msgstr "nieznana reguła szerokości pasma"
+#. R/smspline.R: stop("'y' must be numeric vector")
+#: R/smspline.R:0
+msgid "'y' must be numeric vector"
+msgstr "argument 'y' musi być wektorem liczbowym"
 
-# stats/R/density.R: 119
-# stop("non-finite 'bw'")
-msgid "non-finite 'bw'"
-msgstr "nieskończony argument 'bw'"
+#. R/stepfun.R: stop("'y' must be one longer than 'x'")
+#: R/stepfun.R:0
+msgid "'y' must be one longer than 'x'"
+msgstr "'y' musi być o jeden dłuższy niż 'x'"
 
-# stats/R/density.R: 121
-# stop("'bw' is not positive.")
-msgid "'bw' is not positive."
-msgstr "argument 'bw' nie jest dodatni"
+#. R/friedman.test.R: stop("'y', 'groups' and 'blocks' must have the same length")
+#. R/quade.test.R: stop("'y', 'groups' and 'blocks' must have the same length")
+#: R/friedman.test.R:0 R/quade.test.R:0
+msgid "'y', 'groups' and 'blocks' must have the same length"
+msgstr "argumenty 'y', 'groups' oraz 'block' muszą mieć tę samą długość"
 
-# stats/R/density.R: 127
-# stop("non-finite 'from'")
-msgid "non-finite 'from'"
-msgstr "nieskończony argument 'from'"
+#. R/smspline.R: message(".nknots.smspl() is now exported; use it instead of n.knots()")
+#: R/smspline.R:0
+msgid ".nknots.smspl() is now exported; use it instead of n.knots()"
+msgstr ""
+"funkcja '.nknots.smspl()' jest już eksportowana,; użyj jej zamiast funkcji "
+"'n.knots()'"
 
-# stats/R/density.R: 128
-# stop("non-finite 'to'")
-msgid "non-finite 'to'"
-msgstr "nieskończony argument 'to'"
+#. R/lm.R: stop("0 (non-NA) cases")
+#. R/lm.R: stop("0 (non-NA) cases")
+#: R/lm.R:0
+msgid "0 (non-NA) cases"
+msgstr "0 przypadków (nie o wartości NA)"
 
-# stats/R/deriv.R: 28
-# stop("invalid formula in deriv")
-# stats/R/deriv.R: 42
-# stop("invalid formula in deriv")
-msgid "invalid formula in deriv"
-msgstr "niepoprawna formuła w 'deriv()'"
+#. R/glm.R: stop("0s in V(mu)")
+#: R/glm.R:0
+msgid "0s in V(mu)"
+msgstr "zera w 'V(mu)'"
 
-# stats/R/kernel.R: 153
-# stop ("'x' is not a vector")
-# stats/R/diffinv.R: 26
-# stop ("'x' is not a vector")
-# stats/R/diffinv.R: 78
-# stop("'x' is not a vector")
-msgid "'x' is not a vector"
-msgstr "argument 'x' nie jest wektorem"
+#. R/add.R: stop("AIC is -infinity for this model, so 'step' cannot proceed")
+#: R/add.R:0
+msgid "AIC is -infinity for this model, so 'step' cannot proceed"
+msgstr ""
+"AIC wynosi minus nieskończoność dla tego modelu, tak więc 'step' nie może "
+"zostać wykonany"
 
-# stats/R/ts.R: 247
-# stop("bad value for 'lag' or 'differences'")
-# stats/R/diffinv.R: 28
-# stop ("bad value for 'lag' or 'differences'")
-msgid "bad value for 'lag' or 'differences'"
-msgstr "niepoprawna wartość dla argumentów 'lag' lub 'differences'"
+#. R/add.R: stop("AIC is not defined for this model, so 'step' cannot proceed")
+#: R/add.R:0
+msgid "AIC is not defined for this model, so 'step' cannot proceed"
+msgstr ""
+"Kryterium informacyjne Akaikego nie jest zdefiniowane dla tego modelu, tak "
+"więc 'step' nie może zostać wykonany"
 
-# stats/R/diffinv.R: 31
-# stop("'xi' does not have the right length")
-msgid "'xi' does not have the right length"
-msgstr "'xi' nie ma poprawnej długości"
+#. R/lm.R: warning("ANOVA F-tests on an essentially perfect fit are unreliable")
+#: R/lm.R:0
+msgid "ANOVA F-tests on an essentially perfect fit are unreliable"
+msgstr "Testy ANOVA Fishera w istocie na idealnym dopasowaniu są niewiarygodne"
 
-# stats/R/diffinv.R: 56
-# stop("incorrect dimensions for 'xi'")
-msgid "incorrect dimensions for 'xi'"
-msgstr "niepoprawne wymiary dla 'xi'"
+#. R/lm.R: warning("Assuming constant prediction variance even though model fit is weighted\n")
+#: R/lm.R:0
+msgid "Assuming constant prediction variance even though model fit is weighted"
+msgstr ""
+"Zakładanie stałości przewidywanej wariancji mimo iż dopasowanie modelu jest "
+"ważone"
 
-# stats/R/embed.R: 43
-# stop ("'x' is not a vector or matrix")
-# stats/R/diffinv.R: 65
-# stop ("'x' is not a vector or matrix")
-msgid "'x' is not a vector or matrix"
-msgstr "argument 'x' nie jest wektorem ani macierzą"
+#. R/constrOptim.R: gettext("Barrier algorithm ran out of iterations and did not converge")
+#: R/constrOptim.R:0
+msgid "Barrier algorithm ran out of iterations and did not converge"
+msgstr "Algorytmowi bariery zabrakło iteracji przez co nie zbiegł się"
 
-# stats/R/dist.R: 29
-# stop("invalid distance method")
-msgid "invalid distance method"
-msgstr "niepoprawna metoda wyznaczania odległości"
+#. R/cor.test.R: warning("Cannot compute exact p-value with ties")
+#. R/cor.test.R: warning("Cannot compute exact p-value with ties")
+#: R/cor.test.R:0
+msgid "Cannot compute exact p-value with ties"
+msgstr ""
+"nie można obliczyć dokładnej wartości prawdopodobieństwa z powtórzonymi "
+"wartościami"
 
-# stats/R/dist.R: 31
-# stop("ambiguous distance method")
-msgid "ambiguous distance method"
-msgstr "niejednoznaczna metoda wyznaczania odległości"
+#. R/chisq.test.R: warning("Chi-squared approximation may be incorrect")
+#. R/prop.test.R: warning("Chi-squared approximation may be incorrect")
+#: R/chisq.test.R:0 R/prop.test.R:0
+msgid "Chi-squared approximation may be incorrect"
+msgstr "Aproksymacja chi-kwadrat może być niepoprawna"
 
-# stats/R/dist.R: 73
-# warning("non-square matrix")
-msgid "non-square matrix"
-msgstr "macierz niekwadratowa"
+#. R/dendrogram.R: stop("Colv = \"Rowv\" but nrow(x) != ncol(x)")
+#: R/dendrogram.R:0
+msgid "Colv = \"Rowv\" but nrow(x) != ncol(x)"
+msgstr "'Colv = \"Rowv\"', ale 'nrow(x) != ncol(x)'"
 
-# stats/R/distn.R: 59
-# warning("specify 'rate' or 'scale' but not both")
-# stats/R/distn.R: 61
-# stop("specify 'rate' or 'scale' but not both")
-# stats/R/distn.R: 70
-# warning("specify 'rate' or 'scale' but not both")
-# stats/R/distn.R: 72
-# stop("specify 'rate' or 'scale' but not both")
-# stats/R/distn.R: 81
-# warning("specify 'rate' or 'scale' but not both")
-# stats/R/distn.R: 83
-# stop("specify 'rate' or 'scale' but not both")
-# stats/R/distn.R: 91
-# warning("specify 'rate' or 'scale' but not both")
-# stats/R/distn.R: 93
-# stop("specify 'rate' or 'scale' but not both")
-msgid "specify 'rate' or 'scale' but not both"
-msgstr "określ 'rate' lub 'scale', ale nie oba jednocześnie"
+#. R/hclust.R: gettextf("\n Consider providing an as.hclust.%s() method", oldClass(x)[1L])
+#: R/hclust.R:0
+msgid "Consider providing an as.hclust.%s() method"
+msgstr "rozważ dostarczenie metody 'as.hclust.%s()'"
 
-# stats/R/distn.R: 155
-# stop("x[] and prob[] must be equal length vectors.")
-msgid "x[] and prob[] must be equal length vectors."
-msgstr "argumenty 'x' oraz 'prob' muszą być wektorami o jednakowej długości"
+#. R/model.tables.R: message("Design is unbalanced - use se.contrast() for se's")
+#: R/model.tables.R:0
+msgid "Design is unbalanced - use se.contrast() for se's"
+msgstr "Projekt nie jest zrównoważony -- użyj 'se.contrast()' dla 'se'"
 
-# stats/R/distn.R: 157
-# stop("probabilities cannot be negative nor all 0")
-msgid "probabilities cannot be negative nor all 0"
-msgstr ""
-"prawdopodobieństwa nie mogą być ujemne ani wszyskie jednocześnie być równe 0"
+#. R/aov.R: warning("Error() model is singular")
+#: R/aov.R:0
+msgid "Error() model is singular"
+msgstr "model 'Error()' jest osobliwy"
 
-# stats/R/distn.R: 161
-# stop("'x' must be non-negative")
-msgid "'x' must be non-negative"
-msgstr "argument 'x' musi być nieujemny"
+#. R/add.R: gettextf("F test assumes 'quasi%s' family", fam)
+#: R/add.R:0
+msgid "F test assumes 'quasi%s' family"
+msgstr "Test Fishera zakłada rodzinę kwazi-%s"
 
-# stats/R/distn.R: 164
-# stop("size != sum(x), i.e. one is wrong")
-msgid "size != sum(x), i.e. one is wrong"
-msgstr "'size != sum(x)', tzn. jeden jest niepoprawny"
+#. R/add.R: gettextf("F test assumes quasi%s family", fam)
+#: R/add.R:0
+msgid "F test assumes quasi%s family"
+msgstr "Test Fishera zakłada rodzinę kwazi-%s"
 
-# stats/R/distn.R: 235
-# stop("'prob' and 'mu' both specified")
-# stats/R/distn.R: 244
-# stop("'prob' and 'mu' both specified")
-# stats/R/distn.R: 253
-# stop("'prob' and 'mu' both specified")
-# stats/R/distn.R: 262
-# stop("'prob' and 'mu' both specified")
-msgid "'prob' and 'mu' both specified"
-msgstr "określono jednocześnie argumenty 'prob' oraz 'mu'"
+#. R/arima.R: warning("MA part of model is not invertible")
+#. R/arma0.R: warning("MA part of model is not invertible")
+#: R/arima.R:0 R/arma0.R:0
+msgid "MA part of model is not invertible"
+msgstr "część średniej kroczącej modelu nie jest odwracalna"
 
-# stats/R/dummy.coef.R: 67
-# warning("some terms will have NAs due to the limits of the method")
-msgid "some terms will have NAs due to the limits of the method"
+#. R/ar.R: stop("MLE only implemented for univariate series")
+#: R/ar.R:0
+msgid "MLE only implemented for univariate series"
 msgstr ""
-"niektóre wyrażenia będą miały wartości NA z uwagi na ograniczenia metody"
-
-# stats/R/ecdf.R: 27
-# stop("'x' must have 1 or more non-missing values")
-msgid "'x' must have 1 or more non-missing values"
-msgstr "'x' musi mieć 1 lub więcej niebrakujących wartości"
+"Estymacja największej wiarygodności jest zaimplementowana jedynie dla "
+"jednowymiarowych serii"
 
-# stats/R/embed.R: 28
-# stop ("wrong embedding dimension")
-# stats/R/embed.R: 37
-# stop ("wrong embedding dimension")
-msgid "wrong embedding dimension"
-msgstr "niepoprawnie osadzony wymiar"
+#. R/smspline.R: stop("NA lev[]; probably smoothing parameter 'spar' way too large!")
+#: R/smspline.R:0
+msgid "NA lev[]; probably smoothing parameter 'spar' way too large!"
+msgstr ""
+"NA lev[]; prawdopodobnie parametr wygładzający 'spar' jest stanowczo zbyt "
+"duży!"
 
-# stats/R/factanal.R: 49
-# stop("'covmat' is not a valid covariance list")
-# stats/R/princomp.R: 60
-# stop("'covmat' is not a valid covariance list")
-msgid "'covmat' is not a valid covariance list"
-msgstr "'covmat' nie jest poprawną listą kowariancji"
+#. R/cmdscale.R: stop("NA values not allowed in 'd'")
+#: R/cmdscale.R:0
+msgid "NA values not allowed in 'd'"
+msgstr "wartości NA w argumencie 'd' nie są dozwolone"
 
-# stats/R/factanal.R: 59
-# stop("neither 'x' nor 'covmat' supplied")
-msgid "neither 'x' nor 'covmat' supplied"
-msgstr "nie dostarczono 'x' ani 'covmat'"
+#. R/friedman.test.R: stop("NA's are not allowed in 'groups' or 'blocks'")
+#. R/quade.test.R: stop("NA's are not allowed in 'groups' or 'blocks'")
+#: R/friedman.test.R:0 R/quade.test.R:0
+msgid "NA's are not allowed in 'groups' or 'blocks'"
+msgstr "wartości NA nie są dozwolone w argumentach 'groups' oraz 'blocks'"
 
-# stats/R/factanal.R: 66
-# stop("response not allowed in formula")
-# stats/R/prcomp.R: 54
-# stop("response not allowed in formula")
-# stats/R/princomp.R: 25
-# stop("response not allowed in formula")
-msgid "response not allowed in formula"
-msgstr "zmienna zależna nie jest dozwolona w formule"
+#. R/mantelhaen.test.R: stop("NAs are not allowed")
+#: R/mantelhaen.test.R:0
+msgid "NAs are not allowed"
+msgstr "wartości NA nie są dozwolone"
 
-# stats/R/factanal.R: 76
-# stop("factor analysis applies only to numerical variables")
-# stats/R/factanal.R: 81
-# stop("factor analysis applies only to numerical variables")
-msgid "factor analysis applies only to numerical variables"
-msgstr "analiza czynnikowa stosuje się tylko zmiennych liczbowych"
+#. R/arima.R: gettextf("NAs in '%s'", "phi")
+#. R/arima.R: gettextf("NAs in '%s'", "theta")
+#: R/arima.R:0
+msgid "NAs in '%s'"
+msgstr "wartości NA w '%s'"
 
-# stats/R/factanal.R: 88
-# stop("'covmat' is of unknown type")
-# stats/R/princomp.R: 78
-# stop("'covmat' is of unknown type")
-msgid "'covmat' is of unknown type"
-msgstr "'covmat' jest nieznanego typu"
+#. R/acf.R: stop("NAs in 'x'")
+#. R/ar.R: stop("NAs in 'x'")
+#. R/ar.R: stop("NAs in 'x'")
+#. R/ar.R: stop("NAs in 'x'")
+#. R/ar.R: stop("NAs in 'x'")
+#. R/ar.R: stop("NAs in 'x'")
+#. R/ar.R: stop("NAs in 'x'")
+#: R/acf.R:0 R/ar.R:0
+msgid "NAs in 'x'"
+msgstr "wartości NA w 'x'"
 
-# stats/R/factanal.R: 91
-# stop("requested scores without an 'x' matrix")
-msgid "requested scores without an 'x' matrix"
-msgstr "zażądano punktacji bez macierzy 'x'"
+#. R/glm.R: stop("NAs in V(mu)")
+#: R/glm.R:0
+msgid "NAs in V(mu)"
+msgstr "wartości NA w 'V(mu)'"
 
-# stats/R/factanal.R: 93
-# stop("factor analysis requires at least three variables")
-msgid "factor analysis requires at least three variables"
-msgstr "analiza czynnikowa wymaga przynajmniej trzech zmiennych"
+#. R/glm.R: stop("NAs in d(mu)/d(eta)")
+#: R/glm.R:0
+msgid "NAs in d(mu)/d(eta)"
+msgstr "wartości NA w 'd(mu)/d(eta)'"
 
-# stats/R/factanal.R: 120
-# stop("no starting values supplied")
-msgid "no starting values supplied"
-msgstr "nie określono wartości początkowych"
+#. R/arma0.R: warning("NAs present: setting 'delta' to -1")
+#: R/arma0.R:0
+msgid "NAs present: setting 'delta' to -1"
+msgstr "wartości NA są obecne: ustawianie 'delta' na wartość -1"
 
-# stats/R/family.R: 31
-# stop("invalid argument 'lambda'")
-msgid "invalid argument 'lambda'"
-msgstr "niepoprawny argument 'lambda'"
+#. R/constrOptim.R: gettextf("Objective function decreased at outer iteration %d",     i)
+#: R/constrOptim.R:0
+msgid "Objective function decreased at outer iteration %d"
+msgstr "Funkcja celu zmalała w zewnętrznej iteracji %d"
 
-# stats/R/family.R: 124
-# stop(gettextf("%s link not recognised", sQuote(link)),
-#                 domain = NA)
-msgid "%s link not recognised"
-msgstr "link %s nie został rozpoznany"
+#. R/constrOptim.R: gettextf("Objective function increased at outer iteration %d",     i)
+#: R/constrOptim.R:0
+msgid "Objective function increased at outer iteration %d"
+msgstr "Funkcja celu zwiększyła się w zewnętrznej iteracji %d"
 
-# stats/R/family.R: 150
-# stop(gettextf('link "%s" not available for poisson family; available links are %s',
-# 			  linktemp, paste(sQuote(okLinks), collapse =", ")),
-# 		 domain = NA)
-msgid "link \"%s\" not available for poisson family; available links are %s"
-msgstr "link '%s' nie jest dostępny dla rodziny Poissona; dostępne linki to %s"
+#. R/prcomp.R: stop("PCA applies only to numerical variables")
+#. R/princomp.R: stop("PCA applies only to numerical variables")
+#. R/princomp.R: stop("PCA applies only to numerical variables")
+#: R/prcomp.R:0 R/princomp.R:0
+msgid "PCA applies only to numerical variables"
+msgstr ""
+"analiza głównych komponentów stosuje się jedynie do zmiennych liczbowych"
 
-# stats/R/family.R: 167
-# stop("negative values not allowed for the 'Poisson' family")
-msgid "negative values not allowed for the 'Poisson' family"
-msgstr "ujemne wartości nie są dozwolone dla rodziny 'Poisson'"
+#. R/acf.R: gettextf("Page [%d,%d]: i =%s; j =%s", I, J, paste(iind, collapse = ","),     paste(jind, collapse = ","))
+#: R/acf.R:0
+msgid "Page [%d,%d]: i =%s; j =%s"
+msgstr "Strona [%d,%d]: i =%s; j =%s"
 
-# stats/R/family.R: 176
-# warning("ignoring prior weights")
-msgid "ignoring prior weights"
-msgstr "ignorowanie wag a priori"
+#. R/kmeans.R: gettextf("Quick-TRANSfer stage steps exceeded maximum (= %d)",     isteps.Qtran)
+#: R/kmeans.R:0
+msgid "Quick-TRANSfer stage steps exceeded maximum (= %d)"
+msgstr "Kroki etapu Quick-TRANSfer przekroczyły maksimum (= %d)"
 
-# stats/R/family.R: 211
-# stop(gettextf('link "%s" not available for quasipoisson family; available links are %s',
-# 			  linktemp, paste(sQuote(okLinks), collapse =", ")),
-# 		 domain = NA)
-msgid ""
-"link \"%s\" not available for quasipoisson family; available links are %s"
-msgstr ""
-"link '%s' nie jest dostępny dla rodziny kwazi-Poissona; dostępne linki to %s"
+#. R/aov.R: message("Refitting model to allow projection")
+#: R/aov.R:0
+msgid "Refitting model to allow projection"
+msgstr "Ponowne dopasowywanie modelu aby umożliwić rzutowanie"
 
-# stats/R/family.R: 228
-# stop("negative values not allowed for the 'quasiPoisson' family")
-msgid "negative values not allowed for the 'quasiPoisson' family"
-msgstr "ujemne wartości nie są dozwolone dla rodziny 'quasiPoisson'"
+#. R/wilcox.test.R: warning("Requested conf.level not achievable")
+#: R/wilcox.test.R:0
+msgid "Requested conf.level not achievable"
+msgstr "żądany 'conf.level' nie jest osiągalny"
 
-# stats/R/family.R: 262
-# stop(gettextf('link "%s" not available for gaussian family; available links are %s',
-# 			  linktemp, paste(sQuote(okLinks), collapse =", ")),
-# 		 domain = NA)
-msgid "link \"%s\" not available for gaussian family; available links are %s"
-msgstr ""
-"link '%s' nie jest dostępny dla rodziny gaussowskiej; dostępne linki to %s"
+#. R/model.tables.R: gettextf("SEs for type '%s' are not yet implemented", type)
+#. R/model.tables.R: gettextf("SEs for type '%s' are not yet implemented", type)
+#: R/model.tables.R:0
+msgid "SEs for type '%s' are not yet implemented"
+msgstr "błędy standardowe dla typu '%s' nie są jeszcze zaimplementowane"
 
-# stats/R/family.R: 284
-# stop("cannot find valid starting values: please specify some")
-# stats/R/glm.R: 213
-# stop("cannot find valid starting values: please specify some", call. = FALSE)
-msgid "cannot find valid starting values: please specify some"
+#. R/model.tables.R: message("Standard error information not returned as design is unbalanced. \nStandard errors can be obtained through 'se.contrast'.")
+#: R/model.tables.R:0
+msgid ""
+"Standard error information not returned as design is unbalanced. \n"
+"Standard errors can be obtained through 'se.contrast'."
 msgstr ""
-"nie można znaleźć poprawnych wartości startowych; proszę określić kilka"
+"Standardowa informacja o błędzie nie została zwrócona z powodu "
+"niezrównoważenia projektu. \n"
+"Błędy standardowe mogą zostać uzyskane poprzez 'se.contrast'."
 
-# stats/R/family.R: 309
-# stop(gettextf('link "%s" not available for binomial family; available links are %s',
-# 			  linktemp, paste(sQuote(okLinks), collapse =", ")),
-# 	     domain = NA)
-msgid "link \"%s\" not available for binomial family; available links are %s"
+#. R/hclust.R: message("The \"ward\" method has been renamed to \"ward.D\"; note new \"ward.D2\"")
+#: R/hclust.R:0
+msgid ""
+"The \"ward\" method has been renamed to \"ward.D\"; note new \"ward.D2\""
 msgstr ""
-"link '%s' nie jest dostępny dla rodziny Bernoulliego; dostępne linki to %s"
+"metoda 'ward' została przemianowana na 'ward.D'; zwróć uwagę na nową metodę "
+"'ward.D2'"
+
+#. R/mlm.R: stop("X does not define a subspace of M")
+#. R/mlm.R: stop("X does not define a subspace of M")
+#. R/mlm.R: stop("X does not define a subspace of M")
+#. R/mlm.R: stop("X does not define a subspace of M")
+#: R/mlm.R:0
+msgid "X does not define a subspace of M"
+msgstr "X nie definiuje podprzestrzeni M"
 
-# stats/R/family.R: 331
-# stop("y values must be 0 <= y <= 1")
-# stats/R/family.R: 421
-# stop("y values must be 0 <= y <= 1")
-msgid "y values must be 0 <= y <= 1"
-msgstr "wartości 'y' muszą być z przedziału 0 <= y <= 1"
+#. R/integrate.R: stop("a limit is NA or NaN")
+#: R/integrate.R:0
+msgid "a limit is NA or NaN"
+msgstr "granica wynosi NA lub NaN"
 
-# stats/R/family.R: 335
-# warning("non-integer #successes in a binomial glm!")
-msgid "non-integer #successes in a binomial glm!"
-msgstr ""
-"niecałkowita liczba sukcesów w rozkładzie Bernoulliego w funkcji 'glm()'!"
+#. R/oneway.test.R: stop("a two-sided formula is required")
+#: R/oneway.test.R:0
+msgid "a two-sided formula is required"
+msgstr "wymagana jest dwustronna formuła"
 
-# stats/R/family.R: 339
-# warning("non-integer counts in a binomial glm!")
-msgid "non-integer counts in a binomial glm!"
-msgstr "niecałkowita liczba zliczeń w rozkładzie Bernoulliego w 'glm'!"
+#. R/shapiro.test.R: stop("all 'x' values are identical")
+#: R/shapiro.test.R:0
+msgid "all 'x' values are identical"
+msgstr "wszystkie wartości 'x' są identyczne"
 
-# stats/R/family.R: 345
-# stop("for the 'binomial' family, y must be a vector of 0 and 1\'s\nor a 2 column matrix where col 1 is no. successes and col 2 is no. failures")
-msgid ""
-"for the 'binomial' family, y must be a vector of 0 and 1's\n"
-"or a 2 column matrix where col 1 is no. successes and col 2 is no. failures"
+#. R/zzModels.R: stop("all 'x' values must be non-negative to fit the Weibull growth model")
+#: R/zzModels.R:0
+msgid "all 'x' values must be non-negative to fit the Weibull growth model"
 msgstr ""
-"dla rodziny 'binomial, argument 'y' musi być wektorem zer i jedynek lub 2 "
-"kolumnową macierzą, gdzie pierwsza kolumna jest liczbą sukcesów, a druga "
-"kolumna jest liczbą porażek"
+"wszystkie wartości 'x' musi być nieujemne aby dopasować model wzrostu "
+"Weibull'a"
 
-# stats/R/family.R: 353
-# stop("cannot simulate from non-integer prior.weights")
-msgid "cannot simulate from non-integer prior.weights"
-msgstr "nie można symulować z niecałkowitych 'prior.weights'"
+#. R/identify.hclust.R: gettextf("all elements of 'which' must be between 1 and %d",     k)
+#: R/identify.hclust.R:0
+msgid "all elements of 'which' must be between 1 and %d"
+msgstr "wszystkie elementy 'which' muszą być pomiędzy 1 a %d"
 
-# stats/R/family.R: 407
-# stop(gettextf('link "%s" not available for quasibinomial family; available links are %s',
-# 			  linktemp, paste(sQuote(okLinks), collapse =", ")),
-# 	     domain = NA)
-msgid ""
-"link \"%s\" not available for quasibinomial family; available links are %s"
-msgstr ""
-"link '%s' nie jest dostępny dla rodziny kwazi-Bernoulliego; dostępne linki "
-"to %s"
+#. R/chisq.test.R: stop("all entries of 'x' must be nonnegative and finite")
+#. R/fisher.test.R: stop("all entries of 'x' must be nonnegative and finite")
+#. R/mcnemar.test.R: stop("all entries of 'x' must be nonnegative and finite")
+#: R/chisq.test.R:0 R/fisher.test.R:0 R/mcnemar.test.R:0
+msgid "all entries of 'x' must be nonnegative and finite"
+msgstr "wszystkie wpisy 'x' muszą być nieujemne oraz skończone"
 
-# stats/R/family.R: 430
-# stop("for the 'quasibinomial' family, y must be a vector of 0 and 1\'s\nor a 2 column matrix where col 1 is no. successes and col 2 is no. failures")
-msgid ""
-"for the 'quasibinomial' family, y must be a vector of 0 and 1's\n"
-"or a 2 column matrix where col 1 is no. successes and col 2 is no. failures"
-msgstr ""
-"dla rodziny 'quasibinomial', argument 'y' musi być wektorem zer i jedynek "
-"lub 2 kolumnową macierzą, gdzie pierwsza kolumna jest liczbą sukcesów, a "
-"druga kolumna jest liczbą porażek"
+#. R/fligner.test.R: stop("all group levels must be finite")
+#. R/kruskal.test.R: stop("all group levels must be finite")
+#: R/fligner.test.R:0 R/kruskal.test.R:0
+msgid "all group levels must be finite"
+msgstr "wszystkie poziomy grup muszą być skończone"
 
-# stats/R/family.R: 460
-# stop(gettextf('link "%s" not available for gamma family; available links are %s',
-# 			  linktemp, paste(sQuote(okLinks), collapse =", ")),
-# 	     domain = NA)
-msgid "link \"%s\" not available for gamma family; available links are %s"
-msgstr "link '%s' nie jest dostępny dla rodziny Gamma; dostępne linki to %s"
+#. R/fligner.test.R: stop("all groups must contain data")
+#. R/kruskal.test.R: stop("all groups must contain data")
+#: R/fligner.test.R:0 R/kruskal.test.R:0
+msgid "all groups must contain data"
+msgstr "wszystkie grupy muszą zawierać dane"
 
-# stats/R/family.R: 476
-# stop("non-positive values not allowed for the 'gamma' family")
-msgid "non-positive values not allowed for the 'gamma' family"
-msgstr "niedodatnie wartości nie są dozwolone dla rodziny 'gamma'"
+#. R/bartlett.test.R: stop("all observations are in the same group")
+#. R/fligner.test.R: stop("all observations are in the same group")
+#. R/kruskal.test.R: stop("all observations are in the same group")
+#: R/bartlett.test.R:0 R/fligner.test.R:0 R/kruskal.test.R:0
+msgid "all observations are in the same group"
+msgstr "wszystkie obserwacje są w tej samej grupie"
 
-# stats/R/family.R: 482
-# message("using weights as shape parameters")
-msgid "using weights as shape parameters"
-msgstr "używanie wag jako parametrów kształtu"
+#. R/StructTS.R: stop("all parameters were fixed")
+#. R/arma0.R: stop("all parameters were fixed")
+#: R/StructTS.R:0 R/arma0.R:0
+msgid "all parameters were fixed"
+msgstr "wszystkie parametry zostały ustalone"
 
-# stats/R/family.R: 518
-# stop(gettextf('link "%s" not available for inverse.gaussian family; available links are %s',
-# 			  linktemp, paste(sQuote(okLinks), collapse =", ")),
-#                  domain = NA)
-msgid ""
-"link \"%s\" not available for inverse.gaussian family; available links are %s"
-msgstr ""
-"link '%s' nie jest dostępny dla rodziny 'inverse.gaussian'; dostępne linki "
-"to %s"
+#. R/na.ts.R: stop("all times contain an NA")
+#. R/ts.R: stop("all times contain an NA")
+#: R/na.ts.R:0 R/ts.R:0
+msgid "all times contain an NA"
+msgstr "wszystkie czasy zawierają wartość NA"
 
-# stats/R/family.R: 529
-# stop("positive values only are allowed for the 'inverse.gaussian' family")
-msgid "positive values only are allowed for the 'inverse.gaussian' family"
-msgstr "dodanie wartości są dozwolone jedynie dla rodziny 'inverse.gaussian'"
+#. R/smspline.R: stop("all weights should be non-negative")
+#: R/smspline.R:0
+msgid "all weights should be non-negative"
+msgstr "wszystkie wagi muszą być nieujemne"
 
-# stats/R/family.R: 537
-# stop("need CRAN package 'SuppDists' for the 'inverse.gaussian' family")
-msgid "need CRAN package 'SuppDists' for the 'inverse.gaussian' family"
-msgstr "potrzeba pakietu 'SuppDists' z CRAN dla rodziny 'inverse.gaussian'"
+#. R/fisher.test.R: stop("alternative must be \"two.sided\", \"less\" or \"greater\"")
+#: R/fisher.test.R:0
+msgid "alternative must be \"two.sided\", \"less\" or \"greater\""
+msgstr "alternatywa musi być 'two.sided', 'less' lub 'greater'"
 
-# stats/R/family.R: 539
-# message("using weights as inverse variances")
-msgid "using weights as inverse variances"
-msgstr "używanie wag jako odwrotności wariancji"
+#. R/hclust.R: stop("ambiguous clustering method", paste("", method))
+#: R/hclust.R:0
+msgid "ambiguous clustering method"
+msgstr "niejednoznaczna metoda grupowania"
 
-# stats/R/family.R: 621
-# stop(gettextf('\'variance\' "%s" is invalid: possible values are "mu(1-mu)", "mu", "mu^2", "mu^3" and "constant"', variance_nm), domain = NA)
-msgid ""
-"'variance' \"%s\" is invalid: possible values are \"mu(1-mu)\", \"mu\", "
-"\"mu^2\", \"mu^3\" and \"constant\""
-msgstr ""
-"'variance' '%s' jest niepoprawna: możliwe wartości to: 'mu(1-mu)', 'mu', "
-"'mu^2', 'mu^3' oraz 'constant'"
+#. R/dist.R: stop("ambiguous distance method")
+#: R/dist.R:0
+msgid "ambiguous distance method"
+msgstr "niejednoznaczna metoda wyznaczania odległości"
 
-# stats/R/fft.R: 34
-# stop("length mismatch in convolution")
-msgid "length mismatch in convolution"
-msgstr "niezgodność długości w splocie"
+#. R/nls.R: stop("anova is only defined for sequences of \"nls\" objects")
+#: R/nls.R:0
+msgid "anova is only defined for sequences of \"nls\" objects"
+msgstr "'anova' jest zdefiniowana jedynie dla sekwencji obiektów 'nls'"
 
-# stats/R/filter.R: 32
-# stop("missing values in 'filter'")
-msgid "missing values in 'filter'"
-msgstr "brakujące wartości w argumencie 'filter'"
+#. R/nls.R: warning("argument 'na.action' will be ignored")
+#: R/nls.R:0
+msgid "argument 'na.action' will be ignored"
+msgstr "argument 'na.action' zostanie zignornowany"
 
-# stats/R/filter.R: 35
-# stop("'filter' is longer than time series")
-msgid "'filter' is longer than time series"
-msgstr "'filter' jest dłuższy niż szeregi czasowe"
+#. R/selfStart.R: stop("argument 'object' has an impossible length")
+#: R/selfStart.R:0
+msgid "argument 'object' has an impossible length"
+msgstr "argument 'object' ma nieprawdopodobną długość"
 
-# stats/R/filter.R: 38
-# stop("argument 'sides' must be 1 or 2")
+#. R/filter.R: stop("argument 'sides' must be 1 or 2")
+#: R/filter.R:0
 msgid "argument 'sides' must be 1 or 2"
 msgstr "argument 'sides' musi mieć wartość 1 lub 2"
 
-# stats/R/filter.R: 40
-# stop("'circular' must be logical and not NA")
-msgid "'circular' must be logical and not NA"
-msgstr ""
-"argument 'circular' musi być wartością logiczną oraz nie może być wartością "
-"NA"
-
-# stats/R/filter.R: 53
-# stop("length of 'init' must equal length of 'filter'")
-msgid "length of 'init' must equal length of 'filter'"
-msgstr "długość argumentu 'init' musi równać się długości argumentu 'filter'"
+#. R/nls.R: warning("argument 'subset' will be ignored")
+#: R/nls.R:0
+msgid "argument 'subset' will be ignored"
+msgstr "argument 'subset' zostanie zignornowany"
 
-# stats/R/filter.R: 56
-# stop("'init' must have 1 column")
-msgid "'init' must have 1 column"
-msgstr "'init' musi mieć 1 kolumnę"
+#. R/hclust.R: gettextf("argument 'x' cannot be coerced to class %s", dQuote("hclust"))
+#: R/hclust.R:0
+msgid "argument 'x' cannot be coerced to class %s"
+msgstr "argument 'x' nie może zostać przekształcony w klasę %s"
 
-# stats/R/filter.R: 57
-# stop(gettextf("'init' must have 1 or %d columns", nser),
-#                           domain = NA)
-msgid "'init' must have 1 or %d columns"
-msgstr "'init' musi mieć liczbę kolumn równą 1 lub %d"
+#. R/density.R: stop("argument 'x' must be numeric")
+#. R/ks.test.R: stop("argument 'x' must be numeric")
+#: R/density.R:0 R/ks.test.R:0
+msgid "argument 'x' must be numeric"
+msgstr "argument 'x' musi być liczbą"
 
-# stats/R/fisher.test.R: 31
-# stop("'x' must have at least 2 rows and columns")
-msgid "'x' must have at least 2 rows and columns"
-msgstr "argument 'x' musi mieć przynajmniej 2 wiersze oraz 2 kolumny"
+#. R/proj.R: stop("argument does not include a 'qr' component")
+#: R/proj.R:0
+msgid "argument does not include a 'qr' component"
+msgstr "argument nie uwzględnia komponentu 'qr'"
 
-# stats/R/fisher.test.R: 38
-# stop("'x' has entries too large to be integer")
-msgid "'x' has entries too large to be integer"
-msgstr "argument 'x' posiada wpisy zbyt duże aby były liczbami całkowitymi"
+#. R/proj.R: stop("argument does not include an 'effects' component")
+#: R/proj.R:0
+msgid "argument does not include an 'effects' component"
+msgstr "argument nie uwzględnia komponentu 'effects'"
 
-# stats/R/fisher.test.R: 40
-# warning(gettextf("'x' has been rounded to integer: %s", ax),
-#                         domain = NA)
-msgid "'x' has been rounded to integer: %s"
-msgstr "argument 'x' został zaokrąglony do wartości całkowitej: %s"
+#. R/r2dtable.R: stop("arguments 'r' and 'c' must have the same sums")
+#: R/r2dtable.R:0
+msgid "arguments 'r' and 'c' must have the same sums"
+msgstr "argumenty 'r' oraz 'c' muszą mieć jednakowe sumy"
 
-# stats/R/mcnemar.test.R: 31
-# stop("if 'x' is not a matrix, 'y' must be given")
-# stats/R/fisher.test.R: 47
-# stop("if 'x' is not a matrix, 'y' must be given")
-msgid "if 'x' is not a matrix, 'y' must be given"
-msgstr "jeśli argument 'x' nie jest macierzą, argument 'y' musi zostać podane"
+#. R/aggregate.R: stop("arguments must have same length")
+#: R/aggregate.R:0
+msgid "arguments must have same length"
+msgstr "argumenty muszą mieć tę samą długość"
 
-# stats/R/fisher.test.R: 64
-# stop("'mult' must be integer >= 2, typically = 30")
-msgid "'mult' must be integer >= 2, typically = 30"
-msgstr "argument 'mult' musi być liczbą całkowitą >= 2, na ogół = 30"
+#. R/contr.poly.R: stop("arguments must have the same length")
+#: R/contr.poly.R:0
+msgid "arguments must have the same length"
+msgstr "argumenty muszą mieć tę samą długość"
 
-# stats/R/fisher.test.R: 73
-# stop("alternative must be \"two.sided\", \"less\" or \"greater\"")
-msgid "alternative must be \"two.sided\", \"less\" or \"greater\""
-msgstr "alternatywa musi być 'two.sided', 'less' lub 'greater'"
+#. R/lm.R: warning("assuming prediction variance inversely proportional to weights used for fitting\n")
+#: R/lm.R:0
+msgid ""
+"assuming prediction variance inversely proportional to weights used for "
+"fitting"
+msgstr ""
+"zakładanie przewidywanej wariancji odwrotnie proporcjonalnej do wag użytych "
+"do dopasowania"
 
-# stats/R/fisher.test.R: 78
-# stop("'or' must be a single number between 0 and Inf")
-msgid "'or' must be a single number between 0 and Inf"
-msgstr "argument 'or' musi być pojedynczą liczbą pomiędzy 0 a Inf"
+#. R/chisq.test.R: stop("at least one entry of 'x' must be positive")
+#: R/chisq.test.R:0
+msgid "at least one entry of 'x' must be positive"
+msgstr "przynajmniej jeden wpis w 'x' musi być dodatni"
 
-# stats/R/fisher.test.R: 93
-# stop("need 2 or more non-zero row marginals")
-msgid "need 2 or more non-zero row marginals"
-msgstr "2 lub więcej niezerowych granic wiersza jest wymagane"
+#. R/smooth.R: stop("attempt to smooth NA values")
+#: R/smooth.R:0
+msgid "attempt to smooth NA values"
+msgstr "próba wygładzenia wartości NA"
 
-# stats/R/fisher.test.R: 95
-# stop("need 2 or more non-zero column marginals")
-msgid "need 2 or more non-zero column marginals"
-msgstr "2 lub więcej niezerowych granic kolumny jest wymagane"
+#. R/smooth.R: stop("attempt to smooth non-numeric values")
+#: R/smooth.R:0
+msgid "attempt to smooth non-numeric values"
+msgstr "próba wygładzenia wartości nieliczbowych"
 
-# stats/R/fisher.test.R: 116
-# warning("'hybrid' is ignored for a 2 x 2 table")
-msgid "'hybrid' is ignored for a 2 x 2 table"
-msgstr "argument 'hybrid' jest ignorowany dla tabeli o wymiarach 2 x 2"
+#. R/add.R: warning("attempting model selection on an essentially perfect fit is nonsense",     call. = FALSE)
+#: R/add.R:0
+msgid "attempting model selection on an essentially perfect fit is nonsense"
+msgstr "próba wyboru modelu dla idealnego dopasowania jest bez sensu"
 
-# stats/R/fligner.test.R: 34
-# stop("all groups must contain data")
-# stats/R/kruskal.test.R: 32
-# stop("all groups must contain data")
-msgid "all groups must contain data"
-msgstr "wszystkie grupy muszą zawierać dane"
+#. R/ts.R: stop("bad value for 'end'")
+#: R/ts.R:0
+msgid "bad value for 'end'"
+msgstr "niepoprawna wartość dla argumentu 'end'"
 
-# stats/R/fligner.test.R: 47
-# stop("all group levels must be finite")
-# stats/R/kruskal.test.R: 45
-# stop("all group levels must be finite")
-msgid "all group levels must be finite"
-msgstr "wszystkie poziomy grup muszą być skończone"
+#. R/diffinv.R: stop("bad value for 'lag' or 'differences'")
+#. R/ts.R: stop("bad value for 'lag' or 'differences'")
+#: R/diffinv.R:0 R/ts.R:0
+msgid "bad value for 'lag' or 'differences'"
+msgstr "niepoprawna wartość dla argumentów 'lag' lub 'differences'"
 
-# stats/R/fligner.test.R: 55
-# stop("not enough observations")
-# stats/R/oneway.test.R: 45
-# stop("not enough observations")
-# stats/R/t.test.R: 75
-# stop("not enough observations")
-# stats/R/kruskal.test.R: 54
-# stop("not enough observations")
-# stats/R/mood.test.R: 32
-# stop("not enough observations")
-msgid "not enough observations"
-msgstr "niewystarczająca liczba obserwacji"
+#. R/ts.R: stop("bad value for 'start'")
+#: R/ts.R:0
+msgid "bad value for 'start'"
+msgstr "niepoprawna wartość dla 'start'"
 
-# stats/R/quade.test.R: 31
-# stop("NA's are not allowed in 'groups' or 'blocks'")
-# stats/R/friedman.test.R: 31
-# stop("NA's are not allowed in 'groups' or 'blocks'")
-msgid "NA's are not allowed in 'groups' or 'blocks'"
-msgstr "wartości NA nie są dozwolone w argumentach 'groups' oraz 'blocks'"
+#. R/runmed.R: stop("bandwidth 'k' must be >= 1 and odd!")
+#: R/runmed.R:0
+msgid "bandwidth 'k' must be >= 1 and odd!"
+msgstr "pasmo 'k' musi być >= 1 i musi być nieparzyste!"
 
-# stats/R/quade.test.R: 33
-# stop("'y', 'groups' and 'blocks' must have the same length")
-# stats/R/friedman.test.R: 33
-# stop("'y', 'groups' and 'blocks' must have the same length")
-msgid "'y', 'groups' and 'blocks' must have the same length"
-msgstr "argumenty 'y', 'groups' oraz 'block' muszą mieć tę samą długość"
+#. R/contrast.R: stop("baseline group number out of range")
+#: R/contrast.R:0
+msgid "baseline group number out of range"
+msgstr "numer grupy bazowej jest poza zakresem"
 
-# stats/R/quade.test.R: 38
-# stop("not an unreplicated complete block design")
-# stats/R/friedman.test.R: 37
-# stop("not an unreplicated complete block design")
-msgid "not an unreplicated complete block design"
-msgstr "to nie jest niezreplikowana kompletna konstrukcja bloku"
+#. R/biplot.R: stop("biplots are not defined for complex PCA")
+#: R/biplot.R:0
+msgid "biplots are not defined for complex PCA"
+msgstr ""
+"wykresy dwuwymiarowego modelu dyspersji dla grup nie są zdefiniowane dla "
+"analizy zespolonych głównych komponentów"
 
-# stats/R/friedman.test.R: 75
-# stop("formula missing")
-msgid "formula missing"
-msgstr "brakuje argumentu 'formula'"
+#. R/loess.R: warning("both 'span' and 'enp.target' specified: 'span' will be used")
+#: R/loess.R:0
+msgid "both 'span' and 'enp.target' specified: 'span' will be used"
+msgstr "określono 'span' oraz 'enp.target': zostanie użyty 'span'"
 
-# stats/R/quade.test.R: 90
-# stop("incorrect specification for 'formula'")
-# stats/R/friedman.test.R: 84
-# stop("incorrect specification for 'formula'")
-msgid "incorrect specification for 'formula'"
-msgstr "niepoprawne określenie dla argumentu 'formula'"
+#. R/princomp.R: warning("both 'x' and 'covmat' were supplied: 'x' will be ignored")
+#: R/princomp.R:0
+msgid "both 'x' and 'covmat' were supplied: 'x' will be ignored"
+msgstr "dostarczono jednocześnie 'x' oraz 'covmat': 'x' zostanie zignorowany"
 
-# stats/R/ftable.R: 25
-# stop("nothing to tabulate")
-msgid "nothing to tabulate"
-msgstr "nic do tabulowania"
-
-# stats/R/ftable.R: 43
-# stop("incorrect specification for 'row.vars'")
-# stats/R/ftable.R: 46
-# stop("incorrect specification for 'row.vars'")
-msgid "incorrect specification for 'row.vars'"
-msgstr "niepoprawne określenie dla argumentu 'row.vars'"
-
-# stats/R/ftable.R: 52
-# stop("incorrect specification for 'col.vars'")
-# stats/R/ftable.R: 55
-# stop("incorrect specification for 'col.vars'")
-msgid "incorrect specification for 'col.vars'"
-msgstr "niepoprawne określenie dla argumentu 'col.vars'"
-
-# stats/R/xtabs.R: 32
-# stop("interactions are not allowed")
-# stats/R/ftable.R: 96
-# stop("interactions are not allowed")
-msgid "interactions are not allowed"
-msgstr "interakcje nie są dozwolone"
+#. R/cor.R: stop("both 'x' and 'y' must be non-empty")
+#: R/cor.R:0
+msgid "both 'x' and 'y' must be non-empty"
+msgstr "oba 'x' oraz 'y' muszą być niepuste"
 
-# stats/R/ftable.R: 103
-# stop("'formula' has '.' in both left and right hand sides")
-msgid "'formula' has '.' in both left and right hand sides"
-msgstr "'formula' ma '.' po lewej oraz prawej stronie"
+#. R/optim.R: warning("bounds can only be used with method L-BFGS-B (or Brent)")
+#: R/optim.R:0
+msgid "bounds can only be used with method L-BFGS-B (or Brent)"
+msgstr "granice mogą być użyte jedynie z metodą L-BFGS-B (lub Brent)"
 
-# stats/R/ftable.R: 118
-# stop("incorrect variable names in rhs of formula")
-msgid "incorrect variable names in rhs of formula"
-msgstr "niepoprawne nazwy zmiennych po prawej stronie formuły"
+#. R/ts.R: stop("burn-in 'n.start' must be as long as 'ar + ma'")
+#: R/ts.R:0
+msgid "burn-in 'n.start' must be as long as 'ar + ma'"
+msgstr "oryginał 'n.start' musi być tak długi jak 'ar + ma'"
 
-# stats/R/ftable.R: 126
-# stop("incorrect variable names in lhs of formula")
-msgid "incorrect variable names in lhs of formula"
-msgstr "niepoprawne nazwy zmiennych po lewej stronie formuły"
+#. R/lm.R: warning("calling anova.lm(<fake-lm-object>) ...")
+#: R/lm.R:0
+msgid "calling anova.lm(<fake-lm-object>) ..."
+msgstr "wywoływanie 'anova.lm(<fake-lm-object>)' ..."
 
-# stats/R/ftable.R: 144
-# stop("cannot use dots in formula with given data")
-msgid "cannot use dots in formula with given data"
-msgstr "nie można używać kropek w formule z zadanymi danymi"
+#. R/lm.R: warning("calling predict.lm(<fake-lm-object>) ...")
+#: R/lm.R:0
+msgid "calling predict.lm(<fake-lm-object>) ..."
+msgstr "wywoływanie 'predict.lm(<fake-lm-object>)' ..."
 
-# stats/R/ftable.R: 159
-# stop("'x' must be an \"ftable\" object")
-# stats/R/ftable.R: 179
-# stop("'x' must be an \"ftable\" object")
-# stats/R/ftable.R: 413
-# stop("'x' must be an \"ftable\" object")
-msgid "'x' must be an \"ftable\" object"
-msgstr "argument 'mu' musi być obiektem klasy \"ftable\""
+#. R/lm.R: warning("calling summary.lm(<fake-lm-object>) ...")
+#: R/lm.R:0
+msgid "calling summary.lm(<fake-lm-object>) ..."
+msgstr "wywoływanie 'summary.lm(<fake-lm-object>)' ..."
 
-# stats/R/ftable.R: 252
-# stop("wrong method")
-msgid "wrong method"
-msgstr "błędna metoda"
+#. R/acf.R: warning("can use ci.type=\"ma\" only if first lag is 0")
+#: R/acf.R:0
+msgid "can use ci.type=\"ma\" only if first lag is 0"
+msgstr "można użyć 'ci.type=\"ma\"' tylko jeśli pierwsze opóźnienie wynosi 0"
 
-# stats/R/ftable.R: 281
-# stop("'file' must be a character string or connection")
-msgid "'file' must be a character string or connection"
-msgstr "argument 'file' musi być łańcuchem tekstowym lub połączeniem"
+#. R/nls.R: stop("cannot calculate REML log-likelihood for \"nls\" objects")
+#: R/nls.R:0
+msgid "cannot calculate REML log-likelihood for \"nls\" objects"
+msgstr ""
+"nie można obliczyć REML logarytmu funkcji wiarygodności dla obiektów 'nls'"
 
-# stats/R/ftable.R: 354
-# stop("'row.var.names' missing")
-msgid "'row.var.names' missing"
-msgstr "brakuje 'row.var.names'"
+#. R/aggregate.R: gettextf("cannot change frequency from %g to %g", ofrequency,     nfrequency)
+#: R/aggregate.R:0
+msgid "cannot change frequency from %g to %g"
+msgstr "nie można zmienić częstotliwości z %g na %g"
 
-# stats/R/ftable.R: 361
-# stop("'col.vars' missing or incorrect")
-msgid "'col.vars' missing or incorrect"
-msgstr "brakuje argumentu 'col.vars' lub jest niepoprawny"
+#. R/ansari.test.R: warning("cannot compute asymptotic confidence set or estimator")
+#: R/ansari.test.R:0
+msgid "cannot compute asymptotic confidence set or estimator"
+msgstr "nie można obliczyć asymptotycznego przedziału ufności lub estymatora"
 
-# stats/R/glm.R: 41
-# stop("'family' not recognized")
-msgid "'family' not recognized"
-msgstr "argument 'family' nie został rozpoznany"
+#. R/wilcox.test.R: stop("cannot compute confidence interval when all observations are tied",     call. = FALSE)
+#. R/wilcox.test.R: stop("cannot compute confidence interval when all observations are tied",     call. = FALSE)
+#: R/wilcox.test.R:0
+msgid "cannot compute confidence interval when all observations are tied"
+msgstr ""
+"nie można obliczyć przedziału ufności gdy wszystkie obserwacje są powtórzone"
 
-# stats/R/glm.R: 56
-# stop("invalid 'method' argument")
-msgid "invalid 'method' argument"
-msgstr "niepoprawny argument 'method'"
+#. R/ansari.test.R: warning("cannot compute confidence set, returning NA")
+#: R/ansari.test.R:0
+msgid "cannot compute confidence set, returning NA"
+msgstr "nie można obliczyć przedziału ufności, zwracanie wartości NA"
 
-# stats/R/lm.R: 45
-# stop("'weights' must be a numeric vector")
-# stats/R/glm.R: 75
-# stop("'weights' must be a numeric vector")
-msgid "'weights' must be a numeric vector"
-msgstr "argument 'weight' musi być wektorem liczbowym"
+#. R/ansari.test.R: warning("cannot compute estimate, returning NA")
+#: R/ansari.test.R:0
+msgid "cannot compute estimate, returning NA"
+msgstr "nie można obliczyć estymatora, zwracanie wartości NA"
 
-# stats/R/lsfit.R: 83
-# stop("negative weights not allowed")
-# stats/R/glm.R: 78
-# stop("negative weights not allowed")
-msgid "negative weights not allowed"
-msgstr "ujemne wagi nie są dozwolone"
+#. R/wilcox.test.R: warning("cannot compute exact confidence interval with ties")
+#: R/wilcox.test.R:0
+msgid "cannot compute exact confidence interval with ties"
+msgstr ""
+"nie można obliczyć dokładnego przedziału ufności z wartościami powtórzonymi"
 
-# stats/R/glm.R: 83
-# stop(gettextf("number of offsets is %d should equal %d (number of observations)", length(offset), NROW(Y)), domain = NA)
-msgid "number of offsets is %d should equal %d (number of observations)"
-msgstr "liczba przesunięć (%d) powinna być równa liczbie obserwacji (%d)"
+#. R/wilcox.test.R: warning("cannot compute exact confidence interval with zeroes")
+#: R/wilcox.test.R:0
+msgid "cannot compute exact confidence interval with zeroes"
+msgstr "nie można obliczyć dokładnego przedziału ufności z zerami"
 
-# stats/R/glm.R: 114
-# warning("fitting to calculate the null deviance did not converge -- increase 'maxit'?")
-msgid ""
-"fitting to calculate the null deviance did not converge -- increase 'maxit'?"
+#. R/ansari.test.R: warning("cannot compute exact confidence intervals with ties")
+#. R/wilcox.test.R: warning("cannot compute exact confidence intervals with ties")
+#: R/ansari.test.R:0 R/wilcox.test.R:0
+msgid "cannot compute exact confidence intervals with ties"
 msgstr ""
-"dopasowanie aby wyliczyć zerowe odchylenie nie uzbieżniło się -- zwiększyć "
-"wartość 'maxit'?"
-
-# stats/R/glm.R: 134
-# stop("value of 'epsilon' must be > 0")
-msgid "value of 'epsilon' must be > 0"
-msgstr "wartość 'epsilon' musi być > 0"
+"nie można obliczyć dokładnych przedziałów ufności z powtórzonymi wartościami"
 
-# stats/R/glm.R: 136
-# stop("maximum number of iterations must be > 0")
-msgid "maximum number of iterations must be > 0"
-msgstr "maksymalna liczba iteracji musi być > 0"
+#. R/ansari.test.R: warning("cannot compute exact p-value with ties")
+#. R/ks.test.R: warning("cannot compute exact p-value with ties")
+#. R/wilcox.test.R: warning("cannot compute exact p-value with ties")
+#. R/wilcox.test.R: warning("cannot compute exact p-value with ties")
+#: R/ansari.test.R:0 R/ks.test.R:0 R/wilcox.test.R:0
+msgid "cannot compute exact p-value with ties"
+msgstr ""
+"nie można obliczyć dokładnej wartości prawdopodobieństwa z powtórzonymi "
+"wartościami"
 
-# stats/R/glm.R: 168
-# stop("'family' argument seems not to be a valid family object", call. = FALSE)
-msgid "'family' argument seems not to be a valid family object"
-msgstr "argument 'family' nie wygląda na poprawny obiekt rodziny"
+#. R/wilcox.test.R: warning("cannot compute exact p-value with zeroes")
+#: R/wilcox.test.R:0
+msgid "cannot compute exact p-value with zeroes"
+msgstr "nie można obliczyć dokładnej wartości prawdopodobieństwa z zerami"
 
-# stats/R/glm.R: 186
-# stop("invalid linear predictor values in empty model", call. = FALSE)
-msgid "invalid linear predictor values in empty model"
-msgstr "niepoprawne wartości liniowego predyktora w pustym modelu"
+#. R/chisq.test.R: warning("cannot compute simulated p-value with zero marginals")
+#: R/chisq.test.R:0
+msgid "cannot compute simulated p-value with zero marginals"
+msgstr ""
+"nie można obliczyć symulowanej wartości prawdopodobieństwa z zerowymi "
+"granicami"
 
-# stats/R/glm.R: 190
-# stop("invalid fitted means in empty model", call. = FALSE)
-msgid "invalid fitted means in empty model"
-msgstr "niepoprawnie dopasowane średnie w pustym modelu"
+#. R/models.R: stop("cannot create a formula from a zero-column data frame")
+#: R/models.R:0
+msgid "cannot create a formula from a zero-column data frame"
+msgstr "nie można utworzyć formuły z ramki danych o zerowej liczbie kolumn"
 
-# stats/R/glm.R: 204
-# stop(gettextf("length of 'start' should equal %d and correspond to initial coefs for %s", nvars, paste(deparse(xnames), collapse=", ")),
-#                          domain = NA)
-msgid ""
-"length of 'start' should equal %d and correspond to initial coefs for %s"
+#. R/family.R: stop("cannot find valid starting values: please specify some")
+#. R/glm.R: stop("cannot find valid starting values: please specify some",     call. = FALSE)
+#: R/family.R:0 R/glm.R:0
+msgid "cannot find valid starting values: please specify some"
 msgstr ""
-"długość 'start' powinna równać się %d i odnosić się do współczynników "
-"początkowych dla %s"
+"nie można znaleźć poprawnych wartości startowych; proszę określić kilka"
 
-# stats/R/glm.R: 223
-# stop("NAs in V(mu)")
-msgid "NAs in V(mu)"
-msgstr "wartości NA w 'V(mu)'"
+#. R/zzModels.R: stop("cannot fit an asymptotic regression model to these data")
+#: R/zzModels.R:0
+msgid "cannot fit an asymptotic regression model to these data"
+msgstr "nie można dopasować modelu regresji asymptotycznej do tych danych"
 
-# stats/R/glm.R: 225
-# stop("0s in V(mu)")
-msgid "0s in V(mu)"
-msgstr "zera w 'V(mu)'"
+#. R/HoltWinters.R: stop("cannot fit models without level ('alpha' must not be 0 or FALSE)")
+#: R/HoltWinters.R:0
+msgid "cannot fit models without level ('alpha' must not be 0 or FALSE)"
+msgstr ""
+"nie można dopasować do modeli bez poziomu ('alpha' nie może być zerem lub "
+"wartością FALSE)"
 
-# stats/R/glm.R: 228
-# stop("NAs in d(mu)/d(eta)")
-msgid "NAs in d(mu)/d(eta)"
-msgstr "wartości NA w 'd(mu)/d(eta)'"
+#. R/cor.R: stop("cannot handle 'pairwise.complete.obs'")
+#: R/cor.R:0
+msgid "cannot handle 'pairwise.complete.obs'"
+msgstr "nie można obsłużyć 'pairwise.complete.obs'"
 
-# stats/R/glm.R: 234
-# warning(gettextf("no observations informative at iteration %d",
-#                                  iter), domain = NA)
-msgid "no observations informative at iteration %d"
-msgstr "brak obserwacji informacyjnych w iteracji %d"
+#. R/ts.R: stop("cannot plot more than 10 series as \"multiple\"")
+#: R/ts.R:0
+msgid "cannot plot more than 10 series as \"multiple\""
+msgstr "nie można narysować więcej niż 10 szeregów jako 'multiple'"
 
-# stats/R/glm.R: 246
-# warning(gettextf("non-finite coefficients at iteration %d", iter), domain = NA)
-msgid "non-finite coefficients at iteration %d"
-msgstr "nieskończone współczynniki w %d iteracji"
+#. R/nls-profile.R: stop("cannot recognize parameter name")
+#: R/nls-profile.R:0
+msgid "cannot recognize parameter name"
+msgstr "nie można rozpoznać nazwy parametru"
 
-# stats/R/glm.R: 266
-# stop("no valid set of coefficients has been found: please supply starting values", call. = FALSE)
-# stats/R/glm.R: 285
-# stop("no valid set of coefficients has been found: please supply starting values", call. = FALSE)
-msgid ""
-"no valid set of coefficients has been found: please supply starting values"
+#. R/prcomp.R: stop("cannot rescale a constant/zero column to unit variance")
+#: R/prcomp.R:0
+msgid "cannot rescale a constant/zero column to unit variance"
 msgstr ""
-"nie znaleziono poprawnego zestawu współczynników: proszę dostarczyć wartości "
-"początkowe"
+"nie można przeskalować kolumny stałych wartości/zer na jednostkową wariancję"
 
-# stats/R/glm.R: 267
-# warning("step size truncated due to divergence", call. = FALSE)
-msgid "step size truncated due to divergence"
-msgstr "rozmiar kroku został przycięty ze względu na rozbieżność"
+#. R/family.R: stop("cannot simulate from non-integer prior.weights")
+#: R/family.R:0
+msgid "cannot simulate from non-integer prior.weights"
+msgstr "nie można symulować z niecałkowitych 'prior.weights'"
 
-# stats/R/glm.R: 271
-# stop("inner loop 1; cannot correct step size", call. = FALSE)
-msgid "inner loop 1; cannot correct step size"
-msgstr "wewnętrzna pętla 1; nie można poprawić rozmiaru kroku"
+#. R/princomp.R: stop("cannot use 'cor = TRUE' with a constant variable")
+#: R/princomp.R:0
+msgid "cannot use 'cor = TRUE' with a constant variable"
+msgstr "nie można użyć 'cor=TRUE' ze zmienną przyjmującą stałą wartość"
 
-# stats/R/glm.R: 286
-# warning("step size truncated: out of bounds", call. = FALSE)
-msgid "step size truncated: out of bounds"
-msgstr "rozmiar kroku został przycięty: poza granicami"
+#. R/ftable.R: stop("cannot use dots in formula with given data")
+#: R/ftable.R:0
+msgid "cannot use dots in formula with given data"
+msgstr "nie można używać kropek w formule z zadanymi danymi"
 
-# stats/R/glm.R: 290
-# stop("inner loop 2; cannot correct step size", call. = FALSE)
-msgid "inner loop 2; cannot correct step size"
-msgstr "wewnętrzna pętla 2; nie można poprawić rozmiaru kroku"
+#. R/smspline.R: stop("cannot use more inner knots than unique 'x' values")
+#: R/smspline.R:0
+msgid "cannot use more inner knots than unique 'x' values"
+msgstr "nie można użyć więcej wewnętrznych węzłów niż unikalnych wartości 'x'"
 
-# stats/R/glm.R: 313
-# warning("glm.fit: algorithm did not converge", call. = FALSE)
-msgid "glm.fit: algorithm did not converge"
-msgstr "glm.fit: algorytm nie zbiegł się"
+#. R/kernel.R: stop("coefficients do not add to 1")
+#: R/kernel.R:0
+msgid "coefficients do not add to 1"
+msgstr "współczynniki nie sumują się do 1"
 
-# stats/R/glm.R: 315
-# warning("glm.fit: algorithm stopped at boundary value", call. = FALSE)
-msgid "glm.fit: algorithm stopped at boundary value"
-msgstr "glm.fit: algorytm zatrzymał się na wartości granicznej"
+#. R/approx.R: warning("collapsing to unique 'x' values")
+#: R/approx.R:0
+msgid "collapsing to unique 'x' values"
+msgstr "zwijanie do unikalnych wartości 'x'"
 
-# stats/R/glm.R: 319
-# warning("glm.fit: fitted probabilities numerically 0 or 1 occurred", call. = FALSE)
-msgid "glm.fit: fitted probabilities numerically 0 or 1 occurred"
+#. R/dendrogram.R: stop("column dendrogram ordering gave index of wrong length")
+#: R/dendrogram.R:0
+msgid "column dendrogram ordering gave index of wrong length"
 msgstr ""
-"glm.fit: dopasowane prawdopodobieństwa numerycznie okazały się być 0 lub 1"
+"porządkowanie drzewa celu względem kolumn zwróciło indeks o niepoprawnej "
+"długości"
 
-# stats/R/glm.R: 323
-# warning("glm.fit: fitted rates numerically 0 occurred", call. = FALSE)
-msgid "glm.fit: fitted rates numerically 0 occurred"
-msgstr "glm.fit: dopasowane stosunki numerycznie okazały się być 0"
+#. R/aov.R: stop("columns of 'contrast.obj' must define a contrast (sum to zero)")
+#: R/aov.R:0
+msgid "columns of 'contrast.obj' must define a contrast (sum to zero)"
+msgstr "kolumny 'contrast.obj' muszą określać konstrast (sumować się do zera)"
 
-# stats/R/glm.R: 415
-# warning("the following arguments to 'anova.glm' are invalid and dropped: ",
-# 		paste(deparse(dotargs[named]), collapse=", "))
-msgid "the following arguments to 'anova.glm' are invalid and dropped:"
-msgstr ""
-"następujące argumenty przekazane do 'anova.glm' są niepoprawne i zostały "
-"pominięte:"
-
-# stats/R/plot.lm.R: 35
-# warning(gettextf("not plotting observations with leverage one:\n  %s",
-#                              paste(which(isInf), collapse=", ")),
-#                     call. = FALSE, domain = NA)
-# stats/R/nlminb.R: 85
-# warning(sprintf(ngettext(length(nap),
-#                                      "unrecognized control element named %s ignored",
-#                                      "unrecognized control elements named %s ignored"),
-#                             paste(sQuote(nms[nap]), collapse = ", ")),
-#                     domain = NA)
-# stats/R/model.tables.R: 324
-# warning(gettextf("non-factors ignored: %s",
-#                              paste(names(nn), collapse = ", ")),
-#                     domain = NA)
-# stats/R/nls.R: 405
-# warning(sprintf(ngettext(length(nap),
-#                                      "unrecognized control element named %s ignored",
-#                                      "unrecognized control elements named %s ignored"),
-#                             paste(nms[nap], collapse = ", ")),
-#                     domain = NA)
-# stats/R/nls.R: 509
-# warning("No starting values specified for some parameters.\n",
-#                         "Initializing ", paste(sQuote(nnn), collapse=", "),
-#                         " to '1.'.\n",
-#                         "Consider specifying 'start' or using a selfStart model", domain = NA)
-# stats/R/nls.R: 518
-# stop(gettextf("parameters without starting value in 'data': %s",
-#                               paste(nnn, collapse=", ")), domain = NA)
-# stats/R/nls.R: 525
-# message(sprintf(ngettext(sum(np == -1),
-#                                      "fitting parameter %s without any variables",
-#                                      "fitting parameters %s without any variables"),
-#                             paste(sQuote(pnames[np == -1]), collapse=", ")),
-#                     domain = NA)
-# stats/R/family.R: 150
-# stop(gettextf('link "%s" not available for poisson family; available links are %s',
-# 			  linktemp, paste(sQuote(okLinks), collapse =", ")),
-# 		 domain = NA)
-# stats/R/family.R: 211
-# stop(gettextf('link "%s" not available for quasipoisson family; available links are %s',
-# 			  linktemp, paste(sQuote(okLinks), collapse =", ")),
-# 		 domain = NA)
-# stats/R/family.R: 262
-# stop(gettextf('link "%s" not available for gaussian family; available links are %s',
-# 			  linktemp, paste(sQuote(okLinks), collapse =", ")),
-# 		 domain = NA)
-# stats/R/family.R: 309
-# stop(gettextf('link "%s" not available for binomial family; available links are %s',
-# 			  linktemp, paste(sQuote(okLinks), collapse =", ")),
-# 	     domain = NA)
-# stats/R/family.R: 407
-# stop(gettextf('link "%s" not available for quasibinomial family; available links are %s',
-# 			  linktemp, paste(sQuote(okLinks), collapse =", ")),
-# 	     domain = NA)
-# stats/R/family.R: 460
-# stop(gettextf('link "%s" not available for gamma family; available links are %s',
-# 			  linktemp, paste(sQuote(okLinks), collapse =", ")),
-# 	     domain = NA)
-# stats/R/family.R: 518
-# stop(gettextf('link "%s" not available for inverse.gaussian family; available links are %s',
-# 			  linktemp, paste(sQuote(okLinks), collapse =", ")),
-#                  domain = NA)
-# stats/R/add.R: 640
-# stop(sprintf(ngettext(sum(where==0),
-#                                       "lower scope has term %s not included in model",
-#                                       "lower scope has terms %s not included in model"),
-#                              paste(sQuote(nmdrop[where==0]), collapse=", ")),
-#                      domain = NA)
-# stats/R/add.R: 670
-# stop(sprintf(ngettext(sum(where==0),
-#                                       "upper scope has term %s not included in model",
-#                                       "upper scope has terms %s not included in model"),
-#                              paste(sQuote(nmdrop[where==0]), collapse=", ")),
-#                      domain = NA)
-# stats/R/lm.R: 114
-# warning("extra arguments ", paste(sQuote(names(dots)), sep=", "),
-#                 " are disregarded.", domain = NA)
-# stats/R/lm.R: 173
-# warning("extra arguments ", paste(sQuote(names(dots)), sep=", "),
-#                 " are disregarded.", domain = NA)
-# stats/R/aov.R: 319
-# stop(sprintf(ngettext(na,
-#                                       "unknown name %s in the 'split' list",
-#                                       "unknown names %s in the 'split' list"),
-#                              paste(sQuote(ns[na]), collapse = ", ")),
-#                      domain = NA)
-# stats/R/optim.R: 52
-# warning("unknown names in control: ", paste(noNms,collapse=", "))
-# stats/R/lsfit.R: 62
-# stop(sprintf(paste0(ngettext(nrx,
-#                        "'X' matrix has %d case (row)",
-#                        "'X' matrix has %d cases (rows)"),
-#               ", ",
-#               ngettext(nry,
-#                        "'Y' has %d case (row)",
-#                        "'Y' has %d cases (rows)")),
-#                        nrx, nry),
-#                        domain = NA)
-# stats/R/lsfit.R: 72
-# stop(sprintf(paste0(ngettext(nry,
-#                               "only %d case",
-#                               "only %d cases"),
-#                      ", ",
-#                      ngettext(ncx,
-#                               "but %d variable",
-#                               "but %d variables")),
-#                      nry, ncx),
-#              domain = NA)
-# stats/R/acf.R: 176
-# message("Page [",I,",",J,"]: i =",
-#                     paste(iind,collapse=","),"; j =",
-#                     paste(jind,collapse=","), domain = NA)
-# stats/R/diffinv.R: 81
-# warning(sprintf(ngettext(na,
-#                                  "extra argument %s will be disregarded",
-#                                  "extra arguments %s will be disregarded"),
-#                         paste(sQuote(names(list(...))), collapse = ", ")),
-# 		domain = NA)
-# stats/R/models.R: 307
-# stop(gettextf(
-#     "variables %s were specified with different types from the fit",
-#                  paste(sQuote(names(old)[wrong]), collapse=", ")),
-#                  call. = FALSE, domain = NA)
-# stats/R/models.R: 445
-# stop(sprintf(ngettext(length(m),
-#                                               "factor %s has new level %s",
-#                                               "factor %s has new levels %s"),
-#                                      nm, paste(nxl[m], collapse=", ")),
-#                              domain = NA)
-# stats/R/glm.R: 204
-# stop(gettextf("length of 'start' should equal %d and correspond to initial coefs for %s", nvars, paste(deparse(xnames), collapse=", ")),
-#                          domain = NA)
-# stats/R/glm.R: 415
-# warning("the following arguments to 'anova.glm' are invalid and dropped: ",
-# 		paste(deparse(dotargs[named]), collapse=", "))
-# stats/R/dendrogram.R: 640
-# stop(sprintf(msg, paste(nms, collapse=", "), "dendrogram"),
-#                  domain = NA)
-# stats/R/reshape.R: 177
-# warning(gettextf("some constant variables (%s) are really varying",
-#                                  paste(names(rval)[!really.constant],collapse = ",")), domain = NA)
-# stats/R/aggregate.R: 141
-# sprintf("cbind(%s)",
-#         ##              paste(setdiff(names(data), rhs), collapse = ","))
-# stats/R/selfStart.R: 45
-# stop(sprintf(ngettext(sum(msng),
-#                        "parameter %s does not occur in the model formula",
-#                        "parameters %s do not occur in the model formula"),
-#                          paste(sQuote(parameters[msng]), collapse=", ")),
-#                  domain = NA)
-msgid ","
-msgstr ","
-
-# stats/R/glm.R: 535
-# warning(gettextf("using F test with a '%s' family is inappropriate",
-#                                  fam),
-#                         domain = NA)
-# stats/R/glm.R: 625
-# warning(gettextf("using F test with a '%s' family is inappropriate",
-#                                  fam),
-#                         domain = NA, call. = FALSE)
-msgid "using F test with a '%s' family is inappropriate"
-msgstr "używanie testu Fishera z rodziną '%s' jest niepoprawne"
+#. R/aov.R: stop("columns of 'contrast.obj' must define a contrast(sum to zero)")
+#: R/aov.R:0
+msgid "columns of 'contrast.obj' must define a contrast(sum to zero)"
+msgstr "kolumny 'contrast.obj' muszą określać kontrast (sumować się do zera)"
 
-# stats/R/glm.R: 539
-# warning("using F test with a fixed dispersion is inappropriate")
-# stats/R/glm.R: 629
-# warning("using F test with a fixed dispersion is inappropriate")
-msgid "using F test with a fixed dispersion is inappropriate"
-msgstr "używanie testu Fishera z ustaloną dyspersją jest niepoprawne"
+#. R/contrast.R: stop("contrasts apply only to factors")
+#. R/contrast.R: stop("contrasts apply only to factors")
+#: R/contrast.R:0
+msgid "contrasts apply only to factors"
+msgstr "kontrasty mają zastosowanie jedynie do czynników"
 
-# stats/R/nls.R: 862
-# warning(gettextf("models with response %s removed because response differs from model 1",
-#                          sQuote(deparse(responses[!sameresp]))),
-#                 domain = NA)
-# stats/R/lm.R: 608
-# warning(gettextf("models with response %s removed because response differs from model 1",
-#                          sQuote(deparse(responses[!sameresp]))),
-#                 domain = NA)
-# stats/R/loess.R: 483
-# warning(gettextf("models with response %s removed because response differs from model 1",
-#                          sQuote(deparse(responses[!sameresp]))),
-#                 domain = NA)
-# stats/R/mlm.R: 436
-# warning(gettextf("models with response %s removed because response differs from model 1",
-#                          sQuote(deparse(responses[!sameresp]))),
-#                 domain = NA)
-# stats/R/glm.R: 561
-# warning(gettextf("models with response %s removed because response differs from model 1",
-#                          sQuote(deparse(responses[!sameresp]))),
-#                 domain = NA)
-msgid "models with response %s removed because response differs from model 1"
+#. R/contrast.R: stop("contrasts can be applied only to factors with 2 or more levels")
+#: R/contrast.R:0
+msgid "contrasts can be applied only to factors with 2 or more levels"
 msgstr ""
-"modele ze zmienną zależną %s zostały usunięte, ponieważ zmienna zależna "
-"różni się od tego w modelu 1"
+"kontrasty można zastosować jedynie do czynników z dwoma lub więcej poziomami"
 
-# stats/R/lm.R: 615
-# stop("models were not all fitted to the same size of dataset")
-# stats/R/mlm.R: 443
-# stop("models were not all fitted to the same size of dataset")
-# stats/R/glm.R: 568
-# stop("models were not all fitted to the same size of dataset")
-msgid "models were not all fitted to the same size of dataset"
-msgstr ""
-"nie wszystkie modele zostały dopasowane do zbioru danych tego samego rozmiaru"
+#. R/contr.poly.R: gettextf("contrasts not defined for %d degrees of freedom", n -     1)
+#. R/contrast.R: gettextf("contrasts not defined for %d degrees of freedom", n -     1L)
+#: R/contr.poly.R:0 R/contrast.R:0
+msgid "contrasts not defined for %d degrees of freedom"
+msgstr "kontrasty nie są zdefiniowane dla %d stopni swobody"
 
-# stats/R/glm.R: 651
-# warning("observations with zero weight not used for calculating dispersion")
-msgid "observations with zero weight not used for calculating dispersion"
-msgstr ""
-"obserwacje z zerową wagą nie zostały użyte podczas kalkulacji dyspersji"
+#. R/nlm.R: stop("convergence problem in zero finding: ", conditionMessage(val))
+#: R/nlm.R:0
+msgid "convergence problem in zero finding:"
+msgstr "problem zbieżności podczas znajdywania zer"
 
-msgid ""
-"The \"ward\" method has been renamed to \"ward.D\"; note new \"ward.D2\""
-msgstr ""
+#. R/arma0.R: warning("converting non-invertible initial MA values")
+#: R/arma0.R:0
+msgid "converting non-invertible initial MA values"
+msgstr "konwertowanie nieodwracalnych wartości początkowych kroczącej średniej"
 
-# stats/R/hclust.R: 51
-# stop("invalid clustering method")
-msgid "invalid clustering method"
-msgstr "niepoprawna metoda grupowania"
+#. R/princomp.R: stop("covariance matrix is not non-negative definite")
+#: R/princomp.R:0
+msgid "covariance matrix is not non-negative definite"
+msgstr "macierz kowariancji nie jest nieujemnie określona"
 
-# stats/R/hclust.R: 53
-# stop("ambiguous clustering method")
-msgid "ambiguous clustering method"
-msgstr "niejednoznaczna metoda grupowania"
+#. R/spectrum.R: stop("coverage probability out of range [0,1)")
+#: R/spectrum.R:0
+msgid "coverage probability out of range [0,1)"
+msgstr "prawdopodobieństwo pokrycia poza przedziałem [0,1)"
 
-# stats/R/hclust.R: 57
-# stop("invalid dissimilarities")
-msgid "invalid dissimilarities"
-msgstr "niepoprawne odmienności"
+#. R/smspline.R: warning("cross-validation with non-unique 'x' values seems doubtful")
+#: R/smspline.R:0
+msgid "cross-validation with non-unique 'x' values seems doubtful"
+msgstr "krzyżowa walidacja z nieunikalnymi wartościami 'x' wydaje się wątpliwa"
 
-# stats/R/hclust.R: 58
-# stop("size cannot be NA nor exceed 65536")
-msgid "size cannot be NA nor exceed 65536"
-msgstr "rozmiar nie może wynosić NA ani też przekraczać wartość 65536"
+#. R/t.test.R: stop("data are essentially constant")
+#. R/t.test.R: stop("data are essentially constant")
+#: R/t.test.R:0
+msgid "data are essentially constant"
+msgstr "dane są w zasadzie stałe"
 
-# stats/R/hclust.R: 60
-# stop("must have n >= 2 objects to cluster")
-msgid "must have n >= 2 objects to cluster"
-msgstr "co najmniej 2 obiekty są potrzebne aby móc grupować"
+#. R/HoltWinters.R: stop("data must be non-zero for multiplicative Holt-Winters")
+#: R/HoltWinters.R:0
+msgid "data must be non-zero for multiplicative Holt-Winters"
+msgstr "dane muszą być niezerowe dla multiplikatywnego modelu Holta-Wintersa"
 
-# stats/R/hclust.R: 69
-# stop("invalid length of members")
-msgid "invalid length of members"
-msgstr "niepoprawna długość argumentu 'members'"
+#. R/dendrogram.R: gettextf("dendrogram entries must be 1,2,..,%d (in any order), to be coercible to \"hclust\"",     n)
+#: R/dendrogram.R:0
+msgid ""
+"dendrogram entries must be 1,2,..,%d (in any order), to be coercible to "
+"\"hclust\""
+msgstr ""
+"wpisy dendrogramu muszą wynosić 1,2,..,%d (w dowolnej kolejności), aby mogły "
+"być przekształcale na obiekt klasy \"hclust\""
 
-# stats/R/hclust.R: 115
-# stop("invalid dendrogram")
-msgid "invalid dendrogram"
-msgstr "niepoprawne drzewo celów"
-
-# stats/R/hclust.R: 118
-# stop("'merge' component in dendrogram must be integer")
-msgid "'merge' component in dendrogram must be integer"
-msgstr "komponent 'merge' w drzewie celu musi być liczbą całkowitą"
-
-# stats/R/hclust.R: 159
-# stop(gettextf("argument 'x' cannot be coerced to class %s",
-#                       dQuote("hclust")),
-#              if(!is.null(oldClass(x)))
-#              gettextf("\n Consider providing an as.hclust.%s() method",
-#                       oldClass(x)[1L]),
-#              domain = NA)
-msgid "argument 'x' cannot be coerced to class %s"
-msgstr "argument 'x' nie może zostać przekształcony w klasę %s"
+#. R/dendrogram.R: stop("dendrogram node with non-positive #{branches}")
+#: R/dendrogram.R:0
+msgid "dendrogram node with non-positive #{branches}"
+msgstr "węzeł drzewa celów z wartościami nie-dodatnimi #{gałęziami}"
 
-msgid "Consider providing an as.hclust.%s() method"
-msgstr "rozważ dostarczenie metody 'as.hclust.%s()'"
+#. R/dendrogram.R: stop("dendrogram non-leaf node with non-positive #{branches}")
+#: R/dendrogram.R:0
+msgid "dendrogram non-leaf node with non-positive #{branches}"
+msgstr "bezliściowy węzeł drzewa celu z wartościami nie-dodatnimi #{gałęziami}"
 
-# stats/R/hclust.R: 232
-# stop("need dendrograms where all leaves have labels")
-msgid "need dendrograms where all leaves have labels"
-msgstr "potrzeba drzew celu, gdzie liście nie posiadają etykiet"
+#. R/model.tables.R: stop("design is unbalanced so cannot proceed")
+#: R/model.tables.R:0
+msgid "design is unbalanced so cannot proceed"
+msgstr "projekt nie jest zrównoważony, dlatego też nie można kontynuować"
 
-# stats/R/identify.hclust.R: 23
-# stop("'k' and 'h' must be a scalar")
-msgid "'k' and 'h' must be a scalar"
-msgstr "argumenty 'k' oraz 'h' muszą być skalarami"
+#. R/cor.R: warning("diag(.) had 0 or NA entries; non-finite result is doubtful")
+#: R/cor.R:0
+msgid "diag(.) had 0 or NA entries; non-finite result is doubtful"
+msgstr "'diag(.)' miał 0 lub wpisy NA; nieskończony rezultat jest wątpliwy"
 
-# stats/R/identify.hclust.R: 27
-# stop("specify exactly one of 'k' and 'h'")
-# stats/R/identify.hclust.R: 33
-# stop("specify exactly one of 'k' and 'h'")
-msgid "specify exactly one of 'k' and 'h'"
-msgstr "określ dokładnie jeden z 'k' oraz 'h'"
+#. R/nlm.R: if (doX) "did not succeed extending the interval endpoints for f(lower) * f(upper) <= 0" else "f() values at end points not of opposite sign"
+#: R/nlm.R:0
+msgid ""
+"did not succeed extending the interval endpoints for f(lower) * f(upper) <= 0"
+msgstr ""
+"nie udało się rozszerzenie końców przedziału dla f(dolny) * f(górny) <= 0"
 
-# stats/R/identify.hclust.R: 36
-# stop(gettextf("k must be between 2 and %d", length(tree$height)),
-#              domain = NA)
-msgid "k must be between 2 and %d"
-msgstr "elementy 'k' muszą być pomiędzy 2 a %d"
+#. R/cancor.R: stop("dimension 0 in 'x' or 'y'")
+#: R/cancor.R:0
+msgid "dimension 0 in 'x' or 'y'"
+msgstr "zerowy wymiar w argumencie 'x' lub 'y'"
 
-# stats/R/identify.hclust.R: 48
-# stop("specify exactly one of 'which' and 'x'")
-msgid "specify exactly one of 'which' and 'x'"
-msgstr "określ dokładnie jeden z 'which' oraz 'x'"
+#. R/cmdscale.R: stop("distances must be result of 'dist' or a square matrix")
+#: R/cmdscale.R:0
+msgid "distances must be result of 'dist' or a square matrix"
+msgstr "odległości muszą być wynikiem 'dist' lub być kwadratową macierzą"
 
-# stats/R/identify.hclust.R: 58
-# stop(gettextf("all elements of 'which' must be between 1 and %d", k),
-#              domain = NA)
-msgid "all elements of 'which' must be between 1 and %d"
-msgstr "wszystkie elementy 'which' muszą być pomiędzy 1 a %d"
+#. R/mantelhaen.test.R: stop("each dimension in table must be >= 2")
+#: R/mantelhaen.test.R:0
+msgid "each dimension in table must be >= 2"
+msgstr "każdy wymiar w tabeli musi być >= 2"
 
-# stats/R/integrate.R: 29
-# stop("invalid parameter values")
-msgid "invalid parameter values"
-msgstr "niepoprawne wartości parametrów"
-
-# stats/R/integrate.R: 37
-# stop("a limit is missing")
-msgid "a limit is missing"
-msgstr "brakuje co najmniej jednej granicy całkowania"
+#. R/aov.R: gettextf("each element of '%s' must be logical", substitute(contrasts.list))
+#. R/aov.R: gettextf("each element of '%s' must be logical", substitute(contrasts.obj))
+#: R/aov.R:0
+msgid "each element of '%s' must be logical"
+msgstr "każdy element '%s' musi być elementem logicznym"
 
-# stats/R/isoreg.R: 26
-# stop("missing values not allowed")
-msgid "missing values not allowed"
-msgstr "brakujące wartości są niedozwolone"
+#. R/model.tables.R: stop("eff.aovlist: non-orthogonal contrasts would give an incorrect answer")
+#: R/model.tables.R:0
+msgid "eff.aovlist: non-orthogonal contrasts would give an incorrect answer"
+msgstr "eff.aovlist: nieortogonalne kontrasty dałyby niepoprawną odpowiedź"
 
-# stats/R/kernel.R: 53
-# stop ("'r' is less than 1")
-msgid "'r' is less than 1"
-msgstr "wartość argumentu 'r' jest mniejsza niż 1"
+#. R/cmdscale.R: warning("eig=TRUE is disregarded when list.=FALSE")
+#: R/cmdscale.R:0
+msgid "eig=TRUE is disregarded when list.=FALSE"
+msgstr "'eig=TRUE' jest nieuwzględniane gdy 'list.=FALSE'"
 
-# stats/R/kernel.R: 54
-# stop ("'m' is less than 1")
-# stats/R/kernel.R: 67
-# stop ("'m' is less than 1")
-msgid "'m' is less than 1"
-msgstr "wartość argumentu 'm' jest mniejsza niż 1"
+#. R/cutree.R: stop("either 'k' or 'h' must be specified")
+#: R/cutree.R:0
+msgid "either 'k' or 'h' must be specified"
+msgstr "jedno z 'k' lub 'h' musi zostać określone"
 
-# stats/R/kernel.R: 66
-# stop ("'r' is less than 0")
-msgid "'r' is less than 0"
-msgstr "wartość argumentu 'r' jest mniejsza niż 0"
+#. R/cutree.R: gettextf("elements of 'k' must be between 1 and %d", n)
+#: R/cutree.R:0
+msgid "elements of 'k' must be between 1 and %d"
+msgstr "elementy 'k' muszą być pomiędzy 1 a %d"
 
-# stats/R/kernel.R: 79
-# stop("'m' must be numeric with non-negative integers")
-msgid "'m' must be numeric with non-negative integers"
-msgstr "argument 'm' musi być wektorem z nieujemnymi liczbami całkowitymi"
+#. R/prop.test.R: stop("elements of 'n' must be positive")
+#: R/prop.test.R:0
+msgid "elements of 'n' must be positive"
+msgstr "elementy 'n' muszą być dodatnie"
 
-# stats/R/kernel.R: 87
-# stop("unknown named kernel")
-msgid "unknown named kernel"
-msgstr "nieznane nazwane jądro"
+#. R/prop.test.R: stop("elements of 'p' must be in (0,1)")
+#: R/prop.test.R:0
+msgid "elements of 'p' must be in (0,1)"
+msgstr "elementy 'p' muszą być w przedziale (0,1)"
 
-# stats/R/kernel.R: 90
-# stop ("'coef' must be a vector")
-msgid "'coef' must be a vector"
-msgstr "argument 'coef' musi być wektorem"
+#. R/prop.test.R: stop("elements of 'x' must be nonnegative")
+#: R/prop.test.R:0
+msgid "elements of 'x' must be nonnegative"
+msgstr "elementy 'x' muszą być nieujemne"
 
-# stats/R/kernel.R: 92
-# stop ("'coef' does not have the correct length")
-msgid "'coef' does not have the correct length"
-msgstr "argument 'coef' nie ma poprawnej długości"
+#. R/prop.test.R: stop("elements of 'x' must not be greater than those of 'n'")
+#: R/prop.test.R:0
+msgid "elements of 'x' must not be greater than those of 'n'"
+msgstr "elementy 'x' nie mogą być większe niż elementy 'n'"
 
-# stats/R/kernel.R: 99
-# stop ("coefficients do not add to 1")
-msgid "coefficients do not add to 1"
-msgstr "współczynniki nie sumują się do 1"
+#. R/kmeans.R: stop("empty cluster: try a better set of initial centers", call. = FALSE)
+#. R/kmeans.R: warning("empty cluster: try a better set of initial centers",     call. = FALSE)
+#. R/kmeans.R: warning("empty cluster: try a better set of initial centers",     call. = FALSE)
+#: R/kmeans.R:0
+msgid "empty cluster: try a better set of initial centers"
+msgstr "pusta grupa: spróbuj lepszego zestawu początkowych centrów"
 
-# stats/R/kernel.R: 154
-# stop ("'k' is not a kernel")
-# stats/R/kernel.R: 197
-# stop ("'k' is not a kernel")
-msgid "'k' is not a kernel"
-msgstr "argument 'k' nie jest jądrem"
+#. R/ARMAtheory.R: stop("empty model supplied")
+#: R/ARMAtheory.R:0
+msgid "empty model supplied"
+msgstr "dostarczono pusty model"
 
-# stats/R/kernel.R: 157
-# stop ("'x' is shorter than kernel 'k'")
-msgid "'x' is shorter than kernel 'k'"
-msgstr "'x' jest krótsze niż jądro 'k'"
+#. R/lm.R: warning("essentially perfect fit: summary may be unreliable")
+#: R/lm.R:0
+msgid "essentially perfect fit: summary may be unreliable"
+msgstr "idealne dopasowanie: podsumowanie może nie być wiarygodne"
 
-# stats/R/kernel.R: 180
-# stop ("'kernapply' is not available for object 'x'")
-msgid "'kernapply' is not available for object 'x'"
-msgstr "'kernapply' nie jest dostępny dla obiektu 'x'"
+#. R/power.anova.test.R: stop("exactly one of 'groups', 'n', 'between.var', 'within.var', 'power', and 'sig.level' must be NULL")
+#: R/power.anova.test.R:0
+msgid ""
+"exactly one of 'groups', 'n', 'between.var', 'within.var', 'power', and 'sig."
+"level' must be NULL"
+msgstr ""
+"dokładnie jeden z 'groups', 'n', 'between.var', 'within.var', 'power', oraz "
+"'sig.level' musi mieć wartość NULL"
 
-# stats/R/kernel.R: 195
-# stop ("'x' is not a kernel")
-msgid "'x' is not a kernel"
-msgstr "argument 'x' nie jest jądrem"
+#. R/power.R: stop("exactly one of 'n', 'delta', 'sd', 'power', and 'sig.level' must be NULL")
+#: R/power.R:0
+msgid ""
+"exactly one of 'n', 'delta', 'sd', 'power', and 'sig.level' must be NULL"
+msgstr ""
+"dokładnie jeden z 'groups', 'n', 'between.var', 'within.var', 'power', oraz "
+"'sig.level' musi mieć wartość NULL"
 
-# stats/R/kmeans.R: 37
-# stop("empty cluster: try a better set of initial centers",
-#                            call. = FALSE)
-# stats/R/kmeans.R: 65
-# warning("empty cluster: try a better set of initial centers",
-# 			call.=FALSE)
-# stats/R/kmeans.R: 77
-# warning("empty cluster: try a better set of initial centers",
-#                         call.=FALSE)
-msgid "empty cluster: try a better set of initial centers"
-msgstr "pusta grupa: spróbuj lepszego zestawu początkowych centrów"
+#. R/power.R: stop("exactly one of 'n', 'p1', 'p2', 'power', and 'sig.level' must be NULL")
+#: R/power.R:0
+msgid "exactly one of 'n', 'p1', 'p2', 'power', and 'sig.level' must be NULL"
+msgstr ""
+"dokładnie jeden z 'n', 'p1', 'p2', 'power', oraz 'sig.level' musi mieć "
+"wartość NULL"
 
-# stats/R/kmeans.R: 42
-# stop("number of cluster centres must lie between 1 and nrow(x)",
-#                            call.=FALSE)
-msgid "number of cluster centres must lie between 1 and nrow(x)"
-msgstr "liczba centrów grup musi leżeć pomiędzy 1 a 'nrow(x)'"
+#. R/ts.R: warning("extending time series when replacing values", call. = FALSE)
+#: R/ts.R:0
+msgid "extending time series when replacing values"
+msgstr "rozszerzanie szeregów czasowych przy wymianie wartości"
 
-# stats/R/kmeans.R: 45
-# warning(gettextf("Quick-TRANSfer stage steps exceeded maximum (= %d)",
-#                                        isteps.Qtran),
-#                               call.=FALSE)
-msgid "Quick-TRANSfer stage steps exceeded maximum (= %d)"
-msgstr "Kroki etapu Quick-TRANSfer przekroczyły maksimum (= %d)"
+#. R/logLik.R: warning("extra arguments discarded")
+#: R/logLik.R:0
+msgid "extra arguments discarded"
+msgstr "dodatkowe argumenty zostały odrzucone"
 
-# stats/R/kmeans.R: 84
-# stop("invalid nrow(x)")
-msgid "invalid nrow(x)"
-msgstr "niepoprawna wartość 'nrow(x)'"
+#. R/nlm.R: if (doX) "did not succeed extending the interval endpoints for f(lower) * f(upper) <= 0" else "f() values at end points not of opposite sign"
+#: R/nlm.R:0
+msgid "f() values at end points not of opposite sign"
+msgstr "wartości 'f()' na końcach nie są przeciwnego znaku"
 
-# stats/R/kmeans.R: 86
-# stop("invalid ncol(x)")
-msgid "invalid ncol(x)"
-msgstr "niepoprawna wartość 'ncol(x)'"
+#. R/nlm.R: stop("f.lower = f(lower) is NA")
+#: R/nlm.R:0
+msgid "f.lower = f(lower) is NA"
+msgstr "'f.lower = f(lower)' ma wartość NA"
 
-# stats/R/kmeans.R: 88
-# stop("'centers' must be a number or a matrix")
-msgid "'centers' must be a number or a matrix"
-msgstr "'centers' musi być liczbą lub macierzą"
+#. R/nlm.R: stop("f.upper = f(upper) is NA")
+#: R/nlm.R:0
+msgid "f.upper = f(upper) is NA"
+msgstr "'f.upper = f(upper)' ma wartość NA"
 
-# stats/R/kmeans.R: 104
-# stop("more cluster centers than distinct data points.")
-msgid "more cluster centers than distinct data points."
-msgstr "więcej centrów grup niż odmiennych punktów danych."
+#. R/factanal.R: stop("factor analysis applies only to numerical variables")
+#. R/factanal.R: stop("factor analysis applies only to numerical variables")
+#: R/factanal.R:0
+msgid "factor analysis applies only to numerical variables"
+msgstr "analiza czynnikowa stosuje się tylko zmiennych liczbowych"
 
-# stats/R/kmeans.R: 110
-# stop("initial centers are not distinct")
-msgid "initial centers are not distinct"
-msgstr "początkowe centra nie są różne"
+#. R/factanal.R: stop("factor analysis requires at least three variables")
+#: R/factanal.R:0
+msgid "factor analysis requires at least three variables"
+msgstr "analiza czynnikowa wymaga przynajmniej trzech zmiennych"
 
-# stats/R/kmeans.R: 114
-# stop("more cluster centers than data points")
-msgid "more cluster centers than data points"
-msgstr "więcej centrów grup niż punktów danych"
+#. R/quantile.R: stop("factors are not allowed")
+#: R/quantile.R:0
+msgid "factors are not allowed"
+msgstr "czynniki nie są dozwolone"
 
-# stats/R/kmeans.R: 117
-# stop("'invalid value of 'k'")
-msgid "'invalid value of 'k'"
-msgstr "niepoprawna wartość 'k'"
+#. R/reshape.R: stop("failed to guess time-varying variables from their names")
+#: R/reshape.R:0
+msgid "failed to guess time-varying variables from their names"
+msgstr "nie udało się odgadnąć zmiennych zależnych od czasu z ich nazw"
 
-# stats/R/kmeans.R: 119
-# stop("'iter.max' must be positive")
-msgid "'iter.max' must be positive"
-msgstr "argument 'iter.max' musi być dodatni"
+#. R/lm.R: gettextf("family '%s' not implemented", fam)
+#: R/lm.R:0
+msgid "family '%s' not implemented"
+msgstr "rodzina '%s' nie jest zaimplementowana"
 
-# stats/R/kmeans.R: 121
-# stop("must have same number of columns in 'x' and 'centers'")
-msgid "must have same number of columns in 'x' and 'centers'"
-msgstr "potrzeba mieć tę samą liczbę kolumn w 'x' oraz 'centers'"
+#. R/loess.R: stop("first argument must be a \"loess\" object")
+#: R/loess.R:0
+msgid "first argument must be a \"loess\" object"
+msgstr "pierwszy argument musi być obiektem klasu \"loess\""
 
-# stats/R/ks.test.R: 28
-# stop("not enough 'x' data")
-msgid "not enough 'x' data"
-msgstr "zbyt mało danych 'x'"
+#. R/glm.R: warning("fitting to calculate the null deviance did not converge -- increase 'maxit'?")
+#: R/glm.R:0
+msgid ""
+"fitting to calculate the null deviance did not converge -- increase 'maxit'?"
+msgstr ""
+"dopasowanie aby wyliczyć zerowe odchylenie nie uzbieżniło się -- zwiększyć "
+"wartość 'maxit'?"
 
-# stats/R/ks.test.R: 37
-# stop("not enough 'y' data")
-msgid "not enough 'y' data"
-msgstr "zbyt mało danych 'y'"
+#. R/family.R: stop("for the 'binomial' family, y must be a vector of 0 and 1's\nor a 2 column matrix where col 1 is no. successes and col 2 is no. failures")
+#: R/family.R:0
+msgid ""
+"for the 'binomial' family, y must be a vector of 0 and 1's\n"
+"or a 2 column matrix where col 1 is no. successes and col 2 is no. failures"
+msgstr ""
+"dla rodziny 'binomial, argument 'y' musi być wektorem zer i jedynek lub 2 "
+"kolumnową macierzą, gdzie pierwsza kolumna jest liczbą sukcesów, a druga "
+"kolumna jest liczbą porażek"
 
-# stats/R/ks.test.R: 50
-# warning("p-value will be approximate in the presence of ties")
-msgid "p-value will be approximate in the presence of ties"
+#. R/family.R: stop("for the 'quasibinomial' family, y must be a vector of 0 and 1's\nor a 2 column matrix where col 1 is no. successes and col 2 is no. failures")
+#: R/family.R:0
+msgid ""
+"for the 'quasibinomial' family, y must be a vector of 0 and 1's\n"
+"or a 2 column matrix where col 1 is no. successes and col 2 is no. failures"
 msgstr ""
-"wartość prawdopodobieństwa w obecności powtórzonych wartości będzie "
-"przybliżona"
+"dla rodziny 'quasibinomial', argument 'y' musi być wektorem zer i jedynek "
+"lub 2 kolumnową macierzą, gdzie pierwsza kolumna jest liczbą sukcesów, a "
+"druga kolumna jest liczbą porażek"
 
-# stats/R/ks.test.R: 68
-# stop("'y' must be numeric or a function or a string naming a valid function")
-msgid "'y' must be numeric or a function or a string naming a valid function"
+#. R/nlsFunc.R: gettextf("formula '%s' must be of the form '~expr'", deparse(as.vector(object)))
+#: R/nlsFunc.R:0
+msgid "formula '%s' must be of the form '~expr'"
+msgstr "formuła '%s' musi mieć formę '~expr'"
+
+#. R/friedman.test.R: stop("formula missing")
+#: R/friedman.test.R:0
+msgid "formula missing"
+msgstr "brakuje argumentu 'formula'"
+
+#. R/StructTS.R: stop("frequency must be a positive integer >= 2 for BSM")
+#: R/StructTS.R:0
+msgid "frequency must be a positive integer >= 2 for BSM"
 msgstr ""
-"'y' musi być liczbą lub funkcją lub łańcuchem o poprawnej nazwie funkcji"
+"częstotliwość musi być dodatnią liczbą całkowitą >= 2 dla Podstawowego "
+"Modelowania Strukturalnego (BSM)"
 
-# stats/R/ks.test.R: 72
-# warning("ties should not be present for the Kolmogorov-Smirnov test")
-msgid "ties should not be present for the Kolmogorov-Smirnov test"
+#. R/glm.R: warning("glm.fit: algorithm did not converge", call. = FALSE)
+#: R/glm.R:0
+msgid "glm.fit: algorithm did not converge"
+msgstr "glm.fit: algorytm nie zbiegł się"
+
+#. R/glm.R: warning("glm.fit: algorithm stopped at boundary value", call. = FALSE)
+#: R/glm.R:0
+msgid "glm.fit: algorithm stopped at boundary value"
+msgstr "glm.fit: algorytm zatrzymał się na wartości granicznej"
+
+#. R/glm.R: warning("glm.fit: fitted probabilities numerically 0 or 1 occurred",     call. = FALSE)
+#: R/glm.R:0
+msgid "glm.fit: fitted probabilities numerically 0 or 1 occurred"
 msgstr ""
-"wartości powtórzone nie powinny być obecne w teście Kolmogorowa-Smirnowa"
+"glm.fit: dopasowane prawdopodobieństwa numerycznie okazały się być 0 lub 1"
+
+#. R/glm.R: warning("glm.fit: fitted rates numerically 0 occurred", call. = FALSE)
+#: R/glm.R:0
+msgid "glm.fit: fitted rates numerically 0 occurred"
+msgstr "glm.fit: dopasowane stosunki numerycznie okazały się być 0"
+
+#. R/ansari.test.R: stop("grouping factor must have exactly 2 levels")
+#. R/mood.test.R: stop("grouping factor must have exactly 2 levels")
+#. R/t.test.R: stop("grouping factor must have exactly 2 levels")
+#. R/var.test.R: stop("grouping factor must have exactly 2 levels")
+#. R/wilcox.test.R: stop("grouping factor must have exactly 2 levels")
+#: R/ansari.test.R:0 R/mood.test.R:0 R/t.test.R:0 R/var.test.R:0
+#: R/wilcox.test.R:0
+msgid "grouping factor must have exactly 2 levels"
+msgstr "grupujący czynnik musi mieć dokładnie 2 poziomy"
 
-# stats/R/ksmooth.R: 25
-# stop("numeric y must be supplied.\nFor density estimation use density()")
+#. R/plot.lm.R: gettextf("hat values (leverages) are all = %s\n and there are no factor predictors; no plot no. 5",     format(mean(r.hat)))
+#: R/plot.lm.R:0
 msgid ""
-"numeric y must be supplied.\n"
-"For density estimation use density()"
+"hat values (leverages) are all = %s\n"
+" and there are no factor predictors; no plot no. 5"
 msgstr ""
-"liczbowy argument 'y' musi zostać dostarczony.\n"
-"Dla estymacji gęstości użyj 'density()'"
-
-# stats/R/lag.R: 25
-# warning("'k' is not an integer")
-msgid "'k' is not an integer"
-msgstr "argument 'k' nie jest liczbą całkowitą"
+"wszystkie dopasowane wartości (zależne) są = %s\n"
+"oraz nie ma czynnikowych predyktorów; brak wykresu nr. 5"
 
-# stats/R/lm.R: 38
-# warning(gettextf("method = '%s' is not supported. Using 'qr'", method),
-#                 domain = NA)
-# stats/R/lm.R: 110
-# warning(gettextf("method = '%s' is not supported. Using 'qr'", method),
-#                 domain = NA)
-# stats/R/lm.R: 169
-# warning(gettextf("method = '%s' is not supported. Using 'qr'", method),
-#                 domain = NA)
-msgid "method = '%s' is not supported. Using 'qr'"
-msgstr "'method = %s' nie jest wspierane. Używanie 'qr'"
+#. R/fisher.test.R: stop("if 'x' is not a matrix, 'y' must be given")
+#. R/mcnemar.test.R: stop("if 'x' is not a matrix, 'y' must be given")
+#: R/fisher.test.R:0 R/mcnemar.test.R:0
+msgid "if 'x' is not a matrix, 'y' must be given"
+msgstr "jeśli argument 'x' nie jest macierzą, argument 'y' musi zostać podane"
 
-# stats/R/lm.R: 49
-# stop(gettextf("number of offsets is %d, should equal %d (number of observations)",
-#                           length(offset), NROW(y)), domain = NA)
-msgid "number of offsets is %d, should equal %d (number of observations)"
-msgstr "liczba przesunięć (%d) powinna być równa liczbie obserwacji (%d)"
+#. R/mantelhaen.test.R: stop("if 'x' is not an array, 'y' must be given")
+#: R/mantelhaen.test.R:0
+msgid "if 'x' is not an array, 'y' must be given"
+msgstr "jeśli argument 'x' nie jest tablicą, argument 'y' musi być podany"
 
-# stats/R/lm.R: 92
-# stop("'x' must be a matrix")
-# stats/R/lm.R: 156
-# stop("'x' must be a matrix")
-msgid "'x' must be a matrix"
-msgstr "'x' musi być macierzą"
+#. R/mantelhaen.test.R: stop("if 'x' is not an array, 'z' must be given")
+#: R/mantelhaen.test.R:0
+msgid "if 'x' is not an array, 'z' must be given"
+msgstr "jeśli argument 'x' nie jest tablicą, argument 'z' musi być podany"
 
-# stats/R/lm.R: 93
-# stop("0 (non-NA) cases")
-# stats/R/lm.R: 157
-# stop("0 (non-NA) cases")
-msgid "0 (non-NA) cases"
-msgstr "0 przypadków (nie o wartości NA)"
+#. R/family.R: warning("ignoring prior weights")
+#: R/family.R:0
+msgid "ignoring prior weights"
+msgstr "ignorowanie wag a priori"
 
-# stats/src/cov.c: 663
-# error(_("incompatible dimensions"))
-# stats/src/cov.c: 669
-# error(_("incompatible dimensions"))
-# stats/R/lm.R: 108
-# stop("incompatible dimensions")
-# stats/R/lm.R: 165
-# stop("incompatible dimensions")
+#. R/lm.R: stop("incompatible dimensions")
+#. R/lm.R: stop("incompatible dimensions")
+#: R/lm.R:0
 msgid "incompatible dimensions"
 msgstr "niezgodne wymiary"
 
-# stats/R/lm.R: 120
-# stop("singular fit encountered")
-# stats/R/lm.R: 207
-# stop("singular fit encountered")
-msgid "singular fit encountered"
-msgstr "napotkano osobliwe dopasowanie"
+#. R/ts.R: stop("inconsistent specification of 'ar' order")
+#: R/ts.R:0
+msgid "inconsistent specification of 'ar' order"
+msgstr "niespójna specyfikacja porządku 'ar'"
 
-# stats/R/nls.R: 574
-# stop("missing or negative weights not allowed")
-# stats/R/lm.R: 167
-# stop("missing or negative weights not allowed")
-msgid "missing or negative weights not allowed"
-msgstr "brakujące lub ujemne wagi nie są dozwolone"
+#. R/ts.R: stop("inconsistent specification of 'ma' order")
+#: R/ts.R:0
+msgid "inconsistent specification of 'ma' order"
+msgstr "niespójna specyfikacja porządku 'ma'"
 
-# stats/R/lm.R: 301
-# stop("invalid 'lm' object:  no 'terms' component")
-msgid "invalid 'lm' object:  no 'terms' component"
-msgstr "niepoprawny obiekt 'lm':  brak komponentu 'terms'"
+#. R/diffinv.R: stop("incorrect dimensions for 'xi'")
+#: R/diffinv.R:0
+msgid "incorrect dimensions for 'xi'"
+msgstr "niepoprawne wymiary dla 'xi'"
 
-# stats/R/lm.R: 303
-# warning("calling summary.lm(<fake-lm-object>) ...")
-msgid "calling summary.lm(<fake-lm-object>) ..."
-msgstr "wywoływanie 'summary.lm(<fake-lm-object>)' ..."
+#. R/binom.test.R: stop("incorrect length of 'x'")
+#: R/binom.test.R:0
+msgid "incorrect length of 'x'"
+msgstr "niepoprawna długość argumentu 'x'"
 
-# stats/R/lm.R: 307
-# warning("residual degrees of freedom in object suggest this is not an \"lm\" fit")
-msgid "residual degrees of freedom in object suggest this is not an \"lm\" fit"
-msgstr ""
-"stopnie swobody reszty w obiekcie sugerują, że nie jest do dopasowanie 'lm'"
+#. R/ftable.R: stop("incorrect specification for 'col.vars'")
+#. R/ftable.R: stop("incorrect specification for 'col.vars'")
+#: R/ftable.R:0
+msgid "incorrect specification for 'col.vars'"
+msgstr "niepoprawne określenie dla argumentu 'col.vars'"
 
-# stats/R/lm.R: 571
-# warning("ANOVA F-tests on an essentially perfect fit are unreliable")
-#, fuzzy
-msgid "essentially perfect fit: summary may be unreliable"
-msgstr "Testy ANOVA Fishera w istocie na idealnym dopasowaniu są niewiarygodne"
+#. R/friedman.test.R: stop("incorrect specification for 'formula'")
+#. R/quade.test.R: stop("incorrect specification for 'formula'")
+#: R/friedman.test.R:0 R/quade.test.R:0
+msgid "incorrect specification for 'formula'"
+msgstr "niepoprawne określenie dla argumentu 'formula'"
 
-msgid ""
-"lm object does not have a proper 'qr' component.\n"
-" Rank zero or should not have used lm(.., qr=FALSE)."
-msgstr ""
-"obiekt 'lm' nie ma poprawnego komponentu 'qr'. Ranga powinna być zerem lub "
-"nie powinieneś był użyć 'lm(.., qr=FALSE)'."
+#. R/ftable.R: stop("incorrect specification for 'row.vars'")
+#. R/ftable.R: stop("incorrect specification for 'row.vars'")
+#: R/ftable.R:0
+msgid "incorrect specification for 'row.vars'"
+msgstr "niepoprawne określenie dla argumentu 'row.vars'"
 
-# stats/R/lm.R: 492
-# stop(gettextf("family '%s' not implemented", fam),
-#                             domain = NA)
-msgid "family '%s' not implemented"
-msgstr "rodzina '%s' nie jest zaimplementowana"
+#. R/ftable.R: stop("incorrect variable names in lhs of formula")
+#: R/ftable.R:0
+msgid "incorrect variable names in lhs of formula"
+msgstr "niepoprawne nazwy zmiennych po lewej stronie formuły"
 
-# stats/R/lm.R: 566
-# warning("calling anova.lm(<fake-lm-object>) ...")
-msgid "calling anova.lm(<fake-lm-object>) ..."
-msgstr "wywoływanie 'anova.lm(<fake-lm-object>)' ..."
+#. R/ftable.R: stop("incorrect variable names in rhs of formula")
+#: R/ftable.R:0
+msgid "incorrect variable names in rhs of formula"
+msgstr "niepoprawne nazwy zmiennych po prawej stronie formuły"
 
-# stats/R/lm.R: 571
-# warning("ANOVA F-tests on an essentially perfect fit are unreliable")
-msgid "ANOVA F-tests on an essentially perfect fit are unreliable"
-msgstr "Testy ANOVA Fishera w istocie na idealnym dopasowaniu są niewiarygodne"
+#. R/bandwidths.R: gettextf("increasing bw.SJ() search interval (%d) to [%.4g,%.4g]",     itry, lower, upper)
+#: R/bandwidths.R:0
+msgid "increasing bw.SJ() search interval (%d) to [%.4g,%.4g]"
+msgstr "zwiększanie przeszukiwanego przedziału 'bw.SJ()' (%d) do [%.4g,%.4g]"
 
-# stats/R/lm.R: 664
-# warning("calling predict.lm(<fake-lm-object>) ...")
-msgid "calling predict.lm(<fake-lm-object>) ..."
-msgstr "wywoływanie 'predict.lm(<fake-lm-object>)' ..."
+#. R/kmeans.R: stop("initial centers are not distinct")
+#: R/kmeans.R:0
+msgid "initial centers are not distinct"
+msgstr "początkowe centra nie są różne"
 
-# stats/R/lm.R: 689
-# warning("prediction from a rank-deficient fit may be misleading")
-msgid "prediction from a rank-deficient fit may be misleading"
-msgstr "predykcja z dopasowania z niedoborem rang może być myląca"
+#. R/constrOptim.R: stop("initial value is not in the interior of the feasible region")
+#: R/constrOptim.R:0
+msgid "initial value is not in the interior of the feasible region"
+msgstr "wartość początkowa nie jest wewnątrz możliwego regionu"
 
-# stats/R/lm.R: 699
-# warning("predictions on current data refer to _future_ responses\n")
-msgid "predictions on current data refer to _future_ responses"
-msgstr ""
-"predykcje na bieżących danych odnoszą się do _przyszłych_ wartości zmiennej "
-"zależnej"
+#. R/glm.R: stop("inner loop 1; cannot correct step size", call. = FALSE)
+#: R/glm.R:0
+msgid "inner loop 1; cannot correct step size"
+msgstr "wewnętrzna pętla 1; nie można poprawić rozmiaru kroku"
 
-# stats/R/lm.R: 704
-# warning("assuming prediction variance inversely proportional to weights used for fitting\n")
-msgid ""
-"assuming prediction variance inversely proportional to weights used for "
-"fitting"
-msgstr ""
-"zakładanie przewidywanej wariancji odwrotnie proporcjonalnej do wag użytych "
-"do dopasowania"
+#. R/glm.R: stop("inner loop 2; cannot correct step size", call. = FALSE)
+#: R/glm.R:0
+msgid "inner loop 2; cannot correct step size"
+msgstr "wewnętrzna pętla 2; nie można poprawić rozmiaru kroku"
 
-# stats/R/lm.R: 708
-# warning("Assuming constant prediction variance even though model fit is weighted\n")
-msgid "Assuming constant prediction variance even though model fit is weighted"
-msgstr ""
-"Zakładanie stałości przewidywanej wariancji mimo iż dopasowanie modelu jest "
-"ważone"
+#. R/ftable.R: stop("interactions are not allowed")
+#. R/xtabs.R: stop("interactions are not allowed")
+#: R/ftable.R:0 R/xtabs.R:0
+msgid "interactions are not allowed"
+msgstr "interakcje nie są dozwolone"
 
-# stats/R/lm.R: 711
-# stop("'weights' as formula should be one-sided")
-msgid "'weights' as formula should be one-sided"
-msgstr "'weights' jako formuła powinna być jednostronna"
+#. R/arima.R: stop("invalid 'SSinit'")
+#: R/arima.R:0
+msgid "invalid 'SSinit'"
+msgstr "niepoprawna wartość 'SSinit'"
 
-# stats/R/lm.R: 852
-# stop("'object' has no 'effects' component")
-msgid "'object' has no 'effects' component"
-msgstr "'object' nie ma komponentu 'effects'"
+#. R/symnum.R: stop("invalid 'abbr.colnames'")
+#: R/symnum.R:0
+msgid "invalid 'abbr.colnames'"
+msgstr "niepoprawna wartość 'abbr.colnames'"
 
-# stats/R/lm.R: 884
-# stop("the 'se.fit' argument is not yet implemented for \"mlm\" objects")
-msgid "the 'se.fit' argument is not yet implemented for \"mlm\" objects"
-msgstr "argument 'se.fit' dla obiektów 'mlm' nie jest jeszcze zaimplementowany"
+#. R/models.R: stop("invalid 'contrasts.arg' argument")
+#: R/models.R:0
+msgid "invalid 'contrasts.arg' argument"
+msgstr "niepoprawny argument 'contrasts.arg'"
 
-# stats/R/lm.influence.R: 60
-# stop("invalid model QR matrix")
-msgid "invalid model QR matrix"
-msgstr "niepoprawna macierz QR modelu"
+#. R/loess.R: stop("invalid 'control' argument")
+#: R/loess.R:0
+msgid "invalid 'control' argument"
+msgstr "niepoprawny argument 'control'"
 
-# stats/R/lm.influence.R: 63
-# stop("non-NA residual length does not match cases used in fitting")
-msgid "non-NA residual length does not match cases used in fitting"
-msgstr ""
-"długości nie-NA reszt nie zgadzają się z przypadkami użytymi w dopasowaniu"
+#. R/smspline.R: stop("invalid 'control.spar'")
+#: R/smspline.R:0
+msgid "invalid 'control.spar'"
+msgstr "niepoprawna wartość 'control.spar'"
 
-# stats/R/lm.influence.R: 228
-# stop("too few cases, n < k")
-msgid "too few cases, n < k"
-msgstr "zbyt mało przypadków, n < k"
+#. R/models.R: stop("invalid 'data' argument")
+#: R/models.R:0
+msgid "invalid 'data' argument"
+msgstr "niepoprawny argument 'data'"
 
-# stats/R/loess.R: 42
-# stop("predictors must all be numeric")
-msgid "predictors must all be numeric"
-msgstr "wszystkie predyktory muszą być liczbami"
+#. R/smooth.R: stop("invalid 'endrule' argument")
+#: R/smooth.R:0
+msgid "invalid 'endrule' argument"
+msgstr "niepoprawny argument 'endrule'"
 
-# stats/R/loess.R: 48
-# stop("'degree' must be 0, 1 or 2")
-msgid "'degree' must be 0, 1 or 2"
-msgstr "argument 'degree' musi mieć wartość 0, 1, lub 2"
+#. R/nlm.R: stop("invalid 'extendInt'; please report")
+#: R/nlm.R:0
+msgid "invalid 'extendInt'; please report"
+msgstr "niepoprawny argument 'extendInt'; proszę zgłosić raport"
 
-# stats/R/loess.R: 52
-# warning("both 'span' and 'enp.target' specified: 'span' will be used")
-msgid "both 'span' and 'enp.target' specified: 'span' will be used"
-msgstr "określono 'span' oraz 'enp.target': zostanie użyty 'span'"
+#. R/lm.R: stop("invalid 'lm' object:  no 'terms' component")
+#: R/lm.R:0
+msgid "invalid 'lm' object:  no 'terms' component"
+msgstr "niepoprawny obiekt 'lm':  brak komponentu 'terms'"
 
-# stats/R/loess.R: 61
-# stop("invalid 'control' argument")
-msgid "invalid 'control' argument"
-msgstr "niepoprawny argument 'control'"
+#. R/glm.R: stop("invalid 'method' argument")
+#: R/glm.R:0
+msgid "invalid 'method' argument"
+msgstr "niepoprawny argument 'method'"
 
-# stats/R/loess.R: 98
-# stop("invalid NCOL(X)")
-# stats/R/loess.R: 101
-# stop("invalid NCOL(X)")
-msgid "invalid NCOL(X)"
-msgstr "niepoprawna wartość 'NCOL(X)'"
+#. R/bandwidths.R: stop("invalid 'nb'")
+#. R/bandwidths.R: stop("invalid 'nb'")
+#. R/bandwidths.R: stop("invalid 'nb'")
+#: R/bandwidths.R:0
+msgid "invalid 'nb'"
+msgstr "niepoprawna wartość 'nb'"
 
-# stats/R/loess.R: 99
-# stop("only 1-4 predictors are allowed")
-msgid "only 1-4 predictors are allowed"
-msgstr "tylko od 1 do 4 predyktorów jest dozwolone"
+#. R/cutree.R: stop("invalid 'tree' ('merge' component)")
+#: R/cutree.R:0
+msgid "invalid 'tree' ('merge' component)"
+msgstr "niepoprawny argument 'tree' (komponent 'merge')"
+
+#. R/cor.R: stop("invalid 'use' argument")
+#. R/cor.R: stop("invalid 'use' argument")
+#. R/cor.R: stop("invalid 'use' argument")
+#: R/cor.R:0
+msgid "invalid 'use' argument"
+msgstr "niepoprawny argument 'use'"
+
+#. R/bandwidths.R: stop("invalid 'x'")
+#. R/bandwidths.R: stop("invalid 'x'")
+#. R/bandwidths.R: stop("invalid 'x'")
+#. R/chisq.test.R: stop("invalid 'x'")
+#. R/loess.R: stop("invalid 'x'")
+#: R/bandwidths.R:0 R/chisq.test.R:0 R/loess.R:0
+msgid "invalid 'x'"
+msgstr "niepoprawna wartość 'x'"
 
-# stats/R/loess.R: 103
-# stop("invalid 'y'")
+#. R/loess.R: stop("invalid 'y'")
+#: R/loess.R:0
 msgid "invalid 'y'"
 msgstr "niepoprawna wartość 'y'"
 
-# stats/R/loess.R: 125
-# stop("specified the square of a factor predictor to be dropped when degree = 1")
-msgid ""
-"specified the square of a factor predictor to be dropped when degree = 1"
-msgstr ""
-"określono kwadrat predyktora czynnika, który ma zostać pominięty, gdy "
-"stopień = 1"
+#. R/dendrogram.R: stop("invalid (length 0) node in dendrogram")
+#: R/dendrogram.R:0
+msgid "invalid (length 0) node in dendrogram"
+msgstr "niepoprawny (długość równa 0) węzeł w drzewie celu"
 
-# stats/R/loess.R: 127
-# stop("specified the square of a predictor to be dropped with only one numeric predictor")
-msgid ""
-"specified the square of a predictor to be dropped with only one numeric "
-"predictor"
-msgstr ""
-"określono kwadrat predyktora, który ma zostać pominięty z tylko jednym "
-"liczbowym predyktorem"
+#. R/loess.R: stop("invalid NCOL(X)")
+#: R/loess.R:0
+msgid "invalid NCOL(X)"
+msgstr "niepoprawna wartość 'NCOL(X)'"
 
-# stats/R/loess.R: 128
-# stop("specified parametric for all predictors")
-msgid "specified parametric for all predictors"
-msgstr "określono parametry dla wszystkich predyktorów"
+#. R/loess.R: stop("invalid NROW(X)")
+#: R/loess.R:0
+msgid "invalid NROW(X)"
+msgstr "niepoprawna wartość 'NROW(X)'"
 
-# stats/R/loess.R: 138
-# stop("invalid argument 'span'")
-msgid "invalid argument 'span'"
-msgstr "niepoprawny argument 'span'"
+#. R/r2dtable.R: stop("invalid argument 'c'")
+#: R/r2dtable.R:0
+msgid "invalid argument 'c'"
+msgstr "niepoprawny argument 'c'"
 
-# stats/R/loess.R: 139
-# stop("invalid argument 'cell'")
+#. R/loess.R: stop("invalid argument 'cell'")
+#: R/loess.R:0
 msgid "invalid argument 'cell'"
 msgstr "niepoprawny argument 'cell'"
 
-# stats/R/loess.R: 140
-# stop("invalid argument 'degree'")
+#. R/loess.R: stop("invalid argument 'degree'")
+#: R/loess.R:0
 msgid "invalid argument 'degree'"
 msgstr "niepoprawny argument 'degree'"
 
-# stats/R/loess.R: 234
-# stop("first argument must be a \"loess\" object")
-msgid "first argument must be a \"loess\" object"
-msgstr "pierwszy argument musi być obiektem klasu \"loess\""
+#. R/family.R: stop("invalid argument 'lambda'")
+#: R/family.R:0
+msgid "invalid argument 'lambda'"
+msgstr "niepoprawny argument 'lambda'"
 
-# stats/R/loess.R: 488
-# stop("no models to compare")
-msgid "no models to compare"
-msgstr "brak modeli do porównania"
+#. R/r2dtable.R: stop("invalid argument 'n'")
+#: R/r2dtable.R:0
+msgid "invalid argument 'n'"
+msgstr "niepoprawny argument 'n'"
 
-# stats/R/logLik.R: 56
-# warning("extra arguments discarded")
-msgid "extra arguments discarded"
-msgstr "dodatkowe argumenty zostały odrzucone"
+#. R/nafns.R: stop("invalid argument 'omit'")
+#: R/nafns.R:0
+msgid "invalid argument 'omit'"
+msgstr "niepoprawny argument 'omit'"
 
-# stats/R/logLik.R: 73
-# stop("'logLik.lm' does not support multiple responses")
-msgid "'logLik.lm' does not support multiple responses"
-msgstr "funkcja 'logLik.lm()' nie wspiera wielokrotnych zmiennych zależnych"
+#. R/r2dtable.R: stop("invalid argument 'r'")
+#: R/r2dtable.R:0
+msgid "invalid argument 'r'"
+msgstr "niepoprawny argument 'r'"
 
-# stats/R/logLik.R: 114
-# stop("no \"nobs\" attribute is available")
-msgid "no \"nobs\" attribute is available"
-msgstr "brak dostępnego atrybutu 'nobs'"
+#. R/loess.R: stop("invalid argument 'span'")
+#: R/loess.R:0
+msgid "invalid argument 'span'"
+msgstr "niepoprawny argument 'span'"
 
-# stats/R/logLik.R: 133
-# warning("no 'nobs' method is available")
-# stats/R/logLik.R: 136
-# stop("no 'nobs' method is available")
-msgid "no 'nobs' method is available"
-msgstr "brak dostępnej metody 'nobs()'"
+#. R/nls-profile.R: stop("invalid argument to 'getProfile'")
+#: R/nls-profile.R:0
+msgid "invalid argument to 'getProfile'"
+msgstr "niepoprawny argument przekazany do funkcji 'getProfile()'"
 
-# stats/R/loglin.R: 39
-# stop("'margin' must contain names or numbers corresponding to 'table'")
-msgid "'margin' must contain names or numbers corresponding to 'table'"
-msgstr ""
-"argument 'margin' musi zawierać nazwy lub liczby odpowiadające argumentowi "
-"'table'"
+#. R/hclust.R: stop("invalid clustering method", paste("", method))
+#: R/hclust.R:0
+msgid "invalid clustering method"
+msgstr "niepoprawna metoda grupowania"
 
-# stats/R/loglin.R: 45
-# stop("'start' and 'table' must be same length")
-msgid "'start' and 'table' must be same length"
-msgstr "argumenty 'start' oraz 'table' muszą mieć tę samą długość"
+#. R/hclust.R: stop("invalid dissimilarities")
+#: R/hclust.R:0
+msgid "invalid dissimilarities"
+msgstr "niepoprawne odmienności"
 
-# stats/R/lsfit.R: 85
-# stop(gettextf("number of weights = %d should equal %d (number of responses)", nwts, nry), domain = NA)
-msgid "number of weights = %d should equal %d (number of responses)"
-msgstr "liczba wag = %d powinna być równa %d (liczbie zmiennych zależnych)"
+#. R/dist.R: stop("invalid distance method")
+#: R/dist.R:0
+msgid "invalid distance method"
+msgstr "niepoprawna metoda wyznaczania odległości"
 
-# stats/R/lsfit.R: 129
-# warning("'X' matrix was collinear")
-msgid "'X' matrix was collinear"
-msgstr "macierz 'X' była współliniowa"
+#. R/glm.R: stop("invalid fitted means in empty model", call. = FALSE)
+#: R/glm.R:0
+msgid "invalid fitted means in empty model"
+msgstr "niepoprawnie dopasowane średnie w pustym modelu"
 
-# stats/R/lsfit.R: 161
-# warning("missing observations deleted")
-msgid "missing observations deleted"
-msgstr "brakujące obserwacje zostały usunięte"
+#. R/cor.test.R: stop("invalid formula")
+#. R/models.R: stop("invalid formula")
+#: R/cor.test.R:0 R/models.R:0
+msgid "invalid formula"
+msgstr "niepoprawna formuła"
 
-# stats/R/lsfit.R: 169
-# warning("observations with 0 weight not used in calculating standard deviation")
-msgid "observations with 0 weight not used in calculating standard deviation"
-msgstr ""
-"obserwacje z zerową wagą nie zostały użyte podczas obliczania odchylenia "
-"standardowego"
+#. R/deriv.R: stop("invalid formula in deriv")
+#. R/deriv.R: stop("invalid formula in deriv")
+#: R/deriv.R:0
+msgid "invalid formula in deriv"
+msgstr "niepoprawna formuła w 'deriv()'"
 
-# stats/R/lsfit.R: 238
-# warning("observations with 0 weights not used")
-msgid "observations with 0 weights not used"
-msgstr "obserwacje z zerową wagą nie zostały użyte"
+#. R/approx.R: stop("invalid interpolation method")
+#. R/approx.R: stop("invalid interpolation method")
+#. R/spline.R: stop("invalid interpolation method")
+#: R/approx.R:0 R/spline.R:0
+msgid "invalid interpolation method"
+msgstr "niepoprawna metoda interpolacji"
 
-# stats/R/mad.R: 27
-# stop("'low' and 'high' cannot be both TRUE")
-msgid "'low' and 'high' cannot be both TRUE"
-msgstr "'low' oraz 'high' nie mogą jednocześnie być TRUE"
+#. R/hclust.R: stop("invalid length of members")
+#: R/hclust.R:0
+msgid "invalid length of members"
+msgstr "niepoprawna długość argumentu 'members'"
 
-# stats/R/manova.R: 26
-# stop("need multiple responses")
-# stats/R/manova.R: 31
-# stop("need multiple responses")
-# stats/R/manova.R: 61
-# stop("need multiple responses")
-msgid "need multiple responses"
-msgstr "potrzeba wielokrotnych zmiennych zależnych"
+#. R/HoltWinters.R: stop("invalid length(x)")
+#. R/approx.R: stop("invalid length(x)")
+#. R/approx.R: stop("invalid length(x)")
+#. R/bandwidths.R: stop("invalid length(x)")
+#. R/bandwidths.R: stop("invalid length(x)")
+#. R/bandwidths.R: stop("invalid length(x)")
+#. R/stl.R: stop("invalid length(x)")
+#: R/HoltWinters.R:0 R/approx.R:0 R/bandwidths.R:0 R/stl.R:0
+msgid "invalid length(x)"
+msgstr "niepoprawna wartość 'length(x)'"
 
-# stats/R/manova.R: 44
-# stop(gettextf("object must be of class %s or %s",
-#                       dQuote("manova"), dQuote("maov")),
-#              domain = NA)
-msgid "object must be of class %s or %s"
-msgstr "obiekt musi być klasy %s lub %s"
+#. R/glm.R: stop("invalid linear predictor values in empty model", call. = FALSE)
+#: R/glm.R:0
+msgid "invalid linear predictor values in empty model"
+msgstr "niepoprawne wartości liniowego predyktora w pustym modelu"
 
-# stats/R/manova.R: 108
-# stop(gettextf("residuals have rank %d < %d",
-#                           rss.qr$rank, ncol(resid)), domain = NA)
-msgid "residuals have rank %d < %d"
-msgstr "reszty mają rangę %d < %d"
+#. R/lm.influence.R: stop("invalid model QR matrix")
+#: R/lm.influence.R:0
+msgid "invalid model QR matrix"
+msgstr "niepoprawna macierz QR modelu"
 
-# stats/R/mantelhaen.test.R: 27
-# stop("NAs are not allowed")
-msgid "NAs are not allowed"
-msgstr "wartości NA nie są dozwolone"
+#. R/kmeans.R: stop("invalid ncol(x)")
+#: R/kmeans.R:0
+msgid "invalid ncol(x)"
+msgstr "niepoprawna wartość 'ncol(x)'"
 
-# stats/R/mantelhaen.test.R: 28
-# stop("each dimension in table must be >= 2")
-msgid "each dimension in table must be >= 2"
-msgstr "każdy wymiar w tabeli musi być >= 2"
+#. R/kmeans.R: stop("invalid nrow(x)")
+#: R/kmeans.R:0
+msgid "invalid nrow(x)"
+msgstr "niepoprawna wartość 'nrow(x)'"
 
-# stats/R/mantelhaen.test.R: 31
-# stop("'x' must be a 3-dimensional array")
-msgid "'x' must be a 3-dimensional array"
-msgstr "'x' musi być 3-wymiarową tablicą"
+#. R/smspline.R: stop("invalid number of points")
+#: R/smspline.R:0
+msgid "invalid number of points"
+msgstr "niepoprawna liczba punktów"
 
-# stats/R/mantelhaen.test.R: 34
-# stop("if 'x' is not an array, 'y' must be given")
-msgid "if 'x' is not an array, 'y' must be given"
-msgstr "jeśli argument 'x' nie jest tablicą, argument 'y' musi być podany"
+#. R/integrate.R: stop("invalid parameter values")
+#: R/integrate.R:0
+msgid "invalid parameter values"
+msgstr "niepoprawne wartości parametrów"
 
-# stats/R/mantelhaen.test.R: 35
-# stop("if 'x' is not an array, 'z' must be given")
-msgid "if 'x' is not an array, 'z' must be given"
-msgstr "jeśli argument 'x' nie jest tablicą, argument 'z' musi być podany"
+#. R/models.R: stop("invalid response type")
+#: R/models.R:0
+msgid "invalid response type"
+msgstr "niepoprawny typ zmiennej zależnej"
 
-# stats/R/mantelhaen.test.R: 37
-# stop("'x', 'y', and 'z' must have the same length")
-msgid "'x', 'y', and 'z' must have the same length"
-msgstr "argumenty 'x', 'y' oraz 'z' muszą mieć tę samą długość"
+#. R/runmed.R: stop("invalid value of 'k'")
+#: R/runmed.R:0
+msgid "invalid value of 'k'"
+msgstr "niepoprawna wartość 'k'"
 
-# stats/R/mantelhaen.test.R: 50
-# stop("sample size in each stratum must be > 1")
-msgid "sample size in each stratum must be > 1"
-msgstr "rozmiar próby w każdej warstwie musi być > 1"
+#. R/cmdscale.R: stop("invalid value of 'n'")
+#: R/cmdscale.R:0
+msgid "invalid value of 'n'"
+msgstr "niepoprawna wartość 'n'"
 
-# stats/R/mcnemar.test.R: 24
-# stop("'x' must be square with at least two rows and columns")
-msgid "'x' must be square with at least two rows and columns"
-msgstr ""
-"'x' musi być kwadratową macierzą z co najmniej dwoma wierszami oraz kolumnami"
+#. R/density.R: stop("invalid value of length(x)")
+#. R/diffinv.R: stop("invalid value of length(x)")
+#. R/runmed.R: stop("invalid value of length(x)")
+#. R/spline.R: stop("invalid value of length(x)")
+#. R/splinefun.R: stop("invalid value of length(x)")
+#: R/density.R:0 R/diffinv.R:0 R/runmed.R:0 R/spline.R:0 R/splinefun.R:0
+msgid "invalid value of length(x)"
+msgstr "niepoprawna wartość 'length(x)'"
 
-# stats/R/mcnemar.test.R: 41
-# stop("'x' and 'y' must have the same number of levels (minimum 2)")
-msgid "'x' and 'y' must have the same number of levels (minimum 2)"
-msgstr "'x' oraz 'y' muszą mieć tę samą liczbę poziomów (minimum 2)"
+#. R/identify.hclust.R: gettextf("k must be between 2 and %d", length(tree$height))
+#: R/identify.hclust.R:0
+msgid "k must be between 2 and %d"
+msgstr "elementy 'k' muszą być pomiędzy 2 a %d"
 
-# stats/R/median.R: 23
-# stop("need numeric data")
-msgid "need numeric data"
-msgstr "potrzeba danych liczbowych"
+#. R/fft.R: stop("length mismatch in convolution")
+#: R/fft.R:0
+msgid "length mismatch in convolution"
+msgstr "niezgodność długości w splocie"
 
-# stats/R/mlm.R: 69
-# stop("'mlm' objects with weights are not supported")
-msgid "'mlm' objects with weights are not supported"
-msgstr "obiekty klasy \"mlm\" z wagami nie są wspierane"
+#. R/cov.wt.R: stop("length of 'center' must equal the number of columns in 'x'")
+#: R/cov.wt.R:0
+msgid "length of 'center' must equal the number of columns in 'x'"
+msgstr "długość 'center' musi równać się liczbie kolumn w 'x'"
 
-# stats/R/mlm.R: 143
-# stop("X does not define a subspace of M")
-# stats/R/mlm.R: 198
-# stop("X does not define a subspace of M")
-# stats/R/mlm.R: 235
-# stop("X does not define a subspace of M")
-# stats/R/mlm.R: 428
-# stop("X does not define a subspace of M")
-msgid "X does not define a subspace of M"
-msgstr "X nie definiuje podprzestrzeni M"
+#. R/filter.R: stop("length of 'init' must equal length of 'filter'")
+#: R/filter.R:0
+msgid "length of 'init' must equal length of 'filter'"
+msgstr "długość argumentu 'init' musi równać się długości argumentu 'filter'"
 
-# stats/R/mlm.R: 318
-# stop(gettextf("residuals have rank %s < %s", rss.qr$rank, pp),
-#                      domain = NA)
-# stats/R/mlm.R: 539
-# stop(gettextf("residuals have rank %s < %s", rss.qr$rank, pp),
-#                  domain = NA)
-msgid "residuals have rank %s < %s"
-msgstr "reszty mają rangę %s < %s"
+#. R/spectrum.R: stop("length of 'p' must be 1 or equal the number of columns of 'x'")
+#: R/spectrum.R:0
+msgid "length of 'p' must be 1 or equal the number of columns of 'x'"
+msgstr "długość 'p' musi być 1 lub równa liczbie kolumn 'x'"
 
-# stats/R/model.tables.R: 25
-# stop("'model.tables' is not implemented for multiple responses")
-msgid "'model.tables' is not implemented for multiple responses"
+#. R/glm.R: gettextf("length of 'start' should equal %d and correspond to initial coefs for %s",     nvars, paste(deparse(xnames), collapse = ", "))
+#: R/glm.R:0
+msgid ""
+"length of 'start' should equal %d and correspond to initial coefs for %s"
 msgstr ""
-"funkcja 'model.tables()' nie jest zaimplementowana dla wielu zmiennych "
-"zależnych"
-
-# stats/R/model.tables.R: 28
-# stop(gettextf("type '%s' is not implemented yet", type), domain = NA)
-# stats/R/model.tables.R: 107
-# stop(gettextf("type '%s' is not implemented yet", type), domain = NA)
-msgid "type '%s' is not implemented yet"
-msgstr "typ '%s' nie jest jeszcze zaimplementowany"
-
-# stats/R/model.tables.R: 30
-# stop("this fit does not inherit from \"lm\"")
-msgid "this fit does not inherit from \"lm\""
-msgstr "to dopasowanie nie dziedziczy z 'lm'"
-
-# stats/R/model.tables.R: 45
-# stop("'cterms' argument must match terms in model object")
-msgid "'cterms' argument must match terms in model object"
-msgstr "argument 'cterms' musi zgadzać się z członami w obiekcie modelu"
-
-# stats/R/model.tables.R: 66
-# message("Design is unbalanced - use se.contrast() for se's")
-msgid "Design is unbalanced - use se.contrast() for se's"
-msgstr "Projekt nie jest zrównoważony -- użyj 'se.contrast()' dla 'se'"
+"długość 'start' powinna równać się %d i odnosić się do współczynników "
+"początkowych dla %s"
 
-# stats/R/model.tables.R: 132
-# stop("design is unbalanced so cannot proceed")
-msgid "design is unbalanced so cannot proceed"
-msgstr "projekt nie jest zrównoważony, dlatego też nie można kontynuować"
+#. R/reshape.R: stop("length of 'v.names' does not evenly divide length of 'varying'")
+#: R/reshape.R:0
+msgid "length of 'v.names' does not evenly divide length of 'varying'"
+msgstr "długość 'v.names' nie dzieli równo długości 'varying'"
 
-# stats/R/model.tables.R: 167
-# message("Standard error information not returned as design is unbalanced. \nStandard errors can be obtained through 'se.contrast'.")
+#. R/reshape.R: stop("length of 'varying' must be the product of length of 'v.names' and length of 'times'")
+#: R/reshape.R:0
 msgid ""
-"Standard error information not returned as design is unbalanced. \n"
-"Standard errors can be obtained through 'se.contrast'."
+"length of 'varying' must be the product of length of 'v.names' and length of "
+"'times'"
 msgstr ""
-"Standardowa informacja o błędzie nie została zwrócona z powodu "
-"niezrównoważenia projektu. \n"
-"Błędy standardowe mogą zostać uzyskane poprzez 'se.contrast'."
+"długość 'varying' musi być iloczynem długości 'v.names' oraz długości 'times'"
 
-# stats/R/model.tables.R: 170
-# warning(gettextf("SEs for type '%s' are not yet implemented",
-#                              type), domain = NA)
-# stats/R/model.tables.R: 188
-# stop(gettextf("SEs for type '%s' are not yet implemented", type),
-#              domain = NA)
-msgid "SEs for type '%s' are not yet implemented"
-msgstr "błędy standardowe dla typu '%s' nie są jeszcze zaimplementowane"
+#. R/cov.wt.R: stop("length of 'wt' must equal the number of rows in 'x'")
+#: R/cov.wt.R:0
+msgid "length of 'wt' must equal the number of rows in 'x'"
+msgstr "długość 'wt' musi być równa liczbie wierszy w 'x'"
 
-# stats/R/model.tables.R: 310
-# stop("na.action must be a function")
-msgid "na.action must be a function"
-msgstr "argument 'na.action' musi być funkcją"
+#. R/addmargins.R: gettextf("length of FUN, %d,\n does not match the length of the margins, %d",     length(FUN), n.sid)
+#: R/addmargins.R:0
+msgid ""
+"length of FUN, %d,\n"
+" does not match the length of the margins, %d"
+msgstr "długość 'FUN', %d, nie zgadza się z długością marginesów, %d"
 
-# stats/R/model.tables.R: 324
-# warning(gettextf("non-factors ignored: %s",
-#                              paste(names(nn), collapse = ", ")),
-#                     domain = NA)
-msgid "non-factors ignored: %s"
-msgstr "zignorowano nie-czynniki: %s"
+#. R/biplot.R: stop("length of choices must be 2")
+#. R/biplot.R: stop("length of choices must be 2")
+#: R/biplot.R:0
+msgid "length of choices must be 2"
+msgstr "długość 'choices' musi wynosić 2"
 
-# stats/R/model.tables.R: 452
-# stop("eff.aovlist: non-orthogonal contrasts would give an incorrect answer")
-msgid "eff.aovlist: non-orthogonal contrasts would give an incorrect answer"
-msgstr "eff.aovlist: nieortogonalne kontrasty dałyby niepoprawną odpowiedź"
+#. R/smspline.R: stop("lengths of 'x' and 'w' must match")
+#: R/smspline.R:0
+msgid "lengths of 'x' and 'w' must match"
+msgstr "długości argumentów 'x' oraz 'w' muszą się zgadzać"
 
-# stats/R/models.R: 58
-# stop("cannot create a formula from a zero-column data frame")
-msgid "cannot create a formula from a zero-column data frame"
-msgstr "nie można utworzyć formuły z ramki danych o zerowej liczbie kolumn"
+#. R/arima.R: stop("lengths of 'x' and 'xreg' do not match")
+#. R/arma0.R: stop("lengths of 'x' and 'xreg' do not match")
+#: R/arima.R:0 R/arma0.R:0
+msgid "lengths of 'x' and 'xreg' do not match"
+msgstr "długości argumentów 'x' oraz 'xreg' muszą się zgadzać"
 
-# stats/R/models.R: 108
-# stop("no terms component nor attribute")
-msgid "no terms component nor attribute"
-msgstr "brak komponentu 'terms' oraz atrybutu"
+#. R/nls-profile.R: warning("levels truncated to positive values only")
+#: R/nls-profile.R:0
+msgid "levels truncated to positive values only"
+msgstr "poziomy przycięto tylko do wartości dodatnich"
 
-# stats/R/models.R: 149
-# stop("'termlabels' must be a character vector of length at least one")
-msgid "'termlabels' must be a character vector of length at least one"
+#. R/family.R: gettextf("link \"%s\" not available for binomial family; available links are %s",     linktemp, paste(sQuote(okLinks), collapse = ", "))
+#: R/family.R:0
+msgid "link \"%s\" not available for binomial family; available links are %s"
 msgstr ""
-"argument 'termlabels' musi być wektorem tekstowym o długości co najmniej 1"
-
-# stats/R/models.R: 169
-# stop(gettextf("'termobj' must be a object of class %s",
-#                           dQuote("terms")),
-#                  domain = NA)
-msgid "'termobj' must be a object of class %s"
-msgstr "argument 'termobj' musi być obiektem klasy %s"
-
-# stats/R/models.R: 302
-# stop(gettextf(
-#     "variable '%s' was fitted with type \"%s\" but type \"%s\" was supplied",
-#                           names(old)[wrong], old[wrong], new[wrong]),
-#                  call. = FALSE, domain = NA)
-msgid "variable '%s' was fitted with type \"%s\" but type \"%s\" was supplied"
-msgstr "zmienna '%s' została dopasowana z typem '%s', ale dostarczono typ '%s'"
-
-# stats/R/models.R: 307
-# stop(gettextf(
-#     "variables %s were specified with different types from the fit",
-#                  paste(sQuote(names(old)[wrong]), collapse=", ")),
-#                  call. = FALSE, domain = NA)
-msgid "variables %s were specified with different types from the fit"
-msgstr "zmienne %s zostały określone z typami innymi od tych z dopasowania"
-
-# stats/R/models.R: 387
-# stop("'data' must be a data.frame, not a matrix or an array")
-# stats/R/models.R: 642
-# stop("'data' must be a data.frame, not a matrix or an array")
-msgid "'data' must be a data.frame, not a matrix or an array"
-msgstr "'data' musi być ramką danych, nie macierzą lub tablicą"
-
-# stats/R/models.R: 439
-# warning(gettextf("variable '%s' is not a factor", nm),
-#                             domain = NA)
-msgid "variable '%s' is not a factor"
-msgstr "zmienna '%s' nie jest czynnikiem"
-
-# stats/R/models.R: 480
-# stop("'offset' must be numeric")
-msgid "'offset' must be numeric"
-msgstr "argument 'offset' musi być liczbą"
-
-# stats/R/models.R: 499
-# stop("model frame and formula mismatch in model.matrix()")
-msgid "model frame and formula mismatch in model.matrix()"
-msgstr "ramka modelu oraz fomuła nie zgadzają się w 'model.matrix()'"
-
-# stats/R/models.R: 521
-# stop("invalid 'contrasts.arg' argument")
-msgid "invalid 'contrasts.arg' argument"
-msgstr "niepoprawny argument 'contrasts.arg'"
+"link '%s' nie jest dostępny dla rodziny Bernoulliego; dostępne linki to %s"
 
-# stats/R/models.R: 524
-# warning(gettextf("variable '%s' is absent, its contrast will be ignored", nn),
-#                             domain = NA)
-msgid "variable '%s' is absent, its contrast will be ignored"
-msgstr "zmienna '%s' jest nieobecna, jej kontrast będzie zignorowany"
+#. R/family.R: gettextf("link \"%s\" not available for gamma family; available links are %s",     linktemp, paste(sQuote(okLinks), collapse = ", "))
+#: R/family.R:0
+msgid "link \"%s\" not available for gamma family; available links are %s"
+msgstr "link '%s' nie jest dostępny dla rodziny Gamma; dostępne linki to %s"
 
-# stats/R/models.R: 550
-# warning('using type = "numeric" with a factor response will be ignored')
-msgid "using type = \"numeric\" with a factor response will be ignored"
+#. R/family.R: gettextf("link \"%s\" not available for gaussian family; available links are %s",     linktemp, paste(sQuote(okLinks), collapse = ", "))
+#: R/family.R:0
+msgid "link \"%s\" not available for gaussian family; available links are %s"
 msgstr ""
-"użycie 'type=\"numeric\"' z czynnikową zmienną zależną zostanie zignorowane"
-
-# stats/R/models.R: 553
-# stop("invalid response type")
-msgid "invalid response type"
-msgstr "niepoprawny typ zmiennej zależnej"
+"link '%s' nie jest dostępny dla rodziny gaussowskiej; dostępne linki to %s"
 
-# stats/R/models.R: 563
-# stop("invalid 'data' argument")
-msgid "invalid 'data' argument"
-msgstr "niepoprawny argument 'data'"
+#. R/family.R: gettextf("link \"%s\" not available for inverse.gaussian family; available links are %s",     linktemp, paste(sQuote(okLinks), collapse = ", "))
+#: R/family.R:0
+msgid ""
+"link \"%s\" not available for inverse.gaussian family; available links are %s"
+msgstr ""
+"link '%s' nie jest dostępny dla rodziny 'inverse.gaussian'; dostępne linki "
+"to %s"
 
-# stats/R/ts.R: 274
-# stop("all times contain an NA")
-# stats/R/na.ts.R: 29
-# stop("all times contain an NA")
-msgid "all times contain an NA"
-msgstr "wszystkie czasy zawierają wartość NA"
+#. R/family.R: gettextf("link \"%s\" not available for poisson family; available links are %s",     linktemp, paste(sQuote(okLinks), collapse = ", "))
+#: R/family.R:0
+msgid "link \"%s\" not available for poisson family; available links are %s"
+msgstr "link '%s' nie jest dostępny dla rodziny Poissona; dostępne linki to %s"
 
-# stats/R/nafns.R: 31
-# stop("missing values in object")
-msgid "missing values in object"
-msgstr "brakujące wartości w argumencie 'object'"
+#. R/family.R: gettextf("link \"%s\" not available for quasibinomial family; available links are %s",     linktemp, paste(sQuote(okLinks), collapse = ", "))
+#: R/family.R:0
+msgid ""
+"link \"%s\" not available for quasibinomial family; available links are %s"
+msgstr ""
+"link '%s' nie jest dostępny dla rodziny kwazi-Bernoulliego; dostępne linki "
+"to %s"
 
-# stats/R/nafns.R: 149
-# stop("invalid argument 'omit'")
-msgid "invalid argument 'omit'"
-msgstr "niepoprawny argument 'omit'"
+#. R/family.R: gettextf("link \"%s\" not available for quasipoisson family; available links are %s",     linktemp, paste(sQuote(okLinks), collapse = ", "))
+#: R/family.R:0
+msgid ""
+"link \"%s\" not available for quasipoisson family; available links are %s"
+msgstr ""
+"link '%s' nie jest dostępny dla rodziny kwazi-Poissona; dostępne linki to %s"
 
-# stats/R/nlm.R: 27
-# stop("'print.level' must be in {0,1,2}")
-msgid "'print.level' must be in {0,1,2}"
-msgstr "argument 'print.level' musi być liczbą w przedziale [0, 1, 2]"
+#. R/lm.R: stop("lm object does not have a proper 'qr' component.\n Rank zero or should not have used lm(.., qr=FALSE).")
+#: R/lm.R:0
+msgid ""
+"lm object does not have a proper 'qr' component.\n"
+" Rank zero or should not have used lm(.., qr=FALSE)."
+msgstr ""
+"obiekt 'lm' nie ma poprawnego komponentu 'qr'. Ranga powinna być zerem lub "
+"nie powinieneś był użyć 'lm(.., qr=FALSE)'."
 
-# stats/R/nlm.R: 63
-# stop("'interval' must be a vector of length 2")
-msgid "'interval' must be a vector of length 2"
-msgstr "argument 'interval' musi być wektorem liczbowym o długości 2"
+#. R/nlminb.R: stop("logical 'hessian' argument not allowed.  See documentation.")
+#: R/nlminb.R:0
+msgid "logical 'hessian' argument not allowed.  See documentation."
+msgstr "logiczny argument 'hessian' nie jest dozwolony. Zobacz dokumentację."
 
-# stats/R/nlm.R: 65
-# stop("lower < upper  is not fulfilled")
+#. R/nlm.R: stop("lower < upper  is not fulfilled")
+#: R/nlm.R:0
 msgid "lower < upper  is not fulfilled"
 msgstr "warunek 'dolna < górna' nie został spełniony"
 
-# stats/R/nlm.R: 66
-# stop("f.lower = f(lower) is NA")
-msgid "f.lower = f(lower) is NA"
-msgstr "'f.lower = f(lower)' ma wartość NA"
-
-# stats/R/nlm.R: 67
-# stop("f.upper = f(upper) is NA")
-msgid "f.upper = f(upper) is NA"
-msgstr "'f.upper = f(upper)' ma wartość NA"
+#. R/glm.R: stop("maximum number of iterations must be > 0")
+#: R/glm.R:0
+msgid "maximum number of iterations must be > 0"
+msgstr "maksymalna liczba iteracji musi być > 0"
 
-# stats/R/nlm.R: 73
-# stop("invalid 'extendInt'; please report")
-msgid "invalid 'extendInt'; please report"
-msgstr "niepoprawny argument 'extendInt'; proszę zgłosić raport"
+#. R/optim.R: stop("method = \"Brent\" is only available for one-dimensional optimization")
+#: R/optim.R:0
+msgid "method = \"Brent\" is only available for one-dimensional optimization"
+msgstr ""
+"'metod = \"Brent\"' jest dostępna jedynie dla jednowymiarowej optymalizacji"
 
-# stats/R/nlm.R: 94
-# stop(gettextf("no sign change found in %d iterations", it-1),
-# 			 domain=NA)
-# stats/R/nlm.R: 119
-# stop(gettextf("no sign change found in %d iterations", it-1),
-# 			 domain=NA)
-# stats/R/nlm.R: 128
-# stop(gettextf("no sign change found in %d iterations", it-1),
-# 			 domain=NA)
-msgid "no sign change found in %d iterations"
-msgstr "nie zaobserwowano zmiany znaku w %d iteracjach"
+#. R/lm.R: gettextf("method = '%s' is not supported. Using 'qr'", method)
+#. R/lm.R: gettextf("method = '%s' is not supported. Using 'qr'", method)
+#. R/lm.R: gettextf("method = '%s' is not supported. Using 'qr'", method)
+#: R/lm.R:0
+msgid "method = '%s' is not supported. Using 'qr'"
+msgstr "'method = %s' nie jest wspierane. Używanie 'qr'"
 
-# stats/R/nlm.R: 140
-# stop(if(doX)
-# 	"did not succeed extending the interval endpoints for f(lower) * f(upper) <= 0"
-# 	     else "f() values at end points not of opposite sign")
+#. R/optim.R: warning("method L-BFGS-B uses 'factr' (and 'pgtol') instead of 'reltol' and 'abstol'")
+#: R/optim.R:0
 msgid ""
-"did not succeed extending the interval endpoints for f(lower) * f(upper) <= 0"
+"method L-BFGS-B uses 'factr' (and 'pgtol') instead of 'reltol' and 'abstol'"
 msgstr ""
-"nie udało się rozszerzenie końców przedziału dla f(dolny) * f(górny) <= 0"
-
-# stats/R/nlm.R: 140
-# stop(if(doX)
-# 	"did not succeed extending the interval endpoints for f(lower) * f(upper) <= 0"
-# 	     else "f() values at end points not of opposite sign")
-msgid "f() values at end points not of opposite sign"
-msgstr "wartości 'f()' na końcach nie są przeciwnego znaku"
-
-# stats/R/nlm.R: 150
-# stop("convergence problem in zero finding: ", conditionMessage(val))
-msgid "convergence problem in zero finding:"
-msgstr "problem zbieżności podczas znajdywania zer"
+"metoda L-BFGS-B używa 'factr' (oraz 'pgtol') zamiast 'reltol' oraz 'abstol'"
 
-# stats/R/nlminb.R: 82
-# stop("'control' argument must be a named list")
-# stats/R/nls.R: 398
-# stop("'control' argument must be a named list")
-msgid "'control' argument must be a named list"
-msgstr "argument 'control' musi być nazwaną listą"
+#. R/dendrogram.R: warning("midcache() of non-binary dendrograms only partly implemented")
+#: R/dendrogram.R:0
+msgid "midcache() of non-binary dendrograms only partly implemented"
+msgstr ""
+"'midcache()' dla niebinarnych drzew celu tylko częściowo zaimplementowane"
 
-# stats/R/nlminb.R: 111
-# stop("logical 'hessian' argument not allowed.  See documentation.")
-msgid "logical 'hessian' argument not allowed.  See documentation."
-msgstr "logiczny argument 'hessian' nie jest dozwolony. Zobacz dokumentację."
+#. R/bandwidths.R: warning("minimum occurred at one end of the range")
+#. R/bandwidths.R: warning("minimum occurred at one end of the range")
+#: R/bandwidths.R:0
+msgid "minimum occurred at one end of the range"
+msgstr "odnotowano wartość minimalną na jednym z końców zakresu"
 
-# stats/R/nls-profile.R: 57
-# stop("'params' has wrong length")
-msgid "'params' has wrong length"
-msgstr "argument 'params' ma niepoprawną długość"
+#. R/ppr.R: stop("mismatched 'x' and 'y'")
+#: R/ppr.R:0
+msgid "mismatched 'x' and 'y'"
+msgstr "niezgodne 'x' oraz 'y'"
 
-# stats/R/nls-profile.R: 63
-# stop("'varying' must be in seq_along(pars)")
-# stats/R/nls-profile.R: 70
-# stop("'varying' must be in seq_along(pars)")
-msgid "'varying' must be in seq_along(pars)"
-msgstr "'varying' musi być w przedziale 'seq_along(pars)'"
+#. R/lsfit.R: warning("missing observations deleted")
+#: R/lsfit.R:0
+msgid "missing observations deleted"
+msgstr "brakujące obserwacje zostały usunięte"
 
-# stats/R/nls-profile.R: 67
-# stop("'varying' has wrong length")
-msgid "'varying' has wrong length"
-msgstr "argument 'varying' ma niepoprawną długość"
+#. R/smspline.R: stop("missing or infinite values in inputs are not allowed")
+#: R/smspline.R:0
+msgid "missing or infinite values in inputs are not allowed"
+msgstr "wartości brakujące lub nieskończone nie są dozwolone na wejściach"
 
-# stats/R/nls-profile.R: 72
-# stop("'varying' must be logical, integer or character")
-msgid "'varying' must be logical, integer or character"
-msgstr "'varying' musi być wartością tekstową, logiczną lub liczbą całkowitą"
+#. R/lm.R: stop("missing or negative weights not allowed")
+#. R/nls.R: stop("missing or negative weights not allowed")
+#: R/lm.R:0 R/nls.R:0
+msgid "missing or negative weights not allowed"
+msgstr "brakujące lub ujemne wagi nie są dozwolone"
 
-# stats/R/nls-profile.R: 93
-# stop("invalid argument to 'getProfile'")
-msgid "invalid argument to 'getProfile'"
-msgstr "niepoprawny argument przekazany do funkcji 'getProfile()'"
+#. R/quantile.R: stop("missing values and NaN's not allowed if 'na.rm' is FALSE")
+#: R/quantile.R:0
+msgid "missing values and NaN's not allowed if 'na.rm' is FALSE"
+msgstr ""
+"brakujące wartości oraz wartości NaN nie są dozwolone jeśli 'na.rm = FALSE'"
 
-# stats/R/nls-profile.R: 95
-# stop("cannot recognize parameter name")
-msgid "cannot recognize parameter name"
-msgstr "nie można rozpoznać nazwy parametru"
+#. R/contr.poly.R: stop("missing values are not allowed in 'poly'")
+#: R/contr.poly.R:0
+msgid "missing values are not allowed in 'poly'"
+msgstr "brakujące wartości w 'poly()' nie są dozwolone"
 
-# stats/R/nls-profile.R: 233
-# warning("levels truncated to positive values only")
-msgid "levels truncated to positive values only"
-msgstr "poziomy przycięto tylko do wartości dodatnich"
+#. R/filter.R: stop("missing values in 'filter'")
+#: R/filter.R:0
+msgid "missing values in 'filter'"
+msgstr "brakujące wartości w argumencie 'filter'"
 
-# stats/R/nls.R: 175
-# stop("setVarying : 'vary' length must match length of parameters")
-# stats/R/nls.R: 339
-# stop("setVarying : 'vary' length must match length of parameters")
-msgid "setVarying : 'vary' length must match length of parameters"
-msgstr "setVarying : długość 'vary' musi zgadzać się z długością parametrów"
+#. R/nafns.R: stop("missing values in object")
+#: R/nafns.R:0
+msgid "missing values in object"
+msgstr "brakujące wartości w argumencie 'object'"
 
-# stats/R/nls.R: 297
-# stop("singular gradient matrix at initial parameter estimates")
-msgid "singular gradient matrix at initial parameter estimates"
-msgstr "osobliwa macierz gradientu w początkowych oszacowaniach parametru"
+#. R/isoreg.R: stop("missing values not allowed")
+#: R/isoreg.R:0
+msgid "missing values not allowed"
+msgstr "brakujące wartości są niedozwolone"
 
-# stats/R/nls.R: 454
-# stop("'data' must be a list or an environment")
-msgid "'data' must be a list or an environment"
-msgstr "'data' musi być listą albo środowiskiem"
+#. R/models.R: stop("model frame and formula mismatch in model.matrix()")
+#: R/models.R:0
+msgid "model frame and formula mismatch in model.matrix()"
+msgstr "ramka modelu oraz fomuła nie zgadzają się w 'model.matrix()'"
 
-# stats/R/nls.R: 506
-# stop("no starting values specified")
-msgid "no starting values specified"
-msgstr "nie określono wartości początkowych"
+#. R/AIC.R: warning("models are not all fitted to the same number of observations")
+#. R/AIC.R: warning("models are not all fitted to the same number of observations")
+#: R/AIC.R:0
+msgid "models are not all fitted to the same number of observations"
+msgstr "nie wszystkie modele są dopasowane do tej samej liczby obserwacji"
 
-# stats/R/nls.R: 518
-# stop(gettextf("parameters without starting value in 'data': %s",
-#                               paste(nnn, collapse=", ")), domain = NA)
-msgid "parameters without starting value in 'data': %s"
-msgstr "parametry bez początkowej wartości w 'data': %s"
+#. R/glm.R: stop("models were not all fitted to the same size of dataset")
+#. R/lm.R: stop("models were not all fitted to the same size of dataset")
+#. R/mlm.R: stop("models were not all fitted to the same size of dataset")
+#: R/glm.R:0 R/lm.R:0 R/mlm.R:0
+msgid "models were not all fitted to the same size of dataset"
+msgstr ""
+"nie wszystkie modele zostały dopasowane do zbioru danych tego samego rozmiaru"
 
-# stats/R/nls.R: 533
-# stop("no parameters to fit")
-msgid "no parameters to fit"
-msgstr "brak parametrów dla dopasowania"
+#. R/glm.R: gettextf("models with response %s removed because response differs from model 1",     sQuote(deparse(responses[!sameresp])))
+#. R/lm.R: gettextf("models with response %s removed because response differs from model 1",     sQuote(deparse(responses[!sameresp])))
+#. R/loess.R: gettextf("models with response %s removed because response differs from model 1",     sQuote(deparse(responses[!sameresp])))
+#. R/mlm.R: gettextf("models with response %s removed because response differs from model 1",     sQuote(deparse(responses[!sameresp])))
+#. R/nls.R: gettextf("models with response %s removed because response differs from model 1",     sQuote(deparse(responses[!sameresp])))
+#: R/glm.R:0 R/lm.R:0 R/loess.R:0 R/mlm.R:0 R/nls.R:0
+msgid "models with response %s removed because response differs from model 1"
+msgstr ""
+"modele ze zmienną zależną %s zostały usunięte, ponieważ zmienna zależna "
+"różni się od tego w modelu 1"
 
-# stats/R/nls.R: 547
-# warning("argument 'subset' will be ignored")
-msgid "argument 'subset' will be ignored"
-msgstr "argument 'subset' zostanie zignornowany"
+#. R/kmeans.R: stop("more cluster centers than data points")
+#: R/kmeans.R:0
+msgid "more cluster centers than data points"
+msgstr "więcej centrów grup niż punktów danych"
 
-# stats/R/nls.R: 549
-# warning("argument 'na.action' will be ignored")
-msgid "argument 'na.action' will be ignored"
-msgstr "argument 'na.action' zostanie zignornowany"
+#. R/kmeans.R: stop("more cluster centers than distinct data points.")
+#: R/kmeans.R:0
+msgid "more cluster centers than distinct data points."
+msgstr "więcej centrów grup niż odmiennych punktów danych."
 
-# stats/R/nls.R: 604
-# warning('upper and lower bounds ignored unless algorithm = "port"')
-msgid "upper and lower bounds ignored unless algorithm = \"port\""
+#. R/dummy.coef.R: stop("multivariate case with missing coefficients is not yet implemented")
+#. R/dummy.coef.R: stop("multivariate case with missing coefficients is not yet implemented")
+#: R/dummy.coef.R:0
+msgid "multivariate case with missing coefficients is not yet implemented"
 msgstr ""
-"górne oraz dolne granice zostały zignorowane, dopóki nie będzie 'algorithm = "
-"\"port\"'"
+"wielowymiarowy przypadek z brakującymi współczynnikami nie jest jeszcze "
+"zaimplementowany"
 
-# stats/R/nls.R: 818
-# stop("cannot calculate REML log-likelihood for \"nls\" objects")
-msgid "cannot calculate REML log-likelihood for \"nls\" objects"
-msgstr ""
-"nie można obliczyć REML logarytmu funkcji wiarygodności dla obiektów 'nls'"
+#. R/symnum.R: stop("must have 2 'symbols' for logical 'x' argument")
+#: R/symnum.R:0
+msgid "must have 2 'symbols' for logical 'x' argument"
+msgstr "potrzeba mieć dwa 'symbols' dla argumentu logicznego 'x'"
 
-# stats/R/nls.R: 851
-# stop("anova is only defined for sequences of \"nls\" objects")
-msgid "anova is only defined for sequences of \"nls\" objects"
-msgstr "'anova' jest zdefiniowana jedynie dla sekwencji obiektów 'nls'"
+#. R/zzModels.R: stop("must have at least 4 observations to fit an 'SSfol' model")
+#: R/zzModels.R:0
+msgid "must have at least 4 observations to fit an 'SSfol' model"
+msgstr "potrzeba mieć co najmniej 4 obserwacje aby dopasować model 'SSfol'"
 
-# stats/R/nls.R: 869
-# stop("'anova' is only defined for sequences of \"nls\" objects")
-msgid "'anova' is only defined for sequences of \"nls\" objects"
-msgstr "'anova' jest zdefiniowana jedynie dla sekwencji obiektów 'nls'"
+#. R/zzModels.R: stop("must have length of response = length of second argument to 'SSfol'")
+#: R/zzModels.R:0
+msgid "must have length of response = length of second argument to 'SSfol'"
+msgstr ""
+"potrzeba, aby długość zmiennej zależnej = długości drugiego argumentu 'SSfol'"
 
-# stats/R/nlsFunc.R: 38
-# stop(gettextf("formula '%s' must be of the form '~expr'",
-#                           deparse(as.vector(object))), domain = NA)
-msgid "formula '%s' must be of the form '~expr'"
-msgstr "formuła '%s' musi mieć formę '~expr'"
+#. R/hclust.R: stop("must have n >= 2 objects to cluster")
+#: R/hclust.R:0
+msgid "must have n >= 2 objects to cluster"
+msgstr "co najmniej 2 obiekty są potrzebne aby móc grupować"
 
-# stats/R/nlsFunc.R: 50
-# stop(gettextf("'%s' cannot be of mode '%s'",
-#                                       substitute(object), mode(object)),
-#                              domain = NA)
-msgid "'%s' cannot be of mode '%s'"
-msgstr "argument '%s' nie może być trybu '%s'"
+#. R/kmeans.R: stop("must have same number of columns in 'x' and 'centers'")
+#: R/kmeans.R:0
+msgid "must have same number of columns in 'x' and 'centers'"
+msgstr "potrzeba mieć tę samą liczbę kolumn w 'x' oraz 'centers'"
 
-# stats/R/oneway.test.R: 26
-# stop("a two-sided formula is required")
-msgid "a two-sided formula is required"
-msgstr "wymagana jest dwustronna formuła"
+#. R/spectrum.R: stop("must specify 'spans' or a valid kernel")
+#: R/spectrum.R:0
+msgid "must specify 'spans' or a valid kernel"
+msgstr "potrzeba określić 'spans' lub poprawne jądro"
 
-# stats/R/oneway.test.R: 42
-# stop("not enough groups")
-msgid "not enough groups"
-msgstr "niewystarczająca liczba grup"
+#. R/xtabs.R: stop("must supply either 'formula' or 'data'")
+#: R/xtabs.R:0
+msgid "must supply either 'formula' or 'data'"
+msgstr "potrzeba dostarczyć albo 'formula' albo 'data'"
 
-# stats/R/optim.R: 31
-# warning("bounds can only be used with method L-BFGS-B (or Brent)")
-msgid "bounds can only be used with method L-BFGS-B (or Brent)"
-msgstr "granice mogą być użyte jedynie z metodą L-BFGS-B (lub Brent)"
+#. R/contr.poly.R: stop("must supply one or more vectors")
+#: R/contr.poly.R:0
+msgid "must supply one or more vectors"
+msgstr "potrzeba dostarczyć jeden lub więecj wektorów"
 
-# stats/R/optim.R: 52
-# warning("unknown names in control: ", paste(noNms,collapse=", "))
-msgid "unknown names in control:"
-msgstr "nieznane nazwy w kontroli:"
+#. R/model.tables.R: stop("na.action must be a function")
+#: R/model.tables.R:0
+msgid "na.action must be a function"
+msgstr "argument 'na.action' musi być funkcją"
 
-# stats/R/optim.R: 54
-# warning("read the documentation for 'trace' more carefully")
-msgid "read the documentation for 'trace' more carefully"
-msgstr "przeczytaj dokumentację dotyczącą 'trace' bardziej uważnie"
+#. R/fisher.test.R: stop("need 2 or more non-zero column marginals")
+#: R/fisher.test.R:0
+msgid "need 2 or more non-zero column marginals"
+msgstr "2 lub więcej niezerowych granic kolumny jest wymagane"
 
-# stats/R/optim.R: 56
-# stop("'trace != 0' needs 'REPORT >= 1'")
-msgid "'trace != 0' needs 'REPORT >= 1'"
-msgstr "'trace != 0' potrzebuje 'REPORT >= 1'"
+#. R/fisher.test.R: stop("need 2 or more non-zero row marginals")
+#: R/fisher.test.R:0
+msgid "need 2 or more non-zero row marginals"
+msgstr "2 lub więcej niezerowych granic wiersza jest wymagane"
 
-# stats/R/optim.R: 59
-# warning("method L-BFGS-B uses 'factr' (and 'pgtol') instead of 'reltol' and 'abstol'")
+#. R/family.R: stop("need CRAN package 'SuppDists' for simulation from the 'inverse.gaussian' family")
+#: R/family.R:0
 msgid ""
-"method L-BFGS-B uses 'factr' (and 'pgtol') instead of 'reltol' and 'abstol'"
+"need CRAN package 'SuppDists' for simulation from the 'inverse.gaussian' "
+"family"
 msgstr ""
-"metoda L-BFGS-B używa 'factr' (oraz 'pgtol') zamiast 'reltol' oraz 'abstol'"
+"pakiet CRAN 'SuppDists' jest potrzebny do symulacji z rodziny 'inverse."
+"gaussian'"
 
-# stats/R/optim.R: 61
-# warning("one-dimensional optimization by Nelder-Mead is unreliable:\nuse \"Brent\" or optimize() directly")
-msgid ""
-"one-dimensional optimization by Nelder-Mead is unreliable:\n"
-"use \"Brent\" or optimize() directly"
-msgstr ""
-"jednowymiarowa optymalizacja metodą Neldera-Meada nie jest wiarygodna:\n"
-"użyj 'Brent' lub 'optimize()' bezpośrednio"
+#. R/update.R: stop("need an object with call component")
+#: R/update.R:0
+msgid "need an object with call component"
+msgstr "potrzeba obiektu z komponentem wywołania"
 
-# stats/R/optim.R: 63
-# stop('method = "Brent" is only available for one-dimensional optimization')
-msgid "method = \"Brent\" is only available for one-dimensional optimization"
-msgstr ""
-"'metod = \"Brent\"' jest dostępna jedynie dla jednowymiarowej optymalizacji"
+#. R/bandwidths.R: stop("need at least 2 data points")
+#. R/bandwidths.R: stop("need at least 2 data points")
+#. R/bandwidths.R: stop("need at least 2 data points")
+#. R/bandwidths.R: stop("need at least 2 data points")
+#. R/bandwidths.R: stop("need at least 2 data points")
+#: R/bandwidths.R:0
+msgid "need at least 2 data points"
+msgstr "potrzeba przynajmniej 2 punktów"
 
-# stats/R/optim.R: 68
-# stop("'lower' and 'upper' must be finite values")
-msgid "'lower' and 'upper' must be finite values"
-msgstr "'lower' oraz 'upper' muszą być skończonymi wartościami"
+#. R/HoltWinters.R: stop("need at least 2 periods to compute seasonal start values")
+#: R/HoltWinters.R:0
+msgid "need at least 2 periods to compute seasonal start values"
+msgstr "potrzeba co najmniej 2 okresów aby obliczyć sezonowe wartości startowe"
 
-# stats/R/pairwise.R: 24
-# stop("pooling of SD is incompatible with paired tests")
-msgid "pooling of SD is incompatible with paired tests"
+#. R/density.R: stop("need at least 2 points to select a bandwidth automatically")
+#: R/density.R:0
+msgid "need at least 2 points to select a bandwidth automatically"
 msgstr ""
-"zbieranie standardowego odchylenia jest niezgodne ze sparowanymi testami"
+"co najmniej 2 punkty są potrzebne aby automatycznie wybrać szerokość pasma"
 
-# stats/R/pairwise.R: 94
-# stop("'x' must have 2 columns")
-# stats/R/prop.test.R: 34
-# stop("'x' must have 2 columns")
-msgid "'x' must have 2 columns"
-msgstr "'x' musi mieć 2 kolumny"
+#. R/smspline.R: stop("need at least four unique 'x' values")
+#: R/smspline.R:0
+msgid "need at least four unique 'x' values"
+msgstr "potrzeba przynajmniej czterech unikalnych wartości 'x'"
 
-# stats/R/pairwise.R: 101
-# stop("'x' and 'n' must have the same length")
-# stats/R/prop.test.R: 42
-# stop("'x' and 'n' must have the same length")
-msgid "'x' and 'n' must have the same length"
-msgstr "argumenty 'x' oraz 'n' muszą mieć tę samą długość"
-
-# stats/R/pairwise.R: 107
-# stop("too few groups")
-msgid "too few groups"
-msgstr "zbyt mało grup"
+#. R/approx.R: stop("need at least two non-NA values to interpolate")
+#. R/approx.R: stop("need at least two non-NA values to interpolate")
+#: R/approx.R:0
+msgid "need at least two non-NA values to interpolate"
+msgstr "co najmniej dwie wartości nie-NA są wymagane do interpolacji"
 
-# stats/R/plot.lm.R: 35
-# warning(gettextf("not plotting observations with leverage one:\n  %s",
-#                              paste(which(isInf), collapse=", ")),
-#                     call. = FALSE, domain = NA)
-msgid ""
-"not plotting observations with leverage one:\n"
-"  %s"
-msgstr ""
-"brak wykreślalnych obserwacji z jednej transmisji:\n"
-"  %s"
+#. R/hclust.R: stop("need dendrograms where all leaves have labels")
+#: R/hclust.R:0
+msgid "need dendrograms where all leaves have labels"
+msgstr "potrzeba drzew celu, gdzie liście nie posiadają etykiet"
 
-# stats/R/plot.lm.R: 44
-# stop("use only with \"lm\" objects")
-msgid "use only with \"lm\" objects"
-msgstr "używaj tylko z obiektami klasy \"lm\""
+#. R/manova.R: stop("need multiple responses")
+#. R/manova.R: stop("need multiple responses")
+#. R/manova.R: stop("need multiple responses")
+#: R/manova.R:0
+msgid "need multiple responses"
+msgstr "potrzeba wielokrotnych zmiennych zależnych"
 
-# stats/R/plot.lm.R: 46
-# stop("'which' must be in 1:6")
-msgid "'which' must be in 1:6"
-msgstr "'which' musi być w przedziale 1:6"
+#. R/median.R: stop("need numeric data")
+#: R/median.R:0
+msgid "need numeric data"
+msgstr "potrzeba danych liczbowych"
 
-# stats/R/plot.lm.R: 90
-# stop(gettextf("'id.n' must be in {1,..,%d}", n), domain = NA)
-msgid "'id.n' must be in {1,..,%d}"
-msgstr "argument 'id.n' musi być w przedziale {1,..,%d}"
+#. R/smspline.R: stop("need result of smooth.spline(keep.data = TRUE)")
+#. R/smspline.R: stop("need result of smooth.spline(keep.data = TRUE)")
+#: R/smspline.R:0
+msgid "need result of smooth.spline(keep.data = TRUE)"
+msgstr "potrzeba wyniku 'smooth.spline(keep.data=TRUE)'"
 
-# stats/R/plot.lm.R: 231
-# message(gettextf("hat values (leverages) are all = %s\n and there are no factor predictors; no plot no. 5",
-#                                  format(mean(r.hat))),
-#                         domain = NA)
-msgid ""
-"hat values (leverages) are all = %s\n"
-" and there are no factor predictors; no plot no. 5"
-msgstr ""
-"wszystkie dopasowane wartości (zależne) są = %s\n"
-"oraz nie ma czynnikowych predyktorów; brak wykresu nr. 5"
+#. R/family.R: stop("negative values not allowed for the 'Poisson' family")
+#: R/family.R:0
+msgid "negative values not allowed for the 'Poisson' family"
+msgstr "ujemne wartości nie są dozwolone dla rodziny 'Poisson'"
 
-# stats/R/poisson.test.R: 31
-# stop("'x' and 'T' have incompatible length")
-msgid "'x' and 'T' have incompatible length"
-msgstr "argumenty 'x' oraz 'T' mają niezgodne długości"
+#. R/family.R: stop("negative values not allowed for the 'quasiPoisson' family")
+#: R/family.R:0
+msgid "negative values not allowed for the 'quasiPoisson' family"
+msgstr "ujemne wartości nie są dozwolone dla rodziny 'quasiPoisson'"
 
-# stats/R/poisson.test.R: 35
-# stop("'x' must be finite, nonnegative, and integer")
-msgid "'x' must be finite, nonnegative, and integer"
-msgstr "argument 'x' musi być skończoną nieujemną liczbą całkowitą"
+#. R/glm.R: stop("negative weights not allowed")
+#. R/lsfit.R: stop("negative weights not allowed")
+#: R/glm.R:0 R/lsfit.R:0
+msgid "negative weights not allowed"
+msgstr "ujemne wagi nie są dozwolone"
 
-# stats/R/poisson.test.R: 39
-# stop("'T' must be nonnegative")
-msgid "'T' must be nonnegative"
-msgstr "argument 'T' musi być nieujemny"
+#. R/factanal.R: stop("neither 'x' nor 'covmat' supplied")
+#: R/factanal.R:0
+msgid "neither 'x' nor 'covmat' supplied"
+msgstr "nie dostarczono 'x' ani 'covmat'"
 
-# stats/R/poisson.test.R: 43
-# stop("not enough data")
-# stats/R/prop.test.R: 49
-# stop("not enough data")
-msgid "not enough data"
-msgstr "zbyt mało danych"
+#. R/logLik.R: stop("no \"nobs\" attribute is available")
+#: R/logLik.R:0
+msgid "no \"nobs\" attribute is available"
+msgstr "brak dostępnego atrybutu 'nobs'"
 
-# stats/R/poisson.test.R: 46
-# stop("the case k > 2 is unimplemented")
-msgid "the case k > 2 is unimplemented"
-msgstr "przypadek dla k > 2 nie jest zaimplementowany"
+#. R/add.R: stop("no 'add1' method implemented for \"mlm\" models")
+#: R/add.R:0
+msgid "no 'add1' method implemented for \"mlm\" models"
+msgstr "brak zaimplementowanej metody 'add1' dla modeli 'mlm'"
 
-# stats/R/poisson.test.R: 49
-# stop ("'r' must be a single positive number")
-msgid "'r' must be a single positive number"
-msgstr "argument 'r' musi być pojedynczą dodatnią liczbą"
+#. R/stepfun.R: stop("no 'as.stepfun' method available for 'x'")
+#: R/stepfun.R:0
+msgid "no 'as.stepfun' method available for 'x'"
+msgstr "brak dostępnej metody 'as.stepfun' dla 'x'"
 
-# stats/R/power.R: 25
-# stop("exactly one of 'n', 'delta', 'sd', 'power', and 'sig.level' must be NULL")
-msgid ""
-"exactly one of 'n', 'delta', 'sd', 'power', and 'sig.level' must be NULL"
-msgstr ""
-"dokładnie jeden z 'groups', 'n', 'between.var', 'within.var', 'power', oraz "
-"'sig.level' musi mieć wartość NULL"
+#. R/add.R: stop("no 'drop1' method for \"mlm\" models")
+#: R/add.R:0
+msgid "no 'drop1' method for \"mlm\" models"
+msgstr "brak metody 'drop1' dla modeli 'mlm'"
 
-# stats/R/power.anova.test.R: 33
-# stop("'sig.level' must be numeric in [0, 1]")
-# stats/R/power.R: 28
-# stop("'sig.level' must be numeric in [0, 1]")
-# stats/R/power.R: 88
-# stop("'sig.level' must be numeric in [0, 1]")
-msgid "'sig.level' must be numeric in [0, 1]"
-msgstr "argument 'sig.level' musi być liczbą w przedziale [0, 1]"
+#. R/selfStart.R: gettextf("no 'getInitial' method found for \"%s\" objects", data.class(object))
+#: R/selfStart.R:0
+msgid "no 'getInitial' method found for \"%s\" objects"
+msgstr "nie znaleziono metody 'getInitial()' dla obiektów klasy \"%s\""
 
-# stats/R/power.R: 85
-# stop("exactly one of 'n', 'p1', 'p2', 'power', and 'sig.level' must be NULL")
-msgid "exactly one of 'n', 'p1', 'p2', 'power', and 'sig.level' must be NULL"
-msgstr ""
-"dokładnie jeden z 'n', 'p1', 'p2', 'power', oraz 'sig.level' musi mieć "
-"wartość NULL"
+#. R/logLik.R: warning("no 'nobs' method is available")
+#. R/logLik.R: stop("no 'nobs' method is available")
+#: R/logLik.R:0
+msgid "no 'nobs' method is available"
+msgstr "brak dostępnej metody 'nobs()'"
 
-# stats/R/power.anova.test.R: 26
-# stop("exactly one of 'groups', 'n', 'between.var', 'within.var', 'power', and 'sig.level' must be NULL")
-msgid ""
-"exactly one of 'groups', 'n', 'between.var', 'within.var', 'power', and 'sig."
-"level' must be NULL"
-msgstr ""
-"dokładnie jeden z 'groups', 'n', 'between.var', 'within.var', 'power', oraz "
-"'sig.level' musi mieć wartość NULL"
+#. R/reshape.R: stop("no 'reshapeWide' attribute, must specify 'varying'")
+#: R/reshape.R:0
+msgid "no 'reshapeWide' attribute, must specify 'varying'"
+msgstr "brak atrybutu 'reshapeWide', potrzeba określić 'varying'"
 
-# stats/R/power.anova.test.R: 28
-# stop("number of groups must be at least 2")
-msgid "number of groups must be at least 2"
-msgstr "liczba grup musi być przynajmniej równa 2"
+#. R/aov.R: stop("no degrees of freedom for residuals")
+#: R/aov.R:0
+msgid "no degrees of freedom for residuals"
+msgstr "brak stopni swobody dla reszt"
 
-# stats/R/power.anova.test.R: 30
-# stop("number of observations in each group must be at least 2")
-msgid "number of observations in each group must be at least 2"
-msgstr "liczba obserwacji w każdej grupie musi wynosić minimum 2"
+#. R/TukeyHSD.R: stop("no factors in the fitted model")
+#: R/TukeyHSD.R:0
+msgid "no factors in the fitted model"
+msgstr "brak czynników w dopasowanym modelu"
 
-# stats/R/ppr.R: 58
-# stop("'nterms' is missing with no default")
-msgid "'nterms' is missing with no default"
-msgstr "brakuje wartości dla 'nterms', a nie ma określonej wartości domyślnej"
+#. R/smspline.R: stop("no finite observations")
+#: R/smspline.R:0
+msgid "no finite observations"
+msgstr "brak skończonych obserwacji"
 
-# stats/R/ppr.R: 63
-# stop("'ppr' applies only to numerical variables")
-msgid "'ppr' applies only to numerical variables"
-msgstr "'ppr' stosuje się jedynie do zmiennych liczbowych"
+#. R/loess.R: stop("no models to compare")
+#: R/loess.R:0
+msgid "no models to compare"
+msgstr "brak modeli do porównania"
 
-# stats/R/ppr.R: 65
-# stop("mismatched 'x' and 'y'")
-msgid "mismatched 'x' and 'y'"
-msgstr "niezgodne 'x' oraz 'y'"
+#. R/glm.R: gettextf("no observations informative at iteration %d", iter)
+#: R/glm.R:0
+msgid "no observations informative at iteration %d"
+msgstr "brak obserwacji informacyjnych w iteracji %d"
 
-# stats/R/ppr.R: 204
-# stop("wrong number of columns in 'x'")
-msgid "wrong number of columns in 'x'"
-msgstr "niepoprawna liczba kolumn w 'x'"
+#. R/nls.R: stop("no parameters to fit")
+#: R/nls.R:0
+msgid "no parameters to fit"
+msgstr "brak parametrów dla dopasowania"
 
-# stats/R/prcomp.R: 29
-# stop("cannot rescale a constant/zero column to unit variance")
-msgid "cannot rescale a constant/zero column to unit variance"
-msgstr ""
-"nie można przeskalować kolumny stałych wartości/zer na jednostkową wariancję"
+#. R/ts.R: stop("no replacement values supplied")
+#: R/ts.R:0
+msgid "no replacement values supplied"
+msgstr "nie dostarczono wartości zamiennych"
 
-# stats/R/prcomp.R: 63
-# stop("PCA applies only to numerical variables")
-# stats/R/princomp.R: 34
-# stop("PCA applies only to numerical variables")
-# stats/R/princomp.R: 79
-# stop("PCA applies only to numerical variables")
-msgid "PCA applies only to numerical variables"
-msgstr ""
-"analiza głównych komponentów stosuje się jedynie do zmiennych liczbowych"
+#. R/aggregate.R: stop("no rows to aggregate")
+#: R/aggregate.R:0
+msgid "no rows to aggregate"
+msgstr "brak wierszy do zagregowania"
 
-# stats/R/prcomp.R: 120
-# stop("no scores are available: refit with 'retx=TRUE'")
+#. R/prcomp.R: stop("no scores are available: refit with 'retx=TRUE'")
+#: R/prcomp.R:0
 msgid "no scores are available: refit with 'retx=TRUE'"
 msgstr "brak dostępnych punktacji: dopasuj ponownie z 'retx=TRUE'"
 
-# stats/R/princomp-add.R: 23
-# stop("'newdata' must be a matrix or data frame")
-# stats/R/prcomp.R: 123
-# stop("'newdata' must be a matrix or data frame")
-msgid "'newdata' must be a matrix or data frame"
-msgstr "'newdata' musi być macierzą lub ramką danych"
+#. R/nlm.R: gettextf("no sign change found in %d iterations", it - 1)
+#. R/nlm.R: gettextf("no sign change found in %d iterations", it - 1)
+#. R/nlm.R: gettextf("no sign change found in %d iterations", it - 1)
+#: R/nlm.R:0
+msgid "no sign change found in %d iterations"
+msgstr "nie zaobserwowano zmiany znaku w %d iteracjach"
+
+#. R/bandwidths.R: stop("no solution in the specified range of bandwidths")
+#: R/bandwidths.R:0
+msgid "no solution in the specified range of bandwidths"
+msgstr "brak rozwiązania we wskazanym zakresie pasma"
+
+#. R/nls.R: stop("no starting values specified")
+#: R/nls.R:0
+msgid "no starting values specified"
+msgstr "nie określono wartości początkowych"
 
-# stats/R/princomp-add.R: 28
-# stop("'newdata' does not have named columns matching one or more of the original columns")
-# stats/R/prcomp.R: 127
-# stop("'newdata' does not have named columns matching one or more of the original columns")
+#. R/factanal.R: stop("no starting values supplied")
+#: R/factanal.R:0
+msgid "no starting values supplied"
+msgstr "nie określono wartości początkowych"
+
+#. R/models.R: stop("no terms component nor attribute")
+#: R/models.R:0
+msgid "no terms component nor attribute"
+msgstr "brak komponentu 'terms' oraz atrybutu"
+
+#. R/add.R: stop("no terms in scope")
+#. R/add.R: stop("no terms in scope")
+#: R/add.R:0
+msgid "no terms in scope"
+msgstr "brak członów w zakresie"
+
+#. R/add.R: stop("no terms in scope for adding to object")
+#. R/add.R: stop("no terms in scope for adding to object")
+#. R/add.R: stop("no terms in scope for adding to object")
+#: R/add.R:0
+msgid "no terms in scope for adding to object"
+msgstr "brak członów w zakresie do dodania do obiektu"
+
+#. R/ts.R: stop("no time series supplied")
+#: R/ts.R:0
+msgid "no time series supplied"
+msgstr "nie dostarczono szeregu czasowego"
+
+#. R/glm.R: stop("no valid set of coefficients has been found: please supply starting values",     call. = FALSE)
+#. R/glm.R: stop("no valid set of coefficients has been found: please supply starting values",     call. = FALSE)
+#: R/glm.R:0
 msgid ""
-"'newdata' does not have named columns matching one or more of the original "
-"columns"
+"no valid set of coefficients has been found: please supply starting values"
 msgstr ""
-"'newdata' nie ma nazwanych kolumn pasujących do jednej lub więcej "
-"oryginalnych kolumn"
+"nie znaleziono poprawnego zestawu współczynników: proszę dostarczyć wartości "
+"początkowe"
 
-# stats/R/princomp-add.R: 32
-# stop("'newdata' does not have the correct number of columns")
-# stats/R/prcomp.R: 131
-# stop("'newdata' does not have the correct number of columns")
-msgid "'newdata' does not have the correct number of columns"
-msgstr "'newdata' nie ma poprawnej liczby kolumn"
+#. R/lm.influence.R: stop("non-NA residual length does not match cases used in fitting")
+#: R/lm.influence.R:0
+msgid "non-NA residual length does not match cases used in fitting"
+msgstr ""
+"długości nie-NA reszt nie zgadzają się z przypadkami użytymi w dopasowaniu"
 
-# stats/R/princomp.R: 66
-# warning("both 'x' and 'covmat' were supplied: 'x' will be ignored")
-msgid "both 'x' and 'covmat' were supplied: 'x' will be ignored"
-msgstr "dostarczono jednocześnie 'x' oraz 'covmat': 'x' zostanie zignorowany"
+#. R/model.tables.R: gettextf("non-factors ignored: %s", paste(names(nn), collapse = ", "))
+#: R/model.tables.R:0
+msgid "non-factors ignored: %s"
+msgstr "zignorowano nie-czynniki: %s"
 
-# stats/R/princomp.R: 73
-# stop("'princomp' can only be used with more units than variables")
-msgid "'princomp' can only be used with more units than variables"
+#. R/density.R: stop("non-finite 'bw'")
+#: R/density.R:0
+msgid "non-finite 'bw'"
+msgstr "nieskończony argument 'bw'"
+
+#. R/density.R: stop("non-finite 'from'")
+#: R/density.R:0
+msgid "non-finite 'from'"
+msgstr "nieskończony argument 'from'"
+
+#. R/density.R: stop("non-finite 'to'")
+#: R/density.R:0
+msgid "non-finite 'to'"
+msgstr "nieskończony argument 'to'"
+
+#. R/glm.R: gettextf("non-finite coefficients at iteration %d", iter)
+#: R/glm.R:0
+msgid "non-finite coefficients at iteration %d"
+msgstr "nieskończone współczynniki w %d iteracji"
+
+#. R/family.R: warning("non-integer #successes in a binomial glm!")
+#: R/family.R:0
+msgid "non-integer #successes in a binomial glm!"
 msgstr ""
-"'princomp' może zostać użyte jedynie, gdy jednostek jest więcej niż zmiennych"
+"niecałkowita liczba sukcesów w rozkładzie Bernoulliego w funkcji 'glm()'!"
 
-# stats/R/princomp.R: 83
-# stop("cannot use 'cor = TRUE' with a constant variable")
-msgid "cannot use 'cor = TRUE' with a constant variable"
-msgstr "nie można użyć 'cor=TRUE' ze zmienną przyjmującą stałą wartość"
+#. R/family.R: warning("non-integer counts in a binomial glm!")
+#: R/family.R:0
+msgid "non-integer counts in a binomial glm!"
+msgstr "niecałkowita liczba zliczeń w rozkładzie Bernoulliego w 'glm'!"
 
-# stats/R/princomp.R: 91
-# stop("covariance matrix is not non-negative definite")
-msgid "covariance matrix is not non-negative definite"
-msgstr "macierz kowariancji nie jest nieujemnie określona"
+#. R/ts.R: warning("non-intersecting series")
+#: R/ts.R:0
+msgid "non-intersecting series"
+msgstr "nieprzecinające się szeregi"
 
-# stats/R/proj.R: 25
-# stop("argument does not include a 'qr' component")
-msgid "argument does not include a 'qr' component"
-msgstr "argument nie uwzględnia komponentu 'qr'"
+#. R/dendrogram.R: stop("non-leaf subtree of length 0")
+#: R/dendrogram.R:0
+msgid "non-leaf subtree of length 0"
+msgstr "bezlistne poddrzewo o długości 0"
 
-# stats/R/proj.R: 27
-# stop("argument does not include an 'effects' component")
-msgid "argument does not include an 'effects' component"
-msgstr "argument nie uwzględnia komponentu 'effects'"
+#. R/family.R: stop("non-positive values not allowed for the 'gamma' family")
+#: R/family.R:0
+msgid "non-positive values not allowed for the 'gamma' family"
+msgstr "niedodatnie wartości nie są dozwolone dla rodziny 'gamma'"
 
-# stats/R/proj.R: 39
-# stop("'proj' is not implemented for multiple responses")
-# stats/R/proj.R: 93
-# stop("'proj' is not implemented for multiple responses")
-msgid "'proj' is not implemented for multiple responses"
-msgstr ""
-"funkcja 'proj()' nie jest zaimplementowana dla wielokrotnych zmiennych "
-"zależnych"
+#. R/dist.R: warning("non-square matrix")
+#: R/dist.R:0
+msgid "non-square matrix"
+msgstr "macierz niekwadratowa"
 
-# stats/R/prop.test.R: 27
-# stop("table 'x' should have 2 entries")
-msgid "table 'x' should have 2 entries"
-msgstr "tabela 'x' powinna mieć 2 wpisy"
+#. R/arima.R: stop("non-stationary AR part")
+#. R/arma0.R: stop("non-stationary AR part")
+#: R/arima.R:0 R/arma0.R:0
+msgid "non-stationary AR part"
+msgstr "niestacjonarna część autoregresji"
 
-# stats/R/prop.test.R: 51
-# stop("elements of 'n' must be positive")
-msgid "elements of 'n' must be positive"
-msgstr "elementy 'n' muszą być dodatnie"
+#. R/arima.R: stop("non-stationary AR part from CSS")
+#: R/arima.R:0
+msgid "non-stationary AR part from CSS"
+msgstr "niestacjonarna część autoregresji z warunkowej sumy kwadratów"
 
-# stats/R/prop.test.R: 53
-# stop("elements of 'x' must be nonnegative")
-msgid "elements of 'x' must be nonnegative"
-msgstr "elementy 'x' muszą być nieujemne"
+#. R/arima.R: stop("non-stationary seasonal AR part")
+#. R/arma0.R: stop("non-stationary seasonal AR part")
+#: R/arima.R:0 R/arma0.R:0
+msgid "non-stationary seasonal AR part"
+msgstr "niestacjonarna sezonowa część autoregresji"
 
-# stats/R/prop.test.R: 55
-# stop("elements of 'x' must not be greater than those of 'n'")
-msgid "elements of 'x' must not be greater than those of 'n'"
-msgstr "elementy 'x' nie mogą być większe niż elementy 'n'"
+#. R/arima.R: stop("non-stationary seasonal AR part from CSS")
+#: R/arima.R:0
+msgid "non-stationary seasonal AR part from CSS"
+msgstr "niestacjonarna sezonowa część autoregresji z warunkowej sumy kwadratów"
 
-# stats/R/prop.test.R: 64
-# stop("'p' must have the same length as 'x' and 'n'")
-msgid "'p' must have the same length as 'x' and 'n'"
-msgstr "argumenty 'p' musi mieć tę samą długość co 'x' oraz 'n'"
+#. R/ts.R: stop("non-time series not of the correct length")
+#: R/ts.R:0
+msgid "non-time series not of the correct length"
+msgstr "szeregi nie-czasowe nie mają poprawnej długości"
 
-# stats/R/prop.test.R: 67
-# stop("elements of 'p' must be in (0,1)")
-msgid "elements of 'p' must be in (0,1)"
-msgstr "elementy 'p' muszą być w przedziale (0,1)"
+#. R/smspline.R: stop("not a valid \"smooth.spline\" object")
+#: R/smspline.R:0
+msgid "not a valid \"smooth.spline\" object"
+msgstr "to nie jest poprawny obiekt klasy \"smooth.spline\""
 
-# stats/R/qqnorm.R: 31
-# stop("y is empty or has only NAs")
-msgid "y is empty or has only NAs"
-msgstr "argument 'y' jest pusty lub posiada jedynie wartości NA"
+#. R/stepfun.R: stop("not a valid step function")
+#: R/stepfun.R:0
+msgid "not a valid step function"
+msgstr "to nie jest poprawna funkcja krokowa"
 
-# stats/R/quade.test.R: 81
-# stop("'formula' missing")
-msgid "'formula' missing"
-msgstr "brakuje argumentu 'formula'"
+#. R/ts.R: stop("not all series have the same frequency")
+#: R/ts.R:0
+msgid "not all series have the same frequency"
+msgstr "nie wszystkie szeregi mają tę samą częstotliwość"
 
-# stats/R/quantile.R: 30
-# stop("factors are not allowed")
-msgid "factors are not allowed"
-msgstr "czynniki nie są dozwolone"
+#. R/friedman.test.R: stop("not an unreplicated complete block design")
+#. R/quade.test.R: stop("not an unreplicated complete block design")
+#: R/friedman.test.R:0 R/quade.test.R:0
+msgid "not an unreplicated complete block design"
+msgstr "to nie jest niezreplikowana kompletna konstrukcja bloku"
 
-# stats/R/quantile.R: 36
-# stop("missing values and NaN's not allowed if 'na.rm' is FALSE")
-msgid "missing values and NaN's not allowed if 'na.rm' is FALSE"
+#. R/ks.test.R: stop("not enough 'x' data")
+#: R/ks.test.R:0
+msgid "not enough 'x' data"
+msgstr "zbyt mało danych 'x'"
+
+#. R/ansari.test.R: stop("not enough 'x' observations")
+#. R/t.test.R: stop("not enough 'x' observations")
+#. R/t.test.R: stop("not enough 'x' observations")
+#. R/var.test.R: stop("not enough 'x' observations")
+#: R/ansari.test.R:0 R/t.test.R:0 R/var.test.R:0
+msgid "not enough 'x' observations"
+msgstr "niewystarczająca liczba obserwacji 'x'"
+
+#. R/ks.test.R: stop("not enough 'y' data")
+#: R/ks.test.R:0
+msgid "not enough 'y' data"
+msgstr "zbyt mało danych 'y'"
+
+#. R/ansari.test.R: stop("not enough 'y' observations")
+#. R/t.test.R: stop("not enough 'y' observations")
+#. R/var.test.R: stop("not enough 'y' observations")
+#. R/wilcox.test.R: stop("not enough 'y' observations")
+#: R/ansari.test.R:0 R/t.test.R:0 R/var.test.R:0 R/wilcox.test.R:0
+msgid "not enough 'y' observations"
+msgstr "niewystarczająca liczba obserwacji 'y'"
+
+#. R/wilcox.test.R: stop("not enough (finite) 'x' observations")
+#: R/wilcox.test.R:0
+msgid "not enough (finite) 'x' observations"
+msgstr "niewystarczająca liczba skończonych obserwacji"
+
+#. R/poisson.test.R: stop("not enough data")
+#. R/prop.test.R: stop("not enough data")
+#: R/poisson.test.R:0 R/prop.test.R:0
+msgid "not enough data"
+msgstr "zbyt mało danych"
+
+#. R/contrast.R: stop("not enough degrees of freedom to define contrasts")
+#. R/contrast.R: stop("not enough degrees of freedom to define contrasts")
+#. R/contrast.R: stop("not enough degrees of freedom to define contrasts")
+#: R/contrast.R:0
+msgid "not enough degrees of freedom to define contrasts"
+msgstr "niewystarczająca liczba stopni swobody do zdefiniowania kontrastów"
+
+#. R/cor.test.R: stop("not enough finite observations")
+#. R/cor.test.R: stop("not enough finite observations")
+#: R/cor.test.R:0
+msgid "not enough finite observations"
+msgstr "niewystarczająca liczba skończonych obserwacji"
+
+#. R/oneway.test.R: stop("not enough groups")
+#: R/oneway.test.R:0
+msgid "not enough groups"
+msgstr "niewystarczająca liczba grup"
+
+#. R/fligner.test.R: stop("not enough observations")
+#. R/kruskal.test.R: stop("not enough observations")
+#. R/mood.test.R: stop("not enough observations")
+#. R/oneway.test.R: stop("not enough observations")
+#. R/t.test.R: stop("not enough observations")
+#: R/fligner.test.R:0 R/kruskal.test.R:0 R/mood.test.R:0 R/oneway.test.R:0
+#: R/t.test.R:0
+msgid "not enough observations"
+msgstr "niewystarczająca liczba obserwacji"
+
+#. R/plot.lm.R: gettextf("not plotting observations with leverage one:\n  %s",     paste(which(isInf), collapse = ", "))
+#: R/plot.lm.R:0
+msgid ""
+"not plotting observations with leverage one:\n"
+"  %s"
 msgstr ""
-"brakujące wartości oraz wartości NaN nie są dozwolone jeśli 'na.rm = FALSE'"
+"brak wykreślalnych obserwacji z jednej transmisji:\n"
+"  %s"
 
-# stats/R/quantile.R: 39
-# stop("'probs' outside [0,1]")
-msgid "'probs' outside [0,1]"
-msgstr "argument 'probs' jest poza przedziałem [0,1]"
+#. R/ftable.R: stop("nothing to tabulate")
+#: R/ftable.R:0
+msgid "nothing to tabulate"
+msgstr "nic do tabulowania"
 
-# stats/R/r2dtable.R: 22
-# stop("invalid argument 'n'")
-msgid "invalid argument 'n'"
-msgstr "niepoprawny argument 'n'"
+#. R/symnum.R: stop("number of 'cutpoints' must be one less than number of symbols")
+#: R/symnum.R:0
+msgid "number of 'cutpoints' must be one less than number of symbols"
+msgstr "liczba 'cutpoints' musi być o jeden mniejsza niż liczba symboli"
 
-# stats/R/r2dtable.R: 24
-# stop("invalid argument 'r'")
-msgid "invalid argument 'r'"
-msgstr "niepoprawny argument 'r'"
+#. R/symnum.R: stop("number of 'cutpoints' must be one more than number of symbols")
+#: R/symnum.R:0
+msgid "number of 'cutpoints' must be one more than number of symbols"
+msgstr "liczba 'cutpoints' musi być o jeden większa niż liczba symboli"
 
-# stats/R/r2dtable.R: 26
-# stop("invalid argument 'c'")
-msgid "invalid argument 'c'"
-msgstr "niepoprawny argument 'c'"
+#. R/kmeans.R: stop("number of cluster centres must lie between 1 and nrow(x)",     call. = FALSE)
+#: R/kmeans.R:0
+msgid "number of cluster centres must lie between 1 and nrow(x)"
+msgstr "liczba centrów grup musi leżeć pomiędzy 1 a 'nrow(x)'"
 
-# stats/R/r2dtable.R: 28
-# stop("arguments 'r' and 'c' must have the same sums")
-msgid "arguments 'r' and 'c' must have the same sums"
-msgstr "argumenty 'r' oraz 'c' muszą mieć jednakowe sumy"
+#. R/ts.R: stop("number of differences must be a positive integer")
+#: R/ts.R:0
+msgid "number of differences must be a positive integer"
+msgstr "liczba różnic musi być dodatnią liczbą całkowitą"
 
-# stats/R/relevel.R: 22
-# stop("'relevel' only for factors")
-# stats/R/relevel.R: 25
-# stop("'relevel' only for factors")
-msgid "'relevel' only for factors"
-msgstr "'relevel' tylko dla czynników"
+#. R/power.anova.test.R: stop("number of groups must be at least 2")
+#: R/power.anova.test.R:0
+msgid "number of groups must be at least 2"
+msgstr "liczba grup musi być przynajmniej równa 2"
 
-# stats/R/relevel.R: 31
-# stop("'ref' must be of length one")
-msgid "'ref' must be of length one"
-msgstr "argument 'ref' musi być długości 1"
+#. R/smspline.R: stop("number of observations in 'x' and 'y' must match.")
+#: R/smspline.R:0
+msgid "number of observations in 'x' and 'y' must match."
+msgstr "liczba obserwacji w argumentach 'x' oraz 'y' musi się zgadzać"
 
-# stats/R/relevel.R: 35
-# stop("'ref' must be an existing level")
-msgid "'ref' must be an existing level"
-msgstr "'ref' musi być istniejącym poziomem"
+#. R/power.anova.test.R: stop("number of observations in each group must be at least 2")
+#: R/power.anova.test.R:0
+msgid "number of observations in each group must be at least 2"
+msgstr "liczba obserwacji w każdej grupie musi wynosić minimum 2"
 
-# stats/R/relevel.R: 38
-# stop(gettextf("ref = %d must be in 1L:%d", ref, nlev), domain = NA)
-msgid "ref = %d must be in 1L:%d"
-msgstr "ref = %d musi być w przedziale 1L:%d"
+#. R/glm.R: gettextf("number of offsets is %d should equal %d (number of observations)",     length(offset), NROW(Y))
+#: R/glm.R:0
+msgid "number of offsets is %d should equal %d (number of observations)"
+msgstr "liczba przesunięć (%d) powinna być równa liczbie obserwacji (%d)"
 
-# stats/R/reshape.R: 31
-# stop("'sep' must be a character string")
-msgid "'sep' must be a character string"
-msgstr "'sep' musi być łańcuchem tekstowym"
+#. R/lm.R: gettextf("number of offsets is %d, should equal %d (number of observations)",     length(offset), NROW(y))
+#: R/lm.R:0
+msgid "number of offsets is %d, should equal %d (number of observations)"
+msgstr "liczba przesunięć (%d) powinna być równa liczbie obserwacji (%d)"
 
-# stats/R/reshape.R: 46
-# stop("failed to guess time-varying variables from their names")
-msgid "failed to guess time-varying variables from their names"
-msgstr "nie udało się odgadnąć zmiennych zależnych od czasu z ich nazw"
+#. R/add.R: stop("number of rows in use has changed: remove missing values?")
+#. R/add.R: stop("number of rows in use has changed: remove missing values?")
+#. R/add.R: stop("number of rows in use has changed: remove missing values?")
+#: R/add.R:0
+msgid "number of rows in use has changed: remove missing values?"
+msgstr "liczba wierszy w użyciu zmieniła się: usunąć brakujące wartości?"
 
-# stats/R/reshape.R: 65
-# stop("'varying' arguments must be the same length")
-msgid "'varying' arguments must be the same length"
-msgstr "argumenty 'varying' muszą być tej samej długości"
+#. R/ar.R: stop("number of series in 'object' and 'newdata' do not match")
+#: R/ar.R:0
+msgid "number of series in 'object' and 'newdata' do not match"
+msgstr "liczba serii w 'object' oraz 'newdata' nie zgadzają się"
 
-# stats/R/reshape.R: 66
-# stop("'times' is wrong length")
-msgid "'times' is wrong length"
-msgstr "argument 'times' ma niepoprawną długość"
+#. R/ts.R: stop("number of values supplied is not a sub-multiple of the number of values to be replaced")
+#: R/ts.R:0
+msgid ""
+"number of values supplied is not a sub-multiple of the number of values to "
+"be replaced"
+msgstr ""
+"liczba dostarczonych wartości nie jest pod-wielokrotnością liczby wartości "
+"do zamiany"
 
-# stats/R/reshape.R: 157
-# warning("there are records with missing times, which will be dropped.")
-msgid "there are records with missing times, which will be dropped."
-msgstr "pojawiają się rekordy z brakującymi czasami, które zostaną pominięte."
+#. R/lsfit.R: gettextf("number of weights = %d should equal %d (number of responses)",     nwts, nry)
+#: R/lsfit.R:0
+msgid "number of weights = %d should equal %d (number of responses)"
+msgstr "liczba wag = %d powinna być równa %d (liczbie zmiennych zależnych)"
 
-# stats/R/reshape.R: 177
-# warning(gettextf("some constant variables (%s) are really varying",
-#                                  paste(names(rval)[!really.constant],collapse = ",")), domain = NA)
-msgid "some constant variables (%s) are really varying"
-msgstr "niektóre zmienne o stałej wartości (%s) tak naprawdę się zmieniają"
+#. R/smspline.R: stop("number of weights must match number of observations.")
+#: R/smspline.R:0
+msgid "number of weights must match number of observations."
+msgstr "liczba wag musi zgadzać się z liczbą obserwacji"
 
-# stats/R/reshape.R: 235
-# stop("no 'reshapeWide' attribute, must specify 'varying'")
-msgid "no 'reshapeWide' attribute, must specify 'varying'"
-msgstr "brak atrybutu 'reshapeWide', potrzeba określić 'varying'"
+#. R/contrast.R: stop("numeric contrasts or contrast name expected")
+#: R/contrast.R:0
+msgid "numeric contrasts or contrast name expected"
+msgstr "oczekiwano kontrastów liczbowych lub nazwy kontrastu"
 
-# stats/R/reshape.R: 246
-# stop("'varying' must be nonempty list or vector")
-msgid "'varying' must be nonempty list or vector"
-msgstr "'varying' musi być niepustą listą lub wektorem"
+#. R/ksmooth.R: stop("numeric y must be supplied.\nFor density estimation use density()")
+#: R/ksmooth.R:0
+msgid ""
+"numeric y must be supplied.\n"
+"For density estimation use density()"
+msgstr ""
+"liczbowy argument 'y' musi zostać dostarczony.\n"
+"Dla estymacji gęstości użyj 'density()'"
 
-# stats/R/reshape.R: 253
-# stop("length of 'v.names' does not evenly divide length of 'varying'")
-msgid "length of 'v.names' does not evenly divide length of 'varying'"
-msgstr "długość 'v.names' nie dzieli równo długości 'varying'"
+#. R/biplot.R: gettextf("object '%s' has no scores", deparse(substitute(x)))
+#. R/biplot.R: gettextf("object '%s' has no scores", deparse(substitute(x)))
+#: R/biplot.R:0
+msgid "object '%s' has no scores"
+msgstr "obiekt '%s' nie ma punktów"
+
+#. R/manova.R: gettextf("object must be of class %s or %s", dQuote("manova"),     dQuote("maov"))
+#: R/manova.R:0
+msgid "object must be of class %s or %s"
+msgstr "obiekt musi być klasy %s lub %s"
+
+#. R/C.R: stop("object not interpretable as a factor")
+#: R/C.R:0
+msgid "object not interpretable as a factor"
+msgstr "argument 'object' nie jest interpretowalny jako czynnik"
+
+#. R/lsfit.R: warning("observations with 0 weight not used in calculating standard deviation")
+#: R/lsfit.R:0
+msgid "observations with 0 weight not used in calculating standard deviation"
+msgstr ""
+"obserwacje z zerową wagą nie zostały użyte podczas obliczania odchylenia "
+"standardowego"
+
+#. R/lsfit.R: warning("observations with 0 weights not used")
+#: R/lsfit.R:0
+msgid "observations with 0 weights not used"
+msgstr "obserwacje z zerową wagą nie zostały użyte"
 
-# stats/R/reshape.R: 258
-# stop("length of 'varying' must be the product of length of 'v.names' and length of 'times'")
+#. R/glm.R: warning("observations with zero weight not used for calculating dispersion")
+#: R/glm.R:0
+msgid "observations with zero weight not used for calculating dispersion"
+msgstr ""
+"obserwacje z zerową wagą nie zostały użyte podczas kalkulacji dyspersji"
+
+#. R/optim.R: warning("one-dimensional optimization by Nelder-Mead is unreliable:\nuse \"Brent\" or optimize() directly")
+#: R/optim.R:0
 msgid ""
-"length of 'varying' must be the product of length of 'v.names' and length of "
-"'times'"
+"one-dimensional optimization by Nelder-Mead is unreliable:\n"
+"use \"Brent\" or optimize() directly"
 msgstr ""
-"długość 'varying' musi być iloczynem długości 'v.names' oraz długości 'times'"
+"jednowymiarowa optymalizacja metodą Neldera-Meada nie jest wiarygodna:\n"
+"użyj 'Brent' lub 'optimize()' bezpośrednio"
 
-# stats/R/runmed.R: 30
-# stop("invalid value of 'k'")
-msgid "invalid value of 'k'"
-msgstr "niepoprawna wartość 'k'"
+#. R/cmdscale.R: gettextf("only %d of the first %d eigenvalues are > 0", k1, k)
+#: R/cmdscale.R:0
+msgid "only %d of the first %d eigenvalues are > 0"
+msgstr "tylko %d pierwszych %d wartości własnych jest > 0"
 
-# stats/R/runmed.R: 31
-# stop("'k' must be positive")
-msgid "'k' must be positive"
-msgstr "argument 'k' musi być dodatni"
+#. R/loess.R: stop("only 1-4 predictors are allowed")
+#: R/loess.R:0
+msgid "only 1-4 predictors are allowed"
+msgstr "tylko od 1 do 4 predyktorów jest dozwolone"
 
-# stats/R/runmed.R: 33
-# warning(gettextf("'k' must be odd!  Changing 'k' to %d",
-#                          k <- as.integer(1+ 2*(k %/% 2))), domain = NA)
-msgid "'k' must be odd!  Changing 'k' to %d"
-msgstr "'k' musi być nieparzyste!  Zmienianie 'k' na %d"
+#. R/StructTS.R: stop("only implemented for univariate time series")
+#. R/arima.R: stop("only implemented for univariate time series")
+#. R/arma0.R: stop("only implemented for univariate time series")
+#. R/cpgram.R: stop("only implemented for univariate time series")
+#: R/StructTS.R:0 R/arima.R:0 R/arma0.R:0 R/cpgram.R:0
+msgid "only implemented for univariate time series"
+msgstr "zaimplementowane tylko dla jednowymiarowego szeregu czasowego"
 
-# stats/R/runmed.R: 40
-# warning(gettextf("'k' is bigger than 'n'!  Changing 'k' to %d",
-#                          k <- as.integer(1+ 2*((n - 1)%/% 2))), domain = NA)
-msgid "'k' is bigger than 'n'!  Changing 'k' to %d"
-msgstr "'k' jest większe niż 'n'!  Zmienianie 'k' na %d"
+#. R/ts.R: stop("only replacement of elements is allowed")
+#: R/ts.R:0
+msgid "only replacement of elements is allowed"
+msgstr "dozwolona jest tylko zamiana elementów"
 
-# stats/R/runmed.R: 94
-# stop("bandwidth 'k' must be >= 1 and odd!")
-msgid "bandwidth 'k' must be >= 1 and odd!"
-msgstr "pasmo 'k' musi być >= 1 i musi być nieparzyste!"
+#. R/stl.R: stop("only univariate series are allowed")
+#: R/stl.R:0
+msgid "only univariate series are allowed"
+msgstr "tylko jednowymiarowe serie są dozwolone"
+
+#. R/HoltWinters.R: gettextf("optimization difficulties: %s", sol$message)
+#. R/HoltWinters.R: gettextf("optimization difficulties: %s", sol$message)
+#. R/HoltWinters.R: gettextf("optimization difficulties: %s", sol$message)
+#. R/HoltWinters.R: gettextf("optimization difficulties: %s", sol$message)
+#: R/HoltWinters.R:0
+msgid "optimization difficulties: %s"
+msgstr "problemy optymalizacji: %s"
+
+#. R/HoltWinters.R: stop("optimization failure")
+#. R/HoltWinters.R: stop("optimization failure")
+#. R/HoltWinters.R: stop("optimization failure")
+#. R/HoltWinters.R: stop("optimization failure")
+#: R/HoltWinters.R:0
+msgid "optimization failure"
+msgstr "niepowodzenie optymalizacji"
+
+#. R/anova.R: warning("option \"show.coef.Pvalues\" is invalid: assuming TRUE")
+#: R/anova.R:0
+msgid "option \"show.coef.Pvalues\" is invalid: assuming TRUE"
+msgstr "opcja \"show.coef.Pvalues\" jest niepoprawna: zakładanie TRUE"
+
+#. R/anova.R: warning("option \"show.signif.stars\" is invalid: assuming TRUE")
+#: R/anova.R:0
+msgid "option \"show.signif.stars\" is invalid: assuming TRUE"
+msgstr "opcja \"show.signif.stars\" jest niepoprawna: zakładanie TRUE"
+
+#. R/contr.poly.R: gettextf("orthogonal polynomials cannot be represented accurately enough for %d degrees of freedom",     n - 1)
+#: R/contr.poly.R:0
+msgid ""
+"orthogonal polynomials cannot be represented accurately enough for %d "
+"degrees of freedom"
+msgstr ""
+"ortogonalne wielomiany nie mogą być reprezentowane wystarczająco dokładnie "
+"dla %d stopni swobody"
 
-# stats/R/selfStart.R: 81
-# stop("argument 'object' has an impossible length")
-msgid "argument 'object' has an impossible length"
-msgstr "argument 'object' ma nieprawdopodobną długość"
+#. R/ks.test.R: warning("p-value will be approximate in the presence of ties")
+#: R/ks.test.R:0
+msgid "p-value will be approximate in the presence of ties"
+msgstr ""
+"wartość prawdopodobieństwa w obecności powtórzonych wartości będzie "
+"przybliżona"
 
-# stats/R/selfStart.R: 118
-# stop(gettextf("no 'getInitial' method found for \"%s\" objects",
-#                   data.class(object)), domain = NA)
-msgid "no 'getInitial' method found for \"%s\" objects"
-msgstr "nie znaleziono metody 'getInitial()' dla obiektów klasy \"%s\""
+#. R/confint.R: stop("package 'MASS' must be installed")
+#. R/confint.R: stop("package 'MASS' must be installed")
+#: R/confint.R:0
+msgid "package 'MASS' must be installed"
+msgstr "pakiet 'MASS' musi być zainstalowany"
 
-# stats/R/shapiro.test.R: 26
-# stop("sample size must be between 3 and 5000")
-msgid "sample size must be between 3 and 5000"
-msgstr "długość argumentu 'x' musi być pomiędzy 3 a 5000"
+#. R/nls.R: gettextf("parameters without starting value in 'data': %s", paste(nnn,     collapse = ", "))
+#: R/nls.R:0
+msgid "parameters without starting value in 'data': %s"
+msgstr "parametry bez początkowej wartości w 'data': %s"
 
-# stats/R/shapiro.test.R: 28
-# stop("all 'x' values are identical")
-msgid "all 'x' values are identical"
-msgstr "wszystkie wartości 'x' są identyczne"
+#. R/pairwise.R: stop("pooling of SD is incompatible with paired tests")
+#: R/pairwise.R:0
+msgid "pooling of SD is incompatible with paired tests"
+msgstr ""
+"zbieranie standardowego odchylenia jest niezgodne ze sparowanymi testami"
 
-# stats/R/smooth.R: 26
-# stop("attempt to smooth non-numeric values")
-msgid "attempt to smooth non-numeric values"
-msgstr "próba wygładzenia wartości nieliczbowych"
+#. R/family.R: stop("positive values only are allowed for the 'inverse.gaussian' family")
+#: R/family.R:0
+msgid "positive values only are allowed for the 'inverse.gaussian' family"
+msgstr "dodanie wartości są dozwolone jedynie dla rodziny 'inverse.gaussian'"
 
-# stats/R/smooth.R: 27
-# stop("attempt to smooth NA values")
-msgid "attempt to smooth NA values"
-msgstr "próba wygładzenia wartości NA"
+#. R/StructTS.R: gettextf("possible convergence problem: 'optim' gave code = %d and message %s",     res$convergence, sQuote(res$message))
+#: R/StructTS.R:0
+msgid "possible convergence problem: 'optim' gave code = %d and message %s"
+msgstr ""
+"prawdopodobny problem zbieżności: 'optim' zwrócił kod= %d oraz wiadomość %s"
 
-# stats/R/smooth.R: 29
-# stop("invalid 'endrule' argument")
-msgid "invalid 'endrule' argument"
-msgstr "niepoprawny argument 'endrule'"
+#. R/arima.R: gettextf("possible convergence problem: optim gave code = %d",     res$convergence)
+#. R/arima.R: gettextf("possible convergence problem: optim gave code = %d",     res$convergence)
+#. R/arma0.R: gettextf("possible convergence problem: optim gave code = %d",     code)
+#: R/arima.R:0 R/arma0.R:0
+msgid "possible convergence problem: optim gave code = %d"
+msgstr "prawdopodobny problem zbieżności: 'optim' zwrócił kod= %d"
 
-# stats/R/smspline.R: 49
-# stop("invalid 'control.spar'")
-msgid "invalid 'control.spar'"
-msgstr "niepoprawna wartość 'control.spar'"
+#. R/lm.R: warning("prediction from a rank-deficient fit may be misleading")
+#: R/lm.R:0
+msgid "prediction from a rank-deficient fit may be misleading"
+msgstr "predykcja z dopasowania z niedoborem rang może być myląca"
 
-# stats/R/smspline.R: 55
-# stop("missing or infinite values in inputs are not allowed")
-msgid "missing or infinite values in inputs are not allowed"
-msgstr "wartości brakujące lub nieskończone nie są dozwolone na wejściach"
+#. R/lm.R: warning("predictions on current data refer to _future_ responses\n")
+#: R/lm.R:0
+msgid "predictions on current data refer to _future_ responses"
+msgstr ""
+"predykcje na bieżących danych odnoszą się do _przyszłych_ wartości zmiennej "
+"zależnej"
 
-# stats/R/smspline.R: 57
-# stop("invalid number of points")
-msgid "invalid number of points"
-msgstr "niepoprawna liczba punktów"
+#. R/loess.R: stop("predictors must all be numeric")
+#: R/loess.R:0
+msgid "predictors must all be numeric"
+msgstr "wszystkie predyktory muszą być liczbami"
 
-# stats/R/smspline.R: 61
-# stop("lengths of 'x' and 'w' must match")
-msgid "lengths of 'x' and 'w' must match"
-msgstr "długości argumentów 'x' oraz 'w' muszą się zgadzać"
+#. R/distn.R: stop("probabilities must be finite, non-negative and not all 0")
+#: R/distn.R:0
+msgid "probabilities must be finite, non-negative and not all 0"
+msgstr ""
+"prawdopodobieństwa muszą być skończone, nieujemne i nie wszystkie ustawione "
+"na 0"
 
-# stats/R/smspline.R: 62
-# stop("all weights should be non-negative")
-msgid "all weights should be non-negative"
-msgstr "wszystkie wagi muszą być nieujemne"
+#. R/chisq.test.R: stop("probabilities must be non-negative.")
+#: R/chisq.test.R:0
+msgid "probabilities must be non-negative."
+msgstr "prawdopodobieństwa muszą być nieujemne."
 
-# stats/R/smspline.R: 63
-# stop("some weights should be positive")
-msgid "some weights should be positive"
-msgstr "niektóre wagi powinny być dodatnie"
+#. R/chisq.test.R: stop("probabilities must sum to 1.")
+#: R/chisq.test.R:0
+msgid "probabilities must sum to 1."
+msgstr "prawdopodobieństwa muszą sumować się do 1."
 
-# stats/R/smspline.R: 69
-# stop("'tol' must be strictly positive and finite")
-msgid "'tol' must be strictly positive and finite"
-msgstr "argument 'tol' musi być ściśle dodatni i skończony"
+#. R/optim.R: warning("read the documentation for 'trace' more carefully")
+#: R/optim.R:0
+msgid "read the documentation for 'trace' more carefully"
+msgstr "przeczytaj dokumentację dotyczącą 'trace' bardziej uważnie"
 
-# stats/R/smspline.R: 73
-# stop("need at least four unique 'x' values")
-msgid "need at least four unique 'x' values"
-msgstr "potrzeba przynajmniej czterech unikalnych wartości 'x'"
+#. R/relevel.R: gettextf("ref = %d must be in 1L:%d", ref, nlev)
+#: R/relevel.R:0
+msgid "ref = %d must be in 1L:%d"
+msgstr "ref = %d musi być w przedziale 1L:%d"
 
-# stats/R/smspline.R: 95
-# stop("'cv' must not be NA when 'df' is specified")
-msgid "'cv' must not be NA when 'df' is specified"
-msgstr "argument 'cv' nie może mieć wartości NA, gdy określono argument 'df'"
+#. R/wilcox.test.R: warning("requested conf.level not achievable")
+#. R/wilcox.test.R: warning("requested conf.level not achievable")
+#. R/wilcox.test.R: warning("requested conf.level not achievable")
+#. R/wilcox.test.R: warning("requested conf.level not achievable")
+#: R/wilcox.test.R:0
+msgid "requested conf.level not achievable"
+msgstr "żądany 'conf.level' nie jest osiągalny"
 
-# stats/R/smspline.R: 98
-# warning("cross-validation with non-unique 'x' values seems doubtful")
-msgid "cross-validation with non-unique 'x' values seems doubtful"
-msgstr "krzyżowa walidacja z nieunikalnymi wartościami 'x' wydaje się wątpliwa"
+#. R/factanal.R: stop("requested scores without an 'x' matrix")
+#: R/factanal.R:0
+msgid "requested scores without an 'x' matrix"
+msgstr "zażądano punktacji bez macierzy 'x'"
 
-# stats/R/smspline.R: 103
-# warning("'all.knots' is TRUE; 'nknots' specification is disregarded")
-msgid "'all.knots' is TRUE; 'nknots' specification is disregarded"
+#. R/lm.R: warning("residual degrees of freedom in object suggest this is not an \"lm\" fit")
+#: R/lm.R:0
+msgid "residual degrees of freedom in object suggest this is not an \"lm\" fit"
 msgstr ""
-"argument 'all.knots' ma wartość TRUE; specyfikacja 'nknots' została odrzucona"
+"stopnie swobody reszty w obiekcie sugerują, że nie jest do dopasowanie 'lm'"
 
-# stats/R/smspline.R: 110
-# stop("'nknots' must be numeric (in {1,..,n})")
-msgid "'nknots' must be numeric (in {1,..,n})"
-msgstr "'nknots' musi być liczbą (w przedziale {1,..,n})"
+#. R/manova.R: gettextf("residuals have rank %d < %d", rss.qr$rank, ncol(resid))
+#: R/manova.R:0
+msgid "residuals have rank %d < %d"
+msgstr "reszty mają rangę %d < %d"
 
-# stats/R/smspline.R: 112
-# stop("'nknots' must be at least 1")
-msgid "'nknots' must be at least 1"
-msgstr "argument 'nknots' musi wynosić co najmniej 1"
+#. R/mlm.R: gettextf("residuals have rank %s < %s", rss.qr$rank, pp)
+#. R/mlm.R: gettextf("residuals have rank %s < %s", rss.qr$rank, pp)
+#: R/mlm.R:0
+msgid "residuals have rank %s < %s"
+msgstr "reszty mają rangę %s < %s"
 
-# stats/R/smspline.R: 114
-# stop("cannot use more inner knots than unique 'x' values")
-msgid "cannot use more inner knots than unique 'x' values"
-msgstr "nie można użyć więcej wewnętrznych węzłów niż unikalnych wartości 'x'"
+#. R/factanal.R: stop("response not allowed in formula")
+#. R/prcomp.R: stop("response not allowed in formula")
+#. R/princomp.R: stop("response not allowed in formula")
+#: R/factanal.R:0 R/prcomp.R:0 R/princomp.R:0
+msgid "response not allowed in formula"
+msgstr "zmienna zależna nie jest dozwolona w formule"
 
-# stats/R/smspline.R: 129
-# stop("'spar' must be of length 1")
-msgid "'spar' must be of length 1"
-msgstr "argument 'spar' musi mieć długość 1"
+#. R/dendrogram.R: stop("row dendrogram ordering gave index of wrong length")
+#: R/dendrogram.R:0
+msgid "row dendrogram ordering gave index of wrong length"
+msgstr ""
+"porządkowanie drzewa celu względem wierszy zwróciło indeks o niepoprawnej "
+"długości"
 
-# stats/R/smspline.R: 138
-# warning("specified both 'df' and 'cv'; will disregard the latter")
-msgid "specified both 'df' and 'cv'; will disregard the latter"
-msgstr "określono jednocześnie 'df' oraz 'cv'; drugi zostanie odrzucony"
+#. R/mantelhaen.test.R: stop("sample size in each stratum must be > 1")
+#: R/mantelhaen.test.R:0
+msgid "sample size in each stratum must be > 1"
+msgstr "rozmiar próby w każdej warstwie musi być > 1"
 
-# stats/R/smspline.R: 141
-# warning("you must supply 1 < df <= n,  n = #{unique x} = ", nx)
-msgid "you must supply 1 < df <= n,  n = #{unique x} ="
-msgstr "musisz dostarczyć 1 < df <= n,  n = #{unikalne x} ="
+#. R/shapiro.test.R: stop("sample size must be between 3 and 5000")
+#: R/shapiro.test.R:0
+msgid "sample size must be between 3 and 5000"
+msgstr "długość argumentu 'x' musi być pomiędzy 3 a 5000"
 
-# stats/R/smspline.R: 179
-# stop("NA lev[]; probably smoothing parameter 'spar' way too large!")
-msgid "NA lev[]; probably smoothing parameter 'spar' way too large!"
+#. R/ansari.test.R: warning("samples differ in location: cannot compute confidence set, returning NA")
+#. R/ansari.test.R: warning("samples differ in location: cannot compute confidence set, returning NA")
+#: R/ansari.test.R:0
+msgid "samples differ in location: cannot compute confidence set, returning NA"
 msgstr ""
-"NA lev[]; prawdopodobnie parametr wygładzający 'spar' jest stanowczo zbyt "
-"duży!"
-
-msgid "setting df = 1  __use with care!__"
-msgstr "ustawianie 'df = 1'  __używaj z ostrożnością!__"
+"próby różnią się położeniem: nie można obliczyć przedziału ufności, "
+"zwracanie wartości NA"
 
-# stats/R/smspline.R: 221
-# stop("need result of smooth.spline(keep.data = TRUE)")
-# stats/R/smspline.R: 232
-# stop("need result of smooth.spline(keep.data = TRUE)")
-msgid "need result of smooth.spline(keep.data = TRUE)"
-msgstr "potrzeba wyniku 'smooth.spline(keep.data=TRUE)'"
+#. R/ts.R: stop("scatter plots only for univariate time series")
+#: R/ts.R:0
+msgid "scatter plots only for univariate time series"
+msgstr "wykresy punktowe tylko dla jednowymiarowych szeregów czasowych"
 
-# stats/R/smspline.R: 243
-# stop('type = "partial" is not yet implemented')
-msgid "type = \"partial\" is not yet implemented"
-msgstr "'type = \"partial\"' nie jest jeszcze zaimplementowany"
+#. R/add.R: stop("scope is not a subset of term labels")
+#. R/add.R: stop("scope is not a subset of term labels")
+#. R/add.R: stop("scope is not a subset of term labels")
+#: R/add.R:0
+msgid "scope is not a subset of term labels"
+msgstr "zakres nie jest podzbiorem etykiet członów"
 
-# stats/R/smspline.R: 280
-# stop("not a valid \"smooth.spline\" object")
-msgid "not a valid \"smooth.spline\" object"
-msgstr "to nie jest poprawny obiekt klasy \"smooth.spline\""
+#. R/arima.R: warning("seasonal MA part of model is not invertible")
+#. R/arma0.R: warning("seasonal MA part of model is not invertible")
+#: R/arima.R:0 R/arma0.R:0
+msgid "seasonal MA part of model is not invertible"
+msgstr "sezonowa część średniej kroczącej modelu nie jest odwracalna"
 
-# stats/R/smspline.R: 332
-# stop("'y' must be numeric vector")
-msgid "'y' must be numeric vector"
-msgstr "argument 'y' musi być wektorem liczbowym"
+#. R/ts.R: warning("series is corrupt, with no 'tsp' attribute")
+#. R/ts.R: stop("series is corrupt, with no 'tsp' attribute")
+#: R/ts.R:0
+msgid "series is corrupt, with no 'tsp' attribute"
+msgstr "szereg jest uszkodzony, bez atrybutu 'tsp'"
 
-# stats/R/smspline.R: 333
-# stop("number of observations in 'x' and 'y' must match.")
-msgid "number of observations in 'x' and 'y' must match."
-msgstr "liczba obserwacji w argumentach 'x' oraz 'y' musi się zgadzać"
+#. R/ts.R: gettextf("series is corrupt: length %d with 'tsp' implying %d",     NROW(x), nn)
+#. R/ts.R: gettextf("series is corrupt: length %d with 'tsp' implying %d",     NROW(x), nn)
+#: R/ts.R:0
+msgid "series is corrupt: length %d with 'tsp' implying %d"
+msgstr "szereg jest uszkodzony: długość %d z 'tsp' sugerującym %d"
 
-# stats/R/smspline.R: 335
-# stop("number of weights must match number of observations.")
-msgid "number of weights must match number of observations."
-msgstr "liczba wag musi zgadzać się z liczbą obserwacji"
+#. R/stl.R: stop("series is not periodic or has less than two periods")
+#: R/stl.R:0
+msgid "series is not periodic or has less than two periods"
+msgstr "szereg nie jest periodyczny lyb ma mniej niż dwa okresy"
 
-# stats/R/smspline.R: 336
-# stop("'span' must be between 0 and 1.")
-msgid "'span' must be between 0 and 1."
-msgstr "argument 'span' musi być pomiędzy 0 a 1"
+#. R/nls.R: stop("setVarying : 'vary' length must match length of parameters")
+#. R/nls.R: stop("setVarying : 'vary' length must match length of parameters")
+#: R/nls.R:0
+msgid "setVarying : 'vary' length must match length of parameters"
+msgstr "setVarying : długość 'vary' musi zgadzać się z długością parametrów"
 
-# stats/R/smspline.R: 341
-# stop("'x' must be between 0 and 1 for periodic smooth")
-msgid "'x' must be between 0 and 1 for periodic smooth"
-msgstr "'x' musi być pomiedzy 0 a 1 dla periodycznego wygładzania"
+#. R/smspline.R: warning(wtxt, "\nsetting df = 1  __use with care!__")
+#: R/smspline.R:0
+msgid "setting df = 1  __use with care!__"
+msgstr "ustawianie 'df = 1'  __używaj z ostrożnością!__"
 
-# stats/R/smspline.R: 349
-# stop("no finite observations")
-msgid "no finite observations"
-msgstr "brak skończonych obserwacji"
+#. R/contrast.R: stop("singular contrast matrix")
+#: R/contrast.R:0
+msgid "singular contrast matrix"
+msgstr "osobliwa macierz kontrastów"
 
-# stats/R/spectrum.R: 33
-# stop("'p' must be between 0 and 0.5")
-msgid "'p' must be between 0 and 0.5"
-msgstr "argument 'p' musi być pomiędzy 0 a 0.5"
+#. R/lm.R: stop("singular fit encountered")
+#. R/lm.R: stop("singular fit encountered")
+#: R/lm.R:0
+msgid "singular fit encountered"
+msgstr "napotkano osobliwe dopasowanie"
 
-# stats/R/spectrum.R: 40
-# stop("length of 'p' must be 1 or equal the number of columns of 'x'")
-msgid "length of 'p' must be 1 or equal the number of columns of 'x'"
-msgstr "długość 'p' musi być 1 lub równa liczbie kolumn 'x'"
+#. R/nls.R: stop("singular gradient matrix at initial parameter estimates")
+#: R/nls.R:0
+msgid "singular gradient matrix at initial parameter estimates"
+msgstr "osobliwa macierz gradientu w początkowych oszacowaniach parametru"
 
-# stats/R/spectrum.R: 65
-# stop("'x' must be a time series or an ar() fit")
-msgid "'x' must be a time series or an ar() fit"
-msgstr "'x' musi być szeregiem czasowym lub dopasowaniem 'ar()'"
+#. R/ts-tests.R: stop("singularities in regression")
+#: R/ts-tests.R:0
+msgid "singularities in regression"
+msgstr "osobliwości w regresji"
 
-# stats/R/spectrum.R: 113
-# stop("must specify 'spans' or a valid kernel")
-msgid "must specify 'spans' or a valid kernel"
-msgstr "potrzeba określić 'spans' lub poprawne jądro"
+#. R/distn.R: stop("size != sum(x), i.e. one is wrong")
+#: R/distn.R:0
+msgid "size != sum(x), i.e. one is wrong"
+msgstr "'size != sum(x)', tzn. jeden jest niepoprawny"
 
-# stats/R/spectrum.R: 206
-# stop("coverage probability out of range [0,1)")
-msgid "coverage probability out of range [0,1)"
-msgstr "prawdopodobieństwo pokrycia poza przedziałem [0,1)"
+#. R/hclust.R: stop("size cannot be NA nor exceed 65536")
+#: R/hclust.R:0
+msgid "size cannot be NA nor exceed 65536"
+msgstr "rozmiar nie może wynosić NA ani też przekraczać wartość 65536"
 
-# stats/R/spline.R: 40
-# warning("spline: first and last y values differ - using y[1] for both")
-msgid "spline: first and last y values differ - using y[1] for both"
+#. R/arima.R: warning("some AR parameters were fixed: setting transform.pars = FALSE")
+#: R/arima.R:0
+msgid "some AR parameters were fixed: setting transform.pars = FALSE"
 msgstr ""
-"spline: pierwsza oraz ostatnia wartość 'y' różnią się -- używanie 'y[1]' dla "
-"obu"
-
-# stats/R/splinefun.R: 59
-# stop("'y' must be increasing or decreasing")
-# stats/R/spline.R: 46
-# stop("'y' must be increasing or decreasing")
-msgid "'y' must be increasing or decreasing"
-msgstr "'y' musi być rosnące lub malejące"
-
-# stats/R/spline.R: 51
-# stop("'spline' requires n >= 1")
-msgid "'spline' requires n >= 1"
-msgstr "'spline' wymaga n >= 1"
+"niektóre parametry autoregresji zostały ustalone: ustawianie 'transform.pars "
+"= FALSE'"
 
-# stats/R/splinefun.R: 35
-# warning("spline: first and last y values differ - using y[1L] for both")
-msgid "spline: first and last y values differ - using y[1L] for both"
+#. R/arma0.R: warning("some ARMA parameters were fixed: setting transform.pars = FALSE")
+#: R/arma0.R:0
+msgid "some ARMA parameters were fixed: setting transform.pars = FALSE"
 msgstr ""
-"spline: pierwsza oraz ostatnia wartość 'y' różnią się -- używanie 'y[1L]' "
-"dla obu"
-
-# stats/R/splinefun.R: 67
-# stop("'deriv' must be between 0 and 3")
-# stats/R/splinefun.R: 106
-# stop("'deriv' must be between 0 and 3")
-msgid "'deriv' must be between 0 and 3"
-msgstr "argument 'deriv' musi być pomiędzy 0 a 3"
+"niektóre parametry modelu kroczącej średniej autoregresji zostały ustalone: "
+"ustawianie 'transform.pars = FALSE'"
 
-# stats/R/splinefun.R: 192
-# stop("'x' must be *strictly* increasing (non - NA)")
-msgid "'x' must be *strictly* increasing (non - NA)"
-msgstr "'x' musi być *ściśle* rosnące (nie - NA)"
+#. R/reshape.R: gettextf("some constant variables (%s) are really varying", paste(names(rval)[!really.constant],     collapse = ","))
+#: R/reshape.R:0
+msgid "some constant variables (%s) are really varying"
+msgstr "niektóre zmienne o stałej wartości (%s) tak naprawdę się zmieniają"
 
-# stats/R/stepfun.R: 31
-# stop("stepfun: 'x' must be ordered increasingly")
-msgid "stepfun: 'x' must be ordered increasingly"
-msgstr "stepfun: 'x' musi być uporządkowany rosnąco"
+#. R/kruskal.test.R: warning("some elements of 'x' are not numeric and will be coerced to numeric")
+#: R/kruskal.test.R:0
+msgid "some elements of 'x' are not numeric and will be coerced to numeric"
+msgstr ""
+"niektóre elementy 'x' nie są liczbami, więc zostaną przekształcone na liczby"
 
-# stats/R/stepfun.R: 33
-# stop("'x' must have length >= 1")
-msgid "'x' must have length >= 1"
-msgstr "argument 'x' musi mieć długość >= 1"
+#. R/dummy.coef.R: warning("some terms will have NAs due to the limits of the method")
+#: R/dummy.coef.R:0
+msgid "some terms will have NAs due to the limits of the method"
+msgstr ""
+"niektóre wyrażenia będą miały wartości NA z uwagi na ograniczenia metody"
 
-# stats/R/stepfun.R: 35
-# stop("'y' must be one longer than 'x'")
-msgid "'y' must be one longer than 'x'"
-msgstr "'y' musi być o jeden dłuższy niż 'x'"
+#. R/smspline.R: stop("some weights should be positive")
+#: R/smspline.R:0
+msgid "some weights should be positive"
+msgstr "niektóre wagi powinny być dodatnie"
 
-# stats/R/stepfun.R: 49
-# stop("no 'as.stepfun' method available for 'x'")
-msgid "no 'as.stepfun' method available for 'x'"
-msgstr "brak dostępnej metody 'as.stepfun' dla 'x'"
+#. R/smspline.R: warning("specified both 'df' and 'cv'; will disregard the latter")
+#: R/smspline.R:0
+msgid "specified both 'df' and 'cv'; will disregard the latter"
+msgstr "określono jednocześnie 'df' oraz 'cv'; drugi zostanie odrzucony"
 
-# stats/R/stepfun.R: 78
-# stop("not a valid step function")
-msgid "not a valid step function"
-msgstr "to nie jest poprawna funkcja krokowa"
+#. R/loess.R: stop("specified parametric for all predictors")
+#: R/loess.R:0
+msgid "specified parametric for all predictors"
+msgstr "określono parametry dla wszystkich predyktorów"
 
-# stats/R/stepfun.R: 113
-# stop("'plot.stepfun' called with wrong type of argument 'x'")
-msgid "'plot.stepfun' called with wrong type of argument 'x'"
-msgstr "'plot.stepfun' wywołana z błędnym typem argumentu 'x'"
+#. R/loess.R: stop("specified the square of a factor predictor to be dropped when degree = 1")
+#: R/loess.R:0
+msgid ""
+"specified the square of a factor predictor to be dropped when degree = 1"
+msgstr ""
+"określono kwadrat predyktora czynnika, który ma zostać pominięty, gdy "
+"stopień = 1"
 
-# stats/R/stl.R: 39
-# stop(degname, " must be 0 or 1")
-msgid "must be 0 or 1"
-msgstr "musi wynosić 0 lub 1"
+#. R/loess.R: stop("specified the square of a predictor to be dropped with only one numeric predictor")
+#: R/loess.R:0
+msgid ""
+"specified the square of a predictor to be dropped with only one numeric "
+"predictor"
+msgstr ""
+"określono kwadrat predyktora, który ma zostać pominięty z tylko jednym "
+"liczbowym predyktorem"
 
-# stats/R/stl.R: 43
-# stop("only univariate series are allowed")
-msgid "only univariate series are allowed"
-msgstr "tylko jednowymiarowe serie są dozwolone"
+#. R/distn.R: warning("specify 'rate' or 'scale' but not both")
+#. R/distn.R: stop("specify 'rate' or 'scale' but not both")
+#. R/distn.R: warning("specify 'rate' or 'scale' but not both")
+#. R/distn.R: stop("specify 'rate' or 'scale' but not both")
+#. R/distn.R: warning("specify 'rate' or 'scale' but not both")
+#. R/distn.R: stop("specify 'rate' or 'scale' but not both")
+#. R/distn.R: warning("specify 'rate' or 'scale' but not both")
+#. R/distn.R: stop("specify 'rate' or 'scale' but not both")
+#: R/distn.R:0
+msgid "specify 'rate' or 'scale' but not both"
+msgstr "określ 'rate' lub 'scale', ale nie oba jednocześnie"
 
-# stats/R/stl.R: 48
-# stop("series is not periodic or has less than two periods")
-msgid "series is not periodic or has less than two periods"
-msgstr "szereg nie jest periodyczny lyb ma mniej niż dwa okresy"
+#. R/identify.hclust.R: stop("specify exactly one of 'k' and 'h'")
+#. R/identify.hclust.R: stop("specify exactly one of 'k' and 'h'")
+#: R/identify.hclust.R:0
+msgid "specify exactly one of 'k' and 'h'"
+msgstr "określ dokładnie jeden z 'k' oraz 'h'"
 
-# stats/R/stl.R: 52
-# stop("unknown string value for s.window")
-msgid "unknown string value for s.window"
-msgstr "nieznana wartość łańcucha dla argumentu 's.window'"
+#. R/identify.hclust.R: stop("specify exactly one of 'which' and 'x'")
+#: R/identify.hclust.R:0
+msgid "specify exactly one of 'which' and 'x'"
+msgstr "określ dokładnie jeden z 'which' oraz 'x'"
 
-# stats/R/symnum.R: 42
-# stop(if(corr) gettext("'cutpoints' must be unique in 0 < cuts < 1, but are = ")
-#                  else gettext("'cutpoints' must be unique, but are = "),
-#                  paste(format(cutpoints), collapse="|"), domain = NA)
-msgid "'cutpoints' must be unique in 0 < cuts < 1, but are ="
-msgstr "'cutpoints' muszą być unikalne w przedziale '0 < cuts < 1', ale są ="
+#. R/splinefun.R: warning("spline: first and last y values differ - using y[1L] for both")
+#: R/splinefun.R:0
+msgid "spline: first and last y values differ - using y[1L] for both"
+msgstr ""
+"spline: pierwsza oraz ostatnia wartość 'y' różnią się -- używanie 'y[1L]' "
+"dla obu"
 
-# stats/R/symnum.R: 42
-# stop(if(corr) gettext("'cutpoints' must be unique in 0 < cuts < 1, but are = ")
-#                  else gettext("'cutpoints' must be unique, but are = "),
-#                  paste(format(cutpoints), collapse="|"), domain = NA)
-msgid "'cutpoints' must be unique, but are ="
-msgstr "'cutpoints' muszą być unikalne, ale są ="
+#. R/spline.R: warning("spline: first and last y values differ - using y[1] for both")
+#: R/spline.R:0
+msgid "spline: first and last y values differ - using y[1] for both"
+msgstr ""
+"spline: pierwsza oraz ostatnia wartość 'y' różnią się -- używanie 'y[1]' dla "
+"obu"
 
-# stats/R/symnum.R: 48
-# gettext("'x' must be between -1 and 1")
-msgid "'x' must be between -1 and 1"
-msgstr "wartość 'x' musi być pomiędzy -1 a 1"
+#. R/glm.R: warning("step size truncated due to divergence", call. = FALSE)
+#: R/glm.R:0
+msgid "step size truncated due to divergence"
+msgstr "rozmiar kroku został przycięty ze względu na rozbieżność"
 
-# stats/R/symnum.R: 49
-# gettextf("'x' must be between %s and %s",
-#                       format(minc), format(maxc))
-msgid "'x' must be between %s and %s"
-msgstr "argument 'x' musi być pomiędzy %s a %s"
+#. R/glm.R: warning("step size truncated: out of bounds", call. = FALSE)
+#: R/glm.R:0
+msgid "step size truncated: out of bounds"
+msgstr "rozmiar kroku został przycięty: poza granicami"
 
-# stats/R/symnum.R: 63
-# stop("number of 'cutpoints' must be one less than number of symbols")
-msgid "number of 'cutpoints' must be one less than number of symbols"
-msgstr "liczba 'cutpoints' musi być o jeden mniejsza niż liczba symboli"
+#. R/stepfun.R: stop("stepfun: 'x' must be ordered increasingly")
+#: R/stepfun.R:0
+msgid "stepfun: 'x' must be ordered increasingly"
+msgstr "stepfun: 'x' musi być uporządkowany rosnąco"
 
-# stats/R/symnum.R: 65
-# stop("number of 'cutpoints' must be one more than number of symbols")
-msgid "number of 'cutpoints' must be one more than number of symbols"
-msgstr "liczba 'cutpoints' musi być o jeden większa niż liczba symboli"
+#. R/density.R: warning("sum(weights) != 1  -- will not get true density")
+#: R/density.R:0
+msgid "sum(weights) != 1  -- will not get true density"
+msgstr "'sum(weights)  !=  1' -- nie uzyska się prawdziwej gęstości"
 
-# stats/R/symnum.R: 77
-# stop("must have 2 'symbols' for logical 'x' argument")
-msgid "must have 2 'symbols' for logical 'x' argument"
-msgstr "potrzeba mieć dwa 'symbols' dla argumentu logicznego 'x'"
+#. R/cor.R: stop("supply both 'x' and 'y' or a matrix-like 'x'")
+#. R/cor.R: stop("supply both 'x' and 'y' or a matrix-like 'x'")
+#: R/cor.R:0
+msgid "supply both 'x' and 'y' or a matrix-like 'x'"
+msgstr "dostarcz oba 'x' oraz 'y' lub 'x' przypominające macierz"
 
-# stats/R/symnum.R: 110
-# stop("invalid 'abbr.colnames'")
-msgid "invalid 'abbr.colnames'"
-msgstr "niepoprawna wartość 'abbr.colnames'"
+#. R/prop.test.R: stop("table 'x' should have 2 entries")
+#: R/prop.test.R:0
+msgid "table 'x' should have 2 entries"
+msgstr "tabela 'x' powinna mieć 2 wpisy"
 
-# stats/R/wilcox.test.R: 28
-# stop("'mu' must be a single number")
-# stats/R/t.test.R: 29
-# stop("'mu' must be a single number")
-msgid "'mu' must be a single number"
-msgstr "argument 'mu' musi być pojedynczą liczbą"
+#. R/cutree.R: stop("the 'height' component of 'tree' is not sorted (increasingly)")
+#: R/cutree.R:0
+msgid "the 'height' component of 'tree' is not sorted (increasingly)"
+msgstr "komponent 'height' w 'tree' nie jest (rosnąco) posortowany"
 
-# stats/R/wilcox.test.R: 56
-# stop("'y' is missing for paired test")
-# stats/R/t.test.R: 47
-# stop("'y' is missing for paired test")
-msgid "'y' is missing for paired test"
-msgstr "brakuje 'y' do sparowanego testu"
+#. R/lm.R: stop("the 'se.fit' argument is not yet implemented for \"mlm\" objects")
+#: R/lm.R:0
+msgid "the 'se.fit' argument is not yet implemented for \"mlm\" objects"
+msgstr "argument 'se.fit' dla obiektów 'mlm' nie jest jeszcze zaimplementowany"
 
-# stats/R/t.test.R: 64
-# stop("data are essentially constant")
-# stats/R/t.test.R: 95
-# stop("data are essentially constant")
-msgid "data are essentially constant"
-msgstr "dane są w zasadzie stałe"
+#. R/aov.R: stop("the 'split' argument must be a list")
+#: R/aov.R:0
+msgid "the 'split' argument must be a list"
+msgstr "argument 'split' musi być listą"
 
-# stats/R/termplot.R: 63
-# stop("'main' must be TRUE, FALSE, NULL or character (vector).")
-# stats/R/termplot.R: 124
-# stop("'main' must be TRUE, FALSE, NULL or character (vector).")
-msgid "'main' must be TRUE, FALSE, NULL or character (vector)."
-msgstr "'main' musi być TRUE, FALSE, NULL lub być tekstem (wektor)."
+#. R/poisson.test.R: stop("the case k > 2 is unimplemented")
+#: R/poisson.test.R:0
+msgid "the case k > 2 is unimplemented"
+msgstr "przypadek dla k > 2 nie jest zaimplementowany"
 
-# stats/R/ts-tests.R: 22
-# stop ("x is not a vector or univariate time series")
-# stats/R/ts-tests.R: 53
-# stop ("x is not a vector or univariate time series")
-msgid "x is not a vector or univariate time series"
-msgstr "'x' nie jest wektorem ani jednowymiarowym szeregiem czasowym"
+#. R/aov.R: stop("the contrast defined is empty (has no TRUE elements)")
+#. R/aov.R: stop("the contrast defined is empty (has no TRUE elements)")
+#: R/aov.R:0
+msgid "the contrast defined is empty (has no TRUE elements)"
+msgstr "zdefiniowany kontrast jest pusty (nie ma elementów TRUE)"
 
-# stats/R/ts-tests.R: 62
-# stop ("singularities in regression")
-msgid "singularities in regression"
-msgstr "osobliwości w regresji"
+#. R/StructTS.R: stop("the first value of the time series must not be missing")
+#: R/StructTS.R:0
+msgid "the first value of the time series must not be missing"
+msgstr "pierwsza wartość szeregu czasowego nie może być brakującą"
 
-# stats/R/ts.R: 44
-# stop("'ts' object must have one or more observations")
-msgid "'ts' object must have one or more observations"
-msgstr "obiekt 'ts' musi mieć jedną lub więcej obserwacji"
+#. R/glm.R: gettextf("the following arguments to 'anova.glm' are invalid and dropped: %s",     paste(deparse(dotargs[named]), collapse = ", "))
+#: R/glm.R:0
+msgid "the following arguments to 'anova.glm' are invalid and dropped: %s"
+msgstr ""
+"następujące argumenty przekazane do 'anova.glm()' są niepoprawne i zostały "
+"pominięte: %s"
 
-# stats/R/ts.R: 66
-# stop("'start' cannot be after 'end'")
-# stats/R/ts.R: 664
-# stop("'start' cannot be after 'end'")
-msgid "'start' cannot be after 'end'"
-msgstr "'start' nie może być po 'end'"
+#. R/StructTS.R: stop("the series is entirely NA")
+#. R/StructTS.R: stop("the series is entirely NA")
+#. R/StructTS.R: stop("the series is entirely NA")
+#: R/StructTS.R:0
+msgid "the series is entirely NA"
+msgstr "seria jest całkowicie wypełniona wartościami 'NA'"
 
-# stats/R/ts.R: 128
-# stop("no time series supplied")
-msgid "no time series supplied"
-msgstr "nie dostarczono szeregu czasowego"
+#. R/reshape.R: warning("there are records with missing times, which will be dropped.")
+#: R/reshape.R:0
+msgid "there are records with missing times, which will be dropped."
+msgstr "pojawiają się rekordy z brakującymi czasami, które zostaną pominięte."
 
-# stats/R/ts.R: 134
-# stop("not all series have the same frequency")
-msgid "not all series have the same frequency"
-msgstr "nie wszystkie szeregi mają tę samą częstotliwość"
+#. R/bartlett.test.R: stop("there must be at least 2 observations in each group")
+#: R/bartlett.test.R:0
+msgid "there must be at least 2 observations in each group"
+msgstr "potrzeba co najmniej 2 obserwacji w każdej grupie"
 
-# stats/R/ts.R: 143
-# warning("non-intersecting series")
-msgid "non-intersecting series"
-msgstr "nieprzecinające się szeregi"
+#. R/model.tables.R: stop("this fit does not inherit from \"lm\"")
+#: R/model.tables.R:0
+msgid "this fit does not inherit from \"lm\""
+msgstr "to dopasowanie nie dziedziczy z 'lm'"
 
-# stats/R/ts.R: 152
-# stop("non-time series not of the correct length")
-msgid "non-time series not of the correct length"
-msgstr "szeregi nie-czasowe nie mają poprawnej długości"
+#. R/ks.test.R: warning("ties should not be present for the Kolmogorov-Smirnov test")
+#: R/ks.test.R:0
+msgid "ties should not be present for the Kolmogorov-Smirnov test"
+msgstr ""
+"wartości powtórzone nie powinny być obecne w teście Kolmogorowa-Smirnowa"
 
-# stats/R/ts.R: 289
-# stop("time series contains internal NAs")
+#. R/ts.R: stop("time series contains internal NAs")
+#: R/ts.R:0
 msgid "time series contains internal NAs"
 msgstr "szeregi czasowe zawierają wewnętrznie wartości NA"
 
-# stats/R/ts.R: 357
-# warning("series is corrupt, with no 'tsp' attribute")
-# stats/R/ts.R: 392
-# stop("series is corrupt, with no 'tsp' attribute")
-msgid "series is corrupt, with no 'tsp' attribute"
-msgstr "szereg jest uszkodzony, bez atrybutu 'tsp'"
+#. R/HoltWinters.R: stop("time series has no or less than 2 periods")
+#: R/HoltWinters.R:0
+msgid "time series has no or less than 2 periods"
+msgstr "szereg czasowy nie posiada okresów lub ma ich mniej niż 2"
 
-# stats/R/ts.R: 363
-# warning(gettextf("series is corrupt: length %d with 'tsp' implying %d",
-#                          NROW(x), nn), domain=NA, call.=FALSE)
-# stats/R/ts.R: 395
-# warning(gettextf("series is corrupt: length %d with 'tsp' implying %d",
-#                          NROW(x), nn), domain=NA, call.=FALSE)
-msgid "series is corrupt: length %d with 'tsp' implying %d"
-msgstr "szereg jest uszkodzony: długość %d z 'tsp' sugerującym %d"
+#. R/ts.R: stop("times to be replaced do not match")
+#: R/ts.R:0
+msgid "times to be replaced do not match"
+msgstr "czasy do zastąpienia nie zgadzają się"
 
-# stats/R/ts.R: 479
-# stop("cannot plot more than 10 series as \"multiple\"")
-msgid "cannot plot more than 10 series as \"multiple\""
-msgstr "nie można narysować więcej niż 10 szeregów jako 'multiple'"
+#. R/lm.influence.R: stop("too few cases, n < k")
+#: R/lm.influence.R:0
+msgid "too few cases, n < k"
+msgstr "zbyt mało przypadków, n < k"
 
-# stats/R/ts.R: 524
-# stop("scatter plots only for univariate time series")
-msgid "scatter plots only for univariate time series"
-msgstr "wykresy punktowe tylko dla jednowymiarowych szeregów czasowych"
+#. R/zzModels.R: stop("too few distinct input values to fit a Michaelis-Menten model")
+#: R/zzModels.R:0
+msgid "too few distinct input values to fit a Michaelis-Menten model"
+msgstr ""
+"zbyt mało różnych wartości wejściowych aby dopasować model Michaelisa-Mentena"
 
-# stats/R/ts.R: 538
-# stop("'xy.labels' must be logical or character")
-msgid "'xy.labels' must be logical or character"
-msgstr "'xy.labels' musi być tekstem lub zmienną logiczną"
+#. R/zzModels.R: stop("too few distinct input values to fit a biexponential")
+#: R/zzModels.R:0
+msgid "too few distinct input values to fit a biexponential"
+msgstr "zbyt mało różnych wartości wejściowych aby dopasować 'biexponential'"
 
-# stats/R/ts.R: 629
-# stop("'frequency' and 'deltat' are both supplied and are inconsistent")
-msgid "'frequency' and 'deltat' are both supplied and are inconsistent"
+#. R/zzModels.R: stop("too few distinct input values to fit a four-parameter logistic")
+#: R/zzModels.R:0
+msgid "too few distinct input values to fit a four-parameter logistic"
 msgstr ""
-"oba argumenty 'frequency' oraz 'deltat' zostały dostarczone oraz oba są "
-"niezgodne"
+"zbyt mało różnych wartości wejściowych aby dopasować 4 parametrową funkcję "
+"logistyczną"
 
-# stats/R/ts.R: 639
-# warning("'frequency' not changed")
-msgid "'frequency' not changed"
-msgstr "argument 'frequency' nie został zmieniony"
+#. R/zzModels.R: stop("too few distinct input values to fit a logistic model")
+#: R/zzModels.R:0
+msgid "too few distinct input values to fit a logistic model"
+msgstr "zbyt mało różnych wartości wejściowych aby dopasować model logistyczny"
 
-# stats/R/ts.R: 646
-# stop("bad value for 'start'")
-msgid "bad value for 'start'"
-msgstr "niepoprawna wartość dla 'start'"
+#. R/zzModels.R: stop("too few distinct input values to fit an asymptotic regression model")
+#: R/zzModels.R:0
+msgid "too few distinct input values to fit an asymptotic regression model"
+msgstr ""
+"zbyt mało różnych wartości wejściowych aby dopasować model regresji "
+"asymptotycznej"
 
-# stats/R/ts.R: 649
-# warning("'start' value not changed")
-msgid "'start' value not changed"
-msgstr "argument 'start' nie został zmieniony"
+#. R/zzModels.R: stop("too few distinct input values to fit the 'asympOff' model")
+#: R/zzModels.R:0
+msgid "too few distinct input values to fit the 'asympOff' model"
+msgstr "zbyt mało różnych wartości wejściowych aby dopasować model 'asympOff'"
 
-# stats/R/ts.R: 657
-# stop("bad value for 'end'")
-msgid "bad value for 'end'"
-msgstr "niepoprawna wartość dla argumentu 'end'"
+#. R/zzModels.R: stop("too few distinct input values to fit the 'asympOrig' model")
+#: R/zzModels.R:0
+msgid "too few distinct input values to fit the 'asympOrig' model"
+msgstr "zbyt mało różnych wartości wejściowych aby dopasować model 'asympOrig'"
 
-# stats/R/ts.R: 660
-# warning("'end' value not changed")
-msgid "'end' value not changed"
-msgstr "argument 'end' nie został zmieniony"
+#. R/zzModels.R: stop("too few distinct input values to fit the Gompertz model")
+#: R/zzModels.R:0
+msgid "too few distinct input values to fit the Gompertz model"
+msgstr "zbyt mało różnych wartości wejściowych aby dopasować model Gompertza"
 
-# stats/R/ts.R: 718
-# stop("'start' > 'end'")
-msgid "'start' > 'end'"
-msgstr "'start' > 'end'"
+#. R/zzModels.R: stop("too few distinct input values to fit the Weibull growth model")
+#: R/zzModels.R:0
+msgid "too few distinct input values to fit the Weibull growth model"
+msgstr ""
+"zbyt mało różnych wartości wejściowych aby dopasować model wzrostu Weibull'a"
 
-# stats/R/ts.R: 720
-# warning("extending time series when replacing values", call. = FALSE)
-msgid "extending time series when replacing values"
-msgstr "rozszerzanie szeregów czasowych przy wymianie wartości"
+#. R/pairwise.R: stop("too few groups")
+#: R/pairwise.R:0
+msgid "too few groups"
+msgstr "zbyt mało grup"
 
-# stats/R/ts.R: 728
-# stop("times to be replaced do not match")
-msgid "times to be replaced do not match"
-msgstr "czasy do zastąpienia nie zgadzają się"
+#. R/arima.R: stop("too few non-missing observations")
+#: R/arima.R:0
+msgid "too few non-missing observations"
+msgstr "zbyt mało niebrakujących obserwacji"
 
-# stats/R/ts.R: 732
-# stop("no replacement values supplied")
-msgid "no replacement values supplied"
-msgstr "nie dostarczono wartości zamiennych"
+#. R/zzModels.R: stop("too few observations to fit an asymptotic regression model")
+#: R/zzModels.R:0
+msgid "too few observations to fit an asymptotic regression model"
+msgstr "zbyt mało obserwacji aby dopasować model regresji asymptotycznej "
 
-# stats/R/ts.R: 733
-# stop("too many replacement values supplied")
+#. R/ts.R: stop("too many replacement values supplied")
+#: R/ts.R:0
 msgid "too many replacement values supplied"
 msgstr "dostarczono zbyt dużo wartości zamiennych"
 
-# stats/R/ts.R: 735
-# stop("number of values supplied is not a sub-multiple of the number of values to be replaced")
-msgid ""
-"number of values supplied is not a sub-multiple of the number of values to "
-"be replaced"
+#. R/arma0.R: warning("transformed ARMA parameters were fixed")
+#: R/arma0.R:0
+msgid "transformed ARMA parameters were fixed"
 msgstr ""
-"liczba dostarczonych wartości nie jest pod-wielokrotnością liczby wartości "
-"do zamiany"
-
-# stats/R/ts.R: 749
-# stop("only replacement of elements is allowed")
-msgid "only replacement of elements is allowed"
-msgstr "dozwolona jest tylko zamiana elementów"
-
-# stats/R/ts.R: 781
-# stop("'model' must be list")
-msgid "'model' must be list"
-msgstr "argument 'model' musi być listą"
-
-# stats/R/ts.R: 782
-# stop("'n' must be strictly positive")
-msgid "'n' must be strictly positive"
-msgstr "argument 'n' musi być ściśle dodatni"
+"przetransformowane parametry kroczącej średniej autoregresji zostały ustalone"
 
-# stats/R/ts.R: 786
-# stop("'ar' part of model is not stationary")
-msgid "'ar' part of model is not stationary"
-msgstr "część 'ar' modelu nie jest stacjonarna"
+#. R/model.tables.R: gettextf("type '%s' is not implemented yet", type)
+#. R/model.tables.R: gettextf("type '%s' is not implemented yet", type)
+#: R/model.tables.R:0
+msgid "type '%s' is not implemented yet"
+msgstr "typ '%s' nie jest jeszcze zaimplementowany"
 
-# stats/R/ts.R: 791
-# stop("burn-in 'n.start' must be as long as 'ar + ma'")
-msgid "burn-in 'n.start' must be as long as 'ar + ma'"
-msgstr "oryginał 'n.start' musi być tak długi jak 'ar + ma'"
+#. R/smspline.R: stop("type = \"partial\" is not yet implemented")
+#: R/smspline.R:0
+msgid "type = \"partial\" is not yet implemented"
+msgstr "'type = \"partial\"' nie jest jeszcze zaimplementowany"
 
-# stats/R/ts.R: 794
-# stop("'model$order' must be of length 3")
-msgid "'model$order' must be of length 3"
-msgstr "'model$order' musi być długości 3"
+#. R/cancor.R: stop("unequal number of rows in 'cancor'")
+#: R/cancor.R:0
+msgid "unequal number of rows in 'cancor'"
+msgstr "nierówna liczba wierszy w 'cancor()'"
 
-# stats/R/ts.R: 795
-# stop("inconsistent specification of 'ar' order")
-msgid "inconsistent specification of 'ar' order"
-msgstr "niespójna specyfikacja porządku 'ar'"
+#. R/acf.R: stop("univariate time series only")
+#: R/acf.R:0
+msgid "univariate time series only"
+msgstr "tylko jednowymiarowe szeregi czasowe"
 
-# stats/R/ts.R: 796
-# stop("inconsistent specification of 'ma' order")
-msgid "inconsistent specification of 'ma' order"
-msgstr "niespójna specyfikacja porządku 'ma'"
+#. R/density.R: stop("unknown bandwidth rule")
+#: R/density.R:0
+msgid "unknown bandwidth rule"
+msgstr "nieznana reguła szerokości pasma"
 
-# stats/R/ts.R: 799
-# stop("number of differences must be a positive integer")
-msgid "number of differences must be a positive integer"
-msgstr "liczba różnic musi być dodatnią liczbą całkowitą"
+#. R/kernel.R: stop("unknown named kernel")
+#: R/kernel.R:0
+msgid "unknown named kernel"
+msgstr "nieznane nazwane jądro"
 
-# stats/R/update.R: 28
-# stop("need an object with call component")
-msgid "need an object with call component"
-msgstr "potrzeba obiektu z komponentem wywołania"
+#. R/optim.R: gettextf("unknown names in control: %s", paste(noNms, collapse = ", "))
+#: R/optim.R:0
+msgid "unknown names in control: %s"
+msgstr "nieznane nazwy w kontroli: %s"
 
-# stats/R/var.test.R: 27
-# stop("'ratio' must be a single positive number")
-msgid "'ratio' must be a single positive number"
-msgstr "argument 'ratio' musi być pojedynczą dodatnią liczbą"
+#. R/stl.R: stop("unknown string value for s.window")
+#: R/stl.R:0
+msgid "unknown string value for s.window"
+msgstr "nieznana wartość łańcucha dla argumentu 's.window'"
 
-# stats/R/weighted.mean.R: 29
-# stop("'x' and 'w' must have the same length")
-msgid "'x' and 'w' must have the same length"
-msgstr "argumenty 'x' oraz 'w' muszą mieć tę samą długość"
+#. R/nls.R: warning("upper and lower bounds ignored unless algorithm = \"port\"")
+#: R/nls.R:0
+msgid "upper and lower bounds ignored unless algorithm = \"port\""
+msgstr ""
+"górne oraz dolne granice zostały zignorowane, dopóki nie będzie 'algorithm = "
+"\"port\"'"
 
-# stats/R/wilcox.test.R: 61
-# stop("not enough (finite) 'x' observations")
-msgid "not enough (finite) 'x' observations"
-msgstr "niewystarczająca liczba skończonych obserwacji"
+#. R/plot.lm.R: stop("use only with \"lm\" objects")
+#: R/plot.lm.R:0
+msgid "use only with \"lm\" objects"
+msgstr "używaj tylko z obiektami klasy \"lm\""
 
-# stats/R/wilcox.test.R: 118
-# warning("requested conf.level not achievable")
-# stats/R/wilcox.test.R: 194
-# warning("requested conf.level not achievable")
-# stats/R/wilcox.test.R: 208
-# warning("requested conf.level not achievable")
-# stats/R/wilcox.test.R: 220
-# warning("requested conf.level not achievable")
-msgid "requested conf.level not achievable"
-msgstr "żądany 'conf.level' nie jest osiągalny"
+#. R/glm.R: gettextf("using F test with a '%s' family is inappropriate",     fam)
+#. R/glm.R: gettextf("using F test with a '%s' family is inappropriate",     fam)
+#: R/glm.R:0
+msgid "using F test with a '%s' family is inappropriate"
+msgstr "używanie testu Fishera z rodziną '%s' jest niepoprawne"
 
-# stats/R/wilcox.test.R: 167
-# stop("cannot compute confidence interval when all observations are tied", call.=FALSE)
-# stats/R/wilcox.test.R: 353
-# stop("cannot compute confidence interval when all observations are tied", call.=FALSE)
-msgid "cannot compute confidence interval when all observations are tied"
-msgstr ""
-"nie można obliczyć przedziału ufności gdy wszystkie obserwacje są powtórzone"
+#. R/glm.R: warning("using F test with a fixed dispersion is inappropriate")
+#. R/glm.R: warning("using F test with a fixed dispersion is inappropriate")
+#: R/glm.R:0
+msgid "using F test with a fixed dispersion is inappropriate"
+msgstr "używanie testu Fishera z ustaloną dyspersją jest niepoprawne"
 
-# stats/R/wilcox.test.R: 236
-# warning("cannot compute exact confidence interval with ties")
-msgid "cannot compute exact confidence interval with ties"
+#. R/models.R: warning("using type = \"numeric\" with a factor response will be ignored")
+#: R/models.R:0
+msgid "using type = \"numeric\" with a factor response will be ignored"
 msgstr ""
-"nie można obliczyć dokładnego przedziału ufności z wartościami powtórzonymi"
+"użycie 'type=\"numeric\"' z czynnikową zmienną zależną zostanie zignorowane"
 
-# stats/R/wilcox.test.R: 239
-# warning("cannot compute exact p-value with zeroes")
-msgid "cannot compute exact p-value with zeroes"
-msgstr "nie można obliczyć dokładnej wartości prawdopodobieństwa z zerami"
+#. R/family.R: message("using weights as inverse variances")
+#: R/family.R:0
+msgid "using weights as inverse variances"
+msgstr "używanie wag jako odwrotności wariancji"
 
-# stats/R/wilcox.test.R: 241
-# warning("cannot compute exact confidence interval with zeroes")
-msgid "cannot compute exact confidence interval with zeroes"
-msgstr "nie można obliczyć dokładnego przedziału ufności z zerami"
+#. R/family.R: message("using weights as shape parameters")
+#: R/family.R:0
+msgid "using weights as shape parameters"
+msgstr "używanie wag jako parametrów kształtu"
 
-# stats/R/wilcox.test.R: 299
-# warning("Requested conf.level not achievable")
-msgid "Requested conf.level not achievable"
-msgstr "żądany 'conf.level' nie jest osiągalny"
+#. R/glm.R: stop("value of 'epsilon' must be > 0")
+#: R/glm.R:0
+msgid "value of 'epsilon' must be > 0"
+msgstr "wartość 'epsilon' musi być > 0"
 
-# stats/R/xtabs.R: 23
-# stop("must supply either 'formula' or 'data'")
-msgid "must supply either 'formula' or 'data'"
-msgstr "potrzeba dostarczyć albo 'formula' albo 'data'"
+#. R/models.R: gettextf("variable '%s' is absent, its contrast will be ignored",     nn)
+#: R/models.R:0
+msgid "variable '%s' is absent, its contrast will be ignored"
+msgstr "zmienna '%s' jest nieobecna, jej kontrast będzie zignorowany"
 
-# stats/R/xtabs.R: 76
-# stop(gettextf("%s applies only to two-way tables",
-#                           "xtabs(*, sparse=TRUE)"),
-#                  domain = NA)
-msgid "%s applies only to two-way tables"
-msgstr "'%s' stosuje się jedynie do dwukierunkowych tabel"
+#. R/models.R: gettextf("variable '%s' is not a factor", nm)
+#: R/models.R:0
+msgid "variable '%s' is not a factor"
+msgstr "zmienna '%s' nie jest czynnikiem"
 
-# stats/R/zzModels.R: 46
-# stop("too few distinct input values to fit an asymptotic regression model")
-msgid "too few distinct input values to fit an asymptotic regression model"
-msgstr ""
-"zbyt mało różnych wartości wejściowych aby dopasować model regresji "
-"asymptotycznej"
+#. R/models.R: gettextf("variable '%s' was fitted with type \"%s\" but type \"%s\" was supplied",     names(old)[wrong], old[wrong], new[wrong])
+#: R/models.R:0
+msgid "variable '%s' was fitted with type \"%s\" but type \"%s\" was supplied"
+msgstr "zmienna '%s' została dopasowana z typem '%s', ale dostarczono typ '%s'"
 
-# stats/R/zzModels.R: 64
-# stop("cannot fit an asymptotic regression model to these data")
-msgid "cannot fit an asymptotic regression model to these data"
-msgstr "nie można dopasować modelu regresji asymptotycznej do tych danych"
+#. R/models.R: gettextf("variables %s were specified with different types from the fit",     paste(sQuote(names(old)[wrong]), collapse = ", "))
+#: R/models.R:0
+msgid "variables %s were specified with different types from the fit"
+msgstr "zmienne %s zostały określone z typami innymi od tych z dopasowania"
 
-# stats/R/zzModels.R: 80
-# stop("too few observations to fit an asymptotic regression model")
-msgid "too few observations to fit an asymptotic regression model"
-msgstr "zbyt mało obserwacji aby dopasować model regresji asymptotycznej "
+#. R/aov.R: stop("weights are not supported in a multistratum aov() fit")
+#: R/aov.R:0
+msgid "weights are not supported in a multistratum aov() fit"
+msgstr "wagi nie są wspierane w wielowarstwowym dopasowaniu 'aov()'"
 
-# stats/R/zzModels.R: 117
-# stop("too few distinct input values to fit the 'asympOff' model")
-msgid "too few distinct input values to fit the 'asympOff' model"
-msgstr "zbyt mało różnych wartości wejściowych aby dopasować model 'asympOff'"
+#. R/cov.wt.R: stop("weights must be non-negative and not all zero")
+#: R/cov.wt.R:0
+msgid "weights must be non-negative and not all zero"
+msgstr "wagi muszą być nieujemne oraz nie wszystkie równe zero"
 
-# stats/R/zzModels.R: 156
-# stop("too few distinct input values to fit the 'asympOrig' model")
-msgid "too few distinct input values to fit the 'asympOrig' model"
-msgstr "zbyt mało różnych wartości wejściowych aby dopasować model 'asympOrig'"
+#. R/embed.R: stop("wrong embedding dimension")
+#. R/embed.R: stop("wrong embedding dimension")
+#: R/embed.R:0
+msgid "wrong embedding dimension"
+msgstr "niepoprawnie osadzony wymiar"
 
-# stats/R/zzModels.R: 201
-# stop("too few distinct input values to fit a biexponential")
-msgid "too few distinct input values to fit a biexponential"
-msgstr "zbyt mało różnych wartości wejściowych aby dopasować 'biexponential'"
+#. R/anova.R: stop("wrong k / cs.ind")
+#: R/anova.R:0
+msgid "wrong k / cs.ind"
+msgstr "niepoprawny 'k' / 'cs.ind'"
 
-# stats/R/zzModels.R: 260
-# stop("must have length of response = length of second argument to 'SSfol'")
-msgid "must have length of response = length of second argument to 'SSfol'"
-msgstr ""
-"potrzeba, aby długość zmiennej zależnej = długości drugiego argumentu 'SSfol'"
+#. R/arima.R: stop("wrong length for 'fixed'")
+#. R/arma0.R: stop("wrong length for 'fixed'")
+#: R/arima.R:0 R/arma0.R:0
+msgid "wrong length for 'fixed'"
+msgstr "niepoprawna długość dla argumentu 'fixed'"
 
-# stats/R/zzModels.R: 263
-# stop("must have at least 4 observations to fit an 'SSfol' model")
-msgid "must have at least 4 observations to fit an 'SSfol' model"
-msgstr "potrzeba mieć co najmniej 4 obserwacje aby dopasować model 'SSfol'"
+#. R/ftable.R: stop("wrong method")
+#: R/ftable.R:0
+msgid "wrong method"
+msgstr "błędna metoda"
 
-# stats/R/zzModels.R: 328
-# stop("too few distinct input values to fit a four-parameter logistic")
-msgid "too few distinct input values to fit a four-parameter logistic"
-msgstr ""
-"zbyt mało różnych wartości wejściowych aby dopasować 4 parametrową funkcję "
-"logistyczną"
+#. R/ppr.R: stop("wrong number of columns in 'x'")
+#: R/ppr.R:0
+msgid "wrong number of columns in 'x'"
+msgstr "niepoprawna liczba kolumn w 'x'"
 
-# stats/R/zzModels.R: 373
-# stop("too few distinct input values to fit a logistic model")
-msgid "too few distinct input values to fit a logistic model"
-msgstr "zbyt mało różnych wartości wejściowych aby dopasować model logistyczny"
+#. R/contr.poly.R: stop("wrong number of columns in new data: ", deparse(substitute(...)))
+#: R/contr.poly.R:0
+msgid "wrong number of columns in new data:"
+msgstr "niepoprawna liczba kolumn w nowych danych:"
 
-# stats/R/zzModels.R: 414
-# stop("too few distinct input values to fit a Michaelis-Menten model")
-msgid "too few distinct input values to fit a Michaelis-Menten model"
-msgstr ""
-"zbyt mało różnych wartości wejściowych aby dopasować model Michaelisa-Mentena"
+#. R/contrast.R: stop("wrong number of contrast matrix rows")
+#: R/contrast.R:0
+msgid "wrong number of contrast matrix rows"
+msgstr "niepoprawna liczba wierszy macierzy kontrastu"
 
-# stats/R/zzModels.R: 453
-# stop("too few distinct input values to fit the Gompertz model")
-msgid "too few distinct input values to fit the Gompertz model"
-msgstr "zbyt mało różnych wartości wejściowych aby dopasować model Gompertza"
+#. R/ts-tests.R: stop("x is not a vector or univariate time series")
+#. R/ts-tests.R: stop("x is not a vector or univariate time series")
+#: R/ts-tests.R:0
+msgid "x is not a vector or univariate time series"
+msgstr "'x' nie jest wektorem ani jednowymiarowym szeregiem czasowym"
 
-# stats/R/zzModels.R: 495
-# stop("too few distinct input values to fit the Weibull growth model")
-msgid "too few distinct input values to fit the Weibull growth model"
-msgstr ""
-"zbyt mało różnych wartości wejściowych aby dopasować model wzrostu Weibull'a"
+#. R/acf.R: stop("x$lag must have at least 1 column")
+#: R/acf.R:0
+msgid "x$lag must have at least 1 column"
+msgstr "'x$lag' musi mieć jak przynajmniej 1 kolumnę"
 
-# stats/R/zzModels.R: 498
-# stop("all 'x' values must be non-negative to fit the Weibull growth model")
-msgid "all 'x' values must be non-negative to fit the Weibull growth model"
-msgstr ""
-"wszystkie wartości 'x' musi być nieujemne aby dopasować model wzrostu "
-"Weibull'a"
+#. R/cmdscale.R: warning("x.ret=TRUE is disregarded when list.=FALSE")
+#: R/cmdscale.R:0
+msgid "x.ret=TRUE is disregarded when list.=FALSE"
+msgstr "'x.ret=TRUE' jest nieuwzględniane gdy  'list.=FALSE'"
 
-# stats/R/add.R: 155
-# warning(sprintf(ngettext(newn,
-#                                      "using the %d/%d row from a combined fit",
-#                                      "using the %d/%d rows from a combined fit"),
-#                             newn, oldn), domain = NA)
-# stats/R/add.R: 274
-# warning(sprintf(ngettext(newn,
-#                                      "using the %d/%d row from a combined fit",
-#                                      "using the %d/%d rows from a combined fit"),
-#                             newn, oldn), domain = NA)
-msgid "using the %d/%d row from a combined fit"
-msgid_plural "using the %d/%d rows from a combined fit"
-msgstr[0] "używanie %d/%d wiersza z połączonego dopasowania"
-msgstr[1] "używanie %d/%d wierszy z połączonego dopasowania"
-msgstr[2] "używanie %d/%d wierszy z połączonego dopasowania"
+#. R/distn.R: stop("x[] and prob[] must be equal length vectors.")
+#: R/distn.R:0
+msgid "x[] and prob[] must be equal length vectors."
+msgstr "argumenty 'x' oraz 'prob' muszą być wektorami o jednakowej długości"
 
-# stats/R/add.R: 640
-# stop(sprintf(ngettext(sum(where==0),
-#                                       "lower scope has term %s not included in model",
-#                                       "lower scope has terms %s not included in model"),
-#                              paste(sQuote(nmdrop[where==0]), collapse=", ")),
-#                      domain = NA)
-msgid "lower scope has term %s not included in model"
-msgid_plural "lower scope has terms %s not included in model"
-msgstr[0] ""
-"niższy zakres posiada człon %s, które nie jest uwzględniony w modelu"
-msgstr[1] "niższy zakres posiada człony %s, które nie są uwzględnione w modelu"
-msgstr[2] "niższy zakres posiada człony %s, które nie są uwzględnione w modelu"
+#. R/qqnorm.R: stop("y is empty or has only NAs")
+#: R/qqnorm.R:0
+msgid "y is empty or has only NAs"
+msgstr "argument 'y' jest pusty lub posiada jedynie wartości NA"
 
-# stats/R/add.R: 670
-# stop(sprintf(ngettext(sum(where==0),
-#                                       "upper scope has term %s not included in model",
-#                                       "upper scope has terms %s not included in model"),
-#                              paste(sQuote(nmdrop[where==0]), collapse=", ")),
-#                      domain = NA)
-msgid "upper scope has term %s not included in model"
-msgid_plural "upper scope has terms %s not included in model"
-msgstr[0] "górny zakres posiada człon %s, które nie jest uwzględniony w modelu"
-msgstr[1] "górny zakres posiada człony %s, które nie są uwzględnione w modelu"
-msgstr[2] "górny zakres posiada człony %s, które nie są uwzględnione w modelu"
+#. R/family.R: stop("y values must be 0 <= y <= 1")
+#. R/family.R: stop("y values must be 0 <= y <= 1")
+#: R/family.R:0
+msgid "y values must be 0 <= y <= 1"
+msgstr "wartości 'y' muszą być z przedziału 0 <= y <= 1"
 
-# stats/R/aov.R: 29
-# stop(sprintf(ngettext(length(indError),
-#                               "there are %d Error terms: only 1 is allowed",
-#                               "there are %d Error terms: only 1 is allowed"),
-#                      length(indError)), domain = NA)
-msgid "there are %d Error terms: only 1 is allowed"
-msgid_plural "there are %d Error terms: only 1 is allowed"
-msgstr[0] "jest %d człon błędu: tylko 1 jest dozwolony"
-msgstr[1] "są %d człony błędu: tylko 1 jest dozwolony"
-msgstr[2] "jest %d członów błędu: tylko 1 jest dozwolony"
+#. R/smspline.R: warning("you must supply 1 < df <= n,  n = #{unique x} = ", nx)
+#: R/smspline.R:0
+msgid "you must supply 1 < df <= n,  n = #{unique x} ="
+msgstr "musisz dostarczyć 1 < df <= n,  n = #{unikalne x} ="
 
-# stats/R/aov.R: 319
-# stop(sprintf(ngettext(na,
-#                                       "unknown name %s in the 'split' list",
-#                                       "unknown names %s in the 'split' list"),
-#                              paste(sQuote(ns[na]), collapse = ", ")),
-#                      domain = NA)
-msgid "unknown name %s in the 'split' list"
-msgid_plural "unknown names %s in the 'split' list"
-msgstr[0] "nieznana nazwa %s w liście 'split'"
-msgstr[1] "nieznane nazwy %s w liście 'split'"
-msgstr[2] "nieznane nazwy %s w liście 'split'"
+#. R/approx.R: stop("zero non-NA points")
+#. R/approx.R: stop("zero non-NA points")
+#. R/spline.R: stop("zero non-NA points")
+#. R/splinefun.R: stop("zero non-NA points")
+#: R/approx.R:0 R/spline.R:0 R/splinefun.R:0
+msgid "zero non-NA points"
+msgstr "zero punktów o wartości nie-NA"
 
-# stats/R/dendrogram.R: 637
-# ngettext(length(nms),
-#                             "extra argument %s is not of class \"%s\"",
-#                             "extra arguments %s are not of class \"%s\"s")
-msgid "extra argument %s is not of class \"%s\""
-msgid_plural "extra arguments %s are not of class \"%s\"s"
-msgstr[0] "dodatkowy argument %s nie jest obiektem klasy \"%s\""
-msgstr[1] "dodatkowe argumenty %s nie są obiektami klasy \"%s\""
-msgstr[2] "dodatkowe argumenty %s nie są obiektami klasy \"%s\""
+#. R/ar.R: stop("zero-variance series")
+#. R/ar.R: stop("zero-variance series")
+#: R/ar.R:0
+msgid "zero-variance series"
+msgstr "seria o zerowej wariancji"
 
-# stats/R/diffinv.R: 81
-# warning(sprintf(ngettext(na,
-#                                  "extra argument %s will be disregarded",
-#                                  "extra arguments %s will be disregarded"),
-#                         paste(sQuote(names(list(...))), collapse = ", ")),
-# 		domain = NA)
-msgid "extra argument %s will be disregarded"
-msgid_plural "extra arguments %s will be disregarded"
-msgstr[0] "dodatkowy argument %s został odrzucony"
-msgstr[1] "dodatkowe argumenty %s zostały odrzucone"
-msgstr[2] "dodatkowe argumenty %s zostały odrzucone"
-
-# stats/R/factanal.R: 96
-# stop(sprintf(ngettext(factors,
-#                               "%d factor is too many for %d variables",
-#                               "%d factors are too many for %d variables"),
-#                      factors, p), domain = NA)
+#. R/factanal.R: ngettext(factors, "%d factor is too many for %d variables", "%d factors are too many for %d variables")
+#: R/factanal.R:0
 msgid "%d factor is too many for %d variables"
 msgid_plural "%d factors are too many for %d variables"
 msgstr[0] "%d czynnik to zbyt dużo dla %d zmiennych"
 msgstr[1] "%d czynniki to zbyt dużo dla %d zmiennych"
 msgstr[2] "%d czynników to zbyt dużo dla %d zmiennych"
 
-# stats/R/factanal.R: 115
-# stop(sprintf(ngettext(p,
-#                        "'start' must have %d row",
-#                        "'start' must have %d rows"),
-#                  p), domain = NA)
-msgid "'start' must have %d row"
-msgid_plural "'start' must have %d rows"
-msgstr[0] "'start' musi mieć %d wiersz"
-msgstr[1] "'start' musi mieć %d wiersze"
-msgstr[2] "'start' musi mieć %d wierszy"
-
-# stats/R/factanal.R: 134
-# stop(ngettext(nc,
-#                       "unable to optimize from this starting value",
-#                       "unable to optimize from these starting values"),
-#              domain = NA)
-msgid "unable to optimize from this starting value"
-msgid_plural "unable to optimize from these starting values"
-msgstr[0] "nie można zoptymalizować z tej wartości startowej"
-msgstr[1] "nie można zoptymalizować z tych wartości startowych"
-msgstr[2] "nie można zoptymalizować z tych wartości startowych"
-
-# stats/R/glm.R: 251
-# stop(sprintf(ngettext(nobs,
-#                                       "X matrix has rank %d, but only %d observation",
-#                                       "X matrix has rank %d, but only %d observations"),
-#                              fit$rank, nobs), domain = NA)
-msgid "X matrix has rank %d, but only %d observation"
-msgid_plural "X matrix has rank %d, but only %d observations"
-msgstr[0] "macierz 'X' ma rangę %d, ale tylko %d obserwację"
-msgstr[1] "macierz 'X' ma rangę %d, ale tylko %d obserwacje"
-msgstr[2] "macierz 'X' ma rangę %d, ale tylko %d obserwacji"
-
-# stats/R/kmeans.R: 69
-# warning(sprintf(ngettext(iter.max,
-# 				     "did not converge in %d iteration",
-# 				     "did not converge in %d iterations"),
-# 			    iter.max), call.=FALSE, domain = NA)
-msgid "did not converge in %d iteration"
-msgid_plural "did not converge in %d iterations"
-msgstr[0] "'medpolish()' nie zbiegł się w %d iteracji"
-msgstr[1] "'medpolish()' nie zbiegł się w %d iteracjach"
-msgstr[2] "'medpolish()' nie zbiegł się w %d iteracjach"
-
-# stats/R/lsfit.R: 45
-# warning(sprintf(ngettext(sum(!good),
-#                                  "%d missing value deleted",
-#                                  "%d missing values deleted"),
-#                         sum(!good)), domain = NA)
+#. R/lsfit.R: ngettext(sum(!good), "%d missing value deleted", "%d missing values deleted")
+#: R/lsfit.R:0
 msgid "%d missing value deleted"
 msgid_plural "%d missing values deleted"
 msgstr[0] "%d brakująca wartość została skasowana"
 msgstr[1] "%d brakujące wartości zostały skasowane"
 msgstr[2] "%d brakujących wartości zostało skasowanych"
 
-# stats/R/lsfit.R: 62
-# stop(sprintf(paste0(ngettext(nrx,
-#                        "'X' matrix has %d case (row)",
-#                        "'X' matrix has %d cases (rows)"),
-#               ", ",
-#               ngettext(nry,
-#                        "'Y' has %d case (row)",
-#                        "'Y' has %d cases (rows)")),
-#                        nrx, nry),
-#                        domain = NA)
+#. R/nafns.R: ngettext(n <- length(x), "%d observation deleted due to missingness",     "%d observations deleted due to missingness")
+#: R/nafns.R:0
+msgid "%d observation deleted due to missingness"
+msgid_plural "%d observations deleted due to missingness"
+msgstr[0] "%d obserwacja została skasowana z uwagi na braki w niej zawarte"
+msgstr[1] "%d obserwacje zostały skasowane z uwagi na braki w nich zawarte"
+msgstr[2] "%d obserwacji zostało skasowanych z uwagi na braki w nich zawarte"
+
+#. R/smspline.R: ngettext(diff, "%d observation with NA, NaN or Inf deleted",     "%d observations with NAs, NaNs and/or Infs deleted")
+#: R/smspline.R:0
+msgid "%d observation with NA, NaN or Inf deleted"
+msgid_plural "%d observations with NAs, NaNs and/or Infs deleted"
+msgstr[0] "%d obserwacji z wartością NA, NaN lub Inf została skasowana"
+msgstr[1] "%d obserwacje z wartościami NA, NaN oraz/lub Inf zostały skasowane"
+msgstr[2] ""
+"%d obserwacji z wartościami NA, NaN oraz/lub Inf zostało skasowanych"
+
+#. R/lsfit.R: ngettext(nrx, "'X' matrix has %d case (row)", "'X' matrix has %d cases (rows)")
+#: R/lsfit.R:0
 msgid "'X' matrix has %d case (row)"
 msgid_plural "'X' matrix has %d cases (rows)"
 msgstr[0] "macierz 'X' ma %d przypadek (wiersz)"
 msgstr[1] "macierz 'X' ma %d przypadki (wiersze)"
 msgstr[2] "macierz 'X' ma %d przypadków (wierszy)"
 
-# stats/R/lsfit.R: 62
-# stop(sprintf(paste0(ngettext(nrx,
-#                        "'X' matrix has %d case (row)",
-#                        "'X' matrix has %d cases (rows)"),
-#               ", ",
-#               ngettext(nry,
-#                        "'Y' has %d case (row)",
-#                        "'Y' has %d cases (rows)")),
-#                        nrx, nry),
-#                        domain = NA)
+#. R/lsfit.R: ngettext(nry, "'Y' has %d case (row)", "'Y' has %d cases (rows)")
+#: R/lsfit.R:0
 msgid "'Y' has %d case (row)"
 msgid_plural "'Y' has %d cases (rows)"
 msgstr[0] "'Y' ma %d przypadek (wiersz)"
 msgstr[1] "'Y' ma %d przypadki (wiersze)"
 msgstr[2] "'Y' ma %d przypadków (wierszy)"
 
-# stats/R/lsfit.R: 72
-# stop(sprintf(paste0(ngettext(nry,
-#                               "only %d case",
-#                               "only %d cases"),
-#                      ", ",
-#                      ngettext(ncx,
-#                               "but %d variable",
-#                               "but %d variables")),
-#                      nry, ncx),
-#              domain = NA)
-msgid "only %d case"
-msgid_plural "only %d cases"
-msgstr[0] "tylko %d przypadek"
-msgstr[1] "tylko %d przypadki"
-msgstr[2] "tylko %d przypadków"
-
-# stats/R/lsfit.R: 72
-# stop(sprintf(paste0(ngettext(nry,
-#                               "only %d case",
-#                               "only %d cases"),
-#                      ", ",
-#                      ngettext(ncx,
-#                               "but %d variable",
-#                               "but %d variables")),
-#                      nry, ncx),
-#              domain = NA)
-msgid "but %d variable"
-msgid_plural "but %d variables"
-msgstr[0] "ale %d zmienna"
-msgstr[1] "ale %d zmienne"
-msgstr[2] "ale %d zmiennych"
-
-# stats/R/medpolish.R: 51
-# warning(sprintf(ngettext(maxiter,
-#                              "medpolish() did not converge in %d iteration",
-#                              "medpolish() did not converge in %d iterations"),
-#                     maxiter), domain = NA)
-msgid "medpolish() did not converge in %d iteration"
-msgid_plural "medpolish() did not converge in %d iterations"
-msgstr[0] "'medpolish()' nie zbiegł się w %d iteracji"
-msgstr[1] "'medpolish()' nie zbiegł się w %d iteracjach"
-msgstr[2] "'medpolish()' nie zbiegł się w %d iteracjach"
+#. R/filter.R: ngettext(nser, "'init' must have %d column", "'init' must have 1 or %d columns",     domain = "R-stats")
+#: R/filter.R:0
+msgid "'init' must have %d column"
+msgid_plural "'init' must have 1 or %d columns"
+msgstr[0] "'init' musi mieć %d kolumnę"
+msgstr[1] "'init' musi mieć 1 lub %d kolumny"
+msgstr[2] "'init' musi mieć 1 lub %d kolumn"
 
-# stats/R/models.R: 410
-# warning(sprintf(paste0(ngettext(nr,
-#                                             "'newdata' had %d row",
-#                                             "'newdata' had %d rows"),
-#                                    " ",
-#                                   ngettext(nr2,
-#                                            "but variable found had %d row",
-#                                            "but variables found have %d rows")),
-#                             nr, nr2),
-#                     call. = FALSE, domain = NA)
+#. R/models.R: ngettext(nr, "'newdata' had %d row", "'newdata' had %d rows")
+#: R/models.R:0
 msgid "'newdata' had %d row"
 msgid_plural "'newdata' had %d rows"
 msgstr[0] "'newdata' miała %d wiersz"
 msgstr[1] "'newdata' miała %d wiersze"
 msgstr[2] "'newdata' miała %d wierszy"
 
-# stats/R/models.R: 410
-# warning(sprintf(paste0(ngettext(nr,
-#                                             "'newdata' had %d row",
-#                                             "'newdata' had %d rows"),
-#                                    " ",
-#                                   ngettext(nr2,
-#                                            "but variable found had %d row",
-#                                            "but variables found have %d rows")),
-#                             nr, nr2),
-#                     call. = FALSE, domain = NA)
+#. R/factanal.R: ngettext(p, "'start' must have %d row", "'start' must have %d rows")
+#: R/factanal.R:0
+msgid "'start' must have %d row"
+msgid_plural "'start' must have %d rows"
+msgstr[0] "'start' musi mieć %d wiersz"
+msgstr[1] "'start' musi mieć %d wiersze"
+msgstr[2] "'start' musi mieć %d wierszy"
+
+#. R/ts.R: ngettext(n.start, "'start.innov' is too short: need %d point",     "'start.innov' is too short: need %d points")
+#: R/ts.R:0
+msgid "'start.innov' is too short: need %d point"
+msgid_plural "'start.innov' is too short: need %d points"
+msgstr[0] "argument 'start.innov' jest zbyt krótki: potrzeba %d punktu"
+msgstr[1] "argument 'start.innov' jest zbyt krótki: potrzeba %d punktów"
+msgstr[2] "argument 'start.innov' jest zbyt krótki: potrzeba %d punktów"
+
+#. R/glm.R: ngettext(nobs, "X matrix has rank %d, but only %d observation",     "X matrix has rank %d, but only %d observations")
+#: R/glm.R:0
+msgid "X matrix has rank %d, but only %d observation"
+msgid_plural "X matrix has rank %d, but only %d observations"
+msgstr[0] "macierz 'X' ma rangę %d, ale tylko %d obserwację"
+msgstr[1] "macierz 'X' ma rangę %d, ale tylko %d obserwacje"
+msgstr[2] "macierz 'X' ma rangę %d, ale tylko %d obserwacji"
+
+#. R/nlm.R: ngettext(maxiter, "_NOT_ converged in %d iteration", "_NOT_ converged in %d iterations")
+#: R/nlm.R:0
+msgid "_NOT_ converged in %d iteration"
+msgid_plural "_NOT_ converged in %d iterations"
+msgstr[0] "metoda 'uniroot()' nie zbiegła się w %d iteracji"
+msgstr[1] "metoda 'uniroot()' nie zbiegła się w %d iteracjach"
+msgstr[2] "metoda 'uniroot()' nie zbiegła się w %d iteracjach"
+
+#. R/lsfit.R: ngettext(ncx, "but %d variable", "but %d variables")
+#: R/lsfit.R:0
+msgid "but %d variable"
+msgid_plural "but %d variables"
+msgstr[0] "ale %d zmienna"
+msgstr[1] "ale %d zmienne"
+msgstr[2] "ale %d zmiennych"
+
+#. R/models.R: ngettext(nr2, "but variable found had %d row", "but variables found have %d rows")
+#: R/models.R:0
 msgid "but variable found had %d row"
 msgid_plural "but variables found have %d rows"
 msgstr[0] "ale znaleziona zmienna ma %d wiersz"
 msgstr[1] "ale znalezione zmienne mają %d wiersze"
 msgstr[2] "ale znalezione zmienne mają %d wierszy"
 
-# stats/R/models.R: 445
-# stop(sprintf(ngettext(length(m),
-#                                               "factor %s has new level %s",
-#                                               "factor %s has new levels %s"),
-#                                      nm, paste(nxl[m], collapse=", ")),
-#                              domain = NA)
+#. R/kmeans.R: ngettext(iter.max, "did not converge in %d iteration", "did not converge in %d iterations")
+#: R/kmeans.R:0
+msgid "did not converge in %d iteration"
+msgid_plural "did not converge in %d iterations"
+msgstr[0] "'medpolish()' nie zbiegł się w %d iteracji"
+msgstr[1] "'medpolish()' nie zbiegł się w %d iteracjach"
+msgstr[2] "'medpolish()' nie zbiegł się w %d iteracjach"
+
+#. R/dendrogram.R: ngettext(length(nms), "extra argument %s is not of class \"%s\"",     "extra arguments %s are not of class \"%s\"s")
+#: R/dendrogram.R:0
+msgid "extra argument %s is not of class \"%s\""
+msgid_plural "extra arguments %s are not of class \"%s\"s"
+msgstr[0] "dodatkowy argument %s nie jest obiektem klasy \"%s\""
+msgstr[1] "dodatkowe argumenty %s nie są obiektami klasy \"%s\""
+msgstr[2] "dodatkowe argumenty %s nie są obiektami klasy \"%s\""
+
+#. R/models.R: ngettext(length(m), "factor %s has new level %s", "factor %s has new levels %s")
+#: R/models.R:0
 msgid "factor %s has new level %s"
 msgid_plural "factor %s has new levels %s"
 msgstr[0] "czynnik %s ma nowy poziom %s"
 msgstr[1] "czynnik %s ma nowe poziomy %s"
 msgstr[2] "czynnik %s ma nowe poziomy %s"
 
-# stats/R/nafns.R: 181
-# sprintf(ngettext(n <- length(x), "%d observation deleted due to missingness",
-#                      "%d observations deleted due to missingness"),
-#             n)
-msgid "%d observation deleted due to missingness"
-msgid_plural "%d observations deleted due to missingness"
-msgstr[0] "%d obserwacja została skasowana z uwagi na braki w niej zawarte"
-msgstr[1] "%d obserwacje zostały skasowane z uwagi na braki w nich zawarte"
-msgstr[2] "%d obserwacji zostało skasowanych z uwagi na braki w nich zawarte"
-
-# stats/R/nlm.R: 159
-# sprintf(ngettext(maxiter,
-# 			     "_NOT_ converged in %d iteration",
-# 			     "_NOT_ converged in %d iterations"),
-# 		    maxiter)
-msgid "_NOT_ converged in %d iteration"
-msgid_plural "_NOT_ converged in %d iterations"
-msgstr[0] "metoda 'uniroot()' nie zbiegła się w %d iteracji"
-msgstr[1] "metoda 'uniroot()' nie zbiegła się w %d iteracjach"
-msgstr[2] "metoda 'uniroot()' nie zbiegła się w %d iteracjach"
-
-# stats/R/nlminb.R: 85
-# warning(sprintf(ngettext(length(nap),
-#                                      "unrecognized control element named %s ignored",
-#                                      "unrecognized control elements named %s ignored"),
-#                             paste(sQuote(nms[nap]), collapse = ", ")),
-#                     domain = NA)
-# stats/R/nls.R: 405
-# warning(sprintf(ngettext(length(nap),
-#                                      "unrecognized control element named %s ignored",
-#                                      "unrecognized control elements named %s ignored"),
-#                             paste(nms[nap], collapse = ", ")),
-#                     domain = NA)
-msgid "unrecognized control element named %s ignored"
-msgid_plural "unrecognized control elements named %s ignored"
-msgstr[0] "nierozpoznany element kontrolny o nazwie %s został zignorowany"
-msgstr[1] "nierozpoznane elementy kontrolne o nazwach %s zostały zignorowane"
-msgstr[2] "nierozpoznane elementy kontrolne o nazwach %s zostały zignorowane"
-
-# stats/R/nls.R: 525
-# message(sprintf(ngettext(sum(np == -1),
-#                                      "fitting parameter %s without any variables",
-#                                      "fitting parameters %s without any variables"),
-#                             paste(sQuote(pnames[np == -1]), collapse=", ")),
-#                     domain = NA)
+#. R/nls.R: ngettext(sum(np == -1), "fitting parameter %s without any variables",     "fitting parameters %s without any variables")
+#: R/nls.R:0
 msgid "fitting parameter %s without any variables"
 msgid_plural "fitting parameters %s without any variables"
 msgstr[0] "parametr dopasowania %s bez jakichkolwiek zmiennych"
 msgstr[1] "parametry dopasowania %s bez jakichkolwiek zmiennych"
 msgstr[2] "parametry dopasowania %s bez jakichkolwiek zmiennych"
 
-# stats/R/selfStart.R: 45
-# stop(sprintf(ngettext(sum(msng),
-#                        "parameter %s does not occur in the model formula",
-#                        "parameters %s do not occur in the model formula"),
-#                          paste(sQuote(parameters[msng]), collapse=", ")),
-#                  domain = NA)
+#. R/add.R: ngettext(sum(where == 0), "lower scope has term %s not included in model",     "lower scope has terms %s not included in model")
+#: R/add.R:0
+msgid "lower scope has term %s not included in model"
+msgid_plural "lower scope has terms %s not included in model"
+msgstr[0] ""
+"niższy zakres posiada człon %s, które nie jest uwzględniony w modelu"
+msgstr[1] "niższy zakres posiada człony %s, które nie są uwzględnione w modelu"
+msgstr[2] "niższy zakres posiada człony %s, które nie są uwzględnione w modelu"
+
+#. R/medpolish.R: ngettext(maxiter, "medpolish() did not converge in %d iteration",     "medpolish() did not converge in %d iterations")
+#: R/medpolish.R:0
+msgid "medpolish() did not converge in %d iteration"
+msgid_plural "medpolish() did not converge in %d iterations"
+msgstr[0] "'medpolish()' nie zbiegł się w %d iteracji"
+msgstr[1] "'medpolish()' nie zbiegł się w %d iteracjach"
+msgstr[2] "'medpolish()' nie zbiegł się w %d iteracjach"
+
+#. R/lsfit.R: ngettext(nry, "only %d case", "only %d cases")
+#: R/lsfit.R:0
+msgid "only %d case"
+msgid_plural "only %d cases"
+msgstr[0] "tylko %d przypadek"
+msgstr[1] "tylko %d przypadki"
+msgstr[2] "tylko %d przypadków"
+
+#. R/selfStart.R: ngettext(sum(msng), "parameter %s does not occur in the model formula",     "parameters %s do not occur in the model formula")
+#: R/selfStart.R:0
 msgid "parameter %s does not occur in the model formula"
 msgid_plural "parameters %s do not occur in the model formula"
 msgstr[0] "parametr %s nie pojawia się w formule modelu"
 msgstr[1] "parametry %s nie pojawiają się w formule modelu"
 msgstr[2] "parametry %s nie pojawiają się w formule modelu"
 
-# stats/R/smspline.R: 351
-# warning(sprintf(ngettext(diff,
-#                                  "%d observation with NA, NaN or Inf deleted",
-#                                  "%d observations with NAs, NaNs and/or Infs deleted"),
-#                         diff), domain = NA)
-msgid "%d observation with NA, NaN or Inf deleted"
-msgid_plural "%d observations with NAs, NaNs and/or Infs deleted"
-msgstr[0] "%d obserwacji z wartością NA, NaN lub Inf została skasowana"
-msgstr[1] "%d obserwacje z wartościami NA, NaN oraz/lub Inf zostały skasowane"
-msgstr[2] ""
-"%d obserwacji z wartościami NA, NaN oraz/lub Inf zostało skasowanych"
+#. R/aov.R: ngettext(length(indError), "there are %d Error terms: only 1 is allowed",     "there are %d Error terms: only 1 is allowed")
+#: R/aov.R:0
+msgid "there are %d Error terms: only 1 is allowed"
+msgid_plural "there are %d Error terms: only 1 is allowed"
+msgstr[0] "jest %d człon błędu: tylko 1 jest dozwolony"
+msgstr[1] "są %d człony błędu: tylko 1 jest dozwolony"
+msgstr[2] "jest %d członów błędu: tylko 1 jest dozwolony"
 
-# stats/R/ts.R: 802
-# stop(sprintf(ngettext(n.start,
-#                               "'start.innov' is too short: need %d point",
-#                               "'start.innov' is too short: need %d points"),
-#                      n.start), domain = NA)
-msgid "'start.innov' is too short: need %d point"
-msgid_plural "'start.innov' is too short: need %d points"
-msgstr[0] "argument 'start.innov' jest zbyt krótki: potrzeba %d punktu"
-msgstr[1] "argument 'start.innov' jest zbyt krótki: potrzeba %d punktów"
-msgstr[2] "argument 'start.innov' jest zbyt krótki: potrzeba %d punktów"
+#. R/factanal.R: ngettext(nc, "unable to optimize from this starting value", "unable to optimize from these starting values")
+#: R/factanal.R:0
+msgid "unable to optimize from this starting value"
+msgid_plural "unable to optimize from these starting values"
+msgstr[0] "nie można zoptymalizować z tej wartości startowej"
+msgstr[1] "nie można zoptymalizować z tych wartości startowych"
+msgstr[2] "nie można zoptymalizować z tych wartości startowych"
+
+#. R/aov.R: ngettext(na, "unknown name %s in the 'split' list", "unknown names %s in the 'split' list")
+#: R/aov.R:0
+msgid "unknown name %s in the 'split' list"
+msgid_plural "unknown names %s in the 'split' list"
+msgstr[0] "nieznana nazwa %s w liście 'split'"
+msgstr[1] "nieznane nazwy %s w liście 'split'"
+msgstr[2] "nieznane nazwy %s w liście 'split'"
+
+#. R/nlminb.R: ngettext(length(nap), "unrecognized control element named %s ignored",     "unrecognized control elements named %s ignored")
+#. R/nls.R: ngettext(length(nap), "unrecognized control element named %s ignored",     "unrecognized control elements named %s ignored")
+#: R/nlminb.R:0 R/nls.R:0
+msgid "unrecognized control element named %s ignored"
+msgid_plural "unrecognized control elements named %s ignored"
+msgstr[0] "nierozpoznany element kontrolny o nazwie %s został zignorowany"
+msgstr[1] "nierozpoznane elementy kontrolne o nazwach %s zostały zignorowane"
+msgstr[2] "nierozpoznane elementy kontrolne o nazwach %s zostały zignorowane"
+
+#. R/add.R: ngettext(sum(where == 0), "upper scope has term %s not included in model",     "upper scope has terms %s not included in model")
+#: R/add.R:0
+msgid "upper scope has term %s not included in model"
+msgid_plural "upper scope has terms %s not included in model"
+msgstr[0] "górny zakres posiada człon %s, które nie jest uwzględniony w modelu"
+msgstr[1] "górny zakres posiada człony %s, które nie są uwzględnione w modelu"
+msgstr[2] "górny zakres posiada człony %s, które nie są uwzględnione w modelu"
+
+#. R/add.R: ngettext(newn, "using the %d/%d row from a combined fit", "using the %d/%d rows from a combined fit")
+#. R/add.R: ngettext(newn, "using the %d/%d row from a combined fit", "using the %d/%d rows from a combined fit")
+#: R/add.R:0
+msgid "using the %d/%d row from a combined fit"
+msgid_plural "using the %d/%d rows from a combined fit"
+msgstr[0] "używanie %d/%d wiersza z połączonego dopasowania"
+msgstr[1] "używanie %d/%d wierszy z połączonego dopasowania"
+msgstr[2] "używanie %d/%d wierszy z połączonego dopasowania"
+
+#~ msgid ","
+#~ msgstr ","
+
+#~ msgid "iterTrace ="
+#~ msgstr "iterTrace ="
+
+#~ msgid "a limit is missing"
+#~ msgstr "brakuje co najmniej jednej granicy całkowania"
+
+#~ msgid "non-matched further arguments are disregarded"
+#~ msgstr "dalsze niedopasowane argumenty zostały odrzucone"
+
+#~ msgid "extra argument %s will be disregarded"
+#~ msgid_plural "extra arguments %s will be disregarded"
+#~ msgstr[0] "dodatkowy argument %s został odrzucony"
+#~ msgstr[1] "dodatkowe argumenty %s zostały odrzucone"
+#~ msgstr[2] "dodatkowe argumenty %s zostały odrzucone"
diff --git a/src/library/stats/po/R-pt_BR.po b/src/library/stats/po/R-pt_BR.po
index 43d1f36..ac8baee 100644
--- a/src/library/stats/po/R-pt_BR.po
+++ b/src/library/stats/po/R-pt_BR.po
@@ -2,7 +2,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: 2.13.0\n"
 "Report-Msgid-Bugs-To: bugs.r-project.org\n"
-"POT-Creation-Date: 2014-03-27 07:47\n"
+"POT-Creation-Date: 2016-04-01 09:50\n"
 "PO-Revision-Date: 2011-03-26 08:57-0300\n"
 "Last-Translator: Fernando Henrique <pessoal at fernandohrosa.com.br>\n"
 "Language-Team: http://www.feferraz.net/br/P/Projeto_Traducao_R_Portugues\n"
@@ -108,6 +108,9 @@ msgstr "x$lag deve ter ao menos 1 coluna"
 msgid "can use ci.type=\"ma\" only if first lag is 0"
 msgstr "ci.type=\"ma\" somente pode ser usado se o primeiro atraso for 0"
 
+msgid "Page [%d,%d]: i =%s; j =%s"
+msgstr ""
+
 msgid "univariate time series only"
 msgstr "Somente séries temporais uinivariadas"
 
@@ -481,6 +484,12 @@ msgstr "Aproximação do qui-quadrado pode estar incorreta"
 msgid "NA values not allowed in 'd'"
 msgstr "valores NA não permitidos em 'd'"
 
+msgid "eig=TRUE is disregarded when list.=FALSE"
+msgstr ""
+
+msgid "x.ret=TRUE is disregarded when list.=FALSE"
+msgstr ""
+
 msgid "distances must be result of 'dist' or a square matrix"
 msgstr "distâncias deve ser resultado de \"dist\", ou de uma matriz quadrada"
 
@@ -494,6 +503,9 @@ msgstr "'k' deve estar em {1, 2, ..  n - 1}"
 msgid "only %d of the first %d eigenvalues are > 0"
 msgstr "somente %d do primeiro %d autovalor são > 0"
 
+msgid "package 'MASS' must be installed"
+msgstr ""
+
 msgid "initial value is not in the interior of the feasible region"
 msgstr "valor inicial não está na região viável"
 
@@ -538,6 +550,10 @@ msgstr "deve fornecer um ou mais vetores"
 msgid "arguments must have the same length"
 msgstr "argumentos devem ter o mesmo comprimento"
 
+#, fuzzy
+msgid "wrong number of columns in new data:"
+msgstr "número errado de linhas na matriz de contraste"
+
 msgid "contrasts apply only to factors"
 msgstr "contrastes aplicam-se apenas a fatores"
 
@@ -639,8 +655,10 @@ msgstr ""
 msgid "elements of 'k' must be between 1 and %d"
 msgstr "elementos de 'k' deve estar entre 1 e %d"
 
-msgid "'merge' and 'height' do not fit!"
-msgstr "'merge' e 'height' não se encaixam!"
+msgid ""
+"dendrogram entries must be 1,2,..,%d (in any order), to be coercible to "
+"\"hclust\""
+msgstr ""
 
 msgid "dendrogram node with non-positive #{branches}"
 msgstr "nó do dendrograma com #{ramos} não-positivos"
@@ -698,11 +716,9 @@ msgstr ""
 
 msgid "'RowSideColors' must be a character vector of length nrow(x)"
 msgstr ""
-"'RowSideColors'  deve ser um vetor de caracteres de comprimento nrow"
-"(x)'RowSideColors'  deve ser um vetor de caracteres de comprimento nrow(x)"
-
-msgid "non-matched further arguments are disregarded"
-msgstr "outros argumentos não-pareados são ignorados"
+"'RowSideColors'  deve ser um vetor de caracteres de comprimento "
+"nrow(x)'RowSideColors'  deve ser um vetor de caracteres de comprimento "
+"nrow(x)"
 
 msgid "argument 'x' must be numeric"
 msgstr "argumento 'x ' deve ser numérico"
@@ -780,8 +796,8 @@ msgid "x[] and prob[] must be equal length vectors."
 msgstr "x[] e prob[] devem ser vetores de comprimento igual."
 
 #, fuzzy
-msgid "probabilities cannot be negative nor all 0"
-msgstr "probabilidades não podem ser negativas, nem todas 0."
+msgid "probabilities must be finite, non-negative and not all 0"
+msgstr "probabilidades devem ser não-negativas."
 
 msgid "'x' must be non-negative"
 msgstr "'x' deve ser não-negativo"
@@ -795,6 +811,9 @@ msgstr "especifique 'prob' e 'mu'"
 msgid "some terms will have NAs due to the limits of the method"
 msgstr "alguns termos terão NAs devido aos limites do método"
 
+msgid "multivariate case with missing coefficients is not yet implemented"
+msgstr ""
+
 msgid "'x' must have 1 or more non-missing values"
 msgstr "'x' deve ter um ou mais valores  ausentes"
 
@@ -926,7 +945,9 @@ msgid "positive values only are allowed for the 'inverse.gaussian' family"
 msgstr "somente valores positivos permitidos para a família inverse.gaussian"
 
 #, fuzzy
-msgid "need CRAN package 'SuppDists' for the 'inverse.gaussian' family"
+msgid ""
+"need CRAN package 'SuppDists' for simulation from the 'inverse.gaussian' "
+"family"
 msgstr "É preciso o pacote CRAN 'SuppDists' para a família 'inverse.gaussian'"
 
 msgid "using weights as inverse variances"
@@ -957,14 +978,6 @@ msgstr ""
 msgid "length of 'init' must equal length of 'filter'"
 msgstr "comprimento de 'init' deve igualar o comprimento de 'filter'"
 
-#, fuzzy
-msgid "'init' must have 1 column"
-msgstr "'init'; deve ter 1 ou %d cols"
-
-#, fuzzy
-msgid "'init' must have 1 or %d columns"
-msgstr "'init'; deve ter 1 ou %d cols"
-
 msgid "'x' must have at least 2 rows and columns"
 msgstr "'x' deve ter pelo menos 2 linhas e colunas"
 
@@ -1193,12 +1206,6 @@ msgstr "deve ter n >= 2 objetos para agrupar"
 msgid "invalid length of members"
 msgstr "comprimento inválido dos membros"
 
-msgid "invalid dendrogram"
-msgstr "dendrograma inválida"
-
-msgid "'merge' component in dendrogram must be integer"
-msgstr "componente 'merge' em dendrograma deve ser inteiro"
-
 #, fuzzy
 msgid "argument 'x' cannot be coerced to class %s"
 msgstr "argumento 'x' não pode ser forçado para classe \"hclust\""
@@ -1227,8 +1234,8 @@ msgstr "todos os elementos de 'which' devem estar entre 1 e %d"
 msgid "invalid parameter values"
 msgstr "valores de parâmetros são inválidos"
 
-msgid "a limit is missing"
-msgstr "está faltando um limite"
+msgid "a limit is NA or NaN"
+msgstr ""
 
 msgid "missing values not allowed"
 msgstr "valores que faltam não são permitidos"
@@ -1308,6 +1315,12 @@ msgstr "'iter.max' deve ser positivo"
 msgid "must have same number of columns in 'x' and 'centers'"
 msgstr "deve ter o mesmo número de colunas em 'x' e 'centers'"
 
+msgid "'x' is a list, so ignoring argument 'g'"
+msgstr ""
+
+msgid "some elements of 'x' are not numeric and will be coerced to numeric"
+msgstr ""
+
 msgid "not enough 'x' data"
 msgstr "insuficientes dados 'x'"
 
@@ -1447,6 +1460,10 @@ msgstr "'x' inválido"
 msgid "only 1-4 predictors are allowed"
 msgstr "somente 1-4 prognosticadores são permitidos"
 
+#, fuzzy
+msgid "invalid NROW(X)"
+msgstr "'x' inválido"
+
 msgid "invalid 'y'"
 msgstr "'y' inválido"
 
@@ -1478,6 +1495,13 @@ msgstr "argumento 'omit' inválido"
 msgid "invalid argument 'degree'"
 msgstr "argumento 'omit' inválido"
 
+msgid "iterTrace ="
+msgstr ""
+
+#, fuzzy
+msgid "not obeyed as iterations ="
+msgstr "não convergiu em %d iterações"
+
 msgid "first argument must be a \"loess\" object"
 msgstr "primeiro argumento deve ser um objeto \"loess\""
 
@@ -2016,7 +2040,7 @@ msgstr ""
 msgid "'varying' arguments must be the same length"
 msgstr ""
 
-msgid "'times' is wrong length"
+msgid "'lengths(varying)' must all match 'length(times)'"
 msgstr ""
 
 msgid "there are records with missing times, which will be dropped."
@@ -2078,6 +2102,9 @@ msgstr ""
 msgid "invalid 'endrule' argument"
 msgstr "argumento 'method' inválido"
 
+msgid ".nknots.smspl() is now exported; use it instead of n.knots()"
+msgstr ""
+
 msgid "invalid 'control.spar'"
 msgstr ""
 
@@ -2223,8 +2250,9 @@ msgstr ""
 msgid "'plot.stepfun' called with wrong type of argument 'x'"
 msgstr ""
 
-msgid "must be 0 or 1"
-msgstr ""
+#, fuzzy
+msgid "%s must be 0 or 1"
+msgstr "'degree' deve ser 0, 1 ou 2"
 
 msgid "only univariate series are allowed"
 msgstr ""
@@ -2495,12 +2523,6 @@ msgstr[0] "argumentos extras descartados"
 msgstr[1] "argumentos extras descartados"
 
 #, fuzzy
-msgid "extra argument %s will be disregarded"
-msgid_plural "extra arguments %s will be disregarded"
-msgstr[0] "argumentos extras descartados"
-msgstr[1] "argumentos extras descartados"
-
-#, fuzzy
 msgid "%d factor is too many for %d variables"
 msgid_plural "%d factors are too many for %d variables"
 msgstr[0] "existem %d fatores, isto é demais para as %d variáveis"
@@ -2519,6 +2541,12 @@ msgstr[0] "incapaz de otimizar a partir deste(s) valor(es) inicial(s)"
 msgstr[1] "incapaz de otimizar a partir deste(s) valor(es) inicial(s)"
 
 #, fuzzy
+msgid "'init' must have %d column"
+msgid_plural "'init' must have 1 or %d columns"
+msgstr[0] "'init'; deve ter 1 ou %d cols"
+msgstr[1] "'init'; deve ter 1 ou %d cols"
+
+#, fuzzy
 msgid "X matrix has rank %d, but only %d observation"
 msgid_plural "X matrix has rank %d, but only %d observations"
 msgstr[0] "matriz X tem posto %d, mas somente %d observações"
@@ -2625,6 +2653,35 @@ msgid_plural "'start.innov' is too short: need %d points"
 msgstr[0] ""
 msgstr[1] ""
 
+#~ msgid "a limit is missing"
+#~ msgstr "está faltando um limite"
+
+#~ msgid "non-matched further arguments are disregarded"
+#~ msgstr "outros argumentos não-pareados são ignorados"
+
+#, fuzzy
+#~ msgid "extra argument %s will be disregarded"
+#~ msgid_plural "extra arguments %s will be disregarded"
+#~ msgstr[0] "argumentos extras descartados"
+#~ msgstr[1] "argumentos extras descartados"
+
+#~ msgid "'merge' and 'height' do not fit!"
+#~ msgstr "'merge' e 'height' não se encaixam!"
+
+#~ msgid "invalid dendrogram"
+#~ msgstr "dendrograma inválida"
+
+#~ msgid "'merge' component in dendrogram must be integer"
+#~ msgstr "componente 'merge' em dendrograma deve ser inteiro"
+
+#, fuzzy
+#~ msgid "probabilities cannot be negative nor all 0"
+#~ msgstr "probabilidades não podem ser negativas, nem todas 0."
+
+#, fuzzy
+#~ msgid "'init' must have 1 or %d columns"
+#~ msgstr "'init'; deve ter 1 ou %d cols"
+
 #~ msgid "'deriv' must be between 0 and 2"
 #~ msgstr "'deriv' deve estar entre 0 e 2"
 
diff --git a/src/library/stats/po/R-ru.po b/src/library/stats/po/R-ru.po
index ffd208a..542599b 100644
--- a/src/library/stats/po/R-ru.po
+++ b/src/library/stats/po/R-ru.po
@@ -10,17 +10,16 @@ msgid ""
 msgstr ""
 "Project-Id-Version: R 2.11.0\n"
 "Report-Msgid-Bugs-To: bugs.r-project.org\n"
-"POT-Creation-Date: 2014-03-27 07:47\n"
-"PO-Revision-Date: 2014-03-11 10:32-0600\n"
+"POT-Creation-Date: 2015-06-06 13:51\n"
+"PO-Revision-Date: 2016-04-05 18:08-0600\n"
 "Last-Translator: Alexey Shipunov <dactylorhiza at gmail.com>\n"
 "Language-Team: Russian\n"
-"Language: \n"
+"Language: ru\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=KOI8-R\n"
 "Content-Transfer-Encoding: 8bit\n"
 "X-Poedit-Language: Russian\n"
-"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n"
-"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
+"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
 
 msgid "models are not all fitted to the same number of observations"
 msgstr "�� ��� ������ ���� ��������� ��� ������ ������"
@@ -35,20 +34,16 @@ msgid "object not interpretable as a factor"
 msgstr "������ �� ���������������� ��� ������"
 
 msgid "cannot fit models without level ('alpha' must not be 0 or FALSE)"
-msgstr ""
-"�� ���� ��������� ������ ��� ������ ('alpha' �� ������ ���� ����� ��� FALSE)."
+msgstr "�� ���� ��������� ������ ��� ������ ('alpha' �� ������ ���� ����� ��� FALSE)."
 
 msgid "'alpha', 'beta' and 'gamma' must be within the unit interval"
 msgstr "'alpha', 'beta' � 'gamma' ������ ���� ������ ���������� ���������"
 
 msgid "data must be non-zero for multiplicative Holt-Winters"
-msgstr ""
-"������ ������ ���� ���������������� ��� ������������������ �������� ������ "
-"�����-��������"
+msgstr "������ ������ ���� ���������������� ��� ������������������ �������� ������ �����-��������"
 
 msgid "need at least 2 periods to compute seasonal start values"
-msgstr ""
-"����� �� ������� ���� 2 �������, ����� ��������� ��������� �������� ������"
+msgstr "����� �� ������� ���� 2 �������, ����� ��������� ��������� �������� ������"
 
 msgid "invalid length(x)"
 msgstr "������������ length(x)"
@@ -110,6 +105,9 @@ msgstr "x$lag 
 msgid "can use ci.type=\"ma\" only if first lag is 0"
 msgstr "���� ������������ ci.type=\"ma\" ������ ���� ������ ��� -- ����"
 
+msgid "Page [%d,%d]: i =%s; j =%s"
+msgstr "�������� [%d,%d]: i =%s; j =%s"
+
 msgid "univariate time series only"
 msgstr "������ ���������� ��������� ����"
 
@@ -144,8 +142,7 @@ msgid "AIC is not defined for this model, so 'step' cannot proceed"
 msgstr "AIC ��� ���� ������ �� ����������, ������� 'step' �� ��������"
 
 msgid "AIC is -infinity for this model, so 'step' cannot proceed"
-msgstr ""
-"AIC ��� ���� ������ ������������ ����������, ������� 'step' �� ��������"
+msgstr "AIC ��� ���� ������ ������������ ����������, ������� 'step' �� ��������"
 
 msgid "'A' must be an array or table"
 msgstr "'A' ������ ���� �������� ��� ��������"
@@ -203,9 +200,7 @@ msgid "not enough 'y' observations"
 msgstr "������������ ���������� 'y'"
 
 msgid "samples differ in location: cannot compute confidence set, returning NA"
-msgstr ""
-"������� ����������� ����������: �� ���� ���������� ������������� ���������, "
-"��������� NA"
+msgstr "������� ����������� ����������: �� ���� ���������� ������������� ���������, ��������� NA"
 
 msgid "cannot compute confidence set, returning NA"
 msgstr "�� ���� ���������� ������������� ���������, ��������� NA"
@@ -217,13 +212,10 @@ msgid "cannot compute estimate, returning NA"
 msgstr "�� ���� ���������� ������, ��������� NA"
 
 msgid "cannot compute exact p-value with ties"
-msgstr ""
-"�� ���� ���������� ������ p-�������� ��� ������� ������������� ����������"
+msgstr "�� ���� ���������� ������ p-�������� ��� ������� ������������� ����������"
 
 msgid "cannot compute exact confidence intervals with ties"
-msgstr ""
-"�� ���� ���������� ������ ������������� ��������� ��� ������� ������������� "
-"����������"
+msgstr "�� ���� ���������� ������ ������������� ��������� ��� ������� ������������� ����������"
 
 msgid "grouping factor must have exactly 2 levels"
 msgstr "������������ ������ ������ ����� � �������� 2 ������"
@@ -286,7 +278,7 @@ msgid "'order.max' must be < 'n.used'"
 msgstr "'order.max' ������ ���� < 'n.used'"
 
 msgid "zero-variance series"
-msgstr ""
+msgstr "����� � ������� ���������"
 
 msgid "'n.ahead' must be at least 1"
 msgstr "'n.ahead' ������ ���� �� ������� ���� 1"
@@ -319,8 +311,7 @@ msgid "wrong length for 'fixed'"
 msgstr "������������ ����� 'fixed'"
 
 msgid "some AR parameters were fixed: setting transform.pars = FALSE"
-msgstr ""
-"��������� ��������� AR ���� ����������: ������������ transform.pars = FALSE"
+msgstr "��������� ��������� AR ���� ����������: ������������ transform.pars = FALSE"
 
 msgid "too few non-missing observations"
 msgstr "������� ���� ������������� ��������"
@@ -352,21 +343,17 @@ msgstr "
 msgid "seasonal MA part of model is not invertible"
 msgstr "�������� ����� ����������� �������� �� ������ ����������"
 
-#, fuzzy
 msgid "NAs in '%s'"
-msgstr "NAs � 'x'"
+msgstr "NAs � '%s'"
 
-#, fuzzy
 msgid "invalid 'SSinit'"
-msgstr "������������ 'nb'"
+msgstr "������������ 'SSinit'"
 
 msgid "converting non-invertible initial MA values"
 msgstr "����������� ��-����������� ��������� �������� ����������� ��������"
 
 msgid "some ARMA parameters were fixed: setting transform.pars = FALSE"
-msgstr ""
-"��������� ��������� ������ �������������-����������� �������� ���� "
-"����������: ������������ transform.pars = FALSE"
+msgstr "��������� ��������� ������ �������������-����������� �������� ���� ����������: ������������ transform.pars = FALSE"
 
 msgid "'xreg' is collinear"
 msgstr "'xreg' �����������"
@@ -375,9 +362,7 @@ msgid "NAs present: setting 'delta' to -1"
 msgstr "���� NAs: ������������ 'delta' � -1"
 
 msgid "transformed ARMA parameters were fixed"
-msgstr ""
-"���������� ��������� ������ �������������-������������� �������� ���� "
-"����������"
+msgstr "���������� ��������� ������ �������������-������������� �������� ���� ����������"
 
 msgid "need at least 2 data points"
 msgstr "����� �� ������� ���� 2 �����"
@@ -409,9 +394,8 @@ msgstr "
 msgid "there must be at least 2 observations in each group"
 msgstr "��� ������ ���� ��� ������� 2 ���������� � ������ ������"
 
-#, fuzzy
 msgid "'formula' should be of the form response ~ group"
-msgstr "������� '%s' ������ ���� � ���� '~expr'"
+msgstr "'formula'������ ���� � ���� ������ ~ ������"
 
 msgid "'x' must be nonnegative and integer"
 msgstr "'x' ������ ���� ��������������� � �����"
@@ -509,12 +493,8 @@ msgstr "
 msgid "contrasts not defined for %d degrees of freedom"
 msgstr "��� %d �������� ������� ��������� �� ����������"
 
-msgid ""
-"orthogonal polynomials cannot be represented accurately enough for %d "
-"degrees of freedom"
-msgstr ""
-"������������� ���������� �� ����� ���� ���������� ��������� ������������ ��� "
-"%d �������� �������"
+msgid "orthogonal polynomials cannot be represented accurately enough for %d degrees of freedom"
+msgstr "������������� ���������� �� ����� ���� ���������� ��������� ������������ ��� %d �������� �������"
 
 msgid "'scores' argument is of the wrong length"
 msgstr "'scores' �������� ������������ �����"
@@ -630,8 +610,8 @@ msgstr "
 msgid "elements of 'k' must be between 1 and %d"
 msgstr "�������� 'k' ������ ���� ����� 1 � %d"
 
-msgid "'merge' and 'height' do not fit!"
-msgstr "'merge' � 'height' �� �������������!"
+msgid "dendrogram entries must be 1,2,..,%d (in any order), to be coercible to \"hclust\""
+msgstr "�������� ������������ ������ ���� 1,2,..,%d (� ����� �������) ����� ���� ��������� \"hclust\""
 
 msgid "dendrogram node with non-positive #{branches}"
 msgstr "���� ������������ � ���������������� #{branches}"
@@ -655,9 +635,7 @@ msgid "dendrogram non-leaf node with non-positive #{branches}"
 msgstr "���������� ���� ������������ � ���������������� #{branches}"
 
 msgid "'height' must be at least %g, the maximal height of its components"
-msgstr ""
-"'height' ������ ���� �� ������� ���� %g (������������ ������ ��������� "
-"���������)"
+msgstr "'height' ������ ���� �� ������� ���� %g (������������ ������ ��������� ���������)"
 
 msgid "'X' is not a dendrogram"
 msgstr "'X' �� �������� �������������"
@@ -686,9 +664,6 @@ msgstr "'ColSideColors' 
 msgid "'RowSideColors' must be a character vector of length nrow(x)"
 msgstr "'RowSideColors' ������ ���� ��������� �������� � ������ = nrow(x)"
 
-msgid "non-matched further arguments are disregarded"
-msgstr "���������� ����������������� ��������� ���������������"
-
 msgid "argument 'x' must be numeric"
 msgstr "�������� 'x' ������ ���� ��������"
 
@@ -761,8 +736,8 @@ msgstr "
 msgid "x[] and prob[] must be equal length vectors."
 msgstr "x[] � prob[] ������ ��������� ���������� �����."
 
-msgid "probabilities cannot be negative nor all 0"
-msgstr "����������� �� ����� ���� �� ��������������, �� ��� ������� ����"
+msgid "probabilities must be finite, non-negative and not all 0"
+msgstr "����������� ������ ���� ���������, ���������������� � ���� �� ��������� ����������"
 
 msgid "'x' must be non-negative"
 msgstr "'x' ������ ���� ���������������"
@@ -813,9 +788,7 @@ msgid "%s link not recognised"
 msgstr "%s ������ �� ����������"
 
 msgid "link \"%s\" not available for poisson family; available links are %s"
-msgstr ""
-"������� ����� \"%s\" ���������� ��� �������������� ���������; �������� "
-"������� %s"
+msgstr "������� ����� \"%s\" ���������� ��� �������������� ���������; �������� ������� %s"
 
 msgid "negative values not allowed for the 'Poisson' family"
 msgstr "������������� �������� � ������������� ��������� �� ���������"
@@ -823,27 +796,20 @@ msgstr "
 msgid "ignoring prior weights"
 msgstr "��������� ��������� ����"
 
-msgid ""
-"link \"%s\" not available for quasipoisson family; available links are %s"
-msgstr ""
-"������� ����� \"%s\" ���������� ��� �����-�������������� ���������; �������� "
-"������� %s"
+msgid "link \"%s\" not available for quasipoisson family; available links are %s"
+msgstr "������� ����� \"%s\" ���������� ��� �����-�������������� ���������; �������� ������� %s"
 
 msgid "negative values not allowed for the 'quasiPoisson' family"
 msgstr "������������� �������� ��� �����-�������������� ��������� �� ���������"
 
 msgid "link \"%s\" not available for gaussian family; available links are %s"
-msgstr ""
-"������� ����� \"%s\" ���������� ��� ���������� ���������; �������� ������� %s"
+msgstr "������� ����� \"%s\" ���������� ��� ���������� ���������; �������� ������� %s"
 
 msgid "cannot find valid starting values: please specify some"
-msgstr ""
-"�� ���� ����� ���������� ��������� ��������: ����������, ������� �����-������"
+msgstr "�� ���� ����� ���������� ��������� ��������: ����������, ������� �����-������"
 
 msgid "link \"%s\" not available for binomial family; available links are %s"
-msgstr ""
-"������� ����� \"%s\" ���������� ��� ������������� ���������; �������� "
-"������� %s"
+msgstr "������� ����� \"%s\" ���������� ��� ������������� ���������; �������� ������� %s"
 
 msgid "y values must be 0 <= y <= 1"
 msgstr "�������� y ������ ���� 0 <= y <= 1"
@@ -859,29 +825,23 @@ msgid ""
 "or a 2 column matrix where col 1 is no. successes and col 2 is no. failures"
 msgstr ""
 "��� ��������� 'binomial', y ������ ���� �������� �� ����� � ������\n"
-"��� ������������ ��������, ��� ������� 1 -- ��� ���������� �������, � "
-"������� 2 -- ���������� ������"
+"��� ������������ ��������, ��� ������� 1 -- ��� ���������� �������, � ������� 2 -- ���������� ������"
 
 msgid "cannot simulate from non-integer prior.weights"
 msgstr "�� ���� ��������������� ������� �� ���������� prior.weights"
 
-msgid ""
-"link \"%s\" not available for quasibinomial family; available links are %s"
-msgstr ""
-"������ \"%s\" �� �������� ��� �����-������������� ���������; �������� ������ "
-"%s"
+msgid "link \"%s\" not available for quasibinomial family; available links are %s"
+msgstr "������ \"%s\" �� �������� ��� �����-������������� ���������; �������� ������ %s"
 
 msgid ""
 "for the 'quasibinomial' family, y must be a vector of 0 and 1's\n"
 "or a 2 column matrix where col 1 is no. successes and col 2 is no. failures"
 msgstr ""
 "��� ��������� 'quasibinomial', y ������ ���� �������� �� ����� � ������\n"
-"��� ������������ ��������, ��� ������� 1 -- ��� ���������� �������, � "
-"������� 2 -- ���������� ������"
+"��� ������������ ��������, ��� ������� 1 -- ��� ���������� �������, � ������� 2 -- ���������� ������"
 
 msgid "link \"%s\" not available for gamma family; available links are %s"
-msgstr ""
-"������� ����� \"%s\" ���������� ��� �����-���������; �������� ������� %s"
+msgstr "������� ����� \"%s\" ���������� ��� �����-���������; �������� ������� %s"
 
 msgid "non-positive values not allowed for the 'gamma' family"
 msgstr "��������������� �������� �� ��������� ��� �����-���������"
@@ -889,15 +849,11 @@ msgstr "
 msgid "using weights as shape parameters"
 msgstr "��������� ���� � �������� ���������� �����"
 
-msgid ""
-"link \"%s\" not available for inverse.gaussian family; available links are %s"
-msgstr ""
-"������� ����� \"%s\" ���������� ��� �������-���������� ���������; �������� "
-"������� %s"
+msgid "link \"%s\" not available for inverse.gaussian family; available links are %s"
+msgstr "������� ����� \"%s\" ���������� ��� �������-���������� ���������; �������� ������� %s"
 
 msgid "positive values only are allowed for the 'inverse.gaussian' family"
-msgstr ""
-"������ ������������� �������� ��������� ��� �������-���������� ���������"
+msgstr "������ ������������� �������� ��������� ��� �������-���������� ���������"
 
 msgid "need CRAN package 'SuppDists' for the 'inverse.gaussian' family"
 msgstr "��� ��������� 'inverse.gaussian' ��������� ����� 'SuppDists' �� CRAN"
@@ -905,12 +861,8 @@ msgstr "
 msgid "using weights as inverse variances"
 msgstr "��������� ���� � �������� �������� � ����������"
 
-msgid ""
-"'variance' \"%s\" is invalid: possible values are \"mu(1-mu)\", \"mu\", "
-"\"mu^2\", \"mu^3\" and \"constant\""
-msgstr ""
-"'variance' \"%s\" ������������: ��������� ��������: \"mu(1-mu)\", \"mu\", "
-"\"mu^2\", \"mu^3\" � \"constant\""
+msgid "'variance' \"%s\" is invalid: possible values are \"mu(1-mu)\", \"mu\", \"mu^2\", \"mu^3\" and \"constant\""
+msgstr "'variance' \"%s\" ������������: ��������� ��������: \"mu(1-mu)\", \"mu\", \"mu^2\", \"mu^3\" � \"constant\""
 
 msgid "length mismatch in convolution"
 msgstr "�������������� ����� � �������"
@@ -930,21 +882,14 @@ msgstr "'circular' 
 msgid "length of 'init' must equal length of 'filter'"
 msgstr "����� 'init' ������ ��������� ����� 'filter'"
 
-msgid "'init' must have 1 column"
-msgstr "'init' ������ ����� ���� �������"
-
-msgid "'init' must have 1 or %d columns"
-msgstr "'init' ������ ����� 1 ��� %d �������"
-
 msgid "'x' must have at least 2 rows and columns"
 msgstr "'x' ������ ����� �� ������� ���� 2 ������ � �������"
 
 msgid "'x' has entries too large to be integer"
 msgstr "� 'x' ���� ��������, ������� ������� ����� ���� ������"
 
-#, fuzzy
 msgid "'x' has been rounded to integer: %s"
-msgstr "'x' ��� �������� �� ������: %d"
+msgstr "'x' ��� �������� �� ������: %s"
 
 msgid "if 'x' is not a matrix, 'y' must be given"
 msgstr "���� 'x' -- �� �������, �� ����� ������ 'y'"
@@ -1045,10 +990,8 @@ msgstr "
 msgid "number of offsets is %d should equal %d (number of observations)"
 msgstr "���������� �������� %d, � ������ ���� %d (���������� ����������)"
 
-msgid ""
-"fitting to calculate the null deviance did not converge -- increase 'maxit'?"
-msgstr ""
-"�������� ���������� �������� ���������� �� ������� -- ���� ��������� 'maxit'?"
+msgid "fitting to calculate the null deviance did not converge -- increase 'maxit'?"
+msgstr "�������� ���������� �������� ���������� �� ������� -- ���� ��������� 'maxit'?"
 
 msgid "value of 'epsilon' must be > 0"
 msgstr "�������� 'epsilon' ������ ���� > 0"
@@ -1065,8 +1008,7 @@ msgstr "
 msgid "invalid fitted means in empty model"
 msgstr "������������ ����������� ������� � ������ ������"
 
-msgid ""
-"length of 'start' should equal %d and correspond to initial coefs for %s"
+msgid "length of 'start' should equal %d and correspond to initial coefs for %s"
 msgstr "����� 'start' ������ = %d � ��������������� ��������� ������������� %s"
 
 msgid "NAs in V(mu)"
@@ -1084,11 +1026,8 @@ msgstr "
 msgid "non-finite coefficients at iteration %d"
 msgstr "��-�������� ������������ � �������� %d"
 
-msgid ""
-"no valid set of coefficients has been found: please supply starting values"
-msgstr ""
-"�� ������ ���������� ����� �������������: ����������, ������� ��������� "
-"��������"
+msgid "no valid set of coefficients has been found: please supply starting values"
+msgstr "�� ������ ���������� ����� �������������: ����������, ������� ��������� ��������"
 
 msgid "step size truncated due to divergence"
 msgstr "������ ���� �������� � ����� � �������������"
@@ -1135,9 +1074,8 @@ msgstr "
 msgid "observations with zero weight not used for calculating dispersion"
 msgstr "���������� � ������� ����� �� �������������� ��� ���������� ���������"
 
-msgid ""
-"The \"ward\" method has been renamed to \"ward.D\"; note new \"ward.D2\""
-msgstr ""
+msgid "The \"ward\" method has been renamed to \"ward.D\"; note new \"ward.D2\""
+msgstr "����� \"ward\" ������������ � \"ward.D\"; �������� �������� �� ����� \"ward.D2\""
 
 msgid "invalid clustering method"
 msgstr "������������ ����� �������������"
@@ -1157,12 +1095,6 @@ msgstr "
 msgid "invalid length of members"
 msgstr "������������ ����� ������"
 
-msgid "invalid dendrogram"
-msgstr "������������ ������������"
-
-msgid "'merge' component in dendrogram must be integer"
-msgstr "��������� ������������ 'merge' ������ ���� �����"
-
 msgid "argument 'x' cannot be coerced to class %s"
 msgstr "�������� 'x' �� ����� ���� ������������� � ����� %s"
 
@@ -1239,7 +1171,7 @@ msgid "number of cluster centres must lie between 1 and nrow(x)"
 msgstr "���������� ������� ��������� ������ ���� � �������� ����� 1 � nrow(x)"
 
 msgid "Quick-TRANSfer stage steps exceeded maximum (= %d)"
-msgstr ""
+msgstr "����� �������� ������ Quick-TRANSfer ��������� �������� (= %d)"
 
 msgid "invalid nrow(x)"
 msgstr "������������ nrow(x)"
@@ -1268,6 +1200,12 @@ msgstr "'iter.max' 
 msgid "must have same number of columns in 'x' and 'centers'"
 msgstr "� 'x' � 'centers' ����� ���� ���������� �������"
 
+msgid "'x' is a list, so ignoring argument 'g'"
+msgstr "'x' -- ��� ������, ������� ��������� �������� 'g'"
+
+msgid "some elements of 'x' are not numeric and will be coerced to numeric"
+msgstr "��������� �������� 'x' ���������� � ����� ������������� � �����"
+
 msgid "not enough 'x' data"
 msgstr "������������ ������ 'x'"
 
@@ -1278,9 +1216,7 @@ msgid "p-value will be approximate in the presence of ties"
 msgstr "p-value ����� ��������� � ����������� ������������� ��������"
 
 msgid "'y' must be numeric or a function or a string naming a valid function"
-msgstr ""
-"'y' ������ ���� �������� ��� �������� ��� ������� ��������� ���������� "
-"�������"
+msgstr "'y' ������ ���� �������� ��� �������� ��� ������� ��������� ���������� �������"
 
 msgid "ties should not be present for the Kolmogorov-Smirnov test"
 msgstr "� ����� �����������-�������� �� ������ ���� ������������� ��������"
@@ -1323,12 +1259,10 @@ msgid "calling summary.lm(<fake-lm-object>) ..."
 msgstr "������� summary.lm(<fake-lm-object>) ..."
 
 msgid "residual degrees of freedom in object suggest this is not an \"lm\" fit"
-msgstr ""
-"���������� ������� ������� � ������� ���������, ��� ��� �� �������� \"lm\""
+msgstr "���������� ������� ������� � ������� ���������, ��� ��� �� �������� \"lm\""
 
-#, fuzzy
 msgid "essentially perfect fit: summary may be unreliable"
-msgstr "���������� F-�������� ��� � ����� ������� �������� ������������"
+msgstr "������� ������� ��������: summary ����� ���� �������������"
 
 msgid ""
 "lm object does not have a proper 'qr' component.\n"
@@ -1353,20 +1287,13 @@ msgid "prediction from a rank-deficient fit may be misleading"
 msgstr "������������ �� ����������� �������� ����� ���� ������������"
 
 msgid "predictions on current data refer to _future_ responses"
-msgstr ""
-"������������ �� ������ ������� ������ ��������� �� _�������_ �����������"
+msgstr "������������ �� ������ ������� ������ ��������� �� _�������_ �����������"
 
-msgid ""
-"assuming prediction variance inversely proportional to weights used for "
-"fitting"
-msgstr ""
-"����������� ��������� ��� ������������ ������� ���������������� �����, "
-"�������������� ��� ��������"
+msgid "assuming prediction variance inversely proportional to weights used for fitting"
+msgstr "����������� ��������� ��� ������������ ������� ���������������� �����, �������������� ��� ��������"
 
 msgid "Assuming constant prediction variance even though model fit is weighted"
-msgstr ""
-"����������� ���������� ��������� ��� ������������, ���� �������� ������ "
-"��������"
+msgstr "����������� ���������� ��������� ��� ������������, ���� �������� ������ ��������"
 
 msgid "'weights' as formula should be one-sided"
 msgstr "'weights' ��� ������� ������ ���� ��������������"
@@ -1381,8 +1308,7 @@ msgid "invalid model QR matrix"
 msgstr "������������ ��������� ������� QR"
 
 msgid "non-NA residual length does not match cases used in fitting"
-msgstr ""
-"��-NA ���������� ����� �� ������������� �������, �������������� � ��������"
+msgstr "��-NA ���������� ����� �� ������������� �������, �������������� � ��������"
 
 msgid "too few cases, n < k"
 msgstr "������� ���� �������, n < k"
@@ -1408,16 +1334,11 @@ msgstr "
 msgid "invalid 'y'"
 msgstr "������������ y"
 
-msgid ""
-"specified the square of a factor predictor to be dropped when degree = 1"
+msgid "specified the square of a factor predictor to be dropped when degree = 1"
 msgstr "��������� ������� �������-���������� ����� �������, ���� ������� = 1"
 
-msgid ""
-"specified the square of a predictor to be dropped with only one numeric "
-"predictor"
-msgstr ""
-"��������� ������� ���������� ����� ������� � ������ ������ ��������� "
-"����������"
+msgid "specified the square of a predictor to be dropped with only one numeric predictor"
+msgstr "��������� ������� ���������� ����� ������� � ������ ������ ��������� ����������"
 
 msgid "specified parametric for all predictors"
 msgstr "������ ��������������� ��� ���� �����������"
@@ -1450,7 +1371,7 @@ msgid "no 'nobs' method is available"
 msgstr "��� ���������� ������ 'nobs'"
 
 msgid "'margin' must contain names or numbers corresponding to 'table'"
-msgstr ""
+msgstr "'margin' ������ ��������� ����� ��� ������, ��������������� 'table'"
 
 msgid "'start' and 'table' must be same length"
 msgstr "'start' � 'table' ������ ���� ����� �����"
@@ -1465,9 +1386,7 @@ msgid "missing observations deleted"
 msgstr "����������� �������� �������"
 
 msgid "observations with 0 weight not used in calculating standard deviation"
-msgstr ""
-"���������� � ������� ����� �� ������������ ��� ���������� ������������ "
-"����������"
+msgstr "���������� � ������� ����� �� ������������ ��� ���������� ������������ ����������"
 
 msgid "observations with 0 weights not used"
 msgstr "���������� � ������� ����� �� ������������"
@@ -1533,8 +1452,7 @@ msgid "this fit does not inherit from \"lm\""
 msgstr "��� �������� �� ������������ �� \"lm\""
 
 msgid "'cterms' argument must match terms in model object"
-msgstr ""
-"�������� 'cterms' ������ ��������������� ���������� � ��������� �������"
+msgstr "�������� 'cterms' ������ ��������������� ���������� � ��������� �������"
 
 msgid "Design is unbalanced - use se.contrast() for se's"
 msgstr "������ �� ������������� -- ����������� se.contrast() ��� 'se'"
@@ -1598,9 +1516,7 @@ msgid "variable '%s' is absent, its contrast will be ignored"
 msgstr "���������� '%s' �����������, �� �������� ����� ��������������"
 
 msgid "using type = \"numeric\" with a factor response will be ignored"
-msgstr ""
-"������������� type = \"numeric\" � ��������� ����������-�������� ����� "
-"���������"
+msgstr "������������� type = \"numeric\" � ��������� ����������-�������� ����� ���������"
 
 msgid "invalid response type"
 msgstr "������������ ��� �������"
@@ -1632,24 +1548,20 @@ msgstr "f.lower = f(lower) -- 
 msgid "f.upper = f(upper) is NA"
 msgstr "f.upper = f(upper) -- ��� NA"
 
-#, fuzzy
 msgid "invalid 'extendInt'; please report"
-msgstr "������������ �������� 'method'"
+msgstr "������������ 'extendInt'; ����������, ��������"
 
-#, fuzzy
 msgid "no sign change found in %d iterations"
-msgstr "�� ������� �� %d ��������"
+msgstr "��������� ����� �� ������� �� %d ��������"
 
-msgid ""
-"did not succeed extending the interval endpoints for f(lower) * f(upper) <= 0"
-msgstr ""
+msgid "did not succeed extending the interval endpoints for f(lower) * f(upper) <= 0"
+msgstr "�� ������� ��������� �������� ����� ���������� ��� f(lower) * f(upper) <= 0"
 
 msgid "f() values at end points not of opposite sign"
 msgstr "f() �������� �� �������� ������ �� ���������������� �����"
 
-#, fuzzy
 msgid "convergence problem in zero finding:"
-msgstr "��������, �������� ����������: 'optim' ����� ���= %d"
+msgstr "�������� ���������� � ����:"
 
 msgid "'control' argument must be a named list"
 msgstr "�������� 'control' ������ ���� ����������� �������"
@@ -1706,8 +1618,7 @@ msgid "upper and lower bounds ignored unless algorithm = \"port\""
 msgstr "������� � ������ ������� ������������, ���� �� algorithm = \"port\""
 
 msgid "cannot calculate REML log-likelihood for \"nls\" objects"
-msgstr ""
-"�� ���� ��������� REML �������� ������� ������������� ��� �������� \"nls\""
+msgstr "�� ���� ��������� REML �������� ������� ������������� ��� �������� \"nls\""
 
 msgid "anova is only defined for sequences of \"nls\" objects"
 msgstr "anova ���������� ������ ��� ������������������� \"nls\"-��������"
@@ -1739,10 +1650,8 @@ msgstr "
 msgid "'trace != 0' needs 'REPORT >= 1'"
 msgstr "'trace != 0' ��������� � 'REPORT >= 1'"
 
-msgid ""
-"method L-BFGS-B uses 'factr' (and 'pgtol') instead of 'reltol' and 'abstol'"
-msgstr ""
-"����� L-BFGS-B ���������� 'factr' (� 'pgtol') ������ 'reltol' � 'abstol'"
+msgid "method L-BFGS-B uses 'factr' (and 'pgtol') instead of 'reltol' and 'abstol'"
+msgstr "����� L-BFGS-B ���������� 'factr' (� 'pgtol') ������ 'reltol' � 'abstol'"
 
 msgid ""
 "one-dimensional optimization by Nelder-Mead is unreliable:\n"
@@ -1810,24 +1719,17 @@ msgstr "
 msgid "'r' must be a single positive number"
 msgstr "'r' ������ ���� ����� ������������� ������."
 
-msgid ""
-"exactly one of 'n', 'delta', 'sd', 'power', and 'sig.level' must be NULL"
-msgstr ""
-"� �������� ���� �� 'n', 'delta', 'sd', 'power', 'sig.level' ������ ���� NULL"
+msgid "exactly one of 'n', 'delta', 'sd', 'power', and 'sig.level' must be NULL"
+msgstr "� �������� ���� �� 'n', 'delta', 'sd', 'power', 'sig.level' ������ ���� NULL"
 
 msgid "'sig.level' must be numeric in [0, 1]"
 msgstr "'sig.level' ������ ���� ������ � [0, 1]"
 
 msgid "exactly one of 'n', 'p1', 'p2', 'power', and 'sig.level' must be NULL"
-msgstr ""
-"� �������� ���� �� of 'n', 'p1', 'p2', 'power', 'sig.level' ������ ���� NULL"
+msgstr "� �������� ���� �� of 'n', 'p1', 'p2', 'power', 'sig.level' ������ ���� NULL"
 
-msgid ""
-"exactly one of 'groups', 'n', 'between.var', 'within.var', 'power', and 'sig."
-"level' must be NULL"
-msgstr ""
-"� �������� ���� �� 'groups', 'n', 'between.var', 'within.var', 'power', 'sig."
-"level' ������ ���� NULL"
+msgid "exactly one of 'groups', 'n', 'between.var', 'within.var', 'power', and 'sig.level' must be NULL"
+msgstr "� �������� ���� �� 'groups', 'n', 'between.var', 'within.var', 'power', 'sig.level' ������ ���� NULL"
 
 msgid "number of groups must be at least 2"
 msgstr "���������� ����� ������ ���� �� ������� ���� 2"
@@ -1848,8 +1750,7 @@ msgid "wrong number of columns in 'x'"
 msgstr "������������ ���������� ������� � 'x'"
 
 msgid "cannot rescale a constant/zero column to unit variance"
-msgstr ""
-"�� ���� ���������������� ����������/������� ������� � ��������� ����������"
+msgstr "�� ���� ���������������� ����������/������� ������� � ��������� ����������"
 
 msgid "PCA applies only to numerical variables"
 msgstr "������ ������� ��������� �������� ������ � �������� ����������"
@@ -1860,12 +1761,8 @@ msgstr "
 msgid "'newdata' must be a matrix or data frame"
 msgstr "'newdata' ������ ���� �������� ��� �������� ������"
 
-msgid ""
-"'newdata' does not have named columns matching one or more of the original "
-"columns"
-msgstr ""
-"� 'newdata' ��� ����������� �������, ��������������� ����� ��� ����� "
-"�������� ��������"
+msgid "'newdata' does not have named columns matching one or more of the original columns"
+msgstr "� 'newdata' ��� ����������� �������, ��������������� ����� ��� ����� �������� ��������"
 
 msgid "'newdata' does not have the correct number of columns"
 msgstr "'newdata' �� ����� ����������� ���������� �������"
@@ -1874,9 +1771,7 @@ msgid "both 'x' and 'covmat' were supplied: 'x' will be ignored"
 msgstr "������� � 'x', � 'covmat': 'x' ����� ���������"
 
 msgid "'princomp' can only be used with more units than variables"
-msgstr ""
-"'princomp' ����� ���� ������������ ������ ���� ���������� ������ ��� "
-"����������"
+msgstr "'princomp' ����� ���� ������������ ������ ���� ���������� ������ ��� ����������"
 
 msgid "cannot use 'cor = TRUE' with a constant variable"
 msgstr "�� ���� ������������ 'cor=TRUE' � ���������� ����������"
@@ -1977,11 +1872,8 @@ msgstr "'varying' 
 msgid "length of 'v.names' does not evenly divide length of 'varying'"
 msgstr "����� 'v.names' �� ������� ��� ������� ������ 'varying'"
 
-msgid ""
-"length of 'varying' must be the product of length of 'v.names' and length of "
-"'times'"
-msgstr ""
-"����� 'varying' ������ ���� ������������� ����� 'v.names' � ����� 'times'"
+msgid "length of 'varying' must be the product of length of 'v.names' and length of 'times'"
+msgstr "����� 'varying' ������ ���� ������������� ����� 'v.names' � ����� 'times'"
 
 msgid "invalid value of 'k'"
 msgstr "������������ �������� 'k'"
@@ -2019,6 +1911,9 @@ msgstr "
 msgid "invalid 'endrule' argument"
 msgstr "������������ �������� 'endrule'"
 
+msgid ".nknots.smspl() is now exported; use it instead of n.knots()"
+msgstr ".nknots.smspl() �� �������������; ������ ����� ����������� n.knots()"
+
 msgid "invalid 'control.spar'"
 msgstr "������������ 'control.spar'"
 
@@ -2059,8 +1954,7 @@ msgid "'nknots' must be at least 1"
 msgstr "'nknots' ������ ���� �� ������� ���� 1"
 
 msgid "cannot use more inner knots than unique 'x' values"
-msgstr ""
-"�� ���� ������������ ���������� ����� ������, ��� ���������� �������� 'x'"
+msgstr "�� ���� ������������ ���������� ����� ������, ��� ���������� �������� 'x'"
 
 msgid "'spar' must be of length 1"
 msgstr "'ref' ������ ���� ��������� �����"
@@ -2120,8 +2014,7 @@ msgid "coverage probability out of range [0,1)"
 msgstr "����������� ����������� ��� [0,1)"
 
 msgid "spline: first and last y values differ - using y[1] for both"
-msgstr ""
-"spline: ������ � ��������� �������� y �������� -- ��������� y[1] ��� �����"
+msgstr "spline: ������ � ��������� �������� y �������� -- ��������� y[1] ��� �����"
 
 msgid "'y' must be increasing or decreasing"
 msgstr "'y' ������ ������ ������������� ��� �����������"
@@ -2130,8 +2023,7 @@ msgid "'spline' requires n >= 1"
 msgstr "'spline' ������� n >= 1"
 
 msgid "spline: first and last y values differ - using y[1L] for both"
-msgstr ""
-"spline: ������ � ��������� �������� y �������� -- ��������� y[1L] ��� �����"
+msgstr "spline: ������ � ��������� �������� y �������� -- ��������� y[1L] ��� �����"
 
 msgid "'deriv' must be between 0 and 3"
 msgstr "'deriv' ������ ���� ����� 0 � 3"
@@ -2157,8 +2049,8 @@ msgstr "
 msgid "'plot.stepfun' called with wrong type of argument 'x'"
 msgstr "'plot.stepfun' ������ � ������������ ����� ��������� 'x'"
 
-msgid "must be 0 or 1"
-msgstr "������ ���� 0 ��� 1"
+msgid "%s must be 0 or 1"
+msgstr "%s ������ ���� 0 ��� 1"
 
 msgid "only univariate series are allowed"
 msgstr "������ ���������� ����� ���������"
@@ -2182,12 +2074,10 @@ msgid "'x' must be between %s and %s"
 msgstr "'x' ������ ���� ����� %s � %s"
 
 msgid "number of 'cutpoints' must be one less than number of symbols"
-msgstr ""
-"���������� 'cutpoints' ������ ���� �� ���� ������, ��� ���������� ��������"
+msgstr "���������� 'cutpoints' ������ ���� �� ���� ������, ��� ���������� ��������"
 
 msgid "number of 'cutpoints' must be one more than number of symbols"
-msgstr ""
-"���������� 'cutpoints' ������ ���� �� ���� ������, ��� ���������� ��������"
+msgstr "���������� 'cutpoints' ������ ���� �� ���� ������, ��� ���������� ��������"
 
 msgid "must have 2 'symbols' for logical 'x' argument"
 msgstr "���� 2 'symbols' ��� ����������� ��������� 'x'"
@@ -2282,12 +2172,8 @@ msgstr "
 msgid "too many replacement values supplied"
 msgstr "������� ������� ����� ���������� ��������"
 
-msgid ""
-"number of values supplied is not a sub-multiple of the number of values to "
-"be replaced"
-msgstr ""
-"��������� ���������� �������� �� �������� ���������� ���������� ��������, "
-"������� ���� ��������"
+msgid "number of values supplied is not a sub-multiple of the number of values to be replaced"
+msgstr "��������� ���������� �������� �� �������� ���������� ���������� ��������, ������� ���� ��������"
 
 msgid "only replacement of elements is allowed"
 msgstr "��������� ������ ������ ���������"
@@ -2353,9 +2239,7 @@ msgid "%s applies only to two-way tables"
 msgstr "%s �������� ������ � ������������ ��������"
 
 msgid "too few distinct input values to fit an asymptotic regression model"
-msgstr ""
-"������� ���� ������������� ������� �������� ��� �������� ��������������� "
-"������ ���������"
+msgstr "������� ���� ������������� ������� �������� ��� �������� ��������������� ������ ���������"
 
 msgid "cannot fit an asymptotic regression model to these data"
 msgstr "�� ���� ��������� ��������������� ������ ��������� ��� ���� ������"
@@ -2364,17 +2248,13 @@ msgid "too few observations to fit an asymptotic regression model"
 msgstr "������� ���� ���������� ��� �������� ��������������� ������ ���������"
 
 msgid "too few distinct input values to fit the 'asympOff' model"
-msgstr ""
-"������� ���� ������������� ������� �������� ��� �������� ������ 'asympOff'"
+msgstr "������� ���� ������������� ������� �������� ��� �������� ������ 'asympOff'"
 
 msgid "too few distinct input values to fit the 'asympOrig' model"
-msgstr ""
-"������� ���� ������������� ������� �������� ��� �������� ������ 'asympOrig'"
+msgstr "������� ���� ������������� ������� �������� ��� �������� ������ 'asympOrig'"
 
 msgid "too few distinct input values to fit a biexponential"
-msgstr ""
-"������� ���� ������������� ������� �������� ��� �������� ������ "
-"'biexponential'"
+msgstr "������� ���� ������������� ������� �������� ��� �������� ������ 'biexponential'"
 
 msgid "must have length of response = length of second argument to 'SSfol'"
 msgstr "����, ����� ����� ������� = ����� ������� ��������� 'SSfol'"
@@ -2383,32 +2263,22 @@ msgid "must have at least 4 observations to fit an 'SSfol' model"
 msgstr "����� ��� ������� 4 ����������, ����� ��������� ������ 'SSfol'"
 
 msgid "too few distinct input values to fit a four-parameter logistic"
-msgstr ""
-"������� ���� ������������� ������� �������� ��� �������� ������������� "
-"������ � 4 �����������"
+msgstr "������� ���� ������������� ������� �������� ��� �������� ������������� ������ � 4 �����������"
 
 msgid "too few distinct input values to fit a logistic model"
-msgstr ""
-"������� ���� ������������� ������� �������� ��� �������� ������������� ������"
+msgstr "������� ���� ������������� ������� �������� ��� �������� ������������� ������"
 
 msgid "too few distinct input values to fit a Michaelis-Menten model"
-msgstr ""
-"������� ���� ������������� ������� �������� ��� �������� ������ Michaelis-"
-"Menten"
+msgstr "������� ���� ������������� ������� �������� ��� �������� ������ Michaelis-Menten"
 
 msgid "too few distinct input values to fit the Gompertz model"
-msgstr ""
-"������� ���� ������������� ������� �������� ��� �������� ������ Gompertz"
+msgstr "������� ���� ������������� ������� �������� ��� �������� ������ Gompertz"
 
 msgid "too few distinct input values to fit the Weibull growth model"
-msgstr ""
-"������� ���� ������������� ������� �������� ��� �������� ������ 'Weibull "
-"growth'"
+msgstr "������� ���� ������������� ������� �������� ��� �������� ������ 'Weibull growth'"
 
 msgid "all 'x' values must be non-negative to fit the Weibull growth model"
-msgstr ""
-"��� �������� 'x' ������ ���� ����������������, ����� ��������� ������ "
-"'Weibull growth'"
+msgstr "��� �������� 'x' ������ ���� ����������������, ����� ��������� ������ 'Weibull growth'"
 
 msgid "using the %d/%d row from a combined fit"
 msgid_plural "using the %d/%d rows from a combined fit"
@@ -2446,12 +2316,6 @@ msgstr[0] "
 msgstr[1] "�������������� ��������� %s �� ������ \"%s\"s"
 msgstr[2] "�������������� ��������� %s �� ������ \"%s\"s"
 
-msgid "extra argument %s will be disregarded"
-msgid_plural "extra arguments %s will be disregarded"
-msgstr[0] "�������������� �������� %s ����� ��������"
-msgstr[1] "�������������� ��������� %s ����� ���������"
-msgstr[2] "�������������� ��������� %s ����� ���������"
-
 msgid "%d factor is too many for %d variables"
 msgid_plural "%d factors are too many for %d variables"
 msgstr[0] "%d ������ -- ��� ������� ����� ��� %d ����������"
@@ -2470,6 +2334,12 @@ msgstr[0] "
 msgstr[1] "�� ���� ��������������, ������� � ���� ��������� ��������"
 msgstr[2] "�� ���� ��������������, ������� � ���� ��������� ��������"
 
+msgid "'init' must have %d column"
+msgid_plural "'init' must have 1 or %d columns"
+msgstr[0] "'init' ������ ����� %d �������"
+msgstr[1] "'init' ������ ����� 1 ��� %d �������"
+msgstr[2] "'init' ������ ����� ���� ��� %d �������"
+
 msgid "X matrix has rank %d, but only %d observation"
 msgid_plural "X matrix has rank %d, but only %d observations"
 msgstr[0] "������� X ����� ���� %d, �� ������ %d ����������"
@@ -2578,205 +2448,162 @@ msgstr[0] "'start.innov' 
 msgstr[1] "'start.innov' ������� ��������: ����� %d �����"
 msgstr[2] "'start.innov' ������� ��������: ����� %d �����"
 
+#~ msgid "non-matched further arguments are disregarded"
+#~ msgstr "���������� ����������������� ��������� ���������������"
+#~ msgid "extra argument %s will be disregarded"
+#~ msgid_plural "extra arguments %s will be disregarded"
+#~ msgstr[0] "�������������� �������� %s ����� ��������"
+#~ msgstr[1] "�������������� ��������� %s ����� ���������"
+#~ msgstr[2] "�������������� ��������� %s ����� ���������"
+#~ msgid "'merge' and 'height' do not fit!"
+#~ msgstr "'merge' � 'height' �� �������������!"
+#~ msgid "invalid dendrogram"
+#~ msgstr "������������ ������������"
+#~ msgid "'merge' component in dendrogram must be integer"
+#~ msgstr "��������� ������������ 'merge' ������ ���� �����"
+#~ msgid "probabilities cannot be negative nor all 0"
+#~ msgstr "����������� �� ����� ���� �� ��������������, �� ��� ������� ����"
+#~ msgid "'init' must have 1 or %d columns"
+#~ msgstr "'init' ������ ����� 1 ��� %d �������"
 #~ msgid "'deriv' must be between 0 and 2"
 #~ msgstr "'deriv' ������ ���� ����� 0 � 2"
-
 #~ msgid "%d response"
 #~ msgid_plural "%d responses"
 #~ msgstr[0] "%d ������"
 #~ msgstr[1] "%d �������"
 #~ msgstr[2] "%d ��������"
-
 #~ msgid "character variable '%s' changed to a factor"
 #~ msgstr "��������� ���������� '%s' �������������� � ������"
-
 #~ msgid "variable '%s' converted to a factor"
 #~ msgstr "���������� '%s' �������������� � ������"
-
 #~ msgid "Burg's algorithm only implemented for univariate series"
 #~ msgstr "�������� ����� ���������� ������ ��� ���������� �����"
-
 #~ msgid "sample is too sparse to find TD"
 #~ msgstr "������� ������� �����, ����� ����� TD"
-
 #~ msgid "sample is too sparse to find alph2"
 #~ msgstr "������� ������� �����, ����� ����� alph2"
-
 #~ msgid "Cannot compute exact p-values with ties"
 #~ msgstr "���� ����������� ��������: �� ���� ��������� ������ p-��������"
-
 #~ msgid "we require a dendrogram"
 #~ msgstr "��� ����� ������������"
-
 #~ msgid "NA's are not allowed in groups or blocks"
 #~ msgstr "NA's �� ��������� � ������� ��� ������"
-
 #~ msgid "y, groups and blocks must have the same length"
 #~ msgstr "y, ������ � ����� ������ ����� ���� �����"
-
 #~ msgid "cannot compute exact p-values with ties"
 #~ msgstr ""
 #~ "�� ���� ���������� ������ p-values ��� ������� ������������� ��������"
-
 #~ msgid "family '"
 #~ msgstr "��������� '"
-
 #~ msgid "need multiple response"
 #~ msgstr "����� ������������� ������"
-
 #~ msgid "internal error"
 #~ msgstr "���������� ������"
-
 #~ msgid "'proj' is not implemented for \"mlm\" fits"
 #~ msgstr "'proj' ��� \"mlm\" �������� �� ����������"
-
 #~ msgid "upper scope does not include model term(s) %s"
 #~ msgstr "������� ������� �������� �� �������� ��������(�) ������ %s"
-
 #~ msgid "for the binomial family, y must be a vector of 0 and 1's"
 #~ msgstr "��� ������������� ��������� y ������ ���� �������� �� 0 � 1"
-
 #~ msgid "for the quasibinomial family, y must be a vector of 0 and 1's"
 #~ msgstr "��� �����-������������� ���������, y ������ ���� �������� �� 0 � 1"
-
 #~ msgid "using F test with a %s family is inappropriate"
 #~ msgstr "������������ ���� ������ � ���������� %s �����������"
-
 #~ msgid "did not converge in"
 #~ msgstr "�� ������� ��"
-
 #~ msgid "iterations"
 #~ msgstr "��������"
-
 #~ msgid "removed because response differs from"
 #~ msgstr "�������, ������ ��� ����������� ���������� ��"
-
 #~ msgid "model 1"
 #~ msgstr "������ 1"
-
 #~ msgid "residuals have rank"
 #~ msgstr "������� ����� ����"
-
 #~ msgid "<"
 #~ msgstr "<"
-
 #~ msgid "_NOT_ converged in"
 #~ msgstr "_��_ ������� �"
-
 #~ msgid "' ignored"
 #~ msgstr "' ��������"
-
 #~ msgid "fitting parameters"
 #~ msgstr "��������� ��� ��������"
-
 #~ msgid "use \"Brent\" or optimize() directly"
 #~ msgstr "����������� \"Brent\" ��� optimize() �����"
-
 #~ msgid "hat values (leverages) are all ="
 #~ msgstr "hat-�������� (����������) ��� ="
 
 #, fuzzy
 #~ msgid "invalid length(xout)"
 #~ msgstr "������������ ����� ������"
-
 #~ msgid "contr*(.., sparse=TRUE) needs package \"Matrix\" correctly installed"
 #~ msgstr ""
 #~ "contr*(.., sparse=TRUE) ������� ��������� �������������� ������ \"Matrix\""
-
 #~ msgid "this should not happen"
 #~ msgstr "��� �� ������ ���������"
-
 #~ msgid "algorithm did not converge"
 #~ msgstr "�������� �� ��������"
-
 #~ msgid "incorrect specification of 'table' or 'start'"
 #~ msgstr "������������ �������� 'table' ��� 'start'"
-
 #~ msgid "ifault=%d. This should not happen"
 #~ msgstr "ifault=%d. ��� �� ������ ���������"
-
 #~ msgid "insufficient observations"
 #~ msgstr "������������ ����������"
-
 #~ msgid "'vec' contains NAs"
 #~ msgstr "'vec' �������� NAs"
-
 #~ msgid "'vec' must be sorted non-decreasingly"
 #~ msgstr "'vec' ������ ���� ���������� �� �� ����������"
 
 #, fuzzy
 #~ msgid "invalid length(vec)"
 #~ msgstr "������������ ����� ������"
-
 #~ msgid "No starting values specified for some parameters."
 #~ msgstr "��� ��������� ���������� �� ������� ��������� ��������."
-
 #~ msgid "Initializing"
 #~ msgstr "�����������"
-
 #~ msgid "to '1.'."
 #~ msgstr "�� '1.'."
-
 #~ msgid "Consider specifying 'start' or using a selfStart model"
 #~ msgstr "������� 'start' ��� � ��������� ������ 'selfStart'"
-
 #~ msgid "wrong number of predictors"
 #~ msgstr "������������ ����� �����������"
 
 #, fuzzy
 #~ msgid "invalid value oflength(x)"
 #~ msgstr "������������ ����� �������������"
-
 #~ msgid "extra arguments"
 #~ msgstr "�������������� ���������"
-
 #~ msgid "are just disregarded."
 #~ msgstr "���������������."
-
 #~ msgid "cannot compute correct p-values with ties"
 #~ msgstr "����������� ��������: �� ���� ��������� ���������� p-values"
-
 #~ msgid "'FUN' must always return a scalar"
 #~ msgstr "'FUN' ������ ������ ���������� ������"
-
 #~ msgid "model order:"
 #~ msgstr "������� ������:"
-
 #~ msgid "singularities in the computation of the projection matrix"
 #~ msgstr "������������� ��� ���������� ������� ��������"
-
 #~ msgid "results are only valid up to model order"
 #~ msgstr "���������� ������������� ������ ��� ������� ������"
-
 #~ msgid "invalid 'method': %s"
 #~ msgstr "������������ 'method': %s"
-
 #~ msgid "invalid 'method'"
 #~ msgstr "������������ 'method'"
-
 #~ msgid "'newdata' does not contain the variables needed"
 #~ msgstr "'newdata' �� �������� ������ ����������"
-
 #~ msgid "diagonal has non-finite entries"
 #~ msgstr "��������� ����� ��-�������� ��������"
-
 #~ msgid "no 'time' or 'id' specified"
 #~ msgstr "�� ������ �� 'time', �� 'id'"
-
 #~ msgid "trying +"
 #~ msgstr "������ +"
-
 #~ msgid "trying -"
 #~ msgstr "������ -"
-
 #~ msgid "Start:  AIC="
 #~ msgstr "�����:  AIC="
-
 #~ msgid "Step:  AIC="
 #~ msgstr "�������:  AIC="
-
 #~ msgid "contrasts not defined for 0 degrees of freedom"
 #~ msgstr "��������� ��� 0 �������� ������� �� ����������"
-
 #~ msgid "Convergence failure:"
 #~ msgstr "������ ���������:"
+
diff --git a/src/library/stats/po/R-stats.pot b/src/library/stats/po/R-stats.pot
index 27418dd..9115ca6 100644
--- a/src/library/stats/po/R-stats.pot
+++ b/src/library/stats/po/R-stats.pot
@@ -1,8 +1,7 @@
 msgid ""
 msgstr ""
-"Project-Id-Version: R 3.1.0\n"
-"Report-Msgid-Bugs-To: bugs.r-project.org\n"
-"POT-Creation-Date: 2014-03-27 07:47\n"
+"Project-Id-Version: stats 3.4.0\n"
+"POT-Creation-Date: 2016-04-01 09:50\n"
 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
 "Last-Translator: FULL NAME <EMAIL at ADDRESS>\n"
 "Language-Team: LANGUAGE <LL at li.org>\n"
@@ -95,6 +94,9 @@ msgstr ""
 msgid "can use ci.type=\"ma\" only if first lag is 0"
 msgstr ""
 
+msgid "Page [%d,%d]: i =%s; j =%s"
+msgstr ""
+
 msgid "univariate time series only"
 msgstr ""
 
@@ -449,6 +451,12 @@ msgstr ""
 msgid "NA values not allowed in 'd'"
 msgstr ""
 
+msgid "eig=TRUE is disregarded when list.=FALSE"
+msgstr ""
+
+msgid "x.ret=TRUE is disregarded when list.=FALSE"
+msgstr ""
+
 msgid "distances must be result of 'dist' or a square matrix"
 msgstr ""
 
@@ -461,6 +469,9 @@ msgstr ""
 msgid "only %d of the first %d eigenvalues are > 0"
 msgstr ""
 
+msgid "package 'MASS' must be installed"
+msgstr ""
+
 msgid "initial value is not in the interior of the feasible region"
 msgstr ""
 
@@ -500,6 +511,9 @@ msgstr ""
 msgid "arguments must have the same length"
 msgstr ""
 
+msgid "wrong number of columns in new data:"
+msgstr ""
+
 msgid "contrasts apply only to factors"
 msgstr ""
 
@@ -593,7 +607,7 @@ msgstr ""
 msgid "elements of 'k' must be between 1 and %d"
 msgstr ""
 
-msgid "'merge' and 'height' do not fit!"
+msgid "dendrogram entries must be 1,2,..,%d (in any order), to be coercible to \"hclust\""
 msgstr ""
 
 msgid "dendrogram node with non-positive #{branches}"
@@ -647,9 +661,6 @@ msgstr ""
 msgid "'RowSideColors' must be a character vector of length nrow(x)"
 msgstr ""
 
-msgid "non-matched further arguments are disregarded"
-msgstr ""
-
 msgid "argument 'x' must be numeric"
 msgstr ""
 
@@ -722,7 +733,7 @@ msgstr ""
 msgid "x[] and prob[] must be equal length vectors."
 msgstr ""
 
-msgid "probabilities cannot be negative nor all 0"
+msgid "probabilities must be finite, non-negative and not all 0"
 msgstr ""
 
 msgid "'x' must be non-negative"
@@ -737,6 +748,9 @@ msgstr ""
 msgid "some terms will have NAs due to the limits of the method"
 msgstr ""
 
+msgid "multivariate case with missing coefficients is not yet implemented"
+msgstr ""
+
 msgid "'x' must have 1 or more non-missing values"
 msgstr ""
 
@@ -833,7 +847,7 @@ msgstr ""
 msgid "positive values only are allowed for the 'inverse.gaussian' family"
 msgstr ""
 
-msgid "need CRAN package 'SuppDists' for the 'inverse.gaussian' family"
+msgid "need CRAN package 'SuppDists' for simulation from the 'inverse.gaussian' family"
 msgstr ""
 
 msgid "using weights as inverse variances"
@@ -860,12 +874,6 @@ msgstr ""
 msgid "length of 'init' must equal length of 'filter'"
 msgstr ""
 
-msgid "'init' must have 1 column"
-msgstr ""
-
-msgid "'init' must have 1 or %d columns"
-msgstr ""
-
 msgid "'x' must have at least 2 rows and columns"
 msgstr ""
 
@@ -1079,12 +1087,6 @@ msgstr ""
 msgid "invalid length of members"
 msgstr ""
 
-msgid "invalid dendrogram"
-msgstr ""
-
-msgid "'merge' component in dendrogram must be integer"
-msgstr ""
-
 msgid "argument 'x' cannot be coerced to class %s"
 msgstr ""
 
@@ -1112,7 +1114,7 @@ msgstr ""
 msgid "invalid parameter values"
 msgstr ""
 
-msgid "a limit is missing"
+msgid "a limit is NA or NaN"
 msgstr ""
 
 msgid "missing values not allowed"
@@ -1190,6 +1192,12 @@ msgstr ""
 msgid "must have same number of columns in 'x' and 'centers'"
 msgstr ""
 
+msgid "'x' is a list, so ignoring argument 'g'"
+msgstr ""
+
+msgid "some elements of 'x' are not numeric and will be coerced to numeric"
+msgstr ""
+
 msgid "not enough 'x' data"
 msgstr ""
 
@@ -1307,6 +1315,9 @@ msgstr ""
 msgid "only 1-4 predictors are allowed"
 msgstr ""
 
+msgid "invalid NROW(X)"
+msgstr ""
+
 msgid "invalid 'y'"
 msgstr ""
 
@@ -1328,6 +1339,12 @@ msgstr ""
 msgid "invalid argument 'degree'"
 msgstr ""
 
+msgid "iterTrace ="
+msgstr ""
+
+msgid "not obeyed as iterations ="
+msgstr ""
+
 msgid "first argument must be a \"loess\" object"
 msgstr ""
 
@@ -1814,7 +1831,7 @@ msgstr ""
 msgid "'varying' arguments must be the same length"
 msgstr ""
 
-msgid "'times' is wrong length"
+msgid "'lengths(varying)' must all match 'length(times)'"
 msgstr ""
 
 msgid "there are records with missing times, which will be dropped."
@@ -1871,6 +1888,9 @@ msgstr ""
 msgid "invalid 'endrule' argument"
 msgstr ""
 
+msgid ".nknots.smspl() is now exported; use it instead of n.knots()"
+msgstr ""
+
 msgid "invalid 'control.spar'"
 msgstr ""
 
@@ -2006,7 +2026,7 @@ msgstr ""
 msgid "'plot.stepfun' called with wrong type of argument 'x'"
 msgstr ""
 
-msgid "must be 0 or 1"
+msgid "%s must be 0 or 1"
 msgstr ""
 
 msgid "only univariate series are allowed"
@@ -2267,11 +2287,6 @@ msgid_plural "extra arguments %s are not of class \"%s\"s"
 msgstr[0]    ""
 msgstr[1]    ""
 
-msgid        "extra argument %s will be disregarded"
-msgid_plural "extra arguments %s will be disregarded"
-msgstr[0]    ""
-msgstr[1]    ""
-
 msgid        "%d factor is too many for %d variables"
 msgid_plural "%d factors are too many for %d variables"
 msgstr[0]    ""
@@ -2287,6 +2302,11 @@ msgid_plural "unable to optimize from these starting values"
 msgstr[0]    ""
 msgstr[1]    ""
 
+msgid        "'init' must have %d column"
+msgid_plural "'init' must have 1 or %d columns"
+msgstr[0]    ""
+msgstr[1]    ""
+
 msgid        "X matrix has rank %d, but only %d observation"
 msgid_plural "X matrix has rank %d, but only %d observations"
 msgstr[0]    ""
diff --git a/src/library/stats/po/R-tr.po b/src/library/stats/po/R-tr.po
index c7f3020..e459d08 100644
--- a/src/library/stats/po/R-tr.po
+++ b/src/library/stats/po/R-tr.po
@@ -9,7 +9,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: R 2.13.0\n"
 "Report-Msgid-Bugs-To: bugs.r-project.org\n"
-"POT-Creation-Date: 2014-03-27 07:47\n"
+"POT-Creation-Date: 2016-04-01 09:50\n"
 "PO-Revision-Date: 2011-04-02 \n"
 "Last-Translator: Murat Alkan <muratalk at gmail.com>\n"
 "Language-Team: Turkish <muratalk at gmail.com>\n"
@@ -107,6 +107,9 @@ msgstr "x$lag en az 1 sütuna sahip olmalı"
 msgid "can use ci.type=\"ma\" only if first lag is 0"
 msgstr "sadece ilk gecikme 0 ise ci.type=\"ma\" kullanılabilir"
 
+msgid "Page [%d,%d]: i =%s; j =%s"
+msgstr ""
+
 msgid "univariate time series only"
 msgstr "sadece tek değişkenli zaman serileri"
 
@@ -471,6 +474,12 @@ msgstr "Ki-kare uygulanmış tahmin doğru olmayabilir"
 msgid "NA values not allowed in 'd'"
 msgstr "'d' içinde NA değerlerine izin verilmiyor"
 
+msgid "eig=TRUE is disregarded when list.=FALSE"
+msgstr ""
+
+msgid "x.ret=TRUE is disregarded when list.=FALSE"
+msgstr ""
+
 msgid "distances must be result of 'dist' or a square matrix"
 msgstr ""
 
@@ -484,6 +493,9 @@ msgstr "'k' {1, 2, ..  n - 1} içinde olmalı"
 msgid "only %d of the first %d eigenvalues are > 0"
 msgstr ""
 
+msgid "package 'MASS' must be installed"
+msgstr ""
+
 msgid "initial value is not in the interior of the feasible region"
 msgstr ""
 
@@ -525,6 +537,10 @@ msgstr "1 veya daha fazla vektör verilmeli"
 msgid "arguments must have the same length"
 msgstr ""
 
+#, fuzzy
+msgid "wrong number of columns in new data:"
+msgstr "'x'de hatalı sütun sayısı"
+
 msgid "contrasts apply only to factors"
 msgstr ""
 
@@ -621,8 +637,10 @@ msgstr ""
 msgid "elements of 'k' must be between 1 and %d"
 msgstr "'k' nın öğeleri 1 ve %d arasında olmalı"
 
-msgid "'merge' and 'height' do not fit!"
-msgstr "'merge' ve 'height' uymuyor!"
+msgid ""
+"dendrogram entries must be 1,2,..,%d (in any order), to be coercible to "
+"\"hclust\""
+msgstr ""
 
 msgid "dendrogram node with non-positive #{branches}"
 msgstr ""
@@ -676,9 +694,6 @@ msgstr "'ColSideColors' ncol(x) büyüklüğünde bir karakter vektörü olmalı
 msgid "'RowSideColors' must be a character vector of length nrow(x)"
 msgstr ""
 
-msgid "non-matched further arguments are disregarded"
-msgstr ""
-
 msgid "argument 'x' must be numeric"
 msgstr "'x' argümanı nümerik olmalı"
 
@@ -753,8 +768,8 @@ msgid "x[] and prob[] must be equal length vectors."
 msgstr "x[] ve prob[] eşit uzunlukta matris olmalı"
 
 #, fuzzy
-msgid "probabilities cannot be negative nor all 0"
-msgstr "olasılıklar negatif veya 0 olamaz"
+msgid "probabilities must be finite, non-negative and not all 0"
+msgstr "olasılıklar negatif olmamalı"
 
 msgid "'x' must be non-negative"
 msgstr "'x' negatif olmamalı"
@@ -769,6 +784,9 @@ msgstr "'prob' ve 'mu' aynı anda belirlendi"
 msgid "some terms will have NAs due to the limits of the method"
 msgstr "metodun sınırları nedeniyle bazı terimler NA ya sahip olacak"
 
+msgid "multivariate case with missing coefficients is not yet implemented"
+msgstr ""
+
 msgid "'x' must have 1 or more non-missing values"
 msgstr "'x' 1 veya daha fazla eksik-olmayan değere sahip olmalı"
 
@@ -886,7 +904,9 @@ msgid "positive values only are allowed for the 'inverse.gaussian' family"
 msgstr "pozitif değerlere sadece ters gauss ailesi için izin verilir"
 
 #, fuzzy
-msgid "need CRAN package 'SuppDists' for the 'inverse.gaussian' family"
+msgid ""
+"need CRAN package 'SuppDists' for simulation from the 'inverse.gaussian' "
+"family"
 msgstr "'inverse.gaussian' ailesi için CRAN paketi 'SuppDists' gerekli"
 
 msgid "using weights as inverse variances"
@@ -915,14 +935,6 @@ msgstr ""
 msgid "length of 'init' must equal length of 'filter'"
 msgstr "'init' uzunluğu 'filter' ile eşit uzunlukta olmalı"
 
-#, fuzzy
-msgid "'init' must have 1 column"
-msgstr "'init'; 1 veya %d sütun içermeli"
-
-#, fuzzy
-msgid "'init' must have 1 or %d columns"
-msgstr "'init'; 1 veya %d sütun içermeli"
-
 msgid "'x' must have at least 2 rows and columns"
 msgstr "'x' en az 2 satır ve sütun içermeli"
 
@@ -1147,12 +1159,6 @@ msgstr ""
 msgid "invalid length of members"
 msgstr ""
 
-msgid "invalid dendrogram"
-msgstr "geçersiz ağaç diyagramı"
-
-msgid "'merge' component in dendrogram must be integer"
-msgstr ""
-
 #, fuzzy
 msgid "argument 'x' cannot be coerced to class %s"
 msgstr "'x' argümanı nümerik olmalı"
@@ -1182,8 +1188,8 @@ msgstr "'x' in bütün elemanları 1 ile %d arasında olmalı"
 msgid "invalid parameter values"
 msgstr "geçersiz parametre değerleri"
 
-msgid "a limit is missing"
-msgstr "a sınırı eksik"
+msgid "a limit is NA or NaN"
+msgstr ""
 
 msgid "missing values not allowed"
 msgstr "eksik değerlere izin verilmiyor"
@@ -1264,6 +1270,12 @@ msgstr "'iter.max' pozitif olmalı"
 msgid "must have same number of columns in 'x' and 'centers'"
 msgstr ""
 
+msgid "'x' is a list, so ignoring argument 'g'"
+msgstr ""
+
+msgid "some elements of 'x' are not numeric and will be coerced to numeric"
+msgstr ""
+
 msgid "not enough 'x' data"
 msgstr "yetersiz 'x' verisi"
 
@@ -1389,6 +1401,10 @@ msgstr "geçersiz 'x'"
 msgid "only 1-4 predictors are allowed"
 msgstr ""
 
+#, fuzzy
+msgid "invalid NROW(X)"
+msgstr "geçersiz 'x'"
+
 msgid "invalid 'y'"
 msgstr "geçersiz 'y'"
 
@@ -1416,6 +1432,13 @@ msgstr "geçersiz argüman 'c'"
 msgid "invalid argument 'degree'"
 msgstr "geçersiz argüman 'r'"
 
+msgid "iterTrace ="
+msgstr ""
+
+#, fuzzy
+msgid "not obeyed as iterations ="
+msgstr "sonlu gözlem yok"
+
 msgid "first argument must be a \"loess\" object"
 msgstr ""
 
@@ -1932,8 +1955,8 @@ msgstr ""
 msgid "'varying' arguments must be the same length"
 msgstr ""
 
-msgid "'times' is wrong length"
-msgstr "'times' yanlış uzunluk"
+msgid "'lengths(varying)' must all match 'length(times)'"
+msgstr ""
 
 msgid "there are records with missing times, which will be dropped."
 msgstr ""
@@ -1996,6 +2019,9 @@ msgstr ""
 msgid "invalid 'endrule' argument"
 msgstr "geçersiz 'use' argümanı"
 
+msgid ".nknots.smspl() is now exported; use it instead of n.knots()"
+msgstr ""
+
 msgid "invalid 'control.spar'"
 msgstr "geçersiz 'control.spar'"
 
@@ -2137,7 +2163,8 @@ msgstr ""
 msgid "'plot.stepfun' called with wrong type of argument 'x'"
 msgstr ""
 
-msgid "must be 0 or 1"
+#, fuzzy
+msgid "%s must be 0 or 1"
 msgstr "0 yada 1 olmalı"
 
 msgid "only univariate series are allowed"
@@ -2411,12 +2438,6 @@ msgstr[0] "ekstra argümanlar çıkarıldı"
 msgstr[1] "ekstra argümanlar çıkarıldı"
 
 #, fuzzy
-msgid "extra argument %s will be disregarded"
-msgid_plural "extra arguments %s will be disregarded"
-msgstr[0] "ekstra argümanlar çıkarıldı"
-msgstr[1] "ekstra argümanlar çıkarıldı"
-
-#, fuzzy
 msgid "%d factor is too many for %d variables"
 msgid_plural "%d factors are too many for %d variables"
 msgstr[0] "%d faktör %d değişken için çok fazla"
@@ -2434,6 +2455,12 @@ msgstr[0] ""
 msgstr[1] ""
 
 #, fuzzy
+msgid "'init' must have %d column"
+msgid_plural "'init' must have 1 or %d columns"
+msgstr[0] "'init'; 1 veya %d sütun içermeli"
+msgstr[1] "'init'; 1 veya %d sütun içermeli"
+
+#, fuzzy
 msgid "X matrix has rank %d, but only %d observation"
 msgid_plural "X matrix has rank %d, but only %d observations"
 msgstr[0] "X matrisinin rankı %d, ancak sadece %d gözlem var"
@@ -2538,6 +2565,32 @@ msgid_plural "'start.innov' is too short: need %d points"
 msgstr[0] "'start.innov' çok kısa: %d nokta gerekli"
 msgstr[1] "'start.innov' çok kısa: %d nokta gerekli"
 
+#~ msgid "a limit is missing"
+#~ msgstr "a sınırı eksik"
+
+#~ msgid "'times' is wrong length"
+#~ msgstr "'times' yanlış uzunluk"
+
+#, fuzzy
+#~ msgid "extra argument %s will be disregarded"
+#~ msgid_plural "extra arguments %s will be disregarded"
+#~ msgstr[0] "ekstra argümanlar çıkarıldı"
+#~ msgstr[1] "ekstra argümanlar çıkarıldı"
+
+#~ msgid "'merge' and 'height' do not fit!"
+#~ msgstr "'merge' ve 'height' uymuyor!"
+
+#~ msgid "invalid dendrogram"
+#~ msgstr "geçersiz ağaç diyagramı"
+
+#, fuzzy
+#~ msgid "probabilities cannot be negative nor all 0"
+#~ msgstr "olasılıklar negatif veya 0 olamaz"
+
+#, fuzzy
+#~ msgid "'init' must have 1 or %d columns"
+#~ msgstr "'init'; 1 veya %d sütun içermeli"
+
 #~ msgid "'deriv' must be between 0 and 2"
 #~ msgstr "'deriv' 0 ile 2 arasında olmalı"
 
diff --git a/src/library/stats/po/R-zh_CN.po b/src/library/stats/po/R-zh_CN.po
index fa78943..b2a6124 100644
--- a/src/library/stats/po/R-zh_CN.po
+++ b/src/library/stats/po/R-zh_CN.po
@@ -7,11 +7,11 @@ msgid ""
 msgstr ""
 "Project-Id-Version: R 2.2.0\n"
 "Report-Msgid-Bugs-To: bugs.r-project.org\n"
-"POT-Creation-Date: 2014-03-27 07:47\n"
+"POT-Creation-Date: 2016-04-01 09:50\n"
 "PO-Revision-Date: 2005-04-08 08:37+0000\n"
 "Last-Translator: 陈斐 <feic at normipaiva.com>\n"
 "Language-Team: Chinese\n"
-"Language: \n"
+"Language: zh_CN\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
@@ -101,6 +101,9 @@ msgstr "x$lag至少需要有一列"
 msgid "can use ci.type=\"ma\" only if first lag is 0"
 msgstr "只有在第一个滯後为0时才能用ci.type=\"ma\" "
 
+msgid "Page [%d,%d]: i =%s; j =%s"
+msgstr ""
+
 msgid "univariate time series only"
 msgstr "只适用于单变量时间序列"
 
@@ -462,6 +465,12 @@ msgstr "Chi-squared近似算法有可能不准"
 msgid "NA values not allowed in 'd'"
 msgstr "'d'里不允许有NA值"
 
+msgid "eig=TRUE is disregarded when list.=FALSE"
+msgstr ""
+
+msgid "x.ret=TRUE is disregarded when list.=FALSE"
+msgstr ""
+
 msgid "distances must be result of 'dist' or a square matrix"
 msgstr "距离必需是'dist'计算出结果或是正方形矩阵"
 
@@ -474,6 +483,9 @@ msgstr "'k'必需是{1, 2, ..  n - 1}中的一个"
 msgid "only %d of the first %d eigenvalues are > 0"
 msgstr "前%2$d个特征值里只有%1$d个大于零"
 
+msgid "package 'MASS' must be installed"
+msgstr ""
+
 msgid "initial value is not in the interior of the feasible region"
 msgstr "初始值不是在可行区域内"
 
@@ -515,6 +527,10 @@ msgstr "至少要提供一或多个矢量"
 msgid "arguments must have the same length"
 msgstr "参数的长度必需一样"
 
+#, fuzzy
+msgid "wrong number of columns in new data:"
+msgstr "'x'里的列数不对"
+
 msgid "contrasts apply only to factors"
 msgstr "对比只适用于因子"
 
@@ -608,8 +624,10 @@ msgstr "'tree'里的'height'组件没有排序(由小到大)"
 msgid "elements of 'k' must be between 1 and %d"
 msgstr "'k'的单元必需在一和%d之间"
 
-msgid "'merge' and 'height' do not fit!"
-msgstr "'merge'和'height'不合!"
+msgid ""
+"dendrogram entries must be 1,2,..,%d (in any order), to be coercible to "
+"\"hclust\""
+msgstr ""
 
 msgid "dendrogram node with non-positive #{branches}"
 msgstr "系統樹圖節點有非正#{分支}"
@@ -662,9 +680,6 @@ msgstr "'ColSideColors'必需是长度为ncol(x)的字节矢量"
 msgid "'RowSideColors' must be a character vector of length nrow(x)"
 msgstr "'RowSideColors'必需是长度为nrow(x)的字节矢量"
 
-msgid "non-matched further arguments are disregarded"
-msgstr "不匹配的额外参数略过不用"
-
 msgid "argument 'x' must be numeric"
 msgstr "参数'x'必需是数值"
 
@@ -737,8 +752,9 @@ msgstr "'rate'和'scale'两个中只能设定其中一个"
 msgid "x[] and prob[] must be equal length vectors."
 msgstr "x[]和prob[]必需是长度相等的矢量。"
 
-msgid "probabilities cannot be negative nor all 0"
-msgstr "機率不能是负数,也不能全都是零。"
+#, fuzzy
+msgid "probabilities must be finite, non-negative and not all 0"
+msgstr "機率必需为非负值。"
 
 msgid "'x' must be non-negative"
 msgstr "'x'必需为非负数"
@@ -752,6 +768,9 @@ msgstr "'prob'和'mu'不能同时设定"
 msgid "some terms will have NAs due to the limits of the method"
 msgstr "因为这个方法的限制,有些项的值为NA"
 
+msgid "multivariate case with missing coefficients is not yet implemented"
+msgstr ""
+
 msgid "'x' must have 1 or more non-missing values"
 msgstr "'x'必需含一个或多个非遺漏值"
 
@@ -859,7 +878,10 @@ msgstr "inverse.gaussian分布族里没有\"%s\"这一鏈結函数;可以用
 msgid "positive values only are allowed for the 'inverse.gaussian' family"
 msgstr "'inverse.gaussian'分布族只允许正值"
 
-msgid "need CRAN package 'SuppDists' for the 'inverse.gaussian' family"
+#, fuzzy
+msgid ""
+"need CRAN package 'SuppDists' for simulation from the 'inverse.gaussian' "
+"family"
 msgstr "'inverse.gaussian'分布族需要CRAN程序包'SuppDists'"
 
 msgid "using weights as inverse variances"
@@ -890,12 +912,6 @@ msgstr "'circular'必需是逻辑值,不能是NA"
 msgid "length of 'init' must equal length of 'filter'"
 msgstr "'init'的长度必需等于'filter'的长度"
 
-msgid "'init' must have 1 column"
-msgstr "'init'必需有一个列"
-
-msgid "'init' must have 1 or %d columns"
-msgstr "'init'必需有一个或%d个列"
-
 msgid "'x' must have at least 2 rows and columns"
 msgstr "'x'至少必需有两行和两列"
 
@@ -1114,12 +1130,6 @@ msgstr "用群集时必需有n >= 2的对象"
 msgid "invalid length of members"
 msgstr "成员长度不对"
 
-msgid "invalid dendrogram"
-msgstr "系統樹圖不对"
-
-msgid "'merge' component in dendrogram must be integer"
-msgstr "系統樹圖的'merge'组件必需是整数"
-
 msgid "argument 'x' cannot be coerced to class %s"
 msgstr "无法将'x'参数強制转换成%s类别"
 
@@ -1147,8 +1157,8 @@ msgstr "'which'的所有单元值都必需在一和%d之间"
 msgid "invalid parameter values"
 msgstr "参数值不对"
 
-msgid "a limit is missing"
-msgstr "極限有遺漏"
+msgid "a limit is NA or NaN"
+msgstr ""
 
 msgid "missing values not allowed"
 msgstr "不能有遺漏值"
@@ -1225,6 +1235,12 @@ msgstr "'iter.max'必需是正数"
 msgid "must have same number of columns in 'x' and 'centers'"
 msgstr "'x'和'centers'的列数必需相等"
 
+msgid "'x' is a list, so ignoring argument 'g'"
+msgstr ""
+
+msgid "some elements of 'x' are not numeric and will be coerced to numeric"
+msgstr ""
+
 msgid "not enough 'x' data"
 msgstr "'x'数据不够"
 
@@ -1353,6 +1369,10 @@ msgstr "NCOL(X)不对"
 msgid "only 1-4 predictors are allowed"
 msgstr "只允许有一到四个従属変数"
 
+#, fuzzy
+msgid "invalid NROW(X)"
+msgstr "NCOL(X)不对"
+
 msgid "invalid 'y'"
 msgstr "'y'不对"
 
@@ -1377,6 +1397,13 @@ msgstr "参数'cell'不对"
 msgid "invalid argument 'degree'"
 msgstr "参数'degree'不对"
 
+msgid "iterTrace ="
+msgstr ""
+
+#, fuzzy
+msgid "not obeyed as iterations ="
+msgstr "没有有限观察量"
+
 msgid "first argument must be a \"loess\" object"
 msgstr "第一个参数必需为\"loess\"对象"
 
@@ -1891,8 +1918,8 @@ msgstr "没有能够从它们的名字中来猜测时变参数"
 msgid "'varying' arguments must be the same length"
 msgstr "'varying'参数的长度必需相同"
 
-msgid "'times' is wrong length"
-msgstr "'times'的长度不对"
+msgid "'lengths(varying)' must all match 'length(times)'"
+msgstr ""
 
 msgid "there are records with missing times, which will be dropped."
 msgstr "含遺漏时间的记录略过不用。"
@@ -1950,6 +1977,9 @@ msgstr "不能平滑NA值"
 msgid "invalid 'endrule' argument"
 msgstr "'endrule'参数不对"
 
+msgid ".nknots.smspl() is now exported; use it instead of n.knots()"
+msgstr ""
+
 msgid "invalid 'control.spar'"
 msgstr "'control.spar'不对"
 
@@ -2085,7 +2115,8 @@ msgstr "步驟函数不对"
 msgid "'plot.stepfun' called with wrong type of argument 'x'"
 msgstr "調用'plot.stepfun'时参数'x'的种类不对"
 
-msgid "must be 0 or 1"
+#, fuzzy
+msgid "%s must be 0 or 1"
 msgstr "必需是零或一"
 
 msgid "only univariate series are allowed"
@@ -2342,10 +2373,6 @@ msgid "extra argument %s is not of class \"%s\""
 msgid_plural "extra arguments %s are not of class \"%s\"s"
 msgstr[0] "额外参数%s的类别不是\"%s\""
 
-msgid "extra argument %s will be disregarded"
-msgid_plural "extra arguments %s will be disregarded"
-msgstr[0] "不用额外的参数%s"
-
 msgid "%d factor is too many for %d variables"
 msgid_plural "%d factors are too many for %d variables"
 msgstr[0] "%2$d变量不能有%1$d这么多的因子"
@@ -2358,6 +2385,11 @@ msgid "unable to optimize from this starting value"
 msgid_plural "unable to optimize from these starting values"
 msgstr[0] "无法用这些初始值进行最佳化运算"
 
+#, fuzzy
+msgid "'init' must have %d column"
+msgid_plural "'init' must have 1 or %d columns"
+msgstr[0] "'init'必需有一个列"
+
 msgid "X matrix has rank %d, but only %d observation"
 msgid_plural "X matrix has rank %d, but only %d observations"
 msgstr[0] "X矩阵的秩为%d, 但只有%d个观察量"
@@ -2434,6 +2466,34 @@ msgid "'start.innov' is too short: need %d point"
 msgid_plural "'start.innov' is too short: need %d points"
 msgstr[0] "'start.innov'太短了,需要%d个点"
 
+#~ msgid "a limit is missing"
+#~ msgstr "極限有遺漏"
+
+#~ msgid "'times' is wrong length"
+#~ msgstr "'times'的长度不对"
+
+#~ msgid "non-matched further arguments are disregarded"
+#~ msgstr "不匹配的额外参数略过不用"
+
+#~ msgid "extra argument %s will be disregarded"
+#~ msgid_plural "extra arguments %s will be disregarded"
+#~ msgstr[0] "不用额外的参数%s"
+
+#~ msgid "'merge' and 'height' do not fit!"
+#~ msgstr "'merge'和'height'不合!"
+
+#~ msgid "invalid dendrogram"
+#~ msgstr "系統樹圖不对"
+
+#~ msgid "'merge' component in dendrogram must be integer"
+#~ msgstr "系統樹圖的'merge'组件必需是整数"
+
+#~ msgid "probabilities cannot be negative nor all 0"
+#~ msgstr "機率不能是负数,也不能全都是零。"
+
+#~ msgid "'init' must have 1 or %d columns"
+#~ msgstr "'init'必需有一个或%d个列"
+
 #~ msgid "'deriv' must be between 0 and 2"
 #~ msgstr "'deriv'必需在零和二之间"
 
diff --git a/src/library/stats/po/da.po b/src/library/stats/po/da.po
index 9dc6ef1..6115e87 100644
--- a/src/library/stats/po/da.po
+++ b/src/library/stats/po/da.po
@@ -5,8 +5,8 @@
 msgid ""
 msgstr ""
 "Project-Id-Version: R 3.0.0\n"
-"Report-Msgid-Bugs-To: bugs.r-project.org\n"
-"POT-Creation-Date: 2014-03-27 18:36+0000\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2016-04-01 10:01-0700\n"
 "PO-Revision-Date: 2011-12-01 20:24+0200\n"
 "Last-Translator: Joe <joedalton2 at yahoo.dk>\n"
 "Language-Team: LANGUAGE <LL at li.org>\n"
@@ -17,11 +17,11 @@ msgstr ""
 "Plural-Forms: nplurals=2; plural=(n != 1);\n"
 "X-Generator: Pootle 2.1.6\n"
 
-#: Srunmed.c:55
+#: Srunmed.c:54
 msgid "bandwidth/span of running medians is larger than n"
 msgstr "båndbredde/spænd for kørende medianer er større end n"
 
-#: ansari.c:116
+#: ansari.c:118
 msgid "probabilities outside [0,1] in qansari()"
 msgstr "sandsynligheder uden for [0,1] i qansari()"
 
@@ -41,7 +41,7 @@ msgstr "approx(): forsøgte at interpolere NA-værdier"
 msgid "invalid argument type"
 msgstr "ugyldig argumenttype"
 
-#: arima.c:444 arima.c:530 pacf.c:331 pacf.c:371
+#: arima.c:444 arima.c:530 pacf.c:324 pacf.c:363
 msgid "can only transform 100 pars in arima0"
 msgstr "kan kun transformere 100 par i arima0"
 
@@ -49,6 +49,11 @@ msgstr "kan kun transformere 100 par i arima0"
 msgid "maximum supported lag is 350"
 msgstr "maksimal understøttet forsinkelse er 350"
 
+#: bandwidths.c:121
+#, c-format
+msgid "non-finite x[%d] in bandwidth calculation"
+msgstr ""
+
 #: complete_cases.c:26
 #, fuzzy, c-format
 msgid "invalid 'type' (%s) of argument"
@@ -62,31 +67,41 @@ msgstr ""
 msgid "not all arguments have the same length"
 msgstr ""
 
-#: cov.c:566
+#: cov.c:569
 msgid "missing observations in cov/cor"
 msgstr ""
 
-#: cov.c:644
+#: cov.c:643
 msgid "'x' is NULL"
 msgstr ""
 
-#: cov.c:663 cov.c:669
+#: cov.c:645
+#, fuzzy
+msgid "'x' is a factor"
+msgstr "Ugyldig vmethod"
+
+#: cov.c:665
+#, fuzzy
+msgid "'y' is a factor"
+msgstr "Ugyldig vmethod"
+
+#: cov.c:673 cov.c:679
 msgid "incompatible dimensions"
 msgstr ""
 
-#: cov.c:688 cov.c:729 cov.c:762
+#: cov.c:698 cov.c:739 cov.c:772
 msgid "no complete element pairs"
 msgstr ""
 
-#: cov.c:701
+#: cov.c:711
 msgid "invalid 'use' (computational method)"
 msgstr ""
 
-#: cov.c:704
+#: cov.c:714
 msgid "'x' is empty"
 msgstr ""
 
-#: cov.c:798
+#: cov.c:808
 msgid "the standard deviation is zero"
 msgstr ""
 
@@ -99,38 +114,42 @@ msgstr ""
 msgid "Function '%s' is not in the derivatives table"
 msgstr ""
 
-#: deriv.c:642
-msgid "variable must be a character string"
+#: deriv.c:641
+msgid "'expr' must be an expression or call"
 msgstr ""
 
 #: deriv.c:644
+msgid "variable must be a character string"
+msgstr ""
+
+#: deriv.c:646
 msgid "only the first element is used as variable name"
 msgstr ""
 
-#: deriv.c:657
+#: deriv.c:659
 #, c-format
 msgid "invalid expression in '%s'"
 msgstr ""
 
-#: deriv.c:935 model.c:99
+#: deriv.c:937 model.c:99
 #, fuzzy
 msgid "invalid variable names"
 msgstr "ugyldig værdi for lag.max"
 
-#: deriv.c:944
+#: deriv.c:946
 #, fuzzy
 msgid "invalid tag"
 msgstr "ugyldig argumenttype"
 
-#: distance.c:153
+#: distance.c:152
 msgid "treating non-finite values as NA"
 msgstr "behandler ikkebegrænsende værdier som NA"
 
-#: distance.c:226
+#: distance.c:225
 msgid "distance(): invalid p"
 msgstr "distance(): ugyldig p"
 
-#: distance.c:229
+#: distance.c:228
 msgid "distance(): invalid distance"
 msgstr "distance(): ugyldig afstand"
 
@@ -142,17 +161,17 @@ msgstr ""
 msgid "Non-numeric argument to mathematical function"
 msgstr ""
 
-#: family.c:44
+#: family.c:45
 #, c-format
 msgid "Value %g out of range (0, 1)"
 msgstr "Værdi %g uden for interval (0, 1)"
 
-#: family.c:65 family.c:79 family.c:97
+#: family.c:66 family.c:80 family.c:98
 #, c-format
 msgid "Argument %s must be a nonempty numeric vector"
 msgstr "Argument %s skal være en numerisk vektor som ikke er tom"
 
-#: family.c:130 family.c:133
+#: family.c:131 family.c:134
 #, c-format
 msgid "argument %s must be a numeric vector of length 1 or length %d"
 msgstr "argument %s skal være en numerisk vektor af længde 1 eller længde %d"
@@ -178,7 +197,12 @@ msgstr ""
 msgid "invalid factors"
 msgstr "Ugyldig vmethod"
 
-#: ksmooth.c:67
+#: integrate.c:84 integrate.c:86 integrate.c:128
+#, fuzzy, c-format
+msgid "'%s' must be of length one"
+msgstr "'m' skal være en liste"
+
+#: ksmooth.c:68
 msgid "only 2500 rows are allowed for sm.method=\"spline\""
 msgstr "kun 2.500 rækker er tilladt for sm.method=\"spline\""
 
@@ -196,7 +220,7 @@ msgstr ""
 msgid "NA/NaN/Inf in '%s'"
 msgstr ""
 
-#: loessc.c:233
+#: loessc.c:240
 msgid "span is too small"
 msgstr "spænd er for lille"
 
@@ -225,19 +249,19 @@ msgstr "'m' skal være en liste"
 msgid "'delta' must be finite and > 0"
 msgstr ""
 
-#: mAR.c:467
+#: mAR.c:470
 msgid "Singular matrix in qr_solve"
 msgstr "Entalsmatrix i qr_solve"
 
-#: mAR.c:510
+#: mAR.c:513
 msgid "Singular matrix in ldet"
 msgstr "Entalsmatrix i ldet"
 
-#: mAR.c:697
+#: mAR.c:700
 msgid "Invalid vmethod"
 msgstr "Ugyldig vmethod"
 
-#: mAR.c:833
+#: mAR.c:836
 msgid "Burg's algorithm failed to find partial correlation"
 msgstr "Burgs algoritme fejlede i at finde delvis korrelation"
 
@@ -276,192 +300,192 @@ msgstr ""
 msgid "invalid result from na.action"
 msgstr ""
 
-#: model.c:369 model.c:377 optim.c:197
+#: model.c:372 model.c:380 optim.c:197
 #, fuzzy, c-format
 msgid "invalid '%s' argument"
 msgstr "ugyldig argumenttype"
 
-#: model.c:388
+#: model.c:391
 #, fuzzy
 msgid "invalid model frame"
 msgstr "ugyldig værdi for lag.max"
 
-#: model.c:390
+#: model.c:393
 msgid "do not know how many cases"
 msgstr ""
 
-#: model.c:414
+#: model.c:417
 #, c-format
 msgid "variable lengths differ (found for variable %d)"
 msgstr ""
 
-#: model.c:418 model.c:425
+#: model.c:421 model.c:428
 #, fuzzy, c-format
 msgid "variable %d has no levels"
 msgstr "variabel '%s' er ikke numerisk"
 
-#: model.c:537
+#: model.c:540
 msgid "the response appeared on the right-hand side and was dropped"
 msgstr ""
 
-#: model.c:557
+#: model.c:560
 #, c-format
 msgid "term %d would require %.0g columns"
 msgstr ""
 
-#: model.c:561
+#: model.c:564
 #, c-format
 msgid "matrix would require %.0g columns"
 msgstr ""
 
-#: model.c:572
+#: model.c:575
 #, c-format
 msgid "problem with term %d in model.matrix: no columns are assigned"
 msgstr ""
 
-#: model.c:621 model.c:626 model.c:632 model.c:643 model.c:649 model.c:655
+#: model.c:624 model.c:629 model.c:635 model.c:646 model.c:652 model.c:658
 msgid "term names will be truncated"
 msgstr ""
 
-#: model.c:635
+#: model.c:638
 msgid "complex variables are not currently allowed in model matrices"
 msgstr ""
 
-#: model.c:659
+#: model.c:662
 #, c-format
 msgid "variables of type '%s' are not allowed in model matrices"
 msgstr ""
 
-#: model.c:881
+#: model.c:884
 #, fuzzy
 msgid "invalid formula in 'update'"
 msgstr "ugyldig værdi for lag.max"
 
-#: model.c:915
+#: model.c:918
 msgid "formula expected"
 msgstr ""
 
-#: model.c:1046
+#: model.c:1049
 #, fuzzy
 msgid "invalid term in model formula"
 msgstr "ugyldig værdi for lag.max"
 
-#: model.c:1121
+#: model.c:1124
 #, fuzzy
 msgid "invalid model formula"
 msgstr "ugyldig værdi for lag.max"
 
-#: model.c:1147 model.c:1395
+#: model.c:1150 model.c:1410
 #, fuzzy
 msgid "invalid power in formula"
 msgstr "ugyldig værdi for lag.max"
 
-#: model.c:1183
+#: model.c:1186
 #, fuzzy
 msgid "invalid model formula in ExtractVars"
 msgstr "ugyldig værdi for lag.max"
 
-#: model.c:1518
+#: model.c:1533
 #, c-format
 msgid "duplicated name '%s' in data frame using '.'"
 msgstr ""
 
-#: model.c:1576
+#: model.c:1594
 #, fuzzy
 msgid "invalid model formula in EncodeVars"
 msgstr "ugyldig værdi for lag.max"
 
-#: model.c:1662
+#: model.c:1680
 msgid "argument is not a valid model"
 msgstr ""
 
-#: model.c:1672
+#: model.c:1690
 #, fuzzy
 msgid "'specials' must be NULL or a character vector"
 msgstr "'path' skal være en tegnvektor"
 
-#: model.c:1684
+#: model.c:1702
 msgid "'data' argument is of the wrong type"
 msgstr ""
 
-#: model.c:1952
+#: model.c:1972
 msgid "'.' in formula and no 'data' argument"
 msgstr ""
 
-#: monoSpl.c:34
+#: monoSpl.c:36
 msgid "n must be at least two"
 msgstr "n skal mindst være to"
 
-#: monoSpl.c:67
+#: monoSpl.c:69
 msgid "Argument m must be numeric"
 msgstr "Argument m skal være numerisk"
 
-#: monoSpl.c:70
+#: monoSpl.c:72
 msgid "length(m) must be at least two"
 msgstr "length(m) skal være mindst to"
 
-#: monoSpl.c:72
+#: monoSpl.c:74
 msgid "Argument Sx must be numeric vector one shorter than m[]"
 msgstr "Argument Sx skal være en numerisk vektor en kortere end m[]"
 
-#: nls.c:97
+#: nls.c:99
 msgid "'control' must be a list"
 msgstr "'control' skal være en liste"
 
-#: nls.c:99
+#: nls.c:101
 msgid "'m' must be a list"
 msgstr "'m' skal være en liste"
 
-#: nls.c:105 nls.c:110 nls.c:115 nls.c:120 nls.c:125 nls.c:166 nls.c:171
-#: nls.c:176 nls.c:181 nls.c:186 nls.c:191
+#: nls.c:107 nls.c:112 nls.c:117 nls.c:122 nls.c:127 nls.c:168 nls.c:173
+#: nls.c:178 nls.c:183 nls.c:188 nls.c:193
 #, c-format
 msgid "'%s' absent"
 msgstr "'%s' mangler"
 
-#: nls.c:232
+#: nls.c:234
 msgid "singular gradient"
 msgstr "entalsgradient"
 
-#: nls.c:253
+#: nls.c:255
 #, c-format
 msgid "step factor %g reduced below 'minFactor' of %g"
 msgstr "trinfaktor %g reduceret under 'minFactor' af %g"
 
-#: nls.c:262
+#: nls.c:264
 #, c-format
 msgid "number of iterations exceeded maximum of %d"
 msgstr "antal iterationer overskred maksimum på %d"
 
-#: nls.c:267
+#: nls.c:269
 msgid "converged"
 msgstr "begrænset"
 
-#: nls.c:288
+#: nls.c:290
 msgid "'theta' should be of type character"
 msgstr "'theta' skal være type-tegn"
 
-#: nls.c:290 port.c:375
+#: nls.c:292 port.c:376
 msgid "use of NULL environment is defunct"
 msgstr "brug af NULL-miljø er ude af drift"
 
-#: nls.c:294
+#: nls.c:296
 msgid "'rho' should be an environment"
 msgstr "'rho' skal være et miljø"
 
-#: nls.c:297
+#: nls.c:299
 msgid "'dir' is not a numeric vector of the correct length"
 msgstr "'dir' er ikke en numerisk vektor med korrekt længde"
 
-#: nls.c:311 nls.c:341
+#: nls.c:313 nls.c:347
 msgid "Missing value or an infinity produced when evaluating the model"
 msgstr "Manglende værdi eller en uendelig lavet under evaluering af modellen"
 
-#: nls.c:318
+#: nls.c:321
 #, c-format
 msgid "variable '%s' is integer, not numeric"
 msgstr "variable '%s' er et heltal, ikke numerisk"
 
-#: nls.c:320
+#: nls.c:323
 #, c-format
 msgid "variable '%s' is not numeric"
 msgstr "variabel '%s' er ikke numerisk"
@@ -509,156 +533,156 @@ msgstr ""
 msgid "unknown 'method'"
 msgstr ""
 
-#: optimize.c:217 optimize.c:309 optimize.c:530
+#: optimize.c:220 optimize.c:306 optimize.c:528
 msgid "NA replaced by maximum positive value"
 msgstr ""
 
-#: optimize.c:225 optimize.c:321 optimize.c:538
+#: optimize.c:228 optimize.c:318 optimize.c:536
 msgid "NA/Inf replaced by maximum positive value"
 msgstr ""
 
-#: optimize.c:234
+#: optimize.c:237
 msgid "invalid function value in 'optimize'"
 msgstr ""
 
-#: optimize.c:252 optimize.c:350 optimize.c:723
+#: optimize.c:255 optimize.c:347 optimize.c:721
 msgid "attempt to minimize non-function"
 msgstr ""
 
-#: optimize.c:259 optimize.c:266 optimize.c:275 optimize.c:355 optimize.c:360
-#: optimize.c:376
+#: optimize.c:262 optimize.c:269 optimize.c:278 optimize.c:352 optimize.c:357
+#: optimize.c:373
 #, fuzzy, c-format
 msgid "invalid '%s' value"
 msgstr "approx(): ugyldig f-værdi"
 
-#: optimize.c:268 optimize.c:361
+#: optimize.c:271 optimize.c:358
 msgid "'xmin' not less than 'xmax'"
 msgstr ""
 
-#: optimize.c:318
+#: optimize.c:315
 msgid "-Inf replaced by maximally negative value"
 msgstr ""
 
-#: optimize.c:331
+#: optimize.c:328
 msgid "invalid function value in 'zeroin'"
 msgstr ""
 
-#: optimize.c:366 optimize.c:371
+#: optimize.c:363 optimize.c:368
 #, fuzzy, c-format
 msgid "NA value for '%s' is not allowed"
 msgstr "variabel '%s' er ikke numerisk"
 
-#: optimize.c:381
+#: optimize.c:378
 #, fuzzy
 msgid "'maxiter' must be positive"
 msgstr "'m' skal være en liste"
 
-#: optimize.c:522
+#: optimize.c:520
 msgid "non-finite value supplied by 'nlm'"
 msgstr ""
 
-#: optimize.c:557
+#: optimize.c:555
 msgid "invalid function value in 'nlm' optimizer"
 msgstr ""
 
-#: optimize.c:568 optimize.c:583
+#: optimize.c:566 optimize.c:581
 msgid "function value caching for optimization is seriously confused"
 msgstr ""
 
-#: optimize.c:598
+#: optimize.c:596
 msgid "numeric parameter expected"
 msgstr ""
 
-#: optimize.c:602
+#: optimize.c:600
 msgid "conflicting parameter lengths"
 msgstr ""
 
-#: optimize.c:606
+#: optimize.c:604
 #, fuzzy
 msgid "invalid parameter length"
 msgstr "ugyldig argumenttype"
 
-#: optimize.c:616 optimize.c:623
+#: optimize.c:614 optimize.c:621
 #, fuzzy
 msgid "missing value in parameter"
 msgstr "manglende værdi i sidste %d observationer"
 
-#: optimize.c:628
+#: optimize.c:626
 #, fuzzy
 msgid "invalid parameter type"
 msgstr "ugyldig argumenttype"
 
-#: optimize.c:639
+#: optimize.c:637
 msgid "non-positive number of parameters in nlm"
 msgstr ""
 
-#: optimize.c:641
+#: optimize.c:639
 msgid "nlm is inefficient for 1-d problems"
 msgstr ""
 
-#: optimize.c:643
+#: optimize.c:641
 msgid "invalid gradient tolerance in nlm"
 msgstr ""
 
-#: optimize.c:645
+#: optimize.c:643
 msgid "invalid iteration limit in nlm"
 msgstr ""
 
-#: optimize.c:647
+#: optimize.c:645
 msgid "minimization function has no good digits in nlm"
 msgstr ""
 
-#: optimize.c:649
+#: optimize.c:647
 msgid "no analytic gradient to check in nlm!"
 msgstr ""
 
-#: optimize.c:651
+#: optimize.c:649
 msgid "no analytic Hessian to check in nlm!"
 msgstr ""
 
-#: optimize.c:653
+#: optimize.c:651
 msgid "probable coding error in analytic gradient"
 msgstr ""
 
-#: optimize.c:655
+#: optimize.c:653
 msgid "probable coding error in analytic Hessian"
 msgstr ""
 
-#: optimize.c:657
+#: optimize.c:655
 #, c-format
 msgid ""
 "*** unknown error message (msg = %d) in nlm()\n"
 "*** should not happen!"
 msgstr ""
 
-#: optimize.c:668
+#: optimize.c:666
 msgid "Relative gradient close to zero.\n"
 msgstr ""
 
-#: optimize.c:669 optimize.c:673
+#: optimize.c:667 optimize.c:671
 msgid "Current iterate is probably solution.\n"
 msgstr ""
 
-#: optimize.c:672
+#: optimize.c:670
 msgid "Successive iterates within tolerance.\n"
 msgstr ""
 
-#: optimize.c:676
+#: optimize.c:674
 msgid "Last global step failed to locate a point lower than x.\n"
 msgstr ""
 
-#: optimize.c:677
+#: optimize.c:675
 msgid ""
 "Either x is an approximate local minimum of the function,\n"
 "the function is too non-linear for this algorithm,\n"
 "or steptol is too large.\n"
 msgstr ""
 
-#: optimize.c:682
+#: optimize.c:680
 msgid "Iteration limit exceeded.  Algorithm failed.\n"
 msgstr ""
 
-#: optimize.c:685
+#: optimize.c:683
 msgid ""
 "Maximum step size exceeded 5 consecutive times.\n"
 "Either the function is unbounded below,\n"
@@ -667,35 +691,35 @@ msgid ""
 "or stepmx is too small.\n"
 msgstr ""
 
-#: optimize.c:747 optimize.c:752 optimize.c:756 optimize.c:760 optimize.c:764
-#: optimize.c:768 optimize.c:773
+#: optimize.c:745 optimize.c:750 optimize.c:754 optimize.c:758 optimize.c:762
+#: optimize.c:766 optimize.c:771
 #, fuzzy
 msgid "invalid NA value in parameter"
 msgstr "ugyldig værdi for lag.max"
 
-#: optimize.c:804
+#: optimize.c:800
 msgid "hessian supplied is of the wrong length or mode, so ignored"
 msgstr ""
 
-#: optimize.c:808
+#: optimize.c:804
 msgid "gradient supplied is of the wrong length or mode, so ignored"
 msgstr ""
 
-#: pacf.c:94
+#: pacf.c:87
 msgid "bad Starma struct"
 msgstr "ugyldig Starma struct"
 
-#: pacf.c:240
+#: pacf.c:233
 #, c-format
 msgid "starma error code %d"
 msgstr "fejlkode for starma %d"
 
-#: pacf.c:300
+#: pacf.c:293
 #, c-format
 msgid "forkal error code %d"
 msgstr "fejlkode for forkal %d"
 
-#: pacf.c:474
+#: pacf.c:466
 msgid "invalid value of lag.max"
 msgstr "ugyldig værdi for lag.max"
 
@@ -704,99 +728,113 @@ msgstr "ugyldig værdi for lag.max"
 msgid "Rf_divset: alg = %d must be 1, 2, 3, or 4"
 msgstr "Rf_divsæt: alg = %d skal være 1, 2, 3 eller 4 "
 
-#: port.c:312
+#: port.c:149
+msgid "port algorithms 3 or higher are not supported"
+msgstr ""
+
+#: port.c:313
 #, c-format
 msgid "gradient function must return a numeric vector of length %d"
 msgstr "gradientfunktion skal returnere en numerisk vektor med længden %d"
 
-#: port.c:324
+#: port.c:325
 #, c-format
 msgid "Hessian function must return a square numeric matrix of order %d"
 msgstr ""
 "Hessianfunktion skal returnere en kvadratisk numerisk matrix i orden %d"
 
-#: port.c:379
+#: port.c:380
 msgid "'rho' must be an environment"
 msgstr "'rho' skal være et miljø"
 
-#: port.c:381 port.c:542
+#: port.c:382 port.c:548
 msgid "'d' must be a nonempty numeric vector"
 msgstr "'d' skal være en numerisk vektor som ikke er tom"
 
-#: port.c:383
+#: port.c:384
 msgid "When Hessian defined must also have gradient defined"
 msgstr "Når Hessian er defineret skal også en gradient være defineret"
 
-#: port.c:386
+#: port.c:387
 #, c-format
 msgid "environment 'rho' must contain a numeric vector '.par' of length %d"
 msgstr "miljø 'rho' skal indeholde en numerisk vektor '.par' med længden %d"
 
-#: port.c:400
+#: port.c:401
 msgid "'lower' and 'upper' must be numeric vectors"
 msgstr "'lower' og 'upper' skal være numeriske vektorer"
 
-#: port.c:456
+#: port.c:460
 msgid "'getElement' applies only to named lists"
 msgstr "'getElement' gælder kun for navngivne lister"
 
-#: port.c:477
+#: port.c:481
 #, c-format
 msgid "%s$%s() not found"
 msgstr "%s$%s() er ikke fundet"
 
-#: port.c:490
+#: port.c:494
 #, c-format
 msgid "'gradient' must be a numeric matrix of dimension (%d,%d)"
 msgstr "'gradient' skal være en numerisk matrix med dimension (%d, %d)"
 
-#: port.c:511
+#: port.c:515
 #, c-format
 msgid "fcn produced mode %d, length %d - wanted mode %d, length %d"
 msgstr "fcn lavede tilstand %d, længde %d - ønsket tilstand %d, længde %d"
 
-#: port.c:524
+#: port.c:528
 msgid "invalid type for eval_check_store"
 msgstr "ugyldig type for eval_check_store"
 
-#: port.c:543
+#: port.c:549
 msgid "m must be a list"
 msgstr "m skal være en liste"
 
-#: port.c:563
+#: port.c:569
 msgid "'lowerb' and 'upperb' must be numeric vectors"
 msgstr "'lowerb' og 'upperb' skal være numeriske vektorer"
 
-#: rWishart.c:51
+#: rWishart.c:53
 msgid "inconsistent degrees of freedom and dimension"
 msgstr ""
 
-#: rWishart.c:84
+#: rWishart.c:86
 msgid "'scal' must be a square, real matrix"
 msgstr ""
 
-#: rWishart.c:96
+#: rWishart.c:98
 msgid "'scal' matrix is not positive-definite"
 msgstr ""
 
-#: random.c:66 random.c:70 random.c:75 random.c:80 random.c:161 random.c:167
-#: random.c:172 random.c:177 random.c:240 random.c:245 random.c:250
-#: random.c:264 random.c:355
+#: random.c:53 random.c:128 random.c:200 random.c:284
+msgid "NAs produced"
+msgstr ""
+
+#: random.c:60 random.c:66 random.c:72 random.c:90 random.c:161 random.c:242
+#: random.c:376
 #, fuzzy
 msgid "invalid arguments"
 msgstr "ugyldig argumenttype"
 
-#: random.c:95 random.c:121 random.c:194 random.c:222 random.c:270
-#: random.c:289
-msgid "NAs produced"
+#: random.c:310
+msgid "NA in probability vector"
+msgstr ""
+
+#: random.c:312
+msgid "negative probability"
 msgstr ""
 
-#: random.c:308
+#: random.c:318
+msgid "no positive probabilities"
+msgstr ""
+
+#: random.c:330
 #, fuzzy
 msgid "invalid first argument 'n'"
 msgstr "ugyldig argumenttype"
 
-#: random.c:310
+#: random.c:332
 #, fuzzy
 msgid "invalid second argument 'size'"
 msgstr "ugyldig argumenttype"
@@ -806,12 +844,12 @@ msgstr "ugyldig argumenttype"
 msgid "rcont2 [%d,%d]: exp underflow to 0; algorithm failure"
 msgstr ""
 
-#: smooth.c:101
+#: smooth.c:107
 #, c-format
 msgid "invalid end-rule for running median of 3: %d"
 msgstr "ugyldig end-rule for kørende median af 3: %d"
 
-#: starma.c:366
+#: starma.c:364
 #, c-format
 msgid "missing value in last %d observations"
 msgstr "manglende værdi i sidste %d observationer"
diff --git a/src/library/stats/po/de.po b/src/library/stats/po/de.po
index 5080138..b735890 100644
--- a/src/library/stats/po/de.po
+++ b/src/library/stats/po/de.po
@@ -4,13 +4,13 @@
 # Detlef Steuer <steuer at hsu-hh.de>, 2008-2014.
 msgid ""
 msgstr ""
-"Project-Id-Version: R-3.1.0\n"
+"Project-Id-Version: R-3.2.0\n"
 "Report-Msgid-Bugs-To: bugs.r-project.org\n"
-"POT-Creation-Date: 2014-03-27 18:36+0000\n"
-"PO-Revision-Date: 2013-03-11 16:08+0100\n"
+"POT-Creation-Date: 2015-06-06 13:51+0100\n"
+"PO-Revision-Date: 2016-04-07 10:58+0200\n"
 "Last-Translator: Detlef Steuer <steuer at hsu-hh.de>\n"
 "Language-Team: R-core <r-core at r-project.org>\n"
-"Language: \n"
+"Language: de\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
@@ -22,7 +22,7 @@ msgstr "Bandbreite/Spannweite der gleitenden Mediane größer als n"
 
 #: ansari.c:116
 msgid "probabilities outside [0,1] in qansari()"
-msgstr "Wahrscheinlichkeiten außerhalb von [0,1] in qansar()"
+msgstr "Wahrscheinlichkeiten außerhalb von [0,1] in qansari()"
 
 #: approx.c:102
 msgid "approx(): invalid f value"
@@ -40,7 +40,7 @@ msgstr "approx(): Versuch NAs zu interpolieren"
 msgid "invalid argument type"
 msgstr "unzulässiger Argumenttyp"
 
-#: arima.c:444 arima.c:530 pacf.c:331 pacf.c:371
+#: arima.c:444 arima.c:530 pacf.c:327 pacf.c:366
 msgid "can only transform 100 pars in arima0"
 msgstr "kann nur 100 Parameter in arima0 transformieren"
 
@@ -48,6 +48,11 @@ msgstr "kann nur 100 Parameter in arima0 transformieren"
 msgid "maximum supported lag is 350"
 msgstr "maximal unterstützter Lag ist 350"
 
+#: bandwidths.c:121
+#, c-format
+msgid "non-finite x[%d] in bandwidth calculation"
+msgstr "nicht-endliches x[%d] in der Bandbreitenberechnung"
+
 #: complete_cases.c:26
 #, c-format
 msgid "invalid 'type' (%s) of argument"
@@ -98,24 +103,28 @@ msgstr "ungültige Form in unärem minus Check"
 msgid "Function '%s' is not in the derivatives table"
 msgstr "Funktion '%s' ist nicht in der Tabelle der Ableitungen"
 
-#: deriv.c:642
+#: deriv.c:641
+msgid "'expr' must be an expression or call"
+msgstr "'expr' muss eine expression oder ein call sein"
+
+#: deriv.c:644
 msgid "variable must be a character string"
 msgstr "Variable muss eine Zeichenkette sein"
 
-#: deriv.c:644
+#: deriv.c:646
 msgid "only the first element is used as variable name"
 msgstr "nur das erste Element wird als Variablenname genutzt"
 
-#: deriv.c:657
+#: deriv.c:659
 #, c-format
 msgid "invalid expression in '%s'"
 msgstr "ungültiger Ausdruck in '%s'"
 
-#: deriv.c:935 model.c:99
+#: deriv.c:937 model.c:99
 msgid "invalid variable names"
 msgstr "ungültige Variablennamen"
 
-#: deriv.c:944
+#: deriv.c:946
 msgid "invalid tag"
 msgstr "ungültiger tag"
 
@@ -214,7 +223,7 @@ msgstr "'f' muss endlich und > 0 sein"
 
 #: lowess.c:295
 msgid "'iter' must be finite and >= 0"
-msgstr "'iter' muss endlich und >= 0  sein"
+msgstr "'iter' muss endlich und >= 0 sein"
 
 #: lowess.c:298
 msgid "'delta' must be finite and > 0"
@@ -222,15 +231,15 @@ msgstr "'delta' muss endlich und > 0 sein"
 
 #: mAR.c:467
 msgid "Singular matrix in qr_solve"
-msgstr "singläre Matrix in qr_solve"
+msgstr "Singuläre Matrix in qr_solve"
 
 #: mAR.c:510
 msgid "Singular matrix in ldet"
-msgstr "singläre Matrix in ldet"
+msgstr "Singuläre Matrix in ldet"
 
 #: mAR.c:697
 msgid "Invalid vmethod"
-msgstr "unzulässige vmethod"
+msgstr "Unzulässige vmethod"
 
 #: mAR.c:833
 msgid "Burg's algorithm failed to find partial correlation"
@@ -319,7 +328,7 @@ msgstr "Term-Namen werden abgeschnitten"
 
 #: model.c:635
 msgid "complex variables are not currently allowed in model matrices"
-msgstr "Komplexe Variablen sind momentan in Modellmatrizen nicht erlaubt"
+msgstr "komplexe Variablen sind momentan in Modellmatrizen nicht erlaubt"
 
 #: model.c:659
 #, c-format
@@ -353,25 +362,25 @@ msgstr "ungültige Modellformel in ExtractVars"
 #: model.c:1518
 #, c-format
 msgid "duplicated name '%s' in data frame using '.'"
-msgstr "verdoppelter Name '%s' in Data Frame bei Benutzung von '.'"
+msgstr "verdoppelter Name '%s' in Dataframe bei Benutzung von '.'"
 
-#: model.c:1576
+#: model.c:1579
 msgid "invalid model formula in EncodeVars"
 msgstr "ungültige Modellformel in EncodeVars"
 
-#: model.c:1662
+#: model.c:1665
 msgid "argument is not a valid model"
 msgstr "Argument ist kein gültiges Modell"
 
-#: model.c:1672
+#: model.c:1675
 msgid "'specials' must be NULL or a character vector"
-msgstr "'specials' muss NULL oder eine Charaktervektor sein"
+msgstr "'specials' muss NULL oder eine Zeichenkettenvektor sein"
 
-#: model.c:1684
+#: model.c:1687
 msgid "'data' argument is of the wrong type"
 msgstr "Argument 'data' hat falschen Typ"
 
-#: model.c:1952
+#: model.c:1957
 msgid "'.' in formula and no 'data' argument"
 msgstr "'.' erscheint in der Formel und 'data' Argument ist ungültig"
 
@@ -428,7 +437,7 @@ msgstr "konvergiert"
 msgid "'theta' should be of type character"
 msgstr "'theta' sollte vom Typ character sein"
 
-#: nls.c:290 port.c:375
+#: nls.c:290 port.c:376
 msgid "use of NULL environment is defunct"
 msgstr "NULL Umgebung kann nicht genutzt werden"
 
@@ -440,16 +449,16 @@ msgstr "'rho' sollte eine Umgebung sein"
 msgid "'dir' is not a numeric vector of the correct length"
 msgstr "'dir' ist kein numerischer Vektor der richtigen Länge"
 
-#: nls.c:311 nls.c:341
+#: nls.c:311 nls.c:345
 msgid "Missing value or an infinity produced when evaluating the model"
 msgstr "Fehlender Wert oder etwas Unendliches durch das Modell erzeugt"
 
-#: nls.c:318
+#: nls.c:319
 #, c-format
 msgid "variable '%s' is integer, not numeric"
 msgstr "Variable '%s' ist ganzzahlig, nicht numerisch"
 
-#: nls.c:320
+#: nls.c:321
 #, c-format
 msgid "variable '%s' is not numeric"
 msgstr "Variable '%s' ist nicht numerisch"
@@ -496,119 +505,119 @@ msgstr "'ndeps' hat falsche Länge"
 msgid "unknown 'method'"
 msgstr "unbekannte 'method'"
 
-#: optimize.c:217 optimize.c:309 optimize.c:530
+#: optimize.c:220 optimize.c:306 optimize.c:528
 msgid "NA replaced by maximum positive value"
 msgstr "NA durch größte positive Zahl ersetzt"
 
-#: optimize.c:225 optimize.c:321 optimize.c:538
+#: optimize.c:228 optimize.c:318 optimize.c:536
 msgid "NA/Inf replaced by maximum positive value"
 msgstr "NA/Inf durch größte positive Zahl ersetzt"
 
-#: optimize.c:234
+#: optimize.c:237
 msgid "invalid function value in 'optimize'"
 msgstr "ungültiger Funktionswert in 'optimize'"
 
-#: optimize.c:252 optimize.c:350 optimize.c:723
+#: optimize.c:255 optimize.c:347 optimize.c:721
 msgid "attempt to minimize non-function"
 msgstr "Versuch etwas anderes als eine Funktion zu minimieren"
 
-#: optimize.c:259 optimize.c:266 optimize.c:275 optimize.c:355 optimize.c:360
-#: optimize.c:376
+#: optimize.c:262 optimize.c:269 optimize.c:278 optimize.c:352 optimize.c:357
+#: optimize.c:373
 #, c-format
 msgid "invalid '%s' value"
 msgstr "ungültiger '%s' Wert"
 
-#: optimize.c:268 optimize.c:361
+#: optimize.c:271 optimize.c:358
 msgid "'xmin' not less than 'xmax'"
 msgstr "'xmin' ist nicht kleiner als 'xmax'"
 
-#: optimize.c:318
+#: optimize.c:315
 msgid "-Inf replaced by maximally negative value"
 msgstr "-Inf durch maximal negative Zahl ersetzt"
 
-#: optimize.c:331
+#: optimize.c:328
 msgid "invalid function value in 'zeroin'"
 msgstr "ungültiger Funktionswert in 'zeroin'"
 
-#: optimize.c:366 optimize.c:371
+#: optimize.c:363 optimize.c:368
 #, c-format
 msgid "NA value for '%s' is not allowed"
 msgstr "NA Wert für '%s' nicht erlaubt"
 
-#: optimize.c:381
+#: optimize.c:378
 msgid "'maxiter' must be positive"
 msgstr "'maxiter' muss positiv sein"
 
-#: optimize.c:522
+#: optimize.c:520
 msgid "non-finite value supplied by 'nlm'"
 msgstr "nicht-endlicher Wert von 'nlm' angegeben"
 
-#: optimize.c:557
+#: optimize.c:555
 msgid "invalid function value in 'nlm' optimizer"
 msgstr "ungültiger Funktionswert in 'nlm' Optimierung"
 
-#: optimize.c:568 optimize.c:583
+#: optimize.c:566 optimize.c:581
 msgid "function value caching for optimization is seriously confused"
 msgstr ""
 "Funktionswertzwischenspeicher für die Optimierung ernsthaft durcheinander"
 
-#: optimize.c:598
+#: optimize.c:596
 msgid "numeric parameter expected"
 msgstr "numerischer Parameter erwartet"
 
-#: optimize.c:602
+#: optimize.c:600
 msgid "conflicting parameter lengths"
-msgstr "Parameter Längen passen nicht"
+msgstr "Parameterlängen passen nicht"
 
-#: optimize.c:606
+#: optimize.c:604
 msgid "invalid parameter length"
 msgstr "ungültige Parameterlänge"
 
-#: optimize.c:616 optimize.c:623
+#: optimize.c:614 optimize.c:621
 msgid "missing value in parameter"
 msgstr "fehlender Wert in Parameter"
 
-#: optimize.c:628
+#: optimize.c:626
 msgid "invalid parameter type"
 msgstr "ungültiger Parametertyp"
 
-#: optimize.c:639
+#: optimize.c:637
 msgid "non-positive number of parameters in nlm"
 msgstr "nicht-positive Zahl von Parametern in nlm"
 
-#: optimize.c:641
+#: optimize.c:639
 msgid "nlm is inefficient for 1-d problems"
 msgstr "nlm ist für 1-d Probleme ineffizient"
 
-#: optimize.c:643
+#: optimize.c:641
 msgid "invalid gradient tolerance in nlm"
 msgstr "ungültige Gradiententoleranz in nlm"
 
-#: optimize.c:645
+#: optimize.c:643
 msgid "invalid iteration limit in nlm"
 msgstr "ungültiges Iterationslimit in nlm"
 
-#: optimize.c:647
+#: optimize.c:645
 msgid "minimization function has no good digits in nlm"
 msgstr "Minimierungsfunktion hat keine guten Dezimalen in nlm"
 
-#: optimize.c:649
+#: optimize.c:647
 msgid "no analytic gradient to check in nlm!"
 msgstr "kein analytischer Gradient zur Überprüfung in nlm"
 
-#: optimize.c:651
+#: optimize.c:649
 msgid "no analytic Hessian to check in nlm!"
 msgstr "keine analytische Hessematrix zur Überprüfung in nlm"
 
-#: optimize.c:653
+#: optimize.c:651
 msgid "probable coding error in analytic gradient"
 msgstr "wahrscheinlicher Programmierfehler im analytischen Gradienten"
 
-#: optimize.c:655
+#: optimize.c:653
 msgid "probable coding error in analytic Hessian"
 msgstr "wahrscheinlicher Programmierfehler in analytischer Hessematrix"
 
-#: optimize.c:657
+#: optimize.c:655
 #, c-format
 msgid ""
 "*** unknown error message (msg = %d) in nlm()\n"
@@ -617,23 +626,23 @@ msgstr ""
 "*** unbekannte Fehlermeldung (msg = %d) in nlm()\n"
 "*** sollte nicht passieren!"
 
-#: optimize.c:668
+#: optimize.c:666
 msgid "Relative gradient close to zero.\n"
 msgstr "Relativer Gradient nahe Null.\n"
 
-#: optimize.c:669 optimize.c:673
+#: optimize.c:667 optimize.c:671
 msgid "Current iterate is probably solution.\n"
 msgstr "Aktuelle Iteration ist wahrscheinlich Lösung.\n"
 
-#: optimize.c:672
+#: optimize.c:670
 msgid "Successive iterates within tolerance.\n"
 msgstr "Aufeinanderfolgende Iterationen innerhalb der Toleranz.\n"
 
-#: optimize.c:676
+#: optimize.c:674
 msgid "Last global step failed to locate a point lower than x.\n"
 msgstr "Letzter globaler Schritt fand keinen Punkt unterhalb x.\n"
 
-#: optimize.c:677
+#: optimize.c:675
 msgid ""
 "Either x is an approximate local minimum of the function,\n"
 "the function is too non-linear for this algorithm,\n"
@@ -643,11 +652,11 @@ msgstr ""
 "die Funktion ist zu nichtlinear für diesen Algorithmus\n"
 "oder steptol ist zu groß.\n"
 
-#: optimize.c:682
+#: optimize.c:680
 msgid "Iteration limit exceeded.  Algorithm failed.\n"
 msgstr "Iterationslimit überschritten. Algorithmus fehlgeschlagen.\n"
 
-#: optimize.c:685
+#: optimize.c:683
 msgid ""
 "Maximum step size exceeded 5 consecutive times.\n"
 "Either the function is unbounded below,\n"
@@ -661,111 +670,115 @@ msgstr ""
 "von oben in eine Richtung an\n"
 "oder stepmx ist zu klein.\n"
 
-#: optimize.c:747 optimize.c:752 optimize.c:756 optimize.c:760 optimize.c:764
-#: optimize.c:768 optimize.c:773
+#: optimize.c:745 optimize.c:750 optimize.c:754 optimize.c:758 optimize.c:762
+#: optimize.c:766 optimize.c:771
 msgid "invalid NA value in parameter"
-msgstr "ungültige NA Wert in Parameter"
+msgstr "ungültiger NA Wert in Parameter"
 
-#: optimize.c:804
+#: optimize.c:800
 msgid "hessian supplied is of the wrong length or mode, so ignored"
 msgstr ""
 "angegebene Hessematrix hat falsche Länge oder falschen Modus und wird "
 "deshalb ignoriert"
 
-#: optimize.c:808
+#: optimize.c:804
 msgid "gradient supplied is of the wrong length or mode, so ignored"
 msgstr ""
 "angegebener Gradient hat falsche Länge oder falschen Modus und wird deshalb "
 "ignoriert"
 
-#: pacf.c:94
+#: pacf.c:90
 msgid "bad Starma struct"
 msgstr "ungültige Starma Struktur"
 
-#: pacf.c:240
+#: pacf.c:236
 #, c-format
 msgid "starma error code %d"
 msgstr "starma Fehlerkode %d"
 
-#: pacf.c:300
+#: pacf.c:296
 #, c-format
 msgid "forkal error code %d"
 msgstr "forkal Fehlerkode %d"
 
-#: pacf.c:474
+#: pacf.c:469
 msgid "invalid value of lag.max"
 msgstr "unzulässiger Wert von lag.max"
 
 #: port.c:133
 #, c-format
 msgid "Rf_divset: alg = %d must be 1, 2, 3, or 4"
-msgstr "RF_divset: alg = %d muss 1, 2, 3 oder 4 sein"
+msgstr "Rf_divset: alg = %d muss 1, 2, 3 oder 4 sein"
 
-#: port.c:312
+#: port.c:149
+msgid "port algorithms 3 or higher are not supported"
+msgstr "die Port Algorithmen 3 oder höher sind nicht unterstützt"
+
+#: port.c:313
 #, c-format
 msgid "gradient function must return a numeric vector of length %d"
 msgstr ""
 "Gradientenfunktion muss einen numerischen Vektor der Länge %d zurückgeben"
 
-#: port.c:324
+#: port.c:325
 #, c-format
 msgid "Hessian function must return a square numeric matrix of order %d"
 msgstr ""
-"Hessematrixfunktion muss eine quadratische numerische Matrix mit Rang %d "
+"Hessematrix-Funktion muss eine quadratische numerische Matrix mit Rang %d "
 "zurückgeben"
 
-#: port.c:379
+#: port.c:380
 msgid "'rho' must be an environment"
 msgstr "'rho' muss eine Umgebung sein"
 
-#: port.c:381 port.c:542
+#: port.c:382 port.c:546
 msgid "'d' must be a nonempty numeric vector"
 msgstr "'d' muss ein nichtleerer numerischer Vektor sein"
 
-#: port.c:383
+#: port.c:384
 msgid "When Hessian defined must also have gradient defined"
 msgstr ""
 "Wird eine Hesse-Funktion angegeben, so muss auch ein Gradient angegeben "
 "werden"
 
-#: port.c:386
+#: port.c:387
 #, c-format
 msgid "environment 'rho' must contain a numeric vector '.par' of length %d"
 msgstr ""
 "Umgebung 'rho' muss einen numerischen Vektor '.par' der Länge %d enthalten"
 
-#: port.c:400
+#: port.c:401
 msgid "'lower' and 'upper' must be numeric vectors"
 msgstr "'lower' und 'upper' müssen numerische Vektoren sein"
 
-#: port.c:456
+#: port.c:460
 msgid "'getElement' applies only to named lists"
 msgstr "'getElement' nur für benannte Listen anwendbar"
 
-#: port.c:477
+#: port.c:481
 #, c-format
 msgid "%s$%s() not found"
 msgstr "%s$%s() nicht gefunden"
 
-#: port.c:490
+#: port.c:494
 #, c-format
 msgid "'gradient' must be a numeric matrix of dimension (%d,%d)"
 msgstr "'gradient' muss eine numerische Matrix der Dimension (%d,%d) sein"
 
-#: port.c:511
+#: port.c:515
 #, c-format
 msgid "fcn produced mode %d, length %d - wanted mode %d, length %d"
 msgstr "fcn erzeugte Modus %d, Länge %d - gewünscht Modus %d, Länge %d"
 
-#: port.c:524
+#: port.c:528
 msgid "invalid type for eval_check_store"
-msgstr "unzulässiger Typ für eval_check_source"
+msgstr "unzulässiger Typ für eval_check_store"
 
-#: port.c:543
+#: port.c:547
 msgid "m must be a list"
 msgstr "m nuss eine Liste sein"
 
-#: port.c:563
+#: port.c:567
 msgid "'lowerb' and 'upperb' must be numeric vectors"
 msgstr "'lowerb' und 'upperb' muss ein numerischer Vektor sein"
 
@@ -775,28 +788,38 @@ msgstr "Freiheitsgrade und Dimension sind inkonsistent"
 
 #: rWishart.c:84
 msgid "'scal' must be a square, real matrix"
-msgstr "'scal' muss eine quadratische, reelwertige Matrix sein"
+msgstr "'scal' muss eine quadratische, reellwertige Matrix sein"
 
 #: rWishart.c:96
 msgid "'scal' matrix is not positive-definite"
 msgstr "'scal' Matrix ist nicht positiv definit"
 
-#: random.c:66 random.c:70 random.c:75 random.c:80 random.c:161 random.c:167
-#: random.c:172 random.c:177 random.c:240 random.c:245 random.c:250
-#: random.c:264 random.c:355
+#: random.c:53 random.c:128 random.c:200 random.c:284
+msgid "NAs produced"
+msgstr "NAs produziert"
+
+#: random.c:60 random.c:66 random.c:72 random.c:90 random.c:161 random.c:242
+#: random.c:376
 msgid "invalid arguments"
 msgstr "ungültige Argumente"
 
-#: random.c:95 random.c:121 random.c:194 random.c:222 random.c:270
-#: random.c:289
-msgid "NAs produced"
-msgstr "NAs produziert"
+#: random.c:310
+msgid "NA in probability vector"
+msgstr "NA im Wahrscheinlichkeiten-Vektor"
+
+#: random.c:312
+msgid "negative probability"
+msgstr "negative Wahrscheinlichkeiten"
 
-#: random.c:308
+#: random.c:318
+msgid "no positive probabilities"
+msgstr "keine positive Wahrscheinlichkeit"
+
+#: random.c:330
 msgid "invalid first argument 'n'"
 msgstr "ungültiges erstes Argument 'n'"
 
-#: random.c:310
+#: random.c:332
 msgid "invalid second argument 'size'"
 msgstr "ungültiges zweites Argument 'size'"
 
diff --git a/src/library/stats/po/fr.po b/src/library/stats/po/fr.po
index 5327307..9368427 100644
--- a/src/library/stats/po/fr.po
+++ b/src/library/stats/po/fr.po
@@ -6,8 +6,8 @@
 msgid ""
 msgstr ""
 "Project-Id-Version: R 2.12.0\n"
-"Report-Msgid-Bugs-To: bugs.r-project.org\n"
-"POT-Creation-Date: 2014-03-27 18:36+0000\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2016-04-01 10:01-0700\n"
 "PO-Revision-Date: 2014-03-17 10:58+0100\n"
 "Last-Translator: Philippe Grosjean <phgrosjean at sciviews.org>\n"
 "Language-Team: French <R-core at r-project.org>\n"
@@ -18,11 +18,11 @@ msgstr ""
 "Plural-Forms: nplurals=2; plural=(n > 1);\n"
 "X-Generator: Poedit 1.6.4\n"
 
-#: Srunmed.c:55
+#: Srunmed.c:54
 msgid "bandwidth/span of running medians is larger than n"
 msgstr "largeur de fen�tre de m�diane mobile sup�rieure � n"
 
-#: ansari.c:116
+#: ansari.c:118
 msgid "probabilities outside [0,1] in qansari()"
 msgstr "probabilit�s en dehors de [0,1] dans qansari()"
 
@@ -42,7 +42,7 @@ msgstr "approx() : tentative d'interpolation de valeurs NA"
 msgid "invalid argument type"
 msgstr "type d'argument incorrect"
 
-#: arima.c:444 arima.c:530 pacf.c:331 pacf.c:371
+#: arima.c:444 arima.c:530 pacf.c:324 pacf.c:363
 msgid "can only transform 100 pars in arima0"
 msgstr "impossible de transformer plus de 100 pars dans arima0"
 
@@ -50,6 +50,11 @@ msgstr "impossible de transformer plus de 100 pars dans arima0"
 msgid "maximum supported lag is 350"
 msgstr "d�calage maximum support� de 350"
 
+#: bandwidths.c:121
+#, c-format
+msgid "non-finite x[%d] in bandwidth calculation"
+msgstr ""
+
 #: complete_cases.c:26
 #, c-format
 msgid "invalid 'type' (%s) of argument"
@@ -63,31 +68,41 @@ msgstr "aucune entr
 msgid "not all arguments have the same length"
 msgstr "les arguments n'ont pas tous la m�me taille"
 
-#: cov.c:566
+#: cov.c:569
 msgid "missing observations in cov/cor"
 msgstr "observations manquantes dans cov / cor"
 
-#: cov.c:644
+#: cov.c:643
 msgid "'x' is NULL"
 msgstr "'x' est 'NULL'"
 
-#: cov.c:663 cov.c:669
+#: cov.c:645
+#, fuzzy
+msgid "'x' is a factor"
+msgstr "'x' n'est pas une matrice"
+
+#: cov.c:665
+#, fuzzy
+msgid "'y' is a factor"
+msgstr "'fn' n'est pas une fonction"
+
+#: cov.c:673 cov.c:679
 msgid "incompatible dimensions"
 msgstr "dimensions incompatibles"
 
-#: cov.c:688 cov.c:729 cov.c:762
+#: cov.c:698 cov.c:739 cov.c:772
 msgid "no complete element pairs"
 msgstr "paires d'�l�ments incompl�tes"
 
-#: cov.c:701
+#: cov.c:711
 msgid "invalid 'use' (computational method)"
 msgstr "'use' incorrect (m�thode de calcul)"
 
-#: cov.c:704
+#: cov.c:714
 msgid "'x' is empty"
 msgstr "'x' est vide"
 
-#: cov.c:798
+#: cov.c:808
 msgid "the standard deviation is zero"
 msgstr "l'�cart type est nulle"
 
@@ -100,36 +115,40 @@ msgstr "forme incorrecte dans la v
 msgid "Function '%s' is not in the derivatives table"
 msgstr "La fonction '%s' n'est pas dans la table des d�riv�es"
 
-#: deriv.c:642
+#: deriv.c:641
+msgid "'expr' must be an expression or call"
+msgstr ""
+
+#: deriv.c:644
 msgid "variable must be a character string"
 msgstr "la variable doit �tre une cha�ne de caract�res"
 
-#: deriv.c:644
+#: deriv.c:646
 msgid "only the first element is used as variable name"
 msgstr "seulement le premier �l�ment est utilis� comme nom de variable"
 
-#: deriv.c:657
+#: deriv.c:659
 #, c-format
 msgid "invalid expression in '%s'"
 msgstr "expression incorrecte dans '%s'"
 
-#: deriv.c:935 model.c:99
+#: deriv.c:937 model.c:99
 msgid "invalid variable names"
 msgstr "nom de variable incorrect"
 
-#: deriv.c:944
+#: deriv.c:946
 msgid "invalid tag"
 msgstr "marque (tag) incorrecte"
 
-#: distance.c:153
+#: distance.c:152
 msgid "treating non-finite values as NA"
 msgstr "valeurs infinies trait�es comme NA"
 
-#: distance.c:226
+#: distance.c:225
 msgid "distance(): invalid p"
 msgstr "distance() : p incorrect"
 
-#: distance.c:229
+#: distance.c:228
 msgid "distance(): invalid distance"
 msgstr "distance() : distance incorrecte"
 
@@ -141,17 +160,17 @@ msgstr "production de NaN"
 msgid "Non-numeric argument to mathematical function"
 msgstr "Argument non num�rique pour une fonction math�matique"
 
-#: family.c:44
+#: family.c:45
 #, c-format
 msgid "Value %g out of range (0, 1)"
 msgstr "Valeur %g hors de l'intervalle (0, 1)"
 
-#: family.c:65 family.c:79 family.c:97
+#: family.c:66 family.c:80 family.c:98
 #, c-format
 msgid "Argument %s must be a nonempty numeric vector"
 msgstr "L'argument %s doit �tre un vecteur num�rique non vide"
 
-#: family.c:130 family.c:133
+#: family.c:131 family.c:134
 #, c-format
 msgid "argument %s must be a numeric vector of length 1 or length %d"
 msgstr "l'argument %s doit �tre un vecteur num�rique de longueur 1 ou %d"
@@ -176,7 +195,12 @@ msgstr "pas de variables facteur"
 msgid "invalid factors"
 msgstr "variables facteur incorrectes"
 
-#: ksmooth.c:67
+#: integrate.c:84 integrate.c:86 integrate.c:128
+#, fuzzy, c-format
+msgid "'%s' must be of length one"
+msgstr "'m' doit �tre une liste"
+
+#: ksmooth.c:68
 msgid "only 2500 rows are allowed for sm.method=\"spline\""
 msgstr "seulement 2500 lignes autoris�es pour sm.method=\"spline\""
 
@@ -194,7 +218,7 @@ msgstr "les dimensions de 'x' (%d,%d) et de 'y' (%d) ne correspondent pas"
 msgid "NA/NaN/Inf in '%s'"
 msgstr "NA/NaN/Inf dans '%s'"
 
-#: loessc.c:233
+#: loessc.c:240
 msgid "span is too small"
 msgstr "fen�tre trop �troite"
 
@@ -222,19 +246,19 @@ msgstr "'iter' doit 
 msgid "'delta' must be finite and > 0"
 msgstr "'delta' doit �tre fini et > 0"
 
-#: mAR.c:467
+#: mAR.c:470
 msgid "Singular matrix in qr_solve"
 msgstr "Matrice singuli�re dans qr_solve"
 
-#: mAR.c:510
+#: mAR.c:513
 msgid "Singular matrix in ldet"
 msgstr "Matrice singuli�re dans ldet"
 
-#: mAR.c:697
+#: mAR.c:700
 msgid "Invalid vmethod"
 msgstr "vmethod incorrecte"
 
-#: mAR.c:833
+#: mAR.c:836
 msgid "Burg's algorithm failed to find partial correlation"
 msgstr "l'algorithme de Burg n'a pas trouv� la correlation partielle"
 
@@ -273,190 +297,190 @@ msgstr "les longueurs des variables diff
 msgid "invalid result from na.action"
 msgstr "r�sultat incorrect de na.action"
 
-#: model.c:369 model.c:377 optim.c:197
+#: model.c:372 model.c:380 optim.c:197
 #, c-format
 msgid "invalid '%s' argument"
 msgstr "argument '%s' incorrect"
 
-#: model.c:388
+#: model.c:391
 msgid "invalid model frame"
 msgstr "trame de mod�le incorrect"
 
-#: model.c:390
+#: model.c:393
 msgid "do not know how many cases"
 msgstr "nombre de cas inconnu"
 
-#: model.c:414
+#: model.c:417
 #, c-format
 msgid "variable lengths differ (found for variable %d)"
 msgstr "les longueurs des variables diff�rent (trouv� pour la variable %d)"
 
-#: model.c:418 model.c:425
+#: model.c:421 model.c:428
 #, c-format
 msgid "variable %d has no levels"
 msgstr "la variable %d n'a pas de niveaux"
 
-#: model.c:537
+#: model.c:540
 msgid "the response appeared on the right-hand side and was dropped"
 msgstr "la r�ponse est apparue dans le membre de droite et y a �t� �limin�e"
 
-#: model.c:557
+#: model.c:560
 #, c-format
 msgid "term %d would require %.0g columns"
 msgstr "le terme %d n�cessite %.0g colonnes "
 
-#: model.c:561
+#: model.c:564
 #, c-format
 msgid "matrix would require %.0g columns"
 msgstr "la matrice n�cessite %.0g colonnes"
 
-#: model.c:572
+#: model.c:575
 #, c-format
 msgid "problem with term %d in model.matrix: no columns are assigned"
 msgstr ""
 "probl�me avec le terme %d dans model.matrix : aucune colonne n'est assign�e"
 
-#: model.c:621 model.c:626 model.c:632 model.c:643 model.c:649 model.c:655
+#: model.c:624 model.c:629 model.c:635 model.c:646 model.c:652 model.c:658
 msgid "term names will be truncated"
 msgstr "les noms des termes seront tronqu�s"
 
-#: model.c:635
+#: model.c:638
 msgid "complex variables are not currently allowed in model matrices"
 msgstr ""
 "des variables complexes ne sont pas encore accept�es dans les matrices de "
 "mod�le"
 
-#: model.c:659
+#: model.c:662
 #, c-format
 msgid "variables of type '%s' are not allowed in model matrices"
 msgstr ""
 "les variables de type '%s' ne sont pas autoris�es dans des matrices de mod�le"
 
-#: model.c:881
+#: model.c:884
 msgid "invalid formula in 'update'"
 msgstr "formule de mod�le incorrecte dans 'update'"
 
-#: model.c:915
+#: model.c:918
 msgid "formula expected"
 msgstr "formule de mod�le attendue"
 
-#: model.c:1046
+#: model.c:1049
 msgid "invalid term in model formula"
 msgstr "terme incorrect dans une formule de mod�le"
 
-#: model.c:1121
+#: model.c:1124
 msgid "invalid model formula"
 msgstr "formule de mod�le incorrecte"
 
-#: model.c:1147 model.c:1395
+#: model.c:1150 model.c:1410
 msgid "invalid power in formula"
 msgstr "puissance incorrecte dans une formule de mod�le"
 
-#: model.c:1183
+#: model.c:1186
 msgid "invalid model formula in ExtractVars"
 msgstr "formule de mod�le incorrecte dans ExtractVars"
 
-#: model.c:1518
+#: model.c:1533
 #, c-format
 msgid "duplicated name '%s' in data frame using '.'"
 msgstr "nom dupliqu� '%s' dans le data frame utilisant '.'"
 
-#: model.c:1576
+#: model.c:1594
 msgid "invalid model formula in EncodeVars"
 msgstr "formule de mod�le incorrecte dans EncodeVars"
 
-#: model.c:1662
+#: model.c:1680
 msgid "argument is not a valid model"
 msgstr "l'argument n'est pas un mod�le correct"
 
-#: model.c:1672
+#: model.c:1690
 msgid "'specials' must be NULL or a character vector"
 msgstr "'specials' doit �tre NULL ou un vecteur de cha�ne de caract�res"
 
-#: model.c:1684
+#: model.c:1702
 msgid "'data' argument is of the wrong type"
 msgstr "l'argument 'data' est d'un mauvais type"
 
-#: model.c:1952
+#: model.c:1972
 msgid "'.' in formula and no 'data' argument"
 msgstr "'.' dans la formule et pas d'argument 'data'"
 
-#: monoSpl.c:34
+#: monoSpl.c:36
 msgid "n must be at least two"
 msgstr "n doit valoir deux ou plus"
 
-#: monoSpl.c:67
+#: monoSpl.c:69
 msgid "Argument m must be numeric"
 msgstr "L'argument m doit �tre num�rique"
 
-#: monoSpl.c:70
+#: monoSpl.c:72
 msgid "length(m) must be at least two"
 msgstr "length(m) doit valoir deux ou plus"
 
-#: monoSpl.c:72
+#: monoSpl.c:74
 msgid "Argument Sx must be numeric vector one shorter than m[]"
 msgstr ""
 "L'argument Sx doit �tre un vecteur num�rique plus court que m[] d'un �l�ment"
 
-#: nls.c:97
+#: nls.c:99
 msgid "'control' must be a list"
 msgstr "'control' doit �tre une liste"
 
-#: nls.c:99
+#: nls.c:101
 msgid "'m' must be a list"
 msgstr "'m' doit �tre une liste"
 
-#: nls.c:105 nls.c:110 nls.c:115 nls.c:120 nls.c:125 nls.c:166 nls.c:171
-#: nls.c:176 nls.c:181 nls.c:186 nls.c:191
+#: nls.c:107 nls.c:112 nls.c:117 nls.c:122 nls.c:127 nls.c:168 nls.c:173
+#: nls.c:178 nls.c:183 nls.c:188 nls.c:193
 #, c-format
 msgid "'%s' absent"
 msgstr "'%s' absent"
 
-#: nls.c:232
+#: nls.c:234
 msgid "singular gradient"
 msgstr "gradient singulier"
 
-#: nls.c:253
+#: nls.c:255
 #, c-format
 msgid "step factor %g reduced below 'minFactor' of %g"
 msgstr "le pas %g est devenu inf�rieur � 'minFactor' de %g"
 
-#: nls.c:262
+#: nls.c:264
 #, c-format
 msgid "number of iterations exceeded maximum of %d"
 msgstr "le nombre d'it�rations a d�pass� le maximum de %d"
 
-#: nls.c:267
+#: nls.c:269
 msgid "converged"
 msgstr "convergence obtenue"
 
-#: nls.c:288
+#: nls.c:290
 msgid "'theta' should be of type character"
 msgstr "'theta' doit �tre de type caract�re"
 
-#: nls.c:290 port.c:375
+#: nls.c:292 port.c:376
 msgid "use of NULL environment is defunct"
 msgstr "l'utilisation de l'environnement NULL n'est plus autoris�e"
 
-#: nls.c:294
+#: nls.c:296
 msgid "'rho' should be an environment"
 msgstr "'rho' doit �tre un environnement"
 
-#: nls.c:297
+#: nls.c:299
 msgid "'dir' is not a numeric vector of the correct length"
 msgstr "'dir' n'est pas un vecteur num�rique de longueur correcte"
 
-#: nls.c:311 nls.c:341
+#: nls.c:313 nls.c:347
 msgid "Missing value or an infinity produced when evaluating the model"
 msgstr "Valeur manquante ou infinie obtenue au cours du calcul du mod�le"
 
-#: nls.c:318
+#: nls.c:321
 #, c-format
 msgid "variable '%s' is integer, not numeric"
 msgstr ""
 "la variable '%s' est une valeur enti�re, non un nombre � virgule flottante"
 
-#: nls.c:320
+#: nls.c:323
 #, c-format
 msgid "variable '%s' is not numeric"
 msgstr "la variable '%s' n'est pas num�rique"
@@ -505,119 +529,119 @@ msgstr "'ndeps' est de la mauvaise longueur"
 msgid "unknown 'method'"
 msgstr "'method' inconnue"
 
-#: optimize.c:217 optimize.c:309 optimize.c:530
+#: optimize.c:220 optimize.c:306 optimize.c:528
 msgid "NA replaced by maximum positive value"
 msgstr "NA remplac� par la valeur maximale positive"
 
-#: optimize.c:225 optimize.c:321 optimize.c:538
+#: optimize.c:228 optimize.c:318 optimize.c:536
 msgid "NA/Inf replaced by maximum positive value"
 msgstr "NA / Inf remplac� par la valeur maximale positive"
 
-#: optimize.c:234
+#: optimize.c:237
 msgid "invalid function value in 'optimize'"
 msgstr "valeur de fonction incorrecte dans 'optimize'"
 
-#: optimize.c:252 optimize.c:350 optimize.c:723
+#: optimize.c:255 optimize.c:347 optimize.c:721
 msgid "attempt to minimize non-function"
 msgstr "tentative de minimisation d'un objet qui n'est pas une fonction"
 
-#: optimize.c:259 optimize.c:266 optimize.c:275 optimize.c:355 optimize.c:360
-#: optimize.c:376
+#: optimize.c:262 optimize.c:269 optimize.c:278 optimize.c:352 optimize.c:357
+#: optimize.c:373
 #, c-format
 msgid "invalid '%s' value"
 msgstr "valeur '%s' incorrecte"
 
-#: optimize.c:268 optimize.c:361
+#: optimize.c:271 optimize.c:358
 msgid "'xmin' not less than 'xmax'"
 msgstr "'xmin' n'est pas plus petit que 'xmax'"
 
-#: optimize.c:318
+#: optimize.c:315
 msgid "-Inf replaced by maximally negative value"
 msgstr "-Inf remplac� par la valeur n�gative la plus large possible"
 
-#: optimize.c:331
+#: optimize.c:328
 msgid "invalid function value in 'zeroin'"
 msgstr "valeur de fonction incorrecte dans 'zeroin'"
 
-#: optimize.c:366 optimize.c:371
+#: optimize.c:363 optimize.c:368
 #, c-format
 msgid "NA value for '%s' is not allowed"
 msgstr "une valeur NA n'est pas autoris�e pour '%s'"
 
-#: optimize.c:381
+#: optimize.c:378
 msgid "'maxiter' must be positive"
 msgstr "'maxiter' doit �tre positif"
 
-#: optimize.c:522
+#: optimize.c:520
 msgid "non-finite value supplied by 'nlm'"
 msgstr "valeur non finie fournie par 'nlm'"
 
-#: optimize.c:557
+#: optimize.c:555
 msgid "invalid function value in 'nlm' optimizer"
 msgstr "valeur de fonction incorrecte dnas l'optimisateur 'nlm'"
 
-#: optimize.c:568 optimize.c:583
+#: optimize.c:566 optimize.c:581
 msgid "function value caching for optimization is seriously confused"
 msgstr ""
 "le cache de valeur de fonction pour l'optimisation est s�rieusement perturb�"
 
-#: optimize.c:598
+#: optimize.c:596
 msgid "numeric parameter expected"
 msgstr "param�tre num�rique attendu"
 
-#: optimize.c:602
+#: optimize.c:600
 msgid "conflicting parameter lengths"
 msgstr "conflit de tailles de param�tres"
 
-#: optimize.c:606
+#: optimize.c:604
 msgid "invalid parameter length"
 msgstr "taille de param�tre incorrecte"
 
-#: optimize.c:616 optimize.c:623
+#: optimize.c:614 optimize.c:621
 msgid "missing value in parameter"
 msgstr "valeur manquante dans le param�tre"
 
-#: optimize.c:628
+#: optimize.c:626
 msgid "invalid parameter type"
 msgstr "type incorrect de param�tre"
 
-#: optimize.c:639
+#: optimize.c:637
 msgid "non-positive number of parameters in nlm"
 msgstr "nombre de param�tres nul ou n�gatif dans nlm"
 
-#: optimize.c:641
+#: optimize.c:639
 msgid "nlm is inefficient for 1-d problems"
 msgstr "nlm est inefficace pour les probl�mes 1-d"
 
-#: optimize.c:643
+#: optimize.c:641
 msgid "invalid gradient tolerance in nlm"
 msgstr "tol�rance de gradient incorrecte dans nlm"
 
-#: optimize.c:645
+#: optimize.c:643
 msgid "invalid iteration limit in nlm"
 msgstr "limite d'it�ration incorrecte dans nlm"
 
-#: optimize.c:647
+#: optimize.c:645
 msgid "minimization function has no good digits in nlm"
 msgstr "la fonction de minimisation n'a pas des nombres acceptables dans nlm"
 
-#: optimize.c:649
+#: optimize.c:647
 msgid "no analytic gradient to check in nlm!"
 msgstr "pas de gradient analytique � v�rifier dans nlm !"
 
-#: optimize.c:651
+#: optimize.c:649
 msgid "no analytic Hessian to check in nlm!"
 msgstr "pas de Hessien analytique � v�rifier dans nl m!"
 
-#: optimize.c:653
+#: optimize.c:651
 msgid "probable coding error in analytic gradient"
 msgstr "erreur d'encodage probable dans le gradient analytique"
 
-#: optimize.c:655
+#: optimize.c:653
 msgid "probable coding error in analytic Hessian"
 msgstr "erreur d'encodage probable dans le Hessien analytique"
 
-#: optimize.c:657
+#: optimize.c:655
 #, c-format
 msgid ""
 "*** unknown error message (msg = %d) in nlm()\n"
@@ -626,23 +650,23 @@ msgstr ""
 "*** message d'erreur inconnu (msg = %d) dans nlm()\n"
 "*** ne devrait pas se produire !"
 
-#: optimize.c:668
+#: optimize.c:666
 msgid "Relative gradient close to zero.\n"
 msgstr "Gradient relatif proche de z�ro.\n"
 
-#: optimize.c:669 optimize.c:673
+#: optimize.c:667 optimize.c:671
 msgid "Current iterate is probably solution.\n"
 msgstr "L'it�ration courante est probablement la solution.\n"
 
-#: optimize.c:672
+#: optimize.c:670
 msgid "Successive iterates within tolerance.\n"
 msgstr "It�ration successsives � l'int�rieur du seuil de tol�rance.\n"
 
-#: optimize.c:676
+#: optimize.c:674
 msgid "Last global step failed to locate a point lower than x.\n"
 msgstr "Le dernier pas global n'a pas pu localiser un point plus bas que x.\n"
 
-#: optimize.c:677
+#: optimize.c:675
 msgid ""
 "Either x is an approximate local minimum of the function,\n"
 "the function is too non-linear for this algorithm,\n"
@@ -652,11 +676,11 @@ msgstr ""
 "soit la fonction est par trop non lin�aire pour cet algorithme,\n"
 "soit steptol est trop large.\n"
 
-#: optimize.c:682
+#: optimize.c:680
 msgid "Iteration limit exceeded.  Algorithm failed.\n"
 msgstr "Limite d'it�rations d�pass�. L'algorithme a �chou�.\n"
 
-#: optimize.c:685
+#: optimize.c:683
 msgid ""
 "Maximum step size exceeded 5 consecutive times.\n"
 "Either the function is unbounded below,\n"
@@ -670,34 +694,34 @@ msgstr ""
 "vers le haut dans une direction,\n"
 "soit stepmx est trop petit.\n"
 
-#: optimize.c:747 optimize.c:752 optimize.c:756 optimize.c:760 optimize.c:764
-#: optimize.c:768 optimize.c:773
+#: optimize.c:745 optimize.c:750 optimize.c:754 optimize.c:758 optimize.c:762
+#: optimize.c:766 optimize.c:771
 msgid "invalid NA value in parameter"
 msgstr "valeur NA incorrecte dans le param�tre"
 
-#: optimize.c:804
+#: optimize.c:800
 msgid "hessian supplied is of the wrong length or mode, so ignored"
 msgstr "le Hessien fourni est de la mauvaise longueur ou mode, et est ignor�"
 
-#: optimize.c:808
+#: optimize.c:804
 msgid "gradient supplied is of the wrong length or mode, so ignored"
 msgstr "le gradient fourni est de mauvaise longueur ou mode, et est ignor�"
 
-#: pacf.c:94
+#: pacf.c:87
 msgid "bad Starma struct"
 msgstr "Starma struct incorrecte"
 
-#: pacf.c:240
+#: pacf.c:233
 #, c-format
 msgid "starma error code %d"
 msgstr "code d'erreur starma %d"
 
-#: pacf.c:300
+#: pacf.c:293
 #, c-format
 msgid "forkal error code %d"
 msgstr "code d'erreur forkal %d"
 
-#: pacf.c:474
+#: pacf.c:466
 msgid "invalid value of lag.max"
 msgstr "valeur incorrecte de 'lag.max'"
 
@@ -706,102 +730,116 @@ msgstr "valeur incorrecte de 'lag.max'"
 msgid "Rf_divset: alg = %d must be 1, 2, 3, or 4"
 msgstr "Rf_divset : alg = %d doit �tre 1, 2, 3, ou 4"
 
-#: port.c:312
+#: port.c:149
+msgid "port algorithms 3 or higher are not supported"
+msgstr ""
+
+#: port.c:313
 #, c-format
 msgid "gradient function must return a numeric vector of length %d"
 msgstr ""
 "la fonction de gradient doit renvoyer un vecteur num�rique de longueur %d"
 
-#: port.c:324
+#: port.c:325
 #, c-format
 msgid "Hessian function must return a square numeric matrix of order %d"
 msgstr ""
 "la function Hessian doit renvoyer une matrice carr�e num�rique d'ordre %d"
 
-#: port.c:379
+#: port.c:380
 msgid "'rho' must be an environment"
 msgstr "'rho' doit �tre un environnement"
 
-#: port.c:381 port.c:542
+#: port.c:382 port.c:548
 msgid "'d' must be a nonempty numeric vector"
 msgstr "'d' doit �tre un vecteur num�rique non vide"
 
-#: port.c:383
+#: port.c:384
 msgid "When Hessian defined must also have gradient defined"
 msgstr "Qaund Hessian est d�fini, un gradient doit l'�tre aussi"
 
-#: port.c:386
+#: port.c:387
 #, c-format
 msgid "environment 'rho' must contain a numeric vector '.par' of length %d"
 msgstr ""
 "l'environnement 'rho' doit contenir un vecteur num�rique '.par' de longueur "
 "%d"
 
-#: port.c:400
+#: port.c:401
 msgid "'lower' and 'upper' must be numeric vectors"
 msgstr "'lower' et 'upper' doivent tous deux �tre des vecteurs num�riques"
 
-#: port.c:456
+#: port.c:460
 msgid "'getElement' applies only to named lists"
 msgstr "'getElement' n'est applicable que pour des listes nomm�es"
 
-#: port.c:477
+#: port.c:481
 #, c-format
 msgid "%s$%s() not found"
 msgstr "%s$%s() introuvable"
 
-#: port.c:490
+#: port.c:494
 #, c-format
 msgid "'gradient' must be a numeric matrix of dimension (%d,%d)"
 msgstr "'gradient' doit �tre une matrice num�rique de dimension (%d, %d)"
 
-#: port.c:511
+#: port.c:515
 #, c-format
 msgid "fcn produced mode %d, length %d - wanted mode %d, length %d"
 msgstr ""
 "'fcn' a produit un mode %d de longueur %d - il fallait un mode %d de "
 "longueur %d"
 
-#: port.c:524
+#: port.c:528
 msgid "invalid type for eval_check_store"
 msgstr "type incorrect pour 'eval_check_store'"
 
-#: port.c:543
+#: port.c:549
 msgid "m must be a list"
 msgstr "'m' doit �tre une liste"
 
-#: port.c:563
+#: port.c:569
 msgid "'lowerb' and 'upperb' must be numeric vectors"
 msgstr "'lowerb' et 'upperb' doivent tous deux �tre des vecteurs num�riques"
 
-#: rWishart.c:51
+#: rWishart.c:53
 msgid "inconsistent degrees of freedom and dimension"
 msgstr "degr�s de libert�s et dimension incoh�rents"
 
-#: rWishart.c:84
+#: rWishart.c:86
 msgid "'scal' must be a square, real matrix"
 msgstr "'scal' doit �tre une matrice carr�e de r�els"
 
-#: rWishart.c:96
+#: rWishart.c:98
 msgid "'scal' matrix is not positive-definite"
 msgstr "la matrice 'scal' n'est pas d�finie et positive"
 
-#: random.c:66 random.c:70 random.c:75 random.c:80 random.c:161 random.c:167
-#: random.c:172 random.c:177 random.c:240 random.c:245 random.c:250
-#: random.c:264 random.c:355
+#: random.c:53 random.c:128 random.c:200 random.c:284
+msgid "NAs produced"
+msgstr "production de NAs"
+
+#: random.c:60 random.c:66 random.c:72 random.c:90 random.c:161 random.c:242
+#: random.c:376
 msgid "invalid arguments"
 msgstr "arguments incorrects"
 
-#: random.c:95 random.c:121 random.c:194 random.c:222 random.c:270
-#: random.c:289
-msgid "NAs produced"
-msgstr "production de NAs"
+#: random.c:310
+msgid "NA in probability vector"
+msgstr ""
+
+#: random.c:312
+msgid "negative probability"
+msgstr ""
 
-#: random.c:308
+#: random.c:318
+msgid "no positive probabilities"
+msgstr ""
+
+#: random.c:330
 msgid "invalid first argument 'n'"
 msgstr "premier argument 'n' incorrect"
 
-#: random.c:310
+#: random.c:332
 msgid "invalid second argument 'size'"
 msgstr "second argument 'size' incorrect"
 
@@ -812,12 +850,12 @@ msgstr ""
 "rcont2 [%d,%d]: exp provoque un d�passement m�moire vers le bas � 0; "
 "l'algorithme a �chou�"
 
-#: smooth.c:101
+#: smooth.c:107
 #, c-format
 msgid "invalid end-rule for running median of 3: %d"
 msgstr "r�gle finale incorrecte pour une m�diane mobile de 3 : %d"
 
-#: starma.c:366
+#: starma.c:364
 #, c-format
 msgid "missing value in last %d observations"
 msgstr "valeur manquante dans les %d derni�res observations"
diff --git a/src/library/stats/po/it.po b/src/library/stats/po/it.po
index e2b1caf..fc9c987 100644
--- a/src/library/stats/po/it.po
+++ b/src/library/stats/po/it.po
@@ -6,8 +6,8 @@
 msgid ""
 msgstr ""
 "Project-Id-Version: R 2.1.0\n"
-"Report-Msgid-Bugs-To: bugs.r-project.org\n"
-"POT-Creation-Date: 2014-03-27 18:36+0000\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2016-04-01 10:01-0700\n"
 "PO-Revision-Date: 2005-04-14 18:06+0200\n"
 "Last-Translator: stefano iacus <stefano.iacus at r-project.org>\n"
 "Language-Team: Italian <it at li.org>\n"
@@ -17,11 +17,11 @@ msgstr ""
 "Content-Transfer-Encoding: 8bit\n"
 "Plural-Forms: nplurals=2; plural=(n != 1);\n"
 
-#: Srunmed.c:55
+#: Srunmed.c:54
 msgid "bandwidth/span of running medians is larger than n"
 msgstr "ampiezza/copertura mediane più grande di n"
 
-#: ansari.c:116
+#: ansari.c:118
 msgid "probabilities outside [0,1] in qansari()"
 msgstr "probabilità esterne a [0,1] in qansari()"
 
@@ -41,7 +41,7 @@ msgstr ""
 msgid "invalid argument type"
 msgstr "tipo argomento non valido"
 
-#: arima.c:444 arima.c:530 pacf.c:331 pacf.c:371
+#: arima.c:444 arima.c:530 pacf.c:324 pacf.c:363
 msgid "can only transform 100 pars in arima0"
 msgstr "posso trasformare al più 100 parametri in arima0"
 
@@ -49,6 +49,11 @@ msgstr "posso trasformare al più 100 parametri in arima0"
 msgid "maximum supported lag is 350"
 msgstr ""
 
+#: bandwidths.c:121
+#, c-format
+msgid "non-finite x[%d] in bandwidth calculation"
+msgstr ""
+
 #: complete_cases.c:26
 #, fuzzy, c-format
 msgid "invalid 'type' (%s) of argument"
@@ -62,32 +67,42 @@ msgstr ""
 msgid "not all arguments have the same length"
 msgstr "non tutti gli argomenti hanno la stessa lunghezza"
 
-#: cov.c:566
+#: cov.c:569
 msgid "missing observations in cov/cor"
 msgstr "osservazioni mancanti in cov/cor"
 
-#: cov.c:644
+#: cov.c:643
 #, fuzzy
 msgid "'x' is NULL"
 msgstr "'x' è vuoto"
 
-#: cov.c:663 cov.c:669
+#: cov.c:645
+#, fuzzy
+msgid "'x' is a factor"
+msgstr "'tmax' non è un intero"
+
+#: cov.c:665
+#, fuzzy
+msgid "'y' is a factor"
+msgstr "'fn' non è una funzione"
+
+#: cov.c:673 cov.c:679
 msgid "incompatible dimensions"
 msgstr "dimensioni incompatibili"
 
-#: cov.c:688 cov.c:729 cov.c:762
+#: cov.c:698 cov.c:739 cov.c:772
 msgid "no complete element pairs"
 msgstr ""
 
-#: cov.c:701
+#: cov.c:711
 msgid "invalid 'use' (computational method)"
 msgstr "'use' non valido (metodo computazionale)"
 
-#: cov.c:704
+#: cov.c:714
 msgid "'x' is empty"
 msgstr "'x' è vuoto"
 
-#: cov.c:798
+#: cov.c:808
 msgid "the standard deviation is zero"
 msgstr "la deviazione standard è zero"
 
@@ -100,36 +115,40 @@ msgstr ""
 msgid "Function '%s' is not in the derivatives table"
 msgstr "Funzione '%s' non presente nelle tavole delle derivate"
 
-#: deriv.c:642
+#: deriv.c:641
+msgid "'expr' must be an expression or call"
+msgstr ""
+
+#: deriv.c:644
 msgid "variable must be a character string"
 msgstr "la variabile deve essere una stringa character"
 
-#: deriv.c:644
+#: deriv.c:646
 msgid "only the first element is used as variable name"
 msgstr "solo il primo elemento è utilizzato come nome di variabile"
 
-#: deriv.c:657
+#: deriv.c:659
 #, fuzzy, c-format
 msgid "invalid expression in '%s'"
 msgstr "espressione non valida in \"%s\""
 
-#: deriv.c:935 model.c:99
+#: deriv.c:937 model.c:99
 msgid "invalid variable names"
 msgstr "nomi variabili non validi"
 
-#: deriv.c:944
+#: deriv.c:946
 msgid "invalid tag"
 msgstr "'tag' non valido"
 
-#: distance.c:153
+#: distance.c:152
 msgid "treating non-finite values as NA"
 msgstr ""
 
-#: distance.c:226
+#: distance.c:225
 msgid "distance(): invalid p"
 msgstr "distance(): p non valido"
 
-#: distance.c:229
+#: distance.c:228
 msgid "distance(): invalid distance"
 msgstr "distance(): distanza non valida"
 
@@ -141,17 +160,17 @@ msgstr "Si è prodotto un NaN"
 msgid "Non-numeric argument to mathematical function"
 msgstr "Argomento non numerico in una funzione matematica"
 
-#: family.c:44
+#: family.c:45
 #, c-format
 msgid "Value %g out of range (0, 1)"
 msgstr ""
 
-#: family.c:65 family.c:79 family.c:97
+#: family.c:66 family.c:80 family.c:98
 #, c-format
 msgid "Argument %s must be a nonempty numeric vector"
 msgstr ""
 
-#: family.c:130 family.c:133
+#: family.c:131 family.c:134
 #, c-format
 msgid "argument %s must be a numeric vector of length 1 or length %d"
 msgstr ""
@@ -176,7 +195,12 @@ msgstr "nessuna variabile di tipo factor"
 msgid "invalid factors"
 msgstr "fattori non validi"
 
-#: ksmooth.c:67
+#: integrate.c:84 integrate.c:86 integrate.c:128
+#, fuzzy, c-format
+msgid "'%s' must be of length one"
+msgstr "'m' deve essere di tipo list"
+
+#: ksmooth.c:68
 msgid "only 2500 rows are allowed for sm.method=\"spline\""
 msgstr "sm.method=\"spline\" permette solo 2500 righe"
 
@@ -195,7 +219,7 @@ msgstr ""
 msgid "NA/NaN/Inf in '%s'"
 msgstr ""
 
-#: loessc.c:233
+#: loessc.c:240
 msgid "span is too small"
 msgstr "ampiezza troppo piccola"
 
@@ -224,19 +248,19 @@ msgstr "'maxiter' deve essere positivo"
 msgid "'delta' must be finite and > 0"
 msgstr ""
 
-#: mAR.c:467
+#: mAR.c:470
 msgid "Singular matrix in qr_solve"
 msgstr "Matrice singolare in qr_solve"
 
-#: mAR.c:510
+#: mAR.c:513
 msgid "Singular matrix in ldet"
 msgstr "Matrice singolare in ldet"
 
-#: mAR.c:697
+#: mAR.c:700
 msgid "Invalid vmethod"
 msgstr "metodo non valido"
 
-#: mAR.c:833
+#: mAR.c:836
 msgid "Burg's algorithm failed to find partial correlation"
 msgstr "l'alrgoritmo di Burg non è riuscito a trovare correlazione parziale"
 
@@ -275,190 +299,190 @@ msgstr "la lunghezza delle variabili differisce"
 msgid "invalid result from na.action"
 msgstr "risultato non valido da na.action"
 
-#: model.c:369 model.c:377 optim.c:197
+#: model.c:372 model.c:380 optim.c:197
 #, c-format
 msgid "invalid '%s' argument"
 msgstr "argomento '%s' non valido"
 
-#: model.c:388
+#: model.c:391
 msgid "invalid model frame"
 msgstr "frame modello non valido"
 
-#: model.c:390
+#: model.c:393
 msgid "do not know how many cases"
 msgstr "numero di casi sconosciuto"
 
-#: model.c:414
+#: model.c:417
 #, fuzzy, c-format
 msgid "variable lengths differ (found for variable %d)"
 msgstr "la lunghezza delle variabili differisce"
 
-#: model.c:418 model.c:425
+#: model.c:421 model.c:428
 #, c-format
 msgid "variable %d has no levels"
 msgstr "la variabile %d non ha livelli"
 
-#: model.c:537
+#: model.c:540
 msgid "the response appeared on the right-hand side and was dropped"
 msgstr ""
 "la variabile risposta appare anche nel membro di destra ed è stata eliminata"
 
-#: model.c:557
+#: model.c:560
 #, c-format
 msgid "term %d would require %.0g columns"
 msgstr ""
 
-#: model.c:561
+#: model.c:564
 #, c-format
 msgid "matrix would require %.0g columns"
 msgstr ""
 
-#: model.c:572
+#: model.c:575
 #, c-format
 msgid "problem with term %d in model.matrix: no columns are assigned"
 msgstr "problema nel termine %d in model.matrix: nessuna colonna assegnata"
 
-#: model.c:621 model.c:626 model.c:632 model.c:643 model.c:649 model.c:655
+#: model.c:624 model.c:629 model.c:635 model.c:646 model.c:652 model.c:658
 msgid "term names will be truncated"
 msgstr "i nomi dei termini saranno troncati"
 
-#: model.c:635
+#: model.c:638
 msgid "complex variables are not currently allowed in model matrices"
 msgstr ""
 
-#: model.c:659
+#: model.c:662
 #, fuzzy, c-format
 msgid "variables of type '%s' are not allowed in model matrices"
 msgstr "valori negativi non ammessi come indici di matrice"
 
-#: model.c:881
+#: model.c:884
 msgid "invalid formula in 'update'"
 msgstr "formula non valida in 'update'"
 
-#: model.c:915
+#: model.c:918
 msgid "formula expected"
 msgstr "necessaria formula"
 
-#: model.c:1046
+#: model.c:1049
 #, fuzzy
 msgid "invalid term in model formula"
 msgstr "valore di lag.max non valido"
 
-#: model.c:1121
+#: model.c:1124
 msgid "invalid model formula"
 msgstr "formula modello non valida"
 
-#: model.c:1147 model.c:1395
+#: model.c:1150 model.c:1410
 msgid "invalid power in formula"
 msgstr "potenza non valida nella formula"
 
-#: model.c:1183
+#: model.c:1186
 msgid "invalid model formula in ExtractVars"
 msgstr "formula modello non valida in ExtractVars"
 
-#: model.c:1518
+#: model.c:1533
 #, c-format
 msgid "duplicated name '%s' in data frame using '.'"
 msgstr "duplicazione nome '%s' nel data frame nell'usare '.'"
 
-#: model.c:1576
+#: model.c:1594
 msgid "invalid model formula in EncodeVars"
 msgstr "formula modello non valida in EncodeVars"
 
-#: model.c:1662
+#: model.c:1680
 msgid "argument is not a valid model"
 msgstr "l'argomento non è un modello valido"
 
-#: model.c:1672
+#: model.c:1690
 #, fuzzy
 msgid "'specials' must be NULL or a character vector"
 msgstr "'path' deve essere un vettore di tipo character"
 
-#: model.c:1684
+#: model.c:1702
 msgid "'data' argument is of the wrong type"
 msgstr "l'argomento 'data' è di tipo sbagliato"
 
-#: model.c:1952
+#: model.c:1972
 msgid "'.' in formula and no 'data' argument"
 msgstr "nella formula c'è il '.' ma nessun argomento 'data'"
 
-#: monoSpl.c:34
+#: monoSpl.c:36
 #, fuzzy
 msgid "n must be at least two"
 msgstr "m deve essere di tipo list"
 
-#: monoSpl.c:67
+#: monoSpl.c:69
 #, fuzzy
 msgid "Argument m must be numeric"
 msgstr "'x' deve essere di tipo numeric"
 
-#: monoSpl.c:70
+#: monoSpl.c:72
 #, fuzzy
 msgid "length(m) must be at least two"
 msgstr "m deve essere di tipo list"
 
-#: monoSpl.c:72
+#: monoSpl.c:74
 msgid "Argument Sx must be numeric vector one shorter than m[]"
 msgstr ""
 
-#: nls.c:97
+#: nls.c:99
 msgid "'control' must be a list"
 msgstr "'control' deve essere di tipo list"
 
-#: nls.c:99
+#: nls.c:101
 msgid "'m' must be a list"
 msgstr "'m' deve essere di tipo list"
 
-#: nls.c:105 nls.c:110 nls.c:115 nls.c:120 nls.c:125 nls.c:166 nls.c:171
-#: nls.c:176 nls.c:181 nls.c:186 nls.c:191
+#: nls.c:107 nls.c:112 nls.c:117 nls.c:122 nls.c:127 nls.c:168 nls.c:173
+#: nls.c:178 nls.c:183 nls.c:188 nls.c:193
 #, c-format
 msgid "'%s' absent"
 msgstr "'%s' assente"
 
-#: nls.c:232
+#: nls.c:234
 msgid "singular gradient"
 msgstr "gradiente singolare"
 
-#: nls.c:253
+#: nls.c:255
 #, c-format
 msgid "step factor %g reduced below 'minFactor' of %g"
 msgstr "fattore di incremento %g sotto 'minFactor' %g"
 
-#: nls.c:262
+#: nls.c:264
 #, c-format
 msgid "number of iterations exceeded maximum of %d"
 msgstr "il numero di iterazioni ha superato il massimo di %d"
 
-#: nls.c:267
+#: nls.c:269
 msgid "converged"
 msgstr ""
 
-#: nls.c:288
+#: nls.c:290
 msgid "'theta' should be of type character"
 msgstr "'theta' deve essere di tipo character"
 
-#: nls.c:290 port.c:375
+#: nls.c:292 port.c:376
 msgid "use of NULL environment is defunct"
 msgstr ""
 
-#: nls.c:294
+#: nls.c:296
 msgid "'rho' should be an environment"
 msgstr "'rho' deve essere un environment"
 
-#: nls.c:297
+#: nls.c:299
 msgid "'dir' is not a numeric vector of the correct length"
 msgstr ""
 
-#: nls.c:311 nls.c:341
+#: nls.c:313 nls.c:347
 msgid "Missing value or an infinity produced when evaluating the model"
 msgstr "Valore mancante o infinito generato durante il calcolo del modello"
 
-#: nls.c:318
+#: nls.c:321
 #, c-format
 msgid "variable '%s' is integer, not numeric"
 msgstr ""
 
-#: nls.c:320
+#: nls.c:323
 #, c-format
 msgid "variable '%s' is not numeric"
 msgstr ""
@@ -507,119 +531,119 @@ msgstr "'ndeps' è della lunghezza sbagliata"
 msgid "unknown 'method'"
 msgstr "'method' sconosciuto"
 
-#: optimize.c:217 optimize.c:309 optimize.c:530
+#: optimize.c:220 optimize.c:306 optimize.c:528
 msgid "NA replaced by maximum positive value"
 msgstr "NA sostituito da valore massimo positivo"
 
-#: optimize.c:225 optimize.c:321 optimize.c:538
+#: optimize.c:228 optimize.c:318 optimize.c:536
 msgid "NA/Inf replaced by maximum positive value"
 msgstr "NA/Inf sostituito da valore massimo positivo"
 
-#: optimize.c:234
+#: optimize.c:237
 msgid "invalid function value in 'optimize'"
 msgstr "valore non valido in 'optimize'"
 
-#: optimize.c:252 optimize.c:350 optimize.c:723
+#: optimize.c:255 optimize.c:347 optimize.c:721
 msgid "attempt to minimize non-function"
 msgstr "tentativo di minimizzare una non-funzione"
 
-#: optimize.c:259 optimize.c:266 optimize.c:275 optimize.c:355 optimize.c:360
-#: optimize.c:376
+#: optimize.c:262 optimize.c:269 optimize.c:278 optimize.c:352 optimize.c:357
+#: optimize.c:373
 #, c-format
 msgid "invalid '%s' value"
 msgstr "valore '%s' non valido"
 
-#: optimize.c:268 optimize.c:361
+#: optimize.c:271 optimize.c:358
 msgid "'xmin' not less than 'xmax'"
 msgstr "'xmin' non è minore di 'xmax'"
 
-#: optimize.c:318
+#: optimize.c:315
 #, fuzzy
 msgid "-Inf replaced by maximally negative value"
 msgstr "NA/Inf sostituito da valore massimo positivo"
 
-#: optimize.c:331
+#: optimize.c:328
 msgid "invalid function value in 'zeroin'"
 msgstr "valore funzione non valido in 'zeroin'"
 
-#: optimize.c:366 optimize.c:371
+#: optimize.c:363 optimize.c:368
 #, fuzzy, c-format
 msgid "NA value for '%s' is not allowed"
 msgstr "valore in '...' non è una promessa"
 
-#: optimize.c:381
+#: optimize.c:378
 msgid "'maxiter' must be positive"
 msgstr "'maxiter' deve essere positivo"
 
-#: optimize.c:522
+#: optimize.c:520
 msgid "non-finite value supplied by 'nlm'"
 msgstr "valore non finito fornito da 'nlm'"
 
-#: optimize.c:557
+#: optimize.c:555
 msgid "invalid function value in 'nlm' optimizer"
 msgstr "valore della funzione non valido nell'ottimizzatore 'nlm'"
 
-#: optimize.c:568 optimize.c:583
+#: optimize.c:566 optimize.c:581
 msgid "function value caching for optimization is seriously confused"
 msgstr ""
 
-#: optimize.c:598
+#: optimize.c:596
 msgid "numeric parameter expected"
 msgstr "richiesto parametro di tipo numeric"
 
-#: optimize.c:602
+#: optimize.c:600
 msgid "conflicting parameter lengths"
 msgstr "parametri di lunghezze non concordi"
 
-#: optimize.c:606
+#: optimize.c:604
 msgid "invalid parameter length"
 msgstr "lunghezza parametro non valida"
 
-#: optimize.c:616 optimize.c:623
+#: optimize.c:614 optimize.c:621
 msgid "missing value in parameter"
 msgstr "valori nulli nei parametri"
 
-#: optimize.c:628
+#: optimize.c:626
 msgid "invalid parameter type"
 msgstr "tipo parametro non valido"
 
-#: optimize.c:639
+#: optimize.c:637
 msgid "non-positive number of parameters in nlm"
 msgstr "numero non positivo di parametri in nlm"
 
-#: optimize.c:641
+#: optimize.c:639
 msgid "nlm is inefficient for 1-d problems"
 msgstr "nlm non è efficiente per problemi 1-d"
 
-#: optimize.c:643
+#: optimize.c:641
 msgid "invalid gradient tolerance in nlm"
 msgstr "tolleranza del gradiente non valida in nlm"
 
-#: optimize.c:645
+#: optimize.c:643
 msgid "invalid iteration limit in nlm"
 msgstr "limite iterazione non valida in nlm"
 
-#: optimize.c:647
+#: optimize.c:645
 msgid "minimization function has no good digits in nlm"
 msgstr "la funzione di minimizzazione non ha cifre buone in nlm"
 
-#: optimize.c:649
+#: optimize.c:647
 msgid "no analytic gradient to check in nlm!"
 msgstr "nessun gradiente analitico da controllare in nlm!"
 
-#: optimize.c:651
+#: optimize.c:649
 msgid "no analytic Hessian to check in nlm!"
 msgstr "nessun Hessiano analitico da controllare in nlm!"
 
-#: optimize.c:653
+#: optimize.c:651
 msgid "probable coding error in analytic gradient"
 msgstr "probabile errore di scrittura codice nel gradiente analitico"
 
-#: optimize.c:655
+#: optimize.c:653
 msgid "probable coding error in analytic Hessian"
 msgstr "probabile errore di scrittura codice nell'Hessiano analitico"
 
-#: optimize.c:657
+#: optimize.c:655
 #, c-format
 msgid ""
 "*** unknown error message (msg = %d) in nlm()\n"
@@ -628,25 +652,25 @@ msgstr ""
 "*** messaggio di errore sconosciuto (msg = %d) in nlm()\n"
 "*** non dovrebbe accadere!"
 
-#: optimize.c:668
+#: optimize.c:666
 msgid "Relative gradient close to zero.\n"
 msgstr "Gradiente relativo vicino a zero.\n"
 
-#: optimize.c:669 optimize.c:673
+#: optimize.c:667 optimize.c:671
 msgid "Current iterate is probably solution.\n"
 msgstr "L'iterazione corrente è probabilmente una soluzione.\n"
 
-#: optimize.c:672
+#: optimize.c:670
 msgid "Successive iterates within tolerance.\n"
 msgstr "Iterazioni successive entro i limiti di tolleranza.\n"
 
-#: optimize.c:676
+#: optimize.c:674
 msgid "Last global step failed to locate a point lower than x.\n"
 msgstr ""
 "L'ultimo passaggio globale non è riuscito a determinare un punto più piccolo "
 "di x.\n"
 
-#: optimize.c:677
+#: optimize.c:675
 msgid ""
 "Either x is an approximate local minimum of the function,\n"
 "the function is too non-linear for this algorithm,\n"
@@ -656,11 +680,11 @@ msgstr ""
 "o la funzione è 'troppo' non lineare per questo algoritmo,\n"
 "o steptol è troppo grande.\n"
 
-#: optimize.c:682
+#: optimize.c:680
 msgid "Iteration limit exceeded.  Algorithm failed.\n"
 msgstr "Raggiunto numero di iterazioni massimo. L'algoritmo non converge.\n"
 
-#: optimize.c:685
+#: optimize.c:683
 msgid ""
 "Maximum step size exceeded 5 consecutive times.\n"
 "Either the function is unbounded below,\n"
@@ -674,36 +698,36 @@ msgstr ""
 "da sopra in qualche direzione,\n"
 "o stepmx è troppo piccol.\n"
 
-#: optimize.c:747 optimize.c:752 optimize.c:756 optimize.c:760 optimize.c:764
-#: optimize.c:768 optimize.c:773
+#: optimize.c:745 optimize.c:750 optimize.c:754 optimize.c:758 optimize.c:762
+#: optimize.c:766 optimize.c:771
 msgid "invalid NA value in parameter"
 msgstr "valori di NA non valido per il parametro"
 
-#: optimize.c:804
+#: optimize.c:800
 msgid "hessian supplied is of the wrong length or mode, so ignored"
 msgstr ""
 "l'hessiano fornito è della lunghezza o modalità sbagliata, viene ignorato"
 
-#: optimize.c:808
+#: optimize.c:804
 msgid "gradient supplied is of the wrong length or mode, so ignored"
 msgstr ""
 "il gradiente fornito è della lunghezza o modalità sbagliata, viene ignorato"
 
-#: pacf.c:94
+#: pacf.c:87
 msgid "bad Starma struct"
 msgstr "struttura Starma errata"
 
-#: pacf.c:240
+#: pacf.c:233
 #, c-format
 msgid "starma error code %d"
 msgstr "codice di errore starma %d"
 
-#: pacf.c:300
+#: pacf.c:293
 #, c-format
 msgid "forkal error code %d"
 msgstr "codei di errore forkal %d"
 
-#: pacf.c:474
+#: pacf.c:466
 msgid "invalid value of lag.max"
 msgstr "valore di lag.max non valido"
 
@@ -712,96 +736,110 @@ msgstr "valore di lag.max non valido"
 msgid "Rf_divset: alg = %d must be 1, 2, 3, or 4"
 msgstr ""
 
-#: port.c:312
+#: port.c:149
+msgid "port algorithms 3 or higher are not supported"
+msgstr ""
+
+#: port.c:313
 #, c-format
 msgid "gradient function must return a numeric vector of length %d"
 msgstr ""
 
-#: port.c:324
+#: port.c:325
 #, c-format
 msgid "Hessian function must return a square numeric matrix of order %d"
 msgstr ""
 
-#: port.c:379
+#: port.c:380
 msgid "'rho' must be an environment"
 msgstr "'rho' deve essere un environment"
 
-#: port.c:381 port.c:542
+#: port.c:382 port.c:548
 msgid "'d' must be a nonempty numeric vector"
 msgstr ""
 
-#: port.c:383
+#: port.c:384
 msgid "When Hessian defined must also have gradient defined"
 msgstr ""
 
-#: port.c:386
+#: port.c:387
 #, c-format
 msgid "environment 'rho' must contain a numeric vector '.par' of length %d"
 msgstr ""
 
-#: port.c:400
+#: port.c:401
 msgid "'lower' and 'upper' must be numeric vectors"
 msgstr ""
 
-#: port.c:456
+#: port.c:460
 msgid "'getElement' applies only to named lists"
 msgstr ""
 
-#: port.c:477
+#: port.c:481
 #, c-format
 msgid "%s$%s() not found"
 msgstr ""
 
-#: port.c:490
+#: port.c:494
 #, c-format
 msgid "'gradient' must be a numeric matrix of dimension (%d,%d)"
 msgstr ""
 
-#: port.c:511
+#: port.c:515
 #, c-format
 msgid "fcn produced mode %d, length %d - wanted mode %d, length %d"
 msgstr ""
 
-#: port.c:524
+#: port.c:528
 msgid "invalid type for eval_check_store"
 msgstr ""
 
-#: port.c:543
+#: port.c:549
 msgid "m must be a list"
 msgstr "m deve essere di tipo list"
 
-#: port.c:563
+#: port.c:569
 msgid "'lowerb' and 'upperb' must be numeric vectors"
 msgstr ""
 
-#: rWishart.c:51
+#: rWishart.c:53
 msgid "inconsistent degrees of freedom and dimension"
 msgstr ""
 
-#: rWishart.c:84
+#: rWishart.c:86
 msgid "'scal' must be a square, real matrix"
 msgstr ""
 
-#: rWishart.c:96
+#: rWishart.c:98
 msgid "'scal' matrix is not positive-definite"
 msgstr ""
 
-#: random.c:66 random.c:70 random.c:75 random.c:80 random.c:161 random.c:167
-#: random.c:172 random.c:177 random.c:240 random.c:245 random.c:250
-#: random.c:264 random.c:355
+#: random.c:53 random.c:128 random.c:200 random.c:284
+msgid "NAs produced"
+msgstr "generati NA"
+
+#: random.c:60 random.c:66 random.c:72 random.c:90 random.c:161 random.c:242
+#: random.c:376
 msgid "invalid arguments"
 msgstr "argomenti non validi"
 
-#: random.c:95 random.c:121 random.c:194 random.c:222 random.c:270
-#: random.c:289
-msgid "NAs produced"
-msgstr "generati NA"
+#: random.c:310
+msgid "NA in probability vector"
+msgstr ""
+
+#: random.c:312
+msgid "negative probability"
+msgstr ""
 
-#: random.c:308
+#: random.c:318
+msgid "no positive probabilities"
+msgstr ""
+
+#: random.c:330
 msgid "invalid first argument 'n'"
 msgstr "primo argomento 'n' non valido"
 
-#: random.c:310
+#: random.c:332
 msgid "invalid second argument 'size'"
 msgstr "secondo argomento 'size' non valido"
 
@@ -810,12 +848,12 @@ msgstr "secondo argomento 'size' non valido"
 msgid "rcont2 [%d,%d]: exp underflow to 0; algorithm failure"
 msgstr ""
 
-#: smooth.c:101
+#: smooth.c:107
 #, c-format
 msgid "invalid end-rule for running median of 3: %d"
 msgstr ""
 
-#: starma.c:366
+#: starma.c:364
 #, c-format
 msgid "missing value in last %d observations"
 msgstr "valori mancanti nelle ultime %d osservazioni"
diff --git a/src/library/stats/po/ja.po b/src/library/stats/po/ja.po
index b81be3b..509e642 100644
--- a/src/library/stats/po/ja.po
+++ b/src/library/stats/po/ja.po
@@ -6,9 +6,9 @@
 msgid ""
 msgstr ""
 "Project-Id-Version: R 2.1.1 \n"
-"Report-Msgid-Bugs-To: bugs.r-project.org\n"
-"POT-Creation-Date: 2014-03-27 18:36+0000\n"
-"PO-Revision-Date: 2014-03-26 10:20+0200 \n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2016-04-01 10:01-0700\n"
+"PO-Revision-Date: 2015-03-27 15:09+0900 \n"
 "Last-Translator: Masafumi  \n"
 "Language-Team: RjpWiki Message Translation Team <mokada at md.tsukuba.ac.jp> \n"
 "Language: ja \n"
@@ -16,13 +16,14 @@ msgstr ""
 "Content-Type: text/plain; charset=UTF-8 \n"
 "Content-Transfer-Encoding: 8bit \n"
 "Plural-Forms: nplurals=1; plural=0; \n"
-"X-Generator: Pootle 2.0.5 \n"
+"X-Generator: Pootle 2.5.1.1 \n"
+"X-POOTLE-MTIME: 1427436568.000000 \n"
 
-#: Srunmed.c:55
+#: Srunmed.c:54
 msgid "bandwidth/span of running medians is larger than n"
 msgstr " 移動中央値のバンド幅・バンド範囲 (span) が n より大きくなっています "
 
-#: ansari.c:116
+#: ansari.c:118
 msgid "probabilities outside [0,1] in qansari()"
 msgstr " qansari() 中で確率が [0, 1] の範囲外です "
 
@@ -42,7 +43,7 @@ msgstr " approx(): NA 値を補間しようとしました "
 msgid "invalid argument type"
 msgstr " 不正な引数の型です "
 
-#: arima.c:444 arima.c:530 pacf.c:331 pacf.c:371
+#: arima.c:444 arima.c:530 pacf.c:324 pacf.c:363
 msgid "can only transform 100 pars in arima0"
 msgstr " arima0 では 100 個のパラメータまでしか変換出来ません "
 
@@ -50,6 +51,11 @@ msgstr " arima0 では 100 個のパラメータまでしか変換出来ませ
 msgid "maximum supported lag is 350"
 msgstr " サポートされているラグの最大値は350です "
 
+#: bandwidths.c:121
+#, c-format
+msgid "non-finite x[%d] in bandwidth calculation"
+msgstr " バンド幅の計算中に有限でない x[%d] "
+
 #: complete_cases.c:26
 #, c-format
 msgid "invalid 'type' (%s) of argument"
@@ -63,31 +69,41 @@ msgstr " ケースの数を決定する入力がありません "
 msgid "not all arguments have the same length"
 msgstr " 引数の中に異なった長さのものがあります "
 
-#: cov.c:566
+#: cov.c:569
 msgid "missing observations in cov/cor"
 msgstr " cov/cor 関数に欠損した観測値があります "
 
-#: cov.c:644
+#: cov.c:643
 msgid "'x' is NULL"
 msgstr " 'x' が NULL です "
 
-#: cov.c:663 cov.c:669
+#: cov.c:645
+#, fuzzy
+msgid "'x' is a factor"
+msgstr " 'x' が行列ではありません "
+
+#: cov.c:665
+#, fuzzy
+msgid "'y' is a factor"
+msgstr " 'fn' が関数ではありません "
+
+#: cov.c:673 cov.c:679
 msgid "incompatible dimensions"
 msgstr " 互換性のない次元です "
 
-#: cov.c:688 cov.c:729 cov.c:762
+#: cov.c:698 cov.c:739 cov.c:772
 msgid "no complete element pairs"
 msgstr " 完全な要素のペアがありません "
 
-#: cov.c:701
+#: cov.c:711
 msgid "invalid 'use' (computational method)"
 msgstr " 'use' (計算法) が不正です "
 
-#: cov.c:704
+#: cov.c:714
 msgid "'x' is empty"
 msgstr " 'x' が空です "
 
-#: cov.c:798
+#: cov.c:808
 msgid "the standard deviation is zero"
 msgstr " 標準偏差が 0 です "
 
@@ -100,36 +116,40 @@ msgstr " 単項のマイナスの検査に不正な形式があります "
 msgid "Function '%s' is not in the derivatives table"
 msgstr " 関数 '%s' は導関数の表中にありません "
 
-#: deriv.c:642
+#: deriv.c:641
+msgid "'expr' must be an expression or call"
+msgstr ""
+
+#: deriv.c:644
 msgid "variable must be a character string"
 msgstr " 変数は文字列でなければいけません "
 
-#: deriv.c:644
+#: deriv.c:646
 msgid "only the first element is used as variable name"
 msgstr " 最初の要素だけが変数名として使われました "
 
-#: deriv.c:657
+#: deriv.c:659
 #, c-format
 msgid "invalid expression in '%s'"
 msgstr " '%s' 中の式が不正です "
 
-#: deriv.c:935 model.c:99
+#: deriv.c:937 model.c:99
 msgid "invalid variable names"
 msgstr " 変数名が不正です "
 
-#: deriv.c:944
+#: deriv.c:946
 msgid "invalid tag"
 msgstr " タグが不正です "
 
-#: distance.c:153
+#: distance.c:152
 msgid "treating non-finite values as NA"
 msgstr " 有限でない値を NA として取り扱います "
 
-#: distance.c:226
+#: distance.c:225
 msgid "distance(): invalid p"
 msgstr " distance(): 不正な p "
 
-#: distance.c:229
+#: distance.c:228
 msgid "distance(): invalid distance"
 msgstr " distance(): 不正な距離 "
 
@@ -141,17 +161,17 @@ msgstr " 計算結果が NaN になりました "
 msgid "Non-numeric argument to mathematical function"
 msgstr " 数学関数に非数値引数が渡されました "
 
-#: family.c:44
+#: family.c:45
 #, c-format
 msgid "Value %g out of range (0, 1)"
 msgstr " 値 %g は範囲 (0, 1) 外です "
 
-#: family.c:65 family.c:79 family.c:97
+#: family.c:66 family.c:80 family.c:98
 #, c-format
 msgid "Argument %s must be a nonempty numeric vector"
 msgstr " 引数 %s は空でない数値ベクトルでなければなりません "
 
-#: family.c:130 family.c:133
+#: family.c:131 family.c:134
 #, c-format
 msgid "argument %s must be a numeric vector of length 1 or length %d"
 msgstr " 引数 %s は長さが 1 か %d の数値ベクトルでなければなりません "
@@ -176,7 +196,12 @@ msgstr " 因子がありません "
 msgid "invalid factors"
 msgstr " 因子 (factor) が不正です "
 
-#: ksmooth.c:67
+#: integrate.c:84 integrate.c:86 integrate.c:128
+#, fuzzy, c-format
+msgid "'%s' must be of length one"
+msgstr " 'm' はリストでなければなりません "
+
+#: ksmooth.c:68
 msgid "only 2500 rows are allowed for sm.method=\"spline\""
 msgstr " sm.method=\"spline\" では 2500 行までしか扱えません "
 
@@ -194,7 +219,7 @@ msgstr " 'x' (%d,%d) と 'y' (%d)の次元が一致しません "
 msgid "NA/NaN/Inf in '%s'"
 msgstr " '%s' の中に NA/NaN/Inf があります "
 
-#: loessc.c:233
+#: loessc.c:240
 msgid "span is too small"
 msgstr " 範囲 (span) が小さすぎます "
 
@@ -222,19 +247,19 @@ msgstr " 'iter' は有限かつ 0 以上でなくてはなりません "
 msgid "'delta' must be finite and > 0"
 msgstr " 'delta' は有限かつ正数でなくてはなりません "
 
-#: mAR.c:467
+#: mAR.c:470
 msgid "Singular matrix in qr_solve"
 msgstr " qr_solve 中の特異行列です "
 
-#: mAR.c:510
+#: mAR.c:513
 msgid "Singular matrix in ldet"
 msgstr " ldet 中の特異行列です "
 
-#: mAR.c:697
+#: mAR.c:700
 msgid "Invalid vmethod"
 msgstr " 不正な vmethod です "
 
-#: mAR.c:833
+#: mAR.c:836
 msgid "Burg's algorithm failed to find partial correlation"
 msgstr " Burg のアルゴリズムが偏相関を見つけ損ないました "
 
@@ -273,185 +298,185 @@ msgstr " 変数 ('%s' に基づく) の長さが異なります "
 msgid "invalid result from na.action"
 msgstr " na.action の結果が不正です "
 
-#: model.c:369 model.c:377 optim.c:197
+#: model.c:372 model.c:380 optim.c:197
 #, c-format
 msgid "invalid '%s' argument"
 msgstr " '%s' 引数が不正です "
 
-#: model.c:388
+#: model.c:391
 msgid "invalid model frame"
 msgstr " モデルフレームが不正です "
 
-#: model.c:390
+#: model.c:393
 msgid "do not know how many cases"
 msgstr " ケースの数が幾つあるか分かりません "
 
-#: model.c:414
+#: model.c:417
 #, c-format
 msgid "variable lengths differ (found for variable %d)"
 msgstr " 変数 (%d 変数に基づく) の長さが異なります "
 
-#: model.c:418 model.c:425
+#: model.c:421 model.c:428
 #, c-format
 msgid "variable %d has no levels"
 msgstr " 変数 %d は水準を持ちません "
 
-#: model.c:537
+#: model.c:540
 msgid "the response appeared on the right-hand side and was dropped"
 msgstr " 目的変数が右辺にあるため、捨て去られました "
 
-#: model.c:557
+#: model.c:560
 #, c-format
 msgid "term %d would require %.0g columns"
 msgstr " 項 %d は %.0g 行を必要とするかもしれません "
 
-#: model.c:561
+#: model.c:564
 #, c-format
 msgid "matrix would require %.0g columns"
 msgstr " 行列は %.0g 行を必要とするかもしれません "
 
-#: model.c:572
+#: model.c:575
 #, c-format
 msgid "problem with term %d in model.matrix: no columns are assigned"
 msgstr ""
 " model.matrix 中の項 %d に問題があります: いかなる列も指定されていません "
 
-#: model.c:621 model.c:626 model.c:632 model.c:643 model.c:649 model.c:655
+#: model.c:624 model.c:629 model.c:635 model.c:646 model.c:652 model.c:658
 msgid "term names will be truncated"
 msgstr " 項の名前は切りつめらられるでしょう "
 
-#: model.c:635
+#: model.c:638
 msgid "complex variables are not currently allowed in model matrices"
 msgstr " モデル行列中では複素数は現在許されていません "
 
-#: model.c:659
+#: model.c:662
 #, c-format
 msgid "variables of type '%s' are not allowed in model matrices"
 msgstr " タイプ '%s' の変数はモデル行列中では許されません "
 
-#: model.c:881
+#: model.c:884
 msgid "invalid formula in 'update'"
 msgstr " 'update' 中の式が不正です "
 
-#: model.c:915
+#: model.c:918
 msgid "formula expected"
 msgstr " 式が期待されています "
 
-#: model.c:1046
+#: model.c:1049
 msgid "invalid term in model formula"
 msgstr " モデル式に不正な項があります "
 
-#: model.c:1121
+#: model.c:1124
 msgid "invalid model formula"
 msgstr " モデル式が不正です "
 
-#: model.c:1147 model.c:1395
+#: model.c:1150 model.c:1410
 msgid "invalid power in formula"
 msgstr " モデル式中に不正なべき乗があります "
 
-#: model.c:1183
+#: model.c:1186
 msgid "invalid model formula in ExtractVars"
 msgstr " ExtractVars 中のモデル式が不正です "
 
-#: model.c:1518
+#: model.c:1533
 #, c-format
 msgid "duplicated name '%s' in data frame using '.'"
 msgstr " データフレーム中の重複した名前 '%s' を '.' を使って複製しました "
 
-#: model.c:1576
+#: model.c:1594
 msgid "invalid model formula in EncodeVars"
 msgstr " EncodeVars 中のモデル式が不正です "
 
-#: model.c:1662
+#: model.c:1680
 msgid "argument is not a valid model"
 msgstr " 引数は有効なモデルではありません "
 
-#: model.c:1672
+#: model.c:1690
 msgid "'specials' must be NULL or a character vector"
 msgstr " 'specials' は NULL または文字ベクタでなくてはなりません "
 
-#: model.c:1684
+#: model.c:1702
 msgid "'data' argument is of the wrong type"
 msgstr " 'data' 引数が誤った型です "
 
-#: model.c:1952
+#: model.c:1972
 msgid "'.' in formula and no 'data' argument"
 msgstr " '.' が式中にありますが, 'data' 引数がありません "
 
-#: monoSpl.c:34
+#: monoSpl.c:36
 msgid "n must be at least two"
 msgstr " n は最低でも 2 でなければなりません "
 
-#: monoSpl.c:67
+#: monoSpl.c:69
 msgid "Argument m must be numeric"
 msgstr " 引数 m は数値でなければなりません "
 
-#: monoSpl.c:70
+#: monoSpl.c:72
 msgid "length(m) must be at least two"
 msgstr " length(m) は少なくとも 2 でなければなりません "
 
-#: monoSpl.c:72
+#: monoSpl.c:74
 msgid "Argument Sx must be numeric vector one shorter than m[]"
 msgstr " 引数 Sx は長さが m[] より 1 だけ短い数値ベクトルでなければなりません "
 
-#: nls.c:97
+#: nls.c:99
 msgid "'control' must be a list"
 msgstr " 'control' はリストでなければなりません "
 
-#: nls.c:99
+#: nls.c:101
 msgid "'m' must be a list"
 msgstr " 'm' はリストでなければなりません "
 
-#: nls.c:105 nls.c:110 nls.c:115 nls.c:120 nls.c:125 nls.c:166 nls.c:171
-#: nls.c:176 nls.c:181 nls.c:186 nls.c:191
+#: nls.c:107 nls.c:112 nls.c:117 nls.c:122 nls.c:127 nls.c:168 nls.c:173
+#: nls.c:178 nls.c:183 nls.c:188 nls.c:193
 #, c-format
 msgid "'%s' absent"
 msgstr " '%s' がありません "
 
-#: nls.c:232
+#: nls.c:234
 msgid "singular gradient"
 msgstr " 勾配が特異です "
 
-#: nls.c:253
+#: nls.c:255
 #, c-format
 msgid "step factor %g reduced below 'minFactor' of %g"
 msgstr " step 因子 %g は %g の 'minFactor' 以下に縮小しました "
 
-#: nls.c:262
+#: nls.c:264
 #, c-format
 msgid "number of iterations exceeded maximum of %d"
 msgstr " 繰り返し数が最大値 %d を超えました "
 
-#: nls.c:267
+#: nls.c:269
 msgid "converged"
 msgstr " 収束しました "
 
-#: nls.c:288
+#: nls.c:290
 msgid "'theta' should be of type character"
 msgstr " 'theta' は文字型でなければなりません "
 
-#: nls.c:290 port.c:375
+#: nls.c:292 port.c:376
 msgid "use of NULL environment is defunct"
 msgstr " NULL 環境の使用は廃止されました "
 
-#: nls.c:294
+#: nls.c:296
 msgid "'rho' should be an environment"
 msgstr " 'rho' は環境 (environment) でなければなりません "
 
-#: nls.c:297
+#: nls.c:299
 msgid "'dir' is not a numeric vector of the correct length"
 msgstr " 'dir' は正しい長さの数値ベクトルではありません "
 
-#: nls.c:311 nls.c:341
+#: nls.c:313 nls.c:347
 msgid "Missing value or an infinity produced when evaluating the model"
 msgstr " モデルを評価する際,欠損値または無限大が生成されました "
 
-#: nls.c:318
+#: nls.c:321
 #, c-format
 msgid "variable '%s' is integer, not numeric"
 msgstr " 変数 '%s' は整数です、数値ではありません "
 
-#: nls.c:320
+#: nls.c:323
 #, c-format
 msgid "variable '%s' is not numeric"
 msgstr " 変数 '%s' は数値ではありません "
@@ -498,118 +523,118 @@ msgstr " 'ndeps' の長さが誤っています "
 msgid "unknown 'method'"
 msgstr " 未知の 'method' です "
 
-#: optimize.c:217 optimize.c:309 optimize.c:530
+#: optimize.c:220 optimize.c:306 optimize.c:528
 msgid "NA replaced by maximum positive value"
 msgstr " NA は正の最大値で置き換えられました "
 
-#: optimize.c:225 optimize.c:321 optimize.c:538
+#: optimize.c:228 optimize.c:318 optimize.c:536
 msgid "NA/Inf replaced by maximum positive value"
 msgstr " NA/Inf は正の最大値で置き換えられました "
 
-#: optimize.c:234
+#: optimize.c:237
 msgid "invalid function value in 'optimize'"
 msgstr " 'optimize' における関数値が不正です "
 
-#: optimize.c:252 optimize.c:350 optimize.c:723
+#: optimize.c:255 optimize.c:347 optimize.c:721
 msgid "attempt to minimize non-function"
 msgstr " 関数でないものを最小化しようとしました "
 
-#: optimize.c:259 optimize.c:266 optimize.c:275 optimize.c:355 optimize.c:360
-#: optimize.c:376
+#: optimize.c:262 optimize.c:269 optimize.c:278 optimize.c:352 optimize.c:357
+#: optimize.c:373
 #, c-format
 msgid "invalid '%s' value"
 msgstr " '%s' の値が不正です "
 
-#: optimize.c:268 optimize.c:361
+#: optimize.c:271 optimize.c:358
 msgid "'xmin' not less than 'xmax'"
 msgstr " 'xmin' が 'xmax' より大きいか等しいです "
 
-#: optimize.c:318
+#: optimize.c:315
 msgid "-Inf replaced by maximally negative value"
 msgstr " -Inf は負の最大値で置き換えられました "
 
-#: optimize.c:331
+#: optimize.c:328
 msgid "invalid function value in 'zeroin'"
 msgstr " 'zeroin' における関数値が不正です "
 
-#: optimize.c:366 optimize.c:371
+#: optimize.c:363 optimize.c:368
 #, c-format
 msgid "NA value for '%s' is not allowed"
 msgstr " '%s' に対して NA は認められません "
 
-#: optimize.c:381
+#: optimize.c:378
 msgid "'maxiter' must be positive"
 msgstr " 'maxiter' は正数でなくてはなりません "
 
-#: optimize.c:522
+#: optimize.c:520
 msgid "non-finite value supplied by 'nlm'"
 msgstr " 'nlm' により有限でない値が与えられました "
 
-#: optimize.c:557
+#: optimize.c:555
 msgid "invalid function value in 'nlm' optimizer"
 msgstr " 'nlm' 最適化における関数値が不正です "
 
-#: optimize.c:568 optimize.c:583
+#: optimize.c:566 optimize.c:581
 msgid "function value caching for optimization is seriously confused"
 msgstr " 最適化用にキャッシュされた関数値がひどく混乱しています "
 
-#: optimize.c:598
+#: optimize.c:596
 msgid "numeric parameter expected"
 msgstr " 数値パラメータが期待されています "
 
-#: optimize.c:602
+#: optimize.c:600
 msgid "conflicting parameter lengths"
 msgstr " パラメータの長さが矛盾しています "
 
-#: optimize.c:606
+#: optimize.c:604
 msgid "invalid parameter length"
 msgstr " パラメータの長さが不正です "
 
-#: optimize.c:616 optimize.c:623
+#: optimize.c:614 optimize.c:621
 msgid "missing value in parameter"
 msgstr " パラメータに欠損値があります "
 
-#: optimize.c:628
+#: optimize.c:626
 msgid "invalid parameter type"
 msgstr " パラメータのタイプが不正です "
 
-#: optimize.c:639
+#: optimize.c:637
 msgid "non-positive number of parameters in nlm"
 msgstr " nlm のパラメータが正の値ではありません "
 
-#: optimize.c:641
+#: optimize.c:639
 msgid "nlm is inefficient for 1-d problems"
 msgstr " nlm は一次元問題には効率的ではありません "
 
-#: optimize.c:643
+#: optimize.c:641
 msgid "invalid gradient tolerance in nlm"
 msgstr " nlm における勾配の許容値が不正です "
 
-#: optimize.c:645
+#: optimize.c:643
 msgid "invalid iteration limit in nlm"
 msgstr " nlm の繰り返し回数の限界値が不正です "
 
-#: optimize.c:647
+#: optimize.c:645
 msgid "minimization function has no good digits in nlm"
 msgstr " nlm 中で最小化関数は十分な桁数をもちません "
 
-#: optimize.c:649
+#: optimize.c:647
 msgid "no analytic gradient to check in nlm!"
 msgstr " nlm 中でチェックされる勾配の解析的な式がありません! "
 
-#: optimize.c:651
+#: optimize.c:649
 msgid "no analytic Hessian to check in nlm!"
 msgstr " nlm 中でチェックすべき解析的なヘッセ行列がありません "
 
-#: optimize.c:653
+#: optimize.c:651
 msgid "probable coding error in analytic gradient"
 msgstr " 解析的な勾配式中にコーディングの間違いの可能性 "
 
-#: optimize.c:655
+#: optimize.c:653
 msgid "probable coding error in analytic Hessian"
 msgstr " 解析的なヘッセ行列式中にコーディングの間違いの可能性があります "
 
-#: optimize.c:657
+#: optimize.c:655
 #, c-format
 msgid ""
 "*** unknown error message (msg = %d) in nlm()\n"
@@ -618,24 +643,24 @@ msgstr ""
 " *** nlm() 関数から未知のエラーメッセージ (msg = %d) \n"
 " *** これはあり得ないことです! "
 
-#: optimize.c:668
+#: optimize.c:666
 msgid "Relative gradient close to zero.\n"
 msgstr " 相対勾配が 0 に近くなっています \n"
 
-#: optimize.c:669 optimize.c:673
+#: optimize.c:667 optimize.c:671
 msgid "Current iterate is probably solution.\n"
 msgstr " 現在の繰り返しでおそらく解が得られたでしょう \n"
 
-#: optimize.c:672
+#: optimize.c:670
 msgid "Successive iterates within tolerance.\n"
 msgstr " 連続した繰り返しが許容範囲内です \n"
 
-#: optimize.c:676
+#: optimize.c:674
 msgid "Last global step failed to locate a point lower than x.\n"
 msgstr ""
 " 最終の大局的ステップは x よりも小さな点を見つけることが出来ませんでした \n"
 
-#: optimize.c:677
+#: optimize.c:675
 msgid ""
 "Either x is an approximate local minimum of the function,\n"
 "the function is too non-linear for this algorithm,\n"
@@ -645,11 +670,11 @@ msgstr ""
 " 関数がこのアルゴリズムには非線形的すぎるか、 \n"
 " steptol が大きすぎます \n"
 
-#: optimize.c:682
+#: optimize.c:680
 msgid "Iteration limit exceeded.  Algorithm failed.\n"
 msgstr " 繰り返し数が上限を超えました。アルゴリズムは破綻しました。 \n"
 
-#: optimize.c:685
+#: optimize.c:683
 msgid ""
 "Maximum step size exceeded 5 consecutive times.\n"
 "Either the function is unbounded below,\n"
@@ -662,34 +687,34 @@ msgstr ""
 " ある方向で上から漸近的に有限値に近づいているか、 \n"
 " または stepmx が小さすぎるか、です \n"
 
-#: optimize.c:747 optimize.c:752 optimize.c:756 optimize.c:760 optimize.c:764
-#: optimize.c:768 optimize.c:773
+#: optimize.c:745 optimize.c:750 optimize.c:754 optimize.c:758 optimize.c:762
+#: optimize.c:766 optimize.c:771
 msgid "invalid NA value in parameter"
 msgstr " パラメータ中に不正な NA 値があります "
 
-#: optimize.c:804
+#: optimize.c:800
 msgid "hessian supplied is of the wrong length or mode, so ignored"
 msgstr " 提供されたヘッセ行列は不正な長さかモードであったため無視されました "
 
-#: optimize.c:808
+#: optimize.c:804
 msgid "gradient supplied is of the wrong length or mode, so ignored"
 msgstr " 提供された勾配は不正な長さかモードであったので無視されました "
 
-#: pacf.c:94
+#: pacf.c:87
 msgid "bad Starma struct"
 msgstr " 不適な Starma struct です "
 
-#: pacf.c:240
+#: pacf.c:233
 #, c-format
 msgid "starma error code %d"
 msgstr " starma エラーコード %d です "
 
-#: pacf.c:300
+#: pacf.c:293
 #, c-format
 msgid "forkal error code %d"
 msgstr " forkal エラーコード %d です "
 
-#: pacf.c:474
+#: pacf.c:466
 msgid "invalid value of lag.max"
 msgstr " 不正な lag.max 値です "
 
@@ -698,97 +723,111 @@ msgstr " 不正な lag.max 値です "
 msgid "Rf_divset: alg = %d must be 1, 2, 3, or 4"
 msgstr " Rf_divset: alg = %d は 1, 2, 3, または 4 でなければなりません "
 
-#: port.c:312
+#: port.c:149
+msgid "port algorithms 3 or higher are not supported"
+msgstr " 3 以上のポートアルゴリズムはサポートされていません "
+
+#: port.c:313
 #, c-format
 msgid "gradient function must return a numeric vector of length %d"
 msgstr " グラディエント関数は長さ %d の数値ベクトルを返さなければなりません "
 
-#: port.c:324
+#: port.c:325
 #, c-format
 msgid "Hessian function must return a square numeric matrix of order %d"
 msgstr " ヘッシアン関数は次数 %d の正方数値行列を返さなければなりません "
 
-#: port.c:379
+#: port.c:380
 msgid "'rho' must be an environment"
 msgstr " 'rho' は環境 (environment) でなければなりません "
 
-#: port.c:381 port.c:542
+#: port.c:382 port.c:548
 msgid "'d' must be a nonempty numeric vector"
 msgstr " 'd' は空でない数値ベクトルでなければなりません "
 
-#: port.c:383
+#: port.c:384
 msgid "When Hessian defined must also have gradient defined"
 msgstr " ヘッシアンを定義した際は、グラディエントも定義しなければなりません "
 
-#: port.c:386
+#: port.c:387
 #, c-format
 msgid "environment 'rho' must contain a numeric vector '.par' of length %d"
 msgstr " 環境 'rho' は長さが %d の数値ベクトル '.par' を含まねばなりません "
 
-#: port.c:400
+#: port.c:401
 msgid "'lower' and 'upper' must be numeric vectors"
 msgstr " 'lower' と 'upper' は数値ベクトルでなければなりません "
 
-#: port.c:456
+#: port.c:460
 msgid "'getElement' applies only to named lists"
 msgstr " 'getElement' は名前つきリストにだけ適用されます "
 
-#: port.c:477
+#: port.c:481
 #, c-format
 msgid "%s$%s() not found"
 msgstr " %s$%s() が見つかりません "
 
-#: port.c:490
+#: port.c:494
 #, c-format
 msgid "'gradient' must be a numeric matrix of dimension (%d,%d)"
 msgstr " 'gradient' は次元 (%d, %d) の数値行列でなければなりません "
 
-#: port.c:511
+#: port.c:515
 #, c-format
 msgid "fcn produced mode %d, length %d - wanted mode %d, length %d"
 msgstr ""
 " モード %d, 長さ %d の fcn が作られました - モード %d, 長さ %d が必要でした "
 
-#: port.c:524
+#: port.c:528
 msgid "invalid type for eval_check_store"
 msgstr " eval_check_store に対する不正なタイプです "
 
-#: port.c:543
+#: port.c:549
 msgid "m must be a list"
 msgstr " m はリストでなければなりません "
 
-#: port.c:563
+#: port.c:569
 msgid "'lowerb' and 'upperb' must be numeric vectors"
 msgstr " 'lowerb' と 'upperb' は数値ベクトルでなければなりません "
 
-#: rWishart.c:51
+#: rWishart.c:53
 msgid "inconsistent degrees of freedom and dimension"
 msgstr " 自由度と次元が矛盾しています "
 
-#: rWishart.c:84
+#: rWishart.c:86
 msgid "'scal' must be a square, real matrix"
 msgstr " 'scal' は正方な実行列である必要があります "
 
-#: rWishart.c:96
+#: rWishart.c:98
 msgid "'scal' matrix is not positive-definite"
 msgstr " 行列 'scal' が正定値行列ではありません "
 
-#: random.c:66 random.c:70 random.c:75 random.c:80 random.c:161 random.c:167
-#: random.c:172 random.c:177 random.c:240 random.c:245 random.c:250
-#: random.c:264 random.c:355
+#: random.c:53 random.c:128 random.c:200 random.c:284
+msgid "NAs produced"
+msgstr " NA が生成されました "
+
+#: random.c:60 random.c:66 random.c:72 random.c:90 random.c:161 random.c:242
+#: random.c:376
 msgid "invalid arguments"
 msgstr " 引数 (複数) が不正です "
 
-#: random.c:95 random.c:121 random.c:194 random.c:222 random.c:270
-#: random.c:289
-msgid "NAs produced"
-msgstr " NA が生成されました "
+#: random.c:310
+msgid "NA in probability vector"
+msgstr " 確率ベクトル中にNAがあります "
+
+#: random.c:312
+msgid "negative probability"
+msgstr " 負の確率 "
 
-#: random.c:308
+#: random.c:318
+msgid "no positive probabilities"
+msgstr " 正の確率がありません "
+
+#: random.c:330
 msgid "invalid first argument 'n'"
 msgstr " 一番目の引数 'n' が不正です "
 
-#: random.c:310
+#: random.c:332
 msgid "invalid second argument 'size'"
 msgstr " 二番目の引数 'size' が不正です "
 
@@ -799,12 +838,12 @@ msgstr ""
 " rcont2 [%d, %d]: exp がアンダーフローして 0 になりました; アルゴリズムが失敗"
 "しました "
 
-#: smooth.c:101
+#: smooth.c:107
 #, c-format
 msgid "invalid end-rule for running median of 3: %d"
 msgstr " 3 点移動中央値計算の終了ルールが不正です: %d "
 
-#: starma.c:366
+#: starma.c:364
 #, c-format
 msgid "missing value in last %d observations"
 msgstr " 直前の %d 個の観測値中に欠損値があります "
diff --git a/src/library/stats/po/ko.po b/src/library/stats/po/ko.po
index c7e314e..291f972 100644
--- a/src/library/stats/po/ko.po
+++ b/src/library/stats/po/ko.po
@@ -1,30 +1,37 @@
 # Korean translation for R stats package
-# src/library/stats/po/ko.po
-# Copyright (C) 1995-2014 The R Core Team
+# ./stats/po/ko.po
+#
+# Copyright (C) 1995-2016 The R Core Team
+#
 # This file is distributed under the same license as the R stats package.
-# Chel Hee Lee <chl948 at mail.usask.ca>, 2008-2014.
+# Maintained by Chel Hee Lee <chl948 at mail.usask.ca>, 2008-2016.
+# Contact: Chel Hee Lee <gnustats at gmail.com>
+#
+# Notes:
+# Under development (unstable) starting from 11-APR-2016 for R-3.3.1 - QC: in progress
+# Freezed on 10-APR-2016 for R-3.3.0 - QC: PASS
+# Freezed on 30-MAR-2015 for R-3.2.0 - QC: PASS
+# Freezed on 06-FEB-2015 for R-3.1.3 - QC: PASS
 #
 msgid ""
 msgstr ""
-"Project-Id-Version: R 3.1.0\n"
+"Project-Id-Version: R-3.3.0\n"
 "Report-Msgid-Bugs-To: bugs.r-project.org\n"
-"POT-Creation-Date: 2014-03-27 18:36+0000\n"
-"PO-Revision-Date: 2014-03-26 21:13-0600\n"
+"POT-Creation-Date: 2016-04-01 10:01-0700\n"
+"PO-Revision-Date: 2016-04-11 13:08-0600\n"
 "Last-Translator: Chel Hee Lee <chl948 at mail.usask.ca>\n"
-"Language-Team:  <chl948 at mail.usask.ca>\n"
+"Language-Team: Chel Hee Lee <chl948 at mail.usask.ca>\n"
 "Language: ko\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
 "Plural-Forms: nplurals=1; plural=0;\n"
-"X-Poedit-SourceCharset: UTF-8\n"
-"X-Generator: Poedit 1.5.4\n"
 
-#: Srunmed.c:55
+#: Srunmed.c:54
 msgid "bandwidth/span of running medians is larger than n"
 msgstr "연속적인 중앙값들의 브로드밴드/범위가 n보다 큽니다"
 
-#: ansari.c:116
+#: ansari.c:118
 msgid "probabilities outside [0,1] in qansari()"
 msgstr "qansari()내에 있는 확률의 값들이 [0,1] 범위외에 있습니다"
 
@@ -44,7 +51,7 @@ msgstr "approx(): NA값들의 보간을 시도했습니다"
 msgid "invalid argument type"
 msgstr "유효하지 않은 인자 타입입니다"
 
-#: arima.c:444 arima.c:530 pacf.c:331 pacf.c:371
+#: arima.c:444 arima.c:530 pacf.c:324 pacf.c:363
 msgid "can only transform 100 pars in arima0"
 msgstr "arima0에서는 최대 100개의 파라미터들을 변환할 수 있습니다"
 
@@ -52,6 +59,11 @@ msgstr "arima0에서는 최대 100개의 파라미터들을 변환할 수 있습
 msgid "maximum supported lag is 350"
 msgstr "지원되는 최대 lag의 크기는 350입니다"
 
+#: bandwidths.c:121
+#, c-format
+msgid "non-finite x[%d] in bandwidth calculation"
+msgstr ""
+
 #: complete_cases.c:26
 #, c-format
 msgid "invalid 'type' (%s) of argument"
@@ -65,31 +77,39 @@ msgstr "경우의 수를 결정할 수 있는 입력이 없습니다"
 msgid "not all arguments have the same length"
 msgstr "모든 인자들이 같은 길이를 가지고 있지 않습니다"
 
-#: cov.c:566
+#: cov.c:569
 msgid "missing observations in cov/cor"
 msgstr "cov/cor에 결측치들이 있습니다"
 
-#: cov.c:644
+#: cov.c:643
 msgid "'x' is NULL"
 msgstr "'x'는 NULL입니다"
 
-#: cov.c:663 cov.c:669
+#: cov.c:645
+msgid "'x' is a factor"
+msgstr "'x'는 요인입니다."
+
+#: cov.c:665
+msgid "'y' is a factor"
+msgstr "'y'는 요인입니다."
+
+#: cov.c:673 cov.c:679
 msgid "incompatible dimensions"
 msgstr "호환되지 않는 차원들입니다"
 
-#: cov.c:688 cov.c:729 cov.c:762
+#: cov.c:698 cov.c:739 cov.c:772
 msgid "no complete element pairs"
 msgstr ""
 
-#: cov.c:701
+#: cov.c:711
 msgid "invalid 'use' (computational method)"
 msgstr "유효하지 않은 'use'입니다 (computational method)"
 
-#: cov.c:704
+#: cov.c:714
 msgid "'x' is empty"
 msgstr "'x'가 비어있습니다"
 
-#: cov.c:798
+#: cov.c:808
 msgid "the standard deviation is zero"
 msgstr "표준편차가 0입니다"
 
@@ -102,36 +122,40 @@ msgstr ""
 msgid "Function '%s' is not in the derivatives table"
 msgstr "함수 '%s'는 미분함수 목록에 없습니다"
 
-#: deriv.c:642
+#: deriv.c:641
+msgid "'expr' must be an expression or call"
+msgstr "'expr'는 표현식(expression) 또는 호출(call)이어야 합니다."
+
+#: deriv.c:644
 msgid "variable must be a character string"
 msgstr "변수는 반드시 문자열이어야 합니다"
 
-#: deriv.c:644
+#: deriv.c:646
 msgid "only the first element is used as variable name"
 msgstr "오로지 첫번째 요소만이 변수명으로서 사용되었습니다"
 
-#: deriv.c:657
+#: deriv.c:659
 #, c-format
 msgid "invalid expression in '%s'"
 msgstr "'%s'에 유효하지 않은 표현식이 있습니다"
 
-#: deriv.c:935 model.c:99
+#: deriv.c:937 model.c:99
 msgid "invalid variable names"
 msgstr "유효하지 않은 변수명입니다"
 
-#: deriv.c:944
+#: deriv.c:946
 msgid "invalid tag"
 msgstr "유효하지 않은 태그입니다"
 
-#: distance.c:153
+#: distance.c:152
 msgid "treating non-finite values as NA"
 msgstr "유한하지 않은 값들을 NA로 처리합니다"
 
-#: distance.c:226
+#: distance.c:225
 msgid "distance(): invalid p"
 msgstr "distance(): 유효하지 않은 p입니다"
 
-#: distance.c:229
+#: distance.c:228
 msgid "distance(): invalid distance"
 msgstr "distance(): 유효하지 않은 거리입니다"
 
@@ -143,17 +167,17 @@ msgstr "NaN이 생성되었습니다"
 msgid "Non-numeric argument to mathematical function"
 msgstr "수치형이 아닌 인자가 수학함수에 이용되었습니다"
 
-#: family.c:44
+#: family.c:45
 #, c-format
 msgid "Value %g out of range (0, 1)"
 msgstr "%g의 값은 (0,1)의 범위외에 있습니다"
 
-#: family.c:65 family.c:79 family.c:97
+#: family.c:66 family.c:80 family.c:98
 #, c-format
 msgid "Argument %s must be a nonempty numeric vector"
 msgstr "인자 %s는 반드시 비어있지 않은 수치형 벡터이어야 합니다"
 
-#: family.c:130 family.c:133
+#: family.c:131 family.c:134
 #, c-format
 msgid "argument %s must be a numeric vector of length 1 or length %d"
 msgstr "인자 %s는 반드시 길이가 1 이거나 %d인 수치형 벡터이어야 합니다"
@@ -178,11 +202,14 @@ msgstr "요인이 없습니다"
 msgid "invalid factors"
 msgstr "유효하지 않은 요인입니다"
 
-#: ksmooth.c:67
+#: integrate.c:84 integrate.c:86 integrate.c:128
+#, c-format
+msgid "'%s' must be of length one"
+msgstr "'%s'의 길이는 반드시 1이어야 합니다."
+
+#: ksmooth.c:68
 msgid "only 2500 rows are allowed for sm.method=\"spline\""
-msgstr ""
-"sm.method에 \"spline\"이 주어졌을 때에는 최대로 사용할 수 있는 행의 개수는 "
-"2500개입니다"
+msgstr "sm.method에 \"spline\"이 주어졌을 때에는 최대로 사용할 수 있는 행의 개수는 2500개입니다"
 
 #: lm.c:57
 msgid "'x' is not a matrix"
@@ -198,7 +225,7 @@ msgstr "'x' (%d,%d)와 'y' (%d)의 차원들이 일치하지 않습니다"
 msgid "NA/NaN/Inf in '%s'"
 msgstr "'%s' 내에 NA/NaN/Inf가 있습니다"
 
-#: loessc.c:233
+#: loessc.c:240
 msgid "span is too small"
 msgstr "범위가 너무 작습니다"
 
@@ -226,19 +253,19 @@ msgstr "'iter'는 반드시 유한해야 하고 0보다 크거나 같아야 합
 msgid "'delta' must be finite and > 0"
 msgstr "'delta'는 반드시 유한해야 하고 0 보다 커야 합니다"
 
-#: mAR.c:467
+#: mAR.c:470
 msgid "Singular matrix in qr_solve"
 msgstr "qr_solve에 비가역행렬이 있습니다"
 
-#: mAR.c:510
+#: mAR.c:513
 msgid "Singular matrix in ldet"
 msgstr "ldet에 비가역행렬이 있습니다"
 
-#: mAR.c:697
+#: mAR.c:700
 msgid "Invalid vmethod"
 msgstr "유효하지 않은 vmethod입니다"
 
-#: mAR.c:833
+#: mAR.c:836
 msgid "Burg's algorithm failed to find partial correlation"
 msgstr "partial correlation을 찾기 위해 사용된 Burg의 알고리즘이 실패했습니다"
 
@@ -277,193 +304,191 @@ msgstr "변수의 길이들이 다릅니다 ('%s'에서 찾았습니다)"
 msgid "invalid result from na.action"
 msgstr "na.action으로부터 결과가 유효하지 않습니다"
 
-#: model.c:369 model.c:377 optim.c:197
+#: model.c:372 model.c:380 optim.c:197
 #, c-format
 msgid "invalid '%s' argument"
 msgstr "유효하지 않은 '%s' 인자입니다"
 
-#: model.c:388
+#: model.c:391
 msgid "invalid model frame"
 msgstr "유효하지 않은 모델프레임입니다"
 
-#: model.c:390
+#: model.c:393
 msgid "do not know how many cases"
 msgstr "얼마나 많은 경우들이 있는지 모릅니다"
 
-#: model.c:414
+#: model.c:417
 #, c-format
 msgid "variable lengths differ (found for variable %d)"
 msgstr "변수의 길이들이 다릅니다 (변수 %d에서 찾았습니다)"
 
-#: model.c:418 model.c:425
+#: model.c:421 model.c:428
 #, c-format
 msgid "variable %d has no levels"
 msgstr "변수 %d은 아무런 level을 가지고 있지 않습니다"
 
-#: model.c:537
+#: model.c:540
 msgid "the response appeared on the right-hand side and was dropped"
 msgstr "종속변수가 우변에서 발견되어 이를 포함시키지 않았습니다"
 
-#: model.c:557
+#: model.c:560
 #, c-format
 msgid "term %d would require %.0g columns"
 msgstr "항 %d는 %.0g 열들을 필요로 합니다"
 
-#: model.c:561
+#: model.c:564
 #, c-format
 msgid "matrix would require %.0g columns"
 msgstr "행렬은 %.0g 열들을 필요로 합니다"
 
-#: model.c:572
+#: model.c:575
 #, c-format
 msgid "problem with term %d in model.matrix: no columns are assigned"
-msgstr ""
-"model.matrix에 있는 항 %d에 문제가 있습니다: 아무런 열들도 할당되지 않았습니"
-"다"
+msgstr "model.matrix에 있는 항 %d에 문제가 있습니다: 아무런 열들도 할당되지 않았습니다"
 
-#: model.c:621 model.c:626 model.c:632 model.c:643 model.c:649 model.c:655
+#: model.c:624 model.c:629 model.c:635 model.c:646 model.c:652 model.c:658
 msgid "term names will be truncated"
 msgstr "항 이름들이 잘려질 것입니다"
 
-#: model.c:635
+#: model.c:638
 msgid "complex variables are not currently allowed in model matrices"
 msgstr "복소수 변수들은 현재 model matrices에서는 허용되지 않습니다"
 
-#: model.c:659
+#: model.c:662
 #, c-format
 msgid "variables of type '%s' are not allowed in model matrices"
 msgstr "유형 '%s'를 가지는 변수들은 model matrices에서 허용되지 않습니다"
 
-#: model.c:881
+#: model.c:884
 msgid "invalid formula in 'update'"
 msgstr "'update'내에 유효하지 않은 formula가 있습니다"
 
-#: model.c:915
+#: model.c:918
 msgid "formula expected"
 msgstr "formula가 와야 합니다"
 
-#: model.c:1046
+#: model.c:1049
 msgid "invalid term in model formula"
 msgstr "모델식에 유효하지 않은 항이 있습니다"
 
-#: model.c:1121
+#: model.c:1124
 msgid "invalid model formula"
 msgstr "유효하지 않은 모델식입니다"
 
-#: model.c:1147 model.c:1395
+#: model.c:1150 model.c:1410
 msgid "invalid power in formula"
 msgstr ""
 
-#: model.c:1183
+#: model.c:1186
 msgid "invalid model formula in ExtractVars"
 msgstr "ExtractVars에 유효하지 않은 모델식이 있습니다"
 
-#: model.c:1518
+#: model.c:1533
 #, c-format
 msgid "duplicated name '%s' in data frame using '.'"
 msgstr "'.'를 이용한 데이터 프레임에서 중복된 이름 '%s'을 발견했습니다"
 
-#: model.c:1576
+#: model.c:1594
 msgid "invalid model formula in EncodeVars"
 msgstr "EncodeVars내에 유효하지 않은 모델식이 발견되었습니다"
 
-#: model.c:1662
+#: model.c:1680
 msgid "argument is not a valid model"
 msgstr "인자가 유효한 모델이 아닙니다"
 
-#: model.c:1672
+#: model.c:1690
 msgid "'specials' must be NULL or a character vector"
 msgstr "'specials'는 반드시 NULL 또는 문자형 벡터이어야 합니다"
 
-#: model.c:1684
+#: model.c:1702
 msgid "'data' argument is of the wrong type"
 msgstr "'data' 인자의 유형이 잘못되었습니다"
 
-#: model.c:1952
+#: model.c:1972
 msgid "'.' in formula and no 'data' argument"
 msgstr "formula 안에  '.'가 사용되었는데 'data' 인자가 없습니다"
 
-#: monoSpl.c:34
+#: monoSpl.c:36
 msgid "n must be at least two"
 msgstr "n은 반드시 최소 2이상이어야 합니다"
 
-#: monoSpl.c:67
+#: monoSpl.c:69
 msgid "Argument m must be numeric"
 msgstr "인자 m은 반드시 수치형이어야 합니다"
 
-#: monoSpl.c:70
+#: monoSpl.c:72
 msgid "length(m) must be at least two"
 msgstr "length(m)은 반드시 최소 2이어야 합니다"
 
-#: monoSpl.c:72
+#: monoSpl.c:74
 msgid "Argument Sx must be numeric vector one shorter than m[]"
 msgstr "인자 Sx은 반드시 m[]의 길이보다 하나가 적은 숫자형 벡터이어야 합니다"
 
-#: nls.c:97
+#: nls.c:99
 msgid "'control' must be a list"
 msgstr "'control'은 반드시 리스트이어야 합니다"
 
-#: nls.c:99
+#: nls.c:101
 msgid "'m' must be a list"
 msgstr "'m'은 반드시 리스트이어야 합니다"
 
-#: nls.c:105 nls.c:110 nls.c:115 nls.c:120 nls.c:125 nls.c:166 nls.c:171
-#: nls.c:176 nls.c:181 nls.c:186 nls.c:191
+#: nls.c:107 nls.c:112 nls.c:117 nls.c:122 nls.c:127 nls.c:168 nls.c:173
+#: nls.c:178 nls.c:183 nls.c:188 nls.c:193
 #, c-format
 msgid "'%s' absent"
 msgstr "'%s'가 빠졌습니다"
 
-#: nls.c:232
+#: nls.c:234
 msgid "singular gradient"
 msgstr ""
 
-#: nls.c:253
+#: nls.c:255
 #, c-format
 msgid "step factor %g reduced below 'minFactor' of %g"
 msgstr ""
 
-#: nls.c:262
+#: nls.c:264
 #, c-format
 msgid "number of iterations exceeded maximum of %d"
 msgstr "지정된 최대 반복수 %d를 초과하였습니다"
 
-#: nls.c:267
+#: nls.c:269
 msgid "converged"
 msgstr "수렴했습니다"
 
-#: nls.c:288
+#: nls.c:290
 msgid "'theta' should be of type character"
 msgstr "'theta'는 반드시 문자형이어야 합니다"
 
-#: nls.c:290 port.c:375
+#: nls.c:292 port.c:376
 msgid "use of NULL environment is defunct"
 msgstr "NULL environment의 사용은 더 이상 지원되지 않습니다"
 
-#: nls.c:294
+#: nls.c:296
 msgid "'rho' should be an environment"
 msgstr "'rho'는 반드시 environment이어야 합니다"
 
-#: nls.c:297
+#: nls.c:299
 msgid "'dir' is not a numeric vector of the correct length"
 msgstr "'dir'은 올바른 길이를 가지는 수치형 벡터가 아닙니다"
 
-#: nls.c:311 nls.c:341
+#: nls.c:313 nls.c:347
 msgid "Missing value or an infinity produced when evaluating the model"
 msgstr "모델 평가시에 값이 누락되거나 무한값이 생성되었습니다"
 
-#: nls.c:318
+#: nls.c:321
 #, c-format
 msgid "variable '%s' is integer, not numeric"
 msgstr "변수 '%s'는 약분할 수 없는 정수입니다"
 
-#: nls.c:320
+#: nls.c:323
 #, c-format
 msgid "variable '%s' is not numeric"
 msgstr "변수 '%s'는 수치형이 아닙니다"
 
 #: optim.c:80 optim.c:107
 msgid "non-finite value supplied by optim"
-msgstr "무한값이 optim에 의해 제공되었습니다"
+msgstr "optim으로부터 유한(finite)하지 않은 값이 생성되었습니다."
 
 #: optim.c:87
 #, c-format
@@ -501,120 +526,120 @@ msgstr "'ndeps'의 길이가 잘못되었습니다"
 
 #: optim.c:370
 msgid "unknown 'method'"
-msgstr "알수없는 'method'입니다"
+msgstr "'method'를 알 수 없습니다."
 
-#: optimize.c:217 optimize.c:309 optimize.c:530
+#: optimize.c:220 optimize.c:306 optimize.c:528
 msgid "NA replaced by maximum positive value"
 msgstr "NA가 양의 최대값으로 대체되었습니다"
 
-#: optimize.c:225 optimize.c:321 optimize.c:538
+#: optimize.c:228 optimize.c:318 optimize.c:536
 msgid "NA/Inf replaced by maximum positive value"
 msgstr "NA/Inf가 양의 최대값으로 대체되었습니다"
 
-#: optimize.c:234
+#: optimize.c:237
 msgid "invalid function value in 'optimize'"
 msgstr "'optimize'에 유효하지 않은 함수값이 있습니다"
 
-#: optimize.c:252 optimize.c:350 optimize.c:723
+#: optimize.c:255 optimize.c:347 optimize.c:721
 msgid "attempt to minimize non-function"
 msgstr "함수가 아닌 것을 최소화하려 하였습니다"
 
-#: optimize.c:259 optimize.c:266 optimize.c:275 optimize.c:355 optimize.c:360
-#: optimize.c:376
+#: optimize.c:262 optimize.c:269 optimize.c:278 optimize.c:352 optimize.c:357
+#: optimize.c:373
 #, c-format
 msgid "invalid '%s' value"
 msgstr "유효하지 않은 '%s'값입니다"
 
-#: optimize.c:268 optimize.c:361
+#: optimize.c:271 optimize.c:358
 msgid "'xmin' not less than 'xmax'"
 msgstr "'xmin'가 'xmax'보다 적습니다"
 
-#: optimize.c:318
+#: optimize.c:315
 msgid "-Inf replaced by maximally negative value"
 msgstr "-Inf는 음의 최대값으로 대체되었습니다"
 
-#: optimize.c:331
+#: optimize.c:328
 msgid "invalid function value in 'zeroin'"
 msgstr "'zeroin'내에 유효하지 않은 함수값이 있습니다"
 
-#: optimize.c:366 optimize.c:371
+#: optimize.c:363 optimize.c:368
 #, c-format
 msgid "NA value for '%s' is not allowed"
 msgstr "'%s'에 NA값은 허용되지 않습니다"
 
-#: optimize.c:381
+#: optimize.c:378
 msgid "'maxiter' must be positive"
 msgstr "'maxiter'는 반드시 양수이어야 합니다"
 
-#: optimize.c:522
+#: optimize.c:520
 msgid "non-finite value supplied by 'nlm'"
 msgstr "무한값이 'nlm'에 의해 제공되었습니다"
 
-#: optimize.c:557
+#: optimize.c:555
 msgid "invalid function value in 'nlm' optimizer"
 msgstr "'nlm' 옵티마이저에서 유효하지 않은 함수값이 있습니다"
 
-#: optimize.c:568 optimize.c:583
+#: optimize.c:566 optimize.c:581
 msgid "function value caching for optimization is seriously confused"
 msgstr ""
 
-#: optimize.c:598
+#: optimize.c:596
 msgid "numeric parameter expected"
 msgstr "수치형 파라미터가 와야 합니다"
 
-#: optimize.c:602
+#: optimize.c:600
 msgid "conflicting parameter lengths"
 msgstr "파마미터의 길이들이 일치하지 않습니다"
 
-#: optimize.c:606
+#: optimize.c:604
 msgid "invalid parameter length"
-msgstr "유효하지 않은 파라미터 길이입니다"
+msgstr "파라미터 길이가 올바르지 않습니다."
 
-#: optimize.c:616 optimize.c:623
+#: optimize.c:614 optimize.c:621
 msgid "missing value in parameter"
 msgstr "파라미터에 누락된 값이 있습니다"
 
-#: optimize.c:628
+#: optimize.c:626
 msgid "invalid parameter type"
-msgstr "유효하지 않은 파라미터 타입입니다"
+msgstr "파라미터의 종류(type)가 올바르지 않습니다."
 
-#: optimize.c:639
+#: optimize.c:637
 msgid "non-positive number of parameters in nlm"
-msgstr "nlm에 파라미터의 개수가 양수가 아닙니다"
+msgstr "nlm에 파라미터의 개수가 양수가 아닙니다."
 
-#: optimize.c:641
+#: optimize.c:639
 msgid "nlm is inefficient for 1-d problems"
-msgstr "nlm의 사용은 1차원 문제에 대해서 효율적이지 않습니다"
+msgstr "nlm의 사용은 1차원 문제에 대해서 효율적이지 않습니다."
 
-#: optimize.c:643
+#: optimize.c:641
 msgid "invalid gradient tolerance in nlm"
 msgstr "nlm에 이용되는 gradient tolerance는 유효하지 않습니다"
 
-#: optimize.c:645
+#: optimize.c:643
 msgid "invalid iteration limit in nlm"
 msgstr "nlm에 이용되는 iteration limit의 값이 유효하지 않습니다"
 
-#: optimize.c:647
+#: optimize.c:645
 msgid "minimization function has no good digits in nlm"
 msgstr ""
 
-#: optimize.c:649
+#: optimize.c:647
 msgid "no analytic gradient to check in nlm!"
 msgstr "nlm에서 확인할 수 있는 analytic gradient가 없습니다!"
 
-#: optimize.c:651
+#: optimize.c:649
 msgid "no analytic Hessian to check in nlm!"
 msgstr "nlm에서 확인할 수 있는 analytic Hessian이 없습니다"
 
-#: optimize.c:653
+#: optimize.c:651
 msgid "probable coding error in analytic gradient"
 msgstr "analytic gradient에 아마도 코딩에러가 있는 것 같습니다"
 
-#: optimize.c:655
+#: optimize.c:653
 msgid "probable coding error in analytic Hessian"
 msgstr "analytic Hessian에 아마도 코딩에러가 있는 것 같습니다"
 
-#: optimize.c:657
+#: optimize.c:655
 #, c-format
 msgid ""
 "*** unknown error message (msg = %d) in nlm()\n"
@@ -623,23 +648,23 @@ msgstr ""
 "*** nlm()에서 알 수 없는 메시지 (msg = %d)가 있습니다\n"
 "*** 이것은 일어나서는 안되는 경우입니다!"
 
-#: optimize.c:668
+#: optimize.c:666
 msgid "Relative gradient close to zero.\n"
 msgstr "Relative gradient의 값이 0에 가깝습니다.\n"
 
-#: optimize.c:669 optimize.c:673
+#: optimize.c:667 optimize.c:671
 msgid "Current iterate is probably solution.\n"
 msgstr "current iterate가 아마도 찾고자 하는 솔루션일 것입니다.\n"
 
-#: optimize.c:672
+#: optimize.c:670
 msgid "Successive iterates within tolerance.\n"
 msgstr "허용치내의 successive iterates입니다.\n"
 
-#: optimize.c:676
+#: optimize.c:674
 msgid "Last global step failed to locate a point lower than x.\n"
 msgstr ""
 
-#: optimize.c:677
+#: optimize.c:675
 msgid ""
 "Either x is an approximate local minimum of the function,\n"
 "the function is too non-linear for this algorithm,\n"
@@ -649,11 +674,11 @@ msgstr ""
 "함수가 이 알고리즘의 적용에 대해서는 너무 비선형이거나,\n"
 "steptol이 너무 큽니다.\n"
 
-#: optimize.c:682
+#: optimize.c:680
 msgid "Iteration limit exceeded.  Algorithm failed.\n"
 msgstr "Iteration limit을 초과하였으므로 알고리즘이 실패했습니다.\n"
 
-#: optimize.c:685
+#: optimize.c:683
 msgid ""
 "Maximum step size exceeded 5 consecutive times.\n"
 "Either the function is unbounded below,\n"
@@ -662,150 +687,160 @@ msgid ""
 "or stepmx is too small.\n"
 msgstr ""
 
-#: optimize.c:747 optimize.c:752 optimize.c:756 optimize.c:760 optimize.c:764
-#: optimize.c:768 optimize.c:773
+#: optimize.c:745 optimize.c:750 optimize.c:754 optimize.c:758 optimize.c:762
+#: optimize.c:766 optimize.c:771
 msgid "invalid NA value in parameter"
-msgstr "파라미터에 유효하지 않은 NA값이 있습니다"
+msgstr "파라미터에는 NA를 사용할 수 없습니다."
 
-#: optimize.c:804
+#: optimize.c:800
 msgid "hessian supplied is of the wrong length or mode, so ignored"
-msgstr "얻어진 hessian의 길이 또는 모드가 잘못되었으므로, 무시됩니다"
+msgstr "얻어진 hessian의 길이 또는 모드가 잘못되었으므로, 사용하지 않습니다."
 
-#: optimize.c:808
+#: optimize.c:804
 msgid "gradient supplied is of the wrong length or mode, so ignored"
-msgstr "얻어진 gradient의 길이 또는 모드가 잘못되었으므로, 무시됩니다"
+msgstr "얻어진 gradient의 길이 또는 모드가 잘못되었으므로, 사용하지 않습니다."
 
-#: pacf.c:94
+#: pacf.c:87
 msgid "bad Starma struct"
-msgstr "Starma struct가 잘못되었습니다"
+msgstr ""
 
-#: pacf.c:240
+#: pacf.c:233
 #, c-format
 msgid "starma error code %d"
-msgstr "starma 에러코드 %d입니다"
+msgstr ""
 
-#: pacf.c:300
+#: pacf.c:293
 #, c-format
 msgid "forkal error code %d"
-msgstr "forkal 에러코드 %d입니다"
+msgstr ""
 
-#: pacf.c:474
+#: pacf.c:466
 msgid "invalid value of lag.max"
-msgstr "lag.max의 값이 유효하지 않습니다"
+msgstr "lag.max의 값이 올바르지 않습니다."
 
 #: port.c:133
 #, c-format
 msgid "Rf_divset: alg = %d must be 1, 2, 3, or 4"
-msgstr "Rf_divset: alg = %d는 반드시 1, 2, 3, 또는 4이어야 합니다"
+msgstr "Rf_divset: alg = %d는 반드시 1, 2, 3, 또는 4이어야 합니다."
+
+#: port.c:149
+msgid "port algorithms 3 or higher are not supported"
+msgstr ""
 
-#: port.c:312
+#: port.c:313
 #, c-format
 msgid "gradient function must return a numeric vector of length %d"
 msgstr "gradient function은 반드시 길이가 %d인 수치형 벡터를 반환해야 합니다"
 
-#: port.c:324
+#: port.c:325
 #, c-format
 msgid "Hessian function must return a square numeric matrix of order %d"
-msgstr ""
-"Hessian function은 반드시 사이즈가 %d인 수치형 정방행렬을 반환해야 합니다"
+msgstr "Hessian function은 반드시 사이즈가 %d인 수치형 정방행렬을 반환해야 합니다"
 
-#: port.c:379
+#: port.c:380
 msgid "'rho' must be an environment"
-msgstr "'rho'는 반드시 environment이어야 합니다"
+msgstr "'rho'는 반드시 인바이런먼트(environment)이어야 합니다."
 
-#: port.c:381 port.c:542
+#: port.c:382 port.c:548
 msgid "'d' must be a nonempty numeric vector"
 msgstr "'d'는 반드시 비어있지 않은 수치형 벡터이어야 합니다"
 
-#: port.c:383
+#: port.c:384
 msgid "When Hessian defined must also have gradient defined"
-msgstr "Hessian이 정의되었다면, 반드시 gradient 또한 정의되어져야 합니다"
+msgstr "Hessian이 정의되었다면, 반드시 gradient 또한 정의되어져야 합니다."
 
-#: port.c:386
+#: port.c:387
 #, c-format
 msgid "environment 'rho' must contain a numeric vector '.par' of length %d"
-msgstr ""
-"environment 'rho'는 반드시 길이가 %d인 수치형 벡터 '.par'를 포함해야 합니다"
+msgstr "environment 'rho'는 반드시 길이가 %d인 수치형 벡터 '.par'를 포함해야 합니다"
 
-#: port.c:400
+#: port.c:401
 msgid "'lower' and 'upper' must be numeric vectors"
-msgstr "'lower'와 'upper'는 반드시 수치형 벡터들이어야 합니다"
+msgstr "'lower'와 'upper'는 반드시 수치형 벡터들이어야 합니다."
 
-#: port.c:456
+#: port.c:460
 msgid "'getElement' applies only to named lists"
-msgstr ""
+msgstr "'getElement'는 오로지 원소에 이름이 주어진 리스트(list)들에만 적용할 수 있습니다."
 
-#: port.c:477
+#: port.c:481
 #, c-format
 msgid "%s$%s() not found"
-msgstr "%s$%s()를 찾을 수 없습니다"
+msgstr "%s$%s()를 찾을 수 없습니다."
 
-#: port.c:490
+#: port.c:494
 #, c-format
 msgid "'gradient' must be a numeric matrix of dimension (%d,%d)"
-msgstr "'gradient'는 반드시 크기가 (%d,%d)인 수치형 행렬이어야 합니다"
+msgstr "'gradient'는 반드시 크기가 (%d,%d)인 수치형 행렬이어야 합니다."
 
-#: port.c:511
+#: port.c:515
 #, c-format
 msgid "fcn produced mode %d, length %d - wanted mode %d, length %d"
-msgstr ""
-"fcn은 본래 모드 %3$d와 길이 %4$d이어야 하는데 모드 %1$d와 길이 %2$d를 생성하"
-"였습니다"
+msgstr "fcn은 본래 모드 %3$d와 길이 %4$d이어야 하는데 모드 %1$d와 길이 %2$d를 생성하였습니다."
 
-#: port.c:524
+#: port.c:528
 msgid "invalid type for eval_check_store"
-msgstr "eval_check_store에 유효하지 않은 타입입니다"
+msgstr "eval_check_store에 올바르지 않은 유형(type)입니다."
 
-#: port.c:543
+#: port.c:549
 msgid "m must be a list"
-msgstr "m은 반드시 리스트이어야 합니다"
+msgstr "m은 반드시 리스트(list)이어야 합니다."
 
-#: port.c:563
+#: port.c:569
 msgid "'lowerb' and 'upperb' must be numeric vectors"
-msgstr "'lowerb'와 'upperb'는 반드시 수치형 벡터들이어야 합니다"
+msgstr "'lowerb'와 'upperb'는 반드시 수치형 벡터들이어야 합니다."
 
-#: rWishart.c:51
+#: rWishart.c:53
 msgid "inconsistent degrees of freedom and dimension"
 msgstr ""
 
-#: rWishart.c:84
+#: rWishart.c:86
 msgid "'scal' must be a square, real matrix"
-msgstr "'scal'은 반드시 실수형 정방행렬이어야 합니다"
+msgstr "'scal'은 반드시 실수형 정방행렬이어야 합니다."
 
-#: rWishart.c:96
+#: rWishart.c:98
 msgid "'scal' matrix is not positive-definite"
-msgstr "'scal'행렬은 positive-definite가 아닙니다"
-
-#: random.c:66 random.c:70 random.c:75 random.c:80 random.c:161 random.c:167
-#: random.c:172 random.c:177 random.c:240 random.c:245 random.c:250
-#: random.c:264 random.c:355
-msgid "invalid arguments"
-msgstr "유효하지 않은 인자들입니다"
+msgstr "'scal'행렬은 양정치(positive-definite)가 아닙니다."
 
-#: random.c:95 random.c:121 random.c:194 random.c:222 random.c:270
-#: random.c:289
+#: random.c:53 random.c:128 random.c:200 random.c:284
 msgid "NAs produced"
 msgstr "NA가 생성되었습니다"
 
-#: random.c:308
-msgid "invalid first argument 'n'"
-msgstr "유효하지 않은 첫번째 인자 'n'입니다"
+#: random.c:60 random.c:66 random.c:72 random.c:90 random.c:161 random.c:242
+#: random.c:376
+msgid "invalid arguments"
+msgstr "인자가 올바르지 않습니다."
 
 #: random.c:310
+msgid "NA in probability vector"
+msgstr "확률벡터로부터 NA가 발견되었습니다."
+
+#: random.c:312
+msgid "negative probability"
+msgstr "음수를 가지는 확률값입니다."
+
+#: random.c:318
+msgid "no positive probabilities"
+msgstr "양수를 가지는 확률값들이 없습니다."
+
+#: random.c:330
+msgid "invalid first argument 'n'"
+msgstr "첫번째 인자 'n'이 올바르지 않습니다."
+
+#: random.c:332
 msgid "invalid second argument 'size'"
-msgstr "유효하지 않은 두번째 인자 'size'입니다"
+msgstr "두 번째 인자 'size'가 올바르지 않습니다."
 
 #: rcont.c:83
 #, c-format
 msgid "rcont2 [%d,%d]: exp underflow to 0; algorithm failure"
-msgstr "rcont2 [%d,%d]: exp는 0으로 언더플로우 했으므로 알고리즘 실패입니다"
+msgstr "rcont2 [%d,%d]: exp의 값이 0보다 작기(underflow)하므로 알고리즘 실패입니다."
 
-#: smooth.c:101
+#: smooth.c:107
 #, c-format
 msgid "invalid end-rule for running median of 3: %d"
 msgstr ""
 
-#: starma.c:366
+#: starma.c:364
 #, c-format
 msgid "missing value in last %d observations"
-msgstr "마지막 %d 개의 관측값들에서 결측치들이 존재합니다"
+msgstr "마지막 %d개의 관측치들이 결측입니다."
diff --git a/src/library/stats/po/pl.po b/src/library/stats/po/pl.po
index 29d52c7..5044164 100644
--- a/src/library/stats/po/pl.po
+++ b/src/library/stats/po/pl.po
@@ -1,8 +1,8 @@
 msgid ""
 msgstr ""
-"Project-Id-Version: R 3.1.0\n"
-"Report-Msgid-Bugs-To: bugs.r-project.org\n"
-"POT-Creation-Date: 2014-03-27 18:36+0000\n"
+"Project-Id-Version: R 3.4.0\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2016-04-01 10:01-0700\n"
 "PO-Revision-Date: \n"
 "Last-Translator: Łukasz Daniel <lukasz.daniel at gmail.com>\n"
 "Language-Team: Łukasz Daniel <lukasz.daniel at gmail.com>\n"
@@ -13,1036 +13,628 @@ msgstr ""
 "na-Revision-Date: 2012-05-29 07:55+0100\n"
 "Plural-Forms: nplurals=3; plural=(n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 "
 "|| n%100>=20) ? 1 : 2);\n"
-"X-Poedit-SourceCharset: iso-8859-1\n"
-"X-Generator: Poedit 1.5.4\n"
+"X-Poedit-SourceCharset: UTF-8\n"
+"X-Generator: Poedit 1.8.7\n"
 
-# stats/src/Srunmed.c: 55
-# error(_("bandwidth/span of running medians is larger than n"))
-#: Srunmed.c:55
+#: Srunmed.c:54
 msgid "bandwidth/span of running medians is larger than n"
 msgstr "pasmo/rozpiętość ruchomych median jest większe niż 'n'"
 
-# stats/src/ansari.c: 116
-# error(_("probabilities outside [0,1] in qansari()"))
-#: ansari.c:116
+#: ansari.c:118
 msgid "probabilities outside [0,1] in qansari()"
 msgstr "prawdopodobieństwa poza przedziałem [0,1] w 'qansari()'"
 
-# stats/src/approx.c: 102
-# error(_("approx(): invalid f value"))
 #: approx.c:102
 msgid "approx(): invalid f value"
 msgstr "approx(): niepoprawna wartość 'f'"
 
-# stats/src/approx.c: 105
-# error(_("approx(): invalid interpolation method"))
 #: approx.c:105
 msgid "approx(): invalid interpolation method"
 msgstr "approx(): niepoprawna metoda interpolacji"
 
-# stats/src/approx.c: 111
-# error(_("approx(): attempted to interpolate NA values"))
 #: approx.c:111
 msgid "approx(): attempted to interpolate NA values"
 msgstr "approx(): próbowano interpolować wartości NA"
 
-# stats/src/arima.c: 81
-# error(_("invalid argument type"))
-# stats/src/arima.c: 192
-# error(_("invalid argument type"))
-# stats/src/arima.c: 377
-# error(_("invalid argument type"))
-# stats/src/arima.c: 608
-# error(_("invalid argument type"))
 #: arima.c:81 arima.c:192 arima.c:377 arima.c:608
 msgid "invalid argument type"
 msgstr "niepoprawny typ argumentu"
 
-# stats/src/pacf.c: 331
-# error(_("can only transform 100 pars in arima0"))
-# stats/src/pacf.c: 371
-# error(_("can only transform 100 pars in arima0"))
-# stats/src/arima.c: 444
-# error(_("can only transform 100 pars in arima0"))
-# stats/src/arima.c: 530
-# error(_("can only transform 100 pars in arima0"))
-#: arima.c:444 arima.c:530 pacf.c:331 pacf.c:371
+#: arima.c:444 arima.c:530 pacf.c:324 pacf.c:363
 msgid "can only transform 100 pars in arima0"
 msgstr "można przekształcić tylko do 100 par w 'arima0'"
 
-# stats/src/arima.c: 1016
-# error(_("maximum supported lag is 350"))
 #: arima.c:1016
 msgid "maximum supported lag is 350"
 msgstr "maksymalne obsługiwane opóźnienie wynosi 350"
 
-# stats/src/complete_cases.c: 26
-# 	_("invalid 'type' (%s) of argument")
+#: bandwidths.c:121
+#, c-format
+msgid "non-finite x[%d] in bandwidth calculation"
+msgstr "nieskończone x[%d] w obliczeniach pasma"
+
 #: complete_cases.c:26
 #, c-format
 msgid "invalid 'type' (%s) of argument"
 msgstr "niepoprawny 'type' (%s) argumentu"
 
-# stats/src/complete_cases.c: 120
-# error(_("no input has determined the number of cases"))
 #: complete_cases.c:120
 msgid "no input has determined the number of cases"
 msgstr "żadne wejście nie określiło liczby przypadków"
 
-# stats/src/complete_cases.c: 223
-# error(_("not all arguments have the same length"))
 #: complete_cases.c:223
 msgid "not all arguments have the same length"
 msgstr "nie wszystkie argumenty mają tę samą długość"
 
-# stats/src/cov.c: 566
-# error(_("missing observations in cov/cor"))
-#: cov.c:566
+#: cov.c:569
 msgid "missing observations in cov/cor"
 msgstr "brakujące obserwacje w macierzy kowariancji/korelacji"
 
-# stats/src/cov.c: 644
-# error(_("'x' is NULL"))
-#: cov.c:644
+#: cov.c:643
 msgid "'x' is NULL"
 msgstr "'x' ma wartość NULL"
 
-# stats/src/cov.c: 663
-# error(_("incompatible dimensions"))
-# stats/src/cov.c: 669
-# error(_("incompatible dimensions"))
-# stats/R/lm.R: 108
-# stop("incompatible dimensions")
-# stats/R/lm.R: 165
-# stop("incompatible dimensions")
-#: cov.c:663 cov.c:669
+#: cov.c:645
+msgid "'x' is a factor"
+msgstr "argument 'x' jest czynnikiem"
+
+#: cov.c:665
+msgid "'y' is a factor"
+msgstr "argument 'y' jest czynnikiem"
+
+#: cov.c:673 cov.c:679
 msgid "incompatible dimensions"
 msgstr "niezgodne wymiary"
 
-# stats/src/cov.c: 688
-# error(_("no complete element pairs"))
-# stats/src/cov.c: 729
-# error(_("no complete element pairs"))
-# stats/src/cov.c: 762
-# error(_("no complete element pairs"))
-#: cov.c:688 cov.c:729 cov.c:762
+#: cov.c:698 cov.c:739 cov.c:772
 msgid "no complete element pairs"
 msgstr "brak kompletnych par elementów"
 
-# stats/src/cov.c: 701
-# error(_("invalid 'use' (computational method)"))
-#: cov.c:701
+#: cov.c:711
 msgid "invalid 'use' (computational method)"
 msgstr "niepoprawne 'use' (metoda obliczeniowa)"
 
-# stats/src/cov.c: 704
-# error(_("'x' is empty"))
-# stats/R/cor.R: 77
-# stop("'x' is empty")
-#: cov.c:704
+#: cov.c:714
 msgid "'x' is empty"
 msgstr "'x' jest puste"
 
-# stats/src/cov.c: 798
-# warning(_("the standard deviation is zero"))
-#: cov.c:798
+#: cov.c:808
 msgid "the standard deviation is zero"
 msgstr "odchylenie standardowe wynosi zero"
 
-# stats/src/deriv.c: 126
-# error(_("invalid form in unary minus check"))
 #: deriv.c:126
 msgid "invalid form in unary minus check"
 msgstr "niepoprawna forma sprawdzania jednoargumentowej operacji minus"
 
-# stats/src/deriv.c: 533
-# error(_("Function '%s' is not in the derivatives table"),
-# 		  translateChar(STRING_ELT(u, 0)))
 #: deriv.c:535
 #, c-format
 msgid "Function '%s' is not in the derivatives table"
 msgstr "Funkcja '%s' nie znajduje się w tablicy pochodnych"
 
-# stats/src/deriv.c: 640
-# error(_("variable must be a character string"))
-#: deriv.c:642
+#: deriv.c:641
+msgid "'expr' must be an expression or call"
+msgstr "argument 'expr' musi być wyrażeniem lub wywołaniem"
+
+#: deriv.c:644
 msgid "variable must be a character string"
 msgstr "zmienna musi być łańcuchem tekstowym"
 
-# stats/src/deriv.c: 642
-# warning(_("only the first element is used as variable name"))
-#: deriv.c:644
+#: deriv.c:646
 msgid "only the first element is used as variable name"
 msgstr "tylko pierwszy element jest używany jako nazwa zmiennej"
 
-# stats/src/deriv.c: 655
-# error(_("invalid expression in '%s'"), where)
-#: deriv.c:657
+#: deriv.c:659
 #, c-format
 msgid "invalid expression in '%s'"
 msgstr "niepoprawne wyrażenie w '%s'"
 
-# stats/src/deriv.c: 933
-# error(_("invalid variable names"))
-# stats/src/model.c: 99
-# error(_("invalid variable names"))
-#: deriv.c:935 model.c:99
+#: deriv.c:937 model.c:99
 msgid "invalid variable names"
 msgstr "niepoprawne nazwy zmiennych"
 
-# stats/src/deriv.c: 942
-# error(_("invalid tag"))
-#: deriv.c:944
+#: deriv.c:946
 msgid "invalid tag"
 msgstr "niepoprawny znacznik"
 
-# stats/src/distance.c: 153
-# warning(_("treating non-finite values as NA"))
-#: distance.c:153
+#: distance.c:152
 msgid "treating non-finite values as NA"
 msgstr "traktowanie nieskończonych wartości jako NA"
 
-# stats/src/distance.c: 226
-# error(_("distance(): invalid p"))
-#: distance.c:226
+#: distance.c:225
 msgid "distance(): invalid p"
 msgstr "distance(): niepoprawne 'p'"
 
-# stats/src/distance.c: 229
-# error(_("distance(): invalid distance"))
-#: distance.c:229
+#: distance.c:228
 msgid "distance(): invalid distance"
 msgstr "distance(): niepoprawna odległość"
 
-# stats/src/distn.c: 41
-# 	_("NaNs produced")
 #: distn.c:41
 msgid "NaNs produced"
 msgstr "wyprodukowano wartości NaN"
 
-# stats/src/distn.c: 42
-#  _("Non-numeric argument to mathematical function")
 #: distn.c:42
 msgid "Non-numeric argument to mathematical function"
 msgstr "Argument nieliczbowy przekazany do funkcji matematycznej"
 
-# stats/src/family.c: 44
-# error(_("Value %g out of range (0, 1)"), x)
-#: family.c:44
+#: family.c:45
 #, c-format
 msgid "Value %g out of range (0, 1)"
 msgstr "Wartość %g jest poza zakresem (0, 1)"
 
-# stats/src/family.c: 65
-# error(_("Argument %s must be a nonempty numeric vector"), "mu")
-# stats/src/family.c: 79
-# error(_("Argument %s must be a nonempty numeric vector"), "eta")
-# stats/src/family.c: 97
-# error(_("Argument %s must be a nonempty numeric vector"), "eta")
-#: family.c:65 family.c:79 family.c:97
+#: family.c:66 family.c:80 family.c:98
 #, c-format
 msgid "Argument %s must be a nonempty numeric vector"
 msgstr "Argument '%s' musi być niepustym wektorem liczbowym"
 
-# stats/src/family.c: 130
-# error(_("argument %s must be a numeric vector of length 1 or length %d"),
-# 	      "mu", n)
-# stats/src/family.c: 133
-# error(_("argument %s must be a numeric vector of length 1 or length %d"),
-# 	      "wt", n)
-#: family.c:130 family.c:133
+#: family.c:131 family.c:134
 #, c-format
 msgid "argument %s must be a numeric vector of length 1 or length %d"
 msgstr "argument '%s' musi być wektorem liczbowym o długości 1 lub długości %d"
 
-# stats/src/fourier.c: 66
-# error(_("non-numeric argument"))
-# stats/src/fourier.c: 161
-# error(_("non-numeric argument"))
 #: fourier.c:66 fourier.c:161
 msgid "non-numeric argument"
 msgstr "argument nieliczbowy"
 
-# stats/src/fourier.c: 84
-# error(_("fft factorization error"))
-# stats/src/fourier.c: 102
-# error(_("fft factorization error"))
-# stats/src/fourier.c: 175
-# error(_("fft factorization error"))
 #: fourier.c:84 fourier.c:102 fourier.c:175
 msgid "fft factorization error"
 msgstr "błąd faktoryzacji szybkiej transformaty Fouriera"
 
-# stats/src/fourier.c: 147
-# error(_("vector-valued (multivariate) series required"))
 #: fourier.c:147
 msgid "vector-valued (multivariate) series required"
 msgstr "wymagany jest (wielowymiarowy) szereg o wartościach będących wektorami"
 
-# stats/src/fourier.c: 223
-# error(_("no factors"))
 #: fourier.c:223
 msgid "no factors"
 msgstr "brak czynników"
 
-# stats/src/fourier.c: 226
-# error(_("invalid factors"))
 #: fourier.c:226
 msgid "invalid factors"
 msgstr "niepoprawne czynniki"
 
-# stats/src/ksmooth.c: 67
-# error(_("only 2500 rows are allowed for sm.method=\"spline\""))
-#: ksmooth.c:67
+#: integrate.c:84 integrate.c:86 integrate.c:128
+#, c-format
+msgid "'%s' must be of length one"
+msgstr "argument '%s' musi mieć długość 1"
+
+#: ksmooth.c:68
 msgid "only 2500 rows are allowed for sm.method=\"spline\""
 msgstr "tylko 2500 wierszy jest dozwolonych dla 'sm.method=\"spline\"'"
 
-# stats/src/lm.c: 57
-# error(_("'x' is not a matrix"))
 #: lm.c:57
 msgid "'x' is not a matrix"
 msgstr "argument 'x' nie jest macierzą"
 
-# stats/src/lm.c: 62
-# error(_("dimensions of 'x' (%d,%d) and 'y' (%d) do not match"),
-# 	      n,p, XLENGTH(y))
 #: lm.c:62
 #, c-format
 msgid "dimensions of 'x' (%d,%d) and 'y' (%d) do not match"
 msgstr "wymiary 'x' (%d,%d) oraz 'y' (%d) nie zgadzają się"
 
-# stats/src/lm.c: 77
-# error(_("NA/NaN/Inf in '%s'"), "x")
-# stats/src/lm.c: 81
-# error(_("NA/NaN/Inf in '%s'"), "y")
 #: lm.c:77 lm.c:81
 #, c-format
 msgid "NA/NaN/Inf in '%s'"
 msgstr "wartości NA/NaN/Inf w '%s'"
 
-# stats/src/loessc.c: 233
-# error(_("span is too small"))
-#: loessc.c:233
+#: loessc.c:240
 msgid "span is too small"
 msgstr "argument 'span' jest zbyt mały"
 
-# stats/src/loglin.c: 371
-# error(_("this should not happen"))
 #: loglin.c:371
 msgid "this should not happen"
 msgstr "to nie powinno się wydarzyć"
 
-# stats/src/loglin.c: 373
-# warning(_("algorithm did not converge"))
 #: loglin.c:373
 msgid "algorithm did not converge"
 msgstr "algorytm nie uzbieżnił się"
 
-# stats/src/loglin.c: 375
-# error(_("incorrect specification of 'table' or 'start'"))
 #: loglin.c:375
 msgid "incorrect specification of 'table' or 'start'"
 msgstr "niepoprawne określenie 'table' lub 'start'"
 
-# stats/src/lowess.c: 292
-# error(_("'f' must be finite and > 0"))
 #: lowess.c:292
 msgid "'f' must be finite and > 0"
 msgstr "argument 'f' musi być skończony oraz > 0"
 
-# stats/src/lowess.c: 295
-# error(_("'iter' must be finite and >= 0"))
 #: lowess.c:295
 msgid "'iter' must be finite and >= 0"
 msgstr "argument 'iter' musi być skończony oraz >= 0"
 
-# stats/src/lowess.c: 298
-# error(_("'delta' must be finite and > 0"))
 #: lowess.c:298
 msgid "'delta' must be finite and > 0"
 msgstr "argument 'delta' musi być skończony oraz > 0"
 
-# stats/src/mAR.c: 467
-# error(_("Singular matrix in qr_solve"))
-#: mAR.c:467
+#: mAR.c:470
 msgid "Singular matrix in qr_solve"
 msgstr "Osobliwa macierz w 'qr_solve'"
 
-# stats/src/mAR.c: 510
-# error(_("Singular matrix in ldet"))
-#: mAR.c:510
+#: mAR.c:513
 msgid "Singular matrix in ldet"
 msgstr "Osobliwa macierz w 'qr_solve'"
 
-# stats/src/mAR.c: 697
-# error(_("Invalid vmethod"))
-#: mAR.c:697
+#: mAR.c:700
 msgid "Invalid vmethod"
 msgstr "Niepoprawne 'vmethod'"
 
-# stats/src/mAR.c: 833
-# error(_("Burg's algorithm failed to find partial correlation"))
-#: mAR.c:833
+#: mAR.c:836
 msgid "Burg's algorithm failed to find partial correlation"
 msgstr ""
 "Algorytm Burga nie powiódł się przy próbie znalezienia częściowej korelacji"
 
-# stats/src/model.c: 97
-# error(_("invalid variables"))
 #: model.c:97
 msgid "invalid variables"
 msgstr "niepoprawne zmienne"
 
-# stats/src/model.c: 101
-# error(_("number of variables != number of variable names"))
-# stats/src/model.c: 106
-# error(_("number of variables != number of variable names"))
 #: model.c:101 model.c:106
 msgid "number of variables != number of variable names"
 msgstr "liczba zmiennych != liczbie nazw zmiennych"
 
-# stats/src/model.c: 104
-# error(_("invalid extra variables"))
 #: model.c:104
 msgid "invalid extra variables"
 msgstr "niepoprawne dodatkowe zmienne"
 
-# stats/src/model.c: 108
-# error(_("invalid extra variable names"))
 #: model.c:108
 msgid "invalid extra variable names"
 msgstr "niepoprawne nazwy dodatkowych zmiennych"
 
-# stats/src/model.c: 129
-# error(_("overlong names in '%s'"), ss)
 #: model.c:129
 #, c-format
 msgid "overlong names in '%s'"
 msgstr "zbyt długie nazwy w '%s'"
 
-# stats/src/model.c: 156
-# error(_("invalid type (%s) for variable '%s'"),
-# 		      type2char(TYPEOF(ans)),
-# 		      translateChar(STRING_ELT(names, i)))
 #: model.c:156
 #, c-format
 msgid "invalid type (%s) for variable '%s'"
 msgstr "niepoprawny typ (%s) dla zmiennej '%s'"
 
-# stats/src/model.c: 161
-# error(_("variable lengths differ (found for '%s')"),
-# 		      translateChar(STRING_ELT(names, i)))
 #: model.c:161
 #, c-format
 msgid "variable lengths differ (found for '%s')"
 msgstr "długości zmiennych różnią się (znaleziono dla '%s')"
 
-# stats/src/model.c: 215
-# error(_("invalid result from na.action"))
 #: model.c:215
 msgid "invalid result from na.action"
 msgstr "niepoprawny wynik z 'na.action'"
 
-# stats/src/optim.c: 197
-# error(_("invalid '%s' argument"), "method")
-# stats/src/model.c: 369
-# error(_("invalid '%s' argument"), "terms")
-# stats/src/model.c: 377
-# error(_("invalid '%s' argument"), "terms")
-# stats/src/massdist.c: 41
-# error("invalid '%s' argument", "n")
-#: model.c:369 model.c:377 optim.c:197
+#: model.c:372 model.c:380 optim.c:197
 #, c-format
 msgid "invalid '%s' argument"
 msgstr "niepoprawny argument '%s'"
 
-# stats/src/model.c: 388
-# error(_("invalid model frame"))
-#: model.c:388
+#: model.c:391
 msgid "invalid model frame"
 msgstr "niepoprawna ramka modelu"
 
-# stats/src/model.c: 390
-# error(_("do not know how many cases"))
-#: model.c:390
+#: model.c:393
 msgid "do not know how many cases"
 msgstr "nie wiadomo jak wiele przypadków"
 
-# stats/src/model.c: 414
-# error(_("variable lengths differ (found for variable %d)"), i)
-#: model.c:414
+#: model.c:417
 #, c-format
 msgid "variable lengths differ (found for variable %d)"
 msgstr "długości zmiennej różnią się (znaleziono dla zmiennej %d)"
 
-# stats/src/model.c: 418
-# error(_("variable %d has no levels"), i+1)
-# stats/src/model.c: 425
-# error(_("variable %d has no levels"), i+1)
-#: model.c:418 model.c:425
+#: model.c:421 model.c:428
 #, c-format
 msgid "variable %d has no levels"
 msgstr "zmienna %d nie posiada poziomów"
 
-# stats/src/model.c: 537
-# warning(_("the response appeared on the right-hand side and was dropped"))
-#: model.c:537
+#: model.c:540
 msgid "the response appeared on the right-hand side and was dropped"
 msgstr ""
 "zmienna zależna pojawiła się po prawej stronie równania więc została "
 "odrzucona"
 
-# stats/src/model.c: 557
-# error(_("term %d would require %.0g columns"), j+1, dk)
-#: model.c:557
+#: model.c:560
 #, c-format
 msgid "term %d would require %.0g columns"
 msgstr "człon %d wymaga %.0g kolumn"
 
-# stats/src/model.c: 561
-# error(_("matrix would require %.0g columns"), dnc)
-#: model.c:561
+#: model.c:564
 #, c-format
 msgid "matrix would require %.0g columns"
 msgstr "macierz wymaga %.0g kolumn"
 
-# stats/src/model.c: 572
-# warning(_("problem with term %d in model.matrix: no columns are assigned"),
-# 		      j+1)
-#: model.c:572
+#: model.c:575
 #, c-format
 msgid "problem with term %d in model.matrix: no columns are assigned"
 msgstr "problem z członem %d w 'model.matrix()': brak przypisanych kolumn"
 
-# stats/src/model.c: 621
-# warning(_("term names will be truncated"))
-# stats/src/model.c: 626
-# warning(_("term names will be truncated"))
-# stats/src/model.c: 632
-# warning(_("term names will be truncated"))
-# stats/src/model.c: 643
-# warning(_("term names will be truncated"))
-# stats/src/model.c: 649
-# warning(_("term names will be truncated"))
-# stats/src/model.c: 655
-# warning(_("term names will be truncated"))
-#: model.c:621 model.c:626 model.c:632 model.c:643 model.c:649 model.c:655
+#: model.c:624 model.c:629 model.c:635 model.c:646 model.c:652 model.c:658
 msgid "term names will be truncated"
 msgstr "nazwy członów będą przycięte"
 
-# stats/src/model.c: 635
-# error(_("complex variables are not currently allowed in model matrices"))
-#: model.c:635
+#: model.c:638
 msgid "complex variables are not currently allowed in model matrices"
 msgstr "zmienne zespolone nie są aktualnie dozwolone w macierzach modelu"
 
-# stats/src/model.c: 659
-# error(_("variables of type '%s' are not allowed in model matrices"),
-# 			      type2char(TYPEOF(var_i)))
-#: model.c:659
+#: model.c:662
 #, c-format
 msgid "variables of type '%s' are not allowed in model matrices"
 msgstr "zmienne typu '%s' nie są dozwolone w macierzach modelu"
 
-# stats/src/model.c: 881
-# error(_("invalid formula in 'update'"))
-#: model.c:881
+#: model.c:884
 msgid "invalid formula in 'update'"
 msgstr "niepoprawna formuła w 'update'"
 
-# stats/src/model.c: 915
-# error(_("formula expected"))
-#: model.c:915
+#: model.c:918
 msgid "formula expected"
 msgstr "oczekiwano formuły"
 
-# stats/src/model.c: 1046
-# error(_("invalid term in model formula"))
-#: model.c:1046
+#: model.c:1049
 msgid "invalid term in model formula"
 msgstr "niepoprawny człon w formule modelu"
 
-# stats/src/model.c: 1121
-# error(_("invalid model formula"))
-#: model.c:1121
+#: model.c:1124
 msgid "invalid model formula"
 msgstr "niepoprawna formuła modelu"
 
-# stats/src/model.c: 1147
-# error(_("invalid power in formula"))
-# stats/src/model.c: 1395
-# error(_("invalid power in formula"))
-#: model.c:1147 model.c:1395
+#: model.c:1150 model.c:1410
 msgid "invalid power in formula"
 msgstr "niepoprawna potęga w formule"
 
-# stats/src/model.c: 1183
-# error(_("invalid model formula in ExtractVars"))
-#: model.c:1183
+#: model.c:1186
 msgid "invalid model formula in ExtractVars"
 msgstr "niepoprawna formuła modelu w funkcji 'ExtractVars()'"
 
-# stats/src/model.c: 1518
-# error(_("duplicated name '%s' in data frame using '.'"),
-# 			      c)
-#: model.c:1518
+#: model.c:1533
 #, c-format
 msgid "duplicated name '%s' in data frame using '.'"
 msgstr "powtórzona nazwa '%s' w ramce danych używając '.'"
 
-# stats/src/model.c: 1576
-# error(_("invalid model formula in EncodeVars"))
-#: model.c:1576
+#: model.c:1594
 msgid "invalid model formula in EncodeVars"
 msgstr "niepoprawna formuła modelu w funkcji 'EncodeVars()'"
 
-# stats/src/model.c: 1662
-# error(_("argument is not a valid model"))
-#: model.c:1662
+#: model.c:1680
 msgid "argument is not a valid model"
 msgstr "argument nie jest poprawnym modelem"
 
-# stats/src/model.c: 1672
-# error(_("'specials' must be NULL or a character vector"))
-#: model.c:1672
+#: model.c:1690
 msgid "'specials' must be NULL or a character vector"
 msgstr "'specials' musi być wektorem tekstowym lub wartością 'NULL'"
 
-# stats/src/model.c: 1684
-# error(_("'data' argument is of the wrong type"))
-#: model.c:1684
+#: model.c:1702
 msgid "'data' argument is of the wrong type"
 msgstr "argument 'data' posiada niepoprawny typ"
 
-# stats/src/model.c: 1952
-# error(_("'.' in formula and no 'data' argument"))
-#: model.c:1952
+#: model.c:1972
 msgid "'.' in formula and no 'data' argument"
 msgstr "'.' w formule oraz brak argumentu 'data'"
 
-# stats/src/monoSpl.c: 34
-# error(_("n must be at least two"))
-#: monoSpl.c:34
+#: monoSpl.c:36
 msgid "n must be at least two"
 msgstr "argument 'n' musi wynosić co najmniej 2"
 
-# stats/src/monoSpl.c: 67
-# error(_("Argument m must be numeric"))
-#: monoSpl.c:67
+#: monoSpl.c:69
 msgid "Argument m must be numeric"
 msgstr "argument 'm' musi być liczbą"
 
-# stats/src/monoSpl.c: 70
-# error(_("length(m) must be at least two"))
-#: monoSpl.c:70
+#: monoSpl.c:72
 msgid "length(m) must be at least two"
 msgstr "'length(m)' musi wynosić co najmniej dwa"
 
-# stats/src/monoSpl.c: 72
-# error(_("Argument Sx must be numeric vector one shorter than m[]"))
-#: monoSpl.c:72
+#: monoSpl.c:74
 msgid "Argument Sx must be numeric vector one shorter than m[]"
 msgstr "Argument 'Sx' musi być wektorem liczbowym o jeden którszym niż 'm[]'"
 
-# stats/src/nls.c: 97
-# error(_("'control' must be a list"))
-#: nls.c:97
+#: nls.c:99
 msgid "'control' must be a list"
 msgstr "argument 'control' musi być listą"
 
-# stats/src/nls.c: 99
-# error(_("'m' must be a list"))
-#: nls.c:99
+#: nls.c:101
 msgid "'m' must be a list"
 msgstr "argument 'm' musi być listą"
 
-# stats/src/nls.c: 105
-# error(_("'%s' absent"), "control$maxiter")
-# stats/src/nls.c: 110
-# error(_("'%s' absent"), "control$tol")
-# stats/src/nls.c: 115
-# error(_("'%s' absent"), "control$minFactor")
-# stats/src/nls.c: 120
-# error(_("'%s' absent"), "control$warnOnly")
-# stats/src/nls.c: 125
-# error(_("'%s' absent"), "control$printEval")
-# stats/src/nls.c: 166
-# error(_("'%s' absent"), "m$conv()")
-# stats/src/nls.c: 171
-# error(_("'%s' absent"), "m$incr()")
-# stats/src/nls.c: 176
-# error(_("'%s' absent"), "m$deviance()")
-# stats/src/nls.c: 181
-# error(_("'%s' absent"), "m$trace()")
-# stats/src/nls.c: 186
-# error(_("'%s' absent"), "m$setPars()")
-# stats/src/nls.c: 191
-# error(_("'%s' absent"), "m$getPars()")
-#: nls.c:105 nls.c:110 nls.c:115 nls.c:120 nls.c:125 nls.c:166 nls.c:171
-#: nls.c:176 nls.c:181 nls.c:186 nls.c:191
+#: nls.c:107 nls.c:112 nls.c:117 nls.c:122 nls.c:127 nls.c:168 nls.c:173
+#: nls.c:178 nls.c:183 nls.c:188 nls.c:193
 #, c-format
 msgid "'%s' absent"
 msgstr "'%s' jest niedostępne"
 
-# stats/src/nls.c: 232
-#  _("singular gradient")
-#: nls.c:232
+#: nls.c:234
 msgid "singular gradient"
 msgstr "osobliwy gradient"
 
-# stats/src/nls.c: 253
-#  _("step factor %g reduced below 'minFactor' of %g")
-#: nls.c:253
+#: nls.c:255
 #, c-format
 msgid "step factor %g reduced below 'minFactor' of %g"
 msgstr "czynnik kroku %g zmiejszony poniżej  'minFactor' %g"
 
-# stats/src/nls.c: 262
-#  _("number of iterations exceeded maximum of %d")
-#: nls.c:262
+#: nls.c:264
 #, c-format
 msgid "number of iterations exceeded maximum of %d"
 msgstr "liczba iteracji przekroczyła maksymalną liczbę %d"
 
-# stats/src/nls.c: 267
-# (_("converged"), 0)
-#: nls.c:267
+#: nls.c:269
 msgid "converged"
 msgstr "zbiegł się"
 
-# stats/src/nls.c: 288
-# error(_("'theta' should be of type character"))
-#: nls.c:288
+#: nls.c:290
 msgid "'theta' should be of type character"
 msgstr "argument 'theta' powinien być typu tekstowego"
 
-# stats/src/nls.c: 290
-# error(_("use of NULL environment is defunct"))
-# stats/src/port.c: 375
-# error(_("use of NULL environment is defunct"))
-#: nls.c:290 port.c:375
+#: nls.c:292 port.c:376
 msgid "use of NULL environment is defunct"
 msgstr "użycie wartości NULL dla środowiska zostało zlikwidowane"
 
-# stats/src/nls.c: 294
-# error(_("'rho' should be an environment"))
-#: nls.c:294
+#: nls.c:296
 msgid "'rho' should be an environment"
 msgstr "argument 'rho' musi być środowiskiem"
 
-# stats/src/nls.c: 297
-# error(_("'dir' is not a numeric vector of the correct length"))
-#: nls.c:297
+#: nls.c:299
 msgid "'dir' is not a numeric vector of the correct length"
 msgstr "'dir' nie jest wektorem liczbowym o poprawnej długości"
 
-# stats/src/nls.c: 311
-# error(_("Missing value or an infinity produced when evaluating the model"))
-# stats/src/nls.c: 341
-# error(_("Missing value or an infinity produced when evaluating the model"))
-#: nls.c:311 nls.c:341
+#: nls.c:313 nls.c:347
 msgid "Missing value or an infinity produced when evaluating the model"
 msgstr ""
 "Brakuje wartości lub wyprodukowano wartości nieskończone podczas wyliczania "
 "modelu"
 
-# stats/src/nls.c: 318
-# error(_("variable '%s' is integer, not numeric"), name)
-#: nls.c:318
+#: nls.c:321
 #, c-format
 msgid "variable '%s' is integer, not numeric"
 msgstr "zmienna '%s' jest liczbą całkowitą, a nie rzeczywistą"
 
-# stats/src/nls.c: 320
-# error(_("variable '%s' is not numeric"), name)
-#: nls.c:320
+#: nls.c:323
 #, c-format
 msgid "variable '%s' is not numeric"
 msgstr "zmienna '%s' nie jest liczbą rzeczywistą"
 
-# stats/src/optim.c: 80
-# error(_("non-finite value supplied by optim"))
-# stats/src/optim.c: 107
-# error(_("non-finite value supplied by optim"))
 #: optim.c:80 optim.c:107
 msgid "non-finite value supplied by optim"
 msgstr "nieskończona wartość dostarczona przez 'optim()'"
 
-# stats/src/optim.c: 87
-# error(_("objective function in optim evaluates to length %d not 1"),
-# 	      LENGTH(s))
 #: optim.c:87
 #, c-format
 msgid "objective function in optim evaluates to length %d not 1"
 msgstr "funkcja celu w 'optim' została obliczona do długości %d a nie 1"
 
-# stats/src/optim.c: 114
-# error(_("gradient in optim evaluated to length %d not %d"),
-# 		  LENGTH(s), n)
 #: optim.c:114
 #, c-format
 msgid "gradient in optim evaluated to length %d not %d"
 msgstr "gradient w 'optim' obliczony do długości %d a nie %d"
 
-# stats/src/optim.c: 193
-# error(_("'fn' is not a function"))
-# stats/src/optim.c: 399
-# error(_("'fn' is not a function"))
 #: optim.c:193 optim.c:399
 msgid "'fn' is not a function"
 msgstr "argument 'fn' nie jest funkcją"
 
-# stats/src/optim.c: 211
-# error(_("'parscale' is of the wrong length"))
-# stats/src/optim.c: 405
-# error(_("'parscale' is of the wrong length"))
 #: optim.c:211 optim.c:405
 msgid "'parscale' is of the wrong length"
 msgstr "argument 'parscale' posiada niepoprawną długość"
 
-# stats/src/optim.c: 240
-# error(_("'maxit' is not an integer"))
 #: optim.c:240
 msgid "'maxit' is not an integer"
 msgstr "argument 'maxit' nie jest liczbą całkowitą"
 
-# stats/src/optim.c: 260
-# error(_("'tmax' is not a positive integer"))
 #: optim.c:260
 msgid "'tmax' is not a positive integer"
 msgstr "argument 'tmax' nie jest dodatnią liczbą całkowitą"
 
-# stats/src/optim.c: 262
-# error(_("'gr' is not a function"))
-# stats/src/optim.c: 279
-# error(_("'gr' is not a function"))
-# stats/src/optim.c: 304
-# error(_("'gr' is not a function"))
-# stats/src/optim.c: 334
-# error(_("'gr' is not a function"))
-# stats/src/optim.c: 413
-# error(_("'gr' is not a function"))
 #: optim.c:262 optim.c:279 optim.c:304 optim.c:334 optim.c:413
 msgid "'gr' is not a function"
 msgstr "argument 'gr' nie jest funkcją"
 
-# stats/src/optim.c: 285
-# error(_("'ndeps' is of the wrong length"))
-# stats/src/optim.c: 310
-# error(_("'ndeps' is of the wrong length"))
-# stats/src/optim.c: 340
-# error(_("'ndeps' is of the wrong length"))
-# stats/src/optim.c: 419
-# error(_("'ndeps' is of the wrong length"))
 #: optim.c:285 optim.c:310 optim.c:340 optim.c:419
 msgid "'ndeps' is of the wrong length"
 msgstr "argument 'ndeps' posiada niepoprawną długość"
 
-# stats/src/optim.c: 370
-# error(_("unknown 'method'"))
 #: optim.c:370
 msgid "unknown 'method'"
 msgstr "nieznana wartość 'method'"
 
-# stats/src/optimize.c: 217
-# warning(_("NA replaced by maximum positive value"))
-# stats/src/optimize.c: 309
-# warning(_("NA replaced by maximum positive value"))
-# stats/src/optimize.c: 530
-# warning(_("NA replaced by maximum positive value"))
-#: optimize.c:217 optimize.c:309 optimize.c:530
+#: optimize.c:220 optimize.c:306 optimize.c:528
 msgid "NA replaced by maximum positive value"
 msgstr "wartość NA zastąpiona przez maksymalną dodatnią wartość"
 
-# stats/src/optimize.c: 225
-# warning(_("NA/Inf replaced by maximum positive value"))
-# stats/src/optimize.c: 321
-# warning(_("NA/Inf replaced by maximum positive value"))
-# stats/src/optimize.c: 538
-# warning(_("NA/Inf replaced by maximum positive value"))
-#: optimize.c:225 optimize.c:321 optimize.c:538
+#: optimize.c:228 optimize.c:318 optimize.c:536
 msgid "NA/Inf replaced by maximum positive value"
 msgstr "wartości NA/Inf zastąpione przez maksymalne dodatnie wartości"
 
-# stats/src/optimize.c: 234
-# error(_("invalid function value in 'optimize'"))
-#: optimize.c:234
+#: optimize.c:237
 msgid "invalid function value in 'optimize'"
 msgstr "niepoprawna wartość funkcji w funkcji 'optimize()'"
 
-# stats/src/optimize.c: 252
-# error(_("attempt to minimize non-function"))
-# stats/src/optimize.c: 350
-# error(_("attempt to minimize non-function"))
-# stats/src/optimize.c: 723
-# error(_("attempt to minimize non-function"))
-#: optimize.c:252 optimize.c:350 optimize.c:723
+#: optimize.c:255 optimize.c:347 optimize.c:721
 msgid "attempt to minimize non-function"
 msgstr "próba minimalizacji nie-funkcji"
 
-# stats/src/optimize.c: 259
-# error(_("invalid '%s' value"), "xmin")
-# stats/src/optimize.c: 266
-# error(_("invalid '%s' value"), "xmax")
-# stats/src/optimize.c: 275
-# error(_("invalid '%s' value"), "tol")
-# stats/src/optimize.c: 355
-# error(_("invalid '%s' value"), "xmin")
-# stats/src/optimize.c: 360
-# error(_("invalid '%s' value"), "xmax")
-# stats/src/optimize.c: 376
-# error(_("invalid '%s' value"), "tol")
-#: optimize.c:259 optimize.c:266 optimize.c:275 optimize.c:355 optimize.c:360
-#: optimize.c:376
+#: optimize.c:262 optimize.c:269 optimize.c:278 optimize.c:352 optimize.c:357
+#: optimize.c:373
 #, c-format
 msgid "invalid '%s' value"
 msgstr "niepoprawna wartość '%s'"
 
-# stats/src/optimize.c: 268
-# error(_("'xmin' not less than 'xmax'"))
-# stats/src/optimize.c: 361
-# error(_("'xmin' not less than 'xmax'"))
-#: optimize.c:268 optimize.c:361
+#: optimize.c:271 optimize.c:358
 msgid "'xmin' not less than 'xmax'"
 msgstr "'xmin' nie jest mniejsze niż 'xmax'"
 
-# stats/src/optimize.c: 318
-# warning(_("-Inf replaced by maximally negative value"))
-#: optimize.c:318
+#: optimize.c:315
 msgid "-Inf replaced by maximally negative value"
 msgstr "-Inf zastąpiona maksymalną ujemną wartością"
 
-# stats/src/optimize.c: 331
-# error(_("invalid function value in 'zeroin'"))
-#: optimize.c:331
+#: optimize.c:328
 msgid "invalid function value in 'zeroin'"
 msgstr "niepoprawna wartość funkcji w funkcji 'zeroin()'"
 
-# stats/src/optimize.c: 366
-# error(_("NA value for '%s' is not allowed"), "f.lower")
-# stats/src/optimize.c: 371
-# error(_("NA value for '%s' is not allowed"), "f.upper")
-#: optimize.c:366 optimize.c:371
+#: optimize.c:363 optimize.c:368
 #, c-format
 msgid "NA value for '%s' is not allowed"
 msgstr "wartość NA dla '%s' nie jest dozwolona"
 
-# stats/src/optimize.c: 381
-# error(_("'maxiter' must be positive"))
-#: optimize.c:381
+#: optimize.c:378
 msgid "'maxiter' must be positive"
 msgstr "'maxiter' musi być liczbą dodatnią"
 
-# stats/src/optimize.c: 522
-# error(_("non-finite value supplied by 'nlm'"))
-#: optimize.c:522
+#: optimize.c:520
 msgid "non-finite value supplied by 'nlm'"
 msgstr "nieskończona wartość dostarczona przez 'nlm'"
 
-# stats/src/optimize.c: 557
-# error(_("invalid function value in 'nlm' optimizer"))
-#: optimize.c:557
+#: optimize.c:555
 msgid "invalid function value in 'nlm' optimizer"
 msgstr "niepoprawna wartość funkcji w optymalizatorze 'nlm'"
 
-# stats/src/optimize.c: 568
-# error(_("function value caching for optimization is seriously confused"))
-# stats/src/optimize.c: 583
-# error(_("function value caching for optimization is seriously confused"))
-#: optimize.c:568 optimize.c:583
+#: optimize.c:566 optimize.c:581
 msgid "function value caching for optimization is seriously confused"
 msgstr ""
 "buforowanie wartości funkcji na potrzeby optymalizacji poważnie pomylone"
 
-# stats/src/optimize.c: 598
-# error(_("numeric parameter expected"))
-#: optimize.c:598
+#: optimize.c:596
 msgid "numeric parameter expected"
 msgstr "oczekiwano parametru liczbowego"
 
-# stats/src/optimize.c: 602
-# error(_("conflicting parameter lengths"))
-#: optimize.c:602
+#: optimize.c:600
 msgid "conflicting parameter lengths"
 msgstr "kolidujące długości parametrów"
 
-# stats/src/optimize.c: 606
-# error(_("invalid parameter length"))
-#: optimize.c:606
+#: optimize.c:604
 msgid "invalid parameter length"
 msgstr "niepoprawna długość parametru"
 
-# stats/src/optimize.c: 616
-# error(_("missing value in parameter"))
-# stats/src/optimize.c: 623
-# error(_("missing value in parameter"))
-#: optimize.c:616 optimize.c:623
+#: optimize.c:614 optimize.c:621
 msgid "missing value in parameter"
 msgstr "brakuje wartości w parametrze"
 
-# stats/src/optimize.c: 628
-# error(_("invalid parameter type"))
-#: optimize.c:628
+#: optimize.c:626
 msgid "invalid parameter type"
 msgstr "niepoprawny typ parametru"
 
-# stats/src/optimize.c: 639
-# error(_("non-positive number of parameters in nlm"))
-#: optimize.c:639
+#: optimize.c:637
 msgid "non-positive number of parameters in nlm"
 msgstr "niedodatnia liczba parametrów w 'nlm'"
 
-# stats/src/optimize.c: 641
-# error(_("nlm is inefficient for 1-d problems"))
-#: optimize.c:641
+#: optimize.c:639
 msgid "nlm is inefficient for 1-d problems"
 msgstr "'nlm' jest nieefektywna dla jednowymiarowych problemów"
 
-# stats/src/optimize.c: 643
-# error(_("invalid gradient tolerance in nlm"))
-#: optimize.c:643
+#: optimize.c:641
 msgid "invalid gradient tolerance in nlm"
 msgstr "niepoprawna tolerancja gradientu w 'nlm'"
 
-# stats/src/optimize.c: 645
-# error(_("invalid iteration limit in nlm"))
-#: optimize.c:645
+#: optimize.c:643
 msgid "invalid iteration limit in nlm"
 msgstr "niepoprawna granica iteracji w 'nlm'"
 
-# stats/src/optimize.c: 647
-# error(_("minimization function has no good digits in nlm"))
-#: optimize.c:647
+#: optimize.c:645
 msgid "minimization function has no good digits in nlm"
 msgstr "funkcja minimalizacyjna nie ma dobrych cyfr w 'nlm'"
 
-# stats/src/optimize.c: 649
-# error(_("no analytic gradient to check in nlm!"))
-#: optimize.c:649
+#: optimize.c:647
 msgid "no analytic gradient to check in nlm!"
 msgstr "brak analitycznego gradientu do sprawdzenia w 'nlm'!"
 
-# stats/src/optimize.c: 651
-# error(_("no analytic Hessian to check in nlm!"))
-#: optimize.c:651
+#: optimize.c:649
 msgid "no analytic Hessian to check in nlm!"
 msgstr "brak analitycznego hesjanu do sprawdzenia w 'nlm'!"
 
-# stats/src/optimize.c: 653
-# error(_("probable coding error in analytic gradient"))
-#: optimize.c:653
+#: optimize.c:651
 msgid "probable coding error in analytic gradient"
 msgstr "prawdopodobny błąd kodowania w analitycznym gradiencie"
 
-# stats/src/optimize.c: 655
-# error(_("probable coding error in analytic Hessian"))
-#: optimize.c:655
+#: optimize.c:653
 msgid "probable coding error in analytic Hessian"
 msgstr "prawdopodobny błąd kodowania w analitycznym hesjanie"
 
-# stats/src/optimize.c: 657
-# error(_("*** unknown error message (msg = %d) in nlm()\n*** should not happen!"), nerr)
-#: optimize.c:657
+#: optimize.c:655
 #, c-format
 msgid ""
 "*** unknown error message (msg = %d) in nlm()\n"
@@ -1051,26 +643,24 @@ msgstr ""
 "*** nieznany komunikat błędu (wiadomość = %d) w funkcji 'nlm()'\n"
 "*** to nie powinno się wydarzyć!"
 
-#: optimize.c:668
+#: optimize.c:666
 msgid "Relative gradient close to zero.\n"
 msgstr "Gradient względny bliski zera.\n"
 
-#: optimize.c:669 optimize.c:673
+#: optimize.c:667 optimize.c:671
 msgid "Current iterate is probably solution.\n"
 msgstr "Bieżąca iteracja prawdopodobnie jest rozwiązaniem.\n"
 
-#: optimize.c:672
+#: optimize.c:670
 msgid "Successive iterates within tolerance.\n"
 msgstr "Kolejna iteracja w granicach tolerancji.\n"
 
-#: optimize.c:676
+#: optimize.c:674
 msgid "Last global step failed to locate a point lower than x.\n"
 msgstr ""
 "Ostatni globalny krok nie dał rady zlokalizować punktu niższego niż 'x'.\n"
 
-# stats/src/optimize.c: 677
-# (_("Either x is an approximate local minimum of the function,\nthe function is too non-linear for this algorithm,\nor steptol is too large.\n"))
-#: optimize.c:677
+#: optimize.c:675
 msgid ""
 "Either x is an approximate local minimum of the function,\n"
 "the function is too non-linear for this algorithm,\n"
@@ -1080,11 +670,11 @@ msgstr ""
 "funkcja jest zbyt nieliniowa dla tego algorytmu,\n"
 "lub 'steptol' jest zbyt duży.\n"
 
-#: optimize.c:682
+#: optimize.c:680
 msgid "Iteration limit exceeded.  Algorithm failed.\n"
 msgstr "Osiągnięto graniczną wartość iteracji. Algorytm nie powiódł się.\n"
 
-#: optimize.c:685
+#: optimize.c:683
 msgid ""
 "Maximum step size exceeded 5 consecutive times.\n"
 "Either the function is unbounded below,\n"
@@ -1098,267 +688,165 @@ msgstr ""
 "z góry w którymś kierunku,\n"
 "lub też 'stepmx' jest zbyt mały.\n"
 
-# stats/src/optimize.c: 747
-# error(_("invalid NA value in parameter"))
-# stats/src/optimize.c: 752
-# error(_("invalid NA value in parameter"))
-# stats/src/optimize.c: 756
-# error(_("invalid NA value in parameter"))
-# stats/src/optimize.c: 760
-# error(_("invalid NA value in parameter"))
-# stats/src/optimize.c: 764
-# error(_("invalid NA value in parameter"))
-# stats/src/optimize.c: 768
-# error(_("invalid NA value in parameter"))
-# stats/src/optimize.c: 773
-# error(_("invalid NA value in parameter"))
-#: optimize.c:747 optimize.c:752 optimize.c:756 optimize.c:760 optimize.c:764
-#: optimize.c:768 optimize.c:773
+#: optimize.c:745 optimize.c:750 optimize.c:754 optimize.c:758 optimize.c:762
+#: optimize.c:766 optimize.c:771
 msgid "invalid NA value in parameter"
 msgstr "niepoprawna wartość NA w parametrze"
 
-# stats/src/optimize.c: 804
-# warning(_("hessian supplied is of the wrong length or mode, so ignored"))
-#: optimize.c:804
+#: optimize.c:800
 msgid "hessian supplied is of the wrong length or mode, so ignored"
 msgstr ""
 "dostarczony hesjan posiada niepoprawną długość lub tryb, tak więc został "
 "zignorowany"
 
-# stats/src/optimize.c: 808
-# warning(_("gradient supplied is of the wrong length or mode, so ignored"))
-#: optimize.c:808
+#: optimize.c:804
 msgid "gradient supplied is of the wrong length or mode, so ignored"
 msgstr ""
 "dostarczony gradient posiada niepoprawną długość lub tryb, tak więc został "
 "zignorowany"
 
-# stats/src/pacf.c: 94
-# error(_("bad Starma struct"))
-#: pacf.c:94
+#: pacf.c:87
 msgid "bad Starma struct"
 msgstr "zła struktura 'Starma'"
 
-# stats/src/pacf.c: 240
-# error(_("starma error code %d"), ifault)
-#: pacf.c:240
+#: pacf.c:233
 #, c-format
 msgid "starma error code %d"
 msgstr "starma: kod błędu %d"
 
-# stats/src/pacf.c: 300
-# error(_("forkal error code %d"), ifault)
-#: pacf.c:300
+#: pacf.c:293
 #, c-format
 msgid "forkal error code %d"
 msgstr "forkal: kod błędu %d"
 
-# stats/src/pacf.c: 474
-# error(_("invalid value of lag.max"))
-#: pacf.c:474
+#: pacf.c:466
 msgid "invalid value of lag.max"
 msgstr "niepoprawna wartość 'lag.max'"
 
-# stats/src/port.c: 133
-# error(_("Rf_divset: alg = %d must be 1, 2, 3, or 4"), alg)
 #: port.c:133
 #, c-format
 msgid "Rf_divset: alg = %d must be 1, 2, 3, or 4"
 msgstr "Rf_divset: 'alg = %d' musi wynosić 1, 2, 3, lub 4"
 
-# stats/src/port.c: 312
-# error(_("gradient function must return a numeric vector of length %d"), n)
-#: port.c:312
+#: port.c:149
+msgid "port algorithms 3 or higher are not supported"
+msgstr "algorytmy portu 3 lub wyższe nie są wspierane"
+
+#: port.c:313
 #, c-format
 msgid "gradient function must return a numeric vector of length %d"
 msgstr "funkcja gradientu musi zwrócić wektor liczbowy o długości %d"
 
-# stats/src/port.c: 324
-# error(_("Hessian function must return a square numeric matrix of order %d"),
-# 		  n)
-#: port.c:324
+#: port.c:325
 #, c-format
 msgid "Hessian function must return a square numeric matrix of order %d"
 msgstr "Funkcja hesjana musi zwrócić kwadratową macierz liczbową rzędu %d"
 
-# stats/src/port.c: 379
-# error(_("'rho' must be an environment"))
-#: port.c:379
+#: port.c:380
 msgid "'rho' must be an environment"
 msgstr "'rho' musi być środowiskiem"
 
-# stats/src/port.c: 381
-# error(_("'d' must be a nonempty numeric vector"))
-# stats/src/port.c: 542
-# error(_("'d' must be a nonempty numeric vector"))
-#: port.c:381 port.c:542
+#: port.c:382 port.c:548
 msgid "'d' must be a nonempty numeric vector"
 msgstr "'d' musi być niepustym wektorem liczbowym"
 
-# stats/src/port.c: 383
-# error(_("When Hessian defined must also have gradient defined"))
-#: port.c:383
+#: port.c:384
 msgid "When Hessian defined must also have gradient defined"
 msgstr "Kiedy jest zdefiniowany Hesjan musi być również zdefiniowany gradient"
 
-# stats/src/port.c: 386
-# error(_("environment 'rho' must contain a numeric vector '.par' of length %d"),
-# 	      n)
-#: port.c:386
+#: port.c:387
 #, c-format
 msgid "environment 'rho' must contain a numeric vector '.par' of length %d"
 msgstr "środowisko 'rho' musi zawierać wektor liczbowy '.par' o długości %d"
 
-# stats/src/port.c: 400
-# error(_("'lower' and 'upper' must be numeric vectors"))
-#: port.c:400
+#: port.c:401
 msgid "'lower' and 'upper' must be numeric vectors"
 msgstr "'lower' oraz 'upper' muszą być wektorami liczbowymi"
 
-# stats/src/port.c: 456
-# error(_("'getElement' applies only to named lists"))
-#: port.c:456
+#: port.c:460
 msgid "'getElement' applies only to named lists"
 msgstr "'getElement' stosuje się jedynie do nazwanych list"
 
-# stats/src/port.c: 477
-# error(_("%s$%s() not found"), lnm, enm)
-#: port.c:477
+#: port.c:481
 #, c-format
 msgid "%s$%s() not found"
 msgstr "'%s$%s()' nie zostało znalezione"
 
-# stats/src/port.c: 490
-# error(_("'gradient' must be a numeric matrix of dimension (%d,%d)"),
-# 	      gdims[0], gdims[1])
-#: port.c:490
+#: port.c:494
 #, c-format
 msgid "'gradient' must be a numeric matrix of dimension (%d,%d)"
 msgstr "'gradient' musi być macierzą liczbową o wymiarze (%d,%d)"
 
-# stats/src/port.c: 511
-# error(_("fcn produced mode %d, length %d - wanted mode %d, length %d"),
-# 	      TYPEOF(v), LENGTH(v), TYPEOF(vv), LENGTH(vv))
-#: port.c:511
+#: port.c:515
 #, c-format
 msgid "fcn produced mode %d, length %d - wanted mode %d, length %d"
 msgstr ""
 "'fcn' wyprodukował tryb %d, długość %d - oczekiwano tryb %d, długość %d"
 
-# stats/src/port.c: 524
-# error(_("invalid type for eval_check_store"))
-#: port.c:524
+#: port.c:528
 msgid "invalid type for eval_check_store"
 msgstr "niepoprawny typ dla funkcji 'eval_check_store()'"
 
-# stats/src/port.c: 543
-# error(_("m must be a list"))
-#: port.c:543
+#: port.c:549
 msgid "m must be a list"
 msgstr "argument 'm' musi być listą"
 
-# stats/src/port.c: 563
-# error(_("'lowerb' and 'upperb' must be numeric vectors"))
-#: port.c:563
+#: port.c:569
 msgid "'lowerb' and 'upperb' must be numeric vectors"
 msgstr "'lowerb' oraz 'upperb' muszą być wektorami liczbowymi"
 
-# stats/src/rWishart.c: 51
-# error(_("inconsistent degrees of freedom and dimension"))
-#: rWishart.c:51
+#: rWishart.c:53
 msgid "inconsistent degrees of freedom and dimension"
 msgstr "niespójna liczba stopni swodoby oraz wymiaru"
 
-# stats/src/rWishart.c: 84
-# error(_("'scal' must be a square, real matrix"))
-#: rWishart.c:84
+#: rWishart.c:86
 msgid "'scal' must be a square, real matrix"
 msgstr "'scal' musi być kwadratową, rzeczywistą macierzą"
 
-# stats/src/rWishart.c: 96
-# error(_("'scal' matrix is not positive-definite"))
-#: rWishart.c:96
+#: rWishart.c:98
 msgid "'scal' matrix is not positive-definite"
 msgstr "macierz 'scal' nie jest dodatnio określona"
 
-# stats/src/random.c: 66
-# error(_("invalid arguments"))
-# stats/src/random.c: 70
-# error(_("invalid arguments"))
-# stats/src/random.c: 75
-# error(_("invalid arguments"))
-# stats/src/random.c: 80
-# error(_("invalid arguments"))
-# stats/src/random.c: 161
-# error(_("invalid arguments"))
-# stats/src/random.c: 167
-# error(_("invalid arguments"))
-# stats/src/random.c: 172
-# error(_("invalid arguments"))
-# stats/src/random.c: 177
-# error(_("invalid arguments"))
-# stats/src/random.c: 240
-# error(_("invalid arguments"))
-# stats/src/random.c: 245
-# error(_("invalid arguments"))
-# stats/src/random.c: 250
-# error(_("invalid arguments"))
-# stats/src/random.c: 264
-# error(_("invalid arguments"))
-# stats/src/random.c: 355
-# error(_("invalid arguments"))
-#: random.c:66 random.c:70 random.c:75 random.c:80 random.c:161 random.c:167
-#: random.c:172 random.c:177 random.c:240 random.c:245 random.c:250
-#: random.c:264 random.c:355
+#: random.c:53 random.c:128 random.c:200 random.c:284
+msgid "NAs produced"
+msgstr "wyprodukowano wartości NA"
+
+#: random.c:60 random.c:66 random.c:72 random.c:90 random.c:161 random.c:242
+#: random.c:376
 msgid "invalid arguments"
 msgstr "niepoprawne argumenty"
 
-# stats/src/random.c: 95
-# warning(_("NAs produced"))
-# stats/src/random.c: 121
-# warning(_("NAs produced"))
-# stats/src/random.c: 194
-# warning(_("NAs produced"))
-# stats/src/random.c: 222
-# warning(_("NAs produced"))
-# stats/src/random.c: 270
-# warning(_("NAs produced"))
-# stats/src/random.c: 289
-# warning(_("NAs produced"))
-#: random.c:95 random.c:121 random.c:194 random.c:222 random.c:270
-#: random.c:289
-msgid "NAs produced"
-msgstr "wyprodukowano wartości NA"
+#: random.c:310
+msgid "NA in probability vector"
+msgstr "wartość NA w wektorze prawdopodobieństwa"
+
+#: random.c:312
+msgid "negative probability"
+msgstr "ujemne prawdopodobieństwo"
 
-# stats/src/random.c: 308
-# error(_("invalid first argument 'n'"))
-#: random.c:308
+#: random.c:318
+msgid "no positive probabilities"
+msgstr "brak dodatnich prawdopodobieństw"
+
+#: random.c:330
 msgid "invalid first argument 'n'"
 msgstr "niepoprawny pierwszy argument 'n'"
 
-# stats/src/random.c: 310
-# error(_("invalid second argument 'size'"))
-#: random.c:310
+#: random.c:332
 msgid "invalid second argument 'size'"
 msgstr "niepoprawny drugi argument 'size'"
 
-# stats/src/rcont.c: 83
-# error(_("rcont2 [%d,%d]: exp underflow to 0; algorithm failure"), l, m)
 #: rcont.c:83
 #, c-format
 msgid "rcont2 [%d,%d]: exp underflow to 0; algorithm failure"
 msgstr "rcont2 [%d,%d]: wyrażenie spadło do 0; niepowodzenie algorytmu"
 
-# stats/src/smooth.c: 101
-# error(_("invalid end-rule for running median of 3: %d"),	end_rule)
-#: smooth.c:101
+#: smooth.c:107
 #, c-format
 msgid "invalid end-rule for running median of 3: %d"
 msgstr "niepoprawna końcowa reguła dla ruchomiej mediany 3: %d"
 
-# stats/src/starma.c: 366
-# error(_("missing value in last %d observations"), d)
-#: starma.c:366
+#: starma.c:364
 #, c-format
 msgid "missing value in last %d observations"
 msgstr "brakuje wartości w ostatnich %d obserwacjach"
diff --git a/src/library/stats/po/pt_BR.po b/src/library/stats/po/pt_BR.po
index 931fb93..f10afa1 100644
--- a/src/library/stats/po/pt_BR.po
+++ b/src/library/stats/po/pt_BR.po
@@ -6,12 +6,12 @@
 msgid ""
 msgstr ""
 "Project-Id-Version: R 2.1.1\n"
-"Report-Msgid-Bugs-To: bugs.r-project.org\n"
-"POT-Creation-Date: 2014-03-27 18:36+0000\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2016-04-01 10:01-0700\n"
 "PO-Revision-Date: 2011-03-26 08:58-0300\n"
 "Last-Translator: Fernando Henrique <pessoal at fernandohrosa.com.br>\n"
 "Language-Team: http://www.feferraz.net/br/P/Projeto_Traducao_R_Portugues\n"
-"Language: \n"
+"Language: pt_BR\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
@@ -20,11 +20,11 @@ msgstr ""
 "X-Poedit-Country: BRAZIL\n"
 "X-Poedit-Language: Portuguese\n"
 
-#: Srunmed.c:55
+#: Srunmed.c:54
 msgid "bandwidth/span of running medians is larger than n"
 msgstr "largura de banda/vão das medianas móveis é maior que n"
 
-#: ansari.c:116
+#: ansari.c:118
 msgid "probabilities outside [0,1] in qansari()"
 msgstr "probabilidades em qansari() fora do intervalo [0,1] "
 
@@ -44,7 +44,7 @@ msgstr "approx(): tentativa de interpolar valores NA"
 msgid "invalid argument type"
 msgstr "tipo de argumento inválido"
 
-#: arima.c:444 arima.c:530 pacf.c:331 pacf.c:371
+#: arima.c:444 arima.c:530 pacf.c:324 pacf.c:363
 msgid "can only transform 100 pars in arima0"
 msgstr "pode-se transformar apenas 100 pares em arima0"
 
@@ -52,6 +52,11 @@ msgstr "pode-se transformar apenas 100 pares em arima0"
 msgid "maximum supported lag is 350"
 msgstr "intervalo máximo suportado é 350"
 
+#: bandwidths.c:121
+#, c-format
+msgid "non-finite x[%d] in bandwidth calculation"
+msgstr ""
+
 #: complete_cases.c:26
 #, c-format
 msgid "invalid 'type' (%s) of argument"
@@ -65,31 +70,41 @@ msgstr "nenhuma entrada pôde determinar o número de casos"
 msgid "not all arguments have the same length"
 msgstr "nem todos os argumentos tem o mesmo comprimento"
 
-#: cov.c:566
+#: cov.c:569
 msgid "missing observations in cov/cor"
 msgstr "observações faltantas em cov/cor"
 
-#: cov.c:644
+#: cov.c:643
 msgid "'x' is NULL"
 msgstr "'x' é NULL"
 
-#: cov.c:663 cov.c:669
+#: cov.c:645
+#, fuzzy
+msgid "'x' is a factor"
+msgstr "'tmax' não é um inteiro"
+
+#: cov.c:665
+#, fuzzy
+msgid "'y' is a factor"
+msgstr "'fn' não é uma função"
+
+#: cov.c:673 cov.c:679
 msgid "incompatible dimensions"
 msgstr "dimensões incompatíveis"
 
-#: cov.c:688 cov.c:729 cov.c:762
+#: cov.c:698 cov.c:739 cov.c:772
 msgid "no complete element pairs"
 msgstr "nenhum par de elementos completo"
 
-#: cov.c:701
+#: cov.c:711
 msgid "invalid 'use' (computational method)"
 msgstr "'use' inválido (método computacional)"
 
-#: cov.c:704
+#: cov.c:714
 msgid "'x' is empty"
 msgstr "'x' é vazio"
 
-#: cov.c:798
+#: cov.c:808
 msgid "the standard deviation is zero"
 msgstr "o desvio padrão é zero"
 
@@ -102,36 +117,40 @@ msgstr "forma inválida na verificação de operador unário de subtração"
 msgid "Function '%s' is not in the derivatives table"
 msgstr "Função '%s' não está na tabela de derivadas"
 
-#: deriv.c:642
+#: deriv.c:641
+msgid "'expr' must be an expression or call"
+msgstr ""
+
+#: deriv.c:644
 msgid "variable must be a character string"
 msgstr "variável deve ser uma string de caracteres"
 
-#: deriv.c:644
+#: deriv.c:646
 msgid "only the first element is used as variable name"
 msgstr "apenas o primeiro elemento é usado como nome da variável"
 
-#: deriv.c:657
+#: deriv.c:659
 #, c-format
 msgid "invalid expression in '%s'"
 msgstr "expressão inválida em '%s'"
 
-#: deriv.c:935 model.c:99
+#: deriv.c:937 model.c:99
 msgid "invalid variable names"
 msgstr "nomes inválidos de variável"
 
-#: deriv.c:944
+#: deriv.c:946
 msgid "invalid tag"
 msgstr "etiqueta inválida"
 
-#: distance.c:153
+#: distance.c:152
 msgid "treating non-finite values as NA"
 msgstr "considerando valores não-finitos como NA"
 
-#: distance.c:226
+#: distance.c:225
 msgid "distance(): invalid p"
 msgstr "distance(): p inválido"
 
-#: distance.c:229
+#: distance.c:228
 msgid "distance(): invalid distance"
 msgstr "distance(): distância inválida"
 
@@ -143,17 +162,17 @@ msgstr "NaNs produzidos"
 msgid "Non-numeric argument to mathematical function"
 msgstr "Argumento não-numérico para função matemática"
 
-#: family.c:44
+#: family.c:45
 #, c-format
 msgid "Value %g out of range (0, 1)"
 msgstr "Valor %g fora do intervalo (0,1)"
 
-#: family.c:65 family.c:79 family.c:97
+#: family.c:66 family.c:80 family.c:98
 #, c-format
 msgid "Argument %s must be a nonempty numeric vector"
 msgstr "Argumento %s deve ser um vetor numérico não-vazio"
 
-#: family.c:130 family.c:133
+#: family.c:131 family.c:134
 #, c-format
 msgid "argument %s must be a numeric vector of length 1 or length %d"
 msgstr "argumento %s deve ser um vetor numérico com comprimento 1 ou %d"
@@ -178,7 +197,12 @@ msgstr "não há fatores"
 msgid "invalid factors"
 msgstr "fatores inválidos"
 
-#: ksmooth.c:67
+#: integrate.c:84 integrate.c:86 integrate.c:128
+#, fuzzy, c-format
+msgid "'%s' must be of length one"
+msgstr "'m' deve ser uma lista"
+
+#: ksmooth.c:68
 msgid "only 2500 rows are allowed for sm.method=\"spline\""
 msgstr "são permitidas apenas 2500 linhas para sm.method=\"spline\""
 
@@ -197,7 +221,7 @@ msgstr ""
 msgid "NA/NaN/Inf in '%s'"
 msgstr ""
 
-#: loessc.c:233
+#: loessc.c:240
 msgid "span is too small"
 msgstr "vão é muito pequeno"
 
@@ -226,19 +250,19 @@ msgstr "'maxiter' deve ser positivo"
 msgid "'delta' must be finite and > 0"
 msgstr ""
 
-#: mAR.c:467
+#: mAR.c:470
 msgid "Singular matrix in qr_solve"
 msgstr "Matriz singular em qr_solve"
 
-#: mAR.c:510
+#: mAR.c:513
 msgid "Singular matrix in ldet"
 msgstr "Matriz singular em ldet"
 
-#: mAR.c:697
+#: mAR.c:700
 msgid "Invalid vmethod"
 msgstr "vmethod inválido"
 
-#: mAR.c:833
+#: mAR.c:836
 msgid "Burg's algorithm failed to find partial correlation"
 msgstr "algoritmo de Burg não conseguiu encontrar correlação parcial"
 
@@ -277,187 +301,187 @@ msgstr "comprimentos das variáveis diferem (encontradas em '%s')"
 msgid "invalid result from na.action"
 msgstr "resultado inválido de na.action"
 
-#: model.c:369 model.c:377 optim.c:197
+#: model.c:372 model.c:380 optim.c:197
 #, c-format
 msgid "invalid '%s' argument"
 msgstr "argumento '%s' inválido"
 
-#: model.c:388
+#: model.c:391
 msgid "invalid model frame"
 msgstr "estrutura de modelo inválida"
 
-#: model.c:390
+#: model.c:393
 msgid "do not know how many cases"
 msgstr "não é possível determinar o número de casos"
 
-#: model.c:414
+#: model.c:417
 #, c-format
 msgid "variable lengths differ (found for variable %d)"
 msgstr "comprimentos das variáveis diferem (encontrados para a variável %d)"
 
-#: model.c:418 model.c:425
+#: model.c:421 model.c:428
 #, c-format
 msgid "variable %d has no levels"
 msgstr "variável %d não tem níveis"
 
-#: model.c:537
+#: model.c:540
 msgid "the response appeared on the right-hand side and was dropped"
 msgstr "a resposta apareceu no lado direito e foi descartada"
 
-#: model.c:557
+#: model.c:560
 #, c-format
 msgid "term %d would require %.0g columns"
 msgstr "termo %d requeriria %.0g colunas"
 
-#: model.c:561
+#: model.c:564
 #, c-format
 msgid "matrix would require %.0g columns"
 msgstr "matrix requeriria %.0g colunas"
 
-#: model.c:572
+#: model.c:575
 #, c-format
 msgid "problem with term %d in model.matrix: no columns are assigned"
 msgstr ""
 "problema com o termo %d na matriz do modelo: nenhuma coluna foi atribuida"
 
-#: model.c:621 model.c:626 model.c:632 model.c:643 model.c:649 model.c:655
+#: model.c:624 model.c:629 model.c:635 model.c:646 model.c:652 model.c:658
 msgid "term names will be truncated"
 msgstr "nomes dos termos serão truncados"
 
-#: model.c:635
+#: model.c:638
 msgid "complex variables are not currently allowed in model matrices"
 msgstr ""
 "variáveis complexas não são atualmente permitidas em matrizes de modelo"
 
-#: model.c:659
+#: model.c:662
 #, c-format
 msgid "variables of type '%s' are not allowed in model matrices"
 msgstr "variáveis de tipo '%s' não são permitidas em matrizes de modelo"
 
-#: model.c:881
+#: model.c:884
 msgid "invalid formula in 'update'"
 msgstr "fórmula inválida em 'update'"
 
-#: model.c:915
+#: model.c:918
 msgid "formula expected"
 msgstr "fórmula esperada"
 
-#: model.c:1046
+#: model.c:1049
 msgid "invalid term in model formula"
 msgstr "termo inválido na fórmula de modelo"
 
-#: model.c:1121
+#: model.c:1124
 msgid "invalid model formula"
 msgstr "fórmula de modelo inválida"
 
-#: model.c:1147 model.c:1395
+#: model.c:1150 model.c:1410
 msgid "invalid power in formula"
 msgstr "potenciação inválida na fórmula"
 
-#: model.c:1183
+#: model.c:1186
 msgid "invalid model formula in ExtractVars"
 msgstr "fórmula de modelo inválida em ExtractVars"
 
-#: model.c:1518
+#: model.c:1533
 #, c-format
 msgid "duplicated name '%s' in data frame using '.'"
 msgstr "nome duplicado '%s' em data frame usando '.'"
 
-#: model.c:1576
+#: model.c:1594
 msgid "invalid model formula in EncodeVars"
 msgstr "fórmula de modelo inválida em EncodeVars"
 
-#: model.c:1662
+#: model.c:1680
 msgid "argument is not a valid model"
 msgstr "argumento não é um modelo válido"
 
-#: model.c:1672
+#: model.c:1690
 #, fuzzy
 msgid "'specials' must be NULL or a character vector"
 msgstr "'path' deve ser um vetor de caracteres"
 
-#: model.c:1684
+#: model.c:1702
 msgid "'data' argument is of the wrong type"
 msgstr "argumento 'data' é do tipo errado"
 
-#: model.c:1952
+#: model.c:1972
 msgid "'.' in formula and no 'data' argument"
 msgstr "'.' na fórmula e nenhum argumento 'data'"
 
-#: monoSpl.c:34
+#: monoSpl.c:36
 msgid "n must be at least two"
 msgstr "n deve ser pelo menos dois"
 
-#: monoSpl.c:67
+#: monoSpl.c:69
 msgid "Argument m must be numeric"
 msgstr "Argumento m deve ser numérico"
 
-#: monoSpl.c:70
+#: monoSpl.c:72
 msgid "length(m) must be at least two"
 msgstr "length(m) deve ser pelo menos dois"
 
-#: monoSpl.c:72
+#: monoSpl.c:74
 msgid "Argument Sx must be numeric vector one shorter than m[]"
 msgstr "Argumento Sx deve ser um vetor numérico com comprimento menor que m[]"
 
-#: nls.c:97
+#: nls.c:99
 msgid "'control' must be a list"
 msgstr "'control' deve ser uma lista"
 
-#: nls.c:99
+#: nls.c:101
 msgid "'m' must be a list"
 msgstr "'m' deve ser uma lista"
 
-#: nls.c:105 nls.c:110 nls.c:115 nls.c:120 nls.c:125 nls.c:166 nls.c:171
-#: nls.c:176 nls.c:181 nls.c:186 nls.c:191
+#: nls.c:107 nls.c:112 nls.c:117 nls.c:122 nls.c:127 nls.c:168 nls.c:173
+#: nls.c:178 nls.c:183 nls.c:188 nls.c:193
 #, c-format
 msgid "'%s' absent"
 msgstr "'%s' ausente"
 
-#: nls.c:232
+#: nls.c:234
 msgid "singular gradient"
 msgstr "gradiente singular"
 
-#: nls.c:253
+#: nls.c:255
 #, c-format
 msgid "step factor %g reduced below 'minFactor' of %g"
 msgstr "fator de passos %g reduzido abaixo de 'minFactor' de %g"
 
-#: nls.c:262
+#: nls.c:264
 #, c-format
 msgid "number of iterations exceeded maximum of %d"
 msgstr "número de iterações excedeu o máximo de %d"
 
-#: nls.c:267
+#: nls.c:269
 msgid "converged"
 msgstr "convergiu"
 
-#: nls.c:288
+#: nls.c:290
 msgid "'theta' should be of type character"
 msgstr "'theta' deve ser do tipo caractere"
 
-#: nls.c:290 port.c:375
+#: nls.c:292 port.c:376
 msgid "use of NULL environment is defunct"
 msgstr "uso do ambiente NULL é obsoleto"
 
-#: nls.c:294
+#: nls.c:296
 msgid "'rho' should be an environment"
 msgstr "'rho' deve ser um ambiente"
 
-#: nls.c:297
+#: nls.c:299
 msgid "'dir' is not a numeric vector of the correct length"
 msgstr "'dir' não é um vetor numérico de comprimento correto"
 
-#: nls.c:311 nls.c:341
+#: nls.c:313 nls.c:347
 msgid "Missing value or an infinity produced when evaluating the model"
 msgstr "Obtido valor faltante ou infinito quando avaliando o modelo"
 
-#: nls.c:318
+#: nls.c:321
 #, c-format
 msgid "variable '%s' is integer, not numeric"
 msgstr "variável '%s' é inteira, não numérica"
 
-#: nls.c:320
+#: nls.c:323
 #, c-format
 msgid "variable '%s' is not numeric"
 msgstr "variável '%s' não é numérica"
@@ -505,119 +529,119 @@ msgstr "'ndeps' tem o comprimento errado"
 msgid "unknown 'method'"
 msgstr "'method' desconhecido"
 
-#: optimize.c:217 optimize.c:309 optimize.c:530
+#: optimize.c:220 optimize.c:306 optimize.c:528
 msgid "NA replaced by maximum positive value"
 msgstr "NA substituido pelo máximo valor positivo"
 
-#: optimize.c:225 optimize.c:321 optimize.c:538
+#: optimize.c:228 optimize.c:318 optimize.c:536
 msgid "NA/Inf replaced by maximum positive value"
 msgstr "NA/Inf substituido pelo máximo valor positivo"
 
-#: optimize.c:234
+#: optimize.c:237
 msgid "invalid function value in 'optimize'"
 msgstr "valor de função inválido em 'optimize'"
 
-#: optimize.c:252 optimize.c:350 optimize.c:723
+#: optimize.c:255 optimize.c:347 optimize.c:721
 msgid "attempt to minimize non-function"
 msgstr "tentativa de minimizar algo diferente de função"
 
-#: optimize.c:259 optimize.c:266 optimize.c:275 optimize.c:355 optimize.c:360
-#: optimize.c:376
+#: optimize.c:262 optimize.c:269 optimize.c:278 optimize.c:352 optimize.c:357
+#: optimize.c:373
 #, c-format
 msgid "invalid '%s' value"
 msgstr "valor de '%s' inválido"
 
-#: optimize.c:268 optimize.c:361
+#: optimize.c:271 optimize.c:358
 msgid "'xmin' not less than 'xmax'"
 msgstr "'xmin' não é menor que 'xmax'"
 
-#: optimize.c:318
+#: optimize.c:315
 #, fuzzy
 msgid "-Inf replaced by maximally negative value"
 msgstr "NA/Inf substituido pelo máximo valor positivo"
 
-#: optimize.c:331
+#: optimize.c:328
 msgid "invalid function value in 'zeroin'"
 msgstr "valor de função inválido em 'zeroin'"
 
-#: optimize.c:366 optimize.c:371
+#: optimize.c:363 optimize.c:368
 #, c-format
 msgid "NA value for '%s' is not allowed"
 msgstr "valor NA para '%s' não são permitidos"
 
-#: optimize.c:381
+#: optimize.c:378
 msgid "'maxiter' must be positive"
 msgstr "'maxiter' deve ser positivo"
 
-#: optimize.c:522
+#: optimize.c:520
 msgid "non-finite value supplied by 'nlm'"
 msgstr "valores não finitos fornecidos por 'nlm'"
 
-#: optimize.c:557
+#: optimize.c:555
 msgid "invalid function value in 'nlm' optimizer"
 msgstr "valor de função inválido em otimizador 'nlm'"
 
-#: optimize.c:568 optimize.c:583
+#: optimize.c:566 optimize.c:581
 msgid "function value caching for optimization is seriously confused"
 msgstr "cache de valores de função para otimização está seriamente confuso"
 
-#: optimize.c:598
+#: optimize.c:596
 msgid "numeric parameter expected"
 msgstr "parâmetro numérico esperado"
 
-#: optimize.c:602
+#: optimize.c:600
 msgid "conflicting parameter lengths"
 msgstr "parâmetros de comprimentos incompatíveis"
 
-#: optimize.c:606
+#: optimize.c:604
 msgid "invalid parameter length"
 msgstr "parâmetro de comprimento inválido"
 
-#: optimize.c:616 optimize.c:623
+#: optimize.c:614 optimize.c:621
 msgid "missing value in parameter"
 msgstr "parâmetro com valor faltante"
 
-#: optimize.c:628
+#: optimize.c:626
 msgid "invalid parameter type"
 msgstr "parâmetro com tipo inválido"
 
-#: optimize.c:639
+#: optimize.c:637
 msgid "non-positive number of parameters in nlm"
 msgstr "número de parâmetros não positivo em nlm"
 
-#: optimize.c:641
+#: optimize.c:639
 msgid "nlm is inefficient for 1-d problems"
 msgstr "nlm é ineficiente para problemas unidimensionais"
 
-#: optimize.c:643
+#: optimize.c:641
 msgid "invalid gradient tolerance in nlm"
 msgstr "tolerância de gradiente inválida em nlm"
 
-#: optimize.c:645
+#: optimize.c:643
 msgid "invalid iteration limit in nlm"
 msgstr "limite de iteração inválido em nlm"
 
-#: optimize.c:647
+#: optimize.c:645
 msgid "minimization function has no good digits in nlm"
 msgstr "função de minimização não tem digítos significativos em nlm"
 
-#: optimize.c:649
+#: optimize.c:647
 msgid "no analytic gradient to check in nlm!"
 msgstr "nenhum gradiente analítico para verificar em nlm!"
 
-#: optimize.c:651
+#: optimize.c:649
 msgid "no analytic Hessian to check in nlm!"
 msgstr "nenhuma Hessiana analítica para verificar em nlm!"
 
-#: optimize.c:653
+#: optimize.c:651
 msgid "probable coding error in analytic gradient"
 msgstr "provável erro no código do gradiente analítico"
 
-#: optimize.c:655
+#: optimize.c:653
 msgid "probable coding error in analytic Hessian"
 msgstr "provável erro no código da Hessiana analítica"
 
-#: optimize.c:657
+#: optimize.c:655
 #, c-format
 msgid ""
 "*** unknown error message (msg = %d) in nlm()\n"
@@ -626,23 +650,23 @@ msgstr ""
 "*** mensagem de erro desconhecida (msg = %d) em nlm()\n"
 "*** não deveria acontecer!"
 
-#: optimize.c:668
+#: optimize.c:666
 msgid "Relative gradient close to zero.\n"
 msgstr "Gradiente relativo próximo de zero.\n"
 
-#: optimize.c:669 optimize.c:673
+#: optimize.c:667 optimize.c:671
 msgid "Current iterate is probably solution.\n"
 msgstr "Iteração atual é provavelmente a solução.\n"
 
-#: optimize.c:672
+#: optimize.c:670
 msgid "Successive iterates within tolerance.\n"
 msgstr "Iterações sucessivas dentro do limite de tolerância.\n"
 
-#: optimize.c:676
+#: optimize.c:674
 msgid "Last global step failed to locate a point lower than x.\n"
 msgstr "Último passo global falhou em achar um ponto inferior a x.\n"
 
-#: optimize.c:677
+#: optimize.c:675
 msgid ""
 "Either x is an approximate local minimum of the function,\n"
 "the function is too non-linear for this algorithm,\n"
@@ -652,11 +676,11 @@ msgstr ""
 "a função é muito não-linear para esse algorítmo,\n"
 "ou steptol é muito grande.\n"
 
-#: optimize.c:682
+#: optimize.c:680
 msgid "Iteration limit exceeded.  Algorithm failed.\n"
 msgstr "Limite de iterações atingido. Algoritmo falhou.\n"
 
-#: optimize.c:685
+#: optimize.c:683
 msgid ""
 "Maximum step size exceeded 5 consecutive times.\n"
 "Either the function is unbounded below,\n"
@@ -670,34 +694,34 @@ msgstr ""
 "por cima em alguma direção\n"
 "ou stepmx é muito pequeno.\n"
 
-#: optimize.c:747 optimize.c:752 optimize.c:756 optimize.c:760 optimize.c:764
-#: optimize.c:768 optimize.c:773
+#: optimize.c:745 optimize.c:750 optimize.c:754 optimize.c:758 optimize.c:762
+#: optimize.c:766 optimize.c:771
 msgid "invalid NA value in parameter"
 msgstr "valor NA inválido em parâmetro"
 
-#: optimize.c:804
+#: optimize.c:800
 msgid "hessian supplied is of the wrong length or mode, so ignored"
 msgstr "hessiana fornecida tem comprimento ou modo errados; ignorada"
 
-#: optimize.c:808
+#: optimize.c:804
 msgid "gradient supplied is of the wrong length or mode, so ignored"
 msgstr "gradiente fornecido tem comprimento ou modo errados; ignorado"
 
-#: pacf.c:94
+#: pacf.c:87
 msgid "bad Starma struct"
 msgstr "estrutura Starma inválida"
 
-#: pacf.c:240
+#: pacf.c:233
 #, c-format
 msgid "starma error code %d"
 msgstr "erro starma código %d"
 
-#: pacf.c:300
+#: pacf.c:293
 #, c-format
 msgid "forkal error code %d"
 msgstr "erro forkal código %d"
 
-#: pacf.c:474
+#: pacf.c:466
 msgid "invalid value of lag.max"
 msgstr "valor inválido para lag.max"
 
@@ -706,98 +730,112 @@ msgstr "valor inválido para lag.max"
 msgid "Rf_divset: alg = %d must be 1, 2, 3, or 4"
 msgstr "Rf_divset: alg = %d deve ser 1, 2, 3, ou 4"
 
-#: port.c:312
+#: port.c:149
+msgid "port algorithms 3 or higher are not supported"
+msgstr ""
+
+#: port.c:313
 #, c-format
 msgid "gradient function must return a numeric vector of length %d"
 msgstr "função gradiente deve retornar um vetor numérico de comprimento %d"
 
-#: port.c:324
+#: port.c:325
 #, c-format
 msgid "Hessian function must return a square numeric matrix of order %d"
 msgstr "função hessiana deve retornar uma matriz quadrada numérica de ordem %d"
 
-#: port.c:379
+#: port.c:380
 msgid "'rho' must be an environment"
 msgstr "'rho' deve ser um ambiente"
 
-#: port.c:381 port.c:542
+#: port.c:382 port.c:548
 msgid "'d' must be a nonempty numeric vector"
 msgstr "'d' deve ser um vetor numérico não-vazio"
 
-#: port.c:383
+#: port.c:384
 msgid "When Hessian defined must also have gradient defined"
 msgstr ""
 "quando a hessiana for definida o gradiente também deve ser especificado"
 
-#: port.c:386
+#: port.c:387
 #, c-format
 msgid "environment 'rho' must contain a numeric vector '.par' of length %d"
 msgstr "ambiente 'rho' deve conter um vetor numérico '.par' de comprimento %d"
 
-#: port.c:400
+#: port.c:401
 msgid "'lower' and 'upper' must be numeric vectors"
 msgstr "'lower' e 'upper' devem ser vetores numéricos"
 
-#: port.c:456
+#: port.c:460
 msgid "'getElement' applies only to named lists"
 msgstr "'getElement' se aplica apenas a listas nomeadas"
 
-#: port.c:477
+#: port.c:481
 #, c-format
 msgid "%s$%s() not found"
 msgstr "%s$%s() não encontrado"
 
-#: port.c:490
+#: port.c:494
 #, c-format
 msgid "'gradient' must be a numeric matrix of dimension (%d,%d)"
 msgstr "'gradient' deve ser uma matriz numérica de dimensão (%d,%d)"
 
-#: port.c:511
+#: port.c:515
 #, c-format
 msgid "fcn produced mode %d, length %d - wanted mode %d, length %d"
 msgstr ""
 "fcn retornou modo %d, comprimento %d - esperado modo %d, comprimento %d"
 
-#: port.c:524
+#: port.c:528
 msgid "invalid type for eval_check_store"
 msgstr "tipo inválido para eval_check_store"
 
-#: port.c:543
+#: port.c:549
 msgid "m must be a list"
 msgstr "m deve ser uma lista"
 
-#: port.c:563
+#: port.c:569
 msgid "'lowerb' and 'upperb' must be numeric vectors"
 msgstr "'lowerb' e 'upperb' devem ser vetores numéricos"
 
-#: rWishart.c:51
+#: rWishart.c:53
 msgid "inconsistent degrees of freedom and dimension"
 msgstr ""
 
-#: rWishart.c:84
+#: rWishart.c:86
 msgid "'scal' must be a square, real matrix"
 msgstr ""
 
-#: rWishart.c:96
+#: rWishart.c:98
 msgid "'scal' matrix is not positive-definite"
 msgstr ""
 
-#: random.c:66 random.c:70 random.c:75 random.c:80 random.c:161 random.c:167
-#: random.c:172 random.c:177 random.c:240 random.c:245 random.c:250
-#: random.c:264 random.c:355
+#: random.c:53 random.c:128 random.c:200 random.c:284
+msgid "NAs produced"
+msgstr "NAs produzidos"
+
+#: random.c:60 random.c:66 random.c:72 random.c:90 random.c:161 random.c:242
+#: random.c:376
 msgid "invalid arguments"
 msgstr "argumentos inválidos"
 
-#: random.c:95 random.c:121 random.c:194 random.c:222 random.c:270
-#: random.c:289
-msgid "NAs produced"
-msgstr "NAs produzidos"
+#: random.c:310
+msgid "NA in probability vector"
+msgstr ""
+
+#: random.c:312
+msgid "negative probability"
+msgstr ""
 
-#: random.c:308
+#: random.c:318
+msgid "no positive probabilities"
+msgstr ""
+
+#: random.c:330
 msgid "invalid first argument 'n'"
 msgstr "primeiro argumento 'n' inválido"
 
-#: random.c:310
+#: random.c:332
 msgid "invalid second argument 'size'"
 msgstr "segundo argumento 'size' inválido"
 
@@ -806,12 +844,12 @@ msgstr "segundo argumento 'size' inválido"
 msgid "rcont2 [%d,%d]: exp underflow to 0; algorithm failure"
 msgstr ""
 
-#: smooth.c:101
+#: smooth.c:107
 #, c-format
 msgid "invalid end-rule for running median of 3: %d"
 msgstr "regra final inválida para mediana móvel de 3: %d"
 
-#: starma.c:366
+#: starma.c:364
 #, c-format
 msgid "missing value in last %d observations"
 msgstr "valor faltante nas últimas %d observações"
diff --git a/src/library/stats/po/ru.po b/src/library/stats/po/ru.po
index fa38910..7294273 100644
--- a/src/library/stats/po/ru.po
+++ b/src/library/stats/po/ru.po
@@ -10,17 +10,16 @@ msgid ""
 msgstr ""
 "Project-Id-Version: R 2.9.0\n"
 "Report-Msgid-Bugs-To: bugs.r-project.org\n"
-"POT-Creation-Date: 2014-03-27 18:36+0000\n"
-"PO-Revision-Date: 2013-03-19 21:49-0600\n"
+"POT-Creation-Date: 2015-06-06 13:51+0100\n"
+"PO-Revision-Date: 2016-04-05 18:09-0600\n"
 "Last-Translator: Alexey Shipunov <dactylorhiza at gmail.com>\n"
 "Language-Team: Russian\n"
-"Language: \n"
+"Language: ru\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=KOI8-R\n"
 "Content-Transfer-Encoding: 8bit\n"
 "X-Poedit-Language: Russian\n"
-"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n"
-"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
+"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
 
 #: Srunmed.c:55
 msgid "bandwidth/span of running medians is larger than n"
@@ -42,11 +41,17 @@ msgstr "approx(): 
 msgid "approx(): attempted to interpolate NA values"
 msgstr "approx(): ������� ��������������� ����������� ��������"
 
-#: arima.c:81 arima.c:192 arima.c:377 arima.c:608
+#: arima.c:81
+#: arima.c:192
+#: arima.c:377
+#: arima.c:608
 msgid "invalid argument type"
 msgstr "������������ ��� ���������"
 
-#: arima.c:444 arima.c:530 pacf.c:331 pacf.c:371
+#: arima.c:444
+#: arima.c:530
+#: pacf.c:327
+#: pacf.c:366
 msgid "can only transform 100 pars in arima0"
 msgstr "���� ���������������� ������ 100 ��� � arima0"
 
@@ -54,6 +59,11 @@ msgstr "
 msgid "maximum supported lag is 350"
 msgstr "������������ �������������� ��� -- 350"
 
+#: bandwidths.c:121
+#, c-format
+msgid "non-finite x[%d] in bandwidth calculation"
+msgstr "�� �������� x[%d] ��� ���������� ���������"
+
 #: complete_cases.c:26
 #, c-format
 msgid "invalid 'type' (%s) of argument"
@@ -75,11 +85,14 @@ msgstr "
 msgid "'x' is NULL"
 msgstr "'x' -- ��� NULL"
 
-#: cov.c:663 cov.c:669
+#: cov.c:663
+#: cov.c:669
 msgid "incompatible dimensions"
 msgstr "������������� �����������"
 
-#: cov.c:688 cov.c:729 cov.c:762
+#: cov.c:688
+#: cov.c:729
+#: cov.c:762
 msgid "no complete element pairs"
 msgstr "��� ������ ��� ���������"
 
@@ -104,24 +117,29 @@ msgstr "
 msgid "Function '%s' is not in the derivatives table"
 msgstr "������� '%s' ����������� � ������� �����������"
 
-#: deriv.c:642
+#: deriv.c:641
+msgid "'expr' must be an expression or call"
+msgstr "'expr' ������ ���� ���������� ��� �������"
+
+#: deriv.c:644
 msgid "variable must be a character string"
 msgstr "���������� ������ ���� ��������� �������"
 
-#: deriv.c:644
+#: deriv.c:646
 msgid "only the first element is used as variable name"
 msgstr "������ ������ ������� ����������� ��� ��� ����������"
 
-#: deriv.c:657
+#: deriv.c:659
 #, c-format
 msgid "invalid expression in '%s'"
 msgstr "������������ ��������� � '%s'"
 
-#: deriv.c:935 model.c:99
+#: deriv.c:937
+#: model.c:99
 msgid "invalid variable names"
 msgstr "������������ ����� ����������"
 
-#: deriv.c:944
+#: deriv.c:946
 msgid "invalid tag"
 msgstr "������������ ���"
 
@@ -150,21 +168,27 @@ msgstr "
 msgid "Value %g out of range (0, 1)"
 msgstr "�������� %g ��� ���������� (0, 1)"
 
-#: family.c:65 family.c:79 family.c:97
+#: family.c:65
+#: family.c:79
+#: family.c:97
 #, c-format
 msgid "Argument %s must be a nonempty numeric vector"
 msgstr "�������� %s ������ ���� �������� �������� ��������"
 
-#: family.c:130 family.c:133
+#: family.c:130
+#: family.c:133
 #, c-format
 msgid "argument %s must be a numeric vector of length 1 or length %d"
 msgstr "�������� %s ������ ���� �������� �������� ����� 1 ��� %d"
 
-#: fourier.c:66 fourier.c:161
+#: fourier.c:66
+#: fourier.c:161
 msgid "non-numeric argument"
 msgstr "���������� ��������"
 
-#: fourier.c:84 fourier.c:102 fourier.c:175
+#: fourier.c:84
+#: fourier.c:102
+#: fourier.c:175
 msgid "fft factorization error"
 msgstr "������ ������������ � fft"
 
@@ -185,19 +209,19 @@ msgid "only 2500 rows are allowed for sm.method=\"spline\""
 msgstr "������ 2500 ����� ����������� ��� sm.method=\"spline\""
 
 #: lm.c:57
-#, fuzzy
 msgid "'x' is not a matrix"
-msgstr "'tmax' �� �������� ����� ������"
+msgstr "'x' -- �� �������"
 
 #: lm.c:62
 #, c-format
 msgid "dimensions of 'x' (%d,%d) and 'y' (%d) do not match"
-msgstr ""
+msgstr "��������� 'x' (%d,%d) � 'y' (%d) �� ������������� ���� �����"
 
-#: lm.c:77 lm.c:81
+#: lm.c:77
+#: lm.c:81
 #, c-format
 msgid "NA/NaN/Inf in '%s'"
-msgstr ""
+msgstr "NA/NaN/Inf � '%s'"
 
 #: loessc.c:233
 msgid "span is too small"
@@ -247,7 +271,8 @@ msgstr "
 msgid "invalid variables"
 msgstr "������������ ����������"
 
-#: model.c:101 model.c:106
+#: model.c:101
+#: model.c:106
 msgid "number of variables != number of variable names"
 msgstr "���������� ���������� != ���������� ���� ����������"
 
@@ -278,7 +303,9 @@ msgstr "
 msgid "invalid result from na.action"
 msgstr "������������ ��������� 'na.action'"
 
-#: model.c:369 model.c:377 optim.c:197
+#: model.c:369
+#: model.c:377
+#: optim.c:197
 #, c-format
 msgid "invalid '%s' argument"
 msgstr "������������ �������� '%s'"
@@ -296,7 +323,8 @@ msgstr "
 msgid "variable lengths differ (found for variable %d)"
 msgstr "����� ���������� ����������� (������� ��� ���������� %d)"
 
-#: model.c:418 model.c:425
+#: model.c:418
+#: model.c:425
 #, c-format
 msgid "variable %d has no levels"
 msgstr "� ���������� %d ��� �������"
@@ -320,7 +348,12 @@ msgstr "
 msgid "problem with term %d in model.matrix: no columns are assigned"
 msgstr "�������� � ������ %d � 'model.matrix': �� ��������� �������"
 
-#: model.c:621 model.c:626 model.c:632 model.c:643 model.c:649 model.c:655
+#: model.c:621
+#: model.c:626
+#: model.c:632
+#: model.c:643
+#: model.c:649
+#: model.c:655
 msgid "term names will be truncated"
 msgstr "����� ������ ����� ���������"
 
@@ -349,7 +382,8 @@ msgstr "
 msgid "invalid model formula"
 msgstr "������������ ��������� �������"
 
-#: model.c:1147 model.c:1395
+#: model.c:1147
+#: model.c:1395
 msgid "invalid power in formula"
 msgstr "������������ ������� � �������"
 
@@ -362,23 +396,23 @@ msgstr "
 msgid "duplicated name '%s' in data frame using '.'"
 msgstr "������������� ��� '%s' � ������� ������, ��������� '.'"
 
-#: model.c:1576
+#: model.c:1579
 msgid "invalid model formula in EncodeVars"
 msgstr "������������ ��������� ������� � EncodeVars"
 
-#: model.c:1662
+#: model.c:1665
 msgid "argument is not a valid model"
 msgstr "�������� �� �������� ���������� �������"
 
-#: model.c:1672
+#: model.c:1675
 msgid "'specials' must be NULL or a character vector"
 msgstr "'specials' ������ ���� NULL ��� ��������� ��������"
 
-#: model.c:1684
+#: model.c:1687
 msgid "'data' argument is of the wrong type"
 msgstr "�������� 'data' ������������� ����"
 
-#: model.c:1952
+#: model.c:1957
 msgid "'.' in formula and no 'data' argument"
 msgstr "'.' � ������� � ��� ��������� 'data'"
 
@@ -406,8 +440,17 @@ msgstr "'control' 
 msgid "'m' must be a list"
 msgstr "'m' ������ ���� �������"
 
-#: nls.c:105 nls.c:110 nls.c:115 nls.c:120 nls.c:125 nls.c:166 nls.c:171
-#: nls.c:176 nls.c:181 nls.c:186 nls.c:191
+#: nls.c:105
+#: nls.c:110
+#: nls.c:115
+#: nls.c:120
+#: nls.c:125
+#: nls.c:166
+#: nls.c:171
+#: nls.c:176
+#: nls.c:181
+#: nls.c:186
+#: nls.c:191
 #, c-format
 msgid "'%s' absent"
 msgstr "'%s' �����������"
@@ -434,7 +477,8 @@ msgstr "
 msgid "'theta' should be of type character"
 msgstr "'theta' ������ ���� ���������� ����"
 
-#: nls.c:290 port.c:375
+#: nls.c:290
+#: port.c:376
 msgid "use of NULL environment is defunct"
 msgstr "������������� ��������� NULL ������ �� ��������"
 
@@ -446,22 +490,23 @@ msgstr "'rho' 
 msgid "'dir' is not a numeric vector of the correct length"
 msgstr "'dir' �� �������� �������� �������� ������ ���������� ����� �����"
 
-#: nls.c:311 nls.c:341
+#: nls.c:311
+#: nls.c:345
 msgid "Missing value or an infinity produced when evaluating the model"
-msgstr ""
-"����������� �������� ��� ���������������� �������� ��� ���������� ������"
+msgstr "����������� �������� ��� ���������������� �������� ��� ���������� ������"
 
-#: nls.c:318
+#: nls.c:319
 #, c-format
 msgid "variable '%s' is integer, not numeric"
 msgstr "���������� '%s' -- ����� �����, �� 'numeric'"
 
-#: nls.c:320
+#: nls.c:321
 #, c-format
 msgid "variable '%s' is not numeric"
 msgstr "���������� '%s' �� �������� ��������"
 
-#: optim.c:80 optim.c:107
+#: optim.c:80
+#: optim.c:107
 msgid "non-finite value supplied by optim"
 msgstr "����������� �������� �������� �� 'optim'"
 
@@ -475,11 +520,13 @@ msgstr "
 msgid "gradient in optim evaluated to length %d not %d"
 msgstr "���������� ����� ��������� � 'optim' -- %d, � �� %d"
 
-#: optim.c:193 optim.c:399
+#: optim.c:193
+#: optim.c:399
 msgid "'fn' is not a function"
 msgstr "'fn' �� �������� ��������"
 
-#: optim.c:211 optim.c:405
+#: optim.c:211
+#: optim.c:405
 msgid "'parscale' is of the wrong length"
 msgstr "'parscale' ������������ �����"
 
@@ -488,15 +535,21 @@ msgid "'maxit' is not an integer"
 msgstr "'maxit' �� �������� ����� ������"
 
 #: optim.c:260
-#, fuzzy
 msgid "'tmax' is not a positive integer"
-msgstr "'tmax' �� �������� ����� ������"
+msgstr "'tmax' �� �������� ������������� ����� ������"
 
-#: optim.c:262 optim.c:279 optim.c:304 optim.c:334 optim.c:413
+#: optim.c:262
+#: optim.c:279
+#: optim.c:304
+#: optim.c:334
+#: optim.c:413
 msgid "'gr' is not a function"
 msgstr "'gr' �� �������� ��������"
 
-#: optim.c:285 optim.c:310 optim.c:340 optim.c:419
+#: optim.c:285
+#: optim.c:310
+#: optim.c:340
+#: optim.c:419
 msgid "'ndeps' is of the wrong length"
 msgstr "'ndeps' ������������ �����"
 
@@ -504,118 +557,132 @@ msgstr "'ndeps' 
 msgid "unknown 'method'"
 msgstr "����������� 'method'"
 
-#: optimize.c:217 optimize.c:309 optimize.c:530
+#: optimize.c:220
+#: optimize.c:306
+#: optimize.c:528
 msgid "NA replaced by maximum positive value"
 msgstr "NA �������� ������������ ������������� ���������"
 
-#: optimize.c:225 optimize.c:321 optimize.c:538
+#: optimize.c:228
+#: optimize.c:318
+#: optimize.c:536
 msgid "NA/Inf replaced by maximum positive value"
 msgstr "NA/Inf �������� ������������ ������������� ���������"
 
-#: optimize.c:234
+#: optimize.c:237
 msgid "invalid function value in 'optimize'"
 msgstr "������������ �������� ������� � 'optimize'"
 
-#: optimize.c:252 optimize.c:350 optimize.c:723
+#: optimize.c:255
+#: optimize.c:347
+#: optimize.c:721
 msgid "attempt to minimize non-function"
 msgstr "������� �������������� ��-�������"
 
-#: optimize.c:259 optimize.c:266 optimize.c:275 optimize.c:355 optimize.c:360
-#: optimize.c:376
+#: optimize.c:262
+#: optimize.c:269
+#: optimize.c:278
+#: optimize.c:352
+#: optimize.c:357
+#: optimize.c:373
 #, c-format
 msgid "invalid '%s' value"
 msgstr "������������ �������� '%s'"
 
-#: optimize.c:268 optimize.c:361
+#: optimize.c:271
+#: optimize.c:358
 msgid "'xmin' not less than 'xmax'"
 msgstr "'xmin' �� ������ ��� 'xmax'"
 
-#: optimize.c:318
+#: optimize.c:315
 msgid "-Inf replaced by maximally negative value"
 msgstr "-Inf �������� ������������ ������������� ���������"
 
-#: optimize.c:331
+#: optimize.c:328
 msgid "invalid function value in 'zeroin'"
 msgstr "������������ �������� ������� � 'zeroin'"
 
-#: optimize.c:366 optimize.c:371
+#: optimize.c:363
+#: optimize.c:368
 #, c-format
 msgid "NA value for '%s' is not allowed"
 msgstr "NA � '%s' �� �����������"
 
-#: optimize.c:381
+#: optimize.c:378
 msgid "'maxiter' must be positive"
 msgstr "'maxiter' ������ ���� �����������"
 
-#: optimize.c:522
+#: optimize.c:520
 msgid "non-finite value supplied by 'nlm'"
 msgstr "��� 'nlm' ����������� �� �������� ��������"
 
-#: optimize.c:557
+#: optimize.c:555
 msgid "invalid function value in 'nlm' optimizer"
 msgstr "������������ �������� ������� � ������������ 'nlm'"
 
-#: optimize.c:568 optimize.c:583
+#: optimize.c:566
+#: optimize.c:581
 msgid "function value caching for optimization is seriously confused"
 msgstr "�� ������� �������� ��������������� �������� �������"
 
-#: optimize.c:598
+#: optimize.c:596
 msgid "numeric parameter expected"
 msgstr "��������� �������� ��������"
 
-#: optimize.c:602
+#: optimize.c:600
 msgid "conflicting parameter lengths"
 msgstr "������������� ����� ����������"
 
-#: optimize.c:606
+#: optimize.c:604
 msgid "invalid parameter length"
 msgstr "������������ �������� �����"
 
-#: optimize.c:616 optimize.c:623
+#: optimize.c:614
+#: optimize.c:621
 msgid "missing value in parameter"
 msgstr "����������� �������� � ���������"
 
-#: optimize.c:628
+#: optimize.c:626
 msgid "invalid parameter type"
 msgstr "������������ �������� ����"
 
-#: optimize.c:639
+#: optimize.c:637
 msgid "non-positive number of parameters in nlm"
 msgstr "�� ������������� ���������� ���������� � nlm"
 
-#: optimize.c:641
+#: optimize.c:639
 msgid "nlm is inefficient for 1-d problems"
 msgstr "'nlm' ������������ ��� ���������� �������"
 
-#: optimize.c:643
+#: optimize.c:641
 msgid "invalid gradient tolerance in nlm"
 msgstr "������������ ������ ��������� � nlm"
 
-#: optimize.c:645
+#: optimize.c:643
 msgid "invalid iteration limit in nlm"
 msgstr "������������ ����� �������� � nlm"
 
-#: optimize.c:647
+#: optimize.c:645
 msgid "minimization function has no good digits in nlm"
 msgstr "� ������� ����������� � nlm ��� ������� �����"
 
-#: optimize.c:649
+#: optimize.c:647
 msgid "no analytic gradient to check in nlm!"
 msgstr "� nlm ��� �������������� ��������� ��� ��������!"
 
-#: optimize.c:651
+#: optimize.c:649
 msgid "no analytic Hessian to check in nlm!"
 msgstr "� nlm ��� �������������� �������� ��� ��������!"
 
-#: optimize.c:653
+#: optimize.c:651
 msgid "probable coding error in analytic gradient"
 msgstr "��������, ������ ����������� � ������������� ���������"
 
-#: optimize.c:655
+#: optimize.c:653
 msgid "probable coding error in analytic Hessian"
 msgstr "��������, ������ ����������� � ������������� ��������"
 
-#: optimize.c:657
+#: optimize.c:655
 #, c-format
 msgid ""
 "*** unknown error message (msg = %d) in nlm()\n"
@@ -624,24 +691,24 @@ msgstr ""
 "*** ����������� ��������� �� ������ (msg = %d) � nlm()\n"
 "*** �� ������ �����������!"
 
-#: optimize.c:668
+#: optimize.c:666
 msgid "Relative gradient close to zero.\n"
 msgstr "������������� �������� ������ � 0.\n"
 
-#: optimize.c:669 optimize.c:673
+#: optimize.c:667
+#: optimize.c:671
 msgid "Current iterate is probably solution.\n"
 msgstr "������� ��������, ��������, �������� ��������.\n"
 
-#: optimize.c:672
+#: optimize.c:670
 msgid "Successive iterates within tolerance.\n"
 msgstr "���������������� �������� ������ �������.\n"
 
-#: optimize.c:676
+#: optimize.c:674
 msgid "Last global step failed to locate a point lower than x.\n"
-msgstr ""
-"���������� ����������� ���� �� ������� ���������� �����, ������� ��� x.\n"
+msgstr "���������� ����������� ���� �� ������� ���������� �����, ������� ��� x.\n"
 
-#: optimize.c:677
+#: optimize.c:675
 msgid ""
 "Either x is an approximate local minimum of the function,\n"
 "the function is too non-linear for this algorithm,\n"
@@ -651,11 +718,11 @@ msgstr ""
 "���� ������� ��� ����� ��������� ����������������,\n"
 "���� 'steptol' ������� ������.\n"
 
-#: optimize.c:682
+#: optimize.c:680
 msgid "Iteration limit exceeded.  Algorithm failed.\n"
 msgstr "����� �������� ��������. �������� ���������� �������.\n"
 
-#: optimize.c:685
+#: optimize.c:683
 msgid ""
 "Maximum step size exceeded 5 consecutive times.\n"
 "Either the function is unbounded below,\n"
@@ -669,34 +736,39 @@ msgstr ""
 "������ � ��� �� �����������,\n"
 "���� 'stepmx' ������� ����.\n"
 
-#: optimize.c:747 optimize.c:752 optimize.c:756 optimize.c:760 optimize.c:764
-#: optimize.c:768 optimize.c:773
+#: optimize.c:745
+#: optimize.c:750
+#: optimize.c:754
+#: optimize.c:758
+#: optimize.c:762
+#: optimize.c:766
+#: optimize.c:771
 msgid "invalid NA value in parameter"
 msgstr "������������ NA-�������� � ���������"
 
-#: optimize.c:804
+#: optimize.c:800
 msgid "hessian supplied is of the wrong length or mode, so ignored"
 msgstr "���������� ������� ������������ ����� ��� ����, � ������� ��������"
 
-#: optimize.c:808
+#: optimize.c:804
 msgid "gradient supplied is of the wrong length or mode, so ignored"
 msgstr "���������� �������� ������������ ����� ��� ����, � ������� ��������"
 
-#: pacf.c:94
+#: pacf.c:90
 msgid "bad Starma struct"
 msgstr "������������ ��������� 'Starma'"
 
-#: pacf.c:240
+#: pacf.c:236
 #, c-format
 msgid "starma error code %d"
 msgstr "������ 'starma' � ����� %d"
 
-#: pacf.c:300
+#: pacf.c:296
 #, c-format
 msgid "forkal error code %d"
 msgstr "������ 'forkal' � ����� %d"
 
-#: pacf.c:474
+#: pacf.c:469
 msgid "invalid value of lag.max"
 msgstr "������������ �������� 'lag.max'"
 
@@ -705,69 +777,70 @@ msgstr "
 msgid "Rf_divset: alg = %d must be 1, 2, 3, or 4"
 msgstr "Rf_divset: alg = %d ������ ���� 1, 2, 3 ��� 4"
 
-#: port.c:312
+#: port.c:149
+msgid "port algorithms 3 or higher are not supported"
+msgstr "��������� ������ 3 ��� ���� �� ��������������"
+
+#: port.c:313
 #, c-format
 msgid "gradient function must return a numeric vector of length %d"
 msgstr "����������� ������� ������ ���������� �������� ������ ����� %d"
 
-#: port.c:324
+#: port.c:325
 #, c-format
 msgid "Hessian function must return a square numeric matrix of order %d"
-msgstr ""
-"������� �������� ������ ���������� ���������� �������� ������� ������� %d"
+msgstr "������� �������� ������ ���������� ���������� �������� ������� ������� %d"
 
-#: port.c:379
+#: port.c:380
 msgid "'rho' must be an environment"
 msgstr "'rho' ������ ���� ����������"
 
-#: port.c:381 port.c:542
+#: port.c:382
+#: port.c:546
 msgid "'d' must be a nonempty numeric vector"
 msgstr "'d' ������ ���� �������� �������� ��������"
 
-#: port.c:383
+#: port.c:384
 msgid "When Hessian defined must also have gradient defined"
-msgstr ""
-"����� ������������ �������, ����������� �������, ������ ���� ��������� � "
-"��������"
+msgstr "����� ������������ �������, ����������� �������, ������ ���� ��������� � ��������"
 
-#: port.c:386
+#: port.c:387
 #, c-format
 msgid "environment 'rho' must contain a numeric vector '.par' of length %d"
 msgstr "��������� 'rho' ������ ��������� �������� ������ '.par' ����� %d"
 
-#: port.c:400
+#: port.c:401
 msgid "'lower' and 'upper' must be numeric vectors"
 msgstr "'lower' � 'upper' ������ ���� ��������� ���������"
 
-#: port.c:456
+#: port.c:460
 msgid "'getElement' applies only to named lists"
 msgstr "'getElement' ����������� ���� � ����������� �������"
 
-#: port.c:477
+#: port.c:481
 #, c-format
 msgid "%s$%s() not found"
 msgstr "%s$%s() �� ������"
 
-#: port.c:490
+#: port.c:494
 #, c-format
 msgid "'gradient' must be a numeric matrix of dimension (%d,%d)"
-msgstr ""
-"'gradient' ������ ���� �������� �������� �������� � ����������� (%d,%d)"
+msgstr "'gradient' ������ ���� �������� �������� �������� � ����������� (%d,%d)"
 
-#: port.c:511
+#: port.c:515
 #, c-format
 msgid "fcn produced mode %d, length %d - wanted mode %d, length %d"
 msgstr "fcn ������ ��� %d, ����� %d - ����� ��� %d, ����� %d"
 
-#: port.c:524
+#: port.c:528
 msgid "invalid type for eval_check_store"
 msgstr "������������ ��� 'eval_check_store'"
 
-#: port.c:543
+#: port.c:547
 msgid "m must be a list"
 msgstr "m ������ ���� �������"
 
-#: port.c:563
+#: port.c:567
 msgid "'lowerb' and 'upperb' must be numeric vectors"
 msgstr "'lowerb' � 'upperb' ������ ���� ��������� ���������"
 
@@ -783,22 +856,40 @@ msgstr "'scal' 
 msgid "'scal' matrix is not positive-definite"
 msgstr "������� 'scal' �� ������������-������������"
 
-#: random.c:66 random.c:70 random.c:75 random.c:80 random.c:161 random.c:167
-#: random.c:172 random.c:177 random.c:240 random.c:245 random.c:250
-#: random.c:264 random.c:355
+#: random.c:53
+#: random.c:128
+#: random.c:200
+#: random.c:284
+msgid "NAs produced"
+msgstr "���������� NA"
+
+#: random.c:60
+#: random.c:66
+#: random.c:72
+#: random.c:90
+#: random.c:161
+#: random.c:242
+#: random.c:376
 msgid "invalid arguments"
 msgstr "������������ ���������"
 
-#: random.c:95 random.c:121 random.c:194 random.c:222 random.c:270
-#: random.c:289
-msgid "NAs produced"
-msgstr "���������� NA"
+#: random.c:310
+msgid "NA in probability vector"
+msgstr "NA � ������� �����������"
+
+#: random.c:312
+msgid "negative probability"
+msgstr "������������� �����������"
 
-#: random.c:308
+#: random.c:318
+msgid "no positive probabilities"
+msgstr "��� ��������� ������������"
+
+#: random.c:330
 msgid "invalid first argument 'n'"
 msgstr "������������ ������ �������� 'n'"
 
-#: random.c:310
+#: random.c:332
 msgid "invalid second argument 'size'"
 msgstr "������������ ������ �������� 'size'"
 
@@ -819,9 +910,8 @@ msgstr "
 
 #~ msgid "allocation error in smooth(*, '3RSR')."
 #~ msgstr "������ ��������� ������ � smooth(*, '3RSR')."
-
 #~ msgid "allocation error in smooth(*, '3RSS')."
 #~ msgstr "������ ��������� ������ � smooth(*, '3RSS')."
-
 #~ msgid "allocation error in smooth(*, '3R')."
 #~ msgstr "������ ��������� ������ � smooth(*, '3R')."
+
diff --git a/src/library/stats/po/stats.pot b/src/library/stats/po/stats.pot
index 686fd8a..b45a9f1 100644
--- a/src/library/stats/po/stats.pot
+++ b/src/library/stats/po/stats.pot
@@ -1,14 +1,14 @@
 # SOME DESCRIPTIVE TITLE.
-# Copyright (C) YEAR The R Core Team
+# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
 # This file is distributed under the same license as the PACKAGE package.
 # FIRST AUTHOR <EMAIL at ADDRESS>, YEAR.
 #
 #, fuzzy
 msgid ""
 msgstr ""
-"Project-Id-Version: R 3.1.0\n"
-"Report-Msgid-Bugs-To: bugs.r-project.org\n"
-"POT-Creation-Date: 2014-03-27 18:36+0000\n"
+"Project-Id-Version: stats 3.4.0\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2016-04-01 10:01-0700\n"
 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
 "Last-Translator: FULL NAME <EMAIL at ADDRESS>\n"
 "Language-Team: LANGUAGE <LL at li.org>\n"
@@ -17,11 +17,11 @@ msgstr ""
 "Content-Type: text/plain; charset=CHARSET\n"
 "Content-Transfer-Encoding: 8bit\n"
 
-#: Srunmed.c:55
+#: Srunmed.c:54
 msgid "bandwidth/span of running medians is larger than n"
 msgstr ""
 
-#: ansari.c:116
+#: ansari.c:118
 msgid "probabilities outside [0,1] in qansari()"
 msgstr ""
 
@@ -41,7 +41,7 @@ msgstr ""
 msgid "invalid argument type"
 msgstr ""
 
-#: arima.c:444 arima.c:530 pacf.c:331 pacf.c:371
+#: arima.c:444 arima.c:530 pacf.c:324 pacf.c:363
 msgid "can only transform 100 pars in arima0"
 msgstr ""
 
@@ -49,6 +49,11 @@ msgstr ""
 msgid "maximum supported lag is 350"
 msgstr ""
 
+#: bandwidths.c:121
+#, c-format
+msgid "non-finite x[%d] in bandwidth calculation"
+msgstr ""
+
 #: complete_cases.c:26
 #, c-format
 msgid "invalid 'type' (%s) of argument"
@@ -62,31 +67,39 @@ msgstr ""
 msgid "not all arguments have the same length"
 msgstr ""
 
-#: cov.c:566
+#: cov.c:569
 msgid "missing observations in cov/cor"
 msgstr ""
 
-#: cov.c:644
+#: cov.c:643
 msgid "'x' is NULL"
 msgstr ""
 
-#: cov.c:663 cov.c:669
+#: cov.c:645
+msgid "'x' is a factor"
+msgstr ""
+
+#: cov.c:665
+msgid "'y' is a factor"
+msgstr ""
+
+#: cov.c:673 cov.c:679
 msgid "incompatible dimensions"
 msgstr ""
 
-#: cov.c:688 cov.c:729 cov.c:762
+#: cov.c:698 cov.c:739 cov.c:772
 msgid "no complete element pairs"
 msgstr ""
 
-#: cov.c:701
+#: cov.c:711
 msgid "invalid 'use' (computational method)"
 msgstr ""
 
-#: cov.c:704
+#: cov.c:714
 msgid "'x' is empty"
 msgstr ""
 
-#: cov.c:798
+#: cov.c:808
 msgid "the standard deviation is zero"
 msgstr ""
 
@@ -99,36 +112,40 @@ msgstr ""
 msgid "Function '%s' is not in the derivatives table"
 msgstr ""
 
-#: deriv.c:642
-msgid "variable must be a character string"
+#: deriv.c:641
+msgid "'expr' must be an expression or call"
 msgstr ""
 
 #: deriv.c:644
+msgid "variable must be a character string"
+msgstr ""
+
+#: deriv.c:646
 msgid "only the first element is used as variable name"
 msgstr ""
 
-#: deriv.c:657
+#: deriv.c:659
 #, c-format
 msgid "invalid expression in '%s'"
 msgstr ""
 
-#: deriv.c:935 model.c:99
+#: deriv.c:937 model.c:99
 msgid "invalid variable names"
 msgstr ""
 
-#: deriv.c:944
+#: deriv.c:946
 msgid "invalid tag"
 msgstr ""
 
-#: distance.c:153
+#: distance.c:152
 msgid "treating non-finite values as NA"
 msgstr ""
 
-#: distance.c:226
+#: distance.c:225
 msgid "distance(): invalid p"
 msgstr ""
 
-#: distance.c:229
+#: distance.c:228
 msgid "distance(): invalid distance"
 msgstr ""
 
@@ -140,17 +157,17 @@ msgstr ""
 msgid "Non-numeric argument to mathematical function"
 msgstr ""
 
-#: family.c:44
+#: family.c:45
 #, c-format
 msgid "Value %g out of range (0, 1)"
 msgstr ""
 
-#: family.c:65 family.c:79 family.c:97
+#: family.c:66 family.c:80 family.c:98
 #, c-format
 msgid "Argument %s must be a nonempty numeric vector"
 msgstr ""
 
-#: family.c:130 family.c:133
+#: family.c:131 family.c:134
 #, c-format
 msgid "argument %s must be a numeric vector of length 1 or length %d"
 msgstr ""
@@ -175,7 +192,12 @@ msgstr ""
 msgid "invalid factors"
 msgstr ""
 
-#: ksmooth.c:67
+#: integrate.c:84 integrate.c:86 integrate.c:128
+#, c-format
+msgid "'%s' must be of length one"
+msgstr ""
+
+#: ksmooth.c:68
 msgid "only 2500 rows are allowed for sm.method=\"spline\""
 msgstr ""
 
@@ -193,7 +215,7 @@ msgstr ""
 msgid "NA/NaN/Inf in '%s'"
 msgstr ""
 
-#: loessc.c:233
+#: loessc.c:240
 msgid "span is too small"
 msgstr ""
 
@@ -221,19 +243,19 @@ msgstr ""
 msgid "'delta' must be finite and > 0"
 msgstr ""
 
-#: mAR.c:467
+#: mAR.c:470
 msgid "Singular matrix in qr_solve"
 msgstr ""
 
-#: mAR.c:510
+#: mAR.c:513
 msgid "Singular matrix in ldet"
 msgstr ""
 
-#: mAR.c:697
+#: mAR.c:700
 msgid "Invalid vmethod"
 msgstr ""
 
-#: mAR.c:833
+#: mAR.c:836
 msgid "Burg's algorithm failed to find partial correlation"
 msgstr ""
 
@@ -272,184 +294,184 @@ msgstr ""
 msgid "invalid result from na.action"
 msgstr ""
 
-#: model.c:369 model.c:377 optim.c:197
+#: model.c:372 model.c:380 optim.c:197
 #, c-format
 msgid "invalid '%s' argument"
 msgstr ""
 
-#: model.c:388
+#: model.c:391
 msgid "invalid model frame"
 msgstr ""
 
-#: model.c:390
+#: model.c:393
 msgid "do not know how many cases"
 msgstr ""
 
-#: model.c:414
+#: model.c:417
 #, c-format
 msgid "variable lengths differ (found for variable %d)"
 msgstr ""
 
-#: model.c:418 model.c:425
+#: model.c:421 model.c:428
 #, c-format
 msgid "variable %d has no levels"
 msgstr ""
 
-#: model.c:537
+#: model.c:540
 msgid "the response appeared on the right-hand side and was dropped"
 msgstr ""
 
-#: model.c:557
+#: model.c:560
 #, c-format
 msgid "term %d would require %.0g columns"
 msgstr ""
 
-#: model.c:561
+#: model.c:564
 #, c-format
 msgid "matrix would require %.0g columns"
 msgstr ""
 
-#: model.c:572
+#: model.c:575
 #, c-format
 msgid "problem with term %d in model.matrix: no columns are assigned"
 msgstr ""
 
-#: model.c:621 model.c:626 model.c:632 model.c:643 model.c:649 model.c:655
+#: model.c:624 model.c:629 model.c:635 model.c:646 model.c:652 model.c:658
 msgid "term names will be truncated"
 msgstr ""
 
-#: model.c:635
+#: model.c:638
 msgid "complex variables are not currently allowed in model matrices"
 msgstr ""
 
-#: model.c:659
+#: model.c:662
 #, c-format
 msgid "variables of type '%s' are not allowed in model matrices"
 msgstr ""
 
-#: model.c:881
+#: model.c:884
 msgid "invalid formula in 'update'"
 msgstr ""
 
-#: model.c:915
+#: model.c:918
 msgid "formula expected"
 msgstr ""
 
-#: model.c:1046
+#: model.c:1049
 msgid "invalid term in model formula"
 msgstr ""
 
-#: model.c:1121
+#: model.c:1124
 msgid "invalid model formula"
 msgstr ""
 
-#: model.c:1147 model.c:1395
+#: model.c:1150 model.c:1410
 msgid "invalid power in formula"
 msgstr ""
 
-#: model.c:1183
+#: model.c:1186
 msgid "invalid model formula in ExtractVars"
 msgstr ""
 
-#: model.c:1518
+#: model.c:1533
 #, c-format
 msgid "duplicated name '%s' in data frame using '.'"
 msgstr ""
 
-#: model.c:1576
+#: model.c:1594
 msgid "invalid model formula in EncodeVars"
 msgstr ""
 
-#: model.c:1662
+#: model.c:1680
 msgid "argument is not a valid model"
 msgstr ""
 
-#: model.c:1672
+#: model.c:1690
 msgid "'specials' must be NULL or a character vector"
 msgstr ""
 
-#: model.c:1684
+#: model.c:1702
 msgid "'data' argument is of the wrong type"
 msgstr ""
 
-#: model.c:1952
+#: model.c:1972
 msgid "'.' in formula and no 'data' argument"
 msgstr ""
 
-#: monoSpl.c:34
+#: monoSpl.c:36
 msgid "n must be at least two"
 msgstr ""
 
-#: monoSpl.c:67
+#: monoSpl.c:69
 msgid "Argument m must be numeric"
 msgstr ""
 
-#: monoSpl.c:70
+#: monoSpl.c:72
 msgid "length(m) must be at least two"
 msgstr ""
 
-#: monoSpl.c:72
+#: monoSpl.c:74
 msgid "Argument Sx must be numeric vector one shorter than m[]"
 msgstr ""
 
-#: nls.c:97
+#: nls.c:99
 msgid "'control' must be a list"
 msgstr ""
 
-#: nls.c:99
+#: nls.c:101
 msgid "'m' must be a list"
 msgstr ""
 
-#: nls.c:105 nls.c:110 nls.c:115 nls.c:120 nls.c:125 nls.c:166 nls.c:171
-#: nls.c:176 nls.c:181 nls.c:186 nls.c:191
+#: nls.c:107 nls.c:112 nls.c:117 nls.c:122 nls.c:127 nls.c:168 nls.c:173
+#: nls.c:178 nls.c:183 nls.c:188 nls.c:193
 #, c-format
 msgid "'%s' absent"
 msgstr ""
 
-#: nls.c:232
+#: nls.c:234
 msgid "singular gradient"
 msgstr ""
 
-#: nls.c:253
+#: nls.c:255
 #, c-format
 msgid "step factor %g reduced below 'minFactor' of %g"
 msgstr ""
 
-#: nls.c:262
+#: nls.c:264
 #, c-format
 msgid "number of iterations exceeded maximum of %d"
 msgstr ""
 
-#: nls.c:267
+#: nls.c:269
 msgid "converged"
 msgstr ""
 
-#: nls.c:288
+#: nls.c:290
 msgid "'theta' should be of type character"
 msgstr ""
 
-#: nls.c:290 port.c:375
+#: nls.c:292 port.c:376
 msgid "use of NULL environment is defunct"
 msgstr ""
 
-#: nls.c:294
+#: nls.c:296
 msgid "'rho' should be an environment"
 msgstr ""
 
-#: nls.c:297
+#: nls.c:299
 msgid "'dir' is not a numeric vector of the correct length"
 msgstr ""
 
-#: nls.c:311 nls.c:341
+#: nls.c:313 nls.c:347
 msgid "Missing value or an infinity produced when evaluating the model"
 msgstr ""
 
-#: nls.c:318
+#: nls.c:321
 #, c-format
 msgid "variable '%s' is integer, not numeric"
 msgstr ""
 
-#: nls.c:320
+#: nls.c:323
 #, c-format
 msgid "variable '%s' is not numeric"
 msgstr ""
@@ -496,152 +518,152 @@ msgstr ""
 msgid "unknown 'method'"
 msgstr ""
 
-#: optimize.c:217 optimize.c:309 optimize.c:530
+#: optimize.c:220 optimize.c:306 optimize.c:528
 msgid "NA replaced by maximum positive value"
 msgstr ""
 
-#: optimize.c:225 optimize.c:321 optimize.c:538
+#: optimize.c:228 optimize.c:318 optimize.c:536
 msgid "NA/Inf replaced by maximum positive value"
 msgstr ""
 
-#: optimize.c:234
+#: optimize.c:237
 msgid "invalid function value in 'optimize'"
 msgstr ""
 
-#: optimize.c:252 optimize.c:350 optimize.c:723
+#: optimize.c:255 optimize.c:347 optimize.c:721
 msgid "attempt to minimize non-function"
 msgstr ""
 
-#: optimize.c:259 optimize.c:266 optimize.c:275 optimize.c:355 optimize.c:360
-#: optimize.c:376
+#: optimize.c:262 optimize.c:269 optimize.c:278 optimize.c:352 optimize.c:357
+#: optimize.c:373
 #, c-format
 msgid "invalid '%s' value"
 msgstr ""
 
-#: optimize.c:268 optimize.c:361
+#: optimize.c:271 optimize.c:358
 msgid "'xmin' not less than 'xmax'"
 msgstr ""
 
-#: optimize.c:318
+#: optimize.c:315
 msgid "-Inf replaced by maximally negative value"
 msgstr ""
 
-#: optimize.c:331
+#: optimize.c:328
 msgid "invalid function value in 'zeroin'"
 msgstr ""
 
-#: optimize.c:366 optimize.c:371
+#: optimize.c:363 optimize.c:368
 #, c-format
 msgid "NA value for '%s' is not allowed"
 msgstr ""
 
-#: optimize.c:381
+#: optimize.c:378
 msgid "'maxiter' must be positive"
 msgstr ""
 
-#: optimize.c:522
+#: optimize.c:520
 msgid "non-finite value supplied by 'nlm'"
 msgstr ""
 
-#: optimize.c:557
+#: optimize.c:555
 msgid "invalid function value in 'nlm' optimizer"
 msgstr ""
 
-#: optimize.c:568 optimize.c:583
+#: optimize.c:566 optimize.c:581
 msgid "function value caching for optimization is seriously confused"
 msgstr ""
 
-#: optimize.c:598
+#: optimize.c:596
 msgid "numeric parameter expected"
 msgstr ""
 
-#: optimize.c:602
+#: optimize.c:600
 msgid "conflicting parameter lengths"
 msgstr ""
 
-#: optimize.c:606
+#: optimize.c:604
 msgid "invalid parameter length"
 msgstr ""
 
-#: optimize.c:616 optimize.c:623
+#: optimize.c:614 optimize.c:621
 msgid "missing value in parameter"
 msgstr ""
 
-#: optimize.c:628
+#: optimize.c:626
 msgid "invalid parameter type"
 msgstr ""
 
-#: optimize.c:639
+#: optimize.c:637
 msgid "non-positive number of parameters in nlm"
 msgstr ""
 
-#: optimize.c:641
+#: optimize.c:639
 msgid "nlm is inefficient for 1-d problems"
 msgstr ""
 
-#: optimize.c:643
+#: optimize.c:641
 msgid "invalid gradient tolerance in nlm"
 msgstr ""
 
-#: optimize.c:645
+#: optimize.c:643
 msgid "invalid iteration limit in nlm"
 msgstr ""
 
-#: optimize.c:647
+#: optimize.c:645
 msgid "minimization function has no good digits in nlm"
 msgstr ""
 
-#: optimize.c:649
+#: optimize.c:647
 msgid "no analytic gradient to check in nlm!"
 msgstr ""
 
-#: optimize.c:651
+#: optimize.c:649
 msgid "no analytic Hessian to check in nlm!"
 msgstr ""
 
-#: optimize.c:653
+#: optimize.c:651
 msgid "probable coding error in analytic gradient"
 msgstr ""
 
-#: optimize.c:655
+#: optimize.c:653
 msgid "probable coding error in analytic Hessian"
 msgstr ""
 
-#: optimize.c:657
+#: optimize.c:655
 #, c-format
 msgid ""
 "*** unknown error message (msg = %d) in nlm()\n"
 "*** should not happen!"
 msgstr ""
 
-#: optimize.c:668
+#: optimize.c:666
 msgid "Relative gradient close to zero.\n"
 msgstr ""
 
-#: optimize.c:669 optimize.c:673
+#: optimize.c:667 optimize.c:671
 msgid "Current iterate is probably solution.\n"
 msgstr ""
 
-#: optimize.c:672
+#: optimize.c:670
 msgid "Successive iterates within tolerance.\n"
 msgstr ""
 
-#: optimize.c:676
+#: optimize.c:674
 msgid "Last global step failed to locate a point lower than x.\n"
 msgstr ""
 
-#: optimize.c:677
+#: optimize.c:675
 msgid ""
 "Either x is an approximate local minimum of the function,\n"
 "the function is too non-linear for this algorithm,\n"
 "or steptol is too large.\n"
 msgstr ""
 
-#: optimize.c:682
+#: optimize.c:680
 msgid "Iteration limit exceeded.  Algorithm failed.\n"
 msgstr ""
 
-#: optimize.c:685
+#: optimize.c:683
 msgid ""
 "Maximum step size exceeded 5 consecutive times.\n"
 "Either the function is unbounded below,\n"
@@ -650,34 +672,34 @@ msgid ""
 "or stepmx is too small.\n"
 msgstr ""
 
-#: optimize.c:747 optimize.c:752 optimize.c:756 optimize.c:760 optimize.c:764
-#: optimize.c:768 optimize.c:773
+#: optimize.c:745 optimize.c:750 optimize.c:754 optimize.c:758 optimize.c:762
+#: optimize.c:766 optimize.c:771
 msgid "invalid NA value in parameter"
 msgstr ""
 
-#: optimize.c:804
+#: optimize.c:800
 msgid "hessian supplied is of the wrong length or mode, so ignored"
 msgstr ""
 
-#: optimize.c:808
+#: optimize.c:804
 msgid "gradient supplied is of the wrong length or mode, so ignored"
 msgstr ""
 
-#: pacf.c:94
+#: pacf.c:87
 msgid "bad Starma struct"
 msgstr ""
 
-#: pacf.c:240
+#: pacf.c:233
 #, c-format
 msgid "starma error code %d"
 msgstr ""
 
-#: pacf.c:300
+#: pacf.c:293
 #, c-format
 msgid "forkal error code %d"
 msgstr ""
 
-#: pacf.c:474
+#: pacf.c:466
 msgid "invalid value of lag.max"
 msgstr ""
 
@@ -686,96 +708,110 @@ msgstr ""
 msgid "Rf_divset: alg = %d must be 1, 2, 3, or 4"
 msgstr ""
 
-#: port.c:312
+#: port.c:149
+msgid "port algorithms 3 or higher are not supported"
+msgstr ""
+
+#: port.c:313
 #, c-format
 msgid "gradient function must return a numeric vector of length %d"
 msgstr ""
 
-#: port.c:324
+#: port.c:325
 #, c-format
 msgid "Hessian function must return a square numeric matrix of order %d"
 msgstr ""
 
-#: port.c:379
+#: port.c:380
 msgid "'rho' must be an environment"
 msgstr ""
 
-#: port.c:381 port.c:542
+#: port.c:382 port.c:548
 msgid "'d' must be a nonempty numeric vector"
 msgstr ""
 
-#: port.c:383
+#: port.c:384
 msgid "When Hessian defined must also have gradient defined"
 msgstr ""
 
-#: port.c:386
+#: port.c:387
 #, c-format
 msgid "environment 'rho' must contain a numeric vector '.par' of length %d"
 msgstr ""
 
-#: port.c:400
+#: port.c:401
 msgid "'lower' and 'upper' must be numeric vectors"
 msgstr ""
 
-#: port.c:456
+#: port.c:460
 msgid "'getElement' applies only to named lists"
 msgstr ""
 
-#: port.c:477
+#: port.c:481
 #, c-format
 msgid "%s$%s() not found"
 msgstr ""
 
-#: port.c:490
+#: port.c:494
 #, c-format
 msgid "'gradient' must be a numeric matrix of dimension (%d,%d)"
 msgstr ""
 
-#: port.c:511
+#: port.c:515
 #, c-format
 msgid "fcn produced mode %d, length %d - wanted mode %d, length %d"
 msgstr ""
 
-#: port.c:524
+#: port.c:528
 msgid "invalid type for eval_check_store"
 msgstr ""
 
-#: port.c:543
+#: port.c:549
 msgid "m must be a list"
 msgstr ""
 
-#: port.c:563
+#: port.c:569
 msgid "'lowerb' and 'upperb' must be numeric vectors"
 msgstr ""
 
-#: rWishart.c:51
+#: rWishart.c:53
 msgid "inconsistent degrees of freedom and dimension"
 msgstr ""
 
-#: rWishart.c:84
+#: rWishart.c:86
 msgid "'scal' must be a square, real matrix"
 msgstr ""
 
-#: rWishart.c:96
+#: rWishart.c:98
 msgid "'scal' matrix is not positive-definite"
 msgstr ""
 
-#: random.c:66 random.c:70 random.c:75 random.c:80 random.c:161 random.c:167
-#: random.c:172 random.c:177 random.c:240 random.c:245 random.c:250
-#: random.c:264 random.c:355
+#: random.c:53 random.c:128 random.c:200 random.c:284
+msgid "NAs produced"
+msgstr ""
+
+#: random.c:60 random.c:66 random.c:72 random.c:90 random.c:161 random.c:242
+#: random.c:376
 msgid "invalid arguments"
 msgstr ""
 
-#: random.c:95 random.c:121 random.c:194 random.c:222 random.c:270
-#: random.c:289
-msgid "NAs produced"
+#: random.c:310
+msgid "NA in probability vector"
+msgstr ""
+
+#: random.c:312
+msgid "negative probability"
 msgstr ""
 
-#: random.c:308
+#: random.c:318
+msgid "no positive probabilities"
+msgstr ""
+
+#: random.c:330
 msgid "invalid first argument 'n'"
 msgstr ""
 
-#: random.c:310
+#: random.c:332
 msgid "invalid second argument 'size'"
 msgstr ""
 
@@ -784,12 +820,12 @@ msgstr ""
 msgid "rcont2 [%d,%d]: exp underflow to 0; algorithm failure"
 msgstr ""
 
-#: smooth.c:101
+#: smooth.c:107
 #, c-format
 msgid "invalid end-rule for running median of 3: %d"
 msgstr ""
 
-#: starma.c:366
+#: starma.c:364
 #, c-format
 msgid "missing value in last %d observations"
 msgstr ""
diff --git a/src/library/stats/po/zh_CN.po b/src/library/stats/po/zh_CN.po
index 1fd3ead..5eb7794 100644
--- a/src/library/stats/po/zh_CN.po
+++ b/src/library/stats/po/zh_CN.po
@@ -6,22 +6,22 @@
 msgid ""
 msgstr ""
 "Project-Id-Version: R 2.4.0\n"
-"Report-Msgid-Bugs-To: bugs.r-project.org\n"
-"POT-Creation-Date: 2014-03-27 18:36+0000\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2016-04-01 10:01-0700\n"
 "PO-Revision-Date: 2005-02-04 08:37+0000\n"
 "Last-Translator: 陈斐 <feic at normipaiva.com>\n"
 "Language-Team: Chinese\n"
-"Language: \n"
+"Language: zh_CN\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
 "Plural-Forms: nplurals=1; plural=0;\n"
 
-#: Srunmed.c:55
+#: Srunmed.c:54
 msgid "bandwidth/span of running medians is larger than n"
 msgstr "移动中位数的帶寬/跨距的值不能大于n"
 
-#: ansari.c:116
+#: ansari.c:118
 msgid "probabilities outside [0,1] in qansari()"
 msgstr "qansari()里的概率值在[0,1]范围外"
 
@@ -41,7 +41,7 @@ msgstr "approx(): 不能内插NA值"
 msgid "invalid argument type"
 msgstr "参数种类不对"
 
-#: arima.c:444 arima.c:530 pacf.c:331 pacf.c:371
+#: arima.c:444 arima.c:530 pacf.c:324 pacf.c:363
 msgid "can only transform 100 pars in arima0"
 msgstr "arima0里只能转换100个参数"
 
@@ -49,6 +49,11 @@ msgstr "arima0里只能转换100个参数"
 msgid "maximum supported lag is 350"
 msgstr "滞后不能大于350"
 
+#: bandwidths.c:121
+#, c-format
+msgid "non-finite x[%d] in bandwidth calculation"
+msgstr ""
+
 #: complete_cases.c:26
 #, c-format
 msgid "invalid 'type' (%s) of argument"
@@ -62,31 +67,41 @@ msgstr "无法用输入来确定个案数目"
 msgid "not all arguments have the same length"
 msgstr "不是所有的参数都一样长"
 
-#: cov.c:566
+#: cov.c:569
 msgid "missing observations in cov/cor"
 msgstr "cov/cor中有遗漏值"
 
-#: cov.c:644
+#: cov.c:643
 msgid "'x' is NULL"
 msgstr "'x'为NULL"
 
-#: cov.c:663 cov.c:669
+#: cov.c:645
+#, fuzzy
+msgid "'x' is a factor"
+msgstr "'tmax'不是整数"
+
+#: cov.c:665
+#, fuzzy
+msgid "'y' is a factor"
+msgstr "'fn'不是函数"
+
+#: cov.c:673 cov.c:679
 msgid "incompatible dimensions"
 msgstr "不兼容的量度"
 
-#: cov.c:688 cov.c:729 cov.c:762
+#: cov.c:698 cov.c:739 cov.c:772
 msgid "no complete element pairs"
 msgstr "不存在完的一对"
 
-#: cov.c:701
+#: cov.c:711
 msgid "invalid 'use' (computational method)"
 msgstr "'use'不对(计算方法)"
 
-#: cov.c:704
+#: cov.c:714
 msgid "'x' is empty"
 msgstr "'x'是空的"
 
-#: cov.c:798
+#: cov.c:808
 msgid "the standard deviation is zero"
 msgstr "标准差为零"
 
@@ -99,36 +114,40 @@ msgstr "检查一进列减号时发现形式不对"
 msgid "Function '%s' is not in the derivatives table"
 msgstr "微分表里没有这个函数'%s'"
 
-#: deriv.c:642
+#: deriv.c:641
+msgid "'expr' must be an expression or call"
+msgstr ""
+
+#: deriv.c:644
 msgid "variable must be a character string"
 msgstr "变数必需是字符串"
 
-#: deriv.c:644
+#: deriv.c:646
 msgid "only the first element is used as variable name"
 msgstr "只用了第一个元素作为变数名"
 
-#: deriv.c:657
+#: deriv.c:659
 #, c-format
 msgid "invalid expression in '%s'"
 msgstr "'%s'的表达式不对"
 
-#: deriv.c:935 model.c:99
+#: deriv.c:937 model.c:99
 msgid "invalid variable names"
 msgstr "变数名字不对"
 
-#: deriv.c:944
+#: deriv.c:946
 msgid "invalid tag"
 msgstr "标签不对"
 
-#: distance.c:153
+#: distance.c:152
 msgid "treating non-finite values as NA"
 msgstr "所有无限值都作为NA来处理"
 
-#: distance.c:226
+#: distance.c:225
 msgid "distance(): invalid p"
 msgstr "distance(): p值不对"
 
-#: distance.c:229
+#: distance.c:228
 msgid "distance(): invalid distance"
 msgstr "distance():距离值不对"
 
@@ -140,17 +159,17 @@ msgstr "产生了NaNs"
 msgid "Non-numeric argument to mathematical function"
 msgstr "数学函数中用了非数值参数"
 
-#: family.c:44
+#: family.c:45
 #, c-format
 msgid "Value %g out of range (0, 1)"
 msgstr "%g值出界在(0, 1)外"
 
-#: family.c:65 family.c:79 family.c:97
+#: family.c:66 family.c:80 family.c:98
 #, c-format
 msgid "Argument %s must be a nonempty numeric vector"
 msgstr "参数%s必需为非空数字向量"
 
-#: family.c:130 family.c:133
+#: family.c:131 family.c:134
 #, c-format
 msgid "argument %s must be a numeric vector of length 1 or length %d"
 msgstr "参数%s必需为长度为一或长度为%d的数字向量"
@@ -175,7 +194,12 @@ msgstr "非因子"
 msgid "invalid factors"
 msgstr "因子不对"
 
-#: ksmooth.c:67
+#: integrate.c:84 integrate.c:86 integrate.c:128
+#, fuzzy, c-format
+msgid "'%s' must be of length one"
+msgstr "'m'的值必需是串列"
+
+#: ksmooth.c:68
 msgid "only 2500 rows are allowed for sm.method=\"spline\""
 msgstr "sm.method=\"spline\"最多只能算2500行"
 
@@ -194,7 +218,7 @@ msgstr ""
 msgid "NA/NaN/Inf in '%s'"
 msgstr ""
 
-#: loessc.c:233
+#: loessc.c:240
 msgid "span is too small"
 msgstr "跨距太小"
 
@@ -222,19 +246,19 @@ msgstr "'iter'必需是正数"
 msgid "'delta' must be finite and > 0"
 msgstr "'delta'必需是正数"
 
-#: mAR.c:467
+#: mAR.c:470
 msgid "Singular matrix in qr_solve"
 msgstr "gr_solve里出现了奇异矩阵"
 
-#: mAR.c:510
+#: mAR.c:513
 msgid "Singular matrix in ldet"
 msgstr "ldet里出现了奇异矩阵"
 
-#: mAR.c:697
+#: mAR.c:700
 msgid "Invalid vmethod"
 msgstr "vmethod不对"
 
-#: mAR.c:833
+#: mAR.c:836
 msgid "Burg's algorithm failed to find partial correlation"
 msgstr "Burg的算法没有能够找到偏相关数"
 
@@ -273,184 +297,184 @@ msgstr "变数的长度不一样('%s')"
 msgid "invalid result from na.action"
 msgstr "na.action的结果有错"
 
-#: model.c:369 model.c:377 optim.c:197
+#: model.c:372 model.c:380 optim.c:197
 #, c-format
 msgid "invalid '%s' argument"
 msgstr "'%s'参数不对"
 
-#: model.c:388
+#: model.c:391
 msgid "invalid model frame"
 msgstr "模型框不对"
 
-#: model.c:390
+#: model.c:393
 msgid "do not know how many cases"
 msgstr "案例数目不清"
 
-#: model.c:414
+#: model.c:417
 #, c-format
 msgid "variable lengths differ (found for variable %d)"
 msgstr "变数的长度不一样(变数%d)"
 
-#: model.c:418 model.c:425
+#: model.c:421 model.c:428
 #, c-format
 msgid "variable %d has no levels"
 msgstr "变数%d没有因子层"
 
-#: model.c:537
+#: model.c:540
 msgid "the response appeared on the right-hand side and was dropped"
 msgstr "在公式右手的反应略过不用"
 
-#: model.c:557
+#: model.c:560
 #, c-format
 msgid "term %d would require %.0g columns"
 msgstr "%d项需要%.0g个列"
 
-#: model.c:561
+#: model.c:564
 #, c-format
 msgid "matrix would require %.0g columns"
 msgstr "矩阵需要%.0g个列"
 
-#: model.c:572
+#: model.c:575
 #, c-format
 msgid "problem with term %d in model.matrix: no columns are assigned"
 msgstr "模型矩阵的%d项有问题: 没有指定的列"
 
-#: model.c:621 model.c:626 model.c:632 model.c:643 model.c:649 model.c:655
+#: model.c:624 model.c:629 model.c:635 model.c:646 model.c:652 model.c:658
 msgid "term names will be truncated"
 msgstr "项名字太长,被缩短了"
 
-#: model.c:635
+#: model.c:638
 msgid "complex variables are not currently allowed in model matrices"
 msgstr "模型矩阵里目前不能有复数"
 
-#: model.c:659
+#: model.c:662
 #, c-format
 msgid "variables of type '%s' are not allowed in model matrices"
 msgstr "模型矩阵里不能有种类为'%s'的参数"
 
-#: model.c:881
+#: model.c:884
 msgid "invalid formula in 'update'"
 msgstr "'update'里的公式不对"
 
-#: model.c:915
+#: model.c:918
 msgid "formula expected"
 msgstr "需要公式"
 
-#: model.c:1046
+#: model.c:1049
 msgid "invalid term in model formula"
 msgstr "模型公式里有错误的项"
 
-#: model.c:1121
+#: model.c:1124
 msgid "invalid model formula"
 msgstr "模型公式不对"
 
-#: model.c:1147 model.c:1395
+#: model.c:1150 model.c:1410
 msgid "invalid power in formula"
 msgstr "公式里的幂不对"
 
-#: model.c:1183
+#: model.c:1186
 msgid "invalid model formula in ExtractVars"
 msgstr "ExtractVars里的模型公式不对"
 
-#: model.c:1518
+#: model.c:1533
 #, c-format
 msgid "duplicated name '%s' in data frame using '.'"
 msgstr "在数据框里用'.'时不能有重复的名字’%s'"
 
-#: model.c:1576
+#: model.c:1594
 msgid "invalid model formula in EncodeVars"
 msgstr "EncodeVars中的模型公式不对"
 
-#: model.c:1662
+#: model.c:1680
 msgid "argument is not a valid model"
 msgstr "参数不是正确的模型"
 
-#: model.c:1672
+#: model.c:1690
 msgid "'specials' must be NULL or a character vector"
 msgstr "'specials'的值要么是NULL要么是字符矢量"
 
-#: model.c:1684
+#: model.c:1702
 msgid "'data' argument is of the wrong type"
 msgstr "'data'参数种类有错"
 
-#: model.c:1952
+#: model.c:1972
 msgid "'.' in formula and no 'data' argument"
 msgstr "公式里有'.',而没有'data'这一参数"
 
-#: monoSpl.c:34
+#: monoSpl.c:36
 msgid "n must be at least two"
 msgstr "n至少需要是二"
 
-#: monoSpl.c:67
+#: monoSpl.c:69
 msgid "Argument m must be numeric"
 msgstr "参数m必需为数值"
 
-#: monoSpl.c:70
+#: monoSpl.c:72
 msgid "length(m) must be at least two"
 msgstr "length(m)的值必需为二"
 
-#: monoSpl.c:72
+#: monoSpl.c:74
 msgid "Argument Sx must be numeric vector one shorter than m[]"
 msgstr "参数Sx必需是长度比m[]小一的数值向量"
 
-#: nls.c:97
+#: nls.c:99
 msgid "'control' must be a list"
 msgstr "'control'的值必需为串列"
 
-#: nls.c:99
+#: nls.c:101
 msgid "'m' must be a list"
 msgstr "'m'的值必需是串列"
 
-#: nls.c:105 nls.c:110 nls.c:115 nls.c:120 nls.c:125 nls.c:166 nls.c:171
-#: nls.c:176 nls.c:181 nls.c:186 nls.c:191
+#: nls.c:107 nls.c:112 nls.c:117 nls.c:122 nls.c:127 nls.c:168 nls.c:173
+#: nls.c:178 nls.c:183 nls.c:188 nls.c:193
 #, c-format
 msgid "'%s' absent"
 msgstr "需要设定'%s'"
 
-#: nls.c:232
+#: nls.c:234
 msgid "singular gradient"
 msgstr "奇异梯度"
 
-#: nls.c:253
+#: nls.c:255
 #, c-format
 msgid "step factor %g reduced below 'minFactor' of %g"
 msgstr "算法的步因素%g的大小被减少到小于%g的'minFactor'值"
 
-#: nls.c:262
+#: nls.c:264
 #, c-format
 msgid "number of iterations exceeded maximum of %d"
 msgstr "循环次数超过了%d这个最大值"
 
-#: nls.c:267
+#: nls.c:269
 msgid "converged"
 msgstr "收敛了"
 
-#: nls.c:288
+#: nls.c:290
 msgid "'theta' should be of type character"
 msgstr "'theta'的种类必需是字符"
 
-#: nls.c:290 port.c:375
+#: nls.c:292 port.c:376
 msgid "use of NULL environment is defunct"
 msgstr "NULL环境不再有用了"
 
-#: nls.c:294
+#: nls.c:296
 msgid "'rho' should be an environment"
 msgstr "'rho'必需为环境"
 
-#: nls.c:297
+#: nls.c:299
 msgid "'dir' is not a numeric vector of the correct length"
 msgstr "'dir'这个数字向量的长度不对"
 
-#: nls.c:311 nls.c:341
+#: nls.c:313 nls.c:347
 msgid "Missing value or an infinity produced when evaluating the model"
 msgstr "在计算模型的时候产生了缺省值或无限值"
 
-#: nls.c:318
+#: nls.c:321
 #, c-format
 msgid "variable '%s' is integer, not numeric"
 msgstr "变量'%s'应该为整数,不能是数值"
 
-#: nls.c:320
+#: nls.c:323
 #, c-format
 msgid "variable '%s' is not numeric"
 msgstr "变量'%s'不是数值"
@@ -498,141 +522,141 @@ msgstr "'ndeps'长度不对"
 msgid "unknown 'method'"
 msgstr "没有这样的'method'"
 
-#: optimize.c:217 optimize.c:309 optimize.c:530
+#: optimize.c:220 optimize.c:306 optimize.c:528
 msgid "NA replaced by maximum positive value"
 msgstr "NA被换成最大的正值"
 
-#: optimize.c:225 optimize.c:321 optimize.c:538
+#: optimize.c:228 optimize.c:318 optimize.c:536
 msgid "NA/Inf replaced by maximum positive value"
 msgstr "NA/Inf被换成最大的正值"
 
-#: optimize.c:234
+#: optimize.c:237
 msgid "invalid function value in 'optimize'"
 msgstr "'optimize'里的函数值不对"
 
-#: optimize.c:252 optimize.c:350 optimize.c:723
+#: optimize.c:255 optimize.c:347 optimize.c:721
 msgid "attempt to minimize non-function"
 msgstr "不能将非函数最小化"
 
-#: optimize.c:259 optimize.c:266 optimize.c:275 optimize.c:355 optimize.c:360
-#: optimize.c:376
+#: optimize.c:262 optimize.c:269 optimize.c:278 optimize.c:352 optimize.c:357
+#: optimize.c:373
 #, c-format
 msgid "invalid '%s' value"
 msgstr "'%s'值不对"
 
-#: optimize.c:268 optimize.c:361
+#: optimize.c:271 optimize.c:358
 msgid "'xmin' not less than 'xmax'"
 msgstr "'xmin'不能小于xmax"
 
-#: optimize.c:318
+#: optimize.c:315
 msgid "-Inf replaced by maximally negative value"
 msgstr "-Inf被换成最大的负值"
 
-#: optimize.c:331
+#: optimize.c:328
 msgid "invalid function value in 'zeroin'"
 msgstr "'zeroin'函数值不对"
 
-#: optimize.c:366 optimize.c:371
+#: optimize.c:363 optimize.c:368
 #, c-format
 msgid "NA value for '%s' is not allowed"
 msgstr "'%s'里不可有NA值"
 
-#: optimize.c:381
+#: optimize.c:378
 msgid "'maxiter' must be positive"
 msgstr "'maxiter'必需是正数"
 
-#: optimize.c:522
+#: optimize.c:520
 msgid "non-finite value supplied by 'nlm'"
 msgstr "'nlm'回复了无限值"
 
-#: optimize.c:557
+#: optimize.c:555
 msgid "invalid function value in 'nlm' optimizer"
 msgstr "'nlm'最佳化器里的函数值不对"
 
-#: optimize.c:568 optimize.c:583
+#: optimize.c:566 optimize.c:581
 msgid "function value caching for optimization is seriously confused"
 msgstr "最佳化时函数值暫存器出了问题"
 
-#: optimize.c:598
+#: optimize.c:596
 msgid "numeric parameter expected"
 msgstr "需要数值参数"
 
-#: optimize.c:602
+#: optimize.c:600
 msgid "conflicting parameter lengths"
 msgstr "参数的长度自相矛盾"
 
-#: optimize.c:606
+#: optimize.c:604
 msgid "invalid parameter length"
 msgstr "参数长度不对"
 
-#: optimize.c:616 optimize.c:623
+#: optimize.c:614 optimize.c:621
 msgid "missing value in parameter"
 msgstr "参数里不能有遗漏值"
 
-#: optimize.c:628
+#: optimize.c:626
 msgid "invalid parameter type"
 msgstr "参数种类不对"
 
-#: optimize.c:639
+#: optimize.c:637
 msgid "non-positive number of parameters in nlm"
 msgstr "nlm参数不能是负的"
 
-#: optimize.c:641
+#: optimize.c:639
 msgid "nlm is inefficient for 1-d problems"
 msgstr "用nlm来解决一维问题效率不高"
 
-#: optimize.c:643
+#: optimize.c:641
 msgid "invalid gradient tolerance in nlm"
 msgstr "nlm里的梯度容错不对"
 
-#: optimize.c:645
+#: optimize.c:643
 msgid "invalid iteration limit in nlm"
 msgstr "nlm里的迭代极限不对"
 
-#: optimize.c:647
+#: optimize.c:645
 msgid "minimization function has no good digits in nlm"
 msgstr "nlm最小化函数找不到可适用的数字"
 
-#: optimize.c:649
+#: optimize.c:647
 msgid "no analytic gradient to check in nlm!"
 msgstr "nlm里没有可查的分析梯度!"
 
-#: optimize.c:651
+#: optimize.c:649
 msgid "no analytic Hessian to check in nlm!"
 msgstr "nlm里没有可查的分析海森!"
 
-#: optimize.c:653
+#: optimize.c:651
 msgid "probable coding error in analytic gradient"
 msgstr "分析梯度的代码很有可能出错"
 
-#: optimize.c:655
+#: optimize.c:653
 msgid "probable coding error in analytic Hessian"
 msgstr "分析海森的代码很有可能出错"
 
-#: optimize.c:657
+#: optimize.c:655
 #, c-format
 msgid ""
 "*** unknown error message (msg = %d) in nlm()\n"
 "*** should not happen!"
 msgstr "*** nlm()产生了不知是什么的错误信息(msg = %d) 。这不应该发生!"
 
-#: optimize.c:668
+#: optimize.c:666
 msgid "Relative gradient close to zero.\n"
 msgstr "相对梯度离零太近.\n"
 
-#: optimize.c:669 optimize.c:673
+#: optimize.c:667 optimize.c:671
 msgid "Current iterate is probably solution.\n"
 msgstr "当前的重复值很可能就已经是答案了.\n"
 
-#: optimize.c:672
+#: optimize.c:670
 msgid "Successive iterates within tolerance.\n"
 msgstr "在容错范围内连续迭代.\n"
 
-#: optimize.c:676
+#: optimize.c:674
 msgid "Last global step failed to locate a point lower than x.\n"
 msgstr "最后一步的整体优化没有能找到比x值要小的一个点.\n"
 
-#: optimize.c:677
+#: optimize.c:675
 msgid ""
 "Either x is an approximate local minimum of the function,\n"
 "the function is too non-linear for this algorithm,\n"
@@ -640,11 +664,11 @@ msgid ""
 msgstr ""
 "要么x已经是函数的本地最小值,要么这个函数非线性太强,要么steptol设得太大。\n"
 
-#: optimize.c:682
+#: optimize.c:680
 msgid "Iteration limit exceeded.  Algorithm failed.\n"
 msgstr "超过了迭代极限。算法失败.\n"
 
-#: optimize.c:685
+#: optimize.c:683
 msgid ""
 "Maximum step size exceeded 5 consecutive times.\n"
 "Either the function is unbounded below,\n"
@@ -657,34 +681,34 @@ msgstr ""
 "从上边界达到了渐近有限值\n"
 "要么是stepmx设得太小。\n"
 
-#: optimize.c:747 optimize.c:752 optimize.c:756 optimize.c:760 optimize.c:764
-#: optimize.c:768 optimize.c:773
+#: optimize.c:745 optimize.c:750 optimize.c:754 optimize.c:758 optimize.c:762
+#: optimize.c:766 optimize.c:771
 msgid "invalid NA value in parameter"
 msgstr "参数里的NA值不对"
 
-#: optimize.c:804
+#: optimize.c:800
 msgid "hessian supplied is of the wrong length or mode, so ignored"
 msgstr "海森的长度不对或其状态不对,因此略过不用"
 
-#: optimize.c:808
+#: optimize.c:804
 msgid "gradient supplied is of the wrong length or mode, so ignored"
 msgstr "梯度的长度或其状态不对,因此略过不用"
 
-#: pacf.c:94
+#: pacf.c:87
 msgid "bad Starma struct"
 msgstr "Starma结构不对"
 
-#: pacf.c:240
+#: pacf.c:233
 #, c-format
 msgid "starma error code %d"
 msgstr "starma出错编号%d"
 
-#: pacf.c:300
+#: pacf.c:293
 #, c-format
 msgid "forkal error code %d"
 msgstr "forkal出错编号%d"
 
-#: pacf.c:474
+#: pacf.c:466
 msgid "invalid value of lag.max"
 msgstr "lag.max的值不对"
 
@@ -693,96 +717,110 @@ msgstr "lag.max的值不对"
 msgid "Rf_divset: alg = %d must be 1, 2, 3, or 4"
 msgstr "Rf_divset: alg = %d其值应该是1, 2, 3, 或4"
 
-#: port.c:312
+#: port.c:149
+msgid "port algorithms 3 or higher are not supported"
+msgstr ""
+
+#: port.c:313
 #, c-format
 msgid "gradient function must return a numeric vector of length %d"
 msgstr "梯度函数必需回覆长度为%d的数字向量"
 
-#: port.c:324
+#: port.c:325
 #, c-format
 msgid "Hessian function must return a square numeric matrix of order %d"
 msgstr "Hessian函数必需回覆一个度数为%d的正方形数值矩阵"
 
-#: port.c:379
+#: port.c:380
 msgid "'rho' must be an environment"
 msgstr "'rho'必需是环境"
 
-#: port.c:381 port.c:542
+#: port.c:382 port.c:548
 msgid "'d' must be a nonempty numeric vector"
 msgstr "'d'必需是非空数字向量"
 
-#: port.c:383
+#: port.c:384
 msgid "When Hessian defined must also have gradient defined"
 msgstr "如果Hessian有定义的话梯度也必需有定义"
 
-#: port.c:386
+#: port.c:387
 #, c-format
 msgid "environment 'rho' must contain a numeric vector '.par' of length %d"
 msgstr "'rho'环境必包含长度为%d的数字向量'.par'"
 
-#: port.c:400
+#: port.c:401
 msgid "'lower' and 'upper' must be numeric vectors"
 msgstr "'lower'和'upper'必需为数字向量"
 
-#: port.c:456
+#: port.c:460
 msgid "'getElement' applies only to named lists"
 msgstr "'getElement'只适用于带名串列"
 
-#: port.c:477
+#: port.c:481
 #, c-format
 msgid "%s$%s() not found"
 msgstr "%s$%s()不存在"
 
-#: port.c:490
+#: port.c:494
 #, c-format
 msgid "'gradient' must be a numeric matrix of dimension (%d,%d)"
 msgstr "'gradient'必需是一个维数为(%d,%d)的数值矩阵"
 
-#: port.c:511
+#: port.c:515
 #, c-format
 msgid "fcn produced mode %d, length %d - wanted mode %d, length %d"
 msgstr "fcn运行结果的模式为%d , 长度为%d - 但正确的模式应该是%d,长度为%d"
 
-#: port.c:524
+#: port.c:528
 msgid "invalid type for eval_check_store"
 msgstr "eval_check_store的种类不对"
 
-#: port.c:543
+#: port.c:549
 msgid "m must be a list"
 msgstr "m必需为串列"
 
-#: port.c:563
+#: port.c:569
 msgid "'lowerb' and 'upperb' must be numeric vectors"
 msgstr "'lowerb'和'upperb'必需为数字向量"
 
-#: rWishart.c:51
+#: rWishart.c:53
 msgid "inconsistent degrees of freedom and dimension"
 msgstr "自由度和维度不相符"
 
-#: rWishart.c:84
+#: rWishart.c:86
 msgid "'scal' must be a square, real matrix"
 msgstr "'scal'必需是正文形的实数矩阵"
 
-#: rWishart.c:96
+#: rWishart.c:98
 msgid "'scal' matrix is not positive-definite"
 msgstr "'scal'不是正定矩阵"
 
-#: random.c:66 random.c:70 random.c:75 random.c:80 random.c:161 random.c:167
-#: random.c:172 random.c:177 random.c:240 random.c:245 random.c:250
-#: random.c:264 random.c:355
+#: random.c:53 random.c:128 random.c:200 random.c:284
+msgid "NAs produced"
+msgstr "产生了NA"
+
+#: random.c:60 random.c:66 random.c:72 random.c:90 random.c:161 random.c:242
+#: random.c:376
 msgid "invalid arguments"
 msgstr "参数不对"
 
-#: random.c:95 random.c:121 random.c:194 random.c:222 random.c:270
-#: random.c:289
-msgid "NAs produced"
-msgstr "产生了NA"
+#: random.c:310
+msgid "NA in probability vector"
+msgstr ""
+
+#: random.c:312
+msgid "negative probability"
+msgstr ""
 
-#: random.c:308
+#: random.c:318
+msgid "no positive probabilities"
+msgstr ""
+
+#: random.c:330
 msgid "invalid first argument 'n'"
 msgstr "第一参数'n'不对"
 
-#: random.c:310
+#: random.c:332
 msgid "invalid second argument 'size'"
 msgstr "第二参数'size'不对"
 
@@ -791,12 +829,12 @@ msgstr "第二参数'size'不对"
 msgid "rcont2 [%d,%d]: exp underflow to 0; algorithm failure"
 msgstr " rcont2 [%d,%d]: exp下益到0; 算法失败"
 
-#: smooth.c:101
+#: smooth.c:107
 #, c-format
 msgid "invalid end-rule for running median of 3: %d"
 msgstr "三移动中位数的结尾规则出了错: %d"
 
-#: starma.c:366
+#: starma.c:364
 #, c-format
 msgid "missing value in last %d observations"
 msgstr "最后%d个观测值里出现了缺省值"
diff --git a/src/library/stats/splines-README b/src/library/stats/splines-README
index d15f726..e881c17 100644
--- a/src/library/stats/splines-README
+++ b/src/library/stats/splines-README
@@ -1,41 +1,41 @@
 smooth.spline()  [R]
  |
- \--> qsbart()                          ./qsbart.f
+ \--> rbart() [ = C_rbart() ]           src/qsbart.f
       |
-      \--> sbart()                      ./sbart.c
-           |--> sgram()                 ./sgram.f  [was ratfor !]
-           |    |--> interv()           ./bvalue.f [was ratfor !]
-           |    \--> bsplvd()           ./bsplvd.f [was ratfor !]
+      \--> sbart()                      src/sbart.c
+           |--> sgram()                 src/sgram.f
+           |    |--> interv()           src/bvalue.f
+           |    \--> bsplvd()           src/bsplvd.f
            |         \--> bsplvb()          "
-           |--> stxwx()                 ./stxwx.f  [was ratfor !]
+           |--> stxwx()                 src/stxwx.f
            |    |--> interv()             (see above)
            |    \--> bsplvd()               "
            |         \--> bsplvb()          "
-           \--> sslvrg()                ./sslvrg.f [was ratfor !]
-                |--> sinerp()           ./sinerp.f [was ratfor !]
-                |--> bvalue()           ./bvalue.f   (above)
+           \--> sslvrg()                src/sslvrg.f
+                |--> sinerp()           src/sinerp.f
+                |--> bvalue()           src/bvalue.f   (above)
                 |    \--> interv()        (see above)
                 |--> interv()               "
                 |--> bsplvd()               "
                 |    \--> bsplvb()          "
-                |--> dpbfa()            ../../../appl/dpbfa.f  {Linpack}
-                \--> dpbsl()            ../../../appl/dpbsl.f
+                |--> dpbfa()            ../../appl/dpbfa.f  {LINPACK}
+                \--> dpbsl()            ../../appl/dpbsl.f
 
 
 predict.smooth.spline()  [R]
  |
- \--> bvalus()                          ./bvalus.f
+ \--> bvalus()                          src/bvalus.f
        \--> bvalue()                    (see above)
              \--> interv()                "
 
 
 -------------
 
-But note that supsmu() / ppr() also call on smoothing splines :
+But note that both supsmu() and ppr() also call on smoothing splines :
 
 supsmu() [R]
  |
- |-> setsmu				./ppr.f
+ |-> setsmu				src/ppr.f
  \-> supsmu                               "
      |
      |--> smooth                          "
@@ -43,16 +43,16 @@ supsmu() [R]
           |
           |- intpr()
           |- dblepr()
-          |- bdrsplerr()                ./ksmooth.c
+          |- bdrsplerr()                src/ksmooth.c
           |
-          \- qsbart()                   (see above)
+          \- rbart()                    (see above)
              \-> sbart()  .....etc..... (see above)
 
 
 
 ppr()   [R]
  |
- |-> setppr				./ppr.f
+ |-> setppr				src/ppr.f
  |
  |-> pppred				  "
  |   \-> fsort                            "
diff --git a/src/library/stats/src/HoltWinters.c b/src/library/stats/src/HoltWinters.c
index 9011a4c..6241fbf 100644
--- a/src/library/stats/src/HoltWinters.c
+++ b/src/library/stats/src/HoltWinters.c
@@ -14,14 +14,16 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/.
+ *  https://www.R-project.org/Licenses/.
  */
 
 /* Originally contributed by David Meyer */
 
+#include <stdlib.h>
+#include <string.h>  // memcpy
+
 #include <R.h>
 #include "ts.h"
-#include <stdlib.h>
 
 void HoltWinters (double *x,
 		  int    *xl,
diff --git a/src/library/stats/src/Makefile.in b/src/library/stats/src/Makefile.in
index 239260f..823274f 100644
--- a/src/library/stats/src/Makefile.in
+++ b/src/library/stats/src/Makefile.in
@@ -12,6 +12,7 @@ subdir = src/library/$(pkg)/src
 R_HOME = $(top_builddir)
 ## for $(R_HOME)/etc${R_ARCH}/Makeconf
 R_SHARE_DIR = $(R_HOME)/share
+R_INCLUDE_DIR = $(R_HOME)/include
 
 SOURCES_C = init.c kmeans.c \
   ansari.c bandwidths.c chisqsim.c d2x2xk.c fexact.c kendall.c ks.c \
diff --git a/src/library/stats/src/Makefile.win b/src/library/stats/src/Makefile.win
index 3348c97..6f57ac7 100644
--- a/src/library/stats/src/Makefile.win
+++ b/src/library/stats/src/Makefile.win
@@ -50,7 +50,7 @@ include $(top_srcdir)/share/make/winshlib.mk
 
 
 ## Meeded with i386 gcc 4.5.0 -- PR#14427
-portsrc_FFLAGS=$(SAFE_FFLAGS)
+portsrc_FFLAGS = $(SAFE_FFLAGS)
 portsrc.o: portsrc.f
 	$(F77) $(portsrc_FFLAGS) -c $< -o $@
 
diff --git a/src/library/stats/src/PPsum.c b/src/library/stats/src/PPsum.c
index 512ef35..7454802 100644
--- a/src/library/stats/src/PPsum.c
+++ b/src/library/stats/src/PPsum.c
@@ -13,9 +13,10 @@
 
    You should have received a copy of the GNU Library General Public
    License along with this library; if not, a copy is available at
-   http://www.r-project.org/Licenses/
+   https://www.R-project.org/Licenses/
 */
 
+#include <string.h>
 #include <R.h>
 
 static double R_pp_sum (double *u, int n, int l)
diff --git a/src/library/stats/src/Srunmed.c b/src/library/stats/src/Srunmed.c
index 2627a34..0efdfe2 100644
--- a/src/library/stats/src/Srunmed.c
+++ b/src/library/stats/src/Srunmed.c
@@ -2,7 +2,7 @@
  *  R : A Computer Language for Statistical Data Analysis
  *  Copyright (C) 1995--2002 Martin Maechler <maechler at stat.math.ethz.ch>
  *  Copyright (C) 2003       The R Foundation
- *  Copyright (C) 2012-2013  The R Core Team
+ *  Copyright (C) 2012-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
@@ -16,10 +16,9 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  */
 
-#include <R.h>
 #include "modreg.h"
 
 #include "Trunmed.c"
diff --git a/src/library/stats/src/Trunmed.c b/src/library/stats/src/Trunmed.c
index ce0d9ed..efa326b 100644
--- a/src/library/stats/src/Trunmed.c
+++ b/src/library/stats/src/Trunmed.c
@@ -1,7 +1,7 @@
 /* Copyright (C) 1995   Berwin A. Turlach <berwin at alphasun.anu.edu.au>
  * Copyright (C) 2000-2 Martin Maechler <maechler at stat.math.ethz.ch>
  * Copyright (C) 2003   The R Foundation
- * Copyright (C) 2012-2013   The R Core Team
+ * Copyright (C) 2012-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
@@ -44,6 +44,8 @@
  * ...		 j	2nd permuter  X[i +j[m]] == H[m]
  */
 
+#include <math.h>
+
 static void
 swap(int l, int r, double *window, int *outlist, int *nrlist, int print_level)
 {
diff --git a/src/library/stats/src/ansari.c b/src/library/stats/src/ansari.c
index 16a0c68..7aed745 100644
--- a/src/library/stats/src/ansari.c
+++ b/src/library/stats/src/ansari.c
@@ -1,6 +1,6 @@
 /*
  *  R : A Computer Language for Statistical Data Analysis
- *  Copyright (C) 1999-2012  The R Core Team
+ *  Copyright (C) 1999-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
@@ -14,7 +14,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  *
  */
 
@@ -22,7 +22,9 @@
    Compute the exact distribution of the Ansari-Bradley test statistic.
    */
 
+#include <string.h>
 #include <R.h>
+#include <math.h>  // for floor
 #include <Rmath.h>		/* uses choose() */
 #include "stats.h"
 
diff --git a/src/library/stats/src/approx.c b/src/library/stats/src/approx.c
index 6ce803a..5816db3 100644
--- a/src/library/stats/src/approx.c
+++ b/src/library/stats/src/approx.c
@@ -1,7 +1,7 @@
 /*
  *  R : A Computer Language for Statistical Data Analysis
  *  Copyright (C) 1995, 1996   Robert Gentleman and Ross Ihaka
- *		  1997-2014   The R Core Team
+ *		  1997-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
@@ -15,7 +15,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  */
 
 #ifdef HAVE_CONFIG_H
@@ -40,8 +40,8 @@
  * Linear/constant interpolation then takes place on that interval
 */
 
-/* NB:  R_interv(.) in ./interv.c  is conceptually a special case of
- *	this, where y = 1:n */
+/* NB:  interv(.) in ../../../appl/interv.c
+        ------    is conceptually a special case of this, where y = 1:n */
 
 typedef struct {
     double ylow;
@@ -83,13 +83,13 @@ static double approx1(double v, double *x, double *y, int n,
     if(Meth->kind == 1) /* linear */
 	return y[i] + (y[j] - y[i]) * ((v - x[i])/(x[j] - x[i]));
     else /* 2 : constant */
-	return (Meth->f1 != 0.0 ? y[i] * Meth->f1 : 0.0) 
+	return (Meth->f1 != 0.0 ? y[i] * Meth->f1 : 0.0)
 	     + (Meth->f2 != 0.0 ? y[j] * Meth->f2 : 0.0);
 }/* approx1() */
 
 
 /* Testing done only once - in a separate function */
-static void 
+static void
 R_approxtest(double *x, double *y, int nxy, int method, double f)
 {
     int i;
@@ -107,13 +107,13 @@ R_approxtest(double *x, double *y, int nxy, int method, double f)
     }
     /* check interpolation method */
     for(i = 0; i < nxy; i++)
-	if(ISNA(x[i]) || ISNA(y[i]))
+	if(ISNAN(x[i]) || ISNAN(y[i]))
 	    error(_("approx(): attempted to interpolate NA values"));
 }
 
 /* R Frontend for Linear and Constant Interpolation, no testing */
 
-static void 
+static void
 R_approxfun(double *x, double *y, int nxy, double *xout, double *yout,
 	    int nout, int method, double yleft, double yright, double f)
 {
@@ -126,8 +126,7 @@ R_approxfun(double *x, double *y, int nxy, double *xout, double *yout,
     M.ylow = yleft;
     M.yhigh = yright;
     for(i = 0; i < nout; i++)
-	if(!ISNA(xout[i])) yout[i] = approx1(xout[i], x, y, nxy, &M);
-	else yout[i] = xout[i];
+	yout[i] = ISNAN(xout[i]) ? xout[i] : approx1(xout[i], x, y, nxy, &M);
 }
 
 #include <Rinternals.h>
@@ -140,14 +139,14 @@ SEXP ApproxTest(SEXP x, SEXP y, SEXP method, SEXP sf)
     return R_NilValue;
 }
 
-SEXP Approx(SEXP x, SEXP y, SEXP v, SEXP method, 
+SEXP Approx(SEXP x, SEXP y, SEXP v, SEXP method,
 	    SEXP yleft, SEXP yright, SEXP sf)
 {
     SEXP xout = PROTECT(coerceVector(v, REALSXP));
     int nx = LENGTH(x), nout = LENGTH(xout), m = asInteger(method);
     double yl = asReal(yleft), yr = asReal(yright), f = asReal(sf);
     SEXP yout = PROTECT(allocVector(REALSXP, nout));
-    R_approxfun(REAL(x), REAL(y), nx, REAL(xout), REAL(yout), nout, 
+    R_approxfun(REAL(x), REAL(y), nx, REAL(xout), REAL(yout), nout,
 		m, yl, yr, f);
     UNPROTECT(2);
     return yout;
diff --git a/src/library/stats/src/arima.c b/src/library/stats/src/arima.c
index 25bd29a..3d6fae8 100644
--- a/src/library/stats/src/arima.c
+++ b/src/library/stats/src/arima.c
@@ -1,6 +1,6 @@
 /*
  *  R : A Computer Language for Statistical Data Analysis
- *  Copyright (C) 2002-2014   The R Core Team.
+ *  Copyright (C) 2002-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
@@ -14,15 +14,15 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  */
 
 #ifdef HAVE_CONFIG_H
 # include <config.h>
 #endif
 
-/* do this first to get the right options for math.h */
-#include <R_ext/Arith.h>
+#include <stdlib.h> // for abs
+#include <string.h>
 
 #include <R.h>
 #include "ts.h"
@@ -164,16 +164,16 @@ KalmanLike(SEXP sy, SEXP mod, SEXP sUP, SEXP op, SEXP update)
 	}
     }
 
-    SEXP res = allocVector(REALSXP, 2);
+    SEXP res = PROTECT(allocVector(REALSXP, 2));
     REAL(res)[0] = ssq/nu; REAL(res)[1] = sumlog/nu;
     if(lop) {
 	SET_VECTOR_ELT(ans, 0, res);
 	if(asLogical(update)) setAttrib(ans, install("mod"), mod);
-	UNPROTECT(2);
+	UNPROTECT(3);
 	return ans;
     } else {
 	if(asLogical(update)) setAttrib(res, install("mod"), mod);
-	UNPROTECT(1);
+	UNPROTECT(2);
 	return res;
     }
 }
@@ -1034,7 +1034,8 @@ SEXP getQ0(SEXP sPhi, SEXP sTheta)
     double *P = REAL(res);
 
     if (r == 1) {
-	P[0] = 1.0 / (1.0 - phi[0] * phi[0]);
+	if (p == 0) P[0] = 1.0; // PR#16419
+	else P[0] = 1.0 / (1.0 - phi[0] * phi[0]);
 	UNPROTECT(1);
 	return res;
     }
diff --git a/src/library/stats/src/bandwidths.c b/src/library/stats/src/bandwidths.c
index 3b0ae29..404c4c7 100644
--- a/src/library/stats/src/bandwidths.c
+++ b/src/library/stats/src/bandwidths.c
@@ -1,7 +1,7 @@
 /*
  *  R : A Computer Language for Statistical Data Analysis
  *  bandwidth.c by W. N. Venables and B. D. Ripley  Copyright (C) 1994-2001
- *  Copyright (C) 2012-2014  The R Core Team
+ *  Copyright (C) 2012-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
@@ -15,11 +15,12 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  */
 
 #include <stdlib.h> //abs
 #include <math.h>
+#include <Rmath.h> // M_* constants
 #include <Rinternals.h>
 
 // or include "stats.h"
@@ -30,16 +31,6 @@
 #define _(String) (String)
 #endif
 
-#ifndef max
-#  define max(a,b) ((a) > (b) ? (a) : (b))
-#  define min(a,b) ((a) < (b) ? (a) : (b))
-#endif
-
-
-#if !defined(PI)
-#  define PI 3.14159265
-#endif
-
 #define DELMAX 1000
 /* Avoid slow and possibly error-producing underflows by cutting off at
    plus/minus sqrt(DELMAX) std deviations */
@@ -48,22 +39,25 @@
 SEXP bw_ucv(SEXP sn, SEXP sd, SEXP cnt, SEXP sh)
 {
     double h = asReal(sh), d = asReal(sd), sum = 0.0, term, u;
-    int n = asInteger(sn), nbin = LENGTH(cnt), *x = INTEGER(cnt);
+    int n = asInteger(sn), nbin = LENGTH(cnt);
+    double *x = REAL(cnt);
     for (int i = 0; i < nbin; i++) {
 	double delta = i * d / h;
 	delta *= delta;
 	if (delta >= DELMAX) break;
-	term = exp(-delta / 4) - sqrt(8.0) * exp(-delta / 2);
+	term = exp(-delta / 4.) - sqrt(8.0) * exp(-delta / 2.);
 	sum += term * x[i];
     }
-    u = 1 / (2 * n * h * sqrt(PI)) + sum / (n * n * h * sqrt(PI));
+    u = (0.5 + sum/n) / (n * h * M_SQRT_PI);
+    // = 1 / (2 * n * h * sqrt(PI)) + sum / (n * n * h * sqrt(PI));
     return ScalarReal(u);
 }
 
 SEXP bw_bcv(SEXP sn, SEXP sd, SEXP cnt, SEXP sh)
 {
     double h = asReal(sh), d = asReal(sd), sum = 0.0, term, u;
-    int n = asInteger(sn), nbin = LENGTH(cnt), *x = INTEGER(cnt);
+    int n = asInteger(sn), nbin = LENGTH(cnt);
+    double *x = REAL(cnt);
 
     sum = 0.0;
     for (int i = 0; i < nbin; i++) {
@@ -72,30 +66,34 @@ SEXP bw_bcv(SEXP sn, SEXP sd, SEXP cnt, SEXP sh)
 	term = exp(-delta / 4) * (delta * delta - 12 * delta + 12);
 	sum += term * x[i];
     }
-    u = 1 / (2 * n * h * sqrt(PI)) + sum / (64 * n * n * h * sqrt(PI));
+    u = (1 + sum/(32.0*n)) / (2.0 * n * h * M_SQRT_PI);
+    // = 1 / (2 * n * h * sqrt(PI)) + sum / (64 * n * n * h * sqrt(PI));
     return ScalarReal(u);
 }
 
 SEXP bw_phi4(SEXP sn, SEXP sd, SEXP cnt, SEXP sh)
 {
     double h = asReal(sh), d = asReal(sd), sum = 0.0, term, u;
-    int n = asInteger(sn), nbin = LENGTH(cnt), *x = INTEGER(cnt);
+    int n = asInteger(sn), nbin = LENGTH(cnt);
+    double *x = REAL(cnt);
 
     for (int i = 0; i < nbin; i++) {
 	double delta = i * d / h; delta *= delta;
 	if (delta >= DELMAX) break;
-	term = exp(-delta / 2) * (delta * delta - 6 * delta + 3);
+	term = exp(-delta / 2.) * (delta * delta - 6. * delta + 3.);
 	sum += term * x[i];
     }
-    sum = 2 * sum + n * 3;	/* add in diagonal */
-    u = sum / (n * (n - 1) * pow(h, 5.0) * sqrt(2 * PI));
+    sum = 2. * sum + n * 3.;	/* add in diagonal */
+    u = sum / ((double)n * (n - 1) * pow(h, 5.0)) * M_1_SQRT_2PI;
+    // = sum / (n * (n - 1) * pow(h, 5.0) * sqrt(2 * PI));
     return ScalarReal(u);
 }
 
 SEXP bw_phi6(SEXP sn, SEXP sd, SEXP cnt, SEXP sh)
 {
     double h = asReal(sh), d = asReal(sd), sum = 0.0, term, u;
-    int n = asInteger(sn), nbin = LENGTH(cnt), *x = INTEGER(cnt);
+    int n = asInteger(sn), nbin = LENGTH(cnt);
+    double *x = REAL(cnt);
 
     for (int i = 0; i < nbin; i++) {
 	double delta = i * d / h; delta *= delta;
@@ -104,12 +102,19 @@ SEXP bw_phi6(SEXP sn, SEXP sd, SEXP cnt, SEXP sh)
 	    (delta * delta * delta - 15 * delta * delta + 45 * delta - 15);
 	sum += term * x[i];
     }
-    sum = 2 * sum - 15 * n;	/* add in diagonal */
-    u = sum / (n * (n - 1) * pow(h, 7.0) * sqrt(2 * PI));
+    sum = 2. * sum - 15. * n;	/* add in diagonal */
+    u = sum / ((double)n * (n - 1) * pow(h, 7.0)) * M_1_SQRT_2PI;
+    // = sum / (n * (n - 1) * pow(h, 7.0) * sqrt(2 * PI));
     return ScalarReal(u);
 }
 
-/* This would be impracticable for long vectors.  Better to bin x first */
+/*
+   Use double cnt as from R 3.4.0, as counts can exceed INT_MAX for
+   large n (65537 in the worse case but typically not at n = 1 million
+   for a smooth distribution -- and this is by default no longer used
+   for n > 500).
+*/
+
 SEXP bw_den(SEXP nbin, SEXP sx)
 {
     int nb = asInteger(nbin), n = LENGTH(sx);
@@ -119,26 +124,48 @@ SEXP bw_den(SEXP nbin, SEXP sx)
     for (int i = 0; i < n; i++) {
 	if(!R_FINITE(x[i]))
 	    error(_("non-finite x[%d] in bandwidth calculation"), i+1);
-	xmin = min(xmin, x[i]);
-	xmax = max(xmax, x[i]);
+	if(x[i] < xmin) xmin = x[i];
+	if(x[i] > xmax) xmax = x[i];
     }
     rang = (xmax - xmin) * 1.01;
     dd = rang / nb;
 
     SEXP ans = PROTECT(allocVector(VECSXP, 2)),
-	sc = SET_VECTOR_ELT(ans, 1, allocVector(INTSXP, nb));
+	sc = SET_VECTOR_ELT(ans, 1, allocVector(REALSXP, nb));
     SET_VECTOR_ELT(ans, 0, ScalarReal(dd));
-    int *cnt = INTEGER(sc);
-    for (int i = 0; i < nb; i++) cnt[i] = 0;
+    double *cnt = REAL(sc);
+    for (int i = 0; i < nb; i++) cnt[i] = 0.0;
 
     for (int i = 1; i < n; i++) {
 	int ii = (int)(x[i] / dd);
 	for (int j = 0; j < i; j++) {
 	    int jj = (int)(x[j] / dd);
-	    cnt[abs(ii - jj)]++;
+	    cnt[abs(ii - jj)] += 1.0;
 	}
     }
 
     UNPROTECT(1);
     return ans;
 }
+
+/* Input: counts for nb bins */
+SEXP bw_den_binned(SEXP sx)
+{
+    int nb = LENGTH(sx);
+    int *x = INTEGER(sx);
+
+    SEXP ans = PROTECT(allocVector(REALSXP, nb));
+    double *cnt = REAL(ans);
+    for (int ib = 0; ib < nb; ib++) cnt[ib] = 0.0;
+
+    for (int ii = 0; ii < nb; ii++) {
+	int w = x[ii];
+	cnt[0] += w*(w-1.); // don't count distances to self
+	for (int jj = 0; jj < ii; jj++)
+	    cnt[ii - jj] += w * x[jj];
+    }
+    cnt[0] *= 0.5; // counts in the same bin got double-counted
+
+    UNPROTECT(1);
+    return ans;
+}
diff --git a/src/library/stats/src/bsplvd.f b/src/library/stats/src/bsplvd.f
index 955fd11..97e0695 100644
--- a/src/library/stats/src/bsplvd.f
+++ b/src/library/stats/src/bsplvd.f
@@ -52,7 +52,7 @@ C Locals
 c     mhigh is usually equal to nderiv.
       kp1 = k+1
       call bsplvb(t,lent,kp1-mhigh,1,x,left,dbiatx)
-      if (mhigh .eq. 1)                 go to 99
+      if (mhigh .eq. 1) return
 c     the first column of  dbiatx  always contains the b-spline values
 c     for the current order. these are stored in column k+1-current
 c     order  before  bsplvb  is called to put values for the next
@@ -62,7 +62,8 @@ c     higher order on top of it.
          jp1mid = 1
          do 11 j=ideriv,k
             dbiatx(j,ideriv) = dbiatx(jp1mid,1)
-   11       jp1mid = jp1mid + 1
+            jp1mid = jp1mid + 1
+   11       continue
          ideriv = ideriv - 1
          call bsplvb(t,lent,kp1-ideriv,2,x,left,dbiatx)
    15    continue
@@ -76,13 +77,15 @@ c
       jlow = 1
       do 20 i=1,k
          do 19 j=jlow,k
-   19       a(j,i) = 0d0
+            a(j,i) = 0d0
+   19       continue
          jlow = i
-   20    a(i,i) = 1d0
+         a(i,i) = 1d0
+   20    continue
 c     at this point, a(.,j) contains the b-coeffs for the j-th of the
 c     k  b-splines of interest here.
 c
-      do 40 m=2,mhigh
+      do 45 m=2,mhigh
          kp1mm = kp1 - m
          fkp1mm = dble(kp1mm)
          il = left
@@ -97,9 +100,11 @@ c        i < j  is used.sed.
 c           the assumption that t(left) < t(left+1) makes denominator
 c           in  factor  nonzero.
             do 24 j=1,i
-   24          a(i,j) = (a(i,j) - a(i-1,j))*factor
+               a(i,j) = (a(i,j) - a(i-1,j))*factor
+   24          continue
             il = il - 1
-   25       i = i - 1
+            i = i - 1         
+   25       continue
 c
 c        for i=1,...,k, combine b-coeffs a(.,i) with b-spline values
 c        stored in dbiatx(.,m) to get value of  (m-1)st  derivative of
@@ -112,9 +117,11 @@ c        that  a(j,i) = 0  for j < i .
             sum = 0.d0
             jlow = max0(i,m)
             do 35 j=jlow,k
-   35          sum = a(j,i)*dbiatx(j,m) + sum
-   40       dbiatx(i,m) = sum
-   99 return
+               sum = a(j,i)*dbiatx(j,m) + sum
+   35       continue
+            dbiatx(i,m) = sum
+   40    continue
+   45 continue
       end
 
       subroutine bsplvb ( t, lent,jhigh, index, x, left, biatx )
@@ -200,10 +207,11 @@ C Local Variables
       save j,deltal,deltar
       data j/1/
 c
-                                        go to (10,20), index
-   10 j = 1
+c                                        go to (10,20), index
+      if (index .eq. 2) go to 20
+      j = 1
       biatx(1) = 1d0
-      if (j .ge. jhigh)                 go to 99
+      if (j .ge. jhigh) return
 c
    20    jp1 = j + 1
          deltar(j) = t(left+j) - x
@@ -212,10 +220,9 @@ c
          do 26 i=1,j
             term = biatx(i)/(deltar(i) + deltal(jp1-i))
             biatx(i) = saved + deltar(i)*term
-   26       saved = deltal(jp1-i)*term
+            saved = deltal(jp1-i)*term
+   26       continue
          biatx(jp1) = saved
          j = jp1
          if (j .lt. jhigh)              go to 20
-c
-   99                                   return
       end
diff --git a/src/library/stats/src/burg.c b/src/library/stats/src/burg.c
index a68f830..df4e814 100644
--- a/src/library/stats/src/burg.c
+++ b/src/library/stats/src/burg.c
@@ -1,7 +1,7 @@
 /*
  *  R : A Computer Language for Statistical Data Analysis
 
- *  Copyright (C) 1999-2012  The R Core Team
+ *  Copyright (C) 1999-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
@@ -15,7 +15,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/.
+ *  https://www.R-project.org/Licenses/.
  */
 
 #include <R.h>
diff --git a/src/library/stats/src/bvalue.f b/src/library/stats/src/bvalue.f
index 80fa5a5..4abf281 100644
--- a/src/library/stats/src/bvalue.f
+++ b/src/library/stats/src/bvalue.f
@@ -3,7 +3,7 @@
 c Calculates value at  x  of  jderiv-th derivative of spline from B-repr.
 c The spline is taken to be continuous from the right.
 c
-C calls  interv
+C calls  interv()  (from ../../../appl/interv.c )
 c
 c******  i n p u t ******
 c  t, bcoef, n, k......forms the b-representation of the spline  f  to
diff --git a/src/library/stats/src/chisqsim.c b/src/library/stats/src/chisqsim.c
index 22cf170..b82e157 100644
--- a/src/library/stats/src/chisqsim.c
+++ b/src/library/stats/src/chisqsim.c
@@ -1,6 +1,6 @@
 /*
  *  R : A Computer Language for Statistical Data Analysis
- *  Copyright (C) 2001-5   The R Core Team.
+ *  Copyright (C) 2001-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
@@ -14,11 +14,12 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  */
 
 #include <R.h>
 #include <Rinternals.h>
+#include <math.h>
 #include <Rmath.h>
 #include <R_ext/Random.h>
 #include "stats.h" // for rcont2
diff --git a/src/library/stats/src/complete_cases.c b/src/library/stats/src/complete_cases.c
index ec4eea5..4fd75fa 100644
--- a/src/library/stats/src/complete_cases.c
+++ b/src/library/stats/src/complete_cases.c
@@ -15,7 +15,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  */
 
 #ifdef HAVE_CONFIG_H
diff --git a/src/library/stats/src/cov.c b/src/library/stats/src/cov.c
index 40e5d11..d4b392c 100644
--- a/src/library/stats/src/cov.c
+++ b/src/library/stats/src/cov.c
@@ -1,6 +1,6 @@
 /*
  *  R : A Computer Language for Statistical Data Analysis
- *  Copyright (C) 1995-2013	The R Core Team
+ *  Copyright (C) 1995-2015	The R Core Team
  *  Copyright (C) 2003		The R Foundation
  *
  *  This program is free software; you can redistribute it and/or modify
@@ -15,7 +15,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  */
 
 #ifdef HAVE_CONFIG_H
@@ -62,6 +62,7 @@ SEXP cov(SEXP x, SEXP y, SEXP na_method, SEXP kendall)
 		    }
 
 #define ANS(I,J)  ans[I + J * ncx]
+#define CLAMP(X)  (X >= 1. ? 1. : (X <= -1. ? -1. : X))
 
 /* Note that "if (kendall)" and	 "if (cor)" are used inside a double for() loop;
    which makes the code better readable -- and is hopefully dealt with
@@ -126,8 +127,8 @@ SEXP cov(SEXP x, SEXP y, SEXP na_method, SEXP kendall)
 			    ysd /= n1;					\
 			    sum /= n1;					\
 			}						\
-			sum /= (SQRTL(xsd) * SQRTL(ysd));	       	\
-			if(sum > 1.) sum = 1.;				\
+			sum /= (SQRTL(xsd) * SQRTL(ysd));		\
+			sum = CLAMP(sum);				\
 		    }							\
 		}							\
 		else if(!kendall)					\
@@ -297,8 +298,7 @@ cov_complete1(int n, int ncx, double *x, double *xm,
 		}
 		else {
 		    sum = ANS(i,j) / (xm[i] * xm[j]);
-		    if(sum > 1.) sum = 1.;
-		    ANS(j,i) = ANS(i,j) = (double)sum;
+		    ANS(j,i) = ANS(i,j) = (double)CLAMP(sum);
 		}
 	    }
 	    ANS(i,i) = 1.0;
@@ -367,8 +367,7 @@ cov_na_1(int n, int ncx, double *x, double *xm,
 		}
 		else {
 		    sum = ANS(i,j) / (xm[i] * xm[j]);
-		    if(sum > 1.) sum = 1.;
-		    ANS(j,i) = ANS(i,j) = (double)sum;
+		    ANS(j,i) = ANS(i,j) = (double)CLAMP(sum);
 		}
 	    }
 	    ANS(i,i) = 1.0;
@@ -451,7 +450,7 @@ cov_complete2(int n, int ncx, int ncy, double *x, double *y,
 		}
 		else {
 		    ANS(i,j) /= (xm[i] * ym[j]);
-		    if(ANS(i,j) > 1.) ANS(i,j) = 1.;
+		    ANS(i,j) = CLAMP(ANS(i,j));
 		}
     }/* cor */
 
@@ -542,7 +541,7 @@ cov_na_2(int n, int ncx, int ncy, double *x, double *y,
 			}
 			else {
 			    ANS(i,j) /= (xm[i] * ym[j]);
-			    if(ANS(i,j) > 1.) ANS(i,j) = 1.;
+			    ANS(i,j) = CLAMP(ANS(i,j));
 			}
 		    }
 	    }
@@ -556,6 +555,10 @@ cov_na_2(int n, int ncx, int ncy, double *x, double *y,
 #undef MEAN_
 #undef COV_SDEV
 
+/* complete[12]() returns indicator vector ind[] of complete.cases(), or
+ * -------------- if(na_fail) signals error if any NA/NaN is encountered
+ */
+
 /* This might look slightly inefficient, but it is designed to
  * optimise paging in virtual memory systems ...
  * (or at least that's my story, and I'm sticking to it.)
@@ -593,17 +596,14 @@ complete2(int n, int ncx, int ncy, double *x, double *y, int *ind, Rboolean na_f
     }
 }
 
-#define NA_CHECK(_HAS_NA_)			\
-    for (i = 0 ; i < n ; i++)			\
-	if (ISNAN(z[i])) {			\
-	    _HAS_NA_[j] = 1; break;		\
-	}
-
 #define HAS_NA_1(_X_,_HAS_NA_)			\
     for (j = 0 ; j < nc##_X_ ; j++) {		\
 	z = &_X_[j * n];			\
         _HAS_NA_[j] = 0;			\
-	NA_CHECK(_HAS_NA_)			\
+	for (i = 0 ; i < n ; i++)		\
+	    if (ISNAN(z[i])) {			\
+		_HAS_NA_[j] = 1; break;		\
+	    }					\
     }
 
 
@@ -625,7 +625,6 @@ find_na_2(int n, int ncx, int ncy, double *x, double *y, int *has_na_x, int *has
 
 #undef NA_LOOP
 #undef COMPLETE_1
-#undef NA_CHECK
 #undef HAS_NA_1
 
 /* co[vr](x, y, use =
@@ -642,6 +641,12 @@ static SEXP corcov(SEXP x, SEXP y, SEXP na_method, SEXP skendall, Rboolean cor)
     /* Arg.1: x */
     if(isNull(x)) /* never allowed */
 	error(_("'x' is NULL"));
+#ifdef _R_in_2017_
+    if(isFactor(x)) error(_("'x' is a factor"));
+#else
+# define VAR_FACTOR_MSG "Calling var(x) on a factor x is deprecated and will become an error.\n  Use something like 'all(duplicated(x)[-1L])' to test for a constant vector."
+    if(isFactor(x)) warning(_(VAR_FACTOR_MSG));
+#endif
     /* length check of x -- only if(empty_err) --> below */
     x = PROTECT(coerceVector(x, REALSXP));
     if ((ansmat = isMatrix(x))) {
@@ -656,6 +661,11 @@ static SEXP corcov(SEXP x, SEXP y, SEXP na_method, SEXP skendall, Rboolean cor)
     if (isNull(y)) {/* y = x  : var() */
 	ncy = ncx;
     } else {
+#ifdef _R_in_2017_
+	if(isFactor(y)) error(_("'y' is a factor"));
+#else
+	if(isFactor(y)) warning(_(VAR_FACTOR_MSG));
+#endif
 	y = PROTECT(coerceVector(y, REALSXP));
 	nprotect++;
 	if (isMatrix(y)) {
diff --git a/src/library/stats/src/d2x2xk.c b/src/library/stats/src/d2x2xk.c
index e386663..0047ee6 100644
--- a/src/library/stats/src/d2x2xk.c
+++ b/src/library/stats/src/d2x2xk.c
@@ -1,6 +1,6 @@
 /*
  *  R : A Computer Language for Statistical Data Analysis
- *  Copyright (C) 2000-12   The R Core Team.
+ *  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
@@ -14,7 +14,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  */
 
 /* for mantelhaen.test */
diff --git a/src/library/stats/src/dblcen.c b/src/library/stats/src/dblcen.c
index 6ad4f39..3131bb7 100644
--- a/src/library/stats/src/dblcen.c
+++ b/src/library/stats/src/dblcen.c
@@ -14,7 +14,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  */
 
 #include "Rinternals.h"
diff --git a/src/library/stats/src/deriv.c b/src/library/stats/src/deriv.c
index 07c043f..48bd21a 100644
--- a/src/library/stats/src/deriv.c
+++ b/src/library/stats/src/deriv.c
@@ -1,8 +1,8 @@
 /*
  *  R : A Computer Language for Statistical Data Analysis
+ *  Copyright (C) 1998-2017   The R Core Team.
+ *  Copyright (C) 2004-2017   The R Foundation
  *  Copyright (C) 1995, 1996  Robert Gentleman and Ross Ihaka
- *  Copyright (C) 1998-2014   The R Core Team.
- *  Copyright (C) 2004-5        The R Foundation
  *
  *  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
@@ -16,7 +16,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  *
  *
  *  Symbolic Differentiation
@@ -60,6 +60,22 @@ static SEXP LGammaSymbol;
 static SEXP DiGammaSymbol;
 static SEXP TriGammaSymbol;
 static SEXP PsiSymbol;
+/* new symbols in R 3.4.0: */
+static SEXP PiSymbol;
+static SEXP ExpM1Symbol;
+static SEXP Log1PSymbol;
+static SEXP Log2Symbol;
+static SEXP Log10Symbol;
+static SEXP SinPiSymbol;
+static SEXP CosPiSymbol;
+static SEXP TanPiSymbol;
+static SEXP FactorialSymbol;
+static SEXP LFactorialSymbol;
+/* possible future symbols
+static SEXP Log1PExpSymbol;
+static SEXP Log1MExpSymbol;
+static SEXP Log1PMxSymbol;
+*/
 
 static Rboolean Initialized = FALSE;
 
@@ -93,6 +109,22 @@ static void InitDerivSymbols(void)
     DiGammaSymbol = install("digamma");
     TriGammaSymbol = install("trigamma");
     PsiSymbol = install("psigamma");
+/* new symbols */
+    PiSymbol = install("pi");
+    ExpM1Symbol = install("expm1");
+    Log1PSymbol = install("log1p");
+    Log2Symbol = install("log2");
+    Log10Symbol = install("log10");
+    SinPiSymbol = install("sinpi");
+    CosPiSymbol = install("cospi");
+    TanPiSymbol = install("tanpi");
+    FactorialSymbol = install("factorial");
+    LFactorialSymbol = install("lfactorial");
+/* possible future symbols
+    Log1PExpSymbol = install("log1pexp");    # log(1+exp(x))
+    Log1MExpSymbol = install("log1mexp");    # log(1-exp(-x)), for x > 0
+    Log1PMxSymbol = install("log1pmx");      # log1p(x)-x
+*/
 
     Initialized = TRUE;
 }
@@ -235,16 +267,18 @@ static SEXP simplify(SEXP fun, SEXP arg1, SEXP arg2)
 	    ans = lang3(PowerSymbol, arg1, arg2);
     }
     else if (fun == ExpSymbol) {
-	/* FIXME: simplify exp(lgamma( E )) = gamma( E ) */
-	ans = lang2(ExpSymbol, arg1);
+        /* FIXME: simplify exp(lgamma( E )) = gamma( E ) */
+        /* FIXME: simplify exp(lfactorial( E )) = factorial( E ) */
+        ans = lang2(ExpSymbol, arg1);
     }
     else if (fun == LogSymbol) {
-	/* FIXME: simplify log(gamma( E )) = lgamma( E ) */
-	ans = lang2(LogSymbol, arg1);
+        /* FIXME: simplify log(gamma( E )) = lgamma( E ) */
+        /* FIXME: simplify log(factorial( E )) = lfactorial( E ) */
+        ans = lang2(LogSymbol, arg1);
     }
-    else if (fun == CosSymbol)	ans = lang2(CosSymbol, arg1);
-    else if (fun == SinSymbol)	ans = lang2(SinSymbol, arg1);
-    else if (fun == TanSymbol)	ans = lang2(TanSymbol, arg1);
+    else if (fun == CosSymbol)  ans = lang2(CosSymbol, arg1);
+    else if (fun == SinSymbol)  ans = lang2(SinSymbol, arg1);
+    else if (fun == TanSymbol)  ans = lang2(TanSymbol, arg1);
     else if (fun == CoshSymbol) ans = lang2(CoshSymbol, arg1);
     else if (fun == SinhSymbol) ans = lang2(SinhSymbol, arg1);
     else if (fun == TanhSymbol) ans = lang2(TanhSymbol, arg1);
@@ -262,6 +296,28 @@ static SEXP simplify(SEXP fun, SEXP arg1, SEXP arg2)
        if (arg2 == R_MissingArg) ans = lang2(PsiSymbol, arg1);
        else ans = lang3(PsiSymbol, arg1, arg2);
     }
+/* new symbols */
+    else if (fun == ExpM1Symbol) {
+        /* FIXME: simplify expm1(log1p( E )) = E */
+        ans = lang2(ExpM1Symbol, arg1);
+    }
+    else if (fun == LogSymbol) {
+        /* FIXME: simplify log1p(expm1( E )) = E */
+        ans = lang2(Log1PSymbol, arg1);
+    }
+    else if (fun == Log2Symbol) ans = lang2(Log2Symbol, arg1);
+    else if (fun == Log10Symbol) ans = lang2(Log10Symbol, arg1);
+    else if (fun == CosPiSymbol) ans = lang2(CosPiSymbol, arg1);
+    else if (fun == SinPiSymbol) ans = lang2(SinPiSymbol, arg1);
+    else if (fun == TanPiSymbol) ans = lang2(TanPiSymbol, arg1);
+    else if (fun == FactorialSymbol)ans = lang2(FactorialSymbol, arg1);
+    else if (fun == LFactorialSymbol)ans = lang2(LFactorialSymbol, arg1);
+/* possible future symbols
+    else if (fun == Log1PExpSymbol) ans = lang2(Log1PExpSymbol, arg1);
+    else if (fun == Log1MExpSymbol) ans = lang2(Log1MExpSymbol, arg1);
+    else if (fun == Log1PMxSymbol) ans = lang2(Log1PMxSymbol, arg1);
+*/
+
     else ans = Constant(NA_REAL);
     /* FIXME */
 #ifdef NOTYET
@@ -383,7 +439,8 @@ static SEXP D(SEXP expr, SEXP var)
 	}
 	else if (CAR(expr) == LogSymbol) {
 	    if (length(expr) != 2)
-		error("only single-argument calls are supported");
+		error("only single-argument calls to log() are supported;\n"
+		      "  maybe use log(x,a) = log(x)/log(a)");
 	    ans = simplify(DivideSymbol,
 			   PP(D(CADR(expr), var)),
 			   CADR(expr));
@@ -466,7 +523,7 @@ static SEXP D(SEXP expr, SEXP var)
 			   PP_S(DivideSymbol,
 				PP(D(CADR(expr), var)),
 				PP_S(SqrtSymbol,
-				     PP_S(MinusSymbol,PP(Constant(1.)),
+				     PP_S(MinusSymbol, PP(Constant(1.)),
 					  PP_S(PowerSymbol,
 					       CADR(expr),PP(Constant(2.)))),
 				     R_MissingArg)), R_MissingArg);
@@ -529,6 +586,96 @@ static SEXP D(SEXP expr, SEXP var)
 		UNPROTECT(3);
 	    }
 	}
+/* new in R 3.4.0 */
+        else if (CAR(expr) == ExpM1Symbol) {
+            ans = simplify(TimesSymbol,
+			   PP_S2(ExpSymbol, CADR(expr)),
+                           PP(D(CADR(expr), var)));
+            UNPROTECT(2);
+        }
+        else if (CAR(expr) == Log1PSymbol) {
+            ans = simplify(DivideSymbol,
+                           PP(D(CADR(expr), var)),
+                           PP_S(PlusSymbol, PP(Constant(1.)), CADR(expr)));
+            UNPROTECT(3);
+        }
+        else if (CAR(expr) == Log2Symbol) {
+            ans = simplify(DivideSymbol,
+                           PP(D(CADR(expr), var)),
+                           PP_S(TimesSymbol, CADR(expr),
+				             PP_S2(LogSymbol, PP(Constant(2.)))));
+            UNPROTECT(4);
+        }
+        else if (CAR(expr) == Log10Symbol) {
+            ans = simplify(DivideSymbol,
+                           PP(D(CADR(expr), var)),
+                           PP_S(TimesSymbol, CADR(expr),
+				             PP_S2(LogSymbol, PP(Constant(10.)))));
+            UNPROTECT(4);
+        }
+        else if (CAR(expr) == CosPiSymbol) {
+            ans = simplify(TimesSymbol,
+                           PP_S2(SinPiSymbol, CADR(expr)),
+                           PP_S(TimesSymbol, PP_S2(MinusSymbol, PiSymbol),
+				             PP(D(CADR(expr), var)) ));
+            UNPROTECT(4);
+        }
+        else if (CAR(expr) == SinPiSymbol) {
+            ans = simplify(TimesSymbol,
+                           PP_S2(CosPiSymbol, CADR(expr)),
+                           PP_S(TimesSymbol, PiSymbol,
+                                             PP(D(CADR(expr), var)) ));
+            UNPROTECT(3);
+        }
+        else if (CAR(expr) == TanPiSymbol) {
+            ans = simplify(DivideSymbol,
+                           PP_S(TimesSymbol, PiSymbol, PP(D(CADR(expr), var))),
+			   PP_S(PowerSymbol,
+				PP_S2(CosPiSymbol, CADR(expr)),
+				PP(Constant(2.0))));
+            UNPROTECT(5);
+        }
+        else if (CAR(expr) == LFactorialSymbol) {
+            ans = simplify(TimesSymbol,
+                           PP(D(CADR(expr), var)),
+                           PP_S2(DiGammaSymbol, PP_S(PlusSymbol,
+						     CADR(expr),
+						     PP(ScalarInteger(1)))));
+            UNPROTECT(4);
+        }
+        else if (CAR(expr) == FactorialSymbol) {
+            ans = simplify(TimesSymbol,
+                           PP(D(CADR(expr), var)),
+                           PP_S(TimesSymbol,
+                                expr,
+                                PP_S2(DiGammaSymbol, PP_S(PlusSymbol,
+							  CADR(expr),
+							  PP(ScalarInteger(1))))));
+            UNPROTECT(5);
+        }
+/* possible future symbols
+        else if (CAR(expr) == Log1PExpSymbol) {
+            ans = simplify(DivideSymbol,
+                           PP_S(TimesSymbol, PP(D(CADR(expr), var)),
+                                PP_S2(ExpSymbol, CADR(expr))),
+                           PP_S(PlusSymbol,PP(Constant(1.)),
+                                PP_S2(ExpSymbol, CADR(expr)) ));
+            UNPROTECT(6);
+        }
+        else if (CAR(expr) == Log1MExpSymbol) {
+            ans = simplify(DivideSymbol,
+                           PP_S(TimesSymbol, PP_S2(MinusSymbol, PP(D(CADR(expr), var))),
+                                PP_S2(ExpSymbol, PP_S2(MinusSymbol, CADR(expr))) ),
+                           PP_S2(ExpM1Symbol, PP_S2(MinusSymbol, CADR(expr))) );
+            UNPROTECT(7);
+        }
+        else if (CAR(expr) == Log1PMxSymbol) {
+            ans = simplify(DivideSymbol,
+                           PP_S2(MinusSymbol, PP(D(CADR(expr), var))),
+                           PP_S(PlusSymbol,PP(Constant(1.)), CADR(expr)) );
+            UNPROTECT(4);
+        }
+*/
 
 	else {
 	    SEXP u = deparse1(CAR(expr), 0, SIMPLEDEPARSE);
@@ -543,6 +690,7 @@ static SEXP D(SEXP expr, SEXP var)
     return ans;
 
 #undef PP_S
+#undef PP_S2
 
 } /* D() */
 
@@ -637,6 +785,8 @@ SEXP doD(SEXP args)
     args = CDR(args);
     if (isExpression(CAR(args))) expr = VECTOR_ELT(CAR(args), 0);
     else expr = CAR(args);
+    if (!(isLanguage(expr) || isSymbol(expr) || isNumeric(expr) || isComplex(expr)))
+        error(_("expression must not be type '%s'"), type2char(TYPEOF(expr)));
     var = CADR(args);
     if (!isString(var) || length(var) < 1)
 	error(_("variable must be a character string"));
@@ -652,7 +802,7 @@ SEXP doD(SEXP args)
 
 /* ------ FindSubexprs ------ and ------ Accumulate ------ */
 
-static void InvalidExpression(char *where)
+static void NORET InvalidExpression(char *where)
 {
     error(_("invalid expression in '%s'"), where);
 }
@@ -716,7 +866,7 @@ static int Accumulate2(SEXP expr, SEXP exprlist)
 
 static SEXP MakeVariable(int k, SEXP tag)
 {
-    const void *vmax = vmaxget();    
+    const void *vmax = vmaxget();
     char buf[64];
     snprintf(buf, 64, "%s%d", translateChar(STRING_ELT(tag, 0)), k);
     vmaxset(vmax);
@@ -849,7 +999,7 @@ static SEXP DerivAssign(SEXP name, SEXP expr)
     SEXP ans, newname;
     PROTECT(ans = lang3(install("<-"), R_NilValue, expr));
     PROTECT(newname = ScalarString(name));
-    SETCADR(ans, lang4(install("["), install(".grad"), R_MissingArg, newname));
+    SETCADR(ans, lang4(R_BracketSymbol, install(".grad"), R_MissingArg, newname));
     UNPROTECT(2);
     return ans;
 }
@@ -859,7 +1009,7 @@ static SEXP HessAssign1(SEXP name, SEXP expr)
     SEXP ans, newname;
     PROTECT(ans = lang3(install("<-"), R_NilValue, expr));
     PROTECT(newname = ScalarString(name));
-    SETCADR(ans, lang5(install("["), install(".hessian"), R_MissingArg,
+    SETCADR(ans, lang5(R_BracketSymbol, install(".hessian"), R_MissingArg,
 		       newname, newname));
     UNPROTECT(2);
     return ans;
@@ -871,9 +1021,9 @@ static SEXP HessAssign2(SEXP name1, SEXP name2, SEXP expr)
     PROTECT(newname1 = ScalarString(name1));
     PROTECT(newname2 = ScalarString(name2));
     /* this is overkill, but PR#14772 found an issue */
-    PROTECT(tmp1 = lang5(install("["), install(".hessian"), R_MissingArg,
+    PROTECT(tmp1 = lang5(R_BracketSymbol, install(".hessian"), R_MissingArg,
 			 newname1, newname2));
-    PROTECT(tmp2 = lang5(install("["), install(".hessian"), R_MissingArg,
+    PROTECT(tmp2 = lang5(R_BracketSymbol, install(".hessian"), R_MissingArg,
 			 newname2, newname1));
     PROTECT(tmp3 = lang3(install("<-"), tmp2, expr));
     ans = lang3(install("<-"), tmp1, tmp3);
@@ -923,7 +1073,7 @@ SEXP deriv(SEXP args)
 
     args = CDR(args);
     InitDerivSymbols();
-    PROTECT(exprlist = LCONS(install("{"), R_NilValue));
+    PROTECT(exprlist = LCONS(R_BraceSymbol, R_NilValue));
     /* expr: */
     if (isExpression(CAR(args)))
 	PROTECT(expr = VECTOR_ELT(CAR(args), 0));
diff --git a/src/library/stats/src/distance.c b/src/library/stats/src/distance.c
index 9ffbd64..5717d73 100644
--- a/src/library/stats/src/distance.c
+++ b/src/library/stats/src/distance.c
@@ -1,7 +1,7 @@
 /*
  *  R : A Computer Language for Statistical Data Analysis
  *  Copyright (C) 1995, 1996  Robert Gentleman and Ross Ihaka
- *  Copyright (C) 1998-2013  The R Core Team
+ *  Copyright (C) 1998-2016   The R Core Team
  *  Copyright (C) 2002, 2004  The R Foundation
  *
  *  This program is free software; you can redistribute it and/or modify
@@ -16,18 +16,17 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  */
 
 #ifdef HAVE_CONFIG_H
 # include <config.h>
 #endif
-/* do this first to get the right options for math.h */
-#include <R_ext/Arith.h>
+
+#include <float.h>
 
 #include <R.h>
 #include <Rmath.h>
-#include <float.h>
 #include "stats.h"
 #ifdef _OPENMP
 # include <R_ext/MathThreads.h>
@@ -124,7 +123,7 @@ static double R_canberra(double *x, int nr, int nc, int i1, int i2)
 		dev = diff/sum;
 		if(!ISNAN(dev) ||
 		   (!R_FINITE(diff) && diff == sum &&
-		    /* use Inf = lim x -> oo */ (dev = 1.))) {
+		    /* use Inf = lim x -> oo */ (int) (dev = 1.))) {
 		    dist += dev;
 		    count++;
 		}
@@ -153,9 +152,9 @@ static double R_dist_binary(double *x, int nr, int nc, int i1, int i2)
 		warning(_("treating non-finite values as NA"));
 	    }
 	    else {
-		if(x[i1] || x[i2]) {
+		if(x[i1] != 0. || x[i2] != 0.) {
 		    count++;
-		    if( ! (x[i1] && x[i2]) ) dist++;
+		    if( ! (x[i1] != 0. && x[i2] != 0.) ) dist++;
 		}
 		total++;
 	    }
diff --git a/src/library/stats/src/distn.c b/src/library/stats/src/distn.c
index 1a2053a..92b8eeb 100644
--- a/src/library/stats/src/distn.c
+++ b/src/library/stats/src/distn.c
@@ -15,7 +15,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  */
 
 
@@ -49,28 +49,28 @@
 	i2 = (++i2 == n2) ? 0 : i2,\
 	++i)
 
-#define SETUP_Math2				\
-    na = XLENGTH(sa);				\
-    nb = XLENGTH(sb);				\
-    if ((na == 0) || (nb == 0))	{		\
-	PROTECT(sy = allocVector(REALSXP, 0));	\
-	if (na == 0) DUPLICATE_ATTRIB(sy, sa);	\
-	UNPROTECT(1);				\
-	return(sy);				\
-    }						\
-    n = (na < nb) ? nb : na;			\
-    PROTECT(sa = coerceVector(sa, REALSXP));	\
-    PROTECT(sb = coerceVector(sb, REALSXP));	\
-    PROTECT(sy = allocVector(REALSXP, n));	\
-    a = REAL(sa);				\
-    b = REAL(sb);				\
-    y = REAL(sy);				\
+#define SETUP_Math2					\
+    na = XLENGTH(sa);					\
+    nb = XLENGTH(sb);					\
+    if ((na == 0) || (nb == 0))	{			\
+	PROTECT(sy = allocVector(REALSXP, 0));		\
+	if (na == 0) SHALLOW_DUPLICATE_ATTRIB(sy, sa);	\
+	UNPROTECT(1);					\
+	return(sy);					\
+    }							\
+    n = (na < nb) ? nb : na;				\
+    PROTECT(sa = coerceVector(sa, REALSXP));		\
+    PROTECT(sb = coerceVector(sb, REALSXP));		\
+    PROTECT(sy = allocVector(REALSXP, n));		\
+    a = REAL(sa);					\
+    b = REAL(sb);					\
+    y = REAL(sy);					\
     naflag = 0
 
-#define FINISH_Math2				\
-    if(naflag) warning(R_MSG_NA);		\
-    if (n == na)  DUPLICATE_ATTRIB(sy, sa);	\
-    else if (n == nb) DUPLICATE_ATTRIB(sy, sb);	\
+#define FINISH_Math2					\
+    if(naflag) warning(R_MSG_NA);			\
+    if (n == na)  SHALLOW_DUPLICATE_ATTRIB(sy, sa);	\
+    else if (n == nb) SHALLOW_DUPLICATE_ATTRIB(sy, sb);	\
     UNPROTECT(3)
 
 #define if_NA_Math2_set(y,a,b)				\
@@ -135,37 +135,35 @@ static SEXP math2_2(SEXP sa, SEXP sb, SEXP sI1, SEXP sI2,
     return sy;
 } /* math2_2() */
 
-#define Math2_1(A, FUN)	math2_1(CAR(A), CADR(A), CADDR(A), FUN)
-#define Math2_2(A, FUN) math2_2(CAR(A), CADR(A), CADDR(A), CADDDR(A), FUN)
+#define DEFMATH2_1(name) \
+    SEXP do_##name(SEXP sa, SEXP sb, SEXP sI) { \
+        return math2_1(sa, sb, sI, name); \
+    }
 
-SEXP distn2(SEXP args)
-{
-    if (!isVectorList(CAR(args))) error("incorrect usage");
-    const char *dn = CHAR(STRING_ELT(getListElement(CAR(args), "name"), 0));
-    args = CDR(args);
-
-    if (streql(dn, "dchisq")) return Math2_1(args, dchisq);
-    else if (streql(dn, "pchisq")) return Math2_2(args, pchisq);
-    else if (streql(dn, "qchisq")) return Math2_2(args, qchisq);
-    else if (streql(dn, "dexp")) return Math2_1(args, dexp);
-    else if (streql(dn, "pexp")) return Math2_2(args, pexp);
-    else if (streql(dn, "qexp")) return Math2_2(args, qexp);
-    else if (streql(dn, "dgeom")) return Math2_1(args, dgeom);
-    else if (streql(dn, "pgeom")) return Math2_2(args, pgeom);
-    else if (streql(dn, "qgeom")) return Math2_2(args, qgeom);
-    else if (streql(dn, "dpois")) return Math2_1(args, dpois);
-    else if (streql(dn, "ppois")) return Math2_2(args, ppois);
-    else if (streql(dn, "qpois")) return Math2_2(args, qpois);
-    else if (streql(dn, "dt")) return Math2_1(args, dt);
-    else if (streql(dn, "pt")) return Math2_2(args, pt);
-    else if (streql(dn, "qt")) return Math2_2(args, qt);
-    else if (streql(dn, "dsignrank")) return Math2_1(args, dsignrank);
-    else if (streql(dn, "psignrank")) return Math2_2(args, psignrank);
-    else if (streql(dn, "qsignrank")) return Math2_2(args, qsignrank);
-    else error("unknown distribution %s", dn);
-    return R_NilValue;
-}
+DEFMATH2_1(dchisq)
+DEFMATH2_1(dexp)
+DEFMATH2_1(dgeom)
+DEFMATH2_1(dpois)
+DEFMATH2_1(dt)
+DEFMATH2_1(dsignrank)
 
+#define DEFMATH2_2(name) \
+    SEXP do_##name(SEXP sa, SEXP sb, SEXP sI, SEXP sJ) { \
+        return math2_2(sa, sb, sI, sJ, name); \
+    }
+
+DEFMATH2_2(pchisq)
+DEFMATH2_2(qchisq)
+DEFMATH2_2(pexp)
+DEFMATH2_2(qexp)
+DEFMATH2_2(pgeom)
+DEFMATH2_2(qgeom)
+DEFMATH2_2(ppois)
+DEFMATH2_2(qpois)
+DEFMATH2_2(pt)
+DEFMATH2_2(qt)
+DEFMATH2_2(psignrank)
+DEFMATH2_2(qsignrank)
 
 /* Mathematical Functions of Three (Real) Arguments */
 
@@ -201,12 +199,12 @@ SEXP distn2(SEXP args)
     y = REAL(sy);						\
     naflag = 0
 
-#define FINISH_Math3				\
-    if(naflag)  warning(R_MSG_NA);		\
-						\
-    if (n == na) DUPLICATE_ATTRIB(sy, sa);	\
-    else if (n == nb) DUPLICATE_ATTRIB(sy, sb);	\
-    else if (n == nc) DUPLICATE_ATTRIB(sy, sc);	\
+#define FINISH_Math3					\
+    if(naflag)  warning(R_MSG_NA);			\
+    							\
+    if (n == na) SHALLOW_DUPLICATE_ATTRIB(sy, sa);	\
+    else if (n == nb) SHALLOW_DUPLICATE_ATTRIB(sy, sb);	\
+    else if (n == nc) SHALLOW_DUPLICATE_ATTRIB(sy, sc);	\
     UNPROTECT(4)
 
 static SEXP math3_1(SEXP sa, SEXP sb, SEXP sc, SEXP sI,
@@ -266,63 +264,62 @@ static SEXP math3_2(SEXP sa, SEXP sb, SEXP sc, SEXP sI, SEXP sJ,
     return sy;
 } /* math3_2 */
 
-#define Math3_1(A, FUN)	math3_1(CAR(A), CADR(A), CADDR(A), CADDDR(A), FUN)
-#define Math3_2(A, FUN) math3_2(CAR(A), CADR(A), CADDR(A), CADDDR(A), CAD4R(A), FUN)
+#define DEFMATH3_1(name) \
+    SEXP do_##name(SEXP sa, SEXP sb, SEXP sc, SEXP sI) { \
+        return math3_1(sa, sb, sc, sI, name); \
+    }
 
-SEXP distn3(SEXP args)
-{
-    if (!isVectorList(CAR(args))) error("incorrect usage");
-    const char *dn = CHAR(STRING_ELT(getListElement(CAR(args), "name"), 0));
-    args = CDR(args);
-
-    if (streql(dn, "dbeta")) return Math3_1(args, dbeta);
-    else if (streql(dn, "pbeta")) return Math3_2(args, pbeta);
-    else if (streql(dn, "qbeta")) return Math3_2(args, qbeta);
-    else if (streql(dn, "dbinom")) return Math3_1(args, dbinom);
-    else if (streql(dn, "pbinom")) return Math3_2(args, pbinom);
-    else if (streql(dn, "qbinom")) return Math3_2(args, qbinom);
-    else if (streql(dn, "dcauchy")) return Math3_1(args, dcauchy);
-    else if (streql(dn, "pcauchy")) return Math3_2(args, pcauchy);
-    else if (streql(dn, "qcauchy")) return Math3_2(args, qcauchy);
-    else if (streql(dn, "df")) return Math3_1(args, df);
-    else if (streql(dn, "pf")) return Math3_2(args, pf);
-    else if (streql(dn, "qf")) return Math3_2(args, qf);
-    else if (streql(dn, "dgamma")) return Math3_1(args, dgamma);
-    else if (streql(dn, "pgamma")) return Math3_2(args, pgamma);
-    else if (streql(dn, "qgamma")) return Math3_2(args, qgamma);
-    else if (streql(dn, "dlnorm")) return Math3_1(args, dlnorm);
-    else if (streql(dn, "plnorm")) return Math3_2(args, plnorm);
-    else if (streql(dn, "qlnorm")) return Math3_2(args, qlnorm);
-    else if (streql(dn, "dlogis")) return Math3_1(args, dlogis);
-    else if (streql(dn, "plogis")) return Math3_2(args, plogis);
-    else if (streql(dn, "qlogis")) return Math3_2(args, qlogis);
-    else if (streql(dn, "dnbinom")) return Math3_1(args, dnbinom);
-    else if (streql(dn, "pnbinom")) return Math3_2(args, pnbinom);
-    else if (streql(dn, "qnbinom")) return Math3_2(args, qnbinom);
-    else if (streql(dn, "dnbinom_mu")) return Math3_1(args, dnbinom_mu);
-    else if (streql(dn, "pnbinom_mu")) return Math3_2(args, pnbinom_mu);
-    else if (streql(dn, "qnbinom_mu")) return Math3_2(args, qnbinom_mu);
-    else if (streql(dn, "dnorm")) return Math3_1(args, dnorm);
-    else if (streql(dn, "pnorm")) return Math3_2(args, pnorm);
-    else if (streql(dn, "qnorm")) return Math3_2(args, qnorm);
-    else if (streql(dn, "dweibull")) return Math3_1(args, dweibull);
-    else if (streql(dn, "pweibull")) return Math3_2(args, pweibull);
-    else if (streql(dn, "qweibull")) return Math3_2(args, qweibull);
-    else if (streql(dn, "dunif")) return Math3_1(args, dunif);
-    else if (streql(dn, "punif")) return Math3_2(args, punif);
-    else if (streql(dn, "qunif")) return Math3_2(args, qunif);
-    else if (streql(dn, "dnt")) return Math3_1(args, dnt);
-    else if (streql(dn, "pnt")) return Math3_2(args, pnt);
-    else if (streql(dn, "qnt")) return Math3_2(args, qnt);
-    else if (streql(dn, "dnchisq")) return Math3_1(args, dnchisq);
-    else if (streql(dn, "pnchisq")) return Math3_2(args, pnchisq);
-    else if (streql(dn, "qnchisq")) return Math3_2(args, qnchisq);
-    else if (streql(dn, "dwilcox")) return Math3_1(args, dwilcox);
-    else if (streql(dn, "pwilcox")) return Math3_2(args, pwilcox);
-    else if (streql(dn, "qwilcox")) return Math3_2(args, qwilcox);
-    else error("unknown distribution %s", dn);
-    return R_NilValue;
-}
+DEFMATH3_1(dbeta)
+DEFMATH3_1(dbinom)
+DEFMATH3_1(dcauchy)
+DEFMATH3_1(df)
+DEFMATH3_1(dgamma)
+DEFMATH3_1(dlnorm)
+DEFMATH3_1(dlogis)
+DEFMATH3_1(dnbinom)
+DEFMATH3_1(dnbinom_mu)
+DEFMATH3_1(dnorm)
+DEFMATH3_1(dweibull)
+DEFMATH3_1(dunif)
+DEFMATH3_1(dnt)
+DEFMATH3_1(dnchisq)
+DEFMATH3_1(dwilcox)
+
+#define DEFMATH3_2(name) \
+    SEXP do_##name(SEXP sa, SEXP sb, SEXP sc, SEXP sI, SEXP sJ) { \
+        return math3_2(sa, sb, sc, sI, sJ, name); \
+    }
+
+DEFMATH3_2(pbeta)
+DEFMATH3_2(qbeta)
+DEFMATH3_2(pbinom)
+DEFMATH3_2(qbinom)
+DEFMATH3_2(pcauchy)
+DEFMATH3_2(qcauchy)
+DEFMATH3_2(pf)
+DEFMATH3_2(qf)
+DEFMATH3_2(pgamma)
+DEFMATH3_2(qgamma)
+DEFMATH3_2(plnorm)
+DEFMATH3_2(qlnorm)
+DEFMATH3_2(plogis)
+DEFMATH3_2(qlogis)
+DEFMATH3_2(pnbinom)
+DEFMATH3_2(qnbinom)
+DEFMATH3_2(pnbinom_mu)
+DEFMATH3_2(qnbinom_mu)
+DEFMATH3_2(pnorm)
+DEFMATH3_2(qnorm)
+DEFMATH3_2(pweibull)
+DEFMATH3_2(qweibull)
+DEFMATH3_2(punif)
+DEFMATH3_2(qunif)
+DEFMATH3_2(pnt)
+DEFMATH3_2(qnt)
+DEFMATH3_2(pnchisq)
+DEFMATH3_2(qnchisq)
+DEFMATH3_2(pwilcox)
+DEFMATH3_2(qwilcox)
 
 /* Mathematical Functions of Four (Real) Arguments */
 
@@ -363,13 +360,13 @@ SEXP distn3(SEXP args)
     y = REAL(sy);							\
     naflag = 0
 
-#define FINISH_Math4				\
-    if(naflag) warning(R_MSG_NA);		\
-						\
-    if (n == na) DUPLICATE_ATTRIB(sy, sa);	\
-    else if (n == nb) DUPLICATE_ATTRIB(sy, sb);	\
-    else if (n == nc) DUPLICATE_ATTRIB(sy, sc);	\
-    else if (n == nd) DUPLICATE_ATTRIB(sy, sd);	\
+#define FINISH_Math4					\
+    if(naflag) warning(R_MSG_NA);			\
+    							\
+    if (n == na) SHALLOW_DUPLICATE_ATTRIB(sy, sa);	\
+    else if (n == nb) SHALLOW_DUPLICATE_ATTRIB(sy, sb);	\
+    else if (n == nc) SHALLOW_DUPLICATE_ATTRIB(sy, sc);	\
+    else if (n == nd) SHALLOW_DUPLICATE_ATTRIB(sy, sd);	\
     UNPROTECT(5)
 
 static SEXP math4_1(SEXP sa, SEXP sb, SEXP sc, SEXP sd, SEXP sI, double (*f)(double, double, double, double, int))
@@ -428,36 +425,28 @@ static SEXP math4_2(SEXP sa, SEXP sb, SEXP sc, SEXP sd, SEXP sI, SEXP sJ,
     return sy;
 } /* math4_2() */
 
+#define DEFMATH4_1(name) \
+    SEXP do_##name(SEXP sa, SEXP sb, SEXP sc, SEXP sd, SEXP sI) { \
+        return math4_1(sa, sb, sc, sd, sI, name); \
+    }
 
-#define CAD3R	CADDDR
-/* This is not (yet) in Rinternals.h : */
-#define CAD5R(e)	CAR(CDR(CDR(CDR(CDR(CDR(e))))))
+DEFMATH4_1(dhyper)
+DEFMATH4_1(dnbeta)
+DEFMATH4_1(dnf)
 
-#define Math4_1(A, FUN) math4_1(CAR(A), CADR(A), CADDR(A), CAD3R(A), CAD4R(A), \
-				FUN)
-#define Math4_2(A, FUN) math4_2(CAR(A), CADR(A), CADDR(A), CAD3R(A), CAD4R(A), \
-				CAD5R(A), FUN)
+#define DEFMATH4_2(name) \
+    SEXP do_##name(SEXP sa, SEXP sb, SEXP sc, SEXP sd, SEXP sI, SEXP sJ) { \
+        return math4_2(sa, sb, sc, sd, sI, sJ, name); \
+    }
 
-SEXP distn4(SEXP args)
-{
-    if (!isVectorList(CAR(args))) error("incorrect usage");
-    const char *dn = CHAR(STRING_ELT(getListElement(CAR(args), "name"), 0));
-    args = CDR(args);
-
-    if (streql(dn, "dhyper")) return Math4_1(args, dhyper);
-    else if (streql(dn, "phyper")) return Math4_2(args, phyper);
-    else if (streql(dn, "qhyper")) return Math4_2(args, qhyper);
-    else if (streql(dn, "dnbeta")) return Math4_1(args, dnbeta);
-    else if (streql(dn, "pnbeta")) return Math4_2(args, pnbeta);
-    else if (streql(dn, "qnbeta")) return Math4_2(args, qnbeta);
-    else if (streql(dn, "dnf")) return Math4_1(args, dnf);
-    else if (streql(dn, "pnf")) return Math4_2(args, pnf);
-    else if (streql(dn, "qnf")) return Math4_2(args, qnf);
-    else if (streql(dn, "ptukey")) return Math4_2(args, ptukey);
-    else if (streql(dn, "qtukey")) return Math4_2(args, qtukey);
-    else error("unknown distribution %s", dn);
-    return R_NilValue;
-}
+DEFMATH4_2(phyper)
+DEFMATH4_2(qhyper)
+DEFMATH4_2(pnbeta)
+DEFMATH4_2(qnbeta)
+DEFMATH4_2(pnf)
+DEFMATH4_2(qnf)
+DEFMATH4_2(ptukey)
+DEFMATH4_2(qtukey)
 
 /* These are here to get them in the correct package */
 
diff --git a/src/library/stats/src/eureka.f b/src/library/stats/src/eureka.f
index 09b6ad6..8397d8e 100644
--- a/src/library/stats/src/eureka.f
+++ b/src/library/stats/src/eureka.f
@@ -16,7 +16,7 @@ c  GNU General Public License for more details.
 c
 c  You should have received a copy of the GNU General Public License
 c  along with this program; if not, a copy is available at
-c  http://www.r-project.org/Licenses/
+c  https://www.R-project.org/Licenses/
 c
 c-----------------------------------------------------------------------
 c
@@ -46,13 +46,15 @@ c
             hold = a(j)
             k = l - j + 1
             a(j) = a(j) + a(l)*a(k)
-   10       a(k) = a(k) + a(l)*hold
+            a(k) = a(k) + a(l)*hold
+   10       continue
           if (2*l1 .ne. l - 2) a(l2+1) = a(l2+1)*(1.0d0 + a(l))
         endif
         v = v + a(l)*d
         f(l,l) = (g(l+1) - q)/v
         do 40 j = 1, l-1
-   40     f(l,j) = f(l-1, j) + f(l, l)*a(l-j+1)
+          f(l,j) = f(l-1, j) + f(l, l)*a(l-j+1)
+   40     continue
 c  estimate the innovations variance
         var(l) = var(l-1) * (1 - f(l,l)*f(l,l))
         if (l .eq. lr) return
@@ -61,7 +63,8 @@ c  estimate the innovations variance
         do 50 i = 1, l
           k = l-i+2
           d = d + a(i)*r(k)
-   50     q = q + f(l,i)*r(k)
+          q = q + f(l,i)*r(k)
+   50     continue
    60   continue
       return
       end
diff --git a/src/library/stats/src/family.c b/src/library/stats/src/family.c
index a5e17e1..ab96566 100644
--- a/src/library/stats/src/family.c
+++ b/src/library/stats/src/family.c
@@ -1,6 +1,6 @@
 /*
  *  R : A Computer Language for Statistical Data Analysis
- *  Copyright (C) 2005-10  The R Core Team
+ *  Copyright (C) 2005-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
@@ -14,7 +14,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  *
  *  Quartz Quartz device module header file
  *
@@ -24,6 +24,7 @@
 #include <Rconfig.h>
 #include <R_ext/Constants.h>
 #include <float.h>
+#include <math.h>
 #include "stats.h"
 #include "statsR.h"
 
@@ -58,7 +59,7 @@ static R_INLINE double x_d_opx(double x) {return x/(1 + x);}
 SEXP logit_link(SEXP mu)
 {
     int i, n = LENGTH(mu);
-    SEXP ans = PROTECT(duplicate(mu));
+    SEXP ans = PROTECT(shallow_duplicate(mu));
     double *rans = REAL(ans), *rmu=REAL(mu);
 
     if (!n || !isReal(mu))
@@ -71,7 +72,7 @@ SEXP logit_link(SEXP mu)
 
 SEXP logit_linkinv(SEXP eta)
 {
-    SEXP ans = PROTECT(duplicate(eta));
+    SEXP ans = PROTECT(shallow_duplicate(eta));
     int i, n = LENGTH(eta);
     double *rans = REAL(ans), *reta = REAL(eta);
 
@@ -89,7 +90,7 @@ SEXP logit_linkinv(SEXP eta)
 
 SEXP logit_mu_eta(SEXP eta)
 {
-    SEXP ans = PROTECT(duplicate(eta));
+    SEXP ans = PROTECT(shallow_duplicate(eta));
     int i, n = LENGTH(eta);
     double *rans = REAL(ans), *reta = REAL(eta);
 
@@ -109,7 +110,7 @@ SEXP logit_mu_eta(SEXP eta)
 static R_INLINE
 double y_log_y(double y, double mu)
 {
-    return (y) ? (y * log(y/mu)) : 0;
+    return (y != 0.) ? (y * log(y/mu)) : 0;
 }
 
 SEXP binomial_dev_resids(SEXP y, SEXP mu, SEXP wt)
@@ -120,7 +121,7 @@ SEXP binomial_dev_resids(SEXP y, SEXP mu, SEXP wt)
 
     if (!isReal(y)) {y = PROTECT(coerceVector(y, REALSXP)); nprot++;}
     ry = REAL(y);
-    ans = PROTECT(duplicate(y));
+    ans = PROTECT(shallow_duplicate(y));
     rans = REAL(ans);
     if (!isReal(mu)) {mu = PROTECT(coerceVector(mu, REALSXP)); nprot++;}
     if (!isReal(wt)) {wt = PROTECT(coerceVector(wt, REALSXP)); nprot++;}
diff --git a/src/library/stats/src/fexact.c b/src/library/stats/src/fexact.c
index d54bed9..7d9c64a 100644
--- a/src/library/stats/src/fexact.c
+++ b/src/library/stats/src/fexact.c
@@ -16,7 +16,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  */
 
 /* -*- mode: c; kept-new-versions: 25; kept-old-versions: 20 -*-
@@ -30,9 +30,10 @@
 
 /* <UTF8> chars are handled as whole strings */
 
-#include <R.h>
 #include <stdio.h>
 #include <limits.h>
+#include <math.h>
+#include <R.h>
 
 static void f2xact(int nrow, int ncol, int *table, int ldtabl,
 		   double *expect, double *percnt, double *emin,
@@ -63,7 +64,7 @@ static double f9xact(int n, int ntot, int *ir, double *fact);
 static Rboolean f10act(int nrow, int *irow, int ncol, int *icol, double *val,
 		       double *fact, int *nd, int *ne, int *m);
 static void f11act(int *irow, int i1, int i2, int *new);
-static void prterr(int icode, const char *mes);
+static void NORET prterr(int icode, const char *mes);
 static int iwork(int iwkmax, int *iwkpt, int number, int itype);
 
 #ifdef USING_R
@@ -1799,7 +1800,7 @@ void f11act(int *irow, int i1, int i2, int *new)
 }
 
 
-void prterr(int icode, const char *mes)
+void NORET prterr(int icode, const char *mes)
 {
 /*
   -----------------------------------------------------------------------
@@ -1812,7 +1813,6 @@ void prterr(int icode, const char *mes)
   -----------------------------------------------------------------------
   */
     PROBLEM "FEXACT error %d.\n%s", icode, mes RECOVER(NULL_ENTRY);
-    return;
 }
 
 int iwork(int iwkmax, int *iwkpt, int number, int itype)
diff --git a/src/library/stats/src/fft.c b/src/library/stats/src/fft.c
index 8c813c9..451bd8d 100644
--- a/src/library/stats/src/fft.c
+++ b/src/library/stats/src/fft.c
@@ -15,7 +15,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  */
 
 #ifdef HAVE_CONFIG_H
diff --git a/src/library/stats/src/filter.c b/src/library/stats/src/filter.c
index 6498447..47214b3 100644
--- a/src/library/stats/src/filter.c
+++ b/src/library/stats/src/filter.c
@@ -1,7 +1,7 @@
 /*
  *  R : A Computer Language for Statistical Data Analysis
 
- *  Copyright (C) 1999-12   The R Core Team
+ *  Copyright (C) 1999-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
@@ -15,14 +15,12 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/.
+ *  https://www.R-project.org/Licenses/.
  */
 
 #ifdef HAVE_CONFIG_H
 # include <config.h>
 #endif
-/* do this first to get the right options for math.h */
-#include <R_ext/Arith.h>
 
 #include <R.h>
 #include "ts.h"
@@ -109,16 +107,14 @@ SEXP rfilter(SEXP x, SEXP filter, SEXP out)
 
 /* now allows missing values */
 static void
-acf0(double *x, int n, int ns, int nl, int correlation, double *acf)
+acf0(double *x, int n, int ns, int nl, Rboolean correlation, double *acf)
 {
-    int d1 = nl+1, d2 = ns*d1, nu;
-    double sum, *se;
+    int d1 = nl+1, d2 = ns*d1;
 
-    se = (double *) R_alloc(ns, sizeof(double));
     for(int u = 0; u < ns; u++)
 	for(int v = 0; v < ns; v++)
 	    for(int lag = 0; lag <= nl; lag++) {
-		sum = 0.0; nu = 0;
+		double sum = 0.0; int nu = 0;
 		for(int i = 0; i < n-lag; i++)
 		    if(!ISNAN(x[i + lag + n*u]) && !ISNAN(x[i + n*v])) {
 			nu++;
@@ -127,16 +123,19 @@ acf0(double *x, int n, int ns, int nl, int correlation, double *acf)
 		acf[lag + d1*u + d2*v] = (nu > 0) ? sum/(nu + lag) : NA_REAL;
 	    }
     if(correlation) {
-	for(int u = 0; u < ns; u++)
-	    se[u] = sqrt(acf[0 + d1*u + d2*u]);
 	if(n == 1) {
 	    for(int u = 0; u < ns; u++)
 		acf[0 + d1*u + d2*u] = 1.0;
 	} else {
+	    double *se = (double *) R_alloc(ns, sizeof(double));
+	    for(int u = 0; u < ns; u++)
+		se[u] = sqrt(acf[0 + d1*u + d2*u]);
 	    for(int u = 0; u < ns; u++)
 		for(int v = 0; v < ns; v++)
-		    for(int lag = 0; lag <= nl; lag++)
-			acf[lag + d1*u + d2*v] /= se[u]*se[v];
+		    for(int lag = 0; lag <= nl; lag++) { // ensure correlations remain in  [-1,1] :
+			double a = acf[lag + d1*u + d2*v] / (se[u]*se[v]);
+			acf[lag + d1*u + d2*v] = (a > 1.) ? 1. : ((a < -1.) ? -1. : a);
+		    }
 	}
     }
 }
diff --git a/src/library/stats/src/fourier.c b/src/library/stats/src/fourier.c
index a3d332c..3cbea70 100644
--- a/src/library/stats/src/fourier.c
+++ b/src/library/stats/src/fourier.c
@@ -15,7 +15,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  */
 
 /* These are the R interface routines to the plain FFT code
diff --git a/src/library/stats/src/hclust-utils.c b/src/library/stats/src/hclust-utils.c
index 8266f74..49bcd2d 100644
--- a/src/library/stats/src/hclust-utils.c
+++ b/src/library/stats/src/hclust-utils.c
@@ -1,7 +1,7 @@
 /*
  *  R : A Computer Language for Statistical Data Analysis
 
- *  Copyright (C) 1999-2008   The R Core Team
+ *  Copyright (C) 1999-2014   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
@@ -15,7 +15,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/.
+ *  https://www.R-project.org/Licenses/.
  */
 
 #include <R_ext/Boolean.h>
@@ -30,10 +30,10 @@ SEXP cutree(SEXP merge, SEXP which)
     SEXP ans;
     int n, k, l, nclust, m1, m2, j, mm = 0;
     Rboolean found_j, *sing;
-    int *m_nr, *z;
+    int *m_nr, *z, *i_merge, *i_which, *i_ans;
 
-    PROTECT(merge = coerceVector(merge, INTSXP));
-    PROTECT(which = coerceVector(which, INTSXP));
+    PROTECT(merge = coerceVector(merge, INTSXP)); i_merge = INTEGER(merge);
+    PROTECT(which = coerceVector(which, INTSXP)); i_which = INTEGER(which);
 
     n = nrows(merge)+1;
     /* using 1-based indices ==> "--" */
@@ -41,6 +41,7 @@ SEXP cutree(SEXP merge, SEXP which)
     m_nr = (int *) R_alloc(n, sizeof(int)); m_nr--;
     z	 = (int *) R_alloc(n, sizeof(int)); z--;
     PROTECT(ans = allocMatrix(INTSXP, n, LENGTH(which)));
+    i_ans = INTEGER(ans);
 
     for(k = 1; k <= n; k++) {
 	sing[k] = TRUE;/* is k-th obs. still alone in cluster ? */
@@ -49,8 +50,8 @@ SEXP cutree(SEXP merge, SEXP which)
 
     for(k = 1; k <= n-1; k++) {
 	/* k-th merge, from n-k+1 to n-k atoms: (m1,m2) = merge[ k , ] */
-	m1 = INTEGER(merge)[k-1];
-	m2 = INTEGER(merge)[n-1+k-1];
+	m1 = i_merge[k-1];
+	m2 = i_merge[n-1+k-1];
 
 	if(m1 < 0 && m2 < 0) {/* merging atoms [-m1] and [-m2] */
 	    m_nr[-m1] = m_nr[-m2] = k;
@@ -76,7 +77,7 @@ SEXP cutree(SEXP merge, SEXP which)
 	 * if yes, find j (maybe multiple ones): */
 	found_j = FALSE;
 	for(j = 0; j < LENGTH(which); j++) {
-	    if(INTEGER(which)[j] == n - k) {
+	    if(i_which[j] == n - k) {
 		if(!found_j) { /* first match (and usually only one) */
 		    found_j = TRUE;
 		    for(l = 1; l <= n; l++)
@@ -85,17 +86,17 @@ SEXP cutree(SEXP merge, SEXP which)
 		    mm = j*n; /*may want to copy this column of ans[] */
 		    for(l = 1, m1 = mm; l <= n; l++, m1++) {
 			if(sing[l])
-			    INTEGER(ans)[m1] = ++nclust;
+			    i_ans[m1] = ++nclust;
 			else {
 			    if (z[m_nr[l]] == 0)
 				z[m_nr[l]] = ++nclust;
-			    INTEGER(ans)[m1] = z[m_nr[l]];
+			    i_ans[m1] = z[m_nr[l]];
 			}
 		    }
 		}
 		else { /* found_j: another which[j] == n-k : copy column */
 		    for(l = 1, m1 = j*n, m2 = mm; l <= n; l++, m1++, m2++)
-			INTEGER(ans)[m1] = INTEGER(ans)[m2];
+			i_ans[m1] = i_ans[m2];
 		}
 	    } /* if ( match ) */
 	} /* for(j .. which[j] ) */
@@ -103,9 +104,9 @@ SEXP cutree(SEXP merge, SEXP which)
 
     /* Dealing with trivial case which[] = n : */
     for(j = 0; j < LENGTH(which); j++)
-	if(INTEGER(which)[j] == n)
+	if(i_which[j] == n)
 	    for(l = 1, m1 = j*n; l <= n; l++, m1++)
-		INTEGER(ans)[m1] = l;
+		i_ans[m1] = l;
 
     UNPROTECT(3);
     return(ans);
diff --git a/src/library/stats/src/influence.c b/src/library/stats/src/influence.c
index 53ea84c..33d6adc 100644
--- a/src/library/stats/src/influence.c
+++ b/src/library/stats/src/influence.c
@@ -14,7 +14,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  */
 
 #include <R.h>
diff --git a/src/library/stats/src/init.c b/src/library/stats/src/init.c
index becd0ea..472d7cf 100644
--- a/src/library/stats/src/init.c
+++ b/src/library/stats/src/init.c
@@ -1,6 +1,6 @@
 /*
  *  R : A Computer Language for Statistical Data Analysis
- *  Copyright (C) 2001-2012   The R Core Team.
+ *  Copyright (C) 2001-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
@@ -14,12 +14,9 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  */
 
-#include <R.h>
-#include <Rinternals.h>
-
 #include "modreg.h"
 #include "nls.h"
 #include "port.h"
@@ -29,22 +26,37 @@
 #include <R_ext/Rdynload.h>
 #include <R_ext/Visibility.h>
 
+#define C_DEF(name, n)  {#name, (DL_FUNC) &name, n}
+
 static const R_CMethodDef CEntries[]  = {
-    {"loess_raw", (DL_FUNC) &loess_raw, 24},
-    {"loess_dfit", (DL_FUNC) &loess_dfit, 13},
-    {"loess_dfitse", (DL_FUNC) &loess_dfitse, 16},
-    {"loess_ifit", (DL_FUNC) &loess_ifit, 8},
-    {"loess_ise", (DL_FUNC) &loess_ise, 15},
-    {"multi_burg", (DL_FUNC) &multi_burg, 11},
-    {"multi_yw", (DL_FUNC) &multi_yw, 10},
-    {"HoltWinters", (DL_FUNC) &HoltWinters, 17},
-    {"kmeans_Lloyd", (DL_FUNC) &kmeans_Lloyd, 9},
-    {"kmeans_MacQueen", (DL_FUNC) &kmeans_MacQueen, 9},
+    C_DEF(loess_raw, 24),
+    C_DEF(loess_dfit, 13),
+    C_DEF(loess_dfitse, 16),
+    C_DEF(loess_ifit, 8),
+    C_DEF(loess_ise, 15),
+    C_DEF(multi_burg, 11),
+    C_DEF(multi_yw, 10),
+    C_DEF(HoltWinters, 17),
+    C_DEF(kmeans_Lloyd, 9),
+    C_DEF(kmeans_MacQueen, 9),
+    C_DEF(rcont2,  8),
     {NULL, NULL, 0}
 };
 
 #define CALLDEF(name, n)  {#name, (DL_FUNC) &name, n}
 
+#define CALLDEF_DO(name, n) {#name, (DL_FUNC) &do_##name, n}
+#define CALLDEF_MATH2_1(name) CALLDEF_DO(name, 3)
+#define CALLDEF_MATH2_2(name) CALLDEF_DO(name, 4)
+#define CALLDEF_MATH3_1(name) CALLDEF_DO(name, 4)
+#define CALLDEF_MATH3_2(name) CALLDEF_DO(name, 5)
+#define CALLDEF_MATH4_1(name) CALLDEF_DO(name, 5)
+#define CALLDEF_MATH4_2(name) CALLDEF_DO(name, 6)
+
+#define CALLDEF_RAND1(name) CALLDEF_DO(name, 2)
+#define CALLDEF_RAND2(name) CALLDEF_DO(name, 3)
+#define CALLDEF_RAND3(name) CALLDEF_DO(name, 4)
+
 static const R_CallMethodDef CallEntries[] = {
     CALLDEF(cutree, 2),
     CALLDEF(isoreg, 1),
@@ -116,6 +128,7 @@ static const R_CallMethodDef CallEntries[] = {
     CALLDEF(pRho, 3),
     CALLDEF(SWilk, 1),
     CALLDEF(bw_den, 2),
+    CALLDEF(bw_den_binned, 1),
     CALLDEF(bw_ucv, 4),
     CALLDEF(bw_bcv, 4),
     CALLDEF(bw_phi4, 4),
@@ -130,13 +143,119 @@ static const R_CallMethodDef CallEntries[] = {
     CALLDEF(Fisher_sim, 3),
     CALLDEF(chisq_sim, 4),
     CALLDEF(d2x2xk, 5),
+
+    CALLDEF_MATH2_1(dchisq),
+    CALLDEF_MATH2_1(dexp),
+    CALLDEF_MATH2_1(dgeom),
+    CALLDEF_MATH2_1(dpois),
+    CALLDEF_MATH2_1(dt),
+    CALLDEF_MATH2_1(dsignrank),
+    CALLDEF_MATH2_2(pchisq),
+    CALLDEF_MATH2_2(qchisq),
+    CALLDEF_MATH2_2(pexp),
+    CALLDEF_MATH2_2(qexp),
+    CALLDEF_MATH2_2(pgeom),
+    CALLDEF_MATH2_2(qgeom),
+    CALLDEF_MATH2_2(ppois),
+    CALLDEF_MATH2_2(qpois),
+    CALLDEF_MATH2_2(pt),
+    CALLDEF_MATH2_2(qt),
+    CALLDEF_MATH2_2(psignrank),
+    CALLDEF_MATH2_2(qsignrank),
+
+    CALLDEF_MATH3_1(dbeta),
+    CALLDEF_MATH3_1(dbinom),
+    CALLDEF_MATH3_1(dcauchy),
+    CALLDEF_MATH3_1(df),
+    CALLDEF_MATH3_1(dgamma),
+    CALLDEF_MATH3_1(dlnorm),
+    CALLDEF_MATH3_1(dlogis),
+    CALLDEF_MATH3_1(dnbinom),
+    CALLDEF_MATH3_1(dnbinom_mu),
+    CALLDEF_MATH3_1(dnorm),
+    CALLDEF_MATH3_1(dweibull),
+    CALLDEF_MATH3_1(dunif),
+    CALLDEF_MATH3_1(dnt),
+    CALLDEF_MATH3_1(dnchisq),
+    CALLDEF_MATH3_1(dwilcox),
+    CALLDEF_MATH3_2(pbeta),
+    CALLDEF_MATH3_2(qbeta),
+    CALLDEF_MATH3_2(pbinom),
+    CALLDEF_MATH3_2(qbinom),
+    CALLDEF_MATH3_2(pcauchy),
+    CALLDEF_MATH3_2(qcauchy),
+    CALLDEF_MATH3_2(pf),
+    CALLDEF_MATH3_2(qf),
+    CALLDEF_MATH3_2(pgamma),
+    CALLDEF_MATH3_2(qgamma),
+    CALLDEF_MATH3_2(plnorm),
+    CALLDEF_MATH3_2(qlnorm),
+    CALLDEF_MATH3_2(plogis),
+    CALLDEF_MATH3_2(qlogis),
+    CALLDEF_MATH3_2(pnbinom),
+    CALLDEF_MATH3_2(qnbinom),
+    CALLDEF_MATH3_2(pnbinom_mu),
+    CALLDEF_MATH3_2(qnbinom_mu),
+    CALLDEF_MATH3_2(pnorm),
+    CALLDEF_MATH3_2(qnorm),
+    CALLDEF_MATH3_2(pweibull),
+    CALLDEF_MATH3_2(qweibull),
+    CALLDEF_MATH3_2(punif),
+    CALLDEF_MATH3_2(qunif),
+    CALLDEF_MATH3_2(pnt),
+    CALLDEF_MATH3_2(qnt),
+    CALLDEF_MATH3_2(pnchisq),
+    CALLDEF_MATH3_2(qnchisq),
+    CALLDEF_MATH3_2(pwilcox),
+    CALLDEF_MATH3_2(qwilcox),
+        // {"qnbinom_mu", (DL_FUNC) &distn3, 5},  // exists but currently unused
+
+    CALLDEF_MATH4_1(dhyper),
+    CALLDEF_MATH4_1(dnbeta),
+    CALLDEF_MATH4_1(dnf),
+    CALLDEF_MATH4_2(phyper),
+    CALLDEF_MATH4_2(qhyper),
+    CALLDEF_MATH4_2(pnbeta),
+    CALLDEF_MATH4_2(qnbeta),
+    CALLDEF_MATH4_2(pnf),
+    CALLDEF_MATH4_2(qnf),
+    CALLDEF_MATH4_2(ptukey),
+    CALLDEF_MATH4_2(qtukey),
+
+    CALLDEF_RAND1(rchisq),
+    CALLDEF_RAND1(rexp),
+    CALLDEF_RAND1(rgeom),
+    CALLDEF_RAND1(rpois),
+    CALLDEF_RAND1(rt),
+    CALLDEF_RAND1(rsignrank),
+
+    CALLDEF_RAND2(rbeta),
+    CALLDEF_RAND2(rbinom),
+    CALLDEF_RAND2(rcauchy),
+    CALLDEF_RAND2(rf),
+    CALLDEF_RAND2(rgamma),
+    CALLDEF_RAND2(rlnorm),
+    CALLDEF_RAND2(rlogis),
+    CALLDEF_RAND2(rnbinom),
+    CALLDEF_RAND2(rnorm),
+    CALLDEF_RAND2(runif),
+    CALLDEF_RAND2(rweibull),
+    CALLDEF_RAND2(rwilcox),
+    CALLDEF_RAND2(rnchisq),
+    CALLDEF_RAND2(rnbinom_mu),
+
+    CALLDEF_RAND3(rhyper),
+
+    CALLDEF_DO(rmultinom, 3),
+
     {NULL, NULL, 0}
 };
 
-#define FDEF(name)  {#name, (DL_FUNC) &F77_SUB(name), sizeof(name ## _t)/sizeof(name ## _t[0]), name ##_t}
+#define FDEF(name)  {#name, (DL_FUNC) &F77_NAME(name), sizeof(name ## _t)/sizeof(name ## _t[0]), name ##_t}
 
 
-static R_NativePrimitiveArgType lowesw_t[] = { REALSXP, INTSXP, REALSXP, INTSXP};
+static R_NativePrimitiveArgType lowesw_t[] = {
+    REALSXP, INTSXP, REALSXP, INTSXP};
 static R_NativePrimitiveArgType lowesp_t[] = {
     INTSXP, REALSXP, REALSXP, REALSXP, REALSXP, INTSXP, REALSXP};
 
@@ -144,18 +263,18 @@ static R_NativePrimitiveArgType lowesp_t[] = {
 static const R_FortranMethodDef FortEntries[] = {
     FDEF(lowesw),
     FDEF(lowesp),
-    {"setppr", (DL_FUNC) &F77_SUB(setppr), 6},
-    {"smart", (DL_FUNC) &F77_SUB(smart), 16},
-    {"pppred", (DL_FUNC) &F77_SUB(pppred), 5},
-    {"setsmu", (DL_FUNC) &F77_SUB(setsmu), 0},
-    {"rbart", (DL_FUNC) &F77_SUB(rbart), 20},
-    {"bvalus", (DL_FUNC) &F77_SUB(bvalus), 7},
-    {"supsmu", (DL_FUNC) &F77_SUB(supsmu), 10},
-    {"hclust", (DL_FUNC) &F77_SUB(hclust), 11},
-    {"hcass2", (DL_FUNC) &F77_SUB(hcass2), 6},
-    {"kmns", (DL_FUNC) &F77_SUB(kmns), 17},
-    {"eureka", (DL_FUNC) &F77_SUB(eureka), 6},
-    {"stl", (DL_FUNC) &F77_SUB(stl), 18},
+    {"setppr", (DL_FUNC) &F77_NAME(setppr),  6},
+    {"smart",  (DL_FUNC) &F77_NAME(smart),  16},
+    {"pppred", (DL_FUNC) &F77_NAME(pppred),  5},
+    {"setsmu", (DL_FUNC) &F77_NAME(setsmu),  1},
+    {"rbart",  (DL_FUNC) &F77_NAME(rbart),  20},
+    {"bvalus", (DL_FUNC) &F77_NAME(bvalus),  7},
+    {"supsmu", (DL_FUNC) &F77_NAME(supsmu), 10},
+    {"hclust", (DL_FUNC) &F77_NAME(hclust), 11},
+    {"hcass2", (DL_FUNC) &F77_NAME(hcass2),  6},
+    {"kmns",   (DL_FUNC) &F77_NAME(kmns),   17},
+    {"eureka", (DL_FUNC) &F77_NAME(eureka),  6},
+    {"stl",    (DL_FUNC) &F77_NAME(stl),    18},
     {NULL, NULL, 0}
 };
 
@@ -176,109 +295,6 @@ static const R_ExternalMethodDef ExtEntries[] = {
     EXTDEF(call_dqags, 7),
     EXTDEF(call_dqagi, 7),
 
-    // 1-arg distributions
-    {"dchisq", (DL_FUNC) &distn2, 3},
-    {"pchisq", (DL_FUNC) &distn2, 4},
-    {"qchisq", (DL_FUNC) &distn2, 4},
-    {"rchisq", (DL_FUNC) &Random1, 2},
-    {"dexp", (DL_FUNC) &distn2, 3},
-    {"pexp", (DL_FUNC) &distn2, 4},
-    {"qexp", (DL_FUNC) &distn2, 4},
-    {"rexp", (DL_FUNC) &Random1, 2},
-    {"dgeom", (DL_FUNC) &distn2, 3},
-    {"pgeom", (DL_FUNC) &distn2, 4},
-    {"qgeom", (DL_FUNC) &distn2, 4},
-    {"rgeom", (DL_FUNC) &Random1, 2},
-    {"dpois", (DL_FUNC) &distn2, 3},
-    {"ppois", (DL_FUNC) &distn2, 4},
-    {"qpois", (DL_FUNC) &distn2, 4},
-    {"rpois", (DL_FUNC) &Random1, 2},
-    {"dt", (DL_FUNC) &distn2, 3},
-    {"pt", (DL_FUNC) &distn2, 4},
-    {"qt", (DL_FUNC) &distn2, 4},
-    {"rt", (DL_FUNC) &Random1, 2},
-    {"dsignrank", (DL_FUNC) &distn2, 3},
-    {"psignrank", (DL_FUNC) &distn2, 4},
-    {"qsignrank", (DL_FUNC) &distn2, 4},
-    {"rsignrank", (DL_FUNC) &Random1, 2},
-
-    // 2-arg distributions
-    {"dbeta", (DL_FUNC) &distn3, 4},
-    {"pbeta", (DL_FUNC) &distn3, 5},
-    {"qbeta", (DL_FUNC) &distn3, 5},
-    {"rbeta", (DL_FUNC) &Random2, 3},
-    {"dbinom", (DL_FUNC) &distn3, 4},
-    {"pbinom", (DL_FUNC) &distn3, 5},
-    {"qbinom", (DL_FUNC) &distn3, 5},
-    {"rbinom", (DL_FUNC) &Random2, 3},
-    {"dcauchy", (DL_FUNC) &distn3, 4},
-    {"pcauchy", (DL_FUNC) &distn3, 5},
-    {"qcauchy", (DL_FUNC) &distn3, 5},
-    {"rcauchy", (DL_FUNC) &Random2, 3},
-    {"df", (DL_FUNC) &distn3, 4},
-    {"pf", (DL_FUNC) &distn3, 5},
-    {"qf", (DL_FUNC) &distn3, 5},
-    {"rf", (DL_FUNC) &Random2, 3},
-    {"dgamma", (DL_FUNC) &distn3, 4},
-    {"pgamma", (DL_FUNC) &distn3, 5},
-    {"qgamma", (DL_FUNC) &distn3, 5},
-    {"rgamma", (DL_FUNC) &Random2, 3},
-    {"dlnorm", (DL_FUNC) &distn3, 4},
-    {"plnorm", (DL_FUNC) &distn3, 5},
-    {"qlnorm", (DL_FUNC) &distn3, 5},
-    {"rlnorm", (DL_FUNC) &Random2, 3},
-    {"dlogis", (DL_FUNC) &distn3, 4},
-    {"plogis", (DL_FUNC) &distn3, 5},
-    {"qlogis", (DL_FUNC) &distn3, 5},
-    {"rlogis", (DL_FUNC) &Random2, 3},
-    {"dnbinom", (DL_FUNC) &distn3, 4},
-    {"pnbinom", (DL_FUNC) &distn3, 5},
-    {"qnbinom", (DL_FUNC) &distn3, 5},
-    {"rnbinom", (DL_FUNC) &Random2, 3},
-    {"dnbinom_mu", (DL_FUNC) &distn3, 4},
-    {"pnbinom_mu", (DL_FUNC) &distn3, 5},
-    {"qnbinom_mu", (DL_FUNC) &distn3, 5},  // exists but currently unused
-    {"rnbinom_mu", (DL_FUNC) &Random2, 3},
-    {"dnchisq", (DL_FUNC) &distn3, 4},
-    {"pnchisq", (DL_FUNC) &distn3, 5},
-    {"qnchisq", (DL_FUNC) &distn3, 5},
-    {"rnchisq", (DL_FUNC) &Random2, 3},
-    {"dnorm", (DL_FUNC) &distn3, 4},
-    {"pnorm", (DL_FUNC) &distn3, 5},
-    {"qnorm", (DL_FUNC) &distn3, 5},
-    {"rnorm", (DL_FUNC) &Random2, 3},
-    {"dnt", (DL_FUNC) &distn3, 4},
-    {"pnt", (DL_FUNC) &distn3, 5},
-    {"qnt", (DL_FUNC) &distn3, 5},
-    {"ptukey", (DL_FUNC) &distn4, 6},
-    {"qtukey", (DL_FUNC) &distn4, 6},
-    {"dunif", (DL_FUNC) &distn3, 4},
-    {"punif", (DL_FUNC) &distn3, 5},
-    {"qunif", (DL_FUNC) &distn3, 5},
-    {"runif", (DL_FUNC) &Random2, 3},
-    {"dweibull", (DL_FUNC) &distn3, 4},
-    {"pweibull", (DL_FUNC) &distn3, 5},
-    {"qweibull", (DL_FUNC) &distn3, 5},
-    {"rweibull", (DL_FUNC) &Random2, 3},
-    {"dwilcox", (DL_FUNC) &distn3, 4},
-    {"pwilcox", (DL_FUNC) &distn3, 5},
-    {"qwilcox", (DL_FUNC) &distn3, 5},
-    {"rwilcox", (DL_FUNC) &Random2, 3},
-
-    // 3-arg distributions
-    {"dhyper", (DL_FUNC) &distn4, 5},
-    {"phyper", (DL_FUNC) &distn4, 6},
-    {"qhyper", (DL_FUNC) &distn4, 6},
-    {"rhyper", (DL_FUNC) &Random3, 4},
-    {"dnbeta", (DL_FUNC) &distn4, 5},
-    {"pnbeta", (DL_FUNC) &distn4, 6},
-    {"qnbeta", (DL_FUNC) &distn4, 6},
-    {"dnf", (DL_FUNC) &distn4, 5},
-    {"pnf", (DL_FUNC) &distn4, 6},
-    {"qnf", (DL_FUNC) &distn4, 6},
-
-    {"rmultinom", (DL_FUNC) &Rmultinom, 3},
-
     {"signrank_free", (DL_FUNC) &stats_signrank_free, 0},
     {"wilcox_free", (DL_FUNC) &stats_wilcox_free, 0},
     {NULL, NULL, 0}
@@ -294,4 +310,5 @@ void attribute_visible R_init_stats(DllInfo *dll)
     R_RegisterCCallable("stats", "nlminb_iterate", (DL_FUNC) nlminb_iterate);
     R_RegisterCCallable("stats", "nlsb_iterate", (DL_FUNC) nlsb_iterate);
     R_RegisterCCallable("stats", "Rf_divset", (DL_FUNC) Rf_divset);
+    R_RegisterCCallable("stats", "rcont2", (DL_FUNC) rcont2);
 }
diff --git a/src/library/stats/src/integrate.c b/src/library/stats/src/integrate.c
index c79f2a3..d6bba02 100644
--- a/src/library/stats/src/integrate.c
+++ b/src/library/stats/src/integrate.c
@@ -1,6 +1,6 @@
 /*
  *  R : A Computer Language for Statistical Data Analysis
- *  Copyright (C) 2001-2012  the R Core Team
+ *  Copyright (C) 2001-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
@@ -14,17 +14,25 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  */
 
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
 
+#include <math.h> // for isfinite
 #include <Rinternals.h>
 #include <R_ext/Applic.h>
 
-/* alled via .External(.) :*/
+#ifdef ENABLE_NLS
+#include <libintl.h>
+#define _(String) dgettext ("stats", String)
+#else
+#define _(String) (String)
+#endif
+
+/* called via .External(.) :*/
 SEXP call_dqags(SEXP args);
 SEXP call_dqagi(SEXP args);
 
@@ -73,7 +81,9 @@ SEXP call_dqags(SEXP args)
     args = CDR(args);
     is.f = CAR(args); args = CDR(args);
     is.env = CAR(args); args = CDR(args);
+    if(length(CAR(args)) > 1) error(_("'%s' must be of length one"), "lower");
     lower = asReal(CAR(args)); args = CDR(args);
+    if(length(CAR(args)) > 1) error(_("'%s' must be of length one"), "upper");
     upper = asReal(CAR(args)); args = CDR(args);
     epsabs = asReal(CAR(args)); args = CDR(args);
     epsrel = asReal(CAR(args)); args = CDR(args);
@@ -115,6 +125,7 @@ SEXP call_dqagi(SEXP args)
     args = CDR(args);
     is.f = CAR(args); args = CDR(args);
     is.env = CAR(args); args = CDR(args);
+    if(length(CAR(args)) > 1) error(_("'%s' must be of length one"), "bound");
     bound = asReal(CAR(args)); args = CDR(args);
     inf = asInteger(CAR(args)); args = CDR(args);
     epsabs = asReal(CAR(args)); args = CDR(args);
diff --git a/src/library/stats/src/isoreg.c b/src/library/stats/src/isoreg.c
index 28d016a..5cd75d5 100644
--- a/src/library/stats/src/isoreg.c
+++ b/src/library/stats/src/isoreg.c
@@ -17,9 +17,9 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  */
-#include <R.h>
+
 #include "modreg.h"
 
 SEXP isoreg(SEXP y)
diff --git a/src/library/stats/src/kendall.c b/src/library/stats/src/kendall.c
index fa8aca9..b80da5a 100644
--- a/src/library/stats/src/kendall.c
+++ b/src/library/stats/src/kendall.c
@@ -1,6 +1,6 @@
 /*
  *  R : A Computer Language for Statistical Data Analysis
- *  Copyright (C) 1999-2012   The R Core Team.
+ *  Copyright (C) 1999-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
@@ -14,12 +14,15 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  */
 
 /* Kendall's rank correlation tau and its exact distribution in case of no ties
 */
+
+#include <string.h>
 #include <R.h>
+#include <math.h> // for floor
 #include <Rmath.h>
 
 /*
diff --git a/src/library/stats/src/kmeans.c b/src/library/stats/src/kmeans.c
index 343bcd3..bf25fa0 100644
--- a/src/library/stats/src/kmeans.c
+++ b/src/library/stats/src/kmeans.c
@@ -14,10 +14,9 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  */
 
-#include <R.h>
 #include "modreg.h" /* for declarations for registration */
 
 void kmeans_Lloyd(double *x, int *pn, int *pp, double *cen, int *pk, int *cl,
diff --git a/src/library/stats/src/kmns.f b/src/library/stats/src/kmns.f
index 118f0aa..27f1c22 100644
--- a/src/library/stats/src/kmns.f
+++ b/src/library/stats/src/kmns.f
@@ -38,7 +38,7 @@ C
 C     For each point I, find its two closest centres, IC1(I) and
 C     IC2(I).     Assign it to IC1(I).
 C
-      DO 50 I = 1, M
+      DO 60 I = 1, M
         IC1(I) = 1
         IC2(I) = 2
         DO IL = 1, 2
@@ -72,6 +72,7 @@ C
              IC1(I) = L
           end IF
  50    CONTINUE
+ 60    CONTINUE
 C
 C     Update cluster centres to be the average of points contained
 C     within them.
@@ -360,10 +361,10 @@ C     is equal to the step at which cluster L is last updated plus M.
 C
       ICOUN = 0
       ISTEP = 0
+c   Repeat {
  10   continue
 
       DO I = 1, M
-        call rchkusr()
         if(iTrace .gt. 0 .and. ISTEP .ge. 1 .and. I .eq. 1) ! only from second "round" on
      +       call kmnsQpr(ISTEP, ICOUN, NCP, K, iTrace)
         ICOUN = ICOUN + 1
@@ -439,6 +440,7 @@ C
    60   IF (ICOUN .EQ. M) RETURN
       end do
 
+      call rchkusr() ! allow user interrupt
       GO TO 10
 c     --------
       END
diff --git a/src/library/stats/src/ks.c b/src/library/stats/src/ks.c
index 4b8268f..2275fcf 100644
--- a/src/library/stats/src/ks.c
+++ b/src/library/stats/src/ks.c
@@ -1,6 +1,6 @@
 /*
  *  R : A Computer Language for Statistical Data Analysis
- *  Copyright (C) 1999-2012   The R Core Team.
+ *  Copyright (C) 1999-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
@@ -14,7 +14,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  */
 
 /* ks.c
@@ -23,6 +23,7 @@
    in the two-sided one-sample and two-sample cases.
 */
 
+#include <math.h>
 #include <R.h>
 #include <Rinternals.h>
 #include <Rmath.h>		/* constants */
diff --git a/src/library/stats/src/ksmooth.c b/src/library/stats/src/ksmooth.c
index a6b247f..e832c3d 100644
--- a/src/library/stats/src/ksmooth.c
+++ b/src/library/stats/src/ksmooth.c
@@ -1,6 +1,6 @@
 /*
  *  R : A Computer Language for Statistical Data Analysis
- *  Copyright (C) 1998-2012	The R Foundation
+ *  Copyright (C) 1998-2016	The R Foundation
  *
  *  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
@@ -14,9 +14,10 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  */
 
+#include <math.h>
 #include <R.h>			/* for NA_REAL, includes math.h */
 #include <Rinternals.h>
 
@@ -62,11 +63,29 @@ static void BDRksmooth(double *x, double *y, R_xlen_t n,
 }
 
 
-void F77_SUB(bdrsplerr)(void)
+// called only from  spline()  in ./ppr.f
+void NORET F77_SUB(bdrsplerr)(void)
 {
     error(_("only 2500 rows are allowed for sm.method=\"spline\""));
 }
 
+void F77_SUB(splineprt)(double* df, double* gcvpen, int* ismethod,
+			      double* lambda, double *edf)
+{
+    Rprintf("spline(df=%5.3g, g.pen=%11.6g, ismeth.=%+2d) -> (lambda, edf) = (%.7g, %5.2f)\n",
+	    *df, *gcvpen, *ismethod, *lambda, *edf);
+    return;
+}
+
+// called only from smooth(..., trace=TRUE)  in ./ppr.f :
+void F77_SUB(smoothprt)(double* span, int* iper, double* var, double* cvar)
+{
+    Rprintf("smooth(span=%4g, iper=%+2d) -> (var, cvar) = (%g, %g)\n",
+	    *span, *iper, *var, *cvar);
+    return;
+}
+
+
 SEXP ksmooth(SEXP x, SEXP y, SEXP xp, SEXP skrn, SEXP sbw)
 {
     int krn = asInteger(skrn);
diff --git a/src/library/stats/src/line.c b/src/library/stats/src/line.c
index abfa5c8..b912a07 100644
--- a/src/library/stats/src/line.c
+++ b/src/library/stats/src/line.c
@@ -1,6 +1,6 @@
 /*
  *  R : A Computer Language for Statistical Data Analysis
- *  Copyright (C) 1997-2012   The R Core Team.
+ *  Copyright (C) 1997-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
@@ -14,7 +14,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  */
 
 #include <R_ext/Utils.h>	/* R_rsort() */
diff --git a/src/library/stats/src/lm.c b/src/library/stats/src/lm.c
index cf17a23..f98dd95 100644
--- a/src/library/stats/src/lm.c
+++ b/src/library/stats/src/lm.c
@@ -14,7 +14,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/.
+ *  https://www.R-project.org/Licenses/.
  */
 
 #include <R.h>
@@ -83,12 +83,12 @@ SEXP Cdqrls(SEXP x, SEXP y, SEXP tol, SEXP chk)
     const char *ansNms[] = {"qr", "coefficients", "residuals", "effects",
 			    "rank", "pivot", "qraux", "tol", "pivoted", ""};
     PROTECT(ans = mkNamed(VECSXP, ansNms));
-    SET_VECTOR_ELT(ans, 0, qr = duplicate(x));
+    SET_VECTOR_ELT(ans, 0, qr = shallow_duplicate(x));
     coefficients = (ny > 1) ? allocMatrix(REALSXP, p, ny) : allocVector(REALSXP, p);
     PROTECT(coefficients);
     SET_VECTOR_ELT(ans, 1, coefficients);
-    SET_VECTOR_ELT(ans, 2, residuals = duplicate(y));
-    SET_VECTOR_ELT(ans, 3, effects = duplicate(y));
+    SET_VECTOR_ELT(ans, 2, residuals = shallow_duplicate(y));
+    SET_VECTOR_ELT(ans, 3, effects = shallow_duplicate(y));
     PROTECT(pivot = allocVector(INTSXP, p));
     int *ip = INTEGER(pivot);
     for(int i = 0; i < p; i++) ip[i] = i+1;
diff --git a/src/library/stats/src/lminfl.f b/src/library/stats/src/lminfl.f
index 1ec605d..d757c31 100644
--- a/src/library/stats/src/lminfl.f
+++ b/src/library/stats/src/lminfl.f
@@ -16,7 +16,7 @@ c  GNU General Public License for more details.
 c
 c  You should have received a copy of the GNU General Public License
 c  along with this program; if not, a copy is available at
-c  http://www.r-project.org/Licenses/
+c  https://www.R-project.org/Licenses/
 c
 c-----------------------------------------------------------------------
 c
diff --git a/src/library/stats/src/loessc.c b/src/library/stats/src/loessc.c
index 14788d1..fdf570d 100644
--- a/src/library/stats/src/loessc.c
+++ b/src/library/stats/src/loessc.c
@@ -24,6 +24,8 @@
 
 #include <string.h>
 #include <stdio.h>
+#include <math.h>
+#include <limits.h>
 #include <R.h>
 
 #ifdef ENABLE_NLS
@@ -100,7 +102,11 @@ loess_raw(double *y, double *x, double *weights, double *robust, int *d,
     loess_workspace(d, n, span, degree, nonparametric, drop_square,
 		    sum_drop_sqr, setLf);
     v[1] = *cell;/* = v(2) in Fortran (!) */
-    if(!strcmp(*surf_stat, "interpolate/none")) {
+
+    /* NB:  surf_stat  =  (surface / statistics);
+     *                               statistics = "none" for all robustness iterations
+     */
+    if(!strcmp(*surf_stat, "interpolate/none")) { // default for loess.smooth() and robustness iter.
 	F77_CALL(lowesb)(x, y, robust, &dzero, &zero, iv, &liv, &lv, v);
 	F77_CALL(lowese)(iv, &liv, &lv, v, n, x, surface);
 	loess_prune(parameter, a, xi, vert, vval);
@@ -109,7 +115,7 @@ loess_raw(double *y, double *x, double *weights, double *robust, int *d,
 	F77_CALL(lowesf)(x, y, robust, iv, &liv, &lv, v, n, x,
 			 &dzero, &zero, surface);
     }
-    else if (!strcmp(*surf_stat, "interpolate/1.approx")) {
+    else if (!strcmp(*surf_stat, "interpolate/1.approx")) { // default (trace.hat is "exact")
 	F77_CALL(lowesb)(x, y, weights, diagonal, &one, iv, &liv, &lv, v);
 	F77_CALL(lowese)(iv, &liv, &lv, v, n, x, surface);
 	nsing = iv[29];
@@ -117,8 +123,9 @@ loess_raw(double *y, double *x, double *weights, double *robust, int *d,
 	F77_CALL(lowesa)(trL, n, d, &tau, &nsing, one_delta, two_delta);
 	loess_prune(parameter, a, xi, vert, vval);
     }
-    else if (!strcmp(*surf_stat, "interpolate/2.approx")) {
-	F77_CALL(lowesb)(x, y, robust, &dzero, &zero, iv, &liv, &lv, v);
+    else if (!strcmp(*surf_stat, "interpolate/2.approx")) { // default for trace.hat = "approximate"
+	//                     vvvvvvv (had 'robust' in R <= 3.2.x)
+	F77_CALL(lowesb)(x, y, weights, &dzero, &zero, iv, &liv, &lv, v);
 	F77_CALL(lowese)(iv, &liv, &lv, v, n, x, surface);
 	nsing = iv[29];
 	F77_CALL(ehg196)(&tau, d, span, trL);
diff --git a/src/library/stats/src/loessf.f b/src/library/stats/src/loessf.f
index 98f36a6..c6b8513 100644
--- a/src/library/stats/src/loessf.f
+++ b/src/library/stats/src/loessf.f
@@ -1799,19 +1799,16 @@ c     partial sort to find 6*mad
       double precision y(n),yhat(n),pwgts(n),rwgts(n),ytilde(n)
 c Var
       double precision c,i1,i4,mad
-      integer identi,i2,i3,i5,m
+      integer i2,i3,i,m
 
       external ehg106
       integer ifloor
       external ifloor
-c     Identity -> identi
-c     median absolute deviation
-      do 3 i5=1,n
-         ytilde(i5)=dabs(y(i5)-yhat(i5))*dsqrt(pwgts(i5))
+c     median absolute deviation (using partial sort):
+      do 3 i=1,n
+         ytilde(i)=dabs(y(i)-yhat(i))*dsqrt(pwgts(i))
+         pi(i) = i
     3 continue
-      do 4 identi=1,n
-         pi(identi)=identi
-    4 continue
       m=ifloor(dble(n)/2.d0)+1
       call ehg106(1,n,m,1,ytilde,pi,n)
       if((n-m)+1.lt.m)then
@@ -1822,11 +1819,11 @@ c     median absolute deviation
       end if
 c     magic constant
       c=(6*mad)**2/5
-      do 5 i5=1,n
-         ytilde(i5)=1-((y(i5)-yhat(i5))**2*pwgts(i5))/c
+      do 5 i=1,n
+         ytilde(i)= 1 - ((y(i)-yhat(i))**2 * pwgts(i))/c
     5 continue
-      do 6 i5=1,n
-         ytilde(i5)=ytilde(i5)*dsqrt(rwgts(i5))
+      do 6 i=1,n
+         ytilde(i)=ytilde(i)*dsqrt(rwgts(i))
     6 continue
       if(n.le.0)then
          i4=0.d0
@@ -1840,8 +1837,8 @@ c     magic constant
       end if
       c=n/i4
 c     pseudovalues
-      do 8 i5=1,n
-         ytilde(i5)=yhat(i5)+(c*rwgts(i5))*(y(i5)-yhat(i5))
+      do 8 i=1,n
+         ytilde(i)=yhat(i) + (c*rwgts(i))*(y(i)-yhat(i))
     8 continue
       return
       end
@@ -1853,7 +1850,7 @@ c     pseudovalues
       integer a(ncmax),c(vc,ncmax),hi(ncmax),lo(ncmax),pi(n),vhit(nvmax)
       DOUBLE PRECISION fd, v(nvmax,d),x(n,d),xi(ncmax)
 
-      logical i1,i2,i3,leaf
+      logical i1,i2,leaf
       integer i4,inorm2,k,l,m,p,u, upper, lower, check, offset
       DOUBLE PRECISION diam,diag(8),sigma(8)
 
diff --git a/src/library/stats/src/lowess.c b/src/library/stats/src/lowess.c
index a619e1e..bbacab7 100644
--- a/src/library/stats/src/lowess.c
+++ b/src/library/stats/src/lowess.c
@@ -1,7 +1,7 @@
 /*
  *  R : A Computer Langage for Statistical Data Analysis
  *  Copyright (C) 1996  Robert Gentleman and Ross Ihaka
- *  Copyright (C) 1999-20012 The R Core Team
+ *  Copyright (C) 1999-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
@@ -15,7 +15,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  */
 
 #ifdef HAVE_CONFIG_H
diff --git a/src/library/stats/src/mAR.c b/src/library/stats/src/mAR.c
index 7e30c4b..a995f8f 100644
--- a/src/library/stats/src/mAR.c
+++ b/src/library/stats/src/mAR.c
@@ -1,5 +1,6 @@
 /*
  *  Copyright (C) 1999 Martyn Plummer
+ *  Copyright (C) 1999-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
@@ -13,9 +14,11 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/.
+ *  https://www.R-project.org/Licenses/.
  */
 
+#include <math.h>
+#include <string.h>
 #include <R.h>
 #include <R_ext/Applic.h>	/* Fortran routines */
 #include "ts.h"
diff --git a/src/library/stats/src/massdist.c b/src/library/stats/src/massdist.c
index 35e36e1..01c790b 100644
--- a/src/library/stats/src/massdist.c
+++ b/src/library/stats/src/massdist.c
@@ -21,15 +21,14 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  */
 
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
 
-#include <R_ext/Arith.h>
-
+#include <R_ext/Arith.h> // includes math.h
 #include <Rinternals.h>
 
 /* NB: this only works in the lower half of y, but pads with zeros. */
diff --git a/src/library/stats/src/model.c b/src/library/stats/src/model.c
index a6f0c2b..5dadd17 100644
--- a/src/library/stats/src/model.c
+++ b/src/library/stats/src/model.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--2013  The R Core Team
+ *  Copyright (C) 1997--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
@@ -15,7 +15,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  */
 
 #ifdef HAVE_CONFIG_H
@@ -214,8 +214,11 @@ SEXP modelframe(SEXP call, SEXP op, SEXP args, SEXP rho)
 	if (!isNewList(ans) || length(ans) != length(data))
 	    error(_("invalid result from na.action"));
 	/* need to transfer _all but tsp and dim_ attributes, possibly lost
-	   by subsetting in na.action.  */
+	   by subsetting in na.action. */
+	/* But if data is unchanged, don't mess with it (PR#16436) */
+
 	for ( i = length(ans) ; i-- ; )
+	    if (VECTOR_ELT(data, i) != VECTOR_ELT(ans, i))
 		copyMostAttribNoTs(VECTOR_ELT(data, i),VECTOR_ELT(ans, i));
 
 	UNPROTECT(3);
@@ -1015,11 +1018,12 @@ static int MatchVar(SEXP var1, SEXP var2)
 	return 1;
     if (isNull(var1) || isNull(var2))
 	return 0;
-    /* Non-atomic objects - compare CARs & CDRs */
+    /* Non-atomic objects - compare CARs & CDRs (and TAGs:  PR#17235) */
     if ((isList(var1) || isLanguage(var1)) &&
 	(isList(var2) || isLanguage(var2)))
 	return MatchVar(CAR(var1), CAR(var2)) &&
-	       MatchVar(CDR(var1), CDR(var2));
+	       MatchVar(CDR(var1), CDR(var2)) &&
+	       MatchVar(TAG(var1), TAG(var2));
     /* Symbols */
     if (isSymbol(var1) && isSymbol(var2))
 	return (var1 == var2);
@@ -1239,14 +1243,11 @@ static SEXP OrBits(SEXP term1, SEXP term2)
 }
 
 
-/* BitCount counts the number of ``on'' */
-/* bits in a term */
-
+// BitCount counts the number of ``on'' bits in a term
 static int BitCount(SEXP term)
 {
-    int i, sum;
-    sum = 0;
-    for (i = 1; i <= nvar; i++)
+    int sum = 0;
+    for (int i = 1; i <= nvar; i++)
 	sum += GetBit(term, i);
     return sum;
 }
@@ -1256,11 +1257,10 @@ static int BitCount(SEXP term)
 
 static int TermZero(SEXP term)
 {
-    int i, val;
-    val = 1;
-    for (i = 0; i < nwords; i++)
-	val = val && (INTEGER(term)[i] == 0);
-    return val;
+    for (int i = 0; i < nwords; i++)
+        if (INTEGER(term)[i] != 0)
+	    return 0;
+    return 1;
 }
 
 
@@ -1268,11 +1268,10 @@ static int TermZero(SEXP term)
 
 static int TermEqual(SEXP term1, SEXP term2)
 {
-    int i, val;
-    val = 1;
-    for (i = 0; i < nwords; i++)
-	val = val && (INTEGER(term1)[i] == INTEGER(term2)[i]);
-    return val;
+    for (int i = 0; i < nwords; i++)
+        if (INTEGER(term1)[i] != INTEGER(term2)[i])
+            return 0;
+    return 1;
 }
 
 
@@ -1299,19 +1298,36 @@ static SEXP StripTerm(SEXP term, SEXP list)
 }
 
 
-/* TrimRepeats removes duplicates of (bit string) terms 
-   in a model formula by repeated use of ``StripTerm''.
+/* TrimRepeats removes duplicates of (bit string) terms in a model formula.
    Also drops zero terms. */
 
 static SEXP TrimRepeats(SEXP list)
 {
-    if (list == R_NilValue)
-	return R_NilValue;
-    /* Highly recursive */
-    R_CheckStack();
-    if (TermZero(CAR(list)))
-	return TrimRepeats(CDR(list));
-    SETCDR(list, TrimRepeats(StripTerm(CAR(list), CDR(list))));
+    // Drop zero terms at the start of the list.
+    while (list != R_NilValue && TermZero(CAR(list))) {
+	list = CDR(list);
+    }
+    if (list == R_NilValue || CDR(list) == R_NilValue)
+	return list;
+
+    PROTECT(list);
+    // Find out which terms are duplicates.
+    SEXP all_terms = PROTECT(PairToVectorList(list)),
+	duplicate_sexp = PROTECT(duplicated(all_terms, FALSE));
+    int i_p1 = 1, *is_duplicate = LOGICAL(duplicate_sexp);
+
+    // Remove the zero terms and duplicates from the list.
+    for (SEXP current = list; CDR(current) != R_NilValue; i_p1++) {
+	SEXP next = CDR(current);
+	if (is_duplicate[i_p1] || TermZero(CAR(next))) {
+	    // Remove the node from the list.
+	    SETCDR(current, CDR(next));
+	} else {
+	    current = next;
+	}
+    }
+
+    UNPROTECT(3);
     return list;
 }
 
@@ -1517,8 +1533,9 @@ static SEXP EncodeVars(SEXP formula)
 		    if(!strcmp(c, translateChar(STRING_ELT(framenames, j))))
 			error(_("duplicated name '%s' in data frame using '.'"),
 			      c);
+		int cIndex = InstallVar(install(c));
 		term = AllocTerm();
-		SetBit(term, InstallVar(install(c)), 1);
+		SetBit(term, cIndex, 1);
 		if(i == 0) PROTECT(v = r = cons(term, R_NilValue));
 		else {SETCDR(v, CONS(term, R_NilValue)); v = CDR(v);}
 	    }
@@ -1527,8 +1544,9 @@ static SEXP EncodeVars(SEXP formula)
 	    return r;
 	}
 	else {
+	    int formulaIndex = InstallVar(formula);
 	    term = AllocTerm();
-	    SetBit(term, InstallVar(formula), 1);
+	    SetBit(term, formulaIndex, 1);
 	    return CONS(term, R_NilValue);
 	}
     }
@@ -1569,8 +1587,9 @@ static SEXP EncodeVars(SEXP formula)
 	if (CAR(formula) == parenSymbol) {
 	    return EncodeVars(CADR(formula));
 	}
+	int formulaIndex = InstallVar(formula);
 	term = AllocTerm();
-	SetBit(term, InstallVar(formula), 1);
+	SetBit(term, formulaIndex, 1);
 	return CONS(term, R_NilValue);
     }
     error(_("invalid model formula in EncodeVars"));
@@ -1726,6 +1745,7 @@ SEXP termsform(SEXP args)
     a = CDR(a);
 
     nvar = length(varlist) - 1;
+    
     /* in allocating words need to allow for intercept term */
     nwords = (int)(nvar/ WORDSIZE + 1);
 //    printf("nvar = %d, nwords = %d\n", nvar, nwords);
@@ -1975,7 +1995,7 @@ SEXP termsform(SEXP args)
     a = CDR(a);
 
     SETCAR(a, mkString("terms"));
-    SET_TAG(a, install("class"));
+    SET_TAG(a, R_ClassSymbol);
     SET_OBJECT(ans, 1);
 
     SETCDR(a, R_NilValue);  /* truncate if necessary */
diff --git a/src/library/stats/src/modreg.h b/src/library/stats/src/modreg.h
index 86b634d..a0b2620 100644
--- a/src/library/stats/src/modreg.h
+++ b/src/library/stats/src/modreg.h
@@ -1,7 +1,7 @@
 /*
  *  R : A Computer Language for Statistical Data Analysis
- *  Copyright (C) 2001-2   The R Core Team.
- *  Copyright (C) 2003     The R Foundation
+ *  Copyright (C) 2001-2017 The R Core Team.
+ *  Copyright (C) 2003-2016 The R Foundation
  *
  *  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
@@ -15,7 +15,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  */
 
 #ifndef R_MODREG_H
@@ -71,32 +71,32 @@ void kmeans_MacQueen(double *x, int *pn, int *pp, double *cen, int *pk,
 
 /* Fortran : */
 
-void F77_SUB(lowesw)(double *res, int *n, double *rw, int *pi);
-void F77_SUB(lowesp)(int *n, double *y, double *yhat, double *pwgts,
-		     double *rwgts, int *pi, double *ytilde);
-void F77_SUB(setppr)(double *span1, double *alpha1,
-	int *optlevel, int *ism, double *df1, double *gcvpen1);
-void F77_SUB(smart)(int *m, int *mu, int *p, int * q, int *n,
-		    double *w, double *x, double *y,
-		    double *ww, double *smod, int *nsmod, double *sp,
-		    int *nsp, double *dp, int *ndp, double *edf);
-void F77_SUB(setsmu)(void);
-void F77_SUB(pppred)(int *np, double *x, double *smod,
-		     double *y, double *sc);
-void F77_SUB(rbart)(double *penalt, double *dofoff,
-		    double *xs, double *ys, double *ws, double *ssw,
-		    int *n, double *knot, int *nk, double *coef,
-		    double *sz, double *lev, double *crit, int *iparms,
-		    double *spar, double *parms,
-		    double *scrtch, int *ld4, int *ldnk, int *ier);
+void F77_NAME(lowesw)(double *res, int *n, double *rw, int *pi);
+void F77_NAME(lowesp)(int *n, double *y, double *yhat, double *pwgts,
+		      double *rwgts, int *pi, double *ytilde);
+void F77_NAME(setppr)(double *span1, double *alpha1,
+		      int *optlevel, int *ism, double *df1, double *gcvpen1);
+void F77_NAME(smart)(int *m, int *mu, int *p, int * q, int *n,
+		     double *w, double *x, double *y,
+		     double *ww, double *smod, int *nsmod, double *sp,
+		     int *nsp, double *dp, int *ndp, double *edf);
+void F77_NAME(setsmu)(int *tr);
+void F77_NAME(pppred)(int *np, double *x, double *smod, double *y, double *sc);
+void F77_NAME(rbart)(double *penalt, double *dofoff,
+		     double *xs, double *ys, double *ws, double *ssw,
+		     int *n, double *knot, int *nk, double *coef,
+		     double *sz, double *lev, double *crit, int *iparms,
+		     double *spar, double *parms,
+		     double *scrtch, int *ld4, int *ldnk, int *ier);
 
 void F77_NAME(sbart)
     (double *penalt, double *dofoff,
      double *xs, double *ys, double *ws, double *ssw,
      int *n, double *knot, int *nk, double *coef,
-     double *sz, double *lev, double *crit, int *icrit,
-     double *spar, int *ispar, int *iter, double *lspar,
-     double *uspar, double *tol, double *eps, int *isetup,
+     double *sz, double *lev, double *crit,
+     int *icrit, double *spar, int *ispar, int *iter,
+     double *lspar, double *uspar, double *tol, double *eps, double *Ratio,
+     int *isetup,
      double *xwy, double *hs0, double *hs1, double *hs2,
      double *hs3, double *sg0, double *sg1, double *sg2,
      double *sg3, double *abd, double *p1ip, double *p2ip,
@@ -117,9 +117,9 @@ void F77_NAME(sslvrg)(double *penalt, double *dofoff,
 		      double *abd, double *p1ip, double *p2ip,
 		      int *ld4, int *ldnk, int *info);
 
-void F77_SUB(bvalus)(int *n, double *knot, double *coef,
-		     int *nk, double *x, double *s, int *order);
-void F77_SUB(supsmu)(int *n, double *x, double *y,
-		     double *w, int *iper, double *span, double *alpha,
-		     double *smo, double *sc, double *edf);
+void F77_NAME(bvalus)(int *n, double *knot, double *coef,
+		      int *nk, double *x, double *s, int *order);
+void F77_NAME(supsmu)(int *n, double *x, double *y,
+		      double *w, int *iper, double *span, double *alpha,
+		      double *smo, double *sc, double *edf);
 #endif
diff --git a/src/library/stats/src/monoSpl.c b/src/library/stats/src/monoSpl.c
index 12a6ec7..ae30601 100644
--- a/src/library/stats/src/monoSpl.c
+++ b/src/library/stats/src/monoSpl.c
@@ -1,5 +1,6 @@
 /*  R : A Computer Language for Statistical Data Analysis
  *  Copyright (C) 2010	The R Foundation
+ *  Copyright (C) 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
@@ -13,10 +14,11 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  */
 
 #include "modreg.h"
+#include <math.h>
 
 /* To be "exported" (as part of R's C API): */
 /**
diff --git a/src/library/stats/src/nls.c b/src/library/stats/src/nls.c
index 4c2f63b..ad230bd 100644
--- a/src/library/stats/src/nls.c
+++ b/src/library/stats/src/nls.c
@@ -5,7 +5,7 @@
  *  Copyright 1999-2001 Douglas M. Bates
  *                      Saikat DebRoy
  *
- *  Copyright 2005--2014  The R Core Team
+ *  Copyright 2005--2016  The R Core Team
  *  Copyright 2006	  The R Foundation
  *
  *  This program is free software; you can redistribute it and/or modify
@@ -21,13 +21,15 @@
  *
  *  You should have received a copy of the GNU General Public
  *  License along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  */
 
-#include <R.h>
-#include <Rinternals.h>
 #include <stdlib.h>
+#include <string.h>
+#include <math.h>
 #include <float.h>
+#include <R.h>
+#include <Rinternals.h>
 #include "nls.h"
 
 #ifndef MIN
@@ -313,13 +315,14 @@ numeric_deriv(SEXP expr, SEXP theta, SEXP rho, SEXP dir)
     const void *vmax = vmaxget();
     for(i = 0; i < LENGTH(theta); i++) {
 	const char *name = translateChar(STRING_ELT(theta, i));
-	SEXP temp = findVar(install(name), rho);
+	SEXP s_name = install(name);
+	SEXP temp = findVar(s_name, rho);
 	if(isInteger(temp))
 	    error(_("variable '%s' is integer, not numeric"), name);
 	if(!isReal(temp))
 	    error(_("variable '%s' is not numeric"), name);
 	if (MAYBE_SHARED(temp)) /* We'll be modifying the variable, so need to make sure it's unique PR#15849 */
-	    defineVar(install(name), temp = duplicate(temp), rho);
+	    defineVar(s_name, temp = duplicate(temp), rho);
 	MARK_NOT_MUTABLE(temp);
 	SET_VECTOR_ELT(pars, i, temp);
 	lengthTheta += LENGTH(VECTOR_ELT(pars, i));
diff --git a/src/library/stats/src/nls.h b/src/library/stats/src/nls.h
index 069146f..3a0c7f8 100644
--- a/src/library/stats/src/nls.h
+++ b/src/library/stats/src/nls.h
@@ -14,7 +14,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  */
 
 #ifdef ENABLE_NLS
diff --git a/src/library/stats/src/nscor.c b/src/library/stats/src/nscor.c
index 7e70dc7..c06de31 100644
--- a/src/library/stats/src/nscor.c
+++ b/src/library/stats/src/nscor.c
@@ -17,7 +17,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  */
 
 
diff --git a/src/library/stats/src/optim.c b/src/library/stats/src/optim.c
index 0a3d096..fd9e69f 100644
--- a/src/library/stats/src/optim.c
+++ b/src/library/stats/src/optim.c
@@ -14,7 +14,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  */
 
 #ifdef HAVE_CONFIG_H
diff --git a/src/library/stats/src/optimize.c b/src/library/stats/src/optimize.c
index ae4719b..b6a95a6 100644
--- a/src/library/stats/src/optimize.c
+++ b/src/library/stats/src/optimize.c
@@ -2,7 +2,7 @@
  *  R : A Computer Language for Statistical Data Analysis
  *  Copyright (C) 1995, 1996  Robert Gentleman and Ross Ihaka
  *  Copyright (C) 2003-2004  The R Foundation
- *  Copyright (C) 1998--2013  The R Core Team
+ *  Copyright (C) 1998--2014  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
@@ -16,19 +16,22 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  */
 
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
 
+#define NO_NLS
 #include <Defn.h>
 #include <float.h>		/* for DBL_MAX */
 #include <R_ext/Applic.h>	/* for optif9, fdhess */
 #include <R_ext/RS.h>	       	/* for Memcpy */
 
 #include "statsR.h"
+#include "stats.h" // R_zeroin2
+
 #undef _
 #ifdef ENABLE_NLS
 #include <libintl.h>
@@ -289,12 +292,6 @@ SEXP do_fmin(SEXP call, SEXP op, SEXP args, SEXP rho)
 // Brent's "zeroin"
 // ---------------
 
-extern double 
-R_zeroin2(double ax, double bx, double fa, double fb, 
-	  double (*f)(double x, void *info), void *info, 
-	  double *Tol, int *Maxit);
-
-
 static double fcn2(double x, struct callinfo *info)
 {
     SEXP s, sx;
@@ -517,7 +514,8 @@ static void fcn(int n, const double x[], double *f, function_info
 	return;
     }
 				/* calculate for a new value of x */
-    s = CADR(R_fcall);
+    s = allocVector(REALSXP, n);
+    SETCADR(R_fcall, s);
     for (i = 0; i < n; i++) {
 	if (!R_FINITE(x[i])) error(_("non-finite value supplied by 'nlm'"));
 	REAL(s)[i] = x[i];
@@ -632,7 +630,7 @@ static double *fixparam(SEXP p, int *n)
 
 	/* Fatal errors - we don't deliver an answer */
 
-static void opterror(int nerr)
+static void NORET opterror(int nerr)
 {
     switch(nerr) {
     case -1:
@@ -782,12 +780,10 @@ SEXP nlm(SEXP call, SEXP op, SEXP args, SEXP rho)
     R_gradientSymbol = install("gradient");
     R_hessianSymbol = install("hessian");
 
-    /* This vector is shared with all subsequent calls */
     v = allocVector(REALSXP, n);
     for (i = 0; i < n; i++) REAL(v)[i] = x[i];
     SETCADR(state->R_fcall, v);
-    SET_NAMED(v, 2); // in case the functions try to alter it
-    value = eval(state->R_fcall, state->R_env);
+    PROTECT(value = eval(state->R_fcall, state->R_env));
 
     v = getAttrib(value, R_gradientSymbol);
     if (v != R_NilValue) {
@@ -808,6 +804,7 @@ SEXP nlm(SEXP call, SEXP op, SEXP args, SEXP rho)
 	    warning(_("gradient supplied is of the wrong length or mode, so ignored"));
 	}
     }
+    UNPROTECT(1); /* value */
     if (((msg/4) % 2) && !iahflg) { /* skip check of analytic Hessian */
       msg -= 4;
     }
diff --git a/src/library/stats/src/pacf.c b/src/library/stats/src/pacf.c
index e60876a..6189fdc 100644
--- a/src/library/stats/src/pacf.c
+++ b/src/library/stats/src/pacf.c
@@ -1,6 +1,6 @@
 /*  R : A Computer Language for Statistical Data Analysis
  *
- *  Copyright (C) 1999-2012	The R Core Team
+ *  Copyright (C) 1999-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
@@ -14,20 +14,13 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/.
+ *  https://www.R-project.org/Licenses/.
  */
 
 #ifdef HAVE_CONFIG_H
 # include <config.h>
 #endif
 
-#if !defined(atanh) && defined(HAVE_DECL_ATANH) && !HAVE_DECL_ATANH
-extern double atanh(double x);
-#endif
-
-/* do this first to get the right options for math.h */
-#include <R_ext/Arith.h>
-
 #include <R.h>
 #include "ts.h"
 
@@ -359,10 +352,9 @@ static void dotrans(Starma G, double *raw, double *new, int trans)
     }
 }
 
-#ifdef _WIN32
-extern double atanh(double);
+#if !defined(atanh) && defined(HAVE_DECL_ATANH) && !HAVE_DECL_ATANH
+extern double atanh(double x);
 #endif
-
 static void invpartrans(int p, double *phi, double *new)
 {
     int j, k;
diff --git a/src/library/stats/src/port.c b/src/library/stats/src/port.c
index c75995d..afdbe68 100644
--- a/src/library/stats/src/port.c
+++ b/src/library/stats/src/port.c
@@ -1,6 +1,6 @@
 /*
  *  R : A Computer Language for Statistical Data Analysis
- *  Copyright (C) 2005-2007   The R Core Team.
+ *  Copyright (C) 2005-2015   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
@@ -14,7 +14,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  */
 
 #include "port.h"
@@ -308,7 +308,7 @@ int F77_NAME(stopx)(void)
 static
 double* check_gv(SEXP gr, SEXP hs, SEXP rho, int n, double *gv, double *hv)
 {
-    SEXP gval = PROTECT(coerceVector(eval(gr, rho), REALSXP));
+    SEXP gval = PROTECT(coerceVector(PROTECT(eval(gr, rho)), REALSXP));
     if (LENGTH(gval) != n)
 	error(_("gradient function must return a numeric vector of length %d"), n);
     Memcpy(gv, REAL(gval), n);
@@ -332,7 +332,7 @@ double* check_gv(SEXP gr, SEXP hs, SEXP rho, int n, double *gv, double *hv)
 	    }
 	UNPROTECT(1);
     }
-    UNPROTECT(1);
+    UNPROTECT(2);
     return gv;
 }
 
@@ -388,12 +388,12 @@ SEXP port_nlminb(SEXP fn, SEXP gr, SEXP hs, SEXP rho,
 	      n);
     /* We are going to alter .par, so must duplicate it */
     defineVar(dot_par_symbol, duplicate(xpt), rho);
-    xpt = findVarInFrame(rho, dot_par_symbol);
+    PROTECT(xpt = findVarInFrame(rho, dot_par_symbol));
 
     if ((LENGTH(lowerb) == n) && (LENGTH(upperb) == n)) {
 	if (isReal(lowerb) && isReal(upperb)) {
 	    double *rl=REAL(lowerb), *ru=REAL(upperb);
-	    b = Calloc(2*n, double);
+	    b = (double *)R_alloc(2*n, sizeof(double));
 	    for (i = 0; i < n; i++) {
 		b[2*i] = rl[i];
 		b[2*i + 1] = ru[i];
@@ -401,8 +401,9 @@ SEXP port_nlminb(SEXP fn, SEXP gr, SEXP hs, SEXP rho,
 	} else error(_("'lower' and 'upper' must be numeric vectors"));
     }
     if (gr != R_NilValue) {
-	g = Calloc(n, double);
-	if (hs != R_NilValue) h = Calloc((n * (n + 1))/2, double);
+	g = (double *)R_alloc(n, sizeof(double));
+	if (hs != R_NilValue)
+	    h = (double *)R_alloc((n * (n + 1))/2, sizeof(double));
     }
 
     do {
@@ -421,9 +422,11 @@ SEXP port_nlminb(SEXP fn, SEXP gr, SEXP hs, SEXP rho,
 	   value (package varComp does this) */
 	defineVar(dot_par_symbol, duplicate(xpt), rho);
 	xpt = findVarInFrame(rho, dot_par_symbol);
+	UNPROTECT(1);
+	PROTECT(xpt);
     } while(INTEGER(iv)[0] < 3);
 
-    if (b) Free(b); if (g) Free(g); if (h) Free(h);
+    UNPROTECT(1); /* xpt */
     return R_NilValue;
 }
 
@@ -536,8 +539,10 @@ SEXP port_nlsb(SEXP m, SEXP d, SEXP gg, SEXP iv, SEXP v,
     SEXP getPars, setPars, resid, gradient,
 	rr = PROTECT(allocVector(REALSXP, nd)),
 	x = PROTECT(allocVector(REALSXP, n));
+    // This used to use Calloc, but that will leak if 
+    // there is a premature return (and did in package drfit)
     double *b = (double *) NULL,
-	*rd = Calloc(nd, double);
+	*rd = (double *)R_alloc(nd, sizeof(double));
 
     if (!isReal(d) || n < 1)
 	error(_("'d' must be a nonempty numeric vector"));
@@ -555,8 +560,8 @@ SEXP port_nlsb(SEXP m, SEXP d, SEXP gg, SEXP iv, SEXP v,
 
     if ((LENGTH(lowerb) == n) && (LENGTH(upperb) == n)) {
 	if (isReal(lowerb) && isReal(upperb)) {
-	    double *rl=REAL(lowerb), *ru=REAL(upperb);
-	    b = Calloc(2*n, double);
+	    double *rl = REAL(lowerb), *ru = REAL(upperb);
+	    b = (double *)R_alloc(2*n, sizeof(double));
 	    for (i = 0; i < n; i++) {
 		b[2*i] = rl[i];
 		b[2*i + 1] = ru[i];
@@ -597,7 +602,6 @@ SEXP port_nlsb(SEXP m, SEXP d, SEXP gg, SEXP iv, SEXP v,
 	}
     } while(INTEGER(iv)[0] < 3);
 
-    Free(rd); if (b) Free(b);
     UNPROTECT(6);
     return R_NilValue;
 }
diff --git a/src/library/stats/src/port.h b/src/library/stats/src/port.h
index 3ec3198..3206cbb 100644
--- a/src/library/stats/src/port.h
+++ b/src/library/stats/src/port.h
@@ -1,6 +1,6 @@
 /*
  *  R : A Computer Language for Statistical Data Analysis
- *  Copyright (C) 2005   The R Core Team.
+ *  Copyright (C) 2005-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
@@ -14,7 +14,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  */
 
 #ifndef PORT_PORT_H
@@ -27,6 +27,8 @@
  * Licensed under the GNU General Public License, version 2 or later.
  */
 
+#include <math.h>
+#include <string.h> // for memmove, memcpy, strcmp
 #include <Rinternals.h>
 #include <R_ext/RS.h>
 
diff --git a/src/library/stats/src/ppr.f b/src/library/stats/src/ppr.f
index 4cc30dd..886e935 100644
--- a/src/library/stats/src/ppr.f
+++ b/src/library/stats/src/ppr.f
@@ -39,8 +39,8 @@ C                        ^^^ really (ndb) of  smart(.)
       integer i,j,l, lm
       double precision sw,s
 c Common Vars
-      double precision         span,alpha,big
-      integer           ifl,lf
+      double precision       span,alpha,big
+      integer         ifl,lf
       common /pprpar/ ifl,lf,span,alpha,big
 
       double precision conv,            cutmin,fdel,cjeps
@@ -48,30 +48,35 @@ c Common Vars
       common /pprz01/ conv,maxit,mitone,cutmin,fdel,cjeps,mitcj
 
       sw=0d0
-      do 161 j=1,n
- 161     sw=sw+w(j)
-      do 201 j=1,n
-         do 201 i=1,q
+      do j=1,n
+         sw=sw+w(j)
+      end do
+      do j=1,n
+         do i=1,q
             r(i,j)=y(q*(j-1)+i)
- 201  continue
-      do 241 i=1,q
+         end do
+      end do
+      do i=1,q
          s=0d0
-         do 251 j=1,n
+         do j=1,n
             s=s+w(j)*r(i,j)
- 251     continue
+         end do
          yb(i)=s/sw
- 241  continue
+      end do
 c     yb is vector of means
-      do 261 j=1,n
-        do 261 i=1,q
- 261       r(i,j)=r(i,j)-yb(i)
+      do j=1,n
+        do i=1,q
+          r(i,j)=r(i,j)-yb(i)
+         end do
+      end do
       ys=0.d0
-      do 281 i=1,q
+      do i=1,q
          s=0.d0
-         do 291 j=1,n
- 291        s=s+w(j)*r(i,j)**2
+         do j=1,n
+            s=s+w(j)*r(i,j)**2
+         end do
          ys=ys+ww(i)*s/sw
- 281  continue
+      end do
       if(ys .gt. 0d0) goto 311
 c     ys is the overall standard deviation -- quit if zero
       return
@@ -79,9 +84,11 @@ c     ys is the overall standard deviation -- quit if zero
  311  continue
       ys=sqrt(ys)
       s=1.d0/ys
-      do 331 j=1,n
-         do 331 i=1,q
- 331        r(i,j)=r(i,j)*s
+      do j=1,n
+         do i=1,q
+            r(i,j)=r(i,j)*s
+         end do
+      end do
 
 c     r is now standardized residuals
 c     subfit adds up to m  terms one at time; lm is the number fitted.
@@ -90,45 +97,58 @@ c     subfit adds up to m  terms one at time; lm is the number fitted.
       call fulfit(lm,lf,p,q,n,w,sw,x,r,ww,a,b,f,t,asr,sc,bt,g,dp,edf)
 C REPEAT
  371  continue
-      do 381 l=1,lm
+      do l=1,lm
         sc(l,1)=l+0.1d0
         s=0d0
-        do 391 i=1,q
- 391       s=s+ww(i)*abs(b(i,l))
+        do i=1,q
+           s=s+ww(i)*abs(b(i,l))
+        end do
         sc(l,2)=-s
- 381  continue
+      end do
       call sort(sc(1,2),sc,1,lm)
-      do 461 j=1,n
-         do 461 i=1,q
- 461        r(i,j)=y(q*(j-1)+i)
-      do 521 i=1,q
-        do 531 j=1,n
+      do j=1,n
+         do i=1,q
+            r(i,j)=y(q*(j-1)+i)
+         end do
+      end do
+
+      do i=1,q
+        do j=1,n
            r(i,j)=r(i,j)-yb(i)
            s=0.d0
-           do 541 l=1,lm
- 541          s=s+b(i,l)*f(j,l)
+           do l=1,lm
+              s=s+b(i,l)*f(j,l)
+           end do
           r(i,j)=r(i,j)/ys-s
-531     continue
-521   continue
+         end do
+      end do
+
       if(lm.le.mu) goto 9999
 c back to integer:
-      l=sc(lm,1)
+      l=int(sc(lm,1))
       asr1=0d0
-      do 561 j=1,n
-        do 561 i=1,q
+      do j=1,n
+        do i=1,q
           r(i,j)=r(i,j)+b(i,l)*f(j,l)
-561     asr1=asr1+w(j)*ww(i)*r(i,j)**2
+          asr1=asr1+w(j)*ww(i)*r(i,j)**2
+         end do
+      end do
+
       asr1=asr1/sw
       asr(1)=asr1
       if(l .ge. lm) goto 591
-      do 601 i=1,p
- 601     a(i,l)=a(i,lm)
-      do 611 i=1,q
- 611     b(i,l)=b(i,lm)
-      do 621 j=1,n
+      do i=1,p
+         a(i,l)=a(i,lm)
+      end do
+      do i=1,q
+         b(i,l)=b(i,lm)
+      end do
+      do j=1,n
          f(j,l)=f(j,lm)
- 621     t(j,l)=t(j,lm)
-591   continue
+         t(j,l)=t(j,lm)
+      end do
+
+ 591  continue
       lm=lm-1
       call fulfit(lm,lf,p,q,n,w,sw,x,r,ww,a,b,f,t,asr,sc,bt,g,dp,edf)
       goto 371
@@ -141,7 +161,7 @@ C END REPEAT
       subroutine subfit(m,p,q,n,w,sw,x,r,ww,lm,a,b,f,t,asr,sc,
      &     bt,g,dp,edf)
 c Args
-      integer              m,p,q,n,            lm
+      integer           m,p,q,n,            lm
       double precision w(n),sw, x(p,n),r(q,n),ww(q),a(p,m),b(q,m),
      &     f(n,m), t(n,m), asr(15), sc(n,15), bt(q), g(p,3), edf(m)
       double precision dp(*)
@@ -149,8 +169,8 @@ c Var
       integer i,j,l, iflsv
       double precision asrold
 c Common Vars
-      double precision         span,alpha,big
-      integer           ifl,lf
+      double precision       span,alpha,big
+      integer         ifl,lf
       common /pprpar/ ifl,lf,span,alpha,big
 
       double precision conv,            cutmin,fdel,cjeps
@@ -167,9 +187,11 @@ c Common Vars
 c does 'edf' mean 'edf(1)' or 'edf(l)'?
          call onetrm(0,p,q,n,w,sw,x,r,ww,a(1,lm),b(1,lm),
      &        f(1,lm),t(1,lm),asr(1),sc,g,dp,edf(1))
-         do 10 j=1,n
+         do 20 j=1,n
             do 10 i=1,q
- 10            r(i,j)=r(i,j)-b(i,lm)*f(j,lm)
+               r(i,j)=r(i,j)-b(i,lm)*f(j,lm)
+ 10         continue
+ 20      continue
          if(lm.eq.1) goto 100
          if(lf.gt.0) then
             if(lm.eq.m) return
@@ -187,7 +209,7 @@ c does 'edf' mean 'edf(1)' or 'edf(l)'?
       subroutine fulfit(lm,lbf,p,q,n,w,sw,x,r,ww,a,b,f,t,
      &     asr,sc,bt,g,dp,edf)
 c Args
-      integer              lm,lbf,p,q,n
+      integer           lm,lbf,p,q,n
       double precision w(n),sw,x(p,n),r(q,n),ww(q),a(p,lm),b(q,lm),
      &     f(n,lm),t(n,lm),asr(1+lm), sc(n,15),bt(q),g(p,3), edf(lm)
       double precision dp(*)
@@ -195,8 +217,8 @@ c Var
       double precision asri, fsv, asrold
       integer i,j,iter,lp,isv
 c Common Vars
-      double precision         span,alpha,big
-      integer           ifl,lf
+      double precision       span,alpha,big
+      integer         ifl,lf
       common /pprpar/ ifl,lf,span,alpha,big
 
       double precision conv,            cutmin,fdel,cjeps
@@ -217,31 +239,39 @@ C Outer loop:
       asrold=asri
       iter=iter+1
       do 100 lp=1,lm
-        do 1 i=1,q
- 1         bt(i)=b(i,lp)
-        do 2 i=1,p
- 2         g(i,3)=a(i,lp)
-        do 3 j=1,n
-          do 3 i=1,q
- 3           r(i,j)=r(i,j)+bt(i)*f(j,lp)
+        do 10 i=1,q
+           bt(i)=b(i,lp)
+ 10     continue
+        do 20 i=1,p
+           g(i,3)=a(i,lp)
+ 20     continue
+        do 35 j=1,n
+          do 30 i=1,q
+             r(i,j)=r(i,j)+bt(i)*f(j,lp)
+ 30       continue
+ 35    continue
 
         call onetrm(1,p,q,n,w,sw,x,r,ww,g(1,3),bt,sc(1,14),sc(1,15),
      &            asri,sc,g,dp,edf(lp))
         if(asri .lt. asrold) then
-           do 4 i=1,q
- 4            b(i,lp)=bt(i)
-           do 5 i=1,p
- 5            a(i,lp)=g(i,3)
-           do 6 j=1,n
+           do 40 i=1,q
+              b(i,lp)=bt(i)
+ 40        continue
+           do 50 i=1,p
+              a(i,lp)=g(i,3)
+ 50        continue
+           do 60 j=1,n
               f(j,lp)=sc(j,14)
               t(j,lp)=sc(j,15)
- 6         continue
+ 60        continue
         else
            asri=asrold
         endif
-        do 8 j=1,n
-          do 8 i=1,q
- 8           r(i,j)=r(i,j)-b(i,lp)*f(j,lp)
+        do 85 j=1,n
+          do 80 i=1,q
+             r(i,j)=r(i,j)-b(i,lp)*f(j,lp)
+ 80       continue
+ 85    continue
 100   continue
       if((iter .le. maxit) .and. ((asri .gt. 0d0)
      &     .and. ((asrold-asri)/asrold .ge. conv))) goto 1000
@@ -257,7 +287,7 @@ C Outer loop:
       subroutine onetrm(jfl,p,q,n,w,sw,x,y,ww,a,b,f,t,asr,
      &     sc,g,dp,edf)
 c Args
-      integer              jfl,p,q,n
+      integer           jfl,p,q,n
       double precision w(n),sw, x(p,n),y(q,n),ww(q),a(p),b(q),f(n),t(n),
      &     asr, sc(n,13),g(p,2), edf
       double precision dp(*)
@@ -265,8 +295,8 @@ c Var
       double precision asrold,s
       integer i,j,iter
 c Common Vars
-      double precision         span,alpha,big
-      integer           ifl,lf
+      double precision       span,alpha,big
+      integer         ifl,lf
       common /pprpar/ ifl,lf,span,alpha,big
 
       double precision conv,            cutmin,fdel,cjeps
@@ -282,24 +312,27 @@ C REPEAT
       do 11 j=1,n
          s=0d0
          do 21 i=1,q
- 21         s=s+ww(i)*b(i)*y(i,j)
+            s=s+ww(i)*b(i)*y(i,j)
+ 21      continue
          sc(j,13)=s
-11    continue
+ 11   continue
       call oneone(max0(jfl,iter-1),p,n,w,sw,sc(1,13),x,a,f,t,
      &                 asr,sc,g,dp,edf)
       do 31 i=1,q
         s=0d0
         do 41 j=1,n
- 41        s=s+w(j)*y(i,j)*f(j)
+           s=s+w(j)*y(i,j)*f(j)
+ 41     continue
         b(i)=s/sw
-31    continue
+ 31   continue
       asr=0d0
       do 51 i=1,q
          s=0d0
          do 61 j=1,n
- 61         s=s+w(j)*(y(i,j)-b(i)*f(j))**2
+            s=s+w(j)*(y(i,j)-b(i)*f(j))**2
+ 61      continue
          asr=asr+ww(i)*s/sw
-51    continue
+ 51   continue
       if((q .ne. 1) .and. (iter .le. maxit) .and. (asr .gt. 0d0)
      &      .and. (asrold-asr)/asrold .ge. conv) goto 1000
       return
@@ -307,15 +340,15 @@ C REPEAT
 
       subroutine oneone(ist,p,n, w,sw,y,x,a,f,t,asr,sc,g,dp,edf)
 c Args
-      integer              ist,p,n
+      integer           ist,p,n
       double precision w(n),sw,y(n),x(p,n),a(p),f(n),t(n),asr,
      &     sc(n,12), g(p,2), edf, dp(*)
 c Var
       integer i,j,k,iter
       double precision sml, s,v,cut,asrold
 c Common Vars
-      double precision         span,alpha,big
-      integer           ifl,lf
+      double precision       span,alpha,big
+      integer         ifl,lf
       common /pprpar/ ifl,lf,span,alpha,big
 
       double precision conv,            cutmin,fdel,cjeps
@@ -367,7 +400,7 @@ C REPEAT [inner loop] -----
  90   continue
       call sort(sc(1,11),sc,1,n)
       do 110 j=1,n
-        k=sc(j,1)
+        k=int(sc(j,1))
         sc(j,2)=y(k)
         sc(j,3)=max(w(k),sml)
  110  continue
@@ -393,7 +426,7 @@ C     --------
         a(i)=g(i,2)
  160  continue
       do 170 j=1,n
-        k=sc(j,1)
+        k=int(sc(j,1))
         t(k)=sc(j,11)
         f(k)=sc(j,12)
  170  continue
@@ -401,7 +434,7 @@ C     --------
       if(iter.gt.mitone.or.p.le.1) goto 199
       call pprder(n,sc(1,11),sc(1,12),sc(1,3),fdel,sc(1,4),sc(1,5))
       do 180 j=1,n
-        k=sc(j,1)
+        k=int(sc(j,1))
         sc(j,5)=y(j)-f(j)
         sc(k,6)=sc(j,4)
  180  continue
@@ -424,7 +457,8 @@ c--------------
       if(v .gt. 0d0) then
         v=1d0/sqrt(v/sw)
         do 230 j=1,n
- 230      f(j)=f(j)*v
+          f(j)=f(j)*v
+ 230   continue
       endif
       return
       end
@@ -728,8 +762,8 @@ C avoid bounds error: this was .and. but order is not guaranteed
       integer i,lm1,l,l1
       double precision s,t,sml
 c Common
-      double precision         span,alpha,big
-      integer           ifl,lf
+      double precision       span,alpha,big
+      integer         ifl,lf
       common /pprpar/ ifl,lf,span,alpha,big
 
 
@@ -786,42 +820,51 @@ c Common
       block data bkppr
 
 c Common Vars
-      double precision         span,alpha,big
-      integer           ifl,lf
+      double precision       span,alpha,big
+      integer         ifl,lf
       common /pprpar/ ifl,lf,span,alpha,big
 
       double precision conv,            cutmin,fdel,cjeps
       integer              maxit,mitone,                  mitcj
       common /pprz01/ conv,maxit,mitone,cutmin,fdel,cjeps,mitcj
 
-      double precision     df, gcvpen
-      integer                          ismethod
-      common /spsmooth/ df, gcvpen, ismethod
+      double precision  df, gcvpen
+      integer                       ismethod
+      logical                                 trace
+      common /spsmooth/ df, gcvpen, ismethod, trace
+
+      data df, gcvpen, ismethod, trace /4d0, 1d0, 0, .false./
 
       data ifl,maxit, conv, mitone, cutmin, fdel,
      &     span,alpha, big, cjeps, mitcj, lf
      &     /6,  20,   .005,   20,     0.1,  0.02,
      &     0.0,  0.0,1.0e20,0.001,   1,    2/
-      data df, gcvpen, ismethod /4d0, 1d0, 0/
       end
 
       subroutine setppr(span1, alpha1, optlevel, ism, df1, gcvpen1)
-c Put `parameters' into Common blocks
+c Put 'parameters' into Common blocks
       integer optlevel,ism
       double precision span1,alpha1, df1, gcvpen1
 
-      double precision         span,alpha,big
-      integer           ifl,lf
+      double precision       span,alpha,big
+      integer         ifl,lf
       common /pprpar/ ifl,lf,span,alpha,big
 
-      double precision     df, gcvpen
-      integer                          ismethod
-      common /spsmooth/ df, gcvpen, ismethod
+      double precision  df, gcvpen
+      integer                       ismethod
+      logical                                 trace
+      common /spsmooth/ df, gcvpen, ismethod, trace
 
       span = span1
       lf = optlevel
       alpha = alpha1
-      ismethod = ism
+      if(ism .ge. 0) then
+         ismethod = ism
+         trace = .false.
+      else
+         ismethod = -(ism+1)
+         trace = .true.
+      end if
       df = df1
       gcvpen = gcvpen1
       return
@@ -841,7 +884,7 @@ c
  10      continue
          call sort(t(1,l),sp,1,n)
          do 20 j=1,n
-            k=sp(j,1)
+            k=int(sp(j,1))
             f(j,l)=sp(k,2)
  20      continue
  100  continue
@@ -857,11 +900,11 @@ c
      +     inp,ja,jb,jf,jt,jfl,jfh,jtl,jth, mu
       double precision ys, s, t
 
-      m=smod(1)+0.1d0
-      p=smod(2)+0.1d0
-      q=smod(3)+0.1d0
-      n=smod(4)+0.1d0
-      mu=smod(5)+0.1d0
+      m= int(smod(1)+0.1d0)
+      p= int(smod(2)+0.1d0)
+      q= int(smod(3)+0.1d0)
+      n= int(smod(4)+0.1d0)
+      mu=int(smod(5)+0.1d0)
       ys=smod(q+6)
       ja=q+6
       jb=ja+p*m
@@ -930,12 +973,17 @@ C        END
       return
       end
 
-      subroutine setsmu
-      double precision     df, gcvpen
-      integer                          ismethod
-      common /spsmooth/ df, gcvpen, ismethod
+c Called from R's supsmu()
+      subroutine setsmu (tr)
+      integer tr
+
+      double precision  df, gcvpen
+      integer                       ismethod
+      logical                                 trace
+      common /spsmooth/ df, gcvpen, ismethod, trace
 
       ismethod = 0
+      trace = tr .ne. 0
       return
       end
 
@@ -968,7 +1016,7 @@ c       iper=1 => x is ordered interval variable.
 c       iper=2 => x is a periodic variable with values
 c                 in the range (0.0,1.0) and period 1.0.
 c    span : smoother span (fraction of observations in window).
-c           span=0.0 => automatic (variable) span selection.
+c           span=0.0 <=> "cv" : automatic (variable) span selection.
 c    alpha : controls high frequency (small span) penality
 c            used with automatic span selection (bass tone control).
 c            (alpha.le.0.0 or alpha.gt.10.0 => no effect.)
@@ -993,14 +1041,17 @@ c Var
       double precision sy,sw, a,h(n),f, scale,vsmlsq,resmin
       integer i,j, jper
 
-      double precision  spans(3),          big,sml,eps
+      double precision  spans(3),    big,sml,eps
       common /spans/ spans  /consts/ big,sml,eps
 
-      double precision     df, gcvpen
-      integer                          ismethod
-      common /spsmooth/ df, gcvpen, ismethod
+      double precision  df, gcvpen
+      integer                       ismethod
+      logical                                 trace
+      common /spsmooth/ df, gcvpen, ismethod, trace
+c     Called from R's supsmu(),  ismethod = 0, always (but not when called from ppr)
 
       if (x(n).gt.x(1)) go to 30
+c     x(n) <= x(1) :  boundary case:  smo[.] :=  weighted mean( y )
       sy=0d0
       sw=sy
       do 10 j=1,n
@@ -1013,15 +1064,15 @@ c Var
          smo(j)=a
  20   continue
       return
- 30   continue
 
-C     change by
-      if (ismethod .ne. 0) then
-        call spline(n, x, y, w, smo, edf)
+C     Normal Case
+ 30   continue
+      if (ismethod .ne. 0) then ! possible only when called from ppr()
+         call spline(n, x, y, w, smo, edf, sc)
       else
          i=n/4
          j=3*i
-         scale=x(j)-x(i)
+         scale=x(j)-x(i) ! = IQR(x)
  40      if (scale.gt.0d0) go to 50
          if (j.lt.n) j=j+1
          if (i.gt.1) i=i-1
@@ -1031,10 +1082,12 @@ C     change by
          jper=iper
          if (iper.eq.2.and.(x(1).lt.0d0.or.x(n).gt.1d0)) jper=1
          if (jper.lt.1.or.jper.gt.2) jper=1
-         if (span.le.0d0) go to 60
-         call smooth (n,x,y,w,span,jper,vsmlsq,smo,sc)
-         return
- 60      do 70 i=1,3
+         if (span .gt. 0d0) then
+            call smooth (n,x,y,w,span,jper,vsmlsq,smo,sc)
+            return
+         end if
+C     else  "cv" (crossvalidation) from  three spans[]
+         do 70 i=1,3
             call smooth (n,x,y,w,spans(i),jper,vsmlsq,
      &           sc(1,2*i-1),sc(1,7))
             call smooth (n,x,sc(1,7),w,spans(2),-jper,vsmlsq,
@@ -1047,8 +1100,8 @@ C     change by
                resmin=sc(j,2*i)
                sc(j,7)=spans(i)
  80         continue
-            if (alpha.gt.0d0.and.alpha.le.10d0 .and.
-     &           resmin.lt.sc(j,6).and.resmin.gt.0d0)
+            if (alpha.gt.0d0 .and. alpha.le.10d0 .and.
+     &           resmin.lt.sc(j,6) .and. resmin.gt.0d0)
      &           sc(j,7)= sc(j,7)+(spans(3)-sc(j,7)) *
      &                          max(sml,resmin/sc(j,6))**(10d0-alpha)
  90      continue
@@ -1079,55 +1132,64 @@ c Var
       integer i,j, in,out, jper,ibw,it, j0
       double precision xm,ym,var,cvar, fbw,fbo,xti,xto,tmp, a,h,sy,wt
 
+c will use 'trace':
+      double precision  df, gcvpen
+      integer                       ismethod
+      logical                                 trace
+      common /spsmooth/ df, gcvpen, ismethod, trace
+
       xm=0d0
       ym=xm
       var=ym
       cvar=var
       fbw=cvar
       jper=iabs(iper)
-      ibw=0.5d0*span*n+0.5d0
+      ibw=int(0.5d0*span*n+0.5d0)
       if (ibw.lt.2) ibw=2
       it=2*ibw+1
       if (it .gt. n) it = n
-      do 20 i=1,it
+      do i=1,it
          j=i
          if (jper.eq.2) j=i-ibw-1
-         if (j.ge.1) xti=x(j)
-         if (j.ge.1) go to 10
-         j=n+j
-         xti=x(j)-1d0
- 10      wt=w(j)
+         if (j.ge.1) then
+            xti=x(j)
+         else ! if (j.lt.1) then
+            j=n+j
+            xti=x(j)-1d0
+         end if
+         wt=w(j)
          fbo=fbw
          fbw=fbw+wt
          if (fbw.gt.0d0) xm=(fbo*xm+wt*xti)/fbw
          if (fbw.gt.0d0) ym=(fbo*ym+wt*y(j))/fbw
          tmp=0d0
          if (fbo.gt.0d0) tmp=fbw*wt*(xti-xm)/fbo
-         var=var+tmp*(xti-xm)
+         var =var +tmp*(xti-xm)
          cvar=cvar+tmp*(y(j)-ym)
- 20   continue
+      end do
+
       do 80 j=1,n
          out=j-ibw-1
          in=j+ibw
-         if ((jper.ne.2).and.(out.lt.1.or.in.gt.n)) go to 60
-         if (out.ge.1) go to 30
-         out=n+out
-         xto=x(out)-1d0
-         xti=x(in)
-         go to 50
- 30      if (in.le.n) go to 40
-         in=in-n
-         xti=x(in)+1d0
-         xto=x(out)
-         go to 50
- 40      xto=x(out)
-         xti=x(in)
- 50      wt=w(out)
+         if ((jper.ne.2) .and. (out.lt.1.or.in.gt.n)) go to 60
+         if (out .lt. 1) then
+            out=n+out
+            xto=x(out)-1d0
+            xti=x(in)
+         else if (in .gt. n) then
+            in=in-n
+            xti=x(in)+1d0
+            xto=x(out)
+         else
+            xto=x(out)
+            xti=x(in)
+         end if
+         wt=w(out)
          fbo=fbw
          fbw=fbw-wt
          tmp=0d0
          if (fbw.gt.0d0) tmp=fbo*wt*(xto-xm)/fbw
-         var=var-tmp*(xto-xm)
+         var = var-tmp*(xto-xm)
          cvar=cvar-tmp*(y(out)-ym)
          if (fbw.gt.0d0) xm=(fbo*xm-wt*xto)/fbw
          if (fbw.gt.0d0) ym=(fbo*ym-wt*y(out))/fbw
@@ -1138,47 +1200,54 @@ c Var
          if (fbw.gt.0d0) ym=(fbo*ym+wt*y(in))/fbw
          tmp=0d0
          if (fbo.gt.0d0) tmp=fbw*wt*(xti-xm)/fbo
-         var=var+tmp*(xti-xm)
+         var = var+tmp*(xti-xm)
          cvar=cvar+tmp*(y(in)-ym)
  60      a=0d0
          if (var.gt.vsmlsq) a=cvar/var
          smo(j)=a*(x(j)-xm)+ym
-         if (iper.le.0) go to 80
-         h=0d0
-         if (fbw.gt.0d0) h=1d0/fbw
-         if (var.gt.vsmlsq) h=h+(x(j)-xm)**2/var
-         acvr(j)=0d0
-         a=1d0-w(j)*h
-         if (a.le.0d0) go to 70
-         acvr(j)=abs(y(j)-smo(j))/a
-         go to 80
- 70      if (j.le.1) go to 80
-         acvr(j)=acvr(j-1)
+         if (iper.gt.0) then
+            h=0d0
+            if (fbw.gt.0d0) h=1d0/fbw
+            if (var.gt.vsmlsq) h=h+(x(j)-xm)**2/var
+            acvr(j)=0d0
+            a=1d0-w(j)*h
+            if (a.gt.0d0) then
+               acvr(j)=abs(y(j)-smo(j))/a
+            else if (j.gt.1) then
+               acvr(j)=acvr(j-1)
+            end if
+         end if
  80   continue
+
+      if(trace) call smoothprt(span, iper, var, cvar) ! -> ./ksmooth.c
+
+c-- Recompute fitted values smo(j) as weighted mean for non-unique x(.) values:
       j=1
-c--
  90   j0=j
       sy=smo(j)*w(j)
       fbw=w(j)
       if (j.ge.n) go to 110
- 100  if (x(j+1).gt.x(j)) go to 110
+ 100  if (x(j+1).le.x(j)) then
+         j=j+1
+         sy=sy+w(j)*smo(j)
+         fbw=fbw+w(j)
+         if (j.lt.n) go to 100
+      end if
+ 110  if (j.gt.j0) then
+         a=0d0
+         if (fbw.gt.0d0) a=sy/fbw
+         do i=j0,j
+            smo(i)=a
+         end do
+      end if
       j=j+1
-      sy=sy+w(j)*smo(j)
-      fbw=fbw+w(j)
-      if (j.lt.n) go to 100
- 110  if (j.le.j0) go to 130
-      a=0d0
-      if (fbw.gt.0d0) a=sy/fbw
-      do 120 i=j0,j
-         smo(i)=a
- 120  continue
- 130  j=j+1
       if (j.le.n) go to 90
       return
       end
 
+
       block data bksupsmu
-      double precision spans(3), big,sml,eps
+      double precision spans(3),    big,sml,eps
       common /spans/ spans /consts/ big,sml,eps
 
       data spans, big,sml,eps /0.05,0.2,0.5, 1.0e20,1.0e-7,1.0e-3/
@@ -1203,9 +1272,12 @@ c these parameter values can be changed by declaring the
 c relevant labeled common in the main program and resetting
 c them with executable statements.
 c
-c-----------------------------------------------------------------
 
-      subroutine spline (n, x, y, w, smo, edf)
+c Only for  ppr(*, ismethod != 0):  Compute "smoothing" spline
+c  (rather, a penalized regression spline with at most 15 (inner) knots):
+c-----------------------------------------------------------------
+c
+      subroutine spline (n, x, y, w, smo, edf, sc)
 c
 c------------------------------------------------------------------
 c
@@ -1214,6 +1286,8 @@ c    n : number of observations.
 c    x(n) : ordered abscissa values.
 c    y(n) : corresponding ordinate (response) values.
 c    w(n) : weight for each (x,y) observation.
+c work space:
+c    sc(n,7) : used for dx(n), dy(n), dw(n), dsmo(n), lev(n)
 c output:
 c   smo(n) : smoothed ordinate (response) values.
 c   edf : equivalent degrees of freedom
@@ -1221,22 +1295,53 @@ c
 c------------------------------------------------------------------
 c Args
       integer n
-      double precision x(n), y(n), w(n), smo(n), edf
+      double precision x(n), y(n), w(n), smo(n), edf, sc(n,7)
+
+      call splineAA(n, x, y, w, smo, edf,
+     +     sc(n,1), ! dx
+     +     sc(n,2), ! dy
+     +     sc(n,3), ! dw
+     +     sc(n,4), ! dsmo
+     +     sc(n,5)) ! lev
+
+      return
+      end
+
+
+      subroutine splineAA(n, x, y, w, smo, edf, dx, dy, dw, dsmo, lev)
+c
+c  Workhorse of spline() above
+c------------------------------------------------------------------
+c
+c Additional input variables (no extra output, work):
+c     dx :
+c     dy :
+c     dw :
+c     dsmo:
+c     lev : "leverages", i.e., diagonal entries S_{i,i} of the smoother matrix
+
+c
+c------------------------------------------------------------------
+c Args
+      integer n
+      double precision x(n), y(n), w(n), smo(n), edf,
+     +     dx(n), dy(n), dw(n), dsmo(n), lev(n)
 c Var
       double precision knot(29), coef(25), work((17+25)*25)
-      double precision dx(2500),dy(2500), dw(2500),dsmo(2500), lev(2500)
-      double precision param(4), df1, lambda, crit, p, s
-      integer iparms(3), i, nk, ip, isetup,ier
+      double precision param(5), df1, lambda, crit, p, s
+      integer iparms(4), i, nk, ip, ier
 
-      double precision     df, gcvpen
-      integer                          ismethod
-      common /spsmooth/ df, gcvpen, ismethod
+      double precision  df, gcvpen
+      integer                       ismethod
+      logical                                 trace
+      common /spsmooth/ df, gcvpen, ismethod, trace
 
-      if (n .gt. 2500) call bdrsplerr()
-      do 10 i = 1,n
+c__no-more__ if (n .gt. 2500) call bdrsplerr()
+      do i = 1,n
         dx(i) = (x(i)-x(1))/(x(n)-x(1))
         dy(i) = y(i)
- 10     dw(i) = w(i)
+        dw(i) = w(i)
+      end do
       nk = min(n,15)
       knot(1) = dx(1)
       knot(2) = dx(1)
@@ -1246,47 +1351,47 @@ c Var
       knot(nk+2) = dx(n)
       knot(nk+3) = dx(n)
       knot(nk+4) = dx(n)
-      do 40 i = 5, nk
-        p = (n-1)*real(i-4)/real(nk-3)
-        ip = int(p)
-        p = p-ip
-        knot(i) = (1-p)*dx(ip+1) + p*dx(ip+2)
- 40   continue
+      do i = 5, nk
+         p = (n-1)*real(i-4)/real(nk-3)
+         ip = int(p)
+         p = p-ip
+         knot(i) = (1-p)*dx(ip+1) + p*dx(ip+2)
+      end do
 c      call dblepr('knots', 5, knot, nk+4)
-C     iparms(1:2) := (icrit, ispar)  for ./sbart.f
-      if (iabs(ismethod) .eq. 1) then
+C     iparms(1:2) := (icrit, ispar)  for ./sbart.c
+      if (ismethod .eq. 1) then
          iparms(1) = 3
          df1 = df
       else
          iparms(1) = 1
          df1 = 0d0
       endif
-c     ispar := 0 <==> estimate `spar' :
-      iparms(2) = 0
-c     maxit = 500 :
-      iparms(3) = 500
-      param(1) = 0d0
-      param(2) = 1.5d0
-c  tol for `spar' estimation:
+c
+      iparms(2) = 0   ! ispar := 0 <==> estimate `spar'
+      iparms(3) = 500 ! maxit = 500
+      iparms(4) = 0   ! spar (!= lambda)
+c
+      param(1) = 0d0   ! = lspar : min{spar}
+      param(2) = 1.5d0 ! = uspar : max{spar}
+c     tol for 'spar' estimation:
       param(3) = 1d-2
-c   this was `eps' (=? sqrt(machine eps)) in ./sbart.f :
+c     'eps' (~= 2^-12 = sqrt(2^-24) ?= sqrt(machine eps)) in ./sbart.c :
       param(4) = .000244
 
       ier = 1
       call rbart(gcvpen,df1,dx,dy,dw,0.0d0,n,knot,nk,coef,dsmo,lev,
      &     crit,iparms,lambda,param, work,4,1,ier)
-      if(ier .gt. 0) call intpr('TROUBLE:',8, ier, 1)
-      do 50 i = 1,n
- 50      smo(i) = dsmo(i)
+      if(ier .gt. 0) call intpr('spline(.) TROUBLE:', 18, ier, 1)
+      do i = 1,n
+         smo(i) = dsmo(i)
+      end do
 c      call dblepr('smoothed',8, dsmo, n)
       s = 0
-      do 60 i = 1, n
- 60      s = s + lev(i)
+      do i = 1, n
+         s = s + lev(i)
+      end do
       edf = s
-      if(ismethod.lt.0) then
-         call dblepr('lambda', 6, lambda, 1)
-         call dblepr('df', 2, s, 1)
-      endif
+      if(trace) call splineprt(df,gcvpen,ismethod, lambda, edf)
       return
       end
 
@@ -1297,7 +1402,7 @@ C=== This was 'sort()' in  gamfit's  mysort.f  [or sortdi() in sortdi.f ] :
 C
 C===  FIXME:  Translate to C and add to ../../../main/sort.c <<<<<
 C
-C     why on earth is       a() double precision ????
+C     a[] is double precision because the caller reuses a double (sometimes v[] itself!)
       subroutine sort (v,a, ii,jj)
 c
 c     Puts into a the permutation vector which sorts v into
@@ -1320,12 +1425,12 @@ c
  10   if (i.ge.j) go to 80
  20   k=i
       ij=(j+i)/2
-      t=a(ij)
+      t=int(a(ij))
       vt=v(ij)
       if (v(i).le.vt) go to 30
       a(ij)=a(i)
       a(i)=t
-      t=a(ij)
+      t=int(a(ij))
       v(ij)=v(i)
       v(i)=vt
       vt=v(ij)
@@ -1333,14 +1438,14 @@ c
       if (v(j).ge.vt) go to 50
       a(ij)=a(j)
       a(j)=t
-      t=a(ij)
+      t=int(a(ij))
       v(ij)=v(j)
       v(j)=vt
       vt=v(ij)
       if (v(i).le.vt) go to 50
       a(ij)=a(i)
       a(i)=t
-      t=a(ij)
+      t=int(a(ij))
       v(ij)=v(i)
       v(i)=vt
       vt=v(ij)
@@ -1351,7 +1456,7 @@ c
       v(k)=vtt
  50   l=l-1
       if (v(l).gt.vt) go to 50
-      tt=a(l)
+      tt=int(a(l))
       vtt=v(l)
  60   k=k+1
       if (v(k).lt.vt) go to 60
@@ -1376,7 +1481,7 @@ c
       i=i-1
  100  i=i+1
       if (i.eq.j) go to 80
-      t=a(i+1)
+      t=int(a(i+1))
       vt=v(i+1)
       if (v(i).le.vt) go to 100
       k=i
diff --git a/src/library/stats/src/prho.c b/src/library/stats/src/prho.c
index 4f3949e..65a6a9b 100644
--- a/src/library/stats/src/prho.c
+++ b/src/library/stats/src/prho.c
@@ -1,6 +1,6 @@
 /*
  *  R : A Computer Language for Statistical Data Analysis
- *  Copyright (C) 2000		R Core Team
+ *  Copyright (C) 2000-2016     The R Core Team
  *  Copyright (C) 2003		The R Foundation
  *  based on AS 89 (C) 1975 Royal Statistical Society
  *
@@ -16,10 +16,11 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  *
  */
 
+#include <math.h>
 #include <Rmath.h>
 
 /* Was
diff --git a/src/library/stats/src/qsbart.f b/src/library/stats/src/qsbart.f
index 405b2c1..1631078 100644
--- a/src/library/stats/src/qsbart.f
+++ b/src/library/stats/src/qsbart.f
@@ -1,7 +1,7 @@
 c-----------------------------------------------------------------------
 c
 c  R : A Computer Language for Statistical Data Analysis
-c  Copyright (C) 1998-2012 The R Core Team
+c  Copyright (C) 1998-2016 The R Core Team
 c
 c  This program is free software; you can redistribute it and/or modify
 c  it under the terms of the GNU General Public License as published by
@@ -15,10 +15,13 @@ c  GNU General Public License for more details.
 c
 c  You should have received a copy of the GNU General Public License
 c  along with this program; if not, a copy is available at
-c  http://www.r-project.org/Licenses/
+c  https://www.R-project.org/Licenses/
 c
 c-----------------------------------------------------------------------
 
+C Called from R's smooth.spline in ../R/smspline.R  as .Fortran(C, ..)
+C    and from C's
+
 C An interface to sbart() --- fewer arguments BUT unspecified scrtch() dimension
 C
 C NB: this routine alters ws [and isetup].
@@ -28,29 +31,37 @@ C
      &     coef,sz,lev,
      &     crit,iparms,spar,parms,
      &     scrtch, ld4,ldnk,ier)
-c
-      integer n,nk,isetup, iparms(3), ld4,ldnk,ier
-      double precision penalt,dofoff, xs(n),ys(n),ws(n),ssw,
-     &     knot(nk+4), coef(nk),sz(n),lev(n),
-     &     crit, spar, parms(4),
+c Args:
+      integer n,nk, iparms(4), ld4,ldnk,ier
+      double precision penalt,dofoff, xs(n),ys(n),ws(n), ssw,
+     &     knot(nk+4), coef(nk), sz(n), lev(n),
+     &     crit, spar, parms(5),
      &     scrtch(*)
-C          ^^^^^^^^ dimension (9+2*ld4+nk)*nk = (17 + nk)*nk
+C          ^^^^^^^^ dimension (9+2*ld4+ldnk)*nk = (17 + 1)*nk [last nk never accessed]
+c Vars:
+      integer isetup
 
-      isetup = 0
+      if(iparms(4) .eq. 1) then ! spar is lambda
+         isetup = 2
+      else
+         isetup = 0
+      endif
       call sbart(penalt,dofoff,xs,ys,ws,ssw,n,knot,nk,
      &     coef,sz,lev, crit,
      &     iparms(1),spar,iparms(2),iparms(3),
 c          = icrit   spar   ispar    iter
-     &     parms(1),parms(2),parms(3),parms(4),
-c          = lspar   uspar    tol      eps
+     &     parms(1),parms(2),parms(3),parms(4),parms(5),
+c          = lspar   uspar    tol      eps      ratio
      &     isetup, scrtch(1),
-c          =  0	    xwy
+c          = 0|2    xwy  == X'W y
      &     scrtch(  nk+1),scrtch(2*nk+1),scrtch(3*nk+1),scrtch(4*nk+1),
-c          =   hs0	      hs1	     hs2	    hs3
+c          =   hs0	      hs1	     hs2	    hs3		==> X'W X
      &     scrtch(5*nk+1),scrtch(6*nk+1),scrtch(7*nk+1),scrtch(8*nk+1),
-c          =   sg0	      sg1	     sg2	    sg3
-     &     scrtch(9*nk+1),scrtch(9*nk+  ld4*nk+1),scrtch(9*nk+2*ld4*nk),
-c          =   abd	      p1ip		      p2ip
+c          =   sg0	      sg1	     sg2	    sg3		==> SIGMA
+     &     scrtch(9*nk+1),
+c          =   abd [ld4 x nk]						==> R
+     &     scrtch(9*nk+ ld4*nk+1), scrtch(9*nk+2*ld4*nk+1),
+c          =   p1ip[ld4 x nk]          p2ip [ldnk x nk]
      &     ld4,ldnk,ier)
 
       return
diff --git a/src/library/stats/src/rWishart.c b/src/library/stats/src/rWishart.c
index 6c08529..0e14e7c 100644
--- a/src/library/stats/src/rWishart.c
+++ b/src/library/stats/src/rWishart.c
@@ -1,6 +1,6 @@
 /*
  *  R : A Computer Language for Statistical Data Analysis
- *  Copyright (C) 2012   The R Core Team
+ *  Copyright (C) 2012-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
@@ -14,13 +14,15 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  */
 
 #ifdef HAVE_CONFIG_H
 # include <config.h>
 #endif
 
+#include <math.h>
+#include <string.h>  // memset, memcpy
 #include <R.h>
 #include <Rinternals.h>
 #include <Rmath.h>
diff --git a/src/library/stats/src/random.c b/src/library/stats/src/random.c
index 7a6b4cb..1b73251 100644
--- a/src/library/stats/src/random.c
+++ b/src/library/stats/src/random.c
@@ -16,7 +16,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  */
 
 #ifdef HAVE_CONFIG_H
@@ -38,70 +38,76 @@ typedef double (*ran1) (double);
 typedef double (*ran2) (double, double);
 typedef double (*ran3) (double, double, double);
 
-/* random sampling from 1 parameter families. */
-
-SEXP Random1(SEXP args)
-{
-    if (!isVectorList(CAR(args))) error("incorrect usage");
-    SEXP x, a;
-    R_xlen_t i, n, na;
-    ran1 fn = NULL; /* -Wall */
-    const char *dn = CHAR(STRING_ELT(getListElement(CAR(args), "name"), 0));
-    SEXPTYPE type = REALSXP;
-
-    if (streql(dn, "rchisq")) fn = &rchisq;
-    else if (streql(dn, "rexp")) fn = &rexp;
-    else if (streql(dn, "rgeom")) {
-	type = INTSXP;
-	fn = &rgeom;
-    } else if (streql(dn, "rpois")) {
-	type = INTSXP;
-	fn = &rpois;
-    }
-    else if (streql(dn, "rt")) fn = &rt;
-    else if (streql(dn, "rsignrank")) {
-	type = INTSXP;
-	fn = &rsignrank;
+static void fillWithNAs(SEXP x, R_xlen_t n, SEXPTYPE type) {
+    R_xlen_t i;
+
+    if (type == INTSXP) {
+        for (i = 0; i < n; i++) {
+            INTEGER(x)[i] = NA_INTEGER;
+        }
+    } else { /* REALSXP */
+        for (i = 0; i < n; i++) {
+            REAL(x)[i] = NA_REAL;
+        }
     }
-    else error(_("invalid arguments"));
+    warning(_("NAs produced"));
+}
+
+static R_INLINE R_xlen_t resultLength(SEXP lengthArgument) {
+    R_xlen_t n;
 
-    args = CDR(args);
-    if (!isVector(CAR(args)) || !isNumeric(CADR(args)))
+    if (!isVector(lengthArgument)) {
 	error(_("invalid arguments"));
-    if (XLENGTH(CAR(args)) == 1) {
+    }
+    if (XLENGTH(lengthArgument) == 1) {
 #ifdef LONG_VECTOR_SUPPORT
-	double dn = asReal(CAR(args));
-	if (ISNAN(dn) || dn < 0 || dn > R_XLEN_T_MAX)
+	double dn = asReal(lengthArgument);
+	if (ISNAN(dn) || dn < 0 || dn > R_XLEN_T_MAX) {
 	    error(_("invalid arguments"));
+        }
 	n = (R_xlen_t) dn;
 #else
-	n = asInteger(CAR(args));
-	if (n == NA_INTEGER || n < 0)
+	n = asInteger(lengthArgument);
+	if (n == NA_INTEGER || n < 0) {
 	    error(_("invalid arguments"));
+        }
 #endif
+    } else {
+        n = XLENGTH(lengthArgument);
+    }
+
+    return n;
+}
+
+/* random sampling from 1 parameter families. */
+
+static R_INLINE SEXP random1(SEXP sn, SEXP sa, ran1 fn, SEXPTYPE type)
+{
+    SEXP x, a;
+    R_xlen_t n, na;
+
+    if (!isNumeric(sa)) {
+	error(_("invalid arguments"));
     }
-    else n = XLENGTH(CAR(args));
+    n = resultLength(sn);
     PROTECT(x = allocVector(type, n));
     if (n == 0) {
 	UNPROTECT(1);
 	return(x);
     }
-    na = XLENGTH(CADR(args));
+    na = XLENGTH(sa);
     if (na < 1) {
-	if (type == INTSXP)
-	    for (i = 0; i < n; i++) INTEGER(x)[i] = NA_INTEGER;
-	else
-	    for (i = 0; i < n; i++) REAL(x)[i] = NA_REAL;
-	warning(_("NAs produced"));
+        fillWithNAs(x, n, type);
     } else {
 	Rboolean naflag = FALSE;
-	PROTECT(a = coerceVector(CADR(args), REALSXP));
+	PROTECT(a = coerceVector(sa, REALSXP));
 	GetRNGstate();
 	double *ra = REAL(a);
 	errno = 0;
 	if (type == INTSXP) {
 	    double rx;
 	    int *ix = INTEGER(x);
+	    
 	    for (R_xlen_t i = 0; i < n; i++) {
 //		if ((i+1) % NINTERRUPT) R_CheckUserInterrupt();
 		rx = fn(ra[i % na]);
@@ -127,77 +133,48 @@ SEXP Random1(SEXP args)
     return x;
 }
 
+#define DEFRAND1_REAL(name) \
+    SEXP do_##name(SEXP sn, SEXP sa) { \
+        return random1(sn, sa, name, REALSXP); \
+    }
+
+#define DEFRAND1_INT(name) \
+    SEXP do_##name(SEXP sn, SEXP sa) { \
+        return random1(sn, sa, name, INTSXP); \
+    }
+
+DEFRAND1_REAL(rchisq)
+DEFRAND1_REAL(rexp)
+DEFRAND1_INT(rgeom)
+DEFRAND1_INT(rpois)
+DEFRAND1_REAL(rt)
+DEFRAND1_INT(rsignrank)
+
 /* random sampling from 2 parameter families. */
 
-SEXP Random2(SEXP args)
+static R_INLINE SEXP random2(SEXP sn, SEXP sa, SEXP sb, ran2 fn, SEXPTYPE type)
 {
-    if (!isVectorList(CAR(args))) error("incorrect usage");
     SEXP x, a, b;
-    R_xlen_t i, n, na, nb;
-    ran2 fn = NULL; /* -Wall */
-    const char *dn = CHAR(STRING_ELT(getListElement(CAR(args), "name"), 0));
-    SEXPTYPE type = REALSXP;
-
-    if (streql(dn, "rbeta")) fn = &rbeta;
-    else if (streql(dn, "rbinom")) {
-	type = INTSXP;
-	fn = &rbinom;
-    } else if (streql(dn, "rcauchy")) fn = &rcauchy;
-    else if (streql(dn, "rf")) fn = &rf;
-    else if (streql(dn, "rgamma")) fn = &rgamma;
-    else if (streql(dn, "rlnorm")) fn = &rlnorm;
-    else if (streql(dn, "rlogis")) fn = &rlogis;
-    else if (streql(dn, "rnbinom")) {
-	type = INTSXP;
-	fn = &rnbinom;
-    } else if (streql(dn, "rnorm")) fn = &rnorm;
-    else if (streql(dn, "runif")) fn = &runif;
-    else if (streql(dn, "rweibull")) fn = &rweibull;
-    else if (streql(dn, "rwilcox")) {
-	type = INTSXP;
-	fn = &rwilcox;
-    } else if (streql(dn, "rnchisq")) fn = &rnchisq;
-    else if (streql(dn, "rnbinom_mu")) {
-	fn = &rnbinom_mu;
-    } else error(_("invalid arguments"));
-
-    args = CDR(args);
-    if (!isVector(CAR(args)) ||
-	!isNumeric(CADR(args)) ||
-	!isNumeric(CADDR(args)))
+    R_xlen_t n, na, nb;
+
+    if (!isNumeric(sa) || !isNumeric(sb)) {
 	error(_("invalid arguments"));
-    if (XLENGTH(CAR(args)) == 1) {
-#ifdef LONG_VECTOR_SUPPORT
-	double dn = asReal(CAR(args));
-	if (ISNAN(dn) || dn < 0 || dn > R_XLEN_T_MAX)
-	    error(_("invalid arguments"));
-	n = (R_xlen_t) dn;
-#else
-	n = asInteger(CAR(args));
-	if (n == NA_INTEGER || n < 0)
-	    error(_("invalid arguments"));
-#endif
     }
-    else n = XLENGTH(CAR(args));
+    n = resultLength(sn);
     PROTECT(x = allocVector(type, n));
     if (n == 0) {
 	UNPROTECT(1);
 	return(x);
     }
-    na = XLENGTH(CADR(args));
-    nb = XLENGTH(CADDR(args));
+    na = XLENGTH(sa);
+    nb = XLENGTH(sb);
     if (na < 1 || nb < 1) {
-	if (type == INTSXP)
-	    for (i = 0; i < n; i++) INTEGER(x)[i] = NA_INTEGER;
-	else
-	    for (i = 0; i < n; i++) REAL(x)[i] = NA_REAL;
-	for (i = 0; i < n; i++) REAL(x)[i] = NA_REAL;
-	warning(_("NAs produced"));
+        fillWithNAs(x, n, type);
     }
     else {
 	Rboolean naflag = FALSE;
-	PROTECT(a = coerceVector(CADR(args), REALSXP));
-	PROTECT(b = coerceVector(CADDR(args), REALSXP));
+	PROTECT(a = coerceVector(sa, REALSXP));
+	PROTECT(b = coerceVector(sb, REALSXP));
 	GetRNGstate();
 	double *ra = REAL(a), *rb = REAL(b);
 	if (type == INTSXP) {
@@ -228,67 +205,83 @@ SEXP Random2(SEXP args)
     return x;
 }
 
+#define DEFRAND2_REAL(name) \
+    SEXP do_##name(SEXP sn, SEXP sa, SEXP sb) { \
+        return random2(sn, sa, sb, name, REALSXP); \
+    }
+
+#define DEFRAND2_INT(name) \
+    SEXP do_##name(SEXP sn, SEXP sa, SEXP sb) { \
+        return random2(sn, sa, sb, name, INTSXP); \
+    }
+
+DEFRAND2_REAL(rbeta)
+DEFRAND2_INT(rbinom)
+DEFRAND2_REAL(rcauchy)
+DEFRAND2_REAL(rf)
+DEFRAND2_REAL(rgamma)
+DEFRAND2_REAL(rlnorm)
+DEFRAND2_REAL(rlogis)
+DEFRAND2_INT(rnbinom)
+DEFRAND2_REAL(rnorm)
+DEFRAND2_REAL(runif)
+DEFRAND2_REAL(rweibull)
+DEFRAND2_INT(rwilcox)
+DEFRAND2_REAL(rnchisq)
+DEFRAND2_REAL(rnbinom_mu)
+
 /* random sampling from 3 parameter families. */
 
-SEXP Random3(SEXP args)
+static R_INLINE SEXP random3(SEXP sn, SEXP sa, SEXP sb, SEXP sc, ran3 fn,
+			     SEXPTYPE type)
 {
-    if (!isVectorList(CAR(args))) error("incorrect usage");
     SEXP x, a, b, c;
-    R_xlen_t i, n, na, nb, nc;
-    ran3 fn = rhyper;  /* the only current example */
+    R_xlen_t n, na, nb, nc;
 
-    args = CDR(args);
-    if (!isVector(CAR(args))) error(_("invalid arguments"));
-    if (LENGTH(CAR(args)) == 1) {
-#ifdef LONG_VECTOR_SUPPORT
-	double dn = asReal(CAR(args));
-	if (ISNAN(dn) || dn < 0 || dn > R_XLEN_T_MAX)
-	    error(_("invalid arguments"));
-	n = (R_xlen_t) dn;
-#else
-	n = asInteger(CAR(args));
-	if (n == NA_INTEGER || n < 0)
-	    error(_("invalid arguments"));
-#endif
+    if (!isNumeric(sa) || !isNumeric(sb) || !isNumeric(sc)) {
+	error(_("invalid arguments"));
     }
-    else n = XLENGTH(CAR(args));
-    PROTECT(x = allocVector(INTSXP, n));
+    n = resultLength(sn);
+    PROTECT(x = allocVector(type, n));
     if (n == 0) {
 	UNPROTECT(1);
 	return(x);
     }
-
-    args = CDR(args); a = CAR(args);
-    args = CDR(args); b = CAR(args);
-    args = CDR(args); c = CAR(args);
-    if (!isNumeric(a) || !isNumeric(b) || !isNumeric(c))
-	error(_("invalid arguments"));
-    na = XLENGTH(a);
-    nb = XLENGTH(b);
-    nc = XLENGTH(c);
+    na = XLENGTH(sa);
+    nb = XLENGTH(sb);
+    nc = XLENGTH(sc);
     if (na < 1 || nb < 1 || nc < 1) {
-	for (i = 0; i < n; i++) INTEGER(x)[i] = NA_INTEGER;
-	warning(_("NAs produced"));
+        fillWithNAs(x, n, type);
     }
     else {
 	Rboolean naflag = FALSE;
-	PROTECT(a = coerceVector(a, REALSXP));
-	PROTECT(b = coerceVector(b, REALSXP));
-	PROTECT(c = coerceVector(c, REALSXP));
+	PROTECT(a = coerceVector(sa, REALSXP));
+	PROTECT(b = coerceVector(sb, REALSXP));
+	PROTECT(c = coerceVector(sc, REALSXP));
 	GetRNGstate();
-	double *ra = REAL(a), *rb = REAL(b), *rc = REAL(c), rx;
-	int *ix = INTEGER(x);
+	double *ra = REAL(a), *rb = REAL(b), *rc = REAL(c);
 	errno = 0;
-	for (R_xlen_t i = 0; i < n; i++) {
-//	    if ((i+1) % NINTERRUPT) R_CheckUserInterrupt();
-	    rx = fn(ra[i % na], rb[i % nb], rc[i % nc]);
-	    if (ISNAN(rx) || rx > INT_MAX || rx <= INT_MIN) {
-		naflag = TRUE;
-		ix[i] = NA_INTEGER;
-	    } else ix[i] = (int) rx;
+	if (type == INTSXP) {
+	    int *ix = INTEGER(x); double rx;
+	    errno = 0;
+	    for (R_xlen_t i = 0; i < n; i++) {
+//	        if ((i+1) % NINTERRUPT) R_CheckUserInterrupt();
+		rx = fn(ra[i % na], rb[i % nb], rc[i % nc]);
+		if (ISNAN(rx) || rx > INT_MAX || rx <= INT_MIN) {
+		    naflag = TRUE;
+		    ix[i] = NA_INTEGER;
+		} else ix[i] = (int) rx;
+	    }
+	} else {
+	    double *rx = REAL(x);
+	    errno = 0;
+	    for (R_xlen_t i = 0; i < n; i++) {
+//	        if ((i+1) % NINTERRUPT) R_CheckUserInterrupt();
+		rx[i] = fn(ra[i % na], rb[i % nb], rc[i % nc]);
+		if (ISNAN(rx[i])) naflag = TRUE;
+	    }
 	}
 	if (naflag) warning(_("NAs produced"));
-
 	PutRNGstate();
 	UNPROTECT(3);
     }
@@ -296,26 +289,53 @@ SEXP Random3(SEXP args)
     return x;
 }
 
+#define DEFRAND3_REAL(name) \
+    SEXP do_##name(SEXP sn, SEXP sa, SEXP sb, SEXP sc) { \
+        return random3(sn, sa, sb, sc, name, REALSXP); \
+    }
+
+#define DEFRAND3_INT(name) \
+    SEXP do_##name(SEXP sn, SEXP sa, SEXP sb, SEXP sc) { \
+        return random3(sn, sa, sb, sc, name, INTSXP); \
+    }
+
+DEFRAND3_INT(rhyper)
+
+static void FixupProb(double *p, int n)
+{
+    double sum = 0.0;
+    int npos = 0;
+    for (int i = 0; i < n; i++) {
+	if (!R_FINITE(p[i]))
+	    error(_("NA in probability vector"));
+	if (p[i] < 0.0)
+	    error(_("negative probability"));
+	if (p[i] > 0.0) {
+	    npos++;
+	    sum += p[i];
+	}
+    }
+    if (npos == 0) error(_("no positive probabilities"));
+    for (int i = 0; i < n; i++) p[i] /= sum;
+}
 
-SEXP Rmultinom(SEXP args)
+SEXP do_rmultinom(SEXP sn, SEXP ssize, SEXP prob)
 {
-    SEXP prob, ans, nms;
+    SEXP ans, nms;
     int n, size, k, i, ik;
     
-    args = CDR(args);
-    n	 = asInteger(CAR(args)); args = CDR(args);/* n= #{samples} */
-    size = asInteger(CAR(args)); args = CDR(args);/* X ~ Multi(size, prob) */
+    n	 = asInteger(sn);/* n= #{samples} */
+    size = asInteger(ssize);/* X ~ Multi(size, prob) */
     if (n == NA_INTEGER || n < 0)
 	error(_("invalid first argument 'n'"));
     if (size == NA_INTEGER || size < 0)
 	error(_("invalid second argument 'size'"));
-    prob = CAR(args);
     prob = coerceVector(prob, REALSXP);
     k = length(prob);/* k = #{components or classes} = X-vector length */
     if (MAYBE_REFERENCED(prob)) prob = duplicate(prob);/*as `do_sample' -- need this line? */
     PROTECT(prob);
     /* check and make sum = 1: */
-    FixupProb(REAL(prob), k, /*require_k = */ 0, TRUE);
+    FixupProb(REAL(prob), k);
     GetRNGstate();
     PROTECT(ans = allocMatrix(INTSXP, k, n));/* k x n : natural for columnwise store */
     for(i=ik = 0; i < n; i++, ik += k) {
diff --git a/src/library/stats/src/sbart.c b/src/library/stats/src/sbart.c
index c5a540a..ed734b9 100644
--- a/src/library/stats/src/sbart.c
+++ b/src/library/stats/src/sbart.c
@@ -4,10 +4,10 @@
  * According to the GAMFIT sources, this was derived from code by
  * Finbarr O'Sullivan.
  */
-#include <R.h>
-#include <Rmath.h>
 
 #include "modreg.h"
+#include <math.h>
+#include <Rmath.h>
 
 /* sbart() : The cubic spline smoother
    -------
@@ -19,13 +19,18 @@
 
  is itself called from	 qsbart() [./qsbart.f]	 which has only one work array
 */
+
+/***** TODO : allow to pass 'lambda' (not just 'spar') e.g. via uspar[0] *
+ **    ----  and signalling that via *isetup = 2
+ */
 void F77_SUB(sbart)
     (double *penalt, double *dofoff,
      double *xs, double *ys, double *ws, double *ssw,
      int *n, double *knot, int *nk, double *coef,
-     double *sz, double *lev, double *crit, int *icrit,
-     double *spar, int *ispar, int *iter, double *lspar,
-     double *uspar, double *tol, double *eps, int *isetup,
+     double *sz, double *lev, double *crit,
+     int *icrit, double *spar, int *ispar, int *iter,
+     double *lspar, double *uspar, double *tol, double *eps, double *Ratio,
+     int *isetup,
      double *xwy, double *hs0, double *hs1, double *hs2,
      double *hs3, double *sg0, double *sg1, double *sg2,
      double *sg3, double *abd, double *p1ip, double *p2ip,
@@ -59,8 +64,8 @@ void F77_SUB(sbart)
    ispar	indicating if spar is supplied (ispar=1) or to be estimated
    lspar, uspar lower and upper values for spar search;  0.,1. are good values
    tol, eps	used in Golden Search routine
-   isetup	setup indicator [initially 0
-   NB: this alters that, and it is a constant in the caller!
+   isetup	setup indicator initially 0 or 2 (if 'spar' is lambda)
+	NB: this alters that, and it is a constant in the caller!
    icrit	indicator saying which cross validation score is to be computed
 		0: none ;  1: GCV ;  2: CV ;  3: 'df matching'
    ld4		the leading dimension of abd (ie ld4=4)
@@ -73,7 +78,7 @@ void F77_SUB(sbart)
    lev(n)	vector of leverages
    crit		either ordinary or generalized CV score
    spar         if ispar != 1
-   lspar         == lambda (a function of spar and the design)
+   lspar         == lambda (a function of spar and the design if(setup != 1)
    iter		number of iterations needed for spar search (if ispar != 1)
    ier		error indicator
 		ier = 0 ___  everything fine
@@ -82,14 +87,15 @@ void F77_SUB(sbart)
 
  Working arrays/matrix
    xwy			X'Wy
-   hs0,hs1,hs2,hs3	the diagonals of the X'WX matrix
-   sg0,sg1,sg2,sg3	the diagonals of the Gram matrix SIGMA
-   abd (ld4,nk)		[ X'WX + lambda*SIGMA ] in diagonal form
-   p1ip(ld4,nk)		inner products between columns of L inverse
-   p2ip(ldnk,nk)	all inner products between columns of L inverse
-			where  L'L = [X'WX + lambda*SIGMA]  NOT REFERENCED
+   hs0,hs1,hs2,hs3	the non-zero diagonals of the X'WX matrix
+   sg0,sg1,sg2,sg3	the non-zero diagonals of the Gram matrix SIGMA
+   abd (ld4, nk)	[ X'WX + lambda*SIGMA ] = R'R in banded form; output = R
+   p1ip(ld4, nk)	inner products between columns of R^{-1}
+   p2ip(ldnk,nk)	all inner products between columns of R inverse
+			where  R'R = [X'WX + lambda*SIGMA]  NOT REFERENCED
 */
 
+// "Correct" ./sslvrg.f (line 129):   crit = 3 + (dofoff-df)**2
 #define CRIT(FX) (*icrit == 3 ? FX - 3. : FX)
 	/* cancellation in (3 + eps) - 3, but still...informative */
 
@@ -104,20 +110,21 @@ void F77_SUB(sbart)
 
     double a, b, d, e, p, q, r, u, v, w, x;
     double ax, fu, fv, fw, fx, bx, xm;
-    double t1, t2, tol1, tol2;
+    double tol1, tol2;
 
     int i, maxit;
-    Rboolean Fparabol = FALSE, tracing = (*ispar < 0);
+    Rboolean Fparabol = FALSE, tracing = (*ispar < 0), spar_is_lambda = FALSE;
 
     /* unnecessary initializations to keep  -Wall happy */
     d = 0.; fu = 0.; u = 0.;
+    // never computed if(spar_is_lambda)
     ratio = 1.;
 
 /*  Compute SIGMA, X' W X, X' W z, trace ratio, s0, s1.
 
-	SIGMA	-> sg0,sg1,sg2,sg3
-	X' W X	-> hs0,hs1,hs2,hs3
-	X' W Z	-> xwy
+	SIGMA	-> sg0,sg1,sg2,sg3   -- via sgram() in ./sgram.f
+	X' W X	-> hs0,hs1,hs2,hs3   \
+	X' W Z	-> xwy               _\ via stxwx() in ./stxwx.f
 */
 
 /* trevor fixed this 4/19/88
@@ -127,48 +134,61 @@ void F77_SUB(sbart)
 	if (ws[i] > 0.)
 	    ws[i] = sqrt(ws[i]);
 
-    if (*isetup == 0) {
+    if (*isetup < 0)
+	spar_is_lambda = TRUE;
+    else if (*isetup != 1) { // 0 or 2
 	/* SIGMA[i,j] := Int  B''(i,t) B''(j,t) dt  {B(k,.) = k-th B-spline} */
 	F77_CALL(sgram)(sg0, sg1, sg2, sg3, knot, nk);
 	F77_CALL(stxwx)(xs, ys, ws, n,
 			knot, nk,
 			xwy,
 			hs0, hs1, hs2, hs3);
-	/* Compute ratio :=  tr(X' W X) / tr(SIGMA) */
-	t1 = t2 = 0.;
-	for (i = 3 - 1; i < (*nk - 3); ++i) {
-	    t1 += hs0[i];
-	    t2 += sg0[i];
+	spar_is_lambda = (*isetup == 2);
+	if(!spar_is_lambda) {
+	    /* Compute ratio :=  tr(X' W X) / tr(SIGMA) */
+	    double t1 = 0., t2 = 0.;
+	    for (i = 3 - 1; i < (*nk - 3); ++i) {
+		t1 += hs0[i];
+		t2 += sg0[i];
+	    }
+	    ratio = t1 / t2;
 	}
-	ratio = t1 / t2;
 	*isetup = 1;
     }
 /*     Compute estimate */
 
+// Compute SSPLINE(SPAR), assign result to *crit (and the auxil.variables)
+#define SSPLINE_COMP(_SPAR_)						\
+    *lspar = spar_is_lambda ? _SPAR_					\
+                            : ratio * R_pow(16., (_SPAR_) * 6. - 2.);   \
+    F77_CALL(sslvrg)(penalt, dofoff, xs, ys, ws, ssw, n,		\
+		     knot, nk,						\
+		     coef, sz, lev, crit, icrit, lspar, xwy,		\
+		     hs0, hs1, hs2, hs3,				\
+		     sg0, sg1, sg2, sg3, abd,				\
+		     p1ip, p2ip, ld4, ldnk, ier)
+
     if (*ispar == 1) { /* Value of spar supplied */
-	*lspar = ratio * R_pow(16., *spar * 6. - 2.);
-	F77_CALL(sslvrg)(penalt, dofoff, xs, ys, ws, ssw, n,
-			 knot, nk,
-			 coef, sz, lev, crit, icrit, lspar, xwy,
-			 hs0, hs1, hs2, hs3,
-			 sg0, sg1, sg2, sg3, abd,
-			 p1ip, p2ip, ld4, ldnk, ier);
+	SSPLINE_COMP(*spar);
 	/* got through check 2 */
+	*Ratio = ratio;
 	return;
     }
 
 /* ELSE ---- spar not supplied --> compute it ! ---------------------------
+ */
+    ax = *lspar;
+    bx = *uspar;
 
+/*
        Use Forsythe Malcom and Moler routine to MINIMIZE criterion
        f denotes the value of the criterion
 
        an approximation	x  to the point where	f  attains a minimum  on
        the interval  (ax,bx)  is determined.
-    */
-    ax = *lspar;
-    bx = *uspar;
 
-/* INPUT
+
+   INPUT
 
    ax	 left endpoint of initial interval
    bx	 right endpoint of initial interval
@@ -229,14 +249,7 @@ void F77_SUB(sbart)
     w = v;
     x = v;
     e = 0.;
-    *spar = x;
-    *lspar = ratio * R_pow(16., *spar * 6. - 2.);
-    F77_CALL(sslvrg)(penalt, dofoff, xs, ys, ws, ssw, n,
-		     knot, nk,
-		     coef, sz, lev, crit, icrit, lspar, xwy,
-		     hs0, hs1, hs2, hs3,
-		     sg0, sg1, sg2, sg3, abd,
-		     p1ip, p2ip, ld4, ldnk, ier);
+    SSPLINE_COMP(x);
     fx = *crit;
     fv = fx;
     fw = fx;
@@ -336,14 +349,7 @@ void F77_SUB(sbart)
 	u = x + ((fabs(d) >= tol1) ? d : fsign(tol1, d));
 	/*  tol1 check : f must not be evaluated too close to x */
 
-	*spar = u;
-	*lspar = ratio * R_pow(16., *spar * 6. - 2.);
-	F77_CALL(sslvrg)(penalt, dofoff, xs, ys, ws, ssw, n,
-			 knot, nk,
-			 coef, sz, lev, crit, icrit, lspar, xwy,
-			 hs0, hs1, hs2, hs3,
-			 sg0, sg1, sg2, sg3, abd,
-			 p1ip, p2ip, ld4, ldnk, ier);
+	SSPLINE_COMP(u);
 	fu = *crit;
 	if(tracing) Rprintf("%11g %12g\n", *lspar, CRIT(fu));
 	if(!R_FINITE(fu)) {
@@ -374,6 +380,7 @@ void F77_SUB(sbart)
 
  L_End:
     if(tracing) Rprintf("  >>> %12g %12g\n", *lspar, CRIT(fx));
+    *Ratio = ratio;
     *spar = x;
     *crit = fx;
     return;
diff --git a/src/library/stats/src/sgram.f b/src/library/stats/src/sgram.f
index 0629490..a0e50cc 100644
--- a/src/library/stats/src/sgram.f
+++ b/src/library/stats/src/sgram.f
@@ -4,7 +4,7 @@ C PURPOSE
 C       Calculation of the cubic B-spline smoothness prior
 C       for "usual" interior knot setup.
 C       Uses BSPVD and INTRV in the CMLIB
-C       sgm[0-3](nb)    Symmetric matrix
+C       sgm[0-3](nb)    Symmetric matrix 'SIGMA'
 C                       whose (i,j)'th element contains the integral of
 C                       B''(i,.) B''(j,.) , i=1,2 ... nb and j=i,...nb.
 C                       Only the upper four diagonals are computed.
@@ -20,123 +20,122 @@ c     -------------
       DOUBLE precision vnikx(4,3),work(16),yw1(4),yw2(4), wpt
 c
       integer interv
-      external interv
+      external interv ! in ../../../appl/interv.c
 
       lentb=nb+4
 C Initialise the sigma vectors
-      do 1 i=1,nb
+      do i=1,nb
          sg0(i)=0.d0
          sg1(i)=0.d0
          sg2(i)=0.d0
          sg3(i)=0.d0
- 1    continue
+      end do
 
       ileft = 1
-      do 2 i=1,nb
-C     Calculate a linear approximation to the
-C     second derivative of the non-zero B-splines
-C     over the interval [tb(i),tb(i+1)].
-C     call intrv(tb(1),(nb+1),tb(i),ilo,ileft,mflag)
+      do i=1,nb
+C        Calculate a linear approximation to the second derivative of the
+C        non-zero B-splines over the interval [tb(i),tb(i+1)].
          ileft = interv(tb(1), nb+1,tb(i), 0,0, ileft, mflag)
-C     Left end second derivatives
-C     call bspvd (tb,4,3,tb(i),ileft,4,vnikx,work)
+
+C        Left end second derivatives
          call bsplvd (tb,lentb,4,tb(i),ileft,work,vnikx,3)
-C     Put values into yw1
-         do 4 ii=1,4
+
+C        Put values into yw1
+         do ii=1,4
             yw1(ii) = vnikx(ii,3)
- 4       continue
+         end do
 
-C     Right end second derivatives
-C     call bspvd (tb,4,3,tb(i+1),ileft,4,vnikx,work)
+C        Right end second derivatives
          call bsplvd (tb,lentb,4,tb(i+1),ileft,work,vnikx,3)
 
-C     Slope*(length of interval) in Linear Approximation to B''
-         do    6 ii=1,4
+C        Slope*(length of interval) in Linear Approximation to B''
+         do ii=1,4
             yw2(ii) = vnikx(ii,3) - yw1(ii)
- 6       continue
+         end do
 
+C        Calculate Contributions to the sigma vectors
          wpt = tb(i+1) - tb(i)
-C     Calculate Contributions to the sigma vectors
          if(ileft.ge.4) then
-            do 10 ii=1,4
+            do ii=1,4
                jj=ii
                sg0(ileft-4+ii) = sg0(ileft-4+ii) +
      &              wpt*(yw1(ii)*yw1(jj)+
      &                   (yw2(ii)*yw1(jj) + yw2(jj)*yw1(ii))*0.5d0
      &                  + yw2(ii)*yw2(jj)*0.3330d0)
                jj=ii+1
-               if(jj.le.4)then
+               if(jj.le.4) then
                   sg1(ileft+ii-4) = sg1(ileft+ii-4) +
      &                 wpt* (yw1(ii)*yw1(jj) +
      *                       (yw2(ii)*yw1(jj) + yw2(jj)*yw1(ii))*0.5d0
      &                       +yw2(ii)*yw2(jj)*0.3330d0 )
                endif
                jj=ii+2
-               if(jj.le.4)then
+               if(jj.le.4) then
                   sg2(ileft+ii-4) = sg2(ileft+ii-4) +
      &                 wpt* (yw1(ii)*yw1(jj) +
      *                       (yw2(ii)*yw1(jj) + yw2(jj)*yw1(ii))*0.5d0
      &                       +yw2(ii)*yw2(jj)*0.3330d0 )
                endif
                jj=ii+3
-               if(jj.le.4)then
+               if(jj.le.4) then
                   sg3(ileft+ii-4) = sg3(ileft+ii-4) +
      &                 wpt* (yw1(ii)*yw1(jj) +
      *                       (yw2(ii)*yw1(jj) + yw2(jj)*yw1(ii))*0.5d0
      &                       +yw2(ii)*yw2(jj)*0.3330d0 )
                endif
- 10         continue
+            end do
 
-         else if(ileft.eq.3)then
-            do    20 ii=1,3
+         else if(ileft.eq.3) then
+            do ii=1,3
                jj=ii
                sg0(ileft-3+ii) = sg0(ileft-3+ii) +
      &                 wpt* (yw1(ii)*yw1(jj) +
      *                       (yw2(ii)*yw1(jj) + yw2(jj)*yw1(ii))*0.5d0
      &                       +yw2(ii)*yw2(jj)*0.3330d0 )
                jj=ii+1
-               if(jj.le.3)then
+               if(jj.le.3) then
                   sg1(ileft+ii-3) = sg1(ileft+ii-3) +
      &                 wpt* (yw1(ii)*yw1(jj) +
      *                       (yw2(ii)*yw1(jj) + yw2(jj)*yw1(ii))*0.5d0
      &                       +yw2(ii)*yw2(jj)*0.3330d0 )
                endif
                jj=ii+2
-               if(jj.le.3)then
+               if(jj.le.3) then
                   sg2(ileft+ii-3) = sg2(ileft+ii-3) +
      &                 wpt* (yw1(ii)*yw1(jj) +
      *                       (yw2(ii)*yw1(jj) + yw2(jj)*yw1(ii))*0.5d0
      &                       +yw2(ii)*yw2(jj)*0.3330d0 )
                endif
- 20         continue
+            end do
 
-         else if(ileft.eq.2)then
-            do    28 ii=1,2
+         else if(ileft.eq.2) then
+            do ii=1,2
                jj=ii
                sg0(ileft-2+ii) = sg0(ileft-2+ii) +
      &                 wpt* (yw1(ii)*yw1(jj) +
      *                       (yw2(ii)*yw1(jj) + yw2(jj)*yw1(ii))*0.5d0
      &                       +yw2(ii)*yw2(jj)*0.3330d0 )
                jj=ii+1
-               if(jj.le.2)then
+               if(jj.le.2) then
                   sg1(ileft+ii-2) = sg1(ileft+ii-2) +
      &                 wpt* (yw1(ii)*yw1(jj) +
      *                       (yw2(ii)*yw1(jj) + yw2(jj)*yw1(ii))*0.5d0
      &                       +yw2(ii)*yw2(jj)*0.3330d0 )
                endif
- 28         continue
+            end do
+
 
-         else if(ileft.eq.1)then
-            do 34 ii=1,1
+         else if(ileft.eq.1) then
+            do ii=1,1
                jj=ii
                sg0(ileft-1+ii) = sg0(ileft-1+ii) +
      &                 wpt* (yw1(ii)*yw1(jj) +
      *                       (yw2(ii)*yw1(jj) + yw2(jj)*yw1(ii))*0.5d0
      &                       +yw2(ii)*yw2(jj)*0.3330d0 )
- 34         continue
-
+            end do
          endif
- 2    continue
+
+      end do
 
       return
       end
diff --git a/src/library/stats/src/smooth.c b/src/library/stats/src/smooth.c
index e316caf..cec481f 100644
--- a/src/library/stats/src/smooth.c
+++ b/src/library/stats/src/smooth.c
@@ -1,6 +1,6 @@
 /*
  *  R : A Computer Language for Statistical Data Analysis
- *  Copyright (C) 1997-2008   The R Core Team.
+ *  Copyright (C) 1997-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
@@ -14,7 +14,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  */
 
 /* Tukey Median Smoothing */
@@ -25,12 +25,11 @@
 
 #include <stdlib.h> /* for abs */
 #include <math.h>
-#include <R_ext/Boolean.h>
-#include <R_ext/Error.h>
-#include <R_ext/Memory.h>
 
-typedef enum { 
-    sm_NO_ENDRULE, sm_COPY_ENDRULE, sm_TUKEY_ENDRULE 
+#include <Rinternals.h> /* Arith.h, Boolean.h, Error.h, Memory.h .. */
+
+typedef enum {
+    sm_NO_ENDRULE, sm_COPY_ENDRULE, sm_TUKEY_ENDRULE
 } R_SM_ENDRULE;
 
 #ifdef ENABLE_NLS
@@ -67,13 +66,20 @@ static int imed3(double u, double v, double w)
     /* else */ return -1;
 }
 
-static Rboolean sm_3(double *x, double *y, int n, int end_rule)
+static Rboolean sm_3(double *x, double *y, R_xlen_t n, int end_rule)
 {
     /* y[] := Running Median of three (x) = "3 (x[])" with "copy ends"
      * ---  return chg := ( y != x ) */
-    int i,j;
+    R_xlen_t i;
+    int j;
     Rboolean chg = FALSE;
 
+    if (n <= 2) {
+        for(i=0; i < n; i++)
+	   y[i] = x[i];
+        return FALSE;
+    }
+
     for(i = 1; i < n-1; i++) {
 	j = imed3(x[i-1], x[i], x[i+1]);
 	y[i] = x[i + j];
@@ -82,22 +88,22 @@ static Rboolean sm_3(double *x, double *y, int n, int end_rule)
 /* [y, chg]  :=  sm_DO_ENDRULE(x, y, end_rule, chg) : */
 #define sm_DO_ENDRULE(y)						\
     switch(end_rule) {							\
-	   case sm_NO_ENDRULE:						\
+    case sm_NO_ENDRULE:							\
 	   /* do nothing : don't even assign them */ break;		\
 									\
-	   case sm_COPY_ENDRULE:					\
+    case sm_COPY_ENDRULE: /* 1 */					\
 	   y[0] = x[0];							\
 	   y[n-1] = x[n-1];						\
 	   break;							\
 									\
-	   case sm_TUKEY_ENDRULE:					\
+    case sm_TUKEY_ENDRULE: /* 2 */					\
 	   y[0] = med3(3*y[1] - 2*y[2], x[0], y[1]);			\
 	   chg = chg || (y[0] != x[0]);					\
 	   y[n-1] = med3(y[n-2], x[n-1], 3*y[n-2] - 2*y[n-3]);		\
 	   chg = chg || (y[n-1] != x[n-1]);				\
 	   break;							\
 									\
-	   default:							\
+    default:								\
 	   error(_("invalid end-rule for running median of 3: %d"),	\
 		 end_rule);						\
     }
@@ -107,10 +113,10 @@ static Rboolean sm_3(double *x, double *y, int n, int end_rule)
     return chg;
 }
 
-static int sm_3R(double *x, double *y, double *z, int n, int end_rule)
+static int sm_3R(double *x, double *y, double *z, R_xlen_t n, int end_rule)
 {
     /* y[] := "3R"(x) ; 3R = Median of three, repeated until convergence */
-    int i, iter;
+    int iter;
     Rboolean chg;
 
     iter = chg = sm_3(x, y, n, sm_COPY_ENDRULE);
@@ -118,12 +124,12 @@ static int sm_3R(double *x, double *y, double *z, int n, int end_rule)
     while(chg) {
 	if((chg = sm_3(y, z, n, sm_NO_ENDRULE))) {
 	    iter++;
-	    for(i=1; i < n-1; i++)
+	    for(R_xlen_t i=1; i < n-1; i++)
 		y[i] = z[i];
 	}
     }
 
-    sm_DO_ENDRULE(y);/* =>  chg = TRUE  iff  ends changed */
+    if (n > 2) sm_DO_ENDRULE(y);/* =>  chg = TRUE  iff  ends changed */
 
     return(iter ? iter : chg);
     /* = 0   <==>  only one "3" w/o any change
@@ -133,7 +139,7 @@ static int sm_3R(double *x, double *y, double *z, int n, int end_rule)
 }
 
 
-static Rboolean sptest(double *x, int i)
+static Rboolean sptest(double *x, R_xlen_t i)
 {
     /* Split test:
        Are we at a /-\ or \_/ location => split should be made ?
@@ -145,15 +151,17 @@ static Rboolean sptest(double *x, int i)
 }
 
 
-static Rboolean sm_split3(double *x, double *y, int n, Rboolean do_ends)
+static Rboolean sm_split3(double *x, double *y, R_xlen_t n, Rboolean do_ends)
 {
     /* y[] := S(x[])  where S() = "sm_split3"  */
-    int i, j;
+    R_xlen_t i;
     Rboolean chg = FALSE;
 
     for(i=0; i < n; i++)
 	y[i] = x[i];
 
+    if (n <= 4) return FALSE;
+
     /* Colin Goodall doesn't do splits near ends
        in spl() in Statlib's "smoother" code !! */
     if(do_ends && sptest(x, 1)) {
@@ -164,6 +172,7 @@ static Rboolean sm_split3(double *x, double *y, int n, Rboolean do_ends)
 
     for(i=2; i < n-3; i++)
 	if(sptest(x, i)) { /* plateau at x[i] == x[i+1] */
+	    int j;
 	    /* at left : */
 	    if(-1 < (j = imed3(x[i ], x[i-1], 3*x[i-1] - 2*x[i-2]))) {
 		y[i]   = /* med3(.) = */ (j == 0)? x[i-1] : 3*x[i-1] - 2*x[i-2];
@@ -183,7 +192,7 @@ static Rboolean sm_split3(double *x, double *y, int n, Rboolean do_ends)
     return(chg);
 }
 
-static int sm_3RS3R(double *x, double *y, double *z, double *w, int n,
+static int sm_3RS3R(double *x, double *y, double *z, double *w, R_xlen_t n,
 	     int end_rule, Rboolean split_ends)
 {
     /* y[1:n] := "3R S 3R"(x[1:n]);  z = "work"; */
@@ -198,7 +207,7 @@ static int sm_3RS3R(double *x, double *y, double *z, double *w, int n,
     return(iter + (int)chg);
 }
 
-static int sm_3RSS(double *x, double *y, double *z, int n,
+static int sm_3RSS(double *x, double *y, double *z, R_xlen_t n,
 	    int end_rule, Rboolean split_ends)
 {
     /* y[1:n] := "3RSS"(x[1:n]);  z = "work"; */
@@ -213,14 +222,15 @@ static int sm_3RSS(double *x, double *y, double *z, int n,
     return(iter + (int)chg);
 }
 
-static int sm_3RSR(double *x, double *y, double *z, double *w, int n,
+static int sm_3RSR(double *x, double *y, double *z, double *w, R_xlen_t n,
 	    int end_rule, Rboolean split_ends)
 {
     /* y[1:n] := "3RSR"(x[1:n]);  z := residuals; w = "work"; */
 
 /*== "SR" (as follows) is stupid ! (MM) ==*/
 
-    int i, iter;
+    R_xlen_t i;
+    int iter;
     Rboolean chg, ch2;
 
     iter = sm_3R(x, y, z, n, end_rule);
@@ -248,7 +258,7 @@ static int sm_3RSR(double *x, double *y, double *z, double *w, int n,
 SEXP Rsm(SEXP x, SEXP stype, SEXP send)
 {
     int iend = asInteger(send), type = asInteger(stype);
-    int n = LENGTH(x);
+    R_xlen_t n = XLENGTH(x);
     SEXP ans = PROTECT(allocVector(VECSXP, 2));
     SEXP y = allocVector(REALSXP, n);
     SET_VECTOR_ELT(ans, 0, y);
@@ -262,40 +272,40 @@ SEXP Rsm(SEXP x, SEXP stype, SEXP send)
 	{
 	    double *z = (double *) R_alloc(n, sizeof(double));
 	    double *w = (double *) R_alloc(n, sizeof(double));
-	    iter = sm_3RS3R(REAL(x), REAL(y), z, w, n, abs(iend), 
-			      iend ? TRUE : FALSE);
+	    iter = sm_3RS3R(REAL(x), REAL(y), z, w, n, abs(iend),
+			    /* split_ends: */ (iend < 0) ? TRUE : FALSE);
 	    break;
 	}
 	case 2:
 	{
 	    double *z = (double *) R_alloc(n, sizeof(double));
-	    iter = sm_3RSS(REAL(x), REAL(y), z, n, abs(iend), 
-			      iend ? TRUE : FALSE);
+	    iter = sm_3RSS(REAL(x), REAL(y), z, n, abs(iend),
+			   /* split_ends: */ (iend < 0) ? TRUE : FALSE);
 	    break;
 	}
 	case 3:
 	{
 	    double *z = (double *) R_alloc(n, sizeof(double));
 	    double *w = (double *) R_alloc(n, sizeof(double));
-	    iter = sm_3RSR(REAL(x), REAL(y), z, w, n, abs(iend), 
-			   iend ? TRUE : FALSE);
+	    iter = sm_3RSR(REAL(x), REAL(y), z, w, n, abs(iend),
+			   /* split_ends: */ (iend < 0) ? TRUE : FALSE);
 	    break;
 	}
-	case 4:
+	case 4: // "3R"
 	{
 	    double *z = (double *) R_alloc(n, sizeof(double));
 	    iter = sm_3R(REAL(x), REAL(y), z, n, iend);
 	}
 	    break;
-	case 5:
+	case 5: // "3"
 	    iter = sm_3(REAL(x), REAL(y), n, iend);
 	}
 	SET_VECTOR_ELT(ans, 1, ScalarInteger(iter));
-	SET_STRING_ELT(nm, 1, mkChar("iter"));	
-    } else {
+	SET_STRING_ELT(nm, 1, mkChar("iter"));
+    } else { // type > 5  ==> =~ "S"
 	int changed = sm_split3(REAL(x), REAL(y), n, (Rboolean) iend);
 	SET_VECTOR_ELT(ans, 1, ScalarLogical(changed));
-	SET_STRING_ELT(nm, 1, mkChar("changed"));	
+	SET_STRING_ELT(nm, 1, mkChar("changed"));
     }
     UNPROTECT(1);
     return ans;
diff --git a/src/library/stats/src/splines.c b/src/library/stats/src/splines.c
index 875a19f..02cb85c 100644
--- a/src/library/stats/src/splines.c
+++ b/src/library/stats/src/splines.c
@@ -15,7 +15,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  */
 
 /*	Spline Interpolation
@@ -43,10 +43,10 @@
 #endif
 
 #include <R.h>
-#include <R_ext/Arith.h>
 #include <R_ext/Applic.h>
 #include <stdio.h>
 #include <errno.h>
+#include <math.h>
 
 /*
  *	Natural Splines
diff --git a/src/library/stats/src/sslvrg.f b/src/library/stats/src/sslvrg.f
index 7adea8c..9214e0e 100644
--- a/src/library/stats/src/sslvrg.f
+++ b/src/library/stats/src/sslvrg.f
@@ -1,4 +1,7 @@
 C Output from Public domain Ratfor, version 1.0
+
+c Smoothing Spline LeVeRaGes = SSLVRG
+c ----------------------------------- leverages = H_ii = diagonal entries of Hat matrix
       subroutine sslvrg(penalt,dofoff,x,y,w,ssw, n, knot,nk,coef,
      *     sz,lev, crit,icrit, lambda, xwy, hs0,hs1,hs2,hs3,
      *     sg0,sg1,sg2,sg3, abd,p1ip,p2ip,ld4,ldnk,info)
@@ -13,7 +16,7 @@ C See comments in ./sbart.c from which this is called
      &     knot(nk+4), coef(nk),sz(n),lev(n), crit, lambda,
      *     xwy(nk), hs0(nk),hs1(nk),hs2(nk),hs3(nk),
      *     sg0(nk),sg1(nk),sg2(nk),sg3(nk), abd(ld4,nk),
-     &     p1ip(ld4,nk),p2ip(ldnk,nk)
+     &     p1ip(ld4,nk), p2ip(ldnk,nk)
 
       EXTERNAL bvalue
       double precision bvalue
@@ -23,7 +26,7 @@ C local variables
       double precision b0,b1,b2,b3,eps, xv,rss,df, sumw
 c
       integer interv
-      external interv
+      external interv ! in ../../../appl/interv.c
 
       lenkno = nk+4
       ileft = 1
@@ -31,45 +34,46 @@ c
 
 C compute the coefficients coef() of estimated smooth
 
-      do 1 i=1,nk
+      do i=1,nk
          coef(i) = xwy(i)
          abd(4,i) = hs0(i)+lambda*sg0(i)
- 1    continue
+      end do
 
-      do 4 i=1,(nk-1)
+      do i=1,(nk-1)
          abd(3,i+1) = hs1(i)+lambda*sg1(i)
- 4    continue
+      end do
 
-      do 6 i=1,(nk-2)
- 6       abd(2,i+2) = hs2(i)+lambda*sg2(i)
+      do i=1,(nk-2)
+         abd(2,i+2) = hs2(i)+lambda*sg2(i)
+      end do
 
-      do 8 i=1,(nk-3)
- 8       abd(1,i+3) = hs3(i)+lambda*sg3(i)
+      do i=1,(nk-3)
+         abd(1,i+3) = hs3(i)+lambda*sg3(i)
+      end do
 
-c     factorize banded matrix abd:
+c     factorize banded matrix abd (into upper triangular):
       call dpbfa(abd,ld4,nk,3,info)
       if(info.ne.0) then
 C        matrix could not be factorized -> ier := info
          return
       endif
-c     solve linear system (from factorize abd):
+c     solve linear system (from factorized abd):
       call dpbsl(abd,ld4,nk,3,coef)
 
 C     Value of smooth at the data points
-      do 12 i=1,n
+      do i=1,n
          xv = x(i)
- 12      sz(i) = bvalue(knot,coef,nk,4,xv,0)
+         sz(i) = bvalue(knot,coef,nk,4,xv,0)
+      end do
 
-C     Compute the criterion function if requested
+C     Compute the criterion function if requested (icrit > 0) :
+      if(icrit .ge. 1) then
 
-      if(icrit .eq. 0)then
-         return
-      else
 C --- Ordinary or Generalized CV or "df match" ---
 
 C     Get Leverages First
-         call sinerp(abd,ld4,nk,p1ip,p2ip,ldnk,0)
-         do 16 i=1,n
+         call sinerp(abd,ld4,nk,p1ip,p2ip,ldnk, 0)
+         do i=1,n
             xv = x(i)
             ileft = interv(knot(1), nk+1, xv, 0,0, ileft, mflag)
             if(mflag .eq. -1) then
@@ -93,43 +97,47 @@ C           call bspvd(knot,4,1,xv,ileft,4,vnikx,work)
      *           2.d0*p1ip(2,j+1)*b1*b3 +    p1ip(4,j+2)*b2**2 +
      &           2.d0*p1ip(3,j+2)*b2*b3 +    p1ip(4,j+3)*b3**2
      &           )*w(i)**2
- 16      continue
+         end do
+
 
 C     Evaluate Criterion
 
-         if(icrit .eq. 1)then
-C     Generalized CV
+         df = 0d0
+         if(icrit .eq. 1) then ! Generalized CV --------------------
             rss = ssw
-            df = 0d0
             sumw = 0d0
 c       w(i) are sqrt( wt[i] ) weights scaled in ../R/smspline.R such
 c       that sumw =  number of observations with w(i) > 0
-            do 24 i=1,n
+            do i=1,n
                rss = rss + ((y(i)-sz(i))*w(i))**2
                df = df + lev(i)
                sumw = sumw + w(i)**2
- 24         continue
+            end do
 
             crit = (rss/sumw)/((1d0-(dofoff + penalt*df)/sumw)**2)
 c            call dblepr("spar", 4, spar, 1)
 c            call dblepr("crit", 4, crit, 1)
 
-         else if(icrit .eq. 2) then
-C     Ordinary CV
-               crit = 0d0
-               do 30 i = 1,n
- 30               crit = crit + (((y(i)-sz(i))*w(i))/(1-lev(i)))**2
-               crit = crit/n
+         else if(icrit .eq. 2) then ! Ordinary CV ------------------
+            crit = 0d0
+            do i = 1,n
+               crit = crit + (((y(i)-sz(i))*w(i))/(1-lev(i)))**2
+            end do
+            crit = crit/n
 c            call dblepr("spar", 4, spar, 1)
 c            call dblepr("crit", 4, crit, 1)
-            else
-C     df matching
-            crit = 0d0
-            do 32 i=1,n
- 32            crit = crit+lev(i)
-            crit = 3 + (dofoff-crit)**2
+
+         else ! df := sum( lev[i] )
+            do i=1,n
+               df = df + lev(i)
+            end do
+            if(icrit .eq. 3) then ! df matching --------------------
+               crit = 3 + (dofoff-df)**2
+            else ! if(icrit .eq. 4) then df - dofoff (=> zero finding)
+               crit = df - dofoff
+            endif
          endif
-         return
       endif
 C     Criterion evaluation
+      return
       end
diff --git a/src/library/stats/src/starma.c b/src/library/stats/src/starma.c
index 339042f..1b17de1 100644
--- a/src/library/stats/src/starma.c
+++ b/src/library/stats/src/starma.c
@@ -14,14 +14,12 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/.
+ *  https://www.R-project.org/Licenses/.
  */
 
 #ifdef HAVE_CONFIG_H
 # include <config.h>
 #endif
-/* do this first to get the right options for math.h */
-#include <R_ext/Arith.h>
 
 #include <R.h>
 #include "ts.h"
@@ -386,7 +384,7 @@ forkal(Starma G, int d, int il, double *delta, double *y, double *amse,
 
     sigma2 = 0.0;
     for (j = 0; j < nt; j++) {
-	/* MacOS X/gcc 3.5 does/didn't have isnan defined properly */
+	/* macOS/gcc 3.5 didn't have isnan defined properly */
 	tmp = G->resid[j];
 	if(!ISNAN(tmp)) { nu++; sigma2 += tmp * tmp; }
     }
diff --git a/src/library/stats/src/stats.h b/src/library/stats/src/stats.h
index 25a7a48..ba75ba2 100644
--- a/src/library/stats/src/stats.h
+++ b/src/library/stats/src/stats.h
@@ -1,6 +1,6 @@
 /*
  *  R : A Computer Language for Statistical Data Analysis
- *  Copyright (C) 2005-12   The R Core Team
+ *  Copyright (C) 2005-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
@@ -14,7 +14,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  */
 
 #ifndef R_STATS_H
@@ -31,21 +31,26 @@
 
 #include <R_ext/RS.h>
 void
-F77_SUB(hclust)(int *n, int *len, int *iopt, int *ia, int *ib,
-		double *crit, double *membr, int *nn,
-		double *disnn, int *flag, double *diss);
+F77_NAME(hclust)(int *n, int *len, int *iopt, int *ia, int *ib,
+		 double *crit, double *membr, int *nn,
+		 double *disnn, int *flag, double *diss);
 
 void
-F77_SUB(hcass2)(int *n, int *ia, int *ib, int *iorder, int *iia, int *iib);
+F77_NAME(hcass2)(int *n, int *ia, int *ib, int *iorder, int *iia, int *iib);
 
 void
-F77_SUB(kmns)(double *a, int *m, int *n, double *c, int *k,
-	      int *ic1, int *ic2, int *nc, double * an1, double *an2,
-	      int *ncp, double *d, int *itran,
-	      int *live, int *iter, double *wss, int *ifault);
+F77_NAME(kmns)(double *a, int *m, int *n, double *c, int *k,
+	       int *ic1, int *ic2, int *nc, double * an1, double *an2,
+	       int *ncp, double *d, int *itran,
+	       int *live, int *iter, double *wss, int *ifault);
 
 
 void rcont2(int *nrow, int *ncol, int *nrowt, int *ncolt, int *ntotal,
 	    double *fact, int *jwork, int *matrix);
 
+double R_zeroin2(double ax, double bx, double fa, double fb, 
+		 double (*f)(double x, void *info), void *info, 
+		 double *Tol, int *Maxit);
+
+
 #endif
diff --git a/src/library/stats/src/statsR.h b/src/library/stats/src/statsR.h
index b049a02..38eb855 100644
--- a/src/library/stats/src/statsR.h
+++ b/src/library/stats/src/statsR.h
@@ -14,7 +14,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  */
 
 /* auxiliary */
@@ -45,6 +45,109 @@ SEXP lowess(SEXP x, SEXP y, SEXP sf, SEXP siter, SEXP sdelta);
 SEXP DoubleCentre(SEXP A);
 SEXP BinDist(SEXP x, SEXP weights, SEXP slo, SEXP sup, SEXP sn);
 
+SEXP do_dchisq(SEXP sa, SEXP sb, SEXP sI);
+SEXP do_dexp(SEXP sa, SEXP sb, SEXP sI);
+SEXP do_dgeom(SEXP sa, SEXP sb, SEXP sI);
+SEXP do_dpois(SEXP sa, SEXP sb, SEXP sI);
+SEXP do_dt(SEXP sa, SEXP sb, SEXP sI);
+SEXP do_dsignrank(SEXP sa, SEXP sb, SEXP sI);
+SEXP do_pchisq(SEXP sa, SEXP sb, SEXP sI, SEXP sJ);
+SEXP do_qchisq(SEXP sa, SEXP sb, SEXP sI, SEXP sJ);
+SEXP do_pexp(SEXP sa, SEXP sb, SEXP sI, SEXP sJ);
+SEXP do_qexp(SEXP sa, SEXP sb, SEXP sI, SEXP sJ);
+SEXP do_pgeom(SEXP sa, SEXP sb, SEXP sI, SEXP sJ);
+SEXP do_qgeom(SEXP sa, SEXP sb, SEXP sI, SEXP sJ);
+SEXP do_ppois(SEXP sa, SEXP sb, SEXP sI, SEXP sJ);
+SEXP do_qpois(SEXP sa, SEXP sb, SEXP sI, SEXP sJ);
+SEXP do_pt(SEXP sa, SEXP sb, SEXP sI, SEXP sJ);
+SEXP do_qt(SEXP sa, SEXP sb, SEXP sI, SEXP sJ);
+SEXP do_psignrank(SEXP sa, SEXP sb, SEXP sI, SEXP sJ);
+SEXP do_qsignrank(SEXP sa, SEXP sb, SEXP sI, SEXP sJ);
+
+SEXP do_dbeta(SEXP sa, SEXP sb, SEXP sc, SEXP sI);
+SEXP do_dbinom(SEXP sa, SEXP sb, SEXP sc, SEXP sI);
+SEXP do_dcauchy(SEXP sa, SEXP sb, SEXP sc, SEXP sI);
+SEXP do_df(SEXP sa, SEXP sb, SEXP sc, SEXP sI);
+SEXP do_dgamma(SEXP sa, SEXP sb, SEXP sc, SEXP sI);
+SEXP do_dlnorm(SEXP sa, SEXP sb, SEXP sc, SEXP sI);
+SEXP do_dlogis(SEXP sa, SEXP sb, SEXP sc, SEXP sI);
+SEXP do_dnbinom(SEXP sa, SEXP sb, SEXP sc, SEXP sI);
+SEXP do_dnbinom_mu(SEXP sa, SEXP sb, SEXP sc, SEXP sI);
+SEXP do_dnorm(SEXP sa, SEXP sb, SEXP sc, SEXP sI);
+SEXP do_dweibull(SEXP sa, SEXP sb, SEXP sc, SEXP sI);
+SEXP do_dunif(SEXP sa, SEXP sb, SEXP sc, SEXP sI);
+SEXP do_dnt(SEXP sa, SEXP sb, SEXP sc, SEXP sI);
+SEXP do_dnchisq(SEXP sa, SEXP sb, SEXP sc, SEXP sI);
+SEXP do_dwilcox(SEXP sa, SEXP sb, SEXP sc, SEXP sI);
+SEXP do_pbeta(SEXP sa, SEXP sb, SEXP sc, SEXP sI, SEXP sJ);
+SEXP do_qbeta(SEXP sa, SEXP sb, SEXP sc, SEXP sI, SEXP sJ);
+SEXP do_pbinom(SEXP sa, SEXP sb, SEXP sc, SEXP sI, SEXP sJ);
+SEXP do_qbinom(SEXP sa, SEXP sb, SEXP sc, SEXP sI, SEXP sJ);
+SEXP do_pcauchy(SEXP sa, SEXP sb, SEXP sc, SEXP sI, SEXP sJ);
+SEXP do_qcauchy(SEXP sa, SEXP sb, SEXP sc, SEXP sI, SEXP sJ);
+SEXP do_pf(SEXP sa, SEXP sb, SEXP sc, SEXP sI, SEXP sJ);
+SEXP do_qf(SEXP sa, SEXP sb, SEXP sc, SEXP sI, SEXP sJ);
+SEXP do_pgamma(SEXP sa, SEXP sb, SEXP sc, SEXP sI, SEXP sJ);
+SEXP do_qgamma(SEXP sa, SEXP sb, SEXP sc, SEXP sI, SEXP sJ);
+SEXP do_plnorm(SEXP sa, SEXP sb, SEXP sc, SEXP sI, SEXP sJ);
+SEXP do_qlnorm(SEXP sa, SEXP sb, SEXP sc, SEXP sI, SEXP sJ);
+SEXP do_plogis(SEXP sa, SEXP sb, SEXP sc, SEXP sI, SEXP sJ);
+SEXP do_qlogis(SEXP sa, SEXP sb, SEXP sc, SEXP sI, SEXP sJ);
+SEXP do_pnbinom(SEXP sa, SEXP sb, SEXP sc, SEXP sI, SEXP sJ);
+SEXP do_qnbinom(SEXP sa, SEXP sb, SEXP sc, SEXP sI, SEXP sJ);
+SEXP do_pnbinom_mu(SEXP sa, SEXP sb, SEXP sc, SEXP sI, SEXP sJ);
+SEXP do_qnbinom_mu(SEXP sa, SEXP sb, SEXP sc, SEXP sI, SEXP sJ);
+SEXP do_pnorm(SEXP sa, SEXP sb, SEXP sc, SEXP sI, SEXP sJ);
+SEXP do_qnorm(SEXP sa, SEXP sb, SEXP sc, SEXP sI, SEXP sJ);
+SEXP do_pweibull(SEXP sa, SEXP sb, SEXP sc, SEXP sI, SEXP sJ);
+SEXP do_qweibull(SEXP sa, SEXP sb, SEXP sc, SEXP sI, SEXP sJ);
+SEXP do_punif(SEXP sa, SEXP sb, SEXP sc, SEXP sI, SEXP sJ);
+SEXP do_qunif(SEXP sa, SEXP sb, SEXP sc, SEXP sI, SEXP sJ);
+SEXP do_pnt(SEXP sa, SEXP sb, SEXP sc, SEXP sI, SEXP sJ);
+SEXP do_qnt(SEXP sa, SEXP sb, SEXP sc, SEXP sI, SEXP sJ);
+SEXP do_pnchisq(SEXP sa, SEXP sb, SEXP sc, SEXP sI, SEXP sJ);
+SEXP do_qnchisq(SEXP sa, SEXP sb, SEXP sc, SEXP sI, SEXP sJ);
+SEXP do_pwilcox(SEXP sa, SEXP sb, SEXP sc, SEXP sI, SEXP sJ);
+SEXP do_qwilcox(SEXP sa, SEXP sb, SEXP sc, SEXP sI, SEXP sJ);
+
+SEXP do_dhyper(SEXP sa, SEXP sb, SEXP sc, SEXP sd, SEXP sI);
+SEXP do_dnbeta(SEXP sa, SEXP sb, SEXP sc, SEXP sd, SEXP sI);
+SEXP do_dnf(SEXP sa, SEXP sb, SEXP sc, SEXP sd, SEXP sI);
+SEXP do_phyper(SEXP sa, SEXP sb, SEXP sc, SEXP sd, SEXP sI, SEXP sJ);
+SEXP do_qhyper(SEXP sa, SEXP sb, SEXP sc, SEXP sd, SEXP sI, SEXP sJ);
+SEXP do_pnbeta(SEXP sa, SEXP sb, SEXP sc, SEXP sd, SEXP sI, SEXP sJ);
+SEXP do_qnbeta(SEXP sa, SEXP sb, SEXP sc, SEXP sd, SEXP sI, SEXP sJ);
+SEXP do_pnf(SEXP sa, SEXP sb, SEXP sc, SEXP sd, SEXP sI, SEXP sJ);
+SEXP do_qnf(SEXP sa, SEXP sb, SEXP sc, SEXP sd, SEXP sI, SEXP sJ);
+SEXP do_ptukey(SEXP sa, SEXP sb, SEXP sc, SEXP sd, SEXP sI, SEXP sJ);
+SEXP do_qtukey(SEXP sa, SEXP sb, SEXP sc, SEXP sd, SEXP sI, SEXP sJ);
+
+SEXP do_rchisq(SEXP sn, SEXP sa);
+SEXP do_rexp(SEXP sn, SEXP sa);
+SEXP do_rgeom(SEXP sn, SEXP sa);
+SEXP do_rpois(SEXP sn, SEXP sa);
+SEXP do_rt(SEXP sn, SEXP sa);
+SEXP do_rsignrank(SEXP sn, SEXP sa);
+
+SEXP do_rbeta(SEXP sn, SEXP sa, SEXP sb);
+SEXP do_rbinom(SEXP sn, SEXP sa, SEXP sb);
+SEXP do_rcauchy(SEXP sn, SEXP sa, SEXP sb);
+SEXP do_rf(SEXP sn, SEXP sa, SEXP sb);
+SEXP do_rgamma(SEXP sn, SEXP sa, SEXP sb);
+SEXP do_rlnorm(SEXP sn, SEXP sa, SEXP sb);
+SEXP do_rlogis(SEXP sn, SEXP sa, SEXP sb);
+SEXP do_rnbinom(SEXP sn, SEXP sa, SEXP sb);
+SEXP do_rnorm(SEXP sn, SEXP sa, SEXP sb);
+SEXP do_runif(SEXP sn, SEXP sa, SEXP sb);
+SEXP do_rweibull(SEXP sn, SEXP sa, SEXP sb);
+SEXP do_rwilcox(SEXP sn, SEXP sa, SEXP sb);
+SEXP do_rnchisq(SEXP sn, SEXP sa, SEXP sb);
+SEXP do_rnbinom_mu(SEXP sn, SEXP sa, SEXP sb);
+
+SEXP do_rhyper(SEXP sn, SEXP sa, SEXP sb, SEXP sc);
+
+SEXP do_rmultinom(SEXP sn, SEXP ssize, SEXP sprob);
+
 /* Declarations for .External[2] entry points */
 
 SEXP compcases(SEXP args);
@@ -58,15 +161,8 @@ SEXP nlm(SEXP call, SEXP op, SEXP args, SEXP rho);
 SEXP zeroin2(SEXP call, SEXP op, SEXP args, SEXP rho);
 SEXP optim(SEXP call, SEXP op, SEXP args, SEXP rho);
 SEXP optimhess(SEXP call, SEXP op, SEXP args, SEXP rho);
-SEXP Rmultinom(SEXP args);
 SEXP call_dqagi(SEXP);
 SEXP call_dqags(SEXP);
-SEXP Random1(SEXP args);
-SEXP Random2(SEXP args);
-SEXP Random3(SEXP args);
-SEXP distn2(SEXP args);
-SEXP distn3(SEXP args);
-SEXP distn4(SEXP args);
 
 SEXP Rsm(SEXP x, SEXP stype, SEXP send);
 SEXP tukeyline(SEXP x, SEXP y, SEXP call);
@@ -96,6 +192,7 @@ SEXP pRho(SEXP q, SEXP sn, SEXP lower);
 SEXP SWilk(SEXP x);
 
 SEXP bw_den(SEXP nbin, SEXP sx);
+SEXP bw_den_binned(SEXP sx);
 SEXP bw_ucv(SEXP sn, SEXP sd, SEXP cnt, SEXP sh);
 SEXP bw_bcv(SEXP sn, SEXP sd, SEXP cnt, SEXP sh);
 SEXP bw_phi4(SEXP sn, SEXP sd, SEXP cnt, SEXP sh);
diff --git a/src/library/stats/src/stxwx.f b/src/library/stats/src/stxwx.f
index b4b5f0a..2e9ac2e 100644
--- a/src/library/stats/src/stxwx.f
+++ b/src/library/stats/src/stxwx.f
@@ -10,24 +10,24 @@ C local
       integer lenxk, i,j, ileft,mflag
 c
       integer interv
-      external interv
+      external interv ! in ../../../appl/interv.c
 
       lenxk=n+4
 C     Initialise the output vectors
-      do 1 i=1,n
+      do i=1,n
          y(i)=0d0
          hs0(i)=0d0
          hs1(i)=0d0
          hs2(i)=0d0
          hs3(i)=0d0
- 1    continue
+      end do
 
 C Compute X' W^2 X -> hs0,hs1,hs2,hs3  and X' W^2 Z -> y
 C Note that here the weights w(i) == sqrt(wt[i])  where wt[] where original weights
       ileft=1
       eps= .1d-9
 
-      do 100 i=1,k
+      do i=1,k
          ileft= interv(xknot(1), n+1, x(i), 0,0, ileft, mflag)
 C        if(mflag==-1) {write(6,'("Error in hess ",i2)')mflag;stop}
 C        if(mflag==-1) {return}
@@ -59,7 +59,8 @@ C        else{write(6,'("Error in hess ",i2)')mflag;stop}}
          j= ileft-4+4
          y(j) = y(j)+w(i)**2*z(i)*vnikx(4,1)
          hs0(j)=hs0(j)+w(i)**2*vnikx(4,1)**2
- 100  continue
+
+      enddo
 
       return
       end
diff --git a/src/library/stats/src/swilk.c b/src/library/stats/src/swilk.c
index b4478b4..263ee60 100644
--- a/src/library/stats/src/swilk.c
+++ b/src/library/stats/src/swilk.c
@@ -1,6 +1,6 @@
 /*
  *  R : A Computer Language for Statistical Data Analysis
- *  Copyright (C) 2000-12   The R Core Team.
+ *  Copyright (C) 2000-2016   The R Core Team.
  *
  *  Based on Applied Statistics algorithms AS181, R94
  *    (C) Royal Statistical Society 1982, 1995
@@ -17,12 +17,14 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  */
 
 /* swilk.f -- translated by f2c (version 19980913).
  * ------- and produced by f2c-clean,v 1.8 --- and hand polished: M.Maechler
  */
+
+#include <math.h>
 #include <Rmath.h>
 
 #ifndef min
diff --git a/src/library/stats/src/ts.h b/src/library/stats/src/ts.h
index 69ea1c1..97d5c0e 100644
--- a/src/library/stats/src/ts.h
+++ b/src/library/stats/src/ts.h
@@ -1,6 +1,6 @@
 /*
  *  R : A Computer Language for Statistical Data Analysis
- *  Copyright (C) 2001-12   The R Core Team.
+ *  Copyright (C) 2001-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
@@ -14,7 +14,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  */
 
 #ifndef R_TS_H
@@ -35,15 +35,15 @@ void HoltWinters (double *x, int *xl, double *alpha, double *beta,
 		  double *trend, double *season);
 
 void
-F77_SUB(eureka)(int *lr, double *r__, double *g,
-		double *f, double *var, double *a);
+F77_NAME(eureka)(int *lr, double *r__, double *g,
+		 double *f, double *var, double *a);
 
 void
-F77_SUB(stl)(double *y, int *n, int *np, int *ns,
-	     int *nt, int *nl, int *isdeg, int *itdeg, int *ildeg,
-	     int *nsjump, int *ntjump, int *nljump, int *ni,
-	     int *no, double *rw, double *season, double *trend,
-	     double *work);
+F77_NAME(stl)(double *y, int *n, int *np, int *ns,
+	      int *nt, int *nl, int *isdeg, int *itdeg, int *ildeg,
+	      int *nsjump, int *ntjump, int *nljump, int *ni,
+	      int *no, double *rw, double *season, double *trend,
+	      double *work);
 
 typedef struct
 {
diff --git a/src/library/stats/src/zeroin.c b/src/library/stats/src/zeroin.c
index 540dc69..a3e8b15 100644
--- a/src/library/stats/src/zeroin.c
+++ b/src/library/stats/src/zeroin.c
@@ -1,6 +1,6 @@
 /*
  *  R : A Computer Language for Statistical Data Analysis
- *  Copyright (C) 1999, 2001 the R Core Team
+ *  Copyright (C) 1999-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
@@ -14,7 +14,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  */
 
 /* from NETLIB c/brent.shar with max.iter, add'l info and convergence
diff --git a/src/library/stats/tests/anorexia.rda b/src/library/stats/tests/anorexia.rda
new file mode 100644
index 0000000..446cafb
Binary files /dev/null and b/src/library/stats/tests/anorexia.rda differ
diff --git a/src/library/stats/tests/arimaML.R b/src/library/stats/tests/arimaML.R
index def9d8d..338066c 100644
--- a/src/library/stats/tests/arimaML.R
+++ b/src/library/stats/tests/arimaML.R
@@ -84,7 +84,7 @@ Q0bis <- function(phi,theta, tol=.Machine$double.eps) {
     A %*% S %*% t(A)
     ## == 2 x 2 Block matrix product; A = [A1 | A2 ]
     ## == A1 SX A1' + A1 SXZ A2' + (A1 SXZ A2')' + A2 A2'
-    
+
 }## {Q0bis}
 
 ## The second way is to resolve brutally the equation of Gardner et al. in the
@@ -173,7 +173,7 @@ lapply(ev3.0, round, digits=3) ## problem for q >= 1 (none for q=0)
 ev3.bis <- lapply(chks, function(ck) t(sapply(lapply(ck, `[[`, "Q0bis"), EV.k, k=3)))
 lapply(ev3.bis[-1], round, digits=3) ## all fine
 e1.bis <- sapply(ev3.bis, function(m) m[,1])
-min(e1.bis) # -7.1e-15 , -7.5e-15 
+min(e1.bis) # -7.1e-15 , -7.5e-15
 stopifnot(e1.bis > -1e-12)
 
 
@@ -182,7 +182,7 @@ phi <- mkPhi(s = 12)
 theta <- 0.7
 true.cf <- c(ar1=phi[1], ma1=theta, sar1=phi[12])
 tt <- chkQ0(phi,theta, tol=0.50, doEigen=TRUE)
-tt$eigen 
+tt$eigen
 
 out.0 <- makeARIMA(phi, theta, NULL)
 out.R <- makeARIMA(phi, theta, NULL, SSinit="Rossignol")
@@ -223,3 +223,43 @@ arima(x, order= c(1,0,1), seasonal= list(period=12, order=c(1,0,0)),
 
 stopifnot(all.equal(confint(fm1),
                     confint(fm2), tol = 4e-4))
+
+###---------- PR#16278 --------------------------------------
+
+##  xreg  *and*  differentiation order d >= 1 :
+set.seed(0)
+n <- 5
+x <- cumsum(rnorm(n, sd=0.01))
+Vr <- var(diff(x))                 # 6.186e-5 : REML
+V. <- var(diff(x)) * (n-2) / (n-1) # 4.640e-5 : ML
+
+f00   <- arima0(x, c(0,1,0), method="ML", xreg=1:n)
+(fit1 <- arima (x, c(0,1,0), method="ML", xreg=1:n))
+stopifnot(all.equal(fit1$sigma2, V.), fit1$nobs == n-1,
+	  all.equal(fit1$loglik, 14.28, tol=4e-4),
+	  all.equal(f00$sigma2, fit1$sigma2),
+	  all.equal(f00$loglik, fit1$loglik))
+
+(fit2 <- arima (x, c(0,2,0), method="ML", xreg=(1:n)^2))
+stopifnot(all.equal(fit2$sigma2, 0.000109952342),
+          all.equal(fit2$loglik, 9.4163797), fit2$nobs == n-2)
+
+## "well"-fitting higher order model  {optim failed in R <= 3.0.1)
+n <- length(x. <- c(1:4,3:-2,2*(0:3),4:5,5:-4)/32)
+xr <- poly(x., 3)
+x. <- cumsum(cumsum(cumsum(x.))) + xr %*% 10^(0:2)
+(fit3 <- arima (x., c(0,3,0), method="ML", xreg = xr))
+stopifnot(fit3$ nobs == n-3,
+	  all.equal(fit3$ sigma2, 0.00859843, tol = 1e-6),
+	  all.equal(fit3$ loglik, 22.06043, tol = 1e-6),
+          all.equal(unname(coef(fit3)),
+                    c(0.70517, 9.9415, 100.106), tol = 1e-5))
+
+x.[5:6] <- NA
+(fit3N <- arima (x., c(0,3,0), method="ML", xreg = xr))
+stopifnot(fit3N$ nobs == n-3-2, # ==  #{obs} - d - #{NA}
+	  all.equal(fit3N$ sigma2, 0.009297345, tol = 1e-6),
+	  all.equal(fit3N$ loglik, 16.73918,    tol = 1e-6),
+	  all.equal(unname(coef(fit3N)),
+		    c(0.64904, 9.92660, 100.126), tol = 1e-5))
+
diff --git a/src/library/stats/tests/bandwidth.R b/src/library/stats/tests/bandwidth.R
new file mode 100644
index 0000000..d416544
--- /dev/null
+++ b/src/library/stats/tests/bandwidth.R
@@ -0,0 +1,19 @@
+### Sanity checks for some of the Jan 2017 breakage.
+
+options(digits = 5)
+
+## UCV, BCV and SJ all gave wrong answers in example(bw.ucv)
+c(nrd0 = bw.nrd0(precip), nrd = bw.nrd(precip),
+  ucv = bw.ucv(precip), bcv = bw.bcv(precip),
+  "SJ-dpi" = bw.SJ(precip, method = "dpi"),
+  "SJ-ste" = bw.SJ(precip, method = "ste"))
+
+## wrong answers/errors in R < 3.3.3 for largish datasets
+set.seed(1); bw.bcv(rnorm(6000))
+set.seed(1); x <- rnorm(47000)
+bw.ucv(x); bw.SJ(x,  method = "dpi"); bw.SJ(x,  method = "ste")
+
+## An extremely unbalanced example where counts exceed INT_MAX
+## Prior to R 3.4.0 was slow as O(n^2)
+set.seed(1); bw.SJ(c(runif(65537), 1e7))
+
diff --git a/src/library/stats/tests/bandwidth.Rout.save b/src/library/stats/tests/bandwidth.Rout.save
new file mode 100644
index 0000000..bf598cb
--- /dev/null
+++ b/src/library/stats/tests/bandwidth.Rout.save
@@ -0,0 +1,49 @@
+
+R version 3.4.0 RC (2017-04-18 r72543) -- "You Stupid Darkness"
+Copyright (C) 2017 The R Foundation for Statistical Computing
+Platform: x86_64-pc-linux-gnu (64-bit)
+
+R is free software and comes with ABSOLUTELY NO WARRANTY.
+You are welcome to redistribute it under certain conditions.
+Type 'license()' or 'licence()' for distribution details.
+
+R is a collaborative project with many contributors.
+Type 'contributors()' for more information and
+'citation()' on how to cite R or R packages in publications.
+
+Type 'demo()' for some demos, 'help()' for on-line help, or
+'help.start()' for an HTML browser interface to help.
+Type 'q()' to quit R.
+
+> ### Sanity checks for some of the Jan 2017 breakage.
+> 
+> options(digits = 5)
+> 
+> ## UCV, BCV and SJ all gave wrong answers in example(bw.ucv)
+> c(nrd0 = bw.nrd0(precip), nrd = bw.nrd(precip),
++   ucv = bw.ucv(precip), bcv = bw.bcv(precip),
++   "SJ-dpi" = bw.SJ(precip, method = "dpi"),
++   "SJ-ste" = bw.SJ(precip, method = "ste"))
+  nrd0    nrd    ucv    bcv SJ-dpi SJ-ste 
+3.8479 4.5320 4.8619 6.6808 4.0220 3.9318 
+Warning message:
+In bw.bcv(precip) : minimum occurred at one end of the range
+> 
+> ## wrong answers/errors in R < 3.3.3 for largish datasets
+> set.seed(1); bw.bcv(rnorm(6000))
+[1] 0.18471
+> set.seed(1); x <- rnorm(47000)
+> bw.ucv(x); bw.SJ(x,  method = "dpi"); bw.SJ(x,  method = "ste")
+[1] 0.047906
+[1] 0.12257
+[1] 0.12282
+> 
+> ## An extremely unbalanced example where counts exceed INT_MAX
+> ## Prior to R 3.4.0 was slow as O(n^2)
+> set.seed(1); bw.SJ(c(runif(65537), 1e7))
+[1] 6.4053e-05
+> 
+> 
+> proc.time()
+   user  system elapsed 
+  0.202   0.017   0.208 
diff --git a/src/library/stats/tests/birthwt.rda b/src/library/stats/tests/birthwt.rda
new file mode 100644
index 0000000..caa79e8
Binary files /dev/null and b/src/library/stats/tests/birthwt.rda differ
diff --git a/src/library/stats/tests/drop1-polr.R b/src/library/stats/tests/drop1-polr.R
index 962cc86..3e4eb09 100644
--- a/src/library/stats/tests/drop1-polr.R
+++ b/src/library/stats/tests/drop1-polr.R
@@ -2,7 +2,7 @@
 ### correct formula environment
 
 library(stats)
-stopifnot(require(MASS))
+if(!require(MASS)) q()
 
 regr <- function(formula, data, ...)
 {
@@ -16,17 +16,15 @@ i.polr <- function(form, data, ...)
     lfo <- form
     d2 <- data
     environment(lfo) <- environment()
-    lreg <- polr(lfo, data=d2, ...)
-    do.drop(lreg, lreg1$coef, ltesttype="Chisq")
+    lreg <- polr(lfo, data = d2, ...)
+    do.drop(lreg, lreg1$coef, ltesttype = "Chisq")
 }
 
 do.drop <- function(lreg, lcoeftab, ltesttype)
-{
-    drop1(lreg, test=ltesttype, scope=terms(lreg), trace=FALSE)
-}
+    drop1(lreg, test = ltesttype, scope = terms(lreg), trace = FALSE)
 
 m  <- polr(Sat ~ Infl + Type + Cont, data = housing)
 rr <- regr(formula(m), data = housing)
 dr1 <- drop1(m)
 stopifnot(is.data.frame(rr),
-	  all.equal(rr[-(3:4)], dr1, check.attributes=FALSE))
+	  all.equal(rr[-(3:4)], dr1, check.attributes = FALSE))
diff --git a/src/library/stats/tests/glm.Rout.save b/src/library/stats/tests/glm.Rout.save
index 915e64a..62bc771 100644
--- a/src/library/stats/tests/glm.Rout.save
+++ b/src/library/stats/tests/glm.Rout.save
@@ -1,7 +1,7 @@
 
-R version 3.1.2 RC (2014-10-29 r66897) -- "Pumpkin Helmet"
-Copyright (C) 2014 The R Foundation for Statistical Computing
-Platform: x86_64-unknown-linux-gnu (64-bit)
+R version 3.4.0 RC (2017-04-18 r72543) -- "You Stupid Darkness"
+Copyright (C) 2017 The R Foundation for Statistical Computing
+Platform: x86_64-pc-linux-gnu (64-bit)
 
 R is free software and comes with ABSOLUTELY NO WARRANTY.
 You are welcome to redistribute it under certain conditions.
@@ -29,4 +29,4 @@ Warning messages:
 > 
 > proc.time()
    user  system elapsed 
-  0.112   0.011   0.115 
+  0.168   0.012   0.170 
diff --git a/src/library/stats/tests/hills.rda b/src/library/stats/tests/hills.rda
new file mode 100644
index 0000000..4f3d4ff
Binary files /dev/null and b/src/library/stats/tests/hills.rda differ
diff --git a/src/library/stats/tests/ig_glm.R b/src/library/stats/tests/ig_glm.R
index fa66152..b64c79a 100644
--- a/src/library/stats/tests/ig_glm.R
+++ b/src/library/stats/tests/ig_glm.R
@@ -2,6 +2,7 @@
 ## David Firth, Feb 2009.
 
 options(digits=5)
+have_MASS <- requireNamespace('MASS', quietly = TRUE)
 
 ##  Data from Whitmore, G A (1986), Inverse Gaussian Ratio Estimation.
 ##  Applied Statistics 35(1), 8-15.
@@ -27,7 +28,10 @@ coef(summary(fit))
 (beta.exact <- sum(y)/sum(x))
 stopifnot(all.equal(beta.exact, as.vector(coef(fit))))
 ## and for a confidence interval via confint
-(ci <- confint(fit, 1, level = 0.95))
+if(have_MASS) {
+    ci <- confint(fit, 1, level = 0.95)
+    print(ci)
+}
 ## and via asymptotic normality
 sterr <- coef(summary(fit))[, "Std. Error"]
 coef(fit) + (1.96 * sterr * c(-1, 1))
@@ -39,12 +43,15 @@ fit2 <- glm(y ~ I(1/x) - 1, weights = x^2,
             epsilon = 1e-12)
 coef(summary(fit2))
 ## which gives the same CIs both ways
-ci1 <- rev(1/(confint(fit2, 1, level = 0.95)))
-sterr <- (summary(fit2)$coefficients)[, "Std. Error"]
-ci2 <- 1/(coef(fit2) - (1.96 * sterr * c(-1, 1)))
-stopifnot(all.equal(as.vector(ci), as.vector(ci1), tolerance = 1e-5),
-          all.equal(as.vector(ci), ci2, tolerance = 1e-3))
-
+if(have_MASS) {
+    ci1 <- rev(1/(confint(fit2, 1, level = 0.95)))
+    print(ci1)
+    sterr <- (summary(fit2)$coefficients)[, "Std. Error"]
+    ci2 <- 1/(coef(fit2) - (1.96 * sterr * c(-1, 1)))
+    print(ci2)
+    stopifnot(all.equal(as.vector(ci), as.vector(ci1), tolerance = 1e-5),
+              all.equal(as.vector(ci), ci2, tolerance = 1e-3))
+}
 ##  because the log likelihood for 1/beta is exactly quadratic.
 
 ##  The approximate intervals above differ slightly from the exact
@@ -54,7 +61,7 @@ stopifnot(all.equal(as.vector(ci), as.vector(ci1), tolerance = 1e-5),
 
 
 ## Now simulate from this model
-if(require("SuppDists")) {
+if(requireNamespace("SuppDists")) {
     print( ys <- simulate(fit, nsim = 3, seed = 1) )
     for(i in seq_len(3))
         print(coef(summary(update(fit, ys[, i] ~ .))))
diff --git a/src/library/stats/tests/ks-test.R b/src/library/stats/tests/ks-test.R
index dc380ec..fe68a53 100644
--- a/src/library/stats/tests/ks-test.R
+++ b/src/library/stats/tests/ks-test.R
@@ -1,4 +1,6 @@
-## some examples of the KS test
+#### Some examples of the KS and Wilcoxon tests
+
+### ------ Kolmogorov Smirnov (KS) --------------
 
 ## unrealistic one of PR#14561
 ds1 <- c(1.7,2,3,3,4,4,5,5,6,6)
@@ -20,3 +22,95 @@ ks.test(round(ds2, 2), "pnorm", exact = TRUE)
 ks.test(round(ds2, 1), "pnorm")
 ks.test(round(ds2, 1), "pnorm", exact = TRUE)
 
+
+### ------ Wilkoxon (Mann Whitney) --------------
+
+options(nwarnings = 1000)
+(alts <- setNames(, eval(formals(stats:::wilcox.test.default)$alternative)))
+x0 <- 0:4
+(x.set <- list(s0 = lapply(x0, function(m) 0:m),
+               s. = lapply(x0, function(m) c(1e-9, seq_len(m)))))
+stats <- setNames(nm = c("statistic", "p.value", "conf.int", "estimate"))
+
+## Even with  conf.int = TRUE, do not want errors :
+RR <-
+    lapply(x.set, ## for all data sets
+           function(xs)
+               lapply(alts, ## for all three alternatives
+                      function(alt)
+                          lapply(xs, function(x)
+                              ## try(
+                              wilcox.test(x, exact=TRUE, conf.int=TRUE, alternative = alt)
+                              ## )
+                              )))
+length(ww <- warnings()) # 52 (or 43 for x0 <- 0:3)
+unique(ww) # 4 different ones
+
+cc <- lapply(RR, function(A) lapply(A, function(bb) lapply(bb, class)))
+table(unlist(cc))
+## in R <= 3.3.1,  with try( .. ) above, we got
+## htest try-error
+##    23         7
+uc <- unlist(cc[["s0"]]); noquote(names(uc)[uc != "htest"]) ## these 7 cases :
+## two.sided1 two.sided2 two.sided3
+## less1      less2
+## greater1   greater2
+
+##--- How close are the stats of  (0:m)  to those of  (eps, 1:m) ------------
+
+## a version that still works with above try(.) and errors there:
+getC <- function(L, C) if(inherits(L,"try-error")) c(L) else L[[C]]
+stR <- lapply(stats, function(COMP)
+           lapply(RR, function(A)
+               lapply(A, function(bb)
+                   lapply(bb, getC, C=COMP) )))
+
+## a) P-value
+pv <- stR[["p.value"]]
+## only the first is NaN, all others in [0,1]:
+sapply(pv$s0, unlist)
+sapply(pv$s., unlist) # not really close, but ..
+
+pv$s0$two.sided[1] <-  1 ## artificially
+stopifnot(all.equal(pv$s0, pv$s., tol = 0.5 + 1e-6), # seen 0.5
+	  ## "less" are close:
+	  all.equal(unlist(pv[[c("s0","less")]]),
+		    unlist(pv[[c("s.","less")]]), tol = 0.03),
+	  0 <= unlist(pv), unlist(pv) <= 1) # <- no further NA ..
+## b)
+sapply(stR[["statistic"]], unlist)
+## Conf.int.:
+## c)
+sapply(stR[["estimate" ]], unlist)
+## d) confidence interval
+formatCI <- function(ci)
+    sprintf("[%g, %g] (%g%%)", ci[[1]], ci[[2]],
+	    round(100*attr(ci,"conf.level")))
+nx <- length(x0)
+noquote(vapply(stR[["conf.int"]], function(ss)
+    vapply(ss, function(alt) vapply(alt, formatCI, ""), character(nx)),
+    matrix("", nx, length(alts))))
+
+
+##-------- 2-sample tests (working unchanged) ------------------
+
+R2 <- lapply(alts, ## for all three alternatives
+             function(alt)
+                 lapply(seq_along(x0), function(k)
+                         wilcox.test(x = x.set$s0[[k]], y = x.set$s.[[k]],
+                                     exact=TRUE, conf.int=TRUE, alternative = alt)))
+length(w2 <- warnings()) # 27
+unique(w2) # 3 different ones
+
+table(uc2 <- unlist(c2 <- lapply(R2, function(A) lapply(A, class))))
+stopifnot(uc2 == "htest")
+
+stR2 <- lapply(stats,
+               function(COMP)
+                   lapply(R2, function(A) lapply(A, getC, C=COMP)))
+
+lapply(stats[-3], ## -3: "conf.int" separately
+       function(ST) sapply(stR2[[ST]], unlist))
+
+noquote(sapply(stR2[["conf.int"]], function(.) vapply(., formatCI, "")))
+
diff --git a/src/library/stats/tests/ks-test.Rout.save b/src/library/stats/tests/ks-test.Rout.save
index 0d5d212..61b591d 100644
--- a/src/library/stats/tests/ks-test.Rout.save
+++ b/src/library/stats/tests/ks-test.Rout.save
@@ -1,7 +1,7 @@
 
-R version 3.1.2 RC (2014-10-29 r66897) -- "Pumpkin Helmet"
-Copyright (C) 2014 The R Foundation for Statistical Computing
-Platform: x86_64-unknown-linux-gnu (64-bit)
+R version 3.4.0 RC (2017-04-18 r72543) -- "You Stupid Darkness"
+Copyright (C) 2017 The R Foundation for Statistical Computing
+Platform: x86_64-pc-linux-gnu (64-bit)
 
 R is free software and comes with ABSOLUTELY NO WARRANTY.
 You are welcome to redistribute it under certain conditions.
@@ -15,7 +15,9 @@ Type 'demo()' for some demos, 'help()' for on-line help, or
 'help.start()' for an HTML browser interface to help.
 Type 'q()' to quit R.
 
-> ## some examples of the KS test
+> #### Some examples of the KS and Wilcoxon tests
+> 
+> ### ------ Kolmogorov Smirnov (KS) --------------
 > 
 > ## unrealistic one of PR#14561
 > ds1 <- c(1.7,2,3,3,4,4,5,5,6,6)
@@ -53,7 +55,7 @@ In ks.test(ds1, "pnorm", mean = 3.3, sd = 1.55216, exact = TRUE) :
 	One-sample Kolmogorov-Smirnov test
 
 data:  ds2
-D = 0.0194, p-value = 0.8452
+D = 0.019416, p-value = 0.8452
 alternative hypothesis: two-sided
 
 > ks.test(ds2, "pnorm", exact = TRUE)
@@ -61,7 +63,7 @@ alternative hypothesis: two-sided
 	One-sample Kolmogorov-Smirnov test
 
 data:  ds2
-D = 0.0194, p-value = 0.8379
+D = 0.019416, p-value = 0.8379
 alternative hypothesis: two-sided
 
 > ## next two are still close
@@ -70,7 +72,7 @@ alternative hypothesis: two-sided
 	One-sample Kolmogorov-Smirnov test
 
 data:  round(ds2, 2)
-D = 0.0192, p-value = 0.856
+D = 0.019169, p-value = 0.856
 alternative hypothesis: two-sided
 
 Warning message:
@@ -81,7 +83,7 @@ In ks.test(round(ds2, 2), "pnorm") :
 	One-sample Kolmogorov-Smirnov test
 
 data:  round(ds2, 2)
-D = 0.0192, p-value = 0.8489
+D = 0.019169, p-value = 0.8489
 alternative hypothesis: two-sided
 
 Warning message:
@@ -93,7 +95,7 @@ In ks.test(round(ds2, 2), "pnorm", exact = TRUE) :
 	One-sample Kolmogorov-Smirnov test
 
 data:  round(ds2, 1)
-D = 0.0367, p-value = 0.1344
+D = 0.03674, p-value = 0.1344
 alternative hypothesis: two-sided
 
 Warning message:
@@ -104,7 +106,7 @@ In ks.test(round(ds2, 1), "pnorm") :
 	One-sample Kolmogorov-Smirnov test
 
 data:  round(ds2, 1)
-D = 0.0367, p-value = 0.1311
+D = 0.03674, p-value = 0.1311
 alternative hypothesis: two-sided
 
 Warning message:
@@ -112,6 +114,252 @@ In ks.test(round(ds2, 1), "pnorm", exact = TRUE) :
   ties should not be present for the Kolmogorov-Smirnov test
 > 
 > 
+> ### ------ Wilkoxon (Mann Whitney) --------------
+> 
+> options(nwarnings = 1000)
+> (alts <- setNames(, eval(formals(stats:::wilcox.test.default)$alternative)))
+  two.sided        less     greater 
+"two.sided"      "less"   "greater" 
+> x0 <- 0:4
+> (x.set <- list(s0 = lapply(x0, function(m) 0:m),
++                s. = lapply(x0, function(m) c(1e-9, seq_len(m)))))
+$s0
+$s0[[1]]
+[1] 0
+
+$s0[[2]]
+[1] 0 1
+
+$s0[[3]]
+[1] 0 1 2
+
+$s0[[4]]
+[1] 0 1 2 3
+
+$s0[[5]]
+[1] 0 1 2 3 4
+
+
+$s.
+$s.[[1]]
+[1] 1e-09
+
+$s.[[2]]
+[1] 1e-09 1e+00
+
+$s.[[3]]
+[1] 1e-09 1e+00 2e+00
+
+$s.[[4]]
+[1] 1e-09 1e+00 2e+00 3e+00
+
+$s.[[5]]
+[1] 1e-09 1e+00 2e+00 3e+00 4e+00
+
+
+> stats <- setNames(nm = c("statistic", "p.value", "conf.int", "estimate"))
+> 
+> ## Even with  conf.int = TRUE, do not want errors :
+> RR <-
++     lapply(x.set, ## for all data sets
++            function(xs)
++                lapply(alts, ## for all three alternatives
++                       function(alt)
++                           lapply(xs, function(x)
++                               ## try(
++                               wilcox.test(x, exact=TRUE, conf.int=TRUE, alternative = alt)
++                               ## )
++                               )))
+There were 52 warnings (use warnings() to see them)
+> length(ww <- warnings()) # 52 (or 43 for x0 <- 0:3)
+[1] 52
+> unique(ww) # 4 different ones
+Warning messages:
+1: In wilcox.test.default(x, exact = TRUE, conf.int = TRUE,  ... :
+  cannot compute exact p-value with zeroes
+2: In wilcox.test.default(x, exact = TRUE, conf.int = TRUE,  ... :
+  cannot compute exact confidence interval with zeroes
+3: cannot compute confidence interval when all observations are zero or tied
+4: In wilcox.test.default(x, exact = TRUE, conf.int = TRUE,  ... :
+  requested conf.level not achievable
+> 
+> cc <- lapply(RR, function(A) lapply(A, function(bb) lapply(bb, class)))
+> table(unlist(cc))
+
+htest 
+   30 
+> ## in R <= 3.3.1,  with try( .. ) above, we got
+> ## htest try-error
+> ##    23         7
+> uc <- unlist(cc[["s0"]]); noquote(names(uc)[uc != "htest"]) ## these 7 cases :
+character(0)
+> ## two.sided1 two.sided2 two.sided3
+> ## less1      less2
+> ## greater1   greater2
+> 
+> ##--- How close are the stats of  (0:m)  to those of  (eps, 1:m) ------------
+> 
+> ## a version that still works with above try(.) and errors there:
+> getC <- function(L, C) if(inherits(L,"try-error")) c(L) else L[[C]]
+> stR <- lapply(stats, function(COMP)
++            lapply(RR, function(A)
++                lapply(A, function(bb)
++                    lapply(bb, getC, C=COMP) )))
+> 
+> ## a) P-value
+> pv <- stR[["p.value"]]
+> ## only the first is NaN, all others in [0,1]:
+> sapply(pv$s0, unlist)
+     two.sided      less    greater
+[1,]       NaN 1.0000000 1.00000000
+[2,] 1.0000000 0.9772499 0.50000000
+[3,] 0.3710934 0.9631809 0.18554668
+[4,] 0.1814492 0.9693156 0.09072460
+[5,] 0.1003482 0.9776951 0.05017412
+> sapply(pv$s., unlist) # not really close, but ..
+     two.sided less greater
+[1,]    1.0000    1 0.50000
+[2,]    0.5000    1 0.25000
+[3,]    0.2500    1 0.12500
+[4,]    0.1250    1 0.06250
+[5,]    0.0625    1 0.03125
+> 
+> pv$s0$two.sided[1] <-  1 ## artificially
+> stopifnot(all.equal(pv$s0, pv$s., tol = 0.5 + 1e-6), # seen 0.5
++ 	  ## "less" are close:
++ 	  all.equal(unlist(pv[[c("s0","less")]]),
++ 		    unlist(pv[[c("s.","less")]]), tol = 0.03),
++ 	  0 <= unlist(pv), unlist(pv) <= 1) # <- no further NA ..
+> ## b)
+> sapply(stR[["statistic"]], unlist)
+            s0 s.
+two.sided.V  0  1
+two.sided.V  1  3
+two.sided.V  3  6
+two.sided.V  6 10
+two.sided.V 10 15
+less.V       0  1
+less.V       1  3
+less.V       3  6
+less.V       6 10
+less.V      10 15
+greater.V    0  1
+greater.V    1  3
+greater.V    3  6
+greater.V    6 10
+greater.V   10 15
+> ## Conf.int.:
+> ## c)
+> sapply(stR[["estimate" ]], unlist)
+                          s0      s.
+two.sided1               NaN 1.0e-09
+two.sided.midrange       1.0 5.0e-01
+two.sided.(pseudo)median 1.5 1.0e+00
+two.sided.(pseudo)median 2.0 1.5e+00
+two.sided.(pseudo)median 2.5 2.0e+00
+less1                    NaN 1.0e-09
+less.midrange            1.0 5.0e-01
+less.(pseudo)median      1.5 1.0e+00
+less.(pseudo)median      2.0 1.5e+00
+less.(pseudo)median      2.5 2.0e+00
+greater1                 NaN 1.0e-09
+greater.midrange         1.0 5.0e-01
+greater.(pseudo)median   1.5 1.0e+00
+greater.(pseudo)median   2.0 1.5e+00
+greater.(pseudo)median   2.5 2.0e+00
+> ## d) confidence interval
+> formatCI <- function(ci)
++     sprintf("[%g, %g] (%g%%)", ci[[1]], ci[[2]],
++ 	    round(100*attr(ci,"conf.level")))
+> nx <- length(x0)
+> noquote(vapply(stR[["conf.int"]], function(ss)
++     vapply(ss, function(alt) vapply(alt, formatCI, ""), character(nx)),
++     matrix("", nx, length(alts))))
+, , s0
+
+     two.sided                less                  greater             
+[1,] [NaN, NaN] (0%)          [-Inf, NaN] (0%)      [NaN, Inf] (0%)     
+[2,] [NaN, NaN] (0%)          [-Inf, NaN] (0%)      [NaN, Inf] (0%)     
+[3,] [1.5, 1.5] (0%)          [-Inf, 1.5] (0%)      [1.50001, Inf] (20%)
+[4,] [1.00007, 2.99993] (60%) [-Inf, 2.00002] (60%) [1.00009, Inf] (80%)
+[5,] [1.00006, 3.99994] (80%) [-Inf, 3.00002] (80%) [1.00009, Inf] (90%)
+
+, , s.
+
+     two.sided           less                greater           
+[1,] [1e-09, 1e-09] (0%) [-Inf, 1e-09] (50%) [1e-09, Inf] (50%)
+[2,] [1e-09, 1] (50%)    [-Inf, 1] (75%)     [1e-09, Inf] (75%)
+[3,] [1e-09, 2] (75%)    [-Inf, 2] (87%)     [1e-09, Inf] (87%)
+[4,] [1e-09, 3] (88%)    [-Inf, 3] (95%)     [1e-09, Inf] (95%)
+[5,] [1e-09, 4] (95%)    [-Inf, 4] (95%)     [1e-09, Inf] (95%)
+
+> 
+> 
+> ##-------- 2-sample tests (working unchanged) ------------------
+> 
+> R2 <- lapply(alts, ## for all three alternatives
++              function(alt)
++                  lapply(seq_along(x0), function(k)
++                          wilcox.test(x = x.set$s0[[k]], y = x.set$s.[[k]],
++                                      exact=TRUE, conf.int=TRUE, alternative = alt)))
+There were 27 warnings (use warnings() to see them)
+> length(w2 <- warnings()) # 27
+[1] 27
+> unique(w2) # 3 different ones
+Warning messages:
+1: In wilcox.test.default(x = x.set$s0[[k]], y = x.set$s.[[k]],  ... :
+  Requested conf.level not achievable
+2: In wilcox.test.default(x = x.set$s0[[k]], y = x.set$s.[[k]],  ... :
+  cannot compute exact p-value with ties
+3: In wilcox.test.default(x = x.set$s0[[k]], y = x.set$s.[[k]],  ... :
+  cannot compute exact confidence intervals with ties
+> 
+> table(uc2 <- unlist(c2 <- lapply(R2, function(A) lapply(A, class))))
+
+htest 
+   15 
+> stopifnot(uc2 == "htest")
+> 
+> stR2 <- lapply(stats,
++                function(COMP)
++                    lapply(R2, function(A) lapply(A, getC, C=COMP)))
+> 
+> lapply(stats[-3], ## -3: "conf.int" separately
++        function(ST) sapply(stR2[[ST]], unlist))
+$statistic
+  two.sided less greater
+W       0.0  0.0     0.0
+W       1.5  1.5     1.5
+W       4.0  4.0     4.0
+W       7.5  7.5     7.5
+W      12.0 12.0    12.0
+
+$p.value
+     two.sided less   greater
+[1,]         1  0.5 1.0000000
+[2,]         1  0.5 0.7928919
+[3,]         1  0.5 0.6734524
+[4,]         1  0.5 0.6156105
+[5,]         1  0.5 0.5837406
+
+$estimate
+                           two.sided          less       greater
+difference in location -1.000000e-09 -1.000000e-09 -1.000000e-09
+difference in location -4.467848e-05 -4.467848e-05 -4.467848e-05
+difference in location -4.692131e-05 -4.692131e-05 -4.692131e-05
+difference in location  1.937902e-05  1.937902e-05  1.937902e-05
+difference in location  3.741417e-05  3.741417e-05  3.741417e-05
+
+> 
+> noquote(sapply(stR2[["conf.int"]], function(.) vapply(., formatCI, "")))
+     two.sided                 less                  greater              
+[1,] [-1e-09, -1e-09] (0%)     [-Inf, -1e-09] (50%)  [-1e-09, Inf] (50%)  
+[2,] [-1, 1] (95%)             [-Inf, 1] (95%)       [-1, Inf] (95%)      
+[3,] [-2, 2] (95%)             [-Inf, 2] (95%)       [-2, Inf] (95%)      
+[4,] [-3, 3] (95%)             [-Inf, 2.00005] (95%) [-2.00003, Inf] (95%)
+[5,] [-2.99998, 2.99996] (95%) [-Inf, 2.00005] (95%) [-2.00006, Inf] (95%)
+> 
+> 
 > proc.time()
    user  system elapsed 
-  0.120   0.010   0.122 
+  0.289   0.026   0.305 
diff --git a/src/library/stats/tests/nafns.R b/src/library/stats/tests/nafns.R
index a531306..f8b9177 100644
--- a/src/library/stats/tests/nafns.R
+++ b/src/library/stats/tests/nafns.R
@@ -1,5 +1,5 @@
 #  File src/library/stats/tests/nafns.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
 #  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
@@ -12,7 +12,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 ## Tests of functions handling NAs in fits
 ## These functions were introduced in 1.3.0.
@@ -108,6 +108,7 @@ stopifnot(max(abs(p1 - p2[common])) <= 256*.Machine$double.eps)
 stopifnot(all(is.na(p2[-common])))
 
 ## tests of diagnostic measures.
+set.seed(11)
 x <- 1:10
 y <- c(rnorm(9),NA)
 fit <- lm(y ~ x, na.action=na.exclude)
diff --git a/src/library/stats/tests/nls.R b/src/library/stats/tests/nls.R
index ac3707b..e823993 100644
--- a/src/library/stats/tests/nls.R
+++ b/src/library/stats/tests/nls.R
@@ -1,5 +1,5 @@
 #  File src/library/stats/tests/nls.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
 #  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
@@ -12,7 +12,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 ## tests of nls, especially of weighted fits
 
@@ -21,6 +21,9 @@ options(digits = 5) # to avoid trivial printed differences
 options(useFancyQuotes = FALSE) # avoid fancy quotes in o/p
 options(show.nls.convergence = FALSE) # avoid non-diffable output
 options(warn = 1)
+
+have_MASS <- requireNamespace('MASS', quietly = TRUE)
+
 pdf("nls-test.pdf")
 
 ## utility for comparing nls() results:  [TODO: use more often below]
@@ -52,8 +55,7 @@ curve(a+b*x+c*x^2, add = TRUE)
 nls(y ~ a+b*x+c*I(x^2), start = c(a=1, b=1, c=0.1), algorithm = "port")
 (fm <- nls(y ~ a+b*x+c*I(x^2), start = c(a=1, b=1, c=0.1),
            algorithm = "port", lower = c(0, 0, 0)))
-confint(fm)
-
+if(have_MASS) print(confint(fm))
 
 ## weighted nls fit: unsupported < 2.3.0
 set.seed(123)
@@ -149,9 +151,11 @@ for(m in names(pfm1))
 pfm5 <- profile(fm5)
 for(m in names(pfm1))
     stopifnot(all.equal(pfm1[[m]], pfm5[[m]], tolerance = 1e-5))
-(c1 <- confint(fm1))
-(c4 <- confint(fm4, 1:2))
-stopifnot(all.equal(c1[2:3, ], c4, tolerance = 1e-3))
+if(have_MASS) {
+    print(c1 <- confint(fm1))
+    print(c4 <- confint(fm4, 1:2))
+    stopifnot(all.equal(c1[2:3, ], c4, tolerance = 1e-3))
+}
 
 ## some low-dimensional examples
 npts <- 1000
@@ -170,16 +174,18 @@ s1 <- list(c(b=1), c(a=1,b=1), c(a=1,b=1,logc=0))
 for(p in 1:3) {
     fm <- nls(m1[[p]], start = s1[[p]])
     print(fm)
-    print(confint(fm))
-    fm <- nls(m1[[p]], start = s1[[p]], algorithm="port")
+    if(have_MASS) print(confint(fm))
+    fm <- nls(m1[[p]], start = s1[[p]], algorithm = "port")
     print(fm)
-    print(confint(fm))
+    if(have_MASS) print(confint(fm))
 }
 
-fm <- nls(y2~x^b, start=c(b=1), algorithm="plinear")
-confint(profile(fm))
-fm <- nls(y3 ~ (x+exp(logc))^b, start=c(b=1, logc=0), algorithm="plinear")
-confint(profile(fm))
+if(have_MASS) {
+    fm <- nls(y2~x^b, start=c(b=1), algorithm="plinear")
+    print(confint(profile(fm)))
+    fm <- nls(y3 ~ (x+exp(logc))^b, start=c(b=1, logc=0), algorithm="plinear")
+    print(confint(profile(fm)))
+}
 
 
 ## more profiling with bounds
@@ -197,7 +203,7 @@ gfun <- function(a,b,x) {
 m1 <- nls(y ~ gfun(a,b,x), algorithm = "port",
           lower = c(0,0), start = c(a=1, b=1))
 (pr1 <- profile(m1))
-confint(pr1)
+if(have_MASS) print(confint(pr1))
 
 gfun <- function(a,b,x) {
     if(a < 0 || b < 0 || a > 1.5 || b > 1) stop("bounds violated")
@@ -206,7 +212,7 @@ gfun <- function(a,b,x) {
 m2 <- nls(y ~ gfun(a,b,x), algorithm = "port",
           lower = c(0, 0), upper=c(1.5, 1), start = c(a=1, b=1))
 profile(m2)
-confint(m2)
+if(have_MASS) print(confint(m2))
 options(op)
 
 ## scoping problems
diff --git a/src/library/stats/tests/nls.Rout.save b/src/library/stats/tests/nls.Rout.save
index 630c5d6..a97f8ca 100644
--- a/src/library/stats/tests/nls.Rout.save
+++ b/src/library/stats/tests/nls.Rout.save
@@ -1,7 +1,7 @@
 
-R version 3.1.2 RC (2014-10-29 r66897) -- "Pumpkin Helmet"
-Copyright (C) 2014 The R Foundation for Statistical Computing
-Platform: x86_64-unknown-linux-gnu (64-bit)
+R version 3.4.0 RC (2017-04-18 r72543) -- "You Stupid Darkness"
+Copyright (C) 2017 The R Foundation for Statistical Computing
+Platform: x86_64-pc-linux-gnu (64-bit)
 
 R is free software and comes with ABSOLUTELY NO WARRANTY.
 You are welcome to redistribute it under certain conditions.
@@ -16,7 +16,7 @@ Type 'demo()' for some demos, 'help()' for on-line help, or
 Type 'q()' to quit R.
 
 > #  File src/library/stats/tests/nls.R
-> #  Part of the R package, http://www.R-project.org
+> #  Part of the R package, https://www.R-project.org
 > #
 > #  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
@@ -29,7 +29,7 @@ Type 'q()' to quit R.
 > #  GNU General Public License for more details.
 > #
 > #  A copy of the GNU General Public License is available at
-> #  http://www.r-project.org/Licenses/
+> #  https://www.R-project.org/Licenses/
 > 
 > ## tests of nls, especially of weighted fits
 > 
@@ -38,6 +38,9 @@ Type 'q()' to quit R.
 > options(useFancyQuotes = FALSE) # avoid fancy quotes in o/p
 > options(show.nls.convergence = FALSE) # avoid non-diffable output
 > options(warn = 1)
+> 
+> have_MASS <- requireNamespace('MASS', quietly = TRUE)
+> 
 > pdf("nls-test.pdf")
 > 
 > ## utility for comparing nls() results:  [TODO: use more often below]
@@ -88,14 +91,13 @@ Nonlinear regression model
  residual sum-of-squares: 0.468
 
 Algorithm "port", convergence message: both X-convergence and relative convergence (5)
-> confint(fm)
+> if(have_MASS) print(confint(fm))
 Waiting for profiling to be done...
      2.5%    97.5%
 a 1.00875 1.037847
 b 0.84138 0.914645
 c      NA 0.042807
 > 
-> 
 > ## weighted nls fit: unsupported < 2.3.0
 > set.seed(123)
 > y <- x <- 1:10
@@ -342,18 +344,20 @@ Algorithm "port", convergence message: relative convergence (4)
 > pfm5 <- profile(fm5)
 > for(m in names(pfm1))
 +     stopifnot(all.equal(pfm1[[m]], pfm5[[m]], tolerance = 1e-5))
-> (c1 <- confint(fm1))
+> if(have_MASS) {
++     print(c1 <- confint(fm1))
++     print(c4 <- confint(fm4, 1:2))
++     stopifnot(all.equal(c1[2:3, ], c4, tolerance = 1e-3))
++ }
 Waiting for profiling to be done...
         2.5%  97.5%
 Asym 2.14936 2.5724
 xmid 1.28535 1.6966
 scal 0.97526 1.1068
-> (c4 <- confint(fm4, 1:2))
 Waiting for profiling to be done...
        2.5%  97.5%
 xmid 1.2866 1.6949
 scal 0.9757 1.1063
-> stopifnot(all.equal(c1[2:3, ], c4, tolerance = 1e-3))
 > 
 > ## some low-dimensional examples
 > npts <- 1000
@@ -372,10 +376,10 @@ scal 0.9757 1.1063
 > for(p in 1:3) {
 +     fm <- nls(m1[[p]], start = s1[[p]])
 +     print(fm)
-+     print(confint(fm))
-+     fm <- nls(m1[[p]], start = s1[[p]], algorithm="port")
++     if(have_MASS) print(confint(fm))
++     fm <- nls(m1[[p]], start = s1[[p]], algorithm = "port")
 +     print(fm)
-+     print(confint(fm))
++     if(have_MASS) print(confint(fm))
 + }
 Nonlinear regression model
   model: y ~ x^b
@@ -444,12 +448,14 @@ a     0.35006 0.66057
 b     0.45107 0.91473
 logc -0.64627 0.40946
 > 
-> fm <- nls(y2~x^b, start=c(b=1), algorithm="plinear")
-> confint(profile(fm))
+> if(have_MASS) {
++     fm <- nls(y2~x^b, start=c(b=1), algorithm="plinear")
++     print(confint(profile(fm)))
++     fm <- nls(y3 ~ (x+exp(logc))^b, start=c(b=1, logc=0), algorithm="plinear")
++     print(confint(profile(fm)))
++ }
    2.5%   97.5% 
 0.70019 0.74767 
-> fm <- nls(y3 ~ (x+exp(logc))^b, start=c(b=1, logc=0), algorithm="plinear")
-> confint(profile(fm))
          2.5%   97.5%
 b     0.45105 0.91471
 logc -0.64625 0.40933
@@ -522,7 +528,7 @@ Algorithm "port", convergence message: relative convergence (4)
 
 attr(,"class")
 [1] "profile.nls" "profile"    
-> confint(pr1)
+> if(have_MASS) print(confint(pr1))
   2.5% 97.5%
 a 0.96  5.20
 b   NA  1.07
@@ -576,7 +582,7 @@ Algorithm "port", convergence message: relative convergence (4)
 
 attr(,"class")
 [1] "profile.nls" "profile"    
-> confint(m2)
+> if(have_MASS) print(confint(m2))
 Waiting for profiling to be done...
    2.5% 97.5%
 a 0.907    NA
@@ -697,4 +703,4 @@ Warning in nls(y ~ b0[fac] + b1 * x, start = list(b0 = c(1, 1), b1 = 101),  :
 > 
 > proc.time()
    user  system elapsed 
-  1.223   0.014   1.233 
+  1.190   0.023   1.206 
diff --git a/src/library/stats/tests/offsets.R b/src/library/stats/tests/offsets.R
index eea721a..394f4c3 100644
--- a/src/library/stats/tests/offsets.R
+++ b/src/library/stats/tests/offsets.R
@@ -1,6 +1,6 @@
 ## tests of offsets, and prediction from them.
 
-data(anorexia, package = "MASS")
+load("anorexia.rda") # copied from package MASS
 
 ## via formula
 fit1 <- lm(Postwt ~ Prewt + Treat + offset(Prewt), data = anorexia)
diff --git a/src/library/stats/tests/simulate.R b/src/library/stats/tests/simulate.R
index 7b6d4c2..c6026dc 100644
--- a/src/library/stats/tests/simulate.R
+++ b/src/library/stats/tests/simulate.R
@@ -2,15 +2,13 @@
 
 options(digits = 5)
 
-# recommended packages should be present
-if(!require("MASS")) q()
-
 ## cases should be named
+load("hills.rda") # copied from package MASS
 fit1 <- lm(time ~ dist, data = hills)
 set.seed(1)
 simulate(fit1, nsim = 3)
 
-## and weights should be takedn into account
+## and weights should be taken into account
 fit2 <- lm(time ~ -1 + dist + climb, hills[-18, ], weight = 1/dist^2)
 coef(summary(fit2))
 set.seed(1)
@@ -19,6 +17,7 @@ for(i in seq_len(3))
     print(coef(summary(update(fit2, ys[, i] ~ .))))
 
 ## Poisson fit
+load("anorexia.rda") # copied from package MASS
 fit3 <- glm(Postwt ~ Prewt + Treat + offset(Prewt),
             family = gaussian, data = anorexia)
 coef(summary(fit3))
@@ -47,6 +46,7 @@ for(i in seq_len(3))
 
 
 ## factor binomial fit
+load("birthwt.rda") # copied from package MASS
 bwt <- with(birthwt, {
     race <- factor(race, labels = c("white", "black", "other"))
     table(ptl)
@@ -65,11 +65,13 @@ ys[1:10, ]
 for(i in seq_len(3))
     print(coef(summary(update(fit6, ys[, i] ~ .))))
 
+## This requires MASS::gamma.shape
+if(!require("MASS")) q()
 
 ## gamma fit, from example(glm)
 clotting <- data.frame(u = c(5,10,15,20,30,40,60,80,100),
                        lot1 = c(118,58,42,35,27,25,21,19,18))
-fit7 <- glm(lot1 ~ log(u), data=clotting, family=Gamma)
+fit7 <- glm(lot1 ~ log(u), data = clotting, family = Gamma)
 coef(summary(fit7))
 set.seed(1)
 ( ys <- simulate(fit7, nsim = 3) )
diff --git a/src/library/stats/tests/simulate.Rout.save b/src/library/stats/tests/simulate.Rout.save
index fabfc1b..8bc4d7e 100644
--- a/src/library/stats/tests/simulate.Rout.save
+++ b/src/library/stats/tests/simulate.Rout.save
@@ -1,7 +1,7 @@
 
-R version 3.1.2 RC (2014-10-29 r66897) -- "Pumpkin Helmet"
-Copyright (C) 2014 The R Foundation for Statistical Computing
-Platform: x86_64-unknown-linux-gnu (64-bit)
+R version 3.4.0 RC (2017-04-18 r72543) -- "You Stupid Darkness"
+Copyright (C) 2017 The R Foundation for Statistical Computing
+Platform: x86_64-pc-linux-gnu (64-bit)
 
 R is free software and comes with ABSOLUTELY NO WARRANTY.
 You are welcome to redistribute it under certain conditions.
@@ -19,11 +19,8 @@ Type 'q()' to quit R.
 > 
 > options(digits = 5)
 > 
-> # recommended packages should be present
-> if(!require("MASS")) q()
-Loading required package: MASS
-> 
 > ## cases should be named
+> load("hills.rda") # copied from package MASS
 > fit1 <- lm(time ~ dist, data = hills)
 > set.seed(1)
 > simulate(fit1, nsim = 3)
@@ -64,7 +61,7 @@ Two Breweries    152.8438 174.3537 126.9294
 Cockleroi         31.5726  35.7046  35.7999
 Moffat Chase     134.2882 205.1244 148.7057
 > 
-> ## and weights should be takedn into account
+> ## and weights should be taken into account
 > fit2 <- lm(time ~ -1 + dist + climb, hills[-18, ], weight = 1/dist^2)
 > coef(summary(fit2))
        Estimate Std. Error t value   Pr(>|t|)
@@ -120,6 +117,7 @@ dist  4.8215499   0.420077 11.4778 7.0162e-13
 climb 0.0090388   0.001496  6.0422 9.6065e-07
 > 
 > ## Poisson fit
+> load("anorexia.rda") # copied from package MASS
 > fit3 <- glm(Postwt ~ Prewt + Treat + offset(Prewt),
 +             family = gaussian, data = anorexia)
 > coef(summary(fit3))
@@ -293,6 +291,7 @@ ldose   1.1487    0.14102  8.1459 3.7655e-16
 > 
 > 
 > ## factor binomial fit
+> load("birthwt.rda") # copied from package MASS
 > bwt <- with(birthwt, {
 +     race <- factor(race, labels = c("white", "black", "other"))
 +     table(ptl)
@@ -370,11 +369,14 @@ uiTRUE       1.4816743  0.5139743  2.882779 0.00394184
 ftv1        -0.7388479  0.5090637 -1.451386 0.14667244
 ftv2+       -0.0097438  0.4670024 -0.020865 0.98335371
 > 
+> ## This requires MASS::gamma.shape
+> if(!require("MASS")) q()
+Loading required package: MASS
 > 
 > ## gamma fit, from example(glm)
 > clotting <- data.frame(u = c(5,10,15,20,30,40,60,80,100),
 +                        lot1 = c(118,58,42,35,27,25,21,19,18))
-> fit7 <- glm(lot1 ~ log(u), data=clotting, family=Gamma)
+> fit7 <- glm(lot1 ~ log(u), data = clotting, family = Gamma)
 > coef(summary(fit7))
              Estimate Std. Error t value   Pr(>|t|)
 (Intercept) -0.016554 0.00092755 -17.847 4.2791e-07
@@ -406,4 +408,4 @@ log(u)       0.015569 0.00033659  46.256 5.7704e-10
 > 
 > proc.time()
    user  system elapsed 
-  0.202   0.010   0.206 
+  0.258   0.017   0.270 
diff --git a/src/library/stats/tests/smooth.spline.R b/src/library/stats/tests/smooth.spline.R
index b7f47e0..97589cd 100644
--- a/src/library/stats/tests/smooth.spline.R
+++ b/src/library/stats/tests/smooth.spline.R
@@ -1,15 +1,155 @@
-## moved from ?smooth.spline, quite system-specific.
-y18 <- c(1:3,5,4,7:3,2*(2:5),rep(10,4))
-xx  <- seq(1,length(y18), len=201)
-s2. <- smooth.spline(y18, cv = TRUE,
-                     control = list(trace=TRUE, tol=1e-6,low= -3,maxit=20))
-s2. ## i386-Linux: Df ~= (even! > ) 18 : interpolating -- much smaller PRESS
-## {others, e.g., may end quite differently!}
+## 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))
+(use.l3 <- (Sys.info()[["machine"]] == "x86_64"))
+## 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)
+## typically with Df = 8.636
+(s2. <- smooth.spline(y18, cv = TRUE,
+                      control = list(trace=TRUE, tol = 1e-6,
+                                     low = if(use.l3) -3 else -2)))
 plot(y18)
+xx <- seq(1,length(y18), len=201)
 lines(predict(s2., xx), col = 4)
 mtext(deparse(s2.$call,200), side= 1, line= -1, cex= 0.8, col= 4)
 
-(sdf8 <- smooth.spline(y18, df = 8, control=list(trace=TRUE)))
-sdf8$df - 8
+(sdf8 <- smooth.spline(y18, df = 8, control=list(trace=TRUE)))# 11 iter.
+sdf8$df - 8 # -0.0009159978
+(sdf8. <- smooth.spline(y18, df = 8, control=list(tol = 1e-8)))# 14 iter.
 
-try(smooth.spline(y18, spar = 50)) #>> error : spar 'way too large'
+## This gave error: "... spar 'way too large'" -- now sees in dpbfa() that it can't factorize
+## --> and gives *warning* about too large spar only
+## e <- try(smooth.spline(y18, spar = 50)) #>> error
+## stopifnot(inherits(e, "try-error"))
+ss50 <- try(smooth.spline(y18, spar = 50)) #>> warning only (in R >= 3.4.0) -- ?? FIXME
+e <- try(smooth.spline(y18, spar = -9)) #>> error : .. too small'
+stopifnot(inherits(e, "try-error"))
+## "extreme" range of spar, i.e., 'lambda' directly  (" spar = c(lambda = *) "):
+##  ---------------------  --> problem/bug for too large lambda
+e10 <- c(-20, -10, -7, -4:4, 7, 10)
+(lams <- setNames(10^e10, paste0("lambda = 10^", e10)))
+lamExp <- as.expression(lapply(e10, function(E)
+				substitute(lambda == 10^e, list(e = E))))
+sspl <- lapply(lams, function(LAM) try(smooth.spline(y18, lambda = LAM)))
+sspl
+ok <- vapply(sspl, class, "") == "smooth.spline"
+stopifnot(ok[e10 <= 7])
+ssok <- sspl[ok]
+ssGet  <- function(ch) t(sapply(ssok, `[` , ch))
+ssGet1 <- function(ch)   sapply(ssok, `[[`, ch)
+stopifnot(all.equal(ssGet1("crit"), ssGet1("cv.crit"), tol = 1e-10))# seeing rel.diff = 6.57e-12
+## Interesting:  for really large lambda, solution "diverges" from the straight line
+ssGet(c("lambda", "df", "crit", "pen.crit"))
+
+plot(y18); lines(predict(s2., xx), lwd = 5, col = adjustcolor(4, 1/4))
+invisible(lapply(seq_along(ssok), function(i) lines(predict(ssok[[i]], xx), col=i)))
+i18 <- 1:18
+abline(lm(y18 ~ i18), col = adjustcolor('tomato',1/2), lwd = 5, lty = 3)
+## --> lambda = 10^10 is clearly wrong: a *line* but not the L.S. one
+legend("topleft", lamExp[ok], ncol = 2, bty = "n", col = seq_along(ssok), lty=1)
+
+##--- Explore 'all.knots' and 'keep.stuff'
+
+s2   <- smooth.spline(y18, cv = TRUE, keep.stuff=TRUE)
+
+s2.7  <- smooth.spline(y18, cv = TRUE, keep.stuff=TRUE, nknots = 7)
+s2.11 <- smooth.spline(y18, cv = TRUE, keep.stuff=TRUE, nknots = 11)
+plot(y18)
+lines(predict(s2, xx), lwd = 5, col = adjustcolor(4, 1/4))
+lines(predict(s2.7,  xx), lwd = 3, col = adjustcolor("red", 1/4))
+lines(predict(s2.11, xx), lwd = 2, col = adjustcolor("forestgreen", 1/4))
+## s2.11 is very close to 's2'
+
+if(!requireNamespace("Matrix") && !interactive())
+    q("no")
+
+aux2Mat <- function(auxM) {
+    stopifnot(is.list(auxM),
+              identical(vapply(auxM, class, ""),
+                        setNames(rep("numeric", 4), c("XWy", "XWX", "Sigma", "R"))))
+    ## requireNamespace("Matrix")# want sparse matrices
+    nk <- length(XWy <- auxM[["XWy"]])
+    list(XWy = XWy,
+         XWX =  Matrix::bandSparse(nk, k= 0:3, diagonals= matrix(auxM[[ "XWX" ]], nk,4), symmetric=TRUE),
+         Sigma= Matrix::bandSparse(nk, k= 0:3, diagonals= matrix(auxM[["Sigma"]], nk,4), symmetric=TRUE))
+}
+
+## "Prove" basic property :
+##
+##     \hat{\beta} =  (X'W X + \lambda \Sigma)^{-1} X'W y
+##     ---------------------------------------------------
+##
+chkB <- function(smspl, tol = 1e-10) {
+    stopifnot(inherits(smspl, "smooth.spline"))
+    if(!is.list(smspl$auxM))
+        stop("need result of  smooth.spline(., keep.stuff = TRUE)")
+    lM <- aux2Mat(smspl$auxM)
+    beta.hat <- solve(lM$XWX + smspl$lambda * lM$Sigma, lM$XWy)
+    all.equal(as.vector(beta.hat),
+              smspl$fit$coef, tolerance = tol)
+}
+
+stopifnot(chkB(s2))
+stopifnot(chkB(s2.7))
+stopifnot(chkB(s2.11))
+
+lM <- aux2Mat(s2$auxM)
+A <- lM$XWX + s2$lambda * lM$Sigma
+R <- Matrix::chol(A)
+c. <- s2$fit$coef
+stopifnot(all.equal(c., as.vector( solve(A, lM$XWy))) )
+
+## c' Sigma c =
+pen <- as.vector(c. %*% lM$Sigma %*% c.)
+c(unscaled.penalty = pen,
+  scaled.penalty   = s2$lambda * pen)
+
+Sigma.tit <- quote(list(Sigma == Omega, "where"~~ Omega[list(j,k)] ==
+                                      integral({B[j]*second}(t)~{B[k]*second}(t)~dt)))
+Matrix::image(lM$XWX, main = quote({X*minute}*W*X))
+Matrix::image(lM$Sigma, main = Sigma.tit)
+Matrix::image(A, main = quote({X*minute}*W*X + lambda*Sigma))
+Matrix::image(R, main = quote(R == chol({X*minute}*W*X + lambda*Sigma)))
+
+
+## Specifying  'all.knots' ourselves
+
+## 1) compatibly :
+s2.7.k  <- smooth.spline(y18, cv = TRUE, keep.stuff=TRUE,
+                         all.knots = s2.7$fit$knot[3+ 1:7])
+ii <- names(s2.7) != "call"
+stopifnot( all.equal(s2.7  [ii],
+                     s2.7.k[ii]))
+
+## 2) "free" but approximately in [0,1]
+s2.9f  <- smooth.spline(y18, cv = TRUE, keep.stuff=TRUE,
+                        all.knots = seq(0, 1, length.out = 9))
+lines(predict(s2.9f, xx), lwd = 2, lty=3, col = adjustcolor("tomato", 1/2))
+## knots partly outside [0,1]  --- is not quite right, see below !!
+s2.7f  <- smooth.spline(y18, cv = TRUE, keep.stuff=TRUE,
+                        all.knots = c(-1,1,3,5,7,9,12)/10)
+lines(predict(s2.7f, xx), lwd = 2, lty=3, col = adjustcolor("blue", 1/2))
+
+if(FALSE) { ## not allowed (currently)
+    ## knots partly *inside* [0,1] i.e. data outside knots
+    s2.5f  <- smooth.spline(y18, cv = TRUE, keep.stuff=TRUE, control=list(trace=TRUE),
+                            all.knots = c(1,3,5,7,9)/10)
+    ## ------ OOOPS!  Segmentation fault ... "in attrib.c" {when returning from .Fortran()}
+    lines(predict(s2.5f, xx), lwd = 2, lty=3, col = adjustcolor("brown", 1/2))
+}
+##' back-transform knots to "data-scale":
+dScale <- function(smsp, drop.ends=TRUE) {
+    stopifnot(inherits(smsp, "smooth.spline"))
+    sf <- smsp$fit
+    kk <- sf$knot; if(drop.ends) kk <- kk[4:(length(kk)-3)]
+    sf$min + sf$range * kk
+}
+
+xe <- seq(-5, 25, length=256)
+str(m2 <- predict(s2.7f, x=xe, deriv=2)) # \hat{m''}(x)
+plot(m2, type="l", col=2)
+## The following shows that something is not quite right:
+## The data boundaries are still used even when the knots are a bit outside.:
+abline(v = dScale(s2.7f), lty=3, col=adjustcolor("black", 1/2))
+abline(h = 0, v = c(1,18), lty=4, col="skyblue4")
diff --git a/src/library/stats/tests/ts-tests.R b/src/library/stats/tests/ts-tests.R
index 315c3a2..b44d6e0 100644
--- a/src/library/stats/tests/ts-tests.R
+++ b/src/library/stats/tests/ts-tests.R
@@ -1,5 +1,5 @@
 #  File src/library/stats/tests/ts-tests.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
 #  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
@@ -12,7 +12,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 ## tests of time-series functionality
 
@@ -49,6 +49,12 @@ tsdiag(fit1)
 (fit3 <- arima(presidents, c(3, 0, 0)))  # smaller AIC
 tsdiag(fit3)
 
+## Short example for bug PR#15832:
+e <- rep(c(1.48e-6, 1.49e-6, 1.5e-6, 1.51e-6), c(2,3,9,7))
+stopifnot(abs(acf(e, plot=FALSE)$acf) <= 1)
+## Failed for R <= 3.2.0
+
+
 
 ### tests of arima:
 arima(USAccDeaths, order = c(0,1,1), seasonal = list(order=c(0,1,1)))
@@ -123,9 +129,11 @@ ts.plot(AirPassengers, 10^tl, 10^tu, log = "y", lty = c(1,2,2))
 ## full ML fit is the same if the series is reversed, CSS fit is not
 ap0 <- rev(log10(AirPassengers))
 attributes(ap0) <- attributes(AirPassengers)
-arima(ap0, c(0, 1, 1), seasonal = list(order=c(0, 1 ,1), period=12))
-arima(ap0, c(0, 1, 1), seasonal = list(order=c(0, 1 ,1), period=12),
-      method = "CSS")
+fr1 <- arima(ap0, c(0, 1, 1), seasonal = list(order=c(0, 1 ,1), period=12))
+fr2 <- arima(ap0, c(0, 1, 1), seasonal = list(order=c(0, 1 ,1), period=12),
+             method = "CSS")
+i <- c("coef", "sigma2", "var.coef")
+stopifnot(all.equal(fr1[i], fit[i], tol=4e-4))# 64b: 9e-5 is ok
 
 ## Structural Time Series
 ap <- log10(AirPassengers) - 2
diff --git a/src/library/stats4/DESCRIPTION.in b/src/library/stats4/DESCRIPTION.in
index 20742c6..cd12221 100644
--- a/src/library/stats4/DESCRIPTION.in
+++ b/src/library/stats4/DESCRIPTION.in
@@ -3,7 +3,7 @@ Title: Statistical Functions using S4 Classes
 Version: @VERSION@
 Priority: base
 Author: R Core Team and contributors worldwide
-Description: Statistical Functions using S4 classes
+Description: Statistical Functions using S4 classes.
 Maintainer: R Core Team <R-core at r-project.org>
 Imports: graphics, methods, stats
 License: Part of R @VERSION@
diff --git a/src/library/stats4/NAMESPACE b/src/library/stats4/NAMESPACE
index 8170874..9fc6d4f 100644
--- a/src/library/stats4/NAMESPACE
+++ b/src/library/stats4/NAMESPACE
@@ -1,9 +1,13 @@
 export(mle) # exporting methods implicitly exports the generics
-importFrom("graphics", plot)
-importFrom("methods", show)
-importFrom("stats", optim, qchisq)
+
+importFrom("grDevices", dev.flush, dev.hold)
+importFrom("graphics", abline, lines, par, plot)
+importFrom("methods", new, show, slotNames)
+importFrom("stats", approx, optim, pchisq, predict, qchisq, qnorm, spline)
 ## For these, we define methods or (AIC, BIC, nobs) an implicit generic:
-importFrom("stats", AIC, BIC, coef, confint, logLik, nobs, profile, update, vcov)
+importFrom("stats",
+	   AIC, BIC, coef, confint, logLik,
+	   na.omit, nobs, profile, update, vcov)
 
 ## S4
 exportClasses(mle, profile.mle, summary.mle)
diff --git a/src/library/stats4/R/BIC.R b/src/library/stats4/R/BIC.R
index d27adee..17a4ba5 100644
--- a/src/library/stats4/R/BIC.R
+++ b/src/library/stats4/R/BIC.R
@@ -1,5 +1,5 @@
 #  File src/library/stats4/R/BIC.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
 #  Copyright (C) 1995-2012 The R Core Team
 #
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 ## created for use in other packages, e.g. flexmix
 setGeneric("AIC")
diff --git a/src/library/stats4/R/mle.R b/src/library/stats4/R/mle.R
index 94ea73b..8a0f474 100644
--- a/src/library/stats4/R/mle.R
+++ b/src/library/stats4/R/mle.R
@@ -1,5 +1,5 @@
 #  File src/library/stats4/R/mle.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
 #  Copyright (C) 1995-2012 The R Core Team
 #
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 setClass("mle", representation(call = "language",
                                coef = "numeric",
diff --git a/src/library/stats4/man/coef-methods.Rd b/src/library/stats4/man/coef-methods.Rd
index 40c3470..10b7c67 100644
--- a/src/library/stats4/man/coef-methods.Rd
+++ b/src/library/stats4/man/coef-methods.Rd
@@ -1,5 +1,5 @@
 % File src/library/stats4/man/coef-methods.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2007 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/stats4/man/confint-methods.Rd b/src/library/stats4/man/confint-methods.Rd
index 182ad9b..34eb5fe 100644
--- a/src/library/stats4/man/confint-methods.Rd
+++ b/src/library/stats4/man/confint-methods.Rd
@@ -1,5 +1,5 @@
 % File src/library/stats4/man/confint-methods.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2007 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/stats4/man/logLik-methods.Rd b/src/library/stats4/man/logLik-methods.Rd
index f4ac1bc..3b28074 100644
--- a/src/library/stats4/man/logLik-methods.Rd
+++ b/src/library/stats4/man/logLik-methods.Rd
@@ -1,5 +1,5 @@
 % File src/library/stats4/man/logLik-methods.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2011 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/stats4/man/mle-class.Rd b/src/library/stats4/man/mle-class.Rd
index 842738a..663a68f 100644
--- a/src/library/stats4/man/mle-class.Rd
+++ b/src/library/stats4/man/mle-class.Rd
@@ -1,5 +1,5 @@
 % File src/library/stats4/man/mle-class.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2011 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/stats4/man/mle.Rd b/src/library/stats4/man/mle.Rd
index 5cdb384..ba742ad 100644
--- a/src/library/stats4/man/mle.Rd
+++ b/src/library/stats4/man/mle.Rd
@@ -1,10 +1,8 @@
 % File src/library/stats4/man/mle.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2011 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2014 R Core Team
 % Distributed under GPL 2 or later
 
-\newcommand{\sspace}{\ifelse{latex}{\out{~}}{ }}
-
 \name{mle}
 \alias{mle}
 \title{Maximum Likelihood Estimation}
diff --git a/src/library/stats4/man/plot-methods.Rd b/src/library/stats4/man/plot-methods.Rd
index e268106..1e67b72 100644
--- a/src/library/stats4/man/plot-methods.Rd
+++ b/src/library/stats4/man/plot-methods.Rd
@@ -1,5 +1,5 @@
 % File src/library/stats4/man/plot-methods.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2007 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/stats4/man/profile-methods.Rd b/src/library/stats4/man/profile-methods.Rd
index a6c8ebe..84fe830 100644
--- a/src/library/stats4/man/profile-methods.Rd
+++ b/src/library/stats4/man/profile-methods.Rd
@@ -1,5 +1,5 @@
 % File src/library/stats4/man/profile-methods.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2008 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/stats4/man/profile.mle-class.Rd b/src/library/stats4/man/profile.mle-class.Rd
index 099a7a9..cfef09f 100644
--- a/src/library/stats4/man/profile.mle-class.Rd
+++ b/src/library/stats4/man/profile.mle-class.Rd
@@ -1,5 +1,5 @@
 % File src/library/stats4/man/profile.mle-class.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2007 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/stats4/man/show-methods.Rd b/src/library/stats4/man/show-methods.Rd
index 2283ab4..ea8c65f 100644
--- a/src/library/stats4/man/show-methods.Rd
+++ b/src/library/stats4/man/show-methods.Rd
@@ -1,5 +1,5 @@
 % File src/library/stats4/man/show-methods.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2007 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/stats4/man/stats4-package.Rd b/src/library/stats4/man/stats4-package.Rd
index 978e69a..fc9d6c5 100644
--- a/src/library/stats4/man/stats4-package.Rd
+++ b/src/library/stats4/man/stats4-package.Rd
@@ -1,5 +1,5 @@
 % File src/library/stats4/man/stats4-package.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2011 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/stats4/man/summary-methods.Rd b/src/library/stats4/man/summary-methods.Rd
index 1df9aec..dfe28bc 100644
--- a/src/library/stats4/man/summary-methods.Rd
+++ b/src/library/stats4/man/summary-methods.Rd
@@ -1,5 +1,5 @@
 % File src/library/stats4/man/summary-methods.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2007 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/stats4/man/summary.mle-class.Rd b/src/library/stats4/man/summary.mle-class.Rd
index 8aa1fb3..13008d5 100644
--- a/src/library/stats4/man/summary.mle-class.Rd
+++ b/src/library/stats4/man/summary.mle-class.Rd
@@ -1,5 +1,5 @@
 % File src/library/stats4/man/summary.mle-class.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2007 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/stats4/man/update-methods.Rd b/src/library/stats4/man/update-methods.Rd
index 4c3644e..9300886 100644
--- a/src/library/stats4/man/update-methods.Rd
+++ b/src/library/stats4/man/update-methods.Rd
@@ -1,5 +1,5 @@
 % File src/library/stats4/man/update-methods.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2007 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/stats4/man/vcov-methods.Rd b/src/library/stats4/man/vcov-methods.Rd
index 71219df..67afad5 100644
--- a/src/library/stats4/man/vcov-methods.Rd
+++ b/src/library/stats4/man/vcov-methods.Rd
@@ -1,5 +1,5 @@
 % File src/library/stats4/man/vcov-methods.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2007 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/stats4/po/R-de.po b/src/library/stats4/po/R-de.po
index 775358a..2d09dc8 100644
--- a/src/library/stats4/po/R-de.po
+++ b/src/library/stats4/po/R-de.po
@@ -10,9 +10,9 @@ msgstr ""
 "PO-Revision-Date: 2009-10-07 14:34+0200\n"
 "Last-Translator: Detlef Steuer <steuer at hsu-hh.de>\n"
 "Language-Team: R Core <r-core at r-project.org>\n"
-"Language: \n"
+"Language: de\n"
 "MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=utf-8\n"
+"Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
 "Plural-Forms: nplurals=2; plural=n == 1 ? 0 : 1;\n"
 
@@ -20,7 +20,7 @@ msgid ""
 "some named arguments in 'fixed' are not arguments to the supplied log-"
 "likelihood"
 msgstr ""
-"einige benannte Argumentes in 'fixed' sind keine Argumente für die "
+"einige benannte Argumente in 'fixed' sind keine Argumente für die "
 "angegebene Log-Likelihood"
 
 msgid "'start' must be a named list"
diff --git a/src/library/stats4/po/R-ja.po b/src/library/stats4/po/R-ja.po
index e9cdca0..9caf29d 100644
--- a/src/library/stats4/po/R-ja.po
+++ b/src/library/stats4/po/R-ja.po
@@ -2,7 +2,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: R 2.3.0 \n"
 "Report-Msgid-Bugs-To: bugs.r-project.org\n"
-"POT-Creation-Date: 2013-03-07 08:37\n"
+"POT-Creation-Date: 2015-06-06 13:51\n"
 "PO-Revision-Date: 2013-02-23 17:49+0200 \n"
 "Last-Translator: Triad sou  \n"
 "Language-Team: RjpWiki Message Translation Team <mokada at md.tsukuba.ac.jp> \n"
diff --git a/src/library/stats4/po/R-ko.po b/src/library/stats4/po/R-ko.po
index f5aeda2..e1eecf0 100644
--- a/src/library/stats4/po/R-ko.po
+++ b/src/library/stats4/po/R-ko.po
@@ -1,24 +1,31 @@
 # Korean translation for R stats4 package
-# src/library/stats4/po/R-ko.po
-# Copyright (C) 1995-2014 The R Core Team
+# ./stats4/po/R-ko.po
+#
+# Copyright (C) 1995-2016 The R Core Team
+#
 # This file is distributed under the same license as the R stats4 package.
-# Chel Hee Lee <chl948 at mail.usask.ca>, 2008-2014.
+# Maintained by Chel Hee Lee <chl948 at mail.usask.ca>, 2008-2016.
+# Contact: Chel Hee Lee <gnustats at gmail.com>
+#
+# Notes:
+# Under development (unstable) starting from 11-APR-2016 for R-3.3.1 - QC: in progress
+# Freezed on 10-APR-2016 for R-3.3.0 - QC: PASS
+# Freezed on 30-MAR-2015 for R-3.2.0 - QC: PASS
+# Freezed on 06-FEB-2015 for R-3.1.3 - QC: PASS
 #
 msgid ""
 msgstr ""
-"Project-Id-Version: R 3.1.0\n"
+"Project-Id-Version: R-3.3.0\n"
 "Report-Msgid-Bugs-To: bugs.r-project.org\n"
 "POT-Creation-Date: 2012-12-10 18:35\n"
-"PO-Revision-Date: 2014-03-26 21:17-0600\n"
+"PO-Revision-Date: 2016-04-11 13:08-0600\n"
 "Last-Translator: Chel Hee Lee <chl948 at mail.usask.ca>\n"
-"Language-Team:  <chl948 at mail.usask.ca>\n"
+"Language-Team: Chel Hee Lee <chl948 at mail.usask.ca>\n"
 "Language: ko\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
 "Plural-Forms: nplurals=1; plural=0;\n"
-"X-Poedit-SourceCharset: UTF-8\n"
-"X-Generator: Poedit 1.5.4\n"
 
 msgid ""
 "some named arguments in 'fixed' are not arguments to the supplied log-"
@@ -28,23 +35,21 @@ msgstr ""
 "니다"
 
 msgid "'start' must be a named list"
-msgstr "'start'는 반드시 named list이어야 합니다"
+msgstr "'start'는 반드시 이름이 주어진 리스트(named list)이어야 합니다"
 
 msgid ""
 "some named arguments in 'start' are not arguments to the supplied log-"
 "likelihood"
 msgstr ""
-"'start'내의 일부 named arguments는 주어진 log-likelihood에 쓰이는 인자가 아닙"
-"니다"
+"'start'내의 일부 이름을 가진 인자(named arguments)들은 주어진 로그-우도함수(log-likelihood)에 쓰이는 인자가 아닙니다."
 
 msgid ""
 "profiling has found a better solution, so original fit had not converged"
 msgstr ""
-"프로파일링이 더 적합한 해를 찾았기 대문에 초기의 적합은 수렴하지 않았음을 의"
-"미합니다"
+"프로파일링(profiling)으로부터 더 적합한 해를 찾았기 대문에 초기의 적합은 수렴하지 않았음을 의미합니다"
 
 msgid "levels truncated to positive values only"
-msgstr "levels는 양의 값만을 가지도록 잘려집니다"
+msgstr "levels는 오로지 양의 값만을 가지도록 잘려집니다."
 
 msgid "extra arguments discarded"
-msgstr "추가적인 인자들은 무시되었습니다"
+msgstr ""
diff --git a/src/library/stats4/po/R-pl.po b/src/library/stats4/po/R-pl.po
index 5990024..9d96747 100644
--- a/src/library/stats4/po/R-pl.po
+++ b/src/library/stats4/po/R-pl.po
@@ -1,8 +1,8 @@
 msgid ""
 msgstr ""
-"Project-Id-Version: R 3.1.0\n"
+"Project-Id-Version: R 3.4.0\n"
 "Report-Msgid-Bugs-To: bugs.r-project.org\n"
-"POT-Creation-Date: 2014-03-11 19:17\n"
+"POT-Creation-Date: 2016-04-04 08:15\n"
 "PO-Revision-Date: \n"
 "Last-Translator: Łukasz Daniel <lukasz.daniel at gmail.com>\n"
 "Language-Team: Łukasz Daniel <lukasz.daniel at gmail.com>\n"
@@ -13,41 +13,46 @@ msgstr ""
 "na-Revision-Date: 2012-05-29 07:55+0100\n"
 "Plural-Forms: nplurals=3; plural=(n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 "
 "|| n%100>=20) ? 1 : 2);\n"
-"X-Poedit-SourceCharset: iso-8859-1\n"
-"X-Generator: Poedit 1.5.4\n"
+"X-Poedit-SourceCharset: UTF-8\n"
+"X-Generator: Poedit 1.8.7\n"
 
-# stats4/R/mle.R: 44
-# stop("some named arguments in 'fixed' are not arguments to the supplied log-likelihood")
-msgid "some named arguments in 'fixed' are not arguments to the supplied log-likelihood"
-msgstr ""
-"niektóre nazwane argumenty w funkcji 'fixed' nie są argumentami do "
-"dostarczonej logarytmicznej funkcji wiarygodności"
-
-# stats4/R/mle.R: 47
-# stop("'start' must be a named list")
+#. R/mle.R: stop("'start' must be a named list")
+#: R/mle.R:0
 msgid "'start' must be a named list"
 msgstr "'start' musi być nazwaną listą"
 
-# stats4/R/mle.R: 53
-# stop("some named arguments in 'start' are not arguments to the supplied log-likelihood")
-msgid "some named arguments in 'start' are not arguments to the supplied log-likelihood"
-msgstr ""
-"niektóre nazwane argumenty w funkcji 'start' nie są argumentami do "
-"dostarczonej logarytmicznej funkcji wiarygodności"
+#. R/mle.R: warning("extra arguments discarded")
+#: R/mle.R:0
+msgid "extra arguments discarded"
+msgstr "dodatkowe argumenty zostały odrzucone"
+
+#. R/mle.R: warning("levels truncated to positive values only")
+#: R/mle.R:0
+msgid "levels truncated to positive values only"
+msgstr "poziomy przycięto do wartości dodatnich"
 
-# stats4/R/mle.R: 124
-# stop("profiling has found a better solution, so original fit had not converged")
-msgid "profiling has found a better solution, so original fit had not converged"
+#. R/mle.R: stop("profiling has found a better solution, so original fit had not converged")
+#: R/mle.R:0
+msgid ""
+"profiling has found a better solution, so original fit had not converged"
 msgstr ""
 "profilowanie znalazło lepsze rozwiązanie, tak więc oryginalne dopasowanie "
 "nie uzbieżniło się"
 
-# stats4/R/mle.R: 206
-# warning("levels truncated to positive values only")
-msgid "levels truncated to positive values only"
-msgstr "poziomy przycięto do wartości dodatnich"
+#. R/mle.R: stop("some named arguments in 'fixed' are not arguments to the supplied log-likelihood")
+#: R/mle.R:0
+msgid ""
+"some named arguments in 'fixed' are not arguments to the supplied log-"
+"likelihood"
+msgstr ""
+"niektóre nazwane argumenty w funkcji 'fixed' nie są argumentami do "
+"dostarczonej logarytmicznej funkcji wiarygodności"
 
-# stats4/R/mle.R: 325
-# warning("extra arguments discarded")
-msgid "extra arguments discarded"
-msgstr "dodatkowe argumenty zostały odrzucone"
+#. R/mle.R: stop("some named arguments in 'start' are not arguments to the supplied log-likelihood")
+#: R/mle.R:0
+msgid ""
+"some named arguments in 'start' are not arguments to the supplied log-"
+"likelihood"
+msgstr ""
+"niektóre nazwane argumenty w funkcji 'start' nie są argumentami do "
+"dostarczonej logarytmicznej funkcji wiarygodności"
diff --git a/src/library/stats4/po/R-ru.po b/src/library/stats4/po/R-ru.po
index c17c28a..007edab 100644
--- a/src/library/stats4/po/R-ru.po
+++ b/src/library/stats4/po/R-ru.po
@@ -11,10 +11,10 @@ msgstr ""
 "Project-Id-Version: R 2.9.0\n"
 "Report-Msgid-Bugs-To: bugs.r-project.org\n"
 "POT-Creation-Date: 2012-07-12 12:59\n"
-"PO-Revision-Date: 2013-03-19 21:49-0600\n"
+"PO-Revision-Date: 2016-04-05 18:08-0600\n"
 "Last-Translator: Alexey Shipunov <dactylorhiza at gmail.com>\n"
 "Language-Team: Russian\n"
-"Language: \n"
+"Language: ru\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=KOI8-R\n"
 "Content-Transfer-Encoding: 8bit\n"
diff --git a/src/library/stats4/po/R-stats4.pot b/src/library/stats4/po/R-stats4.pot
index a4e2ab1..10c45fe 100644
--- a/src/library/stats4/po/R-stats4.pot
+++ b/src/library/stats4/po/R-stats4.pot
@@ -1,8 +1,7 @@
 msgid ""
 msgstr ""
-"Project-Id-Version: R 3.1.0\n"
-"Report-Msgid-Bugs-To: bugs.r-project.org\n"
-"POT-Creation-Date: 2013-03-07 08:37\n"
+"Project-Id-Version: stats4 3.4.0\n"
+"POT-Creation-Date: 2016-04-01 09:50\n"
 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
 "Last-Translator: FULL NAME <EMAIL at ADDRESS>\n"
 "Language-Team: LANGUAGE <LL at li.org>\n"
diff --git a/src/library/stats4/po/R-zh_CN.po b/src/library/stats4/po/R-zh_CN.po
index 202758b..2008b01 100644
--- a/src/library/stats4/po/R-zh_CN.po
+++ b/src/library/stats4/po/R-zh_CN.po
@@ -11,7 +11,7 @@ msgstr ""
 "PO-Revision-Date: 2005-02-04 08:37+0000\n"
 "Last-Translator: 陈斐 <feic at avaya.com>\n"
 "Language-Team: Chinese\n"
-"Language: \n"
+"Language: zh_CN\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
diff --git a/src/library/tcltk/DESCRIPTION.in b/src/library/tcltk/DESCRIPTION.in
index 72a56db..2884b60 100644
--- a/src/library/tcltk/DESCRIPTION.in
+++ b/src/library/tcltk/DESCRIPTION.in
@@ -4,7 +4,7 @@ Priority: base
 Title: Tcl/Tk Interface
 Author: R Core Team
 Maintainer: R Core Team <R-core at r-project.org>
-Description: Interface and language bindings to Tcl/Tk GUI elements
+Description: Interface and language bindings to Tcl/Tk GUI elements.
 License: Part of R @VERSION@
 Imports: utils
-
+NeedsCompilation: yes
diff --git a/src/library/tcltk/R/Tk.R b/src/library/tcltk/R/Tk.R
index 963d31d..69822bd 100644
--- a/src/library/tcltk/R/Tk.R
+++ b/src/library/tcltk/R/Tk.R
@@ -1,7 +1,7 @@
 #  File src/library/tcltk/R/Tk.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
-#  Copyright (C) 1995-2014 The R Core Team
+#  Copyright (C) 1995-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
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 ### ------ Basics ------
 
@@ -60,7 +60,7 @@
     val2string <- function(x) {
         if (is.null(x)) return("")
         if (is.tkwin(x)){ current.win <<- x ; return (.Tk.ID(x)) }
-	if (inherits(x,"tclVar")) return(ls(unclass(x)$env))
+	if (inherits(x,"tclVar")) return(names(unclass(x)$env))
         if (isCallback(x)){
 	    # Jump through some hoops to protect from GC...
 	    ref <- local({value <- x; envir <- pframe; environment()})
@@ -137,7 +137,7 @@
     val2obj <- function(x) {
         if (is.null(x)) return(NULL)
         if (is.tkwin(x)){current.win <<- x ; return(as.tclObj(.Tk.ID(x)))}
-	if (inherits(x,"tclVar")) return(as.tclObj(ls(unclass(x)$env)))
+	if (inherits(x,"tclVar")) return(as.tclObj(names(unclass(x)$env)))
         if (isCallback(x)){
 	    # Jump through some hoops to protect from GC...
 	    ref <- local({value <- x; envir <- pframe; environment()})
@@ -196,7 +196,7 @@ tclVar <- function(init = "") {
    name <- paste0("::RTcl", n)
    l <- list(env = new.env())
    assign(name, NULL, envir = l$env)
-   reg.finalizer(l$env, function(env) tcl("unset", ls(env)))
+   reg.finalizer(l$env, function(env) tcl("unset", names(env)))
    class(l) <- "tclVar"
    tclvalue(l) <- init
    l
@@ -206,14 +206,14 @@ tclObj <- function(x) UseMethod("tclObj")
 "tclObj<-" <- function(x, value) UseMethod("tclObj<-")
 
 tclObj.tclVar <- function(x){
-    z <- .External(.C_RTcl_ObjFromVar, ls(x$env))
+    z <- .External(.C_RTcl_ObjFromVar, names(x$env))
     class(z) <- "tclObj"
     z
 }
 
 "tclObj<-.tclVar" <- function(x, value){
     value <- as.tclObj(value)
-    .External(.C_RTcl_AssignObjToVar, ls(x$env), value)
+    .External(.C_RTcl_AssignObjToVar, names(x$env), value)
     x
 }
 
@@ -229,7 +229,7 @@ print.tclObj <- function(x,...) {
 }
 
 "tclvalue<-.tclVar" <- function(x, value) {
-    name <- ls(unclass(x)$env)
+    name <- names(unclass(x)$env)
     tcl("set", name, value)
     x
 }
@@ -242,7 +242,7 @@ tclvalue.default <- function(x) tclvalue(tcl("set", as.character(x)))
     x
 }
 
-as.character.tclVar <- function(x, ...) ls(unclass(x)$env)
+as.character.tclVar <- function(x, ...) names(unclass(x)$env)
 
 as.character.tclObj <- function(x, ...)
     .External(.C_RTcl_ObjAsCharVector, x)
@@ -280,7 +280,7 @@ tclServiceMode <- function(on = NULL)
 #----
 
 .TkRoot <- .Tk.newwin("")
-tclvar  <- structure(NULL, class = "tclvar")
+tclvar  <- structure(list(), class = "tclvar")
 .TkRoot$env$TclVarCount <- 0
 
 
@@ -315,7 +315,6 @@ ttkcheckbutton <- function(parent, ...) tkwidget(parent, "ttk::checkbutton", ...
 ttkcombobox    <- function(parent, ...) tkwidget(parent, "ttk::combobox", ...)
 ttkentry       <- function(parent, ...) tkwidget(parent, "ttk::entry", ...)
 ttkframe       <- function(parent, ...) tkwidget(parent, "ttk::frame", ...)
-ttkimage       <- function(parent, ...) tkwidget(parent, "ttk::image", ...)
 ttklabel       <- function(parent, ...) tkwidget(parent, "ttk::label", ...)
 ttklabelframe  <- function(parent, ...) tkwidget(parent, "ttk::labelframe", ...)
 ttkmenubutton  <- function(parent, ...) tkwidget(parent, "ttk::menubutton", ...)
@@ -323,9 +322,11 @@ ttknotebook    <- function(parent, ...) tkwidget(parent, "ttk::notebook", ...)
 ttkpanedwindow <- function(parent, ...) tkwidget(parent, "ttk::panedwindow", ...)
 ttkprogressbar <- function(parent, ...) tkwidget(parent, "ttk::progressbar", ...)
 ttkradiobutton <- function(parent, ...) tkwidget(parent, "ttk::radiobutton", ...)
+ttkscale       <- function(parent, ...) tkwidget(parent, "ttk::scale", ...)
 ttkscrollbar   <- function(parent, ...) tkwidget(parent, "ttk::scrollbar", ...)
 ttkseparator   <- function(parent, ...) tkwidget(parent, "ttk::separator", ...)
 ttksizegrip    <- function(parent, ...) tkwidget(parent, "ttk::sizegrip", ...)
+ttkspinbox     <- function(parent, ...) tkwidget(parent, "ttk::spinbox", ...)
 ttktreeview    <- function(parent, ...) tkwidget(parent, "ttk::treeview", ...)
 
 
@@ -385,10 +386,15 @@ tkgrab.release <- function(...) tcl("grab", "release", ...)
 tkgrab.set     <- function(...) tcl("grab", "set", ...)
 tkgrab.status  <- function(...) tcl("grab", "status", ...)
 
-tkimage.cget     <- function(...) tcl("image","cget",...)
-tkimage.configure <- function(...) tcl("image","configure",...)
-tkimage.create   <- function(...) tcl("image","create",...)
-tkimage.names    <- function(...) tcl("image","names",...)
+tkimage.create <- function(...) tcl("image", "create", ...)
+tkimage.delete <- function(...) tcl("image", "delete", ...)
+tkimage.height <- function(...) tcl("image", "height", ...)
+tkimage.inuse  <- function(...) tcl("image", "inuse", ...)
+tkimage.names  <- function(...) tcl("image", "names", ...)
+tkimage.type   <- function(...) tcl("image", "type", ...)
+tkimage.types  <- function(...) tcl("image", "types", ...)
+tkimage.width  <- function(...) tcl("image", "width", ...)
+
 
 ## NB: some widgets also have a selection.clear command, hence the "X".
 ## tkselection.clear might be made a generic function instead.
diff --git a/src/library/tcltk/R/tclarray.R b/src/library/tcltk/R/tclarray.R
index 8833d05..8628cd2 100644
--- a/src/library/tcltk/R/tclarray.R
+++ b/src/library/tcltk/R/tclarray.R
@@ -1,5 +1,5 @@
 #  File src/library/tcltk/R/tclarray.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
 #  Copyright (C) 1995-2012 The R Core Team
 #
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 tclArray <- function() {
     x <- tclVar()
diff --git a/src/library/tcltk/R/tclsearch.R b/src/library/tcltk/R/tclsearch.R
index 1424fc3..9602e57 100644
--- a/src/library/tcltk/R/tclsearch.R
+++ b/src/library/tcltk/R/tclsearch.R
@@ -1,5 +1,5 @@
 #  File src/library/tcltk/R/tclsearch.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
 #  Copyright (C) 1995-2012 The R Core Team
 #
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 
 addTclPath <- function(path = ".")
diff --git a/src/library/tcltk/R/tcltk-defunct.R b/src/library/tcltk/R/tcltk-defunct.R
index d63a8a2..143559b 100644
--- a/src/library/tcltk/R/tcltk-defunct.R
+++ b/src/library/tcltk/R/tcltk-defunct.R
@@ -1,5 +1,5 @@
 #  File src/library/tcltk/R/tcltk-defunct.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
 #  Copyright (C) 1995-2012 The R Core Team
 #
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 ## This file is only retained to record history.
 
diff --git a/src/library/tcltk/R/tkGUI.R b/src/library/tcltk/R/tkGUI.R
index 8929232..0531acc 100644
--- a/src/library/tcltk/R/tkGUI.R
+++ b/src/library/tcltk/R/tkGUI.R
@@ -1,7 +1,7 @@
 #  File src/library/tcltk/R/tkGUI.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
-#  Copyright (C) 1995-2013 The R Core Team
+#  Copyright (C) 1995-2014 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
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 if (.Platform$OS.type == "windows") {
     utils::globalVariables(".C_RTcl_ActivateConsole")
@@ -30,7 +30,7 @@ tkStartGUI <- function()
     tcl("source", file.path(.Library, "tcltk", "exec", "console.tcl"))
     .C(.C_RTcl_ActivateConsole)
     Menu <- .Tk.newwin(".menu")
-    Term <- .Tk.newwin(".tk-R.term")
+    .Tk.newwin(".tk-R.term") # result unused
     Toolbar <- .Tk.newwin(".tk-R.toolbar")
     options(pager=tkpager)
 
@@ -75,7 +75,7 @@ tkStartGUI <- function()
                          selectmode = "multiple")
 	load <- function() {
             s <- as.integer(tkcurselection(box))
-            if (!length(s)) return
+            if (!length(s)) return()
             lapply(pkglist[s+1L],  require,  character.only = TRUE)
             tkdestroy(tt)
 	}
@@ -93,7 +93,7 @@ tkStartGUI <- function()
                          selectmode = "multiple")
 	gogetem <- function() {
             s <- as.integer(tkcurselection(box))
-            if (!length(s)) return
+            if (!length(s)) return()
             utils::install.packages(l[s+1L])
             tkdestroy(tt)
 	}
@@ -113,7 +113,7 @@ tkStartGUI <- function()
         entry <- tkentry(Toolbar, textvariable = txtvar)
         showhelp <-  function() {
             s <- as.character(tclObj(txtvar))[1L]
-            if (!length(s)) return
+            if (!length(s)) return()
             nm <- as.name(s)
             print(eval(substitute(help(nm))))
             tclvalue(txtvar) <- ""
diff --git a/src/library/tcltk/R/unix/zzz.R b/src/library/tcltk/R/unix/zzz.R
index 6a288b7..e33405f 100644
--- a/src/library/tcltk/R/unix/zzz.R
+++ b/src/library/tcltk/R/unix/zzz.R
@@ -1,7 +1,7 @@
 #  File src/library/tcltk/R/unix/zzz.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
-#  Copyright (C) 1995-2012 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
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 .TkUp <- FALSE
 
@@ -41,24 +41,26 @@
         ## installed, and check libX11 is present since this is a
         ## common cause of problems with CRAN binary installs reported
         ## for Rcmdr.
-        r_arch <- .Platform$r_arch
-        DLL <- file.path(libname, pkgname, "libs", r_arch, "tcltk.so")
-        out <- system2("otool", c("-L", shQuote(DLL)), stdout = TRUE)
-        ind <- grep("libtk[.0-9]+[.]dylib", out)
-        if(length(ind)) {
-            this <- sub(" .*", "", sub("^\t", "", out[ind]))
-##            message("tcltk DLL is linked to ", shQuote(this))
-            if(!file.exists(this))
-                stop("Tcl/Tk libraries are missing: install the Tcl/Tk component from the R installer",
-                     domain = NA)
-        }
-        ind <- grep("libX11[.][0-9]+[.]dylib", out)
-        if(length(ind)) {
-            this <- sub(" .*", "", sub("^\t", "", out[ind]))
-##            message("tcltk DLL is linked to ", shQuote(this))
-            if(!file.exists(this))
-                stop("X11 library is missing: install XQuartz from xquartz.macosforge.org",
-                     domain = NA)
+        if (file.exists("/usr/bin/otool")) {
+            ## otool is part of the OS nowadays.
+            DSO <- file.path(libname, pkgname, "libs", .Platform$r_arch, "tcltk.so")
+            out <- system2("/usr/bin/otool", c("-L", shQuote(DSO)), stdout = TRUE)
+            ind <- grep("libtk[.0-9]+[.]dylib", out)
+            if(length(ind)) {
+                this <- sub(" .*", "", sub("^\t", "", out[ind]))
+                ##  message("tcltk DLL is linked to ", shQuote(this))
+                if(!file.exists(this))
+                    stop("Tcl/Tk libraries are missing: install the Tcl/Tk component from the R installer",
+                         domain = NA)
+            }
+            ind <- grep("libX11[.][0-9]+[.]dylib", out)
+            if(length(ind)) {
+                this <- sub(" .*", "", sub("^\t", "", out[ind]))
+                ##  message("tcltk DLL is linked to ", shQuote(this))
+                if(!file.exists(this))
+                    stop("X11 library is missing: install XQuartz from xquartz.macosforge.org",
+                         domain = NA)
+            }
         }
 
         library.dynam("tcltk", pkgname, libname, local = FALSE)
@@ -73,6 +75,7 @@
     }
 }
 
+## This would no longer work since registration changed is.loaded
 ## .onUnload <- function(libpath) {
 ##     ## precaution in case the DLL has been unloaded without the namespace
 ##     if(is.loaded("delTcl", PACKAGE="tcltk")) {
diff --git a/src/library/tcltk/R/unix/zzzstub.R b/src/library/tcltk/R/unix/zzzstub.R
index 9566944..a0bce3a 100644
--- a/src/library/tcltk/R/unix/zzzstub.R
+++ b/src/library/tcltk/R/unix/zzzstub.R
@@ -1,5 +1,5 @@
 #  File src/library/tcltk/R/unix/zzzstub.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
 #  Copyright (C) 1995-2012 The R Core Team
 #
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 .onLoad <- function(libname, pkgname)
     stop("Tcl/Tk support is not available on this system", domain = "R-tcltk")
diff --git a/src/library/tcltk/R/utils.R b/src/library/tcltk/R/utils.R
index 0bda65d..346c384 100644
--- a/src/library/tcltk/R/utils.R
+++ b/src/library/tcltk/R/utils.R
@@ -1,7 +1,7 @@
 #  File src/library/tcltk/R/utils.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
-#  Copyright (C) 1995-2013 The R Core Team
+#  Copyright (C) 1995-2014 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
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 tk_select.list <-
     function(choices, preselect = NULL, multiple = FALSE, title = NULL)
@@ -229,3 +229,5 @@ tk_messageBox <-
     if(nzchar(default)) args <- c(args, default=default)
     tclvalue(do.call("tcl", args))
 }
+
+tclVersion <- function() as.character(tcl("info", "patchlevel"))
diff --git a/src/library/tcltk/R/windows/zzz.R b/src/library/tcltk/R/windows/zzz.R
index fbfc09d..29934de 100644
--- a/src/library/tcltk/R/windows/zzz.R
+++ b/src/library/tcltk/R/windows/zzz.R
@@ -1,5 +1,5 @@
 #  File src/library/tcltk/R/windows/zzz.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
 #  Copyright (C) 1995-2013 The R Core Team
 #
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 .TkUp <- TRUE
 
diff --git a/src/library/tcltk/exec/Tk-frontend.R b/src/library/tcltk/exec/Tk-frontend.R
index 93c0cbf..2cd5ec5 100644
--- a/src/library/tcltk/exec/Tk-frontend.R
+++ b/src/library/tcltk/exec/Tk-frontend.R
@@ -1,5 +1,5 @@
 #  File src/library/tools/R/news.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
 #  Copyright (C) 2003 The R Core Team
 #
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 {
     # NOTE: This file resides in the exec directory rather than the R
diff --git a/src/library/tcltk/man/TclInterface.Rd b/src/library/tcltk/man/TclInterface.Rd
index a3b0269..29ee698 100644
--- a/src/library/tcltk/man/TclInterface.Rd
+++ b/src/library/tcltk/man/TclInterface.Rd
@@ -1,6 +1,6 @@
 % File src/library/tcltk/man/TclInterface.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2013 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2014 R Core Team
 % Distributed under GPL 2 or later
 
 \name{TclInterface}
@@ -51,6 +51,7 @@
 \alias{.TkRoot}
 \alias{addTclPath}
 \alias{tclRequire}
+\alias{tclVersion}
 \description{
   These functions and variables provide the basic glue between \R and the
   Tcl interpreter and Tk GUI toolkit. Tk
@@ -110,6 +111,7 @@ is.tclObj(x)
 
 addTclPath(path = ".")
 tclRequire(package, warn = TRUE)
+tclVersion()
 }
 \arguments{
   \item{objv}{a named vector of Tcl objects}
@@ -252,6 +254,9 @@ tclRequire(package, warn = TRUE)
   if it succeeds, or \code{FALSE} if it fails (when a warning is
   issued).  To see the current search path as an \R character vector, use
 \preformatted{strsplit(tclvalue('auto_path'), " ")[[1]]}.
+
+  The Tcl version (including patchlevel) is returned as a character
+  string (such as \code{"8.6.3"}).
 }
 \note{
   Strings containing unbalanced braces are currently not handled
@@ -266,6 +271,8 @@ tclRequire(package, warn = TRUE)
   compiled into this build of \R.
 }
 \examples{
+tclVersion()
+
 \dontrun{
 ## These cannot be run by example() but should be OK when pasted
 ## into an interactive R session with the tcltk package loaded
diff --git a/src/library/tcltk/man/TkCommands.Rd b/src/library/tcltk/man/TkCommands.Rd
index 01848d9..ac4afc5 100644
--- a/src/library/tcltk/man/TkCommands.Rd
+++ b/src/library/tcltk/man/TkCommands.Rd
@@ -1,5 +1,5 @@
 % File src/library/tcltk/man/TkCommands.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2007 R Core Team
 % Distributed under GPL 2 or later
 
@@ -33,10 +33,14 @@
 \alias{tkgrab.release}
 \alias{tkgrab.set}
 \alias{tkgrab.status}
-\alias{tkimage.cget}
-\alias{tkimage.configure}
 \alias{tkimage.create}
+\alias{tkimage.delete}
+\alias{tkimage.height}
+\alias{tkimage.inuse}
 \alias{tkimage.names}
+\alias{tkimage.type}
+\alias{tkimage.types}
+\alias{tkimage.width}
 \alias{tkXselection.clear}
 \alias{tkXselection.get}
 \alias{tkXselection.handle}
@@ -149,10 +153,14 @@ tkgrab.release(...)
 tkgrab.set(...)
 tkgrab.status(...)
 
-tkimage.cget(...)
-tkimage.configure(...)
 tkimage.create(...)
+tkimage.delete(...)
+tkimage.height(...)
+tkimage.inuse(...)
 tkimage.names(...)
+tkimage.type(...)
+tkimage.types(...)
+tkimage.width(...)
 
 ## NB: some widgets also have a selection.clear command,
 ## hence the "X".
diff --git a/src/library/tcltk/man/TkWidgetcmds.Rd b/src/library/tcltk/man/TkWidgetcmds.Rd
index 9e812c8..f68062d 100644
--- a/src/library/tcltk/man/TkWidgetcmds.Rd
+++ b/src/library/tcltk/man/TkWidgetcmds.Rd
@@ -1,5 +1,5 @@
 % File src/library/tcltk/man/TkWidgetcmds.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2007 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/tcltk/man/TkWidgets.Rd b/src/library/tcltk/man/TkWidgets.Rd
index f024056..8fb2f8c 100644
--- a/src/library/tcltk/man/TkWidgets.Rd
+++ b/src/library/tcltk/man/TkWidgets.Rd
@@ -1,5 +1,5 @@
 % File src/library/tcltk/man/TkWidgets.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2008 R Core Team
 % Distributed under GPL 2 or later
 
@@ -27,7 +27,6 @@
 \alias{ttkcombobox}
 \alias{ttkentry}
 \alias{ttkframe}
-\alias{ttkimage}
 \alias{ttklabel}
 \alias{ttklabelframe}
 \alias{ttkmenubutton}
@@ -35,9 +34,11 @@
 \alias{ttkpanedwindow}
 \alias{ttkprogressbar}
 \alias{ttkradiobutton}
+\alias{ttkscale}
 \alias{ttkscrollbar}
 \alias{ttkseparator}
 \alias{ttksizegrip}
+\alias{ttkspinbox}
 \alias{ttktreeview}
 
 \title{Tk widgets}
@@ -68,7 +69,6 @@ ttkbutton(parent, ...)
 ttkcheckbutton(parent, ...)
 ttkcombobox(parent, ...)
 ttkframe(parent, ...)
-ttkimage(parent, ...)
 ttklabel(parent, ...)
 ttklabelframe(parent, ...)
 ttkmenubutton(parent, ...)
@@ -76,9 +76,11 @@ ttknotebook(parent, ...)
 ttkpanedwindow(parent, ...)
 ttkprogressbar(parent, ...)
 ttkradiobutton(parent, ...)
+ttkscale(parent, ...)
 ttkscrollbar(parent, ...)
 ttkseparator(parent, ...)
 ttksizegrip(parent, ...)
+ttkspinbox(parent, ...)
 ttktreeview(parent, ...)
 }
 \arguments{
@@ -122,7 +124,7 @@ if(as.character(tcl("info", "tclversion")) >= "8.5") {
   # list themes
   as.character(tcl("ttk::style", "theme", "names"))
   # select a theme -- here pre-XP windows
-  tcl("ttk::style", "theme use", "winnative")
+  tcl("ttk::style", "theme", "use", "winnative")
 } else {
   # use Tk 8.0 widgets
 }
diff --git a/src/library/tcltk/man/tclServiceMode.Rd b/src/library/tcltk/man/tclServiceMode.Rd
index 3f5a193..0e1d7da 100644
--- a/src/library/tcltk/man/tclServiceMode.Rd
+++ b/src/library/tcltk/man/tclServiceMode.Rd
@@ -1,6 +1,6 @@
 % File src/library/tcltk/man/tclServiceMode.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2007 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2014 R Core Team
 % Distributed under GPL 2 or later
 
 \name{tclServiceMode}
diff --git a/src/library/tcltk/man/tcltk-defunct.Rd b/src/library/tcltk/man/tcltk-defunct.Rd
index 31fc3f1..79c7bea 100644
--- a/src/library/tcltk/man/tcltk-defunct.Rd
+++ b/src/library/tcltk/man/tcltk-defunct.Rd
@@ -1,5 +1,5 @@
 % File src/library/tcltk/man/tcltk-defunct.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2007 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/tcltk/man/tcltk-package.Rd b/src/library/tcltk/man/tcltk-package.Rd
index 255c1d1..551d1f9 100644
--- a/src/library/tcltk/man/tcltk-package.Rd
+++ b/src/library/tcltk/man/tcltk-package.Rd
@@ -1,6 +1,6 @@
 % File src/library/tcltk/man/tcltk-package.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2008 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2014 R Core Team
 % Distributed under GPL 2 or later
 
 \name{tcltk-package}
diff --git a/src/library/tcltk/man/tkProgressBar.Rd b/src/library/tcltk/man/tkProgressBar.Rd
index c5afab5..e569a5e 100644
--- a/src/library/tcltk/man/tkProgressBar.Rd
+++ b/src/library/tcltk/man/tkProgressBar.Rd
@@ -1,5 +1,5 @@
 % File src/library/tcltk/man/tkProgressBar.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 2008 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/tcltk/man/tkStartGUI.Rd b/src/library/tcltk/man/tkStartGUI.Rd
index 563c573..3ca0c7a 100644
--- a/src/library/tcltk/man/tkStartGUI.Rd
+++ b/src/library/tcltk/man/tkStartGUI.Rd
@@ -1,5 +1,5 @@
 % File src/library/tcltk/man/tkStartGUI.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2007 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/tcltk/man/tk_choose.dir.Rd b/src/library/tcltk/man/tk_choose.dir.Rd
index 82d961d..7571b75 100644
--- a/src/library/tcltk/man/tk_choose.dir.Rd
+++ b/src/library/tcltk/man/tk_choose.dir.Rd
@@ -1,5 +1,5 @@
 % File src/library/utils/man/windows/choose.dir.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 2007-9 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/tcltk/man/tk_choose.files.Rd b/src/library/tcltk/man/tk_choose.files.Rd
index 71a7059..f2d8413 100644
--- a/src/library/tcltk/man/tk_choose.files.Rd
+++ b/src/library/tcltk/man/tk_choose.files.Rd
@@ -1,5 +1,5 @@
 % File src/library/utils/man/windows/choose.files.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2009 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/tcltk/man/tk_messageBox.Rd b/src/library/tcltk/man/tk_messageBox.Rd
index d60aede..56e8eb7 100644
--- a/src/library/tcltk/man/tk_messageBox.Rd
+++ b/src/library/tcltk/man/tk_messageBox.Rd
@@ -1,5 +1,5 @@
 % File src/library/utils/man/windows/winDialog.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2009 R Core Team
 % Distributed under GPL 2 or later
 
@@ -19,7 +19,7 @@ tk_messageBox(type = c("ok", "okcancel", "yesno", "yesnocancel",
 }
 \arguments{
   \item{type}{character. The type of dialog box. It will have the
-    buttons implied by its name.}
+    buttons implied by its name.  Can be abbreviated.}
   \item{message}{character. The information field of the dialog box.}
   \item{caption}{the caption on the widget displayed.}
   \item{default}{character. The name of the button to be used as the
diff --git a/src/library/tcltk/man/tk_select.list.Rd b/src/library/tcltk/man/tk_select.list.Rd
index ca6145d..df8df3c 100644
--- a/src/library/tcltk/man/tk_select.list.Rd
+++ b/src/library/tcltk/man/tk_select.list.Rd
@@ -1,5 +1,5 @@
 % File src/library/tcltk/man/tk_select.list.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2013 R Core Team
 % Distributed under GPL 2 or later
 
@@ -40,7 +40,7 @@ tk_select.list(choices, preselect = NULL, multiple = FALSE,
   \code{Cancel} was used) then a character vector of length 0 is returned.
 }
 \seealso{
-  \code{\link{select.list}} (a text version except on Windows and the OS X GUI),
+  \code{\link{select.list}} (a text version except on Windows and the macOS GUI),
   \code{\link{menu}} (whose \code{graphics = TRUE} mode uses this
   on most Unix-alikes).
 }
diff --git a/src/library/tcltk/man/tkpager.Rd b/src/library/tcltk/man/tkpager.Rd
index e511b0f..0f5d26b 100644
--- a/src/library/tcltk/man/tkpager.Rd
+++ b/src/library/tcltk/man/tkpager.Rd
@@ -1,5 +1,5 @@
 % File src/library/tcltk/man/tkpager.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2007 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/tcltk/po/R-da.po b/src/library/tcltk/po/R-da.po
index 82855af..fabbfa2 100644
--- a/src/library/tcltk/po/R-da.po
+++ b/src/library/tcltk/po/R-da.po
@@ -2,7 +2,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: R 3.0.0\n"
 "Report-Msgid-Bugs-To: bugs.r-project.org\n"
-"POT-Creation-Date: 2012-12-30 14:07\n"
+"POT-Creation-Date: 2014-08-03 12:17\n"
 "PO-Revision-Date: 2011-11-29 14:36+0200\n"
 "Last-Translator: Joe <joedalton2 at yahoo.dk>\n"
 "Language-Team: LANGUAGE <LL at li.org>\n"
diff --git a/src/library/tcltk/po/R-de.po b/src/library/tcltk/po/R-de.po
index 619ba9f..9ca1ec7 100644
--- a/src/library/tcltk/po/R-de.po
+++ b/src/library/tcltk/po/R-de.po
@@ -6,18 +6,18 @@ msgid ""
 msgstr ""
 "Project-Id-Version: R 3.1.0\n"
 "Report-Msgid-Bugs-To: bugs.r-project.org\n"
-"POT-Creation-Date: 2012-12-30 14:07\n"
+"POT-Creation-Date: 2014-08-03 12:17\n"
 "PO-Revision-Date: 2013-03-01 16:25+0100\n"
 "Last-Translator: Detlef Steuer <steuer at hsu-hh.de>\n"
 "Language-Team: R Core <r-core at r-project.org>\n"
-"Language: \n"
+"Language: de\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
 "Plural-Forms: nplurals=2; plural=n == 1 ? 0 : 1;\n"
 
 msgid "cannot handle object of mode '%s'"
-msgstr "kann object mit Modus '%s' nicht bedienen"
+msgstr "kann Objekt mit Modus '%s' nicht bedienen"
 
 msgid "cannot change names on Tcl array"
 msgstr "kann Namen eines Tcl Arrays nicht ändern"
@@ -101,7 +101,7 @@ msgid "Tcl/Tk support is not available on this system"
 msgstr "Tcl/Tk auf diesem System nicht verfügbar"
 
 msgid "Tcl/Tk support files were not installed"
-msgstr "Tcl/TK Unterstützung nciht installiert"
+msgstr "Tcl/TK Unterstützung nicht installiert"
 
 #~ msgid "Loading Tcl/Tk interface ..."
 #~ msgstr "Lade Tcl/Tk Interface ..."
diff --git a/src/library/tcltk/po/R-fr.po b/src/library/tcltk/po/R-fr.po
index 1a47a40..c760365 100644
--- a/src/library/tcltk/po/R-fr.po
+++ b/src/library/tcltk/po/R-fr.po
@@ -7,7 +7,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: R 2.12.0\n"
 "Report-Msgid-Bugs-To: bugs.r-project.org\n"
-"POT-Creation-Date: 2012-12-30 14:07\n"
+"POT-Creation-Date: 2014-08-03 12:17\n"
 "PO-Revision-Date: 2013-03-18 22:15+0100\n"
 "Last-Translator: Philippe Grosjean <phgrosjean at sciviews.org>\n"
 "Language-Team: French <R-core at r-project.org>\n"
diff --git a/src/library/tcltk/po/R-it.po b/src/library/tcltk/po/R-it.po
index 385e87b..c3bc57d 100644
--- a/src/library/tcltk/po/R-it.po
+++ b/src/library/tcltk/po/R-it.po
@@ -2,7 +2,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: R 2.3.0\n"
 "Report-Msgid-Bugs-To: bugs.r-project.org\n"
-"POT-Creation-Date: 2012-12-30 14:07\n"
+"POT-Creation-Date: 2014-08-03 12:17\n"
 "PO-Revision-Date: 2005-04-17 17:24+0200\n"
 "Last-Translator: stefano iacus <>\n"
 "Language-Team: Italian <it at li.org>\n"
diff --git a/src/library/tcltk/po/R-ja.po b/src/library/tcltk/po/R-ja.po
index 10feac7..da3d20b 100644
--- a/src/library/tcltk/po/R-ja.po
+++ b/src/library/tcltk/po/R-ja.po
@@ -2,7 +2,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: R 2.3.0 \n"
 "Report-Msgid-Bugs-To: bugs.r-project.org\n"
-"POT-Creation-Date: 2013-03-07 08:37\n"
+"POT-Creation-Date: 2015-06-06 13:51\n"
 "PO-Revision-Date: 2013-02-28 04:14+0200 \n"
 "Last-Translator: Triad sou  \n"
 "Language-Team: RjpWiki Message Translation Team <mokada at md.tsukuba.ac.jp> \n"
diff --git a/src/library/tcltk/po/R-ko.po b/src/library/tcltk/po/R-ko.po
index 15a3dc2..9e11aff 100644
--- a/src/library/tcltk/po/R-ko.po
+++ b/src/library/tcltk/po/R-ko.po
@@ -1,39 +1,46 @@
 # Korean translation for R tcltk package
-# src/library/tcltk/po/R-ko.po
-# Copyright (C) 1995-2014 The R Core Team
+# ./tcltk/po/R-ko.po
+#
+# Copyright (C) 1995-2016 The R Core Team
+#
 # This file is distributed under the same license as the R tcltk package.
-# Chel Hee Lee <chl948 at mail.usask.ca>, 2008-2014.
+# Maintained by Chel Hee Lee <chl948 at mail.usask.ca>, 2008-2016.
+# Contact: Chel Hee Lee <gnustats at gmail.com>
+#
+# Notes:
+# Under development (unstable) starting from 11-APR-2016 for R-3.3.1 - QC: in progress
+# Freezed on 10-APR-2016 for R-3.3.0 - QC: PASS
+# Freezed on 30-MAR-2015 for R-3.2.0 - QC: PASS
+# Freezed on 06-FEB-2015 for R-3.1.3 - QC: PASS
 #
 msgid ""
 msgstr ""
-"Project-Id-Version: R 3.1.0\n"
+"Project-Id-Version: R-3.3.0\n"
 "Report-Msgid-Bugs-To: bugs.r-project.org\n"
-"POT-Creation-Date: 2012-12-30 14:07\n"
-"PO-Revision-Date: 2014-03-26 21:18-0600\n"
+"POT-Creation-Date: 2014-08-03 12:17\n"
+"PO-Revision-Date: 2016-04-11 13:08-0600\n"
 "Last-Translator: Chel Hee Lee <chl948 at mail.usask.ca>\n"
-"Language-Team:  <chl948 at mail.usask.ca>\n"
+"Language-Team: Chel Hee Lee <chl948 at mail.usask.ca>\n"
 "Language: ko\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
 "Plural-Forms: nplurals=1; plural=0;\n"
-"X-Poedit-SourceCharset: UTF-8\n"
-"X-Generator: Poedit 1.5.4\n"
 
 msgid "cannot handle object of mode '%s'"
-msgstr "모드가 '%s'인 객체를 처리할 수 없습니다"
+msgstr "모드(mode)가 '%s'인 객체를 다룰 수 없습니다."
 
 msgid "cannot change names on Tcl array"
-msgstr "Tcl 배열에 있는 이름을 변경할 수 없습니다"
+msgstr "Tcl 배열에 있는 이름을 변경할 수 없습니다."
 
 msgid "cannot set length of Tcl array"
-msgstr "Tcl 배열에 길이를 정할 수 없습니다"
+msgstr "Tcl 배열에 길이를 정할 수 없습니다."
 
 msgid "Tcl package '%s' not found"
 msgstr "Tcl 패키지 '%s'를 찾을 수 없습니다"
 
 msgid "The tkGUI is not available under Windows"
-msgstr "tkGUI는 윈도우즈에서 사용할 수 없습니다"
+msgstr "tkGUI는 윈도우즈에서 사용할 수 없습니다."
 
 msgid "File"
 msgstr "파일"
@@ -48,7 +55,7 @@ msgid "Help"
 msgstr "도움말"
 
 msgid "Source R code"
-msgstr "R 코드 소스하기"
+msgstr "R 코드 읽어오기"
 
 msgid "Quit"
 msgstr "종료"
@@ -72,19 +79,19 @@ msgid "R FAQ"
 msgstr "R 자주 찾는 질문들"
 
 msgid "Load"
-msgstr "로드하기"
+msgstr "불러오기"
 
 msgid "Go get them!"
 msgstr "가서 그것들을 가져옵니다!"
 
 msgid "Load packages"
-msgstr "패키지를 로드하기"
+msgstr "패키지 불러오기"
 
 msgid "Install packages from CRAN"
-msgstr "CRAN으로부터 패키지들을 설치하기"
+msgstr "CRAN으로부터 패키지 설치하기"
 
 msgid "Help topic:"
-msgstr "도움말 주제들:"
+msgstr "도움말 주제:"
 
 msgid "Manuals in PDF format"
 msgstr "PDF 형식의 매뉴얼들"
@@ -96,13 +103,13 @@ msgid "Cancel"
 msgstr "취소"
 
 msgid "'pb' is not from class %s"
-msgstr "'pb'는 클래스 %s로부터 나온것이 아닙니다"
+msgstr "'pb'는 클래스 %s로부터 나온것이 아닙니다."
 
 msgid "'filters' must be a 2-column character matrix"
-msgstr "'filters'는 반드시 2개의 열을 가진 문자형 행렬이어야 합니다"
+msgstr "'filters'는 반드시 2개의 열로 이루어진 문자형 행렬이어야 합니다."
 
 msgid "Tcl/Tk support is not available on this system"
-msgstr "이 시스템에서는 Tcl/Tk을 지원하지 않습니다"
+msgstr "이 시스템에서 Tcl/Tk를 사용할 수 없습니다."
 
 msgid "Tcl/Tk support files were not installed"
-msgstr "Tcl/Tk을 지원하는 파일들이 설치되지 않았습니다"
+msgstr "Tcl/Tk을 사용하는데 필요한 파일들이 설치되지 않았습니다."
diff --git a/src/library/tcltk/po/R-pl.po b/src/library/tcltk/po/R-pl.po
index 59695d1..8b5765d 100644
--- a/src/library/tcltk/po/R-pl.po
+++ b/src/library/tcltk/po/R-pl.po
@@ -1,8 +1,8 @@
 msgid ""
 msgstr ""
-"Project-Id-Version: R 3.1.0\n"
+"Project-Id-Version: R 3.4.0\n"
 "Report-Msgid-Bugs-To: bugs.r-project.org\n"
-"POT-Creation-Date: 2013-03-07 08:37\n"
+"POT-Creation-Date: 2016-04-04 08:15\n"
 "PO-Revision-Date: \n"
 "Last-Translator: Łukasz Daniel <lukasz.daniel at gmail.com>\n"
 "Language-Team: Łukasz Daniel <lukasz.daniel at gmail.com>\n"
@@ -13,158 +13,151 @@ msgstr ""
 "na-Revision-Date: 2012-05-29 07:55+0100\n"
 "Plural-Forms: nplurals=3; plural=(n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 "
 "|| n%100>=20) ? 1 : 2);\n"
-"X-Poedit-SourceCharset: iso-8859-1\n"
-"X-Generator: Poedit 1.5.4\n"
+"X-Poedit-SourceCharset: UTF-8\n"
+"X-Generator: Poedit 1.8.7\n"
 
-# tcltk/R/Tk.R: 268
-# stop(gettextf("cannot handle object of mode '%s'",
-#                               storage.mode(x)), domain = NA)
-msgid "cannot handle object of mode '%s'"
-msgstr "nie można obsłużyć obiektu o trybie '%s'"
+#. R/utils.R: stop("'filters' must be a 2-column character matrix")
+#: R/utils.R:0
+msgid "'filters' must be a 2-column character matrix"
+msgstr "'filters' muszą być 2-kolumnowymi macierzami znaków"
 
-# tcltk/R/tclarray.R: 71
-# stop("cannot change names on Tcl array")
-msgid "cannot change names on Tcl array"
-msgstr "nie można zmienić nazw w tablicy Tcl"
+#. R/utils.R: gettextf("'pb' is not from class %s", dQuote("tkProgressBar"))
+#. R/utils.R: gettextf("'pb' is not from class %s", dQuote("tkProgressBar"))
+#: R/utils.R:0
+msgid "'pb' is not from class %s"
+msgstr "'pb' nie pochodzi z klasy %s"
 
-# tcltk/R/tclarray.R: 77
-# stop("cannot set length of Tcl array")
-msgid "cannot set length of Tcl array"
-msgstr "nie można ustawić długości tablicy Tcl"
+#. R/utils.R: gettext("Cancel")
+#: R/utils.R:0
+msgid "Cancel"
+msgstr "Anuluj"
 
-# tcltk/R/tclsearch.R: 37
-# warning(gettextf("Tcl package '%s' not found", package),
-#                     domain = NA)
-msgid "Tcl package '%s' not found"
-msgstr "Pakiet Tcl '%s' nie został znaleziony"
+#. R/tkGUI.R: gettext("Demos")
+#: R/tkGUI.R:0
+msgid "Demos"
+msgstr "Dema"
 
-# tcltk/R/tkGUI.R: 28
-# stop("The tkGUI is not available under Windows")
-msgid "The tkGUI is not available under Windows"
-msgstr "tkGUI nie jest dostępne w systemie Windows"
+#. R/tkGUI.R: gettext("Density")
+#: R/tkGUI.R:0
+msgid "Density"
+msgstr "Gęstość"
 
-# tcltk/R/tkGUI.R: 43
-# gettext("File")
+#. R/tkGUI.R: gettext("Don't save workspace")
+#: R/tkGUI.R:0
+msgid "Don't save workspace"
+msgstr "Nie zapisuj obszaru roboczego"
+
+#. R/tkGUI.R: gettext("File")
+#: R/tkGUI.R:0
 msgid "File"
 msgstr "Plik"
 
-# tcltk/R/tkGUI.R: 44
-# gettext("Demos")
-msgid "Demos"
-msgstr "Dema"
-
-# tcltk/R/tkGUI.R: 45
-# gettext("Packages")
-msgid "Packages"
-msgstr "Pakiety"
+#. R/tkGUI.R: gettext("Go get them!")
+#: R/tkGUI.R:0
+msgid "Go get them!"
+msgstr "Bierz je!"
 
-# tcltk/R/tkGUI.R: 46
-# gettext("Help")
+#. R/tkGUI.R: gettext("Help")
+#: R/tkGUI.R:0
 msgid "Help"
 msgstr "Pomoc"
 
-# tcltk/R/tkGUI.R: 48
-# gettext("Source R code")
-msgid "Source R code"
-msgstr "Źródłowy kod R"
-
-# tcltk/R/tkGUI.R: 53
-# gettext("Quit")
-msgid "Quit"
-msgstr "Wyjście"
-
-# tcltk/R/tkGUI.R: 55
-# gettext("Save workspace")
-msgid "Save workspace"
-msgstr "Zapisz obszar roboczy"
-
-# tcltk/R/tkGUI.R: 57
-# gettext("Don't save workspace")
-msgid "Don't save workspace"
-msgstr "Nie zapisuj obszaru roboczego"
-
-# tcltk/R/tkGUI.R: 60
-# gettext("t test")
-msgid "t test"
-msgstr "test t-Studenta"
+#. R/tkGUI.R: gettext("Help topic:")
+#: R/tkGUI.R:0
+msgid "Help topic:"
+msgstr "Temat pomocy:"
 
-# tcltk/R/tkGUI.R: 62
-# gettext("Density")
-msgid "Density"
-msgstr "Gęstość"
+#. R/tkGUI.R: gettext("Install packages from CRAN")
+#: R/tkGUI.R:0
+msgid "Install packages from CRAN"
+msgstr "Zainstaluj pakiety z repozytorium CRAN"
 
-# tcltk/R/tkGUI.R: 64
-# gettext("Interactive linear fitting")
+#. R/tkGUI.R: gettext("Interactive linear fitting")
+#: R/tkGUI.R:0
 msgid "Interactive linear fitting"
 msgstr "Interaktywne dopasowanie liniowe"
 
-# tcltk/R/tkGUI.R: 66
-# gettext("R FAQ")
-msgid "R FAQ"
-msgstr "FAQ dla R"
-
-# tcltk/R/tkGUI.R: 83
-# gettext("Load")
+#. R/tkGUI.R: gettext("Load")
+#: R/tkGUI.R:0
 msgid "Load"
 msgstr "Załaduj"
 
-# tcltk/R/tkGUI.R: 101
-# gettext("Go get them!")
-msgid "Go get them!"
-msgstr "Bierz je!"
-
-# tcltk/R/tkGUI.R: 104
-# gettext("Load packages")
+#. R/tkGUI.R: gettext("Load packages")
+#: R/tkGUI.R:0
 msgid "Load packages"
 msgstr "Załaduj pakiety"
 
-# tcltk/R/tkGUI.R: 106
-# gettext("Install packages from CRAN")
-msgid "Install packages from CRAN"
-msgstr "Zainstaluj pakiety z repozytorium CRAN"
-
-# tcltk/R/tkGUI.R: 111
-# gettext("Help topic:")
-msgid "Help topic:"
-msgstr "Temat pomocy:"
-
-# tcltk/R/tkGUI.R: 137
-# gettext("Manuals in PDF format")
+#. R/tkGUI.R: gettext("Manuals in PDF format")
+#: R/tkGUI.R:0
 msgid "Manuals in PDF format"
 msgstr "Podręczniki w formacie PDF"
 
-# tcltk/R/utils.R: 49
-# gettext("OK")
+#. R/utils.R: gettext("OK")
+#: R/utils.R:0
 msgid "OK"
 msgstr "OK"
 
-# tcltk/R/utils.R: 50
-# gettext("Cancel")
-msgid "Cancel"
-msgstr "Anuluj"
+#. R/tkGUI.R: gettext("Packages")
+#: R/tkGUI.R:0
+msgid "Packages"
+msgstr "Pakiety"
 
-# tcltk/R/utils.R: 156
-# stop(gettextf("'pb' is not from class %s",
-#                       dQuote("tkProgressBar")),
-#              domain = NA)
-# tcltk/R/utils.R: 165
-# stop(gettextf("'pb' is not from class %s",
-#                       dQuote("tkProgressBar")),
-#              domain = NA)
-msgid "'pb' is not from class %s"
-msgstr "'pb' nie pochodzi z klasy %s"
+#. R/tkGUI.R: gettext("Quit")
+#: R/tkGUI.R:0
+msgid "Quit"
+msgstr "Wyjście"
 
-# tcltk/R/utils.R: 191
-# stop("'filters' must be a 2-column character matrix")
-msgid "'filters' must be a 2-column character matrix"
-msgstr "'filters' muszą być 2-kolumnowymi macierzami znaków"
+#. R/tkGUI.R: gettext("R FAQ")
+#: R/tkGUI.R:0
+msgid "R FAQ"
+msgstr "FAQ dla R"
 
-# tcltk/R/unix/zzzstub.R: 20
-# stop("Tcl/Tk support is not available on this system", domain = "R-tcltk")
-msgid "Tcl/Tk support is not available on this system"
-msgstr "Obsługa Tcl/Tk nie jest dostępna dla tego systemu"
+#. R/tkGUI.R: gettext("Save workspace")
+#: R/tkGUI.R:0
+msgid "Save workspace"
+msgstr "Zapisz obszar roboczy"
+
+#. R/tkGUI.R: gettext("Source R code")
+#: R/tkGUI.R:0
+msgid "Source R code"
+msgstr "Źródłowy kod R"
+
+#. R/tclsearch.R: gettextf("Tcl package '%s' not found", package)
+#: R/tclsearch.R:0
+msgid "Tcl package '%s' not found"
+msgstr "Pakiet Tcl '%s' nie został znaleziony"
 
-# tcltk/R/windows/zzz.R: 27
-# stop("Tcl/Tk support files were not installed", call.=FALSE)
+#. R/windows/zzz.R: stop("Tcl/Tk support files were not installed", call. = FALSE)
+#: R/windows/zzz.R:0
 msgid "Tcl/Tk support files were not installed"
 msgstr "Pliki obsługujące Tcl/Tk nie zostały zainstalowane"
+
+#. R/unix/zzzstub.R: stop("Tcl/Tk support is not available on this system", domain = "R-tcltk")
+#: R/unix/zzzstub.R:0
+msgid "Tcl/Tk support is not available on this system"
+msgstr "Obsługa Tcl/Tk nie jest dostępna dla tego systemu"
+
+#. R/tkGUI.R: stop("The tkGUI is not available under Windows")
+#: R/tkGUI.R:0
+msgid "The tkGUI is not available under Windows"
+msgstr "tkGUI nie jest dostępne w systemie Windows"
+
+#. R/tclarray.R: stop("cannot change names on Tcl array")
+#: R/tclarray.R:0
+msgid "cannot change names on Tcl array"
+msgstr "nie można zmienić nazw w tablicy Tcl"
+
+#. R/Tk.R: gettextf("cannot handle object of mode '%s'", storage.mode(x))
+#: R/Tk.R:0
+msgid "cannot handle object of mode '%s'"
+msgstr "nie można obsłużyć obiektu o trybie '%s'"
+
+#. R/tclarray.R: stop("cannot set length of Tcl array")
+#: R/tclarray.R:0
+msgid "cannot set length of Tcl array"
+msgstr "nie można ustawić długości tablicy Tcl"
+
+#. R/tkGUI.R: gettext("t test")
+#: R/tkGUI.R:0
+msgid "t test"
+msgstr "test t-Studenta"
diff --git a/src/library/tcltk/po/R-pt_BR.po b/src/library/tcltk/po/R-pt_BR.po
index 2ef4418..738db75 100644
--- a/src/library/tcltk/po/R-pt_BR.po
+++ b/src/library/tcltk/po/R-pt_BR.po
@@ -6,7 +6,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: R 2.3.0\n"
 "Report-Msgid-Bugs-To: bugs.r-project.org\n"
-"POT-Creation-Date: 2012-12-30 14:07\n"
+"POT-Creation-Date: 2014-08-03 12:17\n"
 "PO-Revision-Date: 2011-03-26 08:57-0300\n"
 "Last-Translator: Fernando Henrique <pessoal at fernandohrosa.com.br>\n"
 "Language-Team: http://www.feferraz.net/br/P/Projeto_Traducao_R_Portugues\n"
diff --git a/src/library/tcltk/po/R-ru.po b/src/library/tcltk/po/R-ru.po
index 35b728f..8438d10 100644
--- a/src/library/tcltk/po/R-ru.po
+++ b/src/library/tcltk/po/R-ru.po
@@ -10,11 +10,11 @@ msgid ""
 msgstr ""
 "Project-Id-Version: R 2.9.0\n"
 "Report-Msgid-Bugs-To: bugs.r-project.org\n"
-"POT-Creation-Date: 2012-12-30 14:07\n"
-"PO-Revision-Date: 2013-03-19 21:49-0600\n"
+"POT-Creation-Date: 2014-08-03 12:17\n"
+"PO-Revision-Date: 2016-04-05 18:08-0600\n"
 "Last-Translator: Alexey Shipunov <dactylorhiza at gmail.com>\n"
 "Language-Team: Russian\n"
-"Language: \n"
+"Language: ru\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=KOI8-R\n"
 "Content-Transfer-Encoding: 8bit\n"
diff --git a/src/library/tcltk/po/R-tcltk.pot b/src/library/tcltk/po/R-tcltk.pot
index 463c997..45e1773 100644
--- a/src/library/tcltk/po/R-tcltk.pot
+++ b/src/library/tcltk/po/R-tcltk.pot
@@ -1,8 +1,7 @@
 msgid ""
 msgstr ""
-"Project-Id-Version: R 3.1.0\n"
-"Report-Msgid-Bugs-To: bugs.r-project.org\n"
-"POT-Creation-Date: 2013-03-07 08:37\n"
+"Project-Id-Version: tcltk 3.4.0\n"
+"POT-Creation-Date: 2016-04-01 09:50\n"
 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
 "Last-Translator: FULL NAME <EMAIL at ADDRESS>\n"
 "Language-Team: LANGUAGE <LL at li.org>\n"
diff --git a/src/library/tcltk/po/R-zh_CN.po b/src/library/tcltk/po/R-zh_CN.po
index 1118545..d9a8528 100644
--- a/src/library/tcltk/po/R-zh_CN.po
+++ b/src/library/tcltk/po/R-zh_CN.po
@@ -7,11 +7,11 @@ msgid ""
 msgstr ""
 "Project-Id-Version: R 2.4.0\n"
 "Report-Msgid-Bugs-To: bugs.r-project.org\n"
-"POT-Creation-Date: 2013-03-07 08:37\n"
+"POT-Creation-Date: 2014-08-03 12:17\n"
 "PO-Revision-Date: 2005-02-04 08:37+0000\n"
 "Last-Translator: 陈斐 <feic at avaya.com>\n"
 "Language-Team: Chinese\n"
-"Language: \n"
+"Language: zh_CN\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
diff --git a/src/library/tcltk/po/da.po b/src/library/tcltk/po/da.po
index 88b6722..d628383 100644
--- a/src/library/tcltk/po/da.po
+++ b/src/library/tcltk/po/da.po
@@ -5,8 +5,8 @@
 msgid ""
 msgstr ""
 "Project-Id-Version: R 3.0.0\n"
-"Report-Msgid-Bugs-To: bugs.r-project.org\n"
-"POT-Creation-Date: 2013-12-17 11:19+0000\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2016-04-01 10:28-0700\n"
 "PO-Revision-Date: 2011-11-28 23:40+0200\n"
 "Last-Translator: Joe <joedalton2 at yahoo.dk>\n"
 "Language-Team: LANGUAGE <LL at li.org>\n"
@@ -17,31 +17,31 @@ msgstr ""
 "Plural-Forms: nplurals=2; plural=(n != 1);\n"
 "X-Generator: Pootle 2.1.6\n"
 
-#: tcltk.c:66
+#: tcltk.c:67
 msgid "parse error in R expression"
 msgstr "fortolkningsfejl i R-udtryk"
 
-#: tcltk.c:168 tcltk.c:245
+#: tcltk.c:176 tcltk.c:253
 msgid "tcl error.\n"
 msgstr "tcl-fejl.\n"
 
-#: tcltk.c:197 tcltk.c:742
+#: tcltk.c:205 tcltk.c:750
 msgid "invalid argument"
 msgstr "ugyldigt argument"
 
-#: tcltk.c:301 tcltk.c:319 tcltk.c:392 tcltk.c:455 tcltk.c:507
+#: tcltk.c:309 tcltk.c:327 tcltk.c:400 tcltk.c:463 tcltk.c:515
 msgid "invalid tclObj -- perhaps saved from another session?"
 msgstr "ugyldigt tclObj - måske gemt fra en anden session?"
 
-#: tcltk.c:617
+#: tcltk.c:625
 msgid "argument list is too long in tcltk internal function 'callback_closure'"
 msgstr "argumentliste er for lang i tcltk-intern funktion 'callback_closure'"
 
-#: tcltk.c:650
+#: tcltk.c:658
 msgid "argument is not of correct type"
 msgstr "argument er ikke af korrekt type"
 
-#: tcltk.c:701
+#: tcltk.c:709
 msgid "no DISPLAY variable so Tk is not available"
 msgstr "ingen DISPLAY-variabel så Tk er ikke tilgængelig"
 
diff --git a/src/library/tcltk/po/de.po b/src/library/tcltk/po/de.po
index 1f83935..d6c7fd1 100644
--- a/src/library/tcltk/po/de.po
+++ b/src/library/tcltk/po/de.po
@@ -5,43 +5,43 @@
 msgid ""
 msgstr ""
 "Project-Id-Version: R-3.1.0\n"
-"Report-Msgid-Bugs-To: bugs.r-project.org\n"
-"POT-Creation-Date: 2013-12-17 11:19+0000\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2016-04-01 10:28-0700\n"
 "PO-Revision-Date: 2013-03-01 16:24+0100\n"
 "Last-Translator: Detlef Steuer <steuer at hsu-hh.de>\n"
 "Language-Team: R Core <r-core at r-project.org>\n"
-"Language: \n"
+"Language: de\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
 "Plural-Forms: nplurals=2; plural=n == 1 ? 0 : 1;\n"
 
-#: tcltk.c:66
+#: tcltk.c:67
 msgid "parse error in R expression"
 msgstr "Fehler beim Parsen des R-Ausdrucks"
 
-#: tcltk.c:168 tcltk.c:245
+#: tcltk.c:176 tcltk.c:253
 msgid "tcl error.\n"
 msgstr "tcl Fehler.\n"
 
-#: tcltk.c:197 tcltk.c:742
+#: tcltk.c:205 tcltk.c:750
 msgid "invalid argument"
 msgstr "unzulässiges Argument"
 
-#: tcltk.c:301 tcltk.c:319 tcltk.c:392 tcltk.c:455 tcltk.c:507
+#: tcltk.c:309 tcltk.c:327 tcltk.c:400 tcltk.c:463 tcltk.c:515
 msgid "invalid tclObj -- perhaps saved from another session?"
 msgstr "ungültiges tclObj -- evtl. aus einer anderen Sitzung gespeichert?"
 
-#: tcltk.c:617
+#: tcltk.c:625
 msgid "argument list is too long in tcltk internal function 'callback_closure'"
 msgstr ""
-"Argumentliste ist für internen tcltk Funktion 'calback_closure' zu lang"
+"Argumentliste ist für interne tcltk Funktion 'callback_closure' zu lang"
 
-#: tcltk.c:650
+#: tcltk.c:658
 msgid "argument is not of correct type"
 msgstr "Argument hat nicht den korrekten Typ"
 
-#: tcltk.c:701
+#: tcltk.c:709
 msgid "no DISPLAY variable so Tk is not available"
 msgstr "keine DISPLAY Variable, Tk deshalb nicht verfügbar"
 
@@ -51,7 +51,7 @@ msgstr "Tcl ist nicht geladen"
 
 #: tcltk_unix.c:98
 msgid "Tcl is not last loaded handler"
-msgstr "Tcl ist nicht der letztw geladenen Handler"
+msgstr "Tcl ist nicht der letzte geladene Handler"
 
 #~ msgid "Tcl already loaded"
 #~ msgstr "Tcl ist bereits geladen"
diff --git a/src/library/tcltk/po/fr.po b/src/library/tcltk/po/fr.po
index 8e14f66..39977ee 100644
--- a/src/library/tcltk/po/fr.po
+++ b/src/library/tcltk/po/fr.po
@@ -6,8 +6,8 @@
 msgid ""
 msgstr ""
 "Project-Id-Version: R 2.12.0\n"
-"Report-Msgid-Bugs-To: bugs.r-project.org\n"
-"POT-Creation-Date: 2013-12-17 11:19+0000\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2016-04-01 10:28-0700\n"
 "PO-Revision-Date: 2010-10-01 21:01+0100\n"
 "Last-Translator: Philippe Grosjean <phgrosjean at sciviews.org>\n"
 "Language-Team: French <R-core at r-project.org>\n"
@@ -19,33 +19,33 @@ msgstr ""
 "X-Poedit-Language: French\n"
 "X-Poedit-SourceCharset: iso-8859-1\n"
 
-#: tcltk.c:66
+#: tcltk.c:67
 msgid "parse error in R expression"
 msgstr "erreur d'analyse de code dans l'expression R"
 
-#: tcltk.c:168 tcltk.c:245
+#: tcltk.c:176 tcltk.c:253
 msgid "tcl error.\n"
 msgstr "erreur Tcl.\n"
 
-#: tcltk.c:197 tcltk.c:742
+#: tcltk.c:205 tcltk.c:750
 msgid "invalid argument"
 msgstr "argument incorrect"
 
-#: tcltk.c:301 tcltk.c:319 tcltk.c:392 tcltk.c:455 tcltk.c:507
+#: tcltk.c:309 tcltk.c:327 tcltk.c:400 tcltk.c:463 tcltk.c:515
 msgid "invalid tclObj -- perhaps saved from another session?"
 msgstr "tclObj incorrect -- sans doute sauv� depuis une autre session ?"
 
-#: tcltk.c:617
+#: tcltk.c:625
 msgid "argument list is too long in tcltk internal function 'callback_closure'"
 msgstr ""
 "la liste d'arguments est trop longue dans la fonction interne tcltk "
 "'callback_closure'"
 
-#: tcltk.c:650
+#: tcltk.c:658
 msgid "argument is not of correct type"
 msgstr "l'argument n'est pas d'un type correct"
 
-#: tcltk.c:701
+#: tcltk.c:709
 msgid "no DISPLAY variable so Tk is not available"
 msgstr "pas de variable DISPLAY, donc Tk n'est pas disponible"
 
diff --git a/src/library/tcltk/po/ja.po b/src/library/tcltk/po/ja.po
index 06993c4..1c6d2a4 100644
--- a/src/library/tcltk/po/ja.po
+++ b/src/library/tcltk/po/ja.po
@@ -7,8 +7,8 @@
 msgid ""
 msgstr ""
 "Project-Id-Version: R 2.5.0 \n"
-"Report-Msgid-Bugs-To: bugs.r-project.org\n"
-"POT-Creation-Date: 2013-12-17 11:19+0000\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2016-04-01 10:28-0700\n"
 "PO-Revision-Date: 2013-02-23 17:50+0200 \n"
 "Last-Translator: Triad sou  \n"
 "Language-Team: Japanese <translation-team-ja at lists.sourceforge.net> \n"
@@ -19,31 +19,31 @@ msgstr ""
 "Plural-Forms: nplurals=1; plural=0; \n"
 "X-Generator: Pootle 2.0.5 \n"
 
-#: tcltk.c:66
+#: tcltk.c:67
 msgid "parse error in R expression"
 msgstr " R expression 内に構文エラー "
 
-#: tcltk.c:168 tcltk.c:245
+#: tcltk.c:176 tcltk.c:253
 msgid "tcl error.\n"
 msgstr " tcl エラー \n"
 
-#: tcltk.c:197 tcltk.c:742
+#: tcltk.c:205 tcltk.c:750
 msgid "invalid argument"
 msgstr " 不正な引数 "
 
-#: tcltk.c:301 tcltk.c:319 tcltk.c:392 tcltk.c:455 tcltk.c:507
+#: tcltk.c:309 tcltk.c:327 tcltk.c:400 tcltk.c:463 tcltk.c:515
 msgid "invalid tclObj -- perhaps saved from another session?"
 msgstr " 不正な tclObj - おそらく、別のセッションから保存された? "
 
-#: tcltk.c:617
+#: tcltk.c:625
 msgid "argument list is too long in tcltk internal function 'callback_closure'"
 msgstr " 引数リストは tcltk の内部関数 'callback_closure' において長過ぎます "
 
-#: tcltk.c:650
+#: tcltk.c:658
 msgid "argument is not of correct type"
 msgstr " 引数は正しいタイプではありません "
 
-#: tcltk.c:701
+#: tcltk.c:709
 msgid "no DISPLAY variable so Tk is not available"
 msgstr " DISPLAY 環境変数が無いので Tk は利用出来ません "
 
diff --git a/src/library/tcltk/po/ko.po b/src/library/tcltk/po/ko.po
index 47a99c0..25b2e87 100644
--- a/src/library/tcltk/po/ko.po
+++ b/src/library/tcltk/po/ko.po
@@ -1,50 +1,57 @@
 # Korean translation for R tcltk package
-# src/library/tcltk/po/ko.po
-# Copyright (C) 1995-2014 The R Core Team
+# ./tcltk/po/ko.po
+#
+# Copyright (C) 1995-2016 The R Core Team
+#
 # This file is distributed under the same license as the R tcltk package.
-# Chel Hee Lee <chl948 at mail.usask.ca>, 2008-2014.
+# Maintained by Chel Hee Lee <chl948 at mail.usask.ca>, 2008-2016.
+# Contact: Chel Hee Lee <gnustats at gmail.com>
+#
+# Notes:
+# Under development (unstable) starting from 11-APR-2016 for R-3.3.1 - QC: in progress
+# Freezed on 10-APR-2016 for R-3.3.0 - QC: PASS
+# Freezed on 30-MAR-2015 for R-3.2.0 - QC: PASS
+# Freezed on 06-FEB-2015 for R-3.1.3 - QC: PASS
 #
 msgid ""
 msgstr ""
-"Project-Id-Version: R 3.1.0\n"
+"Project-Id-Version: R-3.3.0\n"
 "Report-Msgid-Bugs-To: bugs.r-project.org\n"
-"POT-Creation-Date: 2013-12-17 11:19+0000\n"
-"PO-Revision-Date: 2014-03-26 21:18-0600\n"
+"POT-Creation-Date: 2016-04-01 10:28-0700\n"
+"PO-Revision-Date: 2016-04-11 13:08-0600\n"
 "Last-Translator: Chel Hee Lee <chl948 at mail.usask.ca>\n"
-"Language-Team:  <chl948 at mail.usask.ca>\n"
+"Language-Team: Chel Hee Lee <chl948 at mail.usask.ca>\n"
 "Language: ko\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
 "Plural-Forms: nplurals=1; plural=0;\n"
-"X-Poedit-SourceCharset: UTF-8\n"
-"X-Generator: Poedit 1.5.4\n"
 
-#: tcltk.c:66
+#: tcltk.c:67
 msgid "parse error in R expression"
-msgstr "R 표현식을 구문분석하는 도중에 에러가 발생했습니다"
+msgstr "R 표현식(expression)을 구문분석(parse) 하던 도중에 에러가 발생했습니다."
 
-#: tcltk.c:168 tcltk.c:245
+#: tcltk.c:176 tcltk.c:253
 msgid "tcl error.\n"
 msgstr "tcl 에러입니다.\n"
 
-#: tcltk.c:197 tcltk.c:742
+#: tcltk.c:205 tcltk.c:750
 msgid "invalid argument"
-msgstr "인자가 잘못되었습니다"
+msgstr "올바르지 않은 인자입니다."
 
-#: tcltk.c:301 tcltk.c:319 tcltk.c:392 tcltk.c:455 tcltk.c:507
+#: tcltk.c:309 tcltk.c:327 tcltk.c:400 tcltk.c:463 tcltk.c:515
 msgid "invalid tclObj -- perhaps saved from another session?"
-msgstr "tclObj이 잘못되었습니다 -- 혹시 다른 세션으로부터 저장된것이 아닐까요?"
+msgstr "올바르지 않은 tclObj입니다 -- 혹시 다른 세션으로부터 저장된것이 아닐까요?"
 
-#: tcltk.c:617
+#: tcltk.c:625
 msgid "argument list is too long in tcltk internal function 'callback_closure'"
 msgstr "tcltk 내부 함수 'callback_closure'에 있는 인자목록이 너무 깁니다"
 
-#: tcltk.c:650
+#: tcltk.c:658
 msgid "argument is not of correct type"
-msgstr "올바른 유형의 인자가 아닙니다"
+msgstr "올바른 유형(correct type)의 인자가 아닙니다."
 
-#: tcltk.c:701
+#: tcltk.c:709
 msgid "no DISPLAY variable so Tk is not available"
 msgstr "DISPLAY 변수가 없기 때문에 Tk를 사용할 수 없습니다"
 
@@ -54,4 +61,4 @@ msgstr "Tcl이 로드되지 않았습니다"
 
 #: tcltk_unix.c:98
 msgid "Tcl is not last loaded handler"
-msgstr "Tcl은 마지막으로 로드된 핸들러가 아닙니다"
+msgstr "Tcl은 마지막으로 로드된 핸들러(handler)가 아닙니다"
diff --git a/src/library/tcltk/po/pl.po b/src/library/tcltk/po/pl.po
index 3830589..115ab77 100644
--- a/src/library/tcltk/po/pl.po
+++ b/src/library/tcltk/po/pl.po
@@ -1,8 +1,8 @@
 msgid ""
 msgstr ""
-"Project-Id-Version: R 3.1.0\n"
-"Report-Msgid-Bugs-To: bugs.r-project.org\n"
-"POT-Creation-Date: 2013-12-17 11:19+0000\n"
+"Project-Id-Version: R 3.4.0\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2016-04-01 10:28-0700\n"
 "PO-Revision-Date: \n"
 "Last-Translator: Łukasz Daniel <lukasz.daniel at gmail.com>\n"
 "Language-Team: Łukasz Daniel <lukasz.daniel at gmail.com>\n"
@@ -13,69 +13,43 @@ msgstr ""
 "na-Revision-Date: 2012-05-29 07:55+0100\n"
 "Plural-Forms: nplurals=3; plural=(n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 "
 "|| n%100>=20) ? 1 : 2);\n"
-"X-Poedit-SourceCharset: iso-8859-1\n"
-"X-Generator: Poedit 1.5.4\n"
+"X-Poedit-SourceCharset: UTF-8\n"
+"X-Generator: Poedit 1.8.7\n"
 
-# tcltk/src/tcltk.c: 66
-#  _("parse error in R expression")
-#: tcltk.c:66
+#: tcltk.c:67
 msgid "parse error in R expression"
 msgstr "Błąd składni w wyrażeniu R"
 
-#: tcltk.c:168 tcltk.c:245
+#: tcltk.c:176 tcltk.c:253
 msgid "tcl error.\n"
 msgstr "błąd 'tcl'.\n"
 
-# tcltk/src/tcltk.c: 197
-# error(_("invalid argument"))
-# tcltk/src/tcltk.c: 742
-# error(_("invalid argument"))
-#: tcltk.c:197 tcltk.c:742
+#: tcltk.c:205 tcltk.c:750
 msgid "invalid argument"
 msgstr "niepoprawny argument"
 
-# tcltk/src/tcltk.c: 301
-# error(_("invalid tclObj -- perhaps saved from another session?"))
-# tcltk/src/tcltk.c: 319
-# error(_("invalid tclObj -- perhaps saved from another session?"))
-# tcltk/src/tcltk.c: 392
-# error(_("invalid tclObj -- perhaps saved from another session?"))
-# tcltk/src/tcltk.c: 455
-# error(_("invalid tclObj -- perhaps saved from another session?"))
-# tcltk/src/tcltk.c: 507
-# error(_("invalid tclObj -- perhaps saved from another session?"))
-#: tcltk.c:301 tcltk.c:319 tcltk.c:392 tcltk.c:455 tcltk.c:507
+#: tcltk.c:309 tcltk.c:327 tcltk.c:400 tcltk.c:463 tcltk.c:515
 msgid "invalid tclObj -- perhaps saved from another session?"
 msgstr "niepoprawny obiekt typu 'tclObj' -- być może zapisany z innej sesji?"
 
-# tcltk/src/tcltk.c: 617
-# error(_("argument list is too long in tcltk internal function 'callback_closure'"))
-#: tcltk.c:617
+#: tcltk.c:625
 msgid "argument list is too long in tcltk internal function 'callback_closure'"
 msgstr ""
 "lista argumentów jest zbyt długa w wewnętrznej funkcji tcltk "
 "'callback_closure'"
 
-# tcltk/src/tcltk.c: 650
-# error(_("argument is not of correct type"))
-#: tcltk.c:650
+#: tcltk.c:658
 msgid "argument is not of correct type"
 msgstr "argument nie jest poprawnego typu"
 
-# tcltk/src/tcltk.c: 701
-# warning(_("no DISPLAY variable so Tk is not available"))
-#: tcltk.c:701
+#: tcltk.c:709
 msgid "no DISPLAY variable so Tk is not available"
 msgstr "brak zmiennej 'DISPLAY' więc Tk nie jest dostępne"
 
-# tcltk/src/tcltk_unix.c: 94
-# error(_("Tcl is not loaded"))
 #: tcltk_unix.c:94
 msgid "Tcl is not loaded"
 msgstr "Tcl nie został załadowany"
 
-# tcltk/src/tcltk_unix.c: 98
-# error(_("Tcl is not last loaded handler"))
 #: tcltk_unix.c:98
 msgid "Tcl is not last loaded handler"
 msgstr "Tcl nie jest ostatnią załadowaną usługą"
diff --git a/src/library/tcltk/po/pt_BR.po b/src/library/tcltk/po/pt_BR.po
index 59928ea..a2cadba 100644
--- a/src/library/tcltk/po/pt_BR.po
+++ b/src/library/tcltk/po/pt_BR.po
@@ -5,44 +5,44 @@
 msgid ""
 msgstr ""
 "Project-Id-Version: R 2.11.0\n"
-"Report-Msgid-Bugs-To: bugs.r-project.org\n"
-"POT-Creation-Date: 2013-12-17 11:19+0000\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2016-04-01 10:28-0700\n"
 "PO-Revision-Date: 2011-03-26 08:58-0300\n"
 "Last-Translator: Fernando Henrique <pessoal at fernandohrosa.com.br>\n"
 "Language-Team: http://www.feferraz.net/br/P/Projeto_Traducao_R_Portugues\n"
-"Language: \n"
+"Language: pt_BR\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
 "Plural-Forms: nplurals=2; plural=(n > 1);\n"
 "X-Generator: Pootle 2.0.5\n"
 
-#: tcltk.c:66
+#: tcltk.c:67
 msgid "parse error in R expression"
 msgstr "erro de análise na expressão R"
 
-#: tcltk.c:168 tcltk.c:245
+#: tcltk.c:176 tcltk.c:253
 msgid "tcl error.\n"
 msgstr "erro tcl.\n"
 
-#: tcltk.c:197 tcltk.c:742
+#: tcltk.c:205 tcltk.c:750
 msgid "invalid argument"
 msgstr "argumento inválido"
 
-#: tcltk.c:301 tcltk.c:319 tcltk.c:392 tcltk.c:455 tcltk.c:507
+#: tcltk.c:309 tcltk.c:327 tcltk.c:400 tcltk.c:463 tcltk.c:515
 msgid "invalid tclObj -- perhaps saved from another session?"
 msgstr "objeto tclObj inválido - talvez salvo em outra sessão?"
 
-#: tcltk.c:617
+#: tcltk.c:625
 msgid "argument list is too long in tcltk internal function 'callback_closure'"
 msgstr ""
 "lista de argumentos muito longa na função tcltk interna: 'callback_closure'"
 
-#: tcltk.c:650
+#: tcltk.c:658
 msgid "argument is not of correct type"
 msgstr "argumento não é do tipo correto"
 
-#: tcltk.c:701
+#: tcltk.c:709
 msgid "no DISPLAY variable so Tk is not available"
 msgstr "sem variável DISPLAY então Tk não está disponível"
 
diff --git a/src/library/tcltk/po/ru.po b/src/library/tcltk/po/ru.po
index 080dc00..69b1d04 100644
--- a/src/library/tcltk/po/ru.po
+++ b/src/library/tcltk/po/ru.po
@@ -9,45 +9,48 @@ msgid ""
 msgstr ""
 "Project-Id-Version: R 2.10.0\n"
 "Report-Msgid-Bugs-To: bugs.r-project.org\n"
-"POT-Creation-Date: 2013-12-17 11:19+0000\n"
-"PO-Revision-Date: 2013-03-19 21:49-0600\n"
+"POT-Creation-Date: 2015-06-06 13:51+0100\n"
+"PO-Revision-Date: 2016-04-05 18:08-0600\n"
 "Last-Translator: Alexey Shipunov <dactylorhiza at gmail.com>\n"
 "Language-Team: Russian\n"
-"Language: \n"
+"Language: ru\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=KOI8-R\n"
 "Content-Transfer-Encoding: 8bit\n"
 "X-Poedit-Language: Russian\n"
-"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n"
-"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
+"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
 
-#: tcltk.c:66
+#: tcltk.c:67
 msgid "parse error in R expression"
 msgstr "������ ������� ��������� R"
 
-#: tcltk.c:168 tcltk.c:245
+#: tcltk.c:176
+#: tcltk.c:253
 msgid "tcl error.\n"
 msgstr "������ tcl.\n"
 
-#: tcltk.c:197 tcltk.c:742
+#: tcltk.c:205
+#: tcltk.c:750
 msgid "invalid argument"
 msgstr "������������ ��������"
 
-#: tcltk.c:301 tcltk.c:319 tcltk.c:392 tcltk.c:455 tcltk.c:507
+#: tcltk.c:309
+#: tcltk.c:327
+#: tcltk.c:400
+#: tcltk.c:463
+#: tcltk.c:515
 msgid "invalid tclObj -- perhaps saved from another session?"
 msgstr "������������ tclObj -- ����� ����, ����������� � ������ ������?"
 
-#: tcltk.c:617
+#: tcltk.c:625
 msgid "argument list is too long in tcltk internal function 'callback_closure'"
-msgstr ""
-"������ ���������� ������� ������ �� ���������� ������� tcltk "
-"'callback_closure'"
+msgstr "������ ���������� ������� ������ �� ���������� ������� tcltk 'callback_closure'"
 
-#: tcltk.c:650
+#: tcltk.c:658
 msgid "argument is not of correct type"
 msgstr "��������� ������������� ����"
 
-#: tcltk.c:701
+#: tcltk.c:709
 msgid "no DISPLAY variable so Tk is not available"
 msgstr "��� ���������� DISPLAY, ������� Tk ����������"
 
@@ -61,3 +64,4 @@ msgstr "Tcl 
 
 #~ msgid "Tcl already loaded"
 #~ msgstr "Tcl ��� ��������"
+
diff --git a/src/library/tcltk/po/tcltk.pot b/src/library/tcltk/po/tcltk.pot
index 02cd52e..18d8e9d 100644
--- a/src/library/tcltk/po/tcltk.pot
+++ b/src/library/tcltk/po/tcltk.pot
@@ -1,14 +1,14 @@
 # SOME DESCRIPTIVE TITLE.
-# Copyright (C) YEAR The R Core Team
+# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
 # This file is distributed under the same license as the PACKAGE package.
 # FIRST AUTHOR <EMAIL at ADDRESS>, YEAR.
 #
 #, fuzzy
 msgid ""
 msgstr ""
-"Project-Id-Version: R 3.1.0\n"
-"Report-Msgid-Bugs-To: bugs.r-project.org\n"
-"POT-Creation-Date: 2013-12-17 11:19+0000\n"
+"Project-Id-Version: tcltk 3.4.0\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2016-04-01 10:28-0700\n"
 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
 "Last-Translator: FULL NAME <EMAIL at ADDRESS>\n"
 "Language-Team: LANGUAGE <LL at li.org>\n"
@@ -17,31 +17,31 @@ msgstr ""
 "Content-Type: text/plain; charset=CHARSET\n"
 "Content-Transfer-Encoding: 8bit\n"
 
-#: tcltk.c:66
+#: tcltk.c:67
 msgid "parse error in R expression"
 msgstr ""
 
-#: tcltk.c:168 tcltk.c:245
+#: tcltk.c:176 tcltk.c:253
 msgid "tcl error.\n"
 msgstr ""
 
-#: tcltk.c:197 tcltk.c:742
+#: tcltk.c:205 tcltk.c:750
 msgid "invalid argument"
 msgstr ""
 
-#: tcltk.c:301 tcltk.c:319 tcltk.c:392 tcltk.c:455 tcltk.c:507
+#: tcltk.c:309 tcltk.c:327 tcltk.c:400 tcltk.c:463 tcltk.c:515
 msgid "invalid tclObj -- perhaps saved from another session?"
 msgstr ""
 
-#: tcltk.c:617
+#: tcltk.c:625
 msgid "argument list is too long in tcltk internal function 'callback_closure'"
 msgstr ""
 
-#: tcltk.c:650
+#: tcltk.c:658
 msgid "argument is not of correct type"
 msgstr ""
 
-#: tcltk.c:701
+#: tcltk.c:709
 msgid "no DISPLAY variable so Tk is not available"
 msgstr ""
 
diff --git a/src/library/tcltk/po/zh_CN.po b/src/library/tcltk/po/zh_CN.po
index 312c44e..f2f0314 100644
--- a/src/library/tcltk/po/zh_CN.po
+++ b/src/library/tcltk/po/zh_CN.po
@@ -6,42 +6,42 @@
 msgid ""
 msgstr ""
 "Project-Id-Version: R 2.4.0\n"
-"Report-Msgid-Bugs-To: bugs.r-project.org\n"
-"POT-Creation-Date: 2013-12-17 11:19+0000\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2016-04-01 10:28-0700\n"
 "PO-Revision-Date: 2005-02-04 08:37+0000\n"
 "Last-Translator: 陈斐 <feic at avaya.com>\n"
 "Language-Team: Chinese\n"
-"Language: \n"
+"Language: zh_CN\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
 "Plural-Forms: nplurals=1; plural=0;\n"
 
-#: tcltk.c:66
+#: tcltk.c:67
 msgid "parse error in R expression"
 msgstr "R表达式里句法分析错误"
 
-#: tcltk.c:168 tcltk.c:245
+#: tcltk.c:176 tcltk.c:253
 msgid "tcl error.\n"
 msgstr "tcl错误。\n"
 
-#: tcltk.c:197 tcltk.c:742
+#: tcltk.c:205 tcltk.c:750
 msgid "invalid argument"
 msgstr "参数不对"
 
-#: tcltk.c:301 tcltk.c:319 tcltk.c:392 tcltk.c:455 tcltk.c:507
+#: tcltk.c:309 tcltk.c:327 tcltk.c:400 tcltk.c:463 tcltk.c:515
 msgid "invalid tclObj -- perhaps saved from another session?"
 msgstr "tclObj无效--是不是因此它是由另外一个对话期间保存的?"
 
-#: tcltk.c:617
+#: tcltk.c:625
 msgid "argument list is too long in tcltk internal function 'callback_closure'"
 msgstr "tcltk内部函数'callback_closure'的参数串列太长"
 
-#: tcltk.c:650
+#: tcltk.c:658
 msgid "argument is not of correct type"
 msgstr "参数的种类不对"
 
-#: tcltk.c:701
+#: tcltk.c:709
 msgid "no DISPLAY variable so Tk is not available"
 msgstr "没有DISPLAY变量,因此没有Tk这个功能"
 
diff --git a/src/library/tcltk/src/Makefile.in b/src/library/tcltk/src/Makefile.in
index b0ea15b..d3049f8 100644
--- a/src/library/tcltk/src/Makefile.in
+++ b/src/library/tcltk/src/Makefile.in
@@ -20,7 +20,13 @@ OBJECTS = $(SOURCES_C:.c=.o) $(SOURCES_F:.f=.o)
 
 SHLIB = $(pkg)@SHLIB_EXT@
 
-PKG_CPPFLAGS = @TCLTK_CPPFLAGS@
+## -I../../../include is for config.h.
+## Circumvent conflicts by having external paths last, as we
+## need them only for tcl.h, tk.h.
+PKG_CPPFLAGS = \
+  -I../../../include -I$(top_srcdir)/src/include -DHAVE_CONFIG_H \
+  @TCLTK_CPPFLAGS@
+PKG_CFLAGS = $(C_VISIBILITY)
 PKG_LIBS = @TCLTK_LIBS@ @LIBM@
 
 all: Makedeps
diff --git a/src/library/tcltk/src/Makefile.win b/src/library/tcltk/src/Makefile.win
index 66d2a5d..7003bb2 100644
--- a/src/library/tcltk/src/Makefile.win
+++ b/src/library/tcltk/src/Makefile.win
@@ -21,7 +21,7 @@ RESFLAGS = -I $(R_HOME)/include
 
 ## The TCL_* variables are set in etc/Makeconf.
 ## Because the 64-bit build is customized, no other Tcl/Tk build is suitable
-PKG_CPPFLAGS = -I "$(TCL_HOME)"/include -DWin32
+PKG_CPPFLAGS = -I "$(TCL_HOME)"/include -DWin32 -I$(R_HOME)/src/include -DHAVE_CONFIG_H
 ifeq "$(WIN)" "64"
 PKG_LIBS = -L"$(TCL_HOME)"/bin64 -ltcl$(TCL_VERSION) -ltk$(TCL_VERSION)
 else
diff --git a/src/library/tcltk/src/init.c b/src/library/tcltk/src/init.c
index 9b7c21f..610b56c 100644
--- a/src/library/tcltk/src/init.c
+++ b/src/library/tcltk/src/init.c
@@ -1,6 +1,6 @@
 /*
  *  R : A Computer Language for Statistical Data Analysis
- *  Copyright (C) 2003-12   The R Core Team.
+ *  Copyright (C) 2003-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
@@ -14,51 +14,55 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  */
 
 #include <R.h>
 #include <Rinternals.h>
 #include "tcltk.h"
 #include <R_ext/Rdynload.h>
+#include <R_ext/Visibility.h>
+
+#define C_DEF(name, n)  {#name, (DL_FUNC) &name, n}
 
 static const R_CMethodDef CEntries[] = {
 #ifdef Win32
-    {"tcltk_start", (DL_FUNC) &tcltk_start, 0},
-    {"tcltk_end", (DL_FUNC) &tcltk_end, 0},
+    C_DEF(tcltk_start, 0),
+    C_DEF(tcltk_end, 0),
 #else
-    {"tcltk_init", (DL_FUNC) &tcltk_init, 1},
-//    {"delTcl", (DL_FUNC) &delTcl, 0},
-    {"RTcl_ActivateConsole", (DL_FUNC) &RTcl_ActivateConsole, 0},
+    C_DEF(tcltk_init, 1),
+    C_DEF(RTcl_ActivateConsole, 0),
 #endif
     {NULL, NULL, 0}
 };
 
+#define EXTDEF(name, n)  {#name, (DL_FUNC) &name, n}
+
 static const R_ExternalMethodDef ExternEntries[] = {
-    {"dotTcl", (DL_FUNC) &dotTcl, -1},
-    {"dotTclObjv", (DL_FUNC) &dotTclObjv, 1},
-    {"dotTclcallback", (DL_FUNC) &dotTclcallback, -1},
-    {"RTcl_ObjFromVar", (DL_FUNC) &RTcl_ObjFromVar, 1},
-    {"RTcl_AssignObjToVar", (DL_FUNC) &RTcl_AssignObjToVar, 2},
-    {"RTcl_StringFromObj", (DL_FUNC) &RTcl_StringFromObj, 1},
-    {"RTcl_ObjAsCharVector", (DL_FUNC) &RTcl_ObjAsCharVector, 1},
-    {"RTcl_ObjAsDoubleVector", (DL_FUNC) &RTcl_ObjAsDoubleVector, 1},
-    {"RTcl_ObjAsIntVector", (DL_FUNC) &RTcl_ObjAsIntVector, 1},
-    {"RTcl_ObjAsRawVector", (DL_FUNC) &RTcl_ObjAsRawVector, 1},
-    {"RTcl_ObjFromCharVector", (DL_FUNC) &RTcl_ObjFromCharVector, 2},
-    {"RTcl_ObjFromDoubleVector", (DL_FUNC) &RTcl_ObjFromDoubleVector, 2},
-    {"RTcl_ObjFromIntVector", (DL_FUNC) &RTcl_ObjFromIntVector, 2},
-    {"RTcl_ObjFromRawVector", (DL_FUNC) &RTcl_ObjFromRawVector, 1},
+    EXTDEF(dotTcl, -1),
+    EXTDEF(dotTclObjv, 1),
+    EXTDEF(dotTclcallback, -1),
+    EXTDEF(RTcl_ObjFromVar, 1),
+    EXTDEF(RTcl_AssignObjToVar, 2),
+    EXTDEF(RTcl_StringFromObj, 1),
+    EXTDEF(RTcl_ObjAsCharVector, 1),
+    EXTDEF(RTcl_ObjAsDoubleVector, 1),
+    EXTDEF(RTcl_ObjAsIntVector, 1),
+    EXTDEF(RTcl_ObjAsRawVector, 1),
+    EXTDEF(RTcl_ObjFromCharVector, 2),
+    EXTDEF(RTcl_ObjFromDoubleVector, 2),
+    EXTDEF(RTcl_ObjFromIntVector, 2),
+    EXTDEF(RTcl_ObjFromRawVector, 1),
     /* (..FromRaw... has only 1 arg, no drop=) */
-    {"RTcl_ServiceMode", (DL_FUNC) &RTcl_ServiceMode, 1},
-    {"RTcl_GetArrayElem", (DL_FUNC) &RTcl_GetArrayElem, 2},
-    {"RTcl_RemoveArrayElem", (DL_FUNC) &RTcl_RemoveArrayElem, 2},
-    {"RTcl_SetArrayElem", (DL_FUNC) &RTcl_SetArrayElem, 3},
+    EXTDEF(RTcl_ServiceMode, 1),
+    EXTDEF(RTcl_GetArrayElem, 2),
+    EXTDEF(RTcl_RemoveArrayElem, 2),
+    EXTDEF(RTcl_SetArrayElem, 3),
     {NULL, NULL, 0}
 };
 
 
-void R_init_tcltk(DllInfo *dll)
+void attribute_visible R_init_tcltk(DllInfo *dll)
 {
     R_registerRoutines(dll, CEntries, NULL, NULL, ExternEntries);
     R_useDynamicSymbols(dll, FALSE);
diff --git a/src/library/tcltk/src/tcltk.c b/src/library/tcltk/src/tcltk.c
index 9d24ec3..3192b3e 100644
--- a/src/library/tcltk/src/tcltk.c
+++ b/src/library/tcltk/src/tcltk.c
@@ -14,12 +14,16 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  */
 
-#include "tcltk.h" /* declarations of our `public' interface */
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+#define NO_NLS
+#include <Defn.h>
 
-#include <R.h>
+#include "tcltk.h" /* declarations of our `public' interface */
 #include <stdlib.h>
 
 #ifdef ENABLE_NLS
@@ -29,9 +33,6 @@
 #define _(String) (String)
 #endif
 
-// From Defn.f
-extern void  R_Busy(int);
-
 static void RTcl_dec_refcount(SEXP R_tclobj)
 {
     Tcl_DecrRefCount((Tcl_Obj *) R_ExternalPtrAddr(R_tclobj));
@@ -74,6 +75,7 @@ static int R_eval(ClientData clientData,
 	int n = length(expr);
 	for(i = 0 ; i < n ; i++)
 	    ans = eval(VECTOR_ELT(expr, i), R_GlobalEnv);
+	PROTECT(ans);
 	R_Busy(0);
     }
 
@@ -81,7 +83,7 @@ static int R_eval(ClientData clientData,
     if (inherits(ans, "tclObj"))
 	    Tcl_SetObjResult(interp, (Tcl_Obj*) R_ExternalPtrAddr(ans));
 
-    UNPROTECT(2);
+    UNPROTECT(3);
     return TCL_OK;
 }
 
@@ -106,6 +108,8 @@ static int R_call(ClientData clientData,
     SEXP expr, alist, ans;
     void *fun;
 
+    SEXP s_try = install("try");
+
     alist = R_NilValue;
     for (i = argc - 1 ; i > 1 ; i--){
 	PROTECT(alist);
@@ -116,16 +120,17 @@ static int R_call(ClientData clientData,
     sscanf(argv[1], "%p", &fun);
 
     expr = LCONS( (SEXP)fun, alist);
-    expr = LCONS(install("try"), LCONS(expr, R_NilValue));
+    PROTECT(expr = LCONS(s_try, LCONS(expr, R_NilValue)));
 
     R_Busy(1);
-    ans = eval(expr, R_GlobalEnv);
+    PROTECT(ans = eval(expr, R_GlobalEnv));
     R_Busy(0);
 	
     /* If return value is of class tclObj, use as Tcl result */
     if (inherits(ans, "tclObj"))
 	Tcl_SetObjResult(interp, (Tcl_Obj*) R_ExternalPtrAddr(ans));
 
+    UNPROTECT(2);
     return TCL_OK;
 }
 
@@ -140,16 +145,19 @@ static int R_call_lang(ClientData clientData,
     sscanf(argv[1], "%p", &expr);
     sscanf(argv[2], "%p", &env);
 
-    expr = LCONS(install("try"), LCONS(expr, R_NilValue));
+    SEXP s_try = install("try");
+    expr = LCONS(s_try, LCONS(expr, R_NilValue));
+    PROTECT((SEXP)expr);
 
     R_Busy(1);
-    ans = eval((SEXP)expr, (SEXP)env);
+    PROTECT(ans = eval((SEXP)expr, (SEXP)env));
     R_Busy(0);
 
     /* If return value is of class tclObj, use as Tcl result */
     if (inherits(ans, "tclObj"))
 	Tcl_SetObjResult(interp, (Tcl_Obj*) R_ExternalPtrAddr(ans));
 
+    UNPROTECT(2);
     return TCL_OK;
 }
 
@@ -677,7 +685,7 @@ void tcltk_init(int *TkUp)
     if (code != TCL_OK) error(Tcl_GetStringResult(RTcl_interp));
 
 /* HAVE_AQUA is not really right here.
-   On Mac OS X we might be using Aqua Tcl/Tk or X11 Tcl/Tk, and that
+   On macOS we might be using Aqua Tcl/Tk or X11 Tcl/Tk, and that
    is in principle independent of whether we want quartz() built.
 */
 #if !defined(Win32) && !defined(HAVE_AQUA)
@@ -698,7 +706,7 @@ void tcltk_init(int *TkUp)
     }
 #if !defined(Win32) && !defined(HAVE_AQUA)
     else
-	warning(_("no DISPLAY variable so Tk is not available"));
+	warningcall(R_NilValue, _("no DISPLAY variable so Tk is not available"));
 #endif
 
     Tcl_CreateCommand(RTcl_interp,
diff --git a/src/library/tcltk/src/tcltk.h b/src/library/tcltk/src/tcltk.h
index d0dbcfe..5c3a24d 100644
--- a/src/library/tcltk/src/tcltk.h
+++ b/src/library/tcltk/src/tcltk.h
@@ -1,6 +1,6 @@
 /*
  *  R : A Computer Language for Statistical Data Analysis
- *  Copyright (C) 2000--2013  The R Core Team
+ *  Copyright (C) 2000--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
@@ -14,11 +14,13 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  */
 
 /* Ouch! - do we *really* need this? */
-#define _GNU_SOURCE
+#ifndef _GNU_SOURCE
+# define _GNU_SOURCE
+#endif
 
 #include <tcl.h>
 #include <stdio.h>
@@ -47,7 +49,9 @@ SEXP dotTclcallback(SEXP args);
 void tcltk_start(void);
 void tcltk_end(void);
 #else
+# ifdef UNUSED
 void delTcl(void);
+# endif
 void RTcl_ActivateConsole(void);
 #endif
 
diff --git a/src/library/tcltk/src/tcltk_unix.c b/src/library/tcltk/src/tcltk_unix.c
index ac7a410..d43d548 100644
--- a/src/library/tcltk/src/tcltk_unix.c
+++ b/src/library/tcltk/src/tcltk_unix.c
@@ -14,16 +14,20 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  */
 
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+#define NO_NLS
+#include <Defn.h>
 #include "tcltk.h" /* declarations of our `public' interface */
 
 #ifndef Win32
 #include <R_ext/eventloop.h>
 #endif
 
-#include <R.h>
 #include <stdlib.h>
 
 #ifdef ENABLE_NLS
@@ -33,10 +37,6 @@
 #define _(String) (String)
 #endif
 
-extern int (*R_timeout_handler)();
-extern long R_timeout_val;
-
-
 /* R event structure */
 typedef struct {
     Tcl_EventProc *proc;
@@ -60,7 +60,7 @@ static void TclSpinLoop(void *data)
     while (Tcl_DoOneEvent(TCL_DONT_WAIT)) ;
 }
 
-extern Rboolean R_isForkedChild;
+//extern Rboolean R_isForkedChild;
 static void TclHandler(void)
 {
     if (!R_isForkedChild && !Tcl_lock 
diff --git a/src/library/tcltk/src/tcltk_win.c b/src/library/tcltk/src/tcltk_win.c
index d7238cf..d47bab9 100644
--- a/src/library/tcltk/src/tcltk_win.c
+++ b/src/library/tcltk/src/tcltk_win.c
@@ -14,7 +14,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  */
 
 #include "tcltk.h"
diff --git a/src/library/tools/DESCRIPTION.in b/src/library/tools/DESCRIPTION.in
index 823d692..ea931c4 100644
--- a/src/library/tools/DESCRIPTION.in
+++ b/src/library/tools/DESCRIPTION.in
@@ -4,5 +4,7 @@ Priority: base
 Title: Tools for Package Development
 Author: R Core Team
 Maintainer: R Core Team <R-core at r-project.org>
-Description: Tools for package development, administration and documentation
+Description: Tools for package development, administration and documentation.
 License: Part of R @VERSION@
+Suggests: codetools, methods, xml2, curl
+NeedsCompilation: yes
diff --git a/src/library/tools/Makefile.in b/src/library/tools/Makefile.in
index fcbd3eb..2c0ed5f 100644
--- a/src/library/tools/Makefile.in
+++ b/src/library/tools/Makefile.in
@@ -17,7 +17,7 @@ pkg = tools
 
 RSRC = `LC_COLLATE=C ls $(srcdir)/R/*.R`
 
-R_EXE = $(top_builddir)/bin/R --vanilla --slave
+R_EXE = R_ENABLE_JIT=0 $(top_builddir)/bin/R --vanilla --slave
 
 ## For people who do make -C ../src/library/tools
 update:
@@ -37,6 +37,7 @@ all: Makefile DESCRIPTION
 	  $(INSTALL_DATA) all.R $(top_builddir)/library/$(pkg)/R/$(pkg); \
 	  fi \
 	fi
+	@$(MAKE) sysdata
 	@$(ECHO) "tools:::.install_package_description('.', '"$(top_builddir)/library/${pkg}"')" | \
 	  R_DEFAULT_PACKAGES=NULL $(R_EXE) > /dev/null
 
@@ -44,12 +45,13 @@ mkR: mkR1
 
 include $(top_srcdir)/share/make/basepkg.mk
 
+## Note that R_COMPILER_SUPPRESS_ALL is now on by default
 $(top_builddir)/library/$(pkg)/R/$(pkg).rdb: all.R $(top_srcdir)/share/licenses/license.db
 	@$(ECHO) "byte-compiling package '$(pkg)'"
 	@$(INSTALL_DATA) all.R $(top_builddir)/library/$(pkg)/R/$(pkg)
 	@(cat $(srcdir)/R/makeLazyLoad.R; \
 	  $(ECHO) "makeLazyLoading(\"$(pkg)\")") | \
-	  R_COMPILE_PKGS=1 R_COMPILER_SUPPRESS_ALL=1 \
+	  _R_COMPILE_PKGS_=1 R_COMPILER_SUPPRESS_ALL=1 \
 	  R_DEFAULT_PACKAGES=NULL LC_ALL=C $(R_EXE) > /dev/null
 
 Rsimple: mkR mkRsimple
diff --git a/src/library/tools/Makefile.win b/src/library/tools/Makefile.win
index 6e881f8..2984fa3 100644
--- a/src/library/tools/Makefile.win
+++ b/src/library/tools/Makefile.win
@@ -21,17 +21,19 @@ all:
 	@if ! test $(top_builddir)/library/$(pkg)/R/$(pkg) -nt all.R; then \
 	  $(INSTALL_DATA) all.R $(top_builddir)/library/$(pkg)/R/$(pkg); \
 	fi
+	@$(MAKE) -f Makefile.win sysdata
 	@$(ECHO) "tools:::.install_package_description('.', '"$(top_builddir)/library/${pkg}"')" | \
 	  R_DEFAULT_PACKAGES=NULL $(R_EXE) > /dev/null
 
 include $(top_srcdir)/share/make/basepkg.mk
 
+## Note that R_COMPILER_SUPPRESS_ALL is now on by default
 $(top_builddir)/library/$(pkg)/R/$(pkg).rdb: all.R $(top_srcdir)/share/licenses/license.db
 	@$(ECHO) "byte-compiling package '$(pkg)'"
 	@$(INSTALL_DATA) all.R $(top_builddir)/library/$(pkg)/R/$(pkg)
 	@(cat $(srcdir)/R/makeLazyLoad.R; \
 	  $(ECHO) "makeLazyLoading(\"$(pkg)\")") | \
-	  R_COMPILE_PKGS=1 R_COMPILER_SUPPRESS_ALL=1 \
+	  _R_COMPILE_PKGS_=1 R_COMPILER_SUPPRESS_ALL=1 \
 	  R_DEFAULT_PACKAGES=NULL LC_ALL=C $(R_EXE) > /dev/null
 
 Rsimple: mkR mkRsimple
diff --git a/src/library/tools/NAMESPACE b/src/library/tools/NAMESPACE
index e06728b..d44391d 100644
--- a/src/library/tools/NAMESPACE
+++ b/src/library/tools/NAMESPACE
@@ -1,8 +1,10 @@
-useDynLib(tools, .registration = TRUE)
+useDynLib(tools, .registration = TRUE, .fixes = "C_")
 
-export("Adobe_glyphs", "HTMLheader", "Rd2HTML", "Rd2ex", "Rd2latex",
-       "Rd2txt", "Rd2txt_options", "RdTextFilter", "Rd_db", "Rdiff",
-       "Rdindex", "SweaveTeXFilter", "add_datalist",
+## Bootstrapping R ==> do _not_ import, rather use  ' :: '
+
+export("Adobe_glyphs", "HTMLheader", "Rcmd", "Rd2HTML", "Rd2ex",
+       "Rd2latex", "Rd2txt", "Rd2txt_options", "RdTextFilter", "Rd_db",
+       "Rdiff", "Rdindex", "SweaveTeXFilter", "add_datalist",
        "assertCondition", "assertError", "assertWarning", "bibstyle",
        "buildVignette", "buildVignettes", "charset_to_Unicode",
        "checkDocFiles", "checkDocStyle", "checkFF", "checkMD5sums",
@@ -12,22 +14,38 @@ export("Adobe_glyphs", "HTMLheader", "Rd2HTML", "Rd2ex", "Rd2latex",
        "codocData", "compactPDF", "delimMatch", "deparseLatex",
        "dependsOnPkgs", "encoded_text_to_latex", "file_ext",
        "file_path_as_absolute", "file_path_sans_ext", "findHTMLlinks",
-       "find_gs_cmd", "getBibstyle", "getDepList", "getVignetteInfo",
-       "installFoundDepends", "latexToUtf8", "list_files_with_exts",
-       "list_files_with_type", "make_translations_pkg", "md5sum",
-       "package.dependencies", "package_dependencies", "parseLatex",
-       "parse_Rd", "pkgDepends", "pkgVignettes", "pskill", "psnice",
-       "read.00Index", "readNEWS", "resaveRdaFiles", "showNonASCII",
-       "showNonASCIIfile", "startDynamicHelp", "testInstalledBasic",
+       "find_gs_cmd", "getBibstyle", "getVignetteInfo",
+       langElts, "latexToUtf8", "list_files_with_exts",
+       "list_files_with_type", "loadRdMacros", "loadPkgRdMacros",
+       "makevars_site", "makevars_user",
+       nonS3methods,
+       "make_translations_pkg", "md5sum",
+       package.dependencies,# R/package.dependencies.R man/package.dependencies.Rd
+       getDepList, pkgDepends, installFoundDepends,# R/pkgDepends.R man/getDepList.Rd man/installFoundDepends.Rd
+       ## but vignetteDepends() calls  getDepList()
+       "package_dependencies",
+       "package_native_routine_registration_skeleton",
+       "parseLatex", "parse_Rd",
+       "pkgVignettes", "pskill", "psnice", "read.00Index", "readNEWS",
+       "resaveRdaFiles", "showNonASCII", "showNonASCIIfile",
+       "startDynamicHelp", "testInstalledBasic",
        "testInstalledPackage", "testInstalledPackages", "texi2dvi",
-       "texi2pdf", "toHTML", "toRd", "undoc", "update_pkg_po",
-       "vignetteDepends", "vignetteEngine", "write_PACKAGES",
-       "xgettext", "xgettext2pot", "xngettext")
+       "texi2pdf", "toHTML", "toRd", "toTitleCase", "undoc",
+       "update_pkg_po", "vignetteDepends", "vignetteEngine",
+       "write_PACKAGES", "xgettext", "xgettext2pot", "xngettext")
 
 export("check_packages_in_dir",
        "summarize_check_packages_in_dir_depends",
        "summarize_check_packages_in_dir_results",
-       "summarize_check_packages_in_dir_timings")
+       "summarize_check_packages_in_dir_timings",
+       "check_packages_in_dir_changes",
+       "check_packages_in_dir_details")
+
+export("CRAN_package_db",
+       "CRAN_check_results",
+       "CRAN_check_details",
+       "CRAN_memtest_notes",
+       "summarize_CRAN_check_status")
 
 export(".print.via.format")
 
@@ -46,6 +64,9 @@ S3method("format", "check_T_and_F")
 S3method("format", "check_code_usage_in_package")
 S3method("format", "check_compiled_code")
 S3method("format", "check_depdef")
+S3method("format", "check_details")
+S3method("format", "check_details_changes")
+S3method("format", "check_doi_db")
 S3method("format", "check_dotInternal")
 S3method("format", "check_make_vars")
 S3method("format", "check_package_CRAN_incoming")
@@ -60,6 +81,8 @@ S3method("format", "check_package_license")
 S3method("format", "check_packages_used")
 S3method("format", "check_so_symbols")
 S3method("format", "check_nonAPI_calls")
+S3method("format", "check_RegSym_calls")
+S3method("format", "check_url_db")
 S3method("format", "checkDocFiles")
 S3method("format", "checkDocStyle")
 S3method("format", "checkFF")
@@ -70,9 +93,11 @@ S3method("format", "codocClasses")
 S3method("format", "codocData")
 S3method("format", "compactPDF")
 S3method("format", "subdir_tests")
-S3method("format", "summarize_CRAN_check_status")
 S3method("format", "undoc")
 
+S3method("format", "CRAN_package_reverse_dependencies_and_views")
+S3method("format", "summarize_CRAN_check_status")
+
 S3method("format", "pdf_fonts")
 S3method("format", "pdf_info")
 S3method("format", "PDF_Array")
@@ -124,9 +149,12 @@ S3method("print", "check_code_usage_in_package", .print.via.format)
 S3method("print", "check_compiled_code", .print.via.format)
 S3method("print", "check_demo_index")
 S3method("print", "check_depdef", .print.via.format)
+S3method("print", "check_details")
+S3method("print", "check_details_changes")
+S3method("print", "check_doi_db")
 S3method("print", "check_dotInternal", .print.via.format)
 S3method("print", "check_make_vars", .print.via.format)
-S3method("print", "check_package_CRAN_incoming", .print.via.format)
+S3method("print", "check_package_CRAN_incoming")
 S3method("print", "check_package_code_assign_to_globalenv", .print.via.format)
 S3method("print", "check_package_code_attach", .print.via.format)
 S3method("print", "check_package_code_data_into_globalenv", .print.via.format)
@@ -139,15 +167,21 @@ S3method("print", "check_package_description_encoding", .print.via.format)
 S3method("print", "check_package_license", .print.via.format)
 S3method("print", "check_package_datasets", .print.via.format)
 S3method("print", "check_package_compact_datasets")
+S3method("print", "check_packages_in_dir")
 S3method("print", "check_packages_used", .print.via.format)
 S3method("print", "check_po_files")
 S3method("print", "check_so_symbols", .print.via.format)
 S3method("print", "check_nonAPI_calls", .print.via.format)
+S3method("print", "check_RegSym_calls", .print.via.format)
+S3method("print", "check_url_db")
 S3method("print", "check_vignette_index")
+
+S3method("print", "CRAN_package_reverse_dependencies_and_views")
 S3method("print", "summarize_CRAN_check_status")
 
 S3method("summary", "PDF_Dictionary")
 S3method("summary", "PDF_Stream")
+S3method("summary", "check_packages_in_dir")
 
 S3method("toHTML", "news_db")
 S3method("toHTML", "packageIQR")
diff --git a/src/library/tools/R/CRANtools.R b/src/library/tools/R/CRANtools.R
new file mode 100644
index 0000000..8564a3a
--- /dev/null
+++ b/src/library/tools/R/CRANtools.R
@@ -0,0 +1,720 @@
+#  File src/library/tools/R/CRANtools.R
+#  Part of the R package, https://www.R-project.org
+#
+#  Copyright (C) 2014-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
+#  the Free Software Foundation; either version 2 of the License, or
+#  (at your option) any later version.
+#
+#  This program is distributed in the hope that it will be useful,
+#  but WITHOUT ANY WARRANTY; without even the implied warranty of
+#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#  GNU General Public License for more details.
+#
+#  A copy of the GNU General Public License is available at
+#  https://www.R-project.org/Licenses/
+
+summarize_CRAN_check_status <-
+function(packages, results = NULL, details = NULL, mtnotes = NULL)
+{
+    if(is.null(results))
+        results <- CRAN_check_results()
+    results <-
+        results[!is.na(match(results$Package, packages)) & !is.na(results$Status), ]
+
+    if(!NROW(results)) {
+        s <- character(length(packages))
+        names(s) <- packages
+        return(s)
+    }
+
+    if(any(results$Status != "OK")) {
+        if(is.null(details))
+            details <- CRAN_check_details()
+        details <- details[!is.na(match(details$Package, packages)), ]
+        ## Remove all ok stubs.
+        details <- details[details$Check != "*", ]
+        ## Remove trailing white space from outputs ... remove eventually
+        ## when this is done on CRAN.
+        details$Output <- sub("[[:space:]]+$", "", details$Output)
+
+    } else {
+        ## Create empty details directly to avoid the cost of reading
+        ## and subscripting the actual details db.
+        details <- as.data.frame(matrix(character(), ncol = 7L),
+                                 stringsAsFactors = FALSE)
+        names(details) <-
+            c("Package", "Version", "Flavor", "Check", "Status", "Output",
+              "Flags")
+    }
+
+    if(is.null(mtnotes))
+        mtnotes <- CRAN_memtest_notes()
+
+
+    summarize_results <- function(p, r) {
+        if(!NROW(r)) return(character())
+        tab <- table(r$Status)[c("ERROR", "WARN", "NOTE", "OK")]
+        tab <- tab[!is.na(tab)]
+        paste(c(sprintf("Current CRAN status: %s",
+                        paste(sprintf("%s: %s", names(tab), tab),
+                              collapse = ", ")),
+                sprintf("See: <https://CRAN.R-project.org/web/checks/check_results_%s.html>",
+                        p)),
+              collapse = "\n")
+    }
+
+    summarize_details <- function(p, d) {
+        if(!NROW(d)) return(character())
+
+        pof <- which(names(d) == "Flavor")
+        poo <- which(names(d) == "Output")
+        ## Outputs from checking "whether package can be installed" will
+        ## have a machine-dependent final line
+        ##    See ....... for details.
+        ind <- d$Check == "whether package can be installed"
+        if(any(ind)) {
+            d[ind, poo] <-
+                sub("\nSee[^\n]*for details[.]$", "", d[ind, poo])
+        }
+        txt <- apply(d[-pof], 1L, paste, collapse = "\r")
+        ## Outputs from checking "installed package size" will vary
+        ## according to system.
+        ind <- d$Check == "installed package size"
+        if(any(ind)) {
+            txt[ind] <-
+                apply(d[ind, - c(pof, poo)],
+                      1L, paste, collapse = "\r")
+        }
+
+        ## Canonicalize fancy quotes.
+        ## Could also try using iconv(to = "ASCII//TRANSLIT"))
+        txt <- .canonicalize_quotes(txt)
+        out <-
+            lapply(split(seq_len(NROW(d)), match(txt, unique(txt))),
+                   function(e) {
+                       tmp <- d[e[1L], ]
+                       flags <- tmp$Flags
+                       flavors <- d$Flavor[e]
+                       c(sprintf("Version: %s", tmp$Version),
+                         if(nzchar(flags)) sprintf("Flags: %s", flags),
+                         sprintf("Check: %s, Result: %s", tmp$Check, tmp$Status),
+                         sprintf("  %s",
+                                 gsub("\n", "\n  ", tmp$Output,
+                                      perl = TRUE, useBytes = TRUE)),
+                         sprintf("See: %s",
+                                 paste(sprintf("<https://www.r-project.org/nosvn/R.check/%s/%s-00check.html>",
+                                               flavors,
+                                               p),
+                                       collapse = ",\n     ")))
+                   })
+        paste(unlist(lapply(out, paste, collapse = "\n")),
+              collapse = "\n\n")
+    }
+
+    summarize_mtnotes <- function(p, m) {
+        if(!length(m)) return(character())
+        tests <- m[, "Test"]
+        paths <- m[, "Path"]
+        isdir <- !grepl("-Ex.Rout$", paths)
+        if(any(isdir))
+            paths[isdir] <- sprintf("%s/", paths[isdir])
+        paste(c(paste("Memtest notes:",
+                      paste(unique(tests), collapse = " ")),
+                sprintf("See: %s",
+                        paste(sprintf("<https://www.stats.ox.ac.uk/pub/bdr/memtests/%s/%s>",
+                                      tests,
+                                      paths),
+                              collapse = ",\n     "))),
+              collapse = "\n")
+    }
+
+    summarize <- function(p, r, d, m) {
+        paste(c(summarize_results(p, r),
+                summarize_mtnotes(p, m),
+                summarize_details(p, d)),
+              collapse = "\n\n")
+    }
+
+    s <- if(length(packages) == 1L) {
+        summarize(packages, results, details, mtnotes[[packages]])
+    } else {
+        results <- split(results, factor(results$Package, packages))
+        details <- split(details, factor(details$Package, packages))
+        unlist(lapply(packages,
+                      function(p) {
+                          summarize(p,
+                                    results[[p]],
+                                    details[[p]],
+                                    mtnotes[[p]])
+                      }))
+    }
+
+    names(s) <- packages
+    class(s) <- "summarize_CRAN_check_status"
+    s
+}
+
+format.summarize_CRAN_check_status <-
+function(x, header = NA, ...)
+{
+    if(is.na(header)) header <- (length(x) > 1L)
+    if(header) {
+        s <- sprintf("Package: %s", names(x))
+        x <- sprintf("%s\n%s\n\n%s", s, gsub(".", "*", s), x)
+    }
+    x
+}
+
+print.summarize_CRAN_check_status <-
+function(x, ...)
+{
+    writeLines(paste(format(x, ...), collapse = "\n\n"))
+    invisible(x)
+}
+
+## Summarize complete CRAN check status according to maintainer.
+
+summarize_CRAN_check_status_according_to_maintainer <-
+function()
+{
+    pdb <- CRAN_package_db()
+    ind <- !duplicated(pdb[, "Package"])
+
+    maintainer <- pdb[, "Maintainer"]
+    maintainer <- tolower(sub(".*<(.*)>.*", "\\1", maintainer))
+
+    results <- CRAN_check_results()
+    details <- CRAN_check_details()
+    mtnotes <- CRAN_memtest_notes()
+
+    split(format(summarize_CRAN_check_status(pdb[ind, "Package"],
+                                             results,
+                                             details,
+                                             mtnotes),
+                 header = TRUE),
+          maintainer[ind])
+}
+
+CRAN_baseurl_for_src_area <-
+function()
+    .get_standard_repository_URLs()[1L]
+
+## This allows for partial local mirrors, or to look at a
+## more-freqently-updated mirror.
+CRAN_baseurl_for_web_area <-
+function()
+    Sys.getenv("R_CRAN_WEB", .get_standard_repository_URLs()[1L])
+
+read_CRAN_object <-
+function(cran, path)
+{
+    con <- gzcon(url(sprintf("%s/%s", cran, path),
+                     open = "rb"))
+    on.exit(close(con))
+    readRDS(con)
+}
+
+CRAN_check_results <-
+function(flavors = NULL)
+{
+    db <- read_CRAN_object(CRAN_baseurl_for_web_area(),
+                           "web/checks/check_results.rds")
+    if(!is.null(flavors))
+        db <- db[!is.na(match(db$Flavor, flavors)), ]
+    db
+}
+
+CRAN_check_details <-
+function(flavors = NULL)
+{
+    db <- read_CRAN_object(CRAN_baseurl_for_web_area(),
+                           "web/checks/check_details.rds")
+    if(!is.null(flavors))
+        db <- db[!is.na(match(db$Flavor, flavors)), ]
+    ## <FIXME>
+    ## Remove eventually ...
+    class(db) <- c("CRAN_check_details", "check_details", "data.frame")
+    ## </FIXME>
+    db
+}
+
+CRAN_memtest_notes <-
+function()
+    read_CRAN_object(CRAN_baseurl_for_web_area(),
+                     "web/checks/memtest_notes.rds")
+
+CRAN_package_db <-
+function()
+    as.data.frame(read_CRAN_object(CRAN_baseurl_for_web_area(),
+                                   "web/packages/packages.rds"),
+                  stringsAsFactors = FALSE)
+
+CRAN_aliases_db <-
+function()
+    read_CRAN_object(CRAN_baseurl_for_src_area(),
+                     "src/contrib/Meta/aliases.rds")
+
+CRAN_archive_db <-
+function()
+    read_CRAN_object(CRAN_baseurl_for_src_area(),
+                     "src/contrib/Meta/archive.rds")
+
+CRAN_current_db <-
+function()
+    read_CRAN_object(CRAN_baseurl_for_src_area(),
+                     "src/contrib/Meta/current.rds")
+
+CRAN_rdxrefs_db <-
+function()
+    read_CRAN_object(CRAN_baseurl_for_src_area(),
+                     "src/contrib/Meta/rdxrefs.rds")
+
+check_CRAN_mirrors <-
+function(mirrors = NULL, verbose = FALSE)
+{
+    retry_upon_error <- function(expr, n = 3L) {
+        i <- 1L
+        repeat {
+            y <- tryCatch(expr, error = identity)
+            if(!inherits(y, "error") || (i >= n))
+                break
+            i <- i + 1L
+        }
+        y
+    }
+
+    read_package_db <- function(baseurl) {
+        path <- sprintf("%ssrc/contrib/PACKAGES.gz", baseurl)
+        db <- retry_upon_error({
+            con <- gzcon(url(path, "rb"))
+            on.exit(close(con))
+            readLines(con)
+        })
+        if(inherits(db, "error")) {
+            msg <- sprintf("Reading %s failed with message: %s",
+                           path, conditionMessage(db))
+            return(simpleError(msg))
+        }
+        db
+    }
+
+    read_timestamp <- function(baseurl, path) {
+        path <- sprintf("%s%s", baseurl, path)
+        ts <- retry_upon_error(readLines(path))
+        if(inherits(ts, "error")) {
+            msg <- sprintf("Reading %s failed with message: %s",
+                           path, conditionMessage(ts))
+            return(simpleError(msg))
+        }
+        as.POSIXct(as.numeric(ts), origin = "1970-01-01")
+    }
+
+    if_ok <- function(u, v) if(inherits(u, "error")) u else v
+
+    check_mirror <- function(mirror) {
+        mirror_packages <- read_package_db(mirror)
+        mirror_ts1 <- read_timestamp(mirror, path_ts1)
+        mirror_ts2 <- read_timestamp(mirror, path_ts2)
+        mirror_ts3 <- read_timestamp(mirror, path_ts3)
+
+        list("PACKAGES" =
+             if_ok(mirror_packages,
+                   c("Delta_master_mirror" =
+                         sprintf("%d/%d",
+                                 length(setdiff(master_packages,
+                                                mirror_packages)),
+                                 length(master_packages)),
+                     "Delta_mirror_master" =
+                         sprintf("%d/%d",
+                                 length(setdiff(mirror_packages,
+                                                master_packages)),
+                                 length(mirror_packages)))),
+             "TIME" =
+             if_ok(mirror_ts1, difftime(master_ts1, mirror_ts1)),
+             "TIME_r-release" =
+             if_ok(mirror_ts2, difftime(master_ts2, mirror_ts2)),
+             "TIME_r-old-release" =
+             if_ok(mirror_ts3, difftime(master_ts3, mirror_ts3))
+             )
+    }
+
+    master <- "https://CRAN.R-project.org/"
+    path_ts1 <- "TIME"
+    path_ts2 <- "bin/windows/contrib/r-release/TIME_r-release"
+    path_ts3 <- "bin/windows/contrib/r-old-release/TIME_r-old-release"
+
+    master_packages <- read_package_db(master)
+    master_ts1 <- read_timestamp(master, path_ts1)
+    master_ts2 <- read_timestamp(master, path_ts2)
+    master_ts3 <- read_timestamp(master, path_ts3)
+
+    if(is.null(mirrors)) {
+        mirrors <- as.character(utils::getCRANmirrors(all = TRUE)$URL)
+    }
+
+    results <- lapply(mirrors,
+                      function(m) {
+                          if(verbose)
+                              message(sprintf("Checking %s", m))
+                          suppressWarnings(tryCatch(check_mirror(m),
+                                                    error = identity))
+                      })
+    names(results) <- mirrors
+
+    results
+}
+
+CRAN_mirror_maintainers_info <-
+function(mirrors, db = NULL, collapse = TRUE)
+{
+    if(is.null(db))
+        db <- utils::getCRANmirrors(all = TRUE)
+    mirrors <- sort(unique(mirrors))
+    ind <- match(mirrors, as.character(db$URL))
+    addresses <- db[ind, "Maintainer"]
+    addresses <- gsub("[[:space:]]*#[[:space:]]*", "@", addresses)
+    to <- unique(unlist(strsplit(addresses,
+                                 "[[:space:]]*,[[:space:]]*")))
+    head <- list("To" = to,
+                 "CC" = "CRAN at R-project.org",
+                 "Subject" = "CRAN mirrors maintained by you",
+                 "Reply-To" = "CRAN at R-project.org")
+    if(collapse) {
+        head$To <- paste(head$To, collapse = ",\n    ")
+        head <- sprintf("%s: %s", names(head), unlist(head))
+    }
+    len <- length(addresses)
+    body <- c(if(len > 1L) {
+                  "Dear maintainers,"
+              } else {
+                  "Dear maintainer,"
+              },
+              "",
+              strwrap(paste(if(length(mirrors) > 1L) {
+                                "This concerns the following CRAN mirrors"
+                            } else {
+                                "This concerns the following CRAN mirror"
+                            },
+                            "maintained by",
+                            if(len > 1L) "one of",
+                            "you:")),
+              "",
+              paste0("  ", formatDL(mirrors, addresses, style = "list"))
+              )
+    list(head = head, body = body)
+}
+
+CRAN_mirror_mirmon_status <-
+function()
+{
+    ## See
+    ## <http://www.projects.science.uu.nl/csg/mirmon/mirmon.html#state_file_format>.
+
+    fields <-
+        c("url",
+          "age",
+          "status_last_probe",
+          "time_last_successful_probe",
+          "probe_history",
+          "state_history",
+          "last_probe")
+    ts_to_POSIXct <- function(ts) {
+        suppressWarnings(as.POSIXct(as.numeric(as.character(ts)),
+                                    origin = "1970-01-01"))
+    }
+    read_mirmon_state_file <- function(con) {
+        db <- utils::read.table(con, header = FALSE, col.names = fields)
+        db$url <- as.character(db$url)
+        db$age <- ts_to_POSIXct(db$age)
+        db$time_last_successful_probe <-
+            ts_to_POSIXct(db$time_last_successful_probe)
+        db$last_probe <- ts_to_POSIXct(db$last_probe)
+        db$delta <- difftime(Sys.time(), db$age, units = "days")
+        db
+    }
+    state_files <-
+        c("TIME" = "mirror.state",
+          "TIME_r-release" = "mirror_release.state",
+          "TIME_r-old-release" = "mirror_old_release.state")
+
+    ## Need to always use master for now (the mirrors do not have the
+    ## state files).
+    do.call(rbind,
+            c(Map(function(u, v) {
+                      u <- paste0("https://cran.r-project.org/mirmon/state/", u)
+                      cbind(read_mirmon_state_file(u),
+                            timestamp = v,
+                            stringsAsFactors = FALSE)
+                  },
+                  state_files,
+                  names(state_files)),
+              list(make.row.names = FALSE)))
+}
+
+
+CRAN_Rd_xref_db_with_expansions <-
+function()
+{
+    db <- CRAN_rdxrefs_db()
+    ## Flatten:
+    db <- cbind(do.call(rbind, db),
+                rep.int(names(db), sapply(db, NROW)))
+    colnames(db) <- c(colnames(db)[1L : 2L], "S_File", "S_Package")
+    unique(cbind(db, .expand_anchored_Rd_xrefs(db)))
+}
+
+CRAN_Rd_xref_available_target_ids <-
+function()
+{
+    targets <- lapply(CRAN_aliases_db(), .Rd_available_xref_targets)
+    .Rd_object_id(rep.int(names(targets), lengths(targets)),
+                  unlist(targets, use.names = FALSE))
+}
+
+CRAN_Rd_xref_reverse_dependencies <-
+function(packages, db = NULL, details = FALSE)
+{
+    if(is.null(db))
+        db <- CRAN_Rd_xref_db_with_expansions()
+    y <- split.data.frame(db, db[, "T_Package"])[packages]
+    if(!details)
+        y <- lapply(y, function(e) unique(e[, "S_Package"]))
+    y
+}
+
+CRAN_Rd_xref_problems <-
+function()
+{
+    y <- list()
+
+    db <- CRAN_Rd_xref_db_with_expansions()
+    db <- db[nzchar(db[, "T_Package"]), , drop = FALSE]
+    ## Add ids:
+    db <- cbind(db,
+                T_ID = .Rd_object_id(db[, "T_Package"], db[, "T_File"]))
+
+    ## Do we have Rd xrefs to current CRAN packages which no longer work?
+    current <- rownames(CRAN_current_db())
+    db1 <- db[!is.na(match(db[, "T_Package"], current)), , drop = FALSE]
+    y$broken_xrefs_to_current_CRAN_packages <-
+        db1[is.na(match(db1[, "T_ID"],
+                        CRAN_Rd_xref_available_target_ids())), ,
+            drop = FALSE]
+
+    ## Do we have Rd xrefs "likely" to archived CRAN packages?
+    ## This is a bit tricky because packages could have been archived on
+    ## CRAN but still be available from somewhere else.  The code below
+    ## catches availability in standard repositories, but not in
+    ## additional repositories.
+    archived <- setdiff(names(CRAN_archive_db()),
+                        c(rownames(utils::available.packages(filters = list())),
+                          unlist(.get_standard_package_names(),
+                                 use.names = FALSE)))
+    y$xrefs_likely_to_archived_CRAN_packages <-
+        db[!is.na(match(db[, "T_Package"], archived)), , drop = FALSE]
+
+    y
+}
+
+.Rd_available_xref_targets <-
+function(aliases)
+{
+    ## Argument aliases as obtained from Rd_aliases(), or directly by
+    ## calling
+    ##   lapply(rddb, .Rd_get_metadata, "alias")
+    ## on an Rd db.
+    unique(c(unlist(aliases, use.names = FALSE),
+             sub("\\.[Rr]d", "", basename(names(aliases)))))
+}
+
+.Rd_object_id <-
+function(package, nora)
+{
+    ## Name OR Alias: nora.
+    sprintf("%s::%s", package, nora)
+}
+
+CRAN_package_maintainers_db <-
+function()
+{
+    db <- CRAN_package_db()
+    maintainer <- db[, "Maintainer"]
+    address <- tolower(sub(".*<(.*)>.*", "\\1", maintainer))
+    maintainer <- gsub("\n", " ", maintainer)
+    data.frame(Package = db[, "Package"],
+               Address = address,
+               Maintainer = maintainer,
+               stringsAsFactors = FALSE)
+}
+
+CRAN_package_maintainers_info <-
+function(packages, db = NULL, collapse = TRUE)
+{
+    if(is.null(db))
+        db <- CRAN_package_maintainers_db()
+    ind <- match(packages, db[, "Package"])
+    addresses <- db[ind, "Address"]
+    to <- sort(unique(addresses))
+    head <- list("To" = to,
+                 "CC" = "CRAN at R-project.org",
+                 "Subject" = "CRAN packages maintained by you",
+                 "Reply-To" = "CRAN at R-project.org")
+    if(collapse) {
+        head$To <- paste(head$To, collapse = ",\n    ")
+        head <- sprintf("%s: %s", names(head), unlist(head))
+    }
+    lst <- split(db[ind, "Package"], db[ind, "Maintainer"])
+    len <- length(addresses)
+    body <- c(if(len > 1L) {
+                  "Dear maintainers,"
+              } else {
+                  "Dear maintainer,"
+              },
+              "",
+              if(length(packages) > 1L) {
+                  "This concerns the CRAN packages"
+              } else {
+                  "This concerns the CRAN package"
+              },
+              "",
+              paste(strwrap(paste(sort(packages), collapse = " "),
+                            indent = 2L, exdent = 2L),
+                    collapse = "\n"),
+              "",
+              paste("maintained by",
+                    if(len > 1L) "one of",
+                    "you:"),
+              "",
+              paste0("  ",
+                     formatDL(vapply(lst, paste, "", collapse = " "),
+                              style = "list"))
+              )
+    list(head = head, body = body)
+}
+
+CRAN_package_reverse_dependencies_and_views <-
+function(packages)
+{
+    a <- utils::available.packages(filters = list())
+
+    v <- read_CRAN_object(CRAN_baseurl_for_src_area(),
+                          "src/contrib/Views.rds")
+    v <- do.call("rbind",
+                 mapply(cbind,
+                        Package =
+                        lapply(v, function(e) e$packagelist$name),
+                        View = sapply(v, "[[", "name")))
+    v <- split(v[, 2L], v[, 1L])
+
+    r <- package_dependencies(packages, a, reverse = TRUE)
+    rr <- package_dependencies(packages, a,
+                               reverse = TRUE, recursive = TRUE)
+    rrs <- package_dependencies(packages, a, "Suggests",
+                                reverse = TRUE, recursive = TRUE)
+
+    rxrefs <- CRAN_Rd_xref_reverse_dependencies(packages)
+
+    fmt <- function(x) {
+        if(length(x)) paste(sort(x), collapse = " ") else NA_character_
+    }
+
+    y <- lapply(packages,
+                function(p) {
+                    c(Package = p,
+                      "Reverse depends" = fmt(r[[p]]),
+                      "Additional recursive reverse depends" =
+                          fmt(setdiff(rr[[p]], r[[p]])),
+                      "Reverse recursive suggests" = fmt(rrs[[p]]),
+                      "Reverse Rd xref depends" = fmt(rxrefs[[p]]),
+                      "Views" = fmt(v[[p]]))
+                })
+    y <- as.data.frame(do.call(rbind, y), stringsAsFactors = FALSE)
+    class(y) <- c("CRAN_package_reverse_dependencies_and_views",
+                  class(y))
+    y
+}
+
+format.CRAN_package_reverse_dependencies_and_views <-
+function(x, ...)
+{
+    apply(x, 1L,
+          function(e) {
+              paste(formatDL(e[!is.na(e)],
+                             style = "list", indent = 2L),
+                    collapse = "\n")
+          })
+}
+
+print.CRAN_package_reverse_dependencies_and_views <-
+function(x, ...)
+{
+    writeLines(paste(format(x, ...), collapse = "\n\n"))
+    invisible(x)
+}
+
+CRAN_package_reverse_dependencies_with_maintainers <-
+function(packages, which = c("Depends", "Imports", "LinkingTo"),
+         recursive = FALSE)
+{
+    db <- CRAN_package_db()
+
+    rdepends <- package_dependencies(packages, db, which,
+                                     recursive = recursive,
+                                     reverse = TRUE)
+    rdepends <- sort(unique(unlist(rdepends)))
+    pos <- match(rdepends, db[, "Package"], nomatch = 0L)
+
+    db[pos, c("Package", "Version", "Maintainer")]
+}
+
+CRAN_package_dependencies_with_dates <-
+function(packages)
+{
+    a <- utils::available.packages(filters = list(),
+                                   repos = .get_standard_repository_URLs()["CRAN"])
+    p <- CRAN_package_db()
+    d <- package_dependencies(packages, a, which = "most")
+    ## Note that we currently keep the base packages dependencies, which
+    ## have no date.  We could (perhaps at least optionally) do
+    ##   base_packages <- .get_standard_package_names()["base"]
+    ## and then use
+    ##   e <- setdiff(as.character(e), base_packages)
+    ## in the code below.
+    lapply(d,
+           function(e) {
+               e <- as.character(e)
+               d <- as.Date(p[match(e, p[, "Package"]), "Published"])
+               o <- order(d, decreasing = TRUE)
+               data.frame(Package = e[o], Date = d[o],
+                          stringsAsFactors = FALSE)
+           })
+}
+
+CRAN_packages_with_maintainer_matching <-
+function(pattern, ...)
+{
+    pdb <- CRAN_package_db()
+    ind <- grep(pattern, pdb[, "Maintainer"], ...)
+    pdb[ind, "Package"]
+}
+
+write_texts_to_dir <-
+function(lst, dir, verbose = FALSE)
+{
+    dir.create(dir, showWarnings = FALSE, recursive = FALSE)
+
+    Map(function(m, s) {
+        if(verbose)
+            message(sprintf("Processing %s ...", m))
+        writeLines(paste(s, collapse = "\n\n"),
+                   file.path(dir, sprintf("%s.txt", m)))
+    },
+        names(lst),
+        lst)
+
+    invisible()
+}
+
diff --git a/src/library/tools/R/QC.R b/src/library/tools/R/QC.R
index c4f3930..27d34ab 100644
--- a/src/library/tools/R/QC.R
+++ b/src/library/tools/R/QC.R
@@ -1,7 +1,7 @@
 #  File src/library/tools/R/QC.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
-#  Copyright (C) 1995-2014 The R Core Team
+#  Copyright (C) 1995-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
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 ## R CMD check uses
 ## .find_charset
@@ -60,6 +60,17 @@
 
 ## NB: 'tools' cannot use NAMESPACE imports from utils, as it exists first
 
+## "The language elements" : all are .Primitive *and* print as .Primitive("...")
+langElts <- c("(", "{", ":", "~",
+	      "<-", "<<-", "=",
+	      "[", "[[", "[[<-", "[<-", "@", "@<-", "$", "$<-",
+	      "&&", "||",
+	      "break", "for", "function", "if", "next", "repeat", "return", "while")
+
+## Code "existing conceptually" in base,
+## typically function names of default methods for .Primitive s:
+conceptual_base_code <- c("c.default")
+
 ##' a "default" print method used "below" (in several *.R):
 .print.via.format <- function(x, ...) {
     writeLines(format(x, ...))
@@ -70,7 +81,7 @@
 .haveRds <- function(dir)
 {
     ## either source package or pre-2.10.0 installed package
-    if (file_test("-d", file.path(dir, "man"))) return(TRUE)
+    if (dir.exists(file.path(dir, "man"))) return(TRUE)
     file.exists((file.path(dir, "help", "paths.rds")))
 }
 
@@ -88,11 +99,11 @@ function(package, dir, lib.loc = NULL)
     if(!missing(package)) {
         if(length(package) != 1L)
             stop("argument 'package' must be of length 1")
-        dir <- find.package(package, lib.loc)
+        dirdir <- dirname(dir <- find.package(package, lib.loc))
         ## Using package installed in @code{dir} ...
         is_base <- package == "base"
 
-        all_doc_topics <- Rd_aliases(package, lib.loc = dirname(dir))
+        all_doc_topics <- Rd_aliases(package, lib.loc = dirdir)
 
         ## Load package into code_env.
         if(!is_base)
@@ -105,20 +116,21 @@ function(package, dir, lib.loc = NULL)
     else {
         if(missing(dir))
             stop("you must specify 'package' or 'dir'")
+        pkgname <- basename(dir)
+        dirdir  <- dirname(dir)
         ## Using sources from directory @code{dir} ...
-        if(!file_test("-d", dir))
+        if(!dir.exists(dir))
             stop(gettextf("directory '%s' does not exist", dir),
                  domain = NA)
         else
             dir <- file_path_as_absolute(dir)
-        pkgname <- basename(dir)
         is_base <- pkgname == "base"
 
         all_doc_topics <- Rd_aliases(dir = dir)
 
         code_env <- new.env(hash = TRUE)
         code_dir <- file.path(dir, "R")
-        if(file_test("-d", code_dir)) {
+        if(dir.exists(code_dir)) {
             dfile <- file.path(dir, "DESCRIPTION")
             meta <- if(file_test("-f", dfile))
                 .read_description(dfile)
@@ -136,7 +148,7 @@ function(package, dir, lib.loc = NULL)
         ## working on the sources we (currently?) cannot deal with the
         ## (experimental) alternative way of specifying the namespace.
         if(file.exists(file.path(dir, "NAMESPACE"))) {
-            nsInfo <- parseNamespaceFile(basename(dir), dirname(dir))
+            nsInfo <- parseNamespaceFile(pkgname, dirdir)
             ## Look only at exported objects (and not declared S3
             ## methods).
             OK <- intersect(code_objs, nsInfo$exports)
@@ -148,17 +160,15 @@ function(package, dir, lib.loc = NULL)
 
     ## Find the data sets to work on.
     data_dir <- file.path(dir, "data")
-    data_objs <- if(file_test("-d", data_dir))
-	unlist(.try_quietly(list_data_in_pkg(dataDir = data_dir)),
+    data_objs <- if(dir.exists(data_dir))
+	unlist(.try_quietly(list_data_in_pkg(pkgname, dataDir = data_dir)),
 	       use.names = FALSE)
     else
         character()
 
     ## There was a time when packages contained code or data (or both).
     ## But not anymore ...
-    if(!missing(package)
-       && (!length(code_objs))
-       && (!length(data_objs))
+    if(!missing(package) && !length(code_objs) && !length(data_objs)
        && getOption("verbose"))
         message("neither code nor data objects found")
 
@@ -176,16 +186,19 @@ function(package, dir, lib.loc = NULL)
         ## to the package in their package slot, so eliminate any
         ## foreign generic functions from code_objs
         if(.isMethodsDispatchOn()) {
+            is <- methods::is           # speed
             code_objs <-
                 Filter(function(f) {
-                    ## NB: this get() is expensive as it loads every object
-                    fdef <- get(f, envir = code_env)
-                    if(methods::is(fdef, "genericFunction"))
+                    fdef <- code_env[[f]] # faster than get()
+                    ## Running methods::is() on data sets can trigger
+                    ## loading additional packages for which startup
+                    ## messages et al need suppressing ...
+                    if(suppressMessages(is(fdef, "genericFunction")))
                         fdef at package == pkgname
                     else
                         TRUE
                 },
-                       code_objs)
+                code_objs)
         }
 
         ## Allow group generics to be undocumented other than in base.
@@ -213,8 +226,8 @@ function(package, dir, lib.loc = NULL)
         ## </NOTE>
         ## The bad ones:
         S4_classes <-
-            S4_classes[!sapply(S4_classes,
-                               function(u) utils:::topicName("class", u))
+            S4_classes[!vapply(S4_classes, utils:::topicName, " ",
+                               type = "class", USE.NAMES=FALSE)
                        %in% all_doc_topics]
         undoc_things <-
             c(undoc_things, list("S4 classes" = unique(S4_classes)))
@@ -242,9 +255,8 @@ function(package, dir, lib.loc = NULL)
 
         ## The bad ones:
         S4_methods <-
-            S4_methods[!sapply(S4_methods,
-                               function(u)
-                               utils:::topicName("method", u))
+	    S4_methods[!vapply(S4_methods, utils:::topicName, " ",
+			       type="method", USE.NAMES=FALSE)
                        %in% all_doc_topics]
         undoc_things <-
             c(undoc_things,
@@ -257,18 +269,12 @@ function(package, dir, lib.loc = NULL)
         ## We use .ArgsEnv and .GenericArgsEnv in checkS3methods() and
         ## codoc(), so we check here that the set of primitives has not
         ## been changed.
-        base_funs <- ls("package:base", all.names=TRUE)
-        prim <- sapply(base_funs,
-                       function(x) is.primitive(get(x, "package:base")))
-        prims <- base_funs[prim]
-        prototypes <- sort(c(ls(envir=.ArgsEnv, all.names=TRUE),
-                             ls(envir=.GenericArgsEnv, all.names=TRUE)))
+	ff <- as.list(baseenv(), all.names=TRUE)
+	prims <- names(ff)[vapply(ff, is.primitive, logical(1L))]
+        prototypes <- sort(c(names(.ArgsEnv), names(.GenericArgsEnv)))
         extras <- setdiff(prototypes, prims)
         if(length(extras))
             undoc_things <- c(undoc_things, list(prim_extra=extras))
-        langElts <- c("$","$<-","&&","(",":","@","@<-","[","[[",
-                      "[[<-","[<-","{","||","~","<-","<<-","=","break","for",
-                      "function","if","next","repeat","return", "while")
         miss <- setdiff(prims, c(langElts, prototypes))
         if(length(miss))
             undoc_things <- c(undoc_things, list(primitives=miss))
@@ -305,7 +311,7 @@ function(x, ...)
           })
     }
 
-    as.character(unlist(lapply(which(sapply(x, length) > 0L), .fmt)))
+    as.character(unlist(lapply(which(lengths(x) > 0L), .fmt)))
 }
 
 ### * codoc
@@ -323,9 +329,8 @@ function(package, dir, lib.loc = NULL,
         dir <- find.package(package, lib.loc)
         ## Using package installed in @code{dir} ...
         code_dir <- file.path(dir, "R")
-        if(!file_test("-d", code_dir))
-            stop(gettextf("directory '%s' does not contain R code",
-                          dir),
+        if(!dir.exists(code_dir))
+            stop(gettextf("directory '%s' does not contain R code", dir),
                  domain = NA)
         if(!.haveRds(dir))
             stop(gettextf("directory '%s' does not contain Rd objects", dir),
@@ -337,56 +342,63 @@ function(package, dir, lib.loc = NULL,
             .load_package_quietly(package, lib.loc)
         code_env <- .package_env(package)
 
-        objects_in_code <- objects(envir = code_env, all.names = TRUE)
+        objects_in_code <- sort(names(code_env))
 
+        dirdir <- dirname(dir)
         ## Does the package have a namespace?
-        if(packageHasNamespace(package, dirname(dir))) {
+        if(packageHasNamespace(package, dirdir)) {
             has_namespace <- TRUE
             ns_env <- asNamespace(package)
             S3Table <- get(".__S3MethodsTable__.", envir = ns_env)
             functions_in_S3Table <- ls(S3Table, all.names = TRUE)
             objects_in_ns <-
-                setdiff(objects(envir = ns_env, all.names = TRUE),
+                setdiff(sort(names(ns_env)),
                         c(".__NAMESPACE__.", ".__S3MethodsTable__."))
+            ns_S3_methods_db <- ns_env$".__NAMESPACE__."$S3methods
+            ## Alternatively, use
+            ##   ns_S3_methods_db <- getNamespaceInfo(package, "S3methods")
+            ns_S3_methods <- if(is.null(ns_S3_methods_db))
+                                 character()
+                             else
+                                 paste(ns_S3_methods_db[, 1L],
+                                       ns_S3_methods_db[, 2L],
+                                       sep = ".")
             objects_in_code_or_namespace <-
-                unique(c(objects_in_code, objects_in_ns))
+                unique(c(objects_in_code, objects_in_ns, ns_S3_methods))
             objects_in_ns <- setdiff(objects_in_ns, objects_in_code)
         }
-        else
-            objects_in_code_or_namespace <- objects_in_code
+	else { ## typically only 'base'
+	    objects_in_code_or_namespace <- objects_in_code
+	}
         package_name <- package
     }
     else {
         if(missing(dir))
             stop("you must specify 'package' or 'dir'")
         ## Using sources from directory @code{dir} ...
-        if(!file_test("-d", dir))
-            stop(gettextf("directory '%s' does not exist", dir),
-                 domain = NA)
-        else
-            dir <- file_path_as_absolute(dir)
+        if(!dir.exists(dir))
+            stop(gettextf("directory '%s' does not exist", dir), domain = NA)
+        ## else
+        package_name <- basename(dir) # early, before resolving sym.links etc in next line:
+        dirdir <- dirname(dir)        # early, ...
+        dir <- file_path_as_absolute(dir)
         code_dir <- file.path(dir, "R")
-        if(!file_test("-d", code_dir))
-            stop(gettextf("directory '%s' does not contain R code",
-                          dir),
+        if(!dir.exists(code_dir))
+            stop(gettextf("directory '%s' does not contain R code", dir),
                  domain = NA)
         if(!.haveRds(dir))
             stop(gettextf("directory '%s' does not contain Rd objects", dir),
                  domain = NA)
-        package_name <- basename(dir)
         is_base <- package_name == "base"
 
         code_env <- new.env(hash = TRUE)
         dfile <- file.path(dir, "DESCRIPTION")
-        meta <- if(file_test("-f", dfile))
-            .read_description(dfile)
-        else
-            character()
+        meta <- if(file_test("-f", dfile)) .read_description(dfile) else character()
         .source_assignments_in_code_dir(code_dir, code_env, meta)
         sys_data_file <- file.path(code_dir, "sysdata.rda")
         if(file_test("-f", sys_data_file)) load(sys_data_file, code_env)
 
-        objects_in_code <- objects(envir = code_env, all.names = TRUE)
+        objects_in_code <- sort(names(code_env))
         objects_in_code_or_namespace <- objects_in_code
 
         ## Does the package have a NAMESPACE file?  Note that when
@@ -398,7 +410,7 @@ function(package, dir, lib.loc = NULL,
             objects_in_ns <- objects_in_code
             functions_in_S3Table <- character()
             ns_env <- code_env
-            nsInfo <- parseNamespaceFile(basename(dir), dirname(dir))
+            nsInfo <- parseNamespaceFile(package_name, dirdir)
             ## Look only at exported objects.
             OK <- intersect(objects_in_code, nsInfo$exports)
             for(p in nsInfo$exportPatterns)
@@ -409,8 +421,8 @@ function(package, dir, lib.loc = NULL,
 
     ## Find the data sets to work on.
     data_dir <- file.path(dir, "data")
-    data_sets_in_code <- if(file_test("-d", data_dir))
-        names(.try_quietly(list_data_in_pkg(dataDir = data_dir)))
+    data_sets_in_code <- if(dir.exists(data_dir))
+        names(.try_quietly(list_data_in_pkg(package_name, dataDir = data_dir)))
     else
         character()
 
@@ -430,9 +442,10 @@ function(package, dir, lib.loc = NULL,
     ## As from R 2.5.0 we do for most generics.
     if(is_base) {
         objects_in_base <-
-            objects(envir = baseenv(), all.names = TRUE)
+            sort(names(baseenv()))
         objects_in_code <-
             c(objects_in_code,
+	      conceptual_base_code,
               Filter(.is_primitive_in_base, objects_in_base),
               c(".First.lib", ".Last.lib", ".Random.seed",
                 ".onLoad", ".onAttach", ".onDetach", ".onUnload"))
@@ -502,8 +515,9 @@ function(package, dir, lib.loc = NULL,
             !identical(as.logical(Sys.getenv("_R_CHECK_CODOC_S4_METHODS_")),
                        FALSE)
         if(check_S4_methods) {
+            unRematchDef <- methods::unRematchDefinition
             get_formals_from_method_definition <- function(m)
-                formals(methods::unRematchDefinition(m))
+		formals(unRematchDef(m))
             lapply(.get_S4_generics(code_env),
                    function(f) {
                        mlist <- .get_S4_methods_list(f, code_env)
@@ -550,21 +564,21 @@ function(package, dir, lib.loc = NULL,
     }
 
     db <- if(!missing(package))
-        Rd_db(package, lib.loc = dirname(dir))
+        Rd_db(package, lib.loc = dirdir)
     else
         Rd_db(dir = dir)
 
     names(db) <- db_names <- .Rd_get_names_from_Rd_db(db)
 
     ## pkg-defunct.Rd is not expected to list arguments
-    ind <- db_names %in% paste(package_name, "defunct", sep = "-")
+    ind <- db_names %in% paste0(package_name, "-defunct")
     db <- db[!ind]
     db_names <- db_names[!ind]
 
     db_usages <- lapply(db, .Rd_get_section, "usage")
     db_usages <- lapply(db_usages, .parse_usage_as_much_as_possible)
-    ind <- as.logical(sapply(db_usages,
-                             function(x) !is.null(attr(x, "bad_lines"))))
+    ind <- vapply(db_usages,
+                  function(x) !is.null(attr(x, "bad_lines")), NA, USE.NAMES=FALSE)
     bad_lines <- lapply(db_usages[ind], attr, "bad_lines")
 
     bad_doc_objects <- list()
@@ -581,17 +595,16 @@ function(package, dir, lib.loc = NULL,
 
         ## Get variable names and data set usages first, mostly for
         ## curiosity.
-        ind <- ! sapply(exprs, is.call)
+        ind <- ! vapply(exprs, is.call, NA)
         if(any(ind)) {
             variables_in_usages <-
                 c(variables_in_usages,
                   sapply(exprs[ind], deparse))
             exprs <- exprs[!ind]
         }
-        ind <- as.logical(sapply(exprs,
-                                 function(e)
-                                 (length(e) == 2L)
-                                 && e[[1L]] == as.symbol("data")))
+        ind <- vapply(exprs, function(e) (length(e) == 2L) &&
+                                         e[[1L]] == as.symbol("data"),
+                      NA, USE.NAMES=FALSE)
         if(any(ind)) {
             data_sets <- sapply(exprs[ind],
                                 function(e) as.character(e[[2L]]))
@@ -602,8 +615,7 @@ function(package, dir, lib.loc = NULL,
             exprs <- exprs[!ind]
         }
         ## Split out replacement function usages.
-        ind <- as.logical(sapply(exprs,
-                                 .is_call_from_replacement_function_usage))
+        ind <- vapply(exprs, .is_call_from_replacement_function_usage, NA, USE.NAMES=FALSE)
         replace_exprs <- exprs[ind]
         exprs <- exprs[!ind]
         ## Ordinary functions.
@@ -714,7 +726,7 @@ function(package, dir, lib.loc = NULL,
                 (is.call(b <- body(f))
                  && identical(as.character(b[[1L]]), ".Defunct"))
             }
-            functions[!sapply(functions, is_defunct)]
+            functions[!vapply(functions, is_defunct, NA, USE.NAMES=FALSE)]
         }
     objects_missing_from_usages <-
         if(!has_namespace) character() else {
@@ -800,7 +812,7 @@ function(x, ...)
             s <- paste(deparse(s), collapse = "")
             s <- gsub(" = ([,\\)])", "\\1", s)
             s <- gsub("<unescaped bksl>", "\\", s, fixed = TRUE)
-            gsub("^list", "function", s)
+            gsub("^pairlist", "function", s)
         }
     }
 
@@ -915,13 +927,13 @@ function(package, lib.loc = NULL)
     ## Currently, we only return the names of all classes checked.
     ## </NOTE>
 
-    bad_Rd_objects <- structure(NULL, class = "codocClasses")
+    bad_Rd_objects <- structure(list(), class = "codocClasses")
 
     ## Argument handling.
     if(length(package) != 1L)
         stop("argument 'package' must be of length 1")
     dir <- find.package(package, lib.loc)
-    if(!file_test("-d", file.path(dir, "R")))
+    if(!dir.exists(file.path(dir, "R")))
         stop(gettextf("directory '%s' does not contain R code", dir),
              domain = NA)
     if(!.haveRds(dir))
@@ -956,15 +968,16 @@ function(package, lib.loc = NULL)
     ## we do the vectorized metadata computations first, and try to
     ## subscript whenever possible.
 
-    idx <- sApply(lapply(db, .Rd_get_doc_type), identical, "class")
+    idx <- vapply(lapply(db, .Rd_get_doc_type), identical, NA, "class",
+		  USE.NAMES=FALSE)
     if(!any(idx)) return(bad_Rd_objects)
     db <- db[idx]
     stats <- c(n.S4classes = length(S4_classes), n.db = length(db))
 
     aliases <- lapply(db, .Rd_get_metadata, "alias")
-    named_class <- lapply(aliases, grepl, pattern="-class$")
+    named_class <- lapply(aliases, endsWith, suffix="-class")
     nClass <- sApply(named_class, sum)
-    oneAlias <- sApply(aliases, length) == 1L
+    oneAlias <- lengths(aliases, use.names=FALSE) == 1L
     idx <- oneAlias | nClass == 1L
     if(!any(idx)) return(bad_Rd_objects)
     db <- db[idx]
@@ -978,7 +991,7 @@ function(package, lib.loc = NULL)
     aliases <- unlist(aliases[idx], use.names = FALSE)
 
     Rd_slots <- lapply(db, .Rd_get_section, "Slots", FALSE)
-    idx <- sapply(Rd_slots, length) > 0L
+    idx <- lengths(Rd_slots) > 0L
     if(!any(idx)) return(bad_Rd_objects)
     db <- db[idx]; aliases <- aliases[idx]; Rd_slots <- Rd_slots[idx]
     stats["n.final"] <- length(db)
@@ -996,7 +1009,7 @@ function(package, lib.loc = NULL)
         ## And now strip enclosing '\code{...}:'
         txt <- gsub("\\\\code\\{([^}]*)\\}:?", "\\1", as.character(txt))
         txt <- unlist(strsplit(txt, ", *"))
-        .strip_whitespace(txt)
+        trimws(txt)
     }
 
     .inheritedSlotNames <- function(ext) {
@@ -1006,7 +1019,8 @@ function(package, lib.loc = NULL)
 		      use.names=FALSE))
     }
 
-    S4topics <- sApply(S4_classes, utils:::topicName, type="class")
+    S4topics <- vapply(S4_classes, utils:::topicName, " ",
+                       type="class", USE.NAMES=FALSE)
     S4_checked <- S4_classes[has.a <- S4topics %in% aliases]
     idx <- match(S4topics[has.a], aliases)
     for(icl in seq_along(S4_checked)) {
@@ -1022,8 +1036,8 @@ function(package, lib.loc = NULL)
             docSlots <-
                 docSlots[is.na(match(docSlots, c("...", "\\dots")))]
         ## was if(!identical(slots_in_code, slots_in_docs)) {
-        if(!all(d.in.c <- docSlots %in% codeSlots) ||
-           !all(c.in.d <- (setdiff(codeSlots, superSlots)) %in% docSlots) ) {
+        if(!all(docSlots %in% codeSlots) ||
+           !all(setdiff(codeSlots, superSlots) %in% docSlots) ) {
             bad_Rd_objects[[db_names[ii]]] <-
                 list(name = cl,
                      code = codeSlots,
@@ -1080,7 +1094,7 @@ function(package, lib.loc = NULL)
     ## Currently, we only return the names of all data frames checked.
     ## </NOTE>
 
-    bad_Rd_objects <- structure(NULL, class = "codocData")
+    bad_Rd_objects <- structure(list(), class = "codocData")
 
     ## Argument handling.
     if(length(package) != 1L)
@@ -1118,7 +1132,7 @@ function(package, lib.loc = NULL)
     ## we do the vectorized metadata computations first, and try to
     ## subscript whenever possible.
     aliases <- lapply(db, .Rd_get_metadata, "alias")
-    idx <- sapply(aliases, length) == 1L
+    idx <- lengths(aliases) == 1L
     if(!any(idx)) return(bad_Rd_objects)
     db <- db[idx]
     aliases <- aliases[idx]
@@ -1146,7 +1160,7 @@ function(package, lib.loc = NULL)
         re <- "\\\\code\\{([^}]*)\\}( *, *)?"
         m <- gregexpr(re, s)
         add <- regmatches(s, m)
-        lens <- sapply(add, length)
+        lens <- lengths(add)
         add <- sub(re, "\\1", unlist(add))
         ## The old code base simply dropped the \code markup via
         ##   gsub("\\\\code\\{(.*)\\}:?", "\\1", s)
@@ -1161,7 +1175,7 @@ function(package, lib.loc = NULL)
         ## as these will not render correctly.
         if(nice) {
             ind <- rep.int(lens == 1L, lens)
-            add[ind] <- tools:::.strip_whitespace(add[ind])
+            add[ind] <- trimws(add[ind])
         }
         nms <- c(nms, add)
         regmatches(s, m) <- ""
@@ -1195,7 +1209,7 @@ function(package, lib.loc = NULL)
 
     Rd_var_names <- lapply(db, .get_data_frame_var_names)
 
-    idx <- (sapply(Rd_var_names, length) > 0L)
+    idx <- (lengths(Rd_var_names) > 0L)
     if(!length(idx)) return(bad_Rd_objects)
     aliases <- unlist(aliases[idx])
     Rd_var_names <- Rd_var_names[idx]
@@ -1205,7 +1219,7 @@ function(package, lib.loc = NULL)
     data_env <- new.env(hash = TRUE)
     data_dir <- file.path(dir, "data")
     ## with lazy data we have data() but don't need to use it.
-    has_data <- file_test("-d", data_dir) &&
+    has_data <- dir.exists(data_dir) &&
         !file_test("-f", file.path(data_dir, "Rdata.rdb"))
     data_exts <- .make_file_exts("data")
 
@@ -1216,13 +1230,12 @@ function(package, lib.loc = NULL)
         var_names_in_docs <- sort(Rd_var_names[[i]])
         ## Try finding the variable or data set given by the alias.
         al <- aliases[i]
-        if(exists(al, envir = code_env, mode = "list",
-                  inherits = FALSE)) {
-            al <- get(al, envir = code_env, mode = "list")
-        } else if(has_namespace && exists(al, envir = ns_env, mode = "list",
-                  inherits = FALSE)) {
-            al <- get(al, envir = ns_env, mode = "list")
-        } else if(has_data) {
+	if(!is.null(A <- get0(al, envir = code_env, mode = "list", inherits = FALSE)))
+	    al <- A
+	else if(has_namespace &&
+		!is.null(A <- get0(al, envir = ns_env, mode = "list", inherits = FALSE)))
+	    al <- A
+	else if(has_data) {
             ## Should be a data set.
             if(!length(dir(data_dir)
                        %in% paste(al, data_exts, sep = "."))) {
@@ -1230,10 +1243,9 @@ function(package, lib.loc = NULL)
             }
             ## Try loading the data set into data_env.
             utils::data(list = al, envir = data_env)
-            if(exists(al, envir = data_env, mode = "list",
-                      inherits = FALSE)) {
-                al <- get(al, envir = data_env, mode = "list")
-            }
+            if(!is.null(A <- get0(al, envir = data_env, mode = "list", inherits = FALSE)))
+		al <- A
+
             ## And clean up data_env.
             rm(list = ls(envir = data_env, all.names = TRUE),
                envir = data_env)
@@ -1290,7 +1302,7 @@ function(package, dir, lib.loc = NULL)
         if(missing(dir))
             stop("you must specify 'package' or 'dir'")
         ## Using sources from directory @code{dir} ...
-        if(!file_test("-d", dir))
+        if(!dir.exists(dir))
             stop(gettextf("directory '%s' does not exist", dir),
                  domain = NA)
         else
@@ -1302,7 +1314,7 @@ function(package, dir, lib.loc = NULL)
     else
         Rd_db(dir = dir)
 
-    db_aliases <- lapply(db, .Rd_get_metadata, "alias")
+    db_aliases  <- lapply(db, .Rd_get_metadata, "alias")
     db_keywords <- lapply(db, .Rd_get_metadata, "keyword")
 
     db_names <- .Rd_get_names_from_Rd_db(db)
@@ -1376,9 +1388,9 @@ function(package, dir, lib.loc = NULL)
         ## Replacement functions.
         if(length(replace_exprs)) {
             replace_funs <-
-                paste0(sapply(replace_exprs,
-                             function(e) as.character(e[[2L]][[1L]])),
-                      "<-")
+                paste0(vapply(replace_exprs,
+			      function(e) as.character(e[[2L]][[1L]]), ""),
+		       "<-")
             functions <- c(functions, replace_funs)
             arg_names_in_usage <-
                 c(arg_names_in_usage,
@@ -1464,9 +1476,8 @@ function(package, dir, lib.loc = NULL)
 
     }
 
-    class(bad_doc_objects) <- "checkDocFiles"
-    attr(bad_doc_objects, "bad_lines") <- bad_lines
-    bad_doc_objects
+    structure(bad_doc_objects, class = "checkDocFiles",
+	      "bad_lines" = bad_lines)
 }
 
 format.checkDocFiles <-
@@ -1509,18 +1520,15 @@ function(x, ...)
 
     y <- as.character(unlist(lapply(names(x), .fmt)))
 
-    if(!identical(as.logical(Sys.getenv("_R_CHECK_WARN_BAD_USAGE_LINES_")),
-                  FALSE)
-       && length(bad_lines <- attr(x, "bad_lines"))) {
+    if(length(bad_lines <- attr(x, "bad_lines")))
         y <- c(y,
                unlist(lapply(names(bad_lines),
                              function(nm) {
                                  c(gettextf("Bad \\usage lines found in documentation object '%s':",
                                             nm),
-                                   paste(" ", bad_lines[[nm]]))
+                                   paste0("  ", bad_lines[[nm]]))
                              })),
                "")
-    }
 
     y
 }
@@ -1530,7 +1538,7 @@ function(x, ...)
 checkDocStyle <-
 function(package, dir, lib.loc = NULL)
 {
-    has_namespace <- auto_namespace <- FALSE
+    has_namespace <- FALSE
 
     ## Argument handling.
     if(!missing(package)) {
@@ -1544,7 +1552,7 @@ function(package, dir, lib.loc = NULL)
         else
             character()
         code_dir <- file.path(dir, "R")
-        if(!file_test("-d", code_dir))
+        if(!dir.exists(code_dir))
             stop(gettextf("directory '%s' does not contain R code",
                           dir),
                  domain = NA)
@@ -1559,17 +1567,13 @@ function(package, dir, lib.loc = NULL)
             .load_package_quietly(package, lib.loc)
         code_env <- .package_env(package)
 
-        objects_in_code <- objects(envir = code_env, all.names = TRUE)
+        objects_in_code <- sort(names(code_env))
 
         ## Does the package have a namespace?
         ## These days all packages have namespaces, but some are
         ## auto-generated.
         if(packageHasNamespace(package, dirname(dir))) {
             has_namespace <- TRUE
-            ns <- readLines(file.path(dir, "NAMESPACE"), warn = FALSE)
-            auto_namespace <-
-                grepl("# Default NAMESPACE created by R", ns[1L],
-                      useBytes = TRUE)
             ## Determine names of declared S3 methods and associated S3
             ## generics.
             ns_S3_methods_db <- getNamespaceInfo(package, "S3methods")
@@ -1580,21 +1584,21 @@ function(package, dir, lib.loc = NULL)
     else {
         if(missing(dir))
             stop("you must specify 'package' or 'dir'")
+        package_name <- basename(dir) # early, before resolving sym.links
         ## Using sources from directory @code{dir} ...
-        if(!file_test("-d", dir))
+        if(!dir.exists(dir))
             stop(gettextf("directory '%s' does not exist", dir),
                  domain = NA)
         else
             dir <- file_path_as_absolute(dir)
         code_dir <- file.path(dir, "R")
-        if(!file_test("-d", code_dir))
+        if(!dir.exists(code_dir))
             stop(gettextf("directory '%s' does not contain R code",
                           dir),
                  domain = NA)
         if(!.haveRds(dir))
             stop(gettextf("directory '%s' does not contain Rd objects", dir),
                  domain = NA)
-        package_name <- basename(dir)
         is_base <- package_name == "base"
 
         code_env <- new.env(hash = TRUE)
@@ -1607,12 +1611,12 @@ function(package, dir, lib.loc = NULL)
         sys_data_file <- file.path(code_dir, "sysdata.rda")
         if(file_test("-f", sys_data_file)) load(sys_data_file, code_env)
 
-        objects_in_code <- objects(envir = code_env, all.names = TRUE)
+        objects_in_code <- sort(names(code_env))
 
         ## Do the package sources have a NAMESPACE file?
         if(file.exists(file.path(dir, "NAMESPACE"))) {
             has_namespace <- TRUE
-            nsInfo <- parseNamespaceFile(basename(dir), dirname(dir))
+            nsInfo <- parseNamespaceFile(package_name, dirname(dir))
             ## Determine exported objects.
             OK <- intersect(objects_in_code, nsInfo$exports)
             for(p in nsInfo$exportPatterns)
@@ -1650,7 +1654,7 @@ function(package, dir, lib.loc = NULL)
     ## generic functions.
     ## Change in 3.0.0: we only look for methods named generic.class,
     ## not those registered by a 3-arg S3method().
-    methods_stop_list <- .make_S3_methods_stop_list(basename(dir))
+    methods_stop_list <- nonS3methods(package_name)
     methods_in_package <- sapply(all_S3_generics, function(g) {
         ## This isn't really right: it assumes the generics are visible.
         if(!exists(g, envir = code_env)) return(character())
@@ -1721,7 +1725,7 @@ function(package, dir, lib.loc = NULL)
 
         ## Determine function names in the \usage.
         exprs <- db_usages[[docObj]]
-        exprs <- exprs[sapply(exprs, length) > 1L]
+        exprs <- exprs[lengths(exprs) > 1L]
         ## Ordinary functions.
         functions <-
             as.character(sapply(exprs,
@@ -1818,7 +1822,7 @@ function(package, dir, file, lib.loc = NULL,
         pkg <- pkgDLL <- basename(dir)
         ## Using package installed in @code{dir} ...
         code_dir <- file.path(dir, "R")
-        if(!file_test("-d", code_dir))
+        if(!dir.exists(code_dir))
             stop(gettextf("directory '%s' does not contain R code",
                           dir),
                  domain = NA)
@@ -1826,15 +1830,14 @@ function(package, dir, file, lib.loc = NULL,
         if(basename(dir) != "base") {
             .load_package_quietly(package, lib.loc)
             code_env <- asNamespace(package)
-            if(exists("DLLs", envir = code_env$.__NAMESPACE__.)) {
-                DLLs <- get("DLLs", envir = code_env$.__NAMESPACE__.)
+            if(!is.null(DLLs <- get0("DLLs", envir = code_env$.__NAMESPACE__.))) {
                 ## fake installs have this, of class DLLInfoList
                 if(length(DLLs)) has_namespace <- TRUE
                 if(length(DLLs) && inherits(DLLs[[1L]], "DLLInfo")) {
                     pkgDLL <- unclass(DLLs[[1L]])$name # different for data.table
                     if(registration) {
                         reg <- getDLLRegisteredRoutines(DLLs[[1L]])
-                        have_registration <- sum(sapply(reg, length)) > 0L
+                        have_registration <- sum(lengths(reg)) > 0L
                     }
                 }
             }
@@ -1847,7 +1850,7 @@ function(package, dir, file, lib.loc = NULL,
     else if(!missing(dir)) {
         have_registration <- FALSE
         ## Using sources from directory @code{dir} ...
-        if(!file_test("-d", dir))
+        if(!dir.exists(dir))
             stop(gettextf("directory '%s' does not exist", dir),
                  domain = NA)
         else
@@ -1865,7 +1868,7 @@ function(package, dir, file, lib.loc = NULL,
             has_namespace <- length(nm$dynlibs) > 0L
         }
         code_dir <- file.path(dir, "R")
-        if(!file_test("-d", code_dir))
+        if(!dir.exists(code_dir))
             stop(gettextf("directory '%s' does not contain R code",
                           dir),
                  domain = NA)
@@ -1917,8 +1920,6 @@ function(package, dir, file, lib.loc = NULL,
     ## Also, need to handle base::.Call() etc ...
     FF_funs <- c(FF_funs, sprintf("base::%s", FF_fun_names))
 
-    allowed <- character()
-
     check_registration <- function(e, fr) {
     	sym <- e[[2L]]
     	name <- deparse(sym, nlines = 1L)
@@ -1943,7 +1944,7 @@ function(package, dir, file, lib.loc = NULL,
     	if (is.symbol(sym)) { # it might be something like pkg::sym (that's a call)
 	    if (!exists(name, code_env, inherits = FALSE)) {
 		if (allow_suppress &&
-                    name %in% suppressForeignCheck(, package))
+                    name %in% utils::suppressForeignCheck(, package))
 		    return ("SYMBOL OK") # skip false positives
                 if (have_registration) {
                     if (name %in% fr) {
@@ -2065,7 +2066,7 @@ function(package, dir, file, lib.loc = NULL,
                     wrong_pkg <<- c(wrong_pkg, e)
                     bad_pkg <<- c(bad_pkg, this)
                 }
-                parg <- if(!is.null(parg) && (parg != "")) "OK"
+                parg <- if(!is.null(parg) && (nzchar(parg))) "OK"
                 else if(identical(parg, "")) {
                     empty_exprs <<- c(empty_exprs, e)
                     "EMPTY"
@@ -2158,13 +2159,13 @@ function(package, dir, file, lib.loc = NULL,
     if(check_DUP) attr(bad_exprs, "dup_false") <- dup_false
     if (length(bad_pkg)) {              # check against dependencies.
         bases <- .get_standard_package_names()$base
-        bad <- bad_pkg[!bad_pkg %in% bases]
+        bad <- bad_pkg %w/o% bases
         if (length(bad)) {
             depends <- .get_requires_from_package_db(db, "Depends")
             imports <- .get_requires_from_package_db(db, "Imports")
             suggests <- .get_requires_from_package_db(db, "Suggests")
             enhances <- .get_requires_from_package_db(db, "Enhances")
-            bad <- bad[!bad %in% c(depends, imports, suggests, enhances)]
+            bad <- bad %w/o% c(depends, imports, suggests, enhances)
             attr(bad_exprs, "undeclared") <- bad
         }
     }
@@ -2258,8 +2259,8 @@ function(x, ...)
     z3 <- attr(x, "dup_false")
      if (length(z3)) {
     	msg <- ngettext(length(z3),
-    		        "Call with DUP != TRUE:",
-    		        "Calls with DUP != TRUE:",
+    		        "Call with DUP:",
+    		        "Calls with DUP:",
     		        domain = NA)
         res <- c(res, msg)
         for (i in seq_along(z3)) {
@@ -2287,7 +2288,7 @@ function(package, dir, lib.loc = NULL)
         dir <- find.package(package, lib.loc)
         ## Using package installed in @code{dir} ...
         code_dir <- file.path(dir, "R")
-        if(!file_test("-d", code_dir))
+        if(!dir.exists(code_dir))
             stop(gettextf("directory '%s' does not contain R code",
                           dir),
                  domain = NA)
@@ -2298,7 +2299,7 @@ function(package, dir, lib.loc = NULL)
             .load_package_quietly(package, lib.loc)
         code_env <- .package_env(package)
 
-        objects_in_code <- objects(envir = code_env, all.names = TRUE)
+        objects_in_code <- sort(names(code_env))
 
         ## Does the package have a namespace?
         if(packageHasNamespace(package, dirname(dir))) {
@@ -2307,7 +2308,10 @@ function(package, dir, lib.loc = NULL)
             ## generics.
             ns_S3_methods_db <- getNamespaceInfo(package, "S3methods")
             ns_S3_generics <- ns_S3_methods_db[, 1L]
-            ns_S3_methods <- ns_S3_methods_db[, 3L]
+            ## We really need the GENERIC.CLASS method names used in the
+            ## registry:
+            ns_S3_methods <-
+                paste(ns_S3_generics, ns_S3_methods_db[, 2L], sep = ".")
             ## Determine unexported but declared S3 methods.
             S3_reg <- setdiff(ns_S3_methods, objects_in_code)
         }
@@ -2316,13 +2320,13 @@ function(package, dir, lib.loc = NULL)
         if(missing(dir))
             stop("you must specify 'package' or 'dir'")
         ## Using sources from directory @code{dir} ...
-        if(!file_test("-d", dir))
+        if(!dir.exists(dir))
             stop(gettextf("directory '%s' does not exist", dir),
                  domain = NA)
         else
             dir <- file_path_as_absolute(dir)
         code_dir <- file.path(dir, "R")
-        if(!file_test("-d", code_dir))
+        if(!dir.exists(code_dir))
             stop(gettextf("directory '%s' does not contain R code",
                           dir),
                  domain = NA)
@@ -2338,7 +2342,7 @@ function(package, dir, lib.loc = NULL)
         sys_data_file <- file.path(code_dir, "sysdata.rda")
         if(file_test("-f", sys_data_file)) load(sys_data_file, code_env)
 
-        objects_in_code <- objects(envir = code_env, all.names = TRUE)
+        objects_in_code <- sort(names(code_env))
 
         ## Does the package have a NAMESPACE file?
         if(file.exists(file.path(dir, "NAMESPACE"))) {
@@ -2360,10 +2364,10 @@ function(package, dir, lib.loc = NULL)
 
     ## Find the function objects in the given package.
     functions_in_code <-
-        Filter(function(f) is.function(get(f, envir = code_env)), # get is expensive
+        Filter(function(f) is.function(code_env[[f]]),
                objects_in_code)
 
-    ## This is the virtual groyp generics, not the members
+    ## This is the virtual group generics, not the members
     S3_group_generics <- .get_S3_group_generics()
     ## This includes the primitive group generics as from R 2.6.0
     S3_primitive_generics <- .get_S3_primitive_generics()
@@ -2374,9 +2378,10 @@ function(package, dir, lib.loc = NULL)
         ## arguments the generic has, with positional arguments of g in
         ## the same positions for m.
         ## Exception: '...' in the method swallows anything.
+	if(identical(g, "round") && m == "round.POSIXt") return() # exception
         genfun <- get(g, envir = code_env)
         gArgs <- names(formals(genfun))
-        if(g == "plot") gArgs <- gArgs[-2L]
+        if(identical(g, "plot")) gArgs <- gArgs[-2L] # drop "y"
         ogArgs <- gArgs
         gm <- if(m %in% S3_reg) {
             ## See registerS3method() in ../../base/R/namespace.R.
@@ -2385,28 +2390,24 @@ function(package, dir, lib.loc = NULL)
                     .BaseNamespaceEnv
                 else {
                     if(.isMethodsDispatchOn()
-                       && methods:::is(genfun, "genericFunction"))
-                        genfun <- methods:::finalDefaultMethod(genfun at default)
+                       && methods::is(genfun, "genericFunction"))
+                        genfun <- methods::finalDefaultMethod(genfun at default)
                     if (typeof(genfun) == "closure") environment(genfun)
                     else .BaseNamespaceEnv
                 }
-            if(!exists(".__S3MethodsTable__.", envir = defenv,
-                       inherits = FALSE)) {
+            if(is.null(S3Table <- get0(".__S3MethodsTable__.", envir = defenv,
+                                       inherits = FALSE))) {
                 ## Happens e.g. if for some reason, we get "plot" as
                 ## standardGeneric for "plot" defined from package
                 ## "graphics" with its own environment which does not
                 ## contain an S3 methods table ...
                 return(NULL)
             }
-            S3Table <- get(".__S3MethodsTable__.", envir = defenv,
-                           inherits = FALSE)
-            if(!exists(m, envir = S3Table)) {
-                warning(gettextf("declared S3 method '%s' not found",
-                                 m),
-                        domain = NA,
-                        call. = FALSE)
+            if(is.null(mm <- get0(m, envir = S3Table))) {
+                warning(gettextf("declared S3 method '%s' not found", m),
+                        domain = NA, call. = FALSE)
                 return(NULL)
-            } else get(m, envir = S3Table)
+            } else mm
         } else get(m, envir = code_env)
         mArgs <- omArgs <- names(formals(gm))
         ## If m is a formula method, its first argument *may* be called
@@ -2418,14 +2419,14 @@ function(package, dir, lib.loc = NULL)
         }
         dotsPos <- which(gArgs == "...")
         ipos <- if(length(dotsPos))
-            seq.int(from = 1L, length.out = dotsPos[1L] - 1L)
+            seq_len(dotsPos[1L] - 1L)
         else
             seq_along(gArgs)
 
         ## careful, this could match multiply in incorrect funs.
         dotsPos <- which(mArgs == "...")
         if(length(dotsPos))
-            ipos <- ipos[seq.int(from = 1L, length.out = dotsPos[1L] - 1L)]
+	    ipos <- ipos[seq_len(dotsPos[1L] - 1L)]
         posMatchOK <- identical(gArgs[ipos], mArgs[ipos])
         argMatchOK <- all(gArgs %in% mArgs) || length(dotsPos) > 0L
         margMatchOK <- all(mArgs %in% c("...", gArgs)) || "..." %in% ogArgs
@@ -2458,7 +2459,20 @@ function(package, dir, lib.loc = NULL)
     ## Now determine the 'bad' methods in the function objects of the
     ## package.
     bad_methods <- list()
-    methods_stop_list <- .make_S3_methods_stop_list(basename(dir))
+    methods_stop_list <- nonS3methods(basename(dir))
+    ## some packages export S4 generics derived from other packages ....
+    methods_stop_list <-
+        c(methods_stop_list,
+          "all.equal", "all.names", "all.vars", "fitted.values", "qr.Q",
+          "qr.R", "qr.X", "qr.coef", "qr.fitted", "qr.qty", "qr.qy",
+          "qr.resid", "qr.solve", "rep.int", "seq.int", "sort.int",
+          "sort.list", "t.test")
+    methods_not_registered_but_exported <- character()
+    ## <FIXME>
+    ## Seems we currently cannot get these, because we only look at
+    ## *exported* functions in addition to the S3 registry.
+    methods_not_registered_not_exported <- character()
+    ## </FIXME>
     for(g in all_S3_generics) {
         if(!exists(g, envir = code_env)) next
         ## Find all methods in functions_in_code for S3 generic g.
@@ -2477,6 +2491,14 @@ function(package, dir, lib.loc = NULL)
         if(has_namespace) {
             ## Find registered methods for generic g.
             methods <- c(methods, ns_S3_methods[ns_S3_generics == g])
+            if(length(delta <- setdiff(methods, ns_S3_methods))) {
+                methods_not_registered_but_exported <-
+                    c(methods_not_registered_but_exported,
+                      intersect(delta, objects_in_code))
+                methods_not_registered_not_exported <-
+                    c(methods_not_registered_not_exported,
+                      setdiff(delta, objects_in_code))
+            }
         }
 
         for(m in methods)
@@ -2487,6 +2509,13 @@ function(package, dir, lib.loc = NULL)
             } else c(bad_methods, checkArgs(g, m))
     }
 
+    if(length(methods_not_registered_but_exported))
+        attr(bad_methods, "methods_not_registered_but_exported") <-
+            methods_not_registered_but_exported
+    if(length(methods_not_registered_not_exported))
+        attr(bad_methods, "methods_not_registered_not_exported") <-
+            methods_not_registered_not_exported
+
     class(bad_methods) <- "checkS3methods"
     bad_methods
 }
@@ -2505,7 +2534,18 @@ function(x, ...)
           "")
     }
 
-    as.character(unlist(lapply(x, .fmt)))
+    report_S3_methods_not_registered <-
+        config_val_to_logical(Sys.getenv("_R_CHECK_S3_METHODS_NOT_REGISTERED_",
+                                         "FALSE"))
+
+    c(as.character(unlist(lapply(x, .fmt))),
+      if(report_S3_methods_not_registered &&
+         length(methods <- attr(x, "methods_not_registered_but_exported"))) {
+          c("Found the following apparent S3 methods exported but not registered:",
+            strwrap(paste(sort(methods), collapse = " "),
+                    exdent = 2L, indent = 2L))
+      }
+      )
 }
 
 ### * checkReplaceFuns
@@ -2522,7 +2562,7 @@ function(package, dir, lib.loc = NULL)
         dir <- find.package(package, lib.loc)
         ## Using package installed in @code{dir} ...
         code_dir <- file.path(dir, "R")
-        if(!file_test("-d", code_dir))
+        if(!dir.exists(code_dir))
             stop(gettextf("directory '%s' does not contain R code",
                           dir),
                  domain = NA)
@@ -2538,7 +2578,7 @@ function(package, dir, lib.loc = NULL)
         if(packageHasNamespace(package, dirname(dir))) {
             has_namespace <- TRUE
             code_env <- asNamespace(package)
-            ns_S3_methods_db <- getNamespaceInfo(package, "S3methods")
+            ns_S3_methods_db <- .getNamespaceInfo(code_env, "S3methods")
         }
         else
             code_env <- .package_env(package)
@@ -2548,13 +2588,13 @@ function(package, dir, lib.loc = NULL)
         if(missing(dir))
             stop("you must specify 'package' or 'dir'")
         ## Using sources from directory @code{dir} ...
-        if(!file_test("-d", dir))
+        if(!dir.exists(dir))
             stop(gettextf("directory '%s' does not exist", dir),
                  domain = NA)
         else
             dir <- file_path_as_absolute(dir)
         code_dir <- file.path(dir, "R")
-        if(!file_test("-d", code_dir))
+        if(!dir.exists(code_dir))
             stop(gettextf("directory '%s' does not contain R code",
                           dir),
                  domain = NA)
@@ -2580,7 +2620,7 @@ function(package, dir, lib.loc = NULL)
         }
     }
 
-    objects_in_code <- objects(envir = code_env, all.names = TRUE)
+    objects_in_code <- sort(names(code_env))
     replace_funs <- character()
 
     if(has_namespace) {
@@ -2673,23 +2713,23 @@ function(package, dir, file, lib.loc = NULL)
         if(file.exists(code_file))      # could be data-only
             code_files <- code_file
         example_dir <- file.path(dir, "R-ex")
-        if(file_test("-d", example_dir)) {
+        if(dir.exists(example_dir)) {
             code_files <- c(code_files,
                             list_files_with_exts(example_dir, "R"))
         }
     }
     else if(!missing(dir)) {
         ## Using sources from directory @code{dir} ...
-        if(!file_test("-d", dir))
+        if(!dir.exists(dir))
             stop(gettextf("directory '%s' does not exist", dir),
                  domain = NA)
         else
             dir <- file_path_as_absolute(dir)
         code_dir <- file.path(dir, "R")
-        if(file_test("-d", code_dir))   # could be data-only
+        if(dir.exists(code_dir))   # could be data-only
             code_files <- list_files_with_type(code_dir, "code")
         docs_dir <- file.path(dir, "man")
-        if(file_test("-d", docs_dir))
+        if(dir.exists(docs_dir))
             docs_files <- list_files_with_type(docs_dir, "docs")
     }
     else if(!missing(file)) {
@@ -2780,22 +2820,22 @@ function(x, ...)
     as.character(unlist(lapply(names(x), .fmt)))
 }
 
-### * .check__depends
+### * .check_package_depends
 
 ## changed in 2.3.0 to refer to a source dir.
 
-
 .check_package_depends <-
-function(dir, force_suggests = TRUE, check_incoming = FALSE)
+function(dir, force_suggests = TRUE, check_incoming = FALSE,
+         ignore_vignettes = FALSE)
 {
     .check_dependency_cycles <-
-        function(db, available = available.packages(),
+        function(db, available = utils::available.packages(),
                  dependencies = c("Depends", "Imports", "LinkingTo"))
         {
             ## given a package, find its recursive dependencies.
             ## We want the dependencies of the current package,
             ## not of a version on the repository.
-            pkg <- db[["Package"]]
+##            pkg <- db[["Package"]]
             this <- db[dependencies]; names(this) <- dependencies
             known <- setdiff(utils:::.clean_up_dependencies(this), "R")
             info <- available[, dependencies, drop = FALSE]
@@ -2834,8 +2874,13 @@ function(dir, force_suggests = TRUE, check_incoming = FALSE)
     bad_depends <- list()
     ## and we cannot have cycles
     ## this check needs a package db from repository(s), so
-    if(!any(grepl("@CRAN@", getOption("repos")))) {
-        ad <- .check_dependency_cycles(db)
+    repos <- getOption("repos")
+    if(any(grepl("@CRAN@", repos)))
+        repos <- .get_standard_repository_URLs()
+    if(!any(grepl("@CRAN@", repos))) {
+        ## Not getting here should no longer be possble ...
+        available <- utils::available.packages(repos = repos)
+        ad <- .check_dependency_cycles(db, available)
         pkgname <- db[["Package"]]
         if(pkgname %in% ad)
             bad_depends$all_depends <- setdiff(ad, pkgname)
@@ -2921,14 +2966,14 @@ function(dir, force_suggests = TRUE, check_incoming = FALSE)
             if(length(m))
                 bad_depends$suggests_but_not_installed <- m
         }
-        if (length(VB)) {
+        if (!ignore_vignettes && length(VB)) {
             ## These need both to be declared and installed
             ## If people explicitly state 'utils' they ought really to
             ## declare it, but skip for now.
-            bad <- VB[! VB %in% c(package_name, "utils", depends, imports, suggests)]
+            bad <- VB %w/o% c(package_name, "utils", depends, imports, suggests)
             if(length(bad))
                 bad_depends$required_for_checking_but_not_declared <- bad
-            bad2 <- VB[! VB %in% c(package_name, installed)]
+            bad2 <- VB %w/o% c(package_name, installed)
             bad2 <- setdiff(bad2, bad)
             if(length(bad2))
                 bad_depends$required_for_checking_but_not_installed <- bad2
@@ -2983,7 +3028,8 @@ function(dir, force_suggests = TRUE, check_incoming = FALSE)
     ## check header-only packages
     if (check_incoming) {
         hdOnly <- c("BH", "RcppArmadillo", "RcppEigen")
-        hd <- intersect(hdOnly, c(depends, imports))
+        hd <- setdiff(intersect(hdOnly, c(depends, imports)),
+                      .get_namespace_package_depends(dir, TRUE))
         if(length(hd)) bad_depends$hdOnly <- hd
     }
 
@@ -3053,7 +3099,7 @@ function(x, ...)
       if(length(bad <- x$required_for_checking_but_not_installed) > 1L) {
           c(.pretty_format2("VignetteBuilder packages required for checking but not installed:", bad), "")
       } else if(length(bad)) {
-          c(sprintf("VignetteBuilder package required for checking but installed: %s", sQuote(bad)), "")
+          c(sprintf("VignetteBuilder package required for checking but not installed: %s", sQuote(bad)), "")
       },
       if(length(bad <- x$missing_vignette_depends)) {
           c(if(length(bad) > 1L) {
@@ -3191,7 +3237,7 @@ function(dfile, strict = FALSE)
     val <- db[match(c("Depends", "Suggests", "Imports", "Enhances"),
                     names(db), nomatch = 0L)]
     if(length(val)) {
-        depends <- .strip_whitespace(unlist(strsplit(val, ",")))
+        depends <- trimws(unlist(strsplit(val, ",")))
         bad_dep_entry <- bad_dep_op <- bad_dep_version <- character()
         dep_regexp <-
             paste0("^[[:space:]]*",
@@ -3227,7 +3273,7 @@ function(dfile, strict = FALSE)
                      bad_dep_version = bad_dep_version)
     }
     if(strict && !is.na(val <- db["VignetteBuilder"])) {
-        depends <- .strip_whitespace(unlist(strsplit(val, ",")))
+        depends <- trimws(unlist(strsplit(val, ",")))
         if(length(depends) < 1L || !all(grepl("^[[:alnum:].]*$", depends)))
             out$bad_vignettebuilder <- TRUE
     }
@@ -3237,6 +3283,16 @@ function(dfile, strict = FALSE)
        && !(package_name %in% unlist(standard_package_names)))
         out$bad_priority <- val
 
+    ## Minimal check (so far) of Title and Description.
+    if(strict && !is.na(val <- db["Title"])
+       && grepl("[.]$", val)
+       && !grepl("[[:space:]][.][.][.]|et[[:space:]]al[.]", trimws(val)))
+        out$bad_Title <- TRUE
+    ## some people put punctuation inside quotes, some outside.
+    if(strict && !is.na(val <- db["Description"])
+       && !grepl("[.!?]['\")]?$", trimws(val)))
+        out$bad_Description <- TRUE
+
     class(out) <- "check_package_description"
 
     out
@@ -3279,25 +3335,25 @@ function(x, ...)
     if(length(x$bad_maintainer))
         writeLines(c(gettext("Malformed maintainer field."), ""))
 
-    if(any(as.integer(sapply(x$bad_depends_or_suggests_or_imports, length)) > 0L )) {
+    if(any(as.integer(lengths(x$bad_depends_or_suggests_or_imports)) > 0L )) {
         bad <- x$bad_depends_or_suggests_or_imports
         writeLines(gettext("Malformed Depends or Suggests or Imports or Enhances field."))
         if(length(bad$bad_dep_entry)) {
             tmp <- c(gettext("Offending entries:"),
-                     paste(" ", bad$bad_dep_entry),
+                     paste0("  ", bad$bad_dep_entry),
                      strwrap(gettextf("Entries must be names of packages optionally followed by '<=' or '>=', white space, and a valid version number in parentheses.")))
             writeLines(tmp)
         }
         if(length(bad$bad_dep_op)) {
             tmp <- c(gettext("Entries with infeasible comparison operator:"),
-                     paste(" ", bad$bad_dep_entry),
+                     paste0("  ", bad$bad_dep_entry),
                      strwrap(gettextf("Only operators '<=' and '>=' are possible.")))
 
             writeLines(tmp)
         }
         if(length(bad$bad_dep_version)) {
             tmp <- c(gettext("Entries with infeasible version number:"),
-                     paste(" ", bad$bad_dep_version),
+                     paste0("  ", bad$bad_dep_version),
                      strwrap(gettextf("Version numbers must be sequences of at least two non-negative integers, separated by single '.' or '-'.")))
             writeLines(tmp)
         }
@@ -3314,16 +3370,21 @@ function(x, ...)
                      strwrap(gettextf("Packages with priorities 'base' or 'recommended' or 'defunct-base' must already be known to R.")),
                      ""))
 
-    if(any(as.integer(sapply(x, length)) > 0L))
-        writeLines(c(strwrap(gettextf("See the information on DESCRIPTION files in section 'Creating R packages' of the 'Writing R Extensions' manual.")),
+    if(identical(x$bad_Title, TRUE))
+        writeLines(gettext("Malformed Title field: should not end in a period."))
+
+    if(identical(x$bad_Description, TRUE))
+        writeLines(gettext("Malformed Description field: should contain one or more complete sentences."))
+
+    xx<- x; xx$bad_Title <- xx$bad_Description <- NULL
+
+    if(any(as.integer(lengths(xx)) > 0L))
+        writeLines(c(strwrap(gettextf("See section 'The DESCRIPTION file' in the 'Writing R Extensions' manual.")),
                      ""))
 
     invisible(x)
 }
 
-## needed in two places
-dir.exists <- function(x) !is.na(isdir <- file.info(x)$isdir) & isdir
-
 ### * .check_package_description2
 
 .check_package_description2 <-
@@ -3362,7 +3423,7 @@ function(dfile)
             }
         }
         if(!status) {
-            llinks <- llinks[sapply(llinks, length) > 1L]
+            llinks <- llinks[lengths(llinks) > 1L]
             if(length(llinks)) links <- sapply(llinks, `[[`, 1L)
         }
         ## and check if we can actually link to these.
@@ -3428,14 +3489,43 @@ function(aar, strict = FALSE)
                 out$bad_authors_at_R_field_has_no_author <- TRUE
             else {
                 attr(out, "Author") <- s
-                if(strict) {
-                    ## Specifically check for persons with missing or
-                    ## non-standard roles.
-                    s <- format(aar[sapply(aar,
-                                           utils:::.format_person_for_plain_author_spec)
-                                    == ""])
-                    if(length(s))
-                        out$bad_authors_at_R_field_has_author_without_role <- s
+                if(strict >= 1L) {
+                    has_no_name <-
+                        vapply(aar,
+                               function(e)
+                               is.null(e$given) && is.null(e$family),
+                               NA)
+                    if(any(has_no_name)) {
+                        out$bad_authors_at_R_field_has_persons_with_no_name <-
+                            format(aar[has_no_name])
+                    }
+                    has_no_role <-
+                        vapply(aar,
+                               function(e) is.null(e$role),
+                               NA)
+                    if(any(has_no_role)) {
+                        out$bad_authors_at_R_field_has_persons_with_no_role <-
+                            format(aar[has_no_role])
+                    }
+                }
+                if(strict >= 2L) {
+                    if(all(has_no_name |
+                           vapply(aar,
+                                  function(e)
+                                  is.na(match("aut", e$role)),
+                                  NA)))
+                        out$bad_authors_at_R_field_has_no_author_roles <- TRUE
+                    non_standard_roles <-
+                        lapply(aar$role, setdiff,
+                               utils:::MARC_relator_db_codes_used_with_R)
+                    ind <- lengths(non_standard_roles) > 0L
+                    if(any(ind)) {
+                        out$bad_authors_at_R_field_has_persons_with_nonstandard_roles <-
+                            sprintf("%s: %s",
+                                    format(aar[ind]),
+                                    sapply(non_standard_roles[ind], paste,
+                                           collapse = ", "))
+                    }
                 }
             }
         }
@@ -3445,10 +3535,34 @@ function(aar, strict = FALSE)
             out$bad_authors_at_R_field_for_maintainer <-
                 conditionMessage(s)
         } else {
-            if(s == "")
-                out$bad_authors_at_R_field_has_no_maintainer <- TRUE
-            else
-                attr(out, "Maintainer") <- s
+            ## R-exts says
+            ##   The mandatory 'Maintainer' field should give a _single_
+            ##   name followed by a _valid_ (RFC 2822) email address in
+            ##   angle brackets.
+            ## Hence complain when Authors at R
+            ## * has more than one person with a cre role
+            ## * has no person with a cre role, "valid" email address
+            ##   and a non-empty name.
+            bad <- FALSE
+            p <- Filter(function(e) {
+                !is.na(match("cre", e$role))
+            },
+                        aar)
+            if(length(p) > 1L) {
+                bad <- TRUE
+                out$bad_authors_at_R_field_too_many_maintainers <-
+                    format(p)
+            }
+            p <- Filter(function(e) {
+                (!is.null(e$given) || !is.null(e$family)) && !is.null(e$email)
+            },
+                        p)
+            if(!length(p)) {
+                bad <- TRUE
+                out$bad_authors_at_R_field_has_no_valid_maintainer <- TRUE
+            }
+            ## s should now be non-empty iff bad is FALSE.
+            if(!bad) attr(out, "Maintainer") <- s
         }
     }
     out
@@ -3460,26 +3574,44 @@ function(x)
     c(character(),
       if(length(bad <- x[["bad_authors_at_R_field"]])) {
           c(gettext("Malformed Authors at R field:"),
-            paste(" ", bad))
+            paste0("  ", bad))
       },
       if(length(bad <- x[["bad_authors_at_R_field_for_author"]])) {
           c(gettext("Cannot extract Author field from Authors at R field:"),
-            paste(" ", bad))
+            paste0("  ", bad))
       },
       if(length(x[["bad_authors_at_R_field_has_no_author"]])) {
-          gettext("Authors at R field gives no person with author role.")
+          gettext("Authors at R field gives no person with name and roles.")
       },
       if(length(bad <-
-                x[["bad_authors_at_R_field_has_author_without_role"]])) {
-          c(gettext("Authors at R field gives persons with no valid roles:"),
-            paste(" ", bad))
+                x[["bad_authors_at_R_field_has_persons_with_no_name"]])) {
+          c(gettext("Authors at R field gives persons with no name:"),
+            paste0("  ", bad))
+      },
+      if(length(bad <-
+                x[["bad_authors_at_R_field_has_persons_with_no_role"]])) {
+          c(gettext("Authors at R field gives persons with no role:"),
+            paste0("  ", bad))
+      },
+      if(length(x[["bad_authors_at_R_field_has_no_author_roles"]])) {
+          gettext("Authors at R field gives no person with name and author role")
+      },
+      if(length(bad <-
+                x[["bad_authors_at_R_field_has_persons_with_nonstandard_roles"]])) {
+          c(gettext("Authors at R field gives persons with non-standard roles:"),
+            paste0("  ", bad))
       },
       if(length(bad <- x[["bad_authors_at_R_field_for_maintainer"]])) {
           c(gettext("Cannot extract Maintainer field from Authors at R field:"),
-            paste(" ", bad))
+            paste0("  ", bad))
+      },
+      if(length(bad <-
+                x[["bad_authors_at_R_field_too_many_maintainers"]])) {
+          c(gettext("Authors at R field gives more than one person with maintainer role:"),
+            paste0("  ", bad))
       },
-      if(length(x[["bad_authors_at_R_field_has_no_maintainer"]])) {
-          gettext("Authors at R field gives no person with maintainer role and email address.")
+      if(length(x[["bad_authors_at_R_field_has_no_valid_maintainer"]])) {
+          strwrap(gettext("Authors at R field gives no person with maintainer role, valid email address and non-empty name."))
       }
       )
 }
@@ -3537,8 +3669,8 @@ function(x, ...)
           c(gettext("Fields with non-ASCII values:"),
             .pretty_format(x$fields_with_non_ASCII_values))
       },
-      if(any(as.integer(sapply(x, length)) > 0L)) {
-          c(strwrap(gettextf("See the information on DESCRIPTION files in section 'Creating R packages' of the 'Writing R Extensions' manual.")),
+      if(any(as.integer(lengths(x)) > 0L)) {
+          c(strwrap(gettextf("See section 'The DESCRIPTION file' in the 'Writing R Extensions' manual.")),
             "")
       })
 }
@@ -3641,11 +3773,11 @@ function(x, ...)
       },
       if(length(y <- x$bad_extensions)) {
           c(gettext("License components with restrictions not permitted:"),
-            paste(" ", y))
+            paste0("  ", y))
       },
       if(length(y <- x$miss_extension)) {
           c(gettext("License components which are templates and need '+ file LICENSE':"),
-            paste(" ", y))
+            paste0("  ", y))
       }
       )
 }
@@ -3667,7 +3799,8 @@ function(dir, makevars = c("Makevars.in", "Makevars"))
     mfile <- paths[1L]
     make <- Sys.getenv("MAKE")
     if(make == "") make <- "make"
-    command <- sprintf("%s -f %s -f %s -f %s",
+    ## needs a target to avoid targets in src/Makevars
+    command <- sprintf("%s -f %s -f %s -f %s makevars_test",
                        make,
                        shQuote(file.path(R.home("share"), "make",
                                          "check_vars_ini.mk")),
@@ -3680,7 +3813,7 @@ function(dir, makevars = c("Makevars.in", "Makevars"))
     if(!length(lines) || inherits(lines, "error"))
         return(bad_flags)
 
-    prefixes <- c("CPP", "C", "CXX", "F", "FC", "OBJC", "OBJCXX")
+    prefixes <- c("CPP", "C", "CXX", "CXX98", "CXX11", "CXX14", "CXX17", "F", "FC", "OBJC", "OBJCXX")
 
     uflags_re <- sprintf("^(%s)FLAGS: *(.*)$",
                          paste(prefixes, collapse = "|"))
@@ -3708,11 +3841,15 @@ function(dir, makevars = c("Makevars.in", "Makevars"))
     bad_flags_regexp <-
         sprintf("^-(%s)$",
                 paste(c("O.*",
-                        "W",
+                        "W", # same as -Wextra in GCC.
+                        "w", # GCC, Solaris inhibit all warnings
                         "W[^l].*", # -Wl, might just be portable
                         "ansi", "pedantic", "traditional",
-                        "f.*", "m.*", "std.*",
+                        "f.*", "m.*", "std.*", # includes -fopenmp
+                        "isystem", # gcc and clones
                         "x",
+                        "cpp", # gfortran
+                        "g",  # not portable, waste of space
                         "q"),
                       collapse = "|"))
     for(i in seq_along(lines)) {
@@ -3785,7 +3922,7 @@ function(package, lib.loc = NULL)
                                                           silent = TRUE)))
             }, type = "output")
         }
-        runif(1) # create .Random.seed
+        stats::runif(1)                 # create .Random.seed
         compat <- new.env(hash=TRUE)
         if(.Platform$OS.type != "unix") {
             assign("nsl", function(hostname) {}, envir = compat)
@@ -3804,7 +3941,7 @@ function(package, lib.loc = NULL)
                    envir = compat)
         }
         if(.Platform$OS.type != "windows") {
-            assign("bringToTop", function (which = dev.cur(), stay = FALSE) {},
+            assign("bringToTop", function (which = grDevices::dev.cur(), stay = FALSE) {},
                    envir = compat)
             assign("choose.dir",
                    function (default = "", caption = "Select folder") {},
@@ -3823,7 +3960,7 @@ function(package, lib.loc = NULL)
             assign("readClipboard", function(format = 1, raw = FALSE) {},
                    envir = compat)
             assign("setWindowTitle",
-                   function(suffix, title = paste(getIdentification(), suffix)) {},
+                   function(suffix, title = paste(utils::getIdentification(), suffix)) {},
                    envir = compat)
             assign("shell",
                    function(cmd, shell, flag = "/c", intern = FALSE,
@@ -3838,7 +3975,7 @@ function(package, lib.loc = NULL)
                    function (filename = "Rplot",
                              type = c("wmf", "emf", "png", "jpeg", "jpg",
                                       "bmp", "ps", "eps", "pdf"),
-                             device = dev.cur(), restoreConsole = TRUE) {},
+                             device = grDevices::dev.cur(), restoreConsole = TRUE) {},
                    envir = compat)
             assign("win.graph",
                    function(width = 7, height = 7, pointsize = 12,
@@ -3886,7 +4023,7 @@ function(package, lib.loc = NULL)
                    envir = compat)
             assign(".install.winbinary",
                    function(pkgs, lib, repos = getOption("repos"),
-                            contriburl = contrib.url(repos),
+                            contriburl = utils::contrib.url(repos),
                             method, available = NULL, destdir = NULL,
                             dependencies = FALSE, libs_only = FALSE,
                             ...) {}, envir = compat)
@@ -3911,7 +4048,7 @@ function(package, lib.loc = NULL)
     checkMethodUsageEnv <- function(env, ...) {
 	for(g in .get_S4_generics(env))
 	    for(m in .get_S4_methods_list(g, env)) {
-		fun <- methods::getDataPart(m)
+		fun <- methods::unRematchDefinition(methods::getDataPart(m))
 		signature <- paste(m at generic,
 				   paste(m at target, collapse = "-"),
 				   sep = ",")
@@ -3919,10 +4056,10 @@ function(package, lib.loc = NULL)
 	    }
     }
     checkMethodUsagePackage <- function (pack, ...) {
-	pname <- paste("package", pack, sep = ":")
+	pname <- paste0("package:", pack)
 	if (!pname %in% search())
 	    stop("package must be loaded", domain = NA)
-	checkMethodUsageEnv(if (pack %in% loadedNamespaces())
+	checkMethodUsageEnv(if (isNamespaceLoaded(pack))
 			    getNamespace(pack) else as.environment(pname), ...)
     }
 
@@ -3945,10 +4082,13 @@ function(package, lib.loc = NULL)
     ## look for globalVariables declaration in package
     ## (This loads the namespace if not already loaded.)
     .glbs <- suppressMessages(utils::globalVariables(, package))
-    if(length(.glbs))
-        ## codetools doesn't allow adding to its default
-        args$suppressUndefined <-
-            c(codetools:::dfltSuppressUndefined, .glbs)
+    if(length(.glbs)) {
+        ## Cannot use globalVariables() for base
+        ## (and potentially tools and utils)
+        dflt <- c(if(package == "base") "last.dump",
+                  ".Generic", ".Method", ".Class")
+        args$suppressUndefined <- c(dflt, .glbs)
+    }
 
     if(check_without_loading) {
         args <- c(list(env, report = foo), args)
@@ -3974,7 +4114,21 @@ function(x, ...)
         ind <- grepl(": partial argument match of", x, fixed = TRUE)
         if(any(ind)) x <- c(x[ind], x[!ind])
     }
-    strwrap(x, indent = 0L, exdent = 2L)
+    if(length(x)) {
+        ## Provide a summary listing of the undefined globals:
+        y <- .canonicalize_quotes(x)
+        m <- regexec("no visible global function definition for '(.*)'", y)
+        funs <- vapply(Filter(length, regmatches(y, m)), `[`, "", 2L)
+        m <- regexec("no visible binding for global variable '(.*)'", y)
+        vars <- vapply(Filter(length, regmatches(y, m)), `[`, "", 2L)
+        y <- sort(unique(c(funs, vars)))
+        c(strwrap(x, indent = 0L, exdent = 2L),
+          if(length(y)) {
+              c("Undefined global functions or variables:",
+                strwrap(paste(y, collapse = " "),
+                        indent = 2L, exdent = 2L))
+          })
+    } else character()
 }
 
 ### * .check_Rd_xrefs
@@ -3986,6 +4140,8 @@ function(package, dir, lib.loc = NULL)
     ## and recommended packages.
     base <- unlist(.get_standard_package_names()[c("base", "recommended")],
                    use.names = FALSE)
+    ## May not have recommended packages
+    base <- base[dir.exists(file.path(.Library, base))]
     aliases <- lapply(base, Rd_aliases, lib.loc = NULL)
     ## (Don't use lib.loc = .Library, as recommended packages may have
     ## been installed to a different place.)
@@ -4016,24 +4172,24 @@ function(package, dir, lib.loc = NULL)
     if(!missing(package)) {
         aliases1 <- Rd_aliases(package, lib.loc = lib.loc)
         if(!length(aliases1))
-            return(structure(NULL, class = "check_Rd_xrefs"))
+            return(structure(list(), class = "check_Rd_xrefs"))
         aliases <- c(aliases, list(aliases1))
         db <- .build_Rd_xref_db(package, lib.loc = lib.loc)
     } else {
         aliases1 <- Rd_aliases(dir = dir)
         if(!length(aliases1))
-            return(structure(NULL, class = "check_Rd_xrefs"))
+            return(structure(list(), class = "check_Rd_xrefs"))
         aliases <- c(aliases, list(aliases1))
         db <- .build_Rd_xref_db(dir = dir)
     }
 
     ## Flatten the xref db into one big matrix.
     db <- cbind(do.call("rbind", db), rep(names(db), sapply(db, NROW)))
-    if(nrow(db) == 0L) return(structure(NULL, class = "check_Rd_xrefs"))
+    if(nrow(db) == 0L) return(structure(list(), class = "check_Rd_xrefs"))
 
     ## fixup \link[=dest] form
     anchor <- db[, 2L]
-    have_equals <- grepl("^=", anchor)
+    have_equals <- startsWith(anchor, "=")
     if(any(have_equals))
         db[have_equals, 1:2] <- cbind(sub("^=", "", anchor[have_equals]), "")
 
@@ -4043,7 +4199,7 @@ function(package, dir, lib.loc = NULL)
         paste0("[", db[have_anchor, 2L], "]{", db[have_anchor, 1L], "}")
 
     ## Check the targets from the non-anchored xrefs.
-    db[!have_anchor, "bad"] <- !( db[!have_anchor, 1L] %in% unlist(aliases))
+    db[!have_anchor, "bad"] <- db[!have_anchor, 1L] %notin% unlist(aliases)
 
     ## and then check the anchored ones if we can.
     have_colon <- grepl(":", anchor, fixed = TRUE)
@@ -4055,10 +4211,9 @@ function(package, dir, lib.loc = NULL)
 
     use_aliases_from_CRAN <-
         config_val_to_logical(Sys.getenv("_R_CHECK_XREFS_USE_ALIASES_FROM_CRAN_",
-                                         FALSE))
+                                         "FALSE"))
     if(use_aliases_from_CRAN) {
-        CRAN <- .get_standard_repository_URLs()[1L]
-        CRAN_aliases_db <- NULL
+        aliases_db <- NULL
     }
 
     for (pkg in unique(thispkg[have_anchor])) {
@@ -4082,16 +4237,11 @@ function(package, dir, lib.loc = NULL)
             } else FALSE
             db[this, "bad"] <- !good & !suspect
         } else if(use_aliases_from_CRAN) {
-            if(is.null(CRAN_aliases_db)) {
+            if(is.null(aliases_db)) {
                 ## Not yet read in.
-                ## message("Reading in aliases db ...")
-                con <- gzcon(url(sprintf("%s/src/contrib/Meta/aliases.rds",
-                                         CRAN),
-                                 "rb"))
-                CRAN_aliases_db <- readRDS(con)
-                close(con)
+                aliases_db <- CRAN_aliases_db()
             }
-            aliases <- CRAN_aliases_db[[pkg]]
+            aliases <- aliases_db[[pkg]]
             if(is.null(aliases)) {
                 unknown <- c(unknown, pkg)
                 next
@@ -4122,6 +4272,11 @@ function(package, dir, lib.loc = NULL)
     unknown <- unknown[!obsolete]
     if (length(unknown)) {
         repos <- .get_standard_repository_URLs()
+        ## Also allow for additionally specified repositories.
+        aurls <- pkgInfo[["DESCRIPTION"]]["Additional_repositories"]
+        if(!is.na(aurls)) {
+            repos <- c(repos, .read_additional_repositories_field(aurls))
+        }
         known <-
             try(suppressWarnings(utils::available.packages(utils::contrib.url(repos, "source"),
                filters = c("R_version", "duplicates"))[, "Package"]))
@@ -4160,7 +4315,7 @@ function(x, ...)
               "")
         }
         c(unlist(lapply(seq_along(xx), .fmt)),
-          strwrap(gettextf("See the information in section 'Cross-references' of the 'Writing R Extensions' manual.")),
+          strwrap(gettextf("See section 'Cross-references' in the 'Writing R Extensions' manual.")),
           "")
     } else {
         character()
@@ -4186,7 +4341,7 @@ function(pkgDir)
             utf8 <<- utf8 + sum(enc == "UTF-8")
             bytes <<- bytes + sum(enc == "bytes")
             unk <- xx[enc == "unknown"]
-            ind <- .Call(check_nonASCII2, unk)
+            ind <- .Call(C_check_nonASCII2, unk)
             if(length(ind)) {
                 non_ASCII <<- c(non_ASCII, unk[ind])
                 where <<- c(where, rep.int(ds, length(ind)))
@@ -4233,20 +4388,24 @@ function(x, ...)
     ## not sQuote as we have mucked about with locales.
     iconv0 <- function(x, ...) paste0("'", iconv(x, ...), "'")
 
+    suppress_notes <-
+        config_val_to_logical(Sys.getenv("_R_CHECK_PACKAGE_DATASETS_SUPPRESS_NOTES_",
+                                         "FALSE"))
+
     c(character(),
-      if(n <- x$latin1) {
+      if((n <- x$latin1) && !suppress_notes) {
           sprintf(
                   ngettext(n,
                    "Note: found %d marked Latin-1 string",
                    "Note: found %d marked Latin-1 strings"), n)
       },
-      if(n <- x$utf8) {
+      if((n <- x$utf8) && !suppress_notes) {
           sprintf(
                   ngettext(n,
                            "Note: found %d marked UTF-8 string",
                            "Note: found %d marked UTF-8 strings"), n)
       },
-      if(n <- x$bytes) {
+      if((n <- x$bytes) && !suppress_notes) {
           sprintf(
                   ngettext(n,
                            "Note: found %d string marked as \"bytes\"",
@@ -4406,7 +4565,7 @@ function(dir, doDelete = FALSE)
         if(basename(dir) %in% c("R", "man"))
             for(os in OS_subdirs) {
                 os_dir <- file.path(dir, os)
-                if(file_test("-d", os_dir))
+                if(dir.exists(os_dir))
                     d <- c(d,
                            file.path(os,
                                      list.files(os_dir,
@@ -4416,7 +4575,7 @@ function(dir, doDelete = FALSE)
         d[file_test("-f", file.path(dir, d))]
     }
 
-    if(!file_test("-d", dir))
+    if(!dir.exists(dir))
         stop(gettextf("directory '%s' does not exist", dir), domain = NA)
     else
         dir <- file_path_as_absolute(dir)
@@ -4425,7 +4584,7 @@ function(dir, doDelete = FALSE)
                          demo = character(), `inst/doc` = character())
 
     code_dir <- file.path(dir, "R")
-    if(file_test("-d", code_dir)) {
+    if(dir.exists(code_dir)) {
         all_files <- mydir(code_dir)
         ## Under Windows, need a Makefile.win for methods.
         R_files <- c("sysdata.rda", "Makefile.win",
@@ -4443,7 +4602,7 @@ function(dir, doDelete = FALSE)
     }
 
     man_dir <- file.path(dir, "man")
-    if(file_test("-d", man_dir)) {
+    if(dir.exists(man_dir)) {
         all_files <- mydir(man_dir)
         man_files <- list_files_with_type(man_dir, "docs",
                                           full.names = FALSE,
@@ -4456,7 +4615,7 @@ function(dir, doDelete = FALSE)
     }
 
     demo_dir <- file.path(dir, "demo")
-    if(file_test("-d", demo_dir)) {
+    if(dir.exists(demo_dir)) {
         all_files <- mydir(demo_dir)
         demo_files <- list_files_with_type(demo_dir, "demo",
                                            full.names = FALSE)
@@ -4502,7 +4661,7 @@ function(x, ...)
           .pretty_format(x[[i]]))
     }
 
-    as.character(unlist(lapply(which(sapply(x, length) > 0L), .fmt)))
+    as.character(unlist(lapply(which(lengths(x) > 0L), .fmt)))
 }
 
 ### * .check_package_ASCII_code
@@ -4511,20 +4670,20 @@ function(x, ...)
 function(dir, respect_quotes = FALSE)
 {
     OS_subdirs <- c("unix", "windows")
-    if(!file_test("-d", dir))
+    if(!dir.exists(dir))
         stop(gettextf("directory '%s' does not exist", dir), domain = NA)
     else
         dir <- file_path_as_absolute(dir)
 
     code_dir <- file.path(dir, "R")
     wrong_things <- character()
-    if(file_test("-d", code_dir)) {
+    if(dir.exists(code_dir)) {
         R_files <- list_files_with_type(code_dir, "code",
                                         full.names = FALSE,
                                         OS_subdirs = OS_subdirs)
         for(f in R_files) {
             text <- readLines(file.path(code_dir, f), warn = FALSE)
-            if(.Call(check_nonASCII, text, !respect_quotes))
+            if(.Call(C_check_nonASCII, text, !respect_quotes))
                 wrong_things <- c(wrong_things, f)
         }
     }
@@ -4537,7 +4696,7 @@ function(dir, respect_quotes = FALSE)
 .check_package_code_syntax <-
 function(dir)
 {
-    if(!file_test("-d", dir))
+    if(!dir.exists(dir))
         stop(gettextf("directory '%s' does not exist", dir), domain = NA)
     else
         dir <- file_path_as_absolute(dir)
@@ -4559,7 +4718,7 @@ function(dir)
                    Sys.setlocale("LC_CTYPE", "C")
                    )
         } else {
-            loc <- Sys.getenv("R_ENCODING_LOCALES", NA)
+            loc <- Sys.getenv("R_ENCODING_LOCALES", NA_character_)
             if(!is.na(loc)) {
                 loc <- strsplit(strsplit(loc, ":")[[1L]], "=")
                 nm <- lapply(loc, "[[", 1L)
@@ -4580,7 +4739,7 @@ function(dir)
                 switch(enc,
                        "latin1" = Sys.setlocale("LC_CTYPE", "en_US"),
                        "utf-8"  =,  # not valid, but used
-                       "UTF-8"  = Sys.setlocale("LC_CTYPE", "en_US.utf8"),
+                       "UTF-8"  = Sys.setlocale("LC_CTYPE", "en_US.UTF-8"),
                        "latin2" = Sys.setlocale("LC_CTYPE", "pl_PL"),
                        "latin9" = Sys.setlocale("LC_CTYPE",
                        "fr_FR.iso885915 at euro"),
@@ -4629,7 +4788,7 @@ function(dir)
                                     OS_subdirs = c("unix", "windows")),
                collect_parse_woes)
     Sys.setlocale("LC_CTYPE", "C")
-    structure(out[sapply(out, length) > 0L],
+    structure(out[lengths(out) > 0L],
               class = "check_package_code_syntax")
 }
 
@@ -4644,15 +4803,15 @@ function(x, ...)
             msg <- gsub("\n", "\n  ", sub("[^:]*: *", "", xi$Error),
 			perl = TRUE, useBytes = TRUE)
             writeLines(c(sprintf("Error in file '%s':", xi$File),
-                         paste(" ", msg)))
+                         paste0("  ", msg)))
         }
         if(len <- length(xi$Warnings))
             writeLines(c(sprintf(ngettext(len,
                                           "Warning in file %s:",
                                           "Warnings in file %s:"),
                                  sQuote(xi$File)),
-                         paste(" ", gsub("\n\n", "\n  ", xi$Warnings,
-					 perl = TRUE, useBytes = TRUE))))
+                         paste0("  ", gsub("\n\n", "\n  ", xi$Warnings,
+                                           perl = TRUE, useBytes = TRUE))))
     }
     invisible(x)
 }
@@ -4914,9 +5073,9 @@ function(x, ...)
 
         has_bad_wrong_args <-
             "bad_arg_names" %in% unlist(lapply(y, names))
-        calls <-
-            unique(unlist(lapply(y,
-                                 function(e) e[["bad_calls"]][["names"]])))
+##        calls <-
+##            unique(unlist(lapply(y,
+##                                 function(e) e[["bad_calls"]][["names"]])))
         .fmt_entries_for_file <- function(e, f) {
             c(gettextf("File %s:", sQuote(f)),
               unlist(Map(.fmt_entries_for_function, e, names(e))),
@@ -5032,7 +5191,7 @@ function(dir)
         ## (This may fail for conditionalized code not meant for R
         ## [e.g., argument 'where'].)
         mc <- tryCatch(match.call(base::assign, e), error = identity)
-        if(inherits(mc, "error") || mc$x == ".Random.seed")
+        if(inherits(mc, "error") || identical(mc$x, ".Random.seed"))
             return(FALSE)
         if(!is.null(env <- mc$envir) &&
            identical(tryCatch(eval(env),
@@ -5139,7 +5298,7 @@ function(package, dir, lib.loc = NULL)
         dir <- find.package(package, lib.loc)
         ## Using package installed in @code{dir} ...
         code_dir <- file.path(dir, "R")
-        if(!file_test("-d", code_dir))
+        if(!dir.exists(code_dir))
             stop(gettextf("directory '%s' does not contain R code",
                           dir),
                  domain = NA)
@@ -5162,7 +5321,7 @@ function(package, dir, lib.loc = NULL)
     }
     else if(!missing(dir)) {
         ## Using sources from directory @code{dir} ...
-        if(!file_test("-d", dir))
+        if(!dir.exists(dir))
             stop(gettextf("directory '%s' does not exist", dir),
                  domain = NA)
         else
@@ -5173,7 +5332,7 @@ function(package, dir, lib.loc = NULL)
         if(file.exists(nsfile))
            ns <- parseNamespaceFile(basename(dir), dirname(dir))
         code_dir <- file.path(dir, "R")
-        if(file_test("-d", code_dir)) {
+        if(dir.exists(code_dir)) {
             file <- tempfile()
             on.exit(unlink(file))
             if(!file.create(file)) stop("unable to create ", file)
@@ -5205,12 +5364,13 @@ function(package, dir, lib.loc = NULL)
     ## we just have a stop list here.
     common_names <- c("pkg", "pkgName", "package", "pos", "dep_name")
 
-    bad_exprs <- bad_deps <- bad_imps <- character()
+    bad_exprs <- bad_deps <- bad_imps <- bad_prac <- character()
     bad_imports <- all_imports <- imp2 <- imp2f <- imp3 <- imp3f <- character()
     uses_methods <- FALSE
     find_bad_exprs <- function(e) {
         if(is.call(e) || is.expression(e)) {
             Call <- deparse(e[[1L]])[1L]
+            if(Call %in% c("clusterEvalQ", "parallel::clusterEvalQ")) return()
             if((Call %in%
                 c("library", "require", "loadNamespace", "requireNamespace"))
                && (length(e) >= 2L)) {
@@ -5245,6 +5405,9 @@ function(package, dir, lib.loc = NULL)
                                 bad_exprs <<- c(bad_exprs, pkg)
                             if(pkg %in% depends)
                                 bad_deps <<- c(bad_deps, pkg)
+                           ## assume calls to itself are to clusterEvalQ etc
+                           else if (pkg != pkg_name)
+                               bad_prac <<- c(bad_prac, pkg)
                         }
                     }
                 }
@@ -5374,9 +5537,10 @@ function(package, dir, lib.loc = NULL)
                          error = function(e) e)
             } else NULL
             if (!inherits(value, "error")) {
-                exps <- c(ls(envir = getNamespaceInfo(p, "exports"),
+		ns <- asNamespace(p)
+                exps <- c(ls(envir = .getNamespaceInfo(ns, "exports"),
                              all.names = TRUE),
-                          ls(envir = getNamespaceInfo(p, "lazydata"),
+                          ls(envir = .getNamespaceInfo(ns, "lazydata"),
                              all.names = TRUE),
                           extras[[p]])
                 this2 <- setdiff(this, exps)
@@ -5442,7 +5606,10 @@ function(package, dir, lib.loc = NULL)
             imp3f <- imp3f[(maintainers != db["Maintainer"])]
         }
     } else imp32 <- imp3f <- imp3ff <- unknown <- character()
+    ## An unexported function only available on Windows, used in tools
+    imp3ff <- setdiff(sort(unique(imp3ff)), "utils:::unpackPkgZip")
     res <- list(others = unique(bad_exprs),
+                bad_practice = unique(bad_prac),
                 imports = unique(bad_imports),
                 imps = unique(bad_imps),
                 in_depends = unique(bad_deps),
@@ -5451,8 +5618,7 @@ function(package, dir, lib.loc = NULL)
                 imp2un = sort(unique(imp2un)),
                 imp32 = sort(unique(imp32)),
                 imp3 = imp3, imp3f = sort(unique(imp3f)),
-                imp3ff = sort(unique(imp3ff)),
-                imp3self = imp3self,
+                imp3ff = imp3ff, imp3self = imp3self,
                 imp3selfcalls = sort(unique(imp3selfcalls)),
                 imp3unknown = unknown,
                 methods_message = methods_message)
@@ -5467,6 +5633,10 @@ function(x, ...)
         identical(Sys.getenv("_R_CHECK_PACKAGES_USED_CRAN_INCOMING_NOTES_",
                              "FALSE"),
                   "TRUE")
+    ignore_unused_imports <-
+        config_val_to_logical(Sys.getenv("_R_CHECK_PACKAGES_USED_IGNORE_UNUSED_IMPORTS_",
+                                         "FALSE"))
+
     c(character(),
       if(length(xx <- x$imports)) {
           if(length(xx) > 1L) {
@@ -5504,7 +5674,19 @@ function(x, ...)
                          sQuote(xx)), msg)
           }
       },
-      if(length(xx <- x$unused_imports)) {
+      if(length(xx <- x$bad_practice)) {
+          msg <-
+              "  Please use :: or requireNamespace() instead.\n  See section 'Suggested packages' in the 'Writing R Extensions' manual."
+          if(length(xx) > 1L) {
+              c(gettext("'library' or 'require' calls in package code:"),
+                .pretty_format(sort(xx)), msg)
+          } else {
+              c(gettextf("'library' or 'require' call to %s in package code.",
+                         sQuote(xx)), msg)
+          }
+      },
+
+      if(length(xx <- x$unused_imports) && !ignore_unused_imports) {
           msg <- "  All declared Imports should be used."
           if(length(xx) > 1L) {
               c(gettext("Namespaces in Imports field not imported from:"),
@@ -5723,7 +5905,7 @@ function(package, dir, lib.loc = NULL)
     else if(!missing(dir)) {
         ## Using sources from directory @code{dir} ...
         ## FIXME: not yet supported by .createExdotR.
-        if(!file_test("-d", dir))
+        if(!dir.exists(dir))
             stop(gettextf("directory '%s' does not exist", dir), domain = NA)
         else
             dir <- file_path_as_absolute(dir)
@@ -5732,15 +5914,16 @@ function(package, dir, lib.loc = NULL)
     }
     pkg_name <- db["Package"]
 
-    file <- .createExdotR(pkg_name, dir, silent = TRUE)
+    file <- .createExdotR(pkg_name, dir, silent = TRUE,
+                          commentDonttest = FALSE)
     if (is.null(file)) return(invisible(NULL)) # e.g, no examples
     on.exit(unlink(file))
     enc <- db["Encoding"]
     if(!is.na(enc) &&
        !(Sys.getlocale("LC_CTYPE") %in% c("C", "POSIX"))) {
         ## FIXME: what if conversion fails on e.g. UTF-8 comments
-        con <- file(file, encoding=enc)
-        on.exit(close(con))
+        con <- file(file, encoding = enc)
+        on.exit(close(con), add = TRUE)
     } else con <- file
 
     .check_packages_used_helper(db, con)
@@ -5750,22 +5933,22 @@ function(package, dir, lib.loc = NULL)
 ### * .check_packages_used_in_tests
 
 .check_packages_used_in_tests <-
-function(dir, lib.loc = NULL)
+function(dir, testdir, lib.loc = NULL)
 {
     ## Argument handling.
     ## Using sources from directory @code{dir} ...
-    if(!file_test("-d", dir))
+    if(!dir.exists(dir))
         stop(gettextf("directory '%s' does not exist", dir), domain = NA)
     else
         dir <- file_path_as_absolute(dir)
     dfile <- file.path(dir, "DESCRIPTION")
     db <- .read_description(dfile)
 
-    testsrcdir <- file.path(dir, "tests")
+    testsrcdir <- file.path(dir, testdir)
     od <- setwd(testsrcdir)
     on.exit(setwd(od))
     Rinfiles <- dir(".", pattern="\\.Rin$") # only trackOjs has *.Rin
-    Rfiles <- dir(".", pattern="\\.R$")
+    Rfiles <- dir(".", pattern="\\.[rR]$")
     .check_packages_used_helper(db, c(Rinfiles, Rfiles))
 }
 
@@ -5836,15 +6019,13 @@ function(package, dir, lib.loc = NULL)
     bad_examples <- character()
 
     find_bad_closures <- function(env) {
-        objects_in_env <- objects(env, all.names = TRUE)
-        x <- lapply(objects_in_env,
-                    function(o) {
-                        v <- get(o, envir = env)
+        objects_in_env <- sort(names(env))
+        x <- lapply(as.list(env, all.names = TRUE, sorted = TRUE),
+                    function(v) {
                         if (typeof(v) == "closure")
                             codetools::findGlobals(v)
                     })
-        objects_in_env[sapply(x,
-                              function(s) any(s %in% c("T", "F")))]
+        names(x)[sapply(x, function(s) any(s %in% c("T", "F")))]
     }
 
     find_bad_examples <- function(txts) {
@@ -5862,7 +6043,7 @@ function(package, dir, lib.loc = NULL)
                         },
                                  error = function(e) character())
                     })
-        names(txts)[sapply(x, length) > 0L]
+        names(txts)[lengths(x) > 0L]
     }
 
     if(!missing(package)) {
@@ -5886,7 +6067,7 @@ function(package, dir, lib.loc = NULL)
         dir <- file_path_as_absolute(dir)
         code_dir <- file.path(dir, "R")
         if(!packageHasNamespace(basename(dir), dirname(dir))
-           && file_test("-d", code_dir)) {
+           && dir.exists(code_dir)) {
             code_env <- new.env(hash = TRUE)
             dfile <- file.path(dir, "DESCRIPTION")
             meta <- if(file_test("-f", dfile))
@@ -5912,7 +6093,7 @@ function(package, dir, lib.loc = NULL)
 .get_example_texts_from_example_dir <-
 function(dir)
 {
-    if(!file_test("-d", dir)) return(NULL)
+    if(!dir.exists(dir)) return(NULL)
     files <- list_files_with_exts(dir, "R")
     texts <- lapply(files,
                     function(f) paste(readLines(f, warn = FALSE),
@@ -5924,7 +6105,7 @@ function(dir)
 .get_example_texts_from_source_dir <-
 function(dir)
 {
-    if(!file_test("-d", file.path(dir, "man"))) return(NULL)
+    if(!dir.exists(file.path(dir, "man"))) return(NULL)
     sapply(Rd_db(dir = dir), .Rd_get_example_code)
 }
 
@@ -5946,7 +6127,7 @@ function(x, ...)
                           "Found possibly global 'T' or 'F' in the examples of the following Rd files:"
                           )
           c(strwrap(msg),
-            paste(" ", x$bad_examples))
+            paste0("  ", x$bad_examples))
       })
 }
 
@@ -5958,14 +6139,13 @@ function(package, dir, lib.loc = NULL, details = TRUE)
     bad_closures <- character()
 
     find_bad_closures <- function(env) {
-        objects_in_env <- objects(env, all.names = TRUE)
+        objects_in_env <- as.list(env, all.names = TRUE, sorted = TRUE)
         x <- lapply(objects_in_env,
-                    function(o) {
-                        v <- get(o, envir = env)
+                    function(v) {
                         if (typeof(v) == "closure")
                             codetools::findGlobals(v)
                     })
-        objects_in_env[sapply(x, function(s) any(s %in% ".Internal"))]
+        names(x)[sapply(x, function(s) any(s %in% ".Internal"))]
     }
 
     find_bad_S4methods <- function(env) {
@@ -5974,7 +6154,8 @@ function(package, dir, lib.loc = NULL, details = TRUE)
             tab <- get(methods:::.TableMetaName(f, attr(f, "package")),
                        envir = code_env)
             ## The S4 'system' does **copy** base code into packages ....
-            any(unlist(eapply(tab, function(v) !inherits(v, "derivedDefaultMethod") && any(codetools::findGlobals(v) %in% ".Internal"))))
+            any(unlist(eapply(tab, function(v) !inherits(v, "derivedDefaultMethod") &&
+                                   any(codetools::findGlobals(v) %in% ".Internal"))))
         })
         gens[unlist(x)]
     }
@@ -6013,7 +6194,7 @@ function(package, dir, lib.loc = NULL, details = TRUE)
             stop("you must specify 'package' or 'dir'")
         dir <- file_path_as_absolute(dir)
         code_dir <- file.path(dir, "R")
-        if(file_test("-d", code_dir)) {
+        if(dir.exists(code_dir)) {
             code_env <- new.env(hash = TRUE)
             dfile <- file.path(dir, "DESCRIPTION")
             meta <- if(file_test("-f", dfile))
@@ -6097,9 +6278,7 @@ function(cfile, dir = NULL)
 
     if(!is.null(dir)) {
         meta <- utils::packageDescription(basename(dir), dirname(dir))
-        db <- tryCatch(suppressMessages(utils::readCitationFile(cfile,
-                                                                meta)),
-                       error = identity)
+        db <- .read_citation_quietly(cfile, meta)
         if(inherits(db, "error")) {
             msg <- conditionMessage(db)
             call <- conditionCall(db)
@@ -6140,7 +6319,7 @@ function(cfile, dir = NULL)
         writeLines(sprintf("entry %d: invalid type %s",
                            pos, sQuote(entries)))
     }
-    pos <- which(!ind & (sapply(bad, length) > 0L))
+    pos <- which(!ind & (lengths(bad) > 0L))
     if(length(pos)) {
         writeLines(strwrap(sprintf("entry %d (%s): missing required field(s) %s",
                                    pos,
@@ -6164,19 +6343,22 @@ function(dir, silent = FALSE, def_enc = FALSE, minlevel = -1)
         if(is.na(enc)) enc <- "ASCII"
         else def_enc <- TRUE
     } else enc <- "ASCII"
+    macros <- loadPkgRdMacros(dir)
     owd <- setwd(file.path(dir, "man"))
     on.exit(setwd(owd))
     pg <- c(Sys.glob("*.Rd"), Sys.glob("*.rd"),
             Sys.glob(file.path("*", "*.Rd")),
             Sys.glob(file.path("*", "*.rd")))
+    pg <- pg[basename(dirname(pg)) != "macros"]
     ## (Note that using character classes as in '*.[Rr]d' is not
     ## guaranteed to be portable.)
     bad <- character()
     for (f in pg) {
         ## Kludge for now
-        if(basename(f) %in%  c("iconv.Rd", "showNonASCII.Rd")) def_enc <- TRUE
+        if(basename(f) %in% c("iconv.Rd", "showNonASCII.Rd")) def_enc <- TRUE
 	tmp <- tryCatch(suppressMessages(checkRd(f, encoding = enc,
-						 def_enc = def_enc)),
+						 def_enc = def_enc,
+                                                 macros = macros)),
 			error = function(e)e)
 	if(inherits(tmp, "error")) {
 	    bad <- c(bad, f)
@@ -6222,14 +6404,13 @@ function(package, dir, lib.loc = NULL, WINDOWS = FALSE)
     found <- character()
 
     find_bad_closures <- function(env) {
-        objects_in_env <- objects(env, all.names = TRUE)
+        objects_in_env <- as.list(env, all.names = TRUE, sorted = TRUE)
         x <- lapply(objects_in_env,
-                    function(o) {
-                        v <- get(o, envir = env)
+                    function(v) {
                         if (typeof(v) == "closure")
                             codetools::findGlobals(v)
                     })
-        objects_in_env[sapply(x, function(s) {
+        names(x)[sapply(x, function(s) {
             res <- any(s %in% bad)
             if(res) found <<- c(found, s)
             res
@@ -6267,6 +6448,7 @@ function(package, dir, lib.loc = NULL, WINDOWS = FALSE)
     }
 
 
+    ## FIXME: these are set but not used.
     bad_S4methods <- list()
     bad_refs <- character()
     if(!missing(package)) {
@@ -6292,7 +6474,7 @@ function(package, dir, lib.loc = NULL, WINDOWS = FALSE)
             stop("you must specify 'package' or 'dir'")
         dir <- file_path_as_absolute(dir)
         code_dir <- file.path(dir, "R")
-        if(file_test("-d", code_dir)) {
+        if(dir.exists(code_dir)) {
             code_env <- new.env(hash = TRUE)
             dfile <- file.path(dir, "DESCRIPTION")
             meta <- if(file_test("-f", dfile))
@@ -6368,30 +6550,43 @@ function(x, ...)
 
 ### * .check_package_CRAN_incoming
 
+## localOnly means to skip tests requiring Internet access.
+## These are all done first.
+
 .check_package_CRAN_incoming <-
-function(dir)
+function(dir, localOnly = FALSE)
 {
     out <- list()
     class(out) <- "check_package_CRAN_incoming"
 
     meta <- .get_package_metadata(dir, FALSE)
-    info <- analyze_license(meta["License"])
+    lic_info <- analyze_license(meta["License"])
     ## Use later to indicate changes from FOSS to non-FOSS licence.
-    foss <- info$is_verified
+    foss <- lic_info$is_verified
     ## Record to notify about components extending a base license which
     ## permits extensions.
-    if(length(extensions <- info$extensions) &&
+    if(length(extensions <- lic_info$extensions) &&
+       ((length(components <- extensions$components) != 1L) ||
+        (.license_component_is_for_stub_and_ok(components,
+                                               dir) != 0L)) &&
        any(ind <- extensions$extensible)) {
         out$extensions <- extensions$components[ind]
         out$pointers <-
             Filter(length,
-                   lapply(info$pointers,
+                   lapply(lic_info$pointers,
                           function(p) {
                               fp <- file.path(dir, p)
                               if(file_test("-f", fp)) {
+                                  lines <- readLines(fp, warn = FALSE)
                                   ## Should this use the package
                                   ## encoding?
-                                  c(p, readLines(fp, warn = FALSE))
+                                  ## (no, as we have LICENSE files with
+                                  ## copyright signs in ASCII packages)
+                                  pos <- grep("[^[:blank:]]", lines,
+                                              useBytes = TRUE)
+                                  c(p, if(len <- length(pos)) {
+                                      lines[seq(from = pos[1L], to = pos[len])]
+                                  })
                               } else NULL
                           }))
     }
@@ -6407,19 +6602,50 @@ function(dir)
     out$Maintainer_needs_quotes <-
         grepl("[,]", display, useBytes = TRUE) && !grepl('^".*"$', display, useBytes = TRUE)
     out$empty_Maintainer_name <- !nzchar(display)
+    ## Try to catch bad maintainer fields which give more than one
+    ## person.  In principle, the field should be of the form
+    ##   DISPLAY-NAME <ANGLE-ADDR>
+    ## with the former (for simplicity) either a single quoted string,
+    ## or several atoms.  (There are cases where <ANGLE-ADDR> does not
+    ## follow whitespace, so simple tokenizing via scan() does not quite
+    ## work.)
+    check_maintainer_address <- function(s) {
+        re <- paste0("^",
+                     "[[:space:]]*",
+                     "([^<]*|\"([^\"]|\\\\\")*\")", # display-name
+                     "[[:space:]]*",
+                     "(<[^>]+>)",           # angle-addr
+                     "[[:space:]]*",
+                     "(.*)",                # rest?
+                     "[[:space:]]*",
+                     "$")
+        s <- unlist(regmatches(s, regexec(re, s)))
+        length(s) && (s[5L] == "") ## && (s[2L] != "")
+        ## (Adding the test for s[2L] would check for non-empty
+        ## display-name which we already do separately.)
+    }
+    ## NOTE: perhaps whitespace should be canonicalized further above?
+    maintainer <- gsub("\n", " ", meta["Maintainer"])
+    out$Maintainer_invalid_or_multi_person <-
+        ((maintainer != "ORPHANED") &&
+         !check_maintainer_address(maintainer))
 
     ver <- meta["Version"]
     if(is.na(ver))
         stop("Package has no 'Version' field", call. = FALSE)
     if(grepl("(^|[.-])0[0-9]+", ver))
         out$version_with_leading_zeroes <- ver
+    if(any(unlist(package_version(ver)) >= 1234))
+        out$version_with_large_components <- ver
 
     language <- meta["Language"]
     if((is.na(language) || language == "en") &&
        config_val_to_logical(Sys.getenv("_R_CHECK_CRAN_INCOMING_USE_ASPELL_",
-                                        FALSE))) {
-        ignore <- c("[ \t]'[^']*'[ \t[:punct:]]",
-                    "[ \t][[:alnum:]_.]*\\(\\)[ \t[:punct:]]")
+                                        "FALSE"))) {
+        ignore <-
+            list(c("(?<=[ \t[:punct:]])'[^']*'(?=[ \t[:punct:]])",
+                   "(?<=[ \t[:punct:]])([[:alnum:]]+::)?[[:alnum:]_.]*\\(\\)(?=[ \t[:punct:]])"),
+                 perl = TRUE)
         a <- utils:::aspell_package_description(dir,
                                                 ignore = ignore,
                                                 control =
@@ -6431,21 +6657,337 @@ function(dir)
             out$spelling <- a
     }
 
-    urls <- .get_standard_repository_URLs()
+    parse_description_field <- function(desc, field, default=TRUE)
+        str_parse_logic(desc[field], default=default)
+
+    ## Check for possibly mis-spelled field names.
+    nms <- names(meta)
+    stdNms <- .get_standard_DESCRIPTION_fields()
+    nms <- nms[is.na(match(nms, stdNms)) &
+               !grepl("^(X-CRAN|Repository/R-Forge|VCS/|Config/)", nms)]
+    if(length(nms) && ## Allow maintainer notes  <stdName>Note :
+       length(nms <- nms[is.na(match(nms, paste0(stdNms,"Note")))]))
+        out$fields <- nms
+
+
+    uses <- character()
+    BUGS <- character()
+    for (field in c("Depends", "Imports", "Suggests")) {
+        p <- strsplit(meta[field], " *, *")[[1L]]
+        p2 <- grep("^(multicore|snow|igraph0|doSNOW)( |\\(|$)", p, value = TRUE)
+        uses <- c(uses, p2)
+        p2 <- grep("^(BRugs|R2OpenBUGS|R2WinBUGS)( |\\(|$)", p, value = TRUE)
+        BUGS <- c(BUGS, p2)
+    }
+    if (length(uses)) out$uses <- sort(unique(uses))
+    if (length(BUGS)) out$BUGS <- sort(unique(BUGS))
+
+    ## Check for non-Sweave vignettes (as indicated by the presence of a
+    ## 'VignetteBuilder' field in DESCRIPTION) without
+    ## 'build/vignette.rds'.
+
+    vds <- character()
+    if(!is.na(meta["VignetteBuilder"])) {
+        if(!file.exists(vds <- file.path(dir, "build", "vignette.rds")))
+            out$missing_vignette_index <- TRUE
+        else
+            vds <- readRDS(vds)[, "File"]
+    }
+
+    ## Check for missing build/{partial.rdb,pkgname.pdf}
+    ## copy code from build.R
+    Rdb <- .build_Rd_db(dir, stages = NULL,
+                        os = c("unix", "windows"), step = 1)
+    if(length(Rdb)) {
+        names(Rdb) <-
+            substring(names(Rdb), nchar(file.path(dir, "man")) + 2L)
+        containsBuildSexprs <-
+            any(sapply(Rdb, function(Rd) any(getDynamicFlags(Rd)["build"])))
+        if(containsBuildSexprs &&
+           !file.exists(file.path(dir, "build", "partial.rdb")))
+            out$missing_manual_rdb <- TRUE
+        needRefMan <-
+            any(sapply(Rdb, function(Rd) any(getDynamicFlags(Rd)[c("install", "render")])))
+        if(needRefMan &&
+           !file.exists(file.path(dir, "build",
+                                  paste0( meta[["Package"]], ".pdf"))))
+            out$missing_manual_pdf <- TRUE
+    }
+
+
+    ## Check for vignette source (only) in old-style 'inst/doc' rather
+    ## than 'vignettes'.
+    vign_dir <- file.path(dir, "vignettes")
+    if(length(vds)) {
+        sources <- setdiff(list.files(file.path(dir, "inst", "doc")),
+                           list.files(vign_dir))
+        sources <- intersect(vds, sources)
+    } else {
+        pattern <- vignetteEngine("Sweave")$pattern
+        sources <- setdiff(list.files(file.path(dir, "inst", "doc"),
+                                      pattern = pattern),
+                           list.files(vign_dir, pattern = pattern))
+    }
+
+    if(length(sources)) {
+        out$have_vignettes_dir <- dir.exists(vign_dir)
+        out$vignette_sources_only_in_inst_doc <- sources
+    }
+
+    ## Check for Java files without sources (in the right place)
+    ## NB: this is only a basic check: that directory need
+    ## not contain all (or any) of the sources.
+    ## We might in due course want to prompt looking into it.
+    if (foss && !dir.exists(file.path(dir, "java"))) {
+        allfiles <- list.files(file.path(dir, "inst"),
+                               full.names = TRUE, recursive = TRUE)
+        allfiles <- c(allfiles,  # misused by ndtv, sisus
+                      list.files(file.path(dir, "exec"), full.names = TRUE))
+        javafiles <- grep(".*[.](class|jar)$", allfiles, value = TRUE)
+        if(length(javafiles)) out$javafiles <- javafiles
+    }
 
-    parse_description_field <- function(desc, field, default = TRUE)
+    ## Check for installing Java source files
     {
-        tmp <- desc[field]
-        if (is.na(tmp)) default
-        else switch(tmp,
-                    "yes"=, "Yes" =, "true" =, "True" =, "TRUE" = TRUE,
-                    "no" =, "No" =, "false" =, "False" =, "FALSE" = FALSE,
-                    default)
+        dotjava <- list.files(file.path(dir, "inst"), pattern = ".*[.]java$",
+                              full.names = TRUE, recursive = TRUE)
+        dotjava <- c(dotjava,  # misused by ndtv
+                     list.files(file.path(dir, "exec"), pattern = ".*[.]java$",
+                                full.names = TRUE))
+        if(length(dotjava)) out$dotjava <- dotjava
     }
 
+    ## Check CITATION file for CRAN needs.
+    .check_citation_for_CRAN <- function(cfile, meta) {
+        ## For publishing on CRAN, we need to be able to correctly
+        ## process package CITATION files without having the package
+        ## installed (actually, using only the base and recommended
+        ## packages), which we cannot perfectly emulate when checking.
+        ## The best we can easily do is reduce the library search path
+        ## to the system and site library.  If the package is not
+        ## installed there, check directly; otherwise, check for
+        ## offending calls likely to cause trouble.
+        ## Note however that in most cases, the issue is calling
+        ## packageDescription() to get the package metadata, instead of
+        ## using 'meta' as passed to readCitationFile() since R 2.8.0.
+        ## Unfortunately, when the package is not installed,
+        ## packageDescription() only warns and returns NA, or a vector
+        ## of NAs if called with specific fields.  Subscripting the
+        ## return value using $ will fail (as this needs lists);
+        ## subscripting by other means, or using specific fields,
+        ## incorrectly results in NAs.
+        ## The warnings are currently not caught by the direct check.
+        ## (We could need a suitably package-not-found condition for
+        ## reliable analysis: the condition messages are locale
+        ## specific.)
+        libpaths <- .libPaths()
+        .libPaths(character())
+        on.exit(.libPaths(libpaths))
+        out <- list()
+        if(nzchar(system.file(package = meta["Package"]))) {
+            ## Ignore pre-2.8.0 compatibility calls to
+            ## packageDescription() inside
+            ##   if(!exists("meta") || is.null(meta))
+            ccalls <- .parse_code_file(cfile, meta["Encoding"])
+            ind <- vapply(ccalls,
+                          function(e) {
+                              is.call(e) &&
+                              (length(e) == 3L) &&
+                              identical(deparse(e[[1L]]), "if") &&
+                              identical(deparse(e[[2L]]),
+                                        "!exists(\"meta\") || is.null(meta)")
+                          },
+                          NA)
+            if(any(ind))
+                ccalls <- ccalls[!ind]
+            ccalls <- .find_calls(ccalls, recursive = TRUE)
+            cnames <-
+                intersect(unique(.call_names(ccalls)),
+                          c("packageDescription", "library", "require"))
+            if(length(cnames))
+                out$citation_calls <- cnames
+        } else {
+            cinfo <-
+                .eval_with_capture(tryCatch(utils::readCitationFile(cfile,
+                                                                    meta),
+                                            error = identity))$value
+            if(inherits(cinfo, "error"))
+                out$citation_error <- conditionMessage(cinfo)
+        }
+        out
+    }
+    if(file.exists(cfile <- file.path(dir, "inst", "CITATION"))) {
+        cinfo <- .check_citation_for_CRAN(cfile, meta)
+        if(length(cinfo))
+            out[names(cinfo)] <- cinfo
+        ## Simply
+        ##   out <- c(out, cinfo)
+        ## strips the class attribute from out ...
+    }
+
+    ## Check Authors at R.
+    if(!is.na(aar <- meta["Authors at R"]) &&
+       ## DESCRIPTION is fully checked later on, so be careful.
+       !inherits(aar <- tryCatch(parse(text = aar), error = identity),
+                 "error")) {
+        bad <- ((length(aar) != 1L) || !is.call(aar <- aar[[1L]]))
+        if(!bad) {
+            cname <- as.character(aar[[1L]])
+            bad <-
+                ((cname != "person") &&
+                 ((cname != "c") ||
+                  !all(vapply(aar[-1L],
+                              function(e) {
+                                  (is.call(e) &&
+                                       (as.character(e[[1L]]) == "person"))
+                              },
+                              FALSE))))
+        }
+        if(bad)
+            out$authors_at_R_calls <- aar
+    }
+
+    ## Check Title field.
+    title <- trimws(as.vector(meta["Title"]))
+    title <- gsub("[\n\t]", " ", title)
+    package <- meta["Package"]
+    if (tolower(title) == tolower(package)) {
+        out$title_is_name <- TRUE
+    } else {
+        if(grepl(paste0("^",
+                        gsub(".", "[.]", package, fixed = TRUE),
+                        "[ :]"), title, ignore.case = TRUE))
+            out$title_includes_name <- TRUE
+        language <- meta["Language"]
+        if(is.na(language) || (language == "en")) {
+            title2 <- toTitleCase(title)
+            ## Keep single quoted elements unchanged.
+            p <- "(^|(?<=[ \t[:punct:]]))'[^']*'($|(?=[ \t[:punct:]]))"
+            m <- gregexpr(p, title, perl = TRUE)
+            regmatches(title2, m) <- regmatches(title, m)
+            if(title != title2)
+                out$title_case <- c(title, title2)
+        }
+    }
+
+    ## Check Description field.
+    descr <- trimws(as.vector(meta["Description"]))
+    descr <- gsub("[\n\t]", " ", descr)
+    package <- meta["Package"]
+    if(grepl(paste0("^['\"]?", package), ignore.case = TRUE, descr))
+        out$descr_bad_start <- TRUE
+    if(grepl("^(The|This|A|In this|In the) package", descr))
+        out$descr_bad_start <- TRUE
+    if(!isTRUE(out$descr_bad_start) && !grepl("^['\"]?[[:upper:]]", descr))
+       out$descr_bad_initial <- TRUE
+
+    skip_dates <-
+        config_val_to_logical(Sys.getenv("_R_CHECK_CRAN_INCOMING_SKIP_DATES_",
+                                         "FALSE"))
+
+    ## Check Date
+    date <- trimws(as.vector(meta["Date"]))
+    if(!is.na(date)) {
+        dd <- strptime(date, "%Y-%m-%d", tz = "GMT")
+        if (is.na(dd)) out$bad_date <- TRUE
+        else if(!skip_dates && (as.Date(dd) < Sys.Date() - 31))
+            out$old_date <- TRUE
+    }
+
+    ## Check build time stamp
+    ptime <- trimws(as.vector(meta["Packaged"]))
+    if(is.na(ptime)) {
+        out$build_time_stamp_msg <-
+            "The build time stamp is missing."
+    } else {
+        ts <- strptime(ptime, "%Y-%m-%d", tz = "GMT")
+        if(is.na(ts)) {
+            out$build_time_stamp_msg <-
+                "The build time stamp has invalid/outdated format."
+        }
+        else if(!skip_dates && (as.Date(ts) < Sys.Date() - 31)) {
+            out$build_time_stamp_msg <-
+                "This build time stamp is over a month old."
+        }
+    }
+
+    ## Are there non-ASCII characters in the R source code without a
+    ## package encoding in DESCRIPTION?
+    ## Note that checking always runs .check_package_ASCII_code() which
+    ## however ignores comments.  Ideally, the checks would be merged,
+    ## with the comment checking suitably conditionalized.
+    ## Note also that this does not catch the cases where non-ASCII
+    ## content in R source code cannot be re-encoded using a given
+    ## package encoding.  Ideally, this would be checked for as well.
+    if(is.na(meta["Encoding"]) &&
+       dir.exists(code_dir <- file.path(dir, "R"))) {
+        ## A variation on showNonASCII():
+        find_non_ASCII_lines <- function(f) {
+            x <- readLines(f, warn = FALSE)
+            asc <- iconv(x, "latin1", "ASCII")
+            ind <- is.na(asc) | asc != x
+            if(any(ind)) {
+                paste0(which(ind),
+                       ": ",
+                       iconv(x[ind], "latin1", "ASCII", sub = "byte"))
+            } else character()
+        }
+        OS_subdirs <- c("unix", "windows")
+        code_files <- list_files_with_type(file.path(dir, "R"),
+                                           "code",
+                                           OS_subdirs = OS_subdirs)
+        lines <- lapply(code_files, find_non_ASCII_lines)
+        names(lines) <- .file_path_relative_to_dir(code_files, dir)
+        lines <- Filter(length, lines)
+        if(length(lines))
+            out$R_files_non_ASCII <- lines
+    }
+
+    size <- Sys.getenv("_R_CHECK_SIZE_OF_TARBALL_",
+                       unset = NA_character_)
+    if(!is.na(size) && (as.integer(size) > 5000000))
+        out$size_of_tarball <- size
+
+    ## Check URLs.
+    if(!capabilities("libcurl") && !localOnly)
+        out$no_url_checks <- TRUE
+    else {
+        bad <- tryCatch(check_url_db(url_db_from_package_sources(dir),
+                                     remote = !localOnly),
+                        error = identity)
+        if(inherits(bad, "error")) {
+            out$bad_urls <- bad
+        } else if(NROW(bad)) {
+            ## When checking a new submission, take the canonical CRAN
+            ## package URL as ok, and signal variants using http instead
+            ## of https as non-canonical instead of showing "not found".
+            prefix <- "https://cran.r-project.org/package="
+            ncp <- nchar(prefix)
+            ind <- ((substring(tolower(bad$URL), 1L, ncp) == prefix) &
+                    (substring(bad$URL, ncp + 1L) == package))
+            if(any(ind))
+                bad <- bad[!ind, ]
+            prefix <- "http://cran.r-project.org/package="
+            ncp <- nchar(prefix)
+            ind <- ((substring(tolower(bad$URL), 1L, ncp) == prefix) &
+                    (substring(bad$URL, ncp + 1L) == package))
+            if(any(ind))
+                bad[ind, c("Status", "Message")] <- ""
+            if(NROW(bad))
+                out$bad_urls <- bad
+        }
+    }
+
+    ## Checks from here down require Internet access, so drop out now if we
+    ## don't want that.
+    if (localOnly)
+        return(out)
+
+    urls <- .get_standard_repository_URLs()
+
     ## If a package has a FOSS license, check whether any of its strong
     ## recursive dependencies restricts use.
-    if(foss) {
+    if(!localOnly && foss) {
         available <-
             utils::available.packages(utils::contrib.url(urls, "source"),
                                       filters =
@@ -6479,15 +7021,6 @@ function(dir)
         if (!bv) out$foss_with_BuildVignettes <- TRUE
     }
 
-    ## Check for possibly mis-spelled field names.
-    nms <- names(meta)
-    stdNms <- .get_standard_DESCRIPTION_fields()
-    nms <- nms[is.na(match(nms, stdNms)) &
-               !grepl("^(X-CRAN|Repository/R-Forge)", nms)]
-    if(length(nms) && ## Allow maintainer notes  <stdName>Note :
-       length(nms <- nms[is.na(match(nms, paste0(stdNms,"Note")))]))
-        out$fields <- nms
-
     ## We do not want to use utils::available.packages() for now, as
     ## this unconditionally filters according to R version and OS type.
     ## <FIXME>
@@ -6520,17 +7053,18 @@ function(dir)
     ## For now (2012-11-28), PACKAGES.in is all ASCII, so there is no
     ## need to re-encode.  Eventually, it might be in UTF-8 ...
     entry <- odb[odb[, "Package"] == meta["Package"], ]
-    entry <- entry[!is.na(entry) & (names(entry) != "Package")]
+    entry <- entry[!is.na(entry) &
+                   !(names(entry) %in% c("Package", "X-CRAN-History"))]
     if(length(entry)) {
         ## Check for conflicts between package license implications and
         ## repository overrides.  Note that the license info predicates
         ## are logicals (TRUE, NA or FALSE) and the repository overrides
         ## are character ("yes", missing or "no").
-        if(!is.na(iif <- info$is_FOSS) &&
+        if(!is.na(iif <- lic_info$is_FOSS) &&
            !is.na(lif <- entry["License_is_FOSS"]) &&
            ((lif == "yes") != iif))
             out$conflict_in_license_is_FOSS <- lif
-        if(!is.na(iru <- info$restricts_use) &&
+        if(!is.na(iru <- lic_info$restricts_use) &&
            !is.na(lru <- entry["License_restricts_use"]) &&
            ((lru == "yes") != iru))
             out$conflict_in_license_restricts_use <- lru
@@ -6558,13 +7092,8 @@ function(dir)
         }
     }
 
-    ## For now, information about the CRAN package archive is provided
-    ## in CRAN's src/contrib/Meta/archive.rds.
-    con <- gzcon(url(sprintf("%s/src/contrib/Meta/archive.rds", CRAN),
-                     "rb"))
-    CRAN_archive_db <- readRDS(con)
-    close(con)
-    packages_in_CRAN_archive <- names(CRAN_archive_db)
+    archive_db <- CRAN_archive_db()
+    packages_in_CRAN_archive <- names(archive_db)
 
     ## Package names must be unique within standard repositories when
     ## ignoring case.
@@ -6600,9 +7129,21 @@ function(dir)
     if(length(repositories))
         out$repositories <- repositories
 
+    ## Does this have strong dependencies not in mainstream
+    ## repositories?  This should not happen, and hence is not compared
+    ## against possibly given additional repositories.
+    strong_dependencies <-
+        setdiff(unique(c(.extract_dependency_package_names(meta["Depends"]),
+                         .extract_dependency_package_names(meta["Imports"]),
+                         .extract_dependency_package_names(meta["LinkingTo"]))),
+                c(.get_standard_package_names()$base, db[, "Package"]))
+    if(length(strong_dependencies)) {
+        out$strong_dependencies_not_in_mainstream_repositories <-
+            strong_dependencies
+    }
+
     ## Does this have Suggests or Enhances not in mainstream
     ## repositories?
-
     suggests_or_enhances <-
         setdiff(unique(c(.extract_dependency_package_names(meta["Suggests"]),
                          .extract_dependency_package_names(meta["Enhances"]))),
@@ -6610,141 +7151,77 @@ function(dir)
     if(length(suggests_or_enhances)) {
         out$suggests_or_enhances_not_in_mainstream_repositories <-
             suggests_or_enhances
-        if(!is.na(aurls <- meta["Additional_repositories"])) {
-            aurls <- unique(unlist(strsplit(aurls, ", *")))
-            adb <-
-                tryCatch(utils::available.packages(utils::contrib.url(aurls,
-                                                                      "source"),
-                                                   filters =
-                                                   c("R_version",
-                                                     "duplicates")))
-            if(inherits(adb, "error")) {
-                out$additional_repositories_analysis_failed_with <-
-                    conditionMessage(adb)
-            } else {
-                pos <- match(suggests_or_enhances, rownames(adb), nomatch =
-                             0L)
-                ind <- (pos > 0L)
-                tab <- matrix(character(), nrow = 0L, ncol = 3L)
-                if(any(ind))
-                    tab <- rbind(tab,
-                                 cbind(suggests_or_enhances[ind],
-                                       "yes",
-                                       adb[pos[ind], "Repository"]))
-                ind <- !ind
-                if(any(ind))
-                    tab <- rbind(tab,
-                                 cbind(suggests_or_enhances[ind],
-                                       "no",
-                                       ""))
-                ## Map Repository fields to URLs, and determine unused
-                ## URLs.
-                ## Note that available.packages() possibly adds Path
-                ## information in the Repository field, so matching
-                ## given contrib URLs to these fields is not trivial.
-                unused <- character()
-                for(u in aurls) {
-                    cu <- utils::contrib.url(u, "source")
-                    ind <- substring(tab[, 3L], 1, nchar(cu)) == cu
-                    if(any(ind)) {
-                        tab[ind, 3L] <- u
-                    } else {
-                        unused <- c(unused, u)
-                    }
+    }
+    if(!is.na(aurls <- meta["Additional_repositories"])) {
+        aurls <- .read_additional_repositories_field(aurls)
+        ## Get available packages separately for each given URL, so that
+        ## we can spot the ones which do not provide any packages.
+        adb <-
+            tryCatch(lapply(aurls,
+                            function(u) {
+                                utils::available.packages(utils::contrib.url(u,
+                                                                             "source"),
+                                                          filters =
+                                                              c("R_version",
+                                                                "duplicates"))
+                            }),
+                     error = identity)
+        if(inherits(adb, "error")) {
+            out$additional_repositories_analysis_failed_with <-
+                conditionMessage(adb)
+        } else {
+            ## Check for additional repositories with no packages.
+            ind <- sapply(adb, NROW) == 0L
+            if(any(ind))
+                out$additional_repositories_with_no_packages <-
+                    aurls[ind]
+            ## Merge available packages dbs and remove duplicates.
+            adb <- do.call(rbind, adb)
+            adb <- utils:::available_packages_filters_db$duplicates(adb)
+            ## Ready.
+            dependencies <- unique(c(strong_dependencies, suggests_or_enhances))
+            pos <- match(dependencies, rownames(adb), nomatch = 0L)
+            ind <- (pos > 0L)
+            tab <- matrix(character(), nrow = 0L, ncol = 3L)
+            if(any(ind))
+                tab <- rbind(tab,
+                             cbind(dependencies[ind],
+                                   "yes",
+                                   adb[pos[ind], "Repository"]))
+            ind <- !ind
+            if(any(ind))
+                tab <- rbind(tab,
+                             cbind(dependencies[ind],
+                                   "no",
+                                   "?"))
+            ## Map Repository fields to URLs, and determine unused
+            ## URLs.
+            ## Note that available.packages() possibly adds Path
+            ## information in the Repository field, so matching
+            ## given contrib URLs to these fields is not trivial.
+            unused <- character()
+            for(u in aurls) {
+                cu <- utils::contrib.url(u, "source")
+                ind <- substring(tab[, 3L], 1, nchar(cu)) == cu
+                if(any(ind)) {
+                    tab[ind, 3L] <- u
+                } else {
+                    unused <- c(unused, u)
                 }
-                if(length(unused))
-                    tab <- rbind(tab, cbind("", "", unused))
-                dimnames(tab) <- NULL
-                out$additional_repositories_analysis_results <- tab
             }
+            if(length(unused))
+                tab <- rbind(tab, cbind("?", "?", unused))
+            dimnames(tab) <- NULL
+            out$additional_repositories_analysis_results <- tab
         }
     }
 
-    uses <- character()
-    BUGS <- character()
-    for (field in c("Depends", "Imports", "Suggests")) {
-        p <- strsplit(meta[field], " *, *")[[1L]]
-        p2 <- grep("^(multicore|snow|igraph0|doSNOW)( |\\(|$)", p, value = TRUE)
-        uses <- c(uses, p2)
-        p2 <- grep("^(BRugs|R2OpenBUGS|R2WinBUGS)( |\\(|$)", p, value = TRUE)
-        BUGS <- c(BUGS, p2)
-    }
-    if (length(uses)) out$uses <- sort(unique(uses))
-    if (length(BUGS)) out$BUGS <- sort(unique(BUGS))
-
-    ## Check for non-Sweave vignettes (as indicated by the presence of a
-    ## 'VignetteBuilder' field in DESCRIPTION) without
-    ## 'build/vignette.rds'.
-
-    vds <- character()
-    if(!is.na(meta["VignetteBuilder"])) {
-        if(!file.exists(vds <- file.path(dir, "build", "vignette.rds")))
-            out$missing_vignette_index <- TRUE
-        else
-            vds <- readRDS(vds)[, "File"]
-    }
-
-    ## Check for missing build/{partial.rdb,pkgname.pdf}
-    ## copy code from build.R
-    Rdb <- .build_Rd_db(dir, stages = NULL,
-                        os = c("unix", "windows"), step = 1)
-    if(length(Rdb)) {
-        names(Rdb) <-
-            substring(names(Rdb), nchar(file.path(dir, "man")) + 2L)
-        containsBuildSexprs <-
-            any(sapply(Rdb, function(Rd) any(getDynamicFlags(Rd)["build"])))
-        if(containsBuildSexprs &&
-           !file.exists(file.path(dir, "build", "partial.rdb")))
-            out$missing_manual_rdb <- TRUE
-        needRefMan <-
-            any(sapply(Rdb, function(Rd) any(getDynamicFlags(Rd)[c("install", "render")])))
-        if(needRefMan &&
-           !file.exists(file.path(dir, "build",
-                                  paste0( meta[["Package"]], ".pdf"))))
-            out$missing_manual_pdf <- TRUE
-    }
-
-
-    ## Check for vignette source (only) in old-style 'inst/doc' rather
-    ## than 'vignettes'.
-    vign_dir <- file.path(dir, "vignettes")
-    if(length(vds)) {
-        sources <- setdiff(list.files(file.path(dir, "inst", "doc")),
-                           list.files(vign_dir))
-        sources <- intersect(vds, sources)
-    } else {
-        pattern <- vignetteEngine("Sweave")$pattern
-        sources <- setdiff(list.files(file.path(dir, "inst", "doc"),
-                                      pattern = pattern),
-                           list.files(vign_dir, pattern = pattern))
-    }
-
-    if(length(sources)) {
-        out$have_vignettes_dir <- file_test("-d", vign_dir)
-        out$vignette_sources_only_in_inst_doc <- sources
-    }
-
-    ## Check for Java files without sources (in the right place)
-    ## NB: this is only a basic check: that directory need
-    ## not contain all (or any) of the sources.
-    ## We might in due course want to prompt looking into it.
-    if (foss && !dir.exists(file.path(dir, "java"))) {
-        allfiles <- list.files(file.path(dir, "inst"),
-                               full.names = TRUE, recursive = TRUE)
-        allfiles <- c(allfiles,  # misused by ndtv, sisus
-                      list.files(file.path(dir, "exec"), full.names = TRUE))
-        javafiles <- grep(".*[.](class|jar)$", allfiles, value = TRUE)
-        if(length(javafiles)) out$javafiles <- javafiles
-    }
-
-    ## Check for installing Java source files
-    {
-        dotjava <- list.files(file.path(dir, "inst"), pattern = ".*[.]java$",
-                              full.names = TRUE, recursive = TRUE)
-        dotjava <- c(dotjava,  # misused by ndtv
-                     list.files(file.path(dir, "exec"), pattern = ".*[.]java$",
-                                full.names = TRUE))
-        if(length(dotjava)) out$dotjava <- dotjava
+    ## Check DOIs.
+    if(capabilities("libcurl")) {
+        bad <- tryCatch(check_doi_db(doi_db_from_package_sources(dir)),
+                        error = identity)
+        if(inherits(bad, "error") || NROW(bad))
+            out$bad_dois <- bad
     }
 
     ## Is this an update for a package already on CRAN?
@@ -6758,7 +7235,7 @@ function(dir)
             out$CRAN_archive <- TRUE
             v_m <- package_version(meta["Version"])
             v_a <- sub("^.*_(.*)\\.tar.gz$", "\\1",
-                       basename(rownames(CRAN_archive_db[[package]])))
+                       basename(rownames(archive_db[[package]])))
             v_a <- max(package_version(v_a, strict = FALSE),
                        na.rm = TRUE)
             if(v_m <= v_a)
@@ -6779,22 +7256,19 @@ function(dir)
     v_d <- max(package_version(db[, "Version"]))
     if((v_m <= v_d) &&
        !config_val_to_logical(Sys.getenv("_R_CHECK_CRAN_INCOMING_SKIP_VERSIONS_",
-                                         FALSE)))
+                                         "FALSE")))
         out$bad_version <- list(v_m, v_d)
     if((v_m$major == v_d$major) & (v_m$minor >= v_d$minor + 10))
         out$version_with_jump_in_minor <- list(v_m, v_d)
 
     ## Check submission recency and frequency.
-    con <- gzcon(url(sprintf("%s/src/contrib/Meta/current.rds", CRAN),
-                     "rb"))
-    CRAN_current_db <- readRDS(con)
-    close(con)
-    mtimes <- c(CRAN_current_db[match(package,
+    current_db <- CRAN_current_db()
+    mtimes <- c(current_db[match(package,
                                       sub("_.*", "",
-                                          rownames(CRAN_current_db)),
+                                          rownames(current_db)),
                                       nomatch = 0L),
                                 "mtime"],
-                CRAN_archive_db[[package]]$mtime)
+                archive_db[[package]]$mtime)
     if(length(mtimes)) {
         deltas <- Sys.Date() - as.Date(sort(mtimes, decreasing = TRUE))
         ## Number of days since last update.
@@ -6810,9 +7284,7 @@ function(dir)
     ## Watch out for maintainer changes.
     ## Note that we cannot get the maintainer info from the PACKAGES
     ## files.
-    con <- gzcon(url(sprintf("%s/web/packages/packages.rds", CRAN), "rb"))
-    db <- tryCatch(readRDS(con), error = identity)
-    close(con)
+    db <- tryCatch(CRAN_package_db(), error = identity)
     if(inherits(db, "error")) return(out)
 
     m_m <- as.vector(meta["Maintainer"]) # drop name
@@ -6837,14 +7309,25 @@ function(dir)
 format.check_package_CRAN_incoming <-
 function(x, ...)
 {
+    fmt <- function(x) {
+        if(length(x)) paste(x, collapse = "\n") else character()
+    }
+
     c(character(),
       if(length(x$Maintainer))
-          sprintf("Maintainer: %s", sQuote(paste(x$Maintainer, collapse = " ")))
-      else "No maintainer field in DESCRIPTION file",
-      if(x$empty_Maintainer_name)
-          'The maintainer field lacks a name',
-      if(x$Maintainer_needs_quotes)
-          'The display-name part of the maintainer field should be enclosed in ""',
+          sprintf("Maintainer: %s",
+                  sQuote(trimws(gsub("\n", " ",
+                                     paste(x$Maintainer,
+                                           collapse = " ")))))
+      else
+          "No maintainer field in DESCRIPTION file",
+      fmt(c(if(x$Maintainer_invalid_or_multi_person)
+                "The maintainer field is invalid or specifies more than one person",
+            if(x$empty_Maintainer_name)
+                'The maintainer field lacks a name',
+            if(x$Maintainer_needs_quotes)
+                'The display-name part of the maintainer field should be enclosed in ""')
+          ),
       if(length(x$new_submission))
           "New submission",
       if(length(y <- x$bad_package))
@@ -6854,142 +7337,286 @@ function(x, ...)
           sprintf("Package duplicated from %s", y),
       if(length(y <- x$CRAN_archive))
           "Package was archived on CRAN",
-      if(length(y <- x$bad_version))
-          sprintf("Insufficient package version (submitted: %s, existing: %s)",
-                  y[[1L]], y[[2L]]),
-      if(length(y <- x$version_with_leading_zeroes))
-          sprintf("Version contains leading zeroes (%s)", y),
-      if(length(y <- x$version_with_jump_in_minor))
-          sprintf("Version jumps in minor (submitted: %s, existing: %s)",
-                  y[[1L]], y[[2L]]),
-      if(length(y <- x$recency))
-          sprintf("Days since last update: %d", y),
-      if(length(y <- x$frequency))
-          sprintf("Number of updates in past 6 months: %d", y),
+      fmt(c(if(length(y <- x$bad_version))
+                sprintf("Insufficient package version (submitted: %s, existing: %s)",
+                        y[[1L]], y[[2L]]),
+            if(length(y <- x$version_with_leading_zeroes))
+                sprintf("Version contains leading zeroes (%s)", y),
+            if(length(y <- x$version_with_large_components))
+                sprintf("Version contains large components (%s)", y),
+            if(length(y <- x$version_with_jump_in_minor))
+                sprintf("Version jumps in minor (submitted: %s, existing: %s)",
+                        y[[1L]], y[[2L]]))),
+      fmt(c(if(length(y <- x$recency))
+                sprintf("Days since last update: %d", y),
+            if(length(y <- x$frequency))
+                sprintf("Number of updates in past 6 months: %d", y))),
       if(length(y <- x$new_maintainer))
-          c("New maintainer:",
-            strwrap(y[[1L]], indent = 2L, exdent = 4L),
-            "Old maintainer(s):",
-            strwrap(y[[2L]], indent = 2L, exdent = 4L)),
-      if(length(y <- x$bad_license))
-          sprintf("Non-FOSS package license (%s)", y),
-      if(length(y <- x$new_license))
-          c("Change to non-FOSS package license.",
-            "New license:",
-            strwrap(y[[1L]], indent = 2L, exdent = 4L),
-            "Old license:",
-            strwrap(y[[2L]], indent = 2L, exdent = 4L)),
-      if(length(y <- x$extensions)) {
-          c("Components with restrictions and base license permitting such:",
-            paste(" ", y),
-            unlist(lapply(x$pointers,
-                          function(e) {
-                              c(sprintf("File '%s':", e[1L]),
-                                paste(" ", e[-1L]))
-                          })))
-      },
+          paste(c("New maintainer:",
+                  strwrap(y[[1L]], indent = 2L, exdent = 4L),
+                  "Old maintainer(s):",
+                  strwrap(y[[2L]], indent = 2L, exdent = 4L)),
+                collapse = "\n"),
+      fmt(c(if(length(y <- x$bad_license))
+                sprintf("Non-FOSS package license (%s)", y),
+            if(length(y <- x$new_license))
+                paste(c("Change to non-FOSS package license.",
+                        "New license:",
+                        strwrap(y[[1L]], indent = 2L, exdent = 4L),
+                        "Old license:",
+                        strwrap(y[[2L]], indent = 2L, exdent = 4L)),
+                      collapse = "\n"),
+            if(length(y <- x$extensions)) {
+                paste(c("License components with restrictions and base license permitting such:",
+                        paste0("  ", y),
+                        unlist(lapply(x$pointers,
+                                      function(e) {
+                                          c(sprintf("File '%s':", e[1L]),
+                                            paste0("  ", e[-1L]))
+                                      }))),
+                      collapse = "\n")
+            })),
       if(NROW(y <- x$spelling)) {
           s <- split(sprintf("%d:%d", y$Line, y$Column), y$Original)
-          c("Possibly mis-spelled words in DESCRIPTION:",
-            sprintf("  %s (%s)",
-                    names(s),
-                    lapply(s, paste, collapse = ", ")))
+          paste(c("Possibly mis-spelled words in DESCRIPTION:",
+                  sprintf("  %s (%s)",
+                          names(s),
+                          lapply(s, paste, collapse = ", "))),
+                collapse = "\n")
       },
       if(identical(x$foss_with_BuildVignettes, TRUE)) {
           "FOSS licence with BuildVignettes: false"
       },
       if(length(y <- x$fields)) {
-          c("Unknown, possibly mis-spelled, fields in DESCRIPTION:",
-            sprintf("  %s", paste(sQuote(y), collapse = " ")))
-      },
-      if(length(y <- x$overrides)) {
-          c("CRAN repository db overrides:", y)
-      },
-      if(length(y <- x$conflicts)) {
-          sprintf("CRAN repository db conflicts: %s",
-                  sQuote(y))
-      },
-      if(length(y <- x$conflict_in_license_is_FOSS)) {
-          sprintf("Package license conflicts with %s override",
-                  sQuote(paste("License_is_FOSS:", y)))
-      },
-      if(length(y <- x$conflict_in_license_restricts_use)) {
-          sprintf("Package license conflicts with %s override",
-                  sQuote(paste("License_restricts_use:", y)))
-      },
-      if(length(y <- x$depends_with_restricts_use_TRUE)) {
-          c("Package has a FOSS license but eventually depends on the following",
-	    if(length(y) > 1L)
-	    "packages which restrict use:" else
-	    "package which restricts use:",
-            strwrap(paste(y, collapse = ", "), indent = 2L, exdent = 4L))
-      },
-      if(length(y <- x$depends_with_restricts_use_NA)) {
-          c("Package has a FOSS license but eventually depends on the following",
-	    if(length(y) > 1L)
-            "packages which may restrict use:" else
-	    "package which may restrict use:",
-            strwrap(paste(y, collapse = ", "), indent = 2L, exdent = 4L))
+          paste(c("Unknown, possibly mis-spelled, fields in DESCRIPTION:",
+                  sprintf("  %s", paste(sQuote(y), collapse = " "))),
+                collapse = "\n")
       },
-      if(length(y <-
-                x$suggests_or_enhances_not_in_mainstream_repositories)) {
-          c("Suggests or Enhances not in mainstream repositories:",
-            strwrap(paste(y, collapse = ", "),
-                    indent = 2L, exdent = 4L),
-            if(length(y <-
-                      x$additional_repositories_analysis_failed_with)) {
-                c("Using Additional_repositories specification failed with:",
-                  paste(" ", y))
-            } else if(length(y <-
-                             x$additional_repositories_analysis_results)) {
-                c("Availability using Additional_repositories specification:",
-                  sprintf("  %s   %s   %s",
-                          format(y[, 1L], justify = "left"),
-                          format(y[, 2L], justify = "right"),
-                          format(y[, 3L], justify = "left")))
-            })
-      },
-      if (length(y <- x$uses)) {
+      fmt(c(if(length(y <- x$overrides)) {
+                paste(c("CRAN repository db overrides:", y),
+                      collapse = "\n")
+            },
+            if(length(y <- x$conflicts)) {
+                paste(sprintf("CRAN repository db conflicts: %s",
+                              sQuote(y)),
+                      collapse = "\n")
+            },
+            if(length(y <- x$conflict_in_license_is_FOSS)) {
+                sprintf("Package license conflicts with %s override",
+                        sQuote(paste("License_is_FOSS:", y)))
+            },
+            if(length(y <- x$conflict_in_license_restricts_use)) {
+                sprintf("Package license conflicts with %s override",
+                        sQuote(paste("License_restricts_use:", y)))
+            })),
+      fmt(c(if(length(y <- x$depends_with_restricts_use_TRUE)) {
+                paste(c("Package has a FOSS license but eventually depends on the following",
+                        if(length(y) > 1L)
+                            "packages which restrict use:"
+                        else
+                            "package which restricts use:",
+                        strwrap(paste(y, collapse = ", "),
+                                indent = 2L, exdent = 4L)),
+                      collapse = "\n")
+            },
+            if(length(y <- x$depends_with_restricts_use_NA)) {
+                paste(c("Package has a FOSS license but eventually depends on the following",
+                        if(length(y) > 1L)
+                            "packages which may restrict use:"
+                        else
+                            "package which may restrict use:",
+                        strwrap(paste(y, collapse = ", "),
+                                indent = 2L, exdent = 4L)),
+                      collapse = "\n")
+            })),
+      fmt(c(if(length(y <- x$strong_dependencies_not_in_mainstream_repositories)) {
+                  paste(c("Strong dependencies not in mainstream repositories:",
+                          strwrap(paste(y, collapse = ", "),
+                                  indent = 2L, exdent = 4L)),
+                        collapse = "\n")
+              },
+              if(length(y <- x$suggests_or_enhances_not_in_mainstream_repositories)) {
+                  paste(c("Suggests or Enhances not in mainstream repositories:",
+                          strwrap(paste(y, collapse = ", "),
+                                  indent = 2L, exdent = 4L)),
+                        collapse = "\n")
+              },
+              if(length(y <- x$additional_repositories_analysis_failed_with)) {
+                  paste(c("Using Additional_repositories specification failed with:",
+                          paste0("  ", y)),
+                        collapse = "\n")
+              },
+              if(length(y <- x$additional_repositories_analysis_results)) {
+                  paste(c("Availability using Additional_repositories specification:",
+                          sprintf("  %s   %s   %s",
+                                  format(y[, 1L], justify = "left"),
+                                  format(y[, 2L], justify = "right"),
+                                  format(y[, 3L], justify = "left"))),
+                        collapse = "\n")
+              },
+              if(length(y <- x$additional_repositories_with_no_packages)) {
+                  paste(c("Additional repositories with no packages:",
+                          paste0("  ", y)),
+                        collapse = "\n")
+              })),
+      if(length(y <- x$uses)) {
           paste(if(length(y) > 1L)
 		"Uses the superseded packages:" else
 		"Uses the superseded package:",
                 paste(sQuote(y), collapse = ", "))
       },
-      if (length(y <- x$BUGS)) {
+      if(length(y <- x$BUGS)) {
           paste(if(length(y) > 1L)
 		"Uses the non-portable packages:" else
 		"Uses the non-portable package:",
                 paste(sQuote(y), collapse = ", "))
       },
+      if(length(y <- x$authors_at_R_calls)) {
+          "Authors at R field should be a call to person(), or combine such calls."
+      },
       if(length(y <- x$vignette_sources_only_in_inst_doc)) {
           if(identical(x$have_vignettes_dir, FALSE))
-              c("Vignette sources in 'inst/doc' with no 'vignettes' directory:",
-                strwrap(paste(sQuote(y), collapse = ", "),
-                        indent = 2L, exdent = 2L),
-                "A 'vignettes' directory is required as from R 3.1.0")
+              paste(c("Vignette sources in 'inst/doc' with no 'vignettes' directory:",
+                      strwrap(paste(sQuote(y), collapse = ", "),
+                              indent = 2L, exdent = 2L),
+                      "A 'vignettes' directory is required as from R 3.1.0"),
+                    collapse = "\n")
           else
-              c("Vignette sources in 'inst/doc' missing from the 'vignettes' directory:",
-                strwrap(paste(sQuote(y), collapse = ", "),
-                        indent = 2L, exdent = 2L))
+              paste(c("Vignette sources in 'inst/doc' missing from the 'vignettes' directory:",
+                      strwrap(paste(sQuote(y), collapse = ", "),
+                              indent = 2L, exdent = 2L)),
+                    collapse = "\n")
       },
       if(length(y <- x$missing_vignette_index)) {
           "Package has a VignetteBuilder field but no prebuilt vignette index."
       },
-      if(length(y <- x$missing_manual_rdb)) {
-          "Package has help file(s) containing build-stage \\Sexpr{} expresssons but no build/partial.rdb."
-      },
-      if(length(y <- x$missing_manual_pdf)) {
-          "Package has help file(s) containing install/render-stage \\Sexpr{} expresssons but no prebuilt PDF manual."
-      },
-      if(length(y <- x$dotjava)) {
-          "Package installs .java files."
+      fmt(c(if(length(y <- x$missing_manual_rdb)) {
+                "Package has help file(s) containing build-stage \\Sexpr{} expressions but no 'build/partial.rdb' file."
+            },
+            if(length(y <- x$missing_manual_pdf)) {
+                "Package has help file(s) containing install/render-stage \\Sexpr{} expressions but no prebuilt PDF manual."
+            })),
+      fmt(c(if(length(y <- x$dotjava)) {
+                "Package installs .java files."
+            },
+            if(length(y <- x$javafiles)) {
+                "Package has FOSS license, installs .class/.jar but has no 'java' directory."
+            })),
+      fmt(c(if(length(y <- x$citation_calls)) {
+                paste(c("Package CITATION file contains call(s) to:",
+                        strwrap(paste(y, collapse = ", "),
+                                indent = 2L, exdent = 4L)),
+                      collapse = "\n")
+            },
+            if(length(y <- x$citation_error)) {
+                paste(c("Reading CITATION file fails with",
+                        paste0("  ", y),
+                        "when package is not installed."),
+                      collapse = "\n")
+            })),
+      fmt(c(if(length(y <- x$bad_urls)) {
+                if(inherits(y, "error"))
+                    paste(c("Checking URLs failed with message:",
+                            conditionMessage(y)),
+                          collapse = "\n")
+                else
+                    paste(c(if(length(y) > 1L)
+                                "Found the following (possibly) invalid URLs:"
+                            else
+                                "Found the following (possibly) invalid URL:",
+                            paste0("  ", gsub("\n", "\n    ", format(y)))),
+                          collapse = "\n")
+            },
+            if(length(y) && any(nzchar(z <- y$CRAN))) {
+                ul <- tolower(z)
+                indp <- (grepl("^https?://cran.r-project.org/web/packages",
+                               ul) &
+                         !grepl("^https?://cran.r-project.org/web/packages/[.[:alnum:]]+(html|pdf|rds)$",
+                                ul))
+                indv <- grepl("https?://cran.r-project.org/web/views/[[:alnum:]]+[.]html$",
+                              ul)
+                paste(c(if(any(indp)) {
+                            c("  The canonical URL of the CRAN page for a package is ",
+                              "    https://CRAN.R-project.org/package=pkgname")
+                        },
+                        if(any(indv)) {
+                            c("  The canonical URL of the CRAN page for a task view is ",
+                              "    https://CRAN.R-project.org/view=viewname")
+                        },
+                        if(any(nzchar(z) & !indp & !indv)) {
+                            "  Canonical CRAN.R-project.org URLs use https."
+                        }),
+                      collapse = "\n")
+            },
+            if(length(y) && any(nzchar(y$Spaces))) {
+                "  Spaces in an http[s] URL should probably be replaced by %20"
+            },
+            if(length(y) && any(ind <- nzchar(z <- y$R))) {
+                ul <- tolower(z[ind])
+                elts <- unique(sub("^http://([^.]+)[.].*", "\\1", ul))
+                paste(sprintf("  Canonical %s.R-project.org URLs use https.",
+                              elts),
+                      collapse = "\n")
+            },
+            if(length(y <- x$no_url_checks) && y) {
+                "Checking URLs requires 'libcurl' support in the R build"
+            })),
+      fmt(if(length(y <- x$bad_dois)) {
+              if(inherits(y, "error"))
+                  paste(c("Checking DOIs failed with message:",
+                          conditionMessage(y)),
+                        collapse = "\n")
+              else
+                  paste(c(if(length(y) > 1L)
+                              "Found the following (possibly) invalid DOIs:"
+                          else
+                              "Found the following (possibly) invalid DOI:",
+                          paste0("  ", gsub("\n", "\n    ", format(y)))),
+                        collapse = "\n")
+          }),
+      if(length(y <- x$R_files_non_ASCII)) {
+          paste(c("No package encoding and non-ASCII characters in the following R files:",
+                  paste0("  ", names(y), "\n    ",
+                         sapply(y, paste, collapse = "\n    "),
+                         collapse = "\n")),
+                collapse = "\n")
       },
-      if(length(y <- x$javafiles)) {
-          "Package has FOSS license, installs .class/.jar but has no 'java' directory."
-      }
+      fmt(c(if(length(x$title_is_name)) {
+                "The Title field is just the package name: provide a real title."
+            },
+            if(length(x$title_includes_name)) {
+                "The Title field starts with the package name."
+            },
+            if(length(y <- x$title_case)) {
+                paste(c("The Title field should be in title case, current version then in title case:",
+                        sQuote(y)),
+                      collapse = "\n")
+            })),
+      fmt(c(if(length(x$descr_bad_initial)) {
+                "The Description field should start with a capital letter."
+            },
+            if(length(x$descr_bad_start)) {
+                "The Description field should not start with the package name,\n  'This package' or similar."
+            })),
+      fmt(c(if(length(x$bad_date)) {
+                "The Date field is not in ISO 8601 yyyy-mm-dd format."
+            },
+            if(length(x$old_date)) {
+                "The Date field is over a month old."
+            })),
+      if(length(y <- x$build_time_stamp_msg)) y,
+      if(length(y <- x$size_of_tarball))
+          paste("Size of tarball:", y, "bytes")
       )
 }
 
+print.check_package_CRAN_incoming <-
+function(x, ...)
+{
+    writeLines(paste(format(x, ...), collapse = "\n\n"))
+    invisible(x)
+}
+
 ### * .check_Rd_metadata
 
 .check_Rd_metadata <-
@@ -7018,7 +7645,7 @@ function(package, dir, lib.loc = NULL)
             return(out)
         }
     } else {
-        if(file_test("-d", file.path(dir, "man"))) {
+        if(dir.exists(file.path(dir, "man"))) {
             db <- Rd_db(dir = dir)
             files <- basename(names(db))
             names <- sapply(db, .Rd_get_metadata, "name")
@@ -7036,18 +7663,16 @@ function(package, dir, lib.loc = NULL)
 
     files_grouped_by_names <- split(files, names)
     files_with_duplicated_names <-
-        files_grouped_by_names[sapply(files_grouped_by_names,
-                                      length) > 1L]
+        files_grouped_by_names[lengths(files_grouped_by_names) > 1L]
     if(length(files_with_duplicated_names))
         out$files_with_duplicated_names <-
             files_with_duplicated_names
 
     files_grouped_by_aliases <-
-        split(rep.int(files, sapply(aliases, length)),
+        split(rep.int(files, lengths(aliases)),
               unlist(aliases, use.names = FALSE))
     files_with_duplicated_aliases <-
-        files_grouped_by_aliases[sapply(files_grouped_by_aliases,
-                                      length) > 1L]
+        files_grouped_by_aliases[lengths(files_grouped_by_aliases) > 1L]
     if(length(files_with_duplicated_aliases))
         out$files_with_duplicated_aliases <-
             files_with_duplicated_aliases
@@ -7096,7 +7721,7 @@ function(package, dir, lib.loc = NULL)
         if(missing(dir))
             stop("you must specify 'package' or 'dir'")
         ## Using sources from directory @code{dir} ...
-        if(!file_test("-d", dir))
+        if(!dir.exists(dir))
             stop(gettextf("directory '%s' does not exist", dir),
                  domain = NA)
         else
@@ -7116,11 +7741,6 @@ function(package, dir, lib.loc = NULL)
     if(any(ind))                        # exclude them
         db <- db[!ind]
 
-    check_offending_autogenerated_content <-
-        !identical(as.logical(Sys.getenv("_R_CHECK_RD_CONTENTS_AUTO_")),
-                   FALSE)
-    offending_autogenerated_content <- NULL
-
     for(nm in names(db)) {
         rd <- db[[nm]]
 
@@ -7131,9 +7751,8 @@ function(package, dir, lib.loc = NULL)
                       1L]
 
         ## Autogenerated Rd content which needs editing.
-        if(check_offending_autogenerated_content)
-            offending_autogenerated_content <-
-                .Rd_get_offending_autogenerated_content(rd)
+        offending_autogenerated_content <-
+            .Rd_get_offending_autogenerated_content(rd)
 
         if(length(arguments_with_no_description)
            || length(offending_autogenerated_content)) {
@@ -7312,7 +7931,7 @@ function(x)
 {
     y <- as.character(x)
     if(!is.null(nx <- names(x))) {
-        ind <- which(nx != "")
+        ind <- which(nzchar(nx))
         y[ind] <- nx[ind]
     }
     y
@@ -7432,7 +8051,7 @@ function(env, verbose = getOption("verbose"))
 function(env)
 {
     env <- as.environment(env)
-    g <- methods::getGenerics(env)
+    g <- suppressMessages(methods::getGenerics(env))
     Map(function(f, p) {
             attr(f, "package") <- p
             f
@@ -7460,9 +8079,7 @@ function(f, env)
     ## This will return a listOfMethods object: turn this into a simple
     ## list of methods named by hash-collapsed signatures.
     tab <- get(methods:::.TableMetaName(f, attr(f, "package")), envir = env)
-    nms <- objects(tab, all.names = TRUE)
-    mlist <- lapply(nms, get, envir = tab)
-    names(mlist) <- nms
+    mlist <- as.list(tab, all.names = TRUE, sorted = TRUE)
     ## </FIXME>
 
     ## First, derived default methods (signature w/ "ANY").
@@ -7569,7 +8186,7 @@ function(x)
 .package_env <-
 function(package_name)
 {
-    as.environment(paste("package", package_name, sep = ":"))
+    as.environment(paste0("package:", package_name))
 }
 
 ### ** .parse_text_as_much_as_possible
@@ -7624,12 +8241,12 @@ function(x)
     ## bad_lines attribute.
     txt <- gsub("(<<?see below>>?)", "`\\1`", txt)
     ## \usage is only 'verbatim-like'
-    ## <FIXME>
-    ## 'LanguageClasses.Rd' in package methods has '"\{"' in its usage.
-    ## But why should it use the backslash escape?
-    txt <- gsub("\\{", "{", txt, fixed = TRUE)
-    txt <- gsub("\\}", "}", txt, fixed = TRUE)
-    ## </FIXME>
+    ## ## <FIXME>
+    ## ## 'LanguageClasses.Rd' in package methods has '"\{"' in its usage.
+    ## ## But why should it use the backslash escape?
+    ## txt <- gsub("\\{", "{", txt, fixed = TRUE)
+    ## txt <- gsub("\\}", "}", txt, fixed = TRUE)
+    ## ## </FIXME>
     ## now any valid escape by \ is
     ##   \a \b \f \n \r \t \u \U \v \x \' \" \\ or \octal
     txt <- gsub("(^|[^\\])\\\\($|[^abfnrtuUvx0-9'\"\\])",
@@ -7652,9 +8269,9 @@ function(x)
 function(msg, x)
 {
     xx <- strwrap(paste(sQuote(x), collapse = " "), exdent = 2L)
-    if (length(xx) > 1L || (nchar(msg) + nchar(xx) + 1L > 75L))
+    if (length(xx) > 1L || nchar(msg) + nchar(xx) + 1L > 75L)
         c(msg, .pretty_format(x))
-    else paste(msg, xx, sep = " ")
+    else paste(msg, xx)
 }
 
 ### ** .pretty_print
@@ -7785,7 +8402,7 @@ function()
     ## ASCII letters, digits and hyphen.
     ## We could also check that the local and domain parts are no longer
     ## than 64 and 255 characters, respectively.
-    ## See http://en.wikipedia.org/wiki/Email_address.
+    ## See https://en.wikipedia.org/wiki/Email_address.
     ASCII_letters_and_digits <-
         "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"
     l <- sprintf("[%s%s]", ASCII_letters_and_digits, "!#$%*/?|^{}`~&'+=_-")
@@ -7809,20 +8426,20 @@ function(x)
     s <- .Rd_get_section(x, "title")
     if(length(s)) {
         s <- .Rd_deparse(s, tag = FALSE)
-        if(.strip_whitespace(s) == "~~function to do ... ~~")
+        if(trimws(s) == "~~function to do ... ~~")
             out <- rbind(out, c("\\title", s))
     }
     s <- .Rd_get_section(x, "description")
     if(length(s)) {
         s <- .Rd_deparse(s, tag = FALSE)
-        if(.strip_whitespace(s) ==
+        if(trimws(s) ==
            "~~ A concise (1-5 lines) description of what the function does. ~~")
             out <- rbind(out, c("\\description", s))
     }
     s <- .Rd_get_section(x, "details")
     if(length(s)) {
         s <- .Rd_deparse(s, tag = FALSE)
-        if(.strip_whitespace(s) ==
+        if(trimws(s) ==
            "~~ If necessary, more details than the description above ~~")
             out <- rbind(out, c("\\details", s))
     }
@@ -7831,14 +8448,14 @@ function(x)
     s <- .Rd_get_section(x, "author")
     if(length(s)) {
         s <- .Rd_deparse(s, tag = FALSE)
-        if(.strip_whitespace(s) == "~~who you are~~")
+        if(trimws(s) == "~~who you are~~")
             out <- rbind(out, c("\\author", s))
     }
     ## /data/rsync/PKGS/mimR/man/mim-class.Rd:\note{ ~~further notes~~ }
     s <- .Rd_get_section(x, "note")
     if(length(s)) {
         s <- .Rd_deparse(s, tag = FALSE)
-        if(.strip_whitespace(s) == "~~further notes~~")
+        if(trimws(s) == "~~further notes~~")
             out <- rbind(out, c("\\note", s))
     }
 
@@ -7846,7 +8463,7 @@ function(x)
     if(length(tab)) {
         ## /data/rsync/PKGS/Rmpfr/man/mpfrArray.Rd:
         ##   \item{precBits}{ ~~Describe \code{precBits} here~~ }
-        descriptions <- .strip_whitespace(tab[, 2L])
+        descriptions <- trimws(tab[, 2L])
         ind <- (descriptions ==
                 sprintf("~~Describe \\code{%s} here~~", tab[, 1L]))
         if(any(ind))
@@ -7861,7 +8478,7 @@ function(x)
     ## include these in production check code ...
     tab <- .Rd_get_methods_description_table(x)
     if(length(tab)) {
-        descriptions <- .strip_whitespace(tab[, 2L])
+        descriptions <- trimws(tab[, 2L])
         ## /data/rsync/PKGS/coin/man/initialize-methods.Rd
         ind <- descriptions == "~~describe this method here"
         if(any(ind))
diff --git a/src/library/tools/R/Rd.R b/src/library/tools/R/Rd.R
index 9ee6a1a..9e37954 100644
--- a/src/library/tools/R/Rd.R
+++ b/src/library/tools/R/Rd.R
@@ -1,7 +1,7 @@
 #  File src/library/tools/R/Rd.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
-#  Copyright (C) 1995-2013 The R Core Team
+#  Copyright (C) 1995-2015 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
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 ### * Rd_info
 
@@ -23,23 +23,13 @@ function(file, encoding = "unknown")
 {
     ## <FIXME>
     ## This used to work only for a given Rd file.
-    ## We now also allow for passing a parsed Rd object.
-    ## Is the Rd file case still needed?
+    ## now only for a parsed Rd object.
 
     if(inherits(file, "Rd")) {
         Rd <- file
         description <- attr(attr(Rd, "srcref"), "srcfile")$filename
-    } else {
-        if(is.character(file)) {
-            file <- file(file)
-            on.exit(close(file))
-        }
-        if(!inherits(file, "connection"))
-            stop("argument 'file' must be a character string or connection")
-        description <- summary(file)$description
-        Rd <- prepare_Rd(file, encoding = encoding,
-                         defines = .Platform$OS.type)
-    }
+    } else
+        stop("Rd object required")
 
     aliases <- .Rd_get_metadata(Rd, "alias")
     concepts <- .Rd_get_metadata(Rd, "concept")
@@ -234,11 +224,11 @@ function(RdFiles, outFile = "", type = NULL,
     ##
     ## called from R CMD build
 
-    if((length(RdFiles) == 1L) && file_test("-d", RdFiles)) {
+    if((length(RdFiles) == 1L) && dir.exists(RdFiles)) {
         ## Compatibility code for the former @code{R CMD Rdindex}
         ## interface.
         docsDir <- RdFiles
-        if(file_test("-d", file.path(docsDir, "man")))
+        if(dir.exists(file.path(docsDir, "man")))
             docsDir <- file.path(docsDir, "man")
         RdFiles <- list_files_with_type(docsDir, "docs")
     }
@@ -287,7 +277,7 @@ function(package, dir, lib.loc = NULL)
         ## with a DB of the parsed (and platform processed, see
         ## above) Rd objects.
         db_file <- file.path(dir, "help", package)
-        if(file_test("-f", paste(db_file, "rdx", sep = "."))) {
+        if(file_test("-f", paste0(db_file, ".rdx"))) {
             db <- fetchRdDB(db_file)
             pathfile <- file.path(dir, "help", "paths.rds")
             if(file.exists(pathfile)) {
@@ -334,7 +324,7 @@ function(package, dir, lib.loc = NULL)
         if(missing(dir))
             stop("you must specify 'package' or 'dir'")
         ## Using sources from directory @code{dir} ...
-        if(!file_test("-d", dir))
+        if(!dir.exists(dir))
             stop(gettextf("directory '%s' does not exist", dir),
                  domain = NA)
         else
@@ -362,27 +352,41 @@ function(x, ...)
 }
 
 .build_Rd_db <-
-function(dir = NULL, files = NULL, encoding = "unknown", db_file = NULL,
-         stages = c("build", "install"), os = .OStype(), step = 3L, built_file = NULL)
+function(dir = NULL, files = NULL,
+         encoding = "unknown", db_file = NULL,
+         stages = c("build", "install"), os = .OStype(), step = 3L,
+         built_file = NULL, macros = character())
 {
     if(!is.null(dir)) {
         dir <- file_path_as_absolute(dir)
+        macros0 <- loadPkgRdMacros(dir)
         man_dir <- file.path(dir, "man")
-        if(!file_test("-d", man_dir))
+        if(!dir.exists(man_dir))
             return(structure(list(), names = character()))
         if(is.null(files))
             files <- list_files_with_type(man_dir, "docs", OS_subdirs=os)
         encoding <- .get_package_metadata(dir, FALSE)["Encoding"]
         if(is.na(encoding)) encoding <- "unknown"
-    } else if(is.null(files))
+    } else if(!is.null(files))
+        macros0 <- initialRdMacros()
+    else
         stop("you must specify 'dir' or 'files'")
 
+    if(length(macros)) {
+        con <- textConnection(macros)
+        macros <- loadRdMacros(con, macros0)
+        close(con)
+    } else {
+        macros <- macros0
+    }
+
     .fetch_Rd_object <- function(f) {
         ## This calls parse_Rd if f is a filename
         Rd <- prepare_Rd(f, encoding = encoding,
                          defines = os,
                          stages = stages, warningCalls = FALSE,
-                         stage2 = step > 1L, stage3 = step > 2L)
+                         stage2 = step > 1L, stage3 = step > 2L,
+                         macros = macros)
         structure(Rd, prepared = step)
     }
 
@@ -421,7 +425,7 @@ function(dir = NULL, files = NULL, encoding = "unknown", db_file = NULL,
  	    built <- built[!some_os]
  	    names_built <- names(built)
  	}
- 	built[!(names_built %in% basenames)] <- NULL
+ 	built[names_built %notin% basenames] <- NULL
  	if (length(built)) {
  	    which <- match(names(built), basenames)
  	    if (all(file_test("-nt", built_file, files[which]))) {
@@ -476,7 +480,7 @@ function(package, dir, lib.loc = NULL)
         ## </NOTE>
     }
     else {
-        if(file_test("-d", file.path(dir, "man"))) {
+        if(dir.exists(file.path(dir, "man"))) {
             db <- Rd_db(dir = dir)
             aliases <- lapply(db, .Rd_get_metadata, "alias")
             if(length(aliases))
@@ -509,7 +513,7 @@ function(x, kind)
     if(!length(x))
         character()
     else
-        unique(.strip_whitespace(sapply(x, as.character)))
+        unique(trimws(sapply(x, as.character)))
 }
 
 ### * .Rd_get_section
@@ -579,7 +583,7 @@ function(x)
     txt <- unlist(strsplit(txt, ", *"))
     txt <- gsub("\\\\l?dots", "...", txt)
     txt <- gsub("\\\\_", "_", txt)
-    .strip_whitespace(txt)
+    trimws(txt)
 }
 
 ### * .Rd_get_argument_table
@@ -592,7 +596,7 @@ function(x)
     ## Extract two-arg \item tags at top level ... non-recursive.
     x <- x[RdTags(x) == "\\item"]
     if(!length(x)) return(matrix(character(), 0L, 2L))
-    x <- lapply(x[sapply(x, length) == 2L], sapply, .Rd_deparse)
+    x <- lapply(x[lengths(x) == 2L], sapply, .Rd_deparse)
     matrix(unlist(x), ncol = 2L, byrow = TRUE)
 }
 
@@ -603,7 +607,7 @@ function(x)
 {
     ## Extract two-arg \item tags at top level ... non-recursive.
     x <- x[RdTags(x) == "\\item"]
-    out <- lapply(x[sapply(x, length) == 2L],
+    out <- lapply(x[lengths(x) == 2L],
                   function(e) .Rd_deparse(e[[1L]]))
     as.character(unlist(out))
 }
@@ -652,7 +656,7 @@ function(x)
     if(!length(x)) return(y)
     x <- x[RdTags(x) == "\\item"]
     if(!length(x)) return(y)
-    x <- lapply(x[sapply(x, length) == 2L], sapply, .Rd_deparse)
+    x <- lapply(x[lengths(x) == 2L], sapply, .Rd_deparse)
     matrix(unlist(x), ncol = 2L, byrow = TRUE)
 }
 
@@ -673,7 +677,7 @@ function(x)
     ## The name should really be plain text, so as.character() should be
     ## fine as well ...
     if(length(x))
-        .strip_whitespace(.Rd_deparse(x, tag = FALSE))
+        trimws(.Rd_deparse(x, tag = FALSE))
     else
         character()
 }
@@ -688,7 +692,7 @@ function(x)
     result <- character()
     if(length(title)) {
         result <- .Rd_get_text(title)
-        result <- result[result != ""]
+        result <- result[nzchar(result)]
     }
     paste(result, collapse=" ")
 }
@@ -699,6 +703,8 @@ function(x)
 # textConnection converts to the local encoding, and we convert back,
 # so unrepresentable characters will be lost
 
+## FIXME: use out = tempfile(), like .Rd_get_latex.
+
 .Rd_get_text <-
 function(x) {
     # Handle easy cases first
@@ -761,7 +767,7 @@ function(db)
     ## For Rd dbs created from a package source directory, we now add
     ## the Rd file paths as the names attribute, so that we can point to
     ## the files with missing \name entries.
-    idx <- as.integer(sapply(Rd_names, length)) == 0L
+    idx <- as.integer(lengths(Rd_names)) == 0L
     if(any(idx)) {
         Rd_paths <- names(db)
         if(is.null(Rd_paths)) {
@@ -775,7 +781,7 @@ function(db)
             stop(sprintf(ngettext(sum(idx),
                                   "missing/empty \\name field in Rd file\n%s",
                                   "missing/empty \\name field in Rd files\n%s"),
-                         paste(" ", Rd_paths[idx], collapse = "\n")),
+                         paste0("  ", Rd_paths[idx], collapse = "\n")),
                  call. = FALSE, domain = NA)
         }
     }
@@ -803,7 +809,7 @@ function(x)
     x <- gsub("\\\\&", "&", x)
     x <- gsub("---", "--", x)
     ## Also remove leading and trailing whitespace.
-    .strip_whitespace(x)
+    trimws(x)
 }
 
 
@@ -841,6 +847,85 @@ function(filebase, key = NULL)
         invisible(res)
 }
 
+# The macros argument can be TRUE, in which case a new environment is created with an empty parent,
+# or the result of a previous call to this function, in which case it becomes the parent,
+# or a filename, in which case that file is loaded first, then the new file into a child environment.
+
+# It is not safe to save this environment, as changes to the parser may invalidate its contents.
+
+loadRdMacros <- function(file, macros = TRUE) {
+    # New macros are loaded into a clean environment
+    if (is.logical(macros) && !macros)
+    	stop("'macros' must be TRUE or must specify existing macros")
+    Rd <- parse_Rd(file, fragment = TRUE, macros = macros, warningCalls = FALSE)
+    for(entry in Rd) {
+        bad <- TRUE
+	if (is.list(entry)) break
+	tag <- attr(entry, "Rd_tag")
+	switch(tag,
+	    TEXT = if (any(grepl("[^[:space:]]", entry, perl = TRUE, useBytes=TRUE)))
+		      break
+		   else
+		      bad <- FALSE,
+	    USERMACRO =,
+	    "\\newcommand" =,
+	    "\\renewcommand" =,
+	    COMMENT = bad <- FALSE,
+	    break
+	)
+    }
+    if (bad)
+	warning(gettextf("Macro file %s should only contain Rd macro definitions and comments",
+	                 file))
+    attr(Rd, "macros")
+}
+
+initialRdMacros <- function(pkglist = NULL,
+                            macros = file.path(R.home("share"), "Rd", "macros", "system.Rd")
+                            ) {
+    if (length(pkglist)) {
+    	others <- trimws(unlist(strsplit(pkglist, ",")))
+
+    	for (p in others) {
+    	    if (dir.exists(system.file("help/macros", package = p)))
+    	    	macros <- loadPkgRdMacros(system.file(package = p), macros)
+    	    else
+    	    	warning(gettextf("No Rd macros in package '%s'.", p), call. = FALSE)
+        }
+    } else if (is.character(macros))
+    	macros <- loadRdMacros(file = macros)
+    macros
+}
+
+loadPkgRdMacros <- function(pkgdir, macros = NULL) {
+    ## this does get called on any directory,
+    ## e.g. a man directory in package 'diveMove'.
+    pkglist <- try(.read_description(file.path(pkgdir, "DESCRIPTION")),
+                   silent = TRUE)
+    if (inherits(pkglist, "try-error"))
+    	pkglist <-  try(.read_description(file.path(pkgdir, "DESCRIPTION.in")),
+                        silent = TRUE)
+    ## may check for 'macros' subdirectory?
+    if (inherits(pkglist, "try-error")) return(macros)
+
+    pkglist <- pkglist["RdMacros"]
+
+    if (is.na(pkglist))
+        pkglist <- NULL
+
+    if (is.null(macros))
+        macros <- initialRdMacros(pkglist)
+    else
+        macros <- initialRdMacros(pkglist, macros)
+
+    files <- c(list.files(file.path(pkgdir, "man", "macros"), pattern = "\\.Rd$", full.names = TRUE),
+               list.files(file.path(pkgdir, "help", "macros"), pattern = "\\.Rd$", full.names = TRUE))
+
+    for (f in files)
+    	macros <- loadRdMacros(f, macros)
+
+    macros
+}
 
 ### Local variables: ***
 ### mode: outline-minor ***
diff --git a/src/library/tools/R/Rd2HTML.R b/src/library/tools/R/Rd2HTML.R
index bc1e647..c1a396f 100644
--- a/src/library/tools/R/Rd2HTML.R
+++ b/src/library/tools/R/Rd2HTML.R
@@ -1,8 +1,7 @@
-
 #  File src/library/tools/R/Rd2HTML.R
 #
-#  Copyright (C) 1995-2013 The R Core Team
-#  Part of the R package, http://www.R-project.org
+#  Copyright (C) 1995-2016 The R Core Team
+#  Part of the R package, https://www.R-project.org
 #
 #  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
@@ -15,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 ## also used by Rd2latex, but only 'topic' and 'dest'
 get_link <- function(arg, tag, Rdfile) {
@@ -109,6 +108,13 @@ vhtmlify <- function(x, inEqn = FALSE) { # code version
     x
 }
 
+shtmlify <- function(s) {
+    s <- gsub("&", "&", s, fixed = TRUE)
+    s <- gsub("<", "<", s, fixed = TRUE)
+    s <- gsub(">", ">", s, fixed = TRUE)
+    s
+}
+
 ## URL encode anything other than alphanumeric, . - _ $ and reserved
 ## characters in URLs.
 urlify <- function(x) {
@@ -118,19 +124,25 @@ urlify <- function(x) {
     ##   <http://www.w3.org/TR/html4/appendix/notes.html#h-B.2.1>
     ##   <http://www.w3.org/TR/html4/appendix/notes.html#h-B.2.2>
     ##   RFC 3986 <http://tools.ietf.org/html/rfc3986>
-    chars <- unlist(strsplit(x, ""))
-    hex <- vapply(chars,
-                  function(x)
-                  paste0("%", as.character(charToRaw(x)),
-                         collapse = ""),
-                  "")
-    todo <- paste0("[^",
-                   "][!$&'()*+,;=:/?@#",
-                   "ABCDEFGHIJKLMNOPQRSTUVWXYZ",
-                   "abcdefghijklmnopqrstuvwxyz0123456789._~-",
-                   "]")
-    mixed <- ifelse(grepl(todo, chars), hex, chars)
-    gsub("&", "&", paste(mixed, collapse = ""), fixed = TRUE)
+
+    ## We do not want to mess with already-encoded URLs
+    if(grepl("%[[:xdigit:]]{2}", x, useBytes = TRUE)) {
+        gsub("&", "&", x, fixed = TRUE)
+    } else {
+        chars <- unlist(strsplit(x, ""))
+        hex <- vapply(chars,
+                      function(x)
+                      paste0("%", toupper(as.character(charToRaw(x))),
+                             collapse = ""),
+                      "")
+        todo <- paste0("[^",
+                       "][!$&'()*+,;=:/?@ #",
+                       "ABCDEFGHIJKLMNOPQRSTUVWXYZ",
+                       "abcdefghijklmnopqrstuvwxyz0123456789._~-",
+                       "]")
+        mixed <- ifelse(grepl(todo, chars), hex, chars)
+        gsub("&", "&", paste(mixed, collapse = ""), fixed = TRUE)
+    }
 }
 ## (Equivalently, could use escapeAmpersand(utils::URLencode(x)).)
 
@@ -160,7 +172,6 @@ invalid_HTML_chars_re <-
 ##    and missing links (those without an explicit package, and
 ##    those topics not in Links[2]) don't get linked anywhere.
 
-## FIXME: better to use XHTML
 Rd2HTML <-
     function(Rd, out = "", package = "", defines = .Platform$OS.type,
              Links = NULL, Links2 = NULL,
@@ -176,7 +187,7 @@ Rd2HTML <-
             package <- package[1L]
         } else {
             dir <- dirname(package)
-            if((dir != "") &&
+            if(nzchar(dir) &&
                file_test("-f", dfile <- file.path(package,
                                                   "DESCRIPTION"))) {
                 version <- .read_description(dfile)["Version"]
@@ -205,8 +216,6 @@ Rd2HTML <-
         }
     }
 
-    of <- function(...)
-        writeLinesUTF8(paste(...), con, outputEncoding, sep = "")
     of0 <- function(...)
         writeLinesUTF8(paste0(...), con, outputEncoding, sep = "")
     of1 <- function(text)
@@ -216,25 +225,24 @@ Rd2HTML <-
 
     inEqn <- FALSE		# Should we do edits needed in an eqn?
     sectionLevel <- 0L		# How deeply nested within section/subsection
-    inPara <- FALSE		# Are we in a <P> paragraph? If NA, we're not, but we're not allowed to be
-
+    inPara <- FALSE		# Are we in a <p> paragraph? If NA, we're not, but we're not allowed to be
+    inAsIs <- FALSE             # Should we show characters "as is"?
 
 ### These correspond to HTML wrappers
-    HTMLTags <- c("\\bold"="B",
-    	          "\\cite"="CITE",
+    HTMLTags <- c("\\bold"="b",
+    	          "\\cite"="cite",
                   "\\code"="code",
-                  "\\command"="CODE",
-                  "\\dfn"="DFN",
-                  "\\emph"="EM",
-                  "\\kbd"="KBD",
-                  "\\preformatted"="PRE",
-#                  "\\special"="PRE",
-                  "\\strong"="STRONG",
-                  "\\var"="VAR",
-                  "\\verb"="PRE")
+                  "\\command"="code",
+                  "\\dfn"="dfn",
+                  "\\emph"="em",
+                  "\\kbd"="kbd",
+                  "\\preformatted"="pre",
+#                  "\\special"="pre",
+                  "\\strong"="strong",
+                  "\\var"="var")
     # These have simple substitutions
-    HTMLEscapes <- c("\\R"='<font face="Courier New,Courier" color="#666666"><b>R</b></font>',
-    		     "\\cr"="<br>",
+    HTMLEscapes <- c("\\R"='<span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span>',
+    		     "\\cr"="<br />",
     		     "\\dots"="...",
     		     "\\ldots"="...")
     ## These correspond to idiosyncratic wrappers
@@ -246,7 +254,8 @@ Rd2HTML <-
                   "\\pkg"='<span class="pkg">',
                   "\\samp"='<span class="samp">',
                   "\\sQuote"="‘",
-                  "\\dQuote"="“")
+                  "\\dQuote"="“",
+                  "\\verb"='<code style="white-space: pre;">')
     HTMLRight <- c("\\acronym"='</span></acronym>',
     		   "\\donttest"="",
     		   "\\env"="</span>",
@@ -255,12 +264,8 @@ Rd2HTML <-
                    "\\pkg"="</span>",
                    "\\samp"="</span>",
                    "\\sQuote"="’",
-                   "\\dQuote"="”")
-
-    trim <- function(x) {
-        x <- psub1("^\\s*", "", x)
-        psub1("\\s*$", "", x)
-    }
+                   "\\dQuote"="”",
+                   "\\verb"="</code>")
 
     addParaBreaks <- function(x) {
 	if (isBlankLineRd(x) && isTRUE(inPara)) {
@@ -289,25 +294,23 @@ Rd2HTML <-
     }
 
     writeWrapped <- function(tag, block, doParas) {
-    	if (!doParas || HTMLTags[tag] == "PRE")
+    	if (!doParas || HTMLTags[tag] == "pre")
             leavePara(NA)
         else
             enterPara()
+        saveAsIs <- inAsIs
+        asis <- !is.na(match(tag, "\\command"))
+        if(asis) inAsIs <<- TRUE
         if (!isBlankRd(block)) {
     	    of0("<", HTMLTags[tag], ">")
     	    writeContent(block, tag)
     	    of0("</",  HTMLTags[tag], ">")
     	}
+        if(HTMLTags[tag] == "pre")
+            inPara <<- FALSE
+        if(asis) inAsIs <<- saveAsIs
     }
 
-    checkInfixMethod <- function(blocks)
-    	# Is this a method which needs special formatting?
-    	if ( length(blocks) == 1 && RdTags(blocks) == "TEXT" &&
-    	     blocks[[1L]] %in% c("[", "[[", "$") ) {
-    	    pendingOpen <<- blocks[[1L]]
-    	    TRUE
-    	} else FALSE
-
     writeLink <- function(tag, block, doParas) {
 	parts <- get_link(block, tag, Rdfile)
 
@@ -394,14 +397,6 @@ Rd2HTML <-
         }
     }
 
-    writeComment <- function(txt) {
-       	txt <- psub1("^%", "", txt)
-       	txt <- fsub1("\n", "", txt)
-       	txt <- fsub("--", "- - ", txt)
-       	txt <- fsub(">", ">", txt)
-	of("<!-- ", txt, " -->\n")
-    }
-
     writeLR <- function(block, tag, doParas) {
     	enterPara(doParas)
         of1(HTMLLeft[tag])
@@ -426,7 +421,7 @@ Rd2HTML <-
                UNKNOWN =,
                VERB = of1(vhtmlify(block, inEqn)),
                RCODE = of1(vhtmlify(block)),
-               TEXT = of1(if(doParas) addParaBreaks(htmlify(block))else vhtmlify(block)),
+               TEXT = of1(if(doParas && !inAsIs) addParaBreaks(htmlify(block)) else vhtmlify(block)),
                USERMACRO =,
                "\\newcommand" =,
                "\\renewcommand" =,
@@ -447,8 +442,7 @@ Rd2HTML <-
                "\\kbd" =,
                "\\preformatted" =,
                "\\strong" =,
-               "\\var" =,
-               "\\verb" = writeWrapped(tag, block, doParas),
+               "\\var" = writeWrapped(tag, block, doParas),
                "\\special" = writeContent(block, tag), ## FIXME, verbatim?
                "\\linkS4class" =,
                "\\link" = writeLink(tag, block, doParas),
@@ -457,21 +451,24 @@ Rd2HTML <-
                    url <- paste(as.character(block), collapse="")
                    url <- gsub("\n", "", url)
                    enterPara(doParas)
-                   of0('<a href="mailto:', url, '">', htmlify(url), '</a>')},
-               ## FIXME: encode, not htmlify
-               ## watch out for empty URLs (TeachingDemos has one)
+                   of0('<a href="mailto:', urlify(url), '">',
+                       htmlify(url), '</a>')},
+               ## watch out for empty URLs (TeachingDemos had one)
                "\\url" = if(length(block)) {
-                   url <- paste(as.character(block), collapse="")
-                   url <- gsub("\n", "", url)
+                   url <- paste(as.character(block), collapse = "")
+                   url <- trimws(gsub("\n", "", url,
+                                      fixed = TRUE, useBytes = TRUE))
                    enterPara(doParas)
-                   of0('<a href="', escapeAmpersand(url), '">', htmlify(url), '</a>')
+                   of0('<a href="', urlify(url), '">',
+                       htmlify(url), '</a>')
                },
                "\\href" = {
                	   if(length(block[[1L]])) {
-               	   	url <- paste(as.character(block[[1L]]), collapse="")
-               	   	url <- gsub("\n", "", url)
+               	   	url <- paste(as.character(block[[1L]]), collapse = "")
+               	   	url <- trimws(gsub("\n", "", url,
+                                           fixed = TRUE, useBytes = TRUE))
 		        enterPara(doParas)
-               	   	of0('<a href="', escapeAmpersand(url), '">')
+               	   	of0('<a href="', urlify(url), '">')
                	   	closing <- "</a>"
                	   } else closing <- ""
                	   savePara <- inPara
@@ -481,7 +478,7 @@ Rd2HTML <-
                	   inPara <<- savePara
                },
                "\\Sexpr"= of0(as.character.Rd(block, deparse=TRUE)),
-               "\\cr" = of1(HTMLEscapes[tag]),
+               "\\cr" =,
                "\\dots" =,
                "\\ldots" =,
                "\\R" = {
@@ -496,10 +493,12 @@ Rd2HTML <-
                "\\pkg" =,
                "\\samp" =,
                "\\sQuote" =,
-               "\\dQuote" =  writeLR(block, tag, doParas),
+               "\\dQuote" =,
+               "\\verb" = writeLR(block, tag, doParas),
                "\\dontrun"= writeDR(block, tag),
                "\\enc" = writeContent(block[[1L]], tag),
                "\\eqn" = {
+                   enterPara(doParas)
                    inEqn <<- TRUE
                    of1("<i>")
                    block <- block[[length(block)]];
@@ -511,7 +510,7 @@ Rd2HTML <-
                "\\deqn" = {
                    inEqn <<- TRUE
                    leavePara(TRUE)
-                   of1('<p align="center"><i>')
+                   of1('<p style="text-align: center;"><i>')
                    block <- block[[length(block)]];
                    writeContent(block, tag)
                    of0('</i>')
@@ -519,6 +518,7 @@ Rd2HTML <-
                    inEqn <<- FALSE
                },
                "\\figure" = {
+                   enterPara(doParas)
                    ## This is what is needed for static html pages
                    if(dynamic) of1('<img src="figures/')
                    else of1('<img src="../help/figures/')
@@ -526,7 +526,7 @@ Rd2HTML <-
                    of1('" ')
                	   if (length(block) > 1L
                	       && length(imgoptions <- .Rd_get_latex(block[[2]]))
-		       && grepl("^options: ", imgoptions)) {
+		       && startsWith(imgoptions, "options: ")) {
 		       # There may be escaped percent signs within
 		       imgoptions <- gsub("\\%", "%", imgoptions, fixed=TRUE)
                        of1(sub("^options: ", "", imgoptions))
@@ -534,7 +534,7 @@ Rd2HTML <-
 		       of1('alt="')
 		       writeContent(block[[length(block)]], tag)
 		       of1('"')
-		   }
+                   }
                    of1(' />')
                },
                "\\dontshow" =,
@@ -571,7 +571,7 @@ Rd2HTML <-
 
         tags <- RdTags(content)
 
-	leavePara(FALSE)
+	leavePara(NA)
 	of1('\n<table summary="Rd table">\n')
         newrow <- TRUE
         newcol <- TRUE
@@ -587,7 +587,7 @@ Rd2HTML <-
                     stopRd(table, Rdfile,
                            "Only ", length(format),
                            " columns allowed in this table")
-            	of0('<td align="', format[col], '">')
+            	of0('<td style="text-align: ', format[col], ';">')
             	newcol <- FALSE
             }
             switch(tags[i],
@@ -602,11 +602,11 @@ Rd2HTML <-
             	newcol <- TRUE
             },
             writeBlock(content[[i]], tags[i], "\\tabular"))
-            leavePara(FALSE)
         }
         if (!newcol) of1('</td>')
         if (!newrow) of1('\n</tr>\n')
         of1('\n</table>\n')
+        inPara <<- FALSE
     }
 
     writeContent <- function(blocks, blocktag) {
@@ -621,7 +621,7 @@ Rd2HTML <-
             tag <- tags[i]
             block <- blocks[[i]]
             if (length(pendingOpen)) { # Handle $, [ or [[ methods
-            	if (tag == "RCODE" && grepl("^\\(", block)) {
+            	if (tag == "RCODE" && startsWith(block, "(")) {
             	    block <- sub("^\\(", "", block)
             	    arg1 <- sub("[,)[:space:]].*", "", block)
 		    block <- sub(paste0(arg1, "[[:space:]]*,[[:space:]]*"),
@@ -787,8 +787,9 @@ Rd2HTML <-
     } else {
 	name <- htmlify(Rd[[2L]][[1L]])
 
-	of0('<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">\n',
-	    '<html><head><title>')
+        of0('<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">',
+            '<html xmlns="http://www.w3.org/1999/xhtml">',
+	    '<head><title>')
 	headtitle <- strwrap(.Rd_format_title(.Rd_get_title(Rd)),
 	                     width=65, initial="R: ")
 	if (length(headtitle) > 1) headtitle <- paste0(headtitle[1], "...")
@@ -796,18 +797,18 @@ Rd2HTML <-
 	of0('</title>\n',
 	    '<meta http-equiv="Content-Type" content="text/html; charset=',
 	    mime_canonical_encoding(outputEncoding),
-	    '">\n')
+	    '" />\n')
 
 	of0('<link rel="stylesheet" type="text/css" href="',
-	    stylesheet,
-	    '">\n',
+	    urlify(stylesheet),
+	    '" />\n',
 	    '</head><body>\n\n',
 	    '<table width="100%" summary="page for ', htmlify(name))
 	if (nchar(package))
 	    of0(' {', package, '}"><tr><td>',name,' {', package,'}')
 	else
 	    of0('"><tr><td>',name)
-	of0('</td><td align="right">R Documentation</td></tr></table>\n\n')
+	of0('</td><td style="text-align: right;">R Documentation</td></tr></table>\n\n')
 
 	of1("<h2>")
 	inPara <- NA
@@ -819,11 +820,11 @@ Rd2HTML <-
 	for (i in seq_along(sections)[-(1:2)])
 	    writeSection(Rd[[i]], sections[i])
 
-	if(version != "")
+	if(nzchar(version))
 	    version <- paste0('Package <em>',package,'</em> version ',version,' ')
 	of0('\n')
-	if (version != "")
-	    of0('<hr><div align="center">[', version,
+	if(nzchar(version))
+	    of0('<hr /><div style="text-align: center;">[', version,
 		if (!no_links) '<a href="00Index.html">Index</a>',
 		']</div>')
 	of0('\n',
diff --git a/src/library/tools/R/Rd2ex.R b/src/library/tools/R/Rd2ex.R
index 8c97b3b..f69b66f 100644
--- a/src/library/tools/R/Rd2ex.R
+++ b/src/library/tools/R/Rd2ex.R
@@ -1,7 +1,7 @@
 #  File src/library/tools/R/Rd2ex.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
-#  Copyright (C) 1995-2013 The R Core Team
+#  Copyright (C) 1995-2014 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
@@ -14,22 +14,19 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 ## This warns on multiple \examples sections, never fails.
 
 Rd2ex <-
     function(Rd, out="", defines=.Platform$OS.type, stages="render",
-             outputEncoding="UTF-8", commentDontrun = TRUE, ...)
+             outputEncoding="UTF-8", commentDontrun = TRUE, commentDonttest = FALSE, ...)
 {
-    encode_warn <- FALSE
     WriteLines <- function(x, con, outputEncoding, ...) {
         if (outputEncoding != "UTF-8") {
             x <- iconv(x, "UTF-8", outputEncoding,  mark=FALSE)
-            if (anyNA(x)) {
+            if (anyNA(x))
                 x <- iconv(x, "UTF-8", outputEncoding, sub="byte", mark=FALSE)
-                encode_warn <<- TRUE
-            }
         }
         writeLines(x, con, useBytes = TRUE, ...)
     }
@@ -62,46 +59,35 @@ Rd2ex <-
 
     render <- function(x, prefix = "")
     {
-        tag <- attr(x, "Rd_tag")
-        if(tag %in% c("\\dontshow", "\\testonly")) {
-            of1("## Don't show: ")
-            if (!grepl("^\n", x[[1L]][1L], perl = TRUE) && RdTags(x)[1L] != "COMMENT")
-                writeLines("", con)
-            for(i in seq_along(x)) render(x[[i]], prefix)
-            last <- x[[length(x)]]
-            if (!grepl("\n$", last[length(last)], perl = TRUE))
-                writeLines("", con)
-            of1("## End Don't show")
-        } else if (tag  == "\\dontrun") {
-            if (commentDontrun)
-                of1("## Not run: ")
-            ## Special case for one line.
-            if (length(x) == 1L && commentDontrun) {
-                render(x[[1L]], prefix)
-            } else {
-                if (!grepl("^\n", x[[1L]][1L], perl = TRUE) && RdTags(x)[1L] != "COMMENT") {
-                    writeLines("", con)
-                    render(x[[1L]], paste0(if (commentDontrun) "##D ", prefix))
-                } else render(x[[1L]], prefix)
-                if(length(x) >= 2L)
-                    for(i in 2:length(x))
-                        render(x[[i]], paste0(if (commentDontrun) "##D ", prefix))
-                last <- x[[length(x)]]
-                if (!grepl("\n$", last[length(last)], perl = TRUE))
-                    writeLines("", con)
-                if (commentDontrun)
-                    of1("## End(Not run)")
-            }
-        } else if (tag  == "\\donttest") {
-            of1("## No test: ")
-            if (!grepl("^\n", x[[1L]][1L], perl = TRUE) && RdTags(x)[1L] != "COMMENT")
-                writeLines("", con)
-            for(i in seq_along(x)) render(x[[i]], prefix)
-            last <- x[[length(x)]]
-            if (!grepl("\n$", last[length(last)], perl = TRUE))
-                writeLines("", con)
-            of1("## End(No test)")
-        } else if (tag == "COMMENT") {
+	renderDont <- function(txt, comment, label=TRUE, xtra1=comment) {
+	    if (label)
+		of0("## ", txt, ": ")
+	    ## Special case for one line.
+	    if (xtra1 && length(x) == 1L) {
+		render(x[[1L]], prefix)
+	    } else {
+		if (!grepl("^\n", x[[1L]][1L], perl = TRUE) &&
+		    RdTags(x)[1L] != "COMMENT") {
+		    writeLines("", con)
+		    render(x[[1L]], paste0(if (comment) "##D ", prefix))
+		} else render(x[[1L]], prefix)
+		for(i in seq_along(x)[-1]) ## `` i in 2:length(x) ''
+		    render(x[[i]], paste0(if (comment) "##D ", prefix))
+		last <- x[[length(x)]]
+		if (!grepl("\n$", last[length(last)], perl = TRUE))
+		    writeLines("", con)
+		if (label)
+		    of0("## End(",txt,")")
+	    }
+	}
+	tag <- attr(x, "Rd_tag")
+	if(tag %in% c("\\dontshow", "\\testonly")) {
+	    renderDont("Don't show", comment=FALSE)
+	} else if (tag == "\\dontrun") {
+	    renderDont("Not run", commentDontrun, label=commentDontrun)
+	} else if (tag == "\\donttest") {
+	    renderDont("No test", commentDonttest, xtra1=FALSE)
+	} else if (tag == "COMMENT") {
             ## % can escape a whole line (e.g. beavers.Rd) or
             ## be trailing when we want a NL
             ## This is not right (leading spaces?) but it may do
diff --git a/src/library/tools/R/Rd2latex.R b/src/library/tools/R/Rd2latex.R
index b2470f1..810a4ac 100644
--- a/src/library/tools/R/Rd2latex.R
+++ b/src/library/tools/R/Rd2latex.R
@@ -1,7 +1,7 @@
 #  File src/library/tools/R/Rd2latex.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
-#  Copyright (C) 1995-2013 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
@@ -14,31 +14,23 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 ## TODO: can we do something useful with cross-package links?
 
 
 ### * .Rd_get_latex
 
-# Return latex form of text, encoded in UTF-8.  Note that
-# textConnection converts to the local encoding, and we convert back,
-# so unrepresentable characters will be lost
-
+# Return latex form of text, encoded in UTF-8.
 .Rd_get_latex <-
-function(x) {
-    # We'd like to use capture.output here, but don't want to depend
-    # on utils, so we duplicate some of it
-    rval <- NULL
-    file <- textConnection("rval", "w", local = TRUE)
-
+function(x)
+{
+    tf <- tempfile()
     save <- options(useFancyQuotes = FALSE)
-    sink(file)
-    tryCatch(Rd2latex(x, fragment=TRUE),
-             finally = {sink(); options(save); close(file)})
-
-    if (is.null(rval)) rval <- character()
-    else enc2utf8(rval)
+    on.exit({options(save); unlink(tf)})
+    tryCatch(Rd2latex(x, tf, fragment = TRUE, outputEncoding = "UTF-8"),
+             error = function(e) return(character()))
+    enc2utf8(readLines(tf, warn = FALSE, encoding = "UTF-8"))
 }
 
 latex_canonical_encoding  <- function(encoding)
@@ -66,7 +58,8 @@ latex_canonical_encoding  <- function(encoding)
 }
 
 ## 'encoding' is passed to parse_Rd, as the input encoding
-Rd2latex <- function(Rd, out="", defines=.Platform$OS.type, stages="render",
+Rd2latex <- function(Rd, out = "", defines = .Platform$OS.type,
+                     stages = "render",
 		     outputEncoding = "ASCII", fragment = FALSE, ...,
                      writeEncoding = TRUE)
 {
@@ -78,10 +71,10 @@ Rd2latex <- function(Rd, out="", defines=.Platform$OS.type, stages="render",
                 writeLines(x, con, useBytes = TRUE, ...)
         } else {
             function(x, con, outputEncoding, ...) {
-                x <- iconv(x, "UTF-8", outputEncoding,  mark=FALSE)
+                x <- iconv(x, "UTF-8", outputEncoding,  mark = FALSE)
                 if (anyNA(x)) {
                     x <- iconv(x, "UTF-8", outputEncoding,
-                               sub="byte", mark=FALSE)
+                               sub = "byte", mark = FALSE)
                     encode_warn <<- TRUE
                 }
                 writeLines(x, con, useBytes = TRUE, ...)
@@ -211,9 +204,13 @@ Rd2latex <- function(Rd, out="", defines=.Platform$OS.type, stages="render",
             url <- as.character(block[[1L]])
             tag <- "\\Rhref"
         }
-    	of0(tag, "{",
-            gsub("\n", "", paste(as.character(url), collapse="")),
-            "}")
+        ## cleanup URL
+        url <- trimws(gsub("\n", "",
+                           paste(as.character(url), collapse = ""),
+                           fixed = TRUE, useBytes = TRUE))
+        ## escape % for LaTeX
+        url <- gsub("%", "\\%",  url, fixed = TRUE, useBytes = TRUE)
+    	of0(tag, "{", url, "}")
         if (tag == "\\Rhref") {
             of1("{")
             writeContent(block[[2L]], tag)
@@ -229,8 +226,6 @@ Rd2latex <- function(Rd, out="", defines=.Platform$OS.type, stages="render",
             latex_link_trans0(parts$dest), "}")
     }
 
-    writeComment <- function(txt) of0(txt, '\n')
-
     writeDR <- function(block, tag) {
         if (length(block) > 1L) {
             of1('## Not run: ')
@@ -297,35 +292,6 @@ Rd2latex <- function(Rd, out="", defines=.Platform$OS.type, stages="render",
         x
     }
 
-    latex_code_trans  <- function(x)
-    {
-        BSL = '@BSL@';
-        LATEX_SPECIAL = '$^&~_#'
-        if(grepl(LATEX_SPECIAL, x)) {
-            x <- fsub("\\\\", BSL, x)
-            ## unescape (should not be escaped)
-            x <- psub("\\\\([$^&~_#])", "\\1", x)
-            x <- psub("[$^&~_#]", "\\1&", x) #- escape them
-            x <- fsub("^", "\\textasciicircum{}", x) # ^ is SPECIAL
-            x <- fsub("~", "\\textasciitilde{}", x)
-            x <- fsub(BSL, "\\bsl{}", x)
-            x <- fsub("\\", "\\bsl{}", x)
-        }
-        ## avoid conversion to guillemets
-        x <- fsub("<<", "<{}<", x)
-        x <- fsub(">>", ">{}>", x)
-        x <- fsub(",,", ",{},", x) # ,, is a ligature in the ae font.
-        x <- psub("\\\\bsl{}var\\\\{([^}]+)\\\\}", "\\var{\\1}", x)
-        x
-}
-
-    latex_link_trans <- function(x)
-    {
-        x <- fsub("<-.", "<\\Rdash.", x)
-        x <- psub("<-$", "<\\Rdash", x)
-        x
-    }
-
     latex_code_alias <- function(x)
     {
         x <- fsub("{", "\\{", x)
@@ -333,26 +299,19 @@ Rd2latex <- function(Rd, out="", defines=.Platform$OS.type, stages="render",
         x <- psub("(?<!\\\\)([&$%_#])", "\\\\\\1", x)
         x <- fsub("^", "\\textasciicircum{}", x)
         x <- fsub("~", "\\textasciitilde{}", x)
-        x <- fsub("<-", "<\\Rdash", x)
+        x <- fsub("<-", "<\\Rdash{}", x)
         x <- psub("([!|])", '"\\1', x)
         x
     }
 
-    latex_code_aliasAA <- function(x)
-    {
-        x <- latex_code_trans(x)
-        x <- latex_link_trans(x)
-        psub("\\\\([!|])", '"\\1', x)
-    }
-
     currentAlias <- NA_character_
 
     writeAlias <- function(block, tag) {
         alias <- as.character(block)
         aa <- "\\aliasA{"
-        ## some versions of hyperref (from 6.79d) have trouble indexing these
+        ## Some versions of hyperref (from 6.79d) have trouble indexing these
         ## |, || in base, |.bit, %||% in ggplot2 ...
-        ## And texindy used by texi2dvi > 1.135 chokes on {/(
+        ## And texindy used by some versions of texi2dvi chokes on {/(
         if(grepl("[|{(]", alias)) aa <- "\\aliasB{"
         if(is.na(currentAlias)) currentAlias <<- name
         if (pmatch(paste0(currentAlias, "."), alias, 0L)) {
@@ -400,7 +359,7 @@ Rd2latex <- function(Rd, out="", defines=.Platform$OS.type, stages="render",
                "\\option" =,
                "\\samp" = writeWrapped(block, tag),
                ## really verbatim
-                "\\url"=,
+               "\\url"=,
                "\\href"= writeURL(block, tag),
                ## R-like
                "\\code"= {
@@ -472,7 +431,7 @@ Rd2latex <- function(Rd, out="", defines=.Platform$OS.type, stages="render",
                	   if (length(block) > 1L) {
 		       includeoptions <- .Rd_get_latex(block[[2]])
 		       if (length(includeoptions)
-			   && grepl("^options: ", includeoptions))
+			   && startsWith(includeoptions, "options: "))
 			   of0(sub("^options: ", "", includeoptions))
                    }
                	   of0('}')
@@ -635,8 +594,6 @@ Rd2latex <- function(Rd, out="", defines=.Platform$OS.type, stages="render",
     Rdfile <- attr(Rd, "Rdfile")
     sections <- RdTags(Rd)
 
-    enc <- which(sections == "\\encoding")
-
     if (is.character(out)) {
         if(out == "") {
             con <- stdout()
@@ -649,7 +606,7 @@ Rd2latex <- function(Rd, out="", defines=.Platform$OS.type, stages="render",
     	out <- summary(con)$description
     }
 
-   if (outputEncoding != "ASCII") {
+   if (outputEncoding != "ASCII" && !fragment) {
         latexEncoding <- latex_canonical_encoding(outputEncoding)
         if(writeEncoding) of0("\\inputencoding{", latexEncoding, "}\n")
     } else latexEncoding <- NA
diff --git a/src/library/tools/R/Rd2pdf.R b/src/library/tools/R/Rd2pdf.R
index 7087489..405012d 100644
--- a/src/library/tools/R/Rd2pdf.R
+++ b/src/library/tools/R/Rd2pdf.R
@@ -1,7 +1,7 @@
 #  File src/library/tools/R/Rd2pdf.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
-#  Copyright (C) 1995-2014 The R Core Team
+#  Copyright (C) 1995-2015 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
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 #### R based engine for  R CMD Rdconv|Rd2pdf
 ####
@@ -84,12 +84,13 @@
 .Rdfiles2tex <-
     function(files, outfile, encoding = "unknown", outputEncoding = "UTF-8",
              append = FALSE, extraDirs = NULL, internals = FALSE,
-             silent = FALSE)
+             silent = FALSE, pkglist = NULL)
 {
-    if (file_test("-d", files))
+    if (dir.exists(files))
         .pkg2tex(files, outfile, encoding = encoding, append = append,
                  asChapter = FALSE, extraDirs = extraDirs,
-                 internals = internals, silent = silent)
+                 internals = internals, silent = silent,
+                 pkglist = pkglist)
     else {
         files <- strsplit(files, "[[:space:]]+")[[1L]]
         latexdir <- tempfile("ltx")
@@ -101,6 +102,7 @@
         }
         latexEncodings <- character()
         hasFigures <- FALSE
+        macros <- initialRdMacros(pkglist = pkglist)
         for(f in files) {
             if (!silent) cat("  ", basename(f), "\n", sep="")
             if (!internals) {
@@ -112,7 +114,8 @@
             ## people have file names with quotes in them.
             res <- Rd2latex(f, out, encoding = encoding,
                             outputEncoding = outputEncoding,
-                            stages = c("build", "install", "render"))
+                            stages = c("build", "install", "render"),
+                            macros = macros)
             latexEncodings <- c(latexEncodings,
                                 attr(res,"latexEncoding"))
             lines <- readLines(out)
@@ -135,7 +138,8 @@
 .pkg2tex <-
     function(pkgdir, outfile, internals = FALSE, asChapter = TRUE,
              encoding = "unknown", outputEncoding = "UTF-8",
-             extraDirs = NULL, append = FALSE, silent = FALSE)
+             extraDirs = NULL, append = FALSE, silent = FALSE,
+             pkglist = NULL)
 {
     ## sort order for topics, a little tricky
     re <- function(x) x[order(toupper(x), x)]
@@ -154,8 +158,8 @@
     ## Second guess is this is a >= 2.10.0 package with stored .rds files.
     ## If it does not exist, guess this is a source package.
     latexdir <- file.path(pkgdir, "latex")
-    if (!file_test("-d", latexdir)) {
-        if (file_test("-d", file.path(pkgdir, "help"))) {
+    if (!dir.exists(latexdir)) {
+        if (dir.exists(file.path(pkgdir, "help"))) {
             ## So convert it
             latexdir <- tempfile("ltx")
             dir.create(latexdir)
@@ -168,6 +172,7 @@
                 return(invisible(character()))
             }
             cnt <- 0L
+            macros <- initialRdMacros(pkglist)
             for(f in names(Rd)) {
 ##                bf <- basename(f)
                 cnt <- cnt + 1L
@@ -180,7 +185,8 @@
 				  encoding = encoding,
 				  outputEncoding = outputEncoding,
 				  defines = NULL,
-				  writeEncoding = !asChapter)
+				  writeEncoding = !asChapter,
+				  macros = macros)
                 latexEncodings <- c(latexEncodings,
                                     attr(res, "latexEncoding"))
                 if (attr(res, "hasFigures")) {
@@ -196,7 +202,7 @@
         } else {
             ## As from R 2.15.3, give priority to a man dir.
             mandir <- file.path(pkgdir, "man")
-            if (file_test("-d", mandir)) {
+            if (dir.exists(mandir)) {
                 files <- c(Sys.glob(file.path(mandir, "*.Rd")),
                            Sys.glob(file.path(mandir, "*.rd")))
                 if (is.null(extraDirs)) extraDirs <- .Platform$OS.type
@@ -232,6 +238,8 @@
             if (!silent) message("Converting Rd files to LaTeX ",
                                  appendLF = FALSE, domain = NA)
             cnt <- 0L
+            macros <- loadPkgRdMacros(pkgdir)
+            macros <- initialRdMacros(pkglist, macros)
             for(i in seq_along(paths)) {
                 cnt <- cnt + 1L
                 if(!silent && cnt %% 10L == 0L)
@@ -241,7 +249,8 @@
                 res <- Rd2latex(files[[i]], outfilename,
                                 stages = c("build", "install", "render"),
                                 encoding = encoding,
-                                outputEncoding = outputEncoding)
+                                outputEncoding = outputEncoding,
+                                macros = macros)
                 latexEncodings <-
                     c(latexEncodings, attr(res, "latexEncoding"))
                 if (attr(res, "hasFigures")) {
@@ -263,7 +272,7 @@
     ## they might be zipped up
     if (file.exists(f <- file.path(latexdir, "Rhelp.zip"))) {
         dir.create(newdir <- tempfile("latex"))
-        unzip(f, exdir = newdir)
+        utils::unzip(f, exdir = newdir)
         ## res <- system(paste("unzip -q", f, "-d", newdir))
         ## if (res) stop("unzipping latex files failed")
         latexdir <- newdir
@@ -339,6 +348,8 @@
             "  -o, --output=OUT	use 'OUT' as the output file",
             "      --os=NAME		assume OS 'NAME' (unix or windows)",
             "      --OS=NAME		the same as '--os'",
+            "  --RdMacros=pkglist",
+            "             		packages from which to get Rd macros",
             "",
             "Possible format specifications are 'txt' (plain text), 'html', 'latex',",
             "and 'example' (extract R code in the examples).",
@@ -347,7 +358,7 @@
             "Using '-o \"\"' will choose an output filename by removing a '.Rd'",
             "extension from FILE and adding a suitable extension.",
             "",
-            "Report bugs at bugs.r-project.org .", sep = "\n")
+            "Report bugs at <https://bugs.R-project.org>.", sep = "\n")
     }
 
     options(showErrorCalls = FALSE, warn = 1)
@@ -357,6 +368,7 @@
     pkg <- ""
     out <- NULL
     os <- ""
+    pkglist <- NULL
 
     if (is.null(args)) {
         args <- commandArgs(TRUE)
@@ -376,7 +388,7 @@
                 R.version[["major"]], ".",  R.version[["minor"]],
                 " (r", R.version[["svn rev"]], ")\n", sep = "")
             cat("",
-                "Copyright (C) 1997-2009 The R Core Team.",
+                "Copyright (C) 1997-2015 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")
@@ -386,8 +398,8 @@
             else stop("-t option without value", call. = FALSE)
         } else if (substr(a, 1, 7) == "--type=") {
             type <- substr(a, 8, 1000)
-        } else if (substr(a, 1, 10) == "--encoding=") {
-            enc <- substr(a, 11, 1000)
+        } else if (substr(a, 1, 11) == "--encoding=") {
+            enc <- substr(a, 12, 1000)
         } else if (substr(a, 1, 10) == "--package=") {
             pkg <- substr(a, 11, 1000)
         } else if (a == "-o") {
@@ -397,6 +409,8 @@
             out <- substr(a, 10, 1000)
         } else if (substr(a, 1, 5) %in% c("--os=", "--OS=")) {
             os <- substr(a, 6, 1000)
+        } else if (substr(a, 1, 11) == "--RdMacros=") {
+            pkglist <- substr(a, 12, 1000)
         } else if (substr(a, 1, 1) == "-") {
             message("Warning: unknown option ", sQuote(a))
         } else files <- c(files, a)
@@ -411,28 +425,33 @@
         out <- paste0(bf,  exts[type])
     } else if (is.null(out)) out <- ""
     if (!nzchar(os)) os <- .Platform$OS.type
+    macros <- initialRdMacros(pkglist = pkglist)
     switch(type,
            "txt" = {
                Rd2txt(files, out, package=pkg, defines=os,
                       outputEncoding = enc,
-                      stages = c("build", "install", "render"))
+                      stages = c("build", "install", "render"),
+                      macros = macros)
            },
            "html" = {
                if (!nzchar(enc)) enc <- "UTF-8"
                Rd2HTML(files, out, package = pkg, defines = os,
                        outputEncoding = enc, no_links = TRUE,
-                       stages = c("build", "install", "render"))
+                       stages = c("build", "install", "render"),
+                       macros = macros)
            },
            "latex" = {
                if (!nzchar(enc)) enc <- "UTF-8"
                Rd2latex(files, out, defines = os,
                         outputEncoding = enc,
-                        stages = c("build", "install", "render"))
+                        stages = c("build", "install", "render"),
+                        macros = macros)
            },
            "example" = {
                if (!nzchar(enc)) enc <- "UTF-8"
                Rd2ex(files, out, defines = os, outputEncoding = enc,
-                     stages = c("build", "install", "render"))
+                     stages = c("build", "install", "render"),
+                     macros = macros)
            },
            "unknown" = stop("no 'type' specified", call. = FALSE),
            stop("'type' must be one of 'txt', 'html', 'latex' or 'example'",
@@ -447,7 +466,7 @@
 function(pkgdir, outfile, title, batch = FALSE,
          description = TRUE, only_meta = FALSE,
          enc = "unknown", outputEncoding = "UTF-8", files_or_dir, OSdir,
-         internals = FALSE, index = TRUE)
+         internals = FALSE, index = TRUE, pkglist = NULL)
 {
     ## Write directly to the final location.  Encodings and figures
     ## may mean we need to make edits, but for most files one pass
@@ -497,7 +516,7 @@ function(pkgdir, outfile, title, batch = FALSE,
             desc <- read.dcf(f)[1,]
             title <- paste0("Package `", desc["Package"], "'")
         } else {
-            if (file_test("-d", pkgdir)) {
+            if (dir.exists(pkgdir)) {
                 subj <- paste0("all in \\file{", pkgdir, "}")
             } else {
                 files <- strsplit(files_or_dir, "[[:space:]]+")[[1L]]
@@ -526,7 +545,7 @@ function(pkgdir, outfile, title, batch = FALSE,
     }
 
     ## Rd2.tex part 2: body
-    toc <- if (file_test("-d", files_or_dir)) {
+    toc <- if (dir.exists(files_or_dir)) {
         "\\Rdcontents{\\R{} topics documented:}"
     } else ""
 
@@ -534,14 +553,14 @@ function(pkgdir, outfile, title, batch = FALSE,
     hasFigures <- FALSE
     ## if this looks like a package with no man pages, skip body
     if (file.exists(file.path(pkgdir, "DESCRIPTION")) &&
-        !(file_test("-d", file.path(pkgdir, "man")) ||
-          file_test("-d", file.path(pkgdir, "help")) ||
-          file_test("-d", file.path(pkgdir, "latex")))) only_meta <- TRUE
+        !(dir.exists(file.path(pkgdir, "man")) ||
+          dir.exists(file.path(pkgdir, "help")) ||
+          dir.exists(file.path(pkgdir, "latex")))) only_meta <- TRUE
     if (!only_meta) {
         if (nzchar(toc)) writeLines(toc, out)
         res <- .Rdfiles2tex(files_or_dir, out, encoding = enc, append = TRUE,
                          extraDirs = OSdir, internals = internals,
-                         silent = batch)
+                         silent = batch, pkglist = pkglist)
         if(length(res)) {
             latexEncodings <- res$latexEncodings
             hasFigures <- res$hasFigures
@@ -612,17 +631,17 @@ setEncoding2, "
     ## </NOTE>
 
     if (!file.exists(file)) return(0L)
-    age <- file.info(file)$mtime
+    age <- file.mtime(file)
 
-    if (any(file.info(c(Sys.glob(file.path(dir, "man", "*.Rd")),
-                        Sys.glob(file.path(dir, "man", "*.rd")))
-                      )$mtime > age))
+    if (any(file.mtime(c(Sys.glob(file.path(dir, "man", "*.Rd")),
+                        Sys.glob(file.path(dir, "man", "*.rd"))))
+                       > age))
         return(0L)
 
-    if (isTRUE(file.info(file.path(dir, OS))$isdir)) {
-        if (any(file.info(c(Sys.glob(file.path(dir, "man", OS, "*.Rd")),
-                            Sys.glob(file.path(dir, "man", OS, "*.rd")))
-                          )$mtime > age))
+    if (dir.exists(file.path(dir, OS))) {
+        if (any(file.mtime(c(Sys.glob(file.path(dir, "man", OS, "*.Rd")),
+                            Sys.glob(file.path(dir, "man", OS, "*.rd"))))
+                           > age))
             return(0L)
     }
 
@@ -636,8 +655,6 @@ setEncoding2, "
 
 ..Rd2pdf <- function(args = NULL, quit = TRUE)
 {
-    dir.exists <- function(x) !is.na(isdir <- file.info(x)$isdir) & isdir
-
     do_cleanup <- function() {
         if(clean) {
             setwd(startdir)
@@ -684,11 +701,13 @@ setEncoding2, "
             "      --no-description	do not typeset the description of a package",
             "      --internals	typeset 'internal' documentation (usually skipped)",
             "      --build_dir=DIR	use DIR as the working directory",
+            "      --RdMacros=pkglist",
+            "             		packages from which to get Rd macros",
             "",
             "The output papersize is set by the environment variable R_PAPERSIZE.",
             "The PDF previewer is set by the environment variable R_PDFVIEWER.",
             "",
-            "Report bugs at bugs.r-project.org .",
+            "Report bugs at <https://bugs.R-project.org>.",
             sep = "\n")
     }
 
@@ -718,6 +737,7 @@ setEncoding2, "
     files <- character()
     dir <- ""
     force <- FALSE
+    pkglist <- NULL
 
     WINDOWS <- .Platform$OS.type == "windows"
 
@@ -772,6 +792,8 @@ setEncoding2, "
             description <- FALSE
         } else if (a == "--internals") {
             internals <- TRUE
+        } else if (substr(a, 1, 11) == "--RdMacros=") {
+            pkglist <- substr(a, 12, 1000)
         } else if (substr(a, 1, 1) == "-") {
             message("Warning: unknown option ", sQuote(a))
         } else files <- c(files, a)
@@ -815,7 +837,7 @@ setEncoding2, "
         q("no", status = 2L, runLast = FALSE)
     }
     dir.create(build_dir, FALSE)
-    if(!nzchar(output)) output <- paste("Rd2", out_ext, sep = ".")
+    if(!nzchar(output)) output <- paste0("Rd2.", out_ext)
     if(file.exists(output) && !force) {
         cat("file", sQuote(output), "exists; please remove it first\n")
         q("no", status = 1L, runLast = FALSE)
@@ -824,7 +846,8 @@ setEncoding2, "
     res <-
         try(.Rd2pdf(files[1L], file.path(build_dir, "Rd2.tex"),
                     title, batch, description, only_meta,
-                    enc, outenc, dir, OSdir, internals, index))
+                    enc, outenc, dir, OSdir, internals, index,
+                    pkglist))
     if (inherits(res, "try-error"))
         q("no", status = 11L, runLast = FALSE)
 
@@ -843,7 +866,7 @@ setEncoding2, "
 
     setwd(startdir)
     cat("Saving output to", sQuote(output), "...\n")
-    file.copy(file.path(build_dir, paste("Rd2", out_ext, sep = ".")), output,
+    file.copy(file.path(build_dir, paste0("Rd2.", out_ext)), output,
               overwrite = force)
     cat("Done\n")
 
diff --git a/src/library/tools/R/Rd2txt.R b/src/library/tools/R/Rd2txt.R
index 54d36d6..80c0410 100644
--- a/src/library/tools/R/Rd2txt.R
+++ b/src/library/tools/R/Rd2txt.R
@@ -1,7 +1,7 @@
 #  File src/library/tools/R/Rd2txt.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
-#  Copyright (C) 1995-2013 The R Core Team
+#  Copyright (C) 1995-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
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 ## This stops on
 ##  unrecognized tag
@@ -27,7 +27,7 @@ tabExpand <- function(x) {
     srcref <- attr(x, "srcref")
     if (is.null(srcref)) start <- 0L
     else start <- srcref[5L] - 1L
-    .Call(doTabExpand, x, start)
+    .Call(C_doTabExpand, x, start)
 }
 
 Rd2txt_options <- local({
@@ -220,9 +220,9 @@ transformMethod <- function(i, blocks, Rdfile) {
 	    blocks <- rewriteBlocks()
 	} else {
             chars[char] <- "!"
-	    blocks <- rewriteBlocks()            
+	    blocks <- rewriteBlocks()
         }
-        
+
 	findClose(j)
 	chars[char] <- ""
 	blocks[j] <- editblock(blocks[[j]],
@@ -396,9 +396,6 @@ Rd2txt <-
         linestart <<- trail
     }
 
-    blanks <- function(n)
-	if (n) paste(rep_len(" ", n), collapse="") else ""
-
     flushBuffer <- function() {
     	if (!length(buffer)) return()
 
@@ -434,10 +431,10 @@ Rd2txt <-
 	} else {  # Not wrapping
 	    if (keepFirstIndent) {
 		if (length(buffer) > 1L)
-		    buffer[-1L] <<- paste0(blanks(indent), buffer[-1L])
+		    buffer[-1L] <<- paste0(strrep(" ", indent), buffer[-1L])
 		keepFirstIndent <- FALSE
 	    } else
-		buffer <<- paste0(blanks(indent), buffer)
+		buffer <<- paste0(strrep(" ", indent), buffer)
 	}
 
     	if (length(buffer)) WriteLines(buffer, con, outputEncoding)
@@ -473,13 +470,6 @@ Rd2txt <-
         psub1("\\s*$", "", x)
     }
 
-    striptitle <- function(text) {
-        text <- fsub("\\", "", text)
-        text <- fsub("---", "_", text)
-        text <- fsub("--", "-", text)
-        text
-    }
-
     ## underline via backspacing
     txt_header <- function(header) {
         opts <- Rd2txt_options()
@@ -606,18 +596,28 @@ Rd2txt <-
                        writeQ(block, tag, quote="\\sQuote")
                    else writeContent(block,tag)
                },
-               "\\email"=  put("<email: ",
-                               gsub("\n", "", paste(as.character(block), collapse="")),
-                               ">"),
-               "\\url"= put("<URL: ",
-                              gsub("\n", "", paste(as.character(block), collapse="")),
-                              ">") ,
-               "\\href"= {
+               "\\email" = {
+                   put("<email: ",
+                       trimws(gsub("\n", "",
+                                   paste(as.character(block),
+                                         collapse=""))),
+                       ">")
+               },
+               "\\url" = {
+                   put("<URL: ",
+                       trimws(gsub("\n", "",
+                                   paste(as.character(block),
+                                         collapse=""))),
+                       ">")
+               },
+               "\\href" = {
                    opts <- Rd2txt_options()
                    writeContent(block[[2L]], tag)
                    if (opts$showURLs)
   			put(" (URL: ",
-  			    gsub("\n", "", paste(as.character(block[[1L]]), collapse="")),
+  			    trimws(gsub("\n", "",
+                                        paste(as.character(block[[1L]]),
+                                              collapse=""))),
   			    ")")
                },
                "\\Sexpr"= put(as.character.Rd(block, deparse=TRUE)),
@@ -771,7 +771,7 @@ Rd2txt <-
         }
         result <- matrix("", sum(lines), cols)
         for (i in seq_len(cols))
-            result[, i] <- blanks(widths[i])
+            result[, i] <- strrep(" ", widths[i])
         firstline <- c(1L, 1L+cumsum(lines))
         for (i in seq_along(entries)) {
             e <- entries[[i]]
@@ -856,7 +856,7 @@ Rd2txt <-
                                   indent <<- max(opts$minIndent,
                                                  indent + opts$extraIndent)
                                   keepFirstIndent <<- TRUE
-                                  putw(paste(rep_len(" ", indent0), collapse=""),
+                                  putw(strrep(" ", indent0),
                                        frmt(paste0(DLlab),
                                             justify="left", width=indent),
                                        " ")
@@ -915,7 +915,7 @@ Rd2txt <-
             return()
     	save <- c(indent, sectionLevel, keepFirstIndent, dropBlank, wrapping)
     	blankLine(min(sectionLevel, 1L))
-    	titlePrefix <- paste(rep("  ", sectionLevel), collapse="")
+    	titlePrefix <- strrep("  ", sectionLevel)
     	opts <- Rd2txt_options()
         indent <<- opts$sectionIndent + opts$sectionExtra*sectionLevel
         sectionLevel <<- sectionLevel + 1
@@ -988,8 +988,8 @@ Rd2txt <-
 		right <- paste0(right, "(", encoding, ")")
 	    pad <- max(HDR_WIDTH - nchar(left, "w") - nchar(mid, "w") - nchar(right, "w"), 0)
 	    pad0 <- pad %/% 2L
-	    pad1 <- paste(rep.int(" ", pad0), collapse = "")
-	    pad2 <- paste(rep.int(" ", pad - pad0), collapse = "")
+	    pad1 <- strrep(" ", pad0)
+	    pad2 <- strrep(" ", pad - pad0)
 	    putf(paste0(left, pad1, mid, pad2, right, "\n\n"))
 	}
 
diff --git a/src/library/tools/R/RdConv2.R b/src/library/tools/R/RdConv2.R
index 9163daf..6f18975 100644
--- a/src/library/tools/R/RdConv2.R
+++ b/src/library/tools/R/RdConv2.R
@@ -1,7 +1,7 @@
 #  File src/library/tools/R/RdConv2.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
-#  Copyright (C) 1995-2013 The R Core Team
+#  Copyright (C) 1995-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
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 
 RdTags <- function(Rd) {
@@ -122,7 +122,8 @@ RweaveRdOptions <- function(options)
     options
 }
 
-tagged <- function(x, tag) structure(x, Rd_tag=tag)
+tagged <- function(x, tag, srcref = NULL)
+    structure(x, Rd_tag = tag, srcref = srcref)
 
 evalWithOpt <- function(expr, options, env)
 {
@@ -183,7 +184,7 @@ setDynamicFlags <- function(block, flags) {  # flags in format coming from getDy
     block
 }
 
-processRdChunk <- function(code, stage, options, env, Rdfile)
+processRdChunk <- function(code, stage, options, env, Rdfile, macros)
 {
     if (is.null(opts <- attr(code, "Rd_option"))) opts <- ""
     codesrcref <- attr(code, "srcref")
@@ -267,9 +268,9 @@ processRdChunk <- function(code, stage, options, env, Rdfile)
 	    writeLines(res, tmpcon, useBytes = TRUE)
 	    parseFragment <- function(cond) {
 	    	               seek(tmpcon, 0)
-	    	               parse_Rd(tmpcon, fragment=TRUE)
+	    	               parse_Rd(tmpcon, fragment=TRUE, macros = macros)
 	    	            }
-	    res <- tryCatch(parse_Rd(tmpcon, fragment=FALSE),
+	    res <- tryCatch(parse_Rd(tmpcon, fragment=FALSE, macros = macros),
 	    	            warning = parseFragment, error = parseFragment,
 	    	            finally = close(tmpcon))
 	    # Now remove that extra newline added by the writeLines
@@ -368,7 +369,7 @@ processRdIfdefs <- function(blocks, defines)
 
 processRdSexprs <-
     function(block, stage, options = RweaveRdDefaults,
-             env = new.env(hash = TRUE, parent = globalenv()))
+             env = new.env(hash = TRUE, parent = globalenv()), macros)
 {
     recurse <- function(block) {
     	if (!any(getDynamicFlags(block)[stage])) return(block)
@@ -376,7 +377,7 @@ processRdSexprs <-
         if (is.list(block)) {
             if (!is.null(tag <- attr(block, "Rd_tag"))) {
         	if (tag == "\\Sexpr")
-            	    block <- processRdChunk(block, stage, options, env)
+            	    block <- processRdChunk(block, stage, options, env, macros=macros)
             	else if (tag == "\\RdOpts")
     	    	    options <<-
                         utils:::SweaveParseOptions(block, options, RweaveRdOptions)
@@ -415,12 +416,12 @@ prepare_Rd <-
 	pratt <- attr(Rd, "prepared")
 	if (is.null(pratt)) pratt <- 0L
 	if ("build" %in% stages)
-	    Rd <- processRdSexprs(Rd, "build", options)
+	    Rd <- processRdSexprs(Rd, "build", options, macros=attr(Rd, "macros"))
 	if (!is.null(defines))
 	    Rd <- processRdIfdefs(Rd, defines)
 	for (stage in c("install", "render"))
 	    if (stage %in% stages)
-		Rd <- processRdSexprs(Rd, stage, options)
+		Rd <- processRdSexprs(Rd, stage, options, macros=attr(Rd, "macros"))
 	if (pratt < 2L && stage2)
 	    Rd <- prepare2_Rd(Rd, Rdfile)
 	meta <- attr(Rd, "meta")
@@ -456,11 +457,10 @@ prepare2_Rd <- function(Rd, Rdfile)
 
     ## Check other sections are unique
     unique_tags <-
-        paste("\\",
-              c("usage", "arguments", "synopsis",
-                "format", "details", "value", "references", "source",
-                "seealso", "examples", "author", "encoding"),
-              sep = "")
+        paste0("\\",
+               c("usage", "arguments", "synopsis",
+                 "format", "details", "value", "references", "source",
+                 "seealso", "examples", "author", "encoding"))
     for (tag in unique_tags) {
         where <- which(sections == tag)
         if(length(where) > 1L) {
@@ -616,8 +616,6 @@ checkRd <- function(Rd, defines=.Platform$OS.type, stages = "render",
         .messages <<- c(.messages, msg)
     }
 
-    checkWrapped <- function(tag, block) checkContent(block, tag)
-
     checkLink <- function(tag, block) {
     	option <- attr(block, "Rd_option")
     	if(!is.null(option)) checkContent(option, tag)
@@ -723,7 +721,7 @@ checkRd <- function(Rd, defines=.Platform$OS.type, stages = "render",
     		   if (!all(tags %in% c("TEXT", "\\Sexpr")))
     		       stopRd(block, Rdfile, "Condition must be \\Sexpr or plain text")
     		   condition <- condition[tags == "TEXT"]
-    		   allow <- .strip_whitespace(strsplit(paste(condition, collapse=""), ",")[[1L]])
+    		   allow <- trimws(strsplit(paste(condition, collapse=""), ",")[[1L]])
     		   unknown <- allow[!(allow %in%
     		          c("", "latex", "example", "text", "html", "TRUE", "FALSE"))]
     		   if (length(unknown))
@@ -960,12 +958,11 @@ checkRd <- function(Rd, defines=.Platform$OS.type, stages = "render",
     ## \alias, \keyword and \note are allowed to be repeated
     ## Normally prepare_Rd will have dropped duplicates already
     unique_tags <-
-        paste("\\",
-              c("name", "title", # "description" checked above
-                "usage", "arguments",  "synopsis",
-                "format", "details", "value", "references", "source",
-                "seealso", "examples", "author", "encoding"),
-              sep = "")
+        paste0("\\",
+               c("name", "title", # "description" checked above
+                 "usage", "arguments",  "synopsis",
+                 "format", "details", "value", "references", "source",
+                 "seealso", "examples", "author", "encoding"))
     for(tag in intersect(sections[duplicated(sections)], unique_tags))
         warnRd(Rd, Rdfile, level = 5,
                sprintf("multiple sections named '%s' are not allowed", tag))
@@ -978,7 +975,7 @@ checkRd <- function(Rd, defines=.Platform$OS.type, stages = "render",
 
 print.checkRd <- function(x, minlevel = -Inf, ...)
 {
-    fromParse <- grepl("^prepare_Rd", x)
+    fromParse <- startsWith(x, "prepare_Rd")
     x1 <- x[fromParse]
     x2 <- x[!fromParse]
     levs <- as.numeric(sub("^checkRd: \\(([-0123456789]+)(.*)", "\\1", x2))
@@ -992,7 +989,7 @@ testRdConditional <- function(format, conditional, Rdfile) {
     tags <- RdTags(condition)
     if (!all(tags == "TEXT")) stopRd(conditional, Rdfile, "condition must be plain text")
 
-    allow <- .strip_whitespace(strsplit(paste(condition, collapse=""), ",")[[1L]])
+    allow <- trimws(strsplit(paste(condition, collapse=""), ",")[[1L]])
     any(c("TRUE", format) %in% allow)
 }
 
diff --git a/src/library/tools/R/RdHelpers.R b/src/library/tools/R/RdHelpers.R
new file mode 100644
index 0000000..11ccaa6
--- /dev/null
+++ b/src/library/tools/R/RdHelpers.R
@@ -0,0 +1,119 @@
+#  File src/library/tools/R/RdHelpers.R
+#  Part of the R package, https://www.R-project.org
+#
+#  Copyright (C) 2014 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
+#  the Free Software Foundation; either version 2 of the License, or
+#  (at your option) any later version.
+#
+#  This program is distributed in the hope that it will be useful,
+#  but WITHOUT ANY WARRANTY; without even the implied warranty of
+#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#  GNU General Public License for more details.
+#
+#  A copy of the GNU General Public License is available at
+#  https://www.R-project.org/Licenses/
+
+Rd_expr_PR <- function(x)
+{
+    baseurl <- "https://bugs.R-project.org/bugzilla3/show_bug.cgi?id"
+    sprintf("\\href{%s=%s}{PR#%s}", baseurl, x, x)
+}
+
+# These following functions are to take information from the package DESCRIPTION file
+# at build time.  During a build, the current directory holds the DESCRIPTION file;
+# set dir to something else if used in a different context.
+
+Rd_package_title <- function(pkg, dir = ".")
+{
+    desc <- .read_description(file.path(dir, "DESCRIPTION"))
+    if (pkg != desc["Package"])
+    	stop(gettextf("DESCRIPTION file is for package '%s', not '%s'", desc["Package"], pkg))
+    desc["Title"]
+}
+
+Rd_package_description <- function(pkg, dir = ".")
+{
+    desc <- .read_description(file.path(dir, "DESCRIPTION"))
+    if (pkg != desc["Package"])
+    	stop(gettextf("DESCRIPTION file is for package '%s', not '%s'", desc["Package"], pkg))
+    desc["Description"]
+}
+
+Rd_package_author <- function(pkg, dir = ".")
+{
+    desc <- .read_description(file.path(dir, "DESCRIPTION"))
+    if (pkg != desc["Package"])
+    	stop(gettextf("DESCRIPTION file is for package '%s', not '%s'", desc["Package"], pkg))
+    desc["Author"]
+}
+
+Rd_package_maintainer <- function(pkg, dir = ".")
+{
+    desc <- .read_description(file.path(dir, "DESCRIPTION"))
+    if (pkg != desc["Package"])
+    	stop(gettextf("DESCRIPTION file is for package '%s', not '%s'", desc["Package"], pkg))
+    desc["Maintainer"]
+}
+
+Rd_package_DESCRIPTION <- function(pkg, lib.loc = Sys.getenv("R_BUILD_TEMPLIB"))
+{
+    if (!length(find.package(pkg, lib.loc = lib.loc, quiet=TRUE)))
+        "This package was not yet installed at build time.\\cr"
+    else {    
+	tabular <- function(col1, col2)
+	    c("\\tabular{ll}{", paste0(col1, " \\tab ", col2, "\\cr"), "}")
+
+	desc <- utils::packageDescription(pkg, lib.loc = lib.loc)
+	if (pkg != desc[["Package"]])
+	    stop(gettextf("DESCRIPTION file is for package '%s', not '%s'", desc["Package"], pkg))
+	desc <- desc[names(desc) != "Built"] # Probably a stale value
+	tabular(paste0(names(desc), ":"), unlist(desc))
+    }
+}
+
+Rd_package_indices <- function(pkg, lib.loc = Sys.getenv("R_BUILD_TEMPLIB"))
+{
+    if (!length(find.package(pkg, lib.loc = lib.loc, quiet=TRUE)))
+        result <- c("", "Index:  This package was not yet installed at build time.\\cr")
+    else {    
+    	tabular <- function(col1, col2)
+    	    c("\\tabular{ll}{", paste0(col1, " \\tab ", col2, "\\cr"), "}")
+    
+        info <- library(help = pkg, lib.loc = lib.loc,
+	  	    character.only = TRUE)
+
+	result <- NULL
+	# FIXME:  these indices should contain links...
+	if (!is.null(info$info[[2L]]))
+	    result <- c("", "Index of help topics:", "\\preformatted{",
+				  info$info[[2L]], "}")
+	if (!is.null(info$info[[3L]]))
+	    result <- c(result, "",
+			"Further information is available in the following vignettes:\\cr\\cr",
+			tabular(paste0("\\code{", info$info[[3L]][,1], "}"),
+			      info$info[[3L]][,2]))
+    }
+    result
+}
+
+Rd_expr_doi <- function(x)
+{
+    ## Be nice ...
+    x <- .canonicalize_doi(x)
+
+    ## Poor person's way to allow LaTeX to break lines at slashes and
+    ## dashes:
+    y <- gsub("/", "\\\\out{\\\\slash{}}", gsub("-", "\\\\out{\\\\-}", x))
+
+    sprintf("\\ifelse{text}{%s}{\\ifelse{latex}{%s}{%s}}",
+            sprintf("doi: %s (URL: http://doi.org/%s)",
+                    x, x),
+            sprintf("doi:\\out{\\nobreakspace{}}\\href{http://doi.org/%s}{%s}",
+                    x, y),
+            sprintf("doi: \\href{http://doi.org/%s}{%s}",
+                    x, x)
+            )
+}
diff --git a/src/library/tools/R/Rdtools.R b/src/library/tools/R/Rdtools.R
index 2c220b9..d6ea5f9 100644
--- a/src/library/tools/R/Rdtools.R
+++ b/src/library/tools/R/Rdtools.R
@@ -1,7 +1,7 @@
 #  File src/library/tools/R/Rdtools.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
-#  Copyright (C) 1995-2013 The R Core Team
+#  Copyright (C) 1995-2014 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
@@ -14,12 +14,13 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 
 RdTextFilter <-
 function(ifile, encoding = "unknown", keepSpacing = TRUE,
-         drop = character(), keep = character())
+         drop = character(), keep = character(),
+         macros = file.path(R.home("share"), "Rd", "macros", "system.Rd"))
 {
     if(inherits(ifile, "srcfile"))
         ifile <- ifile$filename
@@ -29,7 +30,7 @@ function(ifile, encoding = "unknown", keepSpacing = TRUE,
 	p <- ifile[ order(srcrefs[1,], srcrefs[2,]) ]
 	class(p) <- class(ifile)
     } else
-    	p <- parse_Rd(ifile, encoding = encoding)
+    	p <- parse_Rd(ifile, encoding = encoding, macros = macros)
 
     tags <- RdTags(p)
 
@@ -37,7 +38,7 @@ function(ifile, encoding = "unknown", keepSpacing = TRUE,
 	encoding <- p[[which.max(tags == "\\encoding")]][[1L]]
 	if (encoding %in% c("UTF-8", "utf-8", "utf8")) encoding <- "UTF-8"
 	if (!inherits(ifile, "Rd"))
-	    p <- parse_Rd(ifile, encoding=encoding)
+	    p <- parse_Rd(ifile, encoding=encoding, macros = macros)
     } else
 	encoding <- ""
 
@@ -50,7 +51,7 @@ function(ifile, encoding = "unknown", keepSpacing = TRUE,
     ##     mycat("\n")
     ## })$output
 
-    myval <- character()
+##    myval <- character()
     mycon <- textConnection("myval", open = "w", local = TRUE,
                             encoding = "UTF-8")
     on.exit(close(mycon))
@@ -87,9 +88,7 @@ function(ifile, encoding = "unknown", keepSpacing = TRUE,
     show <- function(x) {
 	srcref <- attr(x, "srcref")
 	firstline <- srcref[1L]
-	firstbyte <- srcref[2L]
 	lastline <- srcref[3L]
-	lastbyte <- srcref[4L]
 	firstcol <- srcref[5L]
 	lastcol <- srcref[6L]
 	tag <- attr(x, "Rd_tag")
diff --git a/src/library/tools/R/Rprof.R b/src/library/tools/R/Rprof.R
index f569590..7fff2dd 100644
--- a/src/library/tools/R/Rprof.R
+++ b/src/library/tools/R/Rprof.R
@@ -1,7 +1,7 @@
 #  File src/library/tools/R/Rprof.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
-#  Copyright (C) 1995-2013 The R Core Team
+#  Copyright (C) 1995-2014 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
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 .Rprof <- function(args = NULL)
 {
@@ -37,7 +37,7 @@
             "",
             "If 'file' is omitted 'Rprof.out' is used",
             "",
-            "Report bugs at bugs.r-project.org .", sep = "\n")
+            "Report bugs at <https://bugs.R-project.org>.", sep = "\n")
     }
 
     if (is.null(args)) {
@@ -62,7 +62,7 @@
                 R.version[["major"]], ".",  R.version[["minor"]],
                 " (r", R.version[["svn rev"]], ")\n", sep = "")
             cat("",
-                "Copyright (C) 1997-2013 The R Core Team.",
+                "Copyright (C) 1997-2014 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/Sweavetools.R b/src/library/tools/R/Sweavetools.R
index e9bc379..af3aa31 100644
--- a/src/library/tools/R/Sweavetools.R
+++ b/src/library/tools/R/Sweavetools.R
@@ -1,7 +1,7 @@
 #  File src/library/tools/R/Sweavetools.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
-#  Copyright (C) 1995-2013 The R Core Team
+#  Copyright (C) 1995-2015 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
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 
 SweaveTeXFilter <-
@@ -23,17 +23,29 @@ function(ifile, encoding = "unknown")
     if(inherits(ifile, "srcfile"))
         ifile <- ifile$filename
 
-    lines <- readLines(ifile, encoding = encoding, warn = FALSE)
-
     syntax <- utils:::SweaveGetSyntax(ifile)
 
+    ## Read in an re-encode as needed.
+    ## Alternatively, could use utils:::SweaveReadFile() ...
+    lines <- readLines(ifile, warn = FALSE)
+    if(encoding != "unknown") {
+        if(encoding == "UTF-8")
+            Encoding(lines) <- "UTF-8"
+        else
+            lines <- iconv(lines, encoding, "", sub = "byte")
+    }
+
     TEXT <- 1L
     CODE <- 0L
 
-    recs <- rbind( data.frame(line = grep(syntax$doc, lines),
-                              type = TEXT),
-                   data.frame(line = grep(syntax$code, lines),
-                              type = CODE))
+    dpos <- grep(syntax$doc, lines)
+    cpos <- grep(syntax$code, lines)
+
+    recs <- rbind(data.frame(line = dpos,
+                             type = rep.int(TEXT, length(dpos))),
+                  data.frame(line = cpos,
+                             type = rep.int(CODE, length(cpos)))
+                  )
     recs <- recs[order(recs$line),]
     last <- 0L
     state <- TEXT
diff --git a/src/library/tools/R/Vignettes.R b/src/library/tools/R/Vignettes.R
index 77f58a8..9368b05 100644
--- a/src/library/tools/R/Vignettes.R
+++ b/src/library/tools/R/Vignettes.R
@@ -1,7 +1,7 @@
 #  File src/library/tools/R/Vignettes.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
-#  Copyright (C) 1995-2014 The R Core Team
+#  Copyright (C) 1995-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
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 vignette_is_tex <- function(file, ...) {
     (regexpr("[.]tex$", file, ignore.case = TRUE) != -1L)
@@ -44,7 +44,7 @@ find_vignette_product <-
     function(name, by = c("weave", "tangle", "texi2pdf"),
              final = FALSE, main = TRUE, dir = ".", engine, ...)
 {
-    stopifnot(length(name) == 1L, file_test("-d", dir))
+    stopifnot(length(name) == 1L, dir.exists(dir))
     by <- match.arg(by)
     exts <- ## (lower case here):
 	switch(by,
@@ -166,12 +166,15 @@ function(package, dir, lib.loc = NULL,
         file <- basename(file)
         name <- vigns$names[i]
     	engine <- vignetteEngine(vigns$engines[i])
-
+	enc <- vigns$encodings[i]
+        if (enc == "non-ASCII")
+            stop(gettextf("Vignette '%s' is non-ASCII but has no declared encoding", name),
+                 domain = NA)
         if(tangle) {
             message("  Running ", sQuote(file))
             .eval_with_capture({
                 result$tangle[[file]] <- tryCatch({
-                    engine$tangle(file, quiet = TRUE)
+                    engine$tangle(file, quiet = TRUE, encoding = enc)
                     setwd(startdir) # in case a vignette changes the working dir
                     find_vignette_product(name, by = "tangle", main = FALSE, engine = engine)
                 }, error = function(e) e)
@@ -181,7 +184,7 @@ function(package, dir, lib.loc = NULL,
             setwd(startdir) # in case a vignette changes the working dir then errored out
             .eval_with_capture({
                 result$weave[[file]] <- tryCatch({
-                    engine$weave(file, quiet = TRUE)
+                    engine$weave(file, quiet = TRUE, encoding = enc)
                     setwd(startdir)
                     find_vignette_product(name, by = "weave", engine = engine)
                 }, error = function(e) e)
@@ -247,15 +250,15 @@ function(package, dir, lib.loc = NULL,
     if(weave && latex) {
         if(!("Makefile" %in% list.files(vigns$dir))) {
             ## <NOTE>
-            ## This used to run texi2dvi on *all* vignettes, including
+            ## This used to run texi2pdf on *all* vignettes, including
             ## the ones already known from the above to give trouble.
-            ## In addition, texi2dvi errors were not caught, so that in
+            ## In addition, texi2pdf errors were not caught, so that in
             ## particular the results of the previous QC analysis were
             ## *not* returned in case of such errors ...
             ## Hence, let us
-            ## * Only run texi2dvi() on previously unproblematic vignettes
-            ## * Catch texi2dvi() errors similar to the above.
-            ## * Do *not* immediately show texi2dvi() output as part of
+            ## * Only run texi2pdf() on previously unproblematic vignettes
+            ## * Catch texi2pdf() errors similar to the above.
+            ## * Do *not* immediately show texi2pdf() output as part of
             ##   running checkVignettes().
             ## (For the future, maybe keep this output and provide it as
             ## additional diagnostics ...)
@@ -354,7 +357,7 @@ function(package, dir, subdirs = NULL, lib.loc = NULL, output = FALSE,
     if(missing(dir))
 	stop("you must specify 'package' or 'dir'")
     ## Using sources from directory @code{dir} ...
-    if(!file_test("-d", dir))
+    if(!dir.exists(dir))
 	stop(gettextf("directory '%s' does not exist", dir), domain = NA)
     else {
 	dir <- file_path_as_absolute(dir)
@@ -362,12 +365,12 @@ function(package, dir, subdirs = NULL, lib.loc = NULL, output = FALSE,
 	    subdirs <- if (missing(package)) "vignettes" else "doc"
 	for (subdir in subdirs) {
 	    docdir <- file.path(dir, subdir)
-	    if(file_test("-d", docdir))
+	    if(dir.exists(docdir))
 		break
 	}
     }
 
-    if(!file_test("-d", docdir)) return(NULL)
+    if(!dir.exists(docdir)) return(NULL)
 
     # Locate all vignette files
     buildPkgs <- loadVignetteBuilder(dir, mustwork = FALSE)
@@ -414,7 +417,10 @@ function(package, dir, subdirs = NULL, lib.loc = NULL, output = FALSE,
 	      length(engines)  == length(docs),
 	      length(patterns) == length(docs), !anyDuplicated(docs))
 
-    z <- list(docs=docs, names=names, engines=engines, patterns=patterns,
+    defaultEncoding <- .get_package_metadata(dir)["Encoding"]
+    encodings <- vapply(docs, getVignetteEncoding, "", default = defaultEncoding)
+
+    z <- list(docs=docs, names=names, engines=engines, patterns=patterns, encodings = encodings,
 	      dir = docdir, pkgdir = dir, msg = msg)
 
     if (output) {
@@ -500,10 +506,15 @@ buildVignettes <-
     for(i in seq_along(vigns$docs)) {
         file <- basename(vigns$docs[i])
         name <- vigns$names[i]
-    	engine <- vignetteEngine(vigns$engine[i])
+    	engine <- vignetteEngine(vigns$engines[i])
+        enc <- vigns$encodings[i]
+        if (enc == "non-ASCII")
+            stop(gettextf("Vignette '%s' is non-ASCII but has no declared encoding",
+                 file), domain = NA, call. = FALSE)
 
         output <- tryCatch({
-            engine$weave(file, quiet = quiet)
+            ## FIXME: run this in a separate process
+            engine$weave(file, quiet = quiet, encoding = enc)
             setwd(startdir)
             find_vignette_product(name, by = "weave", engine = engine)
         }, error = function(e) {
@@ -520,7 +531,8 @@ buildVignettes <-
 
         if (tangle) {  # This is set for all engines as of 3.0.2
             output <- tryCatch({
-                engine$tangle(file, quiet = quiet)
+                ## FIXME: run this in a separate process
+                engine$tangle(file, quiet = quiet, encoding = enc)
                 setwd(startdir)
                 find_vignette_product(name, by = "tangle", main = FALSE, engine = engine)
             }, error = function(e) {
@@ -544,12 +556,12 @@ buildVignettes <-
         if(yy > 0) stop("running 'make' failed")
         ## See if Makefile has a clean: target, and if so run it.
         if(clean &&
-           any(grepl("^clean:", readLines("Makefile", warn = FALSE))))
+	   any(startsWith(readLines("Makefile", warn = FALSE), "clean:")))
             system(paste(make, "clean"))
     } else {
         ## Badly-written vignettes open a pdf() device on Rplots.pdf and
         ## fail to close it.
-        graphics.off()
+        grDevices::graphics.off()
 
         keep <- c(outputs, unlist(sourceList))
         if(clean) {
@@ -584,11 +596,12 @@ buildVignettes <-
 buildVignette <-
     function(file, dir = ".", weave = TRUE, latex = TRUE, tangle = TRUE,
              quiet = TRUE, clean = TRUE, keep = character(),
-             engine = NULL, buildPkg = NULL, ...)
+             engine = NULL, buildPkg = NULL,
+	     encoding = getVignetteEncoding(file), ...)
 {
     if (!file_test("-f", file))
 	stop(gettextf("file '%s' not found", file), domain = NA)
-    if (!file_test("-d", dir))
+    if (!dir.exists(dir))
 	stop(gettextf("directory '%s' does not exist", dir), domain = NA)
 
     if (!is.null(buildPkg))
@@ -613,6 +626,9 @@ buildVignette <-
 		file, paste(engine$package, engine$name, sep="::")),
 		domain = NA)
 
+    if (encoding == "non-ASCII")
+    	stop(gettextf("Vignette '%s' is non-ASCII but has no declared encoding", name))
+
     # Set output directory temporarily
     file <- file_path_as_absolute(file)
     olddir <- setwd(dir)
@@ -629,7 +645,7 @@ buildVignette <-
 
     # Weave
     final <- if (weave) {
-	engine$weave(file, quiet = quiet, ...)
+	engine$weave(file, quiet = quiet, encoding = encoding, ...)
 	setwd(tdir)  # In case weave/vignette changed it
 	output <- find_vignette_product(name, by = "weave", engine = engine)
 
@@ -643,7 +659,7 @@ buildVignette <-
 
     # Tangle
     sources <- if (tangle) {
-	engine$tangle(file, quiet = quiet, ...)
+	engine$tangle(file, quiet = quiet, encoding = encoding, ...)
 	setwd(tdir)  # In case tangle changed it
 	find_vignette_product(name, by = "tangle", main = FALSE, engine = engine)
     } # else NULL
@@ -665,72 +681,74 @@ buildVignette <-
     ##     f <- f[file_test("-f", f)]
     ##     file.remove(f)
     ## #}
+
+    if((is.na(clean) || clean) && file.exists(".build.timestamp")) {
+        file.remove(".build.timestamp")
+    }
+
     unique(keep)
 }
 
-### * .getVignetteEncoding
+### * getVignetteEncoding
 
 getVignetteEncoding <-  function(file, ...)
 {
-    # Look for inputen[cx] first, then %\SweaveUTF8.  Complain about
-    # inconsistencies.
-
     lines <- readLines(file, warn = FALSE)
-    result1 <- .getVignetteEncoding(lines, ...)
-
-    poss <- grep("^[[:space:]]*%+[[:space:]]*\\\\SweaveUTF8[[:space:]]*$", lines, useBytes = TRUE)
-    if (length(poss)) {
-    	result <- "UTF-8"
-    	if (!(result1 %in% c("", "non-ASCII", "UTF-8")))
-    	    stop(gettextf("Inconsistent encoding specifications: %s with %%\\SweaveUTF8", result1), domain = NA)
-    } else
-    	result <- result1
-    result
+    .getVignetteEncoding(lines, ...)
 }
 
-.getVignetteEncoding <- function(lines, convert = FALSE)
+.getVignetteEncoding <- function(lines, default = NA)
 {
-    ## Look for input enc lines using inputenc or inputenx
-    ## Note, multiple encodings are excluded.
-
-    poss <-
-        grep("^[[:space:]]*\\\\usepackage\\[([[:alnum:]]+)\\]\\{inputen[cx]\\}",
-             lines, useBytes = TRUE)
-    ## Check it is in the preamble
-    start <- grep("^[[:space:]]*\\\\begin\\{document\\}",
-                  lines, useBytes = TRUE)
-    if(length(start)) poss <- poss[poss < start[1L]]
-    if(!length(poss)) {
-        asc <- iconv(lines, "latin1", "ASCII")
-        ind <- is.na(asc) | asc != lines
-        if(any(ind)) return("non-ASCII")
-        return("") # or "ASCII"
-    }
-    poss <- lines[poss[1L]]
-    res <- gsub("^[[:space:]]*\\\\usepackage\\[([[:alnum:]]+)\\].*", "\\1",
-                poss) # This line should be ASCII.
-    if (convert) {
-        ## see Rd2latex.R.
-        ## Currently utf8, utf8x, latin1, latin9 and ansinew are in use.
-        switch(res,
-               "utf8" =, "utf8x" = "UTF-8",
-               "latin1" =, "iso-8859-1" = "latin1",
-               "latin2" =, "iso-8859-2" = "latin2",
-               "latin9" =, "iso-8859-15" = "latin-9", # only form known to GNU libiconv
-               "latin10" =, "iso-8859-16" = "latin10",
-               "cyrillic" =, "iso-8859-5" =  "ISO-8859-5", # inputenx
-               "koi8-r" =  "KOI8-R", # inputenx
-               "arabic" = "ISO-8859-6", # Not clear next 3 are known to latex
-               "greek" =, "iso-8859-7" = "ISO-8859-7",
-               "hebrew" =, "iso-8859-8" = "ISO-8859-8",
-               "ansinew" = "CP1252",
-               "applemac" = "macroman",
-               ## assume these only get used on Windows
-               "cp1250" = "CP1250",
-               "cp1252" = "CP1252",
-               "cp1257" = "CP1257",
-               "unknown")
-    } else res
+    res <- .get_vignette_metadata(lines, "Encoding")[1L]
+
+    if(is.na(res)) {
+        poss <- grep("^[[:space:]]*%+[[:space:]]*\\\\SweaveUTF8[[:space:]]*$", lines, useBytes = TRUE)
+        if (length(poss))
+	    "UTF-8"
+        else {
+            ## Look for input enc lines using inputenc or inputenx
+            ## Note, multiple encodings are excluded.
+            poss <-
+                grep("^[[:space:]]*\\\\usepackage\\[([[:alnum:]]+)\\]\\{inputen[cx]\\}",
+                     lines, useBytes = TRUE)
+            ## Check it is in the preamble
+            start <- grep("^[[:space:]]*\\\\begin\\{document\\}",
+                          lines, useBytes = TRUE)
+            if(length(start))
+                poss <- poss[poss < start[1L]]
+            if(length(poss)) {
+        	poss <- lines[poss[1L]]
+        	res <- gsub("^[[:space:]]*\\\\usepackage\\[([[:alnum:]]+)\\].*", "\\1",
+                            poss)               # This line should be ASCII.
+		## see Rd2latex.R.
+		## Currently utf8, utf8x, latin1, latin9 and ansinew are in use.
+		switch(res,
+		       "utf8" =, "utf8x" = "UTF-8",
+		       "latin1" =, "iso-8859-1" = "latin1",
+		       "latin2" =, "iso-8859-2" = "latin2",
+		       "latin9" =, "iso-8859-15" = "latin-9", # only form known to GNU libiconv
+		       "latin10" =, "iso-8859-16" = "latin10",
+		       "cyrillic" =, "iso-8859-5" =  "ISO-8859-5", # inputenx
+		       "koi8-r" =  "KOI8-R", # inputenx
+		       "arabic" = "ISO-8859-6", # Not clear next 3 are known to latex
+		       "greek" =, "iso-8859-7" = "ISO-8859-7",
+		       "hebrew" =, "iso-8859-8" = "ISO-8859-8",
+		       "ansinew" = "CP1252",
+		       "applemac" = "macroman",
+		       ## assume these only get used on Windows
+		       "cp1250" = "CP1250",
+		       "cp1252" = "CP1252",
+		       "cp1257" = "CP1257",
+		       "unknown")
+	    } else if (!is.na(default)) {
+		default
+            } else { # Nothing else has indicated an encoding, maybe it's just ASCII
+                asc <- iconv(lines, "latin1", "ASCII")
+		if(anyNA(asc) || any(asc != lines)) "non-ASCII" else "" # or "ASCII"
+            }
+        }
+    } else
+	res
 }
 
 ### * .build_vignette_index
@@ -738,10 +756,13 @@ getVignetteEncoding <-  function(file, ...)
 .get_vignette_metadata <-
 function(lines, tag)
 {
-    meta_RE <- paste("[[:space:]]*%+[[:space:]]*\\\\Vignette", tag,
-                     "\\{([^}]*)\\}", sep = "")
+    ## <FIXME>
+    ## Why don't we anchor this to the beginning of a line?
+    meta_RE <- paste0("[[:space:]]*%+[[:space:]]*\\\\Vignette",
+                      tag, "\\{([^}]*(\\{[^}]*\\})*[^}]*)\\}.*")
+    ## </FIXME>
     meta <- grep(meta_RE, lines, value = TRUE, useBytes = TRUE)
-    .strip_whitespace(gsub(meta_RE, "\\1", meta))
+    trimws(gsub(meta_RE, "\\1", meta))
 }
 
 vignetteInfo <-
@@ -777,9 +798,8 @@ function(file)
          keywords = keywords, engine = engine)
 }
 
-## The below builds vignette indices via 'pkgVignettes' objects.
-.build_vignette_index <-
-function(vigns)
+## builds vignette indices from 'vigns', a pkgVignettes() result
+.build_vignette_index <- function(vigns)
 {
     stopifnot(inherits(vigns, "pkgVignettes"))
 
@@ -788,7 +808,7 @@ function(vigns)
     dir <- vigns$dir
     sources <- vigns$sources
 
-    if(!file_test("-d", dir))
+    if(!dir.exists(dir))
         stop(gettextf("directory '%s' does not exist", dir), domain = NA)
 
     nvigns <- length(files)
@@ -824,11 +844,7 @@ function(vigns)
     ## by 'R CMD build' (via 'R CMD INSTALL -l <lib>)
     ## which in case vignettes have not been built.
     outputs <- vigns$outputs
-    if (!is.null(outputs)) {
-        outputs <- basename(outputs)
-    } else {
-        outputs <- character(nvigns)
-    }
+    outputs <- if(!is.null(outputs)) basename(outputs) else character(nvigns)
 
     out <- data.frame(File = unlist(contents[, "File"]),
                       Title = unlist(contents[, "Title"]),
@@ -855,7 +871,7 @@ function(vigns)
 function(vignetteDir, pkgdir = ".")
 {
     dir <- file.path(pkgdir, vignetteDir)
-    if(!file_test("-d", dir))
+    if(!dir.exists(dir))
         stop(gettextf("directory '%s' does not exist", dir), domain = NA)
 
     subdir <- gsub(pkgdir, "", dir, fixed=TRUE)
@@ -872,9 +888,8 @@ print.check_vignette_index <-
 function(x, ...)
 {
     if(length(x)) {
-        writeLines(paste("Vignettes with missing or empty",
-                         "\\VignetteIndexEntry:"))
-        print(basename(unclass(x)), ...)
+        writeLines(c("Vignettes with missing or empty \\VignetteIndexEntry:",
+                     paste0("  ", basename(unclass(x)))))
     }
     invisible(x)
 }
@@ -888,42 +903,39 @@ function(pkg, con, vignetteIndex = NULL)
 {
     ## FIXME: in principle we could need to set an encoding here
     html <- c(HTMLheader("Vignettes and other documentation"),
-              paste0("<h2>Vignettes from package '", pkg,"'</h2>"))
-
-    if(NROW(vignetteIndex) == 0L) { ## NROW(NULL) = 0
-        html <-
-            c(html,
-              "The package contains no vignette meta-information.")
-    } else {
-    	vignetteIndex <- cbind(Package = pkg, as.matrix(vignetteIndex[,
-                               c("File", "Title", "PDF", "R")]))
-        html <- c(html, makeVignetteTable(vignetteIndex, depth = 3L))
-    }
+              paste0("<h2>Vignettes from package '", pkg,"'</h2>"),
+              if(NROW(vignetteIndex) == 0L) ## NROW(NULL) = 0
+                  "The package contains no vignette meta-information."
+              else {
+                  vignetteIndex <- cbind(Package = pkg,
+                                         as.matrix(vignetteIndex[, c("File", "Title", "PDF", "R")]))
+                  makeVignetteTable(vignetteIndex, depth = 3L)
+              })
     otherfiles <- list.files(system.file("doc", package = pkg))
     if(NROW(vignetteIndex))
         otherfiles <- setdiff(otherfiles,
                               c(vignetteIndex[, c("PDF", "File", "R")], "index.html"))
     if (length(otherfiles)) {
-    	otherfiles <- ifelse(file.info(system.file(file.path("doc", otherfiles), package=pkg))$isdir,
+    	otherfiles <- ifelse(dir.exists(system.file(file.path("doc", otherfiles), package = pkg)),
 			     paste0(otherfiles, "/"),
 			     otherfiles)
 	urls <- paste0('<a href="', otherfiles, '">', otherfiles, '</a>')
         html <- c(html, '<h2>Other files in the <span class="samp">doc</span> directory</h2>',
                   '<table width="100%">',
-		  '<col width="24%">',
-		  '<col width="50%">',
-		  '<col width="24%">',
+		  '<col style="width: 24%;" />',
+		  '<col style="width: 50%;" />',
+		  '<col style="width: 24%;" />',
                   paste0('<tr><td></td><td><span class="samp">',
                          iconv(urls, "", "UTF-8"), "</span></td></tr>"),
-                  "</dl>")
+                  "</table>")
     }
     html <- c(html, "</body></html>")
     writeLines(html, con=con)
 }
 
 vignetteDepends <-
-function(vignette, recursive = TRUE, reduce = TRUE,
-         local = TRUE, lib.loc = NULL)
+    function(vignette, recursive = TRUE, reduce = TRUE,
+             local = TRUE, lib.loc = NULL)
 {
     if (length(vignette) != 1L)
         stop("argument 'vignette' must be of length 1")
@@ -935,8 +947,7 @@ function(vignette, recursive = TRUE, reduce = TRUE,
 
     depMtrx <- getVigDepMtrx(vigDeps)
     instPkgs <- utils::installed.packages(lib.loc=lib.loc)
-    getDepList(depMtrx, instPkgs, recursive, local, reduce,
-               lib.loc)
+    getDepList(depMtrx, instPkgs, recursive, local, reduce)
 }
 
 getVigDepMtrx <-
@@ -992,10 +1003,9 @@ function(vig_name, docDir, encoding = "", pkgdir)
     stopifnot(length(i) == 1L)
 
     loadVignetteBuilder(pkgdir)
-    file <- vigns$docs[i]
-    file <- basename(file)
+    file <- basename(vigns$docs[i])
     name <- vigns$names[i]
-    engine <- vignetteEngine(vigns$engine[i])
+    engine <- vignetteEngine(vigns$engines[i])
 
     output <- tryCatch({
         engine$tangle(file, quiet = TRUE, encoding = encoding)
@@ -1006,7 +1016,7 @@ function(vig_name, docDir, encoding = "", pkgdir)
     })
 
     if(length(output) == 1L) {
-        res <- tryCatch({
+        tryCatch({
             source(output, echo = TRUE)
         }, error = function(e) {
             cat("\n  When sourcing ", sQuote(output), ":\n", sep="")
@@ -1190,7 +1200,7 @@ getVignetteInfo <- function(package = NULL, lib.loc = NULL, all = TRUE)
     ## Find the directories with a 'doc' subdirectory *possibly*
     ## containing vignettes.
 
-    paths <- paths[file_test("-d", file.path(paths, "doc"))]
+    paths <- paths[dir.exists(file.path(paths, "doc"))]
 
     empty <- cbind(Package = character(0),
                    Dir = character(0),
@@ -1206,8 +1216,7 @@ getVignetteInfo <- function(package = NULL, lib.loc = NULL, all = TRUE)
             entries <- readRDS(INDEX)
         if (NROW(entries) > 0) {
             # FIXME:  this test is unnecessary?
-            if (is.null(entries$R)) R <- rep("", NROW(entries))
-            else R <- entries$R
+            R <- if (is.null(entries$R)) rep("", NROW(entries)) else entries$R
             file <- basename(entries$File)
             pdf <- entries$PDF
             topic <- file_path_sans_ext(ifelse(R == "", ifelse(pdf == "", file, pdf), R))
diff --git a/src/library/tools/R/admin.R b/src/library/tools/R/admin.R
index 6e4a222..dba6c68 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, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
-#  Copyright (C) 1995-2013 The R Core Team
+#  Copyright (C) 1995-2015 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
@@ -14,14 +14,14 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 
 ### * .install_package_description
 
 ## called from basepkg.mk and .install_packages
 .install_package_description <-
-function(dir, outDir)
+function(dir, outDir, builtStamp=character())
 {
     ## Function for taking the DESCRIPTION package meta-information,
     ## checking/validating it, and installing it with the 'Built:'
@@ -33,7 +33,7 @@ function(dir, outDir)
     ## path to the DESCRIPTION file, and returns an object with check
     ## results and not the package metadata ...
     ok <- .check_package_description(file.path(dir, "DESCRIPTION"))
-    if(any(as.integer(sapply(ok, length)) > 0L)) {
+    if(any(as.integer(lengths(ok)) > 0L)) {
         stop(paste(gettext("Invalid DESCRIPTION file") ,
                    paste(.eval_with_capture(print(ok))$output,
                          collapse = "\n"),
@@ -64,10 +64,11 @@ function(dir, outDir)
 	paste0("R ",
 	       paste(R.version[c("major", "minor")], collapse = "."),
 	       "; ",
-	       if(file_test("-d", file.path(dir, "src"))) OStype else "",
+	       if(dir.exists(file.path(dir, "src"))) OStype else "",
 	       "; ",
+               ## Some build systems want to supply a package-build timestamp for reproducibility
 	       ## Prefer date in ISO 8601 format, UTC.
-	       format(Sys.time(), tz = "UTC", usetz = TRUE),
+	       if (length(builtStamp)==0) format(Sys.time(), tz = "UTC", usetz = TRUE) else builtStamp,
 	       ## Sys.time(),
 	       "; ",
 	       .OStype())
@@ -92,13 +93,16 @@ function(dir, outDir)
     .write_description(db, file.path(outDir, "DESCRIPTION"))
 
     outMetaDir <- file.path(outDir, "Meta")
-    if(!file_test("-d", outMetaDir) && !dir.create(outMetaDir))
+    if(!dir.exists(outMetaDir) && !dir.create(outMetaDir))
          stop(gettextf("cannot open directory '%s'",
                        outMetaDir),
               domain = NA)
     saveInfo <- .split_description(db)
     saveRDS(saveInfo, file.path(outMetaDir, "package.rds"))
 
+    features <- list(internalsID = .Internal(internalsID()))
+    saveRDS(features, file.path(outMetaDir, "features.rds"))
+
     invisible()
 }
 
@@ -164,7 +168,7 @@ function(dir, packages)
 
     for(p in unlist(strsplit(packages, "[[:space:]]+"))) {
         meta_dir <- file.path(dir, p, "Meta")
-        if(!file_test("-d", meta_dir) && !dir.create(meta_dir))
+        if(!dir.exists(meta_dir) && !dir.create(meta_dir))
             stop(gettextf("cannot open directory '%s'", meta_dir))
         package_info_dcf_file <- file.path(dir, p, "DESCRIPTION")
         package_info_rds_file <- file.path(meta_dir, "package.rds")
@@ -204,7 +208,7 @@ function(lib.loc = NULL)
 .install_package_code_files <-
 function(dir, outDir)
 {
-    if(!file_test("-d", dir))
+    if(!dir.exists(dir))
         stop(gettextf("directory '%s' does not exist", dir),
              domain = NA)
     dir <- file_path_as_absolute(dir)
@@ -229,12 +233,12 @@ function(dir, outDir)
     db <- .read_description(file.path(dir, "DESCRIPTION"))
 
     codeDir <- file.path(dir, "R")
-    if(!file_test("-d", codeDir)) return(invisible())
+    if(!dir.exists(codeDir)) return(invisible())
 
     codeFiles <- list_files_with_type(codeDir, "code", full.names = FALSE)
 
     collationField <-
-        c(paste("Collate", .OStype(), sep = "."), "Collate")
+        c(paste0("Collate.", .OStype()), "Collate")
     if(any(i <- collationField %in% names(db))) {
         collationField <- collationField[i][1L]
         codeFilesInCspec <- .read_collate_field(db[collationField])
@@ -245,7 +249,7 @@ function(dir, outDir)
             out <- gettextf("\nduplicated files in '%s' field:",
                             collationField)
             out <- paste(out,
-                         paste(" ", badFiles, collapse = "\n"),
+                         paste0("  ", badFiles, collapse = "\n"),
                          sep = "\n")
             stop(out, domain = NA)
         }
@@ -257,7 +261,7 @@ function(dir, outDir)
                             collationField,
                             codeDir)
             out <- paste(out,
-                         paste(" ", badFiles, collapse = "\n"),
+                         paste0("  ", badFiles, collapse = "\n"),
                          sep = "\n")
             stop(out, domain = NA)
         }
@@ -270,7 +274,7 @@ function(dir, outDir)
                             codeDir,
                             collationField)
             out <- paste(out,
-                         paste(" ", badFiles, collapse = "\n"),
+                         paste0("  ", badFiles, collapse = "\n"),
                          sep = "\n")
             stop(out, domain = NA)
         }
@@ -280,11 +284,11 @@ function(dir, outDir)
 
     codeFiles <- file.path(codeDir, codeFiles)
 
-    if(!file_test("-d", outDir) && !dir.create(outDir))
+    if(!dir.exists(outDir) && !dir.create(outDir))
         stop(gettextf("cannot open directory '%s'", outDir),
              domain = NA)
     outCodeDir <- file.path(outDir, "R")
-    if(!file_test("-d", outCodeDir) && !dir.create(outCodeDir))
+    if(!dir.exists(outCodeDir) && !dir.create(outCodeDir))
         stop(gettextf("cannot open directory '%s'", outCodeDir),
              domain = NA)
     outFile <- file.path(outCodeDir, db["Package"])
@@ -341,10 +345,10 @@ function(dir, outDir)
 function(dir, outDir)
 {
     options(warn = 1)                   # to ensure warnings get seen
-    if(!file_test("-d", dir))
+    if(!dir.exists(dir))
         stop(gettextf("directory '%s' does not exist", dir),
              domain = NA)
-    if(!file_test("-d", outDir))
+    if(!dir.exists(outDir))
         stop(gettextf("directory '%s' does not exist", outDir),
              domain = NA)
 
@@ -359,7 +363,7 @@ function(dir, outDir)
                  domain = NA)
 
     outMetaDir <- file.path(outDir, "Meta")
-    if(!file_test("-d", outMetaDir) && !dir.create(outMetaDir))
+    if(!dir.exists(outMetaDir) && !dir.create(outMetaDir))
          stop(gettextf("cannot open directory '%s'", outMetaDir),
               domain = NA)
     .install_package_Rd_indices(dir, outDir)
@@ -386,25 +390,25 @@ function(dir, outDir)
     packageName <- basename(outDir)
     ## </FIXME>
 
-    allRd <- if(file_test("-d", docsDir))
+    allRd <- if(dir.exists(docsDir))
         list_files_with_type(docsDir, "docs") else character()
     ## some people have man dirs without any valid .Rd files
     if(length(allRd)) {
         ## we want the date of the newest .Rd file we will install
-        newestRd <- max(file.info(allRd)$mtime)
+        newestRd <- max(file.mtime(allRd))
         ## these files need not exist, which gives NA.
         indices <- c(file.path("Meta", "Rd.rds"),
                      file.path("Meta", "hsearch.rds"),
                      file.path("Meta", "links.rds"),
                      "INDEX")
-        upToDate <- file.info(file.path(outDir, indices))$mtime >= newestRd
-        if(file_test("-d", dataDir)
+        upToDate <- file.mtime(file.path(outDir, indices)) >= newestRd
+        if(dir.exists(dataDir)
            && length(dataFiles <- list.files(dataDir))) {
             ## Note that the data index is computed from both the package's
             ## Rd files and the data sets actually available.
-            newestData <- max(file.info(dataFiles)$mtime)
+            newestData <- max(file.mtime(dataFiles))
             upToDate <- c(upToDate,
-                          file.info(file.path(outDir, "Meta", "data.rds"))$mtime >=
+                          file.mtime(file.path(outDir, "Meta", "data.rds")) >=
                           max(newestRd, newestData))
         }
         ## Note that this is not quite good enough: an Rd file or data file
@@ -455,7 +459,7 @@ function(dir, outDir)
                  file.path(outDir, "Meta", "links.rds"))
 
     }
-    if(file_test("-d", dataDir))
+    if(dir.exists(dataDir))
         saveRDS(.build_data_index(dataDir, contents),
                  file.path(outDir, "Meta", "data.rds"))
     invisible()
@@ -469,7 +473,7 @@ function(dir, outDir, encoding = "")
 {
     dir <- file_path_as_absolute(dir)
     subdirs <- c("vignettes", file.path("inst", "doc"))
-    ok <- file_test("-d", file.path(dir, subdirs))
+    ok <- dir.exists(file.path(dir, subdirs))
     ## Create a vignette index only if the vignette dir exists.
     if (!any(ok))
        return(invisible())
@@ -481,7 +485,7 @@ function(dir, outDir, encoding = "")
     packageName <- basename(outDir)
     outVignetteDir <- file.path(outDir, "doc")
     ## --fake  and --no-inst installs do not have a outVignetteDir.
-    if(!file_test("-d", outVignetteDir)) return(invisible())
+    if(!dir.exists(outVignetteDir)) return(invisible())
 
     ## If there is an HTML index in the @file{inst/doc} subdirectory of
     ## the package source directory (@code{dir}), we do not overwrite it
@@ -530,8 +534,7 @@ function(dir, outDir, encoding = "")
             if (!is.null(vigns$sources) && !is.null(vigns$sources[file][[1]]))
             	next
             file <- basename(file)
-            enc <- getVignetteEncoding(file, TRUE)
-            if(enc %in% c("non-ASCII", "unknown")) enc <- encoding
+            enc <- vigns$encodings[i]
 
             cat("  ", sQuote(basename(file)),
                 if(nzchar(enc)) paste("using", sQuote(enc)), "\n")
@@ -621,7 +624,7 @@ function(dir, outDir, encoding = "")
 function(dir, outDir)
 {
     demoDir <- file.path(dir, "demo")
-    if(!file_test("-d", demoDir)) return(invisible())
+    if(!dir.exists(demoDir)) return(invisible())
     demoIndex <- .build_demo_index(demoDir)
     saveRDS(demoIndex,
              file = file.path(outDir, "Meta", "demo.rds"))
@@ -659,7 +662,7 @@ function(dir, outDir, keep.source = TRUE)
 
     outDir <- file_path_as_absolute(outDir)
     outVignetteDir <- file.path(outDir, "doc")
-    if(!file_test("-d", outVignetteDir) && !dir.create(outVignetteDir))
+    if(!dir.exists(outVignetteDir) && !dir.create(outVignetteDir))
         stop(gettextf("cannot open directory '%s'", outVignetteDir),
              domain = NA)
 
@@ -679,7 +682,7 @@ function(dir, outDir, keep.source = TRUE)
     if (is.null(cwd))
         stop("current working directory cannot be ascertained")
     buildDir <- file.path(cwd, ".vignettes")
-    if(!file_test("-d", buildDir) && !dir.create(buildDir))
+    if(!dir.exists(buildDir) && !dir.create(buildDir))
         stop(gettextf("cannot create directory '%s'", buildDir), domain = NA)
     on.exit(setwd(cwd))
     setwd(buildDir)
@@ -755,7 +758,7 @@ function(dir, outDir)
     if(file_test("-nt", nsInfoFilePath, nsFile)) return(invisible())
     nsInfo <- parseNamespaceFile(basename(dir), dirname(dir))
     outMetaDir <- file.path(outDir, "Meta")
-    if(!file_test("-d", outMetaDir) && !dir.create(outMetaDir))
+    if(!dir.exists(outMetaDir) && !dir.create(outMetaDir))
         stop(gettextf("cannot open directory '%s'", outMetaDir),
              domain = NA)
     saveRDS(nsInfo, nsInfoFilePath)
@@ -787,13 +790,19 @@ function(dir, outDir, encoding = "unknown")
 {
     dir <- file_path_as_absolute(dir)
     mandir <- file.path(dir, "man")
-    manfiles <- if(!file_test("-d", mandir)) character()
+    manfiles <- if(!dir.exists(mandir)) character()
     else list_files_with_type(mandir, "docs")
     manOutDir <- file.path(outDir, "help")
     dir.create(manOutDir, FALSE)
     db_file <- file.path(manOutDir,
                          paste0(basename(outDir), ".rdx"))
     built_file <- file.path(dir, "build", "partial.rdb")
+    macro_files <- list.files(file.path(dir, "man", "macros"), pattern = "\\.Rd$", full.names = TRUE)
+    if (length(macro_files)) {
+    	macroDir <- file.path(manOutDir, "macros")
+    	dir.create(macroDir, FALSE)
+    	file.copy(macro_files, macroDir, overwrite = TRUE)
+    }
     ## Avoid (costly) rebuilding if not needed.
     ## Actually, it seems no more costly than these tests, which it also does
     pathsFile <- file.path(manOutDir, "paths.rds")
@@ -820,11 +829,11 @@ function(dir, outDir)
 {
     ## NB: we no longer install 00Index
     demodir <- file.path(dir, "demo")
-    if(!file_test("-d", demodir)) return()
+    if(!dir.exists(demodir)) return()
     demofiles <- list_files_with_type(demodir, "demo", full.names = FALSE)
     if(!length(demofiles)) return()
     demoOutDir <- file.path(outDir, "demo")
-    if(!file_test("-d", demoOutDir)) dir.create(demoOutDir)
+    if(!dir.exists(demoOutDir)) dir.create(demoOutDir)
     file.copy(file.path(demodir, demofiles), demoOutDir,
               overwrite = TRUE)
 }
@@ -909,7 +918,8 @@ function(dir)
 .test_load_package <- function(pkg_name, lib)
 {
     options(warn = 1)
-    res <- try(suppressPackageStartupMessages(library(pkg_name, lib.loc = lib, character.only = TRUE, logical.return = TRUE)))
+    res <- try(suppressPackageStartupMessages(
+	library(pkg_name, lib.loc = lib, character.only = TRUE, logical.return = TRUE)))
     if (inherits(res, "try-error") || !res)
         stop("loading failed", call. = FALSE)
 }
@@ -919,7 +929,7 @@ function(dir)
 
 checkRdaFiles <- function(paths)
 {
-    if(length(paths) == 1L && isTRUE(file.info(paths)$isdir)) {
+    if(length(paths) == 1L && dir.exists(paths)) {
         paths <- Sys.glob(c(file.path(paths, "*.rda"),
                             file.path(paths, "*.RData")))
         ## Exclude .RData, which this may or may not match
@@ -931,7 +941,7 @@ checkRdaFiles <- function(paths)
     res <- res[rep_len(1L, length(paths)), ]
     row.names(res) <- paths
     keep <- file.exists(paths)
-    res$size[keep] <- file.info(paths)$size[keep]
+    res$size[keep] <- file.size(paths)[keep]
     for(p in paths[keep]) {
         magic <- readBin(p, "raw", n = 5)
         res[p, "compress"] <- if(all(magic[1:2] == c(0x1f, 0x8b))) "gzip"
@@ -956,7 +966,7 @@ resaveRdaFiles <- function(paths,
                            compress = c("auto", "gzip", "bzip2", "xz"),
                            compression_level)
 {
-    if(length(paths) == 1L && isTRUE(file.info(paths)$isdir))
+    if(length(paths) == 1L && dir.exists(paths))
         paths <- Sys.glob(c(file.path(paths, "*.rda"),
                             file.path(paths, "*.RData")))
     compress <- match.arg(compress)
@@ -964,22 +974,20 @@ resaveRdaFiles <- function(paths,
         compression_level <- switch(compress, "gzip" = 6, 9)
     for(p in paths) {
         env <- new.env(hash = TRUE) # probably small, need not be
-#        sink(tempfile()) ## suppress startup messages to stdout, for BARD
         suppressPackageStartupMessages(load(p, envir = env))
-#        sink()
         if(compress == "auto") {
             f1 <- tempfile()
             save(file = f1, list = ls(env, all.names = TRUE), envir = env)
             f2 <- tempfile()
             save(file = f2, list = ls(env, all.names = TRUE), envir = env,
                  compress = "bzip2")
-            ss <- file.info(c(f1, f2))$size * c(0.9, 1.0)
+            ss <- file.size(c(f1, f2)) * c(0.9, 1.0)
             names(ss) <- c(f1, f2)
             if(ss[1L] > 10240) {
                 f3 <- tempfile()
                 save(file = f3, list = ls(env, all.names = TRUE), envir = env,
                      compress = "xz")
-                ss <- c(ss, file.info(f3)$size)
+                ss <- c(ss, file.size(f3))
 		names(ss) <- c(f1, f2, f3)
             }
             nm <- names(ss)
@@ -1004,7 +1012,7 @@ compactPDF <-
     gs_quality <- match.arg(gs_quality, c("none", "printer", "ebook", "screen"))
     use_gs <- if(gs_quality != "none") nzchar(gs_cmd <- find_gs_cmd(gs_cmd)) else FALSE
     if (!use_gs && !use_qpdf) return()
-    if(length(paths) == 1L && isTRUE(file.info(paths)$isdir))
+    if(length(paths) == 1L && dir.exists(paths))
         paths <- Sys.glob(file.path(paths, "*.pdf"))
     dummy <- rep.int(NA_real_, length(paths))
     ans <- data.frame(old = dummy, new = dummy, row.names = paths)
@@ -1033,7 +1041,7 @@ compactPDF <-
                                    p, tf), FALSE, FALSE)
         }
         if(!res && file.exists(tf)) {
-            old <- file.info(p)$size; new <-  file.info(tf)$size
+            old <- file.size(p); new <-  file.size(tf)
             if(new/old < 0.9 && new < old - 1e4) {
                 file.copy(tf, p, overwrite = TRUE)
                 ans[p, ] <- c(old, new)
@@ -1041,7 +1049,7 @@ compactPDF <-
         }
         unlink(tf)
     }
-    structure(na.omit(ans), class = c("compactPDF", "data.frame"))
+    structure(stats::na.omit(ans), class = c("compactPDF", "data.frame"))
 }
 
 find_gs_cmd <- function(gs_cmd = "")
@@ -1076,8 +1084,7 @@ add_datalist <- function(pkgpath, force = FALSE)
 {
     dlist <- file.path(pkgpath, "data", "datalist")
     if (!force && file.exists(dlist)) return()
-    fi <- file.info(Sys.glob(file.path(pkgpath, "data", "*")))
-    size <- sum(fi$size)
+    size <- sum(file.size(Sys.glob(file.path(pkgpath, "data", "*"))))
     if(size <= 1024^2) return()
     z <- suppressPackageStartupMessages(list_data_in_pkg(dataDir = file.path(pkgpath, "data"))) # for BARD
     if(!length(z)) return()
diff --git a/src/library/tools/R/assertCondition.R b/src/library/tools/R/assertCondition.R
index 08cc4eb..df82b3a 100644
--- a/src/library/tools/R/assertCondition.R
+++ b/src/library/tools/R/assertCondition.R
@@ -1,7 +1,7 @@
 #  File src/library/tools/R/assertCondition.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
-#  Copyright (C) 2013 The R Core Team
+#  Copyright (C) 2013-2014 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
@@ -14,12 +14,13 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
-assertCondition <- function(expr, ...,
-                            .exprString = .deparseTrim(substitute(expr), cutoff = 30L),
-                            verbose = FALSE) {
-    fe <- function(e)e
+assertCondition <-
+    function(expr, ...,
+             .exprString = .deparseTrim(substitute(expr), cutoff = 30L),
+             verbose = FALSE)
+{
     getConds <- function(expr) {
 	conds <- list()
 	tryCatch(withCallingHandlers(expr,
@@ -49,7 +50,7 @@ assertCondition <- function(expr, ...,
                     found <-
                         unique(sapply(res, function(cond) class(cond)[class(cond) %in% conds]))
                     message(sprintf("assertCondition: caught %s",
-                                    paste(dQuote(found), collapse =", ")))
+                                    paste(dQuote(found), collapse =", ")), domain = NA)
                 }
 		invisible(res)
             }
diff --git a/src/library/tools/R/bibstyle.R b/src/library/tools/R/bibstyle.R
index d509eaa..eaf397f 100644
--- a/src/library/tools/R/bibstyle.R
+++ b/src/library/tools/R/bibstyle.R
@@ -1,5 +1,5 @@
 #  File src/library/tools/R/bibstyle.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
 #  Copyright (C) 1995-2013 The R Core Team
 #
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 # Functions for making Rd and human readable versions of bibentry records.
 
@@ -29,305 +29,319 @@ cleanupLatex <- function(x) {
     }
 }
 
-makeJSS <- function()
-    local({
+makeJSS <- function() {
 
-	# First, some utilities
+    # First, some utilities
 
-	collapse <- function(strings)
-	    paste(strings, collapse="\n")
+    collapse <- function(strings)
+        paste(strings, collapse="\n")
 
-	# Add a period if there's no sentence punctuation already
-	addPeriod <- function(string)
-	    sub("([^.?!])$", "\\1.", string)
+    # Add a period if there's no sentence punctuation already
+    addPeriod <- function(string)
+        sub("([^.?!])$", "\\1.", string)
 
-	# Separate args by sep, add a period at the end.
-	sentence <- function(..., sep = ", ") {
-	    strings <- c(...)
-	    if (length(strings)) {
-		addPeriod(paste(strings, collapse = sep))
-	    }
-	}
-
-	# Now some simple markup
-
-	plain <- function(pages)
-	    if (length(pages)) collapse(pages)
-
-	plainclean <- function(s) plain(cleanupLatex(s))
-
-	emph <- function(s)
-	    if (length(s)) paste0("\\emph{", collapse(s), "}")
-
-        emphclean <- function(s) emph(cleanupLatex(s))
-
-	# This creates a function to label a field by adding a prefix or suffix (or both)
-
-	label <- function(prefix=NULL, suffix=NULL, style=plain) {
-	    force(prefix); force(suffix); force(style)
-	    function(s)
-		if (length(s)) style(paste0(prefix, collapse(s), suffix))
-	}
-
-	labelclean <- function(prefix=NULL, suffix=NULL, style=plain) {
-	    f <- label(prefix, suffix, style)
-	    function(s) f(cleanupLatex(s))
-	}
-
-	# Now the formatters for each particular field.  These take
-	# a character vector; if length zero, they return NULL, otherwise
-	# a single element character vector putting everything together
-
-	fmtAddress <- plainclean
-	fmtBook <- emphclean
-	fmtBtitle <- emphclean
-	fmtChapter <- labelclean(prefix="chapter ")
-	fmtDOI <- label(prefix="\\url{http://dx.doi.org/", suffix="}")
-	fmtEdition <- labelclean(suffix=" edition")
-	fmtEprint <- plain
-	fmtHowpublished <- plainclean
-	fmtISBN <- label(prefix = "ISBN ")
-	fmtISSN <- label(prefix="ISSN ")
-	fmtInstitution <- plainclean
-	fmtNote <- plainclean
-	fmtPages <- label(prefix="pp. ")
-	fmtSchool <- plainclean
-	fmtTechreportnumber <- labelclean(prefix="Technical Report ")
-	fmtUrl <- label(prefix="\\url{", suffix="}")
-	fmtTitle <- function(title)
-	    if (length(title))
-                paste0("\\dQuote{",
-                      addPeriod(collapse(cleanupLatex(title))), "}")
-
-	fmtYear <- function(year) {
-	    if (!length(year)) year <- "????"
-	    paste0("(", collapse(year), ")")
-	}
-
-	# Now some more complicated ones that look at multiple fields
-	volNum <- function(paper) {
-	    if (length(paper$volume)) {
-		result <- paste0("\\bold{", collapse(paper$volume), "}")
-		if (length(paper$number))
-		    result <- paste0(result, "(", collapse(paper$number), ")")
-		result
-	    }
-	}
-
-	## Format one person object in short "Murdoch DJ" format
-	shortName <- function(person) {
-	    if (length(person$family)) {
-		result <- cleanupLatex(person$family)
-		if (length(person$given))
-		    paste(result,
-			  paste(substr(sapply(person$given, cleanupLatex),
-				       1, 1), collapse=""))
-		else result
-	    }
-	    else
-		paste(cleanupLatex(person$given), collapse=" ")
-	}
-
-	# Format all authors for one paper
-	authorList <- function(paper) {
-	    names <- sapply(paper$author, shortName)
-	    if (length(names) > 1)
-		result <- paste( paste(names[-length(names)], collapse=", "),
-			    "and", names[length(names)])
-	    else
-		result <- names
-	    result
-	}
-
-	# Format all editors for one paper
-	editorList <- function(paper) {
-	    names <- sapply(paper$editor, shortName)
-	    if (length(names) > 1)
-		result <- paste( paste(names[-length(names)], collapse=", "),
-			    "and", names[length(names)], "(eds.)")
-	    else if (length(names))
-		result <- paste(names, "(ed.)")
-	    else
-		result <- NULL
-	    result
-	}
-
-	extraInfo <- function(paper) {
-	    result <- paste(c(fmtDOI(paper$doi), fmtNote(paper$note),
-		  fmtEprint(paper$eprint), fmtUrl(paper$url)), collapse=", ")
-	    if (result != "") result
-	}
-
-	bookVolume <- function(book) {
-	    result <- ""
-	    if (length(book$volume))
-		result <- paste("volume", collapse(book$volume))
-	    if (length(book$number))
-		result <- paste(result, "number", collapse(book$number))
-	    if (length(book$series))
-		result <- paste(result, "series", collapse(book$series))
-	    if (result != "") result
-	}
-
-	bookPublisher <- function(book) {
-	    if (length(book$publisher)) {
-		result <- collapse(book$publisher)
-		if (length(book$address))
-		    result <- paste(result, collapse(book$address), sep = ", ")
-		result
-	    }
-	}
-
-	procOrganization <- function(paper) {
-	    if (length(paper$organization)) {
-		result <- collapse(cleanupLatex(paper$organization))
-		if (length(paper$address))
-		    result <- paste(result, collapse(cleanupLatex(paper$address)), sep =", ")
-		result
-	    }
-	}
-
-	formatArticle <- function(paper) {
-	    collapse(c(fmtPrefix(paper),
-	             sentence(authorList(paper), fmtYear(paper$year), sep = " "),
-		     fmtTitle(paper$title),
-		     sentence(fmtBook(paper$journal), volNum(paper), fmtPages(paper$pages)),
-		     sentence(fmtISSN(paper$issn), extraInfo(paper))))
-	}
-
-	formatBook <- function(book) {
-	    authors <- authorList(book)
-	    if(!length(authors))
-		authors <- editorList(book)
-
-	    collapse(c(fmtPrefix(book),
-	               sentence(authors, fmtYear(book$year), sep = " "),
-		       sentence(fmtBtitle(book$title), bookVolume(book), fmtEdition(book$edition)),
-		       sentence(bookPublisher(book)),
-		       sentence(fmtISBN(book$isbn), extraInfo(book))))
-	}
-
-	formatInbook <- function(paper) {
-	    authors <- authorList(paper)
-	    editors <- editorList(paper)
-	    if(!length(authors)) {
-		authors <- editors
-		editors <- NULL
-	    }
-	    collapse(c(fmtPrefix(paper),
-	               sentence(authors, fmtYear(paper$year), sep =" "),
-		       fmtTitle(paper$title),
-		       paste("In", sentence(editors, fmtBtitle(paper$booktitle), bookVolume(paper),
-					    fmtChapter(paper$chapter),
-					    fmtEdition(paper$edition), fmtPages(paper$pages))),
-		       sentence(bookPublisher(paper)),
-		       sentence(fmtISBN(paper$isbn), extraInfo(paper))))
-	}
-
-	formatIncollection <- function(paper) {
-	    collapse(c(fmtPrefix(paper),
-	               sentence(authorList(paper), fmtYear(paper$year), sep = " "),
-		       fmtTitle(paper$title),
-		       paste("In", sentence(editorList(paper), fmtBtitle(paper$booktitle), bookVolume(paper),
-					    fmtEdition(paper$edition), fmtPages(paper$pages))),
-		       sentence(bookPublisher(paper)),
-		       sentence(fmtISBN(paper$isbn), extraInfo(paper))))
-	}
-
-	formatInProceedings <- function(paper)
-	    collapse(c(fmtPrefix(paper),
-	               sentence(authorList(paper), fmtYear(paper$year), sep = " "),
-		       fmtTitle(paper$title),
-		       paste("In", sentence(editorList(paper), fmtBtitle(paper$booktitle), bookVolume(paper),
-					    fmtEdition(paper$edition), fmtPages(paper$pages))),
-		       sentence(procOrganization(paper)),
-		       sentence(fmtISBN(paper$isbn), extraInfo(paper))))
-
-	formatManual <- function(paper) {
-	    collapse(c(fmtPrefix(paper),
-	               sentence(authorList(paper), fmtYear(paper$year), sep = " "),
-		       sentence(fmtBtitle(paper$title), bookVolume(paper), fmtEdition(paper$edition)),
-		       sentence(procOrganization(paper)),
-		       sentence(fmtISBN(paper$isbn), extraInfo(paper))))
-	}
-
-	formatMastersthesis <- function(paper) {
-	    collapse(c(fmtPrefix(paper),
-	               sentence(authorList(paper), fmtYear(paper$year), sep = " "),
-		       sentence(fmtBtitle(paper$title)),
-		       sentence("Master's thesis", fmtSchool(paper$school), fmtAddress(paper$address)),
-		       sentence(extraInfo(paper))))
-	}
-
-	formatPhdthesis <- function(paper) {
-	    collapse(c(fmtPrefix(paper),
-	    	       sentence(authorList(paper), fmtYear(paper$year), sep = " "),
-		       sentence(fmtBtitle(paper$title)),
-		       sentence("PhD thesis", fmtSchool(paper$school), fmtAddress(paper$address)),
-		       sentence(extraInfo(paper))))
-	}
-
-	formatMisc <- function(paper) {
-	    collapse(c(fmtPrefix(paper),
-	               sentence(authorList(paper), fmtYear(paper$year), sep = " "),
-		       fmtTitle(paper$title),
-		       sentence(fmtHowpublished(paper$howpublished)),
-		       sentence(extraInfo(paper))))
-	}
-
-	formatProceedings <- function(book) {
-	    if (is.null(book$editor)) editor <- "Anonymous (ed.)"
-	    else editor <- editorList(book)
-	    collapse(c(fmtPrefix(book), # not paper
-	    	       sentence(editor, fmtYear(book$year), sep = " "),
-		       sentence(fmtBtitle(book$title), bookVolume(book)),
-		       sentence(procOrganization(book)),
-		       sentence(fmtISBN(book$isbn), fmtISSN(book$issn),
-				extraInfo(book))))
-	}
-
-	formatTechreport <- function(paper) {
-	    collapse(c(fmtPrefix(paper),
-	    	       sentence(authorList(paper), fmtYear(paper$year), sep = " "),
-		       fmtTitle(paper$title),
-		       sentence(fmtTechreportnumber(paper$number),
-				fmtInstitution(paper$institution),
-				fmtAddress(paper$address)),
-		       sentence(extraInfo(paper))))
-	}
-
-	formatUnpublished <- function(paper) {
-	    collapse(c(fmtPrefix(paper),
-	    	       sentence(authorList(paper), fmtYear(paper$year), sep = " "),
-		       fmtTitle(paper$title),
-		       sentence(extraInfo(paper))))
-	}
-
-	sortKeys <- function(bib) {
-	    result <- character(length(bib))
-	    for (i in seq_along(bib)) {
-		authors <- authorList(bib[[i]])
-		if (!length(authors))
-		    authors <- editorList(bib[[i]])
-		if (!length(authors))
-		    authors <- ""
-		result[i] <- authors
-	    }
-	    result
-	}
+    # Separate args by sep, add a period at the end.
+    sentence <- function(..., sep = ", ") {
+        strings <- c(...)
+        if (length(strings)) {
+            addPeriod(paste(strings, collapse = sep))
+        }
+    }
+
+    # Now some simple markup
+
+    plain <- function(pages)
+        if (length(pages)) collapse(pages)
+
+    plainclean <- function(s) plain(cleanupLatex(s))
+
+    emph <- function(s)
+        if (length(s)) paste0("\\emph{", collapse(s), "}")
+
+    emphclean <- function(s) emph(cleanupLatex(s))
+
+    # This creates a function to label a field by adding a prefix or
+    # suffix (or both)
+
+    label <- function(prefix=NULL, suffix=NULL, style=plain) {
+        force(prefix); force(suffix); force(style)
+        function(s)
+            if (length(s)) style(paste0(prefix, collapse(s), suffix))
+    }
+
+    labelclean <- function(prefix=NULL, suffix=NULL, style=plain) {
+        f <- label(prefix, suffix, style)
+        function(s) f(cleanupLatex(s))
+    }
+
+    # Now the formatters for each particular field.  These take
+    # a character vector; if length zero, they return NULL, otherwise
+    # a single element character vector putting everything together
+
+    fmtAddress <- plainclean
+    fmtBook <- emphclean
+    fmtBtitle <- emphclean
+    fmtChapter <- labelclean(prefix="chapter ")
+    fmtDOI <- label(prefix="\\doi{", suffix="}")
+    fmtEdition <- labelclean(suffix=" edition")
+    fmtEprint <- plain
+    fmtHowpublished <- plainclean
+    fmtISBN <- label(prefix = "ISBN ")
+    fmtISSN <- label(prefix="ISSN ")
+    fmtInstitution <- plainclean
+    fmtNote <- plainclean
+    fmtPages <- label(prefix="pp. ")
+    fmtSchool <- plainclean
+    fmtTechreportnumber <- labelclean(prefix="Technical Report ")
+    fmtUrl <- label(prefix="\\url{", suffix="}")
+    fmtTitle <- function(title)
+        if (length(title))
+            paste0("\\dQuote{",
+                   addPeriod(collapse(cleanupLatex(title))), "}")
+
+    fmtYear <- function(year) {
+        if (!length(year)) year <- "????"
+        paste0("(", collapse(year), ")")
+    }
+
+    # Now some more complicated ones that look at multiple fields
+    volNum <- function(paper) {
+        if (length(paper$volume)) {
+            result <- paste0("\\bold{", collapse(paper$volume), "}")
+            if (length(paper$number))
+                result <- paste0(result, "(", collapse(paper$number), ")")
+            result
+        }
+    }
+
+    ## Format one person object in short "Murdoch DJ" format
+    shortName <- function(person) {
+        if (length(person$family)) {
+            result <- cleanupLatex(person$family)
+            if (length(person$given))
+                paste(result,
+                      paste(substr(sapply(person$given, cleanupLatex),
+                                   1, 1), collapse=""))
+            else result
+        }
+        else
+            paste(cleanupLatex(person$given), collapse=" ")
+    }
+
+    # Format all authors for one paper
+    authorList <- function(paper) {
+        names <- sapply(paper$author, shortName)
+        if (length(names) > 1)
+            result <- paste( paste(names[-length(names)], collapse=", "),
+                            "and", names[length(names)])
+        else
+            result <- names
+        result
+    }
+
+    # Format all editors for one paper
+    editorList <- function(paper) {
+        names <- sapply(paper$editor, shortName)
+        if (length(names) > 1)
+            result <- paste( paste(names[-length(names)], collapse=", "),
+                            "and", names[length(names)], "(eds.)")
+        else if (length(names))
+            result <- paste(names, "(ed.)")
+        else
+            result <- NULL
+        result
+    }
+
+    extraInfo <- function(paper) {
+        result <- paste(c(fmtDOI(paper$doi), fmtNote(paper$note),
+                          fmtEprint(paper$eprint), fmtUrl(paper$url)),
+                        collapse=", ")
+        if (nzchar(result)) result
+    }
+
+    bookVolume <- function(book) {
+        result <- ""
+        if (length(book$volume))
+            result <- paste("volume", collapse(book$volume))
+        if (length(book$number))
+            result <- paste(result, "number", collapse(book$number))
+        if (length(book$series))
+            result <- paste(result, "series", collapse(book$series))
+        if (nzchar(result)) result
+    }
+
+    bookPublisher <- function(book) {
+        if (length(book$publisher)) {
+            result <- collapse(book$publisher)
+            if (length(book$address))
+                result <- paste(result, collapse(book$address), sep = ", ")
+            result
+        }
+    }
+
+    procOrganization <- function(paper) {
+        if (length(paper$organization)) {
+            result <- collapse(cleanupLatex(paper$organization))
+            if (length(paper$address))
+                result <- paste(result, collapse(cleanupLatex(paper$address)), sep =", ")
+            result
+        }
+    }
+
+    formatArticle <- function(paper) {
+        collapse(c(fmtPrefix(paper),
+                   sentence(authorList(paper), fmtYear(paper$year), sep = " "),
+                   fmtTitle(paper$title),
+                   sentence(fmtBook(paper$journal), volNum(paper),
+                            fmtPages(paper$pages)),
+                   sentence(fmtISSN(paper$issn), extraInfo(paper))))
+    }
+
+    formatBook <- function(book) {
+        authors <- authorList(book)
+        if(!length(authors))
+            authors <- editorList(book)
+
+        collapse(c(fmtPrefix(book),
+                   sentence(authors, fmtYear(book$year), sep = " "),
+                   sentence(fmtBtitle(book$title), bookVolume(book),
+                            fmtEdition(book$edition)),
+                   sentence(bookPublisher(book)),
+                   sentence(fmtISBN(book$isbn), extraInfo(book))))
+    }
+
+    formatInbook <- function(paper) {
+        authors <- authorList(paper)
+        editors <- editorList(paper)
+        if(!length(authors)) {
+            authors <- editors
+            editors <- NULL
+        }
+        collapse(c(fmtPrefix(paper),
+                   sentence(authors, fmtYear(paper$year), sep =" "),
+                   fmtTitle(paper$title),
+                   paste("In", sentence(editors, fmtBtitle(paper$booktitle),
+                                        bookVolume(paper),
+                                        fmtChapter(paper$chapter),
+                                        fmtEdition(paper$edition),
+                                        fmtPages(paper$pages))),
+                   sentence(bookPublisher(paper)),
+                   sentence(fmtISBN(paper$isbn), extraInfo(paper))))
+    }
+
+    formatIncollection <- function(paper) {
+        collapse(c(fmtPrefix(paper),
+                   sentence(authorList(paper), fmtYear(paper$year), sep = " "),
+                   fmtTitle(paper$title),
+                   paste("In", sentence(editorList(paper),
+                                        fmtBtitle(paper$booktitle),
+                                        bookVolume(paper),
+                                        fmtEdition(paper$edition),
+                                        fmtPages(paper$pages))),
+                   sentence(bookPublisher(paper)),
+                   sentence(fmtISBN(paper$isbn), extraInfo(paper))))
+    }
+
+    formatInProceedings <- function(paper)
+        collapse(c(fmtPrefix(paper),
+                   sentence(authorList(paper), fmtYear(paper$year), sep = " "),
+                   fmtTitle(paper$title),
+                   paste("In", sentence(editorList(paper),
+                                        fmtBtitle(paper$booktitle),
+                                        bookVolume(paper),
+                                        fmtEdition(paper$edition),
+                                        fmtPages(paper$pages))),
+                   sentence(procOrganization(paper)),
+                   sentence(fmtISBN(paper$isbn), extraInfo(paper))))
+
+    formatManual <- function(paper) {
+        collapse(c(fmtPrefix(paper),
+                   sentence(authorList(paper), fmtYear(paper$year), sep = " "),
+                   sentence(fmtBtitle(paper$title), bookVolume(paper),
+                            fmtEdition(paper$edition)),
+                   sentence(procOrganization(paper)),
+                   sentence(fmtISBN(paper$isbn), extraInfo(paper))))
+    }
 
-	# Replace this if you want a bibliography style
-	# that puts a prefix on each entry, e.g. [n]
-	# The formatting routine will have added a field .index
-	# as a 1-based index within the complete list.
+    formatMastersthesis <- function(paper) {
+        collapse(c(fmtPrefix(paper),
+                   sentence(authorList(paper), fmtYear(paper$year), sep = " "),
+                   sentence(fmtBtitle(paper$title)),
+                   sentence("Master's thesis", fmtSchool(paper$school),
+                            fmtAddress(paper$address)),
+                   sentence(extraInfo(paper))))
+    }
 
-	fmtPrefix <- function(paper) NULL
+    formatPhdthesis <- function(paper) {
+        collapse(c(fmtPrefix(paper),
+                   sentence(authorList(paper), fmtYear(paper$year), sep = " "),
+                   sentence(fmtBtitle(paper$title)),
+                   sentence("PhD thesis", fmtSchool(paper$school),
+                            fmtAddress(paper$address)),
+                   sentence(extraInfo(paper))))
+    }
 
-	cite <- function(key, bib, ...)
-	    utils::citeNatbib(key, bib, ...) # the defaults are JSS style
+    formatMisc <- function(paper) {
+        collapse(c(fmtPrefix(paper),
+                   sentence(authorList(paper), fmtYear(paper$year), sep = " "),
+                   fmtTitle(paper$title),
+                   sentence(fmtHowpublished(paper$howpublished)),
+                   sentence(extraInfo(paper))))
+    }
 
-	environment()
-    })
+    formatProceedings <- function(book) {
+        if (is.null(book$editor)) editor <- "Anonymous (ed.)"
+        else editor <- editorList(book)
+        collapse(c(fmtPrefix(book), # not paper
+                   sentence(editor, fmtYear(book$year), sep = " "),
+                   sentence(fmtBtitle(book$title), bookVolume(book)),
+                   sentence(procOrganization(book)),
+                   sentence(fmtISBN(book$isbn), fmtISSN(book$issn),
+                            extraInfo(book))))
+    }
+
+    formatTechreport <- function(paper) {
+        collapse(c(fmtPrefix(paper),
+                   sentence(authorList(paper), fmtYear(paper$year), sep = " "),
+                   fmtTitle(paper$title),
+                   sentence(fmtTechreportnumber(paper$number),
+                            fmtInstitution(paper$institution),
+                            fmtAddress(paper$address)),
+                   sentence(extraInfo(paper))))
+    }
+
+    formatUnpublished <- function(paper) {
+        collapse(c(fmtPrefix(paper),
+                   sentence(authorList(paper), fmtYear(paper$year), sep = " "),
+                   fmtTitle(paper$title),
+                   sentence(extraInfo(paper))))
+    }
+
+    sortKeys <- function(bib) {
+        result <- character(length(bib))
+        for (i in seq_along(bib)) {
+            authors <- authorList(bib[[i]])
+            if (!length(authors))
+                authors <- editorList(bib[[i]])
+            if (!length(authors))
+                authors <- ""
+            result[i] <- authors
+        }
+        result
+    }
+
+    # Replace this if you want a bibliography style
+    # that puts a prefix on each entry, e.g. [n]
+    # The formatting routine will have added a field .index
+    # as a 1-based index within the complete list.
+
+    fmtPrefix <- function(paper) NULL
+
+    cite <- function(key, bib, ...)
+        utils::citeNatbib(key, bib, ...) # the defaults are JSS style
+
+    environment()
+}
 
 bibstyle <- local({
     styles <- list(JSS = makeJSS())
diff --git a/src/library/tools/R/build.R b/src/library/tools/R/build.R
index 4ea8b82..9d3940e 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, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
-#  Copyright (C) 1995-2013 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
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 #### R based engine for R CMD build
 
@@ -39,7 +39,7 @@ function(filename, desc = file.path(dirname(filename), "DESCRIPTION"))
 		     c("",
 		       "# Import all packages listed as Imports or Depends",
 		       "import(",
-		       paste(" ", pkgs, collapse = ",\n"),
+		       paste0("  ", pkgs, collapse = ",\n"),
 		       ")")),
     	       filename)
 }
@@ -61,7 +61,7 @@ get_exclude_patterns <- function()
       "^inst/doc/00Index\\.dcf$",
       ## Autoconf
       "^config\\.(cache|log|status)$",
-      "^autom4te\\.cache$",
+      "(^|/)autom4te\\.cache$", # ncdf4 had this in subdirectory 'tools'
       ## Windows dependency files
       "^src/.*\\.d$", "^src/Makedeps$",
       ## IRIX, of some vintage
@@ -71,11 +71,28 @@ get_exclude_patterns <- function()
       )
 
 
+## Check for files listed in .Rbuildignore or get_exclude_patterns()
+inRbuildignore <- function(files, pkgdir) {
+    exclude <- rep(FALSE, length(files))
+    ignore <- get_exclude_patterns()
+    ## handle .Rbuildignore:
+    ## 'These patterns should be Perl regexps, one per line,
+    ##  to be matched against the file names relative to
+    ##  the top-level source directory.'
+    ignore_file <- file.path(pkgdir, ".Rbuildignore")
+    if (file.exists(ignore_file))
+	ignore <- c(ignore, readLines(ignore_file, warn = FALSE))
+    for(e in ignore[nzchar(ignore)])
+	exclude <- exclude | grepl(e, files, perl = TRUE,
+				ignore.case = TRUE)
+    exclude
+}
+
 ### based on Perl build script
 
-.build_packages <- function(args = NULL)
+.build_packages <- function(args = NULL, no.q = interactive())
 {
-    ## this requires on Windows sh make
+    ## on Windows, this requires   sh make
 
     WINDOWS <- .Platform$OS.type == "windows"
 
@@ -94,34 +111,25 @@ get_exclude_patterns <- function()
     system_with_capture <- function (command, args) {
         outfile <- tempfile("xshell")
         on.exit(unlink(outfile))
-        status <- system2(command, args, outfile, outfile)
+        status <- system2(command, args, stdout=outfile, stderr=outfile)
         list(status = status, stdout = readLines(outfile, warn = FALSE))
     }
     ## Run silently
     Ssystem <- function(command, args = character(), ...)
         system2(command, args, stdout = NULL, stderr = NULL, ...)
 
-
-    dir.exists <- function(x) !is.na(isdir <- file.info(x)$isdir) & isdir
-
-    do_exit <- function(status = 1L) q("no", status = status, runLast = FALSE)
-
-    env_path <- function(...) file.path(..., fsep = .Platform$path.sep)
+    do_exit <-
+	if(no.q)
+	    function(status = 1L) (if(status) stop else message)(
+		".build_packages() exit status ", status)
+	else
+	    function(status = 1L) q("no", status = status, runLast = FALSE)
 
     ## Used for BuildVignettes, BuildManual, BuildKeepEmpty,
     ## and (character not logical) BuildResaveData
     parse_description_field <-
         function(desc, field, default = TRUE, logical = TRUE)
-    {
-        tmp <- desc[field]
-        if (is.na(tmp)) default
-        else if(logical)
-            switch(tmp,
-                   "yes"=, "Yes" =, "true" =, "True" =, "TRUE" = TRUE,
-                   "no" =, "No" =, "false" =, "False" =, "FALSE" = FALSE,
-                   default)
-        else tmp
-    }
+            str_parse(desc[field], default=default, logical=logical)
 
     Usage <- function() {
         cat("Usage: R CMD build [options] pkgdirs",
@@ -145,12 +153,19 @@ get_exclude_patterns <- function()
             '                        "no" (default), "qpdf", "gs", "gs+qpdf", "both"',
             "  --compact-vignettes   same as --compact-vignettes=qpdf",
             "  --md5                 add MD5 sums",
-           "",
-            "Report bugs at bugs.r-project.org .", sep = "\n")
+            "  --log                 log to file 'pkg-00build.log' when processing ",
+            "                        the pkgdir with basename 'pkg'",
+            "",
+            "Report bugs at <https://bugs.R-project.org>.", sep = "\n")
     }
 
-    add_build_stamp_to_description_file <- function(ldpath) {
+    add_build_stamp_to_description_file <- function(ldpath, pkgdir)
+    {
         db <- .read_description(ldpath)
+        if(dir.exists(file.path(pkgdir, "src")))
+            db["NeedsCompilation"] <- "yes"
+        else if(is.na(db["NeedsCompilation"]))
+            db["NeedsCompilation"] <- "no"
         ## this is an optional function, so could fail
         user <- Sys.info()["user"]
         if(user == "unknown") user <- Sys.getenv("LOGNAME")
@@ -175,6 +190,37 @@ get_exclude_patterns <- function()
 
     temp_install_pkg <- function(pkgdir, libdir) {
 	dir.create(libdir, mode = "0755", showWarnings = FALSE)
+        install_missing_dependencies <-
+            config_val_to_logical(Sys.getenv("_R_BUILD_INSTALL_MISSING_DEPENDENCIES_",
+                                             "no"))
+        if(install_missing_dependencies &&
+           all((repos <- getOption("repos")) != "@CRAN@")) {
+            ## try installing missing dependencies too
+            available <- utils::available.packages(repos = repos)
+            db <- .read_description(file.path(pkgdir, "DESCRIPTION"))
+            package <- db["Package"]
+            available <-
+                rbind(available[available[, "Package"] != package, ,
+                                drop = FALSE],
+                      db[colnames(available)])
+            depends <- package_dependencies(package, available,
+                                            which = "most")
+            depends <- setdiff(unlist(depends),
+                               utils::installed.packages())
+            if(length(depends)) {
+                message(paste(strwrap(sprintf("installing dependencies %s",
+                                              paste(sQuote(sort(depends)),
+                                                    collapse = ", ")),
+                                      exdent = 2L),
+                              collapse = "\n"), domain = NA)
+                utils::install.packages(depends,
+                                        libdir,
+                                        available =
+                                            available[-nrow(available), ,
+                                                      drop = FALSE],
+                                        dependencies = NA)
+            }
+        }
         ## assume vignettes only need one arch
         if (WINDOWS) {
             cmd <- file.path(R.home("bin"), "Rcmd.exe")
@@ -194,20 +240,21 @@ get_exclude_patterns <- function()
 	    printLog(Log, "ERROR: package installation failed\n")
 	    do_exit(1)
 	}
+	Sys.setenv("R_BUILD_TEMPLIB" = libdir)
 	TRUE
-    }
+    } ## {temp_install_pkg}
 
     prepare_pkg <- function(pkgdir, desc, Log)
     {
         owd <- setwd(pkgdir); on.exit(setwd(owd))
-        pkgname <- basename(pkgdir)
+##        pkgname <- basename(pkgdir)
         checkingLog(Log, "DESCRIPTION meta-information")
         res <- try(.check_package_description("DESCRIPTION"))
         if (inherits(res, "try-error")) {
             resultLog(Log, "ERROR")
             messageLog(Log, "running '.check_package_description' failed")
         } else {
-            if (any(sapply(res, length))) {
+            if (any(lengths(res))) {
                 resultLog(Log, "ERROR")
                 print(res) # FIXME print to Log?
                 do_exit(1L)
@@ -235,96 +282,125 @@ get_exclude_patterns <- function()
         }
         if (vignettes &&
             parse_description_field(desc, "BuildVignettes", TRUE)) {
+
+            vignette_index_path <- file.path("build", "vignette.rds")
+            if(file.exists(vignette_index_path))
+                unlink(vignette_index_path)
+
 ## this is not a logical field
 ##	    if (nchar(parse_description_field(desc, "VignetteBuilder", "")))
 ##		ensure_installed()
+
             ## PR#15775: check VignetteBuilder packages are installed
             ## This is a bit wasteful: we do not need them in this process
             loadVignetteBuilder(pkgdir, TRUE)
 
             ## Look for vignette sources
             vigns <- pkgVignettes(dir = '.', check = TRUE)
+	    
             if (!is.null(vigns) && length(vigns$docs)) {
-                ensure_installed()
-                ## Good to do this in a separate process: it might die
-                creatingLog(Log, "vignettes")
-                R_LIBS <- Sys.getenv("R_LIBS", NA_character_)
-                if (!is.na(R_LIBS)) {
-                    on.exit(Sys.setenv(R_LIBS = R_LIBS), add = TRUE)
-                    Sys.setenv(R_LIBS = env_path(libdir, R_LIBS))
-                } else {
-                    on.exit(Sys.unsetenv("R_LIBS"), add = TRUE)
-                    Sys.setenv(R_LIBS = libdir)
-                }
-
-                # Tangle all vignettes now.
-
-                cmd <- file.path(R.home("bin"), "Rscript")
-                args <- c("--vanilla",
-                          "--default-packages=", # some vignettes assume methods
-                          "-e", shQuote("tools::buildVignettes(dir = '.', tangle = TRUE)"))
-                ## since so many people use 'R CMD' in Makefiles,
-                oPATH <- Sys.getenv("PATH")
-                Sys.setenv(PATH = paste(R.home("bin"), oPATH,
-                           sep = .Platform$path.sep))
-                res <- system_with_capture(cmd, args)
-                Sys.setenv(PATH = oPATH)
-                if (res$status) {
-                    resultLog(Log, "ERROR")
-                    printLog0(Log, paste(c(res$stdout, ""),  collapse = "\n"))
-                    do_exit(1L)
-                } else {
-                    # Rescan for weave and tangle output files
-                    vigns <- pkgVignettes(dir = '.', output = TRUE, source = TRUE)
-                    stopifnot(!is.null(vigns))
+	        ## Exclude the ones in .Rbuildignore
+	        exclude <- inRbuildignore(sub(paste0(vigns$pkgdir, "/"), "", vigns$doc, fixed = TRUE), '.')
+		if (!all(exclude)) {
+		    # FIXME:  pkgVignettes should be returning a dataframe, so all of these aren't necessary.
+		    vigns$docs <- vigns$docs[!exclude]
+		    vigns$names <- vigns$names[!exclude]
+		    vigns$engines <- vigns$engines[!exclude]
+		    vigns$patterns <- vigns$patterns[!exclude]
+		    vigns$encodings <- vigns$encodings[!exclude]
+
+		    ensure_installed()
+		    ## Good to do this in a separate process: it might die
+		    creatingLog(Log, "vignettes")
+		    R_LIBS <- Sys.getenv("R_LIBS", NA_character_)
+		    if (!is.na(R_LIBS)) {
+			on.exit(Sys.setenv(R_LIBS = R_LIBS), add = TRUE)
+			Sys.setenv(R_LIBS = path_and_libPath(libdir, R_LIBS))
+		    } else { # no .libPaths() here (speed; ok ?)
+			on.exit(Sys.unsetenv("R_LIBS"), add = TRUE)
+			Sys.setenv(R_LIBS = libdir)
+		    }
 
-                    resultLog(Log, "OK")
-                }
+		    ## Tangle all vignettes now.
+
+		    cmd <- file.path(R.home("bin"), "Rscript")
+		    args <- c("--vanilla",
+			      "--default-packages=", # some vignettes assume methods
+			      "-e", shQuote("tools::buildVignettes(dir = '.', tangle = TRUE)"))
+		    ## since so many people use 'R CMD' in Makefiles,
+		    oPATH <- Sys.getenv("PATH")
+		    Sys.setenv(PATH = paste(R.home("bin"), oPATH,
+			       sep = .Platform$path.sep))
+		    res <- system_with_capture(cmd, args)
+		    Sys.setenv(PATH = oPATH)
+		    if (res$status) {
+			resultLog(Log, "ERROR")
+			printLog0(Log, paste(c(res$stdout, ""),  collapse = "\n"))
+			do_exit(1L)
+		    } else {
+			# Rescan for weave and tangle output files
+			vigns <- pkgVignettes(dir = '.', output = TRUE, source = TRUE)
+			stopifnot(!is.null(vigns))
+
+			resultLog(Log, "OK")
+		    }
 
-                ## We may need to install them.
-                if (basename(vigns$dir) == "vignettes") {
-                    ## inst may not yet exist
-                    dir.create(doc_dir, recursive = TRUE, showWarnings = FALSE)
-                    file.copy(c(vigns$docs, vigns$outputs, unlist(vigns$sources)), doc_dir)
-                    unlink(c(vigns$outputs, unlist(vigns$sources)))
-                    extras_file <- file.path("vignettes", ".install_extras")
-                    if (file.exists(extras_file)) {
-                        extras <- readLines(extras_file, warn = FALSE)
-                        if(length(extras)) {
-                            allfiles <- dir("vignettes", all.files = TRUE,
-                                            full.names = TRUE, recursive = TRUE,
-                                            include.dirs = TRUE)
-                            inst <- rep(FALSE, length(allfiles))
-                            for (e in extras)
-                                inst <- inst | grepl(e, allfiles, perl = TRUE,
-                                                     ignore.case = TRUE)
-                            file.copy(allfiles[inst], doc_dir, recursive = TRUE)
-                        }
-                    }
-                }
+		    ## We may need to install them.
+		    if (basename(vigns$dir) == "vignettes") {
+			## inst may not yet exist
+			dir.create(doc_dir, recursive = TRUE, showWarnings = FALSE)
+			tocopy <- c(vigns$docs, vigns$outputs, unlist(vigns$sources))
+			copied <- file.copy(tocopy, doc_dir, copy.date = TRUE)
+			if (!all(copied)) {
+			    warning(sQuote("inst/doc"),
+				    ngettext(sum(!copied), " file\n", " files\n"),
+				    strwrap(paste(sQuote(basename(tocopy[!copied])), collapse=", "),
+					    indent = 4, exdent = 2),
+				    "\n  ignored as vignettes have been rebuilt.",
+				    "\n  Run R CMD build with --no-build-vignettes to prevent rebuilding.",
+				 call. = FALSE)
+			    file.copy(tocopy[!copied], doc_dir, overwrite = TRUE, copy.date = TRUE)
+			}
+			unlink(c(vigns$outputs, unlist(vigns$sources)))
+			extras_file <- file.path("vignettes", ".install_extras")
+			if (file.exists(extras_file)) {
+			    extras <- readLines(extras_file, warn = FALSE)
+			    if(length(extras)) {
+				allfiles <- dir("vignettes", all.files = TRUE,
+						full.names = TRUE, recursive = TRUE,
+						include.dirs = TRUE)
+				inst <- rep(FALSE, length(allfiles))
+				for (e in extras)
+				    inst <- inst | grepl(e, allfiles, perl = TRUE,
+							 ignore.case = TRUE)
+				file.copy(allfiles[inst], doc_dir, recursive = TRUE, copy.date = TRUE)
+			    }
+			}
+		    }
 
-		vignetteIndex <- .build_vignette_index(vigns)
-
-		if(NROW(vignetteIndex) > 0L) {
-		    ## remove any files with no R code (they will have header comments).
-		    ## if not correctly declared they might not be in the current encoding
-		    sources <- vignetteIndex$R
-		    for(i in seq_along(sources)) {
-			file <- file.path(doc_dir, sources[i])
-			if (!file_test("-f", file)) next
-			bfr <- readLines(file, warn = FALSE)
-			if(all(grepl("(^###|^[[:space:]]*$)", bfr, useBytes = TRUE))) {
-			    unlink(file)
-			    vignetteIndex$R[i] <- ""
+		    vignetteIndex <- .build_vignette_index(vigns)
+
+		    if(NROW(vignetteIndex) > 0L) {
+			## remove any files with no R code (they will have header comments).
+			## if not correctly declared they might not be in the current encoding
+			sources <- vignetteIndex$R
+			for(i in seq_along(sources)) {
+			    file <- file.path(doc_dir, sources[i])
+			    if (!file_test("-f", file)) next
+			    bfr <- readLines(file, warn = FALSE)
+			    if(all(grepl("(^###|^[[:space:]]*$)", bfr, useBytes = TRUE))) {
+				unlink(file)
+				vignetteIndex$R[i] <- ""
+			    }
 			}
 		    }
-		}
 
-		## Save the list
-		dir.create("build", showWarnings = FALSE)
-		saveRDS(vignetteIndex,
-			file = file.path("build", "vignette.rds"))
-            }
+		    ## Save the list
+		    dir.create("build", showWarnings = FALSE)
+		    saveRDS(vignetteIndex,
+			    file = vignette_index_path)
+		}
+	    }
         } else {
             fv <- file.path("build", "vignette.rds")
             if(file.exists(fv)) {
@@ -359,7 +435,7 @@ get_exclude_patterns <- function()
                               gs_cmd = gs_cmd, gs_quality = gs_quality)
             res <- format(res, diff = 1e5)
             if(length(res))
-                printLog0(Log, paste(" ", format(res), collapse = "\n"), "\n")
+                printLog0(Log, paste0("  ", format(res), collapse = "\n"), "\n")
         }
         if (pkgInstalled) {
             unlink(libdir, recursive = TRUE)
@@ -367,7 +443,7 @@ get_exclude_patterns <- function()
 	    ## And finally, clean up again.
             cleanup_pkg(pkgdir, Log)
         }
-    }
+    } ## {prepare_pkg}
 
     cleanup_pkg <- function(pkgdir, Log)
     {
@@ -386,7 +462,6 @@ get_exclude_patterns <- function()
                 } else {
                     if (file.exists("Makevars.win")) {
                         if (have_make) {
-                            makefiles <- paste()
                             makefiles <- paste("-f",
                                                shQuote(file.path(R.home("share"), "make", "clean.mk")),
                                            "-f Makevars.win")
@@ -456,11 +531,13 @@ get_exclude_patterns <- function()
     update_Rd_index <- function(oldindex, Rd_files, Log)
     {
         newindex <- tempfile()
-        res <- try(Rdindex(Rd_files, newindex))
-        if (inherits(res, "try-error")) {
-            errorLog(Log, "computing Rd index failed")
-            do_exit(1L)
-        }
+	res <- tryCatch(
+	    Rdindex(Rd_files, newindex),
+	    error = function(e) {
+		errorLog(Log, "computing Rd index failed:",
+			 conditionMessage(e))
+		do_exit(1L)
+	    })
         checkingLog(Log, "whether ", sQuote(oldindex), " is up-to-date")
         if (file.exists(oldindex)) {
             ol <- readLines(oldindex, warn = FALSE) # e.g. BaM had missing final NL
@@ -488,7 +565,19 @@ get_exclude_patterns <- function()
     }
 
     build_Rd_db <- function(pkgdir, libdir, desc) {
-    	db <- .build_Rd_db(pkgdir, stages = NULL,
+
+        build_partial_Rd_db_path <-
+            file.path("build", "partial.rdb")
+        if(file.exists(build_partial_Rd_db_path))
+            unlink(build_partial_Rd_db_path)
+
+        ## Use a full path as this could be passed to ..Rd2pdf().
+        build_refman_path <-
+            file.path(pkgdir, "build", paste0(basename(pkgdir), ".pdf"))
+        if(file.exists(build_refman_path))
+            unlink(build_refman_path)
+
+        db <- .build_Rd_db(pkgdir, stages = NULL,
                            os = c("unix", "windows"), step = 1)
     	if (!length(db)) return(FALSE)
 
@@ -519,7 +608,7 @@ get_exclude_patterns <- function()
 	    messageLog(Log, "saving partial Rd database")
 	    partial <- db[containsBuildSexprs]
 	    dir.create("build", showWarnings = FALSE)
-	    saveRDS(partial, file.path("build", "partial.rdb"))
+	    saveRDS(partial, build_partial_Rd_db_path)
 	}
 	needRefman <- manual &&
             parse_description_field(desc, "BuildManual", TRUE) &&
@@ -527,14 +616,12 @@ get_exclude_patterns <- function()
 	if (needRefman) {
 	    messageLog(Log, "building the PDF package manual")
 	    dir.create("build", showWarnings = FALSE)
-	    refman <- file.path(pkgdir, "build",
-                                paste0(basename(pkgdir), ".pdf"))
 	    ..Rd2pdf(c("--force", "--no-preview",
-	               paste0("--output=", refman),
+	               paste0("--output=", build_refman_path),
 	               pkgdir), quit = FALSE)
         }
 	return(TRUE)
-    }
+    } ## {build_Rd_db}
 
     ## also fixes up missing final NL
     fix_nonLF_in_files <- function(pkgname, dirPattern, Log)
@@ -555,9 +642,17 @@ get_exclude_patterns <- function()
     }
     fix_nonLF_in_make_files <- function(pkgname, Log) {
         fix_nonLF_in_files(pkgname,
-                           paste0("^",c("Makefile", "Makefile.in", "Makefile.win",
-                                       "Makevars", "Makevars.in", "Makevars.win"),
-                                 "$"), Log)
+                           paste0("^(",
+                                  paste(c("Makefile", "Makefile.in", "Makefile.win",
+                                          "Makevars", "Makevars.in", "Makevars.win"),
+                                        collapse = "|"), ")$"), Log)
+        ## Other Makefiles
+        makes <- dir(pkgname, pattern = "^Makefile$",
+                     full.names = TRUE, recursive = TRUE)
+        for (ff in makes) {
+            lines <- readLines(ff, warn = FALSE)
+            writeLinesNL(lines, ff)
+        }
     }
 
     find_empty_dirs <- function(d)
@@ -565,8 +660,7 @@ get_exclude_patterns <- function()
         ## dir(recursive = TRUE) did not include directories, so
         ## we needed to do this recursively
         files <- dir(d, all.files = TRUE, full.names = TRUE)
-        isdir <- file.info(files)$isdir
-        for (dd in files[isdir]) {
+        for (dd in files[dir.exists(files)]) {
             if (grepl("/\\.+$", dd)) next
             find_empty_dirs(dd)
         }
@@ -655,16 +749,20 @@ get_exclude_patterns <- function()
     resave_data_others <- function(pkgname, resave_data)
     {
         if (resave_data == "no") return()
-        ddir <- file.path(pkgname, "data")
+        if(!dir.exists(ddir <- file.path(pkgname, "data")))
+            return()
+        ddir <- normalizePath(ddir)
         dataFiles <- grep("\\.(rda|RData)$",
                           list_files_with_type(ddir, "data"),
                           invert = TRUE, value = TRUE)
         if (!length(dataFiles)) return()
+        resaved <- character()
+        on.exit(unlink(resaved))
         Rs <- grep("\\.[Rr]$", dataFiles, value = TRUE)
         if (length(Rs)) { # these might use .txt etc
             messageLog(Log, "re-saving .R files as .rda")
             ## ensure utils is visible
-            library("utils")
+            ##   library("utils")
             lapply(Rs, function(x){
                 envir <- new.env(hash = TRUE)
                 sys.source(x, chdir = TRUE, envir = envir)
@@ -672,7 +770,7 @@ get_exclude_patterns <- function()
                      file = sub("\\.[Rr]$", ".rda", x),
                      compress = TRUE, compression_level = 9,
                      envir = envir)
-                unlink(x)
+                resaved <<- c(resaved, x)
             })
             printLog(Log,
                      "  NB: *.R converted to .rda: other files may need to be removed\n")
@@ -684,10 +782,10 @@ get_exclude_patterns <- function()
                 lapply(tabs, function(nm) {
                     ## DiceDesign/data/greenwood.table.txt is missing NL
                     x <- readLines(nm, warn = FALSE)
-                    con <- gzfile(paste(nm, "gz", sep = "."), "wb")
+                    con <- gzfile(paste0(nm, ".gz"), "wb")
                     writeLines(x, con)
                     close(con)
-                    unlink(nm)
+                    resaved <<- c(resaved, nm)
                 })
             } else {
                 OK <- TRUE
@@ -697,26 +795,27 @@ get_exclude_patterns <- function()
                     con <- gzfile(nm3[1L], "wb", compression = 9L); writeLines(x, con); close(con)
                     con <- bzfile(nm3[2L], "wb", compression = 9L); writeLines(x, con); close(con)
                     con <- xzfile(nm3[3L], "wb", compression = 9L); writeLines(x, con); close(con)
-                    sizes <- file.info(nm3)$size * c(0.9, 1, 1)
+                    sizes <- file.size(nm3) * c(0.9, 1, 1)
                     ind <- which.min(sizes)
                     if(ind > 1) OK <<- FALSE
-                    unlink(c(nm, nm3[-ind]))
+                    resaved <<- c(resaved, nm, nm3[-ind])
                 })
                 if (!OK) fixup_R_dep(pkgname, "2.10")
             }
         }
-    }
+    } ## {resave_data_others}
 
     force <- FALSE
     vignettes <- TRUE
     manual <- TRUE  # Install the manual if Rds contain \Sexprs
     with_md5 <- FALSE
-    INSTALL_opts <- character()
+    with_log <- FALSE
+##    INSTALL_opts <- character()
     pkgs <- character()
     options(showErrorCalls = FALSE, warn = 1)
 
     ## Read in build environment file.
-    Renv <- Sys.getenv("R_BUILD_ENVIRON", unset = NA)
+    Renv <- Sys.getenv("R_BUILD_ENVIRON", unset = NA_character_)
     if(!is.na(Renv)) {
         ## Do not read any build environment file if R_BUILD_ENVIRON is
         ## set to empty of something non-existent.
@@ -725,7 +824,7 @@ get_exclude_patterns <- function()
         ## Read in ~/.R/build.Renviron[.rarch] (if existent).
         rarch <- .Platform$r_arch
         if (nzchar(rarch) &&
-            file.exists(Renv <- paste("~/.R/build.Renviron", rarch, sep = ".")))
+            file.exists(Renv <- paste0("~/.R/build.Renviron.", rarch)))
             readRenviron(Renv)
         else if (file.exists(Renv <- "~/.R/build.Renviron"))
             readRenviron(Renv)
@@ -756,7 +855,7 @@ get_exclude_patterns <- function()
                 R.version[["major"]], ".",  R.version[["minor"]],
                 " (r", R.version[["svn rev"]], ")\n", sep = "")
             cat("",
-                "Copyright (C) 1997-2013 The R Core Team.",
+                "Copyright (C) 1997-2016 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")
@@ -784,6 +883,8 @@ get_exclude_patterns <- function()
             compact_vignettes <- "qpdf"
         } else if (a == "--md5") {
             with_md5 <- TRUE
+        } else if (a == "--log") {
+            with_log <- TRUE
         } else if (substr(a, 1, 1) == "-") {
             message("Warning: unknown option ", sQuote(a))
         } else pkgs <- c(pkgs, a)
@@ -802,8 +903,8 @@ get_exclude_patterns <- function()
     startdir <- getwd()
     if (is.null(startdir))
         stop("current working directory cannot be ascertained")
-    R_platform <- Sys.getenv("R_PLATFORM", "unknown-binary")
-    libdir <- tempfile("Rinst")
+##    R_platform <- Sys.getenv("R_PLATFORM", "unknown-binary")
+##    libdir <- tempfile("Rinst")
 
     if (WINDOWS) {
         ## Some people have *assumed* that R_HOME uses / in Makefiles
@@ -813,18 +914,28 @@ get_exclude_patterns <- function()
     }
 
     for(pkg in pkgs) {
-        Log <- newLog() # if not stdin; on.exit(closeLog(Log))
         ## remove any trailing /, for Windows' sake
         pkg <- sub("/$", "", pkg)
+        ## Argh.  For logging we should really know the actual name of
+        ## the package being built, but this needs first establishing
+        ## the actual pkgdir (see below) and then getting the package
+        ## name from the DESCRIPTION file ... and problems in these
+        ## steps (currently) already get logged.  So for now try using
+        ## the basename of pkg (one could try renaming at the end, but
+        ## that will only work in case of success ...)
+        Log <- if(with_log)
+            newLog(paste0(file.path(startdir, basename(pkg)),
+                          "-00build.log"))
+        else
+            newLog()
         ## 'Older versions used $pkg as absolute or relative to $startdir.
         ## This does not easily work if $pkg is a symbolic link.
         ## Hence, we now convert to absolute paths.'
         setwd(startdir)
-	res <- tryCatch(setwd(pkg), error = function(e)e)
-	if (inherits(res, "error")) {
+	res <- tryCatch(setwd(pkg), error = function(e) {
             errorLog(Log, "cannot change to directory ", sQuote(pkg))
             do_exit(1L)
-        }
+        })
         pkgdir <- getwd()
         pkgname <- basename(pkgdir)
         checkingLog(Log, "for file ", sQuote(file.path(pkg, "DESCRIPTION")))
@@ -840,7 +951,10 @@ get_exclude_patterns <- function()
             resultLog(Log, "NO")
             do_exit(1L)
         }
-        intname <- desc["Package"]
+	if(is.na(intname <- desc["Package"]) || !length(intname) ||
+	   !nchar(intname)) {
+	    errorLog(Log, "invalid 'Package' field"); do_exit(1L)
+	}
         ## make a copy, cd to parent of copy
         setwd(dirname(pkgdir))
         filename <- paste0(intname, "_", desc["Version"], ".tar")
@@ -848,8 +962,8 @@ get_exclude_patterns <- function()
         Tdir <- tempfile("Rbuild")
         dir.create(Tdir, mode = "0755")
         if (WINDOWS) {
-            ## This preserves read-only for files, but not dates
-            if (!file.copy(pkgname, Tdir, recursive = TRUE)) {
+            ## This preserves read-only for files, and (as of r71464) dates
+            if (!file.copy(pkgname, Tdir, recursive = TRUE, copy.date = TRUE)) {
                 errorLog(Log, "copying to build directory failed")
                 do_exit(1L)
             }
@@ -886,20 +1000,10 @@ get_exclude_patterns <- function()
                         full.names = TRUE, include.dirs = TRUE)
         allfiles <- substring(allfiles, 3L)  # drop './'
         bases <- basename(allfiles)
-        exclude <- rep(FALSE, length(allfiles))
-        ignore <- get_exclude_patterns()
-        ## handle .Rbuildignore:
-        ## 'These patterns should be Perl regexps, one per line,
-        ##  to be matched against the file names relative to
-        ##  the top-level source directory.'
-        ignore_file <- file.path(pkgdir, ".Rbuildignore")
-        if (file.exists(ignore_file))
-            ignore <- c(ignore, readLines(ignore_file, warn = FALSE))
-        for(e in ignore[nzchar(ignore)])
-            exclude <- exclude | grepl(e, allfiles, perl = TRUE,
-                                       ignore.case = TRUE)
-
-        isdir <- file_test("-d", allfiles)
+	
+        exclude <- inRbuildignore(allfiles, pkgdir)
+	
+        isdir <- dir.exists(allfiles)
         ## old (pre-2.10.0) dirnames
         exclude <- exclude | (isdir & (bases %in%
                                        c("check", "chm", .vc_dir_names)))
@@ -907,32 +1011,34 @@ get_exclude_patterns <- function()
         ## FIXME: GNU make uses GNUmakefile (note capitalization)
         exclude <- exclude | bases %in% c("Read-and-delete-me", "GNUMakefile")
         ## Mac resource forks
-        exclude <- exclude | grepl("^\\._", bases)
+        exclude <- exclude | startsWith(bases, "._")
         exclude <- exclude | (isdir & grepl("^src.*/[.]deps$", allfiles))
 	## Windows DLL resource file
         exclude <- exclude | (allfiles == paste0("src/", pkgname, "_res.rc"))
         ## inst/doc/.Rinstignore is a mistake
-        exclude <- exclude | grepl("inst/doc/[.](Rinstignore|build[.]timestamp)$", allfiles)
-        exclude <- exclude | grepl("vignettes/[.]Rinstignore$", allfiles)
+        exclude <- exclude | endsWith(allfiles, "inst/doc/.Rinstignore") |
+            endsWith(allfiles, "inst/doc/.build.timestamp") |
+            endsWith(allfiles, "vignettes/.Rinstignore")
         ## leftovers
         exclude <- exclude | grepl("^.Rbuildindex[.]", allfiles)
+        ## or simply?  exclude <- exclude | startsWith(allfiles, ".Rbuildindex.")
         exclude <- exclude | (bases %in% .hidden_file_exclusions)
         unlink(allfiles[exclude], recursive = TRUE, force = TRUE)
         setwd(owd)
 
         ## Fix up man, R, demo inst/doc directories
         res <- .check_package_subdirs(pkgname, TRUE)
-        if (any(sapply(res, length))) {
+        if (any(lengths(res))) {
             messageLog(Log, "excluding invalid files")
             print(res) # FIXME print to Log?
         }
         setwd(Tdir)
         ## Fix permissions for all files to be at least 644, and dirs 755
         ## Not restricted by umask.
-	if (!WINDOWS) .Call(dirchmod, pkgname, group.writable=FALSE)
+	if (!WINDOWS) .Call(C_dirchmod, pkgname, group.writable=FALSE)
         ## Add build stamp to the DESCRIPTION file.
-        add_build_stamp_to_description_file(file.path(pkgname,
-                                                      "DESCRIPTION"))
+        add_build_stamp_to_description_file(file.path(pkgname, "DESCRIPTION"),
+                                            pkgdir)
         ## Add expanded R fields to the DESCRIPTION file.
         add_expanded_R_fields_to_description_file(file.path(pkgname,
                                                             "DESCRIPTION"))
@@ -960,7 +1066,7 @@ get_exclude_patterns <- function()
                recursive = TRUE)
 
         ## work on 'data' directory if present
-        if(file_test("-d", file.path(pkgname, "data")) ||
+        if(dir.exists(file.path(pkgname, "data")) ||
            file_test("-f", file.path(pkgname, "R", "sysdata.rda"))) {
             messageLog(Log, "looking to see if a 'data/datalist' file should be added")
             ## in some cases data() needs the package installed as
@@ -970,7 +1076,7 @@ get_exclude_patterns <- function()
                      printLog(Log, "  unable to create a 'datalist' file: may need the package to be installed\n"))
             ## allow per-package override
             resave_data1 <- parse_description_field(desc, "BuildResaveData",
-                                                    resave_data, FALSE)
+                                                    resave_data, logical=FALSE)
             resave_data_others(pkgname, resave_data1)
             resave_data_rda(pkgname, resave_data1)
         }
@@ -992,7 +1098,7 @@ get_exclude_patterns <- function()
         ## Finalize
         filename <- paste0(pkgname, "_", desc["Version"], ".tar.gz")
         filepath <- file.path(startdir, filename)
-        ## NB: tests/reg-packages.R relies on this exact format!
+        ## NB: ../../../../tests/reg-packages.R relies on this exact format!
         messageLog(Log, "building ", sQuote(filename))
         res <- utils::tar(filepath, pkgname, compression = "gzip",
                           compression_level = 9L,
@@ -1006,7 +1112,6 @@ get_exclude_patterns <- function()
 
         setwd(startdir)
         unlink(Tdir, recursive = TRUE)
-        on.exit() # cancel closeLog
         closeLog(Log)
     }
     do_exit(0L)
diff --git a/src/library/tools/R/check.R b/src/library/tools/R/check.R
index 1a1bf3c..8ab2d34 100644
--- a/src/library/tools/R/check.R
+++ b/src/library/tools/R/check.R
@@ -1,9 +1,7 @@
 #  File src/library/tools/R/check.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
-#  Copyright (C) 1995-2014 The R Core Team
-#
-# NB: also copyright date in Usage.
+#  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
@@ -16,14 +14,14 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 ###- R based engine for R CMD check
 
 ## R developers can use this to debug the function by running it
 ## directly as tools:::.check_packages(args), where the args should
 ## be what commandArgs(TRUE) would return, that is a character vector
-## of (space-delimited) terms that would be passed to R CMD checks.
+## of (space-delimited) terms that would be passed to R CMD check.
 
 ## Used for INSTALL and Rd2pdf
 run_Rcmd <- function(args, out = "", env = "")
@@ -85,7 +83,7 @@ setRlibs <-
 
     if(test_recommended) {
         ## Now add dummies for recommended packages (removed later if declared)
-        recommended <-  .get_standard_package_names()$recommended
+        recommended <- .get_standard_package_names()$recommended
         ## grDevices has :: to KernSmooth
         ## stats has ::: to Matrix, Matrix depends on lattice
         ## which gives false positives in MASS and Rcpp
@@ -97,11 +95,13 @@ setRlibs <-
             c("Modalclust", "aroma.core", "iWebPlots",
               "openair", "oce", "pcalg", "tileHMM"))
             exceptions <- c(exceptions, "KernSmooth")
-        recommended <- recommended[!recommended %in% exceptions]
+        recommended <- recommended %w/o% exceptions
         for(pkg in recommended) {
             if(pkg == thispkg) next
             dir.create(pd <- file.path(tmplib, pkg))
-            file.copy(file.path(.Library, pkg, "DESCRIPTION"), pd)
+            ## some people remove recommended packages ....
+            f <- file.path(.Library, pkg, "DESCRIPTION")
+            if(file.exists(f)) file.copy(f, pd)
             ## to make sure find.package throws an error:
             close(file(file.path(pd, "dummy_for_check"), "w"))
         }
@@ -125,7 +125,7 @@ setRlibs <-
     lp <- .libPaths()
     poss <- c(lp[length(lp)], .Library)
     already <- thispkg
-    more <- unique(deps[!deps %in% already]) # should not depend on itself ...
+    more <- unique(deps %w/o% already) # should not depend on itself ...
     while(length(more)) {
         m0 <- more; more <- character()
         for (pkg in m0) {
@@ -156,7 +156,7 @@ setRlibs <-
             }
         }
         already <- c(already, m0)
-        more <- unique(more[!more %in% already])
+        more <- unique(more %w/o% already)
     }
     if (self) flink(normalizePath(pkgdir), tmplib)
     # print(dir(tmplib))
@@ -164,14 +164,14 @@ setRlibs <-
     if (nzchar(lib0)) rlibs <- c(lib0, rlibs)
     rlibs <- paste(rlibs, collapse = .Platform$path.sep)
     if(quote) rlibs <- shQuote(rlibs)
-    c(paste("R_LIBS", rlibs, sep = "="),
+    c(paste0("R_LIBS=", rlibs),
       if(WINDOWS) " R_ENVIRON_USER='no_such_file'" else "R_ENVIRON_USER=''",
       if(WINDOWS) " R_LIBS_USER='no_such_dir'" else "R_LIBS_USER=''",
       " R_LIBS_SITE='no_such_dir'")
 }
 
 ###- The main function for "R CMD check"
-.check_packages <- function(args = NULL)
+.check_packages <- function(args = NULL, no.q = interactive())
 {
     WINDOWS <- .Platform$OS.type == "windows"
     ## this requires on Windows: file.exe (optional)
@@ -215,14 +215,13 @@ setRlibs <-
                      env = "R_DEFAULT_PACKAGES='utils,grDevices,graphics,stats'")
             {
                 out <- R_runR(cmd, R_opts2, env)
+                ## htmltools produced non-UTF-8 output in Dec 2015
                 if (R_check_suppress_RandR_message)
                     grep('^Xlib: *extension "RANDR" missing on display', out,
-                         invert = TRUE, value = TRUE)
+                         invert = TRUE, value = TRUE, useBytes = TRUE)
                 else out
             }
 
-    dir.exists <- function(x) !is.na(isdir <- file.info(x)$isdir) & isdir
-
     td0 <- Inf # updated below
     print_time <- function(t1, t2, Log)
     {
@@ -241,14 +240,7 @@ setRlibs <-
     }
 
     parse_description_field <- function(desc, field, default=TRUE)
-    {
-        tmp <- desc[field]
-        if (is.na(tmp)) default
-        else switch(tmp,
-                    "yes"=, "Yes" =, "true" =, "True" =, "TRUE" = TRUE,
-                    "no" =, "No" =, "false" =, "False" =, "FALSE" = FALSE,
-                    default)
-    }
+        str_parse_logic(desc[field], default=default)
 
     check_pkg <- function(pkg, pkgname, pkgoutdir, startdir, libdir, desc,
                           is_base_pkg, is_rec_pkg, subdirs, extra_arch)
@@ -265,6 +257,7 @@ setRlibs <-
             resultLog(Log, "OK")
         } else {
             errorLog(Log, "Package directory ", sQuote(pkg), "does not exist.")
+            summaryLog(Log)
             do_exit(1L)
         }
 
@@ -305,7 +298,7 @@ setRlibs <-
 
         check_data() # 'data' dir and sysdata.rda
 
-        if (!is_base_pkg && dir.exists("src") && !extra_arch) check_src_dir()
+        if (!is_base_pkg && !extra_arch) check_src_dir(desc)
 
         if(do_install &&
            dir.exists("src") &&
@@ -326,35 +319,37 @@ setRlibs <-
                 warningLog(Log, "'qpdf' is needed for checks on size reduction of PDFs")
         }
         if (dir.exists("inst/doc") && do_install) check_doc_contents()
-        if (dir.exists("vignettes")) check_vign_contents()
-        if (dir.exists("inst/doc") && !dir.exists("vignettes")) {
-            pattern <- vignetteEngine("Sweave")$pattern
-            sources <- setdiff(list.files(file.path("inst", "doc"),
-                                          pattern = pattern),
-                               list.files("vignettes", pattern = pattern))
-            buildPkgs <- .get_package_metadata(".")["VignetteBuilder"]
-            if (!is.na(buildPkgs)) {
-                buildPkgs <- unlist(strsplit(buildPkgs, ","))
-                buildPkgs <- unique(gsub('[[:space:]]', '', buildPkgs))
-                engineList <- vignetteEngine(package = buildPkgs)
-                for(nm in names(engineList)) {
-                    pattern <- engineList[[nm]]$pattern
-                    sources <- c(sources,
-                                 setdiff(list.files(file.path("inst", "doc"),
-                                                    pattern = pattern),
-                                         list.files("vignettes", pattern = pattern)))
+        if (dir.exists("vignettes")) check_vign_contents(ignore_vignettes)
+        if (!ignore_vignettes) {
+            if (dir.exists("inst/doc") && !dir.exists("vignettes")) {
+                pattern <- vignetteEngine("Sweave")$pattern
+                sources <- setdiff(list.files(file.path("inst", "doc"),
+                                              pattern = pattern),
+                                   list.files("vignettes", pattern = pattern))
+                buildPkgs <- .get_package_metadata(".")["VignetteBuilder"]
+                if (!is.na(buildPkgs)) {
+                    buildPkgs <- unlist(strsplit(buildPkgs, ","))
+                    buildPkgs <- unique(gsub('[[:space:]]', '', buildPkgs))
+                    engineList <- vignetteEngine(package = buildPkgs)
+                    for(nm in names(engineList)) {
+                        pattern <- engineList[[nm]]$pattern
+                        sources <- c(sources,
+                                     setdiff(list.files(file.path("inst", "doc"),
+                                                        pattern = pattern),
+                                             list.files("vignettes", pattern = pattern)))
+                    }
+                }
+                sources <- unique(sources)
+                if(length(sources)) {
+                    checkingLog(Log, "for old-style vignette sources")
+                    msg <- c("Vignette sources only in 'inst/doc':",
+                             strwrap(paste(sQuote(sources), collapse = ", "),
+                                     indent = 2L, exdent = 2L),
+                             "A 'vignettes' directory is required as from R 3.1.0",
+                             "and these will not be indexed nor checked")
+                    ## warning or error eventually
+                    noteLog(Log, paste(msg, collapse = "\n"))
                 }
-            }
-            sources <- unique(sources)
-            if(length(sources)) {
-                checkingLog(Log, "for old-style vignette sources")
-                msg <- c("Vignette sources only in 'inst/doc':",
-                         strwrap(paste(sQuote(sources), collapse = ", "),
-                                 indent = 2L, exdent = 2L),
-                         "A 'vignettes' directory is required as from R 3.1.0",
-                         "and these will not be indexed nor checked")
-                ## warning or error eventually
-                noteLog(Log, paste(msg, collapse = "\n"))
             }
         }
 
@@ -369,14 +364,18 @@ setRlibs <-
         }
 
         ## Run the package-specific tests.
-        tests_dir <- file.path(pkgdir, "tests")
+        tests_dir <- file.path(pkgdir, test_dir)
+	if (test_dir != "tests" && !dir.exists(tests_dir)) {
+	    warningLog(Log)
+	    printLog(Log, "directory ", sQuote(test_dir), " not found\n")
+	}
         if (dir.exists(tests_dir) && # trackObjs has only *.Rin
-            length(dir(tests_dir, pattern = "\\.(R|Rin)$")))
+            length(dir(tests_dir, pattern = "\\.(R|r|Rin)$")))
             run_tests()
 
         ## Check package vignettes.
         setwd(pkgoutdir)
-        run_vignettes(desc)
+        if (!ignore_vignettes) run_vignettes(desc)
 
     } ## end{ check_pkg }
 
@@ -461,11 +460,11 @@ setRlibs <-
                     "Please rename the files and try again.\n",
                     "See section 'Package structure'",
                     "in the 'Writing R Extensions' manual.\n")
-            do_exit(1L)
+	    maybe_exit(1L)
         }
 
         ## Next check for name clashes on case-insensitive file systems
-        ## (that is on Windows and (by default) on OS X).
+        ## (that is on Windows and (by default) on macOS).
 
         dups <- unique(allfiles[duplicated(tolower(allfiles))])
         if (nb <- length(dups)) {
@@ -477,7 +476,7 @@ setRlibs <-
                     "Please rename the files and try again.\n",
                     "See section 'Package structure'",
                     "in the 'Writing R Extensions' manual.\n")
-            do_exit(1L)
+	    maybe_exit(1L)
         }
 
         ## NB: the omission of ' ' is deliberate.
@@ -533,7 +532,8 @@ setRlibs <-
                     "final component.\n",
                     "See section 'Package structure'",
                     "in the 'Writing R Extensions' manual.\n")
-            if (!OK) do_exit(1L)
+	    if (!OK)
+		maybe_exit(1L)
         }
         if (!any) resultLog(Log, "OK")
 
@@ -562,11 +562,11 @@ setRlibs <-
         ##                                 full.names = TRUE, recursive = TRUE)
         ##                 allfiles <- sub("^./", "", allfiles)
         if(length(allfiles)) {
-            mode <- file.info(allfiles)$mode
+            mode <- file.mode(allfiles)
             bad_files <- allfiles[(mode & "400") < as.octmode("400")]
         }
         if(length(alldirs <- unique(dirname(allfiles)))) {
-            mode <- file.info(alldirs)$mode
+            mode <- file.mode(alldirs)
             bad_files <- c(bad_files,
                            alldirs[(mode & "700") < as.octmode("700")])
         }
@@ -575,8 +575,8 @@ setRlibs <-
             wrapLog("Found the following files with insufficient permissions:\n")
             printLog0(Log, .format_lines_with_indent(bad_files), "\n")
             wrapLog("Permissions should be at least 700 for directories and 400 for files.\nPlease fix permissions and try again.\n")
-            do_exit(1L)
-        }
+	    maybe_exit(1L)
+	}
 
         ## Phase B.  Top-level scripts 'configure' and 'cleanup'
         ## should really be mode at least 500, or they will not be
@@ -584,7 +584,7 @@ setRlibs <-
         bad_files <- character()
         for (f in c("configure", "cleanup")) {
             if (!file.exists(f)) next
-            mode <- file.info(f)$mode
+            mode <- file.mode(f)
             if ((mode & "500") < as.octmode("500"))
                 bad_files <- c(bad_files, f)
         }
@@ -604,17 +604,30 @@ setRlibs <-
 
         checkingLog(Log, "DESCRIPTION meta-information")
         dfile <- if (is_base_pkg) "DESCRIPTION.in" else "DESCRIPTION"
+        any <- FALSE
+
         ## FIXME: this does not need to be run in another process
         ## but that needs conversion to format().
         Rcmd <- sprintf("tools:::.check_package_description(\"%s\", TRUE)",
                         dfile)
         out <- R_runR(Rcmd, R_opts2, "R_DEFAULT_PACKAGES=NULL")
         if (length(out)) {
-            errorLog(Log)
-            printLog0(Log, paste(out, collapse = "\n"), "\n")
-            do_exit(1L)
+            if(any(!grepl("^Malformed (Title|Description)", out))) {
+                errorLog(Log)
+                printLog0(Log, paste(out, collapse = "\n"), "\n")
+                summaryLog(Log)
+                do_exit(1L)
+            } else {
+                ## <FIXME>
+                ## This is not quite right: if we issue a NOTE here, we
+                ## can no longer issue a WARNING in the description
+                ## encoding check below ....
+                noteLog(Log)
+                any <- TRUE
+                printLog0(Log, paste(out, collapse = "\n"), "\n")
+                ## </FIXME>
+            }
         }
-        any <- FALSE
         ## Check the encoding.
         Rcmd <- sprintf("tools:::.check_package_description_encoding(\"%s\")", dfile)
         out <- R_runR(Rcmd, R_opts2, "R_DEFAULT_PACKAGES=NULL")
@@ -630,7 +643,7 @@ setRlibs <-
         ## entries because these really are a part of R: hence, skip the
         ## check.
         check_license <- if (!is_base_pkg) {
-            Check_license <- Sys.getenv("_R_CHECK_LICENSE_", NA)
+            Check_license <- Sys.getenv("_R_CHECK_LICENSE_", NA_character_)
             if(is.na(Check_license)) {
                 ## The check code conditionalizes *output* on _R_CHECK_LICENSE_.
                 Sys.setenv('_R_CHECK_LICENSE_' = "TRUE")
@@ -645,8 +658,8 @@ setRlibs <-
             if (length(out)) {
                 if (check_license == "maybe") {
                     if (!any) warningLog(Log)
-                } else if (any(grepl("^(Standardizable: FALSE|Invalid license file pointers:)",
-                                     out))) {
+                } else if(any(startsWith(out, "Standardizable: FALSE"),
+                              startsWith(out, "Invalid license file pointers:"))) {
                     if (!any) warningLog(Log)
                 } else {
                     if (!any) noteLog(Log)
@@ -660,8 +673,9 @@ setRlibs <-
         ## and does not check for persons with no valid roles.
         db <- .read_description(dfile)
         if(!is.na(aar <- db["Authors at R"])) {
+            lev <- if(check_incoming) 2L else 1L
             out <- .check_package_description_authors_at_R_field(aar,
-                                                                 strict = TRUE)
+                                                                 strict = lev)
             if(length(out)) {
                 if(!any) noteLog(Log)
                 any <- TRUE
@@ -670,21 +684,15 @@ setRlibs <-
             }
             ## and there might be stale Authors and Maintainer fields
             yorig <- db[c("Author", "Maintainer")]
-            if(check_incoming &&any(!is.na(yorig))) {
+            if(check_incoming && any(!is.na(yorig))) {
                 enc <- db["Encoding"]
                 aar <- utils:::.read_authors_at_R_field(aar)
-                tmp <- utils:::.format_authors_at_R_field_for_author(aar)
-                ## uses strwrap, so will be in current locale
-                if(!is.na(enc)) tmp <- iconv(tmp, "", enc)
-                y <- c(Author = tmp,
+                y <- c(Author =
+                       utils:::.format_authors_at_R_field_for_author(aar),
                        Maintainer =
                        utils:::.format_authors_at_R_field_for_maintainer(aar))
                 ## ignore formatting as far as possible
-                clean_up <- function(x) {
-                    x <- gsub("[[:space:]]+", " ", x)
-                    x <- sub("^[[:space:]]+", " ", x)
-                    sub("^[[:space:]]+$", " ", x)
-                }
+                clean_up <- function(x) trimws(gsub("[[:space:]]+", " ", x))
                 yorig <- sapply(yorig, clean_up)
                 y <- sapply(y, clean_up)
                 diff <- y != yorig
@@ -707,7 +715,70 @@ setRlibs <-
             }
         }
 
-        out <- format(tools:::.check_package_description2(dfile))
+        if(!is_base_pkg && is.na(db["Packaged"])) {
+            if(!any) (noteLog(Log))
+            any <- TRUE
+            printLog(Log,
+                     "Checking should be performed on sources prepared by 'R CMD build'.",
+                     "\n")
+        }
+
+        if(!is.na(ncomp <- db["NeedsCompilation"])) {
+            if (!ncomp %in% c("yes", "no")) {
+                if(!any) noteLog(Log)
+                any <- TRUE
+                printLog(Log, "NeedsCompilation field must take value 'yes' or 'no'", "\n")
+            }
+            if((ncomp == "no") && dir.exists("src")) {
+                if(!any) noteLog(Log)
+                any <- TRUE
+                printLog(Log, "NeedsCompilation field should likely be 'yes'", "\n")
+            }
+        }
+
+        ## check for BugReports field added at R 3.4.0
+        ## This used to check for empty first line as that
+        ## breaks bug.report() in R <= 3.3.2 -- but read.dcf in those
+        ## versions adds back the newline.
+        if(!is.na(BR <- db["BugReports"])) {
+            if (nzchar(BR)) {
+                msg <- ""
+                ## prior to 3.4.0 this was said to be
+                ## 'a URL to which bug reports about the package
+                ## should be submitted'
+                ## We will take that to mean a http[s]:// URL,
+                isURL <- grepl("^https?://[^ ]*$", BR)
+                ## As from 3.4.0 bug,report() is able to extract
+                ## an email addr.
+                if(!isURL) {
+                    findEmail <- function(x) {
+                        x <- paste(x, collapse = " ")
+                        if (grepl("mailto:", x))
+                            sub(".*mailto:([^ ]+).*", "\\1", x)
+                        else if (grepl("[^<]*<([^>]+)", x))
+                            sub("[^<]*<([^>]+)>.*", "\\1", x)
+                        else NA_character_
+                    }
+                    msg <- if (is.na(findEmail(BR))) {
+                        if (grepl("(^|.* )[^ ]+@[[:alnum:]._]+", BR))
+                            "BugReports field is not a suitable URL but appears to contain an email address\n  not specified by mailto: nor contained in < >"
+                        else
+                            "BugReports field should be the URL of a single webpage"
+                    } else
+                        "BugReports field is not a suitable URL but contains an email address\n  which will be used as from R 3.4.0"
+                }
+            } else {
+                msg <- "BugReports field should not be empty"
+            }
+            if (nzchar(msg)) {
+                if(!any) noteLog(Log)
+                any <- TRUE
+                printLog(Log, msg, "\n")
+           }
+        }
+
+
+        out <- format(.check_package_description2(dfile))
         if (length(out)) {
             if(!any) noteLog(Log)
             any <- TRUE
@@ -719,6 +790,8 @@ setRlibs <-
 
     check_build <- function()
     {
+        ## currently only checks vignettes
+        if (ignore_vignettes) return()
         fv <- file.path("build", "vignette.rds")
         if(!file.exists(fv)) return()
         checkingLog(Log, "'build' directory")
@@ -757,6 +830,43 @@ setRlibs <-
             wrapLog("These files are defunct.",
                     "See manual 'Writing R Extensions'.\n")
         }
+        if(check_incoming) {
+            ## CRAN must be able to convert
+            ##   inst/README.md or README.md
+            ##   inst/NEWS.md or NEWS.md
+            ## to HTML using pandoc: check that this works fine.
+            md_files <-
+                c(Filter(file.exists,
+                         c(file.path("inst", "README.md"),
+                           "README.md"))[1L],
+                  Filter(file.exists,
+                         c(file.path("inst", "NEWS.md"),
+                           "NEWS.md"))[1L])
+            md_files <- md_files[!is.na(md_files)]
+            if(length(md_files)) {
+                if(nzchar(Sys.which("pandoc"))) {
+                    for(ifile in md_files) {
+                        ofile <- tempfile("pandoc", fileext = ".html")
+                        out <- .pandoc_md_for_CRAN(ifile, ofile)
+                        if(out$status) {
+                            if(!any) warningLog(Log)
+                            any <- TRUE
+                            printLog(Log,
+                                     sprintf("Conversion of '%s' failed:\n",
+                                             ifile),
+                                     paste(out$stderr, collapse = "\n"),
+                                     "\n")
+                        }
+                        unlink(ofile)
+                    }
+                } else {
+                    if(!any) noteLog(Log)
+                    any <- TRUE
+                    printLog(Log,
+                             "Files 'README.md' or 'NEWS.md' cannot be checked without 'pandoc' being installed.\n")
+                }
+            }
+        }
         topfiles <- Sys.glob(c("LICENCE", "LICENSE"))
         if (length(topfiles)) {
             ## Are these mentioned in DESCRIPTION?
@@ -812,7 +922,9 @@ setRlibs <-
             if(is.null(topfiles0)) {
                 topfiles <- dir()
                 ## Now check if any of these were created since we started
-                topfiles <- topfiles[file.info(topfiles)$ctime <= .unpack.time]
+                topfiles <-
+                    topfiles[file.info(topfiles, extra_cols = FALSE)$ctime
+                             <= .unpack.time]
             } else topfiles <- topfiles0
             known <- c("DESCRIPTION", "INDEX", "LICENCE", "LICENSE",
                        "LICENCE.note", "LICENSE.note",
@@ -822,7 +934,7 @@ setRlibs <-
                        "ChangeLog", "Changelog", "CHANGELOG", "CHANGES", "Changes",
                        "INSTALL", "README", "THANKS", "TODO", "ToDo",
                        "INSTALL.windows",
-                       "README.md",   # seems popular
+                       "README.md", "NEWS.md",
                        "configure", "configure.win", "cleanup", "cleanup.win",
                        "configure.ac", "configure.in",
                        "datafiles",
@@ -915,10 +1027,8 @@ setRlibs <-
             }
         }
         if (any)
-            wrapLog("See the information on INDEX files and package",
-                    "subdirectories in the chapter 'Creating R packages'",
-                    "of the 'Writing R Extensions' manual.\n")
-        else  resultLog(Log, "OK")
+            wrapLog("See sections 'The INDEX file' and 'Package subdirectories' in the 'Writing R Extensions' manual.\n")
+        else resultLog(Log, "OK")
     }
 
     check_subdirectories <- function(haveR, subdirs)
@@ -1069,7 +1179,7 @@ setRlibs <-
                     wrapLog("Portable packages must use only ASCII",
                             "characters in their demos.\n",
                             "Use \\uxxxx escapes for other characters.\n")
-                    demos <- demos[! basename(demos) %in% bad]
+                    demos <- demos[basename(demos) %notin% bad]
                 }
                 ## check we can parse each demo.
                 bad <- character()
@@ -1127,7 +1237,7 @@ setRlibs <-
                 c("Meta", "R", "data", "demo", "exec", "libs",
                   "man", "help", "html", "latex", "R-ex", "build")
             allfiles <- dir("inst", full.names = TRUE)
-            alldirs <- allfiles[file.info(allfiles)$isdir]
+            alldirs <- allfiles[dir.exists(allfiles)]
             suspect <- basename(alldirs) %in% R_system_subdirs
             if (any(suspect)) {
                 ## check they are non-empty
@@ -1245,10 +1355,10 @@ setRlibs <-
         checkingLog(Log, "R files for syntax errors")
         Rcmd  <- "options(warn=1);tools:::.check_package_code_syntax(\"R\")"
         out <- R_runR(Rcmd, R_opts2, "R_DEFAULT_PACKAGES=NULL")
-        if (any(grepl("^Error", out))) {
+        if (any(startsWith(out, "Error"))) {
             errorLog(Log)
             printLog0(Log, paste(c(out, ""), collapse = "\n"))
-            do_exit(1L)
+	    maybe_exit(1L)
         } else if (length(out)) {
             warningLog(Log)
             printLog0(Log, paste(c(out, ""), collapse = "\n"))
@@ -1257,7 +1367,7 @@ setRlibs <-
 
     check_R_code <- function()
     {
-        if (!is_base_pkg) {
+        ## if (!is_base_pkg) {
             checkingLog(Log, "dependencies in R code")
             if (do_install) {
                 Rcmd <- paste("options(warn=1, showErrorCalls=FALSE)\n",
@@ -1268,7 +1378,7 @@ setRlibs <-
                     if(any(grepl("(not declared from|Including base/recommended)", out))) warningLog(Log)
                     else noteLog(Log)
                     printLog0(Log, paste(c(out, ""), collapse = "\n"))
-                    wrapLog(msg_DESCRIPTION)
+                    ## wrapLog(msg_DESCRIPTION)
                 } else resultLog(Log, "OK")
             } else {
                 ## this needs to read the package code, and will fail on
@@ -1281,10 +1391,10 @@ setRlibs <-
                     if(any(grepl("not declared from", out))) warningLog(Log)
                     else noteLog(Log)
                     printLog0(Log, paste(c(out, ""), collapse = "\n"))
-                    wrapLog(msg_DESCRIPTION)
+                    ## wrapLog(msg_DESCRIPTION)
                 } else resultLog(Log, "OK")
             }
-        }
+        ## }
 
         ## Check whether methods have all arguments of the corresponding
         ## generic.
@@ -1297,10 +1407,29 @@ setRlibs <-
                       sprintf("tools::checkS3methods(dir = \"%s\")\n", pkgdir))
         out <- R_runR2(Rcmd)
         if (length(out)) {
-            warningLog(Log)
-            printLog0(Log, paste(c(out, ""), collapse = "\n"))
-            wrapLog("See section 'Generic functions and methods'",
-                    "of the 'Writing R Extensions' manual.\n")
+            pos <- grep("^Found the following apparent S3 methods", out)
+            if(!length(pos)) {
+                out1 <- out
+                out2 <- character()
+            } else {
+                pos <- pos[1L]
+                out1 <- out[seq_len(pos - 1L)]
+                out2 <- out[seq.int(pos, length(out))]
+            }
+            if(length(out1)) {
+                warningLog(Log)
+                printLog0(Log, paste(c(out1, ""), collapse = "\n"))
+                wrapLog("See section 'Generic functions and methods'",
+                        "in the 'Writing R Extensions' manual.\n")
+            } else
+                noteLog(Log)
+            if(length(out2)) {
+                printLog0(Log,
+                          paste(c(if(length(out1)) "", out2, ""),
+                                collapse = "\n"))
+                wrapLog("See section 'Registering S3 methods'",
+                        "in the 'Writing R Extensions' manual.\n")
+            }
         } else resultLog(Log, "OK")
 
         ## Check whether replacement functions have their final argument
@@ -1362,11 +1491,10 @@ setRlibs <-
                             "They are not part of the API,",
                             "for use only by R itself",
                             "and subject to change without notice.")
-                else if(any(grepl("with DUP != TRUE:", out)))
-                    wrapLog("DUP = FALSE is deprecated and will be",
-                            "disabled in future versions of R.")
+                else if(any(grepl("with DUP:", out)))
+                    wrapLog("DUP is no longer supported and will be ignored.")
                 else
-                    wrapLog("See the chapter 'System and foreign language interfaces' of the 'Writing R Extensions' manual.\n")
+                    wrapLog("See chapter 'System and foreign language interfaces' in the 'Writing R Extensions' manual.\n")
             } else resultLog(Log, "OK")
         }
     }
@@ -1387,7 +1515,7 @@ setRlibs <-
                 wrapLog("The system-specific extension for",
                         "shared objects must not be added.\n",
                         "See ?library.dynam.\n")
-                do_exit(1L)
+		maybe_exit(1L)
             }
         }
 
@@ -1415,7 +1543,31 @@ setRlibs <-
             Rcmd <-
                 paste("options(warn=1)\n",
                       sprintf("tools:::.check_code_usage_in_package(package = \"%s\")\n", pkgname))
-            out3 <- R_runR2(Rcmd, "R_DEFAULT_PACKAGES=")
+            if(config_val_to_logical(Sys.getenv("_R_CHECK_CODE_USAGE_WITH_ONLY_BASE_ATTACHED_",
+                                                "true"))) {
+                out3 <-  R_runR2(Rcmd, "R_DEFAULT_PACKAGES=NULL")
+                if(length(pos <-
+                          grep("^Undefined global functions or variables:",
+                               out3))) {
+                    Rcmd <-
+                        sprintf("writeLines(strwrap(tools:::imports_for_undefined_globals(\"%s\"), exdent = 11))\n",
+                                paste(utils::tail(out3, -pos),
+                                      collapse = " "))
+                    miss <- R_runR2(Rcmd, "R_DEFAULT_PACKAGES=")
+                    ## base has no NAMESPACE
+                    if(length(miss) && pkgname != "base") {
+                        msg3 <- if(length(grep("^importFrom\\(\"methods\"",
+                                               miss))) {
+                            strwrap("to your NAMESPACE file (and ensure that your DESCRIPTION Imports field contains 'methods').")
+                        } else "to your NAMESPACE file."
+                        out3 <- c(out3,
+                                  c("Consider adding",
+                                    paste0("  ", miss),
+                                    msg3))
+                    }
+                }
+            } else
+                out3 <-  R_runR2(Rcmd, "R_DEFAULT_PACKAGES=")
         }
 
         if(!is_base_pkg && R_check_use_codetools && R_check_dot_internal) {
@@ -1450,7 +1602,6 @@ setRlibs <-
             out7 <- R_runR(Rcmd, R_opts2, "R_DEFAULT_PACKAGES=")
         }
 
-
         ## Use of deprecated, defunct and platform-specific devices?
         if(!is_base_pkg && R_check_use_codetools && R_check_depr_def) {
             win <- !is.na(OS_type) && OS_type == "windows"
@@ -1528,8 +1679,7 @@ setRlibs <-
     check_Rd_files <- function(haveR)
     {
         msg_writing_Rd <-
-            c("See the chapter 'Writing R documentation files'",
-              "in the 'Writing R Extensions' manual.\n")
+            c("See chapter 'Writing R documentation files' in the 'Writing R Extensions' manual.\n")
 
         if (dir.exists("man") && !extra_arch) {
             checkingLog(Log, "Rd files")
@@ -1638,13 +1788,13 @@ setRlibs <-
             if (length(err)) {
                 errorLog(Log)
                 printLog0(Log, paste(c(out, ""), collapse = "\n"))
-                do_exit(1L)
+		maybe_exit(1L)
             } else if (length(out)) {
                 warningLog(Log)
                 printLog0(Log, paste(c(out, ""), collapse = "\n"))
                 wrapLog("All user-level objects",
                         "in a package",
-                        if (any(grepl("^Undocumented S4", out)))
+                        if (any(startsWith(out, "Undocumented S4")))
                         "(including S4 classes and methods)",
                         "should have documentation entries.\n")
                 wrapLog(msg_writing_Rd)
@@ -1788,7 +1938,7 @@ setRlibs <-
             fi <- list.files("data")
             if (!any(grepl("\\.[Rr]$", fi))) { # code files can do anything
                 dataFiles <- basename(list_files_with_type("data", "data"))
-                odd <- fi[! fi %in% c(dataFiles, "datalist")]
+                odd <- fi %w/o% c(dataFiles, "datalist")
                 if (length(odd)) {
                     warningLog(Log)
                     msg <-
@@ -1866,8 +2016,8 @@ setRlibs <-
         files2 <- dir(file.path(pkgdir, "inst", "doc"), recursive = TRUE,
                      pattern = "[.](cls|sty|drv)$", full.names = TRUE)
         ## Skip Rnews.sty and RJournal.sty for now
-        files2 <- files2[! basename(files2) %in%
-                       c("jss.cls", "jss.drv", "Rnews.sty", "RJournal.sty")]
+        files2 <- files2[basename(files2) %notin%
+                         c("jss.cls", "jss.drv", "Rnews.sty", "RJournal.sty")]
         bad <- character()
         for(f in files2) {
             pat <- "%% (This generated file may be distributed as long as the|original source files, as listed above, are part of the|same distribution.)"
@@ -1898,7 +2048,7 @@ setRlibs <-
         }
 
         files <- dir(doc_dir)
-        files <- files[! files %in% already]
+        files <- files %w/o% already
         bad <- grepl("[.](tex|lyx|png|jpg|jpeg|gif|ico|bst|cls|sty|ps|eps|img)$",
                      files, ignore.case = TRUE)
         bad <- bad | grepl("(Makefile|~$)", files)
@@ -1939,9 +2089,13 @@ setRlibs <-
         if (!any) resultLog(Log, "OK")
     }
 
-    check_vign_contents <- function()
+    check_vign_contents <- function(ignore_vignettes = FALSE)
     {
         checkingLog(Log, "files in 'vignettes'")
+        if (ignore_vignettes) {
+            resultLog(Log, "SKIPPED")
+            return()
+        }
         ## special case common problems.
         any <- FALSE
         pattern <- vignetteEngine("Sweave")$pattern
@@ -1959,11 +2113,69 @@ setRlibs <-
             printLog0(Log, paste(msg, collapse = "\n"))
         }
 
+	## Did the vignettes get updated in inst/doc?
+	inst_doc_files <- list.files(file.path(pkgdir, "inst", "doc"),
+				     recursive = TRUE)
+	vignette_files <- list.files(vign_dir, recursive = TRUE)
+	if (!is_base_pkg && length(vignette_files)) {
+	    if (!length(inst_doc_files)) {
+		if (!any) warningLog(Log)
+		any <- TRUE
+		msg <- c("Files in the 'vignettes' directory but no files in 'inst/doc':",
+			 strwrap(paste(sQuote(vignette_files), collapse = ", "),
+				 indent = 2L, exdent = 4L),
+			 "")
+		printLog0(Log, paste(msg, collapse = "\n"))
+	    } else {
+                ## allow for some imprecision in file times (in secs)
+                time_tol <- as.double(Sys.getenv("_R_CHECK_FILE_TIMES_TOL_", 10))
+		vignette_times <- file.mtime(file.path(vign_dir, vignette_files))
+		inst_doc_times <- file.mtime(file.path(pkgdir, "inst", "doc", inst_doc_files))
+		if (sum(!is.na(vignette_times)) && sum(!is.na(inst_doc_times)) &&
+                    max(vignette_times, na.rm = TRUE) > max(inst_doc_times, na.rm = TRUE) + time_tol) {
+		    if (!any) warningLog(Log)
+		    any <- TRUE
+		    msg <- c("Files in the 'vignettes' directory newer than all files in 'inst/doc':",
+			     strwrap(paste(sQuote(vignette_files[!is.na(vignette_times) & vignette_times > max(inst_doc_times, na.rm = TRUE)]),
+					   collapse = ", "),
+				     indent = 2L, exdent = 4L),
+			     "")
+		    keep <- is.na(vignette_times) |
+                        vignette_times <= max(inst_doc_times, na.rm = TRUE) + time_tol
+		    vignette_files <- vignette_files[keep]
+		    vignette_times <- vignette_times[keep]
+		    printLog0(Log, paste(msg, collapse = "\n"))
+		}
+		matches <- match(vignette_files, inst_doc_files)
+		newer <- vignette_times > inst_doc_times[matches] + time_tol
+		newer <- !is.na(matches) & !is.na(newer) & newer
+		if (any(newer)) {
+		    if (!any) warningLog(Log)
+		    any <- TRUE
+		    msg <- c("Files in the 'vignettes' directory newer than same file in 'inst/doc':",
+			     strwrap(paste(sQuote(vignette_files[newer]),
+					   collapse = ", "),
+				     indent = 2L, exdent = 4L),
+			     "")
+		    printLog0(Log, paste(msg, collapse = "\n"))
+		}
+	    }
+	}
+
         files <- dir(file.path(pkgdir, "vignettes"))
+        if(length(files) &&
+           !length(dir(file.path(pkgdir, "vignettes"),
+                       pattern = pattern)) &&
+           is.na(desc["VignetteBuilder"])) {
+            if(!any) noteLog(Log)
+            any <- TRUE
+            printLog0(Log,
+                      "Package has no Sweave vignette sources and no VignetteBuilder field.\n")
+        }
         already <- c("jss.cls", "jss.bst", "Rd.sty", "Sweave.sty")
         bad <- files[files %in% already]
         if (length(bad)) {
-            noteLog(Log)
+            if(!any) noteLog(Log)
             any <- TRUE
             printLog0(Log,
                       "The following files are already in R: ",
@@ -1972,8 +2184,8 @@ setRlibs <-
         }
         files2 <- dir(file.path(pkgdir, "vignettes"), recursive = TRUE,
                      pattern = "[.](cls|sty|drv)$", full.names = TRUE)
-        files2 <- files2[! basename(files2) %in%
-                       c("jss.cls", "jss.drv", "Rnews.sty", "RJournal.sty")]
+        files2 <- files2[basename(files2) %notin%
+                         c("jss.cls", "jss.drv", "Rnews.sty", "RJournal.sty")]
         bad <- character()
         for(f in files2) {
             pat <- "%% (This generated file may be distributed as long as the|original source files, as listed above, are part of the|same distribution.)"
@@ -2003,6 +2215,21 @@ setRlibs <-
                                     indent = 2, exdent = 2), collapse = "\n"),
                       "\nPlease remove them from your package.\n")
         }
+
+        ## Probable leftovers from knitr
+        dirs <- file.path(pkgdir, "vignettes", c("cache", "figure"))
+        dirs <- basename(dirs[dir.exists(dirs)])
+        if(length(dirs)) {
+            if(!any) noteLog(Log)
+            any <- TRUE
+            printLog0(Log,
+                      if(length(dirs)> 1L) "The following directories look like leftovers from 'knitr':\n"
+                      else "The following directory looks like a leftover from 'knitr':\n",
+                      paste(strwrap(paste(sQuote(dirs), collapse = ", "),
+                                    indent = 2, exdent = 2), collapse = "\n"),
+                      "\nPlease remove from your package.\n")
+        }
+
         if (!any) resultLog(Log, "OK")
     }
 
@@ -2054,7 +2281,7 @@ setRlibs <-
         }
     }
 
-    check_src_dir <- function()
+    check_src_dir <- function(desc)
     {
         ## Check C/C++/Fortran sources/headers for CRLF line endings.
         ## <FIXME>
@@ -2063,44 +2290,58 @@ setRlibs <-
         ## will not accept CRLF or CR line endings.
         ## (Sun Studio 12 definitely objects to CR in both C and Fortran).
         ## </FIXME>
-        checkingLog(Log, "line endings in C/C++/Fortran sources/headers")
-        ## pattern is "([cfh]|cc|cpp)"
-        files <- dir("src", pattern = "\\.([cfh]|cc|cpp)$",
-                     full.names = TRUE, recursive = TRUE)
-        ## exclude dirs starting src/win, e.g for tiff
-        files <- grep("^src/[Ww]in", files, invert = TRUE, value = TRUE)
-        bad_files <- character()
-        for(f in files) {
-            contents <- readChar(f, file.info(f)$size, useBytes = TRUE)
-            if (grepl("\r", contents, fixed = TRUE, useBytes = TRUE))
-                bad_files <- c(bad_files, f)
+        if(dir.exists("src")) {
+            checkingLog(Log, "line endings in C/C++/Fortran sources/headers")
+            ## pattern is "([cfh]|cc|cpp)"
+            files <- dir("src", pattern = "\\.([cfh]|cc|cpp)$",
+                         full.names = TRUE, recursive = TRUE)
+            ## exclude dirs starting src/win, e.g for tiff
+            files <- grep("^src/[Ww]in", files, invert = TRUE, value = TRUE)
+            bad_files <- character()
+            for(f in files) {
+                contents <- readChar(f, file.size(f), useBytes = TRUE)
+                if (grepl("\r", contents, fixed = TRUE, useBytes = TRUE))
+                    bad_files <- c(bad_files, f)
+            }
+            if (length(bad_files)) {
+                warningLog(Log, "Found the following sources/headers with CR or CRLF line endings:")
+                printLog0(Log, .format_lines_with_indent(bad_files), "\n")
+                printLog(Log, "Some Unix compilers require LF line endings.\n")
+            } else resultLog(Log, "OK")
         }
-        if (length(bad_files)) {
-            warningLog(Log, "Found the following sources/headers with CR or CRLF line endings:")
-            printLog0(Log, .format_lines_with_indent(bad_files), "\n")
-            printLog(Log, "Some Unix compilers require LF line endings.\n")
-        } else resultLog(Log, "OK")
 
         ## Check src/Make* for LF line endings, as Sun make does not accept CRLF
-        checkingLog(Log, "line endings in Makefiles")
-        bad_files <- character()
         ## .win files are not checked, as CR/CRLF work there
         all_files <-
             dir("src",
                 pattern = "^(Makevars|Makevars.in|Makefile|Makefile.in)$",
                 full.names = TRUE, recursive = TRUE)
-        for(f in all_files) {
-            if (!file.exists(f)) next
-            contents <- readChar(f, file.info(f)$size, useBytes = TRUE)
-            if (grepl("\r", contents, fixed = TRUE, useBytes = TRUE))
-                bad_files <- c(bad_files, f)
+        all_files <- c(all_files,
+                       dir(".", pattern = "^Makefile$",
+                           full.names = TRUE, recursive = TRUE))
+        all_files <- sub("^[.]/", "", all_files)
+        all_files <- unique(sort(all_files))
+        if(length(all_files)) {
+            checkingLog(Log, "line endings in Makefiles")
+            bad_files <- noEOL<- character()
+            for(f in all_files) {
+                if (!file.exists(f)) next
+                contents <- readChar(f, file.size(f), useBytes = TRUE)
+                if (grepl("\r", contents, fixed = TRUE, useBytes = TRUE))
+                    bad_files <- c(bad_files, f)
+                if (!grepl("\n$", contents, useBytes = TRUE))
+                    noEOL <- c(noEOL, f)
+            }
+            if (length(bad_files)) {
+                warningLog(Log, "Found the following Makefile(s) with CR or CRLF line endings:")
+                printLog0(Log, .format_lines_with_indent(bad_files), "\n")
+                printLog(Log, "Some Unix 'make' programs require LF line endings.\n")
+            } else if (length(noEOL)) {
+                noteLog(Log, "Found the following Makefile(s) without a final LF:")
+                printLog0(Log, .format_lines_with_indent(noEOL), "\n")
+                printLog(Log, "Some 'make' programs ignore lines not ending in LF.\n")
+            } else resultLog(Log, "OK")
         }
-        if (length(bad_files)) {
-            warningLog(Log, "Found the following Makefiles with CR or CRLF line endings:")
-            printLog0(Log, .format_lines_with_indent(bad_files), "\n")
-            printLog(Log, "Some Unix 'make' programs require LF line endings.\n")
-        } else resultLog(Log, "OK")
-
         ## Check src/Makevars[.in] compilation flags.
         if (length(makevars)) {
             checkingLog(Log, "compilation flags in Makevars")
@@ -2114,47 +2355,77 @@ setRlibs <-
                 printLog0(Log, paste(c(out, ""), collapse = "\n"))
             } else resultLog(Log, "OK")
         }
+        ## Check GNUisms
+        if (length(all_files)) {
+            checkingLog(Log, "for GNU extensions in Makefiles")
+            bad_files <- character()
+            for(f in all_files) {
+                contents <- readLines(f, warn = FALSE)
+                contents <- grep("^ *#", contents, value = TRUE, invert = TRUE)
+                ## Things like $(SUBDIRS:=.a)
+                contents <- grep("[$][(].+:=.+[)]", contents,
+                                 value = TRUE, invert = TRUE)
+                if (any(grepl("([+]=|:=|[$][(]wildcard|[$][(]shell|[$][(]eval|[$][(]call|[$][(]patsubst|^ifeq|^ifneq|^ifdef|^ifndef|^endif)", contents)))
+                    bad_files <- c(bad_files, f)
+            }
+            SysReq <- desc["SystemRequirements"]
+            if (length(bad_files)) {
+                if(!is.na(SysReq) && grepl("GNU [Mm]ake", SysReq)) {
+                    noteLog(Log, "GNU make is a SystemRequirements.")
+                } else {
+                    warningLog(Log, "Found the following file(s) containing GNU extensions:")
+                    printLog0(Log, .format_lines_with_indent(bad_files), "\n")
+                    wrapLog("Portable Makefiles do not use GNU extensions",
+                            "such as +=, :=, $(shell), $(wildcard),",
+                            "ifeq ... endif.",
+                            "See section 'Writing portable packages'",
+                            "in the 'Writing R Extensions' manual.\n")
+                }
+            } else resultLog(Log, "OK")
+        }
 
         ## check src/Makevar*, src/Makefile* for correct use of BLAS_LIBS
         ## FLIBS is not needed on Windows, at least currently (as it is
         ## statically linked).
-        checkingLog(Log, "for portable use of $(BLAS_LIBS) and $(LAPACK_LIBS)")
         makefiles <- Sys.glob(file.path("src",
                                         c("Makevars", "Makevars.in",
                                           "Makefile", "Makefile.win")))
-        any <- FALSE
-        for (f in makefiles) {
-            lines <- readLines(f, warn = FALSE)
-            ## Combine lines ending in escaped newlines.
-            if(any(ind <- grepl("[\\]$", lines, useBytes = TRUE))) {
-                ## Eliminate escape.
-                lines[ind] <-
-                    sub("[\\]$", "", lines[ind], useBytes = TRUE)
-                ## Determine ids of blocks that need to be joined.
-                ind <- seq_along(ind) - c(0, cumsum(ind)[-length(ind)])
-                ## And join.
-                lines <- unlist(lapply(split(lines, ind), paste,
-                                       collapse = " "))
-            }
-            c1 <- grepl("^[[:space:]]*PKG_LIBS", lines, useBytes = TRUE)
-            c2l <- grepl("\\$[{(]{0,1}LAPACK_LIBS", lines, useBytes = TRUE)
-            c2b <- grepl("\\$[{(]{0,1}BLAS_LIBS", lines, useBytes = TRUE)
-            c3 <- grepl("\\$[{(]{0,1}FLIBS", lines, useBytes = TRUE)
-            if (any(c1 & c2l & !c2b)) {
-                if (!any) warningLog(Log)
-                any <- TRUE
-                printLog(Log,
-                         "  apparently using $(LAPACK_LIBS) without $(BLAS_LIBS) in ",
-                         sQuote(f), "\n")
-            }
-            if (any(c1 & (c2b | c2l) & !c3)) {
-                if (!any) warningLog(Log)
-                any <- TRUE
-                printLog(Log, "  apparently PKG_LIBS is missing $(FLIBS) in ",
-                         sQuote(f), "\n")
+        if(length(makefiles)) {
+            checkingLog(Log, "for portable use of $(BLAS_LIBS) and $(LAPACK_LIBS)")
+            any <- FALSE
+            for (f in makefiles) {
+                lines <- readLines(f, warn = FALSE)
+                ## Combine lines ending in escaped newlines.
+                if(any(ind <- grepl("[\\]$", lines, useBytes = TRUE))) {
+                    ## Eliminate escape.
+                    lines[ind] <-
+                        sub("[\\]$", "", lines[ind], useBytes = TRUE)
+                    ## Determine ids of blocks that need to be joined.
+                    ind <- seq_along(ind) - c(0, cumsum(ind)[-length(ind)])
+                    ## And join.
+                    lines <- unlist(lapply(split(lines, ind), paste,
+                                           collapse = " "))
+                }
+                c1 <- grepl("^[[:space:]]*PKG_LIBS", lines, useBytes = TRUE)
+                c2l <- grepl("\\$[{(]{0,1}LAPACK_LIBS", lines, useBytes = TRUE)
+                c2b <- grepl("\\$[{(]{0,1}BLAS_LIBS", lines, useBytes = TRUE)
+                c3 <- grepl("\\$[{(]{0,1}FLIBS", lines, useBytes = TRUE)
+                if (any(c1 & c2l & !c2b)) {
+                    if (!any) warningLog(Log)
+                    any <- TRUE
+                    printLog(Log,
+                             "  apparently using $(LAPACK_LIBS) without $(BLAS_LIBS) in ",
+                             sQuote(f), "\n")
+                }
+                if (any(c1 & (c2b | c2l) & !c3)) {
+                    if (!any) warningLog(Log)
+                    any <- TRUE
+                    printLog(Log, "  apparently PKG_LIBS is missing $(FLIBS) in ",
+                             sQuote(f), "\n")
+                }
             }
+            if (!any) resultLog(Log, "OK")
         }
-        if (!any) resultLog(Log, "OK")
     }
 
     check_sos <- function() {
@@ -2164,7 +2435,7 @@ setRlibs <-
                       sprintf("tools:::check_compiled_code(\"%s\")",
                               file.path(libdir, pkgname)))
         out <- R_runR(Rcmd, R_opts2, "R_DEFAULT_PACKAGES=NULL")
-        if(length(out) == 1L && grepl("^Note:", out)) {
+        if(length(out) == 1L && startsWith(out, "Note:")) {
             ## This will be a note about symbols.rds not being available
             if(!is_base_pkg) {
                 noteLog(Log)
@@ -2182,16 +2453,17 @@ setRlibs <-
             else noteLog(Log)
             printLog0(Log, paste(c(out, ""), collapse = "\n"))
             nAPIs <- length(grep("Found non-API", out))
+            nRS <- length(grep("Found no call", out))
             nBad <- length(grep(", possibly from ", out))
             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 C RNG.\n")
+                      "of to the console, nor the system RNG.\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 C RNG.",
+                      "of to the console, nor the system RNG.",
                       "The detected symbols are linked",
                       "into the code but might come from libraries",
                       "and not actually be called.\n")
@@ -2199,6 +2471,9 @@ setRlibs <-
             if(nAPIs)
                 msg <- c(msg,
                          "Compiled code should not call non-API entry points in R.\n")
+            if(nRS)
+                msg <- c(msg,
+                         "It is good practice to register native routines and to disable symbol search.\n")
             wrapLog("\n", paste(msg, collapse = " "), "\n",
                     "See 'Writing portable packages'",
                     "in the 'Writing R Extensions' manual.\n")
@@ -2221,21 +2496,21 @@ setRlibs <-
                 printLog0(Log,
                           paste(c("Loading log:", out, ""),
                                 collapse = "\n"))
+            summaryLog(Log)
             do_exit()
         }
-        if (any(grepl("^Error", out))) {
+        if (any(startsWith(out, "Error"))) {
             errorLog(Log)
             printLog0(Log, paste(c(out, ""), collapse = "\n"))
             wrapLog("\nIt looks like this package",
                     "has a loading problem: see the messages",
                     "for details.\n")
-            do_exit()
+	    maybe_exit(1L)
         } else resultLog(Log, "OK")
 
         checkingLog(Log, "whether the package can be loaded with stated dependencies")
         out <- R_runR(Rcmd, opts, c(env, env1), arch = arch)
-        if (any(grepl("^Error", out)) || length(attr(out, "status"))) {
-            warningLog(Log)
+        if (any(startsWith(out, "Error")) || length(attr(out, "status"))) {
             printLog0(Log, paste(c(out, ""), collapse = "\n"))
             wrapLog("\nIt looks like this package",
                     "(or one of its dependent packages)",
@@ -2263,10 +2538,32 @@ setRlibs <-
         ## the namespace
         if (file.exists(file.path(pkgdir, "NAMESPACE"))) {
             checkingLog(Log, "whether the namespace can be loaded with stated dependencies")
-            Rcmd <- sprintf("loadNamespace(\"%s\")", pkgname)
+            Rcmd <-
+                sprintf("options(warn=1)\ntools:::.load_namespace_rather_quietly(\"%s\")",
+                        pkgname)
             out <- R_runR(Rcmd, opts, c(env, env1), arch = arch)
-            if (any(grepl("^Error", out)) || length(attr(out, "status"))) {
+            any <- FALSE
+            if (any(startsWith(out, "Error")) || length(attr(out, "status"))) {
                 warningLog(Log)
+                any <- TRUE
+            } else {
+		## Drop tcltk warning if no DISPLAY variable
+		if(pkgname == "tcltk")
+		    out <- grep("Warning: no DISPLAY variable so Tk is not available",
+				out, fixed = TRUE, invert = TRUE, value = TRUE)
+                ## Drop warnings about replacing previous imports unless
+                ## these were disabled for the installation check.
+                check_imports_flag <-
+                    Sys.getenv("_R_CHECK_REPLACING_IMPORTS_", "TRUE")
+                if(config_val_to_logical(check_imports_flag))
+                    out <- grep("Warning: replacing previous import", out,
+                                fixed = TRUE, invert = TRUE, value = TRUE)
+                if(any(startsWith(out, "Warning"))) {
+                    noteLog(Log)
+                    any <- TRUE
+                }
+            }
+            if(any) {
                 printLog0(Log, paste(c(out, ""), collapse = "\n"))
                 wrapLog("\nA namespace must be able to be loaded",
                         "with just the base namespace loaded:",
@@ -2305,7 +2602,7 @@ setRlibs <-
                             self2 = FALSE, quote = TRUE)
             if(nzchar(arch)) env <- c(env, "R_DEFAULT_PACKAGES=NULL")
             out <- R_runR(Rcmd, opts, env, arch = arch)
-            if (any(grepl("^Error", out))) {
+            if (any(startsWith(out, "Error"))) {
                 warningLog(Log)
                 printLog0(Log, paste(c(out, ""), collapse = "\n"))
                 wrapLog("\nIt looks like this package",
@@ -2313,6 +2610,27 @@ setRlibs <-
                         "see the messages for details.\n")
             } else resultLog(Log, "OK")
         }
+        if(!extra_arch && !is_base_pkg) {
+            check_S3reg <-
+                Sys.getenv("_R_CHECK_OVERWRITE_REGISTERED_S3_METHODS_", "NA")
+            check_S3reg <- if(check_S3reg == "NA") check_incoming else {
+                config_val_to_logical(check_S3reg)
+            }
+            if(check_S3reg) {
+                checkingLog(Log, "use of S3 registration")
+                Rcmd <- sprintf("suppressPackageStartupMessages(loadNamespace('%s', lib.loc = '%s'))",
+                                pkgname, libdir)
+                opts <- if(nzchar(arch)) R_opts4 else R_opts2
+                env <- paste0("_R_LOAD_CHECK_OVERWRITE_S3_METHODS_=", pkgname)
+                out <- R_runR(Rcmd, opts, env, arch = arch)
+                if (any(grepl("^Registered S3 method.*overwritten", out))) {
+                    out <- grep("^<environment: namespace:", out,
+                                invert = TRUE, value = TRUE)
+                    warningLog(Log)
+                    printLog0(Log, paste(c(out, ""), collapse = "\n"))
+                } else resultLog(Log, "OK")
+            }
+        }
     }
 
     run_examples <- function()
@@ -2409,25 +2727,64 @@ setRlibs <-
                         "cores simultaneously during their checks.")
             }
             any <- any || bad
-            if (!any) resultLog(Log, "OK")
+
+            if (!any && !(check_incoming && do_timings))
+                resultLog(Log, "OK")
 
             if (do_timings) {
+                theta <-
+                    as.numeric(Sys.getenv("_R_CHECK_EXAMPLE_TIMING_THRESHOLD_",
+                                          "5"))
                 tfile <- paste0(pkgname, "-Ex.timings")
-		times <- read.table(tfile, header = TRUE, row.names = 1L,
-				    colClasses = c("character", rep("numeric", 3)))
-                o <- order(times[[1]]+times[[2]], decreasing = TRUE)
+		times <-
+                    utils::read.table(tfile, header = TRUE, row.names = 1L,
+                                      colClasses = c("character", rep("numeric", 3)))
+                o <- order(times[[1L]] + times[[2L]], decreasing = TRUE)
                 times <- times[o, ]
-                keep <- (times[[1]] + times[[2]] > 5) | (times[[3]] > 5)
+
+                keep <- ((times[[1L]] + times[[2L]] > theta) |
+                         (times[[3L]] > theta))
                 if(any(keep)) {
-                    printLog(Log, "Examples with CPU or elapsed time > 5s\n")
-                    times <- capture.output(format(times[keep, ]))
-                    printLog0(Log, paste(times, collapse = "\n"), "\n")
+                    if(!any && check_incoming) {
+                        noteLog(Log)
+                        any <- TRUE
+                    }
+                    printLog(Log,
+                             sprintf("Examples with CPU or elapsed time > %gs\n",
+                                     theta))
+                    out <- utils::capture.output(format(times[keep, ]))
+                    printLog0(Log, paste(out, collapse = "\n"), "\n")
                 }
+
+                theta <-
+                    as.numeric(Sys.getenv("_R_CHECK_EXAMPLE_TIMING_USER_TO_ELAPSED_THRESHOLD_",
+                                          NA_character_))
+                if(!is.na(theta)) {
+                    keep <- (times[[1L]] >= pmax(theta * times[[3L]], 1))
+                    if(any(keep)) {
+                        if(!any && check_incoming) {
+                            noteLog(Log)
+                            any <- TRUE
+                        }
+                        printLog(Log,
+                                 sprintf("Examples with user time > %g times elapsed time\n",
+                                         theta))
+                        bad <- times[keep, ]
+                        bad <- cbind(bad,
+                                     ratio = round(bad[[1L]] / bad[[3L]], 3L))
+                        bad <- bad[order(bad$ratio, decreasing = TRUE), ]
+                        out <- utils::capture.output(format(bad))
+                        printLog0(Log, paste(out, collapse = "\n"), "\n")
+                    }
+                }
+
+                if(!any && check_incoming)
+                    resultLog(Log, "OK")
             }
 
             ## Try to compare results from running the examples to
             ## a saved previous version.
-            exsave <- file.path(pkgdir, "tests", "Examples",
+            exsave <- file.path(pkgdir, test_dir, "Examples",
                                 paste0(pkgname, "-Ex.Rout.save"))
             if (file.exists(exsave)) {
                 checkingLog(Log, "differences from ",
@@ -2448,11 +2805,14 @@ setRlibs <-
         if (!do_examples) resultLog(Log, "SKIPPED")
         else {
             pkgtopdir <- file.path(libdir, pkgname)
-            cmd <- sprintf('tools:::.createExdotR("%s", "%s", silent = TRUE, use_gct = %s, addTiming = %s)', pkgname, pkgtopdir, use_gct, do_timings)
+            cmd <- sprintf('tools:::.createExdotR("%s", "%s", silent = TRUE, use_gct = %s, addTiming = %s, commentDontrun = %s, commentDonttest = %s)',
+                           pkgname, pkgtopdir, use_gct, do_timings,
+                           !run_dontrun, !run_donttest)
             Rout <- tempfile("Rout")
             ## any arch will do here
             status <- R_runR(cmd, R_opts2, "LC_ALL=C",
                              stdout = Rout, stderr = Rout)
+            exfile <- paste0(pkgname, "-Ex.R")
             if (status) {
                 errorLog(Log,
                          paste("Running massageExamples to create",
@@ -2461,17 +2821,16 @@ setRlibs <-
                           paste(readLines(Rout, warn = FALSE),
                                 collapse = "\n"),
                           "\n")
-                do_exit(1L)
+		maybe_exit(1L)
             }
             ## It ran, but did it create any examples?
-            exfile <- paste0(pkgname, "-Ex.R")
             if (file.exists(exfile)) {
                 enc <- if (!is.na(e <- desc["Encoding"])) {
-                    paste("--encoding", e, sep="=")
+                    paste0("--encoding=", e)
                 } else ""
                 if (!this_multiarch) {
                     exout <- paste0(pkgname, "-Ex.Rout")
-                    if(!run_one_arch(exfile, exout)) do_exit(1L)
+                    if(!run_one_arch(exfile, exout)) maybe_exit(1L)
                 } else {
                     printLog(Log, "\n")
                     Log$stars <<-  "**"
@@ -2487,6 +2846,7 @@ setRlibs <-
                             if (!dir.exists(tdir)) {
                                 errorLog(Log,
                                          "unable to create examples directory")
+                                summaryLog(Log)
                                 do_exit(1L)
                             }
                             od <- setwd(tdir)
@@ -2498,7 +2858,14 @@ setRlibs <-
                         }
                     }
                     Log$stars <<-  "*"
-                    if (!res) do_exit(1L)
+                    if (!res) maybe_exit(1L)
+                }
+                cntFile <- paste0(exfile, "-cnt")
+                if (file.exists(cntFile)) {
+                    unlink(cntFile)
+                    if (as_cran)
+                        printLog(Log, "** found \\donttest examples:",
+                                 " check also with --run-donttest\n")
                 }
             } else {
                 resultLog(Log, "NONE")
@@ -2510,9 +2877,9 @@ setRlibs <-
     run_tests <- function()
     {
         if (!extra_arch && !is_base_pkg) {
-            checkingLog(Log, "for unstated dependencies in tests")
+            checkingLog(Log, "for unstated dependencies in ", sQuote(test_dir))
             Rcmd <- paste("options(warn=1, showErrorCalls=FALSE)\n",
-                          sprintf("tools:::.check_packages_used_in_tests(\"%s\")\n", pkgdir))
+                          sprintf("tools:::.check_packages_used_in_tests(\"%s\", \"%s\")\n", pkgdir, test_dir))
 
             out <- R_runR2(Rcmd, "R_DEFAULT_PACKAGES=NULL")
             if (length(out)) {
@@ -2522,70 +2889,103 @@ setRlibs <-
             } else resultLog(Log, "OK")
         }
 
-        checkingLog(Log, "tests")
+        if (test_dir == "tests")
+	    checkingLog(Log, "tests")
+	else
+	    checkingLog(Log, "tests in ", sQuote(test_dir))
+
         run_one_arch <- function(arch = "")
         {
-            testsrcdir <- file.path(pkgdir, "tests")
+            testsrcdir <- file.path(pkgdir, test_dir)
             testdir <- file.path(pkgoutdir, "tests")
             if(nzchar(arch)) testdir <- paste(testdir, arch, sep = "_")
             if(!dir.exists(testdir)) dir.create(testdir, mode = "0755")
             if(!dir.exists(testdir)) {
                 errorLog(Log,
                          sprintf("unable to create %s", sQuote(testdir)))
+                summaryLog(Log)
                 do_exit(1L)
             }
             file.copy(Sys.glob(paste0(testsrcdir, "/*")),
                       testdir, recursive = TRUE)
             setwd(testdir)
-            extra <- character()
-            if (use_gct) extra <- c(extra, "use_gct = TRUE")
-            if (use_valgrind) extra <- c(extra, "use_valgrind = TRUE")
-            tf <- gsub("\\", "/", tempfile(), fixed=TRUE)
-            extra <- c(extra, paste0('Log="', tf, '"'))
+	    logf <- gsub("\\", "/", tempfile(), fixed=TRUE)
+	    extra <- c(if(use_gct) "use_gct = TRUE",
+		       if(use_valgrind) "use_valgrind = TRUE",
+		       if(!stop_on_test_error) "stop_on_error = FALSE",
+		       paste0('Log="', logf, '"'))
             ## might be diff-ing results against tests/*.R.out.save
             ## so force LANGUAGE=en
             cmd <- paste0("tools:::.runPackageTestsR(",
-                         paste(extra, collapse = ", "), ")")
+                          paste(extra, collapse = ", "), ")")
             t1 <- proc.time()
             status <- R_runR(cmd,
                              if(nzchar(arch)) R_opts4 else R_opts2,
-                             env = c("LANGUAGE=en",
-                             "_R_CHECK_INTERNALS2_=1",
-                             if(nzchar(arch)) env0,
-                             jitstr, elibs),
+			     env = c("LANGUAGE=en",
+				     "_R_CHECK_INTERNALS2_=1",
+				     if(nzchar(arch)) env0,
+				     jitstr, elibs),
                              stdout = "", stderr = "", arch = arch)
             t2 <- proc.time()
             if (status) {
+                print_time(t1, t2, Log)
                 errorLog(Log)
+                if (Log$con > 0L && file.exists(logf)) {
+                    ## write individual results only to 00check.log
+                    cat(readLines(logf, warn = FALSE),
+                        sep = "\n", file = Log$con)
+                }
                 ## Don't just fail: try to log where the problem occurred.
-                ## First, find the test which failed.
+                ## First, find the test(s) which failed.
                 ## (Maybe there was an error without a failing test.)
-                bad_files <- dir(".", pattern="\\.Rout\\.fail")
+                bad_files <- dir(".", pattern="\\.Rout\\.fail$")
                 if (length(bad_files)) {
-                    ## Read in output from the (first) failed test
-                    ## and retain at most the last 13 lines
-                    ## (13? why not?).
-                    file <- bad_files[1L]
-                    lines <- readLines(file, warn = FALSE)
-                    file <- file.path("tests", sub("out\\.fail", "", file))
-                    ll <- length(lines)
-                    lines <- lines[max(1, ll-12):ll]
-                    if (R_check_suppress_RandR_message)
-                        lines <- grep('^Xlib: *extension "RANDR" missing on display',
-                                      lines, invert = TRUE, value = TRUE)
-                    printLog(Log, sprintf("Running the tests in %s failed.\n", sQuote(file)))
-                    printLog(Log, "Last 13 lines of output:\n")
-                    printLog0(Log, .format_lines_with_indent(lines), "\n")
+                    ## Read in output from the failed test(s)
+                    ## (As from R 3.4.0 there can be more than one
+                    ## with option --no-stop-on-test-error.)
+                    for(f in bad_files) {
+                        lines <- readLines(f, warn = FALSE)
+                        f <- file.path(test_dir, sub("out\\.fail$", "", f))
+                        src_files <- dir(".", pattern = "\\.[rR]$")
+                        if (!(basename(f) %in% src_files)) {
+                            f <- sub("R$", "r", f) # This assumes only one of foo.r and foo.R exists.
+                            if (!(basename(f) %in% src_files))
+                                f <- sub("r$", "[rR]", f) # Just in case the test script got deleted somehow, show the pattern.
+                        }
+                        keep <- as.integer(Sys.getenv("_R_CHECK_TESTS_NLINES_",
+                                                      "13"))
+                        ## keep = 0 means keep all of it, but we will
+                        ## always omit the R preamble and start at the first
+                        ## line with an R prompt.
+                        ll <- length(lines)
+                        st <- grep("^>", lines, useBytes = TRUE)
+                        if (length(st)) {
+                            lines <- lines[st[1L]:ll]
+                            ll <- length(lines)
+                        }
+                        if (keep > 0L)
+                            lines <- lines[max(1L, ll-keep-1L):ll]
+                        if (R_check_suppress_RandR_message)
+                            lines <- grep('^Xlib: *extension "RANDR" missing on display',
+                                          lines, invert = TRUE, value = TRUE,
+                                          useBytes = TRUE)
+                        printLog(Log, sprintf("Running the tests in %s failed.\n",
+                                              sQuote(f)))
+                        printLog(Log, if(keep > 0L && keep < ll)
+                                 sprintf("Last %i lines of output:\n", keep)
+                                 else "Complete output:\n")
+                        printLog0(Log, .format_lines_with_indent(lines), "\n")
+                    }
                 }
                 return(FALSE)
             } else {
                 print_time(t1, t2, Log)
                 resultLog(Log, "OK")
-                if (Log$con > 0L && file.exists(tf)) {
+                if (Log$con > 0L && file.exists(logf)) {
                     ## write results only to 00check.log
-                    lines <- readLines(tf, warn = FALSE)
+                    lines <- readLines(logf, warn = FALSE)
                     cat(lines, sep="\n", file = Log$con)
-                    unlink(tf)
+                    unlink(logf)
                 }
             }
             setwd(pkgoutdir)
@@ -2604,13 +3004,16 @@ setRlibs <-
                         res <- res & run_one_arch(arch)
                     }
             }
-            if (!res) do_exit(1L)
+            if (!res) maybe_exit(1L)
         } else resultLog(Log, "SKIPPED")
     }
 
     run_vignettes <- function(desc)
     {
+        libpaths <- .libPaths()
+        .libPaths(c(libdir, libpaths))
         vigns <- pkgVignettes(dir = pkgdir)
+        .libPaths(libpaths)
         if (is.null(vigns) || !length(vigns$docs)) return()
 
         if(do_install && !spec_install && !is_base_pkg && !extra_arch) {
@@ -2654,7 +3057,8 @@ setRlibs <-
                                         sQuote(basename(bad_vignettes))),
                                   "", ""), collapse = "\n"))
             }
-            encs <- vapply(vigns$docs, getVignetteEncoding, "")
+	    defaultEncoding <- .get_package_metadata(pkgdir)["Encoding"]
+            encs <- vapply(vigns$docs, getVignetteEncoding, "", default = defaultEncoding)
             bad_vignettes <- vigns$docs[encs == "non-ASCII"]
             if(nb <- length(bad_vignettes)) {
                 if(!any) warningLog(Log)
@@ -2712,7 +3116,7 @@ setRlibs <-
                 printLog(Log,
                          "  Found 'R CMD' in Makefile: should be '\"$(R_HOME)/bin/R\" CMD'\n")
             }
-            contents <- readChar(f, file.info(f)$size, useBytes = TRUE)
+            contents <- readChar(f, file.size(f), useBytes = TRUE)
             if(any(grepl("\r", contents, fixed = TRUE, useBytes = TRUE))) {
                 if(!any) warningLog(Log)
                 any <- TRUE
@@ -2730,8 +3134,9 @@ setRlibs <-
         ## If the vignettes declare an encoding, are they actually in it?
         ## (We don't check the .tex, though)
         bad_vignettes <- character()
-        for (v in vigns$docs) {
-            enc <- getVignetteEncoding(v, TRUE)
+        for (i in seq_along(vigns$docs)) {
+	    v <- vigns$docs[i]
+            enc <- vigns$encodings[i]
             if (enc %in% c("", "non-ASCII", "unknown")) next
             lines <- readLines(v, warn = FALSE) # some miss final NA
             lines2 <- iconv(lines, enc, "UTF-16LE", toRaw = TRUE)
@@ -2759,106 +3164,149 @@ setRlibs <-
             ## packages, or just base?
             ## FIXME: should we do this for multiple sub-archs?
 
-            checkingLog(Log, "running R code from vignettes")
+            ## Re-building the vignette outputs also runs the code, so
+            ## doing so as well creates no additional value unless the
+            ## results are compared against saved results (which could
+            ## perhaps also be integrated into buildVignettes().
+            ## Hence, when re-building, skip running the code when there
+            ## are no saved results.
+            ## Could make this controllable via some env var ...
+
+            build_vignettes <-
+                parse_description_field(desc, "BuildVignettes", TRUE)
+            if (!build_vignettes && as_cran) {
+                ## FOSS packages must be able to rebuild their vignettes
+                info <- analyze_license(desc["License"])
+                build_vignettes <- info$is_verified
+            }
+            do_build_vignettes <- do_build_vignettes && build_vignettes
+            skip_run_maybe <-
+                R_check_vignettes_skip_run_maybe && do_build_vignettes
+
             vigns <- pkgVignettes(dir = pkgdir)
-            problems <- list()
-            res <- character()
-            cat("\n")
-            def_enc <- desc["Encoding"]
-            if( (is.na(def_enc))) def_enc <- ""
-            t1 <- proc.time()
-            for (i in seq_along(vigns$docs)) {
-                file <- vigns$docs[i]
-                name <- vigns$names[i]
-                enc <- getVignetteEncoding(file, TRUE)
-                if(enc %in% c("non-ASCII", "unknown")) enc <- def_enc
-                cat("  ", sQuote(basename(file)),
-                    if(nzchar(enc)) paste("using", sQuote(enc)),
-                    "...")
-                Rcmd <- paste0("options(warn=1)\ntools:::.run_one_vignette('",
-                               basename(file), "', '", vigns$dir, "'",
-                               if (nzchar(enc))
-                                   paste0(", encoding = '", enc, "'"),
-                               ", pkgdir='", vigns$pkgdir, "')")
-                outfile <- paste0(basename(file), ".log")
-                t1b <- proc.time()
-                status <- R_runR(Rcmd,
-                                 if (use_valgrind) paste(R_opts2, "-d valgrind") else R_opts2,
-                                 ## add timing as footer, as BATCH does
-                                 env = c(jitstr, "R_BATCH=1234", elibs,
-                                 "_R_CHECK_INTERNALS2_=1"),
-                                 stdout = outfile, stderr = outfile)
-                t2b <- proc.time()
-                out <- readLines(outfile, warn = FALSE)
-                savefile <- file.path(dirname(file), paste0(name, ".Rout.save"))
-                if(length(grep("^  When (running|tangling|sourcing)", out,
-                               useBytes = TRUE))) {
-                    cat(" failed\n")
-                    res <- c(res,
-                             paste("when running code in", sQuote(basename(file))),
-                             "  ...",
-                             utils::tail(out, as.numeric(Sys.getenv("_R_CHECK_VIGNETTES_NLINES_", 10))))
-                } else if(status || ! " *** Run successfully completed ***" %in% out) {
-                    ## (Need not be the final line if running under valgrind)
-                    cat(" failed to complete the test\n")
-                    out <- c(out, "", "... incomplete output.  Crash?")
-                    res <- c(res,
-                             paste("when running code in", sQuote(basename(file))),
-                             "  ...",
-                             utils::tail(out, as.numeric(Sys.getenv("_R_CHECK_VIGNETTES_NLINES_", 10))))
-                } else if (file.exists(savefile)) {
-                    cmd <- paste0("invisible(tools::Rdiff('",
-                                 outfile, "', '", savefile, "',TRUE,TRUE))")
-                    out2 <- R_runR(cmd, R_opts2)
-                    if(length(out2)) {
-                        print_time(t1b, t2b, NULL)
-                        cat("\ndifferences from ", sQuote(basename(savefile)),
-                            "\n", sep = "")
-                        writeLines(c(out2, ""))
+            savefiles <-
+                file.path(dirname(vigns$docs),
+                          paste0(vigns$names, ".Rout.save"))
+            ran <- FALSE
+
+            if(!skip_run_maybe || any(file.exists(savefiles))) {
+                checkingLog(Log, "running R code from vignettes")
+                res <- character()
+                cat("\n")
+                def_enc <- desc["Encoding"]
+                if( (is.na(def_enc))) def_enc <- ""
+                t1 <- proc.time()
+                iseq <- seq_along(savefiles)
+                if(skip_run_maybe)
+                    iseq <- iseq[file.exists(savefiles)]
+                for (i in iseq) {
+                    file <- vigns$docs[i]
+                    name <- vigns$names[i]
+                    enc <- vigns$encodings[i]
+                    cat("  ", sQuote(basename(file)),
+                        if(nzchar(enc)) paste("using", sQuote(enc)),
+                        "...")
+                    Rcmd <- paste0("options(warn=1)\ntools:::.run_one_vignette('",
+                                   basename(file), "', '", vigns$dir, "'",
+                                   if (nzchar(enc))
+                                       paste0(", encoding = '", enc, "'"),
+                                   ", pkgdir='", vigns$pkgdir, "')")
+                    outfile <- paste0(basename(file), ".log")
+                    t1b <- proc.time()
+                    status <- R_runR(Rcmd,
+                                     if (use_valgrind) paste(R_opts2, "-d valgrind") else R_opts2,
+                                     ## add timing as footer, as BATCH does
+                                     env = c(jitstr, "R_BATCH=1234", elibs,
+                                     "_R_CHECK_INTERNALS2_=1"),
+                                     stdout = outfile, stderr = outfile)
+                    t2b <- proc.time()
+                    out <- readLines(outfile, warn = FALSE)
+                    pos <- which(out == " *** Run successfully completed ***")
+                    if(!length(pos) || any(nzchar(out[seq_len(pos[1L] - 1L)])))
+                        ran <- TRUE
+                    savefile <- savefiles[i]
+                    if(length(grep("^  When (running|tangling|sourcing)", out,
+                                   useBytes = TRUE))) {
+                        cat(" failed\n")
+                        keep <- as.numeric(Sys.getenv("_R_CHECK_VIGNETTES_NLINES_",
+                                                      "10"))
+                        res <- if (keep > 0)
+                            c(res,
+                              paste("when running code in", sQuote(basename(file))),
+                              "  ...",
+                              utils::tail(out, keep))
+                        else
+                            c(res,
+                              paste("when running code in", sQuote(basename(file))),
+                              out)
+
+                    } else if(status || ! " *** Run successfully completed ***" %in% out) {
+                        ## (Need not be the final line if running under valgrind)
+                        keep <- as.numeric(Sys.getenv("_R_CHECK_VIGNETTES_NLINES_",
+                                                      "10"))
+                        cat(" failed to complete the test\n")
+                        out <- c(out, "", "... incomplete output.  Crash?")
+                        res <- if (keep > 0)
+                            c(res,
+                                 paste("when running code in", sQuote(basename(file))),
+                                 "  ...",
+                                 utils::tail(out, keep))
+                        else
+                            c(res,
+                                 paste("when running code in", sQuote(basename(file))),
+                                 out)
+                    } else if (file.exists(savefile)) {
+                        cmd <- paste0("invisible(tools::Rdiff('",
+                                      outfile, "', '", savefile, "',TRUE,TRUE))")
+                        out2 <- R_runR(cmd, R_opts2)
+                        if(length(out2)) {
+                            print_time(t1b, t2b, NULL)
+                            cat("\ndifferences from ", sQuote(basename(savefile)),
+                                "\n", sep = "")
+                            writeLines(c(out2, ""))
+                        } else {
+                            print_time(t1b, t2b, NULL)
+                            cat(" OK\n")
+                            if (!config_val_to_logical(Sys.getenv("_R_CHECK_ALWAYS_LOG_VIGNETTE_OUTPUT_", use_valgrind)))
+                                unlink(outfile)
+                        }
                     } else {
                         print_time(t1b, t2b, NULL)
                         cat(" OK\n")
                         if (!config_val_to_logical(Sys.getenv("_R_CHECK_ALWAYS_LOG_VIGNETTE_OUTPUT_", use_valgrind)))
                             unlink(outfile)
                     }
-                } else {
-                    print_time(t1b, t2b, NULL)
-                    cat(" OK\n")
-                    if (!config_val_to_logical(Sys.getenv("_R_CHECK_ALWAYS_LOG_VIGNETTE_OUTPUT_", use_valgrind)))
-                        unlink(outfile)
                 }
-            }
-            t2 <- proc.time()
-            print_time(t1, t2, Log)
-            if (R_check_suppress_RandR_message)
-                res <- grep('^Xlib: *extension "RANDR" missing on display', res,
-                            invert = TRUE, value = TRUE, useBytes = TRUE)
-            if(length(res)) {
-                if(length(grep("there is no package called", res,
-                               useBytes = TRUE))) {
-                    warningLog(Log, "Errors in running code in vignettes:")
-                    printLog0(Log, paste(c(res, "", ""), collapse = "\n"))
+                t2 <- proc.time()
+                if(!ran) {
+                    resultLog(Log, "NONE")
                 } else {
-                    errorLog(Log, "Errors in running code in vignettes:")
-                    printLog0(Log, paste(c(res, "", ""), collapse = "\n"))
-                    do_exit(1L)
+                    print_time(t1, t2, Log)
+                    if(R_check_suppress_RandR_message)
+                        res <- grep('^Xlib: *extension "RANDR" missing on display', res,
+                                    invert = TRUE, value = TRUE, useBytes = TRUE)
+                    if(length(res)) {
+                        if(length(grep("there is no package called", res,
+                                       useBytes = TRUE))) {
+                            warningLog(Log, "Errors in running code in vignettes:")
+                            printLog0(Log, paste(c(res, "", ""), collapse = "\n"))
+                        } else {
+                            errorLog(Log, "Errors in running code in vignettes:")
+                            printLog0(Log, paste(c(res, "", ""), collapse = "\n"))
+                            maybe_exit(1L)
+                        }
+                    } else resultLog(Log, "OK")
                 }
-            } else resultLog(Log, "OK")
-
-            build_vignettes <-
-                parse_description_field(desc, "BuildVignettes", TRUE)
-            if (!build_vignettes && as_cran) {
-                ## FOSS packages must be able to rebuild their vignettes
-                info <- analyze_license(desc["License"])
-                build_vignettes <- info$is_verified
             }
-            if (do_build_vignettes && build_vignettes) {
+
+            if (do_build_vignettes) {
                 checkingLog(Log, "re-building of vignette outputs")
                 ## copy the whole pkg directory to check directory
                 ## so we can work in place, and allow ../../foo references.
                 dir.create(vd2 <- "vign_test")
                 if (!dir.exists(vd2)) {
                     errorLog(Log, "unable to create 'vign_test'")
+                    summaryLog(Log)
                     do_exit(1L)
                 }
                 file.copy(pkgdir, vd2, recursive = TRUE)
@@ -2868,7 +3316,7 @@ setRlibs <-
                 Sys.setenv(PATH = paste(R.home("bin"), oPATH,
                                         sep = .Platform$path.sep))
                 on.exit(Sys.setenv(PATH = oPATH))
-                ## And too many inst/doc/Makefile are not safe for
+                ## And too many 'vignettes/Makefile's are not safe for
                 ## parallel makes
                 Sys.setenv(MAKEFLAGS="")
                 ## we could use clean = FALSE, but that would not be
@@ -2878,7 +3326,7 @@ setRlibs <-
                                file.path(pkgoutdir, "vign_test", pkgname0),
                                "')")
                 t1 <- proc.time()
-                outfile <- tempfile()
+                outfile <- file.path(pkgoutdir, "build_vignettes.log")
                 status <- R_runR(Rcmd, R_opts2, jitstr,
                                  stdout = outfile, stderr = outfile)
                 t2 <- proc.time()
@@ -2889,14 +3337,17 @@ setRlibs <-
                                 useBytes = TRUE)
                 warns <- grep("^Warning: file .* is not portable",
                               out, value = TRUE, useBytes = TRUE)
+                print_time(t1, t2, Log)
                 if (status) {
-                    noteLog(Log)
-                    out <- utils::tail(out, 25)
+                    keep <- as.numeric(Sys.getenv("_R_CHECK_VIGNETTES_NLINES_",
+                                                  "25"))
+                    if(skip_run_maybe || !ran) warningLog(Log) else noteLog(Log)
+                    if(keep > 0) out <- utils::tail(out, keep)
                     printLog0(Log,
                               paste(c("Error in re-building vignettes:",
                                       "  ...", out, "", ""), collapse = "\n"))
                 } else if(nw <- length(warns)) {
-                    noteLog(Log)
+                    if(skip_run_maybe || !ran) warningLog(Log) else noteLog(Log)
                     msg <- ngettext(nw,
                                     "Warning in re-building vignettes:\n",
                                     "Warnings in re-building vignettes:\n",
@@ -2907,7 +3358,8 @@ setRlibs <-
                     ## clean up
                     if (config_val_to_logical(Sys.getenv("_R_CHECK_CLEAN_VIGN_TEST_", "true")))
                         unlink(vd2, recursive = TRUE)
-                    print_time(t1, t2, Log)
+                    if (!config_val_to_logical(Sys.getenv("_R_CHECK_ALWAYS_LOG_VIGNETTE_OUTPUT_", "false")))
+                            unlink(outfile)
                     resultLog(Log, "OK")
                 }
             } else {
@@ -2950,7 +3402,7 @@ setRlibs <-
                               invert = TRUE, value = TRUE)
                 printLog0(Log, paste(c(lines, ""), collapse = "\n"))
                 unlink(build_dir, recursive = TRUE)
-                do_exit(1L)
+		maybe_exit(1L)
             } else if (res > 0) {
                 latex_file <- file.path(build_dir, "Rd2.tex")
                 if (file.exists(latex_file))
@@ -3000,7 +3452,7 @@ setRlibs <-
                         run_Rcmd(args)
                     }
                     unlink(build_dir, recursive = TRUE)
-                    do_exit(1L)
+		    maybe_exit(1L)
                 } else {
                     unlink(build_dir, recursive = TRUE)
                     resultLog(Log, "OK")
@@ -3021,7 +3473,7 @@ setRlibs <-
         ## this is tailored to the FreeBSD/Linux 'file',
         ## see http://www.darwinsys.com/file/
         ## (Solaris has a different 'file' without --version)
-        ## Most systems are now on >= 5.03, but Mac OS 10.5 was 4.17
+        ## Most systems are now on >= 5.03, but macOS 10.5 had 4.17
         ## version 4.21 writes to stdout,
         ## 4.23 to stderr and sets an error status code
         FILE <- "file"
@@ -3073,7 +3525,7 @@ setRlibs <-
         }
         if (R_check_executables_exclusions && file.exists("BinaryFiles")) {
             excludes <- readLines("BinaryFiles")
-            execs <- execs[!execs %in% excludes]
+            execs <- execs %w/o% excludes
         }
         if (nb <- length(execs)) {
             msg <- ngettext(nb,
@@ -3109,12 +3561,12 @@ setRlibs <-
         dots <- sub("^./","", dots)
         allowed <-
             c(".Rbuildignore", ".Rinstignore", "vignettes/.install_extras")
-        dots <- dots[!dots %in% allowed]
+        dots <- dots %w/o% allowed
         alldirs <- list.dirs(".", full.names = TRUE, recursive = TRUE)
         alldirs <- sub("^./","", alldirs)
         alldirs <- alldirs[alldirs != "."]
         bases <- basename(alldirs)
-        dots <- c(dots, alldirs[grepl("^[.]", bases)])
+        dots <- c(dots, setdiff(alldirs[startsWith(bases, ".")], ".aspell"))
         if (length(dots)) {
             noteLog(Log, "Found the following hidden files and directories:")
             printLog0(Log, .format_lines_with_indent(dots), "\n")
@@ -3124,9 +3576,11 @@ setRlibs <-
             if(cran) {
                 known <- basename(dots) %in% .hidden_file_exclusions
                 known <- known | grepl("^.Rbuildindex[.]", dots) |
-                  grepl("inst/doc/[.](Rinstignore|build[.]timestamp)$", dots) |
-                  grepl("vignettes/[.]Rinstignore$", dots) |
-                  grepl("^src.*/[.]deps$", dots)
+                    ## or?      startsWith(dots,".Rbuildindex.") |
+                    endsWith(dots, "inst/doc/.Rinstignore") |
+                    endsWith(dots, "inst/doc/.build.timestamp") |
+                    endsWith(dots, "vignettes/.Rinstignore") |
+                    grepl("^src.*/[.]deps$", dots)
 		if (all(known))
                     printLog(Log, "\nCRAN-pack knows about all of these\n")
                 else if (any(!known)) {
@@ -3156,7 +3610,7 @@ setRlibs <-
             messageLog(Log, "skipping installation test")
         else {
             use_install_log <-
-                (grepl("^check", install) || R_check_use_install_log
+                (startsWith(install, "check") || R_check_use_install_log
                  || !isatty(stdout()))
             INSTALL_opts <- install_args
             ## don't use HTML, checkRd goes over the same ground.
@@ -3167,7 +3621,7 @@ setRlibs <-
                 INSTALL_opts <- c(INSTALL_opts,  "--no-multiarch")
             INSTALL_opts <- paste(INSTALL_opts, collapse = " ")
             args <- c("INSTALL", "-l", shQuote(libdir), INSTALL_opts,
-                      shQuote(if (WINDOWS) shortPathName(pkgdir) else pkgdir))
+                      shQuote(if (WINDOWS) utils::shortPathName(pkgdir) else pkgdir))
             if (!use_install_log) {
                 ## Case A: No redirection of stdout/stderr from installation.
                 ## This is very rare: needs _R_CHECK_USE_INSTALL_LOG_ set
@@ -3176,6 +3630,7 @@ setRlibs <-
                 ## Rare use of R CMD INSTALL
                 if (run_Rcmd(args)) {
                     errorLog(Log, "Installation failed.")
+                    summaryLog(Log)
                     do_exit(1L)
                 }
                 message("")
@@ -3183,11 +3638,10 @@ setRlibs <-
                 ## Case B. All output from installation redirected,
                 ## or already available in the log file.
                 checkingLog(Log,
-                            "whether package ",
-                            sQuote(desc["Package"]),
+			    "whether package ", sQuote(desc["Package"]),
                             " can be installed")
                 outfile <- file.path(pkgoutdir, "00install.out")
-                if (grepl("^check", install)) {
+                if (startsWith(install, "check")) {
                     if (!nzchar(arg_libdir))
                         printLog(Log, "\nWarning: --install=check... specified without --library\n")
                     thislog <- substr(install, 7L, 1000L)
@@ -3195,6 +3649,7 @@ setRlibs <-
                     if (!file.exists(thislog)) {
                         errorLog(Log,
                                  sprintf("install log %s does not exist", sQuote(thislog)))
+                        summaryLog(Log)
                         do_exit(2L)
                     }
                     file.copy(thislog, outfile)
@@ -3212,7 +3667,7 @@ setRlibs <-
                     ## record in the log what options were used
                     cat("* install options ", sQuote(INSTALL_opts),
                         "\n\n", sep = "", file = outfile)
-                    env <- ""
+##                    env <- ""
                     ## Normal use of R CMD INSTALL
                     t1 <- proc.time()
                     install_error <- run_Rcmd(args, outfile)
@@ -3224,6 +3679,7 @@ setRlibs <-
                     errorLog(Log, "Installation failed.")
                     printLog0(Log, "See ", sQuote(outfile),
                              " for details.\n")
+                    summaryLog(Log)
                     do_exit(1L)
                 }
 
@@ -3240,6 +3696,9 @@ setRlibs <-
 
                 lines0 <- lines
                 warn_re <- c("^WARNING:",
+                             ## This fires on ODS 12.5 warnings like
+                             ##   Warning: original hides icu_55::PtnSkeleton::original.
+                             ## so filter out later.
                              "^Warning:",
                              ## <FIXME>
                              ## New style Rd conversion
@@ -3251,12 +3710,21 @@ setRlibs <-
                              ": warning: .* is used uninitialized",
                              ": warning: .* set but not used",
                              ": warning: unused",
+                             ": warning: .* makes pointer from integer", # gcc
+                             ": warning: .* pointer.* conversion", # clang
+                             ": warning: improper pointer", # Solaris
+                             ": warning: unknown escape sequence", # gcc
+                             ": warning: use of non-standard escape character", # clang
                              ## clang warning about invalid returns.
                              "warning: void function",
                              "warning: control reaches end of non-void function",
-                             "warning: control may reach end of non-void function",
                              "warning: no return statement in function returning non-void",
-                             ": #warning",
+                             ## gcc-only form
+                             ## ": #warning",
+                             ## gcc indents these, igraph has space after #
+                             "^ *# *warning",
+                             ## Solaris cc has
+                             "Warning: # *warning",
                              # these are from era of static HTML
                              "missing links?:")
                 ## Warnings spotted by gcc with
@@ -3301,7 +3769,9 @@ setRlibs <-
                              ": warning: .* \\[-Wvla-extension\\]",
                              ": warning: format string contains '[\\]0'",
                              ": warning: .* \\[-Wc[+][+]11-long-long\\]",
-                             ": warning: empty macro arguments are a C99 feature"
+                             ": warning: empty macro arguments are a C99 feature",
+                             ## for non-portable flags (seen in sub-Makefiles)
+                             "warning: .* \\[-Wunknown-warning-option\\]"
                              )
 
                 warn_re <- paste0("(", paste(warn_re, collapse = "|"), ")")
@@ -3313,6 +3783,15 @@ setRlibs <-
                 lines <- grep(ex_re, lines, invert = TRUE, value = TRUE,
                               useBytes = TRUE)
 
+                ## and GNU extensions in system headers
+                ex_re <- "^ *(/usr/|/opt/).*GNU extension"
+                lines <- grep(ex_re, lines, invert = TRUE, value = TRUE,
+                              useBytes = TRUE)
+
+                ## and ODS 12.5 warnings
+                ex_re <- "^Warning: [[:alnum:]]+ hides"
+                lines <- grep(ex_re, lines, invert = TRUE, value = TRUE,
+                              useBytes = TRUE)
 
                 ## Ignore install-time readLines() warnings about
                 ## files with incomplete final lines.  Most of these
@@ -3379,6 +3858,8 @@ setRlibs <-
                 ## suppress filtering out by setting the internal
                 ## environment variable _R_CHECK_WALL_FORTRAN_ to
                 ## something "true".
+                ## All gfortran -Wall warnings start Warning: so have been
+                ## included.  We exclude some now.
                 check_src_flag <- Sys.getenv("_R_CHECK_WALL_FORTRAN_", "FALSE")
                 if (!config_val_to_logical(check_src_flag)) {
                     warn_re <-
@@ -3387,7 +3868,23 @@ setRlibs <-
                           "ASSIGN statement at \\(1\\)",
                           "Assigned GOTO statement at \\(1\\)",
                           "arithmetic IF statement at \\(1\\)",
-                          "Nonconforming tab character (in|at)")
+                          "Nonconforming tab character (in|at)",
+                          "Obsolescent feature:")
+                    warn_re <- c(warn_re,
+                                 "Warning: .*\\[-Wconversion]",
+                                 ## We retain [-Wuninitialized]
+                                 "Warning: .*\\[-Wmaybe-uninitialized]",
+                                 "Warning: .*\\[-Wintrinsic-shadow]",
+                                 ## R itself uses these, the latter in LAPACK
+                                 "Warning: GNU Extension: DOUBLE COMPLEX",
+                                 "Warning: GNU Extension: .*COMPLEX[*]16"
+                                )
+                    check_src_flag <-
+                        Sys.getenv("_R_CHECK_SRC_MINUS_W_UNUSED_", "FALSE")
+                    if (!config_val_to_logical(check_src_flag))
+                        warn_re <- c(warn_re,
+                                     "Warning: .*\\[-Wunused-function]",
+                                     "Warning: .*\\[-Wunused-dummy-argument]")
                     warn_re <- paste0("(", paste(warn_re, collapse = "|"), ")")
                     lines <- grep(warn_re, lines, invert = TRUE, value = TRUE)
                 }
@@ -3425,6 +3922,14 @@ setRlibs <-
 
                 lines <- unique(lines)
 
+                ## Can get reports like
+                ## Warning: No generic function ‘as.vector’ found corresponding to requested imported methods from package ‘Matrix’ when loading ‘MatrixModels’ (malformed exports?)
+                ## Exclude these unless they are about the current package.
+                load_re <- "Warning: No generic function.*corresponding to requested imported methods"
+                ex <- grepl(load_re, lines, useBytes = TRUE) &
+                    !grepl(pkgname, lines, fixed = TRUE, useBytes = TRUE)
+                lines <- lines[!ex]
+
                 note_re <-
                     "warning: control may reach end of non-void function"
 
@@ -3458,8 +3963,8 @@ setRlibs <-
     ## It also depends on the total being last.
     check_install_sizes <- function()
     {
-        ## if we used a log, the installation need not still exist.
         pd <- file.path(libdir, pkgname)
+        ## if we used a log, the installation would not need to remain.
         if (!dir.exists(pd)) return()
         checkingLog(Log, "installed package size")
         owd <- setwd(pd)
@@ -3468,12 +3973,13 @@ setRlibs <-
         dirs <- sub("^\\d*\\s*", "", res)
         res2 <- data.frame(size = sizes, dir = I(dirs))
         total <- res2[nrow(res2), 1L]
-        if(!is.na(total) && total > 1024*5) { # report at 5Mb
+        if(!is.na(total) && total > 1024*5 && # report at 5Mb
+           pkgname != "Matrix") { # <- large recommended package
             noteLog(Log)
             printLog(Log, sprintf("  installed size is %4.1fMb\n", total/1024))
             rest <- res2[-nrow(res2), ]
             rest[, 2L] <- sub("./", "", rest[, 2L])
-            # keep only top-level directories
+            ## keep only top-level directories
             rest <- rest[!grepl("/", rest[, 2L]), ]
             rest <- rest[rest[, 1L] > 1024, ] # > 1Mb
             if(nrow(rest)) {
@@ -3481,12 +3987,8 @@ setRlibs <-
                 printLog(Log, "  sub-directories of 1Mb or more:\n")
                 size <- sprintf('%4.1fMb', rest[, 1L]/1024)
                 printLog0(Log,
-                          paste("    ",
-                                format(rest[o, 2L], justify = "left"),
-                                "  ",
-                                format(size[o], justify = "right"),
-                                "\n",
-                                sep=""))
+			  paste0("    ", format(rest[o, 2L], justify = "left"),
+				 "  ", format(size[o], justify = "right"), "\n"))
             }
         } else resultLog(Log, "OK")
         setwd(owd)
@@ -3500,7 +4002,8 @@ setRlibs <-
             f <- file.path(pkgdir, "DESCRIPTION")
             desc <- try(.read_description(f))
             if (inherits(desc, "try-error") || !length(desc)) {
-                resultLog(Log, "EXISTS but not correct format")
+                errorLog(Log, "File DESCRIPTION exists but is not in correct format")
+                summaryLog(Log)
                 do_exit(1L)
             }
             mandatory <- c("Package", "Version", "License", "Description",
@@ -3513,6 +4016,7 @@ setRlibs <-
                                 "Required fields missing or empty:")
                 msg <- paste0(msg, "\n", .pretty_format(fail))
                 errorLog(Log, msg)
+                summaryLog(Log)
                 do_exit(1L)
             }
             if(!grepl("^[[:alpha:]][[:alnum:].]*[[:alnum:]]$", desc["Package"])
@@ -3525,10 +4029,13 @@ setRlibs <-
             encoding <- desc["Encoding"]
         } else if (file.exists(f <- file.path(pkgdir, "DESCRIPTION"))) {
             errorLog(Log,
-                     "File DESCRIPTION does not exist but there is a case-insenstiive match.")
+                     "File DESCRIPTION does not exist but there is a case-insensitive match.")
+            summaryLog(Log)
             do_exit(1L)
         } else {
-            resultLog(Log, "NO")
+            errorLog(Log,
+                     "File DESCRIPTION does not exist")
+            summaryLog(Log)
             do_exit(1L)
         }
         if (!is.na(desc["Type"])) { # standard packages do not have this
@@ -3537,6 +4044,7 @@ setRlibs <-
             if (desc["Type"] != "Package") {
                 printLog(Log,
                          "Only 'Type = Package' extensions can be checked.\n")
+                summaryLog(Log)
                 do_exit(0L)
             }
         }
@@ -3544,6 +4052,7 @@ setRlibs <-
             messageLog(Log, "looks like ", sQuote(pkgname0),
                        " is a package bundle -- they are defunct")
             errorLog(Log, "")
+            summaryLog(Log)
             do_exit(1L)
         }
 
@@ -3558,24 +4067,37 @@ setRlibs <-
         desc
     }
 
-    check_CRAN_incoming <- function()
+    check_CRAN_incoming <- function(localOnly)
     {
         checkingLog(Log, "CRAN incoming feasibility")
-        res <- .check_package_CRAN_incoming(pkgdir)
+        res <- .check_package_CRAN_incoming(pkgdir, localOnly)
+        bad <- FALSE
         if(length(res)) {
             out <- format(res)
-            if(length(res$bad_package)) {
+            if(length(out) == 1L && startsWith(out, "Maintainer: ")) {
+                ## Special-case when there is only the maintainer
+                ## address to note (if at all).
+                maintainer <- res$Maintainer
+                if(nzchar(maintainer) &&
+                   identical(maintainer,
+                             Sys.getenv("_R_CHECK_MAINTAINER_ADDRESS_"))) {
+                    resultLog(Log, "OK")
+                    out <- character()
+                }
+                else resultLog(Log, "Note_to_CRAN_maintainers")
+            } else if(length(res$bad_package)) {
                 errorLog(Log)
-                printLog0(Log, paste(c(out, ""), collapse = "\n"))
-                do_exit(1L)
+                bad <- TRUE
             } else if(length(res$bad_version) ||
-                      identical(res$foss_with_BuildVigettes, TRUE) ||
+                      identical(res$foss_with_BuildVignettes, TRUE) ||
+                      res$Maintainer_invalid_or_multi_person ||
                       res$empty_Maintainer_name ||
                       res$Maintainer_needs_quotes)
                 warningLog(Log)
             else if(length(res) > 1L) noteLog(Log)
             else resultLog(Log, "OK")
-            printLog0(Log, paste(out, "\n", sep = ""))
+            printLog0(Log, c(paste(out, collapse = "\n\n"), "\n"))
+            if(bad) maybe_exit(1L)
         } else resultLog(Log, "OK")
     }
 
@@ -3615,14 +4137,15 @@ setRlibs <-
                                    "\n", as.character(e), "\n")
                          msg_NAMESPACE <-
                              c("See section 'Package namespaces'",
-                               " of the 'Writing R Extensions' manual.\n")
+                               " in the 'Writing R Extensions' manual.\n")
                          wrapLog(msg_NAMESPACE)
+                         summaryLog(Log)
                          do_exit(1L)
                      })
             OK <- TRUE
             ## Look for empty importFrom
             imp <- ns$imports
-            lens <- sapply(imp, length)
+            lens <- lengths(imp)
             imp <- imp[lens == 2L]
             nm <- sapply(imp, "[[", 1)
             lens <- sapply(imp, function(x) length(x[[2]]))
@@ -3677,8 +4200,8 @@ setRlibs <-
         ## not required in the package DESCRIPTION file.
         ## Namespace imports must really be in Depends.
         res <- .check_package_depends(pkgdir, R_check_force_suggests,
-                                      check_incoming)
-        if(any(sapply(res, length) > 0L)) {
+                                      check_incoming, ignore_vignettes)
+        if(any(lengths(res) > 0L)) {
             out <- format(res)
             allowed <- c("suggests_but_not_installed",
                          "enhances_but_not_installed",
@@ -3697,6 +4220,7 @@ setRlibs <-
                            "_R_CHECK_FORCE_SUGGESTS_",
                            "to a false value.\n\n")
                 wrapLog(msg_DESCRIPTION)
+                summaryLog(Log)
                 do_exit(1L)
             } else {
                 noteLog(Log)
@@ -3715,8 +4239,9 @@ setRlibs <-
         if (!is.na(desc["Built"])) {
             errorLog(Log)
             printLog(Log, "Only *source* packages can be checked.\n")
+            summaryLog(Log)
             do_exit(1L)
-        } else if (!grepl("^check", install)) {
+        } else if (!startsWith(install, "check")) {
             ini <- character()
             ## Check for package 'src' subdirectories with object
             ## files (but not if installation was already performed).
@@ -3763,8 +4288,7 @@ setRlibs <-
                     !(file.exists("Makefile.in") && spec_install)) {
                     ## Recognized extensions for sources or headers.
                     srcfiles <- dir(".", all.files = TRUE)
-                    fi <- file.info(srcfiles)
-                    srcfiles <- srcfiles[!fi$isdir]
+                    srcfiles <- srcfiles[!dir.exists(srcfiles)]
                     srcfiles <- grep("(\\.([cfmCM]|cc|cpp|f90|f95|mm|h|o|so)$|^Makevars|-win\\.def|^install\\.libs\\.R$)",
                                      srcfiles, invert = TRUE, value = TRUE)
                     if (length(srcfiles)) {
@@ -3823,13 +4347,19 @@ setRlibs <-
         } else resultLog(Log, "OK")
     }
 
-    dir.exists <- function(x) !is.na(isdir <- file.info(x)$isdir) & isdir
-
-    do_exit <- function(status = 1L) q("no", status = status, runLast = FALSE)
-
-    env_path <- function(...) {
-        paths <- c(...)
-        paste(paths[nzchar(paths)], collapse = .Platform$path.sep)
+    do_exit <-
+	if(no.q)
+	    function(status = 1L) (if(status) stop else message)(
+		".check_packages() exit status ", status)
+	else
+	    function(status = 1L) q("no", status = status, runLast = FALSE)
+
+    maybe_exit <- function(status = 1L) {
+	if (R_check_exit_on_first_error) {
+	    printLog(Log, "NOTE:  Quitting check on first error.\n")
+	    summaryLog(Log)
+	    do_exit(status)
+	}
     }
 
     Usage <- function() {
@@ -3843,7 +4373,7 @@ setRlibs <-
             "control files are performed.  The package is installed into the log",
             "directory and production of the package PDF manual is tested.",
             "All examples and tests provided by the package are tested to see if",
-            "they run successfully.  Code in the vignettes is tested,",
+            "they run successfully.  By default code in the vignettes is tested,",
             "as is re-building the vignette PDFs.",
             "",
             "Options:",
@@ -3861,12 +4391,17 @@ setRlibs <-
             "      --no-install      skip installation and associated tests",
             "      --no-tests        do not run code in 'tests' subdirectory",
             "      --no-manual       do not produce the PDF manual",
-            "      --no-vignettes    do not run R code in vignettes",
+            "      --no-vignettes    do not run R code in vignettes nor build outputs",
             "      --no-build-vignettes    do not build vignette outputs",
+            "      --ignore-vignettes    skip all tests on vignettes",
+            "      --run-dontrun     do run \\dontrun sections in the Rd files",
+            "      --run-donttest    do run \\donttest sections in the Rd files",
             "      --use-gct         use 'gctorture(TRUE)' when running examples/tests",
             "      --use-valgrind    use 'valgrind' when running examples/tests/vignettes",
             "      --timings         record timings for examples",
             "      --install-args=	command-line args to be passed to INSTALL",
+	    "      --test-dir=       look in this subdirectory for test scripts (default tests)",
+            "      --no-stop-on-test-error   do not stop running tests after first error",
             "      --check-subdirs=default|yes|no",
             "			run checks on the package subdirectories",
             "			(default is yes for a tarball, no otherwise)",
@@ -3883,7 +4418,7 @@ setRlibs <-
             "",
             "By default, all test sections are turned on.",
             "",
-            "Report bugs at bugs.r-project.org .", sep="\n")
+            "Report bugs at <https://bugs.R-project.org>.", sep="\n")
     }
 
 ###--- begin{.check_packages()} "main" ---
@@ -3891,7 +4426,7 @@ setRlibs <-
     options(showErrorCalls=FALSE, warn = 1)
 
     ## Read in check environment file.
-    Renv <- Sys.getenv("R_CHECK_ENVIRON", unset = NA)
+    Renv <- Sys.getenv("R_CHECK_ENVIRON", unset = NA_character_)
     if(!is.na(Renv)) {
         ## Do not read any check environment file if R_CHECK_ENVIRON is
         ## set to empty of something non-existent.
@@ -3900,7 +4435,7 @@ setRlibs <-
         ## Read in ~/.R/check.Renviron[.rarch] (if it exists).
         rarch <- .Platform$r_arch
         if (nzchar(rarch) &&
-            file.exists(Renv <- paste("~/.R/check.Renviron", rarch, sep = ".")))
+            file.exists(Renv <- paste0("~/.R/check.Renviron.", rarch)))
             readRenviron(Renv)
         else if (file.exists(Renv <- "~/.R/check.Renviron"))
             readRenviron(Renv)
@@ -3931,17 +4466,22 @@ setRlibs <-
     do_tests <- TRUE
     do_vignettes <- TRUE
     do_build_vignettes <- TRUE
+    ignore_vignettes <- FALSE
     do_manual <- TRUE
     use_gct <- FALSE
     use_valgrind <- FALSE
     do_timings <- FALSE
     install_args <- NULL
+    test_dir <- "tests"
     check_subdirs <- ""           # defaults to R_check_subdirs_strict
     extra_arch <- FALSE
     spec_install <- FALSE
     multiarch <- NA
     force_multiarch <- FALSE
     as_cran <- FALSE
+    run_dontrun <- FALSE
+    run_donttest <- FALSE
+    stop_on_test_error <- TRUE
 
     libdir <- ""
     outdir <- ""
@@ -3957,7 +4497,7 @@ setRlibs <-
                 R.version[["major"]], ".",  R.version[["minor"]],
                 " (r", R.version[["svn rev"]], ")\n", sep = "")
             cat("",
-                "Copyright (C) 1997-2013 The R Core Team.",
+                "Copyright (C) 1997-2017 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")
@@ -3989,13 +4529,21 @@ setRlibs <-
         } else if (a == "--no-rebuild-vignettes") { # pre-3.0.0 version
             stop("'--no-rebuild-vignettes' is defunct: use '--no-build-vignettes' instead",
                  call. = FALSE, domain = NA)
-      } else if (a == "--no-vignettes") {
+        } else if (a == "--no-vignettes") {
             do_vignettes  <- FALSE
-        } else if (a == "--no-manual") {
+        } else if (a == "--ignore-vignettes") {
+            ignore_vignettes  <- TRUE
+            do_vignettes  <- FALSE
+            do_build_vignettes  <- FALSE
+	} else if (a == "--no-manual") {
             do_manual  <- FALSE
         } else if (a == "--no-latex") {
             stop("'--no-latex' is defunct: use '--no-manual' instead",
                  call. = FALSE, domain = NA)
+        } else if (a == "--run-dontrun") {
+            run_dontrun  <- TRUE
+        } else if (a == "--run-donttest") {
+            run_donttest  <- TRUE
         } else if (a == "--use-gct") {
             use_gct  <- TRUE
         } else if (a == "--use-valgrind") {
@@ -4004,6 +4552,8 @@ setRlibs <-
             do_timings  <- TRUE
         } else if (substr(a, 1, 15) == "--install-args=") {
             install_args <- substr(a, 16, 1000)
+	} else if (substr(a, 1, 11) == "--test-dir=") {
+	    test_dir <- substr(a, 12, 1000)
         } else if (substr(a, 1, 16) == "--check-subdirs=") {
             check_subdirs <- substr(a, 17, 1000)
         } else if (a == "--extra-arch") {
@@ -4016,6 +4566,8 @@ setRlibs <-
             force_multiarch  <- TRUE
         } else if (a == "--as-cran") {
             as_cran  <- TRUE
+	} else if (a == "--no-stop-on-test-error") {
+	    stop_on_test_error <- FALSE
         } else if (substr(a, 1, 9) == "--rcfile=") {
             warning("configuration files are not supported as from R 2.12.0")
         } else if (substr(a, 1, 1) == "-") {
@@ -4032,6 +4584,9 @@ setRlibs <-
         opts <- c(opts, "--install=no")
         do_install_arg <- FALSE
     }
+    if (run_dontrun) opts <- c(opts, "--run-dontrun")
+    if (run_donttest) opts <- c(opts, "--run-donttest")
+    opts0 <- opts # other options are added later.
 
     if (install == "fake") {
         ## If we fake installation, then we cannot *run* any code.
@@ -4049,7 +4604,7 @@ setRlibs <-
             f <- dir(file.path(R.home(), "bin"))
             archs <- f[f %in% c("i386", "x64")]
             ## if we have x64, can only run it on a 64-bit OS
-            if (length(archs) > 1L && !grepl("x64", utils:::win.version()))
+            if (length(archs) > 1L && !grepl("x64", utils::win.version()))
                 archs <- "i386"
         } else {
             wd2 <- setwd(file.path(R.home("bin"), "exec"))
@@ -4093,6 +4648,11 @@ setRlibs <-
         config_val_to_logical(Sys.getenv("_R_CHECK_RD_XREFS_", "TRUE"))
     R_check_use_codetools <-
         config_val_to_logical(Sys.getenv("_R_CHECK_USE_CODETOOLS_", "TRUE"))
+    ## Howver, we cannot use this if we did not install the recommended packages
+    if(R_check_use_codetools) {
+        tmp <- tryCatch(find.package('codetools'), error = identity)
+        if(inherits(tmp, "error")) R_check_use_codetools <- FALSE
+    }
     R_check_executables <-
         config_val_to_logical(Sys.getenv("_R_CHECK_EXECUTABLES_", "TRUE"))
     R_check_executables_exclusions <-
@@ -4151,6 +4711,11 @@ setRlibs <-
         config_val_to_logical(Sys.getenv("_R_CHECK_FF_DUP_", "TRUE"))
     R_check_toplevel_files <-
         config_val_to_logical(Sys.getenv("_R_CHECK_TOPLEVEL_FILES_", "FALSE"))
+    R_check_exit_on_first_error <-
+	config_val_to_logical(Sys.getenv("_R_CHECK_EXIT_ON_FIRST_ERROR_", "FALSE"))
+    R_check_vignettes_skip_run_maybe <-
+        config_val_to_logical(Sys.getenv("_R_CHECK_VIGNETTES_SKIP_RUN_MAYBE_",
+                                         "FALSE"))
 
     if (!nzchar(check_subdirs)) check_subdirs <- R_check_subdirs_strict
 
@@ -4165,11 +4730,16 @@ setRlibs <-
         Sys.setenv("_R_SHLIB_BUILD_OBJECTS_SYMBOL_TABLES_" = "TRUE")
         Sys.setenv("_R_CHECK_DOT_FIRSTLIB_" = "TRUE")
         Sys.setenv("_R_CHECK_PACKAGES_USED_CRAN_INCOMING_NOTES_" = "TRUE")
-        prev <- Sys.getenv("_R_CHECK_LIMIT_CORES_", NA)
+        prev <- Sys.getenv("_R_CHECK_LIMIT_CORES_", NA_character_)
         if(is.na(prev)) Sys.setenv("_R_CHECK_LIMIT_CORES_" = "TRUE")
-        prev <- Sys.getenv("_R_CHECK_SCREEN_DEVICE_", NA)
+        prev <- Sys.getenv("_R_CHECK_SCREEN_DEVICE_", NA_character_)
         if(is.na(prev)) Sys.setenv("_R_CHECK_SCREEN_DEVICE_" = "stop")
         Sys.setenv("_R_CHECK_CODE_USAGE_VIA_NAMESPACES_" = "TRUE")
+        Sys.setenv("_R_CHECK_CODE_USAGE_WITH_ONLY_BASE_ATTACHED_" = "TRUE")
+        Sys.setenv("_R_CHECK_S3_METHODS_NOT_REGISTERED_" = "TRUE")
+        Sys.setenv("_R_CHECK_PACKAGE_DATASETS_SUPPRESS_NOTES_" = "TRUE")
+        Sys.setenv("_R_CHECK_PACKAGES_USED_IGNORE_UNUSED_IMPORTS_" = "TRUE")
+        Sys.setenv("_R_CHECK_NATIVE_ROUTINE_REGISTRATION_" = "TRUE")
         R_check_vc_dirs <- TRUE
         R_check_executables_exclusions <- FALSE
         R_check_doc_sizes2 <- TRUE
@@ -4182,10 +4752,12 @@ setRlibs <-
         R_check_FF <- "registration"
         do_timings <- TRUE
         R_check_toplevel_files <- TRUE
+        R_check_vignettes_skip_run_maybe <- TRUE
     } else {
         ## do it this way so that INSTALL produces symbols.rds
         ## when called from check but not in general.
-        if(is.na(Sys.getenv("_R_SHLIB_BUILD_OBJECTS_SYMBOL_TABLES_", NA)))
+        if(is.na(Sys.getenv("_R_SHLIB_BUILD_OBJECTS_SYMBOL_TABLES_",
+                            NA_character_)))
             Sys.setenv("_R_SHLIB_BUILD_OBJECTS_SYMBOL_TABLES_" = "TRUE")
     }
 
@@ -4216,7 +4788,7 @@ setRlibs <-
     if (nzchar(libdir)) {
         setwd(libdir)
         libdir <- getwd()
-        Sys.setenv(R_LIBS = env_path(libdir, R_LIBS))
+        Sys.setenv(R_LIBS = path_and_libPath(libdir, R_LIBS))
         setwd(startdir)
     }
 
@@ -4230,9 +4802,8 @@ setRlibs <-
     R_opts4 <- "--no-site-file --no-init-file --no-save --no-restore --slave"
     env0 <- if(WINDOWS) "R_ENVIRON_USER='no_such_file'" else "R_ENVIRON_USER=''"
 
-    msg_DESCRIPTION <- c("See the information on DESCRIPTION files",
-                         " in the chapter 'Creating R packages'",
-                         " of the 'Writing R Extensions' manual.\n")
+    msg_DESCRIPTION <-
+        c("See section 'The DESCRIPTION file' in the 'Writing R Extensions' manual.\n")
 
     if (!length(pkgs)) {
         message("Error: no packages were specified")
@@ -4272,7 +4843,7 @@ setRlibs <-
                     domain = NA, call. = FALSE, immediate. = TRUE)
             next
         }
-        pkgoutdir <- file.path(outdir, paste(pkgname0, "Rcheck", sep = "."))
+        pkgoutdir <- file.path(outdir, paste0(pkgname0, ".Rcheck"))
         if (clean && dir.exists(pkgoutdir)) {
             unlink(pkgoutdir, recursive = TRUE)
             if(WINDOWS) Sys.sleep(0.5) # allow for antivirus interference
@@ -4288,15 +4859,19 @@ setRlibs <-
             dir.create(dir, mode = "0755")
             if (!dir.exists(dir)) {
                 errorLog(Log, sprintf("cannot create %s", sQuote(dir)))
+                summaryLog(Log)
                 do_exit(1L)
             }
             ## force the use of internal untar unless over-ridden
             ## so e.g. .tar.xz works everywhere
-            if (untar(pkg, exdir = dir,
-                      tar =  Sys.getenv("R_INSTALL_TAR", "internal"))) {
+            if (utils::untar(pkg, exdir = dir,
+                             tar = Sys.getenv("R_INSTALL_TAR", "internal"))) {
                 errorLog(Log, sprintf("cannot unpack %s", sQuote(pkg)))
+                summaryLog(Log)
                 do_exit(1L)
             }
+            size <- file.info(pkg)$size
+            Sys.setenv("_R_CHECK_SIZE_OF_TARBALL_" = size)
             ## this assumes foo_x.y.tar.gz unpacks to foo, but we are about
             ## to test that.
             pkg <- file.path(dir, pkgname0)
@@ -4331,25 +4906,33 @@ setRlibs <-
         .unpack.time <- Sys.time()
 
         ## report options used
+        opts <- opts0
         if (!do_codoc) opts <- c(opts, "--no-codoc")
         if (!do_examples && !spec_install) opts <- c(opts, "--no-examples")
         if (!do_tests && !spec_install) opts <- c(opts, "--no-tests")
-        if (!do_vignettes && !spec_install) opts <- c(opts, "--no-vignettes")
-        if (!do_build_vignettes && !spec_install)
-            opts <- c(opts, "--no-build-vignettes")
+        if (!do_manual && !spec_install) opts <- c(opts, "--no-manual")
+        if (ignore_vignettes) opts <- c(opts, "--ignore-vignettes")
+        else {
+            if (!do_vignettes && !spec_install)
+                opts <- c(opts, "--no-vignettes")
+            if (!do_build_vignettes && !spec_install)
+                opts <- c(opts, "--no-build-vignettes")
+        }
         if (use_gct) opts <- c(opts, "--use-gct")
         if (use_valgrind) opts <- c(opts, "--use-valgrind")
+	if (!stop_on_test_error) opts <- c(opts, "--no-stop-on-test-error")
+        if (as_cran) opts <- c(opts, "--as-cran")
         if (length(opts) > 1L)
             messageLog(Log, "using options ", sQuote(paste(opts, collapse=" ")))
         else if (length(opts) == 1L)
             messageLog(Log, "using option ", sQuote(opts))
 
-        if (!nzchar(libdir)) {
+        if (!nzchar(libdir)) { # otherwise have set R_LIBS above
             libdir <- pkgoutdir
-            Sys.setenv(R_LIBS = env_path(libdir, R_LIBS))
+            Sys.setenv(R_LIBS = path_and_libPath(libdir, R_LIBS))
         }
         if (WINDOWS && grepl(" ", libdir)) # need to avoid spaces in libdir
-            libdir <- gsub("\\", "/", shortPathName(libdir), fixed = TRUE)
+            libdir <- gsub("\\", "/", utils::shortPathName(libdir), fixed = TRUE)
 
         ## Package sources from the R distribution are special.  They
         ## have a 'DESCRIPTION.in' file (instead of 'DESCRIPTION'),
@@ -4363,7 +4946,8 @@ setRlibs <-
             file.exists(file.path(pkgdir, "Makefile.in"))) {
             desc <- try(read.dcf(f))
             if (inherits(desc, "try-error") || !length(desc)) {
-                resultLog(Log, "EXISTS but not correct format")
+                errorLog(Log, "File DESCRIPTION exists but is not in correct format")
+                summaryLog(Log)
                 do_exit(1L)
             }
             desc <- desc[1L, ]
@@ -4399,7 +4983,11 @@ setRlibs <-
             check_incoming <- if(check_incoming == "NA") as_cran else {
                 config_val_to_logical(check_incoming)
             }
-            if (check_incoming) check_CRAN_incoming()
+            check_incoming_remote <- Sys.getenv("_R_CHECK_CRAN_INCOMING_REMOTE_", "NA")
+            check_incoming_remote <- if(check_incoming_remote == "NA") as_cran else {
+                config_val_to_logical(check_incoming_remote)
+            }
+            if (check_incoming) check_CRAN_incoming(!check_incoming_remote)
 
             ## <NOTE>
             ## We want to check for dependencies early, since missing
@@ -4420,13 +5008,14 @@ setRlibs <-
             else  if (file.exists(file.path(pkgdir, "NAMESPACE"))) {
                 errorLog(Log,
                        "File NAMESPACE does not exist but there is a case-insenstiive match.")
+                summaryLog(Log)
                 do_exit(1L)
             } else if (dir.exists(file.path(pkgdir, "R"))) {
                 errorLog(Log)
                 wrapLog("All packages need a namespace as from R 3.0.0.\n",
                         "R CMD build will produce a suitable starting point,",
                         "but it is better to handcraft a NAMESPACE file.")
-                do_exit(1L)
+	        maybe_exit(1L)
             } else {
                 noteLog(Log)
                 wrapLog("Packages without R code can be installed without",
@@ -4485,9 +5074,9 @@ setRlibs <-
                     } else this_multiarch <- FALSE  # no compiled code
                 }
                 if (this_multiarch && length(R_check_skip_arch))
-                    inst_archs <- inst_archs[!(inst_archs %in% R_check_skip_arch)]
+                    inst_archs <- inst_archs[inst_archs %notin% R_check_skip_arch]
             }
-        }   ## end of if (!is_base_pkg)
+        } else check_incoming <- FALSE  ## end of if (!is_base_pkg)
 
         elibs <- if(is_base_pkg) character()
         else if(R_check_depends_only)
@@ -4510,9 +5099,9 @@ setRlibs <-
 
         if (!is_base_pkg && check_incoming && no_examples &&
             dir.exists(file.path(pkgdir, "R"))) {
-           tests_dir <- file.path(pkgdir, "tests")
+            tests_dir <- file.path(pkgdir, test_dir)
             if (dir.exists(tests_dir) &&
-                length(dir(tests_dir, pattern = "\\.(R|Rin)$")))
+                length(dir(tests_dir, pattern = "\\.(r|R|Rin)$")))
                 no_examples <- FALSE
             vigns <- pkgVignettes(dir = pkgdir)
             if (!is.null(vigns) && length(vigns$docs)) no_examples <- FALSE
@@ -4526,10 +5115,7 @@ setRlibs <-
                 }
             }
         }
-        messageLog(Log, "DONE")
-        if ((Log$warnings > 0L) || (Log$notes > 0L)) {
-            message(""); summaryLog(Log)
-        }
+        summaryLog(Log)
 
         if(config_val_to_logical(Sys.getenv("_R_CHECK_CRAN_STATUS_SUMMARY_",
                                             "FALSE"))) {
@@ -4539,6 +5125,9 @@ setRlibs <-
             }
         }
 
+        if(Log$errors > 0L)
+            do_exit(1L)
+
         closeLog(Log)
         message("")
 
@@ -4552,198 +5141,6 @@ function(x)
     paste0("  ", x, collapse = "\n")
     ## Hard-wire indent of 2 for now.
 
-
-summarize_CRAN_check_status <-
-function(package, results = NULL, details = NULL, mtnotes = NULL)
-{
-    if(is.null(results))
-        results <- CRAN_check_results()
-    results <-
-        results[!is.na(match(results$Package, package)) & !is.na(results$Status), ]
-
-    if(!NROW(results)) {
-        s <- character(length(package))
-        names(s) <- package
-        return(s)
-    }
-
-    if(any(results$Status != "OK")) {
-        if(is.null(details))
-            details <- CRAN_check_details()
-        details <- details[!is.na(match(details$Package, package)), ]
-        ## Remove trailing white space from outputs ... remove eventually
-        ## when this is done on CRAN.
-        details$Output <- sub("[[:space:]]+$", "", details$Output)
-
-    } else {
-        ## Create empty details directly to avoid the cost of reading
-        ## and subscripting the actual details db.
-        details <- as.data.frame(matrix(character(), ncol = 7L),
-                                 stringsAsFactors = FALSE)
-        names(details) <-
-            c("Package", "Version", "Flavor", "Check", "Status", "Output",
-              "Flags")
-    }
-
-    if(is.null(mtnotes))
-        mtnotes <- CRAN_memtest_notes()
-
-
-    summarize_results <- function(p, r) {
-        if(!NROW(r)) return(character())
-        tab <- table(r$Status)[c("ERROR", "WARN", "NOTE", "OK")]
-        tab <- tab[!is.na(tab)]
-        paste(c(sprintf("Current CRAN status: %s",
-                        paste(sprintf("%s: %s", names(tab), tab),
-                              collapse = ", ")),
-                sprintf("See: <http://CRAN.R-project.org/web/checks/check_results_%s.html>",
-                        p)),
-              collapse = "\n")
-    }
-
-    summarize_details <- function(p, d) {
-        if(!NROW(d)) return(character())
-        pos <- which(names(d) == "Flavor")
-        txt <- apply(d[-pos], 1L, paste, collapse = "\r")
-        ## Outputs from checking "installed package size" will vary
-        ## according to system.
-        ind <- d$Check == "installed package size"
-        if(any(ind)) {
-            pos <- c(pos, which(names(d) == "Output"))
-            txt[ind] <- apply(d[ind, -pos], 1L, paste, collapse = "\r")
-        }
-
-        ## Regularize fancy quotes.
-        ## Could also try using iconv(to = "ASCII//TRANSLIT"))
-        txt <- gsub("(\xe2\x80\x98|\xe2\x80\x99)", "'", txt,
-                    perl = TRUE, useBytes = TRUE)
-        txt <- gsub("(\xe2\x80\x9c|\xe2\x80\x9d)", '"', txt,
-                    perl = TRUE, useBytes = TRUE)
-        out <-
-            lapply(split(seq_len(NROW(d)), match(txt, unique(txt))),
-                   function(e) {
-                       tmp <- d[e[1L], ]
-                       flags <- tmp$Flags
-                       flavors <- d$Flavor[e]
-                       c(sprintf("Version: %s", tmp$Version),
-                         if(nzchar(flags)) sprintf("Flags: %s", flags),
-                         sprintf("Check: %s, Result: %s", tmp$Check, tmp$Status),
-                         sprintf("  %s",
-                                 gsub("\n", "\n  ", tmp$Output,
-                                      perl = TRUE, useBytes = TRUE)),
-                         sprintf("See: %s",
-                                 paste(sprintf("<http://www.r-project.org/nosvn/R.check/%s/%s-00check.html>",
-                                               flavors,
-                                               p),
-                                       collapse = ",\n     ")))
-                   })
-        paste(unlist(lapply(out, paste, collapse = "\n")),
-              collapse = "\n\n")
-    }
-
-    summarize_mtnotes <- function(p, m) {
-        if(!length(m)) return(character())
-        tests <- m[, "Test"]
-        paths <- m[, "Path"]
-        isdir <- !grepl("-Ex.Rout$", paths)
-        if(any(isdir))
-            paths[isdir] <- sprintf("%s/", paths[isdir])
-        paste(c(paste("Memtest notes:",
-                      paste(unique(tests), collapse = " ")),
-                sprintf("See: %s",
-                        paste(sprintf("<http://www.stats.ox.ac.uk/pub/bdr/memtests/%s/%s>",
-                                      tests,
-                                      paths),
-                              collapse = ",\n     "))),
-              collapse = "\n")
-    }
-
-    summarize <- function(p, r, d, m) {
-        paste(c(summarize_results(p, r),
-                summarize_mtnotes(p, m),
-                summarize_details(p, d)),
-              collapse = "\n\n")
-    }
-
-    s <- if(length(package) == 1L) {
-        summarize(package, results, details, mtnotes[[package]])
-    } else {
-        results <- split(results, factor(results$Package, package))
-        details <- split(details, factor(details$Package, package))
-        unlist(lapply(package,
-                      function(p) {
-                          summarize(p,
-                                    results[[p]],
-                                    details[[p]],
-                                    mtnotes[[p]])
-                      }))
-    }
-
-    names(s) <- package
-    class(s) <- "summarize_CRAN_check_status"
-    s
-}
-
-format.summarize_CRAN_check_status <-
-function(x, header = NA, ...)
-{
-    if(is.na(header)) header <- (length(x) > 1L)
-    if(header) {
-        s <- sprintf("Package: %s", names(x))
-        x <- sprintf("%s\n%s\n\n%s", s, gsub(".", "*", s), x)
-    }
-    x
-}
-
-print.summarize_CRAN_check_status <-
-function(x, ...)
-{
-    writeLines(paste(format(x, ...), collapse = "\n\n"))
-    invisible(x)
-}
-
-
-CRAN_check_results <-
-function()
-{
-    ## This allows for partial local mirrors, or to
-    ## look at a more-freqently-updated mirror
-    CRAN_repos <- Sys.getenv("R_CRAN_WEB", getOption("repos")["CRAN"])
-    rds <- gzcon(url(sprintf("%s/%s", CRAN_repos,
-                             "web/checks/check_results.rds"),
-                     open = "rb"))
-    results <- readRDS(rds)
-    close(rds)
-
-    results
-}
-
-CRAN_check_details <-
-function()
-{
-    CRAN_repos <- Sys.getenv("R_CRAN_WEB", getOption("repos")["CRAN"])
-    rds <- gzcon(url(sprintf("%s/%s", CRAN_repos,
-                             "web/checks/check_details.rds"),
-                     open = "rb"))
-    details <- readRDS(rds)
-    close(rds)
-
-    details
-}
-
-CRAN_memtest_notes <-
-function()
-{
-    CRAN_repos <- Sys.getenv("R_CRAN_WEB", getOption("repos")["CRAN"])
-    rds <- gzcon(url(sprintf("%s/%s", CRAN_repos,
-                             "web/checks/memtest_notes.rds"),
-                     open = "rb"))
-    mtnotes <- readRDS(rds)
-    close(rds)
-
-    mtnotes
-}
-
 ### Local variables:
 ### mode: R
 ### page-delimiter: "^###[#-]"
diff --git a/src/library/tools/R/checktools.R b/src/library/tools/R/checktools.R
index 228544c..18d1bce 100644
--- a/src/library/tools/R/checktools.R
+++ b/src/library/tools/R/checktools.R
@@ -1,7 +1,7 @@
 #  File src/library/tools/R/checktools.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
-#  Copyright (C) 2013-2013 The R Core Team
+#  Copyright (C) 2013-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
@@ -14,7 +14,9 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
+
+### ** check_packages_in_dir
 
 check_packages_in_dir <-
 function(dir,
@@ -31,11 +33,24 @@ function(dir,
     setwd(dir)
     on.exit(setwd(owd))
 
+    .check_packages_in_dir_retval <-
+    function(dir,
+             pfiles,
+             pnames = character(),
+             rnames = character()) {
+        structure(pfiles,
+                  dir = dir,
+                  pnames = pnames,
+                  rnames = rnames,
+                  class = "check_packages_in_dir")
+    }
+
     pfiles <- Sys.glob("*.tar.gz")
     if(!length(pfiles)) {
         message("no packages to check")
-        return(invisible())
+        return(.check_packages_in_dir_retval(dir, pfiles))
     }
+
     pnames <- sub("_.*", "", pfiles)
 
     os_type <- .Platform$OS.type
@@ -55,8 +70,8 @@ function(dir,
         xvfb_options <- as.character(xvfb)
         xvfb <- TRUE
     }
-    
-    curl <- if(os_type == "windows") 
+
+    curl <- if(os_type == "windows")
         sprintf("file:///%s", dir)
     else
         sprintf("file://%s", dir)
@@ -95,11 +110,22 @@ function(dir,
     ## Build a package db from the source packages in the working
     ## directory.
     write_PACKAGES(dir, type = "source")
-    
-    curls <- c(curl,
-               utils::contrib.url(getOption("repos"), type = "source"))
+    if(dir.exists(depdir <- file.path(dir, "Depends"))) {
+        write_PACKAGES(depdir, type = "source")
+        curl <- c(curl, paste0(curl, "/Depends"))
+    }
+    ## Determine packages available locally (for checking) and in the
+    ## repositories, and merge the information giving preference to the
+    ## former.
+    localones <- utils::available.packages(contriburl = curl,
+                                           type = "source")
+    curls <- utils::contrib.url(getOption("repos"), type = "source")
     available <- utils::available.packages(contriburl = curls,
                                            type = "source")
+    available <- rbind(localones, available)
+    available <-
+        available[!duplicated(available[, "Package"]), , drop = FALSE]
+    curls <- c(curl, curls)
 
     ## As of c52164, packages with OS_type different from the current
     ## one are *always* checked with '--install=no'.
@@ -112,16 +138,17 @@ function(dir,
           setdiff(pnames_using_install_fake, available[, "Package"]))
     pnames_using_install_fake <-
         intersect(pnames_using_install_fake, available[, "Package"])
-    
+
     if(!is.null(reverse) && !identical(reverse, FALSE)) {
         ## Determine and download reverse dependencies to be checked as
         ## well.
-        
+
         reverse <- as.list(reverse)
         ## Merge with defaults, using partial name matching.
         defaults <- list(which = c("Depends", "Imports", "LinkingTo"),
                          recursive = FALSE,
                          repos = getOption("repos"))
+        defaults0 <- defaults
         pos <- pmatch(names(reverse), names(defaults), nomatch = 0L)
         defaults[pos] <- reverse[pos > 0L]
 
@@ -148,6 +175,22 @@ function(dir,
                                  reverse = TRUE)
         }
 
+        add_recommended_maybe <-
+            config_val_to_logical(Sys.getenv("_R_TOOLS_C_P_I_D_ADD_RECOMMENDED_MAYBE_",
+                                             "FALSE"))
+        if(add_recommended_maybe) {
+            ## Add all recommended packages with any dependency on the
+            ## packages to be checked.
+            rnames <-
+                c(rnames,
+                  names(Filter(length,
+                               lapply(package_dependencies(.get_standard_package_names()$recommended,
+                                                           available,
+                                                           which = "all"),
+                                      intersect,
+                                      pnames))))
+        }
+
         rnames <- intersect(unlist(rnames, use.names = FALSE),
                             available[, "Package"])
         rnames <- setdiff(rnames, pnames)
@@ -175,7 +218,8 @@ function(dir,
             for(i in seq_along(rfiles)) {
                 message(sprintf("downloading %s ... ", rfiles[i]),
                         appendLF = FALSE)
-                status <- if(!utils::download.file(rfurls[i], rfiles[i]))
+                status <- if(!utils::download.file(rfurls[i], rfiles[i],
+                                                   quiet = TRUE))
                     "ok" else "failed"
                 message(status)
             }
@@ -190,11 +234,15 @@ function(dir,
 
     ## Install what is needed.
 
+    if(xvfb) {
+        pid <- start_virtual_X11_fb(xvfb_options)
+        on.exit(close_virtual_X11_db(pid), add = TRUE)
+    }
+
     depends <-
         package_dependencies(pnames, available, which = "most")
     depends <- setdiff(unique(unlist(depends, use.names = FALSE)),
-                       unlist(.get_standard_package_names(),
-                              use.names = FALSE))
+                       .get_standard_package_names()$base)
 
     ## Need to install depends which are not installed or installed but
     ## old.
@@ -207,10 +255,10 @@ function(dir,
                                         available = available)[, "Package"]))
     if(length(depends)) {
         message(paste(strwrap(sprintf("installing dependencies %s",
-                                      paste(sQuote(depends),
+                                      paste(sQuote(sort(depends)),
                                             collapse = ", ")),
                               exdent = 2L),
-                      collapse = "\n"))
+                      collapse = "\n"), domain = NA)
         ## <NOTE>
         ## Ideally we would capture stdout and stderr in e.g.
         ##   outdir/install_stdout.txt
@@ -228,10 +276,10 @@ function(dir,
         utils::install.packages(depends, lib = libdir,
                                 contriburl = curls,
                                 available = available,
-                                dependencies = TRUE,
+                                dependencies = NA,
                                 INSTALL_opts = iflags,
                                 keep_outputs = tmpdir,
-                                Ncpus = Ncpus, 
+                                Ncpus = Ncpus,
                                 type = "source")
         outfiles <- Sys.glob(file.path(tmpdir, "*.out"))
         file.rename(outfiles,
@@ -287,12 +335,6 @@ function(dir,
                             env = env))
     }
 
-
-    if(xvfb) {
-        pid <- start_virtual_X11_fb(xvfb_options)
-        on.exit(close_virtual_X11_db(pid), add = TRUE)
-    }
-
     if(Ncpus > 1L) {
         if(os_type != "windows") {
             timings <- parallel::mclapply(pfiles,
@@ -318,7 +360,7 @@ function(dir,
 
     timings <- do.call(rbind, lapply(timings, summary))
     rownames(timings) <- pnames
-    write.table(timings, "timings.tab")
+    utils::write.table(timings, "timings.tab")
 
     file.rename(sprintf("%s.Rcheck", rnames),
                 sprintf("rdepends_%s.Rcheck", rnames))
@@ -329,10 +371,55 @@ function(dir,
         file.rename(rfiles, sprintf("rdepends_%s", rfiles))
     }
 
-    invisible(pfiles)
+    .check_packages_in_dir_retval(dir,
+                                  pfiles,
+                                  setdiff(pnames, rnames),
+                                  rnames)
+}
+
+### ** print.check_packages_in_dir
+
+print.check_packages_in_dir <-
+function(x, ...)
+{
+    if(!length(x)) {
+        writeLines("No packages checked.")
+        return(invisible(x))
+    }
 
+    dir <- attr(x, "dir")
+    writeLines(c(strwrap(sprintf("Check results for packages in dir '%s':",
+                                 dir)),
+                 sprintf("Package sources: %d, Reverse depends: %d",
+                         length(attr(x, "pnames")),
+                         length(attr(x, "rnames"))),
+                 "Use summary() for more information."))
+    invisible(x)
 }
 
+### ** summary.check_packages_in_dir
+
+summary.check_packages_in_dir <-
+function(object, all = TRUE, full = FALSE, ...)
+{
+    if(!length(object)) {
+        writeLines("No packages checked.")
+        return(invisible(object))
+    }
+
+    dir <- attr(object, "dir")
+    writeLines(c(strwrap(sprintf("Check results for packages in dir '%s':",
+                                 dir)),
+                 ""))
+    details <- summarize_check_packages_in_dir_results(dir)
+    if(!full && details) {
+        writeLines("\nUse summary(full = TRUE) for details.")
+    }
+    invisible(object)
+}
+
+### ** start_virtual_X11_fb
+
 start_virtual_X11_fb <-
 function(options)
 {
@@ -347,14 +434,14 @@ function(options)
         options <- c(num, options)
     }
 
-    dis <- Sys.getenv("DISPLAY", unset = NA)
+    dis <- Sys.getenv("DISPLAY", unset = NA_character_)
 
     ## We need to start Xvfb with the given options and obtain its pid
     ## so that we can terminate it when done checking.
     ## This could be done via
     ##   system2("Xvfb", options, stdout = FALSE, stderr = FALSE,
     ##           wait = FALSE)
-    ## and then determine the pid as 
+    ## and then determine the pid as
     ##   pid <- scan(text =
     ##               grep(sprintf("Xvfb %s", num),
     ##                    system2("ps", "auxw", stdout = TRUE),
@@ -373,13 +460,15 @@ function(options)
                tf)
     pid <- system2("sh", tf, stdout = TRUE)
     Sys.setenv("DISPLAY" = num)
-    
+
     ## Propagate both pid and original setting of DISPLAY so that the
     ## latter can be restored when Xvfb is closed.
     attr(pid, "display") <- dis
     pid
 }
 
+### ** close_virtual_X11_db
+
 close_virtual_X11_db <-
 function(pid)
 {
@@ -390,56 +479,75 @@ function(pid)
         Sys.setenv("DISPLAY" = dis)
 }
 
+### ** R_check_outdirs
+
 R_check_outdirs <-
-function(dir, all = FALSE)
+function(dir, all = FALSE, invert = FALSE)
 {
     dir <- normalizePath(dir)
     outdirs <- dir(dir, pattern = "\\.Rcheck")
-    if(!all) outdirs <- outdirs[!grepl("^rdepends_", outdirs)]
+    ind <- startsWith(basename(outdirs), "rdepends_")
+    ## Re-arrange to have reverse dependencies last if at all.
+    outdirs <- if(invert)
+        c(if(all) outdirs[!ind], outdirs[ind])
+    else
+        c(outdirs[!ind], if(all) outdirs[ind])
     file.path(dir, outdirs)
 }
 
+### ** summarize_check_packages_in_dir_depends
+
 summarize_check_packages_in_dir_depends <-
-function(dir, all = FALSE)
+function(dir, all = FALSE, which = c("Depends", "Imports", "LinkingTo"))
 {
+    ## See tools::package_dependencies(): should perhaps separate out.
+    if(identical(which, "all"))
+        which <- c("Depends", "Imports", "LinkingTo", "Suggests",
+                   "Enhances")
+    else if(identical(which, "most"))
+        which <- c("Depends", "Imports", "LinkingTo", "Suggests")
+
     for(d in R_check_outdirs(dir, all = all)) {
         dfile <- Sys.glob(file.path(d, "00_pkg_src", "*",
                                     "DESCRIPTION"))[1L]
         if(file_test("-f", dfile)) {
             meta <- .read_description(dfile)
-            has_depends <- !is.na(meta["Depends"])
-            has_imports <- !is.na(meta["Imports"])
-            if(has_depends || has_imports) {
-                writeLines(c(sprintf("Package: %s",
-                                     meta["Package"]),
-                             if(has_depends)
-                             strwrap(sprintf("Depends: %s",
-                                             meta["Depends"]),
-                                     indent = 2L,
-                                     exdent = 4L),
-                             if(has_imports)
-                             strwrap(sprintf("Imports: %s",
-                                             meta["Imports"]),
-                                     indent = 2L,
-                                     exdent = 4L)))
+            package <- meta["Package"]
+            meta <- meta[match(which, names(meta), nomatch = 0L)]
+            if(length(meta)) {
+                writeLines(c(sprintf("Package: %s", package),
+                             unlist(Map(function(tag, val) {
+                                 strwrap(sprintf("%s: %s", tag, val),
+                                         indent = 2L, exdent = 4L)
+                             },
+                                        names(meta),
+                                        meta))))
             }
         }
     }
+
+    invisible()
 }
 
+### ** summarize_check_packages_in_dir_results
+
 summarize_check_packages_in_dir_results <-
 function(dir, all = TRUE, full = FALSE)
 {
     dir <- normalizePath(dir)
     outdirs <- R_check_outdirs(dir, all = all)
-    ## Re-arrange to have reverse dependencies last.
-    ind <- grepl("^rdepends_", basename(outdirs))
-    outdirs <- c(outdirs[!ind], outdirs[ind])
     logs <- file.path(outdirs, "00check.log")
     logs <- logs[file_test("-f", logs)]
-    
+
     results <- check_packages_in_dir_results(logs = logs)
 
+    writeLines("Check status summary:")
+    tab <- check_packages_in_dir_results_summary(results)
+    rownames(tab) <- paste0("  ", rownames(tab))
+    print(tab)
+    writeLines("")
+
+    writeLines("Check results summary:")
     Map(function(p, r) {
         writeLines(c(sprintf("%s ... %s", p, r$status), r$lines))
     },
@@ -449,24 +557,17 @@ function(dir, all = TRUE, full = FALSE)
     if(full &&
        !all(as.character(unlist(lapply(results, `[[`, "status"))) ==
             "OK")) {
-        writeLines("")
+        writeLines(c("", "Check results details:"))
         details <- check_packages_in_dir_details(logs = logs)
-        flags <- details$Flags
-        out <- cbind(sprintf("Package: %s %s",
-                             details$Package, details$Version),
-                     ifelse(nzchar(flags),
-                            sprintf("Flags: %s\n", flags),
-                            ""),
-                     sprintf("Check: %s, Result: %s",
-                             details$Check, details$Status),
-                     c(gsub("\n", "\n  ", details$Output,
-                            perl = TRUE, useBytes = TRUE)))
-        cat(t(out), sep = c("\n", "", "\n  ", "\n\n"))
+        writeLines(paste(format(details), collapse = "\n\n"))
+        invisible(TRUE)
+    } else {
+        invisible(FALSE)
     }
-
-    invisible()
 }
 
+### ** summarize_check_packages_in_dir_timings
+
 summarize_check_packages_in_dir_timings <-
 function(dir, all = FALSE, full = FALSE)
 {
@@ -490,7 +591,7 @@ function(dir, all = FALSE, full = FALSE)
         tfiles <- Sys.glob(file.path(R_check_outdirs(dir, all = all),
                                      "*-Ex.timings"))
         if(length(tfiles)) message("")
-        timings <- lapply(tfiles, read.table, header = TRUE)
+        timings <- lapply(tfiles, utils::read.table, header = TRUE)
         ## Order by CPU time.
         timings <- lapply(timings,
                           function(x)
@@ -508,26 +609,18 @@ function(dir, all = FALSE, full = FALSE)
         },
                       names(timings), timings))
     }
-}
 
-read_check_log <-
-function(log)
-{
-    lines <- readLines(log, warn = FALSE)
-
-    ## Drop CRAN check status footer.
-    ## Ideally, we would have a more general mechanism to detect footer
-    ## information to be skipped (e.g., a line consisting of a single
-    ## non-printing control character?)
-    pos <- grep("^Current CRAN status:", lines,
-                perl = TRUE, useBytes = TRUE)
-    if(length(pos) && lines[pos <- (pos[1L] - 1L)] == "") {
-        lines <- lines[seq_len(pos - 1L)]
-    }
-
-    lines
+    invisible()
 }
 
+### ** check_packages_in_dir_results
+
+## <FIXME>
+## For new-style logs from successful check runs (a '* DONE' line
+## followed by a 'Status: ' line), we could simply get the status from
+## the 'Status: ' line.
+## Change to fully rely on the new format eventually.
+## </FIXME>
 
 check_packages_in_dir_results <-
 function(dir, logs = NULL)
@@ -535,20 +628,33 @@ function(dir, logs = NULL)
     if(is.null(logs))
         logs <- Sys.glob(file.path(dir, "*.Rcheck", "00check.log"))
 
+    ## <NOTE>
+    ## Perhaps make the individual non-OK check values more readily
+    ## available?
+    ## </NOTE>
+
     results <- lapply(logs, function(log) {
         lines <- read_check_log(log)
-        m <- regexpr("^\\*.*\\.\\.\\. *(\\[.*\\])? *(NOTE|WARN|ERROR)", 
-                     lines, perl = TRUE, useBytes = TRUE)
+        ## See analyze_lines() inside analyze_check_log():
+        re <- "^\\* (loading checks for arch|checking (examples|tests) \\.\\.\\.$)"
+        pos <- grep(re, lines, perl = TRUE, useBytes = TRUE)
+        if(length(pos <- pos[pos < length(lines)]))
+            lines <- lines[-pos]
+        re <- "^\\*\\*? ((checking|creating|running examples for arch|running tests for arch) .*) \\.\\.\\.( (\\[[^ ]*\\]))?( (NOTE|WARNING|ERROR)|)$"
+        m <- regexpr(re, lines, perl = TRUE, useBytes = TRUE)
         ind <- (m > 0L)
-        status <- if(any(ind)) {
-            if(all(grepl("NOTE$", regmatches(lines, m), useBytes = TRUE))) {
-                "NOTE"
+        ## Note that we use WARN instead of WARNING for the summary.
+        status <-
+            if(any(ind)) {
+                status <- sub(re, "\\6", lines[ind],
+                              perl = TRUE, useBytes = TRUE)
+                if(any(status == "")) "FAIL"
+                else if(any(status == "ERROR")) "ERROR"
+                else if(any(status == "WARNING")) "WARN"
+                else "NOTE"
             } else {
-                "PROBLEM"
+                "OK"
             }
-        } else {
-            "OK"
-        }
         list(status = status, lines = lines[ind])
     })
     names(results) <- sub("\\.Rcheck$", "", basename(dirname(logs)))
@@ -556,6 +662,67 @@ function(dir, logs = NULL)
     results
 }
 
+### ** check_packages_in_dir_results_summary
+
+check_packages_in_dir_results_summary <-
+function(results)
+{
+    if(!length(results)) return()
+    status <- vapply(results, `[[`, "", "status")
+    ind <- startsWith(names(results), "rdepends_")
+    tab <- table(ifelse(ind, "Reverse depends", "Source packages"),
+                 status, deparse.level = 0L)
+    tab <- tab[match(c("Source packages", "Reverse depends"),
+                     rownames(tab), nomatch = 0L),
+               match(c("FAIL", "ERROR", "WARN", "NOTE", "OK"),
+                     colnames(tab), nomatch = 0L),
+               drop = FALSE]
+    names(dimnames(tab)) <- NULL
+    tab
+}
+
+### ** read_check_log
+
+read_check_log <-
+function(log, drop = TRUE)
+{
+    lines <- readLines(log, warn = FALSE)
+
+    if(drop) {
+        ## Drop CRAN check status footer.
+        ## Ideally, we would have a more general mechanism to detect
+        ## footer information to be skipped (e.g., a line consisting of
+        ## a single non-printing control character?)
+        pos <- grep("^Current CRAN status:", lines,
+                    perl = TRUE, useBytes = TRUE)
+        if(length(pos) && lines[pos <- (pos[1L] - 1L)] == "") {
+            lines <- lines[seq_len(pos - 1L)]
+        }
+    }
+
+    ## <FIXME>
+    ## Remove eventually.
+    len <- length(lines)
+    end <- lines[len]
+    if(grepl(re <- "^(\\*.*\\.\\.\\.)(\\* elapsed time.*)$", end,
+             perl = TRUE, useBytes = TRUE)) {
+        lines <- c(lines[seq_len(len - 1L)],
+                   sub(re, "\\1", end, perl = TRUE, useBytes = TRUE),
+                   sub(re, "\\2", end, perl = TRUE, useBytes = TRUE))
+    }
+    ## </FIXME
+    
+    lines
+}
+
+### ** analyze_check_log
+
+## <FIXME>
+## New-style check logs should have a '* DONE' line followed by a
+## 'Status:' line.  If not, a check failure occurred.
+## Change to fully rely on the new format eventually.
+## </FIXME>
+
 analyze_check_log <-
 function(log, drop_ok = TRUE)
 {
@@ -563,12 +730,26 @@ function(log, drop_ok = TRUE)
         list(Package = package, Version = version,
              Flags = flags, Chunks = chunks)
 
+    ## <FIXME>
+    ## All calls to grep(), grepl() and sub() use arguments
+    ## perl = TRUE and useBytes = TRUE.
+    ## Simplify by using inlined functions pgrep() etc, a la
+    psub <- function(pattern, replacement, x)
+        sub(pattern, replacement, x, perl = TRUE, useBytes = TRUE)
+        ## .Internal(sub(pattern, replacement, x, FALSE, TRUE, FALSE, TRUE))
+    ## </FIXME>
+    
     ## Alternatives for left and right quotes.
     lqa <- "'|\xe2\x80\x98"
     rqa <- "'|\xe2\x80\x99"
     ## Group when used ...
 
-    drop_ok_status_tags <- c("OK", "NONE", "SKIPPED")
+    if(is.character(drop_ok)) {
+        drop_ok_status_tags <- drop_ok
+        drop_ok <- TRUE
+    } else {
+        drop_ok_status_tags <- c("OK", "NONE", "SKIPPED")
+    }
 
     ## Start by reading in.
     lines <- read_check_log(log)
@@ -583,6 +764,8 @@ function(log, drop_ok = TRUE)
         lines <- iconv(lines, enc, "UTF-8", sub = "byte")
         ## If the check log uses ASCII, there should be no non-ASCII
         ## characters in the message lines: could check for this.
+        if(any(bad <- !validEnc(lines)))
+            lines[bad] <- iconv(lines[bad], to = "ASCII", sub = "byte")
     } else return()
 
     ## Get header.
@@ -606,22 +789,55 @@ function(log, drop_ok = TRUE)
     } else return()
 
     ## Get footer.
-    ## Some check systems explicitly record the elapsed time in the
-    ## last line:
     len <- length(lines)
-    if(grepl("^\\* elapsed time ", lines[len],
-             perl = TRUE, useBytes = TRUE)) {
-        lines <- lines[-len]
-        len <- len - 1L
-    }
-    num <- length(grep("^(NOTE|WARNING): There",
-                       lines[c(len - 1L, len)]))
-    if(num > 0L) {
-        pos <- seq.int(len - num + 1L, len)
-        lines <- lines[-pos]
+    pos <- which(lines == "* DONE")
+    if(length(pos) &&
+       ((pos <- pos[length(pos)]) < len) &&
+       startsWith(lines[pos + 1L], "Status: "))
+        lines <- lines[seq_len(pos - 1L)]
+    else {
+        ## Not really new style, or failure ... argh.
+        ## Some check systems explicitly record the elapsed time in the
+        ## last line:
+        if(grepl("^\\* elapsed time ", lines[len],
+                 perl = TRUE, useBytes = TRUE)) {
+            lines <- lines[-len]
+            len <- len - 1L
+            while(grepl("^[[:space:]]*$", lines[len])) {
+                lines <- lines[-len]
+                len <- len - 1L
+            }
+        }
+        ## Summary footers.
+        if(startsWith(lines[len], "Status: ")) {
+            ## New-style status summary.
+            lines <- lines[-len]
+            len <- len - 1L
+        } else {
+            ## Old-style status summary.
+            num <- length(grep("^(NOTE|WARNING): There",
+                               lines[c(len - 1L, len)]))
+            if(num > 0L) {
+                pos <- seq.int(len - num + 1L, len)
+                lines <- lines[-pos]
+                len <- len - num
+            }
+        }
+        if(lines[len] == "* DONE")
+            lines <- lines[-len]
     }
 
     analyze_lines <- function(lines) {
+        ## Windows has
+        ##   * loading checks for arch
+        ##   * checking examples ...
+        ##   * checking tests ...
+        ## headers: drop these (unless in the last line, where they
+        ## indicate failure).
+        re <- "^\\* (loading checks for arch|checking (examples|tests) \\.\\.\\.$)"
+        pos <- grep(re, lines, perl = TRUE, useBytes = TRUE)
+        if(length(pos <- pos[pos < length(lines)]))
+            lines <- lines[-pos]
         ## We might still have
         ##   * package encoding:
         ## entries for packages declaring a package encoding.
@@ -632,11 +848,11 @@ function(log, drop_ok = TRUE)
         ##   ** running examples for arch
         ##   ** running tests for arch
         ## So let's drop everything up to the first such entry.
-        re <- "^\\*\\*? ((checking|creating|running examples for arch|running tests for arch) .*) \\.\\.\\.( (\\[[^ ]*\\]))? (.*)$"
+        re <- "^\\*\\*? ((checking|creating|running examples for arch|running tests for arch) .*) \\.\\.\\.( (\\[[^ ]*\\]))?( (.*)|)$"
         ind <- grepl(re, lines, perl = TRUE, useBytes = TRUE)
         csi <- cumsum(ind)
         ind <- (csi > 0)
-        chunks <- 
+        chunks <-
             lapply(split(lines[ind], csi[ind]),
                    function(s) {
                        ## Note that setting
@@ -644,29 +860,35 @@ function(log, drop_ok = TRUE)
                        ##   _R_CHECK_VIGNETTE_TIMING_=yes
                        ## will result in a different chunk format ...
                        line <- s[1L]
-                       list(check =
-                            sub(re, "\\1", line, perl = TRUE, useBytes = TRUE),
-                            status =
-                            sub(re, "\\5", line, perl = TRUE, useBytes = TRUE),
+                       check <- sub(re, "\\1", line,
+                                    perl = TRUE, useBytes = TRUE)
+                       status <- sub(re, "\\6", line,
+                                     perl = TRUE, useBytes = TRUE)
+                       if(status == "") status <- "FAIL"
+                       list(check = check,
+                            status = status,
                             output = paste(s[-1L], collapse = "\n"))
                    })
 
         status <- vapply(chunks, `[[`, "", "status")
         if(identical(drop_ok, TRUE) ||
-           (is.na(drop_ok) && all(status != "ERROR")))
+           (is.na(drop_ok)
+               && all(is.na(match(c("ERROR", "FAIL"), status)))))
             chunks <- chunks[is.na(match(status, drop_ok_status_tags))]
-        
+
         chunks
     }
 
     chunks <- analyze_lines(lines)
-    if(!length(chunks) && is.na(drop_ok)) {
+    if(!length(chunks) && !identical(drop_ok, FALSE)) {
         chunks <- list(list(check = "*", status = "OK", output = ""))
     }
 
     make_results(package, version, flags, chunks)
 }
 
+### ** check_packages_in_dir_details
+
 check_packages_in_dir_details <-
 function(dir, logs = NULL, drop_ok = TRUE)
 {
@@ -677,12 +899,12 @@ function(dir, logs = NULL, drop_ok = TRUE)
 
     db_from_logs <- function(logs, drop_ok) {
         out <- lapply(logs, analyze_check_log, drop_ok)
-        out <- out[sapply(out, length) > 0L]
+        out <- out[lengths(out) > 0L]
         if(!length(out))
             return(matrix(character(), ncol = 6L))
         chunks <- lapply(out, `[[`, "Chunks")
         package <- sapply(out, `[[`, "Package")
-        lens <- sapply(chunks, length)
+        lens <- lengths(chunks)
         cbind(rep.int(package, lens),
               rep.int(sapply(out, `[[`, "Version"), lens),
               matrix(as.character(unlist(chunks)), ncol = 3L,
@@ -691,22 +913,25 @@ function(dir, logs = NULL, drop_ok = TRUE)
                       lens))
     }
 
-    if(is.null(logs))
+    if(is.null(logs)) {
+        if(inherits(dir, "check_packages_in_dir"))
+            dir <- attr(dir, "dir")
         logs <- Sys.glob(file.path(dir, "*.Rcheck", "00check.log"))
+    }
 
     db <- db_from_logs(logs, drop_ok)
     colnames(db) <- c("Package", "Version", "Check", "Status",
                       "Output", "Flags")
 
     ## Now some cleanups.
-    
+
     ## Alternatives for left and right quotes.
     lqa <- "'|\xe2\x80\x98"
     rqa <- "'|\xe2\x80\x99"
     ## Group when used ...
 
     mysub <- function(p, r, x) sub(p, r, x, perl = TRUE, useBytes = TRUE)
-    
+
     checks <- db[, "Check"]
     checks <- mysub(sprintf("checking whether package (%s).*(%s) can be installed",
                             lqa, rqa),
@@ -723,12 +948,188 @@ function(dir, logs = NULL, drop_ok = TRUE)
     db[, "Check"] <- checks
     ## In fact, for tabulation purposes it would even be more convenient
     ## to shorten the check names ...
-    
+
     db[, "Output"] <- mysub("[[:space:]]+$", "", db[, "Output"])
-    
+
     db <- as.data.frame(db, stringsAsFactors = FALSE)
     db$Check <- as.factor(db$Check)
     db$Status <- as.factor(db$Status)
 
+    class(db) <- c("check_details", "data.frame")
+    db
+}
+
+format.check_details <-
+function(x, ...)
+{
+    flags <- x$Flags
+    flavor <- x$Flavor
+    paste(sprintf("Package: %s %s\n",
+                  x$Package, x$Version),
+          ifelse(nzchar(flavor),
+                 sprintf("Flavor: %s\n", flavor),
+                 ""),
+          ifelse(nzchar(flags),
+                 sprintf("Flags: %s\n", flags),
+                 ""),
+          sprintf("Check: %s, Result: %s\n",
+                  x$Check, x$Status),
+          sprintf("  %s",
+                  gsub("\n", "\n  ", x$Output,
+                       perl = TRUE, useBytes = TRUE)),
+          sep = "")
+}
+
+print.check_details <-
+function(x, ...)
+{
+    writeLines(paste(format(x, ...), collapse = "\n\n"))
+    invisible(x)
+}
+
+### ** check_packages_in_dir_changes
+
+check_packages_in_dir_changes <-
+function(dir, old, outputs = FALSE, sources = FALSE)
+{
+    dir <- if(inherits(dir, "check_packages_in_dir"))
+        dir <- attr(dir, "dir")
+    else
+        normalizePath(dir)
+
+    outdirs <- R_check_outdirs(dir, all = sources, invert = TRUE)
+    logs <- file.path(outdirs, "00check.log")
+    logs <- logs[file_test("-f", logs)]
+    new <- check_packages_in_dir_details(logs = logs, drop_ok = FALSE)
+
+    ## Use
+    ##   old = tools:::CRAN_check_details(FLAVOR)
+    ## to compare against the results/details of a CRAN check flavor.
+
+    if(!inherits(old, "check_details"))
+        old <- check_packages_in_dir_details(old, drop_ok = FALSE)
+
+    check_details_changes(new, old, outputs)
+}
+
+### ** check_details_changes
+
+check_details_changes <-
+function(new, old, outputs = FALSE)
+{
+    check_details_changes_classes <-
+        c("check_details_changes", "data.frame")
+
+    if(!inherits(new, "check_details")) stop("wrong class")
+    if(!inherits(old, "check_details")) stop("wrong class")
+
+    ## Simplify matters by considering only "changes" in *available*
+    ## results/details.
+
+    packages <- intersect(old$Package, new$Package)
+
+    if(!length(packages)) {
+        db <- data.frame(Package = character(),
+                         Check = character(),
+                         Old = character(),
+                         New = character(),
+                         stringsAsFactors = FALSE)
+        class(db) <- check_details_changes_classes
+        return(db)
+    }
+
+    db <- merge(old[!is.na(match(old$Package, packages)), ],
+                new[!is.na(match(new$Package, packages)), ],
+                by = c("Package", "Check"), all = TRUE)
+
+    ## Complete possibly missing version information.
+    chunks <-
+        lapply(split(db, db$Package),
+               function(e) {
+                   len <- nrow(e)
+                   if(length(pos <- which(!is.na(e$Version.x))))
+                       e$Version.x <-
+                           rep.int(e[pos[1L], "Version.x"], len)
+                   if(length(pos <- which(!is.na(e$Version.y))))
+                       e$Version.y <-
+                           rep.int(e[pos[1L], "Version.y"], len)
+                   e
+               })
+    db <- do.call(rbind, chunks)
+
+    ## Drop checks that are OK in both versions
+    x.issue <- !is.na(match(db$Status.x,
+                            c("ERROR","FAIL","NOTE","WARNING")))
+    y.issue <- !is.na(match(db$Status.y,
+                            c("ERROR","FAIL","NOTE","WARNING")))
+    db <- db[x.issue | y.issue,]
+
+    ## Even with the above simplification, missing entries do not
+    ## necessarily indicate "OK" (checks could have been skipped).
+    ## Hence leave as missing and show as empty in the diff.
+    ## An exception to this rule is made if we find an "ERROR" result
+    ## as this may explain skipped checks.
+
+    sx <- as.character(db$Status.x)
+    sy <- as.character(db$Status.y)
+    if(outputs) {
+        ind <- nzchar(ox <- db$Output.x)
+        sx[ind] <- sprintf("%s\n  %s", sx[ind],
+                           gsub("\n", "\n  ", ox[ind], fixed = TRUE))
+        ind <- nzchar(oy <- db$Output.y)
+        sy[ind] <- sprintf("%s\n  %s", sy[ind],
+                           gsub("\n", "\n  ", oy[ind], fixed = TRUE))
+    }
+    sx[is.na(db$Status.x)] <- ""
+    sy[is.na(db$Status.y)] <- ""
+    ind <- if(outputs)
+        (.canonicalize_quotes(sx) != .canonicalize_quotes(sy))
+    else
+        (sx != sy)
+
+    db <- cbind(db[ind, ], Old = sx[ind], New = sy[ind],
+                stringsAsFactors = FALSE)
+
+    ## Add information about possible version changes.
+    ind <- (db$Version.x != db$Version.y)
+    if(any(ind))
+        db$Package[ind] <-
+            sprintf("%s [Old version: %s, New version: %s]",
+                    db$Package[ind],
+                    db$Version.x[ind],
+                    db$Version.y[ind])
+
+    db <- db[c("Package", "Check", "Old", "New")]
+
+    class(db) <- check_details_changes_classes
+
     db
 }
+
+format.check_details_changes <-
+function(x, ...)
+{
+    if(!nrow(x)) return(character())
+    sprintf("Package: %s\nCheck: %s%s%s",
+            x$Package,
+            x$Check,
+            ifelse(nzchar(old <- x$Old),
+                   sprintf("\nOld result: %s", old),
+                   ""),
+            ifelse(nzchar(new <- x$New),
+                   sprintf("\nNew result: %s", new),
+                   ""))
+}
+
+print.check_details_changes <-
+function(x, ...)
+{
+    if(length(y <- format(x)))
+        writeLines(paste(y, collapse = "\n\n"))
+    invisible(x)
+}
+
+### Local variables: ***
+### mode: outline-minor ***
+### outline-regexp: "### [*]+" ***
+### End: ***
diff --git a/src/library/tools/R/citation.R b/src/library/tools/R/citation.R
index 6ab74b3..a253ff3 100644
--- a/src/library/tools/R/citation.R
+++ b/src/library/tools/R/citation.R
@@ -1,7 +1,7 @@
 #  File src/library/tools/R/citation.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
-#  Copyright (C) 1995-2013 The R Core Team
+#  Copyright (C) 1995-2014 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
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 ## Tools for computing on CITATION info.
 
@@ -49,6 +49,21 @@ function(cfile, encoding = NULL)
     }
 }
 
+.parse_CITATION_file_in_package <-
+function(cfile, installed = FALSE)    
+{
+    cfile <- file_path_as_absolute(cfile)
+    dfile <- file.path(if(installed)
+                           dirname(cfile)
+                       else
+                           dirname(dirname(cfile)),
+                       "DESCRIPTION")
+    meta <- .read_description(dfile)
+    if(is.na(encoding <- meta["Encoding"]))
+        encoding <- NULL
+    .parse_CITATION_file(cfile, encoding)
+}
+    
 BibTeX_entry_field_db <-
     list(Article = c("author", "title", "journal", "year"),
          Book = c("author|editor", "title", "publisher", "year"),
diff --git a/src/library/tools/R/doitools.R b/src/library/tools/R/doitools.R
new file mode 100644
index 0000000..67d60c4
--- /dev/null
+++ b/src/library/tools/R/doitools.R
@@ -0,0 +1,256 @@
+##  File src/library/tools/R/doitools.R
+##  Part of the R package, https://www.R-project.org
+##
+##  Copyright (C) 2015-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
+##  the Free Software Foundation; either version 2 of the License, or
+##  (at your option) any later version.
+##
+##  This program is distributed in the hope that it will be useful,
+##  but WITHOUT ANY WARRANTY; without even the implied warranty of
+##  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+##  GNU General Public License for more details.
+##
+##  A copy of the GNU General Public License is available at
+##  https://www.R-project.org/Licenses/
+
+doi_db <-
+function(dois, parents)
+{
+    db <- data.frame(DOI = trimws(as.character(dois)),
+                     Parent = as.character(parents),
+                     stringsAsFactors = FALSE)
+    class(db) <- c("doi_db", "data.frame")
+    db
+}
+
+doi_db_from_package_metadata <- 
+function(meta)
+{
+    dois <- character()
+    pattern <- "<(DOI|doi):([^>]*)>"
+    if(!is.na(v <- meta["Description"])) {
+        m <- gregexpr(pattern, v)
+        dois <- c(dois, .gregexec_at_pos(pattern, v, m, 3L))
+    }
+    doi_db(dois, rep.int("DESCRIPTION", length(dois)))
+}
+
+doi_db_from_package_citation <-
+function(dir, meta, installed = FALSE)
+{
+    dois <- character()
+    path <- if(installed) "CITATION" else file.path("inst", "CITATION")
+    cfile <- file.path(dir, path)
+    if(file.exists(cfile)) {
+        cinfo <- .read_citation_quietly(cfile, meta)
+        if(!inherits(cinfo, "error"))
+            dois <- trimws(unique(unlist(cinfo$doi, use.names = FALSE)))
+    }
+    doi_db(dois, rep.int(path, length(dois)))
+}
+
+## \doi a user-defined macro (from system.Rd) which gets expanded by 
+## parse_Rd().  To extract programmatically, we try to find the user
+## macros with the (current) expansion.
+## Alternative, we could call .build_Rd_db() on the package Rd sources
+## with e.g. macros = c("\\newcommand{\\doi}{<DOI:#1>}" and look for
+## TEXT nodes matching the expansion.  However, we cannot necessarily
+## safely process build-time Sexprs ...
+
+doi_db_from_package_Rd_db <-
+function(db)
+{
+    dois <- Filter(length, lapply(db, .get_dois_from_Rd))
+    doi_db(unlist(.canonicalize_doi(dois), use.names = FALSE),
+           rep.int(file.path("man", names(dois)),
+                   lengths(dois)))
+}
+
+.get_dois_from_Rd <-
+function(x)
+{
+    dois <- character()
+    recurse <- function(e) {
+        if(identical(attr(e, "Rd_tag"), "USERMACRO") &&
+           identical(attr(e, "macro"), "\\doi"))
+            dois <<- c(dois, e[2L])
+        else if(is.list(e))
+            lapply(e, recurse)
+    }
+    if(getDynamicFlags(x)["\\Sexpr"])
+        lapply(x, recurse)
+    dois
+}
+
+doi_db_from_package_sources <-
+function(dir, add = FALSE, Rd = FALSE)
+{
+    meta <- .read_description(file.path(dir, "DESCRIPTION"))
+    db <- rbind(doi_db_from_package_metadata(meta),
+                doi_db_from_package_citation(dir, meta),
+                if(Rd) {
+                    rddb <- Rd_db(dir = dir)
+                    doi_db_from_package_Rd_db(rddb)
+                })
+    if(add)
+        db$Parent <- file.path(basename(dir), db$Parent)
+    db
+}
+
+doi_db_from_installed_packages <-
+function(packages, lib.loc = NULL, verbose = FALSE, Rd = FALSE)
+{
+    if(!length(packages)) return()
+    one <- function(p) {
+        if(verbose)
+            message(sprintf("processing %s", p))
+        dir <- system.file(package = p, lib.loc = lib.loc)
+        if(dir == "") return()
+        meta <- .read_description(file.path(dir, "DESCRIPTION"))
+        db <- rbind(doi_db_from_package_metadata(meta),
+                    doi_db_from_package_citation(dir, meta,
+                                                 installed = TRUE),
+                    if(Rd) {
+                        rddb <- Rd_db(p, lib.loc = dirname(dir))
+                        doi_db_from_package_Rd_db(rddb)
+                    })
+        db$Parent <- file.path(p, db$Parent)
+        db
+    }
+    do.call(rbind,
+            c(lapply(packages, one),
+              list(make.row.names = FALSE)))
+}
+
+check_doi_db <-
+function(db, verbose = FALSE)
+{
+    use_curl <-
+        config_val_to_logical(Sys.getenv("_R_CHECK_URLS_USE_CURL_",
+                                         "TRUE")) &&
+        requireNamespace("curl", quietly = TRUE)
+    
+    .gather <- function(d = character(),
+                        p = list(),
+                        s = rep.int("", length(d)),
+                        m = rep.int("", length(d))) {
+        y <- data.frame(DOI = d, From = I(p), Status = s, Message = m,
+                        stringsAsFactors = FALSE)
+        y$From <- p
+        class(y) <- c("check_doi_db", "data.frame")
+        y
+    }
+
+    .fetch <- function(u, d) {
+        if(verbose) message(sprintf("processing %s", d))
+        tryCatch(curlGetHeaders(u), error = identity)
+    }
+
+    .check <- function(d) {
+        u <- paste0("http://doi.org/", d)
+        ## Do we need to percent encode parts of the DOI name?
+        h <- .fetch(u, d)
+        if(inherits(h, "error")) {
+            s <- "-1"
+            msg <- sub("[[:space:]]*$", "", conditionMessage(h))
+        } else {
+            s <- as.character(attr(h, "status"))
+            msg <- table_of_HTTP_status_codes[s]
+        }
+
+        ## Similar to URLs, see e.g.
+        ##   curl -I -L http://doi.org/10.1016/j.csda.2009.12.005
+        ## (As of 2016-12, this actually gives 400 Bad Request.)
+        if(any(grepl("301 Moved Permanently", h, useBytes = TRUE))) {
+            ind <- grep("^[Ll]ocation: ", h, useBytes = TRUE)
+            new <- sub("^[Ll]ocation: ([^\r]*)\r\n", "\\1", h[max(ind)])
+            if((s == "503") && grepl("www.sciencedirect.com", new))
+                s <- "405"
+        }
+
+        if((s != "200") && use_curl) {
+            g <- .curl_GET_status(u)
+            if(g == "200") {
+                s <- g
+                msg <- "OK"
+            }
+        }
+
+        c(s, msg)
+    }
+
+    bad <- .gather()
+
+    if(!NROW(db)) return(bad)
+
+    if(inherits(db, "check_doi_db")) {
+        ## Allow re-checking check results.
+        parents <- db$From
+        dois <- db$DOI
+    } else {
+        parents <- split(db$Parent, db$DOI)
+        dois <- names(parents)
+    }
+
+    ## See <https://www.doi.org/doi_handbook/2_Numbering.html#2.2>:
+    ##   The DOI prefix shall be composed of a directory indicator
+    ##   followed by a registrant code. These two components shall be
+    ##   separated by a full stop (period).
+    ##   The directory indicator shall be "10".
+    ind <- !startsWith(dois, "10")
+    if(any(ind)) {
+        len <- sum(ind)
+        bad <- rbind(bad,
+                     .gather(dois[ind],
+                             parents[ind],
+                             m = rep.int("Invalid DOI", len)))
+    }
+
+    pos <- which(!ind)
+    if(length(pos)) {
+        results <- do.call(rbind, lapply(dois[pos], .check))
+        status <- as.numeric(results[, 1L])
+        ind <- (status %notin% c(200L, 405L))
+        if(any(ind)) {
+            pos <- pos[ind]
+            s <- as.character(status[ind])
+            s[s == "-1"] <- "Error"
+            m <- results[ind, 2L]
+            m[is.na(m)] <- ""
+            bad <- rbind(bad,
+                         .gather(dois[pos],
+                                 parents[pos],
+                                 m,
+                                 s))
+        }
+    }
+
+    bad
+}
+
+format.check_doi_db <-
+function(x, ...)
+{
+    if(!NROW(x)) return(character())
+
+    paste0(sprintf("DOI: %s", x$DOI),
+           sprintf("\nFrom: %s",
+                   sapply(x$From, paste, collapse = "\n      ")),
+           ifelse((s <- x$Status) == "",
+                  "",
+                  sprintf("\nStatus: %s", s)),
+           ifelse((m <- x$Message) == "",
+                  "",
+                  sprintf("\nMessage: %s", m)))
+}
+
+print.check_doi_db <-
+function(x, ...)
+{
+    if(NROW(x))
+        writeLines(paste(format(x), collapse = "\n\n"))
+    invisible(x)
+}
diff --git a/src/library/tools/R/dynamicHelp.R b/src/library/tools/R/dynamicHelp.R
index c2c1b2b..ffaca07 100644
--- a/src/library/tools/R/dynamicHelp.R
+++ b/src/library/tools/R/dynamicHelp.R
@@ -1,7 +1,7 @@
 #  File src/library/tools/R/dynamicHelp.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
-#  Copyright (C) 1995-2014 The R Core Team
+#  Copyright (C) 1995-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
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 
 ## This may be asked for
@@ -30,7 +30,7 @@ httpd <- function(path, query, ...)
     .HTMLdirListing <- function(dir, base, up)
     {
         files <- list.files(dir)    # note, no hidden files are listed
-        out <- HTMLheader(paste0("Listing of directory<br>", dir),
+        out <- HTMLheader(paste0("Listing of directory<br/>", dir),
         		  headerTitle = paste("R:", dir), logo=FALSE,
         		  up = up)
         if(!length(files))
@@ -41,7 +41,7 @@ httpd <- function(path, query, ...)
                      paste0("<dd>", mono(iconv(urls, "", "UTF-8")), "</dd>"),
                      "</dl>")
         }
-        out <- c(out, "<hr>\n</body></html>")
+        out <- c(out, "<hr/>\n</body></html>")
         list(payload = paste(out, collapse="\n"))
     }
 
@@ -56,51 +56,66 @@ httpd <- function(path, query, ...)
          	out <- c(out, paste0('<h2>Manuals in package', sQuote(pkg),'</h2>'),
          		 makeVignetteTable(cbind(Package=pkg, vinfo[,c("File", "Title", "PDF", "R"), drop = FALSE])))
      	}
-        out <- c(out, "<hr>\n</body></html>")
+        out <- c(out, "<hr/>\n</body></html>")
         list(payload = paste(out, collapse="\n"))
     }
 
     .HTMLsearch <- function(query)
     {
     	bool <- function(x) as.logical(as.numeric(x))
-        res <- if(identical(names(query), "category"))
-            help.search(keyword = query, verbose = 1L, use_UTF8 = TRUE)
-        else {
-            fields = c("alias", "concept", "title")
+        res <- if(identical(names(query), "category")) {
+            utils::help.search(keyword = query, verbose = 1L, use_UTF8 = TRUE)
+        } else if(identical(names(query), "results")) {
+            utils:::.hsearch_results()
+        } else {
+            fields <- types <- NULL
             args <- list(pattern = ".")
             for (i in seq_along(query))
             	switch(names(query)[i],
-            		pattern = args$pattern <- query[i],
-            		title = if (!bool(query[i])) fields <- setdiff(fields, "title"),
-            		keyword = if (bool(query[i])) fields <- union(fields, "keyword"),
-            		alias = if (!bool(query[i])) fields <- setdiff(fields, "alias"),
-            		concept = if (!bool(query[i])) fields <- setdiff(fields, "concept"),
-            		name = if (bool(query[i])) fields <- union(fields, "name"),
-            		agrep = {
-            		    args$agrep <- as.logical(query[i])
-            		    if (is.na(args$agrep))
-            		    	args$agrep <- as.numeric(query[i])
-            		    if (is.na(args$agrep))
-            		     	args$agrep <- query[i]
-            		},
-            		ignore.case = args$ignore.case <- bool(query[i]),
-            		types = args$types <- strsplit(query[i], ";")[[1L]],
-            		package = args$package <- strsplit(query[i], ";")[[1L]],
-            		lib.loc = args$lib.loc <- strsplit(query[i], ";")[[1L]],
-            		warning("Unrecognized search field: ", names(query)[i],
-                                domain = NA)
+                       pattern = args$pattern <- query[i],
+                       fields.alias =
+                           if(bool(query[i]))
+                               fields <- c(fields, "alias"),
+                       fields.title =
+                           if(bool(query[i]))
+                               fields <- c(fields, "title"),
+                       fields.concept =
+                           if(bool(query[i]))
+                               fields <- c(fields, "concept"),
+                       fields.keyword =
+                           if(bool(query[i]))
+                               fields <- c(fields, "keyword"),
+                       ignore.case =
+                           args$ignore.case <- bool(query[i]),
+                       agrep =
+                           args$agrep <- bool(query[i]),
+                       types.help =
+                           if(bool(query[i]))
+                               types <- c(types, "help"),
+                       types.vignette =
+                           if(bool(query[i]))
+                               types <- c(types, "vignette"),
+                       types.demo =
+                           if(bool(query[i]))
+                               types <- c(types, "demo"),
+                       ## Possibly passed from utils:::printhsearchInternal().
+                       package = args$package <- strsplit(query[i], ";")[[1L]],
+                       lib.loc = args$lib.loc <- strsplit(query[i], ";")[[1L]],
+                       warning("Unrecognized search field: ", names(query)[i],
+                               domain = NA)
                        )
             args$fields <- fields
             args$use_UTF8 <- TRUE
-            do.call(help.search, args)
+            args$types <- types
+            do.call(utils::help.search, args)
         }
         types <- res$types
         res <- res$matches
         title <- "Search Results"
         out <- c(HTMLheader(title),
-                 if ("pattern" %in% names(query))
+                 if ("pattern" %in% names(query) && nchar(query["pattern"]))
                      paste0('The search string was <b>"', query["pattern"], '"</b>'),
-                 '<hr>\n')
+                 '<hr/>\n')
 
         if(!NROW(res))
             out <- c(out, gettext("No results found"))
@@ -108,16 +123,17 @@ httpd <- function(path, query, ...)
             vigfile0 <- ""
             vigDB <- NULL
             for (type in types) {
-		if(NROW(temp <- res[res[,"Type"] == type,,drop=FALSE]) > 0)
+		if(NROW(temp <- res[res[,"Type"] == type, , drop=FALSE]) > 0) {
+                    temp <- temp[!duplicated(temp[, "ID"]), , drop = FALSE]
 		    switch(type,
 		    vignette = {
 			out <- c(out, paste0("<h3>", gettext("Vignettes:"), "</h3>"), "<dl>")
 			n <- NROW(temp)
-			vignettes <- matrix("", n, 5)
-			colnames(vignettes) <- c("Package", "File",
-			                         "Title", "PDF","R")
+			vignettes <- matrix("", n, 5L)
+			colnames(vignettes) <-
+                            c("Package", "File", "Title", "PDF", "R")
 			for (i in seq_len(NROW(temp))) {
-			    topic <- temp[i, "topic"]
+			    topic <- temp[i, "Topic"]
 			    pkg <- temp[i, "Package"]
 			    vigfile <- file.path(temp[i, "LibPath"], "Meta", "vignette.rds")
 			    if (!identical(vigfile, vigfile0)) {
@@ -139,12 +155,64 @@ httpd <- function(path, query, ...)
 			out <- c(out, paste0("<h3>", gettext("Help pages:"), "</h3>"))
 			out <- c(out, makeHelpTable(temp))
 		    })
+                }
 	    }
         }
-        out <- c(out, "<hr>\n</body></html>")
+        out <- c(out, "<hr/>\n</body></html>")
         list(payload = paste(out, collapse="\n"))
     }
 
+    .HTML_hsearch_db_concepts <- function() {
+        concepts <- utils::hsearch_db_concepts()
+        s <- concepts$Concept
+        out <-
+            c(HTMLheader("Help search concepts"),
+              c("",
+                "<table>",
+                "<tr><th style=\"text-align: left\">Concept</th><th>Frequency</th><th>Packages</th><tr>",
+                paste0("<tr><td>",
+                       "<a href=\"/doc/html/Search?pattern=",
+                       vapply(reQuote(s), utils::URLencode, "", reserved = TRUE),
+                       "&fields.concept=1&agrep=0\">",
+                       shtmlify(substring(s, 1, 80)),
+                       "</a>",
+                       "</td><td style=\"text-align: right\">",
+                       concepts$Frequency,
+                       "</td><td style=\"text-align: right\">",
+                       concepts$Packages,
+                       "</td></tr>"),
+                "</table>",
+                "</body>",
+                "</html>"))
+        list(payload = paste(out, collapse = "\n"))
+    }
+
+    .HTML_hsearch_db_keywords <- function() {
+        keywords <- utils::hsearch_db_keywords()
+        out <-
+            c(HTMLheader("Help search keywords"),
+              c("",
+                "<table>",
+                "<tr><th style=\"text-align: left\">Keyword</th><th style=\"text-align: left\">Concept</th><th>Frequency</th><th>Packages</th><tr>",
+                paste0("<tr><td>",
+                       "<a href=\"/doc/html/Search?category=",
+                       keywords$Keyword,
+                       "\">",
+                       keywords$Keyword,
+                       "</a>",
+                       "</td><td>",
+                       shtmlify(substring(keywords$Concept, 1, 80)),
+                       "</td><td style=\"text-align: right\">",
+                       keywords$Frequency,
+                       "</td><td style=\"text-align: right\">",
+                       keywords$Packages,
+                       "</td></tr>"),
+                "</table>",
+                "</body>",
+                "</html>"))
+        list(payload = paste(out, collapse = "\n"))
+    }
+
     unfix <- function(file)
     {
         ## we need to re-fix links altered by fixup.package.URLs
@@ -153,9 +221,9 @@ httpd <- function(path, query, ...)
         if(file.exists(fixedfile)) {
             top <- readLines(fixedfile)
             lines <- readLines(file)
-            lines <- gsub(paste(top, "library", sep="/"),
+            lines <- gsub(paste0(top, "/library"),
                           "../../", lines, fixed = TRUE)
-            lines <- gsub(paste(top, "doc/", sep = "/"),
+            lines <- gsub(paste0(top, "/doc/"),
                           "../../../doc/", lines, fixed = TRUE)
             return(list(payload=paste(lines, collapse="\n")))
         }
@@ -182,7 +250,8 @@ httpd <- function(path, query, ...)
     }
 
     charsetSetting <- function(pkg) {
-    	encoding <-read.dcf(system.file("DESCRIPTION", package=pkg), "Encoding")
+    	encoding <- read.dcf(system.file("DESCRIPTION", package=pkg),
+                             "Encoding")
 	if (is.na(encoding))
 	    ""
         else
@@ -214,6 +283,11 @@ httpd <- function(path, query, ...)
                                 "and", mono("/library"), "are allowed")))
     else if(path == "/doc/html/UserManuals.html")
     	return(.HTMLusermanuals())
+    else if(path == "/doc/html/hsearch_db_concepts.html")
+        return(.HTML_hsearch_db_concepts())
+    else if(path == "/doc/html/hsearch_db_keywords.html")
+        return(.HTML_hsearch_db_keywords())
+
 
     ## ----------------------- per-package documentation ---------------------
     ## seems we got ../..//<pkg> in the past
@@ -235,9 +309,9 @@ httpd <- function(path, query, ...)
     	topic <- sub(topicRegexp, "\\2", path)
         ## if a package is specified, look there first, then everywhere
     	if (!is.null(pkg)) # () avoids deparse here
-    	    file <- help(topic, package = (pkg), help_type = "text")
+    	    file <- utils::help(topic, package = (pkg), help_type = "text")
     	if (!length(file))
-            file <- help(topic, help_type = "text", try.all.packages = TRUE)
+            file <- utils::help(topic, help_type = "text", try.all.packages = TRUE)
 	if (!length(file)) {
             msg <- gettextf("No help found for topic %s in any package.",
                             mono(topic))
@@ -289,7 +363,7 @@ httpd <- function(path, query, ...)
     } else if (grepl(fileRegexp, path)) {
         ## ----------------------- package help by file ---------------------
     	pkg <- sub(fileRegexp, "\\1", path)
-    	h0 <- helpdoc <- sub(fileRegexp, "\\2", path)
+    	helpdoc <- sub(fileRegexp, "\\2", path)
         if (helpdoc == "00Index") {
             ## ------------------- package listing ---------------------
             file <- system.file("html", "00Index.html", package = pkg)
@@ -321,20 +395,20 @@ httpd <- function(path, query, ...)
         if(! helpdoc %in% files) {
             ## or call help()
             aliases <- contents$Aliases
-            lens <- sapply(aliases, length)
+            lens <- lengths(aliases)
             aliases <- structure(rep.int(contents$File, lens),
                                  names = unlist(aliases))
             tmp <- sub("\\.[Rr]d$", "", aliases[helpdoc])
             if(is.na(tmp)) {
                 msg <- gettextf("Link %s in package %s could not be located",
                                 mono(helpdoc), mono(pkg))
-                files <- help(helpdoc, help_type = "text",
-                              try.all.packages = TRUE)
+                files <- utils::help(helpdoc, help_type = "text",
+                                     try.all.packages = TRUE)
                 if (length(files)) {
                     path <- dirname(dirname(files))
                     files <- paste0('/library/', basename(path), '/html/',
                                     basename(files), '.html')
-                    msg <- c(msg, "<br>",
+                    msg <- c(msg, "<br/>",
                              "However, you might be looking for one of",
                              "<p></p>",
                              paste0('<p><a href="', files, '">',
@@ -348,8 +422,8 @@ httpd <- function(path, query, ...)
 
         ## Now we know which document we want in which package
 	dirpath <- dirname(path)
-	pkgname <- basename(dirpath)
-	RdDB <- file.path(path, pkgname)
+##	pkgname <- basename(dirpath)
+##	RdDB <- file.path(path, pkgname)
         outfile <- tempfile("Rhttpd")
         Rd2HTML(utils:::.getHelpFile(file.path(path, helpdoc)),
                 out = outfile, package = dirpath,
@@ -366,14 +440,20 @@ httpd <- function(path, query, ...)
             return(error_page(gettextf("No docs found for package %s",
                                        mono(pkg))))
         if(nzchar(rest) && rest != "/") {
-            ## FIXME should we check existence here?
             file <- paste0(docdir, rest)
-            if(isTRUE(file.info(file)$isdir))
+            exists <- file.exists(file)
+            if (!exists && rest == "/index.html") {
+                rest <- ""
+            	file <- docdir
+            }
+            if(dir.exists(file))
                 return(.HTMLdirListing(file,
                                        paste0("/library/", pkg, "/doc", rest),
                                        up))
-            else
+            else if (exists)
                 return(list(file = file, "content-type" = mime_type(rest)))
+            else
+            	return(error_page(gettextf("URL %s was not found", mono(path))))
         } else {
             ## request to list <pkg>/doc
             return(.HTMLdirListing(docdir,
@@ -383,9 +463,9 @@ httpd <- function(path, query, ...)
     } else if (grepl(demoRegexp, path)) {
     	pkg <- sub(demoRegexp, "\\1", path)
 
-    	url <- paste0("http://127.0.0.1:", httpdPort,
+    	url <- paste0("http://127.0.0.1:", httpdPort(),
                       "/doc/html/Search?package=",
-                      pkg, "&agrep=FALSE&types=demo")
+                      pkg, "&agrep=0&types.demo=1&pattern=")
     	return(list(payload = paste0('Redirect to <a href="', url,
     				'">help.search()</a>'),
 		    		"content-type" = 'text/html',
@@ -408,7 +488,16 @@ httpd <- function(path, query, ...)
 				")' in the console.")) )
     } else if (grepl(newsRegexp, path)) {
     	pkg <- sub(newsRegexp, "\\1", path)
-    	formatted <- toHTML(news(package = pkg),
+    	if (!is.null(query) && !is.na(subset <- query["subset"])) {
+    	    # See utils:::print.news_db for the encoding of the subset
+    	    rle <- strsplit(subset, "_")[[1]]
+    	    rle <- structure(list(lengths = as.numeric(rle),
+    	    	                  values = rep(c(TRUE, FALSE), length.out = length(rle))),
+    	    	             class = "rle")
+    	    news <- news(inverse.rle(rle)[-1], package = pkg)
+	} else
+    	    news <- news(package = pkg)
+    	formatted <- toHTML(news,
     		            title=paste("NEWS in package", sQuote(pkg)),
     			    up="html/00Index.html")
         if (length(formatted))
@@ -429,7 +518,7 @@ httpd <- function(path, query, ...)
     	pkg <- sub(cssRegexp, "\\1", path)
         return( list(file = system.file("html", "R.css", package = pkg),
                      "content-type" = "text/css") )
-    } else if (grepl("^/library/", path)) {
+    } else if (startsWith(path, "/library/")) {
         descRegexp <- "^/library/+([^/]+)/+DESCRIPTION$"
         if(grepl(descRegexp, path)) {
             pkg <- sub(descRegexp, "\\1", path)
@@ -450,12 +539,43 @@ httpd <- function(path, query, ...)
         ## remake as needed
         utils::make.packages.html(temp = TRUE)
         list(file = file.path(tempdir(), ".R", path))
+    } else if(path == "/doc/html/rw-FAQ.html") {
+        file <- file.path(R.home("doc"), sub("^/doc", "", path))
+        if(file.exists(file))
+            list(file = file, "content-type" = mime_type(path))
+        else {
+            url <- "https://cran.r-project.org/bin/windows/base/rw-FAQ.html"
+	    return(list(payload = paste0('Redirect to <a href="', url, '">"',
+                                         url, '"</a>'),
+	    		"content-type" = 'text/html',
+	    		header = paste0('Location: ', url),
+	    		"status code" = 302L)) # temporary redirect
+         }
     } else if(grepl("doc/html/.*html$" , path) &&
               file.exists(tmp <- file.path(tempdir(), ".R", path))) {
         ## use updated version, e.g. of packages.html
         list(file = tmp)
+    } else if(grepl("doc/manual/.*html$" , path)) {
+        file <- file.path(R.home("doc"), sub("^/doc", "", path))
+        if(file.exists(file))
+            list(file = file, "content-type" = mime_type(path))
+        else if(file.exists(file <- sub("/manual/", "/html/", file))) {
+            ## tarball has pre-built version of R-admin.html
+            list(file = file, "content-type" = mime_type(path))
+        } else {
+            ## url <- "https://cran.r-project.org/manuals.html"
+            version <-
+                if(grepl("unstable", R.version$status)) "r-devel" else "r-patched"
+            url <- file.path("https://cran.r-project.org/doc/manuals",
+                             version, basename(path))
+	    return(list(payload = paste0('Redirect to <a href="', url, '">"',
+                                         url, '"</a>'),
+	    		"content-type" = 'text/html',
+	    		header = paste0('Location: ', url),
+	    		"status code" = 302L)) # temporary redirect
+        }
     } else {
-        if(grepl("^/doc/", path)) {
+        if(startsWith(path, "/doc/")) {
             ## /doc/AUTHORS and so on.
             file <- file.path(R.home("doc"), sub("^/doc", "", path))
         } else return(error_page(gettextf("unsupported URL %s", mono(path))))
@@ -467,28 +587,37 @@ httpd <- function(path, query, ...)
 }
 
 ## 0 = untried, < 0 = failed to start,  > 0 = actual port
-httpdPort <- 0L
+httpdPort <- local({
+    port <- 0L
+    function(new) {
+        if(!missing(new))
+            port <<- new
+        else
+            port
+    }
+})
 
-startDynamicHelp <- function(start=TRUE)
+startDynamicHelp <- function(start = TRUE)
 {
-    env <- environment(startDynamicHelp)
     if(nzchar(Sys.getenv("R_DISABLE_HTTPD"))) {
-        unlockBinding("httpdPort", env)
-        httpdPort <<- -1L
-        lockBinding("httpdPort", env)
+        httpdPort(-1L)
         warning("httpd server disabled by R_DISABLE_HTTPD", immediate. = TRUE)
         utils::flush.console()
-        return(httpdPort)
+        return(invisible(httpdPort()))
+    }
+
+    port <- httpdPort()
+    if (is.na(start)) {
+        if(port <= 0L) return(startDynamicHelp(TRUE))
+        return(invisible(port))
     }
-    if (start && httpdPort) {
-        if(httpdPort > 0) stop("server already running")
+    if (start && port) {
+        if(port > 0L) stop("server already running")
         else stop("server could not be started on an earlier attempt")
     }
-    if(!start && httpdPort <= 0L)
+    if(!start && (port <= 0L))
         stop("no running server to stop")
-    unlockBinding("httpdPort", env)
     if (start) {
-        message("starting httpd help server ...", appendLF = FALSE)
         utils::flush.console()
         OK <- FALSE
         ports <- getOption("help.ports")
@@ -501,13 +630,16 @@ startDynamicHelp <- function(start=TRUE)
             ports <- 10000 + 22000*((stats::runif(10) + unclass(Sys.time())/300) %% 1)
         }
         ports <- as.integer(ports)
+	if (all(ports == 0))
+	    return(invisible(0))
+        message("starting httpd help server ...", appendLF = FALSE)
         for(i in seq_along(ports)) {
             ## the next can throw an R-level error,
             ## so do not assign port unless it succeeds.
-	    status <- .Call(startHTTPD, "127.0.0.1", ports[i])
+	    status <- .Call(C_startHTTPD, "127.0.0.1", ports[i])
 	    if (status == 0L) {
                 OK <- TRUE
-                httpdPort <<- ports[i]
+                httpdPort(ports[i])
                 break
             }
             if (status != -2L) break
@@ -520,16 +652,20 @@ startDynamicHelp <- function(start=TRUE)
         } else {
             warning("failed to start the httpd server", immediate. = TRUE)
             utils::flush.console()
-            httpdPort <<- -1L
+            httpdPort(-1L)
         }
     } else {
         ## Not really tested
-        .Call(stopHTTPD)
-    	httpdPort <<- 0L
+        .Call(C_stopHTTPD)
+    	httpdPort(0L)
     }
-    lockBinding("httpdPort", env)
-    invisible(httpdPort)
+    invisible(httpdPort())
 }
 
+dynamicHelpURL <-
+function(path, port = httpdPort())
+    paste0("http://127.0.0.1:", port, path)
+
 ## environment holding potential custom httpd handlers
 .httpd.handlers.env <- new.env()
+
diff --git a/src/library/tools/R/encodings.R b/src/library/tools/R/encodings.R
index ae510c9..4fa9171 100644
--- a/src/library/tools/R/encodings.R
+++ b/src/library/tools/R/encodings.R
@@ -1,5 +1,5 @@
 #  File src/library/tools/R/encodings.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
 #  Copyright (C) 1995-2012 The R Core Team
 #
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 get_IANA_character_sets <-
 function(file = NULL)
diff --git a/src/library/tools/R/index.R b/src/library/tools/R/index.R
index ff9be62..b090255 100644
--- a/src/library/tools/R/index.R
+++ b/src/library/tools/R/index.R
@@ -1,7 +1,7 @@
 #  File src/library/tools/R/index.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
-#  Copyright (C) 1995-2012 The R Core Team
+#  Copyright (C) 1995-2015 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
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 ### Miscellaneous indexing functions.
 
@@ -44,7 +44,7 @@ function(dataDir, contents)
     ##                                     "docs")).
     ## </NOTE>
 
-    if(!file_test("-d", dataDir))
+    if(!dir.exists(dataDir))
         stop(gettextf("directory '%s' does not exist", dataDir),
              domain = NA)
     ## dataFiles <- list_files_with_type(dataDir, "data")
@@ -57,11 +57,12 @@ function(dataDir, contents)
     if(!length(datasets)) return(matrix("", 0L, 2L))
     names(datasets) <- sub("/[^/]*$", "", names(datasets))
     datasets <- sort(datasets)
-    dataIndex <- cbind(datasets, "")
+    dataIndex <- cbind(datasets, "", deparse.level = 0L)
+    dimnames(dataIndex) <- NULL
     ## Note that NROW(contents) might be 0.
     if(length(datasets) && NROW(contents)) {
         aliasIndices <-
-            rep(1 : NROW(contents), sapply(contents$Aliases, length))
+            rep(1 : NROW(contents), lengths(contents$Aliases))
         idx <- match(datasets, unlist(contents$Aliases), 0L)
         dataIndex[which(idx != 0L), 2L] <-
             contents[aliasIndices[idx], "Title"]
@@ -70,7 +71,6 @@ function(dataDir, contents)
         dataIndex[, 1L] <-
             as.vector(ifelse(datasets == names(datasets), datasets,
                              paste0(datasets, " (", names(datasets), ")")))
-    dimnames(dataIndex) <- NULL
     dataIndex
 }
 
@@ -91,7 +91,7 @@ function(demoDir)
     ## docs are in sync.
     ## </NOTE>
 
-    if(!file_test("-d", demoDir))
+    if(!dir.exists(demoDir))
         stop(gettextf("directory '%s' does not exist", demoDir),
              domain = NA)
     demoFiles <- list_files_with_type(demoDir, "demo")
@@ -118,7 +118,7 @@ function(demoDir)
 .check_demo_index <-
 function(demoDir)
 {
-    if(!file_test("-d", demoDir))
+    if(!dir.exists(demoDir))
         stop(gettextf("directory '%s' does not exist", demoDir),
              domain = NA)
     info_from_build <- .build_demo_index(demoDir)
@@ -144,13 +144,13 @@ function(demoDir)
 print.check_demo_index <-
 function(x, ...)
 {
-    if(length(x$missing_from_index)) {
-        writeLines("Demos with missing or empty index information:")
-        print(x$missing_from_index, ...)
+    if(length(bad <- x$missing_from_index)) {
+        writeLines(c("Demos with missing or empty index information:",
+                     paste0("  ", bad)))
     }
-    if(length(x$missing_from_demos)) {
-        writeLines("Demo index entries without corresponding demo:")
-        print(x$missing_from_demos, ...)
+    if(length(bad <- x$missing_from_demos)) {
+        writeLines(c("Demo index entries without corresponding demo:",
+                     paste0("  ", bad)))
     }
     invisible(x)
 }
@@ -209,38 +209,40 @@ function(contents, packageName, defaultEncoding = NULL)
         ## without aliases are useless ...)
         if(length(tmp <- unlist(aliases)))
             dbAliases <-
-                cbind(tmp, rep.int(IDs, sapply(aliases, length)),
+                cbind(tmp, rep.int(IDs, lengths(aliases)),
                       packageName)
         ## And similarly if there are no keywords at all.
         if(length(tmp <- unlist(keywords)))
             dbKeywords <-
-                cbind(tmp, rep.int(IDs, sapply(keywords, length)),
+                cbind(tmp, rep.int(IDs, lengths(keywords)),
                       packageName)
         ## Finally, concepts are a feature added in R 1.8 ...
         if("Concepts" %in% colnames(contents)) {
             concepts <- contents[, "Concepts"]
             if(length(tmp <- unlist(concepts)))
                 dbConcepts <-
-                    cbind(tmp, rep.int(IDs, sapply(concepts, length)),
+                    cbind(tmp, rep.int(IDs, lengths(concepts)),
                           packageName)
         }
     }
     else
         dbBase <- matrix(character(), ncol = 7L)
 
-    colnames(dbBase) <-
-        c("Package", "LibPath", "ID", "name", "title", "topic",
-          "Encoding")
-    colnames(dbAliases) <-
-        c("Aliases", "ID", "Package")
-    colnames(dbKeywords) <-
-        c("Keywords", "ID", "Package")
-    colnames(dbConcepts) <-
-        c("Concepts", "ID", "Package")
+    colnames(dbBase) <- hsearch_index_colnames$Base
+    colnames(dbAliases) <- hsearch_index_colnames$Aliases
+    colnames(dbKeywords) <- hsearch_index_colnames$Keywords
+    colnames(dbConcepts) <- hsearch_index_colnames$Concepts
 
     list(dbBase, dbAliases, dbKeywords, dbConcepts)
 }
 
+hsearch_index_colnames <-
+    list(Base = c("Package", "LibPath", "ID", "Name", "Title", "Topic",
+         "Encoding"),
+         Aliases = c("Alias", "ID", "Package"),
+         Keywords = c("Keyword", "ID", "Package"),
+         Concepts = c("Concept", "ID", "Package"))
+
 ### * .build_links_index
 
 .build_links_index <-
@@ -248,7 +250,7 @@ function(contents, package)
 {
     if(length(contents)) {
         aliases <- contents$Aliases
-        lens <- sapply(aliases, length)
+        lens <- lengths(aliases)
         files <- sub("\\.[Rr]d$", "\\.html", contents$File)
         structure(file.path("../..", package, "html", rep.int(files, lens)),
                   names = unlist(aliases))
diff --git a/src/library/tools/R/install.R b/src/library/tools/R/install.R
index 3def84b..1fe5cbd 100644
--- a/src/library/tools/R/install.R
+++ b/src/library/tools/R/install.R
@@ -1,7 +1,7 @@
 #  File src/library/tools/R/install.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
-#  Copyright (C) 1995-2014 The R Core Team
+#  Copyright (C) 1995-2016 The R Core Team
 #
 # NB: also copyright dates in Usages.
 #
@@ -16,7 +16,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 #### R based engine for  R CMD INSTALL SHLIB Rprof
 ####
@@ -31,23 +31,30 @@
 ## tools:::.install_packages(c("--preclean", "--no-multiarch", "tree"))
 
 ##' @return ...
-.install_packages <- function(args = NULL)
+.install_packages <- function(args = NULL, no.q = interactive())
 {
     ## calls system() on Windows for
     ## sh (configure.win/cleanup.win) make zip
 
-    dir.exists <- function(x) !is.na(isdir <- file.info(x)$isdir) & isdir
-
     ## global variables
     curPkg <- character() # list of packages in current pkg
     lockdir <- ""
     is_first_package <- TRUE
     stars <- "*"
+    user.tmpdir <- Sys.getenv("PKG_BUILD_DIR")
+    keep.tmpdir <- nzchar(user.tmpdir)
 
     ## Need these here in case of an early error, e.g. missing etc/Makeconf
     tmpdir <- ""
     clean_on_error <- TRUE
-    do_exit_on_error <- function()
+
+    do_exit <-
+	if(no.q)
+	    function(status = 1L) stop(".install_packages() exit status ", status)
+	else
+	    function(status = 1L) q("no", status = status, runLast = FALSE)
+
+    do_exit_on_error <- function(status = 1L)
     {
         ## If we are not yet processing a package, we will not have
         ## set curPkg
@@ -76,12 +83,12 @@
         }
 
         do_cleanup()
-        q("no", status = 1, runLast = FALSE)
+        do_exit(status=status)
     }
 
     do_cleanup <- function()
     {
-        if(nzchar(tmpdir)) do_cleanup_tmpdir()
+        if(!keep.tmpdir && nzchar(tmpdir)) do_cleanup_tmpdir()
         if (!is_first_package) {
             ## Only need to do this in case we successfully installed
             ## at least one package
@@ -95,13 +102,20 @@
     {
         ## Solaris will not remove any directory in the current path
         setwd(startdir)
-        if (dir.exists(tmpdir)) unlink(tmpdir, recursive=TRUE)
+        if (!keep.tmpdir && dir.exists(tmpdir)) unlink(tmpdir, recursive=TRUE)
     }
 
+    # This produces a (by default single) quoted string for use in a
+    # command sent to another R process.  Currently it only fixes backslashes;
+    # more extensive escaping might be a good idea
+    quote_path <- function(path, quote = "'")
+    	paste0(quote, gsub("\\\\", "\\\\\\\\", path), quote)
+
     on.exit(do_exit_on_error())
     WINDOWS <- .Platform$OS.type == "windows"
 
-    MAKE <- Sys.getenv("MAKE") # FIXME shQuote, default?
+    if (WINDOWS) MAKE <- "make"
+    else MAKE <- Sys.getenv("MAKE") # FIXME shQuote, default?
     rarch <- Sys.getenv("R_ARCH") # unix only
     if (WINDOWS && nzchar(.Platform$r_arch))
         rarch <- paste0("/", .Platform$r_arch)
@@ -181,7 +195,9 @@
             "			set arguments for the configure scripts (if any)",
             "      --configure-vars=VARS",
             "			set variables for the configure scripts (if any)",
-            "      --dsym            (OS X only) generate dSYM directory",
+            "      --dsym            (macOS only) generate dSYM directory",
+            "      --built-timestamp=STAMP",
+            "                   set timestamp for Built: entry in DESCRIPTION",
             "\nand on Windows only",
             "      --force-biarch	attempt to build both architectures",
             "			even if there is a non-empty configure.win",
@@ -191,16 +207,18 @@
             paste0("for this one it is ",
 		   if(static_html) "--html" else "--no-html", "."),
             "",
-            "Report bugs at bugs.r-project.org .", sep = "\n")
+            "Report bugs at <https://bugs.R-project.org>.", sep = "\n")
     }
 
 
-    # Check whether dir is a subdirectory of parent,
-    # to protect against malicious package names like ".." below
-    # Assumes that both directories exist
-
-    is_subdir <- function(dir, parent)
-        normalizePath(parent) == normalizePath(file.path(dir, ".."))
+    ## Check whether dir is a subdirectory of parent,
+    ## to protect against malicious package names like ".." below
+    ## Assumes that both directories exist
+    is_subdir <- function(dir, parent) {
+	rl <- Sys.readlink(dir) ## symbolic link (on POSIX, not Windows) is ok:
+	(!is.na(rl) && nzchar(rl)) ||
+	    normalizePath(parent) == normalizePath(file.path(dir, ".."))
+    }
 
     fullpath <- function(dir)
     {
@@ -212,16 +230,9 @@
 
     ## used for LazyData, KeepSource, ByteCompile, Biarch
     parse_description_field <- function(desc, field, default = TRUE)
-    {
-        tmp <- desc[field]
-        if (is.na(tmp)) default
-        else switch(tmp,
-                    "yes"=, "Yes" =, "true" =, "True" =, "TRUE" = TRUE,
-                    "no" =, "No" =, "false" =, "False" =, "FALSE" = FALSE,
-                    ## default
-                    errmsg("invalid value of ", field, " field in DESCRIPTION")
-                    )
-    }
+	str_parse_logic(desc[field], default = default,
+			otherwise = quote(
+			    errmsg("invalid value of ", field, " field in DESCRIPTION")))
 
     starsmsg <- function(stars, ...)
         message(stars, " ", ..., domain = NA)
@@ -233,10 +244,7 @@
     }
 
     pkgerrmsg <- function(msg, pkg)
-    {
-        message("ERROR: ", msg, " for package ", sQuote(pkg), domain = NA)
-        do_exit_on_error()
-    }
+	errmsg(msg, " for package ", sQuote(pkg))
 
     ## 'pkg' is the absolute path to package sources.
     do_install <- function(pkg)
@@ -266,7 +274,7 @@
             curPkg <<- pkg_name
         }
 
-        instdir <- file.path(lib, pkg_name)
+        instdir <- file.path(lib, pkg_name) # = <library>/<pkg>
         Sys.setenv(R_PACKAGE_NAME = pkg_name, R_PACKAGE_DIR = instdir)
         status <- .Rtest_package_depends_R_version()
         if (status) do_exit_on_error()
@@ -292,15 +300,30 @@
         is_source_package <- is.na(desc["Built"])
 
         if (is_source_package) {
-            ## Find out if C++11 is requested in DESCRIPTION file
+            ## Find out if any C++ standard is requested in DESCRIPTION file
             sys_requires <- desc["SystemRequirements"]
             if (!is.na(sys_requires)) {
                 sys_requires <- unlist(strsplit(sys_requires, ","))
-                if(any(grepl("^[[:space:]]*C[+][+]11[[:space:]]*$",
+                if(any(grepl("^[[:space:]]*C[+][+]17[[:space:]]*$",
+                             sys_requires, ignore.case=TRUE))) {
+                    Sys.setenv("R_PKG_CXX_STD"="CXX17")
+                    on.exit(Sys.unsetenv("R_PKG_CXX_STD"))
+                }
+                else if(any(grepl("^[[:space:]]*C[+][+]14[[:space:]]*$",
+                             sys_requires, ignore.case=TRUE))) {
+                    Sys.setenv("R_PKG_CXX_STD"="CXX14")
+                    on.exit(Sys.unsetenv("R_PKG_CXX_STD"))
+                }
+                else if(any(grepl("^[[:space:]]*C[+][+]11[[:space:]]*$",
                              sys_requires, ignore.case=TRUE))) {
                     Sys.setenv("R_PKG_CXX_STD"="CXX11")
                     on.exit(Sys.unsetenv("R_PKG_CXX_STD"))
                 }
+                else if(any(grepl("^[[:space:]]*C[+][+]98[[:space:]]*$",
+                                  sys_requires, ignore.case=TRUE))) {
+                    Sys.setenv("R_PKG_CXX_STD"="CXX98")
+                    on.exit(Sys.unsetenv("R_PKG_CXX_STD"))
+                }
             }
         }
 
@@ -313,7 +336,7 @@
 
         ## Add read permission to all, write permission to owner
         ## If group-write permissions were requested, set them
-        .Call(dirchmod, instdir, group.writable)
+        .Call(C_dirchmod, instdir, group.writable)
         is_first_package <<- FALSE
 
         if (tar_up) { # Unix only
@@ -403,9 +426,9 @@
             }
             if(length(archs))
                 for(arch in archs) {
-                    ss <- paste("src", arch, sep = "-")
+                    ss <- paste0("src-", arch)
                     ## it seems fixing permissions is sometimes needed
-                    .Call(dirchmod, ss, group.writable)
+                    .Call(C_dirchmod, ss, group.writable)
                     unlink(ss, recursive = TRUE)
                 }
 
@@ -467,12 +490,12 @@
                 ## not clear if this is still necessary, but sh version did so
 		if (!WINDOWS)
 		    Sys.chmod(file.path(dest, files), dmode)
-		## OS X does not keep debugging symbols in binaries
+		## macOS does not keep debugging symbols in binaries
 		## anymore so optionally we can create dSYMs. This is
 		## important since we will blow away .o files so there
 		## is no way to create it later.
 
-		if (dsym && grepl("^darwin", R.version$os) ) {
+		if (dsym && startsWith(R.version$os, "darwin")) {
 		    message(gettextf("generating debug symbols (%s)", "dSYM"),
                             domain = NA)
 		    dylib <- Sys.glob(paste0(dest, "/*", SHLIB_EXT))
@@ -648,13 +671,13 @@
 
 
         if (more_than_libs) {
-            for (f in c("NAMESPACE", "LICENSE", "LICENCE", "NEWS"))
+            for (f in c("NAMESPACE", "LICENSE", "LICENCE", "NEWS", "NEWS.md"))
                 if (file.exists(f)) {
                     file.copy(f, instdir, TRUE)
 		    Sys.chmod(file.path(instdir, f), fmode)
                 }
 
-            res <- try(.install_package_description('.', instdir))
+            res <- try(.install_package_description('.', instdir, built_stamp))
             if (inherits(res, "try-error"))
                 pkgerrmsg("installing package DESCRIPTION failed", pkg_name)
             if (!file.exists(namespace <- file.path(instdir, "NAMESPACE")) ) {
@@ -681,7 +704,7 @@
                 if (length(paths)) {
                     ## check any version requirements
                     have_vers <-
-                        (vapply(linkTo, length, 1L) > 1L) & lpkgs %in% bpaths
+                        (lengths(linkTo) > 1L) & lpkgs %in% bpaths
                     for (z in linkTo[have_vers]) {
                         p <- z[[1L]]
                         path <- paths[bpaths %in% p]
@@ -703,7 +726,8 @@
             if (WINDOWS) {
                 owd <- setwd("src")
                 makefiles <- character()
-                if (!is.na(f <- Sys.getenv("R_MAKEVARS_USER", NA))) {
+                if (!is.na(f <- Sys.getenv("R_MAKEVARS_USER",
+                                           NA_character_))) {
                     if (file.exists(f))  makefiles <- f
                 } else if (file.exists(f <- path.expand("~/.R/Makevars.win")))
                     makefiles <- f
@@ -719,7 +743,7 @@
                 } else { ## no src/Makefile.win
                     srcs <- dir(pattern = "\\.([cfmM]|cc|cpp|f90|f95|mm)$",
                                 all.files = TRUE)
-                    archs <- if (!force_both && !grepl(" x64 ", win.version()))
+                    archs <- if (!force_both && !grepl(" x64 ", utils::win.version()))
                         "i386"
                     else {
                         ## see what is installed
@@ -761,11 +785,11 @@
                         for(arch in archs) {
                             message("", domain = NA) # a blank line
                             starsmsg("***", "arch - ", arch)
-                            ss <- paste("src", arch, sep = "-")
+                            ss <- paste0("src-", arch)
                             dir.create(ss, showWarnings = FALSE)
                             file.copy(Sys.glob("src/*"), ss, recursive = TRUE)
                             ## avoid read-only files/dir such as nested .svn
-			    .Call(dirchmod, ss, group.writable)
+			    .Call(C_dirchmod, ss, group.writable)
                             setwd(ss)
 
                             ra <- paste0("/", arch)
@@ -784,18 +808,10 @@
                     owd <- setwd("src")
                     system_makefile <-
                         file.path(R.home(), paste0("etc", rarch), "Makeconf")
-                    site <- Sys.getenv("R_MAKEVARS_SITE", NA)
-                    if (is.na(site)) site <- file.path(paste0(R.home("etc"), rarch), "Makevars.site")
                     makefiles <- c(system_makefile,
-                                   if(file.exists(site)) site,
-                                   "Makefile")
-                    if (!is.na(f <- Sys.getenv("R_MAKEVARS_USER", NA))) {
-                        if (file.exists(f))  makefiles <- c(makefiles, f)
-                    } else if (file.exists(f <- path.expand(paste("~/.R/Makevars",
-                                                                  Sys.getenv("R_PLATFORM"), sep = "-"))))
-                        makefiles <- c(makefiles, f)
-                    else if (file.exists(f <- path.expand("~/.R/Makevars")))
-                        makefiles <- c(makefiles, f)
+                                   makevars_site(),
+                                   "Makefile",
+                                   makevars_user())
                     res <- system(paste(MAKE,
                                         paste("-f", shQuote(makefiles), collapse = " ")))
                     if (res == 0) shlib_install(instdir, rarch)
@@ -828,7 +844,7 @@
                                     has_error <- run_shlib(pkg_name, srcs, instdir, "")
                                 } else {
                                     starsmsg("***", "arch - ", arch)
-                                    ss <- paste("src", arch, sep = "-")
+                                    ss <- paste0("src-", arch)
                                     dir.create(ss, showWarnings = FALSE)
                                     file.copy(Sys.glob("src/*"), ss, recursive = TRUE)
                                     setwd(ss)
@@ -879,7 +895,7 @@
         if (WINDOWS && "x64" %in% test_archs) {
             ## we cannot actually test x64 unless this is 64-bit
             ## Windows, even if it is installed.
-            if (!grepl(" x64 ", win.version())) test_archs <- "i386"
+            if (!grepl(" x64 ", utils::win.version())) test_archs <- "i386"
         }
 
 
@@ -903,7 +919,7 @@
                                    "bzip2" = 2L,
                                    "xz" = 3L,
                                    TRUE)  # default to gzip
-                } else if(file.info(f)$size > 1e6) comp <- 3L # "xz"
+                } else if(file.size(f) > 1e6) comp <- 3L # "xz"
 		res <- try(sysdata2LazyLoadDB(f, file.path(instdir, "R"),
                                               compress = comp))
 		if (inherits(res, "try-error"))
@@ -1030,7 +1046,7 @@
             i_dirs <- grep(.vc_dir_names_re, i_dirs,
                            invert = TRUE, value = TRUE)
             ## This ignores any restrictive permissions in the source
-            ## tree, since the later .Call(dirchmod) call will
+            ## tree, since the later .Call(C_dirchmod) call will
             ## fix the permissions.
 
             ## handle .Rinstignore:
@@ -1051,8 +1067,8 @@
             for(e in ignore)
                 i_files <- grep(e, i_files, perl = TRUE, invert = TRUE,
                                 value = TRUE, ignore.case = TRUE)
-            i_files <- i_files[!i_files %in%
-                               c("inst/doc/Rplots.pdf", "inst/doc/Rplots.ps")]
+            i_files <- i_files %w/o% c("inst/doc/Rplots.pdf",
+                                       "inst/doc/Rplots.ps")
             i_files <- grep("inst/doc/.*[.](log|aux|bbl|blg|dvi)$",
                             i_files, perl = TRUE, invert = TRUE,
                             value = TRUE, ignore.case = TRUE)
@@ -1061,12 +1077,12 @@
                 i_files <- grep("inst/doc/.*[.](png|jpg|jpeg|gif|ps|eps)$",
                                 i_files, perl = TRUE, invert = TRUE,
                                 value = TRUE, ignore.case = TRUE)
-            i_files <- i_files[! i_files %in% "Makefile"]
+            i_files <- i_files %w/o% "Makefile"
             i2_files <- gsub("^inst", instdir, i_files)
             file.copy(i_files, i2_files)
             if (!WINDOWS) {
                 ## make executable if the source file was (for owner)
-                modes <- file.info(i_files)$mode
+                modes <- file.mode(i_files)
                 execs <- as.logical(modes & as.octmode("100"))
 		Sys.chmod(i2_files[execs], dmode)
             }
@@ -1089,16 +1105,23 @@
 	## LazyLoading/Compiling
 	if (install_R && dir.exists("R") && length(dir("R"))) {
             BC <- if (!is.na(byte_compile)) byte_compile
-            else
-                parse_description_field(desc, "ByteCompile", default = FALSE)
-            rcp <- as.numeric(Sys.getenv("R_COMPILE_PKGS"))
-            BC <- BC || (!is.na(rcp) && rcp > 0)
+                  else
+                      parse_description_field(desc, "ByteCompile", default = FALSE)
+            rcps <- Sys.getenv("R_COMPILE_PKGS")
+            rcp <- switch(rcps,
+                          "TRUE"=, "true"=, "True"=, "yes"=, "Yes"= 1,
+                          "FALSE"=,"false"=,"False"=, "no"=, "No" = 0,
+                          as.numeric(rcps))
+            if (!is.na(rcp))
+                BC <- (rcp > 0)
             if (BC) {
                 starsmsg(stars,
                          "byte-compile and prepare package for lazy loading")
                 ## need to disable JIT
                 Sys.setenv(R_ENABLE_JIT = 0L)
+                compiler::enableJIT(0)
                 compiler::compilePKGS(1L)
+                compiler::setCompilerOptions(suppressAll = FALSE)
                 compiler::setCompilerOptions(suppressUndefined = TRUE)
             } else
                 starsmsg(stars, "preparing package for lazy loading")
@@ -1106,7 +1129,7 @@
                 parse_description_field(desc, "KeepSource",
                                         default = keep.source)
 	    ## Something above, e.g. lazydata,  might have loaded the namespace
-	    if (pkg_name %in% loadedNamespaces())
+	    if (isNamespaceLoaded(pkg_name))
 		unloadNamespace(pkg_name)
             deps_only <-
                 config_val_to_logical(Sys.getenv("_R_CHECK_INSTALL_DEPENDS_", "FALSE"))
@@ -1149,7 +1172,7 @@
 				types = build_help_types,
 				outenc = outenc)
 	    }
-	    if (file_test("-d", figdir <- file.path(pkg_dir, "man", "figures"))) {
+	    if (dir.exists(figdir <- file.path(pkg_dir, "man", "figures"))) {
 		starsmsg(paste0(stars, "*"), "copying figures")
 		dir.create(destdir <- file.path(instdir, "help", "figures"))
 		file.copy(Sys.glob(c(file.path(figdir, "*.png"),
@@ -1166,7 +1189,7 @@
 	    res <- try(.install_package_indices(".", instdir))
 	    if (inherits(res, "try-error"))
 		errmsg("installing package indices failed")
-            if(file_test("-d", "vignettes")) {
+            if(dir.exists("vignettes")) {
                 starsmsg(stars, "installing vignettes")
                 enc <- desc["Encoding"]
                 if (is.na(enc)) enc <- ""
@@ -1198,8 +1221,9 @@
             ## FIXME: maybe the quoting as 'lib' is not quite good enough
             ## On a Unix-alike this calls system(input=)
             ## and that uses a temporary file and redirection.
-            cmd <- paste0("tools:::.test_load_package('", pkg_name, "', '", lib, "')")
-            ## R_LIBS was set already.  R_runR is in check.R
+            cmd <- paste0("tools:::.test_load_package('", pkg_name, "', ", quote_path(lib), ")")
+            ## R_LIBS was set already, but Rprofile/Renviron may change it
+            ## R_runR is in check.R
             deps_only <-
                 config_val_to_logical(Sys.getenv("_R_CHECK_INSTALL_DEPENDS_", "FALSE"))
             env <- if (deps_only) setRlibs(lib0, self = TRUE, quote = TRUE) else ""
@@ -1220,8 +1244,8 @@
                     errmsg(msg) # does not return
                 }
             } else {
-                opts <- if (deps_only) "--vanilla --slave"
-                else "--no-save --slave"
+                opts <- paste(if(deps_only) "--vanilla" else "--no-save",
+                              "--slave")
                 out <- R_runR(cmd, opts, env = env)
                 if(length(out))
                     cat(paste(c(out, ""), collapse = "\n"))
@@ -1253,11 +1277,10 @@
     build_latex <- FALSE
     build_example <- FALSE
     use_configure <- TRUE
-    auto_zip <- FALSE
     configure_args <- character()
     configure_vars <- character()
     fake <- FALSE
-    lazy <- TRUE
+##    lazy <- TRUE
     lazy_data <- FALSE
     byte_compile <- NA # means take from DESCRIPTION file.
     ## Next is not very useful unless R CMD INSTALL reads a startup file
@@ -1277,6 +1300,7 @@
     resave_data <- FALSE
     compact_docs <- FALSE
     keep.source <- getOption("keep.source.pkgs")
+    built_stamp <- character()
 
     install_libs <- TRUE
     install_R <- TRUE
@@ -1291,18 +1315,18 @@
         a <- args[1L]
         if (a %in% c("-h", "--help")) {
             Usage()
-            q("no", runLast = FALSE)
+            do_exit(0)
         }
         else if (a %in% c("-v", "--version")) {
             cat("R add-on package installer: ",
                 R.version[["major"]], ".",  R.version[["minor"]],
                 " (r", R.version[["svn rev"]], ")\n", sep = "")
             cat("",
-                "Copyright (C) 2000-2013 The R Core Team.",
+                "Copyright (C) 2000-2016 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")
-            q("no", runLast = FALSE)
+	    do_exit(0)
         } else if (a %in% c("-c", "--clean")) {
             clean <- TRUE
             shargs <- c(shargs, "--clean")
@@ -1404,15 +1428,31 @@
             byte_compile <- FALSE
         } else if (a == "--dsym") {
             dsym <- TRUE
+        } else if (substr(a, 1, 18) == "--built-timestamp=") {
+            built_stamp <- substr(a, 19, 1000)
         } else if (substr(a, 1, 1) == "-") {
             message("Warning: unknown option ", sQuote(a), domain = NA)
         } else pkgs <- c(pkgs, a)
         args <- args[-1L]
     }
 
-    tmpdir <- tempfile("R.INSTALL")
-    if (!dir.create(tmpdir))
-        stop("cannot create temporary directory")
+    if (keep.tmpdir) {
+      make_tmpdir <- function(prefix, nchars = 8, ntries = 100) {
+        for(i in 1:ntries) {
+          name = paste(sample(c(0:9, letters, LETTERS), nchars, replace=TRUE), collapse="")
+          path = paste(prefix, name, sep = "/")
+          if (dir.create(path, showWarnings = FALSE, recursive = T)) {
+            return(path)
+          }
+        }
+        stop("cannot create unique directory for build")
+      }
+      tmpdir <- make_tmpdir(user.tmpdir)
+    } else {
+      tmpdir <- tempfile("R.INSTALL")
+      if (!dir.create(tmpdir))
+          stop("cannot create temporary directory")
+    }
 
     if (merge) {
         if (length(pkgs) != 1L || !file_test("-f", pkgs))
@@ -1422,7 +1462,7 @@
             f  <- dir(file.path(R.home(), "bin"))
             archs <- f[f %in% c("i386", "x64")]
             if (length(archs) > 1L) {
-                args <- args0[! args0 %in% c("--merge-multiarch", "--build")]
+                args <- args0 %w/o% c("--merge-multiarch", "--build")
                 ## this will report '* DONE (foo)' if it works, which
                 ## R CMD check treats as an indication of success.
                 ## so use a backdoor to suppress it.
@@ -1444,7 +1484,7 @@
         } else {
             archs  <- dir(file.path(R.home("bin"), "exec"))
             if (length(archs) > 1L) {
-                args <- args0[! args0 %in% c("--merge-multiarch", "--build")]
+                args <- args0 %w/o% c("--merge-multiarch", "--build")
                 ## this will report '* DONE (foo)' if it works, which
                 ## R CMD check treats as an indication of success.
                 ## so use a backdoor to suppress it.
@@ -1499,25 +1539,14 @@
                 errmsg("error unpacking tarball")
             ## Now see what we got
             nf <- dir(tmpdir, full.names = TRUE)
-            new <- nf[!nf %in% of]
+            new <- nf %w/o% of
             if (!length(new))
                 errmsg("cannot extract package from ", sQuote(pkg))
             if (length(new) > 1L)
                 errmsg("extracted multiple files from ", sQuote(pkg))
-            if (file.info(new)$isdir) pkgname <- basename(new)
+            if (dir.exists(new)) pkgname <- basename(new)
             else errmsg("cannot extract package from ", sQuote(pkg))
-
-            ## If we have a binary bundle distribution, there should
-            ## be a DESCRIPTION file at top level. These are defunct
-            if (file.exists(ff <- file.path(tmpdir, "DESCRIPTION"))) {
-                con <- read.dcf(ff, "Contains")
-                if (!is.na(con))
-                    message("looks like a binary bundle", domain = NA)
-                else
-                    message("unknown package layout", domain = NA)
-                do_cleanup_tmpdir()
-                q("no", status = 1, runLast = FALSE)
-            } else if (file.exists(file.path(tmpdir, pkgname, "DESCRIPTION"))) {
+            if (file.exists(file.path(tmpdir, pkgname, "DESCRIPTION"))) {
                 allpkgs <- c(allpkgs, file.path(tmpdir, pkgname))
             } else errmsg("cannot extract package from ", sQuote(pkg))
         } else if (file.exists(file.path(pkg, "DESCRIPTION"))) {
@@ -1557,7 +1586,7 @@
         if (WINDOWS) {
             ## file.access is unreliable on Windows
             ## the only known reliable way is to try it
-            fn <- file.path(lib, paste("_test_dir", Sys.getpid(), sep = "_"))
+            fn <- file.path(lib, paste0("_test_dir_", Sys.getpid()))
             unlink(fn, recursive = TRUE) # precaution
             res <- try(dir.create(fn, showWarnings = FALSE))
             if (inherits(res, "try-error") || !res) ok <- FALSE
@@ -1571,7 +1600,7 @@
     group.writable <- if(WINDOWS) FALSE else {
 	## install package group-writable  iff  in group-writable lib
         d <-  as.octmode("020")
-	(file.info(lib)$mode & d) == d ## TRUE  iff  g-bit is "w"
+	(file.mode(lib) & d) == d ## TRUE  iff  g-bit is "w"
     }
 
     if (libs_only) {
@@ -1593,14 +1622,14 @@
                     " for modifying\nTry removing ", sQuote(lockdir),
                     domain = NA)
             do_cleanup_tmpdir()
-            q("no", status = 3, runLast = FALSE)
+            do_exit(status = 3)
         }
         dir.create(lockdir, recursive = TRUE)
         if (!dir.exists(lockdir)) {
             message("ERROR: failed to create lock directory ", sQuote(lockdir),
                     domain = NA)
             do_cleanup_tmpdir()
-            q("no", status = 3, runLast = FALSE)
+            do_exit(status = 3)
         }
         if (debug) starsmsg(stars, "created lock directory ", sQuote(lockdir))
     }
@@ -1643,7 +1672,7 @@
 
     for(pkg in allpkgs) {
         if (pkglock) {
-            lockdir <- file.path(lib, paste("00LOCK", basename(pkg), sep = "-"))
+            lockdir <- file.path(lib, paste0("00LOCK-", basename(pkg)))
             mk_lockdir(lockdir)
         }
         do_install(pkg)
@@ -1682,7 +1711,7 @@
             "Windows only:",
             "  -d, --debug		build a debug DLL",
             "",
-            "Report bugs at bugs at r-project.org .",
+            "Report bugs at <https://bugs.R-project.org>.",
             sep = "\n")
 
     ## FIXME shQuote here?
@@ -1706,7 +1735,7 @@
         SHLIB_LIBADD <- ""
         MAKE <- "make"
         ## Formerly for winshlib.mk to pick up Makeconf
-        rarch <- Sys.getenv("R_ARCH", NA)
+        rarch <- Sys.getenv("R_ARCH", NA_character_)
         if(is.na(rarch)) {
             if (nzchar(.Platform$r_arch)) {
                 rarch <- paste0("/", .Platform$r_arch)
@@ -1719,7 +1748,7 @@
 
     objs <- character()
     shlib <- ""
-    site <- Sys.getenv("R_MAKEVARS_SITE", NA)
+    site <- Sys.getenv("R_MAKEVARS_SITE", NA_character_)
     if (is.na(site))
         site <- file.path(paste0(R.home("etc"), rarch), "Makevars.site")
     makefiles <-
@@ -1732,7 +1761,10 @@
     with_f77 <- FALSE
     with_f9x <- FALSE
     with_objc <- FALSE
-    use_cxx1x <- FALSE
+    use_cxx98 <- FALSE
+    use_cxx11 <- FALSE
+    use_cxx14 <- FALSE
+    use_cxx17 <- FALSE
     pkg_libs <- character()
     clean <- FALSE
     preclean <- FALSE
@@ -1808,7 +1840,7 @@
     if (length(objs)) objs <- paste0(objs, OBJ_EXT, collapse = " ")
 
     if (WINDOWS) {
-        if (!is.na(f <- Sys.getenv("R_MAKEVARS_USER", NA))) {
+        if (!is.na(f <- Sys.getenv("R_MAKEVARS_USER", NA_character_))) {
             if (file.exists(f))  makefiles <- c(makefiles, f)
         } else if (rarch == "/x64" &&
                    file.exists(f <- path.expand("~/.R/Makevars.win64")))
@@ -1818,14 +1850,7 @@
         else if (file.exists(f <- path.expand("~/.R/Makevars")))
             makefiles <- c(makefiles, f)
     } else {
-        if (!is.na(f <- Sys.getenv("R_MAKEVARS_USER", NA))) {
-            if (file.exists(f))  makefiles <- c(makefiles, f)
-        } else if (file.exists(f <- path.expand(paste("~/.R/Makevars",
-                                               Sys.getenv("R_PLATFORM"),
-                                               sep = "-"))))
-            makefiles <- c(makefiles, f)
-        else if (file.exists(f <- path.expand("~/.R/Makevars")))
-            makefiles <- c(makefiles, f)
+        makefiles <- c(makefiles, makevars_user())
     }
 
     makeobjs <- paste0("OBJECTS=", shQuote(objs))
@@ -1838,8 +1863,17 @@
                               value = TRUE, useBytes = TRUE))) {
             cxxstd <- gsub("^CXX_STD *=", "", ll)
             cxxstd <- gsub(" *", "", cxxstd)
-            if (cxxstd == "CXX11") {
-                use_cxx1x <- TRUE
+            if (cxxstd == "CXX17") {
+                use_cxx17 <- TRUE
+            }
+            else if (cxxstd == "CXX14") {
+                use_cxx14 <- TRUE
+            }
+            else if (cxxstd == "CXX11") {
+                use_cxx11 <- TRUE
+            }
+            else if (cxxstd == "CXX98") {
+                use_cxx98 <- TRUE
             }
         }
     } else if (file.exists("Makevars")) {
@@ -1851,21 +1885,79 @@
                               value = TRUE, useBytes = TRUE))) {
             cxxstd <- gsub("^CXX_STD *=", "", ll)
             cxxstd <- gsub(" *", "", cxxstd)
-            if (cxxstd == "CXX11") {
-                use_cxx1x <- TRUE
+            if (cxxstd == "CXX17") {
+                use_cxx17 <- TRUE
+            }
+            else if (cxxstd == "CXX14") {
+                use_cxx14 <- TRUE
+            }
+            else if (cxxstd == "CXX11") {
+                use_cxx11 <- TRUE
+            }
+            else if (cxxstd == "CXX98") {
+                use_cxx98 <- TRUE
             }
         }
     }
-    if (!use_cxx1x) {
-        val <- Sys.getenv("USE_CXX1X", NA)
-        if(!is.na(val)) {
-            use_cxx1x <- TRUE
+    if (!use_cxx11 && !use_cxx14 && !use_cxx17 && !use_cxx98) {
+        val17 <- Sys.getenv("USE_CXX17", NA_character_)
+        val14 <- Sys.getenv("USE_CXX14", NA_character_)
+        val11 <- Sys.getenv("USE_CXX11", NA_character_)
+        val98 <- Sys.getenv("USE_CXX98", NA_character_)
+        if (!is.na(val17)) {
+            use_cxx17 <- TRUE
+        }
+        else if(!is.na(val14)) {
+            use_cxx14 <- TRUE
+        }
+        else if (!is.na(val11)) {
+            use_cxx11 <- TRUE
+        }
+        else if (!is.na(val98)) {
+            use_cxx98 <- TRUE
         }
         else {
             val <- Sys.getenv("R_PKG_CXX_STD")
-            if (val == "CXX11") {
-                use_cxx1x <- TRUE
+            if (val == "CXX17") {
+                use_cxx17 <- TRUE
+            }
+            else if (val == "CXX14") {
+                use_cxx14 <- TRUE
             }
+            else if (val == "CXX11") {
+                use_cxx11 <- TRUE
+            }
+            else if (val == "CXX98") {
+                use_cxx98 <- TRUE
+            }
+        }
+    }
+
+    if (with_cxx) {
+        checkCXX <- function(cxxstd) {
+            for (i in rev(seq_along(makefiles))) {
+                lines <- readLines(makefiles[i], warn = FALSE)
+                pattern <- paste0("^", cxxstd, " *= *")
+                ll <- grep(pattern, lines, perl = TRUE, value = TRUE,
+                           useBytes = TRUE)
+                for (j in rev(seq_along(ll))) {
+                    cxx <- gsub(pattern, "", ll[j])
+                    return(nzchar(cxx))
+                }
+            }
+            return(FALSE)
+        }
+        if (use_cxx17 && !checkCXX("CXX17")) {
+            stop("C++17 standard requested but CXX17 is not defined")
+        }
+        if (use_cxx14 && !checkCXX("CXX14")) {
+            stop("C++14 standard requested but CXX14 is not defined")
+        }
+        if (use_cxx11 && !checkCXX("CXX11")) {
+            stop("C++11 standard requested but CXX11 is not defined")
+        }
+        if (use_cxx98 && !checkCXX("CXX98")) {
+            stop("C++98 standard requested but CXX98 is not defined")
         }
     }
 
@@ -1874,12 +1966,30 @@
         makeargs <- c("SHLIB_LDFLAGS='$(SHLIB_FCLDFLAGS)'",
                       "SHLIB_LD='$(SHLIB_FCLD)'", makeargs)
     } else if (with_cxx) {
-        makeargs <- if (use_cxx1x)
-            c("CXX='$(CXX1X) $(CXX1XSTD)'",
-              "CXXFLAGS='$(CXX1XFLAGS)'",
-              "CXXPICFLAGS='$(CXX1XPICFLAGS)'",
-              "SHLIB_LDFLAGS='$(SHLIB_CXX1XLDFLAGS)'",
-              "SHLIB_LD='$(SHLIB_CXX1XLD)'", makeargs)
+        makeargs <- if (use_cxx17)
+            c("CXX='$(CXX17) $(CXX17STD)'",
+              "CXXFLAGS='$(CXX17FLAGS)'",
+              "CXXPICFLAGS='$(CXX17PICFLAGS)'",
+              "SHLIB_LDFLAGS='$(SHLIB_CXX17LDFLAGS)'",
+              "SHLIB_LD='$(SHLIB_CXX17LD)'", makeargs)
+        else if (use_cxx14)
+            c("CXX='$(CXX14) $(CXX14STD)'",
+              "CXXFLAGS='$(CXX14FLAGS)'",
+              "CXXPICFLAGS='$(CXX14PICFLAGS)'",
+              "SHLIB_LDFLAGS='$(SHLIB_CXX14LDFLAGS)'",
+              "SHLIB_LD='$(SHLIB_CXX14LD)'", makeargs)
+        else if (use_cxx11)
+            c("CXX='$(CXX11) $(CXX11STD)'",
+              "CXXFLAGS='$(CXX11FLAGS)'",
+              "CXXPICFLAGS='$(CXX11PICFLAGS)'",
+              "SHLIB_LDFLAGS='$(SHLIB_CXX11LDFLAGS)'",
+              "SHLIB_LD='$(SHLIB_CXX11LD)'", makeargs)
+        else if (use_cxx98)
+            c("CXX='$(CXX98) $(CXX98STD)'",
+              "CXXFLAGS='$(CXX98FLAGS)'",
+              "CXXPICFLAGS='$(CXX98PICFLAGS)'",
+              "SHLIB_LDFLAGS='$(SHLIB_CXX98LDFLAGS)'",
+              "SHLIB_LD='$(SHLIB_CXX98LD)'", makeargs)
         else
             c("SHLIB_LDFLAGS='$(SHLIB_CXXLDFLAGS)'",
               "SHLIB_LD='$(SHLIB_CXXLD)'", makeargs)
@@ -1912,7 +2022,7 @@
     } else {
         if (preclean) system(paste(cmd, "shlib-clean"))
         res <- system(cmd)
-        if(build_objects_symbol_tables) {
+        if((res == 0L) && build_objects_symbol_tables) {
             ## Should only do this if the previous one went ok.
             system(paste(cmd, "symbols.rds"))
         }
@@ -1991,7 +2101,7 @@
                    Internal = character(),
                    stringsAsFactors = FALSE)
     } else {
-        lens <- sapply(topics, length)
+        lens <- lengths(topics)
         files <- sub("\\.[Rr]d$", "", Rd$File)
         internal <- sapply(Rd$Keywords, function(x) "internal" %in% x)
         data.frame(Topic = unlist(topics),
@@ -2004,8 +2114,9 @@
     outman <- file.path(outDir, "help")
     dir.create(outman, showWarnings = FALSE)
     MM <- M[re(M[, 1L]), 1:2]
-    write.table(MM, file.path(outman, "AnIndex"),
-                quote = FALSE, row.names = FALSE, col.names = FALSE, sep = "\t")
+    utils::write.table(MM, file.path(outman, "AnIndex"),
+                       quote = FALSE, row.names = FALSE, col.names = FALSE,
+                       sep = "\t")
     a <- structure(MM[, 2L], names=MM[, 1L])
     saveRDS(a, file.path(outman, "aliases.rds"))
 
@@ -2069,7 +2180,8 @@
 
     ## No need to handle encodings: everything is in UTF-8
 
-    html_header(desc["Package"], desc["Title"], desc["Version"], outcon)
+    html_header(desc["Package"], htmlize(desc["Title"], TRUE),
+                desc["Version"], outcon)
 
     use_alpha <- (nrow(M) > 100)
     if (use_alpha) {
@@ -2079,7 +2191,7 @@
         if (m) nm <- c(" ", nm[-m])
         m <- match("misc", nm, 0L) # force last in all locales.
         if (m) nm <- c(nm[-m], "misc")
-	writeLines(c("<p align=\"center\">",
+	writeLines(c('<p style="text-align: center;">',
 		     paste0("<a href=\"#", nm, "\">", nm, "</a>"),
 		     "</p>\n"), outcon)
         for (f in nm) {
@@ -2088,13 +2200,13 @@
                 cat("\n<h2><a name=\"", f, "\">-- ", f, " --</a></h2>\n\n",
                     sep = "", file = outcon)
 	    writeLines(c('<table width="100%">',
-			 paste0('<tr><td width="25%"><a href="', MM[, 2L], '.html">',
+			 paste0('<tr><td style="width: 25%;"><a href="', MM[, 2L], '.html">',
 				MM$HTopic, '</a></td>\n<td>', MM[, 3L],'</td></tr>'),
 			 "</table>"), outcon)
        }
     } else if (nrow(M)) {
 	writeLines(c('<table width="100%">',
-		     paste0('<tr><td width="25%"><a href="', M[, 2L], '.html">',
+		     paste0('<tr><td style="width: 25%;"><a href="', M[, 2L], '.html">',
 			    M$HTopic, '</a></td>\n<td>', M[, 3L],'</td></tr>'),
 		     "</table>"), outcon)
     } else { # no rows
@@ -2129,7 +2241,7 @@
     ext     <- c(".html", ".tex", ".R")
     names(dirname) <- names(ext) <- c("html", "latex", "example")
     mandir <- file.path(dir, "man")
-    if (!file_test("-d", mandir)) return()
+    if (!dir.exists(mandir)) return()
     desc <- readRDS(file.path(outDir, "Meta", "package.rds"))$DESCRIPTION
     pkg <- desc["Package"]
     ver <- desc["Version"]
@@ -2230,21 +2342,21 @@
         type <- "html"
         have <- list.files(file.path(outDir, dirname[type]))
         have2 <- sub("\\.html", "", basename(have))
-        drop <- have[! have2 %in% c(bfs, "00Index", "R.css")]
+        drop <- have[have2 %notin% c(bfs, "00Index", "R.css")]
         unlink(file.path(outDir, dirname[type], drop))
     }
     if ("latex" %in% types) {
         type <- "latex"
         have <- list.files(file.path(outDir, dirname[type]))
         have2 <- sub("\\.tex", "", basename(have))
-        drop <- have[! have2 %in% bfs]
+        drop <- have[have2 %notin% bfs]
         unlink(file.path(outDir, dirname[type], drop))
     }
     if ("example" %in% types) {
         type <- "example"
         have <- list.files(file.path(outDir, dirname[type]))
         have2 <- sub("\\.R", "", basename(have))
-        drop <- have[! have2 %in% bfs]
+        drop <- have[have2 %notin% bfs]
         unlink(file.path(outDir, dirname[type], drop))
     }
 
@@ -2279,7 +2391,7 @@ function(name="", version = "0.0")
         "            VALUE \"FileVersion\", \"", version, "\\0\"\n", sep = "")
     writeLines(c(
                  '            VALUE "Compiled under R Version", R_MAJOR "." R_MINOR " (" R_YEAR "-" R_MONTH "-" R_DAY ")\\0"',
-                 '            VALUE "Project info", "http://www.r-project.org\\0"',
+                 '            VALUE "Project info", "https://www.r-project.org\\0"',
                  '        END',
                  '    END',
                  '    BLOCK "VarFileInfo"',
@@ -2289,6 +2401,51 @@ function(name="", version = "0.0")
                  'END'))
 }
 
+### * makevars_user
+
+makevars_user <-
+function()
+{
+    m <- character()
+    if(.Platform$OS.type == "windows") {
+        if(!is.na(f <- Sys.getenv("R_MAKEVARS_USER", NA_character_))) {
+            if(file.exists(f)) m <- f
+        }
+        else if((Sys.getenv("R_ARCH") == "/x64") &&
+                file.exists(f <- path.expand("~/.R/Makevars.win64")))
+            m <- f
+        else if(file.exists(f <- path.expand("~/.R/Makevars.win")))
+            m <- f
+        else if(file.exists(f <- path.expand("~/.R/Makevars")))
+            m <- f
+    }
+    else {
+        if(!is.na(f <- Sys.getenv("R_MAKEVARS_USER", NA_character_))) {
+            if(file.exists(f)) m <- f
+        }
+        else if(file.exists(f <- path.expand(paste0("~/.R/Makevars-",
+                                                    Sys.getenv("R_PLATFORM")))))
+            m <- f
+        else if(file.exists(f <- path.expand("~/.R/Makevars")))
+            m <- f
+    }
+    m
+}
+
+### * makevars_site
+
+makevars_site <-
+function()
+{
+    m <- character()
+    if(is.na(f <- Sys.getenv("R_MAKEVARS_SITE", NA_character_)))
+        f <- file.path(paste0(R.home("etc"), Sys.getenv("R_ARCH")),
+                       "Makevars.site")
+    if(file.exists(f))
+        m <- f
+    m
+}
+
 
 ### Local variables: ***
 ### mode: outline-minor ***
diff --git a/src/library/tools/R/license.R b/src/library/tools/R/license.R
index b12ea22..60fb4a5 100644
--- a/src/library/tools/R/license.R
+++ b/src/library/tools/R/license.R
@@ -1,5 +1,5 @@
 #  File src/library/tools/R/license.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
 #  Copyright (C) 1995-2013 The R Core Team
 #
@@ -14,12 +14,12 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 ## <NOTE>
 ## We want *standardized* license specs so that we can compute on them.
 ## In particular, we want to know whether licenses are recognizable as
-## FOSS (http://en.wikipedia.org/wiki/Free_and_open-source_software)
+## FOSS (https://en.wikipedia.org/wiki/Free_and_open-source_software)
 ## licenses.
 ##
 ## A license spec is standardized ("canonical") if it is an alternative
@@ -47,12 +47,12 @@
 ## by the FSF (and not rejected by the OSI).
 ##
 ## See
-##   http://www.gnu.org/licenses/license-list.html
-##   http://opensource.org/licenses/alphabetical
+##   https://www.gnu.org/licenses/license-list.html
+##   https://opensource.org/licenses/alphabetical
 ## fot the FSF and OSI license lists, and also
-##   http://www.fsf.org/licensing/licenses
-##   http://en.wikipedia.org/wiki/List_of_FSF_approved_software_licences
-##   http://en.wikipedia.org/wiki/List_of_OSI_approved_software_licences
+##   https://www.fsf.org/licensing/licenses
+##   https://en.wikipedia.org/wiki/List_of_FSF_approved_software_licences
+##   https://en.wikipedia.org/wiki/List_of_OSI_approved_software_licences
 ## for more information.
 ## </NOTE>
 
@@ -82,7 +82,7 @@ function(paths = NULL)
                                  .Platform$path.sep, fixed = TRUE))
     paths <- c(paths,
                file.path(R.home("share"), "licenses", "license.db"))
-    ldb <- Reduce(function(u, v) merge(u, v, all = TRUE), 
+    ldb <- Reduce(function(u, v) merge(u, v, all = TRUE),
                   lapply(unique(normalizePath(paths)), read.dcf))
     ## Merging matrices gives a data frame.
     ldb <- as.matrix(ldb)
@@ -104,7 +104,7 @@ function(ldb)
     pos <- which(lab == "")
     abbrevs <- ldb$Abbrev[pos]
     versions <- ldb$Version[pos]
-    lab[pos] <- ifelse(abbrevs != "", abbrevs, ldb$Name[pos])
+    lab[pos] <- ifelse(nzchar(abbrevs), abbrevs, ldb$Name[pos])
     ind <- nzchar(versions)
     pos <- pos[ind]
     lab[pos] <- sprintf("%s version %s", lab[pos], versions[ind])
@@ -269,11 +269,11 @@ function(paths = NULL)
 ## Nasty issues.
 ## * There really is no GPL version 2.0.
 ##   Unfortunately, the FSF uses 2.0 in URLs or links
-##   (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html)
+##   (https://www.gnu.org/licenses/old-licenses/gpl-2.0.html)
 ##   The text clearly says "Version 2, June 1991".
 ## * There really is no LGPL version 2.0.
 ##   Unfortunately, the FSF uses 2.0 in URLs or links
-##   (http://www.gnu.org/licenses/old-licenses/).
+##   (https://www.gnu.org/licenses/old-licenses/).
 ##   The text clearly says "Version 2, June 1991".
 ## * CeCILL is a bit of a mess: the current version is referred to as
 ##   "version 2" (http://www.cecill.info/licences.en.html) but
@@ -284,7 +284,7 @@ function(paths = NULL)
 list("Artistic-2.0" =
      c("The Artistic License, Version 2.0",
        "Artistic 2.0",
-       "Artistic-2.0, see http://www.opensource.org/licenses/artistic-license-2.0.php"
+       "Artistic-2.0, see https://opensource.org/licenses/artistic-license-2.0.php"
        ),
 
      "BSL" =
@@ -301,7 +301,7 @@ list("Artistic-2.0" =
      c("GNU Public License",
        "Gnu GPL",
        "GNU GPL",
-       "GPL (http://www.gnu.org/copyleft/gpl.html)"
+       "GPL (https://www.gnu.org/copyleft/gpl.html)"
        ),
 
      "GPL-2" =
@@ -368,10 +368,10 @@ list("Artistic-2.0" =
        "GPL version 2 (or newer)",
        "GPL version 2 or later.",
        "GPL version 2 or newer",
-       "GPL version 2 or newer (http://www.gnu.org/copyleft/gpl.html)",
+       "GPL version 2 or newer (https://www.gnu.org/copyleft/gpl.html)",
        "GPL version 2 or newer (see README).",
        "GPL version 2 or newer.",
-       "GPL version 2 or newer. http://www.gnu.org/copyleft/gpl.html",
+       "GPL version 2 or newer. https://www.gnu.org/copyleft/gpl.html",
        "GPL version 2, or, at your option, any newer version.",
        "GPL Version 2 (or later)",
        "GPL version 2 (or later)",
@@ -399,7 +399,7 @@ list("Artistic-2.0" =
        ),
 
      "LGPL" =
-     c("LGPL (see <http://www.opensource.org/licenses/lgpl-license.php>).",
+     c("LGPL (see <https://opensource.org/licenses/lgpl-license.php>).",
        "GNU LGPL (same as wxWidgets)."
        ),
 
@@ -449,8 +449,7 @@ data.frame(ispecs =
            unlist(.standardizable_license_specs),
            ospecs =
            rep.int(names(.standardizable_license_specs),
-                   sapply(.standardizable_license_specs,
-                          length)),
+                   lengths(.standardizable_license_specs)),
            stringsAsFactors = FALSE)
 
 analyze_license <-
@@ -482,7 +481,7 @@ function(x)
              restricts_use = restricts_use)
 
 
-    x <- .strip_whitespace(x)
+    x <- trimws(x)
     if(is.na(x) || (x == "")) {
         ## Not really a lot to check ...
         ## (Note that non-standardizable license specs are dropped by
@@ -498,8 +497,7 @@ function(x)
     restricts_use <- NA
 
     ## Try splitting into the individual components.
-    components <-
-        .strip_whitespace(unlist(strsplit(x, "|", fixed = TRUE)))
+    components <- trimws(unlist(strsplit(x, "|", fixed = TRUE)))
 
     ## Now analyze the individual components.
     ok <- grepl(R_license_db_vars()$re_component, components)
@@ -542,7 +540,7 @@ function(x)
             !is.null(x) && all(!is.na(x) & (x == v))
         ## (More generally we could test for positive length of x: but
         ## a length test is needed because all(NULL) |=> TRUE.)
-        
+
         expansions <- lapply(components,
                              expand_license_spec_component_from_db)
 
@@ -621,13 +619,18 @@ function(x)
             Map(paste, expansions[ind], regmatches(components, m))
     }
 
+    if(any(grepl("^Part of R", components))) { # base package
+        is_verified <- is_FOSS <- TRUE
+        restricts_use <- FALSE
+    }
+
     .make_results(is_canonical = is_canonical,
                   bad_components = bad_components,
                   is_standardizable = is_standardizable,
                   standardization = standardization,
                   is_verified = is_verified,
                   components = components,
-                  expansions = expansions,    
+                  expansions = expansions,
                   extensions = extensions,
                   pointers = pointers,
                   is_FOSS = is_FOSS,
@@ -768,7 +771,7 @@ function(x)
         }
         TRUE
     }
-    
+
     if(x == "Unlimited" ||
        grepl(x, ldb_vars$re_license_file))
         return(NULL)
@@ -795,7 +798,7 @@ function(x)
         entries <- ldb[pos, ]
         ## Now determine the entries satisfying the version spec.
         v <- sub("[[:space:]]*\\((.*)\\)[[:space:]]*", "\\1", v)
-        if(v != "") {
+        if(nzchar(v)) {
             constraints <-
                 unlist(strsplit(v, "[[:space:]]*,[[:space:]]*"))
             entries <-
@@ -820,3 +823,36 @@ function(x)
     }
 
 }
+
+.license_component_is_for_stub_and_ok <-
+function(com, dir)
+{
+    parts <-
+        unlist(strsplit(com, "[[:space:]]*\\+[[:space:]]*file *"))
+    ## Should really allow getting this from R_license_db_vars().
+
+    fields_for_stubs <-
+        c(rep.int(list(c("YEAR", "COPYRIGHT HOLDER")),
+                  4L),
+          rep.int(list(c("YEAR", "COPYRIGHT HOLDER", "ORGANIZATION")),
+                  2L))
+    names(fields_for_stubs) <-
+        c("MIT License", "MIT",
+          "BSD 2-clause License", "BSD_2_clause",
+          "BSD 3-clause License", "BSD_3_clause")
+
+    fields_to_have <- fields_for_stubs[[parts[1L]]]
+    if(is.null(fields_to_have)) return(1L)
+
+    fields <- tryCatch(read.dcf(file.path(dir, parts[2L])),
+                       error = identity)
+    if(inherits(fields, "error"))
+        return(2L)
+    if(!identical(sort(colnames(fields)),
+                  sort(fields_to_have)))
+        return(3L)
+    if(!all(!is.na(fields) & nzchar(fields)))
+        return(4L)
+
+    0L
+}
diff --git a/src/library/tools/R/logging.R b/src/library/tools/R/logging.R
index d644600..9534635 100644
--- a/src/library/tools/R/logging.R
+++ b/src/library/tools/R/logging.R
@@ -1,7 +1,7 @@
 #  File src/library/tools/R/logging.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
-#  Copyright (C) 1995-2013 The R Core Team
+#  Copyright (C) 1995-2015 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
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 ### emulation of Perl Logfile.pm
 
@@ -27,6 +27,7 @@ function(filename = "")
     Log$con <- con
     Log$filename <- filename
     Log$stars <- "*"
+    Log$errors <- 0L
     Log$warnings <- 0L
     Log$notes <- 0L
 
@@ -78,6 +79,7 @@ function(Log, ...)
     resultLog(Log, "ERROR")
     text <- paste0(...)
     if (length(text) && nzchar(text)) printLog(Log, ..., "\n")
+    Log$errors <- Log$errors + 1L
 }
 
 ## <NOTE>
@@ -104,21 +106,23 @@ function(Log, text = "")
 summaryLog <-
 function(Log)
 {
-    if((Log$warnings > 0L) || (Log$notes > 0L)) {
-        if(Log$warnings > 1L)
-            printLog(Log,
-                     sprintf("WARNING: There were %d warnings.\n",
-                             Log$warnings))
-        else if(Log$warnings == 1L)
-            printLog(Log,
-                     sprintf("WARNING: There was 1 warning.\n"))
-        if(Log$notes > 1L)
-            printLog(Log,
-                     sprintf("NOTE: There were %d notes.\n",
-                             Log$notes))
-        else if(Log$notes == 1L)
-            printLog(Log,
-                     sprintf("NOTE: There was 1 note.\n"))
-        cat(sprintf("See\n  %s\nfor details.\n", sQuote(Log$filename)))
+    messageLog(Log, "DONE")
+    message("")
+    counts <- c(ERROR = Log$errors,
+                WARNING = Log$warnings,
+                NOTE = Log$notes)
+    counts <- counts[counts > 0L]
+    if(!length(counts))
+        printLog(Log,
+                 "Status: OK\n")
+    else {
+        printLog(Log,
+                 sprintf("Status: %s\n",
+                         paste(sprintf("%d %s%s",
+                                       counts,
+                                       names(counts),
+                                       ifelse(counts > 1L, "s", "")),
+                               collapse = ", ")))
+        message(sprintf("See\n  %s\nfor details.\n", sQuote(Log$filename)))
     }
 }
diff --git a/src/library/tools/R/makeLazyLoad.R b/src/library/tools/R/makeLazyLoad.R
index 43c6701..ad0da95 100644
--- a/src/library/tools/R/makeLazyLoad.R
+++ b/src/library/tools/R/makeLazyLoad.R
@@ -1,7 +1,7 @@
 #  File src/library/tools/R/makeLazyLoad.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
-#  Copyright (C) 1995-2012 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
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 code2LazyLoadDB <-
     function(package, lib.loc = NULL,
@@ -23,10 +23,7 @@ code2LazyLoadDB <-
 {
     pkgpath <- find.package(package, lib.loc, quiet = TRUE)
     if(!length(pkgpath))
-        stop(gettextf("there is no package called '%s'", package),
-             domain = NA)
-    loadenv <- new.env(hash=TRUE)
-    codeFile <- file.path(pkgpath, "R", package)
+        stop(gettextf("there is no package called '%s'", package), domain = NA)
     dbbase <- file.path(pkgpath, "R", package)
     if (packageHasNamespace(package, dirname(pkgpath))) {
         if (! is.null(.getNamespace(as.name(package))))
@@ -54,12 +51,19 @@ list_data_in_pkg <- function(package, lib.loc = NULL, dataDir = NULL)
                  domain = NA)
         dataDir <- file.path(pkgpath, "data")
     } else {
-        pkgpath <- sub("/data$", "", dataDir)
-        package <- basename(pkgpath)
-	# avoid builddir != srcdir problems -- assume package has been installed
-        lib.loc <- c(dirname(pkgpath), .libPaths())
+	if(has.pkg <- !missing(package)) ## try with default lib.loc
+	    pkgpath <- find.package(package, lib.loc, quiet = TRUE)
+	if(!has.pkg || !length(pkgpath)) {
+	   ## <FIXME> making assumptions about dataDir (e.g., pkgpath *NOT* from R-forge symlink)
+	    pkgpath <- sub("/data$", "", dataDir)
+	    ## avoid builddir != srcdir problems -- assume package has been installed
+	    ## making use of the fact that utils::data() works with *source* package:
+	    lib.loc <- c(dirname(pkgpath), .libPaths())
+	    if(!has.pkg)
+		package <- basename(pkgpath)
+	}
     }
-    if(file_test("-d", dataDir)) {
+    if(dir.exists(dataDir)) {
         if(file.exists(sv <- file.path(dataDir, "Rdata.rds"))) {
             ans <- readRDS(sv)
         } else if(file.exists(sv <- file.path(dataDir, "datalist"))) {
@@ -102,10 +106,10 @@ data2LazyLoadDB <- function(package, lib.loc = NULL, compress = TRUE)
         op <- options(encoding=enc)
         on.exit(options(encoding=op[[1L]]))
     }
-    if(file_test("-d", dataDir)) {
+    if(dir.exists(dataDir)) {
         if(file.exists(file.path(dataDir, "Rdata.rds")) &&
-	    file.exists(file.path(dataDir, paste(package, "rdx", sep="."))) &&
-	    file.exists(file.path(dataDir, paste(package, "rdb", sep="."))) ){
+	    file.exists(file.path(dataDir, paste0(package, ".rdx"))) &&
+	    file.exists(file.path(dataDir, paste0(package, ".rdb"))) ){
             warning("package seems to be using lazy loading for data already")
         }
 	else {
@@ -151,6 +155,11 @@ data2LazyLoadDB <- function(package, lib.loc = NULL, compress = TRUE)
 makeLazyLoadDB <- function(from, filebase, compress = TRUE, ascii = FALSE,
                            variables)
 {
+    ## pre-empt any problems with interpretation of 'ascii'
+    ascii <- as.logical(ascii)
+    if (is.na(ascii)) stop("'ascii' must be TRUE or FALSE", domain = NA)
+    ascii <- as.integer(ascii)
+
     envlist <- function(e)
         .Internal(getVarsFromFrame(ls(e, all.names = TRUE), e, FALSE))
 
@@ -168,7 +177,7 @@ makeLazyLoadDB <- function(from, filebase, compress = TRUE, ascii = FALSE,
         getenv <- function(n) find(n, enames, envs)
         insert <- function(e) {
             idx <<- idx + 1
-            name <- paste("env", idx, sep="::")
+            name <- paste0("env::", idx)
             envs <<- c(e, envs)
             enames <<- c(name, enames)
             name
@@ -187,8 +196,8 @@ makeLazyLoadDB <- function(from, filebase, compress = TRUE, ascii = FALSE,
        .Internal(lazyLoadDBinsertValue(x[[1L]], file, ascii, compress, hook))
     }
 
-    mapfile <- paste(filebase, "rdx", sep = ".")
-    datafile <- paste(filebase, "rdb", sep = ".")
+    mapfile <- paste0(filebase, ".rdx")
+    datafile <- paste0(filebase, ".rdb")
     close(file(datafile, "wb")) # truncate to zero
     table <- envtable()
     varenv <- new.env(hash = TRUE)
@@ -250,7 +259,8 @@ makeLazyLoading <-
              keep.source = getOption("keep.source.pkgs"))
 {
     if(!is.logical(compress) && ! compress %in% c(2,3))
-        stop("invalid value for 'compress': should be FALSE, TRUE, 2 or 3")
+	stop(gettextf("invalid value for '%s' : %s", "compress",
+		      "should be FALSE, TRUE, 2 or 3"), domain = NA)
     options(warn = 1L)
     findpack <- function(package, lib.loc) {
         pkgpath <- find.package(package, lib.loc, quiet = TRUE)
@@ -271,7 +281,7 @@ makeLazyLoading <-
         warning("package contains no R code")
         return(invisible())
     }
-    if (file.info(codeFile)["size"] == file.info(loaderFile)["size"])
+    if (file.size(codeFile) == file.size(loaderFile))
         warning("package seems to be using lazy loading already")
     else {
         code2LazyLoadDB(package, lib.loc = lib.loc,
diff --git a/src/library/tools/R/md5.R b/src/library/tools/R/md5.R
index 9a3c7ee..a9c5ac1 100644
--- a/src/library/tools/R/md5.R
+++ b/src/library/tools/R/md5.R
@@ -1,7 +1,7 @@
 #  File src/library/tools/R/md5.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
-#  Copyright (C) 1995-2012 The R Core Team
+#  Copyright (C) 1995-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
@@ -14,10 +14,10 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 md5sum <- function(files)
-    structure(.Call(Rmd5, files), names=files)
+    structure(.Call(C_Rmd5, files), names=files)
 
 .installMD5sums <- function(pkgDir, outDir = pkgDir)
 {
diff --git a/src/library/tools/R/news.R b/src/library/tools/R/news.R
index 9233fed..800a0d9 100644
--- a/src/library/tools/R/news.R
+++ b/src/library/tools/R/news.R
@@ -1,7 +1,7 @@
 #  File src/library/tools/R/news.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
-#  Copyright (C) 1995-2013 The R Core Team
+#  Copyright (C) 1995-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
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 
 ## .build_news_db_from_R_NEWS <-
@@ -24,7 +24,7 @@
 ##     ## This currently is a list of x.y lists of x.y.z lists of
 ##     ## categories list of entries.
 ##     flatten <- function(e)
-##         cbind(rep.int(names(e), sapply(e, length)),
+##         cbind(rep.int(names(e), lengths(e)),
 ##               unlist(lapply(e,
 ##                             function(s) {
 ##                                 ## Also remove leading white space and
@@ -286,9 +286,7 @@ function(file)
     exdent <- exdent[exdent > 1L]
     if(length(exdent)) {
         out[, 4L] <-
-            gsub(sprintf("\n%s",
-                         paste(rep.int(" ", min(exdent) - 1L),
-                               collapse = "")),
+            gsub(sprintf("\n%s", strrep(" ", min(exdent) - 1L)),
                  "\n", entries)
     }
 
@@ -327,13 +325,15 @@ function(f, out = "") {
     Rd2txt(f, out,
            stages = c("install", "render"),
            outputEncoding = if(l10n_info()[["UTF-8"]]) "" else "ASCII//TRANSLIT",
-           options = Rd2txt_NEWS_in_Rd_options)
+           options = Rd2txt_NEWS_in_Rd_options,
+           macros = file.path(R.home("share"), "Rd", "macros", "system.Rd"))
  }
 
 Rd2HTML_NEWS_in_Rd <-
 function(f, out, ...) {
     if (grepl("[.]rds$", f)) f <- readRDS(f)
-    Rd2HTML(f, out, stages = c("install", "render"), ...)
+    Rd2HTML(f, out, stages = c("install", "render"),
+           macros = file.path(R.home("share"), "Rd", "macros", "system.Rd"), ...)
 }
 
 Rd2pdf_NEWS_in_Rd <-
@@ -342,14 +342,15 @@ function(f, pdf_file)
     if (grepl("[.]rds$", f)) f <- readRDS(f)
     f2 <- tempfile()
     ## See the comments in ?texi2dvi about spaces in paths
-    f3 <- if(grepl(" ", td <- Sys.getenv("TMPDIR")))
+    f3 <- if(grepl(" ", Sys.getenv("TMPDIR")))
         file.path("/tmp", "NEWS.tex")
     else
         file.path(tempdir(), "NEWS.tex")
     out <- file(f3, "w")
     Rd2latex(f, f2,
              stages = c("install", "render"),
-             outputEncoding = "UTF-8", writeEncoding = FALSE)
+             outputEncoding = "UTF-8", writeEncoding = FALSE,
+             macros = file.path(R.home("share"), "Rd", "macros", "system.Rd"))
     cat("\\documentclass[", Sys.getenv("R_PAPERSIZE"), "paper]{book}\n",
         "\\usepackage[ae,hyper]{Rd}\n",
         "\\usepackage[utf8]{inputenc}\n",
@@ -369,7 +370,9 @@ function(f, pdf_file)
     close(out)
     od <- setwd(dirname(f3))
     on.exit(setwd(od))
-    texi2pdf("NEWS.tex", quiet = TRUE)
+    ## avoid broken texi2pdf scripts: this is simple LaTeX
+    ## and emulation suffices
+    texi2pdf("NEWS.tex", quiet = TRUE, texi2dvi = "emulation")
     setwd(od); on.exit()
     invisible(file.copy(file.path(dirname(f3), "NEWS.pdf"),
                         pdf_file, overwrite = TRUE))
@@ -385,17 +388,37 @@ function(file, out = stdout(), codify = FALSE)
     ## can use the DESCRIPTION metadata to obtain the package name and
     ## encoding.
 
-    file <- file_path_as_absolute(file)
-    dir <- dirname(file)
     format <- "default"
-    if(file_test("-f", dfile <- file.path(dir, "DESCRIPTION")))
-        meta <- .read_description(dfile)
-    else if(basename(dir) == "inst" &&
-            file_test("-f", dfile <- file.path(dirname(dir),
-                                               "DESCRIPTION")))
-        meta <- .read_description(dfile)
-    else
-        format <- "R"
+
+    file <- file_path_as_absolute(file)
+
+    if(file_test("-d", file)) {
+        dir <- file
+        dfile <- file.path(dir, "DESCRIPTION")
+        if(!file_test("-f", dfile))
+            stop("DESCRIPTION file not found")
+        file <- file.path(dir, "inst", "NEWS")
+        if(!file_test("-f", file)) {
+            file <- file.path(dir, "NEWS")
+            if(!file_test("-f", file))
+                stop("NEWS file not found")
+        }
+    } else {
+        dir <- dirname(file)
+        dfile <- file.path(dir, "DESCRIPTION")
+        if(!file_test("-f", dfile)) {
+            if((basename(dir) != "inst") ||
+               !file_test("-f",
+                          dfile <- file.path(dirname(dir),
+                                             "DESCRIPTION")))
+                stop("DESCRIPTION file not found")
+        }
+    }
+
+    ## No longer support taking NEWS files without correponding
+    ## DESCRIPTION file as being from R itself (PR #16556).
+
+    meta <- .read_description(dfile)
 
     wto <- function(x) writeLines(x, con = out, useBytes = TRUE)
     cre <- "(\\W|^)(\"[[:alnum:]_.]*\"|[[:alnum:]_.:]+\\(\\))(\\W|$)"
@@ -511,13 +534,6 @@ function(file, out = stdout(), codify = FALSE)
     }
 }
 
-Rd_expr_PR <-
-function(x)
-{
-    baseurl <- "https://bugs.R-project.org/bugzilla3/show_bug.cgi?id"
-    sprintf("\\href{%s=%s}{PR#%s}", baseurl, x, x)
-}
-
 .build_news_db_from_R_NEWS_Rd <-
 function(file = NULL)
 {
@@ -526,12 +542,13 @@ function(file = NULL)
     else {
         ## Expand \Sexpr et al now because this does not happen when using
         ## fragments.
-        prepare_Rd(parse_Rd(file), stages = "install")
+        macros <- initialRdMacros()
+        prepare_Rd(parse_Rd(file, macros = macros), stages = "install")
     }
 
     db <- .extract_news_from_Rd(x)
     db <- db[db[,1L] != "CHANGES in previous versions",,drop = FALSE]
-    
+
     ## Squeeze in an empty date column.
     .make_news_db(cbind(sub("^CHANGES IN (R )?(VERSION )?", "", db[, 1L]),
                         NA_character_,
@@ -544,28 +561,33 @@ function(file = NULL)
 .build_news_db_from_package_NEWS_Rd <-
 function(file)
 {
-    x <- prepare_Rd(parse_Rd(file), stages = "install")
+    macros <- initialRdMacros()
+    x <- prepare_Rd(parse_Rd(file, macros = macros), stages = "install")
 
     db <- .extract_news_from_Rd(x)
 
     ## Post-process section names to extract versions and dates.
     re_v <- sprintf(".*version[[:space:]]+(%s).*$",
                     .standard_regexps()$valid_package_version)
-    re_d <- sprintf("^.*(%s)[[:punct:][:space:]]*$",
-                    "[[:digit:]]{4}-[[:digit:]]{2}-[[:digit:]]{2}")
-
+    reDt <- "[[:digit:]]{4}-[[:digit:]]{2}-[[:digit:]]{2}"
+    rEnd <- "[[:punct:][:space:]]*$"
+    re_d1 <- sprintf(paste0("^.*(%s)", rEnd), reDt)
+    ## or ending with '(YYYY-MM-DD, <note>)'
+    re_d2 <- sprintf(paste0("^.*\\((%s)[[:punct:]] .*\\)", rEnd), reDt)
     nms <- db[, 1L]
     ind <- grepl(re_v, nms, ignore.case = TRUE)
     if(!all(ind))
         warning("Cannot extract version info from the following section titles:\n",
-                sprintf("  %s", unique(nms[!ind])))
+		paste(unique(nms[!ind]), collapse = "  "))
     .make_news_db(cbind(ifelse(ind,
-                               sub(re_v, "\\1", nms, ignore.case = TRUE),
-                               NA_character_),
-                        ifelse(grepl(re_d, nms, perl = TRUE),
-                               sub(re_d, "\\1", nms, perl = TRUE),
-                               NA_character_),
-                        db[, 2L],
+			       sub(re_v, "\\1", nms, ignore.case = TRUE),
+			       NA_character_),
+			ifelse(grepl(re_d1, nms, perl = TRUE),
+			       sub(re_d1, "\\1", nms, perl = TRUE),
+			       ifelse(grepl(re_d2, nms, perl = TRUE),
+				      sub(re_d2, "\\1", nms, perl = TRUE),
+				      NA_character_)),
+			db[, 2L],
                         sub("\n*$", "", db[, 3L])),
                   logical(nrow(db)),
                   "news_db_from_Rd")
@@ -574,10 +596,10 @@ function(file)
 .extract_news_from_Rd <-
 function(x)
 {
-    .get_Rd_section_names <- function(x)
+    get_section_names <- function(x)
         sapply(x, function(e) .Rd_get_text(e[[1L]]))
 
-    do_chunk <- function(x) {
+    get_item_texts <- function(x) {
         ## Currently, chunks should consist of a single \itemize list
         ## containing the news items.  Notify if there is more than one
         ## such list, and stop if there is none.
@@ -609,28 +631,28 @@ function(x)
 
         ## Try to find the column offset of the top-level bullets.
         pat <- "^( *)\036.*"
-        off <- min(nchar(sub(pat, "\\1", out[grepl(pat, out)])))
-        pat <- sprintf("^%s\036 ",
-                       paste(rep.int(" ", off), collapse = ""))
+        pos <- grep(pat, out)
+        if(!length(pos)) return(character())
+        off <- min(nchar(sub(pat, "\\1", out[pos])))
+        pat <- sprintf("^%s\036 *", strrep(" ", off))
         s <- sub(pat, "\036", out)
         ## Try to remove some indent for nested material.
-        pat <- sprintf("^%s",
-                       paste(rep.int(" ", off + 2L), collapse = ""))
+        pat <- sprintf("^%s", strrep(" ", off + 2L))
         s <- sub(pat, "", s)
 
         s <- paste(s, collapse = "\n")
-        s <- sub("^[[:space:]]*\036", "", s)
-        s <- sub("[[:space:]]*$", "", s)
-        ## <FIXME>
-        ## Could be more fancy and use \u2022 "if possible".
-        gsub("\036", "*", unlist(strsplit(s, "\n\036", fixed = TRUE)))
-        ## </FIXME>
+        s <- trimws(gsub("\036", "*",
+                         unlist(strsplit(s, "\n\036", fixed = TRUE))))
+        s[nzchar(s)]
     }
 
+    cbind_safely <- function(u, v)
+        cbind(rep_len(u, NROW(v)), v)
+
     y <- x[RdTags(x) == "\\section"]
     do.call(rbind,
-            Map(cbind,
-                .get_Rd_section_names(y),
+            Map(cbind_safely,
+                get_section_names(y),
                 lapply(y,
                        function(e) {
                            z <- e[[2L]]
@@ -638,13 +660,14 @@ function(x)
                            if(any(ind)) {
                                z <- z[ind]
                                do.call(rbind,
-                                       Map(cbind,
-                                           .get_Rd_section_names(z),
+                                       Map(cbind_safely,
+                                           get_section_names(z),
                                            lapply(z,
                                                   function(e)
-                                                  do_chunk(e[[2L]]))))
+                                                  get_item_texts(e[[2L]]))))
                            } else {
-                               cbind(NA_character_, do_chunk(z))
+                               cbind_safely(NA_character_,
+                                            get_item_texts(z))
                            }
                        })))
 
diff --git a/src/library/tools/R/package.dependencies.R b/src/library/tools/R/package.dependencies.R
deleted file mode 100644
index ff5b0e8..0000000
--- a/src/library/tools/R/package.dependencies.R
+++ /dev/null
@@ -1,91 +0,0 @@
-#  File src/library/tools/R/package.dependencies.R
-#  Part of the R package, http://www.R-project.org
-#
-#  Copyright (C) 1995-2012 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
-#  the Free Software Foundation; either version 2 of the License, or
-#  (at your option) any later version.
-#
-#  This program is distributed in the hope that it will be useful,
-#  but WITHOUT ANY WARRANTY; without even the implied warranty of
-#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-#  GNU General Public License for more details.
-#
-#  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
-
-## This is called only with check = FALSE in getDepMtrx/getRemotePkgDepends
-
-package.dependencies <-
-    function(x, check = FALSE, depLevel = c("Depends", "Imports", "Suggests"))
-{
-    depLevel <- match.arg(depLevel)
-
-    if(!is.matrix(x))
-        x <- matrix(x, nrow = 1L, dimnames = list(NULL, names(x)))
-
-    deps <- list()
-    for(k in 1L:nrow(x)){
-        z <- x[k, depLevel]
-        if(!is.na(z) & z != ""){
-            ## split dependencies, remove leading and trailing whitespace
-            z <- unlist(strsplit(z, ",", fixed=TRUE))
-            z <- sub("^[[:space:]]*(.*)", "\\1", z)
-            z <- sub("(.*)[[:space:]]*$", "\\1", z)
-
-            ## split into package names and version
-            pat <- "^([^\\([:space:]]+)[[:space:]]*\\(([^\\)]+)\\).*"
-            deps[[k]] <-
-                cbind(sub(pat, "\\1", z), sub(pat, "\\2", z), NA)
-
-            noversion <- deps[[k]][,1] == deps[[k]][,2]
-            deps[[k]][noversion,2] <- NA
-
-            ## split version dependency into operator and version number
-            pat <- "[[:space:]]*([[<>=]+)[[:space:]]+(.*)"
-            deps[[k]][!noversion, 2:3] <-
-                c(sub(pat, "\\1", deps[[k]][!noversion, 2]),
-                  sub(pat, "\\2", deps[[k]][!noversion, 2]))
-        }
-        else
-            deps[[k]] <- NA
-    }
-
-    if(check){
-        z <- rep.int(TRUE, nrow(x))
-        for(k in 1L:nrow(x)) {
-            ## currently we only check the version of R itself
-            if(!is.na(deps[[k]]) &&
-               any(ok <- deps[[k]][,1] == "R")) {
-                ## NOTE: currently operators must be `<=' or `>='.
-                if(!is.na(deps[[k]][ok, 2])
-                   && deps[[k]][ok, 2] %in% c("<=", ">=")) {
-                    ## careful.  We don't want 1.9.1 < 1.50
-                    op <- deps[[k]][ok,2]
-                    x1 <- rep.int(0, 6)
-                    y <- c(R.version$major,
-                           strsplit(R.version$minor, ".", fixed=TRUE)[[1L]])
-                    x1[seq_along(y)] <- y
-                    y <- strsplit(deps[[k]][ok,3], ".", fixed=TRUE)[[1L]]
-                    x1[3+seq_along(y)] <- y
-                    x1 <- format(x1, justify="right")
-                    x2 <- paste(x1[4:6], collapse=".")
-                    x1 <- paste(x1[1L:3], collapse=".")
-                    comptext <- paste0("'", x1, "' ", op, " '", x2, "'")
-                    compres <- try(eval(parse(text = comptext)))
-                    if(!inherits(compres, "try-error")) {
-                        z[k] <- compres
-                    }
-                }
-            }
-        }
-        names(z) <- x[,"Package"]
-        return(z)
-    }
-    else{
-        names(deps) <- x[,"Package"]
-        return(deps)
-    }
-}
diff --git a/src/library/tools/R/packages.R b/src/library/tools/R/packages.R
index 8d477d8..309c531 100644
--- a/src/library/tools/R/packages.R
+++ b/src/library/tools/R/packages.R
@@ -1,7 +1,7 @@
-#  File src/library/tools/R/writePACKAGES.R
-#  Part of the R package, http://www.R-project.org
+#  File src/library/tools/R/packages.R
+#  Part of the R package, https://www.R-project.org
 #
-#  Copyright (C) 1995-2013 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
@@ -14,20 +14,17 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 write_PACKAGES <-
 function(dir = ".", fields = NULL,
          type = c("source", "mac.binary", "win.binary"),
          verbose = FALSE, unpacked = FALSE, subdirs = FALSE,
-         latestOnly = TRUE, addFiles = FALSE)
+         latestOnly = TRUE, addFiles = FALSE, rds_compress = TRUE)
 {
     if(missing(type) && .Platform$OS.type == "windows")
         type <- "win.binary"
     type <- match.arg(type)
-    nfields <- 0
-    out <- file(file.path(dir, "PACKAGES"), "wt")
-    outgz <- gzfile(file.path(dir, "PACKAGES.gz"), "wt")
 
     paths <- ""
     if(is.logical(subdirs) && subdirs) {
@@ -37,10 +34,20 @@ function(dir = ".", fields = NULL,
         paths <- c("", paths[paths != "."])
     } else if(is.character(subdirs)) paths <- c("", subdirs)
 
+    ## Older versions created only plain text and gzipped DCF files with
+    ## the (non-missing and non-empty) package db entries, and hence did
+    ## so one path at a time.  We now also serialize the db directly,
+    ## and hence first build the whole db, and then create the files in
+    ## case some packages were found.
+
+    db <- NULL
+    addPaths <- !identical(paths, "")
+
     for(path in paths) {
         this <- if(nzchar(path)) file.path(dir, path) else dir
         desc <- .build_repository_package_db(this, fields, type, verbose,
                                              unpacked)
+        desc <- Filter(length, desc)
 
         if(length(desc)) {
             Files <- names(desc)
@@ -48,6 +55,7 @@ function(dir = ".", fields = NULL,
             desc <- matrix(unlist(desc), ncol = length(fields), byrow = TRUE)
             colnames(desc) <- fields
             if(addFiles) desc <- cbind(desc, File = Files)
+            if(addPaths) desc <- cbind(desc, Path = path)
             if(latestOnly) desc <- .remove_stale_dups(desc)
 
             ## Standardize licenses or replace by NA.
@@ -57,25 +65,27 @@ function(dir = ".", fields = NULL,
                        license_info$standardization,
                        NA)
 
-            ## Writing PACKAGES file from matrix desc linewise in order to
-            ## omit NA entries appropriately:
-            for(i in seq_len(nrow(desc))){
-                desci <- desc[i, !(is.na(desc[i, ]) | (desc[i, ] == "")),
-                              drop = FALSE]
-                write.dcf(desci, file = out)
-                if(nzchar(path)) cat("Path: ", path, "\n", sep = "", file = out)
-                cat("\n", file = out)
-                write.dcf(desci, file = outgz)
-                if(nzchar(path)) cat("Path: ", path, "\n", sep = "", file = outgz)
-                cat("\n", file = outgz)
-            }
-            nfields <- nfields + nrow(desc)
+            db <- rbind(db, desc)
         }
     }
 
-    close(out)
-    close(outgz)
-    invisible(nfields)
+    np <- NROW(db)
+    if(np > 0L) {
+        ## To save space, empty entries are not written to the DCF, so
+        ## that read.dcf() on these will have the entries as missing.
+        ## Hence, change empty to missing in the db.
+        db[!is.na(db) & (db == "")] <- NA_character_
+        con <- file(file.path(dir, "PACKAGES"), "wt")
+        write.dcf(db, con)
+        close(con)
+        con <- gzfile(file.path(dir, "PACKAGES.gz"), "wt")
+        write.dcf(db, con)
+        close(con)
+        rownames(db) <- db[, "Package"]
+        saveRDS(db, file.path(dir, "PACKAGES.rds"), compress = rds_compress)
+    }
+
+    invisible(np)
 }
 
 ## this is OK provided all the 'fields' are ASCII -- so be careful
@@ -118,7 +128,7 @@ function(dir, fields = NULL,
     if(type == "win.binary") {
         files <- file.path(dir, files)
         for(i in seq_along(files)) {
-            if(verbose) message(paste(" ", files[i]))
+            if(verbose) message(paste0("  ", files[i]))
             con <- unz(files[i], file.path(packages[i], "DESCRIPTION"))
             temp <- tryCatch(read.dcf(con, fields = fields)[1L, ],
                              error = identity)
@@ -140,7 +150,7 @@ function(dir, fields = NULL,
         on.exit(unlink(td, recursive = TRUE), add = TRUE)
         setwd(td)
         for(i in seq_along(files)) {
-            if(verbose) message(paste(" ", files[i]))
+            if(verbose) message(paste0("  ", files[i]))
             p <- file.path(packages[i], "DESCRIPTION")
             ## temp <- try(system(paste("tar zxf", files[i], p)))
             temp <- try(utils::untar(files[i], files = p))
@@ -156,6 +166,11 @@ function(dir, fields = NULL,
                     }
                     temp["MD5sum"] <- md5sum(files[i])
                     db[[i]] <- temp
+                } else {
+                    message(gettextf("reading DESCRIPTION for package %s failed with message:\n  %s",
+                                     sQuote(basename(dirname(p))),
+                                     conditionMessage(temp)),
+                            domain = NA)
                 }
             }
             unlink(packages[i], recursive = TRUE)
@@ -173,23 +188,28 @@ function(dir, fields = NULL, verbose = getOption("verbose"))
     dir <- file_path_as_absolute(dir)
     fields <- unique(c(.get_standard_repository_db_fields(), fields))
     paths <- list.files(dir, full.names = TRUE)
-    paths <- paths[file_test("-d", paths) &
+    paths <- paths[dir.exists(paths) &
                    file_test("-f", file.path(paths, "DESCRIPTION"))]
     db <- vector(length(paths), mode = "list")
     if(verbose) message("Processing packages:")
     for(i in seq_along(paths)) {
-        if(verbose) message(paste(" ", basename(paths[i])))
+        if(verbose) message(paste0("  ", basename(paths[i])))
         temp <- tryCatch(read.dcf(file.path(paths[i], "DESCRIPTION"),
                                   fields = fields)[1L, ],
                          error = identity)
         if(!inherits(temp, "error")) {
             if(is.na(temp["NeedsCompilation"])) {
                 temp["NeedsCompilation"] <-
-                    if(file_test("-d", file.path(paths[i], "src"))) "yes" else "no"
+                    if(dir.exists(file.path(paths[i], "src"))) "yes" else "no"
             }
             ## Cannot compute MD5 sum of the source tar.gz when working
             ## on the unpacked sources ...
             db[[i]] <- temp
+        } else {
+            warning(gettextf("reading DESCRIPTION for package %s failed with message:\n  %s",
+                             sQuote(basename(paths[i])),
+                             conditionMessage(temp)),
+                    domain = NA)
         }
     }
     if(verbose) message("done")
@@ -200,7 +220,7 @@ function(dir, fields = NULL, verbose = getOption("verbose"))
 dependsOnPkgs <-
 function(pkgs, dependencies = c("Depends", "Imports", "LinkingTo"),
          recursive = TRUE, lib.loc = NULL,
-         installed = installed.packages(lib.loc, fields = "Enhances"))
+         installed = utils::installed.packages(lib.loc, fields = "Enhances"))
 {
     if(identical(dependencies, "all"))
         dependencies <-
@@ -253,14 +273,16 @@ function(ap)
 }
 
 package_dependencies <-
-function(packages = NULL, db,
+function(packages = NULL, db = NULL,
          which = c("Depends", "Imports", "LinkingTo"),
-         recursive = FALSE, reverse = FALSE)
+         recursive = FALSE, reverse = FALSE, verbose = getOption("verbose"))
 {
     ## <FIXME>
     ## What about duplicated entries?
     ## </FIXME>
 
+    if(is.null(db)) db <- utils::available.packages()
+
     ## For given packages which are not found in the db, return "list
     ## NAs" (i.e., NULL entries), as opposed to character() entries
     ## which indicate no dependencies.
@@ -316,7 +338,7 @@ function(packages = NULL, db,
     if(!recursive) {
         ## Need to invert.
         depends <-
-            split(rep.int(db[, "Package"], sapply(depends, length)),
+            split(rep.int(db[, "Package"], lengths(depends)),
                   factor(unlist(depends), levels = all_packages))
         if(!is.null(packages)) {
             depends <- depends[match(packages, names(depends))]
@@ -338,18 +360,15 @@ function(packages = NULL, db,
     ## with i R j and j R k, respectively, and combine these.
     ## This works reasonably well, but of course more efficient
     ## implementations should be possible.
+    matchP <- match(rep.int(db[, "Package"], lengths(depends)),
+		    all_packages)
+    matchD <- match(unlist(depends), all_packages)
     tab <- if(reverse)
-        split(match(rep.int(db[, "Package"],
-                            sapply(depends, length)),
-                    all_packages),
-              factor(match(unlist(depends), all_packages),
-                     levels = seq_along(all_packages)))
+	split(matchP,
+	      factor(matchD, levels = seq_along(all_packages)))
     else
-        split(match(unlist(depends), all_packages),
-              factor(match(rep.int(db[, "Package"],
-                                   sapply(depends, length)),
-                           all_packages),
-                     levels = seq_along(all_packages)))
+	split(matchD,
+	      factor(matchP, levels = seq_along(all_packages)))
     if(is.null(packages)) {
         if(reverse) {
             packages <- all_packages
@@ -367,23 +386,21 @@ function(packages = NULL, db,
         }
     }
     p_R <- tab[p_L]
-    pos <- cbind(rep.int(p_L, sapply(p_R, length)), unlist(p_R))
-    ctr <- 1L
-    verbose <- getOption("verbose")
+    pos <- cbind(rep.int(p_L, lengths(p_R)), unlist(p_R))
+    ctr <- 0L
     repeat {
-        if(verbose) cat("Cycle:", ctr)
+        if(verbose) cat("Cycle:", (ctr <- ctr + 1L))
         p_L <- split(pos[, 1L], pos[, 2L])
         new <- do.call(rbind,
                        Map(function(i, k)
                            cbind(rep.int(i, length(k)),
-                                     rep(k, each = length(i))),
+                                 rep(k, each = length(i))),
                            p_L, tab[as.integer(names(p_L))]))
         npos <- unique(rbind(pos, new))
         nnew <- nrow(npos) - nrow(pos)
         if(verbose) cat(" NNew:", nnew, "\n")
         if(!nnew) break
         pos <- npos
-        ctr <- ctr + 1L
     }
     depends <-
         split(all_packages[pos[, 2L]],
@@ -399,15 +416,6 @@ function(packages = NULL, db,
 }
 
 
-.package_dependencies <- function(packages = NULL, db,
-         which = c("Depends", "Imports", "LinkingTo"),
-         recursive = FALSE, reverse = FALSE)
-{
-    .Deprecated("package_dependencies")
-    package_dependencies(packages = packages, db = db,
-         which = which, recursive = recursive, reverse = reverse)
-}
-
 .extract_dependency_package_names <-
 function(x) {
     ## Assume a character *string*.
diff --git a/src/library/tools/R/parseLatex.R b/src/library/tools/R/parseLatex.R
index 4053ecf..bcdb544 100644
--- a/src/library/tools/R/parseLatex.R
+++ b/src/library/tools/R/parseLatex.R
@@ -1,7 +1,7 @@
 #  File src/library/tools/R/parseLatex.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
-#  Copyright (C) 1995-2012 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
@@ -14,17 +14,18 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
-## this is called during package installation via makeLatex()
+## This is called during package installation via makeLatex()
+## so we can't use the symbol C_parseLatex here
 parseLatex <- function(text, filename = deparse(substitute(text)),
                      verbose = FALSE, verbatim = c("verbatim", "verbatim*",
                      "Sinput", "Soutput") )
 {
     ## the internal function must get some sort of srcfile
-    srcfile <- srcfilecopy(filename, text, file.info(filename)[1,"mtime"])
+    srcfile <- srcfilecopy(filename, text, file.mtime(filename))
     text <- paste(text, collapse="\n")
-    .External2("C_parseLatex", text, srcfile, verbose, as.character(verbatim),
+    .External2("parseLatex", text, srcfile, verbose, as.character(verbatim),
                PACKAGE = "tools")
 }
 
@@ -106,6 +107,10 @@ latexToUtf8 <- function(x)
 			    k <- k+1L
 			},
 			COMMENT = getNext <- TRUE, # strip comments
+			MACRO = { # Something like \'\i; assume 2nd macro has no args
+			    args[[k]] <- nextobj
+			    k <- k+1L
+			},
 			BLOCK =,
 			ENVIRONMENT =,
 			MATH = {
diff --git a/src/library/tools/R/parseRd.R b/src/library/tools/R/parseRd.R
index 1892caa..0ae91b2 100644
--- a/src/library/tools/R/parseRd.R
+++ b/src/library/tools/R/parseRd.R
@@ -1,7 +1,7 @@
 #  File src/library/tools/R/parseRd.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
-#  Copyright (C) 1995-2012 The R Core Team
+#  Copyright (C) 1995-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
@@ -14,11 +14,13 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 parse_Rd <- function(file, srcfile = NULL, encoding = "unknown",
                      verbose = FALSE, fragment = FALSE,
-                     warningCalls = TRUE)
+                     warningCalls = TRUE,
+                     macros = file.path(R.home("share"), "Rd", "macros", "system.Rd"),
+		     permissive = FALSE)
 {
     if(is.character(file)) {
         file0 <- file
@@ -32,6 +34,8 @@ parse_Rd <- function(file, srcfile = NULL, encoding = "unknown",
         }
     } else file0 <- "<connection>"
     lines <- readLines(file, warn = FALSE)
+    if(is.character(macros))
+    	macros <- initialRdMacros(macros = macros)
     ## remove old-style marking for data, keep line nos
     lines[lines == "\\non_function{}"] <- ""
     ## Extract the encoding if marked in the file:
@@ -39,7 +43,8 @@ parse_Rd <- function(file, srcfile = NULL, encoding = "unknown",
     ## Note this is required to be on a line by itself,
     ## but some people have preceding whitespace
     enc <- grep("\\encoding{", lines, fixed = TRUE, useBytes=TRUE)
-    enc <- grep("^[[:space:]]*\\\\encoding\\{([^}]*)\\}.*", lines[enc], value=TRUE)
+    enc <- grep("^[[:space:]]*\\\\encoding\\{([^}]*)\\}.*", lines[enc],
+                value = TRUE)
     if(length(enc)) {
         if(length(enc) > 1L)
             warning(file0, ": multiple \\encoding lines, using the first",
@@ -63,16 +68,39 @@ parse_Rd <- function(file, srcfile = NULL, encoding = "unknown",
         if (any(is.na(iconv(lines, "", "ASCII"))))
             stop(file0, ": non-ASCII input and no declared encoding",
                  domain = NA, call. = warningCalls)
-    } else if (encoding != "UTF-8")
-    	lines <- iconv(lines, encoding, "UTF-8", sub = "byte")
+    } else {
+	if (encoding != "UTF-8")
+    	    lines <- iconv(lines, encoding, "UTF-8", sub = "byte")
+        ## Strip UTF-8 BOM if necessary.
+        bytes <- charToRaw(lines[1L])
+        if(identical(as.integer(bytes[1L : 3L]),
+                     c(0xefL, 0xbbL, 0xbfL)))
+            lines[1L] <- rawToChar(bytes[-(1L : 3L)])
+    }
 
     tcon <- file()
     writeLines(lines, tcon, useBytes = TRUE)
     on.exit(close(tcon))
 
-    result <- .External2(C_parseRd, tcon, srcfile, "UTF-8",
-                         verbose, basename, fragment, warningCalls)
-    expandDynamicFlags(result)
+    warndups <- config_val_to_logical(Sys.getenv("_R_WARN_DUPLICATE_RD_MACROS_", "FALSE"))
+
+    if (permissive)
+	# FIXME:  this should test for a special class of warning rather than testing the
+	#         message, but those are currently not easily generated from C code.
+	result <- withCallingHandlers(.External2(C_parseRd, tcon, srcfile, "UTF-8",
+                                                 verbose, basename, fragment,
+                                                 warningCalls, macros, warndups),
+		       warning = function(w)
+			    if (grepl("unknown macro", conditionMessage(w)))
+				invokeRestart("muffleWarning") )
+    else
+	result <- .External2(C_parseRd, tcon, srcfile, "UTF-8",
+                             verbose, basename, fragment, warningCalls,
+                             macros, warndups)
+    result <- expandDynamicFlags(result)
+    if (permissive)
+	result <- permissify(result)
+    result
 }
 
 print.Rd <- function(x, deparse = FALSE, ...)
@@ -84,8 +112,8 @@ print.Rd <- function(x, deparse = FALSE, ...)
 as.character.Rd <- function(x, deparse = FALSE, ...)
 {
     ZEROARG <- c("\\cr", "\\dots", "\\ldots", "\\R", "\\tab") # Only these cause trouble when {} is added
-    TWOARG <- c("\\section", "\\item", "\\enc", "\\method", "\\S3method",
-                "\\S4method", "\\tabular")
+    TWOARG <- c("\\section", "\\subsection", "\\item", "\\enc",
+                "\\method", "\\S3method", "\\S4method", "\\tabular")
     USERMACROS <- c("USERMACRO", "\\newcommand", "\\renewcommand")
     EQN <- c("\\deqn", "\\eqn", "\\figure")
     modes <- c(RLIKE = 1L, LATEXLIKE = 2L, VERBATIM = 3L, INOPTION = 4L, COMMENTMODE = 5L, UNKNOWNMODE = 6L)
@@ -150,8 +178,11 @@ as.character.Rd <- function(x, deparse = FALSE, ...)
     		dep <- deparseRdElement(as.character(x), c(state, tags[tag], inEqn, as.integer(quoteBraces)))
     	    	result <- dep[[1L]]
     	    	state <<- dep[[2L]][1L:2L]
-    	    } else
+    	    } else {
+	        if (inherits(x, "Rd"))
+		    class(x) <- setdiff(class(x), "Rd") # Avoid infinite recursion from misuse (PR#16448)
     	    	result <- as.character(x)
+	    }
     	    if (needBraces) {
     	    	if (grepl("^[[:alpha:]]", result)) result <- c("{}", result)
     	    	needBraces <<- FALSE
@@ -165,3 +196,41 @@ as.character.Rd <- function(x, deparse = FALSE, ...)
 
 deparseRdElement <- function(element, state)
     .Call(C_deparseRd, element, state)
+
+# Convert unknown tags into text displaying the tag with braces if necessary
+# This allows unknown LateX macros to be embedded in the text, and to be just passed
+# through.
+
+permissify <- function(Rd)
+{
+    tags <- RdTags(Rd)
+    oldclass <- class(Rd)
+    oldsrcref <- utils::getSrcref(Rd)
+    oldtag <- attr(Rd, "Rd_tag")
+    i <- 0
+    while (i < length(tags)) {
+        i <- i+1
+   	if (tags[i] == "UNKNOWN") {
+   	    Rd[[i]] <- tagged(Rd[[i]], "TEXT", utils::getSrcref(Rd[[i]]))
+            while (i < length(tags)) {
+		if (tags[i+1] == "LIST") {
+		    Rd <- c(Rd[seq_len(i)],
+                            list(tagged("{", "TEXT", utils::getSrcref(Rd[[i+1]]))),
+                            permissify(Rd[[i+1]]),
+                            list(tagged("}", "TEXT", utils::getSrcref(Rd[[i+1]]))),
+			    Rd[seq_along(Rd)[-seq_len(i+1)]])
+		    tags <- RdTags(Rd)
+		    i <- i+3
+		} else if (tags[i+1] == "TEXT" && grepl("^ *$", Rd[[i+1]]))
+		    i <- i + 1
+		else
+		    break
+            }
+        } else if (is.recursive(Rd[[i]]))
+            Rd[[i]] <- permissify(Rd[[i]])
+    }
+    class(Rd) <- oldclass
+    attr(Rd, "srcref") <- oldsrcref
+    attr(Rd, "Rd_tag") <- oldtag
+    Rd
+}
diff --git a/src/library/tools/R/pdftools.R b/src/library/tools/R/pdftools.R
index 220dc09..c9166f6 100644
--- a/src/library/tools/R/pdftools.R
+++ b/src/library/tools/R/pdftools.R
@@ -1,7 +1,7 @@
 #  File src/library/tools/R/pdftools.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
-#  Copyright (C) 1995-2013 The R Core Team
+#  Copyright (C) 1995-2014 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
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 ## See PDF Reference version 1.7 chapter 3:
 ##   At the most fundamental level, a PDF file is a sequence of 8-bit
@@ -92,7 +92,7 @@ function(file, cache = TRUE)
         ## there a way to get the connection closed when the doc object
         ## gets removed?
         ##   if(cache) {
-        ##       .bytes <- readBin(file, "raw", file.info(file)$size)
+        ##       .bytes <- readBin(file, "raw", file.size(file))
         ##       con <- rawConnection(.bytes)
         ##       keep <- TRUE
         ##   }
@@ -235,7 +235,7 @@ function(file, cache = TRUE)
             ## PDF 1.5+ cross-reference stream, hopefully.
             .con_seek(con, -1L, 2L)
             pos <- .con_seek(con)
-            hdr <- pdf_read_object_header(con)
+            pdf_read_object_header(con)
             obj <- pdf_read_object(con)
             if(!("Type" %in% names(obj)) ||
                !(obj[["Type"]] == "XRef")) {
@@ -1825,7 +1825,7 @@ function(con)
 raw_connection_to_bytes_in_file <-
 function(file)
 {
-    bytes <- readBin(file, "raw", file.info(file)$size)
+    bytes <- readBin(file, "raw", file.size(file))
     rawConnection(bytes)
 }
 
diff --git a/src/library/tools/R/pkgDepends.R b/src/library/tools/R/pkgDepends.R
deleted file mode 100644
index 6839ac5..0000000
--- a/src/library/tools/R/pkgDepends.R
+++ /dev/null
@@ -1,325 +0,0 @@
-#  File src/library/tools/R/pkgDepends.R
-#  Part of the R package, http://www.R-project.org
-#
-#  Copyright (C) 1995-2012 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
-#  the Free Software Foundation; either version 2 of the License, or
-#  (at your option) any later version.
-#
-#  This program is distributed in the hope that it will be useful,
-#  but WITHOUT ANY WARRANTY; without even the implied warranty of
-#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-#  GNU General Public License for more details.
-#
-#  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
-
-pkgDepends <- function(pkg, recursive=TRUE, local=TRUE,
-                       reduce=TRUE, lib.loc=NULL) {
-    if (length(pkg) != 1L)
-        stop("argument 'pkg' must be of length 1")
-
-    instPkgs <- utils::installed.packages(lib.loc=lib.loc)
-
-    depMtrx <- getDepMtrx(pkg, instPkgs, local)
-    if (is.null(depMtrx))               # Package was not found
-        stop(gettextf("package '%s' was not found", pkg),
-             domain = NA)
-
-    getDepList(depMtrx, instPkgs, recursive, local, reduce, lib.loc)
-}
-
-getDepList <- function(depMtrx, instPkgs, recursive=TRUE,
-                       local=TRUE, reduce=TRUE, lib.loc=NULL) {
-    out <- list(Depends=character(), Installed=character(),
-                Found=list(), NotFound=character(),
-                R=character())
-    class(out) <- c("DependsList", class(out))
-
-    if ((!is.matrix(depMtrx))&&(is.na(depMtrx))) # no dependencies
-        return(out)
-
-    mtrxList <- buildDepList(depMtrx, instPkgs, recursive, lib.loc)
-
-    if (local == FALSE) {
-        toFind <- mtrxList$Depends[!apply(mtrxList$Depends, 1,
-                                          isSatisfied,
-                                          mtrxList$Installed),,drop=FALSE]
-
-        if (reduce)
-            toFind <- reduceDepends(toFind)
-
-        if (length(toFind)) {
-            found <- foundDepends(toFind)
-            out$Found <- found$Found
-            mtrxList$NotFound <- found$NotFound
-        }
-    }
-
-    if (reduce == TRUE) {       # Found and NotFound are already reduced
-        mtrxList$R <- reduceDepends(mtrxList$R)
-        mtrxList$Depends <- reduceDepends(mtrxList$Depends)
-        mtrxList$Installed <- reduceDepends(mtrxList$Installed)
-    }
-
-
-    ## Massage the matrices back into dependency strings.  out$Found
-    ## is already assigned.
-    out$R <- depMtrxToStrings(mtrxList$R)
-    out$Depends <- depMtrxToStrings(mtrxList$Depends)
-    out$Installed <- depMtrxToStrings(mtrxList$Installed)
-    out$NotFound <- depMtrxToStrings(mtrxList$NotFound)
-
-    out
-}
-
-isSatisfied <- function(dep, instMtrx) {
-    triplets <- apply(instMtrx, 1L, paste, collapse=":")
-    match(paste(dep,collapse=":"), triplets, nomatch=0L) > 0L
-}
-
-buildDepList <- function(depMtrx, instPkgs, recursive=TRUE,
-                         lib.loc=NULL) {
-    mtrxList <- list(Depends=matrix(nrow=0L,ncol=3L),
-                     Installed=matrix(nrow=0L,ncol=3L), R=matrix(nrow=0L,ncol=3L))
-
-
-    ## First check to see if there is a dependency on R
-    ## If there is, then check it
-    whichR <- which(depMtrx[,1] == "R")
-    if (length(whichR)) {
-        mtrxList$R <- depMtrx[whichR,,drop=FALSE]
-        depMtrx <- depMtrx[-whichR,,drop=FALSE]
-    }
-
-    ## Get which of the direct depends are installed
-    instDeps <- depMtrx[installedDepends(depMtrx, instPkgs),,drop=FALSE]
-
-    if (recursive == TRUE) {
-        mtrxList$Depends <- depMtrx
-        mtrxList$Installed <- instDeps
-
-        for (curPkg in depMtrx[,1]) {
-            depMtrx <- getDepMtrx(curPkg, instPkgs)
-            ## Make sure this package was found & has deps
-            if ((is.null(depMtrx))||(is.na(depMtrx)))
-                next
-
-            curMtrxList <- buildDepList(depMtrx, instPkgs,
-                                             recursive=recursive,
-                                             lib.loc=lib.loc)
-            mtrxList$R <- rbind(mtrxList$R, curMtrxList$R)
-            mtrxList$Depends <- rbind(mtrxList$Depends,
-                                      curMtrxList$Depends)
-            mtrxList$Installed <- rbind(mtrxList$Installed,
-                                        curMtrxList$Installed)
-        }
-    }
-    else {                              # recurse is FALSE
-        mtrxList$Depends <- depMtrx
-        mtrxList$Installed <- instDeps
-    }
-
-    mtrxList
-}
-
-getDepMtrx <- function(pkg, instPkgs, local=TRUE) {
-
-    ## Need to see if pkg is installed - if not, get online
-    row <- match(pkg,instPkgs[,"Package"])
-    if (!is.na(row))                    # package is installed
-        pkgDeps <- package.dependencies(instPkgs[row,])[[1L]]
-    else {
-        if (local)
-            pkgDeps <- NULL
-        else
-            pkgDeps <- getRemotePkgDepends(pkg)
-    }
-
-    pkgDeps        # Either a matrix, NA if no deps or NULL if not found
-}
-
-getRemotePkgDepends <- function(pkg, contriburl=getOption("repos")) {
-    ## Will get the dependencies of a package from
-    ## online repositories.  Returns NULL if it
-    ## cannot be found, otherwise returns the row provided
-    ## by available.packages().
-
-    if(is.null(contriburl))
-        contriburl <- utils::contrib.url(getOption("repos"))
-
-    cran <- utils::available.packages(contriburl=contriburl)
-    whichRow <- which(pkg == cran[,"Package"])
-    if (length(whichRow)) {
-        return(package.dependencies(cran[whichRow,])[[1L]])
-    }
-    else
-        NULL
-}
-
-installedDepends <- function(depMtrx, instPkgs) {
-    ## Given a matrix of packages, will return a vector of row
-    ## numbers that correspond to packages in the matrix where
-    ## the dependency is met by installed packages
-
-    pkgs <- depMtrx[,1]
-    passPkgs <- character()
-    if (length(pkgs)) {
-        installed <- (match(pkgs, instPkgs[,"Package"], nomatch=0L) > 0L)
-
-        curPkgs <- depMtrx[installed,,drop=FALSE]
-        if (nrow(curPkgs)) {
-            passVersReq <- apply(curPkgs, 1L, function(x) {
-                pkgVers <- instPkgs[instPkgs[,1]==x[1L],"Version"]
-                if (is.na(x[2L])||
-                    (compareDependsPkgVersion(pkgVers,
-                                              x[2L], x[3L]) >= 0))
-                    TRUE
-                else
-                    FALSE
-            })
-            passPkgs <- c(passPkgs,curPkgs[passVersReq,1])
-
-            return(which(match(depMtrx[,1],passPkgs,nomatch=0L) > 0L))
-        }
-    }
-
-    return(numeric())
-}
-
-foundDepends <- function(depMtrx, contriburl=getOption("repos")) {
-    out <- list(Found=list())
-    foundRows <- numeric()
-
-    if(is.null(contriburl))
-        contriburl <-
-            utils::contrib.url(c(CRAN = getOption("repos")["CRAN"],
-                                 BIOC = getOption("BIOC")))
-
-
-    for (j in seq_along(contriburl)) {
-        cur <- character()
-        cran <- utils::available.packages(contriburl=contriburl[j])
-
-        if (nrow(depMtrx) > 0) {
-            for (i in 1L:nrow(depMtrx)) {
-                found <- FALSE
-                cranRow <- which(depMtrx[i,1] == cran[,1])
-                if (length(cranRow)) {
-                    ## Found it in repos
-                    if (is.na(depMtrx[i,2])) # no version, automatically okay
-                        found <- TRUE
-                    else if(compareDependsPkgVersion(cran[cranRow, "Version"],
-                                                     depMtrx[i,2],
-                                                     depMtrx[i,3]))
-                        found <- TRUE
-                }
-                if (found) {
-                    foundRows <- c(foundRows,i)
-                    cur <- c(cur,depMtrx[i,1])
-                }
-            }
-        }
-
-        if (length(cur))
-            out$Found[contriburl[j]] <- cur
-    }
-
-    if (length(foundRows) != nrow(depMtrx))
-        out$NotFound <- depMtrx[-foundRows,,drop=FALSE]
-
-    out
-}
-
-compareDependsPkgVersion <- function(curVersion, versOper, versionReq) {
-    ## Returns -1 if FALSE, 0 or 1 if TRUE
-    if(versOper == ">=")
-        return(utils::compareVersion(curVersion, versionReq))
-    if(versOper == "<=")
-        return(utils::compareVersion(versionReq, curVersion))
-    else
-        stop("bad operand")
-}
-
-reduceDepends <- function(depMtrx, quietly=TRUE) {
-    if ((is.null(depMtrx))||nrow(depMtrx)==0)
-        return(character())
-
-    pkgList <- split(depMtrx, depMtrx[,1])
-    out <- lapply(pkgList, function(x, quietly) {
-        pkgMtrx <- matrix(x,ncol=3L)
-        ## there are no version requirements so just return
-        ## the pkg name
-        if (all(is.na(pkgMtrx[,2])))
-            outRow <- 1
-        else {
-            ## Have version requirements
-            ## Get the maximum ">=" requirement if one exists
-            gts <- pkgMtrx[pkgMtrx[,2] == ">=",,drop=FALSE]
-            if (nrow(gts) > 0) {
-               maxGts <- gts[1,3]
-               outRow <- 1
-               for (i in 1L:nrow(gts)) {
-                   if (utils::compareVersion(gts[i,3], maxGts) > 0) {
-                       maxGts <- gts[i,3]
-                       outRow <- i
-                   }
-               }
-            }
-
-            ## Find the minimal <= requirement if one exists
-            lts <- pkgMtrx[pkgMtrx[,2] == "<=",,drop=FALSE]
-            if (nrow(lts) > 0) {
-                minLts <- lts[1,3]
-                minRow <- 1
-                for (i in 1L:nrow(lts)) {
-                    if (utils::compareVersion(lts[i,3], minLts) < 0) {
-                        minLts <- lts[i,3]
-                        minRow <- i
-                    }
-                }
-                ## If there is a maxGts and it is larger then
-                ## the minLts then we need to record both
-                if (exists(maxGts))
-                    if (maxGts > minLts)
-                        outRow <- c(outRow, minRow)
-                else
-                    outRow <- minRow
-            }
-            if(quietly == FALSE)
-                warning(gettextf("Package '%s' had its dependencies reduced to a minimal set.",
-                                 pkgMtrx[1,]),
-                        domain = NA)
-        }
-	pkgMtrx[outRow,]
-    }, quietly)
-
-    matrix(unlist(out), ncol=3L, byrow=TRUE)
-}
-
-depMtrxToStrings <- function(depMtrx) {
-    if (length(depMtrx)) {
-        apply(depMtrx, 1L, function(x){
-            if (is.na(x[2L]))
-                x[1L]
-            else
-                paste0(x[1L]," (",x[2L]," ",x[3L],")")
-        })
-    }
-    else
-        character()
-}
-
-installFoundDepends <- function(depPkgList, ...) {
-    urls <- names(depPkgList)
-    for (i in seq_along(depPkgList)) {
-        if (length(depPkgList[[i]]))
-            utils::install.packages(depPkgList[[i]],
-                                    contriburl = urls[i],
-                                    ...)
-    }
-
-    NULL
-}
diff --git a/src/library/tools/R/read.00Index.R b/src/library/tools/R/read.00Index.R
index bb7f0a9..8eb9fa0 100644
--- a/src/library/tools/R/read.00Index.R
+++ b/src/library/tools/R/read.00Index.R
@@ -1,5 +1,5 @@
 #  File src/library/tools/R/read.00Index.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
 #  Copyright (C) 1995-2012 The R Core Team
 #
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 read.00Index <-
 function(file)
diff --git a/src/library/tools/R/recode.R b/src/library/tools/R/recode.R
index e8c28fa..da8fa9e 100644
--- a/src/library/tools/R/recode.R
+++ b/src/library/tools/R/recode.R
@@ -1,5 +1,5 @@
 #  File src/library/tools/R/recode.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
 #  Copyright (C) 1995-2012 The R Core Team
 #
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 ### Remap a character string from encoded text to LaTeX escapes
 encoded_text_to_latex <-
diff --git a/src/library/tools/R/sotools.R b/src/library/tools/R/sotools.R
index cd2ea6e..fc06cb2 100644
--- a/src/library/tools/R/sotools.R
+++ b/src/library/tools/R/sotools.R
@@ -1,7 +1,7 @@
 #  File src/library/tools/R/sotools.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
-#  Copyright (C) 2011-2014 The R Core Team
+#  Copyright (C) 2011-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
@@ -14,14 +14,17 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 if(.Platform$OS.type == "windows") {
     read_symbols_from_dll <- function(f, rarch)
     {
         ## reasonable to assume this on the path
         DLL_nm <- "objdump.exe"
-        if(!nzchar(Sys.which(DLL_nm))) return()
+        if(!nzchar(Sys.which(DLL_nm))) {
+            warning("this requires 'objdump.exe' to be on the PATH")
+            return()
+        }
         f <- file_path_as_absolute(f)
         s0 <- suppressWarnings(system2(DLL_nm, c("-x", shQuote(f)),
                                        stdout = TRUE, stderr = TRUE))
@@ -30,7 +33,7 @@ if(.Platform$OS.type == "windows") {
         l1 <- grep("^\tDLL Name:", s0)
         l2 <- grep("^The Export Tables", s0)
         if (!length(l1) || !length(l2)) return()
-        s1 <- s0[(l1[1L] + 3L):(l2 - 4L)]
+        s1 <- s0[(l1[1L] + 2L):(l2 - 4L)]
         s2 <- grep("\t[0-9a-f]+\t +[0-9]+", s1, value = TRUE)
         sub(".* ([_A-Za-z0-9]+)$", "\\1", s2)
     }
@@ -39,9 +42,12 @@ if(.Platform$OS.type == "windows") {
 read_symbols_from_object_file <- function(f)
 {
     ## reasonable to assume this on the path
-    if(!nzchar(nm <- Sys.which("nm"))) return()
+    if(!nzchar(nm <- Sys.which("nm"))) {
+        warning("this requires 'nm' to be on the PATH")
+        return()
+    }
     f <- file_path_as_absolute(f)
-    if(!(file.info(f)$size)) return()
+    if(!(file.size(f))) return()
     s <- strsplit(system(sprintf("%s -Pg %s", shQuote(nm), shQuote(f)),
                          intern = TRUE),
                   " +")
@@ -51,7 +57,7 @@ read_symbols_from_object_file <- function(f)
     tab <- matrix("", nrow = n, ncol = 4L)
     colnames(tab) <- c("name", "type", "value", "size")
     ## Compute desired i and j positions in tab.
-    i <- rep.int(seq_len(n), sapply(s, length))
+    i <- rep.int(seq_len(n), lengths(s))
     j <- unlist(lapply(s, seq_along))
     tab[n * (j - 1L) + i] <- unlist(s)
     tab
@@ -103,6 +109,7 @@ so_symbol_names_table <-
       "linux, Fortran, gfortran, print, _gfortran_st_write",
       "linux, Fortran, gfortran, stop, _gfortran_stop_numeric_f08",
       "linux, Fortran, gfortran, stop, _gfortran_stop_string",
+      "linux, Fortran, gfortran, rand, _gfortran_rand",
 
       "osx, C, gcc, abort, _abort",
       "osx, C, gcc, assert, ___assert_rtn",
@@ -131,6 +138,7 @@ so_symbol_names_table <-
       "osx, Fortran, gfortran, print, __gfortran_st_write",
       "osx, Fortran, gfortran, stop, __gfortran_stop_numeric",
       "osx, Fortran, gfortran, stop, __gfortran_stop_string",
+      "osx, Fortran, gfortran, rand, __gfortran_rand",
 
       "freebsd, C, gcc, abort, abort",
       "freebsd, C, gcc, assert, __assert",
@@ -155,6 +163,7 @@ so_symbol_names_table <-
       "freebsd, Fortran, gfortran, print, _gfortran_st_write",
       "freebsd, Fortran, gfortran, stop, _gfortran_stop_numeric_f08",
       "freebsd, Fortran, gfortran, stop, _gfortran_stop_string",
+      "freebsd, Fortran, gfortran, rand, _gfortran_rand",
 
       ## stdout, stderr do not show up on Solaris
       "solaris, C, solcc, abort, abort",
@@ -183,6 +192,7 @@ so_symbol_names_table <-
       "solaris, Fortran, solf95, stop, __f90_stop_int",
       "solaris, Fortran, solf95, stop, __f90_stop_char",
       "solaris, Fortran, solf95, runtime, abort",
+      "solaris, Fortran, solf95, rand, rand_",
 
       ## Windows statically links libstdc++, libgfortran
       ## only in .o, positions hard-coded in check_so_symbols
@@ -208,7 +218,9 @@ so_symbol_names_table <-
       "windows, C, gcc, rand_r, rand_r",
       "windows, C, gcc, srand, srand",
       "windows, C, gcc, srand48, srand48",
-      "windows, Fortran, gfortran, stop, exit"
+      "windows, Fortran, gfortran, stop, exit",
+      ## next will not show up with static libgfortran
+      "windows, Fortran, gfortran, rand, _gfortran_rand"
       )
 so_symbol_names_table <-
     do.call(rbind,
@@ -259,7 +271,7 @@ nonAPI <- c("chol_", "chol2inv_", "cg_", "ch_", "rg_",
             "OutDec", "PRIMOFFSET", "RC_fopen", "R_CollectFromIndex",
             "R_CompiledFileName", "R_FileExists",
             "R_FreeStringBuffer", "R_FunTab", "R_GE_setVFontRoutines",
-            "R_GetVarLocMISSING", "R_MakeExternalPtrFn",
+            "R_GetVarLocMISSING",
             "R_MethodsNamespace", "R_NewHashedEnv",
             "R_OpenCompiledFile", "R_PV", "R_ParseContext",
             "R_ParseContextLast", "R_ParseContextLine",
@@ -384,6 +396,9 @@ check_so_symbols <- if(.Platform$OS.type == "windows") {
             tab2 <- setdiff(tab2, c("R_InputHandlers", "addInputHandler",
                                     "removeInputHandler"))
         if(length(tab2)) attr(tab, "nonAPI") <- tab2
+        tab2b <- setdiff(c("R_registerRoutines", "R_useDynamicSymbols"),
+                         sub("^_", "", nms))
+        if(length(tab2b)) attr(tab, "RegSym") <- tab2b
         class(tab) <- "check_so_symbols"
         tab
     }
@@ -401,11 +416,16 @@ check_so_symbols <- if(.Platform$OS.type == "windows") {
         tab <- so_symbol_names_table[ind, , drop = FALSE]
         attr(tab, "file") <- so
         tab2 <- sub("^_", "", tab2)
-        tab2 <- intersect(tab2, nonAPI)
-        if ("removeInputHandler" %in% tab2)
-            tab2 <- setdiff(tab2, c("R_InputHandlers", "addInputHandler",
+
+        tab2a <- intersect(tab2, nonAPI)
+        if ("removeInputHandler" %in% tab2a)
+            tab2a <- setdiff(tab2a, c("R_InputHandlers", "addInputHandler",
                                     "removeInputHandler"))
-        if(length(tab2)) attr(tab, "nonAPI") <- tab2
+        if(length(tab2a)) attr(tab, "nonAPI") <- tab2a
+
+        tab2b <- setdiff(c("R_registerRoutines", "R_useDynamicSymbols"), tab2)
+        if(length(tab2b)) attr(tab, "RegSym") <- tab2b
+
         class(tab) <- "check_so_symbols"
         tab
     }
@@ -415,6 +435,7 @@ format.check_so_symbols <-
 function(x, ...)
 {
     if(!length(x)) return(character())
+    ## <FIXME split.matrix>
     entries <- split.data.frame(x, x[, "osname"])
     objects <- vector("list", length(entries))
     names(objects) <- names(entries)
@@ -449,6 +470,7 @@ if(.Platform$OS.type == "windows") {
 
         r_arch <- .Platform$r_arch
         useST <- config_val_to_logical(Sys.getenv("_R_SHLIB_BUILD_OBJECTS_SYMBOL_TABLES_", "FALSE"))
+        useSR <- config_val_to_logical(Sys.getenv("_R_CHECK_NATIVE_ROUTINE_REGISTRATION_", "FALSE"))
 
         compare <- function(x, strip_ = FALSE) {
             ## Compare symbols in the DLL and in objects:
@@ -468,7 +490,7 @@ if(.Platform$OS.type == "windows") {
             attr(x, "file") <- .file_path_relative_to_dir(so, dir, TRUE)
 
             attr(x, "objects") <-
-                split(rep.int(names(symbols), sapply(symbols, length)),
+                split(rep.int(names(symbols), lengths(symbols)),
                       unlist(symbols))
             class(x) <- "check_so_symbols"
             x
@@ -498,9 +520,19 @@ if(.Platform$OS.type == "windows") {
                                   .file_path_relative_to_dir(attr(x, "file"),
                                                              dir, TRUE),
                                   class = "check_nonAPI_calls"))
-
         bad <- c(bad, Filter(length, nAPIs))
 
+        if (useSR) {
+            nRS <- lapply(lapply(so_files, check_so_symbols, rarch = "i386"),
+                          function(x) if(length(z <- attr(x, "RegSym")))
+                          structure(z,
+                                    file =
+                                    .file_path_relative_to_dir(attr(x, "file"),
+                                                               dir, TRUE),
+                                    class = "check_RegSym_calls"))
+            bad <- c(bad, Filter(length, nRS))
+        }
+
         so_files <-
             Sys.glob(file.path(dir, "libs/x64",
                                sprintf("*%s", .Platform$dynlib.ext)))
@@ -524,9 +556,19 @@ if(.Platform$OS.type == "windows") {
                                   .file_path_relative_to_dir(attr(x, "file"),
                                                              dir, TRUE),
                                   class = "check_nonAPI_calls"))
-
         bad2 <- c(bad2, Filter(length, nAPIs))
 
+        if (useSR) {
+            nRS <- lapply(lapply(so_files, check_so_symbols, rarch = "x64"),
+                          function(x) if(length(z <- attr(x, "RegSym")))
+                          structure(z,
+                                    file =
+                                    .file_path_relative_to_dir(attr(x, "file"),
+                                                               dir, TRUE),
+                                    class = "check_RegSym_calls"))
+            bad2 <- c(bad2, Filter(length, nRS))
+        }
+
         if(!length(bad) && !length(bad2)) return(invisible(NULL))
 
         bad <- if(length(bad) && length(bad2)) rbind(bad, bad2)
@@ -541,6 +583,7 @@ if(.Platform$OS.type == "windows") {
 
         r_arch <- .Platform$r_arch
         useST <- config_val_to_logical(Sys.getenv("_R_SHLIB_BUILD_OBJECTS_SYMBOL_TABLES_", "FALSE"))
+        useSR <- config_val_to_logical(Sys.getenv("_R_CHECK_NATIVE_ROUTINE_REGISTRATION_", "FALSE"))
 
         compare <- function(x) {
             ## Compare symbols in the so and in objects:
@@ -559,7 +602,7 @@ if(.Platform$OS.type == "windows") {
             x <- x[!is.na(match(x[, "osname"], osnames_in_objects)), , drop = FALSE]
             attr(x, "file") <- .file_path_relative_to_dir(so, dir, TRUE)
             attr(x, "objects") <-
-                split(rep.int(names(symbols), sapply(symbols, length)),
+                split(rep.int(names(symbols), lengths(symbols)),
                       unlist(symbols))
             class(x) <- "check_so_symbols"
             x
@@ -589,8 +632,18 @@ if(.Platform$OS.type == "windows") {
                                   .file_path_relative_to_dir(attr(x, "file"),
                                                              dir, TRUE),
                                   class = "check_nonAPI_calls"))
-
         bad <- c(bad, Filter(length, nAPIs))
+
+        if (useSR) {
+            nRS <- lapply(lapply(so_files, check_so_symbols),
+                          function(x) if(length(z <- attr(x, "RegSym")))
+                          structure(z,
+                                    file =
+                                    .file_path_relative_to_dir(attr(x, "file"),
+                                                               dir, TRUE),
+                                    class = "check_RegSym_calls"))
+            bad <- c(bad, Filter(length, nRS))
+        }
         class(bad) <- "check_compiled_code"
         bad
     }
@@ -619,6 +672,20 @@ function(x, ...)
     else character()
 }
 
+format.check_RegSym_calls <-
+function(x, ...)
+{
+    if(length(x))
+        c(gettextf("File %s:", sQuote(attr(x, "file"))),
+          if (length(x) > 1L) {
+              strwrap(paste("Found no calls to:",
+                            paste(sQuote(x), collapse = ", ")),
+                      indent = 2L, exdent = 4L)
+          } else paste("  Found no call to:", sQuote(x))
+          )
+    else character()
+}
+
 .shlib_objects_symbol_tables <-
 function(file = "symbols.rds")
 {
@@ -627,3 +694,298 @@ function(file = "symbols.rds")
     names(tables) <- objects
     saveRDS(tables, file = file)
 }
+
+
+### --- Helpers for registering native routines added in R 3.4.0 ---
+
+package_ff_call_db <-
+function(dir)
+{
+    ## A few packages such as CDM use base::.Call
+    ff_call_names <- c(".C", ".Call", ".Fortran", ".External",
+                       "base::.C", "base::.Call",
+                       "base::.Fortran", "base::.External")
+
+    predicate <- function(e) {
+        (length(e) > 1L) &&
+            !is.na(match(deparse(e[[1L]]), ff_call_names))
+    }
+
+    calls <- .find_calls_in_package_code(dir,
+                                         predicate = predicate,
+                                         recursive = TRUE)
+    calls <- unlist(Filter(length, calls))
+
+    if(!length(calls)) return(NULL)
+
+    attr(calls, "dir") <- dir
+    calls
+}
+
+native_routine_registration_db_from_ff_call_db <-
+function(calls, dir = NULL, character_only = TRUE)
+{
+    if(!length(calls)) return(NULL)
+
+    ff_call_names <- c(".C", ".Call", ".Fortran", ".External")
+    ff_call_args <- lapply(ff_call_names,
+                           function(e) args(get(e, baseenv())))
+    names(ff_call_args) <- ff_call_names
+    ff_call_args_names <-
+        lapply(lapply(ff_call_args,
+                      function(e) names(formals(e))), setdiff,
+               "...")
+
+    if(is.null(dir))
+        dir <- attr(calls, "dir")
+
+    package <- # drop name
+        as.vector(.read_description(file.path(dir, "DESCRIPTION"))["Package"])
+
+    symbols <- character()
+    nrdb <-
+        lapply(calls,
+               function(e) {
+                   if (startsWith(deparse(e[[1L]]), "base::"))
+                       e[[1L]] <- e[[1L]][3L]
+                   ## First figure out whether ff calls had '...'.
+                   pos <- which(unlist(Map(identical,
+                                           lapply(e, as.character),
+                                           "...")))
+                   ## Then match the call with '...' dropped.
+                   ## Note that only .NAME could be given by name or
+                   ## positionally (the other ff interface named
+                   ## arguments come after '...').
+                   if(length(pos)) e <- e[-pos]
+                   ## drop calls with only ...
+                   if(length(e) < 2L) return(NULL)
+                   cname <- as.character(e[[1L]])
+                   ## The help says
+                   ##
+                   ## '.NAME' is always matched to the first argument
+                   ## supplied (which should not be named).
+                   ##
+                   ## But some people do (Geneland ...).
+                   nm <- names(e); nm[2L] <- ""; names(e) <- nm
+                   e <- match.call(ff_call_args[[cname]], e)
+                   ## Only keep ff calls where .NAME is character
+                   ## or (optionally) a name.
+                   s <- e[[".NAME"]]
+                   if(is.name(s)) {
+                       s <- deparse(s)[1L]
+                       if(character_only) {
+                           symbols <<- c(symbols, s)
+                           return(NULL)
+                       }
+                   } else if(is.character(s)) {
+                       s <- s[1L]
+                   } else { ## expressions
+                       symbols <<- c(symbols, deparse(s))
+                       return(NULL)
+                   }
+                   ## Drop the ones where PACKAGE gives a different
+                   ## package. Ignore those which are not char strings.
+                   if(!is.null(p <- e[["PACKAGE"]]) &&
+                      is.character(p) && !identical(p, package))
+                       return(NULL)
+                   n <- if(length(pos)) {
+                            ## Cannot determine the number of args: use
+                            ## -1 which might be ok for .External().
+                            -1L
+                        } else {
+                            sum(is.na(match(names(e),
+                                            ff_call_args_names[[cname]]))) - 1L
+                        }
+                   ## Could perhaps also record whether 's' was a symbol
+                   ## or a character string ...
+                   cbind(cname, s, n)
+               })
+    nrdb <- do.call(rbind, nrdb)
+    nrdb <- as.data.frame(unique(nrdb), stringsAsFactors = FALSE)
+
+    if(NROW(nrdb) == 0L || length(nrdb) != 3L)
+        stop("no native symbols were extracted")
+    nrdb[, 3L] <- as.numeric(nrdb[, 3L])
+    nrdb <- nrdb[order(nrdb[, 1L], nrdb[, 2L], nrdb[, 3L]), ]
+    nms <- nrdb[, "s"]
+    dups <- unique(nms[duplicated(nms)])
+
+    ## Now get the namespace info for the package.
+    info <- parseNamespaceFile(basename(dir), dirname(dir))
+    ## Could have ff calls with symbols imported from other packages:
+    ## try dropping these eventually.
+    imports <- info$imports
+    imports <- imports[lengths(imports) == 2L]
+    imports <- unlist(lapply(imports, `[[`, 2L))
+
+    info <- info$nativeRoutines[[package]]
+    ## Adjust native routine names for explicit remapping or
+    ## namespace .fixes.
+    if(length(symnames <- info$symbolNames)) {
+        ind <- match(nrdb[, 2L], names(symnames), nomatch = 0L)
+        nrdb[ind > 0L, 2L] <- symnames[ind]
+    } else if(!character_only &&
+              any((fixes <- info$registrationFixes) != "")) {
+        ## There are packages which have not used the fixes, e.g. utf8latex
+        ## fixes[1L] is a prefix, fixes[2L] is an undocumented suffix
+        nrdb[, 2L] <- sub(paste0("^", fixes[1L]), "", nrdb[, 2L])
+        if(nzchar(fixes[2L]))
+            nrdb[, 2L] <- sub(paste0(fixes[2L]), "$", "", nrdb[, 2L])
+    }
+    ## See above.
+    if(any(ind <- !is.na(match(nrdb[, 2L], imports))))
+        nrdb <- nrdb[!ind, , drop = FALSE]
+
+    ## Fortran entry points are mapped to l/case
+    dotF <- nrdb$cname == ".Fortran"
+    nrdb[dotF, "s"] <- tolower(nrdb[dotF, "s"])
+
+    attr(nrdb, "package") <- package
+    attr(nrdb, "duplicates") <- dups
+    attr(nrdb, "symbols") <- unique(symbols)
+    nrdb
+}
+
+format_native_routine_registration_db_for_skeleton <-
+function(nrdb, align = TRUE, include_declarations = FALSE)
+{
+    if(!length(nrdb))
+        return(character())
+
+    fmt1 <- function(x, n) {
+        c(if(align) {
+              paste(format(sprintf("    {\"%s\",", x[, 1L])),
+                    format(sprintf(if(n == "Fortran")
+                                       "(DL_FUNC) &F77_NAME(%s),"
+                                   else
+                                       "(DL_FUNC) &%s,",
+                                   x[, 1L])),
+                    format(sprintf("%d},", x[, 2L]),
+                           justify = "right"))
+          } else {
+              sprintf(if(n == "Fortran")
+                          "    {\"%s\", (DL_FUNC) &F77_NAME(%s), %d},"
+                      else
+                          "    {\"%s\", (DL_FUNC) &%s, %d},",
+                      x[, 1L],
+                      x[, 1L],
+                      x[, 2L])
+          },
+          "    {NULL, NULL, 0}")
+    }
+
+    package <- attr(nrdb, "package")
+    dups <- attr(nrdb, "duplicates")
+    symbols <- attr(nrdb, "symbols")
+
+    nrdb <- split(nrdb[, -1L, drop = FALSE],
+                  factor(nrdb[, 1L],
+                         levels =
+                             c(".C", ".Call", ".Fortran", ".External")))
+
+    has <- vapply(nrdb, NROW, 0L) > 0L
+    nms <- names(nrdb)
+    entries <- substring(nms, 2L)
+    blocks <- Map(function(x, n) {
+                      c(sprintf("static const R_%sMethodDef %sEntries[] = {",
+                                n, n),
+                        fmt1(x, n),
+                        "};",
+                        "")
+                  },
+                  nrdb[has],
+                  entries[has])
+
+    decls <- c(
+        "/* FIXME: ",
+        "   Add declarations for the native routines registered below.",
+        "*/")
+
+    if(include_declarations) {
+        decls <- c(
+            "/* FIXME: ",
+            "   Check these declarations against the C/Fortran source code.",
+            "*/",
+            if(NROW(y <- nrdb$.C)) {
+                 args <- sapply(y$n, function(n) if(n >= 0)
+                                paste(rep("void *", n), collapse=", ")
+                                else "/* FIXME */")
+                c("", "/* .C calls */",
+                  paste0("extern void ", y$s, "(", args, ");"))
+           },
+            if(NROW(y <- nrdb$.Call)) {
+                args <- sapply(y$n, function(n) if(n >= 0)
+                               paste(rep("SEXP", n), collapse=", ")
+                               else "/* FIXME */")
+               c("", "/* .Call calls */",
+                  paste0("extern SEXP ", y$s, "(", args, ");"))
+            },
+            if(NROW(y <- nrdb$.Fortran)) {
+                 args <- sapply(y$n, function(n) if(n >= 0)
+                                paste(rep("void *", n), collapse=", ")
+                                else "/* FIXME */")
+                c("", "/* .Fortran calls */",
+                  paste0("extern void F77_NAME(", y$s, ")(", args, ");"))
+            },
+            if(NROW(y <- nrdb$.External))
+                c("", "/* .External calls */",
+                  paste0("extern SEXP ", y$s, "(SEXP);"))
+            )
+    }
+
+    headers <- if(NROW(nrdb$.Call) || NROW(nrdb$.External))
+        c("#include <R.h>", "#include <Rinternals.h>")
+    else if(NROW(nrdb$.Fortran)) "#include <R_ext/RS.h>"
+    else character()
+
+    c(headers,
+      "#include <stdlib.h> // for NULL",
+      "#include <R_ext/Rdynload.h>",
+      "",
+      if(length(symbols)) {
+          c("/*",
+            "  The following symbols/expressions for .NAME have been omitted",
+            "", strwrap(symbols, indent = 4, exdent = 4), "",
+            "  Most likely possible values need to be added below.",
+            "*/", "")
+      },
+      if(length(dups)) {
+          c("/*",
+            "  The following name(s) appear with different usages",
+            "  e.g., with different numbers of arguments:",
+            "", strwrap(dups, indent = 4, exdent = 4), "",
+            "  This needs to be resolved in the tables and any declarations.",
+            "*/", "")
+      },
+      decls,
+      "",
+      unlist(blocks, use.names = FALSE),
+      ## We cannot use names with '.' in: WRE mentions replacing with "_"
+      sprintf("void R_init_%s(DllInfo *dll)",
+              gsub(".", "_", package, fixed = TRUE)),
+      "{",
+      sprintf("    R_registerRoutines(dll, %s);",
+              paste0(ifelse(has,
+                            paste0(entries, "Entries"),
+                            "NULL"),
+                     collapse = ", ")),
+      "    R_useDynamicSymbols(dll, FALSE);",
+      "}")
+}
+
+package_native_routine_registration_db <-
+function(dir, character_only = TRUE)
+{
+    calls <- package_ff_call_db(dir)
+    native_routine_registration_db_from_ff_call_db(calls, dir, character_only)
+}
+
+package_native_routine_registration_skeleton <-
+function(dir, con = stdout(), align = TRUE, character_only = TRUE,
+         include_declarations = TRUE)
+{
+    nrdb <- package_native_routine_registration_db(dir, character_only)
+    writeLines(format_native_routine_registration_db_for_skeleton(nrdb,
+                align, include_declarations),
+               con)
+}
diff --git a/src/library/tools/R/sysdata.R b/src/library/tools/R/sysdata.R
new file mode 100644
index 0000000..948b5e2
--- /dev/null
+++ b/src/library/tools/R/sysdata.R
@@ -0,0 +1,17 @@
+make_sysdata_rda <-
+function()
+{
+    IANA_URI_scheme_db <- get_IANA_URI_scheme_db()
+
+    IANA_HTTP_status_code_db <- get_IANA_HTTP_status_code_db()
+
+    ## See <https://en.wikipedia.org/wiki/List_of_HTTP_status_codes>.
+    table_of_HTTP_status_codes <- IANA_HTTP_status_code_db$Description
+    names(table_of_HTTP_status_codes) <- IANA_HTTP_status_code_db$Value
+
+    save(IANA_URI_scheme_db,
+         IANA_HTTP_status_code_db,
+         table_of_HTTP_status_codes,
+         file = "sysdata.rda",
+         compress = TRUE)
+}
diff --git a/src/library/tools/R/sysdata.rda b/src/library/tools/R/sysdata.rda
new file mode 100644
index 0000000..00e73ed
Binary files /dev/null and b/src/library/tools/R/sysdata.rda differ
diff --git a/src/library/tools/R/testing.R b/src/library/tools/R/testing.R
index f2d5b6a..f75aa40 100644
--- a/src/library/tools/R/testing.R
+++ b/src/library/tools/R/testing.R
@@ -1,7 +1,7 @@
 #  File src/library/tools/R/testing.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
-#  Copyright (C) 1995-2013 The R Core Team
+#  Copyright (C) 1995-2017 The R Core Team
 #
 # NB: also copyright date in Usage.
 #
@@ -16,14 +16,15 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 ## functions principally for testing R and packages
 
 massageExamples <-
-    function(pkg, files, outFile = stdout(), use_gct = FALSE, addTiming = FALSE)
+    function(pkg, files, outFile = stdout(), use_gct = FALSE,
+             addTiming = FALSE, ..., commentDonttest = TRUE)
 {
-    if(file_test("-d", files[1L])) {
+    if(dir.exists(files[1L])) {
         old <- Sys.setlocale("LC_COLLATE", "C")
         files <- sort(Sys.glob(file.path(files, "*.R")))
         Sys.setlocale("LC_COLLATE", old)
@@ -32,12 +33,18 @@ massageExamples <-
     if(is.character(outFile)) {
         out <- file(outFile, "wt")
         on.exit(close(out))
-    } else out <- outFile
+        cntFile <- paste0(outFile, "-cnt")
+    } else {
+        out <- outFile
+        cntFile <- NULL
+    }
+
+    count <- 0L # of files using \donttest
 
     lines <- c(paste0('pkgname <- "', pkg, '"'),
                'source(file.path(R.home("share"), "R", "examples-header.R"))',
                if (use_gct) {
-                   gct_n <- as.integer(Sys.getenv("_R_CHECK_GCT_N_", 0))
+                   gct_n <- as.integer(Sys.getenv("_R_CHECK_GCT_N_", "0"))
                    if(!is.na(gct_n) && gct_n > 0L)
                        sprintf("gctorture2(%s)", gct_n)
                    else "gctorture(TRUE)"
@@ -96,18 +103,24 @@ massageExamples <-
 
         cat("### * ", nm, "\n\n", sep = "", file = out)
         cat("flush(stderr()); flush(stdout())\n\n", file = out)
-        dont_test <- FALSE
         if(addTiming)
             cat("base::assign(\".ptime\", proc.time(), pos = \"CheckExEnv\")\n",
                 file = out)
-        for (line in lines) {
-            if(any(grepl("^[[:space:]]*## No test:", line, perl = TRUE, useBytes = TRUE)))
-                dont_test <- TRUE
-            if(!dont_test) cat(line, "\n", sep = "", file = out)
-            if(any(grepl("^[[:space:]]*## End\\(No test\\)",
-                         line, perl = TRUE, useBytes = TRUE)))
-                dont_test <- FALSE
-        }
+        if (commentDonttest) {
+            dont_test <- FALSE
+            for (line in lines) {
+                if(any(grepl("^[[:space:]]*## No test:", line,
+                             perl = TRUE, useBytes = TRUE))) {
+                    dont_test <- TRUE
+                    count <- count + 1L
+                }
+                if(!dont_test) cat(line, "\n", sep = "", file = out)
+                if(any(grepl("^[[:space:]]*## End\\(No test\\)", line,
+                             perl = TRUE, useBytes = TRUE)))
+                    dont_test <- FALSE
+            }
+        } else
+            for (line in lines) cat(line, "\n", sep = "", file = out)
 
         if(addTiming) {
             cat("base::assign(\".dptime\", (proc.time() - get(\".ptime\", pos = \"CheckExEnv\")), pos = \"CheckExEnv\")\n", file = out)
@@ -122,11 +135,13 @@ massageExamples <-
 
     cat(readLines(file.path(R.home("share"), "R", "examples-footer.R")),
         sep = "\n", file = out)
+
+    if(count && !is.null(cntFile)) writeLines(as.character(count), cntFile)
 }
 
 ## compares 2 files
 Rdiff <- function(from, to, useDiff = FALSE, forEx = FALSE,
-                  nullPointers=TRUE, Log = FALSE)
+                  nullPointers = TRUE, Log = FALSE)
 {
     clean <- function(txt)
     {
@@ -143,23 +158,28 @@ Rdiff <- function(from, to, useDiff = FALSE, forEx = FALSE,
         if(length(ll)) txt <- txt[seq_len(max(ll) - 1L)]
         ## remove BATCH footer
         nl <- length(txt)
-        if(nl > 3L && grepl("^> proc.time\\(\\)", txt[nl-2L])) txt <- txt[1:(nl-3L)]
+        if(nl > 3L && startsWith(txt[nl-2L], "> proc.time()"))
+            txt <- txt[1:(nl-3L)]
+        ## remove text between IGNORE_RDIFF markers.
+        txt <- txt[(cumsum(txt == "> ## IGNORE_RDIFF_BEGIN") <=
+                    cumsum(txt == "> ## IGNORE_RDIFF_END"))]
+        ## (Keeps the end markers, but that's ok.)
         if (nullPointers)
-        ## remove pointer addresses from listings
+            ## remove pointer addresses from listings
             txt <- gsub("<(environment|bytecode|pointer|promise): [x[:xdigit:]]+>", "<\\1: 0>", txt)
         ## regularize fancy quotes.  First UTF-8 ones:
-        txt <- gsub("(\xe2\x80\x98|\xe2\x80\x99)", "'", txt,
-                      perl = TRUE, useBytes = TRUE)
-        txt <- gsub("(\xe2\x80\x9c|\xe2\x80\x9d)", '"', txt,
-                      perl = TRUE, useBytes = TRUE)
+        txt <- .canonicalize_quotes(txt)
         if(.Platform$OS.type == "windows") {
             ## not entirely safe ...
             txt <- gsub("(\x91|\x92)", "'", txt, perl = TRUE, useBytes = TRUE)
             txt <- gsub("(\x93|\x94)", '"', txt, perl = TRUE, useBytes = TRUE)
-            txt <- txt[!grepl('options(pager = "console")', txt,
-                              fixed = TRUE, useBytes = TRUE)]
         }
-        pat <- '(^Time |^Loading required package|^Package [A-Za-z][A-Za-z0-9]+ loaded|^<(environment|promise|pointer|bytecode):|^/CreationDate |^/ModDate |^/Producer )'
+        ## massageExamples() adds options(pager = "console") only for
+        ## Windows, but we should ignore a corresponding diff on all
+        ## platforms.
+        txt <- txt[!grepl('options(pager = "console")', txt,
+                          fixed = TRUE, useBytes = TRUE)]
+        pat <- '(^Time |^Loading required package|^Package [A-Za-z][A-Za-z0-9]+ loaded|^<(environment|promise|pointer|bytecode):|^/CreationDate |^/ModDate |^/Producer |^End.Don\'t show)'
         txt[!grepl(pat, txt, perl = TRUE, useBytes = TRUE)]
     }
     clean2 <- function(txt)
@@ -216,13 +236,14 @@ Rdiff <- function(from, to, useDiff = FALSE, forEx = FALSE,
             list(status = status, out = c(out, readLines(tf)))
         } else system(paste("diff -bw", shQuote(a), shQuote(b)))
     }
-}
+} ## {Rdiff}
+
 
 testInstalledPackages <-
     function(outDir = ".", errorsAreFatal = TRUE,
              scope = c("both", "base", "recommended"),
              types = c("examples", "tests", "vignettes"),
-             srcdir = NULL, Ropts = "")
+             srcdir = NULL, Ropts = "", ...)
 {
     ow <- options(warn = 1)
     on.exit(ow)
@@ -234,13 +255,13 @@ testInstalledPackages <-
         pkgs <- known_packages$base
     if (scope %in% c("both", "recommended"))
         pkgs <- c(pkgs, known_packages$recommended)
-    mc.cores <- as.integer(Sys.getenv("TEST_MC_CORES", 1L))
+    mc.cores <- as.integer(Sys.getenv("TEST_MC_CORES", "1"))
     if (.Platform$OS.type != "windows" &&
         !is.na(mc.cores) && mc.cores > 1L) {
         do_one <- function(pkg) {
             if(is.null(srcdir) && pkg %in% known_packages$base)
                 srcdir <- R.home("tests/Examples")
-            testInstalledPackage(pkg, .Library, outDir, types, srcdir, Ropts)
+            testInstalledPackage(pkg, .Library, outDir, types, srcdir, Ropts, ...)
         }
         res <- parallel::mclapply(pkgs, do_one, mc.cores = mc.cores,
                                   mc.preschedule = FALSE)
@@ -250,14 +271,16 @@ testInstalledPackages <-
                 warning(gettextf("testing '%s' failed", pkgs[i]),
                         domain = NA, call. = FALSE, immediate. = TRUE)
             if (errorsAreFatal)
-                stop(gettextf("%d of the package tests failed", sum(res)),
+                stop(sprintf(ngettext(sum(res), "%d of the package tests failed",
+                                      "%d of the package tests failed",
+                                       domain = "R-tools"), sum(res)),
                      domain = NA, call. = FALSE)
         }
     } else {
         for (pkg in pkgs) {
             if(is.null(srcdir) && pkg %in% known_packages$base)
                 srcdir <- R.home("tests/Examples")
-            res <- testInstalledPackage(pkg, .Library, outDir, types, srcdir, Ropts)
+            res <- testInstalledPackage(pkg, .Library, outDir, types, srcdir, Ropts, ...)
             if (res) {
                 status <- 1L
                 msg <- gettextf("testing '%s' failed", pkg)
@@ -272,23 +295,22 @@ testInstalledPackages <-
 testInstalledPackage <-
     function(pkg, lib.loc = NULL, outDir = ".",
              types = c("examples", "tests", "vignettes"),
-             srcdir = NULL, Ropts = "")
+             srcdir = NULL, Ropts = "", ...)
 {
-    types <- pmatch(types, c("examples", "tests", "vignettes"))
+    types <- match.arg(types, c("examples", "tests", "vignettes"), several.ok=TRUE)
     pkgdir <- find.package(pkg, lib.loc)
-    exdir <- file.path(pkgdir, "R-ex")
     owd <- setwd(outDir)
     on.exit(setwd(owd))
     strict <- as.logical(Sys.getenv("R_STRICT_PACKAGE_CHECK", "FALSE"))
 
-    if (1 %in% types) {
+    if ("examples" %in% types) {
         message(gettextf("Testing examples for package %s", sQuote(pkg)),
                 domain = NA)
-        Rfile <- .createExdotR(pkg, pkgdir, silent = TRUE)
+        Rfile <- .createExdotR(pkg, pkgdir, silent = TRUE, ...)
         if (length(Rfile)) {
             outfile <- paste0(pkg, "-Ex.Rout")
-            failfile <- paste(outfile, "fail", sep = "." )
-            savefile <- paste(outfile, "prev", sep = "." )
+            failfile <- paste0(outfile, ".fail")
+            savefile <- paste0(outfile, ".prev")
             if (file.exists(outfile)) file.rename(outfile, savefile)
             unlink(failfile)
             ## Create as .fail in case this R session gets killed
@@ -300,7 +322,7 @@ testInstalledPackage <-
             res <- system(cmd)
             if (res) return(invisible(1L)) else file.rename(failfile, outfile)
 
-            savefile <- paste(outfile, "save", sep = "." )
+            savefile <- paste0(outfile, ".save")
             if (!is.null(srcdir)) savefile <- file.path(srcdir, savefile)
             else {
                 tfile <- file.path(pkgdir, "tests", "Examples" , savefile)
@@ -312,19 +334,39 @@ testInstalledPackage <-
                    message(gettextf("  comparing %s to %s ...",
                                     sQuote(outfile), sQuote(basename(savefile))),
                            appendLF = FALSE, domain = NA)
-                    res <- Rdiff(outfile, savefile)
-                    if (!res) message(" OK")
-                    else if(strict)
-                        stop("  ", "results differ from reference results")
+                   cmd <-
+                       sprintf("invisible(tools::Rdiff('%s','%s',TRUE,TRUE))",
+                               outfile, savefile)
+                   out <- R_runR(cmd, "--vanilla --slave")
+                   if(length(out)) {
+                       if(strict)
+                           message(" ERROR")
+                       else
+                           message(" NOTE")
+                       writeLines(paste0("  ", out))
+                       if(strict)
+                           stop("  ",
+                                "results differ from reference results")
+                   } else {
+                       message(" OK")
+                   }
                 }
             } else {
-                prevfile <- paste(outfile, "prev", sep = "." )
+                prevfile <- paste0(outfile, ".prev")
                 if (file.exists(prevfile)) {
                     message(gettextf("  comparing %s to %s ...",
                             sQuote(outfile), sQuote(basename(prevfile))),
                             appendLF = FALSE, domain = NA)
-                    res <- Rdiff(outfile, prevfile)
-                    if (!res) message(" OK")
+                    cmd <-
+                        sprintf("invisible(tools::Rdiff('%s','%s',TRUE,TRUE))",
+                                outfile, prevfile)
+                    out <- R_runR(cmd, "--vanilla --slave")
+                    if(length(out)) {
+                        message(" NOTE")
+                        writeLines(paste0("  ", out))
+                    } else {
+                        message(" OK")
+                    }
                 }
             }
         } else
@@ -333,8 +375,8 @@ testInstalledPackage <-
     }
 
     ## FIXME merge with code in .runPackageTests
-    if (2 %in% types && file_test("-d", d <- file.path(pkgdir, "tests"))) {
-        this <- paste(pkg, "tests", sep = "-")
+    if ("tests" %in% types && dir.exists(d <- file.path(pkgdir, "tests"))) {
+        this <- paste0(pkg, "-tests")
         unlink(this, recursive = TRUE)
         dir.create(this)
         ## system(paste("cp -pR", file.path(d, "*"), this))
@@ -342,10 +384,10 @@ testInstalledPackage <-
         setwd(this)
         message(gettextf("Running specific tests for package %s",
                          sQuote(pkg)), domain = NA)
-        Rfiles <- dir(".", pattern="\\.R$")
+        Rfiles <- dir(".", pattern="\\.[rR]$")
         for(f in Rfiles) {
             message(gettextf("  Running %s", sQuote(f)), domain = NA)
-            outfile <- paste0(f, "out")
+            outfile <- sub("rout$", "Rout", paste0(f, "out"))
             cmd <- paste(shQuote(file.path(R.home("bin"), "R")),
                          "CMD BATCH --vanilla --no-timing", Ropts,
                          shQuote(f), shQuote(outfile))
@@ -353,10 +395,10 @@ testInstalledPackage <-
             else paste("LANGUAGE=C", cmd)
            res <- system(cmd)
             if (res) {
-                file.rename(outfile, paste(outfile, "fail", sep = "."))
+                file.rename(outfile, paste0(outfile, ".fail"))
                 return(invisible(1L))
             }
-            savefile <- paste(outfile, "save", sep = "." )
+            savefile <- paste0(outfile, ".save")
             if (file.exists(savefile)) {
                 message(gettextf("  comparing %s to %s ...",
                                  sQuote(outfile), sQuote(savefile)),
@@ -368,7 +410,7 @@ testInstalledPackage <-
         setwd(owd)
     }
 
-    if (3 %in% types && file_test("-d", d <- file.path(pkgdir, "doc"))) {
+    if ("vignettes" %in% types && dir.exists(file.path(pkgdir, "doc"))) {
         message(gettextf("Running vignettes for package %s", sQuote(pkg)),
                 domain = NA)
         checkVignettes(pkg, lib.loc, latex = FALSE, weave =TRUE)
@@ -388,7 +430,8 @@ testInstalledPackage <-
     q("no", status = status)
 }
 
-.runPackageTests <- function(use_gct = FALSE, use_valgrind = FALSE, Log = NULL)
+.runPackageTests <-
+    function(use_gct = FALSE, use_valgrind = FALSE, Log = NULL, stop_on_error = TRUE, ...)
 {
     if (!is.null(Log)) Log <- file(Log, "wt")
     WINDOWS <- .Platform$OS.type == "windows"
@@ -417,7 +460,7 @@ testInstalledPackage <-
                 appendLF = FALSE, domain = NA)
         if(!is.null(Log))
             cat("  Running ", sQuote(f), sep = "", file = Log)
-        outfile <- paste0(f, "out")
+        outfile <- sub("rout$", "Rout", paste0(f, "out"))
         cmd <- paste(shQuote(file.path(R.home("bin"), "R")),
                      "CMD BATCH --vanilla",
                      if(use_valgrind) "--debugger=valgrind",
@@ -432,10 +475,10 @@ testInstalledPackage <-
         t2 <- proc.time()
         print_time(t1, t2, Log)
         if (res) {
-            file.rename(outfile, paste(outfile, "fail", sep = "."))
+            file.rename(outfile, paste0(outfile, ".fail"))
             return(1L)
         }
-        savefile <- paste(outfile, "save", sep = "." )
+        savefile <- paste0(outfile, ".save")
         if (file.exists(savefile)) {
             message(gettextf("  Comparing %s to %s ...",
                              sQuote(outfile), sQuote(savefile)),
@@ -477,21 +520,21 @@ testInstalledPackage <-
         if (nfail > 0) return(nfail)
     }
 
-    Rfiles <- dir(".", pattern="\\.R$")
+    Rfiles <- dir(".", pattern="\\.[rR]$")
     for(f in Rfiles) {
         nfail <- nfail + runone(f)
-        if (nfail > 0) return(nfail)
+        if (nfail > 0 && stop_on_error) return(nfail)
     }
     if (!is.null(Log)) close(Log)
     return(nfail)
 }
 
+## Defaults for commenting are the same as per-3.2.0 version.
 .createExdotR <-
-    function(pkg, pkgdir, silent = FALSE, use_gct = FALSE, addTiming = FALSE)
+    function(pkg, pkgdir, silent = FALSE, use_gct = FALSE, addTiming = FALSE,
+             ..., commentDontrun = TRUE, commentDonttest = TRUE)
 {
     Rfile <- paste0(pkg, "-Ex.R")
-    ## might be zipped:
-    exdir <- file.path(pkgdir, "R-ex")
 
     db <- Rd_db(basename(pkgdir), lib.loc = dirname(pkgdir))
     if (!length(db)) {
@@ -510,8 +553,9 @@ testInstalledPackage <-
     for(f in files) {
         nm <- sub("\\.[Rr]d$", "", basename(f))
         Rd2ex(db[[f]],
-              file.path(filedir, paste(nm, "R", sep = ".")),
-              defines = NULL)
+              file.path(filedir, paste0(nm, ".R")),
+              defines = NULL, commentDontrun = commentDontrun,
+              commentDonttest = commentDonttest)
         cnt <- cnt + 1L
         if(!silent && cnt %% 10L == 0L)
             message(".", appendLF = FALSE, domain = NA)
@@ -520,11 +564,12 @@ testInstalledPackage <-
     nof <- length(Sys.glob(file.path(filedir, "*.R")))
     if(!nof) return(invisible(NULL))
 
-    massageExamples(pkg, filedir, Rfile, use_gct, addTiming)
+    massageExamples(pkg, filedir, Rfile, use_gct, addTiming,
+                    commentDonttest = commentDonttest, ...)
     invisible(Rfile)
 }
 
-testInstalledBasic <- function(scope = c("basic", "devel", "both"))
+testInstalledBasic <- function(scope = c("basic", "devel", "both", "internet"))
 {
     scope <- match.arg(scope)
 
@@ -533,28 +578,30 @@ testInstalledBasic <- function(scope = c("basic", "devel", "both"))
     tests1 <- c("eval-etc", "simple-true", "arith-true", "lm-tests",
                 "ok-errors", "method-dispatch", "array-subset",
                 "any-all", "d-p-q-r-tests")
-    tests2 <- c("complex", "print-tests", "lapack", "datasets", "iec60559")
+    tests2 <- c("complex", "print-tests", "lapack", "datasets", "datetime",
+                "iec60559")
     tests3 <- c("reg-tests-1a", "reg-tests-1b", "reg-tests-1c", "reg-tests-2",
                 "reg-examples1", "reg-examples2", "reg-packages",
-                "reg-IO", "reg-IO2", "reg-S4", "reg-plot", "reg-BLAS")
+                "p-qbeta-strict-tst",
+                "reg-IO", "reg-IO2", "reg-plot", "reg-S4", "reg-BLAS")
 
     runone <- function(f, diffOK = FALSE, inC = TRUE)
     {
-        f <- paste(f, "R", sep = ".")
+        f <- paste0(f, ".R")
         if (!file.exists(f)) {
             if (!file.exists(fin <- paste0(f, "in")))
                 stop("file ", sQuote(f), " not found", domain = NA)
             message("creating ", sQuote(f), domain = NA)
-            ## FIXME: this creates an extra trailing space compared to
-            ## the .Rin.R rule
             cmd <- paste(shQuote(file.path(R.home("bin"), "R")),
                          "--vanilla --slave -f", fin)
             if (system(cmd))
                 stop("creation of ", sQuote(f), " failed", domain = NA)
+            ## This needs an extra trailing space to match the .Rin.R rule
+            cat("\n", file = f, append = TRUE)
             on.exit(unlink(f))
         }
         message("  running code in ", sQuote(f), domain = NA)
-        outfile <- paste0(f, "out")
+        outfile <- sub("rout$", "Rout", paste0(f, "out"))
         cmd <- paste(shQuote(file.path(R.home("bin"), "R")),
                      "CMD BATCH --vanilla --no-timing",
                      shQuote(f), shQuote(outfile))
@@ -570,11 +617,11 @@ testInstalledBasic <- function(scope = c("basic", "devel", "both"))
         } else cmd <- paste(extra, cmd)
         res <- system(cmd)
         if (res) {
-            file.rename(outfile, paste(outfile, "fail", sep = "."))
+            file.rename(outfile, paste0(outfile, ".fail"))
             message("FAILED")
             return(1L)
         }
-        savefile <- paste(outfile, "save", sep = "." )
+        savefile <- paste0(outfile, ".save")
         if (file.exists(savefile)) {
             message(gettextf("  comparing %s to %s ...",
                              sQuote(outfile), sQuote(savefile)),
@@ -604,6 +651,7 @@ testInstalledBasic <- function(scope = c("basic", "devel", "both"))
             }
         }
         runone("reg-tests-3", TRUE)
+        runone("reg-examples3", TRUE)
         message("running tests of plotting Latin-1", domain = NA)
         message("  expect failure or some differences if not in a Latin or UTF-8 locale", domain = NA)
 
@@ -615,17 +663,32 @@ testInstalledBasic <- function(scope = c("basic", "devel", "both"))
     }
 
     if (scope %in% c("devel", "both")) {
+        message("running tests of date-time printing\n expect platform-specific differences", domain = NA)
+        runone("datetime2")
         message("running tests of consistency of as/is.*", domain = NA)
         runone("isas-tests")
         message("running tests of random deviate generation -- fails occasionally")
         runone("p-r-random-tests", TRUE)
+        message("running tests demos from base and stats", domain = NA)
+        if (runone("demos")) return(invisible(1L))
+        if (runone("demos2")) return(invisible(1L))
         message("running tests of primitives", domain = NA)
         if (runone("primitives")) return(invisible(1L))
         message("running regexp regression tests", domain = NA)
         if (runone("utf8-regex", inC = FALSE)) return(invisible(1L))
+        if (runone("PCRE")) return(invisible(1L))
+        message("running tests of CRAN tools", domain = NA)
+        if (runone("CRANtools")) return(invisible(1L))
         message("running tests to possibly trigger segfaults", domain = NA)
         if (runone("no-segfault")) return(invisible(1L))
     }
+    if (scope %in% "internet") {
+        message("running tests of Internet functions", domain = NA)
+        runone("internet")
+        message("running more Internet and socket tests", domain = NA)
+        runone("internet2")
+        runone("libcurl")
+    }
 
     invisible(0L)
 }
@@ -644,7 +707,7 @@ detachPackages <- function(pkgs, verbose = TRUE)
 
     ## The items need not all be packages
     ## and non-packages can be on the list multiple times.
-    isPkg <- grepl("^package:", pkgs)
+    isPkg <- startsWith(pkgs,"package:")
     for(item in pkgs[!isPkg]) {
         pos <- match(item, search())
         if(!is.na(pos)) .detach(pos)
@@ -660,12 +723,12 @@ detachPackages <- function(pkgs, verbose = TRUE)
     ## unloading 'grid' kills all devices
     ## tcltk is unhappy to have its DLL unloaded repeatedly
     exclusions <- c("grid", "tcltk")
-    exclusions <- paste("package", exclusions, sep = ":")
+    exclusions <- paste0("package:", exclusions)
     while(length(deps)) {
         unl <- unlist(deps)
         for(i in seq_along(deps)) {
             this <- names(deps)[i]
-            if(sub("^package:", "", this) %in% unl) next else break
+	    if(.rmpkg(this) %in% unl) next else break
         }
         ## hopefully force = TRUE is never needed, but it does ensure
         ## that progress gets made
@@ -691,7 +754,7 @@ detachPackages <- function(pkgs, verbose = TRUE)
             "  -h, --help     print this help message and exit",
             "  -v, --version  print version info and exit",
             "",
-            "Report bugs at bugs.r-project.org .",
+            "Report bugs at <https://bugs.R-project.org>.",
             sep = "\n")
     }
 
@@ -712,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-2013 The R Core Team.",
+                "Copyright (C) 2000-2017 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")
@@ -722,7 +785,6 @@ detachPackages <- function(pkgs, verbose = TRUE)
         do_exit(1L)
     }
 
-
     if (length(args) < 2L) {
         Usage()
         do_exit(1L)
@@ -735,4 +797,5 @@ detachPackages <- function(pkgs, verbose = TRUE)
     status <- Rdiff(left, args[2L], useDiff = TRUE)
     if(status) status <- exitstatus
     do_exit(status)
-}
+} ## .Rdiff()
+
diff --git a/src/library/tools/R/toHTML.R b/src/library/tools/R/toHTML.R
index 2d71bda..61eb8e1 100644
--- a/src/library/tools/R/toHTML.R
+++ b/src/library/tools/R/toHTML.R
@@ -1,7 +1,7 @@
 toHTML <- function(x, ...) UseMethod("toHTML")
 
 #
-#  Copyright (C) 1995-2013 The R Core Team
+#  Copyright (C) 1995-2016 The R Core Team
 
 HTMLheader <-
 function(title="R", logo=TRUE,
@@ -12,30 +12,32 @@ function(title="R", logo=TRUE,
          headerTitle = paste("R:", title),
          outputEncoding = "UTF-8")
 {
-    result <- c('<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">',
-	paste0('<html><head><title>', headerTitle, '</title>'),
+    result <- c('<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">',
+        '<html xmlns="http://www.w3.org/1999/xhtml">',
+	paste0('<head><title>', headerTitle, '</title>'),
 	paste0('<meta http-equiv="Content-Type" content="text/html; charset=',
-	       mime_canonical_encoding(outputEncoding), '">'),
-	paste0('<link rel="stylesheet" type="text/css" href="', css, '">'),
+	       mime_canonical_encoding(outputEncoding), '" />'),
+	paste0('<link rel="stylesheet" type="text/css" href="', css, '" />'),
 	'</head><body>',
 	paste('<h1>', title))
     if (logo)
     	result <- c(result,
                     paste0('<img class="toplogo" src="',
-                           file.path(Rhome, 'doc/html/logo.jpg'), '" alt="[R logo]">'))
-    result <- c(result, '</h1>', '<hr>')
+                           file.path(Rhome, 'doc/html/Rlogo.svg'),
+                           '" alt="[R logo]" />'))
+    result <- c(result, '</h1>', '<hr/>')
     if (!is.null(up) || !is.null(top)) {
-    	result <- c(result, '<div align="center">')
+    	result <- c(result, '<div style="text-align: center;">')
     	if (!is.null(up))
     	    result <- c(result,
-    	        paste0('<a href="', up, '"><img src="',
+    	        paste0('<a href="', up, '"><img class="arrow" src="',
                        file.path(Rhome, 'doc/html/left.jpg'),
-                       '" alt="[Up]" width="30" height="30" border="0"></a>'))
+                       '" alt="[Up]" /></a>'))
     	if (!is.null(top))
     	    result <- c(result,
-    	    	paste0('<a href="', top, '"><img src="',
+    	    	paste0('<a href="', top, '"><img class="arrow" src="',
     	    	      file.path(Rhome, 'doc/html/up.jpg'),
-    	    	      '" alt="[Top]" width="30" height="30" border="0"></a>'))
+    	    	      '" alt="[Top]" /></a>'))
     	result <- c(result, '</div>')
     }
     result
@@ -66,9 +68,10 @@ function(x, ...)
 			   htmlify(pkg), '’</h2>'),
 		    '<table cols="2" width="100%">',
 		    paste0('<tr>\n',
-			   ' <td align="left" valign="top" width="10%">\n',
+			   ' <td style="text-align: left; vertical-align: top; width: 10%;">\n',
 			   htmlify(out[[pkg]][, "Item"]),
-			   '\n </td>\n <td align="left" valign="top" width="90%">\n',
+			   '\n </td>\n',
+                           ' <td style="text-align: left; vertical-align: top; width: 90%;">\n',
 			   htmlify(out[[pkg]][, "Title"]),
 			   '\n </td>\n</tr>\n'),
 		    '</table>')
@@ -133,7 +136,8 @@ function(x, ...)
                             c(vheaders[i],
                               Map(function(h, t)
                                   c(h, print_items(t$Text)),
-                                  sprintf("<h3>%s</h3>", names(cchunks)),
+                                  sprintf("<h3>%s</h3>",
+                                          htmlify2(names(cchunks))),
                                   cchunks))
                         } else {
                             c(vheaders[i],
@@ -151,12 +155,12 @@ function(x, ...)
 
 makeVignetteTable <- function(vignettes, depth=2) {
     out <- c('<table width="100%">',
-	      '<col width="22%">',
-	      '<col width="2%">',
-	      '<col width="50%">',
-	      '<col width="8%">',
-	      '<col width="8%">',
-	      '<col width="8%">')
+	      '<col style="width: 22%;" />',
+	      '<col style="width:  2%;" />',
+	      '<col style="width: 50%;" />',
+	      '<col style="width:  8%;" />',
+	      '<col style="width:  8%;" />',
+             '<col style="width:  8%;" />')
     for (i in seq_len(nrow(vignettes))) {
 	Outfile <- vignettes[i, "PDF"]
 	topic <- file_path_sans_ext(Outfile)
@@ -168,14 +172,14 @@ makeVignetteTable <- function(vignettes, depth=2) {
 	link  <- c('<a href="', root,
 		  if (nchar(Outfile)) Outfile else File, '">',
 		  pkg, "::", topic, '</a>')
-	line <- c('<tr><td align="right" valign="top">', link,
+	line <- c('<tr><td style="text-align: right; vertical-align: top;">', link,
 		    '</td>\n<td></td><td valign="top">', Title,
 		    '</td>\n<td valign="top">',
 		    if (nchar(Outfile))
 			c('<a href="', root, Outfile,'">', vignette_type(Outfile), '</a>'),
 		    '</td>\n<td valign="top">',
 		    '<a href="', root, File,'">source</a>',
-		    '</td>\n<td valign="top" nowrap>',
+		    '</td>\n<td valign="top" style="white-space: nowrap">',
 		    if (nchar(R))
 		    	c('<a href="', root, R,'">R code</a>'),
 		    '</td></tr>')
@@ -186,15 +190,15 @@ makeVignetteTable <- function(vignettes, depth=2) {
 
 makeDemoTable <- function(demos, depth=2) {
     out <- c('<table width="100%">',
-	      '<col width="22%">',
-	      '<col width="2%">',
-	      '<col width="54%">',
-	      '<col width="20%">')
+             '<col style="width: 22%;" />',
+             '<col style="width:  2%;" />',
+             '<col style="width: 54%;" />',
+             '<col style="width: 20%;" />')
     for (i in seq_len(nrow(demos))) {
-	topic <- demos[i, "topic"]
+	topic <- demos[i, "Topic"]
 	pkg <- demos[i, "Package"]
         root <- c(rep("../", depth), "library/", pkg, "/")
-	Title <- demos[i, "title"]
+	Title <- demos[i, "Title"]
 	path <- file.path(demos[i, "LibPath"], "demo")
 	files <- basename(list_files_with_type(path, "demo", full.names=FALSE))
 	file <- files[topic == file_path_sans_ext(files)]
@@ -207,9 +211,9 @@ makeDemoTable <- function(demos, depth=2) {
 	    link <- c(pkg, "::", topic)
 	    runlink <- ""
 	}
-	line <- c('<tr><td align="right" valign="top">', link,
+	line <- c('<tr><td style="text-align: right; vertical-align: top;">', link,
 		    '</td>\n<td></td><td valign="top">', Title,
-		    '</td>\n<td valign="top" nowrap>', runlink,
+		    '</td>\n<td valign="top" style="white-space: nowrap">', runlink,
 		    '</td></tr>')
 	out <- c(out, paste(line, collapse=''))
      }
@@ -218,19 +222,17 @@ makeDemoTable <- function(demos, depth=2) {
 
 makeHelpTable <- function(help, depth=2) {
     out <- c('<table width="100%">',
-	      '<col width="22%">',
-	      '<col width="2%">',
-	      '<col width="74%">')
-    pkg <- help[,"Package"]
-    root <- paste0(paste(rep.int("../", depth), collapse=""),
-                   "library/", pkg, "/html/")
-    topic <- help[, "topic"]
-    Title <- help[, "title"]
-    name <- help[, "name"]
+             '<col style="width: 22%;" />',
+             '<col style="width:  2%;" />',
+             '<col style="width: 74%;" />')
+    pkg <- help[, "Package"]
+    root <- paste0(strrep("../", depth), "library/", pkg, "/html/")
+    topic <- help[, "Topic"]
+    Title <- help[, "Title"]
     links <- paste0('<a href="', root, topic, '.html">',
 		    ifelse(nchar(pkg), paste0(pkg, "::"), ""),
 		    topic, '</a>')
-    lines <- paste0('<tr><td align="right" valign="top">', links,
+    lines <- paste0('<tr><td style="text-align: right; vertical-align: top;">', links,
 		    '</td>\n<td></td><td valign="top">', Title,
 		    '</td></tr>')
     c(out, lines, '</table>')
diff --git a/src/library/tools/R/tools-defunct.R b/src/library/tools/R/tools-defunct.R
index 54ef476..bb66fd0 100644
--- a/src/library/tools/R/tools-defunct.R
+++ b/src/library/tools/R/tools-defunct.R
@@ -1,5 +1,5 @@
 #  File src/library/tools/R/tools-defunct.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
 #  Copyright (C) 1995-2013 The R Core Team
 #
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 ## Defunct 2009-08-19
 ## Removed for 3.0.0
diff --git a/src/library/tools/R/tools-deprecated.R b/src/library/tools/R/tools-deprecated.R
index 3c94a1e..3022824 100644
--- a/src/library/tools/R/tools-deprecated.R
+++ b/src/library/tools/R/tools-deprecated.R
@@ -1,7 +1,7 @@
 #  File src/library/tools/R/tools-deprecated.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
-#  Copyright (C) 1995-2012 The R Core Team
+#  Copyright (C) 1995-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
@@ -14,8 +14,384 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 ## <entry>
-## Deprecated in 2.1.0.
+## Deprecated in 3.3.0 (r70156 (Sat, 13 Feb 2016))
+
+## This is called only with check = FALSE in getDepMtrx/getRemotePkgDepends
+package.dependencies <-
+    function(x, check = FALSE, depLevel = c("Depends", "Imports", "Suggests"))
+{
+    depLevel <- match.arg(depLevel)
+    ## only one 'depLevel' at a time .. Rather use
+    .Deprecated("package_dependencies")
+
+    if(!is.matrix(x))
+        x <- matrix(x, nrow = 1L, dimnames = list(NULL, names(x)))
+
+    deps <- list()
+    for(k in 1L:nrow(x)){
+        z <- x[k, depLevel]
+        if(!is.na(z) & z != ""){
+            ## split dependencies, remove leading and trailing whitespace
+            z <- unlist(strsplit(z, ",", fixed=TRUE))
+            z <- sub("^[[:space:]]*(.*)", "\\1", z)
+            z <- sub("(.*)[[:space:]]*$", "\\1", z)
+
+            ## split into package names and version
+            pat <- "^([^\\([:space:]]+)[[:space:]]*\\(([^\\)]+)\\).*"
+            deps[[k]] <-
+                cbind(sub(pat, "\\1", z), sub(pat, "\\2", z), NA)
+
+            noversion <- deps[[k]][,1] == deps[[k]][,2]
+            deps[[k]][noversion,2] <- NA
+
+            ## split version dependency into operator and version number
+            pat <- "[[:space:]]*([[<>=]+)[[:space:]]+(.*)"
+            deps[[k]][!noversion, 2:3] <-
+                c(sub(pat, "\\1", deps[[k]][!noversion, 2]),
+                  sub(pat, "\\2", deps[[k]][!noversion, 2]))
+        }
+        else
+            deps[[k]] <- NA
+    }
+
+    if(check){
+        z <- rep.int(TRUE, nrow(x))
+        for(k in 1L:nrow(x)) {
+            ## currently we only check the version of R itself
+            if(!is.na(deps[[k]]) &&
+               any(ok <- deps[[k]][,1] == "R")) {
+                ## NOTE: currently operators must be `<=' or `>='.
+                if(!is.na(deps[[k]][ok, 2])
+                   && deps[[k]][ok, 2] %in% c("<=", ">=")) {
+                    ## careful.  We don't want 1.9.1 < 1.50
+                    op <- deps[[k]][ok,2]
+                    x1 <- rep.int(0, 6)
+                    y <- c(R.version$major,
+                           strsplit(R.version$minor, ".", fixed=TRUE)[[1L]])
+                    x1[seq_along(y)] <- y
+                    y <- strsplit(deps[[k]][ok,3], ".", fixed=TRUE)[[1L]]
+                    x1[3+seq_along(y)] <- y
+                    x1 <- format(x1, justify="right")
+                    x2 <- paste(x1[4:6], collapse=".")
+                    x1 <- paste(x1[1L:3], collapse=".")
+                    comptext <- paste0("'", x1, "' ", op, " '", x2, "'")
+                    compres <- try(eval(parse(text = comptext)))
+                    if(!inherits(compres, "try-error")) {
+                        z[k] <- compres
+                    }
+                }
+            }
+        }
+        names(z) <- x[,"Package"]
+        return(z)
+    }
+    else{
+        names(deps) <- x[,"Package"]
+        return(deps)
+    }
+}
+
+.package_dependencies <- function(packages = NULL, db,
+         which = c("Depends", "Imports", "LinkingTo"),
+         recursive = FALSE, reverse = FALSE)
+{
+    .Deprecated("package_dependencies")
+    package_dependencies(packages = packages, db = db,
+         which = which, recursive = recursive, reverse = reverse)
+}
+
+
+pkgDepends <- function(pkg, recursive=TRUE, local=TRUE,
+                       reduce=TRUE, lib.loc=NULL) {
+    if (length(pkg) != 1L)
+        stop("argument 'pkg' must be of length 1")
+
+    .Deprecated("package_dependencies()")# or also dependsOnPkgs() ?
+
+    instPkgs <- utils::installed.packages(lib.loc=lib.loc)
+
+    depMtrx <- getDepMtrx(pkg, instPkgs, local)
+    if (is.null(depMtrx))               # Package was not found
+        stop(gettextf("package '%s' was not found", pkg),
+             domain = NA)
+
+    getDepList(depMtrx, instPkgs, recursive, local, reduce)
+}
+
+getDepList <- function(depMtrx, instPkgs, recursive=TRUE,
+                       local=TRUE, reduce=TRUE, lib.loc=NULL)
+{
+    .Deprecated("dependsOnPkgs() or package_dependencies()")
+    if(!missing(lib.loc))
+        warning("the 'lib.loc' argument has always been unused and is deprecated now")
+
+    out <- structure(list(Depends=character(), Installed=character(),
+                          Found=list(), NotFound=character(),
+                          R=character()),
+                     class = "DependsList")
+
+    if (!is.matrix(depMtrx) && is.na(depMtrx)) # no dependencies
+        return(out)
+
+    mtrxList <- buildDepList(depMtrx, instPkgs, recursive)
+
+    if (!local) {
+        toFind <- mtrxList$Depends[!apply(mtrxList$Depends, 1L,
+                                          isSatisfied,
+                                          mtrxList$Installed),,drop=FALSE]
+        if (reduce)
+            toFind <- reduceDepends(toFind)
+
+        if (length(toFind)) {
+            found <- foundDepends(toFind)
+            out$Found <- found$Found
+            mtrxList$NotFound <- found$NotFound
+        }
+    }
+
+    if (reduce) {       # Found and NotFound are already reduced
+	mtrxList$R         <- reduceDepends(mtrxList$R)
+	mtrxList$Depends   <- reduceDepends(mtrxList$Depends)
+	mtrxList$Installed <- reduceDepends(mtrxList$Installed)
+    }
+
+    ## Massage the matrices back into dependency strings.  out$Found
+    ## is already assigned.
+    out$R         <- depMtrxToStrings(mtrxList$R)
+    out$Depends   <- depMtrxToStrings(mtrxList$Depends)
+    out$Installed <- depMtrxToStrings(mtrxList$Installed)
+    out$NotFound  <- depMtrxToStrings(mtrxList$NotFound)
+
+    out
+}
+
+isSatisfied <- function(dep, instMtrx) {
+    triplets <- apply(instMtrx, 1L, paste, collapse=":")
+    paste(dep,collapse=":") %in% triplets
+}
+
+buildDepList <- function(depMtrx, instPkgs, recursive=TRUE)
+{
+    mtrxList <- list(Depends  = matrix(nrow=0L, ncol=3L),
+		     Installed= matrix(nrow=0L, ncol=3L),
+		     R        = matrix(nrow=0L, ncol=3L))
+
+    ## First check to see if there is a dependency on R
+    ## If there is, then check it
+    if (any(isR <- depMtrx[,1] == "R")) {
+        mtrxList$R <- depMtrx[ isR,, drop=FALSE]
+        depMtrx <-    depMtrx[!isR,, drop=FALSE]
+    }
+
+    ## Get which of the direct depends are installed
+    instDeps <- depMtrx[installedDepends(depMtrx, instPkgs),,drop=FALSE]
+
+    mtrxList$Depends <- depMtrx
+    mtrxList$Installed <- instDeps
+    if (recursive) {
+        for (curPkg in depMtrx[,1]) {
+            depMtrx <- getDepMtrx(curPkg, instPkgs)
+            ## Make sure this package was found & has deps
+            if (is.null(depMtrx) || is.na(depMtrx))
+                next
+
+            curMtrxList <- buildDepList(depMtrx, instPkgs, recursive=TRUE)
+            mtrxList$R <- rbind(mtrxList$R, curMtrxList$R)
+            mtrxList$Depends <- rbind(mtrxList$Depends,
+                                      curMtrxList$Depends)
+            mtrxList$Installed <- rbind(mtrxList$Installed, curMtrxList$Installed)
+        }
+    }
+
+    mtrxList
+}
+
+getDepMtrx <- function(pkg, instPkgs, local=TRUE) {
+    ## Need to see if pkg is installed - if not, get online
+    row <- match(pkg, instPkgs[,"Package"])
+    if (!is.na(row)) # package is installed
+        package.dependencies(instPkgs[row,])[[1L]]
+    else if (!local)
+        getRemotePkgDepends(pkg)
+    ## else NULL
+
+    ## Either a matrix, NA if no deps or NULL if not found
+}
+
+getRemotePkgDepends <- function(pkg, contriburl=getOption("repos")) {
+    ## Will get the dependencies of a package from
+    ## online repositories.  Returns NULL if it
+    ## cannot be found, otherwise returns the row provided
+    ## by available.packages().
+
+    if(is.null(contriburl))
+        contriburl <- utils::contrib.url(getOption("repos"))
+
+    cran <- utils::available.packages(contriburl=contriburl)
+    if (any(iPkg <- pkg == cran[,"Package"]))
+        package.dependencies(cran[iPkg,])[[1L]]
+    ## else NULL
+}
+
+installedDepends <- function(depMtrx, instPkgs) {
+    ## Given a matrix of packages, will return a vector of row
+    ## numbers that correspond to packages in the matrix where
+    ## the dependency is met by installed packages
+
+    pkgs <- depMtrx[,1]
+    if (length(pkgs) &&
+	nrow(curPkgs <- depMtrx[pkgs %in% instPkgs[,"Package"],,drop=FALSE])) {
+	passVersReq <- apply(curPkgs, 1L, function(x) {
+	    (is.na(x[2L]) ||
+	     compareDependsPkgVersion(instPkgs[instPkgs[,1]==x[1L], "Version"],
+				      x[2L], x[3L]) >= 0)
+	})
+	passPkgs <- curPkgs[passVersReq,1]
+
+	which(depMtrx[,1] %in% passPkgs)
+    }
+    else
+	numeric()
+}
+
+foundDepends <- function(depMtrx, contriburl=getOption("repos")) {
+    out <- list(Found=list())
+    foundRows <- numeric()
+
+    if(is.null(contriburl))
+        contriburl <-
+            utils::contrib.url(c(CRAN = getOption("repos")["CRAN"],
+                                 BIOC = getOption("BIOC")))
+
+    if (nrow(depMtrx) > 0)
+        for (c.url in contriburl) {
+            cur <- character()
+            cran <- utils::available.packages(contriburl=c.url)
+
+            for (i in 1L:nrow(depMtrx)) {
+                found <- FALSE
+                cranRow <- which(depMtrx[i,1] == cran[,1])
+                if (length(cranRow)) {
+                    ## Found it in repos
+                    if (is.na(depMtrx[i,2])) # no version, automatically okay
+                        found <- TRUE
+                    else if(compareDependsPkgVersion(cran[cranRow, "Version"],
+                                                     depMtrx[i,2],
+                                                     depMtrx[i,3]))
+                        found <- TRUE
+                }
+                if (found) {
+                    foundRows <- c(foundRows,i)
+                    cur <- c(cur,depMtrx[i,1])
+                }
+            }
+            if (length(cur))
+                out$Found[c.url] <- cur
+        }
+
+
+    if (length(foundRows) != nrow(depMtrx))
+        out$NotFound <- depMtrx[-foundRows,,drop=FALSE]
+
+    out
+}
+
+compareDependsPkgVersion <- function(curVersion, versOper, versionReq) {
+    ## Returns -1 if FALSE, 0 or 1 if TRUE
+    if(versOper == ">=")
+        return(utils::compareVersion(curVersion, versionReq))
+    if(versOper == "<=")
+        return(utils::compareVersion(versionReq, curVersion))
+    else
+        stop("bad operand")
+}
+
+reduceDepends <- function(depMtrx, quietly=TRUE) {
+    if ((is.null(depMtrx))||nrow(depMtrx)==0)
+        return(character())
+
+    pkgList <- split(depMtrx, depMtrx[,1])
+    out <- lapply(pkgList, function(x, quietly) {
+        pkgMtrx <- matrix(x,ncol=3L)
+        ## there are no version requirements so just return
+        ## the pkg name
+        if (all(is.na(pkgMtrx[,2])))
+            outRow <- 1
+        else {
+            ## Have version requirements
+            ## Get the maximum ">=" requirement if one exists
+            gts <- pkgMtrx[pkgMtrx[,2] == ">=",,drop=FALSE]
+            if (nrow(gts) > 0) {
+               maxGts <- gts[1,3]
+               outRow <- 1
+               for (i in 1L:nrow(gts)) {
+                   if (utils::compareVersion(gts[i,3], maxGts) > 0) {
+                       maxGts <- gts[i,3]
+                       outRow <- i
+                   }
+               }
+            }
+
+            ## Find the minimal <= requirement if one exists
+            lts <- pkgMtrx[pkgMtrx[,2] == "<=",,drop=FALSE]
+            if (nrow(lts) > 0) {
+                minLts <- lts[1,3]
+                minRow <- 1
+                for (i in 1L:nrow(lts)) {
+                    if (utils::compareVersion(lts[i,3], minLts) < 0) {
+                        minLts <- lts[i,3]
+                        minRow <- i
+                    }
+                }
+                ## If there is a maxGts and it is larger then
+                ## the minLts then we need to record both
+                if (exists(maxGts))
+                    if (maxGts > minLts)
+                        outRow <- c(outRow, minRow)
+                else
+                    outRow <- minRow
+            }
+            if(!quietly)
+                warning(gettextf("Package '%s' had its dependencies reduced to a minimal set.",
+                                 pkgMtrx[1,]),
+                        domain = NA)
+        }
+	pkgMtrx[outRow,]
+    }, quietly)
+
+    matrix(unlist(out), ncol=3L, byrow=TRUE)
+}
+
+depMtrxToStrings <- function(depMtrx) {
+    if (length(depMtrx)) {
+        apply(depMtrx, 1L, function(x){
+            if (is.na(x[2L]))
+                x[1L]
+            else
+                paste0(x[1L]," (",x[2L]," ",x[3L],")")
+        })
+    }
+    else
+        character()
+}
+
+installFoundDepends <- function(depPkgList, ...) {
+
+    .Deprecated(msg = "'installFoundDepends()' is deprecated: It is misleading nowadays
+ since it has never taken 'Imports' into consideration")
+
+    urls <- names(depPkgList)
+    for (i in seq_along(depPkgList)) {
+        if (length(depPkgList[[i]]))
+            utils::install.packages(depPkgList[[i]],
+                                    contriburl = urls[i],
+                                    ...)
+    }
+
+    NULL
+}
+
 ## </entry>
diff --git a/src/library/tools/R/translations.R b/src/library/tools/R/translations.R
index 28ad480..fff55dd 100644
--- a/src/library/tools/R/translations.R
+++ b/src/library/tools/R/translations.R
@@ -1,7 +1,7 @@
 #  File src/library/tools/R/translations.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
-#  Copyright (C) 1995-2013 The R Core Team
+#  Copyright (C) 1995-2015 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
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 #### R based engine for managing translations
 
@@ -45,8 +45,8 @@ en_quote <- function(potfile, outfile)
         nc <- nchar(this); n <- length(nc)
         this <- paste0(this, collapse="")
         ## This is the fixup: need to avoid apostrophes, which follow alnum
-        this <- gsub("^'([^`']*)'",'‘\\1’', this)
-        this <- gsub("([^[:alpha:]]|\\\\\n)'([^`']*)'",'\\1‘\\2’', this)
+        this <- gsub("^'([^`']*)'",'\u2018\\1\u2019', this)
+        this <- gsub("([^[:alpha:]]|\\\\n)'([^`']*)'",'\\1\u2018\\2\u2019', this)
         out <- if (n > 1L) {
             ## now split where it was before
             this1 <- character()
@@ -179,8 +179,8 @@ update_pkg_po <- function(pkgdir, pkg = NULL, version = NULL, copyright, bugs)
                        value = TRUE, invert = TRUE)
     }
     cmd <- sprintf("xgettext --keyword=_ --keyword=N_ -o %s", shQuote(ofile))
-    cmd <- c(cmd, paste("--package-name", name, sep = "="),
-             paste("--package-version", version, sep = "="),
+    cmd <- c(cmd, paste0("--package-name=", name),
+             paste0("--package-version=", version),
              "--add-comments=TRANSLATORS:",
              if(!is.null(copyright))
                  sprintf('--copyright-holder="%s"', copyright),
@@ -265,7 +265,7 @@ update_RGui_po <- function(srcdir)
     ofile <- tempfile()
     cmd <- sprintf("xgettext --keyword --keyword=G_ --keyword=GN_ -o %s", shQuote(ofile))
     cmd <- c(cmd, "--package-name=R",
-             paste("--package-version", getRversion(), sep = "="),
+             paste0("--package-version=", getRversion()),
              "--add-comments=TRANSLATORS:",
              '--copyright-holder="The R Core Team"',
              '--msgid-bugs-address="bugs.r-project.org"')
diff --git a/src/library/tools/R/urltools.R b/src/library/tools/R/urltools.R
new file mode 100644
index 0000000..477e501
--- /dev/null
+++ b/src/library/tools/R/urltools.R
@@ -0,0 +1,564 @@
+#  File src/library/tools/R/urltools.R
+#  Part of the R package, https://www.R-project.org
+#
+#  Copyright (C) 2015-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
+#  the Free Software Foundation; either version 2 of the License, or
+#  (at your option) any later version.
+#
+#  This program is distributed in the hope that it will be useful,
+#  but WITHOUT ANY WARRANTY; without even the implied warranty of
+#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#  GNU General Public License for more details.
+#
+#  A copy of the GNU General Public License is available at
+#  https://www.R-project.org/Licenses/
+
+get_IANA_URI_scheme_db <-
+function()
+{
+    ## See
+    ## <http://www.iana.org/assignments/uri-schemes/uri-schemes.xhtml>.
+    baseurl <- "http://www.iana.org/assignments/uri-schemes/"
+    db <- utils::read.csv(url(paste0(baseurl, "uri-schemes-1.csv")),
+                          stringsAsFactors = FALSE)
+    names(db) <- chartr(".", "_", names(db))
+    db
+}
+
+parse_URI_reference <-
+function(x)
+{
+    ## See RFC_3986 <http://www.ietf.org/rfc/rfc3986.txt>.
+    re <- "^(([^:/?#]+):)?(//([^/?#]*))?([^?#]*)(\\?([^#]*))?(#(.*))?"
+    if(length(x)) {
+        y <- do.call(rbind, regmatches(x, regexec(re, x)))
+        y <- y[, c(3, 5, 6, 8, 10), drop = FALSE]
+    } else {
+        y <- matrix(character(), 0L, 5L)
+    }
+    colnames(y) <- c("scheme", "authority", "path", "query", "fragment")
+    y
+}
+
+.get_urls_from_Rd <-
+function(x)
+{
+    urls <- character()
+    recurse <- function(e) {
+        tag <- attr(e, "Rd_tag")
+        ## Rd2HTML and Rd2latex remove whitespace and \n from URLs.
+        if(identical(tag, "\\url")) {
+            urls <<-
+                c(urls, trimws(gsub("\n", "", .Rd_deparse(e, tag = FALSE),
+                                    fixed = TRUE, useBytes = TRUE)))
+        } else if(identical(tag, "\\href")) {
+            urls <<-
+                c(urls, trimws(gsub("\n", "",
+                                    .Rd_deparse(e[[1L]], tag = FALSE),
+                                    fixed = TRUE, useBytes = TRUE)))
+        } else if(is.list(e))
+              lapply(e, recurse)
+    }
+    lapply(x, recurse)
+    unique(trimws(urls))
+}
+
+.get_urls_from_HTML_file <-
+function(f)
+{
+    nodes <- xml2::xml_find_all(xml2::read_html(f), "//a")
+    hrefs <- xml2::xml_attr(nodes, "href")
+    unique(hrefs[!is.na(hrefs) & !startsWith(hrefs, "#")])
+}
+
+url_db <-
+function(urls, parents)
+{
+    ## Some people get leading LFs in URLs, so trim before checking.
+    db <- data.frame(URL = trimws(as.character(urls)),
+                     Parent = as.character(parents),
+                     stringsAsFactors = FALSE)
+    class(db) <- c("url_db", "data.frame")
+    db
+}
+
+url_db_from_package_Rd_db <-
+function(db)
+{
+    urls <- Filter(length, lapply(db, .get_urls_from_Rd))
+    url_db(unlist(urls, use.names = FALSE),
+           rep.int(file.path("man", names(urls)),
+                   lengths(urls)))
+}
+
+url_db_from_package_metadata <-
+function(meta)
+{
+    urls <- character()
+    fields <- c("URL", "BugReports")
+    for(v in meta[fields]) {
+        if(is.na(v)) next
+        pattern <-
+            "<(URL: *)?((https?|ftp)://[^[:space:],]*)[[:space:]]>"
+        m <- gregexpr(pattern, v)
+        urls <- c(urls, .gregexec_at_pos(pattern, v, m, 3L))
+        regmatches(v, m) <- ""
+        pattern <- "(^|[^>\"])((https?|ftp)://[^[:space:],]*)"
+        m <- gregexpr(pattern, v)
+        urls <- c(urls, .gregexec_at_pos(pattern, v, m, 3L))
+    }
+
+    url_db(urls, rep.int("DESCRIPTION", length(urls)))
+}
+
+url_db_from_package_citation <-
+function(dir, meta, installed = FALSE)
+{
+    urls <- character()
+    path <- if(installed) "CITATION" else file.path("inst", "CITATION")
+    cfile <- file.path(dir, path)
+    if(file.exists(cfile)) {
+        cinfo <- .read_citation_quietly(cfile, meta)
+        if(!inherits(cinfo, "error"))
+            urls <- trimws(unique(unlist(cinfo$url, use.names = FALSE)))
+    }
+    url_db(urls, rep.int(path, length(urls)))
+}
+
+url_db_from_package_news <-
+function(dir, installed = FALSE)
+{
+    urls <- character()
+    path <- if(installed) "NEWS.Rd" else file.path("inst", "NEWS.Rd")
+    nfile <- file.path(dir, path)
+    if(file.exists(nfile)) {
+        macros <- initialRdMacros()
+        urls <- .get_urls_from_Rd(prepare_Rd(tools::parse_Rd(nfile,
+                                                             macros = macros),
+                                             stages = "install"))
+    }
+    url_db(urls, rep.int(path, length(urls)))
+}
+
+url_db_from_package_HTML_files <-
+function(dir, installed = FALSE)
+{
+    urls <- parents <- character()
+    path <- if(installed) "doc" else file.path("inst", "doc")
+    files <- Sys.glob(file.path(dir, path, "*.html"))
+    if(installed && file.exists(rfile <- file.path(dir, "README.html")))
+        files <- c(files, rfile)
+    if(length(files)) {
+        urls <- lapply(files, .get_urls_from_HTML_file)
+        names(urls) <- files
+        urls <- Filter(length, urls)
+        if(length(urls)) {
+            parents <- rep.int(.file_path_relative_to_dir(names(urls),
+                                                          dir),
+                               lengths(urls))
+            urls <- unlist(urls, use.names = FALSE)
+        }
+    }
+    url_db(urls, parents)
+}
+
+url_db_from_package_README_md <-
+function(dir, installed = FALSE)
+{
+    urls <- path <- character()
+    rfile <- Filter(file.exists,
+                    c(if(!installed)
+                          file.path(dir, "inst", "README.md"),
+                      file.path(dir, "README.md")))[1L]
+    if(!is.na(rfile) && nzchar(Sys.which("pandoc"))) {
+        path <- .file_path_relative_to_dir(rfile, dir)
+        tfile <- tempfile("README", fileext = ".html")
+        on.exit(unlink(tfile))
+        out <- .pandoc_md_for_CRAN(rfile, tfile)
+        if(!out$status) {
+            urls <- .get_urls_from_HTML_file(tfile)
+        }
+    }
+    url_db(urls, rep.int(path, length(urls)))
+}
+
+url_db_from_package_NEWS_md <-
+function(dir, installed = FALSE)
+{
+    urls <- path <- character()
+    nfile <- Filter(file.exists,
+                    c(if(!installed)
+                          file.path(dir, "inst", "NEWS.md"),
+                      file.path(dir, "NEWS.md")))[1L]
+    if(!is.na(nfile) && nzchar(Sys.which("pandoc"))) {
+        path <- .file_path_relative_to_dir(nfile, dir)
+        tfile <- tempfile("NEWS", fileext = ".html")
+        on.exit(unlink(tfile))
+        out <- .pandoc_md_for_CRAN(nfile, tfile)
+        if(!out$status) {
+            urls <- .get_urls_from_HTML_file(tfile)
+        }
+    }
+    url_db(urls, rep.int(path, length(urls)))
+}
+
+url_db_from_package_sources <-
+function(dir, add = FALSE) {
+    meta <- .read_description(file.path(dir, "DESCRIPTION"))
+    db <- rbind(url_db_from_package_metadata(meta),
+                url_db_from_package_Rd_db(Rd_db(dir = dir)),
+                url_db_from_package_citation(dir, meta),
+                url_db_from_package_news(dir))
+    if(requireNamespace("xml2", quietly = TRUE)) {
+        db <- rbind(db,
+                    url_db_from_package_HTML_files(dir),
+                    url_db_from_package_README_md(dir),
+                    url_db_from_package_NEWS_md(dir)
+                    )
+    }
+    if(add)
+        db$Parent <- file.path(basename(dir), db$Parent)
+    db
+}
+
+url_db_from_installed_packages <-
+function(packages, lib.loc = NULL, verbose = FALSE)
+{
+    if(!length(packages)) return()
+    one <- function(p) {
+        if(verbose)
+            message(sprintf("processing %s", p))
+        dir <- system.file(package = p, lib.loc = lib.loc)
+        if(dir == "") return()
+        meta <- .read_description(file.path(dir, "DESCRIPTION"))
+        rddb <- Rd_db(p, lib.loc = dirname(dir))
+        db <- rbind(url_db_from_package_metadata(meta),
+                    url_db_from_package_Rd_db(rddb),
+                    url_db_from_package_citation(dir, meta,
+                                                 installed = TRUE),
+                    url_db_from_package_news(dir, installed = TRUE))
+        if(requireNamespace("xml2", quietly = TRUE)) {
+            db <- rbind(db,
+                        url_db_from_package_HTML_files(dir,
+                                                       installed = TRUE),
+                        url_db_from_package_README_md(dir,
+                                                      installed = TRUE),
+                        url_db_from_package_NEWS_md(dir,
+                                                    installed = TRUE)
+                        )
+        }
+        db$Parent <- file.path(p, db$Parent)
+        db
+    }
+    do.call(rbind,
+            c(lapply(packages, one),
+              list(make.row.names = FALSE)))
+}
+
+get_IANA_HTTP_status_code_db <-
+function()
+{
+    ## See
+    ## <http://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml>
+    baseurl <- "http://www.iana.org/assignments/http-status-codes/"
+    db <- utils::read.csv(url(paste0(baseurl, "http-status-codes-1.csv")),
+                          stringsAsFactors = FALSE)
+    ## Drop "Unassigned".
+    db[db$Description != "Unassigned", ]
+}
+
+## See <https://en.wikipedia.org/wiki/List_of_FTP_server_return_codes>
+## and <http://tools.ietf.org/html/rfc959>,
+## Section 4.2.2 "Numeric Order List of Reply Codes",
+## and <https://tools.ietf.org/html/rfc2228>,
+## Section 5 "New FTP Replies".
+## Only need those >= 400.
+table_of_FTP_server_return_codes <-
+    c("421" = "Service not available, closing control connection.",
+      "425" = "Can't open data connection.",
+      "426" = "Connection closed; transfer aborted.",
+      "430" = "Invalid username or password",
+      "431" = "Need some unavailable resource to process security.",
+      "434" = "Requested host unavailable.",
+      "450" = "Requested file action not taken.",
+      "451" = "Requested action aborted: local error in processing.",
+      "452" = "Requested action not taken.  Insufficient storage space in system.",
+      "500" = "Syntax error, command unrecognized.",
+      "501" = "Syntax error in parameters or arguments.",
+      "502" = "Command not implemented.",
+      "503" = "Bad sequence of commands.",
+      "504" = "Command not implemented for that parameter.",
+      "530" = "Not logged in.",
+      "532" = "Need account for storing files.",
+      "533" = "Command protection level denied for policy reasons.",
+      "534" = "Request denied for policy reasons.",
+      "535" = "Failed security check (hash, sequence, etc).",
+      "536" = "Requested PROT level not supported by mechanism.",
+      "537" = "Command protection level not supported by security mechanism.",
+      "550" = "Requested action not taken.  File unavailable",
+      "551" = "Requested action aborted: page type unknown.",
+      "552" = "Requested file action aborted.  Exceeded storage allocation (for current directory or dataset).",
+      "553" = "Requested action not taken.  File name not allowed.",
+      "631" = "Integrity protected reply.",
+      "632" = "Confidentiality and integrity protected reply.",
+      "633" = "Confidentiality protected reply."
+      )
+
+check_url_db <-
+function(db, remote = TRUE, verbose = FALSE)
+{
+    use_curl <-
+        config_val_to_logical(Sys.getenv("_R_CHECK_URLS_USE_CURL_",
+                                         "TRUE")) &&
+        requireNamespace("curl", quietly = TRUE)
+
+    .gather <- function(u = character(),
+                        p = list(),
+                        s = rep.int("", length(u)),
+                        m = rep.int("", length(u)),
+                        new = rep.int("", length(u)),
+                        cran = rep.int("", length(u)),
+                        spaces = rep.int("", length(u)),
+                        R = rep.int("", length(u))) {
+        y <- data.frame(URL = u, From = I(p), Status = s, Message = m,
+                        New = new, CRAN = cran, Spaces = spaces, R = R,
+                        stringsAsFactors = FALSE)
+        y$From <- p
+        class(y) <- c("check_url_db", "data.frame")
+        y
+    }
+
+    .fetch <- function(u) {
+        if(verbose) message(sprintf("processing %s", u))
+        h <- tryCatch(curlGetHeaders(u), error = identity)
+        if(inherits(h, "error")) {
+            ## Currently, this info is only used in .check_http().
+            ## Might be useful for checking ftps too, so simply leave it
+            ## here instead of moving to .check_http().
+            msg <- conditionMessage(h)
+            if (grepl("libcurl error code (51|60)", msg)) {
+                h2 <- tryCatch(curlGetHeaders(u, verify = FALSE),
+                               error = identity)
+                attr(h, "no-verify") <- h2
+            }
+        }
+        h
+    }
+
+    .check_ftp <- function(u) {
+        h <- .fetch(u)
+        if(inherits(h, "error")) {
+            s <- "-1"
+            msg <- sub("[[:space:]]*$", "", conditionMessage(h))
+        } else {
+            s <- as.character(attr(h, "status"))
+            msg <- table_of_FTP_server_return_codes[s]
+        }
+        c(s, msg, "", "")
+    }
+
+    .check_http <- if(remote)
+        function(u) c(.check_http_A(u), .check_http_B(u))
+    else
+        function(u) c(rep.int("", 3L), .check_http_B(u))
+
+    .check_http_A <- function(u) {
+        h <- .fetch(u)
+        newLoc <- ""
+        if(inherits(h, "error")) {
+            s <- "-1"
+            msg <- sub("[[:space:]]*$", "", conditionMessage(h))
+            if (!is.null(v <- attr(h, "no-verify"))) {
+                s2 <- as.character(attr(v, "status"))
+                msg <- paste0(msg, "\n\t(Status without verification: ",
+                              table_of_HTTP_status_codes[s2], ")")
+            }
+        } else {
+            s <- as.character(attr(h, "status"))
+            msg <- table_of_HTTP_status_codes[s]
+        }
+        ## Look for redirected URLs
+        if (any(grepl("301 Moved Permanently", h, useBytes = TRUE))) {
+            ind <- grep("^[Ll]ocation: ", h, useBytes = TRUE)
+            if (length(ind))
+                newLoc <- sub("^[Ll]ocation: ([^\r]*)\r\n", "\\1", h[max(ind)])
+        }
+        ##
+        if((s != "200") && use_curl) {
+            g <- .curl_GET_status(u)
+            if(g == "200") {
+                s <- g
+                msg <- "OK"
+            }
+        }
+        ## A mis-configured site
+        if (s == "503" && any(grepl("www.sciencedirect.com", c(u, newLoc))))
+            s <- "405"
+        c(s, msg, newLoc)
+    }
+
+    .check_http_B <- function(u) {
+        ul <- tolower(u)
+        cran <- ((grepl("^https?://cran.r-project.org/web/packages", ul) &&
+                  !grepl("^https?://cran.r-project.org/web/packages/[.[:alnum:]]+(html|pdf|rds)$",
+                         ul)) ||
+                 (grepl("^https?://cran.r-project.org/web/views/[[:alnum:]]+[.]html$",
+                        ul)) ||
+                 startsWith(ul, "http://cran.r-project.org") ||
+                 any(substring(ul, 1L, nchar(mirrors)) == mirrors))
+        R <- grepl("^http://(www|bugs|journal).r-project.org", ul)
+        spaces <- grepl(" ", u)
+        c(if(cran) u else "", if(spaces) u else "", if(R) u else "")
+    }
+
+    bad <- .gather()
+
+    if(!NROW(db)) return(bad)
+
+    ## Could also use utils::getCRANmirrors(local.only = TRUE).
+    mirrors <- c(utils::read.csv(file.path(R.home("doc"),
+                                           "CRAN_mirrors.csv"),
+                                 as.is = TRUE, encoding = "UTF-8")$URL,
+                 "http://cran.rstudio.com/",
+                 "https://cran.rstudio.com/")
+    mirrors <- tolower(sub("/$", "", mirrors))
+
+    if(inherits(db, "check_url_db")) {
+        ## Allow re-checking check results.
+        parents <- db$From
+        urls <- db$URL
+    } else {
+        parents <- split(db$Parent, db$URL)
+        urls <- names(parents)
+    }
+
+    parts <- parse_URI_reference(urls)
+
+    ## Empty URLs.
+    ind <- apply(parts == "", 1L, all)
+    if(any(ind)) {
+        len <- sum(ind)
+        bad <- rbind(bad,
+                     .gather(urls[ind],
+                             parents[ind],
+                             m = rep.int("Empty URL", len)))
+    }
+
+    ## Invalid URI schemes.
+    schemes <- parts[, 1L]
+    ind <- is.na(match(schemes,
+                       c("",
+                         IANA_URI_scheme_db$URI_Scheme,
+                         ## Also allow 'javascript' scheme, see
+                         ## <https://tools.ietf.org/html/draft-hoehrmann-javascript-scheme-03>
+                         ## (but apparently never registered with IANA).
+                         "javascript")))
+    if(any(ind)) {
+        len <- sum(ind)
+        msg <- rep.int("Invalid URI scheme", len)
+        doi <- schemes[ind] == "doi"
+        if(any(doi))
+            msg[doi] <- paste(msg[doi], "(use \\doi for DOIs in Rd markup)")
+        bad <- rbind(bad,
+                     .gather(urls[ind], parents[ind], m = msg))
+    }
+
+    ## ftp.
+    pos <- which(schemes == "ftp")
+    if(length(pos) && remote) {
+        results <- do.call(rbind, lapply(urls[pos], .check_ftp))
+        status <- as.numeric(results[, 1L])
+        ind <- (status < 0L) | (status >= 400L)
+        if(any(ind)) {
+            pos <- pos[ind]
+            s <- as.character(status[ind])
+            s[s == "-1"] <- "Error"
+            m <- results[ind, 2L]
+            m[is.na(m)] <- ""
+            bad <- rbind(bad,
+                         .gather(urls[pos], parents[pos], s, m))
+        }
+    }
+
+    ## http/https.
+    pos <- which(schemes == "http" | schemes == "https")
+    if(length(pos)) {
+        results <- do.call(rbind, lapply(urls[pos], .check_http))
+        status <- as.numeric(results[, 1L])
+        ## 405 is HTTP not allowing HEAD requests
+        ## maybe also skip 500, 503, 504 as likely to be temporary issues
+        ind <- is.na(match(status, c(200L, 405L, NA))) |
+            nzchar(results[, 4L]) |
+            nzchar(results[, 5L]) |
+            nzchar(results[, 6L])
+        if(any(ind)) {
+            pos <- pos[ind]
+            s <- as.character(status[ind])
+            s[is.na(s)] <- ""
+            s[s == "-1"] <- "Error"
+            m <- results[ind, 2L]
+            m[is.na(m)] <- ""
+            bad <- rbind(bad,
+                         .gather(urls[pos], parents[pos], s, m,
+                                 results[ind, 3L],
+                                 results[ind, 4L],
+                                 results[ind, 5L],
+                                 results[ind, 6L]))
+        }
+    }
+    bad
+}
+
+format.check_url_db <-
+function(x, ...)
+{
+    if(!NROW(x)) return(character())
+
+    u <- x$URL
+    new <- x$New
+    ind <- nzchar(new)
+    u[ind] <- sprintf("%s (moved to %s)", u[ind], new[ind])
+
+    paste0(sprintf("URL: %s", u),
+           sprintf("\nFrom: %s",
+                   sapply(x$From, paste, collapse = "\n      ")),
+           ifelse((s <- x$Status) == "",
+                  "",
+                  sprintf("\nStatus: %s", s)),
+           ifelse((m <- x$Message) == "",
+                  "",
+                  sprintf("\nMessage: %s", m)),
+           ifelse((m <- x$Spaces) == "",
+                  "",
+                  "\nURL contains spaces"),
+           ifelse((m <- x$CRAN) == "",
+                  "",
+                  "\nCRAN URL not in canonical form"),
+           ifelse((m <- x$R) == "",
+                  "",
+                  "\nR-project URL not in canonical form")
+           )
+}
+
+print.check_url_db <-
+function(x, ...)
+{
+    if(NROW(x))
+        writeLines(paste(format(x), collapse = "\n\n"))
+    invisible(x)
+}
+
+.curl_GET_status <-
+function(u, verbose = FALSE)
+{
+    if(verbose)
+        message(sprintf("processing %s", u))
+    g <- tryCatch(curl::curl_fetch_memory(u), error = identity)
+    if(inherits(g, "error"))
+        -1L
+    else
+        g$status_code
+}
diff --git a/src/library/tools/R/utils.R b/src/library/tools/R/utils.R
index 7b8dde6..6192ae0 100644
--- a/src/library/tools/R/utils.R
+++ b/src/library/tools/R/utils.R
@@ -1,7 +1,7 @@
 #  File src/library/tools/R/utils.R
-#  Part of the R package, http://www.R-project.org
+#  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
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 ### * File utilities.
 
@@ -69,13 +69,13 @@ function(op, x, y)
     ## directory (the GNU variant tests for being a regular file).
     ## Note: vectorized in x and y.
     switch(op,
-           "-f" = !is.na(isdir <- file.info(x)$isdir) & !isdir,
-           "-d" = !is.na(isdir <- file.info(x)$isdir) & isdir,
-           "-nt" = (!is.na(mt.x <- file.info(x)$mtime)
-                    & !is.na(mt.y <- file.info(y)$mtime)
+           "-f" = !is.na(isdir <- file.info(x, extra_cols = FALSE)$isdir) & !isdir,
+           "-d" = dir.exists(x),
+           "-nt" = (!is.na(mt.x <- file.mtime(x))
+                    & !is.na(mt.y <- file.mtime(y))
                     & (mt.x > mt.y)),
-           "-ot" = (!is.na(mt.x <- file.info(x)$mtime)
-                    & !is.na(mt.y <- file.info(y)$mtime)
+           "-ot" = (!is.na(mt.x <- file.mtime(x))
+                    & !is.na(mt.y <- file.mtime(y))
                     & (mt.x < mt.y)),
            "-x" = (file.access(x, 1L) == 0L),
            stop(gettextf("test '%s' is not available", op),
@@ -131,7 +131,7 @@ function(dir, type, all.files = FALSE, full.names = TRUE,
     if(type %in% c("code", "docs")) {
         for(os in OS_subdirs) {
             os_dir <- file.path(dir, os)
-            if(file_test("-d", os_dir)) {
+            if(dir.exists(os_dir)) {
                 os_files <- list_files_with_exts(os_dir, exts,
                                                  all.files = all.files,
                                                  full.names = FALSE)
@@ -152,6 +152,21 @@ function(dir, type, all.files = FALSE, full.names = TRUE,
     files
 }
 
+### ** reQuote
+
+## <FIXME>
+## Move into base eventually ...
+reQuote <-
+function(x)
+{
+    escape <- function(s) paste0("\\", s)
+    re <- "[.*?+^$\\[]"
+    m <- gregexpr(re, x)
+    regmatches(x, m) <- lapply(regmatches(x, m), escape)
+    x
+}
+## </FIXME>
+
 ### ** showNonASCII
 
 showNonASCII <-
@@ -164,8 +179,9 @@ function(x)
     asc <- iconv(x, "latin1", "ASCII")
     ind <- is.na(asc) | asc != x
     if(any(ind))
-        cat(paste0(which(ind), ": ", iconv(x[ind], "latin1", "ASCII", sub = "byte")),
-            sep = "\n")
+        message(paste0(which(ind), ": ",
+                       iconv(x[ind], "latin1", "ASCII", sub = "byte"),
+                       collapse = "\n"), domain = NA)
     invisible(x[ind])
 }
 
@@ -173,6 +189,8 @@ showNonASCIIfile <-
 function(file)
     showNonASCII(readLines(file, warn = FALSE))
 
+env_path <- function(...) file.path(..., fsep = .Platform$path.sep)
+
 ### * Text utilities.
 
 ### ** delimMatch
@@ -188,7 +206,7 @@ function(x, delim = c("{", "}"), syntax = "Rd")
     if(syntax != "Rd")
         stop("only Rd syntax is currently supported")
 
-    .Call(delim_match, x, delim)
+    .Call(C_delim_match, x, delim)
 }
 
 
@@ -222,8 +240,13 @@ function(file, pdf = FALSE, clean = FALSE, quiet = TRUE,
 
     ## Run texi2dvi on a latex file, or emulate it.
 
-    if(is.null(texi2dvi) || !nzchar(texi2dvi) || texi2dvi == "texi2dvi")
-        texi2dvi <- Sys.which("texi2dvi")
+    if(identical(texi2dvi, "emulation")) texi2dvi <- ""
+    else {
+        if(is.null(texi2dvi) || !nzchar(texi2dvi) || texi2dvi == "texi2dvi")
+            texi2dvi <- Sys.which("texi2dvi")
+        if(.Platform$OS.type == "windows" && !nzchar(texi2dvi))
+            texi2dvi <- Sys.which("texify")
+    }
 
     envSep <- .Platform$path.sep
     texinputs0 <- texinputs
@@ -242,19 +265,19 @@ function(file, pdf = FALSE, clean = FALSE, quiet = TRUE,
     bstinputs <- paste(c(texinputs0, Rbstinputs, ""),
                        collapse = envSep)
 
-    otexinputs <- Sys.getenv("TEXINPUTS", unset = NA)
+    otexinputs <- Sys.getenv("TEXINPUTS", unset = NA_character_)
     if(is.na(otexinputs)) {
         on.exit(Sys.unsetenv("TEXINPUTS"))
         otexinputs <- "."
     } else on.exit(Sys.setenv(TEXINPUTS = otexinputs))
     Sys.setenv(TEXINPUTS = paste(otexinputs, texinputs, sep = envSep))
-    obibinputs <- Sys.getenv("BIBINPUTS", unset = NA)
+    obibinputs <- Sys.getenv("BIBINPUTS", unset = NA_character_)
     if(is.na(obibinputs)) {
         on.exit(Sys.unsetenv("BIBINPUTS"), add = TRUE)
         obibinputs <- "."
     } else on.exit(Sys.setenv(BIBINPUTS = obibinputs, add = TRUE))
     Sys.setenv(BIBINPUTS = paste(obibinputs, bibinputs, sep = envSep))
-    obstinputs <- Sys.getenv("BSTINPUTS", unset = NA)
+    obstinputs <- Sys.getenv("BSTINPUTS", unset = NA_character_)
     if(is.na(obstinputs)) {
         on.exit(Sys.unsetenv("BSTINPUTS"), add = TRUE)
         obstinputs <- "."
@@ -269,21 +292,23 @@ function(file, pdf = FALSE, clean = FALSE, quiet = TRUE,
         opt_quiet <- if(quiet) "--quiet" else ""
         opt_extra <- ""
         out <- .system_with_capture(texi2dvi, "--help")
+
         if(length(grep("--no-line-error", out$stdout)))
             opt_extra <- "--no-line-error"
-        ## This is present in texinfo after late 2009, so really 5.x.
-        if(length(grep("--max-iterations=N", out$stdout)))
-            opt_extra <- c(opt_extra, "--max-iterations=20")
         ## (Maybe change eventually: the current heuristics for finding
         ## error messages in log files should work for both regular and
         ## file line error indicators.)
 
+        ## This is present in texinfo after late 2009, so really >= 5.0.
+        if(any(grepl("--max-iterations=N", out$stdout)))
+            opt_extra <- c(opt_extra, "--max-iterations=20")
+
         ## and work around a bug in texi2dvi
         ## https://stat.ethz.ch/pipermail/r-devel/2011-March/060262.html
         ## That has [A-Za-z], earlier versions [A-z], both of which may be
         ## invalid in some locales.
         env0 <- "LC_COLLATE=C"
-        ## texi2dvi, at least on OS X (4.8) does not accept TMPDIR with spaces.
+        ## texi2dvi, at least on macOS (4.8) does not accept TMPDIR with spaces.
         if (grepl(" ", Sys.getenv("TMPDIR")))
             env0 <- paste(env0,  "TMPDIR=/tmp")
         out <- .system_with_capture(texi2dvi,
@@ -291,11 +316,29 @@ function(file, pdf = FALSE, clean = FALSE, quiet = TRUE,
                                       shQuote(file)),
                                     env = env0)
 
+        log <- paste0(file_path_sans_ext(file), ".log")
+
+        ## With Texinfo 6.1 (precisely, c6637), texi2dvi may not rerun
+        ## often enough and give a non-zero status value when it should
+        ## have continued iterating.
+        ## Try to catch and correct cases seen on CRAN ...
+        ## (Note that texi2dvi may have been run quietly, in which case
+        ## diagnostics will only be in the log file.)
+        if(out$status &&
+           file_test("-f", log) &&
+           any(grepl("(Rerun to get|biblatex.*\\(re\\)run)",
+                     readLines(log, warn = FALSE)))) {
+            out <- .system_with_capture(texi2dvi,
+                                        c(opt_pdf, opt_quiet, opt_extra,
+                                          shQuote(file)),
+                                        env = env0)
+        }
+
         ## We cannot necessarily rely on out$status, hence let us
         ## analyze the log files in any case.
         errors <- character()
         ## (La)TeX errors.
-        log <- paste(file_path_sans_ext(file), "log", sep = ".")
+        log <- paste0(file_path_sans_ext(file), ".log")
         if(file_test("-f", log)) {
             lines <- .get_LaTeX_errors_from_log_file(log)
             if(length(lines))
@@ -304,7 +347,7 @@ function(file, pdf = FALSE, clean = FALSE, quiet = TRUE,
                                 sep = "\n")
         }
         ## BibTeX errors.
-        log <- paste(file_path_sans_ext(file), "blg", sep = ".")
+        log <- paste0(file_path_sans_ext(file), ".blg")
         if(file_test("-f", log)) {
             lines <- .get_BibTeX_errors_from_blg_file(log)
             if(length(lines))
@@ -358,7 +401,7 @@ function(file, pdf = FALSE, clean = FALSE, quiet = TRUE,
             texinputs <- gsub("\\", "/", texinputs, fixed = TRUE)
             paths <- paste ("-I", shQuote(texinputs))
             extra <- "--max-iterations=20"
-           extra <- paste(extra, paste(paths, collapse = " "))
+            extra <- paste(extra, paste(paths, collapse = " "))
         }
         ## 'file' could be a file path
         base <- basename(file_path_sans_ext(file))
@@ -370,7 +413,7 @@ function(file, pdf = FALSE, clean = FALSE, quiet = TRUE,
                intern=TRUE, ignore.stderr=TRUE)
         msg <- ""
         ## (La)TeX errors.
-        logfile <- paste(base, "log", sep = ".")
+        logfile <- paste0(base, ".log")
         if(file_test("-f", logfile)) {
             lines <- .get_LaTeX_errors_from_log_file(logfile)
             if(length(lines))
@@ -379,7 +422,7 @@ function(file, pdf = FALSE, clean = FALSE, quiet = TRUE,
                              sep = "\n")
         }
         ## BibTeX errors.
-        logfile <- paste(base, "blg", sep = ".")
+        logfile <- paste0(base, ".blg")
         if(file_test("-f", logfile)) {
             lines <- .get_BibTeX_errors_from_blg_file(logfile)
             if(length(lines))
@@ -396,11 +439,7 @@ function(file, pdf = FALSE, clean = FALSE, quiet = TRUE,
         }
     } else {
         ## Do not have texi2dvi or don't want to index
-        ## Needed on Windows except for MiKTeX
-        ## Note that this does not do anything about running quietly,
-        ## nor cleaning, but is probably not used much anymore.
-
-        ## If it is called with MiKTeX then TEXINPUTS etc will be ignored.
+        ## Needed on Windows except for MiKTeX (prior to Sept 2015)
 
         texfile <- shQuote(file)
         ## 'file' could be a file path
@@ -411,29 +450,42 @@ function(file, pdf = FALSE, clean = FALSE, quiet = TRUE,
         if(!nzchar(Sys.which(latex)))
             stop(if(pdf) "pdflatex" else "latex", " is not available",
                  domain = NA)
+
+        sys2 <- if(quiet)
+            function(...) system2(..., stdout = FALSE, stderr = FALSE)
+        else system2
         bibtex <- Sys.getenv("BIBTEX", "bibtex")
         makeindex <- Sys.getenv("MAKEINDEX", "makeindex")
-        if(system(paste(shQuote(latex), "-interaction=nonstopmode", texfile)))
+        ltxargs <- c("-interaction=nonstopmode", texfile)
+        if(sys2(latex, ltxargs))
             stop(gettextf("unable to run '%s' on '%s'", latex, file),
                  domain = NA)
-        nmiss <- length(grep("^LaTeX Warning:.*Citation.*undefined",
+        nmiss <- length(grep("Warning:.*Citation.*undefined",
                              readLines(paste0(base, ".log"))))
         for(iter in 1L:10L) { ## safety check
             ## This might fail as the citations have been included in the Rnw
-            if(nmiss) system(paste(shQuote(bibtex), shQuote(base)))
+            if(nmiss) sys2(bibtex, shQuote(base))
             nmiss_prev <- nmiss
             if(index && file.exists(idxfile)) {
-                if(system(paste(shQuote(makeindex), shQuote(idxfile))))
+                if(sys2(makeindex, shQuote(idxfile)))
                     stop(gettextf("unable to run '%s' on '%s'",
                                   makeindex, idxfile),
                          domain = NA)
             }
-            if(system(paste(shQuote(latex), "-interaction=nonstopmode", texfile)))
-                stop(gettextf("unable to run %s on '%s'", latex, file), domain = NA)
+            if(sys2(latex, ltxargs)) {
+                lines <- .get_LaTeX_errors_from_log_file(paste0(base, ".log"))
+                errors <- if(length(lines))
+                    paste("LaTeX errors:",
+                          paste(lines, collapse = "\n"), sep = "\n")
+                else character()
+                stop(paste(gettextf("unable to run %s on '%s'", latex, file),
+                           errors, sep = "\n"),
+                     domain = NA)
+            }
             Log <- readLines(paste0(base, ".log"))
-            nmiss <- length(grep("^LaTeX Warning:.*Citation.*undefined", Log))
+            nmiss <- length(grep("Warning:.*Citation.*undefined", Log))
             if(nmiss == nmiss_prev &&
-               !length(grep("Rerun to get", Log)) ) break
+               !any(grepl("(Rerun to get|biblatex.*\\(re\\)run)", Log)) ) break
         }
         do_cleanup(clean)
     }
@@ -444,12 +496,11 @@ function(file, pdf = FALSE, clean = FALSE, quiet = TRUE,
 
 ### ** .BioC_version_associated_with_R_version
 
-..BioC_version_associated_with_R_version <- function()
-    numeric_version(Sys.getenv("R_BIOC_VERSION", "3.0"))
 .BioC_version_associated_with_R_version <-
-    ..BioC_version_associated_with_R_version()
+    function() numeric_version(Sys.getenv("R_BIOC_VERSION", "3.5"))
 ## Things are more complicated from R-2.15.x with still two BioC
 ## releases a year, so we do need to set this manually.
+## Wierdly, 3.0 is the second version (after 2.14) for the 3.1.x series.
 
 ### ** .vc_dir_names
 
@@ -484,12 +535,18 @@ function(file, pdf = FALSE, clean = FALSE, quiet = TRUE,
 
 ### * Internal utility functions.
 
+### ** %notin%
+
+`%notin%` <-
+function(x, y)
+    is.na(match(x, y))
+
 ### ** %w/o%
 
 ## x without y, as in the examples of ?match.
 `%w/o%` <-
 function(x, y)
-    x[!x %in% y]
+    x[is.na(match(x, y))]
 
 ### ** .OStype
 
@@ -529,11 +586,44 @@ function(val) {
     if (v %in% c("1", "yes", "true")) TRUE
     else if (v %in% c("0", "no", "false")) FALSE
     else {
-        warning("cannot coerce ", sQuote(val), " to logical")
+        warning(gettextf("cannot coerce %s to logical", sQuote(val)),
+                domain = NA)
         NA
     }
 }
 
+### ** .canonicalize_doi
+
+.canonicalize_doi <-
+function(x)
+{
+    x <- sub("^((doi|DOI):)?[[:space:]]*http://(dx[.])?doi[.]org/", "",
+             x)
+    sub("^(doi|DOI):", "", x)
+}
+
+### ** .canonicalize_quotes
+
+.canonicalize_quotes <-
+function(txt)
+{
+    txt <- gsub("(\xe2\x80\x98|\xe2\x80\x99)", "'", txt,
+                perl = TRUE, useBytes = TRUE)
+    txt <- gsub("(\xe2\x80\x9c|\xe2\x80\x9d)", '"', txt,
+                perl = TRUE, useBytes = TRUE)
+    txt
+}
+
+### ** .enc2latin1
+
+.enc2latin1 <-
+function(x)
+{
+    if(length(pos <- which(Encoding(x) == "UTF-8")))
+        x[pos] <- iconv(x[pos], "UTF-8", "latin1", sub = "byte")
+    x
+}
+
 ### ** .eval_with_capture
 
 .eval_with_capture <-
@@ -574,6 +664,27 @@ function(expr, type = NULL)
          message = readLines(msgcon, encoding = "UTF-8", warn = FALSE))
 }
 
+### ** .expand_anchored_Rd_xrefs
+
+.expand_anchored_Rd_xrefs <-
+function(db)
+{
+    ## db should have columns Target and Anchor.
+    db <- db[, c("Target", "Anchor"), drop = FALSE]
+    ## See .check_Rd_xrefs().
+    anchor <- db[, 2L]
+    have_equals <- startsWith(anchor, "=")
+    if(any(have_equals))
+        db[have_equals, ] <-
+            cbind(sub("^=", "", anchor[have_equals]), "")
+    anchor <- db[, 2L]
+    have_colon <- grepl(":", anchor, fixed = TRUE)
+    y <- cbind(T_Package = anchor, T_File = db[, 1L])
+    y[have_colon, ] <-
+        cbind(sub("([^:]*):(.*)", "\\1", anchor[have_colon]),
+              sub("([^:]*):(.*)", "\\2", anchor[have_colon]))
+    y
+}
 
 ### ** .file_append_ensuring_LFs
 
@@ -582,7 +693,7 @@ function(file1, file2)
 {
     ## Use a fast version of file.append() that ensures LF between
     ## files.
-    .Call(codeFilesAppend, file1, file2)
+    .Call(C_codeFilesAppend, file1, file2)
 }
 
 ### ** .file_path_relative_to_dir
@@ -745,13 +856,20 @@ function(primitive = TRUE) # primitive means 'include primitives'
 ### ** .get_namespace_package_depends
 
 .get_namespace_package_depends <-
-function(dir)
+function(dir, selective_only = FALSE)
 {
     nsInfo <- .check_namespace(dir)
-    depends <- c(sapply(nsInfo$imports, "[[", 1L),
-                 sapply(nsInfo$importClasses, "[[", 1L),
-                 sapply(nsInfo$importMethods, "[[", 1L))
-    unique(sort(as.character(depends)))
+    getter <- if(selective_only) {
+        function(e) {
+            if(is.list(e) && length(e[[2L]])) e[[1L]] else character()
+        }
+    } else {
+        function(e) e[[1L]]
+    }
+    depends <- c(lapply(nsInfo$imports, getter),
+                 lapply(nsInfo$importClasses, getter),
+                 lapply(nsInfo$importMethods, getter))
+    unique(sort(as.character(unlist(depends, use.names = FALSE))))
 }
 
 ### ** .get_namespace_S3_methods_db
@@ -794,6 +912,20 @@ function(dir, installed = FALSE)
     stop("invalid package layout")
 }
 
+### ** .get_repositories
+
+.get_repositories <-
+function()
+{
+    rfile <- Sys.getenv("R_REPOSITORIES", unset = NA_character_)
+    if(is.na(rfile) || !file_test("-f", rfile)) {
+        rfile <- file.path(Sys.getenv("HOME"), ".R", "repositories")
+        if(!file_test("-f", rfile))
+            rfile <- file.path(R.home("etc"), "repositories")
+    }
+    .read_repositories(rfile)
+}
+
 ### ** .get_requires_from_package_db
 
 .get_requires_from_package_db <-
@@ -870,17 +1002,18 @@ function(dir, installed = TRUE, primitive = FALSE)
             env_list <- unique(env_list)
         }
     }
+    ## some BioC packages warn here
+    suppressWarnings(
     unique(c(.get_internal_S3_generics(primitive),
              unlist(lapply(env_list,
                            function(env) {
-                               nms <- objects(envir = env,
-                                              all.names = TRUE)
+                               nms <- sort(names(env))
                                if(".no_S3_generics" %in% nms)
                                    character()
                                else Filter(function(f)
                                            .is_S3_generic(f, envir = env),
                                            nms)
-                           }))))
+                           })))))
 }
 
 ### ** .get_S3_group_generics
@@ -953,16 +1086,10 @@ function()
            (repos["CRAN"] != "@CRAN@"))
             repos <- repos[nms]
         else {
-            p <- file.path(Sys.getenv("HOME"), ".R", "repositories")
-            repos <- if(file_test("-f", p)) {
-                a <- .read_repositories(p)
-                a[nms, "URL"]
-            } else {
-                a <- .read_repositories(file.path(R.home("etc"),
-                                                  "repositories"))
-                c("http://CRAN.R-project.org", a[nms[-1L], "URL"])
-            }
+            repos <- .get_repositories()[nms, "URL"]
             names(repos) <- nms
+            if(repos["CRAN"] == "@CRAN@")
+                repos["CRAN"] <- "https://CRAN.R-project.org"
         }
     }
     repos
@@ -989,7 +1116,8 @@ function()
     unique(c(.get_standard_repository_db_fields(),
              ## Extract from R-exts via
              ## .get_DESCRIPTION_fields_in_R_exts():
-             c("Author",
+             c("Additional_repositories",
+               "Author",
                "Authors at R",
                "Biarch",
                "BugReports",
@@ -1000,8 +1128,10 @@ function()
                "Built",
                "ByteCompile",
                "Classification/ACM",
+               "Classification/ACM-2012",
                "Classification/JEL",
                "Classification/MSC",
+               "Classification/MSC-2010",
                "Collate",
                "Collate.unix",
                "Collate.windows",
@@ -1027,6 +1157,7 @@ function()
                "Package",
                "Packaged",
                "Priority",
+               "RdMacros",
                "Suggests",
                "SysDataCompression",
                "SystemRequirements",
@@ -1036,8 +1167,6 @@ function()
                "Version",
                "VignetteBuilder",
                "ZipData"),
-             ## Should be documented in R-exts eventually:
-             c("Additional_repositories"),
              ## Others: adjust as needed.
              c("Repository",
                "Path",
@@ -1048,6 +1177,8 @@ function()
                "RcmdrModels",
                "RcppModules",
                "Roxygen",
+               "Acknowledgements",
+               "Acknowledgments", # USA/Canadian usage.
                "biocViews")
              ))
 }
@@ -1065,6 +1196,20 @@ function(texi = NULL)
     sort(unique(sub(re, "", lines[grepl(re, lines)])))
 }
 
+### ** .gregexec_at_pos
+
+.gregexec_at_pos <-
+function(pattern, x, m, pos)
+{
+    unlist(lapply(regmatches(x, m),
+                  function(e)
+                      do.call(rbind,
+                              regmatches(e,
+                                         regexec(pattern, e)))[, pos]
+                  ),
+           use.names = FALSE)
+}
+
 ### ** .gsub_with_transformed_matches
 
 .gsub_with_transformed_matches <-
@@ -1105,6 +1250,28 @@ function(pattern, replacement, x, trafo, count, ...)
     x
 }
 
+### imports_for_undefined_globals
+
+imports_for_undefined_globals <-
+function(txt, lst, selective = TRUE)
+{
+    if(!missing(txt))
+        lst <- scan(what = character(), text = txt, quiet = TRUE)
+    lst <- sort(unique(lst))
+    nms <- lapply(lst, utils::find)
+    ind <- lengths(nms) > 0L
+    imp <- split(lst[ind], substring(unlist(nms[ind]), 9L))
+    if(selective) {
+        sprintf("importFrom(%s)",
+                vapply(Map(c, names(imp), imp),
+                       function(e)
+                           paste0("\"", e, "\"", collapse = ", "),
+                       ""))
+    } else {
+        sprintf("import(\"%s\")", names(imp))
+    }
+}
+
 ### ** .is_ASCII
 
 .is_ASCII <-
@@ -1150,7 +1317,7 @@ function(fname, envir, mustMatch = TRUE)
     ## 'envir' is (to be considered) an S3 generic function.  Note,
     ## found *in* not found *from*, so envir does not have a default.
     ##
-    ## If it is, does it despatch methods of fname?  We need that to
+    ## If it is, does it dispatch methods of fname?  We need that to
     ## look for possible methods as functions named fname.* ....
     ##
     ## Provided by LT with the following comments:
@@ -1198,6 +1365,25 @@ function(fname, envir, mustMatch = TRUE)
     if(mustMatch) res == fname else nzchar(res)
 }
 
+### ** .load_namespace_rather_quietly
+
+.load_namespace_rather_quietly <-
+function(package)
+{
+    ## Suppress messages and warnings from loading namespace
+    ## dependencies.
+    .whandler <- function(e) {
+        calls <- sys.calls()
+        if(sum(.call_names(calls) == "loadNamespace") == 1L)
+            signalCondition(e)
+        else
+            invokeRestart("muffleWarning")
+    }
+    expr <- substitute(loadNamespace(package), list(package = package))
+    invisible(withCallingHandlers(suppressMessages(eval(expr)),
+                                  warning = .whandler))
+}
+
 ### ** .load_package_quietly
 
 .load_package_quietly <-
@@ -1215,7 +1401,7 @@ function(package, lib.loc)
     ## check interprets all output as indicating a problem.
     if(package != "base")
         .try_quietly({
-            pos <- match(paste("package", package, sep = ":"), search())
+            pos <- match(paste0("package:", package), search())
             if(!is.na(pos)) {
                 detach(pos = pos,
                        unload = ! package %in% c("tcltk", "tools"))
@@ -1250,7 +1436,8 @@ function(type = c("code", "data", "demo", "docs", "vignette"))
            demo = c("R", "r"),
            docs = c("Rd", "rd", "Rd.gz", "rd.gz"),
            vignette = c(outer(c("R", "r", "S", "s"), c("nw", "tex"),
-                              paste, sep = ""), "Rmd"))
+                              paste0),
+                        "Rmd"))
 }
 
 ### ** .make_S3_group_generic_env
@@ -1279,11 +1466,10 @@ function(parent = parent.frame(), fixup = FALSE)
 {
     ## Create an environment with pseudo-definitions for the S3 primitive
     ## generics
-    env <- new.env(hash = TRUE, parent = parent)
-    for(f in ls(base::.GenericArgsEnv))
-        assign(f, get(f, envir=base::.GenericArgsEnv), envir = env)
+    env <- list2env(as.list(base::.GenericArgsEnv, all.names=TRUE),
+                    hash=TRUE, parent=parent)
     if(fixup) {
-        ## now fixup the operators
+        ## now fixup the operators from (e1,e2) to (x,y)
         for(f in c('+', '-', '*', '/', '^', '%%', '%/%', '&', '|',
                    '==', '!=', '<', '<=', '>=', '>')) {
             fx <- get(f, envir = env)
@@ -1296,38 +1482,34 @@ function(parent = parent.frame(), fixup = FALSE)
 
 ### ** .make_S3_primitive_nongeneric_env
 
+## why not just use  base::.ArgsEnv -- is the parent really important if(is_base)?
 .make_S3_primitive_nongeneric_env <-
 function(parent = parent.frame())
 {
     ## Create an environment with pseudo-definitions
     ## for the S3 primitive non-generics
-    env <- new.env(hash = TRUE, parent = parent)
-    for(f in ls(base::.ArgsEnv))
-        assign(f, get(f, envir=base::.ArgsEnv), envir = env)
-    env
+    list2env(as.list(base::.ArgsEnv, all.names=TRUE),
+             hash=TRUE, parent=parent)
 }
 
-### ** .make_S3_methods_stop_list
+### ** nonS3methods [was .make_S3_methods_stop_list ]
 
-.make_S3_methods_stop_list <-
-function(package)
+nonS3methods <- function(package)
 {
     ## Return a character vector with the names of the functions in
     ## @code{package} which 'look' like S3 methods, but are not.
     ## Using package = NULL returns all known examples
 
     stopList <-
-        list(base = c("all.equal", "all.names", "all.vars",
+        list(base = c("all.equal", "all.names", "all.vars", "expand.grid",
              "format.char", "format.info", "format.pval",
              "max.col",
+             "pmax.int", "pmin.int",
              ## the next two only exist in *-defunct.Rd.
              "print.atomic", "print.coefmat",
              "qr.Q", "qr.R", "qr.X", "qr.coef", "qr.fitted", "qr.qty",
              "qr.qy", "qr.resid", "qr.solve",
-             ## round.POSIXt is a method for S3 and S4 group generics with
-             ## deliberately different arg names.
-             "rep.int", "round.POSIXt",
-             "seq.int", "sort.int", "sort.list"),
+             "rep.int", "sample.int", "seq.int", "sort.int", "sort.list"),
              AMORE = "sim.MLPnet",
              BSDA = "sign.test",
              ChemometricsWithR = "lda.loofun",
@@ -1339,6 +1521,7 @@ function(package)
              HyperbolicDist = "log.hist",
              MASS = c("frequency.polygon", "gamma.dispersion", "gamma.shape",
                       "hist.FD", "hist.scott"),
+             LinearizedSVR = "sigma.est",
              ## FIXME: since these are already listed with 'base',
              ##        they should not need to be repeated here:
              Matrix = c("qr.Q", "qr.R", "qr.coef", "qr.fitted",
@@ -1346,7 +1529,10 @@ function(package)
              RCurl = "merge.list",
              RNetCDF = c("close.nc", "dim.def.nc", "dim.inq.nc",
                          "dim.rename.nc", "open.nc", "print.nc"),
+             Rmpfr = c("mpfr.is.0", "mpfr.is.integer"),
              SMPracticals = "exp.gibbs",
+             TANOVA = "sigma.hat",
+             TeachingDemos = "sigma.test",
              XML = "text.SAX",
              ape = "sort.index",
              arm = "sigma.hat", # lme4 has sigma()
@@ -1359,6 +1545,8 @@ function(package)
              crossdes = "all.combn",
              ctv = "update.views",
              deSolve = "plot.1D",
+             effects = "all.effects", # already deprecated
+             elliptic = "sigma.laurent",
              equivalence = "sign.boot",
              fields = c("qr.q2ty", "qr.yq2"),
              gbm = c("pretty.gbm.tree", "quantile.rug"),
@@ -1382,12 +1570,14 @@ function(package)
              reposTools = "update.packages2",
              rgeos = "scale.poly",
              sac = "cumsum.test",
+             sfsmisc = "cumsum.test",
              sm = "print.graph",
              splusTimeDate = "sort.list",
              splusTimeSeries = "sort.list",
-             stats = c("anova.lmlist", "fitted.values", "lag.plot",
-                       "influence.measures", "t.test",
+	     stats = c("anova.lmlist", "expand.model.frame", "fitted.values",
+		       "influence.measures", "lag.plot", "t.test",
                        "plot.spec.phase", "plot.spec.coherency"),
+             stremo = "sigma.hat",
              supclust = c("sign.change", "sign.flip"),
              tensorA = "chol.tensor",
              utils = c("close.socket", "flush.console", "update.packages")
@@ -1418,22 +1608,40 @@ function(packages = NULL, FUN, ...)
     out
 }
 
-### .parse_code_file
+### ** .pandoc_md_for_CRAN
+
+.pandoc_md_for_CRAN <-
+function(ifile, ofile)
+{
+    .system_with_capture("pandoc",
+                         paste(shQuote(normalizePath(ifile)), "-s",
+                               "--email-obfuscation=references",
+                               ## "--css=https://cran.r-project.org/web/CRAN_web.css",
+                               "--self-contained",
+                               "-o", shQuote(ofile)))
+}
+
+### ** .parse_code_file
 
 .parse_code_file <-
-function(file, encoding = NA)
+function(file, encoding = NA, keep.source = getOption("keep.source"))
 {
-    if(!file.info(file)$size) return()
+    if(!file.size(file)) return()
     suppressWarnings({
         if(!is.na(encoding) &&
+           (encoding != "unknown") &&
            !(Sys.getlocale("LC_CTYPE") %in% c("C", "POSIX"))) {
             ## Previous use of con <- file(file, encoding = encoding)
-            ## was intolerant so do what .install_package_code_files()
-            ## does.
+            ## was intolerant so do something similar to what
+            ## .install_package_code_files() does.  Do not use a #line
+            ## directive though as this will confuse getParseData().
             lines <- iconv(readLines(file, warn = FALSE),
                            from = encoding, to = "", sub = "byte")
-            parse(text = lines)
-        } else parse(file)
+            parse(text = lines, srcfile = srcfile(file),
+                  keep.source = keep.source)
+        } else
+            parse(file,
+                  keep.source = keep.source)
     })
 }
 
@@ -1452,6 +1660,22 @@ function(con)
     .try_quietly(readLines(con, warn=FALSE))
 }
 
+### ** .read_additional_repositories_field
+
+.read_additional_repositories_field <-
+function(txt)
+    unique(unlist(strsplit(txt, ",[[:space:]]*")))
+
+### ** .read_citation_quietly
+
+.read_citation_quietly <-
+function(cfile, meta)
+{
+    tryCatch(suppressMessages(suppressWarnings(utils::readCitationFile(cfile,
+                                                                       meta))),
+             error = identity)
+}
+
 ### ** .read_collate_field
 
 .read_collate_field <-
@@ -1529,9 +1753,12 @@ function(x, dfile)
     }
     ## Avoid declared encodings when writing out.
     Encoding(x) <- "unknown"
-    ## Avoid folding for fields where we keep whitespace when reading.
+    ## Avoid folding for fields where we keep whitespace when reading,
+    ## plus two where legacy code does not strip whitespace and so
+    ## we should not wrap the field.
     write.dcf(rbind(x), dfile,
-              keep.white = c(.keep_white_description_fields, "Maintainer"))
+              keep.white = c(.keep_white_description_fields,
+                             "Maintainer", "BugReports"))
 }
 
 ### ** .read_repositories
@@ -1547,15 +1774,16 @@ function(file)
     db
 }
 
+### default changed to https: for R 3.3.0
 .expand_BioC_repository_URLs <-
 function(x)
 {
     x <- sub("%bm",
              as.character(getOption("BioC_mirror",
-                                    "http://www.bioconductor.org")),
+                                    "https://bioconductor.org")),
              x, fixed = TRUE)
     sub("%v",
-        as.character(..BioC_version_associated_with_R_version()),
+        as.character(.BioC_version_associated_with_R_version()),
         x, fixed = TRUE)
 }
 
@@ -1566,15 +1794,17 @@ function(x)
     y <- character()
     if(!is.na(aar <- x["Authors at R"])) {
         aar <- utils:::.read_authors_at_R_field(aar)
+        lat <- identical(enc, "latin1")
         if(is.na(x["Author"])) {
             tmp <- utils:::.format_authors_at_R_field_for_author(aar)
-            ## uses strwrap, so will be in current locale
-            if(!is.na(enc)) tmp <- iconv(tmp, "", enc)
+            if(lat) tmp <- .enc2latin1(tmp)
             y["Author"] <- tmp
         }
-        if(is.na(x["Maintainer"]))
-            y["Maintainer"] <-
-                utils:::.format_authors_at_R_field_for_maintainer(aar)
+        if(is.na(x["Maintainer"])) {
+            tmp <- utils:::.format_authors_at_R_field_for_maintainer(aar)
+            if(lat) tmp <- .enc2latin1(tmp)
+            y["Maintainer"] <- tmp
+        }
     }
     y
 }
@@ -1607,18 +1837,25 @@ function(file, envir, enc = NA)
     ## as @code{sys.source(file, envir, keep.source = FALSE)}.
     oop <- options(keep.source = FALSE)
     on.exit(options(oop))
-    assignmentSymbolLM <- as.symbol("<-")
-    assignmentSymbolEq <- as.symbol("=")
-    if(!is.na(enc) &&
-       !(Sys.getlocale("LC_CTYPE") %in% c("C", "POSIX"))) {
-        con <- file(file, encoding = enc)
-        on.exit(close(con))
-    } else con <- file
+
+### <FIXME> for S4, setClass() .. are assignments, but must be called
+    ##         with correct 'where = envir'!
+    ## Possible solution: modified versions of these functions with changed
+    ##                    'where = ...' (default arg) in formals(.)
+    ## stopifnot(require(methods, quietly=TRUE))
+    ## assignmentSymbols <- c(c("<-", "="),
+    ##                        ls(pattern = "^set[A-Z]", pos = "package:methods"))
+    assignmentSymbols <- c("<-", "=")
+### </FIXME>
+    con <-
+	if(!is.na(enc) && !(Sys.getlocale("LC_CTYPE") %in% c("C", "POSIX"))) {
+	    on.exit(close(con), add = TRUE)
+	    file(file, encoding = enc)
+	} else file
     exprs <- parse(n = -1L, file = con)
-    if(!length(exprs))
-        return(invisible())
+    exprs <- exprs[lengths(exprs) > 0L]
     for(e in exprs) {
-        if(e[[1L]] == assignmentSymbolLM || e[[1L]] == assignmentSymbolEq)
+	if(is.call(e) && as.character(e[[1L]]) %in% assignmentSymbols)
             eval(e, envir)
     }
     invisible()
@@ -1637,7 +1874,7 @@ function(dir, envir, meta = character())
         stop("unable to create ", con)
     ## If the (DESCRIPTION) metadata contain a Collate specification,
     ## use this for determining the code files and their order.
-    txt <- meta[c(paste("Collate", .OStype(), sep = "."), "Collate")]
+    txt <- meta[c(paste0("Collate.", .OStype()), "Collate")]
     ind <- which(!is.na(txt))
     files <- if(any(ind))
         Filter(function(x) file_test("-f", x),
@@ -1647,11 +1884,9 @@ function(dir, envir, meta = character())
     if(!all(.file_append_ensuring_LFs(con, files)))
         stop("unable to write code files")
     tryCatch(.source_assignments(con, envir, enc = meta["Encoding"]),
-             error =
-             function(e)
-             stop("cannot source package code\n",
-                  conditionMessage(e),
-                  call. = FALSE))
+             error = function(e)
+                 stop("cannot source package code:\n", conditionMessage(e),
+                      call. = FALSE))
 }
 
 ### * .split_dependencies
@@ -1684,11 +1919,15 @@ function(x)
     if(x2 != x1) {
         pat <- "[[:space:]]*([[<>=!]+)[[:space:]]+(.*)"
         version <- sub(pat, "\\2", x2)
-        if (!grepl("^r", version)) version <- package_version(version)
+        if (!startsWith(version, "r")) version <- package_version(version)
         list(name = x1, op = sub(pat, "\\1", x2), version = version)
     } else list(name = x1)
 }
 
+## <FIXME>
+## We now have base::trimws(), so this is no longer needed.
+## Remove eventually.
+
 ### ** .strip_whitespace
 
 ## <NOTE>
@@ -1708,6 +1947,8 @@ function(x)
     x
 }
 
+## </FIXME>
+
 ### ** .system_with_capture
 
 .system_with_capture <-
@@ -1770,11 +2011,11 @@ function(expr)
 ### ** .unpacked_source_repository_apply
 
 .unpacked_source_repository_apply <-
-function(dir, fun, ..., verbose = FALSE)
+function(dir, fun, ..., pattern = "*", verbose = FALSE)
 {
     dir <- file_path_as_absolute(dir)
 
-    dfiles <- Sys.glob(file.path(dir, "*", "DESCRIPTION"))
+    dfiles <- Sys.glob(file.path(dir, pattern, "DESCRIPTION"))
 
     results <-
         lapply(dirname(dfiles),
@@ -1806,19 +2047,120 @@ function(args, msg)
               msg)
 }
 
+### * Miscellania
+
+### ** Rcmd
+
+Rcmd <- function(args, ...)
+{
+    if(.Platform$OS.type == "windows")
+        system2(file.path(R.home("bin"), "Rcmd.exe"), args, ...)
+    else
+        system2(file.path(R.home("bin"), "R"), c("CMD", args), ...)
+}
 
 ### ** pskill
 
 pskill <- function(pid, signal = SIGTERM)
-    invisible(.Call(ps_kill, pid, signal))
+    invisible(.Call(C_ps_kill, pid, signal))
 
 ### ** psnice
 
 psnice <- function(pid = Sys.getpid(), value = NA_integer_)
 {
-    res <- .Call(ps_priority, pid, value)
+    res <- .Call(C_ps_priority, pid, value)
     if(is.na(value)) res else invisible(res)
 }
+
+### ** toTitleCase
+
+## original version based on http://daringfireball.net/2008/05/title_case
+## but much altered before release.
+toTitleCase <- function(text)
+{
+    ## leave these alone: the internal caps rule would do that
+    ## in some cases.  We could insist on this exact capitalization.
+    alone <- c("2D", "3D", "AIC", "BayesX", "GoF", "HTML", "LaTeX",
+               "MonetDB", "OpenBUGS", "TeX", "U.S.", "U.S.A.", "WinBUGS",
+               "aka", "et", "al.", "ggplot2", "i.e.", "jar", "jars",
+               "ncdf", "netCDF", "rgl", "rpart", "xls", "xlsx")
+    ## These should be lower case except at the beginning (and after :)
+    lpat <- "^(a|an|and|are|as|at|be|but|by|en|for|if|in|is|nor|not|of|on|or|per|so|the|to|v[.]?|via|vs[.]?|from|into|than|that|with)$"
+    ## These we don't care about
+    either <- c("all", "above", "after", "along", "also", "among",
+                "any", "both", "can", "few", "it", "less", "log",
+                "many", "may", "more", "over", "some", "their",
+                "then", "this", "under", "until", "using", "von",
+                "when", "where", "which", "will", "without",
+                "yet", "you", "your")
+    titleCase1 <- function(x) {
+        ## A quote might be prepended.
+        do1 <- function(x) {
+            x1 <- substring(x, 1L, 1L)
+            if(nchar(x) >= 3L && x1 %in% c("'", '"'))
+                paste0(x1, toupper(substring(x, 2L, 2L)),
+                       tolower(substring(x, 3L)))
+            else paste0(toupper(x1), tolower(substring(x, 2L)))
+        }
+        xx <- .Call(C_splitString, x, ' -/"()\n')
+        ## for 'alone' we could insist on that exact capitalization
+        alone <- xx %in% c(alone, either)
+        alone <- alone | grepl("^'.*'$", xx)
+        havecaps <- grepl("^[[:alpha:]].*[[:upper:]]+", xx)
+        l <- grepl(lpat, xx, ignore.case = TRUE)
+        l[1L] <- FALSE
+        ## do not remove capitalization immediately after ": " or "- "
+        ind <- grep("[-:]$", xx); ind <- ind[ind + 2L <= length(l)]
+        ind <- ind[(xx[ind + 1L] == " ") & grepl("^['[:alnum:]]", xx[ind + 2L])]
+        l[ind + 2L] <- FALSE
+        ## Also after " (e.g. "A Book Title")
+        ind <- which(xx == '"'); ind <- ind[ind + 1L <= length(l)]
+        l[ind + 1L] <- FALSE
+        xx[l] <- tolower(xx[l])
+        keep <- havecaps | l | (nchar(xx) == 1L) | alone
+        xx[!keep] <- sapply(xx[!keep], do1)
+        paste(xx, collapse = "")
+    }
+    if(typeof(text) != "character")
+        stop("'text' must be a character vector")
+    sapply(text, titleCase1, USE.NAMES = FALSE)
+}
+
+### ** path_and_libPath
+
+##' Typically the union of R_LIBS and current .libPaths(); may differ e.g. via R_PROFILE
+path_and_libPath <- function(...)
+{
+    lP <- .libPaths()
+    ## don't call normalizePath on paths which do not exist: allowed in R_LIBS!
+    ep0 <- c(strsplit(env_path(...), .Platform$path.sep, fixed = TRUE)[[1L]], lP[-length(lP)])
+    ep0 <- ep0[dir.exists(ep0)]
+    paste(unique(normalizePath(ep0)), collapse = .Platform$path.sep)
+}
+
+### ** str_parse_logic
+
+##' @param otherwise: can be call, such as quote(errmesg(...))
+str_parse_logic <- function(ch, default = TRUE, otherwise = default) {
+    if (is.na(ch)) default
+    else switch(ch,
+                "yes"=, "Yes" =, "true" =, "True" =, "TRUE" = TRUE,
+                "no" =, "No" =, "false" =, "False" =, "FALSE" = FALSE,
+                eval(otherwise))
+}
+
+### ** str_parse
+
+str_parse <- function(ch, default = TRUE, logical = TRUE, otherwise = default) {
+    if(logical)
+        str_parse_logic(ch, default=default, otherwise=otherwise)
+    else if(is.na(ch))
+        default
+    else
+        ch
+}
+
+
 ### Local variables: ***
 ### mode: outline-minor ***
 ### outline-regexp: "### [*]+" ***
diff --git a/src/library/tools/R/xgettext.R b/src/library/tools/R/xgettext.R
index da19036..818b019 100644
--- a/src/library/tools/R/xgettext.R
+++ b/src/library/tools/R/xgettext.R
@@ -1,7 +1,7 @@
 #  File src/library/tools/R/xgettext.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
-#  Copyright (C) 1995-2013 The R Core Team
+#  Copyright (C) 1995-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
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 xgettext <-
 function(dir, verbose = FALSE, asCall = TRUE)
@@ -26,7 +26,7 @@ function(dir, verbose = FALSE, asCall = TRUE)
     R_files <- list_files_with_exts(dir, exts)
     for(d in c("unix", "windows")) {
         OSdir <- file.path(dir, d)
-        if(file_test("-d", OSdir))
+        if(dir.exists(OSdir))
             R_files <- c(R_files, list_files_with_exts(OSdir, exts))
     }
     if(bn == "base") {
@@ -90,7 +90,7 @@ function(dir, verbose = FALSE, asCall = TRUE)
         out[[f]] <- structure(unique(strings), class="xgettext")
     }
 
-    out[sapply(out, length) > 0L]
+    out[lengths(out) > 0L]
 }
 
 print.xgettext <-
@@ -119,7 +119,7 @@ function(dir, verbose = FALSE)
     R_files <- list_files_with_exts(dir, exts)
     for(d in c("unix", "windows", "aqua")) {
         OSdir <- file.path(dir, d)
-        if(file_test("-d", OSdir))
+        if(dir.exists(OSdir))
             R_files <- c(R_files, list_files_with_exts(OSdir, exts))
     }
     out <- vector("list", length = length(R_files))
@@ -146,7 +146,7 @@ function(dir, verbose = FALSE)
         out[[f]] <- structure(strings, class="xngettext")
     }
 
-    out[sapply(out, length) > 0L]
+    out[lengths(out) > 0L]
 }
 
 xgettext2pot <-
@@ -212,17 +212,17 @@ checkPoFile <- function(f, strictPlural = FALSE)
     while (i < length(lines)) {
 	i <- i + 1L
 
-	if (grepl("^#,", lines[i], useBytes = TRUE)) {
+	if (startsWith(lines[i], "#,")) { # useBytes=TRUE (speedup ?)
 	    noCformat <- noCformat || grepl("no-c-format", lines[i], useBytes = TRUE)
 	    fuzzy <- fuzzy || grepl("fuzzy", lines[i], useBytes = TRUE)
-	} else if (grepl("^#:", lines[i], useBytes = TRUE)) {
+	} else if (startsWith(lines[i], "#:")) {
 	    if (!is.na(ref))
 		ref <- paste(ref, "etc.")
 	    else
 		ref <- sub("^#:[[:blank:]]*", "", lines[i])
-	} else if (grepl("^msgid ", lines[i], useBytes = TRUE)) {
+	} else if (startsWith(lines[i], "msgid ")) {
 	    s1 <- sub('^msgid[[:blank:]]+["](.*)["][[:blank:]]*$', "\\1", lines[i])
-	    while (grepl('^["]', lines[i+1L], useBytes = TRUE)) {
+	    while (startsWith(lines[i+1L], '"')) {
 		i <- i + 1L
 		s1 <- paste0(s1, sub('^["](.*)["][[:blank:]]*$', "\\1", lines[i]))
 	    }
@@ -246,7 +246,7 @@ checkPoFile <- function(f, strictPlural = FALSE)
 
 		s2 <- sub( paste0("^", statement, "[[:blank:]]+[\"](.*)[\"][[:blank:]]*$"),
 		                 "\\1", lines[j])
-		while (grepl('^["]', lines[j+1L], useBytes = TRUE)) {
+		while (!is.na(lines[j+1L]) && startsWith(lines[j+1L], '"')) {
 		    j <- j+1L
 		    s2 <- paste0(s2, sub('^["](.*)["][[:blank:]]*$', "\\1", lines[j]))
 		}
@@ -267,7 +267,7 @@ checkPoFile <- function(f, strictPlural = FALSE)
 		    }
 		}
 
-		if (s2 != "" &&
+		if (nzchar(s2) &&
 		     !(identical(f1, f2) || identical(f1_plural, f2))) {
 		    location <- paste0(f, ":", j)
 		    if (inherits(f2, "error"))
@@ -283,7 +283,7 @@ checkPoFile <- function(f, strictPlural = FALSE)
 			    diff <- ""
 			diffs <- which(f1 != f2)
 			if (length(diffs)) {
-			    if (diff != "")
+			    if (nzchar(diff))
 			    	diff <- paste0(diff, ", ")
 			    if (length(diffs) > 1)
 				diff <- paste(paste0(diff, "differences in entries"),
@@ -320,7 +320,7 @@ checkPoFiles <- function(language, dir=".")
                         full.names = TRUE, recursive = TRUE)
     result <- matrix(character(), ncol = 5L, nrow = 0L)
     for (f in files) {
-	errs <- checkPoFile(f, strictPlural = grepl("^R-", basename(f)))
+	errs <- checkPoFile(f, strictPlural = startsWith(basename(f), "R-"))
 	if (nrow(errs)) result <- rbind(result, errs)
     }
     structure(result, class = "check_po_files")
diff --git a/src/library/tools/R/zzz.R b/src/library/tools/R/zzz.R
index 58687a2..a36d656 100644
--- a/src/library/tools/R/zzz.R
+++ b/src/library/tools/R/zzz.R
@@ -1,5 +1,5 @@
 #  File src/library/tools/R/zzz.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
 #  Copyright (C) 1995-2013 The R Core Team
 #
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 .noGenerics <- TRUE
 
diff --git a/src/library/tools/man/CRANtools.Rd b/src/library/tools/man/CRANtools.Rd
new file mode 100644
index 0000000..637f815
--- /dev/null
+++ b/src/library/tools/man/CRANtools.Rd
@@ -0,0 +1,131 @@
+% File src/library/tools/man/CRANtools.Rd
+% Part of the R package, https://www.R-project.org
+% Copyright 2016-2017 R Core Team
+% Distributed under GPL 2 or later
+
+\name{CRANtools}
+\title{CRAN Package Repository Tools}
+\alias{CRAN_package_db}
+\alias{CRAN_check_results}
+\alias{CRAN_check_details}
+\alias{CRAN_memtest_notes}
+\alias{summarize_CRAN_check_status}
+\description{
+  Tools for obtaining information about current packages in the
+  \acronym{CRAN} package repository, and their check status.
+}
+\usage{
+CRAN_package_db()
+
+CRAN_check_results(flavors = NULL)
+CRAN_check_details(flavors = NULL)
+CRAN_memtest_notes()
+summarize_CRAN_check_status(packages,
+                            results = NULL,
+                            details = NULL,
+                            mtnotes = NULL)
+}
+\arguments{
+  \item{packages}{a character vector of package names.}
+  \item{flavors}{a character vector of \acronym{CRAN} check flavor names, or
+    \code{NULL} (default), corresponding to all available flavors.}
+  \item{results}{the return value of \code{CRAN_check_results()}
+    (default), or a subset of this.}
+  \item{details}{the return value of \code{CRAN_check_details()}
+    (default), or a subset of this.}
+  \item{mtnotes}{the return value of \code{CRAN_check_mtnotes()}
+    (default), or a subset of this.}
+}
+\details{
+  \code{CRAN_package_db()} returns a character data frame with most
+  \file{DESCRIPTION} metadata for the current packages in the CRAN
+  package repository, including in particular the Description and
+  Maintainer information not provided by
+  \code{utils::\link{available.packages}()}.
+
+  \code{CRAN_check_results()} returns a data frame with the basic
+  \acronym{CRAN} package check results including timings, with columns
+  \code{Package}, \code{Flavor} and \code{Status} giving the package
+  name, check flavor, and overall check status, respectively.
+
+  \code{CRAN_check_details()} returns a data frame inheriting from class
+  \code{"check_details"} (which has useful \code{print} and
+  \code{format} methods) with details on the check results, providing
+  check name, status and output for every non-OK check (\emph{via}
+  columns \code{Check}, \code{Status} and \code{Output}, respectively).
+  Packages with all-OK checks are indicated via a \code{*} \code{Check}
+  wildcard name and OK \code{Status}.
+
+  \code{CRAN_memtest_notes()} returns pointers to issues identified in
+  the additional memory-access check results made available from
+  \url{https://www.stats.ox.ac.uk/pub/bdr/memtests/}, as a list which
+  for every package with such issues provides a character matrix with
+  columns \code{Test} and \code{Path}.
+}
+
+\value{
+  See \sQuote{Details}.  Note that the results are collated on
+  \acronym{CRAN}: currently this is done in a locale which sorts
+  \code{aAbB} \dots.
+}
+
+\section{Which CRAN?}{
+  The main functions access a \acronym{CRAN} mirror specified by the
+  environment variable \env{R_CRAN_WEB}, defaulting to one specified in
+  the \file{repositories} file (see \code{\link{setRepositories}}): if
+  that specifies \code{@CRAN@} (the default) then
+  \url{https://CRAN.R-project.org} is used.  (Note that
+  \code{\link{options}("repos")} is not consulted.)
+
+  Note that these access parts of \acronym{CRAN} under
+  \file{web/contrib} and \file{web/packages} so if you have specified a
+  mirror of just \file{src/contrib} for installing packages you will
+  need to set \env{R_CRAN_WEB} to point to a full mirror.
+}
+
+%% Tested in tests/CRANtools.R
+\examples{\donttest{
+## This can be rather slow, especially with a non-local CRAN mirror
+## and would fail (slowly) without Internet access in that case.
+
+set.seed(11)  # but the packages chosen will change as soon as CRAN does.
+pdb <- CRAN_package_db()
+dim(pdb)
+## DESCRIPTION fields included:
+colnames(pdb)
+## Summarize publication dates:
+summary(as.Date(pdb$Published))
+## Summarize numbers of packages according to maintainer:
+summary(lengths(split(pdb$Package, pdb$Maintainer)))
+## Packages with 'LASSO' in their Description:
+pdb$Package[grepl("LASSO", pdb$Description)]
+
+results <- CRAN_check_results()
+## Available variables:
+names(results)
+## Tabulate overall check status according to flavor:
+with(results, table(Flavor, Status))
+
+details <- CRAN_check_details()
+## Available variables:
+names(details)
+## Tabulate checks according to their status:
+tab <- with(details, table(Check, Status))
+## Inspect some installation problems:
+bad <- subset(details,
+              ((Check == "whether package can be installed") &
+               (Status != "OK")))
+## Show a random sample of up to 6
+head(bad[sample(seq_len(NROW(bad)), NROW(bad)), ])
+
+mtnotes <- CRAN_memtest_notes()
+head(mtnotes)
+## Show counts of issues according to test:
+table(do.call(rbind, mtnotes)[, "Test"])
+
+## Summarize CRAN check status for 10 randomly-selected packages
+## (reusing the information already read in):
+pos <- sample(seq_len(NROW(pdb)), 10L)
+summarize_CRAN_check_status(pdb[pos, "Package"],
+                            results, details, mtnotes)
+}}
\ No newline at end of file
diff --git a/src/library/tools/man/HTMLheader.Rd b/src/library/tools/man/HTMLheader.Rd
index 8d414b5..fdd15f1 100644
--- a/src/library/tools/man/HTMLheader.Rd
+++ b/src/library/tools/man/HTMLheader.Rd
@@ -1,6 +1,6 @@
 % File src/library/tools/man/HTMLheader.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 2009-11 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 2009-2014 R Core Team
 % Distributed under GPL 2 or later
 
 \name{HTMLheader}
diff --git a/src/library/tools/man/HTMLlinks.Rd b/src/library/tools/man/HTMLlinks.Rd
index 8593373..6a01e09 100644
--- a/src/library/tools/man/HTMLlinks.Rd
+++ b/src/library/tools/man/HTMLlinks.Rd
@@ -1,5 +1,5 @@
 % File src/library/tools/man/HTMLlinks.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 2009 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/tools/man/QC.Rd b/src/library/tools/man/QC.Rd
index caa1197..4585035 100644
--- a/src/library/tools/man/QC.Rd
+++ b/src/library/tools/man/QC.Rd
@@ -1,27 +1,33 @@
 % File src/library/tools/man/QC.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2007 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2015 R Core Team
 % Distributed under GPL 2 or later
 
 \name{QC}
+\title{QC Checks for R Code and/or Documentation}
 \alias{QC}
 \alias{checkDocFiles}
 \alias{checkDocStyle}
 \alias{checkReplaceFuns}
 \alias{checkS3methods}
+\alias{nonS3methods}
+\alias{langElts}
 \alias{print.checkDocFiles}
 \alias{print.checkDocStyle}
 \alias{print.checkReplaceFuns}
 \alias{print.checkS3methods}
-\title{QC Checks for R Code and/or Documentation}
 \description{
-  Functions for performing various quality checks.
+  Functions for performing various quality control (QC) checks on R code
+  and documentation, notably on R packages.
 }
 \usage{
 checkDocFiles(package, dir, lib.loc = NULL)
 checkDocStyle(package, dir, lib.loc = NULL)
 checkReplaceFuns(package, dir, lib.loc = NULL)
 checkS3methods(package, dir, lib.loc = NULL)
+
+langElts
+nonS3methods(package)
 }
 \arguments{
   \item{package}{a character string naming an installed package.}
@@ -75,7 +81,17 @@ checkS3methods(package, dir, lib.loc = NULL)
   installed package is tested, also in the loaded namespaces/packages
   listed in the package's \file{DESCRIPTION} Depends field.
 
-  If using an installed package, the checks needing access to all R
+  \code{nonS3methods(package)} returns a \code{\link{character}} vector with
+  the names of the functions in \code{package} which \sQuote{look} like
+  S3 methods, but are not.  Using \code{package = NULL} returns all
+  known examples.
+
+  \code{langElts} is a character vector of names of \dQuote{language
+    elements} of \R.  These are implemented as \dQuote{very primitive}
+  functions (no argument list; \code{\link{print}()}ing as
+  \code{.Primitive("<name>")}).
+
+  If using an installed package, the checks needing access to all \R
   objects of the package will load the package (unless it is the
   \pkg{base} package), after possibly detaching an already loaded
   version of the package.
diff --git a/src/library/tools/man/Rcmd.Rd b/src/library/tools/man/Rcmd.Rd
new file mode 100644
index 0000000..40260e9
--- /dev/null
+++ b/src/library/tools/man/Rcmd.Rd
@@ -0,0 +1,27 @@
+% File src/library/tools/man/Rcmd.Rd
+% Part of the R package, https://www.R-project.org
+% Copyright 2016 R Core Team
+% Distributed under GPL 2 or later
+
+\name{Rcmd}
+\alias{Rcmd}
+\title{R CMD Interface}
+\description{
+  Invoke \command{R CMD} tools from within \R.
+}
+\usage{
+Rcmd(args, ...)
+}
+\arguments{
+  \item{args}{a character vector of arguments to \command{R CMD}.}
+  \item{\dots}{arguments to be passed to \code{\link{system2}}.}
+}
+\value{
+  See section \dQuote{Value} in \code{\link{system2}}.
+}
+\details{
+  Provides a portable convenience interface to the \command{R CMD}
+  mechanism by invoking the corresponding system commands (using the
+  version of \R currently used) via \code{\link{system2}}.
+}
+\keyword{utilities}
diff --git a/src/library/tools/man/Rd2HTML.Rd b/src/library/tools/man/Rd2HTML.Rd
index 0acd0a9..21e185c 100644
--- a/src/library/tools/man/Rd2HTML.Rd
+++ b/src/library/tools/man/Rd2HTML.Rd
@@ -1,6 +1,6 @@
 % File src/library/tools/man/Rd2HTML.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 2008-2013 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 2008-2016 R Core Team
 % Distributed under GPL 2 or later
 
 \name{Rd2HTML}
@@ -30,8 +30,8 @@ Rd2latex(Rd, out = "", defines = .Platform$OS.type,
          fragment = FALSE, ..., writeEncoding = TRUE)
 
 Rd2ex(Rd, out = "", defines = .Platform$OS.type,
-      stages = "render", outputEncoding = "UTF-8", 
-      commentDontrun = TRUE, ...)
+      stages = "render", outputEncoding = "UTF-8",
+      commentDontrun = TRUE, commentDonttest = FALSE, ...)
 }
 \arguments{
   \item{Rd}{ a filename or \code{Rd} object to use as input. }
@@ -60,6 +60,7 @@ Rd2ex(Rd, out = "", defines = .Platform$OS.type,
       the file for non-ASCII encodings?}
   \item{commentDontrun}{should \verb{\dontrun} sections be commented
       out?}
+  \item{commentDonttest}{should \verb{\donttest} sections be commented out?}
 }
 \details{
   These functions convert help documents: \code{Rd2HTML} produces HTML,
@@ -93,7 +94,7 @@ Rd2ex(Rd, out = "", defines = .Platform$OS.type,
 #endif
 #ifdef windows
   the current locale uses a single-byte encoding (except C).
-  (Directional quotes are not attempted in CJK locales as they are
+  (Directional quotes are not attempted in East Asian locales as they are
   usually double-width, which looks wrong with English text.)
 #endif
 
@@ -154,7 +155,7 @@ Rd2ex(Rd, out = "", defines = .Platform$OS.type,
 \author{
   Duncan Murdoch, Brian Ripley
 }
-\references{ \url{http://developer.r-project.org/parseRd.pdf} }
+\references{ \url{https://developer.r-project.org/parseRd.pdf} }
 \seealso{
   \code{\link{parse_Rd}}, \code{\link{checkRd}},
   \code{\link{findHTMLlinks}}, \code{\link{Rd2txt_options}}.
diff --git a/src/library/tools/man/Rd2txt_options.Rd b/src/library/tools/man/Rd2txt_options.Rd
index 602402b..c2a8f54 100644
--- a/src/library/tools/man/Rd2txt_options.Rd
+++ b/src/library/tools/man/Rd2txt_options.Rd
@@ -1,5 +1,5 @@
 % File src/library/tools/man/Rd2txt_options.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 2010 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/tools/man/RdTextFilter.Rd b/src/library/tools/man/RdTextFilter.Rd
index 87c5693..a738e7d 100644
--- a/src/library/tools/man/RdTextFilter.Rd
+++ b/src/library/tools/man/RdTextFilter.Rd
@@ -1,6 +1,6 @@
 % File src/library/tools/man/RdTextFilter.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 2009-11 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 2009-2014 R Core Team
 % Distributed under GPL 2 or later
 
 \name{RdTextFilter}
@@ -14,7 +14,8 @@ for spell checking or other uses.
 }
 \usage{
 RdTextFilter(ifile, encoding = "unknown", keepSpacing = TRUE,
-             drop = character(), keep = character())
+             drop = character(), keep = character(),
+             macros = file.path(R.home("share"), "Rd", "macros", "system.Rd"))
 }
 \arguments{
 \item{ifile}{
@@ -32,7 +33,10 @@ RdTextFilter(ifile, encoding = "unknown", keepSpacing = TRUE,
   Additional sections of the Rd to drop.
 }
   \item{keep}{
-Sections of the Rd file to keep.
+  Sections of the Rd file to keep.
+}
+  \item{macros}{
+  Macro definitions to assume when parsing.  See \code{\link{parse_Rd}}.
 }
 }
 \details{
diff --git a/src/library/tools/man/Rdiff.Rd b/src/library/tools/man/Rdiff.Rd
index e5e3579..ffb3fff 100644
--- a/src/library/tools/man/Rdiff.Rd
+++ b/src/library/tools/man/Rdiff.Rd
@@ -1,6 +1,6 @@
 % File src/library/tools/man/Rdiff.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 2010-2013 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 2010-2014 R Core Team
 % Distributed under GPL 2 or later
 
 \name{Rdiff}
diff --git a/src/library/tools/man/Rdindex.Rd b/src/library/tools/man/Rdindex.Rd
index 2b2dc7c..2cdbfcf 100644
--- a/src/library/tools/man/Rdindex.Rd
+++ b/src/library/tools/man/Rdindex.Rd
@@ -1,5 +1,5 @@
 % File src/library/tools/man/Rdindex.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2007 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/tools/man/Rdutils.Rd b/src/library/tools/man/Rdutils.Rd
index f26bf78..f675745 100644
--- a/src/library/tools/man/Rdutils.Rd
+++ b/src/library/tools/man/Rdutils.Rd
@@ -1,5 +1,5 @@
 % File src/library/tools/man/Rdutils.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2009 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/tools/man/SweaveTeXFilter.Rd b/src/library/tools/man/SweaveTeXFilter.Rd
index 3139647..cc129ee 100644
--- a/src/library/tools/man/SweaveTeXFilter.Rd
+++ b/src/library/tools/man/SweaveTeXFilter.Rd
@@ -1,5 +1,5 @@
 % File src/library/tools/man/SweaveTexFilter.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 2009-2013 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/tools/man/add_datalist.Rd b/src/library/tools/man/add_datalist.Rd
index 56592bd..edad1bc 100644
--- a/src/library/tools/man/add_datalist.Rd
+++ b/src/library/tools/man/add_datalist.Rd
@@ -1,5 +1,5 @@
 % File src/library/tools/man/add_datalist.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 2011 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/tools/man/bibstyle.Rd b/src/library/tools/man/bibstyle.Rd
index e0cbdae..9140e42 100644
--- a/src/library/tools/man/bibstyle.Rd
+++ b/src/library/tools/man/bibstyle.Rd
@@ -1,5 +1,5 @@
 % File src/library/tools/man/bibstyle.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 2010-2013 R Core Team
 % Distributed under GPL 2 or later
 
@@ -101,7 +101,7 @@ getBibstyle(all = FALSE)
   \code{\link{bibentry}}
 }
 \examples{
-\testonly{options(useFancyQuotes = FALSE)}
+\dontshow{options(useFancyQuotes = FALSE)}
 refs <-
 c(bibentry(bibtype = "manual",
     title = "R: A Language and Environment for Statistical Computing",
@@ -109,7 +109,7 @@ c(bibentry(bibtype = "manual",
     organization = "R Foundation for Statistical Computing",
     address = "Vienna, Austria",
     year = 2013,
-    url = "http://www.R-project.org"),
+    url = "https://www.R-project.org"),
   bibentry(bibtype = "article",
     author = c(person(c("George", "E.", "P."), "Box"),
                person(c("David",  "R."),      "Cox")),
diff --git a/src/library/tools/man/buildVignette.Rd b/src/library/tools/man/buildVignette.Rd
index ae530fa..c0aee52 100644
--- a/src/library/tools/man/buildVignette.Rd
+++ b/src/library/tools/man/buildVignette.Rd
@@ -1,3 +1,8 @@
+% File src/library/tools/man/buildVignette.Rd
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2014 R Core Team
+% Distributed under GPL 2 or later
+
 \name{buildVignette}
 \alias{buildVignette}
 \title{Build one vignette}
@@ -11,7 +16,7 @@
 \usage{
 buildVignette(file, dir = ".", weave = TRUE, latex = TRUE, tangle = TRUE, 
               quiet = TRUE, clean = TRUE, keep = character(),
-              engine = NULL, buildPkg = NULL, ...)
+              engine = NULL, buildPkg = NULL, encoding, ...)
 }
 \arguments{
   \item{file}{character; the vignette source file}
@@ -28,7 +33,9 @@ buildVignette(file, dir = ".", weave = TRUE, latex = TRUE, tangle = TRUE,
   \item{engine}{\code{NULL} or character; name of vignette engine to
     use.  Overrides any \code{\\VignetteEngine\{\}} markup in the vignette.}
   \item{buildPkg}{\code{NULL} or character; an optional package in which to find
-    the vignette engine}
+    the vignette engine.}
+  \item{encoding}{the encoding to assume for the file.  If not specified, it will
+    be inferred from the file contents.}
   \item{...}{Additional arguments passed to weave and tangle.}
 
 }
diff --git a/src/library/tools/man/buildVignettes.Rd b/src/library/tools/man/buildVignettes.Rd
index 1a3a0fb..6b85bd6 100644
--- a/src/library/tools/man/buildVignettes.Rd
+++ b/src/library/tools/man/buildVignettes.Rd
@@ -1,5 +1,5 @@
 % File src/library/tools/man/buildVignettes.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2014 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/tools/man/charsets.Rd b/src/library/tools/man/charsets.Rd
index 0ccbae2..b0a31be 100644
--- a/src/library/tools/man/charsets.Rd
+++ b/src/library/tools/man/charsets.Rd
@@ -1,6 +1,6 @@
 % File src/library/tools/man/charsets.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2013 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2014 R Core Team
 % Distributed under GPL 2 or later
 
 \name{charsets}
@@ -35,7 +35,7 @@ Adobe_glyphs
   \file{\var{\link{R_HOME}}/share/encodings/Adobe_glyphlist}.
 }
 \source{
-  \url{http://partners.adobe.com/public/developer/en/opentype/glyphlist.txt}
+  \url{https://partners.adobe.com/public/developer/en/opentype/glyphlist.txt}
 }
 \examples{
 ## find Adobe names for ISOLatin2 chars.
diff --git a/src/library/tools/man/checkFF.Rd b/src/library/tools/man/checkFF.Rd
index ff2d298..b275d1e 100644
--- a/src/library/tools/man/checkFF.Rd
+++ b/src/library/tools/man/checkFF.Rd
@@ -1,5 +1,5 @@
 % File src/library/tools/man/checkFF.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2014 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/tools/man/checkMD5sums.Rd b/src/library/tools/man/checkMD5sums.Rd
index ba534d8..a50e1b9 100644
--- a/src/library/tools/man/checkMD5sums.Rd
+++ b/src/library/tools/man/checkMD5sums.Rd
@@ -1,6 +1,6 @@
 % File src/library/tools/man/checkMD5sums.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2007 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2015 R Core Team
 % Distributed under GPL 2 or later
 
 \name{checkMD5sums}
@@ -21,7 +21,7 @@ checkMD5sums(package, dir)
   The file \file{MD5} which is created is in a format which can be
   checked by \command{md5sum -c MD5} if a suitable command-line version
   of \command{md5sum} is available.  (For Windows, one is supplied in
-  the bundle at \url{http://www.murdoch-sutherland.com/Rtools}.)
+  the bundle at \url{https://cran.r-project.org/bin/windows/Rtools}.)
 
   If \code{dir} is missing, an installed package of name \code{package}
   is searched for.
diff --git a/src/library/tools/man/checkPoFiles.Rd b/src/library/tools/man/checkPoFiles.Rd
index e8ed1ab..c36ea86 100644
--- a/src/library/tools/man/checkPoFiles.Rd
+++ b/src/library/tools/man/checkPoFiles.Rd
@@ -1,6 +1,6 @@
 % File src/library/tools/man/checkRdaFiles.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 2012-2013 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 2012-2014 R Core Team
 % Distributed under GPL 2 or later
 
 \name{checkPoFiles}
@@ -71,7 +71,7 @@ checkPoFiles(language, dir = ".")
 }
 \references{
   See the GNU gettext manual for the \file{.po} file format:\cr
-  \url{http://www.gnu.org/software/gettext/manual/gettext.html}.
+  \url{https://www.gnu.org/software/gettext/manual/gettext.html}.
 }
 \author{
   Duncan Murdoch
diff --git a/src/library/tools/man/checkRd.Rd b/src/library/tools/man/checkRd.Rd
index da08852..b665055 100644
--- a/src/library/tools/man/checkRd.Rd
+++ b/src/library/tools/man/checkRd.Rd
@@ -1,6 +1,6 @@
 % File src/library/tools/man/checkRd.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 2008-2013 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 2008-2014 R Core Team
 % Distributed under GPL 2 or later
 
 \name{checkRd}
diff --git a/src/library/tools/man/checkRdaFiles.Rd b/src/library/tools/man/checkRdaFiles.Rd
index 7be0024..87ddb03 100644
--- a/src/library/tools/man/checkRdaFiles.Rd
+++ b/src/library/tools/man/checkRdaFiles.Rd
@@ -1,5 +1,5 @@
 % File src/library/tools/man/checkRdaFiles.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 2009-11 R Core Team
 % Distributed under GPL 2 or later
 
@@ -29,7 +29,7 @@ resaveRdaFiles(paths, compress = c("auto", "gzip", "bzip2", "xz"),
     \file{.rda} and \file{.RData} files in that directory.}
 
   \item{compress, compression_level}{type and level of compression: see
-    \code{\link{save}}.}
+    \code{\link{save}}.  Values of \code{compress} can be abbreviated.}
 }
 
 \details{
diff --git a/src/library/tools/man/checkTnF.Rd b/src/library/tools/man/checkTnF.Rd
index 444c4c4..8282727 100644
--- a/src/library/tools/man/checkTnF.Rd
+++ b/src/library/tools/man/checkTnF.Rd
@@ -1,5 +1,5 @@
 % File src/library/tools/man/checkTnF.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2007 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/tools/man/checkVignettes.Rd b/src/library/tools/man/checkVignettes.Rd
index 44e8941..44fb766 100644
--- a/src/library/tools/man/checkVignettes.Rd
+++ b/src/library/tools/man/checkVignettes.Rd
@@ -1,6 +1,6 @@
 % File src/library/tools/man/checkVignettes.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2011 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2014 R Core Team
 % Distributed under GPL 2 or later
 
 \name{checkVignettes}
diff --git a/src/library/tools/man/check_packages_in_dir.Rd b/src/library/tools/man/check_packages_in_dir.Rd
index 1f91876..551a53b 100644
--- a/src/library/tools/man/check_packages_in_dir.Rd
+++ b/src/library/tools/man/check_packages_in_dir.Rd
@@ -1,6 +1,6 @@
 % File src/library/tools/man/check_packages_in_dir.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 2013-2013 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 2013-2014 R Core Team
 % Distributed under GPL 2 or later
 
 \name{check_packages_in_dir}
@@ -8,6 +8,8 @@
 \alias{summarize_check_packages_in_dir_depends}
 \alias{summarize_check_packages_in_dir_results}
 \alias{summarize_check_packages_in_dir_timings}
+\alias{check_packages_in_dir_changes}
+\alias{check_packages_in_dir_details}
 \title{Check Source Packages and Their Reverse Dependencies}
 \description{
   Check source packages in a given directory, optionally with their
@@ -28,7 +30,14 @@ summarize_check_packages_in_dir_results(dir, all = TRUE,
                                         full = FALSE)
 summarize_check_packages_in_dir_timings(dir, all = FALSE,
                                         full = FALSE)
-summarize_check_packages_in_dir_depends(dir, all = FALSE)
+summarize_check_packages_in_dir_depends(dir, all = FALSE,
+                                        which = c("Depends",
+                                                  "Imports",
+                                                  "LinkingTo"))
+
+check_packages_in_dir_changes(dir, old,
+                              outputs = FALSE, sources = FALSE)
+check_packages_in_dir_details(dir, logs = NULL, drop_ok = TRUE)
 }
 \arguments{
   \item{dir}{a character string giving the path to the directory with
@@ -44,10 +53,12 @@ summarize_check_packages_in_dir_depends(dir, all = FALSE)
     \code{"which"}, or \code{"recursive"}, giving the repositories to
     use for locating reverse dependencies (default:
     \code{getOption("repos")}), the types of reverse dependencies
-    (default: \code{c("Depends", "Imports", "LinkingTo")}), and
-    indicating whether to also check reverse dependencies of reverse
-    dependencies (and so on), or \code{NULL} (default), in which case no
-    reverse dependencies are checked.}
+    (default: \code{c("Depends", "Imports", "LinkingTo")}, with
+    shorthands \code{"most"} and \code{"all"} as for
+    \code{\link{package_dependencies}}), and indicating whether to also
+    check reverse dependencies of reverse dependencies and so on
+    (default: \code{FALSE}), or \code{NULL} (default), in which case no
+    reverse dependencies are checked.} 
   \item{check_env}{a character vector of name=value strings to set
     environment variables for checking, or a list of length two of such
     character vectors to be used for checking packages and reverse
@@ -65,6 +76,20 @@ summarize_check_packages_in_dir_depends(dir, all = FALSE)
   \item{full}{a logical indicating whether to also give details for
     checks with non-ok results, or summarize check example timings (if
     available).}
+  \item{which}{see \code{\link{package_dependencies}}.}
+  \item{old}{a character string giving the path to the directory of a
+    previous \code{check_packages_in_dir} run.}
+  \item{outputs}{a logical indicating whether to analyze changes in
+    the outputs of the checks performed, or only (default) the status of
+    the checks.}
+  \item{sources}{a logical indicating whether to also investigate the
+    changes in the source files checked (default: \code{FALSE}).}
+  \item{logs}{a character vector with the paths of \file{00check.log} to
+    analyze.  Only used if \code{dir} was not given.}
+  \item{drop_ok}{a logical indicating whether to drop checks with
+    \sQuote{ok} status, or a character vector with the \sQuote{ok}
+    status tags to drop.  The default corresponds to tags \samp{OK},
+    \samp{NONE} and \samp{SKIPPED}.}
 }
 \details{
   \code{check_packages_in_dir} allows to conveniently check source
@@ -94,9 +119,46 @@ summarize_check_packages_in_dir_depends(dir, all = FALSE)
   Installation and checking is performed in parallel if \code{Ncpus} is
   greater than one: this will use \code{\link[parallel]{mclapply}} on
   Unix and \code{\link[parallel]{parLapply}} on Windows.
+
+  \code{check_packages_in_dir} returns an object inheriting from class
+  \code{"check_packages_in_dir"} which has \code{\link{print}} and
+  \code{\link{summary}} methods.
+
+  \code{check_packages_in_dir_changes} allows to analyze the effect of
+  changing (some of) the sources.  With \code{dir} and \code{old} the
+  paths to the directories with the new and old sources, respectively,
+  and the corresponding check results, possible changes in the check
+  results can conveniently be analyzed as controlled via options
+  \code{outputs} and \code{sources}.
+
+  \code{check_packages_in_dir_details} analyzes check log files to
+  obtain check details as a data frame which can be used for further
+  processing, providing check name, status and output for every check
+  performed and not dropped according to status tag (via variables
+  \code{Check}, \code{Status} and \code{Output}, respectively).
 }
 \note{
   This functionality is still experimental: interfaces may change in
   future versions. 
 }
 \keyword{utilities}
+\examples{
+\dontrun{
+## Check packages in dir without reverse dependencies:
+check_packages_in_dir(dir)
+## Check packages in dir and their reverse dependencies using the
+## defaults (all repositories in getOption("repos"), all "strong"
+## reverse dependencies, no recursive reverse dependencies):
+check_packages_in_dir(dir, reverse = list())
+## Check packages in dir with their reverse dependencies from CRAN,
+## using all strong reverse dependencies and reverse suggests:
+check_packages_in_dir(dir,
+                      reverse = list(repos = getOption("repos")["CRAN"],
+                                     which = "most"))                   
+## Check packages in dir with their reverse dependencies from CRAN,
+## using '--as-cran' for the former but not the latter:
+check_packages_in_dir(dir,
+                      check_args = c("--as-cran", ""),
+                      reverse = list(repos = getOption("repos")["CRAN"]))
+}
+}
diff --git a/src/library/tools/man/codoc.Rd b/src/library/tools/man/codoc.Rd
index 1e8fa88..0c85569 100644
--- a/src/library/tools/man/codoc.Rd
+++ b/src/library/tools/man/codoc.Rd
@@ -1,5 +1,5 @@
 % File src/library/tools/man/codoc.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2009 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/tools/man/compactPDF.Rd b/src/library/tools/man/compactPDF.Rd
index 2745bd9..f2c4d51 100644
--- a/src/library/tools/man/compactPDF.Rd
+++ b/src/library/tools/man/compactPDF.Rd
@@ -1,5 +1,5 @@
 % File src/library/tools/man/compactPDF.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 2011-2014 R Core Team
 % Distributed under GPL 2 or later
 
@@ -36,7 +36,7 @@ compactPDF(paths,
   \item{gs_quality}{A character string indicating the quality required:
     the options are \code{"none"} (so GhostScript is not used),
     \code{"printer"} (300dpi), \code{"ebook"} (150dpi) and
-    \code{"screen"} (72dpi).}
+    \code{"screen"} (72dpi).  Can be abbreviated.}
   \item{gs_extras}{An optional character vector of further options to be
     passed to GhostScript.}
   \item{x}{An object of class \code{"compactPDF"}.}
@@ -48,7 +48,7 @@ compactPDF(paths,
 \details{
   This by default makes use of \command{qpdf}, available from
   \url{http://qpdf.sourceforge.net/} (including as a Windows binary) and
-  included with the CRAN OS X distribution of \R.  If \code{gs_cmd}
+  included with the CRAN macOS distribution of \R.  If \code{gs_cmd}
   is non-empty and \code{gs_quality != "none"}, GhostScript will used
   first, then \command{qpdf} if it is available.  If \code{gs_quality !=
   "none"} and \code{gs_cmd} is \code{""}, an attempt will be made to find a
diff --git a/src/library/tools/man/delimMatch.Rd b/src/library/tools/man/delimMatch.Rd
index 1470290..e138556 100644
--- a/src/library/tools/man/delimMatch.Rd
+++ b/src/library/tools/man/delimMatch.Rd
@@ -1,5 +1,5 @@
 % File src/library/tools/man/delimMatch.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2007 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/tools/man/dependsOnPkgs.Rd b/src/library/tools/man/dependsOnPkgs.Rd
index b8a22ce..4f71046 100644
--- a/src/library/tools/man/dependsOnPkgs.Rd
+++ b/src/library/tools/man/dependsOnPkgs.Rd
@@ -1,6 +1,6 @@
 % File src/library/tools/man/getDepList.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 2008-2013 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 2008-2015 R Core Team
 % Distributed under GPL 2 or later
 
 \name{dependsOnPkgs}
@@ -15,14 +15,15 @@ dependsOnPkgs(pkgs,
               dependencies = c("Depends", "Imports", "LinkingTo"),
               recursive = TRUE, lib.loc = NULL,
               installed =
-              installed.packages(lib.loc, fields = "Enhances"))
+              utils::installed.packages(lib.loc, fields = "Enhances"))
 }
 \arguments{
   \item{pkgs}{a character vector of package names.}
   \item{dependencies}{a character vector listing the types of
     dependencies, a subset of
     \code{c("Depends", "Imports", "LinkingTo", "Suggests", "Enhances")}.
-    Character string \code{"all"} is shorthand for that vector.}
+    Character string \code{"all"} is shorthand for that vector, and
+    \code{"most"} currently shorthand for these apart from \code{"Enhances"}.}
   \item{recursive}{logical: should reverse dependencies of reverse
     dependencies (and so on) be included?}
   \item{lib.loc}{a character vector of \R library trees, or \code{NULL}
@@ -34,9 +35,9 @@ dependsOnPkgs(pkgs,
   \code{pkgs}.
 }
 % do not test as result depends if recommended packages are installed.
-\examples{
+\examples{\donttest{
 ## there are few dependencies in a vanilla R installation:
 ## lattice may not be installed
 dependsOnPkgs("lattice")
-}
+}}
 \keyword{utilities}
diff --git a/src/library/tools/man/encoded.Rd b/src/library/tools/man/encoded.Rd
index 1e70498..de53779 100644
--- a/src/library/tools/man/encoded.Rd
+++ b/src/library/tools/man/encoded.Rd
@@ -1,5 +1,5 @@
 % File src/library/tools/man/encoded.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2007 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/tools/man/fileutils.Rd b/src/library/tools/man/fileutils.Rd
index 5f4a3d8..e4d264f 100644
--- a/src/library/tools/man/fileutils.Rd
+++ b/src/library/tools/man/fileutils.Rd
@@ -1,5 +1,5 @@
 % File src/library/tools/man/fileutils.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2013 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/tools/man/find_gs_cmd.Rd b/src/library/tools/man/find_gs_cmd.Rd
index a538f48..82ffd86 100644
--- a/src/library/tools/man/find_gs_cmd.Rd
+++ b/src/library/tools/man/find_gs_cmd.Rd
@@ -1,5 +1,5 @@
 % File src/library/tools/man/find_gs_cmd.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 2008-2014 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/tools/man/getDepList.Rd b/src/library/tools/man/getDepList.Rd
deleted file mode 100644
index d7f965b..0000000
--- a/src/library/tools/man/getDepList.Rd
+++ /dev/null
@@ -1,84 +0,0 @@
-% File src/library/tools/man/getDepList.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2007 R Core Team
-% Distributed under GPL 2 or later
-
-\name{getDepList}
-\alias{getDepList}
-\alias{pkgDepends}
-\title{Functions to Retrieve Dependency Information}
-\description{
-  Given a dependency matrix, will create a \code{DependsList} object for that
-  package which will include the dependencies for that matrix, which
-  ones are installed, which unresolved dependencies were found online,
-  which unresolved dependencies were not found online, and any R dependencies.
-}
-\usage{
-getDepList(depMtrx, instPkgs, recursive = TRUE, local = TRUE,
-           reduce = TRUE, lib.loc = NULL)
-
-pkgDepends(pkg, recursive = TRUE, local = TRUE, reduce = TRUE,
-           lib.loc = NULL)
-}
-\arguments{
-  \item{depMtrx}{A dependency matrix as from \code{package.dependencies}}
-  \item{pkg}{The name of the package}
-  \item{instPkgs}{A matrix specifying all packages installed on the
-    local system, as from \code{installed.packages}}
-  \item{recursive}{Whether or not to include indirect dependencies}
-  \item{local}{Whether or not to search only locally}
-  \item{reduce}{Whether or not to collapse all sets of dependencies to a
-    minimal value}
-  \item{lib.loc}{What libraries to use when looking for installed
-    packages.  \code{NULL} indicates all library directories in the
-    user's \code{.libPaths()}.}
-}
-\details{
-  The function \code{pkgDepends} is a convenience function which wraps
-  \code{getDepList} and takes as input a package name.  It will then
-  query \code{\link{installed.packages}}
-  and also generate a dependency
-  matrix, calling \code{getDepList} with this information and returning
-  the result.
-
-  These functions will retrieve information about the dependencies of
-  the matrix, resulting in a \code{DependsList} object.  This is a
-  list with four elements:
-  \describe{
-    \item{Depends}{A vector of the dependencies for this package.}
-    \item{Installed}{A vector of the dependencies which have been
-      satisfied by the currently installed packages.}
-    \item{Found}{A list representing the dependencies which are not in
-      \code{Installed} but were found online.  This list has element
-      names which are the URLs for the repositories in which packages
-      were found and the elements themselves are vectors of package
-      names which were found in the respective repositories.  If
-      \code{local = TRUE}, the \code{Found} element will always be empty.}
-    \item{R}{Any R version dependencies.}
-  }
-
-  If \code{recursive} is \code{TRUE}, any package that is specified as a
-  dependency will in turn have its dependencies included (and so on),
-  these are known as indirect dependencies.  If \code{recursive} is
-  \code{FALSE}, only the dependencies directly stated by the package will
-  be used.
-
-  If \code{local} is \code{TRUE}, the system will only look at the user's local
-  install and not online to find unresolved dependencies.
-
-  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 (>= 1.3.0)}).
-}
-\value{
-  An object of class \code{"DependsList"}.
-}
-\author{ Jeff Gentry }
-\seealso{\code{\link{installFoundDepends}}}
-\examples{
-pkgDepends("tools", local = FALSE)
-}
-\keyword{utilities}
-
diff --git a/src/library/tools/man/getVignetteInfo.Rd b/src/library/tools/man/getVignetteInfo.Rd
index 84beb36..0a30075 100644
--- a/src/library/tools/man/getVignetteInfo.Rd
+++ b/src/library/tools/man/getVignetteInfo.Rd
@@ -1,3 +1,8 @@
+% File src/library/tools/man/getVignetteInfo.Rd
+% Part of the R package, https://www.R-project.org
+% Copyright 2013 R Core Team
+% Distributed under GPL 2 or later
+
 \name{getVignetteInfo}
 \alias{getVignetteInfo}
 \title{
diff --git a/src/library/tools/man/installFoundDepends.Rd b/src/library/tools/man/installFoundDepends.Rd
deleted file mode 100644
index ad42e56..0000000
--- a/src/library/tools/man/installFoundDepends.Rd
+++ /dev/null
@@ -1,38 +0,0 @@
-% File src/library/tools/man/installFoundDepends.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2007 R Core Team
-% Distributed under GPL 2 or later
-
-\name{installFoundDepends}
-\alias{installFoundDepends}
-\title{A function to install unresolved dependencies}
-\description{
-  This function will take the \code{Found} element of a
-  \code{pkgDependsList} object and attempt to install
-  all of the listed packages from the specified repositories.
-}
-\usage{
-installFoundDepends(depPkgList, ...)
-}
-\arguments{
-  \item{depPkgList}{A \code{Found} element from a \code{pkgDependsList} object}
-  \item{\dots}{Arguments to pass on to \code{\link{install.packages}}}
-}
-\details{
-  This function takes as input the \code{Found} list from a
-  \code{pkgDependsList} object.  This list will have element names being
-  URLs corresponding to repositories and the elements will be vectors of
-  package names.  For each element, \code{\link{install.packages}} is
-  called for that URL to install all packages listed in the vector.
-}
-\author{Jeff Gentry}
-\seealso{\code{\link{pkgDepends}}, \code{\link{install.packages}}}
-\examples{
-## Set up a temporary directory to install packages to
-tmp <- tempfile()
-dir.create(tmp)
-
-pDL <- pkgDepends("tools", local = FALSE)
-installFoundDepends(pDL$Found, destdir = tmp)
-}
-\keyword{utilities}
diff --git a/src/library/tools/man/loadRdMacros.Rd b/src/library/tools/man/loadRdMacros.Rd
new file mode 100644
index 0000000..a9711f1
--- /dev/null
+++ b/src/library/tools/man/loadRdMacros.Rd
@@ -0,0 +1,81 @@
+% File src/library/tools/man/loadRdMacros.Rd
+% Part of the R package, https://www.R-project.org
+% Copyright 2016 R Core Team
+% Distributed under GPL 2 or later
+
+
+\name{loadRdMacros}
+\alias{loadRdMacros}
+\alias{loadPkgRdMacros}
+\title{
+  Load user-defined Rd help system macros.
+}
+\description{
+  Loads macros from an \file{.Rd} file, or from several \file{.Rd}
+  files contained in a package.
+}
+\usage{
+loadRdMacros(file, macros = TRUE)
+loadPkgRdMacros(pkgdir, macros)
+}
+\arguments{
+  \item{file}{
+    A file in Rd format containing macro definitions.
+  }
+  \item{macros}{
+    \code{TRUE} or a previous set of macro definitions, in the format
+    expected by the \code{\link{parse_Rd}} \code{macros} argument. 
+  }
+  \item{pkgdir}{
+    The base directory of a source package or an installed package.
+  }
+}
+\details{
+  The files parsed by this function should contain only macro
+  definitions; a warning will be issued if anything else other than
+  comments or white space is found.
+
+  The \code{macros} argument may be a filename of a base set of macros,
+  or the result of a previous call to \code{loadRdMacros} or
+  \code{loadPkgRdMacros} in the same session.  These results should be
+  assumed to be valid only within the current session.
+
+  The \code{loadPkgMacros} function first looks for an \code{"RdMacros"}
+  entry in the package \file{DESCRIPTION} file.  If present, it should
+  contain a comma-separated list of other package names; their macros
+  will be loaded before those of the current package.  It will then look
+  in the current package for \file{.Rd} files in the \file{man/macros}
+  or \file{help/macros} subdirectories, and load those.
+}
+\value{
+  These functions each return an environment containing objects with the
+  names of the newly defined macros from the last file processed.  The
+  parent environment will be macros from the previous file, and so on.
+  The first file processed will have \code{\link{emptyenv}()} as its
+  parent.
+}
+\references{
+  See the \sQuote{Writing \R Extensions} manual for the syntax of Rd files,
+  or \url{https://developer.r-project.org/parseRd.pdf} for a technical
+  discussion.
+}
+\author{
+Duncan Murdoch
+}
+\seealso{
+\code{\link{parse_Rd}}
+}
+\examples{
+\donttest{
+f <- tempfile()
+writeLines(paste0("\\\\newcommand{\\\\logo}{\\\\if{html}{\\\\figure{Rlogo.svg}{options: width=100}",
+                  "\\\\if{latex}{\\\\figure{Rlogo.pdf}{options: width=0.5in}}}"),
+	    f)
+m <- loadRdMacros(f)
+ls(m)
+ls(parent.env(m))
+ls(parent.env(parent.env(m)))
+}
+}
+\keyword{ utilities }
+\keyword{ documentation }
diff --git a/src/library/tools/man/makeLazyLoading.Rd b/src/library/tools/man/makeLazyLoading.Rd
index 358dcc5..e6dca6e 100644
--- a/src/library/tools/man/makeLazyLoading.Rd
+++ b/src/library/tools/man/makeLazyLoading.Rd
@@ -1,5 +1,5 @@
 % File src/library/tools/man/makeLazyLoading.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2011 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/tools/man/make_translations_pkg.Rd b/src/library/tools/man/make_translations_pkg.Rd
index 3c49054..03410bb 100644
--- a/src/library/tools/man/make_translations_pkg.Rd
+++ b/src/library/tools/man/make_translations_pkg.Rd
@@ -1,10 +1,8 @@
 % File src/library/tools/man/make_translations_pkg.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 2012 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 2012-2014 R Core Team
 % Distributed under GPL 2 or later
 
-\newcommand{\sspace}{\ifelse{latex}{\out{~}}{ }}
-
 \name{make_translations_pkg}
 \alias{make_translations_pkg}
 \title{
diff --git a/src/library/tools/man/makevars.Rd b/src/library/tools/man/makevars.Rd
new file mode 100644
index 0000000..f80a12c
--- /dev/null
+++ b/src/library/tools/man/makevars.Rd
@@ -0,0 +1,49 @@
+% File src/library/tools/man/makevars.Rd
+% Part of the R package, https://www.R-project.org
+% Copyright 2016 R Core Team
+% Distributed under GPL 2 or later
+
+\name{makevars}
+\alias{makevars_user}
+\alias{makevars_site}
+\title{User and Site Compilation Variables}
+\usage{
+makevars_user()
+makevars_site()
+}
+\description{
+  Determine the location of the user and site specific \file{Makevars}
+  files for customizing package compilation.
+}
+\value{
+  A character string with the path to the user or site specific
+  \file{Makevars} file, or an empty character vector if there is no such
+  file.
+}
+\details{
+  Package maintainers can use these functions to employ user and site
+  specific compilation settings also for compilations not using \R's
+  mechanisms (in particular, custom compilations in subdirectories of
+  \file{src}), e.g., by adding configure code calling \R with
+  \code{cat(tools::makevars_user())} or
+  \code{cat(tools::makevars_site())}, and if non-empty passing this with
+  \option{-f} to custom Make invocations.
+}
+\seealso{
+  Section \dQuote{Customizing package compilation} in the
+  \dQuote{R Installation and Administration} manual.
+}
+%% \donttest as output is user/site-dependent
+\examples{\donttest{
+makevars_user()
+makevars_site()
+}
+\dontshow{
+checkMV <- function(r)
+  stopifnot(is.character(r),
+            length(r) == 0 || (length(r) == 1 && file.exists(r)))
+checkMV(makevars_user())
+checkMV(makevars_site())
+}
+}
+\keyword{utilities}
diff --git a/src/library/tools/man/md5sum.Rd b/src/library/tools/man/md5sum.Rd
index 7d4973e..7baf080 100644
--- a/src/library/tools/man/md5sum.Rd
+++ b/src/library/tools/man/md5sum.Rd
@@ -1,5 +1,5 @@
 % File src/library/tools/man/md5sum.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2014 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/tools/man/package.dependencies.Rd b/src/library/tools/man/package.dependencies.Rd
deleted file mode 100644
index 17910c7..0000000
--- a/src/library/tools/man/package.dependencies.Rd
+++ /dev/null
@@ -1,34 +0,0 @@
-% File src/library/tools/man/package.dependencies.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2013 R Core Team
-% Distributed under GPL 2 or later
-
-\name{package.dependencies}
-\alias{package.dependencies}
-\title{Check Package Dependencies}
-\description{
-  Parses and checks the dependencies of a package against the currently
-  installed version of R (and other packages).
-}
-\usage{
-package.dependencies(x, check = FALSE,
-                     depLevel =
-                     c("Depends", "Imports", "Suggests"))
-}
-\arguments{
-  \item{x}{A matrix of package descriptions as returned by
-    \code{\link{available.packages}}.}
-  \item{check}{If \code{TRUE}, return logical vector of check results.
-    If \code{FALSE}, return parsed list of dependencies.}
-  \item{depLevel}{Whether to look for \code{Depends} or \code{Suggests}
-    level dependencies.}
-}
-\details{
-  Currently we only check if the package conforms with the currently
-  running version of R.  In the future we might add checks for
-  inter-package dependencies.
-}
-\seealso{
-  \code{\link{update.packages}}
-}
-\keyword{utilities}
diff --git a/src/library/tools/man/package_dependencies.Rd b/src/library/tools/man/package_dependencies.Rd
index dc46a60..08b70b3 100644
--- a/src/library/tools/man/package_dependencies.Rd
+++ b/src/library/tools/man/package_dependencies.Rd
@@ -1,6 +1,6 @@
 % File src/library/tools/man/package_dependencies.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 2012-2012 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 2012-2015 R Core Team
 % Distributed under GPL 2 or later
 
 \name{package_dependencies}
@@ -10,16 +10,18 @@
    Find (recursively) dependencies or reverse dependencies of packages.
 }
 \usage{
-package_dependencies(packages = NULL, db,
+package_dependencies(packages = NULL, db = NULL,
         which = c("Depends", "Imports", "LinkingTo"),
-	recursive = FALSE, reverse = FALSE)
+	recursive = FALSE, reverse = FALSE, verbose = getOption("verbose"))
 }
 \arguments{
   \item{packages}{a character vector of package names.}
-  \item{db}{character matrix as from available.packages(), or data frame variants thereof.
-    Alternatively, a package database like the one available from
-    \url{http://cran.R-project.org/web/packages/packages.rds}.
-}
+  \item{db}{character matrix as from \code{\link{available.packages}()}
+    (with the default \code{NULL} the results of this call)
+    or data frame variants thereof.  Alternatively, a package database
+    like the one available from
+    \url{https://cran.r-project.org/web/packages/packages.rds}.
+  }
   \item{which}{a character vector listing the types of
     dependencies, a subset of
     \code{c("Depends", "Imports", "LinkingTo", "Suggests", "Enhances")}.
@@ -28,31 +30,40 @@ package_dependencies(packages = NULL, db,
     \code{"Enhances"}.
   }
   \item{recursive}{logical: should (reverse) dependencies of (reverse)
-    dependencies (and so on) be included?
-  }
+    dependencies (and so on) be included?}
   \item{reverse}{logical: if \code{FALSE} (default), regular
-    dependencies are calculated, otherwise reverse dependencies.
-  }
+    dependencies are calculated, otherwise reverse dependencies.}
+  \item{verbose}{logical indicating if output should monitor the package
+    search cycles.}
 }
 \value{
-Named list with one element for each package in argument \code{packages},
-each consists of a character vector naming the (recursive) (reverse) dependencies
-of that package.
+  Named list with one element for each package in argument \code{packages},
+  each consists of a character vector naming the (recursive) (reverse) dependencies
+  of that package.
 
-For given packages which are not found in the db, \code{NULL} entries are returned,
-as opposed to \code{character(0)} entries which indicate no dependencies.
+  For given packages which are not found in the db, \code{NULL} entries are returned,
+  as opposed to \code{character(0)} entries which indicate no dependencies.
 }
 \seealso{
-\code{\link{dependsOnPkgs}}, and \code{\link{package.dependencies}} for checking
-dependencies
+  \code{\link{dependsOnPkgs}}, and \code{\link{package.dependencies}} for checking
+  dependencies.
 }
 \examples{
-\dontrun{
+\donttest{
+myPkgs <- c("MASS", "Matrix", "KernSmooth", "class", "cluster", "codetools")
 pdb <- available.packages()
-deps <- package_dependencies(packages = "MASS", pdb,
+system.time(
+dep1 <- package_dependencies(myPkgs, db = pdb) # all arguments at default
+) # very fast
+utils::str(dep1, vec.len=10)
+
+system.time( ## reverse dependencies, recursively --- takes much longer:
+deps <- package_dependencies(myPkgs, db = pdb,
                     which = c("Depends", "Imports", "LinkingTo", "Suggests"),
                     recursive = TRUE, reverse = TRUE)
-length(deps$MASS)
-}
+) # seen ~ 10 seconds
+
+lengths(deps) # 2015-01-14: all are 7040, but codetools with 7046
+}% dont test
 }
 \keyword{utilities}
diff --git a/src/library/tools/man/package_native_routine_registration_skeleton.Rd b/src/library/tools/man/package_native_routine_registration_skeleton.Rd
new file mode 100644
index 0000000..b43b2fb
--- /dev/null
+++ b/src/library/tools/man/package_native_routine_registration_skeleton.Rd
@@ -0,0 +1,164 @@
+% File src/library/tools/man/package_native_routine_registration_skeleton.Rd
+% Part of the R package, https://www.R-project.org
+% Copyright 2017 R Core Team
+% Distributed under GPL 2 or later
+
+\name{package_native_routine_registration_skeleton}
+\alias{package_native_routine_registration_skeleton}
+\title{
+  Write Skeleton for Adding Native Routine Registration to a Package
+}
+\description{
+  Write a skeleton for adding native routine registration to a package.
+}
+\usage{
+package_native_routine_registration_skeleton(dir, con = stdout(),
+    align = TRUE, character_only = TRUE, include_declarations = TRUE)
+}
+\arguments{
+  \item{dir}{
+    Top-level directory of a package.
+  }
+  \item{con}{
+    Connection on which to write the skeleton: can be specified as a
+    file path.
+  }
+  \item{align}{
+    Logical: should the registration tables be lined up in three
+    columns each?
+  }
+  \item{character_only}{
+    Logical: should only \code{.NAME} arguments specified by character
+    strings (and not as names of \R objects nor expressions) be extracted?
+  }
+  \item{include_declarations}{
+    Logical: should the output include declarations (also known as
+    \sQuote{prototypes}) for the registered routines?
+  }
+}
+\details{
+  Registration is described in section 5.4.1 of \sQuote{Writing R
+    Extensions}. This function produces a skeleton of the C code which
+  needs to be added to enable registration, conventionally as file
+  \file{src/init.c} or appended to the sole C file of the package.
+
+  This function examines the code in the \file{R} directory of the
+  package for calls to \code{.C}, \code{.Fortran}, \code{.Call} and
+  \code{.External} and creates registration information for those it can
+  make sense of.  If the number of arguments used cannot be determined
+  it will be recorded as \code{-1}: such values should be corrected.
+
+  Optionally the skeleton will include declarations for the registered
+  routines: they should be checked against the C/Fortran source code,
+  not least as the number of arguments is taken from the \R code.  For
+  \code{.Call} and \code{.External} calls they will often suffice, but
+  for \code{.C} and \code{.Fortran} calls the \code{void *} arguments
+  would ideally be replaced by the actual types.  Otherwise declarations
+  need to be included (they may exist earlier in that file if appending
+  to a file, or in a header file which can be included in
+  \file{init.c}).
+  
+  The default value of \code{character_only} is appropriate when working
+  on a package without any existing registration: \code{character_only =
+  FALSE} can be used to suggest updates for a package which has been
+  extended since registration.  For the default value, if \code{.NAME}
+  values are found which are not character strings (e.g.\sspace{}names
+  or expressions) this is noted via a comment in the output.
+
+  Packages which used the earlier form of creating \R objects for native
+  symbols \emph{via} additional arguments in a \code{useDynLib}
+  directive will probably most easily be updated to use registration
+  with \code{character_only = FALSE}.
+
+  If an entry point is used with different numbers of arguments in the
+  package's \R code, an entry in the table (and optionally, a
+  declaration) is made for each number, and a comment placed in the
+  output.  This needs to be resolved: only \code{.External} calls can
+  have a variable number of arguments, which should be declared as
+  \code{-1}.
+
+  A surprising number of \acronym{CRAN} packages had calls in \R code to
+  native routines not included in the package, which will lead to a
+  \sQuote{loading failed} error during package installation when the
+  registration C code is added.
+  
+  Calls which do not name a routine such as \code{.Call(\dots)} will be
+  silently ignored.
+}
+
+\value{
+  None: the output is written to the connection \code{con}.
+}
+
+\note{
+  This only examines the \file{R} directory: it will not find
+  e.g.\sspace\code{.Call} calls used directly in examples, tests \emph{etc}.
+  
+  Static code analysis is used to find the \code{.C} etc calls: it
+  \emph{will} find those in parts of the \R code \sQuote{commented out}
+  by inclusion in \code{if(FALSE) \{ \dots \}}.
+  On the other hand, it will fail to find the entry points in
+  constructs like \preformatted{
+    .Call(if(int) "rle_i" else "rle_d", i, force)
+  }
+  and does not know the value of variables in calls like \preformatted{
+    .Call (cfunction, ...)
+    .Call(..., PACKAGE="sparseLTSEigen")
+  } (but if \code{character_only} is false, will extract the first as
+  \code{"cfunction"}).  Calls which have not been fully resolved will be
+  noted \emph{via} comments in the output file.
+
+  Call to entry points in other packages will be ignored if they have an
+  explicit (character string) \code{PACKAGE} argument.
+}
+
+\section{Extracting C/C++ prototypes}{
+  There are several tools available to extract function declarations
+  from C or C++ code.  For example,
+
+  For C code one can use \command{cproto}
+  (\url{http://invisible-island.net/cproto/cproto.html}; Windows
+  executables are available), for
+  example\preformatted{
+    cproto -I/path/to/R/include -e *.c
+  }
+  
+  \command{ctags} (commonly distributed with the OS)
+  covers C and C++., listing all function usages by something
+  like\preformatted{
+    ctags -x *.c
+  }.  (The \sQuote{Exuberant} version allows a lot more control.)
+}
+
+\seealso{
+  \code{\link{package.skeleton}}.
+}
+\examples{\dontrun{
+## with a completed splines/DESCRIPTION file,
+tools::package_native_routine_registration_skeleton('splines',,,FALSE)
+## produces
+#include <R.h>
+#include <Rinternals.h>
+#include <stdlib.h> // for NULL
+#include <R_ext/Rdynload.h>
+
+/* FIXME: 
+   Check these declarations against the C/Fortran source code.
+*/
+
+/* .Call calls */
+extern SEXP spline_basis(SEXP, SEXP, SEXP, SEXP);
+extern SEXP spline_value(SEXP, SEXP, SEXP, SEXP, SEXP);
+
+static const R_CallMethodDef CallEntries[] = {
+    {"spline_basis", (DL_FUNC) &spline_basis, 4},
+    {"spline_value", (DL_FUNC) &spline_value, 5},
+    {NULL, NULL, 0}
+};
+
+void R_init_splines(DllInfo *dll)
+{
+    R_registerRoutines(dll, NULL, CallEntries, NULL, NULL);
+    R_useDynamicSymbols(dll, FALSE);
+}
+}}
diff --git a/src/library/tools/man/parseLatex.Rd b/src/library/tools/man/parseLatex.Rd
index fdd474f..3c14ecf 100644
--- a/src/library/tools/man/parseLatex.Rd
+++ b/src/library/tools/man/parseLatex.Rd
@@ -1,5 +1,5 @@
 % File src/library/tools/man/parseLatex.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2013 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/tools/man/parse_Rd.Rd b/src/library/tools/man/parse_Rd.Rd
index f82d22f..8251368 100644
--- a/src/library/tools/man/parse_Rd.Rd
+++ b/src/library/tools/man/parse_Rd.Rd
@@ -1,6 +1,6 @@
 % File src/library/tools/man/parse_Rd.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 2008-14 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 2008-2016 R Core Team
 % Distributed under GPL 2 or later
 
 \name{parse_Rd}
@@ -14,7 +14,9 @@
 }
 \usage{
 parse_Rd(file, srcfile = NULL, encoding = "unknown",
-         verbose = FALSE, fragment = FALSE, warningCalls = TRUE)
+         verbose = FALSE, fragment = FALSE, warningCalls = TRUE,
+	 macros = file.path(R.home("share"), "Rd", "macros", "system.Rd"),
+         permissive = FALSE)
 \method{print}{Rd}(x, deparse = FALSE, \dots)
 \method{as.character}{Rd}(x, deparse = FALSE, \dots)
 }
@@ -29,6 +31,10 @@ parse_Rd(file, srcfile = NULL, encoding = "unknown",
   \item{fragment}{Logical indicating whether file represents a complete
     Rd file, or a fragment.}
   \item{warningCalls}{Logical: should parser warnings include the call?}
+  \item{macros}{Filename or environment from which to load additional
+    macros, or a logical value.  See the Details below.}
+  \item{permissive}{Logical indicating that unrecognized macros
+    should be treated as text with no warning.}
   \item{x}{An object of class Rd.}
   \item{deparse}{If \code{TRUE}, attempt to reinstate the escape characters
     so that the resulting characters will parse to the same object.}
@@ -36,16 +42,33 @@ parse_Rd(file, srcfile = NULL, encoding = "unknown",
 }
 \details{
   This function parses \file{Rd} files according to the specification given
-  in \url{http://developer.r-project.org/parseRd.pdf}.
+  in \url{https://developer.r-project.org/parseRd.pdf}.
 
   It generates a warning for each parse error and attempts to continue
   parsing.  In order to continue, it is generally necessary to drop some
-  parts of the file, so such warnings should not be ignored.
+  parts of the file, so such warnings should not be ignored.  
   
   Files without a marked encoding are by default assumed to be in the
   native encoding.  An alternate default can be set using the
   \code{encoding} argument.  All text in files is translated to the
   UTF-8 encoding in the parsed object.
+  
+  As from \R version 3.2.0, User-defined macros may be given in a
+  separate file using \samp{\newcommand} or \samp{\renewcommand}.
+  An environment may also be given:  it would be produced by
+  \code{\link{loadRdMacros}}, \code{\link{loadPkgRdMacros}}, or
+  by a previous call to \code{parse_Rd}.  If a logical value
+  is given, only the default built-in macros will be used; 
+  \code{FALSE} indicates that no \code{"macros"} attribute
+  will be returned with the result.
+  
+  The \code{permissive} argument allows text to be parsed that is
+  not completely in Rd format.  Typically it would be LaTeX code,
+  used in an Rd fragment, e.g.\sspace{}in a \code{\link{bibentry}}.  
+  With \code{permissive = TRUE}, this will be passed through as plain 
+  text.  Since \code{parse_Rd} doesn't know how many arguments
+  belong in LaTeX macros, it will guess based on the presence
+  of braces after the macro; this is not infallible.
 }
 \value{
   \code{parse_Rd} returns an object of class \code{"Rd"}.  The
@@ -53,12 +76,14 @@ parse_Rd(file, srcfile = NULL, encoding = "unknown",
   \code{as.character()} and \code{print()} methods defined for the
   class return character vectors and print them, respectively.
 
-  Files without a marked encoding are by default assumed to be in the
-  native encoding.  An alternate default can be set using the
-  \code{encoding} argument.  All text in files is translated to the
-  UTF-8 encoding in the parsed object.
+  Unless \code{macros = FALSE}, the object will have an attribute 
+  named \code{"macros"}, which is an environment containing the 
+  macros defined in \code{file}, in a format that can be used for 
+  further \code{parse_Rd} calls  in the same session.  It is not 
+  guaranteed to work if saved to a file and reloaded in a different 
+  session.
 }
-\references{ \url{http://developer.r-project.org/parseRd.pdf} }
+\references{ \url{https://developer.r-project.org/parseRd.pdf} }
 \author{ Duncan Murdoch }
 \seealso{
   \code{\link{Rd2HTML}} for the converters that use the output of
diff --git a/src/library/tools/man/pskill.Rd b/src/library/tools/man/pskill.Rd
index e6d6685..4d354b4 100644
--- a/src/library/tools/man/pskill.Rd
+++ b/src/library/tools/man/pskill.Rd
@@ -1,5 +1,5 @@
 % File src/library/tools/man/pskill.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 2011 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/tools/man/psnice.Rd b/src/library/tools/man/psnice.Rd
index c287af7..c042498 100644
--- a/src/library/tools/man/psnice.Rd
+++ b/src/library/tools/man/psnice.Rd
@@ -1,5 +1,5 @@
 % File src/library/tools/man/psnice.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 2011 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/tools/man/read.00Index.Rd b/src/library/tools/man/read.00Index.Rd
index 6efc5b1..cac0836 100644
--- a/src/library/tools/man/read.00Index.Rd
+++ b/src/library/tools/man/read.00Index.Rd
@@ -1,5 +1,5 @@
 % File src/library/tools/man/read.00Index.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2010 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/tools/man/showNonASCII.Rd b/src/library/tools/man/showNonASCII.Rd
index 9eb133a..af2d766 100644
--- a/src/library/tools/man/showNonASCII.Rd
+++ b/src/library/tools/man/showNonASCII.Rd
@@ -1,5 +1,5 @@
 % File src/library/tools/man/showNonASCII.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 2008-11 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/tools/man/startDynamicHelp.Rd b/src/library/tools/man/startDynamicHelp.Rd
index 71db6bd..08a285b 100644
--- a/src/library/tools/man/startDynamicHelp.Rd
+++ b/src/library/tools/man/startDynamicHelp.Rd
@@ -1,6 +1,6 @@
 % File src/library/tools/man/startDynamicHelp.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 2009-2014 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 2009-2015 R Core Team
 % Distributed under GPL 2 or later
 
 \name{startDynamicHelp}
@@ -18,15 +18,16 @@ startDynamicHelp(start = TRUE)
 }
 \arguments{
   \item{start}{logical: whether to start or shut down the dynamic help
-    system.}
+    system.  If \code{NA}, the server is started if not already running.}
 }
 \details{
   This function starts the internal HTTP server, which runs on the
   loopback interface (\code{127.0.0.1}).  If \code{options("help.ports")}
-  is set to a vector of integer values, \code{startDynamicHelp} will try
+  is set to a vector of non-zero integer values, \code{startDynamicHelp} will try
   those ports in order; otherwise, it tries up to 10 random ports to
   find one not in use.  It can be disabled by setting the environment
-  variable \env{R_DISABLE_HTTPD} to a non-empty value.
+  variable \env{R_DISABLE_HTTPD} to a non-empty value or \code{options("help.ports")}
+  to \code{0}.
 
   \code{startDynamicHelp} is called by functions that need to use the
   server, so would rarely be called directly by a user.
diff --git a/src/library/tools/man/testInstalledPackage.Rd b/src/library/tools/man/testInstalledPackage.Rd
index 8c6a9fa..7bed160 100644
--- a/src/library/tools/man/testInstalledPackage.Rd
+++ b/src/library/tools/man/testInstalledPackage.Rd
@@ -1,11 +1,8 @@
 % File src/library/tools/man/testInstalledPackage.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 2009-2013 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 2009-2014 R Core Team
 % Distributed under GPL 2 or later
 
-\newcommand{\sspace}{\ifelse{latex}{\out{~}}{ }}
-
-
 \name{testInstalledPackage}
 \alias{testInstalledPackage}
 \alias{testInstalledPackages}
@@ -20,14 +17,14 @@
 \usage{
 testInstalledPackage(pkg, lib.loc = NULL, outDir = ".",
                      types = c("examples", "tests", "vignettes"),
-                     srcdir = NULL, Ropts = "")
+                     srcdir = NULL, Ropts = "", ...)
 
 testInstalledPackages(outDir = ".", errorsAreFatal = TRUE,
                       scope = c("both", "base", "recommended"),
                       types = c("examples", "tests", "vignettes"),
-                      srcdir = NULL, Ropts = "")
+                      srcdir = NULL, Ropts = "", ...)
 
-testInstalledBasic(scope = c("basic", "devel", "both"))
+testInstalledBasic(scope = c("basic", "devel", "both", "internet"))
 }
 \arguments{
   \item{pkg}{name of an installed package.}
@@ -43,7 +40,7 @@ testInstalledBasic(scope = c("basic", "devel", "both"))
     passed to \command{R CMD BATCH} when running examples or tests.}
   \item{\dots}{additional arguments use when preparing the files to be
     run, e.g.\sspace{}\code{commentDontrun} and \code{commentDonttest}.}
-  \item{scope}{Which set(s) should be tested?}
+  \item{scope}{Which set(s) should be tested?  Can be abbreviated.}
 }
 \details{
   These tests depend on having the package example files installed (which
diff --git a/src/library/tools/man/texi2dvi.Rd b/src/library/tools/man/texi2dvi.Rd
index 7b00013..38727c9 100644
--- a/src/library/tools/man/texi2dvi.Rd
+++ b/src/library/tools/man/texi2dvi.Rd
@@ -1,17 +1,15 @@
 % File src/library/tools/man/texi2dvi.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2014 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2016 R Core Team
 % Distributed under GPL 2 or later
 
-\newcommand{\sspace}{\ifelse{latex}{\out{~}}{ }}
-
 \name{texi2dvi}
 \alias{texi2dvi}
 \alias{texi2pdf}
 \title{Compile LaTeX Files}
 \description{
-  Run \code{latex} and \code{bibtex} until all cross-references are
-  resolved and create either a dvi or a PDF file.
+  Run \code{latex}/\code{pdflatex}, \code{makeindex} and \code{bibtex}
+  until all cross-references are resolved to create a dvi or a PDF file.
 }
 \usage{
 texi2dvi(file, pdf = FALSE, clean = FALSE, quiet = TRUE,
@@ -23,18 +21,19 @@ texi2pdf(file, clean = FALSE, quiet = TRUE,
          texinputs = NULL, index = TRUE)
 }
 \arguments{
-  \item{file}{character.  Name of LaTeX source file.}
+  \item{file}{character string.  Name of the LaTeX source file.}
   \item{pdf}{logical.  If \code{TRUE}, a PDF file is produced instead of
     the default dvi file (\code{texi2dvi} command line option \option{--pdf}).}
   \item{clean}{logical.  If \code{TRUE}, all auxiliary files created
     during the conversion are removed.}
-  \item{quiet}{logical.  No output unless an error occurs.  Ignored if
-    emulation (see the \code{texi2dvi} argument) is used.}
-  \item{texi2dvi}{character (or \code{NULL}).  Script or program used to
-    compile a TeX file to dvi or PDF, respectively.
-    The default (selected by \code{""} or \code{NULL}) is to look for an
-    executable on the path and otherwise emulate the script with
-    \code{system} calls.}
+  \item{quiet}{logical.  No output unless an error occurs.}
+  \item{texi2dvi}{character string (or \code{NULL}).  Script or program
+    used to compile a TeX file to dvi or PDF. The default (selected
+    by \code{""} or \code{"texi2dvi"} or \code{NULL}) is to look
+    for a program or script named \file{texi2dvi} on the path and
+    otherwise emulate the script with \code{system2} calls (which
+    can be selected by the value \code{"emulation"}).  See also
+    \sQuote{Details}.} 
   \item{texinputs}{\code{NULL} or a character vector of paths to add to
     the LaTeX and bibtex input search paths.}
   \item{index}{logical: should indices be prepared?}
@@ -44,32 +43,59 @@ texi2pdf(file, clean = FALSE, quiet = TRUE,
   \code{texi2dvi(pdf = TRUE)}.
 
   Despite the name, this is used in \R to compile LaTeX files,
-  specifically those generated from vignettes.  It
+  specifically those generated from vignettes and by the
+  \code{\link{Rd2pdf}} script (used for package reference manuals).  It
   ensures that the \file{\var{\link{R_HOME}}/share/texmf} directory is
   in the \env{TEXINPUTS} path, so \R style files such as \file{Sweave}
   and \file{Rd} will be found.  The TeX search path used is first the
   existing \env{TEXINPUTS} setting (or the current directory if unset),
-  then elements of \code{texinputs}, then
-  \file{\var{R_HOME}/share/texmf} and finally the default
-  path.  Analogous changes are made to \env{BIBINPUTS} and
-  \env{BSTINPUTS} settings.
+  then elements of argument \code{texinputs}, then
+  \file{\var{R_HOME}/share/texmf} and finally the default path.
+  Analogous changes are made to \env{BIBINPUTS} and \env{BSTINPUTS}
+  settings.
+
+#ifdef unix
+  The default option for \code{texi2dvi} is set from environment variable
+  \env{R_TEXI2DVICMD}, and the default for that is set from environment
+  variable \env{TEXI2DVI} or if that is unset, from a value chosen when
+  \R is configured.
+  
+  %% issues included not re-running latex in texinfo 6.1 and bashisms in
+  %% the /bin/sh script in <= 6.0.
+  A shell script \command{texi2dvi} is part of GNU's \pkg{texinfo}.
+  Several issues have been seen with released versions, so if yours does
+  not work correctly try \env{R_TEXI2DVICMD=emulation}.
+#endif
+
+#ifdef windows
+  On Windows the option \code{"texi2dvi"} is normally unset.  The MiKTeX
+  command \command{texify.exe} is a suitable choice for \code{texi2dvi},
+  and is tried as from \R 3.2.3 if the argument is blank or \code{NULL}
+  and a program or script \code{texi2dvi} is not found.
 
-  MiKTeX has a \code{texi2dvi} executable but no other Windows TeX
-  installation that we know of does, so emulation is used on
+  MiKTeX had a \code{texi2dvi} executable until Sept 2015, but no other
+  Windows TeX installation that we know of does, so emulation is used on
   e.g.\sspace{}TeXLive installations on Windows.
+#endif
 
   Occasionally indices contain special characters which cause indexing
   to fail (particularly when using the \samp{hyperref} LaTeX package)
   even on valid input.  The argument \code{index = FALSE} is provided to
   allow package manuals to be made when this happens: it uses emulation.
 }
+
 \note{
+  %% configure just looks for a texi2dvi command and does not check its
+  %% version.  Howvever, it is normally distributed with texinfo, and
+  %% that is checked to be >= 5.1.
+  %% The macOS distribution by default installs /usr/local/bin/texi2dvi,
+  %% but that is optional and macOS has /usr/bin/texi2dvi stuck at 4.8.
   There are various versions of the \command{texi2dvi} script on
   Unix-alikes and quite a number of bugs have been seen, some of which
   this \R wrapper works around.
 
   One that was present with \command{texi2dvi} version \code{4.8} (as
-  supplied on OS X) is that it will not work correctly for paths which
+  supplied by macOS) is that it will not work correctly for paths which
   contain spaces, nor if the absolute path to a file would contain
   spaces.
 
@@ -78,8 +104,18 @@ texi2pdf(file, clean = FALSE, quiet = TRUE,
   exist but the other two approaches do not (and may get confused by
   such files).
   
-  Where supported (\command{texi2dvi} 5.x and \command{texify}),
-  option \option{--max-iterations=20} is used to avoid infinite retries.
+  Where supported (\command{texi2dvi} 5.0 and later;
+  \command{texify.exe} from MiKTeX), option \option{--max-iterations=20}
+  is used to avoid infinite retries.
+  
+  The emulation mode supports \code{quiet = TRUE} from \R 3.2.3 only.
+  Currently \code{clean = TRUE} only cleans up in this mode if the
+  conversion was successful---this gives users a chance to examine log
+  files in the event of error.
+  
+  All the approaches should respect the values of environment variables
+  \env{LATEX}, \env{PDFLATEX}, \env{MAKEINDEX} and \env{BIBTEX} for the
+  full paths to the corresponding commands.
 }
 \value{
   Invisible \code{NULL}.  Used for the side effect of creating a dvi or
diff --git a/src/library/tools/man/toHTML.Rd b/src/library/tools/man/toHTML.Rd
index 1710e80..4b595d7 100644
--- a/src/library/tools/man/toHTML.Rd
+++ b/src/library/tools/man/toHTML.Rd
@@ -1,5 +1,5 @@
 % File src/library/tools/man/toHTML.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 2010-1 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/tools/man/toRd.Rd b/src/library/tools/man/toRd.Rd
index dfda931..60e236f 100644
--- a/src/library/tools/man/toRd.Rd
+++ b/src/library/tools/man/toRd.Rd
@@ -1,5 +1,5 @@
 % File src/library/tools/man/toRd.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 2010-1 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/tools/man/toTitleCase.Rd b/src/library/tools/man/toTitleCase.Rd
new file mode 100644
index 0000000..beb8004
--- /dev/null
+++ b/src/library/tools/man/toTitleCase.Rd
@@ -0,0 +1,35 @@
+% File src/library/tools/man/toTitleCase.Rd
+% Part of the R package, https://www.R-project.org
+% Copyright 2015 R Core Team
+% Distributed under GPL 2 or later
+
+\name{toTitleCase}
+\alias{toTitleCase}
+\title{Convert Titles to Title Case}
+\description{
+  Convert a character vector to title case, especially package titles.
+}
+\usage{
+toTitleCase(text)
+}
+\arguments{
+  \item{text}{a character vector.}
+}
+\details{
+  This is intended for English text only.
+
+  No definition of\sQuote{title case} is universally accepted: all agree
+  that \sQuote{principal} words are capitalized and common words like
+  \sQuote{for} are not, but not which words fall into each category.
+
+  Generally words in all capitals are left alone: this implementation
+  knows about conventional mixed-case words such as \sQuote{LaTeX} and
+  \sQuote{OpenBUGS} and a few technical terms which are not usually
+  capitalized such as \sQuote{jar} and \sQuote{xls}.  However, unknown
+  technical terms will be capitalized unless they are single words
+  enclosed in single quotes: names of packages and libraries should be
+  quoted in titles.
+}
+\value{
+  A character vector of the same length as \code{text}, without names.
+}
diff --git a/src/library/tools/man/tools-defunct.Rd b/src/library/tools/man/tools-defunct.Rd
index 0f59972..2eef814 100644
--- a/src/library/tools/man/tools-defunct.Rd
+++ b/src/library/tools/man/tools-defunct.Rd
@@ -1,5 +1,5 @@
 % File src/library/tools/man/tools-defunct.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2013 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/tools/man/tools-deprecated.Rd b/src/library/tools/man/tools-deprecated.Rd
index 18e205d..93711aa 100644
--- a/src/library/tools/man/tools-deprecated.Rd
+++ b/src/library/tools/man/tools-deprecated.Rd
@@ -1,18 +1,61 @@
 % File src/library/tools/man/tools-deprecated.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2007 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2016 R Core Team
 % Distributed under GPL 2 or later
 
 \name{tools-deprecated}
-\alias{tools-deprecated}
 \title{Deprecated Objects in Package \pkg{tools}}
+%------ NOTE:  ../R/tools-deprecated.R   must be synchronized with this!
+\alias{tools-deprecated}
+%------ PLEASE: one \alias{.} for EACH ! (+ one \usage{} & \arguments{} for all)
+\alias{package.dependencies}
+\alias{getDepList}
+\alias{pkgDepends}
+\alias{installFoundDepends}
 \description{
   The functions or variables listed here are provided for compatibility
   with older versions of \R only, and may be defunct as soon as of the
   next release.
 }
-% \usage{
-% }
+%% \usage{%% maybe use  funnname(\dots)   and have only \arguments{ \item{\dots}{} }
+%% }
+\usage{
+package.dependencies(x, check = FALSE,
+                     depLevel = c("Depends", "Imports", "Suggests"))
+
+getDepList(depMtrx, instPkgs, recursive = TRUE, local = TRUE,
+           reduce = TRUE, lib.loc = NULL)
+
+pkgDepends(pkg, recursive = TRUE, local = TRUE, reduce = TRUE,
+           lib.loc = NULL)
+
+installFoundDepends(depPkgList, ...)
+}
+\arguments{
+  \item{x}{A matrix of package descriptions as returned by
+    \code{\link{available.packages}}.}
+  \item{check}{If \code{TRUE}, return logical vector of check results.
+    If \code{FALSE}, return parsed list of dependencies.}
+  \item{depLevel}{Whether to look for \code{Depends} or \code{Suggests}
+    level dependencies.  Can be abbreviated.}
+
+  \item{depMtrx}{a dependency matrix as from \code{\link{package.dependencies}()}.}
+  \item{pkg}{the name of the package}
+  \item{instPkgs}{a matrix specifying all packages installed on the
+    local system, as from \code{installed.packages}}
+  \item{recursive}{whether or not to include indirect dependencies.}
+  \item{local}{whether or not to search only locally}
+  \item{reduce}{whether or not to collapse all sets of dependencies to a
+    minimal value}
+  \item{lib.loc}{what libraries to use when looking for installed
+    packages.  \code{NULL} indicates all library directories in the
+    current \code{.libPaths()}.
+    Note that \code{lib.loc} is not used in \code{getDepList()} and
+    deprecated there.}
+
+  \item{depPkgList}{A \code{Found} element from a \code{pkgDependsList} object}
+  \item{\dots}{Arguments to pass on to \code{\link{install.packages}}}
+}
 \seealso{
   \code{\link{Deprecated}},
   \code{\link{Defunct}}
diff --git a/src/library/tools/man/tools-package.Rd b/src/library/tools/man/tools-package.Rd
index f67baea..a159fcb 100644
--- a/src/library/tools/man/tools-package.Rd
+++ b/src/library/tools/man/tools-package.Rd
@@ -1,5 +1,5 @@
 % File src/library/tools/man/tools-package.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2007 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/tools/man/undoc.Rd b/src/library/tools/man/undoc.Rd
index c1ced7b..6ad76ec 100644
--- a/src/library/tools/man/undoc.Rd
+++ b/src/library/tools/man/undoc.Rd
@@ -1,5 +1,5 @@
 % File src/library/tools/man/undoc.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2007 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/tools/man/update_pkg_po.Rd b/src/library/tools/man/update_pkg_po.Rd
index 759b288..f286432 100644
--- a/src/library/tools/man/update_pkg_po.Rd
+++ b/src/library/tools/man/update_pkg_po.Rd
@@ -1,5 +1,5 @@
 % File src/library/tools/man/update_pkg_po.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 2012-2013 R Core Team
 % Distributed under GPL 2 or later
 
@@ -73,9 +73,9 @@ update_pkg_po(pkgdir, pkg = NULL, version = NULL, copyright, bugs)
   \command{gettext-tools}: \command{xgettext}, \command{msgmerge},
   \command{msgfmt}, \command{msginit} and \command{msgconv}.  These are
   part of most Linux distributions and easily compiled from the sources
-  on Unix-alikes (including OS X).  Pre-compiled versions for
+  on Unix-alikes (including macOS).  Pre-compiled versions for
   Windows are available in
-  \url{http://www.stats.ox.ac.uk/pub/Rtools/goodies/gettext-tools.zip}.
+  \url{https://www.stats.ox.ac.uk/pub/Rtools/goodies/gettext-tools.zip}.
 
   It will probably not work correctly for \code{en at quot} translations
   except in a UTF-8 locale, so these are skipped elsewhere.
diff --git a/src/library/tools/man/vignetteDepends.Rd b/src/library/tools/man/vignetteDepends.Rd
index 787a69e..95a4e4d 100644
--- a/src/library/tools/man/vignetteDepends.Rd
+++ b/src/library/tools/man/vignetteDepends.Rd
@@ -1,6 +1,6 @@
 % File src/library/tools/man/vignetteDepends.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2013 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2015 R Core Team
 % Distributed under GPL 2 or later
 
 \name{vignetteDepends}
@@ -44,9 +44,9 @@ vignetteDepends(vignette, recursive = TRUE, reduce = TRUE,
 }
 \author{ Jeff Gentry }
 \seealso{\code{\link{pkgDepends}}}
-\examples{
-## This may not be installed
+\examples{\donttest{
+## This may not be installed, as it requires lattice
 gridEx <- system.file("doc", "grid.Rnw", package = "grid")
 vignetteDepends(gridEx)
-}
+}}
 \keyword{utilities}
diff --git a/src/library/tools/man/vignetteEngine.Rd b/src/library/tools/man/vignetteEngine.Rd
index f6b187e..f45aa1f 100644
--- a/src/library/tools/man/vignetteEngine.Rd
+++ b/src/library/tools/man/vignetteEngine.Rd
@@ -1,10 +1,8 @@
 % File src/library/tools/man/vignetteEngine.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 2013 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 2013-2016 R Core Team
 % Distributed under GPL 2 or later
 
-\newcommand{\CRANpkg}{\href{http://CRAN.R-project.org/package=#1}{\pkg{#1}}}
-
 \name{vignetteEngine}
 \alias{vignetteEngine}
 \title{Set or Get a Vignette Processing Engine}
@@ -21,7 +19,8 @@ vignetteEngine(name, weave, tangle, pattern = NULL,
 }
 \arguments{
   \item{name}{the name of the engine.}
-  \item{weave}{a function to convert vignette source files to LaTeX output.}
+  \item{weave}{a function to convert vignette source files to PDF/HTML or
+intermediate LaTeX output.}
   \item{tangle}{a function to convert vignette source files to \R code.}
   \item{pattern}{a regular expression pattern for the filenames handled
     by this engine, or \code{NULL} for the default pattern.}
diff --git a/src/library/tools/man/writePACKAGES.Rd b/src/library/tools/man/writePACKAGES.Rd
index d83a153..c029424 100644
--- a/src/library/tools/man/writePACKAGES.Rd
+++ b/src/library/tools/man/writePACKAGES.Rd
@@ -1,30 +1,33 @@
 % File src/library/tools/man/writePACKAGES.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2014 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2017 R Core Team
 % Distributed under GPL 2 or later
 
 \name{write_PACKAGES}
 \alias{write_PACKAGES}
 \title{Generate PACKAGES files}
 \description{
-  Generate \file{PACKAGES} and \file{PACKAGES.gz} files for a
-  repository of source or Mac/Windows binary packages.
+  Generate \file{PACKAGES}, \file{PACKAGES.gz} and \file{PACKAGES.rds}
+  files for a repository of source or Mac/Windows binary packages.
 }
 \usage{
 write_PACKAGES(dir = ".", fields = NULL,
                type = c("source", "mac.binary", "win.binary"),
                verbose = FALSE, unpacked = FALSE, subdirs = FALSE,
-               latestOnly = TRUE, addFiles = FALSE)
+               latestOnly = TRUE, addFiles = FALSE, rds_compress = TRUE)
 }
 \arguments{
   \item{dir}{Character vector describing the location of the repository
     (directory including source or binary packages) to generate the
-    \file{PACKAGES} and \file{PACKAGES.gz} files from and write them to.
+    \file{PACKAGES}, \file{PACKAGES.gz} and \file{PACKAGES.rds} files
+    from and write them to.
   }
   \item{fields}{
     a character vector giving the fields to be used in the
-    \file{PACKAGES} and \file{PACKAGES.gz} files in addition to the
-    default ones, or \code{NULL} (default).  The default corresponds to
+    \file{PACKAGES}, \file{PACKAGES.gz} and \file{PACKAGES.rds} files in
+    addition to the default ones, or \code{NULL} (default).
+
+    The default corresponds to
     the fields needed by \code{\link{available.packages}}:
     \code{"Package"}, \code{"Version"}, \code{"Priority"},
     \code{"Depends"}, \code{"Imports"}, \code{"LinkingTo"},
@@ -37,7 +40,7 @@ write_PACKAGES(dir = ".", fields = NULL,
   }
   \item{type}{
     Type of packages: currently source \file{.tar.\{gz,bz2,xz\}} archives,
-    and OS X or Windows binary (\file{.tgz} or \file{.zip},
+    and macOS or Windows binary (\file{.tgz} or \file{.zip},
     respectively) packages are supported.  Defaults to
     \code{"win.binary"} on Windows and to \code{"source"} otherwise.
   }
@@ -52,12 +55,16 @@ write_PACKAGES(dir = ".", fields = NULL,
     available should only the latest version be included?}
   \item{addFiles}{logical: should the filenames be included as field
     \samp{File} in the \file{PACKAGES} file.}
+  \item{rds_compress}{The type of compression to be used for
+    \file{PACKAGES.rds}: see \code{\link{saveRDS}}.}
 }
 \details{
   \code{write_PACKAGES} scans the named directory for R packages,
   extracts information from each package's \file{DESCRIPTION} file, and
-  writes this information into the \file{PACKAGES} and
-  \file{PACKAGES.gz} files.
+  writes this information into the \file{PACKAGES}, \file{PACKAGES.gz}
+  and \file{PACKAGES.rds} files, where the first two represent the
+  information in DCF format, and the third serializes it via
+  \code{\link{saveRDS}}.
 
   Including non-latest versions of packages is only useful if they have
   less constraining version requirements, so for example
@@ -67,22 +74,28 @@ write_PACKAGES(dir = ".", fields = NULL,
 
   Support for repositories with subdirectories and hence for
   \code{subdirs != FALSE} depends on recording a \code{"Path"} field in
-  the \file{PACKAGES} file.
+  the \file{PACKAGES} files.
 
   Support for more general file names (e.g., other types of compression)
-  \emph{via} a \code{"File"} field in the \file{PACKAGES} file can be
+  \emph{via} a \code{"File"} field in the \file{PACKAGES} files can be
   used by \code{\link{download.packages}}.  If the file names are not of
   the standard form, use \code{addFiles = TRUE}.
 
   \code{type = "win.binary"} uses \code{\link{unz}} connections to read
   all \file{DESCRIPTION} files contained in the (zipped) binary packages
   for Windows in the given directory \code{dir}, and builds files
-  \file{PACKAGES} and \file{PACKAGES.gz} files from this information.
+  \file{PACKAGES}, \file{PACKAGES.gz} and \file{PACKAGES.rds} files from
+  this information.
+
+  For a remote repository there is a tradeoff between download speed and
+  time spent by \code{\link{available.packages}} processing the
+  downloaded file(s).  For large repositories it is likely to be
+  beneficial to use \code{rds_compress = "xz"}.
 }
 \value{
   Invisibly returns the number of packages described in the resulting
-  \file{PACKAGES} and \file{PACKAGES.gz} files.  If \code{0}, no
-  packages were found and no files were written.
+  \file{PACKAGES}, \file{PACKAGES.gz} and \file{PACKAGES.rds} files.  If
+  \code{0}, no packages were found and no files were written.
 }
 \note{
   Processing \file{.tar.gz} archives to extract the \file{DESCRIPTION}
diff --git a/src/library/tools/man/xgettext.Rd b/src/library/tools/man/xgettext.Rd
index e35965f..59c1265 100644
--- a/src/library/tools/man/xgettext.Rd
+++ b/src/library/tools/man/xgettext.Rd
@@ -1,6 +1,6 @@
 % File src/library/tools/man/xgettext.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2012 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2014 R Core Team
 % Distributed under GPL 2 or later
 
 \name{xgettext}
diff --git a/src/library/tools/po/R-da.po b/src/library/tools/po/R-da.po
index 678c33b..c4735c8 100644
--- a/src/library/tools/po/R-da.po
+++ b/src/library/tools/po/R-da.po
@@ -2,7 +2,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: R 3.0.0\n"
 "Report-Msgid-Bugs-To: bugs.r-project.org\n"
-"POT-Creation-Date: 2014-01-26 09:09\n"
+"POT-Creation-Date: 2016-04-01 09:50\n"
 "PO-Revision-Date: 2012-01-07 22:11+0200\n"
 "Last-Translator: Joe <joedalton2 at yahoo.dk>\n"
 "Language-Team: LANGUAGE <LL at li.org>\n"
@@ -13,6 +13,12 @@ msgstr ""
 "Plural-Forms: nplurals=2; plural=(n != 1);\n"
 "X-Generator: Pootle 2.1.6\n"
 
+msgid "Checking %s"
+msgstr ""
+
+msgid "Processing %s ..."
+msgstr ""
+
 msgid "argument 'package' must be of length 1"
 msgstr "argument »package« skal være af længde 1"
 
@@ -231,9 +237,15 @@ msgid ""
 "already be known to R."
 msgstr ""
 
+msgid "Malformed Title field: should not end in a period."
+msgstr ""
+
 msgid ""
-"See the information on DESCRIPTION files in section 'Creating R packages' of "
-"the 'Writing R Extensions' manual."
+"Malformed Description field: should contain one or more complete sentences."
+msgstr ""
+
+msgid ""
+"See section 'The DESCRIPTION file' in the 'Writing R Extensions' manual."
 msgstr ""
 
 msgid "Malformed Authors at R field:"
@@ -251,7 +263,12 @@ msgstr ""
 msgid "Cannot extract Maintainer field from Authors at R field:"
 msgstr ""
 
-msgid "Authors at R field gives no person with maintainer role and email address."
+msgid "Authors at R field gives more than one person with maintainer role:"
+msgstr ""
+
+msgid ""
+"Authors at R field gives no person with maintainer role, valid email address "
+"and non-empty name."
 msgstr ""
 
 msgid "Encoding '%s' is not portable"
@@ -296,9 +313,7 @@ msgstr ""
 msgid "Missing link or links in documentation object '%s':"
 msgstr "Tildelinger i \\usage i dokumentationsobjekt »%s«:"
 
-msgid ""
-"See the information in section 'Cross-references' of the 'Writing R "
-"Extensions' manual."
+msgid "See section 'Cross-references' in the 'Writing R Extensions' manual."
 msgstr ""
 
 msgid "File %s:"
@@ -328,8 +343,7 @@ msgid "See section %s in '%s'."
 msgstr ""
 
 msgid ""
-"Package detach functions should have one arguments with names starting with "
-"%s."
+"Package detach functions should have one argument with name starting with %s."
 msgstr ""
 
 msgid "Package detach functions should not call %s."
@@ -356,6 +370,12 @@ msgstr ""
 msgid "'library' or 'require' call not declared from: %s"
 msgstr ""
 
+msgid "'loadNamespace' or 'requireNamespace' calls not declared from:"
+msgstr ""
+
+msgid "'loadNamespace' or 'requireNamespace' call not declared from: %s"
+msgstr ""
+
 msgid "'library' or 'require' calls to packages already attached by Depends:"
 msgstr ""
 
@@ -363,6 +383,12 @@ msgid ""
 "'library' or 'require' call to %s which was already attached by Depends."
 msgstr ""
 
+msgid "'library' or 'require' calls in package code:"
+msgstr ""
+
+msgid "'library' or 'require' call to %s in package code."
+msgstr ""
+
 msgid "Namespaces in Imports field not imported from:"
 msgstr ""
 
@@ -441,7 +467,7 @@ msgid ""
 "in NAMESPACE."
 msgstr ""
 
-msgid "argument 'file' must be a character string or connection"
+msgid "Rd object required"
 msgstr ""
 
 msgid "missing/empty %s field in '%s'"
@@ -471,6 +497,15 @@ msgstr ""
 msgid "No help on %s found in RdDB %s"
 msgstr ""
 
+msgid "'macros' must be TRUE or must specify existing macros"
+msgstr ""
+
+msgid "Macro file %s should only contain Rd macro definitions and comments"
+msgstr ""
+
+msgid "No Rd macros in package '%s'."
+msgstr ""
+
 msgid "more than one \\examples section, using the first"
 msgstr ""
 
@@ -510,6 +545,9 @@ msgstr ""
 msgid "Only one Rd section per %s is supported."
 msgstr ""
 
+msgid "DESCRIPTION file is for package '%s', not '%s'"
+msgstr ""
+
 msgid "Vignette product %s does not have a known filename extension (%s)"
 msgstr ""
 
@@ -527,6 +565,9 @@ msgstr ""
 msgid "unable to create temp directory %s"
 msgstr "kan ikke oprette"
 
+msgid "Vignette '%s' is non-ASCII but has no declared encoding"
+msgstr ""
+
 msgid "Running"
 msgstr ""
 
@@ -557,12 +598,6 @@ msgstr ""
 msgid "vignette filename '%s' does not match any of the '%s' filename patterns"
 msgstr ""
 
-msgid "Inconsistent encoding specifications:"
-msgstr ""
-
-msgid "with %\\SweaveUTF8"
-msgstr ""
-
 msgid "In '%s' vignettes '%s' and '%s' have the same vignette name"
 msgstr ""
 
@@ -666,12 +701,6 @@ msgstr ""
 msgid "assertConditon: Successfully caught a condition"
 msgstr ""
 
-msgid "assertCondition: caught %s"
-msgstr ""
-
-msgid ","
-msgstr ""
-
 msgid "Got %s in evaluating %s; wanted %s"
 msgstr ""
 
@@ -736,9 +765,6 @@ msgstr ""
 msgid "downloading %s ..."
 msgstr ""
 
-msgid "installing dependencies %s"
-msgstr ""
-
 msgid "checking %s ..."
 msgstr ""
 
@@ -778,6 +804,9 @@ msgstr ""
 msgid "No docs found for package %s"
 msgstr ""
 
+msgid "URL %s was not found"
+msgstr ""
+
 msgid ""
 "Only help files, %s, %s and files under %s and %s in a package can be viewed"
 msgstr ""
@@ -785,9 +814,6 @@ msgstr ""
 msgid "unsupported URL %s"
 msgstr ""
 
-msgid "URL %s was not found"
-msgstr ""
-
 msgid "httpd server disabled by R_DISABLE_HTTPD"
 msgstr ""
 
@@ -846,6 +872,9 @@ msgstr ""
 msgid "empty 'data' directory"
 msgstr ""
 
+msgid "cannot create unique directory for build"
+msgstr ""
+
 msgid "cannot create temporary directory"
 msgstr ""
 
@@ -867,6 +896,12 @@ msgstr ""
 msgid "building a fake installation is disallowed"
 msgstr ""
 
+msgid ""
+"See\n"
+"  %s\n"
+"for details."
+msgstr ""
+
 msgid "there is no package called '%s'"
 msgstr ""
 
@@ -902,6 +937,12 @@ msgid ""
 "%s"
 msgstr ""
 
+msgid "DESCRIPTION file not found"
+msgstr ""
+
+msgid "NEWS file not found"
+msgstr ""
+
 msgid "No news found in given file using old-style R-like format."
 msgstr ""
 
@@ -919,9 +960,6 @@ msgstr ""
 msgid "Cannot extract version info from the following section titles:"
 msgstr ""
 
-msgid "%s"
-msgstr ""
-
 msgid ""
 "Malformed NEWS.Rd file:\n"
 "Chunk starting\n"
@@ -940,6 +978,11 @@ msgstr ""
 msgid "Processing packages:"
 msgstr ""
 
+msgid ""
+"reading DESCRIPTION for package %s failed with message:\n"
+"  %s"
+msgstr ""
+
 msgid "%s must be a character string or a file/raw connection"
 msgstr ""
 
@@ -1024,6 +1067,9 @@ msgstr ""
 msgid "package '%s' was not found"
 msgstr ""
 
+msgid "the 'lib.loc' argument has always been unused and is deprecated now"
+msgstr ""
+
 msgid "bad operand"
 msgstr ""
 
@@ -1042,9 +1088,6 @@ msgstr ""
 msgid "testing '%s' failed"
 msgstr ""
 
-msgid "%d of the package tests failed"
-msgstr ""
-
 msgid "Testing examples for package %s"
 msgstr ""
 
@@ -1114,10 +1157,7 @@ msgstr ""
 msgid "unable to run %s on '%s'"
 msgstr ""
 
-msgid "cannot coerce"
-msgstr ""
-
-msgid "to logical"
+msgid "cannot coerce %s to logical"
 msgstr ""
 
 msgid "File 'DESCRIPTION' is missing."
@@ -1144,6 +1184,9 @@ msgstr ""
 msgid "Call sequence:"
 msgstr ""
 
+msgid "'text' must be a character vector"
+msgstr ""
+
 msgid "parsing '%s'"
 msgstr ""
 
@@ -1287,6 +1330,11 @@ msgid_plural "objects %s are created by more than one data call"
 msgstr[0] ""
 msgstr[1] ""
 
+msgid "%d of the package tests failed"
+msgid_plural "%d of the package tests failed"
+msgstr[0] ""
+msgstr[1] ""
+
 #, fuzzy
 #~ msgid "Failed to locate the"
 #~ msgstr "kan ikke oprette"
diff --git a/src/library/tools/po/R-de.po b/src/library/tools/po/R-de.po
index 9ffa536..f20dd5e 100644
--- a/src/library/tools/po/R-de.po
+++ b/src/library/tools/po/R-de.po
@@ -4,18 +4,22 @@
 # Detlef Steuer <steuer at hsu-hh.de>, 2008-2014.
 msgid ""
 msgstr ""
-"Project-Id-Version: R-3.1.0\n"
+"Project-Id-Version: R-3.3.0\n"
 "Report-Msgid-Bugs-To: bugs.r-project.org\n"
-"POT-Creation-Date: 2014-01-26 09:09\n"
-"PO-Revision-Date: 2014-03-16 16:00+0100\n"
+"POT-Creation-Date: 2015-06-06 13:51\n"
+"PO-Revision-Date: 2016-04-08 12:38+0200\n"
 "Last-Translator: Detlef Steuer <steuer at hsu-hh.de>\n"
 "Language-Team: R Core <r-core at r-project.org>\n"
-"Language: \n"
+"Language: de\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
+"\n"
 "Plural-Forms: nplurals=2; plural=n == 1 ? 0 : 1;\n"
 
+msgid "Checking %s"
+msgstr "Überprüfe %s"
+
 msgid "argument 'package' must be of length 1"
 msgstr "Argument 'package' muss Länge 1 haben"
 
@@ -55,17 +59,18 @@ msgstr "Verzeichnis '%s' enthält keine Rd-Objekte"
 msgid ""
 "Functions or methods with usage in documentation object '%s' but not in code:"
 msgstr ""
-"Funktionen bzw. Methoden mit Anleitung im Dokuobjekt '%s' jedoch nicht im "
-"Code"
+"Funktionen bzw. Methoden mit Anleitung im Dokumentations-Objekt '%s' jedoch "
+"nicht im Code"
 
 msgid "Data with usage in documentation object '%s' but not in code:"
-msgstr "Datensätze mit Anleitung im Dokuobjekt '%s', jedoch nicht im Code"
+msgstr ""
+"Datensätze mit Anleitung im Dokumentations-Objekt '%s', jedoch nicht im Code"
 
 msgid "Argument names in code not in docs:"
-msgstr "Argumentnamen im Code (ohne Doku):"
+msgstr "Argumentnamen im Code (nicht in der Dokumentation):"
 
 msgid "Argument names in docs not in code:"
-msgstr "Argumentnamen in Doku (ohne Code):"
+msgstr "Argumentnamen in Dokumentation (nicht im  Code):"
 
 msgid "Mismatches in argument names (first 3):"
 msgstr "Nichtpassende Argumentnamen (die ersten 3):"
@@ -74,53 +79,54 @@ msgid "Mismatches in argument names:"
 msgstr "Nichtpassende Argumentnamen:"
 
 msgid "Mismatches in argument default values (first 3):"
-msgstr "Unpassende Standardargumente (<die ersten 3):"
+msgstr "Unpassende Standardargumente (die ersten 3):"
 
 msgid "Mismatches in argument default values:"
 msgstr "Unpassende Standardargumente"
 
 msgid "Codoc mismatches from documentation object '%s':"
-msgstr "Unpassende Kodierung aus dem Dokuobjekt '%s'"
+msgstr "Unpassende Kodierung aus dem Dokumentations-Objekt '%s'"
 
 msgid "Code: %s"
 msgstr "Code: %s"
 
 msgid "Docs: %s"
-msgstr "Doku: %s"
+msgstr "Dokumentation: %s"
 
 msgid "S4 class codoc mismatches from documentation object '%s':"
-msgstr "S4 Klassendoku passt nicht zum Dokuobjekt '%s':"
+msgstr "S4 Klassendokumentation passt nicht zum Dokumentations-Objekt '%s':"
 
 msgid "Slots for class '%s'"
 msgstr "Slots für Klasse '%s'"
 
 msgid "Data codoc mismatches from documentation object '%s':"
-msgstr "Datendoku passt nicht zum Dokuobjekt '%s':"
+msgstr "Datendokumentation passt nicht zum Dokumentations-Objekt '%s':"
 
 msgid "Variables in data frame '%s'"
 msgstr "Variablen im Dataframe '%s'"
 
 msgid "Undocumented arguments in documentation object '%s'"
-msgstr "Undokumentierte Argumente im Dokuobjekt '%s'"
+msgstr "Undokumentierte Argumente im Dokumentations-Objekt '%s'"
 
 msgid "Duplicated \\argument entries in documentation object '%s':"
-msgstr "Doppelte Einträge zu \\argument im Dokuobjekt '%s'"
+msgstr "Doppelte Einträge zu \\argument im Dokumentations-Objekt '%s'"
 
 msgid "Documented arguments not in \\usage in documentation object '%s':"
 msgstr "Dokumentierte Objekte kommen in \\usage des Dokuobjekts '%s' nicht vor"
 
 msgid "Objects in \\usage without \\alias in documentation object '%s':"
 msgstr ""
-"Objekte kommen bei \\usage, aber nicht unter \\alias im Dokuobjekt '%s' vor"
+"Objekte kommen bei \\usage, aber nicht unter \\alias im Dokumentations-"
+"Objekt '%s' vor"
 
 msgid "Assignments in \\usage in documentation object '%s':"
-msgstr "Zuweisungen in \\\\usage im Dokumentationsobjekt '%s':"
+msgstr "Zuweisungen in \\usage im Dokumentations-Objekt '%s':"
 
 msgid "Bad \\usage lines found in documentation object '%s':"
-msgstr "Ungültige \\usage Zeile im Dokuobjekt '%s' gefunden:"
+msgstr "Ungültige \\usage Zeile im Dokumentations-Objekt '%s' gefunden:"
 
 msgid "S3 methods shown with full name in documentation object '%s':"
-msgstr "S3 Methoden mit vollem Namen im Dokuobjekt '%s' gezeigt: "
+msgstr "S3 Methoden mit vollem Namen im Dokumentations-Objekt '%s' gezeigt: "
 
 msgid "you must specify 'package', 'dir' or 'file'"
 msgstr "sie müssen 'package', 'dir' oder 'file' angeben"
@@ -183,7 +189,7 @@ msgid "These fields must have ASCII values."
 msgstr "Diese Felder müssen ASCII Werte haben."
 
 msgid "Malformed package version."
-msgstr "Falsch formatierte 'paket version'."
+msgstr "Falsch formatierte 'package version'."
 
 msgid "Malformed maintainer field."
 msgstr "Falsch formatiertes 'maintainer' Feld"
@@ -204,7 +210,7 @@ msgstr ""
 "Leerraum, sowie einer gültigen Versionsnummer in Klammern "
 
 msgid "Entries with infeasible comparison operator:"
-msgstr "Einträgen mit falschen Vergleichsoperator:"
+msgstr "Einträge mit falschem Vergleichsoperator:"
 
 msgid "Only operators '<=' and '>=' are possible."
 msgstr "Nur die Operatoren '<=' und '>=' sind zulässig."
@@ -225,7 +231,8 @@ msgstr "Unzulässiges Feld für VignetteBuilder"
 msgid ""
 "This field must contain one or more packages (and no version requirement)."
 msgstr ""
-"Dieses Feld muss ein oder mehrer Pakete enthalten (und keine Versionsanforderungen)."
+"Dieses Feld muss ein oder mehrer Pakete enthalten (und keine "
+"Versionsanforderungen)."
 
 msgid "Invalid Priority field."
 msgstr "Unzulässiges Feld für 'Priority'"
@@ -237,12 +244,20 @@ msgstr ""
 "Pakete mit Prioritäten 'base', 'recommended' oder 'defunct-base' müssen R "
 "bereits bekannt sein"
 
+msgid "Malformed Title field: should not end in a period."
+msgstr "Schlecht formatiertes Title Feld: Sollte nicht mit einem Punkt enden"
+
+msgid ""
+"Malformed Description field: should contain one or more complete sentences."
+msgstr ""
+"Schlecht formatiertes Description Feld: sollte einen oder mehrere\n"
+"vollständige Sätze enthalten."
+
 msgid ""
-"See the information on DESCRIPTION files in section 'Creating R packages' of "
-"the 'Writing R Extensions' manual."
+"See section 'The DESCRIPTION file' in the 'Writing R Extensions' manual."
 msgstr ""
-"Information über DESCRIPTION Dateien finden sie im Abschnitt 'Creating R "
-"packages' im 'Writing R Extension' Handbuch"
+"Bitte im Abschnitt 'The DESCRIPTION file' im 'Writing R Extension'\n"
+"Handbuch nachlesen"
 
 msgid "Malformed Authors at R field:"
 msgstr "Falsch formatiertes Authors at R Feld:"
@@ -259,9 +274,15 @@ msgstr "Das Authors at R Feld enthält Personen ohne gültige Rolle."
 msgid "Cannot extract Maintainer field from Authors at R field:"
 msgstr "Kann kein Maintainer Feld aus dem Authors at R Feld extrahieren:"
 
-msgid "Authors at R field gives no person with maintainer role and email address."
+msgid "Authors at R field gives more than one person with maintainer role:"
+msgstr "Das Authors at R Feld enthält mehr als eine Person"
+
+msgid ""
+"Authors at R field gives no person with maintainer role, valid email address "
+"and non-empty name."
 msgstr ""
-"Das Authors at R Feld enthält keine Person als Maintainer mit email Adresse."
+"Das Authors at R Feld enthält keine Person als Maintainer mit zulässiger\n"
+"Mailadresse und nicht-leerem Namen"
 
 msgid "Encoding '%s' is not portable"
 msgstr "Kodierung '%s' ist nicht portabel"
@@ -304,13 +325,11 @@ msgstr ""
 "Querverweise nicht überprüft werden können"
 
 msgid "Missing link or links in documentation object '%s':"
-msgstr "Fehlende(r) Link(s) im Dokuobjekt '%s':"
+msgstr "Fehlende(r) Link(s) im Dokumentations-Objekt '%s':"
 
-msgid ""
-"See the information in section 'Cross-references' of the 'Writing R "
-"Extensions' manual."
+msgid "See section 'Cross-references' in the 'Writing R Extensions' manual."
 msgstr ""
-"Bitte im 'Writing R Extensions' Handbuch im Abschnitt über Kreuzreferenzen "
+"Bitte im Abschnitt \"Cross-references\" im 'Writing R Extensions' Handbuch "
 "nachsehen!"
 
 msgid "File %s:"
@@ -343,14 +362,13 @@ msgid "See section %s in '%s'."
 msgstr "Siehe Abschnitt %s in '%s'."
 
 msgid ""
-"Package detach functions should have one arguments with names starting with "
-"%s."
+"Package detach functions should have one argument with name starting with %s."
 msgstr ""
-"Detachfuktion für Pakete sollte ein Argumente haben, deren Namen\n"
-"mit %s beginnen."
+"Detach-Funktion für Pakete sollte ein Argument haben, dessen Name mit %s "
+"beginnt."
 
 msgid "Package detach functions should not call %s."
-msgstr "Detachfunktion für Pakete sollten nicht %s aufrufen."
+msgstr "Detach-Funktion für Pakete sollten nicht %s aufrufen."
 
 msgid "unable to create"
 msgstr "kann nicht erzeugen"
@@ -373,12 +391,29 @@ msgstr "Aufrufe von 'library' oder 'require' nicht angemeldet von:"
 msgid "'library' or 'require' call not declared from: %s"
 msgstr "Aufrufe von 'library' oder 'require' nicht angemeldet von: %s"
 
+msgid "'loadNamespace' or 'requireNamespace' calls not declared from:"
+msgstr ""
+"Aufrufe von 'loadNamespace' oder 'requireNamespace' nicht angemeldet von:"
+
+msgid "'loadNamespace' or 'requireNamespace' call not declared from: %s"
+msgstr ""
+"Aufrufe von 'loadNamespace' oder 'requireNamespace' nicht angemeldet von: %s"
+
 msgid "'library' or 'require' calls to packages already attached by Depends:"
-msgstr "Aufrufe von 'library' oder 'require' für Pakete bereits mit Depends geladen:"
+msgstr ""
+"Aufrufe von 'library' oder 'require' für Pakete bereits mit Depends geladen:"
 
 msgid ""
 "'library' or 'require' call to %s which was already attached by Depends."
-msgstr "Aufruf von 'library' oder 'require'  für %s, ist aber bereits mit Depends geladen."
+msgstr ""
+"Aufruf von 'library' oder 'require'  für %s, ist aber bereits mit Depends "
+"geladen."
+
+msgid "'library' or 'require' calls in package code:"
+msgstr "Aufrufe von 'library' oder 'require' im Paket-Code:"
+
+msgid "'library' or 'require' call to %s in package code."
+msgstr "Aufrufe von 'library' oder 'require' für %s in Paket-Code"
 
 msgid "Namespaces in Imports field not imported from:"
 msgstr "Namensräume im Imports Feld nicht importiert aus:"
@@ -429,7 +464,7 @@ msgid "'data(package=)' call not declared from: %s"
 msgstr "Aufruf von 'data(package=' nicht angemeldet von: %s"
 
 msgid "Package has no 'Version' field"
-msgstr "Paket  hat kein 'Version' Feld"
+msgstr "Paket hat kein Feld 'Version'"
 
 msgid "NB: need Internet access to use CRAN incoming checks"
 msgstr "NB: benötige Internetzugang, um CRAN-Incoming zu checken"
@@ -463,8 +498,8 @@ msgstr ""
 "%s\n"
 "in NAMESPACE."
 
-msgid "argument 'file' must be a character string or connection"
-msgstr "Argument 'file' muss eine Zeichenkette oder eine Verbindung sein"
+msgid "Rd object required"
+msgstr "Rd Objekt nötig"
 
 msgid "missing/empty %s field in '%s'"
 msgstr "fehlendes oder leeres %s Feld in '%s'"
@@ -494,6 +529,16 @@ msgstr "kann mit Rd Objekten mit fehlendem bzw. leerem Namen nicht umgehen"
 msgid "No help on %s found in RdDB %s"
 msgstr "Keine Hilfe zu %s in RdDB %s gefunden"
 
+msgid "'macros' must be TRUE or must specify existing macros"
+msgstr ""
+"'macros' muss entweder TRUE sein oder ein existierendes Makro spezifizieren"
+
+msgid "Macro file %s should only contain Rd macro definitions and comments"
+msgstr "Makrodatei %s sollte nur Rd Makrodefinitionen und Kommentare enthalten"
+
+msgid "No Rd macros in package '%s'."
+msgstr "Keine Rd Makros in Paket '%s'"
+
 msgid "more than one \\examples section, using the first"
 msgstr "mehr als eine \\examples section, benutze die erste"
 
@@ -533,26 +578,32 @@ msgstr "Ungültiger Wert für '%s' : %s"
 msgid "Only one Rd section per %s is supported."
 msgstr "Nur ein Rd Abschnitt pro %s wird unterstützt"
 
+msgid "DESCRIPTION file is for package '%s', not '%s'"
+msgstr "DESCRIPTION Datei ist für Paket '%s', nicht für '%s'"
+
 msgid "Vignette product %s does not have a known filename extension (%s)"
-msgstr "Vignettenprodukt %s hat keine bekannte Dateinamenserweiterung (%s)"
+msgstr "Vignetten-Ergebnis %s hat keine bekannte Dateinamenserweiterung (%s)"
 
 msgid ""
 "Failed to locate the %s output file (by engine %s) for vignette with name "
 "%s. The following files exist in directory %s: %s"
 msgstr ""
-"Konnte %s Ausgabedadatei (von Treiber %s) für Vignette namens"
-"%s nicht finden. Folgende Dateien exisitieren im Verzeichnis %s: %s"
+"Konnte %s Ausgabedadatei (von Treiber %s) für Vignette namens %s nicht "
+"finden. Folgende Dateien existieren im Verzeichnis %s: %s"
 
 msgid ""
 "Located more than one %s output file (by engine %s) for vignette with name "
 "%s: %s"
 msgstr ""
-"Mehr als eine %s Ausgabedatei (von Treiber %s) für Vignette namens"
-"%s gefunden: %s"
+"Mehr als eine %s Ausgabedatei (von Treiber %s) für Vignette namens %s "
+"gefunden: %s"
 
 msgid "unable to create temp directory %s"
 msgstr "kann temporäres Verzeichnis %s nicht erzeugen"
 
+msgid "Vignette '%s' is non-ASCII but has no declared encoding"
+msgstr "Vignette '%s' ist nicht-ASCII aber deklariert kein Enkoding"
+
 msgid "Running"
 msgstr "Ausführen"
 
@@ -563,8 +614,8 @@ msgid ""
 "Detected vignette source files (%s) with shared names (%s) and therefore "
 "risking overwriting each others output files"
 msgstr ""
-"Vignettenquelldateien (%s) mit gemeinsamen Namen (%s) entdeckt, weshalb die"
-"Gefahr gegenseitigen Überschreibens besteht" 
+"Vignetten-Quelldateien (%s) mit gemeinsamen Namen (%s) entdeckt, weshalb die "
+"Gefahr gegenseitigen Überschreibens besteht"
 
 msgid ""
 "processing vignette '%s' failed with diagnostics:\n"
@@ -587,34 +638,29 @@ msgid "file '%s' not found"
 msgstr "Datei '%s' nicht gefunden"
 
 msgid "vignette filename '%s' does not match any of the '%s' filename patterns"
-msgstr "Vignettendateiname '%s' passt zu keinem der %s' Dateinamenmuster"
-
-msgid "Inconsistent encoding specifications:"
-msgstr "Inkonsistente Kodierungsspezifikationen:"
-
-msgid "with %\\SweaveUTF8"
-msgstr "with %\\SweaveUTF8"
+msgstr "Vignetten-Dateiname '%s' passt zu keinem der %s' Dateinamenmuster"
 
 msgid "In '%s' vignettes '%s' and '%s' have the same vignette name"
-msgstr "In '%s' Vignetten '%s' und '%s' haben denselben Vignettennamen"
+msgstr "In '%s' Vignetten '%s' und '%s' haben denselben Vignetten-Namen"
 
 msgid "argument 'vignette' must be of length 1"
 msgstr "Argument 'vignette' muss Länge 1 haben"
 
 msgid "Vignette engine package not specified"
-msgstr "Vignettentreiberpaket nicht angegeben"
+msgstr "Vignetten-Treiberpaket nicht angegeben"
 
 msgid "Unsupported engine name"
 msgstr "nicht unterstützter Engine Name"
 
 msgid "None of packages %s have registered vignette engines"
-msgstr "Keines der Pakete %s hat Vignettentreiber registriert"
+msgstr "Keines der Pakete %s hat Vignetten-Treiber registriert"
 
 msgid "Vignette engine %s is not registered"
-msgstr "Vignettentreiber %s ist nicht registiert"
+msgstr "Vignetten-Treiber %s ist nicht registiert"
 
 msgid "Vignette engine %s is not registered by any of the packages %s"
-msgstr "Vignettentreiber %s ist nicht von irgendeinem der Pakete %s registriert"
+msgstr ""
+"Vignetten-Treiber %s ist nicht von irgendeinem der Pakete %s registriert"
 
 msgid "Engine name %s and package %s do not match"
 msgstr "Treibername %s und Paket %s passen nicht "
@@ -626,7 +672,8 @@ msgid "Argument %s must be a character vector or NULL and not %s"
 msgstr "Argument %s muss eine Zeichenkette oder NULL sein, aber nicht %s"
 
 msgid "Cannot change the %s engine or use an engine of that name"
-msgstr "Kann den %s Treiber nicht wechseln oder einen Treiber dieses Namens nutzen"
+msgstr ""
+"Kann den %s Treiber nicht wechseln oder einen Treiber dieses Namens nutzen"
 
 msgid "vignette builder '%s' not found"
 msgstr "Vignetten-Erzeuger '%s' nicht gefunden"
@@ -651,7 +698,7 @@ msgid "duplicated files in '%s' field:"
 msgstr "doppelte Dateien in Feld '%s':"
 
 msgid "files in '%s' field missing from '%s':"
-msgstr "fehlende  Dateien im '%s' Feld von '%s':"
+msgstr "fehlende Dateien im '%s' Feld von '%s':"
 
 msgid "files in '%s' missing from '%s' field:"
 msgstr "fehlende Dateien in '%s' im Feld '%s':"
@@ -701,12 +748,6 @@ msgstr "Laden fehlgeschlagen"
 msgid "assertConditon: Successfully caught a condition"
 msgstr "assertCondition: Erfolgreich eine Bedingung abgefangen"
 
-msgid "assertCondition: caught %s"
-msgstr "assertCondition: %s abgefangen"
-
-msgid ","
-msgstr ","
-
 msgid "Got %s in evaluating %s; wanted %s"
 msgstr "Erhielt %s bei der Auswertung von %s: wollte %s"
 
@@ -756,7 +797,7 @@ msgid "Error: no packages were specified"
 msgstr "Fehler: keine Pakete angegeben"
 
 msgid "ERROR: cannot create check dir %s"
-msgstr "Fehler: kann  Verzeichnis %s für Check nicht erzeugen"
+msgstr "Fehler: kann Verzeichnis %s für Check nicht erzeugen"
 
 msgid "package directory %s does not exist"
 msgstr "Paketverzeichnis '%s' existiert nicht"
@@ -770,9 +811,6 @@ msgstr "lade umgekehrte Abhängikeiten herunter ..."
 msgid "downloading %s ..."
 msgstr "Herunterladen von %s ..."
 
-msgid "installing dependencies %s"
-msgstr "installiere Abhängigkeiten %s"
-
 msgid "checking %s ..."
 msgstr "überprüfe %s ..."
 
@@ -813,6 +851,9 @@ msgstr "Link %s konnte im Paket %s nicht gefunden werden"
 msgid "No docs found for package %s"
 msgstr "Keine Dokumente zu Paket %s gefunden"
 
+msgid "URL %s was not found"
+msgstr "URL '%s' nicht gefunden"
+
 msgid ""
 "Only help files, %s, %s and files under %s and %s in a package can be viewed"
 msgstr ""
@@ -822,9 +863,6 @@ msgstr ""
 msgid "unsupported URL %s"
 msgstr "nicht unterstützte URL %s"
 
-msgid "URL %s was not found"
-msgstr "URL '%s' nicht gefunden"
-
 msgid "httpd server disabled by R_DISABLE_HTTPD"
 msgstr "httpd_server durch R_DISABLE_HTTPD verhindert"
 
@@ -853,7 +891,7 @@ msgid "error reading file '%s'"
 msgstr "Fehler beim Lesen der Datei '%s'"
 
 msgid "this seems to be a bundle -- and they are defunct"
-msgstr "sieht aus wie ein Bundle --  und diese sind veraltet"
+msgstr "sieht aus wie ein Bundle -- und diese funktionieren nicht mehr"
 
 msgid ""
 "'cleanup' exists but is not executable -- see the 'R Installation and "
@@ -888,7 +926,7 @@ msgid "empty 'data' directory"
 msgstr "leeres 'data' Verzeichnis"
 
 msgid "cannot create temporary directory"
-msgstr "kann  temporäres Verzeichnis nicht erzeugen"
+msgstr "kann temporäres Verzeichnis nicht erzeugen"
 
 msgid "ERROR: '--merge-multiarch' applies only to a single tarball"
 msgstr "Fehler: '--merge-multiarch' bezieht sich nur auf einzelnes Tar-Archiv"
@@ -900,7 +938,7 @@ msgid "ERROR: no packages specified"
 msgstr "Fehler: keine Pakete angegeben"
 
 msgid "ERROR: cannot cd to directory %s"
-msgstr "Fehler: kann  nicht in Verzeichnis %s wechseln"
+msgstr "Fehler: kann nicht in Verzeichnis %s wechseln"
 
 msgid "ERROR: no permission to install to directory"
 msgstr "Fehler: keine ausreichenden Rechte zur Installation in das Verzeichnis"
@@ -908,6 +946,14 @@ msgstr "Fehler: keine ausreichenden Rechte zur Installation in das Verzeichnis"
 msgid "building a fake installation is disallowed"
 msgstr "eine Scheininstallation ist nicht erlaubt"
 
+msgid ""
+"See\n"
+"  %s\n"
+"for details."
+msgstr ""
+"Für Details siehe\n"
+"  %s ."
+
 msgid "there is no package called '%s'"
 msgstr "es gibt kein Paket names '%s'"
 
@@ -969,9 +1015,6 @@ msgstr ""
 "Kann aus den folgenden Abschnittsüberschriften keine Versioninformation "
 "extrahieren<:"
 
-msgid "%s"
-msgstr "%s"
-
 msgid ""
 "Malformed NEWS.Rd file:\n"
 "Chunk starting\n"
@@ -1006,7 +1049,7 @@ msgid "PDF header not found"
 msgstr "PDF Header nicht gefunden"
 
 msgid "EOF marker not found"
-msgstr "EOF Markierunge nicht gefunden"
+msgstr "EOF Markierung nicht gefunden"
 
 msgid "cannot find 'startxref' keyword"
 msgstr "kann das Schlüsselwort 'startxref' nicht finden"
@@ -1033,19 +1076,19 @@ msgid "cannot read literal string object"
 msgstr "kann literales Zeichenkettenobjekt nicht lesen"
 
 msgid "cannot read hexadecimal string object"
-msgstr "kann hexasezimales Zeichenkettenobjekt nicht lesen"
+msgstr "kann hexadezimales Zeichenkettenobjekt nicht lesen"
 
 msgid "cannot read name object"
 msgstr "kann Namensobjekt nicht lesen"
 
 msgid "cannot read array object"
-msgstr "kann Arrayobjekt nicht lesen"
+msgstr "kann Array-Objekt nicht lesen"
 
 msgid "cannot read dictionary object"
 msgstr "kann Dictionary-Objekt nicht lesen"
 
 msgid "cannot read stream object"
-msgstr "kann Streamobjekt nicht lesen"
+msgstr "kann Stream-Objekt nicht lesen"
 
 msgid "cannot read indirect reference object"
 msgstr "kann indirektes Referenzobjekt nicht lesen"
@@ -1101,9 +1144,6 @@ msgstr "%s gefunden, vielleicht aus %s"
 msgid "testing '%s' failed"
 msgstr "Test von '%s' fehlgeschlagen"
 
-msgid "%d of the package tests failed"
-msgstr "%d der Pakettests fehlgeschlagen"
-
 msgid "Testing examples for package %s"
 msgstr "Teste die Beispiele für Paket %s"
 
@@ -1132,7 +1172,7 @@ msgid "Comparing %s to %s ..."
 msgstr "Vergleiche %s mit %s ..."
 
 msgid "no parsed files found"
-msgstr "keine gparsten Dateien gefunden"
+msgstr "keine geparsten Dateien gefunden"
 
 msgid "FAILED"
 msgstr "fehlgeschlagen"
@@ -1154,10 +1194,10 @@ msgid "test '%s' is not available"
 msgstr "Test '%s' nicht verfügbar"
 
 msgid "argument 'x' must be a character vector"
-msgstr "Argument 'x' muss ein Charaktervektor sein"
+msgstr "Argument 'x' muss ein Zeichenkettenvektor sein"
 
 msgid "argument 'delim' must specify two characters"
-msgstr "Argument 'delim' muss zwei Charakter spezifizieren"
+msgstr "Argument 'delim' muss zwei Zeichen spezifizieren"
 
 msgid "only Rd syntax is currently supported"
 msgstr "momentan nur Rd Syntax unterstützt"
@@ -1174,11 +1214,8 @@ msgstr "kann %s nicht auf '%s' ausführen"
 msgid "unable to run %s on '%s'"
 msgstr "kann %s nicht für '%s' ausführen"
 
-msgid "cannot coerce"
-msgstr "kann nicht umwandeln"
-
-msgid "to logical"
-msgstr "in logische Werte"
+msgid "cannot coerce %s to logical"
+msgstr "kann %s nicht in logischen Wert umwandeln"
 
 msgid "File 'DESCRIPTION' is missing."
 msgstr "Datei 'DESCRIPTION' fehlt."
@@ -1204,6 +1241,9 @@ msgstr "kann Paketquelltext nicht einlesen"
 msgid "Call sequence:"
 msgstr "Aufrufsequenz:"
 
+msgid "'text' must be a character vector"
+msgstr "'text' muss ein Zeichenkettenvektor sein"
+
 msgid "parsing '%s'"
 msgstr "parse '%s'"
 
@@ -1269,13 +1309,16 @@ msgid "Found a .Internal call in methods for the following reference class:"
 msgid_plural ""
 "Found .Internal calls in methods for the following reference classes:"
 msgstr[0] ".Internal Aufruf in Methoden für folgende Referenzklasse gefunden:"
-msgstr[1] ".Internal Aufrufe in Methoden folgende Referenzklassen gefunden:"
+msgstr[1] ""
+".Internal Aufrufe in Methoden für folgende Referenzklassen gefunden:"
 
 msgid "Found an obsolete/platform-specific call in the following function:"
 msgid_plural ""
 "Found an obsolete/platform-specific call in the following functions:"
-msgstr[0] "Veralteten/plattformspezifischen Aufruf in folgender Funktion gefunden:"
-msgstr[1] "Veraltete/plattformpezifische Aufrufe in folgenden Funktionen gefunden:"
+msgstr[0] ""
+"Veralteten/plattformspezifischen Aufruf in folgender Funktion gefunden:"
+msgstr[1] ""
+"Veraltete/plattformpezifische Aufrufe in folgenden Funktionen gefunden:"
 
 msgid ""
 "Found an obsolete/platform-specific call in methods for the following S4 "
@@ -1284,9 +1327,11 @@ msgid_plural ""
 "Found an obsolete/platform-specific call in methods for the following S4 "
 "generics:"
 msgstr[0] ""
-"Veralteten/plattformspezifischen Aufruf in Methoden für die folgende S4 Generische gefunden:"
+"Veralteten/plattformspezifischen Aufruf in Methoden für die folgende S4 "
+"Generische gefunden:"
 msgstr[1] ""
-"Veralteten/plattformspezifischen Aufruf in Methoden für die folgenden S4 Generischen gefunden:"
+"Veralteten/plattformspezifischen Aufruf in Methoden für die folgenden S4 "
+"Generischen gefunden:"
 
 msgid ""
 "Found an obsolete/platform-specific call in methods for the following "
@@ -1295,9 +1340,11 @@ msgid_plural ""
 "Found an obsolete/platform-specific call in methods for the following "
 "reference classes:"
 msgstr[0] ""
-"Veralteten/plattformspezifischen Aufruf in Methoden für die folgende Referenzklasse gefunden:"
+"Veralteten/plattformspezifischen Aufruf in Methoden für die folgende "
+"Referenzklasse gefunden:"
 msgstr[1] ""
-"Veralteten/platformspezifischen Aufruf in Methoden für die folgenden Referenzklassen gefunden:"
+"Veralteten/platformspezifischen Aufruf in Methoden für die folgenden "
+"Referenzklassen gefunden:"
 
 msgid "Found the deprecated function:"
 msgid_plural "Found the deprecated functions:"
@@ -1311,8 +1358,8 @@ msgstr[1] "Abgeschaltete/entfernte Funktionen gefunden:"
 
 msgid "Found the platform-specific device:"
 msgid_plural "Found the platform-specific devices:"
-msgstr[0] "Plattform-spezifisches gefunden:"
-msgstr[1] "Plattform-spezifische Devices gefunden"
+msgstr[0] "Plattformspezifisches Device gefunden:"
+msgstr[1] "Plattformspezifische Devices gefunden"
 
 msgid "Generic without any methods in %s: %s"
 msgid_plural "Generics without any methods in %s: %s"
@@ -1352,6 +1399,57 @@ msgid_plural "objects %s are created by more than one data call"
 msgstr[0] "Objekt %s wird durch mehr als einen Datenaufruf erzeugt"
 msgstr[1] "Objekt(e) %s werden durch mehr als einen Datenaufruf erzeugt"
 
+msgid "%d of the package tests failed"
+msgid_plural "%d of the package tests failed"
+msgstr[0] "%d der Pakettests fehlgeschlagen"
+msgstr[1] "%d der Pakettests fehlgeschlagen"
+
+#~ msgid "Reading %s failed with message: %s"
+#~ msgstr "Einlesen von %s fehlgeschlagen mit Nachricht: %s"
+
+#~ msgid "assertCondition: caught %s"
+#~ msgstr "assertCondition: %s abgefangen"
+
+#~ msgid ","
+#~ msgstr ","
+
+#~ msgid "installing dependencies %s"
+#~ msgstr "installiere Abhängigkeiten %s"
+
+#~ msgid "%s"
+#~ msgstr "%s"
+
+#~ msgid ":"
+#~ msgstr ":"
+
+#~ msgid "latin1"
+#~ msgstr "latin1"
+
+#~ msgid "ASCII"
+#~ msgstr "ASCII"
+
+#~ msgid "byte"
+#~ msgstr "byte"
+
+#, fuzzy
+#~ msgid "Undeclared package used in Rd xrefs:"
+#~ msgid_plural "Undeclared packages used in Rd xrefs:"
+#~ msgstr[0] "Unbekanntes Paket %s in Rd Kreuzreferenzen"
+#~ msgstr[1] "Unbekannte Pakete %s in Rd Kreuzreferenzen"
+
+#, fuzzy
+#~ msgid "Inconsistent encoding specifications: %s with %%\\SweaveUTF8"
+#~ msgstr "Inkonsistente Kodierungsspezifikationen:"
+
+#~ msgid "argument 'file' must be a character string or connection"
+#~ msgstr "Argument 'file' muss eine Zeichenkette oder eine Verbindung sein"
+
+#~ msgid "with %\\SweaveUTF8"
+#~ msgstr "with %\\SweaveUTF8"
+
+#~ msgid "to logical"
+#~ msgstr "in logische Werte"
+
 #~ msgid "Vignette product"
 #~ msgstr "Vignette Produkt"
 
@@ -1373,9 +1471,6 @@ msgstr[1] "Objekt(e) %s werden durch mehr als einen Datenaufruf erzeugt"
 #~ msgid ". The following files exists in directory"
 #~ msgstr ". Die folgende Datei exisitiert im Verzeichnis"
 
-#~ msgid ":"
-#~ msgstr ":"
-
 #~ msgid "Located more than one"
 #~ msgstr "mehr als eine gefunden"
 
@@ -1876,9 +1971,6 @@ msgstr[1] "Objekt(e) %s werden durch mehr als einen Datenaufruf erzeugt"
 #~ "Link, nicht aber als Datei exisitert. Solche Links funktionieren nicht in "
 #~ "R < 2.10.0 und nur in HTML (nicht PDF) Hilfe in der aktuellen Version)"
 
-#~ msgid "missing 'DESCRIPTION.in' for package '%s'"
-#~ msgstr "'DESCRIPTION.in' fehlt für Paket '%s'"
-
 #~ msgid "ERROR: this R is version %s, bundle '%s' requires R %s %s"
 #~ msgstr "Fehler: dies ist R Version %s, Bündel '%s' benötigt R %s %s"
 
diff --git a/src/library/tools/po/R-fr.po b/src/library/tools/po/R-fr.po
index 372fb0f..cecbc89 100644
--- a/src/library/tools/po/R-fr.po
+++ b/src/library/tools/po/R-fr.po
@@ -7,7 +7,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: R 2.12.0\n"
 "Report-Msgid-Bugs-To: bugs.r-project.org\n"
-"POT-Creation-Date: 2014-01-26 09:09\n"
+"POT-Creation-Date: 2016-04-01 09:50\n"
 "PO-Revision-Date: 2014-03-17 11:53+0100\n"
 "Last-Translator: Philippe Grosjean <phgrosjean at sciviews.org>\n"
 "Language-Team: French <R-core at r-project.org>\n"
@@ -18,6 +18,14 @@ msgstr ""
 "Plural-Forms: nplurals=2; plural=(n > 1);\n"
 "X-Generator: Poedit 1.6.4\n"
 
+#, fuzzy
+msgid "Checking %s"
+msgstr "v�rification de %s ..."
+
+#, fuzzy
+msgid "Processing %s ..."
+msgstr "analyse de %s"
+
 msgid "argument 'package' must be of length 1"
 msgstr "l'argument 'package' doit �tre de longueur 1"
 
@@ -248,9 +256,16 @@ msgstr ""
 "Les packages avec priorit� 'base' ou 'recommended' ou 'defunct-base' doivent "
 "�tre d�j� connus de R."
 
+msgid "Malformed Title field: should not end in a period."
+msgstr ""
+
 msgid ""
-"See the information on DESCRIPTION files in section 'Creating R packages' of "
-"the 'Writing R Extensions' manual."
+"Malformed Description field: should contain one or more complete sentences."
+msgstr ""
+
+#, fuzzy
+msgid ""
+"See section 'The DESCRIPTION file' in the 'Writing R Extensions' manual."
 msgstr ""
 "Voyez l'information � propos des fichiers DESCRIPTION dans la section "
 "'Creating R packages' du manuel 'Writing R Extensions'."
@@ -270,7 +285,14 @@ msgstr "Le champ Authors at R ne renvoie aucune personne avec un r
 msgid "Cannot extract Maintainer field from Authors at R field:"
 msgstr "Impossible d'extraire le champ 'Maintainer' du champ 'Authors at R' :"
 
-msgid "Authors at R field gives no person with maintainer role and email address."
+#, fuzzy
+msgid "Authors at R field gives more than one person with maintainer role:"
+msgstr "Le champ 'Authors at R' ne renvoie aucune personne avec un r�le d'auteur."
+
+#, fuzzy
+msgid ""
+"Authors at R field gives no person with maintainer role, valid email address "
+"and non-empty name."
 msgstr ""
 "Le champ 'Authors at R' ne renvoie personne avec un r�le de mainteneur et une "
 "adresse email."
@@ -320,9 +342,8 @@ msgstr ""
 msgid "Missing link or links in documentation object '%s':"
 msgstr "Lien(s) manquant(s) dans la documentation de l'objet '%s' :"
 
-msgid ""
-"See the information in section 'Cross-references' of the 'Writing R "
-"Extensions' manual."
+#, fuzzy
+msgid "See section 'Cross-references' in the 'Writing R Extensions' manual."
 msgstr ""
 "Voyez l'information dans la section 'Croos-references' du manuel 'Writing R "
 "Extensions'."
@@ -359,9 +380,9 @@ msgstr "Les fonctionne de d
 msgid "See section %s in '%s'."
 msgstr "Voir section %s dans '%s'."
 
+#, fuzzy
 msgid ""
-"Package detach functions should have one arguments with names starting with "
-"%s."
+"Package detach functions should have one argument with name starting with %s."
 msgstr ""
 "Les fonctions detach du package doivent avoir un argument avec un nom "
 "commen�ant par %s."
@@ -390,6 +411,14 @@ msgstr "appels 'library' ou 'require' non d
 msgid "'library' or 'require' call not declared from: %s"
 msgstr "appels 'library' ou 'require' non d�clar�s depuis : %s"
 
+#, fuzzy
+msgid "'loadNamespace' or 'requireNamespace' calls not declared from:"
+msgstr "appels 'library' ou 'require' non d�clar�s depuis :"
+
+#, fuzzy
+msgid "'loadNamespace' or 'requireNamespace' call not declared from: %s"
+msgstr "appels 'library' ou 'require' non d�clar�s depuis : %s"
+
 msgid "'library' or 'require' calls to packages already attached by Depends:"
 msgstr ""
 "appels 'library' ou 'require' vers des packages d�j� attach�s depuis "
@@ -400,6 +429,14 @@ msgid ""
 msgstr ""
 "appels 'library' ou 'require' � %s qui est d�j� attach� depuis Depends."
 
+#, fuzzy
+msgid "'library' or 'require' calls in package code:"
+msgstr "appels 'library' ou 'require' non d�clar�s depuis :"
+
+#, fuzzy
+msgid "'library' or 'require' call to %s in package code."
+msgstr "appels 'library' ou 'require' non d�clar�s depuis :"
+
 msgid "Namespaces in Imports field not imported from:"
 msgstr "Espaces de noms dans le champ Imports non import�s depuis :"
 
@@ -485,8 +522,8 @@ msgstr ""
 "%s\n"
 "dans NAMESPACE."
 
-msgid "argument 'file' must be a character string or connection"
-msgstr "l'argument 'file' doit �tre une cha�ne de caract�res ou une connexion"
+msgid "Rd object required"
+msgstr ""
 
 msgid "missing/empty %s field in '%s'"
 msgstr "champ %s manquant ou vide dans '%s'"
@@ -520,6 +557,16 @@ msgstr ""
 msgid "No help on %s found in RdDB %s"
 msgstr "Pas d'aide pour %s trouv�e dans RdDB %s"
 
+msgid "'macros' must be TRUE or must specify existing macros"
+msgstr ""
+
+msgid "Macro file %s should only contain Rd macro definitions and comments"
+msgstr ""
+
+#, fuzzy
+msgid "No Rd macros in package '%s'."
+msgstr "Pas de docs trouv�s pour le package %s"
+
 msgid "more than one \\examples section, using the first"
 msgstr "plus d'une section \\example, utilisation de la premi�re"
 
@@ -559,6 +606,9 @@ msgstr "valeur inexacte pour '%s' : %s"
 msgid "Only one Rd section per %s is supported."
 msgstr "Seulement une section Rd par %s est support�e."
 
+msgid "DESCRIPTION file is for package '%s', not '%s'"
+msgstr ""
+
 msgid "Vignette product %s does not have a known filename extension (%s)"
 msgstr ""
 "Le fichier porduit pour la vignette %s n'a pas une extension de fichier "
@@ -581,6 +631,9 @@ msgstr ""
 msgid "unable to create temp directory %s"
 msgstr "impossible de cr�er le r�pertoire temporaire %s"
 
+msgid "Vignette '%s' is non-ASCII but has no declared encoding"
+msgstr ""
+
 msgid "Running"
 msgstr "Ex�cution"
 
@@ -621,12 +674,6 @@ msgstr ""
 "le nom de fichier '%s' pour la vignette ne correspond pas au pattern de nom "
 "de fichier '%s'"
 
-msgid "Inconsistent encoding specifications:"
-msgstr "Sp�cifications d'encodage incoh�rentes :"
-
-msgid "with %\\SweaveUTF8"
-msgstr "avec %\\SweaveUTF8"
-
 msgid "In '%s' vignettes '%s' and '%s' have the same vignette name"
 msgstr "Dans '%s' les vignettes '%s' et '%s' ont le m�me nom de vignette"
 
@@ -738,12 +785,6 @@ msgstr "le chargement a 
 msgid "assertConditon: Successfully caught a condition"
 msgstr "assertCondition : Une condition a �t� captur�e avec succ�s"
 
-msgid "assertCondition: caught %s"
-msgstr "assertCondition : capture de %s"
-
-msgid ","
-msgstr ","
-
 msgid "Got %s in evaluating %s; wanted %s"
 msgstr "%s a �t� obtenu lors de l'�valuation de %s ; il fallait %s"
 
@@ -811,9 +852,6 @@ msgstr "t
 msgid "downloading %s ..."
 msgstr "t�l�chargement de %s ..."
 
-msgid "installing dependencies %s"
-msgstr "installation des d�pendances %s"
-
 msgid "checking %s ..."
 msgstr "v�rification de %s ..."
 
@@ -853,6 +891,9 @@ msgstr "Le lien %s dans le package %s ne peut 
 msgid "No docs found for package %s"
 msgstr "Pas de docs trouv�s pour le package %s"
 
+msgid "URL %s was not found"
+msgstr "l'URL %s est introuvable"
+
 msgid ""
 "Only help files, %s, %s and files under %s and %s in a package can be viewed"
 msgstr ""
@@ -862,9 +903,6 @@ msgstr ""
 msgid "unsupported URL %s"
 msgstr "URL %s non support�e"
 
-msgid "URL %s was not found"
-msgstr "l'URL %s est introuvable"
-
 msgid "httpd server disabled by R_DISABLE_HTTPD"
 msgstr "serveur http arr�t� par R_DISABLE_HTTPD"
 
@@ -927,6 +965,10 @@ msgstr "aucun fichier source n'est trouv
 msgid "empty 'data' directory"
 msgstr "r�pertoire 'data' vide"
 
+#, fuzzy
+msgid "cannot create unique directory for build"
+msgstr "impossible de cr�er le r�pertoire '%s'"
+
 msgid "cannot create temporary directory"
 msgstr "impossible de cr�er un r�pertoire temporaire"
 
@@ -950,6 +992,12 @@ msgstr "ERREUR : pas de permission pour installer dans le r
 msgid "building a fake installation is disallowed"
 msgstr "construire une installation fant�me n'est pas permise"
 
+msgid ""
+"See\n"
+"  %s\n"
+"for details."
+msgstr ""
+
 msgid "there is no package called '%s'"
 msgstr "aucun package nomm� '%s' n'existe"
 
@@ -987,6 +1035,14 @@ msgstr ""
 "Impossible de traiter la section ou les lignes : \n"
 "%s"
 
+#, fuzzy
+msgid "DESCRIPTION file not found"
+msgstr "Fichier DESCRIPTION incorrect"
+
+#, fuzzy
+msgid "NEWS file not found"
+msgstr "le fichier '%s' est introuvable"
+
 msgid "No news found in given file using old-style R-like format."
 msgstr ""
 "Pas de nouvelles trouv�es dans le fichier en usant de l'ancien format de "
@@ -1011,9 +1067,6 @@ msgstr ""
 msgid "Cannot extract version info from the following section titles:"
 msgstr "Impossible d'extraire la version des titres de sections suivants :"
 
-msgid "%s"
-msgstr "%s"
-
 msgid ""
 "Malformed NEWS.Rd file:\n"
 "Chunk starting\n"
@@ -1041,6 +1094,14 @@ msgstr ""
 msgid "Processing packages:"
 msgstr "Traitement des packages :"
 
+#, fuzzy
+msgid ""
+"reading DESCRIPTION for package %s failed with message:\n"
+"  %s"
+msgstr ""
+"la compilation du fichier TeX %s a �chou� avec le diagnostic :\n"
+"%s"
+
 msgid "%s must be a character string or a file/raw connection"
 msgstr "%s doit �tre une cha�ne de caract�res ou une connexion fichier/raw"
 
@@ -1125,6 +1186,9 @@ msgstr "l'argument 'pkg' doit 
 msgid "package '%s' was not found"
 msgstr "le package '%s' est introuvable"
 
+msgid "the 'lib.loc' argument has always been unused and is deprecated now"
+msgstr ""
+
 msgid "bad operand"
 msgstr "un op�rateur erron�"
 
@@ -1143,9 +1207,6 @@ msgstr "%s est trouv
 msgid "testing '%s' failed"
 msgstr "le test '%s' a �chou�"
 
-msgid "%d of the package tests failed"
-msgstr "%d des tests du package ont �chou�"
-
 msgid "Testing examples for package %s"
 msgstr "V�rification des exemples du package %s"
 
@@ -1217,12 +1278,10 @@ msgstr "impossible d'ex
 msgid "unable to run %s on '%s'"
 msgstr "impossible d'ex�cuter %s sur '%s'"
 
-msgid "cannot coerce"
+#, fuzzy
+msgid "cannot coerce %s to logical"
 msgstr "impossible de transformer"
 
-msgid "to logical"
-msgstr "en valeur logique"
-
 msgid "File 'DESCRIPTION' is missing."
 msgstr "Le fichier 'DESCRIPTION' est manquant."
 
@@ -1247,6 +1306,10 @@ msgstr "impossible de sourcer le code du package"
 msgid "Call sequence:"
 msgstr "S�quence d'appel :"
 
+#, fuzzy
+msgid "'text' must be a character vector"
+msgstr "l'argument 'x' doit �tre un vecteur de cha�nes de caract�res"
+
 msgid "parsing '%s'"
 msgstr "analyse de '%s'"
 
@@ -1413,6 +1476,47 @@ msgid_plural "objects %s are created by more than one data call"
 msgstr[0] "l'objet %s est cr�� par plus d'un appel aux donn�es"
 msgstr[1] "les objets %s sont cr��s par plus d'un appel aux donn�es"
 
+#, fuzzy
+msgid "%d of the package tests failed"
+msgid_plural "%d of the package tests failed"
+msgstr[0] "%d des tests du package ont �chou�"
+msgstr[1] "%d des tests du package ont �chou�"
+
+#~ msgid "assertCondition: caught %s"
+#~ msgstr "assertCondition : capture de %s"
+
+#~ msgid ","
+#~ msgstr ","
+
+#~ msgid "installing dependencies %s"
+#~ msgstr "installation des d�pendances %s"
+
+#~ msgid "%s"
+#~ msgstr "%s"
+
+#~ msgid ":"
+#~ msgstr " :"
+
+#, fuzzy
+#~ msgid "Undeclared package used in Rd xrefs:"
+#~ msgid_plural "Undeclared packages used in Rd xrefs:"
+#~ msgstr[0] "Package inconnu %s dans les xrefs Rd"
+#~ msgstr[1] "Packages inconnus %s dans les xrefs Rd"
+
+#, fuzzy
+#~ msgid "Inconsistent encoding specifications: %s with %%\\SweaveUTF8"
+#~ msgstr "Sp�cifications d'encodage incoh�rentes :"
+
+#~ msgid "argument 'file' must be a character string or connection"
+#~ msgstr ""
+#~ "l'argument 'file' doit �tre une cha�ne de caract�res ou une connexion"
+
+#~ msgid "with %\\SweaveUTF8"
+#~ msgstr "avec %\\SweaveUTF8"
+
+#~ msgid "to logical"
+#~ msgstr "en valeur logique"
+
 #~ msgid "Vignette product"
 #~ msgstr "Vignette produit"
 
@@ -1434,9 +1538,6 @@ msgstr[1] "les objets %s sont cr
 #~ msgid ". The following files exists in directory"
 #~ msgstr ". Les fichiers sont dans ce r�pertoire"
 
-#~ msgid ":"
-#~ msgstr " :"
-
 #~ msgid "Located more than one"
 #~ msgstr "Localisation plus d'une fois"
 
diff --git a/src/library/tools/po/R-it.po b/src/library/tools/po/R-it.po
index 04bd19a..9d81c34 100644
--- a/src/library/tools/po/R-it.po
+++ b/src/library/tools/po/R-it.po
@@ -2,7 +2,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: R 2.3.0\n"
 "Report-Msgid-Bugs-To: bugs.r-project.org\n"
-"POT-Creation-Date: 2014-01-26 09:09\n"
+"POT-Creation-Date: 2016-04-01 09:50\n"
 "PO-Revision-Date: 2005-04-17 16:57+0200\n"
 "Last-Translator: stefano iacus <>\n"
 "Language-Team: Italian <it at li.org>\n"
@@ -12,6 +12,14 @@ msgstr ""
 "Content-Transfer-Encoding: 8bit\n"
 "Plural-Forms: nplurals=2; plural=(n != 1);\n"
 
+#, fuzzy
+msgid "Checking %s"
+msgstr "analizzo '%s'"
+
+#, fuzzy
+msgid "Processing %s ..."
+msgstr "analizzo '%s'"
+
 msgid "argument 'package' must be of length 1"
 msgstr "argomento 'package' deve avere lunghezza 1"
 
@@ -232,9 +240,15 @@ msgid ""
 "already be known to R."
 msgstr ""
 
+msgid "Malformed Title field: should not end in a period."
+msgstr ""
+
+msgid ""
+"Malformed Description field: should contain one or more complete sentences."
+msgstr ""
+
 msgid ""
-"See the information on DESCRIPTION files in section 'Creating R packages' of "
-"the 'Writing R Extensions' manual."
+"See section 'The DESCRIPTION file' in the 'Writing R Extensions' manual."
 msgstr ""
 
 msgid "Malformed Authors at R field:"
@@ -252,7 +266,12 @@ msgstr ""
 msgid "Cannot extract Maintainer field from Authors at R field:"
 msgstr ""
 
-msgid "Authors at R field gives no person with maintainer role and email address."
+msgid "Authors at R field gives more than one person with maintainer role:"
+msgstr ""
+
+msgid ""
+"Authors at R field gives no person with maintainer role, valid email address "
+"and non-empty name."
 msgstr ""
 
 #, fuzzy
@@ -298,9 +317,7 @@ msgstr ""
 msgid "Missing link or links in documentation object '%s':"
 msgstr "Errore di sintassi nella documentazione dell'oggetto '%s':"
 
-msgid ""
-"See the information in section 'Cross-references' of the 'Writing R "
-"Extensions' manual."
+msgid "See section 'Cross-references' in the 'Writing R Extensions' manual."
 msgstr ""
 
 msgid "File %s:"
@@ -331,8 +348,7 @@ msgid "See section %s in '%s'."
 msgstr "impossibile eseguire bibtext su '%s'"
 
 msgid ""
-"Package detach functions should have one arguments with names starting with "
-"%s."
+"Package detach functions should have one argument with name starting with %s."
 msgstr ""
 
 msgid "Package detach functions should not call %s."
@@ -359,6 +375,12 @@ msgstr ""
 msgid "'library' or 'require' call not declared from: %s"
 msgstr ""
 
+msgid "'loadNamespace' or 'requireNamespace' calls not declared from:"
+msgstr ""
+
+msgid "'loadNamespace' or 'requireNamespace' call not declared from: %s"
+msgstr ""
+
 msgid "'library' or 'require' calls to packages already attached by Depends:"
 msgstr ""
 
@@ -366,6 +388,12 @@ msgid ""
 "'library' or 'require' call to %s which was already attached by Depends."
 msgstr ""
 
+msgid "'library' or 'require' calls in package code:"
+msgstr ""
+
+msgid "'library' or 'require' call to %s in package code."
+msgstr ""
+
 msgid "Namespaces in Imports field not imported from:"
 msgstr ""
 
@@ -446,9 +474,8 @@ msgid ""
 "in NAMESPACE."
 msgstr ""
 
-msgid "argument 'file' must be a character string or connection"
+msgid "Rd object required"
 msgstr ""
-"argomento 'file' deve essere una stringa di caratteri o una connessione"
 
 #, fuzzy
 msgid "missing/empty %s field in '%s'"
@@ -484,6 +511,15 @@ msgstr "non posso lavorare con oggetti Rd con nomi mancanti/vuoti"
 msgid "No help on %s found in RdDB %s"
 msgstr "non può essere usato per il pacchetto 'base'"
 
+msgid "'macros' must be TRUE or must specify existing macros"
+msgstr ""
+
+msgid "Macro file %s should only contain Rd macro definitions and comments"
+msgstr ""
+
+msgid "No Rd macros in package '%s'."
+msgstr ""
+
 msgid "more than one \\examples section, using the first"
 msgstr ""
 
@@ -523,6 +559,9 @@ msgstr ""
 msgid "Only one Rd section per %s is supported."
 msgstr ""
 
+msgid "DESCRIPTION file is for package '%s', not '%s'"
+msgstr ""
+
 msgid "Vignette product %s does not have a known filename extension (%s)"
 msgstr ""
 
@@ -540,6 +579,9 @@ msgstr ""
 msgid "unable to create temp directory %s"
 msgstr "impossibile creare directory temporanea"
 
+msgid "Vignette '%s' is non-ASCII but has no declared encoding"
+msgstr ""
+
 #, fuzzy
 msgid "Running"
 msgstr "analizzo '%s'"
@@ -572,12 +614,6 @@ msgstr "file '%s' non trovato"
 msgid "vignette filename '%s' does not match any of the '%s' filename patterns"
 msgstr ""
 
-msgid "Inconsistent encoding specifications:"
-msgstr ""
-
-msgid "with %\\SweaveUTF8"
-msgstr ""
-
 msgid "In '%s' vignettes '%s' and '%s' have the same vignette name"
 msgstr ""
 
@@ -688,12 +724,6 @@ msgstr "esecuzione di make fallita"
 msgid "assertConditon: Successfully caught a condition"
 msgstr ""
 
-msgid "assertCondition: caught %s"
-msgstr ""
-
-msgid ","
-msgstr ""
-
 msgid "Got %s in evaluating %s; wanted %s"
 msgstr ""
 
@@ -761,9 +791,6 @@ msgstr ""
 msgid "downloading %s ..."
 msgstr ""
 
-msgid "installing dependencies %s"
-msgstr ""
-
 msgid "checking %s ..."
 msgstr ""
 
@@ -808,6 +835,10 @@ msgstr "il name space non deve essere caricato."
 msgid "No docs found for package %s"
 msgstr ""
 
+#, fuzzy
+msgid "URL %s was not found"
+msgstr "pacchetto '%s' non trovato"
+
 msgid ""
 "Only help files, %s, %s and files under %s and %s in a package can be viewed"
 msgstr ""
@@ -815,10 +846,6 @@ msgstr ""
 msgid "unsupported URL %s"
 msgstr ""
 
-#, fuzzy
-msgid "URL %s was not found"
-msgstr "pacchetto '%s' non trovato"
-
 msgid "httpd server disabled by R_DISABLE_HTTPD"
 msgstr ""
 
@@ -880,6 +907,10 @@ msgid "empty 'data' directory"
 msgstr ""
 
 #, fuzzy
+msgid "cannot create unique directory for build"
+msgstr "impossibile creare directory '%s'"
+
+#, fuzzy
 msgid "cannot create temporary directory"
 msgstr "impossibile creare directory '%s'"
 
@@ -902,6 +933,12 @@ msgstr ""
 msgid "building a fake installation is disallowed"
 msgstr ""
 
+msgid ""
+"See\n"
+"  %s\n"
+"for details."
+msgstr ""
+
 msgid "there is no package called '%s'"
 msgstr "non esiste un pacchetto chiamato '%s'"
 
@@ -938,6 +975,14 @@ msgid ""
 "%s"
 msgstr ""
 
+#, fuzzy
+msgid "DESCRIPTION file not found"
+msgstr "file DESCRIPTION non valido"
+
+#, fuzzy
+msgid "NEWS file not found"
+msgstr "file '%s' non trovato"
+
 msgid "No news found in given file using old-style R-like format."
 msgstr ""
 
@@ -955,9 +1000,6 @@ msgstr ""
 msgid "Cannot extract version info from the following section titles:"
 msgstr ""
 
-msgid "%s"
-msgstr ""
-
 msgid ""
 "Malformed NEWS.Rd file:\n"
 "Chunk starting\n"
@@ -976,6 +1018,11 @@ msgstr ""
 msgid "Processing packages:"
 msgstr "Elaboro i pacchetti:"
 
+msgid ""
+"reading DESCRIPTION for package %s failed with message:\n"
+"  %s"
+msgstr ""
+
 #, fuzzy
 msgid "%s must be a character string or a file/raw connection"
 msgstr ""
@@ -1071,6 +1118,9 @@ msgstr "l'argomento 'pkg' deve avere lunghezza 1"
 msgid "package '%s' was not found"
 msgstr "pacchetto '%s' non trovato"
 
+msgid "the 'lib.loc' argument has always been unused and is deprecated now"
+msgstr ""
+
 msgid "bad operand"
 msgstr "operatore sbagliato"
 
@@ -1091,9 +1141,6 @@ msgstr ""
 msgid "testing '%s' failed"
 msgstr "esecuzione di make fallita"
 
-msgid "%d of the package tests failed"
-msgstr ""
-
 #, fuzzy
 msgid "Testing examples for package %s"
 msgstr "non può essere usato per il pacchetto 'base'"
@@ -1172,11 +1219,9 @@ msgstr "impossibile eseguire bibtext su '%s'"
 msgid "unable to run %s on '%s'"
 msgstr "impossibile eseguire bibtext su '%s'"
 
-msgid "cannot coerce"
-msgstr ""
-
-msgid "to logical"
-msgstr ""
+#, fuzzy
+msgid "cannot coerce %s to logical"
+msgstr "impossibile copiare '%s' su '%s'"
 
 msgid "File 'DESCRIPTION' is missing."
 msgstr ""
@@ -1202,6 +1247,10 @@ msgstr "impossibile leggere codice sorgente del pacchetto"
 msgid "Call sequence:"
 msgstr "Successione delle chiamate:"
 
+#, fuzzy
+msgid "'text' must be a character vector"
+msgstr "l'argomento 'x' deve essere un vettore carattere"
+
 msgid "parsing '%s'"
 msgstr "analizzo '%s'"
 
@@ -1346,6 +1395,15 @@ msgid_plural "objects %s are created by more than one data call"
 msgstr[0] "creati da più di una chiamata data"
 msgstr[1] "creati da più di una chiamata data"
 
+msgid "%d of the package tests failed"
+msgid_plural "%d of the package tests failed"
+msgstr[0] ""
+msgstr[1] ""
+
+#~ msgid "argument 'file' must be a character string or connection"
+#~ msgstr ""
+#~ "argomento 'file' deve essere una stringa di caratteri o una connessione"
+
 #, fuzzy
 #~ msgid "Failed to locate the"
 #~ msgstr "impossibile creare"
diff --git a/src/library/tools/po/R-ja.po b/src/library/tools/po/R-ja.po
index f7321d4..21c0b0b 100644
--- a/src/library/tools/po/R-ja.po
+++ b/src/library/tools/po/R-ja.po
@@ -2,16 +2,24 @@ msgid ""
 msgstr ""
 "Project-Id-Version: R 2.1.0 \n"
 "Report-Msgid-Bugs-To: bugs.r-project.org\n"
-"POT-Creation-Date: 2014-01-26 09:09\n"
-"PO-Revision-Date: 2014-03-26 14:20+0200 \n"
+"POT-Creation-Date: 2016-04-01 09:50\n"
+"PO-Revision-Date: 2015-03-27 15:16+0900 \n"
 "Last-Translator: Masafumi  \n"
 "Language-Team: RjpWiki Message Translation Team <mokada at md.tsukuba.ac.jp> \n"
 "Language: ja \n"
 "MIME-Version: 1.0 \n"
-"Content-Type: text/plain; charset=utf-8 \n"
+"Content-Type: text/plain; charset=UTF-8 \n"
 "Content-Transfer-Encoding: 8bit \n"
 "Plural-Forms: nplurals=1; plural=0; \n"
-"X-Generator: Pootle 2.0.5 \n"
+"X-Generator: Pootle 2.5.1.1 \n"
+"X-POOTLE-MTIME: 1427436981.000000 \n"
+
+msgid "Checking %s"
+msgstr " %s をチェックしています "
+
+#, fuzzy
+msgid "Processing %s ..."
+msgstr " %s を処理中 "
 
 msgid "argument 'package' must be of length 1"
 msgstr " 引数 'package' は 長さ 1 でなければなりません "
@@ -239,12 +247,19 @@ msgstr ""
 " パッケージが必要とする優先順位 'base' 'recommended' 'defunct-base' は、R が"
 "既に知らなければならない。 "
 
+msgid "Malformed Title field: should not end in a period."
+msgstr "Titleフィールドがおかしいです: ピリオドで終わるべきではありません. "
+
 msgid ""
-"See the information on DESCRIPTION files in section 'Creating R packages' of "
-"the 'Writing R Extensions' manual."
+"Malformed Description field: should contain one or more complete sentences."
 msgstr ""
-" マニュアル 'Writing R Extensions' の章 'Creating R packages' 中の "
-"DESCRIPTION ファイルにある情報を参照してください。 "
+"Descriptionフィールドがおかしいです: 1つ以上の完全な文が含まれるべきです. "
+
+msgid ""
+"See section 'The DESCRIPTION file' in the 'Writing R Extensions' manual."
+msgstr ""
+" マニュアル 'Writing R Extensions' の 節 'The DESCRIPTION file' 中の情報を参"
+"照してください. "
 
 msgid "Malformed Authors at R field:"
 msgstr " 不正な Authors at R フィールドです: "
@@ -261,8 +276,15 @@ msgstr " Authors at Rフィールドに役割が明示されていない人がい
 msgid "Cannot extract Maintainer field from Authors at R field:"
 msgstr " Authors at R フィールドから Maintainer フィールドを抽出できません: "
 
-msgid "Authors at R field gives no person with maintainer role and email address."
-msgstr " Authors at R にメインテナの役割と e-mail アドレスを持った人がいません。 "
+msgid "Authors at R field gives more than one person with maintainer role:"
+msgstr "Authors at R フィールドでMaintainerロールを持つ人が1人を超えています: "
+
+msgid ""
+"Authors at R field gives no person with maintainer role, valid email address "
+"and non-empty name."
+msgstr ""
+" Authors at R にMaintainerロールをもち,かつ正しいe-mail アドレスをもち,かつ空"
+"白でない名前を持っている人がひとりもいません. "
 
 msgid "Encoding '%s' is not portable"
 msgstr " エンコーディング '%s' は移植出来ません "
@@ -309,12 +331,10 @@ msgstr ""
 msgid "Missing link or links in documentation object '%s':"
 msgstr " ドキュメントオブジェクト '%s' 中に欠損したリンクが見つかりました: "
 
-msgid ""
-"See the information in section 'Cross-references' of the 'Writing R "
-"Extensions' manual."
+msgid "See section 'Cross-references' in the 'Writing R Extensions' manual."
 msgstr ""
 " マニュアル 'Writing R Extensions' の節 'Cross-references' 中の情報を参照して"
-"ください。 "
+"ください. "
 
 msgid "File %s:"
 msgstr " ファイル %s: "
@@ -347,10 +367,8 @@ msgid "See section %s in '%s'."
 msgstr " セクション %s ('%s' 中) を見てください "
 
 msgid ""
-"Package detach functions should have one arguments with names starting with "
-"%s."
-msgstr ""
-" パッケージの切り離し関数は %s で始まる名前を持つ一つの引数が必要です。 "
+"Package detach functions should have one argument with name starting with %s."
+msgstr " パッケージのdetach関数は %s で始まる名前を持つ1つの引数が必要です。 "
 
 msgid "Package detach functions should not call %s."
 msgstr " パッケージの切り離し関数は %s を呼び出してはいけません。 "
@@ -378,6 +396,16 @@ msgid "'library' or 'require' call not declared from: %s"
 msgstr ""
 " 'library' もしくは 'requires' による呼出しが以下から宣言されていません: %s "
 
+msgid "'loadNamespace' or 'requireNamespace' calls not declared from:"
+msgstr ""
+" 'loadNamespace' もしくは 'requireNamespace' 呼出しが以下から宣言されていませ"
+"ん: "
+
+msgid "'loadNamespace' or 'requireNamespace' call not declared from: %s"
+msgstr ""
+" 'loadNamespace' もしくは 'requireNamespace' 呼出しが以下から宣言されていませ"
+"ん: %s "
+
 msgid "'library' or 'require' calls to packages already attached by Depends:"
 msgstr ""
 " 'library' もしくは 'requires' により呼び出されたパッケージは、すでに "
@@ -389,6 +417,15 @@ msgstr ""
 " 'library' もしくは 'requires' により、すでにDepends によりアタッチされた %s "
 "が呼び出されました "
 
+msgid "'library' or 'require' calls in package code:"
+msgstr ""
+" 'library' もしくは 'require' による呼出しがパッケージのコード中にあります: "
+
+msgid "'library' or 'require' call to %s in package code."
+msgstr ""
+" 'library' もしくは 'require' による %s の呼出しがパッケージのコード中にあり"
+"ます. "
+
 msgid "Namespaces in Imports field not imported from:"
 msgstr ""
 "Imports フィールド中のネームスペースは, 以下からはインポートされませんでし"
@@ -481,8 +518,8 @@ msgstr ""
 " %s \n"
 " (NAMESPACE 中に)。 "
 
-msgid "argument 'file' must be a character string or connection"
-msgstr " 引数 'file' は文字ベクトルかコネクションでなければなりません "
+msgid "Rd object required"
+msgstr "Rd オブジェクトが必要です "
 
 msgid "missing/empty %s field in '%s'"
 msgstr " 欠如もしくは空の %s 欄があります ('%s' 中) "
@@ -513,6 +550,17 @@ msgstr " 欠損もしくは空の名前を持つ Rd オブジェクトは扱え
 msgid "No help on %s found in RdDB %s"
 msgstr " %s に関するいかなるヘルプも RdDB %s 中にはありません "
 
+msgid "'macros' must be TRUE or must specify existing macros"
+msgstr ""
+" 'macros' はTRUEとするか,もしくは既存のマクロを指定しなくてはなりません "
+
+msgid "Macro file %s should only contain Rd macro definitions and comments"
+msgstr ""
+" マクロファイル %s は Rd マクロの定義とコメントのみを含んでいるべきです "
+
+msgid "No Rd macros in package '%s'."
+msgstr " パッケージ '%s' にRdマクロは見つけられませんでした "
+
 msgid "more than one \\examples section, using the first"
 msgstr " 2 つ以上の \\examples 節があります、1 番目を用います "
 
@@ -553,6 +601,9 @@ msgstr " '%s' に対する不正な値 : %s "
 msgid "Only one Rd section per %s is supported."
 msgstr " %s は Rd セクションを 1 つしか持てません。 "
 
+msgid "DESCRIPTION file is for package '%s', not '%s'"
+msgstr "DESCRIPTION ファイルはパッケージ '%s' のものです.'%s' ではありません "
+
 msgid "Vignette product %s does not have a known filename extension (%s)"
 msgstr " ビニエットの生成物 %s は既知の拡張子を持っていません( %s ) "
 
@@ -573,6 +624,11 @@ msgstr ""
 msgid "unable to create temp directory %s"
 msgstr " 一時ディレクトリ %s を生成することが出来ません "
 
+msgid "Vignette '%s' is non-ASCII but has no declared encoding"
+msgstr ""
+" ビニエット '%s' はASCII文字のみではありませんが,エンコーディングが宣言され"
+"ていません "
+
 msgid "Running"
 msgstr " 実行中 "
 
@@ -613,12 +669,6 @@ msgstr ""
 " ビニエットファイル名 '%s' が、ファイル名パターン '%s' のいずれとも一致しませ"
 "ん "
 
-msgid "Inconsistent encoding specifications:"
-msgstr " 一貫していないエンコーディングの指定: "
-
-msgid "with %\\SweaveUTF8"
-msgstr " with %\\SweaveUTF8 "
-
 msgid "In '%s' vignettes '%s' and '%s' have the same vignette name"
 msgstr ""
 " '%s' において、ビニエット '%s' と '%s' は同じビニエット名になっています "
@@ -733,12 +783,6 @@ msgstr " ロードに失敗しました "
 msgid "assertConditon: Successfully caught a condition"
 msgstr " assertConditon: 条件をキャッチすることに成功しました "
 
-msgid "assertCondition: caught %s"
-msgstr " assertCondition:  %s をキャッチしました "
-
-msgid ","
-msgstr " , "
-
 msgid "Got %s in evaluating %s; wanted %s"
 msgstr ""
 " %2$s を評価しているときに、%1$s を得ました; しかし欲しかったのは %3$s です "
@@ -804,9 +848,6 @@ msgstr " 逆向き依存するものをダウンロードしています... "
 msgid "downloading %s ..."
 msgstr " %s をダウンロードしています... "
 
-msgid "installing dependencies %s"
-msgstr " 依存する %s をインストールしています "
-
 msgid "checking %s ..."
 msgstr " %s をチェックしています... "
 
@@ -846,6 +887,9 @@ msgstr " リンク %s (パッケージ %s 中の) は所在不明です "
 msgid "No docs found for package %s"
 msgstr " package %s にドキュメントは見つけられませんでした "
 
+msgid "URL %s was not found"
+msgstr " URL %s は見つかりませんでした "
+
 msgid ""
 "Only help files, %s, %s and files under %s and %s in a package can be viewed"
 msgstr ""
@@ -855,9 +899,6 @@ msgstr ""
 msgid "unsupported URL %s"
 msgstr " 未サポートのURL %s "
 
-msgid "URL %s was not found"
-msgstr " URL %s は見つかりませんでした "
-
 msgid "httpd server disabled by R_DISABLE_HTTPD"
 msgstr " httpd サーバは R_DISABLE_HTTPD により無効にしました "
 
@@ -921,6 +962,10 @@ msgstr " ソースファイルが見つかりません "
 msgid "empty 'data' directory"
 msgstr " 'data' ディレクトリが空です "
 
+#, fuzzy
+msgid "cannot create unique directory for build"
+msgstr " ディレクトリ '%s' を生成することが出来ません "
+
 msgid "cannot create temporary directory"
 msgstr " 一時ディレクトリを生成することが出来ません "
 
@@ -942,6 +987,12 @@ msgstr " エラー: ディレクトリへのインストール許可がありま
 msgid "building a fake installation is disallowed"
 msgstr " まがい物 (fake) インストールの構築は許されていません "
 
+msgid ""
+"See\n"
+"  %s\n"
+"for details."
+msgstr ""
+
 msgid "there is no package called '%s'"
 msgstr " '%s' という名前のパッケージが見当たりません "
 
@@ -982,6 +1033,14 @@ msgstr ""
 " チャンク/行を処理できません: \n"
 " %s "
 
+#, fuzzy
+msgid "DESCRIPTION file not found"
+msgstr " 不正な DESCRIPTION ファイルです "
+
+#, fuzzy
+msgid "NEWS file not found"
+msgstr " ファイル '%s' が見つかりません "
+
 msgid "No news found in given file using old-style R-like format."
 msgstr ""
 " 旧来の R 風の書式を使ったニュースは与えられたファイル中にはありません。 "
@@ -1004,9 +1063,6 @@ msgstr ""
 msgid "Cannot extract version info from the following section titles:"
 msgstr " 以下のセクションタイトルからバージョン情報を取り出せません "
 
-msgid "%s"
-msgstr " %s "
-
 msgid ""
 "Malformed NEWS.Rd file:\n"
 "Chunk starting\n"
@@ -1034,6 +1090,12 @@ msgstr ""
 msgid "Processing packages:"
 msgstr " パッケージを処理中: "
 
+#, fuzzy
+msgid ""
+"reading DESCRIPTION for package %s failed with message:\n"
+"  %s"
+msgstr " %s の読み込みに失敗しました.メッセージは以下の通りです: %s "
+
 msgid "%s must be a character string or a file/raw connection"
 msgstr " %s は文字列かファイル,Rawコネクションでなければなりません "
 
@@ -1118,6 +1180,9 @@ msgstr " 引数 'pkg' は長さ 1 でなければなりません "
 msgid "package '%s' was not found"
 msgstr " パッケージ '%s' は見つかりませんでした "
 
+msgid "the 'lib.loc' argument has always been unused and is deprecated now"
+msgstr ""
+
 msgid "bad operand"
 msgstr " 誤ったオペランド "
 
@@ -1136,9 +1201,6 @@ msgstr " %s が見つかりました(おそらく %s から) "
 msgid "testing '%s' failed"
 msgstr " '%s' のテストに失敗しました "
 
-msgid "%d of the package tests failed"
-msgstr " パッケージテストのうち %d 個が失敗しました "
-
 msgid "Testing examples for package %s"
 msgstr " %s パッケージに対する例をテストしています "
 
@@ -1208,11 +1270,8 @@ msgstr " '%s' を '%s' に対して実行出来ません "
 msgid "unable to run %s on '%s'"
 msgstr " %s を '%s' に対して実行出来ません "
 
-msgid "cannot coerce"
-msgstr " 強制変換できません "
-
-msgid "to logical"
-msgstr " 論理値へ "
+msgid "cannot coerce %s to logical"
+msgstr " %s を論理値に強制変換できません "
 
 msgid "File 'DESCRIPTION' is missing."
 msgstr " ファイル 'DESCRIPTION' が見当たりません。 "
@@ -1238,6 +1297,9 @@ msgstr " パッケージコードを読み込めません "
 msgid "Call sequence:"
 msgstr " 呼び出しシーケンス: "
 
+msgid "'text' must be a character vector"
+msgstr " 'text' は文字型ベクトルでなければなりません "
+
 msgid "parsing '%s'"
 msgstr " '%s' を構文解析中 "
 
@@ -1366,6 +1428,43 @@ msgid "object %s is created by more than one data call"
 msgid_plural "objects %s are created by more than one data call"
 msgstr[0] " オブジェクト %s は 1 つ以上のデータ呼び出しにより生成されました "
 
+msgid "%d of the package tests failed"
+msgid_plural "%d of the package tests failed"
+msgstr[0] " パッケージテストのうち %d 個が失敗しました "
+
+#~ msgid "assertCondition: caught %s"
+#~ msgstr " assertCondition:  %s をキャッチしました "
+
+#~ msgid ","
+#~ msgstr " , "
+
+#~ msgid "installing dependencies %s"
+#~ msgstr " 依存する %s をインストールしています "
+
+#~ msgid "%s"
+#~ msgstr " %s "
+
+#~ msgid ":"
+#~ msgstr " : "
+
+#, fuzzy
+#~ msgid "Undeclared package used in Rd xrefs:"
+#~ msgid_plural "Undeclared packages used in Rd xrefs:"
+#~ msgstr[0] " Rd xrefs 中に未知のパッケージ %s があります "
+
+#, fuzzy
+#~ msgid "Inconsistent encoding specifications: %s with %%\\SweaveUTF8"
+#~ msgstr " 一貫していないエンコーディングの指定: "
+
+#~ msgid "argument 'file' must be a character string or connection"
+#~ msgstr " 引数 'file' は文字ベクトルかコネクションでなければなりません "
+
+#~ msgid "with %\\SweaveUTF8"
+#~ msgstr " with %\\SweaveUTF8 "
+
+#~ msgid "to logical"
+#~ msgstr " 論理値へ "
+
 #~ msgid "Vignette product"
 #~ msgstr " ビニエットプロダクト "
 
@@ -1387,9 +1486,6 @@ msgstr[0] " オブジェクト %s は 1 つ以上のデータ呼び出しによ
 #~ msgid ". The following files exists in directory"
 #~ msgstr " . ディレクトリには以下のファイルがあります "
 
-#~ msgid ":"
-#~ msgstr " : "
-
 #~ msgid "Located more than one"
 #~ msgstr " 1個以上が見つかりました "
 
@@ -1880,9 +1976,6 @@ msgstr[0] " オブジェクト %s は 1 つ以上のデータ呼び出しによ
 #~ "エイリアスとして存在します。こうしたリンクは R < 2.10.0 では使えず、現在"
 #~ "のバージョンでは,  HTML (PDF ではなく) ヘルプ中でのみ有効です。 "
 
-#~ msgid "missing 'DESCRIPTION.in' for package '%s'"
-#~ msgstr " パッケージ '%s' には 'DESCRIPTION.in' がありません "
-
 #~ msgid "ERROR: this R is version %s, bundle '%s' requires R %s %s"
 #~ msgstr ""
 #~ " エラー:この R はバージョン %s です。パッケージバンドル '%s' は R %s %s "
diff --git a/src/library/tools/po/R-ko.po b/src/library/tools/po/R-ko.po
index 1115abc..8490ace 100644
--- a/src/library/tools/po/R-ko.po
+++ b/src/library/tools/po/R-ko.po
@@ -1,24 +1,37 @@
 # Korean translation for R tools package
-# src/library/tools/po/R-ko.po
-# Copyright (C) 1995-2014 The R Core Team
+# ./tools/po/R-ko.po
+#
+# Copyright (C) 1995-2016 The R Core Team
+#
 # This file is distributed under the same license as the R tools package.
-# Chel Hee Lee <chl948 at mail.usask.ca>, 2008-2014.
+# Maintained by Chel Hee Lee <chl948 at mail.usask.ca>, 2008-2016.
+# Contact: Chel Hee Lee <gnustats at gmail.com>
+#
+# Notes:
+# Under development (unstable) starting from 11-APR-2016 for R-3.3.1 - QC: in progress
+# Freezed on 10-APR-2016 for R-3.3.0 - QC: PASS
+# Freezed on 31-MAR-2015 for R-3.2.0 - QC: PASS
+# Freezed on 06-FEB-2015 for R-3.1.3 - QC: PASS
 #
 msgid ""
 msgstr ""
-"Project-Id-Version: R 3.1.0\n"
+"Project-Id-Version: R-3.3.0\n"
 "Report-Msgid-Bugs-To: bugs.r-project.org\n"
-"POT-Creation-Date: 2014-01-26 09:09\n"
-"PO-Revision-Date: 2014-03-27 13:35-0600\n"
+"POT-Creation-Date: 2016-04-01 09:50\n"
+"PO-Revision-Date: 2016-04-11 13:08-0600\n"
 "Last-Translator: Chel Hee Lee <chl948 at mail.usask.ca>\n"
-"Language-Team:  <chl948 at mail.usask.ca>\n"
+"Language-Team: Chel Hee Lee <chl948 at mail.usask.ca>\n"
 "Language: ko\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
 "Plural-Forms: nplurals=1; plural=0;\n"
-"X-Poedit-SourceCharset: UTF-8\n"
-"X-Generator: Poedit 1.5.4\n"
+
+msgid "Checking %s"
+msgstr "%s를 확인합니다."
+
+msgid "Processing %s ..."
+msgstr "%s를 프로세싱 중입니다..."
 
 msgid "argument 'package' must be of length 1"
 msgstr "인자 'package'는 반드시 길이가 1 이어야 합니다"
@@ -250,12 +263,20 @@ msgstr ""
 "'base' 또는 'recommended' 또는 'defunct-base'와 같은 우선순위를 가지는 패키지"
 "들은 반드시 R이 인식할 수 있도록 해야합니다."
 
+msgid "Malformed Title field: should not end in a period."
+msgstr "Title 항목이 올바르지 않습니다: 마침표로 끝나면 안됩니다."
+
 msgid ""
-"See the information on DESCRIPTION files in section 'Creating R packages' of "
-"the 'Writing R Extensions' manual."
+"Malformed Description field: should contain one or more complete sentences."
 msgstr ""
-"'Writing R Extensions' 매뉴얼에 'Creating R packages' 섹션을 보면 "
-"DESCRIPTION 파일에 대한 정보를 얻을 수 있습니다."
+"Description 항목이 올바르지 않습니다: 하나 이상의 완전한 문장을 포함하고 있어"
+"야 합니다. "
+
+msgid ""
+"See section 'The DESCRIPTION file' in the 'Writing R Extensions' manual."
+msgstr ""
+"매뉴얼 'Writing R Extensions'에 있는 섹션 'The DESCRIPTION file'을 살펴보시"
+"길 바랍니다."
 
 msgid "Malformed Authors at R field:"
 msgstr "Authors at R 항목이 잘못되었습니다:"
@@ -265,26 +286,33 @@ msgstr "Author 항목을 Authors at R 항목으로부터 추출할 수 없습니다
 
 msgid "Authors at R field gives no person with author role."
 msgstr ""
+"Authors at R 항목으로부터 저자의 역할(author role)을 가진 개발자를 찾을 수 없습"
+"니다."
 
 msgid "Authors at R field gives persons with no valid roles:"
-msgstr ""
+msgstr "Authors at R 항목으로부터 다음의 저자들에 대한 역할을 찾을 수 없습니다:"
 
 msgid "Cannot extract Maintainer field from Authors at R field:"
 msgstr "Maintainer의 항목을 Authors at R 항목으로부터 추출할 수 없습니다:"
 
-msgid "Authors at R field gives no person with maintainer role and email address."
+msgid "Authors at R field gives more than one person with maintainer role:"
+msgstr ""
+"Authors at R 항목에서 메인테이너의 역할을 담당하는 저자의 수가 한명이상임을 확인"
+"하게 되었습니다:"
+
+msgid ""
+"Authors at R field gives no person with maintainer role, valid email address "
+"and non-empty name."
 msgstr ""
-"Authors at R 항목에서 유지보수의 역할을 담당하고 이메일 주소를 가진 개발자를 찾"
-"을 수 없습니다."
 
 msgid "Encoding '%s' is not portable"
-msgstr "인코딩 '%s'은  포터블하지 않습니다"
+msgstr "인코딩 '%s'은 포터블(portable)하지 않습니다."
 
 msgid "Unknown encoding with non-ASCII data"
 msgstr "ASCII가 아닌 데이터에 이용된 인코딩을 알 수 없습니다"
 
 msgid "Non-standard license specification:"
-msgstr "비표준 라이센스 지정입니다:"
+msgstr "비표준 라이센스 지정(non-standard license specification)입니다:"
 
 msgid "Standardizable: %s"
 msgstr ""
@@ -320,12 +348,10 @@ msgstr ""
 msgid "Missing link or links in documentation object '%s':"
 msgstr "다큐멘테이션 객체 '%s'내에서 빠져있는 링크(들)은 다음과 같습니다:"
 
-msgid ""
-"See the information in section 'Cross-references' of the 'Writing R "
-"Extensions' manual."
+msgid "See section 'Cross-references' in the 'Writing R Extensions' manual."
 msgstr ""
-"'Writing R Extensions' 매뉴얼에서 'Cross-references' 섹션의 내용을 살펴보세"
-"요."
+"매뉴얼 'Writing R Extensions'에 있는 섹션 'Cross-references'을 살펴보시길 바"
+"랍니다."
 
 msgid "File %s:"
 msgstr "파일 %s:"
@@ -357,11 +383,10 @@ msgid "See section %s in '%s'."
 msgstr "'%2$s'에서 섹션 %1$s를 살펴보세요."
 
 msgid ""
-"Package detach functions should have one arguments with names starting with "
-"%s."
+"Package detach functions should have one argument with name starting with %s."
 msgstr ""
-"패키지 분리(detach)와 관계된 함수들은 %s로 시작하는 이름을 가진 인자 한개를 "
-"반드시 가지고 있어야 합니다."
+"패키지 분리(package detach)와 관계된 함수들은 %s로 시작하는 이름을 가진 인자 "
+"하나만을 가져야 합니다."
 
 msgid "Package detach functions should not call %s."
 msgstr "패키지 분리와 관계된 함수들은 %s를 호출하면 안됩니다."
@@ -382,10 +407,20 @@ msgid "'::' or ':::' import not declared from: %s"
 msgstr "다음으로부터 선언되지 않은 '::' 또는 ':::' 임포트입니다: %s"
 
 msgid "'library' or 'require' calls not declared from:"
-msgstr "다음으로부터 선언되지 않은 'library' 또는 'require' 호출입니다:"
+msgstr "'library' 또는 'require'은 다음으로부터 선언되지 않은 호출입니다:"
 
 msgid "'library' or 'require' call not declared from: %s"
-msgstr "다음으로부터 선언되지 않은 'library' 또는 'require' 호출입니다: %s"
+msgstr "'library' 또는 'require'은 다음으로부터 선언되지 않은 호출입니다: %s"
+
+msgid "'loadNamespace' or 'requireNamespace' calls not declared from:"
+msgstr ""
+"'loadNamespace' 또는 'requireNamespace'은 다음으로부터 선언되지 않은 호출입니"
+"다:"
+
+msgid "'loadNamespace' or 'requireNamespace' call not declared from: %s"
+msgstr ""
+"'loadNamespace' 또는 'requireNamespace'는 다음으로부터 선언되지 않은 호출입니"
+"다: %s"
 
 msgid "'library' or 'require' calls to packages already attached by Depends:"
 msgstr ""
@@ -397,6 +432,14 @@ msgid ""
 msgstr ""
 "Depends에 의하여 이미 부착된 %s로의 'library' 또는 'require' 호출입니다."
 
+msgid "'library' or 'require' calls in package code:"
+msgstr ""
+"다음의 패키지 코드(package code)내 'library' 또는 'require' 호출입니다:"
+
+msgid "'library' or 'require' call to %s in package code."
+msgstr ""
+"패키지 코드(package code)내 %s로의 'library' 또는 'require' 호출입니다."
+
 msgid "Namespaces in Imports field not imported from:"
 msgstr ""
 "Imports 항목 내에 있는 네임스페이스들은 다음으로부터 불러온 것이 아닙니다:"
@@ -482,8 +525,8 @@ msgid ""
 "in NAMESPACE."
 msgstr ""
 
-msgid "argument 'file' must be a character string or connection"
-msgstr "인자 'file'은 반드시 문자열 또는 연결이어야 합니다"
+msgid "Rd object required"
+msgstr "Rd 객체가 필요합니다."
 
 msgid "missing/empty %s field in '%s'"
 msgstr "'%2$s'내에 %1$s 항목이 없습니다"
@@ -513,8 +556,19 @@ msgstr "이름이 없는 Rd 객체들은 다루어질 수 없습니다"
 msgid "No help on %s found in RdDB %s"
 msgstr "RdDB %2$s 로부터 %1$s와 관계된 도움말을 찾을 수 없습니다"
 
+msgid "'macros' must be TRUE or must specify existing macros"
+msgstr "'macros'가 반드시 TRUE 이거나 이미 존재하는 매크로를 사용해야 합니다."
+
+msgid "Macro file %s should only contain Rd macro definitions and comments"
+msgstr ""
+"매크로 파일 %s는 오로지 Rd 매크로 정의와 주석만을 포함하고 있어야 합니다."
+
+msgid "No Rd macros in package '%s'."
+msgstr "패키지 %s로부터 Rd macro를 찾을 수 없습니다."
+
 msgid "more than one \\examples section, using the first"
-msgstr "한 개이상의 \\examples 섹션이 발견되었으며, 이중 첫번째것을 사용합니다"
+msgstr ""
+"한 개이상의 \\examples 섹션이 발견되었기 때문에 첫 번째 것을 이용합니다."
 
 msgid "Converting Rd files to LaTeX ..."
 msgstr "Rd 파일들을 LaTeX 로 변환하고 있습니다..."
@@ -553,6 +607,10 @@ msgstr "'%s'에 대한 값이 잘못되었습니다 : %s"
 msgid "Only one Rd section per %s is supported."
 msgstr ""
 
+msgid "DESCRIPTION file is for package '%s', not '%s'"
+msgstr ""
+"DESCRIPTION 파일은 패키지 '%1$s'에 관한 것이지 '%2$s'에 관한 것이 아닙니다."
+
 msgid "Vignette product %s does not have a known filename extension (%s)"
 msgstr "비니에트 프로덕트 %s는 알려진 파일확장자 (%s)를 가지고 있지 않습니다"
 
@@ -573,6 +631,11 @@ msgstr ""
 msgid "unable to create temp directory %s"
 msgstr "임시디렉토리 %s를 생성하지 못했습니다"
 
+msgid "Vignette '%s' is non-ASCII but has no declared encoding"
+msgstr ""
+"비그네트 '%s'는 ASCII 형식이 아니며 이에 대하여 선언된 인코딩을 찾을 수 없습"
+"니다."
+
 msgid "Running"
 msgstr "실행중입니다"
 
@@ -610,12 +673,6 @@ msgid "vignette filename '%s' does not match any of the '%s' filename patterns"
 msgstr ""
 "비니에트 파일명 '%1$s'은 '%2$s' 파일명 패턴들 중 어느것과도 일치하지 않습니다"
 
-msgid "Inconsistent encoding specifications:"
-msgstr "다음은 일치하지 않는 인코딩 지정들입니다:"
-
-msgid "with %\\SweaveUTF8"
-msgstr ""
-
 msgid "In '%s' vignettes '%s' and '%s' have the same vignette name"
 msgstr ""
 "'%1$s' 비니에트 내에서 '%2$s'와 '%3$s'은 같은 비니에트 이름을 가지고 있습니다"
@@ -724,12 +781,6 @@ msgstr "로딩에 실패했습니다"
 msgid "assertConditon: Successfully caught a condition"
 msgstr ""
 
-msgid "assertCondition: caught %s"
-msgstr ""
-
-msgid ","
-msgstr ","
-
 msgid "Got %s in evaluating %s; wanted %s"
 msgstr "%2$s를 평가시 %3$s을 기대했으나 %1$s를 얻었습니다"
 
@@ -764,7 +815,7 @@ msgid "cannot link from %s"
 msgstr "%s로부터 연결할 수 없습니다"
 
 msgid "-l option without value"
-msgstr ""
+msgstr "-l 옵션에 대한 값이 주어지지 않았습니다."
 
 msgid "configuration files are not supported as from R 2.12.0"
 msgstr "R 2.12.0 부터는 환경설정 파일들이 지원되지 않습니다"
@@ -779,7 +830,7 @@ msgid "Error: no packages were specified"
 msgstr "에러: 지정된 패키지들이 없습니다"
 
 msgid "ERROR: cannot create check dir %s"
-msgstr ""
+msgstr "에러: check dir %s를 생성할 수 없습니다."
 
 msgid "package directory %s does not exist"
 msgstr "패키지 디렉토리 %s가 존재하지 않습니다"
@@ -793,9 +844,6 @@ msgstr ""
 msgid "downloading %s ..."
 msgstr "%s을 다운로드 하고 있습니다  ..."
 
-msgid "installing dependencies %s"
-msgstr "종속된 %s들을 설치하고 있습니다"
-
 msgid "checking %s ..."
 msgstr "%s를 확인합니다 ..."
 
@@ -836,6 +884,9 @@ msgstr "패키지 %2$s 내의 링크 %1$s 를 제자리에 위치시킬 수 없
 msgid "No docs found for package %s"
 msgstr "패키지 %s에 대한 문서를 찾을 수 없습니다"
 
+msgid "URL %s was not found"
+msgstr "URL %s을 찾을 수 없습니다"
+
 msgid ""
 "Only help files, %s, %s and files under %s and %s in a package can be viewed"
 msgstr ""
@@ -845,9 +896,6 @@ msgstr ""
 msgid "unsupported URL %s"
 msgstr "지원되지 않는 URL %s입니다"
 
-msgid "URL %s was not found"
-msgstr "URL %s을 찾을 수 없습니다"
-
 msgid "httpd server disabled by R_DISABLE_HTTPD"
 msgstr ""
 
@@ -908,6 +956,9 @@ msgstr "소스파일들을 찾을 수 없습니다"
 msgid "empty 'data' directory"
 msgstr "비어있는 'data' 디렉토리입니다"
 
+msgid "cannot create unique directory for build"
+msgstr "build를 위한 고유의 디렉토리를 생성할 수 없습니다."
+
 msgid "cannot create temporary directory"
 msgstr "임시 디렉토리를 생성할 수 없습니다"
 
@@ -929,6 +980,12 @@ msgstr "에러: 디렉토리에 설치할 권한이 없습니다"
 msgid "building a fake installation is disallowed"
 msgstr ""
 
+msgid ""
+"See\n"
+"  %s\n"
+"for details."
+msgstr ""
+
 msgid "there is no package called '%s'"
 msgstr "'%s'이라는 패키지가 없습니다"
 
@@ -966,6 +1023,12 @@ msgid ""
 "%s"
 msgstr ""
 
+msgid "DESCRIPTION file not found"
+msgstr "DESCRIPTION 파일을 찾을 수 없습니다."
+
+msgid "NEWS file not found"
+msgstr "NEWS 파일을 찾을 수 없습니다."
+
 msgid "No news found in given file using old-style R-like format."
 msgstr ""
 
@@ -983,9 +1046,6 @@ msgstr ""
 msgid "Cannot extract version info from the following section titles:"
 msgstr "다음의 섹션 제목으로부터 버전정보를 추출할 수 없습니다:"
 
-msgid "%s"
-msgstr "%s"
-
 msgid ""
 "Malformed NEWS.Rd file:\n"
 "Chunk starting\n"
@@ -1004,9 +1064,14 @@ msgstr ""
 msgid "Processing packages:"
 msgstr "다음의 패키지들을 프로세싱하고 있습니다:"
 
-msgid "%s must be a character string or a file/raw connection"
+msgid ""
+"reading DESCRIPTION for package %s failed with message:\n"
+"  %s"
 msgstr ""
 
+msgid "%s must be a character string or a file/raw connection"
+msgstr "%s는 문자열 또는 파일/raw 커넥션이어야 합니다."
+
 msgid "PDF header not found"
 msgstr "PDF 헤더를 찾을 수 없습니다"
 
@@ -1032,7 +1097,7 @@ msgid "attempting to select more than one element"
 msgstr ""
 
 msgid "looking at %s"
-msgstr "%s를 살펴봅니다"
+msgstr "%s를 살펴보는 중입니다."
 
 msgid "cannot read literal string object"
 msgstr "literal 문자열 객체를 읽을 수 없습니다"
@@ -1041,19 +1106,19 @@ msgid "cannot read hexadecimal string object"
 msgstr "hexadecimal 문자열 객체를 읽을 수 없습니다"
 
 msgid "cannot read name object"
-msgstr "이름 객체를 읽을 수 없습니다"
+msgstr "이름 객체(name object)를 읽을 수 없습니다."
 
 msgid "cannot read array object"
-msgstr "배열 객체를 읽을 수 없습니다"
+msgstr "배열 객체(array object)를 읽을 수 없습니다."
 
 msgid "cannot read dictionary object"
-msgstr "사전 객체를 읽을 수 없습니다"
+msgstr "사전 객체(dictionary object)를 읽을 수 없습니다."
 
 msgid "cannot read stream object"
-msgstr "스트림 객체를 읽을 수 없습니다"
+msgstr "스트림 객체(stream object)를 읽을 수 없습니다."
 
 msgid "cannot read indirect reference object"
-msgstr "간접적 레퍼런스 객체를 읽을 수 없습니다"
+msgstr "간접적 레퍼런스 객체(indirect reference object)를 읽을 수 없습니다"
 
 msgid "cannot find object header at xrefed position %d"
 msgstr ""
@@ -1088,6 +1153,9 @@ msgstr "인자 'pkg'는 반드시 길이가 1이어야 합니다"
 msgid "package '%s' was not found"
 msgstr "패키지 '%s'를 찾을 수 없습니다"
 
+msgid "the 'lib.loc' argument has always been unused and is deprecated now"
+msgstr ""
+
 msgid "bad operand"
 msgstr "잘못된 연산자입니다"
 
@@ -1106,9 +1174,6 @@ msgstr ""
 msgid "testing '%s' failed"
 msgstr "'%s'를 테스팅하는 것은 실패했습니다"
 
-msgid "%d of the package tests failed"
-msgstr ""
-
 msgid "Testing examples for package %s"
 msgstr "패키지 %s의 예제를 테스트합니다"
 
@@ -1178,20 +1243,17 @@ msgstr "'%2$s'에 '%1$s'를 실행할 수 없습니다"
 msgid "unable to run %s on '%s'"
 msgstr "'%2$s'에 %1$s를 실행할 수 없습니다"
 
-msgid "cannot coerce"
-msgstr "강제변환을 할 수 없습니다"
-
-msgid "to logical"
-msgstr ""
+msgid "cannot coerce %s to logical"
+msgstr "%s를 논리형(logical)로 강제변환을 할 수 없습니다."
 
 msgid "File 'DESCRIPTION' is missing."
-msgstr "파일 'DESCRIPTION'이 없습니다."
+msgstr "'DESCRIPTION' 파일을 찾을 수 없습니다."
 
 msgid "Files 'DESCRIPTION' and 'DESCRIPTION.in' are missing."
-msgstr "파일 'DESCRIPTION'과 'DESCRIPTION.in'이 없습니다."
+msgstr "'DESCRIPTION'과 'DESCRIPTION.in' 파일들을 찾을 수 없습니다."
 
 msgid "invalid package layout"
-msgstr "패키지 레이아웃이 잘못되었습니다."
+msgstr "올바른 패키지 레이아웃(package layout)이 아닙니다."
 
 msgid "file '%s' is not in valid DCF format"
 msgstr "파일 '%s'는 유효한 DCF 형식을 가지고 있지 않습니다."
@@ -1201,15 +1263,20 @@ msgstr "비어있는 라인을 포함하고 있습니다"
 
 msgid "Unknown encoding with non-ASCII data: converting to ASCII"
 msgstr ""
+"ASCII가 아닌 데이터에 대한 인코딩을 알 수 없으므로 ASCII로의 변환을 시도합니"
+"다."
 
 msgid "cannot source package code"
-msgstr "패키지 코드를 소스할 수 없습니다"
+msgstr "패키지 코드를 읽어(source)들일 수 없습니다."
 
 msgid "Call sequence:"
 msgstr "호출 시퀀스: "
 
+msgid "'text' must be a character vector"
+msgstr "'text'는 반드시 문자형 벡터이어야 합니다."
+
 msgid "parsing '%s'"
-msgstr "'%s'을 파싱합니다"
+msgstr "'%s'을 파싱(parsing)합니다"
 
 msgid "Obsolete package %s in Rd xrefs"
 msgid_plural "Obsolete packages %s in Rd xrefs"
@@ -1328,6 +1395,34 @@ msgid "object %s is created by more than one data call"
 msgid_plural "objects %s are created by more than one data call"
 msgstr[0] "객체 %s는 하나 이상의 데이터 호출로부터 생성되었습니다"
 
+msgid "%d of the package tests failed"
+msgid_plural "%d of the package tests failed"
+msgstr[0] ""
+
+#~ msgid "Reading %s failed with message: %s"
+#~ msgstr "다음과 같은 이유로 %s를 읽는데 실패했습니다: %s"
+
+#~ msgid ","
+#~ msgstr ","
+
+#~ msgid "installing dependencies %s"
+#~ msgstr "종속된 %s들을 설치하고 있습니다"
+
+#~ msgid "%s"
+#~ msgstr "%s"
+
+#~ msgid ""
+#~ "Authors at R field gives no person with maintainer role and email address."
+#~ msgstr ""
+#~ "Authors at R 항목에서 유지보수의 역할을 담당하고 이메일 주소를 가진 개발자를 "
+#~ "찾을 수 없습니다."
+
+#~ msgid "Inconsistent encoding specifications: %s with %%\\SweaveUTF8"
+#~ msgstr "다음은 일치하지 않는 인코딩 지정들입니다:"
+
+#~ msgid "argument 'file' must be a character string or connection"
+#~ msgstr "인자 'file'은 반드시 문자열 또는 연결이어야 합니다"
+
 #~ msgid "Sweave"
 #~ msgstr "Sweave"
 
diff --git a/src/library/tools/po/R-pl.po b/src/library/tools/po/R-pl.po
index 476dfee..4d7fd6e 100644
--- a/src/library/tools/po/R-pl.po
+++ b/src/library/tools/po/R-pl.po
@@ -1,8 +1,8 @@
 msgid ""
 msgstr ""
-"Project-Id-Version: R 3.1.0\n"
+"Project-Id-Version: R 3.4.0\n"
 "Report-Msgid-Bugs-To: bugs.r-project.org\n"
-"POT-Creation-Date: 2014-01-26 09:09\n"
+"POT-Creation-Date: 2016-04-04 08:15\n"
 "PO-Revision-Date: \n"
 "Last-Translator: Łukasz Daniel <lukasz.daniel at gmail.com>\n"
 "Language-Team: Łukasz Daniel <lukasz.daniel at gmail.com>\n"
@@ -13,2820 +13,2215 @@ msgstr ""
 "na-Revision-Date: 2012-05-29 07:55+0100\n"
 "Plural-Forms: nplurals=3; plural=(n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 "
 "|| n%100>=20) ? 1 : 2);\n"
-"X-Poedit-SourceCharset: iso-8859-1\n"
-"X-Generator: Poedit 1.5.4\n"
+"X-Poedit-SourceCharset: UTF-8\n"
+"X-Generator: Poedit 1.8.7\n"
 "X-Poedit-Bookmarks: -1,232,-1,-1,-1,-1,-1,-1,-1,-1\n"
 
-# tools/R/Vignettes.R: 358
-# stop("argument 'package' must be of length 1")
-# tools/R/QC.R: 90
-# stop("argument 'package' must be of length 1")
-# tools/R/QC.R: 322
-# stop("argument 'package' must be of length 1")
-# tools/R/QC.R: 922
-# stop("argument 'package' must be of length 1")
-# tools/R/QC.R: 1087
-# stop("argument 'package' must be of length 1")
-# tools/R/QC.R: 1247
-# stop("argument 'package' must be of length 1")
-# tools/R/QC.R: 1503
-# stop("argument 'package' must be of length 1")
-# tools/R/QC.R: 1779
-# stop("argument 'package' must be of length 1")
-# tools/R/QC.R: 2254
-# stop("argument 'package' must be of length 1")
-# tools/R/QC.R: 2489
-# stop("argument 'package' must be of length 1")
-# tools/R/QC.R: 2634
-# stop("argument 'package' must be of length 1")
-# tools/R/QC.R: 2787
-# stop("argument 'package' must be of length 1")
-# tools/R/QC.R: 5051
-# stop("argument 'package' must be of length 1")
-# tools/R/QC.R: 5606
-# stop("argument 'package' must be of length 1")
-# tools/R/QC.R: 5667
-# stop("argument 'package' must be of length 1")
-# tools/R/QC.R: 5758
-# stop("argument 'package' must be of length 1")
-# tools/R/QC.R: 5883
-# stop("argument 'package' must be of length 1")
-# tools/R/QC.R: 6162
-# stop("argument 'package' must be of length 1")
-# tools/R/QC.R: 6763
-# stop("argument 'package' must be of length 1")
-# tools/R/QC.R: 6845
-# stop("argument 'package' must be of length 1")
-# tools/R/Rd.R: 277
-# stop("argument 'package' must be of length 1")
-msgid "argument 'package' must be of length 1"
-msgstr "argument 'package' musi być długości 1"
+#. R/QC.R: gettextf("  %s calls:", f)
+#. R/QC.R: gettextf("  %s calls:", f)
+#: R/QC.R:0
+msgid "%s calls:"
+msgstr "wywołania %s:"
 
-# tools/R/Vignettes.R: 362
-# stop("you must specify 'package' or 'dir'")
-# tools/R/QC.R: 107
-# stop("you must specify 'package' or 'dir'")
-# tools/R/QC.R: 361
-# stop("you must specify 'package' or 'dir'")
-# tools/R/QC.R: 1253
-# stop("you must specify 'package' or 'dir'")
-# tools/R/QC.R: 1547
-# stop("you must specify 'package' or 'dir'")
-# tools/R/QC.R: 2285
-# stop("you must specify 'package' or 'dir'")
-# tools/R/QC.R: 2517
-# stop("you must specify 'package' or 'dir'")
-# tools/R/QC.R: 5773
-# stop("you must specify 'package' or 'dir'")
-# tools/R/QC.R: 5901
-# stop("you must specify 'package' or 'dir'")
-# tools/R/QC.R: 6180
-# stop("you must specify 'package' or 'dir'")
-# tools/R/QC.R: 6851
-# stop("you must specify 'package' or 'dir'")
-# tools/R/Rd.R: 335
-# stop("you must specify 'package' or 'dir'")
-msgid "you must specify 'package' or 'dir'"
-msgstr "musisz określić argument 'package' lub 'dir'"
+#. R/QC.R: gettextf("  %s has wrong argument list %s", f, sQuote(paste(bad,     collapse = ", ")))
+#. R/QC.R: gettextf("  %s has wrong argument list %s", f, sQuote(paste(bad,     collapse = ", ")))
+#: R/QC.R:0
+msgid "%s has wrong argument list %s"
+msgstr "%s ma błędną listę argumentów %s"
 
-# tools/R/Vignettes.R: 365
-# stop(gettextf("directory '%s' does not exist", dir), domain = NA)
-# tools/R/Vignettes.R: 605
-# stop(gettextf("directory '%s' does not exist", dir), domain = NA)
-# tools/R/Vignettes.R: 805
-# stop(gettextf("directory '%s' does not exist", dir), domain = NA)
-# tools/R/Vignettes.R: 872
-# stop(gettextf("directory '%s' does not exist", dir), domain = NA)
-# tools/R/QC.R: 110
-# stop(gettextf("directory '%s' does not exist", dir),
-#                  domain = NA)
-# tools/R/QC.R: 364
-# stop(gettextf("directory '%s' does not exist", dir),
-#                  domain = NA)
-# tools/R/QC.R: 1256
-# stop(gettextf("directory '%s' does not exist", dir),
-#                  domain = NA)
-# tools/R/QC.R: 1550
-# stop(gettextf("directory '%s' does not exist", dir),
-#                  domain = NA)
-# tools/R/QC.R: 1816
-# stop(gettextf("directory '%s' does not exist", dir),
-#                  domain = NA)
-# tools/R/QC.R: 2288
-# stop(gettextf("directory '%s' does not exist", dir),
-#                  domain = NA)
-# tools/R/QC.R: 2520
-# stop(gettextf("directory '%s' does not exist", dir),
-#                  domain = NA)
-# tools/R/QC.R: 2652
-# stop(gettextf("directory '%s' does not exist", dir),
-#                  domain = NA)
-# tools/R/QC.R: 4333
-# stop(gettextf("directory '%s' does not exist", dir), domain = NA)
-# tools/R/QC.R: 4428
-# stop(gettextf("directory '%s' does not exist", dir), domain = NA)
-# tools/R/QC.R: 4454
-# stop(gettextf("directory '%s' does not exist", dir), domain = NA)
-# tools/R/QC.R: 5079
-# stop(gettextf("directory '%s' does not exist", dir),
-#                  domain = NA)
-# tools/R/QC.R: 5615
-# stop(gettextf("directory '%s' does not exist", dir), domain = NA)
-# tools/R/QC.R: 5646
-# stop(gettextf("directory '%s' does not exist", dir), domain = NA)
-# tools/R/QC.R: 6854
-# stop(gettextf("directory '%s' does not exist", dir),
-#                  domain = NA)
-# tools/R/admin.R: 209
-# stop(gettextf("directory '%s' does not exist", dir),
-#              domain = NA)
-# tools/R/admin.R: 346
-# stop(gettextf("directory '%s' does not exist", dir),
-#              domain = NA)
-# tools/R/admin.R: 349
-# stop(gettextf("directory '%s' does not exist", outDir),
-#              domain = NA)
-# tools/R/Rd.R: 338
-# stop(gettextf("directory '%s' does not exist", dir),
-#                  domain = NA)
-# tools/R/index.R: 48
-# stop(gettextf("directory '%s' does not exist", dataDir),
-#              domain = NA)
-# tools/R/index.R: 95
-# stop(gettextf("directory '%s' does not exist", demoDir),
-#              domain = NA)
-# tools/R/index.R: 122
-# stop(gettextf("directory '%s' does not exist", demoDir),
-#              domain = NA)
-msgid "directory '%s' does not exist"
-msgstr "katalog '%s' nie istnieje"
+#. R/pdftools.R: gettextf("%s must be a character string or a file/raw connection",     sQuote("file"))
+#: R/pdftools.R:0
+msgid "%s must be a character string or a file/raw connection"
+msgstr ""
+"argument %s musi być łańcuchem tekstowym lub połączeniem plikowym/prostym"
 
-# tools/R/QC.R: 163
-# message("neither code nor data objects found")
-msgid "neither code nor data objects found"
-msgstr "nie znaleziono kodu ani obiektów danych"
+#. R/check.R: message("'--as-cran' turns off '--extra-arch'")
+#: R/check.R:0
+msgid "'--as-cran' turns off '--extra-arch'"
+msgstr "opcja '--as-cran' wyłącza opcję '--extra-arch'"
 
-# tools/R/QC.R: 288
-# gettext("Undocumented code objects:")
-msgid "Undocumented code objects:"
-msgstr "Nieudokumentowane obiekty kodu:"
+#. R/check.R: warning("'--multiarch' specified with only one usable sub-architecture",     call. = FALSE, immediate. = TRUE)
+#: R/check.R:0
+msgid "'--multiarch' specified with only one usable sub-architecture"
+msgstr "'--multiarch' zdefiniowany tylko z jedną użyteczną pod-architekturą"
 
-# tools/R/QC.R: 290
-# gettext("Undocumented data sets:")
-msgid "Undocumented data sets:"
-msgstr "Nieudokumentowane zbiory danych:"
+#. R/QC.R: gettextf("'::' or ':::' import not declared from: %s", sQuote(xx))
+#: R/QC.R:0
+msgid "'::' or ':::' import not declared from: %s"
+msgstr "import '::' lub ':::' nie jest zadeklarowany z: %s"
 
-# tools/R/QC.R: 292
-# gettext("Undocumented S4 classes:")
-msgid "Undocumented S4 classes:"
-msgstr "Nieudokumentowane klasy S4:"
+#. R/QC.R: gettext("'::' or ':::' imports not declared from:")
+#: R/QC.R:0
+msgid "'::' or ':::' imports not declared from:"
+msgstr "importy '::' lub ':::' nie są zadeklarowane z:"
 
-# tools/R/QC.R: 294
-# gettext("Undocumented S4 methods:")
-msgid "Undocumented S4 methods:"
-msgstr "Nieudokumentowane metody S4:"
+#. R/QC.R: gettextf("':::' call which should be '::': %s", sQuote(xx))
+#: R/QC.R:0
+msgid "':::' call which should be '::': %s"
+msgstr "wywołanie ':::' które powinno być '::': %s"
 
-# tools/R/QC.R: 296
-# gettext("Prototyped non-primitives:")
-msgid "Prototyped non-primitives:"
-msgstr "Prototypowane funkcje nieelementarne:"
+#. R/QC.R: gettext("':::' calls which should be '::':")
+#: R/QC.R:0
+msgid "':::' calls which should be '::':"
+msgstr "wywołania ':::' które powinny być '::':"
 
-# tools/R/QC.R: 297
-# gettextf("Undocumented %s:", tag)
-msgid "Undocumented %s:"
-msgstr "Nieudokumentowane %s:"
+#. R/install.R: warning("'cleanup' exists but is not executable -- see the 'R Installation and Administration Manual'",     call. = FALSE)
+#: R/install.R:0
+msgid ""
+"'cleanup' exists but is not executable -- see the 'R Installation and "
+"Administration Manual'"
+msgstr ""
+"plik 'cleanup' istnieje, ale nie jest wykonywalny -- zobacz 'R Installation "
+"and Adminstration Manual'"
 
-# tools/R/QC.R: 327
-# stop(gettextf("directory '%s' does not contain R code",
-#                           dir),
-#                  domain = NA)
-# tools/R/QC.R: 370
-# stop(gettextf("directory '%s' does not contain R code",
-#                           dir),
-#                  domain = NA)
-# tools/R/QC.R: 925
-# stop(gettextf("directory '%s' does not contain R code", dir),
-#              domain = NA)
-# tools/R/QC.R: 1513
-# stop(gettextf("directory '%s' does not contain R code",
-#                           dir),
-#                  domain = NA)
-# tools/R/QC.R: 1556
-# stop(gettextf("directory '%s' does not contain R code",
-#                           dir),
-#                  domain = NA)
-# tools/R/QC.R: 1787
-# stop(gettextf("directory '%s' does not contain R code",
-#                           dir),
-#                  domain = NA)
-# tools/R/QC.R: 1834
-# stop(gettextf("directory '%s' does not contain R code",
-#                           dir),
-#                  domain = NA)
-# tools/R/QC.R: 2259
-# stop(gettextf("directory '%s' does not contain R code",
-#                           dir),
-#                  domain = NA)
-# tools/R/QC.R: 2294
-# stop(gettextf("directory '%s' does not contain R code",
-#                           dir),
-#                  domain = NA)
-# tools/R/QC.R: 2494
-# stop(gettextf("directory '%s' does not contain R code",
-#                           dir),
-#                  domain = NA)
-# tools/R/QC.R: 2526
-# stop(gettextf("directory '%s' does not contain R code",
-#                           dir),
-#                  domain = NA)
-# tools/R/QC.R: 5056
-# stop(gettextf("directory '%s' does not contain R code",
-#                           dir),
-#                  domain = NA)
-msgid "directory '%s' does not contain R code"
-msgstr "katalog '%s' nie zawiera kodu R"
+#. R/QC.R: gettextf("'data(package=)' call not declared from: %s", sQuote(xx))
+#: R/QC.R:0
+msgid "'data(package=)' call not declared from: %s"
+msgstr "wywołanie 'data(package=)' nie zostało zadeklarowane z: %s"
 
-# tools/R/QC.R: 331
-# stop(gettextf("directory '%s' does not contain Rd objects", dir),
-#                  domain = NA)
-# tools/R/QC.R: 374
-# stop(gettextf("directory '%s' does not contain Rd objects", dir),
-#                  domain = NA)
-# tools/R/QC.R: 928
-# stop(gettextf("directory '%s' does not contain Rd objects", dir),
-#              domain = NA)
-# tools/R/QC.R: 1517
-# stop(gettextf("directory '%s' does not contain Rd objects", dir),
-#                  domain = NA)
-# tools/R/QC.R: 1560
-# stop(gettextf("directory '%s' does not contain Rd objects", dir),
-#                  domain = NA)
-msgid "directory '%s' does not contain Rd objects"
-msgstr "katalog '%s' nie zawiera obiektów Rd"
+#. R/QC.R: gettext("'data(package=)' calls not declared from:")
+#: R/QC.R:0
+msgid "'data(package=)' calls not declared from:"
+msgstr "wywołania 'data(package=)' nie zostały zadeklarowane z:"
+
+#. R/QC.R: gettextf("'library' or 'require' call not declared from: %s",     sQuote(xx))
+#: R/QC.R:0
+msgid "'library' or 'require' call not declared from: %s"
+msgstr "wywołanie 'library' lub 'require' nie jest zadeklarowane z: %s"
 
-# tools/R/QC.R: 753
-# gettextf("Functions or methods with usage in documentation object '%s' but not in code:",
-#                                 fname)
+#. R/QC.R: gettextf("'library' or 'require' call to %s in package code.",     sQuote(xx))
+#: R/QC.R:0
+msgid "'library' or 'require' call to %s in package code."
+msgstr "wywołania 'library' lub 'require' do %s w kodzie pakietu"
+
+#. R/QC.R: gettextf("'library' or 'require' call to %s which was already attached by Depends.",     sQuote(xx))
+#: R/QC.R:0
 msgid ""
-"Functions or methods with usage in documentation object '%s' but not in code:"
+"'library' or 'require' call to %s which was already attached by Depends."
 msgstr ""
-"Funkcje lub metody z użyciem w obiekcie dokumentacji '%s' ale nie w kodzie:"
+"wywołanie 'library' lub 'require' do pakietu %s, który był już dołączony "
+"przez 'Depends'."
 
-# tools/R/QC.R: 764
-# gettextf("Data with usage in documentation object '%s' but not in code:",
-#                                 fname)
-msgid "Data with usage in documentation object '%s' but not in code:"
-msgstr "Dane z użyciem w obiekcie dokumentacji '%s', ale nie w kodzie:"
+#. R/QC.R: gettext("'library' or 'require' calls in package code:")
+#: R/QC.R:0
+msgid "'library' or 'require' calls in package code:"
+msgstr "wywołania 'library' lub 'require' w kodzie pakietu:"
 
-# tools/R/QC.R: 809
-# gettext("  Argument names in code not in docs:")
-msgid "Argument names in code not in docs:"
-msgstr "Nazwy argumentów w kodzie, ale nie w dokumentacji:"
+#. R/QC.R: gettext("'library' or 'require' calls not declared from:")
+#: R/QC.R:0
+msgid "'library' or 'require' calls not declared from:"
+msgstr "wywołania 'library' lub 'require' nie są zadeklarowane z:"
 
-# tools/R/QC.R: 813
-# gettext("  Argument names in docs not in code:")
-msgid "Argument names in docs not in code:"
-msgstr "Nazwy argumentów w dokumentacji, ale nie w kodzie:"
+#. R/QC.R: gettext("'library' or 'require' calls to packages already attached by Depends:")
+#: R/QC.R:0
+msgid "'library' or 'require' calls to packages already attached by Depends:"
+msgstr ""
+"wywołania 'library' lub 'require' do pakietów, które były już dołączone "
+"przez 'Depends':"
 
-# tools/R/QC.R: 825
-# gettext("  Mismatches in argument names (first 3):")
-msgid "Mismatches in argument names (first 3):"
-msgstr "Niezgodność w nazwach argumentów (pierwsze 3):"
+#. R/QC.R: gettextf("'loadNamespace' or 'requireNamespace' call not declared from: %s",     sQuote(xx))
+#: R/QC.R:0
+msgid "'loadNamespace' or 'requireNamespace' call not declared from: %s"
+msgstr ""
+"wywołanie 'loadNamespace()' lub 'requireNamespace()' nie jest zadeklarowane "
+"z: %s"
 
-# tools/R/QC.R: 828
-# gettext("  Mismatches in argument names:")
-msgid "Mismatches in argument names:"
-msgstr "Niezgodność w nazwach argumentów:"
+#. R/QC.R: gettext("'loadNamespace' or 'requireNamespace' calls not declared from:")
+#: R/QC.R:0
+msgid "'loadNamespace' or 'requireNamespace' calls not declared from:"
+msgstr ""
+"wywołania 'loadNamespace()' lub 'requireNamespace()' nie są zadeklarowane z:"
 
-# tools/R/QC.R: 847
-# gettext("  Mismatches in argument default values (first 3):")
-msgid "Mismatches in argument default values (first 3):"
-msgstr "Niezgodność w domyslnych wartościach argumentów (pierwsze 3): "
+#. R/Rd.R: stop("'macros' must be TRUE or must specify existing macros")
+#: R/Rd.R:0
+msgid "'macros' must be TRUE or must specify existing macros"
+msgstr ""
+"argument 'macros' musi mieć wartość TRUE lub musi określać istniejące makra"
 
-# tools/R/QC.R: 850
-# gettext("  Mismatches in argument default values:")
-msgid "Mismatches in argument default values:"
-msgstr "Niezgodność w domyślnych wartościach argumentów:"
+#. R/utils.R: stop("'text' must be a character vector")
+#: R/utils.R:0
+msgid "'text' must be a character vector"
+msgstr "argument 'text' musi być wektorem tekstowym"
 
-# tools/R/QC.R: 882
-# gettextf("Codoc mismatches from documentation object '%s':",
-#                             fname)
-msgid "Codoc mismatches from documentation object '%s':"
-msgstr "Niezgodność struktury w obiekcie dokumentacji '%s':"
+#. R/Rd2pdf.R: stop("'type' must be one of 'txt', 'html', 'latex' or 'example'",     call. = FALSE)
+#: R/Rd2pdf.R:0
+msgid "'type' must be one of 'txt', 'html', 'latex' or 'example'"
+msgstr "'type' musi być jednym z 'txt', 'html', 'latex' lub 'example'"
 
-# tools/R/QC.R: 889
-# gettextf("Code: %s", format_args(ffc))
-# tools/R/QC.R: 1229
-# gettextf("Code: %s", format_args(docObj[["code"]]))
-msgid "Code: %s"
-msgstr "Kod: %s"
+#. R/utils.R: stop("'x' must be a single character string")
+#: R/utils.R:0
+msgid "'x' must be a single character string"
+msgstr "argument 'x' musi być pojedynczym łańcuchem tekstowym"
 
-# tools/R/QC.R: 891
-# gettextf("Docs: %s", format_args(ffd))
-# tools/R/QC.R: 1231
-# gettextf("Docs: %s", format_args(docObj[["docs"]]))
-msgid "Docs: %s"
-msgstr "Dokumenty: %s"
+#. R/admin.R: gettextf("*** someone has corrupted the Built field in package '%s' ***",     db["Package"])
+#. R/admin.R: gettextf("*** someone has corrupted the Built field in package '%s' ***",     db["Package"])
+#: R/admin.R:0
+msgid "*** someone has corrupted the Built field in package '%s' ***"
+msgstr "*** ktoś uszkodził pole 'Built' w pakiecie %s ***"
 
-# tools/R/QC.R: 1054
-# gettextf("S4 class codoc mismatches from documentation object '%s':",
-#                    nm)
-msgid "S4 class codoc mismatches from documentation object '%s':"
-msgstr "Niezgodność struktury klasy S4 w obiekcie dokumentacji '%s':"
+#. R/check.R: stop("-l option without value", call. = FALSE)
+#. R/install.R: stop("-l option without value", call. = FALSE)
+#: R/check.R:0 R/install.R:0
+msgid "-l option without value"
+msgstr "opcja '-l' bez wartości"
 
-# tools/R/QC.R: 1056
-# gettextf("Slots for class '%s'", docObj[["name"]])
-msgid "Slots for class '%s'"
-msgstr "Gniazda dla klasy \"%s\""
+#. R/Rd2pdf.R: stop("-o option without value", call. = FALSE)
+#. R/Rd2pdf.R: stop("-o option without value", call. = FALSE)
+#. R/check.R: stop("-o option without value", call. = FALSE)
+#. R/install.R: stop("-o option without value", call. = FALSE)
+#: R/Rd2pdf.R:0 R/check.R:0 R/install.R:0
+msgid "-o option without value"
+msgstr "opcja '-o' bez wartości"
 
-# tools/R/QC.R: 1227
-# gettextf("Data codoc mismatches from documentation object '%s':", nm)
-msgid "Data codoc mismatches from documentation object '%s':"
-msgstr "Niezgodność struktury danych w obiekcie dokumentacji '%s':"
+#. R/Rd2pdf.R: stop("-t option without value", call. = FALSE)
+#: R/Rd2pdf.R:0
+msgid "-t option without value"
+msgstr "opcja '-t' bez wartości"
 
-# tools/R/QC.R: 1228
-# gettextf("Variables in data frame '%s'", docObj[["name"]])
-msgid "Variables in data frame '%s'"
-msgstr "Zmienne w ramce danych '%s'"
+#. R/QC.R: gettext("All field tags must be ASCII.")
+#. R/QC.R: gettext("All field tags must be ASCII.")
+#: R/QC.R:0
+msgid "All field tags must be ASCII."
+msgstr "Wszystkie znaczniki pola muszą być w standardzie ASCII."
 
-# tools/R/QC.R: 1444
-# gettextf("Undocumented arguments in documentation object '%s'",
-#                          nm)
-msgid "Undocumented arguments in documentation object '%s'"
-msgstr "Nieudokumentowane argumenty w obiekcie dokumentacji '%s'"
+#. R/Vignettes.R: gettextf("Argument %s must be a character vector or NULL and not %s",     sQuote("pattern"), sQuote(class(pattern)[1L]))
+#: R/Vignettes.R:0
+msgid "Argument %s must be a character vector or NULL and not %s"
+msgstr "Argument %s musi być łańcuchem tekstowym lub wartością NULL, a nie %s"
 
-# tools/R/QC.R: 1450
-# gettextf("Duplicated \\argument entries in documentation object '%s':",
-#                          nm)
-msgid "Duplicated \\argument entries in documentation object '%s':"
-msgstr "Powtórzone wpisy '\\argument' w obiekcie dokumentacji '%s':"
+#. R/Vignettes.R: gettextf("Argument %s must be a function and not %s", sQuote("weave"),     sQuote(class(weave)[1L]))
+#. R/Vignettes.R: gettextf("Argument %s must be a function and not %s", sQuote("tangle"),     sQuote(class(tangle)[1L]))
+#: R/Vignettes.R:0
+msgid "Argument %s must be a function and not %s"
+msgstr "Argument %s musi być funkcją a nie %s"
 
-# tools/R/QC.R: 1456
-# gettextf("Documented arguments not in \\usage in documentation object '%s':",
-#                          nm)
-msgid "Documented arguments not in \\usage in documentation object '%s':"
-msgstr ""
-"Udokumentowane argumenty nie są w '\\usage' w obiekcie dokumentacji '%s':"
+#. R/QC.R: gettextf("Argument items with no description in Rd object '%s':",     nm)
+#: R/QC.R:0
+msgid "Argument items with no description in Rd object '%s':"
+msgstr "Pozycje argumentu bez opisu w obiekcie Rd '%s':"
 
-# tools/R/QC.R: 1462
-# gettextf("Objects in \\usage without \\alias in documentation object '%s':",
-#                          nm)
-msgid "Objects in \\usage without \\alias in documentation object '%s':"
-msgstr "Obiekty w '\\usage' bez '\\alias' w obiekcie dokumentacji '%s':"
+#. R/QC.R: gettext("  Argument names in code not in docs:")
+#: R/QC.R:0
+msgid "Argument names in code not in docs:"
+msgstr "Nazwy argumentów w kodzie, ale nie w dokumentacji:"
 
-# tools/R/QC.R: 1468
-# gettextf("Assignments in \\usage in documentation object '%s':",
-#                          nm)
-msgid "Assignments in \\usage in documentation object '%s':"
-msgstr "Przypisania w '\\usage' w obiekcie dokumentacji '%s':"
+#. R/QC.R: gettext("  Argument names in docs not in code:")
+#: R/QC.R:0
+msgid "Argument names in docs not in code:"
+msgstr "Nazwy argumentów w dokumentacji, ale nie w kodzie:"
 
-# tools/R/QC.R: 1483
-# gettextf("Bad \\usage lines found in documentation object '%s':",
-#                                             nm)
-msgid "Bad \\usage lines found in documentation object '%s':"
-msgstr "Znaleziono niepoprawne linie '\\usage' w obiekcie dokumentacji '%s':"
+#. R/assertCondition.R: sprintf("Asserted error: %s", error[[1]]$message)
+#: R/assertCondition.R:0
+msgid "Asserted error: %s"
+msgstr "Założony błąd: %s"
 
-# tools/R/QC.R: 1748
-# gettextf("S3 methods shown with full name in documentation object '%s':",
-#                        nm)
-msgid "S3 methods shown with full name in documentation object '%s':"
-msgstr "Metody S3 pokazane z pełną nazwą w obiekcie dokumentacji '%s':"
+#. R/assertCondition.R: sprintf("Asserted warning: %s", warning[[1]]$message)
+#: R/assertCondition.R:0
+msgid "Asserted warning: %s"
+msgstr "Założone ostrzeżenie: %s"
 
-# tools/R/QC.R: 1848
-# stop("you must specify 'package', 'dir' or 'file'")
-# tools/R/QC.R: 2671
-# stop("you must specify 'package', 'dir' or 'file'")
-msgid "you must specify 'package', 'dir' or 'file'"
-msgstr "musisz określić 'package', 'dir' lub 'file'"
+#. R/QC.R: gettextf("Assignments in \\usage in documentation object '%s':",     nm)
+#: R/QC.R:0
+msgid "Assignments in \\usage in documentation object '%s':"
+msgstr "Przypisania w '\\usage' w obiekcie dokumentacji '%s':"
 
-# tools/R/utils.R: 42
-# stop(gettextf("file '%s' does not exist", x),
-#              domain = NA)
-# tools/R/utils.R: 1434
-# stop(gettextf("file '%s' does not exist", dfile), domain = NA)
-# tools/R/QC.R: 1851
-# stop(gettextf("file '%s' does not exist", file),
-#              domain = NA)
-# tools/R/QC.R: 2665
-# stop(gettextf("file '%s' does not exist", file),
-#                  domain = NA)
-msgid "file '%s' does not exist"
-msgstr "plik '%s' nie istnieje"
+#. R/QC.R: gettext("Authors at R field gives more than one person with maintainer role:")
+#: R/QC.R:0
+msgid "Authors at R field gives more than one person with maintainer role:"
+msgstr "Pole 'Authors at R' zawiera więcej niż jedną osobę z rolą opiekuna:"
 
-# tools/R/QC.R: 2112
-# stop(gettextf("parse error in file '%s':\n%s",
-#                                    file,
-#                                    .massage_file_parse_error_message(conditionMessage(e))),
-#                           domain = NA, call. = FALSE)
-# tools/R/QC.R: 5211
-# stop(gettextf("parse error in file '%s':\n%s",
-#                                    file,
-#                                    .massage_file_parse_error_message(conditionMessage(e))),
-#                                domain = NA, call. = FALSE)
-# tools/R/QC.R: 5575
-# warning(gettextf("parse error in file '%s':\n%s", f,
-#                                       .massage_file_parse_error_message(conditionMessage(e))),
-#                              domain = NA, call. = FALSE)
-# tools/R/QC.R: 5586
-# warning(gettextf("parse error in file '%s':\n%s",
-#                                   summary(files)$description,
-#                                   .massage_file_parse_error_message(conditionMessage(e))),
-#                          domain = NA, call. = FALSE)
+#. R/QC.R: gettext("Authors at R field gives no person with author role.")
+#: R/QC.R:0
+msgid "Authors at R field gives no person with author role."
+msgstr "Pole 'Authors at R' nie zawiera danych osoby z rolą autora."
+
+#. R/QC.R: gettext("Authors at R field gives no person with maintainer role, valid email address and non-empty name.")
+#: R/QC.R:0
 msgid ""
-"parse error in file '%s':\n"
-"%s"
+"Authors at R field gives no person with maintainer role, valid email address "
+"and non-empty name."
 msgstr ""
-"błąd przetwarzania w pliku '%s':\n"
-"%s"
+"Pole 'Authors at R' nie zawiera danych osoby z rolą opiekuna, poprawnym adresem "
+"e-mail oraz niepustą nazwą."
 
-# tools/R/QC.R: 2372
-# warning(gettextf("declared S3 method '%s' not found",
-#                                  m),
-#                         domain = NA,
-#                         call. = FALSE)
-msgid "declared S3 method '%s' not found"
-msgstr "zadeklarowana metoda S3 '%s' nie została znaleziona"
+#. R/QC.R: gettext("Authors at R field gives persons with no valid roles:")
+#: R/QC.R:0
+msgid "Authors at R field gives persons with no valid roles:"
+msgstr "Pole 'Authors at R' wskazuje na osoby z niepoprawnymi rolami:"
 
-# tools/R/QC.R: 2638
-# warning("cannot check R code installed as image")
-msgid "cannot check R code installed as image"
-msgstr "nie można sprawdzić kodu R zainstalowanego jako obraz"
+#. R/QC.R: gettextf("Auto-generated content requiring editing in Rd object '%s':",     nm)
+#: R/QC.R:0
+msgid "Auto-generated content requiring editing in Rd object '%s':"
+msgstr ""
+"Automatycznie wygenerowana treść wymagająca wykonania edycji w obiekcie Rd "
+"'%s':"
 
-# tools/R/QC.R: 2694
-# stop(gettextf("parse error in file '%s':\n",
-#                                    file,
-#                                    .massage_file_parse_error_message(conditionMessage(e))),
-#                           domain = NA, call. = FALSE)
-msgid "parse error in file '%s':"
-msgstr "błąd przetwarzania w pliku '%s':"
+#. R/QC.R: gettextf("Bad \\usage lines found in documentation object '%s':",     nm)
+#: R/QC.R:0
+msgid "Bad \\usage lines found in documentation object '%s':"
+msgstr "Znaleziono niepoprawne linie '\\usage' w obiekcie dokumentacji '%s':"
 
-# tools/R/QC.R: 2701
-# stop(gettextf("parse error in examples from file '%s':\n",
-#                                    file, conditionMessage(e)),
-#                           domain = NA, call. = FALSE)
-msgid "parse error in examples from file '%s':"
-msgstr "błąd przetwarzania w przykładach z pliku '%s':"
+#. R/utils.R: stop(conditionMessage(e), "\nCall sequence:\n", paste(.eval_with_capture(traceback(tb))$output,     collapse = "\n"), call. = FALSE)
+#: R/utils.R:0
+msgid "Call sequence:"
+msgstr "Sekwencja wywołania:"
 
-# tools/R/QC.R: 2737
-# gettextf("File '%s':", fname)
-# tools/R/QC.R: 6671
-# sprintf("File '%s':", e[1L])
-msgid "File '%s':"
-msgstr "Plik '%s':"
+#. R/Vignettes.R: gettextf("Cannot change the %s engine or use an engine of that name",     sQuote("Sweave"))
+#: R/Vignettes.R:0
+msgid "Cannot change the %s engine or use an engine of that name"
+msgstr "Nie można zmienić silnika %s lub użyć silnika o tej nazwie"
 
-# tools/R/QC.R: 2740
-# gettextf("found T/F in %s",
-#                                              paste(deparse(xfname[[i]]),
-#                                                    collapse = ""))
-msgid "found T/F in %s"
-msgstr "znaleziono wartości T/F w %s"
+#. R/QC.R: gettext("Cannot extract Author field from Authors at R field:")
+#: R/QC.R:0
+msgid "Cannot extract Author field from Authors at R field:"
+msgstr "Nie można wydobyć pola 'Author' z pola 'Authors at R':"
 
-# tools/R/QC.R: 2796
-# message(sprintf(
-#             "package name '%s' seems invalid; using directory name '%s' instead",
-#             package_name, dir_name))
-msgid "package name '%s' seems invalid; using directory name '%s' instead"
+#. R/QC.R: gettext("Cannot extract Maintainer field from Authors at R field:")
+#: R/QC.R:0
+msgid "Cannot extract Maintainer field from Authors at R field:"
+msgstr "Nie można wyodrębnić pola 'Maintainer' z pola 'Authors at R':"
+
+#. R/news.R: warning("Cannot extract version info from the following section titles:\n",     paste(unique(nms[!ind]), collapse = "  "))
+#: R/news.R:0
+msgid "Cannot extract version info from the following section titles:"
 msgstr ""
-"nazwa pakietu '%s' wygląda na niepoprawną; zamiast niej używanie nazwy "
-"katalogu '%s'"
+"Nie można wyodrębnić informacji o wersji z następujących tytułów sekcji:"
 
-# tools/R/QC.R: 3002
-# gettextf("Vignette dependencies (%s entries) must be contained in the DESCRIPTION Depends/Suggests/Imports entries.",
-#                              "\\VignetteDepends{}")
+#. R/news.R: gettextf("Cannot process chunk/lines:\n%s", .collapse(x))
+#: R/news.R:0
 msgid ""
-"Vignette dependencies (%s entries) must be contained in the DESCRIPTION "
-"Depends/Suggests/Imports entries."
+"Cannot process chunk/lines:\n"
+"%s"
 msgstr ""
-"Zależności ilustracji (wpisy %s) muszą być zawarte we wpisach 'Depends/"
-"Suggests/Imports'."
+"Nie można przetwarzać fragmentu/linii:\n"
+"%s"
 
-# tools/R/QC.R: 3096
-# gettext("Malformed package name")
-msgid "Malformed package name"
-msgstr "Źle sformatowana nazwa pakietu"
+#. R/bibstyle.R: stop("Changes require specified 'style'")
+#: R/bibstyle.R:0
+msgid "Changes require specified 'style'"
+msgstr "Zmiany wymagają określonego 'style'"
 
-# tools/R/QC.R: 3180
-# gettext("Unknown encoding")
-msgid "Unknown encoding"
-msgstr "Nieznane kodowanie"
+#. R/CRANtools.R: sprintf("Checking %s", m)
+#: R/CRANtools.R:0
+msgid "Checking %s"
+msgstr "sprawdzanie %s"
 
-# tools/R/QC.R: 3183
-# gettext("Fields with non-ASCII tags:")
-# tools/R/QC.R: 3460
-# gettext("Fields with non-ASCII tags:")
-msgid "Fields with non-ASCII tags:"
-msgstr "Pola ze znacznikami innymi niż ASCII:"
+#. R/news.R: sprintf("\nChunk %s:\n%s", format(seq_along(bad)), bad)
+#: R/news.R:0
+msgid ""
+"Chunk %s:\n"
+"%s"
+msgstr ""
+"Fragment %s:\n"
+"%s"
 
-# tools/R/QC.R: 3185
-# gettext("All field tags must be ASCII.")
-# tools/R/QC.R: 3462
-# gettext("All field tags must be ASCII.")
-msgid "All field tags must be ASCII."
-msgstr "Wszystkie znaczniki pola muszą być w standardzie ASCII."
+#. R/dynamicHelp.R: gettext("Code demonstrations:")
+#: R/dynamicHelp.R:0
+msgid "Code demonstrations:"
+msgstr "Przykładowe użycia kodu:"
 
-# tools/R/QC.R: 3189
-# gettext("Fields with non-ASCII values:")
-# tools/R/QC.R: 3466
-# gettext("Fields with non-ASCII values:")
-msgid "Fields with non-ASCII values:"
-msgstr "Pola z wartościami innymi niż ASCII:"
+#. R/QC.R: gettextf("Code: %s", format_args(ffc))
+#. R/QC.R: gettextf("Code: %s", format_args(docObj[["code"]]))
+#: R/QC.R:0
+msgid "Code: %s"
+msgstr "Kod: %s"
 
-# tools/R/QC.R: 3191
-# gettext("These fields must have ASCII values.")
-msgid "These fields must have ASCII values."
-msgstr "Te pola muszą mieć wartości ASCII."
+#. R/QC.R: gettextf("Codoc mismatches from documentation object '%s':",     fname)
+#: R/QC.R:0
+msgid "Codoc mismatches from documentation object '%s':"
+msgstr "Niezgodność struktury w obiekcie dokumentacji '%s':"
 
-# tools/R/QC.R: 3208
-# gettext("Malformed package version.")
-msgid "Malformed package version."
-msgstr "Źle sformatowana wersja pakietu."
+#. R/testing.R: gettextf("  Comparing %s to %s ...", sQuote(outfile), sQuote(savefile))
+#: R/testing.R:0
+msgid "Comparing %s to %s ..."
+msgstr "Porównywanie %s z %s ..."
 
-# tools/R/QC.R: 3211
-# gettext("Malformed maintainer field.")
-msgid "Malformed maintainer field."
-msgstr "Źle sformatowane pole opiekuna."
+#. R/Rd2pdf.R: message("Converting Rd files to LaTeX ...")
+#: R/Rd2pdf.R:0
+msgid "Converting Rd files to LaTeX ..."
+msgstr "Konwertowanie plików Rd do LaTeX'a ..."
 
-# tools/R/QC.R: 3215
-# gettext("Malformed Depends or Suggests or Imports or Enhances field.")
-msgid "Malformed Depends or Suggests or Imports or Enhances field."
+#. R/news.R: stop("Could not extract news from the following text chunks:\n",     paste(sprintf("\nChunk %s:\n%s", format(seq_along(bad)),         bad), collapse = "\n"))
+#: R/news.R:0
+msgid "Could not extract news from the following text chunks:"
 msgstr ""
-"Błędnie sformatowane pole 'Depends' lub 'Suggests' lub 'Imports' lub "
-"'Enhances'."
-
-# tools/R/QC.R: 3217
-# gettext("Offending entries:")
-msgid "Offending entries:"
-msgstr "Przeszkadzające wpisy:"
+"Nie można było wyodrębnić wiadomości z następujących fragmentów tekstu:"
 
-# tools/R/QC.R: 3219
-# gettextf("Entries must be names of packages optionally followed by '<=' or '>=', white space, and a valid version number in parentheses.")
-msgid ""
-"Entries must be names of packages optionally followed by '<=' or '>=', white "
-"space, and a valid version number in parentheses."
-msgstr ""
-"Wpisy muszą być nazwami pakietów po których opcjonalnie może wystąpić '<=' "
-"lub '>=', biała spacja oraz poprawny numer wersji w nawiasach."
+#. R/RdHelpers.R: gettextf("DESCRIPTION file is for package '%s', not '%s'", desc["Package"],     pkg)
+#. R/RdHelpers.R: gettextf("DESCRIPTION file is for package '%s', not '%s'", desc["Package"],     pkg)
+#. R/RdHelpers.R: gettextf("DESCRIPTION file is for package '%s', not '%s'", desc["Package"],     pkg)
+#. R/RdHelpers.R: gettextf("DESCRIPTION file is for package '%s', not '%s'", desc["Package"],     pkg)
+#. R/RdHelpers.R: gettextf("DESCRIPTION file is for package '%s', not '%s'", desc["Package"],     pkg)
+#: R/RdHelpers.R:0
+msgid "DESCRIPTION file is for package '%s', not '%s'"
+msgstr "plik 'DESCRIPTION' jest dla pakietu '%s', a nie dla '%s'"
+
+#. R/news.R: stop("DESCRIPTION file not found")
+#. R/news.R: stop("DESCRIPTION file not found")
+#: R/news.R:0
+msgid "DESCRIPTION file not found"
+msgstr "plik 'DESCRIPTION' nie został znaleziony"
+
+#. R/testing.R: message("DIFFERED")
+#. R/testing.R: message("DIFFERED")
+#: R/testing.R:0
+msgid "DIFFERED"
+msgstr "RÓŻNICE"
 
-# tools/R/QC.R: 3223
-# gettext("Entries with infeasible comparison operator:")
-msgid "Entries with infeasible comparison operator:"
-msgstr "Wpisy z mało prawdopodobnym operatorem porównania:"
+#. R/QC.R: gettextf("Data codoc mismatches from documentation object '%s':",     nm)
+#: R/QC.R:0
+msgid "Data codoc mismatches from documentation object '%s':"
+msgstr "Niezgodność struktury danych w obiekcie dokumentacji '%s':"
 
-# tools/R/QC.R: 3225
-# gettextf("Only operators '<=' and '>=' are possible.")
-msgid "Only operators '<=' and '>=' are possible."
-msgstr "Jedynie operatory '<=' oraz '>=' są możliwe."
+#. R/QC.R: gettextf("Data with usage in documentation object '%s' but not in code:",     fname)
+#: R/QC.R:0
+msgid "Data with usage in documentation object '%s' but not in code:"
+msgstr "Dane z użyciem w obiekcie dokumentacji '%s', ale nie w kodzie:"
 
-# tools/R/QC.R: 3230
-# gettext("Entries with infeasible version number:")
-msgid "Entries with infeasible version number:"
-msgstr "Wpisy z mało prawdopodobnym numerem wersji:"
+#. R/QC.R: gettextf("Deprecated license: %s", paste(y, collapse = " "))
+#: R/QC.R:0
+msgid "Deprecated license: %s"
+msgstr "Przestarzała licencja: %s"
 
-# tools/R/QC.R: 3232
-# gettextf("Version numbers must be sequences of at least two non-negative integers, separated by single '.' or '-'.")
+#. R/Vignettes.R: gettextf("Detected vignette source files (%s) with shared names (%s) and therefore risking overwriting each others output files",     paste(sQuote(docs), collapse = ", "), paste(sQuote(names),         collapse = ", "))
+#: R/Vignettes.R:0
 msgid ""
-"Version numbers must be sequences of at least two non-negative integers, "
-"separated by single '.' or '-'."
+"Detected vignette source files (%s) with shared names (%s) and therefore "
+"risking overwriting each others output files"
 msgstr ""
-"Numery wersji muszą być ciągiem co najmniej dwóch nieujemnych liczb "
-"całkowitych, oddzielonych pojedynczym znakiem '.' lub '-'."
+"Wykryto pliki źródłowe ilustracji (%s) ze współdzielonymi nazwami (%s) w "
+"efekcie czego istnieje ryzyko nadpisania każdego z ich plików wyjściowych"
 
-# tools/R/QC.R: 3238
-# gettext("Invalid VignetteBuilder field.")
-msgid "Invalid VignetteBuilder field."
-msgstr "Niepoprawne pole 'VignetteBuilder'."
+#. R/QC.R: gettextf("Docs: %s", format_args(ffd))
+#. R/QC.R: gettextf("Docs: %s", format_args(docObj[["docs"]]))
+#: R/QC.R:0
+msgid "Docs: %s"
+msgstr "Dokumenty: %s"
 
-# tools/R/QC.R: 3239
-# gettextf("This field must contain one or more packages (and no version requirement).")
-msgid ""
-"This field must contain one or more packages (and no version requirement)."
+#. R/QC.R: gettextf("Documented arguments not in \\usage in documentation object '%s':",     nm)
+#: R/QC.R:0
+msgid "Documented arguments not in \\usage in documentation object '%s':"
 msgstr ""
-"To pole musi zawierać jeden lub więcej pakietów (nie jest wymagana wersja)."
+"Udokumentowane argumenty nie są w '\\usage' w obiekcie dokumentacji '%s':"
 
-# tools/R/QC.R: 3244
-# gettext("Invalid Priority field.")
-msgid "Invalid Priority field."
-msgstr "Niepoprawne pole priorytetu."
+#. R/QC.R: gettextf("Duplicated \\argument entries in documentation object '%s':",     nm)
+#: R/QC.R:0
+msgid "Duplicated \\argument entries in documentation object '%s':"
+msgstr "Powtórzone wpisy '\\argument' w obiekcie dokumentacji '%s':"
 
-# tools/R/QC.R: 3245
-# gettextf("Packages with priorities 'base' or 'recommended' or 'defunct-base' must already be known to R.")
-msgid ""
-"Packages with priorities 'base' or 'recommended' or 'defunct-base' must "
-"already be known to R."
-msgstr ""
-"Pakiety z priorytetami 'base' lub 'recommended' lub 'defunct-base' muszą być "
-"już być znane R."
+#. R/pdftools.R: stop("EOF marker not found")
+#: R/pdftools.R:0
+msgid "EOF marker not found"
+msgstr "nie znaleziono znacznika EOF"
 
-# tools/R/QC.R: 3249
-# gettextf("See the information on DESCRIPTION files in section 'Creating R packages' of the 'Writing R Extensions' manual.")
-# tools/R/QC.R: 3470
-# gettextf("See the information on DESCRIPTION files in section 'Creating R packages' of the 'Writing R Extensions' manual.")
-msgid ""
-"See the information on DESCRIPTION files in section 'Creating R packages' of "
-"the 'Writing R Extensions' manual."
+#. R/install.R: stop("ERROR: '--merge-multiarch' applies only to a single tarball",     call. = FALSE)
+#: R/install.R:0
+msgid "ERROR: '--merge-multiarch' applies only to a single tarball"
 msgstr ""
-"Zobacz informację o plikach DESCRIPTION w sekcji  'Creating R packages' "
-"podręcznika 'Writing R Extensions'."
+"BŁĄD: '--merge-multiarch' stosuje się tylko do pojedynczego pliku tarball"
 
-# tools/R/QC.R: 3391
-# gettext("Malformed Authors at R field:")
-msgid "Malformed Authors at R field:"
-msgstr "Źle sformułowane pole Authors at R:"
+#. R/install.R: gettextf("ERROR: cannot cd to directory %s", sQuote(lib))
+#: R/install.R:0
+msgid "ERROR: cannot cd to directory %s"
+msgstr "BŁĄD: nie można wejść do katalogu %s"
 
-# tools/R/QC.R: 3395
-# gettext("Cannot extract Author field from Authors at R field:")
-msgid "Cannot extract Author field from Authors at R field:"
-msgstr "Nie można wydobyć pola 'Author' z pola 'Authors at R':"
+#. R/check.R: sprintf("ERROR: cannot create check dir %s", sQuote(pkgoutdir))
+#: R/check.R:0
+msgid "ERROR: cannot create check dir %s"
+msgstr "BŁĄD: nie można utworzyć katalogu sprawdzenia %s"
 
-# tools/R/QC.R: 3399
-# gettext("Authors at R field gives no person with author role.")
-msgid "Authors at R field gives no person with author role."
-msgstr "Pole 'Authors at R' nie zawiera danych osoby z rolą autora."
+#. R/install.R: stop("ERROR: no packages specified", call. = FALSE)
+#: R/install.R:0
+msgid "ERROR: no packages specified"
+msgstr "BŁĄD: nie określono pakietów"
 
-# tools/R/QC.R: 3403
-# gettext("Authors at R field gives persons with no valid roles:")
-msgid "Authors at R field gives persons with no valid roles:"
-msgstr "Pole 'Authors at R' wskazuje na osoby z niepoprawnymi rolami:"
+#. R/install.R: stop("ERROR: no permission to install to directory ", sQuote(lib),     call. = FALSE)
+#: R/install.R:0
+msgid "ERROR: no permission to install to directory"
+msgstr "BŁĄD: brak uprawnień aby zainstalować w katalogu"
 
-# tools/R/QC.R: 3407
-# gettext("Cannot extract Maintainer field from Authors at R field:")
-msgid "Cannot extract Maintainer field from Authors at R field:"
-msgstr "Nie można wyodrębnić pola 'Maintainer' z pola 'Authors at R':"
+#. R/admin.R: gettextf("ERROR: this R is version %s, package '%s' requires R %s %s",     current, package, depends$op, depends$version)
+#: R/admin.R:0
+msgid "ERROR: this R is version %s, package '%s' requires R %s %s"
+msgstr "BŁĄD: Ta wersja R to %s, pakiet %s wymaga wersji R %s %s"
 
-# tools/R/QC.R: 3411
-# gettext("Authors at R field gives no person with maintainer role and email address.")
-msgid "Authors at R field gives no person with maintainer role and email address."
-msgstr ""
-"Pole 'Authors at R' nie zawiera danych osoby z rolą opiekuna oraz adresem email."
+#. R/admin.R: gettextf("ERROR: this R is version %s, required is R %s %s",     current, depends$op, depends$version)
+#: R/admin.R:0
+msgid "ERROR: this R is version %s, required is R %s %s"
+msgstr "BŁĄD: wersja tego programu to R %s, wymagana jest R %s %s"
 
-# tools/R/QC.R: 3452
-# gettextf("Encoding '%s' is not portable",
-#                      x$non_portable_encoding)
+#. R/QC.R: gettextf("Encoding '%s' is not portable", x$non_portable_encoding)
+#: R/QC.R:0
 msgid "Encoding '%s' is not portable"
 msgstr "Strona kodowa '%s' nie jest przenośna"
 
-# tools/R/QC.R: 3457
-# gettext("Unknown encoding with non-ASCII data")
-msgid "Unknown encoding with non-ASCII data"
-msgstr "Nieznane kodowanie z danymi nie-ASCII"
+#. R/Vignettes.R: gettextf("Engine name %s and package %s do not match", sQuote(name),     sQuote(package))
+#: R/Vignettes.R:0
+msgid "Engine name %s and package %s do not match"
+msgstr "Nazwa silnika ilustracji %s oraz pakietu %s nie zgadzają się"
 
-# tools/R/QC.R: 3555
-# gettext("Non-standard license specification:")
-msgid "Non-standard license specification:"
-msgstr "Niestandardowa specyfikacja licencji:"
+#. R/QC.R: gettextf("Entries must be names of packages optionally followed by '<=' or '>=', white space, and a valid version number in parentheses.")
+#: R/QC.R:0
+msgid ""
+"Entries must be names of packages optionally followed by '<=' or '>=', white "
+"space, and a valid version number in parentheses."
+msgstr ""
+"Wpisy muszą być nazwami pakietów po których opcjonalnie może wystąpić '<=' "
+"lub '>=', biała spacja oraz poprawny numer wersji w nawiasach."
 
-# tools/R/QC.R: 3557
-# gettextf("Standardizable: %s", x$is_standardizable)
-msgid "Standardizable: %s"
-msgstr "Standaryzowalne: %s"
+#. R/QC.R: gettext("Entries with infeasible comparison operator:")
+#: R/QC.R:0
+msgid "Entries with infeasible comparison operator:"
+msgstr "Wpisy z mało prawdopodobnym operatorem porównania:"
 
-# tools/R/QC.R: 3559
-# gettext("Standardized license specification:")
-msgid "Standardized license specification:"
-msgstr "Ustandaryzowana specyfikacja licencji:"
+#. R/QC.R: gettext("Entries with infeasible version number:")
+#: R/QC.R:0
+msgid "Entries with infeasible version number:"
+msgstr "Wpisy z mało prawdopodobnym numerem wersji:"
 
-# tools/R/QC.R: 3564
-# gettextf("Deprecated license: %s",
-#                      paste(y, collapse = " "))
-msgid "Deprecated license: %s"
-msgstr "Przestarzała licencja: %s"
+#. R/Rd2pdf.R: message("Error in running tools::texi2pdf()")
+#: R/Rd2pdf.R:0
+msgid "Error in running tools::texi2pdf()"
+msgstr "Błąd w uruchomieniu 'tools::texi2pdf()'"
 
-# tools/R/QC.R: 3568
-# gettextf("Invalid license file pointers: %s",
-#                      paste(y, collapse = " "))
-msgid "Invalid license file pointers: %s"
-msgstr "Niepoprawne wskaźniki pliku licencji: %s"
+#. R/build.R: gettextf("Error: cannot rename directory to %s", sQuote(intname))
+#: R/build.R:0
+msgid "Error: cannot rename directory to %s"
+msgstr "Błąd: nie można zmienić katalogu na %s"
 
-# tools/R/QC.R: 3572
-# gettext("License components with restrictions not permitted:")
-msgid "License components with restrictions not permitted:"
-msgstr "Komponenty licencji z ograniczeniami nie są dozwolone:"
+#. R/check.R: message("Error: no packages were specified")
+#: R/check.R:0
+msgid "Error: no packages were specified"
+msgstr "Błąd: nie określono pakietów"
 
-# tools/R/QC.R: 3576
-# gettext("License components which are templates and need '+ file LICENSE':")
-msgid "License components which are templates and need '+ file LICENSE':"
-msgstr ""
-"Komponenty licencji, które są szablonami oraz potrzebują dodatkowo pliku "
-"'LICENSE':"
+#. R/testing.R: message("FAILED")
+#: R/testing.R:0
+msgid "FAILED"
+msgstr "NIE POWIODŁO SIĘ"
 
-# tools/R/QC.R: 3663
-# gettextf("Non-portable flags in variable '%s':",
-#                           names(x))
-msgid "Non-portable flags in variable '%s':"
-msgstr "Nieprzenośne flagi w zmiennej '%s':"
+#. R/assertCondition.R: gettextf("Failed to get %s in evaluating %s", .Wanted, .exprString)
+#: R/assertCondition.R:0
+msgid "Failed to get %s in evaluating %s"
+msgstr "Nie udało się uzyskać %s podczas wyznaczania %s"
 
-# tools/R/QC.R: 3672
-# gettextf("Variables overriding user/site settings:")
-msgid "Variables overriding user/site settings:"
-msgstr "Zmienne omijające ustawienia użytkownika/strony:"
+#. R/assertCondition.R: gettextf("Failed to get error in evaluating %s", d.expr)
+#: R/assertCondition.R:0
+msgid "Failed to get error in evaluating %s"
+msgstr "Nie udało się uzyskać błędu podczas wyznaczania %s"
 
-# tools/R/QC.R: 3986
-# message(gettextf("package %s exists but was not installed under R >= 2.10.0 so xrefs cannot be checked", sQuote(pkg)),
-#                         domain = NA)
+#. R/Vignettes.R: gettextf("Failed to locate the %s output file (by engine %s) for vignette with name %s. The following files exist in directory %s: %s",     sQuote(by), sQuote(sprintf("%s::%s", engine$package, engine$name)),     sQuote(name), sQuote(dir), paste(sQuote(output0), collapse = ", "))
+#. R/Vignettes.R: gettextf("Failed to locate the %s output file (by engine %s) for vignette with name %s. The following files exist in directory %s: %s",     sQuote(by), sQuote(sprintf("%s::%s", engine$package, engine$name)),     sQuote(name), sQuote(dir), paste(sQuote(output0), collapse = ", "))
+#: R/Vignettes.R:0
 msgid ""
-"package %s exists but was not installed under R >= 2.10.0 so xrefs cannot be "
-"checked"
+"Failed to locate the %s output file (by engine %s) for vignette with name "
+"%s. The following files exist in directory %s: %s"
 msgstr ""
-"pakiet %s istnieje, ale nie został zainstalowany pod R >= 2.10.0, tak więc "
-"'xrefs' nie może zostać sprawdzony"
+"Nie udało się zlokalizować pliku wynikowego %s (przez silnik %s) dla "
+"ilustracji o nazwie %s. Następujące pliki istnieją w katalogu %s: %s"
 
-# tools/R/QC.R: 4070
-# gettextf("Missing link or links in documentation object '%s':",
-#                        names(xx)[i])
-msgid "Missing link or links in documentation object '%s':"
-msgstr "Brakujący link lub linki w obiekcie dokumentacji '%s':"
+#. R/QC.R: gettext("Fields with non-ASCII tags:")
+#. R/QC.R: gettext("Fields with non-ASCII tags:")
+#: R/QC.R:0
+msgid "Fields with non-ASCII tags:"
+msgstr "Pola ze znacznikami innymi niż ASCII:"
 
-# tools/R/QC.R: 4077
-# gettextf("See the information in section 'Cross-references' of the 'Writing R Extensions' manual.")
-msgid ""
-"See the information in section 'Cross-references' of the 'Writing R "
-"Extensions' manual."
-msgstr ""
-"Zobacz informację w sekcji 'Cross-references' podręcznika 'Writing R "
-"Extensions'."
+#. R/QC.R: gettext("Fields with non-ASCII values:")
+#. R/QC.R: gettext("Fields with non-ASCII values:")
+#: R/QC.R:0
+msgid "Fields with non-ASCII values:"
+msgstr "Pola z wartościami innymi niż ASCII:"
 
-# tools/R/QC.R: 4688
-# gettextf("File %s:", sQuote(f))
-# tools/R/QC.R: 4834
-# gettextf("File %s:", sQuote(f))
-# tools/R/QC.R: 7103
-# gettextf("File %s:", sQuote(f))
-# tools/R/sotools.R: 385
-# gettextf("File %s:", sQuote(attr(x, "file")))
-# tools/R/sotools.R: 565
-# gettextf("File %s:", sQuote(attr(x, "file")))
+#. R/QC.R: gettextf("File %s:", sQuote(f))
+#. R/QC.R: gettextf("File %s:", sQuote(f))
+#. R/QC.R: gettextf("File %s:", sQuote(f))
+#. R/sotools.R: gettextf("File %s:", sQuote(attr(x, "file")))
+#. R/sotools.R: gettextf("File %s:", sQuote(attr(x, "file")))
+#: R/QC.R:0 R/sotools.R:0
 msgid "File %s:"
 msgstr "Plik %s:"
 
-# tools/R/QC.R: 4695
-# gettextf("  %s has wrong argument list %s",
-#                          f, sQuote(paste(bad, collapse = ", ")))
-# tools/R/QC.R: 4841
-# gettextf("  %s has wrong argument list %s",
-#                          f, sQuote(paste(bad, collapse = ", ")))
-msgid "%s has wrong argument list %s"
-msgstr "%s ma błędną listę argumentów %s"
+#. R/QC.R: gettextf("File '%s':", fname)
+#: R/QC.R:0
+msgid "File '%s':"
+msgstr "Plik '%s':"
 
-# tools/R/QC.R: 4699
-# gettextf("  %s calls:", f)
-# tools/R/QC.R: 4845
-# gettextf("  %s calls:", f)
-msgid "%s calls:"
-msgstr "wywołania %s:"
+#. R/utils.R: stop("File 'DESCRIPTION' is missing.")
+#: R/utils.R:0
+msgid "File 'DESCRIPTION' is missing."
+msgstr "Brakuje pliku 'DESCRIPTION'."
+
+#. R/utils.R: stop("Files 'DESCRIPTION' and 'DESCRIPTION.in' are missing.")
+#: R/utils.R:0
+msgid "Files 'DESCRIPTION' and 'DESCRIPTION.in' are missing."
+msgstr "Brakuje plików 'DESCRIPTION' oraz 'DESCRIPTION.in'."
+
+#. R/sotools.R: gettextf("Found %s, possibly from %s", sQuote(v), paste(sprintf("%s (%s)",     sQuote(u[, "ssname"]), u[, "language"]), collapse = ", "))
+#: R/sotools.R:0
+msgid "Found %s, possibly from %s"
+msgstr "Znaleziono %s, prawdopodobnie z %s"
 
-# tools/R/QC.R: 4711
-# gettextf("Package startup functions should have two arguments with names starting with %s and %s, respectively.",
-#                                sQuote("lib"), sQuote("pkg"))
+#. R/QC.R: gettextf("Functions or methods with usage in documentation object '%s' but not in code:",     fname)
+#: R/QC.R:0
 msgid ""
-"Package startup functions should have two arguments with names starting with "
-"%s and %s, respectively."
+"Functions or methods with usage in documentation object '%s' but not in code:"
 msgstr ""
-"Funkcje startowe pakietu powinny posiadać dwa argumenty z nazwami "
-"rozpoczynającymi się odpowiednio od %s oraz %s."
+"Funkcje lub metody z użyciem w obiekcie dokumentacji '%s' ale nie w kodzie:"
 
-# tools/R/QC.R: 4715
-# gettextf("Package startup functions should not change the search path.")
-msgid "Package startup functions should not change the search path."
-msgstr "Funkcje startowe pakietu nie powinny zmieniać ścieżki wyszukiwania."
+#. R/QC.R: gettextf("Generics 'g' in 'env' %s where '%s' errors: %s\nMay need something like\n\n%s\nin NAMESPACE.",     format(env), "hasMethods(g, env)", paste(sQuote(rErr), collapse = ", "),     paste0("  importFrom(", paste(dq(pkgs), dq(rErr), sep = ", "),         ")\n"))
+#: R/QC.R:0
+msgid ""
+"Generics 'g' in 'env' %s where '%s' errors: %s\n"
+"May need something like\n"
+"\n"
+"%s\n"
+"in NAMESPACE."
+msgstr ""
+"Ogólna funkcja 'g' w 'env' %s gdzie błędy '%s': %s\n"
+"Może wymagać czegoś podobnego do\n"
+"\n"
+"%s\n"
+"w pliku 'NAMESPACE'."
 
-# tools/R/QC.R: 4718
-# gettextf("Package startup functions should use %s to generate messages.",
-#                                sQuote("packageStartupMessage"))
-msgid "Package startup functions should use %s to generate messages."
-msgstr "Funkcje startowe pakietu powinny używać %s do generowania wiadomości."
+#. R/assertCondition.R: gettextf("Got %s in evaluating %s; wanted %s", .got, .exprString,     .Wanted)
+#: R/assertCondition.R:0
+msgid "Got %s in evaluating %s; wanted %s"
+msgstr "Otrzymano %s podczas wyznaczania %s; oczekiwano %s"
 
-# tools/R/QC.R: 4722
-# gettextf("Package startup functions should not call %s.",
-#                                sQuote("installed.packages"))
-msgid "Package startup functions should not call %s."
-msgstr "Funkcje startowe pakietu nie powinny wywoływać %s."
+#. R/assertCondition.R: gettextf("Got warning in evaluating %s, but also an error", d.expr)
+#: R/assertCondition.R:0
+msgid "Got warning in evaluating %s, but also an error"
+msgstr "Otrzymano ostrzeżenie podczas wyznaczania %s, ale również błąd"
 
-# tools/R/QC.R: 4725
-# gettextf("See section %s in '%s'.",
-#                        sQuote("Good practice"),
-#                        "?.onAttach")
-# tools/R/QC.R: 4863
-# gettextf("See section %s in '%s'.",
-#                        sQuote("Good practice"), "?.Last.lib")
-# tools/R/check.R: 1506
-# gettextf("See section %s in '%s'.",
-#                                  sQuote("Good practice"), "?attach")
-# tools/R/check.R: 1512
-# gettextf("See section %s in '%s'.",
-#                                  sQuote("Good practice"), "?data")
-msgid "See section %s in '%s'."
-msgstr "Zobacz sekcję %s w '%s'."
+#. R/dynamicHelp.R: gettext("Help pages:")
+#: R/dynamicHelp.R:0
+msgid "Help pages:"
+msgstr "Strony pomocy:"
 
-# tools/R/QC.R: 4857
-# gettextf("Package detach functions should have one arguments with names starting with %s.", sQuote("lib"))
-msgid ""
-"Package detach functions should have one arguments with names starting with "
-"%s."
-msgstr ""
-"Funkcje odłączające pakiet powinny jeden argument z nazwami rozpoczynającymi "
-"się od %s."
+#. R/Vignettes.R: gettextf("In '%s' vignettes '%s' and '%s' have the same vignette name",     basename(dirname(dir)), orig, dup)
+#: R/Vignettes.R:0
+msgid "In '%s' vignettes '%s' and '%s' have the same vignette name"
+msgstr "W ilustracjach '%s', '%s' oraz '%s' mają te same nazwy ilustracji"
 
-# tools/R/QC.R: 4860
-# gettextf("Package detach functions should not call %s.",
-#                                sQuote("library.dynam.unload"))
-msgid "Package detach functions should not call %s."
-msgstr "Funkcje odłączające pakiet nie powinny wywoływać %s."
+#. R/admin.R: gettext("Invalid DESCRIPTION file")
+#: R/admin.R:0
+msgid "Invalid DESCRIPTION file"
+msgstr "niepoprawny plik 'DESCRIPTION'"
 
-# tools/R/utils.R: 1568
-# stop("unable to create ", con)
-# tools/R/QC.R: 1839
-# stop("unable to create ", file, domain = NA)
-# tools/R/QC.R: 5092
-# stop("unable to create ", file)
-# tools/R/packages.R: 139
-# stop("unable to create ", td)
-msgid "unable to create"
-msgstr "nie można utworzyć"
+#. R/QC.R: gettext("Invalid Priority field.")
+#: R/QC.R:0
+msgid "Invalid Priority field."
+msgstr "Niepoprawne pole priorytetu."
 
-# tools/R/utils.R: 1579
-# stop("unable to write code files")
-# tools/R/QC.R: 1843
-# stop("unable to write code files", domain = NA)
-# tools/R/QC.R: 5096
-# stop("unable to write code files")
-# tools/R/admin.R: 325
-# stop("unable to write code files")
-msgid "unable to write code files"
-msgstr "nie można zapisać plików kodu"
+#. R/QC.R: gettext("Invalid VignetteBuilder field.")
+#: R/QC.R:0
+msgid "Invalid VignetteBuilder field."
+msgstr "Niepoprawne pole 'VignetteBuilder'."
 
-# tools/R/QC.R: 5232
-# gettext("package 'methods' is used but not declared")
-msgid "package 'methods' is used but not declared"
-msgstr "pakiet 'methods' został użyty, ale nie jest zadeklarowany"
+#. R/QC.R: gettextf("Invalid license file pointers: %s", paste(y, collapse = " "))
+#: R/QC.R:0
+msgid "Invalid license file pointers: %s"
+msgstr "Niepoprawne wskaźniki pliku licencji: %s"
 
-# tools/R/QC.R: 5371
-# gettext("'::' or ':::' imports not declared from:")
-msgid "'::' or ':::' imports not declared from:"
-msgstr "importy '::' lub ':::' nie są zadeklarowane z:"
+#. R/QC.R: gettext("License components which are templates and need '+ file LICENSE':")
+#: R/QC.R:0
+msgid "License components which are templates and need '+ file LICENSE':"
+msgstr ""
+"Komponenty licencji, które są szablonami oraz potrzebują dodatkowo pliku "
+"'LICENSE':"
 
-# tools/R/QC.R: 5374
-# gettextf("'::' or ':::' import not declared from: %s", sQuote(xx))
-msgid "'::' or ':::' import not declared from: %s"
-msgstr "import '::' lub ':::' nie jest zadeklarowany z: %s"
+#. R/QC.R: gettext("License components with restrictions not permitted:")
+#: R/QC.R:0
+msgid "License components with restrictions not permitted:"
+msgstr "Komponenty licencji z ograniczeniami nie są dozwolone:"
 
-# tools/R/QC.R: 5379
-# gettext("'library' or 'require' calls not declared from:")
-msgid "'library' or 'require' calls not declared from:"
-msgstr "wywołania 'library' lub 'require' nie są zadeklarowane z:"
+#. R/dynamicHelp.R: gettextf("Link %s in package %s could not be located", mono(helpdoc),     mono(pkg))
+#: R/dynamicHelp.R:0
+msgid "Link %s in package %s could not be located"
+msgstr "Linki %s w pakiecie '%s' nie mogły zostać zlokalizowane"
 
-# tools/R/QC.R: 5382
-# gettextf("'library' or 'require' call not declared from: %s",
-#                        sQuote(xx))
-msgid "'library' or 'require' call not declared from: %s"
-msgstr "wywołanie 'library' lub 'require' nie jest zadeklarowane z: %s"
+#. R/Vignettes.R: gettextf("Located more than one %s output file (by engine %s) for vignette with name %s: %s",     sQuote(by), sQuote(sprintf("%s::%s", engine$package, engine$name)),     sQuote(name), paste(sQuote(output), collapse = ", "))
+#. R/Vignettes.R: gettextf("Located more than one %s output file (by engine %s) for vignette with name %s: %s",     sQuote(by), sQuote(sprintf("%s::%s", engine$package, engine$name)),     sQuote(name), paste(sQuote(output), collapse = ", "))
+#: R/Vignettes.R:0
+msgid ""
+"Located more than one %s output file (by engine %s) for vignette with name "
+"%s: %s"
+msgstr ""
+"Zlokalizowano więcej niż jeden plik wynikowy %s (przez silnik %s) dla "
+"ilustracji o nazwie %s: %s"
 
-# tools/R/QC.R: 5389
-# gettext("'library' or 'require' calls to packages already attached by Depends:")
-msgid "'library' or 'require' calls to packages already attached by Depends:"
+#. R/Rd.R: gettextf("Macro file %s should only contain Rd macro definitions and comments",     file)
+#: R/Rd.R:0
+msgid "Macro file %s should only contain Rd macro definitions and comments"
+msgstr "Plik makr %s powinien zawierać tylko definicję makr Rd oraz komentarze"
+
+#. R/QC.R: gettext("Malformed Authors at R field:")
+#: R/QC.R:0
+msgid "Malformed Authors at R field:"
+msgstr "Źle sformułowane pole Authors at R:"
+
+#. R/QC.R: gettext("Malformed Depends or Suggests or Imports or Enhances field.")
+#: R/QC.R:0
+msgid "Malformed Depends or Suggests or Imports or Enhances field."
 msgstr ""
-"wywołania 'library' lub 'require' do pakietów, które były już dołączone "
-"przez 'Depends':"
+"Błędnie sformatowane pole 'Depends' lub 'Suggests' lub 'Imports' lub "
+"'Enhances'."
 
-# tools/R/QC.R: 5392
-# gettextf("'library' or 'require' call to %s which was already attached by Depends.",
-#                          sQuote(xx))
+#. R/QC.R: gettext("Malformed Description field: should contain one or more complete sentences.")
+#: R/QC.R:0
 msgid ""
-"'library' or 'require' call to %s which was already attached by Depends."
+"Malformed Description field: should contain one or more complete sentences."
 msgstr ""
-"wywołanie 'library' lub 'require' do pakietu %s, który był już dołączony "
-"przez 'Depends'."
+"Niepoprawnie wypełnione pole 'Description': powinno zawierać jedno lub "
+"więcej kompletnych zdań."
 
-# tools/R/QC.R: 5399
-# gettext("Namespaces in Imports field not imported from:")
-msgid "Namespaces in Imports field not imported from:"
+#. R/news.R: gettextf("Malformed NEWS.Rd file:\nChunk starting\n  %s\ncontains more than one \\itemize.\nUsing the first one.",     substring(sub("^[[:space:]]*", "", .Rd_deparse(x)), 1L, 60L))
+#: R/news.R:0
+msgid ""
+"Malformed NEWS.Rd file:\n"
+"Chunk starting\n"
+"  %s\n"
+"contains more than one \\itemize.\n"
+"Using the first one."
 msgstr ""
-"Przestrzenie nazw w polu 'Imports' nie zostały zaimportowane z pakietu:"
+"Uszkodzony plik NEWS.Rd:\n"
+"Fragment rozpoczynający\n"
+"  %s\n"
+"zawiera więcej niż jeden \\itemize.\n"
+"Używanie pierwszego."
 
-# tools/R/QC.R: 5402
-# gettextf("Namespace in Imports field not imported from: %s",
-#                        sQuote(xx))
-msgid "Namespace in Imports field not imported from: %s"
+#. R/news.R: gettextf("Malformed NEWS.Rd file:\nChunk starting\n  %s\ncontains no \\itemize.",     substring(sub("^[[:space:]]*", "", .Rd_deparse(x)), 1L, 60L))
+#: R/news.R:0
+msgid ""
+"Malformed NEWS.Rd file:\n"
+"Chunk starting\n"
+"  %s\n"
+"contains no \\itemize."
 msgstr ""
-"Przestrzeń nazw w polu 'Imports' nie została zaimportowana z pakietu: %s"
+"Uszkodzony plik NEWS.Rd:\n"
+"Fragment rozpoczynający\n"
+"  %s\n"
+"nie zawiera \\itemize."
 
-# tools/R/QC.R: 5410
-# gettext("Packages in Depends field not imported from:")
-msgid "Packages in Depends field not imported from:"
-msgstr "Pakiety z pola 'Depends' nie zostały zaimportowany z pakietu:"
+#. R/QC.R: gettext("Malformed Title field: should not end in a period.")
+#: R/QC.R:0
+msgid "Malformed Title field: should not end in a period."
+msgstr "Niepoprawnie wypełnione pole 'Title': nie powinno kończyć się kropką"
 
-# tools/R/QC.R: 5413
-# gettextf("Package in Depends field not imported from: %s",
-#                          sQuote(xx))
-msgid "Package in Depends field not imported from: %s"
-msgstr "Pakiet z pola 'Depends' nie został zaimportowany z pakietu: %s"
+#. R/QC.R: gettext("Malformed maintainer field.")
+#: R/QC.R:0
+msgid "Malformed maintainer field."
+msgstr "Niepoprawnie wypełnione pole opiekuna (maintainer)."
 
-# tools/R/QC.R: 5419
-# gettext("Missing or unexported objects:")
-msgid "Missing or unexported objects:"
-msgstr "Brakujące lub niewyeksportowane obiekty:"
+#. R/QC.R: gettext("Malformed package name")
+#: R/QC.R:0
+msgid "Malformed package name"
+msgstr "Niepoprawnie wypełnione pole nazwy pakietu"
 
-# tools/R/QC.R: 5422
-# gettextf("Missing or unexported object: %s", sQuote(xx))
-msgid "Missing or unexported object: %s"
-msgstr "Brakujący lub niewyeksportowany obiekt: %s"
+#. R/QC.R: gettext("Malformed package version.")
+#: R/QC.R:0
+msgid "Malformed package version."
+msgstr "Niepoprawnie wypełnione pole wersji pakietu."
 
-# tools/R/QC.R: 5429
-# gettext("':::' calls which should be '::':")
-msgid "':::' calls which should be '::':"
-msgstr "wywołania ':::' które powinny być '::':"
+#. R/QC.R: gettext("  Mismatches in argument default values (first 3):")
+#: R/QC.R:0
+msgid "Mismatches in argument default values (first 3):"
+msgstr "Niezgodność w domyslnych wartościach argumentów (pierwsze 3): "
 
-# tools/R/QC.R: 5432
-# gettextf("':::' call which should be '::': %s",
-#                          sQuote(xx))
-msgid "':::' call which should be '::': %s"
-msgstr "wywołanie ':::' które powinno być '::': %s"
+#. R/QC.R: gettext("  Mismatches in argument default values:")
+#: R/QC.R:0
+msgid "Mismatches in argument default values:"
+msgstr "Niezgodność w domyślnych wartościach argumentów:"
 
-# tools/R/QC.R: 5438
-# gettext("Missing objects imported by ':::' calls:")
-msgid "Missing objects imported by ':::' calls:"
-msgstr "Brakujące obiekty zaimportowane przez wywołania ':::':"
+#. R/QC.R: gettext("  Mismatches in argument names (first 3):")
+#: R/QC.R:0
+msgid "Mismatches in argument names (first 3):"
+msgstr "Niezgodność w nazwach argumentów (pierwsze 3):"
 
-# tools/R/QC.R: 5441
-# gettextf("Missing object imported by a ':::' call: %s",
-#                        sQuote(xx))
-msgid "Missing object imported by a ':::' call: %s"
-msgstr "Brakujący obiekt zaimportowany przez wywołanie ':::': %s"
+#. R/QC.R: gettext("  Mismatches in argument names:")
+#: R/QC.R:0
+msgid "Mismatches in argument names:"
+msgstr "Niezgodność w nazwach argumentów:"
 
-# tools/R/QC.R: 5457
-# gettext("Unexported objects imported by ':::' calls:")
-msgid "Unexported objects imported by ':::' calls:"
-msgstr "Brakujące obiekty zaimportowane przez wywołania ':::':"
+#. R/QC.R: gettextf("Missing link or links in documentation object '%s':",     names(xx)[i])
+#: R/QC.R:0
+msgid "Missing link or links in documentation object '%s':"
+msgstr "Brakujący link lub linki w obiekcie dokumentacji '%s':"
 
-# tools/R/QC.R: 5460
-# gettextf("Unexported object imported by a ':::' call: %s",
-#                          sQuote(xxx))
-msgid "Unexported object imported by a ':::' call: %s"
+#. R/QC.R: gettextf("Missing object imported by a ':::' call: %s", sQuote(xx))
+#: R/QC.R:0
+msgid "Missing object imported by a ':::' call: %s"
 msgstr "Brakujący obiekt zaimportowany przez wywołanie ':::': %s"
 
-# tools/R/QC.R: 5475
-# gettext("Unavailable namespaces imported from by ':::' calls:")
-msgid "Unavailable namespaces imported from by ':::' calls:"
-msgstr "Niedostępne przestrzenie nazw zaimportowane przez wywołania ':::':"
-
-# tools/R/QC.R: 5478
-# gettextf("Unavailable namespace imported from by a ':::' call: %s",
-#                          sQuote(xx))
-msgid "Unavailable namespace imported from by a ':::' call: %s"
-msgstr "Niedostępna przestrzeń nazw zaimportowana przez wywołanie ':::': %s"
-
-# tools/R/QC.R: 5484
-# gettext("'data(package=)' calls not declared from:")
-msgid "'data(package=)' calls not declared from:"
-msgstr "wywołania 'data(package=)' nie zostały zadeklarowane z:"
+#. R/QC.R: gettext("Missing objects imported by ':::' calls:")
+#: R/QC.R:0
+msgid "Missing objects imported by ':::' calls:"
+msgstr "Brakujące obiekty zaimportowane przez wywołania ':::':"
 
-# tools/R/QC.R: 5487
-# gettextf("'data(package=)' call not declared from: %s",
-#                        sQuote(xx))
-msgid "'data(package=)' call not declared from: %s"
-msgstr "wywołanie 'data(package=)' nie zostało zadeklarowane z: %s"
+#. R/QC.R: gettextf("Missing or unexported object: %s", sQuote(xx))
+#: R/QC.R:0
+msgid "Missing or unexported object: %s"
+msgstr "Brakujący lub niewyeksportowany obiekt: %s"
 
-# tools/R/QC.R: 6301
-# stop("Package has no 'Version' field", call. = FALSE)
-msgid "Package has no 'Version' field"
-msgstr "Pakiet nie posiada pola 'Version'"
+#. R/QC.R: gettext("Missing or unexported objects:")
+#: R/QC.R:0
+msgid "Missing or unexported objects:"
+msgstr "Brakujące lub niewyeksportowane obiekty:"
 
-# tools/R/QC.R: 6395
-# message("NB: need Internet access to use CRAN incoming checks")
+#. R/QC.R: message("NB: need Internet access to use CRAN incoming checks")
+#: R/QC.R:0
 msgid "NB: need Internet access to use CRAN incoming checks"
 msgstr ""
 "NB: potrzeba dostępu do Internetu aby korzystać z przychodzących kontroli "
 "CRAN"
 
-# tools/R/QC.R: 6819
-# gettextf("Rd files with duplicated name '%s':",
-#                                 nm)
-msgid "Rd files with duplicated name '%s':"
-msgstr "Pliki Rd z powtórzoną nazwą '%s':"
-
-# tools/R/QC.R: 6827
-# gettextf("Rd files with duplicated alias '%s':",
-#                                 nm)
-msgid "Rd files with duplicated alias '%s':"
-msgstr "Pliki Rd z powtórzonym aliasem '%s':"
-
-# tools/R/QC.R: 6912
-# gettextf("Argument items with no description in Rd object '%s':",
-#                          nm)
-msgid "Argument items with no description in Rd object '%s':"
-msgstr "Pozycje argumentu bez opisu w obiekcie Rd '%s':"
-
-# tools/R/QC.R: 6918
-# gettextf("Auto-generated content requiring editing in Rd object '%s':",
-#                          nm)
-msgid "Auto-generated content requiring editing in Rd object '%s':"
-msgstr ""
-"Automatycznie wygenerowana treść wymagająca wykonania edycji w obiekcie Rd "
-"'%s':"
+#. R/news.R: stop("NEWS file not found")
+#: R/news.R:0
+msgid "NEWS file not found"
+msgstr "plik 'NEWS' nie został znaleziony"
 
-# tools/R/QC.R: 6999
-# stop("no Rd sections specified")
-msgid "no Rd sections specified"
-msgstr "nie określono sekcji Rd"
-
-# tools/R/QC.R: 7166
-# warning(gettextf("Generics 'g' in 'env' %s where '%s' errors: %s\nMay need something like\n\n%s\nin NAMESPACE.",
-#                              format(env),
-#                              "hasMethods(g, env)",
-#                              paste(sQuote(rErr), collapse = ", "),
-#                              paste0("  importFrom(",
-#                                     paste(dq(pkgs), dq(rErr), sep =", "),
-#                                     ")\n")
-#                              ),
-#                     domain = NA)
-msgid ""
-"Generics 'g' in 'env' %s where '%s' errors: %s\n"
-"May need something like\n"
-"\n"
-"%s\n"
-"in NAMESPACE."
+#. R/QC.R: gettextf("Namespace in Imports field not imported from: %s",     sQuote(xx))
+#: R/QC.R:0
+msgid "Namespace in Imports field not imported from: %s"
 msgstr ""
-"Ogólna funkcja 'g' w 'env' %s gdzie błędy '%s': %s\n"
-"Może wymagać czegoś podobnego do\n"
-"\n"
-"%s\n"
-"w pliku 'NAMESPACE'."
-
-# tools/R/Rd.R: 38
-# stop("argument 'file' must be a character string or connection")
-msgid "argument 'file' must be a character string or connection"
-msgstr "argument 'file' musi być łańcuchem tekstowym lub połączeniem"
-
-# tools/R/Rd.R: 55
-# gettextf("missing/empty %s field in '%s'",
-#                        "\\name",
-#                        description)
-msgid "missing/empty %s field in '%s'"
-msgstr "brakujące/puste pole %s w '%s'"
-
-# tools/R/Rd.R: 58
-# gettextf("Rd files must have a non-empty %s.",
-#                        "\\name")
-msgid "Rd files must have a non-empty %s."
-msgstr "Pliki Rd muszą mieć niepustą %s."
+"Przestrzeń nazw w polu 'Imports' nie została zaimportowana z pakietu: %s"
 
-# tools/R/Rd.R: 60
-# gettext("See chapter 'Writing R documentation' in manual 'Writing R Extensions'.")
-# tools/R/Rd.R: 70
-# gettext("See chapter 'Writing R documentation' in manual 'Writing R Extensions'.")
-msgid "See chapter 'Writing R documentation' in manual 'Writing R Extensions'."
+#. R/QC.R: gettext("Namespaces in Imports field not imported from:")
+#: R/QC.R:0
+msgid "Namespaces in Imports field not imported from:"
 msgstr ""
-"Zobacz rozdział 'Writing R documentation' w podręczniku 'Writing R "
-"Extensions'."
+"Przestrzenie nazw w polu 'Imports' nie zostały zaimportowane z pakietu:"
 
-# tools/R/Rd.R: 67
-# gettextf("missing/empty \\title field in '%s'",
-#                        description)
-msgid "missing/empty \\title field in '%s'"
-msgstr "brakujące/puste pole '\\title' w '%s'"
+#. R/Rd.R: gettextf("No Rd macros in package '%s'.", p)
+#: R/Rd.R:0
+msgid "No Rd macros in package '%s'."
+msgstr "Nie znaleziono makr Rd w pakiecie '%s'."
 
-# tools/R/Rd.R: 69
-# gettext("Rd files must have a non-empty \\title.")
-msgid "Rd files must have a non-empty \\title."
-msgstr "Pliki Rd muszą mieć niepustą sekcję '\\title'."
+#. R/dynamicHelp.R: gettextf("No docs found for package %s", mono(pkg))
+#: R/dynamicHelp.R:0
+msgid "No docs found for package %s"
+msgstr "Nie znaleziono dokumentów dla pakietu '%s'"
 
-# tools/R/Rd.R: 253
-# stop("argument 'outFile' must be a character string or connection")
-msgid "argument 'outFile' must be a character string or connection"
-msgstr "argument 'outfile' musi być łańcuchem tekstowym lub połączeniem"
+#. R/dynamicHelp.R: gettext("No files in this directory")
+#: R/dynamicHelp.R:0
+msgid "No files in this directory"
+msgstr "Brak plików w tym katalogu"
 
-# tools/R/Rd.R: 378
-# stop("you must specify 'dir' or 'files'")
-msgid "you must specify 'dir' or 'files'"
-msgstr "musisz określić argument 'dir' lub 'files'"
+#. R/dynamicHelp.R: gettextf("No help found for package %s", mono(pkg))
+#: R/dynamicHelp.R:0
+msgid "No help found for package %s"
+msgstr "Nie znaleziono pomocy na temat pakietu '%s'"
 
-# tools/R/Rd.R: 772
-# stop("cannot deal with Rd objects with missing/empty names")
-msgid "cannot deal with Rd objects with missing/empty names"
-msgstr "nie można poradzić sobie z obiektami Rd z brakującymi/pustymi nazwami"
+#. R/dynamicHelp.R: gettextf("No help found for topic %s in any package.", mono(topic))
+#: R/dynamicHelp.R:0
+msgid "No help found for topic %s in any package."
+msgstr "Nie znaleziono pomocy na temat '%s' w żadnym z pakiecie."
 
-# tools/R/Rd.R: 827
-# stop(gettextf("No help on %s found in RdDB %s",
-#                               sQuote(key), sQuote(filebase)),
-#                      domain = NA)
+#. R/Rd.R: gettextf("No help on %s found in RdDB %s", sQuote(key), sQuote(filebase))
+#: R/Rd.R:0
 msgid "No help on %s found in RdDB %s"
 msgstr "Nie znaleziono pomocy na temat %s w zbiorach RdDB %s"
 
-# tools/R/Rd2ex.R: 145
-# warning("more than one \\examples section, using the first")
-msgid "more than one \\examples section, using the first"
-msgstr "więcej niż jedna sekcja \\examples, używanie pierwszej"
+#. R/news.R: stop("No news found in given file using old-style R-like format.")
+#: R/news.R:0
+msgid "No news found in given file using old-style R-like format."
+msgstr ""
+"Nie znaleziono wiadomości w podanym pliku używając starego stylu formatu "
+"podobnego do R."
 
-# tools/R/Rd2pdf.R: 94
-# message("Converting Rd files to LaTeX ...")
-msgid "Converting Rd files to LaTeX ..."
-msgstr "Konwertowanie plików Rd do LaTeX'a ..."
+#. R/news.R: stop("No news found in given file using package default format.")
+#: R/news.R:0
+msgid "No news found in given file using package default format."
+msgstr ""
+"Nie znaleziono wiadomości w podanym pliku używając domyślnego formatu "
+"pakietu."
 
-# tools/R/Rd2pdf.R: 383
-# stop("-t option without value", call. = FALSE)
-msgid "-t option without value"
-msgstr "opcja '-t' bez wartości"
+#. R/dynamicHelp.R: gettextf("No package index found for package %s", mono(pkg))
+#: R/dynamicHelp.R:0
+msgid "No package index found for package %s"
+msgstr "Nie znaleziono indeksu pakietu dla pakietu %s"
 
-# tools/R/Rd2pdf.R: 392
-# stop("-o option without value", call. = FALSE)
-# tools/R/Rd2pdf.R: 750
-# stop("-o option without value", call. = FALSE)
-# tools/R/check.R: 3866
-# stop("-o option without value", call. = FALSE)
-msgid "-o option without value"
-msgstr "opcja '-o' bez wartości"
+#. R/dynamicHelp.R: gettextf("No package named %s could be found", mono(pkg))
+#. R/dynamicHelp.R: gettextf("No package named %s could be found", mono(pkg))
+#: R/dynamicHelp.R:0
+msgid "No package named %s could be found"
+msgstr "Nie znaleziono pakietu o nazwie '%s'"
 
-# tools/R/Rd2pdf.R: 398
-# message("Warning: unknown option ", sQuote(a))
-# tools/R/Rd2pdf.R: 772
-# message("Warning: unknown option ", sQuote(a))
-# tools/R/build.R: 785
-# message("Warning: unknown option ", sQuote(a))
-# tools/R/check.R: 3921
-# message("Warning: unknown option ", sQuote(a))
-msgid "Warning: unknown option"
-msgstr "Ostrzeżenie: nieznana opcja"
+#. R/dynamicHelp.R: gettext("No results found")
+#: R/dynamicHelp.R:0
+msgid "No results found"
+msgstr "Brak wyników"
 
-# tools/R/Rd2pdf.R: 403
-# stop("exactly one Rd file must be specified", call. = FALSE)
-msgid "exactly one Rd file must be specified"
-msgstr "dokładnie jeden plik Rd musi zostać określony"
+#. R/QC.R: gettextf("Non-portable flags in variable '%s':", names(x))
+#: R/QC.R:0
+msgid "Non-portable flags in variable '%s':"
+msgstr "Nieprzenośne flagi w zmiennej '%s':"
 
-# tools/R/Rd2pdf.R: 434
-# stop("no 'type' specified", call. = FALSE)
-msgid "no 'type' specified"
-msgstr "nie określono 'type'"
+#. R/QC.R: gettext("Non-standard license specification:")
+#: R/QC.R:0
+msgid "Non-standard license specification:"
+msgstr "Niestandardowa specyfikacja licencji:"
 
-# tools/R/Rd2pdf.R: 435
-# stop("'type' must be one of 'txt', 'html', 'latex' or 'example'",
-#                 call. = FALSE)
-msgid "'type' must be one of 'txt', 'html', 'latex' or 'example'"
-msgstr "'type' musi być jednym z 'txt', 'html', 'latex' lub 'example'"
+#. R/Vignettes.R: gettextf("None of packages %s have registered vignette engines",     paste(sQuote(package), collapse = ", "))
+#: R/Vignettes.R:0
+msgid "None of packages %s have registered vignette engines"
+msgstr "Żadne z pakietów %s nie mają zarejestrowanych silników ilustracji"
 
-# tools/R/Rd2pdf.R: 701
-# stop("current working directory cannot be ascertained")
-# tools/R/Vignettes.R: 146
-# stop("current working directory cannot be ascertained")
-# tools/R/Vignettes.R: 237
-# stop("current working directory cannot be ascertained")
-# tools/R/Vignettes.R: 490
-# stop("current working directory cannot be ascertained")
-# tools/R/md5.R: 26
-# stop("current working directory cannot be ascertained")
-# tools/R/md5.R: 47
-# stop("current working directory cannot be ascertained")
-# tools/R/admin.R: 520
-# stop("current working directory cannot be ascertained")
-# tools/R/admin.R: 681
-# stop("current working directory cannot be ascertained")
-# tools/R/packages.R: 137
-# stop("current working directory cannot be ascertained")
-# tools/R/build.R: 801
-# stop("current working directory cannot be ascertained")
-# tools/R/check.R: 4106
-# stop("current working directory cannot be ascertained")
-msgid "current working directory cannot be ascertained"
-msgstr "bieżący katalog roboczy nie może być ustalony"
+#. R/testing.R: message(" OK")
+#. R/testing.R: message(" OK")
+#. R/testing.R: message(" OK")
+#. R/testing.R: message(" OK")
+#. R/testing.R: message(" OK")
+#. R/testing.R: message("OK")
+#. R/testing.R: message("OK")
+#: R/testing.R:0
+msgid "OK"
+msgstr "OK"
 
-# tools/R/Rd2pdf.R: 778
-# message("no inputs")
-msgid "no inputs"
-msgstr "brak wejść"
+#. R/QC.R: gettextf("Objects in \\usage without \\alias in documentation object '%s':",     nm)
+#: R/QC.R:0
+msgid "Objects in \\usage without \\alias in documentation object '%s':"
+msgstr "Obiekty w '\\usage' bez '\\alias' w obiekcie dokumentacji '%s':"
 
-# tools/R/Rd2pdf.R: 832
-# message("Error in running tools::texi2pdf()")
-msgid "Error in running tools::texi2pdf()"
-msgstr "Błąd w uruchomieniu 'tools::texi2pdf()'"
+#. R/QC.R: gettext("Offending entries:")
+#: R/QC.R:0
+msgid "Offending entries:"
+msgstr "Przeszkadzające wpisy:"
 
-# tools/R/RdConv2.R: 106
-# stop(gettextf("invalid value for '%s' : %s", opt, oldval),
-#                      domain = NA)
-msgid "invalid value for '%s' : %s"
-msgstr "niepoprawna wartość dla '%s' : %s"
+#. R/dynamicHelp.R: gettextf("Only help files, %s, %s and files under %s and %s in a package can be viewed",     mono("NEWS"), mono("DESCRIPTION"), mono("doc/"), mono("demo/"))
+#: R/dynamicHelp.R:0
+msgid ""
+"Only help files, %s, %s and files under %s and %s in a package can be viewed"
+msgstr ""
+"Tylko pliki pomocy, %s, %s oraz pliki w %s oraz %s w pakiecie mogą być "
+"przegladane"
 
-# tools/R/RdConv2.R: 299
-# stop(gettextf("Only one Rd section per %s is supported.",
-#                                       "\\Sexpr"),
-#                              domain = NA)
+#. R/RdConv2.R: gettextf("Only one Rd section per %s is supported.", "\\Sexpr")
+#: R/RdConv2.R:0
 msgid "Only one Rd section per %s is supported."
 msgstr "Tylko jedna sekcja Rd na %s jest wspierana."
 
-# tools/R/Vignettes.R: 29
-# stop(gettextf("Vignette product %s does not have a known filename extension (%s)",
-#                       sQuote(file), paste(sQuote(names(type)), collapse=", ")),
-#              domain = NA)
-msgid "Vignette product %s does not have a known filename extension (%s)"
-msgstr "Produkt ilustracji %s nie posiada znanego rozszerzenia (%s)"
+#. R/QC.R: gettextf("Only operators '<=' and '>=' are possible.")
+#: R/QC.R:0
+msgid "Only operators '<=' and '>=' are possible."
+msgstr "Jedynie operatory '<=' oraz '>=' są możliwe."
 
-# tools/R/Vignettes.R: 78
-# stop(gettextf("Failed to locate the %s output file (by engine %s) for vignette with name %s. The following files exist in directory %s: %s",
-#                           sQuote(by),
-#                           sQuote(sprintf("%s::%s", engine$package, engine$name)),
-#                           sQuote(name), sQuote(dir),
-#                           paste(sQuote(output0), collapse=", ")),
-#                  domain = NA)
-# tools/R/Vignettes.R: 102
-# stop(gettextf("Failed to locate the %s output file (by engine %s) for vignette with name %s. The following files exist in directory %s: %s",
-#                           sQuote(by),
-#                           sQuote(sprintf("%s::%s", engine$package, engine$name)),
-#                           sQuote(name), sQuote(dir),
-#                           paste(sQuote(output0), collapse=", ")),
-#                  domain = NA)
-msgid ""
-"Failed to locate the %s output file (by engine %s) for vignette with name "
-"%s. The following files exist in directory %s: %s"
-msgstr ""
-"Nie udało się zlokalizować pliku wynikowego %s (przez silnik %s) dla "
-"ilustracji o nazwie %s. Następujące pliki istnieją w katalogu %s: %s"
+#. R/pdftools.R: stop("PDF header not found")
+#: R/pdftools.R:0
+msgid "PDF header not found"
+msgstr "nie znaleziono nagłówka PDF"
+
+#. R/pkgDepends.R: gettextf("Package '%s' had its dependencies reduced to a minimal set.",     pkgMtrx[1, ])
+#: R/pkgDepends.R:0
+msgid "Package '%s' had its dependencies reduced to a minimal set."
+msgstr "Pakiet '%s' swoje zależności zredukował do najmniejszego zbioru."
 
-# tools/R/Vignettes.R: 85
-# stop(gettextf("Located more than one %s output file (by engine %s) for vignette with name %s: %s", sQuote(by),
-#                           sQuote(sprintf("%s::%s", engine$package, engine$name)),
-#                           sQuote(name), paste(sQuote(output), collapse=", ")),
-#                  domain  = NA)
-# tools/R/Vignettes.R: 109
-# stop(gettextf("Located more than one %s output file (by engine %s) for vignette with name %s: %s",
-#                           sQuote(by),
-#                           sQuote(sprintf("%s::%s", engine$package, engine$name)),
-#                           sQuote(name), paste(sQuote(output), collapse=", ")),
-#                  domain = NA)
+#. R/QC.R: gettextf("Package detach functions should have one argument with name starting with %s.",     sQuote("lib"))
+#: R/QC.R:0
 msgid ""
-"Located more than one %s output file (by engine %s) for vignette with name "
-"%s: %s"
+"Package detach functions should have one argument with name starting with %s."
 msgstr ""
-"Zlokalizowano więcej niż jeden plik wynikowy %s (przez silnik %s) dla "
-"ilustracji o nazwie %s: %s"
+"Funkcje odłączające pakiet powinny mieć jeden argument z nazwą "
+"rozpoczynającą się od %s."
 
-# tools/R/Vignettes.R: 150
-# stop(gettextf("unable to create temp directory %s ", sQuote(tmpd)),
-#                  domain = NA)
-msgid "unable to create temp directory %s"
-msgstr "nie można utworzyć katalogu tymczasowego %s"
+#. R/QC.R: gettextf("Package detach functions should not call %s.", sQuote("library.dynam.unload"))
+#: R/QC.R:0
+msgid "Package detach functions should not call %s."
+msgstr "Funkcje odłączające pakiet nie powinny wywoływać %s."
 
-# tools/R/Vignettes.R: 178
-# message("  Running ", sQuote(file))
-msgid "Running"
-msgstr "Uruchamianie"
+#. R/QC.R: stop("Package has no 'Version' field", call. = FALSE)
+#: R/QC.R:0
+msgid "Package has no 'Version' field"
+msgstr "Pakiet nie posiada pola 'Version'"
 
-# tools/R/Vignettes.R: 219
-# stop(gettextf("Vignette %s overwrites the following %s output by vignette %s: %s",
-#                                    sQuote(basename(names(resultsT)[j])),
-#                                    sQuote(name),
-#                                    sQuote(basename(names(resultsT)[i])),
-#                                    paste(basename(bad), collapse=", ")),
-#                           domain = NA)
-msgid "Vignette %s overwrites the following %s output by vignette %s: %s"
-msgstr "Ilustracja %s nadpisuje następujące wyjścia %s przez ilustrację %s: %s"
+#. R/QC.R: gettextf("Package in Depends field not imported from: %s", sQuote(xx))
+#: R/QC.R:0
+msgid "Package in Depends field not imported from: %s"
+msgstr "Pakiet z pola 'Depends' nie został zaimportowany z pakietu: %s"
 
-# tools/R/Vignettes.R: 478
-# stop(gettextf("Detected vignette source files (%s) with shared names (%s) and therefore risking overwriting each others output files",
-#                       paste(sQuote(docs), collapse=", "),
-#                       paste(sQuote(names), collapse=", ")),
-#              domain = NA)
+#. R/QC.R: gettextf("Package startup functions should have two arguments with names starting with %s and %s, respectively.",     sQuote("lib"), sQuote("pkg"))
+#: R/QC.R:0
 msgid ""
-"Detected vignette source files (%s) with shared names (%s) and therefore "
-"risking overwriting each others output files"
+"Package startup functions should have two arguments with names starting with "
+"%s and %s, respectively."
 msgstr ""
-"Wykryto pliki źródłowe ilustracji (%s) ze współdzielonymi nazwami (%s) w "
-"efekcie czego istnieje ryzyko nadpisania każdego z ich plików wyjściowych"
+"Funkcje startowe pakietu powinny posiadać dwa argumenty z nazwami "
+"rozpoczynającymi się odpowiednio od %s oraz %s."
 
-# tools/R/Vignettes.R: 522
-# stop(gettextf("processing vignette '%s' failed with diagnostics:\n%s",
-#                  file, conditionMessage(e)), domain = NA, call. = FALSE)
-msgid ""
-"processing vignette '%s' failed with diagnostics:\n"
-"%s"
-msgstr ""
-"przetwarzanie ilustracji '%s' nie powiodło dając komunikat:\n"
-"%s"
+#. R/QC.R: gettextf("Package startup functions should not call %s.", sQuote("installed.packages"))
+#: R/QC.R:0
+msgid "Package startup functions should not call %s."
+msgstr "Funkcje startowe pakietu nie powinny wywoływać %s."
 
-# tools/R/Vignettes.R: 539
-# stop(gettextf("tangling vignette '%s' failed with diagnostics:\n%s",
-#                      file, conditionMessage(e)), domain = NA, call. = FALSE)
-msgid ""
-"tangling vignette '%s' failed with diagnostics:\n"
-"%s"
-msgstr ""
-"wiązanie ilustracji '%s' nie powiodło dając komunikat:\n"
-"%s"
+#. R/QC.R: gettextf("Package startup functions should not change the search path.")
+#: R/QC.R:0
+msgid "Package startup functions should not change the search path."
+msgstr "Funkcje startowe pakietu nie powinny zmieniać ścieżki wyszukiwania."
 
-# tools/R/Vignettes.R: 556
-# stop("running 'make' failed")
-msgid "running 'make' failed"
-msgstr "uruchomienie 'make' nie powiodło się"
+#. R/QC.R: gettextf("Package startup functions should use %s to generate messages.",     sQuote("packageStartupMessage"))
+#: R/QC.R:0
+msgid "Package startup functions should use %s to generate messages."
+msgstr "Funkcje startowe pakietu powinny używać %s do generowania wiadomości."
 
-# tools/R/Vignettes.R: 602
-# stop(gettextf("file '%s' not found", file), domain = NA)
-# tools/R/Vignettes.R: 945
-# stop(gettextf("file '%s' not found", vignette), domain = NA)
-msgid "file '%s' not found"
-msgstr "plik '%s' nie został znaleziony"
+#. R/QC.R: gettext("Packages in Depends field not imported from:")
+#: R/QC.R:0
+msgid "Packages in Depends field not imported from:"
+msgstr "Pakiety z pola 'Depends' nie zostały zaimportowany z pakietu:"
 
-# tools/R/Vignettes.R: 625
-# stop(gettextf("vignette filename '%s' does not match any of the '%s' filename patterns",
-# 		file, paste(engine$package, engine$name, sep="::")),
-# 		domain = NA)
-msgid "vignette filename '%s' does not match any of the '%s' filename patterns"
+#. R/QC.R: gettextf("Packages with priorities 'base' or 'recommended' or 'defunct-base' must already be known to R.")
+#: R/QC.R:0
+msgid ""
+"Packages with priorities 'base' or 'recommended' or 'defunct-base' must "
+"already be known to R."
 msgstr ""
-"nazwa pliku ilustracji '%s' nie zgadza się z żadną ze ścieżek nazwy pliku "
-"'%s'"
+"Pakiety z priorytetami 'base' lub 'recommended' lub 'defunct-base' muszą być "
+"już być znane R."
 
-# tools/R/Vignettes.R: 698
-# stop("Inconsistent encoding specifications: ", result1, " with %\\SweaveUTF8")
-msgid "Inconsistent encoding specifications:"
-msgstr "Niespójne specyfikacje strony kodowej:"
+#. R/CRANtools.R: sprintf("Processing %s ...", m)
+#: R/CRANtools.R:0
+msgid "Processing %s ..."
+msgstr "Przetwarzanie %s ..."
 
-# tools/R/Vignettes.R: 698
-# stop("Inconsistent encoding specifications: ", result1, " with %\\SweaveUTF8")
-msgid "with %\\SweaveUTF8"
-msgstr "z %\\SweaveUTF8"
+#. R/packages.R: message("Processing packages:")
+#. R/packages.R: message("Processing packages:")
+#: R/packages.R:0
+msgid "Processing packages:"
+msgstr "Przetwarzanie pakietów:"
 
-# tools/R/Vignettes.R: 824
-# stop(gettextf("In '%s' vignettes '%s' and '%s' have the same vignette name",
-#     		      basename(dirname(dir)), orig, dup),
-#              domain = NA)
-msgid "In '%s' vignettes '%s' and '%s' have the same vignette name"
-msgstr "W ilustracjach '%s', '%s' oraz '%s' mają te same nazwy ilustracji"
+#. R/QC.R: gettext("Prototyped non-primitives:")
+#: R/QC.R:0
+msgid "Prototyped non-primitives:"
+msgstr "Prototypowane funkcje nieelementarne:"
 
-# tools/R/Vignettes.R: 942
-# stop("argument 'vignette' must be of length 1")
-msgid "argument 'vignette' must be of length 1"
-msgstr "argument 'vignette' musi być długości 1"
+#. R/translations.R: stop("R CMD build failed")
+#: R/translations.R:0
+msgid "R CMD build failed"
+msgstr "'R CMD build' nie powiodło się"
 
-# tools/R/Vignettes.R: 1040
-# stop("Vignette engine package not specified", call.=FALSE)
-msgid "Vignette engine package not specified"
-msgstr "Nie określono pakietu silnika ilustracji"
+#. R/install.R: warning("R include directory is empty -- perhaps need to install R-devel.rpm or similar",     call. = FALSE)
+#: R/install.R:0
+msgid ""
+"R include directory is empty -- perhaps need to install R-devel.rpm or "
+"similar"
+msgstr ""
+"Katalog 'include' w R jest pusty -- być może trzeba zainstalować R-devel.rpm "
+"lub coś podobnego"
 
-# tools/R/Vignettes.R: 1044
-# stop("Unsupported engine name ", sQuote(name))
-msgid "Unsupported engine name"
-msgstr "Niewspierana nazwa silnika"
+#. R/Rd.R: gettextf("Rd files must have a non-empty %s.", "\\name")
+#: R/Rd.R:0
+msgid "Rd files must have a non-empty %s."
+msgstr "Pliki Rd muszą mieć niepustą %s."
 
-# tools/R/Vignettes.R: 1057
-# stop(gettextf("None of packages %s have registered vignette engines",
-#                                  paste(sQuote(package), collapse = ", ")),
-#                         domain = NA)
-msgid "None of packages %s have registered vignette engines"
-msgstr "Żadne z pakietów %s nie mają zarejestrowanych silników ilustracji"
+#. R/Rd.R: gettext("Rd files must have a non-empty \\title.")
+#: R/Rd.R:0
+msgid "Rd files must have a non-empty \\title."
+msgstr "Pliki Rd muszą mieć niepustą sekcję '\\title'."
 
-# tools/R/Vignettes.R: 1079
-# stop(gettextf("Vignette engine %s is not registered",
-#                                   sQuote(name)), domain = NA)
-msgid "Vignette engine %s is not registered"
-msgstr "Silnik ilustracji %s nie jest zarejestrowany"
+#. R/QC.R: gettextf("Rd files with duplicated alias '%s':", nm)
+#: R/QC.R:0
+msgid "Rd files with duplicated alias '%s':"
+msgstr "Pliki Rd z powtórzonym aliasem '%s':"
 
-# tools/R/Vignettes.R: 1091
-# stop(gettextf("Vignette engine %s is not registered by any of the packages %s",
-#                                   sQuote(name),
-#                                   paste(sQuote(package), collapse = ", ")),
-#                          domain = NA)
-# tools/R/Vignettes.R: 1098
-# stop(gettextf("Vignette engine %s is not registered by any of the packages %s",
-#                               sQuote(name),
-#                               paste(sQuote(package), collapse = ", ")),
-#                      domain = NA)
-msgid "Vignette engine %s is not registered by any of the packages %s"
-msgstr ""
-"Silnik ilustracji %s nie jest zarejestrowany przez jakekolwiek pakiety %s"
+#. R/QC.R: gettextf("Rd files with duplicated name '%s':", nm)
+#: R/QC.R:0
+msgid "Rd files with duplicated name '%s':"
+msgstr "Pliki Rd z powtórzoną nazwą '%s':"
 
-# tools/R/Vignettes.R: 1110
-# stop(gettextf("Engine name %s and package %s do not match",
-#                           sQuote(name), sQuote(package)), domain = NA)
-msgid "Engine name %s and package %s do not match"
-msgstr "Nazwa silnika ilustracji %s oraz pakietu %s nie zgadzają się"
+#. R/Rd.R: stop("Rd object required")
+#: R/Rd.R:0
+msgid "Rd object required"
+msgstr "Wymagany jest obiekt Rd"
 
-# tools/R/Vignettes.R: 1125
-# stop(gettextf("Argument %s must be a function and not %s",
-#                                   sQuote("weave"), sQuote(class(weave)[1L])),
-#                          domain = NA)
-# tools/R/Vignettes.R: 1129
-# stop(gettextf("Argument %s must be a function and not %s",
-#                                   sQuote("tangle"), sQuote(class(tangle)[1L])),
-#                          domain = NA)
-msgid "Argument %s must be a function and not %s"
-msgstr "Argument %s musi być funkcją a nie %s"
+#. R/Vignettes.R: message("  Running ", sQuote(file))
+#: R/Vignettes.R:0
+msgid "Running"
+msgstr "Uruchamianie"
 
-# tools/R/Vignettes.R: 1136
-# stop(gettextf("Argument %s must be a character vector or NULL and not %s",
-#                               sQuote("pattern"), sQuote(class(pattern)[1L])),
-#                      domain = NA)
-msgid "Argument %s must be a character vector or NULL and not %s"
-msgstr "Argument %s musi być łańcuchem tekstowym lub wartością NULL, a nie %s"
+#. R/testing.R: gettextf("  Running %s", sQuote(f))
+#. R/testing.R: gettextf("  Running %s", sQuote(f))
+#: R/testing.R:0
+msgid "Running %s"
+msgstr "Uruchamianie %s"
 
-# tools/R/Vignettes.R: 1160
-# stop(gettextf("Cannot change the %s engine or use an engine of that name",
-#                               sQuote("Sweave")), domain = NA)
-msgid "Cannot change the %s engine or use an engine of that name"
-msgstr "Nie można zmienić silnika %s lub użyć silnika o tej nazwie"
+#. R/utils.R: gettextf("Running 'texi2dvi' on '%s' failed.", file)
+#: R/utils.R:0
+msgid "Running 'texi2dvi' on '%s' failed."
+msgstr "Uruchomienie 'texi2dvi' na pliku '%s' nie powiodło się."
 
-# tools/R/Vignettes.R: 1188
-# stop(gettextf("vignette builder '%s' not found", pkg), domain = NA)
-msgid "vignette builder '%s' not found"
-msgstr "konstruktor ilustracji '%s' nie został znaleziony"
+#. R/testing.R: gettextf("Running specific tests for package %s", sQuote(pkg))
+#: R/testing.R:0
+msgid "Running specific tests for package %s"
+msgstr "Uruchamianie specyficznych testów dla pakietu %s"
 
-# tools/R/admin.R: 37
-# stop(paste(gettext("Invalid DESCRIPTION file") ,
-#                    paste(.eval_with_capture(print(ok))$output,
-#                          collapse = "\n"),
-#                    sep = "\n\n"),
-#              domain = NA,
-#              call. = FALSE)
-msgid "Invalid DESCRIPTION file"
-msgstr "niepoprawny plik 'DESCRIPTION'"
+#. R/testing.R: gettextf("Running vignettes for package %s", sQuote(pkg))
+#: R/testing.R:0
+msgid "Running vignettes for package %s"
+msgstr "Uruchamianie ilustracji dla pakietu %s"
 
-# tools/R/admin.R: 54
-# warning(gettextf("*** someone has corrupted the Built field in package '%s' ***",
-#                          db["Package"]),
-#                 domain = NA,
-#                 call. = FALSE)
-# tools/R/admin.R: 115
-# warning(gettextf("*** someone has corrupted the Built field in package '%s' ***",
-#                              db["Package"]),
-#                     domain = NA,
-#                     call. = FALSE)
-msgid "*** someone has corrupted the Built field in package '%s' ***"
-msgstr "*** ktoś uszkodził pole 'Built' w pakiecie %s ***"
+#. R/QC.R: gettextf("S3 methods shown with full name in documentation object '%s':",     nm)
+#: R/QC.R:0
+msgid "S3 methods shown with full name in documentation object '%s':"
+msgstr "Metody S3 pokazane z pełną nazwą w obiekcie dokumentacji '%s':"
 
-# tools/R/admin.R: 97
-# stop(gettextf("cannot open directory '%s'",
-#                        outMetaDir),
-#               domain = NA)
-# tools/R/admin.R: 169
-# stop(gettextf("cannot open directory '%s'", meta_dir))
-# tools/R/admin.R: 285
-# stop(gettextf("cannot open directory '%s'", outDir),
-#              domain = NA)
-# tools/R/admin.R: 289
-# stop(gettextf("cannot open directory '%s'", outCodeDir),
-#              domain = NA)
-# tools/R/admin.R: 364
-# stop(gettextf("cannot open directory '%s'", outMetaDir),
-#               domain = NA)
-# tools/R/admin.R: 664
-# stop(gettextf("cannot open directory '%s'", outVignetteDir),
-#              domain = NA)
-# tools/R/admin.R: 760
-# stop(gettextf("cannot open directory '%s'", outMetaDir),
-#              domain = NA)
-msgid "cannot open directory '%s'"
-msgstr "nie można utworzyć katalogu '%s'"
+#. R/QC.R: gettextf("S4 class codoc mismatches from documentation object '%s':",     nm)
+#: R/QC.R:0
+msgid "S4 class codoc mismatches from documentation object '%s':"
+msgstr "Niezgodność struktury klasy S4 w obiekcie dokumentacji '%s':"
 
-# tools/R/admin.R: 141
-# message("WARNING: omitting pointless dependence on 'R' without a version requirement")
+#. R/logging.R: sprintf("See\n  %s\nfor details.\n", sQuote(Log$filename))
+#: R/logging.R:0
 msgid ""
-"WARNING: omitting pointless dependence on 'R' without a version requirement"
+"See\n"
+"  %s\n"
+"for details."
 msgstr ""
-"Ostrzeżenie: pomijanie bezsensownej zależności od 'R' bez wymogu wersji"
+"Zobacz\n"
+"  %s\n"
+"aby poznać szczegóły."
 
-# tools/R/admin.R: 225
-# warning("cannot turn off locale-specific sorting via LC_COLLATE")
-msgid "cannot turn off locale-specific sorting via LC_COLLATE"
+#. R/Rd.R: gettext("See chapter 'Writing R documentation' in manual 'Writing R Extensions'.")
+#. R/Rd.R: gettext("See chapter 'Writing R documentation' in manual 'Writing R Extensions'.")
+#: R/Rd.R:0
+msgid "See chapter 'Writing R documentation' in manual 'Writing R Extensions'."
 msgstr ""
-"nie można wyłączyć sortowania zależnego od specyficznej lokalizacji poprzez "
-"LC_COLLATE"
+"Zobacz rozdział 'Writing R documentation' w podręczniku 'Writing R "
+"Extensions'."
 
-msgid "duplicated files in '%s' field:"
-msgstr "powtórzone pliki w polu '%s':"
+#. R/QC.R: gettextf("See section %s in '%s'.", sQuote("Good practice"),     "?.onAttach")
+#. R/QC.R: gettextf("See section %s in '%s'.", sQuote("Good practice"),     "?.Last.lib")
+#. R/check.R: gettextf("See section %s in '%s'.", sQuote("Good practice"),     "?attach")
+#. R/check.R: gettextf("See section %s in '%s'.", sQuote("Good practice"),     "?data")
+#: R/QC.R:0 R/check.R:0
+msgid "See section %s in '%s'."
+msgstr "Zobacz sekcję %s w '%s'."
 
-msgid "files in '%s' field missing from '%s':"
-msgstr "pliki w polu '%s' których brakuje w '%s':"
+#. R/QC.R: gettextf("See section 'Cross-references' in the 'Writing R Extensions' manual.")
+#: R/QC.R:0
+msgid "See section 'Cross-references' in the 'Writing R Extensions' manual."
+msgstr ""
+"Zobacz informację w sekcji 'Cross-references' podręcznika 'Writing R "
+"Extensions'."
 
-msgid "files in '%s' missing from '%s' field:"
-msgstr "pliki w '%s' których brakuje w polu '%s':"
+#. R/QC.R: gettextf("See section 'The DESCRIPTION file' in the 'Writing R Extensions' manual.")
+#. R/QC.R: gettextf("See section 'The DESCRIPTION file' in the 'Writing R Extensions' manual.")
+#: R/QC.R:0
+msgid ""
+"See section 'The DESCRIPTION file' in the 'Writing R Extensions' manual."
+msgstr ""
+"Zobacz informację w sekcji 'The DESCRIPTION file' podręcznika 'Writing R "
+"Extensions'."
 
-# tools/R/admin.R: 293
-# stop(gettextf("unable to create '%s'", outFile), domain = NA)
-msgid "unable to create '%s'"
-msgstr "nie można utworzyć '%s'"
+#. R/QC.R: gettextf("Slots for class '%s'", docObj[["name"]])
+#: R/QC.R:0
+msgid "Slots for class '%s'"
+msgstr "Gniazda dla klasy \"%s\""
 
-# tools/R/admin.R: 358
-# stop(gettextf("unable to copy INDEX to '%s'",
-#                           file.path(outDir, "INDEX")),
-#                  domain = NA)
-msgid "unable to copy INDEX to '%s'"
-msgstr "nie można skopiować pliku INDEX do '%s'"
+#. R/QC.R: gettextf("Standardizable: %s", x$is_standardizable)
+#: R/QC.R:0
+msgid "Standardizable: %s"
+msgstr "Standaryzowalne: %s"
 
-# tools/R/admin.R: 684
-# stop(gettextf("cannot create directory '%s'", buildDir), domain = NA)
-msgid "cannot create directory '%s'"
-msgstr "nie można utworzyć katalogu '%s'"
+#. R/QC.R: gettext("Standardized license specification:")
+#: R/QC.R:0
+msgid "Standardized license specification:"
+msgstr "Ustandaryzowana specyfikacja licencji:"
 
-# tools/R/utils.R: 1706
-# message(sprintf("processing %s", basename(dir)))
-# tools/R/admin.R: 695
-# message(gettextf("processing %s", sQuote(basename(file))),
-#                 domain = NA)
-# tools/R/pdftools.R: 1315
-# message(sprintf("processing %s",
-#                             paste(names(entry), entry, collapse = " ")))
-msgid "processing %s"
-msgstr "przetwarzanie %s"
+#. R/testing.R: gettextf("Testing examples for package %s", sQuote(pkg))
+#: R/testing.R:0
+msgid "Testing examples for package %s"
+msgstr "Testowanie przykładów dla pakietu %s"
 
-# tools/R/admin.R: 708
-# stop(gettextf("running %s on vignette '%s' failed with message:\n%s",
-#                  engine[["name"]], file, conditionMessage(e)),
-#                  domain = NA, call. = FALSE)
-msgid ""
-"running %s on vignette '%s' failed with message:\n"
-"%s"
-msgstr ""
-"wykonywanie %s na ilustracji '%s' nie powiodło się z wynikiem:\n"
-"%s"
+#. R/bibstyle.R: stop("The default JSS style may not be modified.")
+#: R/bibstyle.R:0
+msgid "The default JSS style may not be modified."
+msgstr "Domyślny styl JSS nie może być zmieniony."
+
+#. R/QC.R: gettext("These fields must have ASCII values.")
+#: R/QC.R:0
+msgid "These fields must have ASCII values."
+msgstr "Te pola muszą mieć wartości ASCII."
 
-# tools/R/admin.R: 724
-# stop(gettextf("compiling TeX file %s failed with message:\n%s",
-#                  sQuote(output), conditionMessage(e)),
-#                  domain = NA, call. = FALSE)
+#. R/QC.R: gettextf("This field must contain one or more packages (and no version requirement).")
+#: R/QC.R:0
 msgid ""
-"compiling TeX file %s failed with message:\n"
-"%s"
+"This field must contain one or more packages (and no version requirement)."
 msgstr ""
-"kompilowanie pliku TeX %s nie powiodło się zwracając komunikat:\n"
-"%s"
+"To pole musi zawierać jeden lub więcej pakietów (nie jest wymagana wersja)."
 
-# tools/R/admin.R: 732
-# stop(gettextf("cannot copy '%s' to '%s'",
-#                           output,
-#                           outVignetteDir),
-#                  domain = NA)
-msgid "cannot copy '%s' to '%s'"
-msgstr "nie można skopiować pliku '%s' do katalogu '%s'"
+#. R/dynamicHelp.R: gettextf("URL %s was not found", mono(path))
+#. R/dynamicHelp.R: gettextf("URL %s was not found", mono(path))
+#: R/dynamicHelp.R:0
+msgid "URL %s was not found"
+msgstr "adres URL %s nie został znaleziony"
 
-# tools/R/admin.R: 871
-# message("WARNING: malformed 'Depends' field in 'DESCRIPTION'")
-msgid "WARNING: malformed 'Depends' field in 'DESCRIPTION'"
-msgstr "OSTRZEŻENIE: nieprawidłowe pole 'Depends' w 'DESCRIPTION'"
+#. R/QC.R: gettextf("Unavailable namespace imported from by a ':::' call: %s",     sQuote(xx))
+#: R/QC.R:0
+msgid "Unavailable namespace imported from by a ':::' call: %s"
+msgstr "Niedostępna przestrzeń nazw zaimportowana przez wywołanie ':::': %s"
 
-# tools/R/admin.R: 888
-# gettextf("ERROR: this R is version %s, package '%s' requires R %s %s",
-#                                     current, package,
-#                                     depends$op, depends$version)
-msgid "ERROR: this R is version %s, package '%s' requires R %s %s"
-msgstr "BŁĄD: Ta wersja R to %s, pakiet %s wymaga wersji R %s %s"
+#. R/QC.R: gettext("Unavailable namespaces imported from by ':::' calls:")
+#: R/QC.R:0
+msgid "Unavailable namespaces imported from by ':::' calls:"
+msgstr "Niedostępne przestrzenie nazw zaimportowane przez wywołania ':::':"
 
-# tools/R/admin.R: 892
-# gettextf("ERROR: this R is version %s, required is R %s %s",
-#                                     current, depends$op, depends$version)
-msgid "ERROR: this R is version %s, required is R %s %s"
-msgstr "BŁĄD: wersja tego programu to R %s, wymagana jest R %s %s"
+#. R/QC.R: gettextf("Undocumented %s:", tag)
+#: R/QC.R:0
+msgid "Undocumented %s:"
+msgstr "Nieudokumentowane %s:"
 
-# tools/R/admin.R: 915
-# stop("loading failed", call. = FALSE)
-msgid "loading failed"
-msgstr "ładowanie nie powiodło się"
+#. R/QC.R: gettext("Undocumented S4 classes:")
+#: R/QC.R:0
+msgid "Undocumented S4 classes:"
+msgstr "Nieudokumentowane klasy S4:"
 
-# tools/R/assertCondition.R: 42
-# message("assertConditon: Successfully caught a condition\n")
-msgid "assertConditon: Successfully caught a condition"
-msgstr "assertConditon: Pomyślnie przechwycono warunek"
+#. R/QC.R: gettext("Undocumented S4 methods:")
+#: R/QC.R:0
+msgid "Undocumented S4 methods:"
+msgstr "Nieudokumentowane metody S4:"
 
-# tools/R/assertCondition.R: 51
-# message(sprintf("assertCondition: caught %s",
-#                                     paste(dQuote(found), collapse =", ")))
-msgid "assertCondition: caught %s"
-msgstr "assertCondition: przechwycono %s"
-
-# tools/R/Vignettes.R: 29
-# stop(gettextf("Vignette product %s does not have a known filename extension (%s)",
-#                       sQuote(file), paste(sQuote(names(type)), collapse=", ")),
-#              domain = NA)
-# tools/R/Vignettes.R: 78
-# stop(gettextf("Failed to locate the %s output file (by engine %s) for vignette with name %s. The following files exist in directory %s: %s",
-#                           sQuote(by),
-#                           sQuote(sprintf("%s::%s", engine$package, engine$name)),
-#                           sQuote(name), sQuote(dir),
-#                           paste(sQuote(output0), collapse=", ")),
-#                  domain = NA)
-# tools/R/Vignettes.R: 85
-# stop(gettextf("Located more than one %s output file (by engine %s) for vignette with name %s: %s", sQuote(by),
-#                           sQuote(sprintf("%s::%s", engine$package, engine$name)),
-#                           sQuote(name), paste(sQuote(output), collapse=", ")),
-#                  domain  = NA)
-# tools/R/Vignettes.R: 102
-# stop(gettextf("Failed to locate the %s output file (by engine %s) for vignette with name %s. The following files exist in directory %s: %s",
-#                           sQuote(by),
-#                           sQuote(sprintf("%s::%s", engine$package, engine$name)),
-#                           sQuote(name), sQuote(dir),
-#                           paste(sQuote(output0), collapse=", ")),
-#                  domain = NA)
-# tools/R/Vignettes.R: 109
-# stop(gettextf("Located more than one %s output file (by engine %s) for vignette with name %s: %s",
-#                           sQuote(by),
-#                           sQuote(sprintf("%s::%s", engine$package, engine$name)),
-#                           sQuote(name), paste(sQuote(output), collapse=", ")),
-#                  domain = NA)
-# tools/R/Vignettes.R: 219
-# stop(gettextf("Vignette %s overwrites the following %s output by vignette %s: %s",
-#                                    sQuote(basename(names(resultsT)[j])),
-#                                    sQuote(name),
-#                                    sQuote(basename(names(resultsT)[i])),
-#                                    paste(basename(bad), collapse=", ")),
-#                           domain = NA)
-# tools/R/Vignettes.R: 478
-# stop(gettextf("Detected vignette source files (%s) with shared names (%s) and therefore risking overwriting each others output files",
-#                       paste(sQuote(docs), collapse=", "),
-#                       paste(sQuote(names), collapse=", ")),
-#              domain = NA)
-# tools/R/Vignettes.R: 1057
-# stop(gettextf("None of packages %s have registered vignette engines",
-#                                  paste(sQuote(package), collapse = ", ")),
-#                         domain = NA)
-# tools/R/Vignettes.R: 1091
-# stop(gettextf("Vignette engine %s is not registered by any of the packages %s",
-#                                   sQuote(name),
-#                                   paste(sQuote(package), collapse = ", ")),
-#                          domain = NA)
-# tools/R/Vignettes.R: 1098
-# stop(gettextf("Vignette engine %s is not registered by any of the packages %s",
-#                               sQuote(name),
-#                               paste(sQuote(package), collapse = ", ")),
-#                      domain = NA)
-# tools/R/makeLazyLoad.R: 132
-# warning(sprintf(ngettext(sum(dup),
-#                                          "object %s is created by more than one data call",
-#                                          "objects %s are created by more than one data call"),
-#                                 paste(sQuote(loaded[dup]), collapse=", ")),
-#                         call. = FALSE, domain = NA)
-# tools/R/checktools.R: 208
-# message(paste(strwrap(sprintf("installing dependencies %s",
-#                                       paste(sQuote(depends),
-#                                             collapse = ", ")),
-#                               exdent = 2L),
-#                       collapse = "\n"))
-# tools/R/QC.R: 4030
-# message(sprintf(ngettext(sum(obsolete),
-#                                  "Obsolete package %s in Rd xrefs",
-#                                  "Obsolete packages %s in Rd xrefs"),
-#                         paste(sQuote(unknown[obsolete]), collapse = ", ")),
-#                 domain = NA)
-# tools/R/QC.R: 4046
-# message(sprintf(ngettext(sum(miss),
-#                                      "Package unavailable to check Rd xrefs: %s",
-#                                      "Packages unavailable to check Rd xrefs: %s"),
-#                              paste(sQuote(unknown[miss]), collapse = ", ")),
-#                     domain = NA)
-# tools/R/QC.R: 4052
-# message(sprintf(ngettext(sum(!miss),
-#                                      "Unknown package %s in Rd xrefs",
-#                                      "Unknown packages %s in Rd xrefs"),
-#                              paste(sQuote(unknown[!miss]), collapse = ", ")),
-#                     domain = NA)
-# tools/R/QC.R: 4695
-# gettextf("  %s has wrong argument list %s",
-#                          f, sQuote(paste(bad, collapse = ", ")))
-# tools/R/QC.R: 4841
-# gettextf("  %s has wrong argument list %s",
-#                          f, sQuote(paste(bad, collapse = ", ")))
-# tools/R/QC.R: 6033
-# sprintf("entry %d (%s): missing required field(s) %s",
-#                                    pos,
-#                                    db$Entry[pos],
-#                                    sapply(bad[pos],
-#                                           function(s)
-#                                           paste(sQuote(s),
-#                                                 collapse = ", ")))
-# tools/R/QC.R: 6678
-# sprintf("  %s (%s)",
-#                     names(s),
-#                     lapply(s, paste, collapse = ", "))
-# tools/R/QC.R: 7166
-# warning(gettextf("Generics 'g' in 'env' %s where '%s' errors: %s\nMay need something like\n\n%s\nin NAMESPACE.",
-#                              format(env),
-#                              "hasMethods(g, env)",
-#                              paste(sQuote(rErr), collapse = ", "),
-#                              paste0("  importFrom(",
-#                                     paste(dq(pkgs), dq(rErr), sep =", "),
-#                                     ")\n")
-#                              ),
-#                     domain = NA)
-# tools/R/QC.R: 7180
-# message(sprintf(ngettext(sum(!ok),
-#                                      "Generic without any methods in %s: %s",
-#                                      "Generics without any methods in %s: %s"),
-#                             format(env),
-#                             paste(sQuote(r[!ok]), collapse = ", ")),
-#                     domain = NA)
-# tools/R/admin.R: 305
-# warning(sprintf(ngettext(length(bad),
-#                                          "unable to re-encode %s line %s",
-#                                          "unable to re-encode %s lines %s"),
-#                                 sQuote(basename(f)),
-#                                 paste(bad, collapse = ", ")),
-#                         domain = NA, call. = FALSE)
-# tools/R/sotools.R: 387
-# gettextf("Found %s, possibly from %s",
-#                                     sQuote(v),
-#                                     paste(sprintf("%s (%s)",
-#                                                   sQuote(u[, "ssname"]),
-#                                                   u[, "language"]),
-#                                           collapse = ", "))
-# tools/R/sotools.R: 395
-# sprintf("Objects: %s",
-#                                        paste(sQuote(w), collapse =
-#                                              ", "))
-# tools/R/pdftools.R: 998
-# sprintf("PDF_Dictionary(<<%s>>)",
-#             paste(names(x), collapse = ","))
-# tools/R/pdftools.R: 1005
-# sprintf("PDF_Stream(<<%s>>)",
-#             paste(names(x), collapse = ","))
-# tools/R/assertCondition.R: 51
-# message(sprintf("assertCondition: caught %s",
-#                                     paste(dQuote(found), collapse =", ")))
-# tools/R/check.R: 4492
-# sprintf("Current CRAN status: %s",
-#                         paste(sprintf("%s: %s", names(tab), tab),
-#                               collapse = ", "))
-# tools/R/check.R: 4533
-# sprintf("See: %s",
-#                                  paste(sprintf("<http://www.r-project.org/nosvn/R.check/%s/%s-00check.html>",
-#                                                flavors,
-#                                                p),
-#                                        collapse = ",\n     "))
-# tools/R/check.R: 4552
-# sprintf("See: %s",
-#                         paste(sprintf("<http://www.stats.ox.ac.uk/pub/bdr/memtests/%s/%s>",
-#                                       tests,
-#                                       paths),
-#                               collapse = ",\n     "))
-msgid ","
-msgstr ","
-
-# tools/R/assertCondition.R: 59
-# stop(gettextf("Got %s in evaluating %s; wanted %s",
-# 			      .got, .exprString, .Wanted))
-msgid "Got %s in evaluating %s; wanted %s"
-msgstr "Otrzymano %s podczas wyznaczania %s; oczekiwano %s"
+#. R/QC.R: gettextf("Undocumented arguments in documentation object '%s'",     nm)
+#: R/QC.R:0
+msgid "Undocumented arguments in documentation object '%s'"
+msgstr "Nieudokumentowane argumenty w obiekcie dokumentacji '%s'"
 
-# tools/R/assertCondition.R: 65
-# stop(gettextf("Failed to get %s in evaluating %s",
-# 		      .Wanted, .exprString))
-msgid "Failed to get %s in evaluating %s"
-msgstr "Nie udało się uzyskać %s podczas wyznaczania %s"
+#. R/QC.R: gettext("Undocumented code objects:")
+#: R/QC.R:0
+msgid "Undocumented code objects:"
+msgstr "Nieudokumentowane obiekty kodu:"
 
-# tools/R/assertCondition.R: 73
-# stop(gettextf("Failed to get error in evaluating %s", d.expr),
-#                       call. = FALSE)
-msgid "Failed to get error in evaluating %s"
-msgstr "Nie udało się uzyskać błędu podczas wyznaczania %s"
+#. R/QC.R: gettext("Undocumented data sets:")
+#: R/QC.R:0
+msgid "Undocumented data sets:"
+msgstr "Nieudokumentowane zbiory danych:"
 
-# tools/R/assertCondition.R: 78
-# message(sprintf("Asserted error: %s", error[[1]]$message))
-msgid "Asserted error: %s"
-msgstr "Założony błąd: %s"
+#. R/QC.R: gettextf("Unexported object imported by a ':::' call: %s", sQuote(xxx))
+#: R/QC.R:0
+msgid "Unexported object imported by a ':::' call: %s"
+msgstr "Brakujący obiekt zaimportowany przez wywołanie ':::': %s"
 
-# tools/R/assertCondition.R: 87
-# stop(gettextf("Got warning in evaluating %s, but also an error", d.expr))
-msgid "Got warning in evaluating %s, but also an error"
-msgstr "Otrzymano ostrzeżenie podczas wyznaczania %s, ale również błąd"
+#. R/QC.R: gettext("Unexported objects imported by ':::' calls:")
+#: R/QC.R:0
+msgid "Unexported objects imported by ':::' calls:"
+msgstr "Brakujące obiekty zaimportowane przez wywołania ':::':"
 
-# tools/R/assertCondition.R: 90
-# message(sprintf("Asserted warning: %s", warning[[1]]$message))
-msgid "Asserted warning: %s"
-msgstr "Założone ostrzeżenie: %s"
+#. R/QC.R: gettext("Unknown encoding")
+#: R/QC.R:0
+msgid "Unknown encoding"
+msgstr "Nieznane kodowanie"
 
-# tools/R/bibstyle.R: 339
-# stop("Changes require specified 'style'")
-msgid "Changes require specified 'style'"
-msgstr "Zmiany wymagają określonego 'style'"
+#. R/QC.R: gettext("Unknown encoding with non-ASCII data")
+#: R/QC.R:0
+msgid "Unknown encoding with non-ASCII data"
+msgstr "Nieznane kodowanie z danymi nie-ASCII"
 
-# tools/R/bibstyle.R: 348
-# stop("The default JSS style may not be modified.")
-msgid "The default JSS style may not be modified."
-msgstr "Domyślny styl JSS nie może być zmieniony."
+#. R/utils.R: gettext("Unknown encoding with non-ASCII data: converting to ASCII")
+#: R/utils.R:0
+msgid "Unknown encoding with non-ASCII data: converting to ASCII"
+msgstr "Nieznane kodowanie z danymi nie-ASCII: konwertowanie do ASCII"
 
-# tools/R/build.R: 791
-# warning(gettextf("invalid value for '--compact-vignettes', assuming %s",
-#                          "\"qpdf\""),
-#                 domain = NA)
-msgid "invalid value for '--compact-vignettes', assuming %s"
-msgstr "Niepoprawna wartość '--compact-vignettes', zakładanie %s"
+#. R/Vignettes.R: stop("Unsupported engine name ", sQuote(name))
+#: R/Vignettes.R:0
+msgid "Unsupported engine name"
+msgstr "Niewspierana nazwa silnika"
 
-# tools/R/build.R: 870
-# message(gettextf("Error: cannot rename directory to %s",
-#                                  sQuote(intname)), domain = NA)
-msgid "Error: cannot rename directory to %s"
-msgstr "Błąd: nie można zmienić katalogu na %s"
+#. R/QC.R: gettextf("Variables in data frame '%s'", docObj[["name"]])
+#: R/QC.R:0
+msgid "Variables in data frame '%s'"
+msgstr "Zmienne w ramce danych '%s'"
 
-# tools/R/check.R: 69
-# stop(gettextf("cannot link from %s", from), domain = NA)
-msgid "cannot link from %s"
-msgstr "nie można połączyć z %s"
+#. R/QC.R: gettextf("Variables overriding user/site settings:")
+#: R/QC.R:0
+msgid "Variables overriding user/site settings:"
+msgstr "Zmienne omijające ustawienia użytkownika/strony:"
 
-# tools/R/check.R: 3871
-# stop("-l option without value", call. = FALSE)
-msgid "-l option without value"
-msgstr "opcja '-l' bez wartości"
+#. R/QC.R: gettextf("Version numbers must be sequences of at least two non-negative integers, separated by single '.' or '-'.")
+#: R/QC.R:0
+msgid ""
+"Version numbers must be sequences of at least two non-negative integers, "
+"separated by single '.' or '-'."
+msgstr ""
+"Numery wersji muszą być ciągiem co najmniej dwóch nieujemnych liczb "
+"całkowitych, oddzielonych pojedynczym znakiem '.' lub '-'."
 
-# tools/R/check.R: 3919
-# warning("configuration files are not supported as from R 2.12.0")
-msgid "configuration files are not supported as from R 2.12.0"
-msgstr "pliki konfiguracyjne nie są wspierane od wersji R 2.12.0"
+#. R/Vignettes.R: gettextf("Vignette %s overwrites the following %s output by vignette %s: %s",     sQuote(basename(names(resultsT)[j])), sQuote(name), sQuote(basename(names(resultsT)[i])),     paste(basename(bad), collapse = ", "))
+#: R/Vignettes.R:0
+msgid "Vignette %s overwrites the following %s output by vignette %s: %s"
+msgstr "Ilustracja %s nadpisuje następujące wyjścia %s przez ilustrację %s: %s"
 
-# tools/R/check.R: 3967
-# warning("'--multiarch' specified with only one usable sub-architecture",
-#                     call.=FALSE, immediate. = TRUE)
-msgid "'--multiarch' specified with only one usable sub-architecture"
-msgstr "'--multiarch' zdefiniowany tylko z jedną użyteczną pod-architekturą"
+#. R/Vignettes.R: gettextf("Vignette '%s' is non-ASCII but has no declared encoding",     name)
+#. R/Vignettes.R: gettextf("Vignette '%s' is non-ASCII but has no declared encoding",     file)
+#. R/Vignettes.R: gettextf("Vignette '%s' is non-ASCII but has no declared encoding",     name)
+#: R/Vignettes.R:0
+msgid "Vignette '%s' is non-ASCII but has no declared encoding"
+msgstr "Ilustracja '%s' nie jest ASCII, ale nie zawiera deklaracji kodowania"
 
-# tools/R/check.R: 4058
-# message("'--as-cran' turns off '--extra-arch'")
-msgid "'--as-cran' turns off '--extra-arch'"
-msgstr "opcja '--as-cran' wyłącza opcję '--extra-arch'"
+#. R/QC.R: gettextf("Vignette dependencies (%s entries) must be contained in the DESCRIPTION Depends/Suggests/Imports entries.",     "\\VignetteDepends{}")
+#: R/QC.R:0
+msgid ""
+"Vignette dependencies (%s entries) must be contained in the DESCRIPTION "
+"Depends/Suggests/Imports entries."
+msgstr ""
+"Zależności ilustracji (wpisy %s) muszą być zawarte we wpisach 'Depends/"
+"Suggests/Imports'."
 
-# tools/R/check.R: 4136
-# message("Error: no packages were specified")
-msgid "Error: no packages were specified"
-msgstr "Błąd: nie określono pakietów"
+#. R/Vignettes.R: gettextf("Vignette engine %s is not registered", sQuote(name))
+#: R/Vignettes.R:0
+msgid "Vignette engine %s is not registered"
+msgstr "Silnik ilustracji %s nie jest zarejestrowany"
 
-# tools/R/check.R: 4180
-# message(sprintf("ERROR: cannot create check dir %s", sQuote(pkgoutdir)))
-msgid "ERROR: cannot create check dir %s"
-msgstr "BŁĄD: nie można utworzyć katalogu sprawdzenia %s"
+#. R/Vignettes.R: gettextf("Vignette engine %s is not registered by any of the packages %s",     sQuote(name), paste(sQuote(package), collapse = ", "))
+#. R/Vignettes.R: gettextf("Vignette engine %s is not registered by any of the packages %s",     sQuote(name), paste(sQuote(package), collapse = ", "))
+#: R/Vignettes.R:0
+msgid "Vignette engine %s is not registered by any of the packages %s"
+msgstr ""
+"Silnik ilustracji %s nie jest zarejestrowany przez jakekolwiek pakiety %s"
 
-# tools/R/check.R: 4203
-# stop(gettextf("package directory %s does not exist",
-#                           sQuote(pkg)), domain = NA)
-msgid "package directory %s does not exist"
-msgstr "katalog pakietu %s nie istnieje"
+#. R/Vignettes.R: stop("Vignette engine package not specified", call. = FALSE)
+#: R/Vignettes.R:0
+msgid "Vignette engine package not specified"
+msgstr "Nie określono pakietu silnika ilustracji"
 
-# tools/R/checktools.R: 36
-# message("no packages to check")
-msgid "no packages to check"
-msgstr "brak pakietów do sprawdzenia"
+#. R/Vignettes.R: gettextf("Vignette product %s does not have a known filename extension (%s)",     sQuote(file), paste(sQuote(names(type)), collapse = ", "))
+#: R/Vignettes.R:0
+msgid "Vignette product %s does not have a known filename extension (%s)"
+msgstr "Produkt ilustracji %s nie posiada znanego rozszerzenia (%s)"
 
-# tools/R/checktools.R: 171
-# message("downloading reverse dependencies ...")
-msgid "downloading reverse dependencies ..."
-msgstr "pobieranie wstecznych zależności ..."
+#. R/dynamicHelp.R: gettext("Vignettes:")
+#: R/dynamicHelp.R:0
+msgid "Vignettes:"
+msgstr "Ilustracje:"
 
-# tools/R/checktools.R: 176
-# message(sprintf("downloading %s ... ", rfiles[i]),
-#                         appendLF = FALSE)
-msgid "downloading %s ..."
-msgstr "pobieranie pliku %s ..."
+#. R/admin.R: message("WARNING: malformed 'Depends' field in 'DESCRIPTION'")
+#: R/admin.R:0
+msgid "WARNING: malformed 'Depends' field in 'DESCRIPTION'"
+msgstr "OSTRZEŻENIE: nieprawidłowe pole 'Depends' w 'DESCRIPTION'"
 
-# tools/R/checktools.R: 208
-# message(paste(strwrap(sprintf("installing dependencies %s",
-#                                       paste(sQuote(depends),
-#                                             collapse = ", ")),
-#                               exdent = 2L),
-#                       collapse = "\n"))
-msgid "installing dependencies %s"
-msgstr "instalowanie zależności %s"
-
-# tools/R/checktools.R: 270
-# message(sprintf("checking %s ...", pfile))
-msgid "checking %s ..."
-msgstr "sprawdzanie %s ..."
+#. R/admin.R: message("WARNING: omitting pointless dependence on 'R' without a version requirement")
+#: R/admin.R:0
+msgid ""
+"WARNING: omitting pointless dependence on 'R' without a version requirement"
+msgstr ""
+"Ostrzeżenie: pomijanie bezsensownej zależności od 'R' bez wymogu wersji"
 
-# tools/R/citation.R: 43
-# stop("non-ASCII input in a CITATION file without a declared encoding")
-msgid "non-ASCII input in a CITATION file without a declared encoding"
-msgstr "wejście nie-ASCII w pliku 'CITATION' bez zadeklarowanego kodowania"
+#. R/Rd2pdf.R: message("Warning: unknown option ", sQuote(a))
+#. R/Rd2pdf.R: message("Warning: unknown option ", sQuote(a))
+#. R/build.R: message("Warning: unknown option ", sQuote(a))
+#. R/check.R: message("Warning: unknown option ", sQuote(a))
+#: R/Rd2pdf.R:0 R/build.R:0 R/check.R:0
+msgid "Warning: unknown option"
+msgstr "Ostrzeżenie: nieznana opcja"
 
-# tools/R/dynamicHelp.R: 37
-# gettext("No files in this directory")
-msgid "No files in this directory"
-msgstr "Brak plików w tym katalogu"
+#. R/makeLazyLoad.R: stop("all packages should have a NAMESPACE")
+#: R/makeLazyLoad.R:0
+msgid "all packages should have a NAMESPACE"
+msgstr "wszystkie pakiety powinny mieć plik 'NAMESPACE'"
 
-# tools/R/dynamicHelp.R: 106
-# gettext("No results found")
-msgid "No results found"
-msgstr "Brak wyników"
+#. R/read.00Index.R: gettextf("argument '%s' must be a character string or connection",     file)
+#: R/read.00Index.R:0
+msgid "argument '%s' must be a character string or connection"
+msgstr "argument '%s' musi być łańcuchem tekstowym lub połączeniem"
 
-# tools/R/dynamicHelp.R: 114
-# gettext("Vignettes:")
-msgid "Vignettes:"
-msgstr "Ilustracje:"
+#. R/utils.R: stop("argument 'delim' must specify two characters")
+#: R/utils.R:0
+msgid "argument 'delim' must specify two characters"
+msgstr "argument 'delim' musi określać dwa znaki"
 
-# tools/R/dynamicHelp.R: 135
-# gettext("Code demonstrations:")
-msgid "Code demonstrations:"
-msgstr "Przykładowe użycia kodu:"
+#. R/Rd.R: stop("argument 'outFile' must be a character string or connection")
+#: R/Rd.R:0
+msgid "argument 'outFile' must be a character string or connection"
+msgstr "argument 'outfile' musi być łańcuchem tekstowym lub połączeniem"
 
-# tools/R/dynamicHelp.R: 139
-# gettext("Help pages:")
-msgid "Help pages:"
-msgstr "Strony pomocy:"
+#. R/QC.R: stop("argument 'package' must be of length 1")
+#. R/QC.R: stop("argument 'package' must be of length 1")
+#. R/QC.R: stop("argument 'package' must be of length 1")
+#. R/QC.R: stop("argument 'package' must be of length 1")
+#. R/QC.R: stop("argument 'package' must be of length 1")
+#. R/QC.R: stop("argument 'package' must be of length 1")
+#. R/QC.R: stop("argument 'package' must be of length 1")
+#. R/QC.R: stop("argument 'package' must be of length 1")
+#. R/QC.R: stop("argument 'package' must be of length 1")
+#. R/QC.R: stop("argument 'package' must be of length 1")
+#. R/QC.R: stop("argument 'package' must be of length 1")
+#. R/QC.R: stop("argument 'package' must be of length 1")
+#. R/QC.R: stop("argument 'package' must be of length 1")
+#. R/QC.R: stop("argument 'package' must be of length 1")
+#. R/QC.R: stop("argument 'package' must be of length 1")
+#. R/QC.R: stop("argument 'package' must be of length 1")
+#. R/QC.R: stop("argument 'package' must be of length 1")
+#. R/QC.R: stop("argument 'package' must be of length 1")
+#. R/QC.R: stop("argument 'package' must be of length 1")
+#. R/Rd.R: stop("argument 'package' must be of length 1")
+#. R/Vignettes.R: stop("argument 'package' must be of length 1")
+#: R/QC.R:0 R/Rd.R:0 R/Vignettes.R:0
+msgid "argument 'package' must be of length 1"
+msgstr "argument 'package' musi być długości 1"
 
-# tools/R/dynamicHelp.R: 234
-# gettextf("No help found for topic %s in any package.",
-#                             mono(topic))
-msgid "No help found for topic %s in any package."
-msgstr "Nie znaleziono pomocy na temat '%s' w żadnym z pakiecie."
+#. R/pkgDepends.R: stop("argument 'pkg' must be of length 1")
+#: R/pkgDepends.R:0
+msgid "argument 'pkg' must be of length 1"
+msgstr "argument 'pkg' musi być długości 1"
 
-# tools/R/dynamicHelp.R: 290
-# gettextf("No package index found for package %s",
-#                              mono(pkg))
-msgid "No package index found for package %s"
-msgstr "Nie znaleziono indeksu pakietu dla pakietu %s"
+#. R/Vignettes.R: stop("argument 'vignette' must be of length 1")
+#: R/Vignettes.R:0
+msgid "argument 'vignette' must be of length 1"
+msgstr "argument 'vignette' musi być długości 1"
 
-# tools/R/dynamicHelp.R: 293
-# gettextf("No package named %s could be found",
-#                              mono(pkg))
-# tools/R/dynamicHelp.R: 307
-# gettextf("No package named %s could be found", mono(pkg))
-msgid "No package named %s could be found"
-msgstr "Nie znaleziono pakietu o nazwie '%s'"
+#. R/utils.R: stop("argument 'x' must be a character vector")
+#: R/utils.R:0
+msgid "argument 'x' must be a character vector"
+msgstr "argument 'x' musi być wektorem tekstowym"
 
-# tools/R/dynamicHelp.R: 305
-# gettextf("No help found for package %s", mono(pkg) )
-msgid "No help found for package %s"
-msgstr "Nie znaleziono pomocy na temat pakietu '%s'"
+#. R/assertCondition.R: message("assertConditon: Successfully caught a condition\n")
+#: R/assertCondition.R:0
+msgid "assertConditon: Successfully caught a condition"
+msgstr "assertConditon: Pomyślnie przechwycono warunek"
 
-# tools/R/dynamicHelp.R: 321
-# gettextf("Link %s in package %s could not be located",
-#                                 mono(helpdoc), mono(pkg))
-msgid "Link %s in package %s could not be located"
-msgstr "Linki %s w pakiecie '%s' nie mogły zostać zlokalizowane"
+#. R/pdftools.R: stop("attempting to select less than one element")
+#: R/pdftools.R:0
+msgid "attempting to select less than one element"
+msgstr "próba wybrania mniej niż jednego elementu"
 
-# tools/R/dynamicHelp.R: 358
-# gettextf("No docs found for package %s",
-#                                        mono(pkg))
-msgid "No docs found for package %s"
-msgstr "Nie znaleziono dokumentów dla pakietu '%s'"
+#. R/pdftools.R: stop("attempting to select more than one element")
+#: R/pdftools.R:0
+msgid "attempting to select more than one element"
+msgstr "próba wybrania więcej niż jednego elementu"
 
-# tools/R/dynamicHelp.R: 431
-# gettextf("Only help files, %s, %s and files under %s and %s in a package can be viewed", mono("NEWS"),
-#                               mono("DESCRIPTION"), mono("doc/"), mono("demo/"))
-msgid ""
-"Only help files, %s, %s and files under %s and %s in a package can be viewed"
-msgstr ""
-"Tylko pliki pomocy, %s, %s oraz pliki w %s oraz %s w pakiecie mogą być "
-"przegladane"
+#. R/pkgDepends.R: stop("bad operand")
+#: R/pkgDepends.R:0
+msgid "bad operand"
+msgstr "zły operand"
 
-# tools/R/dynamicHelp.R: 453
-# gettextf("unsupported URL %s", mono(path))
-msgid "unsupported URL %s"
-msgstr "niewspierany adres URL %s"
+#. R/install.R: stop("building a fake installation is disallowed")
+#: R/install.R:0
+msgid "building a fake installation is disallowed"
+msgstr "budowałe fałszywej instalacji jest zabronione"
 
-# tools/R/dynamicHelp.R: 455
-# gettextf("URL %s was not found", mono(path))
-msgid "URL %s was not found"
-msgstr "adres URL %s nie został znaleziony"
+#. R/QC.R: warning("cannot check R code installed as image")
+#: R/QC.R:0
+msgid "cannot check R code installed as image"
+msgstr "nie można sprawdzić kodu R zainstalowanego jako obraz"
 
-# tools/R/dynamicHelp.R: 471
-# warning("httpd server disabled by R_DISABLE_HTTPD", immediate. = TRUE)
-msgid "httpd server disabled by R_DISABLE_HTTPD"
-msgstr "serwer httpd wyłączony przez R_DISABLE_HTTPD"
+#. R/utils.R: gettextf("cannot coerce %s to logical", sQuote(val))
+#: R/utils.R:0
+msgid "cannot coerce %s to logical"
+msgstr "nie można przekształcić %s na wartość logiczną"
 
-# tools/R/dynamicHelp.R: 476
-# stop("server already running")
-msgid "server already running"
-msgstr "serwer jest już uruchomiony"
+#. R/admin.R: gettextf("cannot copy '%s' to '%s'", output, outVignetteDir)
+#: R/admin.R:0
+msgid "cannot copy '%s' to '%s'"
+msgstr "nie można skopiować pliku '%s' do katalogu '%s'"
 
-# tools/R/dynamicHelp.R: 477
-# stop("server could not be started on an earlier attempt")
-msgid "server could not be started on an earlier attempt"
-msgstr "serwer nie mógł zostać uruchomiony przy wcześniejszej próbie"
+#. R/admin.R: gettextf("cannot create directory '%s'", buildDir)
+#: R/admin.R:0
+msgid "cannot create directory '%s'"
+msgstr "nie można utworzyć katalogu '%s'"
 
-# tools/R/dynamicHelp.R: 480
-# stop("no running server to stop")
-msgid "no running server to stop"
-msgstr "brak serwera, którego można by zatrzymać"
+#. R/install.R: stop("cannot create temporary directory")
+#: R/install.R:0
+msgid "cannot create temporary directory"
+msgstr "nie można utworzyć katalogu tymczasowego"
 
-# tools/R/dynamicHelp.R: 483
-# message("starting httpd help server ...", appendLF = FALSE)
-msgid "starting httpd help server ..."
-msgstr "uruchamianie serwera httpd dla pomocy ..."
+#. R/install.R: stop("cannot create unique directory for build")
+#: R/install.R:0
+msgid "cannot create unique directory for build"
+msgstr "nie można utworzyć unikalnego katalogu dla kompilacji"
 
-# tools/R/dynamicHelp.R: 509
-# message(" done")
-# tools/R/packages.R: 164
-# message("done")
-# tools/R/packages.R: 194
-# message("done")
-msgid "done"
-msgstr "wykonano"
+#. R/Rd.R: stop("cannot deal with Rd objects with missing/empty names")
+#: R/Rd.R:0
+msgid "cannot deal with Rd objects with missing/empty names"
+msgstr "nie można poradzić sobie z obiektami Rd z brakującymi/pustymi nazwami"
 
-# tools/R/dynamicHelp.R: 513
-# warning("failed to start the httpd server", immediate. = TRUE)
-msgid "failed to start the httpd server"
-msgstr "nie udało się uruchomić serwera httpd"
+#. R/pdftools.R: stop("cannot find 'startxref' keyword")
+#: R/pdftools.R:0
+msgid "cannot find 'startxref' keyword"
+msgstr "nie można znaleźć 'startxref'"
 
-# tools/R/index.R: 104
-# warning(gettextf("cannot read index information in file '%s'",
-#                              INDEX),
-#                     domain = NA)
-# tools/R/index.R: 128
-# stop(gettextf("cannot read index information in file '%s'",
-#                                file.path(demoDir, "00Index")),
-#                       domain = NA)
-msgid "cannot read index information in file '%s'"
-msgstr "nie można odczytać indeksu informacji w pliku '%s'"
+#. R/pdftools.R: gettextf("cannot find object header at xrefed position %d", pos)
+#: R/pdftools.R:0
+msgid "cannot find object header at xrefed position %d"
+msgstr "nie można znaleźć nagłówka obiektu w pozycji %d 'xrefed'"
 
-msgid "error reading file '%s'"
-msgstr "błąd podczas czytania pliku '%s'"
+#. R/pdftools.R: stop("cannot find xref table")
+#: R/pdftools.R:0
+msgid "cannot find xref table"
+msgstr "nie można znaleźć tabeli 'xref'"
 
-msgid "this seems to be a bundle -- and they are defunct"
-msgstr "plik 'DESCRIPTION' wygląda to na paczkę -- a one zostały zlikwidowane"
+#. R/check.R: gettextf("cannot link from %s", from)
+#: R/check.R:0
+msgid "cannot link from %s"
+msgstr "nie można połączyć z %s"
 
-msgid ""
-"'cleanup' exists but is not executable -- see the 'R Installation and "
-"Administration Manual'"
-msgstr ""
-"plik 'cleanup' istnieje, ale nie jest wykonywalny -- zobacz 'R Installation "
-"and Adminstration Manual'"
+#. R/admin.R: gettextf("cannot open directory '%s'", outMetaDir)
+#. R/admin.R: gettextf("cannot open directory '%s'", meta_dir)
+#. R/admin.R: gettextf("cannot open directory '%s'", outDir)
+#. R/admin.R: gettextf("cannot open directory '%s'", outCodeDir)
+#. R/admin.R: gettextf("cannot open directory '%s'", outMetaDir)
+#. R/admin.R: gettextf("cannot open directory '%s'", outVignetteDir)
+#. R/admin.R: gettextf("cannot open directory '%s'", outMetaDir)
+#: R/admin.R:0
+msgid "cannot open directory '%s'"
+msgstr "nie można utworzyć katalogu '%s'"
 
-msgid "generating debug symbols (%s)"
-msgstr "tworzenie symboli debugowania (%s)"
+#. R/pdftools.R: stop("cannot read array object")
+#: R/pdftools.R:0
+msgid "cannot read array object"
+msgstr "nie można odczytać obiektu tablicy"
 
-msgid "no DLL was created"
-msgstr "nie utworzono pliku DLL"
+#. R/pdftools.R: stop("cannot read dictionary object")
+#: R/pdftools.R:0
+msgid "cannot read dictionary object"
+msgstr "nie można odczytać obiektu słownika"
 
-msgid "package %s successfully unpacked and MD5 sums checked"
-msgstr ""
-"pakiet %s został pomyślnie rozpakowany oraz sumy MD5 zostały sprawdzone"
+#. R/pdftools.R: stop("cannot read hexadecimal string object")
+#: R/pdftools.R:0
+msgid "cannot read hexadecimal string object"
+msgstr "nie można odczytać obiektu o szestnastkowym łańcuchu"
 
-msgid ""
-"R include directory is empty -- perhaps need to install R-devel.rpm or "
-"similar"
-msgstr ""
-"Katalog 'include' w R jest pusty -- być może trzeba zainstalować R-devel.rpm "
-"lub coś podobnego"
+#. R/index.R: gettextf("cannot read index information in file '%s'", INDEX)
+#. R/index.R: gettextf("cannot read index information in file '%s'", file.path(demoDir,     "00Index"))
+#: R/index.R:0
+msgid "cannot read index information in file '%s'"
+msgstr "nie można odczytać indeksu informacji w pliku '%s'"
 
-msgid "package %s %s was found, but %s %s is required by %s"
-msgstr ""
-"pakiet %s %s został znaleziony, ale pakiet %s %s jest wymagany przez %s"
+#. R/pdftools.R: stop("cannot read indirect reference object")
+#: R/pdftools.R:0
+msgid "cannot read indirect reference object"
+msgstr "nie można odczytać obiektu o niebezpośredniej referencji"
 
-msgid "no source files found"
-msgstr "nie znaleziono plików źródłowych"
+#. R/pdftools.R: stop("cannot read literal string object")
+#: R/pdftools.R:0
+msgid "cannot read literal string object"
+msgstr "nie można odczytać dosłownych obiektów łańcucha"
 
-msgid "empty 'data' directory"
-msgstr "pusty katalog 'data'"
+#. R/pdftools.R: stop("cannot read name object")
+#: R/pdftools.R:0
+msgid "cannot read name object"
+msgstr "nie można odczytać obiektu nazwy"
 
-msgid "cannot create temporary directory"
-msgstr "nie można utworzyć katalogu tymczasowego"
+#. R/pdftools.R: stop("cannot read stream data")
+#. R/pdftools.R: stop("cannot read stream data")
+#: R/pdftools.R:0
+msgid "cannot read stream data"
+msgstr "nie można odczytać danych strumieniowych"
 
-msgid "ERROR: '--merge-multiarch' applies only to a single tarball"
+#. R/pdftools.R: stop("cannot read stream object")
+#. R/pdftools.R: stop("cannot read stream object")
+#. R/pdftools.R: stop("cannot read stream object")
+#: R/pdftools.R:0
+msgid "cannot read stream object"
+msgstr "nie można odczytać strumienia obiektu"
+
+#. R/pdftools.R: stop("cannot read xref table")
+#: R/pdftools.R:0
+msgid "cannot read xref table"
+msgstr "nie można odczytać tabeli 'xref'"
+
+#. R/utils.R: stop("cannot source package code\n", conditionMessage(e), call. = FALSE)
+#: R/utils.R:0
+msgid "cannot source package code"
+msgstr "nie można wykonać kodu pakietu"
+
+#. R/admin.R: warning("cannot turn off locale-specific sorting via LC_COLLATE")
+#: R/admin.R:0
+msgid "cannot turn off locale-specific sorting via LC_COLLATE"
 msgstr ""
-"BŁĄD: '--merge-multiarch' stosuje się tylko do pojedynczego pliku tarball"
+"nie można wyłączyć sortowania zależnego od specyficznej lokalizacji poprzez "
+"LC_COLLATE"
 
-msgid "invalid package"
-msgstr "niepoprawny pakiet"
+#. R/checktools.R: sprintf("checking %s ...", pfile)
+#: R/checktools.R:0
+msgid "checking %s ..."
+msgstr "sprawdzanie %s ..."
 
-msgid "ERROR: no packages specified"
-msgstr "BŁĄD: nie określono pakietów"
+#. R/testing.R: gettextf("  comparing %s to %s ...", sQuote(outfile), sQuote(basename(savefile)))
+#. R/testing.R: gettextf("  comparing %s to %s ...", sQuote(outfile), sQuote(basename(prevfile)))
+#. R/testing.R: gettextf("  comparing %s to %s ...", sQuote(outfile), sQuote(savefile))
+#. R/testing.R: gettextf("  comparing %s to %s ...", sQuote(outfile), sQuote(savefile))
+#: R/testing.R:0
+msgid "comparing %s to %s ..."
+msgstr "porównywanie %s z %s ..."
 
-msgid "ERROR: cannot cd to directory %s"
-msgstr "BŁĄD: nie można wejść do katalogu %s"
+#. R/admin.R: gettextf("compiling TeX file %s failed with message:\n%s", sQuote(output),     conditionMessage(e))
+#: R/admin.R:0
+msgid ""
+"compiling TeX file %s failed with message:\n"
+"%s"
+msgstr ""
+"kompilowanie pliku TeX %s nie powiodło się zwracając komunikat:\n"
+"%s"
 
-msgid "ERROR: no permission to install to directory"
-msgstr "BŁĄD: brak uprawnień aby zainstalować w katalogu"
+#. R/check.R: warning("configuration files are not supported as from R 2.12.0")
+#: R/check.R:0
+msgid "configuration files are not supported as from R 2.12.0"
+msgstr "pliki konfiguracyjne nie są wspierane od wersji R 2.12.0"
 
-msgid "building a fake installation is disallowed"
-msgstr "budowałe fałszywej instalacji jest zabronione"
+#. R/utils.R: stop("contains a blank line", call. = FALSE)
+#: R/utils.R:0
+msgid "contains a blank line"
+msgstr "zawiera pustą linię"
 
-# tools/R/makeLazyLoad.R: 26
-# stop(gettextf("there is no package called '%s'", package),
-#              domain = NA)
-# tools/R/makeLazyLoad.R: 53
-# stop(gettextf("there is no package called '%s'", package),
-#                  domain = NA)
-# tools/R/makeLazyLoad.R: 96
-# stop(gettextf("there is no package called '%s'", package),
-#              domain = NA)
-# tools/R/makeLazyLoad.R: 258
-# stop(gettextf("there is no package called '%s'", package),
-#                  domain = NA)
-msgid "there is no package called '%s'"
-msgstr "nie ma pakietu o nazwie '%s'"
+#. R/Rd2pdf.R: stop("current working directory cannot be ascertained")
+#. R/Vignettes.R: stop("current working directory cannot be ascertained")
+#. R/Vignettes.R: stop("current working directory cannot be ascertained")
+#. R/Vignettes.R: stop("current working directory cannot be ascertained")
+#. R/admin.R: stop("current working directory cannot be ascertained")
+#. R/admin.R: stop("current working directory cannot be ascertained")
+#. R/build.R: stop("current working directory cannot be ascertained")
+#. R/check.R: stop("current working directory cannot be ascertained")
+#. R/install.R: stop("current working directory cannot be ascertained")
+#. R/md5.R: stop("current working directory cannot be ascertained")
+#. R/md5.R: stop("current working directory cannot be ascertained")
+#. R/packages.R: stop("current working directory cannot be ascertained")
+#: R/Rd2pdf.R:0 R/Vignettes.R:0 R/admin.R:0 R/build.R:0 R/check.R:0
+#: R/install.R:0 R/md5.R:0 R/packages.R:0
+msgid "current working directory cannot be ascertained"
+msgstr "bieżący katalog roboczy nie może być ustalony"
 
-# tools/R/makeLazyLoad.R: 33
-# stop("namespace must not be already loaded")
-msgid "namespace must not be already loaded"
-msgstr "przestrzeń nazw nie może być już załadowana"
+#. R/QC.R: gettextf("declared S3 method '%s' not found", m)
+#: R/QC.R:0
+msgid "declared S3 method '%s' not found"
+msgstr "zadeklarowana metoda S3 '%s' nie została znaleziona"
 
-# tools/R/makeLazyLoad.R: 38
-# stop("all packages should have a NAMESPACE")
-msgid "all packages should have a NAMESPACE"
-msgstr "wszystkie pakiety powinny mieć plik 'NAMESPACE'"
+#. R/QC.R: gettextf("directory '%s' does not contain R code", dir)
+#. R/QC.R: gettextf("directory '%s' does not contain R code", dir)
+#. R/QC.R: gettextf("directory '%s' does not contain R code", dir)
+#. R/QC.R: gettextf("directory '%s' does not contain R code", dir)
+#. R/QC.R: gettextf("directory '%s' does not contain R code", dir)
+#. R/QC.R: gettextf("directory '%s' does not contain R code", dir)
+#. R/QC.R: gettextf("directory '%s' does not contain R code", dir)
+#. R/QC.R: gettextf("directory '%s' does not contain R code", dir)
+#. R/QC.R: gettextf("directory '%s' does not contain R code", dir)
+#. R/QC.R: gettextf("directory '%s' does not contain R code", dir)
+#. R/QC.R: gettextf("directory '%s' does not contain R code", dir)
+#. R/QC.R: gettextf("directory '%s' does not contain R code", dir)
+#: R/QC.R:0
+msgid "directory '%s' does not contain R code"
+msgstr "katalog '%s' nie zawiera kodu R"
 
-# tools/R/makeLazyLoad.R: 109
-# warning("package seems to be using lazy loading for data already")
-msgid "package seems to be using lazy loading for data already"
-msgstr "wygląda na to, że pakiet już wykorzystuje leniwe ładowanie dla danych"
+#. R/QC.R: gettextf("directory '%s' does not contain Rd objects", dir)
+#. R/QC.R: gettextf("directory '%s' does not contain Rd objects", dir)
+#. R/QC.R: gettextf("directory '%s' does not contain Rd objects", dir)
+#. R/QC.R: gettextf("directory '%s' does not contain Rd objects", dir)
+#. R/QC.R: gettextf("directory '%s' does not contain Rd objects", dir)
+#: R/QC.R:0
+msgid "directory '%s' does not contain Rd objects"
+msgstr "katalog '%s' nie zawiera obiektów Rd"
 
-# tools/R/makeLazyLoad.R: 223
-# stop("source list must have names for all elements")
-msgid "source list must have names for all elements"
-msgstr "lista źródłowa musi mieć nazwy dla wszystkich elementów"
+#. R/QC.R: gettextf("directory '%s' does not exist", dir)
+#. R/QC.R: gettextf("directory '%s' does not exist", dir)
+#. R/QC.R: gettextf("directory '%s' does not exist", dir)
+#. R/QC.R: gettextf("directory '%s' does not exist", dir)
+#. R/QC.R: gettextf("directory '%s' does not exist", dir)
+#. R/QC.R: gettextf("directory '%s' does not exist", dir)
+#. R/QC.R: gettextf("directory '%s' does not exist", dir)
+#. R/QC.R: gettextf("directory '%s' does not exist", dir)
+#. R/QC.R: gettextf("directory '%s' does not exist", dir)
+#. R/QC.R: gettextf("directory '%s' does not exist", dir)
+#. R/QC.R: gettextf("directory '%s' does not exist", dir)
+#. R/QC.R: gettextf("directory '%s' does not exist", dir)
+#. R/QC.R: gettextf("directory '%s' does not exist", dir)
+#. R/QC.R: gettextf("directory '%s' does not exist", dir)
+#. R/QC.R: gettextf("directory '%s' does not exist", dir)
+#. R/Rd.R: gettextf("directory '%s' does not exist", dir)
+#. R/Vignettes.R: gettextf("directory '%s' does not exist", dir)
+#. R/Vignettes.R: gettextf("directory '%s' does not exist", dir)
+#. R/Vignettes.R: gettextf("directory '%s' does not exist", dir)
+#. R/Vignettes.R: gettextf("directory '%s' does not exist", dir)
+#. R/admin.R: gettextf("directory '%s' does not exist", dir)
+#. R/admin.R: gettextf("directory '%s' does not exist", dir)
+#. R/admin.R: gettextf("directory '%s' does not exist", outDir)
+#. R/index.R: gettextf("directory '%s' does not exist", dataDir)
+#. R/index.R: gettextf("directory '%s' does not exist", demoDir)
+#. R/index.R: gettextf("directory '%s' does not exist", demoDir)
+#: R/QC.R:0 R/Rd.R:0 R/Vignettes.R:0 R/admin.R:0 R/index.R:0
+msgid "directory '%s' does not exist"
+msgstr "katalog '%s' nie istnieje"
 
-# tools/R/makeLazyLoad.R: 225
-# stop("source must be an environment or a list")
-msgid "source must be an environment or a list"
-msgstr "źródło musi być środowiskiem lub listą"
+#. R/dynamicHelp.R: message(" done")
+#. R/install.R: message(" done")
+#. R/packages.R: message("done")
+#. R/packages.R: message("done")
+#: R/dynamicHelp.R:0 R/install.R:0 R/packages.R:0
+msgid "done"
+msgstr "wykonano"
 
-# tools/R/makeLazyLoad.R: 253
-# stop("invalid value for 'compress': should be FALSE, TRUE, 2 or 3")
-msgid "invalid value for 'compress': should be FALSE, TRUE, 2 or 3"
-msgstr "niepoprawna wartość dla 'compress': powinno być FALSE, TRUE, 2 lub 3"
+#. R/checktools.R: sprintf("downloading %s ... ", rfiles[i])
+#: R/checktools.R:0
+msgid "downloading %s ..."
+msgstr "pobieranie pliku %s ..."
 
-# tools/R/makeLazyLoad.R: 264
-# stop("this cannot be used for package 'base'")
-msgid "this cannot be used for package 'base'"
-msgstr "to nie może zostać użyte dla pakietu 'base'"
+#. R/checktools.R: message("downloading reverse dependencies ...")
+#: R/checktools.R:0
+msgid "downloading reverse dependencies ..."
+msgstr "pobieranie wstecznych zależności ..."
 
-# tools/R/makeLazyLoad.R: 271
-# warning("package contains no R code")
-msgid "package contains no R code"
-msgstr "pakiet nie zawiera kodu R"
+#. R/admin.R: gettextf("\nduplicated files in '%s' field:", collationField)
+#: R/admin.R:0
+msgid "duplicated files in '%s' field:"
+msgstr "powtórzone pliki w polu '%s':"
 
-# tools/R/makeLazyLoad.R: 275
-# warning("package seems to be using lazy loading already")
-msgid "package seems to be using lazy loading already"
-msgstr "wygląda na to, że pakiet już wykorzystuje leniwe ładowanie"
+#. R/install.R: warning("empty 'data' directory", call. = FALSE)
+#: R/install.R:0
+msgid "empty 'data' directory"
+msgstr "pusty katalog 'data'"
 
-# tools/R/news.R: 242
-# message(gettextf("Cannot process chunk/lines:\n%s",
-#                              .collapse(x)))
-msgid ""
-"Cannot process chunk/lines:\n"
-"%s"
-msgstr ""
-"Nie można przetwarzać fragmentu/linii:\n"
-"%s"
+#. R/install.R: gettextf("error reading file '%s'", fd)
+#: R/install.R:0
+msgid "error reading file '%s'"
+msgstr "błąd podczas czytania pliku '%s'"
 
-# tools/R/news.R: 415
-# stop("No news found in given file using old-style R-like format.")
-msgid "No news found in given file using old-style R-like format."
-msgstr ""
-"Nie znaleziono wiadomości w podanym pliku używając starego stylu formatu "
-"podobnego do R."
+#. R/Rd2pdf.R: stop("exactly one Rd file must be specified", call. = FALSE)
+#: R/Rd2pdf.R:0
+msgid "exactly one Rd file must be specified"
+msgstr "dokładnie jeden plik Rd musi zostać określony"
 
-# tools/R/news.R: 447
-# stop("No news found in given file using package default format.")
-msgid "No news found in given file using package default format."
-msgstr ""
-"Nie znaleziono wiadomości w podanym pliku używając domyślnego formatu "
-"pakietu."
+#. R/pdftools.R: sprintf("expanding %s", format(kid))
+#: R/pdftools.R:0
+msgid "expanding %s"
+msgstr "rozszerzanie %s"
 
-# tools/R/news.R: 450
-# stop("Could not extract news from the following text chunks:\n",
-#                  paste(sprintf("\nChunk %s:\n%s",
-#                                format(seq_along(bad)), bad),
-#                        collapse = "\n"))
-msgid "Could not extract news from the following text chunks:"
-msgstr ""
-"Nie można było wyodrębnić wiadomości z następujących fragmentów tekstu:"
+#. R/dynamicHelp.R: warning("failed to start the httpd server", immediate. = TRUE)
+#: R/dynamicHelp.R:0
+msgid "failed to start the httpd server"
+msgstr "nie udało się uruchomić serwera httpd"
 
-msgid ""
-"Chunk %s:\n"
-"%s"
-msgstr ""
-"Fragment %s:\n"
-"%s"
+#. R/QC.R: gettextf("file '%s' does not exist", file)
+#. R/QC.R: gettextf("file '%s' does not exist", file)
+#. R/utils.R: gettextf("file '%s' does not exist", x)
+#. R/utils.R: gettextf("file '%s' does not exist", dfile)
+#: R/QC.R:0 R/utils.R:0
+msgid "file '%s' does not exist"
+msgstr "plik '%s' nie istnieje"
 
-# tools/R/news.R: 560
-# warning("Cannot extract version info from the following section titles:\n",
-#                 sprintf("  %s", unique(nms[!ind])))
-msgid "Cannot extract version info from the following section titles:"
-msgstr ""
-"Nie można wyodrębnić informacji o wersji z następujących tytułów sekcji:"
+#. R/utils.R: gettextf("file '%s' is not in valid DCF format", dfile)
+#: R/utils.R:0
+msgid "file '%s' is not in valid DCF format"
+msgstr "plik '%s' nie jest poprawnym formatem DCF"
 
-# tools/R/QC.R: 1470
-# sprintf("  %s", unlist(lapply(assignments, format)))
-# tools/R/QC.R: 3665
-# sprintf("  %s", lapply(x, paste, collapse = " "))
-# tools/R/QC.R: 3673
-# sprintf("  %s", bad)
-# tools/R/QC.R: 6687
-# sprintf("  %s", paste(sQuote(y), collapse = " "))
-# tools/R/QC.R: 6920
-# sprintf("  %s", offending_autogenerated_content[, 1L])
-# tools/R/news.R: 560
-# warning("Cannot extract version info from the following section titles:\n",
-#                 sprintf("  %s", unique(nms[!ind])))
-# tools/R/check.R: 2434
-# sprintf('tools:::.createExdotR("%s", "%s", silent = TRUE, use_gct = %s, addTiming = %s)', pkgname, pkgtopdir, use_gct, do_timings)
-# tools/R/check.R: 4530
-# sprintf("  %s",
-#                                  gsub("\n", "\n  ", tmp$Output,
-#                                       perl = TRUE, useBytes = TRUE))
-# tools/R/translations.R: 186
-# sprintf('--copyright-holder="%s"', copyright)
-# tools/R/translations.R: 188
-# sprintf('--msgid-bugs-address="%s"', bugs)
-msgid "%s"
-msgstr "%s"
-
-# tools/R/news.R: 587
-# stop(gettextf("Malformed NEWS.Rd file:\nChunk starting\n  %s\ncontains no \\itemize.",
-#                           substring(sub("^[[:space:]]*", "",
-#                                         .Rd_deparse(x)),
-#                                     1L, 60L)),
-#                  domain = NA)
-msgid ""
-"Malformed NEWS.Rd file:\n"
-"Chunk starting\n"
-"  %s\n"
-"contains no \\itemize."
-msgstr ""
-"Uszkodzony plik NEWS.Rd:\n"
-"Fragment rozpoczynający\n"
-"  %s\n"
-"nie zawiera \\itemize."
+#. R/Vignettes.R: gettextf("file '%s' not found", file)
+#. R/Vignettes.R: gettextf("file '%s' not found", vignette)
+#: R/Vignettes.R:0
+msgid "file '%s' not found"
+msgstr "plik '%s' nie został znaleziony"
 
-# tools/R/news.R: 593
-# warning(gettextf("Malformed NEWS.Rd file:\nChunk starting\n  %s\ncontains more than one \\itemize.\nUsing the first one.",
-#                              substring(sub("^[[:space:]]*", "",
-#                                            .Rd_deparse(x)),
-#                                        1L, 60L)),
-#                     domain = NA)
-msgid ""
-"Malformed NEWS.Rd file:\n"
-"Chunk starting\n"
-"  %s\n"
-"contains more than one \\itemize.\n"
-"Using the first one."
-msgstr ""
-"Uszkodzony plik NEWS.Rd:\n"
-"Fragment rozpoczynający\n"
-"  %s\n"
-"zawiera więcej niż jeden \\itemize.\n"
-"Używanie pierwszego."
+#. R/admin.R: gettextf("\nfiles in '%s' field missing from '%s':", collationField,     codeDir)
+#: R/admin.R:0
+msgid "files in '%s' field missing from '%s':"
+msgstr "pliki w polu '%s' których brakuje w '%s':"
 
-# tools/R/packages.R: 117
-# message("Processing packages:")
-# tools/R/packages.R: 178
-# message("Processing packages:")
-msgid "Processing packages:"
-msgstr "Przetwarzanie pakietów:"
+#. R/admin.R: gettextf("\nfiles in '%s' missing from '%s' field:", codeDir,     collationField)
+#: R/admin.R:0
+msgid "files in '%s' missing from '%s' field:"
+msgstr "pliki w '%s' których brakuje w polu '%s':"
 
-# tools/R/pdftools.R: 112
-# stop(gettextf("%s must be a character string or a file/raw connection",
-#                       sQuote("file")),
-#              domain = NA)
-msgid "%s must be a character string or a file/raw connection"
-msgstr ""
-"argument %s musi być łańcuchem tekstowym lub połączeniem plikowym/prostym"
+#. R/QC.R: gettextf("found T/F in %s", paste(deparse(xfname[[i]]), collapse = ""))
+#: R/QC.R:0
+msgid "found T/F in %s"
+msgstr "znaleziono wartości T/F w %s"
 
-# tools/R/pdftools.R: 121
-# stop("PDF header not found")
-msgid "PDF header not found"
-msgstr "nie znaleziono nagłówka PDF"
+#. R/install.R: gettextf("generating debug symbols (%s)", "dSYM")
+#: R/install.R:0
+msgid "generating debug symbols (%s)"
+msgstr "tworzenie symboli debugowania (%s)"
 
-# tools/R/pdftools.R: 134
-# stop("EOF marker not found")
-msgid "EOF marker not found"
-msgstr "nie znaleziono znacznika EOF"
+#. R/dynamicHelp.R: warning("httpd server disabled by R_DISABLE_HTTPD", immediate. = TRUE)
+#: R/dynamicHelp.R:0
+msgid "httpd server disabled by R_DISABLE_HTTPD"
+msgstr "serwer httpd wyłączony przez R_DISABLE_HTTPD"
 
-# tools/R/pdftools.R: 153
-# stop("cannot find 'startxref' keyword")
-msgid "cannot find 'startxref' keyword"
-msgstr "nie można znaleźć 'startxref'"
+#. R/pdftools.R: stop("invalid index in object stream lookup")
+#: R/pdftools.R:0
+msgid "invalid index in object stream lookup"
+msgstr "niepoprawny indeks w wyszukiwaniu strumienia obiektu"
 
-# tools/R/pdftools.R: 185
-# stop("cannot find xref table")
-msgid "cannot find xref table"
-msgstr "nie można znaleźć tabeli 'xref'"
+#. R/install.R: warning("invalid package ", sQuote(pkg), call. = FALSE)
+#: R/install.R:0
+msgid "invalid package"
+msgstr "niepoprawny pakiet"
 
-# tools/R/pdftools.R: 196
-# stop("cannot read xref table")
-msgid "cannot read xref table"
-msgstr "nie można odczytać tabeli 'xref'"
+#. R/utils.R: stop("invalid package layout")
+#: R/utils.R:0
+msgid "invalid package layout"
+msgstr "niepoprawna struktura pakietu"
+
+#. R/RdConv2.R: gettextf("invalid value for '%s' : %s", opt, oldval)
+#: R/RdConv2.R:0
+msgid "invalid value for '%s' : %s"
+msgstr "niepoprawna wartość dla '%s' : %s"
 
-# tools/R/pdftools.R: 347
-# stop("wrong class")
-# tools/R/pdftools.R: 362
-# stop("wrong class")
-# tools/R/pdftools.R: 1167
-# stop("wrong class")
-# tools/R/pdftools.R: 1259
-# stop("wrong class")
-# tools/R/pdftools.R: 1371
-# stop("wrong class")
-# tools/R/pdftools.R: 1412
-# stop("wrong class")
-# tools/R/pdftools.R: 1460
-# stop("wrong class")
-# tools/R/pdftools.R: 1491
-# stop("wrong class")
-msgid "wrong class"
-msgstr "błędna klasa"
+#. R/build.R: gettextf("invalid value for '--compact-vignettes', assuming %s",     "\"qpdf\"")
+#: R/build.R:0
+msgid "invalid value for '--compact-vignettes', assuming %s"
+msgstr "Niepoprawna wartość '--compact-vignettes', zakładanie %s"
 
-# tools/R/pdftools.R: 364
-# stop("attempting to select less than one element")
-msgid "attempting to select less than one element"
-msgstr "próba wybrania mniej niż jednego elementu"
+#. R/makeLazyLoad.R: stop("invalid value for 'compress': should be FALSE, TRUE, 2 or 3")
+#: R/makeLazyLoad.R:0
+msgid "invalid value for 'compress': should be FALSE, TRUE, 2 or 3"
+msgstr "niepoprawna wartość dla 'compress': powinno być FALSE, TRUE, 2 lub 3"
 
-# tools/R/pdftools.R: 366
-# stop("attempting to select more than one element")
-msgid "attempting to select more than one element"
-msgstr "próba wybrania więcej niż jednego elementu"
+#. R/admin.R: stop("loading failed", call. = FALSE)
+#: R/admin.R:0
+msgid "loading failed"
+msgstr "ładowanie nie powiodło się"
 
-# tools/R/pdftools.R: 621
-# message(sprintf("looking at %s", deparse(intToUtf8(bytes))))
+#. R/pdftools.R: sprintf("looking at %s", deparse(intToUtf8(bytes)))
+#: R/pdftools.R:0
 msgid "looking at %s"
 msgstr "patrzenie na %s"
 
-# tools/R/pdftools.R: 757
-# stop("cannot read literal string object")
-msgid "cannot read literal string object"
-msgstr "nie można odczytać dosłownych obiektów łańcucha"
+#. R/pdftools.R: gettextf("mismatch in generation numbers (given: %d, found: %d)",     gen, hdr["gen"])
+#: R/pdftools.R:0
+msgid "mismatch in generation numbers (given: %d, found: %d)"
+msgstr "niezgodność w numerach generacji (otrzymano: %d, znaleziono: %d)"
 
-# tools/R/pdftools.R: 814
-# stop("cannot read hexadecimal string object")
-msgid "cannot read hexadecimal string object"
-msgstr "nie można odczytać obiektu o szestnastkowym łańcuchu"
+#. R/pdftools.R: gettextf("mismatch in object numbers (given: %d, found: %d)",     num, hdr["num"])
+#: R/pdftools.R:0
+msgid "mismatch in object numbers (given: %d, found: %d)"
+msgstr "niezgodność w numerach obiektów (otrzymano: %d, znaleziono: %d)"
 
-# tools/R/pdftools.R: 867
-# stop("cannot read name object")
-msgid "cannot read name object"
-msgstr "nie można odczytać obiektu nazwy"
+#. R/Rd.R: gettextf("missing/empty %s field in '%s'", "\\name", description)
+#: R/Rd.R:0
+msgid "missing/empty %s field in '%s'"
+msgstr "brakujące/puste pole %s w '%s'"
 
-# tools/R/pdftools.R: 906
-# stop("cannot read array object")
-msgid "cannot read array object"
-msgstr "nie można odczytać obiektu tablicy"
+#. R/Rd.R: gettextf("missing/empty \\title field in '%s'", description)
+#: R/Rd.R:0
+msgid "missing/empty \\title field in '%s'"
+msgstr "brakujące/puste pole '\\title' w '%s'"
 
-# tools/R/pdftools.R: 934
-# stop("cannot read dictionary object")
-msgid "cannot read dictionary object"
-msgstr "nie można odczytać obiektu słownika"
+#. R/Rd2ex.R: warning("more than one \\examples section, using the first")
+#: R/Rd2ex.R:0
+msgid "more than one \\examples section, using the first"
+msgstr "więcej niż jedna sekcja \\examples, używanie pierwszej"
 
-# tools/R/pdftools.R: 959
-# stop("cannot read stream object")
-# tools/R/pdftools.R: 965
-# stop("cannot read stream object")
-# tools/R/pdftools.R: 985
-# stop("cannot read stream object")
-msgid "cannot read stream object"
-msgstr "nie można odczytać strumienia obiektu"
+#. R/makeLazyLoad.R: stop("namespace must not be already loaded")
+#: R/makeLazyLoad.R:0
+msgid "namespace must not be already loaded"
+msgstr "przestrzeń nazw nie może być już załadowana"
 
-# tools/R/pdftools.R: 1049
-# stop("cannot read indirect reference object")
-msgid "cannot read indirect reference object"
-msgstr "nie można odczytać obiektu o niebezpośredniej referencji"
+#. R/QC.R: message("neither code nor data objects found")
+#: R/QC.R:0
+msgid "neither code nor data objects found"
+msgstr "nie znaleziono kodu ani obiektów danych"
 
-# tools/R/pdftools.R: 1127
-# stop(gettextf("cannot find object header at xrefed position %d",
-#                       pos),
-#              domain = NA)
-msgid "cannot find object header at xrefed position %d"
-msgstr "nie można znaleźć nagłówka obiektu w pozycji %d 'xrefed'"
+#. R/Rd2pdf.R: stop("no 'type' specified", call. = FALSE)
+#: R/Rd2pdf.R:0
+msgid "no 'type' specified"
+msgstr "nie określono 'type'"
 
-# tools/R/pdftools.R: 1136
-# message(gettextf("mismatch in object numbers (given: %d, found: %d)",
-#                          num, hdr["num"]),
-#                 domain = NA)
-msgid "mismatch in object numbers (given: %d, found: %d)"
-msgstr "niezgodność w numerach obiektów (otrzymano: %d, znaleziono: %d)"
+#. R/install.R: message("no DLL was created")
+#: R/install.R:0
+msgid "no DLL was created"
+msgstr "nie utworzono pliku DLL"
 
-# tools/R/pdftools.R: 1140
-# message(gettextf("mismatch in generation numbers (given: %d, found: %d)",
-#                          gen, hdr["gen"]),
-#                 domain = NA)
-msgid "mismatch in generation numbers (given: %d, found: %d)"
-msgstr "niezgodność w numerach generacji (otrzymano: %d, znaleziono: %d)"
+#. R/QC.R: stop("no Rd sections specified")
+#: R/QC.R:0
+msgid "no Rd sections specified"
+msgstr "nie określono sekcji Rd"
 
-# tools/R/pdftools.R: 1160
-# stop("cannot read stream data")
-# tools/R/pdftools.R: 1521
-# stop("cannot read stream data")
-msgid "cannot read stream data"
-msgstr "nie można odczytać danych strumieniowych"
+#. R/testing.R: gettextf("no examples found for package %s", sQuote(pkg))
+#: R/testing.R:0
+msgid "no examples found for package %s"
+msgstr "nie znaleziono przykładów dla pakietu %s"
 
-# tools/R/pdftools.R: 1206
-# stop("invalid index in object stream lookup")
-msgid "invalid index in object stream lookup"
-msgstr "niepoprawny indeks w wyszukiwaniu strumienia obiektu"
+#. R/Rd2pdf.R: message("no inputs")
+#: R/Rd2pdf.R:0
+msgid "no inputs"
+msgstr "brak wejść"
 
-# tools/R/pdftools.R: 1391
-# message(sprintf("expanding %s",
-#                                                format(kid)))
-msgid "expanding %s"
-msgstr "rozszerzanie %s"
+#. R/checktools.R: message("no packages to check")
+#: R/checktools.R:0
+msgid "no packages to check"
+msgstr "brak pakietów do sprawdzenia"
 
-# tools/R/pdftools.R: 1548
-# stop(gettextf("unsupported filter %s",
-#                           sQuote(filter)),
-#                  domain = NA)
-msgid "unsupported filter %s"
-msgstr "niewspierany filtr %s"
+#. R/testing.R: message("no parsed files found")
+#: R/testing.R:0
+msgid "no parsed files found"
+msgstr "nie znaleziono plików przeanalizowanych składniowo"
 
-# tools/R/pdftools.R: 1566
-# stop(gettextf("unsupported %s predictor %d",
-#                       "flatedecode",
-#                       predictor),
-#              domain = NA)
-msgid "unsupported %s predictor %d"
-msgstr "niewspierany predyktor %s %d"
+#. R/dynamicHelp.R: stop("no running server to stop")
+#: R/dynamicHelp.R:0
+msgid "no running server to stop"
+msgstr "brak serwera, którego można by zatrzymać"
 
-# tools/R/pdftools.R: 1589
-# stop(gettextf("unsupported PNG filter %d", fb),
-#                  domain = NA)
-msgid "unsupported PNG filter %d"
-msgstr "niewspierany filtr PNG %d"
+#. R/install.R: warning("no source files found", call. = FALSE)
+#: R/install.R:0
+msgid "no source files found"
+msgstr "nie znaleziono plików źródłowych"
 
-# tools/R/pkgDepends.R: 22
-# stop("argument 'pkg' must be of length 1")
-msgid "argument 'pkg' must be of length 1"
-msgstr "argument 'pkg' musi być długości 1"
+#. R/citation.R: stop("non-ASCII input in a CITATION file without a declared encoding")
+#: R/citation.R:0
+msgid "non-ASCII input in a CITATION file without a declared encoding"
+msgstr "wejście nie-ASCII w pliku 'CITATION' bez zadeklarowanego kodowania"
 
-# tools/R/pkgDepends.R: 28
-# stop(gettextf("package '%s' was not found", pkg),
-#              domain = NA)
-msgid "package '%s' was not found"
-msgstr "pakiet '%s' nie został znaleziony"
+#. R/utils.R: stop("only Rd syntax is currently supported")
+#: R/utils.R:0
+msgid "only Rd syntax is currently supported"
+msgstr "aktualnie tylko składnia Rd jest wspierana"
 
-# tools/R/pkgDepends.R: 243
-# stop("bad operand")
-msgid "bad operand"
-msgstr "zły operand"
+#. R/install.R: gettextf("package %s %s was found, but %s %s is required by %s",     sQuote(p), current, z$op, target, sQuote(pkgname))
+#: R/install.R:0
+msgid "package %s %s was found, but %s %s is required by %s"
+msgstr ""
+"pakiet %s %s został znaleziony, ale pakiet %s %s jest wymagany przez %s"
 
-# tools/R/pkgDepends.R: 292
-# warning(gettextf("Package '%s' had its dependencies reduced to a minimal set.",
-#                                  pkgMtrx[1,]),
-#                         domain = NA)
-msgid "Package '%s' had its dependencies reduced to a minimal set."
-msgstr "Pakiet '%s' swoje zależności zredukował do najmniejszego zbioru."
+#. R/QC.R: gettextf("package %s exists but was not installed under R >= 2.10.0 so xrefs cannot be checked",     sQuote(pkg))
+#: R/QC.R:0
+msgid ""
+"package %s exists but was not installed under R >= 2.10.0 so xrefs cannot be "
+"checked"
+msgstr ""
+"pakiet %s istnieje, ale nie został zainstalowany pod R >= 2.10.0, tak więc "
+"'xrefs' nie może zostać sprawdzony"
 
-# tools/R/read.00Index.R: 30
-# stop(gettextf("argument '%s' must be a character string or connection",
-#                       file),
-#              domain = NA)
-msgid "argument '%s' must be a character string or connection"
-msgstr "argument '%s' musi być łańcuchem tekstowym lub połączeniem"
+#. R/install.R: gettextf("package %s successfully unpacked and MD5 sums checked",     sQuote(pkg_name))
+#: R/install.R:0
+msgid "package %s successfully unpacked and MD5 sums checked"
+msgstr ""
+"pakiet %s został pomyślnie rozpakowany oraz sumy MD5 zostały sprawdzone"
 
-# tools/R/recode.R: 60
-# stop("unimplemented encoding")
-msgid "unimplemented encoding"
-msgstr "niezaimplementowana strona kodowa"
+#. R/pkgDepends.R: gettextf("package '%s' was not found", pkg)
+#: R/pkgDepends.R:0
+msgid "package '%s' was not found"
+msgstr "pakiet '%s' nie został znaleziony"
 
-# tools/R/sotools.R: 387
-# gettextf("Found %s, possibly from %s",
-#                                     sQuote(v),
-#                                     paste(sprintf("%s (%s)",
-#                                                   sQuote(u[, "ssname"]),
-#                                                   u[, "language"]),
-#                                           collapse = ", "))
-msgid "Found %s, possibly from %s"
-msgstr "Znaleziono %s, prawdopodobnie z %s"
+#. R/QC.R: gettext("package 'methods' is used but not declared")
+#: R/QC.R:0
+msgid "package 'methods' is used but not declared"
+msgstr "pakiet 'methods' został użyty, ale nie jest zadeklarowany"
 
-# tools/R/testing.R: 250
-# warning(gettextf("testing '%s' failed", pkgs[i]),
-#                         domain = NA, call. = FALSE, immediate. = TRUE)
-# tools/R/testing.R: 263
-# gettextf("testing '%s' failed", pkg)
-msgid "testing '%s' failed"
-msgstr "testowanie '%s' nie powiodło się"
+#. R/makeLazyLoad.R: warning("package contains no R code")
+#: R/makeLazyLoad.R:0
+msgid "package contains no R code"
+msgstr "pakiet nie zawiera kodu R"
 
-# tools/R/testing.R: 253
-# stop(gettextf("%d of the package tests failed", sum(res)),
-#                      domain = NA, call. = FALSE)
-msgid "%d of the package tests failed"
-msgstr "%d z testów pakietu nie powiodło się"
+#. R/check.R: gettextf("package directory %s does not exist", sQuote(pkg))
+#: R/check.R:0
+msgid "package directory %s does not exist"
+msgstr "katalog pakietu %s nie istnieje"
 
-# tools/R/testing.R: 285
-# message(gettextf("Testing examples for package %s", sQuote(pkg)),
-#                 domain = NA)
-msgid "Testing examples for package %s"
-msgstr "Testowanie przykładów dla pakietu %s"
+#. R/QC.R: sprintf("package name '%s' seems invalid; using directory name '%s' instead",     package_name, dir_name)
+#: R/QC.R:0
+msgid "package name '%s' seems invalid; using directory name '%s' instead"
+msgstr ""
+"nazwa pakietu '%s' wygląda na niepoprawną; zamiast niej używanie nazwy "
+"katalogu '%s'"
 
-# tools/R/testing.R: 312
-# message(gettextf("  comparing %s to %s ...",
-#                                     sQuote(outfile), sQuote(basename(savefile))),
-#                            appendLF = FALSE, domain = NA)
-# tools/R/testing.R: 323
-# message(gettextf("  comparing %s to %s ...",
-#                             sQuote(outfile), sQuote(basename(prevfile))),
-#                             appendLF = FALSE, domain = NA)
-# tools/R/testing.R: 361
-# message(gettextf("  comparing %s to %s ...",
-#                                  sQuote(outfile), sQuote(savefile)),
-#                         appendLF = FALSE, domain = NA)
-# tools/R/testing.R: 579
-# message(gettextf("  comparing %s to %s ...",
-#                              sQuote(outfile), sQuote(savefile)),
-#                     appendLF = FALSE, domain = NA)
-msgid "comparing %s to %s ..."
-msgstr "porównywanie %s z %s ..."
+#. R/makeLazyLoad.R: warning("package seems to be using lazy loading already")
+#: R/makeLazyLoad.R:0
+msgid "package seems to be using lazy loading already"
+msgstr "wygląda na to, że pakiet już wykorzystuje leniwe ładowanie"
 
-# tools/R/testing.R: 316
-# message(" OK")
-# tools/R/testing.R: 327
-# message(" OK")
-# tools/R/testing.R: 365
-# message(" OK")
-# tools/R/testing.R: 453
-# message(" OK")
-# tools/R/testing.R: 583
-# message(" OK")
-msgid "OK"
-msgstr "OK"
+#. R/makeLazyLoad.R: warning("package seems to be using lazy loading for data already")
+#: R/makeLazyLoad.R:0
+msgid "package seems to be using lazy loading for data already"
+msgstr "wygląda na to, że pakiet już wykorzystuje leniwe ładowanie dla danych"
 
-# tools/R/testing.R: 318
-# stop("  ", "results differ from reference results")
-msgid "results differ from reference results"
-msgstr "wyniki różnią się od wyników referencyjnych"
+#. R/QC.R: gettextf("parse error in examples from file '%s':\n", file, conditionMessage(e))
+#: R/QC.R:0
+msgid "parse error in examples from file '%s':"
+msgstr "błąd przetwarzania w przykładach z pliku '%s':"
 
-# tools/R/testing.R: 331
-# warning(gettextf("no examples found for package %s", sQuote(pkg)),
-#                     call. = FALSE, domain = NA)
-msgid "no examples found for package %s"
-msgstr "nie znaleziono przykładów dla pakietu %s"
+#. R/QC.R: gettextf("parse error in file '%s':\n", file, .massage_file_parse_error_message(conditionMessage(e)))
+#: R/QC.R:0
+msgid "parse error in file '%s':"
+msgstr "błąd przetwarzania w pliku '%s':"
 
-# tools/R/testing.R: 343
-# message(gettextf("Running specific tests for package %s",
-#                          sQuote(pkg)), domain = NA)
-msgid "Running specific tests for package %s"
-msgstr "Uruchamianie specyficznych testów dla pakietu %s"
+#. R/QC.R: gettextf("parse error in file '%s':\n%s", file, .massage_file_parse_error_message(conditionMessage(e)))
+#. R/QC.R: gettextf("parse error in file '%s':\n%s", file, .massage_file_parse_error_message(conditionMessage(e)))
+#. R/QC.R: gettextf("parse error in file '%s':\n%s", f, .massage_file_parse_error_message(conditionMessage(e)))
+#. R/QC.R: gettextf("parse error in file '%s':\n%s", summary(files)$description,     .massage_file_parse_error_message(conditionMessage(e)))
+#: R/QC.R:0
+msgid ""
+"parse error in file '%s':\n"
+"%s"
+msgstr ""
+"błąd przetwarzania w pliku '%s':\n"
+"%s"
 
-# tools/R/testing.R: 347
-# message(gettextf("  Running %s", sQuote(f)), domain = NA)
-# tools/R/testing.R: 416
-# message(gettextf("  Running %s", sQuote(f)),
-#                 appendLF = FALSE, domain = NA)
-msgid "Running %s"
-msgstr "Uruchamianie %s"
+#. R/xgettext.R: gettextf("parsing '%s'", f)
+#. R/xgettext.R: gettextf("parsing '%s'", f)
+#: R/xgettext.R:0
+msgid "parsing '%s'"
+msgstr "przetwarzanie pliku %s"
 
-# tools/R/testing.R: 372
-# message(gettextf("Running vignettes for package %s", sQuote(pkg)),
-#                 domain = NA)
-msgid "Running vignettes for package %s"
-msgstr "Uruchamianie ilustracji dla pakietu %s"
+#. R/admin.R: gettextf("processing %s", sQuote(basename(file)))
+#. R/doitools.R: sprintf("processing %s", p)
+#. R/doitools.R: sprintf("processing %s", d)
+#. R/pdftools.R: sprintf("processing %s", paste(names(entry), entry, collapse = " "))
+#. R/urltools.R: sprintf("processing %s", p)
+#. R/urltools.R: sprintf("processing %s", u)
+#. R/utils.R: sprintf("processing %s", basename(dir))
+#: R/admin.R:0 R/doitools.R:0 R/pdftools.R:0 R/urltools.R:0 R/utils.R:0
+msgid "processing %s"
+msgstr "przetwarzanie %s"
 
-# tools/R/testing.R: 440
-# message(gettextf("  Comparing %s to %s ...",
-#                              sQuote(outfile), sQuote(savefile)),
-#                     appendLF = FALSE, domain = NA)
-msgid "Comparing %s to %s ..."
-msgstr "Porównywanie %s z %s ..."
+#. R/Vignettes.R: gettextf("processing vignette '%s' failed with diagnostics:\n%s",     file, conditionMessage(e))
+#: R/Vignettes.R:0
+msgid ""
+"processing vignette '%s' failed with diagnostics:\n"
+"%s"
+msgstr ""
+"przetwarzanie ilustracji '%s' nie powiodło dając komunikat:\n"
+"%s"
 
-# tools/R/testing.R: 498
-# message("no parsed files found")
-msgid "no parsed files found"
-msgstr "nie znaleziono plików przeanalizowanych składniowo"
+#. R/packages.R: gettextf("reading DESCRIPTION for package %s failed with message:\n  %s",     sQuote(basename(dirname(p))), conditionMessage(temp))
+#. R/packages.R: gettextf("reading DESCRIPTION for package %s failed with message:\n  %s",     sQuote(basename(paths[i])), conditionMessage(temp))
+#: R/packages.R:0
+msgid ""
+"reading DESCRIPTION for package %s failed with message:\n"
+"  %s"
+msgstr ""
+"Odczytywanie pliku 'DESCRIPTION' dla pakietu %s nie powiodło się zwracając "
+"komunikat:\n"
+"  %s"
 
-# tools/R/testing.R: 574
-# message("FAILED")
-msgid "FAILED"
-msgstr "NIE POWIODŁO SIĘ"
+#. R/testing.R: stop("  ", "results differ from reference results")
+#: R/testing.R:0
+msgid "results differ from reference results"
+msgstr "wyniki różnią się od wyników referencyjnych"
 
-# tools/R/testing.R: 603
-# message("DIFFERED")
-# tools/R/testing.R: 614
-# message("DIFFERED")
-msgid "DIFFERED"
-msgstr "RÓŻNICE"
+#. R/admin.R: gettextf("running %s on vignette '%s' failed with message:\n%s",     engine[["name"]], file, conditionMessage(e))
+#: R/admin.R:0
+msgid ""
+"running %s on vignette '%s' failed with message:\n"
+"%s"
+msgstr ""
+"wykonywanie %s na ilustracji '%s' nie powiodło się z wynikiem:\n"
+"%s"
+
+#. R/Vignettes.R: stop("running 'make' failed")
+#: R/Vignettes.R:0
+msgid "running 'make' failed"
+msgstr "uruchomienie 'make' nie powiodło się"
+
+#. R/utils.R: gettextf("running 'texi2dvi' on '%s' failed", file)
+#: R/utils.R:0
+msgid "running 'texi2dvi' on '%s' failed"
+msgstr "działanie 'texi2dvi' na pliku '%s' nie powiodło się"
 
-# tools/R/testing.R: 620
-# message("running tests of random deviate generation -- fails occasionally")
+#. R/testing.R: message("running tests of random deviate generation -- fails occasionally")
+#: R/testing.R:0
 msgid "running tests of random deviate generation -- fails occasionally"
 msgstr ""
 "wykonywanie testów generowania losowych odchyleń -- okazjonalnie zawodzi"
 
-# tools/R/translations.R: 322
-# stop("R CMD build failed")
-msgid "R CMD build failed"
-msgstr "'R CMD build' nie powiodło się"
+#. R/dynamicHelp.R: stop("server already running")
+#: R/dynamicHelp.R:0
+msgid "server already running"
+msgstr "serwer jest już uruchomiony"
 
-# tools/R/utils.R: 40
-# stop("'x' must be a single character string")
-msgid "'x' must be a single character string"
-msgstr "argument 'x' musi być pojedynczym łańcuchem tekstowym"
+#. R/dynamicHelp.R: stop("server could not be started on an earlier attempt")
+#: R/dynamicHelp.R:0
+msgid "server could not be started on an earlier attempt"
+msgstr "serwer nie mógł zostać uruchomiony przy wcześniejszej próbie"
 
-# tools/R/utils.R: 79
-# stop(gettextf("test '%s' is not available", op),
-#                 domain = NA)
-msgid "test '%s' is not available"
-msgstr "test '%s' nie jest dostępny"
+#. R/makeLazyLoad.R: stop("source list must have names for all elements")
+#: R/makeLazyLoad.R:0
+msgid "source list must have names for all elements"
+msgstr "lista źródłowa musi mieć nazwy dla wszystkich elementów"
 
-# tools/R/utils.R: 182
-# stop("argument 'x' must be a character vector")
-msgid "argument 'x' must be a character vector"
-msgstr "argument 'x' musi być wektorem tekstowym"
+#. R/makeLazyLoad.R: stop("source must be an environment or a list")
+#: R/makeLazyLoad.R:0
+msgid "source must be an environment or a list"
+msgstr "źródło musi być środowiskiem lub listą"
 
-# tools/R/utils.R: 185
-# stop("argument 'delim' must specify two characters")
-msgid "argument 'delim' must specify two characters"
-msgstr "argument 'delim' musi określać dwa znaki"
+#. R/dynamicHelp.R: message("starting httpd help server ...", appendLF = FALSE)
+#: R/dynamicHelp.R:0
+msgid "starting httpd help server ..."
+msgstr "uruchamianie serwera httpd dla pomocy ..."
 
-# tools/R/utils.R: 187
-# stop("only Rd syntax is currently supported")
-msgid "only Rd syntax is currently supported"
-msgstr "aktualnie tylko składnia Rd jest wspierana"
+#. R/Vignettes.R: gettextf("tangling vignette '%s' failed with diagnostics:\n%s",     file, conditionMessage(e))
+#: R/Vignettes.R:0
+msgid ""
+"tangling vignette '%s' failed with diagnostics:\n"
+"%s"
+msgstr ""
+"wiązanie ilustracji '%s' nie powiodło dając komunikat:\n"
+"%s"
 
-# tools/R/utils.R: 321
-# gettextf("Running 'texi2dvi' on '%s' failed.", file)
-msgid "Running 'texi2dvi' on '%s' failed."
-msgstr "Uruchomienie 'texi2dvi' na pliku '%s' nie powiodło się."
+#. R/utils.R: gettextf("test '%s' is not available", op)
+#: R/utils.R:0
+msgid "test '%s' is not available"
+msgstr "test '%s' nie jest dostępny"
 
-# tools/R/utils.R: 391
-# gettextf("running 'texi2dvi' on '%s' failed", file)
-msgid "running 'texi2dvi' on '%s' failed"
-msgstr "działanie 'texi2dvi' na pliku '%s' nie powiodło się"
+#. R/testing.R: gettextf("testing '%s' failed", pkgs[i])
+#. R/testing.R: gettextf("testing '%s' failed", pkg)
+#: R/testing.R:0
+msgid "testing '%s' failed"
+msgstr "testowanie '%s' nie powiodło się"
 
-# tools/R/utils.R: 415
-# stop(gettextf("unable to run '%s' on '%s'", latex, file),
-#                  domain = NA)
-# tools/R/utils.R: 425
-# stop(gettextf("unable to run '%s' on '%s'",
-#                                   makeindex, idxfile),
-#                          domain = NA)
-msgid "unable to run '%s' on '%s'"
-msgstr "nie można uruchomić polecenia '%s' na pliku '%s'"
+#. R/pkgDepends.R: warning("the 'lib.loc' argument has always been unused and is deprecated now")
+#: R/pkgDepends.R:0
+msgid "the 'lib.loc' argument has always been unused and is deprecated now"
+msgstr "argument 'lib.loc' nigdy nie był używany i teraz jest przestarzały"
 
-# tools/R/utils.R: 430
-# stop(gettextf("unable to run %s on '%s'", latex, file), domain = NA)
-msgid "unable to run %s on '%s'"
-msgstr "nie można uruchomić polecenia '%s' na pliku '%s'"
+#. R/makeLazyLoad.R: gettextf("there is no package called '%s'", package)
+#. R/makeLazyLoad.R: gettextf("there is no package called '%s'", package)
+#. R/makeLazyLoad.R: gettextf("there is no package called '%s'", package)
+#. R/makeLazyLoad.R: gettextf("there is no package called '%s'", package)
+#: R/makeLazyLoad.R:0
+msgid "there is no package called '%s'"
+msgstr "nie ma pakietu o nazwie '%s'"
 
-# tools/R/utils.R: 528
-# warning("cannot coerce ", sQuote(val), " to logical")
-msgid "cannot coerce"
-msgstr "nie można przekształcić"
+#. R/makeLazyLoad.R: stop("this cannot be used for package 'base'")
+#: R/makeLazyLoad.R:0
+msgid "this cannot be used for package 'base'"
+msgstr "to nie może zostać użyte dla pakietu 'base'"
 
-# tools/R/utils.R: 528
-# warning("cannot coerce ", sQuote(val), " to logical")
-msgid "to logical"
-msgstr "na typ logiczny"
+#. R/install.R: stop("this seems to be a bundle -- and they are defunct")
+#: R/install.R:0
+msgid "this seems to be a bundle -- and they are defunct"
+msgstr "plik 'DESCRIPTION' wygląda to na paczkę -- a one zostały zlikwidowane"
 
-# tools/R/utils.R: 780
-# stop("File 'DESCRIPTION' is missing.")
-msgid "File 'DESCRIPTION' is missing."
-msgstr "Brakuje pliku 'DESCRIPTION'."
+#. R/admin.R: gettextf("unable to copy INDEX to '%s'", file.path(outDir, "INDEX"))
+#: R/admin.R:0
+msgid "unable to copy INDEX to '%s'"
+msgstr "nie można skopiować pliku INDEX do '%s'"
 
-# tools/R/utils.R: 785
-# stop("Files 'DESCRIPTION' and 'DESCRIPTION.in' are missing.")
-msgid "Files 'DESCRIPTION' and 'DESCRIPTION.in' are missing."
-msgstr "Brakuje plików 'DESCRIPTION' oraz 'DESCRIPTION.in'."
+#. R/QC.R: stop("unable to create ", file)
+#. R/packages.R: stop("unable to create ", td)
+#. R/utils.R: stop("unable to create ", con)
+#: R/QC.R:0 R/packages.R:0 R/utils.R:0
+msgid "unable to create"
+msgstr "nie można utworzyć"
 
-# tools/R/utils.R: 787
-# stop("invalid package layout")
-msgid "invalid package layout"
-msgstr "niepoprawna struktura pakietu"
+#. R/admin.R: gettextf("unable to create '%s'", outFile)
+#: R/admin.R:0
+msgid "unable to create '%s'"
+msgstr "nie można utworzyć '%s'"
 
-# tools/R/utils.R: 1439
-# stop(gettextf("file '%s' is not in valid DCF format",
-#                                   dfile),
-#                          domain = NA, call. = FALSE)
-msgid "file '%s' is not in valid DCF format"
-msgstr "plik '%s' nie jest poprawnym formatem DCF"
+#. R/Vignettes.R: gettextf("unable to create temp directory %s ", sQuote(tmpd))
+#: R/Vignettes.R:0
+msgid "unable to create temp directory %s"
+msgstr "nie można utworzyć katalogu tymczasowego %s"
 
-# tools/R/utils.R: 1443
-# stop("contains a blank line", call. = FALSE)
-msgid "contains a blank line"
-msgstr "zawiera pustą linię"
+#. R/utils.R: gettextf("unable to run %s on '%s'", latex, file)
+#: R/utils.R:0
+msgid "unable to run %s on '%s'"
+msgstr "nie można uruchomić polecenia '%s' na pliku '%s'"
+
+#. R/utils.R: gettextf("unable to run '%s' on '%s'", latex, file)
+#. R/utils.R: gettextf("unable to run '%s' on '%s'", makeindex, idxfile)
+#: R/utils.R:0
+msgid "unable to run '%s' on '%s'"
+msgstr "nie można uruchomić polecenia '%s' na pliku '%s'"
+
+#. R/QC.R: stop("unable to write code files")
+#. R/admin.R: stop("unable to write code files")
+#. R/utils.R: stop("unable to write code files")
+#: R/QC.R:0 R/admin.R:0 R/utils.R:0
+msgid "unable to write code files"
+msgstr "nie można zapisać plików kodu"
 
-# tools/R/utils.R: 1473
-# warning(gettext("Unknown encoding with non-ASCII data: converting to ASCII"),
-#                     domain = NA)
-msgid "Unknown encoding with non-ASCII data: converting to ASCII"
-msgstr "Nieznane kodowanie z danymi nie-ASCII: konwertowanie do ASCII"
+#. R/recode.R: stop("unimplemented encoding")
+#: R/recode.R:0
+msgid "unimplemented encoding"
+msgstr "niezaimplementowana strona kodowa"
 
-# tools/R/utils.R: 1583
-# stop("cannot source package code\n",
-#                   conditionMessage(e),
-#                   call. = FALSE)
-msgid "cannot source package code"
-msgstr "nie można wykonać kodu pakietu"
+#. R/pdftools.R: gettextf("unsupported %s predictor %d", "flatedecode", predictor)
+#: R/pdftools.R:0
+msgid "unsupported %s predictor %d"
+msgstr "niewspierany predyktor %s %d"
 
-msgid "Call sequence:"
-msgstr "Sekwencja wywołania:"
+#. R/pdftools.R: gettextf("unsupported PNG filter %d", fb)
+#: R/pdftools.R:0
+msgid "unsupported PNG filter %d"
+msgstr "niewspierany filtr PNG %d"
 
-# tools/R/xgettext.R: 84
-# message(gettextf("parsing '%s'", f), domain = NA)
-# tools/R/xgettext.R: 143
-# message(gettextf("parsing '%s'", f), domain = NA)
-msgid "parsing '%s'"
-msgstr "przetwarzanie pliku %s"
+#. R/dynamicHelp.R: gettextf("unsupported URL %s", mono(path))
+#: R/dynamicHelp.R:0
+msgid "unsupported URL %s"
+msgstr "niewspierany adres URL %s"
 
-# tools/R/QC.R: 4030
-# message(sprintf(ngettext(sum(obsolete),
-#                                  "Obsolete package %s in Rd xrefs",
-#                                  "Obsolete packages %s in Rd xrefs"),
-#                         paste(sQuote(unknown[obsolete]), collapse = ", ")),
-#                 domain = NA)
-msgid "Obsolete package %s in Rd xrefs"
-msgid_plural "Obsolete packages %s in Rd xrefs"
-msgstr[0] "Przestarzały pakiet %s w krzyżowych referencjach Rd"
-msgstr[1] "Przestarzałe pakiety %s w krzyżowych referencjach Rd"
-msgstr[2] "Przestarzałe pakiety %s w krzyżowych referencjach Rd"
+#. R/pdftools.R: gettextf("unsupported filter %s", sQuote(filter))
+#: R/pdftools.R:0
+msgid "unsupported filter %s"
+msgstr "niewspierany filtr %s"
 
-# tools/R/QC.R: 4046
-# message(sprintf(ngettext(sum(miss),
-#                                      "Package unavailable to check Rd xrefs: %s",
-#                                      "Packages unavailable to check Rd xrefs: %s"),
-#                              paste(sQuote(unknown[miss]), collapse = ", ")),
-#                     domain = NA)
-msgid "Package unavailable to check Rd xrefs: %s"
-msgid_plural "Packages unavailable to check Rd xrefs: %s"
-msgstr[0] ""
-"Pakiet jest niedostępny dla sprawdzenia krzyżowych referencji Rd: %s"
-msgstr[1] "Pakiety niedostępne dla sprawdzenia krzyżowych referencji Rd: %s"
-msgstr[2] "Pakiety niedostępne dla sprawdzenia krzyżowych referencji Rd: %s"
+#. R/Vignettes.R: gettextf("vignette builder '%s' not found", pkg)
+#: R/Vignettes.R:0
+msgid "vignette builder '%s' not found"
+msgstr "konstruktor ilustracji '%s' nie został znaleziony"
 
-# tools/R/QC.R: 4052
-# message(sprintf(ngettext(sum(!miss),
-#                                      "Unknown package %s in Rd xrefs",
-#                                      "Unknown packages %s in Rd xrefs"),
-#                              paste(sQuote(unknown[!miss]), collapse = ", ")),
-#                     domain = NA)
-msgid "Unknown package %s in Rd xrefs"
-msgid_plural "Unknown packages %s in Rd xrefs"
-msgstr[0] "Nieznany pakiet %s w krzyżowych referencjach Rd"
-msgstr[1] "Nieznane pakiety %s w krzyżowych referencjach Rd"
-msgstr[2] "Nieznane pakiety %s w krzyżowych referencjach Rd"
+#. R/Vignettes.R: gettextf("vignette filename '%s' does not match any of the '%s' filename patterns",     file, paste(engine$package, engine$name, sep = "::"))
+#: R/Vignettes.R:0
+msgid "vignette filename '%s' does not match any of the '%s' filename patterns"
+msgstr ""
+"nazwa pliku ilustracji '%s' nie zgadza się z żadną ze ścieżek nazwy pliku "
+"'%s'"
 
-# tools/R/QC.R: 4151
-# sprintf(
-#                   ngettext(n,
-#                    "Note: found %d marked Latin-1 string",
-#                    "Note: found %d marked Latin-1 strings"), n)
-msgid "Note: found %d marked Latin-1 string"
-msgid_plural "Note: found %d marked Latin-1 strings"
-msgstr[0] "Uwaga: znaleziono %d ciąg oznaczony jako Latin-1"
-msgstr[1] "Uwaga: znaleziono %d ciągi oznaczone jako Latin-1"
-msgstr[2] "Uwaga: znaleziono %d ciągów oznaczonych jako Latin-1"
+#. R/pdftools.R: stop("wrong class")
+#. R/pdftools.R: stop("wrong class")
+#. R/pdftools.R: stop("wrong class")
+#. R/pdftools.R: stop("wrong class")
+#. R/pdftools.R: stop("wrong class")
+#. R/pdftools.R: stop("wrong class")
+#. R/pdftools.R: stop("wrong class")
+#. R/pdftools.R: stop("wrong class")
+#: R/pdftools.R:0
+msgid "wrong class"
+msgstr "błędna klasa"
 
-# tools/R/QC.R: 4157
-# sprintf(
-#                   ngettext(n,
-#                            "Note: found %d marked UTF-8 string",
-#                            "Note: found %d marked UTF-8 strings"), n)
-msgid "Note: found %d marked UTF-8 string"
-msgid_plural "Note: found %d marked UTF-8 strings"
-msgstr[0] "Uwaga: znaleziono %d ciąg oznaczony jako ciąg UTF-8"
-msgstr[1] "Uwaga: znaleziono %d ciągi oznaczone jako ciągi UTF-8"
-msgstr[2] "Uwaga: znaleziono %d ciągów oznaczonych jako ciągi UTF-8"
+#. R/Rd.R: stop("you must specify 'dir' or 'files'")
+#: R/Rd.R:0
+msgid "you must specify 'dir' or 'files'"
+msgstr "musisz określić argument 'dir' lub 'files'"
 
-# tools/R/QC.R: 4163
-# sprintf(
-#                   ngettext(n,
-#                            "Note: found %d string marked as \"bytes\"",
-#                            "Note: found %d strings marked as \"bytes\""), n)
-msgid "Note: found %d string marked as \"bytes\""
-msgid_plural "Note: found %d strings marked as \"bytes\""
-msgstr[0] "Uwaga: znaleziono %d ciąg oznaczony jako \"bytes\""
-msgstr[1] "Uwaga: znaleziono %d ciągi oznaczone jako \"bytes\""
-msgstr[2] "Uwaga: znaleziono %d ciągów oznaczonych jako \"bytes\""
+#. R/QC.R: stop("you must specify 'package' or 'dir'")
+#. R/QC.R: stop("you must specify 'package' or 'dir'")
+#. R/QC.R: stop("you must specify 'package' or 'dir'")
+#. R/QC.R: stop("you must specify 'package' or 'dir'")
+#. R/QC.R: stop("you must specify 'package' or 'dir'")
+#. R/QC.R: stop("you must specify 'package' or 'dir'")
+#. R/QC.R: stop("you must specify 'package' or 'dir'")
+#. R/QC.R: stop("you must specify 'package' or 'dir'")
+#. R/QC.R: stop("you must specify 'package' or 'dir'")
+#. R/QC.R: stop("you must specify 'package' or 'dir'")
+#. R/Rd.R: stop("you must specify 'package' or 'dir'")
+#. R/Vignettes.R: stop("you must specify 'package' or 'dir'")
+#: R/QC.R:0 R/Rd.R:0 R/Vignettes.R:0
+msgid "you must specify 'package' or 'dir'"
+msgstr "musisz określić argument 'package' lub 'dir'"
 
-# tools/R/QC.R: 4563
-# sprintf(ngettext(len,
-#                                           "Warning in file %s:",
-#                                           "Warnings in file %s:"),
-#                                  sQuote(xi$File))
-msgid "Warning in file %s:"
-msgid_plural "Warnings in file %s:"
-msgstr[0] "Ostrzeżenie w pliku %s:"
-msgstr[1] "Ostrzeżenia w pliku %s:"
-msgstr[2] "Ostrzeżenia w pliku %s:"
+#. R/QC.R: stop("you must specify 'package', 'dir' or 'file'")
+#. R/QC.R: stop("you must specify 'package', 'dir' or 'file'")
+#: R/QC.R:0
+msgid "you must specify 'package', 'dir' or 'file'"
+msgstr "musisz określić 'package', 'dir' lub 'file'"
 
-# tools/R/QC.R: 5824
-# ngettext(length(x$bad_closures),
-#                           "Found possibly global 'T' or 'F' in the following function:",
-#                           "Found possibly global 'T' or 'F' in the following functions:"
-#                           )
-msgid "Found possibly global 'T' or 'F' in the following function:"
-msgid_plural "Found possibly global 'T' or 'F' in the following functions:"
-msgstr[0] ""
-"Znaleziono prawdopodobnie globalną wartość 'T' lub 'F' w następującej "
-"funkcji:"
-msgstr[1] ""
-"Znaleziono prawdopodobnie globalną wartość 'T' lub 'F' w następujących "
-"funkcjach:"
-msgstr[2] ""
-"Znaleziono prawdopodobnie globalną wartość 'T' lub 'F' w następujących "
-"funkcjach:"
+#. R/testing.R: ngettext(sum(res), "%d of the package tests failed", "%d of the package tests failed",     domain = "R-tools")
+#: R/testing.R:0
+msgid "%d of the package tests failed"
+msgid_plural "%d of the package tests failed"
+msgstr[0] "%d z testów pakietu nie powiodło się"
+msgstr[1] "%d z testów pakietu nie powiodło się"
+msgstr[2] "%d z testów pakietu nie powiodło się"
 
-# tools/R/QC.R: 5832
-# ngettext(length(x$bad_examples),
-#                           "Found possibly global 'T' or 'F' in the examples of the following Rd file:",
-#                           "Found possibly global 'T' or 'F' in the examples of the following Rd files:"
-#                           )
-msgid ""
-"Found possibly global 'T' or 'F' in the examples of the following Rd file:"
+#. R/QC.R: ngettext(length(x$bad_refs), "Found a .Internal call in methods for the following reference class:",     "Found .Internal calls in methods for the following reference classes:")
+#: R/QC.R:0
+msgid "Found a .Internal call in methods for the following reference class:"
 msgid_plural ""
-"Found possibly global 'T' or 'F' in the examples of the following Rd files:"
+"Found .Internal calls in methods for the following reference classes:"
 msgstr[0] ""
-"Znaleziono prawdopodobnie globalną wartość 'T' lub 'F' w przykładach "
-"następującego pliku Rd:"
+"Znaleziono wywołanie '.Internal' w metodach w następującej klasie "
+"referencyjnej:"
 msgstr[1] ""
-"Znaleziono prawdopodobnie globalną wartość 'T' lub 'F' w przykładach "
-"następujących plików Rd:"
+"Znaleziono wywołania '.Internal' w metodach w następujących klasach "
+"referencyjnych:"
 msgstr[2] ""
-"Znaleziono prawdopodobnie globalną wartość 'T' lub 'F' w przykładach "
-"następujących plików Rd:"
+"Znaleziono wywołania '.Internal' w metodach w następujących klasach "
+"referencyjnych:"
 
-# tools/R/QC.R: 5939
-# ngettext(length(x$bad_closures),
-#                         "Found a .Internal call in the following function:",
-#                         "Found .Internal calls in the following functions:"
-#                         )
+#. R/QC.R: ngettext(length(x$bad_closures), "Found a .Internal call in the following function:",     "Found .Internal calls in the following functions:")
+#: R/QC.R:0
 msgid "Found a .Internal call in the following function:"
 msgid_plural "Found .Internal calls in the following functions:"
 msgstr[0] "Znaleziono wywołanie '.Internal' w następującej funkcji:"
 msgstr[1] "Znaleziono wywołania '.Internal' w następujących funkcjach:"
 msgstr[2] "Znaleziono wywołania '.Internal' w następujących funkcjach:"
 
-# tools/R/QC.R: 5950
-# ngettext(length(x$bad_S4methods),
-#                         "Found a.Internal call in methods for the following S4 generic:",
-#                         "Found .Internal calls in methods for the following S4 generics:"
-#                         )
+#. R/QC.R: ngettext(length(x$bad_S4methods), "Found a.Internal call in methods for the following S4 generic:",     "Found .Internal calls in methods for the following S4 generics:")
+#: R/QC.R:0
 msgid "Found a.Internal call in methods for the following S4 generic:"
 msgid_plural "Found .Internal calls in methods for the following S4 generics:"
 msgstr[0] ""
@@ -2839,47 +2234,8 @@ msgstr[2] ""
 "Znaleziono wywołania '.Internal' w metodach w następujących funkcjach "
 "ogólnych S4:"
 
-# tools/R/QC.R: 5957
-# ngettext(length(x$bad_refs),
-#                         "Found a .Internal call in methods for the following reference class:",
-#                         "Found .Internal calls in methods for the following reference classes:"
-#                         )
-msgid "Found a .Internal call in methods for the following reference class:"
-msgid_plural ""
-"Found .Internal calls in methods for the following reference classes:"
-msgstr[0] ""
-"Znaleziono wywołanie '.Internal' w metodach w następującej klasie "
-"referencyjnej:"
-msgstr[1] ""
-"Znaleziono wywołania '.Internal' w metodach w następujących klasach "
-"referencyjnych:"
-msgstr[2] ""
-"Znaleziono wywołania '.Internal' w metodach w następujących klasach "
-"referencyjnych:"
-
-# tools/R/QC.R: 6210
-# ngettext(length(x$bad_closures),
-#                         "Found an obsolete/platform-specific call in the following function:",
-#                         "Found an obsolete/platform-specific call in the following functions:"
-#                         )
-msgid "Found an obsolete/platform-specific call in the following function:"
-msgid_plural ""
-"Found an obsolete/platform-specific call in the following functions:"
-msgstr[0] ""
-"Znaleziono przestarzałe/specyficzne dla platformy wywołanie w następującej "
-"funkcji:"
-msgstr[1] ""
-"Znaleziono przestarzałe/specyficzne dla platformy wywołanie w następujących "
-"funkcjach:"
-msgstr[2] ""
-"Znaleziono przestarzałe/specyficzne dla platformy wywołanie w następujących "
-"funkcjach:"
-
-# tools/R/QC.R: 6217
-# ngettext(length(x$bad_S4methods),
-#                         "Found an obsolete/platform-specific call in methods for the following S4 generic:",
-#                         "Found an obsolete/platform-specific call in methods for the following S4 generics:"
-#                         )
+#. R/QC.R: ngettext(length(x$bad_S4methods), "Found an obsolete/platform-specific call in methods for the following S4 generic:",     "Found an obsolete/platform-specific call in methods for the following S4 generics:")
+#: R/QC.R:0
 msgid ""
 "Found an obsolete/platform-specific call in methods for the following S4 "
 "generic:"
@@ -2896,11 +2252,8 @@ msgstr[2] ""
 "Znaleziono przestarzałe/specyficzne dla platformy wywołanie w metodach w "
 "następujących funkcji ogólnych S4:"
 
-# tools/R/QC.R: 6224
-# ngettext(length(x$bad_refs),
-#                         "Found an obsolete/platform-specific call in methods for the following reference class:",
-#                         "Found an obsolete/platform-specific call in methods for the following reference classes:"
-#                         )
+#. R/QC.R: ngettext(length(x$bad_refs), "Found an obsolete/platform-specific call in methods for the following reference class:",     "Found an obsolete/platform-specific call in methods for the following reference classes:")
+#: R/QC.R:0
 msgid ""
 "Found an obsolete/platform-specific call in methods for the following "
 "reference class:"
@@ -2917,58 +2270,158 @@ msgstr[2] ""
 "Znaleziono przestarzałe/specyficzne dla platformy wywołanie w metodach w "
 "następujących klasach referencyjnych:"
 
-# tools/R/QC.R: 6231
-# ngettext(length(x$deprecated),
-#                         "Found the deprecated function:",
-#                         "Found the deprecated functions:"
-#                         )
-msgid "Found the deprecated function:"
-msgid_plural "Found the deprecated functions:"
-msgstr[0] "Znaleziono przestarzałą funkcję:"
-msgstr[1] "Znaleziono przestarzałe funkcje:"
-msgstr[2] "Znaleziono przestarzałe funkcje:"
+#. R/QC.R: ngettext(length(x$bad_closures), "Found an obsolete/platform-specific call in the following function:",     "Found an obsolete/platform-specific call in the following functions:")
+#: R/QC.R:0
+msgid "Found an obsolete/platform-specific call in the following function:"
+msgid_plural ""
+"Found an obsolete/platform-specific call in the following functions:"
+msgstr[0] ""
+"Znaleziono przestarzałe/specyficzne dla platformy wywołanie w następującej "
+"funkcji:"
+msgstr[1] ""
+"Znaleziono przestarzałe/specyficzne dla platformy wywołanie w następujących "
+"funkcjach:"
+msgstr[2] ""
+"Znaleziono przestarzałe/specyficzne dla platformy wywołanie w następujących "
+"funkcjach:"
+
+#. R/QC.R: ngettext(length(x$bad_examples), "Found possibly global 'T' or 'F' in the examples of the following Rd file:",     "Found possibly global 'T' or 'F' in the examples of the following Rd files:")
+#: R/QC.R:0
+msgid ""
+"Found possibly global 'T' or 'F' in the examples of the following Rd file:"
+msgid_plural ""
+"Found possibly global 'T' or 'F' in the examples of the following Rd files:"
+msgstr[0] ""
+"Znaleziono prawdopodobnie globalną wartość 'T' lub 'F' w przykładach "
+"następującego pliku Rd:"
+msgstr[1] ""
+"Znaleziono prawdopodobnie globalną wartość 'T' lub 'F' w przykładach "
+"następujących plików Rd:"
+msgstr[2] ""
+"Znaleziono prawdopodobnie globalną wartość 'T' lub 'F' w przykładach "
+"następujących plików Rd:"
+
+#. R/QC.R: ngettext(length(x$bad_closures), "Found possibly global 'T' or 'F' in the following function:",     "Found possibly global 'T' or 'F' in the following functions:")
+#: R/QC.R:0
+msgid "Found possibly global 'T' or 'F' in the following function:"
+msgid_plural "Found possibly global 'T' or 'F' in the following functions:"
+msgstr[0] ""
+"Znaleziono prawdopodobnie globalną wartość 'T' lub 'F' w następującej "
+"funkcji:"
+msgstr[1] ""
+"Znaleziono prawdopodobnie globalną wartość 'T' lub 'F' w następujących "
+"funkcjach:"
+msgstr[2] ""
+"Znaleziono prawdopodobnie globalną wartość 'T' lub 'F' w następujących "
+"funkcjach:"
 
-# tools/R/QC.R: 6238
-# ngettext(length(x$defunct),
-#                         "Found the defunct/removed function:",
-#                         "Found the defunct/removed functions:"
-#                         )
+#. R/QC.R: ngettext(length(x$defunct), "Found the defunct/removed function:",     "Found the defunct/removed functions:")
+#: R/QC.R:0
 msgid "Found the defunct/removed function:"
 msgid_plural "Found the defunct/removed functions:"
 msgstr[0] "Znaleziono zlikwidowaną/usunietą funkcję:"
 msgstr[1] "Znaleziono zlikwidowane/usuniete funkcje:"
 msgstr[2] "Znaleziono zlikwidowane/usuniete funkcje:"
 
-# tools/R/QC.R: 6245
-# ngettext(length(x$devices),
-#                         "Found the platform-specific device:",
-#                         "Found the platform-specific devices:"
-#                         )
+#. R/QC.R: ngettext(length(x$deprecated), "Found the deprecated function:",     "Found the deprecated functions:")
+#: R/QC.R:0
+msgid "Found the deprecated function:"
+msgid_plural "Found the deprecated functions:"
+msgstr[0] "Znaleziono przestarzałą funkcję:"
+msgstr[1] "Znaleziono przestarzałe funkcje:"
+msgstr[2] "Znaleziono przestarzałe funkcje:"
+
+#. R/QC.R: ngettext(length(x$devices), "Found the platform-specific device:",     "Found the platform-specific devices:")
+#: R/QC.R:0
 msgid "Found the platform-specific device:"
 msgid_plural "Found the platform-specific devices:"
 msgstr[0] "Znaleziono urządzenie specyficzne dla platformy:"
 msgstr[1] "Znaleziono urządzenia specyficzne dla platformy:"
 msgstr[2] "Znaleziono urządzenia specyficzne dla platformy:"
 
-# tools/R/QC.R: 7180
-# message(sprintf(ngettext(sum(!ok),
-#                                      "Generic without any methods in %s: %s",
-#                                      "Generics without any methods in %s: %s"),
-#                             format(env),
-#                             paste(sQuote(r[!ok]), collapse = ", ")),
-#                     domain = NA)
+#. R/QC.R: ngettext(sum(!ok), "Generic without any methods in %s: %s", "Generics without any methods in %s: %s")
+#: R/QC.R:0
 msgid "Generic without any methods in %s: %s"
 msgid_plural "Generics without any methods in %s: %s"
 msgstr[0] "Funkcja ogólna bez metod w %s: %s"
 msgstr[1] "Funkcje ogólne bez metod w %s: %s"
 msgstr[2] "Funkcje ogólne bez metod w %s: %s"
 
-# tools/R/Rd.R: 775
-# stop(sprintf(ngettext(sum(idx),
-#                                   "missing/empty \\name field in Rd file\n%s",
-#                                   "missing/empty \\name field in Rd files\n%s"),
-#                          paste(" ", Rd_paths[idx], collapse = "\n")),
-#                  call. = FALSE, domain = NA)
+#. R/dynamicHelp.R: ngettext(length(paths), "Help on topic '%s' was found in the following package:",     "Help on topic '%s' was found in the following packages:")
+#: R/dynamicHelp.R:0
+msgid "Help on topic '%s' was found in the following package:"
+msgid_plural "Help on topic '%s' was found in the following packages:"
+msgstr[0] "Pomoc na temat '%s' została znaleziona w następującym pakiecie:"
+msgstr[1] "Pomoc na temat '%s' została znaleziona w następujących pakietach:"
+msgstr[2] "Pomoc na temat '%s' została znaleziona w następujących pakietach:"
+
+#. R/QC.R: ngettext(n, "Note: found %d marked Latin-1 string", "Note: found %d marked Latin-1 strings")
+#: R/QC.R:0
+msgid "Note: found %d marked Latin-1 string"
+msgid_plural "Note: found %d marked Latin-1 strings"
+msgstr[0] "Uwaga: znaleziono %d ciąg oznaczony jako Latin-1"
+msgstr[1] "Uwaga: znaleziono %d ciągi oznaczone jako Latin-1"
+msgstr[2] "Uwaga: znaleziono %d ciągów oznaczonych jako Latin-1"
+
+#. R/QC.R: ngettext(n, "Note: found %d marked UTF-8 string", "Note: found %d marked UTF-8 strings")
+#: R/QC.R:0
+msgid "Note: found %d marked UTF-8 string"
+msgid_plural "Note: found %d marked UTF-8 strings"
+msgstr[0] "Uwaga: znaleziono %d ciąg oznaczony jako ciąg UTF-8"
+msgstr[1] "Uwaga: znaleziono %d ciągi oznaczone jako ciągi UTF-8"
+msgstr[2] "Uwaga: znaleziono %d ciągów oznaczonych jako ciągi UTF-8"
+
+#. R/QC.R: ngettext(n, "Note: found %d string marked as \"bytes\"", "Note: found %d strings marked as \"bytes\"")
+#: R/QC.R:0
+msgid "Note: found %d string marked as \"bytes\""
+msgid_plural "Note: found %d strings marked as \"bytes\""
+msgstr[0] "Uwaga: znaleziono %d ciąg oznaczony jako \"bytes\""
+msgstr[1] "Uwaga: znaleziono %d ciągi oznaczone jako \"bytes\""
+msgstr[2] "Uwaga: znaleziono %d ciągów oznaczonych jako \"bytes\""
+
+#. R/QC.R: ngettext(sum(obsolete), "Obsolete package %s in Rd xrefs", "Obsolete packages %s in Rd xrefs")
+#: R/QC.R:0
+msgid "Obsolete package %s in Rd xrefs"
+msgid_plural "Obsolete packages %s in Rd xrefs"
+msgstr[0] "Przestarzały pakiet %s w krzyżowych referencjach Rd"
+msgstr[1] "Przestarzałe pakiety %s w krzyżowych referencjach Rd"
+msgstr[2] "Przestarzałe pakiety %s w krzyżowych referencjach Rd"
+
+#. R/QC.R: ngettext(sum(miss), "Package unavailable to check Rd xrefs: %s",     "Packages unavailable to check Rd xrefs: %s")
+#: R/QC.R:0
+msgid "Package unavailable to check Rd xrefs: %s"
+msgid_plural "Packages unavailable to check Rd xrefs: %s"
+msgstr[0] ""
+"Pakiet jest niedostępny dla sprawdzenia krzyżowych referencji Rd: %s"
+msgstr[1] "Pakiety niedostępne dla sprawdzenia krzyżowych referencji Rd: %s"
+msgstr[2] "Pakiety niedostępne dla sprawdzenia krzyżowych referencji Rd: %s"
+
+#. R/check.R: ngettext(length(fail), "Required field missing or empty:", "Required fields missing or empty:")
+#: R/check.R:0
+msgid "Required field missing or empty:"
+msgid_plural "Required fields missing or empty:"
+msgstr[0] "Brakuje wymaganego pola lub jest puste:"
+msgstr[1] "Brakuje wymaganych pól lub są puste:"
+msgstr[2] "Brakuje wymaganych pól lub są puste:"
+
+#. R/QC.R: ngettext(sum(!miss), "Unknown package %s in Rd xrefs", "Unknown packages %s in Rd xrefs")
+#: R/QC.R:0
+msgid "Unknown package %s in Rd xrefs"
+msgid_plural "Unknown packages %s in Rd xrefs"
+msgstr[0] "Nieznany pakiet %s w krzyżowych referencjach Rd"
+msgstr[1] "Nieznane pakiety %s w krzyżowych referencjach Rd"
+msgstr[2] "Nieznane pakiety %s w krzyżowych referencjach Rd"
+
+#. R/QC.R: ngettext(len, "Warning in file %s:", "Warnings in file %s:")
+#: R/QC.R:0
+msgid "Warning in file %s:"
+msgid_plural "Warnings in file %s:"
+msgstr[0] "Ostrzeżenie w pliku %s:"
+msgstr[1] "Ostrzeżenia w pliku %s:"
+msgstr[2] "Ostrzeżenia w pliku %s:"
+
+#. R/Rd.R: ngettext(sum(idx), "missing/empty \\name field in Rd file\n%s",     "missing/empty \\name field in Rd files\n%s")
+#: R/Rd.R:0
 msgid ""
 "missing/empty \\name field in Rd file\n"
 "%s"
@@ -2985,51 +2438,56 @@ msgstr[2] ""
 "brakujące/puste pole \\name w plikach\n"
 "%s"
 
-# tools/R/admin.R: 305
-# warning(sprintf(ngettext(length(bad),
-#                                          "unable to re-encode %s line %s",
-#                                          "unable to re-encode %s lines %s"),
-#                                 sQuote(basename(f)),
-#                                 paste(bad, collapse = ", ")),
-#                         domain = NA, call. = FALSE)
+#. R/makeLazyLoad.R: ngettext(sum(dup), "object %s is created by more than one data call",     "objects %s are created by more than one data call")
+#: R/makeLazyLoad.R:0
+msgid "object %s is created by more than one data call"
+msgid_plural "objects %s are created by more than one data call"
+msgstr[0] "obiekt %s jest utworzony przez więcej niż jedno wywołanie danych"
+msgstr[1] "obiekty %s są utworzone przez więcej niż jedno wywołanie danych"
+msgstr[2] "obiekty %s są utworzone przez więcej niż jedno wywołanie danych"
+
+#. R/admin.R: ngettext(length(bad), "unable to re-encode %s line %s", "unable to re-encode %s lines %s")
+#: R/admin.R:0
 msgid "unable to re-encode %s line %s"
 msgid_plural "unable to re-encode %s lines %s"
 msgstr[0] "nie można przekodować %s linia %s"
 msgstr[1] "nie można przekodować %s linie %s"
 msgstr[2] "nie można przekodować %s linie %s"
 
-# tools/R/check.R: 3427
-# ngettext(length(fail),
-#                                 "Required field missing or empty:",
-#                                 "Required fields missing or empty:")
-msgid "Required field missing or empty:"
-msgid_plural "Required fields missing or empty:"
-msgstr[0] "Brakuje wymaganego pola lub jest puste:"
-msgstr[1] "Brakuje wymaganych pól lub są puste:"
-msgstr[2] "Brakuje wymaganych pól lub są puste:"
+#~ msgid "assertCondition: caught %s"
+#~ msgstr "assertCondition: przechwycono %s"
 
-# tools/R/dynamicHelp.R: 273
-# sprintf(ngettext(length(paths),
-#                                                "Help on topic '%s' was found in the following package:",
-#                                                "Help on topic '%s' was found in the following packages:"
-#                                                ), topic)
-msgid "Help on topic '%s' was found in the following package:"
-msgid_plural "Help on topic '%s' was found in the following packages:"
-msgstr[0] "Pomoc na temat '%s' została znaleziona w następującym pakiecie:"
-msgstr[1] "Pomoc na temat '%s' została znaleziona w następujących pakietach:"
-msgstr[2] "Pomoc na temat '%s' została znaleziona w następujących pakietach:"
+#~ msgid ","
+#~ msgstr ","
 
-# tools/R/makeLazyLoad.R: 132
-# warning(sprintf(ngettext(sum(dup),
-#                                          "object %s is created by more than one data call",
-#                                          "objects %s are created by more than one data call"),
-#                                 paste(sQuote(loaded[dup]), collapse=", ")),
-#                         call. = FALSE, domain = NA)
-msgid "object %s is created by more than one data call"
-msgid_plural "objects %s are created by more than one data call"
-msgstr[0] "obiekt %s jest utworzony przez więcej niż jedno wywołanie danych"
-msgstr[1] "obiekty %s są utworzone przez więcej niż jedno wywołanie danych"
-msgstr[2] "obiekty %s są utworzone przez więcej niż jedno wywołanie danych"
+#~ msgid "installing dependencies %s"
+#~ msgstr "instalowanie zależności %s"
+
+#~ msgid "%s"
+#~ msgstr "%s"
+
+#~ msgid ":"
+#~ msgstr ":"
+
+#~ msgid "latin1"
+#~ msgstr "latin1"
+
+#~ msgid "ASCII"
+#~ msgstr "ASCII"
+
+#~ msgid "byte"
+#~ msgstr "byte"
+
+#~ msgid "parsing file %s"
+#~ msgstr "parsowanie pliku %s"
+
+#, fuzzy
+#~ msgid "Undeclared package used in Rd xrefs:"
+#~ msgid_plural "Undeclared packages used in Rd xrefs:"
+#~ msgstr[0] "Nieznany pakiet %s w krzyżowych referencjach Rd"
+#~ msgstr[1] "Nieznane pakiety %s w krzyżowych referencjach Rd"
+#~ msgstr[2] "Nieznane pakiety %s w krzyżowych referencjach Rd"
 
-#~ msgid "'file' must be a character string or connection"
-#~ msgstr "argument 'file' musi być łańcuchem tekstowym lub połączeniem"
+#, fuzzy
+#~ msgid "Inconsistent encoding specifications: %s with %%\\SweaveUTF8"
+#~ msgstr "Niespójne specyfikacje strony kodowej:"
diff --git a/src/library/tools/po/R-pt_BR.po b/src/library/tools/po/R-pt_BR.po
index 7a8b32d..e9a7b71 100644
--- a/src/library/tools/po/R-pt_BR.po
+++ b/src/library/tools/po/R-pt_BR.po
@@ -2,7 +2,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: 2.13.0\n"
 "Report-Msgid-Bugs-To: bugs.r-project.org\n"
-"POT-Creation-Date: 2014-01-26 09:09\n"
+"POT-Creation-Date: 2016-04-01 09:50\n"
 "PO-Revision-Date: 2011-03-26 08:57-0300\n"
 "Last-Translator: Colin Robert <beasley at ufpa.br>\n"
 "Language-Team: http://www.feferraz.net/br/P/Projeto_Traducao_R_Portugues\n"
@@ -13,6 +13,12 @@ msgstr ""
 "Plural-Forms: nplurals=2; plural=(n > 1);\n"
 "X-Generator: Pootle 2.0.5\n"
 
+msgid "Checking %s"
+msgstr ""
+
+msgid "Processing %s ..."
+msgstr ""
+
 msgid "argument 'package' must be of length 1"
 msgstr "argumento 'package' deve ter comprimento 1"
 
@@ -225,9 +231,15 @@ msgid ""
 "already be known to R."
 msgstr ""
 
+msgid "Malformed Title field: should not end in a period."
+msgstr ""
+
 msgid ""
-"See the information on DESCRIPTION files in section 'Creating R packages' of "
-"the 'Writing R Extensions' manual."
+"Malformed Description field: should contain one or more complete sentences."
+msgstr ""
+
+msgid ""
+"See section 'The DESCRIPTION file' in the 'Writing R Extensions' manual."
 msgstr ""
 
 msgid "Malformed Authors at R field:"
@@ -245,7 +257,12 @@ msgstr ""
 msgid "Cannot extract Maintainer field from Authors at R field:"
 msgstr ""
 
-msgid "Authors at R field gives no person with maintainer role and email address."
+msgid "Authors at R field gives more than one person with maintainer role:"
+msgstr ""
+
+msgid ""
+"Authors at R field gives no person with maintainer role, valid email address "
+"and non-empty name."
 msgstr ""
 
 msgid "Encoding '%s' is not portable"
@@ -291,9 +308,7 @@ msgid "Missing link or links in documentation object '%s':"
 msgstr ""
 "Arquivos de dados com uso no objeto de documentação '%s' mas não no código:"
 
-msgid ""
-"See the information in section 'Cross-references' of the 'Writing R "
-"Extensions' manual."
+msgid "See section 'Cross-references' in the 'Writing R Extensions' manual."
 msgstr ""
 
 msgid "File %s:"
@@ -323,8 +338,7 @@ msgid "See section %s in '%s'."
 msgstr ""
 
 msgid ""
-"Package detach functions should have one arguments with names starting with "
-"%s."
+"Package detach functions should have one argument with name starting with %s."
 msgstr ""
 
 msgid "Package detach functions should not call %s."
@@ -351,6 +365,12 @@ msgstr ""
 msgid "'library' or 'require' call not declared from: %s"
 msgstr ""
 
+msgid "'loadNamespace' or 'requireNamespace' calls not declared from:"
+msgstr ""
+
+msgid "'loadNamespace' or 'requireNamespace' call not declared from: %s"
+msgstr ""
+
 msgid "'library' or 'require' calls to packages already attached by Depends:"
 msgstr ""
 
@@ -358,6 +378,12 @@ msgid ""
 "'library' or 'require' call to %s which was already attached by Depends."
 msgstr ""
 
+msgid "'library' or 'require' calls in package code:"
+msgstr ""
+
+msgid "'library' or 'require' call to %s in package code."
+msgstr ""
+
 msgid "Namespaces in Imports field not imported from:"
 msgstr ""
 
@@ -435,7 +461,7 @@ msgid ""
 "in NAMESPACE."
 msgstr ""
 
-msgid "argument 'file' must be a character string or connection"
+msgid "Rd object required"
 msgstr ""
 
 msgid "missing/empty %s field in '%s'"
@@ -465,6 +491,15 @@ msgstr ""
 msgid "No help on %s found in RdDB %s"
 msgstr ""
 
+msgid "'macros' must be TRUE or must specify existing macros"
+msgstr ""
+
+msgid "Macro file %s should only contain Rd macro definitions and comments"
+msgstr ""
+
+msgid "No Rd macros in package '%s'."
+msgstr ""
+
 msgid "more than one \\examples section, using the first"
 msgstr ""
 
@@ -504,6 +539,9 @@ msgstr ""
 msgid "Only one Rd section per %s is supported."
 msgstr ""
 
+msgid "DESCRIPTION file is for package '%s', not '%s'"
+msgstr ""
+
 msgid "Vignette product %s does not have a known filename extension (%s)"
 msgstr ""
 
@@ -520,6 +558,9 @@ msgstr ""
 msgid "unable to create temp directory %s"
 msgstr ""
 
+msgid "Vignette '%s' is non-ASCII but has no declared encoding"
+msgstr ""
+
 msgid "Running"
 msgstr ""
 
@@ -550,12 +591,6 @@ msgstr ""
 msgid "vignette filename '%s' does not match any of the '%s' filename patterns"
 msgstr ""
 
-msgid "Inconsistent encoding specifications:"
-msgstr ""
-
-msgid "with %\\SweaveUTF8"
-msgstr ""
-
 msgid "In '%s' vignettes '%s' and '%s' have the same vignette name"
 msgstr ""
 
@@ -658,12 +693,6 @@ msgstr ""
 msgid "assertConditon: Successfully caught a condition"
 msgstr ""
 
-msgid "assertCondition: caught %s"
-msgstr ""
-
-msgid ","
-msgstr ""
-
 msgid "Got %s in evaluating %s; wanted %s"
 msgstr ""
 
@@ -728,9 +757,6 @@ msgstr ""
 msgid "downloading %s ..."
 msgstr ""
 
-msgid "installing dependencies %s"
-msgstr ""
-
 msgid "checking %s ..."
 msgstr ""
 
@@ -770,6 +796,9 @@ msgstr ""
 msgid "No docs found for package %s"
 msgstr ""
 
+msgid "URL %s was not found"
+msgstr ""
+
 msgid ""
 "Only help files, %s, %s and files under %s and %s in a package can be viewed"
 msgstr ""
@@ -777,9 +806,6 @@ msgstr ""
 msgid "unsupported URL %s"
 msgstr ""
 
-msgid "URL %s was not found"
-msgstr ""
-
 msgid "httpd server disabled by R_DISABLE_HTTPD"
 msgstr ""
 
@@ -838,6 +864,9 @@ msgstr ""
 msgid "empty 'data' directory"
 msgstr ""
 
+msgid "cannot create unique directory for build"
+msgstr ""
+
 msgid "cannot create temporary directory"
 msgstr ""
 
@@ -859,6 +888,12 @@ msgstr ""
 msgid "building a fake installation is disallowed"
 msgstr ""
 
+msgid ""
+"See\n"
+"  %s\n"
+"for details."
+msgstr ""
+
 msgid "there is no package called '%s'"
 msgstr ""
 
@@ -894,6 +929,12 @@ msgid ""
 "%s"
 msgstr ""
 
+msgid "DESCRIPTION file not found"
+msgstr ""
+
+msgid "NEWS file not found"
+msgstr ""
+
 msgid "No news found in given file using old-style R-like format."
 msgstr ""
 
@@ -911,9 +952,6 @@ msgstr ""
 msgid "Cannot extract version info from the following section titles:"
 msgstr ""
 
-msgid "%s"
-msgstr ""
-
 msgid ""
 "Malformed NEWS.Rd file:\n"
 "Chunk starting\n"
@@ -932,6 +970,11 @@ msgstr ""
 msgid "Processing packages:"
 msgstr ""
 
+msgid ""
+"reading DESCRIPTION for package %s failed with message:\n"
+"  %s"
+msgstr ""
+
 msgid "%s must be a character string or a file/raw connection"
 msgstr ""
 
@@ -1017,6 +1060,9 @@ msgstr "argumento 'package' deve ter comprimento 1"
 msgid "package '%s' was not found"
 msgstr ""
 
+msgid "the 'lib.loc' argument has always been unused and is deprecated now"
+msgstr ""
+
 msgid "bad operand"
 msgstr ""
 
@@ -1035,9 +1081,6 @@ msgstr ""
 msgid "testing '%s' failed"
 msgstr ""
 
-msgid "%d of the package tests failed"
-msgstr ""
-
 msgid "Testing examples for package %s"
 msgstr ""
 
@@ -1107,10 +1150,7 @@ msgstr ""
 msgid "unable to run %s on '%s'"
 msgstr ""
 
-msgid "cannot coerce"
-msgstr ""
-
-msgid "to logical"
+msgid "cannot coerce %s to logical"
 msgstr ""
 
 msgid "File 'DESCRIPTION' is missing."
@@ -1137,6 +1177,9 @@ msgstr ""
 msgid "Call sequence:"
 msgstr ""
 
+msgid "'text' must be a character vector"
+msgstr ""
+
 msgid "parsing '%s'"
 msgstr ""
 
@@ -1275,3 +1318,8 @@ msgid "object %s is created by more than one data call"
 msgid_plural "objects %s are created by more than one data call"
 msgstr[0] ""
 msgstr[1] ""
+
+msgid "%d of the package tests failed"
+msgid_plural "%d of the package tests failed"
+msgstr[0] ""
+msgstr[1] ""
diff --git a/src/library/tools/po/R-ru.po b/src/library/tools/po/R-ru.po
index 6d7a321..74c20a6 100644
--- a/src/library/tools/po/R-ru.po
+++ b/src/library/tools/po/R-ru.po
@@ -9,16 +9,18 @@ msgid ""
 msgstr ""
 "Project-Id-Version: R 2.11.0\n"
 "Report-Msgid-Bugs-To: bugs.r-project.org\n"
-"POT-Creation-Date: 2014-01-26 09:09\n"
-"PO-Revision-Date: 2014-03-11 10:34-0600\n"
+"POT-Creation-Date: 2015-06-06 13:51\n"
+"PO-Revision-Date: 2016-04-05 18:06-0600\n"
 "Last-Translator: Alexey Shipunov <dactylorhiza at gmail.com>\n"
 "Language-Team: Russian\n"
-"Language: \n"
+"Language: ru\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=KOI8-R\n"
 "Content-Transfer-Encoding: 8bit\n"
-"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n"
-"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
+"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
+
+msgid "Checking %s"
+msgstr "�������� %s"
 
 msgid "argument 'package' must be of length 1"
 msgstr "�������� 'package' ������ ���� ��������� �����"
@@ -56,10 +58,8 @@ msgstr "
 msgid "directory '%s' does not contain Rd objects"
 msgstr "����� '%s' �� �������� Rd-��������"
 
-msgid ""
-"Functions or methods with usage in documentation object '%s' but not in code:"
-msgstr ""
-"������� ��� ������ ������������ � ������� ������������ '%s', �� �� � ����:"
+msgid "Functions or methods with usage in documentation object '%s' but not in code:"
+msgstr "������� ��� ������ ������������ � ������� ������������ '%s', �� �� � ����:"
 
 msgid "Data with usage in documentation object '%s' but not in code:"
 msgstr "������ ������������ � ������� ������������ '%s', �� �� � ����:"
@@ -110,8 +110,7 @@ msgid "Duplicated \\argument entries in documentation object '%s':"
 msgstr "������� ������ \\���������� � ������� ������������ '%s':"
 
 msgid "Documented arguments not in \\usage in documentation object '%s':"
-msgstr ""
-"����������������� ��������� �� \\������������ � ������� ������������ '%s':"
+msgstr "����������������� ��������� �� \\������������ � ������� ������������ '%s':"
 
 msgid "Objects in \\usage without \\alias in documentation object '%s':"
 msgstr "������� \\������������ ��� \\���������� � ������� ������������ '%s':"
@@ -120,8 +119,7 @@ msgid "Assignments in \\usage in documentation object '%s':"
 msgstr "���������� � \\usage � ������� ������������ '%s':"
 
 msgid "Bad \\usage lines found in documentation object '%s':"
-msgstr ""
-"������� ������������ \\������������� ����� � ������� ������������ '%s':"
+msgstr "������� ������������ \\������������� ����� � ������� ������������ '%s':"
 
 msgid "S3 methods shown with full name in documentation object '%s':"
 msgstr "������ S3 �������� � ������ ������ � �������� ������������ '%s':"
@@ -158,16 +156,10 @@ msgid "found T/F in %s"
 msgstr "������ T/F � %s"
 
 msgid "package name '%s' seems invalid; using directory name '%s' instead"
-msgstr ""
-"������, ��� ��� ������ '%s' ������������; ������ ���� ��������� ��� ����� "
-"'%s'"
+msgstr "������, ��� ��� ������ '%s' ������������; ������ ���� ��������� ��� ����� '%s'"
 
-msgid ""
-"Vignette dependencies (%s entries) must be contained in the DESCRIPTION "
-"Depends/Suggests/Imports entries."
-msgstr ""
-"����������� ������ (%s ��������) ������ ����������� � ������� 'Depends/"
-"Suggests/Imports' ����� DESCRIPTION."
+msgid "Vignette dependencies (%s entries) must be contained in the DESCRIPTION Depends/Suggests/Imports entries."
+msgstr "����������� ������ (%s ��������) ������ ����������� � ������� 'Depends/Suggests/Imports' ����� DESCRIPTION."
 
 msgid "Malformed package name"
 msgstr "������ ��� ������"
@@ -194,18 +186,13 @@ msgid "Malformed maintainer field."
 msgstr "����� �������������� ���� ������������."
 
 msgid "Malformed Depends or Suggests or Imports or Enhances field."
-msgstr ""
-"����� �������������� ���� Depends, ��� Suggests, ��� Imports, ��� Enhances."
+msgstr "����� �������������� ���� Depends, ��� Suggests, ��� Imports, ��� Enhances."
 
 msgid "Offending entries:"
 msgstr "������������ ������:"
 
-msgid ""
-"Entries must be names of packages optionally followed by '<=' or '>=', white "
-"space, and a valid version number in parentheses."
-msgstr ""
-"������ ������ ���� ������� �������, ��������, � ������������ '<=' ��� '>=', "
-"��������, � ���������� ������� ������ � �������."
+msgid "Entries must be names of packages optionally followed by '<=' or '>=', white space, and a valid version number in parentheses."
+msgstr "������ ������ ���� ������� �������, ��������, � ������������ '<=' ��� '>=', ��������, � ���������� ������� ������ � �������."
 
 msgid "Entries with infeasible comparison operator:"
 msgstr "������ � ���������������� ���������� ���������:"
@@ -216,37 +203,29 @@ msgstr "
 msgid "Entries with infeasible version number:"
 msgstr "������ � ���������������� ������� ������:"
 
-msgid ""
-"Version numbers must be sequences of at least two non-negative integers, "
-"separated by single '.' or '-'."
-msgstr ""
-"������ ������ ������ ���� �������������������� �� ������� ���� ���� "
-"��������������� �����, ����������� ����� ������ ��� �������."
+msgid "Version numbers must be sequences of at least two non-negative integers, separated by single '.' or '-'."
+msgstr "������ ������ ������ ���� �������������������� �� ������� ���� ���� ��������������� �����, ����������� ����� ������ ��� �������."
 
-#, fuzzy
 msgid "Invalid VignetteBuilder field."
-msgstr "������������ ���� ����������."
+msgstr "������������ ���� VignetteBuilder."
 
-msgid ""
-"This field must contain one or more packages (and no version requirement)."
-msgstr ""
+msgid "This field must contain one or more packages (and no version requirement)."
+msgstr "��� ���� ������ �������� ���� ��� ������ ����� (� �� �������� ���������� ������)."
 
 msgid "Invalid Priority field."
 msgstr "������������ ���� ����������."
 
-msgid ""
-"Packages with priorities 'base' or 'recommended' or 'defunct-base' must "
-"already be known to R."
-msgstr ""
-"������ � ������������ 'base' ��� 'recommended' ��� 'defunct-base' ������ "
-"���� ��� �������� R."
+msgid "Packages with priorities 'base' or 'recommended' or 'defunct-base' must already be known to R."
+msgstr "������ � ������������ 'base' ��� 'recommended' ��� 'defunct-base' ������ ���� ��� �������� R."
 
-msgid ""
-"See the information on DESCRIPTION files in section 'Creating R packages' of "
-"the 'Writing R Extensions' manual."
-msgstr ""
-"��. ���������� � ������ DESCRIPTION � ������  'Creating R �����s' "
-"����������� 'Writing R Extensions'."
+msgid "Malformed Title field: should not end in a period."
+msgstr "������������ ���� Title: �� ������ ��������� ������."
+
+msgid "Malformed Description field: should contain one or more complete sentences."
+msgstr "������������ ���� Description: ������ �������� ���� ��� ������ ������ �����������."
+
+msgid "See section 'The DESCRIPTION file' in the 'Writing R Extensions' manual."
+msgstr "��. ������ 'The DESCRIPTION file' ����������� 'Writing R Extensions'."
 
 msgid "Malformed Authors at R field:"
 msgstr "����� �������������� ���� Authors at R:"
@@ -263,9 +242,11 @@ msgstr "
 msgid "Cannot extract Maintainer field from Authors at R field:"
 msgstr "�� ���� ������ ���� Maintainer �� ���� Authors at R:"
 
-msgid "Authors at R field gives no person with maintainer role and email address."
-msgstr ""
-"� ���� Authors at R ��� ������ � ���� ������������ � ������� ����������� �����."
+msgid "Authors at R field gives more than one person with maintainer role:"
+msgstr "� ���� Authors at R -- ������ ������ �������� � ����� ���������������:"
+
+msgid "Authors at R field gives no person with maintainer role, valid email address and non-empty name."
+msgstr "� ���� Authors at R ��� ������ � ���� ���������������, � ������� ����������� ����� � �������� ������."
 
 msgid "Encoding '%s' is not portable"
 msgstr "��������� '%s' �� ����������"
@@ -283,40 +264,31 @@ msgid "Standardized license specification:"
 msgstr "����������������� ������������ ��������:"
 
 msgid "Deprecated license: %s"
-msgstr ""
+msgstr "���������� �������� %s"
 
 msgid "Invalid license file pointers: %s"
 msgstr "������������ ��������� ����� ��������: %s"
 
-#, fuzzy
 msgid "License components with restrictions not permitted:"
-msgstr "���������� � ������������� �� ���������:"
+msgstr "���������� �������� � ������������� �� ���������:"
 
 msgid "License components which are templates and need '+ file LICENSE':"
-msgstr ""
+msgstr "���������� ��������, ���������� ���������, � ����� '+ file LICENSE':"
 
 msgid "Non-portable flags in variable '%s':"
 msgstr "������������� ����� � ���������� '%s':"
 
 msgid "Variables overriding user/site settings:"
-msgstr ""
+msgstr "���������� ������������ ���������������� ���������:"
 
-msgid ""
-"package %s exists but was not installed under R >= 2.10.0 so xrefs cannot be "
-"checked"
-msgstr ""
-"����� %s � �������, �� �� ��� ���������� ��� R >= 2.10.0, ������� xrefs �� "
-"����� ���� ���������"
+msgid "package %s exists but was not installed under R >= 2.10.0 so xrefs cannot be checked"
+msgstr "����� %s � �������, �� �� ��� ���������� ��� R >= 2.10.0, ������� xrefs �� ����� ���� ���������"
 
 msgid "Missing link or links in documentation object '%s':"
 msgstr "����������� ����� ��� ����� � �������� ������������ '%s':"
 
-msgid ""
-"See the information in section 'Cross-references' of the 'Writing R "
-"Extensions' manual."
-msgstr ""
-"��. ���������� � ������ 'Cross-references' ����������� 'Writing R "
-"Extensions'."
+msgid "See section 'Cross-references' in the 'Writing R Extensions' manual."
+msgstr "��. ������ 'Cross-references' ����������� 'Writing R Extensions'."
 
 msgid "File %s:"
 msgstr "���� %s:"
@@ -327,19 +299,14 @@ msgstr "
 msgid "%s calls:"
 msgstr "%s ��������:"
 
-msgid ""
-"Package startup functions should have two arguments with names starting with "
-"%s and %s, respectively."
-msgstr ""
-"��������� ������� ������ ������ ����� ��� ��������� � �������, ������������� "
-"� %s � %s, ��������������."
+msgid "Package startup functions should have two arguments with names starting with %s and %s, respectively."
+msgstr "��������� ������� ������ ������ ����� ��� ��������� � �������, ������������� � %s � %s, ��������������."
 
 msgid "Package startup functions should not change the search path."
 msgstr "��������� ������� ������ �� ������ ������ ���� ������."
 
 msgid "Package startup functions should use %s to generate messages."
-msgstr ""
-"��������� ������� ������ ������ ������������ %s ��� �������� ���������."
+msgstr "��������� ������� ������ ������ ������������ %s ��� �������� ���������."
 
 msgid "Package startup functions should not call %s."
 msgstr "��������� ������� ������ �� ������ �������� %s."
@@ -347,12 +314,8 @@ msgstr "
 msgid "See section %s in '%s'."
 msgstr "��. ������ %s � '%s'."
 
-msgid ""
-"Package detach functions should have one arguments with names starting with "
-"%s."
-msgstr ""
-"������� ������������ ������ ������ ����� ���� �������� � ������, "
-"������������ � %s."
+msgid "Package detach functions should have one argument with name starting with %s."
+msgstr "������� ������������ ������ ������ ����� ���� �������� � ������, ������������ � %s."
 
 msgid "Package detach functions should not call %s."
 msgstr "������� ������������ ������ �� ������ �������� %s."
@@ -378,57 +341,65 @@ msgstr "
 msgid "'library' or 'require' call not declared from: %s"
 msgstr "�� �������� ����� 'library' ��� 'require' �� %s"
 
-#, fuzzy
+msgid "'loadNamespace' or 'requireNamespace' calls not declared from:"
+msgstr "������ 'loadNamespace' ��� 'requireNamespace' �� ���������� ��:"
+
+msgid "'loadNamespace' or 'requireNamespace' call not declared from: %s"
+msgstr "����� 'loadNamespace' ��� 'requireNamespace' �� ���������� ��: %s"
+
 msgid "'library' or 'require' calls to packages already attached by Depends:"
-msgstr "�� ��������� ������ 'library' ��� 'require' ��:"
+msgstr "'library' ��� 'require' �������� ������, ��� �������������� �� Depends:"
 
-#, fuzzy
-msgid ""
-"'library' or 'require' call to %s which was already attached by Depends."
-msgstr "�� �������� ����� 'library' ��� 'require' �� %s"
+msgid "'library' or 'require' call to %s which was already attached by Depends."
+msgstr "'library' ��� 'require' �������� %s, ��� �������������� �� Depends:"
+
+msgid "'library' or 'require' calls in package code:"
+msgstr "'library' ��� 'require' ������ � ���� ������:"
+
+msgid "'library' or 'require' call to %s in package code."
+msgstr "'library' ��� 'require' �������� %s � ���� ������."
 
 msgid "Namespaces in Imports field not imported from:"
-msgstr ""
+msgstr "������������ ���� � ���� imports �� �������� ��:"
 
-#, fuzzy
 msgid "Namespace in Imports field not imported from: %s"
-msgstr "����������� ����������� ���� �� ���������: %s"
+msgstr "������������ ���� � ���� Imports �� �������� ��: %s"
 
 msgid "Packages in Depends field not imported from:"
-msgstr ""
+msgstr "������ � ���� Depends �� �������� ��:"
 
 msgid "Package in Depends field not imported from: %s"
-msgstr ""
+msgstr "����� � ���� Depends �� ������� ��: %s"
 
 msgid "Missing or unexported objects:"
-msgstr ""
+msgstr "����������� ��� ������������������ �������:"
 
 msgid "Missing or unexported object: %s"
-msgstr ""
+msgstr "����������� ��� ������������������ ������: %s"
 
 msgid "':::' calls which should be '::':"
-msgstr ""
+msgstr "':::' ������ ������ ���� '::':"
 
 msgid "':::' call which should be '::': %s"
-msgstr ""
+msgstr "':::' ����� ������ ���� '::': %s"
 
 msgid "Missing objects imported by ':::' calls:"
-msgstr ""
+msgstr "����������� ������� �������� �������� ':::':"
 
 msgid "Missing object imported by a ':::' call: %s"
-msgstr ""
+msgstr "����������� ������ �������� ������� ':::': %s"
 
 msgid "Unexported objects imported by ':::' calls:"
-msgstr ""
+msgstr "������������������ ������ �������� �������� ':::':"
 
 msgid "Unexported object imported by a ':::' call: %s"
-msgstr ""
+msgstr "������������������ ������ �������� ������� ':::': %s"
 
 msgid "Unavailable namespaces imported from by ':::' calls:"
-msgstr ""
+msgstr "����������� ������������ ���� ��������� �������� ':::':"
 
 msgid "Unavailable namespace imported from by a ':::' call: %s"
-msgstr ""
+msgstr "����������� ������������ ���� ��������� ������� ':::': %s"
 
 msgid "'data(package=)' calls not declared from:"
 msgstr "'data(package=)' �� ��������� �:"
@@ -436,9 +407,8 @@ msgstr "'data(package=)' 
 msgid "'data(package=)' call not declared from: %s"
 msgstr "����� 'data(package=)' �� ��������: %s"
 
-#, fuzzy
 msgid "Package has no 'Version' field"
-msgstr "� ������ '%s' ��� .rda-������"
+msgstr "� ������ ��� ���� 'Version'"
 
 msgid "NB: need Internet access to use CRAN incoming checks"
 msgstr "NB: ��� �������� ����������� � CRAN ����� ������ � ��������"
@@ -453,9 +423,7 @@ msgid "Argument items with no description in Rd object '%s':"
 msgstr "����� ��������� ��� ����������� � Rd ������� '%s':"
 
 msgid "Auto-generated content requiring editing in Rd object '%s':"
-msgstr ""
-"�������������� ��������������� ���������� ������� �������������� � �������� "
-"Rd '%s':"
+msgstr "�������������� ��������������� ���������� ������� �������������� � �������� Rd '%s':"
 
 msgid "no Rd sections specified"
 msgstr "�� ������� ������� Rd"
@@ -473,8 +441,8 @@ msgstr ""
 "%s\n"
 "� NAMESPACE."
 
-msgid "argument 'file' must be a character string or connection"
-msgstr "�������� 'file' ������ ���� ��������� �������  ��� �����������"
+msgid "Rd object required"
+msgstr "����� Rd ������"
 
 msgid "missing/empty %s field in '%s'"
 msgstr "�����������/������ %s ���� � '%s'"
@@ -483,8 +451,7 @@ msgid "Rd files must have a non-empty %s."
 msgstr "Rd-����� ������ ����� �������� %s."
 
 msgid "See chapter 'Writing R documentation' in manual 'Writing R Extensions'."
-msgstr ""
-"��. ����� 'Writing R documentation' � ����������� 'Writing R Extensions'."
+msgstr "��. ����� 'Writing R documentation' � ����������� 'Writing R Extensions'."
 
 msgid "missing/empty \\title field in '%s'"
 msgstr "�����������/������ ���� \\��������� � '%s'"
@@ -504,6 +471,15 @@ msgstr "
 msgid "No help on %s found in RdDB %s"
 msgstr "�� ������� ������ %s � RdDB %s"
 
+msgid "'macros' must be TRUE or must specify existing macros"
+msgstr "'macros' ������ ���� TRUE ��� ������ ��������� ������������ ������"
+
+msgid "Macro file %s should only contain Rd macro definitions and comments"
+msgstr "����� ���� %s ������ �������� Rd ���������������� � �����������"
+
+msgid "No Rd macros in package '%s'."
+msgstr "� ������ '%s' ��� Rd �������."
+
 msgid "more than one \\examples section, using the first"
 msgstr "����� ��� ���� \\������ ��������, ��������� ������"
 
@@ -543,34 +519,32 @@ msgstr "
 msgid "Only one Rd section per %s is supported."
 msgstr "�������������� ������ ���� ������ Rd �� %s."
 
-#, fuzzy
+msgid "DESCRIPTION file is for package '%s', not '%s'"
+msgstr "���� DESCRIPTION ��� ������ '%s', � �� ��� '%s'"
+
 msgid "Vignette product %s does not have a known filename extension (%s)"
-msgstr "�� ����� ���������� ���������� ����� ����� ("
+msgstr "������� ������ %s �� ����� ���������� ���������� ����� (%s)"
 
-msgid ""
-"Failed to locate the %s output file (by engine %s) for vignette with name "
-"%s. The following files exist in directory %s: %s"
-msgstr ""
+msgid "Failed to locate the %s output file (by engine %s) for vignette with name %s. The following files exist in directory %s: %s"
+msgstr "�� ������� ����� %s �������� ���� (����������� %s) ��� ������ � ������ %s. ��� ����� ����� ���� � ����� %s: %s"
 
-msgid ""
-"Located more than one %s output file (by engine %s) for vignette with name "
-"%s: %s"
-msgstr ""
+msgid "Located more than one %s output file (by engine %s) for vignette with name %s: %s"
+msgstr "������ ����� ��� ���� �������� ���� %s (����������� %s) ��� ������ � ������ %s: %s"
 
 msgid "unable to create temp directory %s"
 msgstr "�� ���� ������� ��������� ����� %s"
 
+msgid "Vignette '%s' is non-ASCII but has no declared encoding"
+msgstr "����� '%s' �� ASCII, �� ��������� �� �������"
+
 msgid "Running"
 msgstr "��������"
 
 msgid "Vignette %s overwrites the following %s output by vignette %s: %s"
-msgstr ""
+msgstr "����� %s ������������ ����� %s �� ������ %s: %s"
 
-#, fuzzy
-msgid ""
-"Detected vignette source files (%s) with shared names (%s) and therefore "
-"risking overwriting each others output files"
-msgstr ") � ������� ���� ���� ���������� ����� ������ ������"
+msgid "Detected vignette source files (%s) with shared names (%s) and therefore risking overwriting each others output files"
+msgstr "���������� �������� ����� ������ (%s) � ������ ������� (%s) � ������� ���� ���� ������������� �������� ������ ���� �����"
 
 msgid ""
 "processing vignette '%s' failed with diagnostics:\n"
@@ -593,14 +567,7 @@ msgid "file '%s' not found"
 msgstr "���� '%s' �� ������"
 
 msgid "vignette filename '%s' does not match any of the '%s' filename patterns"
-msgstr ""
-
-#, fuzzy
-msgid "Inconsistent encoding specifications:"
-msgstr "������������� ��������:"
-
-msgid "with %\\SweaveUTF8"
-msgstr ""
+msgstr "��� ����� ������ '%s' �� ������������� �������� �� '%s' ��������� ���� �����"
 
 msgid "In '%s' vignettes '%s' and '%s' have the same vignette name"
 msgstr "����� �������� '%s' '%s' � '%s' ����� ���������� �����"
@@ -608,40 +575,32 @@ msgstr "
 msgid "argument 'vignette' must be of length 1"
 msgstr "�������� 'vignette' ������ ���� ��������� �����"
 
-#, fuzzy
 msgid "Vignette engine package not specified"
-msgstr "����������� ������ �� ���������:"
+msgstr "�� ��������� ������ ������"
 
 msgid "Unsupported engine name"
 msgstr "���������������� ��� ����������"
 
-#, fuzzy
 msgid "None of packages %s have registered vignette engines"
-msgstr "����� ������������������ ���������� �������"
+msgstr "�� ���� �� ������� %s �� ����� ����������������� ������� �������"
 
-#, fuzzy
 msgid "Vignette engine %s is not registered"
-msgstr "����������� ������ �� ���������:"
+msgstr "������ ������ %s �� ���������������"
 
-#, fuzzy
 msgid "Vignette engine %s is not registered by any of the packages %s"
-msgstr "�� ���������������� �� ����� �������"
+msgstr "������ ������ %s �� ��������������� �� ����� ������� %s"
 
-#, fuzzy
 msgid "Engine name %s and package %s do not match"
-msgstr "������ %s � ������ %s �� �������"
+msgstr "��� ������ %s � ����� %s �� ������������� ���� �����"
 
-#, fuzzy
 msgid "Argument %s must be a function and not %s"
-msgstr "������ ���� �������� � ��"
+msgstr "Argument %s must be a function and not %s"
 
-#, fuzzy
 msgid "Argument %s must be a character vector or NULL and not %s"
-msgstr "������ ���� ��������� ������� ��� NULL � ��"
+msgstr "�������� %s ������ ���� ��������� �������� ��� NULL � �� %s"
 
-#, fuzzy
 msgid "Cannot change the %s engine or use an engine of that name"
-msgstr "���������� ��� ������������� ���������� � ���� ������"
+msgstr "�� ���� �������� ������ %s ��� ������������ ������ � ���� ������"
 
 msgid "vignette builder '%s' not found"
 msgstr "������� ������ '%s' �� ������"
@@ -655,11 +614,8 @@ msgstr "*** 
 msgid "cannot open directory '%s'"
 msgstr "�� ���� ������� ����� '%s'"
 
-msgid ""
-"WARNING: omitting pointless dependence on 'R' without a version requirement"
-msgstr ""
-"��������������: ��������� ������������� ����������� �� 'R' ��� �������� "
-"��������� ������"
+msgid "WARNING: omitting pointless dependence on 'R' without a version requirement"
+msgstr "��������������: ��������� ������������� ����������� �� 'R' ��� �������� ��������� ������"
 
 msgid "cannot turn off locale-specific sorting via LC_COLLATE"
 msgstr "�� ���� �������� ������-����������� ���������� ����� LC_COLLATE"
@@ -715,31 +671,25 @@ msgid "loading failed"
 msgstr "�������� �� �������"
 
 msgid "assertConditon: Successfully caught a condition"
-msgstr ""
-
-msgid "assertCondition: caught %s"
-msgstr ""
-
-msgid ","
-msgstr ","
+msgstr "assertConditon: ������� ������� ���������"
 
 msgid "Got %s in evaluating %s; wanted %s"
-msgstr ""
+msgstr "������� %s �������� %s; ����� %s"
 
 msgid "Failed to get %s in evaluating %s"
-msgstr ""
+msgstr "�� ������� �������� %s �������� %s"
 
 msgid "Failed to get error in evaluating %s"
-msgstr ""
+msgstr "�� ������� �������� ������, �������� %s"
 
 msgid "Asserted error: %s"
-msgstr ""
+msgstr "������������ ������: %s"
 
 msgid "Got warning in evaluating %s, but also an error"
-msgstr ""
+msgstr "������� ��������������, �������� %s, �� ��� � ������"
 
 msgid "Asserted warning: %s"
-msgstr ""
+msgstr "������������ ��������������: %s"
 
 msgid "Changes require specified 'style'"
 msgstr "��������� ������� ������������� 'style'"
@@ -786,9 +736,6 @@ msgstr "
 msgid "downloading %s ..."
 msgstr "�������� %s ..."
 
-msgid "installing dependencies %s"
-msgstr "������������ ����������� %s"
-
 msgid "checking %s ..."
 msgstr "�������� %s..."
 
@@ -828,18 +775,15 @@ msgstr "
 msgid "No docs found for package %s"
 msgstr "�� ���� ����� ������������ ��� ������ %s"
 
-msgid ""
-"Only help files, %s, %s and files under %s and %s in a package can be viewed"
-msgstr ""
-"������ ����� ������, %s, %s � ����� ������ %s � %s � ������ ����� ���� "
-"�����������"
+msgid "URL %s was not found"
+msgstr "URL %s �� ������"
+
+msgid "Only help files, %s, %s and files under %s and %s in a package can be viewed"
+msgstr "������ ����� ������, %s, %s � ����� ������ %s � %s � ������ ����� ���� �����������"
 
 msgid "unsupported URL %s"
 msgstr "���������������� URL %s"
 
-msgid "URL %s was not found"
-msgstr "URL %s �� ������"
-
 msgid "httpd server disabled by R_DISABLE_HTTPD"
 msgstr "������ httpd �������� ����� R_DISABLE_HTTPD"
 
@@ -870,31 +814,23 @@ msgstr "
 msgid "this seems to be a bundle -- and they are defunct"
 msgstr "������, ��� ��� ������� -- ��� ���������"
 
-msgid ""
-"'cleanup' exists but is not executable -- see the 'R Installation and "
-"Administration Manual'"
-msgstr ""
-"'cleanup' ����, �� ��� ���������� ���������  -- �������� 'R Installation and "
-"Adminstration Manual'"
+msgid "'cleanup' exists but is not executable -- see the 'R Installation and Administration Manual'"
+msgstr "'cleanup' ����, �� ��� ���������� ���������  -- �������� 'R Installation and Adminstration Manual'"
 
 msgid "generating debug symbols (%s)"
 msgstr "������ ������� ������� (%s)"
 
-#, fuzzy
 msgid "no DLL was created"
-msgstr "���� '%s' �� ������"
+msgstr "DLL �� ������"
 
 msgid "package %s successfully unpacked and MD5 sums checked"
 msgstr "����� %s ������ ����������, MD5 sums ���������"
 
-msgid ""
-"R include directory is empty -- perhaps need to install R-devel.rpm or "
-"similar"
-msgstr ""
-"���������� ����� R ����� -- ��������, ���� ���������� R-devel.rpm ��� �������"
+msgid "R include directory is empty -- perhaps need to install R-devel.rpm or similar"
+msgstr "���������� ����� R ����� -- ��������, ���� ���������� R-devel.rpm ��� �������"
 
 msgid "package %s %s was found, but %s %s is required by %s"
-msgstr ""
+msgstr "����� %s %s �� ������ �� %s %s ����� ��� %s"
 
 msgid "no source files found"
 msgstr "�� ������� ������ ����������"
@@ -923,6 +859,15 @@ msgstr "
 msgid "building a fake installation is disallowed"
 msgstr "������ ������ ��������� �� �����������"
 
+msgid ""
+"See\n"
+"  %s\n"
+"for details."
+msgstr ""
+"����������� ��. �\n"
+"  %s\n"
+"."
+
 msgid "there is no package called '%s'"
 msgstr "��� ������ �� ����� '%s'"
 
@@ -942,8 +887,7 @@ msgid "source must be an environment or a list"
 msgstr "�������� ������ ���� ���������� ��� �������"
 
 msgid "invalid value for 'compress': should be FALSE, TRUE, 2 or 3"
-msgstr ""
-"�������� �������� ��� 'compress': ����� ���� ���� �� FALSE, TRUE, 2 ��� 3"
+msgstr "�������� �������� ��� 'compress': ����� ���� ���� �� FALSE, TRUE, 2 ��� 3"
 
 msgid "this cannot be used for package 'base'"
 msgstr "��� ������ ������������ ��� ������ 'base'"
@@ -965,8 +909,7 @@ msgid "No news found in given file using old-style R-like format."
 msgstr "� ������������ �������, ������� �� ������ R, ��� ��������."
 
 msgid "No news found in given file using package default format."
-msgstr ""
-"� ���������� ����� ��� ��������, ���� ������������ ������ �� ���������."
+msgstr "� ���������� ����� ��� ��������, ���� ������������ ������ �� ���������."
 
 msgid "Could not extract news from the following text chunks:"
 msgstr "�� ���� �������� ������� �� ��������� ��������� ������:"
@@ -981,9 +924,6 @@ msgstr ""
 msgid "Cannot extract version info from the following section titles:"
 msgstr "�� ���� �������� ���������� � ������ �� ��������� ���������� ������:"
 
-msgid "%s"
-msgstr "%s"
-
 msgid ""
 "Malformed NEWS.Rd file:\n"
 "Chunk starting\n"
@@ -1113,9 +1053,6 @@ msgstr "
 msgid "testing '%s' failed"
 msgstr "������������ '%s' �� �������"
 
-msgid "%d of the package tests failed"
-msgstr ""
-
 msgid "Testing examples for package %s"
 msgstr "�������� ������� � ������ %s"
 
@@ -1185,11 +1122,8 @@ msgstr "
 msgid "unable to run %s on '%s'"
 msgstr "�� ���� ��������� %s �� '%s'"
 
-msgid "cannot coerce"
-msgstr "������ ���������"
-
-msgid "to logical"
-msgstr "� ����������"
+msgid "cannot coerce %s to logical"
+msgstr "������ ��������� %s � ���������� ���"
 
 msgid "File 'DESCRIPTION' is missing."
 msgstr "���� 'DESCRIPTION' ��������."
@@ -1215,6 +1149,9 @@ msgstr "
 msgid "Call sequence:"
 msgstr "������������������ ������:"
 
+msgid "'text' must be a character vector"
+msgstr "'text' ������ ���� ��������� ��������"
+
 msgid "parsing '%s'"
 msgstr "������ '%s'"
 
@@ -1266,16 +1203,11 @@ msgstr[0] "
 msgstr[1] "������� ��������� ���������� T ��� F � ��������� ��������:"
 msgstr[2] "������� ��������� ���������� T ��� F � ��������� ��������:"
 
-msgid ""
-"Found possibly global 'T' or 'F' in the examples of the following Rd file:"
-msgid_plural ""
-"Found possibly global 'T' or 'F' in the examples of the following Rd files:"
-msgstr[0] ""
-"������� ��������� ���������� 'T' ��� 'F' � ��������� Rd-����� ��������:"
-msgstr[1] ""
-"������� ��������� ���������� 'T' ��� 'F' � ��������� Rd-������ ��������:"
-msgstr[2] ""
-"������� ��������� ���������� 'T' ��� 'F' � ��������� Rd-������ ��������:"
+msgid "Found possibly global 'T' or 'F' in the examples of the following Rd file:"
+msgid_plural "Found possibly global 'T' or 'F' in the examples of the following Rd files:"
+msgstr[0] "������� ��������� ���������� 'T' ��� 'F' � ��������� Rd-����� ��������:"
+msgstr[1] "������� ��������� ���������� 'T' ��� 'F' � ��������� Rd-������ ��������:"
+msgstr[2] "������� ��������� ���������� 'T' ��� 'F' � ��������� Rd-������ ��������:"
 
 msgid "Found a .Internal call in the following function:"
 msgid_plural "Found .Internal calls in the following functions:"
@@ -1290,41 +1222,28 @@ msgstr[1] "
 msgstr[2] "������� ������ .Internal � ������� ��������� S4-����� �������:"
 
 msgid "Found a .Internal call in methods for the following reference class:"
-msgid_plural ""
-"Found .Internal calls in methods for the following reference classes:"
+msgid_plural "Found .Internal calls in methods for the following reference classes:"
 msgstr[0] "������ ����� .Internal � ������� ���������� ������ ������:"
 msgstr[1] "������� ������ .Internal � ������� ��������� ������� ������:"
 msgstr[2] "������� ������ .Internal � ������� ��������� ������� ������:"
 
-#, fuzzy
 msgid "Found an obsolete/platform-specific call in the following function:"
-msgid_plural ""
-"Found an obsolete/platform-specific call in the following functions:"
-msgstr[0] "������ ���������� ����� � ��������� �������:"
-msgstr[1] "������� ���������� ������ � ��������� ��������:"
-msgstr[2] "������� ���������� ������ � ��������� ��������:"
-
-#, fuzzy
-msgid ""
-"Found an obsolete/platform-specific call in methods for the following S4 "
-"generic:"
-msgid_plural ""
-"Found an obsolete/platform-specific call in methods for the following S4 "
-"generics:"
-msgstr[0] "������ ���������� ����� � ������� ��������� S4-����� �������:"
-msgstr[1] "������� ���������� ������ � ������� ��������� S4-����� �������:"
-msgstr[2] "������� ���������� ������ � ������� ��������� S4-����� �������:"
-
-#, fuzzy
-msgid ""
-"Found an obsolete/platform-specific call in methods for the following "
-"reference class:"
-msgid_plural ""
-"Found an obsolete/platform-specific call in methods for the following "
-"reference classes:"
-msgstr[0] "������ ���������� ����� � ������� ���������� ������ ������:"
-msgstr[1] "������� ���������� ������ � ������� ��������� ������� ������:"
-msgstr[2] "������� ���������� ������ � ������� ��������� ������� ������:"
+msgid_plural "Found an obsolete/platform-specific call in the following functions:"
+msgstr[0] "������ ����������/������������� ��� ��������� ����� � ��������� �������:"
+msgstr[1] "������ ����������/������������� ��� ��������� ����� � ��������� ��������:"
+msgstr[2] "������ ����������/������������� ��� ��������� ����� � ��������� ��������:"
+
+msgid "Found an obsolete/platform-specific call in methods for the following S4 generic:"
+msgid_plural "Found an obsolete/platform-specific call in methods for the following S4 generics:"
+msgstr[0] "������ ����������/������������� ��� ��������� ����� � ������� ��������� S4-����� �������:"
+msgstr[1] "������ ����������/������������� ��� ��������� ����� � ������� ��������� S4-����� �������:"
+msgstr[2] "������ ����������/������������� ��� ��������� ����� � ������� ��������� S4-����� �������:"
+
+msgid "Found an obsolete/platform-specific call in methods for the following reference class:"
+msgid_plural "Found an obsolete/platform-specific call in methods for the following reference classes:"
+msgstr[0] "������ ����������/������������� ��� ��������� ����� � ������� ���������� ������ ������:"
+msgstr[1] "������ ����������/������������� ��� ��������� ����� � ������� ��������� ������� ������:"
+msgstr[2] "������ ����������/������������� ��� ��������� ����� � ������� ��������� ������� ������:"
 
 msgid "Found the deprecated function:"
 msgid_plural "Found the deprecated functions:"
@@ -1340,9 +1259,9 @@ msgstr[2] "
 
 msgid "Found the platform-specific device:"
 msgid_plural "Found the platform-specific devices:"
-msgstr[0] ""
-msgstr[1] ""
-msgstr[2] ""
+msgstr[0] "����� ����������� ��� ��������� ����������:"
+msgstr[1] "����� ����������� ��� ��������� ����������:"
+msgstr[2] "����� ����������� ��� ��������� ����������:"
 
 msgid "Generic without any methods in %s: %s"
 msgid_plural "Generics without any methods in %s: %s"
@@ -1351,19 +1270,24 @@ msgstr[1] "
 msgstr[2] "����� ������� ��� �����-���� ������� � %s: %s"
 
 msgid ""
-"missing/empty \\name field in Rd file\n"
+"missing/empty \\n"
+"ame field in Rd file\n"
 "%s"
 msgid_plural ""
-"missing/empty \\name field in Rd files\n"
+"missing/empty \\n"
+"ame field in Rd files\n"
 "%s"
 msgstr[0] ""
-"�����������/������ \\n���� ����� � Rd-�����\n"
+"�����������/������ \\n"
+"���� ����� � Rd-�����\n"
 "%s"
 msgstr[1] ""
-"�����������/������ \\n���� ����� � Rd-������\n"
+"�����������/������ \\n"
+"���� ����� � Rd-������\n"
 "%s"
 msgstr[2] ""
-"�����������/������ \\n���� ����� � Rd-������\n"
+"�����������/������ \\n"
+"���� ����� � Rd-������\n"
 "%s"
 
 msgid "unable to re-encode %s line %s"
@@ -1372,12 +1296,11 @@ msgstr[0] "
 msgstr[1] "�� ���� �������������� %s ������ %s"
 msgstr[2] "�� ���� �������������� %s ������ %s"
 
-#, fuzzy
 msgid "Required field missing or empty:"
 msgid_plural "Required fields missing or empty:"
-msgstr[0] "��������� ����������� ����::"
-msgstr[1] "��������� ����������� ����::"
-msgstr[2] "��������� ����������� ����::"
+msgstr[0] "��������� ���� ��������� ��� �����:"
+msgstr[1] "��������� ���� ��������� ��� �����:"
+msgstr[2] "��������� ���� ��������� ��� �����:"
 
 msgid "Help on topic '%s' was found in the following package:"
 msgid_plural "Help on topic '%s' was found in the following packages:"
@@ -1391,91 +1314,101 @@ msgstr[0] "
 msgstr[1] "������� %s ������� ������ ��� �� ���� ����� ������"
 msgstr[2] "������� %s ������� ������ ��� �� ���� ����� ������"
 
+msgid "%d of the package tests failed"
+msgid_plural "%d of the package tests failed"
+msgstr[0] "%d �� ����� ������ �� �������"
+msgstr[1] "%d �� ����� ������ �� �������"
+msgstr[2] "%d �� ����� ������ �� �������"
+
+#~ msgid "Reading %s failed with message: %s"
+#~ msgstr "������ %s �� ������� � ����������: %s"
+#~ msgid "assertCondition: caught %s"
+#~ msgstr "assertCondition: ��������� %s"
+#~ msgid ","
+#~ msgstr ","
+#~ msgid "installing dependencies %s"
+#~ msgstr "������������ ����������� %s"
+#~ msgid "%s"
+#~ msgstr "%s"
+#~ msgid ":"
+#~ msgstr ":"
+#~ msgid "latin1"
+#~ msgstr "latin1"
+#~ msgid "ASCII"
+#~ msgstr "ASCII"
+#~ msgid "byte"
+#~ msgstr "����"
+
+#, fuzzy
+#~ msgid "Undeclared package used in Rd xrefs:"
+#~ msgid_plural "Undeclared packages used in Rd xrefs:"
+#~ msgstr[0] "����������� ����� %s � Rd xrefs"
+#~ msgstr[1] "����������� ������ %s � Rd xrefs"
+#~ msgstr[2] "����������� ������ %s � Rd xrefs"
+
+#, fuzzy
+#~ msgid "Inconsistent encoding specifications: %s with %%\\SweaveUTF8"
+#~ msgstr "������������� ��������:"
+#~ msgid "argument 'file' must be a character string or connection"
+#~ msgstr "�������� 'file' ������ ���� ��������� �������  ��� �����������"
+#~ msgid "to logical"
+#~ msgstr "� ����������"
 #~ msgid "Vignette product"
 #~ msgstr "������� ���������"
-
 #~ msgid ")"
 #~ msgstr ")"
-
 #~ msgid "Failed to locate the"
 #~ msgstr "�� ���� �����"
-
 #~ msgid "output file (by engine"
 #~ msgstr "���� ������ (� ������������ � �����������"
-
 #~ msgid "%s::%s"
 #~ msgstr "%s::%s"
-
 #~ msgid ") for vignette with name"
 #~ msgstr ") ��� ������ � ������"
-
 #~ msgid ". The following files exists in directory"
 #~ msgstr ". ��������� ����� ���� � �����"
-
-#~ msgid ":"
-#~ msgstr ":"
-
 #~ msgid "Located more than one"
 #~ msgstr "����� ������ ������"
-
 #~ msgid "Vignette"
 #~ msgstr "���������"
-
 #~ msgid "overwrites the following"
 #~ msgstr "������������ ���������"
-
 #~ msgid "output by vignette"
 #~ msgstr "����� ������"
-
 #~ msgid "Detected vignette source files ("
 #~ msgstr "���������� ��������� ������ ("
-
 #~ msgid ") with shared names ("
 #~ msgstr ") � ������ ������� ("
-
 #~ msgid "None of packages"
 #~ msgstr "�� ���� �� �������"
-
 #~ msgid "Vignette engine"
 #~ msgstr "���������� ������"
-
 #~ msgid "is not registered"
 #~ msgstr "�� ����������������"
-
 #~ msgid "Engine name"
 #~ msgstr "��� ����������"
-
 #~ msgid "and package"
 #~ msgstr "� �����"
-
 #~ msgid "do not match"
 #~ msgstr "�� �������������"
-
 #~ msgid "Argument"
 #~ msgstr "��������"
-
 #~ msgid "weave"
 #~ msgstr "weave"
-
 #~ msgid "tangle"
 #~ msgstr "tangle"
-
 #~ msgid "pattern"
 #~ msgstr "�������"
-
 #~ msgid "Cannot change the"
 #~ msgstr "�� ���� �������� ����"
-
 #~ msgid "Sweave"
 #~ msgstr "Sweave"
-
 #~ msgid "'file' must be a character string or connection"
 #~ msgstr "'file' ������ ���� ��������� ������� ��� �����������"
 
 #, fuzzy
 #~ msgid "not found"
 #~ msgstr "�� ������"
-
 #~ msgid "found %s"
 #~ msgstr "������ %s"
 
@@ -1526,231 +1459,164 @@ msgstr[2] "
 #~ "������� ��������� ���������� T ��� F � ��������� Rd-������ ��������:"
 #~ msgstr[2] ""
 #~ "������� ��������� ���������� T ��� F � ��������� Rd-������ ��������:"
-
 #~ msgid "name"
 #~ msgstr "���"
-
 #~ msgid "code"
 #~ msgstr "���"
-
 #~ msgid "docs"
 #~ msgstr "���������"
 
 #, fuzzy
 #~ msgid "\\VignetteDepends{}"
 #~ msgstr "���������:"
-
 #~ msgid "Invalid package name."
 #~ msgstr "������������ ��� ������."
-
 #~ msgid "This is the name of a base package."
 #~ msgstr "��� ��� �������� ������."
-
 #~ msgid "This name was used for a base package and is remapped by library()."
 #~ msgstr ""
-#~ "��� ��� ������������ ������� ������� � ������� ������ ����������� library"
-#~ "()."
-
+#~ "��� ��� ������������ ������� ������� � ������� ������ ����������� "
+#~ "library()."
 #~ msgid "package must be loaded"
 #~ msgstr "������ ���� �������� �����"
-
 #~ msgid "lib"
 #~ msgstr "lib"
-
 #~ msgid "pkg"
 #~ msgstr "pkg"
-
 #~ msgid "packageStartupMessage"
 #~ msgstr "packageStartupMessage"
-
 #~ msgid "installed.packages"
 #~ msgstr "installed.packages"
-
 #~ msgid "Good practice"
 #~ msgstr "������ �������"
 
 #, fuzzy
 #~ msgid "\\name"
 #~ msgstr "���"
-
 #~ msgid "NEWS"
 #~ msgstr "�������"
-
 #~ msgid "DESCRIPTION"
 #~ msgstr "��������"
-
 #~ msgid "doc/"
 #~ msgstr "doc/"
-
 #~ msgid "demo/"
 #~ msgstr "demo/"
-
 #~ msgid "file"
 #~ msgstr "����"
-
 #~ msgid "%s (%s)"
 #~ msgstr "%s (%s)"
-
 #~ msgid "ssname"
 #~ msgstr "ssname"
-
 #~ msgid "language"
 #~ msgstr "����"
-
 #~ msgid "processing"
 #~ msgstr "�����������"
 
 #, fuzzy
 #~ msgid "package directory"
 #~ msgstr "���������� �������"
-
 #~ msgid "Unrecognized search field:"
 #~ msgstr "����������� ���� ������:"
-
 #~ msgid "ERROR:"
 #~ msgstr "������:"
-
 #~ msgid "running 'zip' failed"
 #~ msgstr "�� ������ ������ 'zip'"
-
 #~ msgid "packaged installation of"
 #~ msgstr "�������� ���������"
-
 #~ msgid "as"
 #~ msgstr "���"
-
 #~ msgid "installing via 'install.libs.R' to"
 #~ msgstr "����������� ����� 'install.libs.R' �"
-
 #~ msgid "installing to"
 #~ msgstr "������������ �"
 
 #, fuzzy
 #~ msgid "running 'src/Makefile.win' ..."
 #~ msgstr "�������� src/Makefile.win ..."
-
 #~ msgid "only one architecture so ignoring '--merge-multiarch'"
 #~ msgstr "������ ���� �����������, ��� ��� ��������� '--merge-multiarch'"
-
 #~ msgid "ERROR: failed to lock directory"
 #~ msgstr "������: �� ������� ������������� �����"
-
 #~ msgid ""
 #~ "for modifying\n"
 #~ "Try removing"
 #~ msgstr ""
 #~ "��� �����������\n"
 #~ "������� �����������"
-
 #~ msgid "ERROR: failed to create lock directory"
 #~ msgstr "������: �� ������� ������� ������������� �����"
-
 #~ msgid "finding HTML links ..."
 #~ msgstr "������ ������ HTML..."
-
 #~ msgid "finding level-2 HTML links ..."
 #~ msgstr "������ ������ HTML ������� ������..."
-
 #~ msgid "Internal error, no tag"
 #~ msgstr "���������� ������, ���� ���"
-
 #~ msgid "Internal error:  NULL tag"
 #~ msgstr "���������� ������:  ��� NULL"
-
 #~ msgid "internal error"
 #~ msgstr "���������� ������"
-
 #~ msgid "Inconsistent arg count for"
 #~ msgstr "����������������� �������� ������ �"
-
 #~ msgid "Entry for"
 #~ msgstr "���� ���"
-
 #~ msgid "="
 #~ msgstr "="
-
 #~ msgid "already defined to be"
 #~ msgstr "��� ��������� ����"
-
 #~ msgid "found encoding"
 #~ msgstr "������� ���������"
-
 #~ msgid "cannot be opened"
 #~ msgstr "������ �������"
-
 #~ msgid "comparing"
 #~ msgstr "���������"
-
 #~ msgid "to"
 #~ msgstr "�"
-
 #~ msgid "..."
 #~ msgstr "..."
-
 #~ msgid "Comparing"
 #~ msgstr "���������"
-
 #~ msgid "creation of"
 #~ msgstr "��������"
-
 #~ msgid "failed"
 #~ msgstr "�� �������"
-
 #~ msgid "creating"
 #~ msgstr "������"
-
 #~ msgid "running code in"
 #~ msgstr "�������� ��� � "
-
 #~ msgid "running strict specific tests"
 #~ msgstr "�������� ����������������� �����"
-
 #~ msgid "running sloppy specific tests"
 #~ msgstr "�������� ������� �����"
-
 #~ msgid "running regression tests"
 #~ msgstr "�������� ������������� �����"
-
 #~ msgid "comparing 'reg-plot.ps' to 'reg-plot.ps.save' ..."
 #~ msgstr "��������� 'reg-plot.ps' � 'reg-plot.ps.save' ..."
-
 #~ msgid "running tests of plotting Latin-1"
 #~ msgstr "�������� ����� �� ��������� � Latin-1"
-
 #~ msgid "expect failure or some differences if not in a Latin or UTF-8 locale"
 #~ msgstr "�������� ������� ��� ������� ���� �� �� ������ Latin ��� UTF-8"
-
 #~ msgid "comparing 'reg-plot-latin1.ps' to 'reg-plot-latin1.ps.save' ..."
 #~ msgstr "��������� 'reg-plot-latin1.ps' � 'reg-plot-latin1.ps.save' ..."
-
 #~ msgid "running tests of consistency of as/is.*"
 #~ msgstr "�������� ����� �� ������������ as/is.*"
-
 #~ msgid "running tests of primitives"
 #~ msgstr "�������� ����� �� ���������"
-
 #~ msgid "running regexp regression tests"
 #~ msgstr "�������� ������������� ����� �� ���������� ���������"
-
 #~ msgid "running tests to possibly trigger segfaults"
 #~ msgstr "�������� ����� �� ��������� ������������ ������ �����������"
 
 #, fuzzy
 #~ msgid "not installing"
 #~ msgstr "������������ �"
-
 #~ msgid "Generics g in env ="
 #~ msgstr "����� 'g' � env ="
-
 #~ msgid "where hasMethods(g, env) errors:"
 #~ msgstr "��� ������ hasMethods(g, env):"
-
 #~ msgid "May need something like"
 #~ msgstr "��������, ���� ���-�� �����"
-
 #~ msgid "importFrom("
 #~ msgstr "importFrom("
-
 #~ msgid "in NAMESPACE."
 #~ msgstr "� NAMESPACE."
 
@@ -1773,59 +1639,43 @@ msgstr[2] "
 #, fuzzy
 #~ msgid "running xgettext failed"
 #~ msgstr "�� ������ ������ 'make'"
-
 #~ msgid "ERROR: --merge-multiarch can only be used on i386/x64 installations"
 #~ msgstr ""
 #~ "ERROR: --merge-multiarch ����� ������������ ������ �� i386/x64-"
 #~ "������������"
-
 #~ msgid "--merge-multiarch is Windows-only"
 #~ msgstr "--merge-multiarch -- ��� ������ ��� Windows"
-
 #~ msgid ""
 #~ "running Stangle on vignette '%s' failed with message:\n"
 #~ "%s"
 #~ msgstr ""
 #~ "���������� Stangle � ������ '%s' �� ������� � ������������:\n"
 #~ "%s"
-
 #~ msgid "Packages required but not available:"
 #~ msgstr "����� ���������, �� ����������:"
-
 #~ msgid "Package required but not available: %s"
 #~ msgstr "����� ���������, �� ����������: %s"
-
 #~ msgid "Packages required and available but unsuitable versions:"
 #~ msgstr "����� ��������� � ��������, �� ������������ ������:"
-
 #~ msgid "Package required and available but unsuitable version: %s"
 #~ msgstr "����� ��������� � ��������, �� ������������ ������:"
-
 #~ msgid "Former standard packages required but now defunct:"
 #~ msgstr ""
 #~ "������ ����������� ����� ���������, ������� ������ ����� �� ������������:"
-
 #~ msgid "Packages suggested but not available for checking:"
 #~ msgstr "����� ���������, �� ���������� ��� ������:"
-
 #~ msgid "Package suggested but not available for checking: %s"
 #~ msgstr "����� ���������, �� ����������  ��� ������:"
-
 #~ msgid "Packages which this enhances but not available for checking:"
 #~ msgstr "�����, ������� ��� ���������, ���������� ��� ������:"
-
 #~ msgid "Package which this enhances but not available for checking: %s"
 #~ msgstr "�����, ������� ��� ���������, ���������� ��� ������: %s"
-
 #~ msgid "Vignette dependencies not required: %s"
 #~ msgstr "����������� ������ �� ���������: %s"
-
 #~ msgid "Namespace dependencies not required:"
 #~ msgstr "����������� ������������ ���� �� ���������:"
-
 #~ msgid "Package name and namespace differ."
 #~ msgstr "����� ������ � ������������ ���� �����������."
-
 #~ msgid "DVI output from Rd2dvi is deprecated"
 #~ msgstr "����� DVI �� Rd2dvi �� �������������"
 
@@ -1836,84 +1686,57 @@ msgstr[2] "
 #~ msgstr ""
 #~ "��. ���������� � ������ DESCRIPTION � ������  'Creating R �����s' "
 #~ "����������� 'Writing R Extensions'."
-
 #~ msgid "Malformed NEWS.Rd file."
 #~ msgstr "����� �������������� ���� NEWS.Rd."
 
 #, fuzzy
 #~ msgid "cannot read boolean object"
 #~ msgstr "������ �������"
-
 #~ msgid "no examples found"
 #~ msgstr "�� ������� ��������"
-
 #~ msgid "WARNING: 'Depends' entry has multiple dependencies on R:"
 #~ msgstr "��������������: � 'Depends' ������������� ����������� � R:"
-
 #~ msgid "only the first will be used in R < 2.7.0"
 #~ msgstr "������ ������ ����� ����������� R < 2.7.0"
-
 #~ msgid "'"
 #~ msgstr "'"
-
 #~ msgid "--binary is deprecated"
 #~ msgstr "--binary ��������"
-
 #~ msgid "use of '--auto-zip' is defunct"
 #~ msgstr "'--auto-zip' �� ��������"
-
 #~ msgid "use of '--use-zip-data' is defunct"
 #~ msgstr "'--use-zip-data' �� ��������"
-
 #~ msgid "use of '--no-docs' is deprecated: use '--install-args' instead"
 #~ msgstr ""
 #~ "������������� '--no-docs' ��������: ����������� '--install-args' ������"
-
 #~ msgid "** Options"
 #~ msgstr "** �����"
-
 #~ msgid "are only for '--binary'  and will be ignored"
 #~ msgstr "������ ��� '--binary' � ����� ���������"
-
 #~ msgid "--pkglock applies only to a single package"
 #~ msgstr "--pkglock �������� ������ � ���������� ������"
-
 #~ msgid "--no-help overrides"
 #~ msgstr "--no-help ���������"
-
 #~ msgid "--"
 #~ msgstr "--"
-
 #~ msgid "'--auto-zip' is for Windows only"
 #~ msgstr "'--auto-zip' -- ��� ������ ��� Windows"
-
 #~ msgid "cannot update HTML package index"
 #~ msgstr "�� ���� �������� HTML-������ �������"
-
 #~ msgid "'DESCRIPTION' has 'Encoding' field and re-encoding is not possible"
 #~ msgstr "� 'DESCRIPTION' ���� ���� 'Encoding', ������������� ����������"
-
 #~ msgid "cannot create HTML package index"
 #~ msgstr "�� ���� ������� HTML-������ ������"
-
 #~ msgid "Running examples in package"
 #~ msgstr "�������� ������� � ������"
-
 #~ msgid "... done"
 #~ msgstr "... ������"
-
 #~ msgid "Unable to locate help document %s in package %s"
 #~ msgstr "�� ���� ����� �������� ������ %s � ������ %s"
-
-#~ msgid "missing 'DESCRIPTION.in' for package '%s'"
-#~ msgstr "�������� 'DESCRIPTION.in' � ������ '%s'"
-
 #~ msgid "ERROR: this R is version %s, bundle '%s' requires R %s %s"
 #~ msgstr "������: ��� R ������ %s, � ����� '%s' ������� R %s %s"
-
 #~ msgid "Bundle package:"
 #~ msgstr "������ �������:"
-
 #~ msgid "Bundle 'DESCRIPTION' is missing."
 #~ msgstr "� ������ ������� ����������� 'DESCRIPTION'."
 
@@ -1924,129 +1747,92 @@ msgstr[2] "
 #, fuzzy
 #~ msgid "No package of named %s could be found"
 #~ msgstr "������ ���� �������� �����"
-
 #~ msgid "*** 'hhc.exe' not found: not building CHM help"
 #~ msgstr "*** 'hhc.exe' �� ������: �� ������� CHM ������"
-
 #~ msgid "Rd files with syntax errors:"
 #~ msgstr "Rd-����� � ��������������� ��������:"
-
 #~ msgid "Rd files with likely Rd problems:"
 #~ msgstr "Rd-�����, ��-��������, � ���������� Rd:"
-
 #~ msgid "Unaccounted top-level text in file '%s':"
 #~ msgstr "�������������� ����� �������� ������ � ����� '%s':"
-
 #~ msgid "Following section '%s'"
 #~ msgstr "��������� ������ '%s'"
-
 #~ msgid "Rd files with unknown encoding:"
 #~ msgstr "Rd-����� ����������� ���������:"
-
 #~ msgid "Rd files with invalid non-ASCII metadata:"
 #~ msgstr "Rd-����� � ������������� ��-ASCII �����������:"
-
 #~ msgid "Rd files with non-ASCII section titles:"
 #~ msgstr "Rd-����� � ��-ASCII ����������� ��������:"
-
 #~ msgid "Rd files with missing or empty '\\name':"
 #~ msgstr "Rd-����� � ������������ ��� ������� ������� '\\���':"
-
 #~ msgid "Rd files with missing or empty '\\title':"
 #~ msgstr "Rd-����� � ������������ ��� ������� \\title':"
-
 #~ msgid "Rd files without '%s':"
 #~ msgstr "Rd-����� ��� '%s':"
-
 #~ msgid "These entries are required in an Rd file."
 #~ msgstr "��� ������ ��������� ��� Rd-�����."
-
 #~ msgid "These entries must be unique in an Rd file."
 #~ msgstr "��� ������ � Rd-����� ������ ���� �����������."
-
 #~ msgid "Rd files with unknown sections:"
 #~ msgstr "Rd-����� � ������������ ���������:"
-
 #~ msgid "Rd files with non-standard keywords:"
 #~ msgstr "Rd-����� � �������������� ��������� �������:"
-
 #~ msgid ""
 #~ "Each '\\keyword' entry should specify one of the standard keywords (as "
 #~ "listed in file 'KEYWORDS' in the R documentation directory)."
 #~ msgstr ""
 #~ "������ ���� '\\keyword' ������ ���������� ���� �� ����������� �������� "
 #~ "���� (��� ����������� � ����� 'KEYWORDS' � ����� ������������ R)."
-
 #~ msgid "Rd files with empty sections:"
 #~ msgstr "Rd-����� � ������� ���������:"
 
 #, fuzzy
 #~ msgid "checkRd is designed for Rd version 2 or higher"
 #~ msgstr "Rd2HTML ���������� ��� Rd ������ 2 ��� ����."
-
 #~ msgid "there are no help pages in this package"
 #~ msgstr "� ������ ��� ������ ������"
-
 #~ msgid "skipping repeated alias(es)"
 #~ msgstr "��������� ������������� �����-�����(�)"
-
 #~ msgid "in file"
 #~ msgstr "� �����"
-
 #~ msgid "directory '%s' does not contain Rd sources"
 #~ msgstr "����� '%s' �� �������� Rd-����������"
-
 #~ msgid "Package Rd sources were installed without preserving Rd file names."
 #~ msgstr "Rd-��������� ������ ���� ����������� ��� ���������� ���� Rd-������."
-
 #~ msgid "Please reinstall using a current version of R."
 #~ msgstr "����������, ��������������, ��������� ������� ������ R."
-
 #~ msgid "*** error on file"
 #~ msgstr "*** ������ � �����"
-
 #~ msgid "argument 'lines' must be a character vector"
 #~ msgstr "�������� 'lines' ������ ���� ��������� ��������"
-
 #~ msgid "encoding '%s' is not portable"
 #~ msgstr "��������� '%s' �� ����������"
-
 #~ msgid "unterminated section '%s'"
 #~ msgstr "������������� ������ '%s'"
-
 #~ msgid "incomplete section 'section{%s}'"
 #~ msgstr "�������� ������ 'section{%s}'"
-
 #~ msgid "unterminated section 'section{%s}'"
 #~ msgstr "������������� ������ 'section{%s}'"
-
 #~ msgid "unmatched \\item name in '\\item{%s'"
 #~ msgstr "����������������� \\item ��� � '\\item{%s'"
-
 #~ msgid "no \\item description for item '%s'"
 #~ msgstr "��� \\item �������� ��� ����� '%s'"
-
 #~ msgid "unmatched \\item description for item '%s'"
 #~ msgstr "����������������� ����������� \\item ��� ������ '%s'"
-
 #~ msgid "unclosed \\link"
 #~ msgstr "���������� \\link"
-
 #~ msgid "unclosed \\%s"
 #~ msgstr "���������� \\%s"
-
 #~ msgid "Rd syntax errors found"
 #~ msgstr "� Rd ������� ������ ����������"
-
 #~ msgid "Syntax error in documentation object '%s':"
 #~ msgstr "�������������� ������ � ������� ������������ '%s':"
-
 #~ msgid "should not get here"
 #~ msgstr "���� �� ������ �����"
 
 #, fuzzy
 #~ msgid "there is a 'man' dir but no help pages in this package"
 #~ msgstr "� ������ ��� ������ ������"
-
 #~ msgid "multiple \\encoding lines in file"
 #~ msgstr "��������� \\����� ��������� � �����"
+
diff --git a/src/library/tools/po/R-tools.pot b/src/library/tools/po/R-tools.pot
index 95f8de3..4b225ce 100644
--- a/src/library/tools/po/R-tools.pot
+++ b/src/library/tools/po/R-tools.pot
@@ -1,8 +1,7 @@
 msgid ""
 msgstr ""
-"Project-Id-Version: R 3.1.0\n"
-"Report-Msgid-Bugs-To: bugs.r-project.org\n"
-"POT-Creation-Date: 2014-01-26 09:09\n"
+"Project-Id-Version: tools 3.4.0\n"
+"POT-Creation-Date: 2016-04-01 09:50\n"
 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
 "Last-Translator: FULL NAME <EMAIL at ADDRESS>\n"
 "Language-Team: LANGUAGE <LL at li.org>\n"
@@ -11,6 +10,12 @@ msgstr ""
 "Content-Transfer-Encoding: 8bit\n"
 
 
+msgid "Checking %s"
+msgstr ""
+
+msgid "Processing %s ..."
+msgstr ""
+
 msgid "argument 'package' must be of length 1"
 msgstr ""
 
@@ -203,7 +208,13 @@ msgstr ""
 msgid "Packages with priorities 'base' or 'recommended' or 'defunct-base' must already be known to R."
 msgstr ""
 
-msgid "See the information on DESCRIPTION files in section 'Creating R packages' of the 'Writing R Extensions' manual."
+msgid "Malformed Title field: should not end in a period."
+msgstr ""
+
+msgid "Malformed Description field: should contain one or more complete sentences."
+msgstr ""
+
+msgid "See section 'The DESCRIPTION file' in the 'Writing R Extensions' manual."
 msgstr ""
 
 msgid "Malformed Authors at R field:"
@@ -221,7 +232,10 @@ msgstr ""
 msgid "Cannot extract Maintainer field from Authors at R field:"
 msgstr ""
 
-msgid "Authors at R field gives no person with maintainer role and email address."
+msgid "Authors at R field gives more than one person with maintainer role:"
+msgstr ""
+
+msgid "Authors at R field gives no person with maintainer role, valid email address and non-empty name."
 msgstr ""
 
 msgid "Encoding '%s' is not portable"
@@ -263,7 +277,7 @@ msgstr ""
 msgid "Missing link or links in documentation object '%s':"
 msgstr ""
 
-msgid "See the information in section 'Cross-references' of the 'Writing R Extensions' manual."
+msgid "See section 'Cross-references' in the 'Writing R Extensions' manual."
 msgstr ""
 
 msgid "File %s:"
@@ -290,7 +304,7 @@ msgstr ""
 msgid "See section %s in '%s'."
 msgstr ""
 
-msgid "Package detach functions should have one arguments with names starting with %s."
+msgid "Package detach functions should have one argument with name starting with %s."
 msgstr ""
 
 msgid "Package detach functions should not call %s."
@@ -317,12 +331,24 @@ msgstr ""
 msgid "'library' or 'require' call not declared from: %s"
 msgstr ""
 
+msgid "'loadNamespace' or 'requireNamespace' calls not declared from:"
+msgstr ""
+
+msgid "'loadNamespace' or 'requireNamespace' call not declared from: %s"
+msgstr ""
+
 msgid "'library' or 'require' calls to packages already attached by Depends:"
 msgstr ""
 
 msgid "'library' or 'require' call to %s which was already attached by Depends."
 msgstr ""
 
+msgid "'library' or 'require' calls in package code:"
+msgstr ""
+
+msgid "'library' or 'require' call to %s in package code."
+msgstr ""
+
 msgid "Namespaces in Imports field not imported from:"
 msgstr ""
 
@@ -395,7 +421,7 @@ msgstr ""
 msgid "Generics 'g' in 'env' %s where '%s' errors: %s\nMay need something like\n\n%s\nin NAMESPACE."
 msgstr ""
 
-msgid "argument 'file' must be a character string or connection"
+msgid "Rd object required"
 msgstr ""
 
 msgid "missing/empty %s field in '%s'"
@@ -425,6 +451,15 @@ msgstr ""
 msgid "No help on %s found in RdDB %s"
 msgstr ""
 
+msgid "'macros' must be TRUE or must specify existing macros"
+msgstr ""
+
+msgid "Macro file %s should only contain Rd macro definitions and comments"
+msgstr ""
+
+msgid "No Rd macros in package '%s'."
+msgstr ""
+
 msgid "more than one \\examples section, using the first"
 msgstr ""
 
@@ -464,6 +499,9 @@ msgstr ""
 msgid "Only one Rd section per %s is supported."
 msgstr ""
 
+msgid "DESCRIPTION file is for package '%s', not '%s'"
+msgstr ""
+
 msgid "Vignette product %s does not have a known filename extension (%s)"
 msgstr ""
 
@@ -476,6 +514,9 @@ msgstr ""
 msgid "unable to create temp directory %s"
 msgstr ""
 
+msgid "Vignette '%s' is non-ASCII but has no declared encoding"
+msgstr ""
+
 msgid "Running"
 msgstr ""
 
@@ -500,12 +541,6 @@ msgstr ""
 msgid "vignette filename '%s' does not match any of the '%s' filename patterns"
 msgstr ""
 
-msgid "Inconsistent encoding specifications:"
-msgstr ""
-
-msgid "with %\\SweaveUTF8"
-msgstr ""
-
 msgid "In '%s' vignettes '%s' and '%s' have the same vignette name"
 msgstr ""
 
@@ -602,12 +637,6 @@ msgstr ""
 msgid "assertConditon: Successfully caught a condition"
 msgstr ""
 
-msgid "assertCondition: caught %s"
-msgstr ""
-
-msgid ","
-msgstr ""
-
 msgid "Got %s in evaluating %s; wanted %s"
 msgstr ""
 
@@ -671,9 +700,6 @@ msgstr ""
 msgid "downloading %s ..."
 msgstr ""
 
-msgid "installing dependencies %s"
-msgstr ""
-
 msgid "checking %s ..."
 msgstr ""
 
@@ -713,13 +739,13 @@ msgstr ""
 msgid "No docs found for package %s"
 msgstr ""
 
-msgid "Only help files, %s, %s and files under %s and %s in a package can be viewed"
+msgid "URL %s was not found"
 msgstr ""
 
-msgid "unsupported URL %s"
+msgid "Only help files, %s, %s and files under %s and %s in a package can be viewed"
 msgstr ""
 
-msgid "URL %s was not found"
+msgid "unsupported URL %s"
 msgstr ""
 
 msgid "httpd server disabled by R_DISABLE_HTTPD"
@@ -776,6 +802,9 @@ msgstr ""
 msgid "empty 'data' directory"
 msgstr ""
 
+msgid "cannot create unique directory for build"
+msgstr ""
+
 msgid "cannot create temporary directory"
 msgstr ""
 
@@ -797,6 +826,9 @@ msgstr ""
 msgid "building a fake installation is disallowed"
 msgstr ""
 
+msgid "See\n  %s\nfor details."
+msgstr ""
+
 msgid "there is no package called '%s'"
 msgstr ""
 
@@ -830,6 +862,12 @@ msgstr ""
 msgid "Cannot process chunk/lines:\n%s"
 msgstr ""
 
+msgid "DESCRIPTION file not found"
+msgstr ""
+
+msgid "NEWS file not found"
+msgstr ""
+
 msgid "No news found in given file using old-style R-like format."
 msgstr ""
 
@@ -845,9 +883,6 @@ msgstr ""
 msgid "Cannot extract version info from the following section titles:"
 msgstr ""
 
-msgid "%s"
-msgstr ""
-
 msgid "Malformed NEWS.Rd file:\nChunk starting\n  %s\ncontains no \\itemize."
 msgstr ""
 
@@ -857,6 +892,9 @@ msgstr ""
 msgid "Processing packages:"
 msgstr ""
 
+msgid "reading DESCRIPTION for package %s failed with message:\n  %s"
+msgstr ""
+
 msgid "%s must be a character string or a file/raw connection"
 msgstr ""
 
@@ -941,6 +979,9 @@ msgstr ""
 msgid "package '%s' was not found"
 msgstr ""
 
+msgid "the 'lib.loc' argument has always been unused and is deprecated now"
+msgstr ""
+
 msgid "bad operand"
 msgstr ""
 
@@ -959,9 +1000,6 @@ msgstr ""
 msgid "testing '%s' failed"
 msgstr ""
 
-msgid "%d of the package tests failed"
-msgstr ""
-
 msgid "Testing examples for package %s"
 msgstr ""
 
@@ -1031,10 +1069,7 @@ msgstr ""
 msgid "unable to run %s on '%s'"
 msgstr ""
 
-msgid "cannot coerce"
-msgstr ""
-
-msgid "to logical"
+msgid "cannot coerce %s to logical"
 msgstr ""
 
 msgid "File 'DESCRIPTION' is missing."
@@ -1061,6 +1096,9 @@ msgstr ""
 msgid "Call sequence:"
 msgstr ""
 
+msgid "'text' must be a character vector"
+msgstr ""
+
 msgid "parsing '%s'"
 msgstr ""
 
@@ -1183,3 +1221,8 @@ msgid        "object %s is created by more than one data call"
 msgid_plural "objects %s are created by more than one data call"
 msgstr[0]    ""
 msgstr[1]    ""
+
+msgid        "%d of the package tests failed"
+msgid_plural "%d of the package tests failed"
+msgstr[0]    ""
+msgstr[1]    ""
diff --git a/src/library/tools/po/R-tr.po b/src/library/tools/po/R-tr.po
index 755df36..44ff8a4 100644
--- a/src/library/tools/po/R-tr.po
+++ b/src/library/tools/po/R-tr.po
@@ -9,7 +9,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: R 2.13.0\n"
 "Report-Msgid-Bugs-To: bugs.r-project.org\n"
-"POT-Creation-Date: 2014-01-26 09:09\n"
+"POT-Creation-Date: 2016-04-01 09:50\n"
 "PO-Revision-Date: 2011-04-02 \n"
 "Last-Translator: Murat Alkan <muratalk at gmail.com>\n"
 "Language-Team: Turkish <muratalk at gmail.com>\n"
@@ -18,6 +18,12 @@ msgstr ""
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
 
+msgid "Checking %s"
+msgstr ""
+
+msgid "Processing %s ..."
+msgstr ""
+
 msgid "argument 'package' must be of length 1"
 msgstr ""
 
@@ -222,9 +228,15 @@ msgid ""
 "already be known to R."
 msgstr ""
 
+msgid "Malformed Title field: should not end in a period."
+msgstr ""
+
 msgid ""
-"See the information on DESCRIPTION files in section 'Creating R packages' of "
-"the 'Writing R Extensions' manual."
+"Malformed Description field: should contain one or more complete sentences."
+msgstr ""
+
+msgid ""
+"See section 'The DESCRIPTION file' in the 'Writing R Extensions' manual."
 msgstr ""
 
 msgid "Malformed Authors at R field:"
@@ -242,7 +254,12 @@ msgstr ""
 msgid "Cannot extract Maintainer field from Authors at R field:"
 msgstr ""
 
-msgid "Authors at R field gives no person with maintainer role and email address."
+msgid "Authors at R field gives more than one person with maintainer role:"
+msgstr ""
+
+msgid ""
+"Authors at R field gives no person with maintainer role, valid email address "
+"and non-empty name."
 msgstr ""
 
 msgid "Encoding '%s' is not portable"
@@ -286,9 +303,7 @@ msgstr ""
 msgid "Missing link or links in documentation object '%s':"
 msgstr ""
 
-msgid ""
-"See the information in section 'Cross-references' of the 'Writing R "
-"Extensions' manual."
+msgid "See section 'Cross-references' in the 'Writing R Extensions' manual."
 msgstr ""
 
 msgid "File %s:"
@@ -318,8 +333,7 @@ msgid "See section %s in '%s'."
 msgstr ""
 
 msgid ""
-"Package detach functions should have one arguments with names starting with "
-"%s."
+"Package detach functions should have one argument with name starting with %s."
 msgstr ""
 
 msgid "Package detach functions should not call %s."
@@ -346,6 +360,12 @@ msgstr ""
 msgid "'library' or 'require' call not declared from: %s"
 msgstr ""
 
+msgid "'loadNamespace' or 'requireNamespace' calls not declared from:"
+msgstr ""
+
+msgid "'loadNamespace' or 'requireNamespace' call not declared from: %s"
+msgstr ""
+
 msgid "'library' or 'require' calls to packages already attached by Depends:"
 msgstr ""
 
@@ -353,6 +373,12 @@ msgid ""
 "'library' or 'require' call to %s which was already attached by Depends."
 msgstr ""
 
+msgid "'library' or 'require' calls in package code:"
+msgstr ""
+
+msgid "'library' or 'require' call to %s in package code."
+msgstr ""
+
 msgid "Namespaces in Imports field not imported from:"
 msgstr ""
 
@@ -430,7 +456,7 @@ msgid ""
 "in NAMESPACE."
 msgstr ""
 
-msgid "argument 'file' must be a character string or connection"
+msgid "Rd object required"
 msgstr ""
 
 msgid "missing/empty %s field in '%s'"
@@ -460,6 +486,15 @@ msgstr ""
 msgid "No help on %s found in RdDB %s"
 msgstr ""
 
+msgid "'macros' must be TRUE or must specify existing macros"
+msgstr ""
+
+msgid "Macro file %s should only contain Rd macro definitions and comments"
+msgstr ""
+
+msgid "No Rd macros in package '%s'."
+msgstr ""
+
 msgid "more than one \\examples section, using the first"
 msgstr ""
 
@@ -499,6 +534,9 @@ msgstr ""
 msgid "Only one Rd section per %s is supported."
 msgstr ""
 
+msgid "DESCRIPTION file is for package '%s', not '%s'"
+msgstr ""
+
 msgid "Vignette product %s does not have a known filename extension (%s)"
 msgstr ""
 
@@ -515,6 +553,9 @@ msgstr ""
 msgid "unable to create temp directory %s"
 msgstr ""
 
+msgid "Vignette '%s' is non-ASCII but has no declared encoding"
+msgstr ""
+
 msgid "Running"
 msgstr ""
 
@@ -545,12 +586,6 @@ msgstr ""
 msgid "vignette filename '%s' does not match any of the '%s' filename patterns"
 msgstr ""
 
-msgid "Inconsistent encoding specifications:"
-msgstr ""
-
-msgid "with %\\SweaveUTF8"
-msgstr ""
-
 msgid "In '%s' vignettes '%s' and '%s' have the same vignette name"
 msgstr ""
 
@@ -652,12 +687,6 @@ msgstr ""
 msgid "assertConditon: Successfully caught a condition"
 msgstr ""
 
-msgid "assertCondition: caught %s"
-msgstr ""
-
-msgid ","
-msgstr ""
-
 msgid "Got %s in evaluating %s; wanted %s"
 msgstr ""
 
@@ -721,9 +750,6 @@ msgstr ""
 msgid "downloading %s ..."
 msgstr ""
 
-msgid "installing dependencies %s"
-msgstr ""
-
 msgid "checking %s ..."
 msgstr ""
 
@@ -763,6 +789,9 @@ msgstr ""
 msgid "No docs found for package %s"
 msgstr ""
 
+msgid "URL %s was not found"
+msgstr ""
+
 msgid ""
 "Only help files, %s, %s and files under %s and %s in a package can be viewed"
 msgstr ""
@@ -770,9 +799,6 @@ msgstr ""
 msgid "unsupported URL %s"
 msgstr ""
 
-msgid "URL %s was not found"
-msgstr ""
-
 msgid "httpd server disabled by R_DISABLE_HTTPD"
 msgstr ""
 
@@ -831,6 +857,9 @@ msgstr ""
 msgid "empty 'data' directory"
 msgstr ""
 
+msgid "cannot create unique directory for build"
+msgstr ""
+
 msgid "cannot create temporary directory"
 msgstr ""
 
@@ -852,6 +881,12 @@ msgstr ""
 msgid "building a fake installation is disallowed"
 msgstr ""
 
+msgid ""
+"See\n"
+"  %s\n"
+"for details."
+msgstr ""
+
 msgid "there is no package called '%s'"
 msgstr ""
 
@@ -887,6 +922,12 @@ msgid ""
 "%s"
 msgstr ""
 
+msgid "DESCRIPTION file not found"
+msgstr ""
+
+msgid "NEWS file not found"
+msgstr ""
+
 msgid "No news found in given file using old-style R-like format."
 msgstr ""
 
@@ -904,9 +945,6 @@ msgstr ""
 msgid "Cannot extract version info from the following section titles:"
 msgstr ""
 
-msgid "%s"
-msgstr ""
-
 msgid ""
 "Malformed NEWS.Rd file:\n"
 "Chunk starting\n"
@@ -925,6 +963,11 @@ msgstr ""
 msgid "Processing packages:"
 msgstr ""
 
+msgid ""
+"reading DESCRIPTION for package %s failed with message:\n"
+"  %s"
+msgstr ""
+
 msgid "%s must be a character string or a file/raw connection"
 msgstr ""
 
@@ -1009,6 +1052,9 @@ msgstr ""
 msgid "package '%s' was not found"
 msgstr ""
 
+msgid "the 'lib.loc' argument has always been unused and is deprecated now"
+msgstr ""
+
 msgid "bad operand"
 msgstr ""
 
@@ -1027,9 +1073,6 @@ msgstr ""
 msgid "testing '%s' failed"
 msgstr ""
 
-msgid "%d of the package tests failed"
-msgstr ""
-
 msgid "Testing examples for package %s"
 msgstr ""
 
@@ -1099,10 +1142,7 @@ msgstr ""
 msgid "unable to run %s on '%s'"
 msgstr ""
 
-msgid "cannot coerce"
-msgstr ""
-
-msgid "to logical"
+msgid "cannot coerce %s to logical"
 msgstr ""
 
 msgid "File 'DESCRIPTION' is missing."
@@ -1129,6 +1169,9 @@ msgstr ""
 msgid "Call sequence:"
 msgstr ""
 
+msgid "'text' must be a character vector"
+msgstr ""
+
 msgid "parsing '%s'"
 msgstr ""
 
@@ -1267,3 +1310,8 @@ msgid "object %s is created by more than one data call"
 msgid_plural "objects %s are created by more than one data call"
 msgstr[0] ""
 msgstr[1] ""
+
+msgid "%d of the package tests failed"
+msgid_plural "%d of the package tests failed"
+msgstr[0] ""
+msgstr[1] ""
diff --git a/src/library/tools/po/R-zh_CN.po b/src/library/tools/po/R-zh_CN.po
index 1d3a063..2b34317 100644
--- a/src/library/tools/po/R-zh_CN.po
+++ b/src/library/tools/po/R-zh_CN.po
@@ -7,16 +7,24 @@ msgid ""
 msgstr ""
 "Project-Id-Version: R 2.4.0\n"
 "Report-Msgid-Bugs-To: bugs.r-project.org\n"
-"POT-Creation-Date: 2014-01-26 09:09\n"
+"POT-Creation-Date: 2016-04-01 09:50\n"
 "PO-Revision-Date: 2005-02-04 08:37+0000\n"
 "Last-Translator: 陈斐 <feic at normipaiva.com>\n"
 "Language-Team: Chinese\n"
-"Language: \n"
+"Language: zh_CN\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
 "Plural-Forms: nplurals=1; plural=0;\n"
 
+#, fuzzy
+msgid "Checking %s"
+msgstr "%s…"
+
+#, fuzzy
+msgid "Processing %s ..."
+msgstr "处理%s "
+
 msgid "argument 'package' must be of length 1"
 msgstr "参数'package'的长度必需为一"
 
@@ -227,9 +235,16 @@ msgid ""
 "already be known to R."
 msgstr "R必需知道带'base','recommended'或'defunct-base'优先权的程辑包."
 
+msgid "Malformed Title field: should not end in a period."
+msgstr ""
+
 msgid ""
-"See the information on DESCRIPTION files in section 'Creating R packages' of "
-"the 'Writing R Extensions' manual."
+"Malformed Description field: should contain one or more complete sentences."
+msgstr ""
+
+#, fuzzy
+msgid ""
+"See section 'The DESCRIPTION file' in the 'Writing R Extensions' manual."
 msgstr ""
 "请参考'如何写R附加软件'说明书'写R程辑包'这一段中关于DESCRIPTION文件的信息."
 
@@ -248,7 +263,14 @@ msgstr "Authors at R领域里没有有效作用的人"
 msgid "Cannot extract Maintainer field from Authors at R field:"
 msgstr "无法从Authors at R 抽取维修人域"
 
-msgid "Authors at R field gives no person with maintainer role and email address."
+#, fuzzy
+msgid "Authors at R field gives more than one person with maintainer role:"
+msgstr "Authors at R域没有提供有作者作用的人"
+
+#, fuzzy
+msgid ""
+"Authors at R field gives no person with maintainer role, valid email address "
+"and non-empty name."
 msgstr "Authors at R域没有提供有维修作用的人和他的email"
 
 msgid "Encoding '%s' is not portable"
@@ -294,9 +316,8 @@ msgstr "%s程序包存在但没有在R >= 2.10.0下安装,因此无法对xrefs
 msgid "Missing link or links in documentation object '%s':"
 msgstr "使用手冊对象'%s'缺少联结:"
 
-msgid ""
-"See the information in section 'Cross-references' of the 'Writing R "
-"Extensions' manual."
+#, fuzzy
+msgid "See section 'Cross-references' in the 'Writing R Extensions' manual."
 msgstr "请参考'如何写R附加软件'说明书中'交叉引用'这一段。"
 
 msgid "File %s:"
@@ -325,9 +346,9 @@ msgstr "程序包启动函数不应该调用%s 。"
 msgid "See section %s in '%s'."
 msgstr "参见'%2$s'里的%1$s章节"
 
+#, fuzzy
 msgid ""
-"Package detach functions should have one arguments with names starting with "
-"%s."
+"Package detach functions should have one argument with name starting with %s."
 msgstr "程序包脱离函数需要有个名字开头为%s的参数。"
 
 msgid "Package detach functions should not call %s."
@@ -355,6 +376,14 @@ msgid "'library' or 'require' call not declared from: %s"
 msgstr "'library'或'require'调用没有被声明: %s"
 
 #, fuzzy
+msgid "'loadNamespace' or 'requireNamespace' calls not declared from:"
+msgstr "'library'或'require'调用没有被声明:"
+
+#, fuzzy
+msgid "'loadNamespace' or 'requireNamespace' call not declared from: %s"
+msgstr "'library'或'require'调用没有被声明: %s"
+
+#, fuzzy
 msgid "'library' or 'require' calls to packages already attached by Depends:"
 msgstr "'library'或'require'调用没有被声明:"
 
@@ -363,6 +392,14 @@ msgid ""
 "'library' or 'require' call to %s which was already attached by Depends."
 msgstr "'library'或'require'调用没有被声明: %s"
 
+#, fuzzy
+msgid "'library' or 'require' calls in package code:"
+msgstr "'library'或'require'调用没有被声明:"
+
+#, fuzzy
+msgid "'library' or 'require' call to %s in package code."
+msgstr "'library'或'require'调用没有被声明:"
+
 msgid "Namespaces in Imports field not imported from:"
 msgstr ""
 
@@ -448,8 +485,8 @@ msgstr ""
 "%s\n"
 "在名字空间。"
 
-msgid "argument 'file' must be a character string or connection"
-msgstr "参数'document'必需是字符串或联结"
+msgid "Rd object required"
+msgstr ""
 
 msgid "missing/empty %s field in '%s'"
 msgstr "'%2$s'里缺少或有空白的%s域"
@@ -478,6 +515,16 @@ msgstr "无法使用缺少或有空白名字的Rd对象"
 msgid "No help on %s found in RdDB %s"
 msgstr "RdDB %2$s里找不到关于%1$s的帮助"
 
+msgid "'macros' must be TRUE or must specify existing macros"
+msgstr ""
+
+msgid "Macro file %s should only contain Rd macro definitions and comments"
+msgstr ""
+
+#, fuzzy
+msgid "No Rd macros in package '%s'."
+msgstr "程序包%s里没有任何文件"
+
 msgid "more than one \\examples section, using the first"
 msgstr "多个\\example段,取用第一段"
 
@@ -518,6 +565,10 @@ msgid "Only one Rd section per %s is supported."
 msgstr "每%s只支持一个Rd章节"
 
 #, fuzzy
+msgid "DESCRIPTION file is for package '%s', not '%s'"
+msgstr "程序包'%s'缺少'DESCRIPTION.in'"
+
+#, fuzzy
 msgid "Vignette product %s does not have a known filename extension (%s)"
 msgstr "没有一个已知的文件扩展名"
 
@@ -534,6 +585,9 @@ msgstr ""
 msgid "unable to create temp directory %s"
 msgstr "无法建立临时目录%s"
 
+msgid "Vignette '%s' is non-ASCII but has no declared encoding"
+msgstr ""
+
 #, fuzzy
 msgid "Running"
 msgstr "执行%s"
@@ -570,13 +624,6 @@ msgstr "找不到'%s'这个文件"
 msgid "vignette filename '%s' does not match any of the '%s' filename patterns"
 msgstr ""
 
-#, fuzzy
-msgid "Inconsistent encoding specifications:"
-msgstr "非标准执照规格"
-
-msgid "with %\\SweaveUTF8"
-msgstr ""
-
 msgid "In '%s' vignettes '%s' and '%s' have the same vignette name"
 msgstr "'%s'简介里'%s'和'%s'的名字是一样的"
 
@@ -690,12 +737,6 @@ msgstr "载入失败"
 msgid "assertConditon: Successfully caught a condition"
 msgstr ""
 
-msgid "assertCondition: caught %s"
-msgstr ""
-
-msgid ","
-msgstr ","
-
 msgid "Got %s in evaluating %s; wanted %s"
 msgstr ""
 
@@ -759,9 +800,6 @@ msgstr "下载扭转了的依赖关系"
 msgid "downloading %s ..."
 msgstr "下载%s。。。"
 
-msgid "installing dependencies %s"
-msgstr "安装依赖关系%s"
-
 msgid "checking %s ..."
 msgstr "%s…"
 
@@ -801,6 +839,9 @@ msgstr "程序包%s里的链结%s不存在"
 msgid "No docs found for package %s"
 msgstr "程序包%s里没有任何文件"
 
+msgid "URL %s was not found"
+msgstr "找不到%s这个URL"
+
 msgid ""
 "Only help files, %s, %s and files under %s and %s in a package can be viewed"
 msgstr "能够查看的文件限制于帮助文件,%s, %s 和%s下的文件和程序包%s里的文件"
@@ -808,9 +849,6 @@ msgstr "能够查看的文件限制于帮助文件,%s, %s 和%s下的文件和
 msgid "unsupported URL %s"
 msgstr "不支持URL %s"
 
-msgid "URL %s was not found"
-msgstr "找不到%s这个URL"
-
 msgid "httpd server disabled by R_DISABLE_HTTPD"
 msgstr "R_DISABLE_HTTPD的设定关闭了httpd服务器"
 
@@ -870,6 +908,10 @@ msgstr "找不到源程序文件"
 msgid "empty 'data' directory"
 msgstr "空的'data'目录"
 
+#, fuzzy
+msgid "cannot create unique directory for build"
+msgstr "无法建立目录'%s'"
+
 msgid "cannot create temporary directory"
 msgstr "无法建立临时性目录"
 
@@ -891,6 +933,12 @@ msgstr "错误:没有在这个目录里安装的许可"
 msgid "building a fake installation is disallowed"
 msgstr "不充许伪造安装"
 
+msgid ""
+"See\n"
+"  %s\n"
+"for details."
+msgstr ""
+
 msgid "there is no package called '%s'"
 msgstr "没有叫'%s'的程辑包"
 
@@ -928,6 +976,14 @@ msgstr ""
 "无法处理段/列:\n"
 "%s"
 
+#, fuzzy
+msgid "DESCRIPTION file not found"
+msgstr "DESCRIPTION文件不对"
+
+#, fuzzy
+msgid "NEWS file not found"
+msgstr "找不到'%s'这个文件"
+
 msgid "No news found in given file using old-style R-like format."
 msgstr "在所提供的文件中用老式R类的格式找不到任何新信息。"
 
@@ -947,9 +1003,6 @@ msgstr ""
 msgid "Cannot extract version info from the following section titles:"
 msgstr "无法从下面的段标题找到关于版本的信息"
 
-msgid "%s"
-msgstr "%s"
-
 msgid ""
 "Malformed NEWS.Rd file:\n"
 "Chunk starting\n"
@@ -976,6 +1029,14 @@ msgstr ""
 msgid "Processing packages:"
 msgstr "正在处理程辑包:"
 
+#, fuzzy
+msgid ""
+"reading DESCRIPTION for package %s failed with message:\n"
+"  %s"
+msgstr ""
+"编译TeX文件%s失败,消息为:\n"
+"%s"
+
 msgid "%s must be a character string or a file/raw connection"
 msgstr "%s必需是字符串或原联结"
 
@@ -1060,6 +1121,9 @@ msgstr "参数'pkg'的长度必需是一"
 msgid "package '%s' was not found"
 msgstr "找不到程辑包'%s'"
 
+msgid "the 'lib.loc' argument has always been unused and is deprecated now"
+msgstr ""
+
 msgid "bad operand"
 msgstr "操作数不对"
 
@@ -1078,9 +1142,6 @@ msgstr "找到了%s,可能是从%s来的"
 msgid "testing '%s' failed"
 msgstr "试用'%s'失败了"
 
-msgid "%d of the package tests failed"
-msgstr ""
-
 msgid "Testing examples for package %s"
 msgstr "试验程序包%s的范例"
 
@@ -1150,12 +1211,10 @@ msgstr "无法在'%2$s'上调用'%1$s'"
 msgid "unable to run %s on '%s'"
 msgstr "无法在'%2$s'上调用%1$s"
 
-msgid "cannot coerce"
+#, fuzzy
+msgid "cannot coerce %s to logical"
 msgstr "无法强迫改变"
 
-msgid "to logical"
-msgstr "为逻辑值"
-
 msgid "File 'DESCRIPTION' is missing."
 msgstr "缺少'DESCRIPTION'这个文件"
 
@@ -1180,6 +1239,10 @@ msgstr "无法读取程辑包源编码"
 msgid "Call sequence:"
 msgstr "调用序列:"
 
+#, fuzzy
+msgid "'text' must be a character vector"
+msgstr "参数'x'必需是字符矢量"
+
 msgid "parsing '%s'"
 msgstr "文名分析'%s'"
 
@@ -1301,6 +1364,37 @@ msgid "object %s is created by more than one data call"
 msgid_plural "objects %s are created by more than one data call"
 msgstr[0] "不能用多个数据调用来产生对象%s"
 
+msgid "%d of the package tests failed"
+msgid_plural "%d of the package tests failed"
+msgstr[0] ""
+
+#~ msgid ","
+#~ msgstr ","
+
+#~ msgid "installing dependencies %s"
+#~ msgstr "安装依赖关系%s"
+
+#~ msgid "%s"
+#~ msgstr "%s"
+
+#~ msgid ":"
+#~ msgstr ":"
+
+#, fuzzy
+#~ msgid "Undeclared package used in Rd xrefs:"
+#~ msgid_plural "Undeclared packages used in Rd xrefs:"
+#~ msgstr[0] "Rd xrefs里包含了不知来源的程序包%s"
+
+#, fuzzy
+#~ msgid "Inconsistent encoding specifications: %s with %%\\SweaveUTF8"
+#~ msgstr "非标准执照规格"
+
+#~ msgid "argument 'file' must be a character string or connection"
+#~ msgstr "参数'document'必需是字符串或联结"
+
+#~ msgid "to logical"
+#~ msgstr "为逻辑值"
+
 #~ msgid "Vignette product"
 #~ msgstr "产品简介:"
 
@@ -1322,9 +1416,6 @@ msgstr[0] "不能用多个数据调用来产生对象%s"
 #~ msgid ". The following files exists in directory"
 #~ msgstr "。目录里有这些文件"
 
-#~ msgid ":"
-#~ msgstr ":"
-
 #~ msgid "Located more than one"
 #~ msgstr "找到一个以上的"
 
@@ -1790,9 +1881,6 @@ msgstr[0] "不能用多个数据调用来产生对象%s"
 #~ "真的文件名字--这种链结不能在小于2.10.0版本的R里用, 而且也只能在这个版本R的"
 #~ "HTML帮助里用(PDF不行)。"
 
-#~ msgid "missing 'DESCRIPTION.in' for package '%s'"
-#~ msgstr "程序包'%s'缺少'DESCRIPTION.in'"
-
 #~ msgid "ERROR: this R is version %s, bundle '%s' requires R %s %s"
 #~ msgstr "错误:R的版本是%s,捆程序捆包'%s'要求版本为%s %s的R"
 
diff --git a/src/library/tools/po/da.po b/src/library/tools/po/da.po
index 93749a7..dd859b8 100644
--- a/src/library/tools/po/da.po
+++ b/src/library/tools/po/da.po
@@ -5,8 +5,8 @@
 msgid ""
 msgstr ""
 "Project-Id-Version: R 3.0.0\n"
-"Report-Msgid-Bugs-To: bugs.r-project.org\n"
-"POT-Creation-Date: 2013-11-27 18:10+0000\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2016-04-01 10:28-0700\n"
 "PO-Revision-Date: 2011-11-28 22:24+0200\n"
 "Last-Translator: Joe <joedalton2 at yahoo.dk>\n"
 "Language-Team: LANGUAGE <LL at li.org>\n"
@@ -17,11 +17,11 @@ msgstr ""
 "Plural-Forms: nplurals=2; plural=(n != 1);\n"
 "X-Generator: Pootle 2.1.6\n"
 
-#: Rmd5.c:37
+#: Rmd5.c:36
 msgid "argument 'files' must be character"
 msgstr "argumentet 'files' skal være tegn"
 
-#: Rmd5.c:51
+#: Rmd5.c:50
 #, c-format
 msgid "md5 failed on file '%s'"
 msgstr "md5 fejlede på fil '%s'"
@@ -53,81 +53,81 @@ msgstr ""
 msgid "at most one asterisk '*' is supported in each conversion specification"
 msgstr ""
 
-#: gramLatex.y:678 gramRd.y:1300
+#: gramLatex.c:2499 gramRd.c:3933
 #, c-format
 msgid "unable to allocate buffer for long string at line %d"
 msgstr ""
 
-#: gramLatex.y:915 gramRd.y:1788 gramRd.y:1794
+#: gramLatex.c:2736 gramRd.c:4422 gramRd.c:4428
 #, fuzzy, c-format
 msgid "invalid '%s' value"
 msgstr "ugyldig argumenttype"
 
-#: gramRd.y:295 gramRd.y:298
+#: gramRd.c:2591 gramRd.c:2594
 #, c-format
 msgid "bad markup (extra space?) at %s:%d:%d"
 msgstr ""
 
-#: gramRd.y:534
+#: gramRd.c:3150
 #, c-format
 msgid "Macro '%s' previously defined."
 msgstr ""
 
-#: gramRd.y:543
+#: gramRd.c:3160
 #, c-format
 msgid "At most 4 arguments are allowed for user defined macros."
 msgstr ""
 
-#: gramRd.y:577
+#: gramRd.c:3194
 #, c-format
 msgid "No macro definition for '%s'."
 msgstr ""
 
-#: gramRd.y:729 gramRd.y:733
+#: gramRd.c:3348 gramRd.c:3352
 #, c-format
 msgid "newline within quoted string at %s:%d"
 msgstr ""
 
-#: gramRd.y:752
+#: gramRd.c:3371
 #, c-format
 msgid "unable to allocate buffer for long macro at line %d"
 msgstr ""
 
-#: gramRd.y:782
+#: gramRd.c:3401
 msgid "macros nested too deeply: infinite recursion?"
 msgstr ""
 
-#: gramRd.y:1165
+#: gramRd.c:3795
 #, c-format
 msgid "Unable to find macro %s"
 msgstr ""
 
-#: gramRd.y:1360
+#: gramRd.c:3993
 #, c-format
 msgid "Unexpected end of input (in %c quoted string opened at %s:%d:%d)"
 msgstr ""
 
-#: gramRd.y:1799
+#: gramRd.c:4435
 msgid "cannot open the connection"
 msgstr ""
 
-#: gramRd.y:1806
+#: gramRd.c:4442
 msgid "cannot read from this connection"
 msgstr ""
 
-#: gramRd.y:1814
+#: gramRd.c:4450
 msgid "invalid Rd file"
 msgstr ""
 
-#: gramRd.y:1833
+#: gramRd.c:4469
 msgid "'deparseRd' only supports deparsing character elements"
 msgstr ""
 
-#: gramRd.y:1836
+#: gramRd.c:4472
 msgid "bad state"
 msgstr ""
 
-#: gramRd.y:1849
+#: gramRd.c:4485
 #, c-format
 msgid "bad text mode %d in 'deparseRd'"
 msgstr ""
@@ -136,27 +136,27 @@ msgstr ""
 msgid "invalid bind address specification"
 msgstr ""
 
-#: install.c:112 install.c:133 install.c:135
+#: install.c:112 install.c:131 install.c:133
 #, fuzzy, c-format
 msgid "invalid '%s' argument"
 msgstr "ugyldig argumenttype"
 
-#: install.c:163
+#: install.c:162
 msgid "write error during file append"
 msgstr ""
 
-#: signals.c:43
+#: signals.c:42
 msgid "pskill() is not supported on this platform"
 msgstr "pskill() er ikke understøttet på denne platform"
 
-#: signals.c:140
+#: signals.c:139
 msgid "psnice() is not supported on this platform"
 msgstr "psnice() er ikke understøttet på denne platform"
 
-#: text.c:66
+#: text.c:67
 msgid "invalid argument type"
 msgstr "ugyldig argumenttype"
 
-#: text.c:223 text.c:245
+#: text.c:225 text.c:247
 msgid "out of memory"
 msgstr "ikke nok hukommelse"
diff --git a/src/library/tools/po/de.po b/src/library/tools/po/de.po
index 687e4e6..0edebc2 100644
--- a/src/library/tools/po/de.po
+++ b/src/library/tools/po/de.po
@@ -6,22 +6,22 @@
 msgid ""
 msgstr ""
 "Project-Id-Version: R-3.1.0\n"
-"Report-Msgid-Bugs-To: bugs.r-project.org\n"
-"POT-Creation-Date: 2013-11-27 18:10+0000\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2016-04-01 10:28-0700\n"
 "PO-Revision-Date: 2013-03-11 11:27+0100\n"
 "Last-Translator: Detlef Steuer <steuer at hsu-hh.de>\n"
 "Language-Team: R Core <r-core at r-project.org>\n"
-"Language: \n"
+"Language: de\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
 "Plural-Forms: nplurals=2; plural=n == 1 ? 0 : 1;\n"
 
-#: Rmd5.c:37
+#: Rmd5.c:36
 msgid "argument 'files' must be character"
 msgstr "Argument 'files' muss Zeichenkette sein"
 
-#: Rmd5.c:51
+#: Rmd5.c:50
 #, c-format
 msgid "md5 failed on file '%s'"
 msgstr "md5 für Datei '%s' fehlgeschlagen"
@@ -53,81 +53,81 @@ msgstr "nicht erkannte Formatspezifikation '%s'"
 msgid "at most one asterisk '*' is supported in each conversion specification"
 msgstr "höchstens ein Stern '*' in jeder Konversionsspezifikation unterstützt"
 
-#: gramLatex.y:678 gramRd.y:1300
+#: gramLatex.c:2499 gramRd.c:3933
 #, c-format
 msgid "unable to allocate buffer for long string at line %d"
 msgstr "kann keinen Buffer für lange Zeichenkette in Zeile %d allokieren"
 
-#: gramLatex.y:915 gramRd.y:1788 gramRd.y:1794
+#: gramLatex.c:2736 gramRd.c:4422 gramRd.c:4428
 #, c-format
 msgid "invalid '%s' value"
 msgstr "unzulässiger '%s' Wert"
 
-#: gramRd.y:295 gramRd.y:298
+#: gramRd.c:2591 gramRd.c:2594
 #, c-format
 msgid "bad markup (extra space?) at %s:%d:%d"
 msgstr "schlechte Auszeichnung (Leerstelle zuviel?) bei %s:%d:%d"
 
-#: gramRd.y:534
+#: gramRd.c:3150
 #, c-format
 msgid "Macro '%s' previously defined."
 msgstr "Makro '%s' bereits definiert."
 
-#: gramRd.y:543
+#: gramRd.c:3160
 #, c-format
 msgid "At most 4 arguments are allowed for user defined macros."
 msgstr "Höchstens 4 Argumente für benutzerdefinierte Makros erlaubt."
 
-#: gramRd.y:577
+#: gramRd.c:3194
 #, c-format
 msgid "No macro definition for '%s'."
 msgstr "Keine Makrodefinition für '%s'."
 
-#: gramRd.y:729 gramRd.y:733
+#: gramRd.c:3348 gramRd.c:3352
 #, c-format
 msgid "newline within quoted string at %s:%d"
 msgstr "Zeilenumbruch innerhalb einer Zeichenkette bei %s:%d"
 
-#: gramRd.y:752
+#: gramRd.c:3371
 #, c-format
 msgid "unable to allocate buffer for long macro at line %d"
 msgstr "kann keinen Buffer für langes Makro in Zeile %d allokieren"
 
-#: gramRd.y:782
+#: gramRd.c:3401
 msgid "macros nested too deeply: infinite recursion?"
 msgstr "Makros zu tief verschachtelt: unendliche Rekursion?"
 
-#: gramRd.y:1165
+#: gramRd.c:3795
 #, c-format
 msgid "Unable to find macro %s"
 msgstr "Kann Makro %s nicht finden"
 
-#: gramRd.y:1360
+#: gramRd.c:3993
 #, c-format
 msgid "Unexpected end of input (in %c quoted string opened at %s:%d:%d)"
 msgstr "Unerwartetes Ende der Eingabe (in %c Zeichenkette bei %s:%d:%d)"
 
-#: gramRd.y:1799
+#: gramRd.c:4435
 msgid "cannot open the connection"
 msgstr "kann Verbindung nicht öffnen"
 
-#: gramRd.y:1806
+#: gramRd.c:4442
 msgid "cannot read from this connection"
 msgstr "kann aus dieser Verbindung nicht lesen"
 
-#: gramRd.y:1814
+#: gramRd.c:4450
 msgid "invalid Rd file"
 msgstr "ungültige Rd Datei"
 
-#: gramRd.y:1833
+#: gramRd.c:4469
 msgid "'deparseRd' only supports deparsing character elements"
 msgstr "'deparseRd' unterstützt nur das Deparsing von Zeichenkettenelementen"
 
-#: gramRd.y:1836
+#: gramRd.c:4472
 msgid "bad state"
 msgstr "schlechter Zustand"
 
-#: gramRd.y:1849
+#: gramRd.c:4485
 #, c-format
 msgid "bad text mode %d in 'deparseRd'"
 msgstr "schlechter Textmode %d in 'deparseRd'"
@@ -136,27 +136,27 @@ msgstr "schlechter Textmode %d in 'deparseRd'"
 msgid "invalid bind address specification"
 msgstr "unzulässige Bindungsadressenspezifikation"
 
-#: install.c:112 install.c:133 install.c:135
+#: install.c:112 install.c:131 install.c:133
 #, c-format
 msgid "invalid '%s' argument"
 msgstr "unzulässiges '%s' Argument"
 
-#: install.c:163
+#: install.c:162
 msgid "write error during file append"
 msgstr "Schreibfehler während Anhängen an Datei"
 
-#: signals.c:43
+#: signals.c:42
 msgid "pskill() is not supported on this platform"
 msgstr "pskill() auf dieser Plattform nicht unterstützt"
 
-#: signals.c:140
+#: signals.c:139
 msgid "psnice() is not supported on this platform"
 msgstr "psnice() auf dieser Plattform nicht unterstützt"
 
-#: text.c:66
+#: text.c:67
 msgid "invalid argument type"
 msgstr "unzulässiger Argumenttyp"
 
-#: text.c:223 text.c:245
+#: text.c:225 text.c:247
 msgid "out of memory"
 msgstr "zu wenig Hauptspeicher"
diff --git a/src/library/tools/po/fr.po b/src/library/tools/po/fr.po
index d63dfb7..7d23ded 100644
--- a/src/library/tools/po/fr.po
+++ b/src/library/tools/po/fr.po
@@ -6,8 +6,8 @@
 msgid ""
 msgstr ""
 "Project-Id-Version: R 2.12.0\n"
-"Report-Msgid-Bugs-To: bugs.r-project.org\n"
-"POT-Creation-Date: 2013-11-27 18:10+0000\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2016-04-01 10:28-0700\n"
 "PO-Revision-Date: 2013-03-19 20:34+0100\n"
 "Last-Translator: Philippe Grosjean <phgrosjean at sciviews.org>\n"
 "Language-Team: French <R-core at r-project.org>\n"
@@ -18,11 +18,11 @@ msgstr ""
 "Plural-Forms: nplurals=2; plural=(n > 1);\n"
 "X-Generator: Poedit 1.5.5\n"
 
-#: Rmd5.c:37
+#: Rmd5.c:36
 msgid "argument 'files' must be character"
 msgstr "l'argument 'files' doit �tre une cha�ne de caract�res"
 
-#: Rmd5.c:51
+#: Rmd5.c:50
 #, c-format
 msgid "md5 failed on file '%s'"
 msgstr "md5 a �chou� sur le fichier '%s'"
@@ -56,89 +56,89 @@ msgstr ""
 "une seule ast�risque '*' est support�e au maximum dans chaque sp�cification "
 "de conversion "
 
-#: gramLatex.y:678 gramRd.y:1300
+#: gramLatex.c:2499 gramRd.c:3933
 #, c-format
 msgid "unable to allocate buffer for long string at line %d"
 msgstr ""
 "impossibilit� d'allouer une zone tampon pour une cha�ne longue � la ligne %d"
 
-#: gramLatex.y:915 gramRd.y:1788 gramRd.y:1794
+#: gramLatex.c:2736 gramRd.c:4422 gramRd.c:4428
 #, c-format
 msgid "invalid '%s' value"
 msgstr "valeur '%s' incorrecte"
 
-#: gramRd.y:295 gramRd.y:298
+#: gramRd.c:2591 gramRd.c:2594
 #, c-format
 msgid "bad markup (extra space?) at %s:%d:%d"
 msgstr "marque erron�e (espace additionel ?) � %s:%d:%d"
 
-#: gramRd.y:534
+#: gramRd.c:3150
 #, c-format
 msgid "Macro '%s' previously defined."
 msgstr "La macro '%s' est d�j� pr�c�demment d�finie."
 
-#: gramRd.y:543
+#: gramRd.c:3160
 #, c-format
 msgid "At most 4 arguments are allowed for user defined macros."
 msgstr ""
 "Un maximum de 4 arguments est autoris� pour les macros d�finies par "
 "l'utilisateur."
 
-#: gramRd.y:577
+#: gramRd.c:3194
 #, c-format
 msgid "No macro definition for '%s'."
 msgstr "Pas de d�finition de macro pour '%s'."
 
-#: gramRd.y:729 gramRd.y:733
+#: gramRd.c:3348 gramRd.c:3352
 #, c-format
 msgid "newline within quoted string at %s:%d"
 msgstr ""
 "retour de ligne � l'int�rieur d'une cha�ne de caract�res entre guillemets � "
 "%s:%d"
 
-#: gramRd.y:752
+#: gramRd.c:3371
 #, c-format
 msgid "unable to allocate buffer for long macro at line %d"
 msgstr ""
 "impossible d'allouer de la m�moire tampon pour une longue macro � la lign %d"
 
-#: gramRd.y:782
+#: gramRd.c:3401
 msgid "macros nested too deeply: infinite recursion?"
 msgstr "macros imbriqu�es trop profond�ment : r�cursion infinie ?"
 
-#: gramRd.y:1165
+#: gramRd.c:3795
 #, c-format
 msgid "Unable to find macro %s"
 msgstr "Macro %s introuvable"
 
-#: gramRd.y:1360
+#: gramRd.c:3993
 #, c-format
 msgid "Unexpected end of input (in %c quoted string opened at %s:%d:%d)"
 msgstr ""
 "Fin d'entr�e inattendue (dans la cha�ne entre guillements %c ouvertes � %s:"
 "%d:%d)"
 
-#: gramRd.y:1799
+#: gramRd.c:4435
 msgid "cannot open the connection"
 msgstr "impossible d'ouvrir la connexion"
 
-#: gramRd.y:1806
+#: gramRd.c:4442
 msgid "cannot read from this connection"
 msgstr "impossible de lire depuis cette connexion"
 
-#: gramRd.y:1814
+#: gramRd.c:4450
 msgid "invalid Rd file"
 msgstr "fichier Rd incorrect"
 
-#: gramRd.y:1833
+#: gramRd.c:4469
 msgid "'deparseRd' only supports deparsing character elements"
 msgstr "'deparseRd' ne peut d�coder que des �l�ments textuels"
 
-#: gramRd.y:1836
+#: gramRd.c:4472
 msgid "bad state"
 msgstr "�tat incorrect"
 
-#: gramRd.y:1849
+#: gramRd.c:4485
 #, c-format
 msgid "bad text mode %d in 'deparseRd'"
 msgstr "mode de texte %d erron� dans 'deparseRd'"
@@ -147,27 +147,27 @@ msgstr "mode de texte %d erron
 msgid "invalid bind address specification"
 msgstr "sp�cification d'adresse de lien incorrecte"
 
-#: install.c:112 install.c:133 install.c:135
+#: install.c:112 install.c:131 install.c:133
 #, c-format
 msgid "invalid '%s' argument"
 msgstr "argument '%s' incorrect"
 
-#: install.c:163
+#: install.c:162
 msgid "write error during file append"
 msgstr "erreur en �criture lors du rajout dans un fichier"
 
-#: signals.c:43
+#: signals.c:42
 msgid "pskill() is not supported on this platform"
 msgstr "pskill() n'est pas support� sur cette plateforme"
 
-#: signals.c:140
+#: signals.c:139
 msgid "psnice() is not supported on this platform"
 msgstr "psnice() n'est pas support� sur cette plateforme"
 
-#: text.c:66
+#: text.c:67
 msgid "invalid argument type"
 msgstr "type d'argument incorrect"
 
-#: text.c:223 text.c:245
+#: text.c:225 text.c:247
 msgid "out of memory"
 msgstr "plus de m�moire disponible"
diff --git a/src/library/tools/po/it.po b/src/library/tools/po/it.po
index 3c97100..e6b03ec 100644
--- a/src/library/tools/po/it.po
+++ b/src/library/tools/po/it.po
@@ -6,8 +6,8 @@
 msgid ""
 msgstr ""
 "Project-Id-Version: R 2.1.0\n"
-"Report-Msgid-Bugs-To: bugs.r-project.org\n"
-"POT-Creation-Date: 2013-11-27 18:10+0000\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2016-04-01 10:28-0700\n"
 "PO-Revision-Date: 2005-04-17 16:57+0200\n"
 "Last-Translator: stefano iacus <>\n"
 "Language-Team: Italian <it at li.org>\n"
@@ -17,11 +17,11 @@ msgstr ""
 "Content-Transfer-Encoding: 8bit\n"
 "Plural-Forms: nplurals=2; plural=(n != 1);\n"
 
-#: Rmd5.c:37
+#: Rmd5.c:36
 msgid "argument 'files' must be character"
 msgstr "argomento 'files' deve essere di tipo chararcter"
 
-#: Rmd5.c:51
+#: Rmd5.c:50
 #, c-format
 msgid "md5 failed on file '%s'"
 msgstr "md5 fallito sul file '%s'"
@@ -53,81 +53,81 @@ msgstr ""
 msgid "at most one asterisk '*' is supported in each conversion specification"
 msgstr ""
 
-#: gramLatex.y:678 gramRd.y:1300
+#: gramLatex.c:2499 gramRd.c:3933
 #, c-format
 msgid "unable to allocate buffer for long string at line %d"
 msgstr ""
 
-#: gramLatex.y:915 gramRd.y:1788 gramRd.y:1794
+#: gramLatex.c:2736 gramRd.c:4422 gramRd.c:4428
 #, fuzzy, c-format
 msgid "invalid '%s' value"
 msgstr "tipo argomento non valido"
 
-#: gramRd.y:295 gramRd.y:298
+#: gramRd.c:2591 gramRd.c:2594
 #, c-format
 msgid "bad markup (extra space?) at %s:%d:%d"
 msgstr ""
 
-#: gramRd.y:534
+#: gramRd.c:3150
 #, c-format
 msgid "Macro '%s' previously defined."
 msgstr ""
 
-#: gramRd.y:543
+#: gramRd.c:3160
 #, c-format
 msgid "At most 4 arguments are allowed for user defined macros."
 msgstr ""
 
-#: gramRd.y:577
+#: gramRd.c:3194
 #, c-format
 msgid "No macro definition for '%s'."
 msgstr ""
 
-#: gramRd.y:729 gramRd.y:733
+#: gramRd.c:3348 gramRd.c:3352
 #, c-format
 msgid "newline within quoted string at %s:%d"
 msgstr ""
 
-#: gramRd.y:752
+#: gramRd.c:3371
 #, c-format
 msgid "unable to allocate buffer for long macro at line %d"
 msgstr ""
 
-#: gramRd.y:782
+#: gramRd.c:3401
 msgid "macros nested too deeply: infinite recursion?"
 msgstr ""
 
-#: gramRd.y:1165
+#: gramRd.c:3795
 #, c-format
 msgid "Unable to find macro %s"
 msgstr ""
 
-#: gramRd.y:1360
+#: gramRd.c:3993
 #, c-format
 msgid "Unexpected end of input (in %c quoted string opened at %s:%d:%d)"
 msgstr ""
 
-#: gramRd.y:1799
+#: gramRd.c:4435
 msgid "cannot open the connection"
 msgstr ""
 
-#: gramRd.y:1806
+#: gramRd.c:4442
 msgid "cannot read from this connection"
 msgstr ""
 
-#: gramRd.y:1814
+#: gramRd.c:4450
 msgid "invalid Rd file"
 msgstr ""
 
-#: gramRd.y:1833
+#: gramRd.c:4469
 msgid "'deparseRd' only supports deparsing character elements"
 msgstr ""
 
-#: gramRd.y:1836
+#: gramRd.c:4472
 msgid "bad state"
 msgstr ""
 
-#: gramRd.y:1849
+#: gramRd.c:4485
 #, c-format
 msgid "bad text mode %d in 'deparseRd'"
 msgstr ""
@@ -136,27 +136,27 @@ msgstr ""
 msgid "invalid bind address specification"
 msgstr ""
 
-#: install.c:112 install.c:133 install.c:135
+#: install.c:112 install.c:131 install.c:133
 #, fuzzy, c-format
 msgid "invalid '%s' argument"
 msgstr "tipo argomento non valido"
 
-#: install.c:163
+#: install.c:162
 msgid "write error during file append"
 msgstr ""
 
-#: signals.c:43
+#: signals.c:42
 msgid "pskill() is not supported on this platform"
 msgstr ""
 
-#: signals.c:140
+#: signals.c:139
 msgid "psnice() is not supported on this platform"
 msgstr ""
 
-#: text.c:66
+#: text.c:67
 msgid "invalid argument type"
 msgstr "tipo argomento non valido"
 
-#: text.c:223 text.c:245
+#: text.c:225 text.c:247
 msgid "out of memory"
 msgstr ""
diff --git a/src/library/tools/po/ja.po b/src/library/tools/po/ja.po
index b2bf86d..828566e 100644
--- a/src/library/tools/po/ja.po
+++ b/src/library/tools/po/ja.po
@@ -6,8 +6,8 @@
 msgid ""
 msgstr ""
 "Project-Id-Version: R 2.1.0 \n"
-"Report-Msgid-Bugs-To: bugs.r-project.org\n"
-"POT-Creation-Date: 2013-11-27 18:10+0000\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2016-04-01 10:28-0700\n"
 "PO-Revision-Date: 2014-03-26 13:56+0200 \n"
 "Last-Translator: Masafumi  \n"
 "Language-Team: RjpWiki Message Translation Team <mokada at md.tsukuba.ac.jp> \n"
@@ -18,11 +18,11 @@ msgstr ""
 "Plural-Forms: nplurals=1; plural=0; \n"
 "X-Generator: Pootle 2.0.5 \n"
 
-#: Rmd5.c:37
+#: Rmd5.c:36
 msgid "argument 'files' must be character"
 msgstr " 引数 'files' は文字型でなければなりません "
 
-#: Rmd5.c:51
+#: Rmd5.c:50
 #, c-format
 msgid "md5 failed on file '%s'"
 msgstr " md5 はファイル '%s' で失敗しました "
@@ -54,81 +54,81 @@ msgstr " 識別不能なフォーマット指定 '%s' です "
 msgid "at most one asterisk '*' is supported in each conversion specification"
 msgstr " 各変換指定に許されるアステリスク '*' は多くても一つです "
 
-#: gramLatex.y:678 gramRd.y:1300
+#: gramLatex.c:2499 gramRd.c:3933
 #, c-format
 msgid "unable to allocate buffer for long string at line %d"
 msgstr " %d 行にある長い文字列のためのバッファを確保できませんでした "
 
-#: gramLatex.y:915 gramRd.y:1788 gramRd.y:1794
+#: gramLatex.c:2736 gramRd.c:4422 gramRd.c:4428
 #, c-format
 msgid "invalid '%s' value"
 msgstr " 不正な '%s' 値です "
 
-#: gramRd.y:295 gramRd.y:298
+#: gramRd.c:2591 gramRd.c:2594
 #, c-format
 msgid "bad markup (extra space?) at %s:%d:%d"
 msgstr " %s:%d:%d に誤ったマークアップがあります (スペースが余計?) "
 
-#: gramRd.y:534
+#: gramRd.c:3150
 #, c-format
 msgid "Macro '%s' previously defined."
 msgstr " マクロ '%s' は既に定義されています。 "
 
-#: gramRd.y:543
+#: gramRd.c:3160
 #, c-format
 msgid "At most 4 arguments are allowed for user defined macros."
 msgstr " ユーザー定義のマクロに許されている引数の数は最大 4 つです "
 
-#: gramRd.y:577
+#: gramRd.c:3194
 #, c-format
 msgid "No macro definition for '%s'."
 msgstr " '%s' に対するマクロが定義されていません。 "
 
-#: gramRd.y:729 gramRd.y:733
+#: gramRd.c:3348 gramRd.c:3352
 #, c-format
 msgid "newline within quoted string at %s:%d"
 msgstr " 引用文字列の %s に改行:%d "
 
-#: gramRd.y:752
+#: gramRd.c:3371
 #, c-format
 msgid "unable to allocate buffer for long macro at line %d"
 msgstr " 行 %d にある長いマクロに対するバッファを確保できません "
 
-#: gramRd.y:782
+#: gramRd.c:3401
 msgid "macros nested too deeply: infinite recursion?"
 msgstr " マクロが過剰に入れ子になっています: 無限な再帰? "
 
-#: gramRd.y:1165
+#: gramRd.c:3795
 #, c-format
 msgid "Unable to find macro %s"
 msgstr " マクロ %s を見つけることができません "
 
-#: gramRd.y:1360
+#: gramRd.c:3993
 #, c-format
 msgid "Unexpected end of input (in %c quoted string opened at %s:%d:%d)"
 msgstr " 予想外の入力の停止 (%c 引用文字列中の %s:%d:%d で開かれた) "
 
-#: gramRd.y:1799
+#: gramRd.c:4435
 msgid "cannot open the connection"
 msgstr " コネクションを開くことができません "
 
-#: gramRd.y:1806
+#: gramRd.c:4442
 msgid "cannot read from this connection"
 msgstr " このコネクションからは読み取りができません "
 
-#: gramRd.y:1814
+#: gramRd.c:4450
 msgid "invalid Rd file"
 msgstr " 不正な Rd ファイルです "
 
-#: gramRd.y:1833
+#: gramRd.c:4469
 msgid "'deparseRd' only supports deparsing character elements"
 msgstr " 'deparseRd' は文字要素のディパースだけをサポートしています "
 
-#: gramRd.y:1836
+#: gramRd.c:4472
 msgid "bad state"
 msgstr " 不都合な状態 "
 
-#: gramRd.y:1849
+#: gramRd.c:4485
 #, c-format
 msgid "bad text mode %d in 'deparseRd'"
 msgstr " 'deparseRd' 中に不都合なテキストモード %d "
@@ -137,27 +137,27 @@ msgstr " 'deparseRd' 中に不都合なテキストモード %d "
 msgid "invalid bind address specification"
 msgstr " 不正な空白アドレス指定 "
 
-#: install.c:112 install.c:133 install.c:135
+#: install.c:112 install.c:131 install.c:133
 #, c-format
 msgid "invalid '%s' argument"
 msgstr " 不正な引数 '%s' です "
 
-#: install.c:163
+#: install.c:162
 msgid "write error during file append"
 msgstr " ファイルの付加中に書き込みエラー "
 
-#: signals.c:43
+#: signals.c:42
 msgid "pskill() is not supported on this platform"
 msgstr " pskill() はこのプラットホームではサポートされていません "
 
-#: signals.c:140
+#: signals.c:139
 msgid "psnice() is not supported on this platform"
 msgstr " psnice() はこのプラットホームではサポートされていません "
 
-#: text.c:66
+#: text.c:67
 msgid "invalid argument type"
 msgstr " 不正な引数の型です "
 
-#: text.c:223 text.c:245
+#: text.c:225 text.c:247
 msgid "out of memory"
 msgstr " メモリが足りません "
diff --git a/src/library/tools/po/ko.po b/src/library/tools/po/ko.po
index cc7e794..54ddb4e 100644
--- a/src/library/tools/po/ko.po
+++ b/src/library/tools/po/ko.po
@@ -1,30 +1,37 @@
 # Korean translation for R tools package
-# src/library/tools/po/ko.po
-# Copyright (C) 1995-2014 The R Core Team
+# ./tools/po/ko.po
+#
+# Copyright (C) 1995-2016 The R Core Team
+#
 # This file is distributed under the same license as the R tools package.
-# Chel Hee Lee <chl948 at mail.usask.ca>, 2008-2014.
+# Maintained by Chel Hee Lee <chl948 at mail.usask.ca>, 2008-2016.
+# Contact: Chel Hee Lee <gnustats at gmail.com>
+#
+# Notes:
+# Under development (unstable) starting from 11-APR-2016 for R-3.3.1 - QC: in progress
+# Freezed on 10-APR-2016 for R-3.3.0 - QC: PASS
+# Freezed on 31-MAR-2015 for R-3.2.0 - QC: PASS
+# Freezed on 06-FEB-2015 for R-3.1.3 - QC: PASS
 #
 msgid ""
 msgstr ""
-"Project-Id-Version: R 3.1.0\n"
+"Project-Id-Version: R-3.3.0\n"
 "Report-Msgid-Bugs-To: bugs.r-project.org\n"
-"POT-Creation-Date: 2013-11-27 18:10+0000\n"
-"PO-Revision-Date: 2014-03-26 21:20-0600\n"
+"POT-Creation-Date: 2016-04-01 10:28-0700\n"
+"PO-Revision-Date: 2016-04-11 13:08-0600\n"
 "Last-Translator: Chel Hee Lee <chl948 at mail.usask.ca>\n"
-"Language-Team:  <chl948 at mail.usask.ca>\n"
+"Language-Team: Chel Hee Lee <chl948 at mail.usask.ca>\n"
 "Language: ko\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
 "Plural-Forms: nplurals=1; plural=0;\n"
-"X-Poedit-SourceCharset: UTF-8\n"
-"X-Generator: Poedit 1.5.4\n"
 
-#: Rmd5.c:37
+#: Rmd5.c:36
 msgid "argument 'files' must be character"
 msgstr "인자 'files'는 반드시 문자이어야 합니다"
 
-#: Rmd5.c:51
+#: Rmd5.c:50
 #, c-format
 msgid "md5 failed on file '%s'"
 msgstr "파일 '%s'에서 md5가 작동하지 않습니다"
@@ -56,81 +63,81 @@ msgstr "알 수 없는 포맷 지정 '%s'입니다"
 msgid "at most one asterisk '*' is supported in each conversion specification"
 msgstr ""
 
-#: gramLatex.y:678 gramRd.y:1300
+#: gramLatex.c:2499 gramRd.c:3933
 #, c-format
 msgid "unable to allocate buffer for long string at line %d"
 msgstr "라인 %d에 있는 긴 문자열에 대한 버퍼를 할당할 수 없습니다"
 
-#: gramLatex.y:915 gramRd.y:1788 gramRd.y:1794
+#: gramLatex.c:2736 gramRd.c:4422 gramRd.c:4428
 #, c-format
 msgid "invalid '%s' value"
 msgstr "유효하지 않은 '%s' 값입니다"
 
-#: gramRd.y:295 gramRd.y:298
+#: gramRd.c:2591 gramRd.c:2594
 #, c-format
 msgid "bad markup (extra space?) at %s:%d:%d"
 msgstr "%s:%d:%d에 잘못된 마크업이 있습니다"
 
-#: gramRd.y:534
+#: gramRd.c:3150
 #, c-format
 msgid "Macro '%s' previously defined."
 msgstr "매크로 '%s'는 이전에 정의되었습니다"
 
-#: gramRd.y:543
+#: gramRd.c:3160
 #, c-format
 msgid "At most 4 arguments are allowed for user defined macros."
 msgstr "사용자 정의된 매크로에서는 최대 4개의 인자들이 허용됩니다"
 
-#: gramRd.y:577
+#: gramRd.c:3194
 #, c-format
 msgid "No macro definition for '%s'."
 msgstr "'%s'에 주어진 매크로 정의가 없습니다."
 
-#: gramRd.y:729 gramRd.y:733
+#: gramRd.c:3348 gramRd.c:3352
 #, c-format
 msgid "newline within quoted string at %s:%d"
 msgstr "%s:%d에 있는 따옴표 처리된 문자열 내에 새로운 행이 있습니다"
 
-#: gramRd.y:752
+#: gramRd.c:3371
 #, c-format
 msgid "unable to allocate buffer for long macro at line %d"
 msgstr "라인 %d에 있는 긴 매크로에 대해서 버퍼를 할당할 수 없습니다"
 
-#: gramRd.y:782
+#: gramRd.c:3401
 msgid "macros nested too deeply: infinite recursion?"
 msgstr "매크로들이 너무 깊게 중첩되어 있습니다:  무한 반복을 하나요?"
 
-#: gramRd.y:1165
+#: gramRd.c:3795
 #, c-format
 msgid "Unable to find macro %s"
 msgstr "매크로 %s를 찾을 수 없습니다"
 
-#: gramRd.y:1360
+#: gramRd.c:3993
 #, c-format
 msgid "Unexpected end of input (in %c quoted string opened at %s:%d:%d)"
 msgstr "입력을 끝을 알 수 없습니다 (in %c quoted string opened at %s:%d:%d)"
 
-#: gramRd.y:1799
+#: gramRd.c:4435
 msgid "cannot open the connection"
 msgstr "커넥션을 열 수 없습니다"
 
-#: gramRd.y:1806
+#: gramRd.c:4442
 msgid "cannot read from this connection"
 msgstr "이 커넥션으로부터 읽을 수 없습니다"
 
-#: gramRd.y:1814
+#: gramRd.c:4450
 msgid "invalid Rd file"
 msgstr "유효한 Rd 파일이 아닙니다"
 
-#: gramRd.y:1833
+#: gramRd.c:4469
 msgid "'deparseRd' only supports deparsing character elements"
 msgstr ""
 
-#: gramRd.y:1836
+#: gramRd.c:4472
 msgid "bad state"
 msgstr "잘못된 상태입니다"
 
-#: gramRd.y:1849
+#: gramRd.c:4485
 #, c-format
 msgid "bad text mode %d in 'deparseRd'"
 msgstr "'deparseRd'에 잘못된 텍스트 모드 %d가 있습니다"
@@ -139,27 +146,27 @@ msgstr "'deparseRd'에 잘못된 텍스트 모드 %d가 있습니다"
 msgid "invalid bind address specification"
 msgstr "유효하지 않은 바인드 주소지정이 있습니다"
 
-#: install.c:112 install.c:133 install.c:135
+#: install.c:112 install.c:131 install.c:133
 #, c-format
 msgid "invalid '%s' argument"
 msgstr "유효하지 않은 '%s' 인자입니다"
 
-#: install.c:163
+#: install.c:162
 msgid "write error during file append"
 msgstr "파일병합을 하는 동안 쓰기 에러가 발생했습니다"
 
-#: signals.c:43
+#: signals.c:42
 msgid "pskill() is not supported on this platform"
 msgstr "이 플랫폼에서 pskill()은 지원되지 않습니다"
 
-#: signals.c:140
+#: signals.c:139
 msgid "psnice() is not supported on this platform"
 msgstr "이 플랫폼에서 psnice()은 지원되지 않습니다"
 
-#: text.c:66
+#: text.c:67
 msgid "invalid argument type"
 msgstr "유효하지 않은 인자 타입입니다"
 
-#: text.c:223 text.c:245
+#: text.c:225 text.c:247
 msgid "out of memory"
 msgstr "메모리가 부족합니다"
diff --git a/src/library/tools/po/pl.po b/src/library/tools/po/pl.po
index 2dea4c8..2ac1325 100644
--- a/src/library/tools/po/pl.po
+++ b/src/library/tools/po/pl.po
@@ -1,8 +1,8 @@
 msgid ""
 msgstr ""
-"Project-Id-Version: R 3.1.0\n"
-"Report-Msgid-Bugs-To: bugs.r-project.org\n"
-"POT-Creation-Date: 2013-11-27 18:10+0000\n"
+"Project-Id-Version: R 3.4.0\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2016-04-01 10:28-0700\n"
 "PO-Revision-Date: \n"
 "Last-Translator: Łukasz Daniel <lukasz.daniel at gmail.com>\n"
 "Language-Team: Łukasz Daniel <lukasz.daniel at gmail.com>\n"
@@ -13,292 +13,156 @@ msgstr ""
 "na-Revision-Date: 2012-05-29 07:55+0100\n"
 "Plural-Forms: nplurals=3; plural=(n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 "
 "|| n%100>=20) ? 1 : 2);\n"
-"X-Poedit-SourceCharset: iso-8859-1\n"
-"X-Generator: Poedit 1.5.4\n"
+"X-Poedit-SourceCharset: UTF-8\n"
+"X-Generator: Poedit 1.8.7\n"
 
-# tools/src/Rmd5.c: 37
-# error(_("argument 'files' must be character"))
-#: Rmd5.c:37
+#: Rmd5.c:36
 msgid "argument 'files' must be character"
 msgstr "argument 'files' musi być tekstem"
 
-# tools/src/Rmd5.c: 51
-# warning(_("md5 failed on file '%s'"), path)
-#: Rmd5.c:51
+#: Rmd5.c:50
 #, c-format
 msgid "md5 failed on file '%s'"
 msgstr "md5 nie powiodło się na pliku '%s'"
 
-# tools/src/getfmts.c: 61
-# error(_("only %d arguments are allowed"), MAXNARGS)
 #: getfmts.c:61
 #, c-format
 msgid "only %d arguments are allowed"
 msgstr "tylko %d argumentów jest dozwolonych"
 
-# tools/src/getfmts.c: 66
-# error(_("'fmt' is not a character vector"))
 #: getfmts.c:66
 msgid "'fmt' is not a character vector"
 msgstr "'fmt' nie jest wektorem tekstowym"
 
-# tools/src/getfmts.c: 69
-# error(_("'fmt' must be length 1"))
 #: getfmts.c:69
 msgid "'fmt' must be length 1"
 msgstr "'fmt' musi mieć długość 1"
 
-# tools/src/getfmts.c: 75
-# error(_("'fmt' length exceeds maximal format length %d"), MAXLINE)
 #: getfmts.c:75
 #, c-format
 msgid "'fmt' length exceeds maximal format length %d"
 msgstr "długość 'fmt' przekracza maksymalną długość %d formatu"
 
-# tools/src/getfmts.c: 96
-# error(_("unrecognised format specification '%s'"), curFormat)
 #: getfmts.c:96
 #, c-format
 msgid "unrecognised format specification '%s'"
 msgstr "nierozpoznane określenie '%s' formatu"
 
-# tools/src/getfmts.c: 136
-# error(_("at most one asterisk '*' is supported in each conversion specification"))
 #: getfmts.c:136
 msgid "at most one asterisk '*' is supported in each conversion specification"
 msgstr ""
 "co najwyżej jedna gwiazdka '*' jest wspierana w każdym określeniu zamiany"
 
-# tools/src/gramLatex.c: 2447
-# error(_("unable to allocate buffer for long string at line %d"), parseState.xxlineno)
-# tools/src/gramRd.y: 1307
-# error(_("unable to allocate buffer for long string at line %d"), parseState.xxlineno)
-# tools/src/gramLatex.y: 685
-# error(_("unable to allocate buffer for long string at line %d"), parseState.xxlineno)
-# tools/src/gramRd.c: 4164
-# error(_("unable to allocate buffer for long string at line %d"), parseState.xxlineno)
-#: gramLatex.y:678 gramRd.y:1300
+#: gramLatex.c:2499 gramRd.c:3933
 #, c-format
 msgid "unable to allocate buffer for long string at line %d"
 msgstr "nie można przydzielić bufora dla długiego łańcucha w linii %d"
 
-# tools/src/gramLatex.c: 2684
-# error(_("invalid '%s' value"), "verbose")
-# tools/src/gramRd.y: 1795
-# error(_("invalid '%s' value"), "verbose")
-# tools/src/gramRd.y: 1801
-# error(_("invalid '%s' value"), "warningCalls")
-# tools/src/gramLatex.y: 922
-# error(_("invalid '%s' value"), "verbose")
-# tools/src/gramRd.c: 4652
-# error(_("invalid '%s' value"), "verbose")
-# tools/src/gramRd.c: 4658
-# error(_("invalid '%s' value"), "warningCalls")
-#: gramLatex.y:915 gramRd.y:1788 gramRd.y:1794
+#: gramLatex.c:2736 gramRd.c:4422 gramRd.c:4428
 #, c-format
 msgid "invalid '%s' value"
 msgstr "niepoprawny wartość '%s'"
 
-# tools/src/gramRd.y: 302
-# warning(_("bad markup (extra space?) at %s:%d:%d"), 
-#     	    					            parseState.xxBasename, @2.first_line, @2.first_column)
-# tools/src/gramRd.y: 305
-# warningcall(R_NilValue, _("bad markup (extra space?) at %s:%d:%d"), 
-#     	    					            parseState.xxBasename, @2.first_line, @2.first_column)
-# tools/src/gramRd.c: 2809
-# warning(_("bad markup (extra space?) at %s:%d:%d"), 
-#     	    					            parseState.xxBasename, (yylsp[(2) - (2)]).first_line, (yylsp[(2) - (2)]).first_column)
-# tools/src/gramRd.c: 2812
-# warningcall(R_NilValue, _("bad markup (extra space?) at %s:%d:%d"), 
-#     	    					            parseState.xxBasename, (yylsp[(2) - (2)]).first_line, (yylsp[(2) - (2)]).first_column)
-#: gramRd.y:295 gramRd.y:298
+#: gramRd.c:2591 gramRd.c:2594
 #, c-format
 msgid "bad markup (extra space?) at %s:%d:%d"
 msgstr "błędne oznakowanie (dodatkowa spacja?) w %s:%d:%d"
 
-# tools/src/gramRd.y: 541
-#  _("Macro '%s' previously defined.")
-# tools/src/gramRd.c: 3398
-#  _("Macro '%s' previously defined.")
-#: gramRd.y:534
+#: gramRd.c:3150
 #, c-format
 msgid "Macro '%s' previously defined."
 msgstr "Makro '%s' zostało już poprzednio zdefiniowane."
 
-# tools/src/gramRd.y: 550
-#  _("At most 4 arguments are allowed for user defined macros.")
-# tools/src/gramRd.c: 3407
-#  _("At most 4 arguments are allowed for user defined macros.")
-#: gramRd.y:543
+#: gramRd.c:3160
 #, c-format
 msgid "At most 4 arguments are allowed for user defined macros."
 msgstr ""
 "Co najwyżej 4 argumenty są dozwolone dla makr zdefiniowanych przez "
 "użytkownika."
 
-# tools/src/gramRd.y: 584
-# error(_("No macro definition for '%s'."), CHAR(STRING_ELT(macro,0)))
-# tools/src/gramRd.c: 3441
-# error(_("No macro definition for '%s'."), CHAR(STRING_ELT(macro,0)))
-#: gramRd.y:577
+#: gramRd.c:3194
 #, c-format
 msgid "No macro definition for '%s'."
 msgstr "Brak makra zdefiniowanego dla '%s'"
 
-# tools/src/gramRd.y: 736
-# warning(_("newline within quoted string at %s:%d"), 
-# 		    parseState.xxBasename, parseState.xxNewlineInString)
-# tools/src/gramRd.y: 739
-# warningcall(R_NilValue,
-# 			_("newline within quoted string at %s:%d"), 
-# 			parseState.xxBasename, parseState.xxNewlineInString)
-# tools/src/gramRd.c: 3593
-# warning(_("newline within quoted string at %s:%d"), 
-# 		    parseState.xxBasename, parseState.xxNewlineInString)
-# tools/src/gramRd.c: 3596
-# warningcall(R_NilValue,
-# 			_("newline within quoted string at %s:%d"), 
-# 			parseState.xxBasename, parseState.xxNewlineInString)
-#: gramRd.y:729 gramRd.y:733
+#: gramRd.c:3348 gramRd.c:3352
 #, c-format
 msgid "newline within quoted string at %s:%d"
 msgstr "nowa linia wewnątrz cytowanego łańcucha w %s:%d"
 
-# tools/src/gramRd.y: 759
-# error(_("unable to allocate buffer for long macro at line %d"), parseState.xxlineno)
-# tools/src/gramRd.c: 3616
-# error(_("unable to allocate buffer for long macro at line %d"), parseState.xxlineno)
-#: gramRd.y:752
+#: gramRd.c:3371
 #, c-format
 msgid "unable to allocate buffer for long macro at line %d"
 msgstr "nie można przydzielić bufora dla długiego makra w linii %d"
 
-# tools/src/gramRd.y: 789
-# error(_("macros nested too deeply: infinite recursion?"))
-# tools/src/gramRd.c: 3646
-# error(_("macros nested too deeply: infinite recursion?"))
-#: gramRd.y:782
+#: gramRd.c:3401
 msgid "macros nested too deeply: infinite recursion?"
 msgstr "makra są zagnieżdżone zbyt głęboko: nieskończona rekurencja?"
 
-# tools/src/gramRd.y: 1172
-# error(_("Unable to find macro %s"), s)
-# tools/src/gramRd.c: 4029
-# error(_("Unable to find macro %s"), s)
-#: gramRd.y:1165
+#: gramRd.c:3795
 #, c-format
 msgid "Unable to find macro %s"
 msgstr "Nie można znaleźć makra %s"
 
-# tools/src/gramRd.y: 1367
-# error(_("Unexpected end of input (in %c quoted string opened at %s:%d:%d)"), 
-#  			parseState.xxinRString, parseState.xxBasename, parseState.xxQuoteLine, parseState.xxQuoteCol)
-# tools/src/gramRd.c: 4224
-# error(_("Unexpected end of input (in %c quoted string opened at %s:%d:%d)"), 
-#  			parseState.xxinRString, parseState.xxBasename, parseState.xxQuoteLine, parseState.xxQuoteCol)
-#: gramRd.y:1360
+#: gramRd.c:3993
 #, c-format
 msgid "Unexpected end of input (in %c quoted string opened at %s:%d:%d)"
 msgstr ""
 "Nieoczekiwane zakończenie wejścia (w %c cytowanym łańcuchu otwartym w %s:%d:"
 "%d)"
 
-# tools/src/gramRd.y: 1806
-# error(_("cannot open the connection"))
-# tools/src/gramRd.c: 4663
-# error(_("cannot open the connection"))
-#: gramRd.y:1799
+#: gramRd.c:4435
 msgid "cannot open the connection"
 msgstr "nie można otworzyć połączenia"
 
-# tools/src/gramRd.y: 1813
-# error(_("cannot read from this connection"))
-# tools/src/gramRd.c: 4670
-# error(_("cannot read from this connection"))
-#: gramRd.y:1806
+#: gramRd.c:4442
 msgid "cannot read from this connection"
 msgstr "nie można czytać z tego połączenia"
 
-# tools/src/gramRd.y: 1821
-# error(_("invalid Rd file"))
-# tools/src/gramRd.c: 4678
-# error(_("invalid Rd file"))
-#: gramRd.y:1814
+#: gramRd.c:4450
 msgid "invalid Rd file"
 msgstr "niepoprawny plik Rd"
 
-# tools/src/gramRd.y: 1840
-# error(_("'deparseRd' only supports deparsing character elements"))
-# tools/src/gramRd.c: 4697
-# error(_("'deparseRd' only supports deparsing character elements"))
-#: gramRd.y:1833
+#: gramRd.c:4469
 msgid "'deparseRd' only supports deparsing character elements"
 msgstr ""
 "'deparseRd' wspiera tylko konwertowanie wyrażenia na łańcuch tekstowy dla "
 "elementów znakowych"
 
-# tools/src/gramRd.y: 1843
-# error(_("bad state"))
-# tools/src/gramRd.c: 4700
-# error(_("bad state"))
-#: gramRd.y:1836
+#: gramRd.c:4472
 msgid "bad state"
 msgstr "błędny stan"
 
-# tools/src/gramRd.y: 1856
-# error(_("bad text mode %d in 'deparseRd'"), parseState.xxmode)
-# tools/src/gramRd.c: 4713
-# error(_("bad text mode %d in 'deparseRd'"), parseState.xxmode)
-#: gramRd.y:1849
+#: gramRd.c:4485
 #, c-format
 msgid "bad text mode %d in 'deparseRd'"
 msgstr "błędny tryb %d tekstu w 'deparseRd'"
 
-# tools/src/http.c: 32
-# error(_("invalid bind address specification"))
 #: http.c:32
 msgid "invalid bind address specification"
 msgstr "niepoprawne określenie adresu wiążącego"
 
-# tools/src/install.c: 112
-# error(_("invalid '%s' argument"), "dir")
-# tools/src/install.c: 133
-# error(_("invalid '%s' argument"), "file1")
-# tools/src/install.c: 135
-# error(_("invalid '%s' argument"), "file2")
-#: install.c:112 install.c:133 install.c:135
+#: install.c:112 install.c:131 install.c:133
 #, c-format
 msgid "invalid '%s' argument"
 msgstr "niepoprawny argument '%s'"
 
-# tools/src/install.c: 163
-# warning(_("write error during file append"))
-#: install.c:163
+#: install.c:162
 msgid "write error during file append"
 msgstr "błąd zapisu podczas dołączania pliku"
 
-# tools/src/signals.c: 43
-# warning(_("pskill() is not supported on this platform"))
-#: signals.c:43
+#: signals.c:42
 msgid "pskill() is not supported on this platform"
 msgstr "'pskill()' nie jest wspierany na tej platformie"
 
-# tools/src/signals.c: 140
-# error(_("psnice() is not supported on this platform"))
-#: signals.c:140
+#: signals.c:139
 msgid "psnice() is not supported on this platform"
 msgstr "'psnice()' nie jest wspierany na tej platformie"
 
-# tools/src/text.c: 66
-# error(_("invalid argument type"))
-#: text.c:66
+#: text.c:67
 msgid "invalid argument type"
 msgstr "niepoprawny typ argumentu"
 
-# tools/src/text.c: 223
-# error(_("out of memory"))
-# tools/src/text.c: 245
-# error(_("out of memory"))
-#: text.c:223 text.c:245
+#: text.c:225 text.c:247
 msgid "out of memory"
 msgstr "brakło pamięci"
diff --git a/src/library/tools/po/pt_BR.po b/src/library/tools/po/pt_BR.po
index 2c0272a..2d19ac9 100644
--- a/src/library/tools/po/pt_BR.po
+++ b/src/library/tools/po/pt_BR.po
@@ -5,23 +5,23 @@
 msgid ""
 msgstr ""
 "Project-Id-Version: R 2.2.0\n"
-"Report-Msgid-Bugs-To: bugs.r-project.org\n"
-"POT-Creation-Date: 2013-11-27 18:10+0000\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2016-04-01 10:28-0700\n"
 "PO-Revision-Date: 2011-03-26 08:58-0300\n"
 "Last-Translator: Fernando Henrique <pessoal at fernandohrosa.com.br>\n"
 "Language-Team: http://www.feferraz.net/br/P/Projeto_Traducao_R_Portugues\n"
-"Language: \n"
+"Language: pt_BR\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
 "Plural-Forms: nplurals=2; plural=(n > 1);\n"
 "X-Generator: Pootle 2.0.5\n"
 
-#: Rmd5.c:37
+#: Rmd5.c:36
 msgid "argument 'files' must be character"
 msgstr "argumento 'files' deve ser do tipo caractere"
 
-#: Rmd5.c:51
+#: Rmd5.c:50
 #, c-format
 msgid "md5 failed on file '%s'"
 msgstr "md5 falhou no arquivo '%s'"
@@ -53,81 +53,81 @@ msgstr ""
 msgid "at most one asterisk '*' is supported in each conversion specification"
 msgstr ""
 
-#: gramLatex.y:678 gramRd.y:1300
+#: gramLatex.c:2499 gramRd.c:3933
 #, c-format
 msgid "unable to allocate buffer for long string at line %d"
 msgstr ""
 
-#: gramLatex.y:915 gramRd.y:1788 gramRd.y:1794
+#: gramLatex.c:2736 gramRd.c:4422 gramRd.c:4428
 #, fuzzy, c-format
 msgid "invalid '%s' value"
 msgstr "tipo de argumento inválido"
 
-#: gramRd.y:295 gramRd.y:298
+#: gramRd.c:2591 gramRd.c:2594
 #, c-format
 msgid "bad markup (extra space?) at %s:%d:%d"
 msgstr ""
 
-#: gramRd.y:534
+#: gramRd.c:3150
 #, c-format
 msgid "Macro '%s' previously defined."
 msgstr ""
 
-#: gramRd.y:543
+#: gramRd.c:3160
 #, c-format
 msgid "At most 4 arguments are allowed for user defined macros."
 msgstr ""
 
-#: gramRd.y:577
+#: gramRd.c:3194
 #, c-format
 msgid "No macro definition for '%s'."
 msgstr ""
 
-#: gramRd.y:729 gramRd.y:733
+#: gramRd.c:3348 gramRd.c:3352
 #, c-format
 msgid "newline within quoted string at %s:%d"
 msgstr ""
 
-#: gramRd.y:752
+#: gramRd.c:3371
 #, c-format
 msgid "unable to allocate buffer for long macro at line %d"
 msgstr ""
 
-#: gramRd.y:782
+#: gramRd.c:3401
 msgid "macros nested too deeply: infinite recursion?"
 msgstr ""
 
-#: gramRd.y:1165
+#: gramRd.c:3795
 #, c-format
 msgid "Unable to find macro %s"
 msgstr ""
 
-#: gramRd.y:1360
+#: gramRd.c:3993
 #, c-format
 msgid "Unexpected end of input (in %c quoted string opened at %s:%d:%d)"
 msgstr ""
 
-#: gramRd.y:1799
+#: gramRd.c:4435
 msgid "cannot open the connection"
 msgstr ""
 
-#: gramRd.y:1806
+#: gramRd.c:4442
 msgid "cannot read from this connection"
 msgstr ""
 
-#: gramRd.y:1814
+#: gramRd.c:4450
 msgid "invalid Rd file"
 msgstr ""
 
-#: gramRd.y:1833
+#: gramRd.c:4469
 msgid "'deparseRd' only supports deparsing character elements"
 msgstr ""
 
-#: gramRd.y:1836
+#: gramRd.c:4472
 msgid "bad state"
 msgstr ""
 
-#: gramRd.y:1849
+#: gramRd.c:4485
 #, c-format
 msgid "bad text mode %d in 'deparseRd'"
 msgstr ""
@@ -136,27 +136,27 @@ msgstr ""
 msgid "invalid bind address specification"
 msgstr ""
 
-#: install.c:112 install.c:133 install.c:135
+#: install.c:112 install.c:131 install.c:133
 #, fuzzy, c-format
 msgid "invalid '%s' argument"
 msgstr "tipo de argumento inválido"
 
-#: install.c:163
+#: install.c:162
 msgid "write error during file append"
 msgstr ""
 
-#: signals.c:43
+#: signals.c:42
 msgid "pskill() is not supported on this platform"
 msgstr ""
 
-#: signals.c:140
+#: signals.c:139
 msgid "psnice() is not supported on this platform"
 msgstr ""
 
-#: text.c:66
+#: text.c:67
 msgid "invalid argument type"
 msgstr "tipo de argumento inválido"
 
-#: text.c:223 text.c:245
+#: text.c:225 text.c:247
 msgid "out of memory"
 msgstr "falta de memória"
diff --git a/src/library/tools/po/ru.po b/src/library/tools/po/ru.po
index 70cfae9..9509320 100644
--- a/src/library/tools/po/ru.po
+++ b/src/library/tools/po/ru.po
@@ -9,17 +9,16 @@ msgid ""
 msgstr ""
 "Project-Id-Version: R 2.11.0\n"
 "Report-Msgid-Bugs-To: bugs.r-project.org\n"
-"POT-Creation-Date: 2013-11-27 18:10+0000\n"
-"PO-Revision-Date: 2013-03-19 22:36-0600\n"
+"POT-Creation-Date: 2015-06-06 13:51+0100\n"
+"PO-Revision-Date: 2016-04-05 18:06-0600\n"
 "Last-Translator: Alexey Shipunov <dactylorhiza at gmail.com>\n"
 "Language-Team: Russian\n"
-"Language: \n"
+"Language: ru\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=KOI8-R\n"
 "Content-Transfer-Encoding: 8bit\n"
 "First-Translator: Dmitri I GOULIAEV <dmitri.gouliaev at telkel.net\n"
-"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n"
-"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
+"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
 
 #: Rmd5.c:37
 msgid "argument 'files' must be character"
@@ -55,85 +54,88 @@ msgstr "
 
 #: getfmts.c:136
 msgid "at most one asterisk '*' is supported in each conversion specification"
-msgstr ""
-"����� ������� ���� ��������� '*' �������������� � ������ �������� "
-"��������������"
+msgstr "����� ������� ���� ��������� '*' �������������� � ������ �������� ��������������"
 
-#: gramLatex.y:678 gramRd.y:1300
+#: gramLatex.c:2499
+#: gramRd.c:3933
 #, c-format
 msgid "unable to allocate buffer for long string at line %d"
 msgstr "�� ���� ���������� ����� ��� ������� ��������� �� ������ %d"
 
-#: gramLatex.y:915 gramRd.y:1788 gramRd.y:1794
+#: gramLatex.c:2736
+#: gramRd.c:4422
+#: gramRd.c:4428
 #, c-format
 msgid "invalid '%s' value"
 msgstr "������������ �������� '%s'"
 
-#: gramRd.y:295 gramRd.y:298
+#: gramRd.c:2591
+#: gramRd.c:2594
 #, c-format
 msgid "bad markup (extra space?) at %s:%d:%d"
 msgstr "������ �������� (������ ������?) �� %s:%d:%d"
 
-#: gramRd.y:534
+#: gramRd.c:3150
 #, c-format
 msgid "Macro '%s' previously defined."
 msgstr "����� '%s' ��� ���������."
 
-#: gramRd.y:543
+#: gramRd.c:3160
 #, c-format
 msgid "At most 4 arguments are allowed for user defined macros."
 msgstr "�������� 4 ��������� ��������� ��� ���������������� ��������."
 
-#: gramRd.y:577
+#: gramRd.c:3194
 #, c-format
 msgid "No macro definition for '%s'."
 msgstr "��� ����������� ������� ��� '%s'."
 
-#: gramRd.y:729 gramRd.y:733
+#: gramRd.c:3348
+#: gramRd.c:3352
 #, c-format
 msgid "newline within quoted string at %s:%d"
 msgstr "����� ������ ������ ������������ ��������� �� %s:%d"
 
-#: gramRd.y:752
+#: gramRd.c:3371
 #, c-format
 msgid "unable to allocate buffer for long macro at line %d"
 msgstr "�� ���� ���������� ����� ��� �������� ����� �� ������ %d"
 
-#: gramRd.y:782
+#: gramRd.c:3401
 msgid "macros nested too deeply: infinite recursion?"
 msgstr "����� ������� ������� �������: ����������� ��������?"
 
-#: gramRd.y:1165
+#: gramRd.c:3795
 #, c-format
 msgid "Unable to find macro %s"
 msgstr "�� ���� ����� ����� %s"
 
-#: gramRd.y:1360
+#: gramRd.c:3993
 #, c-format
 msgid "Unexpected end of input (in %c quoted string opened at %s:%d:%d)"
 msgstr "����������� ����� ����� (� %c ������������ ������ ������� �� %s:%d:%d)"
 
-#: gramRd.y:1799
+#: gramRd.c:4435
 msgid "cannot open the connection"
 msgstr "�� ���� ������� ����������"
 
-#: gramRd.y:1806
+#: gramRd.c:4442
 msgid "cannot read from this connection"
 msgstr "�� ���� �������� �� ����� ����������"
 
-#: gramRd.y:1814
+#: gramRd.c:4450
 msgid "invalid Rd file"
 msgstr "������������ Rd-����"
 
-#: gramRd.y:1833
+#: gramRd.c:4469
 msgid "'deparseRd' only supports deparsing character elements"
 msgstr "'deparseRd' ������������ ������ deparsing-�������"
 
-#: gramRd.y:1836
+#: gramRd.c:4472
 msgid "bad state"
 msgstr "������ ���������"
 
-#: gramRd.y:1849
+#: gramRd.c:4485
 #, c-format
 msgid "bad text mode %d in 'deparseRd'"
 msgstr "������ ��������� ����� %d � 'deparseRd'"
@@ -142,7 +144,9 @@ msgstr "
 msgid "invalid bind address specification"
 msgstr "������������ �������� ������ ��������"
 
-#: install.c:112 install.c:133 install.c:135
+#: install.c:112
+#: install.c:133
+#: install.c:135
 #, c-format
 msgid "invalid '%s' argument"
 msgstr "������������ �������� '%s'"
@@ -163,6 +167,8 @@ msgstr "psnice()  
 msgid "invalid argument type"
 msgstr "������������ ��� ���������"
 
-#: text.c:223 text.c:245
+#: text.c:223
+#: text.c:245
 msgid "out of memory"
 msgstr "�� ������� ������"
+
diff --git a/src/library/tools/po/tools.pot b/src/library/tools/po/tools.pot
index fdf3190..25ee33a 100644
--- a/src/library/tools/po/tools.pot
+++ b/src/library/tools/po/tools.pot
@@ -1,14 +1,14 @@
 # SOME DESCRIPTIVE TITLE.
-# Copyright (C) YEAR The R Core Team
+# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
 # This file is distributed under the same license as the PACKAGE package.
 # FIRST AUTHOR <EMAIL at ADDRESS>, YEAR.
 #
 #, fuzzy
 msgid ""
 msgstr ""
-"Project-Id-Version: R 3.1.0\n"
-"Report-Msgid-Bugs-To: bugs.r-project.org\n"
-"POT-Creation-Date: 2013-11-27 18:10+0000\n"
+"Project-Id-Version: tools 3.4.0\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2016-04-01 10:28-0700\n"
 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
 "Last-Translator: FULL NAME <EMAIL at ADDRESS>\n"
 "Language-Team: LANGUAGE <LL at li.org>\n"
@@ -17,11 +17,11 @@ msgstr ""
 "Content-Type: text/plain; charset=CHARSET\n"
 "Content-Transfer-Encoding: 8bit\n"
 
-#: Rmd5.c:37
+#: Rmd5.c:36
 msgid "argument 'files' must be character"
 msgstr ""
 
-#: Rmd5.c:51
+#: Rmd5.c:50
 #, c-format
 msgid "md5 failed on file '%s'"
 msgstr ""
@@ -53,81 +53,81 @@ msgstr ""
 msgid "at most one asterisk '*' is supported in each conversion specification"
 msgstr ""
 
-#: gramLatex.y:678 gramRd.y:1300
+#: gramLatex.c:2499 gramRd.c:3933
 #, c-format
 msgid "unable to allocate buffer for long string at line %d"
 msgstr ""
 
-#: gramLatex.y:915 gramRd.y:1788 gramRd.y:1794
+#: gramLatex.c:2736 gramRd.c:4422 gramRd.c:4428
 #, c-format
 msgid "invalid '%s' value"
 msgstr ""
 
-#: gramRd.y:295 gramRd.y:298
+#: gramRd.c:2591 gramRd.c:2594
 #, c-format
 msgid "bad markup (extra space?) at %s:%d:%d"
 msgstr ""
 
-#: gramRd.y:534
+#: gramRd.c:3150
 #, c-format
 msgid "Macro '%s' previously defined."
 msgstr ""
 
-#: gramRd.y:543
+#: gramRd.c:3160
 #, c-format
 msgid "At most 4 arguments are allowed for user defined macros."
 msgstr ""
 
-#: gramRd.y:577
+#: gramRd.c:3194
 #, c-format
 msgid "No macro definition for '%s'."
 msgstr ""
 
-#: gramRd.y:729 gramRd.y:733
+#: gramRd.c:3348 gramRd.c:3352
 #, c-format
 msgid "newline within quoted string at %s:%d"
 msgstr ""
 
-#: gramRd.y:752
+#: gramRd.c:3371
 #, c-format
 msgid "unable to allocate buffer for long macro at line %d"
 msgstr ""
 
-#: gramRd.y:782
+#: gramRd.c:3401
 msgid "macros nested too deeply: infinite recursion?"
 msgstr ""
 
-#: gramRd.y:1165
+#: gramRd.c:3795
 #, c-format
 msgid "Unable to find macro %s"
 msgstr ""
 
-#: gramRd.y:1360
+#: gramRd.c:3993
 #, c-format
 msgid "Unexpected end of input (in %c quoted string opened at %s:%d:%d)"
 msgstr ""
 
-#: gramRd.y:1799
+#: gramRd.c:4435
 msgid "cannot open the connection"
 msgstr ""
 
-#: gramRd.y:1806
+#: gramRd.c:4442
 msgid "cannot read from this connection"
 msgstr ""
 
-#: gramRd.y:1814
+#: gramRd.c:4450
 msgid "invalid Rd file"
 msgstr ""
 
-#: gramRd.y:1833
+#: gramRd.c:4469
 msgid "'deparseRd' only supports deparsing character elements"
 msgstr ""
 
-#: gramRd.y:1836
+#: gramRd.c:4472
 msgid "bad state"
 msgstr ""
 
-#: gramRd.y:1849
+#: gramRd.c:4485
 #, c-format
 msgid "bad text mode %d in 'deparseRd'"
 msgstr ""
@@ -136,27 +136,27 @@ msgstr ""
 msgid "invalid bind address specification"
 msgstr ""
 
-#: install.c:112 install.c:133 install.c:135
+#: install.c:112 install.c:131 install.c:133
 #, c-format
 msgid "invalid '%s' argument"
 msgstr ""
 
-#: install.c:163
+#: install.c:162
 msgid "write error during file append"
 msgstr ""
 
-#: signals.c:43
+#: signals.c:42
 msgid "pskill() is not supported on this platform"
 msgstr ""
 
-#: signals.c:140
+#: signals.c:139
 msgid "psnice() is not supported on this platform"
 msgstr ""
 
-#: text.c:66
+#: text.c:67
 msgid "invalid argument type"
 msgstr ""
 
-#: text.c:223 text.c:245
+#: text.c:225 text.c:247
 msgid "out of memory"
 msgstr ""
diff --git a/src/library/tools/po/zh_CN.po b/src/library/tools/po/zh_CN.po
index 3a962c2..449c694 100644
--- a/src/library/tools/po/zh_CN.po
+++ b/src/library/tools/po/zh_CN.po
@@ -6,22 +6,22 @@
 msgid ""
 msgstr ""
 "Project-Id-Version: R 2.4.0\n"
-"Report-Msgid-Bugs-To: bugs.r-project.org\n"
-"POT-Creation-Date: 2013-11-27 18:10+0000\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2016-04-01 10:28-0700\n"
 "PO-Revision-Date: 2005-02-04 08:37+0000\n"
 "Last-Translator: 陈斐 <feic at normipaiva.com>\n"
 "Language-Team: Chinese\n"
-"Language: \n"
+"Language: zh_CN\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
 "Plural-Forms: nplurals=1; plural=0;\n"
 
-#: Rmd5.c:37
+#: Rmd5.c:36
 msgid "argument 'files' must be character"
 msgstr "参数'files'必需是字符"
 
-#: Rmd5.c:51
+#: Rmd5.c:50
 #, c-format
 msgid "md5 failed on file '%s'"
 msgstr "用于'%s'文件的md5运行失败"
@@ -53,81 +53,81 @@ msgstr "没有这样的格式设定'%s'"
 msgid "at most one asterisk '*' is supported in each conversion specification"
 msgstr "每一个转换设置最多只支持一个星'*'"
 
-#: gramLatex.y:678 gramRd.y:1300
+#: gramLatex.c:2499 gramRd.c:3933
 #, c-format
 msgid "unable to allocate buffer for long string at line %d"
 msgstr "无法为%d行的长字串分配缓冲区"
 
-#: gramLatex.y:915 gramRd.y:1788 gramRd.y:1794
+#: gramLatex.c:2736 gramRd.c:4422 gramRd.c:4428
 #, c-format
 msgid "invalid '%s' value"
 msgstr "'%s'值不对"
 
-#: gramRd.y:295 gramRd.y:298
+#: gramRd.c:2591 gramRd.c:2594
 #, c-format
 msgid "bad markup (extra space?) at %s:%d:%d"
 msgstr "坏标记(额外的空间?)在%s:%d:%d"
 
-#: gramRd.y:534
+#: gramRd.c:3150
 #, c-format
 msgid "Macro '%s' previously defined."
 msgstr "'%s'宏之前已经定义了"
 
-#: gramRd.y:543
+#: gramRd.c:3160
 #, c-format
 msgid "At most 4 arguments are allowed for user defined macros."
 msgstr "用户定义的宏最多只允许四个参数"
 
-#: gramRd.y:577
+#: gramRd.c:3194
 #, c-format
 msgid "No macro definition for '%s'."
 msgstr "'%s'宏的定义没有。"
 
-#: gramRd.y:729 gramRd.y:733
+#: gramRd.c:3348 gramRd.c:3352
 #, c-format
 msgid "newline within quoted string at %s:%d"
 msgstr "出现了换行内引号的字符串在%s:%d"
 
-#: gramRd.y:752
+#: gramRd.c:3371
 #, c-format
 msgid "unable to allocate buffer for long macro at line %d"
 msgstr "无法为在第%d行的长宏分配缓冲区"
 
-#: gramRd.y:782
+#: gramRd.c:3401
 msgid "macros nested too deeply: infinite recursion?"
 msgstr "宏嵌套过深:无限递归?"
 
-#: gramRd.y:1165
+#: gramRd.c:3795
 #, c-format
 msgid "Unable to find macro %s"
 msgstr "找不到宏%s "
 
-#: gramRd.y:1360
+#: gramRd.c:3993
 #, c-format
 msgid "Unexpected end of input (in %c quoted string opened at %s:%d:%d)"
 msgstr "意外结束输入(在%c 引号的字符串于%s:%d:%d)"
 
-#: gramRd.y:1799
+#: gramRd.c:4435
 msgid "cannot open the connection"
 msgstr "打不开链接"
 
-#: gramRd.y:1806
+#: gramRd.c:4442
 msgid "cannot read from this connection"
 msgstr "无法从这个链接读取"
 
-#: gramRd.y:1814
+#: gramRd.c:4450
 msgid "invalid Rd file"
 msgstr "Rd文件不对"
 
-#: gramRd.y:1833
+#: gramRd.c:4469
 msgid "'deparseRd' only supports deparsing character elements"
 msgstr "'deparseRd'只支持反解析字符元素"
 
-#: gramRd.y:1836
+#: gramRd.c:4472
 msgid "bad state"
 msgstr "状态不好"
 
-#: gramRd.y:1849
+#: gramRd.c:4485
 #, c-format
 msgid "bad text mode %d in 'deparseRd'"
 msgstr "'deparseRd'里的文本模式%d不对"
@@ -136,27 +136,27 @@ msgstr "'deparseRd'里的文本模式%d不对"
 msgid "invalid bind address specification"
 msgstr "绑定地址规范不对"
 
-#: install.c:112 install.c:133 install.c:135
+#: install.c:112 install.c:131 install.c:133
 #, c-format
 msgid "invalid '%s' argument"
 msgstr "'%s'参数不对"
 
-#: install.c:163
+#: install.c:162
 msgid "write error during file append"
 msgstr "文件追加写入时出了错"
 
-#: signals.c:43
+#: signals.c:42
 msgid "pskill() is not supported on this platform"
 msgstr "这个平台不支持pskill()"
 
-#: signals.c:140
+#: signals.c:139
 msgid "psnice() is not supported on this platform"
 msgstr "这个平台不支持psnice()"
 
-#: text.c:66
+#: text.c:67
 msgid "invalid argument type"
 msgstr "参数种类不对"
 
-#: text.c:223 text.c:245
+#: text.c:225 text.c:247
 msgid "out of memory"
 msgstr "内存不足"
diff --git a/src/library/tools/src/Makefile.in b/src/library/tools/src/Makefile.in
index 8997973..764632a 100644
--- a/src/library/tools/src/Makefile.in
+++ b/src/library/tools/src/Makefile.in
@@ -60,7 +60,8 @@ $(srcdir)/gramRd.c: @MAINTAINER_MODE_TRUE@ $(srcdir)/gramRd.y
 	@$(ECHO) "re-making gramRd.c"
 	$(YACC) $(YFLAGS) $(srcdir)/gramRd.y
 	$(SHELL) $(top_srcdir)/tools/move-if-change y.tab.c $(srcdir)/gramRd.c	
-$(srcdir)/gramLatex.c: @MAINTAINER_MODE_TRUE@ $(srcdir)/gramLatex.y
+# depend on gramRd.c to avoid race condition with parallel make
+$(srcdir)/gramLatex.c: @MAINTAINER_MODE_TRUE@ $(srcdir)/gramLatex.y $(srcdir)/gramRd.c
 	@$(ECHO) "re-making gramLatex.c"
 	$(YACC) $(YFLAGS) $(srcdir)/gramLatex.y
 	$(SHELL) $(top_srcdir)/tools/move-if-change y.tab.c $(srcdir)/gramLatex.c
diff --git a/src/library/tools/src/Rmd5.c b/src/library/tools/src/Rmd5.c
index e7b8d5f..2760a10 100644
--- a/src/library/tools/src/Rmd5.c
+++ b/src/library/tools/src/Rmd5.c
@@ -14,12 +14,11 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  */
 
 /* <UTF8> OK since this is intended to treat chars as byte streams */
 
-#include <R.h>
 #include "tools.h"
 #define ROL_UNUSED
 #include "md5.h"
diff --git a/src/library/tools/src/getfmts.c b/src/library/tools/src/getfmts.c
index b6c9ebf..1791c8d 100644
--- a/src/library/tools/src/getfmts.c
+++ b/src/library/tools/src/getfmts.c
@@ -14,7 +14,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  *
  * Formerly part of src/main/sprintf.c
 */
diff --git a/src/library/tools/src/gramLatex.c b/src/library/tools/src/gramLatex.c
index 431bcdc..634647b 100644
--- a/src/library/tools/src/gramLatex.c
+++ b/src/library/tools/src/gramLatex.c
@@ -1,9 +1,8 @@
-/* A Bison parser, made by GNU Bison 2.4.2.  */
+/* A Bison parser, made by GNU Bison 2.7.12-4996.  */
 
-/* Skeleton implementation for Bison's Yacc-like parsers in C
+/* Bison implementation for Yacc-like parsers in C
    
-      Copyright (C) 1984, 1989-1990, 2000-2006, 2009-2010 Free Software
-   Foundation, Inc.
+      Copyright (C) 1984, 1989-1990, 2000-2013 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
@@ -45,7 +44,7 @@
 #define YYBISON 1
 
 /* Bison version.  */
-#define YYBISON_VERSION "2.4.2"
+#define YYBISON_VERSION "2.7.12-4996"
 
 /* Skeleton name.  */
 #define YYSKELETON_NAME "yacc.c"
@@ -59,20 +58,16 @@
 /* Pull parsers.  */
 #define YYPULL 1
 
-/* Using locations.  */
-#define YYLSP_NEEDED 1
 
 
 
 /* Copy the first part of user declarations.  */
 
-/* Line 189 of yacc.c  */
-#line 2 "gramLatex.y"
 
 /*
  *  R : A Computer Langage for Statistical Data Analysis
  *  Copyright (C) 1995, 1996, 1997  Robert Gentleman and Ross Ihaka
- *  Copyright (C) 1997--2013  The R Core Team
+ *  Copyright (C) 1997--2016  The R Core Team
  *  Copyright (C) 2010 Duncan Murdoch
  *
  *  This program is free software; you can redistribute it and/or modify
@@ -87,7 +82,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  */
 
 #ifdef HAVE_CONFIG_H
@@ -138,7 +133,7 @@ typedef struct yyltype
 # define YYLTYPE yyltype
 # 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;	\
@@ -156,7 +151,7 @@ typedef struct yyltype
 	  (Current).first_byte   = (Current).last_byte =		\
 	    YYRHSLOC (Rhs, 0).last_byte;				\
 	}								\
-    while (YYID (0))
+    while (0)
 
 /* Useful defines so editors don't get confused ... */
 
@@ -217,13 +212,14 @@ static int      mkVerbEnv();
 
 
 
-/* Line 189 of yacc.c  */
-#line 215 "gramLatex.c"
 
-/* Enabling traces.  */
-#ifndef YYDEBUG
-# define YYDEBUG 0
-#endif
+# ifndef YY_NULL
+#  if defined __cplusplus && 201103L <= __cplusplus
+#   define YY_NULL nullptr
+#  else
+#   define YY_NULL 0
+#  endif
+# endif
 
 /* Enabling verbose error messages.  */
 #ifdef YYERROR_VERBOSE
@@ -233,11 +229,14 @@ static int      mkVerbEnv();
 # define YYERROR_VERBOSE 0
 #endif
 
-/* Enabling the token table.  */
-#ifndef YYTOKEN_TABLE
-# define YYTOKEN_TABLE 0
-#endif
 
+/* Enabling traces.  */
+#ifndef YYDEBUG
+# define YYDEBUG 0
+#endif
+#if YYDEBUG
+extern int yydebug;
+#endif
 
 /* Tokens.  */
 #ifndef YYTOKENTYPE
@@ -255,6 +254,15 @@ static int      mkVerbEnv();
      VERB = 265
    };
 #endif
+/* Tokens.  */
+#define END_OF_INPUT 258
+#define ERROR 259
+#define MACRO 260
+#define TEXT 261
+#define COMMENT 262
+#define BEGIN 263
+#define END 264
+#define VERB 265
 
 
 
@@ -278,12 +286,27 @@ typedef struct YYLTYPE
 # 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 */
+
+
 
 /* Copy the second part of user declarations.  */
 
 
-/* Line 264 of yacc.c  */
-#line 280 "gramLatex.c"
 
 #ifdef short
 # undef short
@@ -336,24 +359,33 @@ typedef short int yytype_int16;
 # if defined YYENABLE_NLS && YYENABLE_NLS
 #  if ENABLE_NLS
 #   include <libintl.h> /* INFRINGES ON USER NAME SPACE */
-#   define YY_(msgid) dgettext ("bison-runtime", msgid)
+#   define YY_(Msgid) dgettext ("bison-runtime", Msgid)
 #  endif
 # endif
 # ifndef YY_
-#  define YY_(msgid) msgid
+#  define YY_(Msgid) Msgid
+# 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 */
 # endif
 #endif
 
 /* Suppress unused-variable warnings by "using" E.  */
 #if ! defined lint || defined __GNUC__
-# define YYUSE(e) ((void) (e))
+# define YYUSE(E) ((void) (E))
 #else
-# define YYUSE(e) /* empty */
+# define YYUSE(E) /* empty */
 #endif
 
+
 /* Identity function, used to suppress warnings about constant conditions.  */
 #ifndef lint
-# define YYID(n) (n)
+# define YYID(N) (N)
 #else
 #if (defined __STDC__ || defined __C99__FUNC__ \
      || defined __cplusplus || defined _MSC_VER)
@@ -386,11 +418,12 @@ YYID (yyi)
 #    define alloca _alloca
 #   else
 #    define YYSTACK_ALLOC alloca
-#    if ! defined _ALLOCA_H && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
+#    if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \
      || defined __cplusplus || defined _MSC_VER)
 #     include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
-#     ifndef _STDLIB_H
-#      define _STDLIB_H 1
+      /* Use EXIT_SUCCESS as a witness for stdlib.h.  */
+#     ifndef EXIT_SUCCESS
+#      define EXIT_SUCCESS 0
 #     endif
 #    endif
 #   endif
@@ -413,24 +446,24 @@ YYID (yyi)
 #  ifndef YYSTACK_ALLOC_MAXIMUM
 #   define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
 #  endif
-#  if (defined __cplusplus && ! defined _STDLIB_H \
+#  if (defined __cplusplus && ! defined EXIT_SUCCESS \
        && ! ((defined YYMALLOC || defined malloc) \
 	     && (defined YYFREE || defined free)))
 #   include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
-#   ifndef _STDLIB_H
-#    define _STDLIB_H 1
+#   ifndef EXIT_SUCCESS
+#    define EXIT_SUCCESS 0
 #   endif
 #  endif
 #  ifndef YYMALLOC
 #   define YYMALLOC malloc
-#   if ! defined malloc && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
+#   if ! defined malloc && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \
      || defined __cplusplus || defined _MSC_VER)
 void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
 #   endif
 #  endif
 #  ifndef YYFREE
 #   define YYFREE free
-#   if ! defined free && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
+#   if ! defined free && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \
      || defined __cplusplus || defined _MSC_VER)
 void free (void *); /* INFRINGES ON USER NAME SPACE */
 #   endif
@@ -461,23 +494,7 @@ union yyalloc
      ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE) + sizeof (YYLTYPE)) \
       + 2 * YYSTACK_GAP_MAXIMUM)
 
-/* Copy COUNT objects from FROM to TO.  The source and destination do
-   not overlap.  */
-# ifndef YYCOPY
-#  if defined __GNUC__ && 1 < __GNUC__
-#   define YYCOPY(To, From, Count) \
-      __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
-#  else
-#   define YYCOPY(To, From, Count)		\
-      do					\
-	{					\
-	  YYSIZE_T yyi;				\
-	  for (yyi = 0; yyi < (Count); yyi++)	\
-	    (To)[yyi] = (From)[yyi];		\
-	}					\
-      while (YYID (0))
-#  endif
-# endif
+# define YYCOPY_NEEDED 1
 
 /* Relocate STACK from its old location to the new one.  The
    local variables YYSIZE and YYSTACKSIZE give the old and new number of
@@ -497,6 +514,26 @@ union yyalloc
 
 #endif
 
+#if defined YYCOPY_NEEDED && YYCOPY_NEEDED
+/* Copy COUNT objects from SRC to DST.  The source and destination do
+   not overlap.  */
+# ifndef YYCOPY
+#  if defined __GNUC__ && 1 < __GNUC__
+#   define YYCOPY(Dst, Src, Count) \
+      __builtin_memcpy (Dst, Src, (Count) * sizeof (*(Src)))
+#  else
+#   define YYCOPY(Dst, Src, Count)              \
+      do                                        \
+        {                                       \
+          YYSIZE_T yyi;                         \
+          for (yyi = 0; yyi < (Count); yyi++)   \
+            (Dst)[yyi] = (Src)[yyi];            \
+        }                                       \
+      while (YYID (0))
+#  endif
+# endif
+#endif /* !YYCOPY_NEEDED */
+
 /* YYFINAL -- State number of the termination state.  */
 #define YYFINAL  21
 /* YYLAST -- Last index in YYTABLE.  */
@@ -574,13 +611,13 @@ static const yytype_int8 yyrhs[] =
 /* YYRLINE[YYN] -- source line where rule number YYN was defined.  */
 static const yytype_uint8 yyrline[] =
 {
-       0,   159,   159,   160,   161,   164,   165,   166,   167,   169,
-     170,   172,   173,   174,   175,   176,   177,   179,   179,   183,
-     185,   186
+       0,   166,   166,   167,   168,   171,   172,   173,   174,   176,
+     177,   179,   180,   181,   182,   183,   184,   186,   186,   190,
+     192,   193
 };
 #endif
 
-#if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE
+#if YYDEBUG || YYERROR_VERBOSE || 0
 /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
    First, the terminals, then, starting at YYNTOKENS, nonterminals.  */
 static const char *const yytname[] =
@@ -588,7 +625,7 @@ 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", 0
+  "block", YY_NULL
 };
 #endif
 
@@ -618,8 +655,8 @@ static const yytype_uint8 yyr2[] =
        3,     2
 };
 
-/* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state
-   STATE-NUM when YYTABLE doesn't specify something else to do.  Zero
+/* 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[] =
 {
@@ -654,8 +691,7 @@ static const yytype_int8 yypgoto[] =
 
 /* 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 zero, do what YYDEFACT says.
-   If YYTABLE_NINF, syntax error.  */
+   number is the opposite.  If YYTABLE_NINF, syntax error.  */
 #define YYTABLE_NINF -1
 static const yytype_uint8 yytable[] =
 {
@@ -670,6 +706,12 @@ 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,
@@ -720,24 +762,24 @@ static const yytype_uint8 yystos[] =
 
 #define YYRECOVERING()  (!!yyerrstatus)
 
-#define YYBACKUP(Token, Value)					\
-do								\
-  if (yychar == YYEMPTY && yylen == 1)				\
-    {								\
-      yychar = (Token);						\
-      yylval = (Value);						\
-      yytoken = YYTRANSLATE (yychar);				\
-      YYPOPSTACK (1);						\
-      goto yybackup;						\
-    }								\
-  else								\
-    {								\
+#define YYBACKUP(Token, Value)                                  \
+do                                                              \
+  if (yychar == YYEMPTY)                                        \
+    {                                                           \
+      yychar = (Token);                                         \
+      yylval = (Value);                                         \
+      YYPOPSTACK (yylen);                                       \
+      yystate = *yyssp;                                         \
+      goto yybackup;                                            \
+    }                                                           \
+  else                                                          \
+    {                                                           \
       yyerror (YY_("syntax error: cannot back up")); \
       YYERROR;							\
     }								\
 while (YYID (0))
 
-
+/* Error token number */
 #define YYTERROR	1
 #define YYERRCODE	256
 
@@ -746,27 +788,28 @@ while (YYID (0))
    If N is 0, then set CURRENT to the empty location which ends
    the previous symbol: RHS[0] (always defined).  */
 
-#define YYRHSLOC(Rhs, K) ((Rhs)[K])
 #ifndef YYLLOC_DEFAULT
-# define YYLLOC_DEFAULT(Current, Rhs, N)				\
-    do									\
-      if (YYID (N))                                                    \
-	{								\
-	  (Current).first_line   = YYRHSLOC (Rhs, 1).first_line;	\
-	  (Current).first_column = YYRHSLOC (Rhs, 1).first_column;	\
-	  (Current).last_line    = YYRHSLOC (Rhs, N).last_line;		\
-	  (Current).last_column  = YYRHSLOC (Rhs, N).last_column;	\
-	}								\
-      else								\
-	{								\
-	  (Current).first_line   = (Current).last_line   =		\
-	    YYRHSLOC (Rhs, 0).last_line;				\
-	  (Current).first_column = (Current).last_column =		\
-	    YYRHSLOC (Rhs, 0).last_column;				\
-	}								\
+# define YYLLOC_DEFAULT(Current, Rhs, N)                                \
+    do                                                                  \
+      if (YYID (N))                                                     \
+        {                                                               \
+          (Current).first_line   = YYRHSLOC (Rhs, 1).first_line;        \
+          (Current).first_column = YYRHSLOC (Rhs, 1).first_column;      \
+          (Current).last_line    = YYRHSLOC (Rhs, N).last_line;         \
+          (Current).last_column  = YYRHSLOC (Rhs, N).last_column;       \
+        }                                                               \
+      else                                                              \
+        {                                                               \
+          (Current).first_line   = (Current).last_line   =              \
+            YYRHSLOC (Rhs, 0).last_line;                                \
+          (Current).first_column = (Current).last_column =              \
+            YYRHSLOC (Rhs, 0).last_column;                              \
+        }                                                               \
     while (YYID (0))
 #endif
 
+#define YYRHSLOC(Rhs, K) ((Rhs)[K])
+
 
 /* YY_LOCATION_PRINT -- Print the location on the stream.
    This macro was not mandated originally: define only if we know
@@ -774,10 +817,46 @@ while (YYID (0))
 
 #ifndef YY_LOCATION_PRINT
 # if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL
-#  define YY_LOCATION_PRINT(File, Loc)			\
-     fprintf (File, "%d.%d-%d.%d",			\
-	      (Loc).first_line, (Loc).first_column,	\
-	      (Loc).last_line,  (Loc).last_column)
+
+/* Print *YYLOCP on YYO.  Private, do not rely on its existence. */
+
+__attribute__((__unused__))
+#if (defined __STDC__ || defined __C99__FUNC__ \
+     || defined __cplusplus || defined _MSC_VER)
+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);
+      if (0 <= yylocp->first_column)
+        res += fprintf (yyo, ".%d", yylocp->first_column);
+    }
+  if (0 <= yylocp->last_line)
+    {
+      if (yylocp->first_line < yylocp->last_line)
+        {
+          res += fprintf (yyo, "-%d", yylocp->last_line);
+          if (0 <= end_col)
+            res += fprintf (yyo, ".%d", end_col);
+        }
+      else if (0 <= end_col && yylocp->first_column < end_col)
+        res += fprintf (yyo, "-%d", end_col);
+    }
+  return res;
+ }
+
+#  define YY_LOCATION_PRINT(File, Loc)          \
+  yy_location_print_ (File, &(Loc))
+
 # else
 #  define YY_LOCATION_PRINT(File, Loc) ((void) 0)
 # endif
@@ -785,7 +864,6 @@ while (YYID (0))
 
 
 /* YYLEX -- calling `yylex' with the right arguments.  */
-
 #ifdef YYLEX_PARAM
 # define YYLEX yylex (YYLEX_PARAM)
 #else
@@ -836,6 +914,8 @@ yy_symbol_value_print (yyoutput, yytype, yyvaluep, yylocationp)
     YYLTYPE const * const yylocationp;
 #endif
 {
+  FILE *yyo = yyoutput;
+  YYUSE (yyo);
   if (!yyvaluep)
     return;
   YYUSE (yylocationp);
@@ -845,11 +925,7 @@ yy_symbol_value_print (yyoutput, yytype, yyvaluep, yylocationp)
 # else
   YYUSE (yyoutput);
 # endif
-  switch (yytype)
-    {
-      default:
-	break;
-    }
+  YYUSE (yytype);
 }
 
 
@@ -978,7 +1054,6 @@ int yydebug;
 # define YYMAXDEPTH 10000
 #endif
 
-

 
 #if YYERROR_VERBOSE
 
@@ -1081,115 +1156,145 @@ yytnamerr (char *yyres, const char *yystr)
 }
 # endif
 
-/* Copy into YYRESULT an error message about the unexpected token
-   YYCHAR while in state YYSTATE.  Return the number of bytes copied,
-   including the terminating null byte.  If YYRESULT is null, do not
-   copy anything; just return the number of bytes that would be
-   copied.  As a special case, return 0 if an ordinary "syntax error"
-   message will do.  Return YYSIZE_MAXIMUM if overflow occurs during
-   size calculation.  */
-static YYSIZE_T
-yysyntax_error (char *yyresult, int yystate, int yychar)
-{
-  int yyn = yypact[yystate];
+/* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message
+   about the unexpected token YYTOKEN for the state stack whose top is
+   YYSSP.
 
-  if (! (YYPACT_NINF < yyn && yyn <= YYLAST))
-    return 0;
-  else
+   Return 0 if *YYMSG was successfully written.  Return 1 if *YYMSG is
+   not large enough to hold the message.  In that case, also set
+   *YYMSG_ALLOC to the required number of bytes.  Return 2 if the
+   required number of bytes is too large to store.  */
+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 yysize = yysize0;
+  enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
+  /* Internationalized format string. */
+  const char *yyformat = YY_NULL;
+  /* Arguments of yyformat. */
+  char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
+  /* Number of reported tokens (one for the "unexpected", one per
+     "expected"). */
+  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
+       tokens because there are none.
+     - The only way there can be no lookahead present (in yychar) is if
+       this state is a consistent state with a default action.  Thus,
+       detecting the absence of a lookahead is sufficient to determine
+       that there is no unexpected or expected token to report.  In that
+       case, just report a simple "syntax error".
+     - Don't assume there isn't a lookahead just because this state is a
+       consistent state with a default action.  There might have been a
+       previous inconsistent state, consistent state with a non-default
+       action, or user semantic action that manipulated yychar.
+     - Of course, the expected token list depends on states to have
+       correct lookahead information, and it depends on the parser not
+       to perform extra reductions after fetching a lookahead from the
+       scanner and before detecting a syntax error.  Thus, state merging
+       (from LALR or IELR) and default reductions corrupt the expected
+       token list.  However, the list is correct for canonical LR with
+       one exception: it will still contain any token that will not be
+       accepted due to an error action in a later state.
+  */
+  if (yytoken != YYEMPTY)
     {
-      int yytype = YYTRANSLATE (yychar);
-      YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]);
-      YYSIZE_T yysize = yysize0;
-      YYSIZE_T yysize1;
-      int yysize_overflow = 0;
-      enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
-      char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
-      int yyx;
-
-# if 0
-      /* This is so xgettext sees the translatable formats that are
-	 constructed on the fly.  */
-      YY_("syntax error, unexpected %s");
-      YY_("syntax error, unexpected %s, expecting %s");
-      YY_("syntax error, unexpected %s, expecting %s or %s");
-      YY_("syntax error, unexpected %s, expecting %s or %s or %s");
-      YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s");
-# endif
-      char *yyfmt;
-      char const *yyf;
-      static char const yyunexpected[] = "syntax error, unexpected %s";
-      static char const yyexpecting[] = ", expecting %s";
-      static char const yyor[] = " or %s";
-      char yyformat[sizeof yyunexpected
-		    + sizeof yyexpecting - 1
-		    + ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2)
-		       * (sizeof yyor - 1))];
-      char const *yyprefix = yyexpecting;
-
-      /* Start YYX at -YYN if negative to avoid negative indexes in
-	 YYCHECK.  */
-      int yyxbegin = yyn < 0 ? -yyn : 0;
-
-      /* Stay within bounds of both yycheck and yytname.  */
-      int yychecklim = YYLAST - yyn + 1;
-      int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
-      int yycount = 1;
-
-      yyarg[0] = yytname[yytype];
-      yyfmt = yystpcpy (yyformat, yyunexpected);
-
-      for (yyx = yyxbegin; yyx < yyxend; ++yyx)
-	if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
-	  {
-	    if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
-	      {
-		yycount = 1;
-		yysize = yysize0;
-		yyformat[sizeof yyunexpected - 1] = '\0';
-		break;
-	      }
-	    yyarg[yycount++] = yytname[yyx];
-	    yysize1 = yysize + yytnamerr (0, yytname[yyx]);
-	    yysize_overflow |= (yysize1 < yysize);
-	    yysize = yysize1;
-	    yyfmt = yystpcpy (yyfmt, yyprefix);
-	    yyprefix = yyor;
-	  }
+      int yyn = yypact[*yyssp];
+      yyarg[yycount++] = yytname[yytoken];
+      if (!yypact_value_is_default (yyn))
+        {
+          /* Start YYX at -YYN if negative to avoid negative indexes in
+             YYCHECK.  In other words, skip the first -YYN actions for
+             this state because they are default actions.  */
+          int yyxbegin = yyn < 0 ? -yyn : 0;
+          /* Stay within bounds of both yycheck and yytname.  */
+          int yychecklim = YYLAST - yyn + 1;
+          int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
+          int yyx;
+
+          for (yyx = yyxbegin; yyx < yyxend; ++yyx)
+            if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR
+                && !yytable_value_is_error (yytable[yyx + yyn]))
+              {
+                if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
+                  {
+                    yycount = 1;
+                    yysize = yysize0;
+                    break;
+                  }
+                yyarg[yycount++] = yytname[yyx];
+                {
+                  YYSIZE_T yysize1 = yysize + yytnamerr (YY_NULL, yytname[yyx]);
+                  if (! (yysize <= yysize1
+                         && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
+                    return 2;
+                  yysize = yysize1;
+                }
+              }
+        }
+    }
 
-      yyf = YY_(yyformat);
-      yysize1 = yysize + yystrlen (yyf);
-      yysize_overflow |= (yysize1 < yysize);
-      yysize = yysize1;
+  switch (yycount)
+    {
+# define YYCASE_(N, S)                      \
+      case N:                               \
+        yyformat = S;                       \
+      break
+      YYCASE_(0, YY_("syntax error"));
+      YYCASE_(1, YY_("syntax error, unexpected %s"));
+      YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s"));
+      YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s"));
+      YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s"));
+      YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"));
+# undef YYCASE_
+    }
 
-      if (yysize_overflow)
-	return YYSIZE_MAXIMUM;
+  {
+    YYSIZE_T yysize1 = yysize + yystrlen (yyformat);
+    if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
+      return 2;
+    yysize = yysize1;
+  }
 
-      if (yyresult)
-	{
-	  /* Avoid sprintf, as that infringes on the user's name space.
-	     Don't have undefined behavior even if the translation
-	     produced a string with the wrong number of "%s"s.  */
-	  char *yyp = yyresult;
-	  int yyi = 0;
-	  while ((*yyp = *yyf) != '\0')
-	    {
-	      if (*yyp == '%' && yyf[1] == 's' && yyi < yycount)
-		{
-		  yyp += yytnamerr (yyp, yyarg[yyi++]);
-		  yyf += 2;
-		}
-	      else
-		{
-		  yyp++;
-		  yyf++;
-		}
-	    }
-	}
-      return yysize;
+  if (*yymsg_alloc < yysize)
+    {
+      *yymsg_alloc = 2 * yysize;
+      if (! (yysize <= *yymsg_alloc
+             && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM))
+        *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM;
+      return 1;
     }
+
+  /* Avoid sprintf, as that infringes on the user's name space.
+     Don't have undefined behavior even if the translation
+     produced a string with the wrong number of "%s"s.  */
+  {
+    char *yyp = *yymsg;
+    int yyi = 0;
+    while ((*yyp = *yyformat) != '\0')
+      if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount)
+        {
+          yyp += yytnamerr (yyp, yyarg[yyi++]);
+          yyformat += 2;
+        }
+      else
+        {
+          yyp++;
+          yyformat++;
+        }
+  }
+  return 0;
 }
 #endif /* YYERROR_VERBOSE */
-

 
 /*-----------------------------------------------.
 | Release the memory associated to this symbol.  |
@@ -1218,90 +1323,70 @@ yydestruct (yymsg, yytype, yyvaluep, yylocationp)
 
   switch (yytype)
     {
-      case 5: /* "MACRO" */
+      case 5: /* MACRO */
 
-/* Line 1009 of yacc.c  */
-#line 155 "gramLatex.y"
-	{ UNPROTECT_PTR((*yyvaluep)); };
+        { UNPROTECT_PTR((*yyvaluep)); };
 
-/* Line 1009 of yacc.c  */
-#line 1222 "gramLatex.c"
-	break;
-      case 6: /* "TEXT" */
+        break;
+      case 6: /* TEXT */
 
-/* Line 1009 of yacc.c  */
-#line 155 "gramLatex.y"
-	{ UNPROTECT_PTR((*yyvaluep)); };
+        { UNPROTECT_PTR((*yyvaluep)); };
 
-/* Line 1009 of yacc.c  */
-#line 1231 "gramLatex.c"
-	break;
-      case 7: /* "COMMENT" */
+        break;
+      case 7: /* COMMENT */
 
-/* Line 1009 of yacc.c  */
-#line 155 "gramLatex.y"
-	{ UNPROTECT_PTR((*yyvaluep)); };
+        { UNPROTECT_PTR((*yyvaluep)); };
 
-/* Line 1009 of yacc.c  */
-#line 1240 "gramLatex.c"
-	break;
-      case 8: /* "BEGIN" */
+        break;
+      case 8: /* BEGIN */
 
-/* Line 1009 of yacc.c  */
-#line 155 "gramLatex.y"
-	{ UNPROTECT_PTR((*yyvaluep)); };
+        { UNPROTECT_PTR((*yyvaluep)); };
 
-/* Line 1009 of yacc.c  */
-#line 1249 "gramLatex.c"
-	break;
-      case 9: /* "END" */
+        break;
+      case 9: /* END */
 
-/* Line 1009 of yacc.c  */
-#line 155 "gramLatex.y"
-	{ UNPROTECT_PTR((*yyvaluep)); };
+        { UNPROTECT_PTR((*yyvaluep)); };
 
-/* Line 1009 of yacc.c  */
-#line 1258 "gramLatex.c"
-	break;
+        break;
 
       default:
-	break;
+        break;
     }
 }
 
-/* Prevent warnings from -Wmissing-prototypes.  */
-#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 */
+
 
 
 /* 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;
+YYSTYPE yylval YY_INITIAL_VALUE(yyval_default);
 
 /* Location data for the lookahead symbol.  */
-YYLTYPE yylloc;
+YYLTYPE yylloc
+# if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL
+  = { 1, 1, 1, 1 }
+# endif
+;
+
 
 /* Number of syntax errors so far.  */
 int yynerrs;
 
 
-
-/*-------------------------.
-| yyparse or yypush_parse.  |
-`-------------------------*/
+/*----------.
+| yyparse.  |
+`----------*/
 
 #ifdef YYPARSE_PARAM
 #if (defined __STDC__ || defined __C99__FUNC__ \
@@ -1325,8 +1410,6 @@ yyparse ()
 #endif
 #endif
 {
-
-
     int yystate;
     /* Number of tokens to shift before error messages enabled.  */
     int yyerrstatus;
@@ -1336,7 +1419,7 @@ yyparse ()
        `yyvs': related to semantic values.
        `yyls': related to locations.
 
-       Refer to the stacks thru separate pointers, to allow yyoverflow
+       Refer to the stacks through separate pointers, to allow yyoverflow
        to reallocate them elsewhere.  */
 
     /* The state stack.  */
@@ -1355,14 +1438,14 @@ yyparse ()
     YYLTYPE *yylsp;
 
     /* The locations where the error started and ended.  */
-    YYLTYPE yyerror_range[2];
+    YYLTYPE yyerror_range[3];
 
     YYSIZE_T yystacksize;
 
   int yyn;
   int yyresult;
   /* Lookahead token as an internal (translated) token number.  */
-  int yytoken;
+  int yytoken = 0;
   /* The variables used to return semantic value and location from the
      action routines.  */
   YYSTYPE yyval;
@@ -1381,10 +1464,9 @@ yyparse ()
      Keep to zero when no symbol should be popped.  */
   int yylen = 0;
 
-  yytoken = 0;
-  yyss = yyssa;
-  yyvs = yyvsa;
-  yyls = yylsa;
+  yyssp = yyss = yyssa;
+  yyvsp = yyvs = yyvsa;
+  yylsp = yyls = yylsa;
   yystacksize = YYINITDEPTH;
 
   YYDPRINTF ((stderr, "Starting parse\n"));
@@ -1393,21 +1475,7 @@ yyparse ()
   yyerrstatus = 0;
   yynerrs = 0;
   yychar = YYEMPTY; /* Cause a token to be read.  */
-
-  /* Initialize stack pointers.
-     Waste one element of value and location stack
-     so that they stay on the same level as the state stack.
-     The wasted elements are never initialized.  */
-  yyssp = yyss;
-  yyvsp = yyvs;
-  yylsp = yyls;
-
-#if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL
-  /* Initialize the default location before parsing starts.  */
-  yylloc.first_line   = yylloc.last_line   = 1;
-  yylloc.first_column = yylloc.last_column = 1;
-#endif
-
+  yylsp[0] = yylloc;
   goto yysetstate;
 
 /*------------------------------------------------------------.
@@ -1504,7 +1572,7 @@ yybackup:
 
   /* First try to decide what to do without reference to lookahead token.  */
   yyn = yypact[yystate];
-  if (yyn == YYPACT_NINF)
+  if (yypact_value_is_default (yyn))
     goto yydefault;
 
   /* Not known => get a lookahead token if don't already have one.  */
@@ -1535,8 +1603,8 @@ yybackup:
   yyn = yytable[yyn];
   if (yyn <= 0)
     {
-      if (yyn == 0 || yyn == YYTABLE_NINF)
-	goto yyerrlab;
+      if (yytable_value_is_error (yyn))
+        goto yyerrlab;
       yyn = -yyn;
       goto yyreduce;
     }
@@ -1553,7 +1621,9 @@ yybackup:
   yychar = YYEMPTY;
 
   yystate = yyn;
+  YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
   *++yyvsp = yylval;
+  YY_IGNORE_MAYBE_UNINITIALIZED_END
   *++yylsp = yylloc;
   goto yynewstate;
 
@@ -1592,151 +1662,120 @@ yyreduce:
     {
         case 2:
 
-/* Line 1464 of yacc.c  */
-#line 159 "gramLatex.y"
-    { xxsavevalue((yyvsp[(1) - (2)]), &(yyloc)); return 0; ;}
+    { xxsavevalue((yyvsp[(1) - (2)]), &(yyloc)); YYACCEPT; }
     break;
 
   case 3:
 
-/* Line 1464 of yacc.c  */
-#line 160 "gramLatex.y"
-    { xxsavevalue(NULL, &(yyloc)); return 0; ;}
+    { xxsavevalue(NULL, &(yyloc)); YYACCEPT; }
     break;
 
   case 4:
 
-/* Line 1464 of yacc.c  */
-#line 161 "gramLatex.y"
-    { PROTECT(parseState.Value = R_NilValue);  YYABORT; ;}
+    { PROTECT(parseState.Value = R_NilValue);  YYABORT; }
     break;
 
   case 5:
 
-/* Line 1464 of yacc.c  */
-#line 164 "gramLatex.y"
-    { (yyval) = xxnewlist((yyvsp[(1) - (1)])); ;}
+    { (yyval) = xxnewlist((yyvsp[(1) - (1)])); }
     break;
 
   case 6:
 
-/* Line 1464 of yacc.c  */
-#line 165 "gramLatex.y"
-    { (yyval) = xxnewlist((yyvsp[(1) - (1)])); ;}
+    { (yyval) = xxnewlist((yyvsp[(1) - (1)])); }
     break;
 
   case 7:
 
-/* Line 1464 of yacc.c  */
-#line 166 "gramLatex.y"
-    { (yyval) = xxlist((yyvsp[(1) - (2)]), (yyvsp[(2) - (2)])); ;}
+    { (yyval) = xxlist((yyvsp[(1) - (2)]), (yyvsp[(2) - (2)])); }
     break;
 
   case 8:
 
-/* Line 1464 of yacc.c  */
-#line 167 "gramLatex.y"
-    { (yyval) = xxlist((yyvsp[(1) - (2)]), (yyvsp[(2) - (2)])); ;}
+    { (yyval) = xxlist((yyvsp[(1) - (2)]), (yyvsp[(2) - (2)])); }
     break;
 
   case 9:
 
-/* Line 1464 of yacc.c  */
-#line 169 "gramLatex.y"
-    { (yyval) = xxnewlist((yyvsp[(1) - (1)])); ;}
+    { (yyval) = xxnewlist((yyvsp[(1) - (1)])); }
     break;
 
   case 10:
 
-/* Line 1464 of yacc.c  */
-#line 170 "gramLatex.y"
-    { (yyval) = xxlist((yyvsp[(1) - (2)]), (yyvsp[(2) - (2)])); ;}
+    { (yyval) = xxlist((yyvsp[(1) - (2)]), (yyvsp[(2) - (2)])); }
     break;
 
   case 11:
 
-/* Line 1464 of yacc.c  */
-#line 172 "gramLatex.y"
-    { (yyval) = xxtag((yyvsp[(1) - (1)]), TEXT, &(yyloc)); ;}
+    { (yyval) = xxtag((yyvsp[(1) - (1)]), TEXT, &(yyloc)); }
     break;
 
   case 12:
 
-/* Line 1464 of yacc.c  */
-#line 173 "gramLatex.y"
-    { (yyval) = xxtag((yyvsp[(1) - (1)]), COMMENT, &(yyloc)); ;}
+    { (yyval) = xxtag((yyvsp[(1) - (1)]), COMMENT, &(yyloc)); }
     break;
 
   case 13:
 
-/* Line 1464 of yacc.c  */
-#line 174 "gramLatex.y"
-    { (yyval) = xxtag((yyvsp[(1) - (1)]), MACRO, &(yyloc)); ;}
+    { (yyval) = xxtag((yyvsp[(1) - (1)]), MACRO, &(yyloc)); }
     break;
 
   case 14:
 
-/* Line 1464 of yacc.c  */
-#line 175 "gramLatex.y"
-    { (yyval) = xxtag((yyvsp[(1) - (1)]), VERB, &(yyloc)); ;}
+    { (yyval) = xxtag((yyvsp[(1) - (1)]), VERB, &(yyloc)); }
     break;
 
   case 15:
 
-/* Line 1464 of yacc.c  */
-#line 176 "gramLatex.y"
-    { (yyval) = (yyvsp[(1) - (1)]); ;}
+    { (yyval) = (yyvsp[(1) - (1)]); }
     break;
 
   case 16:
 
-/* Line 1464 of yacc.c  */
-#line 177 "gramLatex.y"
-    { (yyval) = (yyvsp[(1) - (1)]); ;}
+    { (yyval) = (yyvsp[(1) - (1)]); }
     break;
 
   case 17:
 
-/* Line 1464 of yacc.c  */
-#line 179 "gramLatex.y"
-    { xxSetInVerbEnv((yyvsp[(3) - (4)])); ;}
+    { xxSetInVerbEnv((yyvsp[(3) - (4)])); }
     break;
 
   case 18:
 
-/* Line 1464 of yacc.c  */
-#line 180 "gramLatex.y"
     { (yyval) = xxenv((yyvsp[(3) - (10)]), (yyvsp[(6) - (10)]), (yyvsp[(9) - (10)]), &(yyloc));
-                                                  UNPROTECT_PTR((yyvsp[(1) - (10)])); UNPROTECT_PTR((yyvsp[(7) - (10)])); ;}
+                                                  UNPROTECT_PTR((yyvsp[(1) - (10)])); UNPROTECT_PTR((yyvsp[(7) - (10)])); }
     break;
 
   case 19:
 
-/* Line 1464 of yacc.c  */
-#line 183 "gramLatex.y"
-    { (yyval) = xxmath((yyvsp[(2) - (3)]), &(yyloc)); ;}
+    { (yyval) = xxmath((yyvsp[(2) - (3)]), &(yyloc)); }
     break;
 
   case 20:
 
-/* Line 1464 of yacc.c  */
-#line 185 "gramLatex.y"
-    { (yyval) = xxblock((yyvsp[(2) - (3)]), &(yyloc)); ;}
+    { (yyval) = xxblock((yyvsp[(2) - (3)]), &(yyloc)); }
     break;
 
   case 21:
 
-/* Line 1464 of yacc.c  */
-#line 186 "gramLatex.y"
-    { (yyval) = xxblock(NULL, &(yyloc)); ;}
+    { (yyval) = xxblock(NULL, &(yyloc)); }
     break;
 
 
 
-/* Line 1464 of yacc.c  */
-#line 1731 "gramLatex.c"
       default: break;
     }
+  /* User semantic actions sometimes alter yychar, and that requires
+     that yytoken be updated with the new translation.  We take the
+     approach of translating immediately before every use of yytoken.
+     One alternative is translating here after every semantic action,
+     but that translation would be missed if the semantic action invokes
+     YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or
+     if it invokes YYBACKUP.  In the case of YYABORT or YYACCEPT, an
+     incorrect destructor might then be invoked immediately.  In the
+     case of YYERROR or YYBACKUP, subsequent parser actions might lead
+     to an incorrect destructor call or verbose syntax error message
+     before the lookahead is translated.  */
   YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
 
   YYPOPSTACK (yylen);
@@ -1765,6 +1804,10 @@ yyreduce:
 | yyerrlab -- here on detecting error |
 `------------------------------------*/
 yyerrlab:
+  /* Make sure we have latest lookahead translation.  See comments at
+     user semantic actions for why this is necessary.  */
+  yytoken = yychar == YYEMPTY ? YYEMPTY : YYTRANSLATE (yychar);
+
   /* If not already recovering from an error, report this error.  */
   if (!yyerrstatus)
     {
@@ -1772,41 +1815,40 @@ yyerrlab:
 #if ! YYERROR_VERBOSE
       yyerror (YY_("syntax error"));
 #else
+# define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \
+                                        yyssp, yytoken)
       {
-	YYSIZE_T yysize = yysyntax_error (0, yystate, yychar);
-	if (yymsg_alloc < yysize && yymsg_alloc < YYSTACK_ALLOC_MAXIMUM)
-	  {
-	    YYSIZE_T yyalloc = 2 * yysize;
-	    if (! (yysize <= yyalloc && yyalloc <= YYSTACK_ALLOC_MAXIMUM))
-	      yyalloc = YYSTACK_ALLOC_MAXIMUM;
-	    if (yymsg != yymsgbuf)
-	      YYSTACK_FREE (yymsg);
-	    yymsg = (char *) YYSTACK_ALLOC (yyalloc);
-	    if (yymsg)
-	      yymsg_alloc = yyalloc;
-	    else
-	      {
-		yymsg = yymsgbuf;
-		yymsg_alloc = sizeof yymsgbuf;
-	      }
-	  }
-
-	if (0 < yysize && yysize <= yymsg_alloc)
-	  {
-	    (void) yysyntax_error (yymsg, yystate, yychar);
-	    yyerror (yymsg);
-	  }
-	else
-	  {
-	    yyerror (YY_("syntax error"));
-	    if (yysize != 0)
-	      goto yyexhaustedlab;
-	  }
+        char const *yymsgp = YY_("syntax error");
+        int yysyntax_error_status;
+        yysyntax_error_status = YYSYNTAX_ERROR;
+        if (yysyntax_error_status == 0)
+          yymsgp = yymsg;
+        else if (yysyntax_error_status == 1)
+          {
+            if (yymsg != yymsgbuf)
+              YYSTACK_FREE (yymsg);
+            yymsg = (char *) YYSTACK_ALLOC (yymsg_alloc);
+            if (!yymsg)
+              {
+                yymsg = yymsgbuf;
+                yymsg_alloc = sizeof yymsgbuf;
+                yysyntax_error_status = 2;
+              }
+            else
+              {
+                yysyntax_error_status = YYSYNTAX_ERROR;
+                yymsgp = yymsg;
+              }
+          }
+        yyerror (yymsgp);
+        if (yysyntax_error_status == 2)
+          goto yyexhaustedlab;
       }
+# undef YYSYNTAX_ERROR
 #endif
     }
 
-  yyerror_range[0] = yylloc;
+  yyerror_range[1] = yylloc;
 
   if (yyerrstatus == 3)
     {
@@ -1843,7 +1885,7 @@ yyerrorlab:
   if (/*CONSTCOND*/ 0)
      goto yyerrorlab;
 
-  yyerror_range[0] = yylsp[1-yylen];
+  yyerror_range[1] = yylsp[1-yylen];
   /* Do not reclaim the symbols of the rule which action triggered
      this YYERROR.  */
   YYPOPSTACK (yylen);
@@ -1862,7 +1904,7 @@ yyerrlab1:
   for (;;)
     {
       yyn = yypact[yystate];
-      if (yyn != YYPACT_NINF)
+      if (!yypact_value_is_default (yyn))
 	{
 	  yyn += YYTERROR;
 	  if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
@@ -1877,7 +1919,7 @@ yyerrlab1:
       if (yyssp == yyss)
 	YYABORT;
 
-      yyerror_range[0] = *yylsp;
+      yyerror_range[1] = *yylsp;
       yydestruct ("Error: popping",
 		  yystos[yystate], yyvsp, yylsp);
       YYPOPSTACK (1);
@@ -1885,12 +1927,14 @@ yyerrlab1:
       YY_STACK_PRINT (yyss, yyssp);
     }
 
+  YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
   *++yyvsp = yylval;
+  YY_IGNORE_MAYBE_UNINITIALIZED_END
 
-  yyerror_range[1] = yylloc;
+  yyerror_range[2] = yylloc;
   /* Using YYLLOC is tempting, but would change the location of
      the lookahead.  YYLOC is available though.  */
-  YYLLOC_DEFAULT (yyloc, (yyerror_range - 1), 2);
+  YYLLOC_DEFAULT (yyloc, yyerror_range, 2);
   *++yylsp = yyloc;
 
   /* Shift the error token.  */
@@ -1914,7 +1958,7 @@ yyabortlab:
   yyresult = 1;
   goto yyreturn;
 
-#if !defined(yyoverflow) || YYERROR_VERBOSE
+#if !defined yyoverflow || YYERROR_VERBOSE
 /*-------------------------------------------------.
 | yyexhaustedlab -- memory exhaustion comes here.  |
 `-------------------------------------------------*/
@@ -1926,8 +1970,13 @@ yyexhaustedlab:
 
 yyreturn:
   if (yychar != YYEMPTY)
-     yydestruct ("Cleanup: discarding lookahead",
-		 yytoken, &yylval, &yylloc);
+    {
+      /* Make sure we have latest lookahead translation.  See comments at
+         user semantic actions for why this is necessary.  */
+      yytoken = YYTRANSLATE (yychar);
+      yydestruct ("Cleanup: discarding lookahead",
+                  yytoken, &yylval, &yylloc);
+    }
   /* Do not reclaim the symbols of the rule which action triggered
      this YYABORT or YYACCEPT.  */
   YYPOPSTACK (yylen);
@@ -1952,8 +2001,6 @@ yyreturn:
 
 
 
-/* Line 1684 of yacc.c  */
-#line 188 "gramLatex.y"
 
 
 static SEXP xxnewlist(SEXP item)
@@ -2004,7 +2051,8 @@ static SEXP xxenv(SEXP begin, SEXP body, SEXP end, YYLTYPE *lloc)
     }
     /* FIXME:  check that begin and end match */
     setAttrib(ans, R_SrcrefSymbol, makeSrcref(lloc, parseState.SrcFile));
-    setAttrib(ans, install("latex_tag"), mkString("ENVIRONMENT"));
+    SEXP s_latex_tag = install("latex_tag");
+    setAttrib(ans, s_latex_tag, mkString("ENVIRONMENT"));
     if (!isNull(end)) 
     	UNPROTECT_PTR(end);
 #if DEBUGVALS
@@ -2022,7 +2070,8 @@ static SEXP xxmath(SEXP body, YYLTYPE *lloc)
     PROTECT(ans = PairToVectorList(CDR(body)));
     UNPROTECT_PTR(body);
     setAttrib(ans, R_SrcrefSymbol, makeSrcref(lloc, parseState.SrcFile));
-    setAttrib(ans, install("latex_tag"), mkString("MATH"));
+    SEXP s_latex_tag = install("latex_tag");
+    setAttrib(ans, s_latex_tag, mkString("MATH"));
 #if DEBUGVALS
     Rprintf(" result: %p\n", ans);    
 #endif
@@ -2042,7 +2091,8 @@ static SEXP xxblock(SEXP body, YYLTYPE *lloc)
     	UNPROTECT_PTR(body);	
     }
     setAttrib(ans, R_SrcrefSymbol, makeSrcref(lloc, parseState.SrcFile));
-    setAttrib(ans, install("latex_tag"), mkString("BLOCK"));
+    SEXP s_latex_tag = install("latex_tag");
+    setAttrib(ans, s_latex_tag, mkString("BLOCK"));
 
 #if DEBUGVALS
     Rprintf(" result: %p\n", ans);    
@@ -2077,7 +2127,8 @@ static void xxsavevalue(SEXP items, YYLTYPE *lloc)
     } else {
     	PROTECT(parseState.Value = allocVector(VECSXP, 1));
     	SET_VECTOR_ELT(parseState.Value, 0, ScalarString(mkChar("")));
-    	setAttrib(VECTOR_ELT(parseState.Value, 0), install("latex_tag"), mkString("TEXT"));
+    	SEXP s_latex_tag = install("latex_tag");
+    	setAttrib(VECTOR_ELT(parseState.Value, 0), s_latex_tag, mkString("TEXT"));
     }	
     if (!isNull(parseState.Value)) {
     	setAttrib(parseState.Value, R_ClassSymbol, mkString("LaTeX"));
@@ -2087,7 +2138,8 @@ static void xxsavevalue(SEXP items, YYLTYPE *lloc)
 
 static SEXP xxtag(SEXP item, int type, YYLTYPE *lloc)
 {
-    setAttrib(item, install("latex_tag"), mkString(yytname[YYTRANSLATE(type)]));
+    SEXP s_latex_tag = install("latex_tag");
+    setAttrib(item, s_latex_tag, mkString(yytname[YYTRANSLATE(type)]));
     setAttrib(item, R_SrcrefSymbol, makeSrcref(lloc, parseState.SrcFile));
     return item;
 }
@@ -2159,7 +2211,7 @@ static int xxungetc(int c)
     R_ParseContextLine = parseState.xxlineno;
     
     R_ParseContext[R_ParseContextLast] = '\0';
-    /* Mac OS X requires us to keep this non-negative */
+    /* macOS requires us to keep this non-negative */
     R_ParseContextLast = (R_ParseContextLast + PARSE_CONTEXT_SIZE - 1) 
 	% PARSE_CONTEXT_SIZE;
     if(npush >= PUSHBACK_BUFSIZE - 2) return R_EOF;
@@ -2426,7 +2478,7 @@ static void yyerror(const char *s)
     	snprintf(ParseErrorMsg, PARSE_ERROR_SIZE,"%s", s);
     }
     filename = findVar(install("filename"), parseState.SrcFile);
-    if (isString(filename) && length(filename))
+    if (isString(filename) && LENGTH(filename))
     	strncpy(ParseErrorFilename, CHAR(STRING_ELT(filename, 0)), PARSE_ERROR_SIZE - 1);
     else
         ParseErrorFilename[0] = '\0';
@@ -2657,11 +2709,11 @@ static void PopState() {
 
 /* "do_parseLatex" 
 
- .External2(CC_parseLatex, file, srcfile, verbose, basename, warningCalls)
+ .External2("parseLatex", file, srcfile, verbose, basename, warningCalls)
  If there is text then that is read and the other arguments are ignored.
 */
 
-SEXP C_parseLatex(SEXP call, SEXP op, SEXP args, SEXP env)
+SEXP parseLatex(SEXP call, SEXP op, SEXP args, SEXP env)
 {
     args = CDR(args);
 
@@ -2692,4 +2744,3 @@ SEXP C_parseLatex(SEXP call, SEXP op, SEXP args, SEXP env)
     if (status != PARSE_OK) parseError(call, R_ParseError);
     return s;
 }
-
diff --git a/src/library/tools/src/gramLatex.y b/src/library/tools/src/gramLatex.y
index 90c2fda..ca78275 100644
--- a/src/library/tools/src/gramLatex.y
+++ b/src/library/tools/src/gramLatex.y
@@ -3,7 +3,7 @@
 /*
  *  R : A Computer Langage for Statistical Data Analysis
  *  Copyright (C) 1995, 1996, 1997  Robert Gentleman and Ross Ihaka
- *  Copyright (C) 1997--2013  The R Core Team
+ *  Copyright (C) 1997--2016  The R Core Team
  *  Copyright (C) 2010 Duncan Murdoch
  *
  *  This program is free software; you can redistribute it and/or modify
@@ -18,7 +18,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  */
 
 #ifdef HAVE_CONFIG_H
@@ -69,7 +69,7 @@ typedef struct yyltype
 # define YYLTYPE yyltype
 # 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;	\
@@ -87,7 +87,7 @@ typedef struct yyltype
 	  (Current).first_byte   = (Current).last_byte =		\
 	    YYRHSLOC (Rhs, 0).last_byte;				\
 	}								\
-    while (YYID (0))
+    while (0)
 
 /* Useful defines so editors don't get confused ... */
 
@@ -163,8 +163,8 @@ static int      mkVerbEnv();
 
 %%
 
-Init:		Items END_OF_INPUT		{ xxsavevalue($1, &@$); return 0; }
-	|	END_OF_INPUT			{ xxsavevalue(NULL, &@$); return 0; }
+Init:		Items END_OF_INPUT		{ xxsavevalue($1, &@$); YYACCEPT; }
+	|	END_OF_INPUT			{ xxsavevalue(NULL, &@$); YYACCEPT; }
 	|	error				{ PROTECT(parseState.Value = R_NilValue);  YYABORT; }
 	;
 
@@ -242,7 +242,8 @@ static SEXP xxenv(SEXP begin, SEXP body, SEXP end, YYLTYPE *lloc)
     }
     /* FIXME:  check that begin and end match */
     setAttrib(ans, R_SrcrefSymbol, makeSrcref(lloc, parseState.SrcFile));
-    setAttrib(ans, install("latex_tag"), mkString("ENVIRONMENT"));
+    SEXP s_latex_tag = install("latex_tag");
+    setAttrib(ans, s_latex_tag, mkString("ENVIRONMENT"));
     if (!isNull(end)) 
     	UNPROTECT_PTR(end);
 #if DEBUGVALS
@@ -260,7 +261,8 @@ static SEXP xxmath(SEXP body, YYLTYPE *lloc)
     PROTECT(ans = PairToVectorList(CDR(body)));
     UNPROTECT_PTR(body);
     setAttrib(ans, R_SrcrefSymbol, makeSrcref(lloc, parseState.SrcFile));
-    setAttrib(ans, install("latex_tag"), mkString("MATH"));
+    SEXP s_latex_tag = install("latex_tag");
+    setAttrib(ans, s_latex_tag, mkString("MATH"));
 #if DEBUGVALS
     Rprintf(" result: %p\n", ans);    
 #endif
@@ -280,7 +282,8 @@ static SEXP xxblock(SEXP body, YYLTYPE *lloc)
     	UNPROTECT_PTR(body);	
     }
     setAttrib(ans, R_SrcrefSymbol, makeSrcref(lloc, parseState.SrcFile));
-    setAttrib(ans, install("latex_tag"), mkString("BLOCK"));
+    SEXP s_latex_tag = install("latex_tag");
+    setAttrib(ans, s_latex_tag, mkString("BLOCK"));
 
 #if DEBUGVALS
     Rprintf(" result: %p\n", ans);    
@@ -315,7 +318,8 @@ static void xxsavevalue(SEXP items, YYLTYPE *lloc)
     } else {
     	PROTECT(parseState.Value = allocVector(VECSXP, 1));
     	SET_VECTOR_ELT(parseState.Value, 0, ScalarString(mkChar("")));
-    	setAttrib(VECTOR_ELT(parseState.Value, 0), install("latex_tag"), mkString("TEXT"));
+    	SEXP s_latex_tag = install("latex_tag");
+    	setAttrib(VECTOR_ELT(parseState.Value, 0), s_latex_tag, mkString("TEXT"));
     }	
     if (!isNull(parseState.Value)) {
     	setAttrib(parseState.Value, R_ClassSymbol, mkString("LaTeX"));
@@ -325,7 +329,8 @@ static void xxsavevalue(SEXP items, YYLTYPE *lloc)
 
 static SEXP xxtag(SEXP item, int type, YYLTYPE *lloc)
 {
-    setAttrib(item, install("latex_tag"), mkString(yytname[YYTRANSLATE(type)]));
+    SEXP s_latex_tag = install("latex_tag");
+    setAttrib(item, s_latex_tag, mkString(yytname[YYTRANSLATE(type)]));
     setAttrib(item, R_SrcrefSymbol, makeSrcref(lloc, parseState.SrcFile));
     return item;
 }
@@ -397,7 +402,7 @@ static int xxungetc(int c)
     R_ParseContextLine = parseState.xxlineno;
     
     R_ParseContext[R_ParseContextLast] = '\0';
-    /* Mac OS X requires us to keep this non-negative */
+    /* macOS requires us to keep this non-negative */
     R_ParseContextLast = (R_ParseContextLast + PARSE_CONTEXT_SIZE - 1) 
 	% PARSE_CONTEXT_SIZE;
     if(npush >= PUSHBACK_BUFSIZE - 2) return R_EOF;
@@ -664,7 +669,7 @@ static void yyerror(const char *s)
     	snprintf(ParseErrorMsg, PARSE_ERROR_SIZE,"%s", s);
     }
     filename = findVar(install("filename"), parseState.SrcFile);
-    if (isString(filename) && length(filename))
+    if (isString(filename) && LENGTH(filename))
     	strncpy(ParseErrorFilename, CHAR(STRING_ELT(filename, 0)), PARSE_ERROR_SIZE - 1);
     else
         ParseErrorFilename[0] = '\0';
@@ -895,11 +900,11 @@ static void PopState() {
 
 /* "do_parseLatex" 
 
- .External2(CC_parseLatex, file, srcfile, verbose, basename, warningCalls)
+ .External2("parseLatex", file, srcfile, verbose, basename, warningCalls)
  If there is text then that is read and the other arguments are ignored.
 */
 
-SEXP C_parseLatex(SEXP call, SEXP op, SEXP args, SEXP env)
+SEXP parseLatex(SEXP call, SEXP op, SEXP args, SEXP env)
 {
     args = CDR(args);
 
diff --git a/src/library/tools/src/gramRd.c b/src/library/tools/src/gramRd.c
index 8f2ff8f..2f6d3df 100644
--- a/src/library/tools/src/gramRd.c
+++ b/src/library/tools/src/gramRd.c
@@ -1,9 +1,8 @@
-/* A Bison parser, made by GNU Bison 2.4.2.  */
+/* A Bison parser, made by GNU Bison 2.7.12-4996.  */
 
-/* Skeleton implementation for Bison's Yacc-like parsers in C
+/* Bison implementation for Yacc-like parsers in C
    
-      Copyright (C) 1984, 1989-1990, 2000-2006, 2009-2010 Free Software
-   Foundation, Inc.
+      Copyright (C) 1984, 1989-1990, 2000-2013 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
@@ -45,7 +44,7 @@
 #define YYBISON 1
 
 /* Bison version.  */
-#define YYBISON_VERSION "2.4.2"
+#define YYBISON_VERSION "2.7.12-4996"
 
 /* Skeleton name.  */
 #define YYSKELETON_NAME "yacc.c"
@@ -59,20 +58,16 @@
 /* Pull parsers.  */
 #define YYPULL 1
 
-/* Using locations.  */
-#define YYLSP_NEEDED 1
 
 
 
 /* Copy the first part of user declarations.  */
 
-/* Line 189 of yacc.c  */
-#line 1 "gramRd.y"
 
 /*
  *  R : A Computer Langage for Statistical Data Analysis
  *  Copyright (C) 1995, 1996, 1997  Robert Gentleman and Ross Ihaka
- *  Copyright (C) 1997--2013  The R Core Team
+ *  Copyright (C) 1997--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
@@ -86,7 +81,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  */
 
 #ifdef HAVE_CONFIG_H
@@ -117,6 +112,7 @@
 #define DEBUGMODE 0		/* 1 causes Bison output of parse state, to stdout or stderr */
 
 static Rboolean wCalls = TRUE;
+static Rboolean warnDups = FALSE;
 
 #define YYERROR_VERBOSE 1
 
@@ -140,7 +136,7 @@ typedef struct yyltype
 # define YYLTYPE yyltype
 # 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;	\
@@ -158,7 +154,7 @@ typedef struct yyltype
 	  (Current).first_byte   = (Current).last_byte =		\
 	    YYRHSLOC (Rhs, 0).last_byte;				\
 	}								\
-    while (YYID (0))
+    while (0)
 
 /* Useful defines so editors don't get confused ... */
 
@@ -249,13 +245,14 @@ static int 	mkComment(int);
 
 
 
-/* Line 189 of yacc.c  */
-#line 247 "gramRd.c"
 
-/* Enabling traces.  */
-#ifndef YYDEBUG
-# define YYDEBUG 0
-#endif
+# ifndef YY_NULL
+#  if defined __cplusplus && 201103L <= __cplusplus
+#   define YY_NULL nullptr
+#  else
+#   define YY_NULL 0
+#  endif
+# endif
 
 /* Enabling verbose error messages.  */
 #ifdef YYERROR_VERBOSE
@@ -265,11 +262,14 @@ static int 	mkComment(int);
 # define YYERROR_VERBOSE 0
 #endif
 
-/* Enabling the token table.  */
-#ifndef YYTOKEN_TABLE
-# define YYTOKEN_TABLE 0
-#endif
 
+/* Enabling traces.  */
+#ifndef YYDEBUG
+# define YYDEBUG 0
+#endif
+#if YYDEBUG
+extern int yydebug;
+#endif
 
 /* Tokens.  */
 #ifndef YYTOKENTYPE
@@ -320,6 +320,48 @@ static int 	mkComment(int);
      STARTFRAGMENT = 298
    };
 #endif
+/* Tokens.  */
+#define END_OF_INPUT 258
+#define ERROR 259
+#define SECTIONHEADER 260
+#define RSECTIONHEADER 261
+#define VSECTIONHEADER 262
+#define SECTIONHEADER2 263
+#define RCODEMACRO 264
+#define SEXPR 265
+#define RDOPTS 266
+#define LATEXMACRO 267
+#define VERBMACRO 268
+#define OPTMACRO 269
+#define ESCAPE 270
+#define LISTSECTION 271
+#define ITEMIZE 272
+#define DESCRIPTION 273
+#define NOITEM 274
+#define LATEXMACRO2 275
+#define VERBMACRO2 276
+#define VERBLATEX 277
+#define LATEXMACRO3 278
+#define NEWCOMMAND 279
+#define USERMACRO 280
+#define USERMACRO1 281
+#define USERMACRO2 282
+#define USERMACRO3 283
+#define USERMACRO4 284
+#define USERMACRO5 285
+#define USERMACRO6 286
+#define USERMACRO7 287
+#define USERMACRO8 288
+#define USERMACRO9 289
+#define IFDEF 290
+#define ENDIF 291
+#define TEXT 292
+#define RCODE 293
+#define VERB 294
+#define COMMENT 295
+#define UNKNOWN 296
+#define STARTFILE 297
+#define STARTFRAGMENT 298
 
 
 
@@ -343,12 +385,27 @@ typedef struct YYLTYPE
 # 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 */
+
+
 
 /* Copy the second part of user declarations.  */
 
 
-/* Line 264 of yacc.c  */
-#line 345 "gramRd.c"
 
 #ifdef short
 # undef short
@@ -401,24 +458,33 @@ typedef short int yytype_int16;
 # if defined YYENABLE_NLS && YYENABLE_NLS
 #  if ENABLE_NLS
 #   include <libintl.h> /* INFRINGES ON USER NAME SPACE */
-#   define YY_(msgid) dgettext ("bison-runtime", msgid)
+#   define YY_(Msgid) dgettext ("bison-runtime", Msgid)
 #  endif
 # endif
 # ifndef YY_
-#  define YY_(msgid) msgid
+#  define YY_(Msgid) Msgid
+# 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 */
 # endif
 #endif
 
 /* Suppress unused-variable warnings by "using" E.  */
 #if ! defined lint || defined __GNUC__
-# define YYUSE(e) ((void) (e))
+# define YYUSE(E) ((void) (E))
 #else
-# define YYUSE(e) /* empty */
+# define YYUSE(E) /* empty */
 #endif
 
+
 /* Identity function, used to suppress warnings about constant conditions.  */
 #ifndef lint
-# define YYID(n) (n)
+# define YYID(N) (N)
 #else
 #if (defined __STDC__ || defined __C99__FUNC__ \
      || defined __cplusplus || defined _MSC_VER)
@@ -451,11 +517,12 @@ YYID (yyi)
 #    define alloca _alloca
 #   else
 #    define YYSTACK_ALLOC alloca
-#    if ! defined _ALLOCA_H && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
+#    if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \
      || defined __cplusplus || defined _MSC_VER)
 #     include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
-#     ifndef _STDLIB_H
-#      define _STDLIB_H 1
+      /* Use EXIT_SUCCESS as a witness for stdlib.h.  */
+#     ifndef EXIT_SUCCESS
+#      define EXIT_SUCCESS 0
 #     endif
 #    endif
 #   endif
@@ -478,24 +545,24 @@ YYID (yyi)
 #  ifndef YYSTACK_ALLOC_MAXIMUM
 #   define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
 #  endif
-#  if (defined __cplusplus && ! defined _STDLIB_H \
+#  if (defined __cplusplus && ! defined EXIT_SUCCESS \
        && ! ((defined YYMALLOC || defined malloc) \
 	     && (defined YYFREE || defined free)))
 #   include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
-#   ifndef _STDLIB_H
-#    define _STDLIB_H 1
+#   ifndef EXIT_SUCCESS
+#    define EXIT_SUCCESS 0
 #   endif
 #  endif
 #  ifndef YYMALLOC
 #   define YYMALLOC malloc
-#   if ! defined malloc && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
+#   if ! defined malloc && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \
      || defined __cplusplus || defined _MSC_VER)
 void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
 #   endif
 #  endif
 #  ifndef YYFREE
 #   define YYFREE free
-#   if ! defined free && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
+#   if ! defined free && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \
      || defined __cplusplus || defined _MSC_VER)
 void free (void *); /* INFRINGES ON USER NAME SPACE */
 #   endif
@@ -526,23 +593,7 @@ union yyalloc
      ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE) + sizeof (YYLTYPE)) \
       + 2 * YYSTACK_GAP_MAXIMUM)
 
-/* Copy COUNT objects from FROM to TO.  The source and destination do
-   not overlap.  */
-# ifndef YYCOPY
-#  if defined __GNUC__ && 1 < __GNUC__
-#   define YYCOPY(To, From, Count) \
-      __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
-#  else
-#   define YYCOPY(To, From, Count)		\
-      do					\
-	{					\
-	  YYSIZE_T yyi;				\
-	  for (yyi = 0; yyi < (Count); yyi++)	\
-	    (To)[yyi] = (From)[yyi];		\
-	}					\
-      while (YYID (0))
-#  endif
-# endif
+# define YYCOPY_NEEDED 1
 
 /* Relocate STACK from its old location to the new one.  The
    local variables YYSIZE and YYSTACKSIZE give the old and new number of
@@ -562,6 +613,26 @@ union yyalloc
 
 #endif
 
+#if defined YYCOPY_NEEDED && YYCOPY_NEEDED
+/* Copy COUNT objects from SRC to DST.  The source and destination do
+   not overlap.  */
+# ifndef YYCOPY
+#  if defined __GNUC__ && 1 < __GNUC__
+#   define YYCOPY(Dst, Src, Count) \
+      __builtin_memcpy (Dst, Src, (Count) * sizeof (*(Src)))
+#  else
+#   define YYCOPY(Dst, Src, Count)              \
+      do                                        \
+        {                                       \
+          YYSIZE_T yyi;                         \
+          for (yyi = 0; yyi < (Count); yyi++)   \
+            (Dst)[yyi] = (Src)[yyi];            \
+        }                                       \
+      while (YYID (0))
+#  endif
+# endif
+#endif /* !YYCOPY_NEEDED */
+
 /* YYFINAL -- State number of the termination state.  */
 #define YYFINAL  33
 /* YYLAST -- Last index in YYTABLE.  */
@@ -652,7 +723,7 @@ static const yytype_int8 yyrhs[] =
       -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,    65,    59,    -1,    24,
+      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,
@@ -673,19 +744,19 @@ static const yytype_int8 yyrhs[] =
 /* YYRLINE[YYN] -- source line where rule number YYN was defined.  */
 static const yytype_uint16 yyrline[] =
 {
-       0,   206,   206,   207,   208,   211,   214,   217,   218,   220,
-     221,   222,   223,   224,   225,   226,   227,   228,   229,   230,
-     231,   232,   233,   235,   236,   238,   239,   240,   241,   242,
-     243,   244,   245,   246,   248,   249,   250,   251,   252,   253,
-     254,   255,   256,   257,   258,   259,   260,   261,   262,   263,
-     264,   266,   267,   268,   269,   271,   273,   275,   277,   279,
-     282,   285,   290,   292,   293,   302,   304,   306,   310,   311,
-     313,   315,   319,   320,   322,   325,   327,   329,   331,   333,
-     335,   337,   339,   341,   343,   344,   345,   346,   347,   349
+       0,   214,   214,   215,   216,   219,   222,   225,   226,   228,
+     229,   230,   231,   232,   233,   234,   235,   236,   237,   238,
+     239,   240,   241,   243,   244,   246,   247,   248,   249,   250,
+     251,   252,   253,   254,   256,   257,   258,   259,   260,   261,
+     262,   263,   264,   265,   266,   267,   268,   269,   270,   271,
+     272,   274,   275,   276,   277,   279,   281,   283,   285,   287,
+     290,   293,   298,   300,   301,   310,   312,   314,   318,   319,
+     321,   323,   327,   328,   330,   333,   335,   337,   339,   341,
+     343,   345,   347,   349,   351,   352,   353,   354,   355,   357
 };
 #endif
 
-#if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE
+#if YYDEBUG || YYERROR_VERBOSE || 0
 /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
    First, the terminals, then, starting at YYNTOKENS, nonterminals.  */
 static const char *const yytname[] =
@@ -704,7 +775,7 @@ static const char *const yytname[] =
   "RLikeArg", "RLikeArg2", "VerbatimArg", "VerbatimArg1", "VerbatimArg2",
   "IfDefTarget", "goLatexLike", "goRLike", "goRLike2", "goOption",
   "goVerbatim", "goVerbatim1", "goVerbatim2", "goItem0", "goItem2", "Arg",
-  "Option", 0
+  "Option", YY_NULL
 };
 #endif
 
@@ -749,8 +820,8 @@ static const yytype_uint8 yyr2[] =
        0,     0,     0,     0,     3,     2,     4,     3,     4,     3
 };
 
-/* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state
-   STATE-NUM when YYTABLE doesn't specify something else to do.  Zero
+/* 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[] =
 {
@@ -761,7 +832,7 @@ static const yytype_uint8 yydefact[] =
        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,    80,    75,    75,    25,    26,    27,    28,
+      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,
@@ -790,21 +861,21 @@ static const yytype_int16 yydefgoto[] =
 #define YYPACT_NINF -94
 static const yytype_int16 yypact[] =
 {
-      19,   -94,   792,   -94,    25,   792,   -94,   -94,   -94,   -94,
+      28,   -94,   792,   -94,    20,   792,   -94,   -94,   -94,   -94,
      -94,   -94,   -94,   -94,   -94,   -94,   -94,   -94,   -94,   -94,
-     -94,   -94,   -94,   -94,   -94,   -94,   -94,    28,   718,   -94,
-     -94,    34,   638,   -94,   -94,   -94,     4,   -94,     4,   -94,
-       4,   -94,   -30,   -94,   -94,     4,   -94,     4,   -94,   -94,
-     -94,   -94,   -94,   -94,   -94,   -94,   -94,   792,    16,   -94,
+     -94,   -94,   -94,   -94,   -94,   -94,   -94,    29,   718,   -94,
+     -94,    34,   638,   -94,   -94,   -94,   -19,   -94,   -19,   -94,
+     -19,   -94,   -30,   -94,   -94,   -19,   -94,   -19,   -94,   -94,
+     -94,   -94,   -94,   -94,   -94,   -94,   -94,   792,    -6,   -94,
      -94,   -94,   638,   -94,   -94,   -94,   -94,   -94,   -94,   -94,
      -94,   -94,   -94,   -94,   -94,   -94,   -94,   -94,   -94,   -94,
      -94,   265,   556,   -94,   -94,   -94,   -94,   -94,   -94,   -94,
-     -94,   -22,   -94,   638,   -94,    12,   -94,   -94,   -94,   -94,
+     -94,   -22,   -94,   638,   -94,     2,   -94,   -94,   -94,   -94,
      -94,   -94,   -94,   -94,   -94,   -94,   -94,   755,   -94,   -94,
-     -94,   -30,   -94,   -94,     8,   -94,     4,   -94,   -94,    15,
+     -94,   -30,   -94,   -94,     1,   -94,   -19,   -94,   -94,     4,
      -94,   -94,   638,   306,   -94,   347,   -94,   -94,   -94,   388,
-      13,   -94,   -94,   -94,   -94,   -94,   -94,   -94,   -94,   680,
-     -94,   -94,    12,   -94,   -94,   -94,   -94,   -94,   -94,   -94,
+       7,   -94,   -94,   -94,   -94,   -94,   -94,   -94,   -94,   680,
+     -94,   -94,     2,   -94,   -94,   -94,   -94,   -94,   -94,   -94,
      -94,   597,   -94,   224,   -94,   -94,   429,   -94,   -94,   -94,
      -94,   -94,   -94,   -94,   -94,   -94,   470,   -94,   179,   -94,
      -94,   -94,   -94,   -94,   -94,   -94,   -94,   -94,   -94,   511,
@@ -815,30 +886,29 @@ static const yytype_int16 yypact[] =
 /* YYPGOTO[NTERM-NUM].  */
 static const yytype_int8 yypgoto[] =
 {
-     -94,   -94,   -94,   -94,     7,    -2,   -64,   -10,   -94,    22,
-      -8,   -50,   -94,    -3,     6,   -93,   -11,   -26,   -94,     0,
-      10,   -94,   -94,   -35,   -94,   -94,   -94,   -94,   -94,   -17,
-     -78
+     -94,   -94,   -94,   -94,     3,    -2,   -64,   -10,   -94,    22,
+      -8,   -43,   -94,    -9,    -4,   -93,   -11,    -5,   -94,    -7,
+      10,   -94,   -94,   -31,   -94,   -94,   -94,   -94,   -94,   -17,
+     -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 zero, do what YYDEFACT says.
-   If YYTABLE_NINF, syntax error.  */
+   number is the opposite.  If YYTABLE_NINF, syntax error.  */
 #define YYTABLE_NINF -50
 static const yytype_int16 yytable[] =
 {
       43,    41,   131,    34,    48,    49,    50,    51,    52,    53,
       54,    55,    56,    32,    92,   127,    93,   125,   141,    87,
-       1,    88,    81,    89,    30,    33,    60,    30,    96,   111,
-      98,    59,   114,   142,    58,    97,   144,    61,    99,   100,
-     101,   102,   103,   104,   105,   106,   119,   120,    81,   164,
-      30,    91,   109,   108,    93,   113,    92,   112,   151,   147,
-     157,     2,     3,   118,   107,   156,   121,   117,   146,   110,
-     149,   150,   126,     0,   128,   122,     0,     0,     0,    30,
+      33,    88,    81,    89,    30,    81,    60,    30,    96,     1,
+      98,   108,    59,   111,    58,    97,   114,    61,    99,   100,
+     101,   102,   103,   104,   105,   106,    92,    93,   147,   164,
+      30,    91,   109,   142,   157,   113,   144,   112,   151,   110,
+     107,   117,   120,   118,     0,   156,   121,   119,   122,     0,
+       2,     3,   126,     0,   128,   146,     0,   149,   150,    30,
        0,     0,     0,   130,     0,    58,     0,     0,     0,   132,
      133,   134,   135,   136,   137,   138,     0,     0,     0,   145,
-     167,     0,   179,     0,     0,    60,   143,     0,     0,     0,
+       0,     0,   179,     0,     0,    60,   143,   167,     0,     0,
        0,     0,     0,   109,     0,   126,     0,     0,     0,     0,
        0,     0,   158,   159,   160,   161,   162,   163,    91,    30,
       91,    91,     0,     0,     0,     0,   165,    34,     0,     0,
@@ -914,19 +984,25 @@ 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,
       21,    22,    23,     3,    44,    37,    46,    81,   111,    36,
-       1,    38,    44,    40,     2,     0,    28,     5,    45,    64,
-      47,     3,    67,   111,    24,    46,   114,     3,    49,    50,
-      51,    52,    53,    54,    55,    56,    72,    73,    44,   142,
-      28,    41,    62,    37,    46,    66,    44,    65,   122,    44,
-      47,    42,    43,    71,    57,   129,    74,    70,   118,    63,
-     120,   121,    82,    -1,    91,    75,    -1,    -1,    -1,    57,
+       0,    38,    44,    40,     2,    44,    28,     5,    45,     1,
+      47,    37,     3,    64,    24,    46,    67,     3,    49,    50,
+      51,    52,    53,    54,    55,    56,    44,    46,    44,   142,
+      28,    41,    62,   111,    47,    66,   114,    65,   122,    63,
+      57,    70,    73,    71,    -1,   129,    74,    72,    75,    -1,
+      42,    43,    82,    -1,    91,   118,    -1,   120,   121,    57,
       -1,    -1,    -1,    93,    -1,    75,    -1,    -1,    -1,   100,
      101,   102,   103,   104,   105,   106,    -1,    -1,    -1,   116,
-     150,    -1,   166,    -1,    -1,   107,   114,    -1,    -1,    -1,
+      -1,    -1,   166,    -1,    -1,   107,   114,   150,    -1,    -1,
       -1,    -1,    -1,   123,    -1,   125,    -1,    -1,    -1,    -1,
       -1,    -1,   133,   134,   135,   136,   137,   138,   118,   107,
      120,   121,    -1,    -1,    -1,    -1,   144,   139,    -1,    -1,
@@ -1018,7 +1094,7 @@ static const yytype_uint8 yystos[] =
       59,    68,    44,    46,    63,    78,    77,    64,    77,    64,
       64,    64,    64,    64,    64,    64,    64,    52,    37,    55,
       62,    71,    58,    64,    71,    60,    75,    61,    58,    65,
-      65,    58,    67,     1,    45,    54,    55,    37,    77,    70,
+      64,    58,    67,     1,    45,    54,    55,    37,    77,    70,
       55,    63,    64,    64,    64,    64,    64,    64,    64,     1,
       36,    63,    78,    58,    78,    77,    59,    44,    66,    59,
       59,    54,    45,     1,    45,    45,    54,    47,    64,    64,
@@ -1055,24 +1131,24 @@ static const yytype_uint8 yystos[] =
 
 #define YYRECOVERING()  (!!yyerrstatus)
 
-#define YYBACKUP(Token, Value)					\
-do								\
-  if (yychar == YYEMPTY && yylen == 1)				\
-    {								\
-      yychar = (Token);						\
-      yylval = (Value);						\
-      yytoken = YYTRANSLATE (yychar);				\
-      YYPOPSTACK (1);						\
-      goto yybackup;						\
-    }								\
-  else								\
-    {								\
+#define YYBACKUP(Token, Value)                                  \
+do                                                              \
+  if (yychar == YYEMPTY)                                        \
+    {                                                           \
+      yychar = (Token);                                         \
+      yylval = (Value);                                         \
+      YYPOPSTACK (yylen);                                       \
+      yystate = *yyssp;                                         \
+      goto yybackup;                                            \
+    }                                                           \
+  else                                                          \
+    {                                                           \
       yyerror (YY_("syntax error: cannot back up")); \
       YYERROR;							\
     }								\
 while (YYID (0))
 
-
+/* Error token number */
 #define YYTERROR	1
 #define YYERRCODE	256
 
@@ -1081,27 +1157,28 @@ while (YYID (0))
    If N is 0, then set CURRENT to the empty location which ends
    the previous symbol: RHS[0] (always defined).  */
 
-#define YYRHSLOC(Rhs, K) ((Rhs)[K])
 #ifndef YYLLOC_DEFAULT
-# define YYLLOC_DEFAULT(Current, Rhs, N)				\
-    do									\
-      if (YYID (N))                                                    \
-	{								\
-	  (Current).first_line   = YYRHSLOC (Rhs, 1).first_line;	\
-	  (Current).first_column = YYRHSLOC (Rhs, 1).first_column;	\
-	  (Current).last_line    = YYRHSLOC (Rhs, N).last_line;		\
-	  (Current).last_column  = YYRHSLOC (Rhs, N).last_column;	\
-	}								\
-      else								\
-	{								\
-	  (Current).first_line   = (Current).last_line   =		\
-	    YYRHSLOC (Rhs, 0).last_line;				\
-	  (Current).first_column = (Current).last_column =		\
-	    YYRHSLOC (Rhs, 0).last_column;				\
-	}								\
+# define YYLLOC_DEFAULT(Current, Rhs, N)                                \
+    do                                                                  \
+      if (YYID (N))                                                     \
+        {                                                               \
+          (Current).first_line   = YYRHSLOC (Rhs, 1).first_line;        \
+          (Current).first_column = YYRHSLOC (Rhs, 1).first_column;      \
+          (Current).last_line    = YYRHSLOC (Rhs, N).last_line;         \
+          (Current).last_column  = YYRHSLOC (Rhs, N).last_column;       \
+        }                                                               \
+      else                                                              \
+        {                                                               \
+          (Current).first_line   = (Current).last_line   =              \
+            YYRHSLOC (Rhs, 0).last_line;                                \
+          (Current).first_column = (Current).last_column =              \
+            YYRHSLOC (Rhs, 0).last_column;                              \
+        }                                                               \
     while (YYID (0))
 #endif
 
+#define YYRHSLOC(Rhs, K) ((Rhs)[K])
+
 
 /* YY_LOCATION_PRINT -- Print the location on the stream.
    This macro was not mandated originally: define only if we know
@@ -1109,10 +1186,46 @@ while (YYID (0))
 
 #ifndef YY_LOCATION_PRINT
 # if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL
-#  define YY_LOCATION_PRINT(File, Loc)			\
-     fprintf (File, "%d.%d-%d.%d",			\
-	      (Loc).first_line, (Loc).first_column,	\
-	      (Loc).last_line,  (Loc).last_column)
+
+/* Print *YYLOCP on YYO.  Private, do not rely on its existence. */
+
+__attribute__((__unused__))
+#if (defined __STDC__ || defined __C99__FUNC__ \
+     || defined __cplusplus || defined _MSC_VER)
+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);
+      if (0 <= yylocp->first_column)
+        res += fprintf (yyo, ".%d", yylocp->first_column);
+    }
+  if (0 <= yylocp->last_line)
+    {
+      if (yylocp->first_line < yylocp->last_line)
+        {
+          res += fprintf (yyo, "-%d", yylocp->last_line);
+          if (0 <= end_col)
+            res += fprintf (yyo, ".%d", end_col);
+        }
+      else if (0 <= end_col && yylocp->first_column < end_col)
+        res += fprintf (yyo, "-%d", end_col);
+    }
+  return res;
+ }
+
+#  define YY_LOCATION_PRINT(File, Loc)          \
+  yy_location_print_ (File, &(Loc))
+
 # else
 #  define YY_LOCATION_PRINT(File, Loc) ((void) 0)
 # endif
@@ -1120,7 +1233,6 @@ while (YYID (0))
 
 
 /* YYLEX -- calling `yylex' with the right arguments.  */
-
 #ifdef YYLEX_PARAM
 # define YYLEX yylex (YYLEX_PARAM)
 #else
@@ -1171,6 +1283,8 @@ yy_symbol_value_print (yyoutput, yytype, yyvaluep, yylocationp)
     YYLTYPE const * const yylocationp;
 #endif
 {
+  FILE *yyo = yyoutput;
+  YYUSE (yyo);
   if (!yyvaluep)
     return;
   YYUSE (yylocationp);
@@ -1180,11 +1294,7 @@ yy_symbol_value_print (yyoutput, yytype, yyvaluep, yylocationp)
 # else
   YYUSE (yyoutput);
 # endif
-  switch (yytype)
-    {
-      default:
-	break;
-    }
+  YYUSE (yytype);
 }
 
 
@@ -1313,7 +1423,6 @@ int yydebug;
 # define YYMAXDEPTH 10000
 #endif
 
-

 
 #if YYERROR_VERBOSE
 
@@ -1416,115 +1525,145 @@ yytnamerr (char *yyres, const char *yystr)
 }
 # endif
 
-/* Copy into YYRESULT an error message about the unexpected token
-   YYCHAR while in state YYSTATE.  Return the number of bytes copied,
-   including the terminating null byte.  If YYRESULT is null, do not
-   copy anything; just return the number of bytes that would be
-   copied.  As a special case, return 0 if an ordinary "syntax error"
-   message will do.  Return YYSIZE_MAXIMUM if overflow occurs during
-   size calculation.  */
-static YYSIZE_T
-yysyntax_error (char *yyresult, int yystate, int yychar)
-{
-  int yyn = yypact[yystate];
+/* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message
+   about the unexpected token YYTOKEN for the state stack whose top is
+   YYSSP.
 
-  if (! (YYPACT_NINF < yyn && yyn <= YYLAST))
-    return 0;
-  else
+   Return 0 if *YYMSG was successfully written.  Return 1 if *YYMSG is
+   not large enough to hold the message.  In that case, also set
+   *YYMSG_ALLOC to the required number of bytes.  Return 2 if the
+   required number of bytes is too large to store.  */
+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 yysize = yysize0;
+  enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
+  /* Internationalized format string. */
+  const char *yyformat = YY_NULL;
+  /* Arguments of yyformat. */
+  char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
+  /* Number of reported tokens (one for the "unexpected", one per
+     "expected"). */
+  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
+       tokens because there are none.
+     - The only way there can be no lookahead present (in yychar) is if
+       this state is a consistent state with a default action.  Thus,
+       detecting the absence of a lookahead is sufficient to determine
+       that there is no unexpected or expected token to report.  In that
+       case, just report a simple "syntax error".
+     - Don't assume there isn't a lookahead just because this state is a
+       consistent state with a default action.  There might have been a
+       previous inconsistent state, consistent state with a non-default
+       action, or user semantic action that manipulated yychar.
+     - Of course, the expected token list depends on states to have
+       correct lookahead information, and it depends on the parser not
+       to perform extra reductions after fetching a lookahead from the
+       scanner and before detecting a syntax error.  Thus, state merging
+       (from LALR or IELR) and default reductions corrupt the expected
+       token list.  However, the list is correct for canonical LR with
+       one exception: it will still contain any token that will not be
+       accepted due to an error action in a later state.
+  */
+  if (yytoken != YYEMPTY)
     {
-      int yytype = YYTRANSLATE (yychar);
-      YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]);
-      YYSIZE_T yysize = yysize0;
-      YYSIZE_T yysize1;
-      int yysize_overflow = 0;
-      enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
-      char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
-      int yyx;
-
-# if 0
-      /* This is so xgettext sees the translatable formats that are
-	 constructed on the fly.  */
-      YY_("syntax error, unexpected %s");
-      YY_("syntax error, unexpected %s, expecting %s");
-      YY_("syntax error, unexpected %s, expecting %s or %s");
-      YY_("syntax error, unexpected %s, expecting %s or %s or %s");
-      YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s");
-# endif
-      char *yyfmt;
-      char const *yyf;
-      static char const yyunexpected[] = "syntax error, unexpected %s";
-      static char const yyexpecting[] = ", expecting %s";
-      static char const yyor[] = " or %s";
-      char yyformat[sizeof yyunexpected
-		    + sizeof yyexpecting - 1
-		    + ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2)
-		       * (sizeof yyor - 1))];
-      char const *yyprefix = yyexpecting;
-
-      /* Start YYX at -YYN if negative to avoid negative indexes in
-	 YYCHECK.  */
-      int yyxbegin = yyn < 0 ? -yyn : 0;
-
-      /* Stay within bounds of both yycheck and yytname.  */
-      int yychecklim = YYLAST - yyn + 1;
-      int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
-      int yycount = 1;
-
-      yyarg[0] = yytname[yytype];
-      yyfmt = yystpcpy (yyformat, yyunexpected);
-
-      for (yyx = yyxbegin; yyx < yyxend; ++yyx)
-	if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
-	  {
-	    if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
-	      {
-		yycount = 1;
-		yysize = yysize0;
-		yyformat[sizeof yyunexpected - 1] = '\0';
-		break;
-	      }
-	    yyarg[yycount++] = yytname[yyx];
-	    yysize1 = yysize + yytnamerr (0, yytname[yyx]);
-	    yysize_overflow |= (yysize1 < yysize);
-	    yysize = yysize1;
-	    yyfmt = yystpcpy (yyfmt, yyprefix);
-	    yyprefix = yyor;
-	  }
+      int yyn = yypact[*yyssp];
+      yyarg[yycount++] = yytname[yytoken];
+      if (!yypact_value_is_default (yyn))
+        {
+          /* Start YYX at -YYN if negative to avoid negative indexes in
+             YYCHECK.  In other words, skip the first -YYN actions for
+             this state because they are default actions.  */
+          int yyxbegin = yyn < 0 ? -yyn : 0;
+          /* Stay within bounds of both yycheck and yytname.  */
+          int yychecklim = YYLAST - yyn + 1;
+          int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
+          int yyx;
+
+          for (yyx = yyxbegin; yyx < yyxend; ++yyx)
+            if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR
+                && !yytable_value_is_error (yytable[yyx + yyn]))
+              {
+                if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
+                  {
+                    yycount = 1;
+                    yysize = yysize0;
+                    break;
+                  }
+                yyarg[yycount++] = yytname[yyx];
+                {
+                  YYSIZE_T yysize1 = yysize + yytnamerr (YY_NULL, yytname[yyx]);
+                  if (! (yysize <= yysize1
+                         && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
+                    return 2;
+                  yysize = yysize1;
+                }
+              }
+        }
+    }
 
-      yyf = YY_(yyformat);
-      yysize1 = yysize + yystrlen (yyf);
-      yysize_overflow |= (yysize1 < yysize);
-      yysize = yysize1;
+  switch (yycount)
+    {
+# define YYCASE_(N, S)                      \
+      case N:                               \
+        yyformat = S;                       \
+      break
+      YYCASE_(0, YY_("syntax error"));
+      YYCASE_(1, YY_("syntax error, unexpected %s"));
+      YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s"));
+      YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s"));
+      YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s"));
+      YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"));
+# undef YYCASE_
+    }
 
-      if (yysize_overflow)
-	return YYSIZE_MAXIMUM;
+  {
+    YYSIZE_T yysize1 = yysize + yystrlen (yyformat);
+    if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
+      return 2;
+    yysize = yysize1;
+  }
 
-      if (yyresult)
-	{
-	  /* Avoid sprintf, as that infringes on the user's name space.
-	     Don't have undefined behavior even if the translation
-	     produced a string with the wrong number of "%s"s.  */
-	  char *yyp = yyresult;
-	  int yyi = 0;
-	  while ((*yyp = *yyf) != '\0')
-	    {
-	      if (*yyp == '%' && yyf[1] == 's' && yyi < yycount)
-		{
-		  yyp += yytnamerr (yyp, yyarg[yyi++]);
-		  yyf += 2;
-		}
-	      else
-		{
-		  yyp++;
-		  yyf++;
-		}
-	    }
-	}
-      return yysize;
+  if (*yymsg_alloc < yysize)
+    {
+      *yymsg_alloc = 2 * yysize;
+      if (! (yysize <= *yymsg_alloc
+             && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM))
+        *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM;
+      return 1;
     }
+
+  /* Avoid sprintf, as that infringes on the user's name space.
+     Don't have undefined behavior even if the translation
+     produced a string with the wrong number of "%s"s.  */
+  {
+    char *yyp = *yymsg;
+    int yyi = 0;
+    while ((*yyp = *yyformat) != '\0')
+      if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount)
+        {
+          yyp += yytnamerr (yyp, yyarg[yyi++]);
+          yyformat += 2;
+        }
+      else
+        {
+          yyp++;
+          yyformat++;
+        }
+  }
+  return 0;
 }
 #endif /* YYERROR_VERBOSE */
-

 
 /*-----------------------------------------------.
 | Release the memory associated to this symbol.  |
@@ -1553,531 +1692,315 @@ yydestruct (yymsg, yytype, yyvaluep, yylocationp)
 
   switch (yytype)
     {
-      case 5: /* "SECTIONHEADER" */
+      case 5: /* SECTIONHEADER */
 
-/* Line 1009 of yacc.c  */
-#line 194 "gramRd.y"
-	{ UNPROTECT_PTR((*yyvaluep)); };
+        { UNPROTECT_PTR((*yyvaluep)); };
 
-/* Line 1009 of yacc.c  */
-#line 1557 "gramRd.c"
-	break;
-      case 6: /* "RSECTIONHEADER" */
+        break;
+      case 6: /* RSECTIONHEADER */
 
-/* Line 1009 of yacc.c  */
-#line 194 "gramRd.y"
-	{ UNPROTECT_PTR((*yyvaluep)); };
+        { UNPROTECT_PTR((*yyvaluep)); };
 
-/* Line 1009 of yacc.c  */
-#line 1566 "gramRd.c"
-	break;
-      case 7: /* "VSECTIONHEADER" */
+        break;
+      case 7: /* VSECTIONHEADER */
 
-/* Line 1009 of yacc.c  */
-#line 194 "gramRd.y"
-	{ UNPROTECT_PTR((*yyvaluep)); };
+        { UNPROTECT_PTR((*yyvaluep)); };
 
-/* Line 1009 of yacc.c  */
-#line 1575 "gramRd.c"
-	break;
-      case 8: /* "SECTIONHEADER2" */
+        break;
+      case 8: /* SECTIONHEADER2 */
 
-/* Line 1009 of yacc.c  */
-#line 194 "gramRd.y"
-	{ UNPROTECT_PTR((*yyvaluep)); };
+        { UNPROTECT_PTR((*yyvaluep)); };
 
-/* Line 1009 of yacc.c  */
-#line 1584 "gramRd.c"
-	break;
-      case 9: /* "RCODEMACRO" */
+        break;
+      case 9: /* RCODEMACRO */
 
-/* Line 1009 of yacc.c  */
-#line 194 "gramRd.y"
-	{ UNPROTECT_PTR((*yyvaluep)); };
+        { UNPROTECT_PTR((*yyvaluep)); };
 
-/* Line 1009 of yacc.c  */
-#line 1593 "gramRd.c"
-	break;
-      case 10: /* "SEXPR" */
+        break;
+      case 10: /* SEXPR */
 
-/* Line 1009 of yacc.c  */
-#line 194 "gramRd.y"
-	{ UNPROTECT_PTR((*yyvaluep)); };
+        { UNPROTECT_PTR((*yyvaluep)); };
 
-/* Line 1009 of yacc.c  */
-#line 1602 "gramRd.c"
-	break;
-      case 12: /* "LATEXMACRO" */
+        break;
+      case 12: /* LATEXMACRO */
 
-/* Line 1009 of yacc.c  */
-#line 194 "gramRd.y"
-	{ UNPROTECT_PTR((*yyvaluep)); };
+        { UNPROTECT_PTR((*yyvaluep)); };
 
-/* Line 1009 of yacc.c  */
-#line 1611 "gramRd.c"
-	break;
-      case 13: /* "VERBMACRO" */
+        break;
+      case 13: /* VERBMACRO */
 
-/* Line 1009 of yacc.c  */
-#line 194 "gramRd.y"
-	{ UNPROTECT_PTR((*yyvaluep)); };
+        { UNPROTECT_PTR((*yyvaluep)); };
 
-/* Line 1009 of yacc.c  */
-#line 1620 "gramRd.c"
-	break;
-      case 14: /* "OPTMACRO" */
+        break;
+      case 14: /* OPTMACRO */
 
-/* Line 1009 of yacc.c  */
-#line 194 "gramRd.y"
-	{ UNPROTECT_PTR((*yyvaluep)); };
+        { UNPROTECT_PTR((*yyvaluep)); };
 
-/* Line 1009 of yacc.c  */
-#line 1629 "gramRd.c"
-	break;
-      case 15: /* "ESCAPE" */
+        break;
+      case 15: /* ESCAPE */
 
-/* Line 1009 of yacc.c  */
-#line 194 "gramRd.y"
-	{ UNPROTECT_PTR((*yyvaluep)); };
+        { UNPROTECT_PTR((*yyvaluep)); };
 
-/* Line 1009 of yacc.c  */
-#line 1638 "gramRd.c"
-	break;
-      case 16: /* "LISTSECTION" */
+        break;
+      case 16: /* LISTSECTION */
 
-/* Line 1009 of yacc.c  */
-#line 194 "gramRd.y"
-	{ UNPROTECT_PTR((*yyvaluep)); };
+        { UNPROTECT_PTR((*yyvaluep)); };
 
-/* Line 1009 of yacc.c  */
-#line 1647 "gramRd.c"
-	break;
-      case 17: /* "ITEMIZE" */
+        break;
+      case 17: /* ITEMIZE */
 
-/* Line 1009 of yacc.c  */
-#line 194 "gramRd.y"
-	{ UNPROTECT_PTR((*yyvaluep)); };
+        { UNPROTECT_PTR((*yyvaluep)); };
 
-/* Line 1009 of yacc.c  */
-#line 1656 "gramRd.c"
-	break;
-      case 18: /* "DESCRIPTION" */
+        break;
+      case 18: /* DESCRIPTION */
 
-/* Line 1009 of yacc.c  */
-#line 194 "gramRd.y"
-	{ UNPROTECT_PTR((*yyvaluep)); };
+        { UNPROTECT_PTR((*yyvaluep)); };
 
-/* Line 1009 of yacc.c  */
-#line 1665 "gramRd.c"
-	break;
-      case 19: /* "NOITEM" */
+        break;
+      case 19: /* NOITEM */
 
-/* Line 1009 of yacc.c  */
-#line 194 "gramRd.y"
-	{ UNPROTECT_PTR((*yyvaluep)); };
+        { UNPROTECT_PTR((*yyvaluep)); };
 
-/* Line 1009 of yacc.c  */
-#line 1674 "gramRd.c"
-	break;
-      case 20: /* "LATEXMACRO2" */
+        break;
+      case 20: /* LATEXMACRO2 */
 
-/* Line 1009 of yacc.c  */
-#line 194 "gramRd.y"
-	{ UNPROTECT_PTR((*yyvaluep)); };
+        { UNPROTECT_PTR((*yyvaluep)); };
 
-/* Line 1009 of yacc.c  */
-#line 1683 "gramRd.c"
-	break;
-      case 21: /* "VERBMACRO2" */
+        break;
+      case 21: /* VERBMACRO2 */
 
-/* Line 1009 of yacc.c  */
-#line 194 "gramRd.y"
-	{ UNPROTECT_PTR((*yyvaluep)); };
+        { UNPROTECT_PTR((*yyvaluep)); };
 
-/* Line 1009 of yacc.c  */
-#line 1692 "gramRd.c"
-	break;
-      case 22: /* "VERBLATEX" */
+        break;
+      case 22: /* VERBLATEX */
 
-/* Line 1009 of yacc.c  */
-#line 194 "gramRd.y"
-	{ UNPROTECT_PTR((*yyvaluep)); };
+        { UNPROTECT_PTR((*yyvaluep)); };
 
-/* Line 1009 of yacc.c  */
-#line 1701 "gramRd.c"
-	break;
-      case 23: /* "LATEXMACRO3" */
+        break;
+      case 23: /* LATEXMACRO3 */
 
-/* Line 1009 of yacc.c  */
-#line 194 "gramRd.y"
-	{ UNPROTECT_PTR((*yyvaluep)); };
+        { UNPROTECT_PTR((*yyvaluep)); };
 
-/* Line 1009 of yacc.c  */
-#line 1710 "gramRd.c"
-	break;
-      case 24: /* "NEWCOMMAND" */
+        break;
+      case 24: /* NEWCOMMAND */
 
-/* Line 1009 of yacc.c  */
-#line 194 "gramRd.y"
-	{ UNPROTECT_PTR((*yyvaluep)); };
+        { UNPROTECT_PTR((*yyvaluep)); };
 
-/* Line 1009 of yacc.c  */
-#line 1719 "gramRd.c"
-	break;
-      case 25: /* "USERMACRO" */
+        break;
+      case 25: /* USERMACRO */
 
-/* Line 1009 of yacc.c  */
-#line 194 "gramRd.y"
-	{ UNPROTECT_PTR((*yyvaluep)); };
+        { UNPROTECT_PTR((*yyvaluep)); };
 
-/* Line 1009 of yacc.c  */
-#line 1728 "gramRd.c"
-	break;
-      case 26: /* "USERMACRO1" */
+        break;
+      case 26: /* USERMACRO1 */
 
-/* Line 1009 of yacc.c  */
-#line 194 "gramRd.y"
-	{ UNPROTECT_PTR((*yyvaluep)); };
+        { UNPROTECT_PTR((*yyvaluep)); };
 
-/* Line 1009 of yacc.c  */
-#line 1737 "gramRd.c"
-	break;
-      case 27: /* "USERMACRO2" */
+        break;
+      case 27: /* USERMACRO2 */
 
-/* Line 1009 of yacc.c  */
-#line 194 "gramRd.y"
-	{ UNPROTECT_PTR((*yyvaluep)); };
+        { UNPROTECT_PTR((*yyvaluep)); };
 
-/* Line 1009 of yacc.c  */
-#line 1746 "gramRd.c"
-	break;
-      case 28: /* "USERMACRO3" */
+        break;
+      case 28: /* USERMACRO3 */
 
-/* Line 1009 of yacc.c  */
-#line 194 "gramRd.y"
-	{ UNPROTECT_PTR((*yyvaluep)); };
+        { UNPROTECT_PTR((*yyvaluep)); };
 
-/* Line 1009 of yacc.c  */
-#line 1755 "gramRd.c"
-	break;
-      case 29: /* "USERMACRO4" */
+        break;
+      case 29: /* USERMACRO4 */
 
-/* Line 1009 of yacc.c  */
-#line 194 "gramRd.y"
-	{ UNPROTECT_PTR((*yyvaluep)); };
+        { UNPROTECT_PTR((*yyvaluep)); };
 
-/* Line 1009 of yacc.c  */
-#line 1764 "gramRd.c"
-	break;
-      case 30: /* "USERMACRO5" */
+        break;
+      case 30: /* USERMACRO5 */
 
-/* Line 1009 of yacc.c  */
-#line 194 "gramRd.y"
-	{ UNPROTECT_PTR((*yyvaluep)); };
+        { UNPROTECT_PTR((*yyvaluep)); };
 
-/* Line 1009 of yacc.c  */
-#line 1773 "gramRd.c"
-	break;
-      case 31: /* "USERMACRO6" */
+        break;
+      case 31: /* USERMACRO6 */
 
-/* Line 1009 of yacc.c  */
-#line 194 "gramRd.y"
-	{ UNPROTECT_PTR((*yyvaluep)); };
+        { UNPROTECT_PTR((*yyvaluep)); };
 
-/* Line 1009 of yacc.c  */
-#line 1782 "gramRd.c"
-	break;
-      case 32: /* "USERMACRO7" */
+        break;
+      case 32: /* USERMACRO7 */
 
-/* Line 1009 of yacc.c  */
-#line 194 "gramRd.y"
-	{ UNPROTECT_PTR((*yyvaluep)); };
+        { UNPROTECT_PTR((*yyvaluep)); };
 
-/* Line 1009 of yacc.c  */
-#line 1791 "gramRd.c"
-	break;
-      case 33: /* "USERMACRO8" */
+        break;
+      case 33: /* USERMACRO8 */
 
-/* Line 1009 of yacc.c  */
-#line 194 "gramRd.y"
-	{ UNPROTECT_PTR((*yyvaluep)); };
+        { UNPROTECT_PTR((*yyvaluep)); };
 
-/* Line 1009 of yacc.c  */
-#line 1800 "gramRd.c"
-	break;
-      case 34: /* "USERMACRO9" */
+        break;
+      case 34: /* USERMACRO9 */
 
-/* Line 1009 of yacc.c  */
-#line 194 "gramRd.y"
-	{ UNPROTECT_PTR((*yyvaluep)); };
+        { UNPROTECT_PTR((*yyvaluep)); };
 
-/* Line 1009 of yacc.c  */
-#line 1809 "gramRd.c"
-	break;
-      case 35: /* "IFDEF" */
+        break;
+      case 35: /* IFDEF */
 
-/* Line 1009 of yacc.c  */
-#line 194 "gramRd.y"
-	{ UNPROTECT_PTR((*yyvaluep)); };
+        { UNPROTECT_PTR((*yyvaluep)); };
 
-/* Line 1009 of yacc.c  */
-#line 1818 "gramRd.c"
-	break;
-      case 36: /* "ENDIF" */
+        break;
+      case 36: /* ENDIF */
 
-/* Line 1009 of yacc.c  */
-#line 194 "gramRd.y"
-	{ UNPROTECT_PTR((*yyvaluep)); };
+        { UNPROTECT_PTR((*yyvaluep)); };
 
-/* Line 1009 of yacc.c  */
-#line 1827 "gramRd.c"
-	break;
-      case 37: /* "TEXT" */
+        break;
+      case 37: /* TEXT */
 
-/* Line 1009 of yacc.c  */
-#line 194 "gramRd.y"
-	{ UNPROTECT_PTR((*yyvaluep)); };
+        { UNPROTECT_PTR((*yyvaluep)); };
 
-/* Line 1009 of yacc.c  */
-#line 1836 "gramRd.c"
-	break;
-      case 38: /* "RCODE" */
+        break;
+      case 38: /* RCODE */
 
-/* Line 1009 of yacc.c  */
-#line 194 "gramRd.y"
-	{ UNPROTECT_PTR((*yyvaluep)); };
+        { UNPROTECT_PTR((*yyvaluep)); };
 
-/* Line 1009 of yacc.c  */
-#line 1845 "gramRd.c"
-	break;
-      case 39: /* "VERB" */
+        break;
+      case 39: /* VERB */
 
-/* Line 1009 of yacc.c  */
-#line 194 "gramRd.y"
-	{ UNPROTECT_PTR((*yyvaluep)); };
+        { UNPROTECT_PTR((*yyvaluep)); };
 
-/* Line 1009 of yacc.c  */
-#line 1854 "gramRd.c"
-	break;
-      case 40: /* "COMMENT" */
+        break;
+      case 40: /* COMMENT */
 
-/* Line 1009 of yacc.c  */
-#line 194 "gramRd.y"
-	{ UNPROTECT_PTR((*yyvaluep)); };
+        { UNPROTECT_PTR((*yyvaluep)); };
 
-/* Line 1009 of yacc.c  */
-#line 1863 "gramRd.c"
-	break;
-      case 41: /* "UNKNOWN" */
+        break;
+      case 41: /* UNKNOWN */
 
-/* Line 1009 of yacc.c  */
-#line 194 "gramRd.y"
-	{ UNPROTECT_PTR((*yyvaluep)); };
+        { UNPROTECT_PTR((*yyvaluep)); };
 
-/* Line 1009 of yacc.c  */
-#line 1872 "gramRd.c"
-	break;
-      case 42: /* "STARTFILE" */
+        break;
+      case 42: /* STARTFILE */
 
-/* Line 1009 of yacc.c  */
-#line 194 "gramRd.y"
-	{ UNPROTECT_PTR((*yyvaluep)); };
+        { UNPROTECT_PTR((*yyvaluep)); };
 
-/* Line 1009 of yacc.c  */
-#line 1881 "gramRd.c"
-	break;
-      case 43: /* "STARTFRAGMENT" */
+        break;
+      case 43: /* STARTFRAGMENT */
 
-/* Line 1009 of yacc.c  */
-#line 194 "gramRd.y"
-	{ UNPROTECT_PTR((*yyvaluep)); };
+        { UNPROTECT_PTR((*yyvaluep)); };
 
-/* Line 1009 of yacc.c  */
-#line 1890 "gramRd.c"
-	break;
-      case 54: /* "ArgItems" */
+        break;
+      case 54: /* ArgItems */
 
-/* Line 1009 of yacc.c  */
-#line 194 "gramRd.y"
-	{ UNPROTECT_PTR((*yyvaluep)); };
+        { UNPROTECT_PTR((*yyvaluep)); };
 
-/* Line 1009 of yacc.c  */
-#line 1899 "gramRd.c"
-	break;
-      case 58: /* "LatexArg" */
+        break;
+      case 58: /* LatexArg */
 
-/* Line 1009 of yacc.c  */
-#line 194 "gramRd.y"
-	{ UNPROTECT_PTR((*yyvaluep)); };
+        { UNPROTECT_PTR((*yyvaluep)); };
 
-/* Line 1009 of yacc.c  */
-#line 1908 "gramRd.c"
-	break;
-      case 63: /* "RLikeArg2" */
+        break;
+      case 63: /* RLikeArg2 */
 
-/* Line 1009 of yacc.c  */
-#line 194 "gramRd.y"
-	{ UNPROTECT_PTR((*yyvaluep)); };
+        { UNPROTECT_PTR((*yyvaluep)); };
 
-/* Line 1009 of yacc.c  */
-#line 1917 "gramRd.c"
-	break;
-      case 65: /* "VerbatimArg1" */
+        break;
+      case 65: /* VerbatimArg1 */
 
-/* Line 1009 of yacc.c  */
-#line 194 "gramRd.y"
-	{ UNPROTECT_PTR((*yyvaluep)); };
+        { UNPROTECT_PTR((*yyvaluep)); };
 
-/* Line 1009 of yacc.c  */
-#line 1926 "gramRd.c"
-	break;
-      case 66: /* "VerbatimArg2" */
+        break;
+      case 66: /* VerbatimArg2 */
 
-/* Line 1009 of yacc.c  */
-#line 194 "gramRd.y"
-	{ UNPROTECT_PTR((*yyvaluep)); };
+        { UNPROTECT_PTR((*yyvaluep)); };
 
-/* Line 1009 of yacc.c  */
-#line 1935 "gramRd.c"
-	break;
-      case 67: /* "IfDefTarget" */
+        break;
+      case 67: /* IfDefTarget */
 
-/* Line 1009 of yacc.c  */
-#line 194 "gramRd.y"
-	{ UNPROTECT_PTR((*yyvaluep)); };
+        { UNPROTECT_PTR((*yyvaluep)); };
 
-/* Line 1009 of yacc.c  */
-#line 1944 "gramRd.c"
-	break;
-      case 68: /* "goLatexLike" */
+        break;
+      case 68: /* goLatexLike */
 
-/* Line 1009 of yacc.c  */
-#line 194 "gramRd.y"
-	{ UNPROTECT_PTR((*yyvaluep)); };
+        { UNPROTECT_PTR((*yyvaluep)); };
 
-/* Line 1009 of yacc.c  */
-#line 1953 "gramRd.c"
-	break;
-      case 69: /* "goRLike" */
+        break;
+      case 69: /* goRLike */
 
-/* Line 1009 of yacc.c  */
-#line 194 "gramRd.y"
-	{ UNPROTECT_PTR((*yyvaluep)); };
+        { UNPROTECT_PTR((*yyvaluep)); };
 
-/* Line 1009 of yacc.c  */
-#line 1962 "gramRd.c"
-	break;
-      case 70: /* "goRLike2" */
+        break;
+      case 70: /* goRLike2 */
 
-/* Line 1009 of yacc.c  */
-#line 194 "gramRd.y"
-	{ UNPROTECT_PTR((*yyvaluep)); };
+        { UNPROTECT_PTR((*yyvaluep)); };
 
-/* Line 1009 of yacc.c  */
-#line 1971 "gramRd.c"
-	break;
-      case 71: /* "goOption" */
+        break;
+      case 71: /* goOption */
 
-/* Line 1009 of yacc.c  */
-#line 194 "gramRd.y"
-	{ UNPROTECT_PTR((*yyvaluep)); };
+        { UNPROTECT_PTR((*yyvaluep)); };
 
-/* Line 1009 of yacc.c  */
-#line 1980 "gramRd.c"
-	break;
-      case 72: /* "goVerbatim" */
+        break;
+      case 72: /* goVerbatim */
 
-/* Line 1009 of yacc.c  */
-#line 194 "gramRd.y"
-	{ UNPROTECT_PTR((*yyvaluep)); };
+        { UNPROTECT_PTR((*yyvaluep)); };
 
-/* Line 1009 of yacc.c  */
-#line 1989 "gramRd.c"
-	break;
-      case 73: /* "goVerbatim1" */
+        break;
+      case 73: /* goVerbatim1 */
 
-/* Line 1009 of yacc.c  */
-#line 194 "gramRd.y"
-	{ UNPROTECT_PTR((*yyvaluep)); };
+        { UNPROTECT_PTR((*yyvaluep)); };
 
-/* Line 1009 of yacc.c  */
-#line 1998 "gramRd.c"
-	break;
-      case 74: /* "goVerbatim2" */
+        break;
+      case 74: /* goVerbatim2 */
 
-/* Line 1009 of yacc.c  */
-#line 194 "gramRd.y"
-	{ UNPROTECT_PTR((*yyvaluep)); };
+        { UNPROTECT_PTR((*yyvaluep)); };
 
-/* Line 1009 of yacc.c  */
-#line 2007 "gramRd.c"
-	break;
-      case 75: /* "goItem0" */
+        break;
+      case 75: /* goItem0 */
 
-/* Line 1009 of yacc.c  */
-#line 194 "gramRd.y"
-	{ UNPROTECT_PTR((*yyvaluep)); };
+        { UNPROTECT_PTR((*yyvaluep)); };
 
-/* Line 1009 of yacc.c  */
-#line 2016 "gramRd.c"
-	break;
-      case 76: /* "goItem2" */
+        break;
+      case 76: /* goItem2 */
 
-/* Line 1009 of yacc.c  */
-#line 194 "gramRd.y"
-	{ UNPROTECT_PTR((*yyvaluep)); };
+        { UNPROTECT_PTR((*yyvaluep)); };
 
-/* Line 1009 of yacc.c  */
-#line 2025 "gramRd.c"
-	break;
-      case 78: /* "Option" */
+        break;
+      case 78: /* Option */
 
-/* Line 1009 of yacc.c  */
-#line 194 "gramRd.y"
-	{ UNPROTECT_PTR((*yyvaluep)); };
+        { UNPROTECT_PTR((*yyvaluep)); };
 
-/* Line 1009 of yacc.c  */
-#line 2034 "gramRd.c"
-	break;
+        break;
 
       default:
-	break;
+        break;
     }
 }
 
-/* Prevent warnings from -Wmissing-prototypes.  */
-#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 */
+
 
 
 /* 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;
+YYSTYPE yylval YY_INITIAL_VALUE(yyval_default);
 
 /* Location data for the lookahead symbol.  */
-YYLTYPE yylloc;
+YYLTYPE yylloc
+# if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL
+  = { 1, 1, 1, 1 }
+# endif
+;
+
 
 /* Number of syntax errors so far.  */
 int yynerrs;
 
 
-
-/*-------------------------.
-| yyparse or yypush_parse.  |
-`-------------------------*/
+/*----------.
+| yyparse.  |
+`----------*/
 
 #ifdef YYPARSE_PARAM
 #if (defined __STDC__ || defined __C99__FUNC__ \
@@ -2101,8 +2024,6 @@ yyparse ()
 #endif
 #endif
 {
-
-
     int yystate;
     /* Number of tokens to shift before error messages enabled.  */
     int yyerrstatus;
@@ -2112,7 +2033,7 @@ yyparse ()
        `yyvs': related to semantic values.
        `yyls': related to locations.
 
-       Refer to the stacks thru separate pointers, to allow yyoverflow
+       Refer to the stacks through separate pointers, to allow yyoverflow
        to reallocate them elsewhere.  */
 
     /* The state stack.  */
@@ -2131,14 +2052,14 @@ yyparse ()
     YYLTYPE *yylsp;
 
     /* The locations where the error started and ended.  */
-    YYLTYPE yyerror_range[2];
+    YYLTYPE yyerror_range[3];
 
     YYSIZE_T yystacksize;
 
   int yyn;
   int yyresult;
   /* Lookahead token as an internal (translated) token number.  */
-  int yytoken;
+  int yytoken = 0;
   /* The variables used to return semantic value and location from the
      action routines.  */
   YYSTYPE yyval;
@@ -2157,10 +2078,9 @@ yyparse ()
      Keep to zero when no symbol should be popped.  */
   int yylen = 0;
 
-  yytoken = 0;
-  yyss = yyssa;
-  yyvs = yyvsa;
-  yyls = yylsa;
+  yyssp = yyss = yyssa;
+  yyvsp = yyvs = yyvsa;
+  yylsp = yyls = yylsa;
   yystacksize = YYINITDEPTH;
 
   YYDPRINTF ((stderr, "Starting parse\n"));
@@ -2169,21 +2089,7 @@ yyparse ()
   yyerrstatus = 0;
   yynerrs = 0;
   yychar = YYEMPTY; /* Cause a token to be read.  */
-
-  /* Initialize stack pointers.
-     Waste one element of value and location stack
-     so that they stay on the same level as the state stack.
-     The wasted elements are never initialized.  */
-  yyssp = yyss;
-  yyvsp = yyvs;
-  yylsp = yyls;
-
-#if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL
-  /* Initialize the default location before parsing starts.  */
-  yylloc.first_line   = yylloc.last_line   = 1;
-  yylloc.first_column = yylloc.last_column = 1;
-#endif
-
+  yylsp[0] = yylloc;
   goto yysetstate;
 
 /*------------------------------------------------------------.
@@ -2280,7 +2186,7 @@ yybackup:
 
   /* First try to decide what to do without reference to lookahead token.  */
   yyn = yypact[yystate];
-  if (yyn == YYPACT_NINF)
+  if (yypact_value_is_default (yyn))
     goto yydefault;
 
   /* Not known => get a lookahead token if don't already have one.  */
@@ -2311,8 +2217,8 @@ yybackup:
   yyn = yytable[yyn];
   if (yyn <= 0)
     {
-      if (yyn == 0 || yyn == YYTABLE_NINF)
-	goto yyerrlab;
+      if (yytable_value_is_error (yyn))
+        goto yyerrlab;
       yyn = -yyn;
       goto yyreduce;
     }
@@ -2329,7 +2235,9 @@ yybackup:
   yychar = YYEMPTY;
 
   yystate = yyn;
+  YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
   *++yyvsp = yylval;
+  YY_IGNORE_MAYBE_UNINITIALIZED_END
   *++yylsp = yylloc;
   goto yynewstate;
 
@@ -2368,442 +2276,316 @@ yyreduce:
     {
         case 2:
 
-/* Line 1464 of yacc.c  */
-#line 206 "gramRd.y"
-    { xxsavevalue((yyvsp[(2) - (3)]), &(yyloc)); UNPROTECT_PTR((yyvsp[(1) - (3)])); return 0; ;}
+    { xxsavevalue((yyvsp[(2) - (3)]), &(yyloc)); UNPROTECT_PTR((yyvsp[(1) - (3)])); YYACCEPT; }
     break;
 
   case 3:
 
-/* Line 1464 of yacc.c  */
-#line 207 "gramRd.y"
-    { xxsavevalue((yyvsp[(2) - (3)]), &(yyloc)); UNPROTECT_PTR((yyvsp[(1) - (3)])); return 0; ;}
+    { xxsavevalue((yyvsp[(2) - (3)]), &(yyloc)); UNPROTECT_PTR((yyvsp[(1) - (3)])); YYACCEPT; }
     break;
 
   case 4:
 
-/* Line 1464 of yacc.c  */
-#line 208 "gramRd.y"
-    { PROTECT(parseState.Value = R_NilValue);  YYABORT; ;}
+    { PROTECT(parseState.Value = R_NilValue);  YYABORT; }
     break;
 
   case 5:
 
-/* Line 1464 of yacc.c  */
-#line 211 "gramRd.y"
-    { (yyval) = (yyvsp[(2) - (2)]); UNPROTECT_PTR((yyvsp[(1) - (2)])); ;}
+    { (yyval) = (yyvsp[(2) - (2)]); UNPROTECT_PTR((yyvsp[(1) - (2)])); }
     break;
 
   case 6:
 
-/* Line 1464 of yacc.c  */
-#line 214 "gramRd.y"
-    { (yyval) = (yyvsp[(1) - (1)]); ;}
+    { (yyval) = (yyvsp[(1) - (1)]); }
     break;
 
   case 7:
 
-/* Line 1464 of yacc.c  */
-#line 217 "gramRd.y"
-    { (yyval) = xxnewlist((yyvsp[(1) - (1)])); ;}
+    { (yyval) = xxnewlist((yyvsp[(1) - (1)])); }
     break;
 
   case 8:
 
-/* Line 1464 of yacc.c  */
-#line 218 "gramRd.y"
-    { (yyval) = xxlist((yyvsp[(1) - (2)]), (yyvsp[(2) - (2)])); ;}
+    { (yyval) = xxlist((yyvsp[(1) - (2)]), (yyvsp[(2) - (2)])); }
     break;
 
   case 9:
 
-/* Line 1464 of yacc.c  */
-#line 220 "gramRd.y"
-    { (yyval) = xxmarkup((yyvsp[(1) - (2)]), (yyvsp[(2) - (2)]), STATIC, &(yyloc)); ;}
+    { (yyval) = xxmarkup((yyvsp[(1) - (2)]), (yyvsp[(2) - (2)]), STATIC, &(yyloc)); }
     break;
 
   case 10:
 
-/* Line 1464 of yacc.c  */
-#line 221 "gramRd.y"
-    { (yyval) = xxmarkup((yyvsp[(1) - (2)]), (yyvsp[(2) - (2)]), HAS_SEXPR, &(yyloc)); ;}
+    { (yyval) = xxmarkup((yyvsp[(1) - (2)]), (yyvsp[(2) - (2)]), HAS_SEXPR, &(yyloc)); }
     break;
 
   case 11:
 
-/* Line 1464 of yacc.c  */
-#line 222 "gramRd.y"
-    { (yyval) = xxmarkup((yyvsp[(1) - (2)]), (yyvsp[(2) - (2)]), STATIC, &(yyloc)); ;}
+    { (yyval) = xxmarkup((yyvsp[(1) - (2)]), (yyvsp[(2) - (2)]), STATIC, &(yyloc)); }
     break;
 
   case 12:
 
-/* Line 1464 of yacc.c  */
-#line 223 "gramRd.y"
-    { (yyval) = xxmarkup((yyvsp[(1) - (2)]), (yyvsp[(2) - (2)]), STATIC, &(yyloc)); ;}
+    { (yyval) = xxmarkup((yyvsp[(1) - (2)]), (yyvsp[(2) - (2)]), STATIC, &(yyloc)); }
     break;
 
   case 13:
 
-/* Line 1464 of yacc.c  */
-#line 224 "gramRd.y"
-    { (yyval) = xxmarkup((yyvsp[(1) - (2)]), (yyvsp[(2) - (2)]), STATIC, &(yyloc)); ;}
+    { (yyval) = xxmarkup((yyvsp[(1) - (2)]), (yyvsp[(2) - (2)]), STATIC, &(yyloc)); }
     break;
 
   case 14:
 
-/* Line 1464 of yacc.c  */
-#line 225 "gramRd.y"
-    { (yyval) = xxmarkup2((yyvsp[(1) - (3)]), (yyvsp[(2) - (3)]), (yyvsp[(3) - (3)]), 2, STATIC, &(yyloc)); ;}
+    { (yyval) = xxmarkup2((yyvsp[(1) - (3)]), (yyvsp[(2) - (3)]), (yyvsp[(3) - (3)]), 2, STATIC, &(yyloc)); }
     break;
 
   case 15:
 
-/* Line 1464 of yacc.c  */
-#line 226 "gramRd.y"
-    { (yyval) = xxmarkup2((yyvsp[(1) - (4)]), (yyvsp[(2) - (4)]), (yyvsp[(3) - (4)]), 2, HAS_IFDEF, &(yyloc)); UNPROTECT_PTR((yyvsp[(4) - (4)])); ;}
+    { (yyval) = xxmarkup2((yyvsp[(1) - (4)]), (yyvsp[(2) - (4)]), (yyvsp[(3) - (4)]), 2, HAS_IFDEF, &(yyloc)); UNPROTECT_PTR((yyvsp[(4) - (4)])); }
     break;
 
   case 16:
 
-/* Line 1464 of yacc.c  */
-#line 227 "gramRd.y"
-    { (yyval) = xxmarkup2((yyvsp[(1) - (4)]), (yyvsp[(2) - (4)]), (yyvsp[(3) - (4)]), 2, HAS_IFDEF, &(yyloc)); ;}
+    { (yyval) = xxmarkup2((yyvsp[(1) - (4)]), (yyvsp[(2) - (4)]), (yyvsp[(3) - (4)]), 2, HAS_IFDEF, &(yyloc)); }
     break;
 
   case 17:
 
-/* Line 1464 of yacc.c  */
-#line 228 "gramRd.y"
-    { (yyval) = xxmarkup((yyvsp[(1) - (3)]), (yyvsp[(3) - (3)]), HAS_SEXPR, &(yyloc)); xxpopMode((yyvsp[(2) - (3)])); ;}
+    { (yyval) = xxmarkup((yyvsp[(1) - (3)]), (yyvsp[(3) - (3)]), HAS_SEXPR, &(yyloc)); xxpopMode((yyvsp[(2) - (3)])); }
     break;
 
   case 18:
 
-/* Line 1464 of yacc.c  */
-#line 229 "gramRd.y"
-    { (yyval) = xxOptionmarkup((yyvsp[(1) - (4)]), (yyvsp[(3) - (4)]), (yyvsp[(4) - (4)]), HAS_SEXPR, &(yyloc)); xxpopMode((yyvsp[(2) - (4)])); ;}
+    { (yyval) = xxOptionmarkup((yyvsp[(1) - (4)]), (yyvsp[(3) - (4)]), (yyvsp[(4) - (4)]), HAS_SEXPR, &(yyloc)); xxpopMode((yyvsp[(2) - (4)])); }
     break;
 
   case 19:
 
-/* Line 1464 of yacc.c  */
-#line 230 "gramRd.y"
-    { (yyval) = xxtag((yyvsp[(1) - (1)]), COMMENT, &(yyloc)); ;}
+    { (yyval) = xxtag((yyvsp[(1) - (1)]), COMMENT, &(yyloc)); }
     break;
 
   case 20:
 
-/* Line 1464 of yacc.c  */
-#line 231 "gramRd.y"
-    { (yyval) = xxtag((yyvsp[(1) - (1)]), TEXT, &(yyloc)); ;}
+    { (yyval) = xxtag((yyvsp[(1) - (1)]), TEXT, &(yyloc)); }
     break;
 
   case 21:
 
-/* Line 1464 of yacc.c  */
-#line 232 "gramRd.y"
-    { (yyval) = (yyvsp[(1) - (1)]); ;}
+    { (yyval) = (yyvsp[(1) - (1)]); }
     break;
 
   case 22:
 
-/* Line 1464 of yacc.c  */
-#line 233 "gramRd.y"
-    { (yyval) = (yyvsp[(2) - (2)]); ;}
+    { (yyval) = (yyvsp[(2) - (2)]); }
     break;
 
   case 23:
 
-/* Line 1464 of yacc.c  */
-#line 235 "gramRd.y"
-    { (yyval) = xxnewlist((yyvsp[(1) - (1)])); ;}
+    { (yyval) = xxnewlist((yyvsp[(1) - (1)])); }
     break;
 
   case 24:
 
-/* Line 1464 of yacc.c  */
-#line 236 "gramRd.y"
-    { (yyval) = xxlist((yyvsp[(1) - (2)]), (yyvsp[(2) - (2)])); ;}
+    { (yyval) = xxlist((yyvsp[(1) - (2)]), (yyvsp[(2) - (2)])); }
     break;
 
   case 25:
 
-/* Line 1464 of yacc.c  */
-#line 238 "gramRd.y"
-    { (yyval) = xxtag((yyvsp[(1) - (1)]), TEXT, &(yyloc)); ;}
+    { (yyval) = xxtag((yyvsp[(1) - (1)]), TEXT, &(yyloc)); }
     break;
 
   case 26:
 
-/* Line 1464 of yacc.c  */
-#line 239 "gramRd.y"
-    { (yyval) = xxtag((yyvsp[(1) - (1)]), RCODE, &(yyloc)); ;}
+    { (yyval) = xxtag((yyvsp[(1) - (1)]), RCODE, &(yyloc)); }
     break;
 
   case 27:
 
-/* Line 1464 of yacc.c  */
-#line 240 "gramRd.y"
-    { (yyval) = xxtag((yyvsp[(1) - (1)]), VERB, &(yyloc)); ;}
+    { (yyval) = xxtag((yyvsp[(1) - (1)]), VERB, &(yyloc)); }
     break;
 
   case 28:
 
-/* Line 1464 of yacc.c  */
-#line 241 "gramRd.y"
-    { (yyval) = xxtag((yyvsp[(1) - (1)]), COMMENT, &(yyloc)); ;}
+    { (yyval) = xxtag((yyvsp[(1) - (1)]), COMMENT, &(yyloc)); }
     break;
 
   case 29:
 
-/* Line 1464 of yacc.c  */
-#line 242 "gramRd.y"
-    { (yyval) = xxtag((yyvsp[(1) - (1)]), UNKNOWN, &(yyloc)); yyerror(yyunknown); ;}
+    { (yyval) = xxtag((yyvsp[(1) - (1)]), UNKNOWN, &(yyloc)); yyerror(yyunknown); }
     break;
 
   case 30:
 
-/* Line 1464 of yacc.c  */
-#line 243 "gramRd.y"
-    { (yyval) = xxmarkup(R_NilValue, (yyvsp[(1) - (1)]), STATIC, &(yyloc)); ;}
+    { (yyval) = xxmarkup(R_NilValue, (yyvsp[(1) - (1)]), STATIC, &(yyloc)); }
     break;
 
   case 31:
 
-/* Line 1464 of yacc.c  */
-#line 244 "gramRd.y"
-    { (yyval) = (yyvsp[(1) - (1)]); ;}
+    { (yyval) = (yyvsp[(1) - (1)]); }
     break;
 
   case 32:
 
-/* Line 1464 of yacc.c  */
-#line 245 "gramRd.y"
-    { (yyval) = (yyvsp[(1) - (1)]); ;}
+    { (yyval) = (yyvsp[(1) - (1)]); }
     break;
 
   case 33:
 
-/* Line 1464 of yacc.c  */
-#line 246 "gramRd.y"
-    { (yyval) = (yyvsp[(2) - (2)]); ;}
+    { (yyval) = (yyvsp[(2) - (2)]); }
     break;
 
   case 34:
 
-/* Line 1464 of yacc.c  */
-#line 248 "gramRd.y"
-    { (yyval) = xxmarkup((yyvsp[(1) - (2)]), (yyvsp[(2) - (2)]), STATIC, &(yyloc)); ;}
+    { (yyval) = xxmarkup((yyvsp[(1) - (2)]), (yyvsp[(2) - (2)]), STATIC, &(yyloc)); }
     break;
 
   case 35:
 
-/* Line 1464 of yacc.c  */
-#line 249 "gramRd.y"
-    { (yyval) = xxmarkup2((yyvsp[(1) - (3)]), (yyvsp[(2) - (3)]), (yyvsp[(3) - (3)]), 2, STATIC, &(yyloc)); ;}
+    { (yyval) = xxmarkup2((yyvsp[(1) - (3)]), (yyvsp[(2) - (3)]), (yyvsp[(3) - (3)]), 2, STATIC, &(yyloc)); }
     break;
 
   case 36:
 
-/* Line 1464 of yacc.c  */
-#line 250 "gramRd.y"
-    { (yyval) = xxmarkup3((yyvsp[(1) - (4)]), (yyvsp[(2) - (4)]), (yyvsp[(3) - (4)]), (yyvsp[(4) - (4)]), STATIC, &(yyloc)); ;}
+    { (yyval) = xxmarkup3((yyvsp[(1) - (4)]), (yyvsp[(2) - (4)]), (yyvsp[(3) - (4)]), (yyvsp[(4) - (4)]), STATIC, &(yyloc)); }
     break;
 
   case 37:
 
-/* Line 1464 of yacc.c  */
-#line 251 "gramRd.y"
-    { (yyval) = xxmarkup((yyvsp[(1) - (2)]), (yyvsp[(2) - (2)]), STATIC, &(yyloc)); ;}
+    { (yyval) = xxmarkup((yyvsp[(1) - (2)]), (yyvsp[(2) - (2)]), STATIC, &(yyloc)); }
     break;
 
   case 38:
 
-/* Line 1464 of yacc.c  */
-#line 252 "gramRd.y"
-    { (yyval) = xxmarkup((yyvsp[(1) - (2)]), (yyvsp[(2) - (2)]), STATIC, &(yyloc)); ;}
+    { (yyval) = xxmarkup((yyvsp[(1) - (2)]), (yyvsp[(2) - (2)]), STATIC, &(yyloc)); }
     break;
 
   case 39:
 
-/* Line 1464 of yacc.c  */
-#line 253 "gramRd.y"
-    { (yyval) = xxmarkup((yyvsp[(1) - (3)]), (yyvsp[(3) - (3)]), STATIC, &(yyloc)); xxpopMode((yyvsp[(2) - (3)])); ;}
+    { (yyval) = xxmarkup((yyvsp[(1) - (3)]), (yyvsp[(3) - (3)]), STATIC, &(yyloc)); xxpopMode((yyvsp[(2) - (3)])); }
     break;
 
   case 40:
 
-/* Line 1464 of yacc.c  */
-#line 254 "gramRd.y"
-    { (yyval) = xxOptionmarkup((yyvsp[(1) - (4)]), (yyvsp[(3) - (4)]), (yyvsp[(4) - (4)]), STATIC, &(yyloc)); xxpopMode((yyvsp[(2) - (4)])); ;}
+    { (yyval) = xxOptionmarkup((yyvsp[(1) - (4)]), (yyvsp[(3) - (4)]), (yyvsp[(4) - (4)]), STATIC, &(yyloc)); xxpopMode((yyvsp[(2) - (4)])); }
     break;
 
   case 41:
 
-/* Line 1464 of yacc.c  */
-#line 255 "gramRd.y"
-    { (yyval) = xxmarkup((yyvsp[(1) - (2)]), (yyvsp[(2) - (2)]), STATIC, &(yyloc)); ;}
+    { (yyval) = xxmarkup((yyvsp[(1) - (2)]), (yyvsp[(2) - (2)]), STATIC, &(yyloc)); }
     break;
 
   case 42:
 
-/* Line 1464 of yacc.c  */
-#line 256 "gramRd.y"
-    { (yyval) = xxmarkup((yyvsp[(1) - (3)]), (yyvsp[(3) - (3)]), HAS_SEXPR, &(yyloc)); xxpopMode((yyvsp[(2) - (3)])); ;}
+    { (yyval) = xxmarkup((yyvsp[(1) - (3)]), (yyvsp[(3) - (3)]), HAS_SEXPR, &(yyloc)); xxpopMode((yyvsp[(2) - (3)])); }
     break;
 
   case 43:
 
-/* Line 1464 of yacc.c  */
-#line 257 "gramRd.y"
-    { (yyval) = xxOptionmarkup((yyvsp[(1) - (4)]), (yyvsp[(3) - (4)]), (yyvsp[(4) - (4)]), HAS_SEXPR, &(yyloc)); xxpopMode((yyvsp[(2) - (4)])); ;}
+    { (yyval) = xxOptionmarkup((yyvsp[(1) - (4)]), (yyvsp[(3) - (4)]), (yyvsp[(4) - (4)]), HAS_SEXPR, &(yyloc)); xxpopMode((yyvsp[(2) - (4)])); }
     break;
 
   case 44:
 
-/* Line 1464 of yacc.c  */
-#line 258 "gramRd.y"
-    { (yyval) = xxmarkup((yyvsp[(1) - (2)]), (yyvsp[(2) - (2)]), STATIC, &(yyloc)); ;}
+    { (yyval) = xxmarkup((yyvsp[(1) - (2)]), (yyvsp[(2) - (2)]), STATIC, &(yyloc)); }
     break;
 
   case 45:
 
-/* Line 1464 of yacc.c  */
-#line 259 "gramRd.y"
-    { (yyval) = xxmarkup2((yyvsp[(1) - (2)]), (yyvsp[(2) - (2)]), R_NilValue, 1, STATIC, &(yyloc)); ;}
+    { (yyval) = xxmarkup2((yyvsp[(1) - (2)]), (yyvsp[(2) - (2)]), R_NilValue, 1, STATIC, &(yyloc)); }
     break;
 
   case 46:
 
-/* Line 1464 of yacc.c  */
-#line 260 "gramRd.y"
-    { (yyval) = xxmarkup2((yyvsp[(1) - (3)]), (yyvsp[(2) - (3)]), (yyvsp[(3) - (3)]), 2, STATIC, &(yyloc)); ;}
+    { (yyval) = xxmarkup2((yyvsp[(1) - (3)]), (yyvsp[(2) - (3)]), (yyvsp[(3) - (3)]), 2, STATIC, &(yyloc)); }
     break;
 
   case 47:
 
-/* Line 1464 of yacc.c  */
-#line 261 "gramRd.y"
-    { (yyval) = xxmarkup((yyvsp[(1) - (1)]), R_NilValue, STATIC, &(yyloc)); ;}
+    { (yyval) = xxmarkup((yyvsp[(1) - (1)]), R_NilValue, STATIC, &(yyloc)); }
     break;
 
   case 48:
 
-/* Line 1464 of yacc.c  */
-#line 262 "gramRd.y"
-    { (yyval) = xxmarkup2((yyvsp[(1) - (4)]), (yyvsp[(2) - (4)]), (yyvsp[(3) - (4)]), 2, HAS_IFDEF, &(yyloc)); UNPROTECT_PTR((yyvsp[(4) - (4)])); ;}
+    { (yyval) = xxmarkup2((yyvsp[(1) - (4)]), (yyvsp[(2) - (4)]), (yyvsp[(3) - (4)]), 2, HAS_IFDEF, &(yyloc)); UNPROTECT_PTR((yyvsp[(4) - (4)])); }
     break;
 
   case 49:
 
-/* Line 1464 of yacc.c  */
-#line 263 "gramRd.y"
-    { (yyval) = xxmarkup2((yyvsp[(1) - (4)]), (yyvsp[(2) - (4)]), (yyvsp[(3) - (4)]), 2, HAS_IFDEF, &(yyloc)); ;}
+    { (yyval) = xxmarkup2((yyvsp[(1) - (4)]), (yyvsp[(2) - (4)]), (yyvsp[(3) - (4)]), 2, HAS_IFDEF, &(yyloc)); }
     break;
 
   case 50:
 
-/* Line 1464 of yacc.c  */
-#line 264 "gramRd.y"
-    { (yyval) = xxmarkup2((yyvsp[(1) - (3)]), (yyvsp[(2) - (3)]), (yyvsp[(3) - (3)]), 2, STATIC, &(yyloc)); ;}
+    { (yyval) = xxmarkup2((yyvsp[(1) - (3)]), (yyvsp[(2) - (3)]), (yyvsp[(3) - (3)]), 2, STATIC, &(yyloc)); }
     break;
 
   case 51:
 
-/* Line 1464 of yacc.c  */
-#line 266 "gramRd.y"
-    { (yyval) = xxnewcommand((yyvsp[(1) - (3)]), (yyvsp[(2) - (3)]), (yyvsp[(3) - (3)]), &(yyloc)); ;}
+    { (yyval) = xxnewcommand((yyvsp[(1) - (3)]), (yyvsp[(2) - (3)]), (yyvsp[(3) - (3)]), &(yyloc)); }
     break;
 
   case 52:
 
-/* Line 1464 of yacc.c  */
-#line 267 "gramRd.y"
-    { (yyval) = xxusermacro((yyvsp[(1) - (1)]), xxnewlist(NULL), &(yyloc)); ;}
+    { (yyval) = xxusermacro((yyvsp[(1) - (1)]), xxnewlist(NULL), &(yyloc)); }
     break;
 
   case 53:
 
-/* Line 1464 of yacc.c  */
-#line 268 "gramRd.y"
-    { (yyval) = xxusermacro((yyvsp[(1) - (2)]), xxnewlist((yyvsp[(2) - (2)])), &(yyloc)); ;}
+    { (yyval) = xxusermacro((yyvsp[(1) - (2)]), xxnewlist((yyvsp[(2) - (2)])), &(yyloc)); }
     break;
 
   case 54:
 
-/* Line 1464 of yacc.c  */
-#line 270 "gramRd.y"
-    { (yyval) = xxusermacro((yyvsp[(1) - (3)]), xxnewlist2((yyvsp[(2) - (3)]), (yyvsp[(3) - (3)])), &(yyloc)); ;}
+    { (yyval) = xxusermacro((yyvsp[(1) - (3)]), xxnewlist2((yyvsp[(2) - (3)]), (yyvsp[(3) - (3)])), &(yyloc)); }
     break;
 
   case 55:
 
-/* Line 1464 of yacc.c  */
-#line 272 "gramRd.y"
-    { (yyval) = xxusermacro((yyvsp[(1) - (4)]), xxnewlist3((yyvsp[(2) - (4)]), (yyvsp[(3) - (4)]), (yyvsp[(4) - (4)])), &(yyloc)); ;}
+    { (yyval) = xxusermacro((yyvsp[(1) - (4)]), xxnewlist3((yyvsp[(2) - (4)]), (yyvsp[(3) - (4)]), (yyvsp[(4) - (4)])), &(yyloc)); }
     break;
 
   case 56:
 
-/* Line 1464 of yacc.c  */
-#line 274 "gramRd.y"
-    { (yyval) = xxusermacro((yyvsp[(1) - (5)]), xxnewlist4((yyvsp[(2) - (5)]), (yyvsp[(3) - (5)]), (yyvsp[(4) - (5)]), (yyvsp[(5) - (5)])), &(yyloc)); ;}
+    { (yyval) = xxusermacro((yyvsp[(1) - (5)]), xxnewlist4((yyvsp[(2) - (5)]), (yyvsp[(3) - (5)]), (yyvsp[(4) - (5)]), (yyvsp[(5) - (5)])), &(yyloc)); }
     break;
 
   case 57:
 
-/* Line 1464 of yacc.c  */
-#line 276 "gramRd.y"
-    { (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[(1) - (6)]), xxnewlist5((yyvsp[(2) - (6)]), (yyvsp[(3) - (6)]), (yyvsp[(4) - (6)]), (yyvsp[(5) - (6)]), (yyvsp[(6) - (6)])), &(yyloc)); }
     break;
 
   case 58:
 
-/* Line 1464 of yacc.c  */
-#line 278 "gramRd.y"
-    { (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[(1) - (7)]), xxnewlist6((yyvsp[(2) - (7)]), (yyvsp[(3) - (7)]), (yyvsp[(4) - (7)]), (yyvsp[(5) - (7)]), (yyvsp[(6) - (7)]), (yyvsp[(7) - (7)])), &(yyloc)); }
     break;
 
   case 59:
 
-/* Line 1464 of yacc.c  */
-#line 281 "gramRd.y"
-    { (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[(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)); }
     break;
 
   case 60:
 
-/* Line 1464 of yacc.c  */
-#line 284 "gramRd.y"
-    { (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[(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)); }
     break;
 
   case 61:
 
-/* Line 1464 of yacc.c  */
-#line 287 "gramRd.y"
-    { (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[(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)); }
     break;
 
   case 62:
 
-/* Line 1464 of yacc.c  */
-#line 290 "gramRd.y"
-    { xxpopMode((yyvsp[(1) - (2)])); (yyval) = (yyvsp[(2) - (2)]); ;}
+    { xxpopMode((yyvsp[(1) - (2)])); (yyval) = (yyvsp[(2) - (2)]); }
     break;
 
   case 63:
 
-/* Line 1464 of yacc.c  */
-#line 292 "gramRd.y"
-    { xxpopMode((yyvsp[(1) - (2)])); (yyval) = (yyvsp[(2) - (2)]); ;}
+    { xxpopMode((yyvsp[(1) - (2)])); (yyval) = (yyvsp[(2) - (2)]); }
     break;
 
   case 64:
 
-/* Line 1464 of yacc.c  */
-#line 293 "gramRd.y"
     { xxpopMode((yyvsp[(1) - (2)])); (yyval) = xxnewlist((yyvsp[(2) - (2)])); 
      						  if(wCalls)
     	    					      warning(_("bad markup (extra space?) at %s:%d:%d"), 
@@ -2811,190 +2593,149 @@ yyreduce:
      						  else
     	    					      warningcall(R_NilValue, _("bad markup (extra space?) at %s:%d:%d"), 
     	    					            parseState.xxBasename, (yylsp[(2) - (2)]).first_line, (yylsp[(2) - (2)]).first_column); 
-						;}
+						}
     break;
 
   case 65:
 
-/* Line 1464 of yacc.c  */
-#line 302 "gramRd.y"
-    { xxpopMode((yyvsp[(1) - (2)])); (yyval) = (yyvsp[(2) - (2)]); ;}
+    { xxpopMode((yyvsp[(1) - (2)])); (yyval) = (yyvsp[(2) - (2)]); }
     break;
 
   case 66:
 
-/* Line 1464 of yacc.c  */
-#line 304 "gramRd.y"
-    { xxpopMode((yyvsp[(1) - (2)])); (yyval) = (yyvsp[(2) - (2)]); ;}
+    { xxpopMode((yyvsp[(1) - (2)])); (yyval) = (yyvsp[(2) - (2)]); }
     break;
 
   case 67:
 
-/* Line 1464 of yacc.c  */
-#line 306 "gramRd.y"
-    { xxpopMode((yyvsp[(1) - (2)])); (yyval) = (yyvsp[(2) - (2)]); ;}
+    { xxpopMode((yyvsp[(1) - (2)])); (yyval) = (yyvsp[(2) - (2)]); }
     break;
 
   case 68:
 
-/* Line 1464 of yacc.c  */
-#line 310 "gramRd.y"
-    { xxpopMode((yyvsp[(2) - (4)])); (yyval) = (yyvsp[(3) - (4)]); ;}
+    { xxpopMode((yyvsp[(2) - (4)])); (yyval) = (yyvsp[(3) - (4)]); }
     break;
 
   case 69:
 
-/* Line 1464 of yacc.c  */
-#line 311 "gramRd.y"
-    { xxpopMode((yyvsp[(2) - (3)])); (yyval) = xxnewlist(NULL); ;}
+    { xxpopMode((yyvsp[(2) - (3)])); (yyval) = xxnewlist(NULL); }
     break;
 
   case 70:
 
-/* Line 1464 of yacc.c  */
-#line 313 "gramRd.y"
-    { xxpopMode((yyvsp[(1) - (2)])); (yyval) = (yyvsp[(2) - (2)]); ;}
+    { xxpopMode((yyvsp[(1) - (2)])); (yyval) = (yyvsp[(2) - (2)]); }
     break;
 
   case 71:
 
-/* Line 1464 of yacc.c  */
-#line 315 "gramRd.y"
-    { xxpopMode((yyvsp[(1) - (2)])); (yyval) = (yyvsp[(2) - (2)]); ;}
+    { xxpopMode((yyvsp[(1) - (2)])); (yyval) = (yyvsp[(2) - (2)]); }
     break;
 
   case 72:
 
-/* Line 1464 of yacc.c  */
-#line 319 "gramRd.y"
-    { xxpopMode((yyvsp[(2) - (4)])); (yyval) = (yyvsp[(3) - (4)]); ;}
+    { xxpopMode((yyvsp[(2) - (4)])); (yyval) = (yyvsp[(3) - (4)]); }
     break;
 
   case 73:
 
-/* Line 1464 of yacc.c  */
-#line 320 "gramRd.y"
-    { xxpopMode((yyvsp[(2) - (3)])); (yyval) = xxnewlist(NULL); ;}
+    { xxpopMode((yyvsp[(2) - (3)])); (yyval) = xxnewlist(NULL); }
     break;
 
   case 74:
 
-/* Line 1464 of yacc.c  */
-#line 322 "gramRd.y"
-    { xxpopMode((yyvsp[(1) - (2)])); (yyval) = xxnewlist(xxtag((yyvsp[(2) - (2)]), TEXT, &(yyloc))); ;}
+    { xxpopMode((yyvsp[(1) - (2)])); (yyval) = xxnewlist(xxtag((yyvsp[(2) - (2)]), TEXT, &(yyloc))); }
     break;
 
   case 75:
 
-/* Line 1464 of yacc.c  */
-#line 325 "gramRd.y"
-    { (yyval) = xxpushMode(LATEXLIKE, UNKNOWN, FALSE); ;}
+    { (yyval) = xxpushMode(LATEXLIKE, UNKNOWN, FALSE); }
     break;
 
   case 76:
 
-/* Line 1464 of yacc.c  */
-#line 327 "gramRd.y"
-    { (yyval) = xxpushMode(RLIKE, UNKNOWN, FALSE); ;}
+    { (yyval) = xxpushMode(RLIKE, UNKNOWN, FALSE); }
     break;
 
   case 77:
 
-/* Line 1464 of yacc.c  */
-#line 329 "gramRd.y"
-    { parseState.xxbraceDepth--; (yyval) = xxpushMode(RLIKE, UNKNOWN, FALSE); parseState.xxbraceDepth++; ;}
+    { parseState.xxbraceDepth--; (yyval) = xxpushMode(RLIKE, UNKNOWN, FALSE); parseState.xxbraceDepth++; }
     break;
 
   case 78:
 
-/* Line 1464 of yacc.c  */
-#line 331 "gramRd.y"
-    { (yyval) = xxpushMode(INOPTION, UNKNOWN, FALSE); ;}
+    { (yyval) = xxpushMode(INOPTION, UNKNOWN, FALSE); }
     break;
 
   case 79:
 
-/* Line 1464 of yacc.c  */
-#line 333 "gramRd.y"
-    { (yyval) = xxpushMode(VERBATIM, UNKNOWN, FALSE); ;}
+    { (yyval) = xxpushMode(VERBATIM, UNKNOWN, FALSE); }
     break;
 
   case 80:
 
-/* Line 1464 of yacc.c  */
-#line 335 "gramRd.y"
-    { (yyval) = xxpushMode(VERBATIM, UNKNOWN, TRUE); ;}
+    { (yyval) = xxpushMode(VERBATIM, UNKNOWN, TRUE); }
     break;
 
   case 81:
 
-/* Line 1464 of yacc.c  */
-#line 337 "gramRd.y"
-    { parseState.xxbraceDepth--; (yyval) = xxpushMode(VERBATIM, UNKNOWN, FALSE); parseState.xxbraceDepth++; ;}
+    { parseState.xxbraceDepth--; (yyval) = xxpushMode(VERBATIM, UNKNOWN, FALSE); parseState.xxbraceDepth++; }
     break;
 
   case 82:
 
-/* Line 1464 of yacc.c  */
-#line 339 "gramRd.y"
-    { (yyval) = xxpushMode(LATEXLIKE, ESCAPE, FALSE); ;}
+    { (yyval) = xxpushMode(LATEXLIKE, ESCAPE, FALSE); }
     break;
 
   case 83:
 
-/* Line 1464 of yacc.c  */
-#line 341 "gramRd.y"
-    { (yyval) = xxpushMode(LATEXLIKE, LATEXMACRO2, FALSE); ;}
+    { (yyval) = xxpushMode(LATEXLIKE, LATEXMACRO2, FALSE); }
     break;
 
   case 84:
 
-/* Line 1464 of yacc.c  */
-#line 343 "gramRd.y"
-    { (yyval) = (yyvsp[(2) - (3)]); ;}
+    { (yyval) = (yyvsp[(2) - (3)]); }
     break;
 
   case 85:
 
-/* Line 1464 of yacc.c  */
-#line 344 "gramRd.y"
-    { (yyval) = xxnewlist(NULL); ;}
+    { (yyval) = xxnewlist(NULL); }
     break;
 
   case 86:
 
-/* Line 1464 of yacc.c  */
-#line 345 "gramRd.y"
-    { (yyval) = (yyvsp[(2) - (4)]); ;}
+    { (yyval) = (yyvsp[(2) - (4)]); }
     break;
 
   case 87:
 
-/* Line 1464 of yacc.c  */
-#line 346 "gramRd.y"
-    { (yyval) = xxnewlist(NULL); ;}
+    { (yyval) = xxnewlist(NULL); }
     break;
 
   case 88:
 
-/* Line 1464 of yacc.c  */
-#line 347 "gramRd.y"
-    { (yyval) = (yyvsp[(2) - (4)]); ;}
+    { (yyval) = (yyvsp[(2) - (4)]); }
     break;
 
   case 89:
 
-/* Line 1464 of yacc.c  */
-#line 349 "gramRd.y"
-    { (yyval) = (yyvsp[(2) - (3)]); ;}
+    { (yyval) = (yyvsp[(2) - (3)]); }
     break;
 
 
 
-/* Line 1464 of yacc.c  */
-#line 2989 "gramRd.c"
       default: break;
     }
+  /* User semantic actions sometimes alter yychar, and that requires
+     that yytoken be updated with the new translation.  We take the
+     approach of translating immediately before every use of yytoken.
+     One alternative is translating here after every semantic action,
+     but that translation would be missed if the semantic action invokes
+     YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or
+     if it invokes YYBACKUP.  In the case of YYABORT or YYACCEPT, an
+     incorrect destructor might then be invoked immediately.  In the
+     case of YYERROR or YYBACKUP, subsequent parser actions might lead
+     to an incorrect destructor call or verbose syntax error message
+     before the lookahead is translated.  */
   YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
 
   YYPOPSTACK (yylen);
@@ -3023,6 +2764,10 @@ yyreduce:
 | yyerrlab -- here on detecting error |
 `------------------------------------*/
 yyerrlab:
+  /* Make sure we have latest lookahead translation.  See comments at
+     user semantic actions for why this is necessary.  */
+  yytoken = yychar == YYEMPTY ? YYEMPTY : YYTRANSLATE (yychar);
+
   /* If not already recovering from an error, report this error.  */
   if (!yyerrstatus)
     {
@@ -3030,41 +2775,40 @@ yyerrlab:
 #if ! YYERROR_VERBOSE
       yyerror (YY_("syntax error"));
 #else
+# define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \
+                                        yyssp, yytoken)
       {
-	YYSIZE_T yysize = yysyntax_error (0, yystate, yychar);
-	if (yymsg_alloc < yysize && yymsg_alloc < YYSTACK_ALLOC_MAXIMUM)
-	  {
-	    YYSIZE_T yyalloc = 2 * yysize;
-	    if (! (yysize <= yyalloc && yyalloc <= YYSTACK_ALLOC_MAXIMUM))
-	      yyalloc = YYSTACK_ALLOC_MAXIMUM;
-	    if (yymsg != yymsgbuf)
-	      YYSTACK_FREE (yymsg);
-	    yymsg = (char *) YYSTACK_ALLOC (yyalloc);
-	    if (yymsg)
-	      yymsg_alloc = yyalloc;
-	    else
-	      {
-		yymsg = yymsgbuf;
-		yymsg_alloc = sizeof yymsgbuf;
-	      }
-	  }
-
-	if (0 < yysize && yysize <= yymsg_alloc)
-	  {
-	    (void) yysyntax_error (yymsg, yystate, yychar);
-	    yyerror (yymsg);
-	  }
-	else
-	  {
-	    yyerror (YY_("syntax error"));
-	    if (yysize != 0)
-	      goto yyexhaustedlab;
-	  }
+        char const *yymsgp = YY_("syntax error");
+        int yysyntax_error_status;
+        yysyntax_error_status = YYSYNTAX_ERROR;
+        if (yysyntax_error_status == 0)
+          yymsgp = yymsg;
+        else if (yysyntax_error_status == 1)
+          {
+            if (yymsg != yymsgbuf)
+              YYSTACK_FREE (yymsg);
+            yymsg = (char *) YYSTACK_ALLOC (yymsg_alloc);
+            if (!yymsg)
+              {
+                yymsg = yymsgbuf;
+                yymsg_alloc = sizeof yymsgbuf;
+                yysyntax_error_status = 2;
+              }
+            else
+              {
+                yysyntax_error_status = YYSYNTAX_ERROR;
+                yymsgp = yymsg;
+              }
+          }
+        yyerror (yymsgp);
+        if (yysyntax_error_status == 2)
+          goto yyexhaustedlab;
       }
+# undef YYSYNTAX_ERROR
 #endif
     }
 
-  yyerror_range[0] = yylloc;
+  yyerror_range[1] = yylloc;
 
   if (yyerrstatus == 3)
     {
@@ -3101,7 +2845,7 @@ yyerrorlab:
   if (/*CONSTCOND*/ 0)
      goto yyerrorlab;
 
-  yyerror_range[0] = yylsp[1-yylen];
+  yyerror_range[1] = yylsp[1-yylen];
   /* Do not reclaim the symbols of the rule which action triggered
      this YYERROR.  */
   YYPOPSTACK (yylen);
@@ -3120,7 +2864,7 @@ yyerrlab1:
   for (;;)
     {
       yyn = yypact[yystate];
-      if (yyn != YYPACT_NINF)
+      if (!yypact_value_is_default (yyn))
 	{
 	  yyn += YYTERROR;
 	  if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
@@ -3135,7 +2879,7 @@ yyerrlab1:
       if (yyssp == yyss)
 	YYABORT;
 
-      yyerror_range[0] = *yylsp;
+      yyerror_range[1] = *yylsp;
       yydestruct ("Error: popping",
 		  yystos[yystate], yyvsp, yylsp);
       YYPOPSTACK (1);
@@ -3143,12 +2887,14 @@ yyerrlab1:
       YY_STACK_PRINT (yyss, yyssp);
     }
 
+  YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
   *++yyvsp = yylval;
+  YY_IGNORE_MAYBE_UNINITIALIZED_END
 
-  yyerror_range[1] = yylloc;
+  yyerror_range[2] = yylloc;
   /* Using YYLLOC is tempting, but would change the location of
      the lookahead.  YYLOC is available though.  */
-  YYLLOC_DEFAULT (yyloc, (yyerror_range - 1), 2);
+  YYLLOC_DEFAULT (yyloc, yyerror_range, 2);
   *++yylsp = yyloc;
 
   /* Shift the error token.  */
@@ -3172,7 +2918,7 @@ yyabortlab:
   yyresult = 1;
   goto yyreturn;
 
-#if !defined(yyoverflow) || YYERROR_VERBOSE
+#if !defined yyoverflow || YYERROR_VERBOSE
 /*-------------------------------------------------.
 | yyexhaustedlab -- memory exhaustion comes here.  |
 `-------------------------------------------------*/
@@ -3184,8 +2930,13 @@ yyexhaustedlab:
 
 yyreturn:
   if (yychar != YYEMPTY)
-     yydestruct ("Cleanup: discarding lookahead",
-		 yytoken, &yylval, &yylloc);
+    {
+      /* Make sure we have latest lookahead translation.  See comments at
+         user semantic actions for why this is necessary.  */
+      yytoken = YYTRANSLATE (yychar);
+      yydestruct ("Cleanup: discarding lookahead",
+                  yytoken, &yylval, &yylloc);
+    }
   /* Do not reclaim the symbols of the rule which action triggered
      this YYABORT or YYACCEPT.  */
   YYPOPSTACK (yylen);
@@ -3210,8 +2961,6 @@ yyreturn:
 
 
 
-/* Line 1684 of yacc.c  */
-#line 351 "gramRd.y"
 
 
 static SEXP xxpushMode(int newmode, int newitem, int neweqn)
@@ -3266,8 +3015,10 @@ static int getDynamicFlag(SEXP item)
 
 static void setDynamicFlag(SEXP item, int flag)
 {
-    if (flag)
-    	setAttrib(item, install("dynamicFlag"), ScalarInteger(flag));
+    if (flag) {
+    	SEXP s_dynamicFlag = install("dynamicFlag");
+    	setAttrib(item, s_dynamicFlag, ScalarInteger(flag));
+    }
 }
 
 static SEXP xxnewlist(SEXP item)
@@ -3393,11 +3144,13 @@ static SEXP xxnewcommand(SEXP cmd, SEXP name, SEXP defn, YYLTYPE *lloc)
     	PROTECT(thedefn = mkString(CHAR(STRING_ELT(thedefn,0))));
     else
     	PROTECT(thedefn = mkString(""));
-    prev = findVar(install(CHAR(STRING_ELT(thename, 0))), parseState.xxMacroList);
-    if (prev != R_UnboundValue && !strcmp(CHAR(STRING_ELT(cmd,0)), "\renewcommand")) {
-        snprintf(buffer, sizeof(buffer), _("Macro '%s' previously defined."), 
+    if (warnDups) {
+	prev = findVar(installTrChar(STRING_ELT(thename, 0)), parseState.xxMacroList);
+    	if (prev != R_UnboundValue && strcmp(CHAR(STRING_ELT(cmd,0)), "\\renewcommand")) {
+	    snprintf(buffer, sizeof(buffer), _("Macro '%s' previously defined."), 
                  CHAR(STRING_ELT(thename, 0)));
-        yyerror(buffer);
+            yyerror(buffer);
+        }
     }
     for (c = CHAR(STRING_ELT(thedefn, 0)); *c; c++) {
     	if (*c == '#' && isdigit(*(c+1))) 
@@ -3411,7 +3164,7 @@ static SEXP xxnewcommand(SEXP cmd, SEXP name, SEXP defn, YYLTYPE *lloc)
     setAttrib(ans, install("Rd_tag"), cmd);
     setAttrib(ans, install("definition"), thedefn);
     setAttrib(ans, R_SrcrefSymbol, makeSrcref(lloc, SrcFile));
-    defineVar(install(CHAR(STRING_ELT(thename, 0))), ans, parseState.xxMacroList);
+    defineVar(installTrChar(STRING_ELT(thename, 0)), ans, parseState.xxMacroList);
 
     UNPROTECT_PTR(thedefn);
     UNPROTECT_PTR(cmd);
@@ -3446,7 +3199,7 @@ static SEXP xxusermacro(SEXP macro, SEXP args, YYLTYPE *lloc)
 	SET_STRING_ELT(ans, i+1, STRING_ELT(CADR(CADR(nextarg)), 0));
     }	
     UNPROTECT_PTR(args);
-    UNPROTECT_PTR(macro);    
+
     /* Now push the expanded macro onto the input stream, in reverse order */
     xxungetc(END_MACRO);
     start = CHAR(STRING_ELT(ans, 0));
@@ -3462,8 +3215,11 @@ static SEXP xxusermacro(SEXP macro, SEXP args, YYLTYPE *lloc)
     }
     xxungetc(START_MACRO);
     
-    setAttrib(ans, install("Rd_tag"), mkString("USERMACRO"));
+    SEXP s_Rd_tag = install("Rd_tag");
+    setAttrib(ans, s_Rd_tag, mkString("USERMACRO"));
     setAttrib(ans, R_SrcrefSymbol, makeSrcref(lloc, SrcFile));
+    setAttrib(ans, install("macro"), macro);
+    UNPROTECT_PTR(macro);
 #if DEBUGVALS
     Rprintf(" result: %p\n", ans);
 #endif
@@ -3581,7 +3337,8 @@ static void xxsavevalue(SEXP Rd, YYLTYPE *lloc)
 
 static SEXP xxtag(SEXP item, int type, YYLTYPE *lloc)
 {
-    setAttrib(item, install("Rd_tag"), mkString(yytname[YYTRANSLATE(type)]));
+    SEXP s_Rd_tag = install("Rd_tag");
+    setAttrib(item, s_Rd_tag, mkString(yytname[YYTRANSLATE(type)]));
     setAttrib(item, R_SrcrefSymbol, makeSrcref(lloc, SrcFile));
     return item;
 }
@@ -3695,7 +3452,7 @@ static int xxungetc(int c)
     	R_ParseContextLine = parseState.xxlineno;
     
     	R_ParseContext[R_ParseContextLast] = '\0';
-    	/* Mac OS X requires us to keep this non-negative */
+    	/* macOS requires us to keep this non-negative */
     	R_ParseContextLast = (R_ParseContextLast + PARSE_CONTEXT_SIZE - 1) 
 		% PARSE_CONTEXT_SIZE;
     }
@@ -3765,8 +3522,10 @@ static SEXP GrowList(SEXP l, SEXP s)
 
 /*--------------------------------------------------------------------------*/
  
-static SEXP ParseRd(ParseStatus *status, SEXP srcfile, Rboolean fragment)
+static SEXP ParseRd(ParseStatus *status, SEXP srcfile, Rboolean fragment, SEXP macros)
 {
+    Rboolean keepmacros = !isLogical(macros) || asLogical(macros);
+    
     R_ParseContextLast = 0;
     R_ParseContext[0] = '\0';
     
@@ -3790,12 +3549,20 @@ static SEXP ParseRd(ParseStatus *status, SEXP srcfile, Rboolean fragment)
     if (fragment) parseState.xxinitvalue = STARTFRAGMENT;
     else	  parseState.xxinitvalue = STARTFILE;
     
-    parseState.xxMacroList = InstallKeywords();
+    if (!isEnvironment(macros))
+	macros = InstallKeywords();
+	
+    PROTECT(macros);
+    PROTECT(parseState.xxMacroList = R_NewHashedEnv(macros, ScalarInteger(0)));
+    UNPROTECT_PTR(macros);
     
     parseState.Value = R_NilValue;
     
     if (yyparse()) *status = PARSE_ERROR;
     else *status = PARSE_OK;
+    
+    if (keepmacros && !isNull(parseState.Value))
+	setAttrib(parseState.Value, install("macros"), parseState.xxMacroList);
 
 #if DEBUGVALS
     Rprintf("ParseRd result: %p\n", parseState.Value);    
@@ -3823,11 +3590,11 @@ static int con_getc(void)
 }
 
 static
-SEXP R_ParseRd(Rconnection con, ParseStatus *status, SEXP srcfile, Rboolean fragment)
+SEXP R_ParseRd(Rconnection con, ParseStatus *status, SEXP srcfile, Rboolean fragment, SEXP macros)
 {
     con_parse = con;
     ptr_getc = con_getc;
-    return ParseRd(status, srcfile, fragment);
+    return ParseRd(status, srcfile, fragment, macros);
 }
 
 /*----------------------------------------------------------------------------
@@ -4013,6 +3780,7 @@ static SEXP InstallKeywords()
     	defineVar(name, val, result);
     	UNPROTECT(2);
     }
+    UNPROTECT(1);
     return result;
 }
     	
@@ -4027,7 +3795,10 @@ static SEXP UserMacroLookup(const char *s)
 {
     SEXP rec = findVar(install(s), parseState.xxMacroList);
     if (rec == R_UnboundValue) error(_("Unable to find macro %s"), s);
-    return getAttrib(rec, install("definition"));
+    PROTECT(rec);
+    SEXP res = getAttrib(rec, install("definition"));
+    UNPROTECT(1);
+    return res;
 }
 
 static void yyerror(const char *s)
@@ -4129,12 +3900,12 @@ static void yyerror(const char *s)
 	}
     } else if (!strncmp(s, yyunknown, sizeof yyunknown-1)) {
     	snprintf(ParseErrorMsg, PARSE_ERROR_SIZE,
-		 "%s '%s'", s, CHAR(STRING_ELT(yylval, 0)));
+		"%s '%s'", s, CHAR(STRING_ELT(yylval, 0)));
     } else {
     	snprintf(ParseErrorMsg, PARSE_ERROR_SIZE, "%s", s);
     }
     filename = findVar(install("filename"), SrcFile);
-    if (isString(filename) && length(filename))
+    if (isString(filename) && LENGTH(filename))
     	strncpy(ParseErrorFilename, CHAR(STRING_ELT(filename, 0)), PARSE_ERROR_SIZE - 1);
     else
         ParseErrorFilename[0] = '\0';
@@ -4617,11 +4388,11 @@ static void PopState() {
 
 /* "do_parseRd" 
 
- .External2(C_parseRd,file, srcfile, encoding, verbose, basename, warningCalls)
+ .External2(C_parseRd,file, srcfile, encoding, verbose, basename, warningCalls, macros, warndups)
  If there is text then that is read and the other arguments are ignored.
 */
 
-SEXP C_parseRd(SEXP call, SEXP op, SEXP args, SEXP env)
+SEXP parseRd(SEXP call, SEXP op, SEXP args, SEXP env)
 {
     args = CDR(args);
 
@@ -4631,6 +4402,7 @@ SEXP C_parseRd(SEXP call, SEXP op, SEXP args, SEXP env)
     int ifile, wcall;
     ParseStatus status;
     RCNTXT cntxt;
+    SEXP macros;
 
 #if DEBUGMODE
     yydebug = 1;
@@ -4653,10 +4425,12 @@ SEXP C_parseRd(SEXP call, SEXP op, SEXP args, SEXP env)
     parseState.xxDebugTokens = asInteger(CAR(args));		args = CDR(args);
     parseState.xxBasename = CHAR(STRING_ELT(CAR(args), 0));	args = CDR(args);
     fragment = asLogical(CAR(args));				args = CDR(args);
-    wcall = asLogical(CAR(args));
+    wcall = asLogical(CAR(args));				args = CDR(args);
     if (wcall == NA_LOGICAL)
     	error(_("invalid '%s' value"), "warningCalls");
     wCalls = wcall;
+    macros = CAR(args);						args = CDR(args);
+    warnDups = asLogical(CAR(args));
 
     if (ifile >= 3) {/* file != "" */
 	if(!wasopen) {
@@ -4668,7 +4442,7 @@ SEXP C_parseRd(SEXP call, SEXP op, SEXP args, SEXP env)
 	    cntxt.cenddata = con;
 	}
 	if(!con->canread) error(_("cannot read from this connection"));
-	s = R_ParseRd(con, &status, source, fragment);
+	s = R_ParseRd(con, &status, source, fragment, macros);
 	if(!wasopen) endcontext(&cntxt);
 	PopState();
 	if (status != PARSE_OK) parseError(call, R_ParseError);
@@ -4685,7 +4459,7 @@ SEXP C_parseRd(SEXP call, SEXP op, SEXP args, SEXP env)
  .External2(C_deparseRd, element, state)
 */
 
-SEXP C_deparseRd(SEXP e, SEXP state)
+SEXP deparseRd(SEXP e, SEXP state)
 {
     SEXP result;
     int  outlen, *statevals, quoteBraces, inRComment;
@@ -4693,11 +4467,11 @@ SEXP C_deparseRd(SEXP e, SEXP state)
     char *outbuf, *out, lookahead;
     Rboolean escape;
 
-    if(!isString(e) || length(e) != 1) 
+    if(!isString(e) || LENGTH(e) != 1) 
     	error(_("'deparseRd' only supports deparsing character elements"));
     e = STRING_ELT(e, 0);
     
-    if(!isInteger(state) || length(state) != 5) error(_("bad state"));
+    if(!isInteger(state) || LENGTH(state) != 5) error(_("bad state"));
     
     PushState();
     
@@ -4783,4 +4557,3 @@ SEXP C_deparseRd(SEXP e, SEXP state)
     return result;
 }
 
-
diff --git a/src/library/tools/src/gramRd.y b/src/library/tools/src/gramRd.y
index a8320eb..f7df1a1 100644
--- a/src/library/tools/src/gramRd.y
+++ b/src/library/tools/src/gramRd.y
@@ -2,7 +2,7 @@
 /*
  *  R : A Computer Langage for Statistical Data Analysis
  *  Copyright (C) 1995, 1996, 1997  Robert Gentleman and Ross Ihaka
- *  Copyright (C) 1997--2013  The R Core Team
+ *  Copyright (C) 1997--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
@@ -16,7 +16,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  */
 
 #ifdef HAVE_CONFIG_H
@@ -47,6 +47,7 @@
 #define DEBUGMODE 0		/* 1 causes Bison output of parse state, to stdout or stderr */
 
 static Rboolean wCalls = TRUE;
+static Rboolean warnDups = FALSE;
 
 #define YYERROR_VERBOSE 1
 
@@ -70,7 +71,7 @@ typedef struct yyltype
 # define YYLTYPE yyltype
 # 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;	\
@@ -88,7 +89,7 @@ typedef struct yyltype
 	  (Current).first_byte   = (Current).last_byte =		\
 	    YYRHSLOC (Rhs, 0).last_byte;				\
 	}								\
-    while (YYID (0))
+    while (0)
 
 /* Useful defines so editors don't get confused ... */
 
@@ -210,8 +211,8 @@ VerbatimArg1 VerbatimArg2 IfDefTarget ArgItems Option
 
 %%
 
-Init:		STARTFILE RdFile END_OF_INPUT		{ xxsavevalue($2, &@$); UNPROTECT_PTR($1); return 0; }
-	|	STARTFRAGMENT RdFragment END_OF_INPUT	{ xxsavevalue($2, &@$); UNPROTECT_PTR($1); return 0; }
+Init:		STARTFILE RdFile END_OF_INPUT		{ xxsavevalue($2, &@$); UNPROTECT_PTR($1); YYACCEPT; }
+	|	STARTFRAGMENT RdFragment END_OF_INPUT	{ xxsavevalue($2, &@$); UNPROTECT_PTR($1); YYACCEPT; }
 	|	error					{ PROTECT(parseState.Value = R_NilValue);  YYABORT; }
 	;
 
@@ -268,7 +269,7 @@ Markup:		LATEXMACRO  LatexArg 		{ $$ = xxmarkup($1, $2, STATIC, &@$); }
 	|	ESCAPE				{ $$ = xxmarkup($1, R_NilValue, STATIC, &@$); }
 	|	IFDEF IfDefTarget ArgItems ENDIF { $$ = xxmarkup2($1, $2, $3, 2, HAS_IFDEF, &@$); UNPROTECT_PTR($4); }
 	|	IFDEF IfDefTarget ArgItems error { $$ = xxmarkup2($1, $2, $3, 2, HAS_IFDEF, &@$); }
-	|	VERBLATEX   VerbatimArg1 LatexArg2 { $$ = xxmarkup2($1, $2, $3, 2, STATIC, &@$); }
+	|	VERBLATEX   VerbatimArg LatexArg2 { $$ = xxmarkup2($1, $2, $3, 2, STATIC, &@$); }
 	
 UserMacro:	NEWCOMMAND  VerbatimArg1 VerbatimArg { $$ = xxnewcommand($1, $2, $3, &@$); }
 	|	USERMACRO			{ $$ = xxusermacro($1, xxnewlist(NULL), &@$); }
@@ -409,8 +410,10 @@ static int getDynamicFlag(SEXP item)
 
 static void setDynamicFlag(SEXP item, int flag)
 {
-    if (flag)
-    	setAttrib(item, install("dynamicFlag"), ScalarInteger(flag));
+    if (flag) {
+    	SEXP s_dynamicFlag = install("dynamicFlag");
+    	setAttrib(item, s_dynamicFlag, ScalarInteger(flag));
+    }
 }
 
 static SEXP xxnewlist(SEXP item)
@@ -536,11 +539,13 @@ static SEXP xxnewcommand(SEXP cmd, SEXP name, SEXP defn, YYLTYPE *lloc)
     	PROTECT(thedefn = mkString(CHAR(STRING_ELT(thedefn,0))));
     else
     	PROTECT(thedefn = mkString(""));
-    prev = findVar(install(CHAR(STRING_ELT(thename, 0))), parseState.xxMacroList);
-    if (prev != R_UnboundValue && !strcmp(CHAR(STRING_ELT(cmd,0)), "\renewcommand")) {
-        snprintf(buffer, sizeof(buffer), _("Macro '%s' previously defined."), 
+    if (warnDups) {
+	prev = findVar(installTrChar(STRING_ELT(thename, 0)), parseState.xxMacroList);
+    	if (prev != R_UnboundValue && strcmp(CHAR(STRING_ELT(cmd,0)), "\\renewcommand")) {
+	    snprintf(buffer, sizeof(buffer), _("Macro '%s' previously defined."), 
                  CHAR(STRING_ELT(thename, 0)));
-        yyerror(buffer);
+            yyerror(buffer);
+        }
     }
     for (c = CHAR(STRING_ELT(thedefn, 0)); *c; c++) {
     	if (*c == '#' && isdigit(*(c+1))) 
@@ -554,7 +559,7 @@ static SEXP xxnewcommand(SEXP cmd, SEXP name, SEXP defn, YYLTYPE *lloc)
     setAttrib(ans, install("Rd_tag"), cmd);
     setAttrib(ans, install("definition"), thedefn);
     setAttrib(ans, R_SrcrefSymbol, makeSrcref(lloc, SrcFile));
-    defineVar(install(CHAR(STRING_ELT(thename, 0))), ans, parseState.xxMacroList);
+    defineVar(installTrChar(STRING_ELT(thename, 0)), ans, parseState.xxMacroList);
 
     UNPROTECT_PTR(thedefn);
     UNPROTECT_PTR(cmd);
@@ -589,7 +594,7 @@ static SEXP xxusermacro(SEXP macro, SEXP args, YYLTYPE *lloc)
 	SET_STRING_ELT(ans, i+1, STRING_ELT(CADR(CADR(nextarg)), 0));
     }	
     UNPROTECT_PTR(args);
-    UNPROTECT_PTR(macro);    
+
     /* Now push the expanded macro onto the input stream, in reverse order */
     xxungetc(END_MACRO);
     start = CHAR(STRING_ELT(ans, 0));
@@ -605,8 +610,11 @@ static SEXP xxusermacro(SEXP macro, SEXP args, YYLTYPE *lloc)
     }
     xxungetc(START_MACRO);
     
-    setAttrib(ans, install("Rd_tag"), mkString("USERMACRO"));
+    SEXP s_Rd_tag = install("Rd_tag");
+    setAttrib(ans, s_Rd_tag, mkString("USERMACRO"));
     setAttrib(ans, R_SrcrefSymbol, makeSrcref(lloc, SrcFile));
+    setAttrib(ans, install("macro"), macro);
+    UNPROTECT_PTR(macro);
 #if DEBUGVALS
     Rprintf(" result: %p\n", ans);
 #endif
@@ -724,7 +732,8 @@ static void xxsavevalue(SEXP Rd, YYLTYPE *lloc)
 
 static SEXP xxtag(SEXP item, int type, YYLTYPE *lloc)
 {
-    setAttrib(item, install("Rd_tag"), mkString(yytname[YYTRANSLATE(type)]));
+    SEXP s_Rd_tag = install("Rd_tag");
+    setAttrib(item, s_Rd_tag, mkString(yytname[YYTRANSLATE(type)]));
     setAttrib(item, R_SrcrefSymbol, makeSrcref(lloc, SrcFile));
     return item;
 }
@@ -838,7 +847,7 @@ static int xxungetc(int c)
     	R_ParseContextLine = parseState.xxlineno;
     
     	R_ParseContext[R_ParseContextLast] = '\0';
-    	/* Mac OS X requires us to keep this non-negative */
+    	/* macOS requires us to keep this non-negative */
     	R_ParseContextLast = (R_ParseContextLast + PARSE_CONTEXT_SIZE - 1) 
 		% PARSE_CONTEXT_SIZE;
     }
@@ -908,8 +917,10 @@ static SEXP GrowList(SEXP l, SEXP s)
 
 /*--------------------------------------------------------------------------*/
  
-static SEXP ParseRd(ParseStatus *status, SEXP srcfile, Rboolean fragment)
+static SEXP ParseRd(ParseStatus *status, SEXP srcfile, Rboolean fragment, SEXP macros)
 {
+    Rboolean keepmacros = !isLogical(macros) || asLogical(macros);
+    
     R_ParseContextLast = 0;
     R_ParseContext[0] = '\0';
     
@@ -933,12 +944,20 @@ static SEXP ParseRd(ParseStatus *status, SEXP srcfile, Rboolean fragment)
     if (fragment) parseState.xxinitvalue = STARTFRAGMENT;
     else	  parseState.xxinitvalue = STARTFILE;
     
-    parseState.xxMacroList = InstallKeywords();
+    if (!isEnvironment(macros))
+	macros = InstallKeywords();
+	
+    PROTECT(macros);
+    PROTECT(parseState.xxMacroList = R_NewHashedEnv(macros, ScalarInteger(0)));
+    UNPROTECT_PTR(macros);
     
     parseState.Value = R_NilValue;
     
     if (yyparse()) *status = PARSE_ERROR;
     else *status = PARSE_OK;
+    
+    if (keepmacros && !isNull(parseState.Value))
+	setAttrib(parseState.Value, install("macros"), parseState.xxMacroList);
 
 #if DEBUGVALS
     Rprintf("ParseRd result: %p\n", parseState.Value);    
@@ -966,11 +985,11 @@ static int con_getc(void)
 }
 
 static
-SEXP R_ParseRd(Rconnection con, ParseStatus *status, SEXP srcfile, Rboolean fragment)
+SEXP R_ParseRd(Rconnection con, ParseStatus *status, SEXP srcfile, Rboolean fragment, SEXP macros)
 {
     con_parse = con;
     ptr_getc = con_getc;
-    return ParseRd(status, srcfile, fragment);
+    return ParseRd(status, srcfile, fragment, macros);
 }
 
 /*----------------------------------------------------------------------------
@@ -1156,6 +1175,7 @@ static SEXP InstallKeywords()
     	defineVar(name, val, result);
     	UNPROTECT(2);
     }
+    UNPROTECT(1);
     return result;
 }
     	
@@ -1170,7 +1190,10 @@ static SEXP UserMacroLookup(const char *s)
 {
     SEXP rec = findVar(install(s), parseState.xxMacroList);
     if (rec == R_UnboundValue) error(_("Unable to find macro %s"), s);
-    return getAttrib(rec, install("definition"));
+    PROTECT(rec);
+    SEXP res = getAttrib(rec, install("definition"));
+    UNPROTECT(1);
+    return res;
 }
 
 static void yyerror(const char *s)
@@ -1277,7 +1300,7 @@ static void yyerror(const char *s)
     	snprintf(ParseErrorMsg, PARSE_ERROR_SIZE, "%s", s);
     }
     filename = findVar(install("filename"), SrcFile);
-    if (isString(filename) && length(filename))
+    if (isString(filename) && LENGTH(filename))
     	strncpy(ParseErrorFilename, CHAR(STRING_ELT(filename, 0)), PARSE_ERROR_SIZE - 1);
     else
         ParseErrorFilename[0] = '\0';
@@ -1760,11 +1783,11 @@ static void PopState() {
 
 /* "do_parseRd" 
 
- .External2(C_parseRd,file, srcfile, encoding, verbose, basename, warningCalls)
+ .External2(C_parseRd,file, srcfile, encoding, verbose, basename, warningCalls, macros, warndups)
  If there is text then that is read and the other arguments are ignored.
 */
 
-SEXP C_parseRd(SEXP call, SEXP op, SEXP args, SEXP env)
+SEXP parseRd(SEXP call, SEXP op, SEXP args, SEXP env)
 {
     args = CDR(args);
 
@@ -1774,6 +1797,7 @@ SEXP C_parseRd(SEXP call, SEXP op, SEXP args, SEXP env)
     int ifile, wcall;
     ParseStatus status;
     RCNTXT cntxt;
+    SEXP macros;
 
 #if DEBUGMODE
     yydebug = 1;
@@ -1796,10 +1820,12 @@ SEXP C_parseRd(SEXP call, SEXP op, SEXP args, SEXP env)
     parseState.xxDebugTokens = asInteger(CAR(args));		args = CDR(args);
     parseState.xxBasename = CHAR(STRING_ELT(CAR(args), 0));	args = CDR(args);
     fragment = asLogical(CAR(args));				args = CDR(args);
-    wcall = asLogical(CAR(args));
+    wcall = asLogical(CAR(args));				args = CDR(args);
     if (wcall == NA_LOGICAL)
     	error(_("invalid '%s' value"), "warningCalls");
     wCalls = wcall;
+    macros = CAR(args);						args = CDR(args);
+    warnDups = asLogical(CAR(args));
 
     if (ifile >= 3) {/* file != "" */
 	if(!wasopen) {
@@ -1811,7 +1837,7 @@ SEXP C_parseRd(SEXP call, SEXP op, SEXP args, SEXP env)
 	    cntxt.cenddata = con;
 	}
 	if(!con->canread) error(_("cannot read from this connection"));
-	s = R_ParseRd(con, &status, source, fragment);
+	s = R_ParseRd(con, &status, source, fragment, macros);
 	if(!wasopen) endcontext(&cntxt);
 	PopState();
 	if (status != PARSE_OK) parseError(call, R_ParseError);
@@ -1828,7 +1854,7 @@ SEXP C_parseRd(SEXP call, SEXP op, SEXP args, SEXP env)
  .External2(C_deparseRd, element, state)
 */
 
-SEXP C_deparseRd(SEXP e, SEXP state)
+SEXP deparseRd(SEXP e, SEXP state)
 {
     SEXP result;
     int  outlen, *statevals, quoteBraces, inRComment;
@@ -1836,11 +1862,11 @@ SEXP C_deparseRd(SEXP e, SEXP state)
     char *outbuf, *out, lookahead;
     Rboolean escape;
 
-    if(!isString(e) || length(e) != 1) 
+    if(!isString(e) || LENGTH(e) != 1) 
     	error(_("'deparseRd' only supports deparsing character elements"));
     e = STRING_ELT(e, 0);
     
-    if(!isInteger(state) || length(state) != 5) error(_("bad state"));
+    if(!isInteger(state) || LENGTH(state) != 5) error(_("bad state"));
     
     PushState();
     
diff --git a/src/library/tools/src/http.c b/src/library/tools/src/http.c
index 6a61eaa..92662e0 100644
--- a/src/library/tools/src/http.c
+++ b/src/library/tools/src/http.c
@@ -14,7 +14,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  *
  */
 
diff --git a/src/library/tools/src/init.c b/src/library/tools/src/init.c
index bff24a0..a06080e 100644
--- a/src/library/tools/src/init.c
+++ b/src/library/tools/src/init.c
@@ -1,6 +1,6 @@
 /*
  *  R : A Computer Language for Statistical Data Analysis
- *  Copyright (C) 2003-12   The R Core Team.
+ *  Copyright (C) 2003-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
@@ -14,12 +14,12 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  */
 
-#include <R.h>
 #include "tools.h"
 #include <R_ext/Rdynload.h>
+#include <R_ext/Visibility.h>
 
 #ifdef UNUSED
 /* a test for re-encoding */
@@ -40,7 +40,7 @@ static const R_CallMethodDef CallEntries[] = {
     CALLDEF(codeFilesAppend, 2),
     CALLDEF(delim_match, 2),
     CALLDEF(dirchmod, 2),
-    {"C_getfmts", (DL_FUNC) &getfmts, 1},
+    CALLDEF(getfmts, 1),
     CALLDEF(Rmd5, 1),
     CALLDEF(check_nonASCII, 2),
     CALLDEF(check_nonASCII2, 1),
@@ -50,27 +50,26 @@ static const R_CallMethodDef CallEntries[] = {
     CALLDEF(ps_priority, 2),
     CALLDEF(startHTTPD, 2),
     CALLDEF(stopHTTPD, 0),
-    CALLDEF(C_deparseRd, 2),
+    CALLDEF(deparseRd, 2),
+    CALLDEF(splitString, 2),
 
     {NULL, NULL, 0}
 };
 
 #define EXTDEF(name, n)  {#name, (DL_FUNC) &name, n}
 static const R_ExternalMethodDef ExtEntries[] = {
-    EXTDEF(C_parseLatex, 4),
-    EXTDEF(C_parseRd, 7),
+    EXTDEF(parseLatex, 4),
+    EXTDEF(parseRd, 9),
 
     {NULL, NULL, 0}
 };
 
 
-void
-#ifdef HAVE_VISIBILITY_ATTRIBUTE
-__attribute__ ((visibility ("default")))
-#endif
+void attribute_visible
 R_init_tools(DllInfo *dll)
 {
     R_registerRoutines(dll, NULL, CallEntries, NULL, ExtEntries);
     R_useDynamicSymbols(dll, FALSE);
+    R_forceSymbols(dll, FALSE);
 }
 
diff --git a/src/library/tools/src/install.c b/src/library/tools/src/install.c
index 3d5ee6c..dec1b3a 100644
--- a/src/library/tools/src/install.c
+++ b/src/library/tools/src/install.c
@@ -1,6 +1,6 @@
 /*
  *  R : A Computer Language for Statistical Data Analysis
- *  Copyright (C) 1998--2013 The R Core Team
+ *  Copyright (C) 1998--2015 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
@@ -14,7 +14,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  */
 
 /* Formerly in src/main/platform.c */
@@ -108,7 +108,7 @@ static void chmod_one(const char *name, const int grpwrt)
 /* This is a .Call so manages R_alloc stack */
 SEXP dirchmod(SEXP dr, SEXP gwsxp)
 {
-    if(!isString(dr) || length(dr) != 1)
+    if(!isString(dr) || LENGTH(dr) != 1)
 	error(_("invalid '%s' argument"), "dir");
     chmod_one(translateChar(STRING_ELT(dr, 0)), asLogical(gwsxp));
 
@@ -127,12 +127,11 @@ SEXP dirchmod(SEXP dr, SEXP gwsxp)
 SEXP codeFilesAppend(SEXP f1, SEXP f2)
 {
     int n, n1, n2;
-    n1 = length(f1);
-    n2 = length(f2);
-    if (!isString(f1) || n1 != 1)
+    if (!isString(f1) || (n1 = LENGTH(f1)) != 1)
 	error(_("invalid '%s' argument"), "file1");
     if (!isString(f2))
 	error(_("invalid '%s' argument"), "file2");
+    n2 = LENGTH(f2);
     if (n2 < 1) return allocVector(LGLSXP, 0);
     n = (n1 > n2) ? n1 : n2; // will be n2.
     SEXP ans = PROTECT(allocVector(LGLSXP, n));
diff --git a/src/library/tools/src/signals.c b/src/library/tools/src/signals.c
index 028293e..781b1b0 100644
--- a/src/library/tools/src/signals.c
+++ b/src/library/tools/src/signals.c
@@ -14,14 +14,13 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  */
 
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
 
-#include <R.h>
 #include "tools.h"
 #include <signal.h> // C99
 
@@ -61,7 +60,7 @@ SEXP ps_kill(SEXP spid, SEXP ssignal)
 }
 
 #if defined(HAVE_SYS_RESOURCE_H) && defined(HAVE_GETPRIORITY)
-/* on OS X it seems sys/resource.h needed sys/time.h first at one time */
+/* on macOS it seems sys/resource.h needed sys/time.h first at one time */
 #include <sys/time.h>
 #include <sys/resource.h>
 #include <errno.h>
diff --git a/src/library/tools/src/text.c b/src/library/tools/src/text.c
index 69f2181..111cfa1 100644
--- a/src/library/tools/src/text.c
+++ b/src/library/tools/src/text.c
@@ -1,6 +1,6 @@
 /*
  *  R : A Computer Language for Statistical Data Analysis
- *  Copyright (C) 2003-11   The R Core Team.
+ *  Copyright (C) 2003-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
@@ -14,13 +14,14 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  */
 
 /* <UTF8> OK, provided the delimiters are ASCII
    match length is in now in chars.
 */
 
+#include <string.h>
 #include <R.h>
 #include "tools.h"
 
@@ -120,7 +121,8 @@ delim_match(SEXP x, SEXP delims)
 		if(used == 0) break;
 		s += used;
 	    } else
-		s++; pos++;
+		s++; 
+	    pos++;
 	}
 	if(end > -1) {
 	    INTEGER(ans)[i] = start + 1; /* index from one */
@@ -156,7 +158,7 @@ check_nonASCII(SEXP text, SEXP ignore_quotes)
     if(ign == NA_LOGICAL) error("'ignore_quotes' must be TRUE or FALSE");
 
     for (i = 0; i < LENGTH(text); i++) {
-	p = CHAR(STRING_ELT(text, i)); /* ASCII or not not affected by charset */
+	p = CHAR(STRING_ELT(text, i)); // ASCII or not not affected by charset
 	inquote = FALSE; /* avoid runaway quotes */
 	for(; *p; p++) {
 	    if(!inquote && *p == '#') break;
@@ -167,7 +169,7 @@ check_nonASCII(SEXP text, SEXP ignore_quotes)
 		    return ScalarLogical(TRUE);
 		}
 	    }
-	    if(nbslash % 2 && (*p == '"' || *p == '\'')) {
+	    if((nbslash % 2 == 0) && (*p == '"' || *p == '\'')) {
 		if(inquote && *p == quote) {
 		    inquote = FALSE;
 		} else if(!inquote) {
@@ -255,3 +257,43 @@ SEXP doTabExpand(SEXP strings, SEXP starts)  /* does tab expansion for UTF-8 str
     free(buffer);
     return result;
 }
+
+/* This could be done in wchar_t, but it is only used for
+   ASCII delimiters which are not lead bytes in UTF-8 or
+   DBCS encodings. */
+SEXP splitString(SEXP string, SEXP delims)
+{
+    if(!isString(string) || length(string) != 1)
+	error("first arg must be a single character string");
+    if(!isString(delims) || length(delims) != 1)
+	error("first arg must be a single character string");
+    const char *in = CHAR(STRING_ELT(string, 0)),
+	*del = CHAR(STRING_ELT(delims, 0));
+    cetype_t ienc = getCharCE(STRING_ELT(string, 0));
+    int nc = (int) strlen(in), used = 0;
+
+    // Used for short strings, so OK to over-allocate wildly
+    SEXP out = PROTECT(allocVector(STRSXP, nc));
+    const char *p;
+    char tmp[nc], *this = tmp;
+    int nthis = 0;
+    for(p = in; *p ; p++) {
+	if(strchr(del, *p)) {
+	    // put out current string (if any)
+	    if(nthis) 
+		SET_STRING_ELT(out, used++, mkCharLenCE(tmp, nthis, ienc));
+	    // put out delimiter
+	    SET_STRING_ELT(out, used++, mkCharLen(p, 1));
+	    // restart
+	    this = tmp; nthis = 0;
+	} else {
+	    *this++ = *p;
+	    nthis++;
+	}
+    }
+    if(nthis) SET_STRING_ELT(out, used++, mkCharLenCE(tmp, nthis, ienc));
+
+    SEXP ans = lengthgets(out, used);
+    UNPROTECT(1);
+    return ans;
+}
diff --git a/src/library/tools/src/tools.h b/src/library/tools/src/tools.h
index 029f144..7ec79fd 100644
--- a/src/library/tools/src/tools.h
+++ b/src/library/tools/src/tools.h
@@ -1,6 +1,6 @@
 /*
  *  R : A Computer Language for Statistical Data Analysis
- *  Copyright (C) 2003-11   The R Core Team.
+ *  Copyright (C) 2003-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
@@ -14,12 +14,13 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  */
 
 #ifndef R_TOOLS_H
 #define R_TOOLS_H
 
+#include <R.h>
 #include <Rinternals.h>
 #ifdef ENABLE_NLS
 #include <libintl.h>
@@ -41,9 +42,10 @@ SEXP codeFilesAppend(SEXP f1, SEXP f2);
 SEXP getfmts(SEXP format);
 SEXP startHTTPD(SEXP sIP, SEXP sPort);
 SEXP stopHTTPD(void);
+SEXP splitString(SEXP string, SEXP delims);
 
-SEXP C_parseLatex(SEXP call, SEXP op, SEXP args, SEXP env);
-SEXP C_parseRd(SEXP call, SEXP op, SEXP args, SEXP env);
-SEXP C_deparseRd(SEXP e, SEXP state);
+SEXP parseLatex(SEXP call, SEXP op, SEXP args, SEXP env);
+SEXP parseRd(SEXP call, SEXP op, SEXP args, SEXP env);
+SEXP deparseRd(SEXP e, SEXP state);
 
 #endif
diff --git a/src/library/translations/DESCRIPTION.in b/src/library/translations/DESCRIPTION.in
index 34b86e1..c47b2f9 100644
--- a/src/library/translations/DESCRIPTION.in
+++ b/src/library/translations/DESCRIPTION.in
@@ -3,5 +3,5 @@ Version: @VERSION@
 Title: The R Translations Package
 Author: R Core Team and contributors worldwide
 Maintainer: R Core Team <R-core at r-project.org>
-Description: Compiled translations of messages
+Description: Compiled translations of messages.
 License: Part of R @VERSION@
diff --git a/src/library/translations/inst/da/LC_MESSAGES/R-base.mo b/src/library/translations/inst/da/LC_MESSAGES/R-base.mo
index e4803b8..530d25c 100644
Binary files a/src/library/translations/inst/da/LC_MESSAGES/R-base.mo and b/src/library/translations/inst/da/LC_MESSAGES/R-base.mo differ
diff --git a/src/library/translations/inst/da/LC_MESSAGES/R-compiler.mo b/src/library/translations/inst/da/LC_MESSAGES/R-compiler.mo
index fb1ea5b..6a95475 100644
Binary files a/src/library/translations/inst/da/LC_MESSAGES/R-compiler.mo and b/src/library/translations/inst/da/LC_MESSAGES/R-compiler.mo differ
diff --git a/src/library/translations/inst/da/LC_MESSAGES/R-grDevices.mo b/src/library/translations/inst/da/LC_MESSAGES/R-grDevices.mo
index 71e216a..59b410e 100644
Binary files a/src/library/translations/inst/da/LC_MESSAGES/R-grDevices.mo and b/src/library/translations/inst/da/LC_MESSAGES/R-grDevices.mo differ
diff --git a/src/library/translations/inst/da/LC_MESSAGES/R-graphics.mo b/src/library/translations/inst/da/LC_MESSAGES/R-graphics.mo
index c2a335e..0cce11a 100644
Binary files a/src/library/translations/inst/da/LC_MESSAGES/R-graphics.mo and b/src/library/translations/inst/da/LC_MESSAGES/R-graphics.mo differ
diff --git a/src/library/translations/inst/da/LC_MESSAGES/R-methods.mo b/src/library/translations/inst/da/LC_MESSAGES/R-methods.mo
index 7ce721c..42bfd8c 100644
Binary files a/src/library/translations/inst/da/LC_MESSAGES/R-methods.mo and b/src/library/translations/inst/da/LC_MESSAGES/R-methods.mo differ
diff --git a/src/library/translations/inst/da/LC_MESSAGES/R-parallel.mo b/src/library/translations/inst/da/LC_MESSAGES/R-parallel.mo
index 34eba8d..2a28d2d 100644
Binary files a/src/library/translations/inst/da/LC_MESSAGES/R-parallel.mo and b/src/library/translations/inst/da/LC_MESSAGES/R-parallel.mo differ
diff --git a/src/library/translations/inst/da/LC_MESSAGES/R-stats.mo b/src/library/translations/inst/da/LC_MESSAGES/R-stats.mo
index d559857..d6c1097 100644
Binary files a/src/library/translations/inst/da/LC_MESSAGES/R-stats.mo and b/src/library/translations/inst/da/LC_MESSAGES/R-stats.mo differ
diff --git a/src/library/translations/inst/da/LC_MESSAGES/R-tcltk.mo b/src/library/translations/inst/da/LC_MESSAGES/R-tcltk.mo
index a0cd65a..46ec357 100644
Binary files a/src/library/translations/inst/da/LC_MESSAGES/R-tcltk.mo and b/src/library/translations/inst/da/LC_MESSAGES/R-tcltk.mo differ
diff --git a/src/library/translations/inst/da/LC_MESSAGES/R-tools.mo b/src/library/translations/inst/da/LC_MESSAGES/R-tools.mo
index c3f6e2e..2b37890 100644
Binary files a/src/library/translations/inst/da/LC_MESSAGES/R-tools.mo and b/src/library/translations/inst/da/LC_MESSAGES/R-tools.mo differ
diff --git a/src/library/translations/inst/da/LC_MESSAGES/R-utils.mo b/src/library/translations/inst/da/LC_MESSAGES/R-utils.mo
index 4f30e61..e31fdb8 100644
Binary files a/src/library/translations/inst/da/LC_MESSAGES/R-utils.mo and b/src/library/translations/inst/da/LC_MESSAGES/R-utils.mo differ
diff --git a/src/library/translations/inst/da/LC_MESSAGES/R.mo b/src/library/translations/inst/da/LC_MESSAGES/R.mo
index c0a38be..6c9ea59 100644
Binary files a/src/library/translations/inst/da/LC_MESSAGES/R.mo and b/src/library/translations/inst/da/LC_MESSAGES/R.mo differ
diff --git a/src/library/translations/inst/da/LC_MESSAGES/RGui.mo b/src/library/translations/inst/da/LC_MESSAGES/RGui.mo
index 0377f07..03c93be 100644
Binary files a/src/library/translations/inst/da/LC_MESSAGES/RGui.mo and b/src/library/translations/inst/da/LC_MESSAGES/RGui.mo differ
diff --git a/src/library/translations/inst/da/LC_MESSAGES/grDevices.mo b/src/library/translations/inst/da/LC_MESSAGES/grDevices.mo
index 62dadd4..9dd2389 100644
Binary files a/src/library/translations/inst/da/LC_MESSAGES/grDevices.mo and b/src/library/translations/inst/da/LC_MESSAGES/grDevices.mo differ
diff --git a/src/library/translations/inst/da/LC_MESSAGES/graphics.mo b/src/library/translations/inst/da/LC_MESSAGES/graphics.mo
index d5b734f..c974cce 100644
Binary files a/src/library/translations/inst/da/LC_MESSAGES/graphics.mo and b/src/library/translations/inst/da/LC_MESSAGES/graphics.mo differ
diff --git a/src/library/translations/inst/da/LC_MESSAGES/grid.mo b/src/library/translations/inst/da/LC_MESSAGES/grid.mo
index 9694fc9..c186cec 100644
Binary files a/src/library/translations/inst/da/LC_MESSAGES/grid.mo and b/src/library/translations/inst/da/LC_MESSAGES/grid.mo differ
diff --git a/src/library/translations/inst/da/LC_MESSAGES/methods.mo b/src/library/translations/inst/da/LC_MESSAGES/methods.mo
index 7175045..059785c 100644
Binary files a/src/library/translations/inst/da/LC_MESSAGES/methods.mo and b/src/library/translations/inst/da/LC_MESSAGES/methods.mo differ
diff --git a/src/library/translations/inst/da/LC_MESSAGES/parallel.mo b/src/library/translations/inst/da/LC_MESSAGES/parallel.mo
index b1fd11c..2e3c73a 100644
Binary files a/src/library/translations/inst/da/LC_MESSAGES/parallel.mo and b/src/library/translations/inst/da/LC_MESSAGES/parallel.mo differ
diff --git a/src/library/translations/inst/da/LC_MESSAGES/splines.mo b/src/library/translations/inst/da/LC_MESSAGES/splines.mo
index a7c9c09..eedcdfd 100644
Binary files a/src/library/translations/inst/da/LC_MESSAGES/splines.mo and b/src/library/translations/inst/da/LC_MESSAGES/splines.mo differ
diff --git a/src/library/translations/inst/da/LC_MESSAGES/stats.mo b/src/library/translations/inst/da/LC_MESSAGES/stats.mo
index c36f725..0e37d68 100644
Binary files a/src/library/translations/inst/da/LC_MESSAGES/stats.mo and b/src/library/translations/inst/da/LC_MESSAGES/stats.mo differ
diff --git a/src/library/translations/inst/da/LC_MESSAGES/tcltk.mo b/src/library/translations/inst/da/LC_MESSAGES/tcltk.mo
index 8da5fce..6714f6d 100644
Binary files a/src/library/translations/inst/da/LC_MESSAGES/tcltk.mo and b/src/library/translations/inst/da/LC_MESSAGES/tcltk.mo differ
diff --git a/src/library/translations/inst/da/LC_MESSAGES/tools.mo b/src/library/translations/inst/da/LC_MESSAGES/tools.mo
index 03be2e1..65bec10 100644
Binary files a/src/library/translations/inst/da/LC_MESSAGES/tools.mo and b/src/library/translations/inst/da/LC_MESSAGES/tools.mo differ
diff --git a/src/library/translations/inst/de/LC_MESSAGES/R-base.mo b/src/library/translations/inst/de/LC_MESSAGES/R-base.mo
index a0c28c6..cdc480d 100644
Binary files a/src/library/translations/inst/de/LC_MESSAGES/R-base.mo and b/src/library/translations/inst/de/LC_MESSAGES/R-base.mo differ
diff --git a/src/library/translations/inst/de/LC_MESSAGES/R-compiler.mo b/src/library/translations/inst/de/LC_MESSAGES/R-compiler.mo
index 7af1779..8a3eea7 100644
Binary files a/src/library/translations/inst/de/LC_MESSAGES/R-compiler.mo and b/src/library/translations/inst/de/LC_MESSAGES/R-compiler.mo differ
diff --git a/src/library/translations/inst/de/LC_MESSAGES/R-grDevices.mo b/src/library/translations/inst/de/LC_MESSAGES/R-grDevices.mo
index 0ccfc2f..4236e94 100644
Binary files a/src/library/translations/inst/de/LC_MESSAGES/R-grDevices.mo and b/src/library/translations/inst/de/LC_MESSAGES/R-grDevices.mo differ
diff --git a/src/library/translations/inst/de/LC_MESSAGES/R-graphics.mo b/src/library/translations/inst/de/LC_MESSAGES/R-graphics.mo
index 1f3e765..599fba1 100644
Binary files a/src/library/translations/inst/de/LC_MESSAGES/R-graphics.mo and b/src/library/translations/inst/de/LC_MESSAGES/R-graphics.mo differ
diff --git a/src/library/translations/inst/de/LC_MESSAGES/R-grid.mo b/src/library/translations/inst/de/LC_MESSAGES/R-grid.mo
index 04ab73d..996f99e 100644
Binary files a/src/library/translations/inst/de/LC_MESSAGES/R-grid.mo and b/src/library/translations/inst/de/LC_MESSAGES/R-grid.mo differ
diff --git a/src/library/translations/inst/de/LC_MESSAGES/R-methods.mo b/src/library/translations/inst/de/LC_MESSAGES/R-methods.mo
index fad0093..43a11b7 100644
Binary files a/src/library/translations/inst/de/LC_MESSAGES/R-methods.mo and b/src/library/translations/inst/de/LC_MESSAGES/R-methods.mo differ
diff --git a/src/library/translations/inst/de/LC_MESSAGES/R-parallel.mo b/src/library/translations/inst/de/LC_MESSAGES/R-parallel.mo
index 399b379..a73fdf7 100644
Binary files a/src/library/translations/inst/de/LC_MESSAGES/R-parallel.mo and b/src/library/translations/inst/de/LC_MESSAGES/R-parallel.mo differ
diff --git a/src/library/translations/inst/de/LC_MESSAGES/R-splines.mo b/src/library/translations/inst/de/LC_MESSAGES/R-splines.mo
index 8851015..2c94720 100644
Binary files a/src/library/translations/inst/de/LC_MESSAGES/R-splines.mo and b/src/library/translations/inst/de/LC_MESSAGES/R-splines.mo differ
diff --git a/src/library/translations/inst/de/LC_MESSAGES/R-stats.mo b/src/library/translations/inst/de/LC_MESSAGES/R-stats.mo
index 944b09a..2ebcc77 100644
Binary files a/src/library/translations/inst/de/LC_MESSAGES/R-stats.mo and b/src/library/translations/inst/de/LC_MESSAGES/R-stats.mo differ
diff --git a/src/library/translations/inst/de/LC_MESSAGES/R-stats4.mo b/src/library/translations/inst/de/LC_MESSAGES/R-stats4.mo
index 24c9b38..c704fea 100644
Binary files a/src/library/translations/inst/de/LC_MESSAGES/R-stats4.mo and b/src/library/translations/inst/de/LC_MESSAGES/R-stats4.mo differ
diff --git a/src/library/translations/inst/de/LC_MESSAGES/R-tcltk.mo b/src/library/translations/inst/de/LC_MESSAGES/R-tcltk.mo
index 9182a0b..8721a34 100644
Binary files a/src/library/translations/inst/de/LC_MESSAGES/R-tcltk.mo and b/src/library/translations/inst/de/LC_MESSAGES/R-tcltk.mo differ
diff --git a/src/library/translations/inst/de/LC_MESSAGES/R-tools.mo b/src/library/translations/inst/de/LC_MESSAGES/R-tools.mo
index fbda0de..5377cbc 100644
Binary files a/src/library/translations/inst/de/LC_MESSAGES/R-tools.mo and b/src/library/translations/inst/de/LC_MESSAGES/R-tools.mo differ
diff --git a/src/library/translations/inst/de/LC_MESSAGES/R-utils.mo b/src/library/translations/inst/de/LC_MESSAGES/R-utils.mo
index 30b196a..bb8994d 100644
Binary files a/src/library/translations/inst/de/LC_MESSAGES/R-utils.mo and b/src/library/translations/inst/de/LC_MESSAGES/R-utils.mo differ
diff --git a/src/library/translations/inst/de/LC_MESSAGES/R.mo b/src/library/translations/inst/de/LC_MESSAGES/R.mo
index 8e988cf..4d52b09 100644
Binary files a/src/library/translations/inst/de/LC_MESSAGES/R.mo and b/src/library/translations/inst/de/LC_MESSAGES/R.mo differ
diff --git a/src/library/translations/inst/de/LC_MESSAGES/RGui.mo b/src/library/translations/inst/de/LC_MESSAGES/RGui.mo
index d3c3dae..7dad7b7 100644
Binary files a/src/library/translations/inst/de/LC_MESSAGES/RGui.mo and b/src/library/translations/inst/de/LC_MESSAGES/RGui.mo differ
diff --git a/src/library/translations/inst/de/LC_MESSAGES/grDevices.mo b/src/library/translations/inst/de/LC_MESSAGES/grDevices.mo
index 50159a2..ab406f6 100644
Binary files a/src/library/translations/inst/de/LC_MESSAGES/grDevices.mo and b/src/library/translations/inst/de/LC_MESSAGES/grDevices.mo differ
diff --git a/src/library/translations/inst/de/LC_MESSAGES/graphics.mo b/src/library/translations/inst/de/LC_MESSAGES/graphics.mo
index 65f7af0..988ece1 100644
Binary files a/src/library/translations/inst/de/LC_MESSAGES/graphics.mo and b/src/library/translations/inst/de/LC_MESSAGES/graphics.mo differ
diff --git a/src/library/translations/inst/de/LC_MESSAGES/grid.mo b/src/library/translations/inst/de/LC_MESSAGES/grid.mo
index 0eaf8f9..8017825 100644
Binary files a/src/library/translations/inst/de/LC_MESSAGES/grid.mo and b/src/library/translations/inst/de/LC_MESSAGES/grid.mo differ
diff --git a/src/library/translations/inst/de/LC_MESSAGES/methods.mo b/src/library/translations/inst/de/LC_MESSAGES/methods.mo
index 539aee6..9984880 100644
Binary files a/src/library/translations/inst/de/LC_MESSAGES/methods.mo and b/src/library/translations/inst/de/LC_MESSAGES/methods.mo differ
diff --git a/src/library/translations/inst/de/LC_MESSAGES/parallel.mo b/src/library/translations/inst/de/LC_MESSAGES/parallel.mo
index dbee826..dd7b8d9 100644
Binary files a/src/library/translations/inst/de/LC_MESSAGES/parallel.mo and b/src/library/translations/inst/de/LC_MESSAGES/parallel.mo differ
diff --git a/src/library/translations/inst/de/LC_MESSAGES/splines.mo b/src/library/translations/inst/de/LC_MESSAGES/splines.mo
index 8db819c..eba93f3 100644
Binary files a/src/library/translations/inst/de/LC_MESSAGES/splines.mo and b/src/library/translations/inst/de/LC_MESSAGES/splines.mo differ
diff --git a/src/library/translations/inst/de/LC_MESSAGES/stats.mo b/src/library/translations/inst/de/LC_MESSAGES/stats.mo
index 9afeb33..1760486 100644
Binary files a/src/library/translations/inst/de/LC_MESSAGES/stats.mo and b/src/library/translations/inst/de/LC_MESSAGES/stats.mo differ
diff --git a/src/library/translations/inst/de/LC_MESSAGES/tcltk.mo b/src/library/translations/inst/de/LC_MESSAGES/tcltk.mo
index af5e8fa..1ecc4b0 100644
Binary files a/src/library/translations/inst/de/LC_MESSAGES/tcltk.mo and b/src/library/translations/inst/de/LC_MESSAGES/tcltk.mo differ
diff --git a/src/library/translations/inst/de/LC_MESSAGES/tools.mo b/src/library/translations/inst/de/LC_MESSAGES/tools.mo
index cca9659..cadcd96 100644
Binary files a/src/library/translations/inst/de/LC_MESSAGES/tools.mo and b/src/library/translations/inst/de/LC_MESSAGES/tools.mo differ
diff --git a/src/library/translations/inst/de/LC_MESSAGES/utils.mo b/src/library/translations/inst/de/LC_MESSAGES/utils.mo
index 6fb26a4..a697b0e 100644
Binary files a/src/library/translations/inst/de/LC_MESSAGES/utils.mo and b/src/library/translations/inst/de/LC_MESSAGES/utils.mo differ
diff --git a/src/library/translations/inst/en/LC_MESSAGES/R.mo b/src/library/translations/inst/en/LC_MESSAGES/R.mo
index c855d36..4bcaec6 100644
Binary files a/src/library/translations/inst/en/LC_MESSAGES/R.mo and b/src/library/translations/inst/en/LC_MESSAGES/R.mo differ
diff --git a/src/library/translations/inst/en at quot/LC_MESSAGES/R-base.mo b/src/library/translations/inst/en at quot/LC_MESSAGES/R-base.mo
index aeea7a1..e2bb44f 100644
Binary files a/src/library/translations/inst/en at quot/LC_MESSAGES/R-base.mo and b/src/library/translations/inst/en at quot/LC_MESSAGES/R-base.mo differ
diff --git a/src/library/translations/inst/en at quot/LC_MESSAGES/R-compiler.mo b/src/library/translations/inst/en at quot/LC_MESSAGES/R-compiler.mo
index 722a910..878784a 100644
Binary files a/src/library/translations/inst/en at quot/LC_MESSAGES/R-compiler.mo and b/src/library/translations/inst/en at quot/LC_MESSAGES/R-compiler.mo differ
diff --git a/src/library/translations/inst/en at quot/LC_MESSAGES/R-grDevices.mo b/src/library/translations/inst/en at quot/LC_MESSAGES/R-grDevices.mo
index 284a58d..d9f4dda 100644
Binary files a/src/library/translations/inst/en at quot/LC_MESSAGES/R-grDevices.mo and b/src/library/translations/inst/en at quot/LC_MESSAGES/R-grDevices.mo differ
diff --git a/src/library/translations/inst/en at quot/LC_MESSAGES/R-graphics.mo b/src/library/translations/inst/en at quot/LC_MESSAGES/R-graphics.mo
index 5d8eaa8..58078dd 100644
Binary files a/src/library/translations/inst/en at quot/LC_MESSAGES/R-graphics.mo and b/src/library/translations/inst/en at quot/LC_MESSAGES/R-graphics.mo differ
diff --git a/src/library/translations/inst/en at quot/LC_MESSAGES/R-grid.mo b/src/library/translations/inst/en at quot/LC_MESSAGES/R-grid.mo
index 9eb344f..607ecf7 100644
Binary files a/src/library/translations/inst/en at quot/LC_MESSAGES/R-grid.mo and b/src/library/translations/inst/en at quot/LC_MESSAGES/R-grid.mo differ
diff --git a/src/library/translations/inst/en at quot/LC_MESSAGES/R-methods.mo b/src/library/translations/inst/en at quot/LC_MESSAGES/R-methods.mo
index 732ddf0..c71f0b8 100644
Binary files a/src/library/translations/inst/en at quot/LC_MESSAGES/R-methods.mo and b/src/library/translations/inst/en at quot/LC_MESSAGES/R-methods.mo differ
diff --git a/src/library/translations/inst/en at quot/LC_MESSAGES/R-parallel.mo b/src/library/translations/inst/en at quot/LC_MESSAGES/R-parallel.mo
index 9960d09..044d47c 100644
Binary files a/src/library/translations/inst/en at quot/LC_MESSAGES/R-parallel.mo and b/src/library/translations/inst/en at quot/LC_MESSAGES/R-parallel.mo differ
diff --git a/src/library/translations/inst/en at quot/LC_MESSAGES/R-splines.mo b/src/library/translations/inst/en at quot/LC_MESSAGES/R-splines.mo
index 91cab7a..8d0a053 100644
Binary files a/src/library/translations/inst/en at quot/LC_MESSAGES/R-splines.mo and b/src/library/translations/inst/en at quot/LC_MESSAGES/R-splines.mo differ
diff --git a/src/library/translations/inst/en at quot/LC_MESSAGES/R-stats.mo b/src/library/translations/inst/en at quot/LC_MESSAGES/R-stats.mo
index 62debf0..e3f68f8 100644
Binary files a/src/library/translations/inst/en at quot/LC_MESSAGES/R-stats.mo and b/src/library/translations/inst/en at quot/LC_MESSAGES/R-stats.mo differ
diff --git a/src/library/translations/inst/en at quot/LC_MESSAGES/R-stats4.mo b/src/library/translations/inst/en at quot/LC_MESSAGES/R-stats4.mo
index 66ec6ff..548bf1f 100644
Binary files a/src/library/translations/inst/en at quot/LC_MESSAGES/R-stats4.mo and b/src/library/translations/inst/en at quot/LC_MESSAGES/R-stats4.mo differ
diff --git a/src/library/translations/inst/en at quot/LC_MESSAGES/R-tcltk.mo b/src/library/translations/inst/en at quot/LC_MESSAGES/R-tcltk.mo
index 3f08fda..19350c4 100644
Binary files a/src/library/translations/inst/en at quot/LC_MESSAGES/R-tcltk.mo and b/src/library/translations/inst/en at quot/LC_MESSAGES/R-tcltk.mo differ
diff --git a/src/library/translations/inst/en at quot/LC_MESSAGES/R-tools.mo b/src/library/translations/inst/en at quot/LC_MESSAGES/R-tools.mo
index 26c21b6..8441af0 100644
Binary files a/src/library/translations/inst/en at quot/LC_MESSAGES/R-tools.mo and b/src/library/translations/inst/en at quot/LC_MESSAGES/R-tools.mo differ
diff --git a/src/library/translations/inst/en at quot/LC_MESSAGES/R-utils.mo b/src/library/translations/inst/en at quot/LC_MESSAGES/R-utils.mo
index 8d2c612..fef6f62 100644
Binary files a/src/library/translations/inst/en at quot/LC_MESSAGES/R-utils.mo and b/src/library/translations/inst/en at quot/LC_MESSAGES/R-utils.mo differ
diff --git a/src/library/translations/inst/en at quot/LC_MESSAGES/R.mo b/src/library/translations/inst/en at quot/LC_MESSAGES/R.mo
index 821718b..9fe78ae 100644
Binary files a/src/library/translations/inst/en at quot/LC_MESSAGES/R.mo and b/src/library/translations/inst/en at quot/LC_MESSAGES/R.mo differ
diff --git a/src/library/translations/inst/en at quot/LC_MESSAGES/grDevices.mo b/src/library/translations/inst/en at quot/LC_MESSAGES/grDevices.mo
index f7dcef2..7f6a48c 100644
Binary files a/src/library/translations/inst/en at quot/LC_MESSAGES/grDevices.mo and b/src/library/translations/inst/en at quot/LC_MESSAGES/grDevices.mo differ
diff --git a/src/library/translations/inst/en at quot/LC_MESSAGES/graphics.mo b/src/library/translations/inst/en at quot/LC_MESSAGES/graphics.mo
index 3254599..1dd2f35 100644
Binary files a/src/library/translations/inst/en at quot/LC_MESSAGES/graphics.mo and b/src/library/translations/inst/en at quot/LC_MESSAGES/graphics.mo differ
diff --git a/src/library/translations/inst/en at quot/LC_MESSAGES/grid.mo b/src/library/translations/inst/en at quot/LC_MESSAGES/grid.mo
index a3c0231..470a8fb 100644
Binary files a/src/library/translations/inst/en at quot/LC_MESSAGES/grid.mo and b/src/library/translations/inst/en at quot/LC_MESSAGES/grid.mo differ
diff --git a/src/library/translations/inst/en at quot/LC_MESSAGES/methods.mo b/src/library/translations/inst/en at quot/LC_MESSAGES/methods.mo
index 790cd4e..1d0c403 100644
Binary files a/src/library/translations/inst/en at quot/LC_MESSAGES/methods.mo and b/src/library/translations/inst/en at quot/LC_MESSAGES/methods.mo differ
diff --git a/src/library/translations/inst/en at quot/LC_MESSAGES/parallel.mo b/src/library/translations/inst/en at quot/LC_MESSAGES/parallel.mo
index 2cd458e..9c7c023 100644
Binary files a/src/library/translations/inst/en at quot/LC_MESSAGES/parallel.mo and b/src/library/translations/inst/en at quot/LC_MESSAGES/parallel.mo differ
diff --git a/src/library/translations/inst/en at quot/LC_MESSAGES/splines.mo b/src/library/translations/inst/en at quot/LC_MESSAGES/splines.mo
index a96fe2b..4caffbc 100644
Binary files a/src/library/translations/inst/en at quot/LC_MESSAGES/splines.mo and b/src/library/translations/inst/en at quot/LC_MESSAGES/splines.mo differ
diff --git a/src/library/translations/inst/en at quot/LC_MESSAGES/stats.mo b/src/library/translations/inst/en at quot/LC_MESSAGES/stats.mo
index a09a603..ebbc1a9 100644
Binary files a/src/library/translations/inst/en at quot/LC_MESSAGES/stats.mo and b/src/library/translations/inst/en at quot/LC_MESSAGES/stats.mo differ
diff --git a/src/library/translations/inst/en at quot/LC_MESSAGES/tcltk.mo b/src/library/translations/inst/en at quot/LC_MESSAGES/tcltk.mo
index 1fabf06..9c1b52b 100644
Binary files a/src/library/translations/inst/en at quot/LC_MESSAGES/tcltk.mo and b/src/library/translations/inst/en at quot/LC_MESSAGES/tcltk.mo differ
diff --git a/src/library/translations/inst/en at quot/LC_MESSAGES/tools.mo b/src/library/translations/inst/en at quot/LC_MESSAGES/tools.mo
index 2532e77..a92488d 100644
Binary files a/src/library/translations/inst/en at quot/LC_MESSAGES/tools.mo and b/src/library/translations/inst/en at quot/LC_MESSAGES/tools.mo differ
diff --git a/src/library/translations/inst/en at quot/LC_MESSAGES/utils.mo b/src/library/translations/inst/en at quot/LC_MESSAGES/utils.mo
index 1647a5c..b343a68 100644
Binary files a/src/library/translations/inst/en at quot/LC_MESSAGES/utils.mo and b/src/library/translations/inst/en at quot/LC_MESSAGES/utils.mo differ
diff --git a/src/library/translations/inst/en_GB/LC_MESSAGES/R-grDevices.mo b/src/library/translations/inst/en_GB/LC_MESSAGES/R-grDevices.mo
index f94c0d0..53c1bcf 100644
Binary files a/src/library/translations/inst/en_GB/LC_MESSAGES/R-grDevices.mo and b/src/library/translations/inst/en_GB/LC_MESSAGES/R-grDevices.mo differ
diff --git a/src/library/translations/inst/en_GB/LC_MESSAGES/R.mo b/src/library/translations/inst/en_GB/LC_MESSAGES/R.mo
index cf967c7..19e2e08 100644
Binary files a/src/library/translations/inst/en_GB/LC_MESSAGES/R.mo and b/src/library/translations/inst/en_GB/LC_MESSAGES/R.mo differ
diff --git a/src/library/translations/inst/en_GB/LC_MESSAGES/grDevices.mo b/src/library/translations/inst/en_GB/LC_MESSAGES/grDevices.mo
index 1024693..5d95e5b 100644
Binary files a/src/library/translations/inst/en_GB/LC_MESSAGES/grDevices.mo and b/src/library/translations/inst/en_GB/LC_MESSAGES/grDevices.mo differ
diff --git a/src/library/translations/inst/es/LC_MESSAGES/R.mo b/src/library/translations/inst/es/LC_MESSAGES/R.mo
index 99a716b..1a9cf64 100644
Binary files a/src/library/translations/inst/es/LC_MESSAGES/R.mo and b/src/library/translations/inst/es/LC_MESSAGES/R.mo differ
diff --git a/src/library/translations/inst/es/LC_MESSAGES/RGui.mo b/src/library/translations/inst/es/LC_MESSAGES/RGui.mo
index 349441c..ea81a45 100644
Binary files a/src/library/translations/inst/es/LC_MESSAGES/RGui.mo and b/src/library/translations/inst/es/LC_MESSAGES/RGui.mo differ
diff --git a/src/library/translations/inst/es/LC_MESSAGES/graphics.mo b/src/library/translations/inst/es/LC_MESSAGES/graphics.mo
index a7170de..28a7c04 100644
Binary files a/src/library/translations/inst/es/LC_MESSAGES/graphics.mo and b/src/library/translations/inst/es/LC_MESSAGES/graphics.mo differ
diff --git a/src/library/translations/inst/fa/LC_MESSAGES/R-base.mo b/src/library/translations/inst/fa/LC_MESSAGES/R-base.mo
index 73c5462..f908ab2 100644
Binary files a/src/library/translations/inst/fa/LC_MESSAGES/R-base.mo and b/src/library/translations/inst/fa/LC_MESSAGES/R-base.mo differ
diff --git a/src/library/translations/inst/fa/LC_MESSAGES/R-utils.mo b/src/library/translations/inst/fa/LC_MESSAGES/R-utils.mo
index 387af29..f6bcdfd 100644
Binary files a/src/library/translations/inst/fa/LC_MESSAGES/R-utils.mo and b/src/library/translations/inst/fa/LC_MESSAGES/R-utils.mo differ
diff --git a/src/library/translations/inst/fa/LC_MESSAGES/R.mo b/src/library/translations/inst/fa/LC_MESSAGES/R.mo
index e684a87..2f9b0e1 100644
Binary files a/src/library/translations/inst/fa/LC_MESSAGES/R.mo and b/src/library/translations/inst/fa/LC_MESSAGES/R.mo differ
diff --git a/src/library/translations/inst/fa/LC_MESSAGES/RGui.mo b/src/library/translations/inst/fa/LC_MESSAGES/RGui.mo
index 47f7cdc..4de8a21 100644
Binary files a/src/library/translations/inst/fa/LC_MESSAGES/RGui.mo and b/src/library/translations/inst/fa/LC_MESSAGES/RGui.mo differ
diff --git a/src/library/translations/inst/fr/LC_MESSAGES/R-base.mo b/src/library/translations/inst/fr/LC_MESSAGES/R-base.mo
index 46d9c93..464c7ce 100644
Binary files a/src/library/translations/inst/fr/LC_MESSAGES/R-base.mo and b/src/library/translations/inst/fr/LC_MESSAGES/R-base.mo differ
diff --git a/src/library/translations/inst/fr/LC_MESSAGES/R-compiler.mo b/src/library/translations/inst/fr/LC_MESSAGES/R-compiler.mo
index c77a357..e41b387 100644
Binary files a/src/library/translations/inst/fr/LC_MESSAGES/R-compiler.mo and b/src/library/translations/inst/fr/LC_MESSAGES/R-compiler.mo differ
diff --git a/src/library/translations/inst/fr/LC_MESSAGES/R-grDevices.mo b/src/library/translations/inst/fr/LC_MESSAGES/R-grDevices.mo
index c7512c2..facb5bd 100644
Binary files a/src/library/translations/inst/fr/LC_MESSAGES/R-grDevices.mo and b/src/library/translations/inst/fr/LC_MESSAGES/R-grDevices.mo differ
diff --git a/src/library/translations/inst/fr/LC_MESSAGES/R-graphics.mo b/src/library/translations/inst/fr/LC_MESSAGES/R-graphics.mo
index ccabcbf..841bcb2 100644
Binary files a/src/library/translations/inst/fr/LC_MESSAGES/R-graphics.mo and b/src/library/translations/inst/fr/LC_MESSAGES/R-graphics.mo differ
diff --git a/src/library/translations/inst/fr/LC_MESSAGES/R-methods.mo b/src/library/translations/inst/fr/LC_MESSAGES/R-methods.mo
index 241e745..f5643eb 100644
Binary files a/src/library/translations/inst/fr/LC_MESSAGES/R-methods.mo and b/src/library/translations/inst/fr/LC_MESSAGES/R-methods.mo differ
diff --git a/src/library/translations/inst/fr/LC_MESSAGES/R-parallel.mo b/src/library/translations/inst/fr/LC_MESSAGES/R-parallel.mo
index 50ad96c..b8b8912 100644
Binary files a/src/library/translations/inst/fr/LC_MESSAGES/R-parallel.mo and b/src/library/translations/inst/fr/LC_MESSAGES/R-parallel.mo differ
diff --git a/src/library/translations/inst/fr/LC_MESSAGES/R-stats.mo b/src/library/translations/inst/fr/LC_MESSAGES/R-stats.mo
index ab282d6..fccc5af 100644
Binary files a/src/library/translations/inst/fr/LC_MESSAGES/R-stats.mo and b/src/library/translations/inst/fr/LC_MESSAGES/R-stats.mo differ
diff --git a/src/library/translations/inst/fr/LC_MESSAGES/R-tcltk.mo b/src/library/translations/inst/fr/LC_MESSAGES/R-tcltk.mo
index 3df8a58..89da81b 100644
Binary files a/src/library/translations/inst/fr/LC_MESSAGES/R-tcltk.mo and b/src/library/translations/inst/fr/LC_MESSAGES/R-tcltk.mo differ
diff --git a/src/library/translations/inst/fr/LC_MESSAGES/R-tools.mo b/src/library/translations/inst/fr/LC_MESSAGES/R-tools.mo
index ae16a38..7e8afdb 100644
Binary files a/src/library/translations/inst/fr/LC_MESSAGES/R-tools.mo and b/src/library/translations/inst/fr/LC_MESSAGES/R-tools.mo differ
diff --git a/src/library/translations/inst/fr/LC_MESSAGES/R-utils.mo b/src/library/translations/inst/fr/LC_MESSAGES/R-utils.mo
index 738342e..55a205b 100644
Binary files a/src/library/translations/inst/fr/LC_MESSAGES/R-utils.mo and b/src/library/translations/inst/fr/LC_MESSAGES/R-utils.mo differ
diff --git a/src/library/translations/inst/fr/LC_MESSAGES/R.mo b/src/library/translations/inst/fr/LC_MESSAGES/R.mo
index dcab5d4..2427857 100644
Binary files a/src/library/translations/inst/fr/LC_MESSAGES/R.mo and b/src/library/translations/inst/fr/LC_MESSAGES/R.mo differ
diff --git a/src/library/translations/inst/fr/LC_MESSAGES/RGui.mo b/src/library/translations/inst/fr/LC_MESSAGES/RGui.mo
index 8169694..273c6fd 100644
Binary files a/src/library/translations/inst/fr/LC_MESSAGES/RGui.mo and b/src/library/translations/inst/fr/LC_MESSAGES/RGui.mo differ
diff --git a/src/library/translations/inst/fr/LC_MESSAGES/grDevices.mo b/src/library/translations/inst/fr/LC_MESSAGES/grDevices.mo
index 20745ad..0db31cb 100644
Binary files a/src/library/translations/inst/fr/LC_MESSAGES/grDevices.mo and b/src/library/translations/inst/fr/LC_MESSAGES/grDevices.mo differ
diff --git a/src/library/translations/inst/fr/LC_MESSAGES/graphics.mo b/src/library/translations/inst/fr/LC_MESSAGES/graphics.mo
index 8e3c527..cf4a495 100644
Binary files a/src/library/translations/inst/fr/LC_MESSAGES/graphics.mo and b/src/library/translations/inst/fr/LC_MESSAGES/graphics.mo differ
diff --git a/src/library/translations/inst/fr/LC_MESSAGES/grid.mo b/src/library/translations/inst/fr/LC_MESSAGES/grid.mo
index 7d5f852..4a70d46 100644
Binary files a/src/library/translations/inst/fr/LC_MESSAGES/grid.mo and b/src/library/translations/inst/fr/LC_MESSAGES/grid.mo differ
diff --git a/src/library/translations/inst/fr/LC_MESSAGES/methods.mo b/src/library/translations/inst/fr/LC_MESSAGES/methods.mo
index 8a3f8cf..493b167 100644
Binary files a/src/library/translations/inst/fr/LC_MESSAGES/methods.mo and b/src/library/translations/inst/fr/LC_MESSAGES/methods.mo differ
diff --git a/src/library/translations/inst/fr/LC_MESSAGES/parallel.mo b/src/library/translations/inst/fr/LC_MESSAGES/parallel.mo
index 090268c..019eb8d 100644
Binary files a/src/library/translations/inst/fr/LC_MESSAGES/parallel.mo and b/src/library/translations/inst/fr/LC_MESSAGES/parallel.mo differ
diff --git a/src/library/translations/inst/fr/LC_MESSAGES/splines.mo b/src/library/translations/inst/fr/LC_MESSAGES/splines.mo
index 26c3258..bb25b75 100644
Binary files a/src/library/translations/inst/fr/LC_MESSAGES/splines.mo and b/src/library/translations/inst/fr/LC_MESSAGES/splines.mo differ
diff --git a/src/library/translations/inst/fr/LC_MESSAGES/stats.mo b/src/library/translations/inst/fr/LC_MESSAGES/stats.mo
index 3fb4509..b8e515a 100644
Binary files a/src/library/translations/inst/fr/LC_MESSAGES/stats.mo and b/src/library/translations/inst/fr/LC_MESSAGES/stats.mo differ
diff --git a/src/library/translations/inst/fr/LC_MESSAGES/tcltk.mo b/src/library/translations/inst/fr/LC_MESSAGES/tcltk.mo
index f5f2169..b6f02bb 100644
Binary files a/src/library/translations/inst/fr/LC_MESSAGES/tcltk.mo and b/src/library/translations/inst/fr/LC_MESSAGES/tcltk.mo differ
diff --git a/src/library/translations/inst/fr/LC_MESSAGES/tools.mo b/src/library/translations/inst/fr/LC_MESSAGES/tools.mo
index 8a57390..320fe5a 100644
Binary files a/src/library/translations/inst/fr/LC_MESSAGES/tools.mo and b/src/library/translations/inst/fr/LC_MESSAGES/tools.mo differ
diff --git a/src/library/translations/inst/it/LC_MESSAGES/R-base.mo b/src/library/translations/inst/it/LC_MESSAGES/R-base.mo
index 4b31eb9..84cd79b 100644
Binary files a/src/library/translations/inst/it/LC_MESSAGES/R-base.mo and b/src/library/translations/inst/it/LC_MESSAGES/R-base.mo differ
diff --git a/src/library/translations/inst/it/LC_MESSAGES/R-grDevices.mo b/src/library/translations/inst/it/LC_MESSAGES/R-grDevices.mo
index 6826778..2a582fe 100644
Binary files a/src/library/translations/inst/it/LC_MESSAGES/R-grDevices.mo and b/src/library/translations/inst/it/LC_MESSAGES/R-grDevices.mo differ
diff --git a/src/library/translations/inst/it/LC_MESSAGES/R-graphics.mo b/src/library/translations/inst/it/LC_MESSAGES/R-graphics.mo
index 858cdd4..db6456e 100644
Binary files a/src/library/translations/inst/it/LC_MESSAGES/R-graphics.mo and b/src/library/translations/inst/it/LC_MESSAGES/R-graphics.mo differ
diff --git a/src/library/translations/inst/it/LC_MESSAGES/R-stats.mo b/src/library/translations/inst/it/LC_MESSAGES/R-stats.mo
index a58a834..4bec835 100644
Binary files a/src/library/translations/inst/it/LC_MESSAGES/R-stats.mo and b/src/library/translations/inst/it/LC_MESSAGES/R-stats.mo differ
diff --git a/src/library/translations/inst/it/LC_MESSAGES/R-tcltk.mo b/src/library/translations/inst/it/LC_MESSAGES/R-tcltk.mo
index fa0f04d..141a11f 100644
Binary files a/src/library/translations/inst/it/LC_MESSAGES/R-tcltk.mo and b/src/library/translations/inst/it/LC_MESSAGES/R-tcltk.mo differ
diff --git a/src/library/translations/inst/it/LC_MESSAGES/R-tools.mo b/src/library/translations/inst/it/LC_MESSAGES/R-tools.mo
index 6e6b794..8d80dfb 100644
Binary files a/src/library/translations/inst/it/LC_MESSAGES/R-tools.mo and b/src/library/translations/inst/it/LC_MESSAGES/R-tools.mo differ
diff --git a/src/library/translations/inst/it/LC_MESSAGES/R.mo b/src/library/translations/inst/it/LC_MESSAGES/R.mo
index 484268f..bcfbe0d 100644
Binary files a/src/library/translations/inst/it/LC_MESSAGES/R.mo and b/src/library/translations/inst/it/LC_MESSAGES/R.mo differ
diff --git a/src/library/translations/inst/it/LC_MESSAGES/RGui.mo b/src/library/translations/inst/it/LC_MESSAGES/RGui.mo
index 9dd0bc0..e68fe9d 100644
Binary files a/src/library/translations/inst/it/LC_MESSAGES/RGui.mo and b/src/library/translations/inst/it/LC_MESSAGES/RGui.mo differ
diff --git a/src/library/translations/inst/it/LC_MESSAGES/grDevices.mo b/src/library/translations/inst/it/LC_MESSAGES/grDevices.mo
index 641ff21..85e30cf 100644
Binary files a/src/library/translations/inst/it/LC_MESSAGES/grDevices.mo and b/src/library/translations/inst/it/LC_MESSAGES/grDevices.mo differ
diff --git a/src/library/translations/inst/it/LC_MESSAGES/graphics.mo b/src/library/translations/inst/it/LC_MESSAGES/graphics.mo
index 34d97c1..7d9f43c 100644
Binary files a/src/library/translations/inst/it/LC_MESSAGES/graphics.mo and b/src/library/translations/inst/it/LC_MESSAGES/graphics.mo differ
diff --git a/src/library/translations/inst/it/LC_MESSAGES/grid.mo b/src/library/translations/inst/it/LC_MESSAGES/grid.mo
index 0236cc6..9f1482f 100644
Binary files a/src/library/translations/inst/it/LC_MESSAGES/grid.mo and b/src/library/translations/inst/it/LC_MESSAGES/grid.mo differ
diff --git a/src/library/translations/inst/it/LC_MESSAGES/stats.mo b/src/library/translations/inst/it/LC_MESSAGES/stats.mo
index 08ee701..0ba3b81 100644
Binary files a/src/library/translations/inst/it/LC_MESSAGES/stats.mo and b/src/library/translations/inst/it/LC_MESSAGES/stats.mo differ
diff --git a/src/library/translations/inst/it/LC_MESSAGES/tools.mo b/src/library/translations/inst/it/LC_MESSAGES/tools.mo
index 9e2fec3..4389451 100644
Binary files a/src/library/translations/inst/it/LC_MESSAGES/tools.mo and b/src/library/translations/inst/it/LC_MESSAGES/tools.mo differ
diff --git a/src/library/translations/inst/ja/LC_MESSAGES/R-base.mo b/src/library/translations/inst/ja/LC_MESSAGES/R-base.mo
index 01d646f..c742f62 100644
Binary files a/src/library/translations/inst/ja/LC_MESSAGES/R-base.mo and b/src/library/translations/inst/ja/LC_MESSAGES/R-base.mo differ
diff --git a/src/library/translations/inst/ja/LC_MESSAGES/R-compiler.mo b/src/library/translations/inst/ja/LC_MESSAGES/R-compiler.mo
index e959388..7656f82 100644
Binary files a/src/library/translations/inst/ja/LC_MESSAGES/R-compiler.mo and b/src/library/translations/inst/ja/LC_MESSAGES/R-compiler.mo differ
diff --git a/src/library/translations/inst/ja/LC_MESSAGES/R-grDevices.mo b/src/library/translations/inst/ja/LC_MESSAGES/R-grDevices.mo
index ddffd98..102f74e 100644
Binary files a/src/library/translations/inst/ja/LC_MESSAGES/R-grDevices.mo and b/src/library/translations/inst/ja/LC_MESSAGES/R-grDevices.mo differ
diff --git a/src/library/translations/inst/ja/LC_MESSAGES/R-graphics.mo b/src/library/translations/inst/ja/LC_MESSAGES/R-graphics.mo
index 567f4d7..66fa713 100644
Binary files a/src/library/translations/inst/ja/LC_MESSAGES/R-graphics.mo and b/src/library/translations/inst/ja/LC_MESSAGES/R-graphics.mo differ
diff --git a/src/library/translations/inst/ja/LC_MESSAGES/R-grid.mo b/src/library/translations/inst/ja/LC_MESSAGES/R-grid.mo
index 969d10b..83f23ce 100644
Binary files a/src/library/translations/inst/ja/LC_MESSAGES/R-grid.mo and b/src/library/translations/inst/ja/LC_MESSAGES/R-grid.mo differ
diff --git a/src/library/translations/inst/ja/LC_MESSAGES/R-methods.mo b/src/library/translations/inst/ja/LC_MESSAGES/R-methods.mo
index 1fc046b..e6ee08f 100644
Binary files a/src/library/translations/inst/ja/LC_MESSAGES/R-methods.mo and b/src/library/translations/inst/ja/LC_MESSAGES/R-methods.mo differ
diff --git a/src/library/translations/inst/ja/LC_MESSAGES/R-splines.mo b/src/library/translations/inst/ja/LC_MESSAGES/R-splines.mo
index f3f61d1..37f60d3 100644
Binary files a/src/library/translations/inst/ja/LC_MESSAGES/R-splines.mo and b/src/library/translations/inst/ja/LC_MESSAGES/R-splines.mo differ
diff --git a/src/library/translations/inst/ja/LC_MESSAGES/R-stats.mo b/src/library/translations/inst/ja/LC_MESSAGES/R-stats.mo
index 77cf278..d07b5b6 100644
Binary files a/src/library/translations/inst/ja/LC_MESSAGES/R-stats.mo and b/src/library/translations/inst/ja/LC_MESSAGES/R-stats.mo differ
diff --git a/src/library/translations/inst/ja/LC_MESSAGES/R-stats4.mo b/src/library/translations/inst/ja/LC_MESSAGES/R-stats4.mo
index 6e4b51a..e6e4675 100644
Binary files a/src/library/translations/inst/ja/LC_MESSAGES/R-stats4.mo and b/src/library/translations/inst/ja/LC_MESSAGES/R-stats4.mo differ
diff --git a/src/library/translations/inst/ja/LC_MESSAGES/R-tcltk.mo b/src/library/translations/inst/ja/LC_MESSAGES/R-tcltk.mo
index 0d37388..2bb1472 100644
Binary files a/src/library/translations/inst/ja/LC_MESSAGES/R-tcltk.mo and b/src/library/translations/inst/ja/LC_MESSAGES/R-tcltk.mo differ
diff --git a/src/library/translations/inst/ja/LC_MESSAGES/R-tools.mo b/src/library/translations/inst/ja/LC_MESSAGES/R-tools.mo
index 2868df8..fe671a9 100644
Binary files a/src/library/translations/inst/ja/LC_MESSAGES/R-tools.mo and b/src/library/translations/inst/ja/LC_MESSAGES/R-tools.mo differ
diff --git a/src/library/translations/inst/ja/LC_MESSAGES/R-utils.mo b/src/library/translations/inst/ja/LC_MESSAGES/R-utils.mo
index a81cc0b..4600c89 100644
Binary files a/src/library/translations/inst/ja/LC_MESSAGES/R-utils.mo and b/src/library/translations/inst/ja/LC_MESSAGES/R-utils.mo differ
diff --git a/src/library/translations/inst/ja/LC_MESSAGES/R.mo b/src/library/translations/inst/ja/LC_MESSAGES/R.mo
index 2252733..8002d91 100644
Binary files a/src/library/translations/inst/ja/LC_MESSAGES/R.mo and b/src/library/translations/inst/ja/LC_MESSAGES/R.mo differ
diff --git a/src/library/translations/inst/ja/LC_MESSAGES/RGui.mo b/src/library/translations/inst/ja/LC_MESSAGES/RGui.mo
index fddfaa9..372ca27 100644
Binary files a/src/library/translations/inst/ja/LC_MESSAGES/RGui.mo and b/src/library/translations/inst/ja/LC_MESSAGES/RGui.mo differ
diff --git a/src/library/translations/inst/ja/LC_MESSAGES/grDevices.mo b/src/library/translations/inst/ja/LC_MESSAGES/grDevices.mo
index 37a03b4..fbf0316 100644
Binary files a/src/library/translations/inst/ja/LC_MESSAGES/grDevices.mo and b/src/library/translations/inst/ja/LC_MESSAGES/grDevices.mo differ
diff --git a/src/library/translations/inst/ja/LC_MESSAGES/graphics.mo b/src/library/translations/inst/ja/LC_MESSAGES/graphics.mo
index 9d5c5e2..0f72eb9 100644
Binary files a/src/library/translations/inst/ja/LC_MESSAGES/graphics.mo and b/src/library/translations/inst/ja/LC_MESSAGES/graphics.mo differ
diff --git a/src/library/translations/inst/ja/LC_MESSAGES/grid.mo b/src/library/translations/inst/ja/LC_MESSAGES/grid.mo
index ece0f92..9a399bc 100644
Binary files a/src/library/translations/inst/ja/LC_MESSAGES/grid.mo and b/src/library/translations/inst/ja/LC_MESSAGES/grid.mo differ
diff --git a/src/library/translations/inst/ja/LC_MESSAGES/methods.mo b/src/library/translations/inst/ja/LC_MESSAGES/methods.mo
index 5fc6630..de98a15 100644
Binary files a/src/library/translations/inst/ja/LC_MESSAGES/methods.mo and b/src/library/translations/inst/ja/LC_MESSAGES/methods.mo differ
diff --git a/src/library/translations/inst/ja/LC_MESSAGES/splines.mo b/src/library/translations/inst/ja/LC_MESSAGES/splines.mo
index ba62d0d..a0d2930 100644
Binary files a/src/library/translations/inst/ja/LC_MESSAGES/splines.mo and b/src/library/translations/inst/ja/LC_MESSAGES/splines.mo differ
diff --git a/src/library/translations/inst/ja/LC_MESSAGES/stats.mo b/src/library/translations/inst/ja/LC_MESSAGES/stats.mo
index e0354fe..78222f6 100644
Binary files a/src/library/translations/inst/ja/LC_MESSAGES/stats.mo and b/src/library/translations/inst/ja/LC_MESSAGES/stats.mo differ
diff --git a/src/library/translations/inst/ja/LC_MESSAGES/tcltk.mo b/src/library/translations/inst/ja/LC_MESSAGES/tcltk.mo
index 7b26636..c4d6646 100644
Binary files a/src/library/translations/inst/ja/LC_MESSAGES/tcltk.mo and b/src/library/translations/inst/ja/LC_MESSAGES/tcltk.mo differ
diff --git a/src/library/translations/inst/ja/LC_MESSAGES/tools.mo b/src/library/translations/inst/ja/LC_MESSAGES/tools.mo
index a21596e..fe6e25d 100644
Binary files a/src/library/translations/inst/ja/LC_MESSAGES/tools.mo and b/src/library/translations/inst/ja/LC_MESSAGES/tools.mo differ
diff --git a/src/library/translations/inst/ko/LC_MESSAGES/R-base.mo b/src/library/translations/inst/ko/LC_MESSAGES/R-base.mo
index 4218535..e327c6e 100644
Binary files a/src/library/translations/inst/ko/LC_MESSAGES/R-base.mo and b/src/library/translations/inst/ko/LC_MESSAGES/R-base.mo differ
diff --git a/src/library/translations/inst/ko/LC_MESSAGES/R-compiler.mo b/src/library/translations/inst/ko/LC_MESSAGES/R-compiler.mo
index a1aec97..c1bf0dc 100644
Binary files a/src/library/translations/inst/ko/LC_MESSAGES/R-compiler.mo and b/src/library/translations/inst/ko/LC_MESSAGES/R-compiler.mo differ
diff --git a/src/library/translations/inst/ko/LC_MESSAGES/R-grDevices.mo b/src/library/translations/inst/ko/LC_MESSAGES/R-grDevices.mo
index cf4ce05..d2bf535 100644
Binary files a/src/library/translations/inst/ko/LC_MESSAGES/R-grDevices.mo and b/src/library/translations/inst/ko/LC_MESSAGES/R-grDevices.mo differ
diff --git a/src/library/translations/inst/ko/LC_MESSAGES/R-graphics.mo b/src/library/translations/inst/ko/LC_MESSAGES/R-graphics.mo
index 4379fff..ebc3c0d 100644
Binary files a/src/library/translations/inst/ko/LC_MESSAGES/R-graphics.mo and b/src/library/translations/inst/ko/LC_MESSAGES/R-graphics.mo differ
diff --git a/src/library/translations/inst/ko/LC_MESSAGES/R-grid.mo b/src/library/translations/inst/ko/LC_MESSAGES/R-grid.mo
index df03753..f9f79f4 100644
Binary files a/src/library/translations/inst/ko/LC_MESSAGES/R-grid.mo and b/src/library/translations/inst/ko/LC_MESSAGES/R-grid.mo differ
diff --git a/src/library/translations/inst/ko/LC_MESSAGES/R-methods.mo b/src/library/translations/inst/ko/LC_MESSAGES/R-methods.mo
index 2a56360..a06dafb 100644
Binary files a/src/library/translations/inst/ko/LC_MESSAGES/R-methods.mo and b/src/library/translations/inst/ko/LC_MESSAGES/R-methods.mo differ
diff --git a/src/library/translations/inst/ko/LC_MESSAGES/R-parallel.mo b/src/library/translations/inst/ko/LC_MESSAGES/R-parallel.mo
index 6c0cb8e..8c7809a 100644
Binary files a/src/library/translations/inst/ko/LC_MESSAGES/R-parallel.mo and b/src/library/translations/inst/ko/LC_MESSAGES/R-parallel.mo differ
diff --git a/src/library/translations/inst/ko/LC_MESSAGES/R-splines.mo b/src/library/translations/inst/ko/LC_MESSAGES/R-splines.mo
index 1dca5bd..a011e0c 100644
Binary files a/src/library/translations/inst/ko/LC_MESSAGES/R-splines.mo and b/src/library/translations/inst/ko/LC_MESSAGES/R-splines.mo differ
diff --git a/src/library/translations/inst/ko/LC_MESSAGES/R-stats.mo b/src/library/translations/inst/ko/LC_MESSAGES/R-stats.mo
index 5aa0fc8..ab990b1 100644
Binary files a/src/library/translations/inst/ko/LC_MESSAGES/R-stats.mo and b/src/library/translations/inst/ko/LC_MESSAGES/R-stats.mo differ
diff --git a/src/library/translations/inst/ko/LC_MESSAGES/R-stats4.mo b/src/library/translations/inst/ko/LC_MESSAGES/R-stats4.mo
index ceec33d..a9c9b57 100644
Binary files a/src/library/translations/inst/ko/LC_MESSAGES/R-stats4.mo and b/src/library/translations/inst/ko/LC_MESSAGES/R-stats4.mo differ
diff --git a/src/library/translations/inst/ko/LC_MESSAGES/R-tcltk.mo b/src/library/translations/inst/ko/LC_MESSAGES/R-tcltk.mo
index b9d9681..ccf795c 100644
Binary files a/src/library/translations/inst/ko/LC_MESSAGES/R-tcltk.mo and b/src/library/translations/inst/ko/LC_MESSAGES/R-tcltk.mo differ
diff --git a/src/library/translations/inst/ko/LC_MESSAGES/R-tools.mo b/src/library/translations/inst/ko/LC_MESSAGES/R-tools.mo
index 5fa9cc9..8bcf9b2 100644
Binary files a/src/library/translations/inst/ko/LC_MESSAGES/R-tools.mo and b/src/library/translations/inst/ko/LC_MESSAGES/R-tools.mo differ
diff --git a/src/library/translations/inst/ko/LC_MESSAGES/R-utils.mo b/src/library/translations/inst/ko/LC_MESSAGES/R-utils.mo
index ecbc63d..c0a8a56 100644
Binary files a/src/library/translations/inst/ko/LC_MESSAGES/R-utils.mo and b/src/library/translations/inst/ko/LC_MESSAGES/R-utils.mo differ
diff --git a/src/library/translations/inst/ko/LC_MESSAGES/R.mo b/src/library/translations/inst/ko/LC_MESSAGES/R.mo
index 6f9169a..675e6d2 100644
Binary files a/src/library/translations/inst/ko/LC_MESSAGES/R.mo and b/src/library/translations/inst/ko/LC_MESSAGES/R.mo differ
diff --git a/src/library/translations/inst/ko/LC_MESSAGES/RGui.mo b/src/library/translations/inst/ko/LC_MESSAGES/RGui.mo
index b9e41e1..9b256c2 100644
Binary files a/src/library/translations/inst/ko/LC_MESSAGES/RGui.mo and b/src/library/translations/inst/ko/LC_MESSAGES/RGui.mo differ
diff --git a/src/library/translations/inst/ko/LC_MESSAGES/grDevices.mo b/src/library/translations/inst/ko/LC_MESSAGES/grDevices.mo
index 6b8744e..c7c88f6 100644
Binary files a/src/library/translations/inst/ko/LC_MESSAGES/grDevices.mo and b/src/library/translations/inst/ko/LC_MESSAGES/grDevices.mo differ
diff --git a/src/library/translations/inst/ko/LC_MESSAGES/graphics.mo b/src/library/translations/inst/ko/LC_MESSAGES/graphics.mo
index 44ecb9d..25f8a2c 100644
Binary files a/src/library/translations/inst/ko/LC_MESSAGES/graphics.mo and b/src/library/translations/inst/ko/LC_MESSAGES/graphics.mo differ
diff --git a/src/library/translations/inst/ko/LC_MESSAGES/grid.mo b/src/library/translations/inst/ko/LC_MESSAGES/grid.mo
index 6290012..86afabc 100644
Binary files a/src/library/translations/inst/ko/LC_MESSAGES/grid.mo and b/src/library/translations/inst/ko/LC_MESSAGES/grid.mo differ
diff --git a/src/library/translations/inst/ko/LC_MESSAGES/methods.mo b/src/library/translations/inst/ko/LC_MESSAGES/methods.mo
index 733d662..9e138d6 100644
Binary files a/src/library/translations/inst/ko/LC_MESSAGES/methods.mo and b/src/library/translations/inst/ko/LC_MESSAGES/methods.mo differ
diff --git a/src/library/translations/inst/ko/LC_MESSAGES/parallel.mo b/src/library/translations/inst/ko/LC_MESSAGES/parallel.mo
index 1466729..32ed6f9 100644
Binary files a/src/library/translations/inst/ko/LC_MESSAGES/parallel.mo and b/src/library/translations/inst/ko/LC_MESSAGES/parallel.mo differ
diff --git a/src/library/translations/inst/ko/LC_MESSAGES/splines.mo b/src/library/translations/inst/ko/LC_MESSAGES/splines.mo
index c97cd1f..843c524 100644
Binary files a/src/library/translations/inst/ko/LC_MESSAGES/splines.mo and b/src/library/translations/inst/ko/LC_MESSAGES/splines.mo differ
diff --git a/src/library/translations/inst/ko/LC_MESSAGES/stats.mo b/src/library/translations/inst/ko/LC_MESSAGES/stats.mo
index dec1278..3599ee4 100644
Binary files a/src/library/translations/inst/ko/LC_MESSAGES/stats.mo and b/src/library/translations/inst/ko/LC_MESSAGES/stats.mo differ
diff --git a/src/library/translations/inst/ko/LC_MESSAGES/tcltk.mo b/src/library/translations/inst/ko/LC_MESSAGES/tcltk.mo
index 5be60b5..ef9904c 100644
Binary files a/src/library/translations/inst/ko/LC_MESSAGES/tcltk.mo and b/src/library/translations/inst/ko/LC_MESSAGES/tcltk.mo differ
diff --git a/src/library/translations/inst/ko/LC_MESSAGES/tools.mo b/src/library/translations/inst/ko/LC_MESSAGES/tools.mo
index d156a9d..b95c796 100644
Binary files a/src/library/translations/inst/ko/LC_MESSAGES/tools.mo and b/src/library/translations/inst/ko/LC_MESSAGES/tools.mo differ
diff --git a/src/library/translations/inst/ko/LC_MESSAGES/utils.mo b/src/library/translations/inst/ko/LC_MESSAGES/utils.mo
index 0710732..38f9650 100644
Binary files a/src/library/translations/inst/ko/LC_MESSAGES/utils.mo and b/src/library/translations/inst/ko/LC_MESSAGES/utils.mo differ
diff --git a/src/library/translations/inst/nn/LC_MESSAGES/R-base.mo b/src/library/translations/inst/nn/LC_MESSAGES/R-base.mo
index 64b02c3..8bd1bca 100644
Binary files a/src/library/translations/inst/nn/LC_MESSAGES/R-base.mo and b/src/library/translations/inst/nn/LC_MESSAGES/R-base.mo differ
diff --git a/src/library/translations/inst/nn/LC_MESSAGES/R.mo b/src/library/translations/inst/nn/LC_MESSAGES/R.mo
index 8b65e81..d9566c8 100644
Binary files a/src/library/translations/inst/nn/LC_MESSAGES/R.mo and b/src/library/translations/inst/nn/LC_MESSAGES/R.mo differ
diff --git a/src/library/translations/inst/nn/LC_MESSAGES/RGui.mo b/src/library/translations/inst/nn/LC_MESSAGES/RGui.mo
index eb9ece4..c4e22cc 100644
Binary files a/src/library/translations/inst/nn/LC_MESSAGES/RGui.mo and b/src/library/translations/inst/nn/LC_MESSAGES/RGui.mo differ
diff --git a/src/library/translations/inst/nn/LC_MESSAGES/graphics.mo b/src/library/translations/inst/nn/LC_MESSAGES/graphics.mo
index aeb60fb..71ebfe2 100644
Binary files a/src/library/translations/inst/nn/LC_MESSAGES/graphics.mo and b/src/library/translations/inst/nn/LC_MESSAGES/graphics.mo differ
diff --git a/src/library/translations/inst/pl/LC_MESSAGES/R-base.mo b/src/library/translations/inst/pl/LC_MESSAGES/R-base.mo
index fbb36ff..6e7f7af 100644
Binary files a/src/library/translations/inst/pl/LC_MESSAGES/R-base.mo and b/src/library/translations/inst/pl/LC_MESSAGES/R-base.mo differ
diff --git a/src/library/translations/inst/pl/LC_MESSAGES/R-compiler.mo b/src/library/translations/inst/pl/LC_MESSAGES/R-compiler.mo
index 37e1752..491452b 100644
Binary files a/src/library/translations/inst/pl/LC_MESSAGES/R-compiler.mo and b/src/library/translations/inst/pl/LC_MESSAGES/R-compiler.mo differ
diff --git a/src/library/translations/inst/pl/LC_MESSAGES/R-grDevices.mo b/src/library/translations/inst/pl/LC_MESSAGES/R-grDevices.mo
index c92c8f3..3b347e3 100644
Binary files a/src/library/translations/inst/pl/LC_MESSAGES/R-grDevices.mo and b/src/library/translations/inst/pl/LC_MESSAGES/R-grDevices.mo differ
diff --git a/src/library/translations/inst/pl/LC_MESSAGES/R-graphics.mo b/src/library/translations/inst/pl/LC_MESSAGES/R-graphics.mo
index 1ceb474..aa10a04 100644
Binary files a/src/library/translations/inst/pl/LC_MESSAGES/R-graphics.mo and b/src/library/translations/inst/pl/LC_MESSAGES/R-graphics.mo differ
diff --git a/src/library/translations/inst/pl/LC_MESSAGES/R-grid.mo b/src/library/translations/inst/pl/LC_MESSAGES/R-grid.mo
index d0a2192..bebe5e5 100644
Binary files a/src/library/translations/inst/pl/LC_MESSAGES/R-grid.mo and b/src/library/translations/inst/pl/LC_MESSAGES/R-grid.mo differ
diff --git a/src/library/translations/inst/pl/LC_MESSAGES/R-methods.mo b/src/library/translations/inst/pl/LC_MESSAGES/R-methods.mo
index 787d290..5e423ed 100644
Binary files a/src/library/translations/inst/pl/LC_MESSAGES/R-methods.mo and b/src/library/translations/inst/pl/LC_MESSAGES/R-methods.mo differ
diff --git a/src/library/translations/inst/pl/LC_MESSAGES/R-parallel.mo b/src/library/translations/inst/pl/LC_MESSAGES/R-parallel.mo
index 827539a..537d5a9 100644
Binary files a/src/library/translations/inst/pl/LC_MESSAGES/R-parallel.mo and b/src/library/translations/inst/pl/LC_MESSAGES/R-parallel.mo differ
diff --git a/src/library/translations/inst/pl/LC_MESSAGES/R-splines.mo b/src/library/translations/inst/pl/LC_MESSAGES/R-splines.mo
index 60c3f30..d4daf20 100644
Binary files a/src/library/translations/inst/pl/LC_MESSAGES/R-splines.mo and b/src/library/translations/inst/pl/LC_MESSAGES/R-splines.mo differ
diff --git a/src/library/translations/inst/pl/LC_MESSAGES/R-stats.mo b/src/library/translations/inst/pl/LC_MESSAGES/R-stats.mo
index 78c15b0..ff78cba 100644
Binary files a/src/library/translations/inst/pl/LC_MESSAGES/R-stats.mo and b/src/library/translations/inst/pl/LC_MESSAGES/R-stats.mo differ
diff --git a/src/library/translations/inst/pl/LC_MESSAGES/R-stats4.mo b/src/library/translations/inst/pl/LC_MESSAGES/R-stats4.mo
index 361ebd3..a73ad7d 100644
Binary files a/src/library/translations/inst/pl/LC_MESSAGES/R-stats4.mo and b/src/library/translations/inst/pl/LC_MESSAGES/R-stats4.mo differ
diff --git a/src/library/translations/inst/pl/LC_MESSAGES/R-tcltk.mo b/src/library/translations/inst/pl/LC_MESSAGES/R-tcltk.mo
index 6789370..0b1948a 100644
Binary files a/src/library/translations/inst/pl/LC_MESSAGES/R-tcltk.mo and b/src/library/translations/inst/pl/LC_MESSAGES/R-tcltk.mo differ
diff --git a/src/library/translations/inst/pl/LC_MESSAGES/R-tools.mo b/src/library/translations/inst/pl/LC_MESSAGES/R-tools.mo
index 02c714b..13b3ee1 100644
Binary files a/src/library/translations/inst/pl/LC_MESSAGES/R-tools.mo and b/src/library/translations/inst/pl/LC_MESSAGES/R-tools.mo differ
diff --git a/src/library/translations/inst/pl/LC_MESSAGES/R-utils.mo b/src/library/translations/inst/pl/LC_MESSAGES/R-utils.mo
index 353b492..f37e816 100644
Binary files a/src/library/translations/inst/pl/LC_MESSAGES/R-utils.mo and b/src/library/translations/inst/pl/LC_MESSAGES/R-utils.mo differ
diff --git a/src/library/translations/inst/pl/LC_MESSAGES/R.mo b/src/library/translations/inst/pl/LC_MESSAGES/R.mo
index 4150472..e97c893 100644
Binary files a/src/library/translations/inst/pl/LC_MESSAGES/R.mo and b/src/library/translations/inst/pl/LC_MESSAGES/R.mo differ
diff --git a/src/library/translations/inst/pl/LC_MESSAGES/RGui.mo b/src/library/translations/inst/pl/LC_MESSAGES/RGui.mo
index abdda61..3b1aa0a 100644
Binary files a/src/library/translations/inst/pl/LC_MESSAGES/RGui.mo and b/src/library/translations/inst/pl/LC_MESSAGES/RGui.mo differ
diff --git a/src/library/translations/inst/pl/LC_MESSAGES/grDevices.mo b/src/library/translations/inst/pl/LC_MESSAGES/grDevices.mo
index 2e9ea22..3552ce1 100644
Binary files a/src/library/translations/inst/pl/LC_MESSAGES/grDevices.mo and b/src/library/translations/inst/pl/LC_MESSAGES/grDevices.mo differ
diff --git a/src/library/translations/inst/pl/LC_MESSAGES/graphics.mo b/src/library/translations/inst/pl/LC_MESSAGES/graphics.mo
index 015f8b6..baa1e0d 100644
Binary files a/src/library/translations/inst/pl/LC_MESSAGES/graphics.mo and b/src/library/translations/inst/pl/LC_MESSAGES/graphics.mo differ
diff --git a/src/library/translations/inst/pl/LC_MESSAGES/grid.mo b/src/library/translations/inst/pl/LC_MESSAGES/grid.mo
index d5ef428..1ef87e4 100644
Binary files a/src/library/translations/inst/pl/LC_MESSAGES/grid.mo and b/src/library/translations/inst/pl/LC_MESSAGES/grid.mo differ
diff --git a/src/library/translations/inst/pl/LC_MESSAGES/methods.mo b/src/library/translations/inst/pl/LC_MESSAGES/methods.mo
index 1659b05..a6ece14 100644
Binary files a/src/library/translations/inst/pl/LC_MESSAGES/methods.mo and b/src/library/translations/inst/pl/LC_MESSAGES/methods.mo differ
diff --git a/src/library/translations/inst/pl/LC_MESSAGES/parallel.mo b/src/library/translations/inst/pl/LC_MESSAGES/parallel.mo
index aa8f760..4e70c63 100644
Binary files a/src/library/translations/inst/pl/LC_MESSAGES/parallel.mo and b/src/library/translations/inst/pl/LC_MESSAGES/parallel.mo differ
diff --git a/src/library/translations/inst/pl/LC_MESSAGES/splines.mo b/src/library/translations/inst/pl/LC_MESSAGES/splines.mo
index 2cf5877..8e306bb 100644
Binary files a/src/library/translations/inst/pl/LC_MESSAGES/splines.mo and b/src/library/translations/inst/pl/LC_MESSAGES/splines.mo differ
diff --git a/src/library/translations/inst/pl/LC_MESSAGES/stats.mo b/src/library/translations/inst/pl/LC_MESSAGES/stats.mo
index fcc9bda..4b08aad 100644
Binary files a/src/library/translations/inst/pl/LC_MESSAGES/stats.mo and b/src/library/translations/inst/pl/LC_MESSAGES/stats.mo differ
diff --git a/src/library/translations/inst/pl/LC_MESSAGES/tcltk.mo b/src/library/translations/inst/pl/LC_MESSAGES/tcltk.mo
index b068f43..857562d 100644
Binary files a/src/library/translations/inst/pl/LC_MESSAGES/tcltk.mo and b/src/library/translations/inst/pl/LC_MESSAGES/tcltk.mo differ
diff --git a/src/library/translations/inst/pl/LC_MESSAGES/tools.mo b/src/library/translations/inst/pl/LC_MESSAGES/tools.mo
index e801726..43cf252 100644
Binary files a/src/library/translations/inst/pl/LC_MESSAGES/tools.mo and b/src/library/translations/inst/pl/LC_MESSAGES/tools.mo differ
diff --git a/src/library/translations/inst/pl/LC_MESSAGES/utils.mo b/src/library/translations/inst/pl/LC_MESSAGES/utils.mo
index bc310c6..3c86d67 100644
Binary files a/src/library/translations/inst/pl/LC_MESSAGES/utils.mo and b/src/library/translations/inst/pl/LC_MESSAGES/utils.mo differ
diff --git a/src/library/translations/inst/pt_BR/LC_MESSAGES/R-base.mo b/src/library/translations/inst/pt_BR/LC_MESSAGES/R-base.mo
index b9ef805..f439b28 100644
Binary files a/src/library/translations/inst/pt_BR/LC_MESSAGES/R-base.mo and b/src/library/translations/inst/pt_BR/LC_MESSAGES/R-base.mo differ
diff --git a/src/library/translations/inst/pt_BR/LC_MESSAGES/R-compiler.mo b/src/library/translations/inst/pt_BR/LC_MESSAGES/R-compiler.mo
index 4e42f0f..5af382c 100644
Binary files a/src/library/translations/inst/pt_BR/LC_MESSAGES/R-compiler.mo and b/src/library/translations/inst/pt_BR/LC_MESSAGES/R-compiler.mo differ
diff --git a/src/library/translations/inst/pt_BR/LC_MESSAGES/R-grDevices.mo b/src/library/translations/inst/pt_BR/LC_MESSAGES/R-grDevices.mo
index b2a4282..24f32b9 100644
Binary files a/src/library/translations/inst/pt_BR/LC_MESSAGES/R-grDevices.mo and b/src/library/translations/inst/pt_BR/LC_MESSAGES/R-grDevices.mo differ
diff --git a/src/library/translations/inst/pt_BR/LC_MESSAGES/R-graphics.mo b/src/library/translations/inst/pt_BR/LC_MESSAGES/R-graphics.mo
index 62b15ca..1e8b342 100644
Binary files a/src/library/translations/inst/pt_BR/LC_MESSAGES/R-graphics.mo and b/src/library/translations/inst/pt_BR/LC_MESSAGES/R-graphics.mo differ
diff --git a/src/library/translations/inst/pt_BR/LC_MESSAGES/R-methods.mo b/src/library/translations/inst/pt_BR/LC_MESSAGES/R-methods.mo
index 9674a80..7c5a426 100644
Binary files a/src/library/translations/inst/pt_BR/LC_MESSAGES/R-methods.mo and b/src/library/translations/inst/pt_BR/LC_MESSAGES/R-methods.mo differ
diff --git a/src/library/translations/inst/pt_BR/LC_MESSAGES/R-splines.mo b/src/library/translations/inst/pt_BR/LC_MESSAGES/R-splines.mo
index 655a2b5..3038777 100644
Binary files a/src/library/translations/inst/pt_BR/LC_MESSAGES/R-splines.mo and b/src/library/translations/inst/pt_BR/LC_MESSAGES/R-splines.mo differ
diff --git a/src/library/translations/inst/pt_BR/LC_MESSAGES/R-stats.mo b/src/library/translations/inst/pt_BR/LC_MESSAGES/R-stats.mo
index bb43140..d6bfe18 100644
Binary files a/src/library/translations/inst/pt_BR/LC_MESSAGES/R-stats.mo and b/src/library/translations/inst/pt_BR/LC_MESSAGES/R-stats.mo differ
diff --git a/src/library/translations/inst/pt_BR/LC_MESSAGES/R-tcltk.mo b/src/library/translations/inst/pt_BR/LC_MESSAGES/R-tcltk.mo
index dfd19c3..659cd75 100644
Binary files a/src/library/translations/inst/pt_BR/LC_MESSAGES/R-tcltk.mo and b/src/library/translations/inst/pt_BR/LC_MESSAGES/R-tcltk.mo differ
diff --git a/src/library/translations/inst/pt_BR/LC_MESSAGES/R-tools.mo b/src/library/translations/inst/pt_BR/LC_MESSAGES/R-tools.mo
index c1afa37..0217868 100644
Binary files a/src/library/translations/inst/pt_BR/LC_MESSAGES/R-tools.mo and b/src/library/translations/inst/pt_BR/LC_MESSAGES/R-tools.mo differ
diff --git a/src/library/translations/inst/pt_BR/LC_MESSAGES/R-utils.mo b/src/library/translations/inst/pt_BR/LC_MESSAGES/R-utils.mo
index 7d787a4..7b0da68 100644
Binary files a/src/library/translations/inst/pt_BR/LC_MESSAGES/R-utils.mo and b/src/library/translations/inst/pt_BR/LC_MESSAGES/R-utils.mo differ
diff --git a/src/library/translations/inst/pt_BR/LC_MESSAGES/R.mo b/src/library/translations/inst/pt_BR/LC_MESSAGES/R.mo
index 0027d2f..ac64716 100644
Binary files a/src/library/translations/inst/pt_BR/LC_MESSAGES/R.mo and b/src/library/translations/inst/pt_BR/LC_MESSAGES/R.mo differ
diff --git a/src/library/translations/inst/pt_BR/LC_MESSAGES/RGui.mo b/src/library/translations/inst/pt_BR/LC_MESSAGES/RGui.mo
index 938d3a0..c893980 100644
Binary files a/src/library/translations/inst/pt_BR/LC_MESSAGES/RGui.mo and b/src/library/translations/inst/pt_BR/LC_MESSAGES/RGui.mo differ
diff --git a/src/library/translations/inst/pt_BR/LC_MESSAGES/grDevices.mo b/src/library/translations/inst/pt_BR/LC_MESSAGES/grDevices.mo
index 053ea9a..76344bf 100644
Binary files a/src/library/translations/inst/pt_BR/LC_MESSAGES/grDevices.mo and b/src/library/translations/inst/pt_BR/LC_MESSAGES/grDevices.mo differ
diff --git a/src/library/translations/inst/pt_BR/LC_MESSAGES/graphics.mo b/src/library/translations/inst/pt_BR/LC_MESSAGES/graphics.mo
index faefcfb..28d7dd3 100644
Binary files a/src/library/translations/inst/pt_BR/LC_MESSAGES/graphics.mo and b/src/library/translations/inst/pt_BR/LC_MESSAGES/graphics.mo differ
diff --git a/src/library/translations/inst/pt_BR/LC_MESSAGES/grid.mo b/src/library/translations/inst/pt_BR/LC_MESSAGES/grid.mo
index 8cedfae..2fc6ba1 100644
Binary files a/src/library/translations/inst/pt_BR/LC_MESSAGES/grid.mo and b/src/library/translations/inst/pt_BR/LC_MESSAGES/grid.mo differ
diff --git a/src/library/translations/inst/pt_BR/LC_MESSAGES/methods.mo b/src/library/translations/inst/pt_BR/LC_MESSAGES/methods.mo
index 029a967..9f08ced 100644
Binary files a/src/library/translations/inst/pt_BR/LC_MESSAGES/methods.mo and b/src/library/translations/inst/pt_BR/LC_MESSAGES/methods.mo differ
diff --git a/src/library/translations/inst/pt_BR/LC_MESSAGES/splines.mo b/src/library/translations/inst/pt_BR/LC_MESSAGES/splines.mo
index 952c1a0..29bc22e 100644
Binary files a/src/library/translations/inst/pt_BR/LC_MESSAGES/splines.mo and b/src/library/translations/inst/pt_BR/LC_MESSAGES/splines.mo differ
diff --git a/src/library/translations/inst/pt_BR/LC_MESSAGES/stats.mo b/src/library/translations/inst/pt_BR/LC_MESSAGES/stats.mo
index 9a01af6..ad3b881 100644
Binary files a/src/library/translations/inst/pt_BR/LC_MESSAGES/stats.mo and b/src/library/translations/inst/pt_BR/LC_MESSAGES/stats.mo differ
diff --git a/src/library/translations/inst/pt_BR/LC_MESSAGES/tcltk.mo b/src/library/translations/inst/pt_BR/LC_MESSAGES/tcltk.mo
index 322bc3c..08a9809 100644
Binary files a/src/library/translations/inst/pt_BR/LC_MESSAGES/tcltk.mo and b/src/library/translations/inst/pt_BR/LC_MESSAGES/tcltk.mo differ
diff --git a/src/library/translations/inst/pt_BR/LC_MESSAGES/tools.mo b/src/library/translations/inst/pt_BR/LC_MESSAGES/tools.mo
index c4acf6f..32417e9 100644
Binary files a/src/library/translations/inst/pt_BR/LC_MESSAGES/tools.mo and b/src/library/translations/inst/pt_BR/LC_MESSAGES/tools.mo differ
diff --git a/src/library/translations/inst/ru/LC_MESSAGES/R-base.mo b/src/library/translations/inst/ru/LC_MESSAGES/R-base.mo
index 344284f..d16c1a4 100644
Binary files a/src/library/translations/inst/ru/LC_MESSAGES/R-base.mo and b/src/library/translations/inst/ru/LC_MESSAGES/R-base.mo differ
diff --git a/src/library/translations/inst/ru/LC_MESSAGES/R-compiler.mo b/src/library/translations/inst/ru/LC_MESSAGES/R-compiler.mo
index 3709524..941e95e 100644
Binary files a/src/library/translations/inst/ru/LC_MESSAGES/R-compiler.mo and b/src/library/translations/inst/ru/LC_MESSAGES/R-compiler.mo differ
diff --git a/src/library/translations/inst/ru/LC_MESSAGES/R-grDevices.mo b/src/library/translations/inst/ru/LC_MESSAGES/R-grDevices.mo
index e346627..073279e 100644
Binary files a/src/library/translations/inst/ru/LC_MESSAGES/R-grDevices.mo and b/src/library/translations/inst/ru/LC_MESSAGES/R-grDevices.mo differ
diff --git a/src/library/translations/inst/ru/LC_MESSAGES/R-graphics.mo b/src/library/translations/inst/ru/LC_MESSAGES/R-graphics.mo
index c2e0249..0ff84ae 100644
Binary files a/src/library/translations/inst/ru/LC_MESSAGES/R-graphics.mo and b/src/library/translations/inst/ru/LC_MESSAGES/R-graphics.mo differ
diff --git a/src/library/translations/inst/ru/LC_MESSAGES/R-grid.mo b/src/library/translations/inst/ru/LC_MESSAGES/R-grid.mo
index f62d519..b220f10 100644
Binary files a/src/library/translations/inst/ru/LC_MESSAGES/R-grid.mo and b/src/library/translations/inst/ru/LC_MESSAGES/R-grid.mo differ
diff --git a/src/library/translations/inst/ru/LC_MESSAGES/R-methods.mo b/src/library/translations/inst/ru/LC_MESSAGES/R-methods.mo
index d7d6f39..6cd18ef 100644
Binary files a/src/library/translations/inst/ru/LC_MESSAGES/R-methods.mo and b/src/library/translations/inst/ru/LC_MESSAGES/R-methods.mo differ
diff --git a/src/library/translations/inst/ru/LC_MESSAGES/R-parallel.mo b/src/library/translations/inst/ru/LC_MESSAGES/R-parallel.mo
index 04b4494..086cadd 100644
Binary files a/src/library/translations/inst/ru/LC_MESSAGES/R-parallel.mo and b/src/library/translations/inst/ru/LC_MESSAGES/R-parallel.mo differ
diff --git a/src/library/translations/inst/ru/LC_MESSAGES/R-splines.mo b/src/library/translations/inst/ru/LC_MESSAGES/R-splines.mo
index ff94030..dbbbc09 100644
Binary files a/src/library/translations/inst/ru/LC_MESSAGES/R-splines.mo and b/src/library/translations/inst/ru/LC_MESSAGES/R-splines.mo differ
diff --git a/src/library/translations/inst/ru/LC_MESSAGES/R-stats.mo b/src/library/translations/inst/ru/LC_MESSAGES/R-stats.mo
index bedf612..d1de261 100644
Binary files a/src/library/translations/inst/ru/LC_MESSAGES/R-stats.mo and b/src/library/translations/inst/ru/LC_MESSAGES/R-stats.mo differ
diff --git a/src/library/translations/inst/ru/LC_MESSAGES/R-stats4.mo b/src/library/translations/inst/ru/LC_MESSAGES/R-stats4.mo
index 1ddb0bd..be1112d 100644
Binary files a/src/library/translations/inst/ru/LC_MESSAGES/R-stats4.mo and b/src/library/translations/inst/ru/LC_MESSAGES/R-stats4.mo differ
diff --git a/src/library/translations/inst/ru/LC_MESSAGES/R-tcltk.mo b/src/library/translations/inst/ru/LC_MESSAGES/R-tcltk.mo
index bb43625..1572f67 100644
Binary files a/src/library/translations/inst/ru/LC_MESSAGES/R-tcltk.mo and b/src/library/translations/inst/ru/LC_MESSAGES/R-tcltk.mo differ
diff --git a/src/library/translations/inst/ru/LC_MESSAGES/R-tools.mo b/src/library/translations/inst/ru/LC_MESSAGES/R-tools.mo
index 1e045ae..5d361eb 100644
Binary files a/src/library/translations/inst/ru/LC_MESSAGES/R-tools.mo and b/src/library/translations/inst/ru/LC_MESSAGES/R-tools.mo differ
diff --git a/src/library/translations/inst/ru/LC_MESSAGES/R-utils.mo b/src/library/translations/inst/ru/LC_MESSAGES/R-utils.mo
index 2141a82..5c43224 100644
Binary files a/src/library/translations/inst/ru/LC_MESSAGES/R-utils.mo and b/src/library/translations/inst/ru/LC_MESSAGES/R-utils.mo differ
diff --git a/src/library/translations/inst/ru/LC_MESSAGES/R.mo b/src/library/translations/inst/ru/LC_MESSAGES/R.mo
index 327259c..0fabdbf 100644
Binary files a/src/library/translations/inst/ru/LC_MESSAGES/R.mo and b/src/library/translations/inst/ru/LC_MESSAGES/R.mo differ
diff --git a/src/library/translations/inst/ru/LC_MESSAGES/RGui.mo b/src/library/translations/inst/ru/LC_MESSAGES/RGui.mo
index cd6dd2c..2183979 100644
Binary files a/src/library/translations/inst/ru/LC_MESSAGES/RGui.mo and b/src/library/translations/inst/ru/LC_MESSAGES/RGui.mo differ
diff --git a/src/library/translations/inst/ru/LC_MESSAGES/grDevices.mo b/src/library/translations/inst/ru/LC_MESSAGES/grDevices.mo
index 37e85b5..2784f6e 100644
Binary files a/src/library/translations/inst/ru/LC_MESSAGES/grDevices.mo and b/src/library/translations/inst/ru/LC_MESSAGES/grDevices.mo differ
diff --git a/src/library/translations/inst/ru/LC_MESSAGES/graphics.mo b/src/library/translations/inst/ru/LC_MESSAGES/graphics.mo
index 1ecfb46..c737b3d 100644
Binary files a/src/library/translations/inst/ru/LC_MESSAGES/graphics.mo and b/src/library/translations/inst/ru/LC_MESSAGES/graphics.mo differ
diff --git a/src/library/translations/inst/ru/LC_MESSAGES/grid.mo b/src/library/translations/inst/ru/LC_MESSAGES/grid.mo
index ad9905d..0a447ec 100644
Binary files a/src/library/translations/inst/ru/LC_MESSAGES/grid.mo and b/src/library/translations/inst/ru/LC_MESSAGES/grid.mo differ
diff --git a/src/library/translations/inst/ru/LC_MESSAGES/methods.mo b/src/library/translations/inst/ru/LC_MESSAGES/methods.mo
index 10bdc88..b96f955 100644
Binary files a/src/library/translations/inst/ru/LC_MESSAGES/methods.mo and b/src/library/translations/inst/ru/LC_MESSAGES/methods.mo differ
diff --git a/src/library/translations/inst/ru/LC_MESSAGES/parallel.mo b/src/library/translations/inst/ru/LC_MESSAGES/parallel.mo
index 3c0e9b9..06e84e7 100644
Binary files a/src/library/translations/inst/ru/LC_MESSAGES/parallel.mo and b/src/library/translations/inst/ru/LC_MESSAGES/parallel.mo differ
diff --git a/src/library/translations/inst/ru/LC_MESSAGES/splines.mo b/src/library/translations/inst/ru/LC_MESSAGES/splines.mo
index 4defcf3..c8e3fac 100644
Binary files a/src/library/translations/inst/ru/LC_MESSAGES/splines.mo and b/src/library/translations/inst/ru/LC_MESSAGES/splines.mo differ
diff --git a/src/library/translations/inst/ru/LC_MESSAGES/stats.mo b/src/library/translations/inst/ru/LC_MESSAGES/stats.mo
index 91ef942..59241e5 100644
Binary files a/src/library/translations/inst/ru/LC_MESSAGES/stats.mo and b/src/library/translations/inst/ru/LC_MESSAGES/stats.mo differ
diff --git a/src/library/translations/inst/ru/LC_MESSAGES/tcltk.mo b/src/library/translations/inst/ru/LC_MESSAGES/tcltk.mo
index 0a2a10a..1899b92 100644
Binary files a/src/library/translations/inst/ru/LC_MESSAGES/tcltk.mo and b/src/library/translations/inst/ru/LC_MESSAGES/tcltk.mo differ
diff --git a/src/library/translations/inst/ru/LC_MESSAGES/tools.mo b/src/library/translations/inst/ru/LC_MESSAGES/tools.mo
index 8e76c39..fdf914e 100644
Binary files a/src/library/translations/inst/ru/LC_MESSAGES/tools.mo and b/src/library/translations/inst/ru/LC_MESSAGES/tools.mo differ
diff --git a/src/library/translations/inst/tr/LC_MESSAGES/R-base.mo b/src/library/translations/inst/tr/LC_MESSAGES/R-base.mo
index 0cbd0a3..158b5b5 100644
Binary files a/src/library/translations/inst/tr/LC_MESSAGES/R-base.mo and b/src/library/translations/inst/tr/LC_MESSAGES/R-base.mo differ
diff --git a/src/library/translations/inst/tr/LC_MESSAGES/R-stats.mo b/src/library/translations/inst/tr/LC_MESSAGES/R-stats.mo
index 1cec065..e8a07b7 100644
Binary files a/src/library/translations/inst/tr/LC_MESSAGES/R-stats.mo and b/src/library/translations/inst/tr/LC_MESSAGES/R-stats.mo differ
diff --git a/src/library/translations/inst/tr/LC_MESSAGES/R-tools.mo b/src/library/translations/inst/tr/LC_MESSAGES/R-tools.mo
index 4e13afd..6c1604a 100644
Binary files a/src/library/translations/inst/tr/LC_MESSAGES/R-tools.mo and b/src/library/translations/inst/tr/LC_MESSAGES/R-tools.mo differ
diff --git a/src/library/translations/inst/tr/LC_MESSAGES/R-utils.mo b/src/library/translations/inst/tr/LC_MESSAGES/R-utils.mo
index 3f527d2..5e42422 100644
Binary files a/src/library/translations/inst/tr/LC_MESSAGES/R-utils.mo and b/src/library/translations/inst/tr/LC_MESSAGES/R-utils.mo differ
diff --git a/src/library/translations/inst/tr/LC_MESSAGES/R.mo b/src/library/translations/inst/tr/LC_MESSAGES/R.mo
index 6d0dc63..5b950e1 100644
Binary files a/src/library/translations/inst/tr/LC_MESSAGES/R.mo and b/src/library/translations/inst/tr/LC_MESSAGES/R.mo differ
diff --git a/src/library/translations/inst/tr/LC_MESSAGES/RGui.mo b/src/library/translations/inst/tr/LC_MESSAGES/RGui.mo
index 839831e..0f4ecc7 100644
Binary files a/src/library/translations/inst/tr/LC_MESSAGES/RGui.mo and b/src/library/translations/inst/tr/LC_MESSAGES/RGui.mo differ
diff --git a/src/library/translations/inst/tr/LC_MESSAGES/graphics.mo b/src/library/translations/inst/tr/LC_MESSAGES/graphics.mo
index 1fe79f6..8a939ae 100644
Binary files a/src/library/translations/inst/tr/LC_MESSAGES/graphics.mo and b/src/library/translations/inst/tr/LC_MESSAGES/graphics.mo differ
diff --git a/src/library/translations/inst/zh_CN/LC_MESSAGES/R-base.mo b/src/library/translations/inst/zh_CN/LC_MESSAGES/R-base.mo
index 0db2e39..1102d5a 100644
Binary files a/src/library/translations/inst/zh_CN/LC_MESSAGES/R-base.mo and b/src/library/translations/inst/zh_CN/LC_MESSAGES/R-base.mo differ
diff --git a/src/library/translations/inst/zh_CN/LC_MESSAGES/R-compiler.mo b/src/library/translations/inst/zh_CN/LC_MESSAGES/R-compiler.mo
index 62e6940..733289b 100644
Binary files a/src/library/translations/inst/zh_CN/LC_MESSAGES/R-compiler.mo and b/src/library/translations/inst/zh_CN/LC_MESSAGES/R-compiler.mo differ
diff --git a/src/library/translations/inst/zh_CN/LC_MESSAGES/R-grDevices.mo b/src/library/translations/inst/zh_CN/LC_MESSAGES/R-grDevices.mo
index 16805c9..c0854e5 100644
Binary files a/src/library/translations/inst/zh_CN/LC_MESSAGES/R-grDevices.mo and b/src/library/translations/inst/zh_CN/LC_MESSAGES/R-grDevices.mo differ
diff --git a/src/library/translations/inst/zh_CN/LC_MESSAGES/R-graphics.mo b/src/library/translations/inst/zh_CN/LC_MESSAGES/R-graphics.mo
index 4f45bf6..50d049a 100644
Binary files a/src/library/translations/inst/zh_CN/LC_MESSAGES/R-graphics.mo and b/src/library/translations/inst/zh_CN/LC_MESSAGES/R-graphics.mo differ
diff --git a/src/library/translations/inst/zh_CN/LC_MESSAGES/R-grid.mo b/src/library/translations/inst/zh_CN/LC_MESSAGES/R-grid.mo
index b983005..818cca7 100644
Binary files a/src/library/translations/inst/zh_CN/LC_MESSAGES/R-grid.mo and b/src/library/translations/inst/zh_CN/LC_MESSAGES/R-grid.mo differ
diff --git a/src/library/translations/inst/zh_CN/LC_MESSAGES/R-methods.mo b/src/library/translations/inst/zh_CN/LC_MESSAGES/R-methods.mo
index f9b6b6f..a735656 100644
Binary files a/src/library/translations/inst/zh_CN/LC_MESSAGES/R-methods.mo and b/src/library/translations/inst/zh_CN/LC_MESSAGES/R-methods.mo differ
diff --git a/src/library/translations/inst/zh_CN/LC_MESSAGES/R-parallel.mo b/src/library/translations/inst/zh_CN/LC_MESSAGES/R-parallel.mo
index 6613e43..e3742e8 100644
Binary files a/src/library/translations/inst/zh_CN/LC_MESSAGES/R-parallel.mo and b/src/library/translations/inst/zh_CN/LC_MESSAGES/R-parallel.mo differ
diff --git a/src/library/translations/inst/zh_CN/LC_MESSAGES/R-splines.mo b/src/library/translations/inst/zh_CN/LC_MESSAGES/R-splines.mo
index 69b9411..7077521 100644
Binary files a/src/library/translations/inst/zh_CN/LC_MESSAGES/R-splines.mo and b/src/library/translations/inst/zh_CN/LC_MESSAGES/R-splines.mo differ
diff --git a/src/library/translations/inst/zh_CN/LC_MESSAGES/R-stats.mo b/src/library/translations/inst/zh_CN/LC_MESSAGES/R-stats.mo
index 584d2fa..6068d4f 100644
Binary files a/src/library/translations/inst/zh_CN/LC_MESSAGES/R-stats.mo and b/src/library/translations/inst/zh_CN/LC_MESSAGES/R-stats.mo differ
diff --git a/src/library/translations/inst/zh_CN/LC_MESSAGES/R-stats4.mo b/src/library/translations/inst/zh_CN/LC_MESSAGES/R-stats4.mo
index e07dade..9ef5cbe 100644
Binary files a/src/library/translations/inst/zh_CN/LC_MESSAGES/R-stats4.mo and b/src/library/translations/inst/zh_CN/LC_MESSAGES/R-stats4.mo differ
diff --git a/src/library/translations/inst/zh_CN/LC_MESSAGES/R-tcltk.mo b/src/library/translations/inst/zh_CN/LC_MESSAGES/R-tcltk.mo
index c01c770..3e825d2 100644
Binary files a/src/library/translations/inst/zh_CN/LC_MESSAGES/R-tcltk.mo and b/src/library/translations/inst/zh_CN/LC_MESSAGES/R-tcltk.mo differ
diff --git a/src/library/translations/inst/zh_CN/LC_MESSAGES/R-tools.mo b/src/library/translations/inst/zh_CN/LC_MESSAGES/R-tools.mo
index 222a931..43609d3 100644
Binary files a/src/library/translations/inst/zh_CN/LC_MESSAGES/R-tools.mo and b/src/library/translations/inst/zh_CN/LC_MESSAGES/R-tools.mo differ
diff --git a/src/library/translations/inst/zh_CN/LC_MESSAGES/R-utils.mo b/src/library/translations/inst/zh_CN/LC_MESSAGES/R-utils.mo
index 1922020..8616e5f 100644
Binary files a/src/library/translations/inst/zh_CN/LC_MESSAGES/R-utils.mo and b/src/library/translations/inst/zh_CN/LC_MESSAGES/R-utils.mo differ
diff --git a/src/library/translations/inst/zh_CN/LC_MESSAGES/R.mo b/src/library/translations/inst/zh_CN/LC_MESSAGES/R.mo
index 04c5009..b873a35 100644
Binary files a/src/library/translations/inst/zh_CN/LC_MESSAGES/R.mo and b/src/library/translations/inst/zh_CN/LC_MESSAGES/R.mo differ
diff --git a/src/library/translations/inst/zh_CN/LC_MESSAGES/RGui.mo b/src/library/translations/inst/zh_CN/LC_MESSAGES/RGui.mo
index 71f56c9..1cd65ea 100644
Binary files a/src/library/translations/inst/zh_CN/LC_MESSAGES/RGui.mo and b/src/library/translations/inst/zh_CN/LC_MESSAGES/RGui.mo differ
diff --git a/src/library/translations/inst/zh_CN/LC_MESSAGES/grDevices.mo b/src/library/translations/inst/zh_CN/LC_MESSAGES/grDevices.mo
index 4fe9e49..860a9b8 100644
Binary files a/src/library/translations/inst/zh_CN/LC_MESSAGES/grDevices.mo and b/src/library/translations/inst/zh_CN/LC_MESSAGES/grDevices.mo differ
diff --git a/src/library/translations/inst/zh_CN/LC_MESSAGES/graphics.mo b/src/library/translations/inst/zh_CN/LC_MESSAGES/graphics.mo
index 37a97dc..b33a1f6 100644
Binary files a/src/library/translations/inst/zh_CN/LC_MESSAGES/graphics.mo and b/src/library/translations/inst/zh_CN/LC_MESSAGES/graphics.mo differ
diff --git a/src/library/translations/inst/zh_CN/LC_MESSAGES/grid.mo b/src/library/translations/inst/zh_CN/LC_MESSAGES/grid.mo
index bec7245..0a1f226 100644
Binary files a/src/library/translations/inst/zh_CN/LC_MESSAGES/grid.mo and b/src/library/translations/inst/zh_CN/LC_MESSAGES/grid.mo differ
diff --git a/src/library/translations/inst/zh_CN/LC_MESSAGES/methods.mo b/src/library/translations/inst/zh_CN/LC_MESSAGES/methods.mo
index b9fcc01..f56943b 100644
Binary files a/src/library/translations/inst/zh_CN/LC_MESSAGES/methods.mo and b/src/library/translations/inst/zh_CN/LC_MESSAGES/methods.mo differ
diff --git a/src/library/translations/inst/zh_CN/LC_MESSAGES/parallel.mo b/src/library/translations/inst/zh_CN/LC_MESSAGES/parallel.mo
index f82f1a0..4762519 100644
Binary files a/src/library/translations/inst/zh_CN/LC_MESSAGES/parallel.mo and b/src/library/translations/inst/zh_CN/LC_MESSAGES/parallel.mo differ
diff --git a/src/library/translations/inst/zh_CN/LC_MESSAGES/splines.mo b/src/library/translations/inst/zh_CN/LC_MESSAGES/splines.mo
index d0a9e2c..ef11bed 100644
Binary files a/src/library/translations/inst/zh_CN/LC_MESSAGES/splines.mo and b/src/library/translations/inst/zh_CN/LC_MESSAGES/splines.mo differ
diff --git a/src/library/translations/inst/zh_CN/LC_MESSAGES/stats.mo b/src/library/translations/inst/zh_CN/LC_MESSAGES/stats.mo
index 7db5cfb..591bf72 100644
Binary files a/src/library/translations/inst/zh_CN/LC_MESSAGES/stats.mo and b/src/library/translations/inst/zh_CN/LC_MESSAGES/stats.mo differ
diff --git a/src/library/translations/inst/zh_CN/LC_MESSAGES/tcltk.mo b/src/library/translations/inst/zh_CN/LC_MESSAGES/tcltk.mo
index 7593b84..ce180a5 100644
Binary files a/src/library/translations/inst/zh_CN/LC_MESSAGES/tcltk.mo and b/src/library/translations/inst/zh_CN/LC_MESSAGES/tcltk.mo differ
diff --git a/src/library/translations/inst/zh_CN/LC_MESSAGES/tools.mo b/src/library/translations/inst/zh_CN/LC_MESSAGES/tools.mo
index dcdb4cf..b80c474 100644
Binary files a/src/library/translations/inst/zh_CN/LC_MESSAGES/tools.mo and b/src/library/translations/inst/zh_CN/LC_MESSAGES/tools.mo differ
diff --git a/src/library/translations/inst/zh_TW/LC_MESSAGES/R.mo b/src/library/translations/inst/zh_TW/LC_MESSAGES/R.mo
index 7f9d60c..3c96a33 100644
Binary files a/src/library/translations/inst/zh_TW/LC_MESSAGES/R.mo and b/src/library/translations/inst/zh_TW/LC_MESSAGES/R.mo differ
diff --git a/src/library/translations/inst/zh_TW/LC_MESSAGES/RGui.mo b/src/library/translations/inst/zh_TW/LC_MESSAGES/RGui.mo
index 41ed926..2b1a801 100644
Binary files a/src/library/translations/inst/zh_TW/LC_MESSAGES/RGui.mo and b/src/library/translations/inst/zh_TW/LC_MESSAGES/RGui.mo differ
diff --git a/src/library/translations/inst/zh_TW/LC_MESSAGES/graphics.mo b/src/library/translations/inst/zh_TW/LC_MESSAGES/graphics.mo
index 161190b..ac87b29 100644
Binary files a/src/library/translations/inst/zh_TW/LC_MESSAGES/graphics.mo and b/src/library/translations/inst/zh_TW/LC_MESSAGES/graphics.mo differ
diff --git a/src/library/utils/DESCRIPTION.in b/src/library/utils/DESCRIPTION.in
index 21aee55..1bc1a9a 100644
--- a/src/library/utils/DESCRIPTION.in
+++ b/src/library/utils/DESCRIPTION.in
@@ -4,5 +4,7 @@ Priority: base
 Title: The R Utils Package
 Author: R Core Team and contributors worldwide
 Maintainer: R Core Team <R-core at r-project.org>
-Description: R utility functions
+Description: R utility functions.
 License: Part of R @VERSION@
+Suggests: methods, XML
+NeedsCompilation: yes
diff --git a/src/library/utils/Makefile.in b/src/library/utils/Makefile.in
index a15cd28..3712039 100644
--- a/src/library/utils/Makefile.in
+++ b/src/library/utils/Makefile.in
@@ -29,6 +29,7 @@ all: Makefile DESCRIPTION
 	@$(MKINSTALLDIRS) $(top_builddir)/library/$(pkg)/doc
 	@$(MAKE) mkR1 mkdesc instdirs iconvlist
 	@$(MAKE) mksrc
+	@$(MAKE) sysdata
 @BYTE_COMPILE_PACKAGES_FALSE@	@$(MAKE) mklazy
 @BYTE_COMPILE_PACKAGES_TRUE@	@$(MAKE) mklazycomp
 
diff --git a/src/library/utils/Makefile.win b/src/library/utils/Makefile.win
index 9bb3b41..e97a9f4 100644
--- a/src/library/utils/Makefile.win
+++ b/src/library/utils/Makefile.win
@@ -22,6 +22,7 @@ all:
 	@$(MKINSTALLDIRS) $(top_builddir)/library/$(pkg)/doc
 	@$(MAKE) -f Makefile.win mkR1 mkdesc instdirs
 	@$(MAKE) -f Makefile.win mksrc-win2
+	@$(MAKE) -f Makefile.win sysdata
 	@$(MAKE) -f Makefile.win mklazycomp
 
 include $(top_srcdir)/share/make/basepkg.mk
diff --git a/src/library/utils/NAMESPACE b/src/library/utils/NAMESPACE
index de02a3a..fa1f317 100644
--- a/src/library/utils/NAMESPACE
+++ b/src/library/utils/NAMESPACE
@@ -1,50 +1,54 @@
 # Refer to all C routines by their name prefixed by C_
 useDynLib(utils, .registration = TRUE, .fixes = "C_")
 
-export("?", .DollarNames, CRAN.packages, Rprof, Rprofmem, RShowDoc,
-       RSiteSearch, URLdecode, URLencode, View, adist, alarm, apropos,
-       aregexec, argsAnywhere, assignInMyNamespace, assignInNamespace,
-       as.roman, as.person, as.personList, as.relistable, aspell,
-       aspell_package_C_files, aspell_package_R_files,
-       aspell_package_Rd_files, aspell_package_vignettes,
+export("?", .DollarNames, .S3methods, .romans, CRAN.packages, Rprof,
+       Rprofmem, RShowDoc, RSiteSearch, URLdecode, URLencode, View,
+       adist, alarm, apropos, aregexec, argsAnywhere,
+       assignInMyNamespace, assignInNamespace, as.roman, as.person,
+       as.personList, as.relistable, aspell, aspell_package_C_files,
+       aspell_package_R_files, aspell_package_Rd_files,
+       aspell_package_vignettes,
        aspell_write_personal_dictionary_file, available.packages,
        browseEnv, browseURL, browseVignettes, bug.report,
-       capture.output, changedFiles, checkCRAN, chooseBioCmirror, chooseCRANmirror,
-       citation, cite, citeNatbib, citEntry, citHeader, citFooter,
-       close.socket, combn, compareVersion, contrib.url, count.fields,
-       create.post, data, data.entry, dataentry, de, de.ncols,
-       de.restore, de.setup, debugger, demo, download.file,
-       download.packages, dump.frames, edit, emacs, example,
-       file_test, file.edit, fileSnapshot, find, fix, fixInNamespace, findLineNum,
-       flush.console, formatOL, formatUL, getAnywhere, getCRANmirrors,
-       getFromNamespace, getParseData, getParseText, getS3method,
-       getSrcDirectory, getSrcFilename, getSrcLocation, getSrcref,
-       glob2rx, globalVariables, head, head.matrix, help,
-       help.request, help.search, help.start, history,
-       install.packages, installed.packages, is.relistable,
-       limitedLabels, loadhistory, localeToCharset, ls.str, lsf.str,
-       maintainer, make.packages.html, make.socket, memory.limit,
-       memory.size, menu, methods, mirror2html, modifyList,
-       new.packages, news, object.size, old.packages,
+       capture.output, changedFiles, checkCRAN, chooseBioCmirror,
+       chooseCRANmirror, citation, cite, citeNatbib, citEntry,
+       citHeader, citFooter, close.socket, combn, compareVersion,
+       contrib.url, count.fields, create.post, data, data.entry,
+       dataentry, de, de.ncols, de.restore, de.setup, debugger, debugcall, demo,
+       download.file, download.packages, dump.frames, edit, emacs,
+       example, file_test, file.edit, fileSnapshot, find, fix,
+       fixInNamespace, findLineNum, flush.console, formatOL, formatUL,
+       getAnywhere, getCRANmirrors, getFromNamespace, getParseData,
+       getParseText, getS3method, getSrcDirectory, getSrcFilename,
+       getSrcLocation, getSrcref, glob2rx, globalVariables, hasName,
+       head, head.matrix, help, help.request, help.search, help.start,
+       history, install.packages, installed.packages, is.relistable,
+       isS3method, isS3stdGeneric, limitedLabels, loadhistory, localeToCharset,
+       ls.str, lsf.str, maintainer, make.packages.html, make.socket,
+       memory.limit, memory.size, menu, methods, mirror2html,
+       modifyList, new.packages, news, object.size, old.packages,
        package.skeleton, packageDescription, packageName,
        packageVersion, packageStatus, page, person, personList, pico,
-       process.events, prompt, promptData, promptImport, promptPackage,
-       rc.getOption, rc.options, rc.settings, rc.status,
-       readCitationFile, read.DIF, read.csv, read.csv2, read.delim,
-       read.delim2, read.fwf, read.fortran, read.socket, read.table,
-       recover, relist, remove.packages, removeSource, rtags,
-       savehistory, select.list, sessionInfo, setBreakpoint,
-       setRepositories, stack, str, strOptions, summaryRprof,
+       process.events, prompt, promptData, promptImport,
+       promptPackage, rc.getOption, rc.options, rc.settings,
+       rc.status, readCitationFile, read.DIF, read.csv, read.csv2,
+       read.delim, read.delim2, read.fwf, read.fortran, read.socket,
+       read.table, recover, relist, remove.packages, removeSource,
+       rtags, savehistory, select.list, sessionInfo, setBreakpoint,
+       setRepositories, stack, str, strcapture, strOptions, summaryRprof,
        suppressForeignCheck, tail, tail.matrix, tar, timestamp,
-       toBibtex, toLatex, type.convert, unstack, untar, unzip,
+       toBibtex, toLatex, type.convert, undebugcall, unstack, untar, unzip,
        update.packageStatus, update.packages, upgrade, url.show, vi,
        vignette, write.csv, write.csv2, write.socket, write.table,
        xedit, xemacs, zip)
 
 export(txtProgressBar, getTxtProgressBar, setTxtProgressBar)
 
+export("hsearch_db", "hsearch_db_concepts", "hsearch_db_keywords")
+
 S3method("[", getAnywhere)
 S3method("[", roman)
+S3method(Ops, roman)
 S3method(as.character, person)
 S3method(as.character, roman)
 S3method(as.person, default)
@@ -55,9 +59,11 @@ S3method(edit, data.frame)
 S3method(edit, default)
 S3method(edit, matrix)
 S3method(edit, vignette)
+S3method(format, "aspell")
 S3method(format, "news_db")
 S3method(format, "object_size")
 S3method(format, "roman")
+S3method(getRcode, vignette)
 S3method(head, data.frame)
 S3method(head, default)
 S3method(head, "function")
@@ -71,8 +77,9 @@ S3method(print, changedFiles)
 S3method(print, fileSnapshot)
 S3method(print, findLineNumResult)
 S3method(print, getAnywhere)
-S3method(print, hsearch)
 S3method(print, "help_files_with_topic")
+S3method(print, hsearch)
+S3method(print, "hsearch_db")
 S3method(print, Latex)
 S3method(print, "ls_str")
 S3method(print, MethodsFunction)
@@ -93,6 +100,7 @@ S3method(relist, default)
 S3method(relist, factor)
 S3method(relist, list)
 S3method(relist, matrix)
+S3method(rep, roman)
 S3method(stack, data.frame)
 S3method(stack, default)
 S3method(str, POSIXt)
@@ -114,7 +122,7 @@ S3method(unstack, data.frame)
 S3method(unstack, default)
 S3method(upgrade, packageStatus)
 ## can't register update.packageStatus as update is in stats
-## and would create a cycle.
+## and would create a cycle, i.e., can NOT use anything from stats
 
 export("bibentry")
 S3method("$", "bibentry")
@@ -128,6 +136,7 @@ S3method("[[", "person")
 S3method("c", "bibentry")
 S3method("c", "person")
 S3method("format", "bibentry")
+S3method("format", "citation")
 S3method("format", "person")
 S3method("print", "bibentry")
 S3method("print", "citation")
@@ -146,6 +155,7 @@ export(Rtangle, RtangleSetup, RweaveLatex, RweaveLatexSetup, Stangle,
        RtangleWritedoc, RweaveChunkPrefix, RweaveEvalWithOpt,
        RweaveTryStop, SweaveHooks, RweaveLatexWritedoc,
        RweaveLatexOptions, RweaveLatexFinish,
+       .RtangleCodeLabel,
        makeRweaveLatexCodeRunner)
 
 if(tools:::.OStype() == "unix") {
@@ -159,8 +169,9 @@ export(DLL.version, Filters, choose.dir, choose.files, getClipboardFormats,
        readRegistry, setStatusBar, setWindowTitle, shortPathName,
        win.version, winDialog, winDialogString, winMenuAdd,
        winMenuAddItem, winMenuDel, winMenuDelItem, winMenuNames,
-       winMenuItems, writeClipboard, zip.unpack,
+       winMenuItems, writeClipboard,
        winProgressBar, getWinProgressBar, setWinProgressBar,
-       setInternet2, arrangeWindows)
+       setInternet2, zip.unpack, ## defunct stub
+       arrangeWindows)
 S3method(close, winProgressBar)
 }
diff --git a/src/library/utils/R/MARC.R b/src/library/utils/R/MARC.R
deleted file mode 100644
index 54b9c36..0000000
--- a/src/library/utils/R/MARC.R
+++ /dev/null
@@ -1,244 +0,0 @@
-#  File src/library/utils/R/MARC.R
-#  Part of the R package, http://www.R-project.org
-#
-#  Copyright (C) 1995-2012 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
-#  the Free Software Foundation; either version 2 of the License, or
-#  (at your option) any later version.
-#
-#  This program is distributed in the hope that it will be useful,
-#  but WITHOUT ANY WARRANTY; without even the implied warranty of
-#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-#  GNU General Public License for more details.
-#
-#  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
-
-
-MARC_relator_db <-
-structure(list(term = c("Actor", "Adapter", "Annotator", "Applicant",
-"Architect", "Arranger", "Artist", "Assignee", "Associated name",
-"Attributed name", "Auctioneer", "Author", "Author in quotations or text extracts",
-"Author of afterword, colophon, etc.", "Author of dialog", "Author of introduction, etc.",
-"Author of screenplay, etc.", "Bibliographic antecedent", "Binder",
-"Binding designer", "Book designer", "Book producer", "Bookjacket designer",
-"Bookplate designer", "Bookseller", "Calligrapher", "Cartographer",
-"Censor", "Choreographer", "Client", "Collaborator", "Collector",
-"Collotyper", "Commentator", "Commentator for written text",
-"Compiler", "Complainant", "Complainant-appellant", "Complainant-appellee",
-"Composer", "Compositor", "Conceptor", "Conductor", "Consultant",
-"Consultant to a project", "Contestant", "Contestant-appellant",
-"Contestant-appellee", "Contestee", "Contestee-appellant", "Contestee-appellee",
-"Contractor", "Contributor", "Copyright claimant", "Copyright holder",
-"Corrector", "Correspondent", "Costume designer", "Creator",
-"Curator of an exhibition", "Dancer", "Dedicatee", "Dedicator",
-"Defendant", "Defendant-appellant", "Defendant-appellee", "Degree grantor",
-"Delineator", "Depositor", "Designer", "Director", "Dissertant",
-"Distributor", "Donor", "Draftsman", "Dubious author", "Editor",
-"Electrotyper", "Engineer", "Engraver", "Etcher", "Expert", "Facsimilist",
-"Film editor", "Forger", "Former owner", "Funder", "Honoree",
-"Host", "Illuminator", "Illustrator", "Inscriber", "Instrumentalist",
-"Interviewee", "Interviewer", "Inventor", "Landscape architect",
-"Lender", "Libelant", "Libelant-appellant", "Libelant-appellee",
-"Libelee", "Libelee-appellant", "Libelee-appellee", "Librettist",
-"Licensee", "Licensor", "Lithographer", "Lyricist", "Metadata contact",
-"Metal-engraver", "Moderator", "Monitor", "Musician", "Narrator",
-"Opponent", "Organizer of meeting", "Originator", "Other", "Owner",
-"Papermaker", "Patent applicant", "Patent holder", "Patron",
-"Performer", "Photographer", "Plaintiff", "Plaintiff-appellant",
-"Plaintiff-appellee", "Platemaker", "Printer", "Printer of plates",
-"Process contact", "Producer", "Production personnel", "Programmer",
-"Proofreader", "Publisher", "Publishing director", "Recipient",
-"Recording engineer", "Redactor", "Renderer", "Research team head",
-"Research team member", "Researcher", "Respondent", "Respondent-appellant",
-"Respondent-appellee", "Reviewer", "Rubricator", "Scenarist",
-"Scientific advisor", "Scribe", "Sculptor", "Secretary", "Signer",
-"Singer", "Speaker", "Sponsor", "Standards body", "Stereotyper",
-"Surveyor", "Thesis advisor", "Transcriber", "Translator", "Type designer",
-"Typographer", "Vocalist", "Witness", "Wood-engraver", "Woodcutter",
-"Writer of accompanying material"), code = c("act", "adp", "ann",
-"app", "arc", "arr", "art", "asg", "asn", "att", "auc", "aut",
-"aqt", "aft", "aud", "aui", "aus", "ant", "bnd", "bdd ", "bkd",
-"bkp", "bjd", "bpd", "bsl", "cll", "ctg", "cns", "chr", "cli",
-"clb", "col", "clt", "cmm", "cwt", "com", "cpl", "cpt", "cpe",
-"cmp", "cmt ", "ccp", "cnd", "csl", "csp", "cos", "cot", "coe",
-"cts", "ctt", "cte", "ctr", "ctb", "cpc", "cph", "crr", "crp",
-"cst", "cre", "cur", "dnc", "dte", "dto", "dfd", "dft", "dfe",
-"dgg", "dln", "dpt", "dsr", "drt", "dis", "dst", "dnr", "drm",
-"dub", "edt", "elt", "eng", "egr", "etr", "exp", "fac", "flm",
-"frg ", "fmo", "fnd", "hnr", "hst", "ilu", "ill", "ins", "itr",
-"ive", "ivr", "inv", "lsa", "len", "lil", "lit", "lie", "lel",
-"let", "lee", "lbt", "lse", "lso", "ltg", "lyr", "mdc", "mte",
-"mod", "mon", "mus", "nrt", "opn", "orm", "org", "oth", "own",
-"ppm", "pta", "pth", "pat", "prf", "pht", "ptf", "ptt", "pte",
-"plt", "prt", "pop", "prc", "pro", "prd", "prg", "pfr", "pbl",
-"pbd", "rcp", "rce", "red", "ren", "rth", "rtm", "res", "rsp",
-"rst", "rse", "rev", "rbr", "sce", "sad", "scr", "scl", "sec",
-"sgn", "sng", "spk", "spn", "stn", "str", "srv", "ths", "trc",
-"trl", "tyd", "tyg", "voc", "wit", "wde", "wdc", "wam"), description = c("Use for a person who principally exhibits acting skills in a musical or dramatic presentation or entertainment.",
-"Use for a person who 1) reworks a musical composition, usually for a different medium, or 2) rewrites novels or stories for motion pictures or other audiovisual medium.",
-"Use for a person who writes manuscript annotations on a printed item.",
-"Appraiser (USE: Expert)", "", "Use for a person who transcribes a musical composition, usually for a different medium from that of the original, in an arrangement the musical substance remains essentially unchanged.",
-"Use for a person (e.g., a painter) who conceives, and perhaps also implements, an original graphic design or work of art, if specific codes (e.g., [egr], [etr]) are not desired. For book illustrators, prefer Illustrator [ill]. (UF: Graphic technician)",
-"Use for a person or organization to whom a license for printing or publishing has been transferred.",
-"Use as a general relator for a name associated with or found in an item or collection, or which cannot be determined to be that of a Former owner [fmo] or other designated relator indicative of provenance.",
-"Use to relate an author, artist, etc. to a work for which there is or once was substantial authority for designating that person as author, creator, etc. of the work. (UF: Supposed name)",
-"Use for a person or corporate body in change or the estimation and public auctioning of goods, particularly books, artistic works, etc.",
-"Use for a person or corporate body chiefly responsible for the intellectual or artistic content of a work, usually printed text. This term may also be used when more than one person or body bears such responsibility. (UF: Joint author)",
-"Use for a person whose work is largely quoted or extracted in a works to which he or she did not contribute directly. Such quotations are found particularly in exhibition catalogs, collections of photographs, etc.",
-"Use for a person or corporate body responsible for an afterword, postface, colophon, etc. but who is not the chief author of a work.",
-"Use for a person or corporate body responsible for the dialog or spoken commentary for a screenplay or sound recording.",
-"Use for a person or corporate body responsible for an introduction, preface, foreword, or other critical introductory matter, but who is not the chief author.",
-"Use for a person or corporate body responsible for a motion picture screenplay, dialog, spoken commentary, etc.",
-"Use for the author responsible for a work upon which the work represented by the catalog record is based. This may be appropriate for adaptations, sequels, continuations, indexes, etc.",
-"", "(UF: Designer of binding)", "Use for the person or firm responsible for the entire graphic design of a book, including arrangement of type and illustration, choice of materials, and process used. (UF: Designer of book)",
-"Use for the person or firm responsible for the production of books and other print media, if specific codes (e.g., [bkd], [egr], [tyd], [prt]) are not desired. (UF: Producer of book)",
-"(UF: Designer of bookjacket)", "(UF: Designer of bookplate)",
-"Bowdlerizer (USE: Censor)", "", "", "Use for a censor, bowdlerizer, expurgator, etc., official or private. (UF: Bowdlerizer, Expurgator)",
-"Use for a person who composes or arranges dances or other movements (e.g., 'master of swords') for a musical or dramatic presentation or entertainment.",
-"Use for a person or organization for whom another person or organization is acting.",
-"Use for a person or corporate body that takes a limited part in the elaboration of a work of another person or corporate body that brings complements (e.g., appendices, notes) to the work.",
-"Use for a person who has brought together material from various sources, which has been arranged, described, and cataloged as a collection. The collector is neither the creator of the material nor the person to whom manuscripts in the collection may have been addressed.",
-"", "Use for a person who provides interpretation, analysis, or a discussion of the subject matter on a recording, motion picture, or other audiovisual medium.",
-"Use for a person or corporate body responsible for the commentary or explanatory notes about a text. For the writer of manuscript annotations in a printed book, use Annotator [ann].",
-"Use for a person who produces a work or publication by selecting and putting together material from the works of various persons or bodies.",
-"Use for the party who applies to the courts for redress, usually in an equity proceeding.",
-"Use for a complainant who takes an appeal from one court or jurisdiction to another to reverse the judgment, usually in an equity proceeding.",
-"Use for a complainant against whom an appeal is taken from one court or jurisdiction to another to reverse the judgment, usually in an equity proceeding.",
-"Use for a person who creates a musical work, usually a piece of music in manuscript or printed form.",
-"(UF: Typesetter)", "Use for a person or corporate body responsible for the original idea on which a work is based, this includes the scientific author of an audio-visual item and the conceptor of an advertisement.",
-"Use for a person who directs a performing group (orchestra, chorus, opera, etc.).",
-"Use for the person called upon for professional advice or services in a specialized field of knowledge or training.",
-"Use for a person or corporate body engaged specifically to provide an intellectual overview of a strategic or operational task and by analysis, specification, or instruction, to create or propose a cost-effective course of action or solution.",
-"Use for the party who opposes, resists, or disputes, in a court of law, a claim, decision, result, etc.",
-"Use for a contestant who takes an appeal from one court of law or jurisdiction to another to reverse the judgment.",
-"Use for a contestant against whom an appeal is taken from one court of law or jurisdiction to another to reverse the judgment.",
-"Use for the party defending a claim, decision, result, etc. being opposed, resisted, or disputed in a court of law.",
-"Use for a contestee who takes an appeal from one court or jurisdiction to another to reverse the judgment.",
-"Use for a contestee against whom an appeal is taken from one court or jurisdiction to another to reverse the judgment.",
-"Use for the person or corporate body who enters into a contract with another person or corporate body to perform a specific task.",
-"Use for one whose work has been contributed to a larger work, such as an anthology, serial publication, or other compilation of individual works. Do not use for someone whose sole function in relation to a work is as author, editor, compiler or translator.",
-"Use for the person listed as a copyright owner at the time of registration. Copyright can be granted or later transferred to another person or agent, at which time the claimant becomes the copyright holder.",
-"", "Use for a corrector of manuscripts, such as the scriptorium official who corrected the work of a scribe. For printed matter, use Proofreader [pfr].",
-"Use for a person or organization who was either the writer or recipient of a letter or other communication.",
-"Use for a person who designs or makes costumes, fixes hair, etc., for a musical or dramatic presentation or entertainment. // Counterfeiter (USE: Forger)",
-"Use for a person or corporate body responsible for the intellectual or artistic content of a work.",
-"Use for a person who is responsible for conceiving and organizing an exhibition.",
-"Use for a person who principally exhibits dancing skills in a musical or dramatic presentation or entertainment.",
-"Use for a person or organization to whom a book, manuscript, etc., is dedicated (not the recipient of a gift).",
-"Use for the author of a dedication, which may be a formal statement or in epistolary or verse form.",
-"Use for the party defending or denying allegations made in a suit and against whom relief or recovery is sought in the courts, usually in a legal action.",
-"Use for a defendant who takes an appeal from one court or jurisdiction to another to reverse the judgment, usually in a legal action.",
-"Use for a defendant against whom an appeal is taken from one court or jurisdiction to another to reverse the judgment, usually in a legal action.",
-"Use for the corporate body granting a degree for which the thesis or dissertation described was presented.",
-"Use for a person or organization executing technical drawings from others' designs. // Deponent (USE: Witness)",
-"Use for a person or organization placing material in the physical custody of a library or repository without transferring the legal title.",
-"Use for a person or organization responsible for design if specific codes (e.g., [bkd], [tyd]) are not desired. // Designer of binding (USE: Binding designer) // Designer of book (USE: Book designer) // Designer of bookjacket (USE: Bookjacket designer) // Designer of bookplate (USE: Bookplate designer) // Designer of type (USE: Type designer)",
-"Use for a person who is responsible for the general management of a work or who supervises the production of a performance for stage, screen, or sound recording.",
-"Use for a person who presents a thesis for a university or higher-level educational degree.",
-"Use for an agent or agency that has exclusive or shared marketing rights for an item.",
-"Use for the donor of a book, manuscript, etc., to its present owner. Donors to previous owners are designated as Former owner [fmo] or Inscriber [ins].",
-"Use for the person who prepares technical or mechanical drawings. (UF: Technical draftsman)",
-"Use for a person or corporate body to which authorship has been dubiously or incorrectly ascribed.",
-"Use for a person who prepares for publication a work not primarily his/her own, such as by elucidating text, adding introductory or other critical matter, or technically directing an editorial staff.",
-"", "Use for a person or organization that is responsible for technical planning and design, particularly with construction.",
-"", "", "Use for a person in charge of the description and appraisal of the value of goods, particularly rare items, works of art, etc. (UF: Appraiser) // Eyewitness (USE: Witness) // Expurgator (USE: Censor)",
-"Use for the person or body that executed the facsimile. (UF: Copier)",
-"Use for an editor of a motion picture film. This term is used regardless of the medium upon which the motion picture is produced or manufactured (e.g., acetate film, video tape). (UF: Motion picture editor)",
-"(UF: Copier, Counterfeiter)", "Use for the person or organization who owned an item at any time in the past. Includes those to whom the material was once presented. The person or organization giving the item to the present owner is designated as Donor [dnr]",
-"Use for the person or agency that furnished financial support for the production of the work. // Graphic technician (USE: Artist) [Relator term 'Graphic technician' (coded [grt]) used before March 1988 only.]",
-"Use for the person in memory or honor of whom a book, manuscript, etc. is donated. (UF: Memorial)",
-"Use for the person who is invited or regularly leads a program (often broadcast) that includes other guests, performers, etc. (e.g., talk show host).",
-"", "Use for the person who conceives, and perhaps also implements, a design or illustration, usually to accompany a written text. // Imprimatur (USE: Licensor)",
-"Use for the person who signs a presentation statement.", "Use for a person who principally plays an instrument in a musical or dramatic presentation or entertainment.",
-"", "", "// Investigator (USE: Originator) // Joint author (USE: Author)",
-"Use for the person or organization whose work involves coordinating the arrangement of existing and proposed land features and structures. ",
-"Use for a person or organization permitting the temporary use of a book, manuscript, etc., such as for photocopying or microfilming.",
-"Use for the party who files a libel in an ecclesiastical or admiralty case.",
-"Use for a libelant who takes an appeal from one ecclesiastical court or admiralty to another to reverse the judgment.",
-"Use for a libelant against whom an appeal is taken from one ecclesiastical court or admiralty to another to reverse the judgment.",
-"Use for the party against whom a libel has been filed in an ecclesiastical court or admiralty.",
-"Use for a libelee who takes an appeal from one ecclesiastical court or admiralty to another to reverse the judgment.",
-"Use for a libelee against whom an appeal is taken from one ecclesiastical court or admiralty to another to reverse the judgment.",
-"Use for the writer of the text of an opera, oratorio, etc.",
-"Use for the original recipient of the right to print or publish.",
-"Use for the signer of the license, imprimatur, etc. (UF: Imprimatur)",
-"Use for the person who prepares the stone or plate for lithographic printing, including a graphic artist creating a design directly on the surface from which printing will be done.",
-"Use for the writer of the text of a song. // Memorial (USE: Honoree)",
-"Use for the person or organization primarily responsible for compiling and maintaining the original description of a metadata set (e.g., geospatial metadata set).",
-"", "Use for the person who leads a program (often broadcast) where topics are discussed, usually with participation of experts in fields related to the discussion.",
-"Use for a person or organization that supervises compliance with the contract and is responsible for the report and controls its distribution. Sometimes referred to as the grantee, or controlling agency. // Motion picture editor (USE: Film editor)",
-"Use for the person who performs music or contributes to the musical content of a work when it is not possible or desirable to identify the function more precisely.",
-"Use for the speaker who relates the particulars of an act, occurrence, or course of events. // Observer (USE: Witness) // Onlooker (USE: Witness)",
-"Use for the person or corporate body responsible for opposing a thesis or dissertation.",
-"Use for the person or corporate body responsible for organizing a meeting for which an item is the report or proceedings.",
-"Use for the author or agency performing the work, i.e., the name of a person or organization associated with the intellectual content of the work. This category does not include the publisher or personal affiliation, or sponsor except where it is also the corporate author. Includes a person designated in the work as investigator or principal investigator. (UF: Principal investigator)",
-"Use for relator codes from other lists which have no equivalent in the MARC list or for terms which have not been assigned a code.",
-"Use for the person or organization that currently owns an item or collection.",
-"", "Use for the person or corporate body that applied for a patent.",
-"Use for the person or corporate body that was granted the patent referred to by the item. (UF: Patentee) // Patentee (USE: Patent holder)",
-"Use for the person responsible for commissioning a work. Usually a patron uses his or her means or influence to support the work of artists, writers, etc. This includes those who commission and pay for individual works.",
-"User for a person who exhibits musical or acting skills i a musical or dramatic presentation or entertainment, if specific codes for those functions ([act], [dnc], [itr], [voc], etc.) are not used. If specific codes are used, [prf] is used for a person whose principal skill is not known or specified. // Performer of research (USE: Researcher)",
-"Use for the person or organization responsible for taking photographs, whether they are used in their original form or as reproductions.",
-"Use for the party who complains or sues in court in a personal action, usually in a legal proceeding.",
-"Use for a plaintiff who takes an appeal from one court or jurisdiction to another to reverse the judgment, usually in a legal proceeding.",
-"Use for a plaintiff against whom an appeal is taken from one court or jurisdiction to another to reverse the judgment, usually in a legal proceeding.",
-"// Plates, Printer of (USE: Printer of Plates) // Principal investigator (USE: Originator)",
-"Use for the person or organization who prints texts, whether from type or plates.",
-"Use for the person or organization who prints illustrations from plates. (UF: Plates, Printer of)",
-"Use for a person or organization primarily responsible for performing or initiating a process, such as is done with the collection of metadata sets.",
-"Use for a person who is responsible for the making of a motion picture, including business aspects, management of the productions, and the commercial success of the work. // Producer of book (USE: Book producer)",
-"Use for a person who is associated with the production (props, lighting, special effects, etc.) of a musical or dramatic presentation or entertainment.",
-"Use for a person or corporate body responsible for the creation and/or maintenance of computer program design documents, source code, and machine-executable digital files and supporting documentation. // Promoter (USE: Thesis advisor)",
-"Use for a person who corrects printed matter. For manuscripts, use Corrector [crr].",
-"", "Use for a person who presides over the elaboration of a collective work to ensure its coherence or continuity. This includes editors-in-chief, literary editors, editors of series, etc.",
-"Use for the person to whom correspondence is addressed.", "Use for a person who supervises the technical aspects of a sound or video recording session.",
-"Use for a person who writes or develops the framework for an item without being intellectually responsible for its content.",
-"Use for the draftsman who prepares drawings of architectural designs (i.e., renderings) in accurate, representational perspective to show what the project will look like when completed.",
-"Use for the person or corporate body that directed or managed a research project.",
-"Use for the person or corporate body that participated in a research project but whose role did not involve direction or management of it.",
-"Use for the person or corporate body responsible for performing research. (UF: Performer of research)",
-"Use for the party who makes an answer to the courts pursuant to an application for redress, usually in an equity proceeding.",
-"Use for a respondent who takes an appeal from one court or jurisdiction to another to reverse the judgment, usually in an equity proceeding.",
-"Use for a respondent against whom an appeal is taken from one court or jurisdiction to another to reverse the judgment, usually in an equity proceeding.",
-"Use for a person or corporate body responsible for the review of book, motion picture, performance, etc.",
-"", "Use for the author of a motion picture screenplay.", "Use for a person who brings scientific, pedagogical, or historical competence to the conception and realization on a work, particularly in the case of audio-visual items.",
-"Use for an amanuensis and for a writer of manuscripts proper. For a person who makes pen-facsimiles, use Facsimilist [fac].",
-"Use when the more general term Artist [art] is not desired.",
-"Use for a recorder, redactor, or other person responsible for expressing the views of a corporate body.",
-"Use for the person whose signature appears without a presentation or other statement indicative of provenance. When there is a presentation statement, use Inscriber [ins].",
-"Use for a person who uses his or her voice with or without instrumental accompaniment to produce music. A singer's performance may or may not include actual words.",
-"Use for a person who participates in a program (often broadcast) and makes a formalized contribution or presentation generally prepared in advance.",
-"Use for the person or agency that issued a contract or under the auspices of which a work has been written, printed, published, etc.",
-"Use for a corporate body or agency responsible for the development or enforcement of a standard.",
-"// Supposed name (USE: Attributed name)", "Use for a person or organization who does measurements of tracts of land, etc. to determine location, forms, and boundaries. // Technical draftsman (USE: Draftsman) // Testifier (USE: Witness)",
-"Use for the person under whose supervision a degree candidate develops and presents a thesis, memoire, or text of a dissertation. (UF: Promoter)",
-"Use for a person who prepares a handwritten or typewritten copy from original material, including from dictated or orally recorded material. For makers of pen-facsimiles, use Facsimilist [fac].",
-"Use for a person who renders a text from one language into another, or from an older form of a language into the modern form.",
-"Use for the person who designed the type face used in a particular item. (UF: Designer of type) // Typesetter (USE: Compositor)",
-"Use for the person primarily responsible for choice and arrangement of type used in an item. If the typographer is also responsible for other aspects of the graphic design of a book (e.g., Book designer [bkd]), codes for both functions may be needed.",
-"Use for a person who principally exhibits singing skills in a musical or dramatic presentation or entertainment.",
-"Use for a person who verifies the truthfulness of an event or action. (UF: Deponent, Eyewitness, Observer, Onlooker, Testifier)",
-"User for a person who makes prints by cutting the image in relief on the end-grain of a wood block.",
-"User for a person who makes prints by cutting the image in relief on the plank side of a wood block.",
-"Use for a person who writes significant material which accompanies a sound recording or other audiovisual material."
-), usage = c("", "", "", "", "", "", "", "", "", "", "", "Use for full authors who have made substantial contributions to the package and should show up in the package citation.",
-"", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "",
-"", "", "", "", "", "", "", "Use for package maintainers that collected code (potentially in other languages) but did not make further substantial contributions to the package.",
-"", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "",
-"Use for authors who have made smaller contributions (such as code patches etc.) but should not show up in the package citation.",
-"", "Use for all copyright holders.", "", "", "", "Use for the package maintainer.",
-"", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "",
-"", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "",
-"", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "",
-"", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "",
-"", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "",
-"", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "",
-"", "", "", "", "", "", "", "", "If the package is part of a thesis, use for the thesis advisor.",
-"", "If the R code is merely a translation from another language (typically S), use for the translator to R.",
-"", "", "", "", "", "", "")), .Names = c("term", "code", "description",
-"usage"), class = "data.frame", row.names = c(NA, -173L))
-MARC_relator_db_codes_used_with_R <-
-c("aut", "com", "ctb", "cph", "cre", "ths", "trl")
diff --git a/src/library/utils/R/RShowDoc.R b/src/library/utils/R/RShowDoc.R
index f082bb8..a375a6e 100644
--- a/src/library/utils/R/RShowDoc.R
+++ b/src/library/utils/R/RShowDoc.R
@@ -1,7 +1,7 @@
 #  File src/library/utils/R/RShowDoc.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
-#  Copyright (C) 1995-2013 The R Core Team
+#  Copyright (C) 1995-2015 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
@@ -14,9 +14,9 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
-RShowDoc <- function(what, type=c("pdf", "html", "txt"), package)
+RShowDoc <- function(what, type = c("pdf", "html", "txt"), package)
 {
     paste. <- function(x, ext) paste(x, ext, sep=".")
     pdf_viewer <- function(path) {
@@ -100,7 +100,7 @@ RShowDoc <- function(what, type=c("pdf", "html", "txt"), package)
             }
         }
         ## This is in UTF-8 and has a BOM on the first line
-        path <- file.path(R.home(), what)
+        path <- file.path(R.home("doc"), what)
         tf <- tempfile()
         tmp <- readLines(path)
         tmp[1] <- ""
diff --git a/src/library/utils/R/RSiteSearch.R b/src/library/utils/R/RSiteSearch.R
index 362440f..f15c135 100644
--- a/src/library/utils/R/RSiteSearch.R
+++ b/src/library/utils/R/RSiteSearch.R
@@ -1,7 +1,7 @@
 #  File src/library/utils/R/RSiteSearch.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
-#  Copyright (C) 1995-2012 The R Core Team
+#  Copyright (C) 1995-2015 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
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 RSiteSearch <- function(string,
                         restrict = c("functions", "vignettes", "views"),
@@ -25,7 +25,7 @@ RSiteSearch <- function(string,
 			matchesPerPage = 20)
 {
     string <- paste0("http://search.r-project.org/cgi-bin/namazu.cgi?query=",
-		     gsub(" ", "+", string))
+		     URLencode(gsub(" ", "+", string), reserved = TRUE))
     mpp <- paste0("max=", matchesPerPage)
     format <- paste0("result=", match.arg(format))
 
@@ -45,9 +45,9 @@ RSiteSearch <- function(string,
 			    "size:descending"	 = "field:size:descending"))
 
     ## we know this is a http:// URL, so encoding should be safe.
-    ## it seems that firefox on Mac OS needs it for {...}
+    ## it seems that firefox on macOS needs it for {...}
     ## OTOH, Namazu does not decode in, say, sort=date:late.
-    qstring <- paste(URLencode(string), mpp, format, sortby, restr, sep = "&")
+    qstring <- paste(string, mpp, format, sortby, restr, sep = "&")
     browseURL(qstring)
     cat(gettextf("A search query has been submitted to %s",
                  "http://search.r-project.org"), "\n", sep = "")
diff --git a/src/library/utils/R/Rprof.R b/src/library/utils/R/Rprof.R
index 8a8c6d4..15a777b 100644
--- a/src/library/utils/R/Rprof.R
+++ b/src/library/utils/R/Rprof.R
@@ -1,5 +1,5 @@
 #  File src/library/utils/R/Rprof.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
 #  Copyright (C) 1995-2013 The R Core Team
 #
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 Rprof <- function(filename = "Rprof.out", append = FALSE, interval =  0.02,
                   memory.profiling = FALSE, gc.profiling = FALSE,
diff --git a/src/library/utils/R/Sweave.R b/src/library/utils/R/Sweave.R
index 59ee1b0..2beb094 100644
--- a/src/library/utils/R/Sweave.R
+++ b/src/library/utils/R/Sweave.R
@@ -1,7 +1,7 @@
 #   File src/library/utils/R/Sweave.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
-#  Copyright (C) 1995-2014 The R Core Team
+#  Copyright (C) 1995-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
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 ### The drivers are now in SweaveDrivers.R
 
@@ -216,7 +216,8 @@ SweaveReadFile <- function(file, syntax, encoding = "")
 
     if (encoding != "bytes")  {
         ## now sort out an encoding, if needed.
-        enc <- tools:::.getVignetteEncoding(text, convert = TRUE)
+        enc <- tools:::.getVignetteEncoding(text,
+			    default = if (identical(encoding, "")) NA else encoding)
         if (enc == "non-ASCII") {
             enc <- if (nzchar(encoding)) {
                 encoding
@@ -385,7 +386,7 @@ SweaveParseOptions <- function(text, defaults = list(), check = NULL)
         if (length(x[[1L]]) == 1L) x[[1L]] <- c("label", x[[1L]])
     } else return(defaults)
 
-    if (any(sapply(x, length) != 2L))
+    if (any(lengths(x) != 2L))
         stop(gettextf("parse error or empty option in\n%s", text), domain = NA)
 
     options <- defaults
@@ -416,7 +417,7 @@ SweaveHooks <- function(options, run = FALSE, envir = .GlobalEnv)
 }
 
 ### For R CMD xxxx ------------------------------------------
-.Sweave <- function(args = NULL)
+.Sweave <- function(args = NULL, no.q = interactive())
 {
     options(warn = 1)
     if (is.null(args)) {
@@ -446,11 +447,15 @@ SweaveHooks <- function(options, run = FALSE, envir = .GlobalEnv)
             '                  "no" (default), "qpdf", "gs", "gs+qpdf", "both"',
             "  --compact       same as --compact=qpdf",
             "",
-            "Report bugs at bugs.r-project.org .",
+            "Report bugs at <https://bugs.R-project.org>.",
             sep = "\n")
     }
-    do_exit <- function(status = 0L)
-        q("no", status = status, runLast = FALSE)
+    do_exit <-
+	if(no.q)
+	    function(status = 1L) (if(status) stop else message)(
+		".Sweave() exit status ", status)
+	else
+	    function(status = 1L) q("no", status = status, runLast = FALSE)
 
     if (!length(args)) {
         Usage()
@@ -527,7 +532,7 @@ SweaveHooks <- function(options, run = FALSE, envir = .GlobalEnv)
 	## .build_packages() ...
 	message("Compacting PDF document")
 	if(compact %in% c("gs", "gs+qpdf", "both")) {
-	    gs_cmd <- tools:::find_gs_cmd(Sys.getenv("R_GSCMD", ""))
+	    gs_cmd <- tools::find_gs_cmd(Sys.getenv("R_GSCMD", ""))
 	    gs_quality <- "ebook"
 	} else {
 	    gs_cmd <- ""
@@ -546,7 +551,7 @@ SweaveHooks <- function(options, run = FALSE, envir = .GlobalEnv)
     do_exit()
 }
 
-.Stangle <- function(args = NULL)
+.Stangle <- function(args = NULL, no.q = interactive())
 {
     options(warn = 1)
     if (is.null(args)) {
@@ -567,11 +572,15 @@ SweaveHooks <- function(options, run = FALSE, envir = .GlobalEnv)
             "  --encoding=enc  assume encoding 'enc' for file",
             "  --options=      comma-separated list of Stangle options",
             "",
-            "Report bugs at bugs at r-project.org .",
+            "Report bugs at <https://bugs.R-project.org>.",
             sep = "\n")
     }
-    do_exit <- function(status = 0L)
-        q("no", status = status, runLast = FALSE)
+    do_exit <-
+	if(no.q)
+	    function(status = 1L) (if(status) stop else message)(
+		".Stangle() exit status ", status)
+	else
+	    function(status = 1L) q("no", status = status, runLast = FALSE)
 
     if (!length(args)) {
         Usage()
diff --git a/src/library/utils/R/SweaveDrivers.R b/src/library/utils/R/SweaveDrivers.R
index 1bb5261..57cf566 100644
--- a/src/library/utils/R/SweaveDrivers.R
+++ b/src/library/utils/R/SweaveDrivers.R
@@ -1,7 +1,7 @@
 #   File src/library/utils/R/SweaveDrivers.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
-#  Copyright (C) 1995-2013 The R Core Team
+#  Copyright (C) 1995-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
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 RweaveLatex <- function()
 {
@@ -36,7 +36,7 @@ RweaveLatexSetup <-
     dots <- list(...)
     if (is.null(output)) {
         prefix.string <- basename(sub(syntax$extension, "", file))
-        output <- paste(prefix.string, "tex", sep = ".")
+        output <- paste0(prefix.string, ".tex")
     } else prefix.string <- basename(sub("\\.tex$", "", output))
 
     if (!quiet) cat("Writing to file ", output, "\n",
@@ -95,21 +95,21 @@ makeRweaveLatexCodeRunner <- function(evalFunc = RweaveEvalWithOpt)
     ## only once.
     function(object, chunk, options) {
         pdf.Swd <- function(name, width, height, ...)
-            grDevices::pdf(file = paste(chunkprefix, "pdf", sep = "."),
+            grDevices::pdf(file = paste0(chunkprefix, ".pdf"),
                            width = width, height = height,
                            version = options$pdf.version,
                            encoding = options$pdf.encoding,
                            compress = options$pdf.compress)
         eps.Swd <- function(name, width, height, ...)
-            grDevices::postscript(file = paste(name, "eps", sep = "."),
+            grDevices::postscript(file = paste0(name, ".eps"),
                                   width = width, height = height,
                                   paper = "special", horizontal = FALSE)
         png.Swd <- function(name, width, height, options, ...)
-            grDevices::png(filename = paste(chunkprefix, "png", sep = "."),
+            grDevices::png(filename = paste0(chunkprefix, ".png"),
                            width = width, height = height,
                            res = options$resolution, units = "in")
         jpeg.Swd <- function(name, width, height, options, ...)
-            grDevices::jpeg(filename = paste(chunkprefix, "jpeg", sep = "."),
+            grDevices::jpeg(filename = paste0(chunkprefix, ".jpeg"),
                             width = width, height = height,
                             res = options$resolution, units = "in")
 
@@ -133,13 +133,28 @@ makeRweaveLatexCodeRunner <- function(evalFunc = RweaveEvalWithOpt)
                 devs <- c(devs, list(jpeg.Swd))
                 devoffs <- c(devoffs, list(grDevices::dev.off))
             }
-            if (nzchar(grd <- options$grdevice)) {
-                devs <- c(devs, list(get(grd, envir = .GlobalEnv)))
-                grdo <- paste(grd, "off", sep = ".")
-                devoffs <- c(devoffs,
-                             if (exists(grdo, envir = .GlobalEnv))
-                                 list(get(grdo, envir = .GlobalEnv))
-                             else list(grDevices::dev.off))
+            if(nzchar(grd <- options$grdevice)) {
+                grdo <- paste0(grd, ".off")
+                if(grepl("::", grd, fixed = TRUE)) {
+                    devs <- c(devs, eval(parse(text = grd)))
+                    devoffs <-
+                        c(devoffs,
+                          if(!inherits(grdo <-
+                                           tryCatch(eval(parse(text = grdo)),
+                                                    error = identity),
+                                       "error"))
+                              list(grdo)
+                          else
+                              list(grDevices::dev.off))
+                } else {
+                    devs <- c(devs, list(get(grd, envir = .GlobalEnv)))
+                    devoffs <-
+                        c(devoffs,
+                          if(exists(grdo, envir = .GlobalEnv))
+                              list(get(grdo, envir = .GlobalEnv))
+                          else
+                              list(grDevices::dev.off))
+                }
             }
         }
         if (!object$quiet) {
@@ -173,7 +188,7 @@ makeRweaveLatexCodeRunner <- function(evalFunc = RweaveEvalWithOpt)
             ## [x][[1L]] avoids partial matching of x
             chunkout <- object$chunkout[chunkprefix][[1L]]
             if (is.null(chunkout)) {
-                chunkout <- file(paste(chunkprefix, "tex", sep = "."), "w")
+                chunkout <- file(paste0(chunkprefix, ".tex"), "w")
                 if (!is.null(options$label))
                     object$chunkout[[chunkprefix]] <- chunkout
                 if(!grepl(.SweaveValidFilenameRegexp, chunkout))
@@ -207,12 +222,12 @@ makeRweaveLatexCodeRunner <- function(evalFunc = RweaveEvalWithOpt)
                 openSinput <<- TRUE
             }
             leading <- max(leading, 1L) # safety check
-            cat("\n", paste(getOption("prompt"), dce[seq_len(leading)],
-                            sep = "", collapse = "\n"),
+            cat("\n", paste0(getOption("prompt"), dce[seq_len(leading)],
+                             collapse = "\n"),
                 file = chunkout, sep = "")
             if (length(dce) > leading)
-                cat("\n", paste(getOption("continue"), dce[-seq_len(leading)],
-                                sep = "", collapse = "\n"),
+                cat("\n", paste0(getOption("continue"), dce[-seq_len(leading)],
+                                 collapse = "\n"),
                     file = chunkout, sep = "")
             linesout[thisline + seq_along(dce)] <<- srcline
             filenumout[thisline + seq_along(dce)] <<- srcfilenum
@@ -220,19 +235,17 @@ makeRweaveLatexCodeRunner <- function(evalFunc = RweaveEvalWithOpt)
         }
 
         trySrcLines <- function(srcfile, showfrom, showto, ce) {
-	    lines <- tryCatch(suppressWarnings(getSrcLines(srcfile, showfrom, showto)),
-			      error = function(e)e)
-	    if (inherits(lines, "error")) {
-		lines <- if (is.null(ce)) character()
-		else deparse(ce, width.cutoff = 0.75*getOption("width"))
-            }
-            lines
+	    tryCatch(suppressWarnings(getSrcLines(srcfile, showfrom, showto)),
+                     error = function(e) {
+                         if (is.null(ce)) character()
+                         else deparse(ce, width.cutoff = 0.75*getOption("width"))
+                     })
         }
 
         echoComments <- function(showto) {
             if (options$echo && !is.na(lastshown) && lastshown < showto) {
                 dce <- trySrcLines(srcfile, lastshown + 1L, showto, NULL)
-                linedirs <- grepl("^#line ", dce)
+                linedirs <- startsWith(dce, "#line ")
 		dce <- dce[!linedirs]
 		if (length(dce))
                     putSinput(dce, length(dce)) # These are all trailing comments
@@ -252,7 +265,7 @@ makeRweaveLatexCodeRunner <- function(evalFunc = RweaveEvalWithOpt)
         thisline <- 0L             # current output line
         lastshown <- 0L            # last line already displayed;
 
-        refline <- NA    # line containing the current named chunk ref
+##        refline <- NA    # line containing the current named chunk ref
         leading <- 1L    # How many lines get the user prompt
 
         srcrefs <- attr(chunkexps, "srcref")
@@ -281,7 +294,7 @@ makeRweaveLatexCodeRunner <- function(evalFunc = RweaveEvalWithOpt)
                 lastshown <- showto
                 srcline <- srcref[3L]
 
-                linedirs <- grepl("^#line ", dce)
+                linedirs <- startsWith(dce, "#line ")
                 dce <- dce[!linedirs]
                 # Need to reduce leading lines if some were just removed
                 leading <- leading - sum(linedirs[seq_len(leading)])
@@ -461,7 +474,7 @@ RweaveLatexWritedoc <- function(object, chunk)
 	               filenum <- attr(chunk, "srcFilenum")[pos[1L]]
                        filename <- attr(chunk, "srcFilenames")[filenum]
                        location <- paste0(basename(filename), ":", attr(chunk, "srclines")[pos[1L]])
-		       stop("at ",location, ", ", conditionMessage(e), call. = FALSE)
+		       stop("at ",location, ", ", conditionMessage(e), domain = NA, call. = FALSE)
 		   })
             ## protect against character(), because sub() will fail
             if (length(val) == 0L) val <- ""
@@ -489,7 +502,7 @@ RweaveLatexWritedoc <- function(object, chunk)
             object$options$label <- "concordance"
             prefix <- RweaveChunkPrefix(object$options)
             object$options$label <- savelabel
-            object$concordfile <- paste(prefix, "tex", sep = ".")
+            object$concordfile <- paste0(prefix, ".tex")
             chunk[pos[1L]] <- sub(object$syntax$docopt,
                                   paste0("\\\\input{", prefix, "}"),
                                   chunk[pos[1L]])
@@ -633,7 +646,7 @@ RweaveEvalWithOpt <- function (expr, options)
         if (inherits(res, "try-error")) return(res)
         if (options$print || (options$term && res$visible)) {
             if (.isMethodsDispatchOn() && isS4(res$value))
-                methods:::show(res$value) else print(res$value)
+                methods::show(res$value) else print(res$value)
         }
     }
     res
@@ -665,13 +678,13 @@ Rtangle <-  function()
 
 RtangleSetup <-
     function(file, syntax, output = NULL, annotate = TRUE, split = FALSE,
-             quiet = FALSE, ...)
+             quiet = FALSE, drop.evalFALSE = FALSE, ...)
 {
     dots <- list(...)
     if (is.null(output)) {
         prefix.string <- basename(sub(syntax$extension, "", file))
         ## This is odd, since for split = TRUE it uses the engine name.
-        output <- paste(prefix.string, "R", sep = ".")
+        output <- paste0(prefix.string, ".R")
     } else
         prefix.string <- basename(sub("\\.[rsRS]$", "", output))
 
@@ -706,11 +719,25 @@ RtangleSetup <-
     options <- RweaveLatexOptions(options)
 
     list(output = output, annotate = annotate, options = options,
-         chunkout = list(), quiet = quiet, syntax = syntax)
+         chunkout = list(), quiet = quiet, syntax = syntax,
+         drop.evalFALSE = drop.evalFALSE)
 }
 
+.RtangleCodeLabel <- function(chunk) {
+    if(length(lnos <- grep("^#line ", chunk, value = TRUE))) {
+        srclines <- attr(chunk, "srclines")
+        ## srcfilenum <- attr(chunk, "srcFilenum")
+        ## this currently includes the chunk header
+        lno <- if (length(srclines))
+                   paste(min(srclines), max(srclines), sep = "-")
+               else srclines
+        fn <- sub('[^"]*"([^"]+).*', "\\1", lnos[1L])
+        paste(fn, lno, sep = ":")
+    } else
+        "(missing #line/file info)"
+}
 
-RtangleRuncode <-  function(object, chunk, options)
+RtangleRuncode <- function(object, chunk, options)
 {
     if (!(options$engine %in% c("R", "S"))) return(object)
 
@@ -732,23 +759,18 @@ RtangleRuncode <-  function(object, chunk, options)
     } else
         chunkout <- object$output
 
-    if (object$annotate) {
-        lnos <- grep("^#line ", chunk, value = TRUE)
-        if(length(lnos)) {
-            srclines <- attr(chunk, "srclines")
-            srcfilenum <- attr(chunk, "srcFilenum")
-            ## this currently includes the chunk header
-            lno <- if (length(srclines)) paste(min(srclines), max(srclines), sep = "-") else srclines
-            fn <- sub('[^"]*"([^"]+).*', "\\1", lnos[1L])
-        }
-        cat("###################################################\n",
-            "### code chunk number ", options$chunknr,
-            ": ",
-            if(!is.null(options$label)) options$label
-            else paste(fn, lno, sep = ":"),
-            ifelse(options$eval, "", " (eval = FALSE)"), "\n",
-            "###################################################\n",
-            file = chunkout, sep = "")
+    showOut <- options$eval || !object$drop.evalFALSE
+    if(showOut) {
+        annotate <- object$annotate
+        if (is.logical(annotate) && annotate) {
+            cat("###################################################\n",
+                "### code chunk number ", options$chunknr, ": ",
+                if(!is.null(ol <- options$label)) ol else .RtangleCodeLabel(chunk),
+                if(!options$eval) " (eval = FALSE)", "\n",
+                "###################################################\n",
+                file = chunkout, sep = "")
+        } else if(is.function(annotate))
+            annotate(options, chunk = chunk, output = chunkout)
     }
 
     ## The next returns a character vector of the logical options
@@ -758,10 +780,12 @@ RtangleRuncode <-  function(object, chunk, options)
         cat("getOption(\"SweaveHooks\")[[\"", k, "\"]]()\n",
             file = chunkout, sep = "")
 
-    if (!options$show.line.nos)
-        chunk <- grep("^#line ", chunk, value = TRUE, invert = TRUE)
-    if (!options$eval) chunk <- paste("##", chunk)
-    cat(chunk, "\n", file = chunkout, sep = "\n")
+    if(showOut) {
+        if (!options$show.line.nos) # drop "#line ...." lines
+            chunk <- grep("^#line ", chunk, value = TRUE, invert = TRUE)
+        if (!options$eval) chunk <- paste("##", chunk)
+        cat(chunk, "\n", file = chunkout, sep = "\n")
+    }
     if (is.null(options$label) && options$split) close(chunkout)
     object
 }
diff --git a/src/library/utils/R/URLencode.R b/src/library/utils/R/URLencode.R
index 8fc5262..f62f63f 100644
--- a/src/library/utils/R/URLencode.R
+++ b/src/library/utils/R/URLencode.R
@@ -1,7 +1,7 @@
 #  File src/library/utils/R/URLencode.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
-#  Copyright (C) 1995-2014 The R Core Team
+#  Copyright (C) 1995-2015 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
@@ -14,10 +14,12 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
-URLencode <- function(URL, reserved = FALSE)
+URLencode <- function(URL, reserved = FALSE, repeated = FALSE)
 {
+    if(!repeated && grepl("%[[:xdigit:]]{2}", URL, useBytes = TRUE))
+        return(URL)
     ## It is unsafe to use ranges here as collation is locale-dependent.
     ## We want to do this on characters and not on bytes.
     OK <- paste0("[^",
@@ -28,8 +30,10 @@ URLencode <- function(URL, reserved = FALSE)
     x <- strsplit(URL, "")[[1L]]
     z <- grep(OK, x)
     if(length(z)) {
-        y <- sapply(x[z], function(x)
-                    paste0("%", as.character(charToRaw(x)), collapse = ""))
+        y <- sapply(x[z],
+                    function(x)
+                        paste0("%", toupper(as.character(charToRaw(x))),
+                               collapse = ""))
         x[z] <- y
     }
     paste(x, collapse = "")
diff --git a/src/library/utils/R/adist.R b/src/library/utils/R/adist.R
index 907e43d..18dccf1 100644
--- a/src/library/utils/R/adist.R
+++ b/src/library/utils/R/adist.R
@@ -1,5 +1,5 @@
 #  File src/library/utils/R/adist.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
 #  Copyright (C) 1995-2012 The R Core Team
 #
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 adist <-
 function(x, y = NULL, costs = NULL, counts = FALSE, fixed = TRUE,
diff --git a/src/library/utils/R/alarm.R b/src/library/utils/R/alarm.R
index 7e673c6..0af174d 100644
--- a/src/library/utils/R/alarm.R
+++ b/src/library/utils/R/alarm.R
@@ -1,5 +1,5 @@
 #  File src/library/utils/R/alarm.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
 #  Copyright (C) 1995-2012 The R Core Team
 #
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 alarm <- function() {cat("\a"); flush.console()}
 
diff --git a/src/library/utils/R/apropos.R b/src/library/utils/R/apropos.R
index cb35682..374d66d 100644
--- a/src/library/utils/R/apropos.R
+++ b/src/library/utils/R/apropos.R
@@ -1,7 +1,7 @@
 #  File src/library/utils/R/apropos.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
-#  Copyright (C) 1995-2012 The R Core Team
+#  Copyright (C) 1995-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
@@ -14,19 +14,35 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
+
+## a list from base-internal.Rd
+.dot_internals <- c(".subset", ".subset2", ".getRequiredPackages",
+                    ".getRequiredPackages2", ".isMethodsDispatchOn",
+                    ".row_names_info", ".set_row_names", ".ArgsEnv",
+                    ".genericArgsEnv", ".TAOCP1997init", ".gt",
+                    ".gtn", ".primTrace", ".primUntrace",
+                    ".POSIXct", ".POSIXlt", ".cache_class",
+                    ".Firstlib_as_onload", ".methodsNamespace",
+                    ".popath", ".mapply", ".detach", ".maskedMsg")
+
 
 apropos <- function (what, where = FALSE, ignore.case = TRUE, mode = "any")
 {
     stopifnot(is.character(what))
     x <- character(0L)
     check.mode <- mode != "any"
-    for (i in seq_along(search())) {
+    for (i in seq_along(sp <- search())) {
 	li <-
 	    if(ignore.case)
 		grep(what, ls(pos = i, all.names = TRUE),
 		     ignore.case = TRUE, value = TRUE)
 	    else ls(pos = i, pattern = what, all.names = TRUE)
+
+        ## Treat anything starting with .__, .C_R or .F_ as internal
+        li <- grep("^[.](__|C_|F_)", li, invert = TRUE, value = TRUE)
+        if(sp[i] == "package:base") li <- li[! li %in% .dot_internals]
+
 	if(length(li)) {
 	    if(check.mode)
 		li <- li[sapply(li, exists, where = i,
@@ -44,9 +60,6 @@ find <- function(what, mode = "any", numeric = FALSE, simple.words=TRUE)
         warning("elements of 'what' after the first will be ignored")
         what <- what[1L]
     }
-#   would need to escape at least + * | as well
-#     if(simple.words)
-# 	what <- gsub("([.[])", "\\\\\\1", paste0("^",what,"$"))
     len.s <- length(sp <- search())
     ind <- logical(len.s)
     check.mode <- mode != "any"
@@ -58,6 +71,9 @@ find <- function(what, mode = "any", numeric = FALSE, simple.words=TRUE)
             ind[i] <- found
         } else {
             li <- ls(pos = i, pattern = what, all.names = TRUE)
+            ## Treat anything starting with .__, .C_R or .F_ as internal
+            li <- grep("^[.](__|C_|F_)", li, invert = TRUE, value = TRUE)
+            if(sp[i] == "package:base") li <- li[! li %in% .dot_internals]
             ll <- length(li)
             if(ll > 0 && check.mode) {
                 mode.ok <- sapply(li, exists, where = i, mode = mode,
diff --git a/src/library/utils/R/aspell.R b/src/library/utils/R/aspell.R
index 5cabeca..c9008a2 100644
--- a/src/library/utils/R/aspell.R
+++ b/src/library/utils/R/aspell.R
@@ -1,7 +1,7 @@
 #  File src/library/utils/R/aspell.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
-#  Copyright (C) 1995-2013 The R Core Team
+#  Copyright (C) 1995-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
@@ -14,8 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
-
+#  https://www.R-project.org/Licenses/
 
 aspell <-
 function(files, filter, control = list(), encoding = "unknown",
@@ -79,7 +78,7 @@ function(files, filter, control = list(), encoding = "unknown",
     else if(!is.function(filter))
         stop("Invalid 'filter' argument.")
 
-    encoding <- rep(encoding, length.out = length(files))
+    encoding <- rep_len(encoding, length(files))
 
     verbose <- getOption("verbose")
 
@@ -154,6 +153,10 @@ function(files, filter, control = list(), encoding = "unknown",
             do.call(filter, c(list(file, encoding = enc), filter_args))
         }
 
+        ## Allow filters to pass additional control arguments, in case
+        ## these need to be inferred from the file contents.
+        control <- c(control, attr(lines, "control"))
+
         ## Need to escape all lines with carets to ensure Aspell handles
         ## them as data: the Aspell docs say
         ##   It is recommended that programmatic interfaces prefix every
@@ -204,8 +207,7 @@ function(files, filter, control = list(), encoding = "unknown",
 
 	## Look at words not in dictionary with suggestions.
 
-	ind <- grepl("^&", lines)
-	if(any(ind)) {
+	if(any(ind <- startsWith(lines, "&"))) {
 	    info <- strsplit(lines[ind], ": ", fixed = TRUE)
 	    one <- strsplit(sapply(info, `[`, 1L), " ",  fixed = TRUE)
 	    two <- strsplit(sapply(info, `[`, 2L), ", ", fixed = TRUE)
@@ -220,8 +222,7 @@ function(files, filter, control = list(), encoding = "unknown",
 	    db <- rbind(db, db1)
 	}
 	## Looks at words not in dictionary with no suggestions.
-	ind <- grepl("^#", lines)
-	if(any(ind)) {
+	if(any(ind <- startsWith(lines, "#"))) {
 	    one <- strsplit(lines[ind], " ", fixed = TRUE)
 	    db1 <- data.frame(Original =
 			      as.character(sapply(one, `[`, 2L)),
@@ -239,33 +240,44 @@ function(files, filter, control = list(), encoding = "unknown",
     db
 }
 
-print.aspell <-
+format.aspell <-
 function(x, sort = TRUE, verbose = FALSE, indent = 2L, ...)
 {
-    ## A very simple printer ...
-    if(!(nr <- nrow(x))) return(invisible(x))
-
-    if (sort)
-    	x <- x[order(x$Original, x$File, x$Line, x$Column), ]
-
-    if (verbose)
-    	out <-
-    	    sprintf("%sWord: %s (%s:%d:%d)\n%s",
-    	            c("", rep.int("\n", nr - 1L)),
-    	            x$Original, x$File, x$Line, x$Column,
-    	            formatDL(rep.int("Suggestions", nr),
-    	                     sapply(x$Suggestions, paste, collapse = " "),
-    	                     style = "list"))
-    else {
-        s <- split(sprintf("%s:%d:%d", x$File, x$Line, x$Column),
-                   x$Original)
-        sep <- sprintf("\n%s",
-                       paste(rep.int(" ", indent), collapse = ""))
-        out <- paste(names(s),
-                     sapply(s, paste, collapse = sep),
-                     sep = sep, collapse = "\n\n")
+    if(!nrow(x)) return(character())
+
+    if(sort)
+        x <- x[order(x$Original, x$File, x$Line, x$Column), ]
+
+    from <- split(sprintf("%s:%d:%d", x$File, x$Line, x$Column),
+                  x$Original)
+
+    if(verbose) {
+        unlist(Map(function(w, f, s) {
+            sprintf("Word: %s\nFrom: %s\n%s",
+                    w,
+                    paste0(c("", rep.int("      ", length(f) - 1L)),
+                           f, collapse = "\n"),
+                    paste(strwrap(paste("Suggestions:",
+                                        paste(s[[1L]], collapse = " ")),
+                                  exdent = 6L, indent = 0L),
+                          collapse = "\n"))
+        },
+                   names(from),
+                   from,
+                   split(x$Suggestions, x$Original)))
+    } else {
+        sep <- sprintf("\n%s", strrep(" ", indent))
+        paste(names(from),
+              sapply(from, paste, collapse = sep),
+              sep = sep)
     }
-    writeLines(out)
+}
+
+print.aspell <-
+function(x, ...)
+{
+    if(nrow(x))
+        writeLines(paste(format(x, ...), collapse = "\n\n"))
     invisible(x)
 }
 
@@ -320,8 +332,7 @@ function(dictionaries, dirnames = character())
     dirnames <- c(file.path(R.home("share"), "dictionaries"), dirnames)
 
     ## For now, all dictionary files should be .rds files.
-    ind <- !grepl("\\.rds$", dictionaries)
-    if(any(ind))
+    if(any(ind <- !endsWith(dictionaries, ".rds")))
         dictionaries[ind] <- sprintf("%s.rds", dictionaries[ind])
 
     out <- character(n)
@@ -338,7 +349,6 @@ function(dictionaries, dirnames = character())
         out[pos] <- find_files_in_directories(dictionaries[pos],
                                               dirnames)
     }
-
     out
 }
 
@@ -490,7 +500,7 @@ function(dir, drop = c("\\author", "\\references"),
     dir <- normalizePath(dir, "/")
 
     subdir <- file.path(dir, "man")
-    files <- if(file_test("-d", subdir))
+    files <- if(dir.exists(subdir))
         tools::list_files_with_type(subdir,
                                     "docs",
                                     OS_subdirs = c("unix", "windows"))
@@ -590,6 +600,7 @@ function(dir,
     files <- vinfo$docs
     if(!length(files)) return(aspell(character()))
 
+    ## We need the package encoding to read the defaults file ...
     meta <- tools:::.get_package_metadata(dir, installed = FALSE)
     if(is.na(encoding <- meta["Encoding"]))
         encoding <- "unknown"
@@ -616,22 +627,25 @@ function(dir,
 
     program <- aspell_find_program(program)
 
-    files <- split(files, vinfo$engine)
+    fgroups <- split(files, vinfo$engines)
+    egroups <- split(vinfo$encodings, vinfo$engines)
 
     do.call(rbind,
-            Map(function(files, engine) {
+            Map(function(fgroup, egroup, engine) {
                 engine <- tools::vignetteEngine(engine)
-                aspell(files,
+                aspell(fgroup,
                        filter = engine$aspell$filter,
                        control =
                        c(engine$aspell$control,
                          aspell_control_package_vignettes[[names(program)]],
                          control),
+                       encoding = egroup,
                        program = program,
                        dictionaries = dictionaries)
             },
-                files,
-                names(files)
+                fgroups,
+                egroups,
+                names(fgroups)
                 )
             )
 }
@@ -680,7 +694,7 @@ function(ifile, encoding = "unknown", ignore = character())
             cols <- cumsum(widths)
             widths[i] <- 8 - (cols[i] - 1) %% 8
         }
-        cumsum(c(1, widths))
+        cumsum(widths)
     },
                gregexpr("\t", lines[lines_in_pd], fixed = TRUE),
                nchar(lines[lines_in_pd]))
@@ -692,35 +706,32 @@ function(ifile, encoding = "unknown", ignore = character())
     for(entry in split(pd, seq_len(NROW(pd)))) {
         line1 <- entry$line1
         line2 <- entry$line2
-        col1 <- entry$col1 + 1L
-        col2 <- entry$col2 - 1L
+        col1 <- entry$col1
+        col2 <- entry$col2
         if(line1 == line2) {
             if(length(ptab <- tab[[as.character(line1)]])) {
-                col1 <- which(ptab == col1)
-                col2 <- which(ptab == col2)
+                col1 <- which(ptab == col1) + 1L
+                col2 <- which(ptab == col2) - 1L
             }
             substring(lines[line1], col1, col2) <- entry$text
         } else {
             texts <- unlist(strsplit(entry$text, "\n", fixed = TRUE))
             n <- length(texts)
             if(length(ptab <- tab[[as.character(line1)]])) {
-                col1 <- which(ptab == col1)
+                col1 <- which(ptab == col1) + 1L
             }
             substring(lines[line1], col1) <- texts[1L]
-            pos <- seq(from = 2, length.out = n - 2)
+            pos <- seq(from = 2L, length.out = n - 2L)
             if(length(pos))
                 lines[line1 + pos - 1] <- texts[pos]
             if(length(ptab <- tab[[as.character(line2)]])) {
-                col2 <- which(ptab == col2)
+                col2 <- which(ptab == col2) - 1L
             }
             substring(lines[line2], 1L, col2) <- texts[n]
         }
     }
 
-    for(re in ignore[nzchar(ignore)])
-        lines <- blank_out_regexp_matches(lines, re)
-
-    lines
+    blank_out_ignores_in_lines(lines, ignore)
 }
 
 get_parse_data_for_message_strings <-
@@ -729,7 +740,10 @@ function(file, encoding = "unknown")
     ## The message strings considered are the string constants subject to
     ## translation in gettext-family calls (see below for details).
 
-    exprs <- parse(file = file, encoding = encoding, keep.source = TRUE)
+    exprs <-
+        suppressWarnings(tools:::.parse_code_file(file = file,
+                                                  encoding = encoding,
+                                                  keep.source = TRUE))
     if(!length(exprs)) return(NULL)
 
     pd <- getParseData(exprs)
@@ -843,7 +857,7 @@ function(dir, ignore = character(),
     dir <- tools::file_path_as_absolute(dir)
 
     subdir <- file.path(dir, "R")
-    files <- if(file_test("-d", subdir))
+    files <- if(dir.exists(subdir))
         tools::list_files_with_type(subdir,
                                     "code",
                                     OS_subdirs = c("unix", "windows"))
@@ -895,11 +909,11 @@ function (ifile, encoding = "unknown", ignore = character())
         out <- character(length(s))
         i <- 1L
         out[i] <- blank_out_regexp_matches(s[i], "^msgid[ \t]+\"")
-        while(grepl("^\"", s[i <- i + 1L]))
+        while(startsWith(s[i <- i + 1L], '"'))
             out[i] <- sub("^\"", " ", s[i])
         if(grepl("^msgid_plural[ \t]", s[i])) {
             out[i] <- blank_out_regexp_matches(s[i], "^msgid_plural[ \t]+\"")
-            while(grepl("^\"", s[i <- i + 1L]))
+            while(startsWith(s[i <- i + 1L], '"'))
                 out[i] <- sub("^\"", " ", s[i])
         }
         out
@@ -916,10 +930,7 @@ function (ifile, encoding = "unknown", ignore = character())
     ## blanks, similar to what the R text filter does.
     ## </FIXME>
 
-    for(re in ignore[nzchar(ignore)])
-        lines <- blank_out_regexp_matches(lines, re)
-
-    lines
+    blank_out_ignores_in_lines(lines, ignore)
 }
 
 ## For spell-checking all pot files in a package.
@@ -930,7 +941,7 @@ function(dir, ignore = character(),
 {
     dir <- tools::file_path_as_absolute(dir)
     subdir <- file.path(dir, "po")
-    files <- if(file_test("-d", subdir))
+    files <- if(dir.exists(subdir))
         Sys.glob(file.path(subdir, "*.pot"))
     else character()
 
@@ -1026,13 +1037,15 @@ function(ifile, encoding, keep = c("Title", "Description"),
     lines <- readLines(ifile, encoding = encoding, warn = FALSE)
     line_has_tags <- grepl("^[^[:blank:]][^:]*:", lines)
     tags <- sub(":.*", "", lines[line_has_tags])
+    lines[line_has_tags] <-
+        blank_out_regexp_matches(lines[line_has_tags], "^[^:]*:")
     lines <- split(lines, cumsum(line_has_tags))
     ind <- is.na(match(tags, keep))
     lines[ind] <- lapply(lines[ind], function(s) rep.int("", length(s)))
+    ind <- !ind
+    lines[ind] <- lapply(lines[ind], paste0, " ")
     lines <- unlist(lines, use.names = FALSE)
-    for(re in ignore[nzchar(ignore)])
-        lines <- blank_out_regexp_matches(lines, re)
-    lines
+    blank_out_ignores_in_lines(lines, ignore)
 }
 
 ## For spell-checking package DESCRIPTION files.
@@ -1058,6 +1071,28 @@ function(dir, ignore = character(),
            dictionaries = dictionaries)
 }
 
+## For spell checking packages.
+
+aspell_package <-
+function(dir,
+         control = list(), program = NULL, dictionaries = character())
+{
+    args <- list(dir = dir,
+                 program = program,
+                 control = control,
+                 dictionaries = dictionaries)
+    a <- rbind(do.call(aspell_package_description, args),
+               do.call(aspell_package_Rd_files, args),
+               do.call(aspell_package_vignettes, args),
+               do.call(aspell_package_R_files, args),
+               do.call(aspell_package_C_files, args))
+    if(nrow(a)) {
+        a$File <- tools:::.file_path_relative_to_dir(a$File,
+                                                     dirname(dir))
+    }
+    a
+}
+
 ## For writing personal dictionaries:
 
 aspell_write_personal_dictionary_file <-
@@ -1116,23 +1151,33 @@ function(dir, encoding = "unknown")
 ## Utilities.
 
 blank_out_regexp_matches <-
-function(s, re)
+function(s, re, ...)
 {
-    m <- gregexpr(re, s)
-    regmatches(s, m) <- Map(blanks, lapply(regmatches(s, m), nchar))
+    m <- gregexpr(re, s, ...)
+    regmatches(s, m) <-
+        Map(function(n) strrep(" ", n),
+            lapply(regmatches(s, m), nchar))
     s
 }
 
-blanks <-
-function(n) {
-    vapply(Map(rep.int, rep.int(" ", length(n)), n, USE.NAMES = FALSE),
-           paste, "", collapse = "")
+blank_out_ignores_in_lines <-
+function(lines, ignore)
+{
+    args <- list()
+    if(is.list(ignore)) {
+        args <- ignore[-1L]
+        ignore <- ignore[[1L]]
+    }
+    for(re in ignore[nzchar(ignore)])
+        lines <- do.call(blank_out_regexp_matches,
+                         c(list(lines, re), args))
+    lines
 }
 
 find_files_in_directories <-
 function(basenames, dirnames)
 {
-    dirnames <- dirnames[file_test("-d", dirnames)]
+    dirnames <- dirnames[dir.exists(dirnames)]
     dirnames <- normalizePath(dirnames, "/")
 
     out <- character(length(basenames))
diff --git a/src/library/utils/R/browseVignettes.R b/src/library/utils/R/browseVignettes.R
index 5c3927e..d44209e 100644
--- a/src/library/utils/R/browseVignettes.R
+++ b/src/library/utils/R/browseVignettes.R
@@ -1,7 +1,7 @@
 #  File src/library/utils/R/browseVignettes.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
-#  Copyright (C) 1995-2013 The R Core Team
+#  Copyright (C) 1995-2015 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
@@ -14,14 +14,14 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 
 
 browseVignettes <- function(package = NULL, lib.loc = NULL, all = TRUE)
 {
-   
-    vinfo <- tools:::getVignetteInfo(package, lib.loc, all)
+
+    vinfo <- tools::getVignetteInfo(package, lib.loc, all)
     pkgs <- unique(vinfo[, "Package"])
     db <- lapply(pkgs, function(p) vinfo[vinfo[,"Package"] == p,,drop=FALSE])
     names(db) <- pkgs
@@ -46,7 +46,7 @@ print.browseVignettes <- function(x, ...)
     oneLink <- function(s) {
         if (length(s) == 0L) return(character(0L))
         title <- s[, "Title"]
-        if (tools:::httpdPort > 0L)
+        if (port > 0L)
             prefix <- sprintf("/library/%s/doc", pkg)
         else
             prefix <- sprintf("file://%s/doc", s[, "Dir"])
@@ -66,12 +66,11 @@ print.browseVignettes <- function(x, ...)
                        ""))
     }
 
-    if (tools:::httpdPort == 0L)
-        tools::startDynamicHelp()
+    port <- tools::startDynamicHelp(NA)
 
     file <- tempfile("Rvig.", fileext=".html")
     sink(file)
-    if (tools:::httpdPort > 0)
+    if (port > 0L)
     	css_file <- "/doc/html/R.css"
     else
     	css_file <- file.path(R.home("doc"), "html", "R.css")
@@ -101,8 +100,8 @@ print.browseVignettes <- function(x, ...)
     ## the first two don't work on Windows with browser=NULL.
     ## browseURL(URLencode(sprintf("file://%s", file)))
     ## browseURL(URLencode(file))
-    if (tools:::httpdPort > 0L)
-	browseURL(sprintf("http://127.0.0.1:%d/session/%s", tools:::httpdPort, basename(file)))
+    if (port > 0L)
+	browseURL(sprintf("http://127.0.0.1:%d/session/%s", port, basename(file)))
     else
     	browseURL(sprintf("file://%s", file))
     ## browseURL(file)
diff --git a/src/library/utils/R/bug.report.R b/src/library/utils/R/bug.report.R
index 40453f1..41b1de0 100644
--- a/src/library/utils/R/bug.report.R
+++ b/src/library/utils/R/bug.report.R
@@ -1,7 +1,7 @@
 #  File src/library/utils/R/unix/bug.report.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
-#  Copyright (C) 1995-2012 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
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 bug.report.info <- function()
     c("R Version:",
@@ -37,7 +37,7 @@ bug.report <- function(subject = "", address,
 {
     baseR <- function() {
         writeLines(c("  Bug reports on R and the base packages need to be submitted",
-                     "  to the tracker at http://bugs.r-project.org/ .",
+                     "  to the tracker at <https://bugs.R-project.org/>.",
                      "",
                      "  We will now try to open that website in a browser"))
         flush.console()
@@ -45,11 +45,6 @@ bug.report <- function(subject = "", address,
         browseURL("https://bugs.r-project.org/bugzilla3/index.cgi")
     }
 
-    findEmail <- function(x) {
-        ## extract the part within the first < >: the rest may be invalid.
-        x <- paste(x, collapse = " ") # could be multiple lines
-        sub("[^<]*<([^>]+)>.*", "\\1", x)
-    }
     if (is.null(package)) return(baseR())
 
     DESC <- packageDescription(package, lib.loc)
@@ -62,20 +57,66 @@ bug.report <- function(subject = "", address,
     info <- c(info, "", bug.report.info())
     if(identical(DESC$Priority, "base")) return(baseR())
 
-    if (!is.null(DESC$BugReports)) {
-        writeLines(info)
-        cat("\nThis package has a bug submission web page, which we will now attempt\n",
-            "to open.  The information above may be useful in your report. If the web\n",
-            "page doesn't work, you should send email to the maintainer,\n",
-            DESC$Maintainer, ".\n",
-            sep = "")
+    findEmail2 <- function(x) {
+        x <- paste(x, collapse = " ") # could be multiple lines
+        if (grepl("mailto:", x))
+            sub(".*mailto:([^ ]+).*", "\\1", x)
+        else if (grepl("[^<]*<([^>]+)", x))
+            sub("[^<]*<([^>]+)>.*", "\\1", x)
+        else if (grepl("(^|.* )[^ ]+@[[:alnum:]._]+", x)) # too generous
+            sub("(^|.* )([^ ]+@[[:alnum:]._]+).*", "\\2", x)
+        else NA_character_
+    }
+
+    BR <- DESC$BugReports
+    if (!is.null(BR) && nzchar(BR)) {
+        BR <- trimws(BR)  # some packages have e.g. leading \n
+        if (grepl("^https?://", BR)) {
+            writeLines(info)
+            cat("\nThis package has a bug submission web page, which we will now attempt\n",
+                "to open.  The information above may be useful in your report.\n",
+                "If the web page does not work, you should send email to the maintainer,\n",
+                DESC$Maintainer, ".\n",
+                sep = "")
+            flush.console()
+            Sys.sleep(2)
+            browseURL(BR)
+            return(invisible())
+        } else {
+            cat("This package has a BugReports field which is not the URL of a web page:\n\n",
+                "  BugReports: ", BR, "\n\n", sep = "")
+            em <- findEmail2(BR)
+            if (!is.na(em)) {
+                cat("It appears to contain an email address, so we will try that.\n\n")
+                address <- em
+            } else cat("We will ignore it and email the maintainer.\n\n")
+            flush.console()
+            Sys.sleep(2)
+       }
+    }
+
+    CT <- DESC$Contact
+    if (!is.null(CT) && nzchar(CT)) {
+        cat("This package has a Contact field:\n\n",
+            "  Contact: ", CT, "\n\n", sep = "")
+        em <- findEmail2(CT)
+        if (!is.na(em)) {
+            cat("That appears to contain an email address, so we will try that\n")
+            address <- em
+        } else cat("We cannot make sense of that, so will ignore it.\n\n");
         flush.console()
         Sys.sleep(2)
-        browseURL(DESC$BugReports)
-        return(invisible())
     }
 
-    if (missing(address)) address <- findEmail(DESC$Maintainer)
+    if (missing(address)) {
+        findEmail <- function(x) {
+            ## extract the part within the first < >: the rest may be invalid.
+            x <- paste(x, collapse = " ") # could be multiple lines
+            sub("[^<]*<([^>]+)>.*", "\\1", x)
+        }
+        address <- findEmail(DESC$Maintainer)
+    }
+
     create.post(instructions = c("", "<<insert bug report here>>", rep("", 3)),
                 description = "bug report",
                 subject = subject, address = address,
diff --git a/src/library/utils/R/capture.output.R b/src/library/utils/R/capture.output.R
index ac7d84b..07d9c6a 100644
--- a/src/library/utils/R/capture.output.R
+++ b/src/library/utils/R/capture.output.R
@@ -1,7 +1,7 @@
 #  File src/library/utils/R/capture.output.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
-#  Copyright (C) 1995-2012 The R Core Team
+#  Copyright (C) 1995-2015 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
@@ -14,12 +14,13 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
-capture.output <- function(..., file=NULL, append=FALSE)
+capture.output <- function(..., file=NULL, append=FALSE,
+                           type = c("output", "message"), split = FALSE)
 {
     args <- substitute(list(...))[-1L]
-
+    type <- match.arg(type)
     rval <- NULL; closeit <- TRUE
     if (is.null(file))
         file <- textConnection("rval", "w", local = TRUE)
@@ -31,9 +32,9 @@ capture.output <- function(..., file=NULL, append=FALSE)
     } else
         stop("'file' must be NULL, a character string or a connection")
 
-    sink(file)
+    sink(file, type=type, split=split)
     ## for error recovery: all output will be lost if file=NULL
-    on.exit({sink(); if(closeit) close(file)})
+    on.exit({sink(type=type, split=split); if(closeit) close(file)})
 
     pf <- parent.frame()
     evalVis <- function(expr)
@@ -50,7 +51,7 @@ capture.output <- function(..., file=NULL, append=FALSE)
     }
     ## we need to close the text connection before returning 'rval'
     on.exit()
-    sink()
+    sink(type=type, split=split)
     if(closeit) close(file)
     if(is.null(rval)) invisible(NULL) else rval
 }
diff --git a/src/library/utils/R/changedFiles.R b/src/library/utils/R/changedFiles.R
index d61b038..460220a 100644
--- a/src/library/utils/R/changedFiles.R
+++ b/src/library/utils/R/changedFiles.R
@@ -1,5 +1,5 @@
 #  File src/library/utils/R/changedFiles.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
 #  Copyright (C) 2013 The R Core Team
 #
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 fileSnapshot <- function(path = ".", file.info = TRUE, timestamp = NULL, 
 			 md5sum = FALSE, digest = NULL, 
diff --git a/src/library/utils/R/citation.R b/src/library/utils/R/citation.R
index 5db3111..7a46571 100644
--- a/src/library/utils/R/citation.R
+++ b/src/library/utils/R/citation.R
@@ -1,7 +1,7 @@
 #  File src/library/utils/R/citation.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
-#  Copyright (C) 1995-2013 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
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 ## What a silly name ...
 .is_not_nonempty_text <-
@@ -34,13 +34,13 @@ function(given = NULL, family = NULL, middle = NULL,
         return(structure(list(), class = "person"))
     }
     args <- lapply(args, .listify)
-    args_length <- sapply(args, length)
+    args_length <- lengths(args)
     if(!all(args_length_ok <- args_length %in% c(1L, max(args_length))))
         warning(gettextf("Not all arguments are of the same length, the following need to be recycled: %s",
                          paste(names(args)[!args_length_ok],
                                collapse = ", ")),
                 domain = NA)
-    args <- lapply(args, function(x) rep(x, length.out = max(args_length)))
+    args <- lapply(args, function(x) rep_len(x, max(args_length)))
 
     ## <COMMENT Z>
     ## We could do this more elegantly, but let's just go through the
@@ -117,14 +117,14 @@ function(given = NULL, family = NULL, middle = NULL,
         rval <- list(given = given, family = family, role = role,
                      email = email, comment = comment)
         ## Canonicalize 0-length character arguments to NULL.
-        if(any(ind <- (sapply(rval, length) == 0L)))
+        if(any(ind <- (lengths(rval) == 0L)))
             rval[ind] <- vector("list", length = sum(ind))
         ## Give nothing if there is nothing.
-        if(all(sapply(rval, is.null)))
-            rval <- NULL
-
-        return(rval)
-    }
+        if(all(vapply(rval, is.null, NA)))
+            NULL
+        else
+            rval
+    } ## end{ person1 }
 
     rval <-
         lapply(seq_along(args$given),
@@ -140,11 +140,9 @@ function(given = NULL, family = NULL, middle = NULL,
     ## non-NULL entry?
     ## </COMMENT>
     ## Yes!
-    rval <- rval[!sapply(rval, is.null)]
-
-    class(rval) <- "person"
 
-    rval
+    structure(rval[!vapply(rval, is.null, NA)],
+              class = "person")
 }
 
 .canonicalize_person_role <-
@@ -220,7 +218,7 @@ function(x, name)
     if(oname == "first") rval <- lapply(rval, head, 1L)
     if(oname == "middle") {
         rval <- lapply(rval, tail, -1L)
-        if(any(ind <- (sapply(rval, length) == 0L)))
+        if(any(ind <- (lengths(rval) == 0L)))
             rval[ind] <- vector("list", length = sum(ind))
     }
 
@@ -233,7 +231,7 @@ function(x, name, value)
 {
     name <- match.arg(name, c("given", "family", "role", "email", "comment"))
     x <- .listify(unclass(x))
-    value <- rep(value, length.out = length(x))
+    value <- rep_len(value, length(x))
 
     if(name == "role")
         value <- lapply(value, .canonicalize_person_role)
@@ -314,6 +312,14 @@ function(x)
                  regmatches(x, gregexpr(pattern, y), invert = TRUE))
     x <- x[!sapply(x, .is_not_nonempty_text)]
 
+    ## don't expect Jr. to be a person
+    jr <- which(!is.na(match(x, c("Jr", "Jr.", "jr", "jr."))))
+    if(length(jr)) {
+        jr <- jr[jr > 1L]
+        x[jr - 1L] <- paste(x[jr - 1L], x[jr], sep = ", ")
+        x <- x[-jr]
+    }
+
     if(!length(x)) return(person())
 
     ## Step C.
@@ -323,7 +329,9 @@ function(x)
         else NULL
         x <- sub("[[:space:]]*\\([^)]*\\)", "", x)
         email <- if(grepl("<.*>", x))
-            sub(".*<([^>]*)>.*", "\\1", x)
+            unlist(strsplit(gsub("[[:space:]]*", "",
+                                 sub(".*<([^>]*)>.*", "\\1", x)),
+                            ",", fixed = TRUE))
         else NULL
         x <- sub("[[:space:]]*<[^>]*>", "", x)
         role <- if(grepl("\\[.*\\]", x))
@@ -333,7 +341,29 @@ function(x)
         else NULL
         x <- sub("[[:space:]]*\\[[^)]*\\]", "", x)
         x <- unlist(strsplit(x, "[[:space:]]+"))
-        z <- person(given = x[-length(x)], family = x[length(x)],
+
+	## try to correctly guess von/van/de, Jr., etc.
+	jr <- c("Jr", "Jr.")
+	von <- c("De", "Den", "Der", "La", "Le", "Ten", "Van", "Von")
+	family <- x[length(x)]
+	given <- x[-length(x)]
+	if(length(family) &&
+           !is.na(match(family, c(jr, tolower(jr))))) {
+            family <- paste(given[length(given)], family)
+            given <- given[-length(given)]
+	}
+	if((ng <- length(given)) &&
+           !is.na(match(gng <- given[ng], c(von, tolower(von))))) {
+            family <- paste(gng, family)
+            given <- given[-ng]
+	}
+	if((ng <- length(given)) &&
+           !is.na(match(gng <- given[ng], c(von, tolower(von))))) {
+            family <- paste(gng, family)
+            given <- given[-ng]
+	}
+
+        z <- person(given = given, family = family,
                     email = email, role = role, comment = comment)
         return(z)
     }
@@ -376,11 +406,16 @@ function(x,
          collapse =
          list(given = " ", family = " ", email = ", ",
               role = ", ", comment = ", "),
-         ...
+         ...,
+         style = c("text", "R")
          )
 {
     if(!length(x)) return(character())
-    
+
+    style <- match.arg(style)
+
+    if(style == "R") return(.format_person_as_R_code(x))
+
     args <- c("given", "family", "email", "role", "comment")
     include <- sapply(include, match.arg, args)
 
@@ -393,24 +428,39 @@ function(x,
     if(is.null(braces$email)) braces$email <- c("<", ">")
     if(is.null(braces$role)) braces$role <- c("[", "]")
     if(is.null(braces$comment)) braces$comment <- c("(", ")")
-    braces <- lapply(braces, rep, length.out = 2L)
+    braces <- lapply(braces, rep_len, 2L)
     if(is.null(collapse$given)) collapse$given <- " "
     if(is.null(collapse$family)) collapse$family <- " "
     if(is.null(collapse$email)) collapse$email <- ", "
     if(is.null(collapse$role)) collapse$role <- ", "
     if(is.null(collapse$comment)) collapse$comment <- ", "
-    collapse <- lapply(collapse, rep, length.out = 1L)
+    collapse <- lapply(collapse, rep_len, 1L)
 
     ## extract selected elements
     x <- lapply(unclass(x), "[", include)
     braces <- braces[include]
     collapse <- collapse[include]
 
+    paste_collapse <- function(x, collapse) {
+        if(is.na(collapse) || identical(collapse, FALSE)) {
+ 	    x[1L]
+ 	} else {
+ 	    paste(x, collapse = collapse)
+ 	}
+    }
+
     ## format 1 person
     format_person1 <- function(p) {
-	rval <- lapply(seq_along(p), function(i) if(is.null(p[[i]])) NULL else
-		       paste0(braces[[i]][1L], paste(p[[i]], collapse = collapse[[i]]),
-			      braces[[i]][2L]))
+	rval <- lapply(seq_along(p),
+                       function(i) {
+                           if(is.null(p[[i]]))
+                               NULL
+                           else
+                               paste0(braces[[i]][1L],
+                                      paste_collapse(p[[i]],
+                                                     collapse[[i]]),
+                                      braces[[i]][2L])
+                       })
 	paste(do.call("c", rval), collapse = " ")
     }
 
@@ -423,8 +473,14 @@ function(x, ...)
 
 toBibtex.person <-
 function(object, ...)
-    paste(format(object, include = c("given", "family")),
-          collapse = " and ")
+{
+    object <- sapply(object, function(p) {
+         br <- if(is.null(p$family)) c("{", "}") else c("", "")
+         format(p, include = c("family", "given"),
+                braces = list(given = br, family = c("", ",")))
+    })
+    paste(object[nzchar(object)], collapse = " and ")
+}
 
 ######################################################################
 
@@ -446,23 +502,23 @@ function(bibtype, textVersion = NULL, header = NULL, footer = NULL, key = NULL,
               header = header, footer = footer, key = key), list(...))
     args <- lapply(args, .listify)
     other <- lapply(other, .listify)
-    max_length <- max(sapply(c(args, other), length))
+    max_length <- max(lengths(c(args, other)))
 
-    args_length <- sapply(args, length)
+    args_length <- lengths(args)
     if(!all(args_length_ok <- args_length %in% c(1L, max_length)))
         warning(gettextf("Not all arguments are of the same length, the following need to be recycled: %s",
                          paste(names(args)[!args_length_ok],
                                collapse = ", ")),
                 domain = NA)
-    args <- lapply(args, function(x) rep(x, length.out = max_length))
+    args <- lapply(args, function(x) rep_len(x, max_length))
 
-    other_length <- sapply(other, length)
+    other_length <- lengths(other)
     if(!all(other_length_ok <- other_length %in% c(1L, max_length)))
         warning(gettextf("Not all arguments are of the same length, the following need to be recycled: %s",
                          paste(names(other)[!other_length_ok],
                                collapse = ", ")),
                 domain = NA)
-    other <- lapply(other, function(x) rep(x, length.out = max_length))
+    other <- lapply(other, function(x) rep_len(x, max_length))
 
     bibentry1 <-
     function(bibtype, textVersion, header = NULL, footer = NULL, key = NULL, ..., other = list())
@@ -512,7 +568,7 @@ function(bibtype, textVersion = NULL, header = NULL, footer = NULL, key = NULL,
 
     rval <- lapply(seq_along(args$bibtype),
                    function(i)
-                   do.call("bibentry1",
+                   do.call(bibentry1,
                            c(lapply(args, "[[", i),
                              list(other = lapply(other, "[[", i)))))
 
@@ -578,7 +634,7 @@ function(x, i, drop = TRUE)
     if(is.character(i) && is.null(names(x)))
         names(x) <- .bibentry_get_key(x)
     y <- x[i]
-    if(!all(ok <- sapply(y, length) > 0L)) {
+    if(!all(ok <- lengths(y) > 0L)) {
         warning("subscript out of bounds")
         y <- y[ok]
     }
@@ -608,38 +664,46 @@ function(style)
 format.bibentry <-
 function(x, style = "text", .bibstyle = NULL,
          citation.bibtex.max = getOption("citation.bibtex.max", 1),
+         bibtex = length(x) <= citation.bibtex.max,
          sort = FALSE, ...)
 {
     if(!length(x)) return(character())
-    
+
     style <- .bibentry_match_format_style(style)
 
     if(sort) x <- sort(x, .bibstyle = .bibstyle)
     x$.index <- as.list(seq_along(x))
+    if(!missing(citation.bibtex.max))
+	warning(gettextf("Argument '%s' is deprecated; rather set '%s' instead.",
+			 "citation.bibtex.max", "bibtex=*"), domain=NA)
 
-    .format_bibentry_via_Rd <- function(f) {
+    format_via_Rd <- function(f) {
         out <- file()
         saveopt <- tools::Rd2txt_options(width = getOption("width"))
         on.exit({tools::Rd2txt_options(saveopt); close(out)})
         sapply(.bibentry_expand_crossrefs(x),
                function(y) {
-                   rd <- tools::toRd(y, style = .bibstyle)
+                   txt <- tools::toRd(y, style = .bibstyle)
                    ## <FIXME>
                    ## Ensure a closing </p> via a final empty line for
                    ## now (PR #15692).
-                   if(style == "html") rd <- paste(rd, "\n")
+                   if(style == "html") txt <- paste(txt, "\n")
                    ## </FIXME>
-                   con <- textConnection(rd)
+                   con <- textConnection(txt)
                    on.exit(close(con))
-                   f(con, fragment = TRUE, out = out, ...)
+                   rd <- tools::parse_Rd(con,
+                                         fragment = TRUE,
+                                         permissive = TRUE)
+                   rd <- tools:::processRdSexprs(rd,
+                                                 "build",
+                                                 macros = attr(rd, "macros"))
+                   f(rd, fragment = TRUE, out = out, ...)
                    paste(readLines(out), collapse = "\n")
                })
     }
 
-    .format_bibentry_as_citation <- function(x) {
-        bibtex <- length(x) <= citation.bibtex.max
-
-        c(paste(strwrap(attr(x, "mheader")), collapse = "\n"),
+    format_as_citation <- function(x, msg) {
+         c(paste(strwrap(attr(x, "mheader")), collapse = "\n"),
           unlist(lapply(x, function(y) {
               paste(c(if(!is.null(y$header))
                       c(strwrap(y$header), ""),
@@ -656,15 +720,19 @@ function(x, style = "text", .bibstyle = NULL,
                       c("", strwrap(y$footer))),
                     collapse = "\n")
           })),
-          paste(strwrap(attr(x, "mfooter")), collapse = "\n")
+	  paste(strwrap(c(attr(x, "mfooter"),
+			  if(!bibtex && msg)
+  "To see these entries in BibTeX format, use 'print(<citation>, bibtex=TRUE)',
+  'toBibtex(.)', or set 'options(citation.bibtex.max=999)'."
+		)), collapse = "\n")
           )
     }
 
     out <-
         switch(style,
-               "text" = .format_bibentry_via_Rd(tools::Rd2txt),
-               "html" = .format_bibentry_via_Rd(tools::Rd2HTML),
-               "latex" = .format_bibentry_via_Rd(tools::Rd2latex),
+               "text" = format_via_Rd(tools::Rd2txt),
+               "html" = format_via_Rd(tools::Rd2HTML),
+               "latex" = format_via_Rd(tools::Rd2latex),
                "Bibtex" = {
                    unlist(lapply(x,
                                  function(y)
@@ -672,10 +740,12 @@ function(x, style = "text", .bibstyle = NULL,
                },
                "textVersion" = {
                    out <- lapply(unclass(x), attr, "textVersion")
-                   out[!sapply(out, length)] <- ""
+                   out[!lengths(out)] <- ""
                    unlist(out)
                },
-               "citation" = .format_bibentry_as_citation(x),
+               "citation" = format_as_citation(x,
+                                               msg = missing(bibtex) &&
+                                                   missing(citation.bibtex.max)),
                "R" = .format_bibentry_as_R_code(x, ...)
                )
     as.character(out)
@@ -764,21 +834,16 @@ function(x, style = "text", .bibstyle = NULL, ...)
     invisible(x)
 }
 
-## Not vectorized for now: see ?regmatches for a vectorized version.
-.blanks <-
-function(n)
-    paste(rep.int(" ", n), collapse = "")
-
 .format_call_RR <-
 function(cname, cargs)
 {
     ## Format call with ragged right argument list (one arg per line).
     cargs <- as.list(cargs)
     n <- length(cargs)
-    lens <- sapply(cargs, length)
+    lens <- lengths(cargs)
     sums <- cumsum(lens)
     starters <- c(sprintf("%s(", cname),
-                  rep.int(.blanks(nchar(cname) + 1L), sums[n] - 1L))
+                  rep.int(strrep(" ", nchar(cname) + 1L), sums[n] - 1L))
     trailers <- c(rep.int("", sums[n] - 1L), ")")
     trailers[sums[-n]] <- ","
     sprintf("%s%s%s", starters, unlist(cargs), trailers)
@@ -817,7 +882,7 @@ function(x, collapse = FALSE)
         n <- length(v)
         if(n > 1L)
             prefix <- c(prefix,
-                        rep.int(.blanks(nchar(prefix)), n - 1L))
+                        rep.int(strrep(" ", nchar(prefix)), n - 1L))
         sprintf("%s%s", prefix, v)
     }
 
@@ -848,10 +913,10 @@ function(x, collapse = FALSE)
 
     if(!is.null(mheader <- attr(x, "mheader")))
         s[[1L]] <- c(s[[1L]],
-                     paste("mheader = ", deparse(mheader)))
+                     paste("mheader =", deparse(mheader)))
     if(!is.null(mfooter <- attr(x, "mfooter")))
         s[[1L]] <- c(s[[1L]],
-                     paste("mfooter = ", deparse(mfooter)))
+                     paste("mfooter =", deparse(mfooter)))
 
     s <- Map(.format_call_RR, "bibentry", s)
     if(collapse && (length(s) > 1L))
@@ -903,11 +968,11 @@ function(x, name, value)
     name <- tolower(name)
 
     ## recycle value
-    value <- rep(.listify(value), length.out = length(x))
+    value <- rep_len(.listify(value), length(x))
 
     ## check bibtype
     if(name == "bibtype") {
-        stopifnot(all(sapply(value, length) == 1L))
+        stopifnot(all(lengths(value) == 1L))
         BibTeX_names <- names(tools:::BibTeX_entry_field_db)
         value <- unlist(value)
         pos <- match(tolower(value), tolower(BibTeX_names))
@@ -1043,12 +1108,12 @@ function(...)
 readCitationFile <-
 function(file, meta = NULL)
 {
+    meta <- as.list(meta)
     exprs <- tools:::.parse_CITATION_file(file, meta$Encoding)
 
     rval <- list()
     mheader <- NULL
     mfooter <- NULL
-    k <- 0L
     envir <- new.env(hash = TRUE)
     ## Make the package metadata available to the citation entries.
     assign("meta", meta, envir = envir)
@@ -1082,9 +1147,14 @@ function(package = "base", lib.loc = NULL, auto = NULL)
 {
     ## Allow citation(auto = meta) in CITATION files to include
     ## auto-generated package citation.
-    if(inherits(auto, "packageDescription")) {
+    if(!is.null(auto) &&
+       !is.logical(auto) &&
+       !any(is.na(match(c("Package", "Version", "Title"),
+                        names(meta <- as.list(auto))))) &&
+       !all(is.na(match(c("Authors at R", "Author"),
+                        names(meta))))
+       ) {
         auto_was_meta <- TRUE
-        meta <- auto
         package <- meta$Package
     } else {
         auto_was_meta <- FALSE
@@ -1097,7 +1167,12 @@ function(package = "base", lib.loc = NULL, auto = NULL)
         ## if(is.null(auto)): Use default auto-citation if no CITATION
         ## available.
         citfile <- file.path(dir, "CITATION")
-        if(is.null(auto)) auto <- !file_test("-f", citfile)
+        test <- file_test("-f", citfile)
+        if(!test) {                     # allow package source
+            citfile <- file.path(dir, "inst", "CITATION")
+            test <- file_test("-f", citfile)
+        }
+        if(is.null(auto)) auto <- !test
         ## if CITATION is available
         if(!auto) {
             return(readCitationFile(citfile, meta))
@@ -1117,29 +1192,53 @@ function(package = "base", lib.loc = NULL, auto = NULL)
 
     year <- sub("-.*", "", meta$`Date/Publication`)
     if(!length(year)) {
-        year <- sub(".*((19|20)[[:digit:]]{2}).*", "\\1", meta$Date,
-                    perl = TRUE) # may not be needed, but safer
-        if(is.null(meta$Date)){
+        if(is.null(meta$Date)) {
             warning(gettextf("no date field in DESCRIPTION file of package %s",
                              sQuote(package)),
                     domain = NA)
+        } else {
+            date <- trimws(as.vector(meta$Date))[1L]
+            date <- strptime(date, "%Y-%m-%d", tz = "GMT")
+            if(!is.na(date)) year <- format(date, "%Y")
         }
-        else if(!length(year)) {
-            warning(gettextf("could not determine year for %s from package DESCRIPTION file",
-                             sQuote(package)),
-                    domain = NA)
-        }
+    }
+    ## If neither Date/Publication nor Date work, try Packaged (build
+    ## time stamp): if this fails too, use NA (PR #16550).
+    if(!length(year)) {
+        date <- as.POSIXlt(sub(";.*", "", trimws(meta$Packaged)[1L]))
+        if(!is.na(date)) year <- format(date, "%Y")
+    }
+    if(!length(year)) {
+        warning(gettextf("could not determine year for %s from package DESCRIPTION file",
+                         sQuote(package)),
+                domain = NA)
+        year <- NA_character_
     }
 
     author <- meta$`Authors at R`
-    ## <FIXME>
+    ## <NOTE>
     ## Older versions took persons with no roles as "implied" authors.
-    ## So for now check whether Authors at R gives any authors; if not fall
-    ## back to the plain text Author field.
+    ## Now we only use persons with a name and a 'aut' role.  If there
+    ## are none, we use persons with a name and a 'cre' role.
+    ## If this still gives nothing (which really should not happen), we
+    ## fall back to the plain text Author field.
+    ## Checking will at least note the cases where there are no persons
+    ## with names and 'aut' or 'cre' roles.
     if(length(author)) {
-        author <- .read_authors_at_R_field(author)
-        ## We only want those with author roles.
-        author <- Filter(.person_has_author_role, author)
+        aar <- .read_authors_at_R_field(author)
+        author <- Filter(function(e) {
+                             !(is.null(e$given) &&
+                               is.null(e$family)) &&
+                                 !is.na(match("aut", e$role))
+                         },
+                         aar)
+        if(!length(author))
+            author <- Filter(function(e) {
+                                 !(is.null(e$given) &&
+                                   is.null(e$family)) &&
+                                     !is.na(match("cre", e$role))
+                             },
+                             aar)
     }
     if(length(author)) {
         has_authors_at_R_field <- TRUE
@@ -1147,7 +1246,7 @@ function(package = "base", lib.loc = NULL, auto = NULL)
         has_authors_at_R_field <- FALSE
         author <- as.personList(meta$Author)
     }
-    ## </FIXME>
+    ## </NOTE>
 
     z <- list(title = paste0(package, ": ", meta$Title),
               author = author,
@@ -1155,20 +1254,28 @@ function(package = "base", lib.loc = NULL, auto = NULL)
               note = paste("R package version", meta$Version)
               )
 
-    z$url <- if(identical(meta$Repository, "CRAN"))
-        sprintf("http://CRAN.R-project.org/package=%s", package)
-    else
-        meta$URL
+    if(identical(meta$Repository, "CRAN"))
+        z$url <-
+            sprintf("https://CRAN.R-project.org/package=%s", package)
 
     if(identical(meta$Repository, "R-Forge")) {
         z$url <- if(!is.null(rfp <- meta$"Repository/R-Forge/Project"))
-            sprintf("http://R-Forge.R-project.org/projects/%s/", rfp)
+            sprintf("https://R-Forge.R-project.org/projects/%s/", rfp)
         else
-            "http://R-Forge.R-project.org/"
+            "https://R-Forge.R-project.org/"
         if(!is.null(rfr <- meta$"Repository/R-Forge/Revision"))
             z$note <- paste(z$note, rfr, sep = "/r")
     }
 
+    if(!length(z$url) && !is.null(url <- meta$URL)) {
+        ## Cannot have several URLs in BibTeX and bibentry object URL
+        ## fields (PR #16240).
+        if(grepl("[, ]", url))
+            z$note <- url
+        else
+            z$url <- url
+    }
+
     header <- if(!auto_was_meta) {
         gettextf("To cite package %s in publications use:",
                  sQuote(package))
@@ -1199,17 +1306,19 @@ function(package = "base", lib.loc = NULL, auto = NULL)
     .citation(rval)
 }
 
-.citation <-
-function(x)
-{
-    class(x) <- c("citation", "bibentry")
-    x
-}
+.citation <- function(x) structure(x, class = c("citation", "bibentry"))
 
 .read_authors_at_R_field <-
 function(x)
 {
-    out <- eval(parse(text = x))
+    out <- if((Encoding(x) == "UTF-8") && !l10n_info()$"UTF-8") {
+        con <- file()
+        on.exit(close(con))
+        writeLines(x, con, useBytes = TRUE)
+        eval(parse(con, encoding = "UTF-8"))
+    } else {
+        eval(parse(text = x))
+    }
 
     ## Let's by nice ...
     ## Alternatively, we could throw an error.
@@ -1230,12 +1339,10 @@ function(x)
     "aut" %in% x$role
 }
 
+format.citation <-
+function(x, style = "citation", ...) format.bibentry(x, style = style, ...)
 print.citation <-
-function(x, style = "citation", ...)
-{
-    NextMethod("print", x, style = style, ...)
-    invisible(x)
-}
+function(x, style = "citation", ...) print.bibentry(x, style = style, ...)
 
 as.bibentry <-
 function(x)
@@ -1255,23 +1362,15 @@ function(x)
     if(inherits(x, "list")) x else list(x)
 
 .format_person_for_plain_author_spec <-
-function(x) {
-    ## Names first.
-    out <- format(x, include = c("given", "family"))
-    ## Only show roles recommended for usage with R.
-    role <- x$role
-    if(!length(role)) return("")
-    role <- role[role %in% MARC_relator_db_codes_used_with_R]
-    if(!length(role)) return("")
-    out <- sprintf("%s [%s]", out, paste(role, collapse = ", "))
-    if(!is.null(comment <- x$comment))
-        out <- sprintf("%s (%s)", out,
-                       paste(comment, collapse = "\n"))
-    out
+function(x)
+{
+    ## Single person only.
+    ## Give empty if person has no name or no role.
+    if((is.null(x$given) && is.null(x$family)) || is.null(x$role))
+        return("")
+    format(x, include = c("given", "family", "role", "comment"))
 }
 
-## NB: because of the use of strwrap(), this always outputs
-## in the current locale even if the input has a marked encoding.
 .format_authors_at_R_field_for_author <-
 function(x)
 {
@@ -1281,7 +1380,7 @@ function(x)
     footer <- attr(x, "footer")
     x <- sapply(x, .format_person_for_plain_author_spec)
     ## Drop persons with irrelevant roles.
-    x <- x[x != ""]
+    x <- x[nzchar(x)]
     ## And format.
     if(!length(x)) return("")
     ## We need to ensure that the first line has no indentation, whereas
@@ -1311,17 +1410,29 @@ function(x)
 {
     if(is.character(x))
         x <- .read_authors_at_R_field(x)
-    ## Maintainers need cre roles and email addresses.
+    ## Maintainers need cre roles, valid email addresses and non-empty
+    ## names.
+    ## <FIXME>
+    ## Check validity of email addresses.
     x <- Filter(function(e)
-                !is.null(e$email) && ("cre" %in% e$role),
+                (!is.null(e$given) || !is.null(e$family)) && !is.null(e$email) && ("cre" %in% e$role),
                 x)
-    ## If this leaves nothing ...
-    if(!length(x)) return("")
-    paste(format(x, include = c("given", "family", "email")),
-          collapse = ",\n  ")
+    ## </FIXME>
+    ## If this leaves nothing or more than one ...
+    if(length(x) != 1L) return("")
+    display <- format(x, include = c("given", "family"))
+    address <- format(x, include = c("email"),
+                      collapse = list(email = FALSE))
+    ## Need to quote display names at least when they contain commas
+    ## (RFC 5322 <https://tools.ietf.org/html/rfc5322>).
+    if(any(ind <- grepl(",", display))) {
+        display[ind] <- sprintf("\"%s\"",
+                                gsub("\"", "\\\\\"", display[ind]))
+    }
+    paste(display, address)
 }
 
-# Cite using the default style (which is usually citeNatbib)
+## Cite using the default style (which is usually citeNatbib)
 
 cite <-
 function(keys, bib, ...)
@@ -1332,9 +1443,9 @@ function(keys, bib, ...)
     fn(keys, bib, ...)
 }
 
-# Cite using natbib-like options.  A bibstyle would normally
-# choose some of these options and just have a cite(keys, bib, previous)
-# function within it.
+## Cite using natbib-like options.  A bibstyle would normally
+## choose some of these options and just have a cite(keys, bib, previous)
+## function within it.
 
 citeNatbib <-
 local({
@@ -1354,7 +1465,7 @@ local({
 	}
 
 	authorList <- function(paper)
-	    names <- sapply(paper$author, shortName)
+	    sapply(paper$author, shortName)
 
 	if (!missing(previous))
 	    cited <<- previous
diff --git a/src/library/utils/R/combn.R b/src/library/utils/R/combn.R
index ce7c70b..098e96e 100644
--- a/src/library/utils/R/combn.R
+++ b/src/library/utils/R/combn.R
@@ -1,5 +1,5 @@
 #  File src/library/utils/R/combn.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
 #  Copyright (C) 1995-2013 The R Core Team
 #
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 combn <- function(x, m, FUN = NULL, simplify = TRUE, ...)
 {
diff --git a/src/library/utils/R/completion.R b/src/library/utils/R/completion.R
index a88de06..eb43a50 100644
--- a/src/library/utils/R/completion.R
+++ b/src/library/utils/R/completion.R
@@ -1,8 +1,8 @@
 #  File src/library/utils/R/completion.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
-# Copyright (C) 2006  Deepayan Sarkar
-#               2006-2013  The R Core Team
+# Copyright     2006 Deepayan Sarkar
+#           (C) 2006-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
@@ -15,7 +15,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 
 
@@ -60,7 +60,7 @@ findExactMatches <- function(pattern, values)
 }
 
 ### agrep() version
-## 
+##
 ## findFuzzyMatches <- function(pattern, values)
 ## {
 ##     ## Try exact matches first, and return them if found
@@ -86,7 +86,7 @@ findExactMatches <- function(pattern, values)
 ## }
 
 ### normalizing version (from Rasmus Baath)
-## 
+##
 
 findFuzzyMatches <- function(pattern, values) {
     ## FIXME: option to allow experimentation, remove eventually
@@ -115,7 +115,7 @@ findMatches <- function(pattern, values)
 {
     if (.CompletionEnv$settings[["fuzzy"]])
         findFuzzyMatches(pattern, values)
-    else 
+    else
         findExactMatches(pattern, values)
 }
 
@@ -147,7 +147,7 @@ fuzzyApropos <- function(what)
 .DollarNames.environment <- function(x, pattern = "") {
     if (!.CompletionEnv$settings[["fuzzy"]])
         ls(x, all.names = TRUE, pattern = pattern) # more efficient
-    else 
+    else
         findMatches(pattern, ls(x, all.names = TRUE))
 }
 
@@ -215,7 +215,7 @@ rc.options <- function(...)
     nm <- names(new)
     if (is.null(nm)) return(old[unlist(new)])
 
-    isNamed <- nm != ""
+    isNamed <- nzchar(nm)
     if (any(!isNamed)) nm[!isNamed] <- unlist(new[!isNamed])
 
     ## so now everything has non-"" names, but only the isNamed ones
@@ -427,8 +427,8 @@ specialOpLocs <- function(text)
 
 
 
-## accessing the help system: should allow anything with an index entry
-## this just looks at packages on the search path.
+## Accessing the help system: should allow anything with an index entry.
+## This just looks at packages on the search path.
 
 matchAvailableTopics <- function(prefix, text)
 {
@@ -548,7 +548,9 @@ keywordCompletions <- function(text)
 
 
 ## 'package' environments in the search path.  These will be completed
-## with a ::
+## with a :: (Use of this is function is replaced by
+## loadedPackageCompletions below, which also completes packages
+## loaded, but not necessarily attached).
 
 
 attachedPackageCompletions <- function(text, add = rc.getOption("package.suffix"))
@@ -568,11 +570,26 @@ attachedPackageCompletions <- function(text, add = rc.getOption("package.suffix"
     else character()
 }
 
+loadedPackageCompletions <- function(text, add = rc.getOption("package.suffix"))
+{
+    ## FIXME: Will not allow fuzzy completions. See comment in keywordCompletions() above
+    if (.CompletionEnv$settings[["ns"]])
+    {
+        s <- loadedNamespaces()
+        comps <- findExactMatches(sprintf("^%s", makeRegexpSafe(text)), s)
+        if (length(comps) && !is.null(add))
+            sprintf("%s%s", comps, add)
+        else
+            comps
+    }
+    else character()
+}
+
 
 
 ## this provides the most basic completion, looking for completions in
 ## the search path using apropos, plus keywords.  Plus completion on
-## attached packages if settings$ns == TRUE
+## attached/loaded packages if settings$ns == TRUE
 
 
 normalCompletions <-
@@ -586,7 +603,7 @@ normalCompletions <-
         comps <-
             if (.CompletionEnv$settings[["fuzzy"]])
                 fuzzyApropos(sprintf("^%s", makeRegexpSafe(text)))
-            else 
+            else
                 apropos(sprintf("^%s", makeRegexpSafe(text)), ignore.case = FALSE)
         if (.CompletionEnv$settings[["func"]] && check.mode && !is.null(add.fun))
         {
@@ -596,7 +613,7 @@ normalCompletions <-
                     sprintf("%s%s", comps[which.function], add.fun)
             ##sprintf("\033[31m%s\033[0m%s", comps[which.function], add.fun)
         }
-        c(comps, keywordCompletions(text), attachedPackageCompletions(text))
+        c(comps, keywordCompletions(text), loadedPackageCompletions(text))
     }
 }
 
@@ -665,7 +682,7 @@ inFunction <-
 
     temp <-
         data.frame(i = c(parens[["("]], parens[[")"]]),
-                   c = rep(c(1, -1), sapply(parens, length)))
+                   c = rep(c(1, -1), lengths(parens)))
     if (nrow(temp) == 0) return(character())
     temp <- temp[order(-temp$i), , drop = FALSE] ## order backwards
     wp <- which(cumsum(temp$c) > 0)
@@ -698,7 +715,7 @@ inFunction <-
         else ## guess function name
         {
             possible <- suppressWarnings(strsplit(prefix, breakRE, perl = TRUE))[[1L]]
-            possible <- possible[possible != ""]
+            possible <- possible[nzchar(possible)]
             if (length(possible)) return(tail.default(possible, 1))
             else return(character())
         }
@@ -825,7 +842,7 @@ functionArgs <-
 isInsideQuotes <-
 fileCompletionPreferred <- function()
 {
-    ((st <- .CompletionEnv[["start"]]) > 0 && {
+    (.CompletionEnv[["start"]] > 0 && {
 
         ## yes if the number of quote signs to the left is odd
         linebuffer <- .CompletionEnv[["linebuffer"]]
@@ -882,6 +899,11 @@ fileCompletions <- function(token)
     ## are included.  Get 'correct' partial file name by looking back
     ## to begin quote
     pfilename <- correctFilenameToken()
+    
+    ## This may come from an illegal string like "C:\Prog".  Try to parse it:
+    pfilename <- try(eval(parse(text = paste0('"', token, '"'))), silent = TRUE)
+    if (inherits(pfilename, "try-error"))
+    	return(character())
 
     ## Sys.glob doesn't work without expansion.  Is that intended?
     pfilename.expanded <- path.expand(pfilename)
@@ -908,6 +930,11 @@ fileCompletions <- function(token)
     ## need to delete extra part
     if (pfilename != token)
         comps <- substring(comps, nchar(pfilename) - nchar(token) + 1L, 1000L)
+        
+    ## In Win32, we often have backslashes in names. Also possible on 
+    ## Unix, though unlikely.  Add escapes for those and for quotes.
+    comps <- gsub("([\\\\'\"])", "\\\\\\1", comps)
+    
     comps
 }
 
@@ -921,6 +948,10 @@ fileCompletions <- function(token)
 
 .completeToken <- function()
 {
+    ## Allow override by user-specified function
+    custom.completer <- rc.getOption("custom.completer")
+    if (is.function(custom.completer))
+        return (custom.completer(.CompletionEnv))
     text <- .CompletionEnv[["token"]]
     if (isInsideQuotes())
     {
@@ -1008,10 +1039,10 @@ fileCompletions <- function(token)
                                            fullToken$start-2L,
                                            fullToken$start-1L)) %in% c("::")))
             ## in anticipation that we will handle this eventually:
-            probablyBacktick <- (fullToken$start >= 1L &&
-                                 ((substr(.CompletionEnv[["linebuffer"]],
-                                          fullToken$start,
-                                          fullToken$start)) %in% c("`")))
+##             probablyBacktick <- (fullToken$start >= 1L &&
+##                                  ((substr(.CompletionEnv[["linebuffer"]],
+##                                           fullToken$start,
+##                                           fullToken$start)) %in% c("`")))
 
             probablySpecial <- probablyHelp || probablyName || probablyNamespace
 
@@ -1112,7 +1143,7 @@ fileCompletions <- function(token)
         {
             comps <- paste0(prefix, comps)
         }
-        comps <- c(comps, fargComps)
+        comps <- c(fargComps, comps)
         .CompletionEnv[["comps"]] <- comps
     }
 }
diff --git a/src/library/utils/R/data.R b/src/library/utils/R/data.R
index b81b46a..519fa93 100644
--- a/src/library/utils/R/data.R
+++ b/src/library/utils/R/data.R
@@ -1,7 +1,7 @@
 #  File src/library/utils/R/data.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
-#  Copyright (C) 1995-2013 The R Core Team
+#  Copyright (C) 1995-2015 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
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 data <-
 function(..., list = character(), package = NULL, lib.loc = NULL,
@@ -45,10 +45,10 @@ function(..., list = character(), package = NULL, lib.loc = NULL,
         paths <- c(path.package(package, TRUE),
                    if(!length(package)) getwd(), # ignored if NULL
                    paths)
-    paths <- unique(paths[file.exists(paths)])
+    paths <- unique(normalizePath(paths[file.exists(paths)]))
 
     ## Find the directories with a 'data' subdirectory.
-    paths <- paths[file_test("-d", file.path(paths, "data"))]
+    paths <- paths[dir.exists(file.path(paths, "data"))]
 
     dataExts <- tools:::.make_file_exts("data")
 
diff --git a/src/library/utils/R/databrowser.R b/src/library/utils/R/databrowser.R
index 97fcb2c..23ff520 100644
--- a/src/library/utils/R/databrowser.R
+++ b/src/library/utils/R/databrowser.R
@@ -1,5 +1,5 @@
 #  File src/library/utils/R/databrowser.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
 #  Copyright (C) 1995-2013 The R Core Team
 #
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 browseEnv <- function(envir = .GlobalEnv, pattern,
                       excludepatt = "^last\\.warning",
diff --git a/src/library/utils/R/de.R b/src/library/utils/R/de.R
index 4369c66..db3c125 100644
--- a/src/library/utils/R/de.R
+++ b/src/library/utils/R/de.R
@@ -1,5 +1,5 @@
 #  File src/library/utils/R/de.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
 #  Copyright (C) 1995-2013 The R Core Team
 #
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 de.ncols <- function(inlist)
 {
diff --git a/src/library/utils/R/debugcall.R b/src/library/utils/R/debugcall.R
new file mode 100644
index 0000000..06e12b7
--- /dev/null
+++ b/src/library/utils/R/debugcall.R
@@ -0,0 +1,93 @@
+##  File src/library/utils/R/debugcall.R
+##  Part of the R package, https://www.R-project.org
+##
+##  Copyright (C) 1995-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
+##  the Free Software Foundation; either version 2 of the License, or
+##  (at your option) any later version.
+##
+##  This program is distributed in the hope that it will be useful,
+##  but WITHOUT ANY WARRANTY; without even the implied warranty of
+##  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+##  GNU General Public License for more details.
+##
+##  A copy of the GNU General Public License is available at
+##  https://www.R-project.org/Licenses/
+
+.debugcall <- function(call, op) {
+    funsym <- deparse(call[[1L]])
+    func <- get(funsym, parent.frame(2L), mode="function")
+    
+    have.methods <- isNamespaceLoaded("methods")
+    func <- if(is.primitive(func)) {
+        if (have.methods) methods::getGeneric(func)
+    } else func
+    if(is.null(func)) {
+        stop("Cannot debug primitive functions unless they are implicit generics (requires loading the methods package)")
+    }
+    mcall <- match.call(func, call)
+
+    env <- parent.frame(2L)
+    sig <- NULL
+    s4Generic <- have.methods && methods::isGeneric(funsym)
+    if(!s4Generic) {
+        s3ret <- isS3stdGeneric(func)
+        if(s3ret) {
+            genname <- names(s3ret)
+            arg <- eval(mcall[[2L]], envir=env) 
+            func <- getS3method(genname, class(arg))
+        }
+    } else {
+        sig <- .signatureFromCall(func, mcall, env)
+    }
+    op(func, signature = sig)
+}
+
+.signatureFromCall <- function(fdef, expr, envir, doEval = TRUE) {
+    args <- formals(fdef)
+    call <- match.call(fdef, expr, expand.dots = FALSE)
+    args[names(call[-1L])] <- call[-1L]
+    if ("..." %in% names(call)) 
+        args$... <- args$...[[1L]]
+    sigNames <- fdef at signature
+    sigClasses <- rep.int("missing", length(sigNames))
+    names(sigClasses) <- sigNames
+    for (arg in sigNames) {
+        argExpr <- methods::elNamed(args, arg)
+        if (!missing(argExpr) && !is.null(argExpr)) {
+            simple <- (is.character(argExpr) || is.name(argExpr))
+            ## TODO:  ideally, if doEval is TRUE, we would like to
+            ## create the same context used by applyClosure in
+            ## eval.c, but then skip the actual evaluation of the
+            ## body.  If we could create this environment then
+            ## passing it to selectMethod is closer to the semantics
+            ## of the "real" function call than the code below.
+            ## But, seems to need a change to eval.c and a flag to
+            ## the evaluator.
+            if (doEval || !simple) {
+                argVal <- try(eval(argExpr, envir))
+                if (methods::is(argVal, "try-error")) 
+                    stop(gettextf("error in trying to evaluate the expression for argument %s (%s)", 
+                                  sQuote(arg), deparse(argExpr)), domain = NA)
+                sigClasses[[arg]] <- class(argVal)[1L]
+            }
+            else sigClasses[[arg]] <- as.character(argExpr)
+        }
+    }
+    sigClasses
+}
+
+debugcall <- function(call, once = FALSE)  {
+    stopifnot(length(once) == 1L, is.logical(once), !is.na(once))
+    call <- substitute(call)
+    .debugcall(call, if (once) debugonce else debug)
+    invisible(call)
+}
+
+undebugcall <- function(call)  {
+    call <- substitute(call)
+    .debugcall(call, undebug)
+    invisible(NULL)
+}
diff --git a/src/library/utils/R/debugger.R b/src/library/utils/R/debugger.R
index 137b057..8c07026 100644
--- a/src/library/utils/R/debugger.R
+++ b/src/library/utils/R/debugger.R
@@ -1,7 +1,7 @@
 #  File src/library/utils/R/debugger.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
-#  Copyright (C) 1995-2013 The R Core Team
+#  Copyright (C) 1995-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
@@ -14,19 +14,27 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
-dump.frames <- function(dumpto = "last.dump", to.file = FALSE)
+dump.frames <- function(dumpto = "last.dump", to.file = FALSE,
+                        include.GlobalEnv = FALSE)
 {
     calls <- sys.calls()
     last.dump <- sys.frames()
     names(last.dump) <- limitedLabels(calls)
+    if (include.GlobalEnv) {
+	## include a copy of (and not just a reference to) .GlobalEnv in the dump
+        ## cp_envir(EE) := as.environment(as.list(EE, all.names=TRUE))
+	last.dump <- c(".GlobalEnv" =
+                           as.environment(as.list(.GlobalEnv, all.names = TRUE)),
+		       last.dump)
+    }
     last.dump <- last.dump[-length(last.dump)] # remove this function
     attr(last.dump, "error.message") <- geterrmessage()
     class(last.dump) <- "dump.frames"
     if(dumpto != "last.dump") assign(dumpto, last.dump)
     if (to.file) # compress=TRUE is now the default.
-        save(list=dumpto, file = paste(dumpto, "rda", sep = "."))
+        save(list=dumpto, file = paste0(dumpto, ".rda"))
     else assign(dumpto, last.dump, envir=.GlobalEnv)
     invisible()
 }
diff --git a/src/library/utils/R/demo.R b/src/library/utils/R/demo.R
index e21c8dc..4cea729 100644
--- a/src/library/utils/R/demo.R
+++ b/src/library/utils/R/demo.R
@@ -1,7 +1,7 @@
 #  File src/library/utils/R/demo.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
-#  Copyright (C) 1995-2012 The R Core Team
+#  Copyright (C) 1995-2014 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
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 demo <-
 function(topic, package = NULL, lib.loc = NULL,
@@ -25,7 +25,7 @@ function(topic, package = NULL, lib.loc = NULL,
     paths <- find.package(package, lib.loc, verbose = verbose)
 
     ## Find the directories with a 'demo' subdirectory.
-    paths <- paths[file_test("-d", file.path(paths, "demo"))]
+    paths <- paths[dir.exists(file.path(paths, "demo"))]
     ## Earlier versions remembered given packages with no 'demo'
     ## subdirectory, and warned about them.
 
diff --git a/src/library/utils/R/edit.R b/src/library/utils/R/edit.R
index d1422f0..ee562d4 100644
--- a/src/library/utils/R/edit.R
+++ b/src/library/utils/R/edit.R
@@ -1,7 +1,7 @@
 #  File src/library/utils/R/edit.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
-#  Copyright (C) 1995-2012 The R Core Team
+#  Copyright (C) 1995-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
@@ -14,18 +14,19 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 check_for_XQuartz <- function()
 {
-    r_arch <- .Platform$r_arch
-    DSO <- file.path(R.home("modules"), "R_de.so")
-    out <- system2("otool", c("-L", shQuote(DSO)), stdout = TRUE)
-    ind <- grep("libX11[.][0-9]+[.]dylib", out)
-    if(length(ind)) {
-        this <- sub(" .*", "", sub("^\t", "", out[ind]))
-        if(!file.exists(this))
-            stop("X11 library is missing: install XQuartz from xquartz.macosforge.org", domain = NA)
+    if (file.exists("/usr/bin/otool") &&
+        file.exists(DSO <- file.path(R.home("modules"), "R_de.so"))) {
+        out <- system2("/usr/bin/otool", c("-L", shQuote(DSO)), stdout = TRUE)
+        ind <- grep("libX11[.][0-9]+[.]dylib", out)
+        if(length(ind)) {
+            this <- sub(" .*", "", sub("^\t", "", out[ind]))
+            if(!file.exists(this))
+                stop("X11 library is missing: install XQuartz from xquartz.macosforge.org", domain = NA)
+        }
     }
 }
 
@@ -65,11 +66,11 @@ View <- function (x, title)
         else as.character(x)
     }
     x0 <- as.data.frame(x)
-    x <- lapply(x0, as.num.or.char)
+    x <- as.list(format.data.frame(x0))
     rn <- row.names(x0)
     if(any(rn != seq_along(rn))) x <- c(list(row.names = rn), x)
     if(!is.list(x) || !length(x) || !all(sapply(x, is.atomic)) ||
-       !max(sapply(x, length)))
+       !max(lengths(x)))
         stop("invalid 'x' argument")
     if (grepl("darwin", R.version$os)) check_for_XQuartz()
     invisible(.External2(C_dataviewer, x, title))
@@ -146,7 +147,7 @@ edit.data.frame <-
         ## e.g. started with 0-col data frame or NULL, and created no cols
         return (name)
     }
-    lengths <- sapply(out, length)
+    lengths <- lengths(out)
     maxlength <- max(lengths)
     if (edit.row.names) rn <- out[[1L]]
     for (i in which(lengths != maxlength))
@@ -217,7 +218,8 @@ edit.matrix <-
                 call. = FALSE, immediate. = TRUE)
 
     dn <- dimnames(name)
-    datalist <- split(name, col(name))
+    ## <FIXME split.matrix>
+    datalist <- split(c(name), col(name))
     if(!is.null(dn[[2L]])) names(datalist) <- dn[[2L]]
     else names(datalist) <- paste0("col", 1L:ncol(name))
     modes <- as.list(rep.int(mode(name), ncol(name)))
@@ -231,7 +233,7 @@ edit.matrix <-
 
     out <- .External2(C_dataentry, datalist, modes)
 
-    lengths <- sapply(out, length)
+    lengths <- lengths(out)
     maxlength <- max(lengths)
     if (edit.row.names) rn <- out[[1L]]
     for (i in which(lengths != maxlength))
@@ -251,10 +253,10 @@ edit.matrix <-
 }
 
 file.edit <-
-  function (..., title = file, editor=getOption("editor"), fileEncoding="")
+  function (..., title = file, editor = getOption("editor"), fileEncoding = "")
 {
     file <- path.expand(c(...))
-    title <- rep(as.character(title), len=length(file))
+    title <- rep_len(as.character(title), length(file))
     if(nzchar(fileEncoding) && fileEncoding != "native.enc") {
         tfile <- file
         for(i in seq_along(file)) {
diff --git a/src/library/utils/R/example.R b/src/library/utils/R/example.R
index ab1f142..32eda31 100644
--- a/src/library/utils/R/example.R
+++ b/src/library/utils/R/example.R
@@ -1,7 +1,7 @@
 #  File src/library/utils/R/example.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
-#  Copyright (C) 1995-2013 The R Core Team
+#  Copyright (C) 1995-2015 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
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 ## Examples as from 2.11.0 will always be new-style and hence in UTF-8
 example <-
@@ -23,7 +23,7 @@ function(topic, package = NULL, lib.loc = NULL,
 	 echo = TRUE, verbose = getOption("verbose"), setRNG = FALSE,
          ask = getOption("example.ask"),
 	 prompt.prefix = abbreviate(topic, 6),
-	 run.dontrun = FALSE)
+	 run.dontrun = FALSE, run.donttest = interactive())
 {
     if (!character.only) {
         topic <- substitute(topic)
@@ -40,7 +40,8 @@ function(topic, package = NULL, lib.loc = NULL,
     pkgname <- basename(packagePath)
     lib <- dirname(packagePath)
     tf <- tempfile("Rex")
-    tools::Rd2ex(.getHelpFile(file), tf, commentDontrun = !run.dontrun)
+    tools::Rd2ex(.getHelpFile(file), tf, commentDontrun = !run.dontrun,
+		 commentDonttest = !run.donttest)
     if (!file.exists(tf)) {
 	if(give.lines) return(character())
         warning(gettextf("%s has a help file but no examples", sQuote(topic)),
diff --git a/src/library/utils/R/filetest.R b/src/library/utils/R/filetest.R
index f20a1c2..b2a7ce0 100644
--- a/src/library/utils/R/filetest.R
+++ b/src/library/utils/R/filetest.R
@@ -1,5 +1,5 @@
 #  File src/library/utils/R/filetest.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
 #  Copyright (C) 1995-2014 The R Core Team
 #
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 ### ** file_test
 
diff --git a/src/library/utils/R/findLineNum.R b/src/library/utils/R/findLineNum.R
index 200fb4b..9c8eecd 100644
--- a/src/library/utils/R/findLineNum.R
+++ b/src/library/utils/R/findLineNum.R
@@ -1,5 +1,5 @@
 #  File src/library/utils/R/fineLineNum.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
 #  Copyright (C) 2009-2014 Duncan Murdoch and the R Core Team
 #
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 
 .normalizePath <- function(path, wd) {
diff --git a/src/library/utils/R/fix.R b/src/library/utils/R/fix.R
index 82a3bbb..c2cab5e 100644
--- a/src/library/utils/R/fix.R
+++ b/src/library/utils/R/fix.R
@@ -1,5 +1,5 @@
 #  File src/library/utils/R/fix.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
 #  Copyright (C) 1995-2012 The R Core Team
 #
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 fix <- function (x, ...)
 {
diff --git a/src/library/utils/R/format.R b/src/library/utils/R/format.R
index 26ee948..3b584af 100644
--- a/src/library/utils/R/format.R
+++ b/src/library/utils/R/format.R
@@ -1,7 +1,7 @@
 #  File src/library/utils/R/format.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
-#  Copyright (C) 1995-2012 The R Core Team
+#  Copyright (C) 1995-2015 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
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 formatUL <-
 function(x, label = "*", offset = 0,
@@ -67,18 +67,14 @@ function(labels, x, offset = 0, width = 0.9 * getOption("width"),
     ## left-justified text.  Somewhat tricky because strwrap() eats up
     ## leading whitespace ...
 
-    .make_empty_string <- function(n) {
-        paste(rep.int(" ", n), collapse = "")
-    }
-
     labels <- format(labels, justify = "right")
     len <- length(x)
     delta <- nchar(labels[1L], "width") + offset
     x <- strwrap(x, width = width - delta - nchar(sep, "width"),
                  simplify = FALSE)
-    nlines <- cumsum(sapply(x, length))
-    prefix <- rep.int(.make_empty_string(delta), nlines[len])
+    nlines <- cumsum(lengths(x))
+    prefix <- rep.int(strrep(" ", delta), nlines[len])
     prefix[1L + c(0L, nlines[-len])] <-
-        paste0(.make_empty_string(offset), labels)
+        paste0(strrep(" ", offset), labels)
     paste(prefix, unlist(x), sep = sep)
 }
diff --git a/src/library/utils/R/frametools.R b/src/library/utils/R/frametools.R
index cfb6b37..fa05338 100644
--- a/src/library/utils/R/frametools.R
+++ b/src/library/utils/R/frametools.R
@@ -1,7 +1,7 @@
 #  File src/library/utils/R/frametools.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
-#  Copyright (C) 1995-2012 The R Core Team
+#  Copyright (C) 1995-2015 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
@@ -14,11 +14,11 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 stack <- function(x, ...) UseMethod("stack")
 
-stack.data.frame <- function(x, select, ...)
+stack.data.frame <- function(x, select, drop=FALSE, ...)
 {
     if (!missing(select)) {
 	nl <- as.list(1L:ncol(x))
@@ -31,21 +31,28 @@ stack.data.frame <- function(x, select, ...)
     if(!all(keep))
         warning("non-vector columns will be ignored")
     x <- x[, keep, drop = FALSE]
-    ## need to avoid promotion to factors
+    ind <- rep(factor(names(x), unique(names(x))), lengths(x))
+    if (drop) {
+        ind <- droplevels(ind)
+    }
     data.frame(values = unlist(unname(x)),
-               ind = factor(rep.int(names(x), lapply(x, length))),
+               ind,
                stringsAsFactors = FALSE)
 }
 
-stack.default <- function(x, ...)
+stack.default <- function(x, drop=FALSE, ...)
 {
     x <- as.list(x)
     keep <- unlist(lapply(x, is.vector))
     if(!sum(keep)) stop("at least one vector element is required")
     if(!all(keep)) warning("non-vector elements will be ignored")
     x <- x[keep]
+    ind <- rep(factor(names(x), unique(names(x))), lengths(x))
+    if (drop) {
+        ind <- droplevels(ind)
+    }
     data.frame(values = unlist(unname(x)),
-               ind = factor(rep.int(names(x), lapply(x, length))),
+               ind,
                stringsAsFactors = FALSE)
 }
 
@@ -57,7 +64,7 @@ unstack.data.frame <- function(x, form, ...)
     if (length(form) < 3)
         stop("'form' must be a two-sided formula")
     res <- c(tapply(eval(form[[2L]], x), eval(form[[3L]], x), as.vector))
-    if (length(res) >= 2L && any(diff(unlist(lapply(res, length))) != 0L))
+    if (length(res) >= 2L && any(diff(lengths(res)) != 0L))
         return(res)
     data.frame(res, stringsAsFactors = FALSE)
 }
@@ -69,7 +76,7 @@ unstack.default <- function(x, form, ...)
     if ((length(form) < 3) || (length(all.vars(form))>2))
         stop("'form' must be a two-sided formula with one term on each side")
     res <- c(tapply(eval(form[[2L]], x), eval(form[[3L]], x), as.vector))
-    if (length(res) >= 2L && any(diff(unlist(lapply(res, length))) != 0L))
+    if (length(res) >= 2L && any(diff(lengths(res)) != 0L))
         return(res)
     data.frame(res, stringsAsFactors = FALSE)
 }
diff --git a/src/library/utils/R/glob2rx.R b/src/library/utils/R/glob2rx.R
index 4ebb169..2f7e7b3 100644
--- a/src/library/utils/R/glob2rx.R
+++ b/src/library/utils/R/glob2rx.R
@@ -1,7 +1,7 @@
 #  File src/library/utils/R/glob2rx.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
-#  Copyright (C) 1995-2012 The R Core Team
+#  Copyright (C) 1995-2015 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
@@ -14,10 +14,13 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 glob2rx <- function(pattern, trim.head = FALSE, trim.tail = TRUE)
 {
+    ## special case, since paste ignores 0-length inputs (PR#16205)
+    if(!length(pattern)) return(character())
+
     ## Purpose: Change 'ls' aka 'wildcard' aka 'globbing' _pattern_ to
     ##	      Regular Expression (as in grep, perl, emacs, ...)
     ## -------------------------------------------------------------------------
diff --git a/src/library/utils/R/hasName.R b/src/library/utils/R/hasName.R
new file mode 100644
index 0000000..794bd60
--- /dev/null
+++ b/src/library/utils/R/hasName.R
@@ -0,0 +1,21 @@
+#  File src/library/utils/R/hasName.R
+#  Part of the R package, https://www.R-project.org
+#
+#  Copyright (C) 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
+#  the Free Software Foundation; either version 2 of the License, or
+#  (at your option) any later version.
+#
+#  This program is distributed in the hope that it will be useful,
+#  but WITHOUT ANY WARRANTY; without even the implied warranty of
+#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#  GNU General Public License for more details.
+#
+#  A copy of the GNU General Public License is available at
+#  https://www.R-project.org/Licenses/
+
+# "hasName(x, name)" is defined to be the same as "name %in% names(x)"
+
+hasName <- function(x, name) match(name, names(x), nomatch = 0L) > 0L
diff --git a/src/library/utils/R/head.R b/src/library/utils/R/head.R
index d3e143d..ee14f01 100644
--- a/src/library/utils/R/head.R
+++ b/src/library/utils/R/head.R
@@ -1,7 +1,7 @@
 #  File src/library/utils/R/head.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
-#  Copyright (C) 1995-2012 The R Core Team
+#  Copyright (C) 1995-2015 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
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 ### placed in the public domain 2002
 ### Patrick Burns patrick at burns-stat.com
@@ -78,10 +78,13 @@ tail.matrix <- function(x, n = 6L, addrownums = TRUE, ...)
     stopifnot(length(n) == 1L)
     nrx <- nrow(x)
     n <- if (n < 0L) max(nrx + n, 0L) else min(n, nrx)
-    sel <- seq.int(to = nrx, length.out = n)
+    sel <- as.integer(seq.int(to = nrx, length.out = n))
+    ## TODO: Once we allow "LONG_DIM" for matrices, need
+    ## sel <- seq.int(to = nrx, length.out = n)
+    ## if(nrx <= .Machine$integer.max) sel <- as.integer(sel)
     ans <- x[sel, , drop = FALSE]
     if (addrownums && is.null(rownames(x)))
-    	rownames(ans) <- paste0("[", sel, ",]")
+	rownames(ans) <- format(sprintf("[%d,]", sel), justify="right")
     ans
 }
 tail.table  <- function(x, n = 6L, addrownums = TRUE, ...) {
diff --git a/src/library/utils/R/help.R b/src/library/utils/R/help.R
index 0e7fe15..ec27063 100644
--- a/src/library/utils/R/help.R
+++ b/src/library/utils/R/help.R
@@ -1,7 +1,7 @@
 #  File src/library/utils/R/help.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
-#  Copyright (C) 1995-2012 The R Core Team
+#  Copyright (C) 1995-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
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 help <-
 function(topic, package = NULL, lib.loc = NULL,
@@ -23,25 +23,24 @@ function(topic, package = NULL, lib.loc = NULL,
          help_type = getOption("help_type"))
 {
     types <- c("text", "html", "pdf")
+    help_type <- if(!length(help_type)) "text"
+		 else match.arg(tolower(help_type), types)
     if(!missing(package)) # Don't check for NULL; may be nonstandard eval
         if(is.name(y <- substitute(package)))
             package <- as.character(y)
-
     ## If no topic was given ...
     if(missing(topic)) {
         if(!is.null(package)) {	# "Help" on package.
-            help_type <- if(!length(help_type)) "text"
-            else match.arg(tolower(help_type), types)
             ## Carter Butts and others misuse 'help(package=)' in startup
             if (interactive() && help_type == "html") {
-                if (tools:::httpdPort == 0L) tools::startDynamicHelp()
-                if (tools:::httpdPort <= 0L) # fallback to text help
+                port <- tools::startDynamicHelp(NA)
+                if (port <= 0L) # fallback to text help
                     return(library(help = package, lib.loc = lib.loc,
                                    character.only = TRUE))
                 browser <- if (.Platform$GUI == "AQUA") {
                     get("aqua.browser", envir = as.environment("tools:RGUI"))
                 } else getOption("browser")
- 		browseURL(paste0("http://127.0.0.1:", tools:::httpdPort,
+ 		browseURL(paste0("http://127.0.0.1:", port,
                                  "/library/", package, "/html/00Index.html"),
                           browser)
                 return(invisible())
@@ -69,32 +68,25 @@ function(topic, package = NULL, lib.loc = NULL,
         topic <- stopic
     }
 
-    help_type <- if(!length(help_type)) "text"
-    else match.arg(tolower(help_type), types)
-    
     paths <- index.search(topic,
-                          find.package(if (is.null(package)) loadedNamespaces() else package, 
+                          find.package(if (is.null(package)) loadedNamespaces() else package,
 			               lib.loc, verbose = verbose))
-    tried_all_packages <- FALSE
-    if(!length(paths)
-       && is.logical(try.all.packages) && !is.na(try.all.packages)
-       && try.all.packages && is.null(package) && is.null(lib.loc)) {
+    try.all.packages <- !length(paths) && is.logical(try.all.packages) &&
+        !is.na(try.all.packages) && try.all.packages && is.null(package) && is.null(lib.loc)
+    if(try.all.packages) {
         ## Try all the remaining packages.
         for(lib in .libPaths()) {
             packages <- .packages(TRUE, lib)
             packages <- packages[is.na(match(packages, .packages()))]
             paths <- c(paths, index.search(topic, file.path(lib, packages)))
         }
-        paths <- paths[paths != ""]
-        tried_all_packages <- TRUE
+        paths <- paths[nzchar(paths)]
     }
 
-    paths <- unique(paths)
-    attributes(paths) <-
-        list(call = match.call(), topic = topic,
-             tried_all_packages = tried_all_packages, type = help_type)
-    class(paths) <- "help_files_with_topic"
-    paths
+    structure(unique(paths),
+	      call = match.call(), topic = topic,
+	      tried_all_packages = try.all.packages, type = help_type,
+	      class = "help_files_with_topic")
 }
 
 print.help_files_with_topic <- function(x, ...)
@@ -113,14 +105,13 @@ print.help_files_with_topic <- function(x, ...)
         return(invisible(x))
     }
 
-    if(type == "html")
-        if (tools:::httpdPort == 0L) tools::startDynamicHelp()
+    port <- if(type == "html") tools::startDynamicHelp(NA) else NULL
 
     if(attr(x, "tried_all_packages")) {
         paths <- unique(dirname(dirname(paths)))
         msg <- gettextf("Help for topic %s is not in any loaded package but can be found in the following packages:",
                         sQuote(topic))
-        if (type == "html" && tools:::httpdPort > 0L) {
+        if (type == "html" && port > 0L) {
             path <- file.path(tempdir(), ".R/doc/html")
             dir.create(path, recursive = TRUE, showWarnings = FALSE)
             out <- paste0('<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">\n',
@@ -133,7 +124,7 @@ print.help_files_with_topic <- function(x, ...)
                      '<tr align="left" valign="top">\n',
                      '<td width="25%">Package</td><td>Library</td></tr>\n')
             pkgs <- basename(paths)
-            links <- paste0('<a href="http://127.0.0.1:', tools:::httpdPort,
+            links <- paste0('<a href="http://127.0.0.1:', port,
                             '/library/', pkgs, '/help/', topic, '">',
                             pkgs, '</a>')
             out <- c(out, paste0('<tr align="left" valign="top">\n',
@@ -141,20 +132,23 @@ print.help_files_with_topic <- function(x, ...)
                                 dirname(paths), '</td></tr>\n'))
             out <- c(out, "</table>\n</p>\n<hr>\n</body></html>")
             writeLines(out, file.path(path, "all.available.html"))
-            browseURL(paste0("http://127.0.0.1:", tools:::httpdPort,
-                             "/doc/html/all.available.html"), browser)
+            browseURL(paste0("http://127.0.0.1:", port,
+                             "/doc/html/all.available.html"),
+                      browser)
         } else {
             writeLines(c(strwrap(msg), "",
-                         paste(" ",
-                               formatDL(c(gettext("Package"), basename(paths)),
-                                        c(gettext("Library"), dirname(paths)),
-                                        indent = 22))))
+                         paste0("  ",
+                                formatDL(c(gettext("Package"), basename(paths)),
+                                         c(gettext("Library"), dirname(paths)),
+                                         indent = 22))))
         }
     } else {
         if(length(paths) > 1L) {
-            if (type == "html" && tools:::httpdPort > 0L) { # Redo the search if dynamic help is running
-		browseURL(paste0("http://127.0.0.1:", tools:::httpdPort,
-                                 "/library/NULL/help/", topic), browser)
+            if (type == "html" && port > 0L) { # Redo the search if dynamic help is running
+		browseURL(paste0("http://127.0.0.1:", port,
+                                 "/library/NULL/help/",
+                                 URLencode(topic, reserved = TRUE)),
+                          browser)
 		return(invisible(x))
 	    }
             file <- paths[1L]
@@ -165,7 +159,7 @@ print.help_files_with_topic <- function(x, ...)
             txt <- formatDL(c("Package", basename(paths)),
                             c("Library", dirname(paths)),
                             indent = 22L)
-            writeLines(c(strwrap(msg), "", paste(" ", txt), ""))
+            writeLines(c(strwrap(msg), "", paste0("  ", txt), ""))
             if(interactive()) {
                 fp <- file.path(paths, "Meta", "Rd.rds")
                 tp <- basename(p)
@@ -191,13 +185,14 @@ print.help_files_with_topic <- function(x, ...)
             file <- paths
 
         if(type == "html") {
-            if (tools:::httpdPort > 0L) {
+            if (port > 0L) {
 		path <- dirname(file)
 		dirpath <- dirname(path)
 		pkgname <- basename(dirpath)
-		browseURL(paste0("http://127.0.0.1:", tools:::httpdPort,
+		browseURL(paste0("http://127.0.0.1:", port,
                                  "/library/", pkgname, "/html/", basename(file),
-                                 ".html"), browser)
+                                 ".html"),
+                          browser)
             } else {
                 warning("HTML help is unavailable", call. = FALSE)
                 att <- attributes(x)
@@ -251,7 +246,7 @@ print.help_files_with_topic <- function(x, ...)
     cat("\\end{document}\n", file = texfile, append = TRUE)
     helper <- if (exists("offline_help_helper", envir = .GlobalEnv))
         get("offline_help_helper", envir = .GlobalEnv)
-    else utils:::offline_help_helper
+    else offline_help_helper
     if (has_figure) helper(texfile, type, texinputs)
     else helper(texfile, type)
     invisible()
@@ -266,7 +261,7 @@ print.help_files_with_topic <- function(x, ...)
         stop(gettextf("invalid %s argument", sQuote("file")), domain = NA)
     pkgname <- basename(dirpath)
     RdDB <- file.path(path, pkgname)
-    if(!file.exists(paste(RdDB, "rdx", sep = ".")))
+    if(!file.exists(paste0(RdDB, ".rdx")))
         stop(gettextf("package %s exists but was not installed under R >= 2.10.0 so help cannot be accessed", sQuote(pkgname)), domain = NA)
     tools:::fetchRdDB(RdDB, basename(file))
 }
diff --git a/src/library/utils/R/help.request.R b/src/library/utils/R/help.request.R
index 05c88cb..18a02de 100644
--- a/src/library/utils/R/help.request.R
+++ b/src/library/utils/R/help.request.R
@@ -1,7 +1,7 @@
 #  File src/library/utils/R/unix/help.request.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
-#  Copyright (C) 1995-2013 The R Core Team
+#  Copyright (C) 1995-2015 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
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 help.request <- function (subject = "", address = "r-help at R-project.org",
 			  file = "R.help.request", ...)
@@ -67,14 +67,14 @@ help.request <- function (subject = "", address = "r-help at R-project.org",
 
     cat("Checklist:\n")
     post <- readline("Have you read the posting guide? (y/n) ")
-    if (no(post)) return(go("http://www.r-project.org/posting-guide.html"))
+    if (no(post)) return(go("https://www.r-project.org/posting-guide.html"))
     FAQ <- readline("Have you checked the FAQ? (y/n) ")
-    if (no(FAQ)) return(go("http://cran.r-project.org/faqs.html"))
+    if (no(FAQ)) return(go("https://cran.r-project.org/faqs.html"))
     intro <- readline("Have you checked An Introduction to R? (y/n) ")
     if (no(intro))
-	return(go("http://cran.r-project.org/manuals.html"))
+	return(go("https://cran.r-project.org/manuals.html"))
     NEWS <- readMyLine("Have you checked the NEWS of the latest development release?")
-    if (no(NEWS)) return(go("http://cran.r-project.org/doc/manuals/r-devel/NEWS.html"))
+    if (no(NEWS)) return(go("https://cran.r-project.org/doc/manuals/r-devel/NEWS.html"))
     rsitesearch <- readline("Have you looked on RSiteSearch? (y/n) ")
     if (no(rsitesearch)) {
 	catPlease()
@@ -95,7 +95,7 @@ help.request <- function (subject = "", address = "r-help at R-project.org",
 	if(no(other)) return("Please do this first.")
     }
 
-    page <- url("http://cran.r-project.org/bin/windows/base")
+    page <- url("https://cran.r-project.org/bin/windows/base")
     title <- grep("<title>", readLines(page, 10L), fixed = TRUE, value = TRUE)
     ver <- sub("^.*R-([^ ]*) for Windows.*$", "\\1", title)
     if (getRversion() < numeric_version(ver)) {
diff --git a/src/library/utils/R/help.search.R b/src/library/utils/R/help.search.R
index 7c1d41a..fa312b9 100644
--- a/src/library/utils/R/help.search.R
+++ b/src/library/utils/R/help.search.R
@@ -1,7 +1,7 @@
 #  File src/library/utils/R/help.search.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
-#  Copyright (C) 1995-2013 The R Core Team
+#  Copyright (C) 1995-2015 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
@@ -14,9 +14,10 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
-.hsearch_db <- local({
+.hsearch_db <-
+local({
     hdb <- NULL
     function(new) {
 	if(!missing(new))
@@ -26,36 +27,38 @@
     }
 })
 
-merge.vignette.index <- function(hDB, path, pkg) {
-    ## Vignettes in the hsearch index started in R2.14.0
+merge_vignette_index <-
+function(hDB, path, pkg)
+{
+    ## Vignettes in the hsearch index started in R 2.14.0
     ## Most packages don't have them, so the following should not be
     ## too inefficient
     if(file.exists(v_file <- file.path(path, "Meta", "vignette.rds"))
        && !is.null(vDB <- readRDS(v_file))
        && nrow(vDB)) {
 	## Make it look like an hDB base matrix and append it
-	base <- matrix("", nrow=nrow(vDB), ncol=8)
-	colnames(base) <- colnames(hDB[[1]])
-	base[,"Package"] <- pkg
-	base[,"LibPath"] <- path
-	id <- as.character(1:nrow(vDB) + NROW(hDB[[1]]))
-	base[,"ID"] <- id
-	base[,"name"] <- sub("\\.[^.]*$", "", basename(vDB$File))
-	base[,"topic"] <- base[,"name"]
-	base[,"title"] <- vDB$Title
-	base[,"Type"] <- "vignette"
+	base <- matrix("", nrow = nrow(vDB), ncol = 8L)
+	colnames(base) <- colnames(hDB[[1L]])
+	base[, "Package"] <- pkg
+	base[, "LibPath"] <- path
+	id <- as.character(1:nrow(vDB) + NROW(hDB[[1L]]))
+	base[, "ID"] <- id
+	base[, "Name"] <- sub("\\.[^.]*$", "", basename(vDB$File))
+	base[, "Topic"] <- base[, "Name"]
+	base[, "Title"] <- vDB$Title
+	base[, "Type"] <- "vignette"
 	hDB[[1L]] <- rbind(hDB[[1L]], base)
-	aliases <- matrix("", nrow=nrow(vDB), ncol=3)
-	colnames(aliases) <- colnames(hDB[[2]])
-	aliases[,"Aliases"] <- base[,"name"]
-	aliases[,"ID"] <- id
-	aliases[,"Package"] <- pkg
+	aliases <- matrix("", nrow = nrow(vDB), ncol = 3L)
+	colnames(aliases) <- colnames(hDB[[2L]])
+	aliases[, "Alias"] <- base[, "Name"]
+	aliases[, "ID"] <- id
+	aliases[, "Package"] <- pkg
 	hDB[[2L]] <- rbind(hDB[[2L]], aliases)
-	nkeywords <- sum(sapply(vDB$Keywords, length))
+	nkeywords <- sum(lengths(vDB$Keywords))
 	if (nkeywords) {
-	    keywords <- matrix("", nrow=nkeywords, ncol=3)
-	    colnames(keywords) <- colnames(hDB[[4]])
-	    keywords[,"Concepts"] <- unlist(vDB$Keywords)
+	    keywords <- matrix("", nrow = nkeywords, ncol = 3L)
+	    colnames(keywords) <- colnames(hDB[[4L]])
+	    keywords[,"Concept"] <- unlist(vDB$Keywords)
 	    keywords[,"ID"] <- unlist(lapply(1:nrow(vDB),
 		   function(i) rep(id[i], length(vDB$Keywords[[i]]))))
 	    keywords[,"Package"] <- pkg
@@ -65,64 +68,64 @@ merge.vignette.index <- function(hDB, path, pkg) {
     hDB
 }
 
-merge.demo.index <- function(hDB, path, pkg) {
-    ## Demos in the hsearch index started in R2.14.0
+merge_demo_index <-
+function(hDB, path, pkg)
+{
+    ## Demos in the hsearch index started in R 2.14.0
     if(file.exists(d_file <- file.path(path, "Meta", "demo.rds"))
        && !is.null(dDB <- readRDS(d_file))
        && nrow(dDB)) {
 	## Make it look like an hDB base matrix and append it
-	base <- matrix("", nrow=nrow(dDB), ncol=8)
+	base <- matrix("", nrow = nrow(dDB), ncol = 8L)
 	colnames(base) <- colnames(hDB[[1]])
-	base[,"Package"] <- pkg
-	base[,"LibPath"] <- path
-	id <- as.character(1:nrow(dDB) + NROW(hDB[[1]]))
-	base[,"ID"] <- id
-	base[,"name"] <- dDB[,1]
-	base[,"topic"] <- base[,"name"]
-	base[,"title"] <- dDB[,2]
-	base[,"Type"] <- "demo"
+	base[, "Package"] <- pkg
+	base[, "LibPath"] <- path
+	id <- as.character(1:nrow(dDB) + NROW(hDB[[1L]]))
+	base[, "ID"] <- id
+	base[, "Name"] <- dDB[, 1L]
+	base[, "Topic"] <- base[, "Name"]
+	base[, "Title"] <- dDB[, 2L]
+	base[, "Type"] <- "demo"
 	hDB[[1L]] <- rbind(hDB[[1L]], base)
-	aliases <- matrix("", nrow=nrow(dDB), ncol=3)
-	colnames(aliases) <- colnames(hDB[[2]])
-	aliases[,"Aliases"] <- base[,"name"]
-	aliases[,"ID"] <- id
-	aliases[,"Package"] <- pkg
+	aliases <- matrix("", nrow = nrow(dDB), ncol = 3L)
+	colnames(aliases) <- colnames(hDB[[2L]])
+	aliases[, "Alias"] <- base[, "Name"]
+	aliases[, "ID"] <- id
+	aliases[, "Package"] <- pkg
 	hDB[[2L]] <- rbind(hDB[[2L]], aliases)
     }
     hDB
 }
 
+hsearch_db_fields <-
+    c("alias", "concept", "keyword", "name", "title")
+hsearch_db_types <-
+    c("help", "vignette", "demo")
+
 ## FIXME: use UTF-8, either always or optionally
 ## (Needs UTF-8-savvy & fast agrep, and PCRE regexps.)
 help.search <-
-    function(pattern, fields = c("alias", "concept", "title"),
-             apropos, keyword, whatis, ignore.case = TRUE,
-             package = NULL, lib.loc = NULL,
-             help.db = getOption("help.db"),
-             verbose = getOption("verbose"),
-             rebuild = FALSE, agrep = NULL, use_UTF8 = FALSE,
-             types = getOption("help.search.types")
-)
+function(pattern, fields = c("alias", "concept", "title"),
+         apropos, keyword, whatis, ignore.case = TRUE,
+         package = NULL, lib.loc = NULL,
+         help.db = getOption("help.db"),
+         verbose = getOption("verbose"),
+         rebuild = FALSE, agrep = NULL, use_UTF8 = FALSE,
+         types = getOption("help.search.types"))
 {
-    WINDOWS <- .Platform$OS.type == "windows"
-
     ### Argument handling.
-    FIELDS <- c("alias", "concept", "keyword", "name", "title")
-    TYPES <- c("help", "vignette", "demo")
-
-    if (is.logical(verbose)) verbose <- 2*as.integer(verbose)
     .wrong_args <- function(args)
 	gettextf("argument %s must be a single character string", sQuote(args))
-
+    if(is.logical(verbose)) verbose <- 2 * as.integer(verbose)
     fuzzy <- agrep
     if(!missing(pattern)) {
 	if(!is.character(pattern) || (length(pattern) > 1L))
 	    stop(.wrong_args("pattern"), domain = NA)
-	i <- pmatch(fields, FIELDS)
+	i <- pmatch(fields, hsearch_db_fields)
 	if(anyNA(i))
 	    stop("incorrect field specification")
 	else
-	    fields <- FIELDS[i]
+	    fields <- hsearch_db_fields[i]
     } else if(!missing(apropos)) {
 	if(!is.character(apropos) || (length(apropos) > 1L))
 	    stop(.wrong_args("apropos"), domain = NA)
@@ -148,19 +151,195 @@ help.search <-
     } else {
 	stop("do not know what to search")
     }
-    i <- pmatch(types, TYPES)
+
+    if(!missing(help.db))
+	warning("argument 'help.db' is deprecated")
+
+    ## This duplicates expansion in hsearch_db(), but there is no simple
+    ## way to avoid this.
+    i <- pmatch(types, hsearch_db_types)
     if (anyNA(i))
 	stop("incorrect type specification")
     else
-	types <- TYPES[i]
+	types <- hsearch_db_types[i]
+    
+    ### Set up the hsearch db.
+    db <- hsearch_db(package, lib.loc, types, verbose, rebuild,
+                     use_UTF8)
+    ## Argument lib.loc was expanded when building the hsearch db, so
+    ## get from there.
+    lib.loc <- attr(db, "LibPaths")
+
+    ## Subset to the requested help types if necessary.
+    if(!identical(sort(types), sort(attr(db, "Types")))) {
+        db$Base <- db$Base[!is.na(match(db$Base$Type, types)), ]
+        db[-1L] <-
+            lapply(db[-1L],
+                   function(e) {
+                       e[!is.na(match(e$ID, db$Base$ID)), ]
+                   })
+    }
+        
+    if(!is.null(package)) {
+	## Argument 'package' was given.  Need to check that all given
+	## packages exist in the db, and only search the given ones.
+	pos_in_hsearch_db <-
+	    match(package, unique(db$Base[, "Package"]), nomatch = 0L)
+        ## This should not happen for R >= 2.4.0
+	if(any(pos_in_hsearch_db) == 0L)
+	    stop(gettextf("no information in the database for package %s: need 'rebuild = TRUE'?",
+			  sQuote(package[pos_in_hsearch_db == 0][1L])),
+                 domain = NA)
+	db[] <-
+	    lapply(db,
+		   function(e) {
+		       e[!is.na(match(e$Package, package)), ]
+		   })
+    }
+
+    ### Matching.
+    if(verbose >= 2L) {
+	message("Database of ",
+                NROW(db$Base), " help objects (",
+                NROW(db$Aliases), " aliases, ",
+                NROW(db$Concepts), " concepts, ",
+                NROW(db$Keywords), " keywords)",
+                domain = NA)
+        flush.console()
+    }
+
+    ## <FIXME>
+    ## No need continuing if there are no objects in the data base.
+    ## But shouldn't we return something of class "hsearch"?
+    if(!length(db$Base)) return(invisible())
+    ## </FIXME>
+
+    ## If agrep is NULL (default), we want to use fuzzy matching iff
+    ## 'pattern' contains no characters special to regular expressions.
+    ## We use the following crude approximation: if pattern contains
+    ## only alphanumeric characters or whitespace or a '-', it is taken
+    ## 'as is', and fuzzy matching is used unless turned off explicitly,
+    ## or pattern has very few (currently, less than 5) characters.
+    if(is.null(fuzzy) || is.na(fuzzy))
+	fuzzy <-
+	    (grepl("^([[:alnum:]]|[[:space:]]|-)+$", pattern)
+	     && (nchar(pattern, type="c") > 4L))
+    if(is.logical(fuzzy)) {
+	if(fuzzy)
+	    max.distance <- 0.1
+    }
+    else if(is.numeric(fuzzy) || is.list(fuzzy)) {
+	max.distance <- fuzzy
+	fuzzy <- TRUE
+    }
+    else
+	stop("incorrect 'agrep' specification")
 
+    dbBase <- db$Base
+    search_fun <- if(fuzzy) {
+        function(x) {
+	    agrep(pattern, x, ignore.case = ignore.case,
+		  max.distance = max.distance)
+        }
+    } else {
+        function(x) {
+            grep(pattern, x, ignore.case = ignore.case,
+                 perl = use_UTF8)
+        }
+    }
+    search_db_results <- function(p, f, e)
+        data.frame(Position = p, Field = f, Entry = e,
+                   stringsAsFactors = FALSE)
+    search_db_field <- function(field) {
+	switch(field,
+	       alias = {
+		   aliases <- db$Aliases$Alias
+                   matched <- search_fun(aliases)
+                   search_db_results(match(db$Aliases$ID[matched],
+                                           dbBase$ID),
+                                     rep.int(field, length(matched)),
+                                     aliases[matched])
+	       },
+	       concept = {
+		   concepts <- db$Concepts$Concept
+                   matched <- search_fun(concepts)
+                   search_db_results(match(db$Concepts$ID[matched],
+                                           dbBase$ID),
+                                     rep.int(field, length(matched)),
+                                     concepts[matched])
+	       },
+	       keyword = {
+		   keywords <- db$Keywords$Keyword
+                   matched <- search_fun(keywords)
+                   search_db_results(match(db$Keywords$ID[matched],
+                                           dbBase$ID),
+                                     rep.int(field, length(matched)),
+                                     keywords[matched])
+	       },
+               ## Alternatively, generically use field mapped to title
+               ## case.
+               name = {
+                   matched <- search_fun(dbBase$Name)
+                   search_db_results(matched,
+                                     rep.int("Name", length(matched)),
+                                     dbBase$Name[matched])
+               },
+               title = {
+                   matched <- search_fun(dbBase$Title)
+                   search_db_results(matched,
+                                     rep.int("Title", length(matched)),
+                                     dbBase$Title[matched])
+               }
+               )
+    }
+
+    matches <- NULL
+    for(f in fields)
+        matches <- rbind(matches, search_db_field(f))
+    matches <- matches[order(matches$Position), ]
+    db <- cbind(dbBase[matches$Position,
+                       c("Topic", "Title", "Name", "ID",
+                         "Package", "LibPath", "Type"),
+                       drop = FALSE],
+                matches[c("Field", "Entry")])
+    rownames(db) <- NULL
+    if(verbose>= 2L) {
+        n_of_objects_matched <- length(unique(db[, "ID"]))
+        message(sprintf(ngettext(n_of_objects_matched,
+                                 "matched %d object.",
+                                 "matched %d objects."),
+                        n_of_objects_matched),
+                domain = NA)
+        flush.console()
+    }
+
+    ## Retval.
+    y <- list(pattern = pattern, fields = fields,
+	      type = if(fuzzy) "fuzzy" else "regexp",
+	      agrep = agrep,
+	      ignore.case = ignore.case, types = types,
+	      package = package, lib.loc = lib.loc,
+	      matches = db)
+    class(y) <- "hsearch"
+    y
+}
+
+hsearch_db <-
+function(package = NULL, lib.loc = NULL,
+         types = getOption("help.search.types"),
+         verbose = getOption("verbose"),
+         rebuild = FALSE, use_UTF8 = FALSE)
+{
+    WINDOWS <- .Platform$OS.type == "windows"
+    if(is.logical(verbose)) verbose <- 2 * as.integer(verbose)
     if(is.null(lib.loc))
 	lib.loc <- .libPaths()
+    i <- pmatch(types, hsearch_db_types)
+    if (anyNA(i))
+	stop("incorrect type specification")
+    else
+	types <- hsearch_db_types[i]
 
-    if(!missing(help.db))
-	warning("argument 'help.db' is deprecated")
-
-    ### Set up the hsearch db.
     db <- eval(.hsearch_db())
     if(is.null(db))
 	rebuild <- TRUE
@@ -173,20 +352,19 @@ help.search <-
 	## library path is different from the one used when building the
 	## hsearch db (stored as its "LibPaths" attribute).
 	if(!identical(lib.loc, attr(db, "LibPaths")) ||
-	   !all(types %in% attr(db, "Types")) ||
+	   any(is.na(match(types, attr(db, "Types")))) ||
 	   ## We also need to rebuild the hsearch db in case an existing
 	   ## dir in the library path was modified more recently than
 	   ## the db, as packages might have been installed or removed.
-	   any(attr(db, "mtime") <
-	       file.info(lib.loc[file.exists(lib.loc)])$mtime) ||
+           any(attr(db, "mtime") < file.mtime(lib.loc[file.exists(lib.loc)])) ||
 	   ## Or if the user changed the locale character type ...
 	   !identical(attr(db, "ctype"), Sys.getlocale("LC_CTYPE"))
-	   )
+           )
 	    rebuild <- TRUE
         ## We also need to rebuild if 'packages' was used before and has
         ## changed.
-        if (!is.null(package) &&
-            any(! package %in% db$Base[, "Package"]))
+        if(!is.null(package) &&
+           any(is.na(match(package, db$Base[, "Package"]))))
             rebuild <- TRUE
     }
     if(rebuild) {
@@ -196,6 +374,10 @@ help.search <-
             flush.console()
         }
 
+        want_type_help <- any(types == "help")
+        want_type_demo <- any(types == "demo")
+        want_type_vignette <- any(types == "vignette")
+
 	if(!is.null(package)) {
 	    packages_in_hsearch_db <- package
             package_paths <- NULL
@@ -252,8 +434,9 @@ help.search <-
 	## incrementally.
 	dbMat <- vector("list", length(packages_in_hsearch_db) * 4L)
 	dim(dbMat) <- c(length(packages_in_hsearch_db), 4L)
-	defunct_standard_package_names <-
-	    tools:::.get_standard_package_names()$stubs
+
+        ## Empty hsearch index:
+        hDB0 <- tools:::.build_hsearch_index(NULL)
 
 	for(p in packages_in_hsearch_db) {
             if(incr && np %% incr == 0L) {
@@ -279,32 +462,46 @@ help.search <-
 	    ## We always load hsearch.rds to establish the format,
 	    ## sometimes vignette.rds.
 
-	    if(file.exists(hs_file <- file.path(path, "Meta", "hsearch.rds"))) {
-		hDB <- readRDS(hs_file)
-		if(!is.null(hDB)) {
-		    ## Fill up possibly missing information.
-		    if(is.na(match("Encoding", colnames(hDB[[1L]]))))
-			hDB[[1L]] <- cbind(hDB[[1L]], Encoding = "")
-		    nh <- NROW(hDB[[1L]])
-		    hDB[[1L]] <- cbind(hDB[[1L]],
-		                       Type = rep("help", nh))
-		    if (nh)
-		    	hDB[[1L]][, "LibPath"] <- path
-		    if ("vignette" %in% types)
-		    	hDB <- merge.vignette.index(hDB, path, p)
-		    if ("demo" %in% types)
-		    	hDB <- merge.demo.index(hDB, path, p)
-		    ## Put the hsearch index for the np-th package into the
-		    ## np-th row of the matrix used for aggregating.
-		    dbMat[np, seq_along(hDB)] <- hDB
-		} else if(verbose >= 2L) {
-		    message(gettextf("package %s has empty hsearch data - strangely",
-                                     sQuote(p)), domain = NA)
-                    flush.console()
-                }
-	    }
-	    else if(!is.null(package))
-                warning("no hsearch.rds meta data for package ", p, domain = NA)
+            hDB <- NULL
+            if(want_type_help) {
+                if(file.exists(hs_file <-
+                    file.path(path, "Meta", "hsearch.rds"))) {
+                    hDB <- readRDS(hs_file)
+                    if(!is.null(hDB)) {
+                        ## Fill up possibly missing information.
+                        if(is.na(match("Encoding", colnames(hDB[[1L]]))))
+                            hDB[[1L]] <- cbind(hDB[[1L]], Encoding = "")
+                        ## <FIXME>
+                        ## Transition fro old-style to new-style colnames.
+                        ## Remove eventually.
+                        for(i in seq_along(hDB)) {
+                            colnames(hDB[[i]]) <-
+                                tools:::hsearch_index_colnames[[i]]
+                        }
+                        ## </FIXME>
+                    } else if(verbose >= 2L) {
+                        message(gettextf("package %s has empty hsearch data - strangely",
+                                         sQuote(p)),
+                                domain = NA)
+                        flush.console()
+                    }
+                } else if(!is.null(package))
+                      warning("no hsearch.rds meta data for package ", p,
+                              domain = NA)
+            }
+            if(is.null(hDB))
+                hDB <- hDB0
+            nh <- NROW(hDB[[1L]])
+            hDB[[1L]] <- cbind(hDB[[1L]], Type = rep("help", nh))
+            if(nh)
+                hDB[[1L]][, "LibPath"] <- path
+            if(want_type_vignette)
+                hDB <- merge_vignette_index(hDB, path, p)
+            if(want_type_demo)
+                hDB <- merge_demo_index(hDB, path, p)
+            ## Put the hsearch index for the np-th package into the
+            ## np-th row of the matrix used for aggregating.
+            dbMat[np, seq_along(hDB)] <- hDB
 	}
 
 	if(verbose >= 2L)  {
@@ -328,12 +525,19 @@ help.search <-
 		   Aliases  = do.call("rbind", dbMat[, 2]),
 		   Keywords = do.call("rbind", dbMat[, 3]),
 		   Concepts = do.call("rbind", dbMat[, 4]))
-	if(is.null(db$Concepts))
+        rownames(db$Base) <- NULL
+        ## <FIXME>
+        ## Remove eventually ...
+	if(is.null(db$Concepts)) {
 	    db$Concepts <-
-		matrix(character(), ncol = 3L,
-		       dimnames = list(NULL,
-		       c("Concepts", "ID", "Package")))
-	## Make the IDs globally unique by prefixing them with the
+                matrix(character(), ncol = 3L,
+                       dimnames =
+                           list(NULL,
+                                tools:::hsearch_index_colnames$Concepts))
+        }
+        ## </FIXME>
+
+        ## Make the IDs globally unique by prefixing them with the
 	## number of the package in the global index.
 	for(i in which(sapply(db, NROW) > 0L)) {
 	    db[[i]][, "ID"] <-
@@ -345,7 +549,7 @@ help.search <-
 	## And maybe re-encode ...
 	if(!identical(Sys.getlocale("LC_CTYPE"), "C")) {
 	    if(verbose >= 2L) {
-                message("reencoding ...", appendLF=FALSE, domain = NA)
+                message("reencoding ...", appendLF = FALSE, domain = NA)
                 flush.console()
             }
 	    encoding <- db$Base[, "Encoding"]
@@ -368,9 +572,12 @@ help.search <-
 	bad_IDs <-
 	    unlist(sapply(db,
 			  function(u)
-			  u[rowSums(is.na(nchar(u, "c", TRUE))) > 0, "ID"]))
+                              u[rowSums(is.na(nchar(u, "chars",
+                                                    allowNA = TRUE,
+                                                    keepNA = FALSE))) > 0,
+                                "ID"]))
         ## FIXME: drop this fallback
-	if(length(bad_IDs)) { ## try latin1
+	if(length(bad_IDs)) {           # try latin1
             for(i in seq_along(db)) {
                 ind <- db[[i]][, "ID"] %in% bad_IDs
                 db[[i]][ind, ] <- iconv(db[[i]][ind, ], "latin1", "")
@@ -378,7 +585,10 @@ help.search <-
             bad_IDs <-
                 unlist(sapply(db,
                               function(u)
-                              u[rowSums(is.na(nchar(u, "c", TRUE))) > 0, "ID"]))
+                                  u[rowSums(is.na(nchar(u, "chars",
+                                                        allowNA = TRUE,
+                                                        keepNA = FALSE))) > 0,
+                                    "ID"]))
         }
 	## If there are any invalid multi-byte character data
 	## left, we simple remove all Rd objects with at least one
@@ -391,14 +601,55 @@ help.search <-
 	    }
 	}
 
+        ## Drop entries without topic as these cannot be accessed.
+        ## (These come from help pages without \alias.)
+        bad_IDs <- db$Base[is.na(db$Base[, "Topic"]), "ID"]
+        if(length(bad_IDs)) {
+	    for(i in seq_along(db)) {
+		ind <- db[[i]][, "ID"] %in% bad_IDs
+		db[[i]] <- db[[i]][!ind, ]
+	    }
+	}
+
+        ## Remove keywords which are empty or package.skeleton()
+        ## leftovers.
+        ind <- is.na(match(db$Keywords[, "Keyword"],
+                           c("", "~kwd1", "~kwd2",
+                             "~~ other possible keyword(s) ~~")))
+        db$Keywords <- db$Keywords[ind, , drop = FALSE]
+        ## Remove concepts which are empty.
+        ind <- nzchar(db$Concepts[, "Concept"])
+        db$Concepts <- db$Concepts[ind, , drop = FALSE]
+
+        ## Map non-standard keywords to concepts, and use the
+        ## descriptions of the standard keywords as concepts, with the
+        ## exception of keyword 'internal'.
+        standard <- .get_standard_Rd_keywords_with_descriptions()
+        keywords <- standard$Keywords
+        concepts <- standard$Descriptions
+        pos <- match(db$Keywords[, "Keyword"], keywords)
+        ind <- !is.na(pos) & (keywords[pos] != "internal")
+        db$Concepts <-
+            rbind(db$Concepts,
+                  db$Keywords[is.na(pos), , drop = FALSE],
+                  cbind(concepts[pos[ind]],
+                        db$Keywords[ind, -1L, drop = FALSE]))
+        db$Keywords <- db$Keywords[!is.na(pos), , drop = FALSE]
+
+        ## Doing this earlier will not work: in particular, re-encoding
+        ## is written for character matrices.
+        db <- lapply(db, as.data.frame,
+                     stringsAsFactors = FALSE, row.names = NULL)
+
         if(verbose >= 2L) {
-            message("saving the database ...", appendLF=FALSE, domain = NA)
+            message("saving the database ...", appendLF = FALSE, domain = NA)
             flush.console()
         }
         attr(db, "LibPaths") <- lib.loc
         attr(db, "mtime") <- Sys.time()
         attr(db, "ctype") <- Sys.getlocale("LC_CTYPE")
         attr(db, "Types") <- unique(c("help", types))
+        class(db) <- "hsearch_db"
         .hsearch_db(db)
         if(verbose >= 2L) {
             message(" ", "done", domain = NA)
@@ -408,202 +659,157 @@ help.search <-
             message("... database rebuilt", domain = NA)
             if(WINDOWS) {
                 close(pb)
-                on.exit() # clear closing of progress bar
+                on.exit()               # clear closing of progress bar
             }
             flush.console()
         }
     }
 
-    ### Matching.
-    if(verbose >= 2L) {
-	message("Database of ",
-                NROW(db$Base), " help objects (",
-                NROW(db$Aliases), " aliases, ",
-                NROW(db$Concepts), " concepts, ",
-                NROW(db$Keywords), " keywords)",
-                domain = NA)
-        flush.console()
-    }
-    if(!is.null(package)) {
-	## Argument 'package' was given.  Need to check that all given
-	## packages exist in the db, and only search the given ones.
-	pos_in_hsearch_db <-
-	    match(package, unique(db$Base[, "Package"]), nomatch = 0L)
-        ## This should not happen for R >= 2.4.0
-	if(any(pos_in_hsearch_db) == 0L)
-	    stop(gettextf("no information in the database for package %s: need 'rebuild = TRUE'?",
-			  sQuote(package[pos_in_hsearch_db == 0][1L])),
-                 domain = NA)
-	db <-
-	    lapply(db,
-		   function(x) {
-		       x[x[, "Package"] %in% package, , drop = FALSE]
-		   })
-    }
-
-    ## Subset to the requested help types
-    db$Base <- db$Base[db$Base[,"Type"] %in% types,,drop=FALSE]
-
-    ## <FIXME>
-    ## No need continuing if there are no objects in the data base.
-    ## But shouldn't we return something of class "hsearch"?
-    if(!length(db$Base)) return(invisible())
-    ## </FIXME>
-
-    ## If agrep is NULL (default), we want to use fuzzy matching iff
-    ## 'pattern' contains no characters special to regular expressions.
-    ## We use the following crude approximation: if pattern contains
-    ## only alphanumeric characters or whitespace or a '-', it is taken
-    ## 'as is', and fuzzy matching is used unless turned off explicitly,
-    ## or pattern has very few (currently, less than 5) characters.
-    if(is.null(fuzzy) || is.na(fuzzy))
-	fuzzy <-
-	    (grepl("^([[:alnum:]]|[[:space:]]|-)+$", pattern)
-	     && (nchar(pattern, type="c") > 4L))
-    if(is.logical(fuzzy)) {
-	if(fuzzy)
-	    max.distance <- 0.1
-    }
-    else if(is.numeric(fuzzy) || is.list(fuzzy)) {
-	max.distance <- fuzzy
-	fuzzy <- TRUE
-    }
-    else
-	stop("incorrect 'agrep' specification")
-
-    searchFun <- function(x) {
-	if(fuzzy)
-	    agrep(pattern, x, ignore.case = ignore.case,
-		  max.distance = max.distance)
-	else
-	    grep(pattern, x, ignore.case = ignore.case, perl = use_UTF8)
-    }
-    dbBase <- db$Base
-    searchDbField <- function(field) {
-	switch(field,
-	       alias = {
-		   aliases <- db$Aliases
-		   match(aliases[searchFun(aliases[, "Aliases"]),
-				 "ID"],
-			 dbBase[, "ID"])
-	       },
-	       concept = {
-		   concepts <- db$Concepts
-		   match(concepts[searchFun(concepts[, "Concepts"]),
-				  "ID"],
-			 dbBase[, "ID"])
-	       },
-
-	       keyword = {
-		   keywords <- db$Keywords
-		   match(keywords[searchFun(keywords[, "Keywords"]),
-				  "ID"],
-			 dbBase[, "ID"])
-	       },
-	       searchFun(db$Base[, field]))
-    }
-
-    i <- NULL
-    for(f in fields) i <- c(i, searchDbField(f))
-    db <- dbBase[sort(unique(i)),
-		 c("topic", "title", "Package", "LibPath", "name", "Type"),
-		 drop = FALSE]
-    if(verbose>= 2L) {
-        message(sprintf(ngettext(NROW(db),
-                                 "matched %d object.",
-                                 "matched %d objects."),
-                        NROW(db)),
-                domain = NA)
-        flush.console()
-    }
+    db
+}
 
-    ## Retval.
-    y <- list(pattern = pattern, fields = fields,
-	      type = if(fuzzy) "fuzzy" else "regexp",
-	      agrep = agrep,
-	      ignore.case = ignore.case, types = types,
-	      package = package, lib.loc = lib.loc,
-	      matches = db)
-    class(y) <- "hsearch"
-    y
+## Cf. tools:::.get_standard_Rd_keywords().
+.get_standard_Rd_keywords_with_descriptions <-
+function()
+{
+    lines <- readLines(file.path(R.home("doc"), "KEYWORDS.db"))
+    ## Strip top-level entries.
+    lines <- grep("^.*\\|([^:]*):.*", lines, value = TRUE)
+    ## Strip comments.
+    lines <- sub("[[:space:]]*#.*", "", lines)
+    list(Keywords = sub("^.*\\|([^:]*):.*", "\\1", lines),
+         Descriptions = sub(".*:[[:space:]]*", "", lines))
 }
 
-## this extra indirection allows the Mac GUI to replace this
+## This extra indirection allows the Mac GUI to replace this
 ## yet call the printhsearchInternal function.
-print.hsearch <- function(x, ...)
+print.hsearch <-
+function(x, ...)
     printhsearchInternal(x, ...)
 
-
-printhsearchInternal  <- function(x, ...)
+printhsearchInternal <-
+function(x, ...)
 {
-    help_type <- getOption("help_type", default="text")
+    help_type <- getOption("help_type", default = "text")
     types <- x$types
     if (help_type == "html") {
         browser <- getOption("browser")
-	if (tools:::httpdPort == 0L) tools::startDynamicHelp()
-	if (tools:::httpdPort > 0L) {
-	    url <- paste0("http://127.0.0.1:", tools:::httpdPort,
-                      "/doc/html/Search?pattern=", tools:::escapeAmpersand(x$pattern),
-                      # Only encode non-default values
-                      if (!("title" %in% x$fields)) "&title=0",
-                      if ("keyword" %in% x$fields) "&keyword=1",
-                      if (!("alias" %in% x$fields)) "&alias=0",
-                      if (!("concept" %in% x$fields)) "&concept=0",
-                      if ("name" %in% x$fields) "&name=1",
-                      if (!is.null(x$agrep)) paste0("&agrep=", x$agrep),
-                      if (!x$ignore.case) "&ignore.case=0",
-                      if (!identical(types, getOption("help.search.types")))
-			 paste0("&types=", paste(types, collapse=";")),
-                      if (!is.null(x$package))
-			 paste0("&package=", paste(x$package, collapse=";")),
-                      if (!identical(x$lib.loc, .libPaths()))
-			 paste0("&lib.loc=", paste(x$lib.loc, collapse=";")))
+        port <- tools::startDynamicHelp(NA)
+	if (port > 0L) {
+            .hsearch_results(x)
+            url <- paste0("http://127.0.0.1:", port,
+                          "/doc/html/Search?results=1")
+            ## <NOTE>
+            ## Older versions used the following, which invokes the
+            ## dynamic HTML help system in a way that this calls
+            ## help.search() to give the results to be displayed.
+            ## This is now avoided by passing the (already available)
+            ## results to the dynamic help system using the dynamic
+            ## variable .hsearch_results().
+	    ## url <-
+            ##     paste0("http://127.0.0.1:", port,
+            ##            "/doc/html/Search?pattern=",
+            ##            tools:::escapeAmpersand(x$pattern),
+            ##            paste0("&fields.", x$fields, "=1",
+            ##                   collapse = ""),
+            ##            if (!is.null(x$agrep)) paste0("&agrep=", x$agrep),
+            ##            if (!x$ignore.case) "&ignore.case=0",
+            ##            if (!identical(types,
+            ##                           getOption("help.search.types")))
+            ##                paste0("&types.", types, "=1",
+            ##                       collapse = ""),
+            ##            if (!is.null(x$package))
+            ##                paste0("&package=",
+            ##                       paste(x$package, collapse=";")),
+            ##            if (!identical(x$lib.loc, .libPaths()))
+            ##                paste0("&lib.loc=",
+            ##                       paste(x$lib.loc, collapse=";"))
+            ##            )
+            ## </NOTE>
             browseURL(url, browser)
             return(invisible(x))
         }
     }
     hfields <- paste(x$fields, collapse = " or ")
-    vfieldnames <- c(alias = "name", concept="keyword", keyword=NA,
-                     name="name", title="title")
+    vfieldnames <-
+        c(alias = "name", concept = "keyword", keyword = NA,
+          name = "name", title = "title")
     vfieldnames <- vfieldnames[x$fields]
-    vfields <- paste(unique(vfieldnames[!is.na(vfieldnames)]), collapse = " or ")
-    dfieldnames <- c(alias = "name", concept=NA, keyword=NA,
-                     name = "name", title = "title")
+    vfields <- paste(unique(vfieldnames[!is.na(vfieldnames)]),
+                     collapse = " or ")
+    dfieldnames <-
+        c(alias = "name", concept = NA, keyword = NA,
+          name = "name", title = "title")
     dfieldnames <- dfieldnames[x$fields]
-    dfields <- paste(unique(dfieldnames[!is.na(dfieldnames)]), collapse = " or ")
-    fields <- list(help=hfields, vignette=vfields, demo=dfields)
+    dfields <- paste(unique(dfieldnames[!is.na(dfieldnames)]),
+                     collapse = " or ")
+    fields_used <-
+        list(help = hfields, vignette = vfields, demo = dfields)
     matchtype <- switch(x$type, fuzzy = "fuzzy", "regular expression")
-    typenames <- c(vignette = "Vignettes", help = "Help files", demo="Demos")
+    typenames <-
+        c(vignette = "Vignettes", help = "Help files", demo = "Demos")
+    fields_for_match_details <-
+        list(help = c("alias", "concept", "keyword"),
+             vignette = c("concept"),
+             demo = character())
+    field_names_for_details <-
+        c(alias = "Aliases", concept = "Concepts", keyword = "Keywords")
+
     db <- x$matches
     if(NROW(db) == 0) {
-    	typenames <- paste(tolower(typenames[types]), collapse=" or ")
-	writeLines(strwrap(paste("No", typenames,  "found with", fields$help,
+    	typenames <- paste(tolower(typenames[types]), collapse= " or ")
+	writeLines(strwrap(paste("No", typenames,
+                                 "found with", fields_used$help,
 				 "matching", sQuote(x$pattern),
-				 "using", matchtype, "matching.")))
+				 "using", matchtype,
+                                 "matching.")))
         return(invisible(x))
     }
 
     outFile <- tempfile()
     outConn <- file(outFile, open = "w")
-    typeinstruct <- c(vignette = paste("Type 'vignette(\"FOO\", package=\"PKG\")' to",
-				       "inspect entries 'PKG::FOO'."),
-                      help = paste("Type '?PKG::FOO' to",
-				       "inspect entries 'PKG::FOO',",
-				       "or 'TYPE?PKG::FOO' for entries like",
-				       "'PKG::FOO-TYPE'."),
-		      demo = paste("Type 'demo(PKG::FOO)' to",
-				       "run demonstration 'PKG::FOO'."))
-
-    for (type in types) {
-	if(NROW(dbtemp <- db[db[,"Type"] == type,,drop=FALSE]) > 0) {
-	    writeLines(c(strwrap(paste(typenames[type], "with", fields[[type]],
-				       "matching", sQuote(x$pattern),
-				       "using", matchtype, "matching:")),
+    typeinstruct <-
+        c(vignette =
+              paste("Type 'vignette(\"FOO\", package=\"PKG\")' to",
+                    "inspect entries 'PKG::FOO'."),
+          help =
+              paste("Type '?PKG::FOO' to",
+                    "inspect entries 'PKG::FOO',",
+                    "or 'TYPE?PKG::FOO' for entries like",
+                    "'PKG::FOO-TYPE'."),
+          demo =
+              paste("Type 'demo(PKG::FOO)' to",
+                    "run demonstration 'PKG::FOO'."))
+
+    for(type in types) {
+	if(NROW(dbtemp <- db[db[, "Type"] == type, , drop = FALSE]) > 0) {
+	    writeLines(c(strwrap(paste(typenames[type], "with",
+                                       fields_used[[type]], "matching",
+                                       sQuote(x$pattern), "using",
+                                       matchtype, "matching:")),
 			 "\n"),
 		       outConn)
-	    dbnam <- paste0(dbtemp[, "Package"], "::", dbtemp[ , "topic"])
-	    dbtit <- paste0(dbtemp[ , "title"])
-	    writeLines(formatDL(dbnam, dbtit), outConn)
+            fields <- fields_for_match_details[[type]]
+            chunks <- split.data.frame(dbtemp,
+                                       paste0(dbtemp[, "Package"],
+                                              "::",
+                                              dbtemp[ , "Topic"]))
+            nms <- names(chunks)
+            for(i in seq_along(nms)) {
+                chunk <- chunks[[i]]
+                writeLines(formatDL(nms[i], chunk[1L, "Title"]),
+                           outConn)
+                matches <- Filter(length,
+                                  split(chunk[, "Entry"],
+                                        chunk[, "Field"])[fields])
+                if(length(matches)) {
+                    tags <- field_names_for_details[names(matches)]
+                    vals <- vapply(matches, paste, "", collapse = ", ")
+                    writeLines(strwrap(paste0(tags, ": ", vals),
+                                       indent = 2L, exdent = 4L),
+                               outConn)
+                }
+            }
 	    writeLines(c("\n",
 			 strwrap(typeinstruct[type]),
 			 "\n\n"),
@@ -614,3 +820,67 @@ printhsearchInternal  <- function(x, ...)
     file.show(outFile, delete.file = TRUE)
     invisible(x)
 }
+
+.hsearch_results <-
+local({
+    res <- NULL
+    function(new) {
+	if(!missing(new))
+	    res <<- new
+	else
+	    res
+    }
+})
+
+hsearch_db_concepts <-
+function(db = hsearch_db())
+{
+    ## <NOTE>
+    ## This should perhaps get an ignore.case = TRUE argument.
+    ## </NOTE>
+    pos <- match(db$Concepts[, "ID"], db$Base[, "ID"])
+    entries <- split(as.data.frame(db$Base[pos, ],
+                                   stringsAsFactors = FALSE),
+                     db$Concepts[, "Concept"])
+    enums <- sapply(entries, NROW)
+    pnums <- sapply(entries, function(e) length(unique(e$Package)))
+    pos <- order(enums, pnums, decreasing = TRUE)
+    data.frame(Concept = names(entries)[pos],
+               Frequency = enums[pos],
+               Packages = pnums[pos],
+               stringsAsFactors = FALSE,
+               row.names = NULL)
+}
+
+hsearch_db_keywords <-
+function(db = hsearch_db())
+{
+    pos <- match(db$Keywords[, "ID"], db$Base[, "ID"])
+    entries <- split(as.data.frame(db$Base[pos, ],
+                                   stringsAsFactors = FALSE),
+                     db$Keywords[, "Keyword"])
+    enums <- sapply(entries, NROW)
+    pnums <- sapply(entries, function(e) length(unique(e$Package)))
+    standard <- .get_standard_Rd_keywords_with_descriptions()
+    concepts <- standard$Descriptions[match(names(entries),
+                                            standard$Keywords)]
+    pos <- order(enums, pnums, decreasing = TRUE)
+    data.frame(Keyword = names(entries)[pos],
+               Concept = concepts[pos],
+               Frequency = enums[pos],
+               Packages = pnums[pos],
+               stringsAsFactors = FALSE,
+               row.names = NULL)
+}
+
+print.hsearch_db <-
+function(x, ...)
+{
+    writeLines(c("A help search database:",
+                 sprintf("Objects: %d, Aliases: %d, Keywords: %d, Concepts: %d",
+                         NROW(x$Base),
+                         NROW(x$Aliases),
+                         NROW(x$Keywords),
+                         NROW(x$Concepts))))
+    invisible(x)
+}
diff --git a/src/library/utils/R/help.start.R b/src/library/utils/R/help.start.R
index 62b508f..a68831b 100644
--- a/src/library/utils/R/help.start.R
+++ b/src/library/utils/R/help.start.R
@@ -1,7 +1,7 @@
 #  File src/library/utils/R/help.start.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
-#  Copyright (C) 1995-2014 The R Core Team
+#  Copyright (C) 1995-2015 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
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 help.start <-
     function (update = FALSE, gui = "irrelevant",
@@ -28,10 +28,10 @@ help.start <-
             stop("invalid browser name, check options(\"browser\").")
     }
     home <- if (is.null(remote)) {
-        if (tools:::httpdPort == 0L) tools::startDynamicHelp()
-        if (tools:::httpdPort > 0L) {
+        port <- tools::startDynamicHelp(NA)
+        if (port > 0L) {
             if (update) make.packages.html(temp = TRUE)
-            paste0("http://127.0.0.1:", tools:::httpdPort)
+            paste0("http://127.0.0.1:", port)
         } else stop("help.start() requires the HTTP server to be running",
                     call. = FALSE)
     } else remote
@@ -88,7 +88,7 @@ browseURL <- function(url, browser = getOption("browser"), encodeIfNeeded=FALSE)
                "gnome-moz-remote" =, "open" = quotedUrl,
                "galeon" = paste("-x", quotedUrl),
                "kfmclient" = paste("openURL", quotedUrl),
-               "mozilla" =, "opera" =, "firefox" = {
+               "mozilla" =, "opera" = {
                    paste0("-remote \"openURL(",
                          ## Quote ',' and ')' ...
                          gsub("([,)$])", "%\\1", url), ")\"")
diff --git a/src/library/utils/R/history.R b/src/library/utils/R/history.R
index a6d58ab..a3074be 100644
--- a/src/library/utils/R/history.R
+++ b/src/library/utils/R/history.R
@@ -1,5 +1,5 @@
 #  File src/library/utils/R/history.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
 #  Copyright (C) 1995-2012 The R Core Team
 #
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 loadhistory <- function(file = ".Rhistory")
     invisible(.External2(C_loadhistory, file))
diff --git a/src/library/utils/R/iconv.R b/src/library/utils/R/iconv.R
index 548b45b..b09422e 100644
--- a/src/library/utils/R/iconv.R
+++ b/src/library/utils/R/iconv.R
@@ -1,7 +1,7 @@
 #  File src/library/utils/R/iconv.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
-#  Copyright (C) 1995-2012 The R Core Team
+#  Copyright (C) 1995-2014 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
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 
 ## If you were wondering what these language codes stand for, see
@@ -78,7 +78,7 @@ localeToCharset <- function(locale = Sys.getlocale("LC_CTYPE"))
         ## Assume locales are like  en_US[.utf8[@euro]]
         x <- strsplit(locale, ".", fixed=TRUE)[[1L]]
         enc <- if(length(x) == 2) gsub("@.*$o", "", x[2L]) else ""
-        # AIX uses UTF-8, OS X utf-8
+        # AIX uses UTF-8, macOS utf-8
         if(toupper(enc) == "UTF-8") enc <- "utf8"
         if(nzchar(enc) && enc != "utf8") {
             enc <- tolower(enc)
diff --git a/src/library/utils/R/indices.R b/src/library/utils/R/indices.R
index bade1c7..4f2c951 100644
--- a/src/library/utils/R/indices.R
+++ b/src/library/utils/R/indices.R
@@ -1,7 +1,7 @@
 #  File src/library/utils/R/indices.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
-#  Copyright (C) 1995-2013 The R Core Team
+#  Copyright (C) 1995-2015 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
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 packageDescription <-
     function(pkg, lib.loc = NULL, fields = NULL, drop = TRUE, encoding = "")
@@ -31,7 +31,7 @@ packageDescription <-
 	if(is.null(lib.loc)) {
 	    if(pkg == "base")
 		file.path(.Library, "base")
-	    else if(pkg %in% loadedNamespaces())
+	    else if(isNamespaceLoaded(pkg))
 		getNamespaceInfo(pkg, "path")
 	    else if((envname <- paste0("package:", pkg)) %in% search()) {
 		attr(as.environment(envname), "path")
@@ -73,7 +73,7 @@ packageDescription <-
         desc <- as.list(dcf[1,])
     } else file <- ""
 
-    if(file != "") {
+    if(nzchar(file)) {
         ## read the Encoding field if any
         enc <- desc[["Encoding"]]
         if(!is.null(enc) && !is.na(encoding)) {
@@ -170,17 +170,13 @@ index.search <- function(topic, paths, firstOnly = FALSE)
     res
 }
 
-print.packageIQR <-
-function(x, ...)
+print.packageIQR <- function(x, ...)
 {
     db <- x$results
     ## Split according to Package.
-    out <- if(nrow(db) == 0L)
-         NULL
-    else
-        lapply(split(1 : nrow(db), db[, "Package"]),
-               function(ind) db[ind, c("Item", "Title"),
-                                drop = FALSE])
+    out <- if(nrow(db) > 0L)
+	       lapply(split(seq_len(nrow(db)), db[, "Package"]),
+		      function(ind) db[ind, c("Item", "Title"), drop = FALSE])
     outFile <- tempfile("RpackageIQR")
     outConn <- file(outFile, open = "w")
     first <- TRUE
diff --git a/src/library/utils/R/linkhtml.R b/src/library/utils/R/linkhtml.R
index 5b8fea2..63e99ef 100644
--- a/src/library/utils/R/linkhtml.R
+++ b/src/library/utils/R/linkhtml.R
@@ -1,7 +1,7 @@
 #  File src/library/utils/R/linkhtml.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
-#  Copyright (C) 1995-2012 The R Core Team
+#  Copyright (C) 1995-2015 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
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 
 make.packages.html <-
@@ -47,7 +47,7 @@ make.packages.html <-
     if (temp && file.exists(f.tg) && file.exists(op)) {
         ## check if we can avoid remaking it.
         if(identical(lib.loc, readRDS(op))) {
-            dates <- file.info(c(f.tg, lib.loc))$mtime
+            dates <- file.mtime(c(f.tg, lib.loc))
             if(which.max(dates) == 1L) return(TRUE)
         }
     }
@@ -75,7 +75,7 @@ make.packages.html <-
         pkgs[[lib]] <- pg[order(toupper(pg), pg)]
     }
     if (WINDOWS) {
-        tot <- sum(sapply(pkgs, length))
+        tot <- sum(lengths(pkgs))
         if(verbose) {
             pb <- winProgressBar("R: creating packages.html", max = tot)
             on.exit(close(pb), add = TRUE)
diff --git a/src/library/utils/R/menu.R b/src/library/utils/R/menu.R
index 328a652..f3b7004 100644
--- a/src/library/utils/R/menu.R
+++ b/src/library/utils/R/menu.R
@@ -1,5 +1,5 @@
 #  File src/library/utils/R/menu.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
 #  Copyright (C) 1995-2012 The R Core Team
 #
@@ -14,18 +14,18 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 menu <- function(choices, graphics = FALSE, title = NULL)
 {
     if(!interactive()) stop("menu() cannot be used non-interactively")
     if(isTRUE(graphics)) {
         if(.Platform$OS.type == "windows" || .Platform$GUI == "AQUA"
-           ## Tk might not require X11 on Mac OS X, but if DISPLAY is set
+           ## Tk might not require X11 on macOS, but if DISPLAY is set
            ## this will work for Aqua Tcl/Tk.
            ## OTOH, we do want to check Tk works!
            || (capabilities("tcltk") && capabilities("X11") &&
-               suppressWarnings(tcltk:::.TkUp))) {
+               suppressWarnings(tcltk::.TkUp))) {
             res <- select.list(choices, multiple = FALSE, title = title,
                                graphics = TRUE)
             return(match(res, choices, nomatch = 0L))
diff --git a/src/library/utils/R/mirrorAdmin.R b/src/library/utils/R/mirrorAdmin.R
index 47287e6..2fe99cf 100644
--- a/src/library/utils/R/mirrorAdmin.R
+++ b/src/library/utils/R/mirrorAdmin.R
@@ -1,7 +1,7 @@
 #  File src/library/utils/R/mirrorAdmin.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
-#  Copyright (C) 1995-2012 The R Core Team
+#  Copyright (C) 1995-2014 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
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 mirror2html <-
 function(mirrors = NULL, file = "mirrors.html",
diff --git a/src/library/utils/R/modifyList.R b/src/library/utils/R/modifyList.R
index 7cac208..c496230 100644
--- a/src/library/utils/R/modifyList.R
+++ b/src/library/utils/R/modifyList.R
@@ -1,7 +1,7 @@
 #  File src/library/utils/R/modifyList.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
-#  Copyright (C) 1995-2013 The R Core Team
+#  Copyright (C) 1995-2014 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
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 ### Originates from Deepayan Sarkar as  updateList() from 'lattice' package
 
@@ -24,7 +24,7 @@ modifyList <- function(x, val, keep.null = FALSE)
     xnames <- names(x)
     vnames <- names(val)
     ## Will not update unnamed components.  FIXME: What if names are repeated? Warn?
-    vnames <- vnames[vnames != ""]
+    vnames <- vnames[nzchar(vnames)]
     if (keep.null) {
         for (v in vnames) {
             x[v] <-
diff --git a/src/library/utils/R/news.R b/src/library/utils/R/news.R
index 2112e19..7998b70 100644
--- a/src/library/utils/R/news.R
+++ b/src/library/utils/R/news.R
@@ -1,7 +1,7 @@
 #  File src/library/utils/R/news.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
-#  Copyright (C) 1995-2013 The R Core Team
+#  Copyright (C) 1995-2015 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
@@ -14,23 +14,24 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 
 news <-
 function(query, package = "R", lib.loc = NULL,
          format = NULL, reader = NULL, db = NULL)
 {
-    if(is.null(db)) {
+    if(new.db <- is.null(db)) {
         db <- if(package == "R")
             tools:::.build_news_db_from_R_NEWS_Rd()
         else
             tools:::.build_news_db(package, lib.loc, format, reader)
     }
     if(is.null(db))
-        return(invisible())
+        return(NULL)
 
-    attr(db, "package") <- package
+    if(new.db)
+	attr(db, "package") <- package
 
     ## Is there a way to directly call/use subset.data.frame?
     ## E.g.,
@@ -64,24 +65,24 @@ function(query, package = "R", lib.loc = NULL,
 
     r <- eval(substitute(query), db1, parent.frame())
     ## Do something if this is not logical ...
-    if(is.null(r))
-        return(db)
-    else if(!is.logical(r) || length(r) != length(version))
-        stop("invalid query")
-    r <- r & !is.na(r)
-    if(has_bad_attr)
-        structure(db[r, ], bad = bad[r])
-    else
-        db[r, ]
+    if(!is.null(r)) {
+	if(!is.logical(r) || length(r) != length(version))
+	    stop("invalid query")
+	r <- r & !is.na(r)
+	db <- db[r, ]
+	if (!all(r))
+	    db <- structure(db, subset = r)
+	if(has_bad_attr)
+	    db <- structure(db, bad = bad[r])
+    }
+    db
 }
 
 format.news_db <-
 function(x, ...)
 {
     if(inherits(x, "news_db_from_Rd") ||
-       (!(is.null(bad <- attr(x, "bad")))
-        && (length(bad) == NROW(x))
-        && all(!bad))) {
+       (!is.null(bad <- attr(x, "bad")) && length(bad) == NROW(x) && !any(bad))) {
 
         ## Format news in the preferred input format:
         ##   Changes in $VERSION [($DATE)]:
@@ -144,9 +145,24 @@ function(x, ...)
     }
 }
 
-print.news_db <-
-function(x, ...)
+print.news_db <- function(x, doBrowse = interactive(), browser = getOption("browser"), ...)
 {
-    writeLines(paste(unlist(format(x, ...)), collapse = "\n\n"))
+    port <- if (doBrowse && !identical("false", browser) &&
+                is.character(pkg <- attr(x, "package")))
+        tools::startDynamicHelp(NA) else 0L
+    if (port > 0L) {
+        url <- if (pkg == "R")
+    	    sprintf("http://127.0.0.1:%d/doc/html/NEWS.html", port)
+    	else
+    	    sprintf("http://127.0.0.1:%d/library/%s/NEWS", port, pkg)
+    	if (!is.null(subset <- attr(x, "subset"))) {
+	    # Subsets are typically ranges of dates or version numbers, so we run-length encode
+	    # the subset vector.  We put TRUE in front so the values alternate TRUE, FALSE, ... .
+    	    rle <- paste(rle(c(TRUE, subset))$lengths, collapse="_")
+    	    url <- paste0(url, "?subset=", rle)
+    	}
+    	browseURL(url)
+    } else ## simply show in console:
+	writeLines(paste(unlist(format(x, ...)), collapse = "\n\n"))
     invisible(x)
 }
diff --git a/src/library/utils/R/object.size.R b/src/library/utils/R/object.size.R
index 1bf7d7e..8e5f666 100644
--- a/src/library/utils/R/object.size.R
+++ b/src/library/utils/R/object.size.R
@@ -1,7 +1,7 @@
 #  File src/library/utils/R/object.size.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
-#  Copyright (C) 1995-2013 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
@@ -14,34 +14,60 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 object.size <- function(x)
     structure(.Call(C_objectSize, x), class = "object_size")
 
-format.object_size <-
-    function(x, units = "b", ...)
+format.object_size <- function(x, units = "b", standard = "auto", digits = 1L, ...)
 {
-    units <- match.arg(units, c("b", "auto", "Kb", "Mb", "Gb",
-                                "B", "KB", "MB", "GB"))
+    known_bases <- c(legacy = 1024, IEC = 1024, SI = 1000)
+    known_units <- list(
+	SI     = c("B", "kB",  "MB",  "GB", "TB", "PB",  "EB",  "ZB",  "YB"),
+	IEC    = c("B", "KiB", "MiB", "GiB","TiB","PiB", "EiB", "ZiB", "YiB"),
+	legacy = c("b", "Kb",  "Mb",  "Gb", "Tb", "Pb"),
+	LEGACY = c("B", "KB",  "MB",  "GB", "TB", "PB") # <- only for "KB"
+    )
+
+    units <- match.arg(units,
+		       c("auto", unique(unlist(known_units), use.names = FALSE)))
+    standard <- match.arg(standard, c("auto", names(known_bases)))
+
+    if (standard == "auto") { ## infer 'standard' from 'units':
+	standard <- "legacy" # default; may become "SI"
+	if (units != "auto") {
+	    if (grepl("iB$", units))
+		standard <- "IEC"
+	    else if (grepl("b$", units))
+		standard <- "legacy"   ## keep when "SI" is the default
+	    else if (units == "kB")
+		## SPECIAL: Drop when "SI" becomes the default
+		stop("For SI units, specify 'standard = \"SI\"'")
+	}
+    }
+    base      <- known_bases[[standard]]
+    units_map <- known_units[[standard]]
+
     if (units == "auto") {
-        if (x >= 1024^3) units <- "Gb"
-        else if (x >= 1024^2) units <- "Mb"
-        else if (x >= 1024) units <- "Kb"
-        else units <- "b"
+	power <- if (x <= 0) 0L else min(as.integer(log(x, base = base)),
+					 length(units_map) - 1L)
+    } else {
+	power <- match(toupper(units), toupper(units_map)) - 1L
+	if (is.na(power))
+	    stop(gettextf("Unit \"%s\" is not part of standard \"%s\"",
+			  sQuote(units), sQuote(standard)), domain = NA)
     }
-     switch(units,
-            "b" =, "B" = paste(x, "bytes"),
-            "Kb" =, "KB" = paste(round(x/1024, 1L), "Kb"),
-            "Mb" =, "MB" = paste(round(x/1024^2, 1L), "Mb"),
-            "Gb" =, "GB" = paste(round(x/1024^3, 1L), "Gb")
-            )
+    unit <- units_map[power + 1L]
+    ## SPECIAL: Use suffix 'bytes' instead of 'b' for 'legacy' (or always) ?
+    if (power == 0 && standard == "legacy") unit <- "bytes"
+
+    paste(round(x / base^power, digits=digits), unit)
 }
 
 print.object_size <-
-    function(x, quote = FALSE, units = "b", ...)
+    function(x, quote = FALSE, units = "b", standard = "auto", digits = 1L, ...)
 {
-    y <- format.object_size(x, units = units)
+    y <- format.object_size(x, units=units, standard=standard, digits=digits)
     if(quote) print.default(y, ...) else cat(y, "\n", sep = "")
     invisible(x)
 }
diff --git a/src/library/utils/R/objects.R b/src/library/utils/R/objects.R
index 1b4ea84..e0a5e8d 100644
--- a/src/library/utils/R/objects.R
+++ b/src/library/utils/R/objects.R
@@ -1,7 +1,7 @@
 #  File src/library/utils/R/objects.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
-#  Copyright (C) 1995-2013 The R Core Team
+#  Copyright (C) 1995-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
@@ -14,12 +14,11 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 ## findGeneric(fname) :  is 'fname' the name of an S3 generic ?
 ##			[unexported function used only in this file]
-findGeneric <-
-function(fname, envir)
+findGeneric <- function(fname, envir, warnS4only = TRUE)
 {
     if(!exists(fname, mode = "function", envir = envir)) return("")
     f <- get(fname, mode = "function", envir = envir)
@@ -31,11 +30,11 @@ function(fname, envir)
 	## maybe an S3 generic was turned into the S4 default
 	## Try to find it, otherwise warn :
 	fMethsEnv <- methods::getMethodsForDispatch(f)
-	r <- lapply(grep("^ANY\\b", ls(envir = fMethsEnv), value=TRUE),
-		    get, envir = fMethsEnv)
-	if(any(ddm <- unlist(lapply(r, class)) == "derivedDefaultMethod"))
+        meths <- as.list(fMethsEnv, all.names=TRUE)
+        r <- meths[grep("^ANY\\b", names(meths))]
+	if(any(ddm <- vapply(r, methods::is, logical(1L), "derivedDefaultMethod")))
 	    f <- r[ddm][[1]]@.Data
-	else
+	else if(warnS4only)
 	    warning(gettextf(
 	"'%s' is a formal generic function; S3 methods will not likely be found",
 			     fname), domain = NA)
@@ -69,8 +68,8 @@ getKnownS3generics <-
 function()
     c(names(.knownS3Generics), tools:::.get_internal_S3_generics())
 
-methods <-
-function(generic.function, class)
+.S3methods <-
+function(generic.function, class, envir=parent.frame())
 {
     rbindSome <- function(df, nms, msg) {
         ## rbind.data.frame() -- dropping rows with duplicated names
@@ -87,63 +86,63 @@ function(generic.function, class)
               dnew[keep[(n+1L):(n+n2)] , ])
     }
 
-    S3MethodsStopList <- tools:::.make_S3_methods_stop_list(NULL)
+    S3MethodsStopList <- tools::nonS3methods(NULL)
     knownGenerics <- getKnownS3generics()
     sp <- search()
+    methods.called <- identical(sys.call(-1)[[1]], as.symbol("methods"))
     an <- lapply(seq_along(sp), ls)
-    names(an) <- sp
-    an <- unlist(an)
+    lens <- lengths(an)
+    an <- unlist(an, use.names=FALSE)
+    names(an) <- rep(sp, lens)
     an <- an[!duplicated(an)] # removed masked objects, *keep* names
-    names(an) <- sub("[0-9]*$", "", names(an))
     info <- data.frame(visible = rep.int(TRUE, length(an)),
-                       from = names(an),
+		       from = .rmpkg(names(an)),
                        row.names = an)
     if (!missing(generic.function)) {
 	if (!is.character(generic.function))
 	    generic.function <- deparse(substitute(generic.function))
         ## else
-        if(!exists(generic.function, mode = "function",
-                   envir = parent.frame()) &&
+        if(!exists(generic.function, mode = "function", envir = envir) &&
            !any(generic.function == c("Math", "Ops", "Complex", "Summary")))
             stop(gettextf("no function '%s' is visible", generic.function),
                  domain = NA)
+        warn.not.generic <- FALSE
         if(!any(generic.function == knownGenerics)) {
-            truegf <- findGeneric(generic.function, parent.frame())
+	    truegf <- findGeneric(generic.function, envir, warnS4only = !methods.called)
             if(truegf == "")
-                warning(gettextf("function '%s' appears not to be generic",
-                                 generic.function), domain = NA)
+                warn.not.generic <- TRUE
             else if(truegf != generic.function) {
                 warning(gettextf("generic function '%s' dispatches methods for generic '%s'",
                         generic.function, truegf), domain = NA)
                 generic.function <- truegf
             }
         }
-	name <- paste0("^", generic.function, ".")
-        name <- gsub("([.[$+*])", "\\\\\\1",name)
-        info <- info[grep(name, row.names(info)), ]
+	info <- info[startsWith(row.names(info), paste0(generic.function,".")), ]
         info <- info[! row.names(info) %in% S3MethodsStopList, ]
         ## check that these are all functions
         ## might be none at this point
-        if(nrow(info)) {
-            keep <- sapply(row.names(info),
-                           function(nm) exists(nm, mode="function"))
-            info <- info[keep, ]
-        }
+	if(nrow(info)) {
+	    keep <- vapply(row.names(info), exists, logical(1), mode="function")
+	    info <- info[keep, ]
+	}
+	if(warn.not.generic && nrow(info))
+	    warning(gettextf(
+	"function '%s' appears not to be S3 generic; found functions that look like S3 methods",
+			     generic.function), domain = NA)
 
         ## also look for registered methods from namespaces
         ## we assume that only functions get registered.
         defenv <- if(!is.na(w <- .knownS3Generics[generic.function]))
             asNamespace(w)
         else {
-            genfun <- get(generic.function, mode = "function",
-                          envir = parent.frame())
+            genfun <- get(generic.function, mode = "function", envir = envir)
             if(.isMethodsDispatchOn() && methods::is(genfun, "genericFunction"))
                 genfun <- methods::finalDefaultMethod(genfun at default)
             if (typeof(genfun) == "closure") environment(genfun)
             else .BaseNamespaceEnv
         }
-        S3reg <- ls(get(".__S3MethodsTable__.", envir = defenv),
-                    pattern = name)
+	S3reg <- names(get(".__S3MethodsTable__.", envir = defenv))
+	S3reg <- S3reg[startsWith(S3reg, paste0(generic.function,"."))]
         if(length(S3reg))
             info <- rbindSome(info, S3reg, msg =
                               paste("registered S3method for",
@@ -163,13 +162,15 @@ function(generic.function, class)
         if(nrow(info)) {
             ## check if we can find a generic matching the name
             possible.generics <- gsub(name, "", row.names(info))
-            keep <- sapply(possible.generics, function(nm) {
+            keep <- vapply(possible.generics, function(nm) {
                 if(nm %in% knownGenerics) return(TRUE)
                 where <- find(nm, mode = "function")
-                if(!length(where)) return(FALSE)
-                any(sapply(where, function(w)
-                           nzchar(findGeneric(nm, envir=as.environment(w)))))
-            })
+		if(length(where))
+		    any(vapply(where, function(w)
+			nzchar(findGeneric(nm, envir=as.environment(w))),
+			       logical(1)))
+		else FALSE
+	    }, logical(1))
             info <- info[keep, ]
         }
 
@@ -178,42 +179,81 @@ function(generic.function, class)
         ## the corresponding generic, so we don't check again.
         ## Note that the generic will not necessarily be visible,
         ## as the package may not be loaded.
-        S3reg <- unlist(lapply(loadedNamespaces(), function(i) ls(get(".__S3MethodsTable__.", envir = asNamespace(i)), pattern = name)))
+        S3reg <- unlist(lapply(loadedNamespaces(), function(i)
+	    ls(get(".__S3MethodsTable__.", envir = asNamespace(i)), pattern = name)))
         ## now methods like print.summary.aov will be picked up,
         ## so we do look for such mismatches.
         if(length(S3reg))
-            S3reg <- S3reg[sapply(gsub(name, "", S3reg), exists)]
+            S3reg <- S3reg[vapply(gsub(name, "", S3reg), exists, NA)]
         if(length(S3reg))
             info <- rbindSome(info, S3reg, msg = "registered S3method")
     }
     else stop("must supply 'generic.function' or 'class'")
 
-    info <- info[sort.list(row.names(info)), ]
+    info$generic <- if (!missing(generic.function))
+        rep(generic.function, nrow(info))
+    else sub(paste0("\\.", class, "$"), "", row.names(info))
+    info$isS4 <- rep(FALSE, nrow(info))
+
+    info <- info[sort.list(row.names(info)), , drop=FALSE]
     res <- row.names(info)
     class(res) <- "MethodsFunction"
     attr(res, "info") <- info
+    attr(res, "byclass") <- missing(generic.function)
     res
 }
 
-print.MethodsFunction <-
-function(x, ...)
+methods <-
+function(generic.function, class)
 {
-    visible <- attr(x, "info")[["visible"]]
-    if(length(x)) {
-	print(paste0(x, ifelse(visible, "", "*")), quote=FALSE, ...)
-        if(any(!visible))
-            cat("\n", "   ",
-                "Non-visible functions are asterisked", "\n", sep = "")
-    } else cat("no methods were found\n")
-    invisible(x)
+    if (!missing(generic.function) && !is.character(generic.function))
+        generic.function <- deparse(substitute(generic.function))
+    if (!missing(class) && !is.character(class))
+        class <- paste(deparse(substitute(class)))
+
+    s3 <- .S3methods(generic.function, class, parent.frame())
+    s4 <- if (.isMethodsDispatchOn()) {
+        methods::.S4methods(generic.function, class)
+    } else NULL
+
+    .MethodsFunction(s3, s4, missing(generic.function))
+}
+
+.MethodsFunction <-
+function(s3, s4, byclass)
+{
+    info3 <- attr(s3, "info")
+    info4 <- attr(s4, "info")
+    info <- rbind(info3, info4)
+    dups <- duplicated(c(rownames(info3), rownames(info4)))
+    info <- info[!dups, , drop=FALSE]
+    info <- info[order(rownames(info)), , drop=FALSE]
+    structure(rownames(info), info=info, byclass=byclass,
+              class="MethodsFunction")
 }
 
+print.MethodsFunction <- function(x, byclass = attr(x, "byclass"), ...)
+{
+    info <- attr(x, "info")
+    values <-
+	if (byclass)
+	    unique(info$generic)
+	else
+	    paste0(rownames(info), visible = ifelse(info$visible, "", "*"))
+
+    if (length(values)) {
+        print(noquote(values))
+        cat("see '?methods' for accessing help and source code\n")
+    } else
+        cat("no methods found\n")
 
-getS3method <-
-function(f, class, optional = FALSE)
+    invisible(x)
+}
+
+getS3method <- function(f, class, optional = FALSE, envir = parent.frame())
 {
     if(!any(f == getKnownS3generics())) {
-        truegf <- findGeneric(f, parent.frame())
+        truegf <- findGeneric(f, envir)
         if(nzchar(truegf)) f <- truegf
         else {
             if(optional) return(NULL)
@@ -221,24 +261,97 @@ function(f, class, optional = FALSE)
         }
     }
     method <- paste(f, class, sep=".")
-    if(exists(method, mode = "function", envir = parent.frame()))
-        return(get(method, mode = "function", envir = parent.frame()))
+    if(!is.null(m <- get0(method, envir = envir, mode = "function")))
+	## FIXME(?): consider  tools::nonS3methods(<pkg>)  same as isS3method()
+        return(m)
     ## also look for registered method in namespaces
-    defenv <- if(!is.na(w <- .knownS3Generics[f])) asNamespace(w)
-    else if(f %in% tools:::.get_internal_S3_generics()) .BaseNamespaceEnv
-    else {
-        genfun <- get(f, mode="function", envir = parent.frame())
-        if(.isMethodsDispatchOn() && methods::is(genfun, "genericFunction"))
-            ## assumes the default method is the S3 generic function
-            genfun <- methods::selectMethod(genfun, "ANY")
-        if (typeof(genfun) == "closure") environment(genfun)
-        else .BaseNamespaceEnv
+    defenv <-
+	if(!is.na(w <- .knownS3Generics[f]))
+	    asNamespace(w)
+	else if(f %in% tools:::.get_internal_S3_generics())
+	    .BaseNamespaceEnv
+	else {
+	    genfun <- get(f, mode="function", envir = envir)
+	    if(.isMethodsDispatchOn() && methods::is(genfun, "genericFunction"))
+		## assumes the default method is the S3 generic function
+		genfun <- methods::selectMethod(genfun, "ANY")
+	    if (typeof(genfun) == "closure") environment(genfun)
+	    else .BaseNamespaceEnv
+	}
+    S3Table <- get(".__S3MethodsTable__.", envir = defenv)
+    if(!is.null(m <- get0(method, envir = S3Table, inherits = FALSE)))
+	m
+    else if(optional)
+	NULL
+    else stop(gettextf("S3 method '%s' not found", method), domain = NA)
+}
+
+##' Much in parallel to getS3method(), isS3method() gives TRUE/FALSE, but not an error
+isS3method <- function(method, f, class, envir = parent.frame())
+{
+    if(missing(method)) {
+        method <- paste(f, class, sep=".")
+    } else { # determine (f, class) from 'method'
+	f.c <- strsplit(method, ".", fixed=TRUE)[[1]]
+	nfc <- length(f.c)
+	if(nfc < 2 || !is.character(f.c))
+	    return(FALSE) ## stop("Invalid 'method' specification; must be  \"<fun>.<class>\"")
+	if(nfc == 2) {
+	    f     <- f.c[[1L]]
+	    class <- f.c[[2L]]
+	} else { ## nfc > 2 : e.g., t.data.frame, is.na.data.frame
+	    for(j in 2:nfc)
+		if(isS3method(f     = paste(f.c[1:(j-1)], collapse="."),
+			      class = paste(f.c[j: nfc ], collapse="."),
+			      envir = envir))
+		    return(TRUE)
+	    return(FALSE)
+	}
+    }
+    if(!any(f == getKnownS3generics())) { ## either a known generic or found in 'envir'
+	if(!nzchar(f <- findGeneric(f, envir)))
+            return(FALSE)
+    }
+    if(!is.null(m <- get0(method, envir = envir, mode = "function"))) {
+	## know: f is a knownS3generic, and method m is a visible function
+	pkg <- if(isNamespace(em <- environment(m))) environmentName(em)
+	       else if(is.primitive(m)) "base" ## else NULL
+	return(is.na(match(method, tools::nonS3methods(pkg)))) ## TRUE unless an exception
     }
+    ## also look for registered method in namespaces
+    defenv <-
+	if(!is.na(w <- .knownS3Generics[f]))
+	    asNamespace(w)
+	else if(f %in% tools:::.get_internal_S3_generics())
+	    .BaseNamespaceEnv
+	else {
+	    genfun <- get(f, mode="function", envir = envir)
+	    if(.isMethodsDispatchOn() && methods::is(genfun, "genericFunction"))
+		## assumes the default method is the S3 generic function
+		genfun <- methods::selectMethod(genfun, "ANY")
+	    if (typeof(genfun) == "closure") environment(genfun)
+	    else .BaseNamespaceEnv
+	}
     S3Table <- get(".__S3MethodsTable__.", envir = defenv)
-    if(exists(method, envir = S3Table, inherits = FALSE))
-        return(get(method, envir = S3Table))
-    if(optional) NULL else stop(gettextf("S3 method '%s' not found", method),
-                                domain = NA)
+    ## return
+    exists(method, envir = S3Table, inherits = FALSE)
+}
+
+isS3stdGeneric <- function(f) {
+    bdexpr <- body(f)
+    ## protect against technically valid but bizarre
+    ## function(x) { { { UseMethod("gen")}}} by
+    ## repeatedly consuming the { until we get to the first non { expr
+    while(as.character(bdexpr[[1L]]) == "{")
+        bdexpr <- bdexpr[[2L]]
+
+    ## We only check if it is a "standard" s3 generic. i.e. the first non-{
+    ## expression is a call to UseMethod. This will return FALSE if any
+    ## work occurs before the UseMethod call ("non-standard" S3 generic)
+    ret <- is.call(bdexpr) && identical(bdexpr[[1L]], as.name("UseMethod"))
+    if(ret)
+        names(ret) <- bdexpr[[2L]] ## arg passed to UseMethod naming generic
+    ret
 }
 
 getFromNamespace <-
@@ -246,7 +359,7 @@ function(x, ns, pos = -1, envir = as.environment(pos))
 {
     if(missing(ns)) {
         nm <- attr(envir, "name", exact = TRUE)
-        if(is.null(nm) || substring(nm, 1L, 8L) != "package:")
+        if(is.null(nm) || substr(nm, 1L, 8L) != "package:")
             stop("environment specified is not a package")
         ns <- asNamespace(substring(nm, 9L))
     } else ns <- asNamespace(ns)
@@ -298,19 +411,19 @@ function(x, value, ns, pos = -1, envir = as.environment(pos))
     nf <- sys.nframe()
     if(missing(ns)) {
         nm <- attr(envir, "name", exact = TRUE)
-        if(is.null(nm) || substring(nm, 1L, 8L) != "package:")
+        if(is.null(nm) || substr(nm, 1L, 8L) != "package:")
             stop("environment specified is not a package")
         ns <- asNamespace(substring(nm, 9L))
     } else ns <- asNamespace(ns)
+    ns_name <- getNamespaceName(ns)
     if (nf > 1L) {
-        if(getNamespaceName(ns) %in% tools:::.get_standard_package_names()$base)
+        if(ns_name %in% tools:::.get_standard_package_names()$base)
             stop("locked binding of ", sQuote(x), " cannot be changed",
                  domain = NA)
     }
     if(bindingIsLocked(x, ns)) {
         in_load <- Sys.getenv("_R_NS_LOAD_")
         if (nzchar(in_load)) {
-            ns_name <- getNamespaceName(ns)
             if(in_load != ns_name) {
                 msg <-
                     gettextf("changing locked binding for %s in %s whilst loading %s",
@@ -319,7 +432,6 @@ function(x, value, ns, pos = -1, envir = as.environment(pos))
                     warning(msg, call. = FALSE, domain = NA, immediate. = TRUE)
             }
         } else if (nzchar(Sys.getenv("_R_WARN_ON_LOCKED_BINDINGS_"))) {
-            ns_name <- getNamespaceName(ns)
             warning(gettextf("changing locked binding for %s in %s",
                              sQuote(x), sQuote(ns_name)),
                     call. = FALSE, domain = NA, immediate. = TRUE)
@@ -335,7 +447,7 @@ function(x, value, ns, pos = -1, envir = as.environment(pos))
     }
     if(!isBaseNamespace(ns)) {
         ## now look for possible copy as a registered S3 method
-        S3 <- getNamespaceInfo(ns, "S3methods")
+	S3 <- .getNamespaceInfo(ns, "S3methods")
         if(!length(S3)) return(invisible(NULL))
         S3names <- S3[, 3L]
         if(x %in% S3names) {
@@ -344,7 +456,7 @@ function(x, value, ns, pos = -1, envir = as.environment(pos))
             if(.isMethodsDispatchOn() && methods::is(genfun, "genericFunction"))
                 genfun <- methods::slot(genfun, "default")@methods$ANY
             defenv <- if (typeof(genfun) == "closure") environment(genfun)
-            else .BaseNamespaceEnv
+		      else .BaseNamespaceEnv
             S3Table <- get(".__S3MethodsTable__.", envir = defenv)
             remappedName <- paste(S3[i, 1L], S3[i, 2L], sep = ".")
             if(exists(remappedName, envir = S3Table, inherits = FALSE))
@@ -364,7 +476,7 @@ function(x, ns, pos = -1, envir = as.environment(pos), ...)
         stop("'fixInNamespace' requires a name")
     if(missing(ns)) {
         nm <- attr(envir, "name", exact = TRUE)
-        if(is.null(nm) || substring(nm, 1L, 8L) != "package:")
+        if(is.null(nm) || substr(nm, 1L, 8L) != "package:")
             stop("environment specified is not a package")
         ns <- asNamespace(substring(nm, 9L))
     } else ns <- asNamespace(ns)
@@ -415,7 +527,7 @@ function(x)
         if(exists(x, envir = ns, inherits = FALSE)) {
             f <- get(x, envir = ns, inherits = FALSE)
 	    objs <- c(objs, list(f))
-            where <- c(where, paste("namespace", i, sep=":"))
+            where <- c(where, paste0("namespace:", i))
             visible <- c(visible, FALSE)
         }
     }
diff --git a/src/library/utils/R/package.skeleton.R b/src/library/utils/R/package.skeleton.R
index 921d733..fc2f2a7 100644
--- a/src/library/utils/R/package.skeleton.R
+++ b/src/library/utils/R/package.skeleton.R
@@ -1,7 +1,7 @@
 #  File src/library/utils/R/package.skeleton.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
-#  Copyright (C) 1995-2013 The R Core Team
+#  Copyright (C) 1995-2014 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
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 package.skeleton <-
     function(name = "anRpackage", list = character(), environment = .GlobalEnv,
@@ -23,8 +23,7 @@ package.skeleton <-
 {
     safe.dir.create <- function(path)
     {
-	dirTest <- function(x) !is.na(isdir <- file.info(x)$isdir) & isdir
-	if(!dirTest(path) && !dir.create(path))
+	if(!dir.exists(path) && !dir.create(path))
 	    stop(gettextf("cannot create directory '%s'", path), domain = NA)
     }
 
@@ -36,7 +35,7 @@ package.skeleton <-
 
     if(missing(list)) {
         if(use_code_files) {
-            environment <- new.env(hash = TRUE)
+            environment <- new.env(hash = TRUE, parent = globalenv())
             methods::setPackageName(name, environment)
             for(cf in code_files)
                 sys.source(cf, envir = environment)
@@ -47,10 +46,10 @@ package.skeleton <-
     if(!is.character(list))
 	stop("'list' must be a character vector naming R objects")
     if(use_code_files || !envIsMissing) {
-        classesList <- getClasses(environment)
+        classesList <- methods::getClasses(environment)
         classes0 <- .fixPackageFileNames(classesList)
         names(classes0) <- classesList
-        methodsList <- getGenerics(environment)
+        methodsList <- methods::getGenerics(environment)
         methods0 <- .fixPackageFileNames(methodsList)
         names(methods0) <- methodsList
     }
@@ -66,7 +65,7 @@ package.skeleton <-
         warning("cannot turn off locale-specific chars via LC_CTYPE",
                 domain = NA)
 
-    have <- unlist(lapply(list, exists, envir = environment))
+    have <- vapply(list, exists, NA, envir = environment)
     if(any(!have))
         warning(sprintf(ngettext(sum(!have),
                                  "object '%s' not found",
@@ -216,14 +215,14 @@ package.skeleton <-
 					  filename =
 					  file.path(docs_dir,
 						    sprintf("%s-methods.Rd", methods0[item])),
-					  findMethods(item, where = environment))
+					  methods::findMethods(item, where = environment))
 	       })
     }))
     ## don't document generic functions from other packages
     for(item in methodsList) {
         if(exists(item, envir = environment, inherits = FALSE)) {
             ff <- get(item, envir = environment)
-            if(is(ff, "genericFunction") && !identical(ff at package, name)) # don't document
+            if(methods::is(ff, "genericFunction") && !identical(ff at package, name)) # don't document
                 file.remove(file.path(docs_dir, sprintf("%s.Rd", list0[item])))
         }
     }
diff --git a/src/library/utils/R/packageStatus.R b/src/library/utils/R/packageStatus.R
index 530d7f7..6a575ef 100644
--- a/src/library/utils/R/packageStatus.R
+++ b/src/library/utils/R/packageStatus.R
@@ -1,7 +1,7 @@
 #  File src/library/utils/R/packageStatus.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
-#  Copyright (C) 1995-2013 The R Core Team
+#  Copyright (C) 1995-2014 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
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 packageStatus <- function(lib.loc = NULL, repositories = NULL, method,
                           type = getOption("pkgType"))
@@ -90,7 +90,6 @@ summary.packageStatus <- function(object, ...)
     Libs <- levels(object$inst$LibPath)
     Repos <- levels(object$avail$Repository)
 
-    byLib <- split(object$inst, object$inst$LibPath)
     Libs <- lapply(split(object$inst, object$inst$LibPath),
                    function(x) tapply(x$Package, x$Status,
                                       function(x) sort(as.character(x))))
diff --git a/src/library/utils/R/packages.R b/src/library/utils/R/packages.R
index 88ec44d..286e28c 100644
--- a/src/library/utils/R/packages.R
+++ b/src/library/utils/R/packages.R
@@ -1,7 +1,7 @@
 #  File src/library/utils/R/packages.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
-#  Copyright (C) 1995-2014 The R Core Team
+#  Copyright (C) 1995-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
@@ -14,11 +14,12 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 available.packages <-
-function(contriburl = contrib.url(getOption("repos"), type), method,
-         fields = NULL, type = getOption("pkgType"), filters = NULL)
+function(contriburl = contrib.url(repos, type), method,
+         fields = NULL, type = getOption("pkgType"),
+         filters = NULL, repos = getOption("repos"))
 {
     requiredFields <-
         c(tools:::.get_standard_repository_db_fields(), "File")
@@ -37,60 +38,92 @@ function(contriburl = contrib.url(getOption("repos"), type), method,
         if(localcran) {
             ## see note in download.packages
             if(substring(repos, 1L, 8L) == "file:///") {
-                tmpf <- paste(substring(repos, 8L), "PACKAGES", sep = "/")
+                tmpf <- paste0(substring(repos, 8L), "/PACKAGES")
                 if(.Platform$OS.type == "windows") {
                     if(length(grep("^/[A-Za-z]:", tmpf)))
                         tmpf <- substring(tmpf, 2L)
                 }
             } else {
-                tmpf <- paste(substring(repos, 6L), "PACKAGES", sep = "/")
+                tmpf <- paste0(substring(repos, 6L), "/PACKAGES")
             }
-            res0 <- read.dcf(file = tmpf)
-            if(length(res0)) rownames(res0) <- res0[, "Package"]
+            res0 <- if(file.exists(dest <- paste0(tmpf, ".rds")))
+                readRDS(dest)
+            else
+                read.dcf(file = tmpf)
+            if(length(res0))
+                rownames(res0) <- res0[, "Package"]
         } else {
             dest <- file.path(tempdir(),
                               paste0("repos_", URLencode(repos, TRUE), ".rds"))
             if(file.exists(dest)) {
                 res0 <- readRDS(dest)
+                ## Be defensive ...
+                if(length(res0)) rownames(res0) <- res0[, "Package"]
             } else {
-                tmpf <- tempfile()
-                on.exit(unlink(tmpf))
-                op <- options("warn")
-                options(warn = -1)
-
-                ## Two kinds of errors can happen:  PACKAGES.gz may not exist,
-                ## or a junk error page that is not a valid dcf file may be
-                ## returned.  Handle both...
-
-                ## This is a binary file
-                z <- tryCatch(download.file(url = paste(repos, "PACKAGES.gz", sep = "/"),
-                                            destfile = tmpf, method = method,
-                                            cacheOK = FALSE, quiet = TRUE, mode = "wb"),
-                              error = identity)
-		if(!inherits(z, "error"))
-		    z <- res0 <- tryCatch(read.dcf(file = tmpf), error = identity)
+                ## Try .rds and readRDS(), and then .gz or plain DCF and
+                ## read.dcf(), catching problems from both missing or
+                ## invalid files.
+                need_dest <- FALSE
+                op <- options(warn = -1L)                
+                z <- tryCatch({
+                    download.file(url = paste0(repos, "/PACKAGES.rds"),
+                                  destfile = dest, method = method,
+                                  cacheOK = FALSE, quiet = TRUE, mode = "wb")
+                }, error = identity)
+                options(op)
+                if(!inherits(z, "error"))
+                    z <- res0 <- tryCatch(readRDS(dest),
+                                          error = identity)
+                
                 if(inherits(z, "error")) {
-                    ## read.dcf is going to interpret CRLF as LF, so use
-                    ## binary mode to avoid CRCRLF.
-                    z <- tryCatch(download.file(url = paste(repos, "PACKAGES", sep = "/"),
-                                                destfile = tmpf, method = method,
-                                                cacheOK = FALSE, quiet = TRUE,
-                                                mode = "wb"),
-                                  error = identity)
-		    options(op)
-		    if(inherits(z, "error")) {
-			warning(gettextf("unable to access index for repository %s", repos),
-				call. = FALSE, immediate. = TRUE, domain = NA)
-			next
-		    }
-		    res0 <- read.dcf(file = tmpf)
-		} else
-		    options(op)
-                ## Do we want to cache an empty result?
-                if(length(res0)) rownames(res0) <- res0[, "Package"]
-                saveRDS(res0, dest, compress = TRUE)
-                unlink(tmpf)
-                on.exit()
+                    ## Downloading or reading .rds failed, so try the
+                    ## DCF variants.
+                    need_dest <- TRUE
+                    tmpf <- tempfile()
+                    on.exit(unlink(tmpf))
+                    op <- options(warn = -1L)
+                    ## FIXME: this should check the return value == 0L
+                    z <- tryCatch({
+                        ## This is a binary file
+                        download.file(url = paste0(repos, "/PACKAGES.gz"),
+                                      destfile = tmpf, method = method,
+                                      cacheOK = FALSE, quiet = TRUE, mode = "wb")
+                    }, error = identity)
+                    if(inherits(z, "error"))
+                        z <- tryCatch({
+                            ## read.dcf is going to interpret CRLF as
+                            ## LF, so use binary mode to avoid CRLF.
+                            download.file(url = paste0(repos, "/PACKAGES"),
+                                          destfile = tmpf, method = method,
+                                          cacheOK = FALSE, quiet = TRUE, mode = "wb")
+                        }, error=identity)
+                    options(op)
+
+                    if (!inherits(z, "error"))
+                        z <- res0 <- tryCatch(read.dcf(file = tmpf),
+                                              error = identity)
+                    
+                    unlink(tmpf)
+                    on.exit()
+                }
+
+                if(inherits(z, "error")) {
+                    warning(gettextf("unable to access index for repository %s",
+                                     repos),
+                            ":\n  ", conditionMessage(z),
+                            call.=FALSE, immediate. = TRUE, domain = NA)
+                    next
+                }
+
+                if(length(res0)) {
+                    rownames(res0) <- res0[, "Package"]
+                    ## Do not cache empty results.
+                    if(need_dest)
+                        saveRDS(res0, dest, compress = TRUE)
+                } else if(!need_dest) {
+                    ## download.file() gave an empty .rds
+                    unlink(dest)
+                }
             } # end of download vs cached
         } # end of localcran vs online
         if (length(res0)) {
@@ -156,7 +189,7 @@ function(db)
     x <- lapply(strsplit(sub("^[[:space:]]*", "", depends),
                              "[[:space:]]*,[[:space:]]*"),
                 function(s) s[grepl("^R[[:space:]]*\\(", s)])
-    lens <- sapply(x, length)
+    lens <- lengths(x)
     pos <- which(lens > 0L)
     if(!length(pos)) return(db)
     lens <- lens[pos]
@@ -242,9 +275,9 @@ function(db, predicate, recursive = TRUE)
     ## Now find the recursive reverse dependencies of these and the
     ## non-standard packages missing from the db.
     rdepends <-
-        tools:::package_dependencies(db1$Package[ind], db = db1,
-                                     reverse = TRUE,
-                                     recursive = recursive)
+        tools::package_dependencies(db1$Package[ind], db = db1,
+                                    reverse = TRUE,
+                                    recursive = recursive)
     rdepends <- unique(unlist(rdepends))
     ind[match(rdepends, db1$Package, nomatch = 0L)] <- TRUE
 
@@ -328,10 +361,15 @@ update.packages <- function(lib.loc = NULL, repos = getOption("repos"),
     if(is.null(lib.loc))
         lib.loc <- .libPaths()
 
-    if(is.null(available))
+
+    if(type == "both" && (!missing(contriburl) || !is.null(available))) {
+        stop("specifying 'contriburl' or 'available' requires a single type, not type = \"both\"")
+    }
+    if(is.null(available)) {
         available <- available.packages(contriburl = contriburl,
                                         method = method)
-
+        if (missing(repos)) repos <- getOption("repos") # May have changed
+    }
     if(!is.matrix(oldPkgs) && is.character(oldPkgs)) {
     	subset <- oldPkgs
     	oldPkgs <- NULL
@@ -343,6 +381,7 @@ update.packages <- function(lib.loc = NULL, repos = getOption("repos"),
 	oldPkgs <- old.packages(lib.loc = lib.loc,
 				contriburl = contriburl, method = method,
 				available = available, checkBuilt = checkBuilt)
+	if (missing(repos)) repos <- getOption("repos") # May have changed
 	## prune package versions which are invisible to require()
 	if(!is.null(oldPkgs)) {
 	    pkg <- 0L
@@ -385,9 +424,14 @@ update.packages <- function(lib.loc = NULL, repos = getOption("repos"),
         ## do this a library at a time, to handle dependencies correctly.
         libs <- unique(instlib)
         for(l in libs)
-            install.packages(update[instlib == l , "Package"], l,
-                             contriburl = contriburl, method = method,
-                             available = available, ..., type = type)
+            if (type == 'both')
+                install.packages(update[instlib == l , "Package"], l,
+                                 repos = repos, method = method,
+                                 ..., type = type)
+            else
+                install.packages(update[instlib == l , "Package"], l,
+                                 contriburl = contriburl, method = method,
+                                 available = available, ..., type = type)
     }
 }
 
@@ -452,6 +496,9 @@ new.packages <- function(lib.loc = NULL, repos = getOption("repos"),
                          ..., type = getOption("pkgType"))
 {
     ask  # just a check that it is valid before we start work
+    if(type == "both" && (!missing(contriburl) || !is.null(available))) {
+        stop("specifying 'contriburl' or 'available' requires a single type, not type = \"both\"")
+    }
     if(is.null(lib.loc)) lib.loc <- .libPaths()
     if(!is.matrix(instPkgs))
         stop(gettextf("no installed packages for (invalid?) 'lib.loc=%s'",
@@ -482,9 +529,13 @@ new.packages <- function(lib.loc = NULL, repos = getOption("repos"),
         else message("no new packages are available")
     }
     if(length(update)) {
-        install.packages(update, lib = lib.loc[1L], contriburl = contriburl,
-                         method = method, available = available,
-                         type = type, ...)
+        if(type == "both")
+            install.packages(update, lib = lib.loc[1L], method = method,
+                             type = type, ...)
+        else
+            install.packages(update, lib = lib.loc[1L], contriburl = contriburl,
+                             method = method, available = available,
+                             type = type, ...)
         # Now check if they were installed and update 'res'
         dirs <- list.files(lib.loc[1L])
         updated <- update[update %in% dirs]
@@ -572,7 +623,7 @@ installed.packages <-
             enc <- sprintf("%d_%s", nchar(base), .Call(C_crc64, base))
             dest <- file.path(tempdir(), paste0("libloc_", enc, ".rds"))
             if(file.exists(dest) &&
-               file.info(dest)$mtime > file.info(lib)$mtime &&
+               file.mtime(dest) > file.mtime(lib) &&
                (val <- readRDS(dest))$base == base)
                 ## use the cache file
                 retval <- rbind(retval, val$value)
@@ -652,11 +703,12 @@ download.packages <- function(pkgs, destdir, available = NULL,
                               contriburl = contrib.url(repos, type),
                               method, type = getOption("pkgType"), ...)
 {
-    dirTest <- function(x) !is.na(isdir <- file.info(x)$isdir) & isdir
-
     nonlocalcran <- length(grep("^file:", contriburl)) < length(contriburl)
-    if(nonlocalcran && !dirTest(destdir))
+    if(nonlocalcran && !dir.exists(destdir))
         stop("'destdir' is not a directory")
+
+    type <- resolvePkgType(type)
+
     if(is.null(available))
         available <- available.packages(contriburl=contriburl, method=method)
 
@@ -723,10 +775,16 @@ download.packages <- function(pkgs, destdir, available = NULL,
     retval
 }
 
-contrib.url <- function(repos, type = getOption("pkgType"))
-{
+resolvePkgType <- function(type) {
     ## Not entirely clear this is optimal
     if(type == "both") type <- "source"
+    else if(type == "binary") type <- .Platform$pkgType
+    type
+}
+
+contrib.url <- function(repos, type = getOption("pkgType"))
+{
+    type <- resolvePkgType(type)
     if(is.null(repos)) return(NULL)
     if("@CRAN@" %in% repos && interactive()) {
         cat(gettext("--- Please select a CRAN mirror for use in this session ---"),
@@ -757,57 +815,103 @@ contrib.url <- function(repos, type = getOption("pkgType"))
     res
 }
 
-
-getCRANmirrors <- function(all = FALSE, local.only = FALSE)
+.getMirrors <- function(url, local.file, all, local.only)
 {
     m <- NULL
     if(!local.only) {
-        ## try to handle explicitly failure to connect to CRAN.
-        con <- url("http://cran.r-project.org/CRAN_mirrors.csv")
-        m <- try(open(con, "r"), silent = TRUE)
-        if(!inherits(m, "try-error")) m <- try(read.csv(con, as.is = TRUE))
-        close(con)
-    }
-    if(is.null(m) || inherits(m, "try-error"))
-        m <- read.csv(file.path(R.home("doc"), "CRAN_mirrors.csv"),
-                      as.is = TRUE)
+        ## Try to handle explicitly failure to connect to CRAN.
+        f <- tempfile()
+        on.exit(unlink(f))
+        m <- tryCatch({
+            m <- download.file(url, destfile = f, quiet = TRUE)
+            if(m != 0L)
+                stop(gettextf("'download.file()' error code '%d'", m))
+            read.csv(f, as.is = TRUE, encoding = "UTF-8")
+        }, error=function(err) {
+            warning(gettextf("failed to download mirrors file (%s); using local file '%s'",
+                             conditionMessage(err), local.file),
+                    call.=FALSE, immediate.=TRUE)
+            NULL
+        })
+    }
+    if(is.null(m))
+        m <- read.csv(local.file, as.is = TRUE, encoding = "UTF-8")
     if(!all) m <- m[as.logical(m$OK), ]
     m
 }
 
+getCRANmirrors <- function(all = FALSE, local.only = FALSE)
+{
+    .getMirrors("https://cran.r-project.org/CRAN_mirrors.csv",
+                file.path(R.home("doc"), "CRAN_mirrors.csv"),
+                all = all, local.only = local.only)
+}
 
-chooseCRANmirror <- function(graphics = getOption("menu.graphics"), ind = NULL)
+.chooseMirror <- function(m, label, graphics, ind, useHTTPS)
 {
     if(is.null(ind) && !interactive())
-        stop("cannot choose a CRAN mirror non-interactively")
-    m <- getCRANmirrors(all = FALSE, local.only = FALSE)
-    res <- if (length(ind)) as.integer(ind)[1L] else
-    menu(m[, 1L], graphics, "CRAN mirror")
-    if(res > 0L) {
+        stop("cannot choose a ", label, " mirror non-interactively")
+    if (length(ind))
+        res <- as.integer(ind)[1L]
+    else {
+    	isHTTPS <- (startsWith(m[, "URL"], "https") &
+                    grepl("secure_mirror_from_master",
+                          m[, "Comment"],
+                          fixed = TRUE))
+    	mHTTPS <- m[isHTTPS,]
+    	mHTTP <- m[!isHTTPS,]
+    	if (useHTTPS) {
+    	    m <- mHTTPS
+    	    if (!nrow(m)) {
+    	    	useHTTPS <- FALSE
+    	    	m <- mHTTP
+    	    }
+    	}
+    	if (useHTTPS) {
+    	    httpsLabel <- paste("Secure", label, "mirrors")
+            httpLabel <- paste("Other", label, "mirrors")
+    	    res <- menu(c(m[, 1L], "(other mirrors)"), graphics, httpsLabel)
+    	    if (res > nrow(m)) {
+    	    	m <- mHTTP
+    	    	res <- menu(m[, 1L], graphics, httpLabel)
+    	    }
+    	} else {
+            httpLabel <- paste(label, "mirrors")
+    	    m <- mHTTP
+    	    res <- menu(m[, 1L], graphics, httpLabel)
+    	}
+    }
+    if (res > 0L) {
         URL <- m[res, "URL"]
+        names(URL) <- m[res, "Name"]
+        sub("/$", "", URL[1L])
+    } else character()
+}
+
+chooseCRANmirror <- function(graphics = getOption("menu.graphics"), ind = NULL,
+                             useHTTPS = getOption("useHTTPS", TRUE),
+                             local.only = FALSE)
+{
+    m <- getCRANmirrors(all = FALSE, local.only = local.only)
+    url <- .chooseMirror(m, "CRAN", graphics, ind, useHTTPS)
+    if (length(url)) {
         repos <- getOption("repos")
-        repos["CRAN"] <- gsub("/$", "", URL[1L])
+        repos["CRAN"] <- url
         options(repos = repos)
     }
     invisible()
 }
 
-chooseBioCmirror <- function(graphics = getOption("menu.graphics"), ind = NULL)
+chooseBioCmirror <- function(graphics = getOption("menu.graphics"), ind = NULL,
+                             useHTTPS = getOption("useHTTPS", TRUE),
+                             local.only = FALSE)
 {
-    if(is.null(ind) && !interactive())
-        stop("cannot choose a BioC mirror non-interactively")
-    m <- c("Seattle (USA)"="http://www.bioconductor.org"
-	   , "Bethesda (USA)"="http://watson.nci.nih.gov/bioc_mirror"
-	   , "Dortmund (Germany)"="http://bioconductor.statistik.tu-dortmund.de"
-	   , "Anhui (China)"="http://mirrors.ustc.edu.cn/bioc/"
-	   , "Cambridge (UK)"="http://mirrors.ebi.ac.uk/bioconductor/"
-	   , "Riken, Kobe (Japan)" = "http://bioconductor.jp/"
-	   , "Canberra (Australia)" = "http://mirror.aarnet.edu.au/pub/bioconductor/"
-	   , "Sao Paulo (Brazil)" = "http://bioconductor.fmrp.usp.br/"
-	   )
-    res <- if (length(ind)) as.integer(ind)[1L] else
-    menu(names(m), graphics, "BioC mirror")
-    if(res > 0L) options("BioC_mirror" = m[res])
+    m <- .getMirrors("https://bioconductor.org/BioC_mirrors.csv",
+                     file.path(R.home("doc"), "BioC_mirrors.csv"),
+                     all = FALSE, local.only = local.only)
+    url <- .chooseMirror(m, "BioC", graphics, ind, useHTTPS)
+    if (length(url))
+        options(BioC_mirror = url)
     invisible()
 }
 
@@ -817,12 +921,10 @@ setRepositories <-
 {
     if(is.null(ind) && !interactive())
         stop("cannot set repositories non-interactively")
-    p <- file.path(Sys.getenv("HOME"), ".R", "repositories")
-    if(!file.exists(p))
-        p <- file.path(R.home("etc"), "repositories")
-    a <- tools:::.read_repositories(p)
+    a <- tools:::.get_repositories()
     pkgType <- getOption("pkgType")
-    if (pkgType == "both") pkgType <- .Platform$pkgType
+    if (pkgType == "both") pkgType <- "source" #.Platform$pkgType
+    if (pkgType == "binary") pkgType <- .Platform$pkgType
     if(length(grep("^mac\\.binary", pkgType))) pkgType <- "mac.binary"
     thisType <- a[[pkgType]]
     a <- a[thisType, 1L:3L]
@@ -1002,7 +1104,7 @@ compareVersion <- function(a, b)
     ## some of the packages may be already installed, but the
     ## dependencies apply to those being got from CRAN.
     DL <- lapply(DL, function(x) x[x %in% pkgs])
-    lens <- sapply(DL, length)
+    lens <- lengths(DL)
     if(all(lens > 0L)) {
         warning("every package depends on at least one other")
         return(pkgs)
diff --git a/src/library/utils/R/packages2.R b/src/library/utils/R/packages2.R
index a748344..1ebbe36 100644
--- a/src/library/utils/R/packages2.R
+++ b/src/library/utils/R/packages2.R
@@ -1,7 +1,7 @@
 #  File src/library/utils/R/packages2.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
-#  Copyright (C) 1995-2014 The R Core Team
+#  Copyright (C) 1995-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
@@ -14,11 +14,17 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 if (.Platform$OS.type == "windows")
     .install.macbinary <- function(...) NULL	# globalVariables isn't available, so use this to suppress the warning
 
+isBasePkg <- function(pkg) {
+  priority <- tryCatch(packageDescription(pkg, fields = "Priority"),
+                       error = function(e) e, warning = function(e) e)
+  identical(priority, "base")
+}
+
 getDependencies <-
     function(pkgs, dependencies = NA, available = NULL, lib = .libPaths()[1L],
              binary = FALSE)
@@ -46,17 +52,25 @@ getDependencies <-
     p0 <- unique(pkgs)
     miss <-  !p0 %in% row.names(available)
     if(sum(miss)) {
+        msg <- paste0(if(binary) "as a binary package ", "for ",
+                      sub(" *\\(.*","", R.version.string))
 	warning(sprintf(ngettext(sum(miss),
-				 "package %s is not available (for %s)",
-				 "packages %s are not available (for %s)"),
-			paste(sQuote(p0[miss]), collapse=", "),
-			sub(" *\\(.*","", R.version.string)),
+				 "package %s is not available (%s)",
+				 "packages %s are not available (%s)"),
+			paste(sQuote(p0[miss]), collapse = ", "), msg),
                 domain = NA, call. = FALSE)
+        base <- vapply(p0[miss], isBasePkg, FALSE)
+        if (sum(base))
+          warning(sprintf(ngettext(sum(base),
+                                   "package %s is a base package, and should not be updated",
+                                   "packages %s are base packages, and should not be updated"),
+                          paste(sQuote(p0[miss][base]), collapse = ", ")),
+                  domain = NA, call. = FALSE)
         if (sum(miss) == 1L &&
             !is.na(w <- match(tolower(p0[miss]),
                               tolower(row.names(available))))) {
             warning(sprintf("Perhaps you meant %s ?",
-                            sQuote( row.names(available)[w])),
+                            sQuote(row.names(available)[w])),
                     call. = FALSE, domain = NA)
         }
         flush.console()
@@ -124,6 +138,14 @@ install.packages <-
              keep_outputs = FALSE,
              ...)
 {
+    type2 <- .Platform$pkgType
+    if (type == "binary") {
+        if (type2 == "source")
+            stop("type 'binary' is not supported on this platform")
+        else type <- type2
+        if(type == "both" && (!missing(contriburl) || !is.null(available)))
+           stop("specifying 'contriburl' or 'available' requires a single type, not type = \"both\"")
+    }
     if (is.logical(clean) && clean)
         clean <- "--clean"
     if(is.logical(dependencies) && is.na(dependencies))
@@ -197,20 +219,24 @@ install.packages <-
         ## if no packages were specified, use a menu
 	if(.Platform$OS.type == "windows" || .Platform$GUI == "AQUA"
            || (capabilities("tcltk")
-               && capabilities("X11") && suppressWarnings(tcltk:::.TkUp)) ) {
+               && capabilities("X11") && suppressWarnings(tcltk::.TkUp)) ) {
             ## this is the condition for a graphical select.list()
 	} else
 	    stop("no packages were specified")
 
-        ## This will only offer the specified type.
-	if(is.null(available))
-	    available <- available.packages(contriburl = contriburl,
-					    method = method)
-	if(NROW(available)) {
+        ## This will only offer the specified type.  If type = "both"
+        ## do not want 'available' set for "source".
+	if(is.null(available)) {
+	    av <- available.packages(contriburl = contriburl, method = method)
+	    if (missing(repos)) ## Evaluating contriburl may have changed repos, which may be used below
+	      repos <- getOption("repos")
+            if(type != "both") available <- av
+        } else av <- available
+	if(NROW(av)) {
             ## avoid duplicate entries in menus, since the latest available
             ## will be picked up
             ## sort in the locale, as R <= 2.10.1 did so
-	    pkgs <- select.list(sort(unique(rownames(available))),
+	    pkgs <- select.list(sort(unique(rownames(av))),
                                 multiple = TRUE,
                                 title = "Packages", graphics = TRUE)
 	}
@@ -227,7 +253,7 @@ install.packages <-
     }
 
     ## check for writability by user
-    ok <- file.info(lib)$isdir & (file.access(lib, 2) == 0)
+    ok <- dir.exists(lib) & (file.access(lib, 2) == 0L)
     if(length(lib) > 1 && any(!ok))
         stop(sprintf(ngettext(sum(!ok),
                               "'lib' element %s is not a writable directory",
@@ -236,9 +262,9 @@ install.packages <-
     if(length(lib) == 1L && .Platform$OS.type == "windows") {
         ## file.access is unreliable on Windows, especially >= Vista.
         ## the only known reliable way is to try it
-        ok <- file.info(lib)$isdir %in% TRUE # dir might not exist, PR#14311
+        ok <- dir.exists(lib) # dir might not exist, PR#14311
         if(ok) {
-            fn <- file.path(lib, paste("_test_dir", Sys.getpid(), sep = "_"))
+            fn <- file.path(lib, paste0("_test_dir_", Sys.getpid()))
             unlink(fn, recursive = TRUE) # precaution
             res <- try(dir.create(fn, showWarnings = FALSE))
             if(inherits(res, "try-error") || !res) ok <- FALSE
@@ -282,17 +308,42 @@ install.packages <-
 
     ## check if we should infer repos = NULL
     if(length(pkgs) == 1L && missing(repos) && missing(contriburl)) {
-        if((type == "source" &&
-            any(grepl("[.]tar[.](gz|bz2|xz)$", pkgs))) ||
+        if((type == "source" && any(grepl("[.]tar[.](gz|bz2|xz)$", pkgs))) ||
            (type %in% "win.binary" && length(grep("[.]zip$", pkgs))) ||
-           (substr(type, 1L, 10L) == "mac.binary"
-            && length(grep("[.]tgz$", pkgs)))) {
+           (substr(type, 1L, 10L) == "mac.binary" && grepl("[.]tgz$", pkgs))) {
             repos <- NULL
             message("inferring 'repos = NULL' from 'pkgs'")
         }
+        if (type == "both") {
+            if (type2 %in% "win.binary" && grepl("[.]zip$", pkgs)) {
+                repos <- NULL
+                type <- type2
+                message("inferring 'repos = NULL' from 'pkgs'")
+            } else if (substr(type2, 1L, 10L) == "mac.binary"
+                       && grepl("[.]tgz$", pkgs)) {
+                repos <- NULL
+                type <- type2
+                message("inferring 'repos = NULL' from 'pkgs'")
+            } else if (grepl("[.]tar[.](gz|bz2|xz)$", pkgs)) {
+                repos <- NULL
+                type <- "source"
+                message("inferring 'repos = NULL' from 'pkgs'")
+           }
+        }
     }
 
-    if(is.null(repos) & missing(contriburl)) {
+    ## check if we should infer the type
+    if (length(pkgs) == 1L && is.null(repos) && type == "both") {
+    	if (  (type2 %in% "win.binary" && grepl("[.]zip$", pkgs))
+	    ||(substr(type2, 1L, 10L) == "mac.binary"
+		   && grepl("[.]tgz$", pkgs))) {
+	    type <- type2
+	} else if (grepl("[.]tar[.](gz|bz2|xz)$", pkgs)) {
+	    type <- "source"
+       }
+    }
+
+    if(is.null(repos) && missing(contriburl)) {
         tmpd <- destdir
         nonlocalrepos <- any(web <- grepl("^(http|https|ftp)://", pkgs))
         if(is.null(destdir) && nonlocalrepos) {
@@ -319,27 +370,29 @@ install.packages <-
     }
 
 
-# for testing .Platform$pkgType <- "mac.binary.leopard"
     ## Look at type == "both"
+    ## NB it is only safe to use binary packages with a macOS
+    ## build that uses the same R foundation layout as CRAN since
+    ## paths in DSOs are hard-coded.
     if (type == "both") {
-        ## NB it is only safe to use binary packages with a Mac OS X
-        ## build that uses the same R foundation layout as CRAN since
-        ## paths in DSOs are hard-coded.
-        type2 <- .Platform$pkgType
         if (type2 == "source")
-            stop("type == \"both\" can only be used on Windows or a CRAN build for Mac OS X")
-        if(!missing(contriburl) || !is.null(available))
-            stop("type == \"both\" cannot be used if 'available' or 'contriburl' is specified")
+            stop("type == \"both\" can only be used on Windows or a CRAN build for macOS")
+        if (!missing(contriburl) || !is.null(available)) type <- type2
+    }
+
+    getDeps <- TRUE
+    if (type == "both") {
         if(is.null(repos))
             stop("type == \"both\" cannot be used with 'repos = NULL'")
         type <- "source"
         contriburl <- contrib.url(repos, "source")
-        # The line above may have changed the repos option, so..
+        ## The line above may have changed the repos option, so ...
         if (missing(repos)) repos <- getOption("repos")
         available <-
             available.packages(contriburl = contriburl, method = method,
                                fields = "NeedsCompilation")
         pkgs <- getDependencies(pkgs, dependencies, available, lib)
+        getDeps <- FALSE
         ## Now see what we can get as binary packages.
         av2 <- available.packages(contriburl = contrib.url(repos, type2),
                                   method = method)
@@ -351,6 +404,10 @@ install.packages <-
 
         srcvers <- available[bins, "Version"]
         later <- as.numeric_version(binvers) < srcvers
+
+        action <- getOption("install.packages.compile.from.source",
+                            "interactive")
+        if(!nzchar(Sys.which(Sys.getenv("MAKE", "make")))) action <- "never"
         if(any(later)) {
             msg <- ngettext(sum(later),
                             "There is a binary version available but the source version is later",
@@ -364,32 +421,41 @@ install.packages <-
                               check.names = FALSE)[later, ]
             print(out)
             cat("\n")
-            if(interactive() && any(later & hasSrc)) {
-                msg <-
-                    ngettext(sum(later & hasSrc),
-                             "Do you want to install from sources the package which need compilation?",
-                             "Do you want to install from sources the packages which need compilation?")
-                message(msg, domain = NA)
-                res <- readline("y/n: ")
-                if(res != "y") later <- later & !hasSrc
+            if(any(later & hasSrc)) {
+                if(action == "interactive" && interactive()) {
+                    msg <-
+                        ngettext(sum(later & hasSrc),
+                                 "Do you want to install from sources the package which needs compilation?",
+                                 "Do you want to install from sources the packages which need compilation?")
+                    message(msg, domain = NA)
+                    res <- readline("y/n: ")
+                    if(res != "y") later <- later & !hasSrc
+                } else if (action == "never") {
+                    cat("  Binaries will be installed\n")
+                    later <- later & !hasSrc
+                }
             }
         }
         bins <- bins[!later]
 
-        if(interactive() && length(srcOnly)) {
-            nc <- !( available[srcOnly, "NeedsCompilation"] %in% "no" )
-            s2 <- srcOnly[nc]
+        if(length(srcOnly)) {
+            s2 <- srcOnly[!( available[srcOnly, "NeedsCompilation"] %in% "no" )]
             if(length(s2)) {
                 msg <-
                     ngettext(length(s2),
-                             "Package which are only available in source form, and may need compilation of C/C++/Fortran",
+                             "Package which is only available in source form, and may need compilation of C/C++/Fortran",
                              "Packages which are only available in source form, and may need compilation of C/C++/Fortran")
                 msg <- c(paste0(msg, ": "), sQuote(s2))
                 msg <- strwrap(paste(msg, collapse = " "), exdent = 2)
                 message(paste(msg, collapse = "\n"), domain = NA)
-                message("Do you want to attempt to install these from sources?")
-                res <- readline("y/n: ")
-                if(res != "y") pkgs <- setdiff(pkgs, s2)
+                if(action == "interactive" && interactive()) {
+                    message("Do you want to attempt to install these from sources?")
+                    res <- readline("y/n: ")
+                    if(res != "y") pkgs <- setdiff(pkgs, s2)
+                } else if(action == "never") {
+                    cat("  These will not be installed\n")
+                    pkgs <- setdiff(pkgs, s2)
+                }
             }
         }
 
@@ -400,13 +466,15 @@ install.packages <-
                                    method = method, available = av2,
                                    destdir = destdir,
                                    dependencies = NULL,
-                                   libs_only = libs_only, ...)
+                                   libs_only = libs_only,
+                                   quiet = quiet, ...)
             else
                 .install.macbinary(pkgs = bins, lib = lib,
                                    contriburl = contrib.url(repos, type2),
                                    method = method, available = av2,
                                    destdir = destdir,
-                                   dependencies = NULL, ...)
+                                   dependencies = NULL,
+                                   quiet = quiet, ...)
         }
         pkgs <- setdiff(pkgs, bins)
         if(!length(pkgs)) return(invisible())
@@ -416,6 +484,7 @@ install.packages <-
                         paste(sQuote(pkgs), collapse=", ")),
                 "\n", domain = NA)
 	flush.console()
+        ## end of "both"
     } else if (getOption("install.packages.check.source", "yes") %in% "yes"
                && (type %in% "win.binary" || substr(type, 1L, 10L) == "mac.binary")) {
         if (missing(contriburl) && is.null(available) && !is.null(repos)) {
@@ -438,7 +507,6 @@ install.packages <-
                 ## so a package might only be available as source,
                 ## or it might be later in source.
                 ## FIXME: might only want to check on the same repository,
-                ## allowing for CRANextras.
                 na <- srcpkgs[!srcpkgs %in% bins]
                 if (length(na)) {
                     msg <-
@@ -471,7 +539,7 @@ install.packages <-
 
     if(.Platform$OS.type == "windows") {
         if(substr(type, 1L, 10L) == "mac.binary")
-            stop("cannot install MacOS X binary packages on Windows")
+            stop("cannot install macOS binary packages on Windows")
 
         if(type %in% "win.binary") {
             ## include local .zip files
@@ -496,8 +564,8 @@ install.packages <-
         pkgs <- gsub("\\\\", "/", pkgs)
     } else {
         if(substr(type, 1L, 10L) == "mac.binary") {
-            if(!length(grep("darwin", R.version$platform)))
-                stop("cannot install MacOS X binary packages on this platform")
+            if(!grepl("darwin", R.version$platform))
+                stop("cannot install macOS binary packages on this platform")
             .install.macbinary(pkgs = pkgs, lib = lib, contriburl = contriburl,
                                method = method, available = available,
                                destdir = destdir,
@@ -533,7 +601,7 @@ install.packages <-
             keep_outputs <- FALSE
     } else if(is.character(keep_outputs) &&
               (length(keep_outputs) == 1L)) {
-        if(!file_test("-d", keep_outputs) &&
+        if(!dir.exists(keep_outputs) &&
            !dir.create(keep_outputs, recursive = TRUE))
             stop(gettextf("unable to create %s", sQuote(keep_outputs)),
                  domain = NA)
@@ -555,7 +623,7 @@ install.packages <-
             Sys.setenv(R_LIBS = libpath)
             on.exit(Sys.setenv(R_LIBS = oldrlibs))
         } else
-            env <- paste("R_LIBS", shQuote(libpath), sep = "=")
+            env <- paste0("R_LIBS=", shQuote(libpath))
         ## </NOTE>
     }
 
@@ -616,7 +684,8 @@ install.packages <-
     if(is.null(available))
         available <- available.packages(contriburl = contriburl,
                                         method = method)
-    pkgs <- getDependencies(pkgs, dependencies, available, lib)
+    if(getDeps)
+        pkgs <- getDependencies(pkgs, dependencies, available, lib)
 
     foundpkgs <- download.packages(pkgs, destdir = tmpd, available = available,
                                    contriburl = contriburl, method = method,
@@ -679,7 +748,7 @@ install.packages <-
                 ##   cmd <- paste(c(shQuote(command), env, args),
                 ##                collapse = " ")
                 ## on Windows?
-                cmd <- paste(c(shQuote(cmd0), args), collapse = " ")
+                cmd <- paste(c("MAKEFLAGS=", shQuote(cmd0), args), collapse = " ")
                 ## </NOTE>
                 deps <- aDL[[pkg]]
                 deps <- deps[deps %in% upkgs]
@@ -715,10 +784,9 @@ install.packages <-
             setwd(cwd); on.exit()
             unlink(tmpd, recursive = TRUE)
         } else {
+            outfiles <- paste0(update[, 1L], ".out")
             for(i in seq_len(nrow(update))) {
-                outfile <- if(keep_outputs) {
-                    paste0(update[i, 1L], ".out")
-                } else output
+                outfile <- if(keep_outputs) outfiles[i] else output
                 args <- c(args0,
                           get_install_opts(update[i, 3L]),
                           "-l", shQuote(update[i, 2L]),
@@ -739,13 +807,16 @@ install.packages <-
                             domain = NA)
                 }
             }
-            if(keep_outputs && (outdir != getwd()))
-                file.copy(paste0(update[, 1L], ".out"), outdir)
+            if(keep_outputs && (outdir != getwd())) {
+                file.copy(outfiles, outdir)
+                file.remove(outfiles)
+            }
         }
+        ## Using stderr is the wish of PR#16420
         if(!quiet && nonlocalrepos && !is.null(tmpd) && is.null(destdir))
             cat("\n", gettextf("The downloaded source packages are in\n\t%s",
                                sQuote(normalizePath(tmpd, mustWork = FALSE))),
-                "\n", sep = "")
+                "\n", sep = "", file = stderr())
         ## update packages.html on Unix only if .Library was installed into
         libs_used <- unique(update[, 2L])
         if(.Platform$OS.type == "unix" && .Library %in% libs_used) {
@@ -802,10 +873,9 @@ registerNames <- function(names, package, .listFile, add = TRUE) {
 packageName <- function(env = parent.frame()) {
     if (!is.environment(env)) stop("'env' must be an environment")
     env <- topenv(env)
-    if (exists(".packageName", envir = env, inherits = FALSE))
-	get(".packageName", envir = env, inherits = FALSE)
+    if (!is.null(pn <- get0(".packageName", envir = env, inherits = FALSE)))
+	pn
     else if (identical(env, .BaseNamespaceEnv))
 	"base"
-    else
-	NULL
+    ## else NULL
 }
diff --git a/src/library/utils/R/page.R b/src/library/utils/R/page.R
index f232fef..85b1d0d 100644
--- a/src/library/utils/R/page.R
+++ b/src/library/utils/R/page.R
@@ -1,5 +1,5 @@
 #  File src/library/utils/R/page.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
 #  Copyright (C) 1995-2012 The R Core Team
 #
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 page <- function(x, method = c("dput", "print"), ...)
 {
diff --git a/src/library/utils/R/progressBar.R b/src/library/utils/R/progressBar.R
index f34183a..e664211 100644
--- a/src/library/utils/R/progressBar.R
+++ b/src/library/utils/R/progressBar.R
@@ -1,5 +1,5 @@
 #  File src/library/utils/R/progressBar.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
 #  Copyright (C) 1995-2012 The R Core Team
 #
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 txtProgressBar <-
     function(min = 0, max = 1, initial = 0, char = "=",
@@ -41,11 +41,11 @@ txtProgressBar <-
         .val <<- value
         nb <- round(width*(value - min)/(max - min))
         if(.nb < nb) {
-            cat(paste(rep.int(char, nb-.nb), collapse=""), file = file)
+            cat(strrep(char, nb-.nb), file = file)
             flush.console()
         } else if (.nb > nb) {
-            cat("\r", paste(rep.int(" ", .nb*nw), collapse=""),
-                "\r", paste(rep.int(char, nb), collapse=""),
+            cat("\r", strrep(" ", .nb * nw),
+                "\r", strrep(char, nb),
                 sep = "", file = file)
             flush.console()
         }
@@ -57,12 +57,12 @@ txtProgressBar <-
         .val <<- value
         nb <- round(width*(value - min)/(max - min))
         if(.nb <= nb) {
-            cat("\r", paste(rep.int(char, nb), collapse=""),
+            cat("\r", strrep(char, nb),
                 sep = "", file = file)
             flush.console()
         } else {
-            cat("\r", paste(rep.int(" ", .nb*nw), collapse=""),
-                "\r", paste(rep.int(char, nb), collapse=""),
+            cat("\r", strrep(" ", .nb * nw),
+                "\r", strrep(char, nb),
                 sep = "", file = file)
             flush.console()
         }
@@ -75,7 +75,7 @@ txtProgressBar <-
         nb <- round(width*(value - min)/(max - min))
         pc <- round(100*(value - min)/(max - min))
         if(nb == .nb && pc == .pc) return()
-        cat(paste(c("\r  |", rep.int(" ", nw*width+6)), collapse=""),
+        cat(paste0("\r  |", strrep(" ", nw*width+6)),
             file = file)
         cat(paste(c("\r  |",
                     rep.int(char, nb),
diff --git a/src/library/utils/R/prompt.R b/src/library/utils/R/prompt.R
index 87e2aee..a258b23 100644
--- a/src/library/utils/R/prompt.R
+++ b/src/library/utils/R/prompt.R
@@ -1,7 +1,7 @@
 #  File src/library/utils/R/prompt.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
-#  Copyright (C) 1995-2012 The R Core Team
+#  Copyright (C) 1995-2015 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
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 prompt <-
 function(object, filename = NULL, name = NULL, ...)
@@ -93,14 +93,13 @@ function(object, filename = NULL, name = NULL,
     }
 
     ## Construct the definition for \examples.
-    x.def <- attr(x, "source")
-    if(is.null(x.def))
-        x.def <- deparse(x)
+    x.def <- deparse(x)
     if(any(br <- substr(x.def, 1L, 1L) == "}"))
-        x.def[br] <- paste(" ", x.def[br])
+        x.def[br] <- paste0("  ", x.def[br])
 
     ## escape "%" :
     x.def <- gsub("%", "\\\\%", x.def)
+    Call <- gsub("%", "\\\\%", Call)
 
     Rdtxt <-
         list(name = paste0("\\name{", name, "}"),
@@ -149,7 +148,7 @@ function(object, filename = NULL, name = NULL,
              keywords = c(paste("% Add one or more standard keywords,",
              "see file 'KEYWORDS' in the"),
              "% R documentation directory.",
-             "\\keyword{ ~kwd1 }",
+             "\\keyword{ ~kwd1 }% use one of  RShowDoc(\"KEYWORDS\")",
              "\\keyword{ ~kwd2 }% __ONLY ONE__ keyword per line"))
 
     Rdtxt$arguments <- if(n)
@@ -235,7 +234,7 @@ function(object, filename = NULL, name = NULL)
                 paste0("\\samp{", gsub("([%{}])", "\\\\\\1", s), "}")
             }
         }
-        
+
         fmt <- c("\\format{",
                  paste("  A data frame with",
                        nrow(x),
@@ -324,17 +323,15 @@ promptPackage <-
 function(package, lib.loc = NULL, filename = NULL, name = NULL, final = FALSE)
 {
     ## Most of this should not be translated -- PR#11191
-    ## need to do this as packageDescription and library(help=) have
-    ## different conventions
-    if (is.null(lib.loc)) lib.loc <- .libPaths()
+
+    ## lib.loc is not used any more
+    ## if (is.null(lib.loc)) lib.loc <- .libPaths()
 
     insert1 <- function(field, new) {
     	prev <- Rdtxt[[field]]
     	Rdtxt[[field]] <<- c(prev[-length(prev)], new, prev[length(prev)])
     }
     insert2 <- function(field, new) insert1(field, paste("~~", new, "~~"))
-    tabular <- function(col1, col2)
-        c("\\tabular{ll}{", paste0(col1, " \\tab ", col2, "\\cr"), "}")
 
     if(missing(name))
 	name <- paste0(package, "-package")
@@ -344,8 +341,9 @@ function(package, lib.loc = NULL, filename = NULL, name = NULL, final = FALSE)
 
     Rdtxt <-
     	    list(name = paste0("\\name{", name, "}"),
-#                 version = "\\Rdversion{1.1}",
-    	         aliases = paste0("\\alias{", name, "}"),
+#                version = "\\Rdversion{1.1}",
+    	         aliases = c(paste0("\\alias{", name, "}"),
+                             c(paste0("\\alias{", package, "}"))),
     	         docType = "\\docType{package}",
     	         title = c("\\title{", "}"),
     	         description = c("\\description{","}"),
@@ -356,59 +354,32 @@ function(package, lib.loc = NULL, filename = NULL, name = NULL, final = FALSE)
     	         keywords = c("\\keyword{ package }")
     	     )
 
-    desc <- packageDescription(package, lib.loc)
-
-    if (length(desc) > 1) {
-    	info <- library(help = package, lib.loc = lib.loc,
-                        character.only = TRUE)
-
-    	if (!length(grep(paste0("^", package, " "), info$info[[2L]])))
-    	    Rdtxt$aliases <- c(Rdtxt$aliases, paste0("\\alias{", package, "}"))
-
-        insert1("title", desc$Title)
-	insert1("description", desc$Description)
-	insert1("author", c(desc$Author, "",
-                            paste(identity("Maintainer:"),desc$Maintainer)))
-
-	desc <- desc[!(names(desc) %in%
-                       c("Title", "Description", "Author", "Maintainer"))]
-
-	insert1("details", tabular(paste0(names(desc), ":"), unlist(desc)))
-
-	if (!is.null(info$info[[2L]]))
-	    insert1("details",  c("", identity("Index:"), "\\preformatted{",
-	                          info$info[[2L]], "}"))
-	if (!is.null(info$info[[3L]]))
-	    insert1("details",
-                    c("",
-        identity("Further information is available in the following vignettes:"),
-                      tabular(paste0("\\code{", info$info[[3L]][,1], "}"),
-                              info$info[[3L]][,2])))
-    }
+    insert1("title", paste0("\\packageTitle{", package,"}"))
+    insert1("description", paste0("\\packageDescription{", package,"}"))
+    insert1("author", c(paste0("\\packageAuthor{", package,"}"), "",
+			paste("Maintainer:",paste0("\\packageMaintainer{", package,"}"))))
+    insert1("details", c("", "The DESCRIPTION file:"))
+    insert1("details", paste0("\\packageDESCRIPTION{", package, "}"))
+    insert1("details", paste0("\\packageIndices{", package, "}"))
 
     if (!final) {
-        insert2("title", identity("package title"))
-        insert2("description",
-                identity("A concise (1-5 lines) description of the package"))
-        insert2("details",
-                strwrap(identity("An overview of how to use the package, including the most important functions")))
-        insert2("author",
-                identity("The author and/or maintainer of the package"))
+        insert2("details", strwrap(
+	 "An overview of how to use the package, including the most important functions"))
         Rdtxt$references <-
             c("\\references{",
               paste("~~",
-                    identity("Literature or other references for background information"),
+                    "Literature or other references for background information",
                     "~~"),
               "}")
         Rdtxt$seealso <- c("\\seealso{", "}")
         insert2("seealso",
-                c(identity("Optional links to other man pages, e.g."),
+                c("Optional links to other man pages, e.g.",
                   "\\code{\\link[<pkg>:<pkg>-package]{<pkg>}}"))
         Rdtxt$examples <- c("\\examples{","}")
         insert2("examples",
-                identity("simple examples of the most important functions"))
+                "simple examples of the most important functions")
         insert2("keywords",
-                strwrap(identity("Optionally other standard keywords, one per line, from file KEYWORDS in the R documentation directory")))
+                strwrap("Optionally other standard keywords, one per line, from file KEYWORDS in the R documentation directory"))
     }
 
     if(is.na(filename)) return(Rdtxt)
@@ -423,7 +394,7 @@ function(package, lib.loc = NULL, filename = NULL, name = NULL, final = FALSE)
     invisible(filename)
 }
 
-promptImport <- function(object, filename = NULL, name = NULL, importedFrom = NULL, 
+promptImport <- function(object, filename = NULL, name = NULL, importedFrom = NULL,
                          importPage = name, ...)
 {
     if(missing(name))
@@ -434,38 +405,41 @@ promptImport <- function(object, filename = NULL, name = NULL, importedFrom = NU
                 name <- substitute(object)
                 if(is.name(name))
                     as.character(name)
-                else if (is.language(name) && length(name) == 3 && identical(name[[1]], as.name("::")))
+                else if (is.language(name) && length(name) == 3 &&
+                         identical(name[[1]], as.name("::")))
                     as.character(name[[3]])
                 else
                     stop("cannot determine a usable name")
             }
     if(is.null(filename))
         filename <- paste0(name, ".Rd")
-       
+
     x <- if(!missing(object))
         object
     else {
         ## Better than get(); works when called in fun :
         x <- get(name, envir = parent.frame())
     }
-    
+
     if(is.null(importedFrom)) {
 	if (is.function(x))
 	    importedFrom <- getNamespaceName(environment(x))
 	else
 	    stop("cannot determine import name")
     }
-    
+
     Rdtxt <-
         list(name = paste0("\\name{", name, "}"),
              aliases = paste0("\\alias{", name, "}"),
              docType = "\\docType{import}",
              title = paste0("\\title{Import from package \\pkg{", importedFrom, "}}"),
-             description = c("\\description{",
-               paste0("The \\code{", name, "} object is imported from package \\pkg{", importedFrom, "}."),
-               paste0("Help is available here:  \\code{\\link[", importedFrom, ":", importPage, "]{", 
-                      importedFrom, "::", importPage, "}}."),
-               "}"))
+             description =
+                 c("\\description{",
+                   paste0("The \\code{", name, "} object is imported from package \\pkg{",
+                          importedFrom, "}."),
+                   paste0("Help is available here:  \\code{\\link[", importedFrom, ":",
+                          importPage, "]{", importedFrom, "::", importPage, "}}."),
+                   "}"))
 
     if(is.na(filename)) return(Rdtxt)
 
@@ -474,6 +448,6 @@ promptImport <- function(object, filename = NULL, name = NULL, importedFrom = NU
     message(gettextf("Created file named %s.", sQuote(filename)),
             "\n",
             gettext("Edit the file and move it to the appropriate directory."),
-            domain = NA)    
+            domain = NA)
 }
 
diff --git a/src/library/utils/R/question.R b/src/library/utils/R/question.R
index 3923c2c..e3e15f9 100644
--- a/src/library/utils/R/question.R
+++ b/src/library/utils/R/question.R
@@ -1,7 +1,7 @@
 #  File src/library/utils/R/question.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
-#  Copyright (C) 1995-2012 The R Core Team
+#  Copyright (C) 1995-2014 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
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 `?` <-
 function(e1, e2)
@@ -33,7 +33,7 @@ function(e1, e2)
 	    is.call(te <- topicExpr[[2L]]) && te[[1L]] == "?") {
 	    cat("Contacting Delphi...")
 	    flush.console()
-	    Sys.sleep(2+rpois(1,2))
+	    Sys.sleep(2 + stats::rpois(1,2))
 	    cat("the oracle is unavailable.\nWe apologize for any inconvenience.\n")
 	    return(invisible())
 	}
@@ -136,39 +136,8 @@ function(expr, envir, doEval = TRUE)
         }
         else
             fdef <- methods::getGeneric(f, where = where)
-        args <- formals(fdef)
-        call <- match.call(fdef, expr, expand.dots=FALSE)
-        args[names(call[-1L])] <- call[-1L]
-        if ("..." %in% names(call))
-            args$... <- args$...[[1L]]        
-        ## make the signature
-        sigNames <- fdef at signature
-        sigClasses <- rep.int("missing", length(sigNames))
-        names(sigClasses) <- sigNames
-        for(arg in sigNames) {
-            argExpr <- methods::elNamed(args, arg)
-            if(!missing(argExpr) && !is.null(argExpr)) {
-                simple <- (is.character(argExpr) || is.name(argExpr))
-                ## TODO:  ideally, if doEval is TRUE, we would like to
-                ## create the same context used by applyClosure in
-                ## eval.c, but then skip the actual evaluation of the
-                ## body.  If we could create this environment then
-                ## passing it to selectMethod is closer to the semantics
-                ## of the "real" function call than the code below.
-                ## But, seems to need a change to eval.c and a flag to
-                ## the evaluator.
-                if(doEval || !simple) {
-                    argVal <- try(eval(argExpr, envir))
-                    if(methods::is(argVal, "try-error"))
-                        stop(gettextf("error in trying to evaluate the expression for argument %s (%s)",
-                                      sQuote(arg), deparse(argExpr)),
-                             domain = NA)
-                    sigClasses[[arg]] <- class(argVal)[1L]
-                }
-                else
-                    sigClasses[[arg]] <- as.character(argExpr)
-            }
-        }
+        sigClasses <- .signatureFromCall(fdef, expr, envir, doEval)
+        sigNames <- names(sigClasses)
         method <- methods::selectMethod(f, sigClasses, optional=TRUE,
                                         fdef = fdef)
         if(methods::is(method, "MethodDefinition")) {
diff --git a/src/library/utils/R/read.DIF.R b/src/library/utils/R/read.DIF.R
index 3334971..eac3d3a 100644
--- a/src/library/utils/R/read.DIF.R
+++ b/src/library/utils/R/read.DIF.R
@@ -1,5 +1,5 @@
 #  File src/library/utils/R/read.DIF.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
 #  Copyright (C) 1995-2014 The R Core Team
 #
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 read.DIF <- function(file, header = FALSE, dec = ".",
 	 numerals = c("allow.loss", "warn.loss", "no.loss"),
@@ -24,11 +24,16 @@ read.DIF <- function(file, header = FALSE, dec = ".",
          check.names = TRUE,
          blank.lines.skip = TRUE,
          stringsAsFactors = default.stringsAsFactors(),
-	 transpose = FALSE)
+	 transpose = FALSE, fileEncoding = "")
 {
     if (.Platform$OS.type == "windows" && identical(file, "clipboard")) {
-	if (!(5 %in% getClipboardFormats(numeric=TRUE)) ) stop("No DIF data on clipboard")
+	if ( !(5 %in% getClipboardFormats(numeric = TRUE)) )
+            stop("No DIF data on clipboard")
 	lines <- readClipboard(5)
+    } else if(nzchar(fileEncoding)) {
+        con <- file(file, "rt", encoding = fileEncoding)
+        lines <- readLines(con)
+        close(con)
     } else {
 	lines <- readLines(file)
     }
@@ -115,7 +120,6 @@ read.DIF <- function(file, header = FALSE, dec = ".",
     first <- data[1L, ]
     if (first[1L] == "") first <- first[-1L]
 
-    col1 <- if(missing(col.names)) length(first) else length(col.names)
     cols <- ncol
 
     ##	basic column counting and header determination;
diff --git a/src/library/utils/R/read.fortran.R b/src/library/utils/R/read.fortran.R
index 5a6454a..ef94f6d 100644
--- a/src/library/utils/R/read.fortran.R
+++ b/src/library/utils/R/read.fortran.R
@@ -1,5 +1,5 @@
 #  File src/library/utils/R/read.fortran.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
 #  Copyright (C) 1995-2013 The R Core Team
 #
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 
 read.fortran <- function(file, format, ..., as.is = TRUE, colClasses = NA)
diff --git a/src/library/utils/R/read.fwf.R b/src/library/utils/R/read.fwf.R
index e413489..d4bdb69 100644
--- a/src/library/utils/R/read.fwf.R
+++ b/src/library/utils/R/read.fwf.R
@@ -1,7 +1,7 @@
 #  File src/library/utils/R/read.fwf.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
-#  Copyright (C) 1995-2012 The R Core Team
+#  Copyright (C) 1995-2014 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
@@ -14,11 +14,12 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 read.fwf <-
 function(file, widths, header = FALSE, sep = "\t",
-         skip = 0, row.names, col.names, n = -1, buffersize = 2000, ...)
+         skip = 0L, row.names, col.names, n = -1L, buffersize = 2000,
+         fileEncoding = "", ...)
 {
     doone <- function(x) {
         x <- substring(x, first, last)
@@ -40,20 +41,21 @@ function(file, widths, header = FALSE, sep = "\t",
     FILENAME <- tempfile("Rfwf.")
     on.exit(unlink(FILENAME))
     FILE <- file(FILENAME,"a")
-    on.exit(close(FILE),add=TRUE)
+    on.exit(close(FILE), add = TRUE)
 
     if (is.character(file)) {
-        file <- file(file, "rt")
-        on.exit(close(file), add=TRUE)
+        file <- if(nzchar(fileEncoding))
+            file(file, "rt", encoding = fileEncoding) else file(file, "rt")
+        on.exit(close(file), add = TRUE)
     } else if (!isOpen(file)) {
         open(file, "rt")
-        on.exit(close(file), add=TRUE)
+        on.exit(close(file), add = TRUE)
     }
 
-    if (skip) readLines(file, n=skip)
+    if (skip) readLines(file, n = skip)
     if (header) {
-        headerline <- readLines(file, n=1L)
-        cat(file=FILE, headerline, "\n")
+        headerline <- readLines(file, n = 1L)
+        cat(file = FILE, headerline, "\n")
     }
 
     repeat({
@@ -61,7 +63,7 @@ function(file, widths, header = FALSE, sep = "\t",
         if (n == -1L)
             thisblock <- buffersize
         else
-            thisblock <- min(buffersize,n*recordlength)
+            thisblock <- min(buffersize, n*recordlength)
 
         raw <- readLines(file, n = thisblock)
         nread <- length(raw)
@@ -73,15 +75,15 @@ function(file, widths, header = FALSE, sep = "\t",
                             nread %% recordlength), domain = NA)
         }
         if (recordlength > 1L) {
-            raw <- matrix(raw, nrow=recordlength)
-            raw <- apply(raw, 2L, paste, collapse="")
+            raw <- matrix(raw, nrow = recordlength)
+            raw <- apply(raw, 2L, paste, collapse = "")
         }
 
         st <- c(1L, 1L+cumsum(widths))
         first <- st[-length(st)][!drop]
         last <- cumsum(widths)[!drop]
         cat(file = FILE, sapply(raw, doone),
-            sep = c(rep_len(sep, length(first)-1L), "\n"))
+            sep = c(rep_len(sep, length(first) - 1L), "\n"))
 
         if (nread < thisblock) break
         if (n > 0L) n <- n - length(raw)
diff --git a/src/library/utils/R/readhttp.R b/src/library/utils/R/readhttp.R
index ffb9711..357e01a 100644
--- a/src/library/utils/R/readhttp.R
+++ b/src/library/utils/R/readhttp.R
@@ -1,5 +1,5 @@
 #  File src/library/utils/R/readhttp.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
 #  Copyright (C) 1995-2012 The R Core Team
 #
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 url.show <-
     function (url,  title = url, file = tempfile(),
diff --git a/src/library/utils/R/readtable.R b/src/library/utils/R/readtable.R
index 23e3625..33dce98 100644
--- a/src/library/utils/R/readtable.R
+++ b/src/library/utils/R/readtable.R
@@ -1,5 +1,5 @@
 #  File src/library/utils/R/readtable.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
 #  Copyright (C) 1995-2014 The R Core Team
 #
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 count.fields <-
 function(file, sep = "", quote = "\"'", skip = 0,
@@ -139,18 +139,17 @@ function(file, header = FALSE, sep = "", quote = "\"'", dec = ".",
     if (rlabp) col.names <- c("row.names", col.names)
 
     nmColClasses <- names(colClasses)
-    if(length(colClasses) < cols)
-        if(is.null(nmColClasses)) {
-            colClasses <- rep_len(colClasses, cols)
-        } else {
-            tmp <- rep_len(NA_character_, cols)
-            names(tmp) <- col.names
-            i <- match(nmColClasses, col.names, 0L)
-            if(any(i <= 0L))
-                warning("not all columns named in 'colClasses' exist")
-            tmp[ i[i > 0L] ] <- colClasses
-            colClasses <- tmp
-        }
+    if(is.null(nmColClasses)) {
+        if(length(colClasses) < cols) colClasses <- rep_len(colClasses, cols)
+    } else {
+        tmp <- rep_len(NA_character_, cols)
+        names(tmp) <- col.names
+        i <- match(nmColClasses, col.names, 0L)
+        if(any(i <= 0L))
+            warning("not all columns named in 'colClasses' exist")
+        tmp[ i[i > 0L] ] <- colClasses[i > 0L]
+        colClasses <- tmp
+    }
 
 
     ##	set up for the scan of the file.
diff --git a/src/library/utils/R/relist.R b/src/library/utils/R/relist.R
index 6cfeadc..b526fac 100644
--- a/src/library/utils/R/relist.R
+++ b/src/library/utils/R/relist.R
@@ -1,5 +1,5 @@
 #  File src/library/utils/R/relist.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
 #  Copyright (C) 1995-2013 The R Core Team
 #
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 # relist.R -- an inverse operator to unlist
 # written by Andrew Clausen <clausen at econ.upenn.edu> in 2007
diff --git a/src/library/utils/R/roman.R b/src/library/utils/R/roman.R
index 36008ee..a731fea 100644
--- a/src/library/utils/R/roman.R
+++ b/src/library/utils/R/roman.R
@@ -1,7 +1,7 @@
 #  File src/library/utils/R/roman.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
-#  Copyright (C) 1995-2012 The R Core Team
+#  Copyright (C) 1995-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
@@ -14,40 +14,38 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
-as.roman <-
-function(x)
+.as.roman <- function(x, check.range=TRUE)
 {
     if(is.numeric(x))
         x <- as.integer(x)
     else if(is.character(x)) {
-        ## Let's be nice: either strings that are *all* arabics, or
-        ## (hopefully, for the time being) all romans.
-        x <- if(all(grepl("^[[:digit:]]+$", x)))
-            as.integer(x)
-        else
-            .roman2numeric(x)
+	x <- if(all(dig.x <- !nzchar(x) | is.na(x) | grepl("^[[:digit:]]+$", x)))
+		 as.integer(x)
+	     else if(any(dig.x)) {
+		 r <- suppressWarnings(as.integer(x))# NAs for all non-dig
+		 r[!dig.x] <- .roman2numeric(x[!dig.x])
+		 r
+	     }
+	     else ## no digits -- assume all roman characters
+		 .roman2numeric(x)
     }
     else
         stop("cannot coerce 'x' to roman")
-    x[(x <= 0L | x >= 3900L)] <- NA
+    if(check.range) x[x <= 0L | x >= 3900L] <- NA
     class(x) <- "roman"
     x
 }
+as.roman <- function(x) .as.roman(x, check.range=TRUE)
 
-as.character.roman <-
-function(x, ...)
-    .numeric2roman(x)
+as.character.roman <- function(x, ...) .numeric2roman(x)
 
-format.roman <-
-function(x, ...)
-    format(as.character(x))
+format.roman <- function(x, ...) format(as.character.roman(x), ...)
 
-print.roman <-
-function(x, ...)
+print.roman <- function(x, ...)
 {
-    print(noquote(as.character(x)), ...)
+    print(noquote(as.character.roman(x)), ...)
     invisible(x)
 }
 
@@ -60,19 +58,40 @@ function(x, i)
     y
 }
 
+Ops.roman <- function(e1, e2)
+{
+    e1 <- .as.roman(e1, check.range=FALSE)
+    e2 <- .as.roman(e2, check.range=FALSE)
+    as.roman(NextMethod(.Generic))
+}
+
+## for recycling etc
+rep.roman <- function(x, ...) structure(rep(unclass(x), ...), class = class(x))
+
+## romans: used in both utility functions, and not unuseful in general:
+.romans <-
+    c(1000L, 900L, 500L, 400L, 100L, 90L, 50L, 40L, 10L, 9L, 5L,  4L, 1L)
+names(.romans) <-
+    c("M", "CM",  "D",  "CD", "C",  "XC", "L", "XL","X","IX","V","IV","I")
+## Can *not* use stats {dependency cycle at build time} -- hence need our own:
+## .setNames <- function (object = nm, nm) {
+##     names(object) <- nm
+##     object
+## }
+## .romans <- .setNames(
+##     c(1000L, 900L, 500L, 400L, 100L, 90L, 50L, 40L, 10L, 9L, 5L,  4L, 1L),
+##     c("M", "CM",  "D",  "CD", "C",  "XC", "L", "XL","X","IX","V","IV","I"))
+
 .numeric2roman <-
 function(x) {
-    romans <- c("M", "CM", "D", "CD", "C", "XC", "L", "XL", "X", "IX",
-                "V", "IV", "I")
-    numbers <- c(1000L, 900L, 500L, 400L, 100L, 90L, 50L, 40L, 10L, 9L,
-                 5L, 4L, 1L)
+    romaNs <- names(.romans)
     n2r <- function(z) {
         y <- character()
-        for(i in seq_along(romans)) {
-            d <- numbers[i]
+	for(i in seq_along(.romans)) {
+	    d <- .romans[[i]]
             while(z >= d) {
                 z <- z - d
-                y <- c(y, romans[i])
+                y <- c(y, romaNs[i])
             }
         }
         paste(y, collapse = "")
@@ -82,27 +101,16 @@ function(x) {
     x <- as.integer(x)
     ind <- is.na(x) | (x <= 0L) | (x >= 3900L)
     out[ind] <- NA
-    if(any(!ind))
-        out[!ind] <- sapply(x[!ind], n2r)
+    out[!ind] <- vapply(x[!ind], n2r, "")
     out
 }
 
-.roman2numeric <-
-function(x)
+.roman2numeric <- function(x)
 {
-    ## <FIXME>
-    ## What if this fails?
-    ## Should say something like "Not a valid roman number ..."
-    ## </FIXME>
-    romans <- c("M", "CM", "D", "CD", "C", "XC", "L", "XL", "X", "IX",
-                "V", "IV", "I")
-    numbers <- c(1000L, 900L, 500L, 400L, 100L, 90L, 50L, 40L, 10L, 9L,
-                 5L, 4L, 1L)
     out <- integer(length(x))
-    ind <- is.na(x)
-    out[ind] <- NA
-    if(any(!ind)) {
-        y <- toupper(x[!ind])
+    out[ina <- is.na(x) | !nzchar(x)] <- NA
+    if(any(ind <- !ina)) {
+        y <- toupper(x[ind])
         y <- gsub("CM", "DCCCC", y)
         y <- gsub("CD", "CCCC", y)
         y <- gsub("XC", "LXXXX", y)
@@ -114,15 +122,15 @@ function(x)
             warning(sprintf(ngettext(sum(!ok),
                                      "invalid roman numeral: %s",
                                      "invalid roman numerals: %s"),
-                            paste(x[!ind][!ok], collapse = " ")),
+                            paste(x[ind][!ok], collapse = " ")),
                     domain = NA)
-            out[!ind][!ok] <- NA
+            out[ind][!ok] <- NA
         }
-        if(any(ok))
-            out[!ind][ok] <-
-                sapply(strsplit(y[ok], ""),
-                       function(z)
-                       as.integer(sum(numbers[match(z, romans)])))
+	out[ind][ok] <-
+	    vapply(strsplit(y[ok], ""),
+		   function(z)
+		       as.integer(sum(.romans[match(z, names(.romans))])),
+		   integer(1L))
     }
     out
 }
diff --git a/src/library/utils/R/rtags.R b/src/library/utils/R/rtags.R
index fa25261..c372556 100644
--- a/src/library/utils/R/rtags.R
+++ b/src/library/utils/R/rtags.R
@@ -1,7 +1,7 @@
 #  File src/library/tools/R/rtags.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
-#  Copyright (C) 1995-2013 The R Core Team
+#  Copyright (C) 1995-2013, 2015 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
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 
 
@@ -23,7 +23,7 @@
 ### parser.  Support for vi-style tags could be useful, but it needs
 ### the tags file needs to be sorted, making file-by-file processing
 ### difficult. It may be easier to write a script to convert an etags
-### format file (see http://http://en.wikipedia.org/wiki/Ctags).
+### format file (see http://https://en.wikipedia.org/wiki/Ctags).
 
 
 
@@ -151,7 +151,7 @@ rtags.file <-
     startlines <- sapply(attr(elist, "srcref"), "[", 1L)
     if (length(tokens) != length(startlines))
         stop("length mismatch: bug in code!", domain = NA)
-    keep <- sapply(tokens, length) == 1L
+    keep <- lengths(tokens) == 1L
     if (!any(keep)) return(invisible())
     tokens <- unlist(tokens[keep])
     startlines <- startlines[keep]
@@ -180,7 +180,7 @@ rtags <-
              ofile = "", append = FALSE,
              verbose = getOption("verbose"))
 {
-    if (ofile != "" && !append) {
+    if (nzchar(ofile) && !append) {
         if (!file.create(ofile, showWarnings = FALSE))
             stop(gettextf("Could not create file %s, aborting", ofile),
                  domain = NA)
diff --git a/src/library/utils/R/sessionInfo.R b/src/library/utils/R/sessionInfo.R
index 833b2bf..bf3b817 100644
--- a/src/library/utils/R/sessionInfo.R
+++ b/src/library/utils/R/sessionInfo.R
@@ -1,7 +1,7 @@
 #  File src/library/utils/R/sessionInfo.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
-#  Copyright (C) 1995-2012 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
@@ -14,9 +14,9 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
-sessionInfo <- function(package=NULL)
+sessionInfo <- function(package = NULL)
 {
     z <- list()
     z$R.version <- R.Version()
@@ -25,12 +25,64 @@ sessionInfo <- function(package=NULL)
         z$platform <- paste(z$platform, .Platform$r_arch, sep = "/")
     z$platform <- paste0(z$platform, " (", 8*.Machine$sizeof.pointer, "-bit)")
     z$locale <- Sys.getlocale()
+    ## Now try to figure out the OS we are running under
+    if (.Platform$OS.type == "windows") {
+        z$running <- win.version()
+    } else if (nzchar(Sys.which('uname'))) { ## we could try /usr/bin/uname
+        uname <- system("uname -a", intern = TRUE)
+        os <- sub(" .*", "", uname)
+        z$running <-
+            switch(os,
+                   "Linux" = if(file.exists("/etc/os-release")) {
+    ## http://www.freedesktop.org/software/systemd/man/os-release.html
+                       tmp <- readLines("/etc/os-release")
+                       t2 <- if (any(startsWith(tmp, "PRETTY_NAME=")))
+                           sub("^PRETTY_NAME=", "",
+                               grep("^PRETTY_NAME=", tmp, value = TRUE)[1L])
+                       else if (any(startsWith(tmp, "NAME")))
+                           ## could check for VERSION or VERSION_ID
+                           sub("^NAME=", "",
+                               grep("^NAME=", tmp, value = TRUE)[1L])
+                       else "Linux (unknown distro)"
+                       sub('"(.*)"', "\\1", t2)
+                   } else if(file.exists("/etc/system-release")) {
+                       ## RHEL-like
+                       readLines("/etc/system-release")
+                   },
+                   "Darwin" = {
+                       ver <- readLines("/System/Library/CoreServices/SystemVersion.plist")
+                       ind <- grep("ProductUserVisibleVersion", ver)
+                       ver <- ver[ind + 1L]
+                       ver <- sub(".*<string>", "", ver)
+                       ver <- sub("</string>$", "", ver)
+                       ver1 <- strsplit(ver, ".", fixed = TRUE)[[1L]][2L]
+                       sprintf("%s %s %s",
+                               ifelse(as.numeric(ver1) < 12, "OS X", "macOS"),
+                               switch(ver1,
+                                      ## 10.6 is earliest that can be installed
+                                      "6" = "Snow Leopard",
+                                      "7" = "Lion",
+                                      "8" = "Mountain Lion",
+                                      "9" = "Mavericks",
+                                      "10" = "Yosemite",
+                                      "11" = "El Capitan",
+                                      "12" = "Sierra",
+                                      ""), ver)
+                   },
+                   "SunOS" = {
+                       ver <- system('uname -r', intern = TRUE)
+                       paste("Solaris",
+                             strsplit(ver, ".", fixed = TRUE)[[1L]][2L])
+                   },
+                   uname)
+    }
 
     if(is.null(package)){
         package <- grep("^package:", search(), value=TRUE)
         # weed out environments which are not really packages
-        keep <- sapply(package, function(x) x == "package:base" || !is.null(attr(as.environment(x), "path")))
-        package <- sub("^package:", "", package[keep])
+        keep <- vapply(package, function(x) x == "package:base"
+                       || !is.null(attr(as.environment(x), "path")), NA)
+        package <- .rmpkg(package[keep])
     }
 
     ## no need to re-encode given what we extract.
@@ -51,11 +103,15 @@ sessionInfo <- function(package=NULL)
         pkgDesc <- c(pkgDesc, lapply(loadedOnly, packageDescription))
         z$loadedOnly <- pkgDesc[loadedOnly]
     }
+    z$matprod <- as.character(options("matprod"))
+    es <- extSoftVersion()
+    z$BLAS <- as.character(es["BLAS"]) #drop name
+    z$LAPACK <- La_library()
     class(z) <- "sessionInfo"
     z
 }
 
-print.sessionInfo <- function(x, locale=TRUE, ...)
+print.sessionInfo <- function(x, locale = TRUE, ...)
 {
     mkLabel <- function(L, n) {
         vers <- sapply(L[[n]], function(x) x[["Version"]])
@@ -64,8 +120,22 @@ print.sessionInfo <- function(x, locale=TRUE, ...)
     }
 
     cat(x$R.version$version.string, "\n", sep = "")
-    cat("Platform: ", x$platform, "\n\n", sep = "")
-    if(locale){
+    cat("Platform: ", x$platform, "\n", sep = "")
+    if (!is.null(x$running)) cat("Running under: ",  x$running, "\n", sep = "")
+    cat("\n")
+    cat("Matrix products: ", x$matprod, "\n", sep = "")
+    blas <- x$BLAS
+    if (is.null(blas)) blas <- ""
+    lapack <- x$LAPACK
+    if (is.null(lapack)) lapack <- ""
+    if (blas == lapack && nzchar(blas))
+        cat("BLAS/LAPACK: ", blas, "\n", sep = "")
+    else {
+        if (nzchar(blas)) cat("BLAS: ", blas, "\n", sep = "")
+        if (nzchar(lapack)) cat("LAPACK: ", lapack, "\n", sep = "")
+    }
+    cat("\n")
+    if(locale) {
         cat("locale:\n")
 	print(strsplit(x$locale, ";", fixed=TRUE)[[1]], quote=FALSE, ...)
         cat("\n")
@@ -74,16 +144,16 @@ print.sessionInfo <- function(x, locale=TRUE, ...)
     print(x$basePkgs, quote=FALSE, ...)
     if(!is.null(x$otherPkgs)){
         cat("\nother attached packages:\n")
-	print(mkLabel(x, "otherPkgs"), quote=FALSE, ...)
+	print(mkLabel(x, "otherPkgs"), quote = FALSE, ...)
     }
     if(!is.null(x$loadedOnly)){
         cat("\nloaded via a namespace (and not attached):\n")
-	print(mkLabel(x, "loadedOnly"), quote=FALSE, ...)
+	print(mkLabel(x, "loadedOnly"), quote = FALSE, ...)
     }
     invisible(x)
 }
 
-toLatex.sessionInfo <- function(object, locale=TRUE, ...)
+toLatex.sessionInfo <- function(object, locale = TRUE, ...)
 {
     opkgver <- sapply(object$otherPkgs, function(x) x$Version)
     nspkgver <- sapply(object$loadedOnly, function(x) x$Version)
@@ -91,12 +161,31 @@ toLatex.sessionInfo <- function(object, locale=TRUE, ...)
            paste0("  \\item ", object$R.version$version.string,
                   ", \\verb|", object$R.version$platform, "|"))
 
-    if(locale){
+    if(locale) {
         z <- c(z,
                paste0("  \\item Locale: \\verb|",
                       gsub(";","|, \\\\verb|", object$locale) , "|"))
     }
 
+    z <- c(z,
+           paste0("  \\item Running under: \\verb|",
+                  gsub(";","|, \\\\verb|", object$running) , "|"))
+
+    z <- c(z, paste0("  \\item Matrix products: ", object$matprod))
+    blas <- object$BLAS
+    if (is.null(blas)) blas <- ""
+    lapack <- object$LAPACK
+    if (is.null(lapack)) lapack <- ""
+
+    if (blas == lapack && nzchar(blas))
+        z <- c(z, paste0("  \\item BLAS/LAPACK: \\verb|", blas, "|"))
+    else {
+        if (nzchar(blas))
+            z <- c(z, paste0("  \\item BLAS: \\verb|", blas, "|"))
+        if (nzchar(lapack))
+            z <- c(z, paste0("  \\item LAPACK: \\verb|", lapack, "|"))
+    }
+
     z <- c(z, strwrap(paste("\\item Base packages: ",
                          paste(sort(object$basePkgs), collapse = ", ")),
                       indent = 2, exdent = 4))
diff --git a/src/library/utils/R/sock.R b/src/library/utils/R/sock.R
index 7a9187f..7b2a116 100644
--- a/src/library/utils/R/sock.R
+++ b/src/library/utils/R/sock.R
@@ -1,5 +1,5 @@
 #  File src/library/utils/R/sock.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
 #  Copyright (C) 1995-2012 The R Core Team
 #
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 print.socket <- function(x, ...)
 {
diff --git a/src/library/utils/R/sourceutils.R b/src/library/utils/R/sourceutils.R
index 06ba027..18d4cb4 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, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
-#  Copyright (C) 1995-2013 The R Core Team
+#  Copyright (C) 1995-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
@@ -14,12 +14,11 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 removeSource <- function(fn) {
     stopifnot(is.function(fn))
     if (is.primitive(fn)) return(fn)
-    attr(fn, "source") <- NULL
     attr(fn, "srcref") <- NULL
     attr(body(fn), "wholeSrcref") <- NULL
     attr(body(fn), "srcfile") <- NULL
@@ -27,6 +26,8 @@ removeSource <- function(fn) {
     recurse <- function(part) {
         if (is.name(part)) return(part)  # handles missing arg, PR#15957
         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]])
@@ -156,10 +157,10 @@ getParseText <- function(parseData, id) {
     d <- parseData[as.character(id),]
     text <- d$text
     if (is.null(text)) {
-    	text <- character(nrow(text))
+    	text <- character(nrow(d))
     	blank <- seq_along(text)
     } else
-    	blank <- which(!nzchar(text))
+    	blank <- which(!nzchar(text) | (d$token == "STR_CONST" & startsWith(text, "[")))
     for (i in blank) {
 	lines <- getSrcLines(srcfile, d$line1[i], d$line2[i])
         n <- length(lines)
diff --git a/src/library/utils/R/str.R b/src/library/utils/R/str.R
index 2dec15f..9e9e808 100644
--- a/src/library/utils/R/str.R
+++ b/src/library/utils/R/str.R
@@ -1,7 +1,7 @@
 #  File src/library/utils/R/str.R
-#  Part of the R package, http://www.R-project.org
+#  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
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 ####------ str : show STRucture of an R object
 str <- function(object, ...) UseMethod("str")
@@ -54,15 +54,15 @@ str.Date <- str.POSIXt <- function(object, ...) {
     ## use 'give.length' when specified, else default = give.head
     if(length(larg <- list(...))) {
 	nl <- names(larg)
-	iGiveHead <- which(nl == "give.head")
+	which.head <- which(nl == "give.head")
 	if (any(Bgl <- nl == "give.length"))
 	    give.length <- larg[[which(Bgl)]]
-	else if(length(iGiveHead))
-	    give.length <- larg[[iGiveHead]]
-	if(length(iGiveHead)) # eliminate it from arg.list
-	    larg <- larg[ - iGiveHead ]
+	else if(length(which.head))
+	    give.length <- larg[[which.head]]
+	if(length(which.head)) # eliminate it from arg.list
+	    larg <- larg[ - which.head ]
 	if(is.numeric(larg[["nest.lev"]]) &&
-	   is.numeric(v.len <- larg[["vec.len"]])) # typical call from data.frame
+	   is.numeric(larg[["vec.len"]])) # typical call from data.frame
 	    ## reduce length for typical call:
 	    larg[["vec.len"]] <-
 		min(larg[["vec.len"]],
@@ -78,15 +78,18 @@ str.Date <- str.POSIXt <- function(object, ...) {
 }
 
 strOptions <- function(strict.width = "no", digits.d = 3, vec.len = 4,
+                       drop.deparse.attr = TRUE,
 		       formatNum = function(x, ...)
 		       format(x, trim=TRUE, drop0trailing=TRUE, ...))
     list(strict.width = strict.width, digits.d = digits.d, vec.len = vec.len,
+	 drop.deparse.attr = drop.deparse.attr,
 	 formatNum = match.fun(formatNum))
 
 str.default <-
     function(object, max.level = NA, vec.len = strO$vec.len,
 	     digits.d = strO$digits.d,
 	     nchar.max = 128, give.attr = TRUE,
+	     drop.deparse.attr = strO$drop.deparse.attr,
 	     give.head = TRUE, give.length = give.head,
 	     width = getOption("width"), nest.lev = 0,
 	     indent.str= paste(rep.int(" ", max(0,nest.lev+1)), collapse= ".."),
@@ -100,8 +103,9 @@ str.default <-
     ## ------------------------------------------------------------------------
     ## Author: Martin Maechler <maechler at stat.math.ethz.ch>	1990--1997
 
-    ## Get defaults for these
-    oDefs <- c("vec.len", "digits.d", "strict.width", "formatNum")
+    ## strOptions() defaults for
+    oDefs <- c("vec.len", "digits.d", "strict.width", "formatNum",
+	       "drop.deparse.attr")
     ## from
     strO <- getOption("str")
     if (!is.list(strO)) {
@@ -136,7 +140,7 @@ str.default <-
 	}
 	if(length(iLong <- which(nchar(ss) > width))) { ## cut hard
 	    sL <- ss[iLong]
-	    k <- as.integer(width-2)
+	    k <- as.integer(width-2L)
 	    if(any(i <- grepl("\"", substr(sL, k +1L, nchar(sL))))) {
 		## care *not* to cut off the closing   "  at end of
 		## string that's already truncated {-> maybe_truncate()} :
@@ -151,25 +155,32 @@ str.default <-
     }
 
     oo <- options(digits = digits.d); on.exit(options(oo))
-    le <- length(object)
+    le <- length(object)[1L] # [1]: protect from nonsense
     if(is.na(le)) {
         warning("'str.default': 'le' is NA, so taken as 0", immediate. = TRUE)
         le <- 0
         vec.len <- 0
     }
 
-    maybe_truncate <- function(x, e.x = x, Sep = "\"", ch = "| __truncated__")
+    ## x: character
+    maybe_truncate <- function(x, nx = nchar(x, type="w"), S = "\"", ch = "| __truncated__")
     {
-	trimmed <- strtrim(e.x, nchar.max)
-	ii <- trimmed != e.x
-	ii[is.na(ii)] <- FALSE
-	if(any(ii)) x[ii] <- paste0(trimmed[ii], Sep, ch)
+	ok <- if(anyNA(nx)) !is.na(nx) else TRUE
+	if(any(lrg <- ok & nx > nchar.max)) {
+	    nc <- nchar(ch <- paste0(S, ch))
+	    if(nchar.max <= nc)
+		stop(gettextf("'nchar.max = %d' is too small", nchar.max), domain=NA)
+	    x.lrg <- x[lrg]
+	    tr.x <- strtrim(x.lrg, nchar.max - nc)
+	    if(any(ii <- tr.x != x.lrg & paste0(tr.x, S) != x.lrg)) {
+		x[lrg][ii] <- paste0(tr.x[ii], ch)
+	    }
+	}
 	x
     }
     pClass <- function(cls)
 	paste0("Class", if(length(cls) > 1) "es",
 	       " '", paste(cls, collapse = "', '"), "' ")
-    `%w/o%` <- function(x,y) x[is.na(match(x,y))]
 
     nfS <- names(fStr <- formals())# names of all formal args to str.default()
     ##' Purpose: using short strSub() calls instead of long str() ones
@@ -178,15 +189,13 @@ str.default <-
     ##' @param ... further arguments to str(), [often str.default()]
     strSub <- function(obj, ...) {
 	## 'give.length', ...etc are *not* automatically passed down:
-	nf <- nfS %w/o% c("object", "give.length", "comp.str", "no.list",
-			  ## drop fn.name & "obj" :
-			  names(match.call())[-(1:2)], "...")
+	nf <- setdiff(nfS, c("object", "give.length", "comp.str", "no.list",
+			     ## drop fn.name & "obj" :
+			     names(match.call())[-(1:2)], "..."))
 	aList <- as.list(fStr)[nf]
 	aList[] <- lapply(nf, function(n) eval(as.name(n)))
-	## do.call(str, c(list(object=obj), aList, list(...)), quote=TRUE)
-	## ensuring 'obj' is *not* copied:
-	strObj <- function(...) str(obj, ...)
-	do.call(strObj, c(aList, list(...)), quote = TRUE)
+	## do.call(str, c(list(object=obj),aList,list(...)), quote=TRUE), *not* copying 'obj'
+	do.call(function(...) str(obj, ...), c(aList, list(...)), quote = TRUE)
     }
 
     ## le.str: not used for arrays:
@@ -203,12 +212,22 @@ str.default <-
     has.class <- S4 || !is.null(cl) # S3 or S4
     mod <- ""; char.like <- FALSE
     if(give.attr) a <- attributes(object)#-- save for later...
-    deParse <- function(.) deparse(., width.cutoff = min(500,max(20, width-10)))
-
+    dCtrl <- eval(formals(deparse)$control)
+    if(drop.deparse.attr) dCtrl <- dCtrl[dCtrl != "showAttributes"]
+    deParse <- function(.) deparse(., width.cutoff = min(500L, max(20L, width-10L)),
+				   control = dCtrl)
+    n.of. <- function(n, singl, plural) paste(n, ngettext(n, singl, plural))
+    n.of <- function(n, noun) n.of.(n, noun, paste0(noun,"s"))
+    if(is.ts <- stats::is.ts(object))
+        str1.ts <- function(o, lestr) {
+            tsp.a <- stats::tsp(o)
+            paste0(" Time-Series ", lestr, " from ", format(tsp.a[1L]),
+                   " to ", format(tsp.a[2L]), ":")
+        }
     if (is.null(object))
 	cat(" NULL\n")
     else if(S4) {
-	if(isRef <- is(object,"envRefClass")) {
+	if(methods::is(object,"envRefClass")) {
 	    cld <- tryCatch(object$getClass(), error=function(e)e)
 	    if(inherits(cld, "error")) {
 		cat("Prototypical reference class", " '", paste(cl, collapse = "', '"),
@@ -217,47 +236,41 @@ str.default <-
 		return(invisible())
 	    }
 	    nFlds <- names(cld at fieldClasses)
-	    a <- sapply(nFlds, function(ch) object[[ch]],
-			simplify = FALSE)
-	    meths <- ls(cld at refMethods, all.names = TRUE)
-	    dfltMs <- ls(getClassDef("envRefClass")@refMethods, all.names = TRUE)
-	    oMeths <- meths[is.na(match(meths, dfltMs))]
-	    sNms <- names(cld at slots)
-	    if(length(sNms <- sNms[sNms != ".xData"]))
-		sls <- sapply(sNms, methods::slot,
-			      object=object, simplify = FALSE)
+	    a <- sapply(nFlds, function(ch) object[[ch]], simplify = FALSE)
 	    cat("Reference class", " '", paste(cl, collapse = "', '"),
 		"' [package \"", attr(cl,"package"), "\"] with ",
-		length(a)," fields\n", sep = "")
-	} else {
-	    a <- sapply(methods::.slotNames(object), methods::slot,
-			object=object, simplify = FALSE)
-	    cat("Formal class", " '", paste(cl, collapse = "', '"),
-		"' [package \"", attr(cl,"package"), "\"] with ",
-		length(a), ifelse(length(a) > 1L, " slots\n", " slot\n"),
-                sep = "")
-	}
-	if(isRef) {
+                n.of(length(a), "field"), "\n", sep = "")
 	    strSub(a, no.list=TRUE, give.length=give.length,
 		   nest.lev = nest.lev + 1)
-	    cat(indent.str, "and ", length(meths), " methods,", sep = "")
-	    if(length(oMeths)) {
-		cat(" of which", length(oMeths), "are possibly relevant")
+	    meths <- names(cld at refMethods)
+	    oMeths <- meths[is.na(match(meths, methods:::envRefMethodNames))]
+	    cat(indent.str, "and ", n.of(length(meths), "method"), sep = "")
+	    sNms <- names(cld at slots)
+	    if(lo <- length(oMeths)) {
+		cat(", of which", lo, ngettext(lo, "is", "are", domain = NA), " possibly relevant")
 		if (is.na(max.level) || nest.lev < max.level)
 		    cat(":",
-			strwrap(paste(oMeths, collapse=", "),
+			strwrap(paste(sort(oMeths), collapse=", "),
 				indent = 2, exdent = 2,
 				prefix = indent.str, width=width),# exdent = nind),
 			sep = "\n")
 		else cat("\n")
 	    }
-	    if(length(sNms)) {
-		cat(" and", length(sNms), "slots\n")
+	    if(length(sNms <- sNms[sNms != ".xData"])) {
+		sls <- sapply(sNms, methods::slot,
+			      object=object, simplify = FALSE)
+		cat(" and ", n.of(length(sNms), "slot"), "\n", sep="")
 		strSub(sls, comp.str = "@ ", no.list=TRUE, give.length=give.length,
 		       indent.str = paste(indent.str,".."), nest.lev = nest.lev + 1)
 	    }
+	    else if(lo == 0) cat(".\n")
 	}
-	else { ## S4
+	else { ## S4 non-envRefClass
+	    a <- sapply(methods::.slotNames(object), methods::slot,
+			object=object, simplify = FALSE)
+	    cat("Formal class", " '", paste(cl, collapse = "', '"),
+		"' [package \"", attr(cl,"package"), "\"] with ",
+		n.of(length(a), "slot"), "\n", sep = "")
 	    strSub(a, comp.str = "@ ", no.list=TRUE, give.length=give.length,
 		   indent.str = paste(indent.str,".."), nest.lev = nest.lev + 1)
 	}
@@ -280,7 +293,7 @@ str.default <-
 		std.attr <- c(std.attr, "class")
 	    }
 	    if(no.list || (has.class &&
-			   any(sapply(paste("str", cl, sep = "."),
+			   any(sapply(paste0("str.", cl),
 					#use sys.function(.) ..
 				      function(ob)exists(ob, mode= "function",
 							 inherits= TRUE))))) {
@@ -309,20 +322,20 @@ str.default <-
                            nest.lev = nest.lev + 1,
                            indent.str = paste(indent.str,".."))
 		}
+		if(list.len < le)
+		    cat(indent.str, "[list output truncated]\n")
 	    }
-	    if(list.len < le)
-		cat(indent.str, "[list output truncated]\n")
 	}
     } else { #- not function, not list
 	if(is.vector(object)
 	   || (is.array(object) && is.atomic(object))
-           ## FIXME: is.vector is not documented to allow those modes.
-           ## Should this not be is.language?
-	   || is.vector(object, mode= "language")
-	   || is.vector(object, mode= "symbol")## R bug(<=0.50-a4) should be part
+	   ##f fails for formula:
+	   ##f typeof(object) in {"symbol", "language"} =: is.symbolic(.):
+	   ##f || (is.language(object) && !is.expression(object))
+	   || (is.language(object) && !is.expression(object) && !any(cl == "formula"))
 	   ) { ##-- Splus: FALSE for 'named vectors'
 	    if(is.atomic(object)) {
-		##-- atomic:   numeric	complex	 character  logical
+		##-- atomic:   numeric{dbl|int} complex character logical raw
 		mod <- substr(mode(object), 1, 4)
 		if     (mod == "nume")
 		    mod <- if(is.integer(object)) "int"
@@ -336,19 +349,23 @@ str.default <-
 		    pDi <- function(...) paste(c("[", ..., "]"), collapse = "")
 		    le.str <- (if(rnk == 1) pDi(di[1L], "(1d)") else
 			       pDi(paste0(di[-rnk], ", "), di[rnk]))
-		    std.attr <- "dim" #- "names"
+		    if(m <- match("AsIs", cl, 0L)) ## workaround bad format.AsIs()
+			oldClass(object) <- cl[-m]
+                    std.attr <- c("dim", if(is.ts) c("tsp", "class"))
 		} else if(!is.null(names(object))) {
 		    mod <- paste("Named", mod)
 		    std.attr <- std.attr[std.attr != "names"]
 		}
-		if(has.class && length(cl) == 1) {
-		    if(cl != mod && substr(cl, 1,nchar(mod)) != mod)
+		if(has.class) {
+		    cl <- cl[1L] # and "forget" potential other classes
+		    if(cl != mod && substr(cl, 1L, nchar(mod)) != mod)
 			mod <- paste0("'",cl,"' ", mod)
 		    ## don't show the class *twice*
 		    std.attr <- c(std.attr, "class")
 		}
 		str1 <-
-		    if(le == 1 && !is.array(object)) paste(NULL, mod)
+		    if(is.ts) str1.ts(object, le.str)
+		    else if(le == 1 && !is.array(object)) paste(NULL, mod)
 		    else paste0(" ", mod, if(le>0)" ", le.str)
 	    } else { ##-- not atomic, but vector: #
 		mod <- typeof(object)#-- typeof(.) is more precise than mode!
@@ -365,27 +382,8 @@ str.default <-
 			       paste("		#>#>", mod, NULL)
 			       )
 	    }
-#  These are S-PLUS classes not found in R.
-#	} else if (inherits(object,"rts") || inherits(object,"cts")
-#		   || inherits(object,"its")) {
-#	    tsp.a <- tspar(object)
-#	    t.cl <- cl[b.ts <- substring(cl,2,3) == "ts"] # "rts" "cts" or "its"
-#	    ts.kind <- switch(t.cl,
-#			      rts="Regular", cts="Calendar", its="Irregular")
-#	    ## from  print.summary.ts(.) :
-#	    pars <- unlist(sapply(summary(object)$ pars, format,
-#				  nsmall=0, digits=digits.d, justify = "none"))
-#	    if(length(pars)>=4) pars <- pars[-3]
-#	    pars <- paste(abbreviate(names(pars),min=2), pars,
-#			  sep= "=", collapse=", ")
-#	    str1 <- paste0(ts.kind, " Time-Series ", le.str, " ", pars, ":")
-#	    v.len <- switch(t.cl,rts=.8, cts=.6, its=.9) * v.len
-#	    class(object) <- if(any(!b.ts)) cl[!b.ts]
-#	    std.attr <- c(std.attr, "tspar")
-	} else if(stats::is.ts(object)) {
-	    tsp.a <- stats::tsp(object)
-	    str1 <- paste0(" Time-Series ", le.str, " from ", format(tsp.a[1L]),
-			   " to ", format(tsp.a[2L]), ":")
+	} else if(is.ts) {
+	    str1 <- str1.ts(object, le.str)
 	    std.attr <- c("tsp","class") #- "names"
 	} else if (is.factor(object)) {
 	    nl <- length(lev.att <- levels(object))
@@ -420,7 +418,7 @@ str.default <-
 
 	    std.attr <- c("levels", "class")
 	} else if(typeof(object) %in%
-		  c("externalptr", "weakref", "environment")) {
+		  c("externalptr", "weakref", "environment", "bytecode")) {
 	    ## Careful here, we don't want to change pointer objects
 	    if(has.class)
                 cat(pClass(cl))
@@ -474,6 +472,7 @@ str.default <-
 	    ##-- has.class superfluous --
 	    mod <- mode(object)
 	    give.mode <- FALSE
+            trimEnds <- function(ch) sub(" +$", '', sub("^ +", ' ', ch))
 	    if (any(mod == c("call", "language", "(", "symbol"))
 		|| is.environment(object)) {
 		##give.mode <- !is.vector(object)# then it has not yet been done
@@ -482,20 +481,19 @@ str.default <-
 		object <- deParse(object)
 
 		le <- length(object) # is > 1 e.g. for {A;B} language
-		format.fun <- function(x)x
+		format.fun <- function(x) x
 		v.len <- round(.5 * v.len)
 		if(le > 1 && typ=="language" && object[1L] == "{" && object[le]=="}") {
 		    v.len <- v.len + 2
 		    if(le >= 3) {
 			object <- c(object[1L],
-				    paste(sub("^ +", " ", object[2:(le-1)]),
-					  collapse = ";"),
+				    paste(trimEnds(object[2:(le-1)]), collapse = ";"),
 				    object[le])
 			le <- length(object)
 		    }
 		}
 	    } else if (mod == "expression") {
-		format.fun <- function(x) deParse(as.expression(x))
+		format.fun <- function(x) trimEnds(deParse(as.expression(x)))
 		v.len <- round(.75 * v.len)
 	    } else if (mod == "name"){
 		object <- paste(object)#-- show `as' char
@@ -537,29 +535,40 @@ str.default <-
 
 	if(char.like) {
 	    ## if object is very long, drop the rest which won't be used anyway:
-	    max.len <- max(100, width %/% 3 + 1, if(!missing(vec.len)) vec.len)
-	    if(le > max.len) object <- object[seq_len(max.len)]
-	    encObj <- encodeString(object, quote= '"', na.encode= FALSE)
-					#O: encodeString(object)
+	    max.len <- max(100L, width %/% 3L + 1L, if(!missing(vec.len)) vec.len)
+	    if(le > max.len) le <- length(object <- object[seq_len(max.len)])
+	    ## For very long strings, truncated later anyway,
+	    ## both nchar(*, type="w") and encodeString() are too expensive
+	    trimWidth <- as.integer(nchar.max)
+	    ## FIXME: need combined  encode.and.trim.string(object, m)  with O(m) !
+	    encObj <- tryCatch(strtrim(object, trimWidth), error=function(e) NULL)
+	    encObj <-
+		if(is.null(encObj)) # must first encodeString() before we can trim
+		    strtrim(encodeString(object, quote= '"', na.encode= FALSE),
+			    trimWidth)
+		else
+		    encodeString(encObj, quote= '"', na.encode= FALSE)
+	    if(le > 0) ## truncate if LONG char:
+		encObj <- maybe_truncate(encObj)
 	    v.len <-
 		if(missing(vec.len)) {
-		    max(1,sum(cumsum(3 + if(le>0) nchar(encObj, type="w") else 0) <
+		    max(1,sum(cumsum(1 + if(le>0) nchar(encObj, type="w") else 0) <
 			      width - (4 + 5*nest.lev + nchar(str1, type="w"))))
 		}		      # '5*ne..' above is fudge factor
 		else round(v.len)
 	    ile <- min(le, v.len)
-	    if(ile >= 1) ## truncate if LONG char:
-		object <- maybe_truncate(encObj[seq_len(ile)])
-					#O: encodeString(object, quote= '"', na.encode= FALSE)
-	    formObj <- function(x) paste(as.character(x), collapse=" ")
+	    if(ile >= 1)
+		object <- encObj[seq_len(ile)]
+	    formObj <- function(x) paste(as.character(x), collapse = " ")
 	}
-	else {
-	    if(!exists("format.fun", inherits=TRUE)) #-- define one --
+	else { # not char.like
+	    if(!exists("format.fun"))
 		format.fun <-
 		    if(mod == "num" || mod == "cplx") format else as.character
 	    ## v.len <- max(1,round(v.len))
 	    ile <- min(v.len, le)
-	    formObj <- function(x) paste(format.fun(x), collapse = " ")
+	    formObj <- function(x) maybe_truncate(paste(format.fun(x), collapse = " "),
+						  S = "") # *not* string-like
 	}
 
 	cat(if(give.head) paste0(str1, " "),
@@ -613,7 +622,7 @@ print.ls_str <- function(x, max.level = 1, give.attr = FALSE,
         args$digits.d <- NULL
     }
     strargs <- c(list(max.level = max.level, give.attr = give.attr,
-                      digits = digits), args)
+                      digits.d = digits), args)
     for(nam in x) {
 	cat(nam, ": ")
 	## check missingness, e.g. inside debug(.) :
diff --git a/src/library/utils/R/strcapture.R b/src/library/utils/R/strcapture.R
new file mode 100644
index 0000000..4d563b8
--- /dev/null
+++ b/src/library/utils/R/strcapture.R
@@ -0,0 +1,53 @@
+##  File src/library/utils/R/strcapture.R
+##  Part of the R package, https://www.R-project.org
+##
+##  Copyright (C) 1995-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
+##  the Free Software Foundation; either version 2 of the License, or
+##  (at your option) any later version.
+##
+##  This program is distributed in the hope that it will be useful,
+##  but WITHOUT ANY WARRANTY; without even the implied warranty of
+##  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+##  GNU General Public License for more details.
+##
+##  A copy of the GNU General Public License is available at
+##  https://www.R-project.org/Licenses/
+
+strcapture <- function(pattern, x, proto, perl = FALSE, useBytes = FALSE) {
+    m <- regexec(pattern, x, perl=perl, useBytes=useBytes)
+    str <- regmatches(x, m)
+    ntokens <- length(proto) + 1L
+    nomatch <- lengths(str) == 0L
+    str[nomatch] <- list(rep(NA_character_, ntokens))
+    if (length(str) > 0L && length(str[[1L]]) != ntokens) {
+### FIXME: this will not always detect an error when there are no matches
+        stop("The number of captures in 'pattern' != 'length(proto)'")
+    }
+    mat <- matrix(as.character(unlist(str)), ncol=ntokens,
+                  byrow=TRUE)[,-1L,drop=FALSE]
+    ans <- lapply(seq_along(proto), function(i) {
+                      if (isS4(proto[[i]])) {
+                          methods::as(mat[,i], class(proto[[i]]))
+                      } else {
+                          fun <- match.fun(paste0("as.", class(proto[[i]])))
+                          fun(mat[,i])
+                      }
+                  })
+    names(ans) <- names(proto)
+    if (isS4(proto)) {
+        methods::as(ans, class(proto))
+    } else {
+        as.data.frame(ans, optional=TRUE, stringsAsFactors=FALSE)
+    }
+}
+
+## Not yet exported
+strextract <- function(pattern, x, perl = FALSE, useBytes = FALSE) {
+    m <- regexec(pattern, x, perl=perl, useBytes=useBytes)
+    unlist(regmatches(x, m))
+}
+
+### TODO: strslice(), like strcapture() but based on strsplit().
diff --git a/src/library/utils/R/summRprof.R b/src/library/utils/R/summRprof.R
index bcc8945..f661eb1 100644
--- a/src/library/utils/R/summRprof.R
+++ b/src/library/utils/R/summRprof.R
@@ -1,7 +1,7 @@
 #  File src/library/utils/R/summRprof.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
-#  Copyright (C) 1995-2013 The R Core Team
+#  Copyright (C) 1995-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
@@ -14,14 +14,14 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 # The profile file always starts with a single header line followed by stack lines
 #   If the header contains "memory profiling", the stack lines have memory info
 #     The memory info is a fixed width prefix on each line of the form :[0-9]+:[0-9]+:[0-9]+:[0-9]+:
-#   If the header contains "line profiling", there will be filename lines and stack lines will contain 
+#   If the header contains "line profiling", there will be filename lines and stack lines will contain
 #     line number info of the form [0-9]+#[0-9]+
-#   The filename lines will start #File [0-9]+: 
+#   The filename lines will start #File [0-9]+:
 
 summaryRprof <-
     function(filename = "Rprof.out", chunksize = 5000,
@@ -65,7 +65,7 @@ summaryRprof <-
     repeat({
 
        chunk <- readLines(con, n = chunksize)
- 
+
        if (line.profiling) {
        	   filenamelines <- grep("^#File [0-9]+: ", chunk)
        	   if (length(filenamelines)) {
@@ -78,24 +78,28 @@ summaryRprof <-
        	   	        tail <- basename(dirnames)
        	   	    	filenames[fnum] <- ifelse(tail == ".", filenames[fnum],
        	   	    	                          paste0(tail, "/", filenames[fnum]))
-       	   	    	dirnames <- dirname(dirnames)
+       	   	    	# May have Windows-style names here where dirname("c:/") == "c:/"
+       	   	    	parent <- dirname(dirnames)
+       	   	    	dirnames <- ifelse(dirnames == parent, ".", parent)
        	   	    }
        	   	}
        	   	chunk <- chunk[-filenamelines]
        	   }
        }
-       
+
        if (length(chunk) == 0L)
            break
-       	       
+
        if (memory.profiling) {
            memprefix <- attr(regexpr(":[0-9]+:[0-9]+:[0-9]+:[0-9]+:", chunk), "match.length")
            if (memory == "both") {
                memstuff <- substr(chunk, 2L, memprefix-1L)
                memcounts <- pmax(apply(sapply(strsplit(memstuff, ":"), as.numeric), 1, diff), 0)
+	       if (!is.matrix(memcounts)) # Need a matrix result (PR#16395)
+	           memcounts <- matrix(memcounts, nrow = 1)
                ##  memcounts <- c(0, rowSums(memcounts[, 1L:3L]))
                ## convert to bytes.
-               memcounts <- c(0, rowSums(cbind(memcounts[, 1L:2L] * 8, memcounts[, 3L])))
+               memcounts <- c(0, rowSums(cbind(memcounts[, 1L:2L, drop = FALSE] * 8, memcounts[, 3L, drop = FALSE])))
                rm(memstuff)
            }
            chunk <- substr(chunk, memprefix+1L, nchar(chunk,  "c"))
@@ -106,9 +110,9 @@ summaryRprof <-
        }
 
        chunk <- strsplit(chunk, " ")
-       if (line.profiling)  
+       if (line.profiling)
            chunk <- lapply(chunk, function(x) {
-           	locations <- !grepl("^\"", x)
+           	locations <- !startsWith(x, '"')
            	if (lines != "hide") {
            	    fnum <- sub("#.*", "", x[locations])
            	    lnum <- sub(".*#", "", x[locations])
@@ -122,7 +126,7 @@ summaryRprof <-
        	     })
        newfirsts <- sapply(chunk,  "[[",  1L)
        newuniques <- lapply(chunk,  unique)
-       ulen <- sapply(newuniques, length)
+       ulen <- lengths(newuniques)
        newuniques <- unlist(newuniques)
 
        new.utable <- table(newuniques)
@@ -146,7 +150,7 @@ summaryRprof <-
     ## sort and form % on unrounded numbers
     index1 <- order(-firstnum, -uniquenum)
     index2 <- order(-uniquenum, -firstnum)
-    
+
     if (lines == "show") {
     	filename <- sub("#.*$", "", fnames)
     	linenum <- rep(0, length(filename))
@@ -172,13 +176,13 @@ summaryRprof <-
     by.self <- rval[index1, ]
     by.self <- by.self[by.self[,1L] > 0, ]
     by.total <- rval[index2, c(3L, 4L,  if(memory == "both") 5L, 1L, 2L)]
-    
+
     result <- list(by.self = by.self, by.total = by.total)
-    
+
     if (lines == "show")
     	result <- c(result, list(by.line = rval[index3,]))
-    	
-    c(result, 
+
+    c(result,
          sample.interval = sample.interval,
          sampling.time = sum(fcounts)*sample.interval)
 }
@@ -188,7 +192,6 @@ Rprof_memory_summary <- function(filename, chunksize = 5000,
                                  exclude = NULL, sample.interval)
 {
 
-    fnames <- NULL
     memcounts <- NULL
     firsts <- NULL
     labels <- vector("list", length(label))
@@ -260,7 +263,7 @@ Rprof_memory_summary <- function(filename, chunksize = 5000,
     names(memcounts) <- c("vsize.small", "vsize.large", "nodes", "duplications")
     if (!aggregate) {
         rownames(memcounts) <- (1L:nrow(memcounts))*sample.interval
-        names(labels) <- paste("stack", label, sep = ":")
+        names(labels) <- paste0("stack:", label)
         memcounts <- cbind(memcounts, labels)
     }
 
diff --git a/src/library/utils/R/sysdata.R b/src/library/utils/R/sysdata.R
new file mode 100644
index 0000000..76f752e
--- /dev/null
+++ b/src/library/utils/R/sysdata.R
@@ -0,0 +1,63 @@
+make_sysdata_rda <-
+function()    
+{
+    ## Get the codes and descriptions from the
+    ##   <http://www.loc.gov/marc/relators/relaterm.html>
+    ## web page, and merge with the information on usage for R.
+
+    ## <http://www.loc.gov/marc/relators/relacode.html>
+    doc <- XML::htmlParse("http://www.loc.gov/marc/relators/relacode.html")
+    codes <- XML::readHTMLTable(doc)[[2]]
+
+    ## <http://www.loc.gov/marc/relators/relaterm.html>
+    doc <- XML::htmlParse("http://www.loc.gov/marc/relators/relaterm.html")
+    ns <- XML::getNodeSet(doc, "//dl")[[4]]
+    dt <- trimws(XML::xpathApply(ns, "./dt", XML::xmlValue))
+    dd <- trimws(XML::xpathApply(ns, "./dd", XML::xmlValue))
+
+    ## Drop obsolete stuff and pointers to it.
+    re <- "(.*) \\[(.*)\\]"
+    ind <- grepl(re, dt)
+    MARC_relator_db <-
+        as.data.frame(cbind(term = sub(re, "\\1", dt[ind]),
+                            code = sub(re, "\\2", dt[ind]),
+                            description = sub("\n\t UF.*", "", dd[ind]),
+                            usage = ""),
+                      stringsAsFactors = FALSE)
+
+    MARC_R_usage <-
+        c("aut" = "Use for full authors who have made substantial contributions to\nthe package and should show up in the package citation.",
+          "com" = "Use for package maintainers that collected code (potentially in\nother languages) but did not make further substantial\ncontributions to the package.",
+          "ctb" = "Use for authors who have made smaller contributions (such as\ncode patches etc.) but should not show up in the package\ncitation.", 
+          "cph" = "Use for all copyright holders.",
+          "cre" = "Use for the package maintainer.",
+          "ctr" = "Use for authors who have been contracted to write (parts of) the\npackage and hence do not own intellectual property.", 
+          "dtc" = "Use for persons who contributed data sets for the package.",
+          "fnd" = "Use for persons or organizations that furnished financial support\nfor the development of the package",
+          "ths" = "If the package is part of a thesis, use for the thesis advisor.", 
+          "trl" = "If the R code is merely a translation from another language\n(typically S), use for the translator to R.")
+
+    MARC_R_usage <- data.frame(code = names(MARC_R_usage),
+                               usage = c(MARC_R_usage),
+                               stringsAsFactors = FALSE,
+                               row.names = NULL)
+
+    pos <- match(MARC_relator_db$code, MARC_R_usage$code, nomatch = 0L)
+    MARC_relator_db$usage[pos > 0L] <-
+        gsub("\n", " ", MARC_R_usage$usage[pos])
+
+    MARC_relator_db_codes_used_with_R <-
+        MARC_relator_db[nchar(MARC_relator_db$usage) > 0L, "code"]
+
+    ## Using dump() to provide a plain text representation results in
+    ## non-ASCII string constants without appropriate encoding info.
+    ## c69417 manually changed to Unicode escapes, which however is not
+    ## straightforward to achieve programmatically.  Hence, instead of
+    ## using dump() to a text 'MARC.R' file use save() to a binary
+    ## 'sysdata.rda' file.
+
+    save(MARC_relator_db,
+         MARC_relator_db_codes_used_with_R,
+         file = "sysdata.rda",
+         compress = TRUE)
+}
diff --git a/src/library/utils/R/sysdata.rda b/src/library/utils/R/sysdata.rda
new file mode 100644
index 0000000..be2adeb
Binary files /dev/null and b/src/library/utils/R/sysdata.rda differ
diff --git a/src/library/utils/R/tar.R b/src/library/utils/R/tar.R
index c970da1..feb693a 100644
--- a/src/library/utils/R/tar.R
+++ b/src/library/utils/R/tar.R
@@ -1,7 +1,7 @@
 #  File src/library/utils/R/tar.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
-#  Copyright (C) 1995-2013 The R Core Team
+#  Copyright (C) 1995-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
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 untar <- function(tarfile, files = NULL, list = FALSE, exdir = ".",
                   compressed = NA, extras = NULL, verbose = FALSE,
@@ -84,7 +84,7 @@ untar <- function(tarfile, files = NULL, list = FALSE, exdir = ".",
     } else {
         cmd <- paste0(TAR, " -", cflag, "xf ", shQuote(tarfile))
         if (!missing(exdir)) {
-            if (!file_test("-d", exdir)) {
+            if (!dir.exists(exdir)) {
                 if(!dir.create(exdir, showWarnings = TRUE, recursive = TRUE))
                     stop(gettextf("failed to create directory %s", sQuote(exdir)),
                          domain = NA)
@@ -130,7 +130,7 @@ untar2 <- function(tarfile, files = NULL, list = FALSE, exdir = ".",
     mydir.create <- function(path, ...) {
         ## for Windows' sake
         path <- sub("[\\/]$", "", path)
-        if(file_test("-d", path)) return()
+        if(dir.exists(path)) return()
         if(!dir.create(path, showWarnings = TRUE, recursive = TRUE, ...))
            stop(gettextf("failed to create directory %s", sQuote(path)),
                 domain = NA)
@@ -140,7 +140,7 @@ untar2 <- function(tarfile, files = NULL, list = FALSE, exdir = ".",
 
     ## A tar file is a set of 512 byte records,
     ## a header record followed by file contents (zero-padded).
-    ## See http://en.wikipedia.org/wiki/Tar_%28file_format%29
+    ## See https://en.wikipedia.org/wiki/Tar_%28file_format%29
     if(is.character(tarfile) && length(tarfile) == 1L) {
         con <- gzfile(path.expand(tarfile), "rb") # reads compressed formats
         on.exit(close(con))
@@ -245,7 +245,7 @@ untar2 <- function(tarfile, files = NULL, list = FALSE, exdir = ".",
                             warn1 <- c(warn1, "restoring symbolic link as a file copy")
                    } else {
                        mydir.create(dirname(name))
-                       od <- setwd(dirname(name))
+                       od0 <- setwd(dirname(name))
                        nm <- basename(name)
                        unlink(nm)
                        if(!file.symlink(name2, nm)) { # will give a warning
@@ -255,7 +255,7 @@ untar2 <- function(tarfile, files = NULL, list = FALSE, exdir = ".",
                            else
                                warning(gettextf("failed to copy %s to %s", sQuote(from), sQuote(name)), domain = NA)
                        }
-                       setwd(od)
+                       setwd(od0)
                    }
                 }
             }
@@ -329,6 +329,14 @@ tar <- function(tarfile, files = NULL,
                 compression_level = 6, tar = Sys.getenv("tar"),
                 extra_flags = "")
 {
+    files <- ## list the files before 'tarfile' is created!
+	if(is.null(files)) ## is fine
+	    list.files(recursive = TRUE, all.files = TRUE,
+		       full.names = TRUE, include.dirs = TRUE)
+	else ## is *not* ok when 'files' are simple files !
+	    ## list.files(path, ....) : first argument are *directories*
+	    list.files(files, recursive = TRUE, all.files = TRUE,
+		       full.names = TRUE, include.dirs = TRUE)
     if(is.character(tarfile)) {
         if(nzchar(tar) && tar != "internal") {
             ## FIXME: could pipe through gzip etc: might be safer for xz
@@ -340,7 +348,7 @@ tar <- function(tarfile, files = NULL,
                             "xz" = "-Jcf")
 
             if (grepl("darwin", R.version$os)) {
-                ## precaution for Mac OS X to omit resource forks
+                ## precaution for macOS to omit resource forks
                 ## we can't tell the running OS version from R.version$os
                 ## but at least it will not be older
                 tar <- paste("COPYFILE_DISABLE=1", tar) # >= 10.5, Leopard
@@ -383,9 +391,6 @@ tar <- function(tarfile, files = NULL,
     }
     warn1 <- character()
 
-    files <- list.files(files, recursive = TRUE, all.files = TRUE,
-                        full.names = TRUE, include.dirs = TRUE)
-
     invalid_uid <- invalid_gid <- FALSE
     for (f in unique(files)) {
         info <- file.info(f)
diff --git a/src/library/utils/R/toLatex.R b/src/library/utils/R/toLatex.R
index daf298d..3b9b599 100644
--- a/src/library/utils/R/toLatex.R
+++ b/src/library/utils/R/toLatex.R
@@ -1,5 +1,5 @@
 #  File src/library/utils/R/toLatex.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
 #  Copyright (C) 1995-2013 The R Core Team
 #
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 toBibtex <- function(object, ...) UseMethod("toBibtex")
 
diff --git a/src/library/utils/R/unix/create.post.R b/src/library/utils/R/unix/create.post.R
index 912adee..60a04aa 100644
--- a/src/library/utils/R/unix/create.post.R
+++ b/src/library/utils/R/unix/create.post.R
@@ -1,5 +1,5 @@
 #  File src/library/utils/R/unix/create.post.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
 #  Copyright (C) 1995-2012 The R Core Team
 #
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 create.post <- function(instructions = character(),
                         description = "post",
diff --git a/src/library/utils/R/unix/download.file.R b/src/library/utils/R/unix/download.file.R
index f551e67..fe846fe 100644
--- a/src/library/utils/R/unix/download.file.R
+++ b/src/library/utils/R/unix/download.file.R
@@ -1,7 +1,7 @@
 #  File src/library/utils/R/unix/download.file.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
-#  Copyright (C) 1995-2012 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
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 download.file <-
     function(url, destfile, method, quiet = FALSE, mode = "w",
@@ -24,49 +24,54 @@ download.file <-
     method <- if (missing(method))
 	getOption("download.file.method", default = "auto")
     else
-        match.arg(method, c("auto", "internal", "wget", "curl", "lynx"))
+        match.arg(method, c("auto", "internal", "libcurl", "wget", "curl", "lynx"))
 
     if(method == "auto") {
-        if(capabilities("http/ftp"))
-            method <- "internal"
-        else if(length(grep("^file:", url))) {
-            method <- "internal"
-            url <- URLdecode(url)
-        } else if(system("wget --help > /dev/null") == 0L)
-            method <- "wget"
-        else if(system("curl --help > /dev/null") == 0L)
-            method <- "curl"
-        else if(system("lynx -help > /dev/null") == 0L)
-            method <- "lynx"
-        else
-            stop("no download method found")
-    }
-    if(method == "internal") {
-        status <- .External(C_download, url, destfile, quiet, mode, cacheOK)
-        ## needed for Mac GUI from download.packages etc
-        if(!quiet) flush.console()
-    } else if(method == "wget") {
-        if(quiet) extra <- c(extra, "--quiet")
-        if(!cacheOK) extra <- c(extra, "--cache=off")
-        status <- system(paste("wget",
-                               paste(extra, collapse = " "),
-                               shQuote(url),
-                               "-O", shQuote(path.expand(destfile))))
-    } else if(method == "curl") {
-        if(quiet) extra <- c(extra, "-s -S")
-        if(!cacheOK) extra <- c(extra, "-H 'Pragma: no-cache'")
-        status <- system(paste("curl",
-                               paste(extra, collapse = " "),
-                               shQuote(url),
-                               " -o", shQuote(path.expand(destfile))))
-    } else if(method == "lynx") {
-        warning("method 'lynx' is untested and deprecated as from R 3.1.0")
-        status <- system(paste("lynx -dump",
-                               paste(extra, collapse = " "),
-                               shQuote(url),
-                               ">", shQuote(path.expand(destfile))))
+        if(length(url) != 1L || typeof(url) != "character")
+            stop("'url' must be a length-one character vector");
+        ## As from 3.3.0 all Unix-alikes support libcurl.
+	method <- if(grepl("^file:", url)) "internal" else "libcurl"
     }
 
+    switch(method,
+	   "internal" = {
+	       status <- .External(C_download, url, destfile, quiet, mode, cacheOK)
+	       ## needed for Mac GUI from download.packages etc
+	       if(!quiet) flush.console()
+	   },
+	   "libcurl" = {
+	       status <- .Internal(curlDownload(url, destfile, quiet, mode, cacheOK))
+	       if(!quiet) flush.console()
+	   },
+	   "wget" = {
+	       if(length(url) != 1L || typeof(url) != "character")
+		   stop("'url' must be a length-one character vector");
+	       if(length(destfile) != 1L || typeof(destfile) != "character")
+		   stop("'destfile' must be a length-one character vector");
+	       if(quiet) extra <- c(extra, "--quiet")
+	       if(!cacheOK) extra <- c(extra, "--cache=off")
+	       status <- system(paste("wget",
+				      paste(extra, collapse = " "),
+				      shQuote(url),
+				      "-O", shQuote(path.expand(destfile))))
+               if(status) stop("'wget' call had nonzero exit status")
+	   },
+	   "curl" = {
+	       if(length(url) != 1L || typeof(url) != "character")
+		   stop("'url' must be a length-one character vector");
+	       if(length(destfile) != 1L || typeof(url) != "character")
+		   stop("'destfile' must be a length-one character vector");
+	       if(quiet) extra <- c(extra, "-s -S")
+	       if(!cacheOK) extra <- c(extra, "-H 'Pragma: no-cache'")
+	       status <- system(paste("curl",
+				      paste(extra, collapse = " "),
+				      shQuote(url),
+				      " -o", shQuote(path.expand(destfile))))
+               if(status) stop("'curl' call had nonzero exit status")
+	   },
+	   "lynx" =
+	       stop("method 'lynx' is defunct", domain = NA))
+
     if(status) warning("download had nonzero exit status")
 
     invisible(status)
diff --git a/src/library/utils/R/unix/mac.install.R b/src/library/utils/R/unix/mac.install.R
index fdaf116..3c8e3e5 100644
--- a/src/library/utils/R/unix/mac.install.R
+++ b/src/library/utils/R/unix/mac.install.R
@@ -1,5 +1,5 @@
 #  File src/library/utils/R/unix/mac.install.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
 #  Copyright (C) 1995-2014 The R Core Team
 #
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 
 if(substr(R.version$os, 1L, 6L) != "darwin") {
@@ -50,7 +50,6 @@ if(substr(R.version$os, 1L, 6L) != "darwin") {
 
     unpackPkg <- function(pkg, pkgname, lib, lock = FALSE)
     {
-        dir.exists <- function(x) !is.na(isdir <- file.info(x)$isdir) & isdir
         ## Create a temporary directory and unpack the zip to it
         ## then get the real package & version name, copying the
         ## dir over to the appropriate install dir.
@@ -65,15 +64,15 @@ if(substr(R.version$os, 1L, 6L) != "darwin") {
         setwd(tmpDir)
         ## sanity check: people have tried to install source .tgz files
         if (!file.exists(file <- file.path(pkgname, "Meta", "package.rds")))
-            stop(gettextf("file %s is not an OS X binary package", sQuote(pkg)),
+            stop(gettextf("file %s is not a macOS binary package", sQuote(pkg)),
                  domain = NA, call. = FALSE)
         desc <- readRDS(file)$DESCRIPTION
         if (length(desc) < 1L)
-            stop(gettextf("file %s is not an OS X binary package", sQuote(pkg)),
+            stop(gettextf("file %s is not a macOS binary package", sQuote(pkg)),
                  domain = NA, call. = FALSE)
         desc <- as.list(desc)
         if (is.null(desc$Built))
-            stop(gettextf("file %s is not an OS X binary package", sQuote(pkg)),
+            stop(gettextf("file %s is not a macOS binary package", sQuote(pkg)),
                  domain = NA, call. = FALSE)
 
         res <- tools::checkMD5sums(pkgname, file.path(tmpDir, pkgname))
@@ -86,7 +85,7 @@ if(substr(R.version$os, 1L, 6L) != "darwin") {
         instPath <- file.path(lib, pkgname)
         if(identical(lock, "pkglock") || isTRUE(lock)) {
 	    lockdir <- if(identical(lock, "pkglock"))
-                file.path(lib, paste("00LOCK", pkgname, sep = "-"))
+                file.path(lib, paste0("00LOCK-", pkgname))
             else file.path(lib, "00LOCK")
 	    if (file.exists(lockdir)) {
                 stop(gettextf("ERROR: failed to lock directory %s for modifying\nTry removing %s",
diff --git a/src/library/utils/R/unix/sysutils.R b/src/library/utils/R/unix/sysutils.R
index 94ae564..7b15118 100644
--- a/src/library/utils/R/unix/sysutils.R
+++ b/src/library/utils/R/unix/sysutils.R
@@ -1,5 +1,5 @@
 #  File src/library/utils/R/unix/sysutils.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
 #  Copyright (C) 1995-2012 The R Core Team
 #
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 memory.size <- function(max = FALSE)
 {
diff --git a/src/library/utils/R/utils-defunct.R b/src/library/utils/R/utils-defunct.R
index 01258bb..94bc71e 100644
--- a/src/library/utils/R/utils-defunct.R
+++ b/src/library/utils/R/utils-defunct.R
@@ -1,5 +1,5 @@
 #  File src/library/utils/R/utils-defunct.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
 #  Copyright (C) 1995-2012 The R Core Team
 #
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 ## <entry>
 ## Deprecated in 1.9.0
diff --git a/src/library/utils/R/utils-deprecated.R b/src/library/utils/R/utils-deprecated.R
index 2d28241..429dac7 100644
--- a/src/library/utils/R/utils-deprecated.R
+++ b/src/library/utils/R/utils-deprecated.R
@@ -1,5 +1,5 @@
 #  File src/library/utils/R/utils-deprecated.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
 #  Copyright (C) 1995-2012 The R Core Team
 #
@@ -14,5 +14,5 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
diff --git a/src/library/utils/R/vignette.R b/src/library/utils/R/vignette.R
index f8f6839..1d35835 100644
--- a/src/library/utils/R/vignette.R
+++ b/src/library/utils/R/vignette.R
@@ -1,7 +1,7 @@
 #  File src/library/utils/R/vignette.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
-#  Copyright (C) 1995-2013 The R Core Team
+#  Copyright (C) 1995-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
@@ -14,13 +14,13 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 vignette <-
     function(topic, package = NULL, lib.loc = NULL, all = TRUE)
 {
-    vinfo <- tools:::getVignetteInfo(package, lib.loc, all)
-    
+    vinfo <- tools::getVignetteInfo(package, lib.loc, all)
+
     if(!missing(topic)) {
         topic <- topic[1L]               # Just making sure ...
         vinfo <- vinfo[vinfo[, "Topic"] == topic, , drop = FALSE]
@@ -53,17 +53,13 @@ vignette <-
         else
             warning(gettextf("vignette %s not found", sQuote(topic)),
                     call. = FALSE, domain = NA)
-    }
-
-    if(missing(topic)) {
-        ## List all possible vignettes.
 
+    } else { ## missing(topic)) -- List all possible vignettes.
         title <- if(nrow(vinfo)) {
             paste(vinfo[, "Title"],
                   paste0(rep.int("(source", nrow(vinfo)),
-                        ifelse(vinfo[, "PDF"] != "",
-                               paste0(", ",
-                                      tools::file_ext(vinfo[, "PDF"])),
+                        ifelse(nzchar(vinfo[, "PDF"]),
+                               paste0(", ", tools::file_ext(vinfo[, "PDF"])),
                                ""),
                          ")"))
         }
@@ -75,15 +71,12 @@ vignette <-
                     Item = vinfo[, "Topic"],
                     Title = title)
 	footer <- if (all) NULL else
-		  paste0("Use ",
-                         sQuote("vignette(all = TRUE)"),
-                         "\n",
+		  paste0("Use ", sQuote("vignette(all = TRUE)"), "\n",
                          "to list the vignettes in all *available* packages.")
-
-        y <- list(type = "vignette", title = "Vignettes", header = NULL,
-                  results = db, footer = footer)
-        class(y) <- "packageIQR"
-        return(y)
+        ## return
+        structure(class = "packageIQR",
+                  list(type = "vignette", title = "Vignettes", header = NULL,
+                       results = db, footer = footer))
     }
 }
 
@@ -92,7 +85,12 @@ function(x, ...)
 {
     if(nzchar(out <- x$PDF)) {
         ext <- tools::file_ext(out)
-        out <- file.path(x$Dir, "doc", out)
+	port <- if (tolower(ext) == "html") tools::startDynamicHelp(NA) else 0L
+	out <- if(port > 0L)
+	    sprintf("http://127.0.0.1:%d/library/%s/doc/%s",
+                    port, basename(x$Dir), out)
+               else
+                   file.path(x$Dir, "doc", out)
         if(tolower(ext) == "pdf") {
             pdfviewer <- getOption("pdfviewer")
             if(identical(pdfviewer, "false")) {
@@ -102,31 +100,38 @@ function(x, ...)
                               file.path(R.home("bin"), "open.exe")))
             	shell.exec(out)
             else system2(pdfviewer, shQuote(out), wait = FALSE)
-        } else 
+        } else
             browseURL(out)
     } else {
         warning(gettextf("vignette %s has no PDF/HTML",
                          sQuote(x$Topic)),
                 call. = FALSE, domain = NA)
     }
-    
     invisible(x)
 }
 
-edit.vignette <-
-function(name, ...)
-{
-    if(nzchar(p <- name$R)) {
-        f <- tempfile(name$Topic, fileext = ".R")
-        file.copy(file.path(name$Dir, "doc", p), f)
-        file.edit(file = f, ...)
+## Not exported yet
+getRcode <- function(x, ...) UseMethod("getRcode")
+
+getRcode.vignette <- function(x, strict=TRUE, ...) {
+    if(nzchar(p <- x$R)) {
+        file.path(x$Dir, "doc", p)
     } else {
         ## Could try to extract the R code from the source via tangle,
         ## using
         ##   tools::buildVignette(tangle = TRUE, weave = FALSE)
         ## but why should this not have been done at install time?
-        warning(gettextf("vignette %s has no R code",
-                         sQuote(name$Topic)),
-                call. = FALSE, domain = NA)
+        (if(strict) stop else warning)(
+            gettextf("vignette %s has no R code", sQuote(x$Topic)),
+            call. = FALSE, domain = NA)
     }
 }
+
+edit.vignette <- function(name, ...)
+{
+    if(is.character(src <- getRcode(name, strict=FALSE))) {
+        f <- tempfile(name$Topic, fileext = ".R")
+        file.copy(src, f)
+        file.edit(file = f, ...)
+    } # getRcode() did warn already
+}
diff --git a/src/library/utils/R/widgets.R b/src/library/utils/R/widgets.R
index e722658..67b5380 100644
--- a/src/library/utils/R/widgets.R
+++ b/src/library/utils/R/widgets.R
@@ -1,5 +1,5 @@
 #  File src/library/utils/R/widgets.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
 #  Copyright (C) 1995-2012 The R Core Team
 #
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 select.list <-
     function(choices, preselect = NULL, multiple = FALSE, title = NULL,
@@ -27,11 +27,11 @@ select.list <-
         if (.Platform$OS.type == "windows" || .Platform$GUI == "AQUA")
         return(.External2(C_selectlist, choices, preselect, multiple, title))
         ## must be Unix here
-        ## Tk might not require X11 on Mac OS X, but if DISPLAY is set
+        ## Tk might not require X11 on macOS, but if DISPLAY is set
         ## this will work for Aqua Tcl/Tk.
         ## OTOH, we do want to check Tk works!
         else if(graphics && capabilities("tcltk") &&
-                capabilities("X11") && suppressWarnings(tcltk:::.TkUp))
+                capabilities("X11") && suppressWarnings(tcltk::.TkUp))
             return(tcltk::tk_select.list(choices, preselect, multiple, title))
     }
     ## simple text-based alternatives.
diff --git a/src/library/utils/R/windows/Rconsole.R b/src/library/utils/R/windows/Rconsole.R
index a936862..99512ea 100644
--- a/src/library/utils/R/windows/Rconsole.R
+++ b/src/library/utils/R/windows/Rconsole.R
@@ -1,5 +1,5 @@
 #  File src/library/utils/R/windows/Rconsole.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
 #  Copyright (C) 1995-2012 The R Core Team
 #
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 loadRconsole <-
     function(file=choose.files(file.path(Sys.getenv("R_USER"), "Rconsole")))
diff --git a/src/library/utils/R/windows/choose.files.R b/src/library/utils/R/windows/choose.files.R
index fb19eb9..9f817ef 100644
--- a/src/library/utils/R/windows/choose.files.R
+++ b/src/library/utils/R/windows/choose.files.R
@@ -1,7 +1,7 @@
 #  File src/library/utils/R/windows/choose.files.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
-#  Copyright (C) 1995-2012 The R Core Team
+#  Copyright (C) 1995-2015 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
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 Filters <-
 structure(c("R or S files (*.R,*.q,*.ssc,*.S)",
@@ -27,13 +27,14 @@ structure(c("R or S files (*.R,*.q,*.ssc,*.S)",
             "Text files (*.txt)",
             "R images (*.RData,*.rda)",
             "Zip files (*.zip)",
+            "Package tarballs (*.tar.gz)",
             "All files (*.*)",
 
             "*.R;*.q;*.ssc;*.S", "*.emf", "*.ps", "*.pdf", "*.png", "*.bmp",
-            "*.jpeg;*.jpg", "*.txt", "*.RData;*.rda", "*.zip", "*.*"),
-       .Dim = c(11L, 2L),
+            "*.jpeg;*.jpg", "*.txt", "*.RData;*.rda", "*.zip", "*.tar.gz", "*.*"),
+       .Dim = c(12L, 2L),
        .Dimnames = list(c("R", "emf", "ps","pdf", "png",
-                          "bmp", "jpeg", "txt", "RData", "zip", "All"),
+                          "bmp", "jpeg", "txt", "RData", "zip", "tarball", "All"),
                         NULL))
 
 choose.files <- function(default = '', caption = 'Select files', multi = TRUE,
diff --git a/src/library/utils/R/windows/create.post.R b/src/library/utils/R/windows/create.post.R
index f4b0a26..306ec20 100644
--- a/src/library/utils/R/windows/create.post.R
+++ b/src/library/utils/R/windows/create.post.R
@@ -1,5 +1,5 @@
 #  File src/library/utils/R/windows/create.post.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
 #  Copyright (C) 1995-2012 The R Core Team
 #
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 create.post <- function(instructions = character(),
                         description = "post",
diff --git a/src/library/utils/R/windows/download.file.R b/src/library/utils/R/windows/download.file.R
index 2407e35..69801f4 100644
--- a/src/library/utils/R/windows/download.file.R
+++ b/src/library/utils/R/windows/download.file.R
@@ -1,7 +1,7 @@
 #  File src/library/utils/R/windows/download.file.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
-#  Copyright (C) 1995-2012 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
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 download.file <-
     function(url, destfile, method, quiet = FALSE, mode = "w",
@@ -24,50 +24,56 @@ download.file <-
     method <- if (missing(method))
 	getOption("download.file.method", default = "auto")
     else
-        match.arg(method, c("auto", "internal", "wget", "curl", "lynx"))
+        match.arg(method, c("auto", "internal", "wininet", "libcurl",
+                            "wget", "curl", "lynx"))
 
-    if(missing(mode) & length(grep("\\.(gz|bz2|xz|tgz|zip|rda|RData)$", url))) mode <- "wb"
+    if(missing(mode) && length(grep("\\.(gz|bz2|xz|tgz|zip|rda|RData)$", url)))
+        mode <- "wb"
     if(method == "auto") {
-        if(capabilities("http/ftp"))
-            method <- "internal"
-        else if(length(grep("^file:", url))) {
-            method <- "internal"
-            url <- URLdecode(url)
-        } else if(system("wget --help", invisible=TRUE) == 0L)
-            method <- "wget"
-        else if(system("curl --help", invisible=TRUE) == 0L)
-            method <- "curl"
-        else if(shell("lynx -help", invisible=TRUE) == 0L)
-            method <- "lynx"
-        else
-            stop("no download method found")
-    }
-    if(method == "internal")
-        status <- .External(C_download, url, destfile, quiet, mode, cacheOK)
-    else if(method == "wget") {
-        if(quiet) extra <- c(extra, "--quiet")
-        if(!cacheOK) extra <- c(extra, "--cache=off")
-        status <- system(paste("wget",
-                               paste(extra, collapse = " "),
-                               shQuote(url),
-                               "-O", shQuote(path.expand(destfile))))
-    } else if(method == "curl") {
-        if(quiet) extra <- c(extra, "-s -S")
-        if(!cacheOK) extra <- c(extra, "-H 'Pragma: no-cache'")
-        status <- system(paste("curl",
-                               paste(extra, collapse = " "),
-                               shQuote(url),
-                               " -o", shQuote(path.expand(destfile))))
-    } else if(method == "lynx") {
-        warning("method 'lynx' is untested and deprecated as from R 3.1.0")
-        if(!cacheOK) extra <- c(extra, "--reload")
-        ## if would be better to use system2().
-        status <- shell(paste("lynx -dump",
-                              paste(extra, collapse = " "),
-                              shQuote(url), ">",
-                              shQuote(path.expand(destfile))))
+        if(length(url) != 1L || typeof(url) != "character")
+            stop("'url' must be a length-one character vector");
+	method <-
+            if(grepl("^ftps:", url) && capabilities("libcurl")) "libcurl"
+            else "wininet"
     }
 
+    switch(method,
+	   "internal" =, "wininet" = {
+	       status <- .External(C_download, url, destfile, quiet, mode, cacheOK,
+				   method == "wininet")
+	   },
+	   "libcurl" = {
+	       status <- .Internal(curlDownload(url, destfile, quiet, mode, cacheOK))
+	   },
+	   "wget" = {
+	       if(length(url) != 1L || typeof(url) != "character")
+		   stop("'url' must be a length-one character vector");
+	       if(length(destfile) != 1L || typeof(destfile) != "character")
+		   stop("'destfile' must be a length-one character vector");
+	       if(quiet) extra <- c(extra, "--quiet")
+	       if(!cacheOK) extra <- c(extra, "--cache=off")
+	       status <- system(paste("wget",
+				      paste(extra, collapse = " "),
+				      shQuote(url),
+				      "-O", shQuote(path.expand(destfile))))
+               if(status) stop("'wget' call had nonzero exit status")
+	   },
+	   "curl" = {
+	       if(length(url) != 1L || typeof(url) != "character")
+		   stop("'url' must be a length-one character vector");
+	       if(length(destfile) != 1L || typeof(url) != "character")
+		   stop("'destfile' must be a length-one character vector");
+	       if(quiet) extra <- c(extra, "-s -S")
+	       if(!cacheOK) extra <- c(extra, "-H 'Pragma: no-cache'")
+	       status <- system(paste("curl",
+				      paste(extra, collapse = " "),
+				      shQuote(url),
+				      " -o", shQuote(path.expand(destfile))))
+               if(status) stop("'curl' call had nonzero exit status")
+	   },
+	   "lynx" =
+	       stop("method 'lynx' is defunct", domain = NA))
+
     if(status > 0L)
         warning("download had nonzero exit status")
 
diff --git a/src/library/utils/R/windows/install.packages.R b/src/library/utils/R/windows/install.packages.R
index f6ac89a..6fb5d9c 100644
--- a/src/library/utils/R/windows/install.packages.R
+++ b/src/library/utils/R/windows/install.packages.R
@@ -1,7 +1,7 @@
 #  File src/library/utils/R/windows/install.packages.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
-#  Copyright (C) 1995-2014 The R Core Team
+#  Copyright (C) 1995-2015 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
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 ## Unexported helper
 unpackPkgZip <- function(pkg, pkgname, lib, libs_only = FALSE,
@@ -101,9 +101,8 @@ unpackPkgZip <- function(pkg, pkgname, lib, libs_only = FALSE,
         instPath <- file.path(lib, pkgname)
         if(identical(lock, "pkglock") || isTRUE(lock)) {
             ## This is code adapted from tools:::.install_packages
-            dir.exists <- function(x) !is.na(isdir <- file.info(x)$isdir) & isdir
 	    lockdir <- if(identical(lock, "pkglock"))
-                file.path(lib, paste("00LOCK", pkgname, sep = "-"))
+                file.path(lib, paste0("00LOCK-", pkgname))
             else file.path(lib, "00LOCK")
 	    if (file.exists(lockdir)) {
                 stop(gettextf("ERROR: failed to lock directory %s for modifying\nTry removing %s",
@@ -282,8 +281,16 @@ menuInstallPkgs <- function(type = getOption("pkgType"))
 
 menuInstallLocal <- function()
 {
-    install.packages(choose.files('',filters=Filters[c('zip','All'),]),
-                     .libPaths()[1L], repos = NULL)
+    files <- choose.files('',filters=Filters[c('zip','tarball', 'All'),])
+    zips <- grepl("[.]zip$", files)
+    tarballs <- grepl("[.]tar[.]gz$", files)
+    bad <- !(zips | tarballs)
+    if (any(bad)) 
+        stop("Only '*.zip' and '*.tar.gz' files can be installed.")
+    if (any(zips)) install.packages(files[zips],
+        .libPaths()[1L], repos = NULL, type = "binary")
+    if (any(tarballs)) install.packages(files[tarballs],
+        .libPaths()[1L], repos = NULL, type = "source")
 }
 
 ### Deprecated in 2.13.0, defunct in 2.14.0
diff --git a/src/library/utils/R/windows/sysutils.R b/src/library/utils/R/windows/sysutils.R
index 5784954..fdd374b 100644
--- a/src/library/utils/R/windows/sysutils.R
+++ b/src/library/utils/R/windows/sysutils.R
@@ -1,5 +1,5 @@
 #  File src/library/utils/R/windows/sysutils.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
 #  Copyright (C) 1995-2013 The R Core Team
 #
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 memory.size <- function(max = FALSE) round(.Call(C_memsize, max), 2L)
 
@@ -101,7 +101,7 @@ menuShowCRAN <- function()
 {
     CRAN <- getOption("repos")[["CRAN"]] # drop name for identical()
     if(is.na(CRAN) || identical(CRAN, "@CRAN@"))
-        CRAN <- "http://cran.r-project.org"
+        CRAN <- "https://cran.r-project.org"
     shell.exec(CRAN)
 }
 
@@ -115,7 +115,7 @@ readRegistry <-
     .External2(C_readRegistry, key, match.arg(hive), maxdepth, view)
 }
 
-setInternet2 <- function(use = TRUE) .Internal(useInternet2(use))
+setInternet2 <- function(use = TRUE) .Defunct()
 
 
 win.version <- function() .Call(C_winver)
diff --git a/src/library/utils/R/windows/winDialog.R b/src/library/utils/R/windows/winDialog.R
index b594d00..fd3759f 100644
--- a/src/library/utils/R/windows/winDialog.R
+++ b/src/library/utils/R/windows/winDialog.R
@@ -1,5 +1,5 @@
 #  File src/library/utils/R/windows/winDialog.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
 #  Copyright (C) 1995-2012 The R Core Team
 #
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 winDialog <- function(type = c("ok", "okcancel", "yesno", "yesnocancel"),
                        message)
diff --git a/src/library/utils/R/write.table.R b/src/library/utils/R/write.table.R
index a181f86..99fa04b 100644
--- a/src/library/utils/R/write.table.R
+++ b/src/library/utils/R/write.table.R
@@ -1,5 +1,5 @@
 #  File src/library/utils/R/write.table.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
 #  Copyright (C) 1995-2012 The R Core Team
 #
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 write.table <-
 function (x, file = "", append = FALSE, quote = TRUE, sep = " ",
diff --git a/src/library/utils/R/zip.R b/src/library/utils/R/zip.R
index c042ad1..a59f257 100644
--- a/src/library/utils/R/zip.R
+++ b/src/library/utils/R/zip.R
@@ -1,5 +1,5 @@
 #  File src/library/utils/R/zip.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
 #  Copyright (C) 1995-2013 The R Core Team
 #
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 unzip <-
     function(zipfile, files = NULL, list = FALSE, overwrite = TRUE,
diff --git a/src/library/utils/R/zzz.R b/src/library/utils/R/zzz.R
index 0435447..cfba52d 100644
--- a/src/library/utils/R/zzz.R
+++ b/src/library/utils/R/zzz.R
@@ -1,7 +1,7 @@
 #  File src/library/utils/R/zzz.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
-#  Copyright (C) 1995-2012 The R Core Team
+#  Copyright (C) 1995-2015 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
@@ -14,7 +14,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 .noGenerics <- TRUE
 
@@ -25,23 +25,27 @@
     op.utils <-
 	list(help.try.all.packages = FALSE,
 	     help.search.types = c("vignette", "demo", "help"),
-             citation.bibtex.max = 1, internet.info = 2,
-	     pkgType = .Platform$pkgType,
-	     str = list(strict.width = "no", digits.d = 3, vec.len = 4),
+             citation.bibtex.max = 1L, internet.info = 2L,
+	     pkgType = if(.Platform$pkgType != "source") "both" else "source",
+	     str = list(strict.width = "no", digits.d = 3L, vec.len = 4L),
 	     demo.ask = "default", example.ask = "default",
 	     HTTPUserAgent = defaultUserAgent(),
 	     menu.graphics = TRUE, mailer = "mailto")
+    if (.Platform$pkgType != "source")
+        op.utils[["install.packages.compile.from.source"]] =
+            Sys.getenv("R_COMPILE_AND_INSTALL_PACKAGES", "interactive")
+
     extra <-
         if(.Platform$OS.type == "windows") {
             list(unzip = "internal",
                  editor = if(length(grep("Rgui", commandArgs(), TRUE))) "internal" else "notepad",
-                 repos = c(CRAN="@CRAN@",
-                           CRANextra="http://www.stats.ox.ac.uk/pub/RWin")
+                 repos = c(CRAN = "@CRAN@",
+                           CRANextra = "http://www.stats.ox.ac.uk/pub/RWin")
                  )
         } else
             list(unzip = Sys.getenv("R_UNZIPCMD"),
                  editor = Sys.getenv("EDITOR"),
-                 repos = c(CRAN="@CRAN@"))
+                 repos = c(CRAN = "@CRAN@"))
     op.utils <- c(op.utils, extra)
     toset <- !(names(op.utils) %in% names(op))
     if(any(toset)) options(op.utils[toset])
diff --git a/src/library/utils/inst/Sweave/example-1.Rnw b/src/library/utils/inst/Sweave/example-1.Rnw
index f9c86cb..a09625f 100644
--- a/src/library/utils/inst/Sweave/example-1.Rnw
+++ b/src/library/utils/inst/Sweave/example-1.Rnw
@@ -15,14 +15,18 @@ data(airquality, package="datasets")
 library("stats")
 kruskal.test(Ozone ~ Month, data = airquality)
 @
-which shows that the location parameter of the Ozone 
-distribution varies significantly from month to month. Finally we
-include a boxplot of the data:
+which shows that the location parameter of the Ozone
+distribution varies significantly from month to month. Finally, we
+include a boxplot of the data, using
+%% want an eval=FALSE case and referencing a previous chunk:
+<<boxp, eval=FALSE>>=
+boxplot(Ozone ~ Month, data = airquality)
+@
 
 \begin{center}
 <<fig=TRUE,echo=FALSE>>=
 library("graphics")
-boxplot(Ozone ~ Month, data = airquality)
+<<boxp>>
 @
 \end{center}
 
diff --git a/src/library/utils/inst/doc/Sweave.pdf b/src/library/utils/inst/doc/Sweave.pdf
index fe1ec8a..64a00bd 100644
Binary files a/src/library/utils/inst/doc/Sweave.pdf and b/src/library/utils/inst/doc/Sweave.pdf differ
diff --git a/src/library/utils/man/BATCH.Rd b/src/library/utils/man/BATCH.Rd
index 7f9f1e0..5b48127 100644
--- a/src/library/utils/man/BATCH.Rd
+++ b/src/library/utils/man/BATCH.Rd
@@ -1,5 +1,5 @@
 % File src/library/utils/man/BATCH.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2013 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/utils/man/INSTALL.Rd b/src/library/utils/man/INSTALL.Rd
index 23c6862..3ef1918 100644
--- a/src/library/utils/man/INSTALL.Rd
+++ b/src/library/utils/man/INSTALL.Rd
@@ -1,5 +1,5 @@
 % File src/library/utils/man/INSTALL.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2014 R Core Team
 % Distributed under GPL 2 or later
 
@@ -105,7 +105,7 @@
 #ifdef unix
 
   Option \option{--build} can be used to tar up the installed package
-  for distribution as a binary package (as used on OS X).  This is done
+  for distribution as a binary package (as used on macOS).  This is done
   by \code{utils::tar} unless environment variable \env{R_INSTALL_TAR}
   is set.
 #endif
diff --git a/src/library/utils/man/PkgUtils.Rd b/src/library/utils/man/PkgUtils.Rd
index fd7aa88..5fc8de4 100644
--- a/src/library/utils/man/PkgUtils.Rd
+++ b/src/library/utils/man/PkgUtils.Rd
@@ -1,5 +1,5 @@
 % File src/library/utils/man/PkgUtils.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2013 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/utils/man/Question.Rd b/src/library/utils/man/Question.Rd
index c6dd02f..572db6f 100644
--- a/src/library/utils/man/Question.Rd
+++ b/src/library/utils/man/Question.Rd
@@ -1,5 +1,5 @@
 % File src/library/utils/man/Question.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2009 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/utils/man/REMOVE.Rd b/src/library/utils/man/REMOVE.Rd
index a3b7601..e517c4d 100644
--- a/src/library/utils/man/REMOVE.Rd
+++ b/src/library/utils/man/REMOVE.Rd
@@ -1,10 +1,8 @@
 % File src/library/utils/man/REMOVE.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2009 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2014 R Core Team
 % Distributed under GPL 2 or later
 
-\newcommand{\sspace}{\ifelse{latex}{\out{~}}{ }}
-
 \name{REMOVE}
 \alias{REMOVE}
 \title{Remove Add-on Packages}
diff --git a/src/library/utils/man/RHOME.Rd b/src/library/utils/man/RHOME.Rd
index 95e2c7a..85655e4 100644
--- a/src/library/utils/man/RHOME.Rd
+++ b/src/library/utils/man/RHOME.Rd
@@ -1,5 +1,5 @@
 % File src/library/utils/man/RHOME.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2013 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/utils/man/RShowDoc.Rd b/src/library/utils/man/RShowDoc.Rd
index 702e747..5c61b5c 100644
--- a/src/library/utils/man/RShowDoc.Rd
+++ b/src/library/utils/man/RShowDoc.Rd
@@ -1,6 +1,6 @@
 % File src/library/utils/man/RShowDoc.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2012 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2015 R Core Team
 % Distributed under GPL 2 or later
 
 \name{RShowDoc}
@@ -14,7 +14,8 @@ RShowDoc(what, type = c("pdf", "html", "txt"), package)
 }
 \arguments{
   \item{what}{a character string: see \sQuote{Details}.}
-  \item{type}{an optional character string giving the preferred format.}
+  \item{type}{an optional character string giving the preferred format.
+      Can be abbreviated.}
   \item{package}{an optional character string specifying the name of a
     package within which to look for documentation.}
 }
@@ -36,6 +37,13 @@ RShowDoc(what, type = c("pdf", "html", "txt"), package)
   The documentation types are tried in turn starting with the first
   specified in \code{type} (or \code{"pdf"} if none is specified).
 }
+\seealso{
+  For displaying regular help files, \code{\link{help}} (or
+  \code{\link{?}}) and \code{\link{help.start}}.
+
+  For \code{type = "txt"}, \code{\link{file.show}} is used.
+  \code{\link{vignette}}s are nicely viewed via \code{RShowDoc(*, package= . )}.
+}
 \value{
   A invisible character string given the path to the file found.
 }
diff --git a/src/library/utils/man/RSiteSearch.Rd b/src/library/utils/man/RSiteSearch.Rd
index 8799e19..d6d8a17 100644
--- a/src/library/utils/man/RSiteSearch.Rd
+++ b/src/library/utils/man/RSiteSearch.Rd
@@ -1,5 +1,5 @@
 % File src/library/utils/man/RSiteSearch.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2010 R Core Team
 % Distributed under GPL 2 or later
 
@@ -28,6 +28,7 @@ RSiteSearch(string,
     search.  If the words are to be searched as one entity, enclose all
     words in braces (see the first example).}
   \item{restrict}{a character vector, typically of length greater than one.
+    Values can be abbreviated.
     Possible areas to search in:
     \code{functions} for help pages,
     \code{views} for task views and
diff --git a/src/library/utils/man/Rprof.Rd b/src/library/utils/man/Rprof.Rd
index edf23a3..716d052 100644
--- a/src/library/utils/man/Rprof.Rd
+++ b/src/library/utils/man/Rprof.Rd
@@ -1,5 +1,5 @@
 % File src/library/utils/man/Rprof.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2010 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/utils/man/Rprofmem.Rd b/src/library/utils/man/Rprofmem.Rd
index 05b5fd4..bf9b5d0 100644
--- a/src/library/utils/man/Rprofmem.Rd
+++ b/src/library/utils/man/Rprofmem.Rd
@@ -1,5 +1,5 @@
 % File src/library/utils/man/Rprofmem.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2007 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/utils/man/Rscript.Rd b/src/library/utils/man/Rscript.Rd
index 0e7de74..93b771e 100644
--- a/src/library/utils/man/Rscript.Rd
+++ b/src/library/utils/man/Rscript.Rd
@@ -1,6 +1,6 @@
 % File src/library/utils/man/Rscript.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2013 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2017 R Core Team
 % Distributed under GPL 2 or later
 
 \name{Rscript}
@@ -90,6 +90,9 @@ Rscript -e "date()" -e "format(Sys.time(), \\"\%a \%b \%d \%X \%Y\\")"
 Rscript -e 'date()' -e 'format(Sys.time(), "\%a \%b \%d \%X \%Y")'
 #endif
 
+# Get the same initial packages in the same order as default R:
+Rscript --default-packages=methods,datasets,utils,grDevices,graphics,stats -e 'sessionInfo()'
+
 ## example #! script for a Unix-alike
 
 #! /path/to/Rscript --vanilla --default-packages=utils
diff --git a/src/library/utils/man/Rtangle.Rd b/src/library/utils/man/Rtangle.Rd
index eca92c5..153ba24 100644
--- a/src/library/utils/man/Rtangle.Rd
+++ b/src/library/utils/man/Rtangle.Rd
@@ -1,6 +1,6 @@
 % File src/library/utils/man/Rtangle.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2011 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2016 R Core Team
 % Distributed under GPL 2 or later
 
 \name{Rtangle}
@@ -9,25 +9,32 @@
 \title{R Driver for Stangle}
 \description{
   A driver for \code{\link{Stangle}} that extracts \R code chunks.
+  Notably all \code{RtangleSetup()} arguments may be used as arguments
+  in the \code{\link{Stangle}()} call.
 }
 \usage{
 Rtangle()
 RtangleSetup(file, syntax, output = NULL, annotate = TRUE,
-             split = FALSE, quiet = FALSE, ...)
+             split = FALSE, quiet = FALSE, drop.evalFALSE = FALSE, ...)
 }
 \arguments{
-  \item{file}{Name of Sweave source file.  See the description of the
+  \item{file}{name of Sweave source file.  See the description of the
     corresponding argument of \code{\link{Sweave}}.}
-  \item{syntax}{An object of class \code{SweaveSyntax}.}
-  \item{output}{Name of output file used unless \code{split = TRUE}:
+  \item{syntax}{an object of class \code{SweaveSyntax}.}
+  \item{output}{name of output file used unless \code{split = TRUE}:
     see \sQuote{Details}.}
-  \item{annotate}{By default, code chunks are separated by comment
-    lines specifying the names and numbers of the code chunks.  If
-    \code{FALSE} the decorating comments are omitted.}
-  \item{split}{Split output into a file for each code chunk?}
-  \item{quiet}{If \code{TRUE} all progress messages are suppressed.}
-  \item{\dots}{Additional named arguments setting defaults for further
-    options.}
+  \item{annotate}{a logical or \code{\link{function}}.  When true, as by
+    default, code chunks are separated by comment lines specifying the
+    names and line numbers of the code chunks.
+    If \code{FALSE} the decorating comments are omitted.  Alternatively,
+    \code{annotate} may be a function, see section \sQuote{Chunk annotation}.}
+  \item{split}{split output into a file for each code chunk?}
+  \item{quiet}{logical to suppress all progress messages.}
+  \item{drop.evalFALSE}{logical; When false, as by default, all chunks with
+    option \code{eval = FALSE} are \emph{commented out} in the output;
+    otherwise (\code{drop.evalFALSE = TRUE}) they are omitted entirely.}
+  \item{\dots}{additional named arguments setting defaults for further
+    options listed in \sQuote{Supported Options}.}
 }
 \details{
   Unless \code{split = TRUE}, the default name of the output file is
@@ -40,7 +47,12 @@ RtangleSetup(file, syntax, output = NULL, annotate = TRUE,
   chunk is written to a separate file with extension the name of the
   \sQuote{engine} (default \file{.R}).
 
-  The annotation is of one of the forms%
+  Note that this driver does more than simply extract the code chunks verbatim,
+  because chunks may re-use earlier chunks.
+}
+
+\section{Chunk annotation (\code{annotate})}{
+  By default \code{annotate = TRUE}, the annotation is of one of the forms%
 \preformatted{###################################################
 ### code chunk number 3: viewport
 ###################################################
@@ -53,11 +65,15 @@ RtangleSetup(file, syntax, output = NULL, annotate = TRUE,
 ### code chunk number 19: trellisdata (eval = FALSE)
 ###################################################
 }
-using either the chunk label or the file name and line numbers.
+  using either the chunk label (if present, i.e., when specified in the
+  source) or the file name and line numbers.
 
-  Note that this driver does not simple extract the code chunks verbatim
-  because code chunks can re-use earlier chunks.
+  \code{annotate} may be a function with formal arguments
+  \code{(options, chunk, output)}, e.g. to produce less dominant chunk
+  annotations; see \code{Rtangle()$runcode} how it is called instead of
+  the default.
 }
+
 \section{Supported Options}{
   \code{Rtangle} supports the following options for code chunks (the
   values in parentheses show the default values):
@@ -89,9 +105,30 @@ using either the chunk label or the file name and line numbers.
 \author{Friedrich Leisch and R-core.}
 \seealso{
   \sQuote{\href{../doc/Sweave.pdf}{Sweave User Manual}}, a vignette in
-  the \pkg{utils} package.
+  the \pkg{utils} package.%% ../vignettes/Sweave.Rnw
 
   \code{\link{Sweave}}, \code{\link{RweaveLatex}}
 }
+\examples{
+nmRnw <- "example-1.Rnw"
+exfile <- system.file("Sweave", nmRnw, package = "utils")
+## Create R source file
+Stangle(exfile)
+nmR <- sub("Rnw$", "R", nmRnw) # the (default) R output file name
+if(interactive()) file.show("example-1.R")
+\dontshow{file.rename("example-1.R", "example-1_def.R")}
+## Smaller R source file with custom annotation:
+my.Ann <- function(options, chunk, output) {
+  cat("### chunk #", options$chunknr, ": ",
+      if(!is.null(ol <- options$label)) ol else .RtangleCodeLabel(chunk),
+      if(!options$eval) " (eval = FALSE)", "\n",
+      file = output, sep = "")
+}
+Stangle(exfile, annotate = my.Ann)
+if(interactive()) file.show("example-1.R")
+\dontshow{file.rename("example-1.R", "example-1_myA.R")}
+Stangle(exfile, annotate = my.Ann, drop.evalFALSE=TRUE)
+if(interactive()) file.show("example-1.R")
+\dontshow{file.rename("example-1.R", "example-1_myA-noF.R")}
+}
 \keyword{utilities}
-
diff --git a/src/library/utils/man/RweaveLatex.Rd b/src/library/utils/man/RweaveLatex.Rd
index 66242e4..3518503 100644
--- a/src/library/utils/man/RweaveLatex.Rd
+++ b/src/library/utils/man/RweaveLatex.Rd
@@ -1,17 +1,16 @@
 % File src/library/utils/man/RweaveLatex.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2013 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2017 R Core Team
 % Distributed under GPL 2 or later
 
-\newcommand{\sspace}{\ifelse{latex}{\out{~}}{ }}
-
 \name{RweaveLatex}
 \alias{RweaveLatex}
 \alias{RweaveLatexSetup}
 \title{R/LaTeX Driver for Sweave}
 \description{
-  A driver for \code{\link{Sweave}} that translates R code chunks in
-  LaTeX files.
+  A driver for \code{\link{Sweave}} that translates \R code chunks in
+  LaTeX files by \dQuote{running them}, i.e., \code{\link{parse}()} and
+  \code{\link{eval}()} each.
 }
 \usage{
 RweaveLatex()
@@ -90,9 +89,9 @@ RweaveLatexSetup(file, syntax, output = NULL, quiet = FALSE,
   interfere with certain encoding and typeface selections.  If you have
   problems in the rendering of certain character sets, try this option.
 
-  As from \R 3.1.0 it also supports the \samp{[inconsolata]} option, to
-  render monospaced text in \code{inconsolata}, the font used by default
-  for \R help pages.
+  It also supports the \samp{[inconsolata]} option, to render monospaced
+  text in \code{inconsolata}, the font used by default for \R help
+  pages.
 
   The use of fancy quotes (see \code{\link{sQuote}}) can cause problems
   when setting \R output.  Either set
@@ -137,7 +136,7 @@ RweaveLatexSetup(file, syntax, output = NULL, quiet = FALSE,
       verbatim-like \samp{Soutput} environment.  If \code{"tex"}, the
       output is taken to be already proper LaTeX markup and included as
       is.  If \code{"hide"} then all output is completely suppressed
-      (but the code executed during the weave).}
+      (but the code executed during the weave).  Values can be abbreviated.}
 
     \item{print:}{logical (\code{FALSE}).  If \code{TRUE}, this forces
       auto-printing of all expressions.}
@@ -253,11 +252,17 @@ my.Swd <- function(name, width, height, ...)
                  units = "in", type = "quartz", bg = "transparent")
 @
 }
+  Alternatively for \R >= 3.4.0, if the function exists in a package
+  (rather than the \code{.GlobalEnv}) it can be used by setting
+  \code{grdevice = "pkg::my.Swd"} (or with \samp{:::} instead of
+  \samp{::} if the function is not exported).
+
   Currently only one custom device can be used for each chunk, but
   different devices can be used for different chunks.
 
   A replacement for \code{\link{dev.off}} can be provided as a function
-  with suffix \code{.off}, e.g.\sspace{}\code{my.Swd.off()}.
+  with suffix \code{.off}, e.g.\sspace{}\code{my.Swd.off()} or
+  \code{pkg::my.Swd.off()}, respectively.
 }
 
 \section{Hook Functions}{
diff --git a/src/library/utils/man/SHLIB.Rd b/src/library/utils/man/SHLIB.Rd
index 77b61c3..d382a2c 100644
--- a/src/library/utils/man/SHLIB.Rd
+++ b/src/library/utils/man/SHLIB.Rd
@@ -1,5 +1,5 @@
 % File src/library/utils/man/SHLIB.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2013 R Core Team
 % Distributed under GPL 2 or later
 
@@ -51,7 +51,7 @@
   items are passed to the linker.
 
   Objective C(++) support is optional when \R was configured: their main
-  usage is on OS X.
+  usage is on macOS.
 
   Note that the appropriate run-time libraries will be used when linking
   if C++, Fortran or Objective C(++) sources are supplied, but not for
diff --git a/src/library/utils/man/Sweave.Rd b/src/library/utils/man/Sweave.Rd
index 7dc0371..5796294 100644
--- a/src/library/utils/man/Sweave.Rd
+++ b/src/library/utils/man/Sweave.Rd
@@ -1,10 +1,8 @@
 % File src/library/utils/man/Sweave.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2013 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2016 R Core Team
 % Distributed under GPL 2 or later
 
-\newcommand{\CRANpkg}{\href{http://CRAN.R-project.org/package=#1}{\pkg{#1}}}
-
 \name{Sweave}
 \alias{Sweave}
 \alias{Stangle}
@@ -31,14 +29,17 @@ Stangle(file, driver = Rtangle(),
     supplied without the extension, but the function will only proceed
     if there is exactly one Sweave file in the directory whose
     basename matches \code{file}.}
-  \item{driver}{The actual workhorse, see \sQuote{Details}.}
+  \item{driver}{the actual workhorse, (a function returning) a named
+    \code{\link{list}} of five functions, see \sQuote{Details} or the
+    Sweave manual vignette.}
   \item{syntax}{\code{NULL} or an object of class \code{SweaveSyntax} or
     a character string with its name.
     See the section \sQuote{Syntax Definition}.}
   \item{encoding}{The default encoding to assume for \code{file}.}
-  \item{\dots}{Further arguments passed to the driver's setup function:
-    see section \sQuote{Drivers}, \code{\link{RweaveLatex}} and
-    \code{\link{Rtangle}}.}
+  \item{\dots}{further arguments passed to the driver's setup function:
+    see section \sQuote{Details}, or specifically the arguments of the
+    \code{R...Setup()} function in \code{\link{RweaveLatex}} and
+    \code{\link{Rtangle}}, respectively.}
 }
 
 \details{
@@ -112,7 +113,7 @@ Stangle(file, driver = Rtangle(),
 
   Further Sweave drivers are in, for example, packages \CRANpkg{R2HTML},
   \CRANpkg{ascii}, \CRANpkg{odfWeave} and \CRANpkg{pgfSweave}.
-  
+
   Non-Sweave vignettes may be built with \code{tools::\link[tools]{buildVignette}}.
 }
 
diff --git a/src/library/utils/man/SweaveSyntConv.Rd b/src/library/utils/man/SweaveSyntConv.Rd
index ca08de2..c9c5903 100644
--- a/src/library/utils/man/SweaveSyntConv.Rd
+++ b/src/library/utils/man/SweaveSyntConv.Rd
@@ -1,5 +1,5 @@
 % File src/library/utils/man/SweaveSyntConv.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2011 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/utils/man/SweaveUtils.Rd b/src/library/utils/man/SweaveUtils.Rd
index b8517f8..bdcef4a 100644
--- a/src/library/utils/man/SweaveUtils.Rd
+++ b/src/library/utils/man/SweaveUtils.Rd
@@ -1,6 +1,6 @@
 % File src/library/utils/man/SweaveUtils.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2007 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2016 R Core Team
 % Distributed under GPL 2 or later
 
 \name{SweaveUtils}
@@ -16,8 +16,9 @@
 \alias{makeRweaveLatexCodeRunner}
 \title{Sweave Driver Utilities}
 \description{
-  These functions are handy for writing Sweave drivers and currently not
-  documented. Look at the source code of the Sweave Latex driver (in this
+  These functions are handy for writing Sweave drivers and are
+  considered internal and hence not documented.  Look at the source code
+  of the Sweave Latex driver (in this
   package) or the HTML driver (in the R2HTML package from CRAN) to see
   how they can be used.
 }
diff --git a/src/library/utils/man/URLencode.Rd b/src/library/utils/man/URLencode.Rd
index b7bc6c2..c0b94bf 100644
--- a/src/library/utils/man/URLencode.Rd
+++ b/src/library/utils/man/URLencode.Rd
@@ -1,6 +1,6 @@
 % File src/library/utils/man/URLencode.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2008 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2015 R Core Team
 % Distributed under GPL 2 or later
 
 \name{URLencode}
@@ -8,41 +8,49 @@
 \alias{URLdecode}
 \title{Encode or Decode a (partial) URL}
 \description{
-  Functions to encode or decode characters in URLs.
+  Functions to percent-encode or decode characters in URLs.
 }
 \usage{
-URLencode(URL, reserved = FALSE)
+URLencode(URL, reserved = FALSE, repeated = FALSE)
 URLdecode(URL)
 }
 \arguments{
-  \item{URL}{A character string.}
-  \item{reserved}{should reserved characters be encoded?  See
-    \sQuote{Details}.}
+  \item{URL}{a character string.}
+  \item{reserved}{logical: should \sQuote{reserved} characters be
+    encoded? See \sQuote{Details}.}
+  \item{repeated}{logical: should apparently already-encoded URLs be
+    encoded again?}
 }
 \details{
   Characters in a URL other than the English alphanumeric characters and
   \samp{- _ . ~} should be encoded as \code{\%}
   plus a two-digit hexadecimal representation, and any single-byte
-  character can be so encoded. (Multi-byte characters are encoded as
-  byte-by-byte.)
+  character can be so encoded. (Multi-byte characters are encoded
+  byte-by-byte.)  The standard refers to this as \sQuote{percent-encoding}.
 
   In addition, \samp{! $ & ' ( ) * + , ; = : / ? @ # [ ]} are reserved
   characters, and should be encoded unless used in their reserved sense,
   which is scheme specific.  The default in \code{URLencode} is to leave
   them alone, which is appropriate for \samp{file://} URLs, but probably
   not for \samp{http://} ones.
+
+  An \sQuote{apparently already-encoded URL} is one containing
+  \code{\%xx} for two hexadecimal digits.
 }
 \value{
   A character string.
 }
 \references{
-  RFC 3986 \url{http://tools.ietf.org/html/rfc3986}
+  Internet STD 66 (formerly RFC 3986),
+  \url{https://tools.ietf.org/html/std66}
 }
 \examples{
 (y <- URLencode("a url with spaces and / and @"))
 URLdecode(y)
 (y <- URLencode("a url with spaces and / and @", reserved = TRUE))
 URLdecode(y)
-URLdecode("ab\%20cd")
+
+URLdecode(z <- "ab\%20cd")
+c(URLencode(z), URLencode(z, repeated = TRUE)) # first is usually wanted
 }
 \keyword{utilities}
diff --git a/src/library/utils/man/View.Rd b/src/library/utils/man/View.Rd
index a969936..0a4d0a7 100644
--- a/src/library/utils/man/View.Rd
+++ b/src/library/utils/man/View.Rd
@@ -1,6 +1,6 @@
 % File src/library/utils/man/View.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2009 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2015 R Core Team
 % Distributed under GPL 2 or later
 
 \name{View}
@@ -19,10 +19,11 @@ View(x, title)
     prefixed by \code{Data:}.}
 }
 \details{
-  Object \code{x} is coerced (if possible) to a data frame, and all
-  non-numeric columns are then coerced to character.   The object is
-  then viewed in a spreadsheet-like data viewer, a read-only version of
-  \code{\link{data.entry}}.
+
+  Object \code{x} is coerced (if possible) to a data frame, then
+  columns are converted to character using \code{\link{format.data.frame}}.  
+  The object is then viewed in a spreadsheet-like data viewer, a
+  read-only version of \code{\link{data.entry}}.
 
   If there are row names on the data frame that are not \code{1:nrow},
   they are displayed in a separate first column called \code{row.names}.
diff --git a/src/library/utils/man/adist.Rd b/src/library/utils/man/adist.Rd
index fb5af1d..c7229a8 100644
--- a/src/library/utils/man/adist.Rd
+++ b/src/library/utils/man/adist.Rd
@@ -1,6 +1,6 @@
 % File src/library/utils/man/adist.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 2011-2013 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 2011-2015 R Core Team
 % Distributed under GPL 2 or later
 
 \name{adist}
@@ -69,7 +69,7 @@ adist(x, y = NULL, costs = NULL, counts = FALSE, fixed = TRUE,
   into \var{t} (so that the transformation exactly matches \var{t}).
   This distance is computed for \code{partial = FALSE}, currently using
   a dynamic programming algorithm (see, e.g.,
-  \url{http://en.wikipedia.org/wiki/Levenshtein_distance}) with space
+  \url{https://en.wikipedia.org/wiki/Levenshtein_distance}) with space
   and time complexity \eqn{O(mn)}, where \eqn{m} and \eqn{n} are the
   lengths of \var{s} and \var{t}, respectively.  Additionally computing
   the transformation sequence and counts is \eqn{O(\max(m, n))}.
@@ -79,9 +79,9 @@ adist(x, y = NULL, costs = NULL, counts = FALSE, fixed = TRUE,
   \var{t} with minimal distance to the pattern \var{s} (which could be
   taken as a regular expression, in which case the principle of using
   the leftmost and longest match applies), see, e.g.,
-  \url{http://en.wikipedia.org/wiki/Approximate_string_matching}.  This
+  \url{https://en.wikipedia.org/wiki/Approximate_string_matching}.  This
   distance is computed for \code{partial = TRUE} using \samp{tre} by
-  Ville Laurikari (\url{http://http://laurikari.net/tre/}) and
+  Ville Laurikari (\url{http://laurikari.net/tre/}) and
   corresponds to the distance used by \code{\link{agrep}}.  In this
   case, the given cost values are coerced to integer.
 
@@ -94,7 +94,7 @@ adist(x, y = NULL, costs = NULL, counts = FALSE, fixed = TRUE,
   using the generalized Levenshtein distance.
 }
 \examples{
-## Cf. http://en.wikipedia.org/wiki/Levenshtein_distance
+## Cf. https://en.wikipedia.org/wiki/Levenshtein_distance
 adist("kitten", "sitting")
 ## To see the transformation counts for the Levenshtein distance:
 drop(attr(adist("kitten", "sitting", counts = TRUE), "counts"))
diff --git a/src/library/utils/man/alarm.Rd b/src/library/utils/man/alarm.Rd
index f79d4a5..9fa6c19 100644
--- a/src/library/utils/man/alarm.Rd
+++ b/src/library/utils/man/alarm.Rd
@@ -1,5 +1,5 @@
 % File src/library/utils/man/alarm.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2013 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/utils/man/apropos.Rd b/src/library/utils/man/apropos.Rd
index 1faf39a..f9f7c4c 100644
--- a/src/library/utils/man/apropos.Rd
+++ b/src/library/utils/man/apropos.Rd
@@ -1,6 +1,6 @@
 % File src/library/utils/man/apropos.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2009 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2016 R Core Team
 % Distributed under GPL 2 or later
 
 \name{apropos}
@@ -13,42 +13,47 @@ find(what, mode = "any", numeric = FALSE, simple.words = TRUE)
 \alias{apropos}
 \alias{find}
 \arguments{
-  \item{what}{character string with name of an object, or more generally
-    a \link{regular expression} to match against.}
+  \item{what}{character string.  For \code{simple.words = FALSE}
+    the name of an object; otherwise
+    a \link{regular expression} to match object names against.}
   \item{where, numeric}{a logical indicating whether positions in the
     search list should also be returned}
   \item{ignore.case}{logical indicating if the search should be
-    case-insensitive, \code{TRUE} by default.  Note that in \R versions
-    prior to 2.5.0, the default was implicitly \code{ignore.case = FALSE}.}
+    case-insensitive, \code{TRUE} by default.}
   \item{mode}{character; if not \code{"any"}, only objects whose
     \code{\link{mode}} equals \code{mode} are searched.}
   \item{simple.words}{logical; if \code{TRUE}, the \code{what} argument is
-    only searched as whole word.}
+    only searched as a whole word.}
 }
 \description{
   \code{apropos()} returns a character vector giving the names of
-  all objects in the search list matching \code{what}.
+  objects in the search list matching (as a regular expression)
+  \code{what}.
 
-  \code{find()} is a different user interface to the same task.
+  \code{find()} returns where objects of a given name can be found.
 }
 \details{
   If \code{mode != "any"} only those objects which are of mode \code{mode}
   are considered.
-  If \code{where} is \code{TRUE}, the positions in the search list are
-  returned as the names attribute.
 
-  \code{find} is a different user interface for the same task as
-  \code{apropos}. However, by default (\code{simple.words == TRUE}),
-  only full words are searched with \code{\link{grep}(fixed = TRUE)}.
+  \code{find} is a different user interface for a similar task to
+  \code{apropos}. By default (\code{simple.words == TRUE}),
+  only whole names are matched. Unlike \code{apropos}, matching is
+  always case-sensitive.
+
+  Unlike the default behaviour of \code{\link{ls}}, names which
+  begin with a \samp{.} are included (and these are often
+  \sQuote{internal} objects --- as from \R 3.4.0 most such are excluded).
 }
-\author{Kurt Hornik and Martin Maechler (May 1997).}
+\author{Originally, Kurt Hornik and Martin Maechler (May 1997).}
 \value{
-  For \code{apropos} character vector, sorted by name, possibly with
-  names giving the (numerical) positions on the search path.
+  For \code{apropos}, a character vector sorted by name.  For
+  \code{where = TRUE} this has names giving the (numerical) positions on
+  the search path.
 
-  For \code{find}, either a character vector of environment names, or for
-  \code{numeric = TRUE}, a numerical vector of positions on the search path,
-  with names giving the names of the corresponding environments.
+  For \code{find}, either a character vector of environment names or
+  (for \code{numeric = TRUE}) a numerical vector of positions on the
+  search path with names the names of the corresponding environments.
 }
 \seealso{
   \code{\link{glob2rx}} to convert wildcard patterns to regular expressions.
@@ -62,9 +67,7 @@ require(stats)
 
 %% some of these have enormous output that varies a lot by version
 \dontrun{apropos("lm")}
-apropos("GLM")                      # more than a dozen
-## that may include internal objects starting '.__C__' if
-## methods is attached
+apropos("GLM")                      # several
 apropos("GLM", ignore.case = FALSE) # not one
 apropos("lq")
 
diff --git a/src/library/utils/man/aregexec.Rd b/src/library/utils/man/aregexec.Rd
index 0978eb9..a09d920 100644
--- a/src/library/utils/man/aregexec.Rd
+++ b/src/library/utils/man/aregexec.Rd
@@ -1,5 +1,5 @@
 % File src/library/utils/man/aregexec.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 2011-2 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/utils/man/aspell-utils.Rd b/src/library/utils/man/aspell-utils.Rd
index 93d3e27..36c01f8 100644
--- a/src/library/utils/man/aspell-utils.Rd
+++ b/src/library/utils/man/aspell-utils.Rd
@@ -1,5 +1,5 @@
 % File src/library/utils/man/aspell-utils.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2012 R Core Team
 % Distributed under GPL 2 or later
 
@@ -79,7 +79,7 @@ aspell_write_personal_dictionary_file(x, out, language = "en",
   specified using a package defaults file which should go as
   \file{defaults.R} into the \file{.aspell} subdirectory of \code{dir},
   and provides defaults via assignments of suitable named lists, e.g.,
-  \preformatted{  vignettes <- list(control = "--add-tex-command='mycmd op'")}
+\preformatted{vignettes <- list(control = "--add-tex-command='mycmd op'")}
   for vignettes (when using Aspell) and similarly assigning to
   \code{Rd_files}, \code{R_files} and \code{C_files} for Rd files, R
   files and C level message defaults.
diff --git a/src/library/utils/man/aspell.Rd b/src/library/utils/man/aspell.Rd
index 7e85014..74a6826 100644
--- a/src/library/utils/man/aspell.Rd
+++ b/src/library/utils/man/aspell.Rd
@@ -1,6 +1,6 @@
 % File src/library/utils/man/aspell.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2011 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2016 R Core Team
 % Distributed under GPL 2 or later
 
 \name{aspell}
@@ -68,7 +68,7 @@ aspell(files, filter, control = list(), encoding = "unknown",
   character vector with the respective field names).  By default,
   \samp{Title} and \samp{Description} fields are kept.
 
-  The print method has for the objects returned by \code{aspell} has an
+  The print method for the objects returned by \code{aspell} has an
   \code{indent} argument controlling the indentation of the positions of
   possibly mis-spelled words.  The default is 2; Emacs users may find it
   useful to use an indentation of 0 and visit output in grep-mode.  It
@@ -87,19 +87,25 @@ aspell(files, filter, control = list(), encoding = "unknown",
   A data frame inheriting from \code{aspell} (which has a useful print
   method) with the information about possibly mis-spelled words.
 }
+\references{
+  Kurt Hornik and Duncan Murdoch (2011),
+  Watch your spelling!
+  \emph{The R Journal} \bold{3}(2), 22--28.
+  \url{https://journal.r-project.org/archive/2011-2/RJournal_2011-2_Hornik+Murdoch.pdf}.
+}
 \seealso{
   \link{aspell-utils} for utilities for spell checking packages.
 
   Package \pkg{Aspell} on Omegahat
-  (\url{http://www.omegahat.org/Aspell}) for a fine-grained R interface
+  (\url{http://www.omegahat.net/Aspell}) for a fine-grained R interface
   to the Aspell library.
 }
 \examples{
 \dontrun{
-## To check all Rd files in a directory, (additonally) skipping the
+## To check all Rd files in a directory, (additionally) skipping the
 ## \references sections.
 files <- Sys.glob("*.Rd")
-aspell(files, filter = list("Rd", drop = "\\references"))
+aspell(files, filter = list("Rd", drop = "\\\\references"))
 
 ## To check all Sweave files
 files <- Sys.glob(c("*.Rnw", "*.Snw", "*.rnw", "*.snw"))
diff --git a/src/library/utils/man/available.packages.Rd b/src/library/utils/man/available.packages.Rd
index 2758d4f..df7bb99 100644
--- a/src/library/utils/man/available.packages.Rd
+++ b/src/library/utils/man/available.packages.Rd
@@ -1,10 +1,8 @@
 % File src/library/utils/man/available.packages.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2014 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2015 R Core Team
 % Distributed under GPL 2 or later
 
-\newcommand{\sspace}{\ifelse{latex}{\out{~}}{ }}
-
 \name{available.packages}
 \alias{available.packages}
 \title{List Available Packages at CRAN-like Repositories}
@@ -15,11 +13,9 @@
   from a local mirror).
 }
 \usage{
-available.packages(contriburl =
-                   contrib.url(getOption("repos"), type),
-                   method, fields = NULL,
-                   type = getOption("pkgType"),
-                   filters = NULL)
+available.packages(contriburl = contrib.url(repos, type), method,
+                   fields = NULL, type = getOption("pkgType"),
+                   filters = NULL, repos = getOption("repos"))
 }
 \arguments{
   \item{contriburl}{
@@ -33,6 +29,8 @@ available.packages(contriburl =
   \item{type}{
     character string, indicate which type of packages: see
     \code{\link{install.packages}}.
+  
+    If \code{type = "both"} this will use the source repository.
   }
   \item{fields}{
     a character vector giving the fields to extract from
@@ -43,16 +41,19 @@ available.packages(contriburl =
   \item{filters}{
     a character vector or list or \code{NULL} (default). See \sQuote{Details}.
   }
+  \item{repos}{
+    character vector, the base URL(s) of the repositories to use.
+  }
 }
 \details{
-  The list is either copied from a local mirror (specified by a
+  The list of packages is either copied from a local mirror (specified by a
   \samp{file://} URI) or downloaded.  If downloaded, the list is cached
   for the \R session in a per-repository file in \code{\link{tempdir}()}
   with a name like
 \preformatted{repos_http\%3a\%2f\%2fcran.r-project.org\%2fsrc\%2fcontrib.rds}
 
-  By default, the report includes only packages whose version and OS
-  requirements are met by the running version of \R, and only gives
+  By default, the return value includes only packages whose version and
+  OS requirements are met by the running version of \R, and only gives
   information on the latest versions of packages.
 
   Argument \code{filters} can be used to select which of the packages on the
@@ -65,7 +66,7 @@ available.packages(contriburl =
   The built-in filters are
   \describe{
     \item{\code{"R_version"}}{Exclude packages whose \R version
-      requirements are not met}
+      requirements are not met.}
     \item{\code{"OS_type"}}{Exclude packages whose OS requirement is
       incompatible with this version of \R: that is exclude
       Windows-only packages on a Unix-alike platform
@@ -81,7 +82,7 @@ available.packages(contriburl =
     \item{\code{"license/FOSS"}}{Include only packages for which
       installation can proceed solely based on packages which can be
       verified as Free or Open Source Software (FOSS, e.g.,
-      \url{http://en.wikipedia.org/wiki/FOSS}) employing the available
+      \url{https://en.wikipedia.org/wiki/FOSS}) employing the available
       license specifications.  Thus both the package and any packages
       that it depends on to load need to be \emph{known to be} FOSS.
 
@@ -90,7 +91,7 @@ available.packages(contriburl =
     }
     \item{\code{"license/restricts_use"}}{Include only packages for
       which installation can proceed solely based on packages which are
-      guaranteed not to restrict use.
+      known not to restrict use.
     }
     \item{\code{"CRAN"}}{Use CRAN versions in preference to versions
       from other repositories (even if these have a higher version
@@ -99,13 +100,13 @@ available.packages(contriburl =
       \code{add = TRUE}.
     }
   }
-  If all the filters are from this set they can be specified as a
+  If all the filters are from this set, then they can be specified as a
   character vector; otherwise \code{filters} should be a list with
   elements which are character strings, user-defined functions or
   \code{add = TRUE} (see below).
 
   User-defined filters are functions which take a single argument, a
-  matrix of the form returned by by \code{available.packages}, and
+  matrix of the form returned by \code{available.packages}, and
   return a matrix consisting of a subset of the rows of the argument.
 
   The special \sQuote{filter} \code{add = TRUE} appends the other
diff --git a/src/library/utils/man/bibentry.Rd b/src/library/utils/man/bibentry.Rd
index cb7642c..6a8638d 100644
--- a/src/library/utils/man/bibentry.Rd
+++ b/src/library/utils/man/bibentry.Rd
@@ -1,21 +1,36 @@
 % File src/library/utils/man/bibentry.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2014 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2017 R Core Team
 % Distributed under GPL 2 or later
 
 \name{bibentry}
+\title{Bibliography Entries}
 \alias{bibentry}
 \alias{print.bibentry}
-\title{Bibliography Entries}
+\alias{format.bibentry}
+\alias{sort.bibentry}
+\alias{print.citation}
+\alias{format.citation}
 \description{
   Functionality for representing and manipulating bibliographic
   information in enhanced BibTeX style.
 }
 \usage{
 bibentry(bibtype, textVersion = NULL, header = NULL, footer = NULL,
-         key = NULL, ..., other = list(),
+         key = NULL, \dots, other = list(),
          mheader = NULL, mfooter = NULL)
-\method{print}{bibentry}(x, style = "text", .bibstyle, ...)
+
+\method{print}{bibentry}(x, style = "text", .bibstyle, \dots)
+
+\method{format}{bibentry}(x, style = "text", .bibstyle = NULL,
+       citation.bibtex.max = getOption("citation.bibtex.max", 1),
+       bibtex = length(x) <= citation.bibtex.max,
+       sort = FALSE, \dots)
+
+\method{sort}{bibentry}(x, decreasing = FALSE, .bibstyle = NULL, drop = FALSE, \dots)
+
+\method{print}{citation}(x, style = "citation", \dots)
+\method{format}{citation}(x, style = "citation", \dots)
 }
 \arguments{
   \item{bibtype}{a character string with a BibTeX entry type.
@@ -26,15 +41,19 @@ bibentry(bibtype, textVersion = NULL, header = NULL, footer = NULL,
   \item{header}{a character string with optional header text.}
   \item{footer}{a character string with optional footer text.}
   \item{key}{a character string giving the citation key for the entry.}
-  \item{...}{for \code{bibentry}: arguments of the form
+  \item{\dots}{for \code{bibentry}: arguments of the form
     \code{\var{tag}=\var{value}} giving the fields of the entry, with
     \var{tag} and \var{value} the name and value of the field,
     respectively.  Arguments with empty values are dropped.
     See \bold{Entry Fields} for details.
 
-    For the \code{print} method, extra parameters to pass to the
-    renderer.}
-  \item{other}{a list of arguments as in \code{...} (useful in
+    For the \code{print()} method, extra arguments to pass to the
+    renderer which typically includes the \code{format()} method.
+
+    For the \code{citation} class methods, arguments passed to the next
+    method, i.e., the corresponding \code{bibentry} one.
+  }
+  \item{other}{a list of arguments as in \code{\dots} (useful in
     particular for fields named the same as formals of
     \code{bibentry}).}
   \item{mheader}{a character string with optional \dQuote{outer} header
@@ -45,7 +64,24 @@ bibentry(bibtype, textVersion = NULL, header = NULL, footer = NULL,
   \item{style}{an optional character string specifying the print style.
     If present, must be a unique abbreviation (with case ignored) of the available
     styles, see \bold{Details}.}
+  \item{decreasing}{logical, passed to \code{\link{order}} indicating
+    the sort direction.}
   \item{.bibstyle}{a character string naming a bibliography style.}
+  \item{citation.bibtex.max}{(\emph{deprecated}, use \code{bibtex =
+    T|F} instead!) a number, say \eqn{m}, indicating that the bibtex
+    code should be given in addition to the formatted tex \emph{when}
+    there are not more than \eqn{m} entries.  The default is taken as
+    \code{\link{getOption}("citation.bibtex.max", 1)} which is \code{1}
+    typically.  For example, to see no bibtex at all, you can change the
+    default by \code{\link{options}(citation.bibtex.max = 0)}.}
+  \item{bibtex}{logical indicating if bibtex code should be given
+    additionally; currently applies only to \code{style = "citation"}.
+    The default depends on on the number of (bib) entries and
+    \code{\link{getOption}("citation.bibtex.max")}.}
+  \item{sort}{logical indicating if bibentries should be sorted, using
+    \code{\link[tools]{bibstyle}(.bibstyle)$sortKeys(x)}.}
+  \item{drop}{logical used as \code{x[ ..., drop=drop]} inside the
+    \code{sort()} method.}
 }
 \details{
   The bibentry objects created by \code{bibentry} can represent an
@@ -86,7 +122,7 @@ bibentry(bibtype, textVersion = NULL, header = NULL, footer = NULL,
   \code{citation.bibtex.max} (with default
   \code{\link{getOption}("citation.bibtex.max")} which defaults to 1)
   determines for up to how many citation bibentries text style is shown
-  together with with bibtex, automatically.
+  together with bibtex, automatically.
 
   It is possible to subscript bibentry objects by their keys (which are
   used for character subscripts if the names are \code{NULL}).
@@ -133,6 +169,10 @@ bibentry(bibtype, textVersion = NULL, header = NULL, footer = NULL,
     \item{booktitle:}{Title of a book, part of which is being cited.}
     \item{chapter:}{A chapter (or section or whatever) number.}
 
+    \item{doi:}{The DOI
+      (\url{https://en.wikipedia.org/wiki/Digital_Object_Identifier})
+      for the reference.}
+
     \item{editor:}{Name(s) of editor(s), same format as \code{author}.}
 
     \item{institution:}{The publishing institution of a technical report.}
@@ -155,6 +195,10 @@ bibentry(bibtype, textVersion = NULL, header = NULL, footer = NULL,
 
     \item{title:}{The work's title.}
 
+    \item{url:}{A URL for the reference.
+      (If the URL is an expanded DOI, we recommend to use the \samp{doi}
+      field with the unexpanded DOI instead.)}
+
     \item{volume:}{The volume of a journal or multi-volume book.}
 
     \item{year:}{The year of publication.}
@@ -172,7 +216,7 @@ rref <- bibentry(
    organization = "R Foundation for Statistical Computing",
    address = "Vienna, Austria",
    year = 2014,
-   url = "http://www.R-project.org/")
+   url = "https://www.R-project.org/")
 
 ## Different printing styles
 print(rref)
@@ -196,7 +240,7 @@ bref <- c(
      ),
      year = "2012",
      note = "R package version 1.3-4",
-     url = "http://CRAN.R-project.org/package=boot",
+     url = "https://CRAN.R-project.org/package=boot",
      key = "boot-package"
    ),
 
diff --git a/src/library/utils/man/browseEnv.Rd b/src/library/utils/man/browseEnv.Rd
index badea65..321e847 100644
--- a/src/library/utils/man/browseEnv.Rd
+++ b/src/library/utils/man/browseEnv.Rd
@@ -1,6 +1,6 @@
 % File src/library/utils/man/browseEnv.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2013 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2015 R Core Team
 % Distributed under GPL 2 or later
 
 \name{browseEnv}
@@ -27,7 +27,7 @@ browseEnv(envir = .GlobalEnv, pattern,
     with matching names.}
   \item{html}{is used to display the workspace
     on a HTML page in your favorite browser.  The default except when
-    running from \command{R.app} on OS X.}
+    running from \command{R.app} on macOS.}
   \item{expanded}{whether to show one level of recursion.  It can be useful
     to switch it to \code{FALSE} if your workspace is large.  This
     option is ignored if \code{html} is set to \code{FALSE}.}
@@ -41,13 +41,13 @@ browseEnv(envir = .GlobalEnv, pattern,
 
 \details{
   Very experimental code: displays a static HTML page on all platforms
-  except \command{R.app} on OS X.
+  except \command{R.app} on macOS.
 
   Only allows one level of recursion into object structures.
 
   It can be generalized.  See sources for details.
-  Most probably, this should rather work through using the \file{tkWidget}
-  package (from \url{www.Bioconductor.org}).
+  Most probably, this should rather work through using the \pkg{tkWidget}
+  package (from \url{https://www.bioconductor.org}).
 }
 \seealso{
   \code{\link{str}}, \code{\link{ls}}.
diff --git a/src/library/utils/man/browseURL.Rd b/src/library/utils/man/browseURL.Rd
index ec629d6..b4960ac 100644
--- a/src/library/utils/man/browseURL.Rd
+++ b/src/library/utils/man/browseURL.Rd
@@ -1,22 +1,24 @@
 % File src/library/utils/man/browseURL.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2013 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2017 R Core Team
 % Distributed under GPL 2 or later
 
 \name{browseURL}
 \alias{browseURL}
-\title{Load URL into a WWW Browser}
+\title{Load URL into an HTML Browser}
 \description{
-  Load a given URL into a WWW browser.
+  Load a given URL into an HTML browser.
 }
 \usage{
 browseURL(url, browser = getOption("browser"),
           encodeIfNeeded = FALSE)
 }
 \arguments{
-  \item{url}{a non-empty character string giving the URL to be loaded.}
+  \item{url}{a non-empty character string giving the URL to be loaded.
+   Some platforms also accept file paths.
+  }
   \item{browser}{a non-empty character string giving the name of the
-    program to be used as hypertext browser.  It should be in the PATH,
+    program to be used as the HTML browser.  It should be in the PATH,
     or a full path specified.  Alternatively, an \R function to be
     called to invoke the browser.
 
@@ -38,16 +40,21 @@ browseURL(url, browser = getOption("browser"),
   made manually or automatically when \R was configured.  (See
   \code{\link{Startup}} for where to override that default value.)
   To suppress showing URLs altogether, use the value \code{"false"}.
-
+  
+  On many platforms it is best to set option \code{"browser"} to a
+  generic program/script and let that invoke the user's choice of
+  browser.  For example, on macOS use \command{open} and on many other
+  Unix-alikes use \command{xdg-open}.
+  
   If \code{browser} supports remote control and \R knows how to perform
-  it, the URL is opened in any already running browser or a new one if
+  it, the URL is opened in any already-running browser or a new one if
   necessary.  This mechanism currently is available for browsers which
   support the \code{"-remote openURL(...)"} interface (which includes
-  Mozilla >= 0.9.5 and Mozilla Firefox), Galeon, KDE konqueror
-  (\emph{via} kfmclient) and the GNOME interface to Mozilla.  Note that
-  the type of browser is determined from its name, so this mechanism
-  will only be used if the browser is installed under its canonical
-  name.
+  Mozilla and Opera), Galeon, KDE konqueror (\emph{via} kfmclient) and
+  the GNOME interface to Mozilla. (Firefox has dropped support, but
+  defaults to using an already-running browser.)  Note that the type of
+  browser is determined from its name, so this mechanism will only be
+  used if the browser is installed under its canonical name.
 
   Because \code{"-remote"} will use any browser displaying on the X
   server (whatever machine it is running on), the remote control
@@ -56,8 +63,7 @@ browseURL(url, browser = getOption("browser"),
   remote host.
 
   It is the caller's responsibility to encode \code{url} if necessary
-  (see \code{\link{URLencode}}).  This can be tricky for file URLs,
-  where the format accepted can depend on both browser and OS.
+  (see \code{\link{URLencode}}).
 
   To suppress showing URLs altogether, set \code{browser = "false"}.
   
@@ -68,7 +74,7 @@ browseURL(url, browser = getOption("browser"),
 \examples{
 \dontrun{## for KDE users who want to open files in a new tab
 options(browser = "kfmclient newTab")
-browseURL("http://www.r-project.org")
+browseURL("https://www.r-project.org")
 }}
 #endif
 #ifdef windows
@@ -85,9 +91,18 @@ browseURL("http://www.r-project.org")
   To suppress showing URLs altogether, set \code{browser = "false"}.
 }
 \examples{
-\dontrun{browseURL("http://www.r-project.org")
+\dontrun{browseURL("https://www.r-project.org")
 browseURL("file://d:/R/R-2.5.1/doc/html/index.html",
           browser = "C:/Program Files/Mozilla Firefox/firefox.exe")
 }}
 #endif
+\section{URL schemes}{
+  Which URL schemes are accepted is platform-specific: expect
+  \samp{http://}, \samp{https://} and \samp{ftp://} to work, but
+  \samp{mailto:} may or may not (and if it does may not use the user's
+  preferred email client).
+  
+  For the \samp{file://} scheme the format accepted (if any) can depend on
+  both browser and OS.
+}
 \keyword{file}
diff --git a/src/library/utils/man/browseVignettes.Rd b/src/library/utils/man/browseVignettes.Rd
index 78fe11f..e3a639d 100644
--- a/src/library/utils/man/browseVignettes.Rd
+++ b/src/library/utils/man/browseVignettes.Rd
@@ -1,6 +1,6 @@
 % File src/library/utils/man/browseVignettes.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 2007 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 2007-2014 R Core Team
 % Distributed under GPL 2 or later
 
 \name{browseVignettes}
diff --git a/src/library/utils/man/bug.report.Rd b/src/library/utils/man/bug.report.Rd
index 0b66f95..dbe03e7 100644
--- a/src/library/utils/man/bug.report.Rd
+++ b/src/library/utils/man/bug.report.Rd
@@ -1,6 +1,6 @@
 % File src/library/utils/man/bug.report.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2011 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2017 R Core Team
 % Distributed under GPL 2 or later
 
 \name{bug.report}
@@ -33,15 +33,17 @@ bug.report(subject = "",  address,
 }
 \details{
   If \code{package} is \code{NULL} or a base package, this opens the R
-  bugs tracker at \url{http://bugs.r-project.org/}.
+  bugs tracker at \url{https://bugs.r-project.org/}.
 
   If \code{package} is specified, it is assumed that the bug report is
-  about that package, and parts of its \file{DESCRIPTION} file are
-  added to the standard information.  If the package has a
-  \code{BugReports} field in the \file{DESCRIPTION} file, that URL
-  will be opened using \code{\link{browseURL}}, otherwise an email
-  directed to the package maintainer will be generated using
-  \code{\link{create.post}}.
+  about that package, and parts of its \file{DESCRIPTION} file are added
+  to the standard information.  If the package has a non-empty
+  \code{BugReports} field in the \file{DESCRIPTION} file specifying the
+  URL of a webpage, that URL will be opened using
+  \code{\link{browseURL}}, otherwise an email directed to the package
+  maintainer will be generated using \code{\link{create.post}}.  If
+  there is any other form of \code{BugReports} field or a \code{Contact}
+  field, this is examined as it may provide a preferred email address.
 }
 \value{Nothing useful.}
 \section{When is there a bug?}{
@@ -131,7 +133,7 @@ bug.report(subject = "",  address,
 
   A bug report can be generated using the function \code{bug.report()}.
   For reports on \R this will open the Web page at
-  \url{http://bugs.R-project.org/}: for a contributed package it will
+  \url{https://bugs.r-project.org/}: for a contributed package it will
   open the package's bug tracker Web page or help you compose an email
   to the maintainer.
 
diff --git a/src/library/utils/man/capture.output.Rd b/src/library/utils/man/capture.output.Rd
index b70671c..2a32cef 100644
--- a/src/library/utils/man/capture.output.Rd
+++ b/src/library/utils/man/capture.output.Rd
@@ -1,6 +1,6 @@
 % File src/library/utils/man/capture.output.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2011 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2015 R Core Team
 % Distributed under GPL 2 or later
 
 \name{capture.output}
@@ -12,7 +12,8 @@
   way that \code{\link{with}} is related to \code{\link{attach}}.
 }
 \usage{
-capture.output(\dots, file = NULL, append = FALSE)
+capture.output(\dots, file = NULL, append = FALSE,
+               type = c("output", "message"), split = FALSE)
 }
 \arguments{
   \item{\dots}{Expressions to be evaluated.}
@@ -21,11 +22,17 @@ capture.output(\dots, file = NULL, append = FALSE)
     it will be opened initially and closed on exit.}
   \item{append}{logical.  If \code{file} a file name or unopened
     connection, append or overwrite?}
+  \item{type, split}{are passed to \code{\link{sink}()}, see there.}
 }
 \details{
   An attempt is made to write output as far as possible to \code{file}
   if there is an error in evaluating the expressions, but for
   \code{file = NULL} all output will be lost.
+
+  Messages sent to \code{\link{stderr}()} (including those from
+  \code{\link{message}}, \code{\link{warning}} and \code{\link{stop}})
+  are captured by \code{type = "message"}.  Note that this can be
+  \dQuote{unsafe} and should only be used with care.
 }
 \value{
   A character string (if \code{file = NULL}), or invisible \code{NULL}.
@@ -35,15 +42,17 @@ capture.output(\dots, file = NULL, append = FALSE)
 
 \examples{
 require(stats)
-glmout <- capture.output(example(glm))
+glmout <- capture.output(summary(glm(case ~ spontaneous+induced,
+                                     data = infert, family = binomial())))
 glmout[1:5]
 capture.output(1+1, 2+2)
 capture.output({1+1; 2+2})
-\dontrun{
-## on Unix with enscript available
-ps <- pipe("enscript -o tempout.ps","w")
-capture.output(example(glm), file = ps)
-close(ps)
-}
+
+\dontrun{## on Unix-alike with a2ps available%% ?? pandoc with obeylines, obeyspaces
+op <- options(useFancyQuotes=FALSE)
+pdf <- pipe("a2ps -o - | ps2pdf - tempout.pdf", "w")
+capture.output(example(glm), file = pdf)
+close(pdf); options(op) ; system("evince tempout.pdf &")
+}% dont
 }
 \keyword{utilities}
diff --git a/src/library/utils/man/changedFiles.Rd b/src/library/utils/man/changedFiles.Rd
index 3903d0d..a038b31 100644
--- a/src/library/utils/man/changedFiles.Rd
+++ b/src/library/utils/man/changedFiles.Rd
@@ -1,5 +1,5 @@
 % File src/library/utils/man/changedFiles.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 2013 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/utils/man/chooseBioCmirror.Rd b/src/library/utils/man/chooseBioCmirror.Rd
index 4ba6cf3..bba1faf 100644
--- a/src/library/utils/man/chooseBioCmirror.Rd
+++ b/src/library/utils/man/chooseBioCmirror.Rd
@@ -1,6 +1,6 @@
 % File src/library/utils/man/chooseBioCmirror.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 2009-2013 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 2009-2015 R Core Team
 % Distributed under GPL 2 or later
 
 \name{chooseBioCmirror}
@@ -11,23 +11,37 @@
   Interact with the user to choose a Bioconductor mirror.
 }
 \usage{
-chooseBioCmirror(graphics = getOption("menu.graphics"), ind = NULL)
+chooseBioCmirror(graphics = getOption("menu.graphics"), ind = NULL,
+                 useHTTPS = getOption("useHTTPS", TRUE),
+                 local.only = FALSE)
 }
 \arguments{
-  \item{graphics}{logical.  If true, use a graphical list: on Windows or
-    the OS X GUI use a list box, and on a Unix-alike if package
-    \pkg{tcltk} and an X server are available, use a Tk
-    widget.  Otherwise use a text \code{\link{menu}}.}
+  \item{graphics}{Logical.  If true, use a graphical list: on Windows or
+    the macOS GUI use a list box, and on a Unix-alike use a Tk widget if
+    package \pkg{tcltk} and an X server are available.  Otherwise use a
+    text \code{\link{menu}}.}
   
   \item{ind}{Optional numeric value giving which entry to select.}
+
+  \item{useHTTPS}{Whether to prefer HTTPS mirrors (see
+    \code{\link{chooseCRANmirror}}).}
+  
+  \item{local.only}{Logical, try to get most recent list from the
+    Bioconductor master or use file on local disk only.}
 }
 \details{
-  This sets the option \code{"BioC_mirror"}: it needs to be used before
-  a call to \code{\link{setRepositories}}.
+  This sets the \link{option} \code{"BioC_mirror"}: it is used
+  before a call to \code{\link{setRepositories}}.  The out-of-the-box
+  default for that option is \code{NULL}, which currently corresponds to
+  the mirror \url{https://bioconductor.org}.
+
+  The \sQuote{Bioconductor (World-wide)} \sQuote{mirror} is a network of
+  mirrors providing reliable world-wide access; other mirrors may
+  provide faster access on a geographically local scale.
 
-  In addition to the Bioconductor master site (in Seattle, USA), there
-  currently are mirrors in Bethesda (USA), Dortmund (Germany), Bergen
-  (Norway) and Cambridge (UK).
+  \code{ind} chooses a row in
+  \file{\var{\link{R_HOME}}/doc/BioC_mirrors.csv},
+  by number.
 }
 \value{
   None: this function is invoked for its
diff --git a/src/library/utils/man/chooseCRANmirror.Rd b/src/library/utils/man/chooseCRANmirror.Rd
index 595413f..312df4e 100644
--- a/src/library/utils/man/chooseCRANmirror.Rd
+++ b/src/library/utils/man/chooseCRANmirror.Rd
@@ -1,6 +1,6 @@
 % File src/library/utils/man/chooseCRANmirror.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2014 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2017 R Core Team
 % Distributed under GPL 2 or later
 
 \name{chooseCRANmirror}
@@ -11,21 +11,23 @@
   Interact with the user to choose a CRAN mirror.
 }
 \usage{
-chooseCRANmirror(graphics = getOption("menu.graphics"), ind = NULL)
+chooseCRANmirror(graphics = getOption("menu.graphics"), ind = NULL,
+                 useHTTPS = getOption("useHTTPS", TRUE),
+                 local.only = FALSE)
 
 getCRANmirrors(all = FALSE, local.only = FALSE)
 }
 \arguments{
-  \item{graphics}{Logical. If true, use a graphical list: on Windows or
-    the OS X GUI use a list box, and on a Unix-alike if package
-    \pkg{tcltk} and an X server are available, use a Tk
-    widget. Otherwise use a text \code{\link{menu}}.}
-
+  \item{graphics}{Logical.  If true, use a graphical list: on Windows or
+    the macOS GUI use a list box, and on a Unix-alike  use a Tk widget if
+    package \pkg{tcltk} and an X server are available.  Otherwise use a
+    text \code{\link{menu}}.}
+  
   \item{ind}{Optional numeric value giving which entry to select.}
-
+  \item{useHTTPS}{Whether to prefer secure mirrors.}
   \item{all}{Logical, get all known mirrors or only the ones flagged as OK.}
-  \item{local.only}{Logical, try to get most recent list from CRAN or
-    use file on local disk only.}
+  \item{local.only}{Logical, try to get most recent list from the CRAN
+    master or use file on local disk only.}
 }
 \details{
   A list of mirrors is stored in file
@@ -33,9 +35,21 @@ getCRANmirrors(all = FALSE, local.only = FALSE)
   list of current mirrors is consulted, and the file copy used only if
   the on-line list is inaccessible.
 
-  This function was originally written to support a Windows GUI menu
-  item, but is also called by \code{\link{contrib.url}} if it finds the
-  initial dummy value of \code{\link{options}("repos")}.
+  This function is called by a Windows GUI menu item and by
+  \code{\link{contrib.url}} if it finds the initial dummy value of
+  \code{\link{options}("repos")}.
+  
+  The \code{useHTTPS} argument defaults to \code{TRUE}.  With
+  \code{useHTTPS = TRUE}, HTTPS mirrors with mirroring over
+  \command{ssh} will be offered in preference to other mirrors (which
+  are listed in a sub-menu).  If it is set to \code{FALSE}, no secure
+  mirrors will be offered.  Choosing a secure mirror provides some
+  guarantees on the identity of the site chosen and so is
+  recommended. (All \R builds support downloading from HTTPS sites.)
+
+  \code{ind} chooses a row in the list of current mirrors, by number. It
+  is best used with \code{local.only = TRUE} and row numbers in
+   \file{\var{\link{R_HOME}}/doc/CRAN_mirrors.csv}.
 }
 \value{
   None for \code{chooseCRANmirror()}, this function is invoked for its
diff --git a/src/library/utils/man/citEntry.Rd b/src/library/utils/man/citEntry.Rd
index b9d8c9f..b7d5534 100644
--- a/src/library/utils/man/citEntry.Rd
+++ b/src/library/utils/man/citEntry.Rd
@@ -1,5 +1,5 @@
 % File src/library/utils/man/citEntry.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2009 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/utils/man/citation.Rd b/src/library/utils/man/citation.Rd
index 0614e87..17a9297 100644
--- a/src/library/utils/man/citation.Rd
+++ b/src/library/utils/man/citation.Rd
@@ -1,6 +1,6 @@
 % File src/library/utils/man/citation.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2007 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2017 R Core Team
 % Distributed under GPL 2 or later
 
 \name{citation}
@@ -19,6 +19,7 @@ readCitationFile(file, meta = NULL)
   \item{package}{a character string with the name of a single package.
     An error occurs if more than one package name is given.}
   \item{lib.loc}{a character vector with path names of \R libraries, or
+    the directory containing the source for \code{package}, 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.}
@@ -41,10 +42,10 @@ readCitationFile(file, meta = NULL)
   Execute function \code{citation()} for information on how to cite the
   base R system in publications.  If the name of a non-base package is
   given, the function either returns the information contained in the
-  \file{CITATION} file of the package or auto-generates citation
-  information.  In the latter case the package \file{DESCRIPTION} file
-  is parsed, the resulting citation object may be arbitrarily bad, but
-  is quite useful (at least as a starting point) in most cases.
+  \file{CITATION} file of the package (using \code{readCitationFile}
+  with \code{meta} equal to \code{packageDescription(package, lib.loc)})
+  or auto-generates citation information from the \file{DESCRIPTION}
+  file.
 
   In \R >= 2.14.0, one can use a \samp{Authors at R} field in
   \file{DESCRIPTION} to provide (\R code giving) a
@@ -87,7 +88,9 @@ readCitationFile(file, meta = NULL)
   any) of \code{meta} to determine the encoding of the file.
 }
 \value{
-  An object inheriting from class \code{"\link{bibentry}"}.
+  An object of class \code{"citation"}, inheriting from class
+  \code{"\link{bibentry}"}; see there, notably for the
+  \code{\link{print}} and \code{\link{format}} methods.
 }
 \seealso{
   \code{\link{bibentry}}
@@ -104,4 +107,14 @@ if(nchar(system.file(package = "foreign"))) citation("foreign")
 ## extract the bibtex entry from the return value
 x <- citation()
 toBibtex(x)
+
+\donttest{
+## A citation with more than one bibentry:
+cm <- tryCatch(citation("mgcv"),
+               error = function(e) {
+                 warning("Recommended package 'mgcv' is not installed properly")
+                 stop(e$message) })
+cm # short entries (2-3 lines each)
+print(cm, bibtex = TRUE) # each showing its bibtex code
+}%dont
 }
diff --git a/src/library/utils/man/cite.Rd b/src/library/utils/man/cite.Rd
index 6764bb2..20da688 100644
--- a/src/library/utils/man/cite.Rd
+++ b/src/library/utils/man/cite.Rd
@@ -1,10 +1,8 @@
 % File src/library/utils/man/cite.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 2012-2013 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 2012-2015 R Core Team
 % Distributed under GPL 2 or later
 
-\newcommand{\sspace}{\ifelse{latex}{\out{~}}{ }}
-
 \name{cite}
 \alias{cite}
 \alias{citeNatbib}
@@ -104,7 +102,7 @@ rref <- bibentry(
    organization = "R Foundation for Statistical Computing",
    address = "Vienna, Austria",
    year = 2013,
-   url = "http://www.R-project.org/",
+   url = "https://www.R-project.org/",
    key = "R")
 
 ## References for boot package and associated book
@@ -121,7 +119,7 @@ bref <- c(
      ),
      year = "2012",
      note = "R package version 1.3-4",
-     url = "http://CRAN.R-project.org/package=boot",
+     url = "https://CRAN.R-project.org/package=boot",
      key = "boot-package"
    ),
 
diff --git a/src/library/utils/man/close.socket.Rd b/src/library/utils/man/close.socket.Rd
index 23ecc45..c459d7e 100644
--- a/src/library/utils/man/close.socket.Rd
+++ b/src/library/utils/man/close.socket.Rd
@@ -1,6 +1,6 @@
 % File src/library/utils/man/close.socket.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2007 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2015 R Core Team
 % Distributed under GPL 2 or later
 
 \name{close.socket}
@@ -10,7 +10,7 @@ close.socket(socket, \dots)
 }
 \alias{close.socket}
 \arguments{
-  \item{socket}{A \code{socket} object}
+  \item{socket}{a \code{socket} object}
   \item{\dots}{further arguments passed to or from other methods.}
 }
 \description{
@@ -23,6 +23,9 @@ close.socket(socket, \dots)
 \author{Thomas Lumley}
 \seealso{
   \code{\link{make.socket}}, \code{\link{read.socket}}
+
+  Compiling in support for sockets was optional prior to \R 3.3.0: see
+  \code{\link{capabilities}("sockets")} to see if it is available.
 }
 
 \keyword{misc}
diff --git a/src/library/utils/man/combn.Rd b/src/library/utils/man/combn.Rd
index b522ac4..26dda5c 100644
--- a/src/library/utils/man/combn.Rd
+++ b/src/library/utils/man/combn.Rd
@@ -1,10 +1,8 @@
 % File src/library/utils/man/combn.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2013 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2017 R Core Team
 % Distributed under GPL 2 or later
 
-\newcommand{\CRANpkg}{\href{http://CRAN.R-project.org/package=#1}{\pkg{#1}}}
-
 \name{combn}
 \alias{combn}
 \title{Generate All Combinations of n Elements, Taken m at a Time}
@@ -38,11 +36,10 @@ combn(x, m, FUN = NULL, simplify = TRUE, \dots)
   \item{\dots}{optionally, further arguments to \code{FUN}.}
 }
 \details{
-  Factors \code{x} are accepted from \R 3.1.0 (although coincidentally
-  they worked for \code{simplify = FALSE} in earlier versions).
+  Factors \code{x} are accepted.
 }
 \value{
-  a \code{\link{list}} or \code{\link{array}}, see the \code{simplify}
+  A \code{\link{list}} or \code{\link{array}}, see the \code{simplify}
   argument above.  In the latter case, the identity
   \code{dim(combn(n, m)) == c(m, choose(n, m))} holds.
 }
diff --git a/src/library/utils/man/compareVersion.Rd b/src/library/utils/man/compareVersion.Rd
index c4e9ba0..135f0b1 100644
--- a/src/library/utils/man/compareVersion.Rd
+++ b/src/library/utils/man/compareVersion.Rd
@@ -1,5 +1,5 @@
 % File src/library/utils/man/compareVersion.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2007 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/utils/man/contrib.url.Rd b/src/library/utils/man/contrib.url.Rd
index 9e1c680..abb63e1 100644
--- a/src/library/utils/man/contrib.url.Rd
+++ b/src/library/utils/man/contrib.url.Rd
@@ -1,5 +1,5 @@
 % File src/library/utils/man/update.packages.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2014 R Core Team
 % Distributed under GPL 2 or later
 
@@ -21,6 +21,9 @@ contrib.url(repos, type = getOption("pkgType"))
     \code{\link{install.packages}}.
   }
 }
+\details{
+  If \code{type = "both"} this will use the source repository.
+}
 \value{
   A character vector of the same length as \code{repos}.
 }
diff --git a/src/library/utils/man/count.fields.Rd b/src/library/utils/man/count.fields.Rd
index fbd1429..0bfd616 100644
--- a/src/library/utils/man/count.fields.Rd
+++ b/src/library/utils/man/count.fields.Rd
@@ -1,5 +1,5 @@
 % File src/library/utils/man/count.fields.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2013 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/utils/man/create.post.Rd b/src/library/utils/man/create.post.Rd
index cf61a0b..6f41a1f 100644
--- a/src/library/utils/man/create.post.Rd
+++ b/src/library/utils/man/create.post.Rd
@@ -1,6 +1,6 @@
 % File src/library/utils/man/create.post.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2013 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2014 R Core Team
 % Distributed under GPL 2 or later
 
 \name{create.post}
@@ -57,7 +57,7 @@ create.post(instructions = character(), description = "post",
       (including address, Cc: address and subject) for you to edit and
       send.
 
-      This works where default mailers are set up (usual on OS X and
+      This works where default mailers are set up (usual on macOS and
       Windows, and where \command{xdg-open} is available and configured on
       other Unix-alikes: if that fails it tries the browser set by
       \env{R_BROWSER}).
diff --git a/src/library/utils/man/data.Rd b/src/library/utils/man/data.Rd
index 06b37d4..df19cea 100644
--- a/src/library/utils/man/data.Rd
+++ b/src/library/utils/man/data.Rd
@@ -1,6 +1,6 @@
 % File src/library/utils/man/data.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2013 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2014 R Core Team
 % Distributed under GPL 2 or later
 
 \name{data}
@@ -46,11 +46,12 @@ data(\dots, list = character(), package = NULL, lib.loc = NULL,
     \code{\link{load}()}ed.
 
     \item files ending \file{.tab}, \file{.txt} or \file{.TXT} are read
-    using \code{\link{read.table}(\dots, header = TRUE)}, and hence
+    using \code{\link{read.table}(\dots, header = TRUE, as.is=FALSE)},
+    and hence
     result in a data frame.
 
     \item files ending \file{.csv} or \file{.CSV} are read using
-    \code{\link{read.table}(\dots, header = TRUE, sep = ";")},
+    \code{\link{read.table}(\dots, header = TRUE, sep = ";", as.is=FALSE)},
     and also result in a data frame.
   }
   If more than one matching file name is found, the first on this list
diff --git a/src/library/utils/man/dataentry.Rd b/src/library/utils/man/dataentry.Rd
index 825360b..1116fb9 100644
--- a/src/library/utils/man/dataentry.Rd
+++ b/src/library/utils/man/dataentry.Rd
@@ -1,5 +1,5 @@
 % File src/library/utils/man/dataentry.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2009 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/utils/man/debugcall.Rd b/src/library/utils/man/debugcall.Rd
new file mode 100644
index 0000000..e343881
--- /dev/null
+++ b/src/library/utils/man/debugcall.Rd
@@ -0,0 +1,56 @@
+% File src/library/base/man/debugcall.Rd
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2016 R Core Team
+% Distributed under GPL 2 or later
+
+\name{debugcall}
+\title{Debug a Call}
+\alias{debugcall}
+\alias{undebugcall}
+\usage{
+debugcall(call, once = FALSE)
+undebugcall(call)
+}
+\arguments{
+  \item{call}{An R expression calling a function. The called function
+    will be debugged. See Details.}
+  \item{once}{logical; if \code{TRUE}, debugging only occurs once, as via
+    \code{debugonce}. Defaults to \code{FALSE}}
+}
+\description{
+  Set or unset debugging flags based on a call to a function. Takes into
+  account S3/S4 method dispatch based on the classes of the arguments in
+  the call.
+}
+\details{
+  \code{debugcall} debugs the non-generic function, S3 method or S4
+  method that would be called by evaluating \code{call}. Thus, the user
+  does not need to specify the signature when debugging
+  methods. Although the call is actually to the generic, it is the
+  method that is debugged, not the generic, except for non-standard S3
+  generics (see \code{\link{isS3stdGeneric}}).
+}
+\value{
+  \code{debugcall} invisibly returns the debugged call expression.
+}
+\note{
+  Non-standard evaluation is used to retrieve the \code{call} (via
+  \code{\link{substitute}}). For this reason, passing a variable
+  containing a call expression, rather than the call expression itself,
+  will not work.
+}
+\seealso{
+  \code{\link{debug}} for the primary debugging interface
+}
+
+\examples{
+\dontrun{
+## Evaluate call after setting debugging
+## 
+f <- factor(1:10)
+res <- eval(debugcall(summary(f))) 
+}
+}
+\keyword{programming}
+\keyword{environment}
+\keyword{utilities}
diff --git a/src/library/utils/man/debugger.Rd b/src/library/utils/man/debugger.Rd
index 594ed4f..71465ae 100644
--- a/src/library/utils/man/debugger.Rd
+++ b/src/library/utils/man/debugger.Rd
@@ -1,10 +1,8 @@
 % File src/library/utils/man/debugger.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2014 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2016 R Core Team
 % Distributed under GPL 2 or later
 
-\newcommand{\sspace}{\ifelse{latex}{\out{~}}{ }}
-
 \name{debugger}
 \alias{debugger}
 \alias{dump.frames}
@@ -14,15 +12,20 @@
   dumped frames.
 }
 \usage{
-dump.frames(dumpto = "last.dump", to.file = FALSE)
+dump.frames(dumpto = "last.dump", to.file = FALSE,
+            include.GlobalEnv = FALSE)
 debugger(dump = last.dump)
 }
 \arguments{
   \item{dumpto}{a character string. The name of the object or file to
     dump to.}
-  \item{to.file}{logical. Should the dump be to an \R object or to a
+  \item{to.file}{logical.  Should the dump be to an \R object or to a
     file?}
-  \item{dump}{An \R dump object created by \code{dump.frames}.}
+  \item{include.GlobalEnv}{logical indicating if a \emph{copy} of the
+    \code{\link{.GlobalEnv}} environment should be included in addition
+    to the \code{\link{sys.frames}()}.  Will be particularly useful when
+    used in a batch job.}
+  \item{dump}{an \R dump object created by \code{dump.frames}.}
 }
 \details{
   To use post-mortem debugging, set the option \code{error} to be a call
@@ -70,7 +73,7 @@ debugger(dump = last.dump)
 \seealso{
   \code{\link{browser}} for the actions available at the \code{Browse}
   prompt.
-  
+
   \code{\link{options}} for setting \code{error} options;
   \code{\link{recover}} is an interactive debugger working similarly to
   \code{debugger} but directly after the error occurs.
diff --git a/src/library/utils/man/demo.Rd b/src/library/utils/man/demo.Rd
index 8b1860d..c391b1b 100644
--- a/src/library/utils/man/demo.Rd
+++ b/src/library/utils/man/demo.Rd
@@ -1,5 +1,5 @@
 % File src/library/utils/man/demo.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2012 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/utils/man/download.file.Rd b/src/library/utils/man/download.file.Rd
index 60e456b..3d37dd2 100644
--- a/src/library/utils/man/download.file.Rd
+++ b/src/library/utils/man/download.file.Rd
@@ -1,10 +1,8 @@
 % File src/library/utils/man/download.file.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2014 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2017 R Core Team
 % Distributed under GPL 2 or later
 
-\newcommand{\CRANpkg}{\href{http://CRAN.R-project.org/package=#1}{\pkg{#1}}}
-
 \name{download.file}
 \alias{download.file}
 \concept{proxy}
@@ -26,10 +24,10 @@ download.file(url, destfile, method, quiet = FALSE, mode = "w",
   \item{destfile}{A character string with the name where the downloaded
     file is saved.  Tilde-expansion is performed.}
 
-  \item{method}{Method to be used for downloading files.  Currently
-    download methods \code{"internal"}, \code{"wget"}, \code{"curl"} and
-    \code{"lynx"} (deprecated) are available, and there is a value
-    \code{"auto"}: see \sQuote{Details} and \sQuote{Note}.
+  \item{method}{Method to be used for downloading files.  Current
+    download methods are \code{"internal"}, \code{"wininet"} (Windows
+    only) \code{"libcurl"}, \code{"wget"} and \code{"curl"}, and there
+    is a value \code{"auto"}: see \sQuote{Details} and \sQuote{Note}.
 
     The method can also be set through the option
     \code{"download.file.method"}: see \code{\link{options}()}.
@@ -40,79 +38,112 @@ download.file(url, destfile, method, quiet = FALSE, mode = "w",
 
   \item{mode}{character.  The mode with which to write the file.  Useful
     values are \code{"w"}, \code{"wb"} (binary), \code{"a"} (append) and
-    \code{"ab"}.  Only used for the \code{"internal"} method.
+    \code{"ab"}.  Not used for methods \code{"wget"} and \code{"curl"}.
 #ifdef windows
     (See also \sQuote{Details}.)
 #endif
   }
-  \item{cacheOK}{logical.  Is a server-side cached value acceptable?
-    Implemented for the \code{"internal"}, \code{"wget"} and
-    \code{"curl"} methods.}
+  \item{cacheOK}{logical.  Is a server-side cached value acceptable?}
 
   \item{extra}{character vector of additional command-line arguments for
-    the \code{"wget"}, \code{"curl"} and \code{"lynx"} methods.}
+    the \code{"wget"} and \code{"curl"} methods.}
 }
 \details{
   The function \code{download.file} can be used to download a single
   file as described by \code{url} from the internet and store it in
   \code{destfile}.
   The \code{url} must start with a scheme such as
-  \samp{http://}, \samp{ftp://} or \samp{file://}.
+  \samp{http://}, \samp{https://}, \samp{ftp://} or \samp{file://}.
 
 #ifdef unix
-  If \code{method = "auto"} is chosen (the default), the internal method
-  is chosen for \samp{file://} URLs, and for the others provided
-  \code{\link{capabilities}("http/ftp")} is true (which it almost always
-  is).  Otherwise methods \code{"wget"}, \code{"curl"} and \code{"lynx"}
-  are tried in turn.
+  If \code{method = "auto"} is chosen (the default), on a Unix-alike
+  method \code{"libcurl"} is used except \code{"internal"} for
+  \samp{file://} URLs.
 #endif
 #ifdef windows
-  If \code{method = "auto"} is chosen (the default), the internal method
-  is used on Windows.
+  If \code{method = "auto"} is chosen (the default), on Windows the
+  \code{"wininet"} method is used apart from for \samp{ftps://} URLs
+  where \code{"libcurl"} is tried.  The \code{"wininet"} method uses the
+  WinINet functions (part of the OS).
 #endif
-
-  For methods \code{"wget"}, \code{"curl"} and \code{"lynx"} a system
-  call is made to the tool given by \code{method}, and the respective
-  program must be installed on your system and be in the search path for
-  executables.  They will block all other activity on the \R process
-  until they complete: this may make a GUI unresponsive.
-
-  \code{cacheOK = FALSE} is useful for \samp{http://} URLs, and will
-  attempt to get a copy directly from the site rather than from an
-  intermediate cache.  It is used by \code{\link{available.packages}}.
-
-  The remaining details apply to method \code{"internal"} only.
-
-  Note that \samp{https://} URLs are
+% https://msdn.microsoft.com/en-us/library/windows/desktop/aa383630%28v=vs.85%29.aspx
+  
 #ifdef unix
-  not supported by the internal method.
+  Method \code{"libcurl"} uses the library of that name
+  (\url{http://curl.haxx.se/libcurl/}).
+  It provides
 #endif
 #ifdef windows
-  only supported if \option{--internet2} or environment variable
-  \env{R_WIN_INTERNET2} was set or
-  \code{\link{setInternet2}(TRUE)} was used (to make use of Internet
-  Explorer internals), and then only if the certificate is considered to
-  be valid.
+  Support for method \code{"libcurl"} is optional on Windows: use
+  \code{\link{capabilities}("libcurl")} to see if it is supported on
+  your build.  It uses an external library of that name
+  (\url{http://curl.haxx.se/libcurl/}) against which \R can be compiled.
+  If supported it will provide
 #endif
+  (non-blocking) access to \samp{https://} and (usually) \samp{ftps://}
+  URLs.  There is support for simultaneous downloads, so \code{url} and
+  \code{destfile} can be character vectors of the same length greater
+  than one (but the method has to be specified explicitly and not
+  \emph{via} \code{"auto"}).  For a single URL and \code{quiet = FALSE}
+  a progress bar is shown in interactive use.
+
+  For methods \code{"wget"} and \code{"curl"} a system call is made to
+  the tool given by \code{method}, and the respective program must be
+  installed on your system and be in the search path for executables.
+  They will block all other activity on the \R process until they
+  complete: this may make a GUI unresponsive.
+
+  \code{cacheOK = FALSE} is useful for \samp{http://} and
+  \samp{https://} URLs: it will attempt to get a copy directly from the
+  site rather than from an intermediate cache.  It is used by
+  \code{\link{available.packages}}.
+
+  The \code{"libcurl"} and \code{"wget"} methods follow \samp{http://}
+  and \samp{https://} redirections to any scheme they support: the
+  \code{"internal"} method follows \samp{http://} to \samp{http://}
+  redirections only.  (For method \code{"curl"} use argument \code{extra
+  = "-L"}.  To disable redirection in \command{wget}, use \code{extra =
+  "--max-redirect=0"}.)  The \code{"wininet"} method supports some
+  redirections but not all.  (For method \code{"libcurl"}, messages will
+  quote the endpoint of redirections.)
+  
+  Note that \samp{https://} URLs are not supported by the
+  \code{"internal"} method but are supported by the \code{"libcurl"}
+  method and the \code{"wininet"} method on Windows.
 
   See \code{\link{url}} for how \samp{file://} URLs are interpreted,
-  especially on Windows.  This function does decode encoded URLs.
+  especially on Windows.  The \code{"internal"} and \code{"wininet"}
+  methods do not percent-decode \samp{file://} URLs, but the
+  \code{"libcurl"} and \code{"curl"} methods do: method \code{"wget"}
+  does not support them.
+
+  Most methods do not percent-encode special characters such as spaces
+  in URLs (see \code{\link{URLencode}}), but it seems the
+  \code{"wininet"} method does.
+
+  The remaining details apply to the \code{"internal"}, \code{"wininet"}
+  and \code{"libcurl"} methods only.
 
   The timeout for many parts of the transfer can be set by the option
   \code{timeout} which defaults to 60 seconds.
 
   The level of detail provided during transfer can be set by the
-  \code{quiet} argument and the \code{internet.info} option.  The
-  details depend on the platform and scheme, but setting
-  \code{internet.info} to 0 gives all available details, including
-  all server responses.  Using 2 (the default) gives only serious
-  messages, and 3 or more suppresses all messages.
+  \code{quiet} argument and the \code{internet.info} option: the details
+  depend on the platform and scheme.  For the \code{"internal"} method
+  setting option \code{internet.info} to 0 gives all available details,
+  including all server responses.  Using 2 (the default) gives only
+  serious messages, and 3 or more suppresses all messages.  For the
+  \code{"libcurl"} method values of the option less than 2 give verbose
+  output.
 
 #ifdef windows
   A progress bar tracks the transfer.  If the file length is known, the
   full width of the bar is the known length.  Otherwise the initial
   width represents 100 Kbytes and is doubled whenever the current width
-  is exceeded.
+  is exceeded.  (In non-interactive use this uses a text version.  If the
+  file length is known, an equals sign represents 2\% of the transfer
+  completed: otherwise a dot represents 10Kb.)
+
 
   If \code{mode} is not supplied and \code{url} ends in one of
   \code{.gz}, \code{.bz2}, \code{.xz}, \code{.tgz}, \code{.zip},
@@ -120,13 +151,6 @@ download.file(url, destfile, method, quiet = FALSE, mode = "w",
   (unlike Unix-alikes) does distinguish between text and binary files,
   care is needed that other binary file types are transferred with
   \code{mode = "wb"}.
-
-  There is an alternative method if you have Internet Explorer 4 or
-  later installed.   You can use the command line flag \option{--internet2},
-  or call \code{\link{setInternet2}(TRUE)} and then
-  the \sQuote{Internet Options} of the system are used to choose proxies
-  and so on; these are set in the Control Panel and are those used for
-  Internet Explorer.  That version does not support \code{cacheOK = FALSE}.
 #endif
 #ifdef unix
   A progress bar tracks the transfer.  If the file length is known, an
@@ -138,41 +162,44 @@ download.file(url, destfile, method, quiet = FALSE, mode = "w",
 #endif
 }
 \note{
-   Files of more than 2GB are only supported on 64-bit builds of \R; they
-  may be truncated on 32-bit builds.
-  
-  Method \code{"wget"} is mainly for historical compatibility, but it
-  and \code{"curl"} can be used for URLs (e.g., \samp{https://} URLs or
-  those that use cookies) which the internal method does not support.
+  Files of more than 2GB are supported on 64-bit builds of \R; they
+  may be truncated on some 32-bit builds.
+
+  Methods \code{"wget"} and \code{"curl"} are mainly for historical
+  compatibility but provide may provide capabilities not supported by
+  the \code{"libcurl"} or \code{"wininet"} methods.
 
   Method \code{"wget"} can be used with proxy firewalls which require
   user/password authentication if proper values are stored in the
   configuration file for \code{wget}.
 
   \command{wget} (\url{http://www.gnu.org/software/wget/}) is commonly
-  installed on Unix-alikes (but not OS X). Windows binaries are
+  installed on Unix-alikes (but not macOS).  Windows binaries are
   available from Cygwin, gnuwin32 and elsewhere.
 
-  \command{curl} (\url{http://curl.haxx.se/}) is installed on OS X and
+  \command{curl} (\url{http://curl.haxx.se/}) is installed on macOS and
   commonly on Unix-alikes.  Windows binaries are available at that URL.
-
-  Use of \command{lynx} (\url{http://lynx.browser.org/} is of historical
-  interest and now deprecated.
 }
 \section{Setting Proxies}{
-  This applies to the internal code only.
+#ifdef windows
+  For the Windows-only method \code{"wininet"}, the \sQuote{Internet
+  Options} of the system are used to choose proxies and so on; these are
+  set in the Control Panel and are those used for Internet Explorer.
+#endif
+
+  The next two paragraphs apply to the internal code only.
 
   Proxies can be specified via environment variables.
-  Setting \env{"no_proxy"} to \code{"*"} stops any proxy being tried.
-  Otherwise the setting of \env{"http_proxy"} or \env{"ftp_proxy"}
+  Setting \env{no_proxy} to \code{*} stops any proxy being tried.
+  Otherwise the setting of \env{http_proxy} or \env{ftp_proxy}
   (or failing that, the all upper-case version) is consulted and if
   non-empty used as a proxy site.  For FTP transfers, the username
-  and password on the proxy can be specified by \env{"ftp_proxy_user"}
-  and \env{"ftp_proxy_password"}.  The form of \env{"http_proxy"}
-  should be \code{"http://proxy.dom.com/"} or
-  \code{"http://proxy.dom.com:8080/"} where the port defaults to
-  \code{80} and the trailing slash may be omitted. For
-  \env{"ftp_proxy"} use the form \code{"ftp://proxy.dom.com:3128/"}
+  and password on the proxy can be specified by \env{ftp_proxy_user}
+  and \env{ftp_proxy_password}.  The form of \env{http_proxy}
+  should be \code{http://proxy.dom.com/} or
+  \code{http://proxy.dom.com:8080/} where the port defaults to
+  \code{80} and the trailing slash may be omitted.  For
+  \env{ftp_proxy} use the form \code{ftp://proxy.dom.com:3128/}
   where the default port is \code{21}.  These environment variables
   must be set before the download code is first used: they cannot be
   altered later by calling \code{\link{Sys.setenv}}.
@@ -180,26 +207,90 @@ download.file(url, destfile, method, quiet = FALSE, mode = "w",
   Usernames and passwords can be set for HTTP proxy transfers via
   environment variable \env{http_proxy_user} in the form
   \code{user:passwd}.  Alternatively, \env{http_proxy} can be of the
-  form \code{"http://user:pass@proxy.dom.com:8080/"} for compatibility
+  form \code{http://user:pass@proxy.dom.com:8080/} for compatibility
   with \code{wget}.  Only the HTTP/1.0 basic authentication scheme is
   supported.
 #ifdef windows
-  Under Windows, if \env{http_proxy_user} is set to \code{"ask"} then
+  Under Windows, if \env{http_proxy_user} is set to \code{ask} then
   a dialog box will come up for the user to enter the username and
   password.  \bold{NB:} you will be given only one opportunity to enter this,
   but if proxy authentication is required and fails there will be one
   further prompt per download.
 #endif
+
+  Much the same scheme is supported by \code{method = "libcurl"}, including
+  \env{no_proxy}, \env{http_proxy} and \env{ftp_proxy}, and for the last
+  two a contents of \code{[user:password@]machine[:port]} where the
+  parts in brackets are optional.  See
+  \url{http://curl.haxx.se/libcurl/c/libcurl-tutorial.html} for details.
+}
+\section{Secure URLs}{
+  Methods which access \samp{https://} and \samp{ftps://} URLs should
+  try to verify the site certificates.  This is usually done using the CA
+  root certificates installed by the OS (although we have seen instances
+  in which these got removed rather than updated). For further information
+  see \url{http://curl.haxx.se/docs/sslcerts.html}.
+
+  This is an issue for \code{method = "libcurl"} on Windows, where the
+  OS does not provide a suitable CA certificate bundle, so by default on
+  Windows certificates are not verified.  To turn verification on, set
+  environment variable \env{CURL_CA_BUNDLE} to the path to a certificate
+  bundle file, usually named \file{ca-bundle.crt} or
+  \file{curl-ca-bundle.crt}.  (This is normally done for a binary
+  installation of \R, which installs
+  \file{\var{R_HOME}/etc/curl-ca-bundle.crt} and sets
+  \env{CURL_CA_BUNDLE} to point to it if that environment variable is not
+  already set.)  For an updated certificate bundle, see
+  \url{http://curl.haxx.se/docs/sslcerts.html}.
+  Currently one can download a copy from
+  \url{https://raw.githubusercontent.com/bagder/ca-bundle/master/ca-bundle.crt}
+  and set \env{CURL_CA_BUNDLE} to the full path to the downloaded file.
+  
+  Note that the root certificates used by \R may or may not be the same
+  as used in a browser, and indeed different browsers may use different
+  certificate bundles (there is typically a build option to choose
+  either their own or the system ones).
+}
+\section{FTP sites}{
+  \samp{ftp:} URLs are accessed using the FTP protocol which has a
+  number of variants.  One distinction is between \sQuote{active} and
+  \sQuote{(extended) passive} modes: which is used is chosen by the
+  client.  The \code{"internal"} and \code{"libcurl"} methods use passive
+  mode, and that is almost universally used by browsers.  Prior to \R
+  3.2.3 the \code{"wininet"} method used active mode: nowadays it first
+  tries passive and then active.
+}
+\section{Good practice}{
+  Setting the \code{method} should be left to the end user.  Neither of
+  the \command{wget} nor \command{curl} commands is widely available:
+  you can check if one is available \emph{via} \code{\link{Sys.which}},
+  and should do so in a package or script.
+  
+  If you use \code{download.file} in a package or script, you must check
+  the return value, since it is possible that the download will fail
+  with a non-zero status but not an \R error. (This was more likely
+  prior to \R 3.4.0.)
+
+  The supported \code{method}s do change: method \code{libcurl} was
+  introduced in \R 3.2.0 and is still optional on Windows -- use
+  \code{\link{capabilities}("libcurl")} in a program to see if it is
+  available.
 }
 \value{
   An (invisible) integer code, \code{0} for success and non-zero for
   failure.  For the \code{"wget"} and \code{"curl"} methods this is the
   status code returned by the external program.  The \code{"internal"}
   method can return \code{1}, but will in most cases throw an error.
+
+  What happens to the destination file(s) in the case of error depends
+  on the method and \R{} version. Currently the \code{"internal"},
+  \code{"wininet"} and \code{"libcurl"} methods will remove the file if
+  there the URL is unavailable except when \code{mode} specifies
+  appending when the file should be unchanged.
 }
 \seealso{
   \code{\link{options}} to set the \code{HTTPUserAgent}, \code{timeout}
-  and \code{internet.info} options.
+  and \code{internet.info} options used by some of the methods.
 
   \code{\link{url}} for a finer-grained way to read data from URLs.
 
diff --git a/src/library/utils/man/download.packages.Rd b/src/library/utils/man/download.packages.Rd
index 3d0b4af..7fc72d5 100644
--- a/src/library/utils/man/download.packages.Rd
+++ b/src/library/utils/man/download.packages.Rd
@@ -1,10 +1,8 @@
 % File src/library/utils/man/download.packages.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2009 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2014 R Core Team
 % Distributed under GPL 2 or later
 
-\newcommand{\sspace}{\ifelse{latex}{\out{~}}{ }}
-
 \name{download.packages}
 \alias{download.packages}
 \title{Download Packages from CRAN-like Repositories}
@@ -35,7 +33,7 @@ download.packages(pkgs, destdir, available = NULL,
   \item{repos}{
     character vector, the base URL(s) of the repositories
     to use, i.e., the URL of the CRAN master such as
-    \code{"http://cran.r-project.org"} or its Statlib mirror,
+    \code{"https://cran.r-project.org"} or its Statlib mirror,
     \code{"http://lib.stat.cmu.edu/R/CRAN"}.
   }
   \item{contriburl}{
diff --git a/src/library/utils/man/edit.Rd b/src/library/utils/man/edit.Rd
index ad7e764..376c932 100644
--- a/src/library/utils/man/edit.Rd
+++ b/src/library/utils/man/edit.Rd
@@ -1,6 +1,6 @@
 % File src/library/utils/man/edit.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2013 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2014 R Core Team
 % Distributed under GPL 2 or later
 
 \name{edit}
@@ -34,7 +34,7 @@ xedit(name = NULL, file = "")
     On Unix the default is set from the environment variables
     \env{EDITOR} or \env{VISUAL} if either is set, otherwise \code{vi}
     is used.  On Windows it defaults to \code{"internal"}, the script
-    editor.  On the OS X GUI the argument is ignored and the document
+    editor.  On the macOS GUI the argument is ignored and the document
     editor is always used.
 
     \code{editor} can also be a function, in which case it is called
diff --git a/src/library/utils/man/edit.data.frame.Rd b/src/library/utils/man/edit.data.frame.Rd
index 28669c0..c5e0344 100644
--- a/src/library/utils/man/edit.data.frame.Rd
+++ b/src/library/utils/man/edit.data.frame.Rd
@@ -1,6 +1,6 @@
 % File src/library/utils/man/edit.data.frame.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2009 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2015 R Core Team
 % Distributed under GPL 2 or later
 
 \name{edit.data.frame}
@@ -19,7 +19,7 @@
 \arguments{
   \item{name}{A data frame or (numeric, logical or character) matrix.}
   \item{factor.mode}{How to handle factors (as integers or using
-    character levels) in a data frame.}
+    character levels) in a data frame.  Can be abbreviated.}
   \item{edit.row.names}{logical. Show the row names (if they exist) be
     displayed as a separate editable column?  It is an error to ask for
     this on a matrix with \code{NULL} row names.}
diff --git a/src/library/utils/man/example.Rd b/src/library/utils/man/example.Rd
index fc6fab2..0f2a87c 100644
--- a/src/library/utils/man/example.Rd
+++ b/src/library/utils/man/example.Rd
@@ -1,6 +1,6 @@
 % File src/library/utils/man/example.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2011 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2015 R Core Team
 % Distributed under GPL 2 or later
 
 \name{example}
@@ -8,8 +8,8 @@
 \title{Run an Examples Section from the Online Help}
 \description{
   Run all the \R code from the \bold{Examples} part of \R's online help
-  topic \code{topic} with two possible exceptions, \code{dontrun} and
-  \code{dontshow}, see \sQuote{Details} below.
+  topic \code{topic} with possible exceptions \code{dontrun},
+  \code{dontshow}, and \code{donttest}, see \sQuote{Details} below.
 }
 \usage{
 example(topic, package = NULL, lib.loc = NULL,
@@ -17,7 +17,7 @@ example(topic, package = NULL, lib.loc = NULL,
         echo = TRUE, verbose = getOption("verbose"),
         setRNG = FALSE, ask = getOption("example.ask"),
         prompt.prefix = abbreviate(topic, 6),
-        run.dontrun = FALSE)
+        run.dontrun = FALSE, run.donttest = interactive())
 }
 \arguments{
   \item{topic}{name or literal character string: the online
@@ -56,6 +56,8 @@ example(topic, package = NULL, lib.loc = NULL,
     \code{echo = TRUE}.}
   \item{run.dontrun}{logical indicating that \verb{\dontrun}
     should be ignored.}
+  \item{run.donttest}{logical indicating that \verb{\donttest}
+    should be ignored.}
 }
 \value{
   The value of the last evaluated expression, unless \code{give.lines}
@@ -78,13 +80,17 @@ example(topic, package = NULL, lib.loc = NULL,
   workspace.
 
   As detailed in the manual \emph{Writing \R Extensions}, the author of
-  the help page can markup parts of the examples for two exception rules
+  the help page can markup parts of the examples for exception rules
   \describe{
     \item{\code{dontrun}}{encloses code that should not be run.}
     \item{\code{dontshow}}{encloses code that is invisible on help
       pages, but will be run both by the package checking tools,
       and the \code{example()} function.  This was previously
       \code{testonly}, and that form is still accepted.}
+    \item{\code{donttest}}{encloses code that typically should be run,
+      but not during package checking.  The default \code{run.donttest
+	= \link{interactive}()} leads \code{example()} use in other help
+      page examples to skip \verb{\donttest} sections appropriately.}
   }
 }
 \author{Martin Maechler and others}
diff --git a/src/library/utils/man/file.edit.Rd b/src/library/utils/man/file.edit.Rd
index f52ef42..194c85c 100644
--- a/src/library/utils/man/file.edit.Rd
+++ b/src/library/utils/man/file.edit.Rd
@@ -1,6 +1,6 @@
 % File src/library/utils/man/file.edit.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2013 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2014 R Core Team
 % Distributed under GPL 2 or later
 
 \name{file.edit}
@@ -35,7 +35,7 @@ file.edit(\dots, title = file, editor = getOption("editor"),
 
   The default for \code{editor} is system-dependent.   On
   Windows it defaults to \code{"internal"}, the script editor, and in
-  the OS X GUI the document editor is used whatever the value of
+  the macOS GUI the document editor is used whatever the value of
   \code{editor}.  On Unix the default is set from the environment
   variables \env{EDITOR} or \env{VISUAL} if either is set, otherwise
   \code{vi} is used.
diff --git a/src/library/utils/man/filetest.Rd b/src/library/utils/man/filetest.Rd
index de65167..ec5d443 100644
--- a/src/library/utils/man/filetest.Rd
+++ b/src/library/utils/man/filetest.Rd
@@ -1,5 +1,5 @@
 % File src/library/utils/man/filetest.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2009 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/utils/man/findLineNum.Rd b/src/library/utils/man/findLineNum.Rd
index cf2c8c0..e8ba25e 100644
--- a/src/library/utils/man/findLineNum.Rd
+++ b/src/library/utils/man/findLineNum.Rd
@@ -1,10 +1,8 @@
 % File src/library/utils/man/findLineNum.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 2009-2013 Duncan Murdoch and the R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 2009-2014 Duncan Murdoch and the R Core Team
 % Distributed under GPL 2 or later
 
-\newcommand{\sspace}{\ifelse{latex}{\out{~}}{ }}
-
 \name{findLineNum}
 \alias{findLineNum}
 \alias{setBreakpoint}
@@ -73,12 +71,13 @@ setBreakpoint(srcfile, line, nameonly = TRUE,
   complicated scheme that may include more than one copy of a function
   in a package.  The user will typically see the public one on the
   search path, while code in the package will see a private one in the
-  package NAMESPACE.  If you set \code{envir} to the environment of a
+  package namespace.  If you set \code{envir} to the environment of a
   function in the package, by default \code{findLineNum} will find both
   versions, and \code{setBreakpoint} will set the breakpoint in both.
-  (This can be controlled using \code{lastenv}; e.g., \code{envir =
-  environment(foo)}, \code{lastenv = globalenv()} will find only the
-  private copy, as the search is stopped before seeing the public copy.)
+  (This can be controlled using \code{lastenv}; e.g.,
+  \code{envir = environment(foo)}, \code{lastenv = globalenv()}
+  will find only the private copy, as the search is stopped before
+  seeing the public copy.)
 
   S version 4 methods are also somewhat tricky to find.  They are stored
   with the generic function, which may be in the \pkg{base} or other
@@ -89,7 +88,7 @@ setBreakpoint(srcfile, line, nameonly = TRUE,
   generics, are not yet supported.
 }
 \value{
-  \code{fineLineNum} returns a list of objects containing location
+  \code{findLineNum} returns a list of objects containing location
   information.  A \code{print} method is defined for them.
 
   \code{setBreakpoint} has no useful return value; it is called for the
diff --git a/src/library/utils/man/fix.Rd b/src/library/utils/man/fix.Rd
index 6224f4e..449c0b0 100644
--- a/src/library/utils/man/fix.Rd
+++ b/src/library/utils/man/fix.Rd
@@ -1,5 +1,5 @@
 % File src/library/utils/man/fix.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2007 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/utils/man/flush.console.Rd b/src/library/utils/man/flush.console.Rd
index 597e072..4e5bf4f 100644
--- a/src/library/utils/man/flush.console.Rd
+++ b/src/library/utils/man/flush.console.Rd
@@ -1,5 +1,5 @@
 % File src/library/utils/man/flush.console.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2013 R Core Team
 % Distributed under GPL 2 or later
 
@@ -8,7 +8,7 @@
 \title{Flush Output to A Console}
 \description{
   This does nothing except on console-based versions of \R.
-  On the OS X and Windows GUIs, it ensures that the display of
+  On the macOS and Windows GUIs, it ensures that the display of
   output in the console is current, even if output buffering is on.
 }
 \usage{
diff --git a/src/library/utils/man/format.Rd b/src/library/utils/man/format.Rd
index e9e94d7..19cb57d 100644
--- a/src/library/utils/man/format.Rd
+++ b/src/library/utils/man/format.Rd
@@ -1,5 +1,5 @@
 % File src/library/utils/man/format.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2007 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/utils/man/getAnywhere.Rd b/src/library/utils/man/getAnywhere.Rd
index 8ea6915..43faec3 100644
--- a/src/library/utils/man/getAnywhere.Rd
+++ b/src/library/utils/man/getAnywhere.Rd
@@ -1,5 +1,5 @@
 % File src/library/utils/man/getAnywhere.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2012 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/utils/man/getFromNamespace.Rd b/src/library/utils/man/getFromNamespace.Rd
index 29ac78f..ef08e3a 100644
--- a/src/library/utils/man/getFromNamespace.Rd
+++ b/src/library/utils/man/getFromNamespace.Rd
@@ -1,5 +1,5 @@
 % File src/library/utils/man/getFromNamespace.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2013 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/utils/man/getParseData.Rd b/src/library/utils/man/getParseData.Rd
index bf5c86e..c9f1923 100644
--- a/src/library/utils/man/getParseData.Rd
+++ b/src/library/utils/man/getParseData.Rd
@@ -1,10 +1,8 @@
 % File src/library/utils/man/getParseData.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 2012-2013 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 2012-2015 R Core Team
 % Distributed under GPL 2 or later
 
-\newcommand{\CRANpkg}{\href{http://CRAN.R-project.org/package=#1}{\pkg{#1}}}
-
 \name{getParseData}
 \alias{getParseData}
 \alias{getParseText}
@@ -56,12 +54,14 @@ getParseText(parseData, id)
   \item{col2}{integer. The column number where the item ends.}
   \item{id}{integer. An identifier associated with this item.}
   \item{parent}{integer. The \code{id} of the parent of this item.}
-  \item{token}{character. The type of the token.}
+  \item{token}{character string. The type of the token.}
   \item{terminal}{logical.  Whether the token is \dQuote{terminal}, i.e.
     a leaf in the parse tree.}
-  \item{text}{character. If \code{includeText} is \code{TRUE}, the
+  \item{text}{character string. If \code{includeText} is \code{TRUE}, the
     text of all tokens; if it is \code{NA} (the default), the text of terminal
-    tokens.  If \code{includeText == FALSE}, this column is not included.}
+    tokens.  If \code{includeText == FALSE}, this column is not included.
+    Very long strings (with source of 1000 characters or more) will not be stored;
+    a message giving their length and delimiter will be included instead.}
 
   The rownames of the data frame will be equal to the \code{id} values,
   and the data frame will have a \code{"srcfile"} attribute containing
diff --git a/src/library/utils/man/getS3method.Rd b/src/library/utils/man/getS3method.Rd
index c4076aa..07d2ad1 100644
--- a/src/library/utils/man/getS3method.Rd
+++ b/src/library/utils/man/getS3method.Rd
@@ -1,23 +1,25 @@
 % File src/library/utils/man/getS3method.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2012 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2015 R Core Team
 % Distributed under GPL 2 or later
 
 \name{getS3method}
 \alias{getS3method}
-\title{Get An S3 Method}
+\title{Get an S3 Method}
 \description{
   Get a method for an S3 generic, possibly from a namespace or the
   generic's registry.
 }
 \usage{
-getS3method(f, class, optional = FALSE)
+getS3method(f, class, optional = FALSE, envir = parent.frame())
 }
 \arguments{
   \item{f}{character: name of the generic.}
   \item{class}{character: name of the class.}
   \item{optional}{logical: should failure to find the generic or a
     method be allowed?}
+  \item{envir}{the \code{\link{environment}} in which the method and its
+    generic are searched first.}
 }
 \details{
   S3 methods may be hidden in namespaces, and will not
@@ -45,4 +47,4 @@ exists("predict.ppr") # false
 getS3method("predict", "ppr")
 }
 \keyword{data}
-
+\keyword{methods}
diff --git a/src/library/utils/man/glob2rx.Rd b/src/library/utils/man/glob2rx.Rd
index f7ab2dc..192946f 100644
--- a/src/library/utils/man/glob2rx.Rd
+++ b/src/library/utils/man/glob2rx.Rd
@@ -1,5 +1,5 @@
 % File src/library/utils/man/glob2rx.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2008 R Core Team
 % Copyright 2002-2008 The R Foundation
 % Distributed under GPL 2 or later
diff --git a/src/library/utils/man/globalVariables.Rd b/src/library/utils/man/globalVariables.Rd
index 2f3b2c5..026ebc2 100644
--- a/src/library/utils/man/globalVariables.Rd
+++ b/src/library/utils/man/globalVariables.Rd
@@ -1,6 +1,6 @@
 % File src/library/utils/man/globalVariables.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 2012-2013 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 2012-2017 R Core Team
 % Distributed under GPL 2 or later
 
 \name{globalVariables}
@@ -108,10 +108,6 @@ if(getRversion() >= "3.1.0") utils::suppressForeignCheck("localvariable")
 localvariable <- if (condition) entry1 else entry2
 .Call(localvariable, 1, 2, 3)
 
-## Alternatively, like this:
-if(getRversion() < "3.1.0") dontCheck <- identity
-.Call(dontCheck(if (condition) entry1 else entry2), 1, 2, 3)
-
 ## HOWEVER, it is much better practice to write code
 ## that can be checked thoroughly, e.g.
 if(condition) .Call(entry1, 1, 2, 3) else .Call(entry2, 1, 2, 3)
diff --git a/src/library/utils/man/hasName.Rd b/src/library/utils/man/hasName.Rd
new file mode 100644
index 0000000..f883cd3
--- /dev/null
+++ b/src/library/utils/man/hasName.Rd
@@ -0,0 +1,42 @@
+% File src/library/utils/man/hasName.Rd
+% Part of the R package, https://www.R-project.org
+% Copyright 2016 R Core Team
+% Distributed under GPL 2 or later
+
+\name{hasName}
+\alias{hasName}
+\title{Check for name}
+\description{
+  \code{hasName} is a convenient way to test for one or more names
+in an R object.
+}
+\usage{
+hasName(x, name)
+}
+\arguments{
+  \item{x}{Any object.}
+  \item{name}{One or more character values to look for.}
+}
+\value{
+  A logical vector of the same length as \code{name} containing
+  \code{TRUE} if the corresponding entry is in \code{names(x)}.
+}
+\details{
+  \code{hasName(x, name)} is defined to be equivalent to 
+  \code{name \%in\% names(x)}, though it will evaluate slightly more
+  quickly.  It is intended to replace the common idiom
+  \code{!is.null(x$name)}.  The latter can be unreliable due to partial
+  name matching; see the example below.
+}
+\seealso{
+  \code{\link{\%in\%}}, \code{\link{exists}}
+}
+\examples{
+x <- list(abc = 1, def = 2)
+!is.null(x$abc) # correct
+!is.null(x$a)   # this is the wrong test!
+hasName(x, "abc")
+hasName(x, "a")
+}
+\keyword{manip}
+\keyword{logic}
diff --git a/src/library/utils/man/head.Rd b/src/library/utils/man/head.Rd
index 5d8a770..f50eca3 100644
--- a/src/library/utils/man/head.Rd
+++ b/src/library/utils/man/head.Rd
@@ -1,5 +1,5 @@
 % File src/library/utils/man/head.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2007 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/utils/man/help.Rd b/src/library/utils/man/help.Rd
index f903984..fc97d67 100644
--- a/src/library/utils/man/help.Rd
+++ b/src/library/utils/man/help.Rd
@@ -1,5 +1,5 @@
 % File src/library/utils/man/help.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2014 R Core Team
 % Distributed under GPL 2 or later
 
@@ -49,7 +49,7 @@ help(topic, package = NULL, lib.loc = NULL,
     \item HTML help pages with hyperlinks to other topics, shown in a
     browser by \code{\link{browseURL}}.
 #ifdef unix
-    (Where possible an existing browser window is re-used: the OS X
+    (Where possible an existing browser window is re-used: the macOS
     GUI uses its own browser window.)
 #endif
     If for some reason HTML help is unavailable (see
@@ -59,7 +59,7 @@ help(topic, package = NULL, lib.loc = NULL,
     see the section on \sQuote{Offline help}.
   }
 #ifdef unix
-  The \sQuote{factory-fresh} default is text help except from the OS X
+  The \sQuote{factory-fresh} default is text help except from the macOS
   GUI, which uses HTML help displayed in its own browser window.
 #endif
 #ifdef windows
diff --git a/src/library/utils/man/help.request.Rd b/src/library/utils/man/help.request.Rd
index 8e052c6..19b5823 100644
--- a/src/library/utils/man/help.request.Rd
+++ b/src/library/utils/man/help.request.Rd
@@ -1,6 +1,6 @@
 % File src/library/utils/man/help.request.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 2008-11 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 2008-2015 R Core Team
 % Distributed under GPL 2 or later
 
 \name{help.request}
@@ -29,7 +29,7 @@ help.request(subject = "",
 \details{
   This function is not intended to replace the posting
   guide.  Please read the guide before posting to R-help or using this
-  function (see \url{http://www.r-project.org/posting-guide.html}).
+  function (see \url{https://www.r-project.org/posting-guide.html}).
 
   The \code{help.request} function:
   \itemize{
@@ -50,7 +50,7 @@ help.request(subject = "",
 \value{
   Nothing useful.
 }
-\seealso{The posting guide (\url{http://www.r-project.org/posting-guide.html}),
+\seealso{The posting guide (\url{https://www.r-project.org/posting-guide.html}),
   also \code{\link{sessionInfo}()} from which you may add to the help request.
 
   \code{\link{create.post}}.
diff --git a/src/library/utils/man/help.search.Rd b/src/library/utils/man/help.search.Rd
index 78fd7ea..fe05f1f 100644
--- a/src/library/utils/man/help.search.Rd
+++ b/src/library/utils/man/help.search.Rd
@@ -1,6 +1,6 @@
 % File src/library/utils/man/help.search.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2013 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2014 R Core Team
 % Distributed under GPL 2 or later
 
 \name{help.search}
@@ -38,8 +38,8 @@ help.search(pattern, fields = c("alias", "concept", "title"),
     \code{"name"}, \code{"title"}, \code{"alias"}, \code{"concept"}, and
     \code{"keyword"}, corresponding to the help page's (file) name, its
     title, the topics and concepts it provides documentation for, and
-    the keywords it can be classified to.  See below for how vignettes
-    and demos are searched.}
+    the keywords it can be classified to.  See below for details and how
+    vignettes and demos are searched.}
   \item{apropos}{a character string to be matched in the help page
     topics and title.}
   \item{keyword}{a character string to be matched in the help page
@@ -80,7 +80,7 @@ help.search(pattern, fields = c("alias", "concept", "title"),
     used.  Otherwise, one can give a numeric or a list specifying the
     maximal distance for the approximate match, see argument
     \code{max.distance} in the documentation for \code{\link{agrep}}.}
-  \item{use_UTF8}{logical: should be results be given in UTF-8 encoding?
+  \item{use_UTF8}{logical: should results be given in UTF-8 encoding?
     Also changes the meaning of regexps in \code{agrep} to be Perl regexps.}
   \item{types}{a character vector listing the types of documentation
     to search.  The entries must be abbreviations of \code{"vignette"}
@@ -93,7 +93,7 @@ help.search(pattern, fields = c("alias", "concept", "title"),
   serialized as \file{hsearch.rds} in the \file{Meta} directory
   (provided the package has any help pages).  Vignettes are also
   indexed in the \file{Meta/vignette.rds} file.  These files are used to
-  create the help search database.
+  create the help search database via \code{\link{hsearch_db}}.
 
   The arguments \code{apropos} and \code{whatis} play a role similar to
   the Unix commands with the same names.
@@ -113,12 +113,19 @@ help.search(pattern, fields = c("alias", "concept", "title"),
   package name followed by \code{::} or \code{:::} to limit the search
   to that package.
 
+  For help files, \samp{\keyword} entries which are not among the
+  standard keywords as listed in file \file{KEYWORDS} in the \R
+  documentation directory are taken as concepts.  For standard keyword
+  entries different from \samp{internal}, the corresponding descriptions
+  from file \file{KEYWORDS} are additionally taken as concepts.  All
+  \samp{\concept} entries used as concepts.  
+
   Vignettes are searched as follows.  The \code{"name"} and
   \code{"alias"} are both the base of the vignette filename, and the
-  \code{"concept"} entries are taken from the \code{\\VignetteKeywords}
+  \code{"concept"} entries are taken from the \code{\\VignetteKeyword}
   entries.  Vignettes are not classified using the help system
   \code{"keyword"} classifications.  Demos are handled
-  similarly to vignettes, without the  \code{"concept"} search.
+  similarly to vignettes, without the \code{"concept"} search.
 }
 
 \value{
@@ -127,13 +134,17 @@ help.search(pattern, fields = c("alias", "concept", "title"),
   query.  This mechanism is experimental, and may change in future
   versions of \R.
 
-  In \code{R.app} on OS X, this will show up a browser with selectable
+  In \code{R.app} on macOS, this will show up a browser with selectable
   items. On exiting this browser, the help pages for the selected items
   will be shown in separate help windows.
 
   The internal format of the class is undocumented and subject to change.
 }
 \seealso{
+  \code{\link{hsearch_db}} for more information on the help search
+  database employed, and for utilities to inspect available concepts and
+  keywords.
+  
   \code{\link{help}};
   \code{\link{help.start}} for starting the hypertext (currently HTML)
   version of \R's online documentation, which offers a similar search
diff --git a/src/library/utils/man/help.start.Rd b/src/library/utils/man/help.start.Rd
index 9a5f75a..e6ec1f1 100644
--- a/src/library/utils/man/help.start.Rd
+++ b/src/library/utils/man/help.start.Rd
@@ -1,5 +1,5 @@
 % File src/library/utils/man/help.start.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2009 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/utils/man/hsearch-utils.Rd b/src/library/utils/man/hsearch-utils.Rd
new file mode 100644
index 0000000..b250e33
--- /dev/null
+++ b/src/library/utils/man/hsearch-utils.Rd
@@ -0,0 +1,78 @@
+% File src/library/utils/man/hsearch-utils.Rd
+% Part of the R package, https://www.R-project.org
+% Copyright 2015 R Core Team
+% Distributed under GPL 2 or later
+
+\name{hsearch-utils}
+\alias{hsearch_db}
+\alias{hsearch_db_concepts}
+\alias{hsearch_db_keywords}
+\title{Help Search Utilities}
+\description{
+  Utilities for searching the help system.
+}
+\usage{
+hsearch_db(package = NULL, lib.loc = NULL,
+           types = getOption("help.search.types"), 
+           verbose = getOption("verbose"),
+           rebuild = FALSE, use_UTF8 = FALSE)
+hsearch_db_concepts(db = hsearch_db())
+hsearch_db_keywords(db = hsearch_db())
+}
+\arguments{
+   \item{package}{a character vector with the names of packages to
+    search through, or \code{NULL} in which case \emph{all} available
+    packages in the library trees specified by \code{lib.loc} are
+    searched.}
+  \item{lib.loc}{a character vector describing the location of \R
+    library trees to search through, or \code{NULL}.  The default value
+    of \code{NULL} corresponds to all libraries currently known.}
+  \item{types}{a character vector listing the types of documentation
+    to search.
+    See \code{\link{help.search}} for details.}
+  \item{verbose}{a logical controlling the verbosity of building the
+    help search database.
+    See \code{\link{help.search}} for details.}
+  \item{rebuild}{a logical indicating whether the help search database
+    should be rebuilt.
+    See \code{\link{help.search}} for details.}
+  \item{use_UTF8}{logical: should results be given in UTF-8 encoding?}
+  \item{db}{a help search database as obtained by calls to
+    \code{hsearch_db()}.}
+}
+\details{
+  \code{hsearch_db()} builds and caches the help search database for
+  subsequent use by \code{\link{help.search}}.  (In fact, re-builds only
+  when forced (\code{rebuild = TRUE}) or \dQuote{necessary}.)
+
+  The format of the help search database is still experimental, and may
+  change in future versions.  Currently, it consists of four tables: one
+  with base information about all documentation objects found, including
+  their names and titles and unique ids; three more tables contain the
+  individual aliases, concepts and keywords together with the ids of the
+  documentation objects they belong to.  Separating out the latter three
+  tables accounts for the fact that a single documentation object may
+  provide several of these entries, and allows for efficient searching.
+
+  See the details in \code{\link{help.search}} for how searchable
+  entries are interpreted according to help type.
+
+  \code{hsearch_db_concepts()} and \code{hsearch_db_keywords()} extract
+  all concepts or keywords, respectively, from a help search database,
+  and return these in a data frame together with their total frequencies
+  and the numbers of packages they are used in, with entries sorted in
+  decreasing total frequency.
+}
+\examples{
+db <- hsearch_db()
+## Total numbers of documentation objects, aliases, keywords and
+## concepts (using the current format):
+sapply(db, NROW)
+## Can also be obtained from print method:
+db
+## 10 most frequent concepts:
+head(hsearch_db_concepts(), 10)
+## 10 most frequent keywords:
+head(hsearch_db_keywords(), 10)
+}
+\keyword{documentation}
diff --git a/src/library/utils/man/install.packages.Rd b/src/library/utils/man/install.packages.Rd
index dd7380c..c6976c9 100644
--- a/src/library/utils/man/install.packages.Rd
+++ b/src/library/utils/man/install.packages.Rd
@@ -1,10 +1,8 @@
 % File src/library/utils/man/install.packages.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2014 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2017 R Core Team
 % Distributed under GPL 2 or later
 
-\newcommand{\sspace}{\ifelse{latex}{\out{~}}{ }}
-
 \name{install.packages}
 \alias{install.packages}
 \title{Install Packages from Repositories or Local Files}
@@ -33,7 +31,7 @@ install.packages(pkgs, lib, repos = getOption("repos"),
     file paths of \file{.zip} files containing binary builds of
     packages.  (\code{http://} and \code{file://} URLs are also accepted
     and the files will be downloaded and installed from local copies.)
-    Source directories or file paths or URLs of archives be
+    Source directories or file paths or URLs of archives may be
     specified with \code{type = "source"}, but some packages need
     suitable tools installed (see the \sQuote{Details} section).
 #endif
@@ -42,7 +40,7 @@ install.packages(pkgs, lib, repos = getOption("repos"),
     or binary package archive files (as created by \command{R CMD build
       --binary}).  (\code{http://} and \code{file://} URLs are also
     accepted and the files will be downloaded and installed from local
-    copies.)  On a CRAN build of \R for OS X these can be \file{.tgz}
+    copies.)  On a CRAN build of \R for macOS these can be \file{.tgz}
     files containing binary package archives.
     Tilde-expansion will be done on file paths.
 #endif
@@ -59,7 +57,7 @@ install.packages(pkgs, lib, repos = getOption("repos"),
   \item{repos}{
     character vector, the base URL(s) of the repositories
     to use, e.g., the URL of a CRAN mirror such as
-    \code{"http://cran.us.r-project.org"}.  For more details on
+    \code{"https://cloud.r-project.org"}.  For more details on
     supported URL schemes see \code{\link{url}}.
 
     Can be \code{NULL} to install from local files, directories or URLs:
@@ -69,16 +67,18 @@ install.packages(pkgs, lib, repos = getOption("repos"),
     URL(s) of the contrib sections of the repositories.  Use this
     argument if your repository mirror is incomplete, e.g., because
     you burned only the \file{contrib} section on a CD, or only have
-    binary packages.  Overrides argument \code{repos}.  Can also be
-    \code{NULL} to install from local files.
+    binary packages.  Overrides argument \code{repos}.
+    Incompatible with \code{type = "both"}.
   }
   \item{method}{
-    download method, see \code{\link{download.file}}.
+    download method, see \code{\link{download.file}}.  Unused if
+    a non-\code{NULL} \code{available} is supplied.
   }
   \item{available}{
-    an object as returned by \code{\link{available.packages}}
+    a matrix as returned by \code{\link{available.packages}}
     listing packages available at the repositories, or \code{NULL} when
     the function makes an internal call to \code{available.packages}.
+    Incompatible with \code{type = "both"}.
   }
   \item{destdir}{
     directory where downloaded packages are stored.  If it is
@@ -87,10 +87,10 @@ install.packages(pkgs, lib, repos = getOption("repos"),
     directory will be used (and the files will be deleted
     at the end of the session).
   }
-  \item{dependencies}{logical indicating to also install uninstalled
-    packages which these packages depend on/link to/import/suggest
-    (and so on recursively).  Not used if \code{repos = NULL}.
-    Can also be a character vector, a subset of
+  \item{dependencies}{logical indicating whether to also install
+    uninstalled packages which these packages depend on/link
+    to/import/suggest (and so on recursively).  Not used if \code{repos
+    = NULL}.  Can also be a character vector, a subset of
     \code{c("Depends", "Imports", "LinkingTo", "Suggests", "Enhances")}.
 
     Only supported if \code{lib} is of length one (or missing),
@@ -111,21 +111,8 @@ install.packages(pkgs, lib, repos = getOption("repos"),
     In all of these, \code{"LinkingTo"} is omitted for binary packages.
   }
   \item{type}{character, indicating the type of package to download and
-    install.
-
-    Possible values are (currently) \code{"source"},
-    \code{"mac.binary"}, \code{"mac.binary.mavericks"} and
-    \code{"win.binary"}: the binary types can be listed and downloaded
-    but not installed on other platforms.
-
-    The default is the appropriate binary type on Windows and on the
-    CRAN binary OS X distributions, otherwise \code{"source"}.  For the
-    platforms where binary packages are the default, an alternative is
-    \code{"both"} which means \sQuote{try binary if available and
-    current, otherwise try source}.  (This will only choose the binary
-    package if its version number is no older than the source version.
-    In interactive use it will ask before attempting to install source
-    packages.)
+    install.  Will be \code{"source"} except on Windows and some macOS
+    builds: see the section on \sQuote{Binary packages} for those.
   }
   \item{configure.args}{
     (Used only for source installs.) A character vector or a named list.
@@ -149,9 +136,8 @@ install.packages(pkgs, lib, repos = getOption("repos"),
     for flag \option{--configure-vars}, which is used to set environment
     variables for the \command{configure} run.
   }
-  \item{clean}{a logical value indicating whether to specify
-    to add the \option{--clean} flag to the call to
-    \command{R CMD INSTALL}.
+  \item{clean}{a logical value indicating whether to add the
+    \option{--clean} flag to the call to \command{R CMD INSTALL}.
     This is sometimes used to perform additional operations at the end
     of the package installation in addition to removing intermediate files.
   }
@@ -161,11 +147,12 @@ install.packages(pkgs, lib, repos = getOption("repos"),
     \code{Sys.getenv("MAKE", "make")} accepts argument \code{-k -j
     \var{Ncpus}}.
   }
-  \item{verbose}{a logical indicating if some \dQuote{progress report}
-    should happen.}
+  \item{verbose}{
+    a logical indicating if some \dQuote{progress report} should be given.
+  }
   \item{libs_only}{
     a logical value: should the \option{--libs-only} option be used to
-    install only additional sub-architectures?  (See also
+    install only additional sub-architectures for source installs?  (See also
     \code{INSTALL_opts}.)  This can also be used on Windows to install
     just the DLL(s) from a binary package, e.g.\sspace{}to add 64-bit
     DLLs to a 32-bit install.
@@ -175,33 +162,26 @@ install.packages(pkgs, lib, repos = getOption("repos"),
     \command{R CMD INSTALL} for a source package install.  E.g.,
     \code{c("--html", "--no-multiarch")}.
 
-    Can also be a named list of character vectors of to be used as
+    Can also be a named list of character vectors to be used as
     additional options, with names the respective package names.
   }
-  \item{quiet}{logical: if true, reduce the amount of output.}
-  \item{keep_outputs}{a logical: if true, keep the outputs from
-    installing source packages in the current working directory, with
-    the names of the output files the package names with \file{.out}
-    appended.  Alternatively, a character string giving the directory
-    where to save the outputs.  Ignored when installing from local
-    files.
+  \item{quiet}{
+    logical: if true, reduce the amount of output.
+  }
+  \item{keep_outputs}{
+    a logical: if true, keep the outputs from installing source packages
+    in the current working directory, with the names of the output files
+    the package names with \file{.out} appended.  Alternatively, a
+    character string giving the directory in which to save the outputs.
+    Ignored when installing from local files.
   }
   \item{\dots}{
     Arguments to be passed to \code{\link{download.file}} or to the
-    functions for binary installs on OS X and Windows (which accept
+    functions for binary installs on macOS and Windows (which accept
     an argument \code{"lock"}: see the section on \sQuote{Locking}).
   }
 }
 \details{
-  \R packages are primarily distributed as \emph{source} packages, but
-  \emph{binary} packages (a packaging up of the installed package) are
-  also supported, and the type most commonly used on Windows and by
-  the CRAN distributions for OS X.  This function can install either
-  type where supported, either by downloading a file from a repository
-  or from a local file.  The default type is given by
-  \code{\link{getOption}("pkgType")}: this defaults to \code{"source"}
-  apart from under Windows or a CRAN binary distribution for OS X.
-
   This is the main function to install packages.  It takes a vector of
   names and a destination library, downloads the packages from the
   repositories and installs them.  (If the library is omitted it
@@ -215,44 +195,78 @@ install.packages(pkgs, lib, repos = getOption("repos"),
   \sQuote{Note} section.
 #endif
 
-  For source packages from a repository an attempt is made to
-  install the packages in an order that respects their dependencies.
-  This does assume that all the entries in \code{lib} are on the default
-  library path for installs (set by \env{R_LIBS}).
-#ifdef windows
+  For installs from a repository an attempt is made to install the
+  packages in an order that respects their dependencies.  This does
+  assume that all the entries in \code{lib} are on the default library
+  path for installs (set by environment variable \env{R_LIBS}).
+
+  You are advised to run \code{update.packages} before
+  \code{install.packages} to ensure that any already installed
+  dependencies have their latest versions.
+}
+\value{
+  Invisible \code{NULL}.
+}
+\section{Binary packages}{
+  This section applies only to platforms where binary packages are
+  available: Windows and CRAN builds for macOS.
 
-  Using packages with \code{type = "source"} always works on Windows
-  provided the package contains no C/C++/Fortran code that needs
-  compilation.  Otherwise you will need to have installed the Rtools
+  \R packages are primarily distributed as \emph{source} packages, but
+  \emph{binary} packages (a packaging up of the installed package) are
+  also supported, and the type most commonly used on Windows and by the
+  CRAN builds for macOS.  This function can install either type, either by
+  downloading a file from a repository or from a local file.
+
+  Possible values of \code{type} are (currently) \code{"source"},
+  \code{"mac.binary"}, \code{"mac.binary.el-capitan"} and
+  \code{"win.binary"}: the appropriate binary type where supported can
+  also be selected as \code{"binary"}.
+
+  For a binary install from a repository, the function checks for the
+  availability of a source package on the same repository, and reports
+  if the source package has a later version, or is available but no
+  binary version is.  This check can be suppressed by using
+\preformatted{    options(install.packages.check.source = "no")}
+  and should be if there is a partial repository containing only binary
+  files.
+
+  An alternative (and the current default) is \code{"both"} which means
+  \sQuote{use binary if available and current, otherwise try
+    source}. The action if there are source packages which are preferred
+  but may contain code which needs to be compiled is controlled by
+  \code{\link{getOption}("install.packages.compile.from.source")}.
+  \code{type = "both"} will be silently changed to \code{"binary"} if
+  either \code{contriburl} or \code{available} is specified.
+
+  Using packages with \code{type = "source"} always works provided the
+  package contains no C/C++/Fortran code that needs compilation.
+#ifdef windows
+  Otherwise you will need to have installed the Rtools
   collection as described in the \sQuote{R for Windows FAQ} \emph{and}
   you must have the \env{PATH} environment variable set up as required
   by Rtools.
 
+  For a 32/64-bit installation of \R on Windows, a small minority of
+  packages with compiled code need either \code{INSTALL_opts =
+  "--force-biarch"} or \code{INSTALL_opts = "--merge-multiarch"} for a
+  source installation.  (It is safe to always set the latter when
+  installing from a repository or tarballs, although it will be a little
+  slower.)
+
   When installing a binary package, \code{install.packages} will abort
   the install if it detects that the package is already installed and is
   currently in use.  In some circumstances (e.g., multiple instances of
   \R running at the same time and sharing a library) it will not detect a
-  problem, but the installation may fail.
+  problem, but the installation may fail as Windows locks files in use.
+#endif
+#ifdef unix
+  Otherwise, on macOS you need to have installed the
+  \sQuote{Command-line tools for Xcode} (see the \sQuote{R Installation
+    and Administration Manual}) and if needed by the package a Fortran
+  compiler, and have them in your path.
 #endif
-
-  You are advised to run \code{update.packages} before
-  \code{install.packages} to ensure that any already installed
-  dependencies have their latest versions.
-
-  Argument \code{libs_only = TRUE} is supported for source installs and for
-  Windows binary installs.
-
-  For binary installs, the function also checks for the availability of
-  a source package on the same repository, and reports if the source
-  package has a later version, or is available but no binary version
-  is.  This check can be suppressed by
-\preformatted{    options(install.packages.check.source = "no")}
-  and should be if there is a partial repository containing only binary
-  files.
-}
-\value{
-  Invisible \code{NULL}.
 }
+
 \section{Locking}{
   There are various options for locking: these differ between source and
   binary installs.
@@ -270,7 +284,7 @@ install.packages(pkgs, lib, repos = getOption("repos"),
   \option{--no-lock}.
   % and also options(install.lock = FALSE) in an \R startup file.
 
-  For an OS X or Windows binary install, no locking is done by
+  For a macOS or Windows binary install, no locking is done by
   default.  Setting argument \code{lock} to \code{TRUE} (it defaults to
   the value of \code{\link{getOption}("install.lock", FALSE)}) will use
   per-directory locking as described for source installs: if the value
@@ -290,10 +304,11 @@ install.packages(pkgs, lib, repos = getOption("repos"),
   Parallel installs are attempted if \code{pkgs} has length greater than
   one and \code{Ncpus > 1}.  It makes use of a parallel \command{make},
   so the \code{make} specified (default \command{make}) when \R was
-  built must be capable of supporting \code{make -j \var{n}}: GNU make
-  and \command{dmake} do, but FreeBSD and Solaris \command{make} do not:
-  if necessary environment variable \env{MAKE} can be set for the
-  current session to select a suitable \command{make}.
+  built must be capable of supporting \code{make -j \var{n}}: GNU make,
+  \command{dmake} and \command{pmake} do, but Solaris \command{make} and
+  older FreeBSD \command{make} do not: if necessary environment variable
+  \env{MAKE} can be set for the current session to select a suitable
+  \command{make}.
 
   \code{install.packages} needs to be able to compute all the
   dependencies of \code{pkgs} from \code{available}, including if one
@@ -322,10 +337,9 @@ install.packages(pkgs, lib, repos = getOption("repos"),
   on the library directories specified, but Windows reports unreliably.
   If there is only one library directory (the default), \R tries to
   find out by creating a test directory, but even this need not be the
-  whole story.  Under Windows Vista and later you may have permission to
-  write in a library directory but lack permission to write binary files
-  (such as \file{.dll} files) there.  See the \sQuote{R for Windows FAQ}
-  for workarounds.
+  whole story: you may have permission to write in a library directory
+  but lack permission to write binary files (such as \file{.dll} files)
+  there.  See the \sQuote{R for Windows FAQ} for workarounds.
 }
 #endif
 \seealso{
@@ -338,6 +352,8 @@ install.packages(pkgs, lib, repos = getOption("repos"),
   See \code{\link{download.file}} for how to handle proxies and
   other options to monitor file transfers.
 
+  \code{\link{untar}} for manually unpacking source package tarballs.
+  
   \code{\link{INSTALL}}, \code{\link{REMOVE}}, \code{\link{remove.packages}},
   \code{\link{library}}, \code{\link{.packages}}, \code{\link{read.dcf}}
 
@@ -346,7 +362,7 @@ install.packages(pkgs, lib, repos = getOption("repos"),
 }
 
 \examples{\dontrun{
-## A Linux example for Fedora's layout
+## A Linux example for Fedora's layout of udunits2 headers.
 install.packages(c("ncdf4", "RNetCDF"),
   configure.args = c(RNetCDF = "--with-netcdf-include=/usr/include/udunits2"))
 }}
diff --git a/src/library/utils/man/installed.packages.Rd b/src/library/utils/man/installed.packages.Rd
index 8c83397..a33a3df 100644
--- a/src/library/utils/man/installed.packages.Rd
+++ b/src/library/utils/man/installed.packages.Rd
@@ -1,5 +1,5 @@
 % File src/library/utils/man/installed.packages.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2010 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/utils/man/isS3method.Rd b/src/library/utils/man/isS3method.Rd
new file mode 100644
index 0000000..a86e90a
--- /dev/null
+++ b/src/library/utils/man/isS3method.Rd
@@ -0,0 +1,58 @@
+% File src/library/utils/man/isS3method.Rd
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2016 R Core Team
+% Distributed under GPL 2 or later
+
+\name{isS3method}
+\alias{isS3method}
+\title{Is 'method' the Name of an S3 Method?}
+\description{
+  Checks if \code{method} is the name of a valid / registered S3
+  method.  Alternatively, when \code{f} and \code{class} are specified,
+  it is checked if \code{f} is the name of an S3 generic function and
+  \code{paste(f, class, sep=".")} is a valid S3 method.
+}
+\usage{
+isS3method(method, f, class, envir = parent.frame())
+}
+\arguments{
+  \item{method}{a character string, typically of the form
+    \code{"<fn>.<class>"}.  If omitted, \code{f} and \code{class} have
+    to be specified instead.}
+  \item{f}{optional character string, typically specifying an S3 generic
+    function.  Used, when \code{method} is not specified.}
+  \item{class}{optional character string, typically specifying an S3
+    class name.  Used, when \code{method} is not specified.}
+  \item{envir}{the \code{\link{environment}} in which the method and its
+    generic are searched first, as in \code{\link{getS3method}()}.}
+}
+%% \details{
+%% }
+\value{
+  \code{\link{logical}} \code{TRUE} or \code{FALSE}
+}
+\seealso{
+  \code{\link{methods}}, \code{\link{getS3method}}.
+}
+\examples{
+isS3method("t")           # FALSE - it is an S3 generic
+isS3method("t.default")   # TRUE
+isS3method("t.ts")        # TRUE
+isS3method("t.test")      # FALSE
+isS3method("t.data.frame")# TRUE
+isS3method("t.lm")        # FALSE - not existing
+isS3method("t.foo.bar")   # FALSE - not existing
+
+## S3 methods with "4 parts" in their name:
+ff <- c("as.list", "as.matrix", "is.na", "row.names", "row.names<-")
+for(m in ff) if(isS3method(m)) stop("wrongly declared an S3 method: ", m)
+(m4 <- paste(ff, "data.frame", sep="."))
+for(m in m4) if(!isS3method(m)) stop("not an S3 method: ", m)
+\dontshow{
+stopifnot(
+  !isS3method("t"), !isS3method("t.test"), !isS3method("qr.coef"), !isS3method("sort.list"),
+  isS3method("t.default"), isS3method("t.ts"), isS3method("t.data.frame"),
+  !isS3method("t.lm"), !isS3method("t.foo.bar"))
+}
+}
+\keyword{methods}
diff --git a/src/library/utils/man/isS3stdGen.Rd b/src/library/utils/man/isS3stdGen.Rd
new file mode 100644
index 0000000..ff44742
--- /dev/null
+++ b/src/library/utils/man/isS3stdGen.Rd
@@ -0,0 +1,30 @@
+% File src/library/utils/man/isS3stdGeneric.Rd
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2016 R Core Team
+% Distributed under GPL 2 or later
+
+\name{isS3stdGeneric}
+\alias{isS3stdGeneric}
+\title{Check if a function acts as an S3 generic}
+\description{
+  Determines whether \code{f} acts as a standard S3-style generic
+  function.
+}
+\usage{
+isS3stdGeneric(f)
+}
+\arguments{
+  \item{f}{A function object}
+}
+\details{
+  A closure is considered a standard S3 generic if the first expression
+  in its body calls \code{\link{UseMethod}}. Functions which perform
+  operations before calling \code{UseMethod} will not be considered
+  \dQuote{standard} S3 generics.
+}
+\value{
+  If \code{f} is an S3 generic, a logical vector containing \code{TRUE}
+  with the name of the S3 generic (the string passed to
+  \code{UseMethod}). Otherwise, \code{FALSE} (unnamed).
+}
+\keyword{utilities}
diff --git a/src/library/utils/man/localeToCharset.Rd b/src/library/utils/man/localeToCharset.Rd
index 20bd80c..ef25838 100644
--- a/src/library/utils/man/localeToCharset.Rd
+++ b/src/library/utils/man/localeToCharset.Rd
@@ -1,5 +1,5 @@
 % File src/library/utils/man/localeToCharset.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2009 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/utils/man/ls_str.Rd b/src/library/utils/man/ls_str.Rd
index 6db552c..e60bba8 100644
--- a/src/library/utils/man/ls_str.Rd
+++ b/src/library/utils/man/ls_str.Rd
@@ -1,6 +1,6 @@
 % File src/library/utils/man/ls_str.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2013 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2014 R Core Team
 % Distributed under GPL 2 or later
 
 \name{ls.str}
diff --git a/src/library/utils/man/maintainer.Rd b/src/library/utils/man/maintainer.Rd
index cb8fb9c..7dfa609 100644
--- a/src/library/utils/man/maintainer.Rd
+++ b/src/library/utils/man/maintainer.Rd
@@ -1,5 +1,5 @@
 % File src/library/utils/man/maintainer.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2012 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/utils/man/make.packages.html.Rd b/src/library/utils/man/make.packages.html.Rd
index fcc1d27..b7f46c1 100644
--- a/src/library/utils/man/make.packages.html.Rd
+++ b/src/library/utils/man/make.packages.html.Rd
@@ -1,5 +1,5 @@
 % File src/library/utils/man/unix/make.packages.html.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2011 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/utils/man/make.socket.Rd b/src/library/utils/man/make.socket.Rd
index 81802ec..cd96146 100644
--- a/src/library/utils/man/make.socket.Rd
+++ b/src/library/utils/man/make.socket.Rd
@@ -1,6 +1,6 @@
 % File src/library/utils/man/make.socket.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2012 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2015 R Core Team
 % Distributed under GPL 2 or later
 
 \name{make.socket}
@@ -41,7 +41,10 @@ make.socket(host = "localhost", port, fail = TRUE, server = FALSE)
 }
 
 \seealso{
-  \code{\link{close.socket}}, \code{\link{read.socket}}
+  \code{\link{close.socket}}, \code{\link{read.socket}}.
+
+  Compiling in support for sockets was optional prior to \R 3.3.0: see
+  \code{\link{capabilities}("sockets")} to see if it is available.
 }
 
 \examples{
diff --git a/src/library/utils/man/menu.Rd b/src/library/utils/man/menu.Rd
index 54525ce..3d74f53 100644
--- a/src/library/utils/man/menu.Rd
+++ b/src/library/utils/man/menu.Rd
@@ -1,5 +1,5 @@
 % File src/library/utils/man/menu.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2013 R Core Team
 % Distributed under GPL 2 or later
 
@@ -23,7 +23,7 @@ menu(choices, graphics = FALSE, title = NULL)
 }
 \details{
   If \code{graphics = TRUE} and a windowing system is available
-  (Windows, OS X or X11 \emph{via} Tcl/Tk) a listbox widget is
+  (Windows, macOS or X11 \emph{via} Tcl/Tk) a listbox widget is
   used, otherwise a text menu.  It is an error to use \code{menu} in a
   non-interactive session.
 
diff --git a/src/library/utils/man/methods.Rd b/src/library/utils/man/methods.Rd
index a5c40cd..fa1ec12 100644
--- a/src/library/utils/man/methods.Rd
+++ b/src/library/utils/man/methods.Rd
@@ -1,63 +1,105 @@
 % File src/library/utils/man/methods.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2007 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2015 R Core Team
 % Distributed under GPL 2 or later
 
 \name{methods}
 \title{List Methods for S3 Generic Functions or Classes}
+\alias{.S3methods}
 \alias{methods}
 \alias{print.MethodsFunction}
 \description{
-  List all available methods for an S3 generic function, or all
-  methods for a class.
+  List all available methods for a S3 and S4 generic function, or all
+  methods for an S3 or S4 class.
 }
 \usage{
 methods(generic.function, class)
+.S3methods(generic.function, class, envir=parent.frame())
+
+\S3method{print}{MethodsFunction}(x, byclass = attr(x, "byclass"), \dots)
 }
 \arguments{
   \item{generic.function}{a generic function, or a character string naming a
     generic function.}
   \item{class}{a symbol or character string naming a class: only used if
     \code{generic.function} is not supplied.}
+  \item{envir}{the environment in which to look for the definition of
+    the generic function, when the generic function is passed as a
+    character string.}
+  \item{x}{typically the result of \code{methods(..)}, an \R object of % S3
+    class \code{"MethodsFunction"}, see \sQuote{Value} below.}
+  \item{byclass}{an optional \code{\link{logical}} allowing to override
+    the \code{"byclass"} attribute determining how the result is
+    printed, see \sQuote{Details}.}
+  \item{\dots}{potentially further arguments passed to and from methods;
+    unused currently.}
 }
-\value{
-  An object of class \code{"MethodsFunction"}, a
-  character vector of function names with an \code{"info"} attribute.
-  There is a \code{print} method which marks with an asterisk any
-  methods which are not visible: such functions can be examined by
-  \code{\link{getS3method}} or \code{\link{getAnywhere}}.
-
-  The \code{"info"} attribute is a data frame, currently with a
-  logical column, \code{visible} and a factor column \code{from}
-  (indicating where the methods were found).
-}
+
 \details{
-  Function \code{methods} can be used to find out about the methods for
-  a particular generic function or class.  The functions listed are those
-  which \emph{are named like methods} and may not actually be methods
-  (known exceptions are discarded in the code).  Note that the listed
-  methods may not be user-visible objects, but often help will be
-  available for them.
-
-  If \code{class} is used, we check that a matching generic can be found
-  for each user-visible object named.  If \code{generic.function} is
-  given, there is a warning if it appears not to be a generic function.
-  (The check for being generic used can be fooled.)
+  \code{methods()} finds S3 and S4 methods associated with either the
+  \code{generic.function} or \code{class} argument.  Methods are found in
+  all packages on the current \code{search()} path.  \code{.S3methods()}
+  finds only S3 methods, \code{.S4methods()} finds only only S4 methods.
+
+  When invoked with the \code{generic.function} argument, the
+  \code{"byclass"} attribute (see Details) is \code{FALSE}, and the
+  \code{print} method by default displays the signatures (full names) of
+  S3 and S4 methods.  S3 methods are printed by pasting the generic
+  function and class together, separated by a \sQuote{.}, as
+  \code{generic.class}.  The S3 method name is followed by an asterisk
+  \code{*} if the method definition is not exported from the package
+  namespace in which the method is defined.  S4 method signatures are
+  printed as \code{generic,class-method}; S4 allows for multiple
+  dispatch, so there may be several classes in the signature
+  \code{generic,A,B-method}.
+
+  When invoked with the \code{class} argument, \code{"byclass"} is
+  \code{TRUE}, and the \code{print} method by default displays the names
+  of the generic functions associated with the class, \code{generic}.
+
+  The source code for all functions is available.  For S3 functions
+  exported from the namespace, enter the method at the command line as
+  \code{generic.class}.  For S3 functions not exported from the
+  namespace, see \code{getAnywhere} or \code{getS3method}.  For S4
+  methods, see \code{getMethod}.
+
+  Help is available for each method, in addition to each generic.  For
+  interactive help, use the documentation shortcut \code{?} with the
+  name of the generic and tab completion, \code{?"generic<tab>"} to
+  select the method for which help is desired.
+
+  The S3 functions listed are those which \emph{are named like methods}
+  and may not actually be methods (known exceptions are discarded in the
+  code).
 }
-\note{
-  This scheme is called \emph{S3} (S version 3).  For new projects,
-  it is recommended to use the more flexible and robust \emph{S4} scheme
-  provided in the \pkg{methods} package.  Functions can have both S3
-  and S4 methods, and function \code{\link{showMethods}} will
-  list the S4 methods (possibly none).
 
+\value{
+  An object of class \code{"MethodsFunction"}, a character vector of
+  method names with \code{"byclass"} and \code{"info"} attributes.  The
+  \code{"byclass"} attribute is a \code{\link{logical}} indicating if
+  the results were obtained with argument \code{class}
+  defined.  The \code{"info"} attribute is a data frame with columns:
+  \describe{
+    \item{generic}{\code{\link{character}} vector of the names of the generic.}
+    \item{visible}{logical(), is the method exported from the namespace
+      of the package in which it is defined?}
+    \item{isS4}{logical(), true when the method is an S4 method.}
+    \item{from}{a \code{\link{factor}}, the location or package name
+      where the method was found.}
+  }
+}
+
+\note{
   The original \code{methods} function was written by Martin Maechler.
 }
+
 \seealso{
   \code{\link{S3Methods}}, \code{\link{class}}, \code{\link{getS3method}}.
 
-  For S4, \code{\link{showMethods}}, \code{\link{Methods}}.
+  For S4, \code{\link{getMethod}}, \code{\link{showMethods}},
+  \link[methods]{Introduction} or \code{\link{Methods_Details}}.
 }
+
 \references{
   Chambers, J. M. (1992)
   \emph{Classes and methods: object-oriented programming in S.}
@@ -68,17 +110,24 @@ methods(generic.function, class)
 require(stats)
 
 methods(summary)
-methods(class = "aov")
-methods("[[")    # uses C-internal dispatching
+methods(class = "aov")    # S3 class
+## The same, with more details and more difficult to read:
+print(methods(class = "aov"), byclass=FALSE)
+methods("[[")             # uses C-internal dispatching
 methods("$")
-methods("$<-")   # replacement function
-methods("+")     # binary operator
-methods("Math")  # group generic
+methods("$<-")            # replacement function
+methods("+")              # binary operator
+methods("Math")           # group generic
 require(graphics)
-methods("axis")  # looks like it has methods, but not generic
-\dontrun{
-methods(print)   # over 100
-}
+methods("axis")           # looks like a generic, but is not
+
+if(require(Matrix)) {
+print(methods(class = "Matrix"))  # S4 class
+m <- methods("dim")       # S3 and S4 methods
+print(m)
+print(attr(m, "info"))    # more extensive information
+
 ## --> help(showMethods) for related examples
 }
+}
 \keyword{methods}
diff --git a/src/library/utils/man/mirrorAdmin.Rd b/src/library/utils/man/mirrorAdmin.Rd
index 591370d..f439486 100644
--- a/src/library/utils/man/mirrorAdmin.Rd
+++ b/src/library/utils/man/mirrorAdmin.Rd
@@ -1,5 +1,5 @@
 % File src/library/utils/man/mirrorAdmin.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2011 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/utils/man/modifyList.Rd b/src/library/utils/man/modifyList.Rd
index dc79386..88509c6 100644
--- a/src/library/utils/man/modifyList.Rd
+++ b/src/library/utils/man/modifyList.Rd
@@ -1,5 +1,5 @@
 % File src/library/utils/man/modifyList.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2013 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/utils/man/news.Rd b/src/library/utils/man/news.Rd
index 28703a2..0f5f9bf 100644
--- a/src/library/utils/man/news.Rd
+++ b/src/library/utils/man/news.Rd
@@ -1,17 +1,21 @@
 % File src/library/utils/man/news.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2014 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2015 R Core Team
 % Distributed under GPL 2 or later
 
 \name{news}
-\alias{news}
 \title{Build and Query R or Package News Information}
+\alias{news}
+\alias{print.news_db}
 \description{
-  Build and query the news for R or add-on packages.
+  Build and query the news data base for \R or add-on packages.
 }
 \usage{
 news(query, package = "R", lib.loc = NULL, format = NULL,
      reader = NULL, db = NULL)
+
+\S3method{print}{news_db}(x, doBrowse = interactive(),
+      browser = getOption("browser"), \dots)
 }
 \arguments{
   \item{query}{an expression for selecting news entries}
@@ -22,10 +26,18 @@ news(query, package = "R", lib.loc = NULL, format = NULL,
     libraries currently known.}
   \item{format}{Not yet used.}
   \item{reader}{Not yet used.}
-  \item{db}{a news db obtained from \code{news()}.}
+  \item{db, x}{a news db obtained from \code{news()}.}
+
+  \item{doBrowse}{logical specifying that the news should be opened in
+    the browser (by \code{\link{browseURL}}, accessible as via
+    \code{\link{help.start}}) instead of printed to the console.}
+  \item{browser}{the browser to be used, see \code{\link{browseURL}}.}
+  \item{\dots}{potentially further arguments passed to \code{print()}.}
 }
 \value{
-  An data frame inheriting from class \code{"news_db"}.
+  A data frame inheriting from class \code{"news_db"}, with
+  \code{\link{attributes}} \code{"package"} (and \code{"subset"} if the
+    \code{query} lead to proper subsetting).
 }
 \details{
   If \code{package} is \code{"R"} (default), a news db is built with the
@@ -38,11 +50,13 @@ 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, \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
   \verb{\subsection} elements named as the categories.
+  At the very end of \verb{\section{..}}, the date may also be specified
+  as \verb{(\%Y-\%m-\%d, <note>)}, i.e., including parentheses.
 
   The plain text \file{NEWS} files in add-on packages use a variety of
   different formats; the default news reader should be capable to
@@ -99,12 +113,22 @@ news(query, package = "R", lib.loc = NULL, format = NULL,
 ## Build a db of all R news entries.
 db <- news()
 \dontshow{
-  vv <- capture.output(db)  # without an error
+  vv <- capture.output(print(db, doBrowse=FALSE))  # without an error
+  stopifnot(is.character(vv), length(vv) >= 3) # was wrong (for weeks during devel.)
 }
-\donttest{% <- is not sensibly diff-ed against previous versions
 ## Bug fixes with PR number in 3.0.1.
-news(Version == "3.0.1" & grepl("^BUG", Category) & grepl("PR#", Text),
-     db = db)
+db3 <- news(Version == "3.0.1" & grepl("^BUG", Category) & grepl("PR#", Text),
+            db = db)
+\dontshow{stopifnot( !any(attr(db3,"bad")) && nrow(db3) == 12 )}
+
+## News from a date range ('Matrix' is there in a regular R installation):
+if(length(iM <- find.package("Matrix", quiet=TRUE)) && nzchar(iM)) {
+   dM <- news(package="Matrix")
+   stopifnot(identical(dM, news(db=dM)))
+   dM2014 <- news("2014-01-01" <= Date & Date <= "2014-12-31", db = dM)
+   stopifnot(paste0("1.1-", 2:4) \%in\% dM2014[,"Version"])
+}
+\donttest{% <- is not sensibly diff-ed against previous versions
 ## Which categories have been in use? % R-core maybe should standardize a bit more
 sort(table(db[, "Category"]), decreasing = TRUE)
 ## Entries with version >= 3.0.0 (including "3.0.0 patched"):
diff --git a/src/library/utils/man/object.size.Rd b/src/library/utils/man/object.size.Rd
index b4c6f57..941473c 100644
--- a/src/library/utils/man/object.size.Rd
+++ b/src/library/utils/man/object.size.Rd
@@ -1,6 +1,6 @@
 % File src/library/utils/man/object.size.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2013 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2017 R Core Team
 % Distributed under GPL 2 or later
 
 \name{object.size}
@@ -14,18 +14,38 @@
 \usage{
 object.size(x)
 
-\method{format}{object_size}(x, units = "b", \dots)
-\method{print}{object_size}(x, quote = FALSE, units = "b", \dots)
+\method{format}{object_size}(x, units = "b", standard = "auto", digits = 1L, \dots)
+\method{print}{object_size}(x, quote = FALSE, units = "b", standard = "auto",
+      digits = 1L, \dots)
 }
 \arguments{
-  \item{x}{An \R object.}
+  \item{x}{an \R object.}
   \item{quote}{logical, indicating whether or not the result should be
     printed with surrounding quotes.}
-  \item{units}{The units to be used in printing the size.  Allowed
-    values are \code{"b"}, \code{"Kb"}, \code{"Mb"}, \code{"Gb"},
-    \code{"B"}, \code{"KB"}, \code{"MB"}, \code{"GB"}, and \code{"auto"}
-    (see \sQuote{Details}).} 
-  \item{\dots}{Arguments to be passed to or from other methods.}
+  \item{units}{the units to be used in formatting and printing the size.
+    Allowed values for the different \code{standard}s are
+    \describe{
+      \item{\code{standard = "legacy"}:}{
+	\code{"b"}, \code{"Kb"}, \code{"Mb"}, \code{"Gb"}, \code{"Tb"}, \code{"Pb"},
+	\code{"B"}, \code{"KB"}, \code{"MB"}, \code{"GB"}, \code{"TB"} and \code{"PB"}.}
+      \item{\code{standard = "IEC"}:}{
+	\code{"B"}, \code{"KiB"}, \code{"MiB"}, \code{"GiB"},
+	\code{"TiB"}, \code{"PiB"}, \code{"EiB"}, \code{"ZiB"} and \code{"YiB"}.}
+      \item{\code{standard = "SI"}:}{
+	\code{"B"}, \code{"kB"}, \code{"MB"}, \code{"GB"}, \code{"TB"},
+	\code{"PB"}, \code{"EB"}, \code{"ZB"} and \code{"YB"}.}
+    }
+    For all standards, \code{unit = "auto"} is also allowed.
+    If \code{standard = "auto"}, any of the "legacy" and \acronym{IEC}
+    units are allowed.
+    See \sQuote{Formatting and printing object sizes} for details.}
+  \item{standard}{the byte-size unit standard to be used.  A character
+    string, possibly abbreviated from \code{"legacy"}, \code{"IEC"},
+    \code{"SI"} and \code{"auto"}.  See \sQuote{Formatting and printing
+      object sizes} for details.}
+  \item{digits}{the number of digits after the decimal point, passed to
+    \code{\link{round}}.}
+  \item{\dots}{arguments to be passed to or from other methods.}
 }
 \details{
   Exactly which parts of the memory allocation should be attributed to
@@ -45,27 +65,87 @@ object.size(x)
   Object sizes are larger on 64-bit builds than 32-bit ones, but will
   very likely be the same on different platforms with the same word
   length and pointer size.
+}
+
+\section{Formatting and printing object sizes}{
+  Object sizes can be formatted using byte-size units from \R's legacy
+  standard, the \acronym{IEC} standard, or the \acronym{SI} standard.
+  As illustrated by below tables, the legacy and \acronym{IEC} standards use
+  \emph{binary} units (multiples of 1024), whereas the SI standard uses
+  \emph{decimal} units (multiples of 1000).
+
+  For methods \code{format} and \code{print}, argument \code{standard}
+  specifies which standard to use and argument \code{units} specifies
+  which byte-size unit to use.  \code{units = "auto"} chooses the largest
+  units in which the result is one or more (before rounding).
+  Byte sizes are rounded to \code{digits} decimal places.
+  \code{standard = "auto"} chooses the standard based on \code{units},
+  if possible, otherwise, the legacy standard is used.
 
-  \code{units = "auto"} in the \code{format} and \code{print} methods
-  chooses the largest units in which the result is one or more (before
-  rounding).  Values in kilobytes, megabytes or gigabytes are rounded to
-  the nearest \code{0.1}.
+  Summary of \R's legacy and \acronym{IEC} units:
+  \tabular{lll}{
+   \bold{object size} \tab\bold{legacy} \tab\bold{IEC}\cr
+     1                \tab  1 bytes     \tab  1 B    \cr
+     1024             \tab  1 Kb        \tab  1 KiB  \cr
+     1024^2           \tab  1 Mb        \tab  1 MiB  \cr
+     1024^3           \tab  1 Gb        \tab  1 GiB  \cr
+     1024^4           \tab  1 Tb        \tab  1 TiB  \cr
+     1024^5           \tab  1 Pb        \tab  1 PiB  \cr
+     1024^6           \tab              \tab  1 EiB  \cr
+     1024^7           \tab              \tab  1 ZiB  \cr
+     1024^8           \tab              \tab  1 YiB  \cr
+  }
+
+  Summary of \acronym{SI} units:
+  \tabular{ll}{
+   \bold{object size} \tab \bold{SI} \cr
+     1       \tab  1 B   \cr
+     1000    \tab  1 kB  \cr
+     1000^2  \tab  1 MB  \cr
+     1000^3  \tab  1 GB  \cr
+     1000^4  \tab  1 TB  \cr
+     1000^5  \tab  1 PB  \cr
+     1000^6  \tab  1 EB  \cr
+     1000^7  \tab  1 ZB  \cr
+     1000^8  \tab  1 YB  \cr
+  }
 }
 \value{
   An object of class \code{"object_size"} with a length-one double value,
   an estimate of the memory allocation attributable to the object in bytes.
 }
+\author{R Core; Henrik Bengtsson for the non-legacy \code{standard}s.}
 \seealso{
   \code{\link{Memory-limits}} for the design limitations on object size.
 }
-
+\references{
+  The wikipedia page, \url{https://en.wikipedia.org/wiki/Binary_prefix},
+  is extensive on the different standards, usages and their history.
+}
 \examples{
 object.size(letters)
 object.size(ls)
 format(object.size(library), units = "auto")
+
+sl <- object.size(rep(letters, 1000))
+
+print(sl)                                    ## 209288 bytes
+print(sl, units = "auto")                    ## 204.4 Kb
+print(sl, units = "auto", standard = "IEC")  ## 204.4 KiB
+print(sl, units = "auto", standard = "SI")   ## 209.3 kB
+
+(fsl <- sapply(c("Kb", "KB", "KiB"),
+               function(u) format(sl, units = u)))
+stopifnot(identical( ## assert that all three are the same :
+             unique(substr(as.vector(fsl), 1,5)),
+             format(round(as.vector(sl)/1024, 1))))
+
 ## find the 10 largest objects in the base package
 z <- sapply(ls("package:base"), function(x)
             object.size(get(x, envir = baseenv())))
+if(interactive()) {
 as.matrix(rev(sort(z))[1:10])
+} else # (more constant over time):
+    names(rev(sort(z))[1:10])
 }
 \keyword{utilities}
diff --git a/src/library/utils/man/package.skeleton.Rd b/src/library/utils/man/package.skeleton.Rd
index 9164234..e47184a 100644
--- a/src/library/utils/man/package.skeleton.Rd
+++ b/src/library/utils/man/package.skeleton.Rd
@@ -1,6 +1,6 @@
 % File src/library/utils/man/package.skeleton.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2013 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2017 R Core Team
 % Distributed under GPL 2 or later
 
 \name{package.skeleton}
@@ -86,6 +86,9 @@ package.skeleton(name = "anRpackage", list,
 \seealso{
   \code{\link{prompt}}, \code{\link{promptClass}}, and
   \code{\link{promptMethods}}.
+
+  \code{\link{package_native_routine_registration_skeleton}} for helping
+  in preparing packages with compiled code.
 }
 
 \examples{
diff --git a/src/library/utils/man/packageDescription.Rd b/src/library/utils/man/packageDescription.Rd
index c9e6a8f..756804a 100644
--- a/src/library/utils/man/packageDescription.Rd
+++ b/src/library/utils/man/packageDescription.Rd
@@ -1,6 +1,6 @@
 % File src/library/utils/man/packageDescription.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2013 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2014 R Core Team
 % Copyright 2005-2010 The R Foundation
 % Distributed under GPL 2 or later
 
diff --git a/src/library/utils/man/packageStatus.Rd b/src/library/utils/man/packageStatus.Rd
index 057d806..dc8c50d 100644
--- a/src/library/utils/man/packageStatus.Rd
+++ b/src/library/utils/man/packageStatus.Rd
@@ -1,5 +1,5 @@
 % File src/library/utils/man/packageStatus.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2010 R Core Team
 % Distributed under GPL 2 or later
 
@@ -62,13 +62,14 @@ packageStatus(lib.loc = NULL, repositories = NULL, method,
 
   \item{inst}{a data frame with columns as the \emph{matrix} returned by
     \code{\link{installed.packages}} plus \code{"Status"}, a factor with
-    levels \code{c("ok", "upgrade")}.  Only the newest version of each
-    package is reported, in the first repository in which it appears.
+    levels \code{c("ok", "upgrade", "unavailable")}.  Only the newest 
+    version of each package is reported, in the first repository in 
+    which it appears.
   }
 
   \item{avail}{a data frame with columns as the \emph{matrix} returned by
     \code{\link{available.packages}} plus \code{"Status"}, a factor with
-    levels \code{c("installed", "not installed", "unavailable")}..
+    levels \code{c("installed", "not installed")}.
   }
 
   For the \code{summary} method the result is also of class
diff --git a/src/library/utils/man/page.Rd b/src/library/utils/man/page.Rd
index 5ca7246..6d0647a 100644
--- a/src/library/utils/man/page.Rd
+++ b/src/library/utils/man/page.Rd
@@ -1,5 +1,5 @@
 % File src/library/utils/man/page.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2007 R Core Team
 % Distributed under GPL 2 or later
 
@@ -17,7 +17,7 @@ page(x, method = c("dput", "print"), \dots)
   \item{x}{An \R object, or a character string naming an object.}
   \item{method}{The default method is to dump the object \emph{via}
     \code{\link{dput}}.  An alternative is to use \code{print} and
-    capture the output to be shown in the pager.}
+    capture the output to be shown in the pager.  Can be abbreviated.}
   \item{\dots}{additional arguments for \code{\link{dput}},
     \code{\link{print}} or \code{\link{file.show}} (such as \code{title}).}
 }
diff --git a/src/library/utils/man/person.Rd b/src/library/utils/man/person.Rd
index 35e56a1..01f8480 100644
--- a/src/library/utils/man/person.Rd
+++ b/src/library/utils/man/person.Rd
@@ -1,6 +1,6 @@
 % File src/library/utils/man/person.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2007 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2015 R Core Team
 % Distributed under GPL 2 or later
 
 \name{person}
@@ -34,7 +34,8 @@ person(given = NULL, family = NULL, middle = NULL,
                      role = c("[", "]"), comment = c("(", ")")),
        collapse = list(given = " ", family = " ", email = ", ",
                        role = ", ", comment = ", "),
-       ...
+       ...,
+       style = c("text", "R")
        )
 }
 \arguments{
@@ -44,12 +45,13 @@ person(given = NULL, family = NULL, middle = NULL,
     or a list thereof.}
   \item{middle}{a character string with the collapsed middle name(s).
     Deprecated, see \bold{Details}.}
-  \item{email}{a character string giving the email address,
+  \item{email}{a character string (or vector) giving an e-mail address
+    (each),
     or a list thereof.}
-  \item{role}{a character string specifying the role of the person (see
-    \bold{Details}),
+  \item{role}{a character vector specifying the role(s) of the person
+    (see \bold{Details}),
     or a list thereof.}
-  \item{comment}{a character string providing a comment,
+  \item{comment}{a character string (or vector) providing comments,
     or a list thereof.}
   \item{first}{a character string giving the first name.
     Deprecated, see \bold{Details}.}
@@ -62,6 +64,8 @@ person(given = NULL, family = NULL, middle = NULL,
   \item{braces}{a list of characters (see \bold{Details}).}
   \item{collapse}{a list of characters (see \bold{Details}).}
   \item{\dots}{currently not used.}
+  \item{style}{a character string specifying the print style, with 
+    \code{"R"} yielding formatting as R code.}
 }
 \value{
   \code{person()} and \code{as.person()} return objects of class
@@ -81,9 +85,11 @@ person(given = NULL, family = NULL, middle = NULL,
   \dQuote{embraced} using the respective element of \code{braces}, and
   finally collapsed into one string separated by white space.  If
   \code{braces} and/or \code{collapse} do not specify characters for all
-  fields, the defaults shown in the usage are imputed.  The
-  \code{print()} method calls the \code{format()} method and prints the
-  result, the \code{toBibtex()} method creates a suitable BibTeX
+  fields, the defaults shown in the usage are imputed.
+  If \code{collapse} is \code{FALSE} or \code{NA} the corresponding
+  field is not collapsed but only the first element is used.
+  The \code{print()} method calls the \code{format()} method and prints
+  the result, the \code{toBibtex()} method creates a suitable BibTeX
   representation.
 
   Person objects can be subscripted by fields (using \code{$}) or by
@@ -95,7 +101,7 @@ person(given = NULL, family = NULL, middle = NULL,
   white space).
 
   Personal names are rather tricky, e.g.,
-  \url{http://en.wikipedia.org/wiki/Personal_name}.
+  \url{https://en.wikipedia.org/wiki/Personal_name}.
 
   The current implementation (starting from R 2.12.0) of the
   \code{"person"} class uses the notions of \emph{given} (including
@@ -107,11 +113,14 @@ person(given = NULL, family = NULL, middle = NULL,
   use no family name.  To smooth the transition to the new scheme,
   arguments \code{first}, \code{middle} and \code{last} are still
   supported, but their use is deprecated and they must not be given in
-  combination with the corresponding new style arguments.
+  combination with the corresponding new style arguments.  For persons
+  which are not natural persons (e.g., institutions, companies, etc.) it
+  is appropriate to use \code{given} (but not \code{family}) for the
+  name, e.g., \code{person("R Core Team", role = "aut")}.
 
   The new scheme also adds the possibility of specifying \emph{roles}
-  based on a subset of the MARC Value List for Relators and Roles
-  (\url{http://www.loc.gov/standards/sourcelist/relator-role.html}).
+  based on a subset of the MARC Code List for Relators 
+  (\url{https://www.loc.gov/marc/relators/relaterm.html}).
   When giving the roles of persons in the context of authoring \R
   packages, the following usage is suggested.
   \describe{
@@ -126,6 +135,13 @@ person(given = NULL, family = NULL, middle = NULL,
       show up in the package citation.}
     \item{\code{"cph"}}{(Copyright holder) Use for all copyright holders.}
     \item{\code{"cre"}}{(Creator) Use for the package maintainer.}
+    \item{\code{"ctr"}}{(Contractor) Use for authors who have been
+      contracted to write (parts of) the package and hence do not own
+      intellectual property.}
+    \item{\code{"dtc"}}{(Data contributor) Use for persons who
+      contributed data sets for the package.}
+    \item{\code{"fnd"}}{(Funder) Use for persons or organizations that
+      furnished financial support for the development of the package.}
     \item{\code{"ths"}}{(Thesis advisor) If the package is part of a
       thesis, use for the thesis advisor.}
     \item{\code{"trl"}}{(Translator) If the R code is a translation from
diff --git a/src/library/utils/man/process.events.Rd b/src/library/utils/man/process.events.Rd
index 43688ac..f4a2fa4 100644
--- a/src/library/utils/man/process.events.Rd
+++ b/src/library/utils/man/process.events.Rd
@@ -1,5 +1,5 @@
 % File src/library/utils/man/process.events.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 2012 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/utils/man/prompt.Rd b/src/library/utils/man/prompt.Rd
index 05099e0..25d94cf 100644
--- a/src/library/utils/man/prompt.Rd
+++ b/src/library/utils/man/prompt.Rd
@@ -1,6 +1,6 @@
 % File src/library/utils/man/prompt.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2011 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2014 R Core Team
 % Distributed under GPL 2 or later
 
 \name{prompt}
diff --git a/src/library/utils/man/promptData.Rd b/src/library/utils/man/promptData.Rd
index 82e8b74..8c2942b 100644
--- a/src/library/utils/man/promptData.Rd
+++ b/src/library/utils/man/promptData.Rd
@@ -1,5 +1,5 @@
 % File src/library/utils/man/promptData.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2011 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/utils/man/promptPackage.Rd b/src/library/utils/man/promptPackage.Rd
index f109fab..87a7ad4 100644
--- a/src/library/utils/man/promptPackage.Rd
+++ b/src/library/utils/man/promptPackage.Rd
@@ -1,5 +1,5 @@
 % File src/library/utils/man/promptPackage.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2010 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/utils/man/rcompgen.Rd b/src/library/utils/man/rcompgen.Rd
index 8e53d85..5661e04 100644
--- a/src/library/utils/man/rcompgen.Rd
+++ b/src/library/utils/man/rcompgen.Rd
@@ -1,10 +1,8 @@
 % File src/library/utils/man/rcompgen.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 2008-2013 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 2008-2014 R Core Team
 % Distributed under GPL 2 or later
 
-\newcommand{\sspace}{\ifelse{latex}{\out{~}}{ }}
-
 \name{rcompgen}
 \alias{rcompgen}
 \alias{rc.settings}
@@ -164,18 +162,17 @@ rc.options(\dots)
       When the \code{ns} setting is turned on, completion inside
       namespaces is attempted when a token is preceded by the \code{::}
       or \code{:::} operators.  Additionally, the basic completion
-      mechanism is extended to include attached namespaces, or more
-      precisely, \code{foopkg::} becomes a valid completion of
-      \code{foo} if the return value of \code{\link{search}()} includes
-      the string \code{"package:foopkg"}.
-
-      The completion of package namespaces applies only to attached
-      packages, i.e.\sspace{}if \code{MASS} is not attached (whether or not it
-      is loaded), \code{MAS} will not complete to \code{MASS::}.
-      However, attempted completion \emph{inside} an apparent namespace
-      will attempt to load the namespace if it is not already loaded,
-      e.g.\sspace{}trying to complete on \code{MASS::fr} will load \code{MASS}
-      (but not necessarily attach it) even if it is not already loaded.
+      mechanism is extended to include all loaded namespaces, i.e.,
+      \code{foopkg::} becomes a valid completion of \code{foo} if
+      \code{"foopkg"} is a loaded namespace.
+
+      The completion of package namespaces applies only to already
+      loaded namespaces, i.e.\sspace{}if \code{MASS} is not loaded,
+      \code{MAS} will not complete to \code{MASS::}.  However, attempted
+      completion \emph{inside} an apparent namespace will attempt to
+      load the namespace if it is not already loaded,
+      e.g.\sspace{}trying to complete on \code{MASS::fr} will load
+      \code{MASS} if it is not already loaded.
     }
 
     \item{\bold{Completion for help items}:}{
@@ -322,7 +319,12 @@ rc.options(\dots)
 
   Potential completions of the token are generated by
   \code{.completeToken}, and the completions can be retrieved as an \R
-  character vector using \code{.retrieveCompletions}.
+  character vector using \code{.retrieveCompletions}. It is possible for
+  the user to specify a replacement for this function by setting
+  \code{rc.options("custom.completer")}; if not \code{NULL}, this
+  function is called to compute potential completions.  This facility is
+  meant to help in situations where completing as R code is not
+  appropriate. See source code for more details.
 
   If the cursor is inside quotes, completion may be suppressed.  The
   function \code{.getFileComp} can be used after a call to
diff --git a/src/library/utils/man/read.DIF.Rd b/src/library/utils/man/read.DIF.Rd
index 56bf5f4..6496890 100644
--- a/src/library/utils/man/read.DIF.Rd
+++ b/src/library/utils/man/read.DIF.Rd
@@ -1,5 +1,5 @@
 % File src/library/utils/man/read.DIF.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2014 R Core Team
 % Distributed under GPL 2 or later
 
@@ -17,7 +17,7 @@ read.DIF(file, header = FALSE,
          na.strings = "NA", colClasses = NA, nrows = -1,
          skip = 0, check.names = TRUE, blank.lines.skip = TRUE,
          stringsAsFactors = default.stringsAsFactors(),
-         transpose = FALSE)
+         transpose = FALSE, fileEncoding = "")
 }
 \arguments{
   \item{file}{the name of the file which the data are to be read from,
@@ -117,6 +117,12 @@ read.DIF(file, header = FALSE,
     interpretation should be transposed.  Microsoft's Excel has been
     known to produce (non-standard conforming) DIF files which would
     need \code{transpose = TRUE} to be read correctly.}
+  
+  \item{fileEncoding}{character string: if non-empty declares the
+    encoding used on a file (not a connection or clipboard) so the
+    character data can be re-encoded.  See the \sQuote{Encoding} section
+    of the help for \code{\link{file}}, the \sQuote{R Data Import/Export
+    Manual} and \sQuote{Note}.}
 }
 \value{
   A data frame (\code{\link{data.frame}}) containing a representation of
@@ -132,8 +138,7 @@ read.DIF(file, header = FALSE,
   Less memory will be used if \code{colClasses} is specified as one of
   the six atomic vector classes.
 }
-\author{R Core; \code{transpose} option by
-  Christoph Buser, ETH Zurich}
+\author{R Core; \code{transpose} option by Christoph Buser, ETH Zurich}
 \seealso{
   The \emph{R Data Import/Export} manual.
 
@@ -147,7 +152,7 @@ read.DIF(file, header = FALSE,
   The DIF format specification can be found by searching on
   \url{http://www.wotsit.org/}; the optional header fields are ignored.
   See also
-  \url{http://en.wikipedia.org/wiki/Data_Interchange_Format}.
+  \url{https://en.wikipedia.org/wiki/Data_Interchange_Format}.
 
   The term is likely to lead to confusion: Windows will have a
   \sQuote{Windows Data Interchange Format (DIF) data format} as part of
diff --git a/src/library/utils/man/read.fortran.Rd b/src/library/utils/man/read.fortran.Rd
index 3978f0f..74daa53 100644
--- a/src/library/utils/man/read.fortran.Rd
+++ b/src/library/utils/man/read.fortran.Rd
@@ -1,5 +1,5 @@
 % File src/library/utils/man/read.fortran.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2014 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/utils/man/read.fwf.Rd b/src/library/utils/man/read.fwf.Rd
index d1f1208..ea631cc 100644
--- a/src/library/utils/man/read.fwf.Rd
+++ b/src/library/utils/man/read.fwf.Rd
@@ -1,5 +1,5 @@
 % File src/library/utils/man/read.fwf.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2014 R Core Team
 % Distributed under GPL 2 or later
 
@@ -13,7 +13,7 @@
 \usage{
 read.fwf(file, widths, header = FALSE, sep = "\t",
          skip = 0, row.names, col.names, n = -1,
-         buffersize = 2000, \dots)
+         buffersize = 2000, fileEncoding = "", \dots)
 }
 \arguments{
   \item{file}{
@@ -38,6 +38,13 @@ read.fwf(file, widths, header = FALSE, sep = "\t",
   \item{n}{the maximum number of records (lines) to be read, defaulting
     to no limit.}
   \item{buffersize}{Maximum number of lines to read at one time}
+  
+  \item{fileEncoding}{character string: if non-empty declares the
+    encoding used on a file (not a connection) so the character data can
+    be re-encoded.  See the \sQuote{Encoding} section of the help for
+    \code{\link{file}}, the \sQuote{R Data Import/Export Manual} and
+    \sQuote{Note}.}
+  
   \item{\dots}{further arguments to be passed to
     \code{\link{read.table}}.  Useful such arguments include
     \code{as.is}, \code{na.strings}, \code{colClasses} and \code{strip.white}.}
@@ -62,8 +69,7 @@ read.fwf(file, widths, header = FALSE, sep = "\t",
   result in faster processing when enough memory is available.
   
   Note that \code{read.fwf} (not \code{read.table}) reads the supplied
-  file, so the latter's arguments such as \code{encoding} and
-  \code{fileEncoding} will not be useful.
+  file, so the latter's argument \code{encoding} will not be useful.
 }
 \author{
   Brian Ripley for \R version: originally in \code{Perl} by Kurt Hornik.
diff --git a/src/library/utils/man/read.socket.Rd b/src/library/utils/man/read.socket.Rd
index acfb27f..cdfc350 100644
--- a/src/library/utils/man/read.socket.Rd
+++ b/src/library/utils/man/read.socket.Rd
@@ -1,5 +1,5 @@
 % File src/library/utils/man/read.socket.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2012 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/utils/man/read.table.Rd b/src/library/utils/man/read.table.Rd
index 80d47cc..2ed0fb6 100644
--- a/src/library/utils/man/read.table.Rd
+++ b/src/library/utils/man/read.table.Rd
@@ -1,6 +1,6 @@
 % File src/library/utils/man/read.table.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2014 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2016 R Core Team
 % Distributed under GPL 2 or later
 
 \name{read.table}
@@ -80,7 +80,8 @@ read.delim2(file, header = TRUE, sep = "\t", quote = "\"",
   \item{dec}{the character used in the file for decimal points.}
 
   \item{numerals}{string indicating how to convert numbers whose conversion
-    to double precision would lose accuracy, see \code{\link{type.convert}}.}
+    to double precision would lose accuracy, see \code{\link{type.convert}}.
+    Can be abbreviated.  (Applies also to complex-number inputs.)}
 
   \item{row.names}{a vector of row names.  This can be a vector giving
     the actual row names, or a single number giving the column of the
@@ -119,11 +120,13 @@ read.delim2(file, header = TRUE, sep = "\t", quote = "\"",
   \item{na.strings}{a character vector of strings which are to be
     interpreted as \code{\link{NA}} values.  Blank fields are also
     considered to be missing values in logical, integer, numeric and
-    complex fields.}
+    complex fields.  Note that the test happens \emph{after} 
+    white space is stripped from the input, so \code{na.strings} 
+    values may need their own white space stripped in advance.}
 
   \item{colClasses}{character.  A vector of classes to be assumed for
-    the columns.  Recycled as necessary, or if the character vector is
-    named, unspecified values are taken to be \code{NA}.
+    the columns.  If unnamed, recycled as necessary.  If named, names
+    are matched with unspecified values being taken to be \code{NA}.
 
     Possible values are \code{NA} (the default, when
     \code{\link{type.convert}} is used), \code{"NULL"} (when the column
@@ -225,10 +228,10 @@ read.delim2(file, header = TRUE, sep = "\t", quote = "\"",
   which they are printed.  If \code{row.names} is specified and does
   not refer to the first column, that column is discarded from such files.
 
-  The number of data columns is determined by looking at the first five lines
-  of input (or the whole file if it has less than five lines), or from
-  the length of \code{col.names} if it is specified and
-  is longer.  This could conceivably be wrong if \code{fill} or
+  The number of data columns is determined by looking at the first five
+  lines of input (or the whole input if it has less than five lines), or
+  from the length of \code{col.names} if it is specified and is longer.
+  This could conceivably be wrong if \code{fill} or
   \code{blank.lines.skip} are true, so specify \code{col.names} if
   necessary (as in the \sQuote{Examples}).
 
@@ -317,7 +320,7 @@ read.delim2(file, header = TRUE, sep = "\t", quote = "\"",
   reading files which result in reports of incorrect record lengths (see
   the \sQuote{Examples} below).
 
-  \url{http://tools.ietf.org/html/rfc4180} for the IANA definition of
+  \url{https://tools.ietf.org/html/rfc4180} for the IANA definition of
   CSV files (which requires comma as separator and CRLF line endings).
 }
 
diff --git a/src/library/utils/man/recover.Rd b/src/library/utils/man/recover.Rd
index 170e527..837240b 100644
--- a/src/library/utils/man/recover.Rd
+++ b/src/library/utils/man/recover.Rd
@@ -1,5 +1,5 @@
 % File src/library/utils/man/recover.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2011 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/utils/man/relist.Rd b/src/library/utils/man/relist.Rd
index 51eb5d2..7911cb0 100644
--- a/src/library/utils/man/relist.Rd
+++ b/src/library/utils/man/relist.Rd
@@ -1,5 +1,5 @@
 % File src/library/utils/man/relist.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2008 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/utils/man/remove.packages.Rd b/src/library/utils/man/remove.packages.Rd
index bb1f606..63f5139 100644
--- a/src/library/utils/man/remove.packages.Rd
+++ b/src/library/utils/man/remove.packages.Rd
@@ -1,5 +1,5 @@
 % File src/library/utils/man/remove.packages.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2009 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/utils/man/removeSource.Rd b/src/library/utils/man/removeSource.Rd
index b123849..3c150b5 100644
--- a/src/library/utils/man/removeSource.Rd
+++ b/src/library/utils/man/removeSource.Rd
@@ -1,6 +1,6 @@
 % File src/library/utils/man/removeSource.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 2011 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 2014 R Core Team
 % Distributed under GPL 2 or later
 
 \name{removeSource}
@@ -22,8 +22,7 @@ removeSource(fn)
   }
 }
 \details{
-  This removes both the \code{"source"} attribute (from \R version
-  2.13.x or earlier) and the \code{"srcref"} and related attributes.
+  This removes the \code{"srcref"} and related attributes.
 }
 \value{
   A copy of the function with the source removed.
diff --git a/src/library/utils/man/roman.Rd b/src/library/utils/man/roman.Rd
index a7b78e4..d141d79 100644
--- a/src/library/utils/man/roman.Rd
+++ b/src/library/utils/man/roman.Rd
@@ -1,33 +1,37 @@
 % File src/library/utils/man/roman.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2007 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2016 R Core Team
 % Distributed under GPL 2 or later
 
 \name{roman}
-\alias{as.roman}
 \title{Roman Numerals}
+\alias{as.roman}
+\alias{.romans}
 \description{
-  Manipulate integers as roman numerals.
+  Simple manipulation of (a small set of) integer numbers as roman numerals.
 }
 \usage{
 as.roman(x)
+.romans
 }
 \arguments{
-  \item{x}{a numeric vector, or a character vector of arabic or roman
-    numerals.}
+  \item{x}{a numeric or character vector of arabic or roman numerals.}
 }
 \details{
   \code{as.roman} creates objects of class \code{"roman"} which are
   internally represented as integers, and have suitable methods for
-  printing, formatting, subsetting, and coercion to \code{character}.
+  printing, formatting, subsetting, coercion, etc, see
+  \code{\link{methods}(class = "roman")}.
 
   Only numbers between 1 and 3899 have a unique representation as roman
   numbers.
+
+  \code{.romans} is the basic dictionary, a named \code{\link{character}} vector.
 }
 \references{
   Wikipedia contributors (2006). Roman numerals.
   Wikipedia, The Free Encyclopedia.
-  \url{http://en.wikipedia.org/w/index.php?title=Roman_numerals&oldid=78252134}.
+  \url{https://en.wikipedia.org/w/index.php?title=Roman_numerals&oldid=78252134}.
   Accessed September 29, 2006.
 }
 \examples{
@@ -37,7 +41,21 @@ as.roman(x)
 y[3]
 ## Current year as a roman number.
 (y <- as.roman(format(Sys.Date(), "\%Y")))
-## 10 years ago ...
-y - 10
+## Today, and  10, 20, 30, and 100 years ago ...
+y - 10*c(0:3,10)
+\dontshow{stopifnot(identical(as.character(as.roman("2016") - 10*c(0:3,10)),
+             c("MMXVI", "MMVI", "MCMXCVI", "MCMLXXXVI", "MCMXVI"))) }
+## mixture of arabic and roman numbers :
+as.roman(c(NA, 1:3, "", strrep("I", 1:6))) # + NA with a warning for "IIIIII"
+cc <- c(NA, 1:3, strrep("I", 0:5))
+(rc <- as.roman(cc)) # two NAs: 0 is not "roman"
+(ic <- as.integer(rc)) # works automitcally [without an explicit method]
+## simple consistency checks -- arithmetic when result is in  {1,2,..,3899} :
+stopifnot(identical(rc, as.roman(rc)), # as.roman(.) is "idempotent"
+          identical(rc + rc + (3*rc), rc*5),
+          identical(ic, c(NA, 1:3, NA, 1:5)),
+          identical(as.integer(5*rc), 5L*ic),
+          identical(as.numeric(rc), as.numeric(ic)),
+          identical(as.list(rc), as.list(ic)))
 }
 \keyword{arith}
diff --git a/src/library/utils/man/rtags.Rd b/src/library/utils/man/rtags.Rd
index 23230ef..524e1db 100644
--- a/src/library/utils/man/rtags.Rd
+++ b/src/library/utils/man/rtags.Rd
@@ -1,6 +1,6 @@
 % File src/library/tools/man/rtags.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 2008 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 2008-2015 R Core Team
 % Distributed under GPL 2 or later
 
 \name{rtags}
@@ -70,8 +70,8 @@ rtags(path = ".", pattern = "\\\\.[RrSs]$",
 }
 
 \references{
-  \url{http://en.wikipedia.org/wiki/Ctags},
-  \url{http://www.gnu.org/software/emacs/emacs-lisp-intro/html_node/emacs.html#Tags}
+  \url{https://en.wikipedia.org/wiki/Ctags},
+  \url{https://www.gnu.org/software/emacs/manual/html_node/eintr/etags.html}
 }
 \author{Deepayan Sarkar}
 \seealso{ \code{\link{list.files}}, \code{\link{cat}} }
diff --git a/src/library/utils/man/savehistory.Rd b/src/library/utils/man/savehistory.Rd
index a4d9611..f4b1a6c 100644
--- a/src/library/utils/man/savehistory.Rd
+++ b/src/library/utils/man/savehistory.Rd
@@ -1,5 +1,5 @@
 % File src/library/utils/man/savehistory.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2013 R Core Team
 % Distributed under GPL 2 or later
 
@@ -57,7 +57,7 @@ timestamp(stamp = date(),
   example, in batch use or in an embedded application).  Note that \R
   can be built without \code{readline}.
 
-  \command{R.app}, the console on OS X, has a separate and largely
+  \command{R.app}, the console on macOS, has a separate and largely
   incompatible history mechanism, which by default uses a file
   \file{.Rapp.history} and saves up to 250 entries.  These functions are
   not currently implemented there.
diff --git a/src/library/utils/man/select.list.Rd b/src/library/utils/man/select.list.Rd
index 195eefc..ef4269e 100644
--- a/src/library/utils/man/select.list.Rd
+++ b/src/library/utils/man/select.list.Rd
@@ -1,5 +1,5 @@
 % File src/library/utils/man/select.list.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2013 R Core Team
 % Distributed under GPL 2 or later
 
@@ -37,7 +37,7 @@ select.list(choices, preselect = NULL, multiple = FALSE,
   \sQuote{Cancel} button or pressing Escape.
 #endif
 #ifdef unix
-  Under the OS X GUI this brings up a modal dialog box
+  Under the macOS GUI this brings up a modal dialog box
   with a (scrollable) list of items, which can be selected by the mouse.
   On other Unix-like platforms it will use a
   Tcl/Tk listbox widget if possible.
diff --git a/src/library/utils/man/sessionInfo.Rd b/src/library/utils/man/sessionInfo.Rd
index 131e840..4c7abb6 100644
--- a/src/library/utils/man/sessionInfo.Rd
+++ b/src/library/utils/man/sessionInfo.Rd
@@ -1,6 +1,6 @@
 % File src/library/utils/man/sessionInfo.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2012 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2017 R Core Team
 % Distributed under GPL 2 or later
 
 \name{sessionInfo}
@@ -9,7 +9,7 @@
 \alias{toLatex.sessionInfo}
 \alias{print.sessionInfo}
 \description{
-  Print version information about \R and attached or loaded packages.
+  Print version information about \R, the OS and attached or loaded packages.
 }
 \usage{
 sessionInfo(package = NULL)
@@ -25,12 +25,21 @@ sessionInfo(package = NULL)
   \item{\dots}{currently not used.}
 }
 \value{
-  An object of class \code{"sessionInfo"}, which has a \code{print}
-  method. This is a list with components
+  An object of class \code{"sessionInfo"} which has \code{print} and
+  \code{\link{toLatex}} methods.  This is a list with components
   \item{R.version}{a list, the result of calling \code{\link{R.Version}()}.}
-  \item{platform}{a character string describing the platform.  For recent
-    versions where sub-architectures are in use this is of the form
+  \item{platform}{a character string describing the platform \R was
+    built under.  Where sub-architectures are in use this is of the form
     \samp{platform/sub-arch (nn-bit)}.}
+  \item{running}{a character string describing the OS and version which
+    it is running under (as distinct from built under).  This attempts
+    to name a Linux distribution and give the OS name on an Apple Mac.}
+  \item{matprod}{a character string, the result of calling
+    \code{\link{options}("matprod")}.}
+  \item{BLAS}{a character string, the result of calling
+    \code{\link{extSoftVersion}()["BLAS"]}.}
+  \item{LAPACK}{a character string, the result of calling
+    \code{\link{La_library}()}.}
   \item{locale}{a character string, the result of calling
     \code{\link{Sys.getlocale}()}.}
   \item{basePkgs}{a character vector of base packages which are attached.}
@@ -45,6 +54,13 @@ sessionInfo(package = NULL)
   \emph{current} version installed at the location the package was
   loaded from: it can be wrong if another process has been changing
   packages during the session.
+
+  How OSes identify themselves and their versions can be arcane: where
+  possible \code{running} uses a human-readable form.
+#ifdef windows
+  Windows may report unexpected versions: see the help for
+  \code{\link{win.version}}.
+#endif
 }
 \seealso{\code{\link{R.version}}
 }
diff --git a/src/library/utils/man/setRepositories.Rd b/src/library/utils/man/setRepositories.Rd
index 71f4701..f6e8bfe 100644
--- a/src/library/utils/man/setRepositories.Rd
+++ b/src/library/utils/man/setRepositories.Rd
@@ -1,10 +1,8 @@
 % File src/library/utils/man/setRepositories.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2014 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2015 R Core Team
 % Distributed under GPL 2 or later
 
-\newcommand{\sspace}{\ifelse{latex}{\out{~}}{ }}
-
 \name{setRepositories}
 \alias{setRepositories}
 \title{Select Package Repositories}
@@ -17,7 +15,7 @@ setRepositories(graphics = getOption("menu.graphics"),
 }
 \arguments{
   \item{graphics}{Logical. If true, use a graphical list: on Windows or
-    OS X GUI use a list box, and on a Unix-alike if \pkg{tcltk} and an X
+    macOS GUI use a list box, and on a Unix-alike if \pkg{tcltk} and an X
     server are available, use Tk widget. Otherwise use a text
     \code{\link{menu}}.}
   \item{ind}{\code{NULL} or a vector of integer indices, which have the
@@ -30,12 +28,14 @@ setRepositories(graphics = getOption("menu.graphics"),
   The default list of known repositories is stored in the file
   \file{\var{\link{R_HOME}}/etc/repositories}.
   That file can be edited for a site, or a user can have a personal copy
-  in \file{\var{HOME}/.R/repositories} which will take precedence.
+  in the file pointed to by the environment variable
+  \env{R_REPOSITORIES}, or if this is unset or does not exist,
+  in \file{\var{HOME}/.R/repositories}, which will take precedence.
 
   A Bioconductor mirror can be selected by setting
   \code{\link{options}("BioC_mirror")}, e.g.\sspace{}via
-  \code{\link{chooseBioCmirror}} the default value is
-  \samp{"http://www.bioconductor.org"}.
+  \code{\link{chooseBioCmirror}} --- the default value is
+  \samp{"https://bioconductor.org"}.
 
   The items that are preselected are those that are currently in
   \code{options("repos")} plus those marked as default in the
@@ -43,9 +43,10 @@ setRepositories(graphics = getOption("menu.graphics"),
 
   The list of repositories offered depends on the setting of option
   \code{"pkgType"} as some repositories only offer a subset of types
-  (e.g., only source packages or not OS X binary packages).
+  (e.g., only source packages or not macOS binary packages).
   Further, for binary packages some repositories (notably R-Forge) only
   offer packages for the current or recent versions of \R.
+  (Type \code{"both"} is equivalent to \code{"source"}.)
 
   Repository \samp{CRAN} is treated specially: the value is taken from
   the current setting of \code{getOption("repos")} if this has an
diff --git a/src/library/utils/man/sourceutils.Rd b/src/library/utils/man/sourceutils.Rd
index 71cae97..49a8fab 100644
--- a/src/library/utils/man/sourceutils.Rd
+++ b/src/library/utils/man/sourceutils.Rd
@@ -1,5 +1,5 @@
 % File src/library/utils/man/sourceutils.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 2011-2013 R Core Team
 % Distributed under GPL 2 or later
 
@@ -32,7 +32,7 @@ getSrcLocation(x, which = c("line", "column", "byte", "parse"),
     Whether to list only unique filenames/directories.
   }
   \item{which}{
-    Which part of a source reference to extract.
+    Which part of a source reference to extract.  Can be abbreviated.
   }
   \item{first}{
     Whether to show the first (or last) location of the object.
diff --git a/src/library/utils/man/stack.Rd b/src/library/utils/man/stack.Rd
index de84c01..62dd6ed 100644
--- a/src/library/utils/man/stack.Rd
+++ b/src/library/utils/man/stack.Rd
@@ -1,6 +1,6 @@
 % File src/library/utils/man/stack.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2011 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2017 R Core Team
 % Distributed under GPL 2 or later
 
 \name{stack}
@@ -18,8 +18,8 @@
 }
 \usage{
 stack(x, \dots)
-\method{stack}{default}(x, \dots)
-\method{stack}{data.frame}(x, select, \dots)
+\method{stack}{default}(x, drop=FALSE, \dots)
+\method{stack}{data.frame}(x, select, drop=FALSE, \dots)
 
 unstack(x, \dots)
 \method{unstack}{default}(x, form, \dots)
@@ -33,6 +33,9 @@ unstack(x, \dots)
     vector to be unstacked and whose right side evaluates to the
     indicator of the groups to create.  Defaults to \code{\link{formula}(x)}
     in the data frame method for \code{unstack}.}
+  \item{drop}{Whether to drop the unused levels from the \dQuote{ind}
+    column of the return value.
+  }
   \item{\dots}{further arguments passed to or from other methods.}
 }
 \details{
@@ -43,10 +46,9 @@ unstack(x, \dots)
 
   Note that \code{stack} applies to \emph{vectors} (as determined by
   \code{\link{is.vector}}): non-vector columns (e.g., factors) will be
-  ignored (with a warning as from \R 2.15.0).  Where vectors of
-  different types are selected they are concatenated by
-  \code{\link{unlist}} whose help page explains how the type of the
-  result is chosen.
+  ignored with a warning.  Where vectors of different types are selected
+  they are concatenated by \code{\link{unlist}} whose help page explains
+  how the type of the result is chosen.
 
   These functions are generic: the supplied methods handle data frames
   and objects coercible to lists by \code{\link{as.list}}.
diff --git a/src/library/utils/man/str.Rd b/src/library/utils/man/str.Rd
index 365379f..aefda35 100644
--- a/src/library/utils/man/str.Rd
+++ b/src/library/utils/man/str.Rd
@@ -1,6 +1,6 @@
 % File src/library/utils/man/str.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2009 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2016 R Core Team
 % Distributed under GPL 2 or later
 
 \name{str}
@@ -17,6 +17,7 @@ str(object, \dots)
 \method{str}{default}(object, max.level = NA,
     vec.len  = strO$vec.len, digits.d = strO$digits.d,
     nchar.max = 128, give.attr = TRUE,
+    drop.deparse.attr = strO$drop.deparse.attr,
     give.head = TRUE, give.length = give.head,
     width = getOption("width"), nest.lev = 0,
     indent.str = paste(rep.int(" ", max(0, nest.lev + 1)),
@@ -26,6 +27,7 @@ str(object, \dots)
     formatNum = strO$formatNum, list.len = 99, \dots)
 
 strOptions(strict.width = "no", digits.d = 3, vec.len = 4,
+           drop.deparse.attr = TRUE,
            formatNum = function(x, ...)
                        format(x, trim = TRUE, drop0trailing = TRUE, ...))
 }
@@ -60,6 +62,11 @@ strOptions(strict.width = "no", digits.d = 3, vec.len = 4,
     \code{longch} example below.}
   \item{give.attr}{logical; if \code{TRUE} (default), show attributes
     as sub structures.}
+  \item{drop.deparse.attr}{logical; if \code{TRUE} (default),
+    \code{\link{deparse}(control = <S>)} will not have
+    \code{"showAttributes"} in \code{<S>}.  Used to be hard coded to
+    \code{FALSE} and hence can be set via \code{strOptions()} for back
+    compatibility.}
   \item{give.length}{logical; if \code{TRUE} (default), indicate
     length (as \code{[1:\dots]}).}
   \item{give.head}{logical; if \code{TRUE} (default), give (possibly
@@ -77,7 +84,7 @@ strOptions(strict.width = "no", digits.d = 3, vec.len = 4,
     \code{\link{delayedAssign}}) objects only.}
   \item{strict.width}{string indicating if the \code{width} argument's
     specification should be followed strictly, one of the values
-    \code{c("no", "cut", "wrap")}.
+    \code{c("no", "cut", "wrap")}, which can be abbreviated.
     Defaults to the \code{strict.width} component of option \code{"str"}
     (see \code{\link{options}}) which defaults to \code{"no"} for back
     compatibility reasons; \code{"wrap"} uses
@@ -129,12 +136,34 @@ ch <- letters[1:12]; is.na(ch) <- 3:5
 str(ch) # character NA's
 
 str(list(a = "A", L = as.list(1:100)), list.len = 9)
+##                                     ------------
+## " .. [list output truncated] "
+
+## Long strings,   'nchar.max'; 'strict.width' :
 nchar(longch <- paste(rep(letters,100), collapse = ""))
 str(longch)
 str(longch, nchar.max = 52)
-
 str(longch, strict.width = "wrap")
 
+## Multibyte characters in strings (in multibyte locales):
+oloc <- Sys.getlocale("LC_CTYPE")
+mbyte.lc <- if(.Platform$OS.type == "windows")
+ "English_United States.28605" else "en_GB.UTF-8"
+try(Sys.setlocale("LC_CTYPE", mbyte.lc))
+## Truncation behavior (<-> correct width measurement) for "long" non-ASCII:
+idx <- c(65313:65338, 65345:65350)
+fwch <- intToUtf8(idx) # full width character string: each has width 2
+ch <- strtrim(paste(LETTERS, collapse="._"), 64)
+(ncc <- c(c.ch = nchar(ch),   w.ch = nchar(ch,   "w"),
+          c.fw = nchar(fwch), w.fw = nchar(fwch, "w")))
+stopifnot(unname(ncc) == c(64,64, 32, 64))
+## nchar.max: 1st line needs an increase of  2  in order to see  1  (in UTF-8!):
+invisible(lapply(60:66, function(N) str(fwch, nchar.max = N)))
+invisible(lapply(60:66, function(N) str( ch , nchar.max = N))) # "1 is 1" here
+## revert locale to previous:
+Sys.setlocale("LC_CTYPE", oloc)
+
+
 ## Settings for narrow transcript :
 op <- options(width = 60,
               str = strOptions(strict.width = "wrap"))
diff --git a/src/library/utils/man/strcapture.Rd b/src/library/utils/man/strcapture.Rd
new file mode 100644
index 0000000..f83cb8a
--- /dev/null
+++ b/src/library/utils/man/strcapture.Rd
@@ -0,0 +1,54 @@
+\name{strcapture}
+\alias{strcapture}
+\title{
+Capture string tokens into a data.frame
+}
+\description{
+  Given a character vector and a regular expression containing capture
+  expressions, \code{strcapture} will extract the captured tokens into a
+  tabular data structure, such as a data.frame, the type and structure of
+  which is specified by a prototype object. The assumption is that the
+  same number of tokens are captured from every input string. 
+}
+\usage{
+strcapture(pattern, x, proto, perl = FALSE, useBytes = FALSE)
+}
+\arguments{
+  \item{pattern}{
+    The regular expression with the capture expressions.
+  }
+  \item{x}{
+    A character vector in which to capture the tokens.
+  }
+  \item{proto}{
+    A \code{data.frame} or S4 object that behaves like one. See details.
+  }
+  \item{perl,useBytes}{
+    Arguments passed to \code{\link{regexec}}.
+  }
+}
+\details{
+  The \code{proto} argument is typically a \code{data.frame}, with a
+  column corresponding to each capture expression, in order. The
+  captured character vector is coerced to the type of the column, and
+  the column names are carried over to the return value. Any data in the
+  prototype are ignored. See the examples. 
+}
+\value{
+  A tabular data structure of the same type as \code{proto}, so
+  typically a \code{data.frame}, containing a column for each capture
+  expression. The column types and names are inherited from
+  \code{proto}. Cases in \code{x} that do not match \code{pattern} have
+  \code{NA} in every column.
+}
+\seealso{
+  \code{\link{regexec}} and \code{\link{regmatches}} for related
+  low-level utilities.
+}
+\examples{
+x <- "chr1:1-1000"
+pattern <- "(.*?):([[:digit:]]+)-([[:digit:]]+)"
+proto <- data.frame(chr=character(), start=integer(), end=integer())
+strcapture(pattern, x, proto)
+}
+\keyword{utilities}
diff --git a/src/library/utils/man/summaryRprof.Rd b/src/library/utils/man/summaryRprof.Rd
index 0ac209b..475042f 100644
--- a/src/library/utils/man/summaryRprof.Rd
+++ b/src/library/utils/man/summaryRprof.Rd
@@ -1,6 +1,6 @@
 % File src/library/utils/man/summaryRprof.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2013 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2017 R Core Team
 % Distributed under GPL 2 or later
 
 \name{summaryRprof}
@@ -20,8 +20,8 @@ summaryRprof(filename = "Rprof.out", chunksize = 5000,
 \arguments{
   \item{filename}{Name of a file produced by \code{Rprof()}.}
   \item{chunksize}{Number of lines to read at a time.}
-  \item{memory}{Summaries for memory information.  See \sQuote{Memory profiling} below.}
-  \item{lines}{Summaries for line information.  See \sQuote{Line profiling} below.}
+  \item{memory}{Summaries for memory information.  See \sQuote{Memory profiling} below.   Can be abbreviated.}
+  \item{lines}{Summaries for line information.  See \sQuote{Line profiling} below.   Can be abbreviated.}
   \item{index}{How to summarize the stack trace for memory
     information.  See \sQuote{Details} below.}
   \item{diff}{If \code{TRUE} memory summaries use change in memory
@@ -112,8 +112,7 @@ summaryRprof(filename = "Rprof.out", chunksize = 5000,
   If \code{memory = "stats"} a \code{\link{by}} object giving memory statistics
   by function.
   
-  Prior to \R 2.15.3 an error was thrown if no events were recorded: now
-  zero-row data frames are returned.
+  If no events were recorded, a zero-row data frame is returned.
 }
 
 \seealso{
@@ -128,7 +127,7 @@ summaryRprof(filename = "Rprof.out", chunksize = 5000,
 
   \code{\link{Rprofmem}} is a non-sampling memory-use profiler.
 
-  \url{http://developer.r-project.org/memory-profiling.html}
+  \url{https://developer.r-project.org/memory-profiling.html}
 }
 \examples{
 \dontrun{
diff --git a/src/library/utils/man/tar.Rd b/src/library/utils/man/tar.Rd
index dfb21f5..50feeb5 100644
--- a/src/library/utils/man/tar.Rd
+++ b/src/library/utils/man/tar.Rd
@@ -1,6 +1,6 @@
 % File src/library/utils/man/tar.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 2009-2013 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 2009-2016 R Core Team
 % Distributed under GPL 2 or later
 
 \name{tar}
@@ -55,12 +55,15 @@ tar(tarfile, files = NULL,
   similar) and on Windows \option{--force-local} (so drives can be
   included in filepaths: however, this is the default for the
   \command{Rtools} \command{tar}).  For GNU \command{tar},
-  \option{--format=ustar} forces a more portable format (the current
-  default in version 1.26 is \option{--format=gnu}, but the manual says
-  the intention is to change to \option{--format=pax} which GNU
-  incorrectly calls \sQuote{POSIX} -- it was never part of the POSIX
-  standard for \command{tar}).  For libarchive \command{tar},
-  \option{--format=ustar} is more portable than the default.
+  \option{--format=ustar} forces a more portable format. (The default is
+  set at compilation and will be shown at the end of the output from
+  \command{tar --help}: for version 1.28 \sQuote{out-of-the-box} it is 
+  \option{--format=gnu}, but the manual says the intention is to change
+  to \option{--format=pax} which GNU incorrectly calls \sQuote{POSIX} --
+  it was never part of the POSIX standard for \command{tar} and should
+  not be used.)
+  For libarchive's \command{bsdtar}, \option{--format=ustar} is more
+  portable than the default.
 }
 
 \value{
@@ -72,11 +75,12 @@ tar(tarfile, files = NULL,
   The \sQuote{tar} format no longer has an agreed standard!
   \sQuote{Unix Standard Tar} was part of POSIX 1003.1:1998 but has been
   removed in favour of \command{pax}, and in any case many common
-  implementations diverged from the former standard.  Most \R platforms
+  implementations diverged from the former standard.  Many \R platforms
   use a version of GNU \command{tar} (including \command{Rtools} on
-  Windows, but the behaviour seems to be changed with each version), Mac
-  OS >= 10.6 and FreeBSD use \command{bsdttar} from the \sQuote{libarchive}
-  project, and commercial Unixes will have their own versions.
+  Windows), but the behaviour seems to be changed with each version.  OS
+  X >= 10.6 and FreeBSD use \command{bsdttar} from the
+  \sQuote{libarchive} project, and commercial Unixes will have their own
+  versions.
 
   Known problems arise from
   \itemize{
@@ -84,12 +88,13 @@ tar(tarfile, files = NULL,
     unsupported in early versions of \command{tar}, and supported in one
     way by POSIX \command{tar} and in another by GNU \command{tar} and
     yet another by the POSIX \command{pax} command which
-    recent\command{tar} programs often support.  The internal
+    recent \command{tar} programs often support.  The internal
     implementation warns on paths of more than 100 bytes,
     uses the \sQuote{ustar} way from the 1998 POSIX
     standard which supports up to 256 bytes (depending on the path: in
     particular the final component is limited to 100 bytes) if possible,
-    or the GNU way (which is widely supported).
+    otherwise the GNU way (which is widely supported, including by
+    \code{\link{untar}}).
 
     Most formats do not record the encoding of file paths.
 
@@ -100,12 +105,11 @@ tar(tarfile, files = NULL,
     symbolic links was added.  The internal implementation supports
     symbolic links (on OSes that support them), only.  Of course, the
     question arises as to how links should be unpacked on OSes that do
-    not support them: for regular files, at least, file copies can be
-    used.
+    not support them: for regular files file copies can be used.
 
     Names of links in the \sQuote{ustar} format are restricted to 100
     bytes.  There is an GNU extension for arbitrarily long link names,
-    but \command{bsdtar} does not read.  The internal method uses the
+    but \command{bsdtar} ignores it.  The internal method uses the
     GNU extension, with a warning.
 
     \item Header fields, in particular the padding to be used when
@@ -125,10 +129,29 @@ tar(tarfile, files = NULL,
   (10KB).  Implementations which pad differ on whether the block padding
   should occur before or after compression (or both): padding was
   designed for improved performance on physical tape drives.
+  
+  The \sQuote{ustar} format records file modification times to a
+  resolution of 1 second: on file systems with higher resolution it is
+  conventional to discard fractional seconds.
+}
+
+\note{
+  For users of macOS (formerly OS X).  Apple's HFS and HFS+ file systems
+  have a legacy concept of \sQuote{resource forks} dating from classic
+  Mac OS and rarely used nowadays.  Apple's version of \command{tar}
+  stores these as separate files in the tarball with names prefixed by
+  \file{._}, and unpacks such files into resource forks (if possible):
+  other ways of unpacking (including \code{\link{untar}} in \R) unpack
+  them as separate files.
+
+  When argument \code{tar} is set to the command \command{tar} on macOS,
+  environment variable \env{COPYFILE_DISABLE=1} is set, which for the
+  system version of \command{tar} prevents these separate files being
+  included in the tarball.
 }
 
 \seealso{
-  \url{http://en.wikipedia.org/wiki/Tar_(file_format)},
+  \url{https://en.wikipedia.org/wiki/Tar_(file_format)},
   \url{http://pubs.opengroup.org/onlinepubs/9699919799/utilities/pax.html#tag_20_92_13_06}
   for the way the POSIX utility \command{pax} handles \command{tar} formats.
 
diff --git a/src/library/utils/man/toLatex.Rd b/src/library/utils/man/toLatex.Rd
index 99d266a..71ef147 100644
--- a/src/library/utils/man/toLatex.Rd
+++ b/src/library/utils/man/toLatex.Rd
@@ -1,5 +1,5 @@
 % File src/library/utils/man/toLatex.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2013 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/utils/man/txtProgressBar.Rd b/src/library/utils/man/txtProgressBar.Rd
index 6ec2e02..acb52bc 100644
--- a/src/library/utils/man/txtProgressBar.Rd
+++ b/src/library/utils/man/txtProgressBar.Rd
@@ -1,5 +1,5 @@
 % File src/library/utils/man/txtProgressBar.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 2008-11 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/utils/man/type.convert.Rd b/src/library/utils/man/type.convert.Rd
index e63d35a..9d272dd 100644
--- a/src/library/utils/man/type.convert.Rd
+++ b/src/library/utils/man/type.convert.Rd
@@ -1,6 +1,6 @@
 % File src/library/utils/man/type.convert.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2014 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2015 R Core Team
 % Distributed under GPL 2 or later
 
 \name{type.convert}
@@ -25,6 +25,7 @@ type.convert(x, na.strings = "NA", as.is = FALSE, dec = ".",
   \item{numerals}{string indicating how to convert numbers whose
     conversion to double precision would lose accuracy, typically when
     \code{x} has more digits than can be stored in a \code{\link{double}}.
+    Can be abbreviated.  Possible values are
     \describe{
       \item{\code{numerals = "allow.loss"}, default:}{the conversion
 	happens with some accuracy loss.  This has been the only
@@ -57,9 +58,9 @@ type.convert(x, na.strings = "NA", as.is = FALSE, dec = ".",
   followed by other decimal or hexadecimal constants (see
   \link{NumericConstants}), or \code{NaN}, \code{Inf} or \code{infinity}
   (ignoring case) or values from \code{na.strings} are converted to
-  numeric.  As from \R 3.1.0, where converting inputs to numeric or
-  complex would result in loss of accuracy they are returned as strings
-  (for \code{as.is = TRUE}) or factors.
+  numeric.  Where converting inputs to numeric or complex would result
+  in loss of accuracy they can optionally be returned as strings (for
+  \code{as.is = TRUE}) or factors.
 
   Since this is a helper function, the caller should always pass an
   appropriate value of \code{as.is}.
diff --git a/src/library/utils/man/unix/COMPILE.Rd b/src/library/utils/man/unix/COMPILE.Rd
index 6c95648..48339bd 100644
--- a/src/library/utils/man/unix/COMPILE.Rd
+++ b/src/library/utils/man/unix/COMPILE.Rd
@@ -1,10 +1,8 @@
 % File src/library/utils/man/unix/COMPILE.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2013 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2014 R Core Team
 % Distributed under GPL 2 or later
 
-\newcommand{\sspace}{\ifelse{latex}{\out{~}}{ }}
-
 \name{COMPILE}
 \alias{COMPILE}
 \title{Compile Files for Use with R}
@@ -38,7 +36,7 @@
 
   Objective C and Objective C++ support is optional and will work only
   if the corresponding compilers were available at \R configure time:
-  their main usage is on OS X.
+  their main usage is on macOS.
 
   Compilation arranges to include the paths to the \R public C/C++ headers.
 
diff --git a/src/library/utils/man/unix/LINK.Rd b/src/library/utils/man/unix/LINK.Rd
index 7be6638..85ec3b0 100644
--- a/src/library/utils/man/unix/LINK.Rd
+++ b/src/library/utils/man/unix/LINK.Rd
@@ -1,10 +1,8 @@
 % File src/library/utils/man/unix/LINK.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2013 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2014 R Core Team
 % Distributed under GPL 2 or later
 
-\newcommand{\sspace}{\ifelse{latex}{\out{~}}{ }}
-
 \name{LINK}
 \alias{LINK}
 \title{Create Executable Programs}
diff --git a/src/library/utils/man/unix/memory.size.Rd b/src/library/utils/man/unix/memory.size.Rd
index cac90e0..f5ef9c3 100644
--- a/src/library/utils/man/unix/memory.size.Rd
+++ b/src/library/utils/man/unix/memory.size.Rd
@@ -1,10 +1,8 @@
 % File src/library/utils/man/unix/memory.size.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2007 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2014 R Core Team
 % Distributed under GPL 2 or later
 
-\newcommand{\sspace}{\ifelse{latex}{\out{~}}{ }}
-
 \name{memory.size}
 \alias{memory.size}
 \alias{memory.limit}
diff --git a/src/library/utils/man/unix/nsl.Rd b/src/library/utils/man/unix/nsl.Rd
index 2df87c6..4aad74c 100644
--- a/src/library/utils/man/unix/nsl.Rd
+++ b/src/library/utils/man/unix/nsl.Rd
@@ -1,5 +1,5 @@
 % File src/library/utils/man/unix/nsl.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2013 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/utils/man/untar.Rd b/src/library/utils/man/untar.Rd
index f8d0b98..9f95513 100644
--- a/src/library/utils/man/untar.Rd
+++ b/src/library/utils/man/untar.Rd
@@ -1,6 +1,6 @@
 % File src/library/utils/man/untar.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 2009-2014 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 2009-2016 R Core Team
 % Distributed under GPL 2 or later
 
 \name{untar}
@@ -9,7 +9,7 @@
   Extract or List Tar Archives
 }
 \description{
-  Extract files from or list a tar archive.
+  Extract files from or list the contents of a tar archive.
 }
 \usage{
 untar(tarfile, files = NULL, list = FALSE, exdir = ".",
@@ -31,13 +31,13 @@ untar(tarfile, files = NULL, list = FALSE, exdir = ".",
   \item{exdir}{The directory to extract files to (the equivalent of
     \command{tar -C}).  It will be created if necessary.}
 
-  \item{compressed}{logical or character.  Values \code{"gzip"},
+  \item{compressed}{logical or character string.  Values \code{"gzip"},
     \code{"bzip2"} and \code{"xz"} select that form of compression (and
     may be abbreviated to the first letter).  \code{TRUE} indicates gzip
     compression, \code{FALSE} no known compression (but an external
     \command{tar} command may detect compression automagically), and
-    \code{NA} (the default) that the type is inferred from the file
-    header.}
+    \code{NA} (the default) indicates that the type is inferred from the
+    file header.}
 
   \item{extras}{\code{NULL} or a character string: further command-line
     flags such as \option{-p} to be passed to an external \command{tar}
@@ -47,9 +47,14 @@ untar(tarfile, files = NULL, list = FALSE, exdir = ".",
 
   \item{restore_times}{logical.  If true (default) restore file
     modification times.  If false, the equivalent of the \option{-m}
-    flag.  Times in tarballs are supposed to be in UTC, but tarballs are
-    submitted to CRAN with times in the future or far past: this
-    argument allows such times to be discarded.}
+    flag.  Times in tarballs are supposed to be in UTC, but tarballs
+    have been submitted to CRAN with times in the future or far past:
+    this argument allows such times to be discarded.
+
+    Note that file times in a tarball are stored with a resolution of 1
+    second, and can only be restored to the resolution supported by the
+    file system (which on a FAT system is 2 seconds).
+  }
 
   \item{tar}{character string: the path to the command to be used.  If
     the command itself contains spaces it needs to be quoted -- but
@@ -67,7 +72,7 @@ untar(tarfile, files = NULL, list = FALSE, exdir = ".",
   Modern GNU flavours of \command{tar} will support compressed archives,
   and since 1.15 are able to detect the type of compression
   automatically: version 1.20 added support for \command{lzma} and
-  version 1.22 for \command{xz} compression using LZMA2.  OS X 10.6 and
+  version 1.22 for \command{xz} compression using LZMA2.  macOS 10.6 and
   later (and FreeBSD and some other OSes) have a \command{tar} (also
   known as \command{bsdtar}) from the \samp{libarchive} project which
   can also detect \command{gzip} and \command{bzip2} compression
@@ -102,21 +107,25 @@ untar(tarfile, files = NULL, list = FALSE, exdir = ".",
   handles it, and look carefully at the resulting files.  There may also
   be the warning \preformatted{    using pax extended headers}
   This is indicates that additional information may have been discarded,
-  such as ACLs, encodings \dots, and long path and link names are only
-  used as from \R 2.15.3.
+  such as ACLs, encodings \dots.
 
   The standards only support ASCII filenames (indeed, only alphanumeric
-  plus period, underscore and hyphen).  \code{untar} makes no attempt to map
-  filenames to those acceptable on the current system, and treats the
-  filenames in the archive as applicable without any re-encoding in the
-  current locale.
+  plus period, underscore and hyphen).  \code{untar} makes no attempt to
+  map filenames to those acceptable on the current system, and treats
+  the filenames in the archive as applicable without any re-encoding in
+  the current locale.
+
+  The internal implementation does not special-case \sQuote{resource
+  forks} in macOS: that system's \command{tar} command does. This may
+  lead to unexpected files with names with prefix \file{._}.
 }
 
 \value{
   If \code{list = TRUE}, a character vector of (relative or absolute)
   paths of files contained in the tar archive.
 
-  Otherwise the return code from \code{\link{system}}, invisibly.
+  Otherwise the return code from \code{\link{system}} with an external
+  \command{tar} or \code{0L}, invisibly.
 }
 
 \seealso{
diff --git a/src/library/utils/man/unzip.Rd b/src/library/utils/man/unzip.Rd
index 369db28..3366252 100644
--- a/src/library/utils/man/unzip.Rd
+++ b/src/library/utils/man/unzip.Rd
@@ -1,6 +1,6 @@
 % File src/library/utils/man/unzip.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2013 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2016 R Core Team
 % Distributed under GPL 2 or later
 
 \name{unzip}
@@ -40,17 +40,19 @@ unzip(zipfile, files = NULL, list = FALSE, overwrite = TRUE,
     path to a \command{unzip} program.}
 
   \item{setTimes}{logical.  For the internal method only, should the
-    file time be set based on the times in the zip file?  (NB: this
-    applies to files, not to directories.}
+    file times be set based on the times in the zip file?  (NB: this
+    applies to included files, not to directories.)}
 }
 \note{
   The default internal method is a minimal implementation, principally
   designed for Windows' users to be able to unpack Windows binary
   packages without external software.  It does not (for example) support
   Unicode filenames as introduced in \command{zip 3.0}: for that use
-  \code{unzip = "unzip"} with \command{unzip 6.00} or later.  (It does
-  have support for files of more than 4GB and \command{bzip2}
-  compression.)
+  \code{unzip = "unzip"} with \command{unzip 6.00} or later.  It does
+  have some support for \command{bzip2} compression and > 2GB zip files
+  (but not >= 4GB files pre-compression contained in a zip file: like
+  many builds of \command{unzip} it may truncate these, in \R's case
+  with a warning if possible).
 
   If \code{unzip} specifies a program, the format of the dates listed
   with \code{list = TRUE} is unknown (on Windows it can even depend on
@@ -82,7 +84,10 @@ unzip(zipfile, files = NULL, list = FALSE, overwrite = TRUE,
 \seealso{
   \code{\link{unz}} to read a single component from a zip file.
 
-  \code{\link{zip}}.
+  \code{\link{zip}} for packing, i.e., the \dQuote{inverse} of \code{unzip()};
+  further \code{\link{untar}} and \code{\link{tar}}, the corresponding
+  pair for (un)packing tar archives (\dQuote{tarballs}) such as \R
+  source packages.
 }
 
 \keyword{file}
diff --git a/src/library/utils/man/update.packages.Rd b/src/library/utils/man/update.packages.Rd
index 00330dc..4b19474 100644
--- a/src/library/utils/man/update.packages.Rd
+++ b/src/library/utils/man/update.packages.Rd
@@ -1,6 +1,6 @@
 % File src/library/utils/man/update.packages.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2013 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2017 R Core Team
 % Distributed under GPL 2 or later
 
 \name{update.packages}
@@ -44,35 +44,38 @@ new.packages(lib.loc = NULL, repos = getOption("repos"),
   \item{repos}{
     character vector, the base URL(s) of the repositories
     to use, e.g., the URL of a CRAN mirror such as
-    \code{"http://cran.us.r-project.org"}.
+    \code{"https://cloud.r-project.org"}.
   }
   \item{contriburl}{URL(s) of the contrib sections of the
     repositories.  Use this argument if your repository is
     incomplete.  Overrides argument \code{repos}.
+    Incompatible with \code{type = "both"}.
   }
-  \item{method}{Download method, see \code{\link{download.file}}.}
+  \item{method}{Download method, see \code{\link{download.file}}.
+    Unused if a non-\code{NULL} \code{available} is supplied.} 
   \item{instlib}{character string giving the library directory where to
     install the packages.}
-  \item{ask}{logical indicating whether to ask user before packages are
-    actually downloaded and installed, or the character string
-    \code{"graphics"}, which brings up a widget to allow the
-    user to (de-)select from the list of packages which could
-    be updated or added.  The latter value only works on
-    systems with a GUI version of \code{\link{select.list}},
-    and is otherwise equivalent to \code{ask = TRUE}.
+  \item{ask}{logical indicating whether to ask the user to select
+    packages before they are downloaded and installed, or the character
+    string \code{"graphics"}, which brings up a widget to allow the user
+    to (de-)select from the list of packages which could be updated.
+    (The latter value only works on systems with a GUI version of
+    \code{\link{select.list}}, and is otherwise equivalent to
+    \code{ask = TRUE}.)
   }
   \item{available}{
     an object as returned by \code{\link{available.packages}}
     listing packages available at the repositories, or \code{NULL} which
     makes an internal call to \code{available.packages}.
+    Incompatible with \code{type = "both"}.
   }
   \item{checkBuilt}{If \code{TRUE}, a package built under an earlier
-    major.minor version of \R (e.g., \code{3.1}) is considered to be
+    major.minor version of \R (e.g., \code{3.4}) is considered to be
     \sQuote{old}.}
   \item{oldPkgs}{
     if specified as non-NULL, \code{update.packages()} only considers
     these packages for updating. This may be a character vector
-    of package names or a matrix as returned by \code{old.packages()}.
+    of package names or a matrix as returned by \code{old.packages}.
   }
   \item{instPkgs}{
     by default all installed packages,
@@ -94,8 +97,8 @@ new.packages(lib.loc = NULL, repos = getOption("repos"),
   \code{\link{installed.packages}} by default) and reports installed
   packages that have newer versions on the repositories or, if
   \code{checkBuilt = TRUE}, that were built under an earlier minor
-  version of \R (for example built under 3.0.x when running \R 3.1.0).
-  (For binary package types here is no check that the version on the
+  version of \R (for example built under 3.3.x when running \R 3.4.0).
+  (For binary package types there is no check that the version on the
   repository was built under the current minor version of \R,
   but it is advertised as being suitable for this version.)
 
@@ -142,6 +145,9 @@ new.packages(lib.loc = NULL, repos = getOption("repos"),
   \code{\link{available.packages}}, \code{\link{download.packages}},
   \code{\link{installed.packages}}, \code{\link{contrib.url}}.
 
+  The options listed for \code{install.packages} under
+  \code{\link{options}}.
+  
   See \code{\link{download.file}} for how to handle proxies and
   other options to monitor file transfers.
 
diff --git a/src/library/utils/man/url.show.Rd b/src/library/utils/man/url.show.Rd
index 2fee462..f5c5879 100644
--- a/src/library/utils/man/url.show.Rd
+++ b/src/library/utils/man/url.show.Rd
@@ -1,5 +1,5 @@
 % File src/library/utils/man/url.show.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2011 R Core Team
 % Distributed under GPL 2 or later
 
@@ -30,7 +30,7 @@ url.show(url, title = url, file = tempfile(),
   \code{\link{url}}, \code{\link{file.show}}, \code{\link{download.file}}
 }
 \examples{
-\dontrun{url.show("http://lib.stat.cmu.edu/datasets/csb/ch3a.txt")}
+\dontrun{url.show("http://www.stats.ox.ac.uk/pub/datasets/csb/ch3a.txt")}
 }
 \keyword{file}
 \keyword{misc}
diff --git a/src/library/utils/man/utils-defunct.Rd b/src/library/utils/man/utils-defunct.Rd
index bfb5515..779b83a 100644
--- a/src/library/utils/man/utils-defunct.Rd
+++ b/src/library/utils/man/utils-defunct.Rd
@@ -1,6 +1,6 @@
 % File src/library/utils/man/utils-defunct.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2012 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2017 R Core Team
 % Distributed under GPL 2 or later
 
 \name{utils-defunct}
@@ -11,6 +11,7 @@
 \alias{CRAN.packages}
 #ifdef windows
 \alias{zip.unpack}
+\alias{setInternet2}
 #endif
 
 \title{Defunct Functions in Package \pkg{utils}}
@@ -32,6 +33,8 @@ zip.file.extract(file, zipname = "R.zip",
 
 #ifdef windows
 zip.unpack(zipname, dest)
+# disabled in 3.3.0, defunct in 3.4.0
+setInternet2(use = TRUE)
 #endif
 }
 \seealso{
diff --git a/src/library/utils/man/utils-deprecated.Rd b/src/library/utils/man/utils-deprecated.Rd
index aa5e829..ba7d3a5 100644
--- a/src/library/utils/man/utils-deprecated.Rd
+++ b/src/library/utils/man/utils-deprecated.Rd
@@ -1,5 +1,5 @@
 % File src/library/utils/man/utils-deprecated.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2013 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/utils/man/utils-package.Rd b/src/library/utils/man/utils-package.Rd
index e39523b..0178f74 100644
--- a/src/library/utils/man/utils-package.Rd
+++ b/src/library/utils/man/utils-package.Rd
@@ -1,5 +1,5 @@
 % File src/library/utils/man/utils-package.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2007 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/utils/man/vignette.Rd b/src/library/utils/man/vignette.Rd
index 96c8ba1..1175fe4 100644
--- a/src/library/utils/man/vignette.Rd
+++ b/src/library/utils/man/vignette.Rd
@@ -1,22 +1,26 @@
 % File src/library/utils/man/vignette.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2013 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2016 R Core Team
 % Distributed under GPL 2 or later
 
 \name{vignette}
+\title{View, List or Get R Source of Package Vignettes}
 \alias{vignette}
 \alias{edit.vignette}
 \alias{print.vignette}
 \alias{vignettes} % to link to from e.g. grid-package.Rd
-\title{View or List Package Vignettes}
+%% \alias{getRcode}
+%% \alias{getRcode.vignette}%hidden
 \description{
-  View a specified package vignette, or list the available ones.
+  View a specified package vignette, or list the available ones;
+  display it rendered in a viewer, and get or edit its \R source file.
 }
 \usage{
 vignette(topic, package = NULL, lib.loc = NULL, all = TRUE)
 
 \S3method{print}{vignette}(x, \dots)
 \S3method{edit}{vignette}(name, \dots)
+%% \S3method{getRcode}{vignette}(x, strict=TRUE, \dots)
 }
 \arguments{
   \item{topic}{a character string giving the (base) name of the vignette
@@ -31,8 +35,8 @@ vignette(topic, package = NULL, lib.loc = NULL, all = TRUE)
   \item{all}{logical; if \code{TRUE} search all available packages in
     the library trees specified by \code{lib.loc}, and if \code{FALSE},
     search only attached packages.}
-  \item{x, name}{Object of class \code{vignette}.}
-  \item{\ldots}{Ignored by the \code{print} method, passed on to
+  \item{x, name}{object of class \code{vignette}.}
+  \item{\dots}{ignored by the \code{print} method, passed on to
     \code{\link{file.edit}} by the \code{edit} method.}
 }
 \details{
@@ -49,14 +53,17 @@ vignette(topic, package = NULL, lib.loc = NULL, all = TRUE)
   corresponding information is returned in an object of class
   \code{"packageIQR"}.
 
-  The \code{edit} method copies the \R code extracted from the vignette
-  to a temporary file and opens the file in an editor (see
-  \code{\link{edit}}). This makes it very easy to execute the commands
-  line by line, modify them in any way you want to help you test
-  variants, etc.  
+  %% \code{getRcode(x)} gets the (full path) file name of the \R code
+  %% extracted from the vignette, and the \code{edit} method that  \R code
+  %% to a temporary file and opens the file in an editor (see
+  %% \code{\link{edit}}). This makes it very easy to execute the commands
+  %% line by line, modify them in any way you want to help you test
+  %% variants, etc.
 }
 \seealso{
-  \code{\link{browseVignettes}} for an HTML-based vignette browser.
+  \code{\link{browseVignettes}} for an HTML-based vignette browser;
+  \code{\link{RShowDoc}(<basename>, package = "<pkg>")} displays a
+  \dQuote{rendered} vignette (pdf or html).
 }
 \examples{
 ## List vignettes from all *attached* packages
@@ -65,26 +72,26 @@ vignette(all = FALSE)
 ## List vignettes from all *installed* packages (can take a long time!):
 vignette(all = TRUE)
 
-\dontrun{
-## Open the grid intro vignette
-vignette("grid")
-
-## The same
-v1 <- vignette("grid")
-print(v1)
-
-## Now let us have a closer look at the code
-edit(v1)
-
-## An alternative way of extracting the code,
-## R file is written to current working directory
-Stangle(v1$file)
-
+## The grid intro vignette -- open it
+\dontrun{vignette("grid") # calling print()}
+## The same (conditional on existence of the vignettte).
+## Note that 'package = *' is much faster in the case of many installed packages:
+if(!is.null(v1 <- vignette("grid", package="grid"))) {
+\dontrun{v1 # calling print(.)}
+  str(v1)
+  ## Now let us have a closer look at the code
+  %% print(utils:::getRcode(v1)) # the R file name
+  %% if(interactive()) # "display" it
+  %%   file.show(utils:::getRcode(v1))
+  %% ## or even more interactively:
+\dontrun{edit(v1) # e.g., to send lines ...}
+}# if( has vignette "installed")
 ## A package can have more than one vignette (package grid has several):
 vignette(package = "grid")
-vignette("rotated")
-## The same, but without searching for it:
-vignette("rotated", package = "grid")
+if(interactive()) {
+   ## vignette("rotated")
+   ## The same, but without searching for it:
+   vignette("rotated", package = "grid")
 }
 }
 \keyword{documentation}
diff --git a/src/library/utils/man/windows/DLL.version.Rd b/src/library/utils/man/windows/DLL.version.Rd
index 4cd1375..ea1450b 100644
--- a/src/library/utils/man/windows/DLL.version.Rd
+++ b/src/library/utils/man/windows/DLL.version.Rd
@@ -1,5 +1,5 @@
 % File src/library/utils/man/windows/DLL.version.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2010 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/utils/man/windows/Rconsole.Rd b/src/library/utils/man/windows/Rconsole.Rd
index 5df0649..12681a5 100644
--- a/src/library/utils/man/windows/Rconsole.Rd
+++ b/src/library/utils/man/windows/Rconsole.Rd
@@ -1,5 +1,5 @@
 % File src/library/utils/man/windows/Rconsole.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2011 R Core Team
 % Distributed under GPL 2 or later
 
@@ -70,9 +70,9 @@
 \section{Chinese/Japanese/Korean}{
   Users of these languages will need to select a suitable font for the
   console (perhaps \code{MS Mincho}) and for the graphics device
-  (although the default \code{Arial} has many CJK characters).  It is
-  essential that the font selected for the console has double-width CJK
-  characters -- many monospaced fonts do not.
+  (although the default \code{Arial} has many East Asian characters).
+  It is essential that the font selected for the console has
+  double-width East Asian characters -- many monospaced fonts do not.
 }
 \note{
   The \code{GUI preferences} item on the \code{Edit} menu brings up an
diff --git a/src/library/utils/man/windows/arrangeWindows.Rd b/src/library/utils/man/windows/arrangeWindows.Rd
index ddfcc0a..c7f7225 100644
--- a/src/library/utils/man/windows/arrangeWindows.Rd
+++ b/src/library/utils/man/windows/arrangeWindows.Rd
@@ -1,90 +1,90 @@
-% File src/library/utils/man/windows/arrangeWindows.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 2009-2013 Duncan Murdoch and the R Core Team
-% Distributed under GPL 2 or later
-
-\name{arrangeWindows}
-\alias{arrangeWindows}
-\title{
-Rearrange windows in the R GUI.
-}
-\description{
-This function allows you to tile or cascade windows, or to minimize or restore them.
-}
-\usage{
-arrangeWindows(action, windows, preserve = TRUE, outer = FALSE)
-}
-\arguments{
-  \item{action}{
-  The action to perform on the windows.  The choices are \code{c("vertical", "horizontal", "cascade", "minimize", 
-    "restore")} with default \code{"vertical"}; see the Details below for the interpretation.
-    Abbreviations may be used.
-    }
-  \item{windows}{
-  A list of window handles, by default produced by \code{\link{getWindowsHandles}()}.  
-}
-  \item{preserve}{
-  If \code{TRUE}, when tiling preserve the outer boundary of the collection of windows; otherwise 
-  make them as large as will fit.
-}
-  \item{outer}{
-  This argument is only used in MDI mode.  If \code{TRUE}, tile the windows on the system
-  desktop.  Otherwise, tile them within the MDI frame.
-}
-}
-\details{
-The actions are as follows:
-\describe{
-\item{\code{"vertical"}}{Tile vertically.}
-\item{\code{"horizontal"}}{Tile horizontally.}
-\item{\code{"cascade"}}{Cascade the windows.}
-\item{\code{"minimize"}}{Minimize all of the windows.}
-\item{\code{"restore"}}{Restore all of the windows to normal size (not minimized, not maximized).}
-}
-The tiling and cascading are done by the standard Windows API functions, but unlike those functions,
-they will apply to all of the windows in the \code{windows} list.  
-
-By default, \code{windows} is set to the result of
-\code{\link{getWindowsHandles}()} (with one exception described
-below).  This will select windows belonging to the current \R process.
-However, if the global environment contains a variable named
-\code{.arrangeWindowsDefaults}, it will be used as the argument list
-instead. See the \code{\link{getWindowsHandles}} man page for a
-discussion of the optional arguments to that function.
-
-When \code{action = "restore"} is used with \code{windows} unspecified,
-\code{minimized = TRUE} is added to the argument list of
-\code{\link{getWindowsHandles}} so that minimized windows will be restored.
-
-In MDI mode, by default tiling and cascading will happen within the R
-GUI frame. However, if \code{outer = TRUE}, tiling is done on the system
-desktop. This will generally not give desirable results if any R child
-windows are included within \code{windows}.
-
-}
-
-\note{
-  This is only available on Windows.
-}
-
-\value{
-This function is called for the side effect of arranging the windows.
-The list of window handles is returned invisibly.
-}
-\author{
-Duncan Murdoch
-}
-
-\seealso{
-\code{\link{getWindowsHandles}}
-}
-\examples{
-\dontrun{
-arrangeWindows("v")
-# This default is useful only in SDI mode:  it will tile any Firefox window 
-# along with the R windows
-.arrangeWindowsDefaults <- list(c("R", "all"), pattern = c("", "Firefox"))
-arrangeWindows("v")
-}
-}
-\keyword{utilities}
+% File src/library/utils/man/windows/arrangeWindows.Rd
+% Part of the R package, https://www.R-project.org
+% Copyright 2009-2013 Duncan Murdoch and the R Core Team
+% Distributed under GPL 2 or later
+
+\name{arrangeWindows}
+\alias{arrangeWindows}
+\title{
+Rearrange windows in the R GUI.
+}
+\description{
+This function allows you to tile or cascade windows, or to minimize or restore them.
+}
+\usage{
+arrangeWindows(action, windows, preserve = TRUE, outer = FALSE)
+}
+\arguments{
+  \item{action}{
+  The action to perform on the windows.  The choices are \code{c("vertical", "horizontal", "cascade", "minimize", 
+    "restore")} with default \code{"vertical"}; see the Details below for the interpretation.
+    Abbreviations may be used.
+    }
+  \item{windows}{
+  A list of window handles, by default produced by \code{\link{getWindowsHandles}()}.  
+}
+  \item{preserve}{
+  If \code{TRUE}, when tiling preserve the outer boundary of the collection of windows; otherwise 
+  make them as large as will fit.
+}
+  \item{outer}{
+  This argument is only used in MDI mode.  If \code{TRUE}, tile the windows on the system
+  desktop.  Otherwise, tile them within the MDI frame.
+}
+}
+\details{
+The actions are as follows:
+\describe{
+\item{\code{"vertical"}}{Tile vertically.}
+\item{\code{"horizontal"}}{Tile horizontally.}
+\item{\code{"cascade"}}{Cascade the windows.}
+\item{\code{"minimize"}}{Minimize all of the windows.}
+\item{\code{"restore"}}{Restore all of the windows to normal size (not minimized, not maximized).}
+}
+The tiling and cascading are done by the standard Windows API functions, but unlike those functions,
+they will apply to all of the windows in the \code{windows} list.  
+
+By default, \code{windows} is set to the result of
+\code{\link{getWindowsHandles}()} (with one exception described
+below).  This will select windows belonging to the current \R process.
+However, if the global environment contains a variable named
+\code{.arrangeWindowsDefaults}, it will be used as the argument list
+instead. See the \code{\link{getWindowsHandles}} man page for a
+discussion of the optional arguments to that function.
+
+When \code{action = "restore"} is used with \code{windows} unspecified,
+\code{minimized = TRUE} is added to the argument list of
+\code{\link{getWindowsHandles}} so that minimized windows will be restored.
+
+In MDI mode, by default tiling and cascading will happen within the R
+GUI frame. However, if \code{outer = TRUE}, tiling is done on the system
+desktop. This will generally not give desirable results if any R child
+windows are included within \code{windows}.
+
+}
+
+\note{
+  This is only available on Windows.
+}
+
+\value{
+This function is called for the side effect of arranging the windows.
+The list of window handles is returned invisibly.
+}
+\author{
+Duncan Murdoch
+}
+
+\seealso{
+\code{\link{getWindowsHandles}}
+}
+\examples{
+\dontrun{
+arrangeWindows("v")
+# This default is useful only in SDI mode:  it will tile any Firefox window 
+# along with the R windows
+.arrangeWindowsDefaults <- list(c("R", "all"), pattern = c("", "Firefox"))
+arrangeWindows("v")
+}
+}
+\keyword{utilities}
diff --git a/src/library/utils/man/windows/choose.dir.Rd b/src/library/utils/man/windows/choose.dir.Rd
index f931b25..45e743d 100644
--- a/src/library/utils/man/windows/choose.dir.Rd
+++ b/src/library/utils/man/windows/choose.dir.Rd
@@ -1,5 +1,5 @@
 % File src/library/utils/man/windows/choose.dir.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 2007-13 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/utils/man/windows/choose.files.Rd b/src/library/utils/man/windows/choose.files.Rd
index 0d34c0f..5868a07 100644
--- a/src/library/utils/man/windows/choose.files.Rd
+++ b/src/library/utils/man/windows/choose.files.Rd
@@ -1,5 +1,5 @@
 % File src/library/utils/man/windows/choose.files.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2009 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/utils/man/windows/clipboard.Rd b/src/library/utils/man/windows/clipboard.Rd
index 6518ce4..42b4255 100644
--- a/src/library/utils/man/windows/clipboard.Rd
+++ b/src/library/utils/man/windows/clipboard.Rd
@@ -1,6 +1,6 @@
 % File src/library/utils/man/windows/clipboard.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2009 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2015 R Core Team
 % Distributed under GPL 2 or later
 
 \name{clipboard}
@@ -27,8 +27,8 @@ writeClipboard(str, format = 1)
   \item{str}{a character vector or a raw vector.}
 }
 \details{
-  The Windows clipboard offers data in a number of formats: see e.g.
-  \url{http://msdn2.microsoft.com/en-us/library/ms649013.aspx}.
+  The Windows clipboard offers data in a number of formats: see
+  e.g.\sspace{}\url{https://msdn2.microsoft.com/en-us/library/ms649013.aspx}.
 
   The standard formats include
   \tabular{lrl}{
diff --git a/src/library/utils/man/windows/getWindowsHandle.Rd b/src/library/utils/man/windows/getWindowsHandle.Rd
index 3e6bc55..307abb4 100644
--- a/src/library/utils/man/windows/getWindowsHandle.Rd
+++ b/src/library/utils/man/windows/getWindowsHandle.Rd
@@ -1,5 +1,5 @@
 % File src/library/utils/man/windows/getWindowsHandle.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2007 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/utils/man/windows/getWindowsHandles.Rd b/src/library/utils/man/windows/getWindowsHandles.Rd
index 66837c1..90a09ec 100644
--- a/src/library/utils/man/windows/getWindowsHandles.Rd
+++ b/src/library/utils/man/windows/getWindowsHandles.Rd
@@ -1,71 +1,71 @@
-% File src/library/utils/man/windows/getWindowsHandles.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 2009-10 Duncan Murdoch and the R Core Team
-% Distributed under GPL 2 or later
-
-\name{getWindowsHandles}
-\alias{getWindowsHandles}
-\title{
-  Get handles of windows.
-}
-\description{
-  This function gets the Windows handles of visible top level windows or
-  windows within the \R MDI frame.
-}
-\usage{
-getWindowsHandles(which = "R", pattern = "", minimized = FALSE)
-}
-\arguments{
-  \item{which}{
-    A vector of strings "R" or "all" (possibly with repetitions).  See
-    the Details section.
-  }
-  \item{pattern}{
-    A vector of patterns that the titles of the windows must match.
-  }
-  \item{minimized}{
-    A logical vector indicating whether minimized windows should be considered.
-  }
-}
-\details{
-  This function will search for Windows handles, for passing to external
-  GUIs or to the \code{\link{arrangeWindows}} function.  Each of the
-  arguments may be a vector of values.  These will be treated as
-  follows:
-  \itemize{
-    \item The arguments will all be recycled to the same length.
-    \item The corresponding elements of each argument will be applied in
-    separate searches.
-    \item The final result will be the union of the windows identified in
-    each of the searches.
-  }
-
-  If an element of \code{which} is \code{"R"}, only windows belonging to
-  the current \R process will be returned.  In MDI mode, those will be the
-  child windows within the \R GUI frame.  In SDI mode, all windows
-  belonging to the process will be included.
-
-  If the element is \code{"all"}, then top level windows will be returned.
-
-  The elements of \code{pattern} will be used to make a subset of windows
-  whose title text matches (according to \code{\link{grep}}) the pattern.
-
-  If \code{minimized = FALSE}, minimized windows will be ignored.
-}
-\value{
-  A list of external pointers containing the window handles.
-}
-\note{
-  This is only available on Windows.
-}
-\author{
-  Duncan Murdoch
-}
-\seealso{
-  \code{\link{arrangeWindows}}
-}
-\examples{\donttest{
-getWindowsHandles()
-getWindowsHandles("all")
-}}
-\keyword{ utilities }
+% File src/library/utils/man/windows/getWindowsHandles.Rd
+% Part of the R package, https://www.R-project.org
+% Copyright 2009-10 Duncan Murdoch and the R Core Team
+% Distributed under GPL 2 or later
+
+\name{getWindowsHandles}
+\alias{getWindowsHandles}
+\title{
+  Get handles of windows.
+}
+\description{
+  This function gets the Windows handles of visible top level windows or
+  windows within the \R MDI frame.
+}
+\usage{
+getWindowsHandles(which = "R", pattern = "", minimized = FALSE)
+}
+\arguments{
+  \item{which}{
+    A vector of strings "R" or "all" (possibly with repetitions).  See
+    the Details section.
+  }
+  \item{pattern}{
+    A vector of patterns that the titles of the windows must match.
+  }
+  \item{minimized}{
+    A logical vector indicating whether minimized windows should be considered.
+  }
+}
+\details{
+  This function will search for Windows handles, for passing to external
+  GUIs or to the \code{\link{arrangeWindows}} function.  Each of the
+  arguments may be a vector of values.  These will be treated as
+  follows:
+  \itemize{
+    \item The arguments will all be recycled to the same length.
+    \item The corresponding elements of each argument will be applied in
+    separate searches.
+    \item The final result will be the union of the windows identified in
+    each of the searches.
+  }
+
+  If an element of \code{which} is \code{"R"}, only windows belonging to
+  the current \R process will be returned.  In MDI mode, those will be the
+  child windows within the \R GUI frame.  In SDI mode, all windows
+  belonging to the process will be included.
+
+  If the element is \code{"all"}, then top level windows will be returned.
+
+  The elements of \code{pattern} will be used to make a subset of windows
+  whose title text matches (according to \code{\link{grep}}) the pattern.
+
+  If \code{minimized = FALSE}, minimized windows will be ignored.
+}
+\value{
+  A list of external pointers containing the window handles.
+}
+\note{
+  This is only available on Windows.
+}
+\author{
+  Duncan Murdoch
+}
+\seealso{
+  \code{\link{arrangeWindows}}
+}
+\examples{\donttest{
+getWindowsHandles()
+getWindowsHandles("all")
+}}
+\keyword{ utilities }
diff --git a/src/library/utils/man/windows/memory.size.Rd b/src/library/utils/man/windows/memory.size.Rd
index e9ec46c..9c16609 100644
--- a/src/library/utils/man/windows/memory.size.Rd
+++ b/src/library/utils/man/windows/memory.size.Rd
@@ -1,5 +1,5 @@
 % File src/library/utils/man/windows/memory.size.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2012 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/utils/man/windows/readRegistry.Rd b/src/library/utils/man/windows/readRegistry.Rd
index b02ab09..27f5af9 100644
--- a/src/library/utils/man/windows/readRegistry.Rd
+++ b/src/library/utils/man/windows/readRegistry.Rd
@@ -1,6 +1,6 @@
 % File src/library/utils/man/windows/shortPathName.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 2008-10 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 2008-2014 R Core Team
 % Distributed under GPL 2 or later
 
 \name{readRegistry}
@@ -35,7 +35,7 @@ readRegistry(key, hive = c("HLM", "HCR", "HCU", "HU", "HCC", "HPD"),
   On 64-bit Windows, this will by default read the 32-bit view of the
   Registry when run from 32-bit \R, and the 64-bit view when run from
   64-bit \R: see
-  \url{http://msdn.microsoft.com/en-us/library/aa384232(VS.85).aspx}.
+  \url{https://msdn.microsoft.com/en-us/library/aa384232(VS.85).aspx}.
 }
 \value{
   A named list of values and subkeys (which may themselves be named
diff --git a/src/library/utils/man/windows/setInternet2.Rd b/src/library/utils/man/windows/setInternet2.Rd
deleted file mode 100644
index ad6801f..0000000
--- a/src/library/utils/man/windows/setInternet2.Rd
+++ /dev/null
@@ -1,55 +0,0 @@
-% File src/library/utils/man/windows/setInternet2.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2014 R Core Team
-% Distributed under GPL 2 or later
-
-\newcommand{\sspace}{\ifelse{latex}{\out{~}}{ }}
-
-\name{setInternet2}
-\Rdversion{1.1}
-\alias{setInternet2}
-\alias{R_WIN_INTERNET2}
-
-\title{
-Set or disable the use of Internet Explorer for Internet access.
-}
-\description{
-  With the \option{--internet2} startup option, or \emph{via}
-  environment variable \env{R_WIN_INTERNET2} or by calling this
-  function, R will make use of the \file{internet2.dll} library for
-  Internet access, which makes use of Internet Explorer functions.  This
-  allows specification of proxies, etc., in the \dQuote{Internet
-    Options} applet in \dQuote{Control Panel}.
-}
-\usage{
-setInternet2(use = TRUE)
-}
-\arguments{
-  \item{use}{Whether to use \file{internet2.dll}.  If \code{NA}, just
-  return the current setting.
-}
-}
-\value{
-The previous setting is returned, invisibly if \code{use} is not \code{NA}.
-}
-\details{
-  R does not load either \file{internet.dll} or \file{internet2.dll}
-  until needed, so it is certainly safe to call this function before
-  making any calls that access the Internet
-  (e.g., \code{\link{download.file}}).  If one of the DLLs has already
-  been loaded, this function will switch to the other one without
-  unloading the first one, so there is a potential resource leak.
-}
-\note{
-  This is only available on Windows.
-}
-\author{
-Duncan Murdoch
-}
-\seealso{
-\code{\link{download.file}}, \code{\link{url}}
-}
-\examples{
-setInternet2(NA)
-}
-\keyword{ utilities }
diff --git a/src/library/utils/man/windows/setWindowTitle.Rd b/src/library/utils/man/windows/setWindowTitle.Rd
index 9412e60..7fdec22 100644
--- a/src/library/utils/man/windows/setWindowTitle.Rd
+++ b/src/library/utils/man/windows/setWindowTitle.Rd
@@ -1,5 +1,5 @@
 % File src/library/utils/man/windows/setWindowTitle.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2007 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/utils/man/windows/shortPathName.Rd b/src/library/utils/man/windows/shortPathName.Rd
index 1433300..d4b0307 100644
--- a/src/library/utils/man/windows/shortPathName.Rd
+++ b/src/library/utils/man/windows/shortPathName.Rd
@@ -1,5 +1,5 @@
 % File src/library/utils/man/windows/shortPathName.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2014 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/utils/man/windows/winDialog.Rd b/src/library/utils/man/windows/winDialog.Rd
index 742ef56..76fa59a 100644
--- a/src/library/utils/man/windows/winDialog.Rd
+++ b/src/library/utils/man/windows/winDialog.Rd
@@ -1,5 +1,5 @@
 % File src/library/utils/man/windows/winDialog.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2007 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/utils/man/windows/winMenus.Rd b/src/library/utils/man/windows/winMenus.Rd
index 6f2b249..143052f 100644
--- a/src/library/utils/man/windows/winMenus.Rd
+++ b/src/library/utils/man/windows/winMenus.Rd
@@ -1,5 +1,5 @@
 % File src/library/utils/man/windows/winMenus.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2007 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/utils/man/windows/winProgressBar.Rd b/src/library/utils/man/windows/winProgressBar.Rd
index 1ac6410..ceceaca 100644
--- a/src/library/utils/man/windows/winProgressBar.Rd
+++ b/src/library/utils/man/windows/winProgressBar.Rd
@@ -1,5 +1,5 @@
 % File src/library/utils/man/windows/winProgressBar.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 2008 R Core Team
 % Distributed under GPL 2 or later
 
diff --git a/src/library/utils/man/windows/winextras.Rd b/src/library/utils/man/windows/winextras.Rd
index c3a88fe..57cc17a 100644
--- a/src/library/utils/man/windows/winextras.Rd
+++ b/src/library/utils/man/windows/winextras.Rd
@@ -1,27 +1,31 @@
 % File src/library/utils/man/windows/winextras.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2014 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2015 R Core Team
 % Distributed under GPL 2 or later
 
 \name{winextras}
 \alias{win.version}
 \title{Get Windows Version}
 \description{
-Get the self-reported Windows version number.  
+  Get the self-reported Windows version number.  
 }
 \usage{
 win.version()
 }
 \details{
   \code{win.version} is an auxiliary function for
-  \code{\link{bug.report}} which returns a character string describing
-  the version of Windows in use. 
+  \code{\link{sessionInfo}} and \code{\link{bug.report}}.
+}
+\value{
+  A character string describing the version of Windows reported to be in use. 
 }
 \note{
-This function is only available on Microsoft Windows.  
+  This function is only available on Microsoft Windows.  
     
-The result is based on the Windows
-\code{GetVersionEx} API function which reports 
-erroneous information in Windows 8.1 and later.
+  The result is based on the Windows \code{GetVersionEx} API function,
+  which for recent versions of Windows reports the compatibility version,
+  and not necessarily the actual version (hence 8.1 and 10 may be reported
+  as 8). If the API call reports 8, this function returns
+  \code{>= 8}.
 }
 \keyword{utilities}
diff --git a/src/library/utils/man/write.table.Rd b/src/library/utils/man/write.table.Rd
index 01bad51..40017fb 100644
--- a/src/library/utils/man/write.table.Rd
+++ b/src/library/utils/man/write.table.Rd
@@ -1,11 +1,8 @@
 % File src/library/utils/man/write.table.Rd
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 1995-2014 R Core Team
 % Distributed under GPL 2 or later
 
-\newcommand{\CRANpkg}{\href{http://CRAN.R-project.org/package=#1}{\pkg{#1}}}
-\newcommand{\sspace}{\ifelse{latex}{\out{~}}{ }}
-
 \name{write.table}
 \alias{write.table}
 \alias{write.csv}
@@ -147,7 +144,7 @@ write.csv2(\dots)
   (perhaps Latin-1) and \sQuote{PC-8} files.  OpenOffice 3.x asks for
   the character set when opening the file.
 
-  There is an IETF RFC4180 (\url{http://tools.ietf.org/html/rfc4180})
+  There is an IETF RFC4180 (\url{https://tools.ietf.org/html/rfc4180})
   for CSV files, which mandates comma as the separator and CRLF line
   endings.  \code{write.csv} writes compliant files on Windows: use
   \code{eol = "\r\n"} on other platforms.
diff --git a/src/library/utils/man/zip.Rd b/src/library/utils/man/zip.Rd
index 1977da9..a702929 100644
--- a/src/library/utils/man/zip.Rd
+++ b/src/library/utils/man/zip.Rd
@@ -1,6 +1,6 @@
 % File src/library/utils/man/zip.Rd
-% Part of the R package, http://www.R-project.org
-% Copyright 1995-2011 R Core Team
+% Part of the R package, https://www.R-project.org
+% Copyright 1995-2016 R Core Team
 % Distributed under GPL 2 or later
 
 \name{zip}
@@ -42,7 +42,8 @@ zip(zipfile, files, flags = "-r9X", extras = "",
   The status value returned by the external command, invisibly.
 }
 \seealso{
-  \code{\link{unzip}}, \code{\link{unz}}.
+  \code{\link{unzip}}, \code{\link{unz}}; further, \code{\link{tar}} and
+  \code{\link{untar}} for (un)packing tar archives.
 }
 
 \keyword{file}
diff --git a/src/library/utils/po/R-da.po b/src/library/utils/po/R-da.po
index b3e42ac..eadb013 100644
--- a/src/library/utils/po/R-da.po
+++ b/src/library/utils/po/R-da.po
@@ -2,7 +2,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: R 3.0.0\n"
 "Report-Msgid-Bugs-To: bugs.r-project.org\n"
-"POT-Creation-Date: 2014-02-27 17:14\n"
+"POT-Creation-Date: 2016-04-01 09:50\n"
 "PO-Revision-Date: 2012-01-09 20:51+0200\n"
 "Last-Translator: Joe <joedalton2 at yahoo.dk>\n"
 "Language-Team: LANGUAGE <LL at li.org>\n"
@@ -40,10 +40,6 @@ msgstr "reference til ukendt klump %s"
 msgid "no Sweave file with name %s found"
 msgstr "ingen Sweavefil med navnet %s blev fundet"
 
-#, fuzzy
-msgid "%d Sweave files for basename %s found"
-msgstr "%d Sweavefiler for basisnavn %s blev fundet:"
-
 msgid "more than one syntax specification found, using the first one"
 msgstr "mere end en syntaksspecifikation fundet, bruger den første"
 
@@ -68,6 +64,10 @@ msgstr ""
 "%s"
 
 #, fuzzy
+msgid "Warning: unknown option '--clean='%s"
+msgstr "Advarsel: Ukendt indstilling"
+
+#, fuzzy
 msgid "Warning: unknown option %s"
 msgstr "Advarsel: Ukendt indstilling"
 
@@ -270,6 +270,14 @@ msgstr ""
 msgid "did not assign() anything"
 msgstr ""
 
+msgid ""
+"Cannot debug primitive functions unless they are implicit generics (requires "
+"loading the methods package)"
+msgstr ""
+
+msgid "error in trying to evaluate the expression for argument %s (%s)"
+msgstr ""
+
 msgid "Browsing in the environment with call:"
 msgstr ""
 
@@ -338,9 +346,6 @@ msgstr ""
 msgid "%s has a help file but no examples"
 msgstr ""
 
-msgid "test '%s' is not available"
-msgstr ""
-
 msgid "Line number missing"
 msgstr ""
 
@@ -427,25 +432,25 @@ msgstr ""
 msgid "do not know what to search"
 msgstr ""
 
-msgid "incorrect type specification"
+msgid "argument 'help.db' is deprecated"
 msgstr ""
 
-msgid "argument 'help.db' is deprecated"
+msgid "incorrect type specification"
 msgstr ""
 
-msgid "could not find package %s"
+msgid "no information in the database for package %s: need 'rebuild = TRUE'?"
 msgstr ""
 
-msgid "package %s has empty hsearch data - strangely"
+msgid "incorrect 'agrep' specification"
 msgstr ""
 
-msgid "removing all entries with invalid multi-byte character data"
+msgid "could not find package %s"
 msgstr ""
 
-msgid "no information in the database for package %s: need 'rebuild = TRUE'?"
+msgid "package %s has empty hsearch data - strangely"
 msgstr ""
 
-msgid "incorrect 'agrep' specification"
+msgid "removing all entries with invalid multi-byte character data"
 msgstr ""
 
 msgid "invalid browser name, check options(\"browser\")."
@@ -456,7 +461,7 @@ msgstr ""
 
 msgid ""
 "If nothing happens, you should open\n"
-"'%s' yourself"
+"%s yourself"
 msgstr ""
 
 msgid ""
@@ -510,10 +515,12 @@ msgstr ""
 msgid "no function '%s' is visible"
 msgstr ""
 
-msgid "function '%s' appears not to be generic"
+msgid "generic function '%s' dispatches methods for generic '%s'"
 msgstr ""
 
-msgid "generic function '%s' dispatches methods for generic '%s'"
+msgid ""
+"function '%s' appears not to be S3 generic; found functions that look like "
+"S3 methods"
 msgstr ""
 
 msgid "must supply 'generic.function' or 'class'"
@@ -567,6 +574,11 @@ msgstr ""
 msgid "invalid 'filters' argument."
 msgstr "Ugyldigt argument for »filter«."
 
+msgid ""
+"specifying 'contriburl' or 'available' requires a single type, not type = "
+"\"both\""
+msgstr ""
+
 msgid "package '%s' in library '%s' will not be updated"
 msgstr ""
 
@@ -610,10 +622,16 @@ msgstr ""
 msgid "trying to use CRAN without setting a mirror"
 msgstr ""
 
-msgid "cannot choose a CRAN mirror non-interactively"
+msgid "'download.file()' error code '%d'"
+msgstr ""
+
+msgid "failed to download mirrors file (%s); using local file '%s'"
+msgstr ""
+
+msgid "cannot choose a"
 msgstr ""
 
-msgid "cannot choose a BioC mirror non-interactively"
+msgid "mirror non-interactively"
 msgstr ""
 
 msgid "cannot set repositories non-interactively"
@@ -636,6 +654,9 @@ msgid ""
 "skipping dependencies"
 msgstr ""
 
+msgid "type 'binary' is not supported on this platform"
+msgstr ""
+
 msgid "no packages were specified"
 msgstr ""
 
@@ -648,15 +669,14 @@ msgstr ""
 msgid "unable to create %s"
 msgstr ""
 
-msgid "inferring 'repos = NULL' from the file name"
+msgid "inferring 'repos = NULL' from 'pkgs'"
 msgstr ""
 
-msgid ""
-"type == \"both\" can only be used on Windows or a CRAN build for Mac OS X"
+msgid "unable to create temporary directory %s"
 msgstr ""
 
 msgid ""
-"type == \"both\" cannot be used if 'available' or 'contriburl' is specified"
+"type == \"both\" can only be used on Windows or a CRAN build for Mac OS X"
 msgstr ""
 
 msgid "type == \"both\" cannot be used with 'repos = NULL'"
@@ -688,9 +708,6 @@ msgstr ""
 msgid "installation of package %s had non-zero exit status"
 msgstr ""
 
-msgid "unable to create temporary directory %s"
-msgstr ""
-
 msgid "foundpkgs: %s"
 msgstr ""
 
@@ -736,6 +753,9 @@ msgstr ""
 msgid "Edit the file and move it to the appropriate directory."
 msgstr ""
 
+msgid "cannot determine import name"
+msgstr ""
+
 msgid "no documentation of type %s and topic %s (or error in processing help)"
 msgstr ""
 
@@ -747,9 +767,6 @@ msgstr ""
 msgid "no methods for %s and no documentation for it as a function"
 msgstr ""
 
-msgid "error in trying to evaluate the expression for argument %s (%s)"
-msgstr ""
-
 msgid "no method defined for function %s and signature %s"
 msgstr ""
 
@@ -891,6 +908,9 @@ msgstr ""
 msgid "'digits' and 'digits.d' are both specified and the latter is not used"
 msgstr ""
 
+msgid "number of matches does not always match ncol(proto)"
+msgstr ""
+
 msgid "no lines found in %s"
 msgstr ""
 
@@ -1019,11 +1039,13 @@ msgstr ""
 msgid "'ccaddress' must be of length 1"
 msgstr ""
 
-msgid "no download method found"
-msgstr ""
+#, fuzzy
+msgid "'url' must be a length-one character vector"
+msgstr "»package« skal være en tegnstreng eller NULL"
 
-msgid "method 'lynx' is untested and deprecated as from R 3.1.0"
-msgstr ""
+#, fuzzy
+msgid "'destfile' must be a length-one character vector"
+msgstr "»package« skal være en tegnstreng eller NULL"
 
 msgid "download had nonzero exit status"
 msgstr ""
@@ -1068,11 +1090,6 @@ msgstr ""
 msgid "method 'mailx' is Unix-only"
 msgstr ""
 
-msgid ""
-"If nothing happens, you should open\n"
-"%s yourself"
-msgstr ""
-
 #, fuzzy
 msgid "zip file %s not found"
 msgstr "pakke %s blev ikke fundet"
@@ -1083,6 +1100,9 @@ msgstr ""
 msgid "there is no 'libs' directory in package %s"
 msgstr ""
 
+msgid "Only '*.zip' and '*.tar.gz' files can be installed."
+msgstr ""
+
 msgid "winDialog() cannot be used non-interactively"
 msgstr ""
 
@@ -1090,6 +1110,12 @@ msgid "winDialogString() cannot be used non-interactively"
 msgstr ""
 
 #, fuzzy
+msgid "%d Sweave file for basename %s found"
+msgid_plural "%d Sweave files for basename %s found"
+msgstr[0] "%d Sweavefiler for basisnavn %s blev fundet:"
+msgstr[1] "%d Sweavefiler for basisnavn %s blev fundet:"
+
+#, fuzzy
 msgid "%d occurrence in %s"
 msgid_plural "%d occurrences in %s"
 msgstr[0] "%d tilfælde i %s"
@@ -1130,8 +1156,14 @@ msgid_plural ""
 msgstr[0] ""
 msgstr[1] ""
 
-msgid "package %s is not available (for %s)"
-msgid_plural "packages %s are not available (for %s)"
+#, fuzzy
+msgid "package %s is not available (%s)"
+msgid_plural "packages %s are not available (%s)"
+msgstr[0] "Filter »%s« er ikke tilgængelig."
+msgstr[1] "Filter »%s« er ikke tilgængelig."
+
+msgid "package %s is a base package, and should not be updated"
+msgid_plural "packages %s are base packages, and should not be updated"
 msgstr[0] ""
 msgstr[1] ""
 
@@ -1165,14 +1197,15 @@ msgid_plural ""
 msgstr[0] ""
 msgstr[1] ""
 
-msgid "Do you want to install from sources the package which need compilation?"
+msgid ""
+"Do you want to install from sources the package which needs compilation?"
 msgid_plural ""
 "Do you want to install from sources the packages which need compilation?"
 msgstr[0] ""
 msgstr[1] ""
 
 msgid ""
-"Package which are only available in source form, and may need compilation of "
+"Package which is only available in source form, and may need compilation of "
 "C/C++/Fortran"
 msgid_plural ""
 "Packages which are only available in source form, and may need compilation "
@@ -1215,6 +1248,10 @@ msgid_plural "packages %s are in use and will not be installed"
 msgstr[0] ""
 msgstr[1] ""
 
+#, fuzzy
+#~ msgid ","
+#~ msgstr ","
+
 #~ msgid "broken installation, no CITATION file in the base package."
 #~ msgstr "ødelagt installation, ingen CITATION-fil i basispakken."
 
@@ -1235,7 +1272,3 @@ msgstr[1] ""
 
 #~ msgid "call"
 #~ msgstr "kald"
-
-#, fuzzy
-#~ msgid ","
-#~ msgstr ","
diff --git a/src/library/utils/po/R-de.po b/src/library/utils/po/R-de.po
index 4fd2302..0f97111 100644
--- a/src/library/utils/po/R-de.po
+++ b/src/library/utils/po/R-de.po
@@ -5,13 +5,13 @@
 #
 msgid ""
 msgstr ""
-"Project-Id-Version: R 3.1.0\n"
+"Project-Id-Version: R 3.3.0\n"
 "Report-Msgid-Bugs-To: bugs.r-project.org\n"
-"POT-Creation-Date: 2014-02-27 17:14\n"
-"PO-Revision-Date: 2013-03-18 10:11+0100\n"
+"POT-Creation-Date: 2015-06-06 13:51\n"
+"PO-Revision-Date: 2016-04-21 09:13+0200\n"
 "Last-Translator: Detlef Steuer <steuer at hsu-hh.de>\n"
 "Language-Team: R Core <r-core at r-project.org>\n"
-"Language: \n"
+"Language: de\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
@@ -21,11 +21,11 @@ msgid ""
 "RShowDoc() should be used with a character string argument specifying\n"
 "   a documentation file"
 msgstr ""
-"RShowDoc() sollte mit einen Zeichenkettenargument genutzt werden,\n"
-"das eine Dokudatei spezifiziert"
+"RShowDoc() sollte mit einem Zeichenkettenargument genutzt werden,\n"
+"das eine Dokumentationsdatei spezifiziert"
 
 msgid "no documentation for %s found in package %s"
-msgstr "keine Doku für %s in Paket %s gefunden"
+msgstr "keine Dokumentation für %s in Paket %s gefunden"
 
 msgid "document not found"
 msgstr "Dokument nicht gefunden"
@@ -34,7 +34,7 @@ msgid "A search query has been submitted to %s"
 msgstr "Eine Suchanfrage wurde gesendet an %s"
 
 msgid "The results page should open in your browser shortly"
-msgstr "Die Ergebnissseite sollte sich in Kürze in Ihrem Browser öffnen"
+msgstr "Die Ergebnisseite sollte sich in Kürze in Ihrem Browser öffnen"
 
 msgid "reference to unknown chunk %s"
 msgstr "Referenz auf unbekannten Abschnitt %s"
@@ -42,9 +42,6 @@ msgstr "Referenz auf unbekannten Abschnitt %s"
 msgid "no Sweave file with name %s found"
 msgstr "keine Sweave-Datei namens %s gefunden"
 
-msgid "%d Sweave files for basename %s found"
-msgstr "%d Sweave Dateien für Basisnamen %s gefunden"
-
 msgid "more than one syntax specification found, using the first one"
 msgstr "mehr als eine Syntaxspezifikation gefunden, benutze die erste"
 
@@ -67,6 +64,9 @@ msgstr ""
 "Parsing-Fehler oder leere Option in\n"
 "%s"
 
+msgid "Warning: unknown option '--clean='%s"
+msgstr "Warnung: unbekannte Option '--clean='%s"
+
 msgid "Warning: unknown option %s"
 msgstr "Warnung: unbekannte Option %s"
 
@@ -74,10 +74,10 @@ msgid "Output file:"
 msgstr "Ausgabedateien:"
 
 msgid "Compacting PDF document"
-msgstr "Komprimieren PDF Dokument"
+msgstr "Komprimiere PDF Dokument"
 
 msgid "path to %s contains spaces,"
-msgstr "Pfad zu %s enthält Leerstellen."
+msgstr "Pfad für %s enthält Leerzeichen,"
 
 msgid "this may cause problems when running LaTeX"
 msgstr "Das kann Schwierigkeiten mit LaTeX machen"
@@ -89,7 +89,7 @@ msgid "invalid value for %s : %s"
 msgstr "unzulässiger Wert für %s : %s"
 
 msgid "value of 'results' option should be lowercase"
-msgstr "Wert der 'results' option sollte in Kleinbuchstaben sein"
+msgstr "Wert der 'results' Option sollte in Kleinbuchstaben sein"
 
 msgid "value of 'strip.white' option should be lowercase"
 msgstr "Wert der 'strip.white' Option sollte in Kleinbuchstaben sein"
@@ -149,7 +149,7 @@ msgid "'full.names' must be TRUE for multiple paths."
 msgstr "'full.names' muss TRUE sein bei mehrfachen Pfaden."
 
 msgid "Timestamp file no longer exists."
-msgstr "Zeitstempel exisitiert nicht länger."
+msgstr "Zeitstempel existiert nicht mehr."
 
 msgid ""
 "Not all arguments are of the same length, the following need to be recycled: "
@@ -165,7 +165,7 @@ msgid "It is recommended to use %s instead of %s."
 msgstr "Es ist empfohlen %s anstelle von %s zu nutzen."
 
 msgid "Use either %s or %s but not both."
-msgstr "Nutze entweder %s oder %s aber nicht beide."
+msgstr "Nutze entweder %s oder %s, aber nicht beide."
 
 msgid "It is recommended to use %s/%s instead of %s/%s/%s."
 msgstr "Es ist empfohlen %s/%s anstelle von %s/%s/%s zu nutzen."
@@ -189,7 +189,7 @@ msgid "%s should be one of %s"
 msgstr "%s sollte einer von %s sein"
 
 msgid "A BibTeX entry for LaTeX users is"
-msgstr "Ein BibTeX-eintrag für LaTeX Benutzer ist"
+msgstr "Ein BibTeX-Eintrag für LaTeX-Benutzer ist"
 
 msgid ""
 "Dropping invalid entry %d:\n"
@@ -208,29 +208,29 @@ msgid "could not determine year for %s from package DESCRIPTION file"
 msgstr "konnte das Jahr für %s aus der DESCRIPTION des Paketes nicht bestimmen"
 
 msgid "To cite package %s in publications use:"
-msgstr "Um Paket %s in Publikationen zu zitieren nutzen Sie bitte:"
+msgstr "Um Paket %s in Publikationen zu zitieren, nutzen Sie bitte:"
 
 msgid ""
 "ATTENTION: This citation information has been auto-generated from the "
 "package DESCRIPTION file and may need manual editing, see %s."
 msgstr ""
-"ACHTUNG: Diese Zitatinformation wurde aus der DESCRIPTION-Datei\n"
-"automatischn generiert. Evtl. manuelle Nacharbeit nötig, siehe %s."
+"ACHTUNG: Diese Zitationsinformation wurde aus der DESCRIPTION-Datei\n"
+"automatisch generiert. Evtl. ist manuelle Nachbearbeitung nötig, siehe %s."
 
 msgid "'FUN' must be a function or NULL"
 msgstr "'FUN' muss eine Funktion oder NULL sein"
 
 msgid "cannot handle S4 methods yet"
-msgstr "kann noch nicht mit S4 Methoden umgehen"
+msgstr "kann noch nicht mit S4-Methoden umgehen"
 
 msgid "'package' must be a character string or NULL"
 msgstr "'package' muss eine Zeichenkette oder NULL sein"
 
 msgid "datasets have been moved from package 'base' to package 'datasets'"
-msgstr "Datensätze wurden von Paket 'base' ins Paket 'datasets' verschoben"
+msgstr "Datensätze wurden vom Paket 'base' in das Paket 'datasets' verschoben"
 
 msgid "datasets have been moved from package 'stats' to package 'datasets'"
-msgstr "Datensätze wurden von Paket 'stats' ins Paket 'datasets' verschoben"
+msgstr "Datensätze wurden vom Paket 'stats' in das Paket 'datasets' verschoben"
 
 msgid "data index for package %s is invalid and will be ignored"
 msgstr "Datenindex für Paket %s ist ungültig und wird ignoriert"
@@ -242,7 +242,7 @@ msgid "data set %s not found"
 msgstr "Datensatz %s nicht gefunden"
 
 msgid "only 'html = TRUE' is supported on this platform"
-msgstr "nur 'html = TRUE' ist auf dieser Plattform unterstützt"
+msgstr "nur 'html = TRUE' wird auf dieser Plattform unterstützt"
 
 msgid "kind '%s' not yet implemented"
 msgstr "Art '%s' noch nicht implementiert"
@@ -257,13 +257,13 @@ msgid "could not restore type information"
 msgstr "konnte Typinformation nicht wieder herstellen"
 
 msgid "'modes' argument ignored"
-msgstr "'modes' Argument ignoriert"
+msgstr "'modes'-Argument ignoriert"
 
 msgid "'names' argument ignored"
-msgstr "'names' Argument ignoriert"
+msgstr "'names'-Argument ignoriert"
 
 msgid "could not restore variables properly"
-msgstr "konnte Variablen nicht angemessen wieder herstellen"
+msgstr "konnte Variablen nicht angemessen wiederherstellen"
 
 msgid "did not assign() anything"
 msgstr "habe nichts assign()-ed"
@@ -281,10 +281,10 @@ msgid "'dump' is empty"
 msgstr "'dump' ist leer"
 
 msgid "Available environments had calls:"
-msgstr "Verfügbare Umgebungen hatte Aufrufe:"
+msgstr "Verfügbare Umgebungen hatten diese Aufrufe:"
 
 msgid "Enter an environment number, or 0 to exit"
-msgstr "Gebe Umgebungsnummer oder 0 für Abbruch an"
+msgstr "Geben Sie Umgebungsnummer oder 0 für Abbruch an"
 
 msgid "recover called non-interactively; frames dumped, use debugger() to view"
 msgstr ""
@@ -335,34 +335,31 @@ msgid "cannot edit NULL row names"
 msgstr "kann NULL Zeilennamen nicht editieren"
 
 msgid "no help found for %s"
-msgstr "kein Hilfe für %s gefunden"
+msgstr "keine Hilfe für %s gefunden"
 
 msgid "%s has a help file but no examples"
 msgstr "%s hat eine Hilfe, aber keine Beispiele"
 
-msgid "test '%s' is not available"
-msgstr "test '%s' ist nicht verfügbar"
-
 msgid "Line number missing"
 msgstr "Zeilennummer fehlt"
 
 msgid "'fix' requires a name"
-msgstr "'fix' beötigt einen Namen"
+msgstr "'fix' benötigt einen Namen"
 
 msgid "too many list items (at most up to %d)"
-msgstr "zu viele Listenpunke (höchstens %d)"
+msgstr "zu viele Listenpunkte (höchstens %d)"
 
 msgid "no vector columns were selected"
 msgstr "keine Vektorspalten ausgewählt"
 
 msgid "non-vector columns will be ignored"
-msgstr "nicht-vector Spalten werden ignoriert"
+msgstr "Nicht-Vektor-Spalten werden ignoriert"
 
 msgid "at least one vector element is required"
 msgstr "mindestens ein Vektorelement ist nötig"
 
 msgid "non-vector elements will be ignored"
-msgstr "nicht-vektor Elemente werden ignoriert"
+msgstr "Nicht-Vektor-Elemente werden ignoriert"
 
 msgid "'form' must be a two-sided formula"
 msgstr "'form' muss eine zweiseitige Formel sein"
@@ -405,7 +402,7 @@ msgid "Using the first match ..."
 msgstr "Nutze ersten passenden ..."
 
 msgid "HTML help is unavailable"
-msgstr "HTML Hilfe ist nicht verfügbar"
+msgstr "HTML-Hilfe ist nicht verfügbar"
 
 msgid "R Help on %s"
 msgstr "R Hilfe zu %s"
@@ -417,7 +414,7 @@ msgid ""
 "package %s exists but was not installed under R >= 2.10.0 so help cannot be "
 "accessed"
 msgstr ""
-"Paket %s exisitiert, wurde aber nicht unter R >= 2.10.0 installiert, weshalb "
+"Paket %s existiert, wurde aber nicht unter R >= 2.10.0 installiert, weshalb "
 "die Hilfe nicht genutzt werden kann"
 
 msgid "creation of %s failed"
@@ -435,12 +432,19 @@ msgstr "falsche Feldspezifikation"
 msgid "do not know what to search"
 msgstr "weiß nicht, wonach suchen"
 
-msgid "incorrect type specification"
-msgstr "falsche Typspezifikation"
-
 msgid "argument 'help.db' is deprecated"
 msgstr "Argument 'help.db' ist veraltet"
 
+msgid "no information in the database for package %s: need 'rebuild = TRUE'?"
+msgstr ""
+"keine Information in der Datenbank für Paket %s: benötige 'rebuild = TRUE'?"
+
+msgid "incorrect 'agrep' specification"
+msgstr "falsche 'agrep' Spezifikation"
+
+msgid "incorrect type specification"
+msgstr "falsche Typspezifikation"
+
 msgid "could not find package %s"
 msgstr "konnte Paket %s nicht finden"
 
@@ -448,25 +452,18 @@ msgid "package %s has empty hsearch data - strangely"
 msgstr "Paket %s hat leere hsearch Daten - seltsam"
 
 msgid "removing all entries with invalid multi-byte character data"
-msgstr "entferne alle Ein<räge mit unzulässigen multi-byte Charakterdaten"
-
-msgid "no information in the database for package %s: need 'rebuild = TRUE'?"
-msgstr ""
-"keine Information in der Datenbank für Paket %s: benötige 'rebuild = TRUE'?"
-
-msgid "incorrect 'agrep' specification"
-msgstr "falsche 'agrep' Spezifikation"
+msgstr "entferne alle Einträge mit unzulässigen multi-byte Zeichenkettendaten"
 
 msgid "invalid browser name, check options(\"browser\")."
 msgstr "ungültiger Browsername, überprüfen Sie options(\"browser\")."
 
 msgid "help.start() requires the HTTP server to be running"
-msgstr "help.start() benötigt den laufenden HTTP Server"
+msgstr "help.start() benötigt den laufenden HTTP-Server"
 
 msgid ""
 "If nothing happens, you should open\n"
-"'%s' yourself"
-msgstr "Wenn nichts passiert, sollten Sie '%s' selbst öffnen"
+"%s yourself"
+msgstr "Wenn nichts passiert, sollten Sie %s selbst öffnen"
 
 msgid ""
 "If the browser launched by '%s' is already running, it is *not* restarted, "
@@ -488,10 +485,10 @@ msgid "no package '%s' was found"
 msgstr "kein Paket '%s' gefunden"
 
 msgid "metadata of package '%s' is corrupt"
-msgstr "Metadaten für Paket '%s' sind korrumpiert"
+msgstr "Metadaten für Paket '%s' sind beschädigt"
 
 msgid "DESCRIPTION file of package '%s' is corrupt"
-msgstr "DESCRIPTION von Paket '%s' ist korrumpiert"
+msgstr "DESCRIPTION von Paket '%s' ist beschädigt"
 
 msgid ""
 "'DESCRIPTION' file has an 'Encoding' field and re-encoding is not possible"
@@ -499,10 +496,10 @@ msgstr ""
 "Die 'DESCRIPTION' Datei hat Feld 'Encoding' und rekodieren ist nicht möglich"
 
 msgid "DESCRIPTION file of package '%s' is missing or broken"
-msgstr "DESCRIPTIN von Paket '%s' fehlt oder zerstört"
+msgstr "DESCRIPTION von Paket '%s' fehlt oder zerstört"
 
 msgid "cannot update HTML package index"
-msgstr "kann HTML Paketindex nicht aktualisieren"
+msgstr "kann HTML-Paketindex nicht aktualisieren"
 
 msgid "done"
 msgstr "fertig"
@@ -514,7 +511,7 @@ msgid "Enter an item from the menu, or 0 to exit"
 msgstr "Geben Sie Menüpunkt ein oder 0 zum Abbruch"
 
 msgid "invalid query"
-msgstr "unzulässiges Anfrage"
+msgstr "unzulässige Anfrage"
 
 msgid "'%s' is a formal generic function; S3 methods will not likely be found"
 msgstr ""
@@ -524,12 +521,16 @@ msgstr ""
 msgid "no function '%s' is visible"
 msgstr "keine Funktion '%s' sichtbar"
 
-msgid "function '%s' appears not to be generic"
-msgstr "Funktion '%s' scheint nicht generisch sein"
-
 msgid "generic function '%s' dispatches methods for generic '%s'"
 msgstr ""
-"generische Funktion '%s' leistet Methodendispatch für  die generische '%s'"
+"generische Funktion '%s' leistet Methodendispatch für die generische '%s'"
+
+msgid ""
+"function '%s' appears not to be S3 generic; found functions that look like "
+"S3 methods"
+msgstr ""
+"Funktion '%s' scheint nicht S3 generisch sein; habe Funktionen\n"
+"gefunden, die wie S3 Methoden aussehen"
 
 msgid "must supply 'generic.function' or 'class'"
 msgstr "'generic.function' oder 'class' muss angegeben werden"
@@ -538,16 +539,16 @@ msgid "no function '%s' could be found"
 msgstr "keine Funktion '%s' konnte gefunden werden"
 
 msgid "S3 method '%s' not found"
-msgstr "S3 Methode '%s' nicht gefunden"
+msgstr "S3-Methode '%s' nicht gefunden"
 
 msgid "environment specified is not a package"
-msgstr "angegebenen Umgebung ist kein Paket"
+msgstr "angegebene Umgebung ist kein Paket"
 
 msgid "changing locked binding for %s in %s whilst loading %s"
-msgstr "ändere geschlossene Bindung für %s in %s während des Ladens von %s"
+msgstr "ändere gesperrte Bindung für %s in %s während des Ladens von %s"
 
 msgid "changing locked binding for %s in %s"
-msgstr "ändere geschlossene Bindung für %s in %s"
+msgstr "ändere gesperrte Bindung für %s in %s"
 
 msgid "'fixInNamespace' requires a name"
 msgstr "'fixInNamespace' benötigt einen Namen"
@@ -559,22 +560,22 @@ msgid "cannot create directory '%s'"
 msgstr "kann Verzeichnis '%s' nicht erzeugen"
 
 msgid "'code_files' must be a character vector"
-msgstr "'code_files' muss ein Charaktervektor sein"
+msgstr "'code_files' muss ein Zeichenkettenvektor sein"
 
 msgid "'list' must be a character vector naming R objects"
-msgstr "'list' muss ein Charaktervektor sein, mit Namen von R Objekten"
+msgstr "'list' muss ein Zeichenkettenvektor mit Namen von R-Objekten sein"
 
 msgid "no R objects specified or available"
-msgstr "keine R Objekte spezifiziert oder verfügbar"
+msgstr "keine R-Objekte spezifiziert oder verfügbar"
 
 msgid "directory '%s' already exists"
-msgstr "Verzeichnis '%s' exisitiert bereits"
+msgstr "Verzeichnis '%s' existiert bereits"
 
 msgid ""
 "generic functions and other S4 objects (e.g., '%s') cannot be dumped; use "
 "the 'code_files' argument"
 msgstr ""
-"generische Funktionen und andere S4 Objekte (z.B. '%s') können nicht "
+"generische Funktionen und andere S4-Objekte (z.B. '%s') können nicht "
 "gedumped werden: nutze 'code_files' Argument"
 
 msgid "unable to access index for repository %s"
@@ -583,17 +584,24 @@ msgstr "kann nicht auf den Index für das Repository %s zugreifen"
 msgid "invalid 'filters' argument."
 msgstr "unzulässiges 'filters' Argument"
 
+msgid ""
+"specifying 'contriburl' or 'available' requires a single type, not type = "
+"\"both\""
+msgstr ""
+"Spezifizieren von 'contribul' oder 'available' verlangt einfachen Typ,\n"
+"nicht type = \"both\""
+
 msgid "package '%s' in library '%s' will not be updated"
 msgstr "Paket '%s' in der Bibliothek '%s' wird nicht aktualisiert"
 
 msgid ""
 "invalid 'oldPkgs'; must be a character vector or a result from old.packages()"
 msgstr ""
-"unzulässige 'oldPkgs'; muss eine Zeichenkette oder ein Ergebniss von old."
+"unzulässige 'oldPkgs'; muss eine Zeichenkette oder ein Ergebnis von old."
 "packages() sein"
 
 msgid "ill-formed 'instPkgs' matrix"
-msgstr "missgestaltete 'instPkgs' Matrix"
+msgstr "unzulässig gestaltete 'instPkgs' Matrix"
 
 msgid "no installed packages for (invalid?) 'lib.loc=%s'"
 msgstr "keine installierten Pakete für (falsche?) 'lib.loc=%s'"
@@ -602,37 +610,37 @@ msgid "no new packages are available"
 msgstr "keine neuen Pakete verfügbar"
 
 msgid "metadata of %s is corrupt"
-msgstr "Metadaten für %s sind korrumpiert"
+msgstr "Metadaten für %s sind beschädigt"
 
 msgid "'priority' must be character or NULL"
-msgstr "'priority' muss ein Zeichen oder NULL sein"
+msgstr "'priority' muss eine Zeichenkette oder NULL sein"
 
 msgid "Updating HTML index of packages in '.Library'"
-msgstr "Aktualisiere HTML Index der Pakete in '.Library'"
+msgstr "Aktualisiere HTML-Index der Pakete in '.Library'"
 
 msgid "'destdir' is not a directory"
 msgstr "'destdir' ist kein Verzeichnis"
 
 msgid "no package %s at the repositories"
-msgstr "kein Paket %s in den Repostories"
+msgstr "kein Paket %s in den Repositories"
 
 msgid "package %s does not exist on the local repository"
-msgstr "Paket %s exisitiert nicht in lokalem Repository"
+msgstr "Paket %s existiert nicht in lokalem Repository"
 
 msgid "download of package %s failed"
 msgstr "Download von Paket %s fehlgeschlagen"
 
 msgid "--- Please select a CRAN mirror for use in this session ---"
-msgstr "--- Bitte einen CRAN Spiegel für diese Sitzung auswählen ---"
+msgstr "--- Bitte einen CRAN-Spiegelserver für diese Sitzung auswählen ---"
 
 msgid "trying to use CRAN without setting a mirror"
 msgstr "versuche CRAN ohne einen Spiegelserver zu nutzen"
 
 msgid "cannot choose a CRAN mirror non-interactively"
-msgstr "kann keinen CRAN-Spiegel nicht-interaktiv nutzen"
+msgstr "kann keinen CRAN-Spiegelserver nicht-interaktiv nutzen"
 
 msgid "cannot choose a BioC mirror non-interactively"
-msgstr "kann keinen BioC-Spiegel nicht-interaktiv wählen"
+msgstr "kann keinen BioC-Spiegelserver nicht-interaktiv wählen"
 
 msgid "cannot set repositories non-interactively"
 msgstr "kann keine Repositories nicht-interaktiv setzen"
@@ -656,6 +664,9 @@ msgstr ""
 "Weiß nicht in welches Element von 'lib' die Abhängigkeiten installiert "
 "werden sollen; überspringe Abhängigkeiten"
 
+msgid "type 'binary' is not supported on this platform"
+msgstr "Type 'binary' ist auf dieser Plattform nicht unterstützt"
+
 msgid "no packages were specified"
 msgstr "keine Pakete angegeben"
 
@@ -668,8 +679,11 @@ msgstr "kann keine Pakete installieren"
 msgid "unable to create %s"
 msgstr "kann %s nicht erzeugen"
 
-msgid "inferring 'repos = NULL' from the file name"
-msgstr "leite 'repos = NULL' aus dem Dateinamen ab"
+msgid "inferring 'repos = NULL' from 'pkgs'"
+msgstr "leite 'repos = NULL' aus 'pkgs' ab"
+
+msgid "unable to create temporary directory %s"
+msgstr "kann temporäres Verzeichnis %s nicht erzeugen"
 
 msgid ""
 "type == \"both\" can only be used on Windows or a CRAN build for Mac OS X"
@@ -677,12 +691,6 @@ msgstr ""
 "type == \"both\" kann nur unter Windows oder einem CRAN-build für MacOS\n"
 "X benutzt werden"
 
-msgid ""
-"type == \"both\" cannot be used if 'available' or 'contriburl' is specified"
-msgstr ""
-"type == \"both\" kann nicht benutzt werden, wenn 'available' oder\n"
-"'contriburl' angegeben wurde"
-
 msgid "type == \"both\" cannot be used with 'repos = NULL'"
 msgstr "type == \"both\" kann nicht mit 'repos = NULL' benutzt werden"
 
@@ -693,20 +701,20 @@ msgid "source repository is unavailable to check versions"
 msgstr "Quelltextrepository nicht verfügbar um Versionen zu überprüfen"
 
 msgid "cannot install MacOS X binary packages on Windows"
-msgstr "kann keine MacOS X Binaries auf Windows installieren"
+msgstr "kann keine MacOS-X-Binaries auf Windows installieren"
 
 msgid "cannot install MacOS X binary packages on this platform"
-msgstr "kann keine MacOS X Binaries auf dieser Plattform installieren"
+msgstr "kann keine MacOS-X-Binaries auf dieser Plattform installieren"
 
 msgid "cannot install Windows binary packages on this platform"
-msgstr "kann keine Windows Binaries auf dieser Plattform installieren"
+msgstr "kann keine Windows-Binaries auf dieser Plattform installieren"
 
 msgid ""
 "This version of R is not set up to install source packages\n"
 "If it was installed from an RPM, you may need the R-devel RPM"
 msgstr ""
 "Diese Version von R ist nicht vorbereitet, um Source-Pakete zu installieren\n"
-"Wenn es  aus einem RPM installiert wurde, benötigen Sie evtl. das R-devel RPM"
+"Wenn es aus einem RPM installiert wurde, benötigen Sie evtl. das R-devel RPM"
 
 msgid "system (cmd0): %s"
 msgstr "System (cmd0): %s"
@@ -714,9 +722,6 @@ msgstr "System (cmd0): %s"
 msgid "installation of package %s had non-zero exit status"
 msgstr "Installation des Pakets %s hatte Exit-Status ungleich 0"
 
-msgid "unable to create temporary directory %s"
-msgstr "kann temporäres Verzeichnis %s nicht erzeugen"
-
 msgid "foundpkgs: %s"
 msgstr "foundpkgs: %s"
 
@@ -741,14 +746,14 @@ msgid ""
 "The namespace for package \"%s\" is locked; no changes in the global "
 "variables list may be made."
 msgstr ""
-"Der Namensraum für Paket \"%s\" ist geschlossen; Es können keine\n"
+"Der Namensraum für Paket \"%s\" ist gesperrt; Es sind keine\n"
 "Änderungen in der globalen Variablenliste möglich."
 
 msgid "'env' must be an environment"
 msgstr "'env' muss eine Umgebung sein"
 
 msgid "no object named '%s' to show"
-msgstr "kein Objket namens '%s' anzuzeigen"
+msgstr "kein Objekt namens '%s' anzuzeigen"
 
 msgid "'file' must be \"\" or an open connection object"
 msgstr "'file' muss \"\" oder eine bereits geöffnetes Verbindungsobjekt sein"
@@ -768,32 +773,37 @@ msgstr "Datei namens %s erzeugt."
 msgid "Edit the file and move it to the appropriate directory."
 msgstr "Bearbeite die Datei und verschiebe sie in das geeignete Verzeichnis."
 
+msgid "cannot determine import name"
+msgstr "kann keinen Importnamen bestimmen"
+
 msgid "no documentation of type %s and topic %s (or error in processing help)"
 msgstr ""
-"keine Doku des Typs %s zum Thema %s (oder Fehler in der Hilfeverarbeitung)"
+"keine Dokumentation des Typs %s zum Thema %s (oder Fehler in der "
+"Hilfeverarbeitung)"
 
 msgid ""
 "the object of class %s in the function call %s could not be used as a "
 "documentation topic"
 msgstr ""
-"das Objekt der Klasse %s im Funktionsaufruf %s konnte nicht als Doku-Thema "
-"benutzt werden"
+"das Objekt der Klasse %s im Funktionsaufruf %s konnte nicht als "
+"Dokumentations-Thema benutzt werden"
 
 msgid "no methods for %s and no documentation for it as a function"
 msgstr ""
-"keine Methoden für %s und keine Doku darüber, es als Funktion zu nutzen"
+"keine Methoden für %s und keine Dokumentation darüber, es als Funktion zu "
+"nutzen"
 
 msgid "error in trying to evaluate the expression for argument %s (%s)"
 msgstr "Fehler beim Versuch den Ausdruck für Argument %s (%s) auszuwerten"
 
 msgid "no method defined for function %s and signature %s"
-msgstr "keine Methode für Funktion %s und  Signatur %s definiert"
+msgstr "keine Methode für Funktion %s und Signatur %s definiert"
 
 msgid "no documentation for function %s and signature %s"
-msgstr "keine Doku für Funktion %s und Signatur %s"
+msgstr "keine Dokumentation für Funktion %s und Signatur %s"
 
 msgid "No DIF data on clipboard"
-msgstr "Keine DIF Daten im Clipboard"
+msgstr "Keine DIF-Daten im Clipboard"
 
 msgid "file had no lines"
 msgstr "Datei hat keine Zeilen"
@@ -802,13 +812,15 @@ msgid "row and column counts not found"
 msgstr "Zeilen und Spaltenzahlen nicht gefunden"
 
 msgid "More rows than specified in header; maybe use 'transpose=TRUE'"
-msgstr "mehr Zeilen als im Kopf spezifiziert; evtl 'transpose=TRUE'?"
+msgstr ""
+"mehr Zeilen als im Kopf der Datei spezifiziert; evtl. 'transpose=TRUE'?"
 
 msgid "Unrecognized special data value"
 msgstr "Unerkannte spezielle Datenwerte"
 
 msgid "More columns than specified in header; maybe use 'transpose=TRUE'"
-msgstr "mehr Spalten als im Kopf spezifiziert; evtl. 'transpose=TRUE'?"
+msgstr ""
+"mehr Spalten als im Kopf der Datei spezifiziert; evtl. 'transpose=TRUE'?"
 
 msgid "Unrecognized value indicator"
 msgstr "Unbekannter Wertindikator"
@@ -829,13 +841,13 @@ msgid "rows are empty: giving up"
 msgstr "Zeilen sind leer: gebe auf"
 
 msgid "not all columns named in 'colClasses' exist"
-msgstr "nicht alle Spalten in 'colClasses' exisitieren"
+msgstr "nicht alle Spalten in 'colClasses' existieren"
 
 msgid "invalid numeric 'as.is' expression"
 msgstr "ungültige numerische 'as.is' Expression"
 
 msgid "not all columns named in 'as.is' exist"
-msgstr "nicht alle in 'as.is' benannten Spalten exisitieren"
+msgstr "nicht alle in 'as.is' benannten Spalten existieren"
 
 msgid "'as.is' has the wrong length %d  != cols = %d"
 msgstr "'as.is' hat die falsche Länge %d != cols = %d"
@@ -844,7 +856,7 @@ msgid "invalid 'row.names' specification"
 msgstr "ungültige 'row.names' Spezifikation"
 
 msgid "invalid 'row.names' length"
-msgstr "ungültige 'roe.names' Länge"
+msgstr "ungültige 'row.names' Länge"
 
 msgid "duplicate 'row.names' are not allowed"
 msgstr "doppelte 'row.names' sind nicht zulässig"
@@ -883,10 +895,11 @@ msgid ""
 "Either ensure you unlist a relistable object, or specify the skeleton "
 "separately."
 msgstr ""
-"Entweder ein wiedr listbares Objekt entlisten oder ein Gerüst separat angeben"
+"Entweder ein wieder-listbares Objekt entlisten oder ein Gerüst separat "
+"angeben"
 
 msgid "cannot coerce 'x' to roman"
-msgstr "kann 'x' nicht nach Roman unwandeln"
+msgstr "kann 'x' nicht nach in römische Zahl unwandeln"
 
 msgid "Could not create file %s, aborting"
 msgstr "Konnte Datei %s nicht erzeugen, abgebrochen"
@@ -901,17 +914,18 @@ msgid "'port' must be integer of length 1"
 msgstr "'port' muss ganze Zahl der Länge 1 sein"
 
 msgid "'host' must be character of length 1"
-msgstr "'host' muss Charakter der Länge 1 sein"
+msgstr "'host' muss Zeichenkette der Länge 1 sein"
 
 msgid "can only receive calls on local machine"
-msgstr "kann Aufrufe nur auf der lokalen Maschiene entgegennehmen"
+msgstr "kann Aufrufe nur auf der lokalen Maschine entgegennehmen"
 
 msgid "socket not established"
 msgstr "socket nicht etabliert"
 
 msgid "str.data.frame() called with non-data.frame -- coercing to one."
 msgstr ""
-"str.data.frame() mit nicht-Data-Frame aufgerufen --- umwandeln in einen."
+"str.data.frame() nicht mit einem data.frame aufgerufen -- umgewandelt in einen "
+"solchen."
 
 msgid "invalid options(\"str\") -- using defaults instead"
 msgstr "ungültige options(\"str\") -- nutze stattdessen Standard"
@@ -930,10 +944,10 @@ msgstr ""
 "'digits' und 'digits.d' sind beide angegeben und das letztere wird ignoriert"
 
 msgid "no lines found in %s"
-msgstr "kein Zeilen in  '%s'"
+msgstr "keine Zeilen in '%s'"
 
 msgid "profile does not contain memory information"
-msgstr "Profil einthält keine Speicherinformation"
+msgstr "Profil enthält keine Speicherinformation"
 
 msgid "profile does not contain line information"
 msgstr "Profil enthält keine Zeileninformation"
@@ -945,7 +959,7 @@ msgid "invalid 'tarfile' argument"
 msgstr "unzulässiges 'tarfile' Argument"
 
 msgid "'compressed' must be logical or character"
-msgstr "'commpressed' muss Boole'sch oder ein Charakter sein"
+msgstr "'compressed' muss boolesch oder eine Zeichenkette sein"
 
 msgid "failed to create directory %s"
 msgstr "kann Verzeichnis '%s' nicht erzeugen"
@@ -960,7 +974,7 @@ msgid "incomplete block on file"
 msgstr "unvollständiger Block in Datei"
 
 msgid "invalid name field in tarball"
-msgstr "ungültiger Name im Tar-Paket"
+msgstr "ungültiger Name in tar-Datei"
 
 msgid "checksum error for entry '%s'"
 msgstr "Checksummenfehler für Eintrag '%s'"
@@ -981,10 +995,10 @@ msgid "file size is limited to 8GB"
 msgstr "Dateigröße limitiert auf 8GB"
 
 msgid "invalid uid value replaced by that for user 'nobody'"
-msgstr "ungültiger uid Wert durch den für 'nobody' ersetzt "
+msgstr "ungültiger Wert für uid durch den für 'nobody' ersetzt "
 
 msgid "invalid gid value replaced by that for user 'nobody'"
-msgstr "ungültiger gid Wert durch den für 'nobody' ersetzt "
+msgstr "ungültiger Wert für gid durch den für den Nutzer 'nobody' ersetzt "
 
 msgid ""
 "vignette %s found more than once,\n"
@@ -1006,7 +1020,7 @@ msgid "select.list() cannot be used non-interactively"
 msgstr "select.list() kann nicht nicht-interaktiv benutzt werden"
 
 msgid "'title' must be NULL or a length-1 character vector"
-msgstr "'title' muss NULL oder ein Charaktervektor mit Länge 1 sein"
+msgstr "'title' muss NULL oder ein Zeichenkettenvektor mit Länge 1 sein"
 
 msgid ""
 "Enter one or more numbers separated by spaces, or an empty line to cancel"
@@ -1039,17 +1053,17 @@ msgid "attempt to set '%s' ignored"
 msgstr "Versuch ignoriert '%s' zu setzen"
 
 msgid "'unzip' must be a single character string"
-msgstr "'unzip' muss ein einzelne Zeichenkette sein"
+msgstr "'unzip' muss eine einzelne Zeichenkette sein"
 
 msgid "'files' must a character vector specifying one or more filepaths"
 msgstr ""
-"'files' muss ein Charaktervektor sein, der einen oder mehrere Pfade "
+"'files' muss ein Zeichenkettenvektor sein, der einen oder mehrere Pfade "
 "spezifiziert"
 
 msgid ""
 "cannot find program to open 'mailto:' URIs: reverting to 'method=\"none\"'"
 msgstr ""
-"kein programm um 'mailto' URIs zu öffnen: rückfall auf 'method=\"none\"'"
+"kein Programm um 'mailto' URIs zu öffnen: Rückfall auf 'method=\"none\"'"
 
 msgid "Using the browser to open a mailto: URI"
 msgstr "Nutze Browser, um mailto: URI zu öffnen"
@@ -1061,13 +1075,16 @@ msgid "'subject' is missing"
 msgstr "'subject' fehlt"
 
 msgid "'ccaddress' must be of length 1"
-msgstr "'ccaddress' muss von der Länge 1 sein"
+msgstr "'ccaddress' muss die Länge 1 haben"
 
 msgid "no download method found"
 msgstr "keine Downloadmethode gefunden"
 
-msgid "method 'lynx' is untested and deprecated as from R 3.1.0"
-msgstr "Methode 'lynx' ist ugetestet und ab R 3.1.0 veraltet"
+msgid "'url' must be a length-one character vector"
+msgstr "'url' muss ein Zeichenkettenvektor mit Länge 1 sein"
+
+msgid "'destfile' must be a length-one character vector"
+msgstr "'destfile' muss ein Zeichenkettenvektor mit Länge 1 sein"
 
 msgid "download had nonzero exit status"
 msgstr "Download hatte Exit-Status ungleich 0"
@@ -1076,7 +1093,7 @@ msgid "'tar' returned non-zero exit code %d"
 msgstr "'tar' hatte Exit-Status %d"
 
 msgid "file %s is not an OS X binary package"
-msgstr "Datei %s ist kein OS X Binärpaket"
+msgstr "Datei %s ist kein OS-X-Binärpaket"
 
 msgid "package %s successfully unpacked and MD5 sums checked"
 msgstr "Paket %s erfolgreich ausgepackt und MD5 Summen abgeglichen"
@@ -1085,7 +1102,7 @@ msgid ""
 "ERROR: failed to lock directory %s for modifying\n"
 "Try removing %s"
 msgstr ""
-"ERROR: Verzeichnis-Lock für %s für Änderung fehlgeschlagen<\n"
+"ERROR: Verzeichnis-Lock für %s für Änderung fehlgeschlagen\n"
 "Versuche %s zu entfernen"
 
 msgid "ERROR: failed to create lock directory %s"
@@ -1116,13 +1133,8 @@ msgstr "'memory.limit()' ist spezifisch für Windows"
 msgid "method 'mailx' is Unix-only"
 msgstr "Methode 'mailx' nur unter UNIX"
 
-msgid ""
-"If nothing happens, you should open\n"
-"%s yourself"
-msgstr "Wenn nichts passiert, sollten Sie %s selbst öffnen"
-
 msgid "zip file %s not found"
-msgstr "Zipfile %s nicht gefunden"
+msgstr "Zip-Datei %s nicht gefunden"
 
 msgid "failed to create %s"
 msgstr "Erzeugen von %s fehlgeschlagen"
@@ -1130,12 +1142,20 @@ msgstr "Erzeugen von %s fehlgeschlagen"
 msgid "there is no 'libs' directory in package %s"
 msgstr "kein 'libs' Verzeichnis im Paket %s"
 
+msgid "Only '*.zip' and '*.tar.gz' files can be installed."
+msgstr "Nur '*.zip' und '*.tar.gz' Dateien können installiert werden."
+
 msgid "winDialog() cannot be used non-interactively"
 msgstr "winDialog() kann nicht nicht-interaktiv genutzt werden"
 
 msgid "winDialogString() cannot be used non-interactively"
 msgstr "winDialogString() kann nicht nicht-interaktiv genutzt werden"
 
+msgid "%d Sweave file for basename %s found"
+msgid_plural "%d Sweave files for basename %s found"
+msgstr[0] "%d Sweave-Datei für Basisnamen %s gefunden"
+msgstr[1] "%d Sweave-Dateien für Basisnamen %s gefunden"
+
 msgid "%d occurrence in %s"
 msgid_plural "%d occurrences in %s"
 msgstr[0] "%d Vorkommen in %s"
@@ -1179,10 +1199,10 @@ msgstr[1] ""
 "Entferne Pakete von %s\n"
 "(da %s nicht spezifiziert)"
 
-msgid "package %s is not available (for %s)"
-msgid_plural "packages %s are not available (for %s)"
-msgstr[0] "Paket %s ist nicht verfügbar (für %s)"
-msgstr[1] "Pakete %s sind nicht verfügbar (für %s)"
+msgid "package %s is not available (%s)"
+msgid_plural "packages %s are not available (%s)"
+msgstr[0] "Paket %s ist nicht verfügbar (%s)"
+msgstr[1] "Pakete %s sind nicht verfügbar (%s)"
 
 msgid "dependency %s is not available"
 msgid_plural "dependencies %s are not available"
@@ -1209,7 +1229,7 @@ msgstr[1] ""
 
 msgid "'lib' element %s is not a writable directory"
 msgid_plural "'lib' elements %s are not writable directories"
-msgstr[0] "'lib' Element %s ist keine schreibbares Verzeichnis"
+msgstr[0] "'lib' Element %s ist kein schreibbares Verzeichnis"
 msgstr[1] "'lib' Elemente %s sind keine schreibbaren Verzeichnisse"
 
 msgid "There is a binary version available but the source version is later"
@@ -1218,25 +1238,23 @@ msgid_plural ""
 msgstr[0] "Es gibt eine Binärversion, jedoch ist der Quelltext neuer"
 msgstr[1] "Es gibt Binärversionen, jedoch sind die Quelltexte neuer"
 
-msgid "Do you want to install from sources the package which need compilation?"
+msgid ""
+"Do you want to install from sources the package which needs compilation?"
 msgid_plural ""
 "Do you want to install from sources the packages which need compilation?"
-msgstr[0] ""
-"Möchten Sie versuchen, das Paket aus den Quelltexten\n"
-"zu installieren, welches eine Kompilierung erfordert?"
+msgstr[0] "Möchten Sie versuchen, das Paket, welches eine Kompilierung erfordert,"
+" aus den Quelltexten zu installieren?"
 msgstr[1] ""
-"Möchten Sie versuchen, die Paktete aus den Quelltexten\n"
-"zu installieren, welche eine Kompilierung erfordern?"
+"Möchten Sie versuchen, die Pakete, welche eine Kompilierung erfordern,"
+" aus den Quelltexten zu installieren?"
 
 msgid ""
-"Package which are only available in source form, and may need compilation of "
+"Package which is only available in source form, and may need compilation of "
 "C/C++/Fortran"
 msgid_plural ""
 "Packages which are only available in source form, and may need compilation "
 "of C/C++/Fortran"
-msgstr[0] ""
-"Paket, das nur als Quelltext vorliegt und eventuell Übersetzung von C/C++/"
-"Fortran benötigt."
+msgstr[0] "Paket, das nur als Quelltext vorliegt und eventuell Übersetzung von C/C++/Fortran benötigt."
 msgstr[1] ""
 "Pakete, die nur als Quelltext vorliegen und eventuell Übersetzung von C/C++/"
 "Fortran benötigen."
@@ -1278,7 +1296,28 @@ msgstr[1] "ungültige römische Zahlen: %s"
 msgid "package %s is in use and will not be installed"
 msgid_plural "packages %s are in use and will not be installed"
 msgstr[0] "Paket %s wird gerade benutzt und deshab nicht installiert"
-msgstr[1] "Pakete %s werden gerade bennutzt und deshalb nicht installiert"
+msgstr[1] "Pakete %s werden gerade benutzt und deshalb nicht installiert"
+
+#~ msgid ","
+#~ msgstr ","
+
+#~ msgid ""
+#~ "type == \"both\" cannot be used if 'available' or 'contriburl' is "
+#~ "specified"
+#~ msgstr ""
+#~ "type == \"both\" kann nicht benutzt werden, wenn 'available' oder\n"
+#~ "'contriburl' angegeben wurde"
+
+#~ msgid "method 'lynx' is untested and deprecated as from R 3.1.0"
+#~ msgstr "Methode 'lynx' ist ugetestet und ab R 3.1.0 veraltet"
+
+#~ msgid ""
+#~ "If nothing happens, you should open\n"
+#~ "'%s' yourself"
+#~ msgstr "Wenn nichts passiert, sollten Sie '%s' selbst öffnen"
+
+#~ msgid "test '%s' is not available"
+#~ msgstr "test '%s' ist nicht verfügbar"
 
 #~ msgid "broken installation, no CITATION file in the base package."
 #~ msgstr "defekte installation, keine Datei CITATION im Base-Paket"
@@ -1353,9 +1392,6 @@ msgstr[1] "Pakete %s werden gerade bennutzt und deshalb nicht installiert"
 #~ msgid "not found"
 #~ msgstr " nicht gefunden"
 
-#~ msgid ","
-#~ msgstr ","
-
 #~ msgid "HTTPUserAgent"
 #~ msgstr "HTTPUserAgent"
 
@@ -1643,3 +1679,11 @@ msgstr[1] "Pakete %s werden gerade bennutzt und deshalb nicht installiert"
 #~ msgstr ""
 #~ "Optional andere Standardschlüsselwörter, eines pro Zeile aus der Datei "
 #~ "KEYWORDS im R Doku Verzeichnis"
+
+#~ msgid "at"
+#~ msgstr "an"
+
+#~ msgid "is"
+#~ msgid_plural "are"
+#~ msgstr[0] "ist"
+#~ msgstr[1] "sind"
diff --git a/src/library/utils/po/R-fa.po b/src/library/utils/po/R-fa.po
index 730f734..fda1b0b 100644
--- a/src/library/utils/po/R-fa.po
+++ b/src/library/utils/po/R-fa.po
@@ -7,7 +7,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: R 2.15.1\n"
 "Report-Msgid-Bugs-To: bugs.r-project.org\n"
-"POT-Creation-Date: 2014-02-27 17:14\n"
+"POT-Creation-Date: 2016-04-01 09:50\n"
 "PO-Revision-Date: 2012-12-30 23:32+0330\n"
 "Last-Translator: Seyed Mahmood Taghavi Shahri <taghavi_m at razi.tums.ac.ir>\n"
 "Language-Team: Persian\n"
@@ -40,9 +40,6 @@ msgstr ""
 msgid "no Sweave file with name %s found"
 msgstr ""
 
-msgid "%d Sweave files for basename %s found"
-msgstr ""
-
 msgid "more than one syntax specification found, using the first one"
 msgstr ""
 
@@ -63,6 +60,9 @@ msgid ""
 "%s"
 msgstr ""
 
+msgid "Warning: unknown option '--clean='%s"
+msgstr ""
+
 msgid "Warning: unknown option %s"
 msgstr ""
 
@@ -252,6 +252,14 @@ msgstr ""
 msgid "did not assign() anything"
 msgstr ""
 
+msgid ""
+"Cannot debug primitive functions unless they are implicit generics (requires "
+"loading the methods package)"
+msgstr ""
+
+msgid "error in trying to evaluate the expression for argument %s (%s)"
+msgstr ""
+
 msgid "Browsing in the environment with call:"
 msgstr ""
 
@@ -320,9 +328,6 @@ msgstr ""
 msgid "%s has a help file but no examples"
 msgstr ""
 
-msgid "test '%s' is not available"
-msgstr ""
-
 msgid "Line number missing"
 msgstr ""
 
@@ -408,25 +413,25 @@ msgstr ""
 msgid "do not know what to search"
 msgstr ""
 
-msgid "incorrect type specification"
+msgid "argument 'help.db' is deprecated"
 msgstr ""
 
-msgid "argument 'help.db' is deprecated"
+msgid "incorrect type specification"
 msgstr ""
 
-msgid "could not find package %s"
+msgid "no information in the database for package %s: need 'rebuild = TRUE'?"
 msgstr ""
 
-msgid "package %s has empty hsearch data - strangely"
+msgid "incorrect 'agrep' specification"
 msgstr ""
 
-msgid "removing all entries with invalid multi-byte character data"
+msgid "could not find package %s"
 msgstr ""
 
-msgid "no information in the database for package %s: need 'rebuild = TRUE'?"
+msgid "package %s has empty hsearch data - strangely"
 msgstr ""
 
-msgid "incorrect 'agrep' specification"
+msgid "removing all entries with invalid multi-byte character data"
 msgstr ""
 
 msgid "invalid browser name, check options(\"browser\")."
@@ -437,7 +442,7 @@ msgstr ""
 
 msgid ""
 "If nothing happens, you should open\n"
-"'%s' yourself"
+"%s yourself"
 msgstr ""
 
 msgid ""
@@ -491,10 +496,12 @@ msgstr ""
 msgid "no function '%s' is visible"
 msgstr ""
 
-msgid "function '%s' appears not to be generic"
+msgid "generic function '%s' dispatches methods for generic '%s'"
 msgstr ""
 
-msgid "generic function '%s' dispatches methods for generic '%s'"
+msgid ""
+"function '%s' appears not to be S3 generic; found functions that look like "
+"S3 methods"
 msgstr ""
 
 msgid "must supply 'generic.function' or 'class'"
@@ -547,6 +554,11 @@ msgstr ""
 msgid "invalid 'filters' argument."
 msgstr ""
 
+msgid ""
+"specifying 'contriburl' or 'available' requires a single type, not type = "
+"\"both\""
+msgstr ""
+
 msgid "package '%s' in library '%s' will not be updated"
 msgstr ""
 
@@ -590,10 +602,16 @@ msgstr "--- را انتخاب نمایید CRAN لطفا برای این جلس
 msgid "trying to use CRAN without setting a mirror"
 msgstr "بدون انتخاب کردن نمایندگی CRAN تلاش برای استفاده از"
 
-msgid "cannot choose a CRAN mirror non-interactively"
+msgid "'download.file()' error code '%d'"
 msgstr ""
 
-msgid "cannot choose a BioC mirror non-interactively"
+msgid "failed to download mirrors file (%s); using local file '%s'"
+msgstr ""
+
+msgid "cannot choose a"
+msgstr ""
+
+msgid "mirror non-interactively"
 msgstr ""
 
 msgid "cannot set repositories non-interactively"
@@ -616,6 +634,9 @@ msgid ""
 "skipping dependencies"
 msgstr ""
 
+msgid "type 'binary' is not supported on this platform"
+msgstr ""
+
 msgid "no packages were specified"
 msgstr ""
 
@@ -628,15 +649,14 @@ msgstr ""
 msgid "unable to create %s"
 msgstr ""
 
-msgid "inferring 'repos = NULL' from the file name"
+msgid "inferring 'repos = NULL' from 'pkgs'"
 msgstr ""
 
-msgid ""
-"type == \"both\" can only be used on Windows or a CRAN build for Mac OS X"
+msgid "unable to create temporary directory %s"
 msgstr ""
 
 msgid ""
-"type == \"both\" cannot be used if 'available' or 'contriburl' is specified"
+"type == \"both\" can only be used on Windows or a CRAN build for Mac OS X"
 msgstr ""
 
 msgid "type == \"both\" cannot be used with 'repos = NULL'"
@@ -668,9 +688,6 @@ msgstr ""
 msgid "installation of package %s had non-zero exit status"
 msgstr ""
 
-msgid "unable to create temporary directory %s"
-msgstr ""
-
 msgid "foundpkgs: %s"
 msgstr ""
 
@@ -716,6 +733,9 @@ msgstr ""
 msgid "Edit the file and move it to the appropriate directory."
 msgstr ""
 
+msgid "cannot determine import name"
+msgstr ""
+
 msgid "no documentation of type %s and topic %s (or error in processing help)"
 msgstr ""
 
@@ -727,9 +747,6 @@ msgstr ""
 msgid "no methods for %s and no documentation for it as a function"
 msgstr ""
 
-msgid "error in trying to evaluate the expression for argument %s (%s)"
-msgstr ""
-
 msgid "no method defined for function %s and signature %s"
 msgstr ""
 
@@ -870,6 +887,9 @@ msgstr ""
 msgid "'digits' and 'digits.d' are both specified and the latter is not used"
 msgstr ""
 
+msgid "number of matches does not always match ncol(proto)"
+msgstr ""
+
 msgid "no lines found in %s"
 msgstr ""
 
@@ -997,10 +1017,10 @@ msgstr ""
 msgid "'ccaddress' must be of length 1"
 msgstr ""
 
-msgid "no download method found"
+msgid "'url' must be a length-one character vector"
 msgstr ""
 
-msgid "method 'lynx' is untested and deprecated as from R 3.1.0"
+msgid "'destfile' must be a length-one character vector"
 msgstr ""
 
 msgid "download had nonzero exit status"
@@ -1046,11 +1066,6 @@ msgstr ""
 msgid "method 'mailx' is Unix-only"
 msgstr ""
 
-msgid ""
-"If nothing happens, you should open\n"
-"%s yourself"
-msgstr ""
-
 msgid "zip file %s not found"
 msgstr ""
 
@@ -1060,12 +1075,20 @@ msgstr ""
 msgid "there is no 'libs' directory in package %s"
 msgstr ""
 
+msgid "Only '*.zip' and '*.tar.gz' files can be installed."
+msgstr ""
+
 msgid "winDialog() cannot be used non-interactively"
 msgstr ""
 
 msgid "winDialogString() cannot be used non-interactively"
 msgstr ""
 
+msgid "%d Sweave file for basename %s found"
+msgid_plural "%d Sweave files for basename %s found"
+msgstr[0] ""
+msgstr[1] ""
+
 msgid "%d occurrence in %s"
 msgid_plural "%d occurrences in %s"
 msgstr[0] ""
@@ -1105,8 +1128,14 @@ msgid_plural ""
 msgstr[0] ""
 msgstr[1] ""
 
-msgid "package %s is not available (for %s)"
-msgid_plural "packages %s are not available (for %s)"
+#, fuzzy
+msgid "package %s is not available (%s)"
+msgid_plural "packages %s are not available (%s)"
+msgstr[0] "که پیش‌نیاز است در دسترس نمی‌باشد %s بسته"
+msgstr[1] "که پیش‌نیاز هستند در دسترس نمی‌باشند %s بسته‌های"
+
+msgid "package %s is a base package, and should not be updated"
+msgid_plural "packages %s are base packages, and should not be updated"
 msgstr[0] ""
 msgstr[1] ""
 
@@ -1140,14 +1169,15 @@ msgid_plural ""
 msgstr[0] ""
 msgstr[1] ""
 
-msgid "Do you want to install from sources the package which need compilation?"
+msgid ""
+"Do you want to install from sources the package which needs compilation?"
 msgid_plural ""
 "Do you want to install from sources the packages which need compilation?"
 msgstr[0] ""
 msgstr[1] ""
 
 msgid ""
-"Package which are only available in source form, and may need compilation of "
+"Package which is only available in source form, and may need compilation of "
 "C/C++/Fortran"
 msgid_plural ""
 "Packages which are only available in source form, and may need compilation "
diff --git a/src/library/utils/po/R-fr.po b/src/library/utils/po/R-fr.po
index 21df43b..57e764e 100644
--- a/src/library/utils/po/R-fr.po
+++ b/src/library/utils/po/R-fr.po
@@ -7,7 +7,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: R 2.12.0\n"
 "Report-Msgid-Bugs-To: bugs.r-project.org\n"
-"POT-Creation-Date: 2014-02-27 17:14\n"
+"POT-Creation-Date: 2016-04-01 09:50\n"
 "PO-Revision-Date: 2014-03-17 11:04+0100\n"
 "Last-Translator: Philippe Grosjean <phgrosjean at sciviews.org>\n"
 "Language-Team: French <R-core at r-project.org>\n"
@@ -44,9 +44,6 @@ msgstr "r
 msgid "no Sweave file with name %s found"
 msgstr "un fichier Sweave de nom %s est introuvable"
 
-msgid "%d Sweave files for basename %s found"
-msgstr "%d fichiers Sweave trouv�s pour le nom de base %s"
-
 msgid "more than one syntax specification found, using the first one"
 msgstr ""
 "plusieurs sp�cifications de syntaxe possibles ; la premi�re est utilis�e"
@@ -70,6 +67,10 @@ msgstr ""
 "erreur d'interpr�tation ou option vide dans\n"
 "%s"
 
+#, fuzzy
+msgid "Warning: unknown option '--clean='%s"
+msgstr "Avis : option inconnue %s"
+
 msgid "Warning: unknown option %s"
 msgstr "Avis : option inconnue %s"
 
@@ -278,6 +279,15 @@ msgstr "impossible de restaurer les variables correctement"
 msgid "did not assign() anything"
 msgstr "rien n'a �t� assign()�"
 
+msgid ""
+"Cannot debug primitive functions unless they are implicit generics (requires "
+"loading the methods package)"
+msgstr ""
+
+msgid "error in trying to evaluate the expression for argument %s (%s)"
+msgstr ""
+"erreur lors de la tentative d'�valuation d'expression pour l'argument %s (%s)"
+
 msgid "Browsing in the environment with call:"
 msgstr "Navigation dans l'environnement avec l'appel :"
 
@@ -351,9 +361,6 @@ msgstr "fichier d'aide introuvable pour %s"
 msgid "%s has a help file but no examples"
 msgstr "%s a un fichier d'aide associ�, mais pas d'exemples"
 
-msgid "test '%s' is not available"
-msgstr "le test '%s' n'est pas disponible"
-
 msgid "Line number missing"
 msgstr "Num�ro de ligne manquant"
 
@@ -448,11 +455,19 @@ msgstr "sp
 msgid "do not know what to search"
 msgstr "je ne sais pas quoi rechercher"
 
+msgid "argument 'help.db' is deprecated"
+msgstr "l'argument 'help.db' est obsol�te"
+
 msgid "incorrect type specification"
 msgstr "sp�cification de type incorrecte"
 
-msgid "argument 'help.db' is deprecated"
-msgstr "l'argument 'help.db' est obsol�te"
+msgid "no information in the database for package %s: need 'rebuild = TRUE'?"
+msgstr ""
+"pas d'information dans la base de donn�es pour le package %s : faut-il "
+"'rebuild = TRUE' ?"
+
+msgid "incorrect 'agrep' specification"
+msgstr "sp�cification 'agrep' incorrecte"
 
 msgid "could not find package %s"
 msgstr "impossible de trouver le packages %s"
@@ -465,14 +480,6 @@ msgstr ""
 "suppression de toutes les entr�es ayant des donn�es de type caract�re multi-"
 "octets incorrectes"
 
-msgid "no information in the database for package %s: need 'rebuild = TRUE'?"
-msgstr ""
-"pas d'information dans la base de donn�es pour le package %s : faut-il "
-"'rebuild = TRUE' ?"
-
-msgid "incorrect 'agrep' specification"
-msgstr "sp�cification 'agrep' incorrecte"
-
 msgid "invalid browser name, check options(\"browser\")."
 msgstr "nom de navigateur incorrect, v�rifiez options(\"browser\")."
 
@@ -481,10 +488,10 @@ msgstr "help.start() n
 
 msgid ""
 "If nothing happens, you should open\n"
-"'%s' yourself"
+"%s yourself"
 msgstr ""
 "Si rien ne se passe, vous devrez ouvrir\n"
-"'%s' vous-m�me"
+"%s vous-m�me"
 
 msgid ""
 "If the browser launched by '%s' is already running, it is *not* restarted, "
@@ -542,12 +549,15 @@ msgstr ""
 msgid "no function '%s' is visible"
 msgstr "aucune fonction '%s' n'est visible"
 
-msgid "function '%s' appears not to be generic"
-msgstr "la fonction '%s' semble ne pas �tre g�n�rique"
-
 msgid "generic function '%s' dispatches methods for generic '%s'"
 msgstr "la fonction g�n�rique '%s' distribue les m�thodes g�n�riques '%s'"
 
+#, fuzzy
+msgid ""
+"function '%s' appears not to be S3 generic; found functions that look like "
+"S3 methods"
+msgstr "la fonction '%s' semble ne pas �tre g�n�rique"
+
 msgid "must supply 'generic.function' or 'class'"
 msgstr "il faut fournir 'generic.function' ou 'class'"
 
@@ -600,6 +610,11 @@ msgstr "impossible d'acc
 msgid "invalid 'filters' argument."
 msgstr "argument 'filters' incorrect."
 
+msgid ""
+"specifying 'contriburl' or 'available' requires a single type, not type = "
+"\"both\""
+msgstr ""
+
 msgid "package '%s' in library '%s' will not be updated"
 msgstr "le package '%s' dans la biblioth�que '%s' ne sera pas mis � jour"
 
@@ -645,11 +660,19 @@ msgstr "--- SVP s
 msgid "trying to use CRAN without setting a mirror"
 msgstr "essai d'utilisation de CRAN sans fixer un miroir"
 
-msgid "cannot choose a CRAN mirror non-interactively"
-msgstr "impossible de choisir un miroir CRAN en mode non interactif"
+#, fuzzy
+msgid "'download.file()' error code '%d'"
+msgstr "erreur de read.dcf() dans le fichier %s"
+
+msgid "failed to download mirrors file (%s); using local file '%s'"
+msgstr ""
 
-msgid "cannot choose a BioC mirror non-interactively"
-msgstr "impossible de choisir un miroir BioC en mode non interactif"
+msgid "cannot choose a"
+msgstr ""
+
+#, fuzzy
+msgid "mirror non-interactively"
+msgstr "impossible de choisir un miroir CRAN en mode non interactif"
 
 msgid "cannot set repositories non-interactively"
 msgstr "impossible de fixer les entrep�ts en mode non interactif"
@@ -673,6 +696,10 @@ msgstr ""
 "Je ne sais pas dans quel �l�ment de 'lib' installer les d�pendances\n"
 "d�pendances ignor�es"
 
+#, fuzzy
+msgid "type 'binary' is not supported on this platform"
+msgstr "seulement 'html = TRUE' est support� sur cette plateforme"
+
 msgid "no packages were specified"
 msgstr "aucun package sp�cifi�"
 
@@ -685,21 +712,19 @@ msgstr "impossible d'installer les packages"
 msgid "unable to create %s"
 msgstr "impossible de cr�er %s"
 
-msgid "inferring 'repos = NULL' from the file name"
+#, fuzzy
+msgid "inferring 'repos = NULL' from 'pkgs'"
 msgstr "supposition de 'repos = NULL' � partir du nom de fichier"
 
+msgid "unable to create temporary directory %s"
+msgstr "impossible de cr�er le r�pertoire temporaire %s"
+
 msgid ""
 "type == \"both\" can only be used on Windows or a CRAN build for Mac OS X"
 msgstr ""
 "type == \"both\" peut seulement �tre utilis� sous Windows ou une compilation "
 "Mac OS X CRAN"
 
-msgid ""
-"type == \"both\" cannot be used if 'available' or 'contriburl' is specified"
-msgstr ""
-"type == \"both\" ne peut �tre utilis� si 'available' ou 'contriburl' est "
-"fourni"
-
 msgid "type == \"both\" cannot be used with 'repos = NULL'"
 msgstr "type == \"both\" ne peut �tre utilis� avec 'repos = NULL'"
 
@@ -733,9 +758,6 @@ msgstr "system (cmd0) : %s"
 msgid "installation of package %s had non-zero exit status"
 msgstr "l'installation du package %s a eu un statut de sortie non nul"
 
-msgid "unable to create temporary directory %s"
-msgstr "impossible de cr�er le r�pertoire temporaire %s"
-
 msgid "foundpkgs: %s"
 msgstr "foundpkgs : %s"
 
@@ -787,6 +809,10 @@ msgstr "Cr
 msgid "Edit the file and move it to the appropriate directory."
 msgstr "Editez le fichier et d�placez-le dans le r�pertoire appropri�"
 
+#, fuzzy
+msgid "cannot determine import name"
+msgstr "impossible de trouver un nom utilisable"
+
 msgid "no documentation of type %s and topic %s (or error in processing help)"
 msgstr ""
 "pas de documentation de type %s et de th�me %s (ou erreur de traitement de "
@@ -804,10 +830,6 @@ msgstr ""
 "aucune m�thode pour %s et aucune documentation � son sujet en tant que "
 "fonction"
 
-msgid "error in trying to evaluate the expression for argument %s (%s)"
-msgstr ""
-"erreur lors de la tentative d'�valuation d'expression pour l'argument %s (%s)"
-
 msgid "no method defined for function %s and signature %s"
 msgstr "aucune m�thode d�finie pour la fonction %s et pour la signature %s"
 
@@ -956,6 +978,9 @@ msgid "'digits' and 'digits.d' are both specified and the latter is not used"
 msgstr ""
 "'digits' et 'digits.d' sont tous deux sp�cifi�s et le second est ignor�"
 
+msgid "number of matches does not always match ncol(proto)"
+msgstr ""
+
 msgid "no lines found in %s"
 msgstr "aucune ligne trouv�e dans %s"
 
@@ -1092,11 +1117,13 @@ msgstr "'subject' est manquant"
 msgid "'ccaddress' must be of length 1"
 msgstr "'ccaddress' doit �tre de longueur 1"
 
-msgid "no download method found"
-msgstr "impossible de trouver une m�thode de t�l�chargement"
+#, fuzzy
+msgid "'url' must be a length-one character vector"
+msgstr "'title' doit �tre NULL ou un vecteur de type caract�re de longueur 1"
 
-msgid "method 'lynx' is untested and deprecated as from R 3.1.0"
-msgstr "la m�thode 'lynx' est non test�e et d�pr�ci�e depuis R 3.1.0"
+#, fuzzy
+msgid "'destfile' must be a length-one character vector"
+msgstr "'title' doit �tre NULL ou un vecteur de type caract�re de longueur 1"
 
 msgid "download had nonzero exit status"
 msgstr "le t�l�chargement a a eu un statut de sortie non nul"
@@ -1147,13 +1174,6 @@ msgstr "'memory.limit()' est sp
 msgid "method 'mailx' is Unix-only"
 msgstr "la m�thode 'mailx' n'est valable que sous Unix"
 
-msgid ""
-"If nothing happens, you should open\n"
-"%s yourself"
-msgstr ""
-"Si rien ne se passe, vous devrez ouvrir\n"
-"%s vous-m�me"
-
 msgid "zip file %s not found"
 msgstr "fichier zip %s introuvable"
 
@@ -1163,12 +1183,21 @@ msgstr "la cr
 msgid "there is no 'libs' directory in package %s"
 msgstr "aucun r�pertoire 'libs' n'est trouv� dans le package %s"
 
+msgid "Only '*.zip' and '*.tar.gz' files can be installed."
+msgstr ""
+
 msgid "winDialog() cannot be used non-interactively"
 msgstr "winDialog() ne peut �tre utilis� en mode non interactif"
 
 msgid "winDialogString() cannot be used non-interactively"
 msgstr "winDialogString() ne peut �tre utilis� en mode non interactif"
 
+#, fuzzy
+msgid "%d Sweave file for basename %s found"
+msgid_plural "%d Sweave files for basename %s found"
+msgstr[0] "%d fichiers Sweave trouv�s pour le nom de base %s"
+msgstr[1] "%d fichiers Sweave trouv�s pour le nom de base %s"
+
 msgid "%d occurrence in %s"
 msgid_plural "%d occurrences in %s"
 msgstr[0] "%d occurrence dans %s"
@@ -1212,11 +1241,19 @@ msgstr[1] ""
 "Elimination des packages de %s\n"
 "(car %s n'est pas sp�cifi�)"
 
-msgid "package %s is not available (for %s)"
-msgid_plural "packages %s are not available (for %s)"
+#, fuzzy
+msgid "package %s is not available (%s)"
+msgid_plural "packages %s are not available (%s)"
 msgstr[0] "le package %s n'est pas disponible (pour %s)"
 msgstr[1] "les packages '%s' ne sont pas disponibles (pour %s)"
 
+#, fuzzy
+msgid "package %s is a base package, and should not be updated"
+msgid_plural "packages %s are base packages, and should not be updated"
+msgstr[0] "le package %s est en cours d'utilisation et ne sera pas install�"
+msgstr[1] ""
+"les packages %s sont en cours d'utilisation et ne seront pas install�s"
+
 msgid "dependency %s is not available"
 msgid_plural "dependencies %s are not available"
 msgstr[0] "la d�pendance '%s' n'est pas disponible"
@@ -1255,7 +1292,9 @@ msgstr[1] ""
 "Des versions binaires sont disponibles mais les versions des sources sont "
 "plus r�centes"
 
-msgid "Do you want to install from sources the package which need compilation?"
+#, fuzzy
+msgid ""
+"Do you want to install from sources the package which needs compilation?"
 msgid_plural ""
 "Do you want to install from sources the packages which need compilation?"
 msgstr[0] ""
@@ -1265,8 +1304,9 @@ msgstr[1] ""
 "Voulez-vous installer les packages qui n�cessitent une compilation depuis "
 "les sources ?"
 
+#, fuzzy
 msgid ""
-"Package which are only available in source form, and may need compilation of "
+"Package which is only available in source form, and may need compilation of "
 "C/C++/Fortran"
 msgid_plural ""
 "Packages which are only available in source form, and may need compilation "
@@ -1318,6 +1358,35 @@ msgstr[0] "le package %s est en cours d'utilisation et ne sera pas install
 msgstr[1] ""
 "les packages %s sont en cours d'utilisation et ne seront pas install�s"
 
+#~ msgid "cannot choose a BioC mirror non-interactively"
+#~ msgstr "impossible de choisir un miroir BioC en mode non interactif"
+
+#~ msgid "no download method found"
+#~ msgstr "impossible de trouver une m�thode de t�l�chargement"
+
+#~ msgid ","
+#~ msgstr ","
+
+#~ msgid ""
+#~ "type == \"both\" cannot be used if 'available' or 'contriburl' is "
+#~ "specified"
+#~ msgstr ""
+#~ "type == \"both\" ne peut �tre utilis� si 'available' ou 'contriburl' est "
+#~ "fourni"
+
+#~ msgid "method 'lynx' is untested and deprecated as from R 3.1.0"
+#~ msgstr "la m�thode 'lynx' est non test�e et d�pr�ci�e depuis R 3.1.0"
+
+#~ msgid ""
+#~ "If nothing happens, you should open\n"
+#~ "'%s' yourself"
+#~ msgstr ""
+#~ "Si rien ne se passe, vous devrez ouvrir\n"
+#~ "'%s' vous-m�me"
+
+#~ msgid "test '%s' is not available"
+#~ msgstr "le test '%s' n'est pas disponible"
+
 #~ msgid "broken installation, no CITATION file in the base package."
 #~ msgstr ""
 #~ "installation incompl�te, pas de fichier CITATION dans le package base"
@@ -1392,9 +1461,6 @@ msgstr[1] ""
 #~ msgid "not found"
 #~ msgstr "introuvable"
 
-#~ msgid ","
-#~ msgstr ","
-
 #~ msgid "HTTPUserAgent"
 #~ msgstr "HTTPUserAgent"
 
@@ -1524,9 +1590,6 @@ msgstr[1] ""
 #~ msgid "updating HTML package descriptions"
 #~ msgstr "mise � jour des descriptions HTML des packages"
 
-#~ msgid "read.dcf() error on file '%s'"
-#~ msgstr "erreur de read.dcf() dans le fichier %s"
-
 #~ msgid "Could not find aspell or ispell executable."
 #~ msgstr "Executable aspell ou ispell introuvable."
 
diff --git a/src/library/utils/po/R-ja.po b/src/library/utils/po/R-ja.po
index 5ec4045..8013b98 100644
--- a/src/library/utils/po/R-ja.po
+++ b/src/library/utils/po/R-ja.po
@@ -2,8 +2,8 @@ msgid ""
 msgstr ""
 "Project-Id-Version: R 2.1.0 \n"
 "Report-Msgid-Bugs-To: bugs.r-project.org\n"
-"POT-Creation-Date: 2014-02-27 17:14\n"
-"PO-Revision-Date: 2014-03-26 14:24+0200 \n"
+"POT-Creation-Date: 2016-04-01 09:50\n"
+"PO-Revision-Date: 2015-03-27 15:15+0900 \n"
 "Last-Translator: Masafumi  \n"
 "Language-Team: RjpWiki Message Translation Team <mokada at md.tsukuba.ac.jp> \n"
 "Language: ja \n"
@@ -11,7 +11,8 @@ msgstr ""
 "Content-Type: text/plain; charset=UTF-8 \n"
 "Content-Transfer-Encoding: 8bit \n"
 "Plural-Forms: nplurals=1; plural=0; \n"
-"X-Generator: Pootle 2.0.5 \n"
+"X-Generator: Pootle 2.5.1.1 \n"
+"X-POOTLE-MTIME: 1427436958.000000 \n"
 
 msgid ""
 "RShowDoc() should be used with a character string argument specifying\n"
@@ -36,9 +37,6 @@ msgstr " 未知のチャンク %s が参照されています "
 msgid "no Sweave file with name %s found"
 msgstr " %s という名前の Sweave ファイルはありません "
 
-msgid "%d Sweave files for basename %s found"
-msgstr " %d 個の Sweve ファイルが基本名 %s に対して見付かりました "
-
 msgid "more than one syntax specification found, using the first one"
 msgstr " 複数の構文指定が見付かりました。最初のものを使います "
 
@@ -61,6 +59,9 @@ msgstr ""
 " 構文解析エラーか空のオプションが以下にあります \n"
 " %s "
 
+msgid "Warning: unknown option '--clean='%s"
+msgstr " 警告: 不明なオプション '--clean=%s "
+
 msgid "Warning: unknown option %s"
 msgstr " 警告: 不明なオプション %s "
 
@@ -265,6 +266,14 @@ msgstr " 変数を正しく再構成できませんでした "
 msgid "did not assign() anything"
 msgstr " 何も assign() しませんでした "
 
+msgid ""
+"Cannot debug primitive functions unless they are implicit generics (requires "
+"loading the methods package)"
+msgstr ""
+
+msgid "error in trying to evaluate the expression for argument %s (%s)"
+msgstr " 引数 %s (%s) に対する表現式を評価中にエラー "
+
 msgid "Browsing in the environment with call:"
 msgstr " 以下の呼び出しに伴う環境でブラウジング: "
 
@@ -285,8 +294,8 @@ msgstr " 環境ナンバーを入力してください。0 を入力すると終
 
 msgid "recover called non-interactively; frames dumped, use debugger() to view"
 msgstr ""
-" recover が非対話的に呼び出されました; フレームがダンプされました。debugger"
-"() を使用してみて下さい "
+" recover が非対話的に呼び出されました; フレームがダンプされました。"
+"debugger() を使用してみて下さい "
 
 msgid "No suitable frames for recover()"
 msgstr " recover() に対する適当なフレームがありません "
@@ -337,9 +346,6 @@ msgstr " %s に対するヘルプファイルが見つかりません "
 msgid "%s has a help file but no examples"
 msgstr " %s にはヘルプファイルはありますが、実行例はありません "
 
-msgid "test '%s' is not available"
-msgstr " テスト '%s' が利用できません "
-
 msgid "Line number missing"
 msgstr " 行番号が欠けています "
 
@@ -430,11 +436,19 @@ msgstr " 不正確な欄指定です "
 msgid "do not know what to search"
 msgstr " 何を検索すべきか分かりません "
 
+msgid "argument 'help.db' is deprecated"
+msgstr " 引数 'help.db' は廃止されました "
+
 msgid "incorrect type specification"
 msgstr " 不正確なタイプ指定です "
 
-msgid "argument 'help.db' is deprecated"
-msgstr " 引数 'help.db' は廃止されました "
+msgid "no information in the database for package %s: need 'rebuild = TRUE'?"
+msgstr ""
+" パッケージ %s の情報がデータベース中にありません: 'rebuild = TRUE' が必要か"
+"もしれません "
+
+msgid "incorrect 'agrep' specification"
+msgstr " 不正確な 'agrep' 指定 "
 
 msgid "could not find package %s"
 msgstr " パッケージ %s を見付けることが出来ませんでした "
@@ -445,14 +459,6 @@ msgstr " パッケージ %s は空の hsearch データを持っています - 
 msgid "removing all entries with invalid multi-byte character data"
 msgstr " 不正な多バイト文字データを持つ全ての項目を取り除いています "
 
-msgid "no information in the database for package %s: need 'rebuild = TRUE'?"
-msgstr ""
-" パッケージ %s の情報がデータベース中にありません: 'rebuild = TRUE' が必要か"
-"もしれません "
-
-msgid "incorrect 'agrep' specification"
-msgstr " 不正確な 'agrep' 指定 "
-
 msgid "invalid browser name, check options(\"browser\")."
 msgstr " 不正なブラウザー名です、 options(\"browser\") をチェックして下さい "
 
@@ -461,10 +467,10 @@ msgstr " help.start() には HTTP サーバが実行されている必要があ
 
 msgid ""
 "If nothing happens, you should open\n"
-"'%s' yourself"
+"%s yourself"
 msgstr ""
 " もし何も起きなければ、 \n"
-" 自分で '%s' を開いてください "
+" 自分で %s を開いてください "
 
 msgid ""
 "If the browser launched by '%s' is already running, it is *not* restarted, "
@@ -522,12 +528,16 @@ msgstr " '%s' は形式的な総称的関数です; S3 メソッドは見付か
 msgid "no function '%s' is visible"
 msgstr " 可視的な関数 '%s' はありません "
 
-msgid "function '%s' appears not to be generic"
-msgstr " 関数 '%s' は総称的では無いようです "
-
 msgid "generic function '%s' dispatches methods for generic '%s'"
 msgstr " 総称的関数 '%s' は総称的な '%s' に対するメソッドを選択提供します "
 
+msgid ""
+"function '%s' appears not to be S3 generic; found functions that look like "
+"S3 methods"
+msgstr ""
+" 関数 '%s' はS3ジェネリックでは無いようです; S3メソッドのように見える関数があ"
+"ります "
+
 msgid "must supply 'generic.function' or 'class'"
 msgstr " 'generic.function' か 'class' を与える必要があります "
 
@@ -581,6 +591,13 @@ msgstr " リポジトリー %s に対する索引にアクセスできません
 msgid "invalid 'filters' argument."
 msgstr " 不正な 'filters' 引数 "
 
+msgid ""
+"specifying 'contriburl' or 'available' requires a single type, not type = "
+"\"both\""
+msgstr ""
+" 'contriburl' もしくは 'available' を指定する場合は, typeは1つだけ指定する必"
+"要があります。type=\"both\" は指定できません "
+
 msgid "package '%s' in library '%s' will not be updated"
 msgstr " パッケージ '%s' (ライブラリ '%s' 中) はアップデートされません "
 
@@ -628,11 +645,19 @@ msgstr ""
 msgid "trying to use CRAN without setting a mirror"
 msgstr " ミラーを設定することなく CRAN を使おうとしています "
 
-msgid "cannot choose a CRAN mirror non-interactively"
-msgstr " CRAN ミラーの選択は対話的にしかできません "
+#, fuzzy
+msgid "'download.file()' error code '%d'"
+msgstr " ファイル '%s' に対する read.dcf() エラー "
+
+msgid "failed to download mirrors file (%s); using local file '%s'"
+msgstr ""
+
+msgid "cannot choose a"
+msgstr ""
 
-msgid "cannot choose a BioC mirror non-interactively"
-msgstr " BioC ミラーの選択は対話的にしかできません "
+#, fuzzy
+msgid "mirror non-interactively"
+msgstr " CRAN ミラーの選択は対話的にしかできません "
 
 msgid "cannot set repositories non-interactively"
 msgstr " リポジトリーの設定は対話的にしかできません "
@@ -656,6 +681,9 @@ msgstr ""
 " 'lib' のどの要素を依存関係のインストールに使うかわかりません \n"
 " 依存関係のインストールをスキップします "
 
+msgid "type 'binary' is not supported on this platform"
+msgstr " このプラットフォームでは type 'binary' はサポートされていません "
+
 msgid "no packages were specified"
 msgstr " 如何なるパッケージも指定されませんでした "
 
@@ -668,8 +696,11 @@ msgstr " パッケージをインストール出来ませんでした "
 msgid "unable to create %s"
 msgstr " %s を生成できませんでした "
 
-msgid "inferring 'repos = NULL' from the file name"
-msgstr " ファイル名から 'repos = NULL' を推測 "
+msgid "inferring 'repos = NULL' from 'pkgs'"
+msgstr " 'pkgs'から 'repos = NULL' を推測 "
+
+msgid "unable to create temporary directory %s"
+msgstr " 一時的ディレクトリ %s を作ることが出来ません "
 
 msgid ""
 "type == \"both\" can only be used on Windows or a CRAN build for Mac OS X"
@@ -677,12 +708,6 @@ msgstr ""
 " type == \"both\" はWindows か Mac OS X に対する CRAN build に対してだけ使え"
 "ます "
 
-msgid ""
-"type == \"both\" cannot be used if 'available' or 'contriburl' is specified"
-msgstr ""
-" type == \"both\" は 'available' か 'contriburl' が指定された時は使用出来ませ"
-"ん "
-
 msgid "type == \"both\" cannot be used with 'repos = NULL'"
 msgstr " type == \"both\" は 'repos = NULL' の時は使用出来ません "
 
@@ -720,9 +745,6 @@ msgstr " システム (cmd0): %s "
 msgid "installation of package %s had non-zero exit status"
 msgstr " パッケージ %s のインストールは、ゼロでない終了値をもちました "
 
-msgid "unable to create temporary directory %s"
-msgstr " 一時的ディレクトリ %s を作ることが出来ません "
-
 msgid "foundpkgs: %s"
 msgstr " foundpkgs: %s "
 
@@ -776,6 +798,9 @@ msgstr " 名前 %s のファイルを作成しました。 "
 msgid "Edit the file and move it to the appropriate directory."
 msgstr " ファイルを編集してきとうなディレクトリに移動してください "
 
+msgid "cannot determine import name"
+msgstr " インポート名を決定することができません "
+
 msgid "no documentation of type %s and topic %s (or error in processing help)"
 msgstr ""
 " タイプ %s でトピック %s のドキュメントはありません (もしかするとヘルプの処理"
@@ -792,9 +817,6 @@ msgid "no methods for %s and no documentation for it as a function"
 msgstr ""
 " %s に対するメソッドはありませんし、その関数としてのドキュメントもありません "
 
-msgid "error in trying to evaluate the expression for argument %s (%s)"
-msgstr " 引数 %s (%s) に対する表現式を評価中にエラー "
-
 msgid "no method defined for function %s and signature %s"
 msgstr ""
 " 関数 %s でシグネチャが %s であるものに対して定義されたメソッドはありません "
@@ -945,6 +967,9 @@ msgid "'digits' and 'digits.d' are both specified and the latter is not used"
 msgstr ""
 " 'digits' と 'digits.d' の両方が指定されています。'digits.d' は使われません "
 
+msgid "number of matches does not always match ncol(proto)"
+msgstr ""
+
 msgid "no lines found in %s"
 msgstr " %s には一行も存在しません "
 
@@ -1079,12 +1104,11 @@ msgstr " 'subject' が欠けています "
 msgid "'ccaddress' must be of length 1"
 msgstr " 'ccaddress' は長さ 1 の整数でなければなりません "
 
-msgid "no download method found"
-msgstr " ダウンロードの方法が見付かりません "
+msgid "'url' must be a length-one character vector"
+msgstr " 'url' は長さ1の文字ベクトルでなければなりません "
 
-msgid "method 'lynx' is untested and deprecated as from R 3.1.0"
-msgstr ""
-" メソッド 'lynx' は, R 3.1.0以降ではテストされておらず, 使用は推奨されません "
+msgid "'destfile' must be a length-one character vector"
+msgstr " 'destfile' は長さ1の文字ベクトルでなければなりません "
 
 msgid "download had nonzero exit status"
 msgstr " ダウンロードはゼロ以外の終了状態を持ちました "
@@ -1133,13 +1157,6 @@ msgstr " 'memory.limit()' は Windows 固有の関数です "
 msgid "method 'mailx' is Unix-only"
 msgstr " 'mailx' メソッドは Unix でのみ利用可能です "
 
-msgid ""
-"If nothing happens, you should open\n"
-"%s yourself"
-msgstr ""
-" もし何も起きなければ、 \n"
-" 自分で %s を開いてください "
-
 msgid "zip file %s not found"
 msgstr " zip ファイル %s が見付かりません "
 
@@ -1149,12 +1166,19 @@ msgstr " %s を作成できませんでした "
 msgid "there is no 'libs' directory in package %s"
 msgstr " パッケージ %s には 'libs' ディレクトリはありません "
 
+msgid "Only '*.zip' and '*.tar.gz' files can be installed."
+msgstr ""
+
 msgid "winDialog() cannot be used non-interactively"
 msgstr " winDialog() は対話的にしか使用できません "
 
 msgid "winDialogString() cannot be used non-interactively"
 msgstr " winDialogString() は対話的にしか使用できません "
 
+msgid "%d Sweave file for basename %s found"
+msgid_plural "%d Sweave files for basename %s found"
+msgstr[0] " %d 個の Sweve ファイルが基本名 %s に対して見つかりました "
+
 msgid "%d occurrence in %s"
 msgid_plural "%d occurrences in %s"
 msgstr[0] " %d 回の生起(%s 中) "
@@ -1190,9 +1214,14 @@ msgstr[0] ""
 " パッケージを %s から取り除きます \n"
 " (%s が指定されていないため) "
 
-msgid "package %s is not available (for %s)"
-msgid_plural "packages %s are not available (for %s)"
-msgstr[0] " パッケージ %s が利用できません (%s に対して) "
+msgid "package %s is not available (%s)"
+msgid_plural "packages %s are not available (%s)"
+msgstr[0] " パッケージ %s が利用できません (%s) "
+
+#, fuzzy
+msgid "package %s is a base package, and should not be updated"
+msgid_plural "packages %s are base packages, and should not be updated"
+msgstr[0] " パッケージ %s は使用中のため、インストールされません "
 
 msgid "dependency %s is not available"
 msgid_plural "dependencies %s are not available"
@@ -1221,20 +1250,22 @@ msgid_plural ""
 "There are binary versions available but the source versions are later"
 msgstr[0] " 利用できるバイナリー版がありますがソース版は後者です "
 
-msgid "Do you want to install from sources the package which need compilation?"
+msgid ""
+"Do you want to install from sources the package which needs compilation?"
 msgid_plural ""
 "Do you want to install from sources the packages which need compilation?"
-msgstr[0] " コンパイルが必要なパッケージのソースからインストールを行いますか? "
+msgstr[0] ""
+" パッケージのソースからインストールを行いますか? (コンパイルが必要です) "
 
 msgid ""
-"Package which are only available in source form, and may need compilation of "
+"Package which is only available in source form, and may need compilation of "
 "C/C++/Fortran"
 msgid_plural ""
 "Packages which are only available in source form, and may need compilation "
 "of C/C++/Fortran"
 msgstr[0] ""
-" ソースの形でのみ利用可能なパッケージです,C/C++/Fortran でコンパイルの必要が"
-"あるかもしれません "
+" ソースコードの形でのみ利用可能なパッケージです,C/C++/Fortran でコンパイルの"
+"必要があるかもしれません "
 
 msgid "installing the source package %s"
 msgid_plural "installing the source packages %s"
@@ -1265,6 +1296,37 @@ msgid "package %s is in use and will not be installed"
 msgid_plural "packages %s are in use and will not be installed"
 msgstr[0] " パッケージ %s は使用中のため、インストールされません "
 
+#~ msgid "cannot choose a BioC mirror non-interactively"
+#~ msgstr " BioC ミラーの選択は対話的にしかできません "
+
+#~ msgid "no download method found"
+#~ msgstr " ダウンロードの方法が見付かりません "
+
+#~ msgid ","
+#~ msgstr " , "
+
+#~ msgid ""
+#~ "type == \"both\" cannot be used if 'available' or 'contriburl' is "
+#~ "specified"
+#~ msgstr ""
+#~ " type == \"both\" は 'available' か 'contriburl' が指定された時は使用出来"
+#~ "ません "
+
+#~ msgid "method 'lynx' is untested and deprecated as from R 3.1.0"
+#~ msgstr ""
+#~ " メソッド 'lynx' は, R 3.1.0以降ではテストされておらず, 使用は推奨されませ"
+#~ "ん "
+
+#~ msgid ""
+#~ "If nothing happens, you should open\n"
+#~ "'%s' yourself"
+#~ msgstr ""
+#~ " もし何も起きなければ、 \n"
+#~ " 自分で '%s' を開いてください "
+
+#~ msgid "test '%s' is not available"
+#~ msgstr " テスト '%s' が利用できません "
+
 #~ msgid "broken installation, no CITATION file in the base package."
 #~ msgstr ""
 #~ " インストールが不完全です、base パッケージに CITATION ファイルがありませ"
@@ -1343,9 +1405,6 @@ msgstr[0] " パッケージ %s は使用中のため、インストールされ
 #~ msgid "not found"
 #~ msgstr " 見付かりません "
 
-#~ msgid ","
-#~ msgstr " , "
-
 #~ msgid "HTTPUserAgent"
 #~ msgstr " HTTPUserAgent "
 
@@ -1468,9 +1527,6 @@ msgstr[0] " パッケージ %s は使用中のため、インストールされ
 #~ msgid "updating HTML package descriptions"
 #~ msgstr " HTML パッケージ記述を更新 "
 
-#~ msgid "read.dcf() error on file '%s'"
-#~ msgstr " ファイル '%s' に対する read.dcf() エラー "
-
 #~ msgid "Could not find aspell or ispell executable."
 #~ msgstr " 実行可能なaspellまたはispellが見つかりません "
 
@@ -1669,3 +1725,6 @@ msgstr[0] " パッケージ %s は使用中のため、インストールされ
 
 #~ msgid "Optionally other keywords from doc/KEYWORDS, one per line"
 #~ msgstr " オプションの doc/KEYWORDS からの他のキーワード、一行に一つずつ "
+
+#~ msgid "at"
+#~ msgstr " at "
diff --git a/src/library/utils/po/R-ko.po b/src/library/utils/po/R-ko.po
index 7ed9ecf..4f109d2 100644
--- a/src/library/utils/po/R-ko.po
+++ b/src/library/utils/po/R-ko.po
@@ -1,121 +1,128 @@
 # Korean translation for R utils package
-# src/library/utils/po/R-ko.po
-# Copyright (C) 1995-2014 The R Core Team
+# ./utils/po/R-ko.po
+#
+# Copyright (C) 1995-2016 The R Core Team
+#
 # This file is distributed under the same license as the R utils package.
-# Chel Hee Lee <chl948 at mail.usask.ca>, 2008-2014.
+# Maintained by Chel Hee Lee <chl948 at mail.usask.ca>, 2008-2016.
+# Contact: Chel Hee Lee <gnustats at gmail.com>
+#
+# Notes:
+# Under development (unstable) starting from 11-APR-2016 for R-3.3.1 - QC: in progress
+# Freezed on 10-APR-2016 for R-3.3.0 - QC: PASS
+# Freezed on 30-MAR-2015 for R-3.2.0 - QC: PASS
+# Freezed on 06-FEB-2015 for R-3.1.3 - QC: PASS
 #
 msgid ""
 msgstr ""
-"Project-Id-Version: R 3.1.0\n"
+"Project-Id-Version: R-3.3.0\n"
 "Report-Msgid-Bugs-To: bugs.r-project.org\n"
-"POT-Creation-Date: 2014-02-27 17:14\n"
-"PO-Revision-Date: 2014-03-26 23:11-0600\n"
+"POT-Creation-Date: 2016-04-01 09:50\n"
+"PO-Revision-Date: 2016-04-11 13:08-0600\n"
 "Last-Translator: Chel Hee Lee <chl948 at mail.usask.ca>\n"
-"Language-Team:  <chl948 at mail.usask.ca>\n"
+"Language-Team: Chel Hee Lee <chl948 at mail.usask.ca>\n"
 "Language: ko\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
 "Plural-Forms: nplurals=1; plural=0;\n"
-"X-Poedit-SourceCharset: UTF-8\n"
-"X-Generator: Poedit 1.5.4\n"
 
 msgid ""
 "RShowDoc() should be used with a character string argument specifying\n"
 "   a documentation file"
 msgstr ""
-"RShowDoc()은 반드시 문서파일을 지정하는 문자열 인자와 \n"
-"   함께 사용되어야 합니다"
+"RShowDoc()은 반드시 문서파일을 지정하는 문자열(character string) 인자와 \n"
+"   함께 사용되어야 합니다."
 
 msgid "no documentation for %s found in package %s"
-msgstr "%s에 대한 문서를 패키지 %s내에서 찾을 수 없습니다"
+msgstr "%s에 관한 문서를 패키지 %s 내에서 찾을 수 없습니다."
 
 msgid "document not found"
-msgstr "문서를 찾을 수 없습니다"
+msgstr "문서를 찾을 수 없습니다."
 
 msgid "A search query has been submitted to %s"
-msgstr "서치쿼리가 %s에 전달되었습니다"
+msgstr "서치쿼리(search query)가 %s에 전달되었습니다."
 
 msgid "The results page should open in your browser shortly"
-msgstr "곧 브라우저에서 결과를 확인할 수 있습니다"
+msgstr "결과가 곧 브라우저에 나타날 것입니다."
 
 msgid "reference to unknown chunk %s"
-msgstr "알 수 없는 chunk %s를 참조합니다"
+msgstr ""
 
 msgid "no Sweave file with name %s found"
-msgstr "%s이라는 이름을 가진 Sweave 파일이 없습니다"
-
-msgid "%d Sweave files for basename %s found"
-msgstr "basename %2$s에 대한 %1$d Sweave 파일들을 찾았습니다"
+msgstr "%s이라는 이름을 가진 Sweave 파일을 찾을 수 없습니다."
 
 msgid "more than one syntax specification found, using the first one"
 msgstr ""
-"한개이상의 구문지정 (syntax specification)이 있었기 때문에 첫번째 것을 사용합"
-"니다"
+"하나 이상의 구문지정(syntax specification)이 있었으나, 가장 처음 것을 사용합"
+"니다."
 
 msgid "object %s does not have class \"SweaveSyntax\""
-msgstr "객체 %s는 클래스 \"SweaveSyntax\"를 가지지 않습니다"
+msgstr "객체 %s는 클래스 \"SweaveSyntax\"를 가지지 않습니다."
 
 msgid "recursive Sweave input %s in stack"
-msgstr "스택에 반복되는 Sweave 입력 %s가 있습니다"
+msgstr "스택(stack)에 반복되는 Sweave 입력 %s가 있습니다."
 
 msgid "target syntax not of class %s"
-msgstr "클래스 %s가 아닌 target syntax입니다"
+msgstr "클래스 %s가 아닌 target syntax입니다."
 
 msgid "target syntax contains no translation table"
-msgstr "target syntax는 번역테이블을 포함하고 있지 않습니다"
+msgstr "target syntax는 번역테이블을 포함하고 있지 않습니다."
 
 msgid ""
 "parse error or empty option in\n"
 "%s"
 msgstr ""
-"구문분석 에러 또는 다음에 empty option입니다\n"
+"다음으로부터 구문분석 에러(parse error) 또는 empty option를 발견했습니다.\n"
 "%s"
 
+msgid "Warning: unknown option '--clean='%s"
+msgstr "경고: '--clean='%s은 알 수 없는 옵션입니다."
+
 msgid "Warning: unknown option %s"
-msgstr "경고: 알수없는 옵션 %s입니다"
+msgstr "경고: %s는 알 수 없는 옵션입니다."
 
 msgid "Output file:"
 msgstr "출력파일:"
 
 msgid "Compacting PDF document"
-msgstr "PDF 문서를 생성합니다"
+msgstr "PDF 문서를 생성합니다."
 
 msgid "path to %s contains spaces,"
-msgstr "%s로의 파일경로에 공백들이 있습니다,"
+msgstr "%s의 위치를 지정하는 파일경로에 공백이 포함되어 있습니다."
 
 msgid "this may cause problems when running LaTeX"
-msgstr "이것은 LaTeX를 실행할때 문제를 야기할 수 있습니다"
+msgstr "이것은 아마도 LaTeX를 실행할 때 문제를 야기할 수 있습니다."
 
 msgid "the output file '%s' has disappeared"
-msgstr "출력결과를 포함한 파일 '%s'가 사라졌습니다"
+msgstr "출력결과를 포함한 파일 '%s'가 사라졌습니다."
 
 msgid "invalid value for %s : %s"
-msgstr "%1$s에 대한 값이 잘못되었습니다 : %2$s"
+msgstr "%1$s에 대한 값이 올바르지 않습니다: %2$s"
 
 msgid "value of 'results' option should be lowercase"
-msgstr "'results' 옵션에 대한 값은 반드시 소문자이어야 합니다"
+msgstr "'results' 옵션에 대한 값은 반드시 소문자이어야 합니다."
 
 msgid "value of 'strip.white' option should be lowercase"
-msgstr "'strip.white' 옵션의 값은 반드시 소문자이어야 합니다"
+msgstr "'strip.white' 옵션의 값은 반드시 소문자이어야 합니다."
 
 msgid "elements of 'what' after the first will be ignored"
-msgstr "첫번째 이후의 모든 'what'의 요소들은 무시될 것입니다"
+msgstr "첫번째 이후의 모든 'what'의 원소들은 사용되지 않을 것입니다."
 
 msgid "No suitable spell-checker program found"
-msgstr "적절한 스펠링체크르 찾지 못했습니다"
+msgstr "적절한 맞춤법 검사 프로그램(spell-checker program)을 찾을 수 없습니다."
 
 msgid "Filter '%s' is not available."
-msgstr "필터 '%s'는 사용가능하지 않습니다"
+msgstr "필터(filter) '%s'를 사용할 수 없습니다."
 
 msgid "Invalid 'filter' argument."
-msgstr "유효한 'filter' 인자가 아닙니다."
+msgstr "인자 'filter'가 올바르지 않습니다."
 
 msgid ""
 "The following dictionaries were not found:\n"
 "%s"
 msgstr ""
-"다음 사전들을 찾을 수 없었습니다:\n"
+"다음에 보이는 사전(dictionary)을 찾을 수 없었습니다:\n"
 "%s"
 
 msgid "Processing file %s"
@@ -125,11 +132,11 @@ msgid ""
 "Running aspell failed with diagnostics:\n"
 "%s"
 msgstr ""
-"aspell 프로그램이 다음과 같은 이유로 실행에 실패했습니다:\n"
+"aspell 프로그램이 다음과 같은 이유로 중지되었습니다:\n"
 "%s"
 
 msgid "No suitable spell check program found."
-msgstr "적절한 스펠링 프로그램을 찾지 못했습니다."
+msgstr "적절한 맞춤법 검사 프로그램(spell check program)을 찾을 수 없습니다."
 
 msgid ""
 "Use <code> %s </code> \n"
@@ -139,56 +146,60 @@ msgstr ""
 " to list the vignettes in all <strong>available</strong> packages."
 
 msgid "No vignettes found by %s"
-msgstr "%s에 의해 발견된 비니에트가 없습니다"
+msgstr "%s에 의해 발견된 비네트(vignettes)가 없습니다."
 
 msgid "Package %s: DESCRIPTION file not found"
-msgstr "패키지 %s 내에서 DESCRIPTION 파일을 찾을 수 없습니다"
+msgstr "패키지 %s: DESCRIPTION 파일을 찾을 수 없습니다."
 
 msgid "'file' must be NULL, a character string or a connection"
-msgstr "'file'은 반드시 NULL, 문자열, 또는 연결이어야 합니다"
+msgstr ""
+"'file'은 반드시 NULL, 문자열(character string), 또는 커넥션(connection)이어"
+"야 합니다."
 
 msgid "bad argument"
-msgstr "잘못된 인자입니다"
+msgstr "잘못된 인자입니다."
 
 msgid "'full.names' must be TRUE for multiple paths."
-msgstr "'full.names'은 다중 경로에 대해서 반드시 TRUE이어야 합니다."
+msgstr ""
+"'full.names'은 다중 경로(multiple paths)에 대해서 반드시 TRUE이어야 합니다."
 
 msgid "Timestamp file no longer exists."
-msgstr "타임스탬프 파일은 더 이상 존재하지 않습니다."
+msgstr "타임스탬프(timestamp) 파일이 더 이상 존재하지 않습니다."
 
 msgid ""
 "Not all arguments are of the same length, the following need to be recycled: "
 "%s"
 msgstr ""
-"모든 인자들이 같은 길이를 가지지 않기 때문에 다음의 부분들이 재사용되어져야 "
-"합니다: %s"
+"모든 인자들이 같은 길이를 가지지 않기 때문에 다음의 것들이 재사용될 필요가 있"
+"습니다: %s"
 
 msgid "Use either %s or %s/%s but not both."
-msgstr "%1$s와 %2$s/%3$s 두가지를 함께 사용하지 말고, 하나만 이용하세요."
+msgstr ""
+"%1$s와 %2$s/%3$s 두 가지를 함께 사용하기 보다 하나만을 이용하시길 바랍니다."
 
 msgid "It is recommended to use %s instead of %s."
 msgstr "%2$s 대신에 %1$s를 사용하는 것이 권장됩니다."
 
 msgid "Use either %s or %s but not both."
-msgstr "%1$s와 %2$s 두가지를 함께 사용하지 말고, 하나만 이용하세요."
+msgstr "%1$s와 %2$s 두 가지를 함께 사용하기 보다 하나만을 이용하시길 바랍니다."
 
 msgid "It is recommended to use %s/%s instead of %s/%s/%s."
 msgstr "%3$s/%4$s/%5$s 대신에 %1$s/%2$s를 사용하는 것이 권장됩니다."
 
 msgid "method is only applicable to %s objects"
-msgstr "%s 객체에만 적용이 가능한 메소드입니다"
+msgstr "객체 %s에만 사용할 수 있는 메소드(method)입니다."
 
 msgid "all arguments must be of class %s"
-msgstr "몬든 인자들은 반드시 클래스 %s이어야 합니다"
+msgstr "입력된 각 인자들의 클래스는 반드시 %s이어야 합니다."
 
 msgid "all fields have to be named"
-msgstr "모든 항목들에는 이름이 주어져야 합니다"
+msgstr "모든 항목들에는 이름이 주어져야 합니다."
 
 msgid "%s has to be one of %s"
-msgstr "%1$s는 %2$s 중에 하나이어야 합니다"
+msgstr "%1$s는 %2$s 중에 하나이어야 합니다."
 
 msgid "subscript out of bounds"
-msgstr "첨자가 범위를 벗어났습니다"
+msgstr "첨자가 범위를 벗어났습니다."
 
 msgid "%s should be one of %s"
 msgstr "%1$s는 %2$s 중 하나이어야 합니다"
@@ -273,6 +284,14 @@ msgstr "변수들을 올바르게 복구할 수 없었습니다"
 msgid "did not assign() anything"
 msgstr "어떠한 것도 assign()하지 않습니다"
 
+msgid ""
+"Cannot debug primitive functions unless they are implicit generics (requires "
+"loading the methods package)"
+msgstr ""
+
+msgid "error in trying to evaluate the expression for argument %s (%s)"
+msgstr "인자 %s (%s)에 대한 표현식을 평가하려는데 에러가 발생했습니다"
+
 msgid "Browsing in the environment with call:"
 msgstr ""
 
@@ -343,9 +362,6 @@ msgstr "%s에 대한 도움말을 찾을 수 없습니다"
 msgid "%s has a help file but no examples"
 msgstr "%s에 대한 도움말이 있지만 예제는 없습니다"
 
-msgid "test '%s' is not available"
-msgstr "테스트 '%s'는 사용할 수 없습니다"
-
 msgid "Line number missing"
 msgstr "라인넘버가 없습니다"
 
@@ -356,7 +372,7 @@ msgid "too many list items (at most up to %d)"
 msgstr "리스트 항목들이 너무 많습니다 (최대 %d개 까지입니다)"
 
 msgid "no vector columns were selected"
-msgstr ""
+msgstr "선택된 벡터 열(vector column)들이 없습니다."
 
 msgid "non-vector columns will be ignored"
 msgstr "벡터가 아닌 열들은 무시될 것입니다"
@@ -438,11 +454,19 @@ msgstr "항목지정이 잘못되었습니다"
 msgid "do not know what to search"
 msgstr "무엇을 검색해야할지 모릅니다"
 
+msgid "argument 'help.db' is deprecated"
+msgstr "인수 'help.db'가 누락되었습니다"
+
 msgid "incorrect type specification"
 msgstr "유형지정이 잘못되었습니다"
 
-msgid "argument 'help.db' is deprecated"
-msgstr "인수 'help.db'가 누락되었습니다"
+msgid "no information in the database for package %s: need 'rebuild = TRUE'?"
+msgstr ""
+"패키지 %s에 대한 정보가 데이터베이스에 없습니다: 'rebuild = TRUE'가 필요한가"
+"요?"
+
+msgid "incorrect 'agrep' specification"
+msgstr "'agrep' 지정이 잘못되었습니다"
 
 msgid "could not find package %s"
 msgstr "패키지 %s를 찾을 수 없었습니다"
@@ -453,14 +477,6 @@ msgstr "패키지 %s는 비어있는 hsearch data를 가집니다 - 이상합니
 msgid "removing all entries with invalid multi-byte character data"
 msgstr "잘못된 멀티바이트 문자데이터를 가진 모든 항목들을 제거합니다"
 
-msgid "no information in the database for package %s: need 'rebuild = TRUE'?"
-msgstr ""
-"패키지 %s에 대한 정보가 데이터베이스에 없습니다: 'rebuild = TRUE'가 필요한가"
-"요?"
-
-msgid "incorrect 'agrep' specification"
-msgstr "'agrep' 지정이 잘못되었습니다"
-
 msgid "invalid browser name, check options(\"browser\")."
 msgstr "브라우저 이름이 잘못되었습니다. options(\"browser\")을 확인해보세요."
 
@@ -469,10 +485,10 @@ msgstr "help.start()는 HTTP 서버가 실행되어야만 이용할 수 있습
 
 msgid ""
 "If nothing happens, you should open\n"
-"'%s' yourself"
+"%s yourself"
 msgstr ""
-"만약 아무것도 일어나지 않았다면\n"
-"'%s'를 직접 열어봐야합니다"
+"만약 아무런 일도 없다면, \n"
+"%s를 열어보아야 합니다"
 
 msgid ""
 "If the browser launched by '%s' is already running, it is *not* restarted, "
@@ -530,12 +546,14 @@ msgstr ""
 msgid "no function '%s' is visible"
 msgstr "함수 '%s'는 볼 수 없습니다"
 
-msgid "function '%s' appears not to be generic"
-msgstr "함수 '%s'는 제네릭처럼 나타나지 않을 것입니다"
-
 msgid "generic function '%s' dispatches methods for generic '%s'"
 msgstr "제네릭 '%2$s'에 대해서 제네릭 함수 '%1$s'는 메소드들을 디스패치합니다"
 
+msgid ""
+"function '%s' appears not to be S3 generic; found functions that look like "
+"S3 methods"
+msgstr ""
+
 msgid "must supply 'generic.function' or 'class'"
 msgstr "'generic.function' 또는 'class'를 반드시 제공해야 합니다"
 
@@ -588,6 +606,11 @@ msgstr "저장소 %s에 대한 인덱스에 접근할 수 없습니다"
 msgid "invalid 'filters' argument."
 msgstr "'filters' 인자가 잘못되었습니다"
 
+msgid ""
+"specifying 'contriburl' or 'available' requires a single type, not type = "
+"\"both\""
+msgstr ""
+
 msgid "package '%s' in library '%s' will not be updated"
 msgstr "라이브러리 '%2$s'내에 있는 패키지 '%1$s'은 업데이트 되지 않을 것입니다"
 
@@ -633,11 +656,17 @@ msgstr "--- 현재 세션에서 사용할 CRAN 미러를 선택해 주세요 ---
 msgid "trying to use CRAN without setting a mirror"
 msgstr "미러 설정을 하지 않고서는 CRAN을 사용할 수 없습니다"
 
-msgid "cannot choose a CRAN mirror non-interactively"
-msgstr "비대화식으로 CRAN 미러를 선택할 수 없습니다"
+msgid "'download.file()' error code '%d'"
+msgstr ""
 
-msgid "cannot choose a BioC mirror non-interactively"
-msgstr "비대화식으로 BioC 미러를 선택할 수 없습니다"
+msgid "failed to download mirrors file (%s); using local file '%s'"
+msgstr ""
+
+msgid "cannot choose a"
+msgstr ""
+
+msgid "mirror non-interactively"
+msgstr ""
 
 msgid "cannot set repositories non-interactively"
 msgstr "비대화식으로 저장소드을 설정할 수 없습니다"
@@ -660,20 +689,26 @@ msgid ""
 "skipping dependencies"
 msgstr ""
 
+msgid "type 'binary' is not supported on this platform"
+msgstr "이 플랫폼에서는 유형(type) 'binary'은 지원되지 않습니다."
+
 msgid "no packages were specified"
-msgstr "아무런 패키지들도 지정되지 않았습니다"
+msgstr "지정된 패키지가 없습니다."
 
 msgid "'lib = \"%s\"' is not writable"
 msgstr "'lib = \"%s\"'는 기록이 가능하지 않습니다"
 
 msgid "unable to install packages"
-msgstr "패키지들을 설치할 수 없습니다"
+msgstr "패키지들을 설치할 수 없습니다."
 
 msgid "unable to create %s"
-msgstr "%s를 생성할 수 없습니다"
+msgstr "%s를 생성할 수 없습니다."
 
-msgid "inferring 'repos = NULL' from the file name"
-msgstr "파일이름으로부터 'repos = NULL'임을 알 수 있습니다"
+msgid "inferring 'repos = NULL' from 'pkgs'"
+msgstr "'pkgs'로부터 'repos = NULL'임을 알 수 있습니다."
+
+msgid "unable to create temporary directory %s"
+msgstr "임시 디렉토리 %s를 생성할 수 없습니다."
 
 msgid ""
 "type == \"both\" can only be used on Windows or a CRAN build for Mac OS X"
@@ -681,12 +716,6 @@ msgstr ""
 "type == \"both\"는 오로지 윈도우즈에서만 사용되거나 Mac OS X에 대한 CRAN 빌드"
 "입니다"
 
-msgid ""
-"type == \"both\" cannot be used if 'available' or 'contriburl' is specified"
-msgstr ""
-"type == \"both\" 은 만약 'available' 또는 'contriburl'이 지정되지 않았다면 사"
-"용할 수 없습니다"
-
 msgid "type == \"both\" cannot be used with 'repos = NULL'"
 msgstr "type == \"both\"은 'repos = NULL'과 함께 사용될 수 없습니다"
 
@@ -718,9 +747,6 @@ msgstr "시스템 (cmd0): %s"
 msgid "installation of package %s had non-zero exit status"
 msgstr "패키지 %s의 설치가 0이 아닌 종료상태를 가졌습니다"
 
-msgid "unable to create temporary directory %s"
-msgstr "임시 디렉토리 %s를 생성할 수 없습니다"
-
 msgid "foundpkgs: %s"
 msgstr "발견된 패키지들: %s"
 
@@ -772,6 +798,9 @@ msgstr "%s이라는 이름을 가진 파일을 생성하였습니다."
 msgid "Edit the file and move it to the appropriate directory."
 msgstr "파일을 편집한 뒤 적절한 디렉토리로 이동시켜주세요."
 
+msgid "cannot determine import name"
+msgstr ""
+
 msgid "no documentation of type %s and topic %s (or error in processing help)"
 msgstr ""
 "유형 %s와 주제 %s에 대한 문서가 없습니다 (또는 도움말 처리에 문제가 있습니다)"
@@ -786,9 +815,6 @@ msgstr ""
 msgid "no methods for %s and no documentation for it as a function"
 msgstr "%s에 대한 메소드들이 없으며 함수로서 이와 관련된 문서들도 없습니다"
 
-msgid "error in trying to evaluate the expression for argument %s (%s)"
-msgstr "인자 %s (%s)에 대한 표현식을 평가하려는데 에러가 발생했습니다"
-
 msgid "no method defined for function %s and signature %s"
 msgstr "함수 %s와 signature %s에 정의된 메소드가 없습니다"
 
@@ -936,6 +962,9 @@ msgid "'digits' and 'digits.d' are both specified and the latter is not used"
 msgstr ""
 "'digits'와 'digits.d' 모두 지정되지 않았기 때문에 후자는 사용되지 않습니다"
 
+msgid "number of matches does not always match ncol(proto)"
+msgstr ""
+
 msgid "no lines found in %s"
 msgstr "%s에서 발견된 라인들은 없습니다"
 
@@ -1065,19 +1094,19 @@ msgid "must specify 'address'"
 msgstr "'address'를 반드시 지정해야 합니다"
 
 msgid "'subject' is missing"
-msgstr "'subject'가 없습니다"
+msgstr "'subject'를 찾을 수 없습니다."
 
 msgid "'ccaddress' must be of length 1"
-msgstr "'ccaddress'는 반드시 길이가 1이어야 합니다"
+msgstr "'ccaddress'의 길이는 반드시 1이어야 합니다."
 
-msgid "no download method found"
-msgstr "다운로드 메소드를 찾을 수 없습니다"
+msgid "'url' must be a length-one character vector"
+msgstr "'url'은 반드시 길이가 1인 문자형 벡터이어야 합니다."
 
-msgid "method 'lynx' is untested and deprecated as from R 3.1.0"
-msgstr "메소드 'lynx'는 테스트되지 않았고 R 3.1.0에서는 지원되지 않습니다"
+msgid "'destfile' must be a length-one character vector"
+msgstr "'destfile'은 반드시 길이가 1인 문자형 벡터이어야 합니다."
 
 msgid "download had nonzero exit status"
-msgstr "다운로드가 0 이 아닌 종료상태를 가졌습니다"
+msgstr "다운로드의 종료상태(exit status)가 0이 아닙니다."
 
 msgid "'tar' returned non-zero exit code %d"
 msgstr "'tar'는 0 이 아닌 종료코드 %d를 반환했습니다"
@@ -1092,11 +1121,9 @@ msgid ""
 "ERROR: failed to lock directory %s for modifying\n"
 "Try removing %s"
 msgstr ""
-"에러: 수정을 위해 디렉토리 %s를 잠그는데 실패했습니다\n"
-"%s를 지워보려고 합니다"
 
 msgid "ERROR: failed to create lock directory %s"
-msgstr "에러: 잠긴 디렉토리 %s를 생성하는데 실패했습니다"
+msgstr ""
 
 msgid "restored %s"
 msgstr "%s를 복구하였습니다"
@@ -1123,13 +1150,6 @@ msgstr "'memory.limit()'은 윈도우즈 전용입니다"
 msgid "method 'mailx' is Unix-only"
 msgstr "메소드 'mailx'는 유닉스에서만 사용할 수 있습니다"
 
-msgid ""
-"If nothing happens, you should open\n"
-"%s yourself"
-msgstr ""
-"만약 아무런 일도 없다면, \n"
-"%s를 열어보아야 합니다"
-
 msgid "zip file %s not found"
 msgstr "zip 파일 %s를 찾을 수 없습니다"
 
@@ -1139,24 +1159,30 @@ msgstr "%s를 생성하는데 실패했습니다"
 msgid "there is no 'libs' directory in package %s"
 msgstr "패키지 %s내에 'libs'이라는 디렉토리가 없습니다"
 
+msgid "Only '*.zip' and '*.tar.gz' files can be installed."
+msgstr ""
+
 msgid "winDialog() cannot be used non-interactively"
 msgstr "winDialog()는 인터랙티브하게 사용되어져야 합니다"
 
 msgid "winDialogString() cannot be used non-interactively"
 msgstr "winDialogString()는 인터랙티브하게 사용되어져야 합니다"
 
+msgid "%d Sweave file for basename %s found"
+msgid_plural "%d Sweave files for basename %s found"
+msgstr[0] ""
+
 msgid "%d occurrence in %s"
 msgid_plural "%d occurrences in %s"
 msgstr[0] "%d는 %s내에서 발생하였습니다"
 
 msgid "Invalid role specification: %s."
 msgid_plural "Invalid role specifications: %s."
-msgstr[0] "역할지정이 잘못되었습니다: %s."
+msgstr[0] "올바르지 않은 역할지정(role specification)입니다: %s."
 
 msgid "A bibentry of bibtype %s has to specify the field: %s"
 msgid_plural "A bibentry of bibtype %s has to specify the fields: %s"
-msgstr[0] ""
-"비브타입 %1$s의 비브항목은 다음 항목을 반드시 지정해야만 합니다: %2$s"
+msgstr[0] "%1$s이라는 종류의 출판물은 다음 항목을 반드시 지정해야 합니다: %2$s"
 
 msgid "class discarded from column %s"
 msgid_plural "classes discarded from columns %s"
@@ -1180,17 +1206,21 @@ msgstr[0] ""
 "패키지(들)을 %s으로부터 제거합니다\n"
 "(왜냐하면 %s가 지정되지 않았기 때문입니다)"
 
-msgid "package %s is not available (for %s)"
-msgid_plural "packages %s are not available (for %s)"
-msgstr[0] "패키지 %s (들)은 사용가능하지 않습니다 (그 이유는 %s 입니다)"
+msgid "package %s is not available (%s)"
+msgid_plural "packages %s are not available (%s)"
+msgstr[0] "패키지 %s(들)이 사용가능하지 않습니다 (그 이유는 %s 입니다)"
+
+msgid "package %s is a base package, and should not be updated"
+msgid_plural "packages %s are base packages, and should not be updated"
+msgstr[0] ""
 
 msgid "dependency %s is not available"
 msgid_plural "dependencies %s are not available"
-msgstr[0] ""
+msgstr[0] "%s(들)이 사용가능하지 않습니다."
 
 msgid "also installing the dependency %s"
 msgid_plural "also installing the dependencies %s"
-msgstr[0] ""
+msgstr[0] "%s(들)을 또한 설치합니다."
 
 msgid ""
 "Installing package into %s\n"
@@ -1199,7 +1229,7 @@ msgid_plural ""
 "Installing packages into %s\n"
 "(as %s is unspecified)"
 msgstr[0] ""
-"패키지(들)을 %s에 설치합니다\n"
+"%s의 위치에 패키지(들)을 설치합니다.\n"
 "(왜냐하면 %s가 지정되지 않았기 때문입니다)"
 
 msgid "'lib' element %s is not a writable directory"
@@ -1211,28 +1241,33 @@ msgid_plural ""
 "There are binary versions available but the source versions are later"
 msgstr[0] ""
 
-msgid "Do you want to install from sources the package which need compilation?"
+msgid ""
+"Do you want to install from sources the package which needs compilation?"
 msgid_plural ""
 "Do you want to install from sources the packages which need compilation?"
-msgstr[0] "컴파일이 필요한 패키지를 소스로부터 직접 설치하기를 원하시나요?"
+msgstr[0] ""
+"컴파일(compilation)이 요구되는 패키지를 소스(source)로부터 바로 설치하기를 원"
+"하나요?"
 
 msgid ""
-"Package which are only available in source form, and may need compilation of "
+"Package which is only available in source form, and may need compilation of "
 "C/C++/Fortran"
 msgid_plural ""
 "Packages which are only available in source form, and may need compilation "
 "of C/C++/Fortran"
 msgstr[0] ""
-"오로지 소스의 형태로만 패키지가 제공되므로,  C/C++/Fortran 의 컴파일이 필요"
-"할 수 있습니다"
+"오로지 소스형태로만 제공되는 패키지이므로 C/C++/Fortran으로 작성된 코드들에 "
+"대한 컴파일이 필요할 수도 있습니다."
 
 msgid "installing the source package %s"
 msgid_plural "installing the source packages %s"
-msgstr[0] ""
+msgstr[0] "소스형태의 패키지 %s(들)를 설치합니다."
 
 msgid "package %s is available as a source package but not as a binary"
 msgid_plural "packages %s are available as source packages but not as binaries"
 msgstr[0] ""
+"패키지 %s(들)은 바이너리(binary)가 아닌 소스(source)의 형태로서 이용할 수 있"
+"습니다."
 
 msgid ""
 "There is a binary version available (and will be installed) but the source "
@@ -1256,6 +1291,38 @@ msgid "package %s is in use and will not be installed"
 msgid_plural "packages %s are in use and will not be installed"
 msgstr[0] "패키지 %s가 사용중이므로 설치되지 않을 것입니다"
 
+#~ msgid "cannot choose a CRAN mirror non-interactively"
+#~ msgstr "비대화식으로 CRAN 미러를 선택할 수 없습니다"
+
+#~ msgid "cannot choose a BioC mirror non-interactively"
+#~ msgstr "비대화식으로 BioC 미러를 선택할 수 없습니다"
+
+#~ msgid "no download method found"
+#~ msgstr "다운로드 메소드(download method)를 찾을 수 없습니다"
+
+#~ msgid "function '%s' appears not to be generic"
+#~ msgstr "함수 '%s'는 제네릭처럼 나타나지 않을 것입니다"
+
+#~ msgid ""
+#~ "type == \"both\" cannot be used if 'available' or 'contriburl' is "
+#~ "specified"
+#~ msgstr ""
+#~ "type == \"both\" 은 만약 'available' 또는 'contriburl'이 지정되지 않았다"
+#~ "면 사용할 수 없습니다"
+
+#~ msgid "method 'lynx' is untested and deprecated as from R 3.1.0"
+#~ msgstr "메소드 'lynx'는 테스트되지 않았고 R 3.1.0에서는 지원되지 않습니다"
+
+#~ msgid ""
+#~ "If nothing happens, you should open\n"
+#~ "'%s' yourself"
+#~ msgstr ""
+#~ "만약 아무것도 일어나지 않았다면\n"
+#~ "'%s'를 직접 열어봐야합니다"
+
+#~ msgid "test '%s' is not available"
+#~ msgstr "테스트 '%s'는 사용할 수 없습니다"
+
 #~ msgid "broken installation, no CITATION file in the base package."
 #~ msgstr "설치시 문제로 인하여 base 패키지 내에 CITATION 파일이 없습니다."
 
diff --git a/src/library/utils/po/R-pl.po b/src/library/utils/po/R-pl.po
index f4884a5..5a571ba 100644
--- a/src/library/utils/po/R-pl.po
+++ b/src/library/utils/po/R-pl.po
@@ -1,8 +1,8 @@
 msgid ""
 msgstr ""
-"Project-Id-Version: R 3.1.0\n"
+"Project-Id-Version: R 3.4.0\n"
 "Report-Msgid-Bugs-To: bugs.r-project.org\n"
-"POT-Creation-Date: 2014-02-27 17:14\n"
+"POT-Creation-Date: 2016-04-04 19:01\n"
 "PO-Revision-Date: \n"
 "Last-Translator: Łukasz Daniel <lukasz.daniel at gmail.com>\n"
 "Language-Team: Łukasz Daniel <lukasz.daniel at gmail.com>\n"
@@ -13,2339 +13,1984 @@ msgstr ""
 "na-Revision-Date: 2012-05-29 07:55+0100\n"
 "Plural-Forms: nplurals=3; plural=(n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 "
 "|| n%100>=20) ? 1 : 2);\n"
-"X-Poedit-SourceCharset: iso-8859-1\n"
-"X-Generator: Poedit 1.5.4\n"
+"X-Poedit-SourceCharset: UTF-8\n"
+"X-Generator: Poedit 1.8.7.1\n"
 "X-Poedit-Bookmarks: -1,203,-1,-1,-1,-1,-1,-1,-1,-1\n"
 
-# utils/R/RShowDoc.R: 42
-# message("   RShowDoc() should be used with a character string argument specifying\n   a documentation file")
-msgid ""
-"RShowDoc() should be used with a character string argument specifying\n"
-"   a documentation file"
-msgstr ""
-"'RShowDoc()' powinien być użyty z argumentem tekstowym określającym plik "
-"dokumentacji"
-
-# utils/R/RShowDoc.R: 82
-# stop(gettextf("no documentation for %s found in package %s",
-#                       sQuote(what), sQuote(package)), domain = NA)
-msgid "no documentation for %s found in package %s"
-msgstr "nie znaleziono dokumentacji dla %s w pakiecie %s"
-
-# utils/R/RShowDoc.R: 162
-# stop("document not found")
-msgid "document not found"
-msgstr "dokument nie został znaleziony"
-
-# utils/R/RSiteSearch.R: 52
-# gettextf("A search query has been submitted to %s",
-#                  "http://search.r-project.org")
-msgid "A search query has been submitted to %s"
-msgstr "Zapytanie zostało przekazane do %s"
-
-# utils/R/RSiteSearch.R: 54
-# gettext("The results page should open in your browser shortly\n")
-msgid "The results page should open in your browser shortly"
-msgstr "Za moment strona z wynikami powinna otworzyć sie w twojej przeglądarce"
-
-# utils/R/Sweave.R: 146
-# warning(gettextf("reference to unknown chunk %s",
-#                                      sQuote(chunkref)),
-#                             call. = TRUE,domain = NA)
-msgid "reference to unknown chunk %s"
-msgstr "referencja do nieznanego fragmentu %s"
-
-# utils/R/Sweave.R: 202
-# stop(gettextf("no Sweave file with name %s found",
-#                           sQuote(file[1L])), domain = NA)
-msgid "no Sweave file with name %s found"
-msgstr "nie znaleziono pliku 'Sweave' o nazwie %s"
+#. R/example.R: gettextf("%s has a help file but no examples", sQuote(topic))
+#: R/example.R:0
+msgid "%s has a help file but no examples"
+msgstr "%s posiada plik pomocy, ale nie ma przykładów"
 
-# utils/R/Sweave.R: 205
-# stop(paste(gettextf("%d Sweave files for basename %s found",
-#                                 length(f), sQuote(file[1L])),
-#                        paste(":\n         ", f, collapse="")),
-#                  domain = NA)
-msgid "%d Sweave files for basename %s found"
-msgstr "znaleziono %d plik 'Sweave' dla nazwy bazowej %s"
-
-# utils/R/Sweave.R: 241
-# warning(gettextf("more than one syntax specification found, using the first one"),
-# 		domain = NA)
-msgid "more than one syntax specification found, using the first one"
-msgstr "znaleziono więcej niż jedno określenie składni, używanie pierwszego"
+#. R/citation.R: gettextf("%s has to be one of %s", sQuote("bibtype"), paste(BibTeX_names,     collapse = ", "))
+#. R/citation.R: gettextf("%s has to be one of %s", sQuote("bibtype"), paste(BibTeX_names,     collapse = ", "))
+#: R/citation.R:0
+msgid "%s has to be one of %s"
+msgstr "%s musi być jednym z %s"
 
-# utils/R/Sweave.R: 248
-# stop(gettextf("object %s does not have class \"SweaveSyntax\"",
-#                           sQuote(sname)), domain = NA)
-msgid "object %s does not have class \"SweaveSyntax\""
-msgstr "obiekt %s nie posiada klasy 'SweaveSyntax'"
+#. R/packages.R: gettextf("%s must be supplied", sQuote("available"))
+#: R/packages.R:0
+msgid "%s must be supplied"
+msgstr "%s musi być dostarczone"
 
-# utils/R/Sweave.R: 260
-# stop(paste(gettextf("recursive Sweave input %s in stack",
-#                                     sQuote(ifile)),
-#                            paste("\n         ", seq_len(file), ": ",
-#                                  rev(file), collapse="")),
-#                  domain = NA)
-msgid "recursive Sweave input %s in stack"
-msgstr "rekursywne wejście 'Sweave' %s na stosie"
+#. R/readhttp.R: gettextf("%s option must be a length one character vector or NULL",     sQuote("HTTPUserAgent"))
+#: R/readhttp.R:0
+msgid "%s option must be a length one character vector or NULL"
+msgstr ""
+"opcja %s musi być wektorem tekstowym o długości jeden lub wartością NULL"
 
-# utils/R/Sweave.R: 343
-# stop(gettextf("target syntax not of class %s",
-#                       dQuote("SweaveSyntax")),
-#              domain = NA)
-msgid "target syntax not of class %s"
-msgstr "docelowa składnia nie jest klasy %s"
+#. R/citation.R: gettextf("%s should be one of %s", sQuote("style"), paste(dQuote(bibentry_format_styles),     collapse = ", "))
+#: R/citation.R:0
+msgid "%s should be one of %s"
+msgstr "%s powinno być jednym z %s"
 
-# utils/R/Sweave.R: 347
-# stop("target syntax contains no translation table")
-msgid "target syntax contains no translation table"
-msgstr "docelowa składnia nie zawiera tablicy tłumaczenia"
+#. R/objects.R: gettextf("'%s' is a formal generic function; S3 methods will not likely be found",     fname)
+#: R/objects.R:0
+msgid "'%s' is a formal generic function; S3 methods will not likely be found"
+msgstr ""
+"'%s' jest formalną ogólną funkcją; metody S3 prawdopodobnie nie zostaną "
+"znalezione"
 
-# utils/R/Sweave.R: 386
-# stop(gettextf("parse error or empty option in\n%s", text), domain = NA)
+#. R/indices.R: warning("'DESCRIPTION' file has an 'Encoding' field and re-encoding is not possible",     call. = FALSE)
+#: R/indices.R:0
 msgid ""
-"parse error or empty option in\n"
-"%s"
-msgstr "błąd parsowania lub pusta opcja w %s"
+"'DESCRIPTION' file has an 'Encoding' field and re-encoding is not possible"
+msgstr ""
+"plilk 'DESCRIPTION' posiada pole 'Encoding' i ponowne kodowanie nie jest "
+"możliwe"
 
-# utils/R/Sweave.R: 488
-# message(gettextf("Warning: unknown option %s", sQuote(a)),
-#                     domain = NA)
-# utils/R/Sweave.R: 590
-# message(gettextf("Warning: unknown option %s", sQuote(a)),
-#                     domain = NA)
-msgid "Warning: unknown option %s"
-msgstr "Ostrzeżenie: nieznana opcja %s"
+#. R/combn.R: stop("'FUN' must be a function or NULL")
+#: R/combn.R:0
+msgid "'FUN' must be a function or NULL"
+msgstr "argument 'FUN' musi być funkcją lub wartością NULL"
 
-# utils/R/Sweave.R: 505
-# message("Output file:  ", output)
-# utils/R/Sweave.R: 606
-# message("Output file:  ", output)
-msgid "Output file:"
-msgstr "Plik wyjściowy:"
+#. R/read.DIF.R: gettextf("'as.is' has the wrong length %d  != cols = %d", length(as.is),     cols)
+#. R/readtable.R: gettextf("'as.is' has the wrong length %d  != cols = %d", length(as.is),     cols)
+#: R/read.DIF.R:0 R/readtable.R:0
+msgid "'as.is' has the wrong length %d  != cols = %d"
+msgstr "'as.is' posiada niepoprawną długość %d != kolumny = %d"
 
-# utils/R/Sweave.R: 511
-# message("Compacting PDF document")
-msgid "Compacting PDF document"
-msgstr "Kompaktowanie dokumentu PDF"
+#. R/help.start.R: stop("'browser' must be a non-empty character string")
+#: R/help.start.R:0
+msgid "'browser' must be a non-empty character string"
+msgstr "argument 'browser' musi być niepustym łańcuchem tekstowym"
 
-# utils/R/SweaveDrivers.R: 58
-# warning(gettextf("path to %s contains spaces,\n", sQuote(styfile)),
-#                     gettext("this may cause problems when running LaTeX"),
-#                     domain = NA)
-msgid "path to %s contains spaces,"
-msgstr "ścieżka do %s zawiera spacje,"
+#. R/unix/create.post.R: stop("'ccaddress' must be of length 1")
+#. R/unix/create.post.R: stop("'ccaddress' must be of length 1")
+#. R/windows/create.post.R: stop("'ccaddress' must be of length 1")
+#: R/unix/create.post.R:0 R/windows/create.post.R:0
+msgid "'ccaddress' must be of length 1"
+msgstr "argument 'ccaddress' musi być długości 1"
 
-# utils/R/SweaveDrivers.R: 58
-# warning(gettextf("path to %s contains spaces,\n", sQuote(styfile)),
-#                     gettext("this may cause problems when running LaTeX"),
-#                     domain = NA)
-msgid "this may cause problems when running LaTeX"
-msgstr "to może spowodować problemy podczas uruchamiania LaTeX'a"
+#. R/package.skeleton.R: stop("'code_files' must be a character vector")
+#: R/package.skeleton.R:0
+msgid "'code_files' must be a character vector"
+msgstr "argument 'code_files' musi być wektorem tekstowym"
 
-# utils/R/SweaveDrivers.R: 507
-# stop(gettextf("the output file '%s' has disappeared", outputname))
-msgid "the output file '%s' has disappeared"
-msgstr "plik wyjściowy '%s' zniknął"
+#. R/write.table.R: stop("'col.names = NA' makes no sense when 'row.names = FALSE'")
+#: R/write.table.R:0
+msgid "'col.names = NA' makes no sense when 'row.names = FALSE'"
+msgstr "'col.names = NA' nie ma sensu kiedy 'row.names = FALSE'"
 
-# utils/R/SweaveDrivers.R: 583
-# stop(gettextf("invalid value for %s : %s", sQuote(opt), oldval),
-#                  domain = NA)
-msgid "invalid value for %s : %s"
-msgstr "niepoprawna wartość dla %s: %s"
+#. R/tar.R: stop("'compressed' must be logical or character")
+#: R/tar.R:0
+msgid "'compressed' must be logical or character"
+msgstr "argument 'compressed' musi być wartością logiczną lub znakiem"
 
-# utils/R/SweaveDrivers.R: 590
-# warning("value of 'results' option should be lowercase",
-#                     call. = FALSE)
-msgid "value of 'results' option should be lowercase"
-msgstr "wartość opcji 'results' powinna być pisana małymi literami"
+#. R/packages.R: stop("'destdir' is not a directory")
+#: R/packages.R:0
+msgid "'destdir' is not a directory"
+msgstr "wartość 'destdir' nie jest katalogiem"
 
-# utils/R/SweaveDrivers.R: 599
-# warning("value of 'strip.white' option should be lowercase",
-#                     call. = FALSE)
-msgid "value of 'strip.white' option should be lowercase"
-msgstr "wartość opcji 'strip.white' powinna być pisana małymi literami"
+#. R/unix/download.file.R: stop("'destfile' must be a length-one character vector")
+#. R/unix/download.file.R: stop("'destfile' must be a length-one character vector")
+#. R/windows/download.file.R: stop("'destfile' must be a length-one character vector")
+#. R/windows/download.file.R: stop("'destfile' must be a length-one character vector")
+#: R/unix/download.file.R:0 R/windows/download.file.R:0
+msgid "'destfile' must be a length-one character vector"
+msgstr "argument 'destfile' musi wektorem tekstowym o długości 1"
 
-# utils/R/apropos.R: 44
-# warning("elements of 'what' after the first will be ignored")
-msgid "elements of 'what' after the first will be ignored"
-msgstr "elementy 'what' po pierwszym będą zignorowane"
+#. R/str.R: warning("'digits' and 'digits.d' are both specified and the latter is not used")
+#: R/str.R:0
+msgid "'digits' and 'digits.d' are both specified and the latter is not used"
+msgstr ""
+"obydwa 'digits' oraz 'digits.d' są zdefiniowane i ostatni nie jest używany"
 
-# utils/R/aspell.R: 31
-# stop("No suitable spell-checker program found")
-msgid "No suitable spell-checker program found"
-msgstr "Nie znaleziono odpowiedniego programu do sprawdzania pisowni"
+#. R/packages.R: gettextf("'download.file()' error code '%d'", m)
+#: R/packages.R:0
+msgid "'download.file()' error code '%d'"
+msgstr "kod błędu '%d' w funkcji 'download.file()'"
 
-# utils/R/aspell.R: 62
-# warning(gettextf("Filter '%s' is not available.",
-#                              filter_name),
-#                     domain = NA)
-# utils/R/aspell.R: 75
-# warning(gettextf("Filter '%s' is not available.",
-#                              filter_name),
-#                     domain = NA)
-msgid "Filter '%s' is not available."
-msgstr "Filtr '%s' nie jest dostępny."
+#. R/debugger.R: gettextf("'dump' is empty\n")
+#: R/debugger.R:0
+msgid "'dump' is empty"
+msgstr "'dump' jest puste"
 
-# utils/R/aspell.R: 80
-# stop("Invalid 'filter' argument.")
-msgid "Invalid 'filter' argument."
-msgstr "niepoprawny argument 'filter'"
+#. R/debugger.R: gettextf("'dump' is not an object of class %s\n", dQuote("dump.frames"))
+#: R/debugger.R:0
+msgid "'dump' is not an object of class %s"
+msgstr "argument 'dump' nie jest obiektem klasy %s"
 
-# utils/R/aspell.R: 98
-# warning(gettextf("The following dictionaries were not found:\n%s",
-#                              paste(sprintf("  %s", dictionaries[ind]),
-#                                    collapse = "\n")),
-#                     domain = NA)
-msgid ""
-"The following dictionaries were not found:\n"
-"%s"
-msgstr ""
-"Następujące słowniki nie zostały znalezione:\n"
-"%s"
+#. R/packages2.R: stop("'env' must be an environment")
+#: R/packages2.R:0
+msgid "'env' must be an environment"
+msgstr "argument 'env' musi być środowiskiem"
 
-# utils/R/rtags.R: 192
-# message(gettextf("Processing file %s", s), domain = NA)
-# utils/R/aspell.R: 146
-# message(gettextf("Processing file %s", fname),
-#                     domain = NA)
-msgid "Processing file %s"
-msgstr "Przetwarzanie pliku %s"
+#. R/progressBar.R: stop("'file' must be \"\" or an open connection object")
+#: R/progressBar.R:0
+msgid "'file' must be \"\" or an open connection object"
+msgstr "argument 'file' musi być \"\" lub obiektem otwartego połączenia"
 
-# utils/R/aspell.R: 176
-# stop(gettextf("Running aspell failed with diagnostics:\n%s",
-# 			  paste(out$stderr, collapse = "\n")),
-#                  domain = NA)
-msgid ""
-"Running aspell failed with diagnostics:\n"
-"%s"
+#. R/capture.output.R: stop("'file' must be NULL, a character string or a connection")
+#: R/capture.output.R:0
+msgid "'file' must be NULL, a character string or a connection"
 msgstr ""
-"Uruchomienie 'aspell' nie powiodło się z przyczyn:\n"
-"%s"
+"argument 'file' musi być wartością NULL, łańcuchem tekstowym lub połączeniem"
 
-# utils/R/aspell.R: 1071
-# stop("No suitable spell check program found.")
-msgid "No suitable spell check program found."
-msgstr "Nie znaleziono odpowiedniego programu do sprawdzania pisowni."
+#. R/readtable.R: stop("'file' must be a character string or connection")
+#. R/readtable.R: stop("'file' must be a character string or connection")
+#. R/write.table.R: stop("'file' must be a character string or connection")
+#: R/readtable.R:0 R/write.table.R:0
+msgid "'file' must be a character string or connection"
+msgstr ""
+"argument 'file' musi być wartością NULL, łańcuchem tekstowym lub połączeniem"
 
-# utils/R/browseVignettes.R: 31
-# sprintf(gettext("Use <code> %s </code> \n to list the vignettes in all <strong>available</strong> packages."),
-#                      "browseVignettes(all = TRUE)")
-msgid ""
-"Use <code> %s </code> \n"
-" to list the vignettes in all <strong>available</strong> packages."
+#. R/zip.R: stop("'files' must a character vector specifying one or more filepaths")
+#: R/zip.R:0
+msgid "'files' must a character vector specifying one or more filepaths"
 msgstr ""
-"Użycie <code> %s </code> \n"
-" aby wylistować ilustracje we wszystkich <strong>dostępnych</strong> "
-"pakietach."
+"argument 'files' musi być wektorem tekstowym określającym jedną lub więcej "
+"ścieżek do plików"
 
-# utils/R/browseVignettes.R: 40
-# message(gettextf("No vignettes found by %s",
-#                          paste(deparse(attr(x, "call")), collapse=" ")),
-#                 domain = NA)
-msgid "No vignettes found by %s"
-msgstr "Nie znaleziono ilustracji poprzez %s"
+#. R/fix.R: stop("'fix' requires a name")
+#: R/fix.R:0
+msgid "'fix' requires a name"
+msgstr "funkcja 'fix()' wymaga nazwy"
 
-# utils/R/bug.report.R: 57
-# stop(gettextf("Package %s: DESCRIPTION file not found",
-#                       sQuote(package)), domain = NA)
-msgid "Package %s: DESCRIPTION file not found"
-msgstr "Pakiet %s: nie znaleziono pliku DESCRIPTION"
+#. R/objects.R: stop("'fixInNamespace' requires a name")
+#: R/objects.R:0
+msgid "'fixInNamespace' requires a name"
+msgstr "funkcja 'fixInNamespace' wymaga nazwy"
 
-# utils/R/capture.output.R: 32
-# stop("'file' must be NULL, a character string or a connection")
-msgid "'file' must be NULL, a character string or a connection"
-msgstr ""
-"argument 'file' musi być wartością NULL, łańcuchem tekstowym lub połączeniem"
+#. R/frametools.R: stop("'form' must be a two-sided formula")
+#: R/frametools.R:0
+msgid "'form' must be a two-sided formula"
+msgstr "'form' musi być dwustronną formułą"
 
-# utils/R/capture.output.R: 47
-# stop("bad argument")
-msgid "bad argument"
-msgstr "niepoprawny argument"
+#. R/frametools.R: stop("'form' must be a two-sided formula with one term on each side")
+#: R/frametools.R:0
+msgid "'form' must be a two-sided formula with one term on each side"
+msgstr "'form' musi być dwustronną formułą z jednym członej po każdej stronie"
 
-# utils/R/changedFiles.R: 24
-# stop("'full.names' must be TRUE for multiple paths.")
+#. R/changedFiles.R: stop("'full.names' must be TRUE for multiple paths.")
+#: R/changedFiles.R:0
 msgid "'full.names' must be TRUE for multiple paths."
 msgstr "argument 'full.names' musi mieć wartość TRUE dla wielu ścieżek."
 
-# utils/R/changedFiles.R: 104
-# warning("Timestamp file no longer exists.")
-msgid "Timestamp file no longer exists."
-msgstr "Plik sygnatury czasu już nie istnieje."
+#. R/sock.R: stop("'host' must be character of length 1")
+#: R/sock.R:0
+msgid "'host' must be character of length 1"
+msgstr "argument 'host' musi być tekstem o długości 1"
 
-# utils/R/citation.R: 36
-# warning(gettextf("Not all arguments are of the same length, the following need to be recycled: %s",
-#                          paste(names(args)[!args_length_ok],
-#                                collapse = ", ")),
-#                 domain = NA)
-# utils/R/citation.R: 438
-# warning(gettextf("Not all arguments are of the same length, the following need to be recycled: %s",
-#                          paste(names(args)[!args_length_ok],
-#                                collapse = ", ")),
-#                 domain = NA)
-# utils/R/citation.R: 446
-# warning(gettextf("Not all arguments are of the same length, the following need to be recycled: %s",
-#                          paste(names(other)[!other_length_ok],
-#                                collapse = ", ")),
-#                 domain = NA)
-msgid ""
-"Not all arguments are of the same length, the following need to be recycled: "
-"%s"
-msgstr ""
-"Nie wszystkie argumenty są tej samej długości, te argumenty muszą zostać "
-"powtórzone cyklicznie: %s"
+#. R/packages2.R: gettextf("'lib = \"%s\"' is not writable", lib)
+#: R/packages2.R:0
+msgid "'lib = \"%s\"' is not writable"
+msgstr "'lib = \"%s\"' nie jest zapisywalna"
 
-# utils/R/citation.R: 54
-# stop(gettextf("Use either %s or %s/%s but not both.",
-#                               sQuote("given"),
-#                               sQuote("first"), sQuote("middle")),
-#                      domain = NA)
-msgid "Use either %s or %s/%s but not both."
-msgstr "Użyj albo %s albo %s/%s ale nie obu"
+#. R/package.skeleton.R: stop("'list' must be a character vector naming R objects")
+#: R/package.skeleton.R:0
+msgid "'list' must be a character vector naming R objects"
+msgstr "argument 'list' musi być wektorem tekstowym nazywającym obiekty R"
 
-# utils/R/citation.R: 60
-# message(gettextf("It is recommended to use %s instead of %s.",
-#                              sQuote("given"), sQuote("first")),
-#                     domain = NA)
-# utils/R/citation.R: 69
-# message(gettextf("It is recommended to use %s instead of %s.",
-#                              sQuote("given"), sQuote("middle")),
-#                     domain = NA)
-# utils/R/citation.R: 83
-# message(gettextf("It is recommended to use %s instead of %s.",
-#                              sQuote("family"), sQuote("last")),
-#                     domain = NA)
-msgid "It is recommended to use %s instead of %s."
-msgstr "Zalecane jest użycie %s zamiast %s"
+#. R/unix/sysutils.R: warning("'memory.limit()' is Windows-specific", call. = FALSE)
+#: R/unix/sysutils.R:0
+msgid "'memory.limit()' is Windows-specific"
+msgstr "funkcja 'memory.limit()' jest specyficzna dla systemów Windows"
 
-# utils/R/citation.R: 78
-# stop(gettextf("Use either %s or %s but not both.",
-#                               sQuote("family"), sQuote("last")),
-#                      domain = NA)
-msgid "Use either %s or %s but not both."
-msgstr "Użyj albo %s albo %s ale nie obu"
+#. R/unix/sysutils.R: warning("'memory.size()' is Windows-specific", call. = FALSE)
+#: R/unix/sysutils.R:0
+msgid "'memory.size()' is Windows-specific"
+msgstr "funkcja 'memory.size()' jest specyficzna dla systemów Windows"
 
-# utils/R/citation.R: 195
-# message(gettextf("It is recommended to use %s/%s instead of %s/%s/%s.",
-#                          sQuote("given"), sQuote("family"),
-#                          sQuote("first"), sQuote("middle"), sQuote("last")),
-#                 domain = NA)
-msgid "It is recommended to use %s/%s instead of %s/%s/%s."
-msgstr "Zalecane jest użycie %s/%s zamiast %s/%s/%s"
+#. R/de.R: warning("'modes' argument ignored")
+#. R/de.R: warning("'modes' argument ignored")
+#: R/de.R:0
+msgid "'modes' argument ignored"
+msgstr "argument 'modes' został zignorowany"
 
-# utils/R/citation.R: 247
-# warning(gettextf("method is only applicable to %s objects",
-#                          sQuote("person")),
-#                 domain = NA)
-# utils/R/citation.R: 932
-# warning(gettextf("method is only applicable to %s objects",
-#                          sQuote("bibentry")),
-#                 domain = NA)
-msgid "method is only applicable to %s objects"
-msgstr "metoda jest stosowalna jedynie do obiektów %s"
+#. R/de.R: warning("'names' argument ignored")
+#: R/de.R:0
+msgid "'names' argument ignored"
+msgstr "argument 'names' został zignorowany"
 
-# utils/R/citation.R: 336
-# stop(gettextf("all arguments must be of class %s",
-#                       dQuote("person")),
-#              domain = NA)
-msgid "all arguments must be of class %s"
-msgstr "wszystkie argumenty muszą być klasy %s"
+#. R/str.R: warning("'object' does not have valid levels()")
+#: R/str.R:0
+msgid "'object' does not have valid levels()"
+msgstr "'object' nie posiada poprawnych wartości 'levels()'"
 
-# utils/R/citation.R: 427
-# stop("all fields have to be named")
-msgid "all fields have to be named"
-msgstr "wszystkie pola muszą być nazwane"
+#. R/data.R: stop("'package' must be a character string or NULL")
+#: R/data.R:0
+msgid "'package' must be a character string or NULL"
+msgstr "argument 'package' musi być łańcuchem tekstowym lub wartością NULL"
 
-# utils/R/citation.R: 460
-# stop(gettextf("%s has to be one of %s",
-#                           sQuote("bibtype"),
-#                           paste(BibTeX_names, collapse = ", ")),
-#                  domain = NA)
-# utils/R/citation.R: 898
-# stop(gettextf("%s has to be one of %s",
-#                           sQuote("bibtype"),
-#                           paste(BibTeX_names, collapse = ", ")),
-#                  domain = NA)
-msgid "%s has to be one of %s"
-msgstr "%s musi być jednym z %s"
+#. R/progressBar.R: gettextf("'pb' is not from class %s", dQuote("txtProgressBar"))
+#. R/progressBar.R: gettextf("'pb' is not from class %s", dQuote("txtProgressBar"))
+#. R/windows/winDialog.R: gettextf("'pb' is not from class %s", dQuote("winProgressBar"))
+#. R/windows/winDialog.R: gettextf("'pb' is not from class %s", dQuote("winProgressBar"))
+#: R/progressBar.R:0 R/windows/winDialog.R:0
+msgid "'pb' is not from class %s"
+msgstr "'pb' nie pochodzi z klasy %s"
 
-# utils/R/citation.R: 567
-# warning("subscript out of bounds")
-msgid "subscript out of bounds"
-msgstr "indeks poza granicami"
+#. R/sock.R: stop("'port' must be integer of length 1")
+#: R/sock.R:0
+msgid "'port' must be integer of length 1"
+msgstr "argument 'port' musi być liczbą całkowitą o długości 1"
 
-# utils/R/citation.R: 585
-# stop(gettextf("%s should be one of %s",
-#                       sQuote("style"),
-#                       paste(dQuote(bibentry_format_styles),
-#                             collapse = ", ")),
-#              domain = NA)
-msgid "%s should be one of %s"
-msgstr "%s powinno być jednym z %s"
+#. R/packages.R: stop("'priority' must be character or NULL")
+#: R/packages.R:0
+msgid "'priority' must be character or NULL"
+msgstr "argument 'priority' musi być tekstem lub wartością NULL"
 
-msgid "A BibTeX entry for LaTeX users is"
-msgstr "Wpis BibTex dla użytkowników LaTeX to"
+#. R/write.table.R: stop("'quote' must be 'TRUE', 'FALSE' or numeric")
+#: R/write.table.R:0
+msgid "'quote' must be 'TRUE', 'FALSE' or numeric"
+msgstr "argument 'quote' musi mieć wartość TRUE, FALSE lub musi być liczbą"
 
-# utils/R/citation.R: 709
-# warning(gettextf("Dropping invalid entry %d:\n%s",
-#                                  pc[b],
-#                                  conditionMessage(status[[b]])))
-msgid ""
-"Dropping invalid entry %d:\n"
-"%s"
+#. R/str.R: warning("'str.default': 'le' is NA, so taken as 0", immediate. = TRUE)
+#: R/str.R:0
+msgid "'str.default': 'le' is NA, so taken as 0"
 msgstr ""
-"Usuwanie niepoprawnego wpisu %d:\n"
-"%s"
-
-# utils/R/indices.R: 148
-# stop(gettextf("package %s not found", sQuote(pkg)), domain = NA)
-# utils/R/citation.R: 1076
-# stop(gettextf("package %s not found", sQuote(package)),
-#                  domain = NA)
-msgid "package %s not found"
-msgstr "pakiet %s nie został znaleziony"
+"'str.default': argument 'le' ma wartość NA, w związku z tym została przyjęta "
+"wartość 0"
 
-# utils/R/citation.R: 1106
-# warning(gettextf("no date field in DESCRIPTION file of package %s",
-#                              sQuote(package)),
-#                     domain = NA)
-msgid "no date field in DESCRIPTION file of package %s"
-msgstr "brak pola daty w pliku DESCRIPTION pakietu %s"
+#. R/unix/create.post.R: stop("'subject' is missing")
+#: R/unix/create.post.R:0
+msgid "'subject' is missing"
+msgstr "brakuje 'subject'"
 
-# utils/R/citation.R: 1111
-# warning(gettextf("could not determine year for %s from package DESCRIPTION file",
-#                              sQuote(package)),
-#                     domain = NA)
-msgid "could not determine year for %s from package DESCRIPTION file"
-msgstr "nie można było określić roku dla %s z pliku DESCRIPTION pakietu"
+#. R/unix/mac.install.R: gettextf("'tar' returned non-zero exit code %d", xcode)
+#: R/unix/mac.install.R:0
+msgid "'tar' returned non-zero exit code %d"
+msgstr "funkcja 'tar' zwróciła niezerowy kod %d wyjścia"
 
-# utils/R/citation.R: 1156
-# gettextf("To cite package %s in publications use:",
-#                  sQuote(package))
-msgid "To cite package %s in publications use:"
-msgstr "Aby zacytować pakiet %s w publikacjach użyj:"
+#. R/tar.R: stop("'tarfile' must be a character string or a connection")
+#. R/tar.R: stop("'tarfile' must be a character string or a connection")
+#: R/tar.R:0
+msgid "'tarfile' must be a character string or a connection"
+msgstr "argument 'tarfile' musi być łańcuchem tekstowym lub połączeniem"
 
-# utils/R/citation.R: 1165
-# gettextf("ATTENTION: This citation information has been auto-generated from the package DESCRIPTION file and may need manual editing, see %s.",
-#                  sQuote("help(\"citation\")"))
-msgid ""
-"ATTENTION: This citation information has been auto-generated from the "
-"package DESCRIPTION file and may need manual editing, see %s."
+#. R/widgets.R: stop("'title' must be NULL or a length-1 character vector")
+#: R/widgets.R:0
+msgid "'title' must be NULL or a length-1 character vector"
 msgstr ""
-"UWAGA: Informacja o cytowaniu została automatycznie wygenerowana z pliku "
-"DESCRIPTION pakietu i może wymagać ręcznej edycji, sobacz %s."
-
-# utils/R/combn.R: 49
-# stop("'FUN' must be a function or NULL")
-msgid "'FUN' must be a function or NULL"
-msgstr "argument 'FUN' musi być funkcją lub wartością NULL"
-
-# utils/R/completion.R: 780
-# warning("cannot handle S4 methods yet")
-msgid "cannot handle S4 methods yet"
-msgstr "jeszcze nie można obsłużyć metod S4"
-
-# utils/R/data.R: 36
-# stop("'package' must be a character string or NULL")
-msgid "'package' must be a character string or NULL"
-msgstr "argument 'package' musi być łańcuchem tekstowym lub wartością NULL"
+"argument 'title' musi być wartością NULL lub wektorem tekstowym o długości 1"
 
-# utils/R/data.R: 38
-# warning("datasets have been moved from package 'base' to package 'datasets'")
-msgid "datasets have been moved from package 'base' to package 'datasets'"
+#. R/help.R: stop("'topic' should be a name, length-one character vector or reserved word")
+#: R/help.R:0
+msgid "'topic' should be a name, length-one character vector or reserved word"
 msgstr ""
-"zbiory danych zostały przeniesione z pakietu 'base' do pakietu 'datasets'"
+"'topic' powinien być nazwą, wektorem tekstowym o długości jeden albo "
+"zarezerwowanym słowem"
 
-# utils/R/data.R: 40
-# warning("datasets have been moved from package 'stats' to package 'datasets'")
-msgid "datasets have been moved from package 'stats' to package 'datasets'"
-msgstr ""
-"zbiory danych zostały przeniesione z pakietu 'stats' do pakietu 'datasets'"
+#. R/zip.R: stop("'unzip' must be a single character string")
+#: R/zip.R:0
+msgid "'unzip' must be a single character string"
+msgstr "argument 'unzip' musi być pojedynczym łańcuchem tekstowym"
 
-# utils/R/data.R: 85
-# warning(gettextf("data index for package %s is invalid and will be ignored",
-#                                      sQuote(packageName)),
-#                             domain=NA, call.=FALSE)
-msgid "data index for package %s is invalid and will be ignored"
-msgstr "indeks danych dla pakietu %s jest niepoprawny i zostanie zignorowany"
+#. R/unix/download.file.R: stop("'url' must be a length-one character vector")
+#. R/unix/download.file.R: stop("'url' must be a length-one character vector")
+#. R/unix/download.file.R: stop("'url' must be a length-one character vector")
+#. R/windows/download.file.R: stop("'url' must be a length-one character vector")
+#. R/windows/download.file.R: stop("'url' must be a length-one character vector")
+#. R/windows/download.file.R: stop("'url' must be a length-one character vector")
+#: R/unix/download.file.R:0 R/windows/download.file.R:0
+msgid "'url' must be a length-one character vector"
+msgstr "argument 'url' musi być wektorem tekstowym o długości 1"
+
+#. R/help.start.R: stop("'url' must be a non-empty character string")
+#: R/help.start.R:0
+msgid "'url' must be a non-empty character string"
+msgstr "argument 'url' musi być niepustym łańcuchem tekstowym"
 
-# utils/R/data.R: 140
-# warning(gettextf("file 'filelist' is missing for directory %s", sQuote(p)), domain = NA)
-msgid "file 'filelist' is missing for directory %s"
-msgstr "brakuje pliku 'filelist' w katalogu %s"
+#. R/packages.R: gettext("--- Please select a CRAN mirror for use in this session ---")
+#: R/packages.R:0
+msgid "--- Please select a CRAN mirror for use in this session ---"
+msgstr "--- Proszę wybrać serwer lustrzany CRAN do użycia w tej sesji ---"
 
-# utils/R/data.R: 211
-# warning(gettextf("data set %s not found", sQuote(name)),
-#                     domain = NA)
-msgid "data set %s not found"
-msgstr "zbiór danych %s nie został znaleziony"
+#. R/packages.R: gettext("--- Please select repositories for use in this session ---\n")
+#: R/packages.R:0
+msgid "--- Please select repositories for use in this session ---"
+msgstr "--- Proszę wybrać repozytoria do użycia w tej sesji ---"
 
-# utils/R/databrowser.R: 185
-# stop("only 'html = TRUE' is supported on this platform")
-msgid "only 'html = TRUE' is supported on this platform"
-msgstr "jedynie 'html = TRUE' jest wspierane na tej platformie"
+#. R/citation.R: gettext("\nA BibTeX entry for LaTeX users is\n")
+#: R/citation.R:0
+msgid "A BibTeX entry for LaTeX users is"
+msgstr "Wpis BibTex dla użytkowników LaTeX to"
 
-# utils/R/databrowser.R: 195
-# stop(gettextf("kind '%s' not yet implemented", kind), domain = NA)
-msgid "kind '%s' not yet implemented"
-msgstr "rodzaj '%s' nie został jeszcze zaimplementowany"
+#. R/RSiteSearch.R: gettextf("A search query has been submitted to %s", "http://search.r-project.org")
+#: R/RSiteSearch.R:0
+msgid "A search query has been submitted to %s"
+msgstr "Zapytanie zostało przekazane do %s"
 
-# utils/R/databrowser.R: 202
-# stop("wrong number of table row entries")
-msgid "wrong number of table row entries"
-msgstr "błędna liczba wpisów w wierszach tabeli"
+#. R/citation.R: gettextf("ATTENTION: This citation information has been auto-generated from the package DESCRIPTION file and may need manual editing, see %s.",     sQuote("help(\"citation\")"))
+#: R/citation.R:0
+msgid ""
+"ATTENTION: This citation information has been auto-generated from the "
+"package DESCRIPTION file and may need manual editing, see %s."
+msgstr ""
+"UWAGA: Informacja o cytowaniu została automatycznie wygenerowana z pliku "
+"DESCRIPTION pakietu i może wymagać ręcznej edycji, sobacz %s."
 
-# utils/R/de.R: 30
-# stop("wrong argument to 'dataentry'")
-# utils/R/de.R: 38
-# stop("wrong argument to 'dataentry'")
-# utils/R/de.R: 78
-# stop("wrong argument to 'dataentry'")
-msgid "wrong argument to 'dataentry'"
-msgstr "niepoprawny argument przekazany do 'dataentry'"
+#. R/debugger.R: gettext("Available environments had calls:\n")
+#: R/debugger.R:0
+msgid "Available environments had calls:"
+msgstr "Dostępne środowiska miały wywołania:"
 
-# utils/R/de.R: 100
-# warning("could not restore type information")
-msgid "could not restore type information"
-msgstr "nie można przywrócić informacji o typie"
+#. R/debugger.R: gettext("Browsing in the environment with call:\n   ")
+#: R/debugger.R:0
+msgid "Browsing in the environment with call:"
+msgstr "Przeglądanie w środowisku z wywołaniem:"
 
-# utils/R/de.R: 148
-# warning("'modes' argument ignored")
-# utils/R/de.R: 168
-# warning("'modes' argument ignored")
-msgid "'modes' argument ignored"
-msgstr "argument 'modes' został zignorowany"
+#. R/debugcall.R: stop("Cannot debug primitive functions unless they are implicit generics (requires loading the methods package)")
+#: R/debugcall.R:0
+msgid ""
+"Cannot debug primitive functions unless they are implicit generics (requires "
+"loading the methods package)"
+msgstr ""
+"Nie można debugować funkcji prymitywnych o ile nie są one jawnymi funkcjami "
+"ogólnymi (wymaga załadowania pakietu 'methods')"
 
-# utils/R/de.R: 164
-# warning("'names' argument ignored")
-msgid "'names' argument ignored"
-msgstr "argument 'names' został zignorowany"
+#. R/help.R: gettext("Choose one")
+#: R/help.R:0
+msgid "Choose one"
+msgstr "Wybierz jeden"
 
-# utils/R/de.R: 177
-# warning("could not restore variables properly")
-msgid "could not restore variables properly"
-msgstr "nie można było poprawnie przywrócić zmiennych"
+#. R/Sweave.R: message("Compacting PDF document")
+#: R/Sweave.R:0
+msgid "Compacting PDF document"
+msgstr "Kompaktowanie dokumentu PDF"
 
-# utils/R/de.R: 191
-# warning("did not assign() anything")
-msgid "did not assign() anything"
-msgstr "nic nie przypisano"
+#. R/rtags.R: gettextf("Could not create file %s, aborting", ofile)
+#: R/rtags.R:0
+msgid "Could not create file %s, aborting"
+msgstr "Nie można było utworzyć pliku %s, przerywanie"
 
-# utils/R/debugger.R: 42
-# gettext("Browsing in the environment with call:\n   ")
-msgid "Browsing in the environment with call:"
-msgstr "Przeglądanie w środowisku z wywołaniem:"
+#. R/prompt.R: gettextf("Created file named %s.", sQuote(filename))
+#. R/prompt.R: gettextf("Created file named %s.", sQuote(filename))
+#. R/prompt.R: gettextf("Created file named %s.", sQuote(filename))
+#. R/prompt.R: gettextf("Created file named %s.", sQuote(filename))
+#: R/prompt.R:0
+msgid "Created file named %s."
+msgstr "Utworzono plik o nazwie %s."
 
-# utils/R/debugger.R: 48
-# gettextf("'dump' is not an object of class %s\n",
-#                      dQuote("dump.frames"))
-msgid "'dump' is not an object of class %s"
-msgstr "argument 'dump' nie jest obiektem klasy %s"
+#. R/indices.R: gettextf("DESCRIPTION file of package '%s' is corrupt", pkg)
+#: R/indices.R:0
+msgid "DESCRIPTION file of package '%s' is corrupt"
+msgstr "plik DESCRIPTION pakietu '%s' jest uszkodzony"
 
-# utils/R/debugger.R: 55
-# gettext("Message: ")
-msgid "Message:"
-msgstr "Wiadomość:"
+#. R/indices.R: gettextf("DESCRIPTION file of package '%s' is missing or broken",     pkg)
+#: R/indices.R:0
+msgid "DESCRIPTION file of package '%s' is missing or broken"
+msgstr "brakuje pliku DESCRIPTION pakietu '%s' lub jest on uszkodzony"
 
-# utils/R/debugger.R: 58
-# gettextf("'dump' is empty\n")
-msgid "'dump' is empty"
-msgstr "'dump' jest puste"
+#. R/demo.R: gettextf("Demo for topic %s' found more than once,\nusing the one found in %s",     sQuote(topic), sQuote(dirname(available[1L])))
+#: R/demo.R:0
+msgid ""
+"Demo for topic %s' found more than once,\n"
+"using the one found in %s"
+msgstr ""
+"Demo dla tematu %s' zostało znalezione więcej niż raz,\n"
+"używanie tego znalezionego w %s"
 
-# utils/R/debugger.R: 63
-# gettext("Available environments had calls:\n")
-msgid "Available environments had calls:"
-msgstr "Dostępne środowiska miały wywołania:"
+#. R/packages2.R: warning("Do not know which element of 'lib' to install dependencies into\nskipping dependencies")
+#: R/packages2.R:0
+msgid ""
+"Do not know which element of 'lib' to install dependencies into\n"
+"skipping dependencies"
+msgstr ""
+"Nie wiadomo, do którego elementu 'lib' zainstalować zależności\n"
+"pomijanie zależności"
 
-msgid "Enter an environment number, or 0 to exit"
-msgstr "Wpisz numer środowiska, lub 0 aby wyjść"
+#. R/packages2.R: message("Do you want to attempt to install these from sources?")
+#: R/packages2.R:0
+msgid "Do you want to attempt to install these from sources?"
+msgstr "Czy chcesz spróbować zainstalować je ze źródeł?"
 
-# utils/R/debugger.R: 131
-# gettext("recover called non-interactively; frames dumped, use debugger() to view\n")
-msgid "recover called non-interactively; frames dumped, use debugger() to view"
+#. R/citation.R: gettextf("Dropping invalid entry %d:\n%s", pc[b], conditionMessage(status[[b]]))
+#: R/citation.R:0
+msgid ""
+"Dropping invalid entry %d:\n"
+"%s"
 msgstr ""
-"przywrócenie wywołano nieinteraktywnie; ramki odrzucono, użyj 'debugger()' "
-"aby przeglądać"
+"Usuwanie niepoprawnego wpisu %d:\n"
+"%s"
 
-# utils/R/debugger.R: 148
-# gettext("No suitable frames for recover()\n")
-msgid "No suitable frames for recover()"
-msgstr "Brak odpowiednik ramek dla 'recover()'"
+#. R/unix/mac.install.R: gettextf("ERROR: failed to create lock directory %s", sQuote(lockdir))
+#. R/windows/install.packages.R: gettextf("ERROR: failed to create lock directory %s", sQuote(lockdir))
+#: R/unix/mac.install.R:0 R/windows/install.packages.R:0
+msgid "ERROR: failed to create lock directory %s"
+msgstr "BŁĄD: nie udało się utworzyć blokady katalogu %s"
 
-# utils/R/demo.R: 84
-# stop(gettextf("No demo found for topic %s", sQuote(topic)), domain = NA)
-msgid "No demo found for topic %s"
-msgstr "Nie znaleziono dema dla tematu %s"
+#. R/unix/mac.install.R: gettextf("ERROR: failed to lock directory %s for modifying\nTry removing %s",     sQuote(lib), sQuote(lockdir))
+#. R/windows/install.packages.R: gettextf("ERROR: failed to lock directory %s for modifying\nTry removing %s",     sQuote(lib), sQuote(lockdir))
+#: R/unix/mac.install.R:0 R/windows/install.packages.R:0
+msgid ""
+"ERROR: failed to lock directory %s for modifying\n"
+"Try removing %s"
+msgstr ""
+"BŁĄD: nie udało się zablokować katalogu %s do modyfikacji\n"
+"Spróbuj usunąć %s"
 
-# utils/R/demo.R: 87
-# warning(gettextf("Demo for topic %s' found more than once,\nusing the one found in %s",
-#                 sQuote(topic), sQuote(dirname(available[1L]))), domain = NA)
+#. R/prompt.R: gettext("Edit the file and move it to the appropriate directory.")
+#. R/prompt.R: gettext("Edit the file and move it to the appropriate directory.")
+#. R/prompt.R: gettext("Edit the file and move it to the appropriate directory.")
+#. R/prompt.R: gettext("Edit the file and move it to the appropriate directory.")
+#: R/prompt.R:0
+msgid "Edit the file and move it to the appropriate directory."
+msgstr "Edytuj ten plik i przenieś go do odpowiedniego katalogu."
+
+#. R/relist.R: stop("The 'flesh' argument does not contain a skeleton attribute.\n",     "Either ensure you unlist a relistable object, or specify the skeleton separately.")
+#: R/relist.R:0
 msgid ""
-"Demo for topic %s' found more than once,\n"
-"using the one found in %s"
+"Either ensure you unlist a relistable object, or specify the skeleton "
+"separately."
 msgstr ""
-"Demo dla tematu %s' zostało znalezione więcej niż raz,\n"
-"używanie tego znalezionego w %s"
+"Albo upewnij się, że odłączyłeś od listy wylistowany obiekt, albo określ "
+"strukturę oddzielnie."
 
-# utils/R/edit.R: 22
-# stop("invalid 'data' argument")
-msgid "invalid 'data' argument"
-msgstr "niepoprawny argument 'data'"
+#. R/debugger.R: gettext("\nEnter an environment number, or 0 to exit  ")
+#: R/debugger.R:0
+msgid "Enter an environment number, or 0 to exit"
+msgstr "Wpisz numer środowiska, lub 0 aby wyjść"
 
-# utils/R/edit.R: 25
-# stop("invalid 'modes' argument")
-msgid "invalid 'modes' argument"
-msgstr "niepoprawny argument 'modes'"
+#. R/menu.R: gettext("Enter an item from the menu, or 0 to exit\n")
+#: R/menu.R:0
+msgid "Enter an item from the menu, or 0 to exit"
+msgstr "Wprowadź pozycję z menu lub 0 aby wyjść"
 
-# utils/R/edit.R: 45
-# stop("invalid 'x' argument")
-msgid "invalid 'x' argument"
-msgstr "niepoprawny argument 'x'"
+#. R/widgets.R: gettext("Enter one or more numbers separated by spaces, or an empty line to cancel\n")
+#: R/widgets.R:0
+msgid ""
+"Enter one or more numbers separated by spaces, or an empty line to cancel"
+msgstr ""
+"Wprowadź jedną lub więcej liczb oddzielonych spacją, lub pustą linię aby "
+"anulować"
 
-# utils/R/edit.R: 71
-# stop("can only handle vector and factor elements")
-msgid "can only handle vector and factor elements"
-msgstr "można obsłużyć jedynie elementy wektora oraz czynnika"
+#. R/aspell.R: gettextf("Filter '%s' is not available.", filter_name)
+#. R/aspell.R: gettextf("Filter '%s' is not available.", filter_name)
+#: R/aspell.R:0
+msgid "Filter '%s' is not available."
+msgstr "Filtr '%s' nie jest dostępny."
 
-# utils/R/edit.R: 135
-# warning(gettextf("invalid factor levels in '%s'", names(out)[i]),
-#                         domain = NA)
-msgid "invalid factor levels in '%s'"
-msgstr "niepoprawne poziomy czynnika w '%s'"
+#. R/help.R: warning("HTML help is unavailable", call. = FALSE)
+#: R/help.R:0
+msgid "HTML help is unavailable"
+msgstr "Pomoc HTML jest niedostępna"
 
-# utils/R/edit.R: 144
-# warning(gettextf("added factor levels in '%s'", names(out)[i]),
-#                         domain = NA)
-msgid "added factor levels in '%s'"
-msgstr "dodane poziomy czynnika w '%s'"
+#. R/help.R: gettextf("Help for topic %s is not in any loaded package but can be found in the following packages:",     sQuote(topic))
+#: R/help.R:0
+msgid ""
+"Help for topic %s is not in any loaded package but can be found in the "
+"following packages:"
+msgstr ""
+"Pomocy dla tematu %s nie ma w żadnym załadowanym pakiecie ale może zostać "
+"znaleziona w następujących pakietach:"
 
-# utils/R/edit.R: 161
-# warning("edited row names contain duplicates and will be ignored")
-msgid "edited row names contain duplicates and will be ignored"
+#. R/help.R: gettextf("Help on topic %s was found in the following packages:",     sQuote(topic))
+#: R/help.R:0
+msgid "Help on topic %s was found in the following packages:"
+msgstr "Pomoc na temat %s została znaleziona w następujących pakietach:"
+
+#. R/help.start.R: gettextf("If nothing happens, you should open\n%s yourself\n",     sQuote(url))
+#: R/help.start.R:0
+msgid ""
+"If nothing happens, you should open\n"
+"%s yourself"
 msgstr ""
-"przeedytowane nazwy wierszy zawierają powtórzenia i zostaną zignorowane"
+"Jeśli nic się nie stanie, powinieneś otworzyć\n"
+"%s samemu"
 
-# utils/R/edit.R: 177
-# stop("invalid input matrix")
-msgid "invalid input matrix"
-msgstr "niepoprawna macierz wejściowa"
+#. R/help.start.R: gettextf("If the browser launched by '%s' is already running, it is *not* restarted, and you must switch to its window.",     browser)
+#: R/help.start.R:0
+msgid ""
+"If the browser launched by '%s' is already running, it is *not* restarted, "
+"and you must switch to its window."
+msgstr ""
+"Jeśli przeglądarka uruchomiona przez '%s' już działa, *nie* zostanie "
+"zrestartowana, a ty musisz przejść na jej okno."
 
-# utils/R/edit.R: 182
-# warning("class of 'name' will be discarded",
-#                 call. = FALSE, immediate. = TRUE)
-msgid "class of 'name' will be discarded"
-msgstr "klasa 'name' zostanie odrzucone"
+#. R/aspell.R: stop("Invalid 'filter' argument.")
+#: R/aspell.R:0
+msgid "Invalid 'filter' argument."
+msgstr "niepoprawny argument 'filter'"
 
-# utils/R/edit.R: 192
-# stop("cannot edit NULL row names")
-msgid "cannot edit NULL row names"
-msgstr "nie można edytować nazw wierszy o wartości NULL"
+#. R/widgets.R: gettext("Invalid input, please try again\n")
+#: R/widgets.R:0
+msgid "Invalid input, please try again"
+msgstr "Niepoprawne wejście, proszę spróbować ponownie"
 
-# utils/R/example.R: 36
-# warning(gettextf("no help found for %s", sQuote(topic)), domain = NA)
-msgid "no help found for %s"
-msgstr "nie znaleziono pomocy dla %s"
+#. R/citation.R: gettextf("It is recommended to use %s instead of %s.", sQuote("given"),     sQuote("first"))
+#. R/citation.R: gettextf("It is recommended to use %s instead of %s.", sQuote("given"),     sQuote("middle"))
+#. R/citation.R: gettextf("It is recommended to use %s instead of %s.", sQuote("family"),     sQuote("last"))
+#: R/citation.R:0
+msgid "It is recommended to use %s instead of %s."
+msgstr "Zalecane jest użycie %s zamiast %s"
 
-# utils/R/example.R: 46
-# warning(gettextf("%s has a help file but no examples", sQuote(topic)),
-#                 domain = NA)
-msgid "%s has a help file but no examples"
-msgstr "%s posiada plik pomocy, ale nie ma przykładów"
+#. R/citation.R: gettextf("It is recommended to use %s/%s instead of %s/%s/%s.",     sQuote("given"), sQuote("family"), sQuote("first"), sQuote("middle"),     sQuote("last"))
+#: R/citation.R:0
+msgid "It is recommended to use %s/%s instead of %s/%s/%s."
+msgstr "Zalecane jest użycie %s/%s zamiast %s/%s/%s"
 
-# utils/R/filetest.R: 39
-# stop(gettextf("test '%s' is not available", op),
-#                 domain = NA)
-msgid "test '%s' is not available"
-msgstr "test '%s' nie jest dostępny"
+#. R/help.R: gettext("Library")
+#: R/help.R:0
+msgid "Library"
+msgstr "Biblioteka"
 
-# utils/R/findLineNum.R: 97
-# stop("Line number missing")
+#. R/findLineNum.R: stop("Line number missing")
+#: R/findLineNum.R:0
 msgid "Line number missing"
 msgstr "Brakuje numeru linii"
 
-# utils/R/fix.R: 25
-# stop("'fix' requires a name")
-msgid "'fix' requires a name"
-msgstr "funkcja 'fix()' wymaga nazwy"
-
-# utils/R/format.R: 44
-# stop(gettextf("too many list items (at most up to %d)", 26L),
-#                  domain = NA)
-# utils/R/format.R: 53
-# stop(gettextf("too many list items (at most up to %d)", 3899L),
-#                  domain = NA)
-msgid "too many list items (at most up to %d)"
-msgstr "zbyt dużo pozycji listy (co najwyżej do %d)"
+#. R/debugger.R: gettext("Message: ")
+#: R/debugger.R:0
+msgid "Message:"
+msgstr "Wiadomość:"
 
-# utils/R/frametools.R: 30
-# stop("no vector columns were selected")
-msgid "no vector columns were selected"
-msgstr "nie wybrano żadnej kolumny wektora"
+#. R/read.DIF.R: stop("More columns than specified in header; maybe use 'transpose=TRUE'")
+#: R/read.DIF.R:0
+msgid "More columns than specified in header; maybe use 'transpose=TRUE'"
+msgstr "Więcej kolumn niż określono w nagłówku; może użyj 'transpose=TRUE'"
 
-# utils/R/frametools.R: 32
-# warning("non-vector columns will be ignored")
-msgid "non-vector columns will be ignored"
-msgstr "niewektorowe kolumny będą zignorowane"
+#. R/read.DIF.R: stop("More rows than specified in header; maybe use 'transpose=TRUE'")
+#: R/read.DIF.R:0
+msgid "More rows than specified in header; maybe use 'transpose=TRUE'"
+msgstr "Więcej wierszy niż określono w nagłówku; może użyj 'transpose=TRUE'"
 
-# utils/R/frametools.R: 44
-# stop("at least one vector element is required")
-msgid "at least one vector element is required"
-msgstr "przynajmnej jeden element wektora jest wymagany"
+#. R/read.DIF.R: stop("No DIF data on clipboard")
+#: R/read.DIF.R:0
+msgid "No DIF data on clipboard"
+msgstr "Brak danych DIF w schowku"
 
-# utils/R/frametools.R: 45
-# warning("non-vector elements will be ignored")
-msgid "non-vector elements will be ignored"
-msgstr "elementy nie-wektora zostaną zignorowane"
+#. R/demo.R: gettextf("No demo found for topic %s", sQuote(topic))
+#: R/demo.R:0
+msgid "No demo found for topic %s"
+msgstr "Nie znaleziono dema dla tematu %s"
 
-# utils/R/frametools.R: 58
-# stop("'form' must be a two-sided formula")
-msgid "'form' must be a two-sided formula"
-msgstr "'form' musi być dwustronną formułą"
+#. R/help.R: gettextf("No documentation for %s in specified packages and libraries:",     sQuote(topic))
+#: R/help.R:0
+msgid "No documentation for %s in specified packages and libraries:"
+msgstr "Brak dokumentacji dla %s we wskazanych pakietach oraz bibliotekach:"
 
-# utils/R/frametools.R: 70
-# stop("'form' must be a two-sided formula with one term on each side")
-msgid "'form' must be a two-sided formula with one term on each side"
-msgstr "'form' musi być dwustronną formułą z jednym członej po każdej stronie"
+#. R/debugger.R: gettext("No suitable frames for recover()\n")
+#: R/debugger.R:0
+msgid "No suitable frames for recover()"
+msgstr "Brak odpowiednik ramek dla 'recover()'"
 
-# utils/R/help.R: 68
-# stop("'topic' should be a name, length-one character vector or reserved word")
-msgid "'topic' should be a name, length-one character vector or reserved word"
-msgstr ""
-"'topic' powinien być nazwą, wektorem tekstowym o długości jeden albo "
-"zarezerwowanym słowem"
+#. R/aspell.R: stop("No suitable spell check program found.")
+#: R/aspell.R:0
+msgid "No suitable spell check program found."
+msgstr "Nie znaleziono odpowiedniego programu do sprawdzania pisowni."
 
-# utils/R/help.R: 108
-# gettextf("No documentation for %s in specified packages and libraries:",
-#                               sQuote(topic))
-msgid "No documentation for %s in specified packages and libraries:"
-msgstr "Brak dokumentacji dla %s we wskazanych pakietach oraz bibliotekach:"
+#. R/aspell.R: stop("No suitable spell-checker program found")
+#: R/aspell.R:0
+msgid "No suitable spell-checker program found"
+msgstr "Nie znaleziono odpowiedniego programu do sprawdzania pisowni"
 
-# utils/R/help.R: 110
-# gettextf("you could try %s",
-#                               sQuote(paste0("??", topic)))
-msgid "you could try %s"
-msgstr "mógłbyś spróbować %s"
+#. R/browseVignettes.R: gettextf("No vignettes found by %s", paste(deparse(attr(x, "call")),     collapse = " "))
+#: R/browseVignettes.R:0
+msgid "No vignettes found by %s"
+msgstr "Nie znaleziono ilustracji poprzez %s"
 
-# utils/R/help.R: 120
-# gettextf("Help for topic %s is not in any loaded package but can be found in the following packages:",
-#                         sQuote(topic))
+#. R/citation.R: gettextf("Not all arguments are of the same length, the following need to be recycled: %s",     paste(names(args)[!args_length_ok], collapse = ", "))
+#. R/citation.R: gettextf("Not all arguments are of the same length, the following need to be recycled: %s",     paste(names(args)[!args_length_ok], collapse = ", "))
+#. R/citation.R: gettextf("Not all arguments are of the same length, the following need to be recycled: %s",     paste(names(other)[!other_length_ok], collapse = ", "))
+#: R/citation.R:0
 msgid ""
-"Help for topic %s is not in any loaded package but can be found in the "
-"following packages:"
+"Not all arguments are of the same length, the following need to be recycled: "
+"%s"
 msgstr ""
-"Pomocy dla tematu %s nie ma w żadnym załadowanym pakiecie ale może zostać "
-"znaleziona w następujących pakietach:"
+"Nie wszystkie argumenty są tej samej długości, te argumenty muszą zostać "
+"powtórzone cyklicznie: %s"
 
-# utils/R/help.R: 148
-# gettext("Package")
-msgid "Package"
-msgstr "Pakiet"
+#. R/windows/install.packages.R: stop("Only '*.zip' and '*.tar.gz' files can be installed.")
+#: R/windows/install.packages.R:0
+msgid "Only '*.zip' and '*.tar.gz' files can be installed."
+msgstr "Tylko pliki '*.zip' oraz '*.tar.gz' mogą być zainstalowane."
 
-# utils/R/help.R: 149
-# gettext("Library")
-msgid "Library"
-msgstr "Biblioteka"
+#. R/help.start.R: gettext("Otherwise, be patient ...")
+#: R/help.start.R:0
+msgid "Otherwise, be patient ..."
+msgstr "W przeciwnym razie, bądź cierpliwy ..."
 
-# utils/R/help.R: 161
-# gettextf("Help on topic %s was found in the following packages:",
-#                             sQuote(topic))
-msgid "Help on topic %s was found in the following packages:"
-msgstr "Pomoc na temat %s została znaleziona w następujących pakietach:"
+#. R/Sweave.R: message("Output file:  ", output)
+#. R/Sweave.R: message("Output file:  ", output)
+#: R/Sweave.R:0
+msgid "Output file:"
+msgstr "Plik wyjściowy:"
 
-# utils/R/help.R: 182
-# gettext("Choose one")
-msgid "Choose one"
-msgstr "Wybierz jeden"
+#. R/help.R: gettext("Package")
+#: R/help.R:0
+msgid "Package"
+msgstr "Pakiet"
 
-msgid "Using the first match ..."
-msgstr "Używanie pierwszego dopasowania ..."
+#. R/bug.report.R: gettextf("Package %s: DESCRIPTION file not found", sQuote(package))
+#: R/bug.report.R:0
+msgid "Package %s: DESCRIPTION file not found"
+msgstr "Pakiet %s: nie znaleziono pliku DESCRIPTION"
 
-# utils/R/help.R: 201
-# warning("HTML help is unavailable", call. = FALSE)
-msgid "HTML help is unavailable"
-msgstr "Pomoc HTML jest niedostępna"
+#. R/aspell.R: gettextf("Processing file %s", fname)
+#. R/rtags.R: gettextf("Processing file %s", s)
+#: R/aspell.R:0 R/rtags.R:0
+msgid "Processing file %s"
+msgstr "Przetwarzanie pliku %s"
 
-# utils/R/help.R: 212
-# gettextf("R Help on %s", sQuote(topic))
+#. R/help.R: gettextf("R Help on %s", sQuote(topic))
+#: R/help.R:0
 msgid "R Help on %s"
 msgstr "Pomoc R na temat %s"
 
-# utils/R/packages2.R: 516
-# stop(gettextf("invalid %s argument", sQuote("keep_outputs")),
-#              domain = NA)
-# utils/R/help.R: 265
-# stop(gettextf("invalid %s argument", sQuote("file")), domain = NA)
-msgid "invalid %s argument"
-msgstr "niepoprawny argument '%s'"
+#. R/RShowDoc.R: message("   RShowDoc() should be used with a character string argument specifying\n   a documentation file")
+#: R/RShowDoc.R:0
+msgid ""
+"RShowDoc() should be used with a character string argument specifying\n"
+"   a documentation file"
+msgstr ""
+"'RShowDoc()' powinien być użyty z argumentem tekstowym określającym plik "
+"dokumentacji"
 
-# utils/R/help.R: 269
-# stop(gettextf("package %s exists but was not installed under R >= 2.10.0 so help cannot be accessed", sQuote(pkgname)), domain = NA)
+#. R/aspell.R: gettextf("Running aspell failed with diagnostics:\n%s", paste(out$stderr,     collapse = "\n"))
+#: R/aspell.R:0
 msgid ""
-"package %s exists but was not installed under R >= 2.10.0 so help cannot be "
-"accessed"
+"Running aspell failed with diagnostics:\n"
+"%s"
 msgstr ""
-"pakiet %s istnienie ale nie został zainstalowany pod R >= 2.10.0 tak więc "
-"pomoc jest niedostępna"
+"Uruchomienie 'aspell' nie powiodło się z przyczyn:\n"
+"%s"
 
-# utils/R/help.R: 283
-# stop(gettextf("creation of %s failed", sQuote(ofile2)), domain = NA)
-msgid "creation of %s failed"
-msgstr "tworzenie %s nie powiodło się"
+#. R/objects.R: gettextf("S3 method '%s' not found", method)
+#: R/objects.R:0
+msgid "S3 method '%s' not found"
+msgstr "Nie znaleziono metody S3 '%s'"
 
-# utils/R/help.R: 286
-# message(gettextf("Saving help page to %s", sQuote(basename(ofile2))),
-#                 domain = NA)
-# utils/R/help.R: 289
-# message(gettextf("Saving help page to %s", sQuote(ofile)), domain = NA)
+#. R/help.R: gettextf("Saving help page to %s", sQuote(basename(ofile2)))
+#. R/help.R: gettextf("Saving help page to %s", sQuote(ofile))
+#: R/help.R:0
 msgid "Saving help page to %s"
 msgstr "Zapisywanie strony pomocy w %s"
 
-# utils/R/help.search.R: 115
-# gettextf("argument %s must be a single character string", sQuote(args))
-msgid "argument %s must be a single character string"
-msgstr "argument %s musi być pojedynczym łańcuchem tekstowym"
-
-# utils/R/help.search.R: 123
-# stop("incorrect field specification")
-msgid "incorrect field specification"
-msgstr "niepoprawne określenie pola"
-
-# utils/R/help.search.R: 149
-# stop("do not know what to search")
-msgid "do not know what to search"
-msgstr "nie wiadomo czego szukać"
-
-# utils/R/help.search.R: 153
-# stop("incorrect type specification")
-msgid "incorrect type specification"
-msgstr "niepoprawne określenie typu"
-
-# utils/R/help.search.R: 161
-# warning("argument 'help.db' is deprecated")
-msgid "argument 'help.db' is deprecated"
-msgstr "argument 'help.db' jest przestarzały"
-
-# utils/R/help.search.R: 273
-# stop(gettextf("could not find package %s", sQuote(p)),
-#                           domain = NA)
-msgid "could not find package %s"
-msgstr "nie można było znaleźć pakietu %s"
-
-# utils/R/help.search.R: 301
-# message(gettextf("package %s has empty hsearch data - strangely",
-#                                      sQuote(p)), domain = NA)
-msgid "package %s has empty hsearch data - strangely"
-msgstr "pakiet %s ma puste dane 'hsearch' - dziwne"
+#. R/relist.R: stop("The 'flesh' argument does not contain a skeleton attribute.\n",     "Either ensure you unlist a relistable object, or specify the skeleton separately.")
+#: R/relist.R:0
+msgid "The 'flesh' argument does not contain a skeleton attribute."
+msgstr "Argument 'flesh' nie zawiera atrybutu 'skeleton'."
 
-# utils/R/help.search.R: 387
-# warning("removing all entries with invalid multi-byte character data")
-msgid "removing all entries with invalid multi-byte character data"
+#. R/unix/mac.install.R: gettextf("The downloaded binary packages are in\n\t%s", tmpd)
+#. R/windows/install.packages.R: gettextf("The downloaded binary packages are in\n\t%s", normalizePath(tmpd,     mustWork = FALSE))
+#: R/unix/mac.install.R:0 R/windows/install.packages.R:0
+msgid ""
+"The downloaded binary packages are in\n"
+"\t%s"
 msgstr ""
-"usuwanie wszystkich wpisów z niepoprawnymi danymi o wielobajtowych znakach"
+"Pobrane pakiety binarne są w\n"
+"\t%s"
 
-# utils/R/help.search.R: 434
-# stop(gettextf("no information in the database for package %s: need 'rebuild = TRUE'?",
-# 			  sQuote(package[pos_in_hsearch_db == 0][1L])),
-#                  domain = NA)
-msgid "no information in the database for package %s: need 'rebuild = TRUE'?"
+#. R/packages2.R: gettextf("The downloaded source packages are in\n\t%s", sQuote(normalizePath(tmpd,     mustWork = FALSE)))
+#: R/packages2.R:0
+msgid ""
+"The downloaded source packages are in\n"
+"\t%s"
 msgstr ""
-"brak informacji w bazie danych dla pakietu %s: potrzeba 'rebuild = TRUE'?"
-
-# utils/R/help.search.R: 472
-# stop("incorrect 'agrep' specification")
-msgid "incorrect 'agrep' specification"
-msgstr "niepoprawne określenie 'agrep'"
-
-# utils/R/help.start.R: 28
-# stop("invalid browser name, check options(\"browser\").")
-msgid "invalid browser name, check options(\"browser\")."
-msgstr "niepoprawna nazwa przeglądarki, sprawdź 'options(\"browser\")'."
-
-# utils/R/windows/help.start.R: 28
-# stop("help.start() requires the HTTP server to be running",
-#                     call. = FALSE)
-# utils/R/help.start.R: 35
-# stop("help.start() requires the HTTP server to be running",
-#                     call. = FALSE)
-msgid "help.start() requires the HTTP server to be running"
-msgstr "'help.start()' wymaga aby serwer HTTP był uruchomiony"
+"Pobrane pakiety źródłowe są w\n"
+"\t%s"
 
+#. R/aspell.R: gettextf("The following dictionaries were not found:\n%s", paste(sprintf("  %s",     dictionaries[ind]), collapse = "\n"))
+#: R/aspell.R:0
 msgid ""
-"If nothing happens, you should open\n"
-"'%s' yourself"
+"The following dictionaries were not found:\n"
+"%s"
 msgstr ""
-"Jeśli nic się nie stanie, powinieneś otworzyć\n"
-"'%s' samemu"
+"Następujące słowniki nie zostały znalezione:\n"
+"%s"
 
-# utils/R/help.start.R: 44
-# gettextf("If the browser launched by '%s' is already running, it is *not* restarted, and you must switch to its window.",
-#                                     browser)
+#. R/packages2.R: gettextf("The namespace for package \"%s\" is locked; no changes in the global variables list may be made.",     package)
+#: R/packages2.R:0
 msgid ""
-"If the browser launched by '%s' is already running, it is *not* restarted, "
-"and you must switch to its window."
+"The namespace for package \"%s\" is locked; no changes in the global "
+"variables list may be made."
 msgstr ""
-"Jeśli przeglądarka uruchomiona przez '%s' już działa, *nie* zostanie "
-"zrestartowana, a ty musisz przejść na jej okno."
+"Przestrzeń nazw dla pakietu '%s' jest zablokowana; nie można dokonać żadnych "
+"zmian w globalnej liście zmiennych."
 
-# utils/R/help.start.R: 47
-# gettext("Otherwise, be patient ...")
-msgid "Otherwise, be patient ..."
-msgstr "W przeciwnym razie, bądź cierpliwy ..."
+#. R/RSiteSearch.R: gettext("The results page should open in your browser shortly\n")
+#: R/RSiteSearch.R:0
+msgid "The results page should open in your browser shortly"
+msgstr "Za moment strona z wynikami powinna otworzyć sie w twojej przeglądarce"
 
-# utils/R/windows/help.start.R: 41
-# stop("'url' must be a non-empty character string")
-# utils/R/help.start.R: 58
-# stop("'url' must be a non-empty character string")
-msgid "'url' must be a non-empty character string"
-msgstr "argument 'url' musi być niepustym łańcuchem tekstowym"
+#. R/packages2.R: stop("This version of R is not set up to install source packages\nIf it was installed from an RPM, you may need the R-devel RPM")
+#: R/packages2.R:0
+msgid ""
+"This version of R is not set up to install source packages\n"
+"If it was installed from an RPM, you may need the R-devel RPM"
+msgstr ""
+"Ta wersja R nie jest ustawiona na instalowanie pakietów źródłowych\n"
+"Jeśli była instalowana z RPM, możesz potrzebować R-devel RPM"
 
-# utils/R/windows/help.start.R: 49
-# stop("'browser' must be a non-empty character string")
-# utils/R/help.start.R: 65
-# stop("'browser' must be a non-empty character string")
-msgid "'browser' must be a non-empty character string"
-msgstr "argument 'browser' musi być niepustym łańcuchem tekstowym"
+#. R/changedFiles.R: warning("Timestamp file no longer exists.")
+#: R/changedFiles.R:0
+msgid "Timestamp file no longer exists."
+msgstr "Plik sygnatury czasu już nie istnieje."
 
-# utils/R/indices.R: 54
-# warning(gettextf("no package '%s' was found", pkg), domain = NA)
-msgid "no package '%s' was found"
-msgstr "nie znaleziono pakietu '%s'"
+#. R/citation.R: gettextf("To cite package %s in publications use:", sQuote(package))
+#: R/citation.R:0
+msgid "To cite package %s in publications use:"
+msgstr "Aby zacytować pakiet %s w publikacjach użyj:"
 
-# utils/R/indices.R: 65
-# stop(gettextf("metadata of package '%s' is corrupt", pkg),
-#                  domain = NA)
-msgid "metadata of package '%s' is corrupt"
-msgstr "plik metadanych dla pakietu '%s' jest uszkodzony"
+#. R/read.DIF.R: stop("Unrecognized special data value")
+#: R/read.DIF.R:0
+msgid "Unrecognized special data value"
+msgstr "Nierozpoznana specjalna wartość danej"
 
-# utils/R/indices.R: 71
-# stop(gettextf("DESCRIPTION file of package '%s' is corrupt", pkg),
-#                  domain = NA)
-msgid "DESCRIPTION file of package '%s' is corrupt"
-msgstr "plik DESCRIPTION pakietu '%s' jest uszkodzony"
+#. R/read.DIF.R: stop("Unrecognized value indicator")
+#: R/read.DIF.R:0
+msgid "Unrecognized value indicator"
+msgstr "Nierozpoznany wskaźnik wartości"
+
+#. R/packages.R: message("Updating HTML index of packages in '.Library'")
+#. R/packages2.R: message("Updating HTML index of packages in '.Library'")
+#: R/packages.R:0 R/packages2.R:0
+msgid "Updating HTML index of packages in '.Library'"
+msgstr "Aktualizowanie indeksu HTML pakietów w '.Library'"
 
-# utils/R/indices.R: 87
-# warning("'DESCRIPTION' file has an 'Encoding' field and re-encoding is not possible", call. = FALSE)
+#. R/browseVignettes.R: gettext("Use <code> %s </code> \n to list the vignettes in all <strong>available</strong> packages.")
+#: R/browseVignettes.R:0
 msgid ""
-"'DESCRIPTION' file has an 'Encoding' field and re-encoding is not possible"
+"Use <code> %s </code> \n"
+" to list the vignettes in all <strong>available</strong> packages."
 msgstr ""
-"plilk 'DESCRIPTION' posiada pole 'Encoding' i ponowne kodowanie nie jest "
-"możliwe"
+"Użycie <code> %s </code> \n"
+" aby wylistować ilustracje we wszystkich <strong>dostępnych</strong> "
+"pakietach."
 
-# utils/R/indices.R: 98
-# warning(gettextf("DESCRIPTION file of package '%s' is missing or broken", pkg), domain = NA)
-msgid "DESCRIPTION file of package '%s' is missing or broken"
-msgstr "brakuje pliku DESCRIPTION pakietu '%s' lub jest on uszkodzony"
+#. R/citation.R: gettextf("Use either %s or %s but not both.", sQuote("family"),     sQuote("last"))
+#: R/citation.R:0
+msgid "Use either %s or %s but not both."
+msgstr "Użyj albo %s albo %s ale nie obu"
 
-# utils/R/linkhtml.R: 55
-# warning("cannot update HTML package index")
-msgid "cannot update HTML package index"
-msgstr "nie można zaktualizować indeksu HTML pakietu"
+#. R/citation.R: gettextf("Use either %s or %s/%s but not both.", sQuote("given"),     sQuote("first"), sQuote("middle"))
+#: R/citation.R:0
+msgid "Use either %s or %s/%s but not both."
+msgstr "Użyj albo %s albo %s/%s ale nie obu"
 
-# utils/R/help.search.R: 364
-# message(" ", "done", domain = NA)
-# utils/R/help.search.R: 404
-# message(" ", "done", domain = NA)
-# utils/R/linkhtml.R: 138
-# message(" ", "done")
-msgid "done"
-msgstr "wykonano"
+#. R/unix/create.post.R: message("Using the browser to open a mailto: URI")
+#: R/unix/create.post.R:0
+msgid "Using the browser to open a mailto: URI"
+msgstr "Używanie przeglądarki do otwarcia 'mailto': URI"
+
+#. R/help.R: gettext("\nUsing the first match ...")
+#: R/help.R:0
+msgid "Using the first match ..."
+msgstr "Używanie pierwszego dopasowania ..."
 
-# utils/R/menu.R: 21
-# stop("menu() cannot be used non-interactively")
-msgid "menu() cannot be used non-interactively"
-msgstr "funkcja 'menu()' nie może być użyta nieinteraktywnie"
+#. R/Sweave.R: gettextf("Warning: unknown option %s", sQuote(a))
+#. R/Sweave.R: gettextf("Warning: unknown option %s", sQuote(a))
+#: R/Sweave.R:0
+msgid "Warning: unknown option %s"
+msgstr "Ostrzeżenie: nieznana opcja %s"
 
-# utils/R/menu.R: 48
-# gettext("Enter an item from the menu, or 0 to exit\n")
-msgid "Enter an item from the menu, or 0 to exit"
-msgstr "Wprowadź pozycję z menu lub 0 aby wyjść"
+#. R/Sweave.R: gettextf("Warning: unknown option '--clean='%s", clean.)
+#: R/Sweave.R:0
+msgid "Warning: unknown option '--clean='%s"
+msgstr "Ostrzeżenie: nieznana opcja '--clean='%s"
 
-# utils/R/news.R: 70
-# stop("invalid query")
-msgid "invalid query"
-msgstr "niepoprawne zapytanie"
+#. R/edit.R: gettextf("added factor levels in '%s'", names(out)[i])
+#: R/edit.R:0
+msgid "added factor levels in '%s'"
+msgstr "dodane poziomy czynnika w '%s'"
 
-# utils/R/objects.R: 39
-# warning(gettextf(
-# 	"'%s' is a formal generic function; S3 methods will not likely be found",
-# 			     fname), domain = NA)
-msgid "'%s' is a formal generic function; S3 methods will not likely be found"
-msgstr ""
-"'%s' jest formalną ogólną funkcją; metody S3 prawdopodobnie nie zostaną "
-"znalezione"
+#. R/citation.R: gettextf("all arguments must be of class %s", dQuote("person"))
+#: R/citation.R:0
+msgid "all arguments must be of class %s"
+msgstr "wszystkie argumenty muszą być klasy %s"
 
-# utils/R/objects.R: 108
-# stop(gettextf("no function '%s' is visible", generic.function),
-#                  domain = NA)
-msgid "no function '%s' is visible"
-msgstr "nie ma widocznej funkcji '%s'"
+#. R/citation.R: stop("all fields have to be named")
+#: R/citation.R:0
+msgid "all fields have to be named"
+msgstr "wszystkie pola muszą być nazwane"
 
-# utils/R/objects.R: 113
-# warning(gettextf("function '%s' appears not to be generic",
-#                                  generic.function), domain = NA)
-msgid "function '%s' appears not to be generic"
-msgstr "wygląda na to, że funkcja '%s' nie jest ogólna"
+#. R/write.table.R: warning("appending column names to file")
+#: R/write.table.R:0
+msgid "appending column names to file"
+msgstr "dołączanie nazw kolumn do pliku"
 
-# utils/R/objects.R: 116
-# warning(gettextf("generic function '%s' dispatches methods for generic '%s'",
-#                         generic.function, truegf), domain = NA)
-msgid "generic function '%s' dispatches methods for generic '%s'"
-msgstr "ogólna funkcja '%s' rozdziela metody dla ogólnej '%s'"
+#. R/help.search.R: gettextf("argument %s must be a single character string", sQuote(args))
+#: R/help.search.R:0
+msgid "argument %s must be a single character string"
+msgstr "argument %s musi być pojedynczym łańcuchem tekstowym"
 
-# utils/R/objects.R: 189
-# stop("must supply 'generic.function' or 'class'")
-msgid "must supply 'generic.function' or 'class'"
-msgstr "potrzeba dostarczyć argument 'generic.function' lub 'class'"
+#. R/help.search.R: warning("argument 'help.db' is deprecated")
+#: R/help.search.R:0
+msgid "argument 'help.db' is deprecated"
+msgstr "argument 'help.db' jest przestarzały"
 
-# utils/R/objects.R: 220
-# stop(gettextf("no function '%s' could be found", f), domain = NA)
-msgid "no function '%s' could be found"
-msgstr "nie znaleziono fukcjii '%s'"
+#. R/frametools.R: stop("at least one vector element is required")
+#: R/frametools.R:0
+msgid "at least one vector element is required"
+msgstr "przynajmnej jeden element wektora jest wymagany"
 
-# utils/R/objects.R: 240
-# stop(gettextf("S3 method '%s' not found", method),
-#                                 domain = NA)
-msgid "S3 method '%s' not found"
-msgstr "Nie znaleziono metody S3 '%s'"
+#. R/write.table.R: gettextf("attempt to set '%s' ignored", argname)
+#. R/write.table.R: gettextf("attempt to set '%s' ignored", argname)
+#: R/write.table.R:0
+msgid "attempt to set '%s' ignored"
+msgstr "próba ustawienia '%s' została zignorowana"
 
-# utils/R/objects.R: 250
-# stop("environment specified is not a package")
-# utils/R/objects.R: 302
-# stop("environment specified is not a package")
-# utils/R/objects.R: 368
-# stop("environment specified is not a package")
-msgid "environment specified is not a package"
-msgstr "określone środowisko nie jest pakietem"
+#. R/capture.output.R: stop("bad argument")
+#: R/capture.output.R:0
+msgid "bad argument"
+msgstr "niepoprawny argument"
 
-# utils/R/objects.R: 316
-# gettextf("changing locked binding for %s in %s whilst loading %s",
-#                              sQuote(x), sQuote(ns_name), sQuote(in_load))
-msgid "changing locked binding for %s in %s whilst loading %s"
-msgstr "zmienianie zablokowanego powiązania dla %s w %s podczas ładowania %s"
+#. R/edit.R: stop("can only handle vector and factor elements")
+#: R/edit.R:0
+msgid "can only handle vector and factor elements"
+msgstr "można obsłużyć jedynie elementy wektora oraz czynnika"
 
-# utils/R/objects.R: 323
-# warning(gettextf("changing locked binding for %s in %s",
-#                              sQuote(x), sQuote(ns_name)),
-#                     call. = FALSE, domain = NA, immediate. = TRUE)
-msgid "changing locked binding for %s in %s"
-msgstr "zmienianie zablokowanego powiązania dla %s w %s"
+#. R/sock.R: stop("can only receive calls on local machine")
+#: R/sock.R:0
+msgid "can only receive calls on local machine"
+msgstr "można odbierać wywołania jedynie na lokalnej maszynie"
 
-# utils/R/objects.R: 364
-# stop("'fixInNamespace' requires a name")
-msgid "'fixInNamespace' requires a name"
-msgstr "funkcja 'fixInNamespace' wymaga nazwy"
+#. R/packages.R: gettextf("cannot choose a %s mirror non-interactively", label,     domain = "R-utils")
+#: R/packages.R:0
+msgid "cannot choose a %s mirror non-interactively"
+msgstr "nie można wybrać serweru lustrzanego %s nieinteraktywnie"
 
-# utils/R/objects.R: 463
-# stop("only numeric indices can be used")
-msgid "only numeric indices can be used"
-msgstr "tylko indeksy liczbowe mogą być użyte"
+#. R/roman.R: stop("cannot coerce 'x' to roman")
+#: R/roman.R:0
+msgid "cannot coerce 'x' to roman"
+msgstr "nie można przekształcić 'x' na liczby rzymskie"
 
-# utils/R/package.skeleton.R: 28
-# stop(gettextf("cannot create directory '%s'", path), domain = NA)
+#. R/package.skeleton.R: gettextf("cannot create directory '%s'", path)
+#: R/package.skeleton.R:0
 msgid "cannot create directory '%s'"
 msgstr "nie można utworzyć katalogu '%s'"
 
-# utils/R/package.skeleton.R: 32
-# stop("'code_files' must be a character vector")
-msgid "'code_files' must be a character vector"
-msgstr "argument 'code_files' musi być wektorem tekstowym"
-
-# utils/R/package.skeleton.R: 48
-# stop("'list' must be a character vector naming R objects")
-msgid "'list' must be a character vector naming R objects"
-msgstr "argument 'list' musi być wektorem tekstowym nazywającym obiekty R"
+#. R/prompt.R: stop("cannot determine a usable name")
+#. R/prompt.R: stop("cannot determine a usable name")
+#. R/prompt.R: stop("cannot determine a usable name")
+#. R/prompt.R: stop("cannot determine a usable name")
+#: R/prompt.R:0
+msgid "cannot determine a usable name"
+msgstr "nie można wyznaczyć użytecznej nazwy"
 
-# utils/R/package.skeleton.R: 78
-# stop("no R objects specified or available")
-msgid "no R objects specified or available"
-msgstr "nie określono obiektów R lub są one niedostępne"
+#. R/prompt.R: stop("cannot determine import name")
+#: R/prompt.R:0
+msgid "cannot determine import name"
+msgstr "nie można wyznaczyć importowanej nazwy"
 
-# utils/R/package.skeleton.R: 84
-# stop(gettextf("directory '%s' already exists", dir), domain = NA)
-msgid "directory '%s' already exists"
-msgstr "katalog '%s' już istnieje"
+#. R/edit.R: stop("cannot edit NULL row names")
+#: R/edit.R:0
+msgid "cannot edit NULL row names"
+msgstr "nie można edytować nazw wierszy o wartości NULL"
 
-# utils/R/package.skeleton.R: 160
-# stop(gettextf("generic functions and other S4 objects (e.g., '%s') cannot be dumped; use the 'code_files' argument", item), domain = NA)
+#. R/unix/create.post.R: warning("cannot find program to open 'mailto:' URIs: reverting to 'method=\"none\"'")
+#: R/unix/create.post.R:0
 msgid ""
-"generic functions and other S4 objects (e.g., '%s') cannot be dumped; use "
-"the 'code_files' argument"
+"cannot find program to open 'mailto:' URIs: reverting to 'method=\"none\"'"
 msgstr ""
-"ogólne funkcje oraz inne obiekty S4 (na przykład, '%s') nie mogą zostać "
-"zrzucone; użyj argumentu 'code_files'"
+"nie można znaleźć programu do otwarcia 'mailto:' URI: przywracanie 'method="
+"\"none\"'"
 
-# utils/R/packages.R: 82
-# warning(gettextf("unable to access index for repository %s", repos),
-# 				call. = FALSE, immediate. = TRUE, domain = NA)
-msgid "unable to access index for repository %s"
-msgstr "nie można dostać się do indeksu dla repozytorium %s"
+#. R/completion.R: warning("cannot handle S4 methods yet")
+#: R/completion.R:0
+msgid "cannot handle S4 methods yet"
+msgstr "jeszcze nie można obsłużyć metod S4"
 
-# utils/R/packages.R: 137
-# stop("invalid 'filters' argument.")
-msgid "invalid 'filters' argument."
-msgstr "niepoprawny argument 'filters'"
+#. R/packages2.R: stop("cannot install MacOS X binary packages on Windows")
+#: R/packages2.R:0
+msgid "cannot install MacOS X binary packages on Windows"
+msgstr "nie można zainstalować pakietów binarnych dla MacOS w systemie Windows"
 
-# utils/R/packages.R: 351
-# warning(sprintf("package '%s' in library '%s' will not be updated",
-# 				    oldPkgs[pkg], oldPkgs[pkg, 2]),
-# 			    call. = FALSE, immediate. = TRUE)
-msgid "package '%s' in library '%s' will not be updated"
-msgstr "pakiet '%s' w bibliotece '%s' nie zostanie zaktualizowany"
+#. R/packages2.R: stop("cannot install MacOS X binary packages on this platform")
+#: R/packages2.R:0
+msgid "cannot install MacOS X binary packages on this platform"
+msgstr "nie można zainstalować pakietów binarnych dla MacOS na tej platformie"
 
-# utils/R/packages.R: 362
-# stop("invalid 'oldPkgs'; must be a character vector or a result from old.packages()")
-msgid ""
-"invalid 'oldPkgs'; must be a character vector or a result from old.packages()"
+#. R/packages2.R: stop("cannot install Windows binary packages on this platform")
+#: R/packages2.R:0
+msgid "cannot install Windows binary packages on this platform"
 msgstr ""
-"niepoprawny 'oldPkgs'; musi być wektorem tekstowym lub wynikiem pochodzącym "
-"z 'old.packages()'"
-
-# utils/R/packages.R: 403
-# stop("ill-formed 'instPkgs' matrix")
-msgid "ill-formed 'instPkgs' matrix"
-msgstr "Błędnie utworzona macierz 'instPkgs'"
+"nie można zainstalować pakietów binarnych dla systemu Windows na tej "
+"platformie"
 
-# utils/R/packages.R: 455
-# stop(gettextf("no installed packages for (invalid?) 'lib.loc=%s'",
-#                       lib.loc), domain = NA)
-msgid "no installed packages for (invalid?) 'lib.loc=%s'"
-msgstr "brak zainstalowanych pakietów dla (niepoprawnego?) 'lib.loc=%s'"
+#. R/unix/mac.install.R: gettextf("cannot remove prior installation of package %s", sQuote(pkgname))
+#. R/windows/install.packages.R: gettextf("cannot remove prior installation of package %s", sQuote(pkgname))
+#: R/unix/mac.install.R:0 R/windows/install.packages.R:0
+msgid "cannot remove prior installation of package %s"
+msgstr "nie można usunąć poprzedniej instalacji pakietu %s"
 
-# utils/R/packages.R: 480
-# message("no new packages are available")
-msgid "no new packages are available"
-msgstr "nie ma dostępnych nowych pakietów"
+#. R/packages.R: stop("cannot set repositories non-interactively")
+#: R/packages.R:0
+msgid "cannot set repositories non-interactively"
+msgstr "nie można wybrać repozytoriów nieinteraktywnie"
 
-# utils/R/packages.R: 526
-# warning(gettextf("metadata of %s is corrupt", sQuote(pkgpath)),
-#                         domain = NA)
-# utils/R/packages.R: 533
-# warning(gettextf("metadata of %s is corrupt",
-#                                      sQuote(pkgpath)), domain = NA)
-msgid "metadata of %s is corrupt"
-msgstr "metadane dla %s są uszkodzone"
+#. R/linkhtml.R: warning("cannot update HTML package index")
+#: R/linkhtml.R:0
+msgid "cannot update HTML package index"
+msgstr "nie można zaktualizować indeksu HTML pakietu"
 
-# utils/R/packages.R: 553
-# stop("'priority' must be character or NULL")
-msgid "'priority' must be character or NULL"
-msgstr "argument 'priority' musi być tekstem lub wartością NULL"
+#. R/objects.R: gettextf("changing locked binding for %s in %s", sQuote(x), sQuote(ns_name))
+#: R/objects.R:0
+msgid "changing locked binding for %s in %s"
+msgstr "zmienianie zablokowanego powiązania dla %s w %s"
 
-# utils/R/packages2.R: 725
-# message("Updating HTML index of packages in '.Library'")
-# utils/R/packages.R: 617
-# message("Updating HTML index of packages in '.Library'")
-msgid "Updating HTML index of packages in '.Library'"
-msgstr "Aktualizowanie indeksu HTML pakietów w '.Library'"
+#. R/objects.R: gettextf("changing locked binding for %s in %s whilst loading %s",     sQuote(x), sQuote(ns_name), sQuote(in_load))
+#: R/objects.R:0
+msgid "changing locked binding for %s in %s whilst loading %s"
+msgstr "zmienianie zablokowanego powiązania dla %s w %s podczas ładowania %s"
 
-# utils/R/packages.R: 657
-# stop("'destdir' is not a directory")
-msgid "'destdir' is not a directory"
-msgstr "wartość 'destdir' nie jest katalogiem"
+#. R/tar.R: gettextf("checksum error for entry '%s'", name)
+#: R/tar.R:0
+msgid "checksum error for entry '%s'"
+msgstr "błąd sumy kontrolnej dla wpisu '%s'"
 
-# utils/R/packages.R: 667
-# warning(gettextf("no package %s at the repositories", sQuote(p)),
-#                     domain = NA, immediate. = TRUE)
-msgid "no package %s at the repositories"
-msgstr "brak pakietu %s w repozytoriach"
+#. R/edit.R: warning("class of 'name' will be discarded", call. = FALSE, immediate. = TRUE)
+#: R/edit.R:0
+msgid "class of 'name' will be discarded"
+msgstr "klasa 'name' zostanie odrzucone"
 
-# utils/R/packages.R: 705
-# warning(gettextf("package %s does not exist on the local repository", sQuote(p)),
-#                             domain = NA, immediate. = TRUE)
-msgid "package %s does not exist on the local repository"
-msgstr "pakiet %s nie istnieje w lokalnym repozytorium"
+#. R/citation.R: gettextf("could not determine year for %s from package DESCRIPTION file",     sQuote(package))
+#: R/citation.R:0
+msgid "could not determine year for %s from package DESCRIPTION file"
+msgstr "nie można było określić roku dla %s z pliku DESCRIPTION pakietu"
 
-# utils/R/packages.R: 715
-# warning(gettextf("download of package %s failed", sQuote(p)),
-#                             domain = NA, immediate. = TRUE)
-msgid "download of package %s failed"
-msgstr "pobieranie pakietu %s nie powiodło się"
+#. R/help.search.R: gettextf("could not find package %s", sQuote(p))
+#: R/help.search.R:0
+msgid "could not find package %s"
+msgstr "nie można było znaleźć pakietu %s"
 
-# utils/R/packages.R: 730
-# gettext("--- Please select a CRAN mirror for use in this session ---")
-msgid "--- Please select a CRAN mirror for use in this session ---"
-msgstr "--- Proszę wybrać serwer lustrzany CRAN do użycia w tej sesji ---"
+#. R/de.R: warning("could not restore type information")
+#: R/de.R:0
+msgid "could not restore type information"
+msgstr "nie można przywrócić informacji o typie"
 
-# utils/R/packages.R: 741
-# stop("trying to use CRAN without setting a mirror")
-msgid "trying to use CRAN without setting a mirror"
-msgstr "próba użycia CRAN bez ustawienia serwera lustrzanego"
+#. R/de.R: warning("could not restore variables properly")
+#: R/de.R:0
+msgid "could not restore variables properly"
+msgstr "nie można było poprawnie przywrócić zmiennych"
 
-# utils/R/packages.R: 780
-# stop("cannot choose a CRAN mirror non-interactively")
-msgid "cannot choose a CRAN mirror non-interactively"
-msgstr "nie można wybrać serweru lustrzanego CRAN nieinteraktywnie"
+#. R/help.R: gettextf("creation of %s failed", sQuote(ofile2))
+#: R/help.R:0
+msgid "creation of %s failed"
+msgstr "tworzenie %s nie powiodło się"
 
-# utils/R/packages.R: 796
-# stop("cannot choose a BioC mirror non-interactively")
-msgid "cannot choose a BioC mirror non-interactively"
-msgstr "nie można wybrać serweru lustrzanego BioC nieinteraktywnie"
+#. R/data.R: gettextf("data index for package %s is invalid and will be ignored",     sQuote(packageName))
+#: R/data.R:0
+msgid "data index for package %s is invalid and will be ignored"
+msgstr "indeks danych dla pakietu %s jest niepoprawny i zostanie zignorowany"
 
-# utils/R/packages.R: 817
-# stop("cannot set repositories non-interactively")
-msgid "cannot set repositories non-interactively"
-msgstr "nie można wybrać repozytoriów nieinteraktywnie"
+#. R/data.R: gettextf("data set %s not found", sQuote(name))
+#: R/data.R:0
+msgid "data set %s not found"
+msgstr "zbiór danych %s nie został znaleziony"
 
-# utils/R/packages.R: 847
-# gettext("--- Please select repositories for use in this session ---\n")
-msgid "--- Please select repositories for use in this session ---"
-msgstr "--- Proszę wybrać repozytoria do użycia w tej sesji ---"
+#. R/data.R: warning("datasets have been moved from package 'base' to package 'datasets'")
+#: R/data.R:0
+msgid "datasets have been moved from package 'base' to package 'datasets'"
+msgstr ""
+"zbiory danych zostały przeniesione z pakietu 'base' do pakietu 'datasets'"
 
-# utils/R/packages.R: 966
-# stop(gettextf("%s must be supplied", sQuote("available")), domain = NA)
-msgid "%s must be supplied"
-msgstr "%s musi być dostarczone"
+#. R/data.R: warning("datasets have been moved from package 'stats' to package 'datasets'")
+#: R/data.R:0
+msgid "datasets have been moved from package 'stats' to package 'datasets'"
+msgstr ""
+"zbiory danych zostały przeniesione z pakietu 'stats' do pakietu 'datasets'"
 
-# utils/R/packages.R: 1005
-# warning("every package depends on at least one other")
-msgid "every package depends on at least one other"
-msgstr "każdy pakiet zależy co najmniej od innego"
+#. R/de.R: warning("did not assign() anything")
+#: R/de.R:0
+msgid "did not assign() anything"
+msgstr "nic nie przypisano"
 
-# utils/R/packages.R: 1012
-# warning(gettextf("packages %s are mutually dependent",
-#                              paste(sQuote(names(DL)), collapse = ", ")),
-#                     domain = NA)
-msgid "packages %s are mutually dependent"
-msgstr "pakiety %s są wzajemnie zależne"
+#. R/package.skeleton.R: gettextf("directory '%s' already exists", dir)
+#: R/package.skeleton.R:0
+msgid "directory '%s' already exists"
+msgstr "katalog '%s' już istnieje"
 
-# utils/R/packages2.R: 43
-# warning("Do not know which element of 'lib' to install dependencies into\nskipping dependencies")
-msgid ""
-"Do not know which element of 'lib' to install dependencies into\n"
-"skipping dependencies"
-msgstr ""
-"Nie wiadomo, do którego elementu 'lib' zainstalować zależności\n"
-"pomijanie zależności"
+#. R/help.search.R: stop("do not know what to search")
+#: R/help.search.R:0
+msgid "do not know what to search"
+msgstr "nie wiadomo czego szukać"
 
-# utils/R/packages2.R: 198
-# stop("no packages were specified")
-# utils/R/packages2.R: 205
-# stop("no packages were specified")
-# utils/R/packages2.R: 219
-# stop("no packages were specified")
-msgid "no packages were specified"
-msgstr "nie określono pakietów"
+#. R/RShowDoc.R: stop("document not found")
+#: R/RShowDoc.R:0
+msgid "document not found"
+msgstr "dokument nie został znaleziony"
 
-# utils/R/packages2.R: 251
-# warning(gettextf("'lib = \"%s\"' is not writable", lib),
-#                 domain = NA, immediate. = TRUE)
-msgid "'lib = \"%s\"' is not writable"
-msgstr "'lib = \"%s\"' nie jest zapisywalna"
+#. R/linkhtml.R: message(" ", "done")
+#: R/linkhtml.R:0
+msgid "done"
+msgstr "wykonano"
 
-# utils/R/packages2.R: 268
-# stop("unable to install packages")
-# utils/R/packages2.R: 273
-# stop("unable to install packages")
-# utils/R/packages2.R: 279
-# stop("unable to install packages")
-msgid "unable to install packages"
-msgstr "nie można zainstalować pakietów"
+#. R/unix/download.file.R: warning("download had nonzero exit status")
+#. R/windows/download.file.R: warning("download had nonzero exit status")
+#: R/unix/download.file.R:0 R/windows/download.file.R:0
+msgid "download had nonzero exit status"
+msgstr "pobieranie miało niezerowy status wyjściowy"
 
-# utils/R/packages2.R: 275
-# stop(gettextf("unable to create %s", sQuote(userdir)),
-#                          domain = NA)
-# utils/R/packages2.R: 511
-# stop(gettextf("unable to create %s", sQuote(keep_outputs)),
-#                  domain = NA)
-msgid "unable to create %s"
-msgstr "nie udało się utworzyć %s"
+#. R/packages.R: gettextf("download of package %s failed", sQuote(p))
+#: R/packages.R:0
+msgid "download of package %s failed"
+msgstr "pobieranie pakietu %s nie powiodło się"
 
-# utils/R/packages2.R: 291
-# message("inferring 'repos = NULL' from the file name")
-msgid "inferring 'repos = NULL' from the file name"
-msgstr "wnioskowanie 'repos = NULL' z nazwy pliku"
+#. R/read.DIF.R: stop("duplicate 'row.names' are not allowed")
+#. R/readtable.R: stop("duplicate 'row.names' are not allowed")
+#: R/read.DIF.R:0 R/readtable.R:0
+msgid "duplicate 'row.names' are not allowed"
+msgstr "powtórzone 'row.names' nie są dozwolone"
 
-# utils/R/packages2.R: 303
-# stop("type == \"both\" can only be used on Windows or a CRAN build for Mac OS X")
-msgid ""
-"type == \"both\" can only be used on Windows or a CRAN build for Mac OS X"
+#. R/edit.R: warning("edited row names contain duplicates and will be ignored")
+#: R/edit.R:0
+msgid "edited row names contain duplicates and will be ignored"
 msgstr ""
-"'type == \"both\"' może być użyte jedynie w systemie Windows lub kompilacji "
-"CRAN dla systemów Mac OS X"
+"przeedytowane nazwy wierszy zawierają powtórzenia i zostaną zignorowane"
 
-# utils/R/packages2.R: 305
-# stop("type == \"both\" cannot be used if 'available' or 'contriburl' is specified")
-msgid ""
-"type == \"both\" cannot be used if 'available' or 'contriburl' is specified"
-msgstr ""
-"'type == \"both\"' nie może być użyte jeśli 'available' lub 'contriburl' są "
-"określone"
+#. R/apropos.R: warning("elements of 'what' after the first will be ignored")
+#: R/apropos.R:0
+msgid "elements of 'what' after the first will be ignored"
+msgstr "elementy 'what' po pierwszym będą zignorowane"
 
-# utils/R/packages2.R: 307
-# stop("type == \"both\" cannot be used with 'repos = NULL'")
-msgid "type == \"both\" cannot be used with 'repos = NULL'"
-msgstr "'type == \"both\"' nie może być użyte z 'repos = NULL'"
+#. R/readtable.R: stop("empty beginning of file")
+#: R/readtable.R:0
+msgid "empty beginning of file"
+msgstr "puste rozpoczęcie pliku"
 
-# utils/R/packages2.R: 363
-# message("Do you want to attempt to install these from sources?")
-msgid "Do you want to attempt to install these from sources?"
-msgstr "Czy chcesz spróbować zainstalować je ze źródeł?"
+#. R/objects.R: stop("environment specified is not a package")
+#. R/objects.R: stop("environment specified is not a package")
+#. R/objects.R: stop("environment specified is not a package")
+#: R/objects.R:0
+msgid "environment specified is not a package"
+msgstr "określone środowisko nie jest pakietem"
 
-# utils/R/packages2.R: 402
-# message("source repository is unavailable to check versions")
-msgid "source repository is unavailable to check versions"
-msgstr "repozytorium źródeł nie jest w stanie sprawdzić wersji"
+#. R/debugcall.R: gettextf("error in trying to evaluate the expression for argument %s (%s)",     sQuote(arg), deparse(argExpr))
+#: R/debugcall.R:0
+msgid "error in trying to evaluate the expression for argument %s (%s)"
+msgstr "błąd podczas próby obliczenia wyrażenia dla argumentu %s (%s)"
 
-# utils/R/packages2.R: 447
-# stop("cannot install MacOS X binary packages on Windows")
-msgid "cannot install MacOS X binary packages on Windows"
-msgstr "nie można zainstalować pakietów binarnych dla MacOS w systemie Windows"
+#. R/packages.R: warning("every package depends on at least one other")
+#: R/packages.R:0
+msgid "every package depends on at least one other"
+msgstr "każdy pakiet zależy co najmniej od innego"
 
-# utils/R/packages2.R: 473
-# stop("cannot install MacOS X binary packages on this platform")
-msgid "cannot install MacOS X binary packages on this platform"
-msgstr "nie można zainstalować pakietów binarnych dla MacOS na tej platformie"
+#. R/tar.R: gettextf("failed to copy %s to %s", sQuote(name2), sQuote(name))
+#. R/tar.R: gettextf("failed to copy %s to %s", sQuote(from), sQuote(name))
+#. R/tar.R: gettextf("failed to copy %s to %s", sQuote(from), sQuote(name))
+#: R/tar.R:0
+msgid "failed to copy %s to %s"
+msgstr "kopiowanie %s do %s nie powiodło się"
 
-# utils/R/packages2.R: 482
-# stop("cannot install Windows binary packages on this platform")
-msgid "cannot install Windows binary packages on this platform"
-msgstr ""
-"nie można zainstalować pakietów binarnych dla systemu Windows na tej "
-"platformie"
+#. R/windows/install.packages.R: gettextf("failed to create %s", sQuote(path))
+#. R/windows/install.packages.R: gettextf("failed to create %s", paste(sQuote(mos[!res]), collapse = ","))
+#. R/windows/install.packages.R: gettextf("failed to create %s", sQuote(path))
+#. R/windows/install.packages.R: gettextf("failed to create %s", paste(sQuote(mos[!res]), collapse = ","))
+#: R/windows/install.packages.R:0
+msgid "failed to create %s"
+msgstr "nie udało się utworzyć %s"
 
-# utils/R/packages2.R: 485
-# stop("This version of R is not set up to install source packages\nIf it was installed from an RPM, you may need the R-devel RPM")
-msgid ""
-"This version of R is not set up to install source packages\n"
-"If it was installed from an RPM, you may need the R-devel RPM"
+#. R/tar.R: gettextf("failed to create directory %s", sQuote(exdir))
+#. R/tar.R: gettextf("failed to create directory %s", sQuote(path))
+#: R/tar.R:0
+msgid "failed to create directory %s"
+msgstr "nie udało się utworzyć katalogu %s"
+
+#. R/packages.R: gettextf("failed to download mirrors file (%s); using local file '%s'",     conditionMessage(err), local.file)
+#: R/packages.R:0
+msgid "failed to download mirrors file (%s); using local file '%s'"
 msgstr ""
-"Ta wersja R nie jest ustawiona na instalowanie pakietów źródłowych\n"
-"Jeśli była instalowana z RPM, możesz potrzebować R-devel RPM"
+"nie udało się pobrać pliku (%s) serwerów lustrzanych; używanie lokalnego "
+"pliku '%s'"
 
-# utils/R/packages2.R: 549
-# message(gettextf("system (cmd0): %s",
-#                          paste(c(cmd0, args0), collapse = " ")),
-#                 domain = NA)
-msgid "system (cmd0): %s"
-msgstr "system (cmd0): %s"
+#. R/unix/mac.install.R: gettextf("file %s is not an OS X binary package", sQuote(pkg))
+#. R/unix/mac.install.R: gettextf("file %s is not an OS X binary package", sQuote(pkg))
+#. R/unix/mac.install.R: gettextf("file %s is not an OS X binary package", sQuote(pkg))
+#: R/unix/mac.install.R:0
+msgid "file %s is not an OS X binary package"
+msgstr "plik %s nie jest pakietem binarnym OS X"
 
-# utils/R/packages2.R: 567
-# warning(gettextf("installation of package %s had non-zero exit status",
-#                                  sQuote(update[i, 1L])),
-#                         domain = NA)
-# utils/R/packages2.R: 706
-# warning(gettextf("installation of package %s had non-zero exit status",
-#                                      sQuote(update[i, 1L])),
-#                             domain = NA)
-msgid "installation of package %s had non-zero exit status"
-msgstr "instalacja pakietu %s miała niezerowy status wyjścia"
+#. R/tar.R: gettextf("file '%s' did not have execute permissions: corrected",     f)
+#: R/tar.R:0
+msgid "file '%s' did not have execute permissions: corrected"
+msgstr "plik '%s' nie miał uprawnień wykonywalnych: poprawiono"
 
-# utils/R/packages2.R: 584
-# stop(gettextf("unable to create temporary directory %s",
-#                           sQuote(tmpd)),
-#                  domain = NA)
-# utils/R/packages2.R: 626
-# stop(gettextf("unable to create temporary directory %s",
-#                               sQuote(tmpd)),
-#                      domain = NA)
-# utils/R/windows/install.packages.R: 40
-# stop(gettextf("unable to create temporary directory %s",
-#                       sQuote(normalizePath(tmpDir, mustWork = FALSE))),
-#              domain = NA, call. = FALSE)
-# utils/R/windows/install.packages.R: 239
-# stop(gettextf("unable to create temporary directory %s",
-#                           sQuote(normalizePath(tmpd, mustWork = FALSE))),
-#                  domain = NA)
-msgid "unable to create temporary directory %s"
-msgstr "nie udało się utworzyć katalogu %s"
+#. R/tar.R: gettextf("file '%s' not found", f)
+#: R/tar.R:0
+msgid "file '%s' not found"
+msgstr "plik '%s' nie został znaleziony"
+
+#. R/data.R: gettextf("file 'filelist' is missing for directory %s", sQuote(p))
+#: R/data.R:0
+msgid "file 'filelist' is missing for directory %s"
+msgstr "brakuje pliku 'filelist' w katalogu %s"
+
+#. R/read.DIF.R: stop("file had no lines")
+#: R/read.DIF.R:0
+msgid "file had no lines"
+msgstr "plik nie miał żadnych linii"
 
-# utils/R/packages2.R: 601
-# message(gettextf("foundpkgs: %s",
-#                                      paste(foundpkgs, collapse=", ")),
-#                             domain = NA)
-msgid "foundpkgs: %s"
-msgstr "znalezione pakiety: %s"
+#. R/tar.R: stop("file size is limited to 8GB")
+#: R/tar.R:0
+msgid "file size is limited to 8GB"
+msgstr "rozmiar pliku jest ograniczony do 8 GB"
 
-# utils/R/packages2.R: 608
-# message(gettextf("files: %s",
-#                                      paste(files, collapse=", \n\t")),
-#                             domain = NA)
+#. R/packages2.R: gettextf("files: %s", paste(files, collapse = ", \n\t"))
+#: R/packages2.R:0
 msgid "files: %s"
 msgstr "pliki: %s"
 
-# utils/R/packages2.R: 682
-# warning(gettextf("installation of one or more packages failed,\n  probably %s",
-#                                  paste(sQuote(failed), collapse = ", ")),
-#                         domain = NA)
-msgid ""
-"installation of one or more packages failed,\n"
-"  probably %s"
-msgstr ""
-"instalacja jednego lub więcej pakietów nie powiodła się,\n"
-"  prawdopodobnie %s"
+#. R/readtable.R: stop("first five rows are empty: giving up")
+#: R/readtable.R:0
+msgid "first five rows are empty: giving up"
+msgstr "pierwsze pięć pierwszych rzędów jest puste: poddawanie się"
 
-# utils/R/packages2.R: 719
-# gettextf("The downloaded source packages are in\n\t%s",
-#                                sQuote(normalizePath(tmpd, mustWork = FALSE)))
+#. R/packages2.R: gettextf("foundpkgs: %s", paste(foundpkgs, collapse = ", "))
+#: R/packages2.R:0
+msgid "foundpkgs: %s"
+msgstr "znalezione pakiety: %s"
+
+#. R/objects.R: gettextf("function '%s' appears not to be S3 generic; found functions that look like S3 methods",     generic.function)
+#: R/objects.R:0
 msgid ""
-"The downloaded source packages are in\n"
-"\t%s"
+"function '%s' appears not to be S3 generic; found functions that look like "
+"S3 methods"
 msgstr ""
-"Pobrane pakiety źródłowe są w\n"
-"\t%s"
+"wygląda na to, że funkcja '%s' nie jest funkcją ogólną S3; znaleziono "
+"funkcje, które wyglądają jak metody S3"
+
+#. R/objects.R: gettextf("generic function '%s' dispatches methods for generic '%s'",     generic.function, truegf)
+#: R/objects.R:0
+msgid "generic function '%s' dispatches methods for generic '%s'"
+msgstr "ogólna funkcja '%s' rozdziela metody dla ogólnej '%s'"
 
-# utils/R/packages2.R: 764
-# stop(gettextf("The namespace for package \"%s\" is locked; no changes in the global variables list may be made.",
-#                           package))
+#. R/package.skeleton.R: gettextf("generic functions and other S4 objects (e.g., '%s') cannot be dumped; use the 'code_files' argument",     item)
+#: R/package.skeleton.R:0
 msgid ""
-"The namespace for package \"%s\" is locked; no changes in the global "
-"variables list may be made."
+"generic functions and other S4 objects (e.g., '%s') cannot be dumped; use "
+"the 'code_files' argument"
 msgstr ""
-"Przestrzeń nazw dla pakietu '%s' jest zablokowana; nie można dokonać żadnych "
-"zmian w globalnej liście zmiennych."
-
-# utils/R/packages2.R: 776
-# stop("'env' must be an environment")
-msgid "'env' must be an environment"
-msgstr "argument 'env' musi być środowiskiem"
+"ogólne funkcje oraz inne obiekty S4 (na przykład, '%s') nie mogą zostać "
+"zrzucone; użyj argumentu 'code_files'"
 
-# utils/R/page.R: 36
-# stop(gettextf("no object named '%s' to show", x), domain = NA)
-msgid "no object named '%s' to show"
-msgstr "brak obiektu '%s' do pokazania"
+#. R/read.DIF.R: warning("header and 'col.names' are of different lengths")
+#. R/readtable.R: warning("header and 'col.names' are of different lengths")
+#: R/read.DIF.R:0 R/readtable.R:0
+msgid "header and 'col.names' are of different lengths"
+msgstr "nagłówek oraz argument 'col.names' mają różne długości"
 
-# utils/R/progressBar.R: 25
-# stop("'file' must be \"\" or an open connection object")
-msgid "'file' must be \"\" or an open connection object"
-msgstr "argument 'file' musi być \"\" lub obiektem otwartego połączenia"
+#. R/help.start.R: stop("help.start() requires the HTTP server to be running", call. = FALSE)
+#: R/help.start.R:0
+msgid "help.start() requires the HTTP server to be running"
+msgstr "'help.start()' wymaga aby serwer HTTP był uruchomiony"
 
-# utils/R/progressBar.R: 37
-# stop("must have 'max' > 'min'")
-msgid "must have 'max' > 'min'"
-msgstr "potrzeba mieć 'max' > 'min'"
+#. R/packages.R: stop("ill-formed 'instPkgs' matrix")
+#: R/packages.R:0
+msgid "ill-formed 'instPkgs' matrix"
+msgstr "Błędnie utworzona macierz 'instPkgs'"
 
-# utils/R/progressBar.R: 106
-# stop(gettextf("'pb' is not from class %s",
-#                      dQuote("txtProgressBar")),
-#             domain = NA)
-# utils/R/progressBar.R: 115
-# stop(gettextf("'pb' is not from class %s",
-#                       dQuote("txtProgressBar")),
-#              domain = NA)
-# utils/R/windows/winDialog.R: 73
-# stop(gettextf("'pb' is not from class %s",
-#                      dQuote("winProgressBar")),
-#             domain = NA)
-# utils/R/windows/winDialog.R: 85
-# stop(gettextf("'pb' is not from class %s",
-#                       dQuote("winProgressBar")),
-#              domain = NA)
-msgid "'pb' is not from class %s"
-msgstr "'pb' nie pochodzi z klasy %s"
+#. R/tar.R: stop("incomplete block on file")
+#. R/tar.R: stop("incomplete block on file")
+#. R/tar.R: stop("incomplete block on file")
+#: R/tar.R:0
+msgid "incomplete block on file"
+msgstr "niekompletny blok w pliku"
 
-# utils/R/prompt.R: 55
-# stop("cannot determine a usable name")
-# utils/R/prompt.R: 185
-# stop("cannot determine a usable name")
-# utils/R/prompt.R: 215
-# stop("cannot determine a usable name")
-msgid "cannot determine a usable name"
-msgstr "nie można wyznaczyć użytecznej nazwy"
+#. R/help.search.R: stop("incorrect 'agrep' specification")
+#: R/help.search.R:0
+msgid "incorrect 'agrep' specification"
+msgstr "niepoprawne określenie 'agrep'"
 
-# utils/R/prompt.R: 165
-# message(gettextf("Created file named %s.", sQuote(filename)),
-#             "\n",
-#             gettext("Edit the file and move it to the appropriate directory."),
-#             domain = NA)
-# utils/R/prompt.R: 305
-# message(gettextf("Created file named %s.", sQuote(filename)),
-#             "\n",
-#             gettext("Edit the file and move it to the appropriate directory."),
-#             domain = NA)
-# utils/R/prompt.R: 408
-# message(gettextf("Created file named %s.", sQuote(filename)),
-#             "\n",
-#             gettext("Edit the file and move it to the appropriate directory."),
-#             domain = NA)
-msgid "Created file named %s."
-msgstr "Utworzono plik o nazwie %s."
+#. R/help.search.R: stop("incorrect field specification")
+#: R/help.search.R:0
+msgid "incorrect field specification"
+msgstr "niepoprawne określenie pola"
 
-# utils/R/prompt.R: 165
-# message(gettextf("Created file named %s.", sQuote(filename)),
-#             "\n",
-#             gettext("Edit the file and move it to the appropriate directory."),
-#             domain = NA)
-# utils/R/prompt.R: 305
-# message(gettextf("Created file named %s.", sQuote(filename)),
-#             "\n",
-#             gettext("Edit the file and move it to the appropriate directory."),
-#             domain = NA)
-# utils/R/prompt.R: 408
-# message(gettextf("Created file named %s.", sQuote(filename)),
-#             "\n",
-#             gettext("Edit the file and move it to the appropriate directory."),
-#             domain = NA)
-msgid "Edit the file and move it to the appropriate directory."
-msgstr "Edytuj ten plik i przenieś go do odpowiedniego katalogu."
+#. R/help.search.R: stop("incorrect type specification")
+#. R/help.search.R: stop("incorrect type specification")
+#: R/help.search.R:0
+msgid "incorrect type specification"
+msgstr "niepoprawne określenie typu"
 
-# utils/R/question.R: 87
-# stop(gettextf("no documentation of type %s and topic %s (or error in processing help)",
-# 			      sQuote(type), sQuote(topicExpr)),
-#                      domain = NA)
-msgid "no documentation of type %s and topic %s (or error in processing help)"
-msgstr ""
-"brak dokumentacji o typie %s oraz temacie %s (lub błąd w przetwarzaniu "
-"pomocy)"
+#. R/packages2.R: message("inferring 'repos = NULL' from 'pkgs'")
+#. R/packages2.R: message("inferring 'repos = NULL' from 'pkgs'")
+#. R/packages2.R: message("inferring 'repos = NULL' from 'pkgs'")
+#. R/packages2.R: message("inferring 'repos = NULL' from 'pkgs'")
+#: R/packages2.R:0
+msgid "inferring 'repos = NULL' from 'pkgs'"
+msgstr "wnioskowanie 'repos = NULL' z 'pkgs'"
 
-# utils/R/question.R: 120
-# stop(gettextf("the object of class %s in the function call %s could not be used as a documentation topic",
-#                           dQuote(class(f)), sQuote(deparse(expr))),
-#                  domain = NA)
+#. R/packages2.R: gettextf("installation of one or more packages failed,\n  probably %s",     paste(sQuote(failed), collapse = ", "))
+#: R/packages2.R:0
 msgid ""
-"the object of class %s in the function call %s could not be used as a "
-"documentation topic"
+"installation of one or more packages failed,\n"
+"  probably %s"
 msgstr ""
-"obiekt klasy %s w wywołaniu funkcji %s nie mógł być użyty jako temat "
-"dokumentacji"
+"instalacja jednego lub więcej pakietów nie powiodła się,\n"
+"  prawdopodobnie %s"
 
-# utils/R/question.R: 125
-# stop(gettextf("no methods for %s and no documentation for it as a function",
-#                           sQuote(f)),
-#                  domain = NA)
-msgid "no methods for %s and no documentation for it as a function"
-msgstr "brak metod dla %s oraz brak dla niego dokumentacji jako funkcji"
+#. R/packages2.R: gettextf("installation of package %s had non-zero exit status",     sQuote(update[i, 1L]))
+#. R/packages2.R: gettextf("installation of package %s had non-zero exit status",     sQuote(update[i, 1L]))
+#: R/packages2.R:0
+msgid "installation of package %s had non-zero exit status"
+msgstr "instalacja pakietu %s miała niezerowy status wyjścia"
 
-# utils/R/question.R: 161
-# stop(gettextf("error in trying to evaluate the expression for argument %s (%s)",
-#                                       sQuote(arg), deparse(argExpr)),
-#                              domain = NA)
-msgid "error in trying to evaluate the expression for argument %s (%s)"
-msgstr "błąd podczas próby obliczenia wyrażenia dla argumentu %s (%s)"
+#. R/help.R: gettextf("invalid %s argument", sQuote("file"))
+#. R/packages2.R: gettextf("invalid %s argument", sQuote("keep_outputs"))
+#: R/help.R:0 R/packages2.R:0
+msgid "invalid %s argument"
+msgstr "niepoprawny argument '%s'"
 
-# utils/R/question.R: 180
-# warning(gettextf("no method defined for function %s and signature %s",
-#                              sQuote(f),
-#                              sQuote(sigFormat(sigNames, sigClasses))),
-#                     domain = NA)
-msgid "no method defined for function %s and signature %s"
-msgstr "brak zdefiniowanej metody dla funkcji %s oraz sygnatury %s"
+#. R/write.table.R: stop("invalid 'col.names' specification")
+#: R/write.table.R:0
+msgid "invalid 'col.names' specification"
+msgstr "niepoprawne określenie 'col.names'"
 
-# utils/R/question.R: 187
-# stop(gettextf("no documentation for function %s and signature %s",
-#                           sQuote(f),
-#                           sQuote(sigFormat(sigNames, sigClasses))),
-#                  domain = NA)
-msgid "no documentation for function %s and signature %s"
-msgstr "brak dokumentacji dla funkcji %s oraz sygnatury %s"
+#. R/edit.R: stop("invalid 'data' argument")
+#: R/edit.R:0
+msgid "invalid 'data' argument"
+msgstr "niepoprawny argument 'data'"
 
-# utils/R/read.DIF.R: 29
-# stop("No DIF data on clipboard")
-msgid "No DIF data on clipboard"
-msgstr "Brak danych DIF w schowku"
+#. R/packages.R: stop("invalid 'filters' argument.")
+#: R/packages.R:0
+msgid "invalid 'filters' argument."
+msgstr "niepoprawny argument 'filters'"
 
-# utils/R/read.DIF.R: 34
-# stop("file had no lines")
-msgid "file had no lines"
-msgstr "plik nie miał żadnych linii"
+#. R/edit.R: stop("invalid 'modes' argument")
+#: R/edit.R:0
+msgid "invalid 'modes' argument"
+msgstr "niepoprawny argument 'modes'"
 
-# utils/R/read.DIF.R: 52
-# stop("row and column counts not found")
-msgid "row and column counts not found"
-msgstr "liczniki wierszy i kolumn nie zostały znalezione"
+#. R/packages.R: stop("invalid 'oldPkgs'; must be a character vector or a result from old.packages()")
+#: R/packages.R:0
+msgid ""
+"invalid 'oldPkgs'; must be a character vector or a result from old.packages()"
+msgstr ""
+"niepoprawny 'oldPkgs'; musi być wektorem tekstowym lub wynikiem pochodzącym "
+"z 'old.packages()'"
 
-# utils/R/read.DIF.R: 68
-# stop("More rows than specified in header; maybe use 'transpose=TRUE'")
-msgid "More rows than specified in header; maybe use 'transpose=TRUE'"
-msgstr "Więcej wierszy niż określono w nagłówku; może użyj 'transpose=TRUE'"
+#. R/write.table.R: stop("invalid 'quote' specification")
+#: R/write.table.R:0
+msgid "invalid 'quote' specification"
+msgstr "niepoprawne określenie 'quote'"
 
-# utils/R/read.DIF.R: 71
-# stop("Unrecognized special data value")
-msgid "Unrecognized special data value"
-msgstr "Nierozpoznana specjalna wartość danej"
+#. R/read.DIF.R: stop("invalid 'row.names' length")
+#. R/readtable.R: stop("invalid 'row.names' length")
+#: R/read.DIF.R:0 R/readtable.R:0
+msgid "invalid 'row.names' length"
+msgstr "niepoprawna długość 'row.names'"
 
-# utils/R/read.DIF.R: 75
-# stop("More columns than specified in header; maybe use 'transpose=TRUE'")
-msgid "More columns than specified in header; maybe use 'transpose=TRUE'"
-msgstr "Więcej kolumn niż określono w nagłówku; może użyj 'transpose=TRUE'"
+#. R/read.DIF.R: stop("invalid 'row.names' specification")
+#. R/readtable.R: stop("invalid 'row.names' specification")
+#. R/write.table.R: stop("invalid 'row.names' specification")
+#: R/read.DIF.R:0 R/readtable.R:0 R/write.table.R:0
+msgid "invalid 'row.names' specification"
+msgstr "niepoprawne określenie 'row.names'"
 
-# utils/R/read.DIF.R: 89
-# stop("Unrecognized value indicator")
-msgid "Unrecognized value indicator"
-msgstr "Nierozpoznany wskaźnik wartości"
+#. R/sock.R: stop("invalid 'socket' argument")
+#: R/sock.R:0
+msgid "invalid 'socket' argument"
+msgstr "niepoprawny argument 'socket'"
 
-# utils/R/read.DIF.R: 106
-# stop("no lines available in input")
-# utils/R/readtable.R: 77
-# stop("no lines available in input")
-msgid "no lines available in input"
-msgstr "nie ma dostępnych linii na wejściu"
+#. R/tar.R: stop("invalid 'tarfile' argument")
+#: R/tar.R:0
+msgid "invalid 'tarfile' argument"
+msgstr "niepoprawny argument 'tarfile'"
 
-# utils/R/read.DIF.R: 132
-# warning("header and 'col.names' are of different lengths")
-# utils/R/readtable.R: 121
-# warning("header and 'col.names' are of different lengths")
-msgid "header and 'col.names' are of different lengths"
-msgstr "nagłówek oraz argument 'col.names' mają różne długości"
+#. R/edit.R: stop("invalid 'x' argument")
+#: R/edit.R:0
+msgid "invalid 'x' argument"
+msgstr "niepoprawny argument 'x'"
 
-# utils/R/read.DIF.R: 137
-# stop("more columns than column names")
-# utils/R/readtable.R: 126
-# stop("more columns than column names")
-msgid "more columns than column names"
-msgstr "więcej kolumn niż nazw kolumn"
+#. R/help.start.R: stop("invalid browser name, check options(\"browser\").")
+#: R/help.start.R:0
+msgid "invalid browser name, check options(\"browser\")."
+msgstr "niepoprawna nazwa przeglądarki, sprawdź 'options(\"browser\")'."
 
-# utils/R/read.DIF.R: 139
-# stop("more column names than columns")
-# utils/R/readtable.R: 130
-# stop("more column names than columns")
-msgid "more column names than columns"
-msgstr "więcej nazw kolumn niż kolumn"
+#. R/str.R: gettextf("invalid components in options(\"str\"): %s", paste(setdiff(names(strO),     oDefs), collapse = ", "))
+#: R/str.R:0
+msgid "invalid components in options(\"str\"): %s"
+msgstr "niepoprawne komponenty w 'options(\"str\")': %s"
 
-# utils/R/read.DIF.R: 140
-# stop("rows are empty: giving up")
-msgid "rows are empty: giving up"
-msgstr "wiersze są puste: poddawanie się"
+#. R/edit.R: gettextf("invalid factor levels in '%s'", names(out)[i])
+#: R/edit.R:0
+msgid "invalid factor levels in '%s'"
+msgstr "niepoprawne poziomy czynnika w '%s'"
 
-# utils/R/read.DIF.R: 155
-# warning("not all columns named in 'colClasses' exist")
-# utils/R/readtable.R: 146
-# warning("not all columns named in 'colClasses' exist")
-msgid "not all columns named in 'colClasses' exist"
-msgstr "nie wszystkie kolumny nazwane w 'colClasses' istnieją"
+#. R/read.fortran.R: stop("invalid format")
+#: R/read.fortran.R:0
+msgid "invalid format"
+msgstr "niepoprawny format"
 
-# utils/R/read.DIF.R: 191
-# stop("invalid numeric 'as.is' expression")
-# utils/R/readtable.R: 190
-# stop("invalid numeric 'as.is' expression")
+#. R/tar.R: gettextf("invalid gid value replaced by that for user 'nobody'",     uid)
+#: R/tar.R:0
+msgid "invalid gid value replaced by that for user 'nobody'"
+msgstr ""
+"niepoprawna wartość 'gid' zastąpiona przez wartość dla użytkownika 'nobody'"
+
+#. R/edit.R: stop("invalid input matrix")
+#: R/edit.R:0
+msgid "invalid input matrix"
+msgstr "niepoprawna macierz wejściowa"
+
+#. R/tar.R: stop("invalid name field in tarball")
+#: R/tar.R:0
+msgid "invalid name field in tarball"
+msgstr "niepoprawne pole nazwy w pliku tarball"
+
+#. R/write.table.R: stop("invalid numbers in 'quote'")
+#: R/write.table.R:0
+msgid "invalid numbers in 'quote'"
+msgstr "niepoprawne liczby w 'quote'"
+
+#. R/read.DIF.R: stop("invalid numeric 'as.is' expression")
+#. R/readtable.R: stop("invalid numeric 'as.is' expression")
+#: R/read.DIF.R:0 R/readtable.R:0
 msgid "invalid numeric 'as.is' expression"
 msgstr "niepoprawne wyrażenie liczbowe w 'as.is'"
 
-# utils/R/read.DIF.R: 198
-# warning("not all columns named in 'as.is' exist")
-# utils/R/readtable.R: 197
-# warning("not all columns named in 'as.is' exist")
-msgid "not all columns named in 'as.is' exist"
-msgstr "nie wszystkie kolumny nazwane w 'as.is' istnieją"
-
-# utils/R/read.DIF.R: 203
-# stop(gettextf("'as.is' has the wrong length %d  != cols = %d",
-#                      length(as.is), cols), domain = NA)
-# utils/R/readtable.R: 202
-# stop(gettextf("'as.is' has the wrong length %d  != cols = %d",
-#                      length(as.is), cols), domain = NA)
-msgid "'as.is' has the wrong length %d  != cols = %d"
-msgstr "'as.is' posiada niepoprawną długość %d != kolumny = %d"
+#. R/tar.R: stop("invalid octal digit")
+#: R/tar.R:0
+msgid "invalid octal digit"
+msgstr "niepoprawna cyfra ósemkowa"
 
-# utils/R/read.DIF.R: 251
-# stop("invalid 'row.names' specification")
-# utils/R/readtable.R: 245
-# stop("invalid 'row.names' specification")
-# utils/R/write.table.R: 86
-# stop("invalid 'row.names' specification")
-msgid "invalid 'row.names' specification"
-msgstr "niepoprawne określenie 'row.names'"
+#. R/str.R: warning("invalid options(\"str\") -- using defaults instead")
+#: R/str.R:0
+msgid "invalid options(\"str\") -- using defaults instead"
+msgstr ""
+"niepoprawne 'options(\"str\")' -- używanie w zamian wartości domyślnych"
 
-# utils/R/read.DIF.R: 259
-# stop("invalid 'row.names' length")
-# utils/R/readtable.R: 253
-# stop("invalid 'row.names' length")
-msgid "invalid 'row.names' length"
-msgstr "niepoprawna długość 'row.names'"
+#. R/news.R: stop("invalid query")
+#: R/news.R:0
+msgid "invalid query"
+msgstr "niepoprawne zapytanie"
 
-# utils/R/read.DIF.R: 261
-# stop("duplicate 'row.names' are not allowed")
-# utils/R/readtable.R: 255
-# stop("duplicate 'row.names' are not allowed")
-msgid "duplicate 'row.names' are not allowed"
-msgstr "powtórzone 'row.names' nie są dozwolone"
+#. R/tar.R: gettextf("invalid uid value replaced by that for user 'nobody'",     uid)
+#: R/tar.R:0
+msgid "invalid uid value replaced by that for user 'nobody'"
+msgstr ""
+"niepoprawna wartość 'uid' zastąpiona przez wartość dla użytkownika 'nobody'"
 
-# utils/R/read.DIF.R: 263
-# stop("missing values in 'row.names' are not allowed")
-# utils/R/readtable.R: 257
-# stop("missing values in 'row.names' are not allowed")
-msgid "missing values in 'row.names' are not allowed"
-msgstr "brakujące wartości w 'row.names' nie są dozwolone"
+#. R/SweaveDrivers.R: gettextf("invalid value for %s : %s", sQuote(opt), oldval)
+#: R/SweaveDrivers.R:0
+msgid "invalid value for %s : %s"
+msgstr "niepoprawna wartość dla %s: %s"
 
-# utils/R/read.fortran.R: 39
-# stop("missing lengths for some fields")
-msgid "missing lengths for some fields"
-msgstr "brakuje długości dla niektórych pól"
+#. R/databrowser.R: gettextf("kind '%s' not yet implemented", kind)
+#: R/databrowser.R:0
+msgid "kind '%s' not yet implemented"
+msgstr "rodzaj '%s' nie został jeszcze zaimplementowany"
 
-# utils/R/read.fortran.R: 47
-# stop("invalid format")
-msgid "invalid format"
-msgstr "niepoprawny format"
+#. R/menu.R: stop("menu() cannot be used non-interactively")
+#: R/menu.R:0
+msgid "menu() cannot be used non-interactively"
+msgstr "funkcja 'menu()' nie może być użyta nieinteraktywnie"
 
-# utils/R/readhttp.R: 24
-# stop("transfer failure")
-msgid "transfer failure"
-msgstr "niepowodzenie przesyłu"
+#. R/packages.R: gettextf("metadata of %s is corrupt", sQuote(pkgpath))
+#. R/packages.R: gettextf("metadata of %s is corrupt", sQuote(pkgpath))
+#: R/packages.R:0
+msgid "metadata of %s is corrupt"
+msgstr "metadane dla %s są uszkodzone"
 
-# utils/R/readhttp.R: 45
-# stop(gettextf("%s option must be a length one character vector or NULL",
-#                       sQuote("HTTPUserAgent")), domain = NA)
-msgid "%s option must be a length one character vector or NULL"
-msgstr ""
-"opcja %s musi być wektorem tekstowym o długości jeden lub wartością NULL"
+#. R/indices.R: gettextf("metadata of package '%s' is corrupt", pkg)
+#: R/indices.R:0
+msgid "metadata of package '%s' is corrupt"
+msgstr "plik metadanych dla pakietu '%s' jest uszkodzony"
 
-# utils/R/readtable.R: 28
-# stop("'file' must be a character string or connection")
-# utils/R/readtable.R: 61
-# stop("'file' must be a character string or connection")
-# utils/R/write.table.R: 113
-# stop("'file' must be a character string or connection")
-msgid "'file' must be a character string or connection"
-msgstr ""
-"argument 'file' musi być wartością NULL, łańcuchem tekstowym lub połączeniem"
+#. R/windows/create.post.R: stop("method 'mailx' is Unix-only")
+#: R/windows/create.post.R:0
+msgid "method 'mailx' is Unix-only"
+msgstr "metoda 'mailx' jest tylko dla systemów Unix"
 
-# utils/R/readtable.R: 81
-# stop("empty beginning of file")
-msgid "empty beginning of file"
-msgstr "puste rozpoczęcie pliku"
+#. R/citation.R: gettextf("method is only applicable to %s objects", sQuote("person"))
+#. R/citation.R: gettextf("method is only applicable to %s objects", sQuote("bibentry"))
+#: R/citation.R:0
+msgid "method is only applicable to %s objects"
+msgstr "metoda jest stosowalna jedynie do obiektów %s"
 
-# utils/R/readtable.R: 131
-# stop("first five rows are empty: giving up")
-msgid "first five rows are empty: giving up"
-msgstr "pierwsze pięć pierwszych rzędów jest puste: poddawanie się"
+#. R/read.fortran.R: stop("missing lengths for some fields")
+#: R/read.fortran.R:0
+msgid "missing lengths for some fields"
+msgstr "brakuje długości dla niektórych pól"
 
-# utils/R/relist.R: 93
-# warning("relist() requires recursively unlisted objects.")
-msgid "relist() requires recursively unlisted objects."
-msgstr "'relist()' wymaga obiektów rekurencyjnie odłączonych od listy."
+#. R/read.DIF.R: stop("missing values in 'row.names' are not allowed")
+#. R/readtable.R: stop("missing values in 'row.names' are not allowed")
+#: R/read.DIF.R:0 R/readtable.R:0
+msgid "missing values in 'row.names' are not allowed"
+msgstr "brakujące wartości w 'row.names' nie są dozwolone"
 
-# utils/R/relist.R: 106
-# stop("The 'flesh' argument does not contain a skeleton attribute.\n",
-# 	     "Either ensure you unlist a relistable object, or specify the skeleton separately.")
-msgid "The 'flesh' argument does not contain a skeleton attribute."
-msgstr "Argument 'flesh' nie zawiera atrybutu 'skeleton'."
+#. R/read.DIF.R: stop("more column names than columns")
+#. R/readtable.R: stop("more column names than columns")
+#: R/read.DIF.R:0 R/readtable.R:0
+msgid "more column names than columns"
+msgstr "więcej nazw kolumn niż kolumn"
 
-# utils/R/relist.R: 106
-# stop("The 'flesh' argument does not contain a skeleton attribute.\n",
-# 	     "Either ensure you unlist a relistable object, or specify the skeleton separately.")
-msgid ""
-"Either ensure you unlist a relistable object, or specify the skeleton "
-"separately."
-msgstr ""
-"Albo upewnij się, że odłączyłeś od listy wylistowany obiekt, albo określ "
-"strukturę oddzielnie."
+#. R/read.DIF.R: stop("more columns than column names")
+#. R/readtable.R: stop("more columns than column names")
+#: R/read.DIF.R:0 R/readtable.R:0
+msgid "more columns than column names"
+msgstr "więcej kolumn niż nazw kolumn"
 
-# utils/R/roman.R: 33
-# stop("cannot coerce 'x' to roman")
-msgid "cannot coerce 'x' to roman"
-msgstr "nie można przekształcić 'x' na liczby rzymskie"
+#. R/Sweave.R: gettextf("more than one syntax specification found, using the first one")
+#: R/Sweave.R:0
+msgid "more than one syntax specification found, using the first one"
+msgstr "znaleziono więcej niż jedno określenie składni, używanie pierwszego"
 
-# utils/R/rtags.R: 185
-# stop(gettextf("Could not create file %s, aborting", ofile),
-#                  domain = NA)
-msgid "Could not create file %s, aborting"
-msgstr "Nie można było utworzyć pliku %s, przerywanie"
+#. R/progressBar.R: stop("must have 'max' > 'min'")
+#: R/progressBar.R:0
+msgid "must have 'max' > 'min'"
+msgstr "potrzeba mieć 'max' > 'min'"
 
-# utils/R/sessionInfo.R: 38
-# stop("no valid packages were specified")
-msgid "no valid packages were specified"
-msgstr "nie określono poprawnych pakietów"
+#. R/unix/create.post.R: stop("must specify 'address'")
+#. R/unix/create.post.R: stop("must specify 'address'")
+#. R/windows/create.post.R: stop("must specify 'address'")
+#: R/unix/create.post.R:0 R/windows/create.post.R:0
+msgid "must specify 'address'"
+msgstr "argument 'address' musi być określony"
 
-# utils/R/sock.R: 21
-# stop("invalid 'socket' argument")
-msgid "invalid 'socket' argument"
-msgstr "niepoprawny argument 'socket'"
+#. R/objects.R: stop("must supply 'generic.function' or 'class'")
+#: R/objects.R:0
+msgid "must supply 'generic.function' or 'class'"
+msgstr "potrzeba dostarczyć argument 'generic.function' lub 'class'"
 
-# utils/R/sock.R: 29
-# stop("'port' must be integer of length 1")
-msgid "'port' must be integer of length 1"
-msgstr "argument 'port' musi być liczbą całkowitą o długości 1"
+#. R/package.skeleton.R: stop("no R objects specified or available")
+#: R/package.skeleton.R:0
+msgid "no R objects specified or available"
+msgstr "nie określono obiektów R lub są one niedostępne"
 
-# utils/R/sock.R: 31
-# stop("'host' must be character of length 1")
-msgid "'host' must be character of length 1"
-msgstr "argument 'host' musi być tekstem o długości 1"
+#. R/Sweave.R: gettextf("no Sweave file with name %s found", sQuote(file[1L]))
+#: R/Sweave.R:0
+msgid "no Sweave file with name %s found"
+msgstr "nie znaleziono pliku 'Sweave' o nazwie %s"
 
-# utils/R/sock.R: 35
-# stop("can only receive calls on local machine")
-msgid "can only receive calls on local machine"
-msgstr "można odbierać wywołania jedynie na lokalnej maszynie"
+#. R/citation.R: gettextf("no date field in DESCRIPTION file of package %s", sQuote(package))
+#: R/citation.R:0
+msgid "no date field in DESCRIPTION file of package %s"
+msgstr "brak pola daty w pliku DESCRIPTION pakietu %s"
 
-# utils/R/sock.R: 42
-# stop("socket not established")
-# utils/R/sock.R: 43
-# warning("socket not established")
-msgid "socket not established"
-msgstr "gniazdo nie zostało ustanowione"
+#. R/RShowDoc.R: gettextf("no documentation for %s found in package %s", sQuote(what),     sQuote(package))
+#: R/RShowDoc.R:0
+msgid "no documentation for %s found in package %s"
+msgstr "nie znaleziono dokumentacji dla %s w pakiecie %s"
 
-# utils/R/str.R: 27
-# warning("str.data.frame() called with non-data.frame -- coercing to one.")
-msgid "str.data.frame() called with non-data.frame -- coercing to one."
-msgstr ""
-"'str.data.frame()' wywołane z nie-ramką danych -- przekształcanie w ramkę."
+#. R/question.R: gettextf("no documentation for function %s and signature %s",     sQuote(f), sQuote(sigFormat(sigNames, sigClasses)))
+#: R/question.R:0
+msgid "no documentation for function %s and signature %s"
+msgstr "brak dokumentacji dla funkcji %s oraz sygnatury %s"
 
-# utils/R/str.R: 108
-# warning('invalid options("str") -- using defaults instead')
-msgid "invalid options(\"str\") -- using defaults instead"
+#. R/question.R: gettextf("no documentation of type %s and topic %s (or error in processing help)",     sQuote(type), sQuote(topicExpr))
+#: R/question.R:0
+msgid "no documentation of type %s and topic %s (or error in processing help)"
 msgstr ""
-"niepoprawne 'options(\"str\")' -- używanie w zamian wartości domyślnych"
+"brak dokumentacji o typie %s oraz temacie %s (lub błąd w przetwarzaniu "
+"pomocy)"
 
-# utils/R/str.R: 113
-# warning(gettextf("invalid components in options(\"str\"): %s",
-#                              paste(setdiff(names(strO), oDefs), collapse = ", ")),
-#                     domain = NA)
-msgid "invalid components in options(\"str\"): %s"
-msgstr "niepoprawne komponenty w 'options(\"str\")': %s"
+#. R/summRprof.R: stop("no events were recorded")
+#: R/summRprof.R:0
+msgid "no events were recorded"
+msgstr "nie zarejestrowano żadnych zdarzeń"
 
-# utils/R/str.R: 156
-# warning("'str.default': 'le' is NA, so taken as 0", immediate. = TRUE)
-msgid "'str.default': 'le' is NA, so taken as 0"
-msgstr ""
-"'str.default': argument 'le' ma wartość NA, w związku z tym została przyjęta "
-"wartość 0"
+#. R/objects.R: gettextf("no function '%s' could be found", f)
+#: R/objects.R:0
+msgid "no function '%s' could be found"
+msgstr "nie znaleziono fukcjii '%s'"
 
-# utils/R/str.R: 386
-# warning("'object' does not have valid levels()")
-msgid "'object' does not have valid levels()"
-msgstr "'object' nie posiada poprawnych wartości 'levels()'"
+#. R/objects.R: gettextf("no function '%s' is visible", generic.function)
+#: R/objects.R:0
+msgid "no function '%s' is visible"
+msgstr "nie ma widocznej funkcji '%s'"
 
-# utils/R/str.R: 605
-# warning("'digits' and 'digits.d' are both specified and the latter is not used")
-msgid "'digits' and 'digits.d' are both specified and the latter is not used"
+#. R/example.R: gettextf("no help found for %s", sQuote(topic))
+#: R/example.R:0
+msgid "no help found for %s"
+msgstr "nie znaleziono pomocy dla %s"
+
+#. R/help.search.R: gettextf("no information in the database for package %s: need 'rebuild = TRUE'?",     sQuote(package[pos_in_hsearch_db == 0][1L]))
+#: R/help.search.R:0
+msgid "no information in the database for package %s: need 'rebuild = TRUE'?"
 msgstr ""
-"obydwa 'digits' oraz 'digits.d' są zdefiniowane i ostatni nie jest używany"
+"brak informacji w bazie danych dla pakietu %s: potrzeba 'rebuild = TRUE'?"
+
+#. R/packages.R: gettextf("no installed packages for (invalid?) 'lib.loc=%s'",     lib.loc)
+#: R/packages.R:0
+msgid "no installed packages for (invalid?) 'lib.loc=%s'"
+msgstr "brak zainstalowanych pakietów dla (niepoprawnego?) 'lib.loc=%s'"
+
+#. R/read.DIF.R: stop("no lines available in input")
+#. R/readtable.R: stop("no lines available in input")
+#: R/read.DIF.R:0 R/readtable.R:0
+msgid "no lines available in input"
+msgstr "nie ma dostępnych linii na wejściu"
 
-# utils/R/summRprof.R: 36
-# stop(gettextf("no lines found in %s", sQuote(filename)), domain = NA)
+#. R/summRprof.R: gettextf("no lines found in %s", sQuote(filename))
+#: R/summRprof.R:0
 msgid "no lines found in %s"
 msgstr "nie znaleziono linii w %s"
 
-# utils/R/summRprof.R: 45
-# stop("profile does not contain memory information")
-msgid "profile does not contain memory information"
-msgstr "profil nie zawiera informacji o pamięci"
+#. R/question.R: gettextf("no method defined for function %s and signature %s",     sQuote(f), sQuote(sigFormat(sigNames, sigClasses)))
+#: R/question.R:0
+msgid "no method defined for function %s and signature %s"
+msgstr "brak zdefiniowanej metody dla funkcji %s oraz sygnatury %s"
 
-# utils/R/summRprof.R: 57
-# stop("profile does not contain line information")
-msgid "profile does not contain line information"
-msgstr "profil nie zawiera informacji o linii"
+#. R/question.R: gettextf("no methods for %s and no documentation for it as a function",     sQuote(f))
+#: R/question.R:0
+msgid "no methods for %s and no documentation for it as a function"
+msgstr "brak metod dla %s oraz brak dla niego dokumentacji jako funkcji"
 
-# utils/R/summRprof.R: 257
-# stop("no events were recorded")
-msgid "no events were recorded"
-msgstr "nie zarejestrowano żadnych zdarzeń"
+#. R/packages.R: message("no new packages are available")
+#: R/packages.R:0
+msgid "no new packages are available"
+msgstr "nie ma dostępnych nowych pakietów"
 
-# utils/R/tar.R: 27
-# stop("invalid 'tarfile' argument")
-msgid "invalid 'tarfile' argument"
-msgstr "niepoprawny argument 'tarfile'"
+#. R/page.R: gettextf("no object named '%s' to show", x)
+#: R/page.R:0
+msgid "no object named '%s' to show"
+msgstr "brak obiektu '%s' do pokazania"
 
-# utils/R/tar.R: 48
-# stop("'compressed' must be logical or character")
-msgid "'compressed' must be logical or character"
-msgstr "argument 'compressed' musi być wartością logiczną lub znakiem"
+#. R/packages.R: gettextf("no package %s at the repositories", sQuote(p))
+#: R/packages.R:0
+msgid "no package %s at the repositories"
+msgstr "brak pakietu %s w repozytoriach"
 
-# utils/R/tar.R: 89
-# stop(gettextf("failed to create directory %s", sQuote(exdir)),
-#                          domain = NA)
-# utils/R/tar.R: 135
-# stop(gettextf("failed to create directory %s", sQuote(path)),
-#                 domain = NA)
-msgid "failed to create directory %s"
-msgstr "nie udało się utworzyć katalogu %s"
+#. R/indices.R: gettextf("no package '%s' was found", pkg)
+#: R/indices.R:0
+msgid "no package '%s' was found"
+msgstr "nie znaleziono pakietu '%s'"
 
-# utils/R/tar.R: 123
-# stop("invalid octal digit")
-msgid "invalid octal digit"
-msgstr "niepoprawna cyfra ósemkowa"
+#. R/packages2.R: stop("no packages were specified")
+#. R/packages2.R: stop("no packages were specified")
+#. R/packages2.R: stop("no packages were specified")
+#: R/packages2.R:0
+msgid "no packages were specified"
+msgstr "nie określono pakietów"
 
-# utils/R/tar.R: 148
-# stop("'tarfile' must be a character string or a connection")
-# utils/R/tar.R: 363
-# stop("'tarfile' must be a character string or a connection")
-msgid "'tarfile' must be a character string or a connection"
-msgstr "argument 'tarfile' musi być łańcuchem tekstowym lub połączeniem"
+#. R/sessionInfo.R: stop("no valid packages were specified")
+#: R/sessionInfo.R:0
+msgid "no valid packages were specified"
+msgstr "nie określono poprawnych pakietów"
 
-# utils/R/tar.R: 159
-# stop("incomplete block on file")
-# utils/R/tar.R: 208
-# stop("incomplete block on file")
-# utils/R/tar.R: 283
-# stop("incomplete block on file")
-msgid "incomplete block on file"
-msgstr "niekompletny blok w pliku"
+#. R/frametools.R: stop("no vector columns were selected")
+#: R/frametools.R:0
+msgid "no vector columns were selected"
+msgstr "nie wybrano żadnej kolumny wektora"
 
-# utils/R/tar.R: 172
-# stop("invalid name field in tarball")
-msgid "invalid name field in tarball"
-msgstr "niepoprawne pole nazwy w pliku tarball"
+#. R/frametools.R: warning("non-vector columns will be ignored")
+#: R/frametools.R:0
+msgid "non-vector columns will be ignored"
+msgstr "niewektorowe kolumny będą zignorowane"
 
-# utils/R/tar.R: 187
-# warning(gettextf("checksum error for entry '%s'", name),
-#                         domain = NA)
-msgid "checksum error for entry '%s'"
-msgstr "błąd sumy kontrolnej dla wpisu '%s'"
+#. R/frametools.R: warning("non-vector elements will be ignored")
+#: R/frametools.R:0
+msgid "non-vector elements will be ignored"
+msgstr "elementy nie-wektora zostaną zignorowane"
 
-# utils/R/tar.R: 235
-# warning(gettextf("failed to copy %s to %s", sQuote(name2), sQuote(name)), domain = NA)
-# utils/R/tar.R: 243
-# warning(gettextf("failed to copy %s to %s", sQuote(from), sQuote(name)), domain = NA)
-# utils/R/tar.R: 256
-# warning(gettextf("failed to copy %s to %s", sQuote(from), sQuote(name)), domain = NA)
-msgid "failed to copy %s to %s"
-msgstr "kopiowanie %s do %s nie powiodło się"
+#. R/read.DIF.R: warning("not all columns named in 'as.is' exist")
+#. R/readtable.R: warning("not all columns named in 'as.is' exist")
+#: R/read.DIF.R:0 R/readtable.R:0
+msgid "not all columns named in 'as.is' exist"
+msgstr "nie wszystkie kolumny nazwane w 'as.is' istnieją"
 
-# utils/R/tar.R: 318
-# stop("unsupported entry type ", sQuote(ctype))
-msgid "unsupported entry type"
-msgstr "niewspierany typ wpisu"
+#. R/read.DIF.R: warning("not all columns named in 'colClasses' exist")
+#. R/readtable.R: warning("not all columns named in 'colClasses' exist")
+#: R/read.DIF.R:0 R/readtable.R:0
+msgid "not all columns named in 'colClasses' exist"
+msgstr "nie wszystkie kolumny nazwane w 'colClasses' istnieją"
 
-# utils/R/tar.R: 393
-# warning(gettextf("file '%s' not found", f), domain = NA)
-msgid "file '%s' not found"
-msgstr "plik '%s' nie został znaleziony"
+#. R/strcapture.R: stop("number of matches does not always match ncol(proto)")
+#: R/strcapture.R:0
+msgid "number of matches does not always match ncol(proto)"
+msgstr "liczba dopasowań nie zawsze pasuje do 'ncol(proto)'"
 
-# utils/R/tar.R: 427
-# warning(gettextf("file '%s' did not have execute permissions: corrected", f), domain = NA, call. = FALSE)
-msgid "file '%s' did not have execute permissions: corrected"
-msgstr "plik '%s' nie miał uprawnień wykonywalnych: poprawiono"
+#. R/Sweave.R: gettextf("object %s does not have class \"SweaveSyntax\"", sQuote(sname))
+#: R/Sweave.R:0
+msgid "object %s does not have class \"SweaveSyntax\""
+msgstr "obiekt %s nie posiada klasy 'SweaveSyntax'"
 
-# utils/R/tar.R: 463
-# stop("file size is limited to 8GB")
-msgid "file size is limited to 8GB"
-msgstr "rozmiar pliku jest ograniczony do 8 GB"
+#. R/databrowser.R: stop("only 'html = TRUE' is supported on this platform")
+#: R/databrowser.R:0
+msgid "only 'html = TRUE' is supported on this platform"
+msgstr "jedynie 'html = TRUE' jest wspierane na tej platformie"
 
-# utils/R/tar.R: 494
-# warning(gettextf("invalid uid value replaced by that for user 'nobody'", uid),
-#                 domain = NA, call. = FALSE)
-msgid "invalid uid value replaced by that for user 'nobody'"
-msgstr ""
-"niepoprawna wartość 'uid' zastąpiona przez wartość dla użytkownika 'nobody'"
+#. R/objects.R: stop("only numeric indices can be used")
+#: R/objects.R:0
+msgid "only numeric indices can be used"
+msgstr "tylko indeksy liczbowe mogą być użyte"
 
-# utils/R/tar.R: 497
-# warning(gettextf("invalid gid value replaced by that for user 'nobody'", uid),
-#                 domain = NA, call. = FALSE)
-msgid "invalid gid value replaced by that for user 'nobody'"
-msgstr ""
-"niepoprawna wartość 'gid' zastąpiona przez wartość dla użytkownika 'nobody'"
+#. R/packages.R: gettextf("package %s does not exist on the local repository",     sQuote(p))
+#: R/packages.R:0
+msgid "package %s does not exist on the local repository"
+msgstr "pakiet %s nie istnieje w lokalnym repozytorium"
 
-# utils/R/vignette.R: 39
-# warning(gettextf("vignette %s found more than once,\nusing the one found in %s",
-#                                      sQuote(topic),
-#                                      sQuote(file.path(vinfo[pos, "Dir"],
-#                                                       "doc"))),
-#                             call. = FALSE, domain = NA)
+#. R/help.R: gettextf("package %s exists but was not installed under R >= 2.10.0 so help cannot be accessed",     sQuote(pkgname))
+#: R/help.R:0
 msgid ""
-"vignette %s found more than once,\n"
-"using the one found in %s"
+"package %s exists but was not installed under R >= 2.10.0 so help cannot be "
+"accessed"
 msgstr ""
-"ilustracja %s została znaleziona więcej niż raz,\n"
-"używanie tej znalezionej w %s"
+"pakiet %s istnienie ale nie został zainstalowany pod R >= 2.10.0 tak więc "
+"pomoc jest niedostępna"
 
-# utils/R/vignette.R: 54
-# warning(gettextf("vignette %s not found", sQuote(topic)),
-#                     call. = FALSE, domain = NA)
-msgid "vignette %s not found"
-msgstr "ilustracja %s nie została znaleziona"
+#. R/help.search.R: gettextf("package %s has empty hsearch data - strangely", sQuote(p))
+#: R/help.search.R:0
+msgid "package %s has empty hsearch data - strangely"
+msgstr "pakiet %s ma puste dane 'hsearch' - dziwne"
 
-# utils/R/vignette.R: 108
-# warning(gettextf("vignette %s has no PDF/HTML",
-#                          sQuote(x$Topic)),
-#                 call. = FALSE, domain = NA)
-msgid "vignette %s has no PDF/HTML"
-msgstr "ilustracja %s nie posiada PDF/HTML"
+#. R/citation.R: gettextf("package %s not found", sQuote(package))
+#. R/indices.R: gettextf("package %s not found", sQuote(pkg))
+#: R/citation.R:0 R/indices.R:0
+msgid "package %s not found"
+msgstr "pakiet %s nie został znaleziony"
 
-# utils/R/vignette.R: 128
-# warning(gettextf("vignette %s has no R code",
-#                          sQuote(name$Topic)),
-#                 call. = FALSE, domain = NA)
-msgid "vignette %s has no R code"
-msgstr "ilustracja %s nie zawiera kodu"
+#. R/unix/mac.install.R: gettextf("package %s successfully unpacked and MD5 sums checked\n",     sQuote(pkgname))
+#. R/windows/install.packages.R: gettextf("package %s successfully unpacked and MD5 sums checked\n",     sQuote(pkgname))
+#: R/unix/mac.install.R:0 R/windows/install.packages.R:0
+msgid "package %s successfully unpacked and MD5 sums checked"
+msgstr ""
+"pakiet %s został pomyślnie rozpakowany oraz sumy MD5 zostały sprawdzone"
 
-# utils/R/widgets.R: 23
-# stop("select.list() cannot be used non-interactively")
-msgid "select.list() cannot be used non-interactively"
-msgstr "funkcja 'select.list()' nie może być użyta nieinteraktywnie"
+#. R/packages.R: sprintf("package '%s' in library '%s' will not be updated", oldPkgs[pkg],     oldPkgs[pkg, 2])
+#: R/packages.R:0
+msgid "package '%s' in library '%s' will not be updated"
+msgstr "pakiet '%s' w bibliotece '%s' nie zostanie zaktualizowany"
 
-# utils/R/widgets.R: 25
-# stop("'title' must be NULL or a length-1 character vector")
-msgid "'title' must be NULL or a length-1 character vector"
-msgstr ""
-"argument 'title' musi być wartością NULL lub wektorem tekstowym o długości 1"
+#. R/packages.R: gettextf("packages %s are mutually dependent", paste(sQuote(names(DL)),     collapse = ", "))
+#: R/packages.R:0
+msgid "packages %s are mutually dependent"
+msgstr "pakiety %s są wzajemnie zależne"
 
-# utils/R/widgets.R: 59
-# gettext("Enter one or more numbers separated by spaces, or an empty line to cancel\n")
+#. R/Sweave.R: gettextf("parse error or empty option in\n%s", text)
+#: R/Sweave.R:0
 msgid ""
-"Enter one or more numbers separated by spaces, or an empty line to cancel"
+"parse error or empty option in\n"
+"%s"
+msgstr "błąd parsowania lub pusta opcja w %s"
+
+#. R/SweaveDrivers.R: gettextf("path to %s contains spaces,\n", sQuote(styfile))
+#: R/SweaveDrivers.R:0
+msgid "path to %s contains spaces,"
+msgstr "ścieżka do %s zawiera spacje,"
+
+#. R/summRprof.R: stop("profile does not contain line information")
+#: R/summRprof.R:0
+msgid "profile does not contain line information"
+msgstr "profil nie zawiera informacji o linii"
+
+#. R/summRprof.R: stop("profile does not contain memory information")
+#: R/summRprof.R:0
+msgid "profile does not contain memory information"
+msgstr "profil nie zawiera informacji o pamięci"
+
+#. R/debugger.R: gettext("recover called non-interactively; frames dumped, use debugger() to view\n")
+#: R/debugger.R:0
+msgid "recover called non-interactively; frames dumped, use debugger() to view"
 msgstr ""
-"Wprowadź jedną lub więcej liczb oddzielonych spacją, lub pustą linię aby "
-"anulować"
+"przywrócenie wywołano nieinteraktywnie; ramki odrzucono, użyj 'debugger()' "
+"aby przeglądać"
 
-# utils/R/widgets.R: 64
-# gettext("Invalid input, please try again\n")
-msgid "Invalid input, please try again"
-msgstr "Niepoprawne wejście, proszę spróbować ponownie"
+#. R/Sweave.R: gettextf("recursive Sweave input %s in stack", sQuote(ifile))
+#: R/Sweave.R:0
+msgid "recursive Sweave input %s in stack"
+msgstr "rekursywne wejście 'Sweave' %s na stosie"
 
-# utils/R/write.table.R: 27
-# stop("'quote' must be 'TRUE', 'FALSE' or numeric")
-msgid "'quote' must be 'TRUE', 'FALSE' or numeric"
-msgstr "argument 'quote' musi mieć wartość TRUE, FALSE lub musi być liczbą"
+#. R/Sweave.R: gettextf("reference to unknown chunk %s", sQuote(chunkref))
+#: R/Sweave.R:0
+msgid "reference to unknown chunk %s"
+msgstr "referencja do nieznanego fragmentu %s"
 
-# utils/R/write.table.R: 74
-# stop("invalid numbers in 'quote'")
-msgid "invalid numbers in 'quote'"
-msgstr "niepoprawne liczby w 'quote'"
+#. R/relist.R: warning("relist() requires recursively unlisted objects.")
+#: R/relist.R:0
+msgid "relist() requires recursively unlisted objects."
+msgstr "'relist()' wymaga obiektów rekurencyjnie odłączonych od listy."
 
-# utils/R/write.table.R: 76
-# stop("invalid 'quote' specification")
-msgid "invalid 'quote' specification"
-msgstr "niepoprawne określenie 'quote'"
+#. R/help.search.R: warning("removing all entries with invalid multi-byte character data")
+#: R/help.search.R:0
+msgid "removing all entries with invalid multi-byte character data"
+msgstr ""
+"usuwanie wszystkich wpisów z niepoprawnymi danymi o wielobajtowych znakach"
 
-# utils/R/write.table.R: 93
-# stop("'col.names = NA' makes no sense when 'row.names = FALSE'")
-msgid "'col.names = NA' makes no sense when 'row.names = FALSE'"
-msgstr "'col.names = NA' nie ma sensu kiedy 'row.names = FALSE'"
+#. R/unix/mac.install.R: gettextf("restored %s", sQuote(pkgname))
+#. R/windows/install.packages.R: gettextf("restored %s", sQuote(pkgname))
+#: R/unix/mac.install.R:0 R/windows/install.packages.R:0
+msgid "restored %s"
+msgstr "przywrócono %s"
 
-# utils/R/write.table.R: 99
-# stop("invalid 'col.names' specification")
-msgid "invalid 'col.names' specification"
-msgstr "niepoprawne określenie 'col.names'"
+#. R/read.DIF.R: stop("row and column counts not found")
+#: R/read.DIF.R:0
+msgid "row and column counts not found"
+msgstr "liczniki wierszy i kolumn nie zostały znalezione"
 
-# utils/R/write.table.R: 121
-# warning("appending column names to file")
-msgid "appending column names to file"
-msgstr "dołączanie nazw kolumn do pliku"
+#. R/read.DIF.R: stop("rows are empty: giving up")
+#: R/read.DIF.R:0
+msgid "rows are empty: giving up"
+msgstr "wiersze są puste: poddawanie się"
 
-# utils/R/write.table.R: 149
-# warning(gettextf("attempt to set '%s' ignored", argname),
-#                     domain = NA)
-# utils/R/write.table.R: 166
-# warning(gettextf("attempt to set '%s' ignored", argname),
-#                     domain = NA)
-msgid "attempt to set '%s' ignored"
-msgstr "próba ustawienia '%s' została zignorowana"
+#. R/widgets.R: stop("select.list() cannot be used non-interactively")
+#: R/widgets.R:0
+msgid "select.list() cannot be used non-interactively"
+msgstr "funkcja 'select.list()' nie może być użyta nieinteraktywnie"
 
-# utils/R/zip.R: 37
-# stop("'unzip' must be a single character string")
-msgid "'unzip' must be a single character string"
-msgstr "argument 'unzip' musi być pojedynczym łańcuchem tekstowym"
+#. R/sock.R: stop("socket not established")
+#. R/sock.R: warning("socket not established")
+#: R/sock.R:0
+msgid "socket not established"
+msgstr "gniazdo nie zostało ustanowione"
 
-# utils/R/zip.R: 87
-# stop("'files' must a character vector specifying one or more filepaths")
-msgid "'files' must a character vector specifying one or more filepaths"
-msgstr ""
-"argument 'files' musi być wektorem tekstowym określającym jedną lub więcej "
-"ścieżek do plików"
+#. R/packages2.R: message("source repository is unavailable to check versions")
+#: R/packages2.R:0
+msgid "source repository is unavailable to check versions"
+msgstr "repozytorium źródeł nie jest w stanie sprawdzić wersji"
 
-# utils/R/unix/create.post.R: 36
-# warning("cannot find program to open 'mailto:' URIs: reverting to 'method=\"none\"'")
+#. R/packages.R: stop("specifying 'contriburl' or 'available' requires a single type, not type = \"both\"")
+#. R/packages.R: stop("specifying 'contriburl' or 'available' requires a single type, not type = \"both\"")
+#. R/packages2.R: stop("specifying 'contriburl' or 'available' requires a single type, not type = \"both\"")
+#: R/packages.R:0 R/packages2.R:0
 msgid ""
-"cannot find program to open 'mailto:' URIs: reverting to 'method=\"none\"'"
+"specifying 'contriburl' or 'available' requires a single type, not type = "
+"\"both\""
 msgstr ""
-"nie można znaleźć programu do otwarcia 'mailto:' URI: przywracanie 'method="
-"\"none\"'"
+"określanie 'contriburl' lub 'available' wymaga pojedynczego typu, a nie typu "
+"= \"both\""
 
-# utils/R/unix/create.post.R: 40
-# message("Using the browser to open a mailto: URI")
-msgid "Using the browser to open a mailto: URI"
-msgstr "Używanie przeglądarki do otwarcia 'mailto': URI"
+#. R/str.R: warning("str.data.frame() called with non-data.frame -- coercing to one.")
+#: R/str.R:0
+msgid "str.data.frame() called with non-data.frame -- coercing to one."
+msgstr ""
+"'str.data.frame()' wywołane z nie-ramką danych -- przekształcanie w ramkę."
 
-# utils/R/unix/create.post.R: 70
-# stop("must specify 'address'")
-# utils/R/unix/create.post.R: 118
-# stop("must specify 'address'")
-# utils/R/windows/create.post.R: 67
-# stop("must specify 'address'")
-msgid "must specify 'address'"
-msgstr "argument 'address' musi być określony"
+#. R/citation.R: warning("subscript out of bounds")
+#: R/citation.R:0
+msgid "subscript out of bounds"
+msgstr "indeks poza granicami"
 
-# utils/R/unix/create.post.R: 71
-# stop("'subject' is missing")
-msgid "'subject' is missing"
-msgstr "brakuje 'subject'"
+#. R/packages2.R: gettextf("system (cmd0): %s", paste(c(cmd0, args0), collapse = " "))
+#: R/packages2.R:0
+msgid "system (cmd0): %s"
+msgstr "system (cmd0): %s"
 
-# utils/R/unix/create.post.R: 72
-# stop("'ccaddress' must be of length 1")
-# utils/R/unix/create.post.R: 120
-# stop("'ccaddress' must be of length 1")
-# utils/R/windows/create.post.R: 69
-# stop("'ccaddress' must be of length 1")
-msgid "'ccaddress' must be of length 1"
-msgstr "argument 'ccaddress' musi być długości 1"
+#. R/Sweave.R: stop("target syntax contains no translation table")
+#: R/Sweave.R:0
+msgid "target syntax contains no translation table"
+msgstr "docelowa składnia nie zawiera tablicy tłumaczenia"
 
-# utils/R/unix/download.file.R: 42
-# stop("no download method found")
-# utils/R/windows/download.file.R: 43
-# stop("no download method found")
-msgid "no download method found"
-msgstr "nie znaleziono metody pobierania"
-
-# utils/R/unix/download.file.R: 63
-# warning("method 'lynx' is untested and deprecated as from R 3.1.0")
-# utils/R/windows/download.file.R: 62
-# warning("method 'lynx' is untested and deprecated as from R 3.1.0")
-msgid "method 'lynx' is untested and deprecated as from R 3.1.0"
-msgstr "metoda 'lynx()' jest nieprzetestowana i jest przestarzała od R 3.1.0"
-
-# utils/R/unix/download.file.R: 70
-# warning("download had nonzero exit status")
-# utils/R/windows/download.file.R: 72
-# warning("download had nonzero exit status")
-msgid "download had nonzero exit status"
-msgstr "pobieranie miało niezerowy status wyjściowy"
+#. R/Sweave.R: gettextf("target syntax not of class %s", dQuote("SweaveSyntax"))
+#: R/Sweave.R:0
+msgid "target syntax not of class %s"
+msgstr "docelowa składnia nie jest klasy %s"
 
-msgid "'tar' returned non-zero exit code %d"
-msgstr "funkcja 'tar' zwróciła niezerowy kod %d wyjścia"
+#. R/question.R: gettextf("the object of class %s in the function call %s could not be used as a documentation topic",     dQuote(class(f)), sQuote(deparse(expr)))
+#: R/question.R:0
+msgid ""
+"the object of class %s in the function call %s could not be used as a "
+"documentation topic"
+msgstr ""
+"obiekt klasy %s w wywołaniu funkcji %s nie mógł być użyty jako temat "
+"dokumentacji"
 
-msgid "file %s is not an OS X binary package"
-msgstr "plik %s nie jest pakietem binarnym OS X"
+#. R/SweaveDrivers.R: gettextf("the output file '%s' has disappeared", outputname)
+#: R/SweaveDrivers.R:0
+msgid "the output file '%s' has disappeared"
+msgstr "plik wyjściowy '%s' zniknął"
+
+#. R/windows/install.packages.R: gettextf("there is no 'libs' directory in package %s", sQuote(pkgname))
+#: R/windows/install.packages.R:0
+msgid "there is no 'libs' directory in package %s"
+msgstr "nie ma katalogu 'libs' w pakiecie %s"
+
+#. R/SweaveDrivers.R: gettext("this may cause problems when running LaTeX")
+#: R/SweaveDrivers.R:0
+msgid "this may cause problems when running LaTeX"
+msgstr "to może spowodować problemy podczas uruchamiania LaTeX'a"
+
+#. R/format.R: gettextf("too many list items (at most up to %d)", 26L)
+#. R/format.R: gettextf("too many list items (at most up to %d)", 3899L)
+#: R/format.R:0
+msgid "too many list items (at most up to %d)"
+msgstr "zbyt dużo pozycji listy (co najwyżej do %d)"
+
+#. R/readhttp.R: stop("transfer failure")
+#: R/readhttp.R:0
+msgid "transfer failure"
+msgstr "niepowodzenie przesyłu"
+
+#. R/packages.R: stop("trying to use CRAN without setting a mirror")
+#: R/packages.R:0
+msgid "trying to use CRAN without setting a mirror"
+msgstr "próba użycia CRAN bez ustawienia serwera lustrzanego"
 
-# utils/R/windows/install.packages.R: 51
-# gettextf("package %s successfully unpacked and MD5 sums checked\n",
-#                      sQuote(pkgname))
-msgid "package %s successfully unpacked and MD5 sums checked"
-msgstr ""
-"pakiet %s został pomyślnie rozpakowany oraz sumy MD5 zostały sprawdzone"
+#. R/packages2.R: stop("type 'binary' is not supported on this platform")
+#: R/packages2.R:0
+msgid "type 'binary' is not supported on this platform"
+msgstr "typ 'binary' nie jest wspierany na tej platformie"
 
-# utils/R/windows/install.packages.R: 109
-# stop(gettextf("ERROR: failed to lock directory %s for modifying\nTry removing %s",
-#                               sQuote(lib), sQuote(lockdir)), domain = NA)
+#. R/packages2.R: stop("type == \"both\" can only be used on Windows or a CRAN build for Mac OS X")
+#: R/packages2.R:0
 msgid ""
-"ERROR: failed to lock directory %s for modifying\n"
-"Try removing %s"
+"type == \"both\" can only be used on Windows or a CRAN build for Mac OS X"
 msgstr ""
-"BŁĄD: nie udało się zablokować katalogu %s do modyfikacji\n"
-"Spróbuj usunąć %s"
+"'type == \"both\"' może być użyte jedynie w systemie Windows lub kompilacji "
+"CRAN dla systemów Mac OS X"
 
-# utils/R/windows/install.packages.R: 114
-# stop(gettextf("ERROR: failed to create lock directory %s",
-#                               sQuote(lockdir)), domain = NA)
-msgid "ERROR: failed to create lock directory %s"
-msgstr "BŁĄD: nie udało się utworzyć blokady katalogu %s"
+#. R/packages2.R: stop("type == \"both\" cannot be used with 'repos = NULL'")
+#: R/packages2.R:0
+msgid "type == \"both\" cannot be used with 'repos = NULL'"
+msgstr "'type == \"both\"' nie może być użyte z 'repos = NULL'"
 
-# utils/R/windows/install.packages.R: 124
-# warning(gettextf("restored %s", sQuote(pkgname)),
-#                                 domain = NA, call. = FALSE, immediate. = TRUE)
-msgid "restored %s"
-msgstr "przywrócono %s"
+#. R/packages.R: gettextf("unable to access index for repository %s", repos)
+#: R/packages.R:0
+msgid "unable to access index for repository %s"
+msgstr "nie można dostać się do indeksu dla repozytorium %s"
 
-# utils/R/windows/install.packages.R: 147
-# warning(gettextf("unable to move temporary installation %s to %s",
-#                                          sQuote(normalizePath(file.path(tmpDir, pkgname, "libs", sub), mustWork = FALSE)),
-#                                          sQuote(normalizePath(file.path(instPath, "libs"), mustWork = FALSE))),
-#                                 domain = NA, call. = FALSE, immediate. = TRUE)
-# utils/R/windows/install.packages.R: 178
-# warning(gettextf("unable to move temporary installation %s to %s",
-#                                      sQuote(normalizePath(file.path(tmpDir, pkgname), mustWork = FALSE)),
-#                                      sQuote(normalizePath(instPath, mustWork = FALSE))),
-#                             domain = NA, call. = FALSE, immediate. = TRUE)
-msgid "unable to move temporary installation %s to %s"
-msgstr "nie można usunąć tymczasowej instalacji %s w %s"
+#. R/packages2.R: gettextf("unable to create %s", sQuote(userdir))
+#. R/packages2.R: gettextf("unable to create %s", sQuote(keep_outputs))
+#: R/packages2.R:0
+msgid "unable to create %s"
+msgstr "nie udało się utworzyć %s"
 
-# utils/R/windows/install.packages.R: 185
-# warning(gettextf("cannot remove prior installation of package %s",
-#                                  sQuote(pkgname)),
-#                         domain = NA, call. = FALSE, immediate. = TRUE)
-msgid "cannot remove prior installation of package %s"
-msgstr "nie można usunąć poprzedniej instalacji pakietu %s"
+#. R/packages2.R: gettextf("unable to create temporary directory %s", sQuote(tmpd))
+#. R/packages2.R: gettextf("unable to create temporary directory %s", sQuote(tmpd))
+#. R/packages2.R: gettextf("unable to create temporary directory %s", sQuote(tmpd))
+#. R/unix/mac.install.R: gettextf("unable to create temporary directory %s", sQuote(tmpDir))
+#. R/unix/mac.install.R: gettextf("unable to create temporary directory %s", sQuote(tmpd))
+#. R/windows/install.packages.R: gettextf("unable to create temporary directory %s", sQuote(normalizePath(tmpDir,     mustWork = FALSE)))
+#. R/windows/install.packages.R: gettextf("unable to create temporary directory %s", sQuote(normalizePath(tmpd,     mustWork = FALSE)))
+#: R/packages2.R:0 R/unix/mac.install.R:0 R/windows/install.packages.R:0
+msgid "unable to create temporary directory %s"
+msgstr "nie udało się utworzyć katalogu %s"
 
-# utils/R/windows/install.packages.R: 268
-# gettextf("The downloaded binary packages are in\n\t%s",
-#                                normalizePath(tmpd, mustWork = FALSE))
-msgid ""
-"The downloaded binary packages are in\n"
-"\t%s"
-msgstr ""
-"Pobrane pakiety binarne są w\n"
-"\t%s"
+#. R/packages2.R: stop("unable to install packages")
+#. R/packages2.R: stop("unable to install packages")
+#. R/packages2.R: stop("unable to install packages")
+#: R/packages2.R:0
+msgid "unable to install packages"
+msgstr "nie można zainstalować pakietów"
 
-# utils/R/unix/sysutils.R: 21
-# warning("'memory.size()' is Windows-specific", call.=FALSE)
-msgid "'memory.size()' is Windows-specific"
-msgstr "funkcja 'memory.size()' jest specyficzna dla systemów Windows"
+#. R/unix/mac.install.R: gettextf("unable to move temporary installation %s to %s", sQuote(file.path(tmpDir,     pkgname)), sQuote(instPath))
+#. R/windows/install.packages.R: gettextf("unable to move temporary installation %s to %s", sQuote(normalizePath(file.path(tmpDir,     pkgname, "libs", sub), mustWork = FALSE)), sQuote(normalizePath(file.path(instPath,     "libs"), mustWork = FALSE)))
+#. R/windows/install.packages.R: gettextf("unable to move temporary installation %s to %s", sQuote(normalizePath(file.path(tmpDir,     pkgname), mustWork = FALSE)), sQuote(normalizePath(instPath,     mustWork = FALSE)))
+#: R/unix/mac.install.R:0 R/windows/install.packages.R:0
+msgid "unable to move temporary installation %s to %s"
+msgstr "nie można usunąć tymczasowej instalacji %s w %s"
 
-# utils/R/unix/sysutils.R: 27
-# warning("'memory.limit()' is Windows-specific", call.=FALSE)
-msgid "'memory.limit()' is Windows-specific"
-msgstr "funkcja 'memory.limit()' jest specyficzna dla systemów Windows"
+#. R/tar.R: stop("unsupported entry type ", sQuote(ctype))
+#: R/tar.R:0
+msgid "unsupported entry type"
+msgstr "niewspierany typ wpisu"
 
-# utils/R/windows/create.post.R: 83
-# stop("method 'mailx' is Unix-only")
-msgid "method 'mailx' is Unix-only"
-msgstr "metoda 'mailx' jest tylko dla systemów Unix"
+#. R/SweaveDrivers.R: warning("value of 'results' option should be lowercase", call. = FALSE)
+#: R/SweaveDrivers.R:0
+msgid "value of 'results' option should be lowercase"
+msgstr "wartość opcji 'results' powinna być pisana małymi literami"
+
+#. R/SweaveDrivers.R: warning("value of 'strip.white' option should be lowercase",     call. = FALSE)
+#: R/SweaveDrivers.R:0
+msgid "value of 'strip.white' option should be lowercase"
+msgstr "wartość opcji 'strip.white' powinna być pisana małymi literami"
 
+#. R/vignette.R: gettextf("vignette %s found more than once,\nusing the one found in %s",     sQuote(topic), sQuote(file.path(vinfo[pos, "Dir"], "doc")))
+#: R/vignette.R:0
 msgid ""
-"If nothing happens, you should open\n"
-"%s yourself"
+"vignette %s found more than once,\n"
+"using the one found in %s"
 msgstr ""
-"Jeśli nic się nie stanie, powinieneś otworzyć\n"
-"%s samemu"
+"ilustracja %s została znaleziona więcej niż raz,\n"
+"używanie tej znalezionej w %s"
 
-# utils/R/windows/install.packages.R: 30
-# stop(gettextf("zip file %s not found",
-#                              sQuote(zipname)), domain = NA)
-msgid "zip file %s not found"
-msgstr "plik zip %s nie został znaleziony"
+#. R/vignette.R: gettextf("vignette %s has no PDF/HTML", sQuote(x$Topic))
+#: R/vignette.R:0
+msgid "vignette %s has no PDF/HTML"
+msgstr "ilustracja %s nie posiada PDF/HTML"
 
-# utils/R/windows/install.packages.R: 69
-# warning(gettextf("failed to create %s", sQuote(path)),
-#                                 domain = NA)
-# utils/R/windows/install.packages.R: 73
-# warning(gettextf("failed to create %s",
-#                                      paste(sQuote(mos[!res]), collapse=",")),
-#                             domain = NA)
-# utils/R/windows/install.packages.R: 90
-# warning(gettextf("failed to create %s",
-#                                              sQuote(path)), domain = NA)
-# utils/R/windows/install.packages.R: 94
-# warning(gettextf("failed to create %s",
-#                                          paste(sQuote(mos[!res]), collapse=",")),
-#                                 domain = NA)
-msgid "failed to create %s"
-msgstr "nie udało się utworzyć %s"
+#. R/vignette.R: gettextf("vignette %s has no R code", sQuote(x$Topic))
+#: R/vignette.R:0
+msgid "vignette %s has no R code"
+msgstr "ilustracja %s nie zawiera kodu"
 
-# utils/R/windows/install.packages.R: 135
-# warning(gettextf("there is no 'libs' directory in package %s",
-#                                  sQuote(pkgname)),
-#                         domain = NA, call. = FALSE, immediate. = TRUE)
-msgid "there is no 'libs' directory in package %s"
-msgstr "nie ma katalogu 'libs' w pakiecie %s"
+#. R/vignette.R: gettextf("vignette %s not found", sQuote(topic))
+#: R/vignette.R:0
+msgid "vignette %s not found"
+msgstr "ilustracja %s nie została znaleziona"
 
-# utils/R/windows/winDialog.R: 23
-# stop("winDialog() cannot be used non-interactively")
+#. R/windows/winDialog.R: stop("winDialog() cannot be used non-interactively")
+#: R/windows/winDialog.R:0
 msgid "winDialog() cannot be used non-interactively"
 msgstr "'winDialog()' nie może być użyty nieinteraktywnie"
 
-# utils/R/windows/winDialog.R: 33
-# stop("winDialogString() cannot be used non-interactively")
+#. R/windows/winDialog.R: stop("winDialogString() cannot be used non-interactively")
+#: R/windows/winDialog.R:0
 msgid "winDialogString() cannot be used non-interactively"
 msgstr "'winDialogString()' nie może być użyty nieinteraktywnie"
 
-# utils/R/apropos.R: 67
-# warning(sprintf(ngettext(ll,
-#                                              "%d occurrence in %s",
-#                                              "%d occurrences in %s"), ll, sp[i]),
-#                             domain = NA)
+#. R/de.R: stop("wrong argument to 'dataentry'")
+#. R/de.R: stop("wrong argument to 'dataentry'")
+#. R/de.R: stop("wrong argument to 'dataentry'")
+#: R/de.R:0
+msgid "wrong argument to 'dataentry'"
+msgstr "niepoprawny argument przekazany do 'dataentry'"
+
+#. R/databrowser.R: stop("wrong number of table row entries")
+#: R/databrowser.R:0
+msgid "wrong number of table row entries"
+msgstr "błędna liczba wpisów w wierszach tabeli"
+
+#. R/help.R: gettextf("you could try %s", sQuote(paste0("??", topic)))
+#: R/help.R:0
+msgid "you could try %s"
+msgstr "mógłbyś spróbować %s"
+
+#. R/windows/install.packages.R: gettextf("zip file %s not found", sQuote(zipname))
+#: R/windows/install.packages.R:0
+msgid "zip file %s not found"
+msgstr "plik zip %s nie został znaleziony"
+
+#. R/Sweave.R: ngettext(length(f), "%d Sweave file for basename %s found", "%d Sweave files for basename %s found",     domain = "R-utils")
+#: R/Sweave.R:0
+msgid "%d Sweave file for basename %s found"
+msgid_plural "%d Sweave files for basename %s found"
+msgstr[0] "znaleziono %d plik 'Sweave' dla nazwy bazowej %s"
+msgstr[1] "znaleziono %d pliki 'Sweave' dla nazwy bazowej %s"
+msgstr[2] "znaleziono %d plików 'Sweave' dla nazwy bazowej %s"
+
+#. R/apropos.R: ngettext(ll, "%d occurrence in %s", "%d occurrences in %s")
+#: R/apropos.R:0
 msgid "%d occurrence in %s"
 msgid_plural "%d occurrences in %s"
 msgstr[0] "%d wystąpienie w %s"
 msgstr[1] "%d wystąpienia w %s"
 msgstr[2] "%d wystąpień w %s"
 
-# utils/R/citation.R: 96
-# warning(sprintf(ngettext(length(role),
-#                                          "Invalid role specification: %s.",
-#                                          "Invalid role specifications: %s."),
-#                                 paste(sQuote(role), collapse = ", ")),
-#                         domain = NA)
-# utils/R/citation.R: 153
-# warning(sprintf(ngettext(length(pos[ind]),
-#                                      "Invalid role specification: %s.",
-#                                      "Invalid role specifications: %s."),
-#                             paste(sQuote(role[pos[ind]]), collapse = ", ")),
-#                     domain = NA)
-msgid "Invalid role specification: %s."
-msgid_plural "Invalid role specifications: %s."
-msgstr[0] "Niepoprawna specyfikacja roli: %s"
-msgstr[1] "Niepoprawne specyfikacje ról: %s"
-msgstr[2] "Niepoprawne specyfikacje ról: %s"
+#. R/packages2.R: ngettext(sum(!ok), "'lib' element %s is not a writable directory",     "'lib' elements %s are not writable directories")
+#: R/packages2.R:0
+msgid "'lib' element %s is not a writable directory"
+msgid_plural "'lib' elements %s are not writable directories"
+msgstr[0] "element 'lib' %s nie jest zapisywalnym katalogiem"
+msgstr[1] "elementy 'lib' %s nie są zapisywalnymi katalogiami"
+msgstr[2] "elementy 'lib' %s nie są zapisywalnymi katalogiami"
 
-# utils/R/citation.R: 526
-# stop(sprintf(ngettext(sum(!ok),
-#                                   "A bibentry of bibtype %s has to specify the field: %s",
-#                                   "A bibentry of bibtype %s has to specify the fields: %s"),
-#                           sQuote(bibtype), paste(rfields[!ok], collapse = ", ")),
-#                  domain = NA)
+#. R/citation.R: ngettext(sum(!ok), "A bibentry of bibtype %s has to specify the field: %s",     "A bibentry of bibtype %s has to specify the fields: %s")
+#: R/citation.R:0
 msgid "A bibentry of bibtype %s has to specify the field: %s"
 msgid_plural "A bibentry of bibtype %s has to specify the fields: %s"
 msgstr[0] "Bibliograficzny wpis typu %s musi określać pole: %s"
 msgstr[1] "Bibliograficzny wpis typu %s musi określać pola: %s"
 msgstr[2] "Bibliograficzny wpis typu %s musi określać pola: %s"
 
-# utils/R/edit.R: 98
-# warning(sprintf(ngettext(sum(has_class),
-#                                     "class discarded from column %s",
-#                                     "classes discarded from columns %s"),
-#                             paste(sQuote(names(name)[has_class]),
-#                                   collapse=", ")),
-#                     domain = NA, call. = FALSE, immediate. = TRUE)
-msgid "class discarded from column %s"
-msgid_plural "classes discarded from columns %s"
-msgstr[0] "klasa usunięta z kolumny %s"
-msgstr[1] "klasy usunięte z kolumn %s"
-msgstr[2] "klasy usunięte z kolumn %s"
-
-# utils/R/help.search.R: 512
-# message(sprintf(ngettext(NROW(db),
-#                                  "matched %d object.",
-#                                  "matched %d objects."),
-#                         NROW(db)),
-#                 domain = NA)
-msgid "matched %d object."
-msgid_plural "matched %d objects."
-msgstr[0] "dopasowano %d obiekt."
-msgstr[1] "dopasowano %d obiekty."
-msgstr[2] "dopasowano %d obiektów."
-
-# utils/R/package.skeleton.R: 71
-# warning(sprintf(ngettext(sum(!have),
-#                                  "object '%s' not found",
-#                                  "objects '%s' not found"),
-#                         paste(sQuote(list[!have]), collapse=", ")),
-#                 domain = NA)
-msgid "object '%s' not found"
-msgid_plural "objects '%s' not found"
-msgstr[0] "obiekt '%s' nie został znaleziony"
-msgstr[1] "obiekty '%s' nie zostały znalezione"
-msgstr[2] "obiekty '%s' nie zostały znalezione"
-
-# utils/R/packages.R: 634
-# message(sprintf(ngettext(length(pkgs),
-#                                  "Removing package from %s\n(as %s is unspecified)",
-#                                  "Removing packages from %s\n(as %s is unspecified)"),
-#                         sQuote(lib), sQuote("lib")), domain = NA)
+#. R/packages2.R: ngettext(sum(later & hasSrc), "Do you want to install from sources the package which needs compilation?",     "Do you want to install from sources the packages which need compilation?")
+#: R/packages2.R:0
 msgid ""
-"Removing package from %s\n"
-"(as %s is unspecified)"
+"Do you want to install from sources the package which needs compilation?"
 msgid_plural ""
-"Removing packages from %s\n"
-"(as %s is unspecified)"
-msgstr[0] ""
-"Usuwanie pakietu z %s\n"
-"(ponieważ %s jest nieokreślone)"
+"Do you want to install from sources the packages which need compilation?"
+msgstr[0] "Czy chcesz zainstalować ze źródeł pakiet, który wymaga kompilacji?"
 msgstr[1] ""
-"Usuwanie pakietów z %s\n"
-"(ponieważ %s jest nieokreślone)"
+"Czy chcesz zainstalować ze źródeł pakiety, które wymagają kompilacji?"
 msgstr[2] ""
-"Usuwanie pakietów z %s\n"
-"(ponieważ %s jest nieokreślone)"
-
-# utils/R/packages2.R: 49
-# warning(sprintf(ngettext(sum(miss),
-# 				 "package %s is not available (for %s)",
-# 				 "packages %s are not available (for %s)"),
-# 			paste(sQuote(p0[miss]), collapse=", "),
-# 			sub(" *\\(.*","", R.version.string)),
-#                 domain = NA, call. = FALSE)
-msgid "package %s is not available (for %s)"
-msgid_plural "packages %s are not available (for %s)"
-msgstr[0] "pakiet %s nie jest dostępny (dla '%s')"
-msgstr[1] "pakiety %s nie są dostępne (dla %s)"
-msgstr[2] "pakiety %s nie są dostępne (dla %s)"
-
-# utils/R/packages2.R: 90
-# warning(sprintf(ngettext(length(not_avail),
-#                                      "dependency %s is not available",
-#                                      "dependencies %s are not available"),
-#                             paste(sQuote(not_avail), collapse=", ")),
-#                     domain = NA, call. = FALSE, immediate. = TRUE)
-msgid "dependency %s is not available"
-msgid_plural "dependencies %s are not available"
-msgstr[0] "zależność %s nie jest dostępna"
-msgstr[1] "zależności %s nie są dostępne"
-msgstr[2] "zależności %s nie są dostępne"
-
-# utils/R/packages2.R: 102
-# message(sprintf(ngettext(length(added),
-#                                      "also installing the dependency %s",
-#                                      "also installing the dependencies %s"),
-#                             paste(sQuote(added), collapse=", ")),
-#                     "\n", domain = NA)
-msgid "also installing the dependency %s"
-msgid_plural "also installing the dependencies %s"
-msgstr[0] "instalowanie dodatkowych zależności %s"
-msgstr[1] "instalowanie dodatkowych zależności %s"
-msgstr[2] "instalowanie dodatkowych zależności %s"
+"Czy chcesz zainstalować ze źródeł pakiety, które wymagają kompilacji?"
 
-# utils/R/packages2.R: 225
-# message(sprintf(ngettext(length(pkgs),
-#                                      "Installing package into %s\n(as %s is unspecified)",
-#                                      "Installing packages into %s\n(as %s is unspecified)"),
-#                             sQuote(lib), sQuote("lib")), domain = NA)
+#. R/packages2.R: ngettext(length(pkgs), "Installing package into %s\n(as %s is unspecified)",     "Installing packages into %s\n(as %s is unspecified)")
+#: R/packages2.R:0
 msgid ""
 "Installing package into %s\n"
 "(as %s is unspecified)"
@@ -2362,47 +2007,19 @@ msgstr[2] ""
 "Instalowanie pakietów w %s\n"
 "(ponieważ %s nie jest określony)"
 
-# utils/R/packages2.R: 234
-# stop(sprintf(ngettext(sum(!ok),
-#                               "'lib' element %s is not a writable directory",
-#                               "'lib' elements %s are not writable directories"),
-#                      paste(sQuote(lib[!ok]), collapse=", ")), domain = NA)
-msgid "'lib' element %s is not a writable directory"
-msgid_plural "'lib' elements %s are not writable directories"
-msgstr[0] "element 'lib' %s nie jest zapisywalnym katalogiem"
-msgstr[1] "elementy 'lib' %s nie są zapisywalnymi katalogiami"
-msgstr[2] "elementy 'lib' %s nie są zapisywalnymi katalogiami"
-
-# utils/R/packages2.R: 328
-# ngettext(sum(later),
-#                             "There is a binary version available but the source version is later",
-#                             "There are binary versions available but the source versions are later")
-msgid "There is a binary version available but the source version is later"
-msgid_plural ""
-"There are binary versions available but the source versions are later"
-msgstr[0] "Jest dostępna wersja binarna ale wersja ze źródłami jest późniejsza"
-msgstr[1] "Są dostępne wersje binarne, ale wersje ze źródłami są późniejsze"
-msgstr[2] "Są dostępne wersje binarne, ale wersje ze źródłami są późniejsze"
-
-# utils/R/packages2.R: 342
-# ngettext(sum(later & hasSrc),
-#                              "Do you want to install from sources the package which need compilation?",
-#                              "Do you want to install from sources the packages which need compilation?")
-msgid "Do you want to install from sources the package which need compilation?"
-msgid_plural ""
-"Do you want to install from sources the packages which need compilation?"
-msgstr[0] "Czy chcesz zainstalować ze źródeł pakiet, który wymaga kompilacji?"
-msgstr[1] ""
-"Czy chcesz zainstalować ze źródeł pakiety, które wymagają kompilacji?"
-msgstr[2] ""
-"Czy chcesz zainstalować ze źródeł pakiety, które wymagają kompilacji?"
+#. R/citation.R: ngettext(length(role), "Invalid role specification: %s.", "Invalid role specifications: %s.")
+#. R/citation.R: ngettext(length(pos[ind]), "Invalid role specification: %s.",     "Invalid role specifications: %s.")
+#: R/citation.R:0
+msgid "Invalid role specification: %s."
+msgid_plural "Invalid role specifications: %s."
+msgstr[0] "Niepoprawna specyfikacja roli: %s"
+msgstr[1] "Niepoprawne specyfikacje ról: %s"
+msgstr[2] "Niepoprawne specyfikacje ról: %s"
 
-# utils/R/packages2.R: 357
-# ngettext(length(s2),
-#                              "Package which are only available in source form, and may need compilation of C/C++/Fortran",
-#                              "Packages which are only available in source form, and may need compilation of C/C++/Fortran")
+#. R/packages2.R: ngettext(length(s2), "Package which is only available in source form, and may need compilation of C/C++/Fortran",     "Packages which are only available in source form, and may need compilation of C/C++/Fortran")
+#: R/packages2.R:0
 msgid ""
-"Package which are only available in source form, and may need compilation of "
+"Package which is only available in source form, and may need compilation of "
 "C/C++/Fortran"
 msgid_plural ""
 "Packages which are only available in source form, and may need compilation "
@@ -2417,36 +2034,26 @@ msgstr[2] ""
 "Pakiety, które są dostępne jedynie w formie źródłowej i mogą wymagać "
 "kompilacji C/C++/Fortran"
 
-# utils/R/packages2.R: 386
-# message(sprintf(ngettext(length(pkgs),
-#                                      "installing the source package %s",
-#                                      "installing the source packages %s"),
-#                         paste(sQuote(pkgs), collapse=", ")),
-#                 "\n", domain = NA)
-msgid "installing the source package %s"
-msgid_plural "installing the source packages %s"
-msgstr[0] "instalowanie pakietu źródłowego %s"
-msgstr[1] "instalowanie pakietów źródłowych %s"
-msgstr[2] "instalowanie pakietów źródłowych %s"
-
-# utils/R/packages2.R: 418
-# sprintf(ngettext(length(na),
-#                                          "package %s is available as a source package but not as a binary",
-#                                          "packages %s are available as source packages but not as binaries"),
-#                                 paste(sQuote(na), collapse = ", "))
-msgid "package %s is available as a source package but not as a binary"
-msgid_plural "packages %s are available as source packages but not as binaries"
+#. R/packages.R: ngettext(length(pkgs), "Removing package from %s\n(as %s is unspecified)",     "Removing packages from %s\n(as %s is unspecified)")
+#: R/packages.R:0
+msgid ""
+"Removing package from %s\n"
+"(as %s is unspecified)"
+msgid_plural ""
+"Removing packages from %s\n"
+"(as %s is unspecified)"
 msgstr[0] ""
-"pakiet %s jest dostępny jako pakiet z kodem źródłowym ale nie jako binaria"
+"Usuwanie pakietu z %s\n"
+"(ponieważ %s jest nieokreślone)"
 msgstr[1] ""
-"pakiety %s są dostępne jako pakiety z kodem źródłowym ale nie jako binaria"
+"Usuwanie pakietów z %s\n"
+"(ponieważ %s jest nieokreślone)"
 msgstr[2] ""
-"pakiety %s są dostępne jako pakiety z kodem źródłowym ale nie jako binaria"
+"Usuwanie pakietów z %s\n"
+"(ponieważ %s jest nieokreślone)"
 
-# utils/R/packages2.R: 430
-# ngettext(sum(later),
-#                                     "There is a binary version available (and will be installed) but the source version is later",
-#                                     "There are binary versions available (and will be installed) but the source versions are later")
+#. R/packages2.R: ngettext(sum(later), "There is a binary version available (and will be installed) but the source version is later",     "There are binary versions available (and will be installed) but the source versions are later")
+#: R/packages2.R:0
 msgid ""
 "There is a binary version available (and will be installed) but the source "
 "version is later"
@@ -2463,37 +2070,134 @@ msgstr[2] ""
 "Dostępne są wersje binarne (i one zostaną zainstalowane) ale wersje z kodem "
 "źródłowym są późniejsze"
 
-# utils/R/read.fwf.R: 70
-# warning(sprintf(ngettext(nread %% recordlength,
-#                                      "last record incomplete, %d line discarded",
-#                                      "last record incomplete, %d lines discarded"),
-#                             nread %% recordlength), domain = NA)
-msgid "last record incomplete, %d line discarded"
-msgid_plural "last record incomplete, %d lines discarded"
-msgstr[0] "ostatni wiersz jest niekompletny, %d linię odrzucono"
-msgstr[1] "ostatni wiersz jest niekompletny, %d linie odrzucono"
-msgstr[2] "ostatni wiersz jest niekompletny, %d linii odrzucono"
+#. R/packages2.R: ngettext(sum(later), "There is a binary version available but the source version is later",     "There are binary versions available but the source versions are later")
+#: R/packages2.R:0
+msgid "There is a binary version available but the source version is later"
+msgid_plural ""
+"There are binary versions available but the source versions are later"
+msgstr[0] "Jest dostępna wersja binarna ale wersja ze źródłami jest późniejsza"
+msgstr[1] "Są dostępne wersje binarne, ale wersje ze źródłami są późniejsze"
+msgstr[2] "Są dostępne wersje binarne, ale wersje ze źródłami są późniejsze"
+
+#. R/packages2.R: ngettext(length(added), "also installing the dependency %s",     "also installing the dependencies %s")
+#: R/packages2.R:0
+msgid "also installing the dependency %s"
+msgid_plural "also installing the dependencies %s"
+msgstr[0] "instalowanie dodatkowych zależności %s"
+msgstr[1] "instalowanie dodatkowych zależności %s"
+msgstr[2] "instalowanie dodatkowych zależności %s"
+
+#. R/edit.R: ngettext(sum(has_class), "class discarded from column %s", "classes discarded from columns %s")
+#: R/edit.R:0
+msgid "class discarded from column %s"
+msgid_plural "classes discarded from columns %s"
+msgstr[0] "klasa usunięta z kolumny %s"
+msgstr[1] "klasy usunięte z kolumn %s"
+msgstr[2] "klasy usunięte z kolumn %s"
 
-# utils/R/roman.R: 114
-# warning(sprintf(ngettext(sum(!ok),
-#                                      "invalid roman numeral: %s",
-#                                      "invalid roman numerals: %s"),
-#                             paste(x[!ind][!ok], collapse = " ")),
-#                     domain = NA)
+#. R/packages2.R: ngettext(length(not_avail), "dependency %s is not available",     "dependencies %s are not available")
+#: R/packages2.R:0
+msgid "dependency %s is not available"
+msgid_plural "dependencies %s are not available"
+msgstr[0] "zależność %s nie jest dostępna"
+msgstr[1] "zależności %s nie są dostępne"
+msgstr[2] "zależności %s nie są dostępne"
+
+#. R/packages2.R: ngettext(length(pkgs), "installing the source package %s", "installing the source packages %s")
+#: R/packages2.R:0
+msgid "installing the source package %s"
+msgid_plural "installing the source packages %s"
+msgstr[0] "instalowanie pakietu źródłowego %s"
+msgstr[1] "instalowanie pakietów źródłowych %s"
+msgstr[2] "instalowanie pakietów źródłowych %s"
+
+#. R/roman.R: ngettext(sum(!ok), "invalid roman numeral: %s", "invalid roman numerals: %s")
+#: R/roman.R:0
 msgid "invalid roman numeral: %s"
 msgid_plural "invalid roman numerals: %s"
 msgstr[0] "niepoprawna rzymska numeracja: %s"
 msgstr[1] "niepoprawne rzymskie numeracje: %s"
 msgstr[2] "niepoprawne rzymskie numeracje: %s"
 
-# utils/R/windows/install.packages.R: 220
-# warning(sprintf(ngettext(sum(inuse),
-#                 "package %s is in use and will not be installed",
-#                 "packages %s are in use and will not be installed"),
-#                         paste(sQuote(pkgnames[inuse]), collapse=", ")),
-#                 call. = FALSE, domain = NA, immediate. = TRUE)
+#. R/read.fwf.R: ngettext(nread%%recordlength, "last record incomplete, %d line discarded",     "last record incomplete, %d lines discarded")
+#: R/read.fwf.R:0
+msgid "last record incomplete, %d line discarded"
+msgid_plural "last record incomplete, %d lines discarded"
+msgstr[0] "ostatni wiersz jest niekompletny, %d linię odrzucono"
+msgstr[1] "ostatni wiersz jest niekompletny, %d linie odrzucono"
+msgstr[2] "ostatni wiersz jest niekompletny, %d linii odrzucono"
+
+#. R/help.search.R: ngettext(n_of_objects_matched, "matched %d object.", "matched %d objects.")
+#: R/help.search.R:0
+msgid "matched %d object."
+msgid_plural "matched %d objects."
+msgstr[0] "dopasowano %d obiekt."
+msgstr[1] "dopasowano %d obiekty."
+msgstr[2] "dopasowano %d obiektów."
+
+#. R/package.skeleton.R: ngettext(sum(!have), "object '%s' not found", "objects '%s' not found")
+#: R/package.skeleton.R:0
+msgid "object '%s' not found"
+msgid_plural "objects '%s' not found"
+msgstr[0] "obiekt '%s' nie został znaleziony"
+msgstr[1] "obiekty '%s' nie zostały znalezione"
+msgstr[2] "obiekty '%s' nie zostały znalezione"
+
+#. R/packages2.R: ngettext(sum(base), "package %s is a base package, and should not be updated",     "packages %s are base packages, and should not be updated")
+#: R/packages2.R:0
+msgid "package %s is a base package, and should not be updated"
+msgid_plural "packages %s are base packages, and should not be updated"
+msgstr[0] "pakiet %s jest pakietem bazowym i nie powinien być aktualizowany"
+msgstr[1] "pakiety %s są pakietami bazowymi i nie powinny być aktualizowane"
+msgstr[2] "pakiety %s są pakietami bazowymi i nie powinny być aktualizowane"
+
+#. R/packages2.R: ngettext(length(na), "package %s is available as a source package but not as a binary",     "packages %s are available as source packages but not as binaries")
+#: R/packages2.R:0
+msgid "package %s is available as a source package but not as a binary"
+msgid_plural "packages %s are available as source packages but not as binaries"
+msgstr[0] ""
+"pakiet %s jest dostępny jako pakiet z kodem źródłowym ale nie jako binaria"
+msgstr[1] ""
+"pakiety %s są dostępne jako pakiety z kodem źródłowym ale nie jako binaria"
+msgstr[2] ""
+"pakiety %s są dostępne jako pakiety z kodem źródłowym ale nie jako binaria"
+
+#. R/windows/install.packages.R: ngettext(sum(inuse), "package %s is in use and will not be installed",     "packages %s are in use and will not be installed")
+#: R/windows/install.packages.R:0
 msgid "package %s is in use and will not be installed"
 msgid_plural "packages %s are in use and will not be installed"
 msgstr[0] "pakiet %s jest w użyciu i nie zostanie zainstalowany"
 msgstr[1] "pakiety %s są w użyciu i nie zostaną zainstalowane"
 msgstr[2] "pakiety %s są w użyciu i nie zostaną zainstalowane"
+
+#. R/packages2.R: ngettext(sum(miss), "package %s is not available (%s)", "packages %s are not available (%s)")
+#: R/packages2.R:0
+msgid "package %s is not available (%s)"
+msgid_plural "packages %s are not available (%s)"
+msgstr[0] "pakiet %s nie jest dostępny (%s)"
+msgstr[1] "pakiety %s nie są dostępne (%s)"
+msgstr[2] "pakiety %s nie są dostępne (%s)"
+
+#~ msgid "cannot choose a"
+#~ msgstr "nie można wybrać serwera lustrzanego"
+
+#~ msgid "mirror non-interactively"
+#~ msgstr "nieinteraktywnie"
+
+#~ msgid "no download method found"
+#~ msgstr "nie znaleziono metody pobierania"
+
+#~ msgid "function '%s' appears not to be an S3 generic"
+#~ msgstr "wygląda na to, że funkcja '%s' nie jest ogólną funkcją S3"
+
+#~ msgid ","
+#~ msgstr ","
+
+#~ msgid "at"
+#~ msgstr "w"
+
+#~ msgid "is"
+#~ msgid_plural "are"
+#~ msgstr[0] "jest"
+#~ msgstr[1] "są"
+#~ msgstr[2] "są"
diff --git a/src/library/utils/po/R-pt_BR.po b/src/library/utils/po/R-pt_BR.po
index 8a9633a..3c0b461 100644
--- a/src/library/utils/po/R-pt_BR.po
+++ b/src/library/utils/po/R-pt_BR.po
@@ -2,7 +2,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: 2.13.0\n"
 "Report-Msgid-Bugs-To: bugs.r-project.org\n"
-"POT-Creation-Date: 2014-02-27 17:14\n"
+"POT-Creation-Date: 2016-04-01 09:50\n"
 "PO-Revision-Date: 2011-03-26 08:57-0300\n"
 "Last-Translator: Fernando Henrique <pessoal at fernandohrosa.com.br>\n"
 "Language-Team: http://www.feferraz.net/br/P/Projeto_Traducao_R_Portugues\n"
@@ -43,10 +43,6 @@ msgstr "referencia a parte desconhecida '%s'"
 msgid "no Sweave file with name %s found"
 msgstr "nenhum arquivo Sweave com o nome '%s' encontrado"
 
-#, fuzzy
-msgid "%d Sweave files for basename %s found"
-msgstr "%d arquivos Sweave com o nome base '%s' encontrados:"
-
 msgid "more than one syntax specification found, using the first one"
 msgstr "mais de uma especificação de sintaxe encontrada, usando a primeira"
 
@@ -70,6 +66,9 @@ msgid ""
 "%s"
 msgstr ""
 
+msgid "Warning: unknown option '--clean='%s"
+msgstr ""
+
 msgid "Warning: unknown option %s"
 msgstr ""
 
@@ -263,6 +262,14 @@ msgstr ""
 msgid "did not assign() anything"
 msgstr ""
 
+msgid ""
+"Cannot debug primitive functions unless they are implicit generics (requires "
+"loading the methods package)"
+msgstr ""
+
+msgid "error in trying to evaluate the expression for argument %s (%s)"
+msgstr ""
+
 msgid "Browsing in the environment with call:"
 msgstr ""
 
@@ -331,9 +338,6 @@ msgstr ""
 msgid "%s has a help file but no examples"
 msgstr ""
 
-msgid "test '%s' is not available"
-msgstr ""
-
 msgid "Line number missing"
 msgstr ""
 
@@ -420,25 +424,25 @@ msgstr ""
 msgid "do not know what to search"
 msgstr ""
 
-msgid "incorrect type specification"
+msgid "argument 'help.db' is deprecated"
 msgstr ""
 
-msgid "argument 'help.db' is deprecated"
+msgid "incorrect type specification"
 msgstr ""
 
-msgid "could not find package %s"
+msgid "no information in the database for package %s: need 'rebuild = TRUE'?"
 msgstr ""
 
-msgid "package %s has empty hsearch data - strangely"
+msgid "incorrect 'agrep' specification"
 msgstr ""
 
-msgid "removing all entries with invalid multi-byte character data"
+msgid "could not find package %s"
 msgstr ""
 
-msgid "no information in the database for package %s: need 'rebuild = TRUE'?"
+msgid "package %s has empty hsearch data - strangely"
 msgstr ""
 
-msgid "incorrect 'agrep' specification"
+msgid "removing all entries with invalid multi-byte character data"
 msgstr ""
 
 msgid "invalid browser name, check options(\"browser\")."
@@ -449,7 +453,7 @@ msgstr ""
 
 msgid ""
 "If nothing happens, you should open\n"
-"'%s' yourself"
+"%s yourself"
 msgstr ""
 
 msgid ""
@@ -503,10 +507,12 @@ msgstr ""
 msgid "no function '%s' is visible"
 msgstr ""
 
-msgid "function '%s' appears not to be generic"
+msgid "generic function '%s' dispatches methods for generic '%s'"
 msgstr ""
 
-msgid "generic function '%s' dispatches methods for generic '%s'"
+msgid ""
+"function '%s' appears not to be S3 generic; found functions that look like "
+"S3 methods"
 msgstr ""
 
 msgid "must supply 'generic.function' or 'class'"
@@ -559,6 +565,11 @@ msgstr ""
 msgid "invalid 'filters' argument."
 msgstr ""
 
+msgid ""
+"specifying 'contriburl' or 'available' requires a single type, not type = "
+"\"both\""
+msgstr ""
+
 msgid "package '%s' in library '%s' will not be updated"
 msgstr ""
 
@@ -602,10 +613,16 @@ msgstr ""
 msgid "trying to use CRAN without setting a mirror"
 msgstr ""
 
-msgid "cannot choose a CRAN mirror non-interactively"
+msgid "'download.file()' error code '%d'"
 msgstr ""
 
-msgid "cannot choose a BioC mirror non-interactively"
+msgid "failed to download mirrors file (%s); using local file '%s'"
+msgstr ""
+
+msgid "cannot choose a"
+msgstr ""
+
+msgid "mirror non-interactively"
 msgstr ""
 
 msgid "cannot set repositories non-interactively"
@@ -628,6 +645,9 @@ msgid ""
 "skipping dependencies"
 msgstr ""
 
+msgid "type 'binary' is not supported on this platform"
+msgstr ""
+
 msgid "no packages were specified"
 msgstr ""
 
@@ -640,15 +660,14 @@ msgstr ""
 msgid "unable to create %s"
 msgstr ""
 
-msgid "inferring 'repos = NULL' from the file name"
+msgid "inferring 'repos = NULL' from 'pkgs'"
 msgstr ""
 
-msgid ""
-"type == \"both\" can only be used on Windows or a CRAN build for Mac OS X"
+msgid "unable to create temporary directory %s"
 msgstr ""
 
 msgid ""
-"type == \"both\" cannot be used if 'available' or 'contriburl' is specified"
+"type == \"both\" can only be used on Windows or a CRAN build for Mac OS X"
 msgstr ""
 
 msgid "type == \"both\" cannot be used with 'repos = NULL'"
@@ -680,9 +699,6 @@ msgstr ""
 msgid "installation of package %s had non-zero exit status"
 msgstr ""
 
-msgid "unable to create temporary directory %s"
-msgstr ""
-
 msgid "foundpkgs: %s"
 msgstr ""
 
@@ -728,6 +744,9 @@ msgstr ""
 msgid "Edit the file and move it to the appropriate directory."
 msgstr ""
 
+msgid "cannot determine import name"
+msgstr ""
+
 msgid "no documentation of type %s and topic %s (or error in processing help)"
 msgstr ""
 
@@ -739,9 +758,6 @@ msgstr ""
 msgid "no methods for %s and no documentation for it as a function"
 msgstr ""
 
-msgid "error in trying to evaluate the expression for argument %s (%s)"
-msgstr ""
-
 msgid "no method defined for function %s and signature %s"
 msgstr ""
 
@@ -883,6 +899,9 @@ msgstr ""
 msgid "'digits' and 'digits.d' are both specified and the latter is not used"
 msgstr ""
 
+msgid "number of matches does not always match ncol(proto)"
+msgstr ""
+
 msgid "no lines found in %s"
 msgstr ""
 
@@ -1013,10 +1032,10 @@ msgstr ""
 msgid "'ccaddress' must be of length 1"
 msgstr ""
 
-msgid "no download method found"
+msgid "'url' must be a length-one character vector"
 msgstr ""
 
-msgid "method 'lynx' is untested and deprecated as from R 3.1.0"
+msgid "'destfile' must be a length-one character vector"
 msgstr ""
 
 msgid "download had nonzero exit status"
@@ -1062,11 +1081,6 @@ msgstr ""
 msgid "method 'mailx' is Unix-only"
 msgstr ""
 
-msgid ""
-"If nothing happens, you should open\n"
-"%s yourself"
-msgstr ""
-
 #, fuzzy
 msgid "zip file %s not found"
 msgstr "documento não encontrado"
@@ -1077,12 +1091,21 @@ msgstr ""
 msgid "there is no 'libs' directory in package %s"
 msgstr ""
 
+msgid "Only '*.zip' and '*.tar.gz' files can be installed."
+msgstr ""
+
 msgid "winDialog() cannot be used non-interactively"
 msgstr ""
 
 msgid "winDialogString() cannot be used non-interactively"
 msgstr ""
 
+#, fuzzy
+msgid "%d Sweave file for basename %s found"
+msgid_plural "%d Sweave files for basename %s found"
+msgstr[0] "%d arquivos Sweave com o nome base '%s' encontrados:"
+msgstr[1] "%d arquivos Sweave com o nome base '%s' encontrados:"
+
 msgid "%d occurrence in %s"
 msgid_plural "%d occurrences in %s"
 msgstr[0] ""
@@ -1122,8 +1145,13 @@ msgid_plural ""
 msgstr[0] ""
 msgstr[1] ""
 
-msgid "package %s is not available (for %s)"
-msgid_plural "packages %s are not available (for %s)"
+msgid "package %s is not available (%s)"
+msgid_plural "packages %s are not available (%s)"
+msgstr[0] ""
+msgstr[1] ""
+
+msgid "package %s is a base package, and should not be updated"
+msgid_plural "packages %s are base packages, and should not be updated"
 msgstr[0] ""
 msgstr[1] ""
 
@@ -1157,14 +1185,15 @@ msgid_plural ""
 msgstr[0] ""
 msgstr[1] ""
 
-msgid "Do you want to install from sources the package which need compilation?"
+msgid ""
+"Do you want to install from sources the package which needs compilation?"
 msgid_plural ""
 "Do you want to install from sources the packages which need compilation?"
 msgstr[0] ""
 msgstr[1] ""
 
 msgid ""
-"Package which are only available in source form, and may need compilation of "
+"Package which is only available in source form, and may need compilation of "
 "C/C++/Fortran"
 msgid_plural ""
 "Packages which are only available in source form, and may need compilation "
diff --git a/src/library/utils/po/R-ru.po b/src/library/utils/po/R-ru.po
index e751838..8a51d8c 100644
--- a/src/library/utils/po/R-ru.po
+++ b/src/library/utils/po/R-ru.po
@@ -10,24 +10,22 @@ msgid ""
 msgstr ""
 "Project-Id-Version: R 2.11.0\n"
 "Report-Msgid-Bugs-To: bugs.r-project.org\n"
-"POT-Creation-Date: 2014-02-27 17:14\n"
-"PO-Revision-Date: 2014-03-11 10:35-0600\n"
+"POT-Creation-Date: 2015-06-06 13:51\n"
+"PO-Revision-Date: 2016-04-05 18:05-0600\n"
 "Last-Translator: Alexey Shipunov <dactylorhiza at gmail.com>\n"
 "Language-Team: Russian\n"
-"Language: \n"
+"Language: ru\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=KOI8-R\n"
 "Content-Transfer-Encoding: 8bit\n"
 "X-Poedit-Language: Russian\n"
-"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n"
-"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
+"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
 
 msgid ""
 "RShowDoc() should be used with a character string argument specifying\n"
 "   a documentation file"
 msgstr ""
-"RShowDoc() ������ ���� ����������� � ����������-��������� �������, "
-"����������� ��\n"
+"RShowDoc() ������ ���� ����������� � ����������-��������� �������, ����������� ��\n"
 "   ���� ������������"
 
 msgid "no documentation for %s found in package %s"
@@ -48,9 +46,6 @@ msgstr "
 msgid "no Sweave file with name %s found"
 msgstr "Sweave-���� � ������ %s �� ������"
 
-msgid "%d Sweave files for basename %s found"
-msgstr "%d Sweave-������ � ������� ������ %s �������"
-
 msgid "more than one syntax specification found, using the first one"
 msgstr "������� ����� ������ �������� �� ���������, ��������� ������"
 
@@ -73,11 +68,14 @@ msgstr ""
 "������ ������� ��� ������ ����� �\n"
 "%s"
 
+msgid "Warning: unknown option '--clean='%s"
+msgstr "��������������: ����������� ����� '--clean='%s"
+
 msgid "Warning: unknown option %s"
 msgstr "��������������: ����������� ����� %s"
 
 msgid "Output file:"
-msgstr ""
+msgstr "���� ������:"
 
 msgid "Compacting PDF document"
 msgstr "������ �������� PDF"
@@ -152,14 +150,12 @@ msgid "bad argument"
 msgstr "������������ ��������"
 
 msgid "'full.names' must be TRUE for multiple paths."
-msgstr ""
+msgstr "'full.names' ������ ���� TRUE ��� ������������� �����."
 
 msgid "Timestamp file no longer exists."
-msgstr ""
+msgstr "Timestamp-���� ������ �� ����������."
 
-msgid ""
-"Not all arguments are of the same length, the following need to be recycled: "
-"%s"
+msgid "Not all arguments are of the same length, the following need to be recycled: %s"
 msgstr "�� ��� ��������� ����� ���� �����, ��������� ���� ���������: %s"
 
 msgid "Use either %s or %s/%s but not both."
@@ -214,12 +210,8 @@ msgstr "
 msgid "To cite package %s in publications use:"
 msgstr "����� ������������� ����� %s � ����������, �����������:"
 
-msgid ""
-"ATTENTION: This citation information has been auto-generated from the "
-"package DESCRIPTION file and may need manual editing, see %s."
-msgstr ""
-"��������: ��� ���������� ��� ����������� ������� �� ����� DESCRIPTION ������ "
-"�, ��������, ������� ��������������, ��. %s."
+msgid "ATTENTION: This citation information has been auto-generated from the package DESCRIPTION file and may need manual editing, see %s."
+msgstr "��������: ��� ���������� ��� ����������� ������� �� ����� DESCRIPTION ������ �, ��������, ������� ��������������, ��. %s."
 
 msgid "'FUN' must be a function or NULL"
 msgstr "'FUN' ������ ���� �������� ��� NULL"
@@ -281,9 +273,8 @@ msgstr "'dump' 
 msgid "Message:"
 msgstr "���������:"
 
-#, fuzzy
 msgid "'dump' is empty"
-msgstr "����� 'dvipscmd' �����"
+msgstr "'dump' ����"
 
 msgid "Available environments had calls:"
 msgstr "��������� ��������� ����� ������:"
@@ -292,9 +283,7 @@ msgid "Enter an environment number, or 0 to exit"
 msgstr "������� ����� ��������� ��� 0 ��� ������"
 
 msgid "recover called non-interactively; frames dumped, use debugger() to view"
-msgstr ""
-"�������������� ������� ��������������; ����� ��������, ����������� debugger"
-"(), ����� �� �����������"
+msgstr "�������������� ������� ��������������; ����� ��������, ����������� debugger(), ����� �� �����������"
 
 msgid "No suitable frames for recover()"
 msgstr "��� ���������� ������ ��� recover()"
@@ -345,9 +334,6 @@ msgstr "
 msgid "%s has a help file but no examples"
 msgstr "� %s ���� ���� ������, �� ��� ��������"
 
-msgid "test '%s' is not available"
-msgstr "���� '%s' ����������"
-
 msgid "Line number missing"
 msgstr "�������� ����� ������"
 
@@ -373,13 +359,10 @@ msgid "'form' must be a two-sided formula"
 msgstr "'form' ������ ���� ������������ ��������"
 
 msgid "'form' must be a two-sided formula with one term on each side"
-msgstr ""
-"'form' ������ ���� ������������ �������� � ����� �������� �� ������ �������"
+msgstr "'form' ������ ���� ������������ �������� � ����� �������� �� ������ �������"
 
 msgid "'topic' should be a name, length-one character vector or reserved word"
-msgstr ""
-"'topic' ������ ���� ������, ��������� ������� ��������� ����� ��� "
-"����������������� ������"
+msgstr "'topic' ������ ���� ������, ��������� ������� ��������� ����� ��� ����������������� ������"
 
 msgid "No documentation for %s in specified packages and libraries:"
 msgstr "� ��������� ������� � ����������� ��� ������������ ��� %s:"
@@ -387,12 +370,8 @@ msgstr "
 msgid "you could try %s"
 msgstr "������ ����������� %s"
 
-msgid ""
-"Help for topic %s is not in any loaded package but can be found in the "
-"following packages:"
-msgstr ""
-"������� �� %s ��� � ����������� �������, �� ��� ����� ���� ������� � "
-"��������� �������:"
+msgid "Help for topic %s is not in any loaded package but can be found in the following packages:"
+msgstr "������� �� %s ��� � ����������� �������, �� ��� ����� ���� ������� � ��������� �������:"
 
 msgid "Package"
 msgstr "�����"
@@ -418,12 +397,8 @@ msgstr "
 msgid "invalid %s argument"
 msgstr "������������ �������� %s"
 
-msgid ""
-"package %s exists but was not installed under R >= 2.10.0 so help cannot be "
-"accessed"
-msgstr ""
-"����� %s ����������, �� �� ���������� ��� R >= 2.10.0, ������� ������ "
-"����������"
+msgid "package %s exists but was not installed under R >= 2.10.0 so help cannot be accessed"
+msgstr "����� %s ����������, �� �� ���������� ��� R >= 2.10.0, ������� ������ ����������"
 
 msgid "creation of %s failed"
 msgstr "�������� %s �� �������"
@@ -440,12 +415,18 @@ msgstr "
 msgid "do not know what to search"
 msgstr "���������, ��� ������"
 
-msgid "incorrect type specification"
-msgstr "������������ �������� ����"
-
 msgid "argument 'help.db' is deprecated"
 msgstr "�������� 'help.db' �������"
 
+msgid "no information in the database for package %s: need 'rebuild = TRUE'?"
+msgstr "� ���� ������ ��� ���������� � ������ %s: ���� 'rebuild = TRUE'?"
+
+msgid "incorrect 'agrep' specification"
+msgstr "������������ �������� 'agrep'"
+
+msgid "incorrect type specification"
+msgstr "������������ �������� ����"
+
 msgid "could not find package %s"
 msgstr "�� ���� ����� ����� %s"
 
@@ -455,12 +436,6 @@ msgstr "
 msgid "removing all entries with invalid multi-byte character data"
 msgstr "������ ��� ��������� � ������������� ������������� �������"
 
-msgid "no information in the database for package %s: need 'rebuild = TRUE'?"
-msgstr "� ���� ������ ��� ���������� � ������ %s: ���� 'rebuild = TRUE'?"
-
-msgid "incorrect 'agrep' specification"
-msgstr "������������ �������� 'agrep'"
-
 msgid "invalid browser name, check options(\"browser\")."
 msgstr "������������ ��� ��������, ��������� options(\"browser\")."
 
@@ -469,17 +444,13 @@ msgstr "help.start() 
 
 msgid ""
 "If nothing happens, you should open\n"
-"'%s' yourself"
+"%s yourself"
 msgstr ""
 "���� ������ �� ����������, ���� �������\n"
-"'%s' ��������������"
+"%s ��������������"
 
-msgid ""
-"If the browser launched by '%s' is already running, it is *not* restarted, "
-"and you must switch to its window."
-msgstr ""
-"���� �������, ���������� '%s', ��� ��������, �� *��* ��������������, � �� "
-"������ ������� � ��� ����."
+msgid "If the browser launched by '%s' is already running, it is *not* restarted, and you must switch to its window."
+msgstr "���� �������, ���������� '%s', ��� ��������, �� *��* ��������������, � �� ������ ������� � ��� ����."
 
 msgid "Otherwise, be patient ..."
 msgstr "���� ���, �����..."
@@ -499,8 +470,7 @@ msgstr "
 msgid "DESCRIPTION file of package '%s' is corrupt"
 msgstr "���� DESCRIPTION ������ '%s' ���������"
 
-msgid ""
-"'DESCRIPTION' file has an 'Encoding' field and re-encoding is not possible"
+msgid "'DESCRIPTION' file has an 'Encoding' field and re-encoding is not possible"
 msgstr "� ����� 'DESCRIPTION' ���� ���� 'Encoding' � ������������� ����������"
 
 msgid "DESCRIPTION file of package '%s' is missing or broken"
@@ -522,18 +492,17 @@ msgid "invalid query"
 msgstr "������������ ������"
 
 msgid "'%s' is a formal generic function; S3 methods will not likely be found"
-msgstr ""
-"'%s' -- ��� ���������� ����� �������; �� ������, ��� �������� ������ S3"
+msgstr "'%s' -- ��� ���������� ����� �������; �� ������, ��� �������� ������ S3"
 
 msgid "no function '%s' is visible"
 msgstr "�� ����� ������� '%s'"
 
-msgid "function '%s' appears not to be generic"
-msgstr "������� '%s', ������, �� �����"
-
 msgid "generic function '%s' dispatches methods for generic '%s'"
 msgstr "����� ������� '%s' ���������� ������ ��� ����� '%s'"
 
+msgid "function '%s' appears not to be S3 generic; found functions that look like S3 methods"
+msgstr "������� '%s', ������, �� S3-�����; ������� �������, ������� �� ������ S3"
+
 msgid "must supply 'generic.function' or 'class'"
 msgstr "���� ������� 'generic.function' ��� 'class'"
 
@@ -573,12 +542,8 @@ msgstr "R-
 msgid "directory '%s' already exists"
 msgstr "����� '%s' ��� ����"
 
-msgid ""
-"generic functions and other S4 objects (e.g., '%s') cannot be dumped; use "
-"the 'code_files' argument"
-msgstr ""
-"����� ������� � ������ ������� S4 (��������, '%s') �� ����� ���� ��������; "
-"����������� �������� 'code_files'"
+msgid "generic functions and other S4 objects (e.g., '%s') cannot be dumped; use the 'code_files' argument"
+msgstr "����� ������� � ������ ������� S4 (��������, '%s') �� ����� ���� ��������; ����������� �������� 'code_files'"
 
 msgid "unable to access index for repository %s"
 msgstr "���������� ������ ��� ��������� %s"
@@ -586,14 +551,14 @@ msgstr "
 msgid "invalid 'filters' argument."
 msgstr "������������ �������� 'filter'."
 
+msgid "specifying 'contriburl' or 'available' requires a single type, not type = \"both\""
+msgstr "����������� 'contriburl' ��� 'available' ������� single ���, � �� type = \"both\""
+
 msgid "package '%s' in library '%s' will not be updated"
 msgstr "����� '%s' � ���������� %s �� ����� ��������"
 
-msgid ""
-"invalid 'oldPkgs'; must be a character vector or a result from old.packages()"
-msgstr ""
-"�������� �������� oldPkgs; ������ ���� ��������� ������ ��� ��������� old."
-"packages()"
+msgid "invalid 'oldPkgs'; must be a character vector or a result from old.packages()"
+msgstr "�������� �������� oldPkgs; ������ ���� ��������� ������ ��� ��������� old.packages()"
 
 msgid "ill-formed 'instPkgs' matrix"
 msgstr "�������� ������� 'instPkgs'"
@@ -626,8 +591,7 @@ msgid "download of package %s failed"
 msgstr "���������� ������ %s �� �������"
 
 msgid "--- Please select a CRAN mirror for use in this session ---"
-msgstr ""
-"--- ����������, �������� ������� CRAN ��� ������������� � ���� ������ ---"
+msgstr "--- ����������, �������� ������� CRAN ��� ������������� � ���� ������ ---"
 
 msgid "trying to use CRAN without setting a mirror"
 msgstr "������ ������������ CRAN ��� ��������� �������"
@@ -660,6 +624,9 @@ msgstr ""
 "�� ����, � ����� ������� 'lib' ������������� �����������\n"
 "��������� �����������"
 
+msgid "type 'binary' is not supported on this platform"
+msgstr "��� 'binary' �� ���� ��������� �� ��������������"
+
 msgid "no packages were specified"
 msgstr "�� ������� ������"
 
@@ -672,19 +639,14 @@ msgstr "
 msgid "unable to create %s"
 msgstr "�� ������� ������� %s"
 
-msgid "inferring 'repos = NULL' from the file name"
-msgstr "��������� 'repos = NULL' �� ������ ����� �����"
+msgid "inferring 'repos = NULL' from 'pkgs'"
+msgstr "��������� 'repos = NULL' �� ������ 'pkgs'"
 
-msgid ""
-"type == \"both\" can only be used on Windows or a CRAN build for Mac OS X"
-msgstr ""
-"type == \"both\" ����� ������������ ������ �� Windows ��� CRAN-������ ��� "
-"Mac OS X"
+msgid "unable to create temporary directory %s"
+msgstr "�� ���� ������� ��������� ���������� %s"
 
-msgid ""
-"type == \"both\" cannot be used if 'available' or 'contriburl' is specified"
-msgstr ""
-"type == \"both\" ������ ������������ ���� ����� 'available' ��� 'contriburl'"
+msgid "type == \"both\" can only be used on Windows or a CRAN build for Mac OS X"
+msgstr "type == \"both\" ����� ������������ ������ �� Windows ��� CRAN-������ ��� Mac OS X"
 
 msgid "type == \"both\" cannot be used with 'repos = NULL'"
 msgstr "type == \"both\" ������ ������������ ������ � 'repos = NULL'"
@@ -717,21 +679,17 @@ msgstr "system (cmd0): %s"
 msgid "installation of package %s had non-zero exit status"
 msgstr "��������� ������ %s ����� ��������� ������ ������"
 
-msgid "unable to create temporary directory %s"
-msgstr "�� ���� ������� ��������� ���������� %s"
-
 msgid "foundpkgs: %s"
 msgstr "foundpkgs: %s"
 
 msgid "files: %s"
 msgstr "files: %s"
 
-#, fuzzy
 msgid ""
 "installation of one or more packages failed,\n"
 "  probably %s"
 msgstr ""
-"��������� ������ (��� �����) ������� ����������� � �������,\n"
+"��������� ������ ��� ����� ������� ����������� � �������,\n"
 "  �������� %s"
 
 msgid ""
@@ -741,12 +699,8 @@ msgstr ""
 "��������� ��������� ������� ��������� �\n"
 "\t%s"
 
-msgid ""
-"The namespace for package \"%s\" is locked; no changes in the global "
-"variables list may be made."
-msgstr ""
-"������������ ���� ������ \"%s\" �����������; ��������� � ���������� "
-"���������� ������� ������."
+msgid "The namespace for package \"%s\" is locked; no changes in the global variables list may be made."
+msgstr "������������ ���� ������ \"%s\" �����������; ��������� � ���������� ���������� ������� ������."
 
 msgid "'env' must be an environment"
 msgstr "'env' ������ ���� ����������"
@@ -772,15 +726,14 @@ msgstr "
 msgid "Edit the file and move it to the appropriate directory."
 msgstr "������������� ���� � ������������ � ���������� �����."
 
+msgid "cannot determine import name"
+msgstr "�� ���� ���������� ���, ������� ����� ��������"
+
 msgid "no documentation of type %s and topic %s (or error in processing help)"
 msgstr "��� ������������ �� ��� %s � ������ %s (��� ������ � ��������� ������)"
 
-msgid ""
-"the object of class %s in the function call %s could not be used as a "
-"documentation topic"
-msgstr ""
-"������ ������ %s � ������ ������� %s ������ ������������ ��� ������ "
-"������������"
+msgid "the object of class %s in the function call %s could not be used as a documentation topic"
+msgstr "������ ������ %s � ������ ������� %s ������ ������������ ��� ������ ������������"
 
 msgid "no methods for %s and no documentation for it as a function"
 msgstr "��� %s ��� ������� � ��� ������������ ��� ���� ��� �������"
@@ -804,17 +757,13 @@ msgid "row and column counts not found"
 msgstr "������� ����� � ������� �� ������"
 
 msgid "More rows than specified in header; maybe use 'transpose=TRUE'"
-msgstr ""
-"� ��������� ������ �����, ��� ����������; ��������, ���� ������������ "
-"'transpose=TRUE'"
+msgstr "� ��������� ������ �����, ��� ����������; ��������, ���� ������������ 'transpose=TRUE'"
 
 msgid "Unrecognized special data value"
 msgstr "�������������� ����������� �������� ������"
 
 msgid "More columns than specified in header; maybe use 'transpose=TRUE'"
-msgstr ""
-"� ��������� ������ �������, ��� ����������; ��������, ���� ������������ "
-"'transpose=TRUE'"
+msgstr "� ��������� ������ �������, ��� ����������; ��������, ���� ������������ 'transpose=TRUE'"
 
 msgid "Unrecognized value indicator"
 msgstr "�������������� �������� ����������"
@@ -885,19 +834,14 @@ msgstr "relist() 
 msgid "The 'flesh' argument does not contain a skeleton attribute."
 msgstr "�������� 'flesh' �� �������� �������� 'skeleton'."
 
-msgid ""
-"Either ensure you unlist a relistable object, or specify the skeleton "
-"separately."
-msgstr ""
-"���� ��������� � ���, ��� �� ������������� �� ������ ������, ������� ����� "
-"������������, ���� ���������� 'skeleton' ��������."
+msgid "Either ensure you unlist a relistable object, or specify the skeleton separately."
+msgstr "���� ��������� � ���, ��� �� ������������� �� ������ ������, ������� ����� ������������, ���� ���������� 'skeleton' ��������."
 
 msgid "cannot coerce 'x' to roman"
 msgstr "�� ���� ��������� 'x' � �������"
 
-#, fuzzy
 msgid "Could not create file %s, aborting"
-msgstr "�� ���� ������������ ���������� � ����"
+msgstr "�� ���� ������� ���� %s, ����������"
 
 msgid "no valid packages were specified"
 msgstr "���������� ������ �� �������"
@@ -987,10 +931,10 @@ msgid "file size is limited to 8GB"
 msgstr "������ ����� ��������� 8GB"
 
 msgid "invalid uid value replaced by that for user 'nobody'"
-msgstr ""
+msgstr "������������ �������� uid �������� �� ������� ��� ������������ 'nobody'"
 
 msgid "invalid gid value replaced by that for user 'nobody'"
-msgstr ""
+msgstr "������������ �������� gid �������� �� ������� ��� ������������ 'nobody'"
 
 msgid ""
 "vignette %s found more than once,\n"
@@ -1005,9 +949,8 @@ msgstr "
 msgid "vignette %s has no PDF/HTML"
 msgstr "� ��������� %s ��� PDF/HTML"
 
-#, fuzzy
 msgid "vignette %s has no R code"
-msgstr "��������� %s �� �������"
+msgstr "��������� %s �� �������� ���� R"
 
 msgid "select.list() cannot be used non-interactively"
 msgstr "select.list() ������ ������������ ��������������"
@@ -1015,11 +958,8 @@ msgstr "select.list() 
 msgid "'title' must be NULL or a length-1 character vector"
 msgstr "'title' ������ ���� NULL ��� ��������� �������� ��������� �����"
 
-msgid ""
-"Enter one or more numbers separated by spaces, or an empty line to cancel"
-msgstr ""
-"������� ���� ��� ����� ����, ����������� ���������, ��� ������ ������ ��� "
-"������"
+msgid "Enter one or more numbers separated by spaces, or an empty line to cancel"
+msgstr "������� ���� ��� ����� ����, ����������� ���������, ��� ������ ������ ��� ������"
 
 msgid "Invalid input, please try again"
 msgstr "������������ ����, ����������, ���������� �����"
@@ -1049,15 +989,10 @@ msgid "'unzip' must be a single character string"
 msgstr "'unzip' ������ ���� ����� ��������� �������"
 
 msgid "'files' must a character vector specifying one or more filepaths"
-msgstr ""
-"'files' ������ ���� ��������� ��������, ������������ ���� ��� ��������� "
-"����� � ������"
+msgstr "'files' ������ ���� ��������� ��������, ������������ ���� ��� ��������� ����� � ������"
 
-msgid ""
-"cannot find program to open 'mailto:' URIs: reverting to 'method=\"none\"'"
-msgstr ""
-"�� ���� ����� ��������� ��� �������� 'mailto:' URI: ����������� � 'method="
-"\"none\"'"
+msgid "cannot find program to open 'mailto:' URIs: reverting to 'method=\"none\"'"
+msgstr "�� ���� ����� ��������� ��� �������� 'mailto:' URI: ����������� � 'method=\"none\"'"
 
 msgid "Using the browser to open a mailto: URI"
 msgstr "��������� ������� ��� �������� mailto: URI"
@@ -1074,8 +1009,11 @@ msgstr "'ccaddress' 
 msgid "no download method found"
 msgstr "�� ������� ������ ����������"
 
-msgid "method 'lynx' is untested and deprecated as from R 3.1.0"
-msgstr ""
+msgid "'url' must be a length-one character vector"
+msgstr "'url' ������ ���� ��������� �������� ��������� �����"
+
+msgid "'destfile' must be a length-one character vector"
+msgstr "'destfile' ������ ���� ��������� �������� ��������� �����"
 
 msgid "download had nonzero exit status"
 msgstr "� ���������� ��������� ������ ������"
@@ -1124,13 +1062,6 @@ msgstr "'memory.limit()' -- Windows-
 msgid "method 'mailx' is Unix-only"
 msgstr "����� 'mailx' ������ ��� Unix"
 
-msgid ""
-"If nothing happens, you should open\n"
-"%s yourself"
-msgstr ""
-"���� ������ �� ����������, ���� �������\n"
-"%s ��������������"
-
 msgid "zip file %s not found"
 msgstr "zip-���� %s �� ������"
 
@@ -1140,12 +1071,21 @@ msgstr "
 msgid "there is no 'libs' directory in package %s"
 msgstr "��� ���������� 'libs' � ������ %s"
 
+msgid "Only '*.zip' and '*.tar.gz' files can be installed."
+msgstr "����� ������������� ������ ����� '*.zip' � '*.tar.gz'."
+
 msgid "winDialog() cannot be used non-interactively"
 msgstr "winDialog() ������ ������������ ��������������"
 
 msgid "winDialogString() cannot be used non-interactively"
 msgstr "winDialogString() ������ ������������ ��������������"
 
+msgid "%d Sweave file for basename %s found"
+msgid_plural "%d Sweave files for basename %s found"
+msgstr[0] "%d Sweave-���� � ������� ������ %s ������"
+msgstr[1] "%d Sweave-����� � ������� ������ %s �������"
+msgstr[2] "%d Sweave-������ � ������� ������ %s �������"
+
 msgid "%d occurrence in %s"
 msgid_plural "%d occurrences in %s"
 msgstr[0] "%d ��������� � %s"
@@ -1198,11 +1138,11 @@ msgstr[2] ""
 "������ ������ �� %s\n"
 "(������ ��� %s �� ����������)"
 
-msgid "package %s is not available (for %s)"
-msgid_plural "packages %s are not available (for %s)"
-msgstr[0] "����� '%s' ���������� (��� %s)"
-msgstr[1] "������ %s ���������� (��� %s)"
-msgstr[2] "������ %s ���������� (��� %s)"
+msgid "package %s is not available (%s)"
+msgid_plural "packages %s are not available (%s)"
+msgstr[0] "����� '%s' ���������� (%s)"
+msgstr[1] "������ %s ���������� (%s)"
+msgstr[2] "������� %s ���������� (%s)"
 
 msgid "dependency %s is not available"
 msgid_plural "dependencies %s are not available"
@@ -1239,37 +1179,22 @@ msgstr[1] "'lib' 
 msgstr[2] "'lib' �������� '%s' -- ����� �� ��� ������"
 
 msgid "There is a binary version available but the source version is later"
-msgid_plural ""
-"There are binary versions available but the source versions are later"
+msgid_plural "There are binary versions available but the source versions are later"
 msgstr[0] "� ������� ���� �������� ������, �� ��������� �����"
 msgstr[1] "� ������� ���� �������� ������, �� ��������� �����"
 msgstr[2] "� ������� ���� �������� ������, �� ��������� �����"
 
-msgid "Do you want to install from sources the package which need compilation?"
-msgid_plural ""
-"Do you want to install from sources the packages which need compilation?"
-msgstr[0] ""
-"�� ������ ���������� �� ���������� �����, ������� ��������� � ����������?"
-msgstr[1] ""
-"�� ������ ���������� �� ���������� ������, ������� ��������� � ����������?"
-msgstr[2] ""
-"�� ������ ���������� �� ���������� ������, ������� ��������� � ����������?"
+msgid "Do you want to install from sources the package which needs compilation?"
+msgid_plural "Do you want to install from sources the packages which need compilation?"
+msgstr[0] "�� ������ ���������� �� ���������� �����, ������� ��������� � ����������?"
+msgstr[1] "�� ������ ���������� �� ���������� ������, ������� ��������� � ����������?"
+msgstr[2] "�� ������ ���������� �� ���������� ������, ������� ��������� � ����������?"
 
-msgid ""
-"Package which are only available in source form, and may need compilation of "
-"C/C++/Fortran"
-msgid_plural ""
-"Packages which are only available in source form, and may need compilation "
-"of C/C++/Fortran"
-msgstr[0] ""
-"����� �������� ������ � ����� ����������, ��������, ����������� ���������� C/"
-"C++/Fortran"
-msgstr[1] ""
-"������ �������� ������ � ����� ����������, ��������, ����������� ���������� "
-"C/C++/Fortran"
-msgstr[2] ""
-"������ �������� ������ � ����� ����������, ��������, ����������� ���������� "
-"C/C++/Fortran"
+msgid "Package which is only available in source form, and may need compilation of C/C++/Fortran"
+msgid_plural "Packages which are only available in source form, and may need compilation of C/C++/Fortran"
+msgstr[0] "����� �������� ������ � ����� ����������, ��������, ����������� ���������� ���� C/C++/Fortran"
+msgstr[1] "������ �������� ������ � ����� ����������, ��������, ����������� ���������� ���� C/C++/Fortran"
+msgstr[2] "������ �������� ������ � ����� ����������, ��������, ����������� ���������� ���� C/C++/Fortran"
 
 msgid "installing the source package %s"
 msgid_plural "installing the source packages %s"
@@ -1283,18 +1208,11 @@ msgstr[0] "
 msgstr[1] "������ %s �������� ��� ���������, �� �� �������� �����"
 msgstr[2] "������ %s �������� ��� ���������, �� �� �������� �����"
 
-msgid ""
-"There is a binary version available (and will be installed) but the source "
-"version is later"
-msgid_plural ""
-"There are binary versions available (and will be installed) but the source "
-"versions are later"
-msgstr[0] ""
-"� ������� ���� �������� ������ (� ��� ����� �����������), �� ��������� �����"
-msgstr[1] ""
-"� ������� ���� �������� ������ (� ��� ����� �����������), �� ��������� �����"
-msgstr[2] ""
-"� ������� ���� �������� ������ (� ��� ����� �����������), �� ��������� �����"
+msgid "There is a binary version available (and will be installed) but the source version is later"
+msgid_plural "There are binary versions available (and will be installed) but the source versions are later"
+msgstr[0] "� ������� ���� �������� ������ (� ��� ����� �����������), �� ��������� �����"
+msgstr[1] "� ������� ���� �������� ������ (� ��� ����� �����������), �� ��������� �����"
+msgstr[2] "� ������� ���� �������� ������ (� ��� ����� �����������), �� ��������� �����"
 
 msgid "last record incomplete, %d line discarded"
 msgid_plural "last record incomplete, %d lines discarded"
@@ -1314,150 +1232,119 @@ msgstr[0] "
 msgstr[1] "������ '%s' ������ ������������ � �� ����� �����������"
 msgstr[2] "������ '%s' ������ ������������ � �� ����� �����������"
 
+#~ msgid ","
+#~ msgstr ","
+#~ msgid ""
+#~ "type == \"both\" cannot be used if 'available' or 'contriburl' is "
+#~ "specified"
+#~ msgstr ""
+#~ "type == \"both\" ������ ������������ ���� ����� 'available' ��� "
+#~ "'contriburl'"
+#~ msgid ""
+#~ "If nothing happens, you should open\n"
+#~ "'%s' yourself"
+#~ msgstr ""
+#~ "���� ������ �� ����������, ���� �������\n"
+#~ "'%s' ��������������"
+#~ msgid "test '%s' is not available"
+#~ msgstr "���� '%s' ����������"
 #~ msgid "Created PDF document %s"
 #~ msgstr "��������� �������� PDF %s"
-
 #~ msgid "broken installation, no CITATION file in the base package."
 #~ msgstr "��������� ���������, � ������ base ��� ����� CITATION."
-
 #~ msgid "file path is too long"
 #~ msgstr "���� � ����� ������� �������"
-
 #~ msgid "linked path is too long"
 #~ msgstr "���� ������ ������� �������"
-
 #~ msgid "at least one field has to be specified"
 #~ msgstr "�� ������� ���� ���� ���� ���� ����������"
 
 #, fuzzy
 #~ msgid "classes of 'name' will be discarded"
 #~ msgstr "�����(�) � \"name' ����� ���������"
-
 #~ msgid "m < 0"
 #~ msgstr "m < 0"
-
 #~ msgid "n < m"
 #~ msgstr "n < m"
-
 #~ msgid "modes argument ignored"
 #~ msgstr "�������� 'modes' ��������"
-
 #~ msgid "too many list items (at most up to number 3899)"
 #~ msgstr "������� ����� ��������� � ������ (����� ������� 3899)"
-
 #~ msgid "Packages {readRDS() sequentially}:"
 #~ msgstr "������ {readRDS() ���������������}:"
-
 #~ msgid "."
 #~ msgstr "."
-
 #~ msgid "reencoding ..."
 #~ msgstr "�������������..."
-
 #~ msgid "saving the database ..."
 #~ msgstr "�������� ���� ������..."
-
 #~ msgid "... database rebuilt"
 #~ msgstr "... ���� ������ �����������"
-
 #~ msgid "Making packages.html  ..."
 #~ msgstr "����� packages.html ..."
-
 #~ msgid "length mismatch: bug in code!"
 #~ msgstr "������������ ����: ������ � ����!"
-
 #~ msgid "??"
 #~ msgstr "??"
-
 #~ msgid "call"
 #~ msgstr "�����"
-
 #~ msgid "Rebuilding the help.search() database"
 #~ msgstr "����������� ���� ������ help.search() "
-
 #~ msgid "..."
 #~ msgstr "..."
-
 #~ msgid "no hsearch.rds meta data for package"
 #~ msgstr "��� ���������� hsearch.rds � ������"
-
 #~ msgid "package"
 #~ msgstr "�����"
-
 #~ msgid "not found"
 #~ msgstr "�� ������"
-
-#~ msgid ","
-#~ msgstr ","
-
 #~ msgid "HTTPUserAgent"
 #~ msgstr "HTTPUserAgent"
-
 #~ msgid "Processing file"
 #~ msgstr "����������� ����"
-
 #~ msgid ""
 #~ "for modifying\n"
 #~ "Try removing"
 #~ msgstr ""
 #~ "��� �����������\n"
 #~ "���������� �������"
-
 #~ msgid "cannot remove prior installation of package"
 #~ msgstr "�� ���� ������� ������� ��������� ������"
-
 #~ msgid "A bibentry of bibtype %s has to correctly specify the field(s): %s"
 #~ msgstr ""
 #~ "����������������� ������ ���� %s ����� ����������� ������������ ���(�): %s"
-
 #~ msgid "'pb' is not from class \"winProgressBar\""
 #~ msgstr "'pb' �� �� ������ \"winProgressBar\""
-
 #~ msgid "cannot turn off locale-specific chars via LC_CTYPE"
 #~ msgstr "�� ���� ��������� ����������� ��� ������ ������� ����� LC_CTYPE"
-
 #~ msgid "Creating directories ..."
 #~ msgstr "������ �����..."
-
 #~ msgid "Creating DESCRIPTION ..."
 #~ msgstr "������ DESCRIPTION..."
-
 #~ msgid "From R 2.14.0 on, every package gets a NAMESPACE."
 #~ msgstr "������� � R 2.14.0, ������ ����� �������� NAMESPACE."
-
 #~ msgid "Argument 'namespace' is deprecated."
 #~ msgstr "�������� 'namespace' ������� � �� �������������."
-
 #~ msgid "Creating NAMESPACE ..."
 #~ msgstr "������ NAMESPACE..."
-
 #~ msgid "Creating Read-and-delete-me ..."
 #~ msgstr "������ Read-and-delete-me..."
-
 #~ msgid "Saving functions and data ..."
 #~ msgstr "�������� ������� � ������..."
-
 #~ msgid "Copying code files ..."
 #~ msgstr "������� ����� � �����..."
-
 #~ msgid "Invalid file name(s) for R code in"
 #~ msgstr "������������ ��� �����(��) ��� ���� R �"
-
 #~ msgid ":"
 #~ msgstr ":"
-
 #~ msgid "are now renamed to 'z<name>.R'"
 #~ msgstr "������ ������������ � 'z<name>.R'"
-
 #~ msgid "Making help files ..."
 #~ msgstr "����� ����� ������..."
-
 #~ msgid "Done."
 #~ msgstr "������."
-
 #~ msgid "Further steps are described in '%s'."
 #~ msgstr "���������� ������� � '%s'."
-
 #~ msgid ""
 #~ "Would you like to create a personal library\n"
 #~ "%s\n"
@@ -1466,242 +1353,177 @@ msgstr[2] "
 #~ "�� ������ �� �� ������� ������������ ����������\n"
 #~ "%s\n"
 #~ "��� ���� ����� �������������� ������ � ���?"
-
 #~ msgid "Postscript offline help is deprecated"
 #~ msgstr "��������� ������ Postscript ��������"
-
 #~ msgid "running %s failed"
 #~ msgstr "������ %s �� ������"
-
 #~ msgid "%s produced no output file: sent to printer?"
 #~ msgstr "%s �� ��� ��������� �����: ������ �� �������?"
-
 #~ msgid "Use either 'given' or 'first'/'middle' but not both."
 #~ msgstr "����������� ���� 'given' ��� 'first'/'middle', �� �� ��� �����."
-
 #~ msgid "It is recommended to use 'given' instead of 'middle'."
 #~ msgstr "������������� ������������ 'given' ������ 'middle'."
-
 #~ msgid "It is recommended to use 'family' instead of 'last'."
 #~ msgstr "������������� ������������ 'family' ������ 'last'."
-
 #~ msgid "It is recommended to use given/family instead of first/middle/last."
 #~ msgstr "������������� ������������ given/family ������ first/middle/last."
-
 #~ msgid "A bibentry of bibtype '"
 #~ msgstr "����������������� ������ ���� bibtype '"
-
 #~ msgid "method is just applicable to 'bibentry' objects"
 #~ msgstr "����� �������� ������ ��� �������� 'bibentry'"
 
 #, fuzzy
 #~ msgid "Enhanced authors specification provides no authors."
 #~ msgstr "���������� �������� ������� �� �������� �� ������ ������."
-
 #~ msgid "'namespace' must be a single logical"
 #~ msgstr "'namepace' ������ ���� ������� ���������� ���������"
-
 #~ msgid "Package '"
 #~ msgstr "����� '"
-
 #~ msgid "You can now run LaTeX on '%s'"
 #~ msgstr "������ ����� ��������� LaTeX �� '%s'"
-
 #~ msgid "updating HTML package descriptions"
 #~ msgstr "�������� HTML-�������� �������"
-
 #~ msgid "read.dcf() error on file '%s'"
 #~ msgstr "������ read.dcf() �� ����� '%s'"
-
 #~ msgid "Could not find aspell or ispell executable."
 #~ msgstr "�� ���� ����� ������������ ����� aspell ��� ispell."
-
 #~ msgid "argument 'lib' is missing: using %s"
 #~ msgstr "�������� 'lib' ��������: ��������� %s"
-
 #~ msgid "argument 'lib' is missing: using '%s'"
 #~ msgstr "�������� 'lib' ��������: ��������� %s"
-
 #~ msgid "untar: using cmd ="
 #~ msgstr "untar: ��������� cmd ="
-
 #~ msgid "Enter zero or more numbers separated by space"
 #~ msgstr "������� �� ������ ��� ������ �����, ����������� ��������"
-
 #~ msgid "more than one help file found: using package '%s'"
 #~ msgstr "������� ����� ������ ����� ������: ��������� ����� '%s'"
-
 #~ msgid "offline = TRUE is deprecated: use help_type =\"postscript\""
 #~ msgstr ""
 #~ "offline = TRUE �� ��������������: ����������� help_type =\"postscript\""
-
 #~ msgid "chmhelp = TRUE is no longer supported: use help_type =\"text\""
 #~ msgstr ""
 #~ "chmhelp = TRUE ������ �� ��������������: ����������� help_type =\"text\""
-
 #~ msgid "htmhelp = TRUE is deprecated: use help_type =\"html\""
 #~ msgstr "htmhelp = TRUE �� ��������������: ����������� help_type =\"html\""
-
 #~ msgid ""
 #~ "No text help for '%s' is available:\n"
 #~ "corresponding file is missing"
 #~ msgstr ""
 #~ "���������� ��������� ������ �� '%s':\n"
 #~ "��� ���������������� �����"
-
 #~ msgid ""
 #~ "No offline help for '%s' is available:\n"
 #~ "corresponding file is missing"
 #~ msgstr ""
 #~ "��� �������-������ �� '%s':\n"
 #~ "��������������� ���� ����������"
-
 #~ msgid "Using non-linked HTML file: hyperlinks may be incorrect"
 #~ msgstr ""
 #~ "��������� ������������� HTML-����: ����������� ����� ���� �������������"
-
 #~ msgid "options(\"browser\") not set"
 #~ msgstr "options(\"browser\") �� �����������"
-
 #~ msgid "malformed bundle DESCRIPTION file, no Contains field"
 #~ msgstr ""
 #~ "� ������ ������� -- ������������ ���� DESCRIPTION, ��� ���� 'Contains'"
-
 #~ msgid "bundle '%s' successfully unpacked and MD5 sums checked"
 #~ msgstr "������ ������� '%s' ������� �����������, MD5-����� ���������"
-
 #~ msgid ""
 #~ "No HTML help for '%s' is available:\n"
 #~ "corresponding file is missing"
 #~ msgstr ""
 #~ "��� '%s' HTML-������� ����������:\n"
 #~ "����������� ��������������� ����"
-
 #~ msgid "Compiled HTML is not installed"
 #~ msgstr "���������������� HTML �� ��������������"
-
 #~ msgid "CHM file could not be displayed"
 #~ msgstr "CHM-���� ������ ����������"
-
 #~ msgid ""
 #~ "No CHM help for '%s' in package '%s' is available:\n"
 #~ "the CHM file for the package is missing"
 #~ msgstr ""
 #~ "CHM-������ �� '%s' �� ������ '%s' ����������:\n"
 #~ "CHM-���� ������ �� ������"
-
 #~ msgid "problems running R CMD Rdconv"
 #~ msgstr "�������� � �������� R CMD Rdconv"
-
 #~ msgid "'latexcmd' is empty"
 #~ msgstr "����� 'latexcmd' �����"
-
 #~ msgid ""
 #~ "Changing the default browser (as specified by the 'browser' option) to "
 #~ "the given browser so that it gets used for all future help requests."
 #~ msgstr ""
 #~ "������� ������� �� ��������� (������� ������ � ����� 'browser') �� "
 #~ "�������� �������, ��� ��������� �� ���� ��������� �������� ������."
-
 #~ msgid "Making links in per-session dir ..."
 #~ msgstr "����� ������ � ����� ������..."
-
 #~ msgid "cannot create HTML package index"
 #~ msgstr "�� ���� ������� HTML-������ �������"
-
 #~ msgid "cannot create HTML search index"
 #~ msgstr "�� ���� ������� HTML-������ ��� ������"
-
 #~ msgid "unable to find the HTML help"
 #~ msgstr "�� ���� ����� HTML-������"
-
 #~ msgid "updating HTML package listing"
 #~ msgstr "�������� HTML-������ �������"
-
 #~ msgid "fixing URLs in non-standard libraries"
 #~ msgstr "��������� URL'� � ������������� �����������"
-
 #~ msgid "cannot update '%s'"
 #~ msgstr "�� ���� �������� '%s'"
-
 #~ msgid "Found invalid multi-byte character data."
 #~ msgstr "������� ������������ ������������ ��������� ������."
-
 #~ msgid "Cannot re-encode because 'iconv' is not available."
 #~ msgstr "�� ���� ��������������, ������ ��� 'iconv' ����������."
-
 #~ msgid "Try running R in a single-byte locale."
 #~ msgstr "���������� ��������� R �� ����������� ������."
-
 #~ msgid "bundle '%s' is incompletely installed"
 #~ msgstr "������ ������� '%s' ����������� �� ���������"
-
 #~ msgid "bundle '%s' has extra contents %s"
 #~ msgstr "������ ������� '%s' ����� �������������� ���������� %s"
-
 #~ msgid "this function is intended to work with the Aqua GUI"
 #~ msgstr "��� ������� ������������� ��� ������ � Aqua GUI"
-
 #~ msgid "Maintainer:"
 #~ msgstr "���������:"
-
 #~ msgid "Index:"
 #~ msgstr "������:"
-
 #~ msgid "Further information is available in the following vignettes:"
 #~ msgstr "��������� ���������� �������� � ��������� ����������:"
-
 #~ msgid "package title"
 #~ msgstr "��������� ������"
-
 #~ msgid "A concise (1-5 lines) description of the package"
 #~ msgstr "������� ���������� (1-5 �����) �������� ������"
-
 #~ msgid ""
 #~ "An overview of how to use the package, including the most important "
 #~ "functions"
 #~ msgstr "����� ����, ��� ������������ �����, ������� �������� ������ �������"
-
 #~ msgid "The author and/or maintainer of the package"
 #~ msgstr "����� �/��� �������������� �����"
-
 #~ msgid "Literature or other references for background information"
 #~ msgstr "���������� ��� ������ ������ �� �������������� ����������"
-
 #~ msgid "Optional links to other man pages, e.g."
 #~ msgstr "�������������� ������ �� ������ �������� �����������, ��������"
-
 #~ msgid "simple examples of the most important functions"
 #~ msgstr "������� ������� ��� �������� ������ �������"
-
 #~ msgid ""
 #~ "Optionally other standard keywords, one per line, from file KEYWORDS in "
 #~ "the R documentation directory"
 #~ msgstr ""
 #~ "�������������: ������ ����������� �������� �����, �� ������ �� ������, �� "
 #~ "����� KEYWORDS � ����� � ������������� �� R"
-
 #~ msgid "cannot update HTML search index"
 #~ msgstr "�� ���� �������� HTML-������ ������"
-
 #~ msgid "'format' must be \"normal\" or \"short\". Using \"normal\""
 #~ msgstr "'format' ������ ���� \"normal\" ��� \"short\". ��������� \"normal\""
-
 #~ msgid "wrong 'sortby' specified. Using sortby=\"score\""
 #~ msgstr "������ ������������ 'sortby'. ��������� sortby=\"score\""
-
 #~ msgid ""
 #~ "wrong restriction specified.\n"
 #~ "Using '%s'"
 #~ msgstr ""
 #~ "������� ������������ �����������.\n"
 #~ "��������� '%s'"
-
 #~ msgid "Unable to create temporary directory '%s'"
 #~ msgstr "�� ���� ������� ��������� ����� '%s'"
-
 #~ msgid "dependency '%s' is not available"
 #~ msgid_plural "dependencies '%s' are not available"
 #~ msgstr[0] "����������� '%s' ����������"
 #~ msgstr[1] "����������� '%s' ����������"
 #~ msgstr[2] "����������� '%s' ����������"
+
diff --git a/src/library/utils/po/R-tr.po b/src/library/utils/po/R-tr.po
index 2cbe2ca..8a2b85e 100644
--- a/src/library/utils/po/R-tr.po
+++ b/src/library/utils/po/R-tr.po
@@ -9,7 +9,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: R 2.13.0\n"
 "Report-Msgid-Bugs-To: bugs.r-project.org\n"
-"POT-Creation-Date: 2014-02-27 17:14\n"
+"POT-Creation-Date: 2016-04-01 09:50\n"
 "PO-Revision-Date: 2011-04-02 \n"
 "Last-Translator: Murat Alkan <muratalk at gmail.com>\n"
 "Language-Team: Turkish <muratalk at gmail.com>\n"
@@ -41,9 +41,6 @@ msgstr ""
 msgid "no Sweave file with name %s found"
 msgstr ""
 
-msgid "%d Sweave files for basename %s found"
-msgstr ""
-
 msgid "more than one syntax specification found, using the first one"
 msgstr ""
 
@@ -64,6 +61,9 @@ msgid ""
 "%s"
 msgstr ""
 
+msgid "Warning: unknown option '--clean='%s"
+msgstr ""
+
 msgid "Warning: unknown option %s"
 msgstr ""
 
@@ -253,6 +253,14 @@ msgstr ""
 msgid "did not assign() anything"
 msgstr ""
 
+msgid ""
+"Cannot debug primitive functions unless they are implicit generics (requires "
+"loading the methods package)"
+msgstr ""
+
+msgid "error in trying to evaluate the expression for argument %s (%s)"
+msgstr ""
+
 msgid "Browsing in the environment with call:"
 msgstr ""
 
@@ -321,9 +329,6 @@ msgstr ""
 msgid "%s has a help file but no examples"
 msgstr ""
 
-msgid "test '%s' is not available"
-msgstr ""
-
 msgid "Line number missing"
 msgstr ""
 
@@ -409,10 +414,16 @@ msgstr ""
 msgid "do not know what to search"
 msgstr ""
 
+msgid "argument 'help.db' is deprecated"
+msgstr ""
+
 msgid "incorrect type specification"
 msgstr ""
 
-msgid "argument 'help.db' is deprecated"
+msgid "no information in the database for package %s: need 'rebuild = TRUE'?"
+msgstr ""
+
+msgid "incorrect 'agrep' specification"
 msgstr ""
 
 #, fuzzy
@@ -425,12 +436,6 @@ msgstr ""
 msgid "removing all entries with invalid multi-byte character data"
 msgstr ""
 
-msgid "no information in the database for package %s: need 'rebuild = TRUE'?"
-msgstr ""
-
-msgid "incorrect 'agrep' specification"
-msgstr ""
-
 msgid "invalid browser name, check options(\"browser\")."
 msgstr ""
 
@@ -439,7 +444,7 @@ msgstr ""
 
 msgid ""
 "If nothing happens, you should open\n"
-"'%s' yourself"
+"%s yourself"
 msgstr ""
 
 msgid ""
@@ -493,10 +498,12 @@ msgstr ""
 msgid "no function '%s' is visible"
 msgstr ""
 
-msgid "function '%s' appears not to be generic"
+msgid "generic function '%s' dispatches methods for generic '%s'"
 msgstr ""
 
-msgid "generic function '%s' dispatches methods for generic '%s'"
+msgid ""
+"function '%s' appears not to be S3 generic; found functions that look like "
+"S3 methods"
 msgstr ""
 
 msgid "must supply 'generic.function' or 'class'"
@@ -549,6 +556,11 @@ msgstr ""
 msgid "invalid 'filters' argument."
 msgstr ""
 
+msgid ""
+"specifying 'contriburl' or 'available' requires a single type, not type = "
+"\"both\""
+msgstr ""
+
 msgid "package '%s' in library '%s' will not be updated"
 msgstr ""
 
@@ -592,10 +604,16 @@ msgstr "--- Lütfen bu oturumda kullanılacak bir CRAN yansısı seçin ---"
 msgid "trying to use CRAN without setting a mirror"
 msgstr ""
 
-msgid "cannot choose a CRAN mirror non-interactively"
+msgid "'download.file()' error code '%d'"
 msgstr ""
 
-msgid "cannot choose a BioC mirror non-interactively"
+msgid "failed to download mirrors file (%s); using local file '%s'"
+msgstr ""
+
+msgid "cannot choose a"
+msgstr ""
+
+msgid "mirror non-interactively"
 msgstr ""
 
 msgid "cannot set repositories non-interactively"
@@ -618,6 +636,9 @@ msgid ""
 "skipping dependencies"
 msgstr ""
 
+msgid "type 'binary' is not supported on this platform"
+msgstr ""
+
 msgid "no packages were specified"
 msgstr ""
 
@@ -631,15 +652,14 @@ msgstr "paketler yüklenemedi"
 msgid "unable to create %s"
 msgstr "oluşturulamadı"
 
-msgid "inferring 'repos = NULL' from the file name"
+msgid "inferring 'repos = NULL' from 'pkgs'"
 msgstr ""
 
-msgid ""
-"type == \"both\" can only be used on Windows or a CRAN build for Mac OS X"
+msgid "unable to create temporary directory %s"
 msgstr ""
 
 msgid ""
-"type == \"both\" cannot be used if 'available' or 'contriburl' is specified"
+"type == \"both\" can only be used on Windows or a CRAN build for Mac OS X"
 msgstr ""
 
 msgid "type == \"both\" cannot be used with 'repos = NULL'"
@@ -671,9 +691,6 @@ msgstr ""
 msgid "installation of package %s had non-zero exit status"
 msgstr ""
 
-msgid "unable to create temporary directory %s"
-msgstr ""
-
 msgid "foundpkgs: %s"
 msgstr ""
 
@@ -719,6 +736,9 @@ msgstr ""
 msgid "Edit the file and move it to the appropriate directory."
 msgstr ""
 
+msgid "cannot determine import name"
+msgstr ""
+
 msgid "no documentation of type %s and topic %s (or error in processing help)"
 msgstr ""
 
@@ -730,9 +750,6 @@ msgstr ""
 msgid "no methods for %s and no documentation for it as a function"
 msgstr ""
 
-msgid "error in trying to evaluate the expression for argument %s (%s)"
-msgstr ""
-
 msgid "no method defined for function %s and signature %s"
 msgstr ""
 
@@ -873,6 +890,9 @@ msgstr ""
 msgid "'digits' and 'digits.d' are both specified and the latter is not used"
 msgstr ""
 
+msgid "number of matches does not always match ncol(proto)"
+msgstr ""
+
 msgid "no lines found in %s"
 msgstr ""
 
@@ -1000,10 +1020,10 @@ msgstr ""
 msgid "'ccaddress' must be of length 1"
 msgstr ""
 
-msgid "no download method found"
+msgid "'url' must be a length-one character vector"
 msgstr ""
 
-msgid "method 'lynx' is untested and deprecated as from R 3.1.0"
+msgid "'destfile' must be a length-one character vector"
 msgstr ""
 
 msgid "download had nonzero exit status"
@@ -1050,11 +1070,6 @@ msgstr ""
 msgid "method 'mailx' is Unix-only"
 msgstr ""
 
-msgid ""
-"If nothing happens, you should open\n"
-"%s yourself"
-msgstr ""
-
 msgid "zip file %s not found"
 msgstr ""
 
@@ -1065,12 +1080,20 @@ msgstr "oluşturulamadı"
 msgid "there is no 'libs' directory in package %s"
 msgstr ""
 
+msgid "Only '*.zip' and '*.tar.gz' files can be installed."
+msgstr ""
+
 msgid "winDialog() cannot be used non-interactively"
 msgstr ""
 
 msgid "winDialogString() cannot be used non-interactively"
 msgstr ""
 
+msgid "%d Sweave file for basename %s found"
+msgid_plural "%d Sweave files for basename %s found"
+msgstr[0] ""
+msgstr[1] ""
+
 msgid "%d occurrence in %s"
 msgid_plural "%d occurrences in %s"
 msgstr[0] ""
@@ -1110,8 +1133,13 @@ msgid_plural ""
 msgstr[0] ""
 msgstr[1] ""
 
-msgid "package %s is not available (for %s)"
-msgid_plural "packages %s are not available (for %s)"
+msgid "package %s is not available (%s)"
+msgid_plural "packages %s are not available (%s)"
+msgstr[0] ""
+msgstr[1] ""
+
+msgid "package %s is a base package, and should not be updated"
+msgid_plural "packages %s are base packages, and should not be updated"
 msgstr[0] ""
 msgstr[1] ""
 
@@ -1145,14 +1173,15 @@ msgid_plural ""
 msgstr[0] ""
 msgstr[1] ""
 
-msgid "Do you want to install from sources the package which need compilation?"
+msgid ""
+"Do you want to install from sources the package which needs compilation?"
 msgid_plural ""
 "Do you want to install from sources the packages which need compilation?"
 msgstr[0] ""
 msgstr[1] ""
 
 msgid ""
-"Package which are only available in source form, and may need compilation of "
+"Package which is only available in source form, and may need compilation of "
 "C/C++/Fortran"
 msgid_plural ""
 "Packages which are only available in source form, and may need compilation "
diff --git a/src/library/utils/po/R-utils.pot b/src/library/utils/po/R-utils.pot
index 79032b9..d385d85 100644
--- a/src/library/utils/po/R-utils.pot
+++ b/src/library/utils/po/R-utils.pot
@@ -1,8 +1,7 @@
 msgid ""
 msgstr ""
-"Project-Id-Version: R 3.1.0\n"
-"Report-Msgid-Bugs-To: bugs.r-project.org\n"
-"POT-Creation-Date: 2014-02-27 17:14\n"
+"Project-Id-Version: utils 3.4.0\n"
+"POT-Creation-Date: 2016-04-01 09:50\n"
 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
 "Last-Translator: FULL NAME <EMAIL at ADDRESS>\n"
 "Language-Team: LANGUAGE <LL at li.org>\n"
@@ -32,9 +31,6 @@ msgstr ""
 msgid "no Sweave file with name %s found"
 msgstr ""
 
-msgid "%d Sweave files for basename %s found"
-msgstr ""
-
 msgid "more than one syntax specification found, using the first one"
 msgstr ""
 
@@ -53,6 +49,9 @@ msgstr ""
 msgid "parse error or empty option in\n%s"
 msgstr ""
 
+msgid "Warning: unknown option '--clean='%s"
+msgstr ""
+
 msgid "Warning: unknown option %s"
 msgstr ""
 
@@ -230,6 +229,12 @@ msgstr ""
 msgid "did not assign() anything"
 msgstr ""
 
+msgid "Cannot debug primitive functions unless they are implicit generics (requires loading the methods package)"
+msgstr ""
+
+msgid "error in trying to evaluate the expression for argument %s (%s)"
+msgstr ""
+
 msgid "Browsing in the environment with call:"
 msgstr ""
 
@@ -296,9 +301,6 @@ msgstr ""
 msgid "%s has a help file but no examples"
 msgstr ""
 
-msgid "test '%s' is not available"
-msgstr ""
-
 msgid "Line number missing"
 msgstr ""
 
@@ -380,25 +382,25 @@ msgstr ""
 msgid "do not know what to search"
 msgstr ""
 
-msgid "incorrect type specification"
+msgid "argument 'help.db' is deprecated"
 msgstr ""
 
-msgid "argument 'help.db' is deprecated"
+msgid "incorrect type specification"
 msgstr ""
 
-msgid "could not find package %s"
+msgid "no information in the database for package %s: need 'rebuild = TRUE'?"
 msgstr ""
 
-msgid "package %s has empty hsearch data - strangely"
+msgid "incorrect 'agrep' specification"
 msgstr ""
 
-msgid "removing all entries with invalid multi-byte character data"
+msgid "could not find package %s"
 msgstr ""
 
-msgid "no information in the database for package %s: need 'rebuild = TRUE'?"
+msgid "package %s has empty hsearch data - strangely"
 msgstr ""
 
-msgid "incorrect 'agrep' specification"
+msgid "removing all entries with invalid multi-byte character data"
 msgstr ""
 
 msgid "invalid browser name, check options(\"browser\")."
@@ -407,7 +409,7 @@ msgstr ""
 msgid "help.start() requires the HTTP server to be running"
 msgstr ""
 
-msgid "If nothing happens, you should open\n'%s' yourself"
+msgid "If nothing happens, you should open\n%s yourself"
 msgstr ""
 
 msgid "If the browser launched by '%s' is already running, it is *not* restarted, and you must switch to its window."
@@ -458,10 +460,10 @@ msgstr ""
 msgid "no function '%s' is visible"
 msgstr ""
 
-msgid "function '%s' appears not to be generic"
+msgid "generic function '%s' dispatches methods for generic '%s'"
 msgstr ""
 
-msgid "generic function '%s' dispatches methods for generic '%s'"
+msgid "function '%s' appears not to be S3 generic; found functions that look like S3 methods"
 msgstr ""
 
 msgid "must supply 'generic.function' or 'class'"
@@ -512,6 +514,9 @@ msgstr ""
 msgid "invalid 'filters' argument."
 msgstr ""
 
+msgid "specifying 'contriburl' or 'available' requires a single type, not type = \"both\""
+msgstr ""
+
 msgid "package '%s' in library '%s' will not be updated"
 msgstr ""
 
@@ -554,10 +559,16 @@ msgstr ""
 msgid "trying to use CRAN without setting a mirror"
 msgstr ""
 
-msgid "cannot choose a CRAN mirror non-interactively"
+msgid "'download.file()' error code '%d'"
 msgstr ""
 
-msgid "cannot choose a BioC mirror non-interactively"
+msgid "failed to download mirrors file (%s); using local file '%s'"
+msgstr ""
+
+msgid "cannot choose a"
+msgstr ""
+
+msgid "mirror non-interactively"
 msgstr ""
 
 msgid "cannot set repositories non-interactively"
@@ -578,6 +589,9 @@ msgstr ""
 msgid "Do not know which element of 'lib' to install dependencies into\nskipping dependencies"
 msgstr ""
 
+msgid "type 'binary' is not supported on this platform"
+msgstr ""
+
 msgid "no packages were specified"
 msgstr ""
 
@@ -590,13 +604,13 @@ msgstr ""
 msgid "unable to create %s"
 msgstr ""
 
-msgid "inferring 'repos = NULL' from the file name"
+msgid "inferring 'repos = NULL' from 'pkgs'"
 msgstr ""
 
-msgid "type == \"both\" can only be used on Windows or a CRAN build for Mac OS X"
+msgid "unable to create temporary directory %s"
 msgstr ""
 
-msgid "type == \"both\" cannot be used if 'available' or 'contriburl' is specified"
+msgid "type == \"both\" can only be used on Windows or a CRAN build for Mac OS X"
 msgstr ""
 
 msgid "type == \"both\" cannot be used with 'repos = NULL'"
@@ -626,9 +640,6 @@ msgstr ""
 msgid "installation of package %s had non-zero exit status"
 msgstr ""
 
-msgid "unable to create temporary directory %s"
-msgstr ""
-
 msgid "foundpkgs: %s"
 msgstr ""
 
@@ -668,6 +679,9 @@ msgstr ""
 msgid "Edit the file and move it to the appropriate directory."
 msgstr ""
 
+msgid "cannot determine import name"
+msgstr ""
+
 msgid "no documentation of type %s and topic %s (or error in processing help)"
 msgstr ""
 
@@ -677,9 +691,6 @@ msgstr ""
 msgid "no methods for %s and no documentation for it as a function"
 msgstr ""
 
-msgid "error in trying to evaluate the expression for argument %s (%s)"
-msgstr ""
-
 msgid "no method defined for function %s and signature %s"
 msgstr ""
 
@@ -818,6 +829,9 @@ msgstr ""
 msgid "'digits' and 'digits.d' are both specified and the latter is not used"
 msgstr ""
 
+msgid "number of matches does not always match ncol(proto)"
+msgstr ""
+
 msgid "no lines found in %s"
 msgstr ""
 
@@ -941,10 +955,10 @@ msgstr ""
 msgid "'ccaddress' must be of length 1"
 msgstr ""
 
-msgid "no download method found"
+msgid "'url' must be a length-one character vector"
 msgstr ""
 
-msgid "method 'lynx' is untested and deprecated as from R 3.1.0"
+msgid "'destfile' must be a length-one character vector"
 msgstr ""
 
 msgid "download had nonzero exit status"
@@ -986,9 +1000,6 @@ msgstr ""
 msgid "method 'mailx' is Unix-only"
 msgstr ""
 
-msgid "If nothing happens, you should open\n%s yourself"
-msgstr ""
-
 msgid "zip file %s not found"
 msgstr ""
 
@@ -998,12 +1009,20 @@ msgstr ""
 msgid "there is no 'libs' directory in package %s"
 msgstr ""
 
+msgid "Only '*.zip' and '*.tar.gz' files can be installed."
+msgstr ""
+
 msgid "winDialog() cannot be used non-interactively"
 msgstr ""
 
 msgid "winDialogString() cannot be used non-interactively"
 msgstr ""
 
+msgid        "%d Sweave file for basename %s found"
+msgid_plural "%d Sweave files for basename %s found"
+msgstr[0]    ""
+msgstr[1]    ""
+
 msgid        "%d occurrence in %s"
 msgid_plural "%d occurrences in %s"
 msgstr[0]    ""
@@ -1039,8 +1058,13 @@ msgid_plural "Removing packages from %s\n(as %s is unspecified)"
 msgstr[0]    ""
 msgstr[1]    ""
 
-msgid        "package %s is not available (for %s)"
-msgid_plural "packages %s are not available (for %s)"
+msgid        "package %s is not available (%s)"
+msgid_plural "packages %s are not available (%s)"
+msgstr[0]    ""
+msgstr[1]    ""
+
+msgid        "package %s is a base package, and should not be updated"
+msgid_plural "packages %s are base packages, and should not be updated"
 msgstr[0]    ""
 msgstr[1]    ""
 
@@ -1069,12 +1093,12 @@ msgid_plural "There are binary versions available but the source versions are la
 msgstr[0]    ""
 msgstr[1]    ""
 
-msgid        "Do you want to install from sources the package which need compilation?"
+msgid        "Do you want to install from sources the package which needs compilation?"
 msgid_plural "Do you want to install from sources the packages which need compilation?"
 msgstr[0]    ""
 msgstr[1]    ""
 
-msgid        "Package which are only available in source form, and may need compilation of C/C++/Fortran"
+msgid        "Package which is only available in source form, and may need compilation of C/C++/Fortran"
 msgid_plural "Packages which are only available in source form, and may need compilation of C/C++/Fortran"
 msgstr[0]    ""
 msgstr[1]    ""
diff --git a/src/library/utils/po/R-zh_CN.po b/src/library/utils/po/R-zh_CN.po
index 17b96e2..5979792 100644
--- a/src/library/utils/po/R-zh_CN.po
+++ b/src/library/utils/po/R-zh_CN.po
@@ -7,11 +7,11 @@ msgid ""
 msgstr ""
 "Project-Id-Version: R 2.3.0\n"
 "Report-Msgid-Bugs-To: bugs.r-project.org\n"
-"POT-Creation-Date: 2014-02-27 17:14\n"
+"POT-Creation-Date: 2016-04-01 09:50\n"
 "PO-Revision-Date: 2011-01-18 13:56+0000\n"
 "Last-Translator: 陈斐 <FeiC at normipaiva.com>\n"
 "Language-Team: Chinese\n"
-"Language: \n"
+"Language: zh_CN\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
@@ -40,9 +40,6 @@ msgstr "没有这样一个可對照的%s块"
 msgid "no Sweave file with name %s found"
 msgstr "没有名字为'%s'的Sweave文件"
 
-msgid "%d Sweave files for basename %s found"
-msgstr "找到了%d个不含路径文件字符串为%s的Sweave文件:"
-
 msgid "more than one syntax specification found, using the first one"
 msgstr "在多套語法規則里选用第一个套"
 
@@ -65,6 +62,10 @@ msgstr ""
 "解析出错或是\n"
 "%s里有空白的选项"
 
+#, fuzzy
+msgid "Warning: unknown option '--clean='%s"
+msgstr "警告:没有%s这样的选项"
+
 msgid "Warning: unknown option %s"
 msgstr "警告:没有%s这样的选项"
 
@@ -263,6 +264,14 @@ msgstr "无法正确恢复变量"
 msgid "did not assign() anything"
 msgstr "assign()没有用到"
 
+msgid ""
+"Cannot debug primitive functions unless they are implicit generics (requires "
+"loading the methods package)"
+msgstr ""
+
+msgid "error in trying to evaluate the expression for argument %s (%s)"
+msgstr "为参数%s評估表示式时发生了错误(%s)"
+
 msgid "Browsing in the environment with call:"
 msgstr "在調用环境里浏览:"
 
@@ -333,9 +342,6 @@ msgstr "找不到与%s有关的帮助文件"
 msgid "%s has a help file but no examples"
 msgstr "%s含帮助文件但没有示范文件"
 
-msgid "test '%s' is not available"
-msgstr "没有'%s'这种测试"
-
 msgid "Line number missing"
 msgstr "缺少行数"
 
@@ -421,11 +427,17 @@ msgstr "域设定得不对"
 msgid "do not know what to search"
 msgstr "不知道要搜查什么"
 
+msgid "argument 'help.db' is deprecated"
+msgstr "参数'help.db'已经不再用了"
+
 msgid "incorrect type specification"
 msgstr "域设定得不对"
 
-msgid "argument 'help.db' is deprecated"
-msgstr "参数'help.db'已经不再用了"
+msgid "no information in the database for package %s: need 'rebuild = TRUE'?"
+msgstr "数据库里没有关于程序包%s的信息:是不是需要设定'rebuild = TRUE'?"
+
+msgid "incorrect 'agrep' specification"
+msgstr "'agrep'设定得不对"
 
 msgid "could not find package %s"
 msgstr "找不到程序包%s"
@@ -436,12 +448,6 @@ msgstr "程序包%s的hsearch数据是空的-很奇怪"
 msgid "removing all entries with invalid multi-byte character data"
 msgstr "删除所有多字節字符数据出错的分錄"
 
-msgid "no information in the database for package %s: need 'rebuild = TRUE'?"
-msgstr "数据库里没有关于程序包%s的信息:是不是需要设定'rebuild = TRUE'?"
-
-msgid "incorrect 'agrep' specification"
-msgstr "'agrep'设定得不对"
-
 msgid "invalid browser name, check options(\"browser\")."
 msgstr "浏览器的名字不对,请检查options(\"browser\")的设置。"
 
@@ -450,8 +456,8 @@ msgstr "help.start()需要用HTTP服务器"
 
 msgid ""
 "If nothing happens, you should open\n"
-"'%s' yourself"
-msgstr "如果什么都不发生的话,你应该自己打开'%s'"
+"%s yourself"
+msgstr "如果什么都不发生的话,你应该自己打开%s"
 
 msgid ""
 "If the browser launched by '%s' is already running, it is *not* restarted, "
@@ -506,12 +512,15 @@ msgstr "'%s'是正式同属函数; 很有可能找不到S3方法"
 msgid "no function '%s' is visible"
 msgstr "看不到'%s'这样一个函数"
 
-msgid "function '%s' appears not to be generic"
-msgstr "函数'%s'好象不是同属的"
-
 msgid "generic function '%s' dispatches methods for generic '%s'"
 msgstr "同属函数'%s'给同属'%s'分發了方法"
 
+#, fuzzy
+msgid ""
+"function '%s' appears not to be S3 generic; found functions that look like "
+"S3 methods"
+msgstr "函数'%s'好象不是同属的"
+
 msgid "must supply 'generic.function' or 'class'"
 msgstr "必需提供'generic.function'或'class'两个中的一个"
 
@@ -562,6 +571,11 @@ msgstr "无法在貯藏處%s中读写索引"
 msgid "invalid 'filters' argument."
 msgstr "'filters'参数不对。"
 
+msgid ""
+"specifying 'contriburl' or 'available' requires a single type, not type = "
+"\"both\""
+msgstr ""
+
 msgid "package '%s' in library '%s' will not be updated"
 msgstr "程序库'%2$s'里'%1$s'这个程序包将不会被更新"
 
@@ -605,11 +619,19 @@ msgstr "--- 在此連線階段时请选用CRAN的鏡子 ---"
 msgid "trying to use CRAN without setting a mirror"
 msgstr "试试在不设定镜像的情况下用CRAN"
 
-msgid "cannot choose a CRAN mirror non-interactively"
-msgstr "无法在非互交的情况下选用CRAN镜像"
+#, fuzzy
+msgid "'download.file()' error code '%d'"
+msgstr "read.dcf()在'%s'文件上出了错"
+
+msgid "failed to download mirrors file (%s); using local file '%s'"
+msgstr ""
 
-msgid "cannot choose a BioC mirror non-interactively"
-msgstr "无法在非互交的情况下选用BioC镜像"
+msgid "cannot choose a"
+msgstr ""
+
+#, fuzzy
+msgid "mirror non-interactively"
+msgstr "无法在非互交的情况下选用CRAN镜像"
 
 msgid "cannot set repositories non-interactively"
 msgstr "无法在非互交情况下设定貯藏處"
@@ -633,6 +655,10 @@ msgstr ""
 "不知道'lib'元素里如何安装依赖程序\n"
 "因此略过不装"
 
+#, fuzzy
+msgid "type 'binary' is not supported on this platform"
+msgstr "本平台只支持'html = TRUE'"
+
 msgid "no packages were specified"
 msgstr "没有设定程序包"
 
@@ -645,18 +671,17 @@ msgstr "无法安装程序包"
 msgid "unable to create %s"
 msgstr "无法建立%s"
 
-msgid "inferring 'repos = NULL' from the file name"
+#, fuzzy
+msgid "inferring 'repos = NULL' from 'pkgs'"
 msgstr "从文件名字推断'repos = NULL'"
 
+msgid "unable to create temporary directory %s"
+msgstr "无法建立临时目录%s"
+
 msgid ""
 "type == \"both\" can only be used on Windows or a CRAN build for Mac OS X"
 msgstr "type == \"both\"只适用在Windows上或在为Mac OS X的CRAN构建上"
 
-msgid ""
-"type == \"both\" cannot be used if 'available' or 'contriburl' is specified"
-msgstr ""
-"如果已经设定了'available'或'contriburl'的话,不能再设定type == \"both\""
-
 msgid "type == \"both\" cannot be used with 'repos = NULL'"
 msgstr "设定了'repos = NULL'后就不能再设定type == \"both\""
 
@@ -688,9 +713,6 @@ msgstr "系统(cmd0): %s"
 msgid "installation of package %s had non-zero exit status"
 msgstr "安装程序包%s时退出狀態的值不是0"
 
-msgid "unable to create temporary directory %s"
-msgstr "无法建立临时目录%s"
-
 msgid "foundpkgs: %s"
 msgstr "foundpkgs: %s"
 
@@ -741,6 +763,10 @@ msgstr "建立一名字叫%s的文件。"
 msgid "Edit the file and move it to the appropriate directory."
 msgstr "修改文件再把它放到合适的目录中去。"
 
+#, fuzzy
+msgid "cannot determine import name"
+msgstr "无法指定一个可以用的名字"
+
 msgid "no documentation of type %s and topic %s (or error in processing help)"
 msgstr "没有种类为%s和題目为%s的文件(或是在处理帮助文件时发生了错误)"
 
@@ -752,9 +778,6 @@ msgstr "函数調用%2$s里类别为%1$s的对象不能用作帮助文件題目"
 msgid "no methods for %s and no documentation for it as a function"
 msgstr "%s没有方法,也没有将之用作函数的帮助文件"
 
-msgid "error in trying to evaluate the expression for argument %s (%s)"
-msgstr "为参数%s評估表示式时发生了错误(%s)"
-
 msgid "no method defined for function %s and signature %s"
 msgstr "函数%s和标签%s没有设定方法"
 
@@ -897,6 +920,9 @@ msgstr "'object'的levels()的值不对"
 msgid "'digits' and 'digits.d' are both specified and the latter is not used"
 msgstr "'digits'和'digits.d'两个都设定了,但后者没有用"
 
+msgid "number of matches does not always match ncol(proto)"
+msgstr ""
+
 msgid "no lines found in %s"
 msgstr "%s里找不到信息"
 
@@ -1028,11 +1054,13 @@ msgstr "缺少'subject'值"
 msgid "'ccaddress' must be of length 1"
 msgstr "'ccaddress'的长度必需为一"
 
-msgid "no download method found"
-msgstr "没有下载方法"
+#, fuzzy
+msgid "'url' must be a length-one character vector"
+msgstr "'title'值要么是NULL,要么是长度为一的字符向量"
 
-msgid "method 'lynx' is untested and deprecated as from R 3.1.0"
-msgstr ""
+#, fuzzy
+msgid "'destfile' must be a length-one character vector"
+msgstr "'title'值要么是NULL,要么是长度为一的字符向量"
 
 msgid "download had nonzero exit status"
 msgstr "下载退出状态不是零"
@@ -1081,11 +1109,6 @@ msgstr "'memory.limit()'只在Windows上有用"
 msgid "method 'mailx' is Unix-only"
 msgstr "'mailx'只在Unix上有用"
 
-msgid ""
-"If nothing happens, you should open\n"
-"%s yourself"
-msgstr "如果什么都不发生的话,你应该自己打开%s"
-
 msgid "zip file %s not found"
 msgstr "找不到%s这一zip文件"
 
@@ -1095,12 +1118,20 @@ msgstr "无法建立%s"
 msgid "there is no 'libs' directory in package %s"
 msgstr "在程序包%s里找不到'libs'这个目录"
 
+msgid "Only '*.zip' and '*.tar.gz' files can be installed."
+msgstr ""
+
 msgid "winDialog() cannot be used non-interactively"
 msgstr "winDialog()不能在非互交形式下使用"
 
 msgid "winDialogString() cannot be used non-interactively"
 msgstr "winDialogString()不能在非互交形式下使用"
 
+#, fuzzy
+msgid "%d Sweave file for basename %s found"
+msgid_plural "%d Sweave files for basename %s found"
+msgstr[0] "找到了%d个不含路径文件字符串为%s的Sweave文件:"
+
 msgid "%d occurrence in %s"
 msgid_plural "%d occurrences in %s"
 msgstr[0] "%2$s里%1$d出现"
@@ -1135,10 +1166,16 @@ msgstr[0] ""
 "从%s中删除程序包\n"
 "(因为没有指定%s)"
 
-msgid "package %s is not available (for %s)"
-msgid_plural "packages %s are not available (for %s)"
+#, fuzzy
+msgid "package %s is not available (%s)"
+msgid_plural "packages %s are not available (%s)"
 msgstr[0] "没有%s这个程序包(给%s用)"
 
+#, fuzzy
+msgid "package %s is a base package, and should not be updated"
+msgid_plural "packages %s are base packages, and should not be updated"
+msgstr[0] "正在使用%s这个程序包,因此不会被安装"
+
 msgid "dependency %s is not available"
 msgid_plural "dependencies %s are not available"
 msgstr[0] "没有'%s'这种相依关系"
@@ -1166,13 +1203,16 @@ msgid_plural ""
 "There are binary versions available but the source versions are later"
 msgstr[0] "有二进制版本的,但源代码版本是后来的"
 
-msgid "Do you want to install from sources the package which need compilation?"
+#, fuzzy
+msgid ""
+"Do you want to install from sources the package which needs compilation?"
 msgid_plural ""
 "Do you want to install from sources the packages which need compilation?"
 msgstr[0] "你想从源代码安装的需要编译的程序包?"
 
+#, fuzzy
 msgid ""
-"Package which are only available in source form, and may need compilation of "
+"Package which is only available in source form, and may need compilation of "
 "C/C++/Fortran"
 msgid_plural ""
 "Packages which are only available in source form, and may need compilation "
@@ -1207,6 +1247,29 @@ msgid "package %s is in use and will not be installed"
 msgid_plural "packages %s are in use and will not be installed"
 msgstr[0] "正在使用%s这个程序包,因此不会被安装"
 
+#~ msgid "cannot choose a BioC mirror non-interactively"
+#~ msgstr "无法在非互交的情况下选用BioC镜像"
+
+#~ msgid "no download method found"
+#~ msgstr "没有下载方法"
+
+#~ msgid ","
+#~ msgstr ","
+
+#~ msgid ""
+#~ "type == \"both\" cannot be used if 'available' or 'contriburl' is "
+#~ "specified"
+#~ msgstr ""
+#~ "如果已经设定了'available'或'contriburl'的话,不能再设定type == \"both\""
+
+#~ msgid ""
+#~ "If nothing happens, you should open\n"
+#~ "'%s' yourself"
+#~ msgstr "如果什么都不发生的话,你应该自己打开'%s'"
+
+#~ msgid "test '%s' is not available"
+#~ msgstr "没有'%s'这种测试"
+
 #~ msgid "broken installation, no CITATION file in the base package."
 #~ msgstr "安装出错,基本程序包里没有CITATION这一文件。"
 
@@ -1283,9 +1346,6 @@ msgstr[0] "正在使用%s这个程序包,因此不会被安装"
 #~ msgid "not found"
 #~ msgstr "找不到"
 
-#~ msgid ","
-#~ msgstr ","
-
 #~ msgid "HTTPUserAgent"
 #~ msgstr "HTTPUserAgent"
 
@@ -1405,9 +1465,6 @@ msgstr[0] "正在使用%s这个程序包,因此不会被安装"
 #~ msgid "updating HTML package descriptions"
 #~ msgstr "更新HTML程序包的描述内容"
 
-#~ msgid "read.dcf() error on file '%s'"
-#~ msgstr "read.dcf()在'%s'文件上出了错"
-
 #~ msgid "Could not find aspell or ispell executable."
 #~ msgstr "找不到aspell或ispell执行文件"
 
diff --git a/src/library/utils/po/de.po b/src/library/utils/po/de.po
index 1374ff3..64ce794 100644
--- a/src/library/utils/po/de.po
+++ b/src/library/utils/po/de.po
@@ -5,126 +5,131 @@
 #
 msgid ""
 msgstr ""
-"Project-Id-Version: R 3.1.0\n"
+"Project-Id-Version: R 3.3.0\n"
 "Report-Msgid-Bugs-To: bugs.r-project.org\n"
-"POT-Creation-Date: 2014-02-27 17:14\n"
-"PO-Revision-Date: 2014-03-16 16:24+0100\n"
+"POT-Creation-Date: 2015-06-06 13:52+0100\n"
+"PO-Revision-Date: 2016-04-21 09:14+0200\n"
 "Last-Translator: Detlef Steuer <steuer at hsu-hh.de>\n"
 "Language-Team: R Core <r-core at r-project.org>\n"
-"Language: \n"
+"Language: de\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
 "Plural-Forms: nplurals=2; plural=n == 1 ? 0 : 1;\n"
 
-#: io.c:328 io.c:332 io.c:342 io.c:571 io.c:752 io.c:805 io.c:817 io.c:821
-#: io.c:827 io.c:828 io.c:1052 io.c:1053 io.c:1055 io.c:1056 io.c:1057
-#: io.c:1058 io.c:1059 io.c:1060 stubs.c:48 stubs.c:68 windows/dialogs.c:170
-#: windows/dialogs.c:195 windows/dialogs.c:198 windows/dialogs.c:242
-#: windows/dialogs.c:279 windows/dialogs.c:290 windows/dialogs.c:314
-#: windows/dialogs.c:322 windows/util.c:111 windows/widgets.c:78
+#: io.c:324 io.c:328 io.c:338 io.c:569 io.c:769 io.c:822 io.c:834 io.c:838
+#: io.c:844 io.c:845 io.c:1068 io.c:1069 io.c:1071 io.c:1072 io.c:1073
+#: io.c:1074 io.c:1075 io.c:1076 stubs.c:47 stubs.c:67 windows/dialogs.c:169
+#: windows/dialogs.c:194 windows/dialogs.c:197 windows/dialogs.c:241
+#: windows/dialogs.c:278 windows/dialogs.c:289 windows/dialogs.c:313
+#: windows/dialogs.c:321 windows/util.c:111 windows/widgets.c:78
 #: windows/widgets.c:81 windows/widgets.c:86
 #, c-format
 msgid "invalid '%s' argument"
 msgstr "ungültiges '%s' Argument"
 
-#: io.c:351 io.c:814
+#: io.c:347 io.c:831
 msgid "invalid quote symbol set"
-msgstr "ungültiges Symbol für Quotatinen gesetzt"
+msgstr "ungültiges quote Symbol gesetzt"
 
-#: io.c:363 io.c:837 io.c:1040
+#: io.c:359 io.c:854 io.c:1056
 msgid "cannot open the connection"
 msgstr "kann die Verbindung nicht öffnen"
 
-#: io.c:366 io.c:370
+#: io.c:362 io.c:366
 msgid "cannot read from this connection"
 msgstr "kann aus dieser Verbindung nicht lesen"
 
-#: io.c:417 io.c:435
+#: io.c:413 io.c:431
 #, c-format
 msgid "quoted string on line %d terminated by EOF"
-msgstr "quotierte Zeichenkette in Zeile %d mit EOF beendet"
+msgstr "Zeichenkette in Anführungszeichen in Zeile %d mit EOF beendet"
 
-#: io.c:567
+#: io.c:565
 msgid "the first argument must be of mode character"
-msgstr "das erste Argument muss vom Mode character sein"
+msgstr "das erste Argument muss vom Modus character sein"
 
-#: io.c:754
+#: io.c:595
+#, c-format
+msgid "invalid 'numerals' string: \"%s\""
+msgstr "unzulässige 'numerals' Zeichenkette \"%s\""
+
+#: io.c:771
 #, c-format
 msgid "Selection: "
 msgstr "Auswahl: "
 
-#: io.c:846 io.c:860
+#: io.c:863 io.c:877
 msgid "cannot allocate buffer in 'readTableHead'"
 msgstr "kann Buffer in 'readTableHead' nicht allokieren"
 
-#: io.c:871
+#: io.c:888
 msgid "\\ followed by EOF"
 msgstr "\\\\ gefolgt von EOF"
 
-#: io.c:920 io.c:923
+#: io.c:937 io.c:940
 #, c-format
 msgid "incomplete final line found by readTableHeader on '%s'"
-msgstr "unvollstädige letzte Zeile von readTableHeader in '%s' gefunden"
+msgstr "unvollständige letzte Zeile von readTableHeader in '%s' gefunden"
 
-#: io.c:980
+#: io.c:997
 msgid "index out of range"
 msgstr "Index außerhalb der Grenzen"
 
-#: io.c:1033
+#: io.c:1049
 msgid "'file' is not a connection"
 msgstr "'file' ist keine Verbindung"
 
-#: io.c:1036
+#: io.c:1052
 msgid "cannot write to this connection"
 msgstr "kann in diese Verbindung nicht schreiben"
 
-#: io.c:1066
+#: io.c:1082
 msgid "'dec' must be a single character"
 msgstr "'dec' muss ein einzelnes Zeichen sein"
 
-#: io.c:1093
+#: io.c:1108
 #, c-format
 msgid "corrupt data frame -- length of column %d does not not match nrows"
-msgstr "korrupter Datafram -- Länge der Spalte %d entspricht nicht nrows"
+msgstr "beschädigterter Dataframe -- Länge der Spalte %d entspricht nicht nrows"
 
-#: io.c:1123
+#: io.c:1139
 #, c-format
 msgid "column %s claims to be a factor but does not have numeric codes"
 msgstr "Spalte %s behauptet Faktor zu sein, hat aber keine numerischen Kodes"
 
-#: io.c:1141
+#: io.c:1157
 msgid "corrupt matrix -- dims not not match length"
-msgstr "korrupte Matrix -- Dimensionen entsprechen nicht der Länge"
+msgstr "beschädigte Matrix -- Dimensionen entsprechen nicht der Länge"
 
-#: stubs.c:57
+#: stubs.c:56
 msgid "'savehistory' can only be used in Rgui and Rterm"
 msgstr "'savehistory' kann nur in Rgui und Rterm genutzt werden"
 
-#: stubs.c:74
+#: stubs.c:73
 msgid "'loadhistory' can only be used in Rgui and Rterm"
 msgstr "'loadhistory' kann nur in Rgui und Rterm genutzt werden"
 
-#: stubs.c:86
+#: stubs.c:85
 msgid "invalid timestamp"
 msgstr "ungültiger Zeitstempel"
 
-#: stubs.c:152 stubs.c:160
+#: stubs.c:151 stubs.c:159
 msgid "X11 dataentry cannot be loaded"
 msgstr "X11 Dateneintrag kann nicht geladen werden"
 
-#: stubs.c:156 stubs.c:185 stubs.c:191
+#: stubs.c:155 stubs.c:184 stubs.c:190
 msgid "X11 is not available"
 msgstr "X11 nicht verfügbar"
 
-#: stubs.c:249 stubs.c:252
+#: stubs.c:248 stubs.c:251
 #, c-format
 msgid "invalid '%s' specification"
 msgstr "ungültige '%s' Spezifikation"
 
 #: utils.c:83
 msgid "'hostname' must be a character vector of length 1"
-msgstr "'hostname' muss ein Zeihenkettenetor der Länge 1 sein"
+msgstr "'hostname' muss ein Zeichenkettenvektor der Länge 1 sein"
 
 #: utils.c:89
 #, c-format
@@ -139,35 +144,35 @@ msgstr "unbekanntes Format von 'gethostbyname' zurückgegeben"
 msgid "nsl() is not supported on this platform"
 msgstr "nsl() ist auf dieser Plattform nicht unterstützt"
 
-#: windows/dialogs.c:182
+#: windows/dialogs.c:181
 msgid "unknown type"
 msgstr "unbekannter Typ"
 
-#: windows/dialogs.c:214 windows/dialogs.c:238 windows/dialogs.c:276
-#: windows/dialogs.c:311
+#: windows/dialogs.c:213 windows/dialogs.c:237 windows/dialogs.c:275
+#: windows/dialogs.c:310
 msgid "menu functions can only be used in the GUI"
 msgstr "Menüfunktionen können nur im GUI genutzt werden"
 
-#: windows/dialogs.c:246
+#: windows/dialogs.c:245
 #, c-format
 msgid "unable to retrieve items for %s (%s)"
 msgstr "kann keine Elemente für %s abrufen (%s)"
 
-#: windows/dialogs.c:284
+#: windows/dialogs.c:283
 #, c-format
 msgid "unable to add menu (%s)"
 msgstr "kann Menü nicht hinzufügen (%s)"
 
-#: windows/dialogs.c:296
+#: windows/dialogs.c:295
 #, c-format
 msgid "unable to add menu item (%s)"
 msgstr "kann Menüeintrag nicht hinzufügen (%s)"
 
-#: windows/dialogs.c:319
+#: windows/dialogs.c:318
 msgid "menu does not exist"
-msgstr "Menü exisitiert nicht"
+msgstr "Menü existiert nicht"
 
-#: windows/dialogs.c:326
+#: windows/dialogs.c:325
 #, c-format
 msgid "unable to delete menu item (%s)"
 msgstr "kann Menüeintrag nicht entfernen (%s)"
@@ -199,28 +204,29 @@ msgstr "kann Zwischenablage nicht öffnen"
 msgid "unable to write to the clipboard"
 msgstr "kann nicht in die Zwischenablage schreiben"
 
-#: windows/util.c:397
+#: windows/util.c:396
 msgid "'title' must be a character string"
 msgstr "'title' muss eine Zeichenkette sein"
 
-#: windows/util.c:406
+#: windows/util.c:405
 msgid "'text' must be a character string"
 msgstr "'text' muss eine Zeichenkette sein"
 
-#: windows/util.c:445
+#: windows/util.c:444
 #, c-format
 msgid "'%s' must be length 1"
 msgstr "'%s' muss Länge 1 haben"
 
-#: windows/util.c:558
+#: windows/util.c:557
 #, c-format
 msgid "'%s' must be a list"
 msgstr "'%s' muss eine Liste sein"
 
-#: windows/util.c:562
+# +
+#: windows/util.c:561
 #, c-format
 msgid "'%s' element %d is not a window handle"
-msgstr "'%s' Element %d ist keine Fensterhandle"
+msgstr "'%s' Element %d ist keine Fenster-Handle"
 
 #: windows/widgets.c:108
 msgid "Select one or more"
@@ -230,17 +236,17 @@ msgstr "Wähle ein oder mehrere"
 msgid "Select one"
 msgstr "Wähle eins"
 
-#: windows/widgets.c:182 windows/widgets.c:252
+#: windows/widgets.c:182 windows/widgets.c:247
 msgid "'default' must be a character string"
-msgstr "'default' muss Zeichenkette sein"
+msgstr "'default' muss eine Zeichenkette sein"
 
-#: windows/widgets.c:184 windows/widgets.c:254
+#: windows/widgets.c:184 windows/widgets.c:249
 msgid "'default' is overlong"
 msgstr "'default' ist überlang"
 
-#: windows/widgets.c:188 windows/widgets.c:258
+#: windows/widgets.c:188 windows/widgets.c:253
 msgid "'caption' must be a character string"
-msgstr "'caption' muss Zeichenkette sein"
+msgstr "'caption' muss eine Zeichenkette sein"
 
 #: windows/widgets.c:190
 msgid "'multi' must be a logical value"
diff --git a/src/library/utils/po/ko.po b/src/library/utils/po/ko.po
index 3be8f43..8e183da 100644
--- a/src/library/utils/po/ko.po
+++ b/src/library/utils/po/ko.po
@@ -1,179 +1,188 @@
 # Korean translation for R utils package
-# src/library/utils/po/ko.po
-# Copyright (C) 1995-2014 The R Core Team
+# ./utils/po/ko.po
+#
+# Copyright (C) 1995-2016 The R Core Team
+#
 # This file is distributed under the same license as the R utils package.
-# Chel Hee Lee <chl948 at mail.usask.ca>, 2008-2014.
+# Maintained by Chel Hee Lee <chl948 at mail.usask.ca>, 2008-2016.
+# Contact: Chel Hee Lee <gnustats at gmail.com>
+#
+# Notes:
+# Under development (unstable) starting from 11-APR-2016 for R-3.3.1 - QC: in progress
+# Freezed on 10-APR-2016 for R-3.3.0 - QC: PASS
+# Freezed on 30-MAR-2015 for R-3.2.0 - QC: PASS
+# Freezed on 06-FEB-2015 for R-3.1.3 - QC: PASS
 #
 msgid ""
 msgstr ""
-"Project-Id-Version: R 3.1.0\n"
+"Project-Id-Version: R-3.3.0\n"
 "Report-Msgid-Bugs-To: bugs.r-project.org\n"
-"POT-Creation-Date: 2014-01-15 09:09+0000\n"
-"PO-Revision-Date: 2014-03-26 23:03-0600\n"
+"POT-Creation-Date: 2016-04-01 10:28-0700\n"
+"PO-Revision-Date: 2016-04-11 13:08-0600\n"
 "Last-Translator: Chel Hee Lee <chl948 at mail.usask.ca>\n"
-"Language-Team:  <chl948 at mail.usask.ca>\n"
+"Language-Team: Chel Hee Lee <chl948 at mail.usask.ca>\n"
 "Language: ko\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
 "Plural-Forms: nplurals=1; plural=0;\n"
-"X-Poedit-SourceCharset: UTF-8\n"
-"X-Generator: Poedit 1.5.4\n"
-
-#: io.c:328 io.c:332 io.c:342 io.c:571 io.c:752 io.c:805 io.c:817 io.c:821
-#: io.c:827 io.c:828 io.c:1052 io.c:1053 io.c:1055 io.c:1056 io.c:1057
-#: io.c:1058 io.c:1059 io.c:1060 stubs.c:48 stubs.c:68 windows/dialogs.c:170
-#: windows/dialogs.c:195 windows/dialogs.c:198 windows/dialogs.c:242
-#: windows/dialogs.c:279 windows/dialogs.c:290 windows/dialogs.c:314
-#: windows/dialogs.c:322 windows/util.c:111 windows/widgets.c:78
+
+#: io.c:329 io.c:333 io.c:343 io.c:574 io.c:774 io.c:827 io.c:839 io.c:843
+#: io.c:849 io.c:850 io.c:1073 io.c:1074 io.c:1076 io.c:1077 io.c:1078
+#: io.c:1079 io.c:1080 io.c:1081 stubs.c:47 stubs.c:67 windows/dialogs.c:169
+#: windows/dialogs.c:194 windows/dialogs.c:197 windows/dialogs.c:241
+#: windows/dialogs.c:278 windows/dialogs.c:289 windows/dialogs.c:313
+#: windows/dialogs.c:321 windows/util.c:117 windows/widgets.c:78
 #: windows/widgets.c:81 windows/widgets.c:86
 #, c-format
 msgid "invalid '%s' argument"
-msgstr "'%s' 인자가 잘못되었습니다"
+msgstr "인자 '%s'의 값이 올바르지 않습니다."
 
-#: io.c:351 io.c:814
+#: io.c:352 io.c:836
 msgid "invalid quote symbol set"
-msgstr ""
+msgstr "올바르지 않은 인용부호셋(quote symbol set)입니다."
 
-#: io.c:363 io.c:837 io.c:1040
+#: io.c:364 io.c:859 io.c:1061
 msgid "cannot open the connection"
-msgstr "연결을 열 수 없습니다"
+msgstr "커넥션(connection)을 열 수 없습니다"
 
-#: io.c:366 io.c:370
+#: io.c:367 io.c:371
 msgid "cannot read from this connection"
-msgstr "이 연결로부터 읽을 수 없습니다"
+msgstr "이 커넥션(connection)으로부터 읽을 수 없습니다"
 
-#: io.c:417 io.c:435
+#: io.c:418 io.c:436
 #, c-format
 msgid "quoted string on line %d terminated by EOF"
 msgstr ""
 
-#: io.c:567
+#: io.c:570
 msgid "the first argument must be of mode character"
-msgstr "첫번째 인자는 반드시 문자형이어야 합니다"
+msgstr "첫번째 인자는 반드시 문자형이어야 합니다."
 
-#: io.c:754
+#: io.c:600
+#, c-format
+msgid "invalid 'numerals' string: \"%s\""
+msgstr ""
+
+#: io.c:776
 #, c-format
 msgid "Selection: "
 msgstr "선택: "
 
-#: io.c:846 io.c:860
+#: io.c:868 io.c:882
 msgid "cannot allocate buffer in 'readTableHead'"
 msgstr "'readTableHead' 내에서 버퍼를 할당할 수 없습니다"
 
-#: io.c:871
+#: io.c:893
 msgid "\\ followed by EOF"
 msgstr "\\ 가 EOF 뒤에 놓였습니다"
 
-#: io.c:920 io.c:923
+#: io.c:942 io.c:945
 #, c-format
 msgid "incomplete final line found by readTableHeader on '%s'"
-msgstr ""
-"'%s'에서 readTableHeader에 의하여 발견된 완성되지 않은 마지막 라인입니다"
+msgstr "'%s'에서 readTableHeader에 의하여 발견된 완성되지 않은 마지막 라인입니다"
 
-#: io.c:980
+#: io.c:1002
 msgid "index out of range"
 msgstr "범위밖의 인덱스입니다"
 
-#: io.c:1033
+#: io.c:1054
 msgid "'file' is not a connection"
-msgstr "'file'은 연결이 아닙니다"
+msgstr "'file'은 커넥션(connection)이 아닙니다."
 
-#: io.c:1036
+#: io.c:1057
 msgid "cannot write to this connection"
-msgstr "이 연결에 쓰기를 할 수 없습니다"
+msgstr "이 커넥션(connection)에 쓰기를 할 수 없습니다."
 
-#: io.c:1066
+#: io.c:1087
 msgid "'dec' must be a single character"
 msgstr "'dec'는 반드시 한개의 문자이어야 합니다"
 
-#: io.c:1093
+#: io.c:1113
 #, c-format
 msgid "corrupt data frame -- length of column %d does not not match nrows"
-msgstr ""
-"데이터 프레임이 손상되었습니다 -- 열의 길이 %d가 행의 개수와 일치하지 않습니"
-"다"
+msgstr "데이터 프레임이 손상되었습니다 -- 열의 길이 %d가 행의 개수와 일치하지 않습니다"
 
-#: io.c:1123
+#: io.c:1144
 #, c-format
 msgid "column %s claims to be a factor but does not have numeric codes"
 msgstr ""
 
-#: io.c:1141
+#: io.c:1162
 msgid "corrupt matrix -- dims not not match length"
-msgstr "행렬이 손상되었습니다 -- dims 가 길이가 일치하지 않습니다"
+msgstr "올바른 행렬이 아닙니다 -- dims 가 길이가 일치하지 않습니다"
 
-#: stubs.c:57
+#: stubs.c:56
 msgid "'savehistory' can only be used in Rgui and Rterm"
 msgstr "'savehistory'는 오로지 Rgui 와 Rterm에서만 사용될 수 있습니다"
 
-#: stubs.c:74
+#: stubs.c:73
 msgid "'loadhistory' can only be used in Rgui and Rterm"
 msgstr "'loadhistory'는 오로지 Rgui 와 Rterm에서만 사용될 수 있습니다"
 
-#: stubs.c:86
+#: stubs.c:85
 msgid "invalid timestamp"
-msgstr "잘못된 타임스탬프입니다"
+msgstr "잘못된 타임스탬프(timestamp)입니다."
 
-#: stubs.c:152 stubs.c:160
+#: stubs.c:151 stubs.c:159
 msgid "X11 dataentry cannot be loaded"
-msgstr "X11 데이터엔트리가 로드될 수 없습니다"
+msgstr "X11 데이터 항목을 로드할 수 없습니다."
 
-#: stubs.c:156 stubs.c:185 stubs.c:191
+#: stubs.c:155 stubs.c:184 stubs.c:190
 msgid "X11 is not available"
-msgstr "X11이 사용가능하지 않습니다"
+msgstr "X11이 사용가능하지 않습니다."
 
-#: stubs.c:249 stubs.c:252
+#: stubs.c:248 stubs.c:251
 #, c-format
 msgid "invalid '%s' specification"
 msgstr "유효하지 않은 '%s' 지정입니다"
 
-#: utils.c:83
+#: utils.c:85
 msgid "'hostname' must be a character vector of length 1"
 msgstr "'hostname'은 반드시 길이가 1인 문자형 벡터이어야 합니다"
 
-#: utils.c:89
+#: utils.c:91
 #, c-format
 msgid "nsl() was unable to resolve host '%s'"
 msgstr ""
 
-#: utils.c:96
+#: utils.c:98
 msgid "unknown format returned by 'gethostbyname'"
 msgstr "알수없는 형식이 'gethostbyname'에 의해서 반환되었습니다"
 
-#: utils.c:105
+#: utils.c:107
 msgid "nsl() is not supported on this platform"
-msgstr "이 플랫폼에서는 nsl()는 지원되지 않습니다"
+msgstr "이 플랫폼에서는 nsl()를 사용할 수 없습니다."
 
-#: windows/dialogs.c:182
+#: windows/dialogs.c:181
 msgid "unknown type"
 msgstr "알수없는 유형입니다"
 
-#: windows/dialogs.c:214 windows/dialogs.c:238 windows/dialogs.c:276
-#: windows/dialogs.c:311
+#: windows/dialogs.c:213 windows/dialogs.c:237 windows/dialogs.c:275
+#: windows/dialogs.c:310
 msgid "menu functions can only be used in the GUI"
 msgstr "메뉴 함수들은 GUI내에서만 사용할 수 있습니다"
 
-#: windows/dialogs.c:246
+#: windows/dialogs.c:245
 #, c-format
 msgid "unable to retrieve items for %s (%s)"
 msgstr "%s (%s)대한 항목들을 불러올 수 없습니다"
 
-#: windows/dialogs.c:284
+#: windows/dialogs.c:283
 #, c-format
 msgid "unable to add menu (%s)"
 msgstr "메뉴 %s를 추가할 수 없습니다"
 
-#: windows/dialogs.c:296
+#: windows/dialogs.c:295
 #, c-format
 msgid "unable to add menu item (%s)"
 msgstr "메뉴항목 %s을 추가할 수 없습니다"
 
-#: windows/dialogs.c:319
+#: windows/dialogs.c:318
 msgid "menu does not exist"
 msgstr "메뉴가 존재하지 않습니다"
 
-#: windows/dialogs.c:326
+#: windows/dialogs.c:325
 #, c-format
 msgid "unable to delete menu item (%s)"
 msgstr "메뉴항목 %s를 삭제할 수 없습니다"
@@ -189,41 +198,41 @@ msgstr "'%s'의 값이 잘못되었습니다"
 msgid "Registry key '%ls' not found"
 msgstr "레지스트리 키 '%ls'를 찾을 수 없습니다"
 
-#: windows/util.c:41
+#: windows/util.c:42
 msgid "unsupported version of Windows"
 msgstr "지원되지 않는 버전의 윈도우즈입니다"
 
-#: windows/util.c:275
+#: windows/util.c:281
 msgid "argument must be a character vector or a raw vector"
 msgstr "인자는 반드시 문자형 벡터 또는  raw 벡터이어야 합니다"
 
-#: windows/util.c:312
+#: windows/util.c:318
 msgid "unable to open the clipboard"
-msgstr "클립보드를 열 수 없습니다"
+msgstr "클립보드를 열 수 없습니다."
 
-#: windows/util.c:317
+#: windows/util.c:323
 msgid "unable to write to the clipboard"
-msgstr "클립보드에 쓸 수 없습니다"
+msgstr "클립보드에 쓸 수 없습니다."
 
-#: windows/util.c:397
+#: windows/util.c:402
 msgid "'title' must be a character string"
 msgstr "'title'은 반드시 문자열이어야 합니다"
 
-#: windows/util.c:406
+#: windows/util.c:411
 msgid "'text' must be a character string"
 msgstr "'text'는 반드시 문자열이어야 합니다"
 
-#: windows/util.c:445
+#: windows/util.c:450
 #, c-format
 msgid "'%s' must be length 1"
 msgstr "'%s'는 반드시 길이가 1이어야 합니다"
 
-#: windows/util.c:558
+#: windows/util.c:563
 #, c-format
 msgid "'%s' must be a list"
-msgstr "'%s'은 반드시 리스트이어야 합니다"
+msgstr "'%s'은 반드시 리스트(list)이어야 합니다"
 
-#: windows/util.c:562
+#: windows/util.c:567
 #, c-format
 msgid "'%s' element %d is not a window handle"
 msgstr "'%s'의 구성요소 %d는 윈도우 핸들이 아닙니다"
@@ -236,15 +245,15 @@ msgstr "하나 이상을 선택해 주세요"
 msgid "Select one"
 msgstr "하나를 선택해주세요"
 
-#: windows/widgets.c:182 windows/widgets.c:252
+#: windows/widgets.c:182 windows/widgets.c:247
 msgid "'default' must be a character string"
 msgstr "'default'는 반드시 문자열이어야 합니다"
 
-#: windows/widgets.c:184 windows/widgets.c:254
+#: windows/widgets.c:184 windows/widgets.c:249
 msgid "'default' is overlong"
 msgstr "'default'가 너무 깁니다"
 
-#: windows/widgets.c:188 windows/widgets.c:258
+#: windows/widgets.c:188 windows/widgets.c:253
 msgid "'caption' must be a character string"
 msgstr "'caption'은 반드시 문자열이어야 합니다"
 
@@ -254,4 +263,4 @@ msgstr "'multi'는 반드시 논리값이어야 합니다"
 
 #: windows/widgets.c:192
 msgid "'filterindex' must be an integer value"
-msgstr "'filterindex'는 반드시 정수값이어야 합니다"
+msgstr "'filterindex'의 값은 반드시 정수(integer)이어야 합니다."
diff --git a/src/library/utils/po/pl.po b/src/library/utils/po/pl.po
index d94dccb..a4ebc03 100644
--- a/src/library/utils/po/pl.po
+++ b/src/library/utils/po/pl.po
@@ -1,423 +1,234 @@
-# SOME DESCRIPTIVE TITLE.
-# Copyright (C) YEAR The R Core Team
-# This file is distributed under the same license as the PACKAGE package.
-# FIRST AUTHOR <EMAIL at ADDRESS>, YEAR.
 #
 msgid ""
 msgstr ""
-"Project-Id-Version: R 3.1.0\n"
-"Report-Msgid-Bugs-To: bugs.r-project.org\n"
-"POT-Creation-Date: 2014-01-15 09:09+0000\n"
-"PO-Revision-Date: 2014-03-13 20:34+0100\n"
+"Project-Id-Version: R 3.4.0\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2016-04-01 10:28-0700\n"
+"PO-Revision-Date: 2016-04-04 09:57+0200\n"
 "Last-Translator: Łukasz Daniel <lukasz.daniel at gmail.com>\n"
 "Language-Team: Łukasz Daniel <lukasz.daniel at gmail.com>\n"
 "Language: pl_PL\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
-"X-Generator: Poedit 1.5.4\n"
-"X-Poedit-SourceCharset: iso-8859-1\n"
+"X-Generator: Poedit 1.8.7\n"
+"X-Poedit-SourceCharset: UTF-8\n"
 "Plural-Forms: nplurals=3; plural=(n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 "
 "|| n%100>=20) ? 1 : 2);\n"
 
-# utils/src/io.c: 328
-# error(_("invalid '%s' argument"), "comment.char")
-# utils/src/io.c: 332
-# error(_("invalid '%s' argument"), "comment.char")
-# utils/src/io.c: 342
-# error(_("invalid '%s' argument"), "sep")
-# utils/src/io.c: 571
-# error(_("invalid '%s' argument"), "na.strings")
-# utils/src/io.c: 752
-# error(_("invalid '%s' argument"), "choices")
-# utils/src/io.c: 805
-# error(_("invalid '%s' argument"), "nlines")
-# utils/src/io.c: 817
-# error(_("invalid '%s' argument"), "comment.char")
-# utils/src/io.c: 821
-# error(_("invalid '%s' argument"), "comment.char")
-# utils/src/io.c: 827
-# error(_("invalid '%s' argument"), "sep")
-# utils/src/io.c: 828
-# error(_("invalid '%s' argument"), "skipNul")
-# utils/src/io.c: 1052
-# error(_("invalid '%s' argument"), "nr")
-# utils/src/io.c: 1053
-# error(_("invalid '%s' argument"), "nc")
-# utils/src/io.c: 1055
-# error(_("invalid '%s' argument"), "rnames")
-# utils/src/io.c: 1056
-# error(_("invalid '%s' argument"), "sep")
-# utils/src/io.c: 1057
-# error(_("invalid '%s' argument"), "eol")
-# utils/src/io.c: 1058
-# error(_("invalid '%s' argument"), "na")
-# utils/src/io.c: 1059
-# error(_("invalid '%s' argument"), "dec")
-# utils/src/io.c: 1060
-# error(_("invalid '%s' argument"), "qmethod")
-# utils/src/windows/dialogs.c: 170
-# error(_("invalid '%s' argument"), "message")
-# utils/src/windows/dialogs.c: 195
-# error(_("invalid '%s' argument"), "message")
-# utils/src/windows/dialogs.c: 198
-# error(_("invalid '%s' argument"), "default")
-# utils/src/windows/dialogs.c: 242
-# error(_("invalid '%s' argument"), "menuname")
-# utils/src/windows/dialogs.c: 279
-# error(_("invalid '%s' argument"), "menuname")
-# utils/src/windows/dialogs.c: 290
-# error(_("invalid '%s' argument"), "itemname")
-# utils/src/windows/dialogs.c: 314
-# error(_("invalid '%s' argument"), "menuname")
-# utils/src/windows/dialogs.c: 322
-# error(_("invalid '%s' argument"), "itemname")
-# utils/src/windows/widgets.c: 78
-# error(_("invalid '%s' argument"), "choices")
-# utils/src/windows/widgets.c: 81
-# error(_("invalid '%s' argument"), "preselect")
-# utils/src/windows/widgets.c: 86
-# error(_("invalid '%s' argument"), "preselect")
-# utils/src/windows/util.c: 111
-# error(_("invalid '%s' argument"), "path")
-# utils/src/stubs.c: 48
-#  _("invalid '%s' argument")
-# utils/src/stubs.c: 68
-#  _("invalid '%s' argument")
-#: io.c:328 io.c:332 io.c:342 io.c:571 io.c:752 io.c:805 io.c:817 io.c:821
-#: io.c:827 io.c:828 io.c:1052 io.c:1053 io.c:1055 io.c:1056 io.c:1057
-#: io.c:1058 io.c:1059 io.c:1060 stubs.c:48 stubs.c:68 windows/dialogs.c:170
-#: windows/dialogs.c:195 windows/dialogs.c:198 windows/dialogs.c:242
-#: windows/dialogs.c:279 windows/dialogs.c:290 windows/dialogs.c:314
-#: windows/dialogs.c:322 windows/util.c:111 windows/widgets.c:78
+#: io.c:329 io.c:333 io.c:343 io.c:574 io.c:774 io.c:827 io.c:839 io.c:843
+#: io.c:849 io.c:850 io.c:1073 io.c:1074 io.c:1076 io.c:1077 io.c:1078
+#: io.c:1079 io.c:1080 io.c:1081 stubs.c:47 stubs.c:67 windows/dialogs.c:169
+#: windows/dialogs.c:194 windows/dialogs.c:197 windows/dialogs.c:241
+#: windows/dialogs.c:278 windows/dialogs.c:289 windows/dialogs.c:313
+#: windows/dialogs.c:321 windows/util.c:117 windows/widgets.c:78
 #: windows/widgets.c:81 windows/widgets.c:86
 #, c-format
 msgid "invalid '%s' argument"
 msgstr "niepoprawny argument '%s'"
 
-# utils/src/io.c: 351
-# error(_("invalid quote symbol set"))
-# utils/src/io.c: 814
-# error(_("invalid quote symbol set"))
-#: io.c:351 io.c:814
+#: io.c:352 io.c:836
 msgid "invalid quote symbol set"
 msgstr "niepoprawne ustawiony symbol cudzysłowiu"
 
-# utils/src/io.c: 363
-# error(_("cannot open the connection"))
-# utils/src/io.c: 837
-# error(_("cannot open the connection"))
-# utils/src/io.c: 1040
-# error(_("cannot open the connection"))
-#: io.c:363 io.c:837 io.c:1040
+#: io.c:364 io.c:859 io.c:1061
 msgid "cannot open the connection"
 msgstr "nie można otworzyć połączenia"
 
-# utils/src/io.c: 366
-# error(_("cannot read from this connection"))
-# utils/src/io.c: 370
-# error(_("cannot read from this connection"))
-#: io.c:366 io.c:370
+#: io.c:367 io.c:371
 msgid "cannot read from this connection"
 msgstr "nie można czytać z tego połączenia"
 
-# utils/src/io.c: 417
-# error(_("quoted string on line %d terminated by EOF"), inquote)
-# utils/src/io.c: 435
-# error(_("quoted string on line %d terminated by EOF"), inquote)
-#: io.c:417 io.c:435
+#: io.c:418 io.c:436
 #, c-format
 msgid "quoted string on line %d terminated by EOF"
 msgstr ""
 "cytowany łańcuch tekstowy w linii %d przerwany przez znak końca pliku (EOF)"
 
-# utils/src/io.c: 567
-# error(_("the first argument must be of mode character"))
-#: io.c:567
+#: io.c:570
 msgid "the first argument must be of mode character"
 msgstr "pierwszy argument musi być trybu tekstowego"
 
-# utils/src/io.c: 754
-#  _("Selection: ")
-#: io.c:754
+#: io.c:600
+#, c-format
+msgid "invalid 'numerals' string: \"%s\""
+msgstr "niepoprawny łańcuch tekstowy 'numerals': \"%s\""
+
+#: io.c:776
 #, c-format
 msgid "Selection: "
 msgstr "Wybór: "
 
-# utils/src/io.c: 846
-# error(_("cannot allocate buffer in 'readTableHead'"))
-# utils/src/io.c: 860
-# error(_("cannot allocate buffer in 'readTableHead'"))
-#: io.c:846 io.c:860
+#: io.c:868 io.c:882
 msgid "cannot allocate buffer in 'readTableHead'"
 msgstr "nie można przydzielić bufora w 'readTableHead'"
 
-# utils/src/io.c: 871
-# error(_("\\ followed by EOF"))
-#: io.c:871
+#: io.c:893
 msgid "\\ followed by EOF"
 msgstr "\\ a następnie EOF"
 
-# utils/src/io.c: 920
-# warning(_("incomplete final line found by readTableHeader on '%s'"),
-# 		    data.con->description)
-# utils/src/io.c: 923
-# error(_("incomplete final line found by readTableHeader on '%s'"),
-# 		  data.con->description)
-#: io.c:920 io.c:923
+#: io.c:942 io.c:945
 #, c-format
 msgid "incomplete final line found by readTableHeader on '%s'"
 msgstr "niekompletna końcowa linia znaleziona przez 'readTableHeader' w '%s'"
 
-# utils/src/io.c: 980
-# error(_("index out of range"))
-#: io.c:980
+#: io.c:1002
 msgid "index out of range"
 msgstr "indeks poza zakresem"
 
-# utils/src/io.c: 1033
-# error(_("'file' is not a connection"))
-#: io.c:1033
+#: io.c:1054
 msgid "'file' is not a connection"
 msgstr "argument 'file' nie jest połączeniem"
 
-# utils/src/io.c: 1036
-# error(_("cannot write to this connection"))
-#: io.c:1036
+#: io.c:1057
 msgid "cannot write to this connection"
 msgstr "nie można zapisać w tym połączeniu"
 
-# utils/src/io.c: 1066
-# error(_("'dec' must be a single character"))
-#: io.c:1066
+#: io.c:1087
 msgid "'dec' must be a single character"
 msgstr "argument 'dec' musi być pojedynczym znakiem"
 
-# utils/src/io.c: 1093
-# error(_("corrupt data frame -- length of column %d does not not match nrows"), j+1)
-#: io.c:1093
+#: io.c:1113
 #, c-format
 msgid "corrupt data frame -- length of column %d does not not match nrows"
 msgstr ""
 "uszkodzona ramka danych -- długość kolumny %d nie zgadza się z liczbą wierszy"
 
-# utils/src/io.c: 1123
-# error(_("column %s claims to be a factor but does not have numeric codes"), j+1)
-#: io.c:1123
+#: io.c:1144
 #, c-format
 msgid "column %s claims to be a factor but does not have numeric codes"
 msgstr ""
 "kolumna %s twierdzi, że jest czynnikiem, ale nie posiada kodów liczbowych"
 
-# utils/src/io.c: 1141
-# error(_("corrupt matrix -- dims not not match length"))
-#: io.c:1141
+#: io.c:1162
 msgid "corrupt matrix -- dims not not match length"
 msgstr "macierz jest uszkodzona -- wymiary nie zgadzają się z długością"
 
-# utils/src/stubs.c: 57
-#  _("'savehistory' can only be used in Rgui and Rterm")
-#: stubs.c:57
+#: stubs.c:56
 msgid "'savehistory' can only be used in Rgui and Rterm"
 msgstr "'savehistory' może zostać użyte jedynie w Rgui oraz Rterm"
 
-# utils/src/stubs.c: 74
-#  _("'loadhistory' can only be used in Rgui and Rterm")
-#: stubs.c:74
+#: stubs.c:73
 msgid "'loadhistory' can only be used in Rgui and Rterm"
 msgstr "'loadhistory' może zostać użyte jedynie w Rgui oraz Rterm"
 
-# utils/src/stubs.c: 86
-#  _("invalid timestamp")
-#: stubs.c:86
+#: stubs.c:85
 msgid "invalid timestamp"
 msgstr "niepoprawna sygnatura czasu"
 
-# utils/src/stubs.c: 152
-# error(_("X11 dataentry cannot be loaded"))
-# utils/src/stubs.c: 160
-# error(_("X11 dataentry cannot be loaded"))
-#: stubs.c:152 stubs.c:160
+#: stubs.c:151 stubs.c:159
 msgid "X11 dataentry cannot be loaded"
 msgstr "moduł X11 nie może zostać załadowany"
 
-# utils/src/stubs.c: 156
-# warning(_("X11 is not available"))
-# utils/src/stubs.c: 185
-# error(_("X11 is not available"))
-# utils/src/stubs.c: 191
-# error(_("X11 is not available"))
-#: stubs.c:156 stubs.c:185 stubs.c:191
+#: stubs.c:155 stubs.c:184 stubs.c:190
 msgid "X11 is not available"
 msgstr "X11 nie jest dostępne"
 
-# utils/src/stubs.c: 249
-# error(_("invalid '%s' specification"), "editor")
-# utils/src/stubs.c: 252
-# error(_("invalid '%s' specification"), "filename")
-#: stubs.c:249 stubs.c:252
+#: stubs.c:248 stubs.c:251
 #, c-format
 msgid "invalid '%s' specification"
 msgstr "niepoprawne określenie '%s'"
 
-# utils/src/utils.c: 83
-# error(_("'hostname' must be a character vector of length 1"))
-#: utils.c:83
+#: utils.c:85
 msgid "'hostname' must be a character vector of length 1"
 msgstr "argument 'hostname' musi być wektorem tekstowym o długości 1"
 
-# utils/src/utils.c: 89
-# warning(_("nsl() was unable to resolve host '%s'"), name)
-#: utils.c:89
+#: utils.c:91
 #, c-format
 msgid "nsl() was unable to resolve host '%s'"
 msgstr "'nsl()' nie był w stanie nawiązać połączenia z hostem '%s'"
 
-# utils/src/utils.c: 96
-# warning(_("unknown format returned by 'gethostbyname'"))
-#: utils.c:96
+#: utils.c:98
 msgid "unknown format returned by 'gethostbyname'"
 msgstr "nieznany format zwrócony przez 'gethostbyname()'"
 
-# utils/src/utils.c: 105
-# warning(_("nsl() is not supported on this platform"))
-#: utils.c:105
+#: utils.c:107
 msgid "nsl() is not supported on this platform"
 msgstr "'nsl()' nie jest obsługiwany na tej platformie"
 
-# utils/src/windows/dialogs.c: 182
-#  _("unknown type")
-#: windows/dialogs.c:182
+#: windows/dialogs.c:181
 msgid "unknown type"
 msgstr "nieznany typ"
 
-# utils/src/windows/dialogs.c: 214
-#  _("menu functions can only be used in the GUI")
-# utils/src/windows/dialogs.c: 238
-#  _("menu functions can only be used in the GUI")
-# utils/src/windows/dialogs.c: 276
-#  _("menu functions can only be used in the GUI")
-# utils/src/windows/dialogs.c: 311
-#  _("menu functions can only be used in the GUI")
-#: windows/dialogs.c:214 windows/dialogs.c:238 windows/dialogs.c:276
-#: windows/dialogs.c:311
+#: windows/dialogs.c:213 windows/dialogs.c:237 windows/dialogs.c:275
+#: windows/dialogs.c:310
 msgid "menu functions can only be used in the GUI"
 msgstr "funkcje menu mogą być używane jedynie w GUI"
 
-# utils/src/windows/dialogs.c: 246
-#  _("unable to retrieve items for %s (%s)")
-#: windows/dialogs.c:246
+#: windows/dialogs.c:245
 #, c-format
 msgid "unable to retrieve items for %s (%s)"
 msgstr "nie można pobrać pozycji dla %s (%s)"
 
-# utils/src/windows/dialogs.c: 284
-#  _("unable to add menu (%s)")
-#: windows/dialogs.c:284
+#: windows/dialogs.c:283
 #, c-format
 msgid "unable to add menu (%s)"
 msgstr "nie można dodać menu (%s)"
 
-# utils/src/windows/dialogs.c: 296
-#  _("unable to add menu item (%s)")
-#: windows/dialogs.c:296
+#: windows/dialogs.c:295
 #, c-format
 msgid "unable to add menu item (%s)"
 msgstr "nie można dodać pozycji menu (%s)"
 
-# utils/src/windows/dialogs.c: 319
-#  _("menu does not exist")
-#: windows/dialogs.c:319
+#: windows/dialogs.c:318
 msgid "menu does not exist"
 msgstr "menu nie istnieje"
 
-# utils/src/windows/dialogs.c: 326
-#  _("unable to delete menu item (%s)")
-#: windows/dialogs.c:326
+#: windows/dialogs.c:325
 #, c-format
 msgid "unable to delete menu item (%s)"
 msgstr "nie można usunąć pozycji menu (%s)"
 
-# utils/src/windows/registry.c: 73
-# error(_("invalid '%s' value"),  "hive")
-# utils/src/windows/registry.c: 248
-# error(_("invalid '%s' value"),  "key")
-# utils/src/windows/registry.c: 251
-# error(_("invalid '%s' value"),  "hive")
-# utils/src/windows/registry.c: 254
-# error(_("invalid '%s' value"),  "maxdepth")
 #: windows/registry.c:73 windows/registry.c:248 windows/registry.c:251
 #: windows/registry.c:254
 #, c-format
 msgid "invalid '%s' value"
 msgstr "niepoprawna wartość '%s'"
 
-# utils/src/windows/registry.c: 266
-# error(_("Registry key '%ls' not found"), key)
 #: windows/registry.c:266
 #, c-format
 msgid "Registry key '%ls' not found"
 msgstr "Nie znaleziono klucza rejestru '%ls'"
 
-# utils/src/windows/util.c: 41
-# error(_("unsupported version of Windows"))
-#: windows/util.c:41
+#: windows/util.c:42
 msgid "unsupported version of Windows"
 msgstr "niewspierana wersja systemu Windows"
 
-# utils/src/windows/util.c: 275
-# error(_("argument must be a character vector or a raw vector"))
-#: windows/util.c:275
+#: windows/util.c:281
 msgid "argument must be a character vector or a raw vector"
 msgstr "argument 'text' musi być wektorem tekstowym lub pustym wektorem"
 
-# utils/src/windows/util.c: 312
-# warning(_("unable to open the clipboard"))
-#: windows/util.c:312
+#: windows/util.c:318
 msgid "unable to open the clipboard"
 msgstr "nie można otworzyć schowka"
 
-# utils/src/windows/util.c: 317
-# warning(_("unable to write to the clipboard"))
-#: windows/util.c:317
+#: windows/util.c:323
 msgid "unable to write to the clipboard"
 msgstr "nie można zapisać do schowka"
 
-# utils/src/windows/util.c: 397
-# error(_("'title' must be a character string"))
-#: windows/util.c:397
+#: windows/util.c:402
 msgid "'title' must be a character string"
 msgstr "argument 'title' musi być łańcuchem tekstowym"
 
-# utils/src/windows/util.c: 406
-# error(_("'text' must be a character string"))
-#: windows/util.c:406
+#: windows/util.c:411
 msgid "'text' must be a character string"
 msgstr "argument 'text' musi być łańcuchem tekstowym"
 
-# utils/src/windows/util.c: 445
-# error(_("'%s' must be length 1"), "which")
-#: windows/util.c:445
+#: windows/util.c:450
 #, c-format
 msgid "'%s' must be length 1"
 msgstr "argument '%s' musi mieć długość równą 1"
 
-# utils/src/windows/util.c: 558
-# error(_("'%s' must be a list"), "windows")
-#: windows/util.c:558
+#: windows/util.c:563
 #, c-format
 msgid "'%s' must be a list"
 msgstr "argument '%s' musi być listą"
 
-# utils/src/windows/util.c: 562
-# error(_("'%s' element %d is not a window handle"), "windows", i+1)
-#: windows/util.c:562
+#: windows/util.c:567
 #, c-format
 msgid "'%s' element %d is not a window handle"
 msgstr "element %2$d '%1$s' nie jest uchwytem okna"
 
-# utils/src/windows/widgets.c: 108
-#  _("Select one or more")
 #: windows/widgets.c:108
 msgid "Select one or more"
 msgstr "Wybierz jeden lub więcej"
@@ -426,38 +237,22 @@ msgstr "Wybierz jeden lub więcej"
 msgid "Select one"
 msgstr "Wybierz jeden"
 
-# utils/src/windows/widgets.c: 182
-# error(_("'default' must be a character string"))
-# utils/src/windows/widgets.c: 252
-# error(_("'default' must be a character string"))
-#: windows/widgets.c:182 windows/widgets.c:252
+#: windows/widgets.c:182 windows/widgets.c:247
 msgid "'default' must be a character string"
 msgstr "argument 'default' musi być łańcuchem tekstowym"
 
-# utils/src/windows/widgets.c: 184
-# error(_("'default' is overlong"))
-# utils/src/windows/widgets.c: 254
-# error(_("'default' is overlong"))
-#: windows/widgets.c:184 windows/widgets.c:254
+#: windows/widgets.c:184 windows/widgets.c:249
 msgid "'default' is overlong"
 msgstr "argument 'default' jest zbyt długi"
 
-# utils/src/windows/widgets.c: 188
-# error(_("'caption' must be a character string"))
-# utils/src/windows/widgets.c: 258
-# error(_("'caption' must be a character string"))
-#: windows/widgets.c:188 windows/widgets.c:258
+#: windows/widgets.c:188 windows/widgets.c:253
 msgid "'caption' must be a character string"
 msgstr "argument 'caption' musi być łańcuchem tekstowym"
 
-# utils/src/windows/widgets.c: 190
-# error(_("'multi' must be a logical value"))
 #: windows/widgets.c:190
 msgid "'multi' must be a logical value"
 msgstr "argument 'multi' musi być wartością logiczną"
 
-# utils/src/windows/widgets.c: 192
-# error(_("'filterindex' must be an integer value"))
 #: windows/widgets.c:192
 msgid "'filterindex' must be an integer value"
 msgstr "argument 'filterindex' musi być wartością całkowitą"
diff --git a/src/library/utils/po/utils.pot b/src/library/utils/po/utils.pot
index e883dc0..e0732da 100644
--- a/src/library/utils/po/utils.pot
+++ b/src/library/utils/po/utils.pot
@@ -1,14 +1,14 @@
 # SOME DESCRIPTIVE TITLE.
-# Copyright (C) YEAR The R Core Team
+# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
 # This file is distributed under the same license as the PACKAGE package.
 # FIRST AUTHOR <EMAIL at ADDRESS>, YEAR.
 #
 #, fuzzy
 msgid ""
 msgstr ""
-"Project-Id-Version: R 3.1.0\n"
-"Report-Msgid-Bugs-To: bugs.r-project.org\n"
-"POT-Creation-Date: 2014-01-15 09:09+0000\n"
+"Project-Id-Version: utils 3.4.0\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2016-04-01 10:28-0700\n"
 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
 "Last-Translator: FULL NAME <EMAIL at ADDRESS>\n"
 "Language-Team: LANGUAGE <LL at li.org>\n"
@@ -17,157 +17,162 @@ msgstr ""
 "Content-Type: text/plain; charset=CHARSET\n"
 "Content-Transfer-Encoding: 8bit\n"
 
-#: io.c:328 io.c:332 io.c:342 io.c:571 io.c:752 io.c:805 io.c:817 io.c:821
-#: io.c:827 io.c:828 io.c:1052 io.c:1053 io.c:1055 io.c:1056 io.c:1057
-#: io.c:1058 io.c:1059 io.c:1060 stubs.c:48 stubs.c:68 windows/dialogs.c:170
-#: windows/dialogs.c:195 windows/dialogs.c:198 windows/dialogs.c:242
-#: windows/dialogs.c:279 windows/dialogs.c:290 windows/dialogs.c:314
-#: windows/dialogs.c:322 windows/util.c:111 windows/widgets.c:78
+#: io.c:329 io.c:333 io.c:343 io.c:574 io.c:774 io.c:827 io.c:839 io.c:843
+#: io.c:849 io.c:850 io.c:1073 io.c:1074 io.c:1076 io.c:1077 io.c:1078
+#: io.c:1079 io.c:1080 io.c:1081 stubs.c:47 stubs.c:67 windows/dialogs.c:169
+#: windows/dialogs.c:194 windows/dialogs.c:197 windows/dialogs.c:241
+#: windows/dialogs.c:278 windows/dialogs.c:289 windows/dialogs.c:313
+#: windows/dialogs.c:321 windows/util.c:117 windows/widgets.c:78
 #: windows/widgets.c:81 windows/widgets.c:86
 #, c-format
 msgid "invalid '%s' argument"
 msgstr ""
 
-#: io.c:351 io.c:814
+#: io.c:352 io.c:836
 msgid "invalid quote symbol set"
 msgstr ""
 
-#: io.c:363 io.c:837 io.c:1040
+#: io.c:364 io.c:859 io.c:1061
 msgid "cannot open the connection"
 msgstr ""
 
-#: io.c:366 io.c:370
+#: io.c:367 io.c:371
 msgid "cannot read from this connection"
 msgstr ""
 
-#: io.c:417 io.c:435
+#: io.c:418 io.c:436
 #, c-format
 msgid "quoted string on line %d terminated by EOF"
 msgstr ""
 
-#: io.c:567
+#: io.c:570
 msgid "the first argument must be of mode character"
 msgstr ""
 
-#: io.c:754
+#: io.c:600
+#, c-format
+msgid "invalid 'numerals' string: \"%s\""
+msgstr ""
+
+#: io.c:776
 #, c-format
 msgid "Selection: "
 msgstr ""
 
-#: io.c:846 io.c:860
+#: io.c:868 io.c:882
 msgid "cannot allocate buffer in 'readTableHead'"
 msgstr ""
 
-#: io.c:871
+#: io.c:893
 msgid "\\ followed by EOF"
 msgstr ""
 
-#: io.c:920 io.c:923
+#: io.c:942 io.c:945
 #, c-format
 msgid "incomplete final line found by readTableHeader on '%s'"
 msgstr ""
 
-#: io.c:980
+#: io.c:1002
 msgid "index out of range"
 msgstr ""
 
-#: io.c:1033
+#: io.c:1054
 msgid "'file' is not a connection"
 msgstr ""
 
-#: io.c:1036
+#: io.c:1057
 msgid "cannot write to this connection"
 msgstr ""
 
-#: io.c:1066
+#: io.c:1087
 msgid "'dec' must be a single character"
 msgstr ""
 
-#: io.c:1093
+#: io.c:1113
 #, c-format
 msgid "corrupt data frame -- length of column %d does not not match nrows"
 msgstr ""
 
-#: io.c:1123
+#: io.c:1144
 #, c-format
 msgid "column %s claims to be a factor but does not have numeric codes"
 msgstr ""
 
-#: io.c:1141
+#: io.c:1162
 msgid "corrupt matrix -- dims not not match length"
 msgstr ""
 
-#: stubs.c:57
+#: stubs.c:56
 msgid "'savehistory' can only be used in Rgui and Rterm"
 msgstr ""
 
-#: stubs.c:74
+#: stubs.c:73
 msgid "'loadhistory' can only be used in Rgui and Rterm"
 msgstr ""
 
-#: stubs.c:86
+#: stubs.c:85
 msgid "invalid timestamp"
 msgstr ""
 
-#: stubs.c:152 stubs.c:160
+#: stubs.c:151 stubs.c:159
 msgid "X11 dataentry cannot be loaded"
 msgstr ""
 
-#: stubs.c:156 stubs.c:185 stubs.c:191
+#: stubs.c:155 stubs.c:184 stubs.c:190
 msgid "X11 is not available"
 msgstr ""
 
-#: stubs.c:249 stubs.c:252
+#: stubs.c:248 stubs.c:251
 #, c-format
 msgid "invalid '%s' specification"
 msgstr ""
 
-#: utils.c:83
+#: utils.c:85
 msgid "'hostname' must be a character vector of length 1"
 msgstr ""
 
-#: utils.c:89
+#: utils.c:91
 #, c-format
 msgid "nsl() was unable to resolve host '%s'"
 msgstr ""
 
-#: utils.c:96
+#: utils.c:98
 msgid "unknown format returned by 'gethostbyname'"
 msgstr ""
 
-#: utils.c:105
+#: utils.c:107
 msgid "nsl() is not supported on this platform"
 msgstr ""
 
-#: windows/dialogs.c:182
+#: windows/dialogs.c:181
 msgid "unknown type"
 msgstr ""
 
-#: windows/dialogs.c:214 windows/dialogs.c:238 windows/dialogs.c:276
-#: windows/dialogs.c:311
+#: windows/dialogs.c:213 windows/dialogs.c:237 windows/dialogs.c:275
+#: windows/dialogs.c:310
 msgid "menu functions can only be used in the GUI"
 msgstr ""
 
-#: windows/dialogs.c:246
+#: windows/dialogs.c:245
 #, c-format
 msgid "unable to retrieve items for %s (%s)"
 msgstr ""
 
-#: windows/dialogs.c:284
+#: windows/dialogs.c:283
 #, c-format
 msgid "unable to add menu (%s)"
 msgstr ""
 
-#: windows/dialogs.c:296
+#: windows/dialogs.c:295
 #, c-format
 msgid "unable to add menu item (%s)"
 msgstr ""
 
-#: windows/dialogs.c:319
+#: windows/dialogs.c:318
 msgid "menu does not exist"
 msgstr ""
 
-#: windows/dialogs.c:326
+#: windows/dialogs.c:325
 #, c-format
 msgid "unable to delete menu item (%s)"
 msgstr ""
@@ -183,41 +188,41 @@ msgstr ""
 msgid "Registry key '%ls' not found"
 msgstr ""
 
-#: windows/util.c:41
+#: windows/util.c:42
 msgid "unsupported version of Windows"
 msgstr ""
 
-#: windows/util.c:275
+#: windows/util.c:281
 msgid "argument must be a character vector or a raw vector"
 msgstr ""
 
-#: windows/util.c:312
+#: windows/util.c:318
 msgid "unable to open the clipboard"
 msgstr ""
 
-#: windows/util.c:317
+#: windows/util.c:323
 msgid "unable to write to the clipboard"
 msgstr ""
 
-#: windows/util.c:397
+#: windows/util.c:402
 msgid "'title' must be a character string"
 msgstr ""
 
-#: windows/util.c:406
+#: windows/util.c:411
 msgid "'text' must be a character string"
 msgstr ""
 
-#: windows/util.c:445
+#: windows/util.c:450
 #, c-format
 msgid "'%s' must be length 1"
 msgstr ""
 
-#: windows/util.c:558
+#: windows/util.c:563
 #, c-format
 msgid "'%s' must be a list"
 msgstr ""
 
-#: windows/util.c:562
+#: windows/util.c:567
 #, c-format
 msgid "'%s' element %d is not a window handle"
 msgstr ""
@@ -230,15 +235,15 @@ msgstr ""
 msgid "Select one"
 msgstr ""
 
-#: windows/widgets.c:182 windows/widgets.c:252
+#: windows/widgets.c:182 windows/widgets.c:247
 msgid "'default' must be a character string"
 msgstr ""
 
-#: windows/widgets.c:184 windows/widgets.c:254
+#: windows/widgets.c:184 windows/widgets.c:249
 msgid "'default' is overlong"
 msgstr ""
 
-#: windows/widgets.c:188 windows/widgets.c:258
+#: windows/widgets.c:188 windows/widgets.c:253
 msgid "'caption' must be a character string"
 msgstr ""
 
diff --git a/src/library/utils/src/Makefile.in b/src/library/utils/src/Makefile.in
index 8062f19..84c0839 100644
--- a/src/library/utils/src/Makefile.in
+++ b/src/library/utils/src/Makefile.in
@@ -22,10 +22,9 @@ PKG_CFLAGS = $(C_VISIBILITY)
 
 SHLIB = $(pkg)@SHLIB_EXT@
 
-XZ_CPPFLAGS = @BUILD_XZ_TRUE@  -I$(top_srcdir)/src/extra/xz/api
 # need Defn.h etc, and config.h
 PKG_CPPFLAGS =-I../../../include -I$(top_srcdir)/src/include -DHAVE_CONFIG_H \
-  -I$(top_srcdir)/src/main $(XZ_CPPFLAGS)
+  -I$(top_srcdir)/src/main
 
 
 all: Makedeps
diff --git a/src/library/utils/src/Makefile.win b/src/library/utils/src/Makefile.win
index 35c967e..f4e805a 100644
--- a/src/library/utils/src/Makefile.win
+++ b/src/library/utils/src/Makefile.win
@@ -21,14 +21,13 @@ OBJECTS = $(SOURCES_C:.c=.o) ../../../gnuwin32/dllversion.o
 SHLIB = $(pkg).dll
 RESFLAGS = -I $(R_HOME)/include
 
-XZ_CPPFLAGS = -DLZMA_API_STATIC -I../../../extra/xz/api
+XZ_CPPFLAGS = -DLZMA_API_STATIC -I$(LOCAL_SOFT)/include
 
-PKG_CPPFLAGS=-I$(R_HOME)/src/include -DHAVE_CONFIG_H \
+PKG_CPPFLAGS = -I$(R_HOME)/src/include -DHAVE_CONFIG_H \
   -I$(R_HOME)/src/main -I$(R_HOME)/src/gnuwin32 -I$(R_HOME)/src/extra \
   -I$(R_HOME)/src/library/grDevices/src $(XZ_CPPFLAGS)
 
-PKG_LIBS=-lRgraphapp -lVersion
-
+PKG_LIBS = -lRgraphapp -lVersion -L"$(EXT_LIBS)"/lib$(R_ARCH) -llzma
 
 all: makeMakedeps shlib
 
diff --git a/src/library/utils/src/init.c b/src/library/utils/src/init.c
index 111354b..ebbaf10 100644
--- a/src/library/utils/src/init.c
+++ b/src/library/utils/src/init.c
@@ -1,6 +1,6 @@
 /*
  *  R : A Computer Language for Statistical Data Analysis
- *  Copyright (C) 2012   The R Core Team.
+ *  Copyright (C) 2012-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
@@ -14,7 +14,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  */
 
 #ifdef HAVE_CONFIG_H
@@ -26,6 +26,7 @@
 
 #include "utils.h"
 #include <R_ext/Rdynload.h>
+#include <R_ext/Visibility.h>
 
 
 #define CALLDEF(name, n)  {#name, (DL_FUNC) &name, n}
@@ -72,7 +73,11 @@ static const R_CallMethodDef CallEntries[] = {
 #define EXTDEF(name, n)  {#name, (DL_FUNC) &name, n}
 
 static const R_ExternalMethodDef ExtEntries[] = {
+#ifdef Win32
+    EXTDEF(download, 6),
+#else
     EXTDEF(download, 5),
+#endif
     EXTDEF(unzip, 7),
     EXTDEF(Rprof, 8),
     EXTDEF(Rprofmem, 3),
@@ -111,10 +116,7 @@ static const R_ExternalMethodDef ExtEntries[] = {
 };
 
 
-void
-#ifdef HAVE_VISIBILITY_ATTRIBUTE
-__attribute__ ((visibility ("default")))
-#endif
+void attribute_visible
 R_init_utils(DllInfo *dll)
 {
     R_registerRoutines(dll, NULL, CallEntries, NULL, ExtEntries);
diff --git a/src/library/utils/src/io.c b/src/library/utils/src/io.c
index 2e2517d..99670a5 100644
--- a/src/library/utils/src/io.c
+++ b/src/library/utils/src/io.c
@@ -15,7 +15,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  */
 
 /* <UTF8>
@@ -168,10 +168,6 @@ static int Strtoi(const char *nptr, int base)
     return (int) res;
 }
 
-// ../../../main/util.c
-extern double R_strtod5(const char *str, char **endptr, char dec,
-			Rboolean NA, int exact);
-
 static double
 Strtod (const char *nptr, char **endptr, Rboolean NA, LocalData *d, int i_exact)
 {
@@ -189,8 +185,13 @@ strtoc(const char *nptr, char **endptr, Rboolean NA, LocalData *d, int i_exact)
     if (isBlankString(endp)) {
 	z.r = x; z.i = 0;
     } else if (*endp == 'i')  {
-	z.r = 0; z.i = x;
-	endp++;
+	if (endp == nptr) {
+	    z.r = NA_REAL; z.i = NA_REAL;
+	}
+	else {
+	    z.r = 0; z.i = x;
+	    endp++;
+	}
     } else {
 	s = endp;
 	y = Strtod(s, &endp, NA, d, i_exact);
@@ -198,7 +199,7 @@ strtoc(const char *nptr, char **endptr, Rboolean NA, LocalData *d, int i_exact)
 	    z.r = x; z.i = y;
 	    endp++;
 	} else {
-	    z.r = 0; z.i = 0;
+	    z.r = NA_REAL; z.i = NA_REAL;
 	    endp = (char *) nptr; /* -Wall */
 	}
     }
@@ -991,7 +992,7 @@ static Rboolean isna(SEXP x, int indx)
 /* a version of EncodeElement with different escaping of char strings */
 static const char
 *EncodeElement2(SEXP x, int indx, Rboolean quote,
-		Rboolean qmethod, R_StringBuffer *buff, char cdec)
+		Rboolean qmethod, R_StringBuffer *buff, const char *dec)
 {
     int nbuf;
     char *q;
@@ -1015,7 +1016,7 @@ static const char
 	vmaxset(vmax);
 	return buff->data;
     }
-    return EncodeElement(x, indx, quote ? '"' : 0, cdec);
+    return EncodeElement0(x, indx, quote ? '"' : 0, dec);
 }
 
 typedef struct wt_info {
@@ -1040,7 +1041,6 @@ SEXP writetable(SEXP call, SEXP op, SEXP args, SEXP env)
     Rboolean wasopen, quote_rn = FALSE, *quote_col;
     Rconnection con;
     const char *csep, *ceol, *cna, *sdec, *tmp = NULL /* -Wall */;
-    char cdec;
     SEXP *levels;
     R_StringBuffer strBuf = {NULL, 0, MAXELTSIZE};
     wt_info wi;
@@ -1085,7 +1085,6 @@ SEXP writetable(SEXP call, SEXP op, SEXP args, SEXP env)
     sdec = translateChar(STRING_ELT(dec, 0));
     if(strlen(sdec) != 1)
 	error(_("'dec' must be a single character"));
-    cdec = sdec[0];
     quote_col = (Rboolean *) R_alloc(nc, sizeof(Rboolean));
     for(int j = 0; j < nc; j++) quote_col[j] = FALSE;
     for(int i = 0; i < length(quote); i++) { /* NB, quote might be NULL */
@@ -1123,7 +1122,7 @@ SEXP writetable(SEXP call, SEXP op, SEXP args, SEXP env)
 	    if(!isNull(rnames))
 		Rconn_printf(con, "%s%s",
 			     EncodeElement2(rnames, i, quote_rn, qmethod,
-					    &strBuf, cdec), csep);
+					    &strBuf, sdec), csep);
 	    for(int j = 0; j < nc; j++) {
 		xj = VECTOR_ELT(x, j);
 		if(j > 0) Rconn_printf(con, "%s", csep);
@@ -1135,20 +1134,19 @@ SEXP writetable(SEXP call, SEXP op, SEXP args, SEXP env)
 			if(TYPEOF(xj) == INTSXP)
 			    tmp = EncodeElement2(levels[j], INTEGER(xj)[i] - 1,
 						 quote_col[j], qmethod,
-						 &strBuf, cdec);
+						 &strBuf, sdec);
 			else if(TYPEOF(xj) == REALSXP)
 			    tmp = EncodeElement2(levels[j],
 						 (int) (REAL(xj)[i] - 1),
 						 quote_col[j], qmethod,
-						 &strBuf, cdec);
+						 &strBuf, sdec);
 			else
 			    error(_("column %s claims to be a factor but does not have numeric codes"),
 				  j+1);
 		    } else {
 			tmp = EncodeElement2(xj, i, quote_col[j], qmethod,
-					     &strBuf, cdec);
+					     &strBuf, sdec);
 		    }
-		    /* if(cdec) change_dec(tmp, cdec, TYPEOF(xj)); */
 		}
 		Rconn_printf(con, "%s", tmp);
 	    }
@@ -1168,14 +1166,13 @@ SEXP writetable(SEXP call, SEXP op, SEXP args, SEXP env)
 	    if(!isNull(rnames))
 		Rconn_printf(con, "%s%s",
 			     EncodeElement2(rnames, i, quote_rn, qmethod,
-					    &strBuf, cdec), csep);
+					    &strBuf, sdec), csep);
 	    for(int j = 0; j < nc; j++) {
 		if(j > 0) Rconn_printf(con, "%s", csep);
 		if(isna(x, i + j*nr)) tmp = cna;
 		else {
 		    tmp = EncodeElement2(x, i + j*nr, quote_col[j], qmethod,
-					&strBuf, cdec);
-		    /* if(cdec) change_dec(tmp, cdec, TYPEOF(x)); */
+					&strBuf, sdec);
 		}
 		Rconn_printf(con, "%s", tmp);
 	    }
diff --git a/src/library/utils/src/size.c b/src/library/utils/src/size.c
index 83b6a0e..2258c17 100644
--- a/src/library/utils/src/size.c
+++ b/src/library/utils/src/size.c
@@ -1,6 +1,6 @@
 /*
  *  R : A Computer Language for Statistical Data Analysis
- *  Copyright (C) 2000-12  The R Core Team
+ *  Copyright (C) 2000-2014  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
@@ -14,7 +14,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  */
 
 
@@ -36,7 +36,7 @@
       and all the nodes specifically due to it, but not for the
       space for its name nor for .Internals it references.
 */
-SEXP csduplicated(SEXP x);  /* from unique.c */
+SEXP Rf_csduplicated(SEXP x);  /* from unique.c */
 
 static R_size_t objectsize(SEXP s)
 {
@@ -53,6 +53,7 @@ static R_size_t objectsize(SEXP s)
     case LISTSXP:
     case LANGSXP:
     case BCODESXP:
+    case DOTSXP:
 	cnt += objectsize(TAG(s));
 	cnt += objectsize(CAR(s));
 	cnt += objectsize(CDR(s));
@@ -63,6 +64,7 @@ static R_size_t objectsize(SEXP s)
 	/* no charge for the environment */
 	break;
     case ENVSXP:
+	R_CheckStack(); /* in case attributes might lead to a cycle */
     case PROMSXP:
     case SPECIALSXP:
     case BUILTINSXP:
@@ -86,15 +88,15 @@ static R_size_t objectsize(SEXP s)
 	break;
     case STRSXP:
 	vcnt = PTR2VEC(xlength(s));
-	dup = csduplicated(s);
+	PROTECT(dup = Rf_csduplicated(s));
 	for (R_xlen_t i = 0; i < xlength(s); i++) {
 	    tmp = STRING_ELT(s, i);
 	    if(tmp != NA_STRING && !LOGICAL(dup)[i])
 		cnt += objectsize(tmp);
 	}
 	isVec = TRUE;
+	UNPROTECT(1);
 	break;
-    case DOTSXP:
     case ANYSXP:
 	/* we don't know about these */
 	break;
diff --git a/src/library/utils/src/sock.c b/src/library/utils/src/sock.c
index 9a6c0ec..d95f440 100644
--- a/src/library/utils/src/sock.c
+++ b/src/library/utils/src/sock.c
@@ -14,7 +14,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  */
 
 #include <R.h>
diff --git a/src/library/utils/src/stubs.c b/src/library/utils/src/stubs.c
index 48903f4..a0400c6 100644
--- a/src/library/utils/src/stubs.c
+++ b/src/library/utils/src/stubs.c
@@ -14,7 +14,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  */
 
 #ifdef HAVE_CONFIG_H
@@ -34,10 +34,9 @@
 
 
 #ifdef Win32
-#include "Startup.h"
-extern UImode CharacterMode;
-#include "getline/getline.h"     /* for gl_load/savehistory */
-#include "getline/wc_history.h"  /* for wgl_load/savehistory */
+# include "Startup.h"
+# include "getline/getline.h"     /* for gl_load/savehistory */
+# include "getline/wc_history.h"  /* for wgl_load/savehistory */
 SEXP savehistory(SEXP call, SEXP op, SEXP args, SEXP env)
 {
     SEXP sfile;
@@ -312,9 +311,9 @@ SEXP shortpath(SEXP paths)
 /* called from tar() */
 SEXP octsize(SEXP size)
 {
+    double s = asReal(size);
     SEXP ans = allocVector(RAWSXP, 11);
     Rbyte *ra = RAW(ans);
-    double s = asReal(size);
     if (!R_FINITE(s) && s >= 0) error("size must be finite and >= 0");
     /* We have to be able to do this on a 32-bit system */
     for (int i = 0; i < 11; i++) {
diff --git a/src/library/utils/src/utils.c b/src/library/utils/src/utils.c
index 2110045..eedae2f 100644
--- a/src/library/utils/src/utils.c
+++ b/src/library/utils/src/utils.c
@@ -1,6 +1,6 @@
 /*
  *  R : A Computer Language for Statistical Data Analysis
- *  Copyright (C) 2012   The R Core Team.
+ *  Copyright (C) 2012-2015   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
@@ -14,13 +14,14 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  */
 
 #ifdef HAVE_CONFIG_H
 # include <config.h>
 #endif
 
+#include <string.h>
 #include <R.h>
 #include <Rinternals.h>
 
@@ -67,7 +68,8 @@ SEXP crc64(SEXP in)
     return mkString(ans);
 }
 
-#if defined(HAVE_BSD_NETWORKING) && defined(HAVE_ARPA_INET_H)
+// As from 3.3.0 this means on Unix.
+#if defined(HAVE_ARPA_INET_H)
 #include <netdb.h>
 #include <sys/socket.h>
 #include <netinet/in.h>
diff --git a/src/library/utils/src/utils.h b/src/library/utils/src/utils.h
index c95f6af..d46db52 100644
--- a/src/library/utils/src/utils.h
+++ b/src/library/utils/src/utils.h
@@ -14,7 +14,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  */
 
 #ifdef ENABLE_NLS
diff --git a/src/library/utils/src/windows/dataentry.c b/src/library/utils/src/windows/dataentry.c
index ce35f18..d2e71d1 100644
--- a/src/library/utils/src/windows/dataentry.c
+++ b/src/library/utils/src/windows/dataentry.c
@@ -15,7 +15,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  */
 
 /* TODO
@@ -792,7 +792,8 @@ static SEXP processEscapes(SEXP x)
     	
     PROTECT( pattern = mkString("(?<!\\\\)((\\\\\\\\)*)\"") );
     PROTECT( replacement = mkString("\\1\\\\\"") );
-    PROTECT( expr = lang5(install("gsub"), ScalarLogical(1), pattern, replacement, x) );
+    SEXP s_gsub = install("gsub");
+    PROTECT( expr = lang5(s_gsub, ScalarLogical(1), pattern, replacement, x) );
     SET_TAG( CDR(expr), install("perl") );
 
     PROTECT( newval = eval(expr, R_BaseEnv) );
diff --git a/src/library/utils/src/windows/dialogs.c b/src/library/utils/src/windows/dialogs.c
index 6b32e38..41d9008 100644
--- a/src/library/utils/src/windows/dialogs.c
+++ b/src/library/utils/src/windows/dialogs.c
@@ -17,7 +17,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  */
 
 #ifdef HAVE_CONFIG_H
@@ -34,7 +34,6 @@
 #include "rui.h"
 
 #include "Startup.h"
-extern UImode CharacterMode;
 
 typedef struct {
     window wprog;
diff --git a/src/library/utils/src/windows/registry.c b/src/library/utils/src/windows/registry.c
index bb3db0f..a184c77 100644
--- a/src/library/utils/src/windows/registry.c
+++ b/src/library/utils/src/windows/registry.c
@@ -15,7 +15,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  */
 
 #ifdef HAVE_CONFIG_H
diff --git a/src/library/utils/src/windows/util.c b/src/library/utils/src/windows/util.c
index 2370e0a..872b6fd 100644
--- a/src/library/utils/src/windows/util.c
+++ b/src/library/utils/src/windows/util.c
@@ -17,7 +17,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  */
 
 #ifdef HAVE_CONFIG_H
@@ -31,6 +31,7 @@
 
 typedef void (WINAPI *PGNSI)(LPSYSTEM_INFO);
 
+// keep in step with src/gnuwin32/extra.c
 SEXP winver(void)
 {
     char ver[256];
@@ -44,26 +45,31 @@ SEXP winver(void)
        for ways to get more info.
        Pre-NT versions are all 4.x, so no need to separate test.
        See also http://msdn.microsoft.com/en-us/library/ms724832.aspx
+       https://msdn.microsoft.com/en-us/library/windows/desktop/ms724833%28v=vs.85%29.aspx
        for version number naming.
     */
     if(osvi.dwMajorVersion >= 5) {
 	char *desc = "", *type="";
 	SYSTEM_INFO si;
-	if(osvi.dwMajorVersion > 6 
-	   || (osvi.dwMajorVersion == 6 && osvi.dwMinorVersion > 2) ) { /* future proof, but see also below */
-	    snprintf(ver, 256, "Windows %d.%d (build %d)",
-		     (int) osvi.dwMajorVersion, (int) osvi.dwMinorVersion,
-		     LOWORD(osvi.dwBuildNumber));
+	// future-proof
+	snprintf(ver, 256, "%d.%d",
+		 (int) osvi.dwMajorVersion, (int) osvi.dwMinorVersion);
+	if(osvi.dwMajorVersion == 10) {
+	    if(osvi.wProductType == VER_NT_WORKSTATION) desc = "10";
+	    else desc = "Server";
 	} else if(osvi.dwMajorVersion == 6) {
+	    // see See https://msdn.microsoft.com/en-us/library/windows/desktop/ms724451%28v=vs.85%29.aspx for the >= here.
 	    if(osvi.wProductType == VER_NT_WORKSTATION) {
 		if(osvi.dwMinorVersion == 0) desc = "Vista";
 		else if(osvi.dwMinorVersion == 1) desc = "7";
-		else if(osvi.dwMinorVersion == 2) desc = "8";
-		else desc = "> 8";
+		else if(osvi.dwMinorVersion == 2) desc = ">= 8";
+		else if(osvi.dwMinorVersion == 3) desc = "8.1";
+		else desc = "> 8.1";
 	    } else {
 		if(osvi.dwMinorVersion == 0) desc = "Server 2008";
 		else if(osvi.dwMinorVersion == 1) desc = "Server 2008 R2";
-		else if(osvi.dwMinorVersion == 2) desc = "Server 2012";
+		else if(osvi.dwMinorVersion == 2) desc = "Server >= 2012";
+		else if(osvi.dwMinorVersion == 3) desc = "Server 2012 R2";
 		else desc = "Server > 2012";
 	    }
 	} else if(osvi.dwMajorVersion == 5 && osvi.dwMinorVersion == 0)
@@ -326,7 +332,6 @@ SEXP writeClipboard(SEXP text, SEXP sformat)
 }
 
 #include "Startup.h"
-extern UImode CharacterMode;
 
 #include <graphapp/ga.h>
 #include "rui.h"
diff --git a/src/library/utils/src/windows/widgets.c b/src/library/utils/src/windows/widgets.c
index 49163de..8e6e56f 100644
--- a/src/library/utils/src/windows/widgets.c
+++ b/src/library/utils/src/windows/widgets.c
@@ -17,7 +17,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  */
 
 #ifdef HAVE_CONFIG_H
@@ -207,12 +207,7 @@ SEXP chooseFiles(SEXP def, SEXP caption, SEXP smulti, SEXP filters, SEXP sindex)
     res = askfilenamesW(filenameToWchar(STRING_ELT(caption, 0), 0), path,
 			multi, cfilters, filterindex, NULL);
 
-    if(!multi) {
-	/* only one filename possible */
-	count = 1;
-    } else {
-	count = countFilenamesW(res);
-    }
+    count = countFilenamesW(res);
 
     SEXP ans;
     if (count < 2) PROTECT(ans = allocVector(STRSXP, count));
diff --git a/src/library/utils/tests/Sweave-tst.R b/src/library/utils/tests/Sweave-tst.R
index e22d434..2444325 100644
--- a/src/library/utils/tests/Sweave-tst.R
+++ b/src/library/utils/tests/Sweave-tst.R
@@ -1,5 +1,5 @@
 #  File src/library/utils/tests/Sweave-tst.R
-#  Part of the R package, http://www.R-project.org
+#  Part of the R package, https://www.R-project.org
 #
 #  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
@@ -12,7 +12,7 @@
 #  GNU General Public License for more details.
 #
 #  A copy of the GNU General Public License is available at
-#  http://www.r-project.org/Licenses/
+#  https://www.R-project.org/Licenses/
 
 ## Testing Sweave
 
diff --git a/src/library/utils/tests/swv-keepSrc-1.Rnw b/src/library/utils/tests/swv-keepSrc-1.Rnw
index 3cfcb48..0f608a3 100644
--- a/src/library/utils/tests/swv-keepSrc-1.Rnw
+++ b/src/library/utils/tests/swv-keepSrc-1.Rnw
@@ -10,6 +10,7 @@ options(width=70, useFancyQuotes = FALSE, prompt="R> ", continue="+  ")
 \subsection*{Introduction}
 
 We generate 3D gaussian data,
+We generate 3D Gaussian data,
 <<ex1-U3>>=
 set.seed(1)
 n <- 100
@@ -22,7 +23,7 @@ str(U3) # its structure ((comment kept))
 @
 and load package \texttt{lattice}
 <<req-lattice>>=
-require("lattice")
+if(!require("lattice")) q("no")
 @
 to visualize it by a simple scatter plot matrix
 \begin{figure}[h!]
diff --git a/src/library/utils/vignettes/Sweave.Rnw b/src/library/utils/vignettes/Sweave.Rnw
index 23baced..4a7872f 100644
--- a/src/library/utils/vignettes/Sweave.Rnw
+++ b/src/library/utils/vignettes/Sweave.Rnw
@@ -1,5 +1,5 @@
 % File src/library/utils/vignettes/Sweave.Rnw
-% Part of the R package, http://www.R-project.org
+% Part of the R package, https://www.R-project.org
 % Copyright 2002-2014 Friedrich Leisch and the R Core Team
 % Distributed under GPL 2 or later
 
@@ -666,7 +666,7 @@ encoding used for the text to be processed.
     in Sweave format?}
 
   Recent versions of ESS (Emacs speaks statistics,
-  \url{http://ess.R-project.org}) automatically recognize files with
+  \url{https://ESS.R-project.org/}) automatically recognize files with
   extension \file{.Rnw} as Sweave files and turn on the correct
   modes. Please follow the instructions on the ESS homepage on how to
   install ESS on your computer.
diff --git a/src/main/CommandLineArgs.c b/src/main/CommandLineArgs.c
index a3d578f..8f97387 100644
--- a/src/main/CommandLineArgs.c
+++ b/src/main/CommandLineArgs.c
@@ -14,7 +14,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  */
 
 #ifdef HAVE_CONFIG_H
@@ -73,6 +73,7 @@ do_commandArgs(SEXP call, SEXP op, SEXP args, SEXP env)
     int i;
     SEXP vals;
 
+    checkArity(op, args);
     /* need protection as mkChar allocates */
     vals = PROTECT(allocVector(STRSXP, NumCommandLineArgs));
     for(i = 0; i < NumCommandLineArgs; i++)
@@ -239,7 +240,6 @@ R_common_command_line(int *pac, char **argv, Rstart Rp)
 		    R_ShowMessage(_("WARNING: '--max-ppsize' value is negative: ignored"));
 		else if (lval < 10000)
 		    R_ShowMessage(_("WARNING: '--max-ppsize' value is too small: ignored"));
-
 		else if (lval > 500000)
 		    R_ShowMessage(_("WARNING: '--max-ppsize' value is too large: ignored"));
 		else Rp->ppsize = (size_t) lval;
diff --git a/src/main/Makefile.in b/src/main/Makefile.in
index d9cbcaa..d5366ab 100644
--- a/src/main/Makefile.in
+++ b/src/main/Makefile.in
@@ -30,12 +30,13 @@ SOURCES_C = \
 	objects.c options.c \
 	paste.c platform.c plot.c plot3d.c plotmath.c \
 	print.c printarray.c printvector.c printutils.c qsort.c \
-	random.c raw.c registration.c relop.c rlocale.c \
+	radixsort.c random.c raw.c registration.c relop.c rlocale.c \
 	saveload.c scan.c seq.c serialize.c sort.c source.c split.c \
 	sprintf.c startup.c subassign.c subscript.c subset.c summary.c sysutils.c \
 	times.c \
 	unique.c util.c \
-	version.c vfonts.c
+	version.c \
+	g_alab_her.c g_cntrlify.c g_fontdb.c g_her_glyph.c
 
 SOURCES_F =  xxxpr.f
 
@@ -48,17 +49,21 @@ DEPENDS = $(SOURCES_C:.c=.d) $(EXTRA_SOURCES_C:.c=.d)
 SOURCES = $(SOURCES_C) $(SOURCES_F)
 OBJECTS = $(SOURCES_C:.c=.o) $(SOURCES_F:.f=.o) @LIBOBJS@ @ALLOCA@
 HEADERS = \
-	RBufferUtils.h Rstrptime.h \
+	RBufferUtils.h Rcomplex.h Rstrptime.h \
 	arithmetic.h \
 	basedecl.h \
 	contour-common.h \
 	datetime.h \
+	duplicate.h \
 	gzio.h \
 	qsort-body.c \
 	rlocale_data.h \
+	split-incl.c \
 	unzip.h \
 	valid_utf8.h \
-	xspline.c
+	xspline.c \
+	g_cntrlify.h g_control.h g_extern.h g_her_metr.h g_jis.h
+
 
 distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
 DISTFILES = Makefile.in Makefile.win \
@@ -68,34 +73,26 @@ DISTFILES = Makefile.in Makefile.win \
 	$(SOURCES_F) \
 	gram.y
 
-ZLIB_CPPFLAGS = @BUILD_ZLIB_TRUE@ -I$(top_srcdir)/src/extra/zlib
-BZLIB_CPPFLAGS = @BUILD_BZLIB_TRUE@ -I$(top_srcdir)/src/extra/bzip2
-PCRE_CPPFLAGS = @BUILD_PCRE_TRUE@ -I$(top_srcdir)/src/extra/pcre
 TRE_CPPFLAGS = @BUILD_TRE_TRUE@ -I$(top_srcdir)/src/extra
 XDR_CPPFLAGS = @BUILD_XDR_TRUE@ -I$(top_srcdir)/src/extra/xdr
 @BUILD_XDR_FALSE at XDR_CPPFLAGS = @TIRPC_CPPFLAGS@
-XZ_CPPFLAGS = @BUILD_XZ_TRUE@  -I$(top_srcdir)/src/extra/xz/api
 
-ALL_CPPFLAGS = $(ZLIB_CPPFLAGS) $(BZLIB_CPPFLAGS) $(PCRE_CPPFLAGS) \
-  $(TRE_CPPFLAGS) $(XDR_CPPFLAGS) $(XZ_CPPFLAGS) $(R_XTRA_CPPFLAGS) $(CPPFLAGS) $(DEFS)
+## platform.c needs $(CURL_CPPFLAGS).
+ALL_CPPFLAGS = $(TRE_CPPFLAGS) $(XDR_CPPFLAGS) $(R_XTRA_CPPFLAGS) \
+  $(CURL_CPPFLAGS) $(CPPFLAGS) -I$(top_srcdir)/src/nmath $(DEFS)
 @WANT_R_SHLIB_TRUE at ALL_CFLAGS = $(ALL_CFLAGS_LO)
 @WANT_R_SHLIB_TRUE at ALL_FFLAGS = $(ALL_FFLAGS_LO)
 
 
-## use an explicit library: there might be an unsatisfactory -lz around
-R_ZLIBS = @BUILD_ZLIB_TRUE@ ../extra/zlib/libz.a
-R_BZLIBS = @BUILD_BZLIB_TRUE@ ../extra/bzip2/libbz2.a
-R_PCRE = @BUILD_PCRE_TRUE@ ../extra/pcre/libpcre.a
+## use an explicit library: there might be an unsatisfactory -lintl around
 R_TRE = @BUILD_TRE_TRUE@ ../extra/tre/libtre.a
 R_XDR = @BUILD_XDR_TRUE@ ../extra/xdr/libxdr.a
-R_XZ = @BUILD_XZ_TRUE@  ../extra/xz/liblzma.a
 R_LIBINTL = @BUILD_LIBINTL_TRUE@ ../extra/intl/libintl.a
 R_TZONE = @BUILD_TZONE_TRUE@ ../extra/tzone/libtz.a
 
 MAIN_LIBS = ../unix/libunix.a ../appl/libappl.a ../nmath/libnmath.a
 MAIN_OBJS = `ls ../unix/*.o ../appl/*.o ../nmath/*.o`
-EXTRA_STATIC_LIBS = \
-  $(R_ZLIBS) $(R_BZLIBS) $(R_PCRE) $(R_TRE) $(R_XDR) $(R_XZ) $(R_LIBINTL) $(R_TZONE)
+EXTRA_STATIC_LIBS = $(R_TRE) $(R_XDR) $(R_LIBINTL) $(R_TZONE)
 STATIC_LIBS = $(MAIN_LIBS) $(EXTRA_STATIC_LIBS)
 
 EXTRA_LIBS = $(BLAS_LIBS) $(FLIBS) $(R_XTRA_LIBS) @LIBINTL@ $(READLINE_LIBS) $(LIBS)
@@ -107,12 +104,12 @@ R_bin_OBJECTS = Rmain.o @WANT_R_SHLIB_FALSE@$(OBJECTS)
 @WANT_R_SHLIB_TRUE at R_bin_LDADD = -lR @BLAS_SHLIB_TRUE at -lRblas
 @BUILD_LTO_FALSE at R_bin_DEPENDENCIES =@WANT_R_SHLIB_FALSE@ libR.a @USE_EXPORTFILES_TRUE@ $(top_builddir)/etc/R.exp
 
-libR_la = libR$(DYLIB_EXT)
+libR_la = libR$(R_DYLIB_EXT)
 libR_la_OBJECTS = $(OBJECTS)
 libR_la_LIBADD =  $(MAIN_OBJS) $(EXTRA_STATIC_LIBS) $(EXTRA_LIBS) @WANT_R_SHLIB_TRUE@ @USE_EXPORTFILES_TRUE@ -Wl,-bE:$(top_builddir)/etc/R.exp
 libR_la_DEPENDENCIES = $(STATIC_LIBS) $(R_TZONE) @WANT_R_SHLIB_TRUE@ @USE_EXPORTFILES_TRUE@ $(top_builddir)/etc/R.exp
 
-## The next is needed for OS X only at present
+## The next is needed for macOS only at present
 LIBR_LDFLAGS = @LIBR_LDFLAGS@
 
 
@@ -130,7 +127,7 @@ Makedeps: Makefile $(DEPENDS)
 	@touch $@
 
 ## This target has been changed to ensure that R.bin and libR get
-## installed in the build tree if necessary, even if the corresponding 
+## installed in the build tree if necessary, even if the corresponding
 ## objects are not re-made.
 ## Note that dependencies in the test Makefiles used to depend on these objects,
 ## so copy-if-change is used.
@@ -149,9 +146,9 @@ $(R_binary): $(R_bin_OBJECTS) $(R_bin_DEPENDENCIES)
 
 libR.a: $(OBJECTS) $(STATIC_LIBS)
 	- at mkdir libs
-	@(cd libs; for l in $(STATIC_LIBS); do $(AR) x ../$$l; done)
+	@(cd libs; for l in $(STATIC_LIBS); do $(AR) -x ../$$l; done)
 	@rm -rf $@
-	$(AR) cr $@ $(OBJECTS) libs/*o
+	$(AR) -cr $@ $(OBJECTS) libs/*o
 	$(RANLIB) $@
 	@rm -rf libs
 
@@ -169,7 +166,7 @@ $(MAIN_LIBS):
 	(cd $(@D); $(MAKE) $(@F))
 
 ../extra/bzip2/libbz2.a ../extra/pcre/libpcre.a ../extra/pcre/libtre.a\
-  ../extra/xdr/libxdr.a ../extra/zlib/libz.a ../extra/xv/liblzma.a \
+  ../extra/xdr/libxdr.a ../extra/zlib/libz.a ../extra/xz/liblzma.a \
   ../extra/intl/libintl.a:
 	(cd $(@D); $(MAKE))
 
@@ -189,7 +186,7 @@ YFLAGS=-l
 $(srcdir)/gram.c: @MAINTAINER_MODE_TRUE@ $(srcdir)/gram.y
 	@$(ECHO) "re-making gram.c"
 	$(YACC) $(YFLAGS) $(srcdir)/gram.y
-	$(SHELL) $(top_srcdir)/tools/move-if-change y.tab.c $(srcdir)/gram.c	
+	$(SHELL) $(top_srcdir)/tools/move-if-change y.tab.c $(srcdir)/gram.c
 
 install: installdirs
 	@$(MAKE) install-bin
@@ -220,14 +217,14 @@ install-strip-static: installdirs
 	fi
 uninstall:
 	@rm -f "$(DESTDIR)$(Rexecbindir)/exec/$(R_ARCH)/R" "$(DESTDIR)$(Rexecbindir)/R.bin"
-	@rm -f "$(DESTDIR)$(Rexeclibdir)/libR$(DYLIB_EXT)"
+	@rm -f "$(DESTDIR)$(Rexeclibdir)/libR$(R_DYLIB_EXT)"
 	@rm -f "$(DESTDIR)$(Rexeclibdir)/libR.a"
 
 mostlyclean: clean
 clean:
 	@-rm -f $(top_builddir)/etc/R.exp
 	@-rm -rf .libs _libs
-	@-rm -f *core Makedeps *.d *.o *.lo *.la *$(DYLIB_EXT) \
+	@-rm -f *core Makedeps *.d *.o *.lo *.la *$(R_DYLIB_EXT) \
 	  $(R_binary) libR.a
 distclean: clean
 	@-rm -f Makefile
diff --git a/src/main/Makefile.win b/src/main/Makefile.win
index bfb17cf..6d2e990 100644
--- a/src/main/Makefile.win
+++ b/src/main/Makefile.win
@@ -6,9 +6,9 @@ include ../gnuwin32/MkRules
 all: makeMakedeps libmain.a
 
 ## there are headers and include files in this directory
-CPPFLAGS=-I. -I../include -DHAVE_CONFIG_H -DR_DLL_BUILD $(arch_DEFS)
+CPPFLAGS = -I. -I../include -DHAVE_CONFIG_H -DR_DLL_BUILD $(arch_DEFS)
 
-CSOURCES=\
+CSOURCES = \
 	CommandLineArgs.c \
 	Rdynload.c Renviron.c RNG.c \
 	agrep.c apply.c arithmetic.c array.c attrib.c \
@@ -26,15 +26,17 @@ CSOURCES=\
 	objects.c options.c \
 	paste.c platform.c plot.c plot3d.c plotmath.c \
 	print.c printarray.c printvector.c printutils.c qsort.c \
-	random.c raw.c registration.c relop.c rlocale.c \
+	radixsort.c random.c raw.c registration.c relop.c rlocale.c \
 	saveload.c scan.c seq.c serialize.c sort.c source.c split.c \
 	sprintf.c startup.c subassign.c subscript.c subset.c summary.c sysutils.c \
 	times.c \
 	unique.c util.c \
-	version.c vfonts.c
+	version.c \
+	g_alab_her.c g_cntrlify.c g_fontdb.c g_her_glyph.c
 
-FSOURCES=xxxpr.f
-OBJS=$(CSOURCES:.c=.o) $(FSOURCES:.f=.o)
+
+FSOURCES = xxxpr.f
+OBJS = $(CSOURCES:.c=.o) $(FSOURCES:.f=.o)
 
 ifdef RUN_BISON
 gram.c: gram.y
@@ -43,32 +45,44 @@ gram.c: gram.y
 	$(RM) gram.tab.c
 endif
 
-platform-CPPFLAGS=-I../gnuwin32 -I../extra -DPLATFORM_PKGTYPE='"win.binary"'
+platform-CPPFLAGS = -I../gnuwin32 -I../extra -DPLATFORM_PKGTYPE='"win.binary"'
 
-agrep-CPPFLAGS=-I../extra
+RNG-CPPFLAGS = -I../nmath
+agrep-CPPFLAGS = -I../extra
 # array-CPPFLAGS=$(OPENMP) # too slow to be useful.
-builtin-CPPFLAGS=-I../gnuwin32
-connections-CPPFLAGS=-I../extra/zlib -I../extra/bzip2
-connections-CPPFLAGS+=-DLZMA_API_STATIC -I../extra/xz/api
-dcf-CPPFLAGS=-I../extra
-dounzip-CPPFLAGS=-I../extra/zlib -I../extra/bzip2
-edit-CPPFLAGS=-I../gnuwin32
-grep-CPPFLAGS=-I../extra -I../extra/pcre -I../gnuwin32 -DPCRE_STATIC
-memory-CPPFLAGS=$(malloc-DEFS)
-printutils-CPPFLAGS=-I../gnuwin32
-saveload-CPPFLAGS=-I../extra/xdr
-serialize-CPPFLAGS=-I../extra/xdr
-sysutils-CPPFLAGS=-I../gnuwin32
-util-CPPFLAGS=-DLZMA_API_STATIC -I../extra/xz/api
+builtin-CPPFLAGS = -I../gnuwin32
+
+dcf-CPPFLAGS = -I../extra
+## gcc warns incorrectly about %a
+deparse-CFLAGS = -Wno-format
+edit-CPPFLAGS = -I../gnuwin32
+memory-CPPFLAGS = $(malloc-DEFS)
+printutils-CPPFLAGS = -I../gnuwin32
+saveload-CPPFLAGS = -I../extra/xdr
+serialize-CPPFLAGS = -I../extra/xdr
+sysutils-CPPFLAGS = -I../gnuwin32
+
+connections-CPPFLAGS = -DLZMA_API_STATIC -I"$(EXT_LIBS)"/include
+dounzip-CPPFLAGS = -I$(EXT_LIBS)/include
+grep-CPPFLAGS = -DPCRE_STATIC -I../extra -I../gnuwin32 -I"$(EXT_LIBS)"/include
+platform-CPPFLAGS += -DPCRE_STATIC -DLZMA_API_STATIC -I"$(EXT_LIBS)"/include
+util-CPPFLAGS = -DLZMA_API_STATIC -I"$(EXT_LIBS)"/include
 
 ifdef USE_ICU
-util-CPPFLAGS+=-DUSE_ICU -I"$(ICU_PATH)"/include
+platform-CPPFLAGS += -DUSE_ICU -I"$(ICU_PATH)"/include
+util-CPPFLAGS += -DUSE_ICU -I"$(ICU_PATH)"/include
 endif
 
+ifdef USE_LIBCURL
+connections-CPPFLAGS += -DHAVE_CURL_CURL_H -DHAVE_LIBCURL
+platform-CPPFLAGS += -DHAVE_CURL_CURL_H -DHAVE_LIBCURL
+endif
+
+
 libmain.a: $(OBJS)
 
 # Dependencies
-DEPS=$(CSOURCES:.c=.d)
+DEPS = $(CSOURCES:.c=.d)
 
 makeMakedeps: $(DEPS)
 	@$(RM) Makedeps
diff --git a/src/main/RBufferUtils.h b/src/main/RBufferUtils.h
index e1ce073..a29b622 100644
--- a/src/main/RBufferUtils.h
+++ b/src/main/RBufferUtils.h
@@ -14,7 +14,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  */
 
 #ifndef R_BUFFER_UTILS
diff --git a/src/main/RNG.c b/src/main/RNG.c
index 51580a1..0ee4beb 100644
--- a/src/main/RNG.c
+++ b/src/main/RNG.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--2013  The R Core Team
+ *  Copyright (C) 1997--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
@@ -15,7 +15,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  */
 
 
@@ -42,9 +42,10 @@ UnifInitFun User_unif_init = NULL; /* some picky compilers */
 
 DL_FUNC  User_norm_fun = NULL; /* also in ../nmath/snorm.c */
 
-
+#include "nmath2.h"
 static RNGtype RNG_kind = RNG_DEFAULT;
-extern N01type N01_kind; /* from ../nmath/snorm.c */
+//extern N01type N01_kind; /* from ../nmath/snorm.c */
+//extern double BM_norm_keep; /* ../nmath/snorm.c */
 
 /* typedef unsigned int Int32; in Random.h */
 
@@ -261,8 +262,6 @@ static void FixupSeeds(RNGtype RNG_kind, int initial)
     }
 }
 
-extern double BM_norm_keep; /* ../nmath/snorm.c */
-
 static void RNG_Init(RNGtype kind, Int32 seed)
 {
     int j;
@@ -332,15 +331,13 @@ static SEXP GetSeedsFromVar(void)
     return seeds;
 }
 
-unsigned int TimeToSeed(void); // times.c
-
 static void Randomize(RNGtype kind)
 {
 /* Only called by  GetRNGstate() when there is no .Random.seed */
     RNG_Init(kind, TimeToSeed());
 }
 
-static void GetRNGkind(SEXP seeds)
+static Rboolean GetRNGkind(SEXP seeds)
 {
     /* Load RNG_kind, N01_kind from .Random.seed if present */
     int tmp, *is;
@@ -348,7 +345,7 @@ static void GetRNGkind(SEXP seeds)
 
     if (isNull(seeds))
 	seeds = GetSeedsFromVar();
-    if (seeds == R_UnboundValue) return;
+    if (seeds == R_UnboundValue) return TRUE;
     if (!isInteger(seeds)) {
 	if (seeds == R_MissingArg) /* How can this happen? */
 	    error(_("'.Random.seed' is a missing argument with no default"));
@@ -389,11 +386,12 @@ static void GetRNGkind(SEXP seeds)
 	goto invalid;
     }
     RNG_kind = newRNG; N01_kind = newN01;
-    return;
+    return FALSE;
 invalid:
     RNG_kind = RNG_DEFAULT; N01_kind = N01_DEFAULT;
     Randomize(RNG_kind);
-    return;
+    PutRNGstate(); // write out to .Random.seed
+    return TRUE;
 }
 
 
@@ -403,12 +401,12 @@ void GetRNGstate()
     int len_seed;
     SEXP seeds;
 
-    /* look only in the workspace */
     seeds = GetSeedsFromVar();
     if (seeds == R_UnboundValue) {
 	Randomize(RNG_kind);
     } else {
-	GetRNGkind(seeds);
+	/* this might re-set the generator */
+	if(GetRNGkind(seeds)) return;
 	len_seed = RNG_Table[RNG_kind].n_seed;
 	/* Not sure whether this test is needed: wrong for USER_UNIF */
 	if(LENGTH(seeds) > 1 && LENGTH(seeds) < len_seed + 1)
@@ -536,7 +534,7 @@ SEXP attribute_hidden do_setseed (SEXP call, SEXP op, SEXP args, SEXP env)
     } else seed = TimeToSeed();
     skind = CADR(args);
     nkind = CADDR(args);
-    GetRNGkind(R_NilValue); /* pull RNG_kind, N01_kind from 
+    GetRNGkind(R_NilValue); /* pull RNG_kind, N01_kind from
 			       .Random.seed if present */
     if (!isNull(skind)) RNGkind((RNGtype) asInteger(skind));
     if (!isNull(nkind)) Norm_kind((N01type) asInteger(nkind));
@@ -674,7 +672,10 @@ static double MT_genrand(void)
 */
 
 
+/* This define may give a warning in clang, but is needed to comply
+   with the prohibition on changing the code. */
 #define long Int32
+
 #define ran_arr_buf       R_KT_ran_arr_buf
 #define ran_arr_cycle     R_KT_ran_arr_cycle
 #define ran_arr_ptr       R_KT_ran_arr_ptr
@@ -767,13 +768,41 @@ static Int32 KT_next(void)
 static void RNG_Init_R_KT(Int32 seed)
 {
     SEXP fun, sseed, call, ans;
-    fun = findVar1(install(".TAOCP1997init"), R_BaseEnv, CLOSXP, FALSE);
+    PROTECT(fun = findVar1(install(".TAOCP1997init"), R_BaseEnv, CLOSXP, FALSE));
     if(fun == R_UnboundValue)
 	error("function '.TAOCP1997init' is missing");
     PROTECT(sseed = ScalarInteger((int)(seed % 1073741821)));
     PROTECT(call = lang2(fun, sseed));
     ans = eval(call, R_GlobalEnv);
     memcpy(dummy, INTEGER(ans), 100*sizeof(int));
-    UNPROTECT(2);
+    UNPROTECT(3);
     KT_pos = 100;
 }
+
+/* Our PRNGs have at most 32 bit of precision. All generators except
+   Knuth-TAOCP, Knuth-TAOCP-2002, and possibly the user-supplied ones
+   have 31 or 32 bits bits of precision; the others are assumed to
+   have at least at least 25. */
+static R_INLINE double ru()
+{
+    double U = 33554432.0;
+    return (floor(U*unif_rand()) + unif_rand())/U;
+}
+
+double R_unif_index(double dn)
+{
+    double cut = INT_MAX;
+
+    switch(RNG_kind) {
+    case KNUTH_TAOCP:
+    case USER_UNIF:
+    case KNUTH_TAOCP2:
+	cut = 33554431.0; /* 2^25 - 1 */
+ 	break;
+    default:
+ 	break;
+   }
+
+    double u = dn > cut ? ru() : unif_rand();
+    return floor(dn * u);
+}
diff --git a/src/main/Rcomplex.h b/src/main/Rcomplex.h
new file mode 100644
index 0000000..6e71c21
--- /dev/null
+++ b/src/main/Rcomplex.h
@@ -0,0 +1,61 @@
+/*
+ *  R : A Computer Language for Statistical Data Analysis
+ *  Copyright (C) 1995, 1996, 1997  Robert Gentleman and Ross Ihaka
+ *  Copyright (C) 2000-2017	    The R Core Team
+ *  Copyright (C) 2005		    The R Foundation
+ *
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, a copy is available at
+ *  https://www.R-project.org/Licenses/
+ */
+
+#ifndef R_RCOMPLEX_H
+#define R_RCOMPLEX_H
+
+/* GCC has problems with header files on e.g. Solaris.
+   That OS defines the imaginary type, but GCC does not.
+   Probably needed elsewhere, e.g. AIX, HP-UX (PR#15083)
+   And use on Win32/64 suppresses warnings.
+   The warning is also seen on macOS 10.5, but not later.
+*/
+#if defined(__GNUC__) && (defined(__sun__) || defined(__hpux__) || defined(Win32))
+# undef  I
+# define I (__extension__ 1.0iF)
+#endif
+
+/*
+   Note: this could use the C11 CMPLX() macro.
+   As could mycpow, z_tan and some of the substitutes.
+ */
+static R_INLINE double complex toC99(Rcomplex *x)
+{
+#if __GNUC__
+    double complex ans = (double complex) 0; /* -Wall */
+    __real__ ans = x->r;
+    __imag__ ans = x->i;
+    return ans;
+#else
+    return x->r + x->i * I;
+#endif
+}
+#define C99_COMPLEX2(x, i) toC99(COMPLEX(x) + (i))
+
+static R_INLINE void
+SET_C99_COMPLEX(Rcomplex *x, R_xlen_t i, double complex value)
+{
+    Rcomplex *ans = x+i;
+    ans->r = creal(value);
+    ans->i = cimag(value);
+}
+
+#endif /* R_RCOMPLEX_H */
diff --git a/src/main/Rdynload.c b/src/main/Rdynload.c
index 7fc2790..a50d185 100644
--- a/src/main/Rdynload.c
+++ b/src/main/Rdynload.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-2013 The R Core Team
+ *  Copyright (C) 1997-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
@@ -15,7 +15,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  */
 
 
@@ -128,13 +128,14 @@ R_CPFun CPFun[MAX_CACHE];
 int nCPFun = 0;
 #endif
 
-#define MAX_NUM_DLLS	100
+static int MaxNumDLLs = 0; /* initialized in initLoadedDLL */
 
 static int CountDLL = 0;
 
 #include <R_ext/Rdynload.h>
 
-static DllInfo LoadedDLL[MAX_NUM_DLLS];
+/* Allocated in initLoadedDLL at R session start. Never free'd */
+static DllInfo* LoadedDLL = NULL;
 
 static int addDLL(char *dpath, char *name, HINSTANCE handle);
 static SEXP Rf_MakeDLLInfo(DllInfo *info);
@@ -149,19 +150,69 @@ attribute_hidden OSDynSymbol Rf_osDynSymbol;
 attribute_hidden OSDynSymbol *R_osDynSymbol = &Rf_osDynSymbol;
 
 void R_init_base(DllInfo *); /* In Registration.c */
-DL_FUNC R_dlsym(DllInfo *dll, char const *name,
-		R_RegisteredNativeSymbol *symbol);
+
+static void initLoadedDLL();
 
 void attribute_hidden
 InitDynload()
 {
-    DllInfo *dll;
+    initLoadedDLL();
     int which = addDLL(strdup("base"), "base", NULL);
-    dll = &LoadedDLL[which];
+    DllInfo *dll = &LoadedDLL[which];
     R_init_base(dll);
     InitFunctionHashing();
 }
 
+/* Allocate LoadedDLL. Errors are reported via R_Suicide, because this is
+   called too early during startup to use error(.) */
+static void initLoadedDLL()
+{
+    if (CountDLL != 0 || LoadedDLL != NULL)
+	R_Suicide("DLL table corruption detected"); /* not translated */
+
+    /* Note that it is likely that dlopen will use up at least one file
+       descriptor for each DLL loaded (it may load further dynamically
+       linked libraries), so we do not want to get close to the fd limit
+       (which may be as low as 256). By default, the maximum number of DLLs
+       that can be loaded is 100. When the fd limit is known, we allow
+       increasing the maximum number of DLLs via environment variable up to
+       60% of the limit on open files, but to no more than 1000.
+    */
+    int maxlimit;
+    int fdlimit = R_GetFDLimit();
+    if (fdlimit > 0) { /* fd limit known */
+	maxlimit = (int) (0.6 * fdlimit);
+	if (maxlimit > 1000) maxlimit = 1000;
+	if (maxlimit < 100)
+	    R_Suicide(_("the limit on the number of open files is too low"));
+    } else
+	maxlimit = 100;
+
+    char *req = getenv("R_MAX_NUM_DLLS");
+    if (req != NULL) {
+	int reqlimit = atoi(req);
+	if (reqlimit < 100)
+	    R_Suicide(_("R_MAX_NUM_DLLS must be at least 100"));
+	if (reqlimit > maxlimit) {
+	    if (maxlimit == 1000)
+		R_Suicide(_("MAX_NUM_DLLS cannot be bigger than 1000"));
+	    
+	    char msg[128];
+	    snprintf(msg, 128,
+	      _("MAX_NUM_DLLS bigger than %d may exhaust open files limit"),
+	      maxlimit);
+	    R_Suicide(msg);
+	}
+	MaxNumDLLs = reqlimit;
+    } else
+	MaxNumDLLs = 100;
+
+    /* memory is set to zero */
+    LoadedDLL = (DllInfo *) calloc(MaxNumDLLs, sizeof(DllInfo));
+    if (LoadedDLL == NULL)
+	R_Suicide(_("could not allocate space for DLL table"));
+}
+
 /* returns DllInfo used by the embedding application.
    the underlying "(embedding)" entry is created if not present */
 DllInfo *R_getEmbeddingDllInfo()
@@ -212,7 +263,7 @@ R_addExternalRoutine(DllInfo *info,
 /*
  Returns a reference to the DllInfo object associated with the shared object
  with the path name `path'. This ensures uniqueness rather than having the
- undesirable situation of two object with the same name but in different
+ undesirable situation of two objects with the same name but in different
  directories.
  This is available so that it can be called from arbitrary C routines
  that need to call R_registerRoutines(). The initialization routine
@@ -292,7 +343,7 @@ R_registerRoutines(DllInfo *info, const R_CMethodDef * const croutines,
 					  sizeof(Rf_DotExternalSymbol));
 	info->numExternalSymbols = num;
 
-	for(i = 0; i < num; i++) 
+	for(i = 0; i < num; i++)
 	    R_addExternalRoutine(info, externalRoutines+i,
 				 info->ExternalSymbols + i);
     }
@@ -315,19 +366,6 @@ R_setPrimitiveArgTypes(const R_FortranMethodDef * const croutine,
 }
 
 static void
-R_setArgStyles(const R_FortranMethodDef * const croutine,
-	       Rf_DotFortranSymbol *sym)
-{
-    sym->styles = (R_NativeArgStyle *)
-	malloc(sizeof(R_NativeArgStyle) * (size_t) croutine->numArgs);
-    if(!sym->styles)
-	error("allocation failure in R_setArgStyles");
-    if(sym->styles)
-	memcpy(sym->styles, croutine->styles,
-	       sizeof(R_NativeArgStyle) * (size_t) croutine->numArgs);
-}
-
-static void
 R_addFortranRoutine(DllInfo *info,
 		    const R_FortranMethodDef * const croutine,
 		    Rf_DotFortranSymbol *sym)
@@ -337,8 +375,6 @@ R_addFortranRoutine(DllInfo *info,
     sym->numArgs = croutine->numArgs > -1 ? croutine->numArgs : -1;
     if(croutine->types)
 	R_setPrimitiveArgTypes(croutine, sym);
-    if(croutine->styles)
-	R_setArgStyles(croutine, sym);
 }
 
 static void
@@ -351,8 +387,6 @@ R_addExternalRoutine(DllInfo *info,
     sym->numArgs = croutine->numArgs > -1 ? croutine->numArgs : -1;
 }
 
-
-
 static void
 R_addCRoutine(DllInfo *info, const R_CMethodDef * const croutine,
 	      Rf_DotCSymbol *sym)
@@ -362,9 +396,6 @@ R_addCRoutine(DllInfo *info, const R_CMethodDef * const croutine,
     sym->numArgs = croutine->numArgs > -1 ? croutine->numArgs : -1;
     if(croutine->types)
 	R_setPrimitiveArgTypes(croutine, sym);
-    if(croutine->styles)
-	R_setArgStyles(croutine, sym);
-
 }
 
 static void
@@ -529,7 +560,7 @@ static DllInfo* AddDLL(const char *path, int asLocal, int now,
     DllInfo *info = NULL;
 
     DeleteDLL(path);
-    if(CountDLL == MAX_NUM_DLLS) {
+    if(CountDLL == MaxNumDLLs) {
 	strcpy(DLLerror, _("`maximal number of DLLs reached..."));
 	return NULL;
     }
@@ -578,13 +609,6 @@ static DllInfo *R_RegisterDLL(HINSTANCE handle, const char *path)
     char *dpath,  DLLname[PATH_MAX], *p;
     DllInfo *info;
 
-    info = &LoadedDLL[CountDLL];
-    /* default is to use old-style dynamic lookup.  The object's
-       initialization routine can limit access by setting this to FALSE.
-    */
-    info->useDynamicLookup = TRUE;
-    info->forceSymbols = FALSE;
-
     dpath = (char *) malloc(strlen(path)+1);
     if(dpath == NULL) {
 	strcpy(DLLerror, _("could not allocate space for 'path'"));
@@ -609,7 +633,16 @@ static DllInfo *R_RegisterDLL(HINSTANCE handle, const char *path)
     if(p > DLLname && strcmp(p, SHLIB_EXT) == 0) *p = '\0';
 #endif
 
-    addDLL(dpath, DLLname, handle);
+    if (addDLL(dpath, DLLname, handle)) {
+	info = &LoadedDLL[CountDLL-1];
+	/* default is to use old-style dynamic lookup.  The object's
+	   initialization routine can limit access by setting this to FALSE.
+	*/
+	info->useDynamicLookup = TRUE;
+	info->forceSymbols = FALSE;
+	return info;
+    } else
+	return NULL;
 
     return(info);
 }
@@ -687,7 +720,7 @@ Rf_lookupRegisteredExternalSymbol(DllInfo *info, const char *name)
     return (Rf_DotExternalSymbol*) NULL;
 }
 
-static DL_FUNC 
+static DL_FUNC
 R_getDLLRegisteredSymbol(DllInfo *info, const char *name,
 			 R_RegisteredNativeSymbol *symbol)
 {
@@ -760,7 +793,7 @@ DL_FUNC attribute_hidden
 R_dlsym(DllInfo *info, char const *name,
 	R_RegisteredNativeSymbol *symbol)
 {
-    size_t len = strlen(name) + 4; 
+    size_t len = strlen(name) + 4;
     char buf[len]; /* up to 3 additional underscores */
     DL_FUNC f;
 
@@ -801,7 +834,7 @@ R_dlsym(DllInfo *info, char const *name,
 
 /* R_FindSymbol checks whether one of the objects that have been
    loaded contains the symbol name and returns a pointer to that
-   symbol upon success. 
+   symbol upon success.
 */
 
 DL_FUNC R_FindSymbol(char const *name, char const *pkg,
@@ -928,10 +961,10 @@ int R_cairoCdynload(int local, int now)
 
     if(!p) return 0;
 #ifdef R_ARCH
-    snprintf(dllpath, PATH_MAX, "%s/library/grDevices/libs/%s/%s%s", 
+    snprintf(dllpath, PATH_MAX, "%s/library/grDevices/libs/%s/%s%s",
 	     p, R_ARCH, module, SHLIB_EXT);
 #else
-    snprintf(dllpath, PATH_MAX, "%s/library/grDevices/libs/%s%s", 
+    snprintf(dllpath, PATH_MAX, "%s/library/grDevices/libs/%s%s",
 	     p, module, SHLIB_EXT);
 #endif
     res = AddDLL(dllpath, local, now, "");
@@ -976,8 +1009,10 @@ Rf_MakeRegisteredNativeSymbol(R_RegisteredNativeSymbol *symbol)
     R_RegisteredNativeSymbol *copy;
     copy = (R_RegisteredNativeSymbol *) malloc(1 * sizeof(R_RegisteredNativeSymbol));
     if(!copy) {
-	error(_("cannot allocate memory for registered native symbol (%d bytes)"),
-	      (int) sizeof(R_RegisteredNativeSymbol));
+	error(ngettext("cannot allocate memory for registered native symbol (%d byte)",
+		       "cannot allocate memory for registered native symbol (%d bytes)",
+		      (int) sizeof(R_RegisteredNativeSymbol)),
+		      (int) sizeof(R_RegisteredNativeSymbol));
     }
     *copy = *symbol;
 
@@ -1167,7 +1202,7 @@ createRSymbolObject(SEXP sname, DL_FUNC f, R_RegisteredNativeSymbol *symbol,
 
     PROTECT(klass = allocVector(STRSXP, (symbol->type != R_ANY_SYM ? 2 : 1)));
     numProtects++;
-    SET_STRING_ELT(klass, length(klass)-1, mkChar("NativeSymbolInfo"));
+    SET_STRING_ELT(klass, LENGTH(klass) - 1, mkChar("NativeSymbolInfo"));
 
     if(n > 3) {
 	/* Add the registration information:
@@ -1306,7 +1341,7 @@ do_getSymbolInfo(SEXP call, SEXP op, SEXP args, SEXP env)
     DL_FUNC f = NULL;
 
     checkArity(op, args);
-    SEXP sname = CAR(args), spackage = CADR(args), 
+    SEXP sname = CAR(args), spackage = CADR(args),
 	withRegistrationInfo = CADDR(args);
 
     name = translateChar(STRING_ELT(sname, 0));
@@ -1354,7 +1389,7 @@ do_getDllTable(SEXP call, SEXP op, SEXP args, SEXP env)
     PROTECT(nm = allocVector(STRSXP, CountDLL));
     setAttrib(ans, R_NamesSymbol, nm);
     for(int i = 0; i < CountDLL; i++)
-	SET_STRING_ELT(nm, i, 
+	SET_STRING_ELT(nm, i,
 		       STRING_ELT(VECTOR_ELT(VECTOR_ELT(ans, i), 0), 0));
     UNPROTECT(2);
     return ans;
@@ -1422,16 +1457,19 @@ static SEXP get_package_CEntry_table(const char *package)
 void R_RegisterCCallable(const char *package, const char *name, DL_FUNC fptr)
 {
     SEXP penv = get_package_CEntry_table(package);
+    PROTECT(penv);
     SEXP eptr = R_MakeExternalPtrFn(fptr, R_NilValue, R_NilValue);
     PROTECT(eptr);
     defineVar(install(name), eptr, penv);
-    UNPROTECT(1);
+    UNPROTECT(2);
 }
 
 DL_FUNC R_GetCCallable(const char *package, const char *name)
 {
     SEXP penv = get_package_CEntry_table(package);
+    PROTECT(penv);
     SEXP eptr = findVarInFrame(penv, install(name));
+    UNPROTECT(1);
     if (eptr == R_UnboundValue)
 	error(_("function '%s' not provided by package '%s'"), name, package);
     else if (TYPEOF(eptr) != EXTPTRSXP)
diff --git a/src/main/Renviron.c b/src/main/Renviron.c
index b28186b..c84b27c 100644
--- a/src/main/Renviron.c
+++ b/src/main/Renviron.c
@@ -1,6 +1,6 @@
 /*
  *   R : A Computer Language for Statistical Data Analysis
- *   Copyright (C) 1997-2012   The R Core Team
+ *   Copyright (C) 1997-2015   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
@@ -14,7 +14,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  */
 
 /* <UTF8> This does byte-level access, e.g. isspace, but is OK. */
@@ -307,11 +307,11 @@ SEXP attribute_hidden do_readEnviron(SEXP call, SEXP op, SEXP args, SEXP env)
 
     checkArity(op, args);
     SEXP x = CAR(args);
-    if (length(x) != 1 || !isString(x))
-	errorcall(call, _("argument 'x' must be a character string"));
+    if (!isString(x) || LENGTH(x) != 1)
+	error(_("argument '%s' must be a character string"), "x");
     const char *fn = R_ExpandFileName(translateChar(STRING_ELT(x, 0)));
     int res = process_Renviron(fn);
     if (!res)
-	warningcall(call, _("file '%s' cannot be opened for reading"), fn);
+	warning(_("file '%s' cannot be opened for reading"), fn);
     return ScalarLogical(res != 0);
 }
diff --git a/src/main/Rmain.c b/src/main/Rmain.c
index 26ec25d..1fe8adc 100644
--- a/src/main/Rmain.c
+++ b/src/main/Rmain.c
@@ -15,16 +15,13 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  */
 
 int Rf_initialize_R(int ac, char **av); /* in ../unix/system.c */
 
 #include <Rinterface.h>
 
-
-extern int R_running_as_main_program;   /* in ../unix/system.c */
-
 int main(int ac, char **av)
 {
     R_running_as_main_program = 1;
diff --git a/src/main/Rstrptime.h b/src/main/Rstrptime.h
index ad64e4a..6a84a34 100644
--- a/src/main/Rstrptime.h
+++ b/src/main/Rstrptime.h
@@ -1,4 +1,4 @@
-/* For inclusion by datetime.c. 
+/* For inclusion by datetime.c.
 
    A modified version of code from the GNU C library with locale
    support removed and wchar support added.
@@ -21,7 +21,7 @@
 
    You should have received a copy of the GNU Library General Public
    License along with the GNU C Library; see the file COPYING.LIB.  If not,
-   a copy is available at http://www.r-project.org/licenses/
+   a copy is available at https://www.R-project.org/Licenses/
 */
 /* XXX This version of the implementation is not really complete.
    Some of the fields cannot add information alone.  But if seeing
@@ -91,29 +91,34 @@ static void get_locale_w_strings(void);
 
 /* This version: may overwrite these with versions for the locale,
  * hence the extra length of the fields.
- * Some OSes (e.g. glibc) have longer than 3-char abbreviations.
+ * The limits here are overestimates from known locales: rare locales
+ * have no abbreviations.
+ * glibc has 11-char am_pm, 10-char abday, 11-char abmon (Dhivehi).
+ * Gaelic has 12-char month names.
+ * Allow for UTF-8 expansion, so these are 4x the wchar limits.
  */
-static char weekday_name[][50] =
+#define DT_BUFSIZE 100
+static char weekday_name[][DT_BUFSIZE] =
 {
     "Sunday", "Monday", "Tuesday", "Wednesday",
     "Thursday", "Friday", "Saturday"
 };
-static char ab_weekday_name[][10] =
+static char ab_weekday_name[][DT_BUFSIZE] =
 {
     "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"
 };
-static char month_name[][50] =
+static char month_name[][DT_BUFSIZE] =
 {
     "January", "February", "March", "April", "May", "June",
     "July", "August", "September", "October", "November", "December"
 };
-static char ab_month_name[][10] =
+static char ab_month_name[][DT_BUFSIZE] =
 {
     "Jan", "Feb", "Mar", "Apr", "May", "Jun",
     "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"
 };
 
-static char am_pm[][10] = {"AM", "PM"};
+static char am_pm[][DT_BUFSIZE] = {"AM", "PM"};
 
 
 # define HERE_D_T_FMT "%a %b %e %H:%M:%S %Y"
@@ -174,27 +179,28 @@ day_of_the_year (stm *tm)
 #include <wchar.h>
 #include <wctype.h>
 
-static wchar_t w_weekday_name[][50] =
+#define DT_WBUFSIZE 25
+static wchar_t w_weekday_name[][DT_WBUFSIZE] =
 {
     L"Sunday", L"Monday", L"Tuesday", L"Wednesday",
     L"Thursday", L"Friday", L"Saturday"
 };
-static wchar_t w_ab_weekday_name[][10] =
+static wchar_t w_ab_weekday_name[][DT_WBUFSIZE] =
 {
     L"Sun", L"Mon", L"Tue", L"Wed", L"Thu", L"Fri", L"Sat"
 };
-static wchar_t w_month_name[][50] =
+static wchar_t w_month_name[][DT_WBUFSIZE] =
 {
     L"January", L"February", L"March", L"April", L"May", L"June",
     L"July", L"August", L"September", L"October", L"November", L"December"
 };
-static wchar_t w_ab_month_name[][10] =
+static wchar_t w_ab_month_name[][DT_WBUFSIZE] =
 {
     L"Jan", L"Feb", L"Mar", L"Apr", L"May", L"Jun",
     L"Jul", L"Aug", L"Sep", L"Oct", L"Nov", L"Dec"
 };
 
-static wchar_t w_am_pm[][10] = {L"AM", L"PM"};
+static wchar_t w_am_pm[][DT_WBUFSIZE] = {L"AM", L"PM"};
 
 /* Need case-insensitive version */
 static int Rwcsncasecmp(const wchar_t *cs1, const wchar_t *s2)
@@ -274,12 +280,12 @@ w_strptime_internal (wchar_t *rp, const wchar_t *fmt, stm *tm,
 	/* try full name first */
 	    for (cnt = 0; cnt < 7; ++cnt)
 		if (w_match_string (w_weekday_name[cnt], rp)) break;
-	    
+
 	    if (cnt == 7) {
 		for (cnt = 0; cnt < 7; ++cnt)
 		    if (w_match_string (w_ab_weekday_name[cnt], rp)) break;
 	    }
-		
+
 	    if (cnt == 7)
 		/* Does not match a weekday name.  */
 		return NULL;
@@ -507,7 +513,7 @@ w_strptime_internal (wchar_t *rp, const wchar_t *fmt, stm *tm,
 		    if (val % 100 >= 60) return NULL;
 		    val = (val / 100) * 100 + ((val % 100) * 50) / 30;
 		}
-		/* http://en.wikipedia.org/wiki/List_of_UTC_time_offsets */
+		/* https://en.wikipedia.org/wiki/List_of_UTC_time_offsets */
 		if (val > 1400) return NULL;
 		off = ((val * 3600) / 100);
 		if (neg) off = -off;
@@ -534,7 +540,7 @@ w_strptime_internal (wchar_t *rp, const wchar_t *fmt, stm *tm,
 	    case L'e':
 		/* Match day of month using alternate numeric symbols.  */
 		get_alt_number (1, 31, 2);
-	        tm->tm_mday = val;
+		tm->tm_mday = val;
 		have_mday = 1;
 		want_xday = 1;
 		break;
@@ -542,27 +548,27 @@ w_strptime_internal (wchar_t *rp, const wchar_t *fmt, stm *tm,
 		/* Match hour in 24-hour clock using alternate numeric
 		   symbols.  */
 		get_alt_number (0, 23, 2);
-	        tm->tm_hour = val;
+		tm->tm_hour = val;
 		have_I = 0;
 		break;
 	    case L'I':
 		/* Match hour in 12-hour clock using alternate numeric
 		   symbols.  */
 		get_alt_number (1, 12, 2);
-	        tm->tm_hour = val % 12;
+		tm->tm_hour = val % 12;
 		have_I = 1;
 		break;
 	    case L'm':
 		/* Match month using alternate numeric symbols.  */
 		get_alt_number (1, 12, 2);
-	        tm->tm_mon = val - 1;
+		tm->tm_mon = val - 1;
 		have_mon = 1;
 		want_xday = 1;
 		break;
 	    case L'M':
 		/* Match minutes using alternate numeric symbols.  */
 		get_alt_number (0, 59, 2);
-	        tm->tm_min = val;
+		tm->tm_min = val;
 		break;
 	    case L'S':
 		/* Match seconds using alternate numeric symbols.
@@ -602,8 +608,8 @@ w_strptime_internal (wchar_t *rp, const wchar_t *fmt, stm *tm,
 	    case L'y':
 		/* Match year within century using alternate numeric symbols.  */
 		get_alt_number (0, 99, 2);
-	        int ival = val;
-	        tm->tm_year = ival >= 69 ? ival : ival + 100;
+		int ival = val;
+		tm->tm_year = ival >= 69 ? ival : ival + 100;
 		want_xday = 1;
 		break;
 	    default:
@@ -1157,7 +1163,7 @@ strptime_internal (const char *rp, const char *fmt, stm *tm,
 */
 
 attribute_hidden
-void dt_invalidate_locale() // used in plaform.c
+void dt_invalidate_locale() // used in platform.c
 {
     locale_strings_set = 0;
     locale_w_strings_set = 0;
@@ -1168,30 +1174,38 @@ static void get_locale_strings(void)
 {
     int i;
     struct tm tm;
-    char buff[4];
+    char buff[DT_BUFSIZE];
 
     tm.tm_sec = tm.tm_min = tm.tm_hour = tm.tm_mday = tm.tm_mon
 	= tm.tm_isdst = 0;
     tm.tm_year = 30;
     for(i = 0; i < 12; i++) {
 	tm.tm_mon = i;
-	strftime(ab_month_name[i], 10, "%b", &tm);
-	strftime(month_name[i], 50, "%B", &tm);
+	// What happens if this does not fit is not well-defined,
+	// so we null-terminate as a precaution.
+	strftime(ab_month_name[i], DT_BUFSIZE, "%b", &tm);
+	ab_month_name[i][DT_BUFSIZE-1] = '\0';
+	strftime(month_name[i], DT_BUFSIZE, "%B", &tm);
+	month_name[i][DT_BUFSIZE-1] = '\0';
     }
     tm.tm_mon = 0;
     for(i = 0; i < 7; i++) {
-	tm.tm_mday = tm.tm_yday = i+1; /* 2000-1-2 was a Sunday */
+	tm.tm_mday = tm.tm_yday = i+1; /* 2000-01-02 was a Sunday */
 	tm.tm_wday = i;
-	strftime(ab_weekday_name[i], 10, "%a", &tm);
-	strftime(weekday_name[i], 50, "%A", &tm);
+	strftime(ab_weekday_name[i], DT_BUFSIZE, "%a", &tm);
+	ab_weekday_name[i][DT_BUFSIZE-1] = '\0';
+	strftime(weekday_name[i], DT_BUFSIZE, "%A", &tm);
+	weekday_name[i][DT_BUFSIZE-1] = '\0';
     }
     tm.tm_hour = 1;
     /* in locales where these are unused, they may be empty:
        better not to reset them then */
-    strftime(buff, 10, "%p", &tm);
+    strftime(buff, DT_BUFSIZE, "%p", &tm);
+    buff[DT_BUFSIZE-1] = '\0';
     if(strlen(buff)) strcpy(am_pm[0], buff);
     tm.tm_hour = 13;
-    strftime(buff, 10, "%p", &tm);
+    strftime(buff, DT_BUFSIZE, "%p", &tm);
+    buff[DT_BUFSIZE-1] = '\0';
     if(strlen(buff)) strcpy(am_pm[1], buff);
     locale_strings_set = 1;
 }
@@ -1201,30 +1215,36 @@ static void get_locale_w_strings(void)
 {
     int i;
     struct tm tm;
-    wchar_t buff[4];
+    wchar_t buff[DT_WBUFSIZE];
 
     tm.tm_sec = tm.tm_min = tm.tm_hour = tm.tm_mday = tm.tm_mon
 	= tm.tm_isdst = 0;
     tm.tm_year = 30;
     for(i = 0; i < 12; i++) {
 	tm.tm_mon = i;
-	wcsftime(w_ab_month_name[i], 10, L"%b", &tm);
-	wcsftime(w_month_name[i], 50, L"%B", &tm);
+	wcsftime(w_ab_month_name[i], DT_WBUFSIZE, L"%b", &tm);
+	w_ab_month_name[i][DT_WBUFSIZE - 1] = L'\0';
+	wcsftime(w_month_name[i], DT_WBUFSIZE, L"%B", &tm);
+	w_month_name[i][DT_WBUFSIZE - 1] = L'\0';
     }
     tm.tm_mon = 0;
     for(i = 0; i < 7; i++) {
-	tm.tm_mday = tm.tm_yday = i+1; /* 2000-1-2 was a Sunday */
+	tm.tm_mday = tm.tm_yday = i+1; /* 2000-01-02 was a Sunday */
 	tm.tm_wday = i;
-	wcsftime(w_ab_weekday_name[i], 10, L"%a", &tm);
-	wcsftime(w_weekday_name[i], 50, L"%A", &tm);
+	wcsftime(w_ab_weekday_name[i], DT_WBUFSIZE, L"%a", &tm);
+	w_ab_weekday_name[i][DT_WBUFSIZE - 1] = L'\0';
+	wcsftime(w_weekday_name[i], DT_WBUFSIZE, L"%A", &tm);
+	w_weekday_name[i][DT_WBUFSIZE - 1] = L'\0';
     }
     tm.tm_hour = 1;
     /* in locales where these are unused, they may be empty:
        better not to reset them then */
-    wcsftime(buff, 10, L"%p", &tm);
+    wcsftime(buff, DT_WBUFSIZE, L"%p", &tm);
+    buff[DT_WBUFSIZE - 1] = L'\0';
     if(wcslen(buff)) wcscpy(w_am_pm[0], buff);
     tm.tm_hour = 13;
-    wcsftime(buff, 10, L"%p", &tm);
+    wcsftime(buff, DT_WBUFSIZE, L"%p", &tm);
+    buff[DT_WBUFSIZE - 1] = L'\0';
     if(wcslen(buff)) wcscpy(w_am_pm[1], buff);
     locale_w_strings_set = 1;
 }
@@ -1233,7 +1253,7 @@ static void get_locale_w_strings(void)
 
 /* We only care if the result is null or not */
 static void *
-R_strptime (const char *buf, const char *format, stm *tm, 
+R_strptime (const char *buf, const char *format, stm *tm,
 	    double *psecs, int *poffset)
 {
 #if defined(HAVE_WCSTOD)
diff --git a/src/main/agrep.c b/src/main/agrep.c
index 722bbbe..bc2c4ad 100644
--- a/src/main/agrep.c
+++ b/src/main/agrep.c
@@ -1,6 +1,6 @@
 /*
  *  R : A Computer Language for Statistical Data Analysis
- *  Copyright (C) 2002--2012  The R Core Team
+ *  Copyright (C) 2002--2015  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
@@ -14,12 +14,12 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  */
 
 /* This at times needed to be separate from grep.c, as TRE has a
    conflicting regcomp and the two headers cannot both be included in
-   one file 
+   one file
 */
 
 #ifdef HAVE_CONFIG_H
@@ -30,7 +30,7 @@
 #include <Internal.h>
 
 /* This is remapped */
-#undef pmatch 
+#undef pmatch
 
 /* interval at which to check interrupts */
 #define NINTERRUPT 1000000
@@ -127,11 +127,11 @@ SEXP attribute_hidden do_agrep(SEXP call, SEXP op, SEXP args, SEXP env)
 
     if(opt_fixed) cflags |= REG_LITERAL;
 
-    if(!isString(pat) || length(pat) < 1)
+    if(!isString(pat) || LENGTH(pat) < 1)
 	error(_("invalid '%s' argument"), "pattern");
-    if(length(pat) > 1)
+    if(LENGTH(pat) > 1)
 	warning(_("argument '%s' has length > 1 and only the first element will be used"), "pattern");
-    
+
     if(!isString(vec)) error(_("invalid '%s' argument"), "x");
 
     if(opt_icase) cflags |= REG_ICASE;
@@ -177,11 +177,12 @@ SEXP attribute_hidden do_agrep(SEXP call, SEXP op, SEXP args, SEXP env)
 	return ans;
     }
 
+    SEXP s_nchar = install("nchar");
     if(useBytes)
-	PROTECT(call = lang3(install("nchar"), pat,
+	PROTECT(call = lang3(s_nchar, pat,
 			     ScalarString(mkChar("bytes"))));
     else
-	PROTECT(call = lang3(install("nchar"), pat,
+	PROTECT(call = lang3(s_nchar, pat,
 			     ScalarString(mkChar("chars"))));
     patlen = asInteger(eval(call, env));
     UNPROTECT(1);
@@ -209,7 +210,7 @@ SEXP attribute_hidden do_agrep(SEXP call, SEXP op, SEXP args, SEXP env)
     tre_regaparams_default(&params);
     amatch_regaparams(&params, patlen,
 		      REAL(opt_bounds), INTEGER(opt_costs));
-    
+
     /* Matching. */
     n = LENGTH(vec);
     PROTECT(ind = allocVector(LGLSXP, n));
@@ -229,7 +230,7 @@ SEXP attribute_hidden do_agrep(SEXP call, SEXP op, SEXP args, SEXP env)
 			       &match, params, 0);
 	else if(useWC) {
 	    rc = tre_regawexec(&reg,
-			       wtransChar(STRING_ELT(vec, i)), 
+			       wtransChar(STRING_ELT(vec, i)),
 			       &match, params, 0);
 	    vmaxset(vmax);
 	} else {
@@ -319,7 +320,7 @@ adist_full(SEXP x, SEXP y, double *costs, Rboolean opt_counts)
     }
 
     for(i = 0; i < nx; i++) {
-	nxi = LENGTH(VECTOR_ELT(x, i));	
+	nxi = LENGTH(VECTOR_ELT(x, i));
 	xi = INTEGER(VECTOR_ELT(x, i));
 	if(nxi && (xi[0] == NA_INTEGER)) {
 	    for(j = 0; j < ny; j++) {
@@ -442,14 +443,14 @@ adist_full(SEXP x, SEXP y, double *costs, Rboolean opt_counts)
 	}
     }
 
-    x = getAttrib(x, R_NamesSymbol);
-    y = getAttrib(y, R_NamesSymbol);
+    PROTECT(x = getAttrib(x, R_NamesSymbol));
+    PROTECT(y = getAttrib(y, R_NamesSymbol));
     if(!isNull(x) || !isNull(y)) {
-	PROTECT(dimnames = allocVector(VECSXP, 2));	    
+	PROTECT(dimnames = allocVector(VECSXP, 2));
 	SET_VECTOR_ELT(dimnames, 0, x);
 	SET_VECTOR_ELT(dimnames, 1, y);
 	setAttrib(ans, R_DimNamesSymbol, dimnames);
-	UNPROTECT(1);
+	UNPROTECT(1); /* dimnames */
     }
 
     if(opt_counts) {
@@ -464,19 +465,19 @@ adist_full(SEXP x, SEXP y, double *costs, Rboolean opt_counts)
 	SET_VECTOR_ELT(dimnames, 2, names);
 	setAttrib(counts, R_DimNamesSymbol, dimnames);
 	setAttrib(ans, install("counts"), counts);
-	UNPROTECT(2);
+	UNPROTECT(2); /* names, dimnames */
 	if(!isNull(x) || !isNull(y)) {
-	    PROTECT(dimnames = allocVector(VECSXP, 2));	    
+	    PROTECT(dimnames = allocVector(VECSXP, 2));
 	    SET_VECTOR_ELT(dimnames, 0, x);
 	    SET_VECTOR_ELT(dimnames, 1, y);
 	    setAttrib(trafos, R_DimNamesSymbol, dimnames);
-	    UNPROTECT(1);
+	    UNPROTECT(1); /* dimnames */
 	}
 	setAttrib(ans, install("trafos"), trafos);
-	UNPROTECT(2);
+	UNPROTECT(2); /* trafos, counts */
     }
-		
-    UNPROTECT(1);
+
+    UNPROTECT(3); /* y, x, ans */
     return ans;
 }
 
@@ -507,7 +508,7 @@ SEXP attribute_hidden do_adist(SEXP call, SEXP op, SEXP args, SEXP env)
     y = CAR(args); args = CDR(args);
     opt_costs = CAR(args); args = CDR(args);
     opt_counts = asLogical(CAR(args)); args = CDR(args);
-    opt_fixed = asInteger(CAR(args)); args = CDR(args);    
+    opt_fixed = asInteger(CAR(args)); args = CDR(args);
     opt_partial = asInteger(CAR(args)); args = CDR(args);
     opt_icase = asLogical(CAR(args)); args = CDR(args);
     useBytes = asLogical(CAR(args));
@@ -535,7 +536,7 @@ SEXP attribute_hidden do_adist(SEXP call, SEXP op, SEXP args, SEXP env)
 
     nx = length(x);
     ny = length(y);
-    nxy = nx * ny;    
+    nxy = nx * ny;
 
     if(!useBytes) {
 	haveBytes = FALSE;
@@ -651,7 +652,7 @@ SEXP attribute_hidden do_adist(SEXP call, SEXP op, SEXP args, SEXP env)
 			rc = tre_regaexecb(&reg, CHAR(elt),
 					   &match, params, 0);
 		    else if(useWC) {
-			rc = tre_regawexec(&reg, wtransChar(elt), 
+			rc = tre_regawexec(&reg, wtransChar(elt),
 					   &match, params, 0);
 			vmaxset(vmax);
 		    } else {
@@ -692,14 +693,14 @@ SEXP attribute_hidden do_adist(SEXP call, SEXP op, SEXP args, SEXP env)
 	}
     }
 
-    x = getAttrib(x, R_NamesSymbol);
-    y = getAttrib(y, R_NamesSymbol);
+    PROTECT(x = getAttrib(x, R_NamesSymbol));
+    PROTECT(y = getAttrib(y, R_NamesSymbol));
     if(!isNull(x) || !isNull(y)) {
-	PROTECT(dimnames = allocVector(VECSXP, 2));	    
+	PROTECT(dimnames = allocVector(VECSXP, 2));
 	SET_VECTOR_ELT(dimnames, 0, x);
 	SET_VECTOR_ELT(dimnames, 1, y);
 	setAttrib(ans, R_DimNamesSymbol, dimnames);
-	UNPROTECT(1);
+	UNPROTECT(1); /* dimnames */
     }
     if(opt_counts) {
 	PROTECT(dimnames = allocVector(VECSXP, 3));
@@ -712,7 +713,7 @@ SEXP attribute_hidden do_adist(SEXP call, SEXP op, SEXP args, SEXP env)
 	SET_VECTOR_ELT(dimnames, 2, names);
 	setAttrib(counts, R_DimNamesSymbol, dimnames);
 	setAttrib(ans, install("counts"), counts);
-	UNPROTECT(2);
+	UNPROTECT(2); /* names, dimnames */
 	PROTECT(dimnames = allocVector(VECSXP, 3));
 	PROTECT(names = allocVector(STRSXP, 2));
 	SET_STRING_ELT(names, 0, mkChar("first"));
@@ -722,10 +723,10 @@ SEXP attribute_hidden do_adist(SEXP call, SEXP op, SEXP args, SEXP env)
 	SET_VECTOR_ELT(dimnames, 2, names);
 	setAttrib(offsets, R_DimNamesSymbol, dimnames);
 	setAttrib(ans, install("offsets"), offsets);
-	UNPROTECT(4);
+	UNPROTECT(4); /* names, dimnames, counts, offsets */
     }
 
-    UNPROTECT(1);
+    UNPROTECT(3); /* y, x, counts */
     return ans;
 }
 
@@ -738,14 +739,13 @@ SEXP attribute_hidden do_aregexec(SEXP call, SEXP op, SEXP args, SEXP env)
     Rboolean haveBytes, useWC = FALSE;
     const char *s, *t;
     const void *vmax = NULL;
-    
+
     regex_t reg;
     size_t nmatch;
     regmatch_t *pmatch;
     regaparams_t params;
     regamatch_t match;
-    int j, so, patlen;
-    R_xlen_t i, n;
+    int so, patlen;
     int rc, cflags = REG_EXTENDED;
 
     checkArity(op, args);
@@ -757,7 +757,7 @@ SEXP attribute_hidden do_aregexec(SEXP call, SEXP op, SEXP args, SEXP env)
     opt_icase = asLogical(CAR(args)); args = CDR(args);
     opt_fixed = asLogical(CAR(args)); args = CDR(args);
     useBytes = asLogical(CAR(args));
-    
+
     if(opt_icase == NA_INTEGER) opt_icase = 0;
     if(opt_fixed == NA_INTEGER) opt_fixed = 0;
     if(useBytes == NA_INTEGER) useBytes = 0;
@@ -775,42 +775,43 @@ SEXP attribute_hidden do_aregexec(SEXP call, SEXP op, SEXP args, SEXP env)
 	error(_("invalid '%s' argument"), "pattern");
     if(length(pat) > 1)
 	warning(_("argument '%s' has length > 1 and only the first element will be used"), "pattern");
-    
+
     if(!isString(vec))
 	error(_("invalid '%s' argument"), "text");
 
-    n = XLENGTH(vec);
+    R_xlen_t n = XLENGTH(vec);
 
     if(!useBytes) {
-        haveBytes = IS_BYTES(STRING_ELT(pat, 0));
+	haveBytes = IS_BYTES(STRING_ELT(pat, 0));
 	if(!haveBytes)
-            for(i = 0; i < n; i++) {
-                if(IS_BYTES(STRING_ELT(vec, i))) {
-                    haveBytes = TRUE;
-                    break;
-                }
+	    for(R_xlen_t i = 0; i < n; i++) {
+		if(IS_BYTES(STRING_ELT(vec, i))) {
+		    haveBytes = TRUE;
+		    break;
+		}
 	    }
 	if(haveBytes) useBytes = TRUE;
     }
 
     if(!useBytes) {
-        useWC = !IS_ASCII(STRING_ELT(pat, 0));
-        if(!useWC) {
-            for(i = 0 ; i < n ; i++) {
-                if(STRING_ELT(vec, i) == NA_STRING) continue;
-                if(!IS_ASCII(STRING_ELT(vec, i))) {
-                    useWC = TRUE;
-                    break;
-                }
-            }
-        }
-    }
-    
+	useWC = !IS_ASCII(STRING_ELT(pat, 0));
+	if(!useWC) {
+	    for(R_xlen_t i = 0 ; i < n ; i++) {
+		if(STRING_ELT(vec, i) == NA_STRING) continue;
+		if(!IS_ASCII(STRING_ELT(vec, i))) {
+		    useWC = TRUE;
+		    break;
+		}
+	    }
+	}
+    }
+
+    SEXP s_nchar = install("nchar");
     if(useBytes)
-	PROTECT(call = lang3(install("nchar"), pat,
+	PROTECT(call = lang3(s_nchar, pat,
 			     ScalarString(mkChar("bytes"))));
     else
-	PROTECT(call = lang3(install("nchar"), pat,
+	PROTECT(call = lang3(s_nchar, pat,
 			     ScalarString(mkChar("chars"))));
     patlen = asInteger(eval(call, env));
     UNPROTECT(1);
@@ -822,15 +823,15 @@ SEXP attribute_hidden do_aregexec(SEXP call, SEXP op, SEXP args, SEXP env)
     else if(useWC)
 	rc = tre_regwcomp(&reg, wtransChar(STRING_ELT(pat, 0)), cflags);
     else {
-        s = translateChar(STRING_ELT(pat, 0));
-        if(mbcslocale && !mbcsValid(s))
-            error(_("regular expression is invalid in this locale"));
-        rc = tre_regcomp(&reg, s, cflags);
+	s = translateChar(STRING_ELT(pat, 0));
+	if(mbcslocale && !mbcsValid(s))
+	    error(_("regular expression is invalid in this locale"));
+	rc = tre_regcomp(&reg, s, cflags);
     }
     if(rc) {
-        char errbuf[1001];
-        tre_regerror(rc, &reg, errbuf, 1001);
-        error(_("regcomp error: '%s'"), errbuf);
+	char errbuf[1001];
+	tre_regerror(rc, &reg, errbuf, 1001);
+	error(_("regcomp error: '%s'"), errbuf);
     }
 
     nmatch = reg.re_nsub + 1;
@@ -843,11 +844,12 @@ SEXP attribute_hidden do_aregexec(SEXP call, SEXP op, SEXP args, SEXP env)
 
     PROTECT(ans = allocVector(VECSXP, n));
 
-    for(i = 0; i < n; i++) {
+    for(R_xlen_t i = 0; i < n; i++) {
 //	if ((i+1) % NINTERRUPT == 0) R_CheckUserInterrupt();
 	if(STRING_ELT(vec, i) == NA_STRING) {
 	    PROTECT(matchpos = ScalarInteger(NA_INTEGER));
-	    setAttrib(matchpos, install("match.length"),
+	    SEXP s_match_length = install("match.length");
+	    setAttrib(matchpos, s_match_length,
 		      ScalarInteger(NA_INTEGER));
 	    SET_VECTOR_ELT(ans, i, matchpos);
 	    UNPROTECT(1);
@@ -872,12 +874,12 @@ SEXP attribute_hidden do_aregexec(SEXP call, SEXP op, SEXP args, SEXP env)
 			  i + 1);
 		rc = tre_regaexec(&reg, t,
 				  &match, params, 0);
-		vmaxset(vmax);		
+		vmaxset(vmax);
 	    }
 	    if(rc == REG_OK) {
 		PROTECT(matchpos = allocVector(INTSXP, nmatch));
 		PROTECT(matchlen = allocVector(INTSXP, nmatch));
-		for(j = 0; j < match.nmatch; j++) {
+		for(R_xlen_t j = 0; j < match.nmatch; j++) {
 		    so = match.pmatch[j].rm_so;
 		    INTEGER(matchpos)[j] = so + 1;
 		    INTEGER(matchlen)[j] = match.pmatch[j].rm_eo - so;
@@ -900,7 +902,7 @@ SEXP attribute_hidden do_aregexec(SEXP call, SEXP op, SEXP args, SEXP env)
 	    }
 	}
     }
-    
+
     free(pmatch);
 
     tre_regfree(&reg);
diff --git a/src/main/alloca.c b/src/main/alloca.c
index ca538ab..a96ff3e 100644
--- a/src/main/alloca.c
+++ b/src/main/alloca.c
@@ -29,7 +29,7 @@
 # include "blockinput.h"
 #endif
 
-/* If compiling with GCC 2, this file's not needed.  */
+/* If compiling with GCC >=2, this file's not needed.  */
 #if !defined (__GNUC__) || __GNUC__ < 2
 
 /* If someone has defined alloca as a macro,
diff --git a/src/main/apply.c b/src/main/apply.c
index 4b825b7..bb673fc 100644
--- a/src/main/apply.c
+++ b/src/main/apply.c
@@ -1,6 +1,6 @@
 /*
  *  R : A Computer Language for Statistical Data Analysis
- *  Copyright (C) 2000-2013  The R Core Team
+ *  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
@@ -14,7 +14,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  */
 
 #ifdef HAVE_CONFIG_H
@@ -27,7 +27,7 @@
 /* .Internal(lapply(X, FUN)) */
 
 /* This is a special .Internal, so has unevaluated arguments.  It is
-   called from a closure wrapper, so X and FUN are promises. 
+   called from a closure wrapper, so X and FUN are promises.
 
    FUN must be unevaluated for use in e.g. bquote .
 */
@@ -49,30 +49,25 @@ SEXP attribute_hidden do_lapply(SEXP call, SEXP op, SEXP args, SEXP rho)
 
     /* Build call: FUN(XX[[<ind>]], ...) */
 
+    SEXP ind = PROTECT(allocVector(realIndx ? REALSXP : INTSXP, 1));
+    SEXP isym = install("i");
+    defineVar(isym, ind, rho);
+    SET_NAMED(ind, 1);
+
     /* Notice that it is OK to have one arg to LCONS do memory
        allocation and not PROTECT the result (LCONS does memory
        protection of its args internally), but not both of them,
        since the computation of one may destroy the other */
-    
-    SEXP ind = PROTECT(allocVector(realIndx ? REALSXP : INTSXP, 1));
-    SEXP tmp;
-    /* The R level code has ensured that XX is a vector.
-       If it is atomic we can speed things up slightly by
-       using the evaluated version.
-    */
-    if(isVectorAtomic(XX))
-	tmp = PROTECT(tmp = LCONS(R_Bracket2Symbol,
-				  LCONS(XX, LCONS(ind, R_NilValue))));
-    else
-	tmp = PROTECT(LCONS(R_Bracket2Symbol,
-			    LCONS(X, LCONS(ind, R_NilValue))));
+
+    SEXP tmp = PROTECT(LCONS(R_Bracket2Symbol,
+			LCONS(X, LCONS(isym, R_NilValue))));
     SEXP R_fcall = PROTECT(LCONS(FUN,
 				 LCONS(tmp, LCONS(R_DotsSymbol, R_NilValue))));
 
     for(R_xlen_t i = 0; i < n; i++) {
 	if (realIndx) REAL(ind)[0] = (double)(i + 1);
 	else INTEGER(ind)[0] = (int)(i + 1);
-	tmp = eval(R_fcall, rho);
+	tmp = R_forceAndCall(R_fcall, 1, rho);
 	if (MAYBE_REFERENCED(tmp)) tmp = lazy_duplicate(tmp);
 	SET_VECTOR_ELT(ans, i, tmp);
     }
@@ -112,16 +107,22 @@ SEXP attribute_hidden do_vapply(SEXP call, SEXP op, SEXP args, SEXP rho)
     if (commonLen > 1 && n > INT_MAX)
 	error(_("long vectors are not supported for matrix/array results"));
     commonType = TYPEOF(value);
+    // check once here
+    if (commonType != CPLXSXP && commonType != REALSXP &&
+	commonType != INTSXP  && commonType != LGLSXP &&
+	commonType != RAWSXP  && commonType != STRSXP &&
+	commonType != VECSXP)
+	error(_("type '%s' is not supported"), type2char(commonType));
     dim_v = getAttrib(value, R_DimSymbol);
     array_value = (TYPEOF(dim_v) == INTSXP && LENGTH(dim_v) >= 1);
     PROTECT(ans = allocVector(commonType, n*commonLen));
     if (useNames) {
-    	PROTECT(names = getAttrib(XX, R_NamesSymbol));
-    	if (isNull(names) && TYPEOF(XX) == STRSXP) {
-    	    UNPROTECT(1);
-    	    PROTECT(names = XX);
-    	}
-    	PROTECT_WITH_INDEX(rowNames = getAttrib(value,
+	PROTECT(names = getAttrib(XX, R_NamesSymbol));
+	if (isNull(names) && TYPEOF(XX) == STRSXP) {
+	    UNPROTECT(1);
+	    PROTECT(names = XX);
+	}
+	PROTECT_WITH_INDEX(rowNames = getAttrib(value,
 						array_value ? R_DimNamesSymbol
 						: R_NamesSymbol),
 			   &index);
@@ -134,64 +135,90 @@ SEXP attribute_hidden do_vapply(SEXP call, SEXP op, SEXP args, SEXP rho)
 	SEXP ind, tmp;
 	/* Build call: FUN(XX[[<ind>]], ...) */
 
+	SEXP isym = install("i");
+	PROTECT(ind = allocVector(realIndx ? REALSXP : INTSXP, 1));
+	defineVar(isym, ind, rho);
+	SET_NAMED(ind, 1);
+
 	/* Notice that it is OK to have one arg to LCONS do memory
 	   allocation and not PROTECT the result (LCONS does memory
 	   protection of its args internally), but not both of them,
 	   since the computation of one may destroy the other */
-
-	PROTECT(ind = allocVector(INTSXP, 1));
-	if(isVectorAtomic(XX))
-	    PROTECT(tmp = LCONS(R_Bracket2Symbol,
-				LCONS(XX, LCONS(ind, R_NilValue))));
-	else
-	    PROTECT(tmp = LCONS(R_Bracket2Symbol,
-				LCONS(X, LCONS(ind, R_NilValue))));
+	PROTECT(tmp = LCONS(R_Bracket2Symbol,
+			    LCONS(X, LCONS(isym, R_NilValue))));
 	PROTECT(R_fcall = LCONS(FUN,
 				LCONS(tmp, LCONS(R_DotsSymbol, R_NilValue))));
 
+	int common_len_offset = 0;
 	for(i = 0; i < n; i++) {
 	    SEXP val; SEXPTYPE valType;
 	    PROTECT_INDEX indx;
 	    if (realIndx) REAL(ind)[0] = (double)(i + 1);
 	    else INTEGER(ind)[0] = (int)(i + 1);
-	    val = eval(R_fcall, rho);
+	    val = R_forceAndCall(R_fcall, 1, rho);
 	    if (MAYBE_REFERENCED(val))
-		val = lazy_duplicate(val);
+		val = lazy_duplicate(val); // Need to duplicate? Copying again anyway
 	    PROTECT_WITH_INDEX(val, &indx);
 	    if (length(val) != commonLen)
-	    	error(_("values must be length %d,\n but FUN(X[[%d]]) result is length %d"),
-	               commonLen, i+1, length(val));
+		error(_("values must be length %d,\n but FUN(X[[%d]]) result is length %d"),
+		       commonLen, i+1, length(val));
 	    valType = TYPEOF(val);
 	    if (valType != commonType) {
-	    	Rboolean okay = FALSE;
-	    	switch (commonType) {
-	    	case CPLXSXP: okay = (valType == REALSXP) || (valType == INTSXP)
-	    	                    || (valType == LGLSXP); break;
-	    	case REALSXP: okay = (valType == INTSXP) || (valType == LGLSXP); break;
-	    	case INTSXP:  okay = (valType == LGLSXP); break;
-	        }
-	        if (!okay)
-	            error(_("values must be type '%s',\n but FUN(X[[%d]]) result is type '%s'"),
-	            	  type2char(commonType), i+1, type2char(valType));
-	        REPROTECT(val = coerceVector(val, commonType), indx);
+		Rboolean okay = FALSE;
+		switch (commonType) {
+		case CPLXSXP: okay = (valType == REALSXP) || (valType == INTSXP)
+				    || (valType == LGLSXP); break;
+		case REALSXP: okay = (valType == INTSXP) || (valType == LGLSXP); break;
+		case INTSXP:  okay = (valType == LGLSXP); break;
+		}
+		if (!okay)
+		    error(_("values must be type '%s',\n but FUN(X[[%d]]) result is type '%s'"),
+			  type2char(commonType), i+1, type2char(valType));
+		REPROTECT(val = coerceVector(val, commonType), indx);
 	    }
 	    /* Take row names from the first result only */
 	    if (i == 0 && useNames && isNull(rowNames))
-	    	REPROTECT(rowNames = getAttrib(val,
+		REPROTECT(rowNames = getAttrib(val,
 					       array_value ? R_DimNamesSymbol : R_NamesSymbol),
 			  index);
-	    for (int j = 0; j < commonLen; j++) {
-	    	switch (commonType) {
-	    	case CPLXSXP: COMPLEX(ans)[i*commonLen + j] = COMPLEX(val)[j]; break;
-	    	case REALSXP: REAL(ans)[i*commonLen + j] = REAL(val)[j]; break;
-	    	case INTSXP:  INTEGER(ans)[i*commonLen + j] = INTEGER(val)[j]; break;
-	    	case LGLSXP:  LOGICAL(ans)[i*commonLen + j] = LOGICAL(val)[j]; break;
-	    	case RAWSXP:  RAW(ans)[i*commonLen + j] = RAW(val)[j]; break;
-	    	case STRSXP:  SET_STRING_ELT(ans, i*commonLen + j, STRING_ELT(val, j)); break;
-	    	case VECSXP:  SET_VECTOR_ELT(ans, i*commonLen + j, VECTOR_ELT(val, j)); break;
-	    	default:
-	    	    error(_("type '%s' is not supported"), type2char(commonType));
-	    	}
+	    // two cases - only for efficiency
+	    if(commonLen == 1) { // common case
+		switch (commonType) {
+		case CPLXSXP: COMPLEX(ans)[i] = COMPLEX(val)[0]; break;
+		case REALSXP: REAL(ans)   [i] = REAL   (val)[0]; break;
+		case INTSXP:  INTEGER(ans)[i] = INTEGER(val)[0]; break;
+		case LGLSXP:  LOGICAL(ans)[i] = LOGICAL(val)[0]; break;
+		case RAWSXP:  RAW(ans)    [i] = RAW    (val)[0]; break;
+		case STRSXP:  SET_STRING_ELT(ans, i, STRING_ELT(val, 0)); break;
+		case VECSXP:  SET_VECTOR_ELT(ans, i, VECTOR_ELT(val, 0)); break;
+		}
+	    } else { // commonLen > 1 (typically, or == 0) :
+		switch (commonType) {
+		case REALSXP:
+		    memcpy(REAL(ans) + common_len_offset,
+			   REAL(val), commonLen * sizeof(double)); break;
+		case INTSXP:
+		    memcpy(INTEGER(ans) + common_len_offset,
+			   INTEGER(val), commonLen * sizeof(int)); break;
+		case LGLSXP:
+		    memcpy(LOGICAL(ans) + common_len_offset,
+			   LOGICAL(val), commonLen * sizeof(int)); break;
+		case RAWSXP:
+		    memcpy(RAW(ans) + common_len_offset,
+			   RAW(val), commonLen * sizeof(Rbyte)); break;
+		case CPLXSXP:
+		    memcpy(COMPLEX(ans) + common_len_offset,
+			   COMPLEX(val), commonLen * sizeof(Rcomplex)); break;
+		case STRSXP:
+		    for (int j = 0; j < commonLen; j++)
+			SET_STRING_ELT(ans, common_len_offset + j, STRING_ELT(val, j));
+		    break;
+		case VECSXP:
+		    for (int j = 0; j < commonLen; j++)
+			SET_VECTOR_ELT(ans, common_len_offset + j, VECTOR_ELT(val, j));
+		    break;
+		}
+		common_len_offset += commonLen;
 	    }
 	    UNPROTECT(1);
 	}
@@ -242,17 +269,20 @@ SEXP attribute_hidden do_vapply(SEXP call, SEXP op, SEXP args, SEXP rho)
 static SEXP do_one(SEXP X, SEXP FUN, SEXP classes, SEXP deflt,
 		   Rboolean replace, SEXP rho)
 {
-    SEXP ans, names, klass, R_fcall;
+    SEXP ans, names, klass;
     int i, j, n;
     Rboolean matched = FALSE;
 
     /* if X is a list, recurse.  Otherwise if it matches classes call f */
     if(isNewList(X)) {
 	n = length(X);
-	PROTECT(ans = allocVector(VECSXP, n));
-	names = getAttrib(X, R_NamesSymbol);
-	/* or copy attributes if replace = TRUE? */
-	if(!isNull(names)) setAttrib(ans, R_NamesSymbol, names);
+  if (replace) {
+    PROTECT(ans = shallow_duplicate(X));
+  } else {
+    PROTECT(ans = allocVector(VECSXP, n));
+    names = getAttrib(X, R_NamesSymbol);
+    if(!isNull(names)) setAttrib(ans, R_NamesSymbol, names);
+  }
 	for(i = 0; i < n; i++)
 	    SET_VECTOR_ELT(ans, i, do_one(VECTOR_ELT(X, i), FUN, classes,
 					  deflt, replace, rho));
@@ -270,9 +300,16 @@ static SEXP do_one(SEXP X, SEXP FUN, SEXP classes, SEXP deflt,
 	UNPROTECT(1);
     }
     if(matched) {
-	/* PROTECT(R_fcall = lang2(FUN, X)); */
-	PROTECT(R_fcall = lang3(FUN, X, R_DotsSymbol));
-	ans = eval(R_fcall, rho);
+	/* This stores value to which the function is to be applied in
+	   a variable X in the environment of the rapply closure call
+	   that calls into the rapply .Internal. */
+	SEXP R_fcall; /* could allocate once and preserve for re-use */
+	SEXP Xsym = install("X");
+	defineVar(Xsym, X, rho);
+	INCREMENT_NAMED(X);
+	/* PROTECT(R_fcall = lang2(FUN, Xsym)); */
+	PROTECT(R_fcall = lang3(FUN, Xsym, R_DotsSymbol));
+	ans = R_forceAndCall(R_fcall, 1, rho);
 	if (MAYBE_REFERENCED(ans))
 	    ans = lazy_duplicate(ans);
 	UNPROTECT(1);
@@ -298,10 +335,13 @@ SEXP attribute_hidden do_rapply(SEXP call, SEXP op, SEXP args, SEXP rho)
     if(!isString(how)) error(_("invalid '%s' argument"), "how");
     replace = strcmp(CHAR(STRING_ELT(how, 0)), "replace") == 0; /* ASCII */
     n = length(X);
-    PROTECT(ans = allocVector(VECSXP, n));
-    names = getAttrib(X, R_NamesSymbol);
-    /* or copy attributes if replace = TRUE? */
-    if(!isNull(names)) setAttrib(ans, R_NamesSymbol, names);
+    if (replace) {
+      PROTECT(ans = shallow_duplicate(X));
+    } else {
+      PROTECT(ans = allocVector(VECSXP, n));
+      names = getAttrib(X, R_NamesSymbol);
+      if(!isNull(names)) setAttrib(ans, R_NamesSymbol, names);
+    }
     for(i = 0; i < n; i++)
 	SET_VECTOR_ELT(ans, i, do_one(VECTOR_ELT(X, i), FUN, classes, deflt,
 				      replace, rho));
@@ -312,11 +352,11 @@ SEXP attribute_hidden do_rapply(SEXP call, SEXP op, SEXP args, SEXP rho)
 static Rboolean islistfactor(SEXP X)
 {
     int i, n = length(X);
-
-    if(n == 0) return FALSE;
+    
     switch(TYPEOF(X)) {
     case VECSXP:
     case EXPRSXP:
+        if(n == 0) return NA_LOGICAL;
 	for(i = 0; i < LENGTH(X); i++)
 	    if(!islistfactor(VECTOR_ELT(X, i))) return FALSE;
 	return TRUE;
@@ -356,11 +396,15 @@ SEXP attribute_hidden do_islistfactor(SEXP call, SEXP op, SEXP args, SEXP rho)
 	default:
 	    goto do_ans;
 	}
-	for(i = 0; i < LENGTH(X); i++)
-	    if(!islistfactor(VECTOR_ELT(X, i))) {
+        lans = FALSE;
+	for(i = 0; i < LENGTH(X); i++) {
+            Rboolean isfactor = islistfactor(VECTOR_ELT(X, i));
+	    if(!isfactor) {
 		lans = FALSE;
 		break;
-	    }
+	    } else if (isfactor == TRUE)
+                lans = TRUE;
+        }
     }
 do_ans:
     return ScalarLogical(lans);
diff --git a/src/main/arithmetic.c b/src/main/arithmetic.c
index 44bd344..1e214e8 100644
--- a/src/main/arithmetic.c
+++ b/src/main/arithmetic.c
@@ -1,8 +1,8 @@
 /*
  *  R : A Computer Language for Statistical Data Analysis
- *  Copyright (C) 1995, 1996, 1997  Robert Gentleman and Ross Ihaka
- *  Copyright (C) 1998--2013	    The R Core Team.
- *  Copyright (C) 2003-4	    The R Foundation
+ *  Copyright (C) 1995--1997 Robert Gentleman and Ross Ihaka
+ *  Copyright (C) 1998--2016 The R Core Team.
+ *  Copyright (C) 2003--2016 The R Foundation
  *
  *  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
@@ -16,7 +16,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  */
 
 #ifdef HAVE_CONFIG_H
@@ -43,7 +43,6 @@
 #define R_MSG_NONNUM_MATH _("non-numeric argument to mathematical function")
 
 #include <Rmath.h>
-extern double Rf_gamma_cody(double);
 
 #include <R_ext/Itermacros.h>
 
@@ -198,11 +197,6 @@ static double myfloor(double x1, double x2)
     return floor(q) + floor(tmp/x2);
 }
 
-/* some systems get this wrong, possibly depend on what libs are loaded */
-static R_INLINE double R_log(double x) {
-    return x > 0 ? log(x) : x < 0 ? R_NaN : R_NegInf;
-}
-
 double R_pow(double x, double y) /* = x ^ y */
 {
     /* squaring is the most common of the specially handled cases so
@@ -220,7 +214,11 @@ double R_pow(double x, double y) /* = x ^ y */
 	/* There was a special case for y == 0.5 here, but
 	   gcc 4.3.0 -g -O2 mis-compiled it.  Showed up with
 	   100^0.5 as 3.162278, example(pbirthday) failed. */
-	return pow(x, y);
+#ifdef USE_POWL_IN_R_POW
+    return powl(x, y);
+#else
+    return pow(x, y);
+#endif
     }
     if (ISNAN(x) || ISNAN(y))
 	return(x + y);
@@ -229,7 +227,7 @@ double R_pow(double x, double y) /* = x ^ y */
 	    return (y < 0.)? 0. : R_PosInf;
 	else {			/* (-Inf) ^ y */
 	    if(R_FINITE(y) && y == floor(y)) /* (-Inf) ^ n */
-		return (y < 0.) ? 0. : (myfmod(y, 2.) ? x  : -x);
+		return (y < 0.) ? 0. : (myfmod(y, 2.) != 0 ? x  : -x);
 	}
     }
     if(!R_FINITE(y)) {
@@ -243,11 +241,6 @@ double R_pow(double x, double y) /* = x ^ y */
     return R_NaN; // all other cases: (-Inf)^{+-Inf, non-int}; (neg)^{+-Inf}
 }
 
-static R_INLINE double R_POW(double x, double y) /* handle x ^ 2 inline */
-{
-    return y == 2.0 ? x * x : R_pow(x, y);
-}
-
 double R_pow_di(double x, int n)
 {
     double xn = 1.0;
@@ -264,7 +257,7 @@ double R_pow_di(double x, int n)
 	    if(n & 01) xn *= x;
 	    if(n >>= 1) x *= x; else break;
 	}
-        if(is_neg) xn = 1. / xn;
+	if(is_neg) xn = 1. / xn;
     }
     return xn;
 }
@@ -272,22 +265,6 @@ double R_pow_di(double x, int n)
 
 /* General Base Logarithms */
 
-/* Note that the behaviour of log(0) required is not necessarily that
-   mandated by C99 (-HUGE_VAL), and the behaviour of log(x < 0) is
-   optional in C99.  Some systems return -Inf for log(x < 0), e.g.
-   libsunmath on Solaris.
-*/
-static double logbase(double x, double base)
-{
-#ifdef HAVE_LOG10
-    if(base == 10) return x > 0 ? log10(x) : x < 0 ? R_NaN : R_NegInf;
-#endif
-#ifdef HAVE_LOG2
-    if(base == 2) return x > 0 ? log2(x) : x < 0 ? R_NaN : R_NegInf;
-#endif
-    return R_log(x) / R_log(base);
-}
-
 SEXP R_unary(SEXP, SEXP, SEXP);
 SEXP R_binary(SEXP, SEXP, SEXP, SEXP);
 static SEXP logical_unary(ARITHOP_TYPE, SEXP, SEXP);
@@ -366,7 +343,7 @@ static R_INLINE int R_integer_times(int x, int y, Rboolean *pnaflag)
     if (x == NA_INTEGER || y == NA_INTEGER)
 	return NA_INTEGER;
     else {
-	int z = x * y;
+	int z = x * y;  // UBSAN will warn if this overflows (happens in bda)
 	if (GOODIPROD(x, y, z) && z != NA_INTEGER)
 	    return z;
 	else {
@@ -533,19 +510,15 @@ SEXP attribute_hidden do_arith(SEXP call, SEXP op, SEXP args, SEXP env)
 
 #define FIXUP_NULL_AND_CHECK_TYPES(v, vpi) do { \
     switch (TYPEOF(v)) { \
-    case NILSXP: REPROTECT(v = allocVector(REALSXP,0), vpi); break; \
+    case NILSXP: REPROTECT(v = allocVector(INTSXP,0), vpi); break; \
     case CPLXSXP: case REALSXP: case INTSXP: case LGLSXP: break; \
-    default: errorcall(lcall, _("non-numeric argument to binary operator")); \
+    default: errorcall(call, _("non-numeric argument to binary operator")); \
     } \
 } while (0)
 
 SEXP attribute_hidden R_binary(SEXP call, SEXP op, SEXP x, SEXP y)
 {
-    SEXP klass, dims, tsp, xnames, ynames, val;
-    R_xlen_t nx, ny, mismatch = 0;
-    int xarray, yarray, xts, yts, xS4 = 0, yS4 = 0;
-    int xattr, yattr;
-    SEXP lcall = call;
+    Rboolean xattr, yattr, xarray, yarray, xts, yts, xS4, yS4;
     PROTECT_INDEX xpi, ypi;
     ARITHOP_TYPE oper = (ARITHOP_TYPE) PRIMVAL(op);
     int nprotect = 2; /* x and y */
@@ -557,55 +530,75 @@ SEXP attribute_hidden R_binary(SEXP call, SEXP op, SEXP x, SEXP y)
     FIXUP_NULL_AND_CHECK_TYPES(x, xpi);
     FIXUP_NULL_AND_CHECK_TYPES(y, ypi);
 
-    nx = XLENGTH(x);
+    R_xlen_t
+	nx = XLENGTH(x),
+	ny = XLENGTH(y);
     if (ATTRIB(x) != R_NilValue) {
 	xattr = TRUE;
 	xarray = isArray(x);
 	xts = isTs(x);
 	xS4 = isS4(x);
     }
-    else xarray = xts = xattr = FALSE;
-    ny = XLENGTH(y);
+    else xattr = xarray = xts = xS4 = FALSE;
     if (ATTRIB(y) != R_NilValue) {
 	yattr = TRUE;
 	yarray = isArray(y);
 	yts = isTs(y);
 	yS4 = isS4(y);
     }
-    else yarray = yts = yattr = FALSE;
+    else yattr = yarray = yts = yS4 = FALSE;
 
+#define R_ARITHMETIC_ARRAY_1_SPECIAL
+
+#ifdef R_ARITHMETIC_ARRAY_1_SPECIAL
     /* If either x or y is a matrix with length 1 and the other is a
-       vector, we want to coerce the matrix to be a vector.
+       vector of a different length, we want to coerce the matrix to be a vector.
        Do we want to?  We don't do it!  BDR 2004-03-06
+
+       From 3.4.0 (Sep. 2016), this signals a warning,
+       and in the future we will disable these 2 clauses,
+       so it will give an error.
     */
 
     /* FIXME: Danger Will Robinson.
      * -----  We might be trashing arguments here.
      */
     if (xarray != yarray) {
-	if (xarray && nx==1 && ny!=1) {
-	    REPROTECT(x = duplicate(x), xpi);
-	    setAttrib(x, R_DimSymbol, R_NilValue);
-	}
-	if (yarray && ny==1 && nx!=1) {
-	    REPROTECT(y = duplicate(y), ypi);
-	    setAttrib(y, R_DimSymbol, R_NilValue);
-	}
+    	if (xarray && nx==1 && ny!=1) {
+	    if(ny != 0)
+		warningcall(call, _(
+	"Recycling array of length 1 in array-vector arithmetic is deprecated.\n\
+  Use c() or as.vector() instead.\n"));
+    	    REPROTECT(x = duplicate(x), xpi);
+    	    setAttrib(x, R_DimSymbol, R_NilValue);
+    	}
+    	if (yarray && ny==1 && nx!=1) {
+	    if(nx != 0)
+		warningcall(call, _(
+	"Recycling array of length 1 in vector-array arithmetic is deprecated.\n\
+  Use c() or as.vector() instead.\n"));
+    	    REPROTECT(y = duplicate(y), ypi);
+    	    setAttrib(y, R_DimSymbol, R_NilValue);
+    	}
     }
+#endif
 
+    SEXP dims, xnames, ynames;
     if (xarray || yarray) {
+	/* if one is a length-atleast-1-array and the
+	 * other  is a length-0 *non*array, then do not use array treatment */
 	if (xarray && yarray) {
 	    if (!conformable(x, y))
-		errorcall(lcall, _("non-conformable arrays"));
-	    PROTECT(dims = getAttrib(x, R_DimSymbol));
-	}
-	else if (xarray) {
-	    PROTECT(dims = getAttrib(x, R_DimSymbol));
+		errorcall(call, _("non-conformable arrays"));
+	    PROTECT(dims = getAttrib(x, R_DimSymbol)); nprotect++;
 	}
-	else {			/* (yarray) */
-	    PROTECT(dims = getAttrib(y, R_DimSymbol));
+	else if (xarray && (ny != 0 || nx == 0)) {
+	    PROTECT(dims = getAttrib(x, R_DimSymbol)); nprotect++;
 	}
-	nprotect++;
+	else if (yarray && (nx != 0 || ny == 0)) {
+	    PROTECT(dims = getAttrib(y, R_DimSymbol)); nprotect++;
+	} else
+	    dims = R_NilValue;
 	if (xattr) {
 	    PROTECT(xnames = getAttrib(x, R_DimNamesSymbol));
 	    nprotect++;
@@ -630,39 +623,36 @@ SEXP attribute_hidden R_binary(SEXP call, SEXP op, SEXP x, SEXP y)
 	}
 	else ynames = R_NilValue;
     }
-    if (nx == ny || nx == 1 || ny == 1) mismatch = 0;
-    else if (nx > 0 && ny > 0) {
-	if (nx > ny) mismatch = nx % ny;
-	else mismatch = ny % nx;
-    }
 
+    SEXP klass = NULL, tsp = NULL; // -Wall
     if (xts || yts) {
 	if (xts && yts) {
 	    if (!tsConform(x, y))
-		errorcall(lcall, _("non-conformable time-series"));
+		errorcall(call, _("non-conformable time-series"));
 	    PROTECT(tsp = getAttrib(x, R_TspSymbol));
 	    PROTECT(klass = getAttrib(x, R_ClassSymbol));
 	}
 	else if (xts) {
 	    if (nx < ny)
-		ErrorMessage(lcall, ERROR_TSVEC_MISMATCH);
+		ErrorMessage(call, ERROR_TSVEC_MISMATCH);
 	    PROTECT(tsp = getAttrib(x, R_TspSymbol));
 	    PROTECT(klass = getAttrib(x, R_ClassSymbol));
 	}
 	else {			/* (yts) */
 	    if (ny < nx)
-		ErrorMessage(lcall, ERROR_TSVEC_MISMATCH);
+		ErrorMessage(call, ERROR_TSVEC_MISMATCH);
 	    PROTECT(tsp = getAttrib(y, R_TspSymbol));
 	    PROTECT(klass = getAttrib(y, R_ClassSymbol));
 	}
 	nprotect += 2;
     }
-    else klass = tsp = NULL; /* -Wall */
 
-    if (mismatch)
-	warningcall(lcall,
+    if (nx > 0 && ny > 0 &&
+	((nx > ny) ? nx % ny : ny % nx) != 0) // mismatch
+	warningcall(call,
 		    _("longer object length is not a multiple of shorter object length"));
 
+    SEXP val;
     /* need to preserve object here, as *_binary copies class attributes */
     if (TYPEOF(x) == CPLXSXP || TYPEOF(y) == CPLXSXP) {
 	COERCE_IF_NEEDED(x, CPLXSXP, xpi);
@@ -676,7 +666,7 @@ SEXP attribute_hidden R_binary(SEXP call, SEXP op, SEXP x, SEXP y)
 	if (TYPEOF(y) != INTSXP) COERCE_IF_NEEDED(y, REALSXP, ypi);
 	val = real_binary(oper, x, y);
     }
-    else val = integer_binary(oper, x, y, lcall);
+    else val = integer_binary(oper, x, y, call);
 
     /* quick return if there are no attributes */
     if (! xattr && ! yattr) {
@@ -687,18 +677,12 @@ SEXP attribute_hidden R_binary(SEXP call, SEXP op, SEXP x, SEXP y)
     PROTECT(val);
     nprotect++;
 
-    /* Don't set the dims if one argument is an array of size 0 and the
-       other isn't of size zero, cos they're wrong */
-    /* Not if the other argument is a scalar (PR#1979) */
     if (dims != R_NilValue) {
-	if (!((xarray && (nx == 0) && (ny > 1)) ||
-	      (yarray && (ny == 0) && (nx > 1)))){
 	    setAttrib(val, R_DimSymbol, dims);
 	    if (xnames != R_NilValue)
 		setAttrib(val, R_DimNamesSymbol, xnames);
 	    else if (ynames != R_NilValue)
 		setAttrib(val, R_DimNamesSymbol, ynames);
-	}
     }
     else {
 	if (XLENGTH(val) == xlength(xnames))
@@ -713,7 +697,7 @@ SEXP attribute_hidden R_binary(SEXP call, SEXP op, SEXP x, SEXP y)
     }
 
     if(xS4 || yS4) {   /* Only set the bit:  no method defined! */
-        val = asS4(val, TRUE, TRUE);
+	val = asS4(val, TRUE, TRUE);
     }
     UNPROTECT(nprotect);
     return val;
@@ -810,16 +794,6 @@ static SEXP real_unary(ARITHOP_TYPE code, SEXP s1, SEXP lcall)
     return s1;			/* never used; to keep -Wall happy */
 }
 
-/* i1 = i % n1; i2 = i % n2;
- * this macro is quite a bit faster than having real modulo calls
- * in the loop (tested on Intel and Sparc)
- */
-#define mod_iterate(n1,n2,i1,i2) for (i=i1=i2=0; i<n; \
-	i1 = (++i1 == n1) ? 0 : i1,\
-	i2 = (++i2 == n2) ? 0 : i2,\
-	++i)
-
-
 static SEXP integer_binary(ARITHOP_TYPE code, SEXP s1, SEXP s2, SEXP lcall)
 {
     R_xlen_t i, i1, i2, n, n1, n2;
@@ -841,7 +815,7 @@ static SEXP integer_binary(ARITHOP_TYPE code, SEXP s1, SEXP s2, SEXP lcall)
 
     switch (code) {
     case PLUSOP:
-	MOD_ITERATE_CHECK(NINTERRUPT, n, n1, n2, i, i1, i2, {
+	MOD_ITERATE2_CHECK(NINTERRUPT, n, n1, n2, i, i1, i2, {
 		x1 = INTEGER(s1)[i1];
 		x2 = INTEGER(s2)[i2];
 		INTEGER(ans)[i] = R_integer_plus(x1, x2, &naflag);
@@ -850,7 +824,7 @@ static SEXP integer_binary(ARITHOP_TYPE code, SEXP s1, SEXP s2, SEXP lcall)
 	    warningcall(lcall, INTEGER_OVERFLOW_WARNING);
 	break;
     case MINUSOP:
-	MOD_ITERATE_CHECK(NINTERRUPT, n, n1, n2, i, i1, i2, {
+	MOD_ITERATE2_CHECK(NINTERRUPT, n, n1, n2, i, i1, i2, {
 		x1 = INTEGER(s1)[i1];
 		x2 = INTEGER(s2)[i2];
 		INTEGER(ans)[i] = R_integer_minus(x1, x2, &naflag);
@@ -859,7 +833,7 @@ static SEXP integer_binary(ARITHOP_TYPE code, SEXP s1, SEXP s2, SEXP lcall)
 	    warningcall(lcall, INTEGER_OVERFLOW_WARNING);
 	break;
     case TIMESOP:
-	MOD_ITERATE_CHECK(NINTERRUPT, n, n1, n2, i, i1, i2, {
+	MOD_ITERATE2_CHECK(NINTERRUPT, n, n1, n2, i, i1, i2, {
 		x1 = INTEGER(s1)[i1];
 		x2 = INTEGER(s2)[i2];
 		INTEGER(ans)[i] = R_integer_times(x1, x2, &naflag);
@@ -868,14 +842,14 @@ static SEXP integer_binary(ARITHOP_TYPE code, SEXP s1, SEXP s2, SEXP lcall)
 	    warningcall(lcall, INTEGER_OVERFLOW_WARNING);
 	break;
     case DIVOP:
-	MOD_ITERATE_CHECK(NINTERRUPT, n, n1, n2, i, i1, i2, {
+	MOD_ITERATE2_CHECK(NINTERRUPT, n, n1, n2, i, i1, i2, {
 		x1 = INTEGER(s1)[i1];
 		x2 = INTEGER(s2)[i2];
 		REAL(ans)[i] = R_integer_divide(x1, x2);
 	    });
 	break;
     case POWOP:
-	MOD_ITERATE_CHECK(NINTERRUPT, n, n1, n2, i, i1, i2, {
+	MOD_ITERATE2_CHECK(NINTERRUPT, n, n1, n2, i, i1, i2, {
 		if((x1 = INTEGER(s1)[i1]) == 1 || (x2 = INTEGER(s2)[i2]) == 0)
 		    REAL(ans)[i] = 1.;
 		else if (x1 == NA_INTEGER || x2 == NA_INTEGER)
@@ -885,7 +859,7 @@ static SEXP integer_binary(ARITHOP_TYPE code, SEXP s1, SEXP s2, SEXP lcall)
 	    });
 	break;
     case MODOP:
-	MOD_ITERATE_CHECK(NINTERRUPT, n, n1, n2, i, i1, i2, {
+	MOD_ITERATE2_CHECK(NINTERRUPT, n, n1, n2, i, i1, i2, {
 		x1 = INTEGER(s1)[i1];
 		x2 = INTEGER(s2)[i2];
 		if (x1 == NA_INTEGER || x2 == NA_INTEGER || x2 == 0)
@@ -898,7 +872,7 @@ static SEXP integer_binary(ARITHOP_TYPE code, SEXP s1, SEXP s2, SEXP lcall)
 	    });
 	break;
     case IDIVOP:
-	MOD_ITERATE_CHECK(NINTERRUPT, n, n1, n2, i, i1, i2, {
+	MOD_ITERATE2_CHECK(NINTERRUPT, n, n1, n2, i, i1, i2, {
 		x1 = INTEGER(s1)[i1];
 		x2 = INTEGER(s2)[i2];
 		/* This had x %/% 0 == 0 prior to 2.14.1, but
@@ -949,25 +923,25 @@ static SEXP real_binary(ARITHOP_TYPE code, SEXP s1, SEXP s2)
 	    double *da = REAL(ans);
 	    double *dx = REAL(s1);
 	    double *dy = REAL(s2);
-            if (n2 == 1) {
+	    if (n2 == 1) {
 		double tmp = dy[0];
 		R_ITERATE_CHECK(NINTERRUPT, n, i, da[i] = dx[i] + tmp;);
 	    }
-            else if (n1 == 1) {
+	    else if (n1 == 1) {
 		double tmp = dx[0];
 		R_ITERATE_CHECK(NINTERRUPT, n, i, da[i] = tmp + dy[i];);
 	    }
-            else if (n1 == n2)
+	    else if (n1 == n2)
 		R_ITERATE_CHECK(NINTERRUPT, n, i, da[i] = dx[i] + dy[i];);
-            else
-		MOD_ITERATE_CHECK(NINTERRUPT, n, n1, n2, i, i1, i2,
+	    else
+		MOD_ITERATE2_CHECK(NINTERRUPT, n, n1, n2, i, i1, i2,
 				  da[i] = dx[i1] + dy[i2];);
 	}
 	else if(TYPEOF(s1) == INTSXP )
-	    MOD_ITERATE_CHECK(NINTERRUPT, n, n1, n2, i, i1, i2,
+	    MOD_ITERATE2_CHECK(NINTERRUPT, n, n1, n2, i, i1, i2,
 			      REAL(ans)[i] = R_INTEGER(s1, i1) + REAL(s2)[i2];);
 	else if(TYPEOF(s2) == INTSXP )
-	    MOD_ITERATE_CHECK(NINTERRUPT, n, n1, n2, i, i1, i2,
+	    MOD_ITERATE2_CHECK(NINTERRUPT, n, n1, n2, i, i1, i2,
 			      REAL(ans)[i] = REAL(s1)[i1] + R_INTEGER(s2, i2););
 	break;
     case MINUSOP:
@@ -975,25 +949,25 @@ static SEXP real_binary(ARITHOP_TYPE code, SEXP s1, SEXP s2)
 	    double *da = REAL(ans);
 	    double *dx = REAL(s1);
 	    double *dy = REAL(s2);
-            if (n2 == 1) {
-                double tmp = dy[0];
+	    if (n2 == 1) {
+		double tmp = dy[0];
 		R_ITERATE_CHECK(NINTERRUPT, n, i, da[i] = dx[i] - tmp;);
-            }
-            else if (n1 == 1) {
-                double tmp = dx[0];
+	    }
+	    else if (n1 == 1) {
+		double tmp = dx[0];
 		R_ITERATE_CHECK(NINTERRUPT, n, i, da[i] = tmp - dy[i];);
-            }
-            else if (n1 == n2)
+	    }
+	    else if (n1 == n2)
 		R_ITERATE_CHECK(NINTERRUPT, n, i, da[i] = dx[i] - dy[i];);
-            else
-		MOD_ITERATE_CHECK(NINTERRUPT, n, n1, n2, i, i1, i2,
+	    else
+		MOD_ITERATE2_CHECK(NINTERRUPT, n, n1, n2, i, i1, i2,
 				  da[i] = dx[i1] - dy[i2];);
 	}
 	else if(TYPEOF(s1) == INTSXP )
-	    MOD_ITERATE_CHECK(NINTERRUPT, n, n1, n2, i, i1, i2,
+	    MOD_ITERATE2_CHECK(NINTERRUPT, n, n1, n2, i, i1, i2,
 			      REAL(ans)[i] = R_INTEGER(s1, i1) - REAL(s2)[i2];);
 	else if(TYPEOF(s2) == INTSXP )
-	    MOD_ITERATE_CHECK(NINTERRUPT, n, n1, n2, i, i1, i2,
+	    MOD_ITERATE2_CHECK(NINTERRUPT, n, n1, n2, i, i1, i2,
 			      REAL(ans)[i] = REAL(s1)[i1] - R_INTEGER(s2, i2););
 	break;
     case TIMESOP:
@@ -1001,25 +975,25 @@ static SEXP real_binary(ARITHOP_TYPE code, SEXP s1, SEXP s2)
 	    double *da = REAL(ans);
 	    double *dx = REAL(s1);
 	    double *dy = REAL(s2);
-            if (n2 == 1) {
-                double tmp = dy[0];
+	    if (n2 == 1) {
+		double tmp = dy[0];
 		R_ITERATE_CHECK(NINTERRUPT, n, i, da[i] = dx[i] * tmp;);
-            }
-            else if (n1 == 1) {
-                double tmp = REAL(s1)[0];
+	    }
+	    else if (n1 == 1) {
+		double tmp = REAL(s1)[0];
 		R_ITERATE_CHECK(NINTERRUPT, n, i, da[i] = tmp * dy[i];);
-            }
-            else if (n1 == n2)
+	    }
+	    else if (n1 == n2)
 		R_ITERATE_CHECK(NINTERRUPT, n, i, da[i] = dx[i] * dy[i];);
-            else
-		MOD_ITERATE_CHECK(NINTERRUPT, n, n1, n2, i, i1, i2,
+	    else
+		MOD_ITERATE2_CHECK(NINTERRUPT, n, n1, n2, i, i1, i2,
 				  da[i] = dx[i1] * dy[i2];);
 	}
 	else if(TYPEOF(s1) == INTSXP )
-	    MOD_ITERATE_CHECK(NINTERRUPT, n, n1, n2, i, i1, i2,
+	    MOD_ITERATE2_CHECK(NINTERRUPT, n, n1, n2, i, i1, i2,
 			      REAL(ans)[i] = R_INTEGER(s1, i1) * REAL(s2)[i2];);
 	else if(TYPEOF(s2) == INTSXP )
-	    MOD_ITERATE_CHECK(NINTERRUPT, n, n1, n2, i, i1, i2,
+	    MOD_ITERATE2_CHECK(NINTERRUPT, n, n1, n2, i, i1, i2,
 			      REAL(ans)[i] = REAL(s1)[i1] * R_INTEGER(s2, i2););
 	break;
     case DIVOP:
@@ -1027,25 +1001,25 @@ static SEXP real_binary(ARITHOP_TYPE code, SEXP s1, SEXP s2)
 	    double *da = REAL(ans);
 	    double *dx = REAL(s1);
 	    double *dy = REAL(s2);
-            if (n2 == 1) {
-                double tmp = dy[0];
+	    if (n2 == 1) {
+		double tmp = dy[0];
 		R_ITERATE_CHECK(NINTERRUPT, n, i, da[i] = dx[i] / tmp;);
-            }
-            else if (n1 == 1) {
-                double tmp = dx[0];
+	    }
+	    else if (n1 == 1) {
+		double tmp = dx[0];
 		R_ITERATE_CHECK(NINTERRUPT, n, i, da[i] = tmp / dy[i];);
-            }
-            else if (n1 == n2)
+	    }
+	    else if (n1 == n2)
 		R_ITERATE_CHECK(NINTERRUPT, n, i, da[i] = dx[i] / dy[i];);
-            else
-		MOD_ITERATE_CHECK(NINTERRUPT, n, n1, n2, i, i1, i2,
+	    else
+		MOD_ITERATE2_CHECK(NINTERRUPT, n, n1, n2, i, i1, i2,
 				  da[i] = dx[i1] / dy[i2];);
 	}
 	else if(TYPEOF(s1) == INTSXP )
-	    MOD_ITERATE_CHECK(NINTERRUPT, n, n1, n2, i, i1, i2,
+	    MOD_ITERATE2_CHECK(NINTERRUPT, n, n1, n2, i, i1, i2,
 			      REAL(ans)[i] = R_INTEGER(s1, i1) / REAL(s2)[i2];);
 	else if(TYPEOF(s2) == INTSXP )
-	    MOD_ITERATE_CHECK(NINTERRUPT, n, n1, n2, i, i1, i2,
+	    MOD_ITERATE2_CHECK(NINTERRUPT, n, n1, n2, i, i1, i2,
 			      REAL(ans)[i] = REAL(s1)[i1] / R_INTEGER(s2, i2););
 	break;
     case POWOP:
@@ -1053,54 +1027,54 @@ static SEXP real_binary(ARITHOP_TYPE code, SEXP s1, SEXP s2)
 	    double *da = REAL(ans);
 	    double *dx = REAL(s1);
 	    double *dy = REAL(s2);
-            if (n2 == 1) {
-                double tmp = dy[0];
+	    if (n2 == 1) {
+		double tmp = dy[0];
 		R_ITERATE_CHECK(NINTERRUPT, n, i, da[i] = R_POW(dx[i], tmp););
-            }
-            else if (n1 == 1) {
-                double tmp = dx[0];
+	    }
+	    else if (n1 == 1) {
+		double tmp = dx[0];
 		R_ITERATE_CHECK(NINTERRUPT, n, i, da[i] = R_POW(tmp, dy[i]););
-            }
-            else if (n1 == n2)
+	    }
+	    else if (n1 == n2)
 		R_ITERATE_CHECK(NINTERRUPT, n, i, da[i] = R_POW(dx[i], dy[i]););
-            else
-		MOD_ITERATE_CHECK(NINTERRUPT, n, n1, n2, i, i1, i2,
+	    else
+		MOD_ITERATE2_CHECK(NINTERRUPT, n, n1, n2, i, i1, i2,
 				  da[i] = R_POW(dx[i1], dy[i2]););
 	}
 	else if(TYPEOF(s1) == INTSXP )
-	    MOD_ITERATE_CHECK(NINTERRUPT, n, n1, n2, i, i1, i2,
+	    MOD_ITERATE2_CHECK(NINTERRUPT, n, n1, n2, i, i1, i2,
 			      REAL(ans)[i] = R_POW( R_INTEGER(s1, i1),
 						    REAL(s2)[i2]););
 	else if(TYPEOF(s2) == INTSXP )
-	    MOD_ITERATE_CHECK(NINTERRUPT, n, n1, n2, i, i1, i2,
+	    MOD_ITERATE2_CHECK(NINTERRUPT, n, n1, n2, i, i1, i2,
 			      REAL(ans)[i] = R_POW(REAL(s1)[i1],
 						   R_INTEGER(s2, i2)););
 	break;
     case MODOP:
 	if(TYPEOF(s1) == REALSXP && TYPEOF(s2) == REALSXP)
-	    MOD_ITERATE_CHECK(NINTERRUPT, n, n1, n2, i, i1, i2,
+	    MOD_ITERATE2_CHECK(NINTERRUPT, n, n1, n2, i, i1, i2,
 			      REAL(ans)[i] = myfmod(REAL(s1)[i1],
 						    REAL(s2)[i2]););
 	else if(TYPEOF(s1) == INTSXP )
-	    MOD_ITERATE_CHECK(NINTERRUPT, n, n1, n2, i, i1, i2,
+	    MOD_ITERATE2_CHECK(NINTERRUPT, n, n1, n2, i, i1, i2,
 			      REAL(ans)[i] = myfmod( R_INTEGER(s1, i1),
 						     REAL(s2)[i2]););
 	else if(TYPEOF(s2) == INTSXP )
-	    MOD_ITERATE_CHECK(NINTERRUPT, n, n1, n2, i, i1, i2,
+	    MOD_ITERATE2_CHECK(NINTERRUPT, n, n1, n2, i, i1, i2,
 			      REAL(ans)[i] = myfmod(REAL(s1)[i1],
 						    R_INTEGER(s2, i2)););
 	break;
     case IDIVOP:
 	if(TYPEOF(s1) == REALSXP && TYPEOF(s2) == REALSXP)
-	    MOD_ITERATE_CHECK(NINTERRUPT, n, n1, n2, i, i1, i2,
+	    MOD_ITERATE2_CHECK(NINTERRUPT, n, n1, n2, i, i1, i2,
 			      REAL(ans)[i] = myfloor(REAL(s1)[i1],
 						     REAL(s2)[i2]););
 	else if(TYPEOF(s1) == INTSXP )
-	    MOD_ITERATE_CHECK(NINTERRUPT, n, n1, n2, i, i1, i2,
+	    MOD_ITERATE2_CHECK(NINTERRUPT, n, n1, n2, i, i1, i2,
 			      REAL(ans)[i] = myfloor(R_INTEGER(s1, i1),
 						     REAL(s2)[i2]););
 	else if(TYPEOF(s2) == INTSXP )
-	    MOD_ITERATE_CHECK(NINTERRUPT, n, n1, n2, i, i1, i2,
+	    MOD_ITERATE2_CHECK(NINTERRUPT, n, n1, n2, i, i1, i2,
 			      REAL(ans)[i] = myfloor(REAL(s1)[i1],
 						     R_INTEGER(s2,i2)););
 	break;
@@ -1142,27 +1116,26 @@ static SEXP math1(SEXP sa, double(*f)(double), SEXP lcall)
     y = REAL(sy);
     naflag = 0;
     for (i = 0; i < n; i++) {
-	if (ISNAN(a[i]))
-	    y[i] = a[i];
-	else {
-	    y[i] = f(a[i]);
-	    if (ISNAN(y[i])) naflag = 1;
+	double x = a[i]; /* in case y == a */
+	/* This code assumes that ISNAN(x) implies ISNAN(f(x)), so we
+	   only need to check ISNAN(x) if ISNAN(f(x)) is true. */
+	y[i] = f(x);
+	if (ISNAN(y[i])) {
+	    if (ISNAN(x))
+		y[i] = x; /* make sure the incoming NaN is preserved */
+	    else
+		naflag = 1;
 	}
     }
     /* These are primitives, so need to use the call */
     if(naflag) warningcall(lcall, R_MSG_NA);
 
     if (sa != sy && ATTRIB(sa) != R_NilValue)
-	DUPLICATE_ATTRIB(sy, sa);
+	SHALLOW_DUPLICATE_ATTRIB(sy, sa);
     UNPROTECT(2);
     return sy;
 }
 
-#ifdef HAVE_TANPI
-// we document that tanpi(0.5) is NaN, but the draft C11 extension
-// does not require this and the Solaris version gives Inf.
-double Rtanpi(double);
-#endif
 
 SEXP attribute_hidden do_math1(SEXP call, SEXP op, SEXP args, SEXP env)
 {
@@ -1215,10 +1188,10 @@ SEXP attribute_hidden do_math1(SEXP call, SEXP op, SEXP args, SEXP env)
 	*/
     case 47: return MATH1(cospi);
     case 48: return MATH1(sinpi);
-#ifndef HAVE_TANPI
-    case 49: return MATH1(tanpi);
-#else
+#if defined(HAVE_TANPI) || defined(HAVE___TANPI)
     case 49: return MATH1(Rtanpi);
+#else
+    case 49: return MATH1(tanpi);
 #endif
 
     default:
@@ -1265,21 +1238,22 @@ SEXP attribute_hidden do_abs(SEXP call, SEXP op, SEXP args, SEXP env)
 	PROTECT(s);
 	/* Note: relying on INTEGER(.) === LOGICAL(.) : */
 	for(i = 0 ; i < n ; i++) {
-            int xi = INTEGER(x)[i];
+	    int xi = INTEGER(x)[i];
 	    INTEGER(s)[i] = (xi == NA_INTEGER) ? xi : abs(xi);
-        }
+	}
     } else if (TYPEOF(x) == REALSXP) {
 	R_xlen_t i, n = XLENGTH(x);
 	PROTECT(s = NO_REFERENCES(x) ? x : allocVector(REALSXP, n));
 	for(i = 0 ; i < n ; i++)
 	    REAL(s)[i] = fabs(REAL(x)[i]);
     } else if (isComplex(x)) {
+	SET_TAG(args, R_NilValue); /* cmathfuns want "z"; we might have "x" PR#16047 */
 	return do_cmathfuns(call, op, args, env);
     } else
 	errorcall(call, R_MSG_NONNUM_MATH);
 
     if (x != s && ATTRIB(x) != R_NilValue)
-	DUPLICATE_ATTRIB(s, x);
+	SHALLOW_DUPLICATE_ATTRIB(s, x);
     UNPROTECT(1);
     return s;
 }
@@ -1307,27 +1281,27 @@ static SEXP math2(SEXP sa, SEXP sb, double (*f)(double, double),
 
     /* for 0-length a we want the attributes of a, not those of b
        as no recycling will occur */
-#define SETUP_Math2				\
-    na = XLENGTH(sa);				\
-    nb = XLENGTH(sb);				\
-    if ((na == 0) || (nb == 0))	{		\
-	PROTECT(sy = allocVector(REALSXP, 0));	\
-	if (na == 0) DUPLICATE_ATTRIB(sy, sa);	\
-	UNPROTECT(1);				\
-	return(sy);				\
-    }						\
-    n = (na < nb) ? nb : na;			\
-    PROTECT(sa = coerceVector(sa, REALSXP));	\
-    PROTECT(sb = coerceVector(sb, REALSXP));	\
-    PROTECT(sy = allocVector(REALSXP, n));	\
-    a = REAL(sa);				\
-    b = REAL(sb);				\
-    y = REAL(sy);				\
+#define SETUP_Math2					\
+    na = XLENGTH(sa);					\
+    nb = XLENGTH(sb);					\
+    if ((na == 0) || (nb == 0))	{			\
+	PROTECT(sy = allocVector(REALSXP, 0));		\
+	if (na == 0) SHALLOW_DUPLICATE_ATTRIB(sy, sa);	\
+	UNPROTECT(1);					\
+	return(sy);					\
+    }							\
+    n = (na < nb) ? nb : na;				\
+    PROTECT(sa = coerceVector(sa, REALSXP));		\
+    PROTECT(sb = coerceVector(sb, REALSXP));		\
+    PROTECT(sy = allocVector(REALSXP, n));		\
+    a = REAL(sa);					\
+    b = REAL(sb);					\
+    y = REAL(sy);					\
     naflag = 0
 
     SETUP_Math2;
 
-    mod_iterate(na, nb, ia, ib) {
+    MOD_ITERATE2(n, na, nb, i, ia, ib, {
 //	if ((i+1) % NINTERRUPT == 0) R_CheckUserInterrupt();
 	ai = a[ia];
 	bi = b[ib];
@@ -1336,12 +1310,12 @@ static SEXP math2(SEXP sa, SEXP sb, double (*f)(double, double),
 	    y[i] = f(ai, bi);
 	    if (ISNAN(y[i])) naflag = 1;
 	}
-    }
+    });
 
-#define FINISH_Math2				\
-    if(naflag) warning(R_MSG_NA);		\
-    if (n == na)  DUPLICATE_ATTRIB(sy, sa);	\
-    else if (n == nb) DUPLICATE_ATTRIB(sy, sb);	\
+#define FINISH_Math2					\
+    if(naflag) warning(R_MSG_NA);			\
+    if (n == na)  SHALLOW_DUPLICATE_ATTRIB(sy, sa);	\
+    else if (n == nb) SHALLOW_DUPLICATE_ATTRIB(sy, sb);	\
     UNPROTECT(3)
 
     FINISH_Math2;
@@ -1364,7 +1338,7 @@ static SEXP math2_1(SEXP sa, SEXP sb, SEXP sI,
     SETUP_Math2;
     m_opt = asInteger(sI);
 
-    mod_iterate(na, nb, ia, ib) {
+    MOD_ITERATE2(n, na, nb, i, ia, ib, {
 //	if ((i+1) % NINTERRUPT == 0) R_CheckUserInterrupt();
 	ai = a[ia];
 	bi = b[ib];
@@ -1373,7 +1347,7 @@ static SEXP math2_1(SEXP sa, SEXP sb, SEXP sI,
 	    y[i] = f(ai, bi, m_opt);
 	    if (ISNAN(y[i])) naflag = 1;
 	}
-    }
+    });
     FINISH_Math2;
     return sy;
 } /* math2_1() */
@@ -1393,7 +1367,7 @@ static SEXP math2_2(SEXP sa, SEXP sb, SEXP sI1, SEXP sI2,
     i_1 = asInteger(sI1);
     i_2 = asInteger(sI2);
 
-    mod_iterate(na, nb, ia, ib) {
+    MOD_ITERATE2(n, na, nb, i, ia, ib, {
 //	if ((i+1) % NINTERRUPT == 0) R_CheckUserInterrupt();
 	ai = a[ia];
 	bi = b[ib];
@@ -1402,7 +1376,7 @@ static SEXP math2_2(SEXP sa, SEXP sb, SEXP sI1, SEXP sI2,
 	    y[i] = f(ai, bi, i_1, i_2);
 	    if (ISNAN(y[i])) naflag = 1;
 	}
-    }
+    });
     FINISH_Math2;
     return sy;
 } /* math2_2() */
@@ -1419,6 +1393,8 @@ static SEXP math2B(SEXP sa, SEXP sb, double (*f)(double, double, double *),
     double amax, *work;
     size_t nw;
 
+#define besselJY_max_nu 1e7
+
     if (!isNumeric(sa) || !isNumeric(sb))
 	errorcall(lcall, R_MSG_NONNUM_MATH);
 
@@ -1431,13 +1407,16 @@ static SEXP math2B(SEXP sa, SEXP sb, double (*f)(double, double, double *),
     amax = 0.0;
     for (i = 0; i < nb; i++) {
 	double av = b[i] < 0 ? -b[i] : b[i];
-	if (av > amax) amax = av;
+	if (amax < av)
+	    amax = av;
     }
+    if (amax > besselJY_max_nu)
+	amax = besselJY_max_nu; // and warning will happen in ../nmath/bessel_[jy].c
     const void *vmax = vmaxget();
     nw = 1 + (size_t)floor(amax);
     work = (double *) R_alloc(nw, sizeof(double));
 
-    mod_iterate(na, nb, ia, ib) {
+    MOD_ITERATE2(n, na, nb, i, ia, ib, {
 //	if ((i+1) % NINTERRUPT == 0) R_CheckUserInterrupt();
 	ai = a[ia];
 	bi = b[ib];
@@ -1446,7 +1425,7 @@ static SEXP math2B(SEXP sa, SEXP sb, double (*f)(double, double, double *),
 	    y[i] = f(ai, bi, work);
 	    if (ISNAN(y[i])) naflag = 1;
 	}
-    }
+    });
 
     vmaxset(vmax);
     FINISH_Math2;
@@ -1461,6 +1440,10 @@ static SEXP math2B(SEXP sa, SEXP sb, double (*f)(double, double, double *),
 
 SEXP attribute_hidden do_math2(SEXP call, SEXP op, SEXP args, SEXP env)
 {
+    /* For .Internals, fix up call so errorcall() behaves like error(). */
+    if (TYPEOF(CAR(call)) == SYMSXP && INTERNAL(CAR(call)) == op)
+	call = R_CurrentExpression;
+
     checkArity(op, args);
 
     if (isComplex(CAR(args)) ||
@@ -1471,8 +1454,8 @@ SEXP attribute_hidden do_math2(SEXP call, SEXP op, SEXP args, SEXP env)
     switch (PRIMVAL(op)) {
 
     case  0: return Math2(args, atan2);
-    case 10001: return Math2(args, fround);/* round(), src/nmath/fround.c */
-    case 10004: return Math2(args, fprec); /* signif(), src/nmath/fprec.c */
+    case 10001: return Math2(args, fround);// round(),  ../nmath/fround.c
+    case 10004: return Math2(args, fprec); // signif(), ../nmath/fprec.c
 
     case  2: return Math2(args, lbeta);
     case  3: return Math2(args, beta);
@@ -1508,8 +1491,7 @@ SEXP attribute_hidden do_math2(SEXP call, SEXP op, SEXP args, SEXP env)
     case 26: return Math2(args, psigamma);
 
     default:
-	errorcall(call,
-		  _("unimplemented real function of %d numeric arguments"), 2);
+	error(_("unimplemented real function of %d numeric arguments"), 2);
     }
     return op;			/* never used; to keep -Wall happy */
 }
@@ -1519,8 +1501,9 @@ SEXP attribute_hidden do_math2(SEXP call, SEXP op, SEXP args, SEXP env)
 /* This is a primitive SPECIALSXP with internal argument matching */
 SEXP attribute_hidden do_Math2(SEXP call, SEXP op, SEXP args, SEXP env)
 {
-    SEXP res, ap, call2;
+    SEXP res, call2;
     int n, nprotect = 2;
+    static SEXP do_Math2_formals = NULL;
 
     if (length(args) >= 2 &&
 	isSymbol(CADR(args)) && R_isMissing(CADR(args), env)) {
@@ -1535,7 +1518,8 @@ SEXP attribute_hidden do_Math2(SEXP call, SEXP op, SEXP args, SEXP env)
 
     n = length(args);
     if (n != 1 && n != 2)
-	error(_("%d arguments passed to '%s' which requires 1 or 2"),
+	error(ngettext("%d argument passed to '%s' which requires 1 or 2 arguments",
+		       "%d arguments passed to '%s'which requires 1 or 2 arguments", n),
 	      n, PRIMNAME(op));
 
     if (! DispatchGroup("Math", call2, op, args, env, &res)) {
@@ -1546,11 +1530,11 @@ SEXP attribute_hidden do_Math2(SEXP call, SEXP op, SEXP args, SEXP env)
 	} else {
 	    /* If named, do argument matching by name */
 	    if (TAG(args) != R_NilValue || TAG(CDR(args)) != R_NilValue) {
-		PROTECT(ap = CONS(R_NilValue, list1(R_NilValue)));
-		SET_TAG(ap,  install("x"));
-		SET_TAG(CDR(ap), install("digits"));
-		PROTECT(args = matchArgs(ap, args, call));
-		nprotect +=2;
+		if (do_Math2_formals == NULL)
+		    do_Math2_formals = allocFormalsList2(install("x"),
+							 install("digits"));
+		PROTECT(args = matchArgs(do_Math2_formals, args, call));
+		nprotect++;
 	    }
 	    if (length(CADR(args)) == 0)
 		errorcall(call, _("invalid second argument of length 0"));
@@ -1571,10 +1555,11 @@ SEXP attribute_hidden do_log1arg(SEXP call, SEXP op, SEXP args, SEXP env)
 
     if (DispatchGroup("Math", call, op, args, env, &res)) return res;
 
+    SEXP sLog = install("log");
     if(PRIMVAL(op) == 10) tmp = ScalarReal(10.0);
     if(PRIMVAL(op) == 2)  tmp = ScalarReal(2.0);
 
-    PROTECT(call2 = lang3(install("log"), CAR(args), tmp));
+    PROTECT(call2 = lang3(sLog, CAR(args), tmp));
     PROTECT(args2 = lang2(CAR(args), tmp));
     if (! DispatchGroup("Math", call2, op, args2, env, &res)) {
 	if (isComplex(CAR(args)))
@@ -1586,55 +1571,100 @@ SEXP attribute_hidden do_log1arg(SEXP call, SEXP op, SEXP args, SEXP env)
     return res;
 }
 
+#ifdef M_E
+# define DFLT_LOG_BASE M_E
+#else
+# define DFLT_LOG_BASE exp(1.)
+#endif
 
-/* This is a primitive SPECIALSXP with internal argument matching */
+/* do_log is a primitive SPECIALSXP with internal argument
+   matching. do_log_builtin is the BUILTIN version that expects
+   evaluated arguments to be passed as 'args', expect that these may
+   contain missing arguments.  */
 SEXP attribute_hidden do_log(SEXP call, SEXP op, SEXP args, SEXP env)
 {
-    SEXP res, ap = args, call2;
-    int n = length(args), nprotect = 2;
+    args = evalListKeepMissing(args, env);
+    return  do_log_builtin(call, op, args, env);
+}
 
-    if (n >= 2 && isSymbol(CADR(args)) && R_isMissing(CADR(args), env)) {
-#ifdef M_E
-	double e = M_E;
-#else
-	double e = exp(1.);
-#endif
-	PROTECT(args = list2(CAR(args), ScalarReal(e))); nprotect++;
+SEXP attribute_hidden do_log_builtin(SEXP call, SEXP op, SEXP args, SEXP env)
+{
+    PROTECT(args);
+    int n = length(args);
+    SEXP res;
+
+    if (n == 1 && TAG(args) == R_NilValue) {
+	/* log(x) is handled here */
+	SEXP x = CAR(args);
+	if (x != R_MissingArg && ! OBJECT(x)) {
+	    if (isComplex(x))
+		res = complex_math1(call, op, args, env);
+	    else
+		res = math1(x, R_log, call);
+	    UNPROTECT(1);
+	    return res;
+	}
+    }
+    else if (n == 2 &&
+	     TAG(args) == R_NilValue &&
+	     (TAG(CDR(args)) == R_NilValue || TAG(CDR(args)) == R_BaseSymbol)) {
+	/* log(x, y) or log(x, base = y) are handled here */
+	SEXP x = CAR(args);
+	SEXP y = CADR(args);
+	if (x != R_MissingArg && y != R_MissingArg &&
+	    ! OBJECT(x) && ! OBJECT(y)) {
+	    if (isComplex(x) || isComplex(y))
+		res = complex_math2(call, op, args, env);
+	    else
+		res = math2(x, y, logbase, call);
+	    UNPROTECT(1);
+	    return res;
+	}
     }
-    PROTECT(args = evalListKeepMissing(args, env));
-    PROTECT(call2 = lang2(CAR(call), R_NilValue));
-    SETCDR(call2, args);
 
-    if (! DispatchGroup("Math", call2, op, args, env, &res)) {
-	switch (n) {
-	case 1:
+    static SEXP do_log_formals = NULL;
+    static SEXP R_x_Symbol = NULL;
+    if (do_log_formals == NULL) {
+	R_x_Symbol = install("x");
+	do_log_formals = allocFormalsList2(R_x_Symbol, R_BaseSymbol);
+    }
+
+    if (n == 1) {
+	if (CAR(args) == R_MissingArg ||
+	    (TAG(args) != R_NilValue && TAG(args) != R_x_Symbol))
+	    error(_("argument \"%s\" is missing, with no default"), "x");
+
+	if (! DispatchGroup("Math", call, op, args, env, &res)) {
 	    if (isComplex(CAR(args)))
 		res = complex_math1(call, op, args, env);
 	    else
 		res = math1(CAR(args), R_log, call);
-	    break;
-	case 2:
-	{
-	    /* match argument names if supplied */
-	    PROTECT(ap = list2(R_NilValue, R_NilValue));
-	    SET_TAG(ap, install("x"));
-	    SET_TAG(CDR(ap), install("base"));
-	    PROTECT(args = matchArgs(ap, args, call));
-	    nprotect += 2;
+	}
+	UNPROTECT(1);
+	return res;
+    }
+    else {
+	/* match argument names if supplied */
+	/* will signal an error unless there are one or two arguments */
+	/* after the match, length(args) will be 2 */
+	PROTECT(args = matchArgs(do_log_formals, args, call));
+
+	if(CAR(args) == R_MissingArg)
+	    error(_("argument \"%s\" is missing, with no default"), "x");
+	if (CADR(args) == R_MissingArg)
+	    SETCADR(args, ScalarReal(DFLT_LOG_BASE));
+
+	if (! DispatchGroup("Math", call, op, args, env, &res)) {
 	    if (length(CADR(args)) == 0)
 		errorcall(call, _("invalid argument 'base' of length 0"));
 	    if (isComplex(CAR(args)) || isComplex(CADR(args)))
 		res = complex_math2(call, op, args, env);
 	    else
 		res = math2(CAR(args), CADR(args), logbase, call);
-	    break;
-	}
-	default:
-	    error(_("%d arguments passed to 'log' which requires 1 or 2"), n);
 	}
+	UNPROTECT(2);
+	return res;
     }
-    UNPROTECT(nprotect);
-    return res;
 }
 
 
@@ -1649,15 +1679,9 @@ SEXP attribute_hidden do_log(SEXP call, SEXP op, SEXP args, SEXP env)
 	if      (ISNA (a) || ISNA (b)|| ISNA (c)) y = NA_REAL;	\
 	else if (ISNAN(a) || ISNAN(b)|| ISNAN(c)) y = R_NaN;
 
-#define mod_iterate3(n1,n2,n3,i1,i2,i3) for (i=i1=i2=i3=0; i<n; \
-	i1 = (++i1==n1) ? 0 : i1,				\
-	i2 = (++i2==n2) ? 0 : i2,				\
-	i3 = (++i3==n3) ? 0 : i3,				\
-	++i)
-
 #define SETUP_Math3						\
     if (!isNumeric(sa) || !isNumeric(sb) || !isNumeric(sc))	\
-	errorcall(lcall, R_MSG_NONNUM_MATH);			\
+	error(R_MSG_NONNUM_MATH);			        \
 								\
     na = XLENGTH(sa);						\
     nb = XLENGTH(sb);						\
@@ -1677,12 +1701,12 @@ SEXP attribute_hidden do_log(SEXP call, SEXP op, SEXP args, SEXP env)
     y = REAL(sy);						\
     naflag = 0
 
-#define FINISH_Math3				\
-    if(naflag) warning(R_MSG_NA);		\
-						\
-    if (n == na) DUPLICATE_ATTRIB(sy, sa);	\
-    else if (n == nb) DUPLICATE_ATTRIB(sy, sb);	\
-    else if (n == nc) DUPLICATE_ATTRIB(sy, sc);	\
+#define FINISH_Math3					\
+    if(naflag) warning(R_MSG_NA);			\
+							\
+    if (n == na) SHALLOW_DUPLICATE_ATTRIB(sy, sa);	\
+    else if (n == nb) SHALLOW_DUPLICATE_ATTRIB(sy, sb);	\
+    else if (n == nc) SHALLOW_DUPLICATE_ATTRIB(sy, sc);	\
     UNPROTECT(4)
 
 static SEXP math3_1(SEXP sa, SEXP sb, SEXP sc, SEXP sI,
@@ -1697,7 +1721,7 @@ static SEXP math3_1(SEXP sa, SEXP sb, SEXP sc, SEXP sI,
     SETUP_Math3;
     i_1 = asInteger(sI);
 
-    mod_iterate3 (na, nb, nc, ia, ib, ic) {
+    MOD_ITERATE3(n, na, nb, nc, i, ia, ib, ic, {
 //	if ((i+1) % NINTERRUPT == 0) R_CheckUserInterrupt();
 	ai = a[ia];
 	bi = b[ib];
@@ -1707,7 +1731,7 @@ static SEXP math3_1(SEXP sa, SEXP sb, SEXP sc, SEXP sI,
 	    y[i] = f(ai, bi, ci, i_1);
 	    if (ISNAN(y[i])) naflag = 1;
 	}
-    }
+    });
 
     FINISH_Math3;
     return sy;
@@ -1726,7 +1750,7 @@ static SEXP math3_2(SEXP sa, SEXP sb, SEXP sc, SEXP sI, SEXP sJ,
     i_1 = asInteger(sI);
     i_2 = asInteger(sJ);
 
-    mod_iterate3 (na, nb, nc, ia, ib, ic) {
+    MOD_ITERATE3 (n, na, nb, nc, i, ia, ib, ic, {
 //	if ((i+1) % NINTERRUPT == 0) R_CheckUserInterrupt();
 	ai = a[ia];
 	bi = b[ib];
@@ -1736,7 +1760,7 @@ static SEXP math3_2(SEXP sa, SEXP sb, SEXP sc, SEXP sI, SEXP sJ,
 	    y[i] = f(ai, bi, ci, i_1, i_2);
 	    if (ISNAN(y[i])) naflag = 1;
 	}
-    }
+    });
 
     FINISH_Math3;
     return sy;
@@ -1767,7 +1791,7 @@ static SEXP math3B(SEXP sa, SEXP sb, SEXP sc,
     nw = 1 + (size_t)floor(amax);
     work = (double *) R_alloc(nw, sizeof(double));
 
-    mod_iterate3 (na, nb, nc, ia, ib, ic) {
+    MOD_ITERATE3 (n, na, nb, nc, i, ia, ib, ic, {
 //	if ((i+1) % NINTERRUPT == 0) R_CheckUserInterrupt();
 	ai = a[ia];
 	bi = b[ib];
@@ -1777,7 +1801,7 @@ static SEXP math3B(SEXP sa, SEXP sb, SEXP sc,
 	    y[i] = f(ai, bi, ci, work);
 	    if (ISNAN(y[i])) naflag = 1;
 	}
-    }
+    });
 
     FINISH_Math3;
     vmaxset(vmax);
@@ -1859,8 +1883,7 @@ SEXP attribute_hidden do_math3(SEXP call, SEXP op, SEXP args, SEXP env)
     case 47:  return Math3_2(args, qnbinom_mu);
 
     default:
-	errorcall(call,
-		  _("unimplemented real function of %d numeric arguments"), 3);
+	error(_("unimplemented real function of %d numeric arguments"), 3);
     }
     return op;			/* never used; to keep -Wall happy */
 } /* do_math3() */
@@ -1874,13 +1897,6 @@ SEXP attribute_hidden do_math3(SEXP call, SEXP op, SEXP args, SEXP env)
 	if      (ISNA (a)|| ISNA (b)|| ISNA (c)|| ISNA (d)) y = NA_REAL;\
 	else if (ISNAN(a)|| ISNAN(b)|| ISNAN(c)|| ISNAN(d)) y = R_NaN;
 
-#define mod_iterate4(n1,n2,n3,n4,i1,i2,i3,i4) for (i=i1=i2=i3=i4=0; i<n; \
-	i1 = (++i1==n1) ? 0 : i1,					\
-	i2 = (++i2==n2) ? 0 : i2,					\
-	i3 = (++i3==n3) ? 0 : i3,					\
-	i4 = (++i4==n4) ? 0 : i4,					\
-	++i)
-
 static SEXP math4(SEXP sa, SEXP sb, SEXP sc, SEXP sd,
 		  double (*f)(double, double, double, double), SEXP lcall)
 {
@@ -1891,7 +1907,7 @@ static SEXP math4(SEXP sa, SEXP sb, SEXP sc, SEXP sd,
 
 #define SETUP_Math4							\
     if(!isNumeric(sa)|| !isNumeric(sb)|| !isNumeric(sc)|| !isNumeric(sd))\
-	errorcall(lcall, R_MSG_NONNUM_MATH);				\
+	error(R_MSG_NONNUM_MATH);				        \
 									\
     na = XLENGTH(sa);							\
     nb = XLENGTH(sb);							\
@@ -1917,7 +1933,7 @@ static SEXP math4(SEXP sa, SEXP sb, SEXP sc, SEXP sd,
 
     SETUP_Math4;
 
-    mod_iterate4 (na, nb, nc, nd, ia, ib, ic, id) {
+    MOD_ITERATE4 (n, na, nb, nc, nd, i, ia, ib, ic, id, {
 //	if ((i+1) % NINTERRUPT == 0) R_CheckUserInterrupt();
 	ai = a[ia];
 	bi = b[ib];
@@ -1928,15 +1944,15 @@ static SEXP math4(SEXP sa, SEXP sb, SEXP sc, SEXP sd,
 	    y[i] = f(ai, bi, ci, di);
 	    if (ISNAN(y[i])) naflag = 1;
 	}
-    }
-
-#define FINISH_Math4				\
-    if(naflag) warning(R_MSG_NA);		\
-						\
-    if (n == na) DUPLICATE_ATTRIB(sy, sa);	\
-    else if (n == nb) DUPLICATE_ATTRIB(sy, sb);	\
-    else if (n == nc) DUPLICATE_ATTRIB(sy, sc);	\
-    else if (n == nd) DUPLICATE_ATTRIB(sy, sd);	\
+    });
+
+#define FINISH_Math4					\
+    if(naflag) warning(R_MSG_NA);			\
+							\
+    if (n == na) SHALLOW_DUPLICATE_ATTRIB(sy, sa);	\
+    else if (n == nb) SHALLOW_DUPLICATE_ATTRIB(sy, sb);	\
+    else if (n == nc) SHALLOW_DUPLICATE_ATTRIB(sy, sc);	\
+    else if (n == nd) SHALLOW_DUPLICATE_ATTRIB(sy, sd);	\
     UNPROTECT(5)
 
     FINISH_Math4;
@@ -1955,7 +1971,7 @@ static SEXP math4_1(SEXP sa, SEXP sb, SEXP sc, SEXP sd, SEXP sI, double (*f)(dou
     SETUP_Math4;
     i_1 = asInteger(sI);
 
-    mod_iterate4 (na, nb, nc, nd, ia, ib, ic, id) {
+    MOD_ITERATE4 (n, na, nb, nc, nd, i, ia, ib, ic, id, {
 //	if ((i+1) % NINTERRUPT == 0) R_CheckUserInterrupt();
 	ai = a[ia];
 	bi = b[ib];
@@ -1966,7 +1982,7 @@ static SEXP math4_1(SEXP sa, SEXP sb, SEXP sc, SEXP sd, SEXP sI, double (*f)(dou
 	    y[i] = f(ai, bi, ci, di, i_1);
 	    if (ISNAN(y[i])) naflag = 1;
 	}
-    }
+    });
     FINISH_Math4;
     return sy;
 } /* math4_1() */
@@ -1984,7 +2000,7 @@ static SEXP math4_2(SEXP sa, SEXP sb, SEXP sc, SEXP sd, SEXP sI, SEXP sJ,
     i_1 = asInteger(sI);
     i_2 = asInteger(sJ);
 
-    mod_iterate4 (na, nb, nc, nd, ia, ib, ic, id) {
+    MOD_ITERATE4 (n, na, nb, nc, nd, i, ia, ib, ic, id, {
 //	if ((i+1) % NINTERRUPT == 0) R_CheckUserInterrupt();
 	ai = a[ia];
 	bi = b[ib];
@@ -1995,7 +2011,7 @@ static SEXP math4_2(SEXP sa, SEXP sb, SEXP sc, SEXP sd, SEXP sI, SEXP sJ,
 	    y[i] = f(ai, bi, ci, di, i_1, i_2);
 	    if (ISNAN(y[i])) naflag = 1;
 	}
-    }
+    });
     FINISH_Math4;
     return sy;
 } /* math4_2() */
@@ -2038,8 +2054,7 @@ SEXP attribute_hidden do_math4(SEXP call, SEXP op, SEXP args, SEXP env)
     case 11: return Math4_2(args, ptukey);
     case 12: return Math4_2(args, qtukey);
     default:
-	errorcall(call,
-		  _("unimplemented real function of %d numeric arguments"), 4);
+	error(_("unimplemented real function of %d numeric arguments"), 4);
     }
     return op;			/* never used; to keep -Wall happy */
 }
@@ -2055,15 +2070,6 @@ SEXP attribute_hidden do_math4(SEXP call, SEXP op, SEXP args, SEXP env)
 	else if(ISNAN(a)|| ISNAN(b)|| ISNAN(c)|| ISNAN(d)|| ISNAN(e))	\
 		y = R_NaN;
 
-#define mod_iterate5(n1,n2,n3,n4,n5, i1,i2,i3,i4,i5)	\
- for (i=i1=i2=i3=i4=i5=0; i<n;				\
-	i1 = (++i1==n1) ? 0 : i1,			\
-	i2 = (++i2==n2) ? 0 : i2,			\
-	i3 = (++i3==n3) ? 0 : i3,			\
-	i4 = (++i4==n4) ? 0 : i4,			\
-	i5 = (++i5==n5) ? 0 : i5,			\
-	++i)
-
 static SEXP math5(SEXP sa, SEXP sb, SEXP sc, SEXP sd, SEXP se, double (*f)())
 {
     SEXP sy;
@@ -2073,7 +2079,7 @@ static SEXP math5(SEXP sa, SEXP sb, SEXP sc, SEXP sd, SEXP se, double (*f)())
 #define SETUP_Math5							\
     if (!isNumeric(sa) || !isNumeric(sb) || !isNumeric(sc) ||		\
 	!isNumeric(sd) || !isNumeric(se))				\
-	errorcall(lcall, R_MSG_NONNUM_MATH);				\
+	error(R_MSG_NONNUM_MATH);				        \
 									\
     na = XLENGTH(sa);							\
     nb = XLENGTH(sb);							\
@@ -2103,8 +2109,8 @@ static SEXP math5(SEXP sa, SEXP sb, SEXP sc, SEXP sd, SEXP se, double (*f)())
 
     SETUP_Math5;
 
-    mod_iterate5 (na, nb, nc, nd, ne,
-		  ia, ib, ic, id, ie) {
+    MOD_ITERATE5 (n, na, nb, nc, nd, ne,
+		  i, ia, ib, ic, id, ie, {
 //	if ((i+1) % NINTERRUPT == 0) R_CheckUserInterrupt();
 	ai = a[ia];
 	bi = b[ib];
@@ -2116,16 +2122,16 @@ static SEXP math5(SEXP sa, SEXP sb, SEXP sc, SEXP sd, SEXP se, double (*f)())
 	    y[i] = f(ai, bi, ci, di, ei);
 	    if (ISNAN(y[i])) naflag = 1;
 	}
-    }
-
-#define FINISH_Math5				\
-    if(naflag) warning(R_MSG_NA);		\
-						\
-    if (n == na) DUPLICATE_ATTRIB(sy, sa);	\
-    else if (n == nb) DUPLICATE_ATTRIB(sy, sb);	\
-    else if (n == nc) DUPLICATE_ATTRIB(sy, sc);	\
-    else if (n == nd) DUPLICATE_ATTRIB(sy, sd);	\
-    else if (n == ne) DUPLICATE_ATTRIB(sy, se);	\
+    });
+
+#define FINISH_Math5					\
+    if(naflag) warning(R_MSG_NA);			\
+							\
+    if (n == na) SHALLOW_DUPLICATE_ATTRIB(sy, sa);	\
+    else if (n == nb) SHALLOW_DUPLICATE_ATTRIB(sy, sb);	\
+    else if (n == nc) SHALLOW_DUPLICATE_ATTRIB(sy, sc);	\
+    else if (n == nd) SHALLOW_DUPLICATE_ATTRIB(sy, sd);	\
+    else if (n == ne) SHALLOW_DUPLICATE_ATTRIB(sy, se);	\
     UNPROTECT(6)
 
     FINISH_Math5;
@@ -2150,8 +2156,7 @@ SEXP attribute_hidden do_math5(SEXP call, SEXP op, SEXP args, SEXP env)
     case  3: return Math5(args, q...);
 #endif
     default:
-	errorcall(call,
-		  _("unimplemented real function of %d numeric arguments"), 5);
+	error(_("unimplemented real function of %d numeric arguments"), 5);
     }
     return op;			/* never used; to keep -Wall happy */
 } /* do_math5() */
diff --git a/src/main/arithmetic.h b/src/main/arithmetic.h
index 5a25c23..a2a022c 100644
--- a/src/main/arithmetic.h
+++ b/src/main/arithmetic.h
@@ -1,6 +1,6 @@
 /*
  *  R : A Computer Language for Statistical Data Analysis
- *  Copyright (C) 1998--2007	    The R Core Team.
+ *  Copyright (C) 1998--2014	    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
@@ -14,7 +14,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  */
 
 SEXP do_math1(SEXP, SEXP, SEXP, SEXP);
@@ -31,6 +31,35 @@ SEXP complex_math2(SEXP, SEXP, SEXP, SEXP);
 SEXP complex_unary(ARITHOP_TYPE, SEXP, SEXP);
 SEXP complex_binary(ARITHOP_TYPE, SEXP, SEXP);
 
+double R_pow(double x, double y);
+static R_INLINE double R_POW(double x, double y) /* handle x ^ 2 inline */
+{
+    return y == 2.0 ? x * x : R_pow(x, y);
+}
+
+/* some systems get this wrong, possibly depend on what libs are loaded */
+static R_INLINE double R_log(double x) {
+    return x > 0 ? log(x) : x == 0 ? R_NegInf : R_NaN;
+}
+
+/* Note that the behaviour of log(0) required is not necessarily that
+   mandated by C99 (-HUGE_VAL), and the behaviour of log(x < 0) is
+   optional in C99.  Some systems return -Inf for log(x < 0), e.g.
+   libsunmath on Solaris.
+*/
+static R_INLINE double logbase(double x, double base)
+{
+#ifdef HAVE_LOG10
+    if(base == 10) return x > 0 ? log10(x) : x == 0 ? R_NegInf : R_NaN;
+#endif
+#ifdef HAVE_LOG2
+    if(base == 2) return x > 0 ? log2(x) : x == 0 ? R_NegInf : R_NaN;
+#endif
+    return R_log(x) / R_log(base);
+}
+
+SEXP do_log_builtin(SEXP call, SEXP op, SEXP args, SEXP env);
+
 /* for binary operations */
 /* adapted from Radford Neal's pqR */
 static R_INLINE SEXP R_allocOrReuseVector(SEXP s1, SEXP s2,
@@ -65,3 +94,9 @@ static R_INLINE SEXP R_allocOrReuseVector(SEXP s1, SEXP s2,
 
     return allocVector(type, n);
 }
+
+#if defined(HAVE_TANPI) || defined(HAVE___TANPI)
+// we document that tanpi(0.5) is NaN, but TS 18661-4:2015
+// does not require this and the Solaris and macOS versions give Inf.
+double Rtanpi(double);
+#endif
diff --git a/src/main/array.c b/src/main/array.c
index 9f5106c..2dd4f24 100644
--- a/src/main/array.c
+++ b/src/main/array.c
@@ -1,8 +1,8 @@
 /*
  *  R : A Computer Language for Statistical Data Analysis
  *  Copyright (C) 1995, 1996  Robert Gentleman and Ross Ihaka
- *  Copyright (C) 1998-2013   The R Core Team
- *  Copyright (C) 2002-2008   The R Foundation
+ *  Copyright (C) 1998-2017   The R Core Team
+ *  Copyright (C) 2002-2015   The R Foundation
  *
  *  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
@@ -16,7 +16,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  */
 
 #ifdef HAVE_CONFIG_H
@@ -28,6 +28,12 @@
 #include <Rmath.h>
 #include <R_ext/RS.h>     /* for Calloc/Free */
 #include <R_ext/Applic.h> /* for dgemm */
+#include <R_ext/Itermacros.h>
+
+#include "duplicate.h"
+
+#include <complex.h>
+#include "Rcomplex.h"	/* toC99 */
 
 /* "GetRowNames" and "GetColNames" are utility routines which
  * locate and return the row names and column names from the
@@ -182,14 +188,14 @@ SEXP attribute_hidden do_matrix(SEXP call, SEXP op, SEXP args, SEXP rho)
 	    }
 	    break;
 	case RAWSXP:
-	    memset(RAW(ans), 0, N);
+	    if (N) memset(RAW(ans), 0, N);
 	    break;
 	default:
 	    /* don't fill with anything */
 	    ;
 	}
     }
-    if(!isNull(dimnames)&& length(dimnames) > 0)
+    if(!isNull(dimnames) && length(dimnames) > 0)
 	ans = dimnamesgets(ans, dimnames);
     UNPROTECT(1);
     return ans;
@@ -286,26 +292,27 @@ SEXP DropDims(SEXP x)
 
     PROTECT(x);
     dims = getAttrib(x, R_DimSymbol);
-    dimnames = getAttrib(x, R_DimNamesSymbol);
 
     /* Check that dropping will actually do something. */
     /* (1) Check that there is a "dim" attribute. */
 
     if (dims == R_NilValue) {
-	UNPROTECT(1);
+	UNPROTECT(1); /* x */
 	return x;
     }
     ndims = LENGTH(dims);
+    int *dim = INTEGER(dims); // used several times
 
     /* (2) Check whether there are redundant extents */
     n = 0;
     for (i = 0; i < ndims; i++)
-	if (INTEGER(dims)[i] != 1) n++;
+	if (dim[i] != 1) n++;
     if (n == ndims) {
-	UNPROTECT(1);
+	UNPROTECT(1); /* x */
 	return x;
     }
 
+    PROTECT(dimnames = getAttrib(x, R_DimNamesSymbol));
     if (n <= 1) {
 	/* We have reduced to a vector result.
 	   If that has length one, it is ambiguous which dimnames to use,
@@ -314,7 +321,7 @@ SEXP DropDims(SEXP x)
 	if (dimnames != R_NilValue) {
 	    if(XLENGTH(x) != 1) {
 		for (i = 0; i < LENGTH(dims); i++) {
-		    if (INTEGER(dims)[i] != 1) {
+		    if (dim[i] != 1) {
 			newnames = VECTOR_ELT(dimnames, i);
 			break;
 		    }
@@ -338,31 +345,40 @@ SEXP DropDims(SEXP x)
 	   subset.c & others have a contrary version that leaves the
 	   S4 class in, incorrectly, in the case of vectors.  JMC
 	   3/3/09 */
-/* 	if(IS_S4_OBJECT(x)) {/\* no longer valid subclass of array or
- 	matrix *\/ */
-/* 	    setAttrib(x, R_ClassSymbol, R_NilValue); */
-/* 	    UNSET_S4_OBJECT(x); */
-/* 	} */
-	UNPROTECT(1);
+/*	if(IS_S4_OBJECT(x)) {/\* no longer valid subclass of array or
+	matrix *\/ */
+/*	    setAttrib(x, R_ClassSymbol, R_NilValue); */
+/*	    UNSET_S4_OBJECT(x); */
+/*	} */
+	UNPROTECT(1); /* newnames */
     } else {
-	/* We have a lower dimensional array. */
+	// We have a lower dimensional array, and  n == length(newdims)
 	SEXP newdims, dnn, newnamesnames = R_NilValue;
-	dnn = getAttrib(dimnames, R_NamesSymbol);
+	PROTECT(dnn = getAttrib(dimnames, R_NamesSymbol));
 	PROTECT(newdims = allocVector(INTSXP, n));
 	for (i = 0, n = 0; i < ndims; i++)
-	    if (INTEGER(dims)[i] != 1)
-		INTEGER(newdims)[n++] = INTEGER(dims)[i];
+	    if (dim[i] != 1)
+		INTEGER(newdims)[n++] = dim[i];
+	if(!isNull(getAttrib(dims, R_NamesSymbol))) {
+	    SEXP nms_d = getAttrib(dims, R_NamesSymbol),
+		new_nms = PROTECT(allocVector(STRSXP, n));
+	    for (i = 0, n = 0; i < ndims; i++)
+		if (dim[i] != 1)
+		    SET_STRING_ELT(new_nms, n++, STRING_ELT(nms_d, i));
+	    setAttrib(newdims, R_NamesSymbol, new_nms);
+	    UNPROTECT(1);
+	}
+	Rboolean havenames = FALSE;
 	if (!isNull(dimnames)) {
-	    int havenames = 0;
 	    for (i = 0; i < ndims; i++)
-		if (INTEGER(dims)[i] != 1 &&
+		if (dim[i] != 1 &&
 		    VECTOR_ELT(dimnames, i) != R_NilValue)
-		    havenames = 1;
+		    havenames = TRUE;
 	    if (havenames) {
 		PROTECT(newnames = allocVector(VECSXP, n));
 		PROTECT(newnamesnames = allocVector(STRSXP, n));
 		for (i = 0, n = 0; i < ndims; i++) {
-		    if (INTEGER(dims)[i] != 1) {
+		    if (dim[i] != 1) {
 			if(!isNull(dnn))
 			    SET_STRING_ELT(newnamesnames, n,
 					   STRING_ELT(dnn, i));
@@ -372,19 +388,18 @@ SEXP DropDims(SEXP x)
 	    }
 	    else dimnames = R_NilValue;
 	}
-	PROTECT(dimnames);
 	setAttrib(x, R_DimNamesSymbol, R_NilValue);
 	setAttrib(x, R_DimSymbol, newdims);
-	if (dimnames != R_NilValue)
+	if (havenames)
 	{
 	    if(!isNull(dnn))
 		setAttrib(newnames, R_NamesSymbol, newnamesnames);
 	    setAttrib(x, R_DimNamesSymbol, newnames);
-	    UNPROTECT(2);
+	    UNPROTECT(2); /* newnamesnames, newnames */
 	}
-	UNPROTECT(2);
+	UNPROTECT(2); /* newdims, dnn */
     }
-    UNPROTECT(1);
+    UNPROTECT(2); /* dimnames, x */
     return x;
 }
 
@@ -421,12 +436,17 @@ SEXP attribute_hidden do_length(SEXP call, SEXP op, SEXP args, SEXP rho)
        DispatchOrEval(call, op, "length", args, rho, &ans, 0, 1)) {
 	if (length(ans) == 1 && TYPEOF(ans) == REALSXP) {
 	    double d = REAL(ans)[0];
-	    if (R_FINITE(d) && d >= 0. && d <= INT_MAX && floor(d) == d)
-		return coerceVector(ans, INTSXP);
+	    if (R_FINITE(d) && d >= 0. && d <= INT_MAX && floor(d) == d) {
+                PROTECT(ans);
+                ans = coerceVector(ans, INTSXP);
+                UNPROTECT(1);
+                return(ans);
+            }
 	}
 	return(ans);
     }
 
+
 #ifdef LONG_VECTOR_SUPPORT
     // or use IS_LONG_VEC
     R_xlen_t len = xlength(x);
@@ -435,6 +455,112 @@ SEXP attribute_hidden do_length(SEXP call, SEXP op, SEXP args, SEXP rho)
     return ScalarInteger(length(x));
 }
 
+R_len_t attribute_hidden dispatch_length(SEXP x, SEXP call, SEXP rho) {
+    R_xlen_t len = dispatch_xlength(x, call, rho);
+#ifdef LONG_VECTOR_SUPPORT
+    if (len > INT_MAX) return R_BadLongVector(x, __FILE__, __LINE__);
+#endif
+    return (R_len_t) len;
+}
+
+R_xlen_t attribute_hidden dispatch_xlength(SEXP x, SEXP call, SEXP rho) {
+    static SEXP length_op = NULL;
+    if (isObject(x)) {
+        SEXP len, args;
+        if (length_op == NULL)
+            length_op = R_Primitive("length");
+        PROTECT(args = list1(x));
+        if (DispatchOrEval(call, length_op, "length", args, rho, &len, 0, 1)) {
+            UNPROTECT(1);
+            return (R_xlen_t)
+                (TYPEOF(len) == REALSXP ? REAL(len)[0] : asInteger(len));
+        }
+        UNPROTECT(1);
+    }
+    return(xlength(x));
+}
+
+// auxiliary for do_lengths_*(), i.e., R's lengths()
+static R_xlen_t getElementLength(SEXP x, R_xlen_t i, SEXP call, SEXP rho) {
+    SEXP x_elt = dispatch_subset2(x, i, call, rho);
+    return(dispatch_xlength(x_elt, call, rho));
+}
+
+#ifdef LONG_VECTOR_SUPPORT
+static SEXP do_lengths_long(SEXP x, SEXP call, SEXP rho)
+{
+    SEXP ans;
+    R_xlen_t x_len, i;
+    double *ans_elt;
+
+    x_len = dispatch_xlength(x, call, rho);
+    PROTECT(ans = allocVector(REALSXP, x_len));
+    for (i = 0, ans_elt = REAL(ans); i < x_len; i++, ans_elt++)
+        *ans_elt = (double) getElementLength(x, i, call, rho);
+    UNPROTECT(1);
+    return ans;
+}
+#endif
+
+SEXP attribute_hidden do_lengths(SEXP call, SEXP op, SEXP args, SEXP rho)
+{
+    checkArity(op, args);
+    SEXP x = CAR(args), ans;
+    R_xlen_t x_len, i;
+    int *ans_elt;
+    int useNames = asLogical(CADR(args));
+    if (useNames == NA_LOGICAL)
+	error(_("invalid '%s' value"), "use.names");
+
+    if (DispatchOrEval(call, op, "lengths", args, rho, &ans, 0, 1))
+      return(ans);
+
+    Rboolean isList = isVectorList(x) || isS4(x);
+    if(!isList) switch(TYPEOF(x)) {
+	case NILSXP:
+	case CHARSXP:
+	case LGLSXP:
+	case INTSXP:
+	case REALSXP:
+	case CPLXSXP:
+	case STRSXP:
+	case RAWSXP:
+	    break;
+	default:
+	    error(_("'%s' must be a list or atomic vector"), "x");
+    }
+    x_len = dispatch_xlength(x, call, rho);
+    PROTECT(ans = allocVector(INTSXP, x_len));
+    if(isList) {
+	for (i = 0, ans_elt = INTEGER(ans); i < x_len; i++, ans_elt++) {
+	    R_xlen_t x_elt_len = getElementLength(x, i, call, rho);
+#ifdef LONG_VECTOR_SUPPORT
+	    if (x_elt_len > INT_MAX) {
+		ans = do_lengths_long(x, call, rho);
+		UNPROTECT(1);
+		PROTECT(ans);
+		break;
+	    }
+#endif
+	    *ans_elt = (int)x_elt_len;
+	}
+    } else { // atomic: every element has length 1
+	for (i = 0, ans_elt = INTEGER(ans); i < x_len; i++, ans_elt++)
+	    *ans_elt = 1;
+    }
+    SEXP dim = getAttrib(x, R_DimSymbol);
+    if(!isNull(dim)) {
+        setAttrib(ans, R_DimSymbol, dim);
+    }
+    if(useNames) {
+	SEXP names = getAttrib(x, R_NamesSymbol);
+	if(!isNull(names)) setAttrib(ans, R_NamesSymbol, names);
+        SEXP dimnames = getAttrib(x, R_DimNamesSymbol);
+        if(!isNull(dimnames)) setAttrib(ans, R_DimNamesSymbol, dimnames);
+    }
+    UNPROTECT(1);
+    return ans;
+}
 
 SEXP attribute_hidden do_rowscols(SEXP call, SEXP op, SEXP args, SEXP rho)
 {
@@ -469,173 +595,619 @@ SEXP attribute_hidden do_rowscols(SEXP call, SEXP op, SEXP args, SEXP rho)
     return ans;
 }
 
+/*
+ Whenever vector x contains NaN or Inf (or -Inf), the function returns TRUE.
+ It can be imprecise: it can return TRUE in other cases as well.
+
+ A precise version of the function could be implemented as
+
+       for (R_xlen_t i = 0; i < n; i++)
+           if (!R_FINITE(x[i])) return TRUE;
+       return FALSE;
+
+ The present version is imprecise, but faster.
+*/
+static Rboolean mayHaveNaNOrInf(double *x, R_xlen_t n)
+{
+    if ((n&1) != 0 && !R_FINITE(x[0]))
+	return TRUE;
+    for (R_xlen_t i = n&1; i < n; i += 2)
+	/* A precise version could use this condition:
+	 *
+	 * !R_FINITE(x[i]+x[i+1]) && (!R_FINITE(x[i]) || !R_FINITE(x[i+1]))
+	 *
+	 * The present imprecise version has been found to be faster
+	 * with GCC and ICC in the common case when the sum of the two
+	 * values is always finite.
+	 *
+	 * The present version is imprecise because the sum of two very
+	 * large finite values (e.g. 1e308) may be infinite.
+	 */
+	if (!R_FINITE(x[i]+x[i+1]))
+	    return TRUE;
+    return FALSE;
+}
+
+/*
+ This is an experimental version that has been observed to run fast on some
+ SIMD hardware with GCC and ICC.
+ Note that the OpenMP reduction assumes associativity of addition, which is
+ safe here, because the result is only used for an imprecise test for
+ the presence of NaN and Inf values.
+*/
+static Rboolean mayHaveNaNOrInf_simd(double *x, R_xlen_t n)
+{
+    double s = 0;
+    /* SIMD reduction is supported since OpenMP 4.0. The value of _OPENMP is
+       unreliable in some compilers, so we depend on HAVE_OPENMP_SIMDRED,
+       which is normally set by configure based on a test. */
+    /* _OPENMP >= 201307 */
+#if defined(_OPENMP) && HAVE_OPENMP_SIMDRED
+    #pragma omp simd reduction(+:s)
+#endif
+    for (R_xlen_t i = 0; i < n; i++)
+	s += x[i];
+    return !R_FINITE(s);
+}
+
+static Rboolean cmayHaveNaNOrInf(Rcomplex *x, R_xlen_t n)
+{
+    /* With HAVE_FORTRAN_DOUBLE_COMPLEX set, it should be clear that
+       Rcomplex has no padding, so we could probably use mayHaveNaNOrInf,
+       but better safe than sorry... */
+    if ((n&1) != 0 && (!R_FINITE(x[0].r) || !R_FINITE(x[0].i)))
+	return TRUE;
+    for (R_xlen_t i = n&1; i < n; i += 2)
+	if (!R_FINITE(x[i].r+x[i].i+x[i+1].r+x[i+1].i))
+	    return TRUE;
+    return FALSE;
+}
+
+/* experimental version for SIMD hardware (see also mayHaveNaNOrInf_simd) */
+static Rboolean cmayHaveNaNOrInf_simd(Rcomplex *x, R_xlen_t n)
+{
+    double s = 0;
+    /* _OPENMP >= 201307 - see mayHaveNaNOrInf_simd */
+#if defined(_OPENMP) && HAVE_OPENMP_SIMDRED
+    #pragma omp simd reduction(+:s)
+#endif
+    for (R_xlen_t i = 0; i < n; i++) {
+	s += x[i].r;
+	s += x[i].i;
+    }
+    return !R_FINITE(s);
+}
+
+static void internal_matprod(double *x, int nrx, int ncx,
+                             double *y, int nry, int ncy, double *z)
+{
+    LDOUBLE sum;
+#define MATPROD_BODY					\
+    R_xlen_t NRX = nrx, NRY = nry;			\
+    for (int i = 0; i < nrx; i++)			\
+	for (int k = 0; k < ncy; k++) {			\
+	    sum = 0.0;					\
+	    for (int j = 0; j < ncx; j++)		\
+		sum += x[i + j * NRX] * y[j + k * NRY];	\
+	    z[i + k * NRX] = (double) sum;		\
+	}
+    MATPROD_BODY;
+}
+
+static void simple_matprod(double *x, int nrx, int ncx,
+                           double *y, int nry, int ncy, double *z)
+{
+    double sum;
+    MATPROD_BODY;
+}
+
+static void internal_crossprod(double *x, int nrx, int ncx,
+                               double *y, int nry, int ncy, double *z)
+{
+    LDOUBLE sum;
+#define CROSSPROD_BODY					\
+    R_xlen_t NRX = nrx, NRY = nry, NCX = ncx;		\
+    for (int i = 0; i < ncx; i++)			\
+	for (int k = 0; k < ncy; k++) {			\
+	    sum = 0.0;					\
+	    for (int j = 0; j < nrx; j++)		\
+		sum += x[j + i * NRX] * y[j + k * NRY];	\
+	    z[i + k * NCX] = (double) sum;		\
+	}
+    CROSSPROD_BODY;
+}
+
+static void simple_crossprod(double *x, int nrx, int ncx,
+                             double *y, int nry, int ncy, double *z)
+{
+    double sum;
+    CROSSPROD_BODY;
+}
+
+static void internal_tcrossprod(double *x, int nrx, int ncx,
+                                double *y, int nry, int ncy, double *z)
+{
+    LDOUBLE sum;
+#define TCROSSPROD_BODY					\
+    R_xlen_t NRX = nrx, NRY = nry;			\
+    for (int i = 0; i < nrx; i++)			\
+	for (int k = 0; k < nry; k++) {			\
+	    sum = 0.0;					\
+	    for (int j = 0; j < ncx; j++)		\
+		sum += x[i + j * NRX] * y[k + j * NRY];	\
+	    z[i + k * NRX] = (double) sum;		\
+	}
+    TCROSSPROD_BODY;
+}
+
+static void simple_tcrossprod(double *x, int nrx, int ncx,
+                              double *y, int nry, int ncy, double *z)
+{
+    double sum;
+    TCROSSPROD_BODY;
+}
+
+
 static void matprod(double *x, int nrx, int ncx,
 		    double *y, int nry, int ncy, double *z)
 {
-    char *transa = "N", *transb = "N";
-    double one = 1.0, zero = 0.0;
-    LDOUBLE sum;
-    Rboolean have_na = FALSE;
     R_xlen_t NRX = nrx, NRY = nry;
+    if (nrx == 0 || ncx == 0 || nry == 0 || ncy == 0) {
+	/* zero-extent operations should return zeroes */
+	for(R_xlen_t i = 0; i < NRX*ncy; i++) z[i] = 0;
+	return;
+    }
 
-    if (nrx > 0 && ncx > 0 && nry > 0 && ncy > 0) {
+    switch(R_Matprod) {
+	case MATPROD_DEFAULT:
 	/* Don't trust the BLAS to handle NA/NaNs correctly: PR#4582
 	 * The test is only O(n) here.
+	 *
+	 * MKL disclaimer: "LAPACK routines assume that input matrices
+	 * do not contain IEEE 754 special values such as INF or NaN values.
+	 * Using these special values may cause LAPACK to return unexpected
+	 * results or become unstable."
 	 */
-	for (R_xlen_t i = 0; i < NRX*ncx; i++)
-	    if (ISNAN(x[i])) {have_na = TRUE; break;}
-	if (!have_na)
-	    for (R_xlen_t i = 0; i < NRY*ncy; i++)
-		if (ISNAN(y[i])) {have_na = TRUE; break;}
-	if (have_na) {
-	    for (int i = 0; i < nrx; i++)
-		for (int k = 0; k < ncy; k++) {
-		    sum = 0.0;
-		    for (int j = 0; j < ncx; j++)
-			sum += x[i + j * NRX] * y[j + k * NRY];
-		    z[i + k * NRX] = (double) sum;
-		}
-	} else
-	    F77_CALL(dgemm)(transa, transb, &nrx, &ncy, &ncx, &one,
-			    x, &nrx, y, &nry, &zero, z, &nrx);
-    } else /* zero-extent operations should return zeroes */
-	for(R_xlen_t i = 0; i < NRX*ncy; i++) z[i] = 0;
+	    if (mayHaveNaNOrInf(x, NRX*ncx) || mayHaveNaNOrInf(y, NRY*ncy)) {
+		simple_matprod(x, nrx, ncx, y, nry, ncy, z);
+		return;
+	    }
+	    break; /* use blas */
+	case MATPROD_INTERNAL:
+	    internal_matprod(x, nrx, ncx, y, nry, ncy, z);
+	    return;
+	case MATPROD_BLAS:
+	    break;
+	case MATPROD_DEFAULT_SIMD:
+	    if (mayHaveNaNOrInf_simd(x, NRX*ncx) ||
+		    mayHaveNaNOrInf_simd(y, NRY*ncy)) {
+		simple_matprod(x, nrx, ncx, y, nry, ncy, z);
+		return;
+	    }
+	    break; /* use blas */
+    }
+
+    char *transN = "N", *transT = "T";
+    double one = 1.0, zero = 0.0;
+    int ione = 1;
+
+    if (ncy == 1) /* matrix-vector or dot product */
+	F77_CALL(dgemv)(transN, &nrx, &ncx, &one, x,
+			&nrx, y, &ione, &zero, z, &ione);
+    else if (nrx == 1) /* vector-matrix */
+	/* Instead of xY, compute (xY)^T == (Y^T)(x^T)
+	   The result is a vector, so transposing its content is no-op */
+	F77_CALL(dgemv)(transT, &nry, &ncy, &one, y,
+			&nry, x, &ione, &zero, z, &ione);
+    else /* matrix-matrix or outer product */
+	F77_CALL(dgemm)(transN, transN, &nrx, &ncy, &ncx, &one,
+			x, &nrx, y, &nry, &zero, z, &nrx);
+}
+
+static void internal_cmatprod(Rcomplex *x, int nrx, int ncx,
+                              Rcomplex *y, int nry, int ncy, Rcomplex *z)
+{
+    LDOUBLE sum_i, sum_r;
+#define CMATPROD_BODY					    \
+    int i, j, k;					    \
+    double complex xij, yjk;				    \
+    R_xlen_t NRX = nrx, NRY = nry;			    \
+    for (i = 0; i < nrx; i++)				    \
+	for (k = 0; k < ncy; k++) {			    \
+	    sum_r = 0.0;				    \
+	    sum_i = 0.0;				    \
+	    for (j = 0; j < ncx; j++) {			    \
+		xij = toC99(x + (i + j * NRX));		    \
+		yjk = toC99(y + (j + k * NRY));		    \
+		sum_r += creal(xij * yjk);		    \
+		sum_i += cimag(xij * yjk);		    \
+	    }						    \
+	    z[i + k * NRX].r = (double) sum_r;		    \
+	    z[i + k * NRX].i = (double) sum_i;		    \
+	}
+    CMATPROD_BODY;
+}
+
+static void simple_cmatprod(Rcomplex *x, int nrx, int ncx,
+                            Rcomplex *y, int nry, int ncy, Rcomplex *z)
+{
+    double sum_i, sum_r;
+    CMATPROD_BODY;
+}
+
+static void internal_ccrossprod(Rcomplex *x, int nrx, int ncx,
+                                Rcomplex *y, int nry, int ncy, Rcomplex *z)
+{
+    LDOUBLE sum_i, sum_r;
+#define CCROSSPROD_BODY					    \
+    int i, j, k;					    \
+    double complex xji, yjk;				    \
+    R_xlen_t NRX = nrx, NRY = nry, NCX = ncx;		    \
+    for (i = 0; i < ncx; i++)				    \
+	for (k = 0; k < ncy; k++) {			    \
+	    sum_r = 0.0;				    \
+	    sum_i = 0.0;				    \
+	    for (j = 0; j < nrx; j++) {			    \
+		xji = toC99(x + (j + i * NRX));		    \
+		yjk = toC99(y + (j + k * NRY));		    \
+		sum_r += creal(xji * yjk);		    \
+		sum_i += cimag(xji * yjk);		    \
+	    }						    \
+	    z[i + k * NCX].r = (double) sum_r;		    \
+	    z[i + k * NCX].i = (double) sum_i;		    \
+	}
+    CCROSSPROD_BODY;
+}
+
+static void simple_ccrossprod(Rcomplex *x, int nrx, int ncx,
+                              Rcomplex *y, int nry, int ncy, Rcomplex *z)
+{
+    double sum_i, sum_r;
+    CCROSSPROD_BODY;
+}
+
+static void internal_tccrossprod(Rcomplex *x, int nrx, int ncx,
+                                 Rcomplex *y, int nry, int ncy, Rcomplex *z)
+{
+    LDOUBLE sum_i, sum_r;
+#define TCCROSSPROD_BODY				    \
+    int i, j, k;					    \
+    double complex xij, ykj;				    \
+    R_xlen_t NRX = nrx, NRY = nry;			    \
+    for (i = 0; i < nrx; i++)				    \
+	for (k = 0; k < nry; k++) {			    \
+	    sum_r = 0.0;				    \
+	    sum_i = 0.0;				    \
+	    for (j = 0; j < ncx; j++) {			    \
+		xij = toC99(x + (i + j * NRX));		    \
+		ykj = toC99(y + (k + j * NRY));		    \
+		sum_r += creal(xij * ykj);		    \
+		sum_i += cimag(xij * ykj);		    \
+	    }						    \
+	    z[i + k * NRX].r = (double) sum_r;		    \
+	    z[i + k * NRX].i = (double) sum_i;		    \
+	}
+    TCCROSSPROD_BODY;
+}
+
+static void simple_tccrossprod(Rcomplex *x, int nrx, int ncx,
+                               Rcomplex *y, int nry, int ncy, Rcomplex *z)
+{
+    double sum_i, sum_r;
+    TCCROSSPROD_BODY;
 }
 
 static void cmatprod(Rcomplex *x, int nrx, int ncx,
 		     Rcomplex *y, int nry, int ncy, Rcomplex *z)
 {
-#ifdef HAVE_FORTRAN_DOUBLE_COMPLEX
-    char *transa = "N", *transb = "N";
-    Rcomplex one, zero;
-
-    one.r = 1.0; one.i = zero.r = zero.i = 0.0;
-    if (nrx > 0 && ncx > 0 && nry > 0 && ncy > 0) {
-	F77_CALL(zgemm)(transa, transb, &nrx, &ncy, &ncx, &one,
-			x, &nrx, y, &nry, &zero, z, &nrx);
-    } else { /* zero-extent operations should return zeroes */
-	R_xlen_t NRX = nrx;
+    R_xlen_t NRX = nrx, NRY = nry;
+    if (nrx == 0 || ncx == 0 || nry == 0 || ncy == 0) {
+	/* zero-extent operations should return zeroes */
 	for(R_xlen_t i = 0; i < NRX*ncy; i++) z[i].r = z[i].i = 0;
+	return;
     }
-#else
-    int i, j, k;
-    double xij_r, xij_i, yjk_r, yjk_i;
-    LDOUBLE sum_i, sum_r;
 
-    R_xlen_t NRX = nrx, NRY = nry;
-    for (i = 0; i < nrx; i++)
-	for (k = 0; k < ncy; k++) {
-	    z[i + k * NRX].r = NA_REAL;
-	    z[i + k * NRX].i = NA_REAL;
-	    sum_r = 0.0;
-	    sum_i = 0.0;
-	    for (j = 0; j < ncx; j++) {
-		xij_r = x[i + j * NRX].r;
-		xij_i = x[i + j * NRX].i;
-		yjk_r = y[j + k * NRY].r;
-		yjk_i = y[j + k * NRY].i;
-		if (ISNAN(xij_r) || ISNAN(xij_i)
-		    || ISNAN(yjk_r) || ISNAN(yjk_i))
-		    goto next_ik;
-		sum_r += (xij_r * yjk_r - xij_i * yjk_i);
-		sum_i += (xij_r * yjk_i + xij_i * yjk_r);
+#ifndef HAVE_FORTRAN_DOUBLE_COMPLEX
+    if (R_Matprod == MATPROD_INTERNAL)
+	internal_cmatprod(x, nrx, ncx, y, nry, ncy, z);
+    else
+	simple_cmatprod(x, nrx, ncx, y, nry, ncy, z);
+#else
+    switch(R_Matprod) {
+	case MATPROD_DEFAULT:
+	    if (cmayHaveNaNOrInf(x, NRX*ncx) || cmayHaveNaNOrInf(y, NRY*ncy)) {
+		simple_cmatprod(x, nrx, ncx, y, nry, ncy, z);
+		return;
 	    }
-	    z[i + k * NRX].r = sum_r;
-	    z[i + k * NRX].i = sum_i;
-	next_ik:
-	    ;
-	}
+	    break; /* use blas */
+	case MATPROD_INTERNAL:
+	    internal_cmatprod(x, nrx, ncx, y, nry, ncy, z);
+	    return;
+	case MATPROD_BLAS:
+	    break;
+	case MATPROD_DEFAULT_SIMD:
+	    if (cmayHaveNaNOrInf_simd(x, NRX*ncx) ||
+		    cmayHaveNaNOrInf_simd(y, NRY*ncy)) {
+		simple_cmatprod(x, nrx, ncx, y, nry, ncy, z);
+		return;
+	    }
+	    break; /* use blas */
+    }
+
+    char *transa = "N", *transb = "N";
+    Rcomplex one, zero;
+    one.r = 1.0; one.i = zero.r = zero.i = 0.0;
+
+    F77_CALL(zgemm)(transa, transb, &nrx, &ncy, &ncx, &one,
+                    x, &nrx, y, &nry, &zero, z, &nrx);
 #endif
 }
 
 static void symcrossprod(double *x, int nr, int nc, double *z)
 {
-    char *trans = "T", *uplo = "U";
-    double one = 1.0, zero = 0.0;
-    R_xlen_t NC = nc;
-    if (nr > 0 && nc > 0) {
-	F77_CALL(dsyrk)(uplo, trans, &nc, &nr, &one, x, &nr, &zero, z, &nc);
-	for (int i = 1; i < nc; i++)
-	    for (int j = 0; j < i; j++) z[i + NC *j] = z[j + NC * i];
-    } else { /* zero-extent operations should return zeroes */
+    R_xlen_t NR = nr, NC = nc;
+    if (nr == 0 || nc == 0) {
+	/* zero-extent operations should return zeroes */
 	for(R_xlen_t i = 0; i < NC*NC; i++) z[i] = 0;
+	return;
     }
 
+    switch(R_Matprod) {
+	case MATPROD_DEFAULT:
+	    /* see matprod for more details */
+	    if (mayHaveNaNOrInf(x, NR*nc)) {
+		simple_crossprod(x, nr, nc, x, nr, nc, z);
+		return;
+	    }
+	    break; /* use blas */
+	case MATPROD_INTERNAL:
+	    internal_crossprod(x, nr, nc, x, nr, nc, z);
+	    return;
+	case MATPROD_BLAS:
+	    break;
+	case MATPROD_DEFAULT_SIMD:
+	    if (mayHaveNaNOrInf_simd(x, NR*nc))  {
+		simple_crossprod(x, nr, nc, x, nr, nc, z);
+		return;
+	    }
+	    break; /* use blas */
+    }
+
+    char *trans = "T", *uplo = "U";
+    double one = 1.0, zero = 0.0;
+
+    F77_CALL(dsyrk)(uplo, trans, &nc, &nr, &one, x, &nr, &zero, z, &nc);
+    for (int i = 1; i < nc; i++)
+	for (int j = 0; j < i; j++) z[i + NC *j] = z[j + NC * i];
 }
 
 static void crossprod(double *x, int nrx, int ncx,
 		      double *y, int nry, int ncy, double *z)
 {
-    char *transa = "T", *transb = "N";
-    double one = 1.0, zero = 0.0;
-    if (nrx > 0 && ncx > 0 && nry > 0 && ncy > 0) {
-	F77_CALL(dgemm)(transa, transb, &ncx, &ncy, &nrx, &one,
-			x, &nrx, y, &nry, &zero, z, &ncx);
-    } else { /* zero-extent operations should return zeroes */
+    R_xlen_t NRX = nrx, NRY = nry;
+    if (nrx == 0 || ncx == 0 || nry == 0 || ncy == 0) {
+	/* zero-extent operations should return zeroes */
 	R_xlen_t NCX = ncx;
 	for(R_xlen_t i = 0; i < NCX*ncy; i++) z[i] = 0;
+	return;
+    }
+
+    switch(R_Matprod) {
+	case MATPROD_DEFAULT:
+	    /* see matprod for more details */
+	    if (mayHaveNaNOrInf(x, NRX*ncx) || mayHaveNaNOrInf(y, NRY*ncy)) {
+		simple_crossprod(x, nrx, ncx, y, nry, ncy, z);
+		return;
+	    }
+	    break; /* use blas */
+	case MATPROD_INTERNAL:
+	    internal_crossprod(x, nrx, ncx, y, nry, ncy, z);
+	    return;
+	case MATPROD_BLAS:
+	    break;
+	case MATPROD_DEFAULT_SIMD:
+	    if (mayHaveNaNOrInf_simd(x, NRX*ncx) ||
+		    mayHaveNaNOrInf_simd(y, NRY*ncy)) {
+		simple_crossprod(x, nrx, ncx, y, nry, ncy, z);
+		return;
+	    }
+	    break; /* use blas */
     }
+
+    char *transT = "T", *transN = "N";
+    double one = 1.0, zero = 0.0;
+    int ione = 1;
+
+    if (ncy == 1) /* matrix-vector or dot product */
+	F77_CALL(dgemv)(transT, &nrx, &ncx, &one, x,
+			&nrx, y, &ione, &zero, z, &ione);
+    else if (ncx == 1) /* vector-matrix */
+	/* Instead of (x^T)Y, compute ((x^T)Y)^T == (Y^T)x
+	   The result is a vector, so transposing its content is no-op */
+	F77_CALL(dgemv)(transT, &nry, &ncy, &one, y,
+			&nry, x, &ione, &zero, z, &ione);
+    else /* matrix-matrix  or outer product */
+	F77_CALL(dgemm)(transT, transN, &ncx, &ncy, &nrx, &one,
+		        x, &nrx, y, &nry, &zero, z, &ncx);
 }
 
 static void ccrossprod(Rcomplex *x, int nrx, int ncx,
 		       Rcomplex *y, int nry, int ncy, Rcomplex *z)
 {
-    char *transa = "T", *transb = "N";
-    Rcomplex one, zero;
-
-    one.r = 1.0; one.i = zero.r = zero.i = 0.0;
-    if (nrx > 0 && ncx > 0 && nry > 0 && ncy > 0) {
-	F77_CALL(zgemm)(transa, transb, &ncx, &ncy, &nrx, &one,
-			x, &nrx, y, &nry, &zero, z, &ncx);
-    } else { /* zero-extent operations should return zeroes */
+    R_xlen_t NRX = nrx, NRY = nry;
+    if (nrx == 0 || ncx == 0 || nry == 0 || ncy == 0) {
+	/* zero-extent operations should return zeroes */
 	R_xlen_t NCX = ncx;
 	for(R_xlen_t i = 0; i < NCX*ncy; i++) z[i].r = z[i].i = 0;
+	return;
+    }
+
+#ifndef HAVE_FORTRAN_DOUBLE_COMPLEX
+    if (R_Matprod == MATPROD_INTERNAL)
+	internal_ccrossprod(x, nrx, ncx, y, nry, ncy, z);
+    else
+	simple_ccrossprod(x, nrx, ncx, y, nry, ncy, z);
+#else
+    switch(R_Matprod) {
+	case MATPROD_DEFAULT:
+	    if (cmayHaveNaNOrInf(x, NRX*ncx) || cmayHaveNaNOrInf(y, NRY*ncy)) {
+		simple_ccrossprod(x, nrx, ncx, y, nry, ncy, z);
+		return;
+	    }
+	    break; /* use blas */
+	case MATPROD_INTERNAL:
+	    internal_ccrossprod(x, nrx, ncx, y, nry, ncy, z);
+	    return;
+	case MATPROD_BLAS:
+	    break;
+	case MATPROD_DEFAULT_SIMD:
+	    if (cmayHaveNaNOrInf_simd(x, NRX*ncx) ||
+		    cmayHaveNaNOrInf_simd(y, NRY*ncy)) {
+		simple_ccrossprod(x, nrx, ncx, y, nry, ncy, z);
+		return;
+	    }
+	    break; /* use blas */
     }
+
+    char *transa = "T", *transb = "N";
+    Rcomplex one, zero;
+    one.r = 1.0; one.i = zero.r = zero.i = 0.0;
+
+    F77_CALL(zgemm)(transa, transb, &ncx, &ncy, &nrx, &one,
+                    x, &nrx, y, &nry, &zero, z, &ncx);
+#endif
 }
 
 static void symtcrossprod(double *x, int nr, int nc, double *z)
 {
-    char *trans = "N", *uplo = "U";
-    double one = 1.0, zero = 0.0;
-    if (nr > 0 && nc > 0) {
-	F77_CALL(dsyrk)(uplo, trans, &nr, &nc, &one, x, &nr, &zero, z, &nr);
-	for (int i = 1; i < nr; i++)
-	    for (int j = 0; j < i; j++) z[i + nr *j] = z[j + nr * i];
-    } else { /* zero-extent operations should return zeroes */
-	R_xlen_t NR = nr;
+    R_xlen_t NR = nr;
+    if (nr == 0 || nc == 0) {
+	/* zero-extent operations should return zeroes */
 	for(R_xlen_t i = 0; i < NR*NR; i++) z[i] = 0;
+	return;
     }
 
+    switch(R_Matprod) {
+	case MATPROD_DEFAULT:
+	    /* see matprod for more details */
+	    if (mayHaveNaNOrInf(x, NR*nc)) {
+		simple_tcrossprod(x, nr, nc, x, nr, nc, z);
+		return;
+	    }
+	    break; /* use blas */
+	case MATPROD_INTERNAL:
+	    internal_tcrossprod(x, nr, nc, x, nr, nc, z);
+	    return;
+	case MATPROD_BLAS:
+	    break;
+	case MATPROD_DEFAULT_SIMD:
+	    if (mayHaveNaNOrInf_simd(x, NR*nc))  {
+		simple_tcrossprod(x, nr, nc, x, nr, nc, z);
+		return;
+	    }
+	    break; /* use blas */
+    }
+
+    char *trans = "N", *uplo = "U";
+    double one = 1.0, zero = 0.0;
+
+    F77_CALL(dsyrk)(uplo, trans, &nr, &nc, &one, x, &nr, &zero, z, &nr);
+    for (int i = 1; i < nr; i++)
+	for (int j = 0; j < i; j++) z[i + nr *j] = z[j + nr * i];
 }
 
 static void tcrossprod(double *x, int nrx, int ncx,
 		      double *y, int nry, int ncy, double *z)
 {
-    char *transa = "N", *transb = "T";
-    double one = 1.0, zero = 0.0;
-    if (nrx > 0 && ncx > 0 && nry > 0 && ncy > 0) {
-	F77_CALL(dgemm)(transa, transb, &nrx, &nry, &ncx, &one,
-			x, &nrx, y, &nry, &zero, z, &nrx);
-    } else { /* zero-extent operations should return zeroes */
-	R_xlen_t NRX = nrx;
+    R_xlen_t NRX = nrx, NRY = nry;
+    if (nrx == 0 || ncx == 0 || nry == 0 || ncy == 0) {
+	/* zero-extent operations should return zeroes */
 	for(R_xlen_t i = 0; i < NRX*nry; i++) z[i] = 0;
+	return;
+    }
+
+    switch(R_Matprod) {
+	case MATPROD_DEFAULT:
+	    if (mayHaveNaNOrInf(x, NRX*ncx) || mayHaveNaNOrInf(y, NRY*ncy)) {
+		simple_tcrossprod(x, nrx, ncx, y, nry, ncy, z);
+		return;
+	    }
+	    break; /* use blas */
+	case MATPROD_INTERNAL:
+	    internal_tcrossprod(x, nrx, ncx, y, nry, ncy, z);
+	    return;
+	case MATPROD_BLAS:
+	    break;
+	case MATPROD_DEFAULT_SIMD:
+	    if (mayHaveNaNOrInf_simd(x, NRX*ncx) ||
+		    mayHaveNaNOrInf_simd(y, NRY*ncy)) {
+		simple_tcrossprod(x, nrx, ncx, y, nry, ncy, z);
+		return;
+	    }
+	    break; /* use blas */
     }
+
+    char *transN = "N", *transT = "T";
+    double one = 1.0, zero = 0.0;
+    int ione = 1;
+
+    if (nry == 1) /* matrix-vector or dot product */
+	F77_CALL(dgemv)(transN, &nrx, &ncx, &one, x,
+			&nrx, y, &ione, &zero, z, &ione);
+    else if (nrx == 1) /* vector-matrix */
+	/* Instead of x(Y^T), compute (x(Y^T))^T == Y(x^T)
+	   The result is a vector, so transposing its content is no-op */
+	F77_CALL(dgemv)(transN, &nry, &ncy, &one, y,
+			&nry, x, &ione, &zero, z, &ione);
+    else /* matrix-matrix or outer product */
+	F77_CALL(dgemm)(transN, transT, &nrx, &nry, &ncx, &one,
+		    x, &nrx, y, &nry, &zero, z, &nrx);
 }
 
 static void tccrossprod(Rcomplex *x, int nrx, int ncx,
 			Rcomplex *y, int nry, int ncy, Rcomplex *z)
 {
+    R_xlen_t NRX = nrx, NRY = nry;
+    if (nrx == 0 || ncx == 0 || nry == 0 || ncy == 0) {
+	/* zero-extent operations should return zeroes */
+	for(R_xlen_t i = 0; i < NRX*nry; i++) z[i].r = z[i].i = 0;
+	return;
+    }
+
+#ifndef HAVE_FORTRAN_DOUBLE_COMPLEX
+    if (R_Matprod == MATPROD_INTERNAL)
+	internal_tccrossprod(x, nrx, ncx, y, nry, ncy, z);
+    else
+	simple_tccrossprod(x, nrx, ncx, y, nry, ncy, z);
+#else
+    switch(R_Matprod) {
+	case MATPROD_DEFAULT:
+	    if (cmayHaveNaNOrInf(x, NRX*ncx) || cmayHaveNaNOrInf(y, NRY*ncy)) {
+		simple_tccrossprod(x, nrx, ncx, y, nry, ncy, z);
+		return;
+	    }
+	    break; /* use blas */
+	case MATPROD_INTERNAL:
+	    internal_tccrossprod(x, nrx, ncx, y, nry, ncy, z);
+	    return;
+	case MATPROD_BLAS:
+	    break;
+	case MATPROD_DEFAULT_SIMD:
+	    if (cmayHaveNaNOrInf_simd(x, NRX*ncx) ||
+		    cmayHaveNaNOrInf_simd(y, NRY*ncy)) {
+		simple_tccrossprod(x, nrx, ncx, y, nry, ncy, z);
+		return;
+	    }
+	    break; /* use blas */
+    }
+
     char *transa = "N", *transb = "T";
     Rcomplex one, zero;
-
     one.r = 1.0; one.i = zero.r = zero.i = 0.0;
-    if (nrx > 0 && ncx > 0 && nry > 0 && ncy > 0) {
-	F77_CALL(zgemm)(transa, transb, &nrx, &nry, &ncx, &one,
-			x, &nrx, y, &nry, &zero, z, &nrx);
-    } else { /* zero-extent operations should return zeroes */
-	R_xlen_t NRX = nrx;
-	for(R_xlen_t i = 0; i < NRX*nry; i++) z[i].r = z[i].i = 0;
-    }
+
+    F77_CALL(zgemm)(transa, transb, &nrx, &nry, &ncx, &one,
+                    x, &nrx, y, &nry, &zero, z, &nrx);
+#endif
 }
 
 
@@ -656,6 +1228,7 @@ SEXP attribute_hidden do_matprod(SEXP call, SEXP op, SEXP args, SEXP rho)
 	if (value) return value;
     }
 
+    checkArity(op, args);
     sym = isNull(y);
     if (sym && (PRIMVAL(op) > 0)) y = x;
     if ( !(isNumeric(x) || isComplex(x)) || !(isNumeric(y) || isComplex(y)) )
@@ -667,16 +1240,27 @@ SEXP attribute_hidden do_matprod(SEXP call, SEXP op, SEXP args, SEXP rho)
     ldy = length(ydims);
 
     if (ldx != 2 && ldy != 2) {		/* x and y non-matrices */
-	if (PRIMVAL(op) == 0) {
-	    nrx = 1;
-	    ncx = LENGTH(x);
+	// for crossprod, allow two cases: n x n ==> (1,n) x (n,1);  1 x n = (n, 1) x (1, n)
+	if (PRIMVAL(op) == 1 && LENGTH(x) == 1) {
+	    nrx = ncx = nry = 1;
+	    ncy = LENGTH(y);
 	}
 	else {
-	    nrx = LENGTH(x);
-	    ncx = 1;
+	    nry = LENGTH(y);
+	    ncy = 1;
+	    if (PRIMVAL(op) == 0) {
+		nrx = 1;
+		ncx = LENGTH(x);
+		if(ncx == 1) {	        // y as row vector
+		    ncy = nry;
+		    nry = 1;
+		}
+	    }
+	    else {
+		nrx = LENGTH(x);
+		ncx = 1;
+	    }
 	}
-	nry = LENGTH(y);
-	ncy = 1;
     }
     else if (ldx != 2) {		/* x not a matrix */
 	nry = INTEGER(ydims)[0];
@@ -731,11 +1315,20 @@ SEXP attribute_hidden do_matprod(SEXP call, SEXP op, SEXP args, SEXP rho)
 	    if (LENGTH(y) == nrx) {	/* y is a col vector */
 		nry = nrx;
 		ncy = 1;
+	    } else if (nrx == 1) {	// y as row vector
+		nry = 1;
+		ncy = LENGTH(y);
 	    }
 	}
-	else { /* tcrossprod --		y is a col vector */
-	    nry = LENGTH(y);
-	    ncy = 1;
+	else { // tcrossprod
+	    if (nrx == 1) {		// y as row vector
+		nry = 1;
+		ncy = LENGTH(y);
+	    }
+	    else {			// y is a col vector
+		nry = LENGTH(y);
+		ncy = 1;
+	    }
 	}
     }
     else {				/* x and y matrices */
@@ -983,56 +1576,57 @@ SEXP attribute_hidden do_transpose(SEXP call, SEXP op, SEXP args, SEXP rho)
     }
     else
 	goto not_matrix;
+    PROTECT(dimnamesnames);
     PROTECT(r = allocVector(TYPEOF(a), len));
     R_xlen_t i, j, l_1 = len-1;
     switch (TYPEOF(a)) {
     case LGLSXP:
     case INTSXP:
 	// filling in columnwise, "accessing row-wise":
-        for (i = 0, j = 0; i < len; i++, j += nrow) {
-            if (j > l_1) j -= l_1;
-            INTEGER(r)[i] = INTEGER(a)[j];
-        }
-        break;
+	for (i = 0, j = 0; i < len; i++, j += nrow) {
+	    if (j > l_1) j -= l_1;
+	    INTEGER(r)[i] = INTEGER(a)[j];
+	}
+	break;
     case REALSXP:
-        for (i = 0, j = 0; i < len; i++, j += nrow) {
-            if (j > l_1) j -= l_1;
-            REAL(r)[i] = REAL(a)[j];
-        }
-        break;
+	for (i = 0, j = 0; i < len; i++, j += nrow) {
+	    if (j > l_1) j -= l_1;
+	    REAL(r)[i] = REAL(a)[j];
+	}
+	break;
     case CPLXSXP:
-        for (i = 0, j = 0; i < len; i++, j += nrow) {
-            if (j > l_1) j -= l_1;
-            COMPLEX(r)[i] = COMPLEX(a)[j];
-        }
-        break;
+	for (i = 0, j = 0; i < len; i++, j += nrow) {
+	    if (j > l_1) j -= l_1;
+	    COMPLEX(r)[i] = COMPLEX(a)[j];
+	}
+	break;
     case STRSXP:
-        for (i = 0, j = 0; i < len; i++, j += nrow) {
-            if (j > l_1) j -= l_1;
-            SET_STRING_ELT(r, i, STRING_ELT(a,j));
-        }
-        break;
+	for (i = 0, j = 0; i < len; i++, j += nrow) {
+	    if (j > l_1) j -= l_1;
+	    SET_STRING_ELT(r, i, STRING_ELT(a,j));
+	}
+	break;
     case VECSXP:
-        for (i = 0, j = 0; i < len; i++, j += nrow) {
-            if (j > l_1) j -= l_1;
-            SET_VECTOR_ELT(r, i, VECTOR_ELT(a,j));
-        }
-        break;
+	for (i = 0, j = 0; i < len; i++, j += nrow) {
+	    if (j > l_1) j -= l_1;
+	    SET_VECTOR_ELT(r, i, VECTOR_ELT(a,j));
+	}
+	break;
     case RAWSXP:
-        for (i = 0, j = 0; i < len; i++, j += nrow) {
-            if (j > l_1) j -= l_1;
-            RAW(r)[i] = RAW(a)[j];
-        }
-        break;
+	for (i = 0, j = 0; i < len; i++, j += nrow) {
+	    if (j > l_1) j -= l_1;
+	    RAW(r)[i] = RAW(a)[j];
+	}
+	break;
     default:
-        UNPROTECT(1);
-        goto not_matrix;
+	UNPROTECT(2); /* r, dimnamesnames */
+	goto not_matrix;
     }
     PROTECT(dims = allocVector(INTSXP, 2));
     INTEGER(dims)[0] = ncol;
     INTEGER(dims)[1] = nrow;
     setAttrib(r, R_DimSymbol, dims);
-    UNPROTECT(1);
+    UNPROTECT(1); /* dims */
     /* R <= 2.2.0: dropped list(NULL,NULL) dimnames :
      * if(rnames != R_NilValue || cnames != R_NilValue) */
     if(!isNull(dimnames)) {
@@ -1046,13 +1640,13 @@ SEXP attribute_hidden do_transpose(SEXP call, SEXP op, SEXP args, SEXP rho)
 			   (ldim == 2) ? STRING_ELT(dimnamesnames, 1):
 			   R_BlankString);
 	    setAttrib(dimnames, R_NamesSymbol, ndimnamesnames);
-	    UNPROTECT(1);
+	    UNPROTECT(1); /* ndimnamesnames */
 	}
 	setAttrib(r, R_DimNamesSymbol, dimnames);
-	UNPROTECT(1);
+	UNPROTECT(1); /* dimnames */
     }
     copyMostAttrib(a, r);
-    UNPROTECT(1);
+    UNPROTECT(2); /* r, dimnamesnames */
     return r;
  not_matrix:
     error(_("argument is not a matrix"));
@@ -1077,7 +1671,7 @@ SEXP attribute_hidden do_transpose(SEXP call, SEXP op, SEXP args, SEXP rho)
 	    iip[itmp]++;				\
 	    break;					\
 	}						\
-    for (lj = 0, itmp = 0; itmp < n; itmp++)	       	\
+    for (lj = 0, itmp = 0; itmp < n; itmp++)		\
 	lj += iip[itmp] * stride[itmp];
 
 /* aperm (a, perm, resize = TRUE) */
@@ -1215,10 +1809,21 @@ SEXP attribute_hidden do_aperm(SEXP call, SEXP op, SEXP args, SEXP rho)
     /* handle the resize */
     int resize = asLogical(CADDR(args));
     if (resize == NA_LOGICAL) error(_("'resize' must be TRUE or FALSE"));
-    setAttrib(r, R_DimSymbol, resize ? dimsr : dimsa);
 
-    /* and handle the dimnames, if any */
+    /* and handle names(dim(.)) and the dimnames if any */
     if (resize) {
+	SEXP nmdm = getAttrib(dimsa, R_NamesSymbol);
+	if(nmdm != R_NilValue) { // dimsr needs correctly permuted names()
+	    PROTECT(nmdm);
+	    SEXP nm_dr = PROTECT(allocVector(STRSXP, n));
+	    for (i = 0; i < n; i++) {
+		SET_STRING_ELT(nm_dr, i, STRING_ELT(nmdm, pp[i]));
+	    }
+	    setAttrib(dimsr, R_NamesSymbol, nm_dr);
+	    UNPROTECT(2);
+	}
+	setAttrib(r, R_DimSymbol, dimsr);
+
 	PROTECT(dna = getAttrib(a, R_DimNamesSymbol));
 	if (dna != R_NilValue) {
 	    SEXP dnna, dnr, dnnr;
@@ -1242,6 +1847,8 @@ SEXP attribute_hidden do_aperm(SEXP call, SEXP op, SEXP args, SEXP rho)
 	}
 	UNPROTECT(1);
     }
+    else // !resize
+	setAttrib(r, R_DimSymbol, dimsa);
 
     UNPROTECT(3); /* dimsa, r, dimsr */
     return r;
@@ -1266,15 +1873,17 @@ SEXP attribute_hidden do_colsum(SEXP call, SEXP op, SEXP args, SEXP rho)
     if (NaRm == NA_LOGICAL) error(_("invalid '%s' argument"), "na.rm");
     keepNA = !NaRm;
 
-    int OP = PRIMVAL(op);
     switch (type = TYPEOF(x)) {
-    case LGLSXP: break;
-    case INTSXP: break;
+    case LGLSXP:
+    case INTSXP:
     case REALSXP: break;
     default:
 	error(_("'x' must be numeric"));
     }
+    if (n * (double)p > XLENGTH(x))
+	error(_("'x' is too short")); /* PR#16367 */
 
+    int OP = PRIMVAL(op);
     if (OP == 0 || OP == 1) { /* columns */
 	PROTECT(ans = allocVector(REALSXP, p));
 #ifdef _OPENMP
@@ -1406,14 +2015,14 @@ SEXP attribute_hidden do_colsum(SEXP call, SEXP op, SEXP args, SEXP rho)
     dim <- as.integer(dim)
     vl <- prod(dim)
     if (length(data) != vl) {
-        if (vl > .Machine$integer.max)
-            stop("'dim' specifies too large an array")
-        data <- rep(data, length.out = vl)
+	if (vl > .Machine$integer.max)
+	    stop("'dim' specifies too large an array")
+	data <- rep(data, length.out = vl)
     }
     if (length(dim))
-        dim(data) <- dim
+	dim(data) <- dim
     if (is.list(dimnames) && length(dimnames))
-        dimnames(data) <- dimnames
+	dimnames(data) <- dimnames
     data
 }
 */
@@ -1458,28 +2067,28 @@ SEXP attribute_hidden do_array(SEXP call, SEXP op, SEXP args, SEXP rho)
     switch(TYPEOF(vals)) {
     case LGLSXP:
 	if (nans && lendat)
-	    for (i = 0; i < nans; i++)
-		LOGICAL(ans)[i] = LOGICAL(vals)[i % lendat];
+	    xcopyLogicalWithRecycle(LOGICAL(ans), LOGICAL(vals), 0, nans,
+				    lendat);
 	else
 	    for (i = 0; i < nans; i++) LOGICAL(ans)[i] = NA_LOGICAL;
 	break;
     case INTSXP:
 	if (nans && lendat)
-	    for (i = 0; i < nans; i++)
-		INTEGER(ans)[i] = INTEGER(vals)[i % lendat];
+	    xcopyIntegerWithRecycle(INTEGER(ans), INTEGER(vals), 0, nans,
+				    lendat);
 	else
 	    for (i = 0; i < nans; i++) INTEGER(ans)[i] = NA_INTEGER;
 	break;
     case REALSXP:
 	if (nans && lendat)
-	    for (i = 0; i < nans; i++) REAL(ans)[i] = REAL(vals)[i % lendat];
+	    xcopyRealWithRecycle(REAL(ans), REAL(vals), 0, nans, lendat);
 	else
 	    for (i = 0; i < nans; i++) REAL(ans)[i] = NA_REAL;
 	break;
     case CPLXSXP:
 	if (nans && lendat)
-	    for (i = 0; i < nans; i++)
-		COMPLEX(ans)[i] = COMPLEX(vals)[i % lendat];
+	    xcopyComplexWithRecycle(COMPLEX(ans), COMPLEX(vals), 0, nans,
+				    lendat);
 	else {
 	    Rcomplex na_cmplx;
 	    na_cmplx.r = NA_REAL;
@@ -1489,22 +2098,20 @@ SEXP attribute_hidden do_array(SEXP call, SEXP op, SEXP args, SEXP rho)
 	break;
     case RAWSXP:
 	if (nans && lendat)
-	    for (i = 0; i < nans; i++) RAW(ans)[i] = RAW(vals)[i % lendat];
+	    xcopyRawWithRecycle(RAW(ans), RAW(vals), 0, nans, lendat);
 	else
 	    for (i = 0; i < nans; i++) RAW(ans)[i] = 0;
 	break;
     /* Rest are already initialized */
     case STRSXP:
 	if (nans && lendat)
-	    for (i = 0; i < nans; i++)
-		SET_STRING_ELT(ans, i, STRING_ELT(vals, i % lendat));
+	    xcopyStringWithRecycle(ans, vals, 0, nans, lendat);
 	break;
     case VECSXP:
     case EXPRSXP:
 #ifdef SWITCH_TO_REFCNT
 	if (nans && lendat)
-	    for (i = 0; i < nans; i++)
-		SET_VECTOR_ELT(ans, i, VECTOR_ELT(vals, i % lendat));
+	    xcopyVectorWithRecycle(ans, vals, 0, nans, lendat);
 #else
 	if (nans && lendat) {
 	    /* Need to guard against possible sharing of values under
@@ -1526,11 +2133,8 @@ SEXP attribute_hidden do_array(SEXP call, SEXP op, SEXP args, SEXP rho)
     }
 
     ans = dimgets(ans, dims);
-    if (TYPEOF(dimnames) == VECSXP && LENGTH(dimnames)) {
-	PROTECT(ans);
+    if(!isNull(dimnames) && length(dimnames) > 0)
 	ans = dimnamesgets(ans, dimnames);
-	UNPROTECT(1);
-    }
 
     UNPROTECT(2);
     return ans;
@@ -1556,34 +2160,75 @@ SEXP attribute_hidden do_diag(SEXP call, SEXP op, SEXP args, SEXP rho)
     if (nc < 0)
 	error(_("invalid 'ncol' value (< 0)"));
     int mn = (nr < nc) ? nr : nc;
-    if (mn > 0 && LENGTH(x) == 0)
+    if (mn > 0 && length(x) == 0)
 	error(_("'x' must have positive length"));
 
- #ifndef LONG_VECTOR_SUPPORT
+#ifndef LONG_VECTOR_SUPPORT
    if ((double)nr * (double)nc > INT_MAX)
 	error(_("too many elements specified"));
 #endif
 
-   if (TYPEOF(x) == CPLXSXP) {
+   int nx = LENGTH(x);
+   R_xlen_t NR = nr;
+
+#define mk_DIAG(_zero_)					\
+   for (R_xlen_t i = 0; i < NR*nc; i++) ra[i] = _zero_;	\
+   R_xlen_t i, i1;					\
+   MOD_ITERATE1(mn, nx, i, i1, {			\
+	   ra[i * (NR+1)] = rx[i1];			\
+   });
+
+   switch(TYPEOF(x)) {
+
+   case REALSXP:
+   {
+#define mk_REAL_DIAG					\
+       PROTECT(ans = allocMatrix(REALSXP, nr, nc));	\
+       double *rx = REAL(x), *ra = REAL(ans);		\
+       mk_DIAG(0.0)
+
+       mk_REAL_DIAG;
+       break;
+   }
+   case CPLXSXP:
+   {
        PROTECT(ans = allocMatrix(CPLXSXP, nr, nc));
        int nx = LENGTH(x);
        R_xlen_t NR = nr;
        Rcomplex *rx = COMPLEX(x), *ra = COMPLEX(ans), zero;
        zero.r = zero.i = 0.0;
-       for (R_xlen_t i = 0; i < NR*nc; i++) ra[i] = zero;
-       for (int j = 0; j < mn; j++) ra[j * (NR+1)] = rx[j % nx];
-  } else {
-       if(TYPEOF(x) != REALSXP) {
-	   PROTECT(x = coerceVector(x, REALSXP));
-	   nprotect++;
-       }
-       PROTECT(ans = allocMatrix(REALSXP, nr, nc));
-       int nx = LENGTH(x);
-       R_xlen_t NR = nr;
-       double *rx = REAL(x), *ra = REAL(ans);
-       for (R_xlen_t i = 0; i < NR*nc; i++) ra[i] = 0.0;
-       for (int j = 0; j < mn; j++) ra[j * (NR+1)] = rx[j % nx];
+       mk_DIAG(zero);
+       break;
+   }
+   case INTSXP:
+   {
+       PROTECT(ans = allocMatrix(INTSXP, nr, nc));
+       int *rx = INTEGER(x), *ra = INTEGER(ans);
+       mk_DIAG(0);
+       break;
+   }
+   case LGLSXP:
+   {
+       PROTECT(ans = allocMatrix(LGLSXP, nr, nc));
+       int *rx = LOGICAL(x), *ra = LOGICAL(ans);
+       mk_DIAG(0);
+       break;
+   }
+   case RAWSXP:
+   {
+       PROTECT(ans = allocMatrix(RAWSXP, nr, nc));
+       Rbyte *rx = RAW(x), *ra = RAW(ans);
+       mk_DIAG((Rbyte) 0);
+       break;
+   }
+   default: {
+       PROTECT(x = coerceVector(x, REALSXP));
+       nprotect++;
+       mk_REAL_DIAG;
+     }
    }
+#undef mk_REAL_DIAG
+#undef mk_DIAG
    UNPROTECT(nprotect);
    return ans;
 }
diff --git a/src/main/attrib.c b/src/main/attrib.c
index edcb4f6..9bbfa6e 100644
--- a/src/main/attrib.c
+++ b/src/main/attrib.c
@@ -1,7 +1,7 @@
 /*
  *  R : A Computer Language for Statistical Data Analysis
+ *  Copyright (C) 1997--2016  The R Core Team
  *  Copyright (C) 1995, 1996  Robert Gentleman and Ross Ihaka
- *  Copyright (C) 1997--2013  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
@@ -15,7 +15,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  */
 
 #ifdef HAVE_CONFIG_H
@@ -39,12 +39,16 @@ static SEXP row_names_gets(SEXP vec , SEXP val)
     if (vec == R_NilValue)
 	error(_("attempt to set an attribute on NULL"));
 
-    if(isReal(val) && length(val) == 2 && ISNAN(REAL(val)[0]) ) {
+    if(isReal(val) && LENGTH(val) == 2 && ISNAN(REAL(val)[0]) ) {
 	/* This should not happen, but if a careless user dput()s a
 	   data frame and sources the result, it will */
-	PROTECT(val = coerceVector(val, INTSXP));
+	PROTECT(vec);
+	PROTECT(val);
+	val = coerceVector(val, INTSXP);
+	UNPROTECT(1); /* val */
+	PROTECT(val);
 	ans =  installAttrib(vec, R_RowNamesSymbol, val);
-	UNPROTECT(1);
+	UNPROTECT(2); /* vec, val */
 	return ans;
     }
     if(isInteger(val)) {
@@ -61,19 +65,21 @@ static SEXP row_names_gets(SEXP vec , SEXP val)
 	} else OK_compact = FALSE;
 	if(OK_compact) {
 	    /* we hide the length in an impossible integer vector */
+	    PROTECT(vec);
 	    PROTECT(val = allocVector(INTSXP, 2));
 	    INTEGER(val)[0] = NA_INTEGER;
 	    INTEGER(val)[1] = n;
 	    ans =  installAttrib(vec, R_RowNamesSymbol, val);
-	    UNPROTECT(1);
+	    UNPROTECT(2); /* vec, val */
 	    return ans;
 	}
     } else if(!isString(val))
 	error(_("row names must be 'character' or 'integer', not '%s'"),
 	      type2char(TYPEOF(val)));
+    PROTECT(vec);
     PROTECT(val);
     ans =  installAttrib(vec, R_RowNamesSymbol, val);
-    UNPROTECT(1);
+    UNPROTECT(2); /* vec, val */
     return ans;
 }
 
@@ -100,10 +106,10 @@ SEXP attribute_hidden getAttrib0(SEXP vec, SEXP name)
     if (name == R_NamesSymbol) {
 	if(isVector(vec) || isList(vec) || isLanguage(vec)) {
 	    s = getAttrib(vec, R_DimSymbol);
-	    if(TYPEOF(s) == INTSXP && length(s) == 1) {
+	    if(TYPEOF(s) == INTSXP && LENGTH(s) == 1) {
 		s = getAttrib(vec, R_DimNamesSymbol);
 		if(!isNull(s)) {
-		    SET_NAMED(VECTOR_ELT(s, 0), 2);
+		    MARK_NOT_MUTABLE(VECTOR_ELT(s, 0));
 		    return VECTOR_ELT(s, 0);
 		}
 	    }
@@ -126,29 +132,21 @@ SEXP attribute_hidden getAttrib0(SEXP vec, SEXP name)
 	    }
 	    UNPROTECT(1);
 	    if (any) {
-		if (!isNull(s)) SET_NAMED(s, 2);
+		if (!isNull(s)) MARK_NOT_MUTABLE(s);
 		return (s);
 	    }
 	    return R_NilValue;
 	}
     }
-    /* This is where the old/new list adjustment happens. */
     for (s = ATTRIB(vec); s != R_NilValue; s = CDR(s))
 	if (TAG(s) == name) {
-	    if (name == R_DimNamesSymbol && TYPEOF(CAR(s)) == LISTSXP) {
-		SEXP _new, old;
-		int i;
-		_new = allocVector(VECSXP, length(CAR(s)));
-		old = CAR(s);
-		i = 0;
-		while (old != R_NilValue) {
-		    SET_VECTOR_ELT(_new, i++, CAR(old));
-		    old = CDR(old);
-		}
-		SET_NAMED(_new, 2);
-		return _new;
-	    }
-	    SET_NAMED(CAR(s), 2);
+	    if (name == R_DimNamesSymbol && TYPEOF(CAR(s)) == LISTSXP)
+		error("old list is no longer allowed for dimnames attribute");
+	    /**** this could be dropped for REFCNT or be less
+		  stringend for NAMED for attributes where the setter
+		  does not have a consistency check that could cail
+		  after mutation in a complex assignment LT */
+	    MARK_NOT_MUTABLE(CAR(s));
 	    return CAR(s);
 	}
     return R_NilValue;
@@ -180,6 +178,7 @@ SEXP getAttrib(SEXP vec, SEXP name)
 	return getAttrib0(vec, name);
 }
 
+// R's .row_names_info(x, type = 1L) := .Internal(shortRowNames(x, type)) :
 attribute_hidden
 SEXP do_shortRowNames(SEXP call, SEXP op, SEXP args, SEXP env)
 {
@@ -223,7 +222,9 @@ SEXP setAttrib(SEXP vec, SEXP name, SEXP val)
     PROTECT(name);
 
     if (isString(name)) {
+	PROTECT(val);
 	name = installTrChar(STRING_ELT(name, 0));
+	UNPROTECT(1);
     }
     if (val == R_NilValue) {
 	UNPROTECT(2);
@@ -342,8 +343,10 @@ static SEXP installAttrib(SEXP vec, SEXP name, SEXP val)
 	}
 	t = s; // record last attribute, if any
     }
-    /* The usual convention is that the caller protects, 
-       so this is historical over-cautiousness */
+
+    /* The usual convention is that the caller protects,
+       but a lot of existing code depends assume that
+       setAttrib/installAttrib protects its arguments */
     PROTECT(vec); PROTECT(name); PROTECT(val);
     SEXP s = CONS(val, R_NilValue);
     SET_TAG(s, name);
@@ -357,7 +360,7 @@ static SEXP removeAttrib(SEXP vec, SEXP name)
     SEXP t;
     if(TYPEOF(vec) == CHARSXP)
 	error("cannot set attribute on a CHARSXP");
-    if (name == R_NamesSymbol && isList(vec)) {
+    if (name == R_NamesSymbol && isPairList(vec)) {
 	for (t = vec; t != R_NilValue; t = CDR(t))
 	    SET_TAG(t, R_NilValue);
 	return R_NilValue;
@@ -390,7 +393,7 @@ static void checkNames(SEXP x, SEXP s)
 
 /* Time Series Parameters */
 
-static void badtsp(void)
+static void NORET badtsp(void)
 {
     error(_("invalid time series parameters specified"));
 }
@@ -405,13 +408,13 @@ SEXP tspgets(SEXP vec, SEXP val)
 	error(_("attempt to set an attribute on NULL"));
 
     if(IS_S4_OBJECT(vec)) { /* leave validity checking to validObject */
-        if (!isNumeric(val)) /* but should have been checked */
+	if (!isNumeric(val)) /* but should have been checked */
 	    error(_("'tsp' attribute must be numeric"));
 	installAttrib(vec, R_TspSymbol, val);
 	return vec;
     }
 
-    if (!isNumeric(val) || length(val) != 3)
+    if (!isNumeric(val) || LENGTH(val) != 3)
 	error(_("'tsp' attribute must be numeric of length three"));
 
     if (isReal(val)) {
@@ -483,9 +486,11 @@ SEXP attribute_hidden do_comment(SEXP call, SEXP op, SEXP args, SEXP env)
 SEXP classgets(SEXP vec, SEXP klass)
 {
     if (isNull(klass) || isString(klass)) {
-	if (length(klass) <= 0) {
+	int ncl = length(klass);
+	if (ncl <= 0) {
 	    SET_ATTRIB(vec, stripAttrib(R_ClassSymbol, ATTRIB(vec)));
 	    SET_OBJECT(vec, 0);
+	    // problems when package building:  UNSET_S4_OBJECT(vec);
 	}
 	else {
 	    /* When data frames were a special data type */
@@ -495,13 +500,12 @@ SEXP classgets(SEXP vec, SEXP klass)
 
 	    /* HOWEVER, it is the way that the object bit gets set/unset */
 
-	    int i;
 	    Rboolean isfactor = FALSE;
 
 	    if (vec == R_NilValue)
 		error(_("attempt to set an attribute on NULL"));
 
-	    for(i = 0; i < length(klass); i++)
+	    for(int i = 0; i < ncl; i++)
 		if(streql(CHAR(STRING_ELT(klass, i)), "factor")) { /* ASCII */
 		    isfactor = TRUE;
 		    break;
@@ -513,6 +517,29 @@ SEXP classgets(SEXP vec, SEXP klass)
 
 	    installAttrib(vec, R_ClassSymbol, klass);
 	    SET_OBJECT(vec, 1);
+
+#ifdef R_classgets_copy_S4
+// not ok -- fails at installation around byte-compiling methods
+	    if(ncl == 1 && R_has_methods_attached()) { // methods: do not act too early
+		SEXP cld = R_getClassDef_R(klass);
+		if(!isNull(cld)) {
+		    PROTECT(cld);
+		    /* More efficient? can we protect? -- rather *assign* in method-ns?
+		       static SEXP oldCl = NULL;
+		       if(!oldCl) oldCl = R_getClassDef("oldClass");
+		       if(!oldCl) oldCl = mkString("oldClass");
+		       PROTECT(oldCl);
+		    */
+		    if(!R_isVirtualClass(cld, R_MethodsNamespace) &&
+		       !R_extends(cld, mkString("oldClass"), R_MethodsNamespace)) // set S4 bit :
+			// !R_extends(cld, oldCl, R_MethodsNamespace)) // set S4 bit :
+
+			SET_S4_OBJECT(vec);
+
+		    UNPROTECT(1); // UNPROTECT(2);
+		}
+	    }
+#endif
 	}
 	return R_NilValue;
     }
@@ -628,127 +655,200 @@ static SEXP s_dot_S3Class = 0;
 
 static SEXP R_S4_extends_table = 0;
 
- 
-static SEXP cache_class(const char *class, SEXP klass) {
+
+static SEXP cache_class(const char *class, SEXP klass)
+{
     if(!R_S4_extends_table) {
 	R_S4_extends_table = R_NewHashedEnv(R_NilValue, ScalarInteger(0));
 	R_PreserveObject(R_S4_extends_table);
     }
     if(isNull(klass)) { /* retrieve cached value */
-	SEXP val;
-	val = findVarInFrame(R_S4_extends_table, install(class));
+	SEXP val = findVarInFrame(R_S4_extends_table, install(class));
 	return (val == R_UnboundValue) ? klass : val;
     }
     defineVar(install(class), klass, R_S4_extends_table);
     return klass;
 }
 
-static SEXP S4_extends(SEXP klass) 
-{
+static SEXP S4_extends(SEXP klass, Rboolean use_tab) {
     static SEXP s_extends = 0, s_extendsForS3;
     SEXP e, val; const char *class;
-    const void *vmax = vmaxget();
+    const void *vmax;
+    if(use_tab) vmax = vmaxget();
     if(!s_extends) {
 	s_extends = install("extends");
 	s_extendsForS3 = install(".extendsForS3");
 	R_S4_extends_table = R_NewHashedEnv(R_NilValue, ScalarInteger(0));
 	R_PreserveObject(R_S4_extends_table);
     }
-    /* sanity check for methods package available */
-    if(findVar(s_extends, R_GlobalEnv) == R_UnboundValue)
+    if(!isMethodsDispatchOn()) {
         return klass;
+    }
     class = translateChar(STRING_ELT(klass, 0)); /* TODO: include package attr. */
-    val = findVarInFrame(R_S4_extends_table, install(class));
-    vmaxset(vmax);
-    if(val != R_UnboundValue)
-       return val;
+    if(use_tab) {
+	val = findVarInFrame(R_S4_extends_table, install(class));
+	vmaxset(vmax);
+	if(val != R_UnboundValue)
+	    return val;
+    }
+    // else:  val <- .extendsForS3(klass) -- and cache it
     PROTECT(e = allocVector(LANGSXP, 2));
     SETCAR(e, s_extendsForS3);
     val = CDR(e);
     SETCAR(val, klass);
-    val = eval(e, R_MethodsNamespace);
+    PROTECT(val = eval(e, R_MethodsNamespace));
     cache_class(class, val);
-    UNPROTECT(1);
+    UNPROTECT(2); /* val, e */
     return(val);
 }
 
+SEXP R_S4_extends(SEXP klass, SEXP useTable)
+{
+    return S4_extends(klass, asLogical(useTable));
+}
+
+
+/* pre-allocated default class attributes */
+static struct {
+    SEXP vector;
+    SEXP matrix;
+    SEXP array;
+} Type2DefaultClass[MAX_NUM_SEXPTYPE];
+
+
+static SEXP createDefaultClass(SEXP part1, SEXP part2, SEXP part3)
+{
+    int size = 0;
+    if (part1 != R_NilValue) size++;
+    if (part2 != R_NilValue) size++;
+    if (part3 != R_NilValue) size++;
+
+    if (size == 0 || part2 == R_NilValue) return R_NilValue;
+
+    SEXP res = allocVector(STRSXP, size);
+    R_PreserveObject(res);
+
+    int i = 0;
+    if (part1 != R_NilValue) SET_STRING_ELT(res, i++, part1);
+    if (part2 != R_NilValue) SET_STRING_ELT(res, i++, part2);
+    if (part3 != R_NilValue) SET_STRING_ELT(res, i, part3);
+
+    MARK_NOT_MUTABLE(res);
+    return res;
+}
+
+attribute_hidden
+void InitS3DefaultTypes()
+{
+    for(int type = 0; type < MAX_NUM_SEXPTYPE; type++) {
+	SEXP part2 = R_NilValue;
+	SEXP part3 = R_NilValue;
+	int nprotected = 0;
+
+	switch(type) {
+	    case CLOSXP:
+	    case SPECIALSXP:
+	    case BUILTINSXP:
+		part2 = PROTECT(mkChar("function"));
+		nprotected++;
+		break;
+	    case INTSXP:
+	    case REALSXP:
+		part2 = PROTECT(type2str_nowarn(type));
+		part3 = PROTECT(mkChar("numeric"));
+		nprotected += 2;
+		break;
+	    case LANGSXP:
+		/* part2 remains R_NilValue: default type cannot be
+		   pre-allocated, as it depends on the object value */
+		break;
+	    case SYMSXP:
+		part2 = PROTECT(mkChar("name"));
+		nprotected++;
+		break;
+	    default:
+		part2 = PROTECT(type2str_nowarn(type));
+		nprotected++;
+	}
+
+	Type2DefaultClass[type].vector =
+	    createDefaultClass(R_NilValue, part2, part3);
+
+	SEXP part1;
+	PROTECT(part1 = mkChar("matrix"));
+	Type2DefaultClass[type].matrix =
+	    createDefaultClass(part1, part2, part3);
+	UNPROTECT(1);
+
+	PROTECT(part1 = mkChar("array"));
+	Type2DefaultClass[type].array =
+	    createDefaultClass(part1, part2, part3);
+	UNPROTECT(1);
+
+	UNPROTECT(nprotected);
+    }
+}
+
 /* Version for S3-dispatch */
 SEXP attribute_hidden R_data_class2 (SEXP obj)
 {
     SEXP klass = getAttrib(obj, R_ClassSymbol);
-      if(length(klass) > 0) {
+    if(length(klass) > 0) {
 	if(IS_S4_OBJECT(obj))
-	    return S4_extends(klass);
+	    return S4_extends(klass, TRUE);
 	else
 	    return klass;
-      }
-      else { /* length(klass) == 0 */
-	SEXPTYPE t;
-	SEXP value, class0 = R_NilValue, dim = getAttrib(obj, R_DimSymbol);
+    }
+    else { /* length(klass) == 0 */
+
+	SEXP dim = getAttrib(obj, R_DimSymbol);
 	int n = length(dim);
-	if(n > 0) {
-	    if(n == 2)
-		class0 = mkChar("matrix");
-	    else
-		class0 = mkChar("array");
+	SEXPTYPE t = TYPEOF(obj);
+	SEXP defaultClass;
+	switch(n) {
+	case 0:  defaultClass = Type2DefaultClass[t].vector; break;
+	case 2:  defaultClass = Type2DefaultClass[t].matrix; break;
+	default: defaultClass = Type2DefaultClass[t].array;  break;
 	}
-	PROTECT(class0);
-	switch(t = TYPEOF(obj)) {
-	case CLOSXP: case SPECIALSXP: case BUILTINSXP:
-	    klass = mkChar("function");
-	    break;
-	case INTSXP:
-	case REALSXP:
-	    if(isNull(class0)) {
-		PROTECT(value = allocVector(STRSXP, 2));
-		SET_STRING_ELT(value, 0, type2str(t));
-		SET_STRING_ELT(value, 1, mkChar("numeric"));
-		UNPROTECT(2);
-	    }
-	    else {
-		PROTECT(value = allocVector(STRSXP, 3));
-		SET_STRING_ELT(value, 0, class0);
-		SET_STRING_ELT(value, 1, type2str(t));
-		SET_STRING_ELT(value, 2, mkChar("numeric"));
-		UNPROTECT(2);
-	    }
-	    return value;
-	    break;
-	case SYMSXP:
-	    klass = mkChar("name");
-	    break;
-	case LANGSXP:
-	    klass = lang2str(obj, t);
-	    break;
-	default:
-	    klass = type2str(t);
+
+	if (defaultClass != R_NilValue) {
+	    return defaultClass;
 	}
-	PROTECT(klass);
-	if(isNull(class0)) {
-	    value = ScalarString(klass);
+
+	/* now t == LANGSXP, but check to make sure */
+	if (t != LANGSXP)
+	    error("type must be LANGSXP at this point");
+	if (n == 0) {
+	    return ScalarString(lang2str(obj, t));
+	}
+	SEXP part1;
+	if (n == 2) {
+	    part1 = mkChar("matrix");
 	} else {
-	    value = allocVector(STRSXP, 2);
-	    SET_STRING_ELT(value, 0, class0);
-	    SET_STRING_ELT(value, 1, klass);
+	    part1 = mkChar("array");
 	}
-	UNPROTECT(2);
-	return value;
+	PROTECT(part1);
+	defaultClass = PROTECT(allocVector(STRSXP, 2));
+	SET_STRING_ELT(defaultClass, 0, part1);
+	SET_STRING_ELT(defaultClass, 1, lang2str(obj, t));
+	UNPROTECT(2); /* part1, defaultClass */
+	return defaultClass;
     }
 }
 
-/* class() : */
+// class(x)  &  .cache_class(classname, extendsForS3(.)) {called from methods} :
 SEXP attribute_hidden R_do_data_class(SEXP call, SEXP op, SEXP args, SEXP env)
 {
   checkArity(op, args);
-  if(PRIMVAL(op) == 1) {
-      const char *class; SEXP klass;
+  if(PRIMVAL(op) == 1) { // .cache_class() - typically re-defining existing cache
       check1arg(args, call, "class");
-      klass = CAR(args);
+      SEXP klass = CAR(args);
       if(TYPEOF(klass) != STRSXP || LENGTH(klass) < 1)
 	  error("invalid class argument to internal .class_cache");
-      class = translateChar(STRING_ELT(klass, 0));
+      const char *class = translateChar(STRING_ELT(klass, 0));
       return cache_class(class, CADR(args));
   }
+  // class():
   check1arg(args, call, "x");
   return R_data_class(CAR(args), FALSE);
 }
@@ -782,15 +882,18 @@ SEXP attribute_hidden do_namesgets(SEXP call, SEXP op, SEXP args, SEXP env)
 	    error(_("invalid to use names()<- to set the 'names' slot in a non-vector class ('%s')"), klass);
 	/* else, go ahead, but can't check validity of replacement*/
     }
-    if (CADR(args) != R_NilValue) {
+    SEXP names = CADR(args);
+    if (names != R_NilValue &&
+	! (TYPEOF(names) == STRSXP && ATTRIB(names) == R_NilValue)) {
 	PROTECT(call = allocList(2));
 	SET_TYPEOF(call, LANGSXP);
-	SETCAR(call, install("as.character"));
-	SETCADR(call, CADR(args));
-	SETCADR(args, eval(call, env));
+	SETCAR(call, R_AsCharacterSymbol);
+	SETCADR(call, names);
+	names = eval(call, env);
+	SETCADR(call, R_NilValue); /* decrements REFCNT on names */
 	UNPROTECT(1);
     }
-    setAttrib(CAR(args), R_NamesSymbol, CADR(args));
+    setAttrib(CAR(args), R_NamesSymbol, names);
     UNPROTECT(1);
     SET_NAMED(CAR(args), 0);
     return CAR(args);
@@ -882,7 +985,9 @@ SEXP attribute_hidden do_names(SEXP call, SEXP op, SEXP args, SEXP env)
     if (isVector(ans) || isList(ans) || isLanguage(ans) ||
 	IS_S4_OBJECT(ans))
 	ans = getAttrib(ans, R_NamesSymbol);
-    else ans =  R_NilValue;
+    else if (isEnvironment(ans))
+	ans = R_lsInternal3(ans, TRUE, FALSE);
+    else ans = R_NilValue;
     UNPROTECT(1);
     return ans;
 }
@@ -913,7 +1018,7 @@ static SEXP dimnamesgets1(SEXP val1)
        have the context at this point to do so */
 
     if (inherits(val1, "factor"))  /* mimic as.character.factor */
-        return asCharacterFactor(val1);
+	return asCharacterFactor(val1);
 
     if (!isString(val1)) { /* mimic as.character.default */
 	PROTECT(this2 = coerceVector(val1, STRSXP));
@@ -940,7 +1045,7 @@ SEXP dimnamesgets(SEXP vec, SEXP val)
     /* there may be old pair-lists out there */
     /* There are, when this gets used as names<- for 1-d arrays */
     if (!isPairList(val) && !isNewList(val))
-	error(_("'dimnames' must be a list"));
+	error(_("'%s' must be a list"), "dimnames");
     dims = getAttrib(vec, R_DimSymbol);
     if ((k = LENGTH(dims)) < length(val))
 	error(_("length of 'dimnames' [%d] must match that of 'dims' [%d]"),
@@ -969,7 +1074,7 @@ SEXP dimnamesgets(SEXP vec, SEXP val)
 	newval = shallow_duplicate(val);
 	UNPROTECT(1);
 	PROTECT(val = newval);
-    }	
+    }
     if (k != length(val))
 	error(_("length of 'dimnames' [%d] must match that of 'dims' [%d]"),
 	      length(val), k);
@@ -993,6 +1098,11 @@ SEXP dimnamesgets(SEXP vec, SEXP val)
 	    SET_TAG(val, installTrChar(STRING_ELT(top, i++)));
     }
     UNPROTECT(2);
+
+    /* Mark as immutable so nested complex assignment can't make the
+       dimnames attribute inconsistent with the length */
+    MARK_NOT_MUTABLE(val);
+
     return vec;
 }
 
@@ -1081,6 +1191,11 @@ SEXP dimgets(SEXP vec, SEXP val)
     }
     removeAttrib(vec, R_DimNamesSymbol);
     installAttrib(vec, R_DimSymbol, val);
+
+    /* Mark as immutable so nested complex assignment can't make the
+       dim attribute inconsistent with the length */
+    MARK_NOT_MUTABLE(val);
+
     UNPROTECT(2);
     return vec;
 }
@@ -1093,6 +1208,10 @@ SEXP attribute_hidden do_attributes(SEXP call, SEXP op, SEXP args, SEXP env)
     checkArity(op, args);
     check1arg(args, call, "x");
     namesattr = R_NilValue;
+
+    if (TYPEOF(CAR(args)) == ENVSXP)
+	R_CheckStack(); /* in case attributes might lead to a cycle */
+
     attrs = ATTRIB(CAR(args));
     nvalues = length(attrs);
     if (isList(CAR(args))) {
@@ -1114,21 +1233,20 @@ SEXP attribute_hidden do_attributes(SEXP call, SEXP op, SEXP args, SEXP env)
 	nvalues++;
     }
     while (attrs != R_NilValue) {
-	/* treat R_RowNamesSymbol specially */
-	if (TAG(attrs) == R_RowNamesSymbol)
-	    SET_VECTOR_ELT(value, nvalues,
-			   getAttrib(CAR(args), R_RowNamesSymbol));
-	else
+	SEXP tag = TAG(attrs);
+	if (TYPEOF(tag) == SYMSXP) {
+	    SET_VECTOR_ELT(value, nvalues, getAttrib(CAR(args), tag));
+	    SET_STRING_ELT(names, nvalues, PRINTNAME(TAG(attrs)));
+	}
+	else {
+	    MARK_NOT_MUTABLE(CAR(attrs));
 	    SET_VECTOR_ELT(value, nvalues, CAR(attrs));
-	if (TAG(attrs) == R_NilValue)
 	    SET_STRING_ELT(names, nvalues, R_BlankString);
-	else
-	    SET_STRING_ELT(names, nvalues, PRINTNAME(TAG(attrs)));
+	}	
 	attrs = CDR(attrs);
 	nvalues++;
     }
     setAttrib(value, R_NamesSymbol, names);
-    SET_NAMED(value, NAMED(CAR(args)));
     UNPROTECT(3);
     return value;
 }
@@ -1143,10 +1261,11 @@ SEXP attribute_hidden do_levelsgets(SEXP call, SEXP op, SEXP args, SEXP env)
     if (DispatchOrEval(call, op, "levels<-", args, env, &ans, 0, 1))
 	/* calls, e.g., levels<-.factor() */
 	return(ans);
+    PROTECT(ans);
     if(!isNull(CADR(args)) && any_duplicated(CADR(args), FALSE))
-	warningcall(call, "duplicated levels in factors are deprecated");
-/* TODO errorcall(call, _("duplicated levels are not allowed in factors anymore")); */
-    PROTECT(args = ans);
+	errorcall(call, _("factor level [%d] is duplicated"),
+		  any_duplicated(CADR(args), FALSE));
+    args = ans;
     if (MAYBE_SHARED(CAR(args))) SETCAR(args, duplicate(CAR(args)));
     setAttrib(CAR(args), R_LevelsSymbol, CADR(args));
     UNPROTECT(1);
@@ -1162,7 +1281,7 @@ SEXP attribute_hidden do_attributesgets(SEXP call, SEXP op, SEXP args, SEXP env)
 /* "dim" and "dimnames" are set that the "dim" is attached first. */
 
     SEXP object, attrs, names = R_NilValue /* -Wall */;
-    int i, i0 = -1, nattrs;
+    int i, nattrs;
 
     /* Extract the arguments from the argument list */
 
@@ -1227,6 +1346,7 @@ SEXP attribute_hidden do_attributesgets(SEXP call, SEXP op, SEXP args, SEXP env)
     /* "dim" occurs in the attribute list before "dimnames". */
 
     if (nattrs > 0) {
+	int i0 = -1;
 	for (i = 0; i < nattrs; i++) {
 	    if (!strcmp(CHAR(STRING_ELT(names, i)), "dim")) {
 		i0 = i;
@@ -1263,21 +1383,22 @@ fairly minor.  LT */
 
 SEXP attribute_hidden do_attr(SEXP call, SEXP op, SEXP args, SEXP env)
 {
-    SEXP ap, argList, s, t, tag = R_NilValue, alist, ans;
+    SEXP argList, s, t, tag = R_NilValue, alist, ans;
     const char *str;
     int nargs = length(args), exact = 0;
     enum { NONE, PARTIAL, PARTIAL2, FULL } match = NONE;
+    static SEXP do_attr_formals = NULL;
+
+    if (do_attr_formals == NULL)
+	do_attr_formals = allocFormalsList3(install("x"), install("which"),
+					    R_ExactSymbol);
+
+    argList = matchArgs(do_attr_formals, args, call);
 
     if (nargs < 2 || nargs > 3)
 	errorcall(call, "either 2 or 3 arguments are required");
 
     /* argument matching */
-    PROTECT(ap = list3(R_NilValue, R_NilValue, R_NilValue));
-    SET_TAG(ap,  install("x"));
-    SET_TAG(CDR(ap), install("which"));
-    SET_TAG(CDDR(ap), install("exact"));
-    argList = matchArgs(ap, args, call);
-    UNPROTECT(1); /* ap */
     PROTECT(argList);
     s = CAR(argList);
     t = CADR(argList);
@@ -1286,6 +1407,9 @@ SEXP attribute_hidden do_attr(SEXP call, SEXP op, SEXP args, SEXP env)
     if (length(t) != 1)
 	errorcall(call, _("exactly one attribute 'which' must be given"));
 
+    if (TYPEOF(s) == ENVSXP)
+	R_CheckStack(); /* in case attributes might lead to a cycle */
+
     if(nargs == 3) {
 	exact = asLogical(CADDR(args));
 	if(exact == NA_LOGICAL) exact = 0;
@@ -1340,11 +1464,11 @@ SEXP attribute_hidden do_attr(SEXP call, SEXP op, SEXP args, SEXP env)
 	    /* no match on other attributes and a possible
 	       partial match on "names" */
 	    tag = R_NamesSymbol;
-	    t = getAttrib(s, tag);
+	    PROTECT(t = getAttrib(s, tag));
 	    if(t != R_NilValue && R_warn_partial_match_attr)
 		warningcall(call, _("partial match of '%s' to '%s'"), str,
 			    CHAR(PRINTNAME(tag)));
-	    UNPROTECT(1);
+	    UNPROTECT(2);
 	    return t;
 	}
 	else if (match == PARTIAL && strcmp(CHAR(PRINTNAME(tag)), "names")) {
@@ -1373,24 +1497,32 @@ SEXP attribute_hidden do_attr(SEXP call, SEXP op, SEXP args, SEXP env)
     return ans;
 }
 
-static void check_slot_assign(SEXP obj, SEXP input, SEXP value, SEXP env) 
+static void check_slot_assign(SEXP obj, SEXP input, SEXP value, SEXP env)
 {
-    SEXP valueClass, objClass, e;
-
-    valueClass = PROTECT(R_data_class(value, FALSE));
-    objClass = PROTECT(R_data_class(obj, FALSE));
-    e = PROTECT(lang4(install("checkAtAssignment"), 
-		      objClass, input, valueClass));
+    SEXP
+	valueClass = PROTECT(R_data_class(value, FALSE)),
+	objClass   = PROTECT(R_data_class(obj, FALSE));
+    static SEXP checkAt = NULL;
+    // 'methods' may *not* be in search() ==> do as if calling  methods::checkAtAssignment(..)
+    if(!isMethodsDispatchOn()) { // needed?
+	SEXP e = PROTECT(lang1(install("initMethodDispatch")));
+	eval(e, R_MethodsNamespace); // only works with methods loaded
+	UNPROTECT(1);
+    }
+    if(checkAt == NULL)
+	checkAt = findFun(install("checkAtAssignment"), R_MethodsNamespace);
+    SEXP e = PROTECT(lang4(checkAt, objClass, input, valueClass));
     eval(e, env);
     UNPROTECT(3);
 }
 
 
+/* attr(obj, which = "<name>")  <-  value    (op == 0)  and
+        obj @ <name>            <-  value    (op == 1)
+*/
 SEXP attribute_hidden do_attrgets(SEXP call, SEXP op, SEXP args, SEXP env)
 {
-    /*  attr(x, which = "<name>")  <-  value  */
-    SEXP obj, name, ap, argList;
-
+    SEXP obj, name;
     checkArity(op, args);
 
     if(PRIMVAL(op)) { /* @<- */
@@ -1403,7 +1535,7 @@ SEXP attribute_hidden do_attrgets(SEXP call, SEXP op, SEXP args, SEXP env)
 	else if(isString(nlist) )
 	    SET_STRING_ELT(input, 0, STRING_ELT(nlist, 0));
 	else {
-	    error(_("invalid type '%s' for slot name"), 
+	    error(_("invalid type '%s' for slot name"),
 		  type2char(TYPEOF(nlist)));
 	    return R_NilValue; /*-Wall*/
 	}
@@ -1412,7 +1544,7 @@ SEXP attribute_hidden do_attrgets(SEXP call, SEXP op, SEXP args, SEXP env)
 	SETCADR(args, input);
 	UNPROTECT(1); // 'input' is now protected
 
- 	if(DispatchOrEval(call, op, "@<-", args, env, &ans, 0, 0))
+	if(DispatchOrEval(call, op, "@<-", args, env, &ans, 0, 0))
 	    return(ans);
 
 	PROTECT(obj = CAR(ans));
@@ -1422,34 +1554,35 @@ SEXP attribute_hidden do_attrgets(SEXP call, SEXP op, SEXP args, SEXP env)
 	UNPROTECT(2);
 	return value;
     }
+    else { // attr(obj, "name") <- value :
+	SEXP argList;
+	static SEXP do_attrgets_formals = NULL;
 
-
-    obj = CAR(args);
-    if (MAYBE_SHARED(obj))
-	PROTECT(obj = shallow_duplicate(obj));
-    else
-	PROTECT(obj);
-
-    /* argument matching */
-    PROTECT(ap = list3(R_NilValue, R_NilValue, R_NilValue));
-    SET_TAG(ap,  install("x"));
-    SET_TAG(CDR(ap), install("which"));
-    SET_TAG(CDDR(ap), install("value"));
-    argList = matchArgs(ap, args, call);
-    UNPROTECT(1); /* ap */
-    PROTECT(argList);
-
-    name = CADR(argList);
-    if (!isValidString(name) || STRING_ELT(name, 0) == NA_STRING)
-	error(_("'name' must be non-null character string"));
-    /* TODO?  if (isFactor(obj) && !strcmp(asChar(name), "levels"))
-     * ---         if(any_duplicated(CADDR(args)))
-     *                  error(.....)
-     */
-    setAttrib(obj, name, CADDR(args));
-    UNPROTECT(2);
-    SET_NAMED(obj, 0);
-    return obj;
+	obj = CAR(args);
+	if (MAYBE_SHARED(obj))
+	    PROTECT(obj = shallow_duplicate(obj));
+	else
+	    PROTECT(obj);
+
+	/* argument matching */
+	if (do_attrgets_formals == NULL)
+	    do_attrgets_formals = allocFormalsList3(install("x"), install("which"),
+						    install("value"));
+	argList = matchArgs(do_attrgets_formals, args, call);
+	PROTECT(argList);
+
+	name = CADR(argList);
+	if (!isValidString(name) || STRING_ELT(name, 0) == NA_STRING)
+	    error(_("'name' must be non-null character string"));
+	/* TODO?  if (isFactor(obj) && !strcmp(asChar(name), "levels"))
+	 * ---         if(any_duplicated(CADDR(args)))
+	 *                  error(.....)
+	 */
+	setAttrib(obj, name, CADDR(args));
+	UNPROTECT(2);
+	SET_NAMED(obj, 0);
+	return obj;
+    }
 }
 
 
@@ -1568,7 +1701,7 @@ int R_has_slot(SEXP obj, SEXP name) {
 	error(_("invalid type or length for slot name"));		\
     if(!s_dot_Data)							\
 	init_slot_handling();						\
-    if(isString(name)) name = install(CHAR(STRING_ELT(name, 0)))
+    if(isString(name)) name = installTrChar(STRING_ELT(name, 0))
 
     R_SLOT_INIT;
     if(name == s_dot_Data && TYPEOF(obj) != S4SXP)
@@ -1590,10 +1723,10 @@ SEXP R_do_slot(SEXP obj, SEXP name) {
 	if(value == R_NilValue) {
 	    SEXP input = name, classString;
 	    if(name == s_dot_S3Class) /* defaults to class(obj) */
-	        return R_data_class(obj, FALSE);
+		return R_data_class(obj, FALSE);
 	    else if(name == R_NamesSymbol &&
 		    TYPEOF(obj) == VECSXP) /* needed for namedList class */
-	        return value;
+		return value;
 	    if(isSymbol(name) ) {
 		input = PROTECT(ScalarString(PRINTNAME(name)));
 		classString = getAttrib(obj, R_ClassSymbol);
@@ -1603,13 +1736,13 @@ SEXP R_do_slot(SEXP obj, SEXP name) {
 			  translateChar(asChar(input)),
 			  CHAR(type2str(TYPEOF(obj))));
 		}
+		UNPROTECT(1);
 	    }
 	    else classString = R_NilValue; /* make sure it is initialized */
 	    /* not there.  But since even NULL really does get stored, this
 	       implies that there is no slot of this name.  Or somebody
 	       screwed up by using attr(..) <- NULL */
 
-	    UNPROTECT(1);
 	    error(_("no slot of name \"%s\" for this object of class \"%s\""),
 		  translateChar(asChar(input)),
 		  translateChar(asChar(classString)));
@@ -1646,7 +1779,7 @@ SEXP R_do_slot_assign(SEXP obj, SEXP name, SEXP value) {
     } else {
 	if(isNull(value))		/* Slots, but not attributes, can be NULL.*/
 	    value = pseudo_NULL;	/* Store a special symbol instead. */
-	    
+
 #ifdef _R_ver_le_2_11_x_
 	setAttrib(obj, name, value);
 #else
@@ -1667,6 +1800,7 @@ SEXP attribute_hidden do_AT(SEXP call, SEXP op, SEXP args, SEXP env)
 {
     SEXP  nlist, object, ans, klass;
 
+    checkArity(op, args);
     if(!isMethodsDispatchOn())
 	error(_("formal classes cannot be used without the 'methods' package"));
     nlist = CADR(args);
@@ -1712,17 +1846,22 @@ SEXP attribute_hidden
 R_getS4DataSlot(SEXP obj, SEXPTYPE type)
 {
   static SEXP s_xData, s_dotData; SEXP value = R_NilValue;
+  PROTECT_INDEX opi;
+
+  PROTECT_WITH_INDEX(obj, &opi);
   if(!s_xData) {
     s_xData = install(".xData");
     s_dotData = install(".Data");
   }
   if(TYPEOF(obj) != S4SXP || type == S4SXP) {
     SEXP s3class = S3Class(obj);
-    if(s3class == R_NilValue && type == S4SXP)
+    if(s3class == R_NilValue && type == S4SXP) {
+      UNPROTECT(1); /* obj */
       return R_NilValue;
+    }
     PROTECT(s3class);
-    if(MAYBE_REFERENCED(obj)) obj = shallow_duplicate(obj);
-    UNPROTECT(1);
+    if(MAYBE_REFERENCED(obj))
+      REPROTECT(obj = shallow_duplicate(obj), opi);
     if(s3class != R_NilValue) {/* replace class with S3 class */
       setAttrib(obj, R_ClassSymbol, s3class);
       setAttrib(obj, s_dot_S3Class, R_NilValue); /* not in the S3 class */
@@ -1730,20 +1869,26 @@ R_getS4DataSlot(SEXP obj, SEXPTYPE type)
     else { /* to avoid inf. recursion, must unset class attribute */
       setAttrib(obj, R_ClassSymbol, R_NilValue);
     }
+    UNPROTECT(1); /* s3class */
     UNSET_S4_OBJECT(obj);
-    if(type == S4SXP)
+    if(type == S4SXP) {
+      UNPROTECT(1); /* obj */
       return obj;
+    }
     value = obj;
   }
   else
       value = getAttrib(obj, s_dotData);
   if(value == R_NilValue)
       value = getAttrib(obj, s_xData);
+
+  UNPROTECT(1); /* obj */
 /* the mechanism for extending abnormal types.  In the future, would b
    good to consolidate under the ".Data" slot, but this has
    been used to mean S4 objects with non-S4 type, so for now
    a secondary slot name, ".xData" is used to avoid confusion
-*/  if(value != R_NilValue &&
+*/
+  if(value != R_NilValue &&
      (type == ANYSXP || type == TYPEOF(value)))
      return value;
   else
diff --git a/src/main/basedecl.h b/src/main/basedecl.h
index 26f6b8c..cb0fde1 100644
--- a/src/main/basedecl.h
+++ b/src/main/basedecl.h
@@ -1,6 +1,6 @@
 /*
  *  R : A Computer Language for Statistical Data Analysis
- *  Copyright (C) 2002-2012	The R Core Team.
+ *  Copyright (C) 2002-2014	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
@@ -14,7 +14,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  *
  *  This header contains the declarations of code to be used by
  *  .C, .Fortran, .Call or .External within the base package.
@@ -24,9 +24,3 @@
 SEXP R_getTaskCallbackNames(void);
 SEXP R_removeTaskCallback(SEXP);
 SEXP R_addTaskCallback(SEXP, SEXP, SEXP, SEXP);
-
-#ifdef BC_PROFILING
-SEXP R_getbcprofcounts(void);
-SEXP R_startbcprof(void);
-SEXP R_stopbcprof(void);
-#endif
diff --git a/src/main/bind.c b/src/main/bind.c
index ca601bd..b742da7 100644
--- a/src/main/bind.c
+++ b/src/main/bind.c
@@ -1,8 +1,8 @@
 /*
  *  R : A Computer Language for Statistical Data Analysis
  *  Copyright (C) 1995, 1996  Robert Gentleman and Ross Ihaka
- *  Copyright (C) 1997--2014  The R Core Team
- *  Copyright (C) 2002--2005  The R Foundation
+ *  Copyright (C) 1997--2016  The R Core Team
+ *  Copyright (C) 2002--2016  The R Foundation
  *
  *  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
@@ -16,7 +16,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  */
 
 /* Code to handle list / vector switch */
@@ -28,11 +28,14 @@
 #include <Defn.h>
 #include <Internal.h>
 #include <R_ext/PrtUtil.h> // for IndexWidth
+#include <R_ext/Itermacros.h>
 #define imax2(x, y) ((x < y) ? y : x)
 
 #include "RBufferUtils.h"
 static R_StringBuffer cbuff = {NULL, 0, MAXELTSIZE};
 
+#include "duplicate.h"
+
 #define LIST_ASSIGN(x) {SET_VECTOR_ELT(data->ans_ptr, data->ans_length, x); data->ans_length++;}
 
 static SEXP cbind(SEXP, SEXP, SEXPTYPE, SEXP, int);
@@ -108,7 +111,7 @@ AnswerType(SEXP x, int recurse, int usenames, struct BindData *data, SEXP call)
     case VECSXP:
     case EXPRSXP:
 	if (recurse) {
-	    R_xlen_t i, n = xlength(x);
+	    R_xlen_t i, n = XLENGTH(x);
 	    if (usenames && !data->ans_nnames &&
 		!isNull(getAttrib(x, R_NamesSymbol)))
 		data->ans_nnames = 1;
@@ -123,7 +126,7 @@ AnswerType(SEXP x, int recurse, int usenames, struct BindData *data, SEXP call)
 		data->ans_flags |= 512;
 	    else
 		data->ans_flags |= 256;
-	    data->ans_length += xlength(x);
+	    data->ans_length += XLENGTH(x);
 	}
 	break;
     case LISTSXP:
@@ -671,8 +674,8 @@ static void NewExtractNames(SEXP v, SEXP base, SEXP tag, int recurse,
 /* way, rather than having an interpreted front-end do the job, */
 /* because we want to avoid duplication at the top level. */
 /* FIXME : is there another possibility? */
-
-static SEXP ExtractOptionals(SEXP ans, int *recurse, int *usenames, SEXP call)
+static SEXP c_Extract_opt(SEXP ans, Rboolean *recurse, Rboolean *usenames,
+			  SEXP call)
 {
     SEXP a, n, last = NULL, next = NULL;
     int v, n_recurse = 0, n_usenames = 0;
@@ -729,38 +732,39 @@ SEXP attribute_hidden do_c(SEXP call, SEXP op, SEXP args, SEXP env)
 
     /* Attempt method dispatch. */
 
-    if (DispatchOrEval(call, op, "c", args, env, &ans, 1, 1))
+    if (DispatchAnyOrEval(call, op, "c", args, env, &ans, 1, 1))
+	//      ^^^ "Any" => all args are eval()ed and checked => correct multi-arg dispatch
 	return(ans);
-    return do_c_dflt(call, op, ans, env);
+    PROTECT(ans);
+    SEXP res = do_c_dflt(call, op, ans, env);
+    UNPROTECT(1);
+    return res;
 }
 
 SEXP attribute_hidden do_c_dflt(SEXP call, SEXP op, SEXP args, SEXP env)
 {
-    SEXP ans, t;
-    int mode, recurse, usenames;
-    struct BindData data;
-    struct NameData nameData;
-
-/*    data.deparse_level = 1;  Initialize this early. */
-
     /* Method dispatch has failed; run the default code. */
     /* By default we do not recurse, but this can be over-ridden */
     /* by an optional "recursive" argument. */
 
-    usenames = 1;
-    recurse = 0;
+    Rboolean
+	usenames = TRUE,
+	recurse = FALSE;
     /* this was only done for length(args) > 1 prior to 1.5.0,
        _but_ `recursive' might be the only argument */
-    PROTECT(args = ExtractOptionals(args, &recurse, &usenames, call));
+    PROTECT(args = c_Extract_opt(args, &recurse, &usenames, call));
 
     /* Determine the type of the returned value. */
     /* The strategy here is appropriate because the */
     /* object being operated on is a pair based list. */
 
+    struct BindData data;
+/*    data.deparse_level = 1;  Initialize this early. */
     data.ans_flags  = 0;
     data.ans_length = 0;
     data.ans_nnames = 0;
 
+    SEXP t;
     for (t = args; t != R_NilValue; t = CDR(t)) {
 	if (usenames && !data.ans_nnames) {
 	    if (!isNull(TAG(t))) data.ans_nnames = 1;
@@ -773,8 +777,8 @@ SEXP attribute_hidden do_c_dflt(SEXP call, SEXP op, SEXP args, SEXP env)
     /* recursive is FALSE) then we must return a list.	Otherwise, */
     /* we use the natural coercion for vector types. */
 
-    mode = NILSXP;
-    if (data.ans_flags & 512)	   mode = EXPRSXP;
+    int mode = NILSXP;
+    if      (data.ans_flags & 512) mode = EXPRSXP;
     else if (data.ans_flags & 256) mode = VECSXP;
     else if (data.ans_flags & 128) mode = STRSXP;
     else if (data.ans_flags &  64) mode = CPLXSXP;
@@ -786,7 +790,7 @@ SEXP attribute_hidden do_c_dflt(SEXP call, SEXP op, SEXP args, SEXP env)
     /* Allocate the return value and set up to pass through */
     /* the arguments filling in values of the returned object. */
 
-    PROTECT(ans = allocVector(mode, data.ans_length));
+    SEXP ans = PROTECT(allocVector(mode, data.ans_length));
     data.ans_ptr = ans;
     data.ans_length = 0;
     t = args;
@@ -821,6 +825,7 @@ SEXP attribute_hidden do_c_dflt(SEXP call, SEXP op, SEXP args, SEXP env)
 	PROTECT(data.ans_names = allocVector(STRSXP, data.ans_length));
 	data.ans_nnames = 0;
 	while (args != R_NilValue) {
+	    struct NameData nameData;
 	    nameData.seqno = 0;
 	    nameData.firstpos = 0;
 	    nameData.count = 0;
@@ -839,10 +844,8 @@ SEXP attribute_hidden do_c_dflt(SEXP call, SEXP op, SEXP args, SEXP env)
 SEXP attribute_hidden do_unlist(SEXP call, SEXP op, SEXP args, SEXP env)
 {
     SEXP ans, t;
-    int mode;
     R_xlen_t i, n = 0;
     struct BindData data;
-    struct NameData nameData;
 
 /*    data.deparse_level = 1; */
     checkArity(op, args);
@@ -898,7 +901,7 @@ SEXP attribute_hidden do_unlist(SEXP call, SEXP op, SEXP args, SEXP env)
     /* recursive = F) then we must return a list.  Otherwise, we use */
     /* the natural coercion for vector types. */
 
-    mode = NILSXP;
+    int mode = NILSXP;
     if      (data.ans_flags & 512) mode = EXPRSXP;
     else if (data.ans_flags & 256) mode = VECSXP;
     else if (data.ans_flags & 128) mode = STRSXP;
@@ -941,6 +944,7 @@ SEXP attribute_hidden do_unlist(SEXP call, SEXP op, SEXP args, SEXP env)
     /* Build and attach the names attribute for the returned object. */
 
     if (data.ans_nnames && data.ans_length > 0) {
+	struct NameData nameData;
 	PROTECT(data.ans_names = allocVector(STRSXP, data.ans_length));
 	if (!recurse) {
 	    if (TYPEOF(args) == VECSXP) {
@@ -986,24 +990,25 @@ SEXP attribute_hidden do_unlist(SEXP call, SEXP op, SEXP args, SEXP env)
 /* This is a special .Internal */
 SEXP attribute_hidden do_bind(SEXP call, SEXP op, SEXP args, SEXP env)
 {
-    SEXP a, t, obj, classlist, classname, method, classmethod, rho;
-    const char *generic;
+    SEXP a, t, obj, method, rho, ans;
     int mode, deparse_level;
-    Rboolean compatible = TRUE;
+    Rboolean compatible = TRUE, anyS4 = FALSE;
     struct BindData data;
     char buf[512];
-    const char *s, *klass;
 
     /* since R 2.2.0: first argument "deparse.level" */
     deparse_level = asInteger(eval(CAR(args), env));
-    args = CDR(args);
+    Rboolean tryS4 = deparse_level >= 0;
+    /* NB: negative deparse_level should otherwise be equivalent to deparse_level == 0,
+     * --  as cbind(), rbind() below only check for '== 1' and '== 2'
+     * {FIXME: methods should do same} */
 
     /* Lazy evaluation and method dispatch based on argument types are
      * fundamentally incompatible notions.  The results here are
      * ghastly.
      *
      * We build promises to evaluate the arguments and then force the
-     * promises so that if we despatch to a closure below, the closure
+     * promises so that if we dispatch to a closure below, the closure
      * is still in a position to use "substitute" to get the actual
      * expressions which generated the argument (for naming purposes).
      *
@@ -1023,22 +1028,21 @@ SEXP attribute_hidden do_bind(SEXP call, SEXP op, SEXP args, SEXP env)
 
     PROTECT(args = promiseArgs(args, env));
 
-    generic = ((PRIMVAL(op) == 1) ? "cbind" : "rbind");
-    klass = "";
+    const char *generic = ((PRIMVAL(op) == 1) ? "cbind" : "rbind");
+    const char *klass = "";
     method = R_NilValue;
-    for (a = args; a != R_NilValue && compatible; a = CDR(a)) {
+    for (a = CDR(args); a != R_NilValue; a = CDR(a)) {
 	PROTECT(obj = eval(CAR(a), env));
-	if (isObject(obj)) {
-	    int i;
-	    classlist = getAttrib(obj, R_ClassSymbol);
-	    for (i = 0; i < length(classlist); i++) {
-		classname = STRING_ELT(classlist, i);
-		s = translateChar(classname);
+	if (tryS4 && !anyS4 && isS4(obj)) anyS4 = TRUE;
+	if (compatible && isObject(obj)) {
+	    SEXP classlist = PROTECT(R_data_class2(obj));
+	    for (int i = 0; i < length(classlist); i++) {
+		const char *s = translateChar(STRING_ELT(classlist, i));
 		if(strlen(generic) + strlen(s) + 2 > 512)
 		    error(_("class name too long in '%s'"), generic);
 		sprintf(buf, "%s.%s", generic, s);
-		classmethod = R_LookupMethod(install(buf), env, env,
-					     R_BaseNamespace);
+		SEXP classmethod = R_LookupMethod(install(buf), env, env,
+						  R_BaseNamespace);
 		if (classmethod != R_UnboundValue) {
 		    if (klass[0] == '\0') {
 			/* There is no previous class */
@@ -1053,27 +1057,35 @@ SEXP attribute_hidden do_bind(SEXP call, SEXP op, SEXP args, SEXP env)
 			/* default method. */
 			if (strcmp(klass, s)) {
 			    method = R_NilValue;
-			    /* need to end both loops */
 			    compatible = FALSE;
 			}
 		    }
 		    break; /* go to next parameter */
 		}
 	    }
+	    UNPROTECT(1);
 	}
 	UNPROTECT(1);
     }
-    if (method != R_NilValue) {
+
+    tryS4 = anyS4 && (!compatible || method == R_NilValue);
+    if (tryS4) {
+	// keep 'deparse.level' as first arg and *name* it:
+	SET_TAG(args, install("deparse.level"));
+	// and use methods:::cbind / rbind
+	method = findFun(install(generic), R_MethodsNamespace);
+    } else
+	args = CDR(args); // keeping deparse.level for S4 dispatch
+    if (method != R_NilValue) { // found an S3 or S4 method
 	PROTECT(method);
-	args = applyClosure(call, method, args, env, R_BaseEnv);
+	ans = applyClosure(call, method, args, env, R_NilValue);
 	UNPROTECT(2);
-	return args;
+	return ans;
     }
 
     /* Dispatch based on class membership has failed. */
     /* The default code for rbind/cbind.default follows */
     /* First, extract the evaluated arguments. */
-
     rho = env;
     data.ans_flags = 0;
     data.ans_length = 0;
@@ -1088,7 +1100,7 @@ SEXP attribute_hidden do_bind(SEXP call, SEXP op, SEXP args, SEXP env)
     }
 
     mode = NILSXP;
-    if (data.ans_flags & 512)	   mode = EXPRSXP;
+    if      (data.ans_flags & 512) mode = EXPRSXP;
     else if (data.ans_flags & 256) mode = VECSXP;
     else if (data.ans_flags & 128) mode = STRSXP;
     else if (data.ans_flags &  64) mode = CPLXSXP;
@@ -1150,7 +1162,6 @@ static void SetColNames(SEXP dimnames, SEXP x)
 static SEXP cbind(SEXP call, SEXP args, SEXPTYPE mode, SEXP rho,
 		  int deparse_level)
 {
-    int i, j, k, idx;
     Rboolean have_rnames = FALSE, have_cnames = FALSE, warned = FALSE;
     int nnames, mnames;
     int rows, cols, mrows, lenmin = 0;
@@ -1207,18 +1218,19 @@ static SEXP cbind(SEXP call, SEXP args, SEXPTYPE mode, SEXP rho,
 		    mnames = mrows;
 	    }
 	} else {
-	    k = length(u);
+	    int k = length(u);
 	    if (!warned && k > 0 && (k > rows || rows % k)) {
 		warned = TRUE;
 		warning("number of rows of result is not a multiple of vector length (arg %d)", na + 1);
 	    }
-	    dn = getAttrib(u, R_NamesSymbol);
+	    PROTECT(dn = getAttrib(u, R_NamesSymbol));
 	    if (k >= lenmin && (TAG(t) != R_NilValue ||
 				(deparse_level == 2) ||
 				((deparse_level == 1) &&
 				 isSymbol(substitute(CAR(t),R_NilValue)))))
 		have_cnames = TRUE;
 	    nnames = imax2(nnames, length(dn));
+	    UNPROTECT(1); /* dn */
 	}
     }
     if (mnames || nnames == rows)
@@ -1232,10 +1244,10 @@ static SEXP cbind(SEXP call, SEXP args, SEXPTYPE mode, SEXP rho,
 	    u = PRVALUE(CAR(t));
 	    if (isMatrix(u) || length(u) >= lenmin) {
 		u = coerceVector(u, STRSXP);
-		k = LENGTH(u);
-		idx = (!isMatrix(u)) ? rows : k;
-		for (i = 0; i < idx; i++)
-		    SET_STRING_ELT(result, n++, STRING_ELT(u, i % k));
+		R_xlen_t k = XLENGTH(u);
+		R_xlen_t idx = (!isMatrix(u)) ? rows : k;
+		xcopyStringWithRecycle(result, u, n, idx, k);
+		n += idx;
 	    }
 	}
     }
@@ -1257,17 +1269,19 @@ static SEXP cbind(SEXP call, SEXP args, SEXPTYPE mode, SEXP rho,
 		case VECSXP:
 		case LISTSXP:
 		    PROTECT(u = coerceVector(u, mode));
-		    k = LENGTH(u);
+		    R_xlen_t k = XLENGTH(u);
 		    if (k > 0) {
-			idx = (!umatrix) ? rows : k;
-			for (i = 0; i < idx; i++)
+			R_xlen_t idx = (!umatrix) ? rows : k;
+			R_xlen_t i, i1;
+			MOD_ITERATE1(idx, k, i, i1, {
 			    SET_VECTOR_ELT(result, n++,
-					   lazy_duplicate(VECTOR_ELT(u, i % k)));
+				lazy_duplicate(VECTOR_ELT(u, i1)));
+			});
 		    }
 		    UNPROTECT(1);
 		    break;
 		default:
-		    for (i = 0; i < rows; i++)
+		    for (int i = 0; i < rows; i++)
 			SET_VECTOR_ELT(result, n++, lazy_duplicate(u));
 		}
 	    }
@@ -1278,10 +1292,10 @@ static SEXP cbind(SEXP call, SEXP args, SEXPTYPE mode, SEXP rho,
 	    u = PRVALUE(CAR(t));
 	    if (isMatrix(u) || length(u) >= lenmin) {
 		u = coerceVector(u, CPLXSXP);
-		k = LENGTH(u);
-		idx = (!isMatrix(u)) ? rows : k;
-		for (i = 0; i < idx; i++)
-		    COMPLEX(result)[n++] = COMPLEX(u)[i % k];
+		R_xlen_t k = XLENGTH(u);
+		R_xlen_t idx = (!isMatrix(u)) ? rows : k;
+		xcopyComplexWithRecycle(COMPLEX(result), COMPLEX(u), n, idx, k);
+		n += idx;
 	    }
 	}
     }
@@ -1290,44 +1304,53 @@ static SEXP cbind(SEXP call, SEXP args, SEXPTYPE mode, SEXP rho,
 	    u = PRVALUE(CAR(t));
 	    if (isMatrix(u) || length(u) >= lenmin) {
 		u = coerceVector(u, RAWSXP);
-		k = LENGTH(u);
-		idx = (!isMatrix(u)) ? rows : k;
-		for (i = 0; i < idx; i++)
-		    RAW(result)[n++] = RAW(u)[i % k];
+		R_xlen_t k = XLENGTH(u);
+		R_xlen_t idx = (!isMatrix(u)) ? rows : k;
+		xcopyRawWithRecycle(RAW(result), RAW(u), n, idx, k);
+		n += idx;
 	    }
 	}
     }
     else { /* everything else, currently REALSXP, INTSXP, LGLSXP */
 	for (t = args; t != R_NilValue; t = CDR(t)) {
-	    u = PRVALUE(CAR(t)); /* type of u can be any of: RAW, LGL, INT, REAL */
+	    u = PRVALUE(CAR(t)); /* type of u can be any of: RAW, LGL, INT, REAL, or NULL */
 	    if (isMatrix(u) || length(u) >= lenmin) {
-		k = LENGTH(u);
-		idx = (!isMatrix(u)) ? rows : k;
+		R_xlen_t k = xlength(u); /* use xlength since u can be NULL */
+		R_xlen_t idx = (!isMatrix(u)) ? rows : k;
 		if (TYPEOF(u) <= INTSXP) { /* INT or LGL */
 		    if (mode <= INTSXP) {
-			for (i = 0; i < idx; i++)
-			    INTEGER(result)[n++] = INTEGER(u)[i % k];
+			xcopyIntegerWithRecycle(INTEGER(result), INTEGER(u),
+						n, idx, k);
+			n += idx;
 		    }
 		    else {
-			for (i = 0; i < idx; i++)
-			    REAL(result)[n++] = (INTEGER(u)[i % k]) == NA_INTEGER ? NA_REAL : INTEGER(u)[i % k];
+			R_xlen_t i, i1;
+			MOD_ITERATE1(idx, k, i, i1, {
+			    REAL(result)[n++] =
+				(INTEGER(u)[i1]) == NA_INTEGER ? NA_REAL : INTEGER(u)[i1];
+			});
 		    }
 		}
 		else if (TYPEOF(u) == REALSXP) {
-		    for (i = 0; i < idx; i++)
-			REAL(result)[n++] = REAL(u)[i % k];
+		    xcopyRealWithRecycle(REAL(result), REAL(u), n, idx, k);
+		    n += idx;
 		}
 		else { /* RAWSXP */
 		    /* FIXME: I'm not sure what the author intended when the sequence was
 		       defined as raw < logical -- it is possible to represent logical as
 		       raw losslessly but not vice versa. So due to the way this was
 		       defined the raw -> logical conversion is bound to be lossy .. */
-		    if (mode == LGLSXP)
-			for (i = 0; i < idx; i++)
-			    LOGICAL(result)[n++] = RAW(u)[i % k] ? TRUE : FALSE;
-		    else
-			for (i = 0; i < idx; i++)
-			    INTEGER(result)[n++] = (unsigned char) RAW(u)[i % k];
+		    if (mode == LGLSXP) {
+			R_xlen_t i, i1;
+			MOD_ITERATE1(idx, k, i, i1, {
+			    LOGICAL(result)[n++] = RAW(u)[i1] ? TRUE : FALSE;
+			});
+		    } else {
+			R_xlen_t i, i1;
+			MOD_ITERATE1(idx, k, i, i1, {
+			    INTEGER(result)[n++] = (unsigned char) RAW(u)[i1];
+			});
+		    }
 		}
 	    }
 	}
@@ -1341,7 +1364,7 @@ static SEXP cbind(SEXP call, SEXP args, SEXPTYPE mode, SEXP rho,
 	    nam = SET_VECTOR_ELT(dn, 1, allocVector(STRSXP, cols));
 	else
 	    nam = R_NilValue;	/* -Wall */
-	j = 0;
+	int j = 0;
 	for (t = args; t != R_NilValue; t = CDR(t)) {
 	    u = PRVALUE(CAR(t));
 	    if (isMatrix(u)) {
@@ -1356,11 +1379,11 @@ static SEXP cbind(SEXP call, SEXP args, SEXPTYPE mode, SEXP rho,
 		/* but if tnam is non-null, have_cnames = TRUE: see above */
 		tnam = GetColNames(v);
 		if (tnam != R_NilValue) {
-		    for (i = 0; i < length(tnam); i++)
+		    for (int i = 0; i < length(tnam); i++)
 			SET_STRING_ELT(nam, j++, STRING_ELT(tnam, i));
 		}
 		else if (have_cnames) {
-		    for (i = 0; i < ncols(u); i++)
+		    for (int i = 0; i < ncols(u); i++)
 			SET_STRING_ELT(nam, j++, R_BlankString);
 		}
 	    } else if (length(u) >= lenmin) {
@@ -1376,10 +1399,12 @@ static SEXP cbind(SEXP call, SEXP args, SEXPTYPE mode, SEXP rho,
 		    expr = substitute(CAR(t), R_NilValue);
 		    if (deparse_level == 1 && isSymbol(expr))
 			SET_STRING_ELT(nam, j++, PRINTNAME(expr));
-		    else if (deparse_level == 2)
+		    else if (deparse_level == 2) {
+			PROTECT(expr);
 			SET_STRING_ELT(nam, j++,
 				       STRING_ELT(deparse1line(expr, TRUE), 0));
-		    else if (have_cnames)
+			UNPROTECT(1); /* expr */
+		    } else if (have_cnames)
 			SET_STRING_ELT(nam, j++, R_BlankString);
 		}
 	    }
@@ -1391,11 +1416,9 @@ static SEXP cbind(SEXP call, SEXP args, SEXPTYPE mode, SEXP rho,
     return result;
 } /* cbind */
 
-
 static SEXP rbind(SEXP call, SEXP args, SEXPTYPE mode, SEXP rho,
 		  int deparse_level)
 {
-    int i, j, k, idx;
     Rboolean have_rnames = FALSE, have_cnames = FALSE, warned = FALSE;
     int nnames, mnames;
     int rows, cols, mcols, lenmin = 0;
@@ -1454,18 +1477,19 @@ static SEXP rbind(SEXP call, SEXP args, SEXPTYPE mode, SEXP rho,
 	    }
 	}
 	else {
-	    k = length(u);
+	    int k = length(u);
 	    if (!warned && k>0 && (k > cols || cols % k)) {
 		warned = TRUE;
 		warning("number of columns of result is not a multiple of vector length (arg %d)", na + 1);
 	    }
-	    dn = getAttrib(u, R_NamesSymbol);
+	    PROTECT(dn = getAttrib(u, R_NamesSymbol));
 	    if (k >= lenmin && (TAG(t) != R_NilValue ||
 				(deparse_level == 2) ||
 				((deparse_level == 1) &&
 				 isSymbol(substitute(CAR(t),R_NilValue)))))
 		have_rnames = TRUE;
 	    nnames = imax2(nnames, length(dn));
+	    UNPROTECT(1); /* dn */
 	}
     }
     if (mnames || nnames == cols)
@@ -1480,12 +1504,9 @@ static SEXP rbind(SEXP call, SEXP args, SEXPTYPE mode, SEXP rho,
 	    u = PRVALUE(CAR(t));
 	    if (isMatrix(u) || length(u) >= lenmin) {
 		u = coerceVector(u, STRSXP);
-		k = LENGTH(u);
-		idx = (isMatrix(u)) ? nrows(u) : (k > 0);
-		for (i = 0; i < idx; i++)
-		    for (j = 0; j < cols; j++)
-		      SET_STRING_ELT(result, i + n + (j * rows),
-				     STRING_ELT(u, (i + j * idx) % k));
+		R_xlen_t k = XLENGTH(u);
+		R_xlen_t idx = (isMatrix(u)) ? nrows(u) : (k > 0);
+		xfillStringMatrixWithRecycle(result, u, n, rows, idx, cols, k);
 		n += idx;
 	    }
 	}
@@ -1493,15 +1514,14 @@ static SEXP rbind(SEXP call, SEXP args, SEXPTYPE mode, SEXP rho,
     else if (mode == VECSXP) {
 	for (t = args; t != R_NilValue; t = CDR(t)) {
 	    u = PRVALUE(CAR(t));
- 	    int umatrix = isMatrix(u), urows = umatrix ? nrows(u) : 1; /* coercing to VECSXP will lose these. PR#15468 */
+	    int umatrix = isMatrix(u), urows = umatrix ? nrows(u) : 1; /* coercing to VECSXP will lose these. PR#15468 */
 	    if (umatrix || length(u) >= lenmin) {
 		PROTECT(u = coerceVector(u, mode));
-		k = LENGTH(u);
-		idx = umatrix ? urows : (k > 0);
-		for (i = 0; i < idx; i++)
-		    for (j = 0; j < cols; j++)
-		      SET_VECTOR_ELT(result, i + n + (j * rows),
-				     lazy_duplicate(VECTOR_ELT(u, (i + j * idx) % k)));
+		R_xlen_t k = XLENGTH(u);
+		R_xlen_t idx = umatrix ? urows : (k > 0);
+		FILL_MATRIX_ITERATE(n, rows, idx, cols, k)
+		    SET_VECTOR_ELT(result, didx,
+			lazy_duplicate(VECTOR_ELT(u, sidx)));
 		n += idx;
 		UNPROTECT(1);
 	    }
@@ -1512,12 +1532,10 @@ static SEXP rbind(SEXP call, SEXP args, SEXPTYPE mode, SEXP rho,
 	    u = PRVALUE(CAR(t));
 	    if (isMatrix(u) || length(u) >= lenmin) {
 		u = coerceVector(u, RAWSXP);
-		k = LENGTH(u);
-		idx = (isMatrix(u)) ? nrows(u) : (k > 0);
-		for (i = 0; i < idx; i++)
-		    for (j = 0; j < cols; j++)
-			RAW(result)[i + n + (j * rows)]
-			    = RAW(u)[(i + j * idx) % k];
+		R_xlen_t k = XLENGTH(u);
+		R_xlen_t idx = (isMatrix(u)) ? nrows(u) : (k > 0);
+		xfillRawMatrixWithRecycle(RAW(result), RAW(u), n, rows, idx,
+					  cols, k);
 		n += idx;
 	    }
 	}
@@ -1527,12 +1545,10 @@ static SEXP rbind(SEXP call, SEXP args, SEXPTYPE mode, SEXP rho,
 	    u = PRVALUE(CAR(t));
 	    if (isMatrix(u) || length(u) >= lenmin) {
 		u = coerceVector(u, CPLXSXP);
-		k = LENGTH(u);
-		idx = (isMatrix(u)) ? nrows(u) : (k > 0);
-		for (i = 0; i < idx; i++)
-		    for (j = 0; j < cols; j++)
-			COMPLEX(result)[i + n + (j * rows)]
-			    = COMPLEX(u)[(i + j * idx) % k];
+		R_xlen_t k = XLENGTH(u);
+		R_xlen_t idx = (isMatrix(u)) ? nrows(u) : (k > 0);
+		xfillComplexMatrixWithRecycle(COMPLEX(result), COMPLEX(u), n,
+					      rows, idx, cols, k);
 		n += idx;
 	    }
 	}
@@ -1541,43 +1557,35 @@ static SEXP rbind(SEXP call, SEXP args, SEXPTYPE mode, SEXP rho,
 	for (t = args; t != R_NilValue; t = CDR(t)) {
 	    u = PRVALUE(CAR(t)); /* type of u can be any of: RAW, LGL, INT, REAL */
 	    if (isMatrix(u) || length(u) >= lenmin) {
-		k = LENGTH(u);
-		idx = (isMatrix(u)) ? nrows(u) : (k > 0);
+		R_xlen_t k = XLENGTH(u);
+		R_xlen_t idx = (isMatrix(u)) ? nrows(u) : (k > 0);
 		if (TYPEOF(u) <= INTSXP) {
 		    if (mode <= INTSXP) {
-			for (i = 0; i < idx; i++)
-			    for (j = 0; j < cols; j++)
-				INTEGER(result)[i + n + (j * rows)]
-				    = INTEGER(u)[(i + j * idx) % k];
+			xfillIntegerMatrixWithRecycle(INTEGER(result),
+						      INTEGER(u), n, rows,
+						      idx, cols, k);
 			n += idx;
 		    }
 		    else {
-			for (i = 0; i < idx; i++)
-			    for (j = 0; j < cols; j++)
-				REAL(result)[i + n + (j * rows)]
-				    = (INTEGER(u)[(i + j * idx) % k]) == NA_INTEGER ? NA_REAL : INTEGER(u)[(i + j * idx) % k];
+			FILL_MATRIX_ITERATE(n, rows, idx, cols, k)
+			    REAL(result)[didx]
+				= (INTEGER(u)[sidx]) == NA_INTEGER ? NA_REAL : INTEGER(u)[sidx];
 			n += idx;
 		    }
 		}
 		else if (TYPEOF(u) == REALSXP) {
-		    for (i = 0; i < idx; i++)
-			for (j = 0; j < cols; j++)
-			    REAL(result)[i + n + (j * rows)]
-				= REAL(u)[(i + j * idx) % k];
+		    xfillRealMatrixWithRecycle(REAL(result), REAL(u), n,
+					       rows, idx, cols, k);
 		    n += idx;
 		}
 		else { /* RAWSXP */
 		    if (mode == LGLSXP) {
-			for (i = 0; i < idx; i++)
-			    for (j = 0; j < cols; j++)
-				LOGICAL(result)[i + n + (j * rows)]
-				    = RAW(u)[(i + j * idx) % k] ? TRUE : FALSE;
+			FILL_MATRIX_ITERATE(n, rows, idx, cols, k)
+			    LOGICAL(result)[didx] = RAW(u)[sidx] ? TRUE : FALSE;
 		    }
 		    else
-			for (i = 0; i < idx; i++)
-			    for (j = 0; j < cols; j++)
-				INTEGER(result)[i + n + (j * rows)]
-				    = (unsigned char) RAW(u)[(i + j * idx) % k];
+			FILL_MATRIX_ITERATE(n, rows, idx, cols, k)
+			    INTEGER(result)[didx] = (unsigned char) RAW(u)[sidx];
 		}
 	    }
 	}
@@ -1591,7 +1599,7 @@ static SEXP rbind(SEXP call, SEXP args, SEXPTYPE mode, SEXP rho,
 	    nam = SET_VECTOR_ELT(dn, 0, allocVector(STRSXP, rows));
 	else
 	    nam = R_NilValue;	/* -Wall */
-	j = 0;
+	int j = 0;
 	for (t = args; t != R_NilValue; t = CDR(t)) {
 	    u = PRVALUE(CAR(t));
 	    if (isMatrix(u)) {
@@ -1607,11 +1615,11 @@ static SEXP rbind(SEXP call, SEXP args, SEXPTYPE mode, SEXP rho,
 		tnam = GetRowNames(v);
 		if (have_rnames) {
 		    if (tnam != R_NilValue) {
-			for (i = 0; i < length(tnam); i++)
+			for (int i = 0; i < length(tnam); i++)
 			    SET_STRING_ELT(nam, j++, STRING_ELT(tnam, i));
 		    }
 		    else {
-			for (i = 0; i < nrows(u); i++)
+			for (int i = 0; i < nrows(u); i++)
 				SET_STRING_ELT(nam, j++, R_BlankString);
 		    }
 		}
@@ -1629,10 +1637,12 @@ static SEXP rbind(SEXP call, SEXP args, SEXPTYPE mode, SEXP rho,
 		    expr = substitute(CAR(t), R_NilValue);
 		    if (deparse_level == 1 && isSymbol(expr))
 			SET_STRING_ELT(nam, j++, PRINTNAME(expr));
-		    else if (deparse_level == 2)
+		    else if (deparse_level == 2) {
+			PROTECT(expr);
 			SET_STRING_ELT(nam, j++,
 				       STRING_ELT(deparse1line(expr, TRUE), 0));
-		    else if (have_rnames)
+			UNPROTECT(1); /* expr */
+		    } else if (have_rnames)
 			SET_STRING_ELT(nam, j++, R_BlankString);
 		}
 	    }
diff --git a/src/main/builtin.c b/src/main/builtin.c
index 1f18360..961060d 100644
--- a/src/main/builtin.c
+++ b/src/main/builtin.c
@@ -1,7 +1,7 @@
 /*
  *  R : A Computer Language for Statistical Data Analysis
  *  Copyright (C) 1995-1998  Robert Gentleman and Ross Ihaka
- *  Copyright (C) 1999-2012  The R Core Team.
+ *  Copyright (C) 1999-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
@@ -15,7 +15,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  */
 
 
@@ -71,7 +71,7 @@ SEXP attribute_hidden do_delayed(SEXP call, SEXP op, SEXP args, SEXP rho)
     SEXP name = R_NilValue /* -Wall */, expr, eenv, aenv;
     checkArity(op, args);
 
-    if (!isString(CAR(args)) || length(CAR(args)) == 0)
+    if (!isString(CAR(args)) || LENGTH(CAR(args)) == 0)
 	error(_("invalid first argument"));
     else
 	name = installTrChar(STRING_ELT(CAR(args), 0));
@@ -85,7 +85,7 @@ SEXP attribute_hidden do_delayed(SEXP call, SEXP op, SEXP args, SEXP rho)
 	eenv = R_BaseEnv;
     } else
     if (!isEnvironment(eenv))
-	errorcall(call, _("invalid '%s' argument"), "eval.env");
+	error(_("invalid '%s' argument"), "eval.env");
 
     args = CDR(args);
     aenv = CAR(args);
@@ -94,7 +94,7 @@ SEXP attribute_hidden do_delayed(SEXP call, SEXP op, SEXP args, SEXP rho)
 	aenv = R_BaseEnv;
     } else
     if (!isEnvironment(aenv))
-	errorcall(call, _("invalid '%s' argument"), "assign.env");
+	error(_("invalid '%s' argument"), "assign.env");
 
     defineVar(name, mkPROMISE(expr, eenv), aenv);
     return R_NilValue;
@@ -118,7 +118,7 @@ SEXP attribute_hidden do_makelazy(SEXP call, SEXP op, SEXP args, SEXP rho)
     if (!isEnvironment(aenv)) error(_("invalid '%s' argument"), "assign.env");
 
     for(i = 0; i < XLENGTH(names); i++) {
-	SEXP name = install(CHAR(STRING_ELT(names, i)));
+	SEXP name = installTrChar(STRING_ELT(names, i));
 	PROTECT(val = eval(VECTOR_ELT(values, i), eenv));
 	PROTECT(expr0 = duplicate(expr));
 	SETCAR(CDR(expr0), val);
@@ -132,13 +132,15 @@ SEXP attribute_hidden do_makelazy(SEXP call, SEXP op, SEXP args, SEXP rho)
 SEXP attribute_hidden do_onexit(SEXP call, SEXP op, SEXP args, SEXP rho)
 {
     RCNTXT *ctxt;
-    SEXP code, oldcode, tmp, ap, argList;
+    SEXP code, oldcode, tmp, argList;
     int addit = 0;
+    static SEXP do_onexit_formals = NULL;
 
-    PROTECT(ap = list2(R_NilValue, R_NilValue));
-    SET_TAG(ap,  install("expr"));
-    SET_TAG(CDR(ap), install("add"));
-    PROTECT(argList =  matchArgs(ap, args, call));
+    checkArity(op, args);
+    if (do_onexit_formals == NULL)
+	do_onexit_formals = allocFormalsList2(install("expr"), install("add"));
+
+    PROTECT(argList =  matchArgs(do_onexit_formals, args, call));
     if (CAR(argList) == R_MissingArg) code = R_NilValue;
     else code = CAR(argList);
     if (CADR(argList) != R_MissingArg) {
@@ -179,7 +181,7 @@ SEXP attribute_hidden do_onexit(SEXP call, SEXP op, SEXP args, SEXP rho)
 	else
 	    ctxt->conexit = code;
     }
-    UNPROTECT(2);
+    UNPROTECT(1);
     return R_NilValue;
 }
 
@@ -188,7 +190,7 @@ SEXP attribute_hidden do_args(SEXP call, SEXP op, SEXP args, SEXP rho)
     SEXP s;
 
     checkArity(op,args);
-    if (TYPEOF(CAR(args)) == STRSXP && length(CAR(args))==1) {
+    if (TYPEOF(CAR(args)) == STRSXP && LENGTH(CAR(args)) == 1) {
 	PROTECT(s = installTrChar(STRING_ELT(CAR(args), 0)));
 	SETCAR(args, findFun(s, rho));
 	UNPROTECT(1);
@@ -242,8 +244,12 @@ SEXP attribute_hidden do_formals(SEXP call, SEXP op, SEXP args, SEXP rho)
     checkArity(op, args);
     if (TYPEOF(CAR(args)) == CLOSXP)
 	return duplicate(FORMALS(CAR(args)));
-    else
+    else {
+	if(!(TYPEOF(CAR(args)) == BUILTINSXP ||
+	     TYPEOF(CAR(args)) == SPECIALSXP))
+	    warningcall(call, _("argument is not a function"));
 	return R_NilValue;
+    }
 }
 
 SEXP attribute_hidden do_body(SEXP call, SEXP op, SEXP args, SEXP rho)
@@ -251,7 +257,12 @@ SEXP attribute_hidden do_body(SEXP call, SEXP op, SEXP args, SEXP rho)
     checkArity(op, args);
     if (TYPEOF(CAR(args)) == CLOSXP)
 	return duplicate(BODY_EXPR(CAR(args)));
-    else return R_NilValue;
+    else {
+	if(!(TYPEOF(CAR(args)) == BUILTINSXP ||
+	     TYPEOF(CAR(args)) == SPECIALSXP))
+	    warningcall(call, _("argument is not a function"));
+	return R_NilValue;
+    }
 }
 
 SEXP attribute_hidden do_bodyCode(SEXP call, SEXP op, SEXP args, SEXP rho)
@@ -355,6 +366,24 @@ SEXP attribute_hidden do_parentenv(SEXP call, SEXP op, SEXP args, SEXP rho)
     return( ENCLOS(arg) );
 }
 
+static Rboolean R_IsImportsEnv(SEXP env)
+{
+    if (isNull(env) || !isEnvironment(env))
+	return FALSE;
+    if (ENCLOS(env) != R_BaseNamespace)
+	return FALSE;
+    SEXP name = getAttrib(env, R_NameSymbol);
+    if (!isString(name) || LENGTH(name) != 1)
+	return FALSE;
+
+    const char *imports_prefix = "imports:";
+    const char *name_string = CHAR(STRING_ELT(name, 0));
+    if (!strncmp(name_string, imports_prefix, strlen(imports_prefix)))
+	return TRUE;
+    else
+	return FALSE;
+}
+
 SEXP attribute_hidden do_parentenvgets(SEXP call, SEXP op, SEXP args, SEXP rho)
 {
     SEXP env, parent;
@@ -370,6 +399,10 @@ SEXP attribute_hidden do_parentenvgets(SEXP call, SEXP op, SEXP args, SEXP rho)
 	error(_("argument is not an environment"));
     if( env == R_EmptyEnv )
 	error(_("can not set parent of the empty environment"));
+    if (R_EnvironmentIsLocked(env) && R_IsNamespaceEnv(env))
+	error(_("can not set the parent environment of a namespace"));
+    if (R_EnvironmentIsLocked(env) && R_IsImportsEnv(env))
+	error(_("can not set the parent environment of package imports"));
     parent = CADR(args);
     if (isNull(parent)) {
 	error(_("use of NULL environment is defunct"));
@@ -389,6 +422,7 @@ SEXP attribute_hidden do_envirName(SEXP call, SEXP op, SEXP args, SEXP rho)
     SEXP env = CAR(args), ans=mkString(""), res;
 
     checkArity(op, args);
+    PROTECT(ans);
     if (TYPEOF(env) == ENVSXP ||
 	TYPEOF((env = simple_as_environment(env))) == ENVSXP) {
 	if (env == R_GlobalEnv) ans = mkString("R_GlobalEnv");
@@ -400,6 +434,7 @@ SEXP attribute_hidden do_envirName(SEXP call, SEXP op, SEXP args, SEXP rho)
 	    ans = ScalarString(STRING_ELT(R_NamespaceEnvSpec(env), 0));
 	else if (!isNull(res = getAttrib(env, R_NameSymbol))) ans = res;
     }
+    UNPROTECT(1); /* ans */
     return ans;
 }
 
@@ -530,7 +565,7 @@ SEXP attribute_hidden do_cat(SEXP call, SEXP op, SEXP args, SEXP rho)
     args = CDR(args);
 
     fill = CAR(args);
-    if ((!isNumeric(fill) && !isLogical(fill)) || (length(fill) != 1))
+    if ((!isNumeric(fill) && !isLogical(fill)) || (LENGTH(fill) != 1))
 	error(_("invalid '%s' argument"), "fill");
     if (isLogical(fill)) {
 	if (asLogical(fill) == 1)
@@ -600,7 +635,7 @@ SEXP attribute_hidden do_cat(SEXP call, SEXP op, SEXP args, SEXP rho)
 		   The copy is needed as cat_newline might reuse the buffer.
 		   Use strncpy is in case these assumptions change.
 		*/
-		p = EncodeElement(s, 0, 0, OutDec);
+		p = EncodeElement0(s, 0, 0, OutDec);
 		strncpy(buf, p, 512); buf[511] = '\0';
 		p = buf;
 	    }
@@ -614,9 +649,8 @@ SEXP attribute_hidden do_cat(SEXP call, SEXP op, SEXP args, SEXP rho)
 	    }
 #endif
 	    else
-		errorcall(call,
-			  _("argument %d (type '%s') cannot be handled by 'cat'"),
-			  1+iobj, type2char(TYPEOF(s)));
+		error(_("argument %d (type '%s') cannot be handled by 'cat'"),
+		      1+iobj, type2char(TYPEOF(s)));
 	    /* FIXME : cat(...) should handle ANYTHING */
 	    size_t w = strlen(p);
 	    cat_sepwidth(sepr, &sepw, ntot);
@@ -632,7 +666,7 @@ SEXP attribute_hidden do_cat(SEXP call, SEXP op, SEXP args, SEXP rho)
 		    if (isString(s))
 			p = trChar(STRING_ELT(s, i+1));
 		    else {
-			p = EncodeElement(s, i+1, 0, OutDec);
+			p = EncodeElement0(s, i+1, 0, OutDec);
 			strncpy(buf, p, 512); buf[511] = '\0';
 			p = buf;
 		    }
@@ -662,10 +696,9 @@ SEXP attribute_hidden do_cat(SEXP call, SEXP op, SEXP args, SEXP rho)
 
 SEXP attribute_hidden do_makelist(SEXP call, SEXP op, SEXP args, SEXP rho)
 {
-    SEXP list, names, next;
-    int i, n, havenames;
-
+    int n, havenames;
     /* compute number of args and check for names */
+    SEXP next;
     for (next = args, n = 0, havenames = FALSE;
 	 next != R_NilValue;
 	 next = CDR(next)) {
@@ -674,9 +707,9 @@ SEXP attribute_hidden do_makelist(SEXP call, SEXP op, SEXP args, SEXP rho)
 	n++;
     }
 
-    PROTECT(list = allocVector(VECSXP, n));
-    PROTECT(names = havenames ? allocVector(STRSXP, n) : R_NilValue);
-    for (i = 0; i < n; i++) {
+    SEXP list = PROTECT(allocVector(VECSXP, n));
+    SEXP names = PROTECT(havenames ? allocVector(STRSXP, n) : R_NilValue);
+    for (int i = 0; i < n; i++) {
 	if (havenames) {
 	    if (TAG(args) != R_NilValue)
 		SET_STRING_ELT(names, i, PRINTNAME(TAG(args)));
@@ -913,7 +946,7 @@ SEXP attribute_hidden do_lengthgets(SEXP call, SEXP op, SEXP args, SEXP rho)
 #ifdef LONG_VECTOR_SUPPORT
 	return xlengthgets(x, len);
 #else
-        error(_("vector size specified is too large"));
+	error(_("vector size specified is too large"));
 	return x; /* -Wall */
 #endif
     }
@@ -930,7 +963,7 @@ static SEXP expandDots(SEXP el, SEXP rho)
 
     while (el != R_NilValue) {
 	if (CAR(el) == R_DotsSymbol) {
-	    SEXP h = findVar(CAR(el), rho);
+	    SEXP h = PROTECT(findVar(CAR(el), rho));
 	    if (TYPEOF(h) == DOTSXP || h == R_NilValue) {
 		while (h != R_NilValue) {
 		    SETCDR(tail, CONS(CAR(h), R_NilValue));
@@ -940,6 +973,7 @@ static SEXP expandDots(SEXP el, SEXP rho)
 		}
 	    } else if (h != R_MissingArg)
 		error(_("'...' used in an incorrect context"));
+	    UNPROTECT(1); /* h */
 	} else {
 	    SETCDR(tail, CONS(CAR(el), R_NilValue));
 	    tail = CDR(tail);
@@ -957,12 +991,12 @@ static SEXP expandDots(SEXP el, SEXP rho)
 static SEXP setDflt(SEXP arg, SEXP dflt)
 {
     if (dflt) {
-    	SEXP dflt1, dflt2;
-    	PROTECT(dflt1 = deparse1line(dflt, TRUE));
-    	PROTECT(dflt2 = deparse1line(CAR(arg), TRUE));
-    	error(_("duplicate 'switch' defaults: '%s' and '%s'"),
+	SEXP dflt1, dflt2;
+	PROTECT(dflt1 = deparse1line(dflt, TRUE));
+	PROTECT(dflt2 = deparse1line(CAR(arg), TRUE));
+	error(_("duplicate 'switch' defaults: '%s' and '%s'"),
 	      CHAR(STRING_ELT(dflt1, 0)), CHAR(STRING_ELT(dflt2, 0)));
-    	UNPROTECT(2); /* won't get here, but just for good form */
+	UNPROTECT(2); /* won't get here, but just for good form */
     }
     return(CAR(arg));
 }
@@ -996,7 +1030,7 @@ SEXP attribute_hidden do_switch(SEXP call, SEXP op, SEXP args, SEXP rho)
     if (nargs < 1) errorcall(call, _("'EXPR' is missing"));
     check1arg(args, call, "EXPR");
     PROTECT(x = eval(CAR(args), rho));
-    if (!isVector(x) || length(x) != 1)
+    if (!isVector(x) || LENGTH(x) != 1)
 	errorcall(call, _("EXPR must be a length 1 vector"));
     if (isFactor(x))
 	warningcall(call,
@@ -1037,7 +1071,7 @@ SEXP attribute_hidden do_switch(SEXP call, SEXP op, SEXP args, SEXP rho)
 		} else
 		    dflt = setDflt(y, dflt);
 	    }
- 	    if (dflt) {
+	    if (dflt) {
 		ans =  eval(dflt, rho);
 		UNPROTECT(2);
 		return ans;
@@ -1056,7 +1090,8 @@ SEXP attribute_hidden do_switch(SEXP call, SEXP op, SEXP args, SEXP rho)
 	    /* fall through to error */
 	}
 	UNPROTECT(1); /* w */
-    }
+    } else
+	warningcall(call, _("'switch' with no alternatives"));
     /* an error */
     UNPROTECT(1); /* x */
     R_Visible = FALSE;
diff --git a/src/main/character.c b/src/main/character.c
index 983bb82..fcbfed6 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--2013  The R Core Team
+ *  Copyright (C) 1997--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 Pulic License as published by
@@ -15,14 +15,14 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  */
 
 /* The character functions in this file are
 
 nzchar nchar substr substr<- abbreviate tolower toupper chartr strtrim
 
-and the utility 
+and the utility
 
 make.names
 
@@ -72,9 +72,8 @@ abbreviate chartr make.names strtrim tolower toupper give error.
 #include <Defn.h>
 #include <Internal.h>
 #include <errno.h>
-
 #include <R_ext/RS.h>  /* for Calloc/Free */
-
+#include <R_ext/Itermacros.h>
 #include <rlocale.h>
 
 /* We use a shared buffer here to avoid reallocing small buffers, and
@@ -96,9 +95,15 @@ static R_StringBuffer cbuff = {NULL, 0, MAXELTSIZE};
 SEXP attribute_hidden do_nzchar(SEXP call, SEXP op, SEXP args, SEXP env)
 {
     SEXP x, ans;
-    R_xlen_t i, len;
-
-    checkArity(op, args);
+    int nargs = length(args);
+
+    // checkArity(op, args);  .Primitive()  &  may have 1 or 2 args now
+    if (nargs < 1 || nargs > 2)
+	errorcall(call,
+		  ngettext("%d argument passed to '%s' which requires %d to %d",
+			   "%d arguments passed to '%s' which requires %d to %d",
+			   (unsigned long) nargs),
+		  nargs, PRIMNAME(op), 1, 2);
     check1arg(args, call, "x");
 
     if (isFactor(CAR(args)))
@@ -106,102 +111,151 @@ SEXP attribute_hidden do_nzchar(SEXP call, SEXP op, SEXP args, SEXP env)
     PROTECT(x = coerceVector(CAR(args), STRSXP));
     if (!isString(x))
 	error(_("'%s' requires a character vector"), "nzchar()");
-    len = XLENGTH(x);
+
+    int keepNA = FALSE; // the default
+    if(nargs > 1) {
+	keepNA = asLogical(CADR(args));
+	if (keepNA == NA_LOGICAL) keepNA = FALSE;
+    }
+    R_xlen_t i, len = XLENGTH(x);
     PROTECT(ans = allocVector(LGLSXP, len));
-    for (i = 0; i < len; i++)
-	LOGICAL(ans)[i] = LENGTH(STRING_ELT(x, i)) > 0;
+    if (keepNA)
+	for (i = 0; i < len; i++) {
+	    SEXP sxi = STRING_ELT(x, i);
+	    LOGICAL(ans)[i] = (sxi == NA_STRING) ? NA_LOGICAL : LENGTH(sxi) > 0;
+	}
+    else
+	for (i = 0; i < len; i++)
+	    LOGICAL(ans)[i] = LENGTH(STRING_ELT(x, i)) > 0;
     UNPROTECT(2);
     return ans;
 }
 
+/* R strings are limited to 2^31 - 1 bytes on all platforms */
+int R_nchar(SEXP string, nchar_type type_,
+	    Rboolean allowNA, Rboolean keepNA, const char* msg_name)
+{
+    if (string == NA_STRING)
+	return keepNA ? NA_INTEGER : 2;
+    // else :
+    switch(type_) {
+    case Bytes:
+	return LENGTH(string);
+	break;
+    case Chars:
+	if (IS_UTF8(string)) {
+	    const char *p = CHAR(string);
+	    if (!utf8Valid(p)) {
+		if (!allowNA)
+		    error(_("invalid multibyte string, %s"), msg_name);
+		return NA_INTEGER;
+	    } else {
+		int nc = 0;
+		for( ; *p; p += utf8clen(*p)) nc++;
+		return nc;
+	    }
+	} else if (IS_BYTES(string)) {
+	    if (!allowNA) /* could do chars 0 */
+		error(_("number of characters is not computable in \"bytes\" encoding, %s"),
+		      msg_name);
+	    return NA_INTEGER;
+	} else if (mbcslocale) {
+	    int nc = (int) mbstowcs(NULL, translateChar(string), 0);
+	    if (!allowNA && nc < 0)
+		error(_("invalid multibyte string, %s"), msg_name);
+	    return (nc >= 0 ? nc : NA_INTEGER);
+	} else
+	    return ((int) strlen(translateChar(string)));
+	break;
+    case Width:
+	if (IS_UTF8(string)) {
+	    const char *p = CHAR(string);
+	    if (!utf8Valid(p)) {
+		if (!allowNA)
+		    error(_("invalid multibyte string, %s"), msg_name);
+		return NA_INTEGER;
+	    } else {
+		wchar_t wc1;
+		int nc = 0;
+		for( ; *p; p += utf8clen(*p)) {
+		    utf8toucs(&wc1, p);
+		    nc += Ri18n_wcwidth(wc1);
+		}
+		return nc;
+	    }
+	} else if (IS_BYTES(string)) {
+	    if (!allowNA) /* could do width 0 */
+		error(_("width is not computable for %s in \"bytes\" encoding"),
+		      msg_name);
+	    return NA_INTEGER;
+	} else if (mbcslocale) {
+	    const char *xi = translateChar(string);
+	    int nc = (int) mbstowcs(NULL, xi, 0);
+	    if (nc >= 0) {
+		const void *vmax = vmaxget();
+		wchar_t *wc = (wchar_t *)
+		    R_AllocStringBuffer((nc+1)*sizeof(wchar_t), &cbuff);
+		mbstowcs(wc, xi, nc + 1);
+		int nci18n = Ri18n_wcswidth(wc, 2147483647);
+		vmaxset(vmax);
+		return (nci18n < 1) ? nc : nci18n;
+	    } else if (allowNA)
+		error(_("invalid multibyte string, %s"), msg_name);
+	    else
+		return NA_INTEGER;
+	} else
+	    return (int) strlen(translateChar(string));
+
+    } // switch
+    return NA_INTEGER; // -Wall
+} // R_nchar()
 
 SEXP attribute_hidden do_nchar(SEXP call, SEXP op, SEXP args, SEXP env)
 {
     SEXP d, s, x, stype;
-    R_xlen_t i, len;
-    int allowNA;
-    size_t ntype;
-    int nc;
-    const char *type;
-    const char *xi;
-    wchar_t *wc;
-    const void *vmax;
+    int nargs = length(args);
 
+#ifdef R_version_3_4_or_so
     checkArity(op, args);
+#else
+    // will work also for code byte-compiled *before* 'keepNA' was introduced
+    if (nargs < 3 || nargs > 4)
+	error(ngettext("%d argument passed to '%s' which requires %d to %d",
+		       "%d arguments passed to '%s' which requires %d to %d",
+			   (unsigned long) nargs),
+	      nargs, PRIMNAME(op), 3, 4);
+#endif
     if (isFactor(CAR(args)))
 	error(_("'%s' requires a character vector"), "nchar()");
     PROTECT(x = coerceVector(CAR(args), STRSXP));
     if (!isString(x))
 	error(_("'%s' requires a character vector"), "nchar()");
-    len = XLENGTH(x);
+    R_xlen_t len = XLENGTH(x);
     stype = CADR(args);
     if (!isString(stype) || LENGTH(stype) != 1)
 	error(_("invalid '%s' argument"), "type");
-    type = CHAR(STRING_ELT(stype, 0)); /* always ASCII */
-    ntype = strlen(type);
+    const char *type = CHAR(STRING_ELT(stype, 0)); /* always ASCII */
+    size_t ntype = strlen(type);
     if (ntype == 0) error(_("invalid '%s' argument"), "type");
-    allowNA = asLogical(CADDR(args));
+    nchar_type type_;
+    if (strncmp(type, "bytes", ntype) == 0)	 type_ = Bytes;
+    else if (strncmp(type, "chars", ntype) == 0) type_ = Chars;
+    else if (strncmp(type, "width", ntype) == 0) type_ = Width;
+    else error(_("invalid '%s' argument"), "type");
+    int allowNA = asLogical(CADDR(args));
     if (allowNA == NA_LOGICAL) allowNA = 0;
-
+    int keepNA;
+    if(nargs >= 4) {
+	keepNA = asLogical(CADDDR(args));
+	if (keepNA == NA_LOGICAL) // default
+	    keepNA = (type_ == Width) ? FALSE : TRUE;
+    } else  keepNA = (type_ == Width) ? FALSE : TRUE;
     PROTECT(s = allocVector(INTSXP, len));
-    vmax = vmaxget();
-    for (i = 0; i < len; i++) {
+    int *s_ = INTEGER(s);
+    for (R_xlen_t i = 0; i < len; i++) {
 	SEXP sxi = STRING_ELT(x, i);
-	if (sxi == NA_STRING) {
-	    INTEGER(s)[i] = 2;
-	    continue;
-	}
-	if (strncmp(type, "bytes", ntype) == 0) {
-	    INTEGER(s)[i] = LENGTH(sxi);
-	} else if (strncmp(type, "chars", ntype) == 0) {
-	    if (IS_UTF8(sxi)) { /* assume this is valid */
-		const char *p = CHAR(sxi);
-		nc = 0;
-		for( ; *p; p += utf8clen(*p)) nc++;
-		INTEGER(s)[i] = nc;
-	    } else if (IS_BYTES(sxi)) {
-		if (!allowNA) /* could do chars 0 */
-		    error(_("number of characters is not computable for element %d in \"bytes\" encoding"), i+1);
-		INTEGER(s)[i] = NA_INTEGER;
-	    } else if (mbcslocale) {
-		nc = (int) mbstowcs(NULL, translateChar(sxi), 0);
-		if (!allowNA && nc < 0)
-		    error(_("invalid multibyte string %d"), i+1);
-		INTEGER(s)[i] = nc >= 0 ? nc : NA_INTEGER;
-	    } else
-		INTEGER(s)[i] = (int) strlen(translateChar(sxi));
-	} else if (strncmp(type, "width", ntype) == 0) {
-	    if (IS_UTF8(sxi)) { /* assume this is valid */
-		const char *p = CHAR(sxi);
-		wchar_t wc1;
-		nc = 0;
-		for( ; *p; p += utf8clen(*p)) {
-		    utf8toucs(&wc1, p);
-		    nc += Ri18n_wcwidth(wc1);
-		}
-		INTEGER(s)[i] = nc;
-	    } else if (IS_BYTES(sxi)) {
-		if (!allowNA) /* could do width 0 */
-		    error(_("width is not computable for element %d in \"bytes\" encoding"), i+1);
-		INTEGER(s)[i] = NA_INTEGER;
-	    } else if (mbcslocale) {
-		xi = translateChar(sxi);
-		nc = (int) mbstowcs(NULL, xi, 0);
-		if (nc >= 0) {
-		    wc = (wchar_t *) R_AllocStringBuffer((nc+1)*sizeof(wchar_t), &cbuff);
-
-		    mbstowcs(wc, xi, nc + 1);
-		    INTEGER(s)[i] = Ri18n_wcswidth(wc, 2147483647);
-		    if (INTEGER(s)[i] < 1) INTEGER(s)[i] = nc;
-		} else if (allowNA)
-		    error(_("invalid multibyte string %d"), i+1);
-		else
-		    INTEGER(s)[i] = NA_INTEGER;
-	    } else
-		INTEGER(s)[i] = (int) strlen(translateChar(sxi));
-	} else
-	    error(_("invalid '%s' argument"), "type");
-	vmaxset(vmax);
+	char msg_i[20]; sprintf(msg_i, "element %ld", (long)i+1);
+	s_[i] = R_nchar(sxi, type_, allowNA, keepNA, msg_i);
     }
     R_FreeStringBufferL(&cbuff);
     if ((d = getAttrib(x, R_NamesSymbol)) != R_NilValue)
@@ -220,19 +274,21 @@ static void substr(char *buf, const char *str, int ienc, int sa, int so)
     int i, j, used;
 
     if (ienc == CE_UTF8) {
-	for (i = 0; i < so; i++) {
+	const char *end = str + strlen(str);
+	for (i = 0; i < so && str < end; i++) {
 	    int used = utf8clen(*str);
-	    if (i < sa - 1) { str+= used; continue; }
+	    if (i < sa - 1) { str += used; continue; }
 	    for (j = 0; j < used; j++) *buf++ = *str++;
 	}
     } else if (ienc == CE_LATIN1 || ienc == CE_BYTES) {
 	for (str += (sa - 1), i = sa; i <= so; i++) *buf++ = *str++;
     } else {
 	if (mbcslocale && !strIsASCII(str)) {
+	    const char *end = str + strlen(str);
 	    mbstate_t mb_st;
 	    mbs_init(&mb_st);
 	    for (i = 1; i < sa; i++) str += Mbrtowc(NULL, str, MB_CUR_MAX, &mb_st);
-	    for (i = sa; i <= so; i++) {
+	    for (i = sa; i <= so && str < end; i++) {
 		used = (int) Mbrtowc(NULL, str, MB_CUR_MAX, &mb_st);
 		for (j = 0; j < used; j++) *buf++ = *str++;
 	    }
@@ -242,43 +298,37 @@ static void substr(char *buf, const char *str, int ienc, int sa, int so)
     *buf = '\0';
 }
 
-SEXP attribute_hidden do_substr(SEXP call, SEXP op, SEXP args, SEXP env)
+SEXP attribute_hidden
+do_substr(SEXP call, SEXP op, SEXP args, SEXP env)
 {
-    SEXP s, x, sa, so, el;
-    R_xlen_t i, len;
-    int start, stop, k, l;
-    size_t slen;
-    cetype_t ienc;
-    const char *ss;
-    char *buf;
-
+    SEXP s, x;
     checkArity(op, args);
     x = CAR(args);
-    sa = CADR(args);
-    so = CADDR(args);
-    k = LENGTH(sa);
-    l = LENGTH(so);
-
     if (!isString(x))
 	error(_("extracting substrings from a non-character object"));
-    len = XLENGTH(x);
+    R_xlen_t len = XLENGTH(x);
     PROTECT(s = allocVector(STRSXP, len));
     if (len > 0) {
+	SEXP sa = CADR(args),
+	    so = CADDR(args);
+	int
+	    k = LENGTH(sa),
+	    l = LENGTH(so);
 	if (!isInteger(sa) || !isInteger(so) || k == 0 || l == 0)
 	    error(_("invalid substring arguments"));
 
-	for (i = 0; i < len; i++) {
-	    start = INTEGER(sa)[i % k];
-	    stop = INTEGER(so)[i % l];
-	    el = STRING_ELT(x,i);
+	for (R_xlen_t i = 0; i < len; i++) {
+	    int start = INTEGER(sa)[i % k],
+		stop  = INTEGER(so)[i % l];
+	    SEXP el = STRING_ELT(x,i);
 	    if (el == NA_STRING || start == NA_INTEGER || stop == NA_INTEGER) {
 		SET_STRING_ELT(s, i, NA_STRING);
 		continue;
 	    }
-	    ienc = getCharCE(el);
-	    ss = CHAR(el);
-	    slen = strlen(ss); /* FIXME -- should handle embedded nuls */
-	    buf = R_AllocStringBuffer(slen+1, &cbuff);
+	    cetype_t ienc = getCharCE(el);
+	    const char *ss = CHAR(el);
+	    size_t slen = strlen(ss); /* FIXME -- should handle embedded nuls */
+	    char *buf = R_AllocStringBuffer(slen+1, &cbuff);
 	    if (start < 1) start = 1;
 	    if (start > stop || start > slen) {
 		buf[0] = '\0';
@@ -290,12 +340,118 @@ SEXP attribute_hidden do_substr(SEXP call, SEXP op, SEXP args, SEXP env)
 	}
 	R_FreeStringBufferL(&cbuff);
     }
-    DUPLICATE_ATTRIB(s, x);
+    SHALLOW_DUPLICATE_ATTRIB(s, x);
     /* This copied the class, if any */
     UNPROTECT(1);
     return s;
 }
 
+// .Internal( startsWith(x, prefix) )  and
+// .Internal( endsWith  (x, suffix) )
+SEXP attribute_hidden
+do_startsWith(SEXP call, SEXP op, SEXP args, SEXP env)
+{
+    checkArity(op, args);
+
+    SEXP x = CAR(args), Xfix = CADR(args); // 'prefix' or 'suffix'
+    if (!isString(x) || !isString(Xfix))
+	error(_("non-character object(s)"));
+    R_xlen_t
+	n1 = XLENGTH(x),
+	n2 = XLENGTH(Xfix),
+	n = (n1 > 0 && n2 > 0) ? ((n1 >= n2) ? n1 : n2) : 0;
+    if (n == 0) return allocVector(LGLSXP, 0);
+    SEXP ans = PROTECT(allocVector(LGLSXP, n));
+
+    typedef const char * cp;
+    if (n2 == 1) { // optimize the most common case
+	SEXP el = STRING_ELT(Xfix, 0);
+	if (el == NA_STRING) {
+	    for (R_xlen_t i = 0; i < n1; i++)
+		LOGICAL(ans)[i] = NA_LOGICAL;
+	} else {
+	    // ASCII matching will do for ASCII Xfix except in non-UTF-8 MBCS
+	    Rboolean need_translate = TRUE;
+	    if (strIsASCII(CHAR(el)) && (utf8locale || !mbcslocale)) 
+		need_translate = FALSE;
+	    cp y0 = need_translate ? translateCharUTF8(el) : CHAR(el);
+	    int ylen = (int) strlen(y0);
+	    for (R_xlen_t i = 0; i < n1; i++) {
+		SEXP el = STRING_ELT(x, i);
+		if (el == NA_STRING) {
+		    LOGICAL(ans)[i] = NA_LOGICAL;
+		} else {
+		    cp x0 = need_translate ? translateCharUTF8(el) : CHAR(el);
+		    if(PRIMVAL(op) == 0) { // startsWith
+			LOGICAL(ans)[i] = strncmp(x0, y0, ylen) == 0;
+		    } else { // endsWith
+			int off = (int)strlen(x0) - ylen;
+			if (off < 0)
+			    LOGICAL(ans)[i] = 0;
+			else {
+			    LOGICAL(ans)[i] = memcmp(x0 + off, y0, ylen) == 0;
+			}
+		    }
+		}
+	    }
+	}
+    } else { // n2 > 1
+	// convert both inputs to UTF-8
+	cp *x0 = (cp *) R_alloc(n1, sizeof(char *));
+	cp *y0 = (cp *) R_alloc(n2, sizeof(char *));
+	// and record lengths, -1 for NA
+	int *x1 = (int *) R_alloc(n1, sizeof(int *));
+	int *y1 = (int *) R_alloc(n2, sizeof(int *));
+	for (R_xlen_t i = 0; i < n1; i++) {
+	    SEXP el = STRING_ELT(x, i);
+	    if (el == NA_STRING)
+		x1[i] = -1;
+	    else {
+		x0[i] = translateCharUTF8(el);
+		x1[i] = (int) strlen(x0[i]);
+	    }
+	}
+	for (R_xlen_t i = 0; i < n2; i++) {
+	    SEXP el = STRING_ELT(Xfix, i);
+	    if (el == NA_STRING)
+		y1[i] = -1;
+	    else {
+		y0[i] = translateCharUTF8(el);
+		y1[i] = (int) strlen(y0[i]);
+	    }
+	}
+	R_xlen_t i, i1, i2;
+	if(PRIMVAL(op) == 0) { // 0 = startsWith, 1 = endsWith
+	    MOD_ITERATE2(n, n1, n2, i, i1, i2, {
+		    if (x1[i1] < 0 || y1[i2] < 0)
+			LOGICAL(ans)[i] = NA_LOGICAL;
+		    else if (x1[i1] < y1[i2])
+			LOGICAL(ans)[i] = 0;
+		    else // memcmp should be faster than strncmp
+			LOGICAL(ans)[i] = 
+			    memcmp(x0[i1], y0[i2], y1[i2]) == 0;
+		});
+	} else { // endsWith
+	    MOD_ITERATE2(n, n1, n2, i, i1, i2, {
+		    if (x1[i1] < 0 || y1[i2] < 0)
+			LOGICAL(ans)[i] = NA_LOGICAL;
+		    else {
+			int off = x1[i1] - y1[i2];
+			if (off < 0)
+			    LOGICAL(ans)[i] = 0;
+			else {
+			    LOGICAL(ans)[i] = 
+				memcmp(x0[i1] + off, y0[i2], y1[i2]) == 0;
+			}
+		    }
+		});
+	}
+    }
+    UNPROTECT(1);
+    return ans;
+}
+
+
 static void
 substrset(char *buf, const char *const str, cetype_t ienc, int sa, int so)
 {
@@ -304,7 +460,7 @@ substrset(char *buf, const char *const str, cetype_t ienc, int sa, int so)
 
     if (ienc == CE_UTF8) {
 	for (i = 1; i < sa; i++) buf += utf8clen(*buf);
-	for (i = sa; i <= so; i++) {
+	for (i = sa; i <= so && in < strlen(str); i++) {
 	    in +=  utf8clen(str[in]);
 	    out += utf8clen(buf[out]);
 	    if (!str[in]) break;
@@ -320,7 +476,7 @@ substrset(char *buf, const char *const str, cetype_t ienc, int sa, int so)
 	if (mbcslocale) {
 	    for (i = 1; i < sa; i++) buf += Mbrtowc(NULL, buf, MB_CUR_MAX, NULL);
 	    /* now work out how many bytes to replace by how many */
-	    for (i = sa; i <= so; i++) {
+	    for (i = sa; i <= so && in < strlen(str); i++) {
 		in += (int) Mbrtowc(NULL, str+in, MB_CUR_MAX, NULL);
 		out += (int) Mbrtowc(NULL, buf+out, MB_CUR_MAX, NULL);
 		if (!str[in]) break;
@@ -364,7 +520,7 @@ SEXP attribute_hidden do_substrgets(SEXP call, SEXP op, SEXP args, SEXP env)
 
 	v = LENGTH(value);
 	if (!isString(value) || v == 0) error(_("invalid value"));
-	
+
 	vmax = vmaxget();
 	for (i = 0; i < len; i++) {
 	    el = STRING_ELT(x, i);
@@ -428,11 +584,11 @@ SEXP attribute_hidden do_substrgets(SEXP call, SEXP op, SEXP args, SEXP env)
 */
 
 
-#define FIRSTCHAR(i) (isspace((int)buff1[i-1]))
-#define LASTCHAR(i) (!isspace((int)buff1[i-1]) && (!buff1[i+1] || isspace((int)buff1[i+1])))
-#define LOWVOW(i) (buff1[i] == 'a' || buff1[i] == 'e' || buff1[i] == 'i' || \
-		   buff1[i] == 'o' || buff1[i] == 'u')
-
+#define FIRSTCHAR(i) (isspace((int)s[i-1]))
+#define LASTCHAR(i) (!isspace((int)s[i-1]) && (!s[i+1] || isspace((int)s[i+1])))
+#define LC_VOWEL(i) (s[i] == 'a' || s[i] == 'e' || s[i] == 'i' || \
+		   s[i] == 'o' || s[i] == 'u')
+#define UPPER (int)(strlen(s) - 1)
 
 /* memmove does allow overlapping src and dest */
 static void mystrcpy(char *dest, const char *src)
@@ -440,139 +596,232 @@ static void mystrcpy(char *dest, const char *src)
     memmove(dest, src, strlen(src)+1);
 }
 
-
-/* abbreviate(inchar, minlen) */
-static SEXP stripchars(const char * const inchar, int minlen)
+static SEXP stripchars(const char * const inchar, int minlen, int usecl)
 {
-/* This routine used to use strcpy with overlapping dest and src.
-   That is not allowed by ISO C.
- */
-    int i, j, nspace = 0, upper;
-    char *buff1 = cbuff.data;
-
-    mystrcpy(buff1, inchar);
-    upper = (int)(strlen(buff1) - 1);
-
-    /* remove leading blanks */
-    j = 0;
-    for (i = 0 ; i < upper ; i++)
-	if (isspace((int)buff1[i]))
-	    j++;
-	else
-	    break;
-
-    mystrcpy(buff1, &buff1[j]);
-    upper = (int)(strlen(buff1) - 1);
-
-    if (strlen(buff1) < minlen)
-	goto donesc;
-
-    for (i = upper, j = 1; i > 0; i--) {
-	if (isspace((int)buff1[i])) {
-	    if (j)
-		buff1[i] = '\0' ;
-	    else
-		nspace++;
-	}
-	else
-	    j = 0;
-	/*strcpy(buff1[i],buff1[i+1]);*/
-	if (strlen(buff1) - nspace <= minlen)
+    int i, j, nspace = 0;
+    char *s = cbuff.data;
+
+    /* The R wrapper removed leading and trailing spces */
+    mystrcpy(s, inchar);
+    if (strlen(s) < minlen) goto donesc;
+
+    /* The for() loops never touch the first character */
+
+    /*  record spaces for removal later (as they act as word boundaries) */
+    for (i = UPPER, j = 1; i > 0; i--) {
+	if (isspace((int)s[i])) {
+	    if (j) s[i] = '\0'; // trailing space
+	    else nspace++;
+	} else j = 0;
+	if (strlen(s) - nspace <= minlen)
 	    goto donesc;
     }
 
-    upper = (int)(strlen(buff1) - 1);
-    for (i = upper; i > 0; i--) {
-	if (LOWVOW(i) && LASTCHAR(i))
-	    mystrcpy(&buff1[i], &buff1[i + 1]);
-	if (strlen(buff1) - nspace <= minlen)
-	    goto donesc;
+    if(usecl) {
+	/* remove l/case vowels,
+	   which are not at the beginning of a word but are at the end */
+	for (i = UPPER; i > 0; i--) {
+	    if (LC_VOWEL(i) && LASTCHAR(i))
+		mystrcpy(s + i, s + i + 1);
+	    if (strlen(s) - nspace <= minlen)
+		goto donesc;
+	}
+
+	/* remove those not at the beginning of a word */
+	for (i = UPPER; i > 0; i--) {
+	    if (LC_VOWEL(i) && !FIRSTCHAR(i))
+		mystrcpy(s + i, s + i + 1);
+	    if (strlen(s) - nspace <= minlen)
+		goto donesc;
+	}
+
+	/* Now do the same for remaining l/case chars */
+	for (i = UPPER; i > 0; i--) {
+	    if (islower((int)s[i]) && LASTCHAR(i))
+		mystrcpy(s + i, s + i + 1);
+	    if (strlen(s) - nspace <= minlen)
+		goto donesc;
+	}
+
+	for (i = UPPER; i > 0; i--) {
+	    if (islower((int)s[i]) && !FIRSTCHAR(i))
+		mystrcpy(s + i, s + i + 1);
+	    if (strlen(s) - nspace <= minlen)
+		goto donesc;
+	}
     }
 
-    upper = (int)(strlen(buff1) - 1);
-   for (i = upper; i > 0; i--) {
-	if (LOWVOW(i) && !FIRSTCHAR(i))
-	    mystrcpy(&buff1[i], &buff1[i + 1]);
-	if (strlen(buff1) - nspace <= minlen)
+    /* all else has failed so we use brute force */
+
+    for (i = UPPER; i > 0; i--) {
+	if (!FIRSTCHAR(i) && !isspace((int)s[i]))
+	    mystrcpy(s + i, s + i + 1);
+	if (strlen(s) - nspace <= minlen)
 	    goto donesc;
     }
 
-    upper = (int)(strlen(buff1) - 1);
-    for (i = upper; i > 0; i--) {
-	if (islower((int)buff1[i]) && LASTCHAR(i))
-	    mystrcpy(&buff1[i], &buff1[i + 1]);
-	if (strlen(buff1) - nspace <= minlen)
-	    goto donesc;
+donesc:
+    {  // remove internal spaces as required
+	int upper = (int) strlen(s);
+	if (upper > minlen)
+	    for (i = upper - 1; i > 0; i--)
+		if (isspace((int)s[i]))
+		    mystrcpy(s + i, s + i + 1);
     }
 
-    upper = (int)(strlen(buff1) - 1);
-    for (i = upper; i > 0; i--) {
-	if (islower((int)buff1[i]) && !FIRSTCHAR(i))
-	    mystrcpy(&buff1[i], &buff1[i + 1]);
-	if (strlen(buff1) - nspace <= minlen)
-	    goto donesc;
+    return mkChar(s);
+}
+
+#define FIRSTCHARW(i) (iswspace((int)wc[i-1]))
+#define LASTCHARW(i) (!iswspace((int)wc[i-1]) && (!wc[i+1] || iswspace((int)wc[i+1])))
+#define WUP (int)(wcslen(wc) - 1)
+
+// lower-case vowels in English plus accented versions
+static int vowels[] = {
+    0x61, 0x65, 0x69, 0x6f, 0x75,
+    0xe0, 0xe1, 0x2e, 0xe3, 0xe4, 0xe5,
+    0xe8, 0xe9, 0xea, 0xeb, 0xec, 0xed, 0xee, 0xef,
+    0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf8, 0xf9, 0xfa, 0xfb, 0xfc,
+    0x101, 0x103, 0x105, 0x113, 0x115, 0x117, 0x118, 0x11b,
+    0x129, 0x12b, 0x12d, 0x12f, 0x131, 0x14d, 0x14f, 0x151,
+    0x169, 0x16b, 0x16d, 0x16f, 0x171, 0x173
+};
+
+static Rboolean iswvowel(wchar_t w)
+{
+    int v = (int) w, n = sizeof(vowels)/sizeof(int);
+    Rboolean found = FALSE;
+    for(int i = 0; i < n; i++)
+	if(v == vowels[i]) {found = TRUE; break;}
+
+    return found;
+}
+
+static void mywcscpy(wchar_t *dest, const wchar_t *src)
+{
+    memmove(dest, src, sizeof(wchar_t) * (wcslen(src)+1));
+}
+
+static SEXP wstripchars(const wchar_t * const inchar, int minlen, int usecl)
+{
+    int i, j, nspace = 0;
+    wchar_t *wc = (wchar_t *)cbuff.data;
+
+    mywcscpy(wc, inchar);
+    if (wcslen(wc) < minlen) goto donewsc;
+
+    for (i = WUP, j = 1; i > 0; i--) {
+	if (iswspace((int)wc[i])) {
+	    if (j) wc[i] = '\0' ; else nspace++;
+	} else j = 0;
+	if (wcslen(wc) - nspace <= minlen)
+	    goto donewsc;
     }
 
-    /* all else has failed so we use brute force */
+    if(usecl) {
+	for (i = WUP; i > 0; i--) {
+	    if (iswvowel(wc[i]) && LASTCHARW(i))
+		mywcscpy(wc + i, wc + i + 1);
+	    if (wcslen(wc) - nspace <= minlen)
+		goto donewsc;
+	}
 
-    upper = (int)(strlen(buff1) - 1);
-    for (i = upper; i > 0; i--) {
-	if (!FIRSTCHAR(i) && !isspace((int)buff1[i]))
-	    mystrcpy(&buff1[i], &buff1[i + 1]);
-	if (strlen(buff1) - nspace <= minlen)
-	    goto donesc;
+	for (i = WUP; i > 0; i--) {
+	    if (iswvowel(wc[i]) && !FIRSTCHARW(i))
+		mywcscpy(wc + i, wc + i + 1);
+	    if (wcslen(wc) - nspace <= minlen)
+		goto donewsc;
+	}
+
+	for (i = WUP; i > 0; i--) {
+	    if (islower((int)wc[i]) && LASTCHARW(i))
+		mywcscpy(wc + i, wc + i + 1);
+	    if (wcslen(wc) - nspace <= minlen)
+		goto donewsc;
+	}
+
+	for (i = WUP; i > 0; i--) {
+	    if (islower((int)wc[i]) && !FIRSTCHARW(i))
+		mywcscpy(wc + i, wc + i + 1);
+	    if (wcslen(wc) - nspace <= minlen)
+		goto donewsc;
+	}
     }
 
-donesc:
+    for (i = WUP; i > 0; i--) {
+	if (!FIRSTCHARW(i) && !iswspace((int)wc[i]))
+	    mywcscpy(wc + i, wc + i + 1);
+	if (wcslen(wc) - nspace <= minlen)
+	    goto donewsc;
+    }
+
+donewsc:
 
-    upper = (int) strlen(buff1);
-    if (upper > minlen)
-	for (i = upper - 1; i > 0; i--)
-	    if (isspace((int)buff1[i]))
-		mystrcpy(&buff1[i], &buff1[i + 1]);
+    {
+	int upper = (int) wcslen(wc);
+	if (upper > minlen)
+	    for (i = upper - 1; i > 0; i--)
+		if (iswspace((int)wc[i])) mywcscpy(wc + i, wc + i + 1);
+    }
 
-    return(mkChar(buff1));
+    int nb = (int) wcstoutf8(NULL, wc, 0);
+    char *cbuf = CallocCharBuf(nb+1);
+    wcstoutf8(cbuf, wc, nb + 1);
+    SEXP ans = mkCharCE(cbuf, CE_UTF8);
+    Free(cbuf);
+    return ans;
 }
 
 
 SEXP attribute_hidden do_abbrev(SEXP call, SEXP op, SEXP args, SEXP env)
 {
-    SEXP x, ans;
-    R_xlen_t i, len;
-    int minlen;
-    Rboolean warn = FALSE;
-    const char *s;
-    const void *vmax;
-
     checkArity(op,args);
-    x = CAR(args);
+    SEXP x = CAR(args);
 
     if (!isString(x))
 	error(_("the first argument must be a character vector"));
-    len = XLENGTH(x);
-
-    PROTECT(ans = allocVector(STRSXP, len));
-    minlen = asInteger(CADR(args));
-    vmax = vmaxget();
-    for (i = 0 ; i < len ; i++) {
-	if (STRING_ELT(x, i) == NA_STRING)
+    int minlen = asInteger(CADR(args));
+    if (minlen == NA_INTEGER)
+	error(_("invalid '%s' argument"), "minlength");
+    int usecl = asLogical(CADDR(args));
+    if (usecl == NA_INTEGER)
+	error(_("invalid '%s' argument"), "use.classes");
+
+    R_xlen_t len = XLENGTH(x);
+    SEXP ans = PROTECT(allocVector(STRSXP, len));
+    const void *vmax = vmaxget();
+    Rboolean warn = FALSE;
+    for (R_xlen_t i = 0 ; i < len ; i++) {
+	SEXP el = STRING_ELT(x, i);
+	if (el  == NA_STRING)
 	    SET_STRING_ELT(ans, i, NA_STRING);
 	else {
-	    s = translateChar(STRING_ELT(x, i));
-	    if(strlen(s) > minlen) {
-		warn = warn | !strIsASCII(s);
-		R_AllocStringBuffer(strlen(s), &cbuff);
-		SET_STRING_ELT(ans, i, stripchars(s, minlen));
-	    } else SET_STRING_ELT(ans, i, mkChar(s));
+	    const char *s = CHAR(el);
+	    if (strIsASCII(s)) {
+		if(strlen(s) > minlen) {
+		    R_AllocStringBuffer(strlen(s)+1, &cbuff);
+		    SET_STRING_ELT(ans, i, stripchars(s, minlen, usecl));
+		} else SET_STRING_ELT(ans, i, el);
+	    } else {
+		s = translateCharUTF8(el);
+		int nc = (int) utf8towcs(NULL, s, 0);
+		if (nc > minlen) {
+		    warn = TRUE;
+		    const wchar_t *wc = wtransChar(el);
+		    nc = (int) wcslen(wc);
+		    R_AllocStringBuffer(sizeof(wchar_t)*(nc+1), &cbuff);
+		    SET_STRING_ELT(ans, i, wstripchars(wc, minlen, usecl));
+		} else SET_STRING_ELT(ans, i, el);
+	    }
 	}
-	vmaxset(vmax);
+	vmaxset(vmax); // this throws away the result of wtransChar
     }
-    if (warn) warning(_("abbreviate used with non-ASCII chars"));
-    DUPLICATE_ATTRIB(ans, x);
+    if (usecl && warn) warning(_("abbreviate used with non-ASCII chars"));
+    SHALLOW_DUPLICATE_ATTRIB(ans, x);
     /* This copied the class, if any */
     R_FreeStringBufferL(&cbuff);
     UNPROTECT(1);
-    return(ans);
+    return ans;
 }
 
 SEXP attribute_hidden do_makenames(SEXP call, SEXP op, SEXP args, SEXP env)
@@ -770,7 +1019,7 @@ SEXP attribute_hidden do_tolower(SEXP call, SEXP op, SEXP args, SEXP env)
 	    vmaxset(vmax);
 	}
     }
-    DUPLICATE_ATTRIB(y, x);
+    SHALLOW_DUPLICATE_ATTRIB(y, x);
     /* This copied the class, if any */
     UNPROTECT(1);
     return(y);
@@ -1033,13 +1282,13 @@ SEXP attribute_hidden do_chartr(SEXP call, SEXP op, SEXP args, SEXP env)
     _new = CAR(args); args = CDR(args);
     x = CAR(args);
     n = XLENGTH(x);
-    if (!isString(old) || length(old) < 1 || STRING_ELT(old, 0) == NA_STRING)
+    if (!isString(old) || LENGTH(old) < 1 || STRING_ELT(old, 0) == NA_STRING)
 	error(_("invalid '%s' argument"), "old");
-    if (length(old) > 1)
+    if (LENGTH(old) > 1)
 	warning(_("argument '%s' has length > 1 and only the first element will be used"), "old");
-    if (!isString(_new) || length(_new) < 1 || STRING_ELT(_new, 0) == NA_STRING)
+    if (!isString(_new) || LENGTH(_new) < 1 || STRING_ELT(_new, 0) == NA_STRING)
 	error(_("invalid '%s' argument"), "new");
-    if (length(_new) > 1)
+    if (LENGTH(_new) > 1)
 	warning(_("argument '%s' has length > 1 and only the first element will be used"), "new");
     if (!isString(x)) error("invalid '%s' argument", "x");
 
@@ -1113,7 +1362,7 @@ SEXP attribute_hidden do_chartr(SEXP call, SEXP op, SEXP args, SEXP env)
 
 	trs_cnt_ptr = Calloc(1, struct wtr_spec *);
 	*trs_cnt_ptr = trs_cnt->next;
-	for (xtable_cnt = 0 ; wtr_get_next_char_from_spec(trs_cnt_ptr); 
+	for (xtable_cnt = 0 ; wtr_get_next_char_from_spec(trs_cnt_ptr);
 	      xtable_cnt++) ;
 	wtr_free_spec(trs_cnt);
 	Free(trs_cnt_ptr);
@@ -1192,7 +1441,7 @@ SEXP attribute_hidden do_chartr(SEXP call, SEXP op, SEXP args, SEXP env)
 	struct tr_spec *trs_old, **trs_old_ptr;
 	struct tr_spec *trs_new, **trs_new_ptr;
 
-	for (unsigned int ii = 0; ii <= UCHAR_MAX; ii++) 
+	for (unsigned int ii = 0; ii <= UCHAR_MAX; ii++)
 	    xtable[ii] = (unsigned char) ii;
 
 	/* Initialize the old and new tr_spec lists. */
@@ -1246,7 +1495,7 @@ SEXP attribute_hidden do_chartr(SEXP call, SEXP op, SEXP args, SEXP env)
 	vmaxset(vmax);
     }
 
-    DUPLICATE_ATTRIB(y, x);
+    SHALLOW_DUPLICATE_ATTRIB(y, x);
     /* This copied the class, if any */
     UNPROTECT(1);
     return(y);
@@ -1270,44 +1519,47 @@ SEXP attribute_hidden do_strtrim(SEXP call, SEXP op, SEXP args, SEXP env)
     if (!isString(x = CAR(args)))
 	error(_("strtrim() requires a character vector"));
     len = XLENGTH(x);
-    PROTECT(width = coerceVector(CADR(args), INTSXP));
-    nw = LENGTH(width);
-    if (!nw || (nw < len && len % nw))
-	error(_("invalid '%s' argument"), "width");
-    for (i = 0; i < nw; i++)
-	if (INTEGER(width)[i] == NA_INTEGER ||
-	   INTEGER(width)[i] < 0)
-	    error(_("invalid '%s' argument"), "width");
     PROTECT(s = allocVector(STRSXP, len));
-    vmax = vmaxget();
-    for (i = 0; i < len; i++) {
-	if (STRING_ELT(x, i) == NA_STRING) {
-	    SET_STRING_ELT(s, i, STRING_ELT(x, i));
-	    continue;
-	}
-	w = INTEGER(width)[i % nw];
-	This = translateChar(STRING_ELT(x, i));
-	nc = (int) strlen(This);
-	buf = R_AllocStringBuffer(nc, &cbuff);
-	wsum = 0;
-	mbs_init(&mb_st);
-	for (p = This, w0 = 0, q = buf; *p ;) {
-	    nb =  (int) Mbrtowc(&wc, p, MB_CUR_MAX, &mb_st);
-	    w0 = Ri18n_wcwidth(wc);
-	    if (w0 < 0) { p += nb; continue; } /* skip non-printable chars */
-	    wsum += w0;
-	    if (wsum <= w) {
-		for (k = 0; k < nb; k++) *q++ = *p++;
-	    } else break;
+    if(len > 0) {
+	PROTECT(width = coerceVector(CADR(args), INTSXP));
+	nw = LENGTH(width);
+	if (!nw || (nw < len && len % nw))
+	    error(_("invalid '%s' argument"), "width");
+	for (i = 0; i < nw; i++)
+	    if (INTEGER(width)[i] == NA_INTEGER ||
+		INTEGER(width)[i] < 0)
+		error(_("invalid '%s' argument"), "width");
+	vmax = vmaxget();
+	for (i = 0; i < len; i++) {
+	    if (STRING_ELT(x, i) == NA_STRING) {
+		SET_STRING_ELT(s, i, STRING_ELT(x, i));
+		continue;
+	    }
+	    w = INTEGER(width)[i % nw];
+	    This = translateChar(STRING_ELT(x, i));
+	    nc = (int) strlen(This);
+	    buf = R_AllocStringBuffer(nc, &cbuff);
+	    wsum = 0;
+	    mbs_init(&mb_st);
+	    for (p = This, w0 = 0, q = buf; *p ;) {
+		nb =  (int) Mbrtowc(&wc, p, MB_CUR_MAX, &mb_st);
+		w0 = Ri18n_wcwidth(wc);
+		if (w0 < 0) { p += nb; continue; } /* skip non-printable chars */
+		wsum += w0;
+		if (wsum <= w) {
+		    for (k = 0; k < nb; k++) *q++ = *p++;
+		} else break;
+	    }
+	    *q = '\0';
+	    SET_STRING_ELT(s, i, markKnown(buf, STRING_ELT(x, i)));
+	    vmaxset(vmax);
 	}
-	*q = '\0';
-	SET_STRING_ELT(s, i, markKnown(buf, STRING_ELT(x, i)));
-	vmaxset(vmax);
+	R_FreeStringBufferL(&cbuff);
+	UNPROTECT(1);
     }
-    if (len > 0) R_FreeStringBufferL(&cbuff);
-    DUPLICATE_ATTRIB(s, x);
+    SHALLOW_DUPLICATE_ATTRIB(s, x);
     /* This copied the class, if any */
-    UNPROTECT(2);
+    UNPROTECT(1);
     return s;
 }
 
@@ -1336,8 +1588,8 @@ SEXP attribute_hidden do_strtoi(SEXP call, SEXP op, SEXP args, SEXP env)
 
     x = CAR(args); args = CDR(args);
     b = CAR(args);
-    
-    if(!isInteger(b) || (length(b) < 1))
+
+    if(!isInteger(b) || (LENGTH(b) < 1))
 	error(_("invalid '%s' argument"), "base");
     base = INTEGER(b)[0];
     if((base != 0) && ((base < 2) || (base > 36)))
@@ -1347,6 +1599,86 @@ SEXP attribute_hidden do_strtoi(SEXP call, SEXP op, SEXP args, SEXP env)
     for(i = 0; i < n; i++)
 	INTEGER(ans)[i] = strtoi(STRING_ELT(x, i), base);
     UNPROTECT(1);
-    
+
     return ans;
 }
+
+/* creates a new STRSXP which is a suffix of string, starting
+   with given index; the result is returned unprotected  */
+
+SEXP attribute_hidden stringSuffix(SEXP string, int fromIndex) {
+
+    int origLen = LENGTH(string);
+    int newLen = origLen - fromIndex;
+
+    SEXP res = PROTECT(allocVector(STRSXP, newLen));
+    int i;
+    for(i = 0; i < newLen; i++) {
+	SET_STRING_ELT(res, i, STRING_ELT(string, fromIndex++));
+    }
+
+    UNPROTECT(1); /* res */
+    return res;
+}
+
+SEXP attribute_hidden do_strrep(SEXP call, SEXP op, SEXP args, SEXP env)
+{
+    SEXP d, s, x, n, el;
+    R_xlen_t is, ix, in, ns, nx, nn;
+    const char *xi;
+    int j, ni, nc;
+    const char *cbuf;
+    char *buf;
+    const void *vmax;
+
+    checkArity(op, args);
+
+    x = CAR(args); args = CDR(args);
+    n = CAR(args);
+
+    nx = XLENGTH(x);
+    nn = XLENGTH(n);
+    if((nx == 0) || (nn == 0))
+	return allocVector(STRSXP, 0);
+
+    ns = (nx > nn) ? nx : nn;
+
+    PROTECT(s = allocVector(STRSXP, ns));
+    vmax = vmaxget();
+    is = ix = in = 0;
+    for(; is < ns; is++) {
+	el = STRING_ELT(x, ix);
+	ni = INTEGER(n)[in];
+	if((el == NA_STRING) || (ni == NA_INTEGER)) {
+	    SET_STRING_ELT(s, is, NA_STRING);
+	} else {
+	    if(ni < 0)
+		error(_("invalid '%s' value"), "times");
+	    xi = CHAR(el);
+	    nc = (int) strlen(xi);
+
+	    /* check for feasible result length; use double to protect
+	       against integer overflow */
+	    double len = ((double) nc) * ni;
+	    if (len > INT_MAX)
+		error("R character strings are limited to 2^31-1 bytes");
+
+	    cbuf = buf = CallocCharBuf(nc * ni);
+	    for(j = 0; j < ni; j++) {
+		strcpy(buf, xi);
+		buf += nc;
+	    }
+	    SET_STRING_ELT(s, is, mkCharCE(cbuf, getCharCE(el)));
+	    Free(cbuf);
+	    vmaxset(vmax);
+	}
+	ix = (++ix == nx) ? 0 : ix;
+	in = (++in == nn) ? 0 : in;
+    }
+    /* Copy names if not recycled. */
+    if((ns == nx) &&
+       (d = getAttrib(x, R_NamesSymbol)) != R_NilValue)
+	setAttrib(s, R_NamesSymbol, d);
+    UNPROTECT(1);
+    return s;
+}
diff --git a/src/main/coerce.c b/src/main/coerce.c
index 7ce519b..cdec74a 100644
--- a/src/main/coerce.c
+++ b/src/main/coerce.c
@@ -1,8 +1,8 @@
 /*
  *  R : A Computer Language for Statistical Data Analysis
  *  Copyright (C) 1995,1996  Robert Gentleman, Ross Ihaka
- *  Copyright (C) 1997-2013  The R Core Team
- *  Copyright (C) 2003-2009 The R Foundation
+ *  Copyright (C) 1997-2015  The R Core Team
+ *  Copyright (C) 2003-2015  The R Foundation
  *
  *  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
@@ -16,7 +16,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  */
 
 #ifdef HAVE_CONFIG_H
@@ -41,7 +41,7 @@
 
 /* Coercion warnings will be OR'ed : */
 #define WARN_NA	   1
-#define WARN_INACC 2
+#define WARN_INT_NA 2
 #define WARN_IMAG  4
 #define WARN_RAW  8
 
@@ -50,11 +50,11 @@
    assignment functions when possible, since the write barrier (and
    possibly cache behavior on some architectures) makes assigning more
    costly than dereferencing. */
-#define DUPLICATE_ATTRIB(to, from) do {\
+#define SHALLOW_DUPLICATE_ATTRIB(to, from) do {\
   SEXP __from__ = (from); \
   if (ATTRIB(__from__) != R_NilValue) { \
     SEXP __to__ = (to); \
-    (DUPLICATE_ATTRIB)(__to__, __from__);	\
+    (SHALLOW_DUPLICATE_ATTRIB)(__to__, __from__);	\
   } \
 } while (0)
 
@@ -75,8 +75,8 @@ void attribute_hidden CoercionWarning(int warn)
 */
     if (warn & WARN_NA)
 	warning(_("NAs introduced by coercion"));
-    if (warn & WARN_INACC)
-	warning(_("inaccurate integer conversion in coercion"));
+    if (warn & WARN_INT_NA)
+	warning(_("NAs introduced by coercion to integer range"));
     if (warn & WARN_IMAG)
 	warning(_("imaginary parts discarded in coercion"));
     if (warn & WARN_RAW)
@@ -126,8 +126,8 @@ IntegerFromReal(double x, int *warn)
 {
     if (ISNAN(x))
 	return NA_INTEGER;
-    else if (x > INT_MAX || x <= INT_MIN ) {
-	*warn |= WARN_NA;
+    else if (x >= INT_MAX+1. || x <= INT_MIN ) {
+	*warn |= WARN_INT_NA;
 	return NA_INTEGER;
     }
     return (int) x;
@@ -138,8 +138,8 @@ IntegerFromComplex(Rcomplex x, int *warn)
 {
     if (ISNAN(x.r) || ISNAN(x.i))
 	return NA_INTEGER;
-    else if (x.r > INT_MAX || x.r <= INT_MIN ) {
-	*warn |= WARN_NA;
+    else if (x.r > INT_MAX+1. || x.r <= INT_MIN ) {
+	*warn |= WARN_INT_NA;
 	return NA_INTEGER;;
     }
     if (x.i != 0)
@@ -156,14 +156,22 @@ IntegerFromString(SEXP x, int *warn)
     if (x != R_NaString && !isBlankString(CHAR(x))) { /* ASCII */
 	xdouble = R_strtod(CHAR(x), &endp); /* ASCII */
 	if (isBlankString(endp)) {
+#ifdef _R_pre_Version_3_3_0
 	    if (xdouble > INT_MAX) {
-		*warn |= WARN_INACC;
+		*warn |= WARN_INT_NA;
 		return INT_MAX;
 	    }
 	    else if(xdouble < INT_MIN+1) {
-		*warn |= WARN_INACC;
-		return INT_MIN;
+		*warn |= WARN_INT_NA;
+		return INT_MIN;// <- "wrong" as INT_MIN == NA_INTEGER currently; should have used INT_MIN+1
 	    }
+#else
+	    // behave the same as IntegerFromReal() etc:
+	    if (xdouble >= INT_MAX+1. || xdouble <= INT_MIN ) {
+		*warn |= WARN_INT_NA;
+		return NA_INTEGER;
+	    }
+#endif
 	    else
 		return (int) xdouble;
 	}
@@ -193,6 +201,8 @@ RealFromComplex(Rcomplex x, int *warn)
 {
     if (ISNAN(x.r) || ISNAN(x.i))
 	return NA_REAL;
+    if (ISNAN(x.r)) return x.r;
+    if (ISNAN(x.i)) return NA_REAL;
     if (x.i != 0)
 	*warn |= WARN_IMAG;
     return x.r;
@@ -247,14 +257,18 @@ Rcomplex attribute_hidden
 ComplexFromReal(double x, int *warn)
 {
     Rcomplex z;
+#ifdef PRE_R_3_3_0
     if (ISNAN(x)) {
 	z.r = NA_REAL;
 	z.i = NA_REAL;
     }
     else {
+#endif
 	z.r = x;
 	z.i = 0;
+#ifdef PRE_R_3_3_0
     }
+#endif
     return z;
 }
 
@@ -302,45 +316,14 @@ SEXP attribute_hidden StringFromInteger(int x, int *warn)
     else return mkChar(EncodeInteger(x, w));
 }
 
-static const char* dropTrailing0(char *s, char cdec)
-{
-    /* Note that  's'  is modified */
-    char *p = s;
-    for (p = s; *p; p++) {
-	if(*p == cdec) {
-	    char *replace = p++;
-	    while ('0' <= *p  &&  *p <= '9')
-		if(*(p++) != '0')
-		    replace = p;
-	    if(replace != p)
-		while((*(replace++) = *(p++)))
-		    ;
-	    break;
-	}
-    }
-    return s;
-}
-
-SEXP attribute_hidden StringFromReal(double x, int *warn)
-{
-    int w, d, e;
-    formatReal(&x, 1, &w, &d, &e, 0);
-    if (ISNA(x)) return NA_STRING;
-    else {
-	/* Note that we recast EncodeReal()'s value to possibly modify it
-	 * destructively; this is harmless here (in a sequential
-	 * environment), as mkChar() creates a copy */
-	/* Do it this way to avoid (3x) warnings in gcc 4.2.x */
-	char * tmp = (char *)EncodeReal(x, w, d, e, OutDec);
-	return mkChar(dropTrailing0(tmp, OutDec));
-    }
-}
+// dropTrailing0 and StringFromReal moved to printutils.c
 
 SEXP attribute_hidden StringFromComplex(Rcomplex x, int *warn)
 {
     int wr, dr, er, wi, di, ei;
     formatComplex(&x, 1, &wr, &dr, &er, &wi, &di, &ei, 0);
-    if (ISNA(x.r) || ISNA(x.i)) return NA_STRING;
+    if (ISNA(x.r) || ISNA(x.i)) // "NA" if Re or Im is (but not if they're just NaN)
+	return NA_STRING;
     else /* EncodeComplex has its own anti-trailing-0 care :*/
 	return mkChar(EncodeComplex(x, wr, dr, er, wi, di, ei, OutDec));
 }
@@ -438,9 +421,10 @@ static SEXP coerceToSymbol(SEXP v)
     default:
 	UNIMPLEMENTED_TYPE("coerceToSymbol", v);
     }
+    PROTECT(ans);
     if (warn) CoercionWarning(warn);/*2000/10/23*/
-    ans = install(CHAR(ans));
-    UNPROTECT(1);
+    ans = installTrChar(ans);
+    UNPROTECT(2); /* ans, v */
     return ans;
 }
 
@@ -456,7 +440,7 @@ static SEXP coerceToLogical(SEXP v)
        SET_RTRACE(ans,1);
     }
 #endif
-    DUPLICATE_ATTRIB(ans, v);
+    SHALLOW_DUPLICATE_ATTRIB(ans, v);
     switch (TYPEOF(v)) {
     case INTSXP:
 	for (i = 0; i < n; i++) {
@@ -508,7 +492,7 @@ static SEXP coerceToInteger(SEXP v)
        SET_RTRACE(ans,1);
     }
 #endif
-    DUPLICATE_ATTRIB(ans, v);
+    SHALLOW_DUPLICATE_ATTRIB(ans, v);
     switch (TYPEOF(v)) {
     case LGLSXP:
 	for (i = 0; i < n; i++) {
@@ -560,7 +544,7 @@ static SEXP coerceToReal(SEXP v)
        SET_RTRACE(ans,1);
     }
 #endif
-    DUPLICATE_ATTRIB(ans, v);
+    SHALLOW_DUPLICATE_ATTRIB(ans, v);
     switch (TYPEOF(v)) {
     case LGLSXP:
 	for (i = 0; i < n; i++) {
@@ -612,7 +596,7 @@ static SEXP coerceToComplex(SEXP v)
        SET_RTRACE(ans,1);
     }
 #endif
-    DUPLICATE_ATTRIB(ans, v);
+    SHALLOW_DUPLICATE_ATTRIB(ans, v);
     switch (TYPEOF(v)) {
     case LGLSXP:
 	for (i = 0; i < n; i++) {
@@ -665,7 +649,7 @@ static SEXP coerceToRaw(SEXP v)
        SET_RTRACE(ans,1);
     }
 #endif
-    DUPLICATE_ATTRIB(ans, v);
+    SHALLOW_DUPLICATE_ATTRIB(ans, v);
     switch (TYPEOF(v)) {
     case LGLSXP:
 	for (i = 0; i < n; i++) {
@@ -743,7 +727,7 @@ static SEXP coerceToString(SEXP v)
        SET_RTRACE(ans,1);
     }
 #endif
-    DUPLICATE_ATTRIB(ans, v);
+    SHALLOW_DUPLICATE_ATTRIB(ans, v);
     switch (TYPEOF(v)) {
     case LGLSXP:
 	for (i = 0; i < n; i++) {
@@ -1202,7 +1186,11 @@ SEXP coerceVector(SEXP v, SEXPTYPE type)
 	 * put in backticks. */
 	n = length(v);
 	PROTECT(ans = allocVector(type, n));
-	if (n == 0) break; /* Can this actually happen? */
+	if (n == 0) {
+	    /* Can this actually happen? */
+	    UNPROTECT(1);
+	    break;
+	}
 	i = 0;
 	op = CAR(v);
 	/* The case of practical relevance is "lhs ~ rhs", which
@@ -1287,7 +1275,7 @@ SEXP CreateTag(SEXP x)
 	&& length(STRING_ELT(x, 0)) >= 1) {
 	x = installTrChar(STRING_ELT(x, 0));
     } else
-	x = install(CHAR(STRING_ELT(deparse1(x, 1, SIMPLEDEPARSE), 0)));
+	x = installTrChar(STRING_ELT(deparse1(x, 1, SIMPLEDEPARSE), 0));
     return x;
 }
 
@@ -1339,14 +1327,8 @@ static SEXP ascommon(SEXP call, SEXP u, SEXPTYPE type)
     else if (isVector(u) || isList(u) || isLanguage(u)
 	     || (isSymbol(u) && type == EXPRSXP)) {
 	v = u;
-	/* this duplication may appear not to be needed in all cases,
-	   but beware that other code relies on it.
-	   (E.g  we clear attributes in do_asvector and do_ascharacter.)
-
-	   Generally coerceVector will copy over attributes.
-	*/
 	if (type != ANYSXP && TYPEOF(u) != type) v = coerceVector(u, type);
-	else if (MAYBE_REFERENCED(u)) v = duplicate(u);
+	else v = u;
 
 	/* drop attributes() and class() in some cases for as.pairlist:
 	   But why?  (And who actually coerces to pairlists?)
@@ -1354,6 +1336,7 @@ static SEXP ascommon(SEXP call, SEXP u, SEXPTYPE type)
 	if ((type == LISTSXP) &&
 	    !(TYPEOF(u) == LANGSXP || TYPEOF(u) == LISTSXP ||
 	      TYPEOF(u) == EXPRSXP || TYPEOF(u) == VECSXP)) {
+      if (MAYBE_REFERENCED(v)) v = shallow_duplicate(v);
 	    CLEAR_ATTRIB(v);
 	}
 	return v;
@@ -1372,31 +1355,45 @@ static SEXP ascommon(SEXP call, SEXP u, SEXPTYPE type)
     return u;/* -Wall */
 }
 
+SEXP attribute_hidden do_asCharacterFactor(SEXP call, SEXP op, SEXP args,
+                                           SEXP rho)
+{
+    SEXP x;
+    checkArity(op, args);
+    check1arg(args, call, "x");
+    x = CAR(args);
+    return asCharacterFactor(x);
+}
+
 /* used in attrib.c, eval.c and unique.c */
 SEXP asCharacterFactor(SEXP x)
 {
     SEXP ans;
 
-    if( !inherits(x, "factor") )
+    if( !inherits2(x, "factor") )
 	error(_("attempting to coerce non-factor"));
 
     R_xlen_t i, n = XLENGTH(x);
-    SEXP labels = getAttrib(x, install("levels"));
+    SEXP labels = getAttrib(x, R_LevelsSymbol);
+    if (TYPEOF(labels) != STRSXP)
+	error(_("malformed factor"));
+    int nl = LENGTH(labels);
     PROTECT(ans = allocVector(STRSXP, n));
     for(i = 0; i < n; i++) {
       int ii = INTEGER(x)[i];
-      SET_STRING_ELT(ans, i,
-		   (ii == NA_INTEGER) ? NA_STRING
-		   : STRING_ELT(labels, ii - 1));
+      if (ii == NA_INTEGER)
+	  SET_STRING_ELT(ans, i, NA_STRING);
+      else if (ii >= 1 && ii <= nl)
+	  SET_STRING_ELT(ans, i, STRING_ELT(labels, ii - 1));
+      else
+	  error(_("malformed factor"));
     }
     UNPROTECT(1);
     return ans;
 }
 
 
-/* the "ascharacter" name is a historical anomaly: as.character used to be the
- * only primitive;  now, all these ops are : */
-SEXP attribute_hidden do_ascharacter(SEXP call, SEXP op, SEXP args, SEXP rho)
+SEXP attribute_hidden do_asatomic(SEXP call, SEXP op, SEXP args, SEXP rho)
 {
     SEXP ans, x;
 
@@ -1454,7 +1451,7 @@ SEXP attribute_hidden do_asvector(SEXP call, SEXP op, SEXP args, SEXP rho)
     x = CAR(args);
 
     if (!isString(CADR(args)) || LENGTH(CADR(args)) != 1)
-	errorcall_return(call, R_MSG_mode);
+	error_return(R_MSG_mode);
     if (!strcmp("function", (CHAR(STRING_ELT(CADR(args), 0))))) /* ASCII */
 	type = CLOSXP;
     else
@@ -1503,7 +1500,7 @@ SEXP attribute_hidden do_asvector(SEXP call, SEXP op, SEXP args, SEXP rho)
     case ANYSXP: /* any */
 	break;
     default:
-	errorcall_return(call, R_MSG_mode);
+	error_return(R_MSG_mode);
     }
     ans = ascommon(call, x, type);
     switch(TYPEOF(ans)) { /* keep attributes for these: */
@@ -1532,7 +1529,7 @@ SEXP attribute_hidden do_asfunction(SEXP call, SEXP op, SEXP args, SEXP rho)
 
     arglist = CAR(args);
     if (!isNewList(arglist))
-	errorcall(call, _("list argument expected"));
+	error(_("list argument expected"));
 
     envir = CADR(args);
     if (isNull(envir)) {
@@ -1540,12 +1537,12 @@ SEXP attribute_hidden do_asfunction(SEXP call, SEXP op, SEXP args, SEXP rho)
 	envir = R_BaseEnv;
     } else
     if (!isEnvironment(envir))
-	errorcall(call, _("invalid environment"));
+	error(_("invalid environment"));
 
     n = length(arglist);
     if (n < 1)
-	errorcall(call, _("argument must have length at least 1"));
-    names = getAttrib(arglist, R_NamesSymbol);
+	error(_("argument must have length at least 1"));
+    PROTECT(names = getAttrib(arglist, R_NamesSymbol));
     PROTECT(pargs = args = allocList(n - 1));
     for (i = 0; i < n - 1; i++) {
 	SETCAR(pargs, VECTOR_ELT(arglist, i));
@@ -1566,8 +1563,8 @@ SEXP attribute_hidden do_asfunction(SEXP call, SEXP op, SEXP args, SEXP rho)
        )
 	    args =  mkCLOSXP(args, body, envir);
     else
-	    errorcall(call, _("invalid body for function"));
-    UNPROTECT(2);
+	    error(_("invalid body for function"));
+    UNPROTECT(3); /* body, pargs, names */
     return args;
 }
 
@@ -1590,7 +1587,7 @@ SEXP attribute_hidden do_ascall(SEXP call, SEXP op, SEXP args, SEXP rho)
     case EXPRSXP:
 	if(0 == (n = length(args)))
 	    errorcall(call, _("invalid length 0 argument"));
-	names = getAttrib(args, R_NamesSymbol);
+	PROTECT(names = getAttrib(args, R_NamesSymbol));
 	PROTECT(ap = ans = allocList(n));
 	for (i = 0; i < n; i++) {
 	    SETCAR(ap, VECTOR_ELT(args, i));
@@ -1598,7 +1595,7 @@ SEXP attribute_hidden do_ascall(SEXP call, SEXP op, SEXP args, SEXP rho)
 		SET_TAG(ap, installTrChar(STRING_ELT(names, i)));
 	    ap = CDR(ap);
 	}
-	UNPROTECT(1);
+	UNPROTECT(2); /* ap, names */
 	break;
     case LISTSXP:
 	ans = duplicate(args);
@@ -1755,11 +1752,11 @@ Rcomplex asComplex(SEXP x)
 SEXP attribute_hidden do_typeof(SEXP call, SEXP op, SEXP args, SEXP rho)
 {
     checkArity(op, args);
-    return ScalarString(type2str(TYPEOF(CAR(args))));
+    return type2rstr(TYPEOF(CAR(args)));
 }
 
 /* Define many of the <primitive> "is.xxx" functions :
-   Note that  isNull, isNumeric, etc are defined in util.c or Rinlinedfuns.h
+   Note that  isNull, isNumeric, etc are defined in util.c or ../include/Rinlinedfuns.h
 */
 SEXP attribute_hidden do_is(SEXP call, SEXP op, SEXP args, SEXP rho)
 {
@@ -1891,9 +1888,10 @@ SEXP attribute_hidden do_is(SEXP call, SEXP op, SEXP args, SEXP rho)
 	case DOTSXP:
 	case ANYSXP:
 	case EXPRSXP:
-	case EXTPTRSXP:
-	case BCODESXP:
-	case WEAKREFSXP:
+	// Not recursive, as long as not subsettable (on the R level)
+	// case EXTPTRSXP:
+	// case BCODESXP:
+	// case WEAKREFSXP:
 	    LOGICAL(ans)[0] = 1;
 	    break;
 	default:
@@ -1928,6 +1926,7 @@ SEXP attribute_hidden do_is(SEXP call, SEXP op, SEXP args, SEXP rho)
  * It seems to make more sense to check for a dim attribute.
  */
 
+// is.vector(x, mode) :
 SEXP attribute_hidden do_isvector(SEXP call, SEXP op, SEXP args, SEXP rho)
 {
     SEXP ans, a, x;
@@ -1936,7 +1935,7 @@ SEXP attribute_hidden do_isvector(SEXP call, SEXP op, SEXP args, SEXP rho)
     checkArity(op, args);
     x = CAR(args);
     if (!isString(CADR(args)) || LENGTH(CADR(args)) != 1)
-	errorcall_return(call, R_MSG_mode);
+	error_return(R_MSG_mode);
 
     stype = CHAR(STRING_ELT(CADR(args), 0)); /* ASCII */
 
@@ -2042,8 +2041,8 @@ SEXP attribute_hidden do_isna(SEXP call, SEXP op, SEXP args, SEXP rho)
 		    LOGICAL(ans)[i] = (STRING_ELT(s, 0) == NA_STRING);	\
 		    break;						\
 		case CPLXSXP:						\
-		    LOGICAL(ans)[i] = (ISNAN(COMPLEX(s)[0].r)		\
-				       || ISNAN(COMPLEX(s)[0].i));	\
+		    LOGICAL(ans)[i] = (ISNAN(COMPLEX(s)[0].r) || 	\
+				       ISNAN(COMPLEX(s)[0].i));		\
 		    break;						\
 		default:						\
 		    LOGICAL(ans)[i] = 0;				\
@@ -2089,15 +2088,19 @@ SEXP attribute_hidden do_isna(SEXP call, SEXP op, SEXP args, SEXP rho)
 }
 
 // Check if x has missing values; the anyNA.default() method
-static Rboolean anyNA(SEXP x, SEXP env)
+static Rboolean anyNA(SEXP call, SEXP op, SEXP args, SEXP env)
 /* Original code:
    Copyright 2012 Google Inc. All Rights Reserved.
    Author: Tim Hesterberg <rocket at google.com>
    Distributed under GPL 2 or later
 */
 {
+    SEXP x = CAR(args);
     SEXPTYPE xT = TYPEOF(x);
-    if (OBJECT(x) || xT == VECSXP || xT == LISTSXP) {
+    Rboolean isList =  (xT == VECSXP || xT == LISTSXP), recursive = FALSE;
+
+    if (isList && length(args) > 1) recursive = asLogical(CADR(args));
+    if (OBJECT(x) || (isList && !recursive)) {
 	SEXP e0 = PROTECT(lang2(install("is.na"), x));
 	SEXP e = PROTECT(lang2(install("any"), e0));
 	SEXP res = PROTECT(eval(e, env));
@@ -2144,6 +2147,39 @@ static Rboolean anyNA(SEXP x, SEXP env)
 	return FALSE;
     case NILSXP: // is.na() gives a warning..., but we do not.
 	return FALSE;
+    // The next two cases are only used if recursive = TRUE
+    case LISTSXP:
+    {
+	SEXP call2, args2, ans;
+	args2 = PROTECT(shallow_duplicate(args));
+	call2 = PROTECT(shallow_duplicate(call));
+	for (i = 0; i < n; i++, x = CDR(x)) {
+	    SETCAR(args2, CAR(x)); SETCADR(call2, CAR(x));
+	    if ((DispatchOrEval(call2, op, "anyNA", args2, env, &ans, 0, 1)
+		 && asLogical(ans)) || anyNA(call2, op, args2, env)) {
+		UNPROTECT(2);
+		return TRUE;
+	    }
+	}
+	UNPROTECT(2);
+	break;
+    }
+    case VECSXP:
+    {
+	SEXP call2, args2, ans;
+	args2 = PROTECT(shallow_duplicate(args));
+	call2 = PROTECT(shallow_duplicate(call));
+	for (i = 0; i < n; i++) {
+	    SETCAR(args2, VECTOR_ELT(x, i)); SETCADR(call2, VECTOR_ELT(x, i));
+	    if ((DispatchOrEval(call2, op, "anyNA", args2, env, &ans, 0, 1)
+		 && asLogical(ans)) || anyNA(call2, op, args2, env)) {
+		UNPROTECT(2);
+		return TRUE;
+	    }
+	}
+	UNPROTECT(2);
+	break;
+    }
 
     default:
 	error("anyNA() applied to non-(list or vector) of type '%s'",
@@ -2154,14 +2190,31 @@ static Rboolean anyNA(SEXP x, SEXP env)
 
 SEXP attribute_hidden do_anyNA(SEXP call, SEXP op, SEXP args, SEXP rho)
 {
-    checkArity(op, args);
-    check1arg(args, call, "x");
-
     SEXP ans;
+    static SEXP do_anyNA_formals = NULL;
+
+    if (length(args) < 1 || length(args) > 2)
+	errorcall(call, "anyNA takes 1 or 2 arguments");
+
     if (DispatchOrEval(call, op, "anyNA", args, rho, &ans, 0, 1))
-	return(ans);
-    // else
-    return ScalarLogical(anyNA(CAR(args), rho));
+	return ans;
+
+    if(length(args) == 1) {
+	check1arg(args, call, "x");
+	ans = ScalarLogical(anyNA(call, op, args, rho));
+   } else {
+	/* This is a primitive, so we manage argument matching ourselves.
+	   But this takes a little time.
+	 */
+	if (do_anyNA_formals == NULL)
+	    do_anyNA_formals = allocFormalsList2(install("x"),
+						 R_RecursiveSymbol);
+	PROTECT(args = matchArgs(do_anyNA_formals, args, call));
+	if(CADR(args) ==  R_MissingArg) SETCADR(args, ScalarLogical(FALSE));
+	ans = ScalarLogical(anyNA(call, op, args, rho));
+	UNPROTECT(1);
+    }
+    return ans;
 }
 
 
@@ -2211,7 +2264,8 @@ SEXP attribute_hidden do_isnan(SEXP call, SEXP op, SEXP args, SEXP rho)
 			       R_IsNaN(COMPLEX(x)[i].i));
 	break;
     default:
-	errorcall(call, _("default method not implemented for type '%s'"), type2char(TYPEOF(x)));
+	errorcall(call, _("default method not implemented for type '%s'"),
+		  type2char(TYPEOF(x)));
     }
     if (dims != R_NilValue)
 	setAttrib(ans, R_DimSymbol, dims);
@@ -2244,13 +2298,13 @@ SEXP attribute_hidden do_isfinite(SEXP call, SEXP op, SEXP args, SEXP rho)
 #endif
     x = CAR(args);
     n = xlength(x);
-    ans = allocVector(LGLSXP, n);
+    PROTECT(ans = allocVector(LGLSXP, n));
     if (isVector(x)) {
 	dims = getAttrib(x, R_DimSymbol);
 	if (isArray(x))
-	    names = getAttrib(x, R_DimNamesSymbol);
+	    PROTECT(names = getAttrib(x, R_DimNamesSymbol));
 	else
-	    names = getAttrib(x, R_NamesSymbol);
+	    PROTECT(names = getAttrib(x, R_NamesSymbol));
     }
     else dims = names = R_NilValue;
     switch (TYPEOF(x)) {
@@ -2274,7 +2328,8 @@ SEXP attribute_hidden do_isfinite(SEXP call, SEXP op, SEXP args, SEXP rho)
 	    LOGICAL(ans)[i] = (R_FINITE(COMPLEX(x)[i].r) && R_FINITE(COMPLEX(x)[i].i));
 	break;
     default:
-	errorcall(call, _("default method not implemented for type '%s'"), type2char(TYPEOF(x)));
+	errorcall(call, _("default method not implemented for type '%s'"),
+		  type2char(TYPEOF(x)));
     }
     if (dims != R_NilValue)
 	setAttrib(ans, R_DimSymbol, dims);
@@ -2284,6 +2339,9 @@ SEXP attribute_hidden do_isfinite(SEXP call, SEXP op, SEXP args, SEXP rho)
 	else
 	    setAttrib(ans, R_NamesSymbol, names);
     }
+    if (isVector(x))
+	UNPROTECT(1); /* names */
+    UNPROTECT(1); /* ans */
     return ans;
 }
 
@@ -2304,13 +2362,13 @@ SEXP attribute_hidden do_isinfinite(SEXP call, SEXP op, SEXP args, SEXP rho)
 #endif
     x = CAR(args);
     n = xlength(x);
-    ans = allocVector(LGLSXP, n);
+    PROTECT(ans = allocVector(LGLSXP, n));
     if (isVector(x)) {
 	dims = getAttrib(x, R_DimSymbol);
 	if (isArray(x))
-	    names = getAttrib(x, R_DimNamesSymbol);
+	    PROTECT(names = getAttrib(x, R_DimNamesSymbol));
 	else
-	    names = getAttrib(x, R_NamesSymbol);
+	    PROTECT(names = getAttrib(x, R_NamesSymbol));
     }
     else	dims = names = R_NilValue;
     switch (TYPEOF(x)) {
@@ -2342,7 +2400,8 @@ SEXP attribute_hidden do_isinfinite(SEXP call, SEXP op, SEXP args, SEXP rho)
 	}
 	break;
     default:
-	errorcall(call, _("default method not implemented for type '%s'"), type2char(TYPEOF(x)));
+	errorcall(call, _("default method not implemented for type '%s'"),
+		  type2char(TYPEOF(x)));
     }
     if (!isNull(dims))
 	setAttrib(ans, R_DimSymbol, dims);
@@ -2352,6 +2411,9 @@ SEXP attribute_hidden do_isinfinite(SEXP call, SEXP op, SEXP args, SEXP rho)
 	else
 	    setAttrib(ans, R_NamesSymbol, names);
     }
+    if (isVector(x))
+	UNPROTECT(1); /* names */
+    UNPROTECT(1); /* ans */
     return ans;
 }
 
@@ -2371,12 +2433,11 @@ SEXP attribute_hidden do_call(SEXP call, SEXP op, SEXP args, SEXP rho)
     const char *str = translateChar(STRING_ELT(rfun, 0));
     if (streql(str, ".Internal")) error("illegal usage");
     PROTECT(rfun = install(str));
-    PROTECT(evargs = duplicate(CDR(args)));
+    PROTECT(evargs = shallow_duplicate(CDR(args)));
     for (rest = evargs; rest != R_NilValue; rest = CDR(rest)) {
-	PROTECT(tmp = eval(CAR(rest), rho));
-	if (MAYBE_REFERENCED(tmp)) tmp = duplicate(tmp);
+	tmp = eval(CAR(rest), rho);
+	if (NAMED(tmp)) MARK_NOT_MUTABLE(tmp);
 	SETCAR(rest, tmp);
-	UNPROTECT(1);
     }
     rfun = LCONS(rfun, evargs);
     UNPROTECT(3);
@@ -2399,22 +2460,22 @@ SEXP attribute_hidden do_docall(SEXP call, SEXP op, SEXP args, SEXP rho)
        zero-length string check used to be here but install gives
        better error message.
      */
-    if( !(isString(fun) && length(fun) == 1) && !isFunction(fun) )
-	error(_("'what' must be a character string or a function"));
+    if(!(isFunction(fun) || (isString(fun) && length(fun) == 1)))
+	error(_("'what' must be a function or character string"));
 
 #ifdef __maybe_in_the_future__
     if (!isNull(args) && !isVectorList(args))
 	error(_("'args' must be a list or expression"));
 #else
     if (!isNull(args) && !isNewList(args))
-	error(_("'args' must be a list"));
+	error(_("'%s' must be a list"), "args");
 #endif
 
     if (!isEnvironment(envir))
 	error(_("'envir' must be an environment"));
 
     n = length(args);
-    names = getAttrib(args, R_NamesSymbol);
+    PROTECT(names = getAttrib(args, R_NamesSymbol));
 
     PROTECT(c = call = allocList(n + 1));
     SET_TYPEOF(c, LANGSXP);
@@ -2441,7 +2502,7 @@ SEXP attribute_hidden do_docall(SEXP call, SEXP op, SEXP args, SEXP rho)
     }
     call = eval(call, envir);
 
-    UNPROTECT(1);
+    UNPROTECT(2); /* c, names */
     return call;
 }
 
@@ -2515,9 +2576,11 @@ SEXP attribute_hidden substituteList(SEXP el, SEXP rho)
 		h = LCONS(R_DotsSymbol, R_NilValue);
 	    else if (h == R_NilValue  || h == R_MissingArg)
 		h = R_NilValue;
-	    else if (TYPEOF(h) == DOTSXP)
+	    else if (TYPEOF(h) == DOTSXP) {
+		PROTECT(h);
 		h = substituteList(h, R_NilValue);
-	    else
+		UNPROTECT(1);
+	    } else
 		error(_("'...' used in an incorrect context"));
 	} else {
 	    h = substitute(CAR(el), rho);
@@ -2546,13 +2609,15 @@ SEXP attribute_hidden substituteList(SEXP el, SEXP rho)
 /* This is a primitive SPECIALSXP */
 SEXP attribute_hidden do_substitute(SEXP call, SEXP op, SEXP args, SEXP rho)
 {
-    SEXP ap, argList, env, s, t;
+    SEXP argList, env, s, t;
+    static SEXP do_substitute_formals = NULL;
+
+    if (do_substitute_formals == NULL)
+	do_substitute_formals = allocFormalsList2(install("expr"),
+						  install("env"));
 
     /* argument matching */
-    PROTECT(ap = list2(R_NilValue, R_NilValue));
-    SET_TAG(ap,  install("expr"));
-    SET_TAG(CDR(ap), install("env"));
-    PROTECT(argList = matchArgs(ap, args, call));
+    PROTECT(argList = matchArgs(do_substitute_formals, args, call));
 
     /* set up the environment for substitution */
     if (CADR(argList) == R_MissingArg)
@@ -2571,7 +2636,7 @@ SEXP attribute_hidden do_substitute(SEXP call, SEXP op, SEXP args, SEXP rho)
     PROTECT(env);
     PROTECT(t = CONS(duplicate(CAR(argList)), R_NilValue));
     s = substituteList(t, env);
-    UNPROTECT(4);
+    UNPROTECT(3);
     return CAR(s);
 }
 
@@ -2582,7 +2647,7 @@ SEXP attribute_hidden do_quote(SEXP call, SEXP op, SEXP args, SEXP rho)
     check1arg(args, call, "expr");
     SEXP val = CAR(args);
     /* Make sure expression has NAMED == 2 before being returning
-       in to avoid modification of source code */
+       in order to avoid modification of source code */
     if (NAMED(val) != 2) SET_NAMED(val, 2);
     return(val);
 }
@@ -2684,7 +2749,7 @@ static SEXP R_set_class(SEXP obj, SEXP value, SEXP call)
 	valueType = (whichType == -1) ? (SEXPTYPE) -1 : classTable[whichType].sexp;
 	PROTECT(cur_class = R_data_class(obj, FALSE)); nProtect++;
 	/*  assigning type as a class deletes an explicit class attribute. */
-	if(valueType != -1) {
+	if(valueType != (SEXPTYPE)-1) {
 	    setAttrib(obj, R_ClassSymbol, R_NilValue);
 	    if(IS_S4_OBJECT(obj)) /* NULL class is only valid for S3 objects */
 	      do_unsetS4(obj, value);
@@ -2735,10 +2800,14 @@ static SEXP R_set_class(SEXP obj, SEXP value, SEXP call)
 
 SEXP attribute_hidden R_do_set_class(SEXP call, SEXP op, SEXP args, SEXP env)
 {
+    SEXP ans;
     checkArity(op, args);
     check1arg(args, call, "x");
 
-    return R_set_class(CAR(args), CADR(args), call);
+    if (MAYBE_SHARED(CAR(args))) SETCAR(args, shallow_duplicate(CAR(args)));
+    ans = R_set_class(CAR(args), CADR(args), call);
+    SET_NAMED(CAR(args), 0);
+    return ans;
 }
 
 /* primitive */
@@ -2770,7 +2839,7 @@ SEXP attribute_hidden do_storage_mode(SEXP call, SEXP op, SEXP args, SEXP env)
     if(isFactor(obj))
 	error(_("invalid to change the storage mode of a factor"));
     PROTECT(ans = coerceVector(obj, type));
-    DUPLICATE_ATTRIB(ans, obj);
+    SHALLOW_DUPLICATE_ATTRIB(ans, obj);
     UNPROTECT(1);
     return ans;
 }
diff --git a/src/main/colors.c b/src/main/colors.c
index 49a1a77..b64599a 100644
--- a/src/main/colors.c
+++ b/src/main/colors.c
@@ -1,6 +1,6 @@
 /*
  *  R : A Computer Language for Statistical Data Analysis
- *  Copyright (C) 2012-2013  The R Core Team
+ *  Copyright (C) 2012-2014  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
@@ -14,10 +14,10 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  */
 
-/* This should be regarded as part of the graphics engine: 
+/* This should be regarded as part of the graphics engine:
    it is now a stub for code in grDevices */
 
 #ifdef HAVE_CONFIG_H
diff --git a/src/main/complex.c b/src/main/complex.c
index 86f3027..4ecce47 100644
--- a/src/main/complex.c
+++ b/src/main/complex.c
@@ -1,7 +1,7 @@
 /*
  *  R : A Computer Language for Statistical Data Analysis
  *  Copyright (C) 1995, 1996, 1997  Robert Gentleman and Ross Ihaka
- *  Copyright (C) 2000-2013	    The R Core Team
+ *  Copyright (C) 2000-2016	    The R Core Team
  *  Copyright (C) 2005		    The R Foundation
  *
  *  This program is free software; you can redistribute it and/or modify
@@ -16,16 +16,18 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  */
 
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
 
-/* Note: gcc may warn in several places about C99 features as extensions.
-   This is a very-long-standing GCC bug, http://gcc.gnu.org/PR7263
+/* Note: gcc -peantic may warn in several places about C99 features 
+   as extensions.
+   This was a very-long-standing GCC bug, http://gcc.gnu.org/PR7263
    The system <complex.h> header can work around it: some do.
+   It should have been resolved (after a decade) in 2012.
 */
 
 #if 0
@@ -47,11 +49,6 @@
 #undef HAVE_CTANH
 #endif
 
-#ifdef __CYGWIN__
-/* as of 1.7.8 it had cacos, but it does not work */
-#undef HAVE_CACOS
-#endif
-
 #ifdef __SUNPRO_C
 /* segfaults in Solaris Studio 12.3 */
 #undef HAVE_CPOW
@@ -63,48 +60,14 @@
 
 #include "arithmetic.h"		/* complex_*  */
 #include <complex.h>
+#include "Rcomplex.h"		/* I, C99_COMPLEX2, SET_C99_COMPLEX, toC99 */
+#include <R_ext/Itermacros.h>
+
 
 /* interval at which to check interrupts, a guess */
 #define NINTERRUPT 10000000
 
 
-/* GCC has problems with header files on e.g. Solaris.
-   That OS defines the imaginary type, but GCC does not.
-   Probably needed elsewhere, e.g. AIX, HP-UX (PR#15083)
-   And use on Win32/64 suppresses warnings.
-   The warning is also seen on Mac OS 10.5, but not later.
-*/
-#if defined(__GNUC__) && (defined(__sun__) || defined(__hpux__) || defined(Win32))
-# undef  I
-# define I (__extension__ 1.0iF)
-#endif
-
-
-/* 
-   Note: this could use the C11 CMPLX() macro.
-   As could mycpow, z_tan and some of the substitutes.
- */
-static R_INLINE double complex toC99(Rcomplex *x)
-{
-#if __GNUC__
-    double complex ans = (double complex) 0; /* -Wall */
-    __real__ ans = x->r;
-    __imag__ ans = x->i;
-    return ans;
-#else
-    return x->r + x->i * I;
-#endif
-}
-#define C99_COMPLEX2(x, i) toC99(COMPLEX(x) + i)
-
-static R_INLINE void 
-SET_C99_COMPLEX(Rcomplex *x, R_xlen_t i, double complex value)
-{
-    Rcomplex *ans = x+i;
-    ans->r = creal(value);
-    ans->i = cimag(value);
-}
-
 SEXP attribute_hidden complex_unary(ARITHOP_TYPE code, SEXP s1, SEXP call)
 {
     R_xlen_t i, n;
@@ -155,7 +118,7 @@ static R_INLINE double complex R_cpow_n(double complex X, int k)
   2) On Mingw (but not Mingw-w64) the system cpow is explicitly linked
      against the (slow) MSVCRT pow, and gets (0+0i)^Y as 0+0i for all Y.
 
-  3) PPC Mac OS X crashes on powers of 0+0i (at least under Rosetta).
+  3) PPC macOS crashed on powers of 0+0i (at least under Rosetta).
   Really 0i^-1 should by Inf+NaNi, but getting that portably seems too hard.
   (C1x's CMPLX will eventually be possible.)
 */
@@ -163,7 +126,7 @@ static R_INLINE double complex R_cpow_n(double complex X, int k)
 static double complex mycpow (double complex X, double complex Y)
 {
     double complex Z;
-    double yr = creal(Y), yi = cimag(Y); 
+    double yr = creal(Y), yi = cimag(Y);
     int k;
     if (X == 0.0) {
 	if (yi == 0.0) Z = R_pow(0.0, yr); else Z = R_NaN + R_NaN*I;
@@ -198,15 +161,11 @@ static double complex mycpow (double complex X, double complex Y)
     return Z;
 }
 
-/* See arithmetic.c */
-#define mod_iterate(n1,n2,i1,i2) for (i=i1=i2=0; i<n; \
-	i1 = (++i1 == n1) ? 0 : i1,\
-	i2 = (++i2 == n2) ? 0 : i2,\
-	++i)
+
 
 SEXP attribute_hidden complex_binary(ARITHOP_TYPE code, SEXP s1, SEXP s2)
 {
-    R_xlen_t i,i1, i2, n, n1, n2;
+    R_xlen_t i, i1, i2, n, n1, n2;
     SEXP ans;
 
     /* Note: "s1" and "s2" are protected in the calling code. */
@@ -221,41 +180,38 @@ SEXP attribute_hidden complex_binary(ARITHOP_TYPE code, SEXP s1, SEXP s2)
 
     switch (code) {
     case PLUSOP:
-	mod_iterate(n1, n2, i1, i2) {
-	    if ((i+1) % NINTERRUPT == 0) R_CheckUserInterrupt();
-	    Rcomplex x1 = COMPLEX(s1)[i1], x2 = COMPLEX(s2)[i2];
+	MOD_ITERATE2_CHECK(NINTERRUPT, n, n1, n2, i, i1, i2, {
+	    Rcomplex x1 = COMPLEX(s1)[i1];
+	    Rcomplex x2 = COMPLEX(s2)[i2];
 	    COMPLEX(ans)[i].r = x1.r + x2.r;
 	    COMPLEX(ans)[i].i = x1.i + x2.i;
-	}
+	});
 	break;
     case MINUSOP:
-	mod_iterate(n1, n2, i1, i2) {
-	    if ((i+1) % NINTERRUPT == 0) R_CheckUserInterrupt();
-	    Rcomplex x1 = COMPLEX(s1)[i1], x2 = COMPLEX(s2)[i2];
+	MOD_ITERATE2_CHECK(NINTERRUPT, n, n1, n2, i, i1, i2, {
+	    Rcomplex x1 = COMPLEX(s1)[i1];
+	    Rcomplex x2 = COMPLEX(s2)[i2];
 	    COMPLEX(ans)[i].r = x1.r - x2.r;
 	    COMPLEX(ans)[i].i = x1.i - x2.i;
-	}
+	});
 	break;
     case TIMESOP:
-	mod_iterate(n1, n2, i1, i2) {
-	    if ((i+1) % NINTERRUPT == 0) R_CheckUserInterrupt();
+	MOD_ITERATE2_CHECK(NINTERRUPT, n, n1, n2, i, i1, i2, {
 	    SET_C99_COMPLEX(COMPLEX(ans), i,
 			    C99_COMPLEX2(s1, i1) * C99_COMPLEX2(s2, i2));
-	}
+	});
 	break;
     case DIVOP:
-	mod_iterate(n1, n2, i1, i2) {
-	    if ((i+1) % NINTERRUPT == 0) R_CheckUserInterrupt();
+	MOD_ITERATE2_CHECK(NINTERRUPT, n, n1, n2, i, i1, i2, {
 	    SET_C99_COMPLEX(COMPLEX(ans), i,
 			    C99_COMPLEX2(s1, i1) / C99_COMPLEX2(s2, i2));
-	}
+	});
 	break;
     case POWOP:
-	mod_iterate(n1, n2, i1, i2) {
-	    if ((i+1) % NINTERRUPT == 0) R_CheckUserInterrupt();
+	MOD_ITERATE2_CHECK(NINTERRUPT, n, n1, n2, i, i1, i2, {
 	    SET_C99_COMPLEX(COMPLEX(ans), i,
 			    mycpow(C99_COMPLEX2(s1, i1), C99_COMPLEX2(s2, i2)));
-	}
+	});
 	break;
     default:
 	error(_("unimplemented complex operation"));
@@ -269,9 +225,9 @@ SEXP attribute_hidden complex_binary(ARITHOP_TYPE code, SEXP s1, SEXP s2)
     /* Copy attributes from longer argument. */
 
     if (ans != s2 && n == n2 && ATTRIB(s2) != R_NilValue)
-        copyMostAttrib(s2, ans);
+	copyMostAttrib(s2, ans);
     if (ans != s1 && n == n1 && ATTRIB(s1) != R_NilValue)
-        copyMostAttrib(s1, ans); /* Done 2nd so s1's attrs overwrite s2's */
+	copyMostAttrib(s1, ans); /* Done 2nd so s1's attrs overwrite s2's */
 
     return ans;
 }
@@ -331,7 +287,7 @@ SEXP attribute_hidden do_cmathfuns(SEXP call, SEXP op, SEXP args, SEXP env)
 	n = XLENGTH(x);
 	if(isReal(x)) PROTECT(x);
 	else PROTECT(x = coerceVector(x, REALSXP));
-        y = NO_REFERENCES(x) ? x : allocVector(REALSXP, n);
+	y = NO_REFERENCES(x) ? x : allocVector(REALSXP, n);
 
 	switch(PRIMVAL(op)) {
 	case 1:	/* Re */
@@ -363,10 +319,10 @@ SEXP attribute_hidden do_cmathfuns(SEXP call, SEXP op, SEXP args, SEXP env)
     else errorcall(call, _("non-numeric argument to function"));
 
     if (x != y && ATTRIB(x) != R_NilValue) {
-        PROTECT(x);
-        PROTECT(y);
-        DUPLICATE_ATTRIB(y, x);
-        UNPROTECT(2);
+	PROTECT(x);
+	PROTECT(y);
+	SHALLOW_DUPLICATE_ATTRIB(y, x);
+	UNPROTECT(2);
     }
     return y;
 }
@@ -482,9 +438,9 @@ static double complex casin(double complex z)
     t2 = 0.5 * hypot(x - 1, y);
     alpha = t1 + t2;
     ri = log(alpha + sqrt(alpha*alpha - 1));
-    /* This comes from 
+    /* This comes from
        'z_asin() is continuous from below if x >= 1
-        and continuous from above if x <= -1.'
+	and continuous from above if x <= -1.'
     */
     if(y < 0 || (y == 0 && x > 1)) ri *= -1;
     return asin(t1  - t2) + ri*I;
@@ -527,14 +483,6 @@ static double complex csinh(double complex z)
 }
 #endif
 
-#ifndef HAVE_CTANH
-#define ctanh R_ctanh
-static double complex ctanh(double complex z)
-{
-    return -I * ctan(z * I); /* A&S 4.5.9 */
-}
-#endif
-
 static double complex z_tan(double complex z)
 {
     double y = cimag(z);
@@ -551,6 +499,15 @@ static double complex z_tan(double complex z)
     return r;
 }
 
+#ifndef HAVE_CTANH
+#define ctanh R_ctanh
+static double complex ctanh(double complex z)
+{
+    return -I * z_tan(z * I); /* A&S 4.5.9 */
+}
+#endif
+
+
 /* Don't rely on the OS at the branch cuts */
 
 static double complex z_asin(double complex z)
@@ -623,7 +580,7 @@ SEXP attribute_hidden complex_math1(SEXP call, SEXP op, SEXP args, SEXP env)
     Rboolean naflag = FALSE;
 
     PROTECT(x = CAR(args));
-    n = xlength(x);
+    n = XLENGTH(x);
     PROTECT(y = allocVector(CPLXSXP, n));
 
     switch (PRIMVAL(op)) {
@@ -649,7 +606,7 @@ SEXP attribute_hidden complex_math1(SEXP call, SEXP op, SEXP args, SEXP env)
     }
     if (naflag)
 	warningcall(call, "NaNs produced in function \"%s\"", PRIMNAME(op));
-    DUPLICATE_ATTRIB(y, x);
+    SHALLOW_DUPLICATE_ATTRIB(y, x);
     UNPROTECT(2);
     return y;
 }
@@ -697,7 +654,7 @@ static void z_atan2(Rcomplex *r, Rcomplex *csn, Rcomplex *ccs)
 typedef void (*cm2_fun)(Rcomplex *, Rcomplex *, Rcomplex *);
 SEXP attribute_hidden complex_math2(SEXP call, SEXP op, SEXP args, SEXP env)
 {
-    R_xlen_t i, n, na, nb;
+    R_xlen_t i, n, na, nb, ia, ib;
     Rcomplex ai, bi, *a, *b, *y;
     SEXP sa, sb, sy;
     Rboolean naflag = FALSE;
@@ -715,18 +672,21 @@ SEXP attribute_hidden complex_math2(SEXP call, SEXP op, SEXP args, SEXP env)
     case 10004: /* signif */
 	f = z_prec; break;
     default:
-	errorcall_return(call, _("unimplemented complex function"));
+	error_return(_("unimplemented complex function"));
     }
 
     PROTECT(sa = coerceVector(CAR(args), CPLXSXP));
     PROTECT(sb = coerceVector(CADR(args), CPLXSXP));
     na = XLENGTH(sa); nb = XLENGTH(sb);
-    if ((na == 0) || (nb == 0)) return(allocVector(CPLXSXP, 0));
+    if ((na == 0) || (nb == 0)) {
+	UNPROTECT(2);
+	return(allocVector(CPLXSXP, 0));
+    }
     n = (na < nb) ? nb : na;
     PROTECT(sy = allocVector(CPLXSXP, n));
     a = COMPLEX(sa); b = COMPLEX(sb); y = COMPLEX(sy);
-    for (i = 0; i < n; i++) {
-	ai = a[i % na]; bi = b[i % nb];
+    MOD_ITERATE2(n, na, nb, i, ia, ib, {
+	ai = a[ia]; bi = b[ib];
 	if(ISNA(ai.r) && ISNA(ai.i) &&
 	   ISNA(bi.r) && ISNA(bi.i)) {
 	    y[i].r = NA_REAL; y[i].i = NA_REAL;
@@ -736,13 +696,13 @@ SEXP attribute_hidden complex_math2(SEXP call, SEXP op, SEXP args, SEXP env)
 		 !(ISNAN(ai.r) || ISNAN(ai.i) || ISNAN(bi.r) || ISNAN(bi.i)) )
 		naflag = TRUE;
 	}
-    }
+    });
     if (naflag)
-	warningcall(call, "NaNs produced in function \"%s\"", PRIMNAME(op));
+	warning("NaNs produced in function \"%s\"", PRIMNAME(op));
     if(n == na) {
-	DUPLICATE_ATTRIB(sy, sa);
+	SHALLOW_DUPLICATE_ATTRIB(sy, sa);
     } else if(n == nb) {
-	DUPLICATE_ATTRIB(sy, sb);
+	SHALLOW_DUPLICATE_ATTRIB(sy, sb);
     }
     UNPROTECT(3);
     return sy;
@@ -753,6 +713,8 @@ SEXP attribute_hidden do_complex(SEXP call, SEXP op, SEXP args, SEXP rho)
     /* complex(length, real, imaginary) */
     SEXP ans, re, im;
     R_xlen_t i, na, nr, ni;
+
+    checkArity(op, args);
     na = asInteger(CAR(args));
     if(na == NA_INTEGER || na < 0)
 	error(_("invalid length"));
@@ -965,7 +927,7 @@ static void R_cpolyroot(double *opr, double *opi, int *degree,
     pr = tmp; pi = tmp + nn; hr = tmp + 2*nn; hi = tmp + 3*nn;
     qpr = tmp + 4*nn; qpi = tmp + 5*nn; qhr = tmp + 6*nn; qhi = tmp + 7*nn;
     shr = tmp + 8*nn; shi = tmp + 9*nn;
-    
+
     /* make a copy of the coefficients and shr[] = | p[] | */
     for (i = 0; i < nn; i++) {
 	pr[i] = opr[i];
diff --git a/src/main/connections.c b/src/main/connections.c
index 90bb53b..09bc43c 100644
--- a/src/main/connections.c
+++ b/src/main/connections.c
@@ -1,6 +1,6 @@
 /*
  *  R : A Computer Language for Statistical Data Analysis
- *  Copyright (C) 2000-2014   The R Core Team.
+ *  Copyright (C) 2000-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
@@ -14,7 +14,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  */
 
 /* Notes on so-called 'Large File Support':
@@ -55,7 +55,7 @@
    Solaris has a similar scheme: see 'man lf64', 'man lfcompile' and
    'man lfcompile64'.
 
-   On Mac OS X, off_t is typedef-ed to __darwin_off_t, which is
+   On macOS, off_t is typedef-ed to __darwin_off_t, which is
    __int64_t, so the issue never arises.  Similarly on FreeBSD.
 
    The situation with Windows is similar, but off64_t, fseeko64 etc
@@ -86,9 +86,7 @@
 #undef ERROR			/* for compilation on Windows */
 
 #ifdef Win32
-int trio_vsnprintf(char *buffer, size_t bufferSize, const char *format,
-		   va_list args);
-# define vsnprintf trio_vsnprintf
+#include <trioremap.h>
 #endif
 
 int attribute_hidden R_OutputCon; /* used in printutils.c */
@@ -119,8 +117,7 @@ typedef long long int _lli_t;
 /* Win32 does have popen, but it does not work in GUI applications,
    so test that later */
 #ifdef Win32
-# include <R_ext/RStartup.h>
-  extern UImode  CharacterMode;
+# include <Startup.h>
 #endif
 
 #define NCONNECTIONS 128 /* snow needs one per slave node */
@@ -226,7 +223,7 @@ Rconnection getConnection_no_err(int n)
 
 }
 
-static void set_iconv_error(Rconnection con, char* from, char* to)
+static void NORET set_iconv_error(Rconnection con, char* from, char* to)
 {
     char buf[100];
     snprintf(buf, 100, _("unsupported conversion from '%s' to '%s'"), from, to);
@@ -252,7 +249,7 @@ void set_iconv(Rconnection con)
 	   Was Windows-only until 2.12.0, but we now require iconv.
 	 */
 	Rboolean useUTF8 = !utf8locale && con->UTF8out;
-	const char *enc = 
+	const char *enc =
 	    streql(con->encname, "UTF-8-BOM") ? "UTF-8" : con->encname;
 	tmp = Riconv_open(useUTF8 ? "UTF-8" : "", enc);
 	if(tmp != (void *)-1) con->inconv = tmp;
@@ -263,7 +260,7 @@ void set_iconv(Rconnection con)
 	con->navail = (short)(50-onb); con->inavail = 0;
 	/* libiconv can handle BOM marks on Windows Unicode files, but
 	   glibc's iconv cannot. Aargh ... */
-	if(streql(con->encname, "UCS-2LE") || 
+	if(streql(con->encname, "UCS-2LE") ||
 	   streql(con->encname, "UTF-16LE")) con->inavail = -2;
 	/* Discaard BOM */
 	if(streql(con->encname, "UTF-8-BOM")) con->inavail = -3;
@@ -283,10 +280,9 @@ void set_iconv(Rconnection con)
 
 /* ------------------- null connection functions --------------------- */
 
-static Rboolean null_open(Rconnection con)
+static Rboolean NORET null_open(Rconnection con)
 {
     error(_("%s not enabled for this connection"), "open");
-    return FALSE;		/* -Wall */
 }
 
 static void null_close(Rconnection con)
@@ -299,10 +295,9 @@ static void null_destroy(Rconnection con)
     if(con->private) free(con->private);
 }
 
-static int null_vfprintf(Rconnection con, const char *format, va_list ap)
+static int NORET null_vfprintf(Rconnection con, const char *format, va_list ap)
 {
     error(_("%s not enabled for this connection"), "printing");
-    return 0;			/* -Wall */
 }
 
 /* va_copy is C99, but a draft standard had __va_copy.  Glibc has
@@ -369,12 +364,12 @@ int dummy_vfprintf(Rconnection con, const char *format, va_list ap)
 	    }
 	    errno = 0;
 	    ires = Riconv(con->outconv, &ib, &inb, &ob, &onb);
-	    if(ires == (size_t)(-1) && errno == E2BIG) again = TRUE;
+	    again = (ires == (size_t)(-1) && errno == E2BIG);
 	    if(ires == (size_t)(-1) && errno != E2BIG)
 		/* is this safe? */
 		warning(_("invalid char string in output conversion"));
 	    *ob = '\0';
-	    con->write(outbuf, 1, strlen(outbuf), con);
+	    con->write(outbuf, 1, ob - outbuf, con);
 	} while(again && inb > 0);  /* it seems some iconv signal -1 on
 				       zero-length input */
     } else
@@ -451,19 +446,17 @@ int dummy_fgetc(Rconnection con)
 	return con->fgetc_internal(con);
 }
 
-static int null_fgetc(Rconnection con)
+static int NORET null_fgetc(Rconnection con)
 {
     error(_("%s not enabled for this connection"), "'getc'");
-    return 0;			/* -Wall */
 }
 
-static double null_seek(Rconnection con, double where, int origin, int rw)
+static double NORET null_seek(Rconnection con, double where, int origin, int rw)
 {
     error(_("%s not enabled for this connection"), "'seek'");
-    return 0.;			/* -Wall */
 }
 
-static void null_truncate(Rconnection con)
+static void NORET null_truncate(Rconnection con)
 {
     error(_("%s not enabled for this connection"), "truncation");
 }
@@ -473,18 +466,16 @@ static int null_fflush(Rconnection con)
     return 0;
 }
 
-static size_t null_read(void *ptr, size_t size, size_t nitems,
+static size_t NORET null_read(void *ptr, size_t size, size_t nitems,
 			Rconnection con)
 {
     error(_("%s not enabled for this connection"), "'read'");
-    return 0;			/* -Wall */
 }
 
-static size_t null_write(const void *ptr, size_t size, size_t nitems,
+static size_t NORET null_write(const void *ptr, size_t size, size_t nitems,
 			 Rconnection con)
 {
     error(_("%s not enabled for this connection"), "'write'");
-    return 0;			/* -Wall */
 }
 
 void init_con(Rconnection new, const char *description, int enc,
@@ -582,10 +573,10 @@ static Rboolean file_open(Rconnection con)
 	    }
 	} else
 #endif
-	    fp = R_fopen(name, con->mode);
+    fp = R_fopen(name, con->mode);
     } else {  /* use file("stdin") to refer to the file and not the console */
 #ifdef HAVE_FDOPEN
-	fp = fdopen(0, con->mode);
+        fp = fdopen(dup(0), con->mode);
 #else
 	warning(_("cannot open file '%s': %s"), name,
 		"fdopen is not supported on this platform");
@@ -607,7 +598,7 @@ static Rboolean file_open(Rconnection con)
 	unlink(name);
 #ifdef Win32
 	strncpy(this->name, name, PATH_MAX);
-        this->name[PATH_MAX - 1] = '\0';
+	this->name[PATH_MAX - 1] = '\0';
 #endif
 	free((char *) name); /* only free if allocated by R_tmpnam */
     }
@@ -642,7 +633,7 @@ static Rboolean file_open(Rconnection con)
 static void file_close(Rconnection con)
 {
     Rfileconn this = con->private;
-    if(con->isopen && strcmp(con->description, "stdin")) 
+    if(con->isopen) // && strcmp(con->description, "stdin"))
 	con->status = fclose(this->fp);
     con->isopen = FALSE;
 #ifdef Win32
@@ -791,12 +782,14 @@ static Rconnection newfile(const char *description, int enc, const char *mode,
     if(!new->class) {
 	free(new);
 	error(_("allocation of file connection failed"));
+	/* for Solaris 12.5 */ new = NULL;
     }
     strcpy(new->class, "file");
     new->description = (char *) malloc(strlen(description) + 1);
     if(!new->description) {
 	free(new->class); free(new);
 	error(_("allocation of file connection failed"));
+	/* for Solaris 12.5 */ new = NULL;
     }
     init_con(new, description, enc, mode);
     new->open = &file_open;
@@ -814,6 +807,7 @@ static Rconnection newfile(const char *description, int enc, const char *mode,
     if(!new->private) {
 	free(new->description); free(new->class); free(new);
 	error(_("allocation of file connection failed"));
+	/* for Solaris 12.5 */ new = NULL;
     }
     ((Rfileconn)(new->private))->raw = raw;
     return new;
@@ -965,8 +959,8 @@ static char* win_getlasterror_str(void)
     unsigned int err_msg_len;
     char *err_msg = NULL;
 
-    err_msg_len = 
-	FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER | 
+    err_msg_len =
+	FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER |
 		      FORMAT_MESSAGE_FROM_SYSTEM |
 		      FORMAT_MESSAGE_IGNORE_INSERTS, NULL, GetLastError(),
 		      MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT),
@@ -1028,9 +1022,9 @@ static Rboolean	fifo_open(Rconnection con)
 	win_namedpipe_secattr.lpSecurityDescriptor = NULL;
 	win_namedpipe_secattr.bInheritHandle = FALSE;
 
-	this->hdl_namedpipe = 
+	this->hdl_namedpipe =
 	    CreateNamedPipeA(hch_pipename,
-			     (con->canread ? PIPE_ACCESS_DUPLEX : 
+			     (con->canread ? PIPE_ACCESS_DUPLEX :
 			      PIPE_ACCESS_OUTBOUND) | FILE_FLAG_OVERLAPPED,
 			     PIPE_TYPE_BYTE, PIPE_UNLIMITED_INSTANCES , 0, 0,
 			     FILE_FLAG_NO_BUFFERING, &win_namedpipe_secattr);
@@ -1041,7 +1035,7 @@ static Rboolean	fifo_open(Rconnection con)
 	    */
 	    if (GetLastError() != 231) {
 		char *hch_err_msg = win_getlasterror_str();
-		warning(_("cannot create fifo '%s', reason '%s'"), 
+		warning(_("cannot create fifo '%s', reason '%s'"),
 			hch_pipename, hch_err_msg);
 		free(hch_err_msg);
 		boo_retvalue = FALSE;
@@ -1050,20 +1044,20 @@ static Rboolean	fifo_open(Rconnection con)
     }
 
     /* Open existing named pipe */
-    if ((boo_retvalue || GetLastError() == 231) && 
+    if ((boo_retvalue || GetLastError() == 231) &&
 	this->hdl_namedpipe <= (HANDLE)(LONG_PTR) 0) {
 	DWORD dwo_openmode = 0;
 	if (con->canread) dwo_openmode |= GENERIC_READ;
 	if (con->canwrite) dwo_openmode |= GENERIC_WRITE;
-	this->hdl_namedpipe = 
+	this->hdl_namedpipe =
 	    CreateFileA(hch_pipename, dwo_openmode,
 			FILE_SHARE_READ | FILE_SHARE_WRITE,
-			NULL, OPEN_EXISTING, 
+			NULL, OPEN_EXISTING,
 			FILE_ATTRIBUTE_NORMAL | FILE_FLAG_OVERLAPPED,
 			NULL);
 	if (this->hdl_namedpipe == INVALID_HANDLE_VALUE) {
 	    char *hch_err_msg = win_getlasterror_str();
-	    warning(_("cannot open fifo '%s', reason '%s'"), 
+	    warning(_("cannot open fifo '%s', reason '%s'"),
 		    hch_pipename, hch_err_msg);
 	    free(hch_err_msg);
 	    boo_retvalue = FALSE;
@@ -1105,7 +1099,7 @@ static size_t fifo_read(void* ptr, size_t size, size_t nitems, Rconnection con)
 
     wchar_t *buffer = (wchar_t*)malloc((size * sizeof(wchar_t)) * nitems);
     if (!buffer) error(_("allocation of fifo buffer failed"));
-    ReadFile(this->hdl_namedpipe, buffer, 
+    ReadFile(this->hdl_namedpipe, buffer,
 	     (size * sizeof(wchar_t)) * nitems, (LPDWORD)&read_byte,
 	     this->overlapped_write);
     wcstombs(ptr, buffer, read_byte / sizeof(wchar_t));
@@ -1113,7 +1107,7 @@ static size_t fifo_read(void* ptr, size_t size, size_t nitems, Rconnection con)
     return (read_byte / sizeof(wchar_t)) / size;
 }
 
-static size_t	
+static size_t
 fifo_write(const void *ptr, size_t size, size_t nitems, Rconnection con)
 {
     Rfifoconn this = con->private;
@@ -1132,7 +1126,7 @@ fifo_write(const void *ptr, size_t size, size_t nitems, Rconnection con)
     mbstowcs(buffer, (const char*) ptr, str_len);
 
     /* Write data */
-    if (WriteFile(this->hdl_namedpipe, buffer, 
+    if (WriteFile(this->hdl_namedpipe, buffer,
 		  size * sizeof(wchar_t) * nitems, (LPDWORD) &written_bytes,
 		  NULL) == FALSE && GetLastError() != ERROR_IO_PENDING) {
 	char *hch_err_msg = win_getlasterror_str();
@@ -1177,12 +1171,14 @@ static Rconnection newfifo(const char *description, const char *mode)
     if(!new->class) {
 	free(new);
 	error(_("allocation of fifo connection failed"));
+	/* for Solaris 12.5 */ new = NULL;
     }
     strcpy(new->class, "fifo");
     new->description = (char *) malloc(strlen(description) + 1);
     if(!new->description) {
 	free(new->class); free(new);
 	error(_("allocation of fifo connection failed"));
+	/* for Solaris 12.5 */ new = NULL;
     }
     init_con(new, description, CE_NATIVE, mode);
     new->open = &fifo_open;
@@ -1199,6 +1195,7 @@ static Rconnection newfifo(const char *description, const char *mode)
     if(!new->private) {
 	free(new->description); free(new->class); free(new);
 	error(_("allocation of fifo connection failed"));
+	/* for Solaris 12.5 */ new = NULL;
     }
     return new;
 }
@@ -1213,19 +1210,19 @@ SEXP attribute_hidden do_fifo(SEXP call, SEXP op, SEXP args, SEXP env)
 
     checkArity(op, args);
     sfile = CAR(args);
-    if(!isString(sfile) || length(sfile) != 1)
+    if(!isString(sfile) || LENGTH(sfile) != 1)
 	error(_("invalid '%s' argument"), "description");
     if(length(sfile) > 1)
 	warning(_("only first element of 'description' argument used"));
     file = translateChar(STRING_ELT(sfile, 0)); /* for now, like fopen */
     sopen = CADR(args);
-    if(!isString(sopen) || length(sopen) != 1)
+    if(!isString(sopen) || LENGTH(sopen) != 1)
 	error(_("invalid '%s' argument"), "open");
     block = asLogical(CADDR(args));
     if(block == NA_LOGICAL)
 	error(_("invalid '%s' argument"), "block");
     enc = CADDDR(args);
-    if(!isString(enc) || length(enc) != 1 ||
+    if(!isString(enc) || LENGTH(enc) != 1 ||
        strlen(CHAR(STRING_ELT(enc, 0))) > 100) /* ASCII */
 	error(_("invalid '%s' argument"), "encoding");
     open = CHAR(STRING_ELT(sopen, 0)); /* ASCII */
@@ -1333,12 +1330,14 @@ newpipe(const char *description, int ienc, const char *mode)
     if(!new->class) {
 	free(new);
 	error(_("allocation of pipe connection failed"));
+	/* for Solaris 12.5 */ new = NULL;
     }
     strcpy(new->class, "pipe");
     new->description = (char *) malloc(strlen(description) + 1);
     if(!new->description) {
 	free(new->class); free(new);
 	error(_("allocation of pipe connection failed"));
+	/* for Solaris 12.5 */ new = NULL;
     }
     init_con(new, description, ienc, mode);
     new->open = &pipe_open;
@@ -1353,6 +1352,7 @@ newpipe(const char *description, int ienc, const char *mode)
     if(!new->private) {
 	free(new->description); free(new->class); free(new);
 	error(_("allocation of pipe connection failed"));
+	/* for Solaris 12.5 */ new = NULL;
     }
     return new;
 }
@@ -1372,9 +1372,9 @@ SEXP attribute_hidden do_pipe(SEXP call, SEXP op, SEXP args, SEXP env)
 
     checkArity(op, args);
     scmd = CAR(args);
-    if(!isString(scmd) || length(scmd) != 1)
+    if(!isString(scmd) || LENGTH(scmd) != 1)
 	error(_("invalid '%s' argument"), "description");
-    if(length(scmd) > 1)
+    if(LENGTH(scmd) > 1)
 	warning(_("only first element of 'description' argument used"));
 #ifdef Win32
     if( !IS_ASCII(STRING_ELT(scmd, 0)) ) {
@@ -1388,11 +1388,11 @@ SEXP attribute_hidden do_pipe(SEXP call, SEXP op, SEXP args, SEXP env)
     file = translateChar(STRING_ELT(scmd, 0));
 #endif
     sopen = CADR(args);
-    if(!isString(sopen) || length(sopen) != 1)
+    if(!isString(sopen) || LENGTH(sopen) != 1)
 	error(_("invalid '%s' argument"), "open");
     open = CHAR(STRING_ELT(sopen, 0)); /* ASCII */
     enc = CADDR(args);
-    if(!isString(enc) || length(enc) != 1 ||
+    if(!isString(enc) || LENGTH(enc) != 1 ||
        strlen(CHAR(STRING_ELT(enc, 0))) > 100) /* ASCII */
 	error(_("invalid '%s' argument"), "encoding");
 
@@ -1554,12 +1554,14 @@ static Rconnection newgzfile(const char *description, const char *mode,
     if(!new->class) {
 	free(new);
 	error(_("allocation of gzfile connection failed"));
+	/* for Solaris 12.5 */ new = NULL;
     }
     strcpy(new->class, "gzfile");
     new->description = (char *) malloc(strlen(description) + 1);
     if(!new->description) {
 	free(new->class); free(new);
 	error(_("allocation of gzfile connection failed"));
+	/* for Solaris 12.5 */ new = NULL;
     }
     init_con(new, description, CE_NATIVE, mode);
 
@@ -1577,6 +1579,7 @@ static Rconnection newgzfile(const char *description, const char *mode,
     if(!new->private) {
 	free(new->description); free(new->class); free(new);
 	error(_("allocation of gzfile connection failed"));
+	/* for Solaris 12.5 */ new = NULL;
     }
     ((Rgzfileconn)new->private)->compress = compress;
     return new;
@@ -1681,7 +1684,7 @@ static size_t bzfile_read(void *ptr, size_t size, size_t nitems,
 		    memcpy(next_unused, unused, nUnused);
 		}
 		if (nUnused > 0 || !feof(bz->fp)) {
-		    BZ2_bzReadClose(&bzerror, bz->bfp);	
+		    BZ2_bzReadClose(&bzerror, bz->bfp);
 		    bz->bfp = BZ2_bzReadOpen(&bzerror, bz->fp, 0, 0, next_unused, nUnused);
 		    if(bzerror != BZ_OK)
 			warning(_("file '%s' has trailing content that appears not to be compressed by bzip2"),
@@ -1698,7 +1701,7 @@ static size_t bzfile_read(void *ptr, size_t size, size_t nitems,
 	nread += n;
 	nleft -= n;
     }
-    
+
     return nread / size;
 }
 
@@ -1735,12 +1738,14 @@ static Rconnection newbzfile(const char *description, const char *mode,
     if(!new->class) {
 	free(new);
 	error(_("allocation of bzfile connection failed"));
+	/* for Solaris 12.5 */ new = NULL;
     }
     strcpy(new->class, "bzfile");
     new->description = (char *) malloc(strlen(description) + 1);
     if(!new->description) {
 	free(new->class); free(new);
 	error(_("allocation of bzfile connection failed"));
+	/* for Solaris 12.5 */ new = NULL;
     }
     init_con(new, description, CE_NATIVE, mode);
 
@@ -1758,6 +1763,7 @@ static Rconnection newbzfile(const char *description, const char *mode,
     if(!new->private) {
 	free(new->description); free(new->class); free(new);
 	error(_("allocation of bzfile connection failed"));
+	/* for Solaris 12.5 */ new = NULL;
     }
     ((Rbzfileconn)new->private)->compress = compress;
     return new;
@@ -1952,12 +1958,14 @@ newxzfile(const char *description, const char *mode, int type, int compress)
     if(!new->class) {
 	free(new);
 	error(_("allocation of xzfile connection failed"));
+	/* for Solaris 12.5 */ new = NULL;
     }
     strcpy(new->class, "xzfile");
     new->description = (char *) malloc(strlen(description) + 1);
     if(!new->description) {
 	free(new->class); free(new);
 	error(_("allocation of xzfile connection failed"));
+	/* for Solaris 12.5 */ new = NULL;
     }
     init_con(new, description, CE_NATIVE, mode);
 
@@ -1976,6 +1984,7 @@ newxzfile(const char *description, const char *mode, int type, int compress)
     if(!new->private) {
 	free(new->description); free(new->class); free(new);
 	error(_("allocation of xzfile connection failed"));
+	/* for Solaris 12.5 */ new = NULL;
     }
     ((Rxzfileconn) new->private)->type = type;
     ((Rxzfileconn) new->private)->compress = compress;
@@ -1994,16 +2003,16 @@ SEXP attribute_hidden do_gzfile(SEXP call, SEXP op, SEXP args, SEXP env)
 
     checkArity(op, args);
     sfile = CAR(args);
-    if(!isString(sfile) || length(sfile) != 1)
+    if(!isString(sfile) || LENGTH(sfile) != 1)
 	error(_("invalid '%s' argument"), "description");
-    if(length(sfile) > 1)
+    if(LENGTH(sfile) > 1)
 	warning(_("only first element of 'description' argument used"));
     file = translateChar(STRING_ELT(sfile, 0));
     sopen = CADR(args);
-    if(!isString(sopen) || length(sopen) != 1)
+    if(!isString(sopen) || LENGTH(sopen) != 1)
 	error(_("invalid '%s' argument"), "open");
     enc = CADDR(args);
-    if(!isString(enc) || length(enc) != 1 ||
+    if(!isString(enc) || LENGTH(enc) != 1 ||
        strlen(CHAR(STRING_ELT(enc, 0))) > 100) /* ASCII */
 	error(_("invalid '%s' argument"), "encoding");
     if(type < 2) {
@@ -2315,12 +2324,14 @@ static Rconnection newclp(const char *url, const char *inmode)
     if(!new->class) {
 	free(new);
 	error(_("allocation of clipboard connection failed"));
+	/* for Solaris 12.5 */ new = NULL;
     }
     strcpy(new->class, description);
     new->description = (char *) malloc(strlen(description) + 1);
     if(!new->description) {
 	free(new->class); free(new);
 	error(_("allocation of clipboard connection failed"));
+	/* for Solaris 12.5 */ new = NULL;
     }
     init_con(new, description, CE_NATIVE, mode);
     new->open = &clp_open;
@@ -2338,6 +2349,7 @@ static Rconnection newclp(const char *url, const char *inmode)
     if(!new->private) {
 	free(new->description); free(new->class); free(new);
 	error(_("allocation of clipboard connection failed"));
+	/* for Solaris 12.5 */ new = NULL;
     }
     ((Rclpconn)new->private)->buff = NULL;
     if (strncmp(url, "clipboard-", 10) == 0) {
@@ -2411,12 +2423,14 @@ static Rconnection newterminal(const char *description, const char *mode)
     if(!new->class) {
 	free(new);
 	error(_("allocation of terminal connection failed"));
+	/* for Solaris 12.5 */ new = NULL;
     }
     strcpy(new->class, "terminal");
     new->description = (char *) malloc(strlen(description) + 1);
     if(!new->description) {
 	free(new->class); free(new);
 	error(_("allocation of terminal connection failed"));
+	/* for Solaris 12.5 */ new = NULL;
     }
     init_con(new, description, CE_NATIVE, mode);
     new->isopen = TRUE;
@@ -2617,12 +2631,14 @@ static Rconnection newraw(const char *description, SEXP raw, const char *mode)
     if(!new->class) {
 	free(new);
 	error(_("allocation of raw connection failed"));
+	/* for Solaris 12.5 */ new = NULL;
     }
     strcpy(new->class, "rawConnection");
     new->description = (char *) malloc(strlen(description) + 1);
     if(!new->description) {
 	free(new->class); free(new);
 	error(_("allocation of raw connection failed"));
+	/* for Solaris 12.5 */ new = NULL;
     }
     init_con(new, description, CE_NATIVE, mode);
     new->isopen = TRUE;
@@ -2649,6 +2665,7 @@ static Rconnection newraw(const char *description, SEXP raw, const char *mode)
     if(!new->private) {
 	free(new->description); free(new->class); free(new);
 	error(_("allocation of raw connection failed"));
+	/* for Solaris 12.5 */ new = NULL;
     }
     raw_init(new, raw);
     if(mode[0] == 'a') raw_seek(new, 0, 3, 0);
@@ -2664,12 +2681,12 @@ SEXP attribute_hidden do_rawconnection(SEXP call, SEXP op, SEXP args, SEXP env)
 
     checkArity(op, args);
     sfile = CAR(args);
-    if(!isString(sfile) || length(sfile) != 1)
+    if(!isString(sfile) || LENGTH(sfile) != 1)
 	error(_("invalid '%s' argument"), "description");
     desc = translateChar(STRING_ELT(sfile, 0));
     sraw = CADR(args);
     sopen = CADDR(args);
-    if(!isString(sopen) || length(sopen) != 1)
+    if(!isString(sopen) || LENGTH(sopen) != 1)
 	error(_("invalid '%s' argument"), "open");
     open = CHAR(STRING_ELT(sopen, 0)); /* ASCII */
     if(strchr(open, 't'))
@@ -2737,12 +2754,12 @@ static void text_init(Rconnection con, SEXP text, int type)
     const void *vmax = vmaxget();
 
     for(i = 0; i < nlines; i++)
-	dnc += 
+	dnc +=
 	    (double) strlen(type == 1 ? translateChar(STRING_ELT(text, i))
 			    : ((type == 3) ?translateCharUTF8(STRING_ELT(text, i))
 			       : CHAR(STRING_ELT(text, i))) ) + 1;
-    if (dnc >= SIZE_MAX) 
- 	error(_("too many characters for text connection"));
+    if (dnc >= SIZE_MAX)
+	error(_("too many characters for text connection"));
     else nchars = (size_t) dnc;
     this->data = (char *) malloc(nchars+1);
     if(!this->data) {
@@ -2809,12 +2826,14 @@ static Rconnection newtext(const char *description, SEXP text, int type)
     if(!new->class) {
 	free(new);
 	error(_("allocation of text connection failed"));
+	/* for Solaris 12.5 */ new = NULL;
     }
     strcpy(new->class, "textConnection");
     new->description = (char *) malloc(strlen(description) + 1);
     if(!new->description) {
 	free(new->class); free(new);
 	error(_("allocation of text connection failed"));
+	/* for Solaris 12.5 */ new = NULL;
     }
     init_con(new, description, CE_NATIVE, "r");
     new->isopen = TRUE;
@@ -2828,6 +2847,7 @@ static Rconnection newtext(const char *description, SEXP text, int type)
     if(!new->private) {
 	free(new->description); free(new->class); free(new);
 	error(_("allocation of text connection failed"));
+	/* for Solaris 12.5 */ new = NULL;
     }
     text_init(new, text, type);
     return new;
@@ -2995,7 +3015,9 @@ static void outtext_init(Rconnection con, SEXP stext, const char *mode, int idx)
 		SET_NAMED(val, 2);
 		UNPROTECT(1);
 	    }
+	    PROTECT(val);
 	    R_LockBinding(this->namesymbol, VECTOR_ELT(OutTextData, idx));
+	    UNPROTECT(1);
 	}
     }
     this->len = LENGTH(val);
@@ -3017,12 +3039,14 @@ static Rconnection newouttext(const char *description, SEXP stext,
     if(!new->class) {
 	free(new);
 	error(_("allocation of text connection failed"));
-    }
+ 	/* for Solaris 12.5 */ new = NULL;
+   }
     strcpy(new->class, "textConnection");
     new->description = (char *) malloc(strlen(description) + 1);
     if(!new->description) {
 	free(new->class); free(new);
 	error(_("allocation of text connection failed"));
+	/* for Solaris 12.5 */ new = NULL;
     }
     init_con(new, description, CE_NATIVE, mode);
     new->isopen = TRUE;
@@ -3036,12 +3060,14 @@ static Rconnection newouttext(const char *description, SEXP stext,
     if(!new->private) {
 	free(new->description); free(new->class); free(new);
 	error(_("allocation of text connection failed"));
+	/* for Solaris 12.5 */ new = NULL;
     }
     ((Routtextconn)new->private)->lastline = tmp = malloc(LAST_LINE_LEN);
     if(!tmp) {
 	free(new->private);
 	free(new->description); free(new->class); free(new);
 	error(_("allocation of text connection failed"));
+	/* for Solaris 12.5 */ new = NULL;
     }
     outtext_init(new, stext, mode, idx);
     return new;
@@ -3056,12 +3082,12 @@ SEXP attribute_hidden do_textconnection(SEXP call, SEXP op, SEXP args, SEXP env)
 
     checkArity(op, args);
     sfile = CAR(args);
-    if(!isString(sfile) || length(sfile) != 1)
+    if(!isString(sfile) || LENGTH(sfile) != 1)
 	error(_("invalid '%s' argument"), "description");
     desc = translateChar(STRING_ELT(sfile, 0));
     stext = CADR(args);
     sopen = CADDR(args);
-    if(!isString(sopen) || length(sopen) != 1)
+    if(!isString(sopen) || LENGTH(sopen) != 1)
 	error(_("invalid '%s' argument"), "open");
     open = CHAR(STRING_ELT(sopen, 0)); /* ASCII */
     venv = CADDDR(args);
@@ -3085,7 +3111,7 @@ SEXP attribute_hidden do_textconnection(SEXP call, SEXP op, SEXP args, SEXP env)
 	SET_VECTOR_ELT(OutTextData, ncon, venv);
 	if(stext == R_NilValue)
 	    con = Connections[ncon] = newouttext("NULL", stext, open, ncon);
-	else if(isString(stext) && length(stext) == 1)
+	else if(isString(stext) && LENGTH(stext) == 1)
 	    con = Connections[ncon] =
 		newouttext(translateChar(STRING_ELT(stext, 0)), stext,
 			   open, ncon);
@@ -3137,9 +3163,8 @@ SEXP attribute_hidden do_sockconn(SEXP call, SEXP op, SEXP args, SEXP env)
     Rconnection con = NULL;
 
     checkArity(op, args);
-#ifdef HAVE_SOCKETS
     scmd = CAR(args);
-    if(!isString(scmd) || length(scmd) != 1)
+    if(!isString(scmd) || LENGTH(scmd) != 1)
 	error(_("invalid '%s' argument"), "host");
     host = translateChar(STRING_ELT(scmd, 0));
     args = CDR(args);
@@ -3156,12 +3181,12 @@ SEXP attribute_hidden do_sockconn(SEXP call, SEXP op, SEXP args, SEXP env)
 	error(_("invalid '%s' argument"), "blocking");
     args = CDR(args);
     sopen = CAR(args);
-    if(!isString(sopen) || length(sopen) != 1)
+    if(!isString(sopen) || LENGTH(sopen) != 1)
 	error(_("invalid '%s' argument"), "open");
     open = CHAR(STRING_ELT(sopen, 0)); /* ASCII */
     args = CDR(args);
     enc = CAR(args);
-    if(!isString(enc) || length(enc) != 1 ||
+    if(!isString(enc) || LENGTH(enc) != 1 ||
        strlen(CHAR(STRING_ELT(enc, 0))) > 100) /* ASCII */
 	error(_("invalid '%s' argument"), "encoding");
     args = CDR(args);
@@ -3192,9 +3217,6 @@ SEXP attribute_hidden do_sockconn(SEXP call, SEXP op, SEXP args, SEXP env)
     setAttrib(ans, R_ConnIdSymbol, con->ex_ptr);
     R_RegisterCFinalizerEx(con->ex_ptr, conFinalizer, FALSE);
     UNPROTECT(3);
-#else
-    error(_("sockets are not available on this system"));
-#endif
     return ans;
 }
 
@@ -3210,16 +3232,16 @@ SEXP attribute_hidden do_unz(SEXP call, SEXP op, SEXP args, SEXP env)
 
     checkArity(op, args);
     sfile = CAR(args);
-    if(!isString(sfile) || length(sfile) != 1)
+    if(!isString(sfile) || LENGTH(sfile) != 1)
 	error(_("invalid '%s' argument"), "description");
     if(length(sfile) > 1)
 	warning(_("only first element of 'description' argument used"));
     file = translateChar(STRING_ELT(sfile, 0));
     sopen = CADR(args);
-    if(!isString(sopen) || length(sopen) != 1)
+    if(!isString(sopen) || LENGTH(sopen) != 1)
 	error(_("invalid '%s' argument"), "open");
     enc = CADDR(args);
-    if(!isString(enc) || length(enc) != 1 ||
+    if(!isString(enc) || LENGTH(enc) != 1 ||
        strlen(CHAR(STRING_ELT(enc, 0))) > 100) /* ASCII */
 	error(_("invalid '%s' argument"), "encoding");
     open = CHAR(STRING_ELT(sopen, 0)); /* ASCII */
@@ -3271,7 +3293,7 @@ SEXP attribute_hidden do_open(SEXP call, SEXP op, SEXP args, SEXP env)
 	return R_NilValue;
     }
     sopen = CADR(args);
-    if(!isString(sopen) || length(sopen) != 1)
+    if(!isString(sopen) || LENGTH(sopen) != 1)
 	error(_("invalid '%s' argument"), "open");
     block = asLogical(CADDR(args));
     if(block == NA_LOGICAL)
@@ -3378,6 +3400,8 @@ SEXP attribute_hidden do_close(SEXP call, SEXP op, SEXP args, SEXP env)
     if(i == R_ErrorCon)
 	error(_("cannot close 'message' sink connection"));
     Rconnection con = getConnection(i);
+    // close to get the status set for pipes (PR#16481)
+    if(con->isopen && streql(con->class, "pipe")) con->close(con);
     int status = con->status;
     con_close1(con);
     free(Connections[i]);
@@ -3577,7 +3601,7 @@ SEXP attribute_hidden do_readLines(SEXP call, SEXP op, SEXP args, SEXP env)
 	cntxt.cend = &con_cleanup;
 	cntxt.cenddata = con;
 	if(!con->canread) error(_("cannot read from this connection"));
-    } else { 
+    } else {
 	if(!con->canread) error(_("cannot read from this connection"));
 	/* for a non-blocking connection, more input may
 	   have become available, so re-position */
@@ -3635,7 +3659,8 @@ SEXP attribute_hidden do_readLines(SEXP call, SEXP op, SEXP args, SEXP env)
 no_more_lines:
     if(!wasopen) {endcontext(&cntxt); con->close(con);}
     if(nbuf > 0) { /* incomplete last line */
-	if(con->text && !con->blocking) {
+	if(con->text && !con->blocking &&
+	   (strcmp(con->class, "gzfile") != 0)) {
 	    /* push back the rest */
 	    con_pushback(con, 0, buf);
 	    con->incomplete = TRUE;
@@ -3708,7 +3733,7 @@ SEXP attribute_hidden do_writelines(SEXP call, SEXP op, SEXP args, SEXP env)
 	Rconnection con0;
 	do {
 	    con0 = getConnection(con_num);
-	    for(R_xlen_t i = 0; i < xlength(text); i++)
+	    for(R_xlen_t i = 0; i < XLENGTH(text); i++)
 		Rconn_printf(con0, "%s%s",
 			     useBytes ? CHAR(STRING_ELT(text, i)) :
 			     translateChar0(STRING_ELT(text, i)), ssep);
@@ -3716,7 +3741,7 @@ SEXP attribute_hidden do_writelines(SEXP call, SEXP op, SEXP args, SEXP env)
 	    con_num = getActiveSink(j++);
 	} while (con_num > 0);
     } else {
-	for(R_xlen_t i = 0; i < xlength(text); i++)
+	for(R_xlen_t i = 0; i < XLENGTH(text); i++)
 	    Rconn_printf(con, "%s%s",
 			 useBytes ? CHAR(STRING_ELT(text, i)) :
 			 translateChar0(STRING_ELT(text, i)), ssep);
@@ -3749,6 +3774,7 @@ static SEXP readOneString(Rconnection con)
     for(pos = 0; pos < 10000; pos++) {
 	p = buf + pos;
 	m = (int) con->read(p, sizeof(char), 1, con);
+	if (m < 0) error("error reading from the connection");
 	if(!m) {
 	    if(pos > 0)
 		warning(_("incomplete string at end of file has been discarded"));
@@ -3827,7 +3853,7 @@ SEXP attribute_hidden do_readbin(SEXP call, SEXP op, SEXP args, SEXP env)
 
     args = CDR(args);
     swhat = CAR(args); args = CDR(args);
-    if(!isString(swhat) || length(swhat) != 1)
+    if(!isString(swhat) || LENGTH(swhat) != 1)
 	error(_("invalid '%s' argument"), "what");
     what = CHAR(STRING_ELT(swhat, 0)); /* ASCII */
     n = asVecSize(CAR(args)); args = CDR(args);
@@ -3883,6 +3909,7 @@ SEXP attribute_hidden do_readbin(SEXP call, SEXP op, SEXP args, SEXP env)
 	    while(n0) {
 		size_t n1 = (n0 < BLOCK) ? n0 : BLOCK;
 		m0 = con->read(pp, size, n1, con);
+		if (m0 < 0) error("error reading from the connection");
 		m += m0;
 		if (m0 < n1) break;
 		n0 -= n1;
@@ -3963,8 +3990,9 @@ SEXP attribute_hidden do_readbin(SEXP call, SEXP op, SEXP args, SEXP env)
 	if(!signd && (mode != 1 || size > 2))
 	    warning(_("'signed = FALSE' is only valid for integers of sizes 1 and 2"));
 	if(size == sizedef) {
-	    if(isRaw) m = rawRead(p, size, n, bytes, nbytes, &np);
-	    else {
+	    if(isRaw) {
+		m = rawRead(p, size, n, bytes, nbytes, &np);
+	    } else {
 		/* Do this in blocks to avoid large buffers in the connection */
 		char *pp = p;
 		R_xlen_t m0, n0 = n;
@@ -3972,6 +4000,7 @@ SEXP attribute_hidden do_readbin(SEXP call, SEXP op, SEXP args, SEXP env)
 		while(n0) {
 		    size_t n1 = (n0 < BLOCK) ? n0 : BLOCK;
 		    m0 = con->read(pp, size, n1, con);
+		    if (m0 < 0) error("error reading from the connection");
 		    m += m0;
 		    if (m0 < n1) break;
 		    n0 -= n1;
@@ -3981,34 +4010,48 @@ SEXP attribute_hidden do_readbin(SEXP call, SEXP op, SEXP args, SEXP env)
 	    if(swap && size > 1)
 		for(i = 0; i < m; i++) swapb((char *)p+i*size, size);
 	} else {
-	    char buf[size];
 	    R_xlen_t s;
+	    union {
+		signed char sch;
+		unsigned char uch;
+		signed short ssh;
+		unsigned short ush;
+		long l;
+		long long ll;
+		float f;
+#if HAVE_LONG_DOUBLE
+		long double ld;
+#endif
+	    } u;
+	    if (size > sizeof u)
+		error(_("size %d is unknown on this machine"), size);
 	    if(mode == 1) { /* integer result */
 		for(i = 0, m = 0; i < n; i++) {
-		    s = isRaw ? rawRead(buf, size, 1, bytes, nbytes, &np)
-			: (int) con->read(buf, size, 1, con);
+		    s = isRaw ? rawRead((char*) &u, size, 1, bytes, nbytes, &np)
+			: (int) con->read((char*) &u, size, 1, con);
+		    if (s < 0) error("error reading from the connection");
 		    if(s) m++; else break;
-		    if(swap && size > 1) swapb(buf, size);
+		    if(swap && size > 1) swapb((char *) &u, size);
 		    switch(size) {
 		    case sizeof(signed char):
 			if(signd)
-			    INTEGER(ans)[i] = (int)*((signed char *)buf);
+			    INTEGER(ans)[i] = u.sch;
 			else
-			    INTEGER(ans)[i] = (int)*((unsigned char *)buf);
+			    INTEGER(ans)[i] = u.uch;
 			break;
 		    case sizeof(short):
 			if(signd)
-			    INTEGER(ans)[i] = (int)*((short *)buf);
+			    INTEGER(ans)[i] = u.ssh;
 			else
-			    INTEGER(ans)[i] = (int)*((unsigned short *)buf);
+			    INTEGER(ans)[i] = u.ush;
 			break;
 #if SIZEOF_LONG == 8
 		    case sizeof(long):
-			INTEGER(ans)[i] = (int)*((long *)buf);
+			INTEGER(ans)[i] = (int) u.l;
 			break;
 #elif SIZEOF_LONG_LONG == 8
 		    case sizeof(_lli_t):
-			INTEGER(ans)[i] = (int)*((_lli_t *)buf);
+			INTEGER(ans)[i] = (int) u.ll;
 			break;
 #endif
 		    default:
@@ -4017,33 +4060,30 @@ SEXP attribute_hidden do_readbin(SEXP call, SEXP op, SEXP args, SEXP env)
 		}
 	    } else if (mode == 2) { /* double result */
 		for(i = 0, m = 0; i < n; i++) {
-		    s = isRaw ? rawRead(buf, size, 1, bytes, nbytes, &np)
-			: (int) con->read(buf, size, 1, con);
+		    s = isRaw ? rawRead((char*) &u, size, 1, bytes, nbytes, &np)
+			: (int) con->read((char*) &u, size, 1, con);
+		    if (s < 0) error("error reading from the connection");
 		    if(s) m++; else break;
-		    if(swap && size > 1) swapb(buf, size);
+		    if(swap && size > 1) swapb((char *) &u, size);
 		    switch(size) {
 		    case sizeof(float):
-			REAL(ans)[i] = (double)*((float *)buf);
+			REAL(ans)[i] = u.f;
 			break;
 #if HAVE_LONG_DOUBLE && (SIZEOF_LONG_DOUBLE > SIZEOF_DOUBLE)
 		    case sizeof(long double):
-			REAL(ans)[i] = (double)*((long double *)buf);
+			REAL(ans)[i] = (double) u.ld;
 			break;
 #endif
 		    default:
-			error(
-				  _("size %d is unknown on this machine"),
-				  size);
+			error(_("size %d is unknown on this machine"), size);
 		    }
 		}
 	    }
 	}
     }
     if(!wasopen) {endcontext(&cntxt); con->close(con);}
-    if(m < n) {
-	PROTECT(ans = xlengthgets(ans, m));
-	UNPROTECT(1);
-    }
+    if(m < n)
+	ans = xlengthgets(ans, m);
     UNPROTECT(1);
     return ans;
 }
@@ -4498,7 +4538,7 @@ SEXP attribute_hidden do_writechar(SEXP call, SEXP op, SEXP args, SEXP env)
 	slen = 0;
     } else {
 	usesep = TRUE;
-	if (!isString(sep) || length(sep) != 1)
+	if (!isString(sep) || LENGTH(sep) != 1)
 	    error(_("invalid '%s' argument"), "sep");
 	if(useBytes)
 	    ssep = CHAR(STRING_ELT(sep, 0));
@@ -4638,8 +4678,8 @@ void con_pushback(Rconnection con, Rboolean newLine, char *line)
 {
     int nexists = con->nPushBack;
     char **q;
-    
-    if (nexists == INT_MAX) 
+
+    if (nexists == INT_MAX)
 	error(_("maximum number of pushback lines exceeded"));
     if(nexists > 0) {
 	q = (char **) realloc(con->PushBack, (nexists+1)*sizeof(char *));
@@ -4682,7 +4722,7 @@ SEXP attribute_hidden do_pushback(SEXP call, SEXP op, SEXP args, SEXP env)
     if(!con->text)
 	error(_("can only push back on text-mode connections"));
     nexists = con->nPushBack;
-    if((n = length(stext)) > 0) {
+    if((n = LENGTH(stext)) > 0) {
 	if(nexists > 0)
 	    q = (char **) realloc(con->PushBack, (n+nexists)*sizeof(char *));
 	else
@@ -4710,6 +4750,7 @@ SEXP attribute_hidden do_pushbacklength(SEXP call, SEXP op, SEXP args, SEXP env)
 {
     Rconnection con = NULL;
 
+    checkArity(op, args);
     con = getConnection(asInteger(CAR(args)));
     return ScalarInteger(con->nPushBack);
 }
@@ -4719,6 +4760,7 @@ SEXP attribute_hidden do_clearpushback(SEXP call, SEXP op, SEXP args, SEXP env)
     int j;
     Rconnection con = NULL;
 
+    checkArity(op, args);
     con = getConnection(asInteger(CAR(args)));
 
     if(con->nPushBack > 0) {
@@ -4840,8 +4882,6 @@ SEXP attribute_hidden do_sinknumber(SEXP call, SEXP op, SEXP args, SEXP rho)
 }
 
 #ifdef Win32
-#include <R_ext/RStartup.h>
-extern UImode CharacterMode;
 void WinCheckUTF8(void)
 {
     if(CharacterMode == RGui) WinUTF8out = (SinkCons[R_SinkNumber] == 1);
@@ -4895,7 +4935,7 @@ do_getconnection(SEXP call, SEXP op, SEXP args, SEXP env)
     what = asInteger(CAR(args));
     if (what == NA_INTEGER)
 	error(_("there is no connection NA"));
-    if (what < 0 || what >= NCONNECTIONS || !Connections[what]) 
+    if (what < 0 || what >= NCONNECTIONS || !Connections[what])
 	error(_("there is no connection %d"), what);
 
     con = Connections[what];
@@ -4948,31 +4988,35 @@ SEXP attribute_hidden do_sumconnection(SEXP call, SEXP op, SEXP args, SEXP env)
 # define USE_WININET 2
 #endif
 
+// in internet module: 'type' is unused
+extern Rconnection
+R_newCurlUrl(const char *description, const char * const mode, int type);
+
 
-/* op = 0: url(description, open, blocking, encoding)
-   op = 1: file(description, open, blocking, encoding)
+/* op = 0: .Internal( url(description, open, blocking, encoding, method))
+   op = 1: .Internal(file(description, open, blocking, encoding, method, raw))
 */
 SEXP attribute_hidden do_url(SEXP call, SEXP op, SEXP args, SEXP env)
 {
     SEXP scmd, sopen, ans, class, enc;
     char *class2 = "url";
     const char *url, *open;
-    int ncon, block, raw = 0;
+    int ncon, block, raw = 0, defmeth,
+	meth = 0, // 0: "default" | "internal" | "wininet", 1: "libcurl"
+	winmeth;  // 0: "internal", 1: "wininet" (Windows only)
     cetype_t ienc = CE_NATIVE;
     Rconnection con = NULL;
-#ifdef HAVE_INTERNET
-    UrlScheme type = HTTPsh;	/* -Wall */
-#endif
 
     checkArity(op, args);
+    // --------- description
     scmd = CAR(args);
-    if(!isString(scmd) || length(scmd) != 1)
+    if(!isString(scmd) || LENGTH(scmd) != 1)
 	error(_("invalid '%s' argument"), "description");
-    if(length(scmd) > 1)
+    if(LENGTH(scmd) > 1)
 	warning(_("only first element of 'description' argument used"));
-    url = CHAR(STRING_ELT(scmd, 0)); /* ASCII */
 #ifdef Win32
-    if(PRIMVAL(op) && !IS_ASCII(STRING_ELT(scmd, 0)) ) {
+    winmeth = 1;
+    if(PRIMVAL(op) == 1 && !IS_ASCII(STRING_ELT(scmd, 0)) ) { // file(<non-ASCII>, *)
 	ienc = CE_UTF8;
 	url = translateCharUTF8(STRING_ELT(scmd, 0));
     } else {
@@ -4983,31 +5027,89 @@ SEXP attribute_hidden do_url(SEXP call, SEXP op, SEXP args, SEXP env)
 	    url = translateChar(STRING_ELT(scmd, 0));
     }
 #else
-	url = translateChar(STRING_ELT(scmd, 0));
-#endif
-#ifdef HAVE_INTERNET
-    if (strncmp(url, "http://", 7) == 0) type = HTTPsh;
-    else if (strncmp(url, "ftp://", 6) == 0) type = FTPsh;
-    else if (strncmp(url, "https://", 8) == 0) type = HTTPSsh;
+    winmeth = 0;
+    url = translateChar(STRING_ELT(scmd, 0));
 #endif
 
+    UrlScheme type = HTTPsh;	/* -Wall */
+    Rboolean inet = TRUE;
+    if (strncmp(url, "http://", 7) == 0)
+	type = HTTPsh;
+    else if (strncmp(url, "ftp://", 6) == 0)
+	type = FTPsh;
+    else if (strncmp(url, "https://", 8) == 0)
+	type = HTTPSsh;
+    // ftps:// is available via most libcurl, only
+    // The internal and wininet methods will create a connection
+    // but refuse to open it so as from R 3.2.0 we switch to libcurl
+    else if (strncmp(url, "ftps://", 7) == 0)
+	type = FTPSsh;
+    else
+	inet = FALSE; // file:// URL or a file path
+
+    // --------- open
     sopen = CADR(args);
-    if(!isString(sopen) || length(sopen) != 1)
+    if(!isString(sopen) || LENGTH(sopen) != 1)
 	error(_("invalid '%s' argument"), "open");
     open = CHAR(STRING_ELT(sopen, 0)); /* ASCII */
+    // --------- blocking
     block = asLogical(CADDR(args));
     if(block == NA_LOGICAL)
-	error(_("invalid '%s' argument"), "block");
+	error(_("invalid '%s' argument"), "blocking");
+    // --------- encoding
     enc = CADDDR(args);
-    if(!isString(enc) || length(enc) != 1 ||
+    if(!isString(enc) || LENGTH(enc) != 1 ||
        strlen(CHAR(STRING_ELT(enc, 0))) > 100) /* ASCII */
 	error(_("invalid '%s' argument"), "encoding");
-    if(PRIMVAL(op)) {
-	raw = asLogical(CAD4R(args));
+
+    // --------- method
+    const char *cmeth = CHAR(asChar(CAD4R(args)));
+    meth = streql(cmeth, "libcurl"); // 1 if "libcurl", else 0
+    defmeth = streql(cmeth, "default");
+#ifndef Win32
+    if(defmeth) meth = 1;
+#endif
+    if (streql(cmeth, "wininet")) {
+#ifdef Win32
+	winmeth = 1;  // it already was as this is the default
+#else
+	error(_("method = \"wininet\" is only supported on Windows"));
+#endif
+    }
+#ifdef Win32
+    else if (streql(cmeth, "internal")) winmeth = 0;
+#endif
+
+    // --------- raw, for file() only
+    if(PRIMVAL(op) == 1) {
+	raw = asLogical(CAD4R(CDR(args)));
 	if(raw == NA_LOGICAL)
 	    error(_("invalid '%s' argument"), "raw");
     }
 
+    if(!meth) {
+	if (strncmp(url, "ftps://", 7) == 0) {
+#ifdef HAVE_LIBCURL
+	    if (defmeth) meth = 1; else
+#endif
+		error("ftps:// URLs are not supported by this method");
+	}
+#ifdef Win32
+	if (!winmeth && strncmp(url, "https://", 8) == 0) {
+# ifdef HAVE_LIBCURL
+	    if (defmeth) meth = 1; else
+# endif
+		error("https:// URLs are not supported by this method");
+	}
+#else // Unix
+	if (strncmp(url, "https://", 8) == 0) {
+	    // We check the libcurl build does support https as from R 3.3.0
+	    if (defmeth) meth = 1; else
+		error("https:// URLs are not supported by the \"internal\" method");
+	}
+#endif
+    }
+
     ncon = NextConnection();
     if(strncmp(url, "file://", 7) == 0) {
 	int nh = 7;
@@ -5018,15 +5120,19 @@ SEXP attribute_hidden do_url(SEXP call, SEXP op, SEXP args, SEXP env)
 #endif
 	con = newfile(url + nh, ienc, strlen(open) ? open : "r", raw);
 	class2 = "file";
-#ifdef HAVE_INTERNET
-    } else if (strncmp(url, "http://", 7) == 0 ||
-	       strncmp(url, "https://", 8) == 0 ||
-	       strncmp(url, "ftp://", 6) == 0) {
-       con = R_newurl(url, strlen(open) ? open : "r");
-       ((Rurlconn)con->private)->type = type;
-#endif
+    } else if (inet) {
+	if(meth) {
+# ifdef HAVE_LIBCURL
+	    con = R_newCurlUrl(url, strlen(open) ? open : "r", 0);
+# else
+	    error("url(method = \"libcurl\") is not supported on this platform");
+# endif
+	} else {
+	    con = R_newurl(url, strlen(open) ? open : "r", winmeth);
+	    ((Rurlconn)con->private)->type = type;
+	}
     } else {
-	if(PRIMVAL(op)) { /* call to file() */
+	if(PRIMVAL(op) == 1) { /* call to file() */
 	    if(strlen(url) == 0) {
 		if(!strlen(open)) open ="w+";
 		if(strcmp(open, "w+") != 0 && strcmp(open, "w+b") != 0) {
@@ -5084,8 +5190,8 @@ SEXP attribute_hidden do_url(SEXP call, SEXP op, SEXP args, SEXP env)
 		    con = newfile(url, ienc, strlen(open) ? open : "r", raw);
 	    }
 	    class2 = "file";
-	} else {
-	    error(_("unsupported URL scheme"));
+	} else { // url()
+	    error(_("URL scheme unsupported by this method"));
 	}
     }
 
@@ -5101,7 +5207,8 @@ SEXP attribute_hidden do_url(SEXP call, SEXP op, SEXP args, SEXP env)
 	con->canseek = 0;
     /* This is referenced in do_getconnection, so set up before
        any warning */
-    con->ex_ptr = PROTECT(R_MakeExternalPtr(con->id, install("connection"), R_NilValue));
+    con->ex_ptr = PROTECT(R_MakeExternalPtr(con->id, install("connection"),
+					    R_NilValue));
 
     /* open it if desired */
     if(strlen(open)) {
@@ -5140,6 +5247,11 @@ size_t R_ReadConnection(Rconnection con, void *buf, size_t n)
     return con->read(buf, 1, n, con);
 }
 
+Rconnection R_GetConnection(SEXP sConn) {
+    if (!inherits(sConn, "connection")) error(_("invalid connection"));
+    return getConnection(asInteger(sConn));
+}
+
 /* ------------------- (de)compression functions  --------------------- */
 
 /* Code for gzcon connections is modelled on gzio.c from zlib 1.2.3 */
@@ -5408,6 +5520,7 @@ SEXP attribute_hidden do_gzcon(SEXP call, SEXP op, SEXP args, SEXP rho)
     int icon, level, allow;
     Rconnection incon = NULL, new = NULL;
     char *m, *mode = NULL /* -Wall */,  description[1000];
+    Rboolean text;
 
     checkArity(op, args);
     if(!inherits(CAR(args), "connection"))
@@ -5419,6 +5532,9 @@ SEXP attribute_hidden do_gzcon(SEXP call, SEXP op, SEXP args, SEXP rho)
     allow = asLogical(CADDR(args));
     if(allow == NA_INTEGER)
 	error(_("'allowNonCompression' must be TRUE or FALSE"));
+    text = asLogical(CADDDR(args));
+    if(text == NA_INTEGER)
+        error(_("'text' must be TRUE or FALSE"));
 
     if(incon->isGzcon) {
 	warning(_("this is already a 'gzcon' connection"));
@@ -5441,16 +5557,18 @@ SEXP attribute_hidden do_gzcon(SEXP call, SEXP op, SEXP args, SEXP rho)
     if(!new->class) {
 	free(new);
 	error(_("allocation of 'gzcon' connection failed"));
-    }
+ 	/* for Solaris 12.5 */ new = NULL;
+   }
     strcpy(new->class, "gzcon");
     snprintf(description, 1000, "gzcon(%s)", incon->description);
     new->description = (char *) malloc(strlen(description) + 1);
     if(!new->description) {
 	free(new->class); free(new);
 	error(_("allocation of 'gzcon' connection failed"));
+	/* for Solaris 12.5 */ new = NULL;
     }
     init_con(new, description, CE_NATIVE, mode);
-    new->text = FALSE;
+    new->text = text;
     new->isGzcon = TRUE;
     new->open = &gzcon_open;
     new->close = &gzcon_close;
@@ -5462,6 +5580,7 @@ SEXP attribute_hidden do_gzcon(SEXP call, SEXP op, SEXP args, SEXP rho)
     if(!new->private) {
 	free(new->description); free(new->class); free(new);
 	error(_("allocation of 'gzcon' connection failed"));
+	/* for Solaris 12.5 */ new = NULL;
     }
     ((Rgzconn)(new->private))->con = incon;
     ((Rgzconn)(new->private))->cp = level;
@@ -5505,7 +5624,7 @@ static unsigned int uiSwap (unsigned int x)
 #define uiSwap(x) (x)
 #endif
 
-/* These are all hidden and used only in serialize.c, 
+/* These are all hidden and used only in serialize.c,
    so managing R_alloc stack is prudence. */
 attribute_hidden
 SEXP R_compress1(SEXP in)
@@ -5825,7 +5944,7 @@ do_memCompress(SEXP call, SEXP op, SEXP args, SEXP env)
     {
 	Bytef *buf;
 	/* could use outlen = compressBound(inlen) */
-	uLong inlen = LENGTH(from), 
+	uLong inlen = LENGTH(from),
 	    outlen = (uLong)(1.001*(double)inlen + 20);
 	buf = (Bytef *) R_alloc(outlen, sizeof(Bytef));
 	res = compress(buf, &outlen, (Bytef *)RAW(from), inlen);
@@ -5837,7 +5956,7 @@ do_memCompress(SEXP call, SEXP op, SEXP args, SEXP env)
     case 3: /* bzip */
     {
 	char *buf;
-	unsigned int inlen = LENGTH(from), 
+	unsigned int inlen = LENGTH(from),
 	    outlen = (unsigned int)(1.01*inlen + 600);
 	buf = R_alloc(outlen, sizeof(char));
 	res = BZ2_bzBuffToBuffCompress(buf, &outlen, (char *)RAW(from),
@@ -5966,19 +6085,19 @@ do_memDecompress(SEXP call, SEXP op, SEXP args, SEXP env)
 		ret = lzma_stream_decoder(&strm, 536870912, LZMA_CONCATENATED);
 	    if (ret != LZMA_OK)
 		error(_("cannot initialize lzma decoder, error %d"), ret);
-	    
+
 	    buf = (unsigned char *) R_alloc(outlen, sizeof(unsigned char));
 	    strm.avail_in = inlen;
 	    strm.avail_out = outlen;
 	    strm.next_in = (unsigned char *) RAW(from);
 	    strm.next_out = buf;
-	    
+
 	    ret = lzma_code(&strm, LZMA_FINISH);
 	    /* Did lzma_code() leave some input? */
 	    if (strm.avail_in > 0) {
 		/* Decompression failed, free lzma_stream. */
 		lzma_end(&strm);
-		/* Because it ran out of output buffer? 
+		/* Because it ran out of output buffer?
 		 *
 		 * This used to only check if LZMA_BUF_ERROR was
 		 * returned, but apparently XZ will also signal an out
@@ -6030,14 +6149,16 @@ SEXP R_new_custom_connection(const char *description, const char *mode, const ch
     if(!new) error(_("allocation of %s connection failed"), class_name);
     new->class = (char *) malloc(strlen(class_name) + 1);
     if(!new->class) {
-        free(new);
-        error(_("allocation of %s connection failed"), class_name);
+	free(new);
+	error(_("allocation of %s connection failed"), class_name);
+	/* for Solaris 12.5 */ new = NULL;
     }
     strcpy(new->class, class_name);
     new->description = (char *) malloc(strlen(description) + 1);
     if(!new->description) {
-        free(new->class); free(new);
+	free(new->class); free(new);
 	error(_("allocation of %s connection failed"), class_name);
+	/* for Solaris 12.5 */ new = NULL;
     }
     init_con(new, description, CE_NATIVE, mode);
     /* all ptrs are init'ed to null_* so no need to repeat that,
@@ -6059,9 +6180,8 @@ SEXP R_new_custom_connection(const char *description, const char *mode, const ch
     setAttrib(ans, R_ConnIdSymbol, new->ex_ptr);
     R_RegisterCFinalizerEx(new->ex_ptr, conFinalizer, FALSE);
     UNPROTECT(3);
-    
+
     if (ptr) ptr[0] = new;
 
     return ans;
 }
-
diff --git a/src/main/context.c b/src/main/context.c
index 2cb0269..9950032 100644
--- a/src/main/context.c
+++ b/src/main/context.c
@@ -1,7 +1,7 @@
 /*
  *  R : A Computer Language for Statistical Data Analysis
  *  Copyright (C) 1995, 1996  Robert Gentleman and Ross Ihaka
- *  Copyright (C) 1998-2012   The R Core Team.
+ *  Copyright (C) 1998-2014   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
@@ -15,7 +15,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  *
  *
  *  Contexts:
@@ -122,7 +122,7 @@ void attribute_hidden R_run_onexits(RCNTXT *cptr)
     RCNTXT *c;
 
     for (c = R_GlobalContext; c != cptr; c = c->nextcontext) {
-        // a user embedding R incorrectly triggered this (PR#15420)
+	// a user embedding R incorrectly triggered this (PR#15420)
 	if (c == NULL)
 	    error("bad target context--should NEVER happen if R was called correctly");
 	if (c->cend != NULL) {
@@ -134,6 +134,8 @@ void attribute_hidden R_run_onexits(RCNTXT *cptr)
 	}
 	if (c->cloenv != R_NilValue && c->conexit != R_NilValue) {
 	    SEXP s = c->conexit;
+	    RCNTXT* savecontext = R_ExitContext;
+	    R_ExitContext = c;
 	    c->conexit = R_NilValue; /* prevent recursion */
 	    R_HandlerStack = c->handlerstack;
 	    R_RestartStack = c->restartstack;
@@ -148,21 +150,25 @@ void attribute_hidden R_run_onexits(RCNTXT *cptr)
 	    R_CheckStack();
 	    eval(s, c->cloenv);
 	    UNPROTECT(1);
+	    R_ExitContext = savecontext;
 	}
+	if (R_ExitContext == c)
+	    R_ExitContext = NULL; /* Not necessary?  Better safe than sorry. */
     }
 }
 
 
 /* R_restore_globals - restore global variables from a target context
    before a LONGJMP.  The target context itself is not restored here
-   since this is done slightly differently in jumpfun below, in
-   errors.c:jump_now, and in main.c:ParseBrowser.  Eventually these
-   three should be unified so there is only one place where a LONGJMP
-   occurs. */
+   since this is done in R_jumpctxt below. */
 
-void attribute_hidden R_restore_globals(RCNTXT *cptr)
+static void R_restore_globals(RCNTXT *cptr)
 {
     R_PPStackTop = cptr->cstacktop;
+    R_GCEnabled = cptr->gcenabled;
+    R_BCIntActive = cptr->bcintactive;
+    R_BCpc = cptr->bcpc;
+    R_BCbody = cptr->bcbody;
     R_EvalDepth = cptr->evaldepth;
     vmaxset(cptr->vmax);
     R_interrupts_suspended = cptr->intsusp;
@@ -185,31 +191,49 @@ void attribute_hidden R_restore_globals(RCNTXT *cptr)
     R_Srcref = cptr->srcref;
 }
 
+static RCNTXT *first_jump_target(RCNTXT *cptr, int mask)
+{
+    RCNTXT *c;
+
+    for (c = R_GlobalContext; c && c != cptr; c = c->nextcontext) {
+	if (c->cloenv != R_NilValue && c->conexit != R_NilValue) {
+	    c->jumptarget = cptr;
+	    c->jumpmask = mask;
+	    return c;
+	}
+    }
+    return cptr;
+}
 
-/* jumpfun - jump to the named context */
+/* R_jumpctxt - jump to the named context */
 
-static void jumpfun(RCNTXT * cptr, int mask, SEXP val)
+void attribute_hidden NORET R_jumpctxt(RCNTXT * targetcptr, int mask, SEXP val)
 {
     Rboolean savevis = R_Visible;
+    RCNTXT *cptr;
+
+    /* find the target for the first jump -- either an intermediate
+       context with an on.exit action to run or the final target if
+       there are no intermediate on.exit actions */
+    cptr = first_jump_target(targetcptr, mask);
 
-    /* run onexit/cend code for all contexts down to but not including
-       the jump target */
-    PROTECT(val);
+    /* run cend code for all contexts down to but not including
+       the first jump target */
+    cptr->returnValue = val;/* in case the on.exit code wants to see it */
     R_run_onexits(cptr);
-    UNPROTECT(1);
     R_Visible = savevis;
 
     R_ReturnedValue = val;
-    R_GlobalContext = cptr; /* this used to be set to
-			       cptr->nextcontext for non-toplevel
-			       jumps (with the context set back at the
-			       SETJMP for restarts).  Changing this to
-			       always using cptr as the new global
-			       context should simplify some code and
-			       perhaps allow loops to be handled with
-			       fewer SETJMP's.  LT */
+    R_GlobalContext = cptr;
     R_restore_globals(R_GlobalContext);
 
+    /* if we are in the process of handling a C stack overflow we need
+       to restore the C stack limit before the jump */
+    if (R_OldCStackLimit != 0) {
+	R_CStackLimit = R_OldCStackLimit;
+	R_OldCStackLimit = 0;
+    }
+
     LONGJMP(cptr->cjmpbuf, mask);
 }
 
@@ -222,6 +246,10 @@ void begincontext(RCNTXT * cptr, int flags,
 		  SEXP promargs, SEXP callfun)
 {
     cptr->cstacktop = R_PPStackTop;
+    cptr->gcenabled = R_GCEnabled;
+    cptr->bcpc = R_BCpc;
+    cptr->bcbody = R_BCbody;
+    cptr->bcintactive = R_BCIntActive;
     cptr->evaldepth = R_EvalDepth;
     cptr->callflag = flags;
     cptr->call = syscall;
@@ -240,9 +268,12 @@ void begincontext(RCNTXT * cptr, int flags,
 #ifdef BC_INT_STACK
     cptr->intstack = R_BCIntStackTop;
 #endif
-    cptr->srcref = R_Srcref;    
+    cptr->srcref = R_Srcref;
     cptr->browserfinish = R_GlobalContext->browserfinish;
     cptr->nextcontext = R_GlobalContext;
+    cptr->returnValue = NULL;
+    cptr->jumptarget = NULL;
+    cptr->jumpmask = 0;
 
     R_GlobalContext = cptr;
 }
@@ -257,19 +288,28 @@ void endcontext(RCNTXT * cptr)
     if (cptr->cloenv != R_NilValue && cptr->conexit != R_NilValue ) {
 	SEXP s = cptr->conexit;
 	Rboolean savevis = R_Visible;
+	RCNTXT* savecontext = R_ExitContext;
+	R_ExitContext = cptr;
 	cptr->conexit = R_NilValue; /* prevent recursion */
 	PROTECT(s);
 	eval(s, cptr->cloenv);
 	UNPROTECT(1);
+	R_ExitContext = savecontext;
 	R_Visible = savevis;
     }
+    if (R_ExitContext == cptr)
+	R_ExitContext = NULL;
+    /* continue jumping if this was reached as an intermetiate jump */
+    if (cptr->jumptarget)
+	R_jumpctxt(cptr->jumptarget, cptr->jumpmask, cptr->returnValue);
+
     R_GlobalContext = cptr->nextcontext;
 }
 
 
 /* findcontext - find the correct context */
 
-void attribute_hidden findcontext(int mask, SEXP env, SEXP val)
+void attribute_hidden NORET findcontext(int mask, SEXP env, SEXP val)
 {
     RCNTXT *cptr;
     cptr = R_GlobalContext;
@@ -278,7 +318,7 @@ void attribute_hidden findcontext(int mask, SEXP env, SEXP val)
 	     cptr != NULL && cptr->callflag != CTXT_TOPLEVEL;
 	     cptr = cptr->nextcontext)
 	    if (cptr->callflag & CTXT_LOOP && cptr->cloenv == env )
-		jumpfun(cptr, mask, val);
+		R_jumpctxt(cptr, mask, val);
 	error(_("no loop for break/next, jumping to top level"));
     }
     else {				/* return; or browser */
@@ -286,19 +326,22 @@ void attribute_hidden findcontext(int mask, SEXP env, SEXP val)
 	     cptr != NULL && cptr->callflag != CTXT_TOPLEVEL;
 	     cptr = cptr->nextcontext)
 	    if ((cptr->callflag & mask) && cptr->cloenv == env)
-		jumpfun(cptr, mask, val);
+		R_jumpctxt(cptr, mask, val);
 	error(_("no function to return from, jumping to top level"));
     }
 }
 
-void attribute_hidden R_JumpToContext(RCNTXT *target, int mask, SEXP val)
+void attribute_hidden NORET R_JumpToContext(RCNTXT *target, int mask, SEXP val)
 {
     RCNTXT *cptr;
     for (cptr = R_GlobalContext;
 	 cptr != NULL && cptr->callflag != CTXT_TOPLEVEL;
-	 cptr = cptr->nextcontext)
+	 cptr = cptr->nextcontext) {
 	if (cptr == target)
-	    jumpfun(cptr, mask, val);
+	    R_jumpctxt(cptr, mask, val);
+	if (cptr == R_ExitContext)
+	    R_ExitContext = NULL;
+    }
     error(_("target context is not on the stack"));
 }
 
@@ -314,14 +357,15 @@ SEXP attribute_hidden R_sysframe(int n, RCNTXT *cptr)
     if (n == 0)
 	return(R_GlobalEnv);
 
+    if (n == NA_INTEGER) error(_("NA argument is invalid"));
+
     if (n > 0)
 	n = framedepth(cptr) - n;
     else
 	n = -n;
 
     if(n < 0)
-	errorcall(R_GlobalContext->call,
-		  _("not that many frames on the stack"));
+	error(_("not that many frames on the stack"));
 
     while (cptr->nextcontext != NULL) {
 	if (cptr->callflag & CTXT_FUNCTION ) {
@@ -336,8 +380,7 @@ SEXP attribute_hidden R_sysframe(int n, RCNTXT *cptr)
     if(n == 0 && cptr->nextcontext == NULL)
 	return R_GlobalEnv;
     else
-	errorcall(R_GlobalContext->call,
-		  _("not that many frames on the stack"));
+	error(_("not that many frames on the stack"));
     return R_NilValue;	   /* just for -Wall */
 }
 
@@ -392,40 +435,47 @@ int attribute_hidden framedepth(RCNTXT *cptr)
     return nframe;
 }
 
+static SEXP getCallWithSrcref(RCNTXT *cptr)
+{
+    SEXP result;
+
+    PROTECT(result = shallow_duplicate(cptr->call));
+    if (cptr->srcref && !isNull(cptr->srcref)) {
+	SEXP sref;
+	if (cptr->srcref == R_InBCInterpreter)
+	    /* FIXME: this is expensive, it might be worth changing sys.call */
+	    /* to return srcrefs only on request (add `with.source` option) */
+	    sref = R_findBCInterpreterSrcref(cptr);
+	else
+	    sref = cptr->srcref;
+	setAttrib(result, R_SrcrefSymbol, duplicate(sref));
+    }
+    UNPROTECT(1);
+    return result;
+}
+
 SEXP attribute_hidden R_syscall(int n, RCNTXT *cptr)
 {
     /* negative n counts back from the current frame */
     /* positive n counts up from the globalEnv */
-    SEXP result;
-    
     if (n > 0)
 	n = framedepth(cptr) - n;
     else
 	n = - n;
     if(n < 0)
-	errorcall(R_GlobalContext->call,
-		  _("not that many frames on the stack"));
+	error(_("not that many frames on the stack"));
     while (cptr->nextcontext != NULL) {
 	if (cptr->callflag & CTXT_FUNCTION ) {
-	    if (n == 0) {
-	    	PROTECT(result = shallow_duplicate(cptr->call));
-	    	if (cptr->srcref && !isNull(cptr->srcref))
-	    	    setAttrib(result, R_SrcrefSymbol, duplicate(cptr->srcref));
-	    	UNPROTECT(1);
-	    	return result;
-	    } else
+	    if (n == 0)
+		return getCallWithSrcref(cptr);
+	    else
 		n--;
 	}
 	cptr = cptr->nextcontext;
     }
-    if (n == 0 && cptr->nextcontext == NULL) {
-	PROTECT(result = shallow_duplicate(cptr->call));
-	if (cptr->srcref && !isNull(cptr->srcref))
-	    setAttrib(result, R_SrcrefSymbol, duplicate(cptr->srcref));
-	UNPROTECT(1);
-	return result;
-    }
-    errorcall(R_GlobalContext->call, _("not that many frames on the stack"));
+    if (n == 0 && cptr->nextcontext == NULL)
+	return getCallWithSrcref(cptr);
+    error(_("not that many frames on the stack"));
     return R_NilValue;	/* just for -Wall */
 }
 
@@ -436,8 +486,7 @@ SEXP attribute_hidden R_sysfunction(int n, RCNTXT *cptr)
     else
 	n = - n;
     if (n < 0)
-	errorcall(R_GlobalContext->call,
-		  _("not that many frames on the stack"));
+	error(_("not that many frames on the stack"));
     while (cptr->nextcontext != NULL) {
 	if (cptr->callflag & CTXT_FUNCTION ) {
 	    if (n == 0)
@@ -449,36 +498,10 @@ SEXP attribute_hidden R_sysfunction(int n, RCNTXT *cptr)
     }
     if (n == 0 && cptr->nextcontext == NULL)
 	return duplicate(cptr->callfun);  /***** do we need to DUP? */
-    errorcall(R_GlobalContext->call, _("not that many frames on the stack"));
+    error(_("not that many frames on the stack"));
     return R_NilValue;	/* just for -Wall */
 }
 
-/* some real insanity to keep Duncan sane */
-
-/* This should find the caller's environment (it's a .Internal) and
-   then get the context of the call that owns the environment.  As it
-   is, it will restart the wrong function if used in a promise.
-   L.T. */
-SEXP attribute_hidden do_restart(SEXP call, SEXP op, SEXP args, SEXP rho)
-{
-    RCNTXT *cptr;
-
-    checkArity(op, args);
-
-    if( !isLogical(CAR(args)) || LENGTH(CAR(args))!= 1 )
-	return(R_NilValue);
-    for(cptr = R_GlobalContext->nextcontext; cptr!= R_ToplevelContext;
-	    cptr = cptr->nextcontext) {
-	if (cptr->callflag & CTXT_FUNCTION) {
-	    SET_RESTART_BIT_ON(cptr->callflag);
-	    break;
-	}
-    }
-    if( cptr == R_ToplevelContext )
-	error(_("no function to restart"));
-    return(R_NilValue);
-}
-
 /* count how many contexts of the specified type are present on the stack */
 /* browser contexts are a bit special because they are transient and for  */
 /* any closure context with the debug bit set one will be created; so we  */
@@ -489,18 +512,18 @@ int countContexts(int ctxttype, int browser) {
 
     cptr = R_GlobalContext;
     while( cptr != R_ToplevelContext) {
-        if( cptr->callflag == ctxttype ) 
-            n++;
-        else if( browser ) {
-           if(cptr->callflag & CTXT_FUNCTION && RDEBUG(cptr->cloenv) )
-              n++;
-        }
-        cptr = cptr->nextcontext;
+	if( cptr->callflag == ctxttype )
+	    n++;
+	else if( browser ) {
+	   if(cptr->callflag & CTXT_FUNCTION && RDEBUG(cptr->cloenv) )
+	      n++;
+	}
+	cptr = cptr->nextcontext;
     }
     return n;
 }
-  
-   
+
+
 /* functions to support looking up information about the browser */
 /* contexts that are in the evaluation stack */
 
@@ -508,6 +531,7 @@ SEXP attribute_hidden do_sysbrowser(SEXP call, SEXP op, SEXP args, SEXP rho)
 {
     SEXP rval=R_NilValue;
     RCNTXT *cptr;
+    RCNTXT *prevcptr = NULL;
     int n;
 
     checkArity(op, args);
@@ -517,50 +541,58 @@ SEXP attribute_hidden do_sysbrowser(SEXP call, SEXP op, SEXP args, SEXP rho)
     /* first find the closest  browser context */
     cptr = R_GlobalContext;
     while (cptr != R_ToplevelContext) {
-        if (cptr->callflag == CTXT_BROWSER) {
-                break;
-        }
-        cptr = cptr->nextcontext;
+	if (cptr->callflag == CTXT_BROWSER) {
+		break;
+	}
+	cptr = cptr->nextcontext;
     }
     /* error if not a browser context */
 
     if( !(cptr->callflag == CTXT_BROWSER) )
-        error(_("no browser context to query"));
+	error(_("no browser context to query"));
 
     switch (PRIMVAL(op)) {
     case 1: /* text */
     case 2: /* condition */
-        /* first rewind to the right place if needed */
-        /* note we want n>1, as we have already      */
-        /* rewound to the first context              */
-        if( n > 1 ) {
-           while (cptr != R_ToplevelContext && n > 0 ) {
-               if (cptr->callflag == CTXT_BROWSER) {
-                   n--;
-                   break;
-               }
-               cptr = cptr->nextcontext;
-           }
-        }
-        if( !(cptr->callflag == CTXT_BROWSER) )
-           error(_("not that many calls to browser are active"));
-
-        if( PRIMVAL(op) == 1 )
-            rval = CAR(cptr->promargs);
-        else
-            rval = CADR(cptr->promargs);
-        break;
+	/* first rewind to the right place if needed */
+	/* note we want n>1, as we have already      */
+	/* rewound to the first context              */
+	if( n > 1 ) {
+	   while (cptr != R_ToplevelContext && n > 0 ) {
+	       if (cptr->callflag == CTXT_BROWSER) {
+		   n--;
+		   break;
+	       }
+	       cptr = cptr->nextcontext;
+	   }
+	}
+	if( !(cptr->callflag == CTXT_BROWSER) )
+	   error(_("not that many calls to browser are active"));
+
+	if( PRIMVAL(op) == 1 )
+	    rval = CAR(cptr->promargs);
+	else
+	    rval = CADR(cptr->promargs);
+	break;
     case 3: /* turn on debugging n levels up */
-        while ( (cptr != R_ToplevelContext) && n > 0 ) {
-            if (cptr->callflag & CTXT_FUNCTION) 
-                  n--;
-            cptr = cptr->nextcontext;
-        } 
-        if( !(cptr->callflag & CTXT_FUNCTION) )
-           error(_("not that many functions on the call stack"));
-        else
-           SET_RDEBUG(cptr->cloenv, 1);
-        break;
+	while ( (cptr != R_ToplevelContext) && n > 0 ) {
+	    if (cptr->callflag & CTXT_FUNCTION)
+		  n--;
+	    prevcptr = cptr;
+	    cptr = cptr->nextcontext;
+	}
+	if( !(cptr->callflag & CTXT_FUNCTION) )
+	    error(_("not that many functions on the call stack"));
+	if( prevcptr && prevcptr->srcref == R_InBCInterpreter ) {
+	    if ( TYPEOF(cptr->callfun) == CLOSXP &&
+		    TYPEOF(BODY(cptr->callfun)) == BCODESXP )
+		warning(_("debug flag in compiled function has no effect"));
+	    else
+		warning(_("debug will apply when function leaves "
+			  "compiled code"));
+	}
+	SET_RDEBUG(cptr->cloenv, 1);
+	break;
     }
     return(rval);
 }
diff --git a/src/main/contour-common.h b/src/main/contour-common.h
index b885bfc..9c3d510 100644
--- a/src/main/contour-common.h
+++ b/src/main/contour-common.h
@@ -15,7 +15,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  */
 
 
@@ -39,9 +39,9 @@ typedef struct SEG {
 
 static int ctr_intersect(double z0, double z1, double zc, double *f)
 {
-/*  Old test was  ((z0 - zc) * (z1 - zc) < 0.0), but rounding led to inconsistencies 
+/*  Old test was  ((z0 - zc) * (z1 - zc) < 0.0), but rounding led to inconsistencies
     in PR#15454 */
-    if ( (z0 < zc) != (z1 < zc) && z0 != zc && z1 != zc ) { 
+    if ( (z0 < zc) != (z1 < zc) && z0 != zc && z1 != zc ) {
 	*f = (zc - z0) / (z1 -	z0);
 	return 1;
     }
diff --git a/src/main/cum.c b/src/main/cum.c
index e3ab089..dbb3bc8 100644
--- a/src/main/cum.c
+++ b/src/main/cum.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--2012  The R Core Team
+ *  Copyright (C) 1997--2015  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
@@ -15,7 +15,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  */
 
 #ifdef HAVE_CONFIG_H
@@ -29,9 +29,8 @@ static SEXP cumsum(SEXP x, SEXP s)
 {
     LDOUBLE sum = 0.;
     double *rx = REAL(x), *rs = REAL(s);
-    for (R_xlen_t i = 0 ; i < xlength(x) ; i++) {
-	if (ISNAN(rx[i])) break;
-	sum += rx[i];
+    for (R_xlen_t i = 0 ; i < XLENGTH(x) ; i++) {
+	sum += rx[i]; /* NA and NaN propagated */
 	rs[i] = (double) sum;
     }
     return s;
@@ -42,7 +41,7 @@ static SEXP icumsum(SEXP x, SEXP s)
 {
     int *ix = INTEGER(x), *is = INTEGER(s);
     double sum = 0.0;
-    for (R_xlen_t i = 0 ; i < xlength(x) ; i++) {
+    for (R_xlen_t i = 0 ; i < XLENGTH(x) ; i++) {
 	if (ix[i] == NA_INTEGER) break;
 	sum += ix[i];
 	if(sum > INT_MAX || sum < 1 + INT_MIN) { /* INT_MIN is NA_INTEGER */
@@ -59,7 +58,7 @@ static SEXP ccumsum(SEXP x, SEXP s)
     Rcomplex sum;
     sum.r = 0;
     sum.i = 0;
-    for (R_xlen_t i = 0 ; i < xlength(x) ; i++) {
+    for (R_xlen_t i = 0 ; i < XLENGTH(x) ; i++) {
 	sum.r += COMPLEX(x)[i].r;
 	sum.i += COMPLEX(x)[i].i;
 	COMPLEX(s)[i].r = sum.r;
@@ -70,12 +69,11 @@ static SEXP ccumsum(SEXP x, SEXP s)
 
 static SEXP cumprod(SEXP x, SEXP s)
 {
-    int i;
     LDOUBLE prod;
     double *rx = REAL(x), *rs = REAL(s);
     prod = 1.0;
-    for (i = 0 ; i < length(x) ; i++) {
-	prod *= rx[i];
+    for (R_xlen_t i = 0 ; i < XLENGTH(x) ; i++) {
+	prod *= rx[i]; /* NA and NaN propagated */
 	rs[i] = (double) prod;
     }
     return s;
@@ -86,7 +84,7 @@ static SEXP ccumprod(SEXP x, SEXP s)
     Rcomplex prod, tmp;
     prod.r = 1;
     prod.i = 0;
-    for (R_xlen_t i = 0 ; i < xlength(x) ; i++) {
+    for (R_xlen_t i = 0 ; i < XLENGTH(x) ; i++) {
 	tmp.r = prod.r;
 	tmp.i = prod.i;
 	prod.r = COMPLEX(x)[i].r * tmp.r - COMPLEX(x)[i].i * tmp.i;
@@ -101,7 +99,7 @@ static SEXP cummax(SEXP x, SEXP s)
 {
     double max, *rx = REAL(x), *rs = REAL(s);
     max = R_NegInf;
-    for (R_xlen_t i = 0 ; i < xlength(x) ; i++) {
+    for (R_xlen_t i = 0 ; i < XLENGTH(x) ; i++) {
 	if(ISNAN(rx[i]) || ISNAN(max))
 	    max = max + rx[i];  /* propagate NA and NaN */
 	else
@@ -115,7 +113,7 @@ static SEXP cummin(SEXP x, SEXP s)
 {
     double min, *rx = REAL(x), *rs = REAL(s);
     min = R_PosInf; /* always positive, not NA */
-    for (R_xlen_t i = 0 ; i < xlength(x) ; i++ ) {
+    for (R_xlen_t i = 0 ; i < XLENGTH(x) ; i++ ) {
 	if (ISNAN(rx[i]) || ISNAN(min))
 	    min = min + rx[i];  /* propagate NA and NaN */
 	else
@@ -127,10 +125,12 @@ static SEXP cummin(SEXP x, SEXP s)
 
 static SEXP icummax(SEXP x, SEXP s)
 {
-    int *ix = INTEGER(x), *is = INTEGER(s);
-    int max = ix[0];
+    int *ix = INTEGER(x);
+    if(ix[0] == NA_INTEGER)
+	return s; // all NA
+    int *is = INTEGER(s), max = ix[0];
     is[0] = max;
-    for (R_xlen_t i = 1 ; i < xlength(x) ; i++) {
+    for (R_xlen_t i = 1 ; i < XLENGTH(x) ; i++) {
 	if(ix[i] == NA_INTEGER) break;
 	is[i] = max = (max > ix[i]) ? max : ix[i];
     }
@@ -142,7 +142,7 @@ static SEXP icummin(SEXP x, SEXP s)
     int *ix = INTEGER(x), *is = INTEGER(s);
     int min = ix[0];
     is[0] = min;
-    for (R_xlen_t i = 1 ; i < xlength(x) ; i++ ) {
+    for (R_xlen_t i = 1 ; i < XLENGTH(x) ; i++ ) {
 	if(ix[i] == NA_INTEGER) break;
 	is[i] = min = (min < ix[i]) ? min : ix[i];
     }
@@ -163,10 +163,7 @@ SEXP attribute_hidden do_cum(SEXP call, SEXP op, SEXP args, SEXP env)
 	setAttrib(s, R_NamesSymbol, getAttrib(t, R_NamesSymbol));
 	UNPROTECT(1);
 	if(n == 0) return s;
-	for (i = 0 ; i < n ; i++) {
-	    COMPLEX(s)[i].r = NA_REAL;
-	    COMPLEX(s)[i].i = NA_REAL;
-	}
+	/* no need to initialize s, ccum* set all elements */
 	switch (PRIMVAL(op) ) {
 	case 1:	/* cumsum */
 	    return ccumsum(t, s);
@@ -189,22 +186,27 @@ SEXP attribute_hidden do_cum(SEXP call, SEXP op, SEXP args, SEXP env)
 	n = XLENGTH(t);
 	PROTECT(s = allocVector(INTSXP, n));
 	setAttrib(s, R_NamesSymbol, getAttrib(t, R_NamesSymbol));
-	UNPROTECT(2);
-	if(n == 0) return s;
+	if(n == 0) {
+	    UNPROTECT(2); /* t, s */
+	    return s;
+	}
 	for(i = 0 ; i < n ; i++) INTEGER(s)[i] = NA_INTEGER;
 	switch (PRIMVAL(op) ) {
 	case 1:	/* cumsum */
-	    return icumsum(t,s);
+	    ans = icumsum(t,s);
 	    break;
 	case 3: /* cummax */
-	    return icummax(t,s);
+	    ans = icummax(t,s);
 	    break;
 	case 4: /* cummin */
-	    return icummin(t,s);
+	    ans = icummin(t,s);
 	    break;
 	default:
 	    errorcall(call, _("unknown cumxxx function"));
+	    ans = R_NilValue;
 	}
+	UNPROTECT(2); /* t, s */
+	return ans;
     } else {
 	PROTECT(t = coerceVector(CAR(args), REALSXP));
 	n = XLENGTH(t);
@@ -212,7 +214,7 @@ SEXP attribute_hidden do_cum(SEXP call, SEXP op, SEXP args, SEXP env)
 	setAttrib(s, R_NamesSymbol, getAttrib(t, R_NamesSymbol));
 	UNPROTECT(2);
 	if(n == 0) return s;
-	for(i = 0 ; i < n ; i++) REAL(s)[i] = NA_REAL;
+	/* no need to initialize s, cum* set all elements */
 	switch (PRIMVAL(op) ) {
 	case 1:	/* cumsum */
 	    return cumsum(t,s);
diff --git a/src/main/datetime.c b/src/main/datetime.c
index 61239a3..4593341 100644
--- a/src/main/datetime.c
+++ b/src/main/datetime.c
@@ -1,6 +1,6 @@
 /*
  *  R : A Computer Language for Statistical Data Analysis
- *  Copyright (C) 2000-2014  The R Core Team.
+ *  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
@@ -14,7 +14,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  *
  *
  *      Interfaces to POSIX date-time conversion functions.
@@ -39,16 +39,24 @@
 
 #include <Rmath.h> // Rexp10
 
-// some other header, e.g. math.h, might define it
-#if defined(__GLIBC__) && !defined(_BSD_SOURCE)
-// to get tm_zone, tm_gmtoff defined
-# define _BSD_SOURCE
+// to get tm_zone, tm_gmtoff defined in glibc.
+// some other header, e.g. math.h, might define the macro.
+#if defined HAVE_FEATURES_H
+# include <features.h>
+# ifdef __GNUC_PREREQ
+#  if __GNUC_PREREQ(2,20) && !defined(_DEFAULT_SOURCE_)
+#   define _DEFAULT_SOURCE 1
+#  endif
+# endif
+#endif
+#if defined(HAVE_GLIBC2) && !defined(_DEFAULT_SOURCE_) && !defined(_BSD_SOURCE)
+# define _BSD_SOURCE 1
 #endif
 #include <time.h>
 
 #include <errno.h>
 
-/* 
+/*
 
 There are two implementation paths here.
 
@@ -70,7 +78,7 @@ those limits where there is a 64-bit time_t and the conversions work
 there is code below to extrapolate from 1902-2037.
 
 Path 2) was added for R 3.1.0 and is the only one supported on
-Windows: it is the default on OS X.  The only currently (Jan 2014)
+Windows: it is the default on macOS.  The only currently (Jan 2014)
 known OS with 64-bit time_t and complete tables is Linux.
 
 */
@@ -85,15 +93,13 @@ known OS with 64-bit time_t and complete tables is Linux.
 # define HAVE_TM_GMTOFF 1
 # undef MKTIME_SETS_ERRNO
 # define MKTIME_SETS_ERRNO
+# undef HAVE_WORKING_64BIT_MKTIME
+# define HAVE_WORKING_64BIT_MKTIME 1
 #else
 
 typedef struct tm stm;
 #define R_tzname tzname
-# if defined(__CYGWIN__)
-extern __declspec(dllimport) char *tzname[2];
-# else
 extern char *tzname[2];
-# endif
 
 #endif
 
@@ -293,14 +299,12 @@ static Rboolean have_broken_mktime(void)
 }
 
 #ifndef HAVE_POSIX_LEAPSECONDS
-/* There have been 25 leapseconds: see .leap.seconds in R
- */
-static int n_leapseconds = 25;
-static const time_t leapseconds[] =
+static int n_leapseconds = 27; // 2017-01, sync with .leap.seconds in R (!)
+static const time_t leapseconds[] = // dput(unclass(.leap.seconds)) :
 {  78796800, 94694400,126230400,157766400,189302400,220924800,252460800,
   283996800,315532800,362793600,394329600,425865600,489024000,567993600,
   631152000,662688000,709948800,741484800,773020800,820454400,867715200,
-   915148800,1136073600,1230768000,1341100800};
+   915148800,1136073600,1230768000,1341100800,1435708800,1483228800};
 #endif
 
 static double guess_offset (stm *tm)
@@ -403,7 +407,7 @@ static double mktime0 (stm *tm, const int local)
     }
     if(!local) return mktime00(tm);
 
-/* OS X 10.9 gives -1 for dates prior to 1902, and ignores DST after 2037 */
+/* macOS 10.9 gives -1 for dates prior to 1902, and ignores DST after 2037 */
 #ifdef HAVE_WORKING_64BIT_MKTIME
     if(sizeof(time_t) == 8)
 	OK = !have_broken_mktime() || tm->tm_year >= 70;
@@ -436,7 +440,7 @@ static stm * localtime0(const double *tp, const int local, stm *ltm)
 	OK = !have_broken_mktime() || d > 0.;
     else
 #endif
-	OK = d < 2147483647.0 && 
+	OK = d < 2147483647.0 &&
 	    d > (have_broken_mktime() ? 0. : -2147483647.0);
     if(OK) {
 	t = (time_t) d;
@@ -453,7 +457,7 @@ static stm * localtime0(const double *tp, const int local, stm *ltm)
 	return local ? localtime(&t) : gmtime(&t);
 #endif
     }
-    
+
     /* internal substitute code.
        Like localtime, this returns a pointer to a static struct tm */
 
@@ -632,11 +636,11 @@ static void glibc_fix(stm *tm, int *invalid)
 
 
 static const char ltnames [][7] =
-{ "sec", "min", "hour", "mday", "mon", "year", "wday", "yday", "isdst", 
+{ "sec", "min", "hour", "mday", "mon", "year", "wday", "yday", "isdst",
   "zone",  "gmtoff"};
 
 
-static void 
+static void
 makelt(stm *tm, SEXP ans, R_xlen_t i, int valid, double frac_secs)
 {
     if(valid) {
@@ -658,7 +662,7 @@ makelt(stm *tm, SEXP ans, R_xlen_t i, int valid, double frac_secs)
 }
 
 
-             /* --------- R interfaces --------- */
+	     /* --------- R interfaces --------- */
 
 // We assume time zone names/abbreviations are ASCII, as all known ones are.
 
@@ -736,11 +740,11 @@ SEXP attribute_hidden do_asPOSIXlt(SEXP call, SEXP op, SEXP args, SEXP env)
 	if(!isgmt) {
 	    char *p = "";
 	    // or ptm->tm_zone
-	    if(valid && ptm->tm_isdst >= 0) 
+	    if(valid && ptm->tm_isdst >= 0)
 		p = R_tzname[ptm->tm_isdst];
 	    SET_STRING_ELT(VECTOR_ELT(ans, 9), i, mkChar(p));
 #ifdef HAVE_TM_GMTOFF
-	    INTEGER(VECTOR_ELT(ans, 10))[i] = 
+	    INTEGER(VECTOR_ELT(ans, 10))[i] =
 		valid ? (int)ptm->tm_gmtoff : NA_INTEGER;
 #endif
 	}
@@ -753,25 +757,25 @@ SEXP attribute_hidden do_asPOSIXlt(SEXP call, SEXP op, SEXP args, SEXP env)
     setAttrib(ans, install("tzone"), tzone);
     SEXP nm = getAttrib(x, R_NamesSymbol);
     if(nm != R_NilValue) setAttrib(VECTOR_ELT(ans, 5), R_NamesSymbol, nm);
-    UNPROTECT(6);
-
     if(settz) reset_tz(oldtz);
+    UNPROTECT(6);
     return ans;
 }
 
+// .Internal(as.POSIXct(x, tz)) -- called only from  as.POSIXct.POSIXlt()
 SEXP attribute_hidden do_asPOSIXct(SEXP call, SEXP op, SEXP args, SEXP env)
 {
     SEXP stz, x, ans;
     R_xlen_t n = 0, nlen[9];
     int isgmt = 0, settz = 0;
-    char oldtz[20] = "";
+    char oldtz[1001] = "";
     const char *tz = NULL;
     stm tm;
     double tmp;
 
     checkArity(op, args);
     PROTECT(x = duplicate(CAR(args))); /* coerced below */
-    if(!isVectorList(x) || LENGTH(x) < 9)
+    if(!isVectorList(x) || LENGTH(x) < 9) // must be 'POSIXlt'
 	error(_("invalid '%s' argument"), "x");
     if(!isString((stz = CADR(args))) || LENGTH(stz) != 1)
 	error(_("invalid '%s' value"), "tz");
@@ -801,9 +805,10 @@ SEXP attribute_hidden do_asPOSIXct(SEXP call, SEXP op, SEXP args, SEXP env)
     if(n > 0) {
 	for(int i = 0; i < 6; i++)
 	    if(nlen[i] == 0)
-		error(_("zero-length component in non-empty \"POSIXlt\" structure"));
+		error(_("zero-length component [[%d]] in non-empty \"POSIXlt\" structure"),
+		      i+1);
 	if(nlen[8] == 0)
-	    error(_("zero-length component in non-empty \"POSIXlt\" structure"));
+	    error(_("zero-length component [[%d]] in non-empty \"POSIXlt\" structure"), 9);
     }
     /* coerce fields to integer or real */
     SET_VECTOR_ELT(x, 0, coerceVector(VECTOR_ELT(x, 0), REALSXP));
@@ -823,7 +828,7 @@ SEXP attribute_hidden do_asPOSIXct(SEXP call, SEXP op, SEXP args, SEXP env)
 	tm.tm_mon   = INTEGER(VECTOR_ELT(x, 4))[i%nlen[4]];
 	tm.tm_year  = INTEGER(VECTOR_ELT(x, 5))[i%nlen[5]];
 	/* mktime ignores tm.tm_wday and tm.tm_yday */
-	tm.tm_isdst = isgmt ? 0:INTEGER(VECTOR_ELT(x, 8))[i%nlen[8]];
+	tm.tm_isdst = isgmt ? 0 : INTEGER(VECTOR_ELT(x, 8))[i%nlen[8]];
 	if(!R_FINITE(secs) || tm.tm_min == NA_INTEGER ||
 	   tm.tm_hour == NA_INTEGER || tm.tm_mday == NA_INTEGER ||
 	   tm.tm_mon == NA_INTEGER || tm.tm_year == NA_INTEGER)
@@ -852,24 +857,23 @@ SEXP attribute_hidden do_asPOSIXct(SEXP call, SEXP op, SEXP args, SEXP env)
 
 SEXP attribute_hidden do_formatPOSIXlt(SEXP call, SEXP op, SEXP args, SEXP env)
 {
-    SEXP x, sformat, ans, tz;
-    R_xlen_t n = 0, m, N, nlen[9];
-    int UseTZ, settz = 0;
+    int settz = 0;
     char buff[300];
-    char oldtz[20] = "";
+    char oldtz[1001] = "";
     stm tm;
 
     checkArity(op, args);
-    PROTECT(x = duplicate(CAR(args))); /* coerced below */
+    SEXP x = PROTECT(duplicate(CAR(args))); /* coerced below */
     if(!isVectorList(x) || LENGTH(x) < 9)
 	error(_("invalid '%s' argument"), "x");
+    SEXP sformat;
     if(!isString((sformat = CADR(args))) || XLENGTH(sformat) == 0)
 	error(_("invalid '%s' argument"), "format");
-    m = XLENGTH(sformat);
-    UseTZ = asLogical(CADDR(args));
+    R_xlen_t m = XLENGTH(sformat);
+    int UseTZ = asLogical(CADDR(args));
     if(UseTZ == NA_LOGICAL)
 	error(_("invalid '%s' argument"), "usetz");
-    tz = getAttrib(x, install("tzone"));
+    SEXP tz = getAttrib(x, install("tzone"));
 
     const char *tz1;
     if (!isNull(tz) && strlen(tz1 = CHAR(STRING_ELT(tz, 0)))) {
@@ -883,27 +887,37 @@ SEXP attribute_hidden do_formatPOSIXlt(SEXP call, SEXP op, SEXP args, SEXP env)
 	if(needTZ) settz = set_tz(tz1, oldtz);
     }
 
-    /* workaround for glibc/FreeBSD/MacOS X strftime: they have
+    /* workaround for glibc/FreeBSD/macOS strftime: they have
        non-POSIX/C99 time zone components
      */
     memset(&tm, 0, sizeof(tm));
 
-    /* coerce fields to integer or real, find length of longest one */
+    /* coerce fields, find length of longest one */
+    R_xlen_t n = 0, nlen[9];
     for(int i = 0; i < 9; i++) {
 	nlen[i] = XLENGTH(VECTOR_ELT(x, i));
 	if(nlen[i] > n) n = nlen[i];
+	// real for 'sec', the first; integer for the rest:
 	SET_VECTOR_ELT(x, i, coerceVector(VECTOR_ELT(x, i),
 					  i > 0 ? INTSXP : REALSXP));
     }
     if(n > 0) {
 	for(int i = 0; i < 9; i++)
 	    if(nlen[i] == 0)
-		error(_("zero-length component in non-empty \"POSIXlt\" structure"));
+		error(_("zero-length component [[%d]] in non-empty \"POSIXlt\" structure"),
+		      i+1);
     }
-    if(n > 0) N = (m > n) ? m:n; else N = 0;
-    PROTECT(ans = allocVector(STRSXP, N));
+    R_xlen_t N = (n > 0) ? ((m > n) ? m : n) : 0;
+    SEXP ans = PROTECT(allocVector(STRSXP, N));
     char tm_zone[20];
-    Rboolean have_zone = LENGTH(x) >= 10 && LENGTH(VECTOR_ELT(x, 9)) == n;
+#ifdef HAVE_TM_GMTOFF
+    Rboolean have_zone = LENGTH(x) >= 11 && XLENGTH(VECTOR_ELT(x, 9)) == n &&
+	XLENGTH(VECTOR_ELT(x, 10)) == n;
+#else
+    Rboolean have_zone = LENGTH(x) >= 10 && XLENGTH(VECTOR_ELT(x, 9)) == n;
+#endif
+    if(have_zone && !isString(VECTOR_ELT(x, 9)))
+	error(_("invalid component [[10]] in \"POSIXlt\" should be 'zone'"));
     for(R_xlen_t i = 0; i < N; i++) {
 	double secs = REAL(VECTOR_ELT(x, 0))[i%nlen[0]], fsecs = floor(secs);
 	// avoid (int) NAN
@@ -917,8 +931,8 @@ SEXP attribute_hidden do_formatPOSIXlt(SEXP call, SEXP op, SEXP args, SEXP env)
 	tm.tm_yday  = INTEGER(VECTOR_ELT(x, 7))[i%nlen[7]];
 	tm.tm_isdst = INTEGER(VECTOR_ELT(x, 8))[i%nlen[8]];
 	if(have_zone) {
-	    strncpy(tm_zone, CHAR(STRING_ELT(VECTOR_ELT(x, 9), i)), 20);
-            tm_zone[20 - 1] = '\0';
+	    strncpy(tm_zone, CHAR(STRING_ELT(VECTOR_ELT(x, 9), i%n)), 20);
+	    tm_zone[20 - 1] = '\0';
 #ifdef HAVE_TM_ZONE
 	    tm.tm_zone = tm_zone;
 #elif defined USE_INTERNAL_MKTIME
@@ -936,78 +950,82 @@ SEXP attribute_hidden do_formatPOSIXlt(SEXP call, SEXP op, SEXP args, SEXP env)
 	   tm.tm_hour == NA_INTEGER || tm.tm_mday == NA_INTEGER ||
 	   tm.tm_mon == NA_INTEGER || tm.tm_year == NA_INTEGER) {
 	    SET_STRING_ELT(ans, i, NA_STRING);
+	} else if(validate_tm(&tm) < 0) {
+	    SET_STRING_ELT(ans, i, NA_STRING);
 	} else {
-	    if(validate_tm(&tm) < 0) SET_STRING_ELT(ans, i, NA_STRING);
-	    else {
-		const char *q = translateChar(STRING_ELT(sformat, i%m));
-		int n = (int) strlen(q) + 50;
-		char buf2[n];
-		const char *p;
+	    const char *q = translateChar(STRING_ELT(sformat, i%m));
+	    int nn = (int) strlen(q) + 50;
+	    char buf2[nn];
+	    const char *p;
 #ifdef OLD_Win32
-		/* We want to override Windows' TZ names */
-		p = strstr(q, "%Z");
-		if (p) {
-		    memset(buf2, 0, n);
-		    strncpy(buf2, q, p - q);
-		    if(have_zone) 
-			strcat(buf2, tm_zone);
-		    else
-			strcat(buf2, tm.tm_isdst > 0 ? R_tzname[1] : R_tzname[0]);
-		    strcat(buf2, p+2);
-		} else
+	    /* We want to override Windows' TZ names */
+	    p = strstr(q, "%Z");
+	    if (p) {
+		memset(buf2, 0, nn);
+		strncpy(buf2, q, p - q);
+		if(have_zone)
+		    strcat(buf2, tm_zone);
+		else
+		    strcat(buf2, tm.tm_isdst > 0 ? R_tzname[1] : R_tzname[0]);
+		strcat(buf2, p+2);
+	    } else
 #endif
-		    strcpy(buf2, q);
-
-		p = strstr(q, "%OS");
-		if(p) {
-		    /* FIXME some of this should be outside the loop */
-		    int ns, nused = 4;
-		    char *p2 = strstr(buf2, "%OS");
-		    *p2 = '\0';
-		    ns = *(p+3) - '0';
-		    if(ns < 0 || ns > 9) { /* not a digit */
-			ns = asInteger(GetOption1(install("digits.secs")));
-			if(ns == NA_INTEGER) ns = 0;
-			nused = 3;
-		    }
-		    if(ns > 6) ns = 6;
-		    if(ns > 0) {
-			/* truncate to avoid nuisances such as PR#14579 */
-			double s = secs, t = Rexp10((double) ns);
-			s = ((int) (s*t))/t;
-			sprintf(p2, "%0*.*f", ns+3, ns, s);
-			strcat(buf2, p+nused);
-		    } else {
-			strcat(p2, "%S");
-			strcat(buf2, p+nused);
-		    }
+		strcpy(buf2, q);
+
+	    p = strstr(q, "%OS");
+	    if(p) {
+		/* FIXME some of this should be outside the loop */
+		int ns, nused = 4;
+		char *p2 = strstr(buf2, "%OS");
+		*p2 = '\0';
+		ns = *(p+3) - '0';
+		if(ns < 0 || ns > 9) { /* not a digit */
+		    ns = asInteger(GetOption1(install("digits.secs")));
+		    if(ns == NA_INTEGER) ns = 0;
+		    nused = 3;
 		}
+		if(ns > 6) ns = 6;
+		if(ns > 0) {
+		    /* truncate to avoid nuisances such as PR#14579 */
+		    double s = secs, t = Rexp10((double) ns);
+		    s = ((int) (s*t))/t;
+		    sprintf(p2, "%0*.*f", ns+3, ns, s);
+		    strcat(buf2, p+nused);
+		} else {
+		    strcat(p2, "%S");
+		    strcat(buf2, p+nused);
+		}
+	    }
+	    // The overflow behaviour is not determined by C99.
+	    // We assume truncation, and ensure termination.
 #ifdef USE_INTERNAL_MKTIME
-		R_strftime(buff, 256, buf2, &tm);
+	    R_strftime(buff, 256, buf2, &tm);
 #else
-		strftime(buff, 256, buf2, &tm);
+	    strftime(buff, 256, buf2, &tm);
 #endif
-		if(UseTZ) {
-		    if(LENGTH(x) >= 10) {
-			const char *p = CHAR(STRING_ELT(VECTOR_ELT(x, 9), i));
-			if(strlen(p)) {strcat(buff, " "); strcat(buff, p);}
-		    } else if(!isNull(tz)) {
-			int ii = 0;
-			if(LENGTH(tz) == 3) {
-			    if(tm.tm_isdst > 0) ii = 2;
-			    else if(tm.tm_isdst == 0) ii = 1;
-			    else ii = 0; /* Use base timezone name */
-			}
-			const char *p = CHAR(STRING_ELT(tz, ii));
-			if(strlen(p)) {strcat(buff, " "); strcat(buff, p);}
+	    buff[256] = '\0';
+	    // Now assume tzone abbreviated name is < 40 bytes,
+	    // but they are currently 3 or 4 bytes.
+	    if(UseTZ) {
+		if(have_zone) {
+		    const char *p = CHAR(STRING_ELT(VECTOR_ELT(x, 9), i%n));
+		    if(strlen(p)) {strcat(buff, " "); strcat(buff, p);}
+		} else if(!isNull(tz)) {
+		    int ii = 0;
+		    if(LENGTH(tz) == 3) {
+			if(tm.tm_isdst > 0) ii = 2;
+			else if(tm.tm_isdst == 0) ii = 1;
+			else ii = 0; /* Use base timezone name */
 		    }
+		    const char *p = CHAR(STRING_ELT(tz, ii));
+		    if(strlen(p)) {strcat(buff, " "); strcat(buff, p);}
 		}
-		SET_STRING_ELT(ans, i, mkChar(buff));
 	    }
+	    SET_STRING_ELT(ans, i, mkChar(buff));
 	}
     }
-    UNPROTECT(2);
     if(settz) reset_tz(oldtz);
+    UNPROTECT(2);
     return ans;
 }
 
@@ -1018,7 +1036,7 @@ SEXP attribute_hidden do_strptime(SEXP call, SEXP op, SEXP args, SEXP env)
     int invalid, isgmt = 0, settz = 0, offset;
     stm tm, tm2, *ptm = &tm;
     const char *tz = NULL;
-    char oldtz[20] = "";
+    char oldtz[1001] = "";
     double psecs = 0.0;
     R_xlen_t n, m, N;
 
@@ -1056,7 +1074,7 @@ SEXP attribute_hidden do_strptime(SEXP call, SEXP op, SEXP args, SEXP env)
 	SET_STRING_ELT(tzone, 0, mkChar(tz));
 	SET_STRING_ELT(tzone, 1, mkChar(R_tzname[0]));
 	SET_STRING_ELT(tzone, 2, mkChar(R_tzname[1]));
-	
+
     } else PROTECT(tzone); // for balance
 
     n = XLENGTH(x); m = XLENGTH(sformat);
@@ -1142,7 +1160,7 @@ SEXP attribute_hidden do_strptime(SEXP call, SEXP op, SEXP args, SEXP env)
 	    }
 	    SET_STRING_ELT(VECTOR_ELT(ans, 9), i, mkChar(p));
 #ifdef HAVE_TM_GMTOFF
-	    INTEGER(VECTOR_ELT(ans, 10))[i] = 
+	    INTEGER(VECTOR_ELT(ans, 10))[i] =
 		invalid ? NA_INTEGER : (int)tm.tm_gmtoff;
 #endif
 	}
@@ -1213,7 +1231,8 @@ SEXP attribute_hidden do_D2POSIXlt(SEXP call, SEXP op, SEXP args, SEXP env)
     SET_STRING_ELT(klass, 0, mkChar("POSIXlt"));
     SET_STRING_ELT(klass, 1, mkChar("POSIXt"));
     classgets(ans, klass);
-    setAttrib(ans, install("tzone"), mkString("UTC"));
+    SEXP s_tzone = install("tzone");
+    setAttrib(ans, s_tzone, mkString("UTC"));
     SEXP nm = getAttrib(x, R_NamesSymbol);
     if(nm != R_NilValue) setAttrib(VECTOR_ELT(ans, 5), R_NamesSymbol, nm);
     UNPROTECT(4);
@@ -1238,9 +1257,10 @@ SEXP attribute_hidden do_POSIXlt2D(SEXP call, SEXP op, SEXP args, SEXP env)
     if(n > 0) {
 	for(int i = 3; i < 6; i++)
 	    if(nlen[i] == 0)
-		error(_("zero-length component in non-empty \"POSIXlt\" structure"));
+		error(_("zero-length component [[%d]] in non-empty \"POSIXlt\" structure"),
+		      i+1);
 	if(nlen[8] == 0)
-	    error(_("zero-length component in non-empty \"POSIXlt\" structure"));
+	    error(_("zero-length component [[%d]] in non-empty \"POSIXlt\" structure"), 9);
     }
     /* coerce relevant fields to integer */
     for(int i = 3; i < 6; i++)
diff --git a/src/main/datetime.h b/src/main/datetime.h
index 7b09940..19498d2 100644
--- a/src/main/datetime.h
+++ b/src/main/datetime.h
@@ -1,6 +1,6 @@
 /*
  *  R : A Computer Language for Statistical Data Analysis
- *  Copyright (C) 2000-2013  The R Core Team.
+ *  Copyright (C) 2000-2014  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
@@ -14,7 +14,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  *
  */
 
diff --git a/src/main/dcf.c b/src/main/dcf.c
index 7cc3ec5..47bc291 100644
--- a/src/main/dcf.c
+++ b/src/main/dcf.c
@@ -1,6 +1,6 @@
 /*
  *  R : A Computer Language for Statistical Data Analysis
- *  Copyright (C) 2001-12   The R Core Team.
+ *  Copyright (C) 2001-2015   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
@@ -14,7 +14,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  */
 
 #ifdef HAVE_CONFIG_H
@@ -40,36 +40,35 @@ static void con_cleanup(void *data)
 static Rboolean field_is_foldable_p(const char *, SEXP);
 
 /* Use R_alloc as this might get interrupted */
-static char *Rconn_getline2(Rconnection con)
+static char *Rconn_getline2(Rconnection con, char *buf, int bufsize)
 {
-    int c, bufsize = MAXELTSIZE, nbuf = -1;
-    char *buf;
-
-    buf = R_alloc(bufsize, sizeof(char));
+    int c, nbuf = 0;
     while((c = Rconn_fgetc(con)) != R_EOF) {
-	if(nbuf+2 >= bufsize) { // allow for terminator below
+	if(nbuf+1 >= bufsize) { // allow for terminator below
 	    bufsize *= 2;
 	    char *buf2 = R_alloc(bufsize, sizeof(char));
 	    memcpy(buf2, buf, nbuf);
 	    buf = buf2;
 	}
 	if(c != '\n'){
-	    buf[++nbuf] = (char) c;
+	    buf[nbuf++] = (char) c;
 	} else {
-	    buf[++nbuf] = '\0';
+	    buf[nbuf++] = '\0';
 	    break;
 	}
     }
+    if (!nbuf)
+    	return NULL;
     /* Make sure it is null-terminated even if file did not end with
      *  newline.
      */
-    if(nbuf >= 0 && buf[nbuf]) buf[++nbuf] = '\0';
-    return (nbuf == -1) ? NULL: buf;
+    if(buf[nbuf-1]) buf[nbuf] = '\0';
+    return buf;
 }
 
 SEXP attribute_hidden do_readDCF(SEXP call, SEXP op, SEXP args, SEXP env)
 {
-    int nwhat, nret, nc, nr, m, k, lastm, need;
+    int nwhat, nret, nc, nr, m, k, lastm, need, i, n_eblanklines = 0;
     Rboolean blank_skip, field_skip = FALSE;
     int whatlen, dynwhat, buflen = 8096; // was 100, but that re-alloced often
     char *line, *buf;
@@ -116,7 +115,7 @@ SEXP attribute_hidden do_readDCF(SEXP call, SEXP op, SEXP args, SEXP env)
     PROTECT(retval = allocMatrixNA(STRSXP, LENGTH(what), nret));
 
     /* These used to use [:blank:] but that can match \xa0 as part of
-       a UTF-8 character (and is nbspace on Windows). */ 
+       a UTF-8 character (and is nbspace on Windows). */
     tre_regcomp(&blankline, "^[[:blank:]]*$", REG_NOSUB & REG_EXTENDED);
     tre_regcomp(&trailblank, "[ \t]+$", REG_EXTENDED);
     tre_regcomp(&contline, "^[[:blank:]]+", REG_EXTENDED);
@@ -127,7 +126,8 @@ SEXP attribute_hidden do_readDCF(SEXP call, SEXP op, SEXP args, SEXP env)
     lastm = -1; /* index of the field currently being recorded */
     blank_skip = TRUE;
     void *vmax = vmaxget();
-    while((line = Rconn_getline2(con))) {
+    char buf0[MAXELTSIZE];
+    while((line = Rconn_getline2(con, buf0, MAXELTSIZE))) {
 	if(strlen(line) == 0 ||
 	   tre_regexecb(&blankline, line, 0, 0, 0) == 0) {
 	    /* A blank line.  The first one after a record ends a new
@@ -145,6 +145,7 @@ SEXP attribute_hidden do_readDCF(SEXP call, SEXP op, SEXP args, SEXP env)
 		lastm = -1;
 		field_skip = FALSE;
 		field_fold = TRUE;
+		n_eblanklines = 0;
 	    }
 	} else {
 	    blank_skip = FALSE;
@@ -161,6 +162,10 @@ SEXP attribute_hidden do_readDCF(SEXP call, SEXP op, SEXP args, SEXP env)
 							lastm + nwhat * k))) + 2;
 		    if(tre_regexecb(&eblankline, line, 0, NULL, 0) == 0) {
 			is_eblankline = TRUE;
+			if(field_fold) {
+			    n_eblanklines++;
+			    continue;
+			}
 		    } else {
 			is_eblankline = FALSE;
 			if(field_fold) {
@@ -172,7 +177,7 @@ SEXP attribute_hidden do_readDCF(SEXP call, SEXP op, SEXP args, SEXP env)
 			} else {
 			    offset = 0;
 			}
-			need += (int) strlen(line + offset);
+			need += (int) strlen(line + offset) + n_eblanklines;
 		    }
 		    if(buflen < need) {
 			char *tmp = (char *) realloc(buf, need);
@@ -182,9 +187,18 @@ SEXP attribute_hidden do_readDCF(SEXP call, SEXP op, SEXP args, SEXP env)
 			} else buf = tmp;
 			buflen = need;
 		    }
-		    strcpy(buf,CHAR(STRING_ELT(retval, lastm + nwhat * k)));
-		    strcat(buf, "\n");
-		    if(!is_eblankline) strcat(buf, line + offset);
+		    strcpy(buf, CHAR(STRING_ELT(retval, lastm + nwhat * k)));
+		    if(strlen(buf) || !field_fold)
+			strcat(buf, "\n");
+		    if(!is_eblankline) {
+			if(n_eblanklines > 0) {
+			    for(i = 0; i < n_eblanklines; i++) {
+				strcat(buf, "\n");
+			    }
+			    n_eblanklines = 0;
+			}
+			strcat(buf, line + offset);
+		    }
 		    SET_STRING_ELT(retval, lastm + nwhat * k, mkChar(buf));
 		}
 	    } else {
diff --git a/src/main/debug.c b/src/main/debug.c
index 7c5a029..b0f60e2 100644
--- a/src/main/debug.c
+++ b/src/main/debug.c
@@ -1,7 +1,7 @@
 /*
  *  R : A Computer Langage for Statistical Data Analysis
  *  Copyright (C) 1995, 1996  Robert Gentleman and Ross Ihaka
- *  Copyright (C) 1998-2013   The R Core Team.
+ *  Copyright (C) 1998-2015   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
@@ -15,7 +15,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  */
 
 #ifdef HAVE_CONFIG_H
@@ -40,39 +40,39 @@ SEXP attribute_hidden do_debug(SEXP call, SEXP op, SEXP args, SEXP rho)
     }
     find_char_fun
 
-    if (TYPEOF(CAR(args)) != CLOSXP && TYPEOF(CAR(args)) != SPECIALSXP 
-         &&  TYPEOF(CAR(args)) != BUILTINSXP )
-	errorcall(call, _("argument must be a closure"));
+    if (TYPEOF(CAR(args)) != CLOSXP &&
+	TYPEOF(CAR(args)) != SPECIALSXP &&
+	TYPEOF(CAR(args)) != BUILTINSXP)
+	error(_("argument must be a function"));
     switch(PRIMVAL(op)) {
-    case 0:
+    case 0: // debug()
 	SET_RDEBUG(CAR(args), 1);
 	break;
-    case 1:
+    case 1: // undebug()
 	if( RDEBUG(CAR(args)) != 1 )
-	    warningcall(call, "argument is not being debugged");
+	    warning("argument is not being debugged");
 	SET_RDEBUG(CAR(args), 0);
 	break;
-    case 2:
-        ans = ScalarLogical(RDEBUG(CAR(args)));
-        break;
-    case 3:
-        SET_RSTEP(CAR(args), 1);
-        break;
+    case 2: // isdebugged()
+	ans = ScalarLogical(RDEBUG(CAR(args)));
+	break;
+    case 3: // debugonce()
+	SET_RSTEP(CAR(args), 1);
+	break;
     }
     return ans;
 }
 
-/* primitives .primTrace and .primUntrace */
+/* primitives .primTrace() and .primUntrace() */
 SEXP attribute_hidden do_trace(SEXP call, SEXP op, SEXP args, SEXP rho)
 {
     checkArity(op, args);
-    check1arg(args, call, "x");
 
     find_char_fun
 
     if (TYPEOF(CAR(args)) != CLOSXP &&
-	TYPEOF(CAR(args)) != BUILTINSXP &&
-	TYPEOF(CAR(args)) != SPECIALSXP)
+	TYPEOF(CAR(args)) != SPECIALSXP &&
+	TYPEOF(CAR(args)) != BUILTINSXP)
 	    errorcall(call, _("argument must be a function"));
 
     switch(PRIMVAL(op)) {
@@ -87,38 +87,45 @@ SEXP attribute_hidden do_trace(SEXP call, SEXP op, SEXP args, SEXP rho)
 }
 
 
-/* maintain global trace state */
+/* maintain global trace & debug state */
 
-static Rboolean tracing_state = TRUE;
+static Rboolean tracing_state = TRUE, debugging_state = TRUE;
 #define GET_TRACE_STATE tracing_state
+#define GET_DEBUG_STATE debugging_state
 #define SET_TRACE_STATE(value) tracing_state = value
+#define SET_DEBUG_STATE(value) debugging_state = value
 
 SEXP attribute_hidden do_traceOnOff(SEXP call, SEXP op, SEXP args, SEXP rho)
 {
     checkArity(op, args);
     SEXP onOff = CAR(args);
+    Rboolean trace = (PRIMVAL(op) == 0),
+	prev = trace ? GET_TRACE_STATE : GET_DEBUG_STATE;
 
-    Rboolean prev = GET_TRACE_STATE;
     if(length(onOff) > 0) {
 	Rboolean _new = asLogical(onOff);
 	if(_new == TRUE || _new == FALSE)
-	    SET_TRACE_STATE(_new);
+	    if(trace) SET_TRACE_STATE(_new);
+	    else      SET_DEBUG_STATE(_new);
 	else
-	    error("Value for tracingState must be TRUE or FALSE");
+	    error(_("Value for '%s' must be TRUE or FALSE"),
+		  trace ? "tracingState" : "debuggingState");
     }
     return ScalarLogical(prev);
 }
 
-Rboolean attribute_hidden
-R_current_trace_state() { return GET_TRACE_STATE; }
+// GUIs, packages, etc can query:
+Rboolean R_current_debug_state() { return GET_DEBUG_STATE; }
+Rboolean R_current_trace_state() { return GET_TRACE_STATE; }
 
 
 /* memory tracing */
 /* report when a traced object is duplicated */
 
+#ifdef R_MEMORY_PROFILING
+
 SEXP attribute_hidden do_tracemem(SEXP call, SEXP op, SEXP args, SEXP rho)
 {
-#ifdef R_MEMORY_PROFILING
     SEXP object;
     char buffer[21];
 
@@ -144,16 +151,10 @@ SEXP attribute_hidden do_tracemem(SEXP call, SEXP op, SEXP args, SEXP rho)
     SET_RTRACE(object, 1);
     snprintf(buffer, 21, "<%p>", (void *) object);
     return mkString(buffer);
-#else
-    errorcall(call, _("R was not compiled with support for memory profiling"));
-    return R_NilValue;
-#endif
 }
 
-
 SEXP attribute_hidden do_untracemem(SEXP call, SEXP op, SEXP args, SEXP rho)
 {
-#ifdef R_MEMORY_PROFILING
     SEXP object;
 
     checkArity(op, args);
@@ -167,12 +168,26 @@ SEXP attribute_hidden do_untracemem(SEXP call, SEXP op, SEXP args, SEXP rho)
 
     if (RTRACE(object))
 	SET_RTRACE(object, 0);
+    return R_NilValue;
+}
+
 #else
+
+SEXP attribute_hidden NORET do_tracemem(SEXP call, SEXP op, SEXP args, SEXP rho)
+{
+    checkArity(op, args);
+    check1arg(args, call, "x");
     errorcall(call, _("R was not compiled with support for memory profiling"));
-#endif
-    return R_NilValue;
 }
 
+SEXP attribute_hidden NORET do_untracemem(SEXP call, SEXP op, SEXP args, SEXP rho)
+{
+    checkArity(op, args);
+    check1arg(args, call, "x");
+    errorcall(call, _("R was not compiled with support for memory profiling"));
+}
+
+#endif /* R_MEMORY_PROFILING */
 
 #ifndef R_MEMORY_PROFILING
 void memtrace_report(void* old, void *_new) {
@@ -207,24 +222,26 @@ void memtrace_report(void * old, void * _new)
 SEXP attribute_hidden do_retracemem(SEXP call, SEXP op, SEXP args, SEXP rho)
 {
 #ifdef R_MEMORY_PROFILING
-    SEXP object, previous, ans, ap, argList;
+    SEXP object, previous, ans, argList;
     char buffer[21];
+    static SEXP do_retracemem_formals = NULL;
+
+    if (do_retracemem_formals == NULL)
+	do_retracemem_formals = allocFormalsList2(install("x"),
+						  R_PreviousSymbol);
 
-    PROTECT(ap = list2(R_NilValue, R_NilValue));
-    SET_TAG(ap,  install("x"));
-    SET_TAG(CDR(ap), install("previous"));
-    PROTECT(argList =  matchArgs(ap, args, call));
+    PROTECT(argList =  matchArgs(do_retracemem_formals, args, call));
     if(CAR(argList) == R_MissingArg) SETCAR(argList, R_NilValue);
     if(CADR(argList) == R_MissingArg) SETCAR(CDR(argList), R_NilValue);
 
-    object = CAR(ap);
+    object = CAR(argList);
     if (TYPEOF(object) == CLOSXP ||
 	TYPEOF(object) == BUILTINSXP ||
 	TYPEOF(object) == SPECIALSXP)
 	errorcall(call, _("argument must not be a function"));
 
-    previous = CADR(ap);
-    if(!isNull(previous) && !isString(previous))
+    previous = CADR(argList);
+    if(!isNull(previous) && (!isString(previous) || LENGTH(previous) != 1))
 	    errorcall(call, _("invalid '%s' argument"), "previous");
 
     if (RTRACE(object)) {
@@ -245,7 +262,7 @@ SEXP attribute_hidden do_retracemem(SEXP call, SEXP op, SEXP args, SEXP rho)
 	    memtrace_stack_dump();
 	}
     }
-    UNPROTECT(2);
+    UNPROTECT(1);
     return ans;
 #else
     R_Visible = 0; /* for consistency with other case */
diff --git a/src/main/deparse.c b/src/main/deparse.c
index f8f6d71..a5a95dd 100644
--- a/src/main/deparse.c
+++ b/src/main/deparse.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--2014  The R Core Team
+ *  Copyright (C) 1997--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
@@ -15,7 +15,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  *
  *
  *  IMPLEMENTATION NOTES:
@@ -30,7 +30,7 @@
  *  INDENTATION:
  *
  *  Indentation is carried out in the routine printtab2buff at the
- *  botton of this file.  It seems like this should be settable via
+ *  bottom of this file.  It seems like this should be settable via
  *  options.
  *
  *
@@ -95,6 +95,9 @@
 #include <float.h> /* for DBL_DIG */
 #include <Print.h>
 #include <Fileio.h>
+#ifdef Win32
+#include <trioremap.h>
+#endif
 
 #define BUFSIZE 512
 
@@ -126,6 +129,7 @@ typedef struct {
     int maxlines;
     Rboolean active;
     int isS4;
+    Rboolean fnarg; /* fn argument, so parenthesize = as assignment */
 } LocalParseData;
 
 static SEXP deparse1WithCutoff(SEXP call, Rboolean abbrev, int cutoff,
@@ -178,8 +182,15 @@ SEXP attribute_hidden do_deparse(SEXP call, SEXP op, SEXP args, SEXP rho)
 SEXP deparse1(SEXP call, Rboolean abbrev, int opts)
 {
     Rboolean backtick = TRUE;
-    return deparse1WithCutoff(call, abbrev, DEFAULT_Cutoff, backtick,
-			      opts, -1);
+    int old_bl = R_BrowseLines,
+        blines = asInteger(GetOption1(install("deparse.max.lines")));
+    SEXP result = R_NilValue;
+    if (blines != NA_INTEGER && blines > 0)
+        R_BrowseLines = blines;
+    result = deparse1WithCutoff(call, abbrev, DEFAULT_Cutoff, backtick,
+                                opts, 0);
+    R_BrowseLines = old_bl;
+    return result;
 }
 
 /* used for language objects in print() */
@@ -206,7 +217,7 @@ static SEXP deparse1WithCutoff(SEXP call, Rboolean abbrev, int cutoff,
 	    {0, 0, 0, 0, /*startline = */TRUE, 0,
 	     NULL,
 	     /*DeparseBuffer=*/{NULL, 0, BUFSIZE},
-	     DEFAULT_Cutoff, FALSE, 0, TRUE, FALSE, INT_MAX, TRUE, 0};
+	     DEFAULT_Cutoff, FALSE, 0, TRUE, FALSE, INT_MAX, TRUE, 0, FALSE};
     localData.cutoff = cutoff;
     localData.backtick = backtick;
     localData.opts = opts;
@@ -220,10 +231,12 @@ static SEXP deparse1WithCutoff(SEXP call, Rboolean abbrev, int cutoff,
     if (nlines > 0) {
 	localData.linenumber = localData.maxlines = nlines;
     } else {
-	deparse2(call, svec, &localData);/* just to determine linenumber..*/
+        if (R_BrowseLines > 0)  /* enough to determine linenumber */
+            localData.maxlines = R_BrowseLines + 1;
+	deparse2(call, svec, &localData);
 	localData.active = TRUE;
 	if(R_BrowseLines > 0 && localData.linenumber > R_BrowseLines) {
-	    localData.linenumber = localData.maxlines = R_BrowseLines + 1;
+	    localData.linenumber = R_BrowseLines + 1;
 	    need_ellipses = TRUE;
 	}
     }
@@ -238,8 +251,11 @@ static SEXP deparse1WithCutoff(SEXP call, Rboolean abbrev, int cutoff,
     } else if(need_ellipses) {
 	SET_STRING_ELT(svec, R_BrowseLines, mkChar("  ..."));
     }
-    if(nlines > 0 && localData.linenumber < nlines)
+    if(nlines > 0 && localData.linenumber < nlines) {
+	UNPROTECT(1); /* old svec value */
+	PROTECT(svec);
 	svec = lengthgets(svec, localData.linenumber);
+    }
     UNPROTECT(1);
     PROTECT(svec); /* protect from warning() allocating, PR#14356 */
     R_print.digits = savedigits;
@@ -277,21 +293,21 @@ SEXP deparse1line(SEXP call, Rboolean abbrev)
 	    SEXP s = STRING_ELT(temp, i);
 	    cetype_t thisenc = getCharCE(s);
 	    len += strlen(CHAR(s));  // FIXME: check for overflow?
-	    if (thisenc != CE_NATIVE) 
-	    	enc = thisenc; /* assume only one non-native encoding */ 
-	}    
+	    if (thisenc != CE_NATIVE)
+		enc = thisenc; /* assume only one non-native encoding */
+	}
 	vmax = vmaxget();
 	buf = R_alloc((size_t) len+lines, sizeof(char));
 	*buf = '\0';
 	for (i = 0; i < length(temp); i++) {
 	    strcat(buf, CHAR(STRING_ELT(temp, i)));
 	    if (i < lines - 1)
-	    	strcat(buf, "\n");
+		strcat(buf, "\n");
 	}
 	temp = ScalarString(mkCharCE(buf, enc));
 	vmaxset(vmax);
-    }		
-    UNPROTECT(1);	
+    }
+    UNPROTECT(1);
     return(temp);
 }
 
@@ -348,7 +364,7 @@ SEXP attribute_hidden do_dput(SEXP call, SEXP op, SEXP args, SEXP rho)
 	con = getConnection(ifile);
 	wasopen = con->isopen;
 	if(!wasopen) {
-	    char mode[5];	
+	    char mode[5];
 	    strcpy(mode, con->mode);
 	    strcpy(con->mode, "w");
 	    if(!con->open(con)) error(_("cannot open the connection"));
@@ -401,8 +417,8 @@ SEXP attribute_hidden do_dump(SEXP call, SEXP op, SEXP args, SEXP rho)
 	error(_("invalid '%s' argument"), "envir");
     opts = asInteger(CADDDR(args));
     /* <NOTE>: change this if extra options are added */
-    if(opts == NA_INTEGER || opts < 0 || opts > 256)
-	errorcall(call, _("'opts' should be small non-negative integer"));
+    if(opts == NA_INTEGER || opts < 0 || opts > 1024)
+	error(_("'opts' should be small non-negative integer"));
     evaluate = asLogical(CAD4R(args));
     if (!evaluate) opts |= DELAYPROMISES;
 
@@ -426,9 +442,10 @@ SEXP attribute_hidden do_dump(SEXP call, SEXP op, SEXP args, SEXP rho)
 		if(isValidName(obj_name)) Rprintf("%s <-\n", obj_name);
 		else if(opts & S_COMPAT) Rprintf("\"%s\" <-\n", obj_name);
 		else Rprintf("`%s` <-\n", obj_name);
-		tval = deparse1(CAR(o), 0, opts);
+		tval = PROTECT(deparse1(CAR(o), 0, opts));
 		for (j = 0; j < LENGTH(tval); j++)
 		    Rprintf("%s\n", CHAR(STRING_ELT(tval, j)));/* translated */
+		UNPROTECT(1); /* tval */
 		o = CDR(o);
 	    }
 	}
@@ -436,7 +453,7 @@ SEXP attribute_hidden do_dump(SEXP call, SEXP op, SEXP args, SEXP rho)
 	    con = getConnection(INTEGER(file)[0]);
 	    wasopen = con->isopen;
 	    if(!wasopen) {
-		char mode[5];	
+		char mode[5];
 		strcpy(mode, con->mode);
 		strcpy(con->mode, "w");
 		if(!con->open(con)) error(_("cannot open the connection"));
@@ -446,7 +463,7 @@ SEXP attribute_hidden do_dump(SEXP call, SEXP op, SEXP args, SEXP rho)
 			     R_NilValue, R_NilValue);
 		cntxt.cend = &con_cleanup;
 		cntxt.cenddata = con;
-	    } 
+	    }
 	    if(!con->canwrite) error(_("cannot write to this connection"));
 	    for (i = 0, nout = 0; i < nobjs; i++) {
 		const char *s;
@@ -463,13 +480,14 @@ SEXP attribute_hidden do_dump(SEXP call, SEXP op, SEXP args, SEXP rho)
 		    res = Rconn_printf(con, "`%s` <-\n", s);
 		if(!havewarned && res < strlen(s) + extra)
 		    warning(_("wrote too few characters"));
-		tval = deparse1(CAR(o), 0, opts);
+		PROTECT(tval = deparse1(CAR(o), 0, opts));
 		for (j = 0; j < LENGTH(tval); j++) {
 		    res = Rconn_printf(con, "%s\n", CHAR(STRING_ELT(tval, j)));
 		    if(!havewarned &&
 		       res < strlen(CHAR(STRING_ELT(tval, j))) + 1)
 			warning(_("wrote too few characters"));
 		}
+		UNPROTECT(1); /* tval */
 		o = CDR(o);
 	    }
 	    if(!wasopen) {endcontext(&cntxt); con->close(con);}
@@ -536,13 +554,18 @@ static Rboolean needsparens(PPinfo mainop, SEXP arg, unsigned int left)
 			if (arginfo.precedence == PREC_SUM)   /* binary +/- precedence upgraded as unary */
 			    arginfo.precedence = PREC_SIGN;
 		    case 2:
+			if (mainop.precedence == PREC_COMPARE && arginfo.precedence == PREC_COMPARE)
+		          return TRUE;     /*   a < b < c   is not legal syntax */
 			break;
 		    default:
 			return FALSE;
 		    }
+		case PP_SUBSET:
+		    if (mainop.kind == PP_DOLLAR)
+		    	return FALSE;
+		    /* fall through, don't break... */
 		case PP_ASSIGN:
 		case PP_ASSIGN2:
-		case PP_SUBSET:
 		case PP_UNARY:
 		case PP_DOLLAR:
 		    if (mainop.precedence > arginfo.precedence
@@ -559,11 +582,11 @@ static Rboolean needsparens(PPinfo mainop, SEXP arg, unsigned int left)
 		default:
 		    return FALSE;
 		}
-	    } else if (isUserBinop(CAR(arg))) { 
-	        if (mainop.precedence > PREC_PERCENT
-	            || (mainop.precedence == PREC_PERCENT && left == mainop.rightassoc)) {
-	            return TRUE;
-	        }
+	    } else if (isUserBinop(CAR(arg))) {
+		if (mainop.precedence > PREC_PERCENT
+		    || (mainop.precedence == PREC_PERCENT && left == mainop.rightassoc)) {
+		    return TRUE;
+		}
 	    }
 	}
     }
@@ -582,8 +605,7 @@ static Rboolean hasAttributes(SEXP s)
     SEXP a = ATTRIB(s);
     if (length(a) > 2) return(TRUE);
     while(!isNull(a)) {
-	if(TAG(a) != R_SrcrefSymbol
-	   && (TYPEOF(s) != CLOSXP || TAG(a) != R_SourceSymbol))
+	if(TAG(a) != R_SrcrefSymbol)
 	    return(TRUE);
 	a = CDR(a);
     }
@@ -603,7 +625,7 @@ static void attr2(SEXP s, LocalParseData *d)
     if(hasAttributes(s)) {
 	SEXP a = ATTRIB(s);
 	while(!isNull(a)) {
-	    if(TAG(a) != R_SourceSymbol && TAG(a) != R_SrcrefSymbol) {
+	    if(TAG(a) != R_SrcrefSymbol) {
 		print2buff(", ", d);
 		if(TAG(a) == R_DimSymbol) {
 		    print2buff(".Dim", d);
@@ -634,6 +656,7 @@ static void attr2(SEXP s, LocalParseData *d)
 		    d->opts = localOpts;
 		}
 		print2buff(" = ", d);
+		d->fnarg = TRUE;
 		deparse2buff(CAR(a), d);
 	    }
 	    a = CDR(a);
@@ -693,26 +716,26 @@ static const char * quotify(SEXP name, int quote)
      etc.
 */
 static Rboolean parenthesizeCaller(SEXP s)
-{   
+{
     SEXP op, sym;
     if (TYPEOF(s) == LANGSXP) { /* unevaluated */
-    	op = CAR(s);
-    	if (TYPEOF(op) == SYMSXP) {
-    	    if (isUserBinop(op)) return TRUE;   /* %foo% */
-    	    sym = SYMVALUE(op);
-    	    if (TYPEOF(sym) == BUILTINSXP
-    	        || TYPEOF(sym) == SPECIALSXP) {
-    	        if (PPINFO(sym).precedence >= PREC_DOLLAR
-    	            || PPINFO(sym).kind == PP_FUNCALL
-    	            || PPINFO(sym).kind == PP_PAREN
-    	            || PPINFO(sym).kind == PP_CURLY) return FALSE; /* x$f(z) or x[n](z) or f(z) or (f) or {f} */
-    	        else return TRUE;		/* (f+g)(z) etc. */
-    	    }
-    	    return FALSE;			/* regular function call */
-    	 } else
-	    return TRUE; 			/* something strange, like (1)(x) */
-    } else 
-        return TYPEOF(s) == CLOSXP;
+	op = CAR(s);
+	if (TYPEOF(op) == SYMSXP) {
+	    if (isUserBinop(op)) return TRUE;   /* %foo% */
+	    sym = SYMVALUE(op);
+	    if (TYPEOF(sym) == BUILTINSXP
+		|| TYPEOF(sym) == SPECIALSXP) {
+		if (PPINFO(sym).precedence >= PREC_SUBSET
+		    || PPINFO(sym).kind == PP_FUNCALL
+		    || PPINFO(sym).kind == PP_PAREN
+		    || PPINFO(sym).kind == PP_CURLY) return FALSE; /* x$f(z) or x[n](z) or f(z) or (f) or {f} */
+		else return TRUE;		/* (f+g)(z) etc. */
+	    }
+	    return FALSE;			/* regular function call */
+	 } else
+	    return TRUE;			/* something strange, like (1)(x) */
+    } else
+	return TYPEOF(s) == CLOSXP;
 }
 
 /* This is the recursive part of deparsing. */
@@ -724,10 +747,13 @@ static Rboolean parenthesizeCaller(SEXP s)
 static void deparse2buff(SEXP s, LocalParseData *d)
 {
     PPinfo fop;
-    Rboolean lookahead = FALSE, lbreak = FALSE, parens;
+    Rboolean lookahead = FALSE, lbreak = FALSE, parens, fnarg = d->fnarg,
+             outerparens, doquote;
     SEXP op, t;
     int localOpts = d->opts, i, n;
 
+    d->fnarg = FALSE;
+
     if (!d->active) return;
 
     if (IS_S4_OBJECT(s)) d->isS4 = TRUE;
@@ -737,7 +763,8 @@ static void deparse2buff(SEXP s, LocalParseData *d)
 	print2buff("NULL", d);
 	break;
     case SYMSXP:
-	if (localOpts & QUOTEEXPRESSIONS) {
+	doquote = (localOpts & QUOTEEXPRESSIONS) && strlen(CHAR(PRINTNAME(s)));
+	if (doquote) {
 	    attr1(s, d);
 	    print2buff("quote(", d);
 	}
@@ -747,7 +774,7 @@ static void deparse2buff(SEXP s, LocalParseData *d)
 	    print2buff(quotify(PRINTNAME(s), '`'), d);
 	else
 	    print2buff(CHAR(PRINTNAME(s)), d);
-	if (localOpts & QUOTEEXPRESSIONS) {
+	if (doquote) {
 	    print2buff(")", d);
 	    attr2(s, d);
 	}
@@ -785,8 +812,8 @@ static void deparse2buff(SEXP s, LocalParseData *d)
     case CLOSXP:
 	if (localOpts & SHOWATTRIBUTES) attr1(s, d);
 	if ((d->opts & USESOURCE)
-	    && !isNull(t = getAttrib(s, R_SrcrefSymbol))) 
-	    	src2buff1(t, d);
+	    && !isNull(t = getAttrib(s, R_SrcrefSymbol)))
+		src2buff1(t, d);
 	else {
 	    /* We have established that we don't want to use the
 	       source for this function */
@@ -827,7 +854,7 @@ static void deparse2buff(SEXP s, LocalParseData *d)
 	break;
     case LISTSXP:
 	if (localOpts & SHOWATTRIBUTES) attr1(s, d);
-	print2buff("list(", d);
+	print2buff("pairlist(", d);
 	d->inlist++;
 	for (t=s ; CDR(t) != R_NilValue ; t=CDR(t) ) {
 	    if( TAG(t) != R_NilValue ) {
@@ -859,20 +886,20 @@ static void deparse2buff(SEXP s, LocalParseData *d)
 	    d->opts &= SIMPLE_OPTS;
 	}
 	if (TYPEOF(CAR(s)) == SYMSXP) {
-	    int userbinop = 0; 
+	    int userbinop = 0;
 	    op = CAR(s);
 	    if ((TYPEOF(SYMVALUE(op)) == BUILTINSXP) ||
 		(TYPEOF(SYMVALUE(op)) == SPECIALSXP) ||
 		(userbinop = isUserBinop(op))) {
 		s = CDR(s);
 		if (userbinop) {
-		    if (isNull(getAttrib(s, R_NamesSymbol))) {  
+		    if (isNull(getAttrib(s, R_NamesSymbol))) {
 			fop.kind = PP_BINARY2;    /* not quite right for spacing, but can't be unary */
 			fop.precedence = PREC_PERCENT;
 			fop.rightassoc = 0;
-		    } else 
+		    } else
 			fop.kind = PP_FUNCALL;  /* if args are named, deparse as function call (PR#15350) */
-		} else 
+		} else
 		    fop = PPINFO(SYMVALUE(op));
 		if (fop.kind == PP_BINARY) {
 		    switch (length(s)) {
@@ -891,8 +918,8 @@ static void deparse2buff(SEXP s, LocalParseData *d)
 		else if (fop.kind == PP_BINARY2) {
 		    if (length(s) != 2)
 			fop.kind = PP_FUNCALL;
-	 	    else if (userbinop)
-	 	    	fop.kind = PP_BINARY;
+		    else if (userbinop)
+			fop.kind = PP_BINARY;
 		}
 		switch (fop.kind) {
 		case PP_IF:
@@ -964,7 +991,11 @@ static void deparse2buff(SEXP s, LocalParseData *d)
 		    print2buff(")", d);
 		    break;
 		case PP_SUBSET:
+		    if ((parens = needsparens(fop, CAR(s), 1)))
+			print2buff("(", d);
 		    deparse2buff(CAR(s), d);
+		    if (parens)
+			print2buff(")", d);
 		    if (PRIMVAL(SYMVALUE(op)) == 1)
 			print2buff("[", d);
 		    else
@@ -977,10 +1008,10 @@ static void deparse2buff(SEXP s, LocalParseData *d)
 		    break;
 		case PP_FUNCALL:
 		case PP_RETURN:
-		    if (d->backtick) 
-		        print2buff(quotify(PRINTNAME(op), '`'), d);
-		    else 
-		    	print2buff(quotify(PRINTNAME(op), '"'), d);
+		    if (d->backtick)
+			print2buff(quotify(PRINTNAME(op), '`'), d);
+		    else
+			print2buff(quotify(PRINTNAME(op), '"'), d);
 		    print2buff("(", d);
 		    d->inlist++;
 		    args2buff(s, 0, 0, d);
@@ -1016,6 +1047,8 @@ static void deparse2buff(SEXP s, LocalParseData *d)
 		    break;
 		case PP_ASSIGN:
 		case PP_ASSIGN2:
+		    if ((outerparens = (fnarg && !strcmp(CHAR(PRINTNAME(op)), "="))))
+		    	print2buff("(", d);
 		    if ((parens = needsparens(fop, CAR(s), 1)))
 			print2buff("(", d);
 		    deparse2buff(CAR(s), d);
@@ -1029,6 +1062,8 @@ static void deparse2buff(SEXP s, LocalParseData *d)
 		    deparse2buff(CADR(s), d);
 		    if (parens)
 			print2buff(")", d);
+		    if (outerparens)
+		    	print2buff(")", d);
 		    break;
 		case PP_DOLLAR:
 		    if ((parens = needsparens(fop, CAR(s), 1)))
@@ -1137,9 +1172,9 @@ static void deparse2buff(SEXP s, LocalParseData *d)
 		}
 		else {
 		    if ( isSymbol(CAR(s)) ){
-			if(d->opts & S_COMPAT) 
+			if(d->opts & S_COMPAT)
 			    print2buff(quotify(PRINTNAME(CAR(s)), '\''), d);
-			else 
+			else
 			    print2buff(quotify(PRINTNAME(CAR(s)), '`'), d);
 		    }
 		    else
@@ -1153,22 +1188,22 @@ static void deparse2buff(SEXP s, LocalParseData *d)
 	else if (TYPEOF(CAR(s)) == CLOSXP || TYPEOF(CAR(s)) == SPECIALSXP
 		 || TYPEOF(CAR(s)) == BUILTINSXP) {
 	    if (parenthesizeCaller(CAR(s))) {
-	    	print2buff("(", d);
-	    	deparse2buff(CAR(s), d);
-	    	print2buff(")", d);
+		print2buff("(", d);
+		deparse2buff(CAR(s), d);
+		print2buff(")", d);
 	    } else
-	    	deparse2buff(CAR(s), d);
+		deparse2buff(CAR(s), d);
 	    print2buff("(", d);
 	    args2buff(CDR(s), 0, 0, d);
 	    print2buff(")", d);
 	}
 	else { /* we have a lambda expression */
 	    if (parenthesizeCaller(CAR(s))) {
-	    	print2buff("(", d);
-	    	deparse2buff(CAR(s), d);
-	    	print2buff(")", d);
+		print2buff("(", d);
+		deparse2buff(CAR(s), d);
+		print2buff(")", d);
 	    } else
-	    	deparse2buff(CAR(s), d);
+		deparse2buff(CAR(s), d);
 	    print2buff("(", d);
 	    args2buff(CDR(s), 0, 0, d);
 	    print2buff(")", d);
@@ -1205,13 +1240,28 @@ static void deparse2buff(SEXP s, LocalParseData *d)
 	d->sourceable = FALSE;
 	print2buff("<weak reference>", d);
 	break;
-    case S4SXP:
-	d->sourceable = FALSE;
+    case S4SXP: {
+	SEXP class = getAttrib(s, R_ClassSymbol);
 	d->isS4 = TRUE;
+
+#ifndef _TRY_S4_DEPARSE_
+	d->sourceable = FALSE;
 	print2buff("<S4 object of class ", d);
-	deparse2buff(getAttrib(s, R_ClassSymbol), d);
+	deparse2buff(class, d);
 	print2buff(">", d);
+#else
+	/* somewhat like the  VECSXP [ "list()" ] case : */
+/*	if (localOpts & SHOWATTRIBUTES) attr1(s, d); */
+	print2buff("new(\"", d);
+	print2buff(translateChar(STRING_ELT(class, 0)), d);
+	print2buff("\",\n", d);
+//>>>> call vec2buf on the  Attributes >>>>>>>>>  vec2buff(s, d);
+	print2buff(")", d);
+/*	if (localOpts & SHOWATTRIBUTES) attr2(s, d); */
+
+#endif
       break;
+    }
     default:
 	d->sourceable = FALSE;
 	UNIMPLEMENTED_TYPE("deparse2buff", s);
@@ -1253,7 +1303,7 @@ static void print2buff(const char *strng, LocalParseData *d)
 /*
  * Encodes a complex value as a syntactically correct
  * string that can be reparsed by R. This is required
- * because by default strings like '1+Infi' or '3+NaNi' 
+ * because by default strings like '1+Infi' or '3+NaNi'
  * are produced which are not valid complex literals.
  */
 
@@ -1264,13 +1314,13 @@ static const char *EncodeNonFiniteComplexElement(Rcomplex x, char* buff)
 
     // format a first time to get width/decimals
     formatComplex(&x, 1, &w, &d, &e, &wi, &di, &ei, 0);
-	
+
     char Re[NB];
     char Im[NB];
 
-    strcpy(Re, EncodeReal(x.r, w, d, e, '.'));
-    strcpy(Im, EncodeReal(x.i, wi, di, ei, '.'));
-    
+    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';
     return buff;
@@ -1280,7 +1330,7 @@ static void vector2buff(SEXP vector, LocalParseData *d)
 {
     int tlen, i, quote;
     const char *strp;
-    char *buff = 0;
+    char *buff = 0, hex[64]; // 64 is more than enough
     Rboolean surround = FALSE, allNA, addL = TRUE;
 
     tlen = length(vector);
@@ -1398,10 +1448,10 @@ static void vector2buff(SEXP vector, LocalParseData *d)
 		       (ISNA(COMPLEX(vector)[i].r)
 			&& ISNA(COMPLEX(vector)[i].i)) ) {
 		strp = allNA ? "NA_complex_" : EncodeElement(vector, i, quote, '.');
-	    } else if(TYPEOF(vector) == CPLXSXP && 
-	    	      (ISNAN(COMPLEX(vector)[i].r) || !R_FINITE(COMPLEX(vector)[i].i)) ) {
-	    	if (!buff)
-	    	    buff = alloca(NB);
+	    } else if(TYPEOF(vector) == CPLXSXP &&
+		      (ISNAN(COMPLEX(vector)[i].r) || !R_FINITE(COMPLEX(vector)[i].i)) ) {
+		if (!buff)
+		    buff = alloca(NB);
 		strp = EncodeNonFiniteComplexElement(COMPLEX(vector)[i], buff);
 	    } else if (allNA && TYPEOF(vector) == STRSXP &&
 		       STRING_ELT(vector, i) == NA_STRING) {
@@ -1419,6 +1469,36 @@ static void vector2buff(SEXP vector, LocalParseData *d)
 		vmaxset(vmax);
 	    } else if (TYPEOF(vector) == RAWSXP) {
 		strp = EncodeRaw(RAW(vector)[i], "0x");
+	    } else if (TYPEOF(vector) == REALSXP && (d->opts & HEXNUMERIC)) {
+		double x = REAL(vector)[i];
+		// Windows warns here, but incorrectly as this is C99
+		// and the snprintf used from trio is compliant.
+		if (R_FINITE(x)) {
+		    snprintf(hex, 32, "%a", x);
+		    strp = hex;
+		} else
+		    strp = EncodeElement(vector, i, quote, '.');
+	    } else if (TYPEOF(vector) == REALSXP && (d->opts & DIGITS16)) {
+		double x = REAL(vector)[i];
+		if (R_FINITE(x)) {
+		    snprintf(hex, 32, "%.17g", x);
+		    strp = hex;
+		} else
+		    strp = EncodeElement(vector, i, quote, '.');
+	    } else if (TYPEOF(vector) == CPLXSXP && (d->opts & HEXNUMERIC)) {
+		Rcomplex z =  COMPLEX(vector)[i];
+		if (R_FINITE(z.r) && R_FINITE(z.i)) {
+		    snprintf(hex, 64, "%a + %ai", z.r, z.i);
+		    strp = hex;
+		} else
+		    strp = EncodeElement(vector, i, quote, '.');
+	    } else if (TYPEOF(vector) == CPLXSXP && (d->opts & DIGITS16)) {
+		Rcomplex z =  COMPLEX(vector)[i];
+		if (R_FINITE(z.r) && R_FINITE(z.i)) {
+		    snprintf(hex, 64, "%.17g%+.17gi", z.r, z.i);
+		    strp = hex;
+		} else
+		    strp = EncodeElement(vector, i, quote, '.');
 	    } else
 		strp = EncodeElement(vector, i, quote, '.');
 	    print2buff(strp, d);
@@ -1439,7 +1519,7 @@ static void src2buff1(SEXP srcref, LocalParseData *d)
     const void *vmax = vmaxget();
     PROTECT(srcref);
 
-    PROTECT(srcref = lang2(install("as.character"), srcref));
+    PROTECT(srcref = lang2(R_AsCharacterSymbol, srcref));
     PROTECT(srcref = eval(srcref, R_BaseEnv));
     n = length(srcref);
     for(i = 0 ; i < n ; i++) {
@@ -1463,10 +1543,8 @@ static Rboolean src2buff(SEXP sv, int k, LocalParseData *d)
     else return FALSE;
 }
 
-/* vec2buff : New Code */
-/* Deparse vectors of S-expressions. */
-/* In particular, this deparses objects of mode expression. */
-
+/* Deparse vectors of S-expressions, i.e., list() and expression() objects.
+   In particular, this deparses objects of mode expression. */
 static void vec2buff(SEXP v, LocalParseData *d)
 {
     SEXP nv, sv;
@@ -1526,25 +1604,30 @@ static void args2buff(SEXP arglist, int lineb, int formals, LocalParseData *d)
 
 	    if( s == R_DotsSymbol )
 		print2buff(CHAR(PRINTNAME(s)), d);
-	    else if(d->backtick) 
+	    else if(d->backtick)
 		print2buff(quotify(PRINTNAME(s), '`'), d);
-	    else 
-	        print2buff(quotify(PRINTNAME(s), '"'), d);
-	    
+	    else
+		print2buff(quotify(PRINTNAME(s), '"'), d);
+
 	    if(formals) {
 		if (CAR(arglist) != R_MissingArg) {
 		    print2buff(" = ", d);
+		    d->fnarg = TRUE;
 		    deparse2buff(CAR(arglist), d);
 		}
 	    }
 	    else {
 		print2buff(" = ", d);
 		if (CAR(arglist) != R_MissingArg) {
+		    d->fnarg = TRUE;
 		    deparse2buff(CAR(arglist), d);
 		}
 	    }
 	}
-	else deparse2buff(CAR(arglist), d);
+	else {
+	  d->fnarg = TRUE;
+	  deparse2buff(CAR(arglist), d);
+	}
 	arglist = CDR(arglist);
 	if (arglist != R_NilValue) {
 	    print2buff(", ", d);
diff --git a/src/main/devices.c b/src/main/devices.c
index 58c62d2..69cce71 100644
--- a/src/main/devices.c
+++ b/src/main/devices.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--2008  The R Core Team
+ *  Copyright (C) 1997--2015  The R Core Team
  *  Copyright (C) 2002--2005  The R Foundation
  *
  *  This program is free software; you can redistribute it and/or modify
@@ -16,7 +16,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
 
 
  *  This is an extensive reworking by Paul Murrell of an original
@@ -34,7 +34,7 @@
 #include <Defn.h>
 #include <Internal.h>
 #include <Graphics.h>
-#include <GraphicsBase.h> 
+#include <GraphicsBase.h>
 #include <R_ext/GraphicsEngine.h>
 
 int baseRegisterIndex = -1;
@@ -138,7 +138,7 @@ pGEDevDesc GEcurrentDevice(void)
     if (NoDevices()) {
 	SEXP defdev = GetOption1(install("device"));
 	if (isString(defdev) && length(defdev) > 0) {
-	    SEXP devName = install(CHAR(STRING_ELT(defdev, 0)));
+	    SEXP devName = installTrChar(STRING_ELT(defdev, 0));
 	    /*  Not clear where this should be evaluated, since
 		grDevices need not be in the search path.
 		So we look for it first on the global search path.
@@ -156,6 +156,7 @@ pGEDevDesc GEcurrentDevice(void)
 		*/
 		SEXP ns = findVarInFrame(R_NamespaceRegistry,
 					 install("grDevices"));
+		PROTECT(ns);
 		if(ns != R_UnboundValue &&
 		   findVar(devName, ns) != R_UnboundValue) {
 		    PROTECT(defdev = lang1(devName));
@@ -163,6 +164,7 @@ pGEDevDesc GEcurrentDevice(void)
 		    UNPROTECT(1);
 		} else
 		    error(_("no active or default device"));
+		UNPROTECT(1);
 	    }
 	} else if(TYPEOF(defdev) == CLOSXP) {
 	    PROTECT(defdev = lang1(defdev));
@@ -211,8 +213,9 @@ int prevDevice(int from)
     else {
 	int i = from;
 	int prevDev = 0;
-	while ((i > 1) && (prevDev == 0))
-	    if (active[--i]) prevDev = i;
+	if (i < R_MaxDevices)
+	    while ((i > 1) && (prevDev == 0))
+		if (active[--i]) prevDev = i;
 	if (prevDev == 0) {
 	    /* start again from R_MaxDevices */
 	    i = R_MaxDevices;
@@ -361,7 +364,7 @@ void KillAllDevices(void)
     // unregisterBase();
     if (baseRegisterIndex != -1) {
 	GEunregisterSystem(baseRegisterIndex);
-	baseRegisterIndex = -1; 
+	baseRegisterIndex = -1;
     }
 }
 
@@ -448,7 +451,7 @@ void GEaddDevice(pGEDevDesc gdd)
     }
 }
 
-/* convenience wrapper */
+/* convenience wrappers */
 void GEaddDevice2(pGEDevDesc gdd, const char *name)
 {
     gsetVar(R_DeviceSymbol, mkString(name), R_BaseEnv);
@@ -456,6 +459,20 @@ void GEaddDevice2(pGEDevDesc gdd, const char *name)
     GEinitDisplayList(gdd);
 }
 
+void GEaddDevice2f(pGEDevDesc gdd, const char *name, const char *file)
+{
+    SEXP f = PROTECT(mkString(name));
+    if(file) {
+      SEXP s_filepath = install("filepath");
+      setAttrib(f, s_filepath, mkString(file));
+    }
+    gsetVar(R_DeviceSymbol, f, R_BaseEnv);
+    UNPROTECT(1);
+    GEaddDevice(gdd);
+    GEinitDisplayList(gdd);
+}
+
+
 Rboolean Rf_GetOptionDeviceAsk(void); /* from options.c */
 
 /* Create a GEDevDesc, given a pDevDesc
diff --git a/src/main/dotcode.c b/src/main/dotcode.c
index 47ca825..fd97ee1 100644
--- a/src/main/dotcode.c
+++ b/src/main/dotcode.c
@@ -1,7 +1,7 @@
 /*
  *  R : A Computer Language for Statistical Data Analysis
  *  Copyright (C) 1995  Robert Gentleman and Ross Ihaka
- *  Copyright (C) 1997--2013  The R Core Team
+ *  Copyright (C) 1997--2014  The R Core Team
  *  Copyright (C) 2003	      The R Foundation
  *
  *  This program is free software; you can redistribute it and/or modify
@@ -16,7 +16,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  */
 
 #ifdef HAVE_CONFIG_H
@@ -76,10 +76,19 @@ static DL_FUNC
 R_FindNativeSymbolFromDLL(char *name, DllReference *dll,
 			  R_RegisteredNativeSymbol *symbol, SEXP env);
 
-static SEXP naokfind(SEXP args, int * len, int *naok, int *dup,
-		     DllReference *dll);
+static SEXP naokfind(SEXP args, int * len, int *naok, DllReference *dll);
 static SEXP pkgtrim(SEXP args, DllReference *dll);
 
+static R_INLINE Rboolean isNativeSymbolInfo(SEXP op)
+{
+    /* was: inherits(op, "NativeSymbolInfo")
+     * inherits() is slow because of string comparisons, so use
+     * structural check instead. */
+    return (TYPEOF(op) == VECSXP &&
+	    LENGTH(op) >= 2 &&
+	    TYPEOF(VECTOR_ELT(op, 1)) == EXTPTRSXP);
+}
+
 /*
   Called from resolveNativeRoutine (and itself).
 
@@ -101,10 +110,16 @@ checkValidSymbolId(SEXP op, SEXP call, DL_FUNC *fun,
     if (isValidString(op)) return;
 
     if(TYPEOF(op) == EXTPTRSXP) {
+	static SEXP native_symbol = NULL;
+	static SEXP registered_native_symbol = NULL;
+	if (native_symbol == NULL) {
+	    native_symbol = install("native symbol");
+	    registered_native_symbol = install("registered native symbol");
+	}
 	char *p = NULL;
-	if(R_ExternalPtrTag(op) == install("native symbol"))
+	if(R_ExternalPtrTag(op) == native_symbol)
 	   *fun = R_ExternalPtrAddrFn(op);
-	else if(R_ExternalPtrTag(op) == install("registered native symbol")) {
+	else if(R_ExternalPtrTag(op) == registered_native_symbol) {
 	   R_RegisteredNativeSymbol *tmp;
 	   tmp = (R_RegisteredNativeSymbol *) R_ExternalPtrAddr(op);
 	   if(tmp) {
@@ -142,7 +157,7 @@ checkValidSymbolId(SEXP op, SEXP call, DL_FUNC *fun,
 	    errorcall(call, _("NULL value passed as symbol address"));
 
 	/* copy the symbol name. */
-	if (p) {
+	if (p && buf) {
 	    if (strlen(p) >= MaxSymbolBytes)
 		error(_("symbol '%s' is too long"), p);
 	    memcpy(buf, p, strlen(p)+1);
@@ -150,7 +165,7 @@ checkValidSymbolId(SEXP op, SEXP call, DL_FUNC *fun,
 
 	return;
     }
-    else if(inherits(op, "NativeSymbolInfo")) {
+    else if(isNativeSymbolInfo(op)) {
 	checkValidSymbolId(VECTOR_ELT(op, 1), call, fun, symbol, buf);
 	return;
     }
@@ -160,6 +175,14 @@ checkValidSymbolId(SEXP op, SEXP call, DL_FUNC *fun,
     return; /* not reached */
 }
 
+attribute_hidden
+DL_FUNC R_dotCallFn(SEXP op, SEXP call, int nargs) {
+    R_RegisteredNativeSymbol symbol = {R_CALL_SYM, {NULL}, NULL};
+    DL_FUNC fun = NULL;
+    checkValidSymbolId(op, call, &fun, &symbol, NULL);
+    /* should check arg count here as well */
+    return fun;
+}
 
 /*
   This is the routine that is called by do_dotCode, do_dotcall and
@@ -174,16 +197,16 @@ checkValidSymbolId(SEXP op, SEXP call, DL_FUNC *fun,
 static SEXP
 resolveNativeRoutine(SEXP args, DL_FUNC *fun,
 		     R_RegisteredNativeSymbol *symbol, char *buf,
-		     int *nargs, int *naok, int *dup, SEXP call, SEXP env)
+		     int *nargs, int *naok, SEXP call, SEXP env)
 {
     SEXP op;
     const char *p; char *q;
     DllReference dll;
     /* This is used as shorthand for 'all' in R_FindSymbol, but
        should never be supplied */
-    strcpy(dll.DLLname, ""); 
+    strcpy(dll.DLLname, "");
     dll.dll = NULL; dll.obj = NULL; dll.type = NOT_DEFINED;
-    
+
     op = CAR(args);  // value of .NAME =
     /* NB, this sets fun, symbol and buf and is not just a check! */
     checkValidSymbolId(op, call, fun, symbol, buf);
@@ -194,7 +217,7 @@ resolveNativeRoutine(SEXP args, DL_FUNC *fun,
 
     if(symbol->type == R_C_SYM || symbol->type == R_FORTRAN_SYM) {
 	/* And that also looks for PACKAGE = */
-	args = naokfind(CDR(args), nargs, naok, dup, &dll);
+	args = naokfind(CDR(args), nargs, naok, &dll);
 	if(*naok == NA_LOGICAL)
 	    errorcall(call, _("invalid '%s' value"), "naok");
 	if(*nargs > MAX_ARGS)
@@ -223,7 +246,7 @@ resolveNativeRoutine(SEXP args, DL_FUNC *fun,
     if (dll.type == FILENAME && strcmp(dll.DLLname, "base")) {
 	if(strlen(ns) && strcmp(dll.DLLname, ns) &&
 	   !(streql(dll.DLLname, "BioC_graph") && streql(ns, "graph")))
-	    warningcall(call, 
+	    warningcall(call,
 			"using PACKAGE = \"%s\" from namespace '%s'",
 			dll.DLLname, ns);
     }
@@ -249,7 +272,7 @@ resolveNativeRoutine(SEXP args, DL_FUNC *fun,
 	   from the namespace defining the function */
 	*fun = R_FindNativeSymbolFromDLL(buf, &dll, symbol, env2);
 	if (*fun) return args;
-	errorcall(call, "\"%s\" not resolved from current namespace (%s)", 
+	errorcall(call, "\"%s\" not resolved from current namespace (%s)",
 		  buf, ns);
     }
 
@@ -313,12 +336,12 @@ checkNativeType(int targetType, int actualType)
 
 
 static Rboolean
-comparePrimitiveTypes(R_NativePrimitiveArgType type, SEXP s, Rboolean dup)
+comparePrimitiveTypes(R_NativePrimitiveArgType type, SEXP s)
 {
    if(type == ANYSXP || TYPEOF(s) == type)
       return(TRUE);
 
-   if(dup && type == SINGLESXP)
+   if(type == SINGLESXP)
       return(asLogical(getAttrib(s, install("Csingle"))) == TRUE);
 
    return(FALSE);
@@ -331,34 +354,29 @@ comparePrimitiveTypes(R_NativePrimitiveArgType type, SEXP s, Rboolean dup)
 /* NB: this leaves NAOK and DUP arguments on the list */
 
 /* find NAOK and DUP, find and remove PACKAGE */
-static SEXP naokfind(SEXP args, int * len, int *naok, int *dup,
-		     DllReference *dll)
+static SEXP naokfind(SEXP args, int * len, int *naok, DllReference *dll)
 {
     SEXP s, prev;
     int nargs=0, naokused=0, dupused=0, pkgused=0;
     const char *p;
 
     *naok = 0;
-    *dup = 1;
     *len = 0;
     for(s = args, prev=args; s != R_NilValue;) {
 	if(TAG(s) == NaokSymbol) {
 	    *naok = asLogical(CAR(s));
-	    /* SETCDR(prev, s = CDR(s)); */
 	    if(naokused++ == 1) warning(_("'%s' used more than once"), "NAOK");
 	} else if(TAG(s) == DupSymbol) {
-	    *dup = asLogical(CAR(s));
-	    /* SETCDR(prev, s = CDR(s)); */
 	    if(dupused++ == 1) warning(_("'%s' used more than once"), "DUP");
 	} else if(TAG(s) == PkgSymbol) {
-	    dll->obj = CAR(s);  // really? 
+	    dll->obj = CAR(s);  // really?
 	    if(TYPEOF(CAR(s)) == STRSXP) {
 		p = translateChar(STRING_ELT(CAR(s), 0));
 		if(strlen(p) > PATH_MAX - 1)
 		    error(_("DLL name is too long"));
 		dll->type = FILENAME;
 		strcpy(dll->DLLname, p);
-		if(pkgused++ > 1) 
+		if(pkgused++ > 1)
 		    warning(_("'%s' used more than once"), "PACKAGE");
 		/* More generally, this should allow us to process
 		   any additional arguments and not insist that PACKAGE
@@ -375,7 +393,7 @@ static SEXP naokfind(SEXP args, int * len, int *naok, int *dup,
 		    strcpy(dll->DLLname,
 			   translateChar(STRING_ELT(VECTOR_ELT(CAR(s), 1), 0)));
 		    dll->dll = (HINSTANCE) R_ExternalPtrAddr(VECTOR_ELT(s, 4));
-		} else 
+		} else
 		    error("incorrect type (%s) of PACKAGE argument\n",
 			  type2char(TYPEOF(CAR(s))));
 	    }
@@ -423,14 +441,14 @@ static SEXP pkgtrim(SEXP args, DllReference *dll)
 	   this is the last one (which will only happen for one arg),
 	   and remove it */
 	if(ss == R_NilValue && TAG(s) == PkgSymbol) {
-	    if(pkgused++ == 1) 
+	    if(pkgused++ == 1)
 		warning(_("'%s' used more than once"), "PACKAGE");
 	    setDLLname(s, dll->DLLname);
 	    dll->type = FILENAME;
 	    return R_NilValue;
 	}
 	if(TAG(ss) == PkgSymbol) {
-	    if(pkgused++ == 1) 
+	    if(pkgused++ == 1)
 		warning(_("'%s' used more than once"), "PACKAGE");
 	    setDLLname(ss, dll->DLLname);
 	    dll->type = FILENAME;
@@ -512,7 +530,7 @@ SEXP attribute_hidden do_External(SEXP call, SEXP op, SEXP args, SEXP env)
     if (length(args) < 1) errorcall(call, _("'.NAME' is missing"));
     check1arg2(args, call, ".NAME");
     args = resolveNativeRoutine(args, &ofun, &symbol, buf, NULL, NULL,
-				NULL, call, env);
+				call, env);
 
     if(symbol.symbol.external && symbol.symbol.external->numArgs > -1) {
 	int nargs = length(args) - 1;
@@ -539,39 +557,10 @@ typedef SEXP (*VarFun)(...);
 typedef DL_FUNC VarFun;
 #endif
 
-/* .Call(name, <args>) */
-SEXP attribute_hidden do_dotcall(SEXP call, SEXP op, SEXP args, SEXP env)
-{
-    DL_FUNC ofun = NULL;
+SEXP attribute_hidden R_doDotCall(DL_FUNC ofun, int nargs, SEXP *cargs,
+				  SEXP call) {
     VarFun fun = NULL;
-    SEXP retval, cargs[MAX_ARGS], pargs;
-    R_RegisteredNativeSymbol symbol = {R_CALL_SYM, {NULL}, NULL};
-
-    int nargs;
-    const void *vmax = vmaxget();
-    char buf[MaxSymbolBytes];
-
-    if (length(args) < 1) errorcall(call, _("'.NAME' is missing"));
-    check1arg2(args, call, ".NAME");
-
-    args = resolveNativeRoutine(args, &ofun, &symbol, buf, NULL, NULL,
-				NULL, call, env);
-    args = CDR(args);
-
-    for(nargs = 0, pargs = args ; pargs != R_NilValue; pargs = CDR(pargs)) {
-	if (nargs == MAX_ARGS)
-	    errorcall(call, _("too many arguments in foreign function call"));
-	cargs[nargs] = CAR(pargs);
-	nargs++;
-    }
-    if(symbol.symbol.call && symbol.symbol.call->numArgs > -1) {
-	if(symbol.symbol.call->numArgs != nargs)
-	    errorcall(call,
-		      _("Incorrect number of arguments (%d), expecting %d for '%s'"),
-		      nargs, symbol.symbol.call->numArgs, buf);
-    }
-
-    retval = R_NilValue;	/* -Wall */
+    SEXP retval = R_NilValue;	/* -Wall */
     fun = (VarFun) ofun;
     switch (nargs) {
     case 0:
@@ -1226,6 +1215,78 @@ SEXP attribute_hidden do_dotcall(SEXP call, SEXP op, SEXP args, SEXP env)
     default:
 	errorcall(call, _("too many arguments, sorry"));
     }
+    return retval;
+}
+
+/* .Call(name, <args>) */
+SEXP attribute_hidden do_dotcall(SEXP call, SEXP op, SEXP args, SEXP env)
+{
+    DL_FUNC ofun = NULL;
+    SEXP retval, cargs[MAX_ARGS], pargs;
+    R_RegisteredNativeSymbol symbol = {R_CALL_SYM, {NULL}, NULL};
+
+    int nargs;
+    const void *vmax = vmaxget();
+    char buf[MaxSymbolBytes];
+
+    if (length(args) < 1) errorcall(call, _("'.NAME' is missing"));
+    check1arg2(args, call, ".NAME");
+
+    args = resolveNativeRoutine(args, &ofun, &symbol, buf, NULL, NULL, call, env);
+    args = CDR(args);
+
+    for(nargs = 0, pargs = args ; pargs != R_NilValue; pargs = CDR(pargs)) {
+	if (nargs == MAX_ARGS)
+	    errorcall(call, _("too many arguments in foreign function call"));
+	cargs[nargs] = CAR(pargs);
+	nargs++;
+    }
+    if(symbol.symbol.call && symbol.symbol.call->numArgs > -1) {
+	if(symbol.symbol.call->numArgs != nargs)
+	    errorcall(call,
+		      _("Incorrect number of arguments (%d), expecting %d for '%s'"),
+		      nargs, symbol.symbol.call->numArgs, buf);
+    }
+
+    if (R_check_constants < 4)
+	retval = R_doDotCall(ofun, nargs, cargs, call);
+    else {
+	SEXP *cargscp = (SEXP *) R_alloc(nargs, sizeof(SEXP));
+	int i;
+	for(i = 0; i < nargs; i++)
+	    cargscp[i] = PROTECT(duplicate(cargs[i]));
+	retval = PROTECT(R_doDotCall(ofun, nargs, cargs, call));
+	Rboolean constsOK = TRUE;
+	for(i = 0; constsOK && i < nargs; i++)
+	    /* 39: not numerical comparison, not single NA, not attributes as
+               set, do ignore byte-code, do ignore environments of closures,
+               not ignore srcref
+
+               srcref is not ignored because ignoring it is expensive
+               (it triggers duplication)
+	    */
+            if (!R_compute_identical(cargs[i], cargscp[i], 39)
+		    && !R_checkConstants(FALSE))
+		constsOK = FALSE;
+	if (!constsOK) {
+	    REprintf("ERROR: detected compiler constant(s) modification after"
+		" .Call invocation of function %s from library %s (%s).\n",
+		buf,
+		symbol.dll ? symbol.dll->name : "unknown",
+		symbol.dll ? symbol.dll->path : "unknown");
+	    for(i = 0; i < nargs; i++)
+		if (!R_compute_identical(cargs[i], cargscp[i], 39))
+		    REprintf("NOTE: .Call function %s modified its argument"
+			" (number %d, type %s, length %d)\n",
+			buf,
+			i + 1,
+			CHAR(type2str(TYPEOF(cargscp[i]))),
+			length(cargscp[i])
+		    );
+	    R_Suicide("compiler constants were modified (in .Call?)!\n");
+	}
+	UNPROTECT(nargs + 1);
+    }
     vmaxset(vmax);
     return retval;
 }
@@ -1331,7 +1392,7 @@ Rf_getCallingDLL(void)
 */
 static DL_FUNC
 R_FindNativeSymbolFromDLL(char *name, DllReference *dll,
-			  R_RegisteredNativeSymbol *symbol, 
+			  R_RegisteredNativeSymbol *symbol,
 			  SEXP env)
 {
     int numProtects = 0;
@@ -1383,14 +1444,13 @@ R_FindNativeSymbolFromDLL(char *name, DllReference *dll,
 SEXP attribute_hidden do_dotCode(SEXP call, SEXP op, SEXP args, SEXP env)
 {
     void **cargs, **cargs0 = NULL /* -Wall */;
-    int dup, naok, na, nargs, Fort;
+    int naok, na, nargs, Fort;
     Rboolean havenames, copy = R_CBoundsCheck; /* options(CboundsCheck) */
     DL_FUNC ofun = NULL;
     VarFun fun = NULL;
     SEXP ans, pa, s;
     R_RegisteredNativeSymbol symbol = {R_C_SYM, {NULL}, NULL};
     R_NativePrimitiveArgType *checkTypes = NULL;
-    R_NativeArgStyle *argStyles = NULL;
     const void *vmax;
     char symName[MaxSymbolBytes];
 
@@ -1409,7 +1469,7 @@ SEXP attribute_hidden do_dotCode(SEXP call, SEXP op, SEXP args, SEXP env)
 
     args = enctrim(args);
     args = resolveNativeRoutine(args, &ofun, &symbol, symName, &nargs,
-				&naok, &dup, call, env);
+				&naok, call, env);
     fun = (VarFun) ofun;
 
     if(symbol.symbol.c && symbol.symbol.c->numArgs > -1) {
@@ -1419,7 +1479,6 @@ SEXP attribute_hidden do_dotCode(SEXP call, SEXP op, SEXP args, SEXP env)
 		      nargs, symbol.symbol.c->numArgs, symName);
 
 	checkTypes = symbol.symbol.c->types;
-	argStyles = symbol.symbol.c->styles;
     }
 
     /* Construct the return value */
@@ -1449,7 +1508,7 @@ SEXP attribute_hidden do_dotCode(SEXP call, SEXP op, SEXP args, SEXP env)
     if (copy) cargs0 = (void**) R_alloc(nargs, sizeof(void*));
     for(na = 0, pa = args ; pa != R_NilValue; pa = CDR(pa), na++) {
 	if(checkTypes &&
-	   !comparePrimitiveTypes(checkTypes[na], CAR(pa), dup)) {
+	   !comparePrimitiveTypes(checkTypes[na], CAR(pa))) {
 	    /* We can loop over all the arguments and report all the
 	       erroneous ones, but then we would also want to avoid
 	       the conversions.  Also, in the future, we may just
@@ -1462,23 +1521,17 @@ SEXP attribute_hidden do_dotCode(SEXP call, SEXP op, SEXP args, SEXP env)
 	R_xlen_t n;
 	s = CAR(pa);
 	/* start with return value a copy of the inputs, as that is
-	   what is needed for DUP = FALSE and for non-atomic-vector inputs */
+	   what is needed for non-atomic-vector inputs */
 	SET_VECTOR_ELT(ans, na, s);
 
-	if(checkNativeType(targetType, TYPEOF(s)) == FALSE) {
-	    if(!dup) {
-		error(_("explicit request not to duplicate arguments in call to '%s', but argument %d is of the wrong type (%d != %d)"),
-		      symName, na + 1, targetType, TYPEOF(s));
-	    }
-
-	    if(targetType != SINGLESXP) {
-		/* Cannot be called if DUP = FALSE, so only needs to live
-		   until copied in the switch.
-		   But R_alloc allocates, so missed protection < R 2.15.0.
-		*/
-		PROTECT(s = coerceVector(s, targetType));
-		nprotect++;
-	    }
+	if(checkNativeType(targetType, TYPEOF(s)) == FALSE &&
+	   targetType != SINGLESXP) {
+	    /* Cannot be called if DUP = FALSE, so only needs to live
+	       until copied in the switch.
+	       But R_alloc allocates, so missed protection < R 2.15.0.
+	    */
+	    PROTECT(s = coerceVector(s, targetType));
+	    nprotect++;
 	}
 
 	/* We create any copies needed for the return value here,
@@ -1490,20 +1543,20 @@ SEXP attribute_hidden do_dotCode(SEXP call, SEXP op, SEXP args, SEXP env)
 
 #ifdef LONG_VECTOR_SUPPORT
 	if (isVector(s) && IS_LONG_VEC(s))
-	    error(_("long vectors (argument %d) are not supported in %s"), 
-		  na + 1, Fort ? ".C" : ".Fortran");
+	    error(_("long vectors (argument %d) are not supported in %s"),
+		  na + 1, Fort ? ".Fortran" : ".C");
 #endif
 	SEXPTYPE t = TYPEOF(s);
 	switch(t) {
 	case RAWSXP:
-	    if (copy && dup) {
+	    if (copy) {
 		n = XLENGTH(s);
 		char *ptr = R_alloc(n * sizeof(Rbyte) + 2 * NG, 1);
 		memset(ptr, FILL, n * sizeof(Rbyte) + 2 * NG);
 		ptr += NG;
 		memcpy(ptr, RAW(s), n);
 		cargs[na] = (void *) ptr;
-	    } else if (dup && MAYBE_REFERENCED(s)) {
+	    } else if (MAYBE_REFERENCED(s)) {
 		n = XLENGTH(s);
 		SEXP ss = allocVector(t, n);
 		memcpy(RAW(ss), RAW(s), n * sizeof(Rbyte));
@@ -1522,13 +1575,13 @@ SEXP attribute_hidden do_dotCode(SEXP call, SEXP op, SEXP args, SEXP env)
 		for (R_xlen_t i = 0 ; i < n ; i++)
 		    if(iptr[i] == NA_INTEGER)
 			error(_("NAs in foreign function call (arg %d)"), na + 1);
-	    if (copy && dup) {
+	    if (copy) {
 		char *ptr = R_alloc(n * sizeof(int) + 2 * NG, 1);
 		memset(ptr, FILL, n * sizeof(int) + 2 * NG);
 		ptr += NG;
 		memcpy(ptr, INTEGER(s), n * sizeof(int));
 		cargs[na] = (void*) ptr;
-	    } else if (dup && MAYBE_REFERENCED(s)) {
+	    } else if (MAYBE_REFERENCED(s)) {
 		SEXP ss = allocVector(t, n);
 		memcpy(INTEGER(ss), INTEGER(s), n * sizeof(int));
 		SET_VECTOR_ELT(ans, na, ss);
@@ -1549,17 +1602,16 @@ SEXP attribute_hidden do_dotCode(SEXP call, SEXP op, SEXP args, SEXP env)
 		float *sptr = (float*) R_alloc(n, sizeof(float));
 		for (R_xlen_t i = 0 ; i < n ; i++) sptr[i] = (float) REAL(s)[i];
 		cargs[na] = (void*) sptr;
-		if (!dup) warning(_("single values not returned if not duplicated"));
 #ifdef R_MEMORY_PROFILING
 		if (RTRACE(s)) memtrace_report(s, sptr);
 #endif
-	    } else if (copy && dup) {
+	    } else if (copy) {
 		char *ptr = R_alloc(n * sizeof(double) + 2 * NG, 1);
 		memset(ptr, FILL, n * sizeof(double) + 2 * NG);
 		ptr += NG;
 		memcpy(ptr, REAL(s), n * sizeof(double));
 		cargs[na] = (void*) ptr;
-	    } else if (dup && MAYBE_REFERENCED(s)) {
+	    } else if (MAYBE_REFERENCED(s)) {
 		SEXP ss  = allocVector(t, n);
 		memcpy(REAL(ss), REAL(s), n * sizeof(double));
 		SET_VECTOR_ELT(ans, na, ss);
@@ -1576,13 +1628,13 @@ SEXP attribute_hidden do_dotCode(SEXP call, SEXP op, SEXP args, SEXP env)
 		for (R_xlen_t i = 0 ; i < n ; i++)
 		    if(!R_FINITE(zptr[i].r) || !R_FINITE(zptr[i].i))
 			error(_("complex NA/NaN/Inf in foreign function call (arg %d)"), na + 1);
-	    if (copy && dup) {
+	    if (copy) {
 		char *ptr = R_alloc(n * sizeof(Rcomplex) + 2 * NG, 1);
 		memset(ptr, FILL, n * sizeof(Rcomplex) + 2 * NG);
 		ptr += NG;
 		memcpy(ptr, COMPLEX(s), n * sizeof(Rcomplex));
 		cargs[na] = (void*) ptr;
-	    } else if (dup && MAYBE_REFERENCED(s)) {
+	    } else if (MAYBE_REFERENCED(s)) {
 		SEXP ss = allocVector(t, n);
 		memcpy(COMPLEX(ss), COMPLEX(s), n * sizeof(Rcomplex));
 		SET_VECTOR_ELT(ans, na, ss);
@@ -1593,8 +1645,6 @@ SEXP attribute_hidden do_dotCode(SEXP call, SEXP op, SEXP args, SEXP env)
 	    } else cargs[na] = (void *) zptr;
 	    break;
 	case STRSXP:
-	    if (!dup)
-		error(_("character variables must be duplicated in .C/.Fortran"));
 	    n = XLENGTH(s);
 	    if (Fort) {
 		const char *ss = translateChar(STRING_ELT(s, 0));
@@ -1658,25 +1708,25 @@ SEXP attribute_hidden do_dotCode(SEXP call, SEXP op, SEXP args, SEXP env)
 	case BUILTINSXP:
 	case SPECIALSXP:
 	case ENVSXP:
-	    if (Fort) error(_("invalid mode (%s) to pass to Fortran (arg %d)"), 
+	    if (Fort) error(_("invalid mode (%s) to pass to Fortran (arg %d)"),
 			    type2char(t), na + 1);
 	    cargs[na] =  (void*) s;
 	    break;
 	case NILSXP:
-	    error(_("invalid mode (%s) to pass to C or Fortran (arg %d)"), 
+	    error(_("invalid mode (%s) to pass to C or Fortran (arg %d)"),
 		  type2char(t), na + 1);
 	    cargs[na] =  (void*) s;
 	    break;
 	default:
 	    /* Includes pairlists from R 2.15.0 */
-	    if (Fort) error(_("invalid mode (%s) to pass to Fortran (arg %d)"), 
+	    if (Fort) error(_("invalid mode (%s) to pass to Fortran (arg %d)"),
 			    type2char(t), na + 1);
-	    warning("passing an object of type '%s' to .C (arg %d) is deprecated", 
+	    warning("passing an object of type '%s' to .C (arg %d) is deprecated",
 		    type2char(t), na + 1);
 	    if (t == LISTSXP)
 		warning(_("pairlists are passed as SEXP as from R 2.15.0"));
 	    cargs[na] =  (void*) s;
-	    continue;
+	    break;
 	}
 	if (nprotect) UNPROTECT(nprotect);
     }
@@ -2276,195 +2326,187 @@ SEXP attribute_hidden do_dotCode(SEXP call, SEXP op, SEXP args, SEXP env)
 	errorcall(call, _("too many arguments, sorry"));
     }
 
-    if (dup) {
+    for (na = 0, pa = args ; pa != R_NilValue ; pa = CDR(pa), na++) {
+	void *p = cargs[na];
+	SEXP arg = CAR(pa);
+	s = VECTOR_ELT(ans, na);
+	R_NativePrimitiveArgType type =
+	    checkTypes ? checkTypes[na] : TYPEOF(arg);
+	R_xlen_t n = xlength(arg);
 
-	for (na = 0, pa = args ; pa != R_NilValue ; pa = CDR(pa), na++) {
-	    if(argStyles && argStyles[na] == R_ARG_IN) {
-		SET_VECTOR_ELT(ans, na, R_NilValue);
-		continue;
+	switch(type) {
+	case RAWSXP:
+	    if (copy) {
+		s = allocVector(type, n);
+		unsigned char *ptr = (unsigned char *) p;
+		memcpy(RAW(s), ptr, n * sizeof(Rbyte));
+		ptr += n * sizeof(Rbyte);
+		for (int i = 0; i < NG; i++)
+		    if(*ptr++ != FILL)
+			error("array over-run in %s(\"%s\") in %s argument %d\n",
+			      Fort ? ".Fortran" : ".C",
+			      symName, type2char(type), na+1);
+		ptr = (unsigned char *) p;
+		for (int i = 0; i < NG; i++)
+		    if(*--ptr != FILL)
+			error("array under-run in %s(\"%s\") in %s argument %d\n",
+			      Fort ? ".Fortran" : ".C",
+			      symName, type2char(type), na+1);
+	    }
+	    break;
+	case INTSXP:
+	    if (copy) {
+		s = allocVector(type, n);
+		unsigned char *ptr = (unsigned char *) p;
+		memcpy(INTEGER(s), ptr, n * sizeof(int));
+		ptr += n * sizeof(int);
+		for (int i = 0; i < NG; i++)
+		    if(*ptr++ != FILL)
+			error("array over-run in %s(\"%s\") in %s argument %d\n",
+			      Fort ? ".Fortran" : ".C",
+			      symName, type2char(type), na+1);
+		ptr = (unsigned char *) p;
+		for (int i = 0; i < NG; i++)
+		    if(*--ptr != FILL)
+			error("array under-run in %s(\"%s\") in %s argument %d\n",
+			      Fort ? ".Fortran" : ".C",
+			      symName, type2char(type), na+1);
+	    }
+	    break;
+	case LGLSXP:
+	    if (copy) {
+		s = allocVector(type, n);
+		unsigned char *ptr = (unsigned char *) p;
+		int *iptr = (int*) ptr, tmp;
+		for (R_xlen_t i = 0 ; i < n ; i++) {
+		    tmp =  iptr[i];
+		    LOGICAL(s)[i] = (tmp == NA_INTEGER || tmp == 0) ? tmp : 1;
+		}
+		ptr += n * sizeof(int);
+		for (int i = 0; i < NG;  i++)
+		    if(*ptr++ != FILL)
+			error("array over-run in %s(\"%s\") in %s argument %d\n",
+			      Fort ? ".Fortran" : ".C",
+			      symName, type2char(type), na+1);
+		ptr = (unsigned char *) p;
+		for (int i = 0; i < NG; i++)
+		    if(*--ptr != FILL)
+			error("array under-run in %s(\"%s\") in %s argument %d\n",
+			      Fort ? ".Fortran" : ".C",
+			      symName, type2char(type), na+1);
 	    } else {
-		void *p = cargs[na];
-		SEXP arg = CAR(pa);
-		s = VECTOR_ELT(ans, na);
-		R_NativePrimitiveArgType type =
-		    checkTypes ? checkTypes[na] : TYPEOF(arg);
-	        R_xlen_t n = xlength(arg);
-
-		switch(type) {
-		case RAWSXP:
-		    if (copy) {
-			s = allocVector(type, n);
-			unsigned char *ptr = (unsigned char *) p;
-			memcpy(RAW(s), ptr, n * sizeof(Rbyte));
-			ptr += n * sizeof(Rbyte);
-			for (int i = 0; i < NG; i++)
-			    if(*ptr++ != FILL)
-				error("array over-run in %s(\"%s\") in %s argument %d\n", 
-				      Fort ? ".Fortran" : ".C",
-				      symName, type2char(type), na+1);
-			ptr = (unsigned char *) p;
-			for (int i = 0; i < NG; i++)
-			    if(*--ptr != FILL)
-				error("array under-run in %s(\"%s\") in %s argument %d\n", 
-				      Fort ? ".Fortran" : ".C",
-				      symName, type2char(type), na+1);
-		    }
-		    break;
-		case INTSXP:
-		    if (copy) {
-			s = allocVector(type, n);
-			unsigned char *ptr = (unsigned char *) p;
-			memcpy(INTEGER(s), ptr, n * sizeof(int));
-			ptr += n * sizeof(int);
-			for (int i = 0; i < NG; i++)
-			    if(*ptr++ != FILL)
-				error("array over-run in %s(\"%s\") in %s argument %d\n", 
-				      Fort ? ".Fortran" : ".C",
-				      symName, type2char(type), na+1);
-			ptr = (unsigned char *) p;
-			for (int i = 0; i < NG; i++)
-			    if(*--ptr != FILL)
-				error("array under-run in %s(\"%s\") in %s argument %d\n", 
-				      Fort ? ".Fortran" : ".C",
-				      symName, type2char(type), na+1);
-		    }
-		    break;
-		case LGLSXP:
-		    if (copy) {
-			s = allocVector(type, n);
-			unsigned char *ptr = (unsigned char *) p;
-			int *iptr = (int*) ptr, tmp;
-			for (R_xlen_t i = 0 ; i < n ; i++) {
-			    tmp =  iptr[i];
-			    LOGICAL(s)[i] = (tmp == NA_INTEGER || tmp == 0) ? tmp : 1;
-			}
-			ptr += n * sizeof(int);
-			for (int i = 0; i < NG;  i++)
-			    if(*ptr++ != FILL)
-				error("array over-run in %s(\"%s\") in %s argument %d\n", 
-				      Fort ? ".Fortran" : ".C",
-				      symName, type2char(type), na+1);
-			ptr = (unsigned char *) p;
-			for (int i = 0; i < NG; i++)
-			    if(*--ptr != FILL)
-				error("array under-run in %s(\"%s\") in %s argument %d\n", 
-				      Fort ? ".Fortran" : ".C",
-				      symName, type2char(type), na+1);
-		    } else {
-			int *iptr = INTEGER(arg), tmp;
-			for (R_xlen_t i = 0 ; i < n ; i++) {
-			    tmp =  iptr[i];
-			    iptr[i] = (tmp == NA_INTEGER || tmp == 0) ? tmp : 1;
-			}
-		    }
-		    break;
-		case REALSXP:
-		case SINGLESXP:
-		    if (copy) {
-			s = allocVector(REALSXP, n);
-			if (type == SINGLESXP || asLogical(getAttrib(arg, CSingSymbol)) == 1) {
-			    float *sptr = (float*) p;
-			    for(R_xlen_t i = 0 ; i < n ; i++) 
-				REAL(s)[i] = (double) sptr[i];
-			} else {
-			    unsigned char *ptr = (unsigned char *) p;
-			    memcpy(REAL(s), ptr, n * sizeof(double));
-			    ptr += n * sizeof(double);
-			    for (int i = 0; i < NG; i++)
-				if(*ptr++ != FILL)
-				    error("array over-run in %s(\"%s\") in %s argument %d\n", 
-					  Fort ? ".Fortran" : ".C",
-					  symName, type2char(type), na+1);
-			    ptr = (unsigned char *) p;
-			    for (int i = 0; i < NG; i++)
-				if(*--ptr != FILL)
-				    error("array under-run in %s(\"%s\") in %s argument %d\n", 
-					  Fort ? ".Fortran" : ".C",
-					  symName, type2char(type), na+1);
-			}
-		    } else {
-			if (type == SINGLESXP || asLogical(getAttrib(arg, CSingSymbol)) == 1) {
-			    s = allocVector(REALSXP, n);
-			    float *sptr = (float*) p;
-			    for(int i = 0 ; i < n ; i++) 
-				REAL(s)[i] = (double) sptr[i];
-			}
-		    }
-		    break;			
-		case CPLXSXP:
-		    if (copy) {
-			s = allocVector(type, n);
-			unsigned char *ptr = (unsigned char *) p;
-			memcpy(COMPLEX(s), p, n * sizeof(Rcomplex));
-			ptr += n * sizeof(Rcomplex);
-			for (int i = 0; i < NG;  i++) 
-			    if(*ptr++ != FILL)
-				error("array over-run in %s(\"%s\") in %s argument %d\n", 
-				      Fort ? ".Fortran" : ".C",
-				      symName, type2char(type), na+1);
-			ptr = (unsigned char *) p;
-			for (int i = 0; i < NG; i++)
+		int *iptr = INTEGER(arg), tmp;
+		for (R_xlen_t i = 0 ; i < n ; i++) {
+		    tmp =  iptr[i];
+		    iptr[i] = (tmp == NA_INTEGER || tmp == 0) ? tmp : 1;
+		}
+	    }
+	    break;
+	case REALSXP:
+	case SINGLESXP:
+	    if (copy) {
+		s = allocVector(REALSXP, n);
+		if (type == SINGLESXP || asLogical(getAttrib(arg, CSingSymbol)) == 1) {
+		    float *sptr = (float*) p;
+		    for(R_xlen_t i = 0 ; i < n ; i++)
+			REAL(s)[i] = (double) sptr[i];
+		} else {
+		    unsigned char *ptr = (unsigned char *) p;
+		    memcpy(REAL(s), ptr, n * sizeof(double));
+		    ptr += n * sizeof(double);
+		    for (int i = 0; i < NG; i++)
+			if(*ptr++ != FILL)
+			    error("array over-run in %s(\"%s\") in %s argument %d\n",
+				  Fort ? ".Fortran" : ".C",
+				  symName, type2char(type), na+1);
+		    ptr = (unsigned char *) p;
+		    for (int i = 0; i < NG; i++)
+			if(*--ptr != FILL)
+			    error("array under-run in %s(\"%s\") in %s argument %d\n",
+				  Fort ? ".Fortran" : ".C",
+				  symName, type2char(type), na+1);
+		}
+	    } else {
+		if (type == SINGLESXP || asLogical(getAttrib(arg, CSingSymbol)) == 1) {
+		    s = allocVector(REALSXP, n);
+		    float *sptr = (float*) p;
+		    for(int i = 0 ; i < n ; i++)
+			REAL(s)[i] = (double) sptr[i];
+		}
+	    }
+	    break;
+	case CPLXSXP:
+	    if (copy) {
+		s = allocVector(type, n);
+		unsigned char *ptr = (unsigned char *) p;
+		memcpy(COMPLEX(s), p, n * sizeof(Rcomplex));
+		ptr += n * sizeof(Rcomplex);
+		for (int i = 0; i < NG;  i++)
+		    if(*ptr++ != FILL)
+			error("array over-run in %s(\"%s\") in %s argument %d\n",
+			      Fort ? ".Fortran" : ".C",
+			      symName, type2char(type), na+1);
+		ptr = (unsigned char *) p;
+		for (int i = 0; i < NG; i++)
+		    if(*--ptr != FILL)
+			error("array under-run in %s(\"%s\") in %s argument %d\n",
+			      Fort ? ".Fortran" : ".C",
+			      symName, type2char(type), na+1);
+	    }
+	    break;
+	case STRSXP:
+	    if(Fort) {
+		char buf[256];
+		/* only return one string: warned on the R -> Fortran step */
+		strncpy(buf, (char*)p, 255);
+		buf[255] = '\0';
+		PROTECT(s = allocVector(type, 1));
+		SET_STRING_ELT(s, 0, mkChar(buf));
+		UNPROTECT(1);
+	    } else if (copy) {
+		SEXP ss = arg;
+		PROTECT(s = allocVector(type, n));
+		char **cptr = (char**) p, **cptr0 = (char**) cargs0[na];
+		for (R_xlen_t i = 0 ; i < n ; i++) {
+		    unsigned char *ptr = (unsigned char *) cptr[i];
+		    SET_STRING_ELT(s, i, mkChar(cptr[i]));
+		    if (cptr[i] == cptr0[i]) {
+			const char *z = translateChar(STRING_ELT(ss, i));
+			for (int j = 0; j < NG; j++)
 			    if(*--ptr != FILL)
-				error("array under-run in %s(\"%s\") in %s argument %d\n", 
-				      Fort ? ".Fortran" : ".C",
-				      symName, type2char(type), na+1);
-		    }
-		    break;
-		case STRSXP:
-		    if(Fort) {
-			char buf[256];
-			/* only return one string: warned on the R -> Fortran step */
-			strncpy(buf, (char*)p, 255);
-			buf[255] = '\0';
-			PROTECT(s = allocVector(type, 1));
-			SET_STRING_ELT(s, 0, mkChar(buf));
-			UNPROTECT(1);
-		    } else if (copy) {
-			SEXP ss = arg;
-			PROTECT(s = allocVector(type, n));
-			char **cptr = (char**) p, **cptr0 = (char**) cargs0[na];
-			for (R_xlen_t i = 0 ; i < n ; i++) {
-			    unsigned char *ptr = (unsigned char *) cptr[i];
-			    SET_STRING_ELT(s, i, mkChar(cptr[i]));
-			    if (cptr[i] == cptr0[i]) {
-				    const char *z = translateChar(STRING_ELT(ss, i));
-				for (int j = 0; j < NG; j++)
-				    if(*--ptr != FILL)
-					error("array under-run in .C(\"%s\") in character argument %d, element %d", 
-					      symName, na+1, (int)(i+1));
-				ptr = (unsigned char *) cptr[i];
-				ptr += strlen(z) + 1;
-				for (int j = 0; j < NG;  j++) 
-				    if(*ptr++ != FILL) {
-					 // force termination
-					unsigned char *p = ptr;
-					for (int k = 1; k < NG - j; k++, p++)
-					    if (*p == FILL) *p = '\0';
-					error("array over-run in .C(\"%s\") in character argument %d, element %d\n'%s'->'%s'\n", 
-					      symName, na+1, (int)(i+1), 
-					      z, cptr[i]);
-				    }
+				error("array under-run in .C(\"%s\") in character argument %d, element %d",
+				      symName, na+1, (int)(i+1));
+			ptr = (unsigned char *) cptr[i];
+			ptr += strlen(z) + 1;
+			for (int j = 0; j < NG;  j++)
+			    if(*ptr++ != FILL) {
+				// force termination
+				unsigned char *p = ptr;
+				for (int k = 1; k < NG - j; k++, p++)
+				    if (*p == FILL) *p = '\0';
+				error("array over-run in .C(\"%s\") in character argument %d, element %d\n'%s'->'%s'\n",
+				      symName, na+1, (int)(i+1),
+				      z, cptr[i]);
 			    }
-			}
-			UNPROTECT(1);
-		    } else {
-			PROTECT(s = allocVector(type, n));
-			char **cptr = (char**) p;
-			for (R_xlen_t i = 0 ; i < n ; i++)
-			    SET_STRING_ELT(s, i, mkChar(cptr[i]));
-			UNPROTECT(1);
 		    }
-		    break;
-		default:
-		    break;
-		}
-		if (s != arg) {
-		    PROTECT(s);
-		    DUPLICATE_ATTRIB(s, arg);
-		    SET_VECTOR_ELT(ans, na, s);
-		    UNPROTECT(1);
 		}
+		UNPROTECT(1);
+	    } else {
+		PROTECT(s = allocVector(type, n));
+		char **cptr = (char**) p;
+		for (R_xlen_t i = 0 ; i < n ; i++)
+		    SET_STRING_ELT(s, i, mkChar(cptr[i]));
+		UNPROTECT(1);
 	    }
+	    break;
+	default:
+	    break;
+	}
+	if (s != arg) {
+	    PROTECT(s);
+	    SHALLOW_DUPLICATE_ATTRIB(s, arg);
+	    SET_VECTOR_ELT(ans, na, s);
+	    UNPROTECT(1);
 	}
     }
     UNPROTECT(1);
@@ -2501,7 +2543,7 @@ static int string2type(char *s)
 }
 
 /* This is entirely legacy, with no known users (Mar 2012).
-   So we freeze the code involved. 
+   So we freeze the code involved.
  */
 
 static void *RObjToCPtr2(SEXP s)
diff --git a/src/main/dounzip.c b/src/main/dounzip.c
index b79a22b..f6f1d49 100644
--- a/src/main/dounzip.c
+++ b/src/main/dounzip.c
@@ -1,7 +1,7 @@
 /*
  *  R : A Computer Language for Statistical Data Analysis
  *  file dounzip.c
- *  first part Copyright (C) 2002-2014  The R Core Team
+ *  first part Copyright (C) 2002-2017  The R Core Team
  *  second part Copyright (C) 1998-2010 Gilles Vollant
  *
  *  This program is free software; you can redistribute it and/or modify
@@ -16,7 +16,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  */
 
 #ifdef HAVE_CONFIG_H
@@ -125,8 +125,8 @@ extract_one(unzFile uf, const char *const dest, const char * const filename,
     fn = filename_inzip; /* might be UTF-8 ... */
     if (filename) {
 	if (strlen(dest) + strlen(filename) > PATH_MAX - 2) return 1;
-	strncpy(fn0, filename, PATH_MAX); 
-        fn0[PATH_MAX - 1] = '\0';
+	strncpy(fn0, filename, PATH_MAX);
+	fn0[PATH_MAX - 1] = '\0';
 	fn = fn0;
     }
 #ifdef Win32
@@ -220,7 +220,7 @@ zipunzip(const char *zipname, const char *dest, int nfiles, const char **files,
 		PROTECT(names);
 		copyVector(names, onames);
 	    }
-	    if ((err = extract_one(uf, dest, NULL, names, nnames, 
+	    if ((err = extract_one(uf, dest, NULL, names, nnames,
 				   overwrite, junk, setTime)) != UNZ_OK) break;
 #ifdef Win32
 	    R_ProcessEvents();
@@ -231,7 +231,7 @@ zipunzip(const char *zipname, const char *dest, int nfiles, const char **files,
     } else {
 	for (i = 0; i < nfiles; i++) {
 	    if ((err = unzLocateFile(uf, files[i], 1)) != UNZ_OK) break;
-	    if ((err = extract_one(uf, dest, files[i], names, nnames, 
+	    if ((err = extract_one(uf, dest, files[i], names, nnames,
 				   overwrite, junk, setTime)) != UNZ_OK) break;
 #ifdef Win32
 	    R_ProcessEvents();
@@ -259,7 +259,7 @@ static SEXP ziplist(const char *zipname)
     gi.number_entry = 0; /* =Wall */
     err = unzGetGlobalInfo64 (uf, &gi);
     if (err != UNZ_OK)
-        error("error %d with zipfile in unzGetGlobalInfo", err);
+	error("error %d with zipfile in unzGetGlobalInfo", err);
     nfiles = (int) gi.number_entry;
     /* name, length, datetime */
     PROTECT(ans = allocVector(VECSXP, 3));
@@ -268,13 +268,13 @@ static SEXP ziplist(const char *zipname)
     SET_VECTOR_ELT(ans, 2, dates = allocVector(STRSXP, nfiles));
 
     for (i = 0; i < nfiles; i++) {
-        char filename_inzip[PATH_MAX], date[50];
-        unz_file_info64 file_info;
+	char filename_inzip[PATH_MAX], date[50];
+	unz_file_info64 file_info;
 
-        err = unzGetCurrentFileInfo64(uf, &file_info, filename_inzip, 
+	err = unzGetCurrentFileInfo64(uf, &file_info, filename_inzip,
 				      sizeof(filename_inzip), NULL, 0, NULL, 0);
-        if (err != UNZ_OK)
-            error("error %d with zipfile in unzGetCurrentFileInfo\n", err);
+	if (err != UNZ_OK)
+	    error("error %d with zipfile in unzGetCurrentFileInfo\n", err);
 	/* In theory at least bit 11 of the flag tells us that the
 	   filename is in UTF-8, so FIXME */
 	SET_STRING_ELT(names, i, mkChar(filename_inzip));
@@ -287,11 +287,11 @@ static SEXP ziplist(const char *zipname)
 		 file_info.tmu_date.tm_min);
 	SET_STRING_ELT(dates, i, mkChar(date));
 
-        if (i < nfiles - 1) {
-            err = unzGoToNextFile(uf);
-            if (err != UNZ_OK)
-                error("error %d with zipfile in unzGoToNextFile\n",err);
-        }
+	if (i < nfiles - 1) {
+	    err = unzGoToNextFile(uf);
+	    if (err != UNZ_OK)
+		error("error %d with zipfile in unzGoToNextFile\n",err);
+	}
     }
     unzClose(uf);
 
@@ -356,7 +356,7 @@ SEXP Runzip(SEXP args)
 	PROTECT(names = allocVector(STRSXP, ntopics));
     else
 	PROTECT(names = allocVector(STRSXP, 5000));
-    rc = zipunzip(zipname, dest, ntopics, topics, &names, &nnames, 
+    rc = zipunzip(zipname, dest, ntopics, topics, &names, &nnames,
 		  overwrite, junk, setTime);
     if (rc != UNZ_OK)
 	switch(rc) {
@@ -465,23 +465,20 @@ static size_t unz_read(void *ptr, size_t size, size_t nitems,
     return unzReadCurrentFile(uf, ptr, (unsigned int)(size*nitems))/size;
 }
 
-static int null_vfprintf(Rconnection con, const char *format, va_list ap)
+static int NORET null_vfprintf(Rconnection con, const char *format, va_list ap)
 {
     error(_("printing not enabled for this connection"));
-    return 0; /* -Wall */
 }
 
-static size_t null_write(const void *ptr, size_t size, size_t nitems,
+static size_t NORET null_write(const void *ptr, size_t size, size_t nitems,
 			 Rconnection con)
 {
     error(_("write not enabled for this connection"));
-    return 0; /* -Wall */
 }
 
-static double null_seek(Rconnection con, double where, int origin, int rw)
+static double NORET null_seek(Rconnection con, double where, int origin, int rw)
 {
     error(_("seek not enabled for this connection"));
-    return 0; /* -Wall */
 }
 
 static int null_fflush(Rconnection con)
@@ -499,12 +496,14 @@ R_newunz(const char *description, const char *const mode)
     if(!new->class) {
 	free(new);
 	error(_("allocation of 'unz' connection failed"));
+	/* for Solaris 12.5 */ new = NULL;
     }
     strcpy(new->class, "unz");
     new->description = (char *) malloc(strlen(description) + 1);
     if(!new->description) {
 	free(new->class); free(new);
 	error(_("allocation of 'unz' connection failed"));
+	/* for Solaris 12.5 */ new = NULL;
     }
     init_con(new, description, CE_NATIVE, mode);
 
@@ -522,6 +521,7 @@ R_newunz(const char *description, const char *const mode)
     if(!new->private) {
 	free(new->description); free(new->class); free(new);
 	error(_("allocation of 'unz' connection failed"));
+	/* for Solaris 12.5 */ new = NULL;
     }
     return new;
 }
@@ -634,12 +634,12 @@ typedef struct
 
     ZPOS64_T size_central_dir;     /* size of the central directory  */
     ZPOS64_T offset_central_dir;   /* offset of start of central directory with
-                                   respect to the starting disk number */
+				   respect to the starting disk number */
 
     unz_file_info64 cur_file_info; /* public info about the current file in zip*/
     unz_file_info64_internal cur_file_info_internal; /* private info about it*/
     file_in_zip64_read_info_s* pfile_in_zip_read; /* structure about the current
-                                        file if we are decompressing it */
+					file if we are decompressing it */
     int encrypted;
 
     int isZip64;
@@ -658,15 +658,15 @@ local int unz64local_getByte(voidpf filestream, int *pi)
     int err = (int) fread_func(filestream, &c, 1);
     if (err == 1)
     {
-        *pi = (int)c;
-        return UNZ_OK;
+	*pi = (int)c;
+	return UNZ_OK;
     }
     else
     {
-        if (ferror_func(filestream))
-            return UNZ_ERRNO;
-        else
-            return UNZ_EOF;
+	if (ferror_func(filestream))
+	    return UNZ_ERRNO;
+	else
+	    return UNZ_EOF;
     }
 }
 
@@ -684,13 +684,13 @@ local int unz64local_getShort (voidpf filestream, uLong *pX)
     x = (uLong)i;
 
     if (err == UNZ_OK)
-        err = unz64local_getByte(filestream,&i);
+	err = unz64local_getByte(filestream,&i);
     x |= ((uLong)i)<<8;
 
     if (err == UNZ_OK)
-        *pX = x;
+	*pX = x;
     else
-        *pX = 0;
+	*pX = 0;
     return err;
 }
 
@@ -704,21 +704,21 @@ local int unz64local_getLong (voidpf filestream, uLong *pX)
     x = (uLong)i;
 
     if (err == UNZ_OK)
-        err = unz64local_getByte(filestream, &i);
+	err = unz64local_getByte(filestream, &i);
     x |= ((uLong)i)<<8;
 
     if (err == UNZ_OK)
-        err = unz64local_getByte(filestream, &i);
+	err = unz64local_getByte(filestream, &i);
     x |= ((uLong)i)<<16;
 
     if (err == UNZ_OK)
-        err = unz64local_getByte(filestream, &i);
+	err = unz64local_getByte(filestream, &i);
     x += ((uLong)i)<<24;
 
     if (err == UNZ_OK)
-        *pX = x;
+	*pX = x;
     else
-        *pX = 0;
+	*pX = 0;
     return err;
 }
 
@@ -732,60 +732,60 @@ local int unz64local_getLong64 (voidpf filestream, ZPOS64_T *pX)
     x = (ZPOS64_T)i;
 
     if (err == UNZ_OK)
-        err = unz64local_getByte(filestream,&i);
+	err = unz64local_getByte(filestream,&i);
     x |= ((ZPOS64_T)i) << 8;
 
     if (err == UNZ_OK)
-        err = unz64local_getByte(filestream,&i);
+	err = unz64local_getByte(filestream,&i);
     x |= ((ZPOS64_T)i) << 16;
 
     if (err == UNZ_OK)
-        err = unz64local_getByte(filestream,&i);
+	err = unz64local_getByte(filestream,&i);
     x |= ((ZPOS64_T)i) << 24;
 
     if (err == UNZ_OK)
-        err = unz64local_getByte(filestream,&i);
+	err = unz64local_getByte(filestream,&i);
     x |= ((ZPOS64_T)i) << 32;
 
     if (err == UNZ_OK)
-        err = unz64local_getByte(filestream,&i);
+	err = unz64local_getByte(filestream,&i);
     x |= ((ZPOS64_T)i) << 40;
 
     if (err == UNZ_OK)
-        err = unz64local_getByte(filestream,&i);
+	err = unz64local_getByte(filestream,&i);
     x |= ((ZPOS64_T)i) << 48;
 
     if (err == UNZ_OK)
-        err = unz64local_getByte(filestream,&i);
+	err = unz64local_getByte(filestream,&i);
     x |= ((ZPOS64_T)i) << 56;
 
     if (err == UNZ_OK)
-        *pX = x;
+	*pX = x;
     else
-        *pX = 0;
+	*pX = 0;
     return err;
 }
 
 /* My own strcmpi / strcasecmp */
-local int 
+local int
 strcmpcasenosensitive_internal (const char* fileName1, const char* fileName2)
 {
     for (;;)
     {
-        char c1 = *(fileName1++);
-        char c2 = *(fileName2++);
-        if ((c1 >= 'a') && (c1 <= 'z'))
-            c1 -= 0x20;
-        if ((c2 >= 'a') && (c2 <= 'z'))
-            c2 -= 0x20;
-        if (c1 == '\0')
-            return ((c2 == '\0') ? 0 : -1);
-        if (c2 == '\0')
-            return 1;
-        if (c1 < c2)
-            return -1;
-        if (c1 > c2)
-            return 1;
+	char c1 = *(fileName1++);
+	char c2 = *(fileName2++);
+	if ((c1 >= 'a') && (c1 <= 'z'))
+	    c1 -= 0x20;
+	if ((c2 >= 'a') && (c2 <= 'z'))
+	    c2 -= 0x20;
+	if (c1 == '\0')
+	    return ((c2 == '\0') ? 0 : -1);
+	if (c2 == '\0')
+	    return 1;
+	if (c1 < c2)
+	    return -1;
+	if (c1 > c2)
+	    return 1;
     }
 }
 
@@ -804,9 +804,9 @@ strcmpcasenosensitive_internal (const char* fileName1, const char* fileName2)
    Compare two filename (fileName1,fileName2).
    If iCaseSenisivity = 1, comparision is case sensitivity (like strcmp)
    If iCaseSenisivity = 2, comparision is not case sensitivity (like strcmpi
-                                                                or strcasecmp)
+								or strcasecmp)
    If iCaseSenisivity = 0, case sensitivity is defaut of your operating system
-        (like 1 on Unix, 2 on Windows)
+	(like 1 on Unix, 2 on Windows)
 
 */
 extern int ZEXPORT unzStringFileNameCompare (const char*  fileName1,
@@ -815,10 +815,10 @@ extern int ZEXPORT unzStringFileNameCompare (const char*  fileName1,
 
 {
     if (iCaseSensitivity == 0)
-        iCaseSensitivity = CASESENSITIVITYDEFAULTVALUE;
+	iCaseSensitivity = CASESENSITIVITYDEFAULTVALUE;
 
     if (iCaseSensitivity == 1)
-        return strcmp(fileName1, fileName2);
+	return strcmp(fileName1, fileName2);
 
     return STRCMPCASENOSENTIVEFUNCTION(fileName1, fileName2);
 }
@@ -840,48 +840,48 @@ local ZPOS64_T unz64local_SearchCentralDir(voidpf filestream)
     ZPOS64_T uPosFound = 0;
 
     if (fseek_func(filestream, 0, ZLIB_FILEFUNC_SEEK_END) != 0)
-        return 0;
+	return 0;
 
 
     uSizeFile = ftell_func(filestream);
 
     if (uMaxBack>uSizeFile)
-        uMaxBack = uSizeFile;
+	uMaxBack = uSizeFile;
 
     buf = (unsigned char*)ALLOC(BUFREADCOMMENT+4);
     if (buf == NULL)
-        return 0;
+	return 0;
 
     uBackRead = 4;
     while (uBackRead < uMaxBack)
     {
-        size_t uReadSize;
-        ZPOS64_T uReadPos ;
-        int i;
-        if (uBackRead+BUFREADCOMMENT > uMaxBack)
-            uBackRead = uMaxBack;
-        else
-            uBackRead += BUFREADCOMMENT;
-        uReadPos = uSizeFile - uBackRead ;
-
-        uReadSize = ((BUFREADCOMMENT+4) < (uSizeFile-uReadPos)) ?
-                     (BUFREADCOMMENT+4) : (uLong)(uSizeFile-uReadPos);
-        if (fseek_func(filestream, uReadPos, ZLIB_FILEFUNC_SEEK_SET) != 0)
-            break;
-
-        if (fread_func(filestream, buf, uReadSize) != uReadSize)
-            break;
-
-        for (i = (int)uReadSize-3; (i--) > 0;)
-            if (((*(buf+i)) == 0x50) && ((*(buf+i+1)) == 0x4b) &&
-                ((*(buf+i+2)) == 0x05) && ((*(buf+i+3)) == 0x06))
-            {
-                uPosFound = uReadPos+i;
-                break;
-            }
-
-        if (uPosFound != 0)
-            break;
+	size_t uReadSize;
+	ZPOS64_T uReadPos ;
+	int i;
+	if (uBackRead+BUFREADCOMMENT > uMaxBack)
+	    uBackRead = uMaxBack;
+	else
+	    uBackRead += BUFREADCOMMENT;
+	uReadPos = uSizeFile - uBackRead ;
+
+	uReadSize = ((BUFREADCOMMENT+4) < (uSizeFile-uReadPos)) ?
+		     (BUFREADCOMMENT+4) : (uLong)(uSizeFile-uReadPos);
+	if (fseek_func(filestream, uReadPos, ZLIB_FILEFUNC_SEEK_SET) != 0)
+	    break;
+
+	if (fread_func(filestream, buf, uReadSize) != uReadSize)
+	    break;
+
+	for (i = (int)uReadSize-3; (i--) > 0;)
+	    if (((*(buf+i)) == 0x50) && ((*(buf+i+1)) == 0x4b) &&
+		((*(buf+i+2)) == 0x05) && ((*(buf+i+3)) == 0x06))
+	    {
+		uPosFound = uReadPos+i;
+		break;
+	    }
+
+	if (uPosFound != 0)
+	    break;
     }
     TRYFREE(buf);
     return uPosFound;
@@ -892,7 +892,7 @@ local ZPOS64_T unz64local_SearchCentralDir(voidpf filestream)
   Locate the Central directory 64 of a zipfile (at the end, just before
     the global comment)
 */
-local ZPOS64_T 
+local ZPOS64_T
 unz64local_SearchCentralDir64(voidpf filestream)
 {
     unsigned char* buf;
@@ -904,87 +904,87 @@ unz64local_SearchCentralDir64(voidpf filestream)
     ZPOS64_T relativeOffset;
 
     if (fseek_func(filestream, 0, ZLIB_FILEFUNC_SEEK_END) != 0)
-        return 0;
+	return 0;
 
 
     uSizeFile = ftell_func(filestream);
 
     if (uMaxBack > uSizeFile)
-        uMaxBack = uSizeFile;
+	uMaxBack = uSizeFile;
 
     buf = (unsigned char*)ALLOC(BUFREADCOMMENT+4);
     if (buf == NULL)
-        return 0;
+	return 0;
 
     uBackRead = 4;
     while (uBackRead<uMaxBack)
     {
-        size_t uReadSize;
-        ZPOS64_T uReadPos;
-        int i;
-        if (uBackRead+BUFREADCOMMENT>uMaxBack)
-            uBackRead = uMaxBack;
-        else
-            uBackRead += BUFREADCOMMENT;
-        uReadPos = uSizeFile - uBackRead ;
-
-        uReadSize = ((BUFREADCOMMENT+4) < (uSizeFile-uReadPos)) ?
-                     (BUFREADCOMMENT+4) : (uLong)(uSizeFile-uReadPos);
-        if (fseek_func(filestream, uReadPos, ZLIB_FILEFUNC_SEEK_SET) != 0)
-            break;
-
-        if (fread_func(filestream, buf, uReadSize) != uReadSize)
-            break;
-
-        for (i = (int)uReadSize-3; (i--) > 0;)
-            if (((*(buf+i)) == 0x50) && ((*(buf+i+1)) == 0x4b) &&
-                ((*(buf+i+2)) == 0x06) && ((*(buf+i+3)) == 0x07))
-            {
-                uPosFound = uReadPos+i;
-                break;
-            }
-
-        if (uPosFound != 0)
-            break;
+	size_t uReadSize;
+	ZPOS64_T uReadPos;
+	int i;
+	if (uBackRead+BUFREADCOMMENT>uMaxBack)
+	    uBackRead = uMaxBack;
+	else
+	    uBackRead += BUFREADCOMMENT;
+	uReadPos = uSizeFile - uBackRead ;
+
+	uReadSize = ((BUFREADCOMMENT+4) < (uSizeFile-uReadPos)) ?
+		     (BUFREADCOMMENT+4) : (uLong)(uSizeFile-uReadPos);
+	if (fseek_func(filestream, uReadPos, ZLIB_FILEFUNC_SEEK_SET) != 0)
+	    break;
+
+	if (fread_func(filestream, buf, uReadSize) != uReadSize)
+	    break;
+
+	for (i = (int)uReadSize-3; (i--) > 0;)
+	    if (((*(buf+i)) == 0x50) && ((*(buf+i+1)) == 0x4b) &&
+		((*(buf+i+2)) == 0x06) && ((*(buf+i+3)) == 0x07))
+	    {
+		uPosFound = uReadPos+i;
+		break;
+	    }
+
+	if (uPosFound != 0)
+	    break;
     }
     TRYFREE(buf);
     if (uPosFound == 0)
-        return 0;
+	return 0;
 
     /* Zip64 end of central directory locator */
     if (fseek_func(filestream, uPosFound, ZLIB_FILEFUNC_SEEK_SET) != 0)
-        return 0;
+	return 0;
 
     /* the signature, already checked */
     if (unz64local_getLong(filestream, &uL) != UNZ_OK)
-        return 0;
+	return 0;
 
     /* number of the disk with the start of the zip64 end of  central directory */
     if (unz64local_getLong(filestream, &uL) != UNZ_OK)
-        return 0;
+	return 0;
     if (uL != 0)
-        return 0;
+	return 0;
 
     /* relative offset of the zip64 end of central directory record */
     if (unz64local_getLong64(filestream, &relativeOffset) != UNZ_OK)
-        return 0;
+	return 0;
 
     /* total number of disks */
     if (unz64local_getLong(filestream, &uL) != UNZ_OK)
-        return 0;
+	return 0;
     if (uL != 1)
-        return 0;
+	return 0;
 
     /* Goto end of central directory record */
     if (fseek_func(filestream, relativeOffset, ZLIB_FILEFUNC_SEEK_SET) != 0)
-        return 0;
+	return 0;
 
      /* the signature */
     if (unz64local_getLong(filestream, &uL) != UNZ_OK)
-        return 0;
+	return 0;
 
     if (uL != 0x06064b50)
-        return 0;
+	return 0;
 
     return relativeOffset;
 }
@@ -1006,17 +1006,17 @@ local unzFile unzOpenInternal (const void *path, int is64bitOpenFunction)
     uLong   uL;
 
     uLong number_disk;          /* number of the current dist, used for
-                                   spaning ZIP, unsupported, always 0*/
-    uLong number_disk_with_CD;  /* number the the disk with central dir, used
-                                   for spaning ZIP, unsupported, always 0*/
+				   spaning ZIP, unsupported, always 0*/
+    uLong number_disk_with_CD;  /* number the disk with central dir, used
+				   for spaning ZIP, unsupported, always 0*/
     ZPOS64_T number_entry_CD;      /* total number of entries in
-                                   the central dir
-                                   (same than number_entry on nospan) */
+				   the central dir
+				   (same than number_entry on nospan) */
 
     int err=UNZ_OK;
 
     if (unz_copyright[0] != ' ')
-        return NULL;
+	return NULL;
 
     us.is64bitOpenFunction = is64bitOpenFunction;
 
@@ -1026,133 +1026,133 @@ local unzFile unzOpenInternal (const void *path, int is64bitOpenFunction)
 			       ZLIB_FILEFUNC_MODE_READ |
 			       ZLIB_FILEFUNC_MODE_EXISTING);
     if (us.filestream == NULL)
-        return NULL;
+	return NULL;
 
     central_pos = unz64local_SearchCentralDir64(us.filestream);
     if (central_pos)
     {
-        uLong uS;
-        ZPOS64_T uL64;
+	uLong uS;
+	ZPOS64_T uL64;
 
-        us.isZip64 = 1;
+	us.isZip64 = 1;
 
-        if (fseek_func(us.filestream, central_pos, ZLIB_FILEFUNC_SEEK_SET) != 0)
-        err = UNZ_ERRNO;
+	if (fseek_func(us.filestream, central_pos, ZLIB_FILEFUNC_SEEK_SET) != 0)
+	err = UNZ_ERRNO;
 
-        /* the signature, already checked */
-        if (unz64local_getLong(us.filestream, &uL) != UNZ_OK)
-            err = UNZ_ERRNO;
+	/* the signature, already checked */
+	if (unz64local_getLong(us.filestream, &uL) != UNZ_OK)
+	    err = UNZ_ERRNO;
 
-        /* size of zip64 end of central directory record */
-        if (unz64local_getLong64(us.filestream, &uL64) != UNZ_OK)
-            err = UNZ_ERRNO;
+	/* size of zip64 end of central directory record */
+	if (unz64local_getLong64(us.filestream, &uL64) != UNZ_OK)
+	    err = UNZ_ERRNO;
 
-        /* version made by */
-        if (unz64local_getShort(us.filestream, &uS) != UNZ_OK)
-            err = UNZ_ERRNO;
+	/* version made by */
+	if (unz64local_getShort(us.filestream, &uS) != UNZ_OK)
+	    err = UNZ_ERRNO;
 
-        /* version needed to extract */
-        if (unz64local_getShort(us.filestream, &uS) != UNZ_OK)
-            err = UNZ_ERRNO;
+	/* version needed to extract */
+	if (unz64local_getShort(us.filestream, &uS) != UNZ_OK)
+	    err = UNZ_ERRNO;
 
-        /* number of this disk */
-        if (unz64local_getLong(us.filestream, &number_disk) != UNZ_OK)
-            err = UNZ_ERRNO;
+	/* number of this disk */
+	if (unz64local_getLong(us.filestream, &number_disk) != UNZ_OK)
+	    err = UNZ_ERRNO;
 
-        /* number of the disk with the start of the central directory */
-        if (unz64local_getLong(us.filestream, &number_disk_with_CD) != UNZ_OK)
-            err = UNZ_ERRNO;
+	/* number of the disk with the start of the central directory */
+	if (unz64local_getLong(us.filestream, &number_disk_with_CD) != UNZ_OK)
+	    err = UNZ_ERRNO;
 
-        /* total number of entries in the central directory on this disk */
-        if (unz64local_getLong64(us.filestream, &us.gi.number_entry) != UNZ_OK)
-            err = UNZ_ERRNO;
+	/* total number of entries in the central directory on this disk */
+	if (unz64local_getLong64(us.filestream, &us.gi.number_entry) != UNZ_OK)
+	    err = UNZ_ERRNO;
 
-        /* total number of entries in the central directory */
-        if (unz64local_getLong64(us.filestream, &number_entry_CD) != UNZ_OK)
-            err = UNZ_ERRNO;
+	/* total number of entries in the central directory */
+	if (unz64local_getLong64(us.filestream, &number_entry_CD) != UNZ_OK)
+	    err = UNZ_ERRNO;
 
-        if ((number_entry_CD != us.gi.number_entry) ||
-            (number_disk_with_CD != 0) ||
-            (number_disk != 0))
-            err = UNZ_BADZIPFILE;
+	if ((number_entry_CD != us.gi.number_entry) ||
+	    (number_disk_with_CD != 0) ||
+	    (number_disk != 0))
+	    err = UNZ_BADZIPFILE;
 
-        /* size of the central directory */
-        if (unz64local_getLong64(us.filestream, &us.size_central_dir) != UNZ_OK)
-            err = UNZ_ERRNO;
+	/* size of the central directory */
+	if (unz64local_getLong64(us.filestream, &us.size_central_dir) != UNZ_OK)
+	    err = UNZ_ERRNO;
 
-        /* offset of start of central directory with respect to the
-          starting disk number */
-        if (unz64local_getLong64(us.filestream, &us.offset_central_dir) != UNZ_OK)
-            err = UNZ_ERRNO;
+	/* offset of start of central directory with respect to the
+	  starting disk number */
+	if (unz64local_getLong64(us.filestream, &us.offset_central_dir) != UNZ_OK)
+	    err = UNZ_ERRNO;
 
-        us.gi.size_comment = 0;
+	us.gi.size_comment = 0;
     }
     else
     {
-        central_pos = unz64local_SearchCentralDir(us.filestream);
-        if (central_pos == 0)
-            err = UNZ_ERRNO;
-
-        us.isZip64 = 0;
-
-        if (fseek_func(us.filestream, central_pos, ZLIB_FILEFUNC_SEEK_SET) != 0)
-            err = UNZ_ERRNO;
-
-        /* the signature, already checked */
-        if (unz64local_getLong(us.filestream, &uL) != UNZ_OK)
-            err = UNZ_ERRNO;
-
-        /* number of this disk */
-        if (unz64local_getShort(us.filestream, &number_disk) != UNZ_OK)
-            err = UNZ_ERRNO;
-
-        /* number of the disk with the start of the central directory */
-        if (unz64local_getShort(us.filestream, &number_disk_with_CD) != UNZ_OK)
-            err = UNZ_ERRNO;
-
-        /* total number of entries in the central dir on this disk */
-        if (unz64local_getShort(us.filestream, &uL) != UNZ_OK)
-            err = UNZ_ERRNO;
-        us.gi.number_entry = uL;
-
-        /* total number of entries in the central dir */
-        if (unz64local_getShort(us.filestream ,&uL) != UNZ_OK)
-            err = UNZ_ERRNO;
-        number_entry_CD = uL;
-
-        if ((number_entry_CD != us.gi.number_entry) ||
-            (number_disk_with_CD != 0) ||
-            (number_disk != 0))
-            err = UNZ_BADZIPFILE;
-
-        /* size of the central directory */
-        if (unz64local_getLong(us.filestream, &uL) != UNZ_OK)
-            err = UNZ_ERRNO;
-        us.size_central_dir = uL;
-
-        /* offset of start of central directory with respect to the
-            starting disk number */
-        if (unz64local_getLong(us.filestream, &uL) != UNZ_OK)
-            err = UNZ_ERRNO;
-        us.offset_central_dir = uL;
-
-        /* zipfile comment length */
-        if (unz64local_getShort(us.filestream, &us.gi.size_comment) != UNZ_OK)
-            err = UNZ_ERRNO;
+	central_pos = unz64local_SearchCentralDir(us.filestream);
+	if (central_pos == 0)
+	    err = UNZ_ERRNO;
+
+	us.isZip64 = 0;
+
+	if (fseek_func(us.filestream, central_pos, ZLIB_FILEFUNC_SEEK_SET) != 0)
+	    err = UNZ_ERRNO;
+
+	/* the signature, already checked */
+	if (unz64local_getLong(us.filestream, &uL) != UNZ_OK)
+	    err = UNZ_ERRNO;
+
+	/* number of this disk */
+	if (unz64local_getShort(us.filestream, &number_disk) != UNZ_OK)
+	    err = UNZ_ERRNO;
+
+	/* number of the disk with the start of the central directory */
+	if (unz64local_getShort(us.filestream, &number_disk_with_CD) != UNZ_OK)
+	    err = UNZ_ERRNO;
+
+	/* total number of entries in the central dir on this disk */
+	if (unz64local_getShort(us.filestream, &uL) != UNZ_OK)
+	    err = UNZ_ERRNO;
+	us.gi.number_entry = uL;
+
+	/* total number of entries in the central dir */
+	if (unz64local_getShort(us.filestream ,&uL) != UNZ_OK)
+	    err = UNZ_ERRNO;
+	number_entry_CD = uL;
+
+	if ((number_entry_CD != us.gi.number_entry) ||
+	    (number_disk_with_CD != 0) ||
+	    (number_disk != 0))
+	    err = UNZ_BADZIPFILE;
+
+	/* size of the central directory */
+	if (unz64local_getLong(us.filestream, &uL) != UNZ_OK)
+	    err = UNZ_ERRNO;
+	us.size_central_dir = uL;
+
+	/* offset of start of central directory with respect to the
+	    starting disk number */
+	if (unz64local_getLong(us.filestream, &uL) != UNZ_OK)
+	    err = UNZ_ERRNO;
+	us.offset_central_dir = uL;
+
+	/* zipfile comment length */
+	if (unz64local_getShort(us.filestream, &us.gi.size_comment) != UNZ_OK)
+	    err = UNZ_ERRNO;
     }
 
     if ((central_pos<us.offset_central_dir+us.size_central_dir) &&
-        (err == UNZ_OK))
-        err = UNZ_BADZIPFILE;
+	(err == UNZ_OK))
+	err = UNZ_BADZIPFILE;
 
     if (err != UNZ_OK)
     {
-        fclose_func(us.filestream);
-        return NULL;
+	fclose_func(us.filestream);
+	return NULL;
     }
 
     us.byte_before_the_zipfile = central_pos -
-                            (us.offset_central_dir+us.size_central_dir);
+			    (us.offset_central_dir+us.size_central_dir);
     us.central_pos = central_pos;
     us.pfile_in_zip_read = NULL;
     us.encrypted = 0;
@@ -1161,8 +1161,8 @@ local unzFile unzOpenInternal (const void *path, int is64bitOpenFunction)
     s=(unz64_s*)ALLOC(sizeof(unz64_s));
     if( s != NULL)
     {
-        *s = us;
-        unzGoToFirstFile((unzFile)s);
+	*s = us;
+	unzGoToFirstFile((unzFile)s);
     }
     return (unzFile)s;
 }
@@ -1189,11 +1189,11 @@ extern int ZEXPORT unzClose (unzFile file)
 {
     unz64_s* s;
     if (file == NULL)
-        return UNZ_PARAMERROR;
+	return UNZ_PARAMERROR;
     s = (unz64_s*) file;
 
     if (s->pfile_in_zip_read != NULL)
-        unzCloseCurrentFile(file);
+	unzCloseCurrentFile(file);
 
     fclose_func(s->filestream);
     TRYFREE(s);
@@ -1205,12 +1205,12 @@ extern int ZEXPORT unzClose (unzFile file)
   Write info about the ZipFile in the *pglobal_info structure.
   No preparation of the structure is needed
   return UNZ_OK if there is no problem. */
-extern int ZEXPORT 
+extern int ZEXPORT
 unzGetGlobalInfo64 (unzFile file, unz_global_info64* pglobal_info)
 {
     unz64_s* s;
     if (file == NULL)
-        return UNZ_PARAMERROR;
+	return UNZ_PARAMERROR;
     s = (unz64_s*)file;
     *pglobal_info = s->gi;
     return UNZ_OK;
@@ -1236,15 +1236,15 @@ local void unz64local_DosDateToTmuDate (ZPOS64_T ulDosDate, tm_unz* ptm)
   Get Info about the current file in the zipfile, with internal only info
 */
 local int unz64local_GetCurrentFileInfoInternal (unzFile file,
-                                                  unz_file_info64 *pfile_info,
-                                                  unz_file_info64_internal
-                                                  *pfile_info_internal,
-                                                  char *szFileName,
-                                                  uLong fileNameBufferSize,
-                                                  void *extraField,
-                                                  uLong extraFieldBufferSize,
-                                                  char *szComment,
-                                                  uLong commentBufferSize)
+						  unz_file_info64 *pfile_info,
+						  unz_file_info64_internal
+						  *pfile_info_internal,
+						  char *szFileName,
+						  uLong fileNameBufferSize,
+						  void *extraField,
+						  uLong extraFieldBufferSize,
+						  char *szComment,
+						  uLong commentBufferSize)
 {
     unz64_s* s;
     unz_file_info64 file_info;
@@ -1255,157 +1255,157 @@ local int unz64local_GetCurrentFileInfoInternal (unzFile file,
     uLong uL;
 
     if (file == NULL)
-        return UNZ_PARAMERROR;
+	return UNZ_PARAMERROR;
     s = (unz64_s*)file;
     if (fseek_func(s->filestream,
 		   s->pos_in_central_dir+s->byte_before_the_zipfile,
 		   ZLIB_FILEFUNC_SEEK_SET) != 0)
-        err = UNZ_ERRNO;
+	err = UNZ_ERRNO;
 
 
     /* we check the magic */
     if (err == UNZ_OK)
     {
-        if (unz64local_getLong(s->filestream,&uMagic) != UNZ_OK)
-            err = UNZ_ERRNO;
-        else if (uMagic != 0x02014b50)
-            err = UNZ_BADZIPFILE;
+	if (unz64local_getLong(s->filestream,&uMagic) != UNZ_OK)
+	    err = UNZ_ERRNO;
+	else if (uMagic != 0x02014b50)
+	    err = UNZ_BADZIPFILE;
     }
 
     if (unz64local_getShort(s->filestream,&file_info.version) != UNZ_OK)
-        err = UNZ_ERRNO;
+	err = UNZ_ERRNO;
 
     if (unz64local_getShort(s->filestream,&file_info.version_needed) != UNZ_OK)
-        err = UNZ_ERRNO;
+	err = UNZ_ERRNO;
 
     if (unz64local_getShort(s->filestream,&file_info.flag) != UNZ_OK)
-        err = UNZ_ERRNO;
+	err = UNZ_ERRNO;
 
     if (unz64local_getShort(s->filestream,&file_info.compression_method) != UNZ_OK)
-        err = UNZ_ERRNO;
+	err = UNZ_ERRNO;
 
     if (unz64local_getLong(s->filestream,&file_info.dosDate) != UNZ_OK)
-        err = UNZ_ERRNO;
+	err = UNZ_ERRNO;
 
     unz64local_DosDateToTmuDate(file_info.dosDate,&file_info.tmu_date);
 
     if (unz64local_getLong(s->filestream,&file_info.crc) != UNZ_OK)
-        err = UNZ_ERRNO;
+	err = UNZ_ERRNO;
 
     if (unz64local_getLong(s->filestream,&uL) != UNZ_OK)
-        err = UNZ_ERRNO;
+	err = UNZ_ERRNO;
     file_info.compressed_size = uL;
 
     if (unz64local_getLong(s->filestream,&uL) != UNZ_OK)
-        err = UNZ_ERRNO;
+	err = UNZ_ERRNO;
     file_info.uncompressed_size = uL;
 
     if (unz64local_getShort(s->filestream,&file_info.size_filename) != UNZ_OK)
-        err = UNZ_ERRNO;
+	err = UNZ_ERRNO;
 
     if (unz64local_getShort(s->filestream,&file_info.size_file_extra) != UNZ_OK)
-        err = UNZ_ERRNO;
+	err = UNZ_ERRNO;
 
     if (unz64local_getShort(s->filestream,&file_info.size_file_comment) != UNZ_OK)
-        err = UNZ_ERRNO;
+	err = UNZ_ERRNO;
 
     if (unz64local_getShort(s->filestream,&file_info.disk_num_start) != UNZ_OK)
-        err = UNZ_ERRNO;
+	err = UNZ_ERRNO;
 
     if (unz64local_getShort(s->filestream,&file_info.internal_fa) != UNZ_OK)
-        err = UNZ_ERRNO;
+	err = UNZ_ERRNO;
 
     if (unz64local_getLong(s->filestream,&file_info.external_fa) != UNZ_OK)
-        err = UNZ_ERRNO;
+	err = UNZ_ERRNO;
 
-                // relative offset of local header
+		// relative offset of local header
     if (unz64local_getLong(s->filestream,&uL) != UNZ_OK)
-        err = UNZ_ERRNO;
+	err = UNZ_ERRNO;
     file_info_internal.offset_curfile = uL;
 
     lSeek += file_info.size_filename;
     if ((err == UNZ_OK) && (szFileName != NULL))
     {
-        size_t uSizeRead ;
-        if (file_info.size_filename<fileNameBufferSize)
-        {
-            *(szFileName+file_info.size_filename)='\0';
-            uSizeRead = file_info.size_filename;
-        }
-        else
-            uSizeRead = fileNameBufferSize;
-
-        if ((file_info.size_filename>0) && (fileNameBufferSize>0))
-            if (fread_func(s->filestream, szFileName, uSizeRead) != uSizeRead)
-                err = UNZ_ERRNO;
-        lSeek -= uSizeRead;
+	size_t uSizeRead ;
+	if (file_info.size_filename<fileNameBufferSize)
+	{
+	    *(szFileName+file_info.size_filename)='\0';
+	    uSizeRead = file_info.size_filename;
+	}
+	else
+	    uSizeRead = fileNameBufferSize;
+
+	if ((file_info.size_filename>0) && (fileNameBufferSize>0))
+	    if (fread_func(s->filestream, szFileName, uSizeRead) != uSizeRead)
+		err = UNZ_ERRNO;
+	lSeek -= uSizeRead;
     }
 
     // Read extrafield
     if ((err == UNZ_OK) && (extraField != NULL))
     {
-        size_t uSizeRead;
-        if (file_info.size_file_extra < extraFieldBufferSize)
-            uSizeRead = file_info.size_file_extra;
-        else
-            uSizeRead = extraFieldBufferSize;
-
-        if (lSeek != 0)
-        {
-            if (fseek_func(s->filestream, lSeek, ZLIB_FILEFUNC_SEEK_CUR) == 0)
-                lSeek = 0;
-            else
-                err = UNZ_ERRNO;
-        }
-
-        if ((file_info.size_file_extra>0) && (extraFieldBufferSize>0))
-            if (fread_func(s->filestream, extraField, (size_t) uSizeRead) 
+	size_t uSizeRead;
+	if (file_info.size_file_extra < extraFieldBufferSize)
+	    uSizeRead = file_info.size_file_extra;
+	else
+	    uSizeRead = extraFieldBufferSize;
+
+	if (lSeek != 0)
+	{
+	    if (fseek_func(s->filestream, lSeek, ZLIB_FILEFUNC_SEEK_CUR) == 0)
+		lSeek = 0;
+	    else
+		err = UNZ_ERRNO;
+	}
+
+	if ((file_info.size_file_extra>0) && (extraFieldBufferSize>0))
+	    if (fread_func(s->filestream, extraField, (size_t) uSizeRead)
 		!= uSizeRead) err = UNZ_ERRNO;
 
-        lSeek += file_info.size_file_extra - (uLong)uSizeRead;
+	lSeek += file_info.size_file_extra - (uLong)uSizeRead;
     }
     else
-        lSeek += file_info.size_file_extra;
+	lSeek += file_info.size_file_extra;
 
 
     if ((err == UNZ_OK) && (file_info.size_file_extra != 0))
     {
 	uLong acc = 0;
 
-        // since lSeek now points to after the extra field we need to move back
-        lSeek -= file_info.size_file_extra;
+	// since lSeek now points to after the extra field we need to move back
+	lSeek -= file_info.size_file_extra;
 
-        if (lSeek != 0)
-        {
-            if (fseek_func(s->filestream, lSeek, ZLIB_FILEFUNC_SEEK_CUR) == 0)
-                lSeek = 0;
-            else
-                err = UNZ_ERRNO;
-        }
+	if (lSeek != 0)
+	{
+	    if (fseek_func(s->filestream, lSeek, ZLIB_FILEFUNC_SEEK_CUR) == 0)
+		lSeek = 0;
+	    else
+		err = UNZ_ERRNO;
+	}
 
-        while(acc < file_info.size_file_extra)
-        {
-            uLong headerId;
+	while(acc < file_info.size_file_extra)
+	{
+	    uLong headerId;
 	    uLong dataSize;
 
-            if (unz64local_getShort(s->filestream,&headerId) != UNZ_OK)
-                err = UNZ_ERRNO;
+	    if (unz64local_getShort(s->filestream,&headerId) != UNZ_OK)
+		err = UNZ_ERRNO;
 
-            if (unz64local_getShort(s->filestream,&dataSize) != UNZ_OK)
-                err = UNZ_ERRNO;
+	    if (unz64local_getShort(s->filestream,&dataSize) != UNZ_OK)
+		err = UNZ_ERRNO;
 
-            /* ZIP64 extra fields */
-            if (headerId == 0x0001)
-            {
+	    /* ZIP64 extra fields */
+	    if (headerId == 0x0001)
+	    {
 		uLong uL;
-		
+
 		if(file_info.uncompressed_size == (ZPOS64_T)(unsigned long)-1)
 		{
 		    if (unz64local_getLong64(s->filestream,
 					     &file_info.uncompressed_size) != UNZ_OK)
 			err = UNZ_ERRNO;
 		}
-		
+
 		if(file_info.compressed_size == (ZPOS64_T)(unsigned long)-1)
 		{
 		    if (unz64local_getLong64(s->filestream,
@@ -1428,50 +1428,50 @@ local int unz64local_GetCurrentFileInfoInternal (unzFile file,
 			err = UNZ_ERRNO;
 		}
 
-            }
-            else
-            {
-                if (fseek_func(s->filestream, dataSize, ZLIB_FILEFUNC_SEEK_CUR) != 0)
-                    err = UNZ_ERRNO;
-            }
+	    }
+	    else
+	    {
+		if (fseek_func(s->filestream, dataSize, ZLIB_FILEFUNC_SEEK_CUR) != 0)
+		    err = UNZ_ERRNO;
+	    }
 
-            acc += 2 + 2 + dataSize;
-        }
+	    acc += 2 + 2 + dataSize;
+	}
     }
 
     if ((err == UNZ_OK) && (szComment != NULL))
     {
-        size_t uSizeRead ;
-        if (file_info.size_file_comment<commentBufferSize)
-        {
-            *(szComment+file_info.size_file_comment) = '\0';
-            uSizeRead = file_info.size_file_comment;
-        }
-        else
-            uSizeRead = commentBufferSize;
-
-        if (lSeek != 0)
-        {
-            if (fseek_func(s->filestream, lSeek, ZLIB_FILEFUNC_SEEK_CUR) ==  0)
-                lSeek = 0;
-            else
-                err = UNZ_ERRNO;
-        }
-
-        if ((file_info.size_file_comment>0) && (commentBufferSize>0))
-            if (fread_func(s->filestream,szComment,uSizeRead) != uSizeRead)
-                err = UNZ_ERRNO;
-        lSeek += file_info.size_file_comment - uSizeRead;
+	size_t uSizeRead ;
+	if (file_info.size_file_comment<commentBufferSize)
+	{
+	    *(szComment+file_info.size_file_comment) = '\0';
+	    uSizeRead = file_info.size_file_comment;
+	}
+	else
+	    uSizeRead = commentBufferSize;
+
+	if (lSeek != 0)
+	{
+	    if (fseek_func(s->filestream, lSeek, ZLIB_FILEFUNC_SEEK_CUR) ==  0)
+		lSeek = 0;
+	    else
+		err = UNZ_ERRNO;
+	}
+
+	if ((file_info.size_file_comment>0) && (commentBufferSize>0))
+	    if (fread_func(s->filestream,szComment,uSizeRead) != uSizeRead)
+		err = UNZ_ERRNO;
+	lSeek += file_info.size_file_comment - uSizeRead;
     }
     else
-        lSeek += file_info.size_file_comment;
+	lSeek += file_info.size_file_comment;
 
 
     if ((err == UNZ_OK) && (pfile_info != NULL))
-        *pfile_info = file_info;
+	*pfile_info = file_info;
 
     if ((err == UNZ_OK) && (pfile_info_internal != NULL))
-        *pfile_info_internal = file_info_internal;
+	*pfile_info_internal = file_info_internal;
 
     return err;
 }
@@ -1483,7 +1483,7 @@ local int unz64local_GetCurrentFileInfoInternal (unzFile file,
   No preparation of the structure is needed
   return UNZ_OK if there is no problem.
 */
-extern int ZEXPORT 
+extern int ZEXPORT
 unzGetCurrentFileInfo64 (unzFile file,
 			 unz_file_info64 * pfile_info,
 			 char * szFileName, uLong fileNameBufferSize,
@@ -1491,9 +1491,9 @@ unzGetCurrentFileInfo64 (unzFile file,
 			 char* szComment,  uLong commentBufferSize)
 {
     return unz64local_GetCurrentFileInfoInternal(file,pfile_info,NULL,
-                                                szFileName,fileNameBufferSize,
-                                                extraField,extraFieldBufferSize,
-                                                szComment,commentBufferSize);
+						szFileName,fileNameBufferSize,
+						extraField,extraFieldBufferSize,
+						szComment,commentBufferSize);
 }
 
 /*
@@ -1505,7 +1505,7 @@ extern int ZEXPORT unzGoToFirstFile (unzFile file)
     int err = UNZ_OK;
     unz64_s* s;
     if (file == NULL)
-        return UNZ_PARAMERROR;
+	return UNZ_PARAMERROR;
     s = (unz64_s*)file;
     s->pos_in_central_dir = s->offset_central_dir;
     s->num_file = 0;
@@ -1527,21 +1527,21 @@ extern int ZEXPORT unzGoToNextFile (unzFile  file)
     int err;
 
     if (file == NULL)
-        return UNZ_PARAMERROR;
+	return UNZ_PARAMERROR;
     s = (unz64_s*)file;
     if (!s->current_file_ok)
-        return UNZ_END_OF_LIST_OF_FILE;
+	return UNZ_END_OF_LIST_OF_FILE;
     if (s->gi.number_entry != 0xffff)    /* 2^16 files overflow hack */
       if (s->num_file+1 == s->gi.number_entry)
-        return UNZ_END_OF_LIST_OF_FILE;
+	return UNZ_END_OF_LIST_OF_FILE;
 
-    s->pos_in_central_dir += 
+    s->pos_in_central_dir +=
 	SIZECENTRALDIRITEM + s->cur_file_info.size_filename +
 	s->cur_file_info.size_file_extra + s->cur_file_info.size_file_comment ;
     s->num_file++;
     err = unz64local_GetCurrentFileInfoInternal(file,&s->cur_file_info,
-                                               &s->cur_file_info_internal,
-                                               NULL,0,NULL,0,NULL,0);
+					       &s->cur_file_info_internal,
+					       NULL,0,NULL,0,NULL,0);
     s->current_file_ok = (err == UNZ_OK);
     return err;
 }
@@ -1570,14 +1570,14 @@ extern int ZEXPORT unzLocateFile (unzFile file, const char *szFileName, int iCas
 
 
     if (file == NULL)
-        return UNZ_PARAMERROR;
+	return UNZ_PARAMERROR;
 
     if (strlen(szFileName) >= UNZ_MAXFILENAMEINZIP)
-        return UNZ_PARAMERROR;
+	return UNZ_PARAMERROR;
 
     s = (unz64_s*)file;
     if (!s->current_file_ok)
-        return UNZ_END_OF_LIST_OF_FILE;
+	return UNZ_END_OF_LIST_OF_FILE;
 
     /* Save the current state */
     num_fileSaved = s->num_file;
@@ -1589,18 +1589,18 @@ extern int ZEXPORT unzLocateFile (unzFile file, const char *szFileName, int iCas
 
     while (err == UNZ_OK)
     {
-        char szCurrentFileName[UNZ_MAXFILENAMEINZIP+1];
-        err = unzGetCurrentFileInfo64(file, NULL,
+	char szCurrentFileName[UNZ_MAXFILENAMEINZIP+1];
+	err = unzGetCurrentFileInfo64(file, NULL,
 				      szCurrentFileName,
 				      sizeof(szCurrentFileName)-1,
 				      NULL, 0, NULL, 0);
-        if (err == UNZ_OK)
-        {
-            if (unzStringFileNameCompare(szCurrentFileName,
+	if (err == UNZ_OK)
+	{
+	    if (unzStringFileNameCompare(szCurrentFileName,
 					 szFileName,iCaseSensitivity) == 0)
-                return UNZ_OK;
-            err = unzGoToNextFile(file);
-        }
+		return UNZ_OK;
+	    err = unzGoToNextFile(file);
+	}
     }
 
     /* We failed, so restore the state of the 'current file' to where we
@@ -1633,11 +1633,11 @@ extern int ZEXPORT unzLocateFile (unzFile file, const char *szFileName, int iCas
 /*
   Read the local header of the current zipfile
   Check the coherency of the local header and info in the end of central
-        directory about this file
+	directory about this file
   store in *piSizeVar the size of extra info in local header
-        (filename and size of extra field data)
+	(filename and size of extra field data)
 */
-local int 
+local int
 unz64local_CheckCurrentFileCoherencyHeader (unz64_s* s, uInt* piSizeVar,
 					    ZPOS64_T * poffset_local_extrafield,
 					    uInt  * psize_local_extrafield)
@@ -1653,70 +1653,70 @@ unz64local_CheckCurrentFileCoherencyHeader (unz64_s* s, uInt* piSizeVar,
 
     if (fseek_func(s->filestream,s->cur_file_info_internal.offset_curfile +
 		   s->byte_before_the_zipfile,ZLIB_FILEFUNC_SEEK_SET) != 0)
-        return UNZ_ERRNO;
+	return UNZ_ERRNO;
 
 
     if (err == UNZ_OK)
     {
-        if (unz64local_getLong(s->filestream,&uMagic) != UNZ_OK)
-            err = UNZ_ERRNO;
-        else if (uMagic!=0x04034b50)
-            err = UNZ_BADZIPFILE;
+	if (unz64local_getLong(s->filestream,&uMagic) != UNZ_OK)
+	    err = UNZ_ERRNO;
+	else if (uMagic!=0x04034b50)
+	    err = UNZ_BADZIPFILE;
     }
 
     if (unz64local_getShort(s->filestream,&uData) != UNZ_OK)
-        err = UNZ_ERRNO;
+	err = UNZ_ERRNO;
 /*
     else if ((err == UNZ_OK) && (uData!=s->cur_file_info.wVersion))
-        err=UNZ_BADZIPFILE;
+	err=UNZ_BADZIPFILE;
 */
     if (unz64local_getShort(s->filestream,&uFlags)  !=  UNZ_OK)
-        err = UNZ_ERRNO;
+	err = UNZ_ERRNO;
 
     if (unz64local_getShort(s->filestream,&uData) != UNZ_OK)
-        err = UNZ_ERRNO;
+	err = UNZ_ERRNO;
     else if ((err == UNZ_OK) && (uData != s->cur_file_info.compression_method))
-        err = UNZ_BADZIPFILE;
+	err = UNZ_BADZIPFILE;
 
     if ((err == UNZ_OK) && (s->cur_file_info.compression_method != 0) &&
 /* #ifdef HAVE_BZIP2 */
-                         (s->cur_file_info.compression_method != Z_BZIP2ED) &&
+			 (s->cur_file_info.compression_method != Z_BZIP2ED) &&
 /* #endif */
-                         (s->cur_file_info.compression_method != Z_DEFLATED))
-        err = UNZ_BADZIPFILE;
+			 (s->cur_file_info.compression_method != Z_DEFLATED))
+	err = UNZ_BADZIPFILE;
 
     if (unz64local_getLong(s->filestream,&uData) != UNZ_OK) /* date/time */
-        err = UNZ_ERRNO;
+	err = UNZ_ERRNO;
 
     if (unz64local_getLong(s->filestream,&uData) != UNZ_OK) /* crc */
-        err = UNZ_ERRNO;
-    else if ((err == UNZ_OK) && (uData != s->cur_file_info.crc) && 
+	err = UNZ_ERRNO;
+    else if ((err == UNZ_OK) && (uData != s->cur_file_info.crc) &&
 	     ((uFlags & 8) == 0))
-        err = UNZ_BADZIPFILE;
+	err = UNZ_BADZIPFILE;
 
     if (unz64local_getLong(s->filestream,&uData) != UNZ_OK) /* size compr */
-        err = UNZ_ERRNO;
-    else if (uData != 0xFFFFFFFF && (err == UNZ_OK) && 
+	err = UNZ_ERRNO;
+    else if (uData != 0xFFFFFFFF && (err == UNZ_OK) &&
 	     (uData != s->cur_file_info.compressed_size) && ((uFlags & 8) == 0))
-        err = UNZ_BADZIPFILE;
+	err = UNZ_BADZIPFILE;
 
     if (unz64local_getLong(s->filestream,&uData) != UNZ_OK) /* size uncompr */
-        err = UNZ_ERRNO;
-    else if (uData != 0xFFFFFFFF && (err == UNZ_OK) && 
+	err = UNZ_ERRNO;
+    else if (uData != 0xFFFFFFFF && (err == UNZ_OK) &&
 	     (uData != s->cur_file_info.uncompressed_size) && ((uFlags & 8) == 0))
-        err = UNZ_BADZIPFILE;
+	err = UNZ_BADZIPFILE;
 
     if (unz64local_getShort(s->filestream,&size_filename) != UNZ_OK)
-        err = UNZ_ERRNO;
+	err = UNZ_ERRNO;
     else if ((err == UNZ_OK) && (size_filename != s->cur_file_info.size_filename))
-        err = UNZ_BADZIPFILE;
+	err = UNZ_BADZIPFILE;
 
     *piSizeVar += (uInt)size_filename;
 
     if (unz64local_getShort(s->filestream,&size_extra_field) != UNZ_OK)
-        err=UNZ_ERRNO;
+	err=UNZ_ERRNO;
     *poffset_local_extrafield= s->cur_file_info_internal.offset_curfile +
-                                    SIZEZIPLOCALHEADER + size_filename;
+				    SIZEZIPLOCALHEADER + size_filename;
     *psize_local_extrafield = (uInt)size_extra_field;
 
     *piSizeVar += (uInt)size_extra_field;
@@ -1740,22 +1740,22 @@ static int unzOpenCurrentFile3 (unzFile file, int* method,
     if (password != NULL) return UNZ_PARAMERROR;
 
     if (file == NULL)
-        return UNZ_PARAMERROR;
+	return UNZ_PARAMERROR;
     s = (unz64_s*)file;
     if (!s->current_file_ok)
-        return UNZ_PARAMERROR;
+	return UNZ_PARAMERROR;
 
     if (s->pfile_in_zip_read != NULL)
-        unzCloseCurrentFile(file);
+	unzCloseCurrentFile(file);
 
-    if (unz64local_CheckCurrentFileCoherencyHeader(s, &iSizeVar, 
+    if (unz64local_CheckCurrentFileCoherencyHeader(s, &iSizeVar,
 						   &offset_local_extrafield,&size_local_extrafield) != UNZ_OK)
-        return UNZ_BADZIPFILE;
+	return UNZ_BADZIPFILE;
 
-    pfile_in_zip_read_info = 
+    pfile_in_zip_read_info =
 	(file_in_zip64_read_info_s*)ALLOC(sizeof(file_in_zip64_read_info_s));
     if (pfile_in_zip_read_info == NULL)
-        return UNZ_INTERNALERROR;
+	return UNZ_INTERNALERROR;
 
     pfile_in_zip_read_info->read_buffer = (char*)ALLOC(UNZ_BUFSIZE);
     pfile_in_zip_read_info->offset_local_extrafield = offset_local_extrafield;
@@ -1765,33 +1765,33 @@ static int unzOpenCurrentFile3 (unzFile file, int* method,
 
     if (pfile_in_zip_read_info->read_buffer == NULL)
     {
-        TRYFREE(pfile_in_zip_read_info);
-        return UNZ_INTERNALERROR;
+	TRYFREE(pfile_in_zip_read_info);
+	return UNZ_INTERNALERROR;
     }
 
     pfile_in_zip_read_info->stream_initialised = 0;
 
     if (method != NULL)
-        *method = (int)s->cur_file_info.compression_method;
+	*method = (int)s->cur_file_info.compression_method;
 
     if (level != NULL)
     {
-        *level = 6;
-        switch (s->cur_file_info.flag & 0x06)
-        {
-          case 6 : *level = 1; break;
-          case 4 : *level = 2; break;
-          case 2 : *level = 9; break;
-        }
+	*level = 6;
+	switch (s->cur_file_info.flag & 0x06)
+	{
+	  case 6 : *level = 1; break;
+	  case 4 : *level = 2; break;
+	  case 2 : *level = 9; break;
+	}
     }
 
     if ((s->cur_file_info.compression_method != 0) &&
 /* #ifdef HAVE_BZIP2 */
-        (s->cur_file_info.compression_method != Z_BZIP2ED) &&
+	(s->cur_file_info.compression_method != Z_BZIP2ED) &&
 /* #endif */
-        (s->cur_file_info.compression_method != Z_DEFLATED))
+	(s->cur_file_info.compression_method != Z_DEFLATED))
 
-        err=UNZ_BADZIPFILE;
+	err=UNZ_BADZIPFILE;
 
     pfile_in_zip_read_info->crc32_wait = s->cur_file_info.crc;
     pfile_in_zip_read_info->crc32 = 0;
@@ -1820,11 +1820,11 @@ static int unzOpenCurrentFile3 (unzFile file, int* method,
 
       err = BZ2_bzDecompressInit(&pfile_in_zip_read_info->bstream, 0, 0);
       if (err == Z_OK)
-        pfile_in_zip_read_info->stream_initialised = Z_BZIP2ED;
+	pfile_in_zip_read_info->stream_initialised = Z_BZIP2ED;
       else
       {
-        TRYFREE(pfile_in_zip_read_info);
-        return err;
+	TRYFREE(pfile_in_zip_read_info);
+	return err;
       }
 #else
       pfile_in_zip_read_info->raw = 1;
@@ -1840,34 +1840,34 @@ static int unzOpenCurrentFile3 (unzFile file, int* method,
 
       err=inflateInit2(&pfile_in_zip_read_info->stream, -MAX_WBITS);
       if (err == Z_OK)
-        pfile_in_zip_read_info->stream_initialised = Z_DEFLATED;
+	pfile_in_zip_read_info->stream_initialised = Z_DEFLATED;
       else
       {
-        TRYFREE(pfile_in_zip_read_info);
-        return err;
+	TRYFREE(pfile_in_zip_read_info);
+	return err;
       }
-        /* windowBits is passed < 0 to tell that there is no zlib header.
-         * Note that in this case inflate *requires* an extra "dummy" byte
-         * after the compressed stream in order to complete decompression and
-         * return Z_STREAM_END.
-         * In unzip, i don't wait absolutely Z_STREAM_END because I known the
-         * size of both compressed and uncompressed data
-         */
+	/* windowBits is passed < 0 to tell that there is no zlib header.
+	 * Note that in this case inflate *requires* an extra "dummy" byte
+	 * after the compressed stream in order to complete decompression and
+	 * return Z_STREAM_END.
+	 * In unzip, i don't wait absolutely Z_STREAM_END because I known the
+	 * size of both compressed and uncompressed data
+	 */
     }
     pfile_in_zip_read_info->rest_read_compressed =
-            s->cur_file_info.compressed_size ;
+	    s->cur_file_info.compressed_size ;
     pfile_in_zip_read_info->rest_read_uncompressed =
-            s->cur_file_info.uncompressed_size ;
+	    s->cur_file_info.uncompressed_size ;
 
 
     pfile_in_zip_read_info->pos_in_zipfile =
-            s->cur_file_info_internal.offset_curfile + SIZEZIPLOCALHEADER +
-              iSizeVar;
+	    s->cur_file_info_internal.offset_curfile + SIZEZIPLOCALHEADER +
+	      iSizeVar;
 
     pfile_in_zip_read_info->stream.avail_in = (uInt)0;
 
     s->pfile_in_zip_read = pfile_in_zip_read_info;
-                s->encrypted = 0;
+		s->encrypted = 0;
 
     return UNZ_OK;
 }
@@ -1894,200 +1894,203 @@ static int unzReadCurrentFile  (unzFile file, voidp buf, unsigned len)
     unz64_s* s;
     file_in_zip64_read_info_s* pfile_in_zip_read_info;
     if (file == NULL)
-        return UNZ_PARAMERROR;
+	return UNZ_PARAMERROR;
     s = (unz64_s*)file;
     pfile_in_zip_read_info = s->pfile_in_zip_read;
 
     if (pfile_in_zip_read_info == NULL)
-        return UNZ_PARAMERROR;
+	return UNZ_PARAMERROR;
 
 
     if (pfile_in_zip_read_info->read_buffer == NULL)
-        return UNZ_END_OF_LIST_OF_FILE;
+	return UNZ_END_OF_LIST_OF_FILE;
     if (len == 0)
-        return 0;
+	return 0;
 
     pfile_in_zip_read_info->stream.next_out = (Bytef*)buf;
 
     pfile_in_zip_read_info->stream.avail_out = (uInt)len;
 
     if ((len>pfile_in_zip_read_info->rest_read_uncompressed) &&
-        (!(pfile_in_zip_read_info->raw)))
-        pfile_in_zip_read_info->stream.avail_out =
-            (uInt)pfile_in_zip_read_info->rest_read_uncompressed;
+	(!(pfile_in_zip_read_info->raw)))
+	pfile_in_zip_read_info->stream.avail_out =
+	    (uInt)pfile_in_zip_read_info->rest_read_uncompressed;
 
     if ((len>pfile_in_zip_read_info->rest_read_compressed+
-           pfile_in_zip_read_info->stream.avail_in) &&
-         (pfile_in_zip_read_info->raw))
-        pfile_in_zip_read_info->stream.avail_out =
-            (uInt)pfile_in_zip_read_info->rest_read_compressed+
-            pfile_in_zip_read_info->stream.avail_in;
+	   pfile_in_zip_read_info->stream.avail_in) &&
+	 (pfile_in_zip_read_info->raw))
+	pfile_in_zip_read_info->stream.avail_out =
+	    (uInt)pfile_in_zip_read_info->rest_read_compressed+
+	    pfile_in_zip_read_info->stream.avail_in;
 
     while (pfile_in_zip_read_info->stream.avail_out>0)
     {
-        if ((pfile_in_zip_read_info->stream.avail_in == 0) &&
-            (pfile_in_zip_read_info->rest_read_compressed>0))
-        {
-            size_t uReadThis = UNZ_BUFSIZE;
-            if (pfile_in_zip_read_info->rest_read_compressed<uReadThis)
-                uReadThis = (uInt)pfile_in_zip_read_info->rest_read_compressed;
-            if (uReadThis == 0)
-                return UNZ_EOF;
-            if (fseek_func(pfile_in_zip_read_info->filestream,
+	if ((pfile_in_zip_read_info->stream.avail_in == 0) &&
+	    (pfile_in_zip_read_info->rest_read_compressed>0))
+	{
+	    size_t uReadThis = UNZ_BUFSIZE;
+	    if (pfile_in_zip_read_info->rest_read_compressed<uReadThis)
+		uReadThis = (uInt)pfile_in_zip_read_info->rest_read_compressed;
+	    if (uReadThis == 0)
+		return UNZ_EOF;
+	    if (fseek_func(pfile_in_zip_read_info->filestream,
 			   pfile_in_zip_read_info->pos_in_zipfile +
 			   pfile_in_zip_read_info->byte_before_the_zipfile,
 			   ZLIB_FILEFUNC_SEEK_SET) != 0)
-                return UNZ_ERRNO;
-            if (fread_func(pfile_in_zip_read_info->filestream,
+		return UNZ_ERRNO;
+	    if (fread_func(pfile_in_zip_read_info->filestream,
 			   pfile_in_zip_read_info->read_buffer,
 			   uReadThis) != uReadThis)
-                return UNZ_ERRNO;
+		return UNZ_ERRNO;
 
-            pfile_in_zip_read_info->pos_in_zipfile += uReadThis;
+	    pfile_in_zip_read_info->pos_in_zipfile += uReadThis;
 
-            pfile_in_zip_read_info->rest_read_compressed -= uReadThis;
+	    pfile_in_zip_read_info->rest_read_compressed -= uReadThis;
 
-            pfile_in_zip_read_info->stream.next_in =
-                (Bytef*)pfile_in_zip_read_info->read_buffer;
-            pfile_in_zip_read_info->stream.avail_in = (uInt)uReadThis;
-        }
+	    pfile_in_zip_read_info->stream.next_in =
+		(Bytef*)pfile_in_zip_read_info->read_buffer;
+	    pfile_in_zip_read_info->stream.avail_in = (uInt)uReadThis;
+	}
 
-        if ((pfile_in_zip_read_info->compression_method == 0) || 
+	if ((pfile_in_zip_read_info->compression_method == 0) ||
 	    (pfile_in_zip_read_info->raw))
-        {
-            uInt uDoCopy,i ;
+	{
+	    uInt uDoCopy,i ;
 
-            if ((pfile_in_zip_read_info->stream.avail_in == 0) &&
-                (pfile_in_zip_read_info->rest_read_compressed == 0))
-                return (iRead == 0) ? UNZ_EOF : iRead;
+	    if ((pfile_in_zip_read_info->stream.avail_in == 0) &&
+		(pfile_in_zip_read_info->rest_read_compressed == 0))
+		return (iRead == 0) ? UNZ_EOF : iRead;
 
-            if (pfile_in_zip_read_info->stream.avail_out <
-                            pfile_in_zip_read_info->stream.avail_in)
-                uDoCopy = pfile_in_zip_read_info->stream.avail_out ;
-            else
-                uDoCopy = pfile_in_zip_read_info->stream.avail_in ;
+	    if (pfile_in_zip_read_info->stream.avail_out <
+			    pfile_in_zip_read_info->stream.avail_in)
+		uDoCopy = pfile_in_zip_read_info->stream.avail_out ;
+	    else
+		uDoCopy = pfile_in_zip_read_info->stream.avail_in ;
 
-            for (i = 0; i < uDoCopy; i++)
-                *(pfile_in_zip_read_info->stream.next_out+i) =
-                        *(pfile_in_zip_read_info->stream.next_in+i);
+	    for (i = 0; i < uDoCopy; i++)
+		*(pfile_in_zip_read_info->stream.next_out+i) =
+			*(pfile_in_zip_read_info->stream.next_in+i);
 
-            pfile_in_zip_read_info->total_out_64 = 
+	    pfile_in_zip_read_info->total_out_64 =
 		pfile_in_zip_read_info->total_out_64 + uDoCopy;
 
-            pfile_in_zip_read_info->crc32 = crc32(pfile_in_zip_read_info->crc32,
-                                pfile_in_zip_read_info->stream.next_out,
-                                uDoCopy);
-            pfile_in_zip_read_info->rest_read_uncompressed-=uDoCopy;
-            pfile_in_zip_read_info->stream.avail_in -= uDoCopy;
-            pfile_in_zip_read_info->stream.avail_out -= uDoCopy;
-            pfile_in_zip_read_info->stream.next_out += uDoCopy;
-            pfile_in_zip_read_info->stream.next_in += uDoCopy;
-            pfile_in_zip_read_info->stream.total_out += uDoCopy;
-            iRead += uDoCopy;
-        }
-        else if (pfile_in_zip_read_info->compression_method == Z_BZIP2ED)
-        {
+	    pfile_in_zip_read_info->crc32 = crc32(pfile_in_zip_read_info->crc32,
+				pfile_in_zip_read_info->stream.next_out,
+				uDoCopy);
+	    pfile_in_zip_read_info->rest_read_uncompressed-=uDoCopy;
+	    pfile_in_zip_read_info->stream.avail_in -= uDoCopy;
+	    pfile_in_zip_read_info->stream.avail_out -= uDoCopy;
+	    pfile_in_zip_read_info->stream.next_out += uDoCopy;
+	    pfile_in_zip_read_info->stream.next_in += uDoCopy;
+	    pfile_in_zip_read_info->stream.total_out += uDoCopy;
+	    iRead += uDoCopy;
+	}
+	else if (pfile_in_zip_read_info->compression_method == Z_BZIP2ED)
+	{
 #ifdef HAVE_BZIP2
-            uLong uTotalOutBefore,uTotalOutAfter;
-            const Bytef *bufBefore;
-            uLong uOutThis;
+	    uLong uTotalOutBefore,uTotalOutAfter;
+	    const Bytef *bufBefore;
+	    uLong uOutThis;
 
-            pfile_in_zip_read_info->bstream.next_in        = 
+	    pfile_in_zip_read_info->bstream.next_in        =
 		(char*)pfile_in_zip_read_info->stream.next_in;
-            pfile_in_zip_read_info->bstream.avail_in       = 
+	    pfile_in_zip_read_info->bstream.avail_in       =
 		pfile_in_zip_read_info->stream.avail_in;
-            pfile_in_zip_read_info->bstream.total_in_lo32  = 
+	    pfile_in_zip_read_info->bstream.total_in_lo32  =
 		(unsigned int) pfile_in_zip_read_info->stream.total_in;
-            pfile_in_zip_read_info->bstream.total_in_hi32  = 0;
-            pfile_in_zip_read_info->bstream.next_out       = 
+	    pfile_in_zip_read_info->bstream.total_in_hi32  = 0;
+	    pfile_in_zip_read_info->bstream.next_out       =
 		(char*)pfile_in_zip_read_info->stream.next_out;
-            pfile_in_zip_read_info->bstream.avail_out      = 
+	    pfile_in_zip_read_info->bstream.avail_out      =
 		pfile_in_zip_read_info->stream.avail_out;
-            pfile_in_zip_read_info->bstream.total_out_lo32 = 
+	    pfile_in_zip_read_info->bstream.total_out_lo32 =
 		(unsigned int) pfile_in_zip_read_info->stream.total_out;
-            pfile_in_zip_read_info->bstream.total_out_hi32 = 0;
+	    pfile_in_zip_read_info->bstream.total_out_hi32 = 0;
 
-            uTotalOutBefore = pfile_in_zip_read_info->bstream.total_out_lo32;
-            bufBefore = (const Bytef *)pfile_in_zip_read_info->bstream.next_out;
+	    uTotalOutBefore = pfile_in_zip_read_info->bstream.total_out_lo32;
+	    bufBefore = (const Bytef *)pfile_in_zip_read_info->bstream.next_out;
 
-            err = BZ2_bzDecompress(&pfile_in_zip_read_info->bstream);
+	    err = BZ2_bzDecompress(&pfile_in_zip_read_info->bstream);
 
-            uTotalOutAfter = pfile_in_zip_read_info->bstream.total_out_lo32;
-            uOutThis = uTotalOutAfter-uTotalOutBefore;
+	    uTotalOutAfter = pfile_in_zip_read_info->bstream.total_out_lo32;
+	    uOutThis = uTotalOutAfter-uTotalOutBefore;
 
-            pfile_in_zip_read_info->total_out_64 = 
+	    pfile_in_zip_read_info->total_out_64 =
 		pfile_in_zip_read_info->total_out_64 + uOutThis;
 
-            pfile_in_zip_read_info->crc32 = 
+	    pfile_in_zip_read_info->crc32 =
 		crc32(pfile_in_zip_read_info->crc32,bufBefore,
 		      (uInt)(uOutThis));
-            pfile_in_zip_read_info->rest_read_uncompressed -= uOutThis;
-            iRead += (uInt)(uTotalOutAfter - uTotalOutBefore);
+	    pfile_in_zip_read_info->rest_read_uncompressed -= uOutThis;
+	    iRead += (uInt)(uTotalOutAfter - uTotalOutBefore);
 
-            pfile_in_zip_read_info->stream.next_in   = 
+	    pfile_in_zip_read_info->stream.next_in   =
 		(Bytef*)pfile_in_zip_read_info->bstream.next_in;
-            pfile_in_zip_read_info->stream.avail_in  = 
+	    pfile_in_zip_read_info->stream.avail_in  =
 		pfile_in_zip_read_info->bstream.avail_in;
-            pfile_in_zip_read_info->stream.total_in  = 
+	    pfile_in_zip_read_info->stream.total_in  =
 		pfile_in_zip_read_info->bstream.total_in_lo32;
-            pfile_in_zip_read_info->stream.next_out  = 
+	    pfile_in_zip_read_info->stream.next_out  =
 		(Bytef*)pfile_in_zip_read_info->bstream.next_out;
-            pfile_in_zip_read_info->stream.avail_out =
+	    pfile_in_zip_read_info->stream.avail_out =
 		pfile_in_zip_read_info->bstream.avail_out;
-            pfile_in_zip_read_info->stream.total_out = 
+	    pfile_in_zip_read_info->stream.total_out =
 		pfile_in_zip_read_info->bstream.total_out_lo32;
 
-            if (err == BZ_STREAM_END)
-              return (iRead == 0) ? UNZ_EOF : iRead;
-            if (err != BZ_OK)
-              break;
+	    if (err == BZ_STREAM_END)
+	      return (iRead == 0) ? UNZ_EOF : iRead;
+	    if (err != BZ_OK)
+	      break;
 #endif
-        } // end Z_BZIP2ED
-        else
-        {
-            ZPOS64_T uTotalOutBefore,uTotalOutAfter;
-            const Bytef *bufBefore;
-            ZPOS64_T uOutThis;
-            int flush = Z_SYNC_FLUSH;
-
-            uTotalOutBefore = pfile_in_zip_read_info->stream.total_out;
-            bufBefore = pfile_in_zip_read_info->stream.next_out;
-
-            /*
-            if ((pfile_in_zip_read_info->rest_read_uncompressed ==
-                     pfile_in_zip_read_info->stream.avail_out) &&
-                (pfile_in_zip_read_info->rest_read_compressed == 0))
-                flush = Z_FINISH;
-            */
-            err = inflate(&pfile_in_zip_read_info->stream, flush);
-
-            if ((err >= 0) && (pfile_in_zip_read_info->stream.msg != NULL))
-              err = Z_DATA_ERROR;
-
-            uTotalOutAfter = pfile_in_zip_read_info->stream.total_out;
-            uOutThis = uTotalOutAfter-uTotalOutBefore;
-
-            pfile_in_zip_read_info->total_out_64 = 
+	} // end Z_BZIP2ED
+	else
+	{
+	    ZPOS64_T uTotalOutBefore,uTotalOutAfter;
+	    const Bytef *bufBefore;
+	    ZPOS64_T uOutThis;
+	    int flush = Z_SYNC_FLUSH;
+
+	    uTotalOutBefore = pfile_in_zip_read_info->stream.total_out;
+	    bufBefore = pfile_in_zip_read_info->stream.next_out;
+
+	    /*
+	    if ((pfile_in_zip_read_info->rest_read_uncompressed ==
+		     pfile_in_zip_read_info->stream.avail_out) &&
+		(pfile_in_zip_read_info->rest_read_compressed == 0))
+		flush = Z_FINISH;
+	    */
+	    err = inflate(&pfile_in_zip_read_info->stream, flush);
+
+	    if ((err >= 0) && (pfile_in_zip_read_info->stream.msg != NULL))
+	      err = Z_DATA_ERROR;
+
+	    uTotalOutAfter = pfile_in_zip_read_info->stream.total_out;
+	    uOutThis = uTotalOutAfter-uTotalOutBefore;
+
+	    pfile_in_zip_read_info->total_out_64 =
 		pfile_in_zip_read_info->total_out_64 + uOutThis;
 
-            pfile_in_zip_read_info->crc32 =
-                crc32(pfile_in_zip_read_info->crc32,bufBefore,
-                        (uInt)(uOutThis));
+	    pfile_in_zip_read_info->crc32 =
+		crc32(pfile_in_zip_read_info->crc32,bufBefore,
+			(uInt)(uOutThis));
 
-            pfile_in_zip_read_info->rest_read_uncompressed -=
-                uOutThis;
+	    pfile_in_zip_read_info->rest_read_uncompressed -=
+		uOutThis;
 
-            iRead += (uInt)(uTotalOutAfter - uTotalOutBefore);
+	    iRead += (uInt)(uTotalOutAfter - uTotalOutBefore);
+	    // R addition for 3.2.0
+	    if(iRead < len && uTotalOutAfter == 4294967295U)
+		warning("possible truncation of >= 4GB file");
 
-            if (err == Z_STREAM_END)
-                return (iRead == 0) ? UNZ_EOF : iRead;
-            if (err != Z_OK)
-                break;
-        }
+	    if (err == Z_STREAM_END)
+		return (iRead == 0) ? UNZ_EOF : iRead;
+	    if (err != Z_OK)
+		break;
+	}
     }
 
     if (err == Z_OK)
-        return iRead;
+	return iRead;
     return err;
 }
 
@@ -2102,29 +2105,29 @@ static int unzCloseCurrentFile (unzFile file)
     unz64_s* s;
     file_in_zip64_read_info_s* pfile_in_zip_read_info;
     if (file == NULL)
-        return UNZ_PARAMERROR;
+	return UNZ_PARAMERROR;
     s = (unz64_s*)file;
     pfile_in_zip_read_info = s->pfile_in_zip_read;
 
     if (pfile_in_zip_read_info == NULL)
-        return UNZ_PARAMERROR;
+	return UNZ_PARAMERROR;
 
 
     if ((pfile_in_zip_read_info->rest_read_uncompressed == 0) &&
-        (!pfile_in_zip_read_info->raw))
+	(!pfile_in_zip_read_info->raw))
     {
-        if (pfile_in_zip_read_info->crc32 != pfile_in_zip_read_info->crc32_wait)
-            err = UNZ_CRCERROR;
+	if (pfile_in_zip_read_info->crc32 != pfile_in_zip_read_info->crc32_wait)
+	    err = UNZ_CRCERROR;
     }
 
 
     TRYFREE(pfile_in_zip_read_info->read_buffer);
     pfile_in_zip_read_info->read_buffer = NULL;
     if (pfile_in_zip_read_info->stream_initialised == Z_DEFLATED)
-        inflateEnd(&pfile_in_zip_read_info->stream);
+	inflateEnd(&pfile_in_zip_read_info->stream);
 #ifdef HAVE_BZIP2
     else if (pfile_in_zip_read_info->stream_initialised == Z_BZIP2ED)
-        BZ2_bzDecompressEnd(&pfile_in_zip_read_info->bstream);
+	BZ2_bzDecompressEnd(&pfile_in_zip_read_info->bstream);
 #endif
 
 
@@ -2153,14 +2156,14 @@ static voidpf fopen_func(const void* filename, int mode)
     FILE* file = NULL;
     const char* mode_fopen = NULL;
     if ((mode & ZLIB_FILEFUNC_MODE_READWRITEFILTER) == ZLIB_FILEFUNC_MODE_READ)
-        mode_fopen = "rb";
+	mode_fopen = "rb";
     else if (mode & ZLIB_FILEFUNC_MODE_EXISTING)
-        mode_fopen = "r+b";
+	mode_fopen = "r+b";
     else if (mode & ZLIB_FILEFUNC_MODE_CREATE)
-        mode_fopen = "wb";
+	mode_fopen = "wb";
 
     if ((filename != NULL) && (mode_fopen != NULL))
-        file = fopen(filename, mode_fopen);
+	file = fopen(filename, mode_fopen);
     return file;
 }
 
@@ -2177,14 +2180,14 @@ static int fseek_func (voidpf stream, ZPOS64_T offset, int origin)
     switch (origin)
     {
     case ZLIB_FILEFUNC_SEEK_CUR :
-        fseek_origin = SEEK_CUR;
-        break;
+	fseek_origin = SEEK_CUR;
+	break;
     case ZLIB_FILEFUNC_SEEK_END :
-        fseek_origin = SEEK_END;
-        break;
+	fseek_origin = SEEK_END;
+	break;
     case ZLIB_FILEFUNC_SEEK_SET :
-        fseek_origin = SEEK_SET;
-        break;
+	fseek_origin = SEEK_SET;
+	break;
     default: return -1;
     }
     ret = 0;
diff --git a/src/main/dstruct.c b/src/main/dstruct.c
index f7e6878..fef7757 100644
--- a/src/main/dstruct.c
+++ b/src/main/dstruct.c
@@ -1,7 +1,7 @@
 /*
  *  R : A Computer Langage for Statistical Data Analysis
  *  Copyright (C) 1995, 1996  Robert Gentleman and Ross Ihaka
- *  Copyright (C) 2001-2013  The R Core Team
+ *  Copyright (C) 2001-2014  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
@@ -15,7 +15,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  */
 
 
diff --git a/src/main/duplicate.c b/src/main/duplicate.c
index 42eb634..6005489 100644
--- a/src/main/duplicate.c
+++ b/src/main/duplicate.c
@@ -2,7 +2,7 @@
  *  R : A Computer Langage for Statistical Data Analysis
  *  Copyright (C) 1995, 1996  Robert Gentleman and Ross Ihaka
  *            (C) 2004  The R Foundation
- *  Copyright (C) 1998-2012 The R Core Team.
+ *  Copyright (C) 1998-2015 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
@@ -16,7 +16,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  */
 
 #ifdef HAVE_CONFIG_H
@@ -27,6 +27,8 @@
 
 #include <R_ext/RS.h> /* S4 bit */
 
+#include "duplicate.h"
+
 /*  duplicate  -  object duplication  */
 
 /*  Because we try to maintain the illusion of call by
@@ -38,13 +40,18 @@
  *  promises requires that the promises be forced and
  *  the value duplicated.  */
 
+#define COPY_TRUELENGTH(to, from) do {			\
+	if (! IS_GROWABLE(from))			\
+	    SET_TRUELENGTH(to, XTRUELENGTH(from));	\
+    } while (0)
+
 /* This macro pulls out the common code in copying an atomic vector.
    The special handling of the scalar case (__n__ == 1) seems to make
    a small but measurable difference, at least for some cases
    and when (as in R 2.15.x) a for() loop was used.
 */
 #ifdef __APPLE__
-/* it seems some OS X builds do not copy >= 2^32 bytes fully */
+/* it seems macOS builds did not copy >= 2^32 bytes fully */
 #define DUPLICATE_ATOMIC_VECTOR(type, fun, to, from, deep) do {	\
   R_xlen_t __n__ = XLENGTH(from); \
   PROTECT(from); \
@@ -54,13 +61,13 @@
       R_xlen_t __this; \
       type *__to = fun(to), *__from = fun(from); \
       do { \
-         __this = (__n__ < 1000000) ? __n__ : 1000000; \
-         memcpy(__to, __from, __this * sizeof(type));  \
+	 __this = (__n__ < 1000000) ? __n__ : 1000000; \
+	 memcpy(__to, __from, __this * sizeof(type));  \
 	 __n__ -= __this;  __to += __this; __from += __this; \
       } while(__n__ > 0); \
   } \
   DUPLICATE_ATTRIB(to, from, deep);		 \
-  SET_TRUELENGTH(to, XTRUELENGTH(from)); \
+  COPY_TRUELENGTH(to, from); \
   UNPROTECT(2); \
 } while (0)
 #else
@@ -71,7 +78,7 @@
   if (__n__ == 1) fun(to)[0] = fun(from)[0]; \
   else memcpy(fun(to), fun(from), __n__ * sizeof(type)); \
   DUPLICATE_ATTRIB(to, from, deep); \
-  SET_TRUELENGTH(to, XTRUELENGTH(from)); \
+  COPY_TRUELENGTH(to, from); \
   UNPROTECT(2); \
 } while (0)
 #endif
@@ -186,7 +193,7 @@ SEXP lazy_duplicate(SEXP s) {
     case RAWSXP:
     case STRSXP:
     case S4SXP:
-        SET_NAMED(s, 2);
+	SET_NAMED(s, 2);
 	break;
     default:
 	UNIMPLEMENTED_TYPE("lazy_duplicate", s);
@@ -196,9 +203,9 @@ SEXP lazy_duplicate(SEXP s) {
 
 static SEXP duplicate_child(SEXP s, Rboolean deep) {
     if (deep)
-        return duplicate1(s, TRUE);
+	return duplicate1(s, TRUE);
     else
-        return lazy_duplicate(s);
+	return lazy_duplicate(s);
 }
 
 /*****************/
@@ -221,28 +228,28 @@ Rboolean R_cycle_detected(SEXP s, SEXP child) {
 	case BCODESXP:
 	case WEAKREFSXP:
 	    /* it's a cycle but one that is OK */
-	    return FALSE; 
+	    return FALSE;
 	default:
-        return TRUE;
+	return TRUE;
 	}
     }
     if (ATTRIB(child) != R_NilValue) {
-        if (R_cycle_detected(s, ATTRIB(child)))
-            return TRUE;
+	if (R_cycle_detected(s, ATTRIB(child)))
+	    return TRUE;
     }
     if (isPairList(child)) {
-        SEXP el = child;
-        while(el != R_NilValue) {
+	SEXP el = child;
+	while(el != R_NilValue) {
 	    if (s == el || R_cycle_detected(s, CAR(el)))
-                return TRUE;
+		return TRUE;
 	    if (ATTRIB(el) != R_NilValue && R_cycle_detected(s, ATTRIB(el)))
-		return TRUE;		
+		return TRUE;
 	    el = CDR(el);
 	}
     } else if (isVectorList(child)) {
-        for(int i = 0 ; i < length(child); i++)
+	for(int i = 0 ; i < length(child); i++)
 	    if (R_cycle_detected(s, VECTOR_ELT(child, i)))
-                return TRUE;
+		return TRUE;
     }
     return FALSE;
 }
@@ -283,19 +290,13 @@ static SEXP duplicate1(SEXP s, Rboolean deep)
 	return s;
     case CLOSXP:
 	PROTECT(s);
-	if (R_jit_enabled > 1 && TYPEOF(BODY(s)) != BCODESXP) {
-	    int old_enabled = R_jit_enabled;
-	    SEXP new_s;
-	    R_jit_enabled = 0;
-	    new_s = R_cmpfun(s);
-	    SET_BODY(s, BODY(new_s));
-	    R_jit_enabled = old_enabled;
-	}
 	PROTECT(t = allocSExp(CLOSXP));
 	SET_FORMALS(t, FORMALS(s));
 	SET_BODY(t, BODY(s));
 	SET_CLOENV(t, CLOENV(s));
 	DUPLICATE_ATTRIB(t, s, deep);
+	if (NOJIT(s)) SET_NOJIT(t);
+	if (MAYBEJIT(s)) SET_MAYBEJIT(t);
 	UNPROTECT(2);
 	break;
     case LISTSXP:
@@ -328,7 +329,7 @@ static SEXP duplicate1(SEXP s, Rboolean deep)
 	for(i = 0 ; i < n ; i++)
 	    SET_VECTOR_ELT(t, i, duplicate_child(VECTOR_ELT(s, i), deep));
 	DUPLICATE_ATTRIB(t, s, deep);
-	SET_TRUELENGTH(t, TRUELENGTH(s));
+	COPY_TRUELENGTH(t, s);
 	UNPROTECT(2);
 	break;
     case LGLSXP: DUPLICATE_ATOMIC_VECTOR(int, LOGICAL, t, s, deep); break;
@@ -364,44 +365,32 @@ static SEXP duplicate1(SEXP s, Rboolean deep)
 
 void copyVector(SEXP s, SEXP t)
 {
-    R_xlen_t i, ns, nt;
     SEXPTYPE sT = TYPEOF(s), tT = TYPEOF(t);
     if (sT != tT)
 	error("vector types do not match in copyVector");
-    nt = XLENGTH(t);
-    ns = XLENGTH(s);
+    R_xlen_t ns = XLENGTH(s), nt = XLENGTH(t);
     switch (sT) {
     case STRSXP:
-	for (i = 0; i < ns; i++)
-	    SET_STRING_ELT(s, i, STRING_ELT(t, i % nt));
-	break;
-    case EXPRSXP:
-	for (i = 0; i < ns; i++)
-	    SET_VECTOR_ELT(s, i, VECTOR_ELT(t, i % nt));
+	xcopyStringWithRecycle(s, t, 0, ns, nt);
 	break;
     case LGLSXP:
-	for (i = 0; i < ns; i++)
-	    LOGICAL(s)[i] = LOGICAL(t)[i % nt];
+	xcopyLogicalWithRecycle(LOGICAL(s), LOGICAL(t), 0, ns, nt);
 	break;
     case INTSXP:
-	for (i = 0; i < ns; i++)
-	    INTEGER(s)[i] = INTEGER(t)[i % nt];
+	xcopyIntegerWithRecycle(INTEGER(s), INTEGER(t), 0, ns, nt);
 	break;
     case REALSXP:
-	for (i = 0; i < ns; i++)
-	    REAL(s)[i] = REAL(t)[i % nt];
+	xcopyRealWithRecycle(REAL(s), REAL(t), 0, ns, nt);
 	break;
     case CPLXSXP:
-	for (i = 0; i < ns; i++)
-	    COMPLEX(s)[i] = COMPLEX(t)[i % nt];
+	xcopyComplexWithRecycle(COMPLEX(s), COMPLEX(t), 0, ns, nt);
 	break;
+    case EXPRSXP:
     case VECSXP:
-	for (i = 0; i < ns; i++)
-	    SET_VECTOR_ELT(s, i, VECTOR_ELT(t, i % nt));
+	xcopyVectorWithRecycle(s, t, 0, ns, nt);
 	break;
     case RAWSXP:
-	for (i = 0; i < ns; i++)
-	    RAW(s)[i] = RAW(t)[i % nt];
+	xcopyRawWithRecycle(RAW(s), RAW(t), 0, ns, nt);
 	break;
     default:
 	UNIMPLEMENTED_TYPE("copyVector", s);
@@ -410,31 +399,26 @@ void copyVector(SEXP s, SEXP t)
 
 void copyListMatrix(SEXP s, SEXP t, Rboolean byrow)
 {
-    SEXP pt, tmp;
-    int i, j, nr, nc;
-    R_xlen_t ns;
-
-    nr = nrows(s);
-    nc = ncols(s);
-    ns = ((R_xlen_t) nr) * nc;
-    pt = t;
+    int nr = nrows(s), nc = ncols(s);
+    R_xlen_t ns = ((R_xlen_t) nr) * nc;
+    SEXP pt = t;
     if(byrow) {
 	R_xlen_t NR = nr;
-	PROTECT(tmp = allocVector(STRSXP, ns));
-	for (i = 0; i < nr; i++)
-	    for (j = 0; j < nc; j++) {
+	SEXP tmp = PROTECT(allocVector(STRSXP, ns));
+	for (int i = 0; i < nr; i++)
+	    for (int j = 0; j < nc; j++) {
 		SET_STRING_ELT(tmp, i + j * NR, duplicate(CAR(pt)));
 		pt = CDR(pt);
 		if(pt == R_NilValue) pt = t;
 	    }
-	for (i = 0; i < ns; i++) {
+	for (int i = 0; i < ns; i++) {
 	    SETCAR(s, STRING_ELT(tmp, i++));
 	    s = CDR(s);
 	}
 	UNPROTECT(1);
     }
     else {
-	for (i = 0; i < ns; i++) {
+	for (int i = 0; i < ns; i++) {
 	    SETCAR(s, duplicate(CAR(pt)));
 	    s = CDR(s);
 	    pt = CDR(pt);
@@ -445,51 +429,39 @@ void copyListMatrix(SEXP s, SEXP t, Rboolean byrow)
 
 void copyMatrix(SEXP s, SEXP t, Rboolean byrow)
 {
-    int i, j, nr, nc;
-    R_xlen_t k, nt;
-
-    nr = nrows(s);
-    nc = ncols(s);
-    nt = XLENGTH(t);
-    k = 0;
+    int nr = nrows(s), nc = ncols(s);
+    R_xlen_t nt = XLENGTH(t);
 
     if (byrow) {
-	R_xlen_t NR = nr;
 	switch (TYPEOF(s)) {
 	case STRSXP:
-	    for (i = 0; i < nr; i++)
-		for (j = 0; j < nc; j++)
-		    SET_STRING_ELT(s, i + j * NR, STRING_ELT(t, k++ % nt));
+	    FILL_MATRIX_BYROW_ITERATE(0, nr, nc, nt)
+		SET_STRING_ELT(s, didx, STRING_ELT(t, sidx));
 	    break;
 	case LGLSXP:
-	    for (i = 0; i < nr; i++)
-		for (j = 0; j < nc; j++)
-		    LOGICAL(s)[i + j * NR] = LOGICAL(t)[k++ % nt];
+	    FILL_MATRIX_BYROW_ITERATE(0, nr, nc, nt)
+		LOGICAL(s)[didx] = LOGICAL(t)[sidx];
 	    break;
 	case INTSXP:
-	    for (i = 0; i < nr; i++)
-		for (j = 0; j < nc; j++)
-		    INTEGER(s)[i + j * NR] = INTEGER(t)[k++ % nt];
+	    FILL_MATRIX_BYROW_ITERATE(0, nr, nc, nt)
+		INTEGER(s)[didx] = INTEGER(t)[sidx];
 	    break;
 	case REALSXP:
-	    for (i = 0; i < nr; i++)
-		for (j = 0; j < nc; j++)
-		    REAL(s)[i + j * NR] = REAL(t)[k++ % nt];
+	    FILL_MATRIX_BYROW_ITERATE(0, nr, nc, nt)
+		REAL(s)[didx] = REAL(t)[sidx];
 	    break;
 	case CPLXSXP:
-	    for (i = 0; i < nr; i++)
-		for (j = 0; j < nc; j++)
-		    COMPLEX(s)[i + j * NR] = COMPLEX(t)[k++ % nt];
+	    FILL_MATRIX_BYROW_ITERATE(0, nr, nc, nt)
+		COMPLEX(s)[didx] = COMPLEX(t)[sidx];
 	    break;
+	case EXPRSXP:
 	case VECSXP:
-	    for (i = 0; i < nr; i++)
-		for (j = 0; j < nc; j++)
-		    SET_VECTOR_ELT(s, i + j * NR, VECTOR_ELT(t, k++ % nt));
+	    FILL_MATRIX_BYROW_ITERATE(0, nr, nc, nt)
+		SET_VECTOR_ELT(s, didx, VECTOR_ELT(t, sidx));
 	    break;
 	case RAWSXP:
-	    for (i = 0; i < nr; i++)
-		for (j = 0; j < nc; j++)
-		    RAW(s)[i + j * NR] = RAW(t)[k++ % nt];
+	    FILL_MATRIX_BYROW_ITERATE(0, nr, nc, nt)
+		RAW(s)[didx] = RAW(t)[sidx];
 	    break;
 	default:
 	    UNIMPLEMENTED_TYPE("copyMatrix", s);
@@ -498,3 +470,87 @@ void copyMatrix(SEXP s, SEXP t, Rboolean byrow)
     else
 	copyVector(s, t);
 }
+
+#define COPY_WITH_RECYCLE(VALTYPE, TNAME) \
+void attribute_hidden \
+xcopy##TNAME##WithRecycle(VALTYPE *dst, VALTYPE *src, R_xlen_t dstart, R_xlen_t n, R_xlen_t nsrc) { \
+							\
+    if (nsrc >= n) { /* no recycle needed */		\
+	for(R_xlen_t i = 0; i < n; i++)		\
+	    dst[dstart + i] = src[i];			\
+	return;					\
+    }							\
+    if (nsrc == 1) {					\
+	VALTYPE val = src[0];				\
+	for(R_xlen_t i = 0; i < n; i++)			\
+	    dst[dstart + i] = val;			\
+	return;						\
+    }							\
+							\
+    /* recycle needed */					\
+    R_xlen_t sidx = 0;					\
+    for(R_xlen_t i = 0; i < n; i++, sidx++) {		\
+	if (sidx == nsrc) sidx = 0;			\
+	dst[dstart + i] = src[sidx];			\
+    }							\
+}
+
+COPY_WITH_RECYCLE(Rcomplex, Complex)	/* xcopyComplexWithRecycle */
+COPY_WITH_RECYCLE(int, Integer)		/* xcopyIntegerWithRecycle */
+COPY_WITH_RECYCLE(int, Logical)		/* xcopyLogicalWithRecycle */
+COPY_WITH_RECYCLE(Rbyte, Raw)		/* xcopyRawWithRecycle */
+COPY_WITH_RECYCLE(double, Real)		/* xcopyRealWithRecycle */
+
+#define COPY_ELT_WITH_RECYCLE(TNAME, GETELT, SETELT) \
+void attribute_hidden \
+xcopy##TNAME##WithRecycle(SEXP dst, SEXP src, R_xlen_t dstart, R_xlen_t n, R_xlen_t nsrc) { \
+							\
+    if (nsrc >= n) { /* no recycle needed */		\
+	for(R_xlen_t i = 0; i < n; i++)		\
+	    SETELT(dst, dstart + i, GETELT(src, i));	\
+	return;					\
+    }							\
+    if (nsrc == 1) {					\
+	SEXP val = GETELT(src, 0);			\
+	for(R_xlen_t i = 0; i < n; i++)			\
+	    SETELT(dst, dstart + i, val);		\
+	return;						\
+    }							\
+							\
+    /* recycle needed */					\
+    R_xlen_t sidx = 0;					\
+    for(R_xlen_t i = 0; i < n; i++, sidx++) {		\
+	if (sidx == nsrc) sidx = 0;			\
+	SETELT(dst, dstart + i, GETELT(src, sidx));	\
+    }							\
+}
+
+COPY_ELT_WITH_RECYCLE(String, STRING_ELT, SET_STRING_ELT) /* xcopyStringWithRecycle */
+COPY_ELT_WITH_RECYCLE(Vector, VECTOR_ELT, SET_VECTOR_ELT) /* xcopyVectorWithRecycle */
+
+#define FILL_WITH_RECYCLE(VALTYPE, TNAME) \
+void attribute_hidden xfill##TNAME##MatrixWithRecycle(VALTYPE *dst, VALTYPE *src,	\
+    R_xlen_t dstart, R_xlen_t drows, R_xlen_t srows,		\
+    R_xlen_t cols, R_xlen_t nsrc) {				\
+								\
+    FILL_MATRIX_ITERATE(dstart, drows, srows, cols, nsrc)	\
+	dst[didx] = src[sidx];					\
+}
+
+FILL_WITH_RECYCLE(Rcomplex, Complex)	/* xfillComplexMatrixWithRecycle */
+FILL_WITH_RECYCLE(int, Integer)		/* xfillIntegerMatrixWithRecycle */
+FILL_WITH_RECYCLE(int, Logical)		/* xfillLogicalMatrixWithRecycle */
+FILL_WITH_RECYCLE(Rbyte, Raw)		/* xfillRawMatrixWithRecycle */
+FILL_WITH_RECYCLE(double, Real)		/* xfillRealMatrixWithRecycle */
+
+#define FILL_ELT_WITH_RECYCLE(TNAME, GETELT, SETELT) \
+void attribute_hidden xfill##TNAME##MatrixWithRecycle(SEXP dst, SEXP src,	\
+    R_xlen_t dstart, R_xlen_t drows, R_xlen_t srows,		\
+    R_xlen_t cols, R_xlen_t nsrc) {				\
+								\
+    FILL_MATRIX_ITERATE(dstart, drows, srows, cols, nsrc)	\
+	SETELT(dst, didx, GETELT(src, sidx));			\
+}
+
+FILL_ELT_WITH_RECYCLE(String, STRING_ELT, SET_STRING_ELT) /* xfillStringMatrixWithRecycle */
+FILL_ELT_WITH_RECYCLE(Vector, VECTOR_ELT, SET_VECTOR_ELT) /* xfillVectorMatrixWithRecycle */
diff --git a/src/main/duplicate.h b/src/main/duplicate.h
new file mode 100644
index 0000000..918a6d9
--- /dev/null
+++ b/src/main/duplicate.h
@@ -0,0 +1,70 @@
+/*
+ *  R : A Computer Language for Statistical Data Analysis
+ *  Copyright (C) 1998--2014	    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
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, a copy is available at
+ *  https://www.R-project.org/Licenses/
+ */
+
+#ifndef R_DUPLICATE_H
+#define R_DUPLICATE_H
+
+/*    
+FILL_MATRIX_ITERATE
+Iterator macro to fill a matrix from a vector with re-use of vector
+
+    for(R_xlen_t i = 0; i < srows; i++) {
+        R_xlen_t sidx = i;
+        for(R_xlen_t j = 0; j < cols; j++, sidx += srows) {
+            if (sidx >= nsrc) sidx -= nsrc;
+            didx = dstart + i + (j * drows);
+            ... "dst[didx] = src[sidx]"
+        }
+    }
+*/
+
+#define FILL_MATRIX_ITERATE(dstart, drows, srows, cols, nsrc) 		\
+    for(R_xlen_t i = 0, sidx = 0; i < srows; i++, sidx = i)		\
+        for(R_xlen_t j = 0, didx = dstart + i; j < cols;		\
+            j++, 							\
+            sidx += srows,						\
+            (sidx >= nsrc) ? sidx -= nsrc : 0,				\
+            didx += drows)
+
+void xcopyComplexWithRecycle(Rcomplex *dst, Rcomplex *src, R_xlen_t dstart, R_xlen_t n, R_xlen_t nsrc);
+void xcopyIntegerWithRecycle(int *dst, int *src, R_xlen_t dstart, R_xlen_t n, R_xlen_t nsrc);
+void xcopyLogicalWithRecycle(int *dst, int *src, R_xlen_t dstart, R_xlen_t n, R_xlen_t nsrc);
+void xcopyRawWithRecycle(Rbyte *dst, Rbyte *src, R_xlen_t dstart, R_xlen_t n, R_xlen_t nsrc);
+void xcopyRealWithRecycle(double *dst, double *src, R_xlen_t dstart, R_xlen_t n, R_xlen_t nsrc);
+void xcopyStringWithRecycle(SEXP dst, SEXP src, R_xlen_t dstart, R_xlen_t n, R_xlen_t nsrc);
+void xcopyVectorWithRecycle(SEXP dst, SEXP src, R_xlen_t dstart, R_xlen_t n, R_xlen_t nsrc);
+
+void xfillComplexMatrixWithRecycle(Rcomplex *dst, Rcomplex *src, R_xlen_t dstart, R_xlen_t drows, R_xlen_t srows, R_xlen_t cols, R_xlen_t nsrc);
+void xfillIntegerMatrixWithRecycle(int *dst, int *src, R_xlen_t dstart, R_xlen_t drows, R_xlen_t srows, R_xlen_t cols, R_xlen_t nsrc);
+void xfillLogicalMatrixWithRecycle(int *dst, int *src, R_xlen_t dstart, R_xlen_t drows, R_xlen_t srows, R_xlen_t cols, R_xlen_t nsrc);
+void xfillRawMatrixWithRecycle(Rbyte *dst, Rbyte *src, R_xlen_t dstart, R_xlen_t drows, R_xlen_t srows, R_xlen_t cols, R_xlen_t nsrc);
+void xfillRealMatrixWithRecycle(double *dst, double *src, R_xlen_t dstart, R_xlen_t drows, R_xlen_t srows, R_xlen_t cols, R_xlen_t nsrc);
+void xfillStringMatrixWithRecycle(SEXP dst, SEXP src, R_xlen_t dstart, R_xlen_t drows, R_xlen_t srows, R_xlen_t cols, R_xlen_t nsrc);
+void xfillVectorMatrixWithRecycle(SEXP dst, SEXP src, R_xlen_t dstart, R_xlen_t drows, R_xlen_t srows, R_xlen_t cols, R_xlen_t nsrc);
+
+#define FILL_MATRIX_BYROW_ITERATE(dstart, drows, dcols, nsrc) 		\
+    for(R_xlen_t i = 0, sidx = 0; i < drows; i++)			\
+        for(R_xlen_t j = 0, didx = dstart + i; j < dcols;		\
+            j++, 							\
+            sidx++,							\
+            (sidx >= nsrc) ? sidx -= nsrc : 0,				\
+            didx += drows)
+
+
+#endif /* R_DUPLICATE_H */
diff --git a/src/main/edit.c b/src/main/edit.c
index 61df645..bfaf664 100644
--- a/src/main/edit.c
+++ b/src/main/edit.c
@@ -1,7 +1,7 @@
 /*
  *  R : A Computer Langage for Statistical Data Analysis
  *  Copyright (C) 1995, 1996  Robert Gentleman and Ross Ihaka
- *  Copyright (C) 1998-2014   The R Core Team
+ *  Copyright (C) 1998-2015   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
@@ -15,7 +15,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  */
 
 /* <UTF8> char here is handled as a whole string, but note that
@@ -120,9 +120,10 @@ SEXP do_edit(SEXP call, SEXP op, SEXP args, SEXP rho)
 	if((fp=R_fopen(R_ExpandFileName(filename), "w")) == NULL)
 	    errorcall(call, _("unable to open file"));
 	if (LENGTH(STRING_ELT(fn, 0)) == 0) EdFileUsed++;
-	src = deparse1(x, 0, FORSOURCING); /* deparse for sourcing, not for display */
+	PROTECT(src = deparse1(x, 0, FORSOURCING)); /* deparse for sourcing, not for display */
 	for (i = 0; i < LENGTH(src); i++)
 	    fprintf(fp, "%s\n", translateChar(STRING_ELT(src, i)));
+	UNPROTECT(1); /* src */
 	fclose(fp);
     }
 #ifdef Win32
@@ -179,9 +180,9 @@ SEXP do_edit(SEXP call, SEXP op, SEXP args, SEXP rho)
 	srcfile = eval(srcfile, R_BaseEnv);
 	UNPROTECT(5);
     } else
-    	srcfile = R_NilValue;
+	srcfile = R_NilValue;
     PROTECT(srcfile);
-    
+
     /* <FIXME> setup a context to close the file, and parse and eval
        line by line */
     if((fp = R_fopen(R_ExpandFileName(filename), "r")) == NULL)
diff --git a/src/main/engine.c b/src/main/engine.c
index d1e4ae1..e7b4100 100644
--- a/src/main/engine.c
+++ b/src/main/engine.c
@@ -1,6 +1,6 @@
 /*
  *  R : A Computer Language for Statistical Data Analysis
- *  Copyright (C) 2001-2014  The R Core Team.
+ *  Copyright (C) 2001-2015  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
@@ -14,7 +14,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  */
 
 #ifdef HAVE_CONFIG_H
@@ -1595,16 +1595,22 @@ VFontTable[] = {
     { NULL,		          0, 0 },
 };
 
+/* A Hershey family (all of which have names starting with Hershey) may
+   have had the eighth byte changed to the family code (1...8), so
+   saving further table lookups.
+
+   (Done by GEText and GEStrWidth/Height, and also set that way in the
+   graphics package's plot.c for C_text, C_strWidth and C_strheight,
+   and in plot3d.c for C_contour.)
+*/
 static int VFontFamilyCode(char *fontfamily)
 {
-    int i, j = fontfamily[3];
-
-    /* Inline vfont is passed down as familycode in fourth byte */
-    if (!strncmp(fontfamily, "Her", 3) && j < 9) return 100 + j;
-    for (i = 0; VFontTable[i].minface; i++)
-	if (!strcmp(fontfamily, VFontTable[i].name)) {
-	    return i+1;
-	}
+    if (strlen(fontfamily) > 7)  {
+	unsigned int j = fontfamily[7]; // protect against signed chars
+	if (!strncmp(fontfamily, "Hershey", 7) && j < 9) return 100 + j;
+	for (int i = 0; VFontTable[i].minface; i++)
+	    if (!strcmp(fontfamily, VFontTable[i].name)) return i + 1;
+    }
     return -1;
 }
 
@@ -1677,7 +1683,7 @@ void GEText(double x, double y, const char * const str, cetype_t enc,
     if (vfontcode >= 100) {
 	R_GE_VText(x, y, str, enc, xc, yc, rot, gc, dd);
     } else if (vfontcode >= 0) {
-	gc->fontfamily[3] = (char) vfontcode;
+	gc->fontfamily[7] = (char) vfontcode;
 	gc->fontface = VFontFaceCode(vfontcode, gc->fontface);
 	R_GE_VText(x, y, str, enc, xc, yc, rot, gc, dd);
     } else {
@@ -2456,7 +2462,7 @@ double GEStrWidth(const char *str, cetype_t enc, const pGEcontext gc, pGEDevDesc
     if (vfontcode >= 100)
 	return R_GE_VStrWidth(str, enc, gc, dd);
     else if (vfontcode >= 0) {
-	gc->fontfamily[3] = (char) vfontcode;
+	gc->fontfamily[7] = (char) vfontcode;
 	gc->fontface = VFontFaceCode(vfontcode, gc->fontface);
 	return R_GE_VStrWidth(str, enc, gc, dd);
     } else {
@@ -2516,7 +2522,7 @@ double GEStrHeight(const char *str, cetype_t enc, const pGEcontext gc, pGEDevDes
     if (vfontcode >= 100)
 	return R_GE_VStrHeight(str, enc, gc, dd);
     else if (vfontcode >= 0) {
-	gc->fontfamily[3] = (char) vfontcode;
+	gc->fontfamily[7] = (char) vfontcode;
 	gc->fontface = VFontFaceCode(vfontcode, gc->fontface);
 	return R_GE_VStrHeight(str, enc, gc, dd);
     } else {
@@ -2552,9 +2558,7 @@ double GEStrHeight(const char *str, cetype_t enc, const pGEcontext gc, pGEDevDes
  * GEStrMetric
  ****************************************************************
 
- * This does not (currently) depend on the encoding.  It depends on
- * the string only through the number of lines of text (via embedded
- * \n) and we assume they are never part of an mbc.
+ * Modelled on GEText handling of encodings
  */
 void GEStrMetric(const char *str, cetype_t enc, const pGEcontext gc, 
                  double *ascent, double *descent, double *width,
@@ -2586,11 +2590,75 @@ void GEStrMetric(const char *str, cetype_t enc, const pGEcontext gc,
         double lineheight = gc->lineheight * gc->cex * dd->dev->cra[1] *
                             gc->ps/dd->dev->startps;
 	int n;
+        char *sb, *sbuf;
+        cetype_t enc2;
+	int noMetricInfo;
+       
+        const void *vmax = vmaxget();
+
+        GEMetricInfo('M', gc, &asc, &dsc, &wid, dd);
+        noMetricInfo = (asc == 0 && dsc == 0 && wid == 0) ? 1 : 0;
+
+        enc2 = (gc->fontface == 5) ? CE_SYMBOL : enc;
+        if(enc2 != CE_SYMBOL)
+            enc2 = (dd->dev->hasTextUTF8 == TRUE) ? CE_UTF8 : CE_NATIVE;
+        else if(dd->dev->wantSymbolUTF8 == TRUE) enc2 = CE_UTF8;
+        else if(dd->dev->wantSymbolUTF8 == NA_LOGICAL) {
+            enc = CE_LATIN1;
+            enc2 = CE_UTF8;
+        }
+
+        /* Put the first line in a string */
+        sb = sbuf = (char*) R_alloc(strlen(str) + 1, sizeof(char));
+        s = str;
+        while (*s != '\n' && *s != '\0') {
+            *sb++ = *s++;
+        }
+        *sb = '\0';
+        /* Find the largest ascent for the first line */        
+        if (noMetricInfo) {
+            *ascent = GEStrHeight(sbuf, enc2, gc, dd);
+        } else {
+            s = reEnc(sbuf, enc, enc2, 2);
+            if(enc2 != CE_SYMBOL && !strIsASCII(s)) {
+                if(mbcslocale && enc2 == CE_NATIVE) {
+                    size_t n = strlen(s), used;
+                    wchar_t wc;
+                    mbstate_t mb_st;
+                    mbs_init(&mb_st);
+                    while ((used = mbrtowc(&wc, s, n, &mb_st)) > 0) {
+                        GEMetricInfo((int) wc, gc, &asc, &dsc, &wid, dd);
+                        if (asc > *ascent)
+                            *ascent = asc;
+                        s += used; n -=used;
+                    }
+                } else if (enc2 == CE_UTF8) {
+                    size_t used;
+                    wchar_t wc;
+                    while ((used = utf8toucs(&wc, s)) > 0) {
+                        GEMetricInfo(-(int) wc, gc, &asc, &dsc, &wid,dd);
+                        if (asc > *ascent)
+                            *ascent = asc;
+                        s += used;
+                    }
+                }
+            } else {
+                while (*s != '\0') {
+                    GEMetricInfo((unsigned char) *s++, gc, 
+                                 &asc, &dsc, &wid, dd);
+                    if (asc > *ascent)
+                        *ascent = asc;
+                }
+            }
+        }
+        
 	/* Count the lines of text minus one */
 	n = 0;
 	for(s = str; *s ; s++)
 	    if (*s == '\n')
 		n++;
+	h = n * lineheight;
+
         /* Where is the start of the last line? */
         if (n > 0) {
             while (*s != '\n') 
@@ -2599,19 +2667,53 @@ void GEStrMetric(const char *str, cetype_t enc, const pGEcontext gc,
         } else {
             s = str;
         }
-	h = n * lineheight;
-        /* Find the largest ascent and descent for the last line of text
-         */
-        while (*s) {
-            GEMetricInfo(*s, gc, &asc, &dsc, &wid, dd);
-            if (asc > *ascent)
-                *ascent = asc;
-            if (dsc > *descent)
-                *descent = dsc;
-            s++;
+        /* Put the last line in a string */
+        sb = sbuf;
+        while (*s != '\0') {
+            *sb++ = *s++;
         }
+        *sb = '\0';
+        /* Find the largest descent for the last line */
+        if (noMetricInfo) {
+            *descent = 0;
+        } else {
+            s = reEnc(sbuf, enc, enc2, 2);
+            if(enc2 != CE_SYMBOL && !strIsASCII(s)) {
+                if(mbcslocale && enc2 == CE_NATIVE) {
+                    size_t n = strlen(s), used;
+                    wchar_t wc;
+                    mbstate_t mb_st;
+                    mbs_init(&mb_st);
+                    while ((used = mbrtowc(&wc, s, n, &mb_st)) > 0) {
+                        GEMetricInfo((int) wc, gc, &asc, &dsc, &wid, dd);
+                        if (dsc > *descent)
+                            *descent = dsc;
+                        s += used; n -=used;
+                    }
+                } else if (enc2 == CE_UTF8) {
+                    size_t used;
+                    wchar_t wc;
+                    while ((used = utf8toucs(&wc, s)) > 0) {
+                        GEMetricInfo(-(int) wc, gc, &asc, &dsc, &wid,dd);
+                        if (dsc > *descent)
+                            *descent = dsc;
+                        s += used;
+                    }
+                }
+            } else {
+                while (*s != '\0') {
+                    GEMetricInfo((unsigned char) *s++, gc, 
+                                 &asc, &dsc, &wid, dd);
+                    if (dsc > *descent)
+                        *descent = dsc;
+                }
+            }
+        }
+
         *ascent = *ascent + h;
         *width = GEStrWidth(str, enc, gc ,dd);
+
+	vmaxset(vmax);
     }
 }
 
@@ -2650,6 +2752,11 @@ void GEdirtyDevice(pGEDevDesc dd)
     dd->dirty = TRUE;
 }
 
+void GEcleanDevice(pGEDevDesc dd)
+{
+    dd->dirty = FALSE;
+}
+
 /****************************************************************
  * GEcheckState
  ****************************************************************
@@ -2752,7 +2859,7 @@ void GEplayDisplayList(pGEDevDesc dd)
      */
     for (i = 0; i < MAX_GRAPHICS_SYSTEMS; i++)
 	if (dd->gesd[i] != NULL)
-	    (dd->gesd[i]->callback)(GE_RestoreState, dd, R_NilValue);
+	    (dd->gesd[i]->callback)(GE_RestoreState, dd, theList);
     /* Play the display list
      */
     PROTECT(theList);
@@ -2832,6 +2939,7 @@ SEXP GEcreateSnapshot(pGEDevDesc dd)
     int i;
     SEXP snapshot, tmp;
     SEXP state;
+    SEXP engineVersion;
     /* Create a list with one spot for the display list
      * and one spot each for the registered graphics systems
      * to put their graphics state
@@ -2854,7 +2962,10 @@ SEXP GEcreateSnapshot(pGEDevDesc dd)
 	    SET_VECTOR_ELT(snapshot, i + 1, state);
 	    UNPROTECT(1);
 	}
-    UNPROTECT(1);
+    PROTECT(engineVersion = allocVector(INTSXP, 1));
+    INTEGER(engineVersion)[0] = R_GE_getVersion();
+    setAttrib(snapshot, install("engineVersion"), engineVersion);
+    UNPROTECT(2);
     return snapshot;
 }
 
@@ -2865,25 +2976,6 @@ SEXP GEcreateSnapshot(pGEDevDesc dd)
 
 /* Recreate a saved display using the information in a structure
  * created by GEcreateSnapshot.
- *
- * The graphics engine assumes that it is getting a snapshot
- * that was created in THE CURRENT R SESSION
- * (Thus, it can assume that registered graphics systems are
- *  in the same order as they were when the snapshot was
- *  created -- in patricular, state information will be sent
- *  to the appropriate graphics system.)
- * [With only two systems and base registered on each device at
- * creation, that has to be true: and grid does not save any state.]
- *
- *  It also assumes that the system that created the snapshot is
- *  still loaded (e.g. the grid namespace has not been unloaded).
- *
- * It is possible to save a snapshot to an R variable
- * (and therefore save and reload it between sessions and
- *  even possibly into a different R version),
- * BUT this is strongly discouraged
- * (in the documentation for recordPlot() and replayPlot()
- *  and in the documentation for the Rgui interface on Windows)
  */
 
 void GEplaySnapshot(SEXP snapshot, pGEDevDesc dd)
@@ -2891,20 +2983,42 @@ void GEplaySnapshot(SEXP snapshot, pGEDevDesc dd)
     /* Only have to set up information for as many graphics systems
      * as were registered when the snapshot was taken.
      */
-    int i, numSystems = LENGTH(snapshot) - 1;
+    int i;
+    /* Check graphics engine version matches.
+     * If it does not, things still might work, so just a warning.
+     * NOTE though, that if it does not work, the results could be fatal.
+     */
+    SEXP snapshotEngineVersion;
+    int engineVersion = R_GE_getVersion();
+    PROTECT(snapshotEngineVersion = getAttrib(snapshot, 
+                                              install("engineVersion")));
+    if (isNull(snapshotEngineVersion)) {
+        warning(_("snapshot recorded with different graphics engine version (pre 11 - this is version %d)"),
+                engineVersion);
+    } else if (INTEGER(snapshotEngineVersion)[0] != engineVersion) {
+        int snapshotVersion = INTEGER(snapshotEngineVersion)[0];
+        warning(_("snapshot recorded with different graphics engine version (%d - this is version %d)"), 
+                snapshotVersion, engineVersion);
+    }
+    /* "clean" the device
+     */
+    GEcleanDevice(dd);
     /* Reset the snapshot state information in each registered
-     * graphics system
+     * graphics system.
+     * This may try to restore state for a system that was NOT 
+     * registered when the snapshot was taken, but the systems
+     * should protect themselves from that situation.
      */
-    for (i = 0; i < numSystems; i++)
+    for (i = 0; i < MAX_GRAPHICS_SYSTEMS; i++)
 	if (dd->gesd[i] != NULL)
-	    (dd->gesd[i]->callback)(GE_RestoreSnapshotState, dd,
-				    VECTOR_ELT(snapshot, i + 1));
+	    (dd->gesd[i]->callback)(GE_RestoreSnapshotState, dd, snapshot);
     /* Replay the display list
      */
     dd->displayList = duplicate(VECTOR_ELT(snapshot, 0));
     dd->DLlastElt = lastElt(dd->displayList);
     GEplayDisplayList(dd);
     if (!dd->displayListOn) GEinitDisplayList(dd);
+    UNPROTECT(1);
 }
 
 /* recordPlot() */
@@ -2956,6 +3070,8 @@ SEXP attribute_hidden do_recordGraphics(SEXP call, SEXP op, SEXP args, SEXP env)
     /*
      * First arg is an expression, second arg is a list, third arg is an env
      */
+
+    checkArity(op, args);
     SEXP code = CAR(args);
     SEXP list = CADR(args);
     SEXP parentenv = CADDR(args);
diff --git a/src/main/envir.c b/src/main/envir.c
index 8e3b72d..4075906 100644
--- a/src/main/envir.c
+++ b/src/main/envir.c
@@ -1,7 +1,7 @@
 /*
  *  R : A Computer Language for Statistical Data Analysis
  *  Copyright (C) 1995, 1996  Robert Gentleman and Ross Ihaka
- *  Copyright (C) 1999-2012  The R Core Team.
+ *  Copyright (C) 1999-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
@@ -15,7 +15,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  *
  *
  *
@@ -49,9 +49,10 @@
  */
 
 /* R 1.8.0: namespaces are no longer experimental, so the following
- *  are no longer 'experimental options':
+ *  are no longer 'experimental options', but rather three sections
+ *  describing the API:
  *
- * EXPERIMENTAL_NAMESPACES: When this is defined the variable
+ * NAMESPACES:
  *     R_BaseNamespace holds an environment that has R_GlobalEnv as
  *     its parent.  This environment does not actually contain any
  *     bindings of its own.  Instead, it redirects all fetches and
@@ -62,7 +63,7 @@
  * ENVIRONMENT_LOCKING: Locking an environment prevents new bindings
  *     from being created and existing bindings from being removed.
  *
- * FANCY_BINDINGS: This enables binding locking and "active bindings".
+ * FANCY_BINDINGS: We have binding locking and "active bindings".
  *     When a binding is locked, its value cannot be changed.  It may
  *     still be removed from the environment if the environment is not
  *     locked.
@@ -96,9 +97,9 @@
 #include <R_ext/Callbacks.h>
 
 #define FAST_BASE_CACHE_LOOKUP  /* Define to enable fast lookups of symbols */
-                                /*    in global cache from base environment */
+				/*    in global cache from base environment */
 
-#define IS_USER_DATABASE(rho)  OBJECT((rho)) && inherits((rho), "UserDefinedDatabase")
+#define IS_USER_DATABASE(rho)  (OBJECT((rho)) && inherits((rho), "UserDefinedDatabase"))
 
 /* various definitions of macros/functions in Defn.h */
 
@@ -162,13 +163,13 @@ static SEXP getActiveValue(SEXP fun)
 Rboolean R_envHasNoSpecialSymbols (SEXP env)
 {
     SEXP frame;
-   
+
     if (HASHTAB(env) != R_NilValue)
 	return FALSE;
 
     for (frame = FRAME(env); frame != R_NilValue; frame = CDR(frame))
-        if (IS_SPECIAL_SYMBOL(TAG(frame)))
-            return FALSE;
+	if (IS_SPECIAL_SYMBOL(TAG(frame)))
+	    return FALSE;
 
     return TRUE;
 }
@@ -650,6 +651,7 @@ static SEXP R_HashProfile(SEXP table)
 static SEXP R_GlobalCache, R_GlobalCachePreserve;
 #endif
 static SEXP R_BaseNamespaceName;
+static SEXP R_NamespaceSymbol;
 
 void attribute_hidden InitBaseEnv()
 {
@@ -659,6 +661,8 @@ void attribute_hidden InitBaseEnv()
 
 void attribute_hidden InitGlobalEnv()
 {
+    R_NamespaceSymbol = install(".__NAMESPACE__.");
+
     R_GlobalEnv = R_NewHashedEnv(R_BaseEnv, ScalarInteger(0));
     R_MethodsNamespace = R_GlobalEnv; // so it is initialized.
 #ifdef NEW_CODE /* Not used */
@@ -677,7 +681,7 @@ void attribute_hidden InitGlobalEnv()
     R_PreserveObject(R_BaseNamespaceName);
     R_NamespaceRegistry = R_NewHashedEnv(R_NilValue, ScalarInteger(0));
     R_PreserveObject(R_NamespaceRegistry);
-    defineVar(install("base"), R_BaseNamespace, R_NamespaceRegistry);
+    defineVar(R_BaseSymbol, R_BaseNamespace, R_NamespaceRegistry);
     /**** needed to properly initialize the base namespace */
 }
 
@@ -699,7 +703,7 @@ static void R_FlushGlobalCache(SEXP sym)
     if (entry != R_NilValue) {
 	SETCAR(entry, R_UnboundValue);
 #ifdef FAST_BASE_CACHE_LOOKUP
-        UNSET_BASE_SYM_CACHED(sym);
+	UNSET_BASE_SYM_CACHED(sym);
 #endif
     }
 }
@@ -729,7 +733,7 @@ static void R_FlushGlobalCacheFromUserTable(SEXP udb)
     names = tb->objects(tb);
     n = length(names);
     for(i = 0; i < n ; i++)
-	R_FlushGlobalCache(Rf_install(CHAR(STRING_ELT(names,i))));
+	R_FlushGlobalCache(Rf_installTrChar(STRING_ELT(names,i)));
 }
 
 static void R_AddGlobalCache(SEXP symbol, SEXP place)
@@ -756,7 +760,7 @@ static SEXP R_GetGlobalCache(SEXP symbol)
 
 #ifdef FAST_BASE_CACHE_LOOKUP
     if (BASE_SYM_CACHED(symbol))
-        return SYMBOL_BINDING_VALUE(symbol);
+	return SYMBOL_BINDING_VALUE(symbol);
 #endif
 
     vl = R_HashGet(hashIndex(symbol, R_GlobalCache), symbol,
@@ -798,7 +802,9 @@ static SEXP RemoveFromList(SEXP thing, SEXP list, int *found)
 	*found = 1;
 	SETCAR(list, R_UnboundValue); /* in case binding is cached */
 	LOCK_BINDING(list);           /* in case binding is cached */
-	return CDR(list);
+	SEXP rest = CDR(list);
+	SETCDR(list, R_NilValue);     /* to fix refcnt on 'rest' */
+	return rest;
     }
     else {
 	SEXP last = list;
@@ -809,6 +815,7 @@ static SEXP RemoveFromList(SEXP thing, SEXP list, int *found)
 		SETCAR(next, R_UnboundValue); /* in case binding is cached */
 		LOCK_BINDING(next);           /* in case binding is cached */
 		SETCDR(last, CDR(next));
+		SETCDR(next, R_NilValue);     /* to fix refcnt on 'list' */
 		return list;
 	    }
 	    else {
@@ -941,31 +948,33 @@ static SEXP findVarLocInFrame(SEXP rho, SEXP symbol, Rboolean *canCache)
 R_varloc_t R_findVarLocInFrame(SEXP rho, SEXP symbol)
 {
     SEXP binding = findVarLocInFrame(rho, symbol, NULL);
-    return binding == R_NilValue ? NULL : (R_varloc_t) binding;
+    R_varloc_t val;
+    val.cell = binding == R_NilValue ? NULL : binding;
+    return val;
 }
 
 attribute_hidden
 SEXP R_GetVarLocValue(R_varloc_t vl)
 {
-    return BINDING_VALUE((SEXP) vl);
+    return BINDING_VALUE(vl.cell);
 }
 
 attribute_hidden
 SEXP R_GetVarLocSymbol(R_varloc_t vl)
 {
-    return TAG((SEXP) vl);
+    return TAG(vl.cell);
 }
 
 /* used in methods */
 Rboolean R_GetVarLocMISSING(R_varloc_t vl)
 {
-    return MISSING((SEXP) vl);
+    return MISSING(vl.cell);
 }
 
 attribute_hidden
 void R_SetVarLocValue(R_varloc_t vl, SEXP value)
 {
-    SET_BINDING_VALUE((SEXP) vl, value);
+    SET_BINDING_VALUE(vl.cell, value);
 }
 
 
@@ -1089,6 +1098,72 @@ SEXP findVarInFrame(SEXP rho, SEXP symbol)
     return findVarInFrame3(rho, symbol, TRUE);
 }
 
+/*----------------------------------------------------------------------
+
+  readS3VarsFromFrame
+
+  Reads the S3 meta-variables from a given (single) frame.
+  R_UnboundValue marks that respective variable is not present.
+  This function is optimized to be fast in the common case when the
+  S3 meta-variables are in the expected order and that the frame is
+  represented by a pairlist.
+*/
+
+attribute_hidden
+void readS3VarsFromFrame(SEXP rho,
+    SEXP *dotGeneric, SEXP *dotGroup, SEXP *dotClass, SEXP *dotMethod,
+    SEXP *dotGenericCallEnv, SEXP *dotGenericDefEnv) {
+
+    if (TYPEOF(rho) == NILSXP ||
+	rho == R_BaseNamespace || rho == R_BaseEnv || rho == R_EmptyEnv ||
+	IS_USER_DATABASE(rho) || HASHTAB(rho) != R_NilValue) goto slowpath;
+
+    SEXP frame = FRAME(rho);
+
+    /*
+    This code speculates there is a specific order of S3 meta-variables.  It
+    holds in most (perhaps all non-fabricated) cases.  If at any time this
+    ceased to hold, this code will fall back to the slowpath, which may be
+    slow but still correct.
+    */
+
+    for(;TAG(frame) != R_dot_Generic; frame = CDR(frame))
+	if (frame == R_NilValue) goto slowpath;
+    *dotGeneric = BINDING_VALUE(frame);
+    frame = CDR(frame);
+
+    if (TAG(frame) != R_dot_Class) goto slowpath;
+    *dotClass = BINDING_VALUE(frame);
+    frame = CDR(frame);
+
+    if (TAG(frame) != R_dot_Method) goto slowpath;
+    *dotMethod = BINDING_VALUE(frame);
+    frame = CDR(frame);
+
+    if (TAG(frame) != R_dot_Group) goto slowpath;
+    *dotGroup = BINDING_VALUE(frame);
+    frame = CDR(frame);
+
+    if (TAG(frame) != R_dot_GenericCallEnv) goto slowpath;
+    *dotGenericCallEnv = BINDING_VALUE(frame);
+    frame = CDR(frame);
+
+    if (TAG(frame) != R_dot_GenericDefEnv) goto slowpath;
+    *dotGenericDefEnv = BINDING_VALUE(frame);
+
+    return;
+
+slowpath:
+    /* fall back to the slow but general implementation */
+
+    *dotGeneric = findVarInFrame3(rho, R_dot_Generic, TRUE);
+    *dotClass = findVarInFrame3(rho, R_dot_Class, TRUE);
+    *dotMethod = findVarInFrame3(rho, R_dot_Method, TRUE);
+    *dotGroup = findVarInFrame3(rho, R_dot_Group, TRUE);
+    *dotGenericCallEnv = findVarInFrame3(rho, R_dot_GenericCallEnv, TRUE);
+    *dotGenericDefEnv = findVarInFrame3(rho, R_dot_GenericDefEnv, TRUE);
+}
+
 
 /*----------------------------------------------------------------------
 
@@ -1241,7 +1316,7 @@ findVar1mode(SEXP symbol, SEXP rho, SEXPTYPE mode, int inherits,
 
 
 /*
-   ddVal:
+   ddVal ("dot-dot-value"):
    a function to take a name and determine if it is of the form
    ..x where x is an integer; if so x is returned otherwise 0 is returned
 */
@@ -1349,15 +1424,16 @@ SEXP dynamicfindVar(SEXP symbol, RCNTXT *cptr)
   This could call findVar1.  NB: they behave differently on failure.
 */
 
-SEXP findFun(SEXP symbol, SEXP rho)
+attribute_hidden
+SEXP findFun3(SEXP symbol, SEXP rho, SEXP call)
 {
     SEXP vl;
 
     /* If the symbol is marked as special, skip to the first
        environment that might contain such a symbol. */
     if (IS_SPECIAL_SYMBOL(symbol)) {
-        while (rho != R_EmptyEnv && NO_SPECIAL_SYMBOLS(rho))
-            rho = ENCLOS(rho);
+	while (rho != R_EmptyEnv && NO_SPECIAL_SYMBOLS(rho))
+	    rho = ENCLOS(rho);
     }
 
     while (rho != R_EmptyEnv) {
@@ -1365,10 +1441,10 @@ SEXP findFun(SEXP symbol, SEXP rho)
 #ifdef USE_GLOBAL_CACHE
 	if (rho == R_GlobalEnv)
 #ifdef FAST_BASE_CACHE_LOOKUP
-            if (BASE_SYM_CACHED(symbol))
-                vl = SYMBOL_BINDING_VALUE(symbol);
-            else
-                vl = findGlobalVar(symbol);
+	    if (BASE_SYM_CACHED(symbol))
+		vl = SYMBOL_BINDING_VALUE(symbol);
+	    else
+		vl = findGlobalVar(symbol);
 #else
 	    vl = findGlobalVar(symbol);
 #endif
@@ -1387,16 +1463,23 @@ SEXP findFun(SEXP symbol, SEXP rho)
 		TYPEOF(vl) == SPECIALSXP)
 		return (vl);
 	    if (vl == R_MissingArg)
-		error(_("argument \"%s\" is missing, with no default"),
+		errorcall(call,
+		      _("argument \"%s\" is missing, with no default"),
 		      CHAR(PRINTNAME(symbol)));
 	}
 	rho = ENCLOS(rho);
     }
-    error(_("could not find function \"%s\""), EncodeChar(PRINTNAME(symbol)));
+    errorcall_cpy(call,
+                  _("could not find function \"%s\""),
+                  EncodeChar(PRINTNAME(symbol)));
     /* NOT REACHED */
     return R_UnboundValue;
 }
 
+SEXP findFun(SEXP symbol, SEXP rho)
+{
+    return findFun3(symbol, rho, R_CurrentExpression);
+}
 
 /*----------------------------------------------------------------------
 
@@ -1422,7 +1505,9 @@ void defineVar(SEXP symbol, SEXP value, SEXP rho)
 	table = (R_ObjectTable *) R_ExternalPtrAddr(HASHTAB(rho));
 	if(table->assign == NULL)
 	    error(_("cannot assign variables to this database"));
+	PROTECT(value);
 	table->assign(CHAR(PRINTNAME(symbol)), value, table);
+	UNPROTECT(1);
 #ifdef USE_GLOBAL_CACHE
 	if (IS_GLOBAL_FRAME(rho)) R_FlushGlobalCache(symbol);
 #endif
@@ -1436,8 +1521,8 @@ void defineVar(SEXP symbol, SEXP value, SEXP rho)
 	if (IS_GLOBAL_FRAME(rho)) R_FlushGlobalCache(symbol);
 #endif
 
-        if (IS_SPECIAL_SYMBOL(symbol))
-            UNSET_NO_SPECIAL_SYMBOLS(rho);
+	if (IS_SPECIAL_SYMBOL(symbol))
+	    UNSET_NO_SPECIAL_SYMBOLS(rho);
 
 	if (HASHTAB(rho) == R_NilValue) {
 	    /* First check for an existing binding */
@@ -1472,6 +1557,61 @@ void defineVar(SEXP symbol, SEXP value, SEXP rho)
 
 /*----------------------------------------------------------------------
 
+  addMissingVarsToNewEnv
+
+  Add given variables (addVars - list) to given environment (env) unless
+  they are already there.  Env is a "new" environment, created by
+  NewEnvironment, as in applyClosure (so it list-based).  Slots for vars are
+  re-used.  The addVars list itself can have duplicit variables.
+
+  The implementation is performance optimized towards the common case that
+  the variables from addVars are not present in env and that addVars does
+  not have duplicit variables.
+*/
+
+attribute_hidden
+void addMissingVarsToNewEnv(SEXP env, SEXP addVars)
+{
+    if (addVars == R_NilValue) return;
+
+    /* temporary sanity check */
+    if (TYPEOF(addVars) == ENVSXP)
+	error("additional variables should now be passed as a list, "
+	      "not in an environment");
+
+    /* append variables from env after addVars */
+    SEXP aprev = addVars;
+    SEXP a = CDR(addVars);
+    while (a != R_NilValue) {
+	aprev = a;
+	a = CDR(a);
+    }
+    SETCDR(aprev, FRAME(env));
+    SET_FRAME(env, addVars);
+
+    /* remove duplicates - a variable listed later has precedence over a
+       variable listed sooner */
+    SEXP end;
+    for(end = CDR(addVars); end != R_NilValue; end = CDR(end)) {
+	SEXP endTag = TAG(end);
+	SEXP sprev = R_NilValue;
+	SEXP s;
+	for(s = addVars; s != end; s = CDR(s)) {
+	    if (TAG(s) == endTag) {
+		/* remove variable s from the list, because it is overriden by "end" */
+		if (sprev == R_NilValue) {
+		    addVars = CDR(s);
+		    SET_FRAME(env, addVars);
+		} else
+		    SETCDR(sprev, CDR(s));
+	    } else
+		sprev = s;
+	}
+    }
+}
+
+/*----------------------------------------------------------------------
+
   setVarInFrame
 
   Assign a new value to an existing symbol in a frame.
@@ -1495,7 +1635,10 @@ static SEXP setVarInFrame(SEXP rho, SEXP symbol, SEXP value)
 	table = (R_ObjectTable *) R_ExternalPtrAddr(HASHTAB(rho));
 	if(table->assign == NULL)
 	    error(_("cannot assign variables to this database"));
-	return(table->assign(CHAR(PRINTNAME(symbol)), value, table));
+	PROTECT(value);
+	SEXP result = table->assign(CHAR(PRINTNAME(symbol)), value, table);
+	UNPROTECT(1);
+	return(result);
     }
 
     if (rho == R_BaseNamespace || rho == R_BaseEnv) {
@@ -1508,7 +1651,6 @@ static SEXP setVarInFrame(SEXP rho, SEXP symbol, SEXP value)
 	frame = FRAME(rho);
 	while (frame != R_NilValue) {
 	    if (TAG(frame) == symbol) {
-		if (rho == R_GlobalEnv) R_DirtyImage = 1;
 		SET_BINDING_VALUE(frame, value);
 		SET_MISSING(frame, 0);	/* same as defineVar */
 		return symbol;
@@ -1525,7 +1667,6 @@ static SEXP setVarInFrame(SEXP rho, SEXP symbol, SEXP value)
 	hashcode = HASHVALUE(c) % HASHSIZE(HASHTAB(rho));
 	frame = R_HashGetLoc(hashcode, symbol, HASHTAB(rho));
 	if (frame != R_NilValue) {
-	    if (rho == R_GlobalEnv) R_DirtyImage = 1;
 	    SET_BINDING_VALUE(frame, value);
 	    SET_MISSING(frame, 0);	/* same as defineVar */
 	    return symbol;
@@ -1589,7 +1730,7 @@ void gsetVar(SEXP symbol, SEXP value, SEXP rho)
 /* get environment from a subclass if possible; else return NULL */
 #define simple_as_environment(arg) (IS_S4_OBJECT(arg) && (TYPEOF(arg) == S4SXP) ? R_getS4DataSlot(arg, ENVSXP) : R_NilValue)
 
-	    
+
 
 /*----------------------------------------------------------------------
 
@@ -1761,8 +1902,7 @@ SEXP attribute_hidden do_remove(SEXP call, SEXP op, SEXP args, SEXP rho)
 	    tenv = CDR(tenv);
 	}
 	if (!done)
-	    warning(_("object '%s' not found"),
-		    EncodeChar(PRINTNAME(tsym)));
+	    warning(_("object '%s' not found"), EncodeChar(PRINTNAME(tsym)));
     }
     return R_NilValue;
 }
@@ -1776,12 +1916,11 @@ SEXP attribute_hidden do_remove(SEXP call, SEXP op, SEXP args, SEXP rho)
   argument.  It needs the environment of the calling function as a
   default.
 
-      get(x, envir, mode, inherits)
-      exists(x, envir, mode, inherits)
-
+      exists (x, envir, mode, inherits)
+      get    (x, envir, mode, inherits)
+      get0   (x, envir, mode, inherits, value_if_not_exists)
 */
 
-
 SEXP attribute_hidden do_get(SEXP call, SEXP op, SEXP args, SEXP rho)
 {
     SEXP rval, genv, t1 = R_NilValue;
@@ -1821,10 +1960,10 @@ SEXP attribute_hidden do_get(SEXP call, SEXP op, SEXP args, SEXP rho)
     */
 
     if (isString(CADDR(args))) {
-	if (!strcmp(CHAR(STRING_ELT(CAR(CDDR(args)), 0)), "function")) /* ASCII */
+	if (!strcmp(CHAR(STRING_ELT(CADDR(args), 0)), "function")) /* ASCII */
 	    gmode = FUNSXP;
 	else
-	    gmode = str2type(CHAR(STRING_ELT(CAR(CDDR(args)), 0))); /* ASCII */
+	    gmode = str2type(CHAR(STRING_ELT(CADDR(args), 0))); /* ASCII */
     } else {
 	error(_("invalid '%s' argument"), "mode");
 	gmode = FUNSXP;/* -Wall */
@@ -1836,37 +1975,48 @@ SEXP attribute_hidden do_get(SEXP call, SEXP op, SEXP args, SEXP rho)
 
     /* Search for the object */
     rval = findVar1mode(t1, genv, gmode, ginherits, PRIMVAL(op));
+    if (rval == R_MissingArg)
+	error(_("argument \"%s\" is missing, with no default"),
+	      CHAR(PRINTNAME(t1)));
+
+    switch (PRIMVAL(op) ) {
+    case 0: // exists(.) :
+	return ScalarLogical(rval != R_UnboundValue);
+	break;
 
-    if (PRIMVAL(op)) { /* have get(.) */
-	if (rval == R_MissingArg)
-	    error(_("argument \"%s\" is missing, with no default"),
-		  CHAR(PRINTNAME(t1)));
+    case 1: // have get(.)
 	if (rval == R_UnboundValue) {
 	    if (gmode == ANYSXP)
-		error(_("object '%s' not found"),
-		      EncodeChar(PRINTNAME(t1)));
+		error(_("object '%s' not found"), EncodeChar(PRINTNAME(t1)));
 	    else
 		error(_("object '%s' of mode '%s' was not found"),
 		      CHAR(PRINTNAME(t1)),
-		      CHAR(STRING_ELT(CAR(CDDR(args)), 0))); /* ASCII */
+		      CHAR(STRING_ELT(CADDR(args), 0))); /* ASCII */
 	}
 
-	/* We need to evaluate if it is a promise */
-	if (TYPEOF(rval) == PROMSXP)
-	    rval = eval(rval, genv);
+#     define GET_VALUE(rval)				\
+	/* We need to evaluate if it is a promise */	\
+	if (TYPEOF(rval) == PROMSXP) {			\
+	    PROTECT(rval);				\
+	    rval = eval(rval, genv);			\
+	    UNPROTECT(1);				\
+	}						\
+							\
+	if (!ISNULL(rval) && NAMED(rval) == 0)		\
+	    SET_NAMED(rval, 1)
+
+	GET_VALUE(rval);
+	break;
 
-	if (!ISNULL(rval) && NAMED(rval) == 0)
-	    SET_NAMED(rval, 1);
-	return rval;
-    }
-    else { /* exists(.) */
+    case 2: // get0(.)
 	if (rval == R_UnboundValue)
-	    ginherits = 0;
-	else
-	    ginherits = 1;
-	return ScalarLogical(ginherits);
+	    return CAD4R(args);// i.e.  value_if_not_exists
+	GET_VALUE(rval);
+	break;
     }
+    return rval;
 }
+#undef GET_VALUE
 
 static SEXP gfind(const char *name, SEXP env, SEXPTYPE mode,
 		  SEXP ifnotfound, int inherits, SEXP enclos)
@@ -1889,7 +2039,11 @@ static SEXP gfind(const char *name, SEXP env, SEXPTYPE mode,
     }
 
     /* We need to evaluate if it is a promise */
-    if (TYPEOF(rval) == PROMSXP) rval = eval(rval, env);
+    if (TYPEOF(rval) == PROMSXP) {
+	PROTECT(rval);
+	rval = eval(rval, env);
+	UNPROTECT(1);
+    }
     if (!ISNULL(rval) && NAMED(rval) == 0) SET_NAMED(rval, 1);
     return rval;
 }
@@ -1950,16 +2104,16 @@ SEXP attribute_hidden do_mget(SEXP call, SEXP op, SEXP args, SEXP rho)
 
     for(int i = 0; i < nvals; i++) {
 	SEXPTYPE gmode;
-	if (!strcmp(CHAR(STRING_ELT(CAR(CDDR(args)), i % nmode)), "function"))
+	if (!strcmp(CHAR(STRING_ELT(CADDR(args), i % nmode)), "function"))
 	    gmode = FUNSXP;
 	else {
-	    gmode = str2type(CHAR(STRING_ELT(CAR(CDDR(args)), i % nmode)));
+	    gmode = str2type(CHAR(STRING_ELT(CADDR(args), i % nmode)));
 	    if(gmode == (SEXPTYPE) (-1))
 		error(_("invalid '%s' argument"), "mode");
 	}
-        SEXP ans_i = gfind(translateChar(STRING_ELT(x, i % nvals)), env,
-                           gmode, VECTOR_ELT(ifnotfound, i % nifnfnd),
-                           ginherits, rho);
+	SEXP ans_i = gfind(translateChar(STRING_ELT(x, i % nvals)), env,
+			   gmode, VECTOR_ELT(ifnotfound, i % nifnfnd),
+			   ginherits, rho);
 	SET_VECTOR_ELT(ans, i, lazy_duplicate(ans_i));
     }
 
@@ -1984,6 +2138,15 @@ SEXP attribute_hidden do_mget(SEXP call, SEXP op, SEXP args, SEXP rho)
   It is also called in arithmetic.c. for e.g. do_log
 */
 
+static SEXP findRootPromise(SEXP p) {
+    if (TYPEOF(p) == PROMSXP) {
+	while(TYPEOF(PREXPR(p)) == PROMSXP) {
+	    p = PREXPR(p);
+	}
+    }
+    return p;
+}
+
 int attribute_hidden
 R_isMissing(SEXP symbol, SEXP rho)
 {
@@ -2019,6 +2182,7 @@ R_isMissing(SEXP symbol, SEXP rho)
 	    return 1;
 	if (IS_ACTIVE_BINDING(vl))
 	    return 0;
+	SETCAR(vl, findRootPromise(CAR(vl)));
 	if (TYPEOF(CAR(vl)) == PROMSXP &&
 	    PRVALUE(CAR(vl)) == R_UnboundValue &&
 	    TYPEOF(PREXPR(CAR(vl))) == SYMSXP) {
@@ -2036,7 +2200,9 @@ R_isMissing(SEXP symbol, SEXP rho)
 	    else {
 		int val;
 		SET_PRSEEN(CAR(vl), 1);
+		PROTECT(vl);
 		val = R_isMissing(PREXPR(CAR(vl)), PRENV(CAR(vl)));
+		UNPROTECT(1); /* vl */
 		SET_PRSEEN(CAR(vl), 0);
 		return val;
 	    }
@@ -2065,9 +2231,10 @@ SEXP attribute_hidden do_missing(SEXP call, SEXP op, SEXP args, SEXP rho)
 	ddv = ddVal(sym);
 	sym = R_DotsSymbol;
     }
-    rval = allocVector(LGLSXP,1);
 
-    t = findVarLocInFrame(rho, sym, NULL);
+    PROTECT(t = findVarLocInFrame(rho, sym, NULL));
+    rval = allocVector(LGLSXP,1);
+    UNPROTECT(1);
     if (t != R_NilValue) {
 	if (DDVAL(s)) {
 	    if (length(CAR(t)) < ddv  || CAR(t) == R_MissingArg) {
@@ -2094,8 +2261,13 @@ SEXP attribute_hidden do_missing(SEXP call, SEXP op, SEXP args, SEXP rho)
 	return rval;
     }
 
+    t = findRootPromise(t);
     if (!isSymbol(PREXPR(t))) LOGICAL(rval)[0] = 0;
-    else LOGICAL(rval)[0] = R_isMissing(PREXPR(t), PRENV(t));
+    else {
+	PROTECT(rval);
+	LOGICAL(rval)[0] = R_isMissing(PREXPR(t), PRENV(t));
+	UNPROTECT(1);
+    }
     return rval;
 }
 
@@ -2199,7 +2371,7 @@ SEXP attribute_hidden do_attach(SEXP call, SEXP op, SEXP args, SEXP env)
 		/* FIXME: duplicate the hash table and assign here */
 	    } else {
 		for(p = FRAME(loadenv); p != R_NilValue; p = CDR(p))
-                    defineVar(TAG(p), lazy_duplicate(CAR(p)), s);
+		    defineVar(TAG(p), lazy_duplicate(CAR(p)), s);
 	    }
 	} else {
 	    error(_("'attach' only works for lists, data frames and environments"));
@@ -2226,7 +2398,7 @@ SEXP attribute_hidden do_attach(SEXP call, SEXP op, SEXP args, SEXP env)
 	R_ObjectTable *tb = (R_ObjectTable*) R_ExternalPtrAddr(CAR(args));
 	if(tb->onAttach)
 	    tb->onAttach(tb);
-	s = allocSExp(ENVSXP);
+	PROTECT(s = allocSExp(ENVSXP));
 	SET_HASHTAB(s, CAR(args));
 	setAttrib(s, R_ClassSymbol, getAttrib(HASHTAB(s), R_ClassSymbol));
     }
@@ -2250,7 +2422,6 @@ SEXP attribute_hidden do_attach(SEXP call, SEXP op, SEXP args, SEXP env)
 	R_FlushGlobalCacheFromTable(HASHTAB(s));
 	MARK_AS_GLOBAL_FRAME(s);
 #endif
-	UNPROTECT(1);
     } else {
 #ifdef USE_GLOBAL_CACHE
 	R_FlushGlobalCacheFromUserTable(HASHTAB(s));
@@ -2258,6 +2429,7 @@ SEXP attribute_hidden do_attach(SEXP call, SEXP op, SEXP args, SEXP env)
 #endif
     }
 
+    UNPROTECT(1); /* s */
     return s;
 }
 
@@ -2360,54 +2532,86 @@ SEXP attribute_hidden do_search(SEXP call, SEXP op, SEXP args, SEXP env)
   do_ls
 
   This code implements the functionality of the "ls" and "objects"
-  functions.  [ ls(envir, all.names) ]
+  functions.  [ ls(envir, all.names, sorted) ]
 
 */
+#define NONEMPTY_(_FRAME_) \
+    CHAR(PRINTNAME(TAG(_FRAME_)))[0] != '.' && CAR(_FRAME_) != R_UnboundValue
 
 static int FrameSize(SEXP frame, int all)
 {
     int count = 0;
-    while (frame != R_NilValue) {
-	if ((all || CHAR(PRINTNAME(TAG(frame)))[0] != '.') &&
-				      CAR(frame) != R_UnboundValue)
+    if (all) {
+	while (frame != R_NilValue) {
 	    count += 1;
-	frame = CDR(frame);
+	    frame = CDR(frame);
+	}
+    } else {
+	while (frame != R_NilValue) {
+	    if (NONEMPTY_(frame))
+		count += 1;
+	    frame = CDR(frame);
+	}
     }
     return count;
 }
 
 static void FrameNames(SEXP frame, int all, SEXP names, int *indx)
 {
-    while (frame != R_NilValue) {
-	if ((all || CHAR(PRINTNAME(TAG(frame)))[0] != '.') &&
-				      CAR(frame) != R_UnboundValue) {
+    if (all) {
+	while (frame != R_NilValue) {
 	    SET_STRING_ELT(names, *indx, PRINTNAME(TAG(frame)));
 	    (*indx)++;
+	    frame = CDR(frame);
+	}
+    } else {
+	while (frame != R_NilValue) {
+	    if (NONEMPTY_(frame)) {
+		SET_STRING_ELT(names, *indx, PRINTNAME(TAG(frame)));
+		(*indx)++;
+	    }
+	    frame = CDR(frame);
 	}
-	frame = CDR(frame);
     }
 }
 
 static void FrameValues(SEXP frame, int all, SEXP values, int *indx)
 {
-    while (frame != R_NilValue) {
-	if ((all || CHAR(PRINTNAME(TAG(frame)))[0] != '.') &&
-				      CAR(frame) != R_UnboundValue) {
-	    SEXP value = CAR(frame);
-	    if (TYPEOF(value) == PROMSXP) {
-		PROTECT(value);
-		value = eval(value, R_GlobalEnv);
-		UNPROTECT(1);
+    if (all) {
+	while (frame != R_NilValue) {
+#         define DO_FrameValues						\
+	    SEXP value = CAR(frame);					\
+	    if (TYPEOF(value) == PROMSXP) {				\
+		PROTECT(value);						\
+		value = eval(value, R_GlobalEnv);			\
+		UNPROTECT(1);						\
+	    }								\
+	    SET_VECTOR_ELT(values, *indx, lazy_duplicate(value));	\
+	    (*indx)++
+
+	    DO_FrameValues;
+	    frame = CDR(frame);
+	}
+    } else {
+	while (frame != R_NilValue) {
+	    if (NONEMPTY_(frame)) {
+		DO_FrameValues;
 	    }
-	    SET_VECTOR_ELT(values, *indx, lazy_duplicate(value));
-	    (*indx)++;
+	    frame = CDR(frame);
 	}
-	frame = CDR(frame);
     }
 }
+#undef DO_FrameValues
+#undef NONEMPTY_
+
+#define CHECK_HASH_TABLE(table) do {		\
+	if (TYPEOF(table) != VECSXP)		\
+	    error("bad hash table contents");	\
+    } while (0)
 
 static int HashTableSize(SEXP table, int all)
 {
+    CHECK_HASH_TABLE(table);
     int count = 0;
     int n = length(table);
     int i;
@@ -2418,6 +2622,7 @@ static int HashTableSize(SEXP table, int all)
 
 static void HashTableNames(SEXP table, int all, SEXP names, int *indx)
 {
+    CHECK_HASH_TABLE(table);
     int n = length(table);
     int i;
     for (i = 0; i < n; i++)
@@ -2426,6 +2631,7 @@ static void HashTableNames(SEXP table, int all, SEXP names, int *indx)
 
 static void HashTableValues(SEXP table, int all, SEXP values, int *indx)
 {
+    CHECK_HASH_TABLE(table);
     int n = length(table);
     int i;
     for (i = 0; i < n; i++)
@@ -2507,10 +2713,9 @@ BuiltinValues(int all, int intern, SEXP values, int *indx)
     }
 }
 
+// .Internal(ls(envir, all.names, sorted)) :
 SEXP attribute_hidden do_ls(SEXP call, SEXP op, SEXP args, SEXP rho)
 {
-    SEXP env;
-    int all;
     checkArity(op, args);
 
     if(IS_USER_DATABASE(CAR(args))) {
@@ -2519,26 +2724,31 @@ SEXP attribute_hidden do_ls(SEXP call, SEXP op, SEXP args, SEXP rho)
 	return(tb->objects(tb));
     }
 
-    env = CAR(args);
+    SEXP env = CAR(args);
 
     /* if (env == R_BaseNamespace) env = R_BaseEnv; */
 
-    all = asLogical(CADR(args));
+    int all = asLogical(CADR(args));
     if (all == NA_LOGICAL) all = 0;
 
-    return R_lsInternal(env, all);
+    int sort_nms = asLogical(CADDR(args)); /* sorted = TRUE/FALSE */
+    if (sort_nms == NA_LOGICAL) sort_nms = 0;
+
+    return R_lsInternal3(env, all, sort_nms);
 }
 
-/* takes a *list* of environments and a boolean indicating whether to get all
-   names */
-SEXP R_lsInternal(SEXP env, Rboolean all)
+/* takes an environment, a boolean indicating whether to get all
+   names and a boolean if sorted is desired */
+SEXP R_lsInternal3(SEXP env, Rboolean all, Rboolean sorted)
 {
-    int  k;
-    SEXP ans;
-
+    if(IS_USER_DATABASE(env)) {
+	R_ObjectTable *tb = (R_ObjectTable*)
+	    R_ExternalPtrAddr(HASHTAB(env));
+	return(tb->objects(tb));
+    }
 
     /* Step 1 : Compute the Vector Size */
-    k = 0;
+    int k = 0;
     if (env == R_BaseEnv || env == R_BaseNamespace)
 	k += BuiltinSize(all, 0);
     else if (isEnvironment(env) ||
@@ -2552,7 +2762,7 @@ SEXP R_lsInternal(SEXP env, Rboolean all)
 	error(_("invalid '%s' argument"), "envir");
 
     /* Step 2 : Allocate and Fill the Result */
-    PROTECT(ans = allocVector(STRSXP, k));
+    SEXP ans = PROTECT(allocVector(STRSXP, k));
     k = 0;
     if (env == R_BaseEnv || env == R_BaseNamespace)
 	BuiltinNames(all, 0, ans, &k);
@@ -2563,12 +2773,18 @@ SEXP R_lsInternal(SEXP env, Rboolean all)
 	    FrameNames(FRAME(env), all, ans, &k);
     }
 
+    if(sorted) sortVector(ans, FALSE);
     UNPROTECT(1);
-    sortVector(ans, FALSE);
     return ans;
 }
 
-/* transform an environment into a named list */
+/* non-API version used in several packages */
+SEXP R_lsInternal(SEXP env, Rboolean all)
+{
+    return R_lsInternal3(env, all, TRUE);
+}
+
+/* transform an environment into a named list: as.list.environment(.) */
 
 SEXP attribute_hidden do_env2list(SEXP call, SEXP op, SEXP args, SEXP rho)
 {
@@ -2581,7 +2797,7 @@ SEXP attribute_hidden do_env2list(SEXP call, SEXP op, SEXP args, SEXP rho)
     if (ISNULL(env))
 	error(_("use of NULL environment is defunct"));
     if( !isEnvironment(env) ) {
-        SEXP xdata;
+	SEXP xdata;
 	if( IS_S4_OBJECT(env) && TYPEOF(env) == S4SXP &&
 	    (xdata = R_getS4DataSlot(env, ENVSXP)) != R_NilValue)
 	    env = xdata;
@@ -2592,6 +2808,10 @@ SEXP attribute_hidden do_env2list(SEXP call, SEXP op, SEXP args, SEXP rho)
     all = asLogical(CADR(args)); /* all.names = TRUE/FALSE */
     if (all == NA_LOGICAL) all = 0;
 
+    int sort_nms = asLogical(CADDR(args)); /* sorted = TRUE/FALSE */
+    if (sort_nms == NA_LOGICAL) sort_nms = 0;
+
+    // k := length(env) = envxlength(env) :
     if (env == R_BaseEnv || env == R_BaseNamespace)
 	k = BuiltinSize(all, 0);
     else if (HASHTAB(env) != R_NilValue)
@@ -2618,9 +2838,32 @@ SEXP attribute_hidden do_env2list(SEXP call, SEXP op, SEXP args, SEXP rho)
     else
 	FrameNames(FRAME(env), all, names, &k);
 
-    if (k > 0) setAttrib(ans, R_NamesSymbol, names);
-    UNPROTECT(2);
-    return(ans);
+    if(k == 0) { // no sorting, keep NULL names
+	UNPROTECT(2);
+	return(ans);
+    }
+    if(sort_nms) {
+	// return list with *sorted* names
+	SEXP sind = PROTECT(allocVector(INTSXP, k));
+	int *indx = INTEGER(sind);
+	for (int i = 0; i < k; i++) indx[i] = i;
+	orderVector1(indx, k, names, /* nalast */ TRUE, /* decreasing */ FALSE,
+		     R_NilValue);
+	SEXP ans2   = PROTECT(allocVector(VECSXP, k));
+	SEXP names2 = PROTECT(allocVector(STRSXP, k));
+	for(int i = 0; i < k; i++) {
+	    SET_STRING_ELT(names2, i, STRING_ELT(names, indx[i]));
+	    SET_VECTOR_ELT(ans2,   i, VECTOR_ELT(ans,   indx[i]));
+	}
+	setAttrib(ans2, R_NamesSymbol, names2);
+	UNPROTECT(5);
+	return(ans2);
+    }
+    else {
+	setAttrib(ans, R_NamesSymbol, names);
+	UNPROTECT(2);
+	return(ans);
+    }
 }
 
 /*
@@ -2637,7 +2880,7 @@ SEXP attribute_hidden do_eapply(SEXP call, SEXP op, SEXP args, SEXP rho)
 
     checkArity(op, args);
 
-    env = eval(CAR(args), rho);
+    PROTECT(env = eval(CAR(args), rho));
     if (ISNULL(env))
 	error(_("use of NULL environment is defunct"));
     if( !isEnvironment(env) )
@@ -2673,16 +2916,23 @@ SEXP attribute_hidden do_eapply(SEXP call, SEXP op, SEXP args, SEXP rho)
     else
 	FrameValues(FRAME(env), all, tmp2, &k2);
 
+    SEXP Xsym = install("X");
+    SEXP isym = install("i");
     PROTECT(ind = allocVector(INTSXP, 1));
     /* tmp :=  `[`(<elist>, i) */
     PROTECT(tmp = LCONS(R_Bracket2Symbol,
-			LCONS(tmp2, LCONS(ind, R_NilValue))));
+			LCONS(Xsym, LCONS(isym, R_NilValue))));
     /* fcall :=  <FUN>( tmp, ... ) */
     PROTECT(R_fcall = LCONS(FUN, LCONS(tmp, LCONS(R_DotsSymbol, R_NilValue))));
 
+    defineVar(Xsym, tmp2, rho);
+    SET_NAMED(tmp2, 1);
+    defineVar(isym, ind, rho);
+    SET_NAMED(ind, 1);
+
     for(i = 0; i < k2; i++) {
 	INTEGER(ind)[0] = i+1;
-	SEXP tmp = eval(R_fcall, rho);
+	SEXP tmp = R_forceAndCall(R_fcall, 1, rho);
 	if (MAYBE_REFERENCED(tmp))
 	    tmp = lazy_duplicate(tmp);
 	SET_VECTOR_ELT(ans, i, tmp);
@@ -2702,18 +2952,29 @@ SEXP attribute_hidden do_eapply(SEXP call, SEXP op, SEXP args, SEXP rho)
 	setAttrib(ans, R_NamesSymbol, names);
 	UNPROTECT(1);
     }
-    UNPROTECT(5);
+    UNPROTECT(6);
     return(ans);
 }
 
-int envlength(SEXP rho)
-{
-    if( HASHTAB(rho) != R_NilValue)
-	return HashTableSize(HASHTAB(rho), 1);
-    else
-	return FrameSize(FRAME(rho), 1);
+/* Leaks out via inlining in ../library/tools/src/ */
+#define R_ENVLENGTH(NAME_, LENGTH_FN_, TYPE_)				\
+TYPE_ NAME_(SEXP rho)							\
+{									\
+    if(IS_USER_DATABASE(rho)) {						\
+	R_ObjectTable *tb = (R_ObjectTable*) R_ExternalPtrAddr(HASHTAB(rho)); \
+	return LENGTH_FN_(tb->objects(tb));				\
+    } else if( HASHTAB(rho) != R_NilValue)				\
+	return HashTableSize(HASHTAB(rho), 1);				\
+    else if (rho == R_BaseEnv || rho == R_BaseNamespace) 		\
+	return BuiltinSize(1, 0);					\
+    else								\
+	return FrameSize(FRAME(rho), 1);				\
 }
 
+R_ENVLENGTH(Rf_envlength,   length, int)
+
+R_ENVLENGTH(Rf_envxlength, xlength, R_xlen_t)
+
 /*----------------------------------------------------------------------
 
   do_builtins
@@ -2731,10 +2992,11 @@ SEXP attribute_hidden do_builtins(SEXP call, SEXP op, SEXP args, SEXP rho)
     intern = asLogical(CAR(args));
     if (intern == NA_INTEGER) intern = 0;
     nelts = BuiltinSize(1, intern);
-    ans = allocVector(STRSXP, nelts);
+    PROTECT(ans = allocVector(STRSXP, nelts));
     nelts = 0;
     BuiltinNames(1, intern, ans, &nelts);
     sortVector(ans, TRUE);
+    UNPROTECT(1); /* ans */
     return ans;
 }
 
@@ -3210,7 +3472,8 @@ SEXP R_FindPackageEnv(SEXP info)
 {
     SEXP expr, val;
     PROTECT(info);
-    PROTECT(expr = LCONS(install("findPackageEnv"), LCONS(info, R_NilValue)));
+    SEXP s_findPackageEnv = install("findPackageEnv");
+    PROTECT(expr = LCONS(s_findPackageEnv, LCONS(info, R_NilValue)));
     val = eval(expr, R_GlobalEnv);
     UNPROTECT(2);
     return val;
@@ -3221,9 +3484,11 @@ Rboolean R_IsNamespaceEnv(SEXP rho)
     if (rho == R_BaseNamespace)
 	return TRUE;
     else if (TYPEOF(rho) == ENVSXP) {
-	SEXP info = findVarInFrame3(rho, install(".__NAMESPACE__."), TRUE);
+	SEXP info = findVarInFrame3(rho, R_NamespaceSymbol, TRUE);
 	if (info != R_UnboundValue && TYPEOF(info) == ENVSXP) {
+	    PROTECT(info);
 	    SEXP spec = findVarInFrame3(info, install("spec"), TRUE);
+	    UNPROTECT(1);
 	    if (spec != R_UnboundValue &&
 		TYPEOF(spec) == STRSXP && LENGTH(spec) > 0)
 		return TRUE;
@@ -3250,9 +3515,11 @@ SEXP R_NamespaceEnvSpec(SEXP rho)
     if (rho == R_BaseNamespace)
 	return R_BaseNamespaceName;
     else if (TYPEOF(rho) == ENVSXP) {
-	SEXP info = findVarInFrame3(rho, install(".__NAMESPACE__."), TRUE);
+	SEXP info = findVarInFrame3(rho, R_NamespaceSymbol, TRUE);
 	if (info != R_UnboundValue && TYPEOF(info) == ENVSXP) {
+	    PROTECT(info);
 	    SEXP spec = findVarInFrame3(info, install("spec"), TRUE);
+	    UNPROTECT(1);
 	    if (spec != R_UnboundValue &&
 		TYPEOF(spec) == STRSXP && LENGTH(spec) > 0)
 		return spec;
@@ -3268,7 +3535,8 @@ SEXP R_FindNamespace(SEXP info)
 {
     SEXP expr, val;
     PROTECT(info);
-    PROTECT(expr = LCONS(install("getNamespace"), LCONS(info, R_NilValue)));
+    SEXP s_getNamespace = install("getNamespace");
+    PROTECT(expr = LCONS(s_getNamespace, LCONS(info, R_NilValue)));
     val = eval(expr, R_GlobalEnv);
     UNPROTECT(2);
     return val;
@@ -3323,12 +3591,21 @@ SEXP attribute_hidden do_getRegNS(SEXP call, SEXP op, SEXP args, SEXP rho)
 {
     SEXP name, val;
     checkArity(op, args);
-    name = checkNSname(call, CAR(args));
+    name = checkNSname(call, coerceVector(CAR(args), SYMSXP));
     val = findVarInFrame(R_NamespaceRegistry, name);
-    if (val == R_UnboundValue)
-	return R_NilValue;
-    else
-	return val;
+
+    switch(PRIMVAL(op)) {
+    case 0: // get..()
+	if (val == R_UnboundValue)
+	    return R_NilValue;
+	else
+	    return val;
+    case 1: // is..()
+	return ScalarLogical(val == R_UnboundValue ? FALSE : TRUE);
+
+    default: error(_("unknown op"));
+    }
+    return R_NilValue; // -Wall
 }
 
 SEXP attribute_hidden do_getNSRegistry(SEXP call, SEXP op, SEXP args, SEXP rho)
@@ -3355,7 +3632,7 @@ SEXP attribute_hidden do_importIntoEnv(SEXP call, SEXP op, SEXP args, SEXP rho)
 
     if (TYPEOF(impenv) == NILSXP)
 	error(_("use of NULL environment is defunct"));
-    if (TYPEOF(impenv) != ENVSXP && 
+    if (TYPEOF(impenv) != ENVSXP &&
 	TYPEOF((impenv = simple_as_environment(impenv))) != ENVSXP)
 	error(_("bad import environment argument"));
     if (TYPEOF(expenv) == NILSXP)
@@ -3415,6 +3692,7 @@ SEXP attribute_hidden do_envprofile(SEXP call, SEXP op, SEXP args, SEXP rho)
        returns R_NilValue.  This seems appropriate since there is no
        way to test whether an environment is hashed at the R level.
     */
+    checkArity(op, args);
     SEXP env, ans = R_NilValue /* -Wall */;
     env = CAR(args);
     if (isEnvironment(env)) {
@@ -3596,7 +3874,7 @@ SEXP mkCharLenCE(const char *name, int len, cetype_t enc)
 	if (TYPEOF(val) != CHARSXP) break; /* sanity check */
 	if (need_enc == (ENC_KNOWN(val) | IS_BYTES(val)) &&
 	    LENGTH(val) == len &&  /* quick pretest */
-	    memcmp(CHAR(val), name, len) == 0) {
+	    (!len || (memcmp(CHAR(val), name, len) == 0))) { // called with len = 0
 	    cval = val;
 	    break;
 	}
@@ -3704,3 +3982,110 @@ void do_write_cache()
     }
 }
 #endif /* DEBUG_SHOW_CHARSXP_CACHE */
+
+// topenv
+
+SEXP topenv(SEXP target, SEXP envir) {
+    SEXP env = envir;
+    while (env != R_EmptyEnv) {
+	if (env == target || env == R_GlobalEnv ||
+	    env == R_BaseEnv || env == R_BaseNamespace ||
+	    R_IsPackageEnv(env) || R_IsNamespaceEnv(env) ||
+	    existsVarInFrame(env, R_dot_packageName)) {
+	    return env;
+	} else {
+	    env = ENCLOS(env);
+	}
+    }
+    return R_GlobalEnv;
+}
+
+/** topenv():
+ *
+ * .Internal(topenv(envir, matchThisEnv))
+ *
+ * @return
+ */
+SEXP attribute_hidden do_topenv(SEXP call, SEXP op, SEXP args, SEXP rho) {
+    checkArity(op, args);
+    SEXP envir = CAR(args);
+    SEXP target = CADR(args); // = matchThisEnv, typically NULL (R_NilValue)
+    if (TYPEOF(envir) != ENVSXP) envir = rho; // envir = parent.frame()
+    if (target != R_NilValue && TYPEOF(target) != ENVSXP)  target = R_NilValue;
+    return topenv(target, envir);
+}
+
+Rboolean attribute_hidden isUnmodifiedSpecSym(SEXP sym, SEXP env) {
+    if (!IS_SPECIAL_SYMBOL(sym))
+	return FALSE;
+    for(;env != R_EmptyEnv; env = ENCLOS(env))
+	if (!NO_SPECIAL_SYMBOLS(env) && env != R_BaseEnv
+		&& env != R_BaseNamespace && existsVarInFrame(env, sym))
+	    return FALSE;
+    return TRUE;
+}
+
+void findFunctionForBodyInNamespace(SEXP body, SEXP nsenv, SEXP nsname) {
+    if (R_IsNamespaceEnv(nsenv) != TRUE)
+	error("argument 'nsenv' is not a namespace");
+    SEXP args = PROTECT(list3(nsenv /* x */,
+	R_TrueValue /* all.names */,
+	R_FalseValue /* sorted */));
+    SEXP env2listOp = INTERNAL(install("env2list"));
+
+    SEXP elist = do_env2list(R_NilValue, env2listOp, args, R_NilValue);
+    PROTECT(elist);
+    R_xlen_t n = xlength(elist);
+    R_xlen_t i;
+    SEXP names = PROTECT(getAttrib(elist, R_NamesSymbol));
+    for(i = 0; i < n; i++) {
+	SEXP value = VECTOR_ELT(elist, i);
+	const char *vname = CHAR(STRING_ELT(names, i));
+	/* the constants checking requires shallow comparison */
+	if (TYPEOF(value) == CLOSXP && R_ClosureExpr(value) == body)
+	    REprintf("Function %s in namespace %s has this body.\n",
+		vname,
+		CHAR(PRINTNAME(nsname)));
+	/* search S4 registry */
+	const char *s4prefix = ".__T__";
+	if (TYPEOF(value) == ENVSXP &&
+		!strncmp(vname, s4prefix, strlen(s4prefix))) {
+	    SETCAR(args, value); /* re-use args */
+	    SEXP rlist = do_env2list(R_NilValue, env2listOp, args, R_NilValue);
+	    PROTECT(rlist);
+	    R_xlen_t rn = xlength(rlist);
+	    R_xlen_t ri;
+	    SEXP rnames = PROTECT(getAttrib(rlist, R_NamesSymbol));
+	    for(ri = 0; ri < rn; ri++) {
+		SEXP rvalue = VECTOR_ELT(rlist, ri);
+		/* the constants checking requires shallow comparison */
+		if (TYPEOF(rvalue) == CLOSXP &&
+			R_ClosureExpr(rvalue) == body)
+		    REprintf("S4 Method %s defined in namespace %s with "
+			"signature %s has this body.\n",
+			vname + strlen(s4prefix),
+			CHAR(PRINTNAME(nsname)),
+			CHAR(STRING_ELT(rnames, ri)));
+	    }
+	    UNPROTECT(2); /* rlist, rnames */
+	}
+    }
+    UNPROTECT(3); /* names, elist, args */
+}
+
+/*  findFunctionForBody - for a given function body, try to find a closure and
+    the name of its binding (and the name of the package). For debugging. */
+void attribute_hidden findFunctionForBody(SEXP body) {
+    SEXP nstable = HASHTAB(R_NamespaceRegistry);
+    CHECK_HASH_TABLE(nstable);
+    int n = length(nstable);
+    int i;
+    for(i = 0; i < n; i++) {
+	SEXP frame = VECTOR_ELT(nstable, i);
+	while (frame != R_NilValue) {
+	    findFunctionForBodyInNamespace(body, CAR(frame), TAG(frame));
+	    frame = CDR(frame);
+	}
+    }
+}
+
diff --git a/src/main/errors.c b/src/main/errors.c
index 3974908..01ceb53 100644
--- a/src/main/errors.c
+++ b/src/main/errors.c
@@ -1,6 +1,6 @@
 /*
  *  R : A Computer Language for Statistical Data Analysis
- *  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
@@ -14,7 +14,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  */
 
 #ifdef HAVE_CONFIG_H
@@ -36,13 +36,6 @@
 #define min(a, b) (a<b?a:b)
 #endif
 
-#if defined(__GNUC__) && __GNUC__ >= 3
-#define NORET __attribute__((noreturn))
-#else
-#define NORET
-#endif
-
-
 /* Total line length, in chars, before splitting in warnings/errors */
 #define LONGWARN 75
 
@@ -78,28 +71,20 @@ static char * R_ConciseTraceback(SEXP call, int skip);
   WarningMessage()-> warningcall (but with message from WarningDB[]).
 */
 
-static void reset_stack_limit(void *data)
-{
-    uintptr_t *limit = (uintptr_t *) data;
-    R_CStackLimit = *limit;
-}
-
-void R_SignalCStackOverflow(intptr_t usage)
+void NORET R_SignalCStackOverflow(intptr_t usage)
 {
     /* We do need some stack space to process error recovery, so
        temporarily raise the limit.  We have 5% head room because we
        reduced R_CStackLimit to 95% of the initial value in
        setup_Rmainloop.
     */
-    RCNTXT cntxt;
-    uintptr_t stacklimit = R_CStackLimit;
-    R_CStackLimit += 0.05*R_CStackLimit;
-    begincontext(&cntxt, CTXT_CCODE, R_NilValue, R_BaseEnv, R_BaseEnv,
-		 R_NilValue, R_NilValue);
-    cntxt.cend = &reset_stack_limit;
-    cntxt.cenddata = &stacklimit;
+    if (R_OldCStackLimit == 0) {
+	R_OldCStackLimit = R_CStackLimit;
+	R_CStackLimit = (uintptr_t) (R_CStackLimit / 0.95);
+    }
 
-    errorcall(R_NilValue, "C stack usage  %ld is too close to the limit", usage);
+    errorcall(R_NilValue, "C stack usage  %ld is too close to the limit",
+	      usage);
     /* Do not translate this, to save stack space */
 }
 
@@ -118,7 +103,7 @@ void R_CheckStack2(size_t extra)
     int dummy;
     intptr_t usage = R_CStackDir * (R_CStackStart - (uintptr_t)&dummy);
 
-    /* do it this way, as some compilers do usage + extra 
+    /* do it this way, as some compilers do usage + extra
        in unsigned arithmetic */
     usage += extra;
     if(R_CStackLimit != -1 && usage > ((intptr_t) R_CStackLimit))
@@ -148,23 +133,51 @@ void R_CheckUserInterrupt(void)
 #endif
 }
 
-void onintr()
+static SEXP getInterruptCondition();
+
+static void onintrEx(Rboolean resumeOK)
 {
     if (R_interrupts_suspended) {
 	R_interrupts_pending = 1;
 	return;
     }
     else R_interrupts_pending = 0;
-    signalInterrupt();
+
+    if (resumeOK) {
+	SEXP rho = R_GlobalContext->cloenv;
+	int dbflag = RDEBUG(rho);
+	RCNTXT restartcontext;
+	begincontext(&restartcontext, CTXT_RESTART, R_NilValue, R_GlobalEnv,
+		     R_BaseEnv, R_NilValue, R_NilValue);
+	if (SETJMP(restartcontext.cjmpbuf)) {
+	    SET_RDEBUG(rho, dbflag); /* in case browser() has messed with it */
+	    R_ReturnedValue = R_NilValue;
+	    R_Visible = FALSE;
+	    endcontext(&restartcontext);
+	    return;
+	}
+	R_InsertRestartHandlers(&restartcontext, "resume");
+	signalInterrupt();
+	endcontext(&restartcontext);
+    }
+    else signalInterrupt();
+
+    /* Interrupts do not inherit from error, so we should not run the
+       user erro handler. But we have been, so as a transition,
+       continue to use options('error') if options('interrupt') is not
+       set */
+    Rboolean tryUserError = GetOption1(install("interrupt")) == R_NilValue;
 
     REprintf("\n");
-    /* Attempt to run user error option, save a traceback, show
-       warnings, and reset console; also stop at restart (try/browser)
-       frames.  Not clear this is what we really want, but this
-       preserves current behavior */
-    jump_to_top_ex(TRUE, TRUE, TRUE, TRUE, FALSE);
+    /* Attempt to save a traceback, show warnings, and reset console;
+       also stop at restart (try/browser) frames.  Not clear this is
+       what we really want, but this preserves current behavior */
+    jump_to_top_ex(TRUE, tryUserError, TRUE, TRUE, FALSE);
 }
 
+void onintr()  { onintrEx(TRUE); }
+void onintrNoResume() { onintrEx(FALSE); }
+
 /* SIGUSR1: save and quit
    SIGUSR2: save and quit, don't run .Last or on.exit().
 
@@ -258,10 +271,31 @@ static int Rvsnprintf(char *buf, size_t size, const char  *format, va_list ap)
 #endif
 
 #define BUFSIZE 8192
+static R_INLINE void RprintTrunc(char *buf)
+{
+    if(R_WarnLength < BUFSIZE - 20 && strlen(buf) == R_WarnLength) {
+	strcat(buf, " ");
+	strcat(buf, _("[... truncated]"));
+    }
+}
+
+static SEXP getCurrentCall()
+{
+    RCNTXT *c = R_GlobalContext;
+
+    /* This can be called before R_GlobalContext is defined, so... */
+    /* If profiling is on, this can be a CTXT_BUILTIN */
+
+    if (c && (c->callflag & CTXT_BUILTIN)) c = c->nextcontext;
+    if (c == R_GlobalContext && R_BCIntActive)
+	return R_getBCInterpreterExpression();
+    else
+	return c ? c->call : R_NilValue;
+}
+
 void warning(const char *format, ...)
 {
     char buf[BUFSIZE], *p;
-    RCNTXT *c = R_GlobalContext;
 
     va_list(ap);
     va_start(ap, format);
@@ -269,17 +303,15 @@ void warning(const char *format, ...)
     va_end(ap);
     p = buf + strlen(buf) - 1;
     if(strlen(buf) > 0 && *p == '\n') *p = '\0';
-    if(R_WarnLength < BUFSIZE - 20 && strlen(buf) == R_WarnLength)
-	strcat(buf, " [... truncated]");
-    if (c && (c->callflag & CTXT_BUILTIN)) c = c->nextcontext;
-    warningcall(c ? c->call : R_NilValue, "%s", buf);
+    RprintTrunc(buf);
+    warningcall(getCurrentCall(), "%s", buf);
 }
 
 /* declarations for internal condition handling */
 
 static void vsignalError(SEXP call, const char *format, va_list ap);
 static void vsignalWarning(SEXP call, const char *format, va_list ap);
-static void invokeRestart(SEXP, SEXP);
+static void NORET invokeRestart(SEXP, SEXP);
 
 static void reset_inWarning(void *data)
 {
@@ -342,8 +374,7 @@ static void vwarningcall_dflt(SEXP call, const char *format, va_list ap)
 
     if(w >= 2) { /* make it an error */
 	Rvsnprintf(buf, min(BUFSIZE, R_WarnLength), format, ap);
-	if(R_WarnLength < BUFSIZE - 20 && strlen(buf) == R_WarnLength)
-	    strcat(buf, " [... truncated]");
+	RprintTrunc(buf);
 	inWarning = 0; /* PR#1570 */
 	errorcall(call, _("(converted from warning) %s"), buf);
     }
@@ -353,19 +384,20 @@ static void vwarningcall_dflt(SEXP call, const char *format, va_list ap)
 	    dcall = CHAR(STRING_ELT(deparse1s(call), 0));
 	} else dcall = "";
 	Rvsnprintf(buf, min(BUFSIZE, R_WarnLength+1), format, ap);
-	if(R_WarnLength < BUFSIZE - 20 && strlen(buf) == R_WarnLength)
-	    strcat(buf, " [... truncated]");
-	if(dcall[0] == '\0')
-	    REprintf(_("Warning: %s\n"), buf);
-	else if(noBreakWarning || 
-		(mbcslocale && 18 + wd(dcall) + wd(buf) <= LONGWARN) ||
-		(!mbcslocale && 18+strlen(dcall)+strlen(buf) <= LONGWARN) )
-	    REprintf(_("Warning in %s : %s\n"), dcall, buf);
-	else
-	    REprintf(_("Warning in %s :\n  %s\n"), dcall, buf);
+	RprintTrunc(buf);
+
+	if(dcall[0] == '\0') REprintf(_("Warning:"));
+	else {
+	    REprintf(_("Warning in %s :"), dcall);
+	    if(!(noBreakWarning ||
+		 ( mbcslocale && 18 + wd(dcall) + wd(buf) <= LONGWARN) ||
+		 (!mbcslocale && 18 + strlen(dcall) + strlen(buf) <= LONGWARN)))
+		REprintf("\n ");
+	}
+	REprintf(" %s\n", buf);
 	if(R_ShowWarnCalls && call != R_NilValue) {
 	    tr = R_ConciseTraceback(call, 0);
-	    if (strlen(tr)) REprintf("Calls: %s\n", tr);
+	    if (strlen(tr)) {REprintf(_("Calls:")); REprintf(" %s\n", tr);}
 	}
     }
     else if(w == 0) {	/* collect them */
@@ -373,13 +405,14 @@ static void vwarningcall_dflt(SEXP call, const char *format, va_list ap)
 	if(R_CollectWarnings < R_nwarnings) {
 	    SET_VECTOR_ELT(R_Warnings, R_CollectWarnings, call);
 	    Rvsnprintf(buf, min(BUFSIZE, R_WarnLength+1), format, ap);
-	    if(R_WarnLength < BUFSIZE - 20 && strlen(buf) == R_WarnLength)
-		strcat(buf, " [... truncated]");
+	    RprintTrunc(buf);
 	    if(R_ShowWarnCalls && call != R_NilValue) {
-		char *tr =  R_ConciseTraceback(call, 0); 
+		char *tr =  R_ConciseTraceback(call, 0);
 		size_t nc = strlen(tr);
 		if (nc && nc + (int)strlen(buf) + 8 < BUFSIZE) {
-		    strcat(buf, "\nCalls: ");
+		    strcat(buf, "\n");
+		    strcat(buf, _("Calls:"));
+		    strcat(buf, " ");
 		    strcat(buf, tr);
 		}
 	    }
@@ -415,7 +448,7 @@ void warningcall_immediate(SEXP call, const char *format, ...)
 
     immediateWarning = 1;
     va_start(ap, format);
-    vwarningcall_dflt(call, format, ap);
+    vsignalWarning(call, format, ap);
     va_end(ap);
     immediateWarning = 0;
 }
@@ -456,15 +489,17 @@ void PrintWarnings(void)
     cntxt.cend = &cleanup_PrintWarnings;
 
     inPrintWarnings = 1;
-    header = ngettext("Warning message:\n", "Warning messages:\n", R_CollectWarnings);
+    header = ngettext("Warning message:", "Warning messages:",
+		      R_CollectWarnings);
     if( R_CollectWarnings == 1 ) {
-	REprintf("%s", header);
+	REprintf("%s\n", header);
 	names = CAR(ATTRIB(R_Warnings));
 	if( VECTOR_ELT(R_Warnings, 0) == R_NilValue )
-	   REprintf("%s \n", CHAR(STRING_ELT(names, 0)));
+	    REprintf("%s \n", CHAR(STRING_ELT(names, 0)));
 	else {
-	    const char *dcall, *sep = " ", *msg = CHAR(STRING_ELT(names, 0));
+	    const char *dcall, *msg = CHAR(STRING_ELT(names, 0));
 	    dcall = CHAR(STRING_ELT(deparse1s(VECTOR_ELT(R_Warnings, 0)), 0));
+	    REprintf(_("In %s :"), dcall);
 	    if (mbcslocale) {
 		int msgline1;
 		char *p = strchr(msg, '\n');
@@ -473,24 +508,26 @@ void PrintWarnings(void)
 		    msgline1 = wd(msg);
 		    *p = '\n';
 		} else msgline1 = wd(msg);
-		if (6 + wd(dcall) + msgline1 > LONGWARN) sep = "\n  ";
+		if (6 + wd(dcall) + msgline1 > LONGWARN) REprintf("\n ");
 	    } else {
 		size_t msgline1 = strlen(msg);
 		char *p = strchr(msg, '\n');
 		if (p) msgline1 = (int)(p - msg);
-		if (6+strlen(dcall) + msgline1 > LONGWARN) sep = "\n  ";
+		if (6 + strlen(dcall) + msgline1 > LONGWARN) REprintf("\n ");
 	    }
-	    REprintf("In %s :%s%s\n", dcall, sep, msg);
+	    REprintf(" %s\n", msg);
 	}
     } else if( R_CollectWarnings <= 10 ) {
-	REprintf("%s", header);
+	REprintf("%s\n", header);
 	names = CAR(ATTRIB(R_Warnings));
 	for(i = 0; i < R_CollectWarnings; i++) {
-	    if( VECTOR_ELT(R_Warnings, i) == R_NilValue )
+	    if( VECTOR_ELT(R_Warnings, i) == R_NilValue ) {
 		REprintf("%d: %s \n", i+1, CHAR(STRING_ELT(names, i)));
-	    else {
-		const char *dcall, *sep = " ", *msg = CHAR(STRING_ELT(names, i));
+	    } else {
+		const char *dcall, *msg = CHAR(STRING_ELT(names, i));
 		dcall = CHAR(STRING_ELT(deparse1s(VECTOR_ELT(R_Warnings, i)), 0));
+		REprintf("%d: ", i + 1);
+		REprintf(_("In %s :"), dcall);
 		if (mbcslocale) {
 		    int msgline1;
 		    char *p = strchr(msg, '\n');
@@ -499,22 +536,30 @@ void PrintWarnings(void)
 			msgline1 = wd(msg);
 			*p = '\n';
 		    } else msgline1 = wd(msg);
-		    if (10 + wd(dcall) + msgline1 > LONGWARN) sep = "\n  ";
+		    if (10 + wd(dcall) + msgline1 > LONGWARN) {
+			REprintf("\n ");
+		    }
 		} else {
 		    size_t msgline1 = strlen(msg);
 		    char *p = strchr(msg, '\n');
 		    if (p) msgline1 = (int)(p - msg);
-		    if (10+strlen(dcall) + msgline1 > LONGWARN) sep = "\n  ";
+		    if (10 + strlen(dcall) + msgline1 > LONGWARN) {
+			REprintf("\n ");
+		    }
 		}
-		REprintf("%d: In %s :%s%s\n", i+1, dcall, sep, msg);
+		REprintf(" %s\n", msg);
 	    }
 	}
     } else {
 	if (R_CollectWarnings < R_nwarnings)
-	    REprintf(_("There were %d warnings (use warnings() to see them)\n"),
+	    REprintf(ngettext("There was %d warning (use warnings() to see it)",
+			      "There were %d warnings (use warnings() to see them)",
+			      R_CollectWarnings),
 		     R_CollectWarnings);
 	else
-	    REprintf(_("There were %d or more warnings (use warnings() to see the first %d)\n"), R_nwarnings, R_nwarnings);
+	    REprintf(_("There were %d or more warnings (use warnings() to see the first %d)"),
+		     R_nwarnings, R_nwarnings);
+	REprintf("\n");
     }
     /* now truncate and install last.warning */
     PROTECT(s = allocVector(VECSXP, R_CollectWarnings));
@@ -542,17 +587,19 @@ void PrintWarnings(void)
 
 static SEXP GetSrcLoc(SEXP srcref)
 {
-    SEXP sep, line, result;
-    SEXP srcfile = R_GetSrcFilename(srcref);
+    SEXP sep, line, result, srcfile;
     if (TYPEOF(srcref) != INTSXP || length(srcref) < 4)
 	return ScalarString(mkChar(""));
+
+    PROTECT(srcref);
+    PROTECT(srcfile = R_GetSrcFilename(srcref));
     SEXP e2 = PROTECT(lang2( install("basename"), srcfile));
     PROTECT(srcfile = eval(e2, R_BaseEnv ) );
     PROTECT(sep = ScalarString(mkChar("#")));
     PROTECT(line = ScalarInteger(INTEGER(srcref)[0]));
     SEXP e = PROTECT(lang4( install("paste0"), srcfile, sep, line ));
     result = eval(e, R_BaseEnv );
-    UNPROTECT(5);
+    UNPROTECT(7);
     return result;
 }
 
@@ -572,11 +619,21 @@ static void restore_inError(void *data)
     R_Expressions = R_Expressions_keep;
 }
 
+/* Do not check constants on error more than this number of times per one
+   R process lifetime; if so many errors are generated, the performance
+   overhead due to the checks would be too high, and the program is doing
+   something strange anyway (i.e. running no-segfault tests). The constant
+   checks in GC and session exit (or .Call) do not have such limit. */
+static int allowedConstsChecks = 1000;
+
 static void NORET
 verrorcall_dflt(SEXP call, const char *format, va_list ap)
 {
+    if (allowedConstsChecks > 0) {
+	allowedConstsChecks--;
+	R_checkConstants(TRUE);
+    }
     RCNTXT cntxt;
-    const char *dcall;
     char *p, *tr;
     int oldInError;
 
@@ -608,40 +665,39 @@ verrorcall_dflt(SEXP call, const char *format, va_list ap)
     inError = 1;
 
     if(call != R_NilValue) {
-	char tmp[BUFSIZE];
-	char *head = _("Error in "),
-	     *mid1 = " : ", *mid2 = _(" (from %s) : "), *tail = "\n  ";
-	char *mid = mid1;
-	char src[BUFSIZE];
-	SEXP srcloc;
-	size_t len;	
+	char tmp[BUFSIZE], tmp2[BUFSIZE];
+	char *head = _("Error in "), *tail = "\n  ";
+	SEXP srcloc = R_NilValue; // -Wall
+	size_t len = 0;	// indicates if srcloc has been set
 	int protected = 0, skip = NA_INTEGER;
 	SEXP opt = GetOption1(install("show.error.locations"));
 	if (!isNull(opt)) {
 	    if (TYPEOF(opt) == STRSXP && length(opt) == 1) {
-	    	if (pmatch(ScalarString(mkChar("top")), opt, 0)) skip = 0;
-	    	else if (pmatch(ScalarString(mkChar("bottom")), opt, 0)) skip = -1;
+		if (pmatch(ScalarString(mkChar("top")), opt, 0)) skip = 0;
+		else if (pmatch(ScalarString(mkChar("bottom")), opt, 0)) skip = -1;
 	    } else if (TYPEOF(opt) == LGLSXP)
-	    	skip = asLogical(opt) == 1 ? 0 : NA_INTEGER;
+		skip = asLogical(opt) == 1 ? 0 : NA_INTEGER;
 	    else
-	    	skip = asInteger(opt);
+		skip = asInteger(opt);
 	}
 
+	const char *dcall = CHAR(STRING_ELT(deparse1s(call), 0));
+	snprintf(tmp2, BUFSIZE,  "%s", head);
 	if (skip != NA_INTEGER) {
 	    PROTECT(srcloc = GetSrcLoc(R_GetCurrentSrcref(skip)));
 	    protected++;
 	    len = strlen(CHAR(STRING_ELT(srcloc, 0)));
-	    if (len) {
-	        snprintf(src, BUFSIZE, mid2, CHAR(STRING_ELT(srcloc, 0)));
-	        mid = src;
-	    }
+	    if (len)
+		snprintf(tmp2, BUFSIZE,  _("Error in %s (from %s) : "),
+			 dcall, CHAR(STRING_ELT(srcloc, 0)));
 	}
-	len = strlen(head) + strlen(mid) + strlen(tail);
-	
+
 	Rvsnprintf(tmp, min(BUFSIZE, R_WarnLength) - strlen(head), format, ap);
-	dcall = CHAR(STRING_ELT(deparse1s(call), 0));
-	if (len + strlen(dcall) + strlen(tmp) < BUFSIZE) {
-	    snprintf(errbuf, BUFSIZE,  "%s%s%s", head, dcall, mid);
+	if (strlen(tmp2) + strlen(tail) + strlen(tmp) < BUFSIZE) {
+	    if(len) snprintf(errbuf, BUFSIZE,
+			     _("Error in %s (from %s) : "),
+			     dcall, CHAR(STRING_ELT(srcloc, 0)));
+	    else snprintf(errbuf, BUFSIZE,  _("Error in %s : "), dcall);
 	    if (mbcslocale) {
 		int msgline1;
 		char *p = strchr(tmp, '\n');
@@ -676,10 +732,11 @@ verrorcall_dflt(SEXP call, const char *format, va_list ap)
     if(*p != '\n') strcat(errbuf, "\n");
 
     if(R_ShowErrorCalls && call != R_NilValue) {  /* assume we want to avoid deparse */
-	tr = R_ConciseTraceback(call, 0); 
+	tr = R_ConciseTraceback(call, 0);
 	size_t nc = strlen(tr);
 	if (nc && nc + strlen(errbuf) + 8 < BUFSIZE) {
-	    strcat(errbuf, "Calls: ");
+	    strcat(errbuf, _("Calls:"));
+	    strcat(errbuf, " ");
 	    strcat(errbuf, tr);
 	    strcat(errbuf, "\n");
 	}
@@ -711,6 +768,10 @@ void NORET errorcall(SEXP call, const char *format,...)
 {
     va_list(ap);
 
+    if (call == R_CurrentExpression)
+	/* behave like error( */
+	call = getCurrentCall();
+
     va_start(ap, format);
     vsignalError(call, format, ap);
     va_end(ap);
@@ -730,6 +791,21 @@ void NORET errorcall(SEXP call, const char *format,...)
     va_end(ap);
 }
 
+/* Like errorcall, but copies all data for the error message into a buffer
+   before doing anything else. */
+attribute_hidden
+void NORET errorcall_cpy(SEXP call, const char *format, ...)
+{
+    char buf[BUFSIZE];
+
+    va_list(ap);
+    va_start(ap, format);
+    Rvsnprintf(buf, BUFSIZE, format, ap);
+    va_end(ap);
+
+    errorcall(call, "%s", buf);
+}
+
 SEXP attribute_hidden do_geterrmessage(SEXP call, SEXP op, SEXP args, SEXP env)
 {
     SEXP res;
@@ -744,16 +820,12 @@ SEXP attribute_hidden do_geterrmessage(SEXP call, SEXP op, SEXP args, SEXP env)
 void error(const char *format, ...)
 {
     char buf[BUFSIZE];
-    RCNTXT *c = R_GlobalContext;
 
     va_list(ap);
     va_start(ap, format);
     Rvsnprintf(buf, min(BUFSIZE, R_WarnLength), format, ap);
     va_end(ap);
-    /* This can be called before R_GlobalContext is defined, so... */
-    /* If profiling is on, this can be a CTXT_BUILTIN */
-    if (c && (c->callflag & CTXT_BUILTIN)) c = c->nextcontext;
-    errorcall(c ? c->call : R_NilValue, "%s", buf);
+    errorcall(getCurrentCall(), "%s", buf);
 }
 
 static void try_jump_to_restart(void)
@@ -799,7 +871,8 @@ static void jump_to_top_ex(Rboolean traceback,
 
     haveHandler = FALSE;
 
-    if (tryUserHandler && inError < 3) {
+    /* don't use options("error") when handling a C stack overflow */
+    if (R_OldCStackLimit == 0 && tryUserHandler && inError < 3) {
 	if (! inError)
 	    inError = 1;
 
@@ -846,10 +919,9 @@ static void jump_to_top_ex(Rboolean traceback,
 
     /* WARNING: If oldInError > 0 ABSOLUTELY NO ALLOCATION can be
        triggered after this point except whatever happens in writing
-       the traceback and R_run_onexits.  The error could be an out of
-       memory error and any allocation could result in an
-       infinite-loop condition. All you can do is reset things and
-       exit.  */
+       the traceback.  The error could be an out of memory error and
+       any allocation could result in an infinite-loop condition. All
+       you can do is reset things and exit.  */
 
     /* jump to a browser/try if one is on the stack */
     if (! ignoreRestartContexts)
@@ -874,36 +946,10 @@ static void jump_to_top_ex(Rboolean traceback,
 	}
     }
 
-    /* Run onexit/cend code for all contexts down to but not including
-       the jump target.  This may cause recursive calls to
-       jump_to_top_ex, but the possible number of such recursive
-       calls is limited since each exit function is removed before it
-       is executed.  In addition, all but the first should have
-       inError > 0.  This is not a great design because we could run
-       out of other resources that are on the stack (like C stack for
-       example).  The right thing to do is arrange to execute exit
-       code *after* the LONGJMP, but that requires a more extensive
-       redesign of the non-local transfer of control mechanism.
-       LT. */
-    R_run_onexits(R_ToplevelContext);
-
-    if ( !R_Interactive && !haveHandler
-	 /* only bail out if at session top level, not in R_tryEval calls */
-	 && R_ToplevelContext == R_SessionContext ) {
-	REprintf(_("Execution halted\n"));
-	R_CleanUp(SA_NOSAVE, 1, 0); /* quit, no save, no .Last, status=1 */
-    }
-
-    R_GlobalContext = R_ToplevelContext;
-    R_restore_globals(R_GlobalContext);
-    LONGJMP(R_ToplevelContext->cjmpbuf, 0);
-    /* not reached
-    endcontext(&cntxt);
-    inError = oldInError;
-    */
+    R_jumpctxt(R_ToplevelContext, 0, NULL);
 }
 
-void jump_to_toplevel()
+void NORET jump_to_toplevel()
 {
     /* no traceback, no user error option; for now, warnings are
        printed here and console is reset -- eventually these should be
@@ -917,6 +963,7 @@ void jump_to_toplevel()
 /* gettext(domain, string) */
 SEXP attribute_hidden do_gettext(SEXP call, SEXP op, SEXP args, SEXP rho)
 {
+    checkArity(op, args);
 #ifdef ENABLE_NLS
     const char *domain = "", *cfn;
     char *buf;
@@ -926,7 +973,7 @@ SEXP attribute_hidden do_gettext(SEXP call, SEXP op, SEXP args, SEXP rho)
     checkArity(op, args);
     if(isNull(string) || !n) return string;
 
-    if(!isString(string)) errorcall(call, _("invalid '%s' value"), "string");
+    if(!isString(string)) error(_("invalid '%s' value"), "string");
 
     if(isNull(CAR(args))) {
 	RCNTXT *cptr;
@@ -959,7 +1006,7 @@ SEXP attribute_hidden do_gettext(SEXP call, SEXP op, SEXP args, SEXP rho)
     } else if(isString(CAR(args)))
 	domain = translateChar(STRING_ELT(CAR(args),0));
     else if(isLogical(CAR(args)) && LENGTH(CAR(args)) == 1 && LOGICAL(CAR(args))[0] == NA_LOGICAL) ;
-    else errorcall(call, _("invalid '%s' value"), "domain");
+    else error(_("invalid '%s' value"), "domain");
 
     if(strlen(domain)) {
 	PROTECT(ans = allocVector(STRSXP, n));
@@ -1019,7 +1066,7 @@ SEXP attribute_hidden do_gettext(SEXP call, SEXP op, SEXP args, SEXP rho)
 SEXP attribute_hidden do_ngettext(SEXP call, SEXP op, SEXP args, SEXP rho)
 {
 #ifdef ENABLE_NLS
-    const char *domain = "";
+    const char *domain = "", *cfn;;
     char *buf;
     SEXP ans, sdom = CADDDR(args);
 #endif
@@ -1029,9 +1076,9 @@ SEXP attribute_hidden do_ngettext(SEXP call, SEXP op, SEXP args, SEXP rho)
     checkArity(op, args);
     if(n == NA_INTEGER || n < 0) error(_("invalid '%s' argument"), "n");
     if(!isString(msg1) || LENGTH(msg1) != 1)
-	error(_("'msg1' must be a character string"));
+	error(_("'%s' must be a character string"), "msg1");
     if(!isString(msg2) || LENGTH(msg2) != 1)
-	error(_("'msg2' must be a character string"));
+	error(_("'%s' must be a character string"), "msg2");
 
 #ifdef ENABLE_NLS
     if(isNull(sdom)) {
@@ -1041,8 +1088,11 @@ SEXP attribute_hidden do_ngettext(SEXP call, SEXP op, SEXP args, SEXP rho)
 	     cptr != NULL && cptr->callflag != CTXT_TOPLEVEL;
 	     cptr = cptr->nextcontext)
 	    if (cptr->callflag & CTXT_FUNCTION) {
+		/* stop() etc have internal call to .makeMessage */
+		cfn = CHAR(STRING_ELT(deparse1s(CAR(cptr->call)), 0));
+		if(streql(cfn, "stop") || streql(cfn, "warning")
+		   || streql(cfn, "message")) continue;
 		rho = cptr->cloenv;
-		break;
 	    }
 	while(rho != R_EmptyEnv) {
 	    if (rho == R_GlobalEnv) break;
@@ -1062,7 +1112,7 @@ SEXP attribute_hidden do_ngettext(SEXP call, SEXP op, SEXP args, SEXP rho)
     } else if(isString(sdom))
 	domain = CHAR(STRING_ELT(sdom,0));
     else if(isLogical(sdom) && LENGTH(sdom) == 1 && LOGICAL(sdom)[0] == NA_LOGICAL) ;
-    else errorcall(call, _("invalid '%s' value"), "domain");
+    else error(_("invalid '%s' value"), "domain");
 
     /* libintl seems to malfunction if given a message of "" */
     if(strlen(domain) && length(STRING_ELT(msg1, 0))) {
@@ -1087,12 +1137,12 @@ SEXP attribute_hidden do_bindtextdomain(SEXP call, SEXP op, SEXP args, SEXP rho)
 
     checkArity(op, args);
     if(!isString(CAR(args)) || LENGTH(CAR(args)) != 1)
-	errorcall(call, _("invalid '%s' value"), "domain");
+	error(_("invalid '%s' value"), "domain");
     if(isNull(CADR(args))) {
 	res = bindtextdomain(translateChar(STRING_ELT(CAR(args),0)), NULL);
     } else {
 	if(!isString(CADR(args)) || LENGTH(CADR(args)) != 1)
-	    errorcall(call, _("invalid '%s' value"), "dirname");
+	    error(_("invalid '%s' value"), "dirname");
 	res = bindtextdomain(translateChar(STRING_ELT(CAR(args),0)),
 			     translateChar(STRING_ELT(CADR(args),0)));
     }
@@ -1113,10 +1163,11 @@ static SEXP findCall(void)
     return R_NilValue;
 }
 
-SEXP attribute_hidden do_stop(SEXP call, SEXP op, SEXP args, SEXP rho)
+SEXP attribute_hidden NORET do_stop(SEXP call, SEXP op, SEXP args, SEXP rho)
 {
 /* error(.) : really doesn't return anything; but all do_foo() must be SEXP */
     SEXP c_call;
+    checkArity(op, args);
 
     if(asLogical(CAR(args))) /* find context -> "Error in ..:" */
 	c_call = findCall();
@@ -1133,12 +1184,13 @@ SEXP attribute_hidden do_stop(SEXP call, SEXP op, SEXP args, SEXP rho)
     }
     else
       errorcall(c_call, "");
-    /* never called: */return c_call;
+    /* never called: */
 }
 
 SEXP attribute_hidden do_warning(SEXP call, SEXP op, SEXP args, SEXP rho)
 {
     SEXP c_call;
+    checkArity(op, args);
 
     if(asLogical(CAR(args))) /* find context -> "... in: ..:" */
 	c_call = findCall();
@@ -1173,13 +1225,13 @@ SEXP attribute_hidden do_warning(SEXP call, SEXP op, SEXP args, SEXP rho)
 
 /* Error recovery for incorrect argument count error. */
 attribute_hidden
-void WrongArgCount(const char *s)
+void NORET WrongArgCount(const char *s)
 {
     error(_("incorrect number of arguments to \"%s\""), s);
 }
 
 
-void UNIMPLEMENTED(const char *s)
+void NORET UNIMPLEMENTED(const char *s)
 {
     error(_("unimplemented feature in %s"), s);
 }
@@ -1214,7 +1266,7 @@ WarningDB[] = {
 
 
 attribute_hidden
-void ErrorMessage(SEXP call, int which_error, ...)
+void NORET ErrorMessage(SEXP call, int which_error, ...)
 {
     int i;
     char buf[BUFSIZE];
@@ -1247,6 +1299,10 @@ void WarningMessage(SEXP call, R_WARNING which_warn, ...)
 	i++;
     }
 
+/* clang pre-3.9.0 says
+      warning: passing an object that undergoes default argument promotion to 
+      'va_start' has undefined behavior [-Wvarargs]
+*/
     va_start(ap, which_warn);
     Rvsnprintf(buf, BUFSIZE, _(WarningDB[i].format), ap);
     va_end(ap);
@@ -1284,7 +1340,7 @@ void R_ReturnOrRestart(SEXP val, SEXP env, Rboolean restart)
     }
 }
 
-void R_JumpToToplevel(Rboolean restart)
+void NORET R_JumpToToplevel(Rboolean restart)
 {
     RCNTXT *c;
 
@@ -1298,12 +1354,7 @@ void R_JumpToToplevel(Rboolean restart)
     if (c != R_ToplevelContext)
 	warning(_("top level inconsistency?"));
 
-    /* Run onexit/cend code for everything above the target. */
-    R_run_onexits(c);
-
-    R_ToplevelContext = R_GlobalContext = c;
-    R_restore_globals(R_GlobalContext);
-    LONGJMP(c->cjmpbuf, CTXT_TOPLEVEL);
+    R_jumpctxt(R_ToplevelContext, CTXT_TOPLEVEL, NULL);
 }
 #endif
 
@@ -1348,8 +1399,14 @@ SEXP R_GetTraceback(int skip)
 		skip--;
 	    else {
 		SETCAR(t, deparse1(c->call, 0, DEFAULTDEPARSE));
-		if (c->srcref && !isNull(c->srcref)) 
-		    setAttrib(CAR(t), R_SrcrefSymbol, duplicate(c->srcref));
+		if (c->srcref && !isNull(c->srcref)) {
+		    SEXP sref;
+		    if (c->srcref == R_InBCInterpreter)
+			sref = R_findBCInterpreterSrcref(c);
+		    else
+			sref = c->srcref;
+		    setAttrib(CAR(t), R_SrcrefSymbol, duplicate(sref));
+		}
 		t = CDR(t);
 	    }
 	}
@@ -1360,13 +1417,13 @@ SEXP R_GetTraceback(int skip)
 SEXP attribute_hidden do_traceback(SEXP call, SEXP op, SEXP args, SEXP rho)
 {
     int skip;
-    
+
     checkArity(op, args);
     skip = asInteger(CAR(args));
-    
+
     if (skip == NA_INTEGER || skip < 0 )
-    	error(_("invalid '%s' value"), "skip");
-    	
+	error(_("invalid '%s' value"), "skip");
+
     return R_GetTraceback(skip);
 }
 
@@ -1536,7 +1593,7 @@ static void vsignalWarning(SEXP call, const char *format, va_list ap)
     else vwarningcall_dflt(call, format, ap);
 }
 
-static void gotoExitingHandler(SEXP cond, SEXP call, SEXP entry)
+static void NORET gotoExitingHandler(SEXP cond, SEXP call, SEXP entry)
 {
     SEXP rho = ENTRY_TARGET_ENVIR(entry);
     SEXP result = ENTRY_RETURN_RESULT(entry);
@@ -1564,6 +1621,10 @@ static void vsignalError(SEXP call, const char *format, va_list ap)
 	    if (ENTRY_HANDLER(entry) == R_RestartToken)
 		return; /* go to default error handling; do not reset stack */
 	    else {
+		/* if we are in the process of handling a C stack
+		   overflow, treat all calling handlers ar failed */
+		if (R_OldCStackLimit)
+		    break;
 		SEXP hooksym, hcall, qcall;
 		/* protect oldstack here, not outside loop, so handler
 		   stack gets unwound in case error is protect stack
@@ -1688,10 +1749,16 @@ static void signalInterrupt(void)
     }
     R_HandlerStack = oldstack;
     UNPROTECT(1);
+
+    SEXP h = GetOption1(install("interrupt"));
+    if (h != R_NilValue) {
+	SEXP call = PROTECT(LCONS(h, R_NilValue));
+	eval(call, R_GlobalEnv);
+    }
 }
 
 void attribute_hidden
-R_InsertRestartHandlers(RCNTXT *cptr, Rboolean browser)
+R_InsertRestartHandlers(RCNTXT *cptr, const char *cname)
 {
     SEXP klass, rho, entry, name;
 
@@ -1709,13 +1776,13 @@ R_InsertRestartHandlers(RCNTXT *cptr, Rboolean browser)
     entry = mkHandlerEntry(klass, rho, R_RestartToken, rho, R_NilValue, TRUE);
     R_HandlerStack = CONS(entry, R_HandlerStack);
     UNPROTECT(1);
-    PROTECT(name = mkString(browser ? "browser" : "tryRestart"));
+    PROTECT(name = mkString(cname));
     PROTECT(entry = allocVector(VECSXP, 2));
-    PROTECT(SET_VECTOR_ELT(entry, 0, name));
+    SET_VECTOR_ELT(entry, 0, name);
     SET_VECTOR_ELT(entry, 1, R_MakeExternalPtr(cptr, R_NilValue, R_NilValue));
     setAttrib(entry, R_ClassSymbol, mkString("restart"));
     R_RestartStack = CONS(entry, R_RestartStack);
-    UNPROTECT(3);
+    UNPROTECT(2);
 }
 
 SEXP attribute_hidden do_dfltWarn(SEXP call, SEXP op, SEXP args, SEXP rho)
@@ -1734,7 +1801,7 @@ SEXP attribute_hidden do_dfltWarn(SEXP call, SEXP op, SEXP args, SEXP rho)
     return R_NilValue;
 }
 
-SEXP attribute_hidden do_dfltStop(SEXP call, SEXP op, SEXP args, SEXP rho)
+SEXP attribute_hidden NORET do_dfltStop(SEXP call, SEXP op, SEXP args, SEXP rho)
 {
     const char *msg;
     SEXP ecall;
@@ -1747,7 +1814,6 @@ SEXP attribute_hidden do_dfltStop(SEXP call, SEXP op, SEXP args, SEXP rho)
     ecall = CADR(args);
 
     errorcall_dflt(ecall, "%s", msg);
-    return R_NilValue; /* not reached */
 }
 
 
@@ -1770,11 +1836,11 @@ SEXP attribute_hidden do_getRestart(SEXP call, SEXP op, SEXP args, SEXP rho)
 	/**** need to pre-allocate */
 	SEXP name, entry;
 	PROTECT(name = mkString("abort"));
-	entry = allocVector(VECSXP, 2);
+	PROTECT(entry = allocVector(VECSXP, 2));
 	SET_VECTOR_ELT(entry, 0, name);
 	SET_VECTOR_ELT(entry, 1, R_NilValue);
 	setAttrib(entry, R_ClassSymbol, mkString("restart"));
-	UNPROTECT(1);
+	UNPROTECT(2);
 	return entry;
     }
     else return R_NilValue;
@@ -1797,7 +1863,7 @@ SEXP attribute_hidden do_addRestart(SEXP call, SEXP op, SEXP args, SEXP rho)
 
 #define RESTART_EXIT(r) VECTOR_ELT(r, 1)
 
-static void invokeRestart(SEXP r, SEXP arglist)
+static void NORET invokeRestart(SEXP r, SEXP arglist)
 {
     SEXP exit = RESTART_EXIT(r);
 
@@ -1820,12 +1886,11 @@ static void invokeRestart(SEXP r, SEXP arglist)
     }
 }
 
-SEXP attribute_hidden do_invokeRestart(SEXP call, SEXP op, SEXP args, SEXP rho)
+SEXP attribute_hidden NORET do_invokeRestart(SEXP call, SEXP op, SEXP args, SEXP rho)
 {
     checkArity(op, args);
     CHECK_RESTART(CAR(args));
     invokeRestart(CAR(args), CADR(args));
-    return R_NilValue; /* not reached */
 }
 
 SEXP attribute_hidden do_addTryHandlers(SEXP call, SEXP op, SEXP args, SEXP rho)
@@ -1833,9 +1898,9 @@ SEXP attribute_hidden do_addTryHandlers(SEXP call, SEXP op, SEXP args, SEXP rho)
     checkArity(op, args);
     if (R_GlobalContext == R_ToplevelContext ||
 	! (R_GlobalContext->callflag & CTXT_FUNCTION))
-	errorcall(call, _("not in a try context"));
+	error(_("not in a try context"));
     SET_RESTART_BIT_ON(R_GlobalContext->callflag);
-    R_InsertRestartHandlers(R_GlobalContext, FALSE);
+    R_InsertRestartHandlers(R_GlobalContext, "tryRestart");
     return R_NilValue;
 }
 
@@ -1868,7 +1933,7 @@ do_interruptsSuspended(SEXP call, SEXP op, SEXP args, SEXP env)
     return ScalarLogical(orig_value);
 }
 
-/* These functions are to be used in error messages, and available for others to use in the API 
+/* These functions are to be used in error messages, and available for others to use in the API
    GetCurrentSrcref returns the first non-NULL srcref after skipping skip of them.  If it
    doesn't find one it returns NULL. */
 
@@ -1878,38 +1943,158 @@ R_GetCurrentSrcref(int skip)
     RCNTXT *c = R_GlobalContext;
     SEXP srcref = R_Srcref;
     if (skip < 0) { /* to count up from the bottom, we need to count them all first */
-    	while (c) {
-    	    if (srcref && srcref != R_NilValue) 
+	while (c) {
+	    if (srcref && srcref != R_NilValue)
 		skip++;
-    	    srcref = c->srcref;
-    	    c = c->nextcontext;
-    	};
-    	if (skip < 0) return R_NilValue; /* not enough there */
-    	c = R_GlobalContext;
-    	srcref = R_Srcref;
+	    srcref = c->srcref;
+	    c = c->nextcontext;
+	};
+	if (skip < 0) return R_NilValue; /* not enough there */
+	c = R_GlobalContext;
+	srcref = R_Srcref;
     }
     while (c && (skip || !srcref || srcref == R_NilValue)) {
-    	if (srcref && srcref != R_NilValue) 
+	if (srcref && srcref != R_NilValue)
 	    skip--;
-    	srcref = c->srcref;
-    	c = c->nextcontext;
+	srcref = c->srcref;
+	c = c->nextcontext;
     }
     if (skip || !srcref)
-    	srcref = R_NilValue;
+	srcref = R_NilValue;
     return srcref;
 }
 
 /* Return the filename corresponding to a srcref, or "" if none is found */
 
-SEXP 
+SEXP
 R_GetSrcFilename(SEXP srcref)
 {
     SEXP srcfile = getAttrib(srcref, R_SrcfileSymbol);
-    if (TYPEOF(srcfile) != ENVSXP) 
-    	return ScalarString(mkChar(""));
-    srcfile = findVar(install("filename"), srcfile);	
+    if (TYPEOF(srcfile) != ENVSXP)
+	return ScalarString(mkChar(""));
+    srcfile = findVar(install("filename"), srcfile);
     if (TYPEOF(srcfile) != STRSXP)
-        return ScalarString(mkChar(""));
+	return ScalarString(mkChar(""));
     return srcfile;
 }
 
+
+/*
+ * C level tryCatch support
+ */
+
+/* There are two functions:
+
+       R_TryCatchError    handles error conditions;
+
+       R_TryCatch         can handle any condition type and allows a
+                          finalize action.
+*/
+
+SEXP R_tryCatchError(SEXP (*body)(void *), void *bdata,
+		     SEXP (*handler)(SEXP, void *), void *hdata)
+{
+    SEXP val;
+    SEXP cond = Rf_mkString("error");
+
+    PROTECT(cond);
+    val = R_tryCatch(body, bdata, cond, handler, hdata, NULL, NULL);
+    UNPROTECT(1);
+    return val;
+}
+
+/* This implementation uses R's tryCatch via calls from C to R to
+   invoke R's tryCatch, and then back to C to infoke the C
+   body/handler functions via a .Internal helper. This makes the
+   implementation fairly simple but not fast. If performance becomes
+   an issue we can look into a pure C implementation. LT */
+
+typedef struct {
+    SEXP (*body)(void *);
+    void *bdata;
+    SEXP (*handler)(SEXP, void *);
+    void *hdata;
+    void (*finally)(void *);
+    void *fdata;
+} tryCatchData_t;
+
+static SEXP default_tryCatch_handler(SEXP cond, void *data)
+{
+    return R_NilValue;
+}
+
+static void default_tryCatch_finally(void *data) { }
+
+static SEXP trycatch_callback = NULL;
+static const char* trycatch_callback_source =
+    "function(code, conds, fin) {\n"
+    "    handler <- function(cond)\n"
+    "        if (inherits(cond, conds))\n"
+    "            .Internal(C_tryCatchHelper(code, 1L, cond))\n"
+    "        else\n"
+    "            signalCondition(cond)\n"
+    "    if (fin)\n"
+    "        tryCatch(.Internal(C_tryCatchHelper(code, 0L)),\n"
+    "                 condition = handler,\n"
+    "                 finally = .Internal(C_tryCatchHelper(code, 2L)))\n"
+    "    else\n"
+    "        tryCatch(.Internal(C_tryCatchHelper(code, 0L)),\n"
+    "                 condition = handler)\n"
+    "}";
+
+SEXP R_tryCatch(SEXP (*body)(void *), void *bdata,
+		SEXP conds,
+		SEXP (*handler)(SEXP, void *), void *hdata,
+		void (*finally)(void *), void *fdata)
+{
+    if (body == NULL) error("must supply a body function");
+
+    if (trycatch_callback == NULL) {
+	trycatch_callback = R_ParseEvalString(trycatch_callback_source,
+					      R_BaseNamespace);
+	R_PreserveObject(trycatch_callback);
+    }
+    
+    tryCatchData_t tcd = {
+	.body = body,
+	.bdata = bdata,
+	.handler = handler != NULL ? handler : default_tryCatch_handler,
+	.hdata = hdata,
+	.finally = finally != NULL ? finally : default_tryCatch_finally,
+	.fdata = fdata
+    };
+
+    SEXP fin = finally != NULL ? R_TrueValue : R_FalseValue;
+    SEXP tcdptr = R_MakeExternalPtr(&tcd, R_NilValue, R_NilValue);
+    SEXP expr = lang4(trycatch_callback, tcdptr, conds, fin);
+    PROTECT(expr);
+    SEXP val = eval(expr, R_GlobalEnv);
+    UNPROTECT(1); /* expr */
+    return val;
+}
+
+SEXP do_tryCatchHelper(SEXP call, SEXP op, SEXP args, SEXP env)
+{
+    SEXP eptr = CAR(args);
+    SEXP sw = CADR(args);
+    SEXP cond = CADDR(args);
+    
+    if (TYPEOF(eptr) != EXTPTRSXP)
+	error("not an external pointer");
+
+    tryCatchData_t *ptcd = R_ExternalPtrAddr(CAR(args));
+
+    switch (asInteger(sw)) {
+    case 0:
+	return ptcd->body(ptcd->bdata);
+    case 1:
+	if (ptcd->handler != NULL)
+	    return ptcd->handler(cond, ptcd->hdata);
+	else return R_NilValue;
+    case 2:
+	if (ptcd->finally != NULL)
+	    ptcd->finally(ptcd->fdata);
+	return R_NilValue;
+    default: return R_NilValue; /* should not happen */
+    }
+}
diff --git a/src/main/eval.c b/src/main/eval.c
index fce5a15..c9a23df 100644
--- a/src/main/eval.c
+++ b/src/main/eval.c
@@ -1,7 +1,7 @@
 /*
  *  R : A Computer Language for Statistical Data Analysis
+ *  Copyright (C) 1998--2017	The R Core Team.
  *  Copyright (C) 1995, 1996	Robert Gentleman and Ross Ihaka
- *  Copyright (C) 1998--2014	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
@@ -15,12 +15,10 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  */
 
 
-#undef HASHING
-
 #ifdef HAVE_CONFIG_H
 # include <config.h>
 #endif
@@ -33,12 +31,11 @@
 #include <R_ext/Print.h>
 
 
-#define ARGUSED(x) LEVELS(x)
-
 static SEXP bcEval(SEXP, SEXP, Rboolean);
 
-/* BC_PROILFING needs to be defined here and in registration.c */
-/*#define BC_PROFILING*/
+/* BC_PROILFING needs to be enabled at build time. It is not enabled
+   by default as enabling it disabled the more efficient threaded code
+   implementation of the byte code interpreter. */
 #ifdef BC_PROFILING
 static Rboolean bc_profiling = FALSE;
 #endif
@@ -101,9 +98,6 @@ static int R_Profiling = 0;
 
 static FILE *R_ProfileOutfile = NULL;
 static int R_Mem_Profiling=0;
-extern void get_current_mem(size_t *,size_t *,size_t *); /* in memory.c */
-extern unsigned long get_duplicate_counter(void);  /* in duplicate.c */
-extern void reset_duplicate_counter(void);         /* in duplicate.c */
 static int R_GC_Profiling = 0;                     /* indicates GC profiling */
 static int R_Line_Profiling = 0;                   /* indicates line profiling, and also counts the filenames seen (+1) */
 static char **R_Srcfiles;			   /* an array of pointers into the filename buffer */
@@ -218,7 +212,7 @@ static void doprof(int sig)  /* sig is ignored in Windows */
 	    get_current_mem(&smallv, &bigv, &nodes);
 	    if((len = strlen(buf)) < PROFLINEMAX)
 		snprintf(buf+len, PROFBUFSIZ - len,
-			 ":%lu:%lu:%lu:%lu:", 
+			 ":%lu:%lu:%lu:%lu:",
 			 (unsigned long) smallv, (unsigned long) bigv,
 			 (unsigned long) nodes, get_duplicate_counter());
 	    reset_duplicate_counter();
@@ -228,7 +222,7 @@ static void doprof(int sig)  /* sig is ignored in Windows */
 	strcat(buf, "\"<GC>\" ");
 
     if (R_Line_Profiling)
-	lineprof(buf, R_Srcref);
+	lineprof(buf, R_getCurrentSrcref());
 
     for (cptr = R_GlobalContext; cptr; cptr = cptr->nextcontext) {
 	if ((cptr->callflag & (CTXT_FUNCTION | CTXT_BUILTIN))
@@ -236,11 +230,74 @@ static void doprof(int sig)  /* sig is ignored in Windows */
 	    SEXP fun = CAR(cptr->call);
 	    if(strlen(buf) < PROFLINEMAX) {
 		strcat(buf, "\"");
-		strcat(buf, TYPEOF(fun) == SYMSXP ? CHAR(PRINTNAME(fun)) :
-			"<Anonymous>");
+
+		char itembuf[PROFITEMMAX];
+
+		if (TYPEOF(fun) == SYMSXP) {
+		    snprintf(itembuf, PROFITEMMAX-1, "%s", CHAR(PRINTNAME(fun)));
+
+		} else if ((CAR(fun) == R_DoubleColonSymbol ||
+			    CAR(fun) == R_TripleColonSymbol ||
+			    CAR(fun) == R_DollarSymbol) &&
+			   TYPEOF(CADR(fun)) == SYMSXP &&
+			   TYPEOF(CADDR(fun)) == SYMSXP) {
+		    /* Function accessed via ::, :::, or $. Both args must be
+		       symbols. It is possible to use strings with these
+		       functions, as in "base"::"list", but that's a very rare
+		       case so we won't bother handling it. */
+		    snprintf(itembuf, PROFITEMMAX-1, "%s%s%s",
+			     CHAR(PRINTNAME(CADR(fun))),
+			     CHAR(PRINTNAME(CAR(fun))),
+			     CHAR(PRINTNAME(CADDR(fun))));
+
+		} else if (CAR(fun) == R_Bracket2Symbol &&
+			   TYPEOF(CADR(fun)) == SYMSXP &&
+			   ((TYPEOF(CADDR(fun)) == SYMSXP ||
+			     TYPEOF(CADDR(fun)) == STRSXP ||
+			     TYPEOF(CADDR(fun)) == INTSXP ||
+			     TYPEOF(CADDR(fun)) == REALSXP) &&
+			    length(CADDR(fun)) > 0)) {
+		    /* Function accessed via [[. The first arg must be a symbol
+		       and the second can be a symbol, string, integer, or
+		       real. */
+		    SEXP arg1 = CADR(fun);
+		    SEXP arg2 = CADDR(fun);
+		    char arg2buf[PROFITEMMAX];
+
+		    if (TYPEOF(arg2) == SYMSXP) {
+			snprintf(arg2buf, PROFITEMMAX-1, "%s", CHAR(PRINTNAME(arg2)));
+
+		    } else if (TYPEOF(arg2) == STRSXP) {
+			snprintf(arg2buf, PROFITEMMAX-1, "\"%s\"", CHAR(STRING_ELT(arg2, 0)));
+
+		    } else if (TYPEOF(arg2) == INTSXP) {
+			snprintf(arg2buf, PROFITEMMAX-1, "%d", INTEGER(arg2)[0]);
+
+		    } else if (TYPEOF(arg2) == REALSXP) {
+			snprintf(arg2buf, PROFITEMMAX-1, "%.0f", REAL(arg2)[0]);
+
+		    } else {
+			/* Shouldn't get here, but just in case. */
+			arg2buf[0] = '\0';
+		    }
+
+		    snprintf(itembuf, PROFITEMMAX-1, "%s[[%s]]",
+			     CHAR(PRINTNAME(arg1)),
+			     arg2buf);
+
+		} else {
+		    sprintf(itembuf, "<Anonymous>");
+		}
+
+		strcat(buf, itembuf);
 		strcat(buf, "\" ");
-		if (R_Line_Profiling)
-		    lineprof(buf, cptr->srcref);
+		if (R_Line_Profiling) {
+		    if (cptr->srcref == R_InBCInterpreter)
+			lineprof(buf,
+				 R_findBCInterpreterSrcref(cptr));
+		    else
+			lineprof(buf, cptr->srcref);
+		}
 	    }
 	}
     }
@@ -445,8 +502,12 @@ static SEXP forcePromise(SEXP e)
 	    if (PRSEEN(e) == 1)
 		errorcall(R_GlobalContext->call,
 			  _("promise already under evaluation: recursive default argument reference or earlier problems?"));
-	    else warningcall(R_GlobalContext->call,
+	    else {
+		/* set PRSEEN to 1 to avoid infinite recursion */
+		SET_PRSEEN(e, 1);
+		warningcall(R_GlobalContext->call,
 			     _("restarting interrupted promise evaluation"));
+	    }
 	}
 	/* Mark the promise as under evaluation and push it on a stack
 	   that can be used to unmark pending promises if a jump out
@@ -465,7 +526,7 @@ static SEXP forcePromise(SEXP e)
 	R_PendingPromises = prstack.next;
 	SET_PRSEEN(e, 0);
 	SET_PRVALUE(e, val);
-        SET_NAMED (val, 2);
+	SET_NAMED (val, 2);
 	SET_PRENV(e, R_NilValue);
     }
     return PRVALUE(e);
@@ -493,7 +554,7 @@ SEXP eval(SEXP e, SEXP rho)
 	evalcount = 0 ;
     }
 
-    /* handle self-evluating objects with minimal overhead */
+    /* handle self-evaluating objects with minimal overhead */
     switch (TYPEOF(e)) {
     case NILSXP:
     case LISTSXP:
@@ -521,6 +582,9 @@ SEXP eval(SEXP e, SEXP rho)
     default: break;
     }
 
+    int bcintactivesave = R_BCIntActive;
+    R_BCIntActive = 0;
+
     if (!rho)
 	error("'rho' cannot be C NULL: detected in C-level eval");
     if (!isEnvironment(rho))
@@ -611,10 +675,17 @@ SEXP eval(SEXP e, SEXP rho)
 	   end up getting duplicated if NAMED = 2.) LT */
 	break;
     case LANGSXP:
-	if (TYPEOF(CAR(e)) == SYMSXP)
+	if (TYPEOF(CAR(e)) == SYMSXP) {
 	    /* This will throw an error if the function is not found */
-	    PROTECT(op = findFun(CAR(e), rho));
-	else
+	    SEXP ecall = e;
+
+	    /* This picks the correct/better error expression for
+	       replacement calls running in the AST interpreter. */
+	    if (R_GlobalContext != NULL &&
+		    (R_GlobalContext->callflag == CTXT_CCODE))
+		ecall = R_GlobalContext->call;
+	    PROTECT(op = findFun3(CAR(e), rho, ecall));
+	} else
 	    PROTECT(op = eval(CAR(e), rho));
 
 	if(RTRACE(op) && R_current_trace_state()) {
@@ -673,7 +744,7 @@ SEXP eval(SEXP e, SEXP rho)
 	}
 	else if (TYPEOF(op) == CLOSXP) {
 	    PROTECT(tmp = promiseArgs(CDR(e), rho));
-	    tmp = applyClosure(e, op, tmp, rho, R_BaseEnv);
+	    tmp = applyClosure(e, op, tmp, rho, R_NilValue);
 	    UNPROTECT(1);
 	}
 	else
@@ -687,6 +758,7 @@ SEXP eval(SEXP e, SEXP rho)
     }
     R_EvalDepth = depthsave;
     R_Srcref = srcrefsave;
+    R_BCIntActive = bcintactivesave;
     return (tmp);
 }
 
@@ -700,8 +772,9 @@ void SrcrefPrompt(const char * prefix, SEXP srcref)
 	if (TYPEOF(srcfile) == ENVSXP) {
 	    SEXP filename = findVar(install("filename"), srcfile);
 	    if (isString(filename) && length(filename)) {
-		Rprintf(_("%s at %s#%d: "), prefix, CHAR(STRING_ELT(filename, 0)),
-					    asInteger(srcref));
+		Rprintf(_("%s at %s#%d: "), prefix,
+			CHAR(STRING_ELT(filename, 0)),
+			asInteger(srcref));
 		return;
 	    }
 	}
@@ -710,7 +783,101 @@ void SrcrefPrompt(const char * prefix, SEXP srcref)
     Rprintf("%s: ", prefix);
 }
 
-/* Apply SEXP op of type CLOSXP to actuals */
+/* JIT support */
+typedef unsigned long R_exprhash_t;
+
+static R_exprhash_t hash(unsigned char *str, int n, R_exprhash_t hash)
+{
+    // djb2 from http://www.cse.yorku.ca/~oz/hash.html
+    // (modified for n-byte lengths)
+
+    int i;
+
+    for(i = 0; i < n; i++)
+        hash = ((hash << 5) + hash) + str[i]; /* hash * 33 + c */
+
+    return hash;
+}
+
+#define HASH(x, h) hash((unsigned char *) &x, sizeof(x), h)
+
+static R_exprhash_t hashexpr1(SEXP e, R_exprhash_t h)
+{
+#define SKIP_NONSCALAR 	if (len != 1) break /* non-scalars hashed by address */
+    int len = length(e);
+    int type = TYPEOF(e);
+    h = HASH(type, h);
+    h = HASH(len, h);
+
+    switch(type) {
+    case LANGSXP:
+    case LISTSXP:
+	/**** safer to only follow while CDR is LANGSXP/LISTSXP */
+	for (; e != R_NilValue; e = CDR(e))
+	    h = hashexpr1(CAR(e), h);
+	return h;
+    case LGLSXP:
+	SKIP_NONSCALAR;
+	for (int i = 0; i < len; i++) {
+	    int ival = LOGICAL(e)[i];
+	    h = HASH(ival, h);
+	}
+	return h;
+    case INTSXP:
+	SKIP_NONSCALAR;
+	for (int i = 0; i < len; i++) {
+	    int ival = INTEGER(e)[i];
+	    h = HASH(ival, h);
+	}
+	return h;
+    case REALSXP:
+	SKIP_NONSCALAR;
+	for (int i = 0; i < len; i++) {
+	    double dval = REAL(e)[i];
+	    h = HASH(dval, h);
+	}
+	return h;
+    case STRSXP:
+	SKIP_NONSCALAR;
+	for (int i = 0; i < len; i++) {
+	    SEXP cval = STRING_ELT(e, i);
+	    h = hash((unsigned char *) CHAR(cval), LENGTH(cval), h);
+	}
+	return h;
+    }
+
+    return HASH(e, h);
+#undef SKIP_NONSCALAR
+}
+
+static R_INLINE SEXP getSrcref(SEXP srcrefs, int ind);
+static R_exprhash_t hashsrcref(SEXP e, R_exprhash_t h)
+{
+    if (TYPEOF(e) == INTSXP && LENGTH(e) >= 6) {
+	for(int i = 0; i < 6; i++) {
+	    int ival = INTEGER(e)[i];
+	    h = HASH(ival, h);
+	}
+	/* FIXME: update this when deep-comparison of srcref is available */
+	SEXP srcfile = getAttrib(e, R_SrcfileSymbol);
+	h = HASH(srcfile, h);
+    }
+    return h;
+}
+#undef HASH
+
+static R_exprhash_t hashexpr(SEXP e)
+{
+    return hashexpr1(e, 5381);
+}
+
+static R_exprhash_t hashfun(SEXP f)
+{
+    R_exprhash_t h = hashexpr(BODY(f));
+    if (getAttrib(BODY(f), R_SrcrefSymbol) == R_NilValue)
+	h = hashsrcref(getAttrib(f, R_SrcrefSymbol), h);
+    return h;
+}
 
 static void loadCompilerNamespace(void)
 {
@@ -723,22 +890,56 @@ static void loadCompilerNamespace(void)
     UNPROTECT(3);
 }
 
-static int R_disable_bytecode = 0;
+static void checkCompilerOptions(int jitEnabled)
+{
+    int old_visible = R_Visible;
+    SEXP packsym, funsym, call, fcall, arg;
+
+    packsym = install("compiler");
+    funsym = install("checkCompilerOptions");
+
+    PROTECT(arg = ScalarInteger(jitEnabled));
+    PROTECT(fcall = lang3(R_TripleColonSymbol, packsym, funsym));
+    PROTECT(call = lang2(fcall, arg));
+    eval(call, R_GlobalEnv);
+    UNPROTECT(3);
+    R_Visible = old_visible;
+}
+
+static SEXP R_IfSymbol = NULL;
+static SEXP R_ForSymbol = NULL;
+static SEXP R_WhileSymbol = NULL;
+static SEXP R_RepeatSymbol = NULL;
+
+#define JIT_CACHE_SIZE 1024
+static SEXP JIT_cache = NULL;
+static R_exprhash_t JIT_cache_hashes[JIT_CACHE_SIZE];
+
+/**** allow MIN_JIT_SCORE, or both, to be changed by environment variables? */
+static int MIN_JIT_SCORE = 50;
+#define LOOP_JIT_SCORE MIN_JIT_SCORE
+
+static struct { unsigned long count, envcount, bdcount; } jit_info = {0, 0, 0};
 
 void attribute_hidden R_init_jit_enabled(void)
 {
-    if (R_jit_enabled <= 0) {
-	char *enable = getenv("R_ENABLE_JIT");
-	if (enable != NULL) {
-	    int val = atoi(enable);
-	    if (val > 0)
-		loadCompilerNamespace();
-	    R_jit_enabled = val;
-	}
+    /* Need to force the lazy loading promise to avoid recursive
+       promise evaluation when JIT is enabled. Might be better to do
+       this in baseloader.R. */
+    eval(install(".ArgsEnv"), R_BaseEnv);
+
+    int val = 3; /* turn JIT on by default */
+    char *enable = getenv("R_ENABLE_JIT");
+    if (enable != NULL)
+	val = atoi(enable);
+    if (val) {
+	loadCompilerNamespace();
+	checkCompilerOptions(val);
     }
+    R_jit_enabled = val;
 
     if (R_compile_pkgs <= 0) {
-	char *compile = getenv("R_COMPILE_PKGS");
+	char *compile = getenv("_R_COMPILE_PKGS_");
 	if (compile != NULL) {
 	    int val = atoi(compile);
 	    if (val > 0)
@@ -758,10 +959,341 @@ void attribute_hidden R_init_jit_enabled(void)
 		R_disable_bytecode = FALSE;
 	}
     }
+
+    /* -1 ... duplicate constants on LDCONST and PUSHCONSTARG, no checking
+        0 ... no checking (no duplication for >= 0) [DEFAULT]
+	1 ... check at error, session exit and reclamation
+	2 ... check also at full GC
+	3 ... check also at partial GC
+	4 ... check also at .Call
+	5 ... (very) verbose report on modified constants
+    */
+    if (R_check_constants <= 1) {
+	char *check = getenv("R_CHECK_CONSTANTS");
+	if (check != NULL)
+	    R_check_constants = atoi(check);
+    }
+
+    /* initialize JIT variables */
+    R_IfSymbol = install("if");
+    R_ForSymbol = install("for");
+    R_WhileSymbol = install("while");
+    R_RepeatSymbol = install("repeat");
+
+    R_PreserveObject(JIT_cache = allocVector(VECSXP, JIT_CACHE_SIZE));
+}
+
+static int JIT_score(SEXP e)
+{
+    if (TYPEOF(e) == LANGSXP) {
+	SEXP fun = CAR(e);
+	if (fun == R_IfSymbol) {
+	    int cons = JIT_score(CADR(e));
+	    int alt =  JIT_score(CADDR(e));
+	    return cons > alt ? cons : alt;
+	}
+	else if (fun == R_ForSymbol ||
+		 fun == R_WhileSymbol ||
+		 fun == R_RepeatSymbol)
+	    return LOOP_JIT_SCORE;
+	else {
+	    int score = 1;
+	    for (SEXP args = CDR(e); args != R_NilValue; args = CDR(args))
+		score += JIT_score(CAR(args));
+	    return score;
+	}
+    }
+    else return 1;
 }
 
-SEXP attribute_hidden R_cmpfun(SEXP fun)
+#define STRATEGY_NO_SMALL 0
+#define STRATEGY_TOP_SMALL_MAYBE 1
+#define STRATEGY_ALL_SMALL_MAYBE 2
+#define STRATEGY_NO_SCORE 3
+#define STRATEGY_NO_CACHE 4
+/* max strategy index is hardcoded in R_CheckJIT */
+
+/*
+  NO_CACHE
+      functions are compiled 1st time seen
+        code is never cached
+
+  NO_SCORE
+      functions are compiled 1st time seen
+        code is cached
+	in case of conflict function may be marked NOJIT
+
+  ALL_SMALL_MAYBE
+      functions with small score are compiled 2nd time seen
+      function with high score are compiled
+          1st time seen if top-level, 2nd time seen otherwise
+
+  TOP_SMALL_MAYBE
+      functions with small score compiled
+          2nd time seen if top-level, never otherwise
+      functions with high score compiled
+          1st time seen if top-level, 2nd time seen otherwise
+*/
+
+static int jit_strategy = -1;
+
+static R_INLINE Rboolean R_CheckJIT(SEXP fun)
+{
+    /* to help with testing */
+    if (jit_strategy < 0) {
+	int dflt = R_jit_enabled == 1 ?
+	    STRATEGY_NO_SMALL : STRATEGY_TOP_SMALL_MAYBE;
+	int val = dflt;
+	char *valstr = getenv("R_JIT_STRATEGY");
+	if (valstr != NULL)
+	    val = atoi(valstr);
+	if (val < 0 || val > 4)
+	    jit_strategy = dflt;
+	else
+	    jit_strategy = val;
+
+	valstr = getenv("R_MIN_JIT_SCORE");
+	if (valstr != NULL)
+	    MIN_JIT_SCORE = atoi(valstr);
+    }
+
+    SEXP body = BODY(fun);
+
+    if (R_jit_enabled > 0 && TYPEOF(body) != BCODESXP &&
+	! R_disable_bytecode && ! NOJIT(fun)) {
+
+	if (MAYBEJIT(fun)) {
+	    /* function marked as MAYBEJIT the first time now seen
+	       twice, so go ahead and compile */
+	    UNSET_MAYBEJIT(fun);
+	    return TRUE;
+	}
+
+	if (jit_strategy == STRATEGY_NO_SCORE ||
+	    jit_strategy == STRATEGY_NO_CACHE)
+	    return TRUE;
+
+	int score = JIT_score(body);
+	if (jit_strategy == STRATEGY_ALL_SMALL_MAYBE)
+	    if (score < MIN_JIT_SCORE) { SET_MAYBEJIT(fun); return FALSE; }
+
+	if (CLOENV(fun) == R_GlobalEnv) {
+	    /* top level functions are only compiled if score is high enough */
+	    if (score < MIN_JIT_SCORE) {
+		if (jit_strategy == STRATEGY_TOP_SMALL_MAYBE)
+		    SET_MAYBEJIT(fun);
+		else
+		    SET_NOJIT(fun);
+		return FALSE;
+	    }
+	    else return TRUE;
+	}
+	else {
+	    /* only compile non-top-level function if score is high
+	       enough and seen twice */
+	    if (score < MIN_JIT_SCORE) {
+		SET_NOJIT(fun);
+		return FALSE;
+	    }
+	    else {
+		SET_MAYBEJIT(fun);
+		return FALSE;
+	    }
+	}
+    }
+    return FALSE;
+}
+
+#ifdef DEBUG_JIT
+# define PRINT_JIT_INFO							\
+    REprintf("JIT cache hits: %ld; env: %ld; body %ld\n",		\
+	     jit_info.count, jit_info.envcount, jit_info.bdcount)
+#else
+# define PRINT_JIT_INFO	do { } while(0)
+#endif
+
+SEXP topenv(SEXP, SEXP); /**** should be in a header file */
+
+/* FIXME: this should not depend on internals from envir.c but does for now. */
+/* copied from envir.c for now */
+#define IS_USER_DATABASE(rho)  (OBJECT((rho)) && inherits((rho), "UserDefinedDatabase"))
+#define IS_STANDARD_UNHASHED_FRAME(e) (! IS_USER_DATABASE(e) && HASHTAB(e) == R_NilValue)
+#define IS_STANDARD_HASHED_FRAME(e) (! IS_USER_DATABASE(e) && HASHTAB(e) != R_NilValue)
+
+/* This makes a snapshot of the local variables in cmpenv and creates
+   a new environment with the same top level environment and bindings
+   with value R_NilValue for the local variables. This guards against
+   the cmpenv changing after being entered in the cache, and also
+   allows large values that might be bound to local variables in
+   cmpenv to be reclaimed (also, some package tests, e.g. in shiny, test
+   when things get reclaimed). Standard local frames are processed directly,
+   hashed frames are processed via lsInternal3, which involves extra
+   allocations, but should be used rarely. If a local environment is
+   of unsupported type, topenv is returned as a valid conservative
+   answer.
+
+   Since we compute the local variables at compile
+   time we should record them in the byte code object and use the
+   recorded value. */
+static R_INLINE void cmpenv_enter_frame(SEXP frame, SEXP newenv)
+{
+    for (; frame != R_NilValue; frame = CDR(frame))
+	defineVar(TAG(frame), R_NilValue, newenv);
+}
+
+static R_INLINE SEXP make_cached_cmpenv(SEXP fun)
+{
+    SEXP frmls = FORMALS(fun);
+    SEXP cmpenv = CLOENV(fun);
+    SEXP top = topenv(R_NilValue, cmpenv);
+    if (cmpenv == top && frmls == R_NilValue)
+	return cmpenv;
+    else {
+	SEXP newenv = PROTECT(NewEnvironment(R_NilValue, R_NilValue, top));
+	for (; frmls != R_NilValue; frmls = CDR(frmls))
+	    defineVar(TAG(frmls), R_NilValue, newenv);
+	for (SEXP env = cmpenv; env != top; env = CDR(env)) {
+	    if (IS_STANDARD_UNHASHED_FRAME(env))
+		cmpenv_enter_frame(FRAME(env), newenv);
+	    else if (IS_STANDARD_HASHED_FRAME(env)) {
+		SEXP h = HASHTAB(env);
+		int n = length(h);
+		for (int i = 0; i < n; i++)
+		    cmpenv_enter_frame(VECTOR_ELT(h, i), newenv);
+	    } else {
+		UNPROTECT(1); /* newenv */
+		return top;
+	    }
+		/* topenv is a safe conservative answer; if a closure
+		   defines anything, its environment will not match, and
+		   it will never be compiled */
+		/* FIXME: would it be safe to simply ignore elements of
+		   of these environments? */
+	}
+	UNPROTECT(1); /* newenv */
+	return newenv;
+    }
+}
+
+/* Cache entries are CONS cells with the body in CAR, the environment
+   in CDR, and the Srcref in the TAG. */
+static R_INLINE void set_jit_cache_entry(R_exprhash_t hash, SEXP val)
+{
+    int hashidx = hash % JIT_CACHE_SIZE;
+
+    PROTECT(val);
+    SEXP entry = CONS(BODY(val), make_cached_cmpenv(val));
+    SET_VECTOR_ELT(JIT_cache, hashidx, entry);
+    SET_TAG(entry, getAttrib(val, R_SrcrefSymbol));
+    UNPROTECT(1); /* val */
+
+    JIT_cache_hashes[hashidx] = hash;
+}
+
+static R_INLINE SEXP jit_cache_code(SEXP entry)
+{
+    return CAR(entry);
+}
+
+static R_INLINE SEXP jit_cache_env(SEXP entry)
+{
+    return CDR(entry);
+}
+
+static R_INLINE SEXP jit_cache_srcref(SEXP entry)
+{
+    return TAG(entry);
+}
+
+/* forward declaration */
+static SEXP bytecodeExpr(SEXP);
+
+static R_INLINE SEXP jit_cache_expr(SEXP entry)
+{
+    return bytecodeExpr(jit_cache_code(entry));
+}
+
+static R_INLINE SEXP get_jit_cache_entry(R_exprhash_t hash)
+{
+    int hashidx = hash % JIT_CACHE_SIZE;
+    if (JIT_cache_hashes[hashidx] == hash) {
+	SEXP entry = VECTOR_ELT(JIT_cache, hashidx);
+	if (TYPEOF(jit_cache_code(entry)) == BCODESXP)
+	    return entry;
+	else
+	    /* function has been de-compiled; clear the cache entry */
+	    SET_VECTOR_ELT(JIT_cache, hashidx, R_NilValue);
+    }
+    return R_NilValue;
+}
+
+static R_INLINE Rboolean jit_expr_match(SEXP expr, SEXP body)
+{
+    /*** is 16 right here??? does this need to be faster??? */
+    return R_compute_identical(expr, body, 16);
+}
+
+static R_INLINE SEXP cmpenv_topenv(SEXP cmpenv)
+{
+    return topenv(R_NilValue, cmpenv);
+}
+
+static R_INLINE Rboolean cmpenv_exists_local(SEXP sym, SEXP cmpenv, SEXP top)
+{
+    if (cmpenv != top)
+	for (SEXP frame = FRAME(cmpenv);
+	     frame != R_NilValue;
+	     frame = CDR(frame))
+	    if (TAG(frame) == sym)
+		return TRUE;
+    return FALSE;
+}
+
+static R_INLINE Rboolean jit_env_match(SEXP cmpenv, SEXP fun)
+{
+    /* Can code compiled for environment cmpenv be used as compiled
+       code for environment env?  These tests rely on the assumption
+       that compilation is only affected by what variables are bound,
+       not their values. So as long as both cmpenv and env have the
+       same top level environment and all local bindings present in
+       the formals and environment of fun are also present in cmpenv
+       the code for cmpenv can be reused, though it might be less
+       efficient if a binding in cmpenv prevents an optimization that
+       would be possible in env. */
+
+    SEXP env = CLOENV(fun);
+    SEXP top = topenv(R_NilValue, env);
+
+    if (top == cmpenv_topenv(cmpenv)) {
+	for (SEXP frmls = FORMALS(fun); frmls != R_NilValue; frmls = CDR(frmls))
+	    if (! cmpenv_exists_local(TAG(frmls), cmpenv, top))
+		return FALSE;
+	for (; env != top; env = ENCLOS(env)) {
+	    if (IS_STANDARD_UNHASHED_FRAME(env)) {
+		/* To keep things simple, for a match this code
+		   requires that the local frames be standard unhashed
+		   frames. */
+		for (SEXP frame = FRAME(env);
+		     frame != R_NilValue;
+		     frame = CDR(frame))
+		    if (! cmpenv_exists_local(TAG(frame), cmpenv, top))
+			return FALSE;
+	    }
+	    else return FALSE;
+	}
+	return TRUE;
+    }
+    else return FALSE;
+}
+
+static R_INLINE Rboolean jit_srcref_match(SEXP cmpsrcref, SEXP srcref)
+{
+    return R_compute_identical(cmpsrcref, srcref, 0);
+}
+
+SEXP attribute_hidden R_cmpfun1(SEXP fun)
 {
+    int old_visible = R_Visible;
     SEXP packsym, funsym, call, fcall, val;
 
     packsym = install("compiler");
@@ -771,30 +1303,94 @@ SEXP attribute_hidden R_cmpfun(SEXP fun)
     PROTECT(call = lang2(fcall, fun));
     val = eval(call, R_GlobalEnv);
     UNPROTECT(2);
+
+    R_Visible = old_visible;
+    return val;
+}
+
+SEXP attribute_hidden R_cmpfun(SEXP fun)
+{
+    R_exprhash_t hash = 0;
+    if (jit_strategy != STRATEGY_NO_CACHE) {
+	hash = hashfun(fun);
+	SEXP entry = get_jit_cache_entry(hash);
+
+	if (entry != R_NilValue) {
+	    jit_info.count++;
+	    if (jit_env_match(jit_cache_env(entry), fun)) {
+		jit_info.envcount++;
+		if (jit_expr_match(jit_cache_expr(entry), BODY(fun))) {
+		    jit_info.bdcount++;
+		    /* if function body has a srcref, all srcrefs compiled
+		       in that function only depend on the body srcref;
+		       but, otherwise the srcrefs compiled in are taken
+		       from the function (op) */
+		    if (getAttrib(BODY(fun), R_SrcrefSymbol) != R_NilValue ||
+			jit_srcref_match(jit_cache_srcref(entry),
+					 getAttrib(fun, R_SrcrefSymbol))) {
+			PRINT_JIT_INFO;
+			SET_BODY(fun, jit_cache_code(entry));
+			/**** reset the cache here?*/
+			return fun;
+		    }
+		}
+		/* The functions probably differ only in source references
+		   (for functions with bodies that have no source references
+		   we know for sure, for other functions we speculate).
+		   Therefore, we allow re-compilation and re-caching. This
+		   situation may be caused e.g. by re-sourcing the same source
+		   file or re-pasting the same definitions for a function in
+		   interactive R session. Note srcref information includes
+		   environments (srcfile), which are now compared by address,
+		   so it may be we actually have logically identical source
+		   references, anyway. */
+		/* FIXME: revisit this when deep comparison of environments
+			  (and srcrefs) is available */
+	    } else {
+		SET_NOJIT(fun);
+		/**** also mark the cache entry as NOJIT, or as need to see
+		      many times? */
+		return fun;
+	    }
+	}
+	PRINT_JIT_INFO;
+    }
+
+    SEXP val = R_cmpfun1(fun);
+
+    if (TYPEOF(BODY(val)) != BCODESXP)
+	SET_NOJIT(fun);
+    else if (jit_strategy != STRATEGY_NO_CACHE)
+	set_jit_cache_entry(hash, val); /* val is protected by callee */
+
     return val;
 }
 
 static SEXP R_compileExpr(SEXP expr, SEXP rho)
 {
+    int old_visible = R_Visible;
     SEXP packsym, funsym, quotesym;
     SEXP qexpr, call, fcall, val;
 
     packsym = install("compiler");
-    funsym = install("compile");
+    funsym = install("tryCompile");
     quotesym = install("quote");
 
-    PROTECT(fcall = lang3(R_DoubleColonSymbol, packsym, funsym));
+    PROTECT(fcall = lang3(R_TripleColonSymbol, packsym, funsym));
     PROTECT(qexpr = lang2(quotesym, expr));
-    PROTECT(call = lang3(fcall, qexpr, rho));
+    /* compile(e, env, options, srcref) */
+    PROTECT(call = lang5(fcall, qexpr, rho, R_NilValue, R_getCurrentSrcref()));
     val = eval(call, R_GlobalEnv);
     UNPROTECT(3);
+    R_Visible = old_visible;
     return val;
 }
 
-static SEXP R_compileAndExecute(SEXP call, SEXP rho)
+static Rboolean R_compileAndExecute(SEXP call, SEXP rho)
 {
     int old_enabled = R_jit_enabled;
-    SEXP code, val;
+    SEXP code;
+    Rboolean ans = FALSE;
 
     R_jit_enabled = 0;
     PROTECT(call);
@@ -802,9 +1398,13 @@ static SEXP R_compileAndExecute(SEXP call, SEXP rho)
     PROTECT(code = R_compileExpr(call, rho));
     R_jit_enabled = old_enabled;
 
-    val = bcEval(code, rho, TRUE);
+    if (TYPEOF(code) == BCODESXP) {
+	bcEval(code, rho, TRUE);
+	ans = TRUE;
+    }
+
     UNPROTECT(3);
-    return val;
+    return ans;
 }
 
 SEXP attribute_hidden do_enablejit(SEXP call, SEXP op, SEXP args, SEXP rho)
@@ -812,9 +1412,13 @@ SEXP attribute_hidden do_enablejit(SEXP call, SEXP op, SEXP args, SEXP rho)
     int old = R_jit_enabled, new;
     checkArity(op, args);
     new = asInteger(CAR(args));
-    if (new > 0)
-	loadCompilerNamespace();
-    R_jit_enabled = new;
+    if (new >= 0) {
+	if (new > 0)
+	    loadCompilerNamespace();
+	checkCompilerOptions(new);
+	R_jit_enabled = new;
+    }
+    /* negative 'new' just returns 'old' */
     return ScalarInteger(old);
 }
 
@@ -829,9 +1433,6 @@ SEXP attribute_hidden do_compilepkgs(SEXP call, SEXP op, SEXP args, SEXP rho)
     return ScalarLogical(old);
 }
 
-/* forward declaration */
-static SEXP bytecodeExpr(SEXP);
-
 /* this function gets the srcref attribute from a statement block,
    and confirms it's in the expected format */
 
@@ -858,12 +1459,26 @@ static R_INLINE SEXP getSrcref(SEXP srcrefs, int ind)
 	return R_NilValue;
 }
 
-SEXP applyClosure(SEXP call, SEXP op, SEXP arglist, SEXP rho, SEXP suppliedenv)
+/* There's another copy of this in main.c */
+static void PrintCall(SEXP call, SEXP rho)
 {
-    SEXP formals, actuals, savedrho;
-    volatile SEXP body, newrho;
-    SEXP f, a, tmp;
-    RCNTXT cntxt;
+    int old_bl = R_BrowseLines,
+        blines = asInteger(GetOption1(install("deparse.max.lines")));
+    if(blines != NA_INTEGER && blines > 0)
+	R_BrowseLines = blines;
+    PrintValueRec(call, rho);
+    R_BrowseLines = old_bl;
+}
+
+/* Note: GCC will not inline execClosure because it calls setjmp */
+static R_INLINE SEXP R_execClosure(SEXP call, SEXP newrho, SEXP sysparent,
+                                   SEXP rho, SEXP arglist, SEXP op);
+
+/* Apply SEXP op of type CLOSXP to actuals */
+SEXP applyClosure(SEXP call, SEXP op, SEXP arglist, SEXP rho, SEXP suppliedvars)
+{
+    SEXP formals, actuals, savedrho, newrho;
+    SEXP f, a;
 
     /* formals = list of formal parameters */
     /* actuals = values to be bound to formals */
@@ -879,29 +1494,14 @@ SEXP applyClosure(SEXP call, SEXP op, SEXP arglist, SEXP rho, SEXP suppliedenv)
 		  type2char(TYPEOF(rho)));
 
     formals = FORMALS(op);
-    body = BODY(op);
     savedrho = CLOENV(op);
 
-    if (R_jit_enabled > 0 && TYPEOF(body) != BCODESXP) {
-	int old_enabled = R_jit_enabled;
-	SEXP newop;
-	R_jit_enabled = 0;
-	newop = R_cmpfun(op);
-	body = BODY(newop);
-	SET_BODY(op, body);
-	R_jit_enabled = old_enabled;
-    }
-
-    /*  Set up a context with the call in it so error has access to it */
-
-    begincontext(&cntxt, CTXT_RETURN, call, savedrho, rho, arglist, op);
-
     /*  Build a list which matches the actual (unevaluated) arguments
 	to the formal paramters.  Build a new environment which
 	contains the matched pairs.  Ideally this environment sould be
 	hashed.  */
 
-    PROTECT(actuals = matchArgs(formals, arglist, call));
+    actuals = matchArgs(formals, arglist, call);
     PROTECT(newrho = NewEnvironment(formals, actuals, savedrho));
 
     /* Turn on reference counting for the binding cells so local
@@ -932,223 +1532,169 @@ SEXP applyClosure(SEXP call, SEXP op, SEXP arglist, SEXP rho, SEXP suppliedenv)
 	a = CDR(a);
     }
 
-    if (R_envHasNoSpecialSymbols(newrho))
-	SET_NO_SPECIAL_SYMBOLS(newrho);
-
     /*  Fix up any extras that were supplied by usemethod. */
 
-    if (suppliedenv != R_NilValue) {
-	for (tmp = FRAME(suppliedenv); tmp != R_NilValue; tmp = CDR(tmp)) {
-	    for (a = actuals; a != R_NilValue; a = CDR(a))
-		if (TAG(a) == TAG(tmp))
-		    break;
-	    if (a == R_NilValue)
-		/* Use defineVar instead of earlier version that added
-		   bindings manually */
-		defineVar(TAG(tmp), CAR(tmp), newrho);
-	}
-    }
+    if (suppliedvars != R_NilValue)
+	addMissingVarsToNewEnv(newrho, suppliedvars);
 
-    /*  Terminate the previous context and start a new one with the
-	correct environment. */
+    if (R_envHasNoSpecialSymbols(newrho))
+	SET_NO_SPECIAL_SYMBOLS(newrho);
 
-    endcontext(&cntxt);
+    UNPROTECT(1); /* newrho - below protected via context */
 
     /*  If we have a generic function we need to use the sysparent of
 	the generic as the sysparent of the method because the method
 	is a straight substitution of the generic.  */
 
-    if( R_GlobalContext->callflag == CTXT_GENERIC )
-	begincontext(&cntxt, CTXT_RETURN, call,
-		     newrho, R_GlobalContext->sysparent, arglist, op);
-    else
-	begincontext(&cntxt, CTXT_RETURN, call, newrho, rho, arglist, op);
+    return R_execClosure(call, newrho,
+	                 (R_GlobalContext->callflag == CTXT_GENERIC) ?
+	                     R_GlobalContext->sysparent : rho,
+	                 rho, arglist, op);
+}
+
+static R_INLINE SEXP R_execClosure(SEXP call, SEXP newrho, SEXP sysparent,
+                                   SEXP rho, SEXP arglist, SEXP op)
+{
+    volatile SEXP body;
+    RCNTXT cntxt;
+    Rboolean dbg = FALSE;
 
-    /* Get the srcref record from the closure object */
+    begincontext(&cntxt, CTXT_RETURN, call, newrho, sysparent, arglist, op);
 
-    R_Srcref = getAttrib(op, R_SrcrefSymbol);
+    body = BODY(op);
+    if (R_CheckJIT(op)) {
+	int old_enabled = R_jit_enabled;
+	SEXP newop;
+	R_jit_enabled = 0;
+	newop = R_cmpfun(op);
+	body = BODY(newop);
+	SET_BODY(op, body);
+	R_jit_enabled = old_enabled;
+    }
 
-    /* The default return value is NULL.  FIXME: Is this really needed
-       or do we always get a sensible value returned?  */
+    /* Get the srcref record from the closure object. The old srcref was
+       saved in cntxt. */
 
-    tmp = R_NilValue;
+    R_Srcref = getAttrib(op, R_SrcrefSymbol);
 
     /* Debugging */
 
-    SET_RDEBUG(newrho, RDEBUG(op) || RSTEP(op)
-		     || (RDEBUG(rho) && R_BrowserLastCommand == 's')) ;
-    if( RSTEP(op) ) SET_RSTEP(op, 0);
-    if (RDEBUG(newrho)) {
-	int old_bl = R_BrowseLines,
-	    blines = asInteger(GetOption1(install("deparse.max.lines")));
-	SEXP savesrcref;
+    if ((RDEBUG(op) && R_current_debug_state()) || RSTEP(op)
+         || (RDEBUG(rho) && R_BrowserLastCommand == 's')) {
+
+	dbg = TRUE;
+	SET_RSTEP(op, 0);
+	SET_RDEBUG(newrho, 1);
 	cntxt.browserfinish = 0; /* Don't want to inherit the "f" */
 	/* switch to interpreted version when debugging compiled code */
 	if (TYPEOF(body) == BCODESXP)
 	    body = bytecodeExpr(body);
 	Rprintf("debugging in: ");
-	if(blines != NA_INTEGER && blines > 0)
-	    R_BrowseLines = blines;
-	PrintValueRec(call, rho);
-	R_BrowseLines = old_bl;
-
-	/* Is the body a bare symbol (PR#6804) */
-	if (!isSymbol(body) & !isVectorAtomic(body)){
-		/* Find out if the body is function with only one statement. */
-		if (isSymbol(CAR(body)))
-			tmp = findFun(CAR(body), rho);
-		else
-			tmp = eval(CAR(body), rho);
-	}
-	savesrcref = R_Srcref;
-	PROTECT(R_Srcref = getSrcref(getBlockSrcrefs(body), 0));
+	PrintCall(call, rho);
 	SrcrefPrompt("debug", R_Srcref);
 	PrintValue(body);
 	do_browser(call, op, R_NilValue, newrho);
-	R_Srcref = savesrcref;
-	UNPROTECT(1);
-    }
-
-    /*  It isn't completely clear that this is the right place to do
-	this, but maybe (if the matchArgs above reverses the
-	arguments) it might just be perfect.
-
-	This will not currently work as the entry points in envir.c
-	are static.
-    */
-
-#ifdef  HASHING
-    {
-	SEXP R_NewHashTable(int);
-	SEXP R_HashFrame(SEXP);
-	int nargs = length(arglist);
-	HASHTAB(newrho) = R_NewHashTable(nargs);
-	newrho = R_HashFrame(newrho);
     }
-#endif
-#undef  HASHING
 
     /*  Set a longjmp target which will catch any explicit returns
 	from the function body.  */
 
     if ((SETJMP(cntxt.cjmpbuf))) {
-	if (R_ReturnedValue == R_RestartToken) {
+	if (! cntxt.jumptarget /* ignores intermediate jumps for on.exits */
+	    && R_ReturnedValue == R_RestartToken) {
 	    cntxt.callflag = CTXT_RETURN;  /* turn restart off */
 	    R_ReturnedValue = R_NilValue;  /* remove restart token */
-	    PROTECT(tmp = eval(body, newrho));
+	    cntxt.returnValue = eval(body, newrho);
 	}
 	else
-	    PROTECT(tmp = R_ReturnedValue);
-    }
-    else {
-	PROTECT(tmp = eval(body, newrho));
+	    cntxt.returnValue = R_ReturnedValue;
     }
+    else
+	/* make it available to on.exit and implicitly protect */
+	cntxt.returnValue = eval(body, newrho);
 
+    R_Srcref = cntxt.srcref;
     endcontext(&cntxt);
 
-    if (RDEBUG(op)) {
+    if (dbg) {
 	Rprintf("exiting from: ");
-	PrintValueRec(call, rho);
+	PrintCall(call, rho);
     }
-    UNPROTECT(3);
-    return (tmp);
+    return cntxt.returnValue;
 }
 
-/* **** FIXME: This code is factored out of applyClosure.  If we keep
-   **** it we should change applyClosure to run through this routine
-   **** to avoid code drift. */
-static SEXP R_execClosure(SEXP call, SEXP op, SEXP arglist, SEXP rho,
-			  SEXP newrho)
+SEXP R_forceAndCall(SEXP e, int n, SEXP rho)
 {
-    volatile SEXP body;
-    SEXP tmp;
-    RCNTXT cntxt;
-
-    body = BODY(op);
+    SEXP fun, tmp;
+    if (TYPEOF(CAR(e)) == SYMSXP)
+	/* This will throw an error if the function is not found */
+	PROTECT(fun = findFun(CAR(e), rho));
+    else
+	PROTECT(fun = eval(CAR(e), rho));
 
-    if (R_jit_enabled > 0 && TYPEOF(body) != BCODESXP) {
-	int old_enabled = R_jit_enabled;
-	SEXP newop;
-	R_jit_enabled = 0;
-	newop = R_cmpfun(op);
-	body = BODY(newop);
-	SET_BODY(op, body);
-	R_jit_enabled = old_enabled;
-    }
-
-    begincontext(&cntxt, CTXT_RETURN, call, newrho, rho, arglist, op);
-
-    /* The default return value is NULL.  FIXME: Is this really needed
-       or do we always get a sensible value returned?  */
-
-    tmp = R_NilValue;
-
-    /* Debugging */
-
-    SET_RDEBUG(newrho, RDEBUG(op) || RSTEP(op)
-		     || (RDEBUG(rho) && R_BrowserLastCommand == 's')) ;
-    if( RSTEP(op) ) SET_RSTEP(op, 0);
-    if (RDEBUG(op)) {
-	SEXP savesrcref;
-	/* switch to interpreted version when debugging compiled code */
-	if (TYPEOF(body) == BCODESXP)
-	    body = bytecodeExpr(body);
-	Rprintf("debugging in: ");
-	PrintValueRec(call,rho);
-	/* Find out if the body is function with only one statement. */
-	if (isSymbol(CAR(body)))
-	    tmp = findFun(CAR(body), rho);
-	else
-	    tmp = eval(CAR(body), rho);
-	savesrcref = R_Srcref;
-	PROTECT(R_Srcref = getSrcref(getBlockSrcrefs(body), 0));
-	SrcrefPrompt("debug", R_Srcref);
-	PrintValue(body);
-	do_browser(call, op, R_NilValue, newrho);
-	R_Srcref = savesrcref;
+    if (TYPEOF(fun) == SPECIALSXP) {
+	int flag = PRIMPRINT(fun);
+	PROTECT(CDR(e));
+	R_Visible = flag != 1;
+	tmp = PRIMFUN(fun) (e, fun, CDR(e), rho);
+	if (flag < 2) R_Visible = flag != 1;
 	UNPROTECT(1);
     }
-
-    /*  It isn't completely clear that this is the right place to do
-	this, but maybe (if the matchArgs above reverses the
-	arguments) it might just be perfect.  */
-
-#ifdef  HASHING
-#define HASHTABLEGROWTHRATE  1.2
-    {
-	SEXP R_NewHashTable(int, double);
-	SEXP R_HashFrame(SEXP);
-	int nargs = length(arglist);
-	HASHTAB(newrho) = R_NewHashTable(nargs, HASHTABLEGROWTHRATE);
-	newrho = R_HashFrame(newrho);
+    else if (TYPEOF(fun) == BUILTINSXP) {
+	int flag = PRIMPRINT(fun);
+	PROTECT(tmp = evalList(CDR(e), rho, e, 0));
+	if (flag < 2) R_Visible = flag != 1;
+	/* We used to insert a context only if profiling,
+	   but helps for tracebacks on .C etc. */
+	if (R_Profiling || (PPINFO(fun).kind == PP_FOREIGN)) {
+	    RCNTXT cntxt;
+	    SEXP oldref = R_Srcref;
+	    begincontext(&cntxt, CTXT_BUILTIN, e,
+			 R_BaseEnv, R_BaseEnv, R_NilValue, R_NilValue);
+	    R_Srcref = NULL;
+	    tmp = PRIMFUN(fun) (e, fun, tmp, rho);
+	    R_Srcref = oldref;
+	    endcontext(&cntxt);
+	} else {
+	    tmp = PRIMFUN(fun) (e, fun, tmp, rho);
+	}
+	if (flag < 2) R_Visible = flag != 1;
+	UNPROTECT(1);
     }
-#endif
-#undef  HASHING
-
-    /*  Set a longjmp target which will catch any explicit returns
-	from the function body.  */
-
-    if ((SETJMP(cntxt.cjmpbuf))) {
-	if (R_ReturnedValue == R_RestartToken) {
-	    cntxt.callflag = CTXT_RETURN;  /* turn restart off */
-	    R_ReturnedValue = R_NilValue;  /* remove restart token */
-	    PROTECT(tmp = eval(body, newrho));
+    else if (TYPEOF(fun) == CLOSXP) {
+	PROTECT(tmp = promiseArgs(CDR(e), rho));
+	SEXP a;
+	int i;
+	for (a = tmp, i = 0; i < n && a != R_NilValue; a = CDR(a), i++) {
+	    SEXP p = CAR(a);
+	    if (TYPEOF(p) == PROMSXP)
+		eval(p, rho);
+	    else if (p == R_MissingArg)
+		errorcall(e, _("argument %d is empty"), i + 1);
+	    else error("something weird happened");
 	}
-	else
-	    PROTECT(tmp = R_ReturnedValue);
+	tmp = applyClosure(e, fun, tmp, rho, R_NilValue);
+	UNPROTECT(1);
     }
     else {
-	PROTECT(tmp = eval(body, newrho));
+	tmp = R_NilValue; /* -Wall */
+	error(_("attempt to apply non-function"));
     }
 
-    endcontext(&cntxt);
+    UNPROTECT(1);
+    return tmp;
+}
 
-    if (RDEBUG(op)) {
-	Rprintf("exiting from: ");
-	PrintValueRec(call, rho);
-    }
+SEXP attribute_hidden do_forceAndCall(SEXP call, SEXP op, SEXP args, SEXP rho)
+{
+    int n = asInteger(eval(CADR(call), rho));
+    SEXP e = CDDR(call);
+
+    /* this would not be needed if CDDR(call) was a LANGSXP */
+    PROTECT(e = LCONS(CAR(e), CDR(e)));
+    SEXP val = R_forceAndCall(e, n, rho);
     UNPROTECT(1);
-    return (tmp);
+    return val;
 }
 
 /* **** FIXME: Temporary code to execute S4 methods in a way that
@@ -1175,7 +1721,7 @@ SEXP R_execMethod(SEXP op, SEXP rho)
 	R_varloc_t loc;
 	int missing;
 	loc = R_findVarLocInFrame(rho,symbol);
-	if(loc == NULL)
+	if(R_VARLOC_IS_NULL(loc))
 	    error(_("could not find symbol \"%s\" in environment of the generic function"),
 		  CHAR(PRINTNAME(symbol)));
 	missing = R_GetVarLocMISSING(loc);
@@ -1227,7 +1773,7 @@ SEXP R_execMethod(SEXP op, SEXP rho)
        execute the method, and return the result */
     call = cptr->call;
     arglist = cptr->promargs;
-    val = R_execClosure(call, op, arglist, callerenv, newrho);
+    val = R_execClosure(call, newrho, callerenv, callerenv, arglist, op);
     UNPROTECT(1);
     return val;
 }
@@ -1263,7 +1809,7 @@ static SEXP EnsureLocal(SEXP symbol, SEXP rho)
 /* to prevent evaluation.  As an example consider */
 /* e <- quote(f(x=1,y=2); names(e) <- c("","a","b") */
 
-static SEXP R_valueSym = NULL; /* initialized in R_initAsignSymbols below */
+static SEXP R_valueSym = NULL; /* initialized in R_initAssignSymbols below */
 
 static SEXP replaceCall(SEXP fun, SEXP val, SEXP args, SEXP rhs)
 {
@@ -1305,8 +1851,12 @@ static R_INLINE Rboolean asLogicalNoNA(SEXP s, SEXP call)
     Rboolean cond = NA_LOGICAL;
 
     if (length(s) > 1) {
-    	PROTECT(s);	 /* needed as per PR#15990.  call gets protected by warningcall() */
-	warningcall(call,
+	PROTECT(s);	 /* needed as per PR#15990.  call gets protected by warningcall() */
+	char *check = getenv("_R_CHECK_LENGTH_1_CONDITION_");
+	if((check != NULL) ? StringTrue(check) : FALSE) // warn by default
+	    errorcall(call, _("the condition has length > 1"));
+        else
+	    warningcall(call,
 		    _("the condition has length > 1 and only the first element will be used"));
 	UNPROTECT(1);
     }
@@ -1361,9 +1911,9 @@ SEXP attribute_hidden do_if(SEXP call, SEXP op, SEXP args, SEXP rho)
 	Stmt = CAR(CDR(args));
     else {
 	if (length(args) > 2)
-	   Stmt = CAR(CDR(CDR(args)));
+	    Stmt = CAR(CDR(CDR(args)));
 	else
-	   vis = 1;
+	    vis = 1;
     }
     if( !vis && RDEBUG(rho) && !BodyHasBraces(Stmt) && !R_GlobalContext->browserfinish) {
 	SrcrefPrompt("debug", R_Srcref);
@@ -1383,8 +1933,8 @@ static R_INLINE SEXP GET_BINDING_CELL(SEXP symbol, SEXP rho)
     if (rho == R_BaseEnv || rho == R_BaseNamespace)
 	return R_NilValue;
     else {
-	SEXP loc = (SEXP) R_findVarLocInFrame(rho, symbol);
-	return (loc != NULL) ? loc : R_NilValue;
+	R_varloc_t loc = R_findVarLocInFrame(rho, symbol);
+	return (! R_VARLOC_IS_NULL(loc)) ? loc.cell : R_NilValue;
     }
 }
 
@@ -1417,22 +1967,23 @@ SEXP attribute_hidden do_for(SEXP call, SEXP op, SEXP args, SEXP rho)
     RCNTXT cntxt;
     PROTECT_INDEX vpi;
 
+    checkArity(op, args);
     sym = CAR(args);
     val = CADR(args);
     body = CADDR(args);
 
     if ( !isSymbol(sym) ) errorcall(call, _("non-symbol loop variable"));
 
-    if (R_jit_enabled > 2 && ! R_PendingPromises) {
-	R_compileAndExecute(call, rho);
+    dbg = RDEBUG(rho);
+    if (R_jit_enabled > 2 && !dbg && !R_disable_bytecode
+	    && rho == R_GlobalEnv
+	    && isUnmodifiedSpecSym(CAR(call), rho)
+	    && R_compileAndExecute(call, rho))
 	return R_NilValue;
-    }
 
     PROTECT(args);
     PROTECT(rho);
     PROTECT(val = eval(val, rho));
-    defineVar(sym, R_NilValue, rho);
-    PROTECT(cell = GET_BINDING_CELL(sym, rho));
 
     /* deal with the case where we are iterating over a factor
        we need to coerce to character - then iterate */
@@ -1450,7 +2001,8 @@ SEXP attribute_hidden do_for(SEXP call, SEXP op, SEXP args, SEXP rho)
 
     val_type = TYPEOF(val);
 
-    dbg = RDEBUG(rho);
+    defineVar(sym, R_NilValue, rho);
+    PROTECT(cell = GET_BINDING_CELL(sym, rho));
     bgn = BodyHasBraces(body);
 
     /* bump up NAMED count of sequence to avoid modification by loop code */
@@ -1546,20 +2098,20 @@ SEXP attribute_hidden do_while(SEXP call, SEXP op, SEXP args, SEXP rho)
 
     checkArity(op, args);
 
-    if (R_jit_enabled > 2 && ! R_PendingPromises) {
-	R_compileAndExecute(call, rho);
+    dbg = RDEBUG(rho);
+    if (R_jit_enabled > 2 && !dbg && !R_disable_bytecode
+	    && rho == R_GlobalEnv
+	    && isUnmodifiedSpecSym(CAR(call), rho)
+	    && R_compileAndExecute(call, rho))
 	return R_NilValue;
-    }
-
 
-    dbg = RDEBUG(rho);
     body = CADR(args);
     bgn = BodyHasBraces(body);
 
     begincontext(&cntxt, CTXT_LOOP, R_NilValue, rho, R_BaseEnv, R_NilValue,
 		 R_NilValue);
     if (SETJMP(cntxt.cjmpbuf) != CTXT_BREAK) {
-        while (asLogicalNoNA(eval(CAR(args), rho), call)) {
+	while (asLogicalNoNA(eval(CAR(args), rho), call)) {
 	    if (RDEBUG(rho) && !bgn && !R_GlobalContext->browserfinish) {
 		SrcrefPrompt("debug", R_Srcref);
 		PrintValue(body);
@@ -1588,12 +2140,13 @@ SEXP attribute_hidden do_repeat(SEXP call, SEXP op, SEXP args, SEXP rho)
 
     checkArity(op, args);
 
-    if (R_jit_enabled > 2 && ! R_PendingPromises) {
-	R_compileAndExecute(call, rho);
+    dbg = RDEBUG(rho);
+    if (R_jit_enabled > 2 && !dbg && !R_disable_bytecode
+	    && rho == R_GlobalEnv
+	    && isUnmodifiedSpecSym(CAR(call), rho)
+	    && R_compileAndExecute(call, rho))
 	return R_NilValue;
-    }
 
-    dbg = RDEBUG(rho);
     body = CAR(args);
 
     begincontext(&cntxt, CTXT_LOOP, R_NilValue, rho, R_BaseEnv, R_NilValue,
@@ -1609,10 +2162,10 @@ SEXP attribute_hidden do_repeat(SEXP call, SEXP op, SEXP args, SEXP rho)
 }
 
 
-SEXP attribute_hidden do_break(SEXP call, SEXP op, SEXP args, SEXP rho)
+SEXP attribute_hidden NORET do_break(SEXP call, SEXP op, SEXP args, SEXP rho)
 {
+    checkArity(op, args);
     findcontext(PRIMVAL(op), rho, R_NilValue);
-    return R_NilValue;
 }
 
 
@@ -1645,7 +2198,7 @@ SEXP attribute_hidden do_begin(SEXP call, SEXP op, SEXP args, SEXP rho)
 }
 
 
-SEXP attribute_hidden do_return(SEXP call, SEXP op, SEXP args, SEXP rho)
+SEXP attribute_hidden NORET do_return(SEXP call, SEXP op, SEXP args, SEXP rho)
 {
     SEXP v;
 
@@ -1659,8 +2212,6 @@ SEXP attribute_hidden do_return(SEXP call, SEXP op, SEXP args, SEXP rho)
     }
 
     findcontext(CTXT_BROWSER | CTXT_FUNCTION, rho, v);
-
-    return R_NilValue; /*NOTREACHED*/
 }
 
 /* Declared with a variable number of args in names.c */
@@ -1755,8 +2306,9 @@ static SEXP R_SubassignSym = NULL;
 static SEXP R_Subset2Sym = NULL;
 static SEXP R_Subassign2Sym = NULL;
 static SEXP R_DollarGetsSymbol = NULL;
+static SEXP R_AssignSym = NULL;
 
-void attribute_hidden R_initAsignSymbols(void)
+void attribute_hidden R_initAssignSymbols(void)
 {
     for (int i = 0; i < NUM_ASYM; i++)
 	asymSymbol[i] = install(asym[i]);
@@ -1770,6 +2322,7 @@ void attribute_hidden R_initAsignSymbols(void)
     R_Subassign2Sym = install("[[<-");
     R_DollarGetsSymbol = install("$<-");
     R_valueSym = install("value");
+    R_AssignSym = install("<-");
 }
 
 static R_INLINE SEXP lookupAssignFcnSymbol(SEXP fun)
@@ -1915,8 +2468,10 @@ static SEXP applydefine(SEXP call, SEXP op, SEXP args, SEXP rho)
     if (rho == R_BaseEnv)
 	errorcall(call, _("cannot do complex assignments in base environment"));
     defineVar(R_TmpvalSymbol, R_NilValue, rho);
-    PROTECT((SEXP) (tmploc = R_findVarLocInFrame(rho, R_TmpvalSymbol)));
-    DISABLE_REFCNT((SEXP) tmploc);
+    tmploc = R_findVarLocInFrame(rho, R_TmpvalSymbol);
+    PROTECT(tmploc.cell);
+    DISABLE_REFCNT(tmploc.cell);
+    DECREMENT_REFCNT(CDR(tmploc.cell));
 
     /* Now set up a context to remove it when we are done, even in the
      * case of an error.  This all helps error() provide a better call.
@@ -1983,8 +2538,8 @@ static SEXP applydefine(SEXP call, SEXP op, SEXP args, SEXP rho)
     PROTECT(expr = assignCall(asymSymbol[PRIMVAL(op)], CDR(lhs),
 			      afun, R_TmpvalSymbol, CDDR(expr), rhsprom));
     expr = eval(expr, rho);
-    UNPROTECT(nprot);
     endcontext(&cntxt); /* which does not run the remove */
+    UNPROTECT(nprot);
     unbindVar(R_TmpvalSymbol, rho);
 #ifdef OLD_RHS_NAMED
     /* we do not duplicate the value, so to be conservative mark the
@@ -2081,12 +2636,15 @@ SEXP attribute_hidden evalList(SEXP el, SEXP rho, SEXP call, int n)
 	     *	the list of resulting values into the return value.
 	     * Anything else bound to a ... symbol is an error
 	     */
-	    h = findVar(CAR(el), rho);
+	    PROTECT(h = findVar(CAR(el), rho));
 	    if (TYPEOF(h) == DOTSXP || h == R_NilValue) {
 		while (h != R_NilValue) {
 		    ev = CONS_NR(eval(CAR(h), rho), R_NilValue);
-		    if (head==R_NilValue)
+		    if (head==R_NilValue) {
+			UNPROTECT(1); /* h */
 			PROTECT(head = ev);
+			PROTECT(h); /* put current h on top of protect stack */
+		    }
 		    else
 			SETCDR(tail, ev);
 		    COPY_TAG(ev, h);
@@ -2096,6 +2654,7 @@ SEXP attribute_hidden evalList(SEXP el, SEXP rho, SEXP call, int n)
 	    }
 	    else if (h != R_MissingArg)
 		error(_("'...' used in an incorrect context"));
+	    UNPROTECT(1); /* h */
 	} else if (CAR(el) == R_MissingArg) {
 	    /* It was an empty element: most likely get here from evalArgs
 	       which may have been called on part of the args. */
@@ -2112,7 +2671,9 @@ SEXP attribute_hidden evalList(SEXP el, SEXP rho, SEXP call, int n)
 	       cod emore consistent. */
 	} else if (isSymbol(CAR(el)) && R_isMissing(CAR(el), rho)) {
 	    /* It was missing */
-	    errorcall(call, _("'%s' is missing"), EncodeChar(PRINTNAME(CAR(el))));
+	    errorcall_cpy(call,
+	                  _("'%s' is missing"),
+	                  EncodeChar(PRINTNAME(CAR(el))));
 #endif
 	} else {
 	    ev = CONS_NR(eval(CAR(el), rho), R_NilValue);
@@ -2155,16 +2716,18 @@ SEXP attribute_hidden evalListKeepMissing(SEXP el, SEXP rho)
 	 * Anything else bound to a ... symbol is an error
 	*/
 	if (CAR(el) == R_DotsSymbol) {
-	    h = findVar(CAR(el), rho);
+	    PROTECT(h = findVar(CAR(el), rho));
 	    if (TYPEOF(h) == DOTSXP || h == R_NilValue) {
 		while (h != R_NilValue) {
 		    if (CAR(h) == R_MissingArg)
 			ev = CONS_NR(R_MissingArg, R_NilValue);
 		    else
 			ev = CONS_NR(eval(CAR(h), rho), R_NilValue);
-		    if (head==R_NilValue)
+		    if (head == R_NilValue) {
+			UNPROTECT(1); /* h */
 			PROTECT(head = ev);
-		    else
+			PROTECT(h);
+		    } else
 			SETCDR(tail, ev);
 		    COPY_TAG(ev, h);
 		    tail = ev;
@@ -2173,10 +2736,11 @@ SEXP attribute_hidden evalListKeepMissing(SEXP el, SEXP rho)
 	    }
 	    else if(h != R_MissingArg)
 		error(_("'...' used in an incorrect context"));
+	    UNPROTECT(1); /* h */
 	}
 	else {
 	    if (CAR(el) == R_MissingArg ||
-		 (isSymbol(CAR(el)) && R_isMissing(CAR(el), rho)))
+		(isSymbol(CAR(el)) && R_isMissing(CAR(el), rho)))
 		ev = CONS_NR(R_MissingArg, R_NilValue);
 	    else
 		ev = CONS_NR(eval(CAR(el), rho), R_NilValue);
@@ -2222,7 +2786,7 @@ SEXP attribute_hidden promiseArgs(SEXP el, SEXP rho)
 	/* Is this double promise mechanism really needed? */
 
 	if (CAR(el) == R_DotsSymbol) {
-	    h = findVar(CAR(el), rho);
+	    PROTECT(h = findVar(CAR(el), rho));
 	    if (TYPEOF(h) == DOTSXP || h == R_NilValue) {
 		while (h != R_NilValue) {
 		    SETCDR(tail, CONS(mkPROMISE(CAR(h), rho), R_NilValue));
@@ -2233,6 +2797,7 @@ SEXP attribute_hidden promiseArgs(SEXP el, SEXP rho)
 	    }
 	    else if (h != R_MissingArg)
 		error(_("'...' used in an incorrect context"));
+	    UNPROTECT(1); /* h */
 	}
 	else if (CAR(el) == R_MissingArg) {
 	    SETCDR(tail, CONS(R_MissingArg, R_NilValue));
@@ -2366,7 +2931,8 @@ SEXP attribute_hidden do_eval(SEXP call, SEXP op, SEXP args, SEXP rho)
     if (isLanguage(expr) || isSymbol(expr) || isByteCode(expr)) { */
     if (TYPEOF(expr) == LANGSXP || TYPEOF(expr) == SYMSXP || isByteCode(expr)) {
 	PROTECT(expr);
-	begincontext(&cntxt, CTXT_RETURN, call, env, rho, args, op);
+	begincontext(&cntxt, CTXT_RETURN, R_GlobalContext->call,
+	             env, rho, args, op);
 	if (!SETJMP(cntxt.cjmpbuf))
 	    expr = eval(expr, env);
 	else {
@@ -2376,6 +2942,8 @@ SEXP attribute_hidden do_eval(SEXP call, SEXP op, SEXP args, SEXP rho)
 		error(_("restarts not supported in 'eval'"));
 	    }
 	}
+	UNPROTECT(1);
+	PROTECT(expr);
 	endcontext(&cntxt);
 	UNPROTECT(1);
     }
@@ -2385,7 +2953,8 @@ SEXP attribute_hidden do_eval(SEXP call, SEXP op, SEXP args, SEXP rho)
 	PROTECT(expr);
 	n = LENGTH(expr);
 	tmp = R_NilValue;
-	begincontext(&cntxt, CTXT_RETURN, call, env, rho, args, op);
+	begincontext(&cntxt, CTXT_RETURN, R_GlobalContext->call,
+	             env, rho, args, op);
 	if (!SETJMP(cntxt.cjmpbuf))
 	    for(i = 0 ; i < n ; i++) {
 		R_Srcref = getSrcref(srcrefs, i);
@@ -2398,6 +2967,8 @@ SEXP attribute_hidden do_eval(SEXP call, SEXP op, SEXP args, SEXP rho)
 		error(_("restarts not supported in 'eval'"));
 	    }
 	}
+	UNPROTECT(1);
+	PROTECT(tmp);
 	endcontext(&cntxt);
 	UNPROTECT(1);
 	expr = tmp;
@@ -2466,7 +3037,7 @@ SEXP attribute_hidden do_recall(SEXP call, SEXP op, SEXP args, SEXP rho)
 	PROTECT(s = eval(CAR(cptr->call), cptr->sysparent));
     if (TYPEOF(s) != CLOSXP)
 	error(_("'Recall' called from outside a closure"));
-    ans = applyClosure(cptr->call, s, args, cptr->sysparent, R_BaseEnv);
+    ans = applyClosure(cptr->call, s, args, cptr->sysparent, R_NilValue);
     UNPROTECT(1);
     return ans;
 }
@@ -2480,8 +3051,9 @@ static SEXP evalArgs(SEXP el, SEXP rho, int dropmissing, SEXP call, int n)
 
 
 /* A version of DispatchOrEval that checks for possible S4 methods for
- * any argument, not just the first.  Used in the code for `[` in
- * do_subset.  Differs in that all arguments are evaluated
+ * any argument, not just the first.  Used in the code for `c()` in do_c()
+ * and previously used in the code for `[` in do_subset.
+ * Differs in that all arguments are evaluated
  * immediately, rather than after the call to R_possible_dispatch.
  */
 attribute_hidden
@@ -2607,7 +3179,7 @@ int DispatchOrEval(SEXP call, SEXP op, const char *generic, SEXP args,
 						call, 0));
 		else {
 		    PROTECT(argValue = CONS_NR(x, evalArgs(CDR(argValue), rho,
-							dropmissing, call, 1)));
+							   dropmissing, call, 1)));
 		    SET_TAG(argValue, CreateTag(TAG(args)));
 		}
 		nprotect++;
@@ -2669,11 +3241,23 @@ int DispatchOrEval(SEXP call, SEXP op, const char *generic, SEXP args,
     return 0;
 }
 
+static R_INLINE void updateObjFromS4Slot(SEXP objSlot, const char *className) {
+    SEXP obj = CAR(objSlot);
+
+    if(IS_S4_OBJECT(obj) && isBasicClass(className)) {
+	/* This and the similar test below implement the strategy
+	 for S3 methods selected for S4 objects.  See ?Methods */
+	if(NAMED(obj)) SET_NAMED(obj, 2);
+	obj = R_getS4DataSlot(obj, S4SXP); /* the .S3Class obj. or NULL*/
+	if(obj != R_NilValue) /* use the S3Part as the inherited object */
+	    SETCAR(objSlot, obj);
+    }
+}
 
 /* gr needs to be protected on return from this function */
 static void findmethod(SEXP Class, const char *group, const char *generic,
 		       SEXP *sxp,  SEXP *gr, SEXP *meth, int *which,
-		       char *buf, SEXP rho)
+		       SEXP objSlot, SEXP rho)
 {
     int len, whichclass;
     const void *vmax = vmaxget();
@@ -2686,22 +3270,18 @@ static void findmethod(SEXP Class, const char *group, const char *generic,
     */
     for (whichclass = 0 ; whichclass < len ; whichclass++) {
 	const char *ss = translateChar(STRING_ELT(Class, whichclass));
-	if(strlen(generic) + strlen(ss) + 2 > 512)
-	    error(_("class name too long in '%s'"), generic);
-	sprintf(buf, "%s.%s", generic, ss);
-	*meth = install(buf);
+	*meth = installS3Signature(generic, ss);
 	*sxp = R_LookupMethod(*meth, rho, rho, R_BaseEnv);
 	if (isFunction(*sxp)) {
-	    *gr = mkString("");
+	    *gr = R_BlankScalarString;
+	    if (whichclass > 0) updateObjFromS4Slot(objSlot, ss);
 	    break;
 	}
-	if(strlen(group) + strlen(ss) + 2 > 512)
-	    error(_("class name too long in '%s'"), group);
-	sprintf(buf, "%s.%s", group, ss);
-	*meth = install(buf);
+	*meth = installS3Signature(group, ss);
 	*sxp = R_LookupMethod(*meth, rho, rho, R_BaseEnv);
 	if (isFunction(*sxp)) {
 	    *gr = mkString(group);
+	    if (whichclass > 0) updateObjFromS4Slot(objSlot, ss);
 	    break;
 	}
     }
@@ -2709,14 +3289,20 @@ static void findmethod(SEXP Class, const char *group, const char *generic,
     *which = whichclass;
 }
 
+static SEXP classForGroupDispatch(SEXP obj) {
+
+    return IS_S4_OBJECT(obj) ? R_data_class2(obj)
+	    : getAttrib(obj, R_ClassSymbol);
+}
+
 attribute_hidden
 int DispatchGroup(const char* group, SEXP call, SEXP op, SEXP args, SEXP rho,
 		  SEXP *ans)
 {
-    int i, j, nargs, lwhich, rwhich, set;
-    SEXP lclass, s, t, m, lmeth, lsxp, lgr, newrho;
+    int i, nargs, lwhich, rwhich;
+    SEXP lclass, s, t, m, lmeth, lsxp, lgr, newvars;
     SEXP rclass, rmeth, rgr, rsxp, value;
-    char lbuf[512], rbuf[512], generic[128], *pt;
+    char *generic;
     Rboolean useS4 = TRUE, isOps = FALSE;
 
     /* pre-test to avoid string computations when there is nothing to
@@ -2749,13 +3335,8 @@ int DispatchGroup(const char* group, SEXP call, SEXP op, SEXP args, SEXP rho,
 
     /* check whether we are processing the default method */
     if ( isSymbol(CAR(call)) ) {
-	if(strlen(CHAR(PRINTNAME(CAR(call)))) >= 512)
-	   error(_("call name too long in '%s'"), EncodeChar(PRINTNAME(CAR(call))));
-	sprintf(lbuf, "%s", CHAR(PRINTNAME(CAR(call))) );
-	pt = strtok(lbuf, ".");
-	pt = strtok(NULL, ".");
-
-	if( pt != NULL && !strcmp(pt, "default") )
+	const char *cstr = strchr(CHAR(PRINTNAME(CAR(call))), '.');
+	if (cstr && !strcmp(cstr + 1, "default"))
 	    return 0;
     }
 
@@ -2767,60 +3348,34 @@ int DispatchGroup(const char* group, SEXP call, SEXP op, SEXP args, SEXP rho,
     if( nargs == 1 && !isObject(CAR(args)) )
 	return 0;
 
-    if(!isObject(CAR(args)) && !isObject(CADR(args)))
-	return 0;
+    generic = PRIMNAME(op);
 
-    if(strlen(PRIMNAME(op)) >= 128)
-	error(_("generic name too long in '%s'"), PRIMNAME(op));
-    sprintf(generic, "%s", PRIMNAME(op) );
-
-    lclass = IS_S4_OBJECT(CAR(args)) ? R_data_class2(CAR(args))
-      : getAttrib(CAR(args), R_ClassSymbol);
+    PROTECT(lclass = classForGroupDispatch(CAR(args)));
 
     if( nargs == 2 )
-	rclass = IS_S4_OBJECT(CADR(args)) ? R_data_class2(CADR(args))
-      : getAttrib(CADR(args), R_ClassSymbol);
+	rclass = classForGroupDispatch(CADR(args));
     else
 	rclass = R_NilValue;
 
+    PROTECT(rclass);
     lsxp = R_NilValue; lgr = R_NilValue; lmeth = R_NilValue;
     rsxp = R_NilValue; rgr = R_NilValue; rmeth = R_NilValue;
 
     findmethod(lclass, group, generic, &lsxp, &lgr, &lmeth, &lwhich,
-	       lbuf, rho);
+	       args, rho);
     PROTECT(lgr);
-    const void *vmax = vmaxget();
-    if(isFunction(lsxp) && IS_S4_OBJECT(CAR(args)) && lwhich > 0
-       && isBasicClass(translateChar(STRING_ELT(lclass, lwhich)))) {
-	/* This and the similar test below implement the strategy
-	 for S3 methods selected for S4 objects.  See ?Methods */
-	value = CAR(args);
-	if(NAMED(value)) SET_NAMED(value, 2);
-	value = R_getS4DataSlot(value, S4SXP); /* the .S3Class obj. or NULL*/
-	if(value != R_NilValue) /* use the S3Part as the inherited object */
-	    SETCAR(args, value);
-    }
 
     if( nargs == 2 )
 	findmethod(rclass, group, generic, &rsxp, &rgr, &rmeth,
-		   &rwhich, rbuf, rho);
+		   &rwhich, CDR(args), rho);
     else
 	rwhich = 0;
 
-    if(isFunction(rsxp) && IS_S4_OBJECT(CADR(args)) && rwhich > 0
-       && isBasicClass(translateChar(STRING_ELT(rclass, rwhich)))) {
-	value = CADR(args);
-	if(NAMED(value)) SET_NAMED(value, 2);
-	value = R_getS4DataSlot(value, S4SXP);
-	if(value != R_NilValue) SETCADR(args, value);
-    }
-    vmaxset(vmax);
-
     PROTECT(rgr);
 
     if( !isFunction(lsxp) && !isFunction(rsxp) ) {
-	UNPROTECT(2);
-	return 0; /* no generic or group method so use default*/
+	UNPROTECT(4);
+	return 0; /* no generic or group method so use default */
     }
 
     if( lsxp != rsxp ) {
@@ -2838,7 +3393,7 @@ int DispatchGroup(const char* group, SEXP call, SEXP op, SEXP args, SEXP rho,
 	    else {
 		warning(_("Incompatible methods (\"%s\", \"%s\") for \"%s\""),
 			lname, rname, generic);
-		UNPROTECT(2);
+		UNPROTECT(4);
 		return 0;
 	    }
 	}
@@ -2849,50 +3404,33 @@ int DispatchGroup(const char* group, SEXP call, SEXP op, SEXP args, SEXP rho,
 	    lgr = rgr;
 	    lclass = rclass;
 	    lwhich = rwhich;
-	    strcpy(lbuf, rbuf);
 	}
     }
 
     /* we either have a group method or a class method */
 
-    PROTECT(newrho = allocSExp(ENVSXP));
     PROTECT(m = allocVector(STRSXP,nargs));
-    vmax = vmaxget();
+    const void *vmax = vmaxget();
     s = args;
+    const char *dispatchClassName = translateChar(STRING_ELT(lclass, lwhich));
     for (i = 0 ; i < nargs ; i++) {
-	t = IS_S4_OBJECT(CAR(s)) ? R_data_class2(CAR(s))
-	  : getAttrib(CAR(s), R_ClassSymbol);
-	set = 0;
-	if (isString(t)) {
-	    for (j = 0 ; j < length(t) ; j++) {
-		if (!strcmp(translateChar(STRING_ELT(t, j)),
-			    translateChar(STRING_ELT(lclass, lwhich)))) {
-		    SET_STRING_ELT(m, i, mkChar(lbuf));
-		    set = 1;
-		    break;
-		}
-	    }
-	}
-	if( !set )
+	t = classForGroupDispatch(CAR(s));
+	if (isString(t) && (stringPositionTr(t, dispatchClassName) >= 0))
+	    SET_STRING_ELT(m, i, PRINTNAME(lmeth));
+	else
 	    SET_STRING_ELT(m, i, R_BlankString);
 	s = CDR(s);
     }
     vmaxset(vmax);
 
-    defineVar(R_dot_Method, m, newrho);
-    UNPROTECT(1);
-    PROTECT(t = mkString(generic));
-    defineVar(R_dot_Generic, t, newrho);
-    UNPROTECT(1);
-    defineVar(R_dot_Group, lgr, newrho);
-    set = length(lclass) - lwhich;
-    PROTECT(t = allocVector(STRSXP, set));
-    for(j = 0 ; j < set ; j++ )
-	SET_STRING_ELT(t, j, duplicate(STRING_ELT(lclass, lwhich++)));
-    defineVar(R_dot_Class, t, newrho);
-    UNPROTECT(1);
-    defineVar(R_dot_GenericCallEnv, rho, newrho);
-    defineVar(R_dot_GenericDefEnv, R_BaseEnv, newrho);
+    newvars = PROTECT(createS3Vars(
+	PROTECT(mkString(generic)),
+	lgr,
+	PROTECT(stringSuffix(lclass, lwhich)),
+	m,
+	rho,
+	R_BaseEnv
+    ));
 
     PROTECT(t = LCONS(lmeth, CDR(call)));
 
@@ -2909,14 +3447,14 @@ int DispatchGroup(const char* group, SEXP call, SEXP op, SEXP args, SEXP rho,
 	if(isOps) SET_TAG(m, R_NilValue);
     }
 
-    *ans = applyClosure(t, lsxp, s, rho, newrho);
-    UNPROTECT(5);
+    *ans = applyClosure(t, lsxp, s, rho, newvars);
+    UNPROTECT(10);
     return 1;
 }
 
 /* start of bytecode section */
-static int R_bcVersion = 7;
-static int R_bcMinVersion = 6;
+static int R_bcVersion = 10;
+static int R_bcMinVersion = 9;
 
 static SEXP R_AddSym = NULL;
 static SEXP R_SubSym = NULL;
@@ -2935,6 +3473,22 @@ static SEXP R_AndSym = NULL;
 static SEXP R_OrSym = NULL;
 static SEXP R_NotSym = NULL;
 static SEXP R_CSym = NULL;
+static SEXP R_LogSym = NULL;
+static SEXP R_DotInternalSym = NULL;
+static SEXP R_DotExternalSym = NULL;
+static SEXP R_DotExternal2Sym = NULL;
+static SEXP R_DotExternalgraphicsSym = NULL;
+static SEXP R_DotCallSym = NULL;
+static SEXP R_DotCallgraphicsSym = NULL;
+static SEXP R_DotFortranSym = NULL;
+static SEXP R_DotCSym = NULL;
+
+/* R_ConstantsRegistry allows runtime detection of modification of compiler
+   constants. It is a linked list of weak references. Each weak reference
+   refers to a byte-code object (BCODESXPs) as key and to a deep copy of the
+   object's constants as value. The head of the list has a nil payload
+   instead of a weak reference, stays in the list forever, and is a GC root.*/
+static SEXP R_ConstantsRegistry = NULL;
 
 #if defined(__GNUC__) && ! defined(BC_PROFILING) && (! defined(NO_THREADED_CODE))
 # define THREADED_CODE
@@ -2960,10 +3514,25 @@ void R_initialize_bcode(void)
   R_OrSym = install("|");
   R_NotSym = install("!");
   R_CSym = install("c");
+  R_LogSym = install("log");
+  R_DotInternalSym = install(".Internal");
+  R_DotExternalSym = install(".External");
+  R_DotExternal2Sym = install(".External2");
+  R_DotExternalgraphicsSym = install(".External.graphics");
+  R_DotCallSym = install(".Call");
+  R_DotCallgraphicsSym = install(".Call.graphics");
+  R_DotFortranSym = install(".Fortran");
+  R_DotCSym = install(".C");
 
 #ifdef THREADED_CODE
   bcEval(NULL, NULL, FALSE);
 #endif
+
+  /* the first constants record always stays in place for protection */
+  R_ConstantsRegistry = allocVector(VECSXP, 2);
+  R_PreserveObject(R_ConstantsRegistry);
+  SET_VECTOR_ELT(R_ConstantsRegistry, 0, R_NilValue);
+  SET_VECTOR_ELT(R_ConstantsRegistry, 1, R_NilValue);
 }
 
 enum {
@@ -3053,8 +3622,8 @@ enum {
   ISNUMERIC_OP,
   VECSUBSET_OP,
   MATSUBSET_OP,
-  SETVECSUBSET_OP,
-  SETMATSUBSET_OP,
+  VECSUBASSIGN_OP,
+  MATSUBASSIGN_OP,
   AND1ST_OP,
   AND2ND_OP,
   OR1ST_OP,
@@ -3071,10 +3640,26 @@ enum {
   DUP2ND_OP,
   SWITCH_OP,
   RETURNJMP_OP,
-  STARTVECSUBSET_OP,
-  STARTMATSUBSET_OP,
-  STARTSETVECSUBSET_OP,
-  STARTSETMATSUBSET_OP,
+  STARTSUBSET_N_OP,
+  STARTSUBASSIGN_N_OP,
+  VECSUBSET2_OP,
+  MATSUBSET2_OP,
+  VECSUBASSIGN2_OP,
+  MATSUBASSIGN2_OP,
+  STARTSUBSET2_N_OP,
+  STARTSUBASSIGN2_N_OP,
+  SUBSET_N_OP,
+  SUBSET2_N_OP,
+  SUBASSIGN_N_OP,
+  SUBASSIGN2_N_OP,
+  LOG_OP,
+  LOGBASE_OP,
+  MATH1_OP,
+  DOTCALL_OP,
+  COLON_OP,
+  SEQALONG_OP,
+  SEQLEN_OP,
+  BASEGUARD_OP,
   OPCOUNT
 };
 
@@ -3090,34 +3675,185 @@ SEXP do_c_dflt(SEXP, SEXP, SEXP, SEXP);
 SEXP do_subset2_dflt(SEXP, SEXP, SEXP, SEXP);
 SEXP do_subassign2_dflt(SEXP, SEXP, SEXP, SEXP);
 
+static SEXP seq_int(int n1, int n2)
+{
+    int n = n1 <= n2 ? n2 - n1 + 1 : n1 - n2 + 1;
+    SEXP ans = allocVector(INTSXP, n);
+    int *data = INTEGER(ans);
+    if (n1 <= n2)
+	for (int i = 0; i < n; i++)
+	    data[i] = n1 + i;
+    else
+	for (int i = 0; i < n; i++)
+	    data[i] = n1 - i;
+    return ans;
+}
+
+#ifdef TYPED_STACK
+# define COMPACT_INTSEQ
+# ifdef COMPACT_INTSEQ
+#  define INTSEQSXP 9999
+# endif
+#define CACHE_SCALARS
+static R_INLINE SEXP GETSTACK_PTR_TAG(R_bcstack_t *s)
+{
+    /* no error checking since only called with tag != 0 */
+    SEXP value;
+    switch (s->tag) {
+    case REALSXP:
+#ifdef CACHE_SCALARS
+	if (R_CachedScalarReal != NULL) {
+	    value = R_CachedScalarReal;
+	    R_CachedScalarReal = NULL;
+	}
+	else
+#endif
+	value = allocVector(REALSXP, 1);
+	REAL(value)[0] = s->u.dval;
+	break;
+    case INTSXP:
+#ifdef CACHE_SCALARS
+	if (R_CachedScalarInteger != NULL) {
+	    value = R_CachedScalarInteger;
+	    R_CachedScalarInteger = NULL;
+	}
+	else
+#endif
+	value = allocVector(INTSXP, 1);
+	INTEGER(value)[0] = s->u.ival;
+	break;
+    case LGLSXP:
+	value = ScalarLogical(s->u.ival);
+	break;
+#ifdef COMPACT_INTSEQ
+    case INTSEQSXP:
+	{
+	    int *seqinfo = INTEGER(s->u.sxpval);
+	    value = seq_int(seqinfo[0], seqinfo[1]);
+	}
+	break;
+#endif
+    default: /* not reached */
+	value = NULL;
+    }
+    s->tag = 0;
+    s->u.sxpval = value;
+    return value;
+}
+#define GETSTACK_PTR(s) ((s)->tag ? GETSTACK_PTR_TAG(s) : (s)->u.sxpval)
+
+#define GETSTACK_SXPVAL_PTR(s) ((s)->u.sxpval)
+
+#define GETSTACK_IVAL_PTR(s) ((s)->u.ival)
+
+#define SETSTACK_PTR(s, v) do { \
+    SEXP __v__ = (v); \
+    (s)->tag = 0; \
+    (s)->u.sxpval = __v__; \
+} while (0)
+
+#define SETSTACK_REAL_PTR(s, v) do { \
+    double __v__ = (v); \
+    (s)->tag = REALSXP; \
+    (s)->u.dval = __v__; \
+} while (0)
+
+#define SETSTACK_INTEGER_PTR(s, v) do { \
+    int __v__ = (v); \
+    (s)->tag = INTSXP; \
+    (s)->u.ival = __v__; \
+} while (0)
+
+#define SETSTACK_LOGICAL_PTR(s, v) do {		\
+	int __v__ = (v);			\
+	(s)->tag = LGLSXP;			\
+	if (__v__ == NA_LOGICAL)		\
+	    (s)->u.ival = NA_LOGICAL;		\
+	else					\
+	    (s)->u.ival = __v__ ? TRUE : FALSE;	\
+    } while (0)
+
+#define IS_STACKVAL_BOXED(idx)	(R_BCNodeStackTop[idx].tag == 0)
+#else
 #define GETSTACK_PTR(s) (*(s))
-#define GETSTACK(i) GETSTACK_PTR(R_BCNodeStackTop + (i))
+
+#define GETSTACK_SXPVAL_PTR(s) (*(s))
+
+#define GETSTACK_IVAL_PTR(s) INTEGER(*(s))[0]
 
 #define SETSTACK_PTR(s, v) do { \
     SEXP __v__ = (v); \
     *(s) = __v__; \
 } while (0)
 
-#define SETSTACK(i, v) SETSTACK_PTR(R_BCNodeStackTop + (i), v)
-
 #define SETSTACK_REAL_PTR(s, v) SETSTACK_PTR(s, ScalarReal(v))
+#define SETSTACK_INTEGER_PTR(s, v) SETSTACK_PTR(s, ScalarInteger(v))
+#define SETSTACK_LOGICAL_PTR(s, v) SETSTACK_PTR(s, ScalarLogical(v))
 
-#define SETSTACK_REAL(i, v) SETSTACK_REAL_PTR(R_BCNodeStackTop + (i), v)
+#define IS_STACKVAL_BOXED(idx)	(TRUE)
+#endif
 
-#define SETSTACK_INTEGER_PTR(s, v) SETSTACK_PTR(s, ScalarInteger(v))
+#if defined(TYPED_STACK) && defined(COMPACT_INTSEQ)
+#define SETSTACK_INTSEQ(idx, rn1, rn2) do {	\
+	SEXP info = allocVector(INTSXP, 2);	\
+	INTEGER(info)[0] = (int) rn1;		\
+	INTEGER(info)[1] = (int) rn2;		\
+	R_BCNodeStackTop[idx].u.sxpval = info;	\
+	R_BCNodeStackTop[idx].tag = INTSEQSXP;	\
+    } while (0)
+#else
+#define SETSTACK_INTSEQ(idx, rn1, rn2) \
+    SETSTACK(idx, seq_int((int) rn1, (int) rn2))
+#endif
 
-#define SETSTACK_INTEGER(i, v) SETSTACK_INTEGER_PTR(R_BCNodeStackTop + (i), v)
+#define GETSTACK_SXPVAL(i) GETSTACK_SXPVAL_PTR(R_BCNodeStackTop + (i))
 
-#define SETSTACK_LOGICAL_PTR(s, v) do { \
-    int __ssl_v__ = (v); \
-    if (__ssl_v__ == NA_LOGICAL) \
-	SETSTACK_PTR(s, ScalarLogical(NA_LOGICAL)); \
-    else \
-	SETSTACK_PTR(s, __ssl_v__ ? R_TrueValue : R_FalseValue); \
-} while(0)
+#define GETSTACK(i) GETSTACK_PTR(R_BCNodeStackTop + (i))
+
+#define SETSTACK(i, v) SETSTACK_PTR(R_BCNodeStackTop + (i), v)
+
+#define SETSTACK_REAL(i, v) SETSTACK_REAL_PTR(R_BCNodeStackTop + (i), v)
+
+#define SETSTACK_INTEGER(i, v) SETSTACK_INTEGER_PTR(R_BCNodeStackTop + (i), v)
 
 #define SETSTACK_LOGICAL(i, v) SETSTACK_LOGICAL_PTR(R_BCNodeStackTop + (i), v)
 
+
+/* The next two macros will allow reuse a scalar box, if provided. The
+   box is assumed to be of the correct type and size and to have no
+   attributes. */
+#ifdef CACHE_SCALARS
+#define SETSTACK_REAL_EX(idx, dval, ans) do {		\
+	SEXP __ans__ = (ans);				\
+	if (__ans__ && R_CachedScalarReal == NULL)	\
+	    R_CachedScalarReal = __ans__;		\
+	SETSTACK_REAL(idx, dval);			\
+    } while (0)
+
+#define SETSTACK_INTEGER_EX(idx, ival, ans) do {	\
+	SEXP __ans__ = (ans);				\
+	if (__ans__ && R_CachedScalarInteger == NULL)	\
+	    R_CachedScalarInteger = __ans__;		\
+	SETSTACK_INTEGER(idx, ival);			\
+    } while (0)
+#else
+#define SETSTACK_REAL_EX(idx, dval, ans) do { \
+	if (ans) {			      \
+	    REAL(ans)[0] = dval;	      \
+	    SETSTACK(idx, ans);		      \
+	}				      \
+	else SETSTACK_REAL(idx, dval);	      \
+    } while (0)
+
+#define SETSTACK_INTEGER_EX(idx, ival, ans) do { \
+	if (ans) {				 \
+	    INTEGER(ans)[0] = ival;		 \
+	    SETSTACK(idx, ans);			 \
+	}					 \
+	else SETSTACK_INTEGER(idx, ival);	 \
+    } while (0)
+#endif
+
 typedef union { double dval; int ival; } scalar_value_t;
 
 /* bcStackScalar() checks whether the object in the specified stack
@@ -3125,36 +3861,62 @@ typedef union { double dval; int ival; } scalar_value_t;
    one and no attributes.  If so, the type is returned as the function
    value and the value is returned in the structure pointed to by the
    second argument; if not, then zero is returned as the function
-   value. */
-static R_INLINE int bcStackScalar(R_bcstack_t *s, scalar_value_t *v)
+   value. The boxed value can be returned through a pointer argument
+   if it is suitable for re-use. */
+static R_INLINE int bcStackScalarEx(R_bcstack_t *s, scalar_value_t *v,
+				    SEXP *pv)
 {
-    SEXP x = *s;
-    if (ATTRIB(x) == R_NilValue) {
-	switch(TYPEOF(x)) {
-	case REALSXP:
-	    if (LENGTH(x) == 1) {
-		v->dval = REAL(x)[0];
-		return REALSXP;
-	    }
-	    else return 0;
-	case INTSXP:
-	    if (LENGTH(x) == 1) {
-		v->ival = INTEGER(x)[0];
-		return INTSXP;
-	    }
-	    else return 0;
-	case LGLSXP:
-	    if (LENGTH(x) == 1) {
-		v->ival = LOGICAL(x)[0];
-		return LGLSXP;
-	    }
-	    else return 0;
-	default: return 0;
+#ifdef TYPED_STACK
+    int tag = s->tag;
+
+    if (tag)
+	switch(tag) {
+	case REALSXP: v->dval = s->u.dval; return tag;
+	case INTSXP: v->ival = s->u.ival; return tag;
+	case LGLSXP: v->ival = s->u.ival; return tag;
 	}
+#endif
+    SEXP x = GETSTACK_SXPVAL_PTR(s);
+    if (IS_SIMPLE_SCALAR(x, REALSXP)) {
+#ifndef NO_SAVE_ALLOC
+	if (pv && NO_REFERENCES(x)) *pv = x;
+#endif
+	v->dval = REAL(x)[0];
+	return REALSXP;
+    }
+    else if (IS_SIMPLE_SCALAR(x, INTSXP)) {
+#ifndef NO_SAVE_ALLOC
+	if (pv && NO_REFERENCES(x)) *pv = x;
+#endif
+	v->ival = INTEGER(x)[0];
+	return INTSXP;
+    }
+    else if (IS_SIMPLE_SCALAR(x, LGLSXP)) {
+	v->ival = LOGICAL(x)[0];
+	return LGLSXP;
     }
     else return 0;
 }
 
+#define bcStackScalar(s, v) bcStackScalarEx(s, v, NULL)
+
+#define INTEGER_TO_LOGICAL(x) \
+    ((x) == NA_INTEGER ? NA_LOGICAL : (x) ? TRUE : FALSE)
+#define INTEGER_TO_REAL(x) ((x) == NA_INTEGER ? NA_REAL : (x))
+#define LOGICAL_TO_REAL(x) ((x) == NA_LOGICAL ? NA_REAL : (x))
+
+static R_INLINE int bcStackScalarRealEx(R_bcstack_t *s, scalar_value_t *px,
+					SEXP *pv)
+{
+    int typex = bcStackScalarEx(s, px, pv);
+    if (typex == INTSXP) {
+	typex = REALSXP;
+	px->dval = INTEGER_TO_REAL(px->ival);
+	if (pv) *pv = NULL;
+    }
+    return typex;
+}
+
 #define DO_FAST_RELOP2(op,a,b) do { \
     SKIP_OP(); \
     SETSTACK_LOGICAL(-2, ((a) op (b)) ? TRUE : FALSE);	\
@@ -3267,9 +4029,11 @@ static SEXP cmp_arith2(SEXP call, int opval, SEXP opsym, SEXP x, SEXP y,
 } while(0)
 
 #define Builtin2(do_fun,which,rho) do {		     \
+  SEXP stack1 = GETSTACK(-1); \
+  SEXP stack2 = GETSTACK(-2); \
   SEXP call = VECTOR_ELT(constants, GETOP()); \
-  SEXP tmp = CONS_NR(GETSTACK(-1), R_NilValue); \
-  SETSTACK(-2, CONS_NR(GETSTACK(-2), tmp));     \
+  SEXP tmp = CONS_NR(stack1, R_NilValue); \
+  SETSTACK(-2, CONS_NR(stack2, tmp));     \
   R_BCNodeStackTop--; \
   SETSTACK(-1, do_fun(call, getPrimitive(which, BUILTINSXP),	\
 		      GETSTACK(-1), rho));			\
@@ -3294,19 +4058,45 @@ static SEXP cmp_arith2(SEXP call, int opval, SEXP opsym, SEXP x, SEXP y,
 
 
 #define Arith2(opval,opsym) NewBuiltin2(cmp_arith2,opval,opsym,rho)
-#define Math1(which) Builtin1(do_math1,which,rho)
 #define Relop2(opval,opsym) NewBuiltin2(cmp_relop,opval,opsym,rho)
 
+#define R_MSG_NA	_("NaNs produced")
+#define CMP_ISNAN ISNAN
+//On Linux this is quite a bit faster; not on macOS El Capitan:
+//#define CMP_ISNAN(x) ((x) != (x))
+#define FastMath1(fun, sym) do {					\
+	scalar_value_t vx;						\
+	SEXP sa = NULL;							\
+	int typex = bcStackScalarEx(R_BCNodeStackTop - 1, &vx, &sa);	\
+	if (typex == REALSXP) {						\
+	    double dval = fun(vx.dval);					\
+	    if (CMP_ISNAN(dval)) {					\
+		SEXP call = VECTOR_ELT(constants, GETOP());		\
+		if (ISNAN(vx.dval)) dval = vx.dval;			\
+		else warningcall(call, R_MSG_NA);			\
+	    }								\
+	    else SKIP_OP();						\
+	    SETSTACK_REAL_EX(-1, dval, sa);				\
+	    NEXT();							\
+	}								\
+	else if (typex == INTSXP && vx.ival != NA_INTEGER) {		\
+	    SKIP_OP();							\
+	    SETSTACK_REAL_EX(-1, fun(vx.ival), NULL);			\
+	    NEXT();							\
+	}								\
+	Builtin1(do_math1,sym,rho);					\
+    } while (0)
+
 #ifdef NO_SAVE_ALLOC
-# define DO_FAST_BINOP(op,a,b) do { \
+# define DO_FAST_BINOP(fun,a,b,v) do {		\
     SKIP_OP(); \
-    SETSTACK_REAL(-2, (a) op (b)); \
+    SETSTACK_REAL(-2, fun(a, b));		\
     R_BCNodeStackTop--; \
     NEXT(); \
 } while (0)
 
-# define DO_FAST_BINOP_INT(op, a, b) do { \
-    double dval = ((double) (a)) op ((double) (b)); \
+# define DO_FAST_BINOP_INT(fun, a, b, v) do {	    \
+    double dval = fun((double) (a), (double) (b));	\
     if (dval <= INT_MAX && dval >= INT_MIN + 1) { \
 	SKIP_OP(); \
 	SETSTACK_INTEGER(-2, (int) dval); \
@@ -3316,71 +4106,330 @@ static SEXP cmp_arith2(SEXP call, int opval, SEXP opsym, SEXP x, SEXP y,
 } while(0)
 #else
 /* these reuse one of the two values on the top of the stack if it is
-   of the right type and has NAMED = 0. It is known that both of these
-   will have length one and have no attributes. */
-# define DO_FAST_BINOP(op,a,b) do {					\
+   of the right type and has no references. It is known that both of
+   these will have length one and have no attributes. */
+# define DO_FAST_BINOP(fun, a, b, ans) do {				\
 	SKIP_OP();							\
-	SEXP sa = R_BCNodeStackTop[-2];					\
-	SEXP sb = R_BCNodeStackTop[-1];					\
-	SEXP ans;							\
-	if (NO_REFERENCES(sa) && TYPEOF(sa) == REALSXP) ans = sa;	\
-	else if (NO_REFERENCES(sb) && TYPEOF(sb) == REALSXP) ans = sb;	\
-	else ans = allocVector(REALSXP, 1);				\
-	REAL(ans)[0] = (a) op (b);					\
-	SETSTACK(-2, ans);						\
+	double dval = fun(a, b);					\
+	SETSTACK_REAL_EX(-2, dval, ans);				\
 	R_BCNodeStackTop--;						\
 	NEXT();								\
     } while (0)
 
-# define DO_FAST_BINOP_INT(op, a, b) do { \
-	double dval = ((double) (a)) op ((double) (b)); \
-	if (dval <= INT_MAX && dval >= INT_MIN + 1) {	\
+# define DO_FAST_BINOP_INT(fun, a, b, ans) do {				\
+	double dval = fun((double) (a), (double) (b));			\
+	if (dval <= INT_MAX && dval >= INT_MIN + 1) {			\
+	    int val = (int) dval;					\
 	    SKIP_OP();							\
-	    SEXP sa = R_BCNodeStackTop[-2];				\
-	    SEXP sb = R_BCNodeStackTop[-1];				\
-	    SEXP ans;							\
-	    if (NO_REFERENCES(sa) && TYPEOF(sa) == INTSXP) ans = sa;	\
-	    else if (NO_REFERENCES(sb) && TYPEOF(sb) == INTSXP) ans = sb; \
-	    else ans = allocVector(INTSXP, 1);				\
-	    INTEGER(ans)[0] = (int) dval;				\
-	    SETSTACK(-2, ans);						\
+	    SETSTACK_INTEGER_EX(-2, val, ans);				\
 	    R_BCNodeStackTop--;						\
 	    NEXT();							\
 	}								\
     } while(0)
 #endif
 
+#define FastUnary(op, opsym) do {					\
+	scalar_value_t vx;						\
+	SEXP sa = NULL;							\
+	int typex = bcStackScalarEx(R_BCNodeStackTop - 1, &vx, &sa);	\
+	if (typex == REALSXP) {						\
+	    SKIP_OP();							\
+	    SETSTACK_REAL_EX(-1, op vx.dval, sa);			\
+	    NEXT();							\
+	}								\
+	else if (typex == INTSXP && vx.ival != NA_INTEGER) {		\
+	    SKIP_OP();							\
+	    SETSTACK_INTEGER_EX(-1, op vx.ival, sa);			\
+	    NEXT();							\
+	}								\
+	Arith1(opsym);							\
+    } while (0)
+
 # define FastBinary(op,opval,opsym) do { \
     scalar_value_t vx; \
     scalar_value_t vy; \
-    int typex = bcStackScalar(R_BCNodeStackTop - 2, &vx); \
-    int typey = bcStackScalar(R_BCNodeStackTop - 1, &vy); \
+    SEXP sa = NULL; \
+    SEXP sb = NULL; \
+    int typex = bcStackScalarEx(R_BCNodeStackTop - 2, &vx, &sa);	\
+    int typey = bcStackScalarEx(R_BCNodeStackTop - 1, &vy, &sb);	\
     if (typex == REALSXP) { \
 	if (typey == REALSXP) \
-	    DO_FAST_BINOP(op, vx.dval, vy.dval); \
+	    DO_FAST_BINOP(op, vx.dval, vy.dval, sa ? sa : sb);	\
 	else if (typey == INTSXP && vy.ival != NA_INTEGER) \
-	    DO_FAST_BINOP(op, vx.dval, vy.ival); \
+	    DO_FAST_BINOP(op, vx.dval, vy.ival, sa);	   \
     } \
     else if (typex == INTSXP && vx.ival != NA_INTEGER) { \
 	if (typey == REALSXP) \
-	    DO_FAST_BINOP(op, vx.ival, vy.dval); \
+	    DO_FAST_BINOP(op, vx.ival, vy.dval, sb);	     \
 	else if (typey == INTSXP && vy.ival != NA_INTEGER) { \
-	    if (opval == DIVOP) \
-		DO_FAST_BINOP(op, (double) vx.ival, (double) vy.ival); \
+	    if (opval == DIVOP || opval == POWOP) \
+		DO_FAST_BINOP(op, (double) vx.ival, (double) vy.ival, NULL); \
 	    else \
-		DO_FAST_BINOP_INT(op, vx.ival, vy.ival); \
+		DO_FAST_BINOP_INT(op, vx.ival, vy.ival, sa ? sa : sb);	\
 	} \
     } \
     Arith2(opval, opsym); \
 } while (0)
 
+#define R_ADD(x, y) ((x) + (y))
+#define R_SUB(x, y) ((x) - (y))
+#define R_MUL(x, y) ((x) * (y))
+#define R_DIV(x, y) ((x) / (y))
+
+#include "arithmetic.h"
+
+/* The current (as of r67808) Windows toolchain compiles explicit sqrt
+   calls in a way that returns a different NaN than NA_real_ when
+   called with NA_real_. Not sure this is a bug in the Windows
+   toolchain or in our expectations, but these defines attempt to work
+   around this. */
+#if (defined(_WIN32) || defined(_WIN64)) && defined(__GNUC__) && \
+    __GNUC__ <= 4
+# define R_sqrt(x) (ISNAN(x) ? x : sqrt(x))
+#else
+# define R_sqrt sqrt
+#endif
+
+#define DO_LOG() do {							\
+	scalar_value_t vx;						\
+	SEXP sa = NULL;							\
+	int typex = bcStackScalarRealEx(R_BCNodeStackTop - 1, &vx, &sa); \
+	if (typex == REALSXP) {						\
+	    double dval = R_log(vx.dval);				\
+	    if (CMP_ISNAN(dval)) {					\
+		SEXP call = VECTOR_ELT(constants, GETOP());		\
+		if (ISNAN(vx.dval)) dval = vx.dval;			\
+		else warningcall(call, R_MSG_NA);			\
+	    }								\
+	    else SKIP_OP();						\
+	    SETSTACK_REAL_EX(-1, dval, sa);				\
+	    NEXT();							\
+	}								\
+	SEXP call = VECTOR_ELT(constants, GETOP());			\
+	SEXP args = CONS_NR(GETSTACK(-1), R_NilValue);			\
+	SETSTACK(-1, args); /* to protect */				\
+	SEXP op = getPrimitive(R_LogSym, SPECIALSXP);			\
+	SETSTACK(-1, do_log_builtin(call, op, args, rho));		\
+	NEXT();								\
+ } while (0)
+
+#define DO_LOGBASE() do {						\
+	scalar_value_t vx, vy;						\
+	SEXP sa = NULL;							\
+	SEXP sb = NULL;							\
+	int typex = bcStackScalarRealEx(R_BCNodeStackTop - 2, &vx, &sa); \
+	int typey = bcStackScalarRealEx(R_BCNodeStackTop - 1, &vy, &sb); \
+	if (typex == REALSXP && typey == REALSXP) {			\
+	    double dval = logbase(vx.dval, vy.dval);			\
+	    if (ISNAN(dval)) {						\
+		SEXP call = VECTOR_ELT(constants, GETOP());		\
+		if (ISNAN(vx.dval)) dval = vx.dval;			\
+		else if (ISNAN(vy.dval)) dval = vy.dval;		\
+		else warningcall(call, R_MSG_NA);			\
+	    }								\
+	    else SKIP_OP();						\
+	    R_BCNodeStackTop--;						\
+	    SETSTACK_REAL_EX(-1, dval, sa);				\
+	    NEXT();							\
+	}								\
+	SEXP call = VECTOR_ELT(constants, GETOP());			\
+	SEXP tmp = GETSTACK(-2);					\
+	SEXP args = CONS_NR(tmp, CONS_NR(GETSTACK(-1), R_NilValue));	\
+	R_BCNodeStackTop--;						\
+	SETSTACK(-1, args); /* to protect */				\
+	SEXP op = getPrimitive(R_LogSym, SPECIALSXP);			\
+	SETSTACK(-1, do_log_builtin(call, op, args, rho));		\
+	NEXT();								\
+    } while (0)
+
+#include <Rmath.h>
+/* Keep the order consistent with the order in the byte code compiler! */
+static struct { const char *name; SEXP sym; double (*fun)(double); }
+    math1funs[] = {
+	{"floor", NULL, floor},
+	{"ceiling", NULL, ceil},
+	{"sign", NULL, sign},
+
+	{"expm1", NULL, expm1},
+	{"log1p", NULL, log1p},
+
+	{"cos", NULL, cos},
+	{"sin", NULL, sin},
+	{"tan", NULL, tan},
+	{"acos", NULL, acos},
+	{"asin", NULL, asin},
+	{"atan", NULL, atan},
+
+	{"cosh", NULL, cosh},
+	{"sinh", NULL, sinh},
+	{"tanh", NULL, tanh},
+	{"acosh", NULL, acosh},
+	{"asinh", NULL, asinh},
+	{"atanh", NULL, atanh},
+
+	{"lgamma", NULL, lgammafn},
+	{"gamma", NULL, gammafn},
+	{"digamma", NULL, digamma},
+	{"trigamma", NULL, trigamma},
+
+	{"cospi", NULL, cospi},
+	{"sinpi", NULL, sinpi},
+#ifndef HAVE_TANPI
+	{"tanpi", NULL, tanpi}
+#else
+	{"tanpi", NULL, Rtanpi}
+#endif
+    };
+
+static R_INLINE double (*getMath1Fun(int i, SEXP call))(double) {
+    if (math1funs[i].sym == NULL)
+	math1funs[i].sym = install(math1funs[i].name);
+    if (CAR(call) != math1funs[i].sym)
+	error("math1 compiler/interpreter mismatch");
+    return math1funs[i].fun;
+}
+
+#define DO_MATH1() do {							\
+	SEXP call = VECTOR_ELT(constants, GETOP());			\
+	double (*fun)(double) = getMath1Fun(GETOP(), call);		\
+	scalar_value_t vx;						\
+	SEXP sa = NULL;							\
+	int typex = bcStackScalarRealEx(R_BCNodeStackTop - 1, &vx, &sa); \
+	if (typex == REALSXP) {						\
+	    double dval = fun(vx.dval);					\
+            if (ISNAN(dval)) {						\
+		if (ISNAN(vx.dval)) dval = vx.dval;			\
+		else warningcall(call, R_MSG_NA);			\
+	    }								\
+	    SETSTACK_REAL_EX(-1, dval, sa);				\
+	    NEXT();							\
+	}								\
+	SEXP args = CONS_NR(GETSTACK(-1), R_NilValue);			\
+	SEXP sym = CAR(call);						\
+	SETSTACK(-1, args); /* to protect */				\
+	SEXP op = getPrimitive(sym, BUILTINSXP);			\
+	SETSTACK(-1, do_math1(call, op, args, rho));			\
+	NEXT();								\
+    } while (0)
+
+#include <Rdynpriv.h>
+
+#define DOTCALL_MAX 16
+#define DO_DOTCALL() do {						\
+	SEXP call = VECTOR_ELT(constants, GETOP());			\
+	int nargs = GETOP();						\
+	DL_FUNC ofun = R_dotCallFn(GETSTACK(- nargs - 1), call, nargs);	\
+	if (ofun && nargs <= DOTCALL_MAX) {				\
+	    SEXP cargs[DOTCALL_MAX];					\
+	    for (int i = 0; i < nargs; i++)				\
+		cargs[i] = GETSTACK(i - nargs);				\
+	    SEXP val = R_doDotCall(ofun, nargs, cargs, call);		\
+	    R_BCNodeStackTop -= nargs;					\
+	    SETSTACK(-1, val);						\
+	    NEXT();							\
+	}								\
+	SEXP args = R_NilValue;						\
+	BCNPUSH(args); /* allocate space for protecting args */		\
+	while (nargs-- >= 0) {						\
+	    args = CONS_NR(GETSTACK(-2), args);				\
+	    SETSTACK(-2, args); /* to protect */			\
+	    BCNPOP_IGNORE_VALUE();					\
+	}								\
+	SEXP sym = CAR(call);						\
+	SEXP op = getPrimitive(sym, BUILTINSXP);			\
+	SETSTACK(-1, do_dotcall(call, op, args, rho));			\
+	NEXT();								\
+    } while (0)
+
+#define DO_COLON() do {							\
+	scalar_value_t vx;						\
+	scalar_value_t vy;						\
+	int typex = bcStackScalarRealEx(R_BCNodeStackTop - 2, &vx, NULL); \
+	int typey = bcStackScalarRealEx(R_BCNodeStackTop - 1, &vy, NULL); \
+	if (typex == REALSXP && typey == REALSXP) {			\
+	    double rn1 = vx.dval;					\
+	    double rn2 = vy.dval;					\
+	    if (R_FINITE(rn1) && R_FINITE(rn2) &&			\
+		INT_MIN <= rn1 && INT_MAX >= rn1 &&			\
+		INT_MIN <= rn2 && INT_MAX >- rn2 &&			\
+		rn1 == (int) rn1 && rn2 == (int) rn2) {			\
+		SKIP_OP(); /* skip 'call' index */			\
+		R_BCNodeStackTop--;					\
+		SETSTACK_INTSEQ(-1, rn1, rn2);				\
+		NEXT();							\
+	    }								\
+	}								\
+	Builtin2(do_colon, R_ColonSymbol, rho);				\
+    } while (0)
+
+#define DO_SEQ_ALONG() do {					\
+	SEXP x = GETSTACK(-1);					\
+	if (! OBJECT(x)) {					\
+	    R_xlen_t len = xlength(x);				\
+	    if (len >= 1 && len <= INT_MAX) {			\
+		SKIP_OP(); /* skip 'call' index */		\
+		SETSTACK_INTSEQ(-1, 1, len);			\
+		NEXT();						\
+	    }							\
+	}							\
+	Builtin1(do_seq_along, install("seq_along"), rho);	\
+    } while (0)
+
+#define DO_SEQ_LEN() do {						\
+	scalar_value_t vx;						\
+	int typex = bcStackScalarRealEx(R_BCNodeStackTop - 1, &vx, NULL); \
+	if (typex == REALSXP) {						\
+	    double rlen = vx.dval;					\
+	    if (1 <= rlen && INT_MAX >= rlen &&				\
+		rlen == (int) rlen) {					\
+		SKIP_OP(); /* skip 'call' index */			\
+		SETSTACK_INTSEQ(-1, 1, rlen);				\
+		NEXT();							\
+	    }								\
+	}								\
+	Builtin1(do_seq_len, install("seq_len"), rho);			\
+    } while (0)
+
+static R_INLINE SEXP getForLoopSeq(int offset, Rboolean *iscompact)
+{
+#if defined(TYPED_STACK) && defined(COMPACT_INTSEQ)
+    R_bcstack_t *s = R_BCNodeStackTop + offset;
+    if (s->tag == INTSEQSXP) {
+	*iscompact = TRUE;
+	return s->u.sxpval;
+    }
+#endif
+    *iscompact = FALSE;
+    return GETSTACK(offset);
+}
+
 #define BCNPUSH(v) do { \
   SEXP __value__ = (v); \
   R_bcstack_t *__ntop__ = R_BCNodeStackTop + 1; \
   if (__ntop__ > R_BCNodeStackEnd) nodeStackOverflow(); \
-  __ntop__[-1] = __value__; \
+  SETSTACK(0, __value__); \
+  R_BCNodeStackTop = __ntop__; \
+} while (0)
+
+#ifdef TYPED_STACK
+#define BCNPUSH_REAL(v) do { \
+  double __value__ = (v); \
+  R_bcstack_t *__ntop__ = R_BCNodeStackTop + 1; \
+  if (__ntop__ > R_BCNodeStackEnd) nodeStackOverflow(); \
+  __ntop__[-1].u.dval = __value__; \
+  __ntop__[-1].tag = REALSXP; \
+  R_BCNodeStackTop = __ntop__; \
+} while (0)
+
+#define BCNPUSH_INTEGER(v) do { \
+  int __value__ = (v); \
+  R_bcstack_t *__ntop__ = R_BCNodeStackTop + 1; \
+  if (__ntop__ > R_BCNodeStackEnd) nodeStackOverflow(); \
+  __ntop__[-1].u.ival = __value__; \
+  __ntop__[-1].tag = INTSXP; \
   R_BCNodeStackTop = __ntop__; \
 } while (0)
+#endif
 
 #define BCNDUP() do { \
     R_bcstack_t *__ntop__ = R_BCNodeStackTop + 1; \
@@ -3424,18 +4473,48 @@ static SEXP cmp_arith2(SEXP call, int opval, SEXP opsym, SEXP x, SEXP y,
 
 #define BCCONSTS(e) BCODE_CONSTS(e)
 
-static void nodeStackOverflow()
+static void NORET nodeStackOverflow()
 {
     error(_("node stack overflow"));
 }
 
 #ifdef BC_INT_STACK
-static void intStackOverflow()
+static void NORET intStackOverflow()
 {
     error(_("integer stack overflow"));
 }
 #endif
 
+#ifdef TYPED_STACK
+
+/* Allocate consecutive space of nelems node stack elements */
+static R_INLINE void* BCNALLOC(int nelems) {
+    void *ans;
+
+    BCNSTACKCHECK(nelems + 1);
+    R_BCNodeStackTop->tag = RAWMEM_TAG;
+    R_BCNodeStackTop->u.ival = nelems;
+    R_BCNodeStackTop++;
+    ans = R_BCNodeStackTop;
+    R_BCNodeStackTop += nelems;
+    return ans;
+}
+#else
+# error BCNALLOC and such for untyped stack not available yet
+#endif
+
+/* Allocate R context on the node stack */
+#define RCNTXT_ELEMS ((sizeof(RCNTXT) + sizeof(R_bcstack_t) - 1) \
+			/ sizeof(R_bcstack_t))
+
+#define BCNALLOC_CNTXT() (RCNTXT *)BCNALLOC(RCNTXT_ELEMS)
+
+static R_INLINE void BCNPOP_AND_END_CNTXT() {
+    RCNTXT* cntxt = (RCNTXT *)(R_BCNodeStackTop - RCNTXT_ELEMS);
+    endcontext(cntxt);
+    R_BCNodeStackTop -= RCNTXT_ELEMS + 1;
+}
+
 static SEXP bytecodeExpr(SEXP e)
 {
     if (isByteCode(e)) {
@@ -3446,6 +4525,11 @@ static SEXP bytecodeExpr(SEXP e)
     else return e;
 }
 
+SEXP R_BytecodeExpr(SEXP e)
+{
+    return bytecodeExpr(e);
+}
+
 SEXP R_PromiseExpr(SEXP p)
 {
     return bytecodeExpr(PRCODE(p));
@@ -3459,19 +4543,24 @@ SEXP R_ClosureExpr(SEXP p)
 #ifdef THREADED_CODE
 typedef union { void *v; int i; } BCODE;
 
-static struct { void *addr; int argc; } opinfo[OPCOUNT];
+/* Declare opinfo volatile to prevent gcc 6 from making a local copy
+   in bcEval stack frames and thus increasing stack usage
+   dramatically */
+volatile
+static struct { void *addr; int argc; char *instname; } opinfo[OPCOUNT];
 
 #define OP(name,n) \
   case name##_OP: opinfo[name##_OP].addr = (__extension__ &&op_##name); \
     opinfo[name##_OP].argc = (n); \
+    opinfo[name##_OP].instname = #name; \
     goto loop; \
     op_##name
 
 #define BEGIN_MACHINE  NEXT(); init: { loop: switch(which++)
-#define LASTOP } value = R_NilValue; goto done
+#define LASTOP } retvalue = R_NilValue; goto done
 #define INITIALIZE_MACHINE() if (body == NULL) goto init
 
-#define NEXT() (__extension__ ({goto *(*pc++).v;}))
+#define NEXT() (__extension__ ({currentpc = pc; goto *(*pc++).v;}))
 #define GETOP() (*pc++).i
 #define SKIP_OP() (pc++)
 
@@ -3482,9 +4571,9 @@ typedef int BCODE;
 #define OP(name,argc) case name##_OP
 
 #ifdef BC_PROFILING
-#define BEGIN_MACHINE  loop: current_opcode = *pc; switch(*pc++)
+#define BEGIN_MACHINE  loop: currentpc = pc; current_opcode = *pc; switch(*pc++)
 #else
-#define BEGIN_MACHINE  loop: switch(*pc++)
+#define BEGIN_MACHINE  loop: currentpc = pc; switch(*pc++)
 #endif
 #define LASTOP  default: error(_("bad opcode"))
 #define INITIALIZE_MACHINE()
@@ -3512,7 +4601,7 @@ static R_INLINE SEXP BINDING_VALUE(SEXP loc)
    table is used as the cache index.  Two options can be used to chose
    among implementation strategies:
 
-       If CACHE_ON_STACK is defined the the cache is allocated on the
+       If CACHE_ON_STACK is defined the cache is allocated on the
        byte code stack. Otherwise it is allocated on the heap as a
        VECSXP.  The stack-based approach is more efficient, but runs
        the risk of running out of stack space.
@@ -3521,7 +4610,8 @@ static R_INLINE SEXP BINDING_VALUE(SEXP loc)
        used. The value must be a power of 2 so a modulus computation x
        % CACHE_MAX can be done as x & (CACHE_MAX - 1). More than 90%
        of the closures in base have constant pools with fewer than 128
-       entries when compiled, to that is a good value to use.
+       entries when compiled, to that is a good value to use. But
+       increasing to 256 handles some benchmark scripts a bit better.
 
    On average about 1/3 of constant pool entries are symbols, so this
    approach wastes some space.  This could be avoided by grouping the
@@ -3539,23 +4629,10 @@ static R_INLINE SEXP BINDING_VALUE(SEXP loc)
    invalidating the cache would be needed. This is certainly possible,
    but finding an efficient mechanism does not seem to be easy.   LT */
 
-/* Both mechanisms implemented here make use of the stack to hold
-   cache information.  This is not a problem except for "safe" for()
-   loops using the STARTLOOPCNTXT instruction to run the body in a
-   separate bcEval call.  Since this approach expects loop setup
-   information to be passed on the stack from the outer bcEval call to
-   an inner one the inner one cannot put things on the stack. For now,
-   bcEval takes an additional argument that disables the cache in
-   calls via STARTLOOPCNTXT for all "safe" loops. It would be better
-   to deal with this in some other way, for example by having a
-   specific STARTFORLOOPCNTXT instruction that deals with transferring
-   the information in some other way. For now disabling the cache is
-   an expedient solution. LT */
-
 #define USE_BINDING_CACHE
 # ifdef USE_BINDING_CACHE
 /* CACHE_MAX must be a power of 2 for modulus using & CACHE_MASK to work*/
-# define CACHE_MAX 128
+# define CACHE_MAX 256
 # ifdef CACHE_MAX
 #  define CACHE_MASK (CACHE_MAX - 1)
 #  define CACHEIDX(i) ((i) & CACHE_MASK)
@@ -3566,13 +4643,14 @@ static R_INLINE SEXP BINDING_VALUE(SEXP loc)
 # define CACHE_ON_STACK
 # ifdef CACHE_ON_STACK
 typedef R_bcstack_t * R_binding_cache_t;
+#  define VCACHE(i) GETSTACK_SXPVAL_PTR(vcache + (i))
 #  define GET_CACHED_BINDING_CELL(vcache, sidx) \
-    (vcache ? vcache[CACHEIDX(sidx)] : R_NilValue)
+    (vcache ? VCACHE(CACHEIDX(sidx)) : R_NilValue)
 #  define GET_SMALLCACHE_BINDING_CELL(vcache, sidx) \
-    (vcache ? vcache[sidx] : R_NilValue)
+    (vcache ? VCACHE(sidx) : R_NilValue)
 
 #  define SET_CACHED_BINDING(vcache, sidx, cell) \
-    do { if (vcache) vcache[CACHEIDX(sidx)] = (cell); } while (0)
+    do { if (vcache) VCACHE(CACHEIDX(sidx)) = (cell); } while (0)
 # else
 typedef SEXP R_binding_cache_t;
 #  define GET_CACHED_BINDING_CELL(vcache, sidx) \
@@ -3611,7 +4689,7 @@ static R_INLINE SEXP GET_BINDING_CELL_CACHE(SEXP symbol, SEXP rho,
     }
 }
 
-static void MISSING_ARGUMENT_ERROR(SEXP symbol)
+static void NORET MISSING_ARGUMENT_ERROR(SEXP symbol)
 {
     const char *n = CHAR(PRINTNAME(symbol));
     if(*n) error(_("argument \"%s\" is missing, with no default"), n);
@@ -3621,7 +4699,7 @@ static void MISSING_ARGUMENT_ERROR(SEXP symbol)
 #define MAYBE_MISSING_ARGUMENT_ERROR(symbol, keepmiss) \
     do { if (! keepmiss) MISSING_ARGUMENT_ERROR(symbol); } while (0)
 
-static void UNBOUND_VARIABLE_ERROR(SEXP symbol)
+static void NORET UNBOUND_VARIABLE_ERROR(SEXP symbol)
 {
     error(_("object '%s' not found"), EncodeChar(PRINTNAME(symbol)));
 }
@@ -3673,9 +4751,11 @@ static R_INLINE SEXP getvar(SEXP symbol, SEXP rho,
 	UNBOUND_VARIABLE_ERROR(symbol);
     else if (value == R_MissingArg)
 	MAYBE_MISSING_ARGUMENT_ERROR(symbol, keepmiss);
-    else if (TYPEOF(value) == PROMSXP)
+    else if (TYPEOF(value) == PROMSXP) {
+	PROTECT(value);
 	value = FORCE_PROMISE(value, symbol, rho, keepmiss);
-    else if (NAMED(value) == 0 && value != R_NilValue)
+	UNPROTECT(1);
+    } else if (NAMED(value) == 0 && value != R_NilValue)
 	SET_NAMED(value, 1);
     return value;
 }
@@ -3696,7 +4776,7 @@ static R_INLINE SEXP getvar(SEXP symbol, SEXP rho,
 	SEXP cell = GET_SMALLCACHE_BINDING_CELL(vcache, sidx); \
 	/* try fast handling of REALSXP, INTSXP, LGLSXP */ \
 	/* (cell won't be R_NilValue or an active binding) */ \
-	value = CAR(cell); \
+	SEXP value = CAR(cell); \
 	int type = TYPEOF(value); \
 	switch(type) { \
 	case REALSXP: \
@@ -3743,19 +4823,63 @@ static R_INLINE SEXP getvar(SEXP symbol, SEXP rho,
 } while (0)
 #endif
 
-/* compute the type of the function on the stack for hich arguments
-   are being accumulated */
-#define CALL_FRAME_FTYPE() TYPEOF(GETSTACK(-3))
+/* call frame accessors */
+#define CALL_FRAME_FUN() GETSTACK(-3)
+#define CALL_FRAME_ARGS() GETSTACK(-2)
+#define CALL_FRAME_FTYPE() TYPEOF(CALL_FRAME_FUN())
+#define CALL_FRAME_SIZE() (3)
+
+#define GETSTACK_BELOW_CALL_FRAME(n) GETSTACK((n) - CALL_FRAME_SIZE())
+#define SETSTACK_BELOW_CALL_FRAME(n, v) SETSTACK((n) - CALL_FRAME_SIZE(), v)
+
+/* create room for accumulating the arguments. */
+#define INIT_CALL_FRAME_ARGS() do { \
+	BCNSTACKCHECK(2);	  \
+	SETSTACK(0, R_NilValue);  \
+	SETSTACK(1, R_NilValue);  \
+	R_BCNodeStackTop += 2;	  \
+    } while (0)
+
+/* push the function and create room for accumulating the arguments. */
+#define INIT_CALL_FRAME(fun) do { \
+	BCNPUSH(fun);		\
+	INIT_CALL_FRAME_ARGS();	\
+    } while (0)
+
+/* remove the call frame from the stack and push the return value */
+#define POP_CALL_FRAME(value) POP_CALL_FRAME_PLUS(0, value)
 
-#define PUSHCALLARG(v) PUSHCALLARG_CELL(CONS_NR(v, R_NilValue))
+#define POP_CALL_FRAME_PLUS(n, value) do {	\
+	R_BCNodeStackTop -= (2 + (n));		\
+	SETSTACK(-1, value);			\
+    } while (0)
 
-#define PUSHCALLARG_CELL(c) do { \
-  SEXP __cell__ = (c); \
+/* push an argument to existing call frame */
+/* a call frame always uses boxed stack values, so GETSTACK will not allocate */
+#define PUSHCALLARG(v) do { \
+  SEXP __cell__ = CONS_NR(v, R_NilValue); \
   if (GETSTACK(-2) == R_NilValue) SETSTACK(-2, __cell__); \
   else SETCDR(GETSTACK(-1), __cell__); \
   SETSTACK(-1, __cell__);	       \
 } while (0)
 
+/* place a tag on the most recently pushed call argument */
+#define SETCALLARG_TAG(t) do {			\
+	SEXP __tag__ = (t);			\
+	if (__tag__ != R_NilValue) {		\
+	    SEXP __cell__ = GETSTACK(-1);	\
+	    if (__cell__ != R_NilValue)		   \
+		SET_TAG(__cell__, CreateTag(__tag__));	\
+	}						\
+    } while (0)
+
+/* same, but tag is known to be a symbol */
+#define SETCALLARG_TAG_SYMBOL(t) do {			\
+	SEXP __cell__ = GETSTACK(-1);			\
+	if (__cell__ != R_NilValue)			\
+	    SET_TAG(__cell__, t);			\
+    } while (0)
+
 static int tryDispatch(char *generic, SEXP call, SEXP x, SEXP rho, SEXP *pv)
 {
   RCNTXT cntxt;
@@ -3810,7 +4934,7 @@ static int tryAssignDispatch(char *generic, SEXP call, SEXP lhs, SEXP rhs,
 #define DO_STARTDISPATCH(generic) do { \
   SEXP call = VECTOR_ELT(constants, GETOP()); \
   int label = GETOP(); \
-  value = GETSTACK(-1); \
+  SEXP value = GETSTACK(-1); \
   if (isObject(value) && tryDispatch(generic, call, value, rho, &value)) {\
     SETSTACK(-1, value);						\
     BC_CHECK_SIGINT(); \
@@ -3818,25 +4942,19 @@ static int tryAssignDispatch(char *generic, SEXP call, SEXP lhs, SEXP rhs,
   } \
   else { \
     SEXP tag = TAG(CDR(call)); \
-    SEXP cell = CONS_NR(value, R_NilValue); \
-    BCNSTACKCHECK(4); \
-    SETSTACK(0, call); \
-    SETSTACK(1, R_NilValue); \
-    SETSTACK(2, cell); \
-    SETSTACK(3, cell); \
-    R_BCNodeStackTop += 4; \
-    if (tag != R_NilValue) \
-      SET_TAG(cell, CreateTag(tag)); \
+    BCNPUSH(call); \
+    INIT_CALL_FRAME(R_NilValue); \
+    PUSHCALLARG(value); \
+    SETCALLARG_TAG(tag);   \
   } \
   NEXT(); \
 } while (0)
 
 #define DO_DFLTDISPATCH(fun, symbol) do { \
-  SEXP call = GETSTACK(-4); \
-  SEXP args = GETSTACK(-2); \
-  value = fun(call, symbol, args, rho); \
-  R_BCNodeStackTop -= 4; \
-  SETSTACK(-1, value); \
+  SEXP call = GETSTACK_BELOW_CALL_FRAME(-1); \
+  SEXP args = CALL_FRAME_ARGS(); \
+  SEXP value = fun(call, symbol, args, rho); \
+  POP_CALL_FRAME_PLUS(2, value); \
   NEXT(); \
 } while (0)
 
@@ -3850,6 +4968,7 @@ static int tryAssignDispatch(char *generic, SEXP call, SEXP lhs, SEXP rhs,
     SETSTACK(-2, lhs); \
     SET_NAMED(lhs, 1); \
   } \
+  SEXP value = NULL; \
   if (isObject(lhs) && \
       tryAssignDispatch(generic, call, lhs, rhs, rho, &value)) { \
     R_BCNodeStackTop--;	\
@@ -3859,34 +4978,28 @@ static int tryAssignDispatch(char *generic, SEXP call, SEXP lhs, SEXP rhs,
   } \
   else { \
     SEXP tag = TAG(CDR(call)); \
-    SEXP cell = CONS_NR(lhs, R_NilValue); \
-    BCNSTACKCHECK(4); \
-    SETSTACK(0, call); \
-    SETSTACK(1, R_NilValue); \
-    SETSTACK(2, cell); \
-    SETSTACK(3, cell); \
-    R_BCNodeStackTop += 4; \
-    if (tag != R_NilValue) \
-      SET_TAG(cell, CreateTag(tag)); \
+    BCNPUSH(call); \
+    INIT_CALL_FRAME(R_NilValue); \
+    PUSHCALLARG(lhs); \
+    SETCALLARG_TAG(tag);   \
   } \
   NEXT(); \
 } while (0)
 
 #define DO_DFLT_ASSIGN_DISPATCH(fun, symbol) do { \
-  SEXP rhs = GETSTACK(-5); \
-  SEXP call = GETSTACK(-4); \
-  SEXP args = GETSTACK(-2); \
+  SEXP rhs = GETSTACK_BELOW_CALL_FRAME(-2); \
+  SEXP call = GETSTACK_BELOW_CALL_FRAME(-1); \
+  SEXP args = CALL_FRAME_ARGS(); \
   PUSHCALLARG(rhs); \
-  value = fun(call, symbol, args, rho); \
-  R_BCNodeStackTop -= 5; \
-  SETSTACK(-1, value);	 \
+  SEXP value = fun(call, symbol, args, rho); \
+  POP_CALL_FRAME_PLUS(3, value); \
   NEXT(); \
 } while (0)
 
 #define DO_STARTDISPATCH_N(generic) do { \
     int callidx = GETOP(); \
     int label = GETOP(); \
-    value = GETSTACK(-1); \
+    SEXP value = GETSTACK(-1); \
     if (isObject(value)) { \
 	SEXP call = VECTOR_ELT(constants, callidx); \
 	if (tryDispatch(generic, call, value, rho, &value)) { \
@@ -3910,6 +5023,7 @@ static int tryAssignDispatch(char *generic, SEXP call, SEXP lhs, SEXP rhs,
 	    SETSTACK(-2, lhs); \
 	    SET_NAMED(lhs, 1); \
 	} \
+	SEXP value = NULL; \
 	if (tryAssignDispatch(generic, call, lhs, rhs, rho, &value)) { \
 	    R_BCNodeStackTop--; \
 	    SETSTACK(-1, value); \
@@ -3925,7 +5039,7 @@ static int tryAssignDispatch(char *generic, SEXP call, SEXP lhs, SEXP rhs,
   NEXT(); \
 } while(0)
 #define DO_ISTYPE(type) do { \
-  SETSTACK(-1, TYPEOF(GETSTACK(-1)) == type ? mkTrue() : mkFalse()); \
+  SETSTACK(-1, TYPEOF(GETSTACK(-1)) == type ? R_TrueValue : R_FalseValue); \
   NEXT(); \
 } while (0)
 #define isNumericOnly(x) (isNumeric(x) && ! isLogical(x))
@@ -3957,157 +5071,277 @@ static int opcode_counts[OPCOUNT];
 } while (0)
 #endif
 
-static void loopWithContext(volatile SEXP code, volatile SEXP rho)
+static R_INLINE R_xlen_t bcStackIndex(R_bcstack_t *s)
 {
-    RCNTXT cntxt;
-    begincontext(&cntxt, CTXT_LOOP, R_NilValue, rho, R_BaseEnv, R_NilValue,
-		 R_NilValue);
-    if (SETJMP(cntxt.cjmpbuf) != CTXT_BREAK)
-	bcEval(code, rho, FALSE);
-    endcontext(&cntxt);
-}
-
-static R_INLINE int bcStackIndex(R_bcstack_t *s)
-{
-    SEXP idx = *s;
-    switch(TYPEOF(idx)) {
+#ifdef TYPED_STACK
+    switch(s->tag) {
     case INTSXP:
-	if (LENGTH(idx) == 1 && INTEGER(idx)[0] != NA_INTEGER)
-	    return INTEGER(idx)[0];
+	if (s->u.ival != NA_INTEGER)
+	    return s->u.ival;
 	else return -1;
     case REALSXP:
-	if (LENGTH(idx) == 1) {
-	    double val = REAL(idx)[0];
-	    if (! ISNAN(val) && val <= INT_MAX && val > INT_MIN)
-		return (int) val;
+	{
+	    double val = s->u.dval;
+	    if (! ISNAN(val) && val <= R_XLEN_T_MAX && val > 0)
+		return (R_xlen_t) s->u.dval;
 	    else return -1;
 	}
+    case LGLSXP: return -1;
+    default: break;
+    }
+#endif
+    SEXP idx = GETSTACK_SXPVAL_PTR(s);
+    if (IS_SCALAR(idx, INTSXP)) {
+	if (INTEGER(idx)[0] != NA_INTEGER)
+	    return INTEGER(idx)[0];
+	else return -1;
+    }
+    else if (IS_SCALAR(idx, REALSXP)) {
+	double val = REAL(idx)[0];
+	if (! ISNAN(val) && val <= R_XLEN_T_MAX && val > 0)
+	    return (R_xlen_t) val;
 	else return -1;
-    default: return -1;
     }
+    else return -1;
+}
+
+static R_INLINE SEXP mkVector1(SEXP s)
+{
+    SEXP t = allocVector(VECSXP, 1);
+    SET_VECTOR_ELT(t, 0, s);
+    return t;
 }
 
+#define DO_FAST_VECELT(sv, vec,  i, subset2) do {		\
+	switch (TYPEOF(vec)) {					\
+	case REALSXP:						\
+	    if (XLENGTH(vec) <= i) break;			\
+	    SETSTACK_REAL_PTR(sv, REAL(vec)[i]);		\
+	    return;						\
+	case INTSXP:						\
+	    if (XLENGTH(vec) <= i) break;			\
+	    SETSTACK_INTEGER_PTR(sv, INTEGER(vec)[i]);		\
+	    return;						\
+	case LGLSXP:						\
+	    if (XLENGTH(vec) <= i) break;			\
+	    SETSTACK_LOGICAL_PTR(sv, LOGICAL(vec)[i]);		\
+	    return;						\
+	case CPLXSXP:						\
+	    if (XLENGTH(vec) <= i) break;			\
+	    SETSTACK_PTR(sv, ScalarComplex(COMPLEX(vec)[i]));	\
+	    return;						\
+	case RAWSXP:						\
+	    if (XLENGTH(vec) <= i) break;			\
+	    SETSTACK_PTR(sv, ScalarRaw(RAW(vec)[i]));		\
+	    return;						\
+	case VECSXP:						\
+	    if (XLENGTH(vec) <= i) break;			\
+	    SEXP elt = VECTOR_ELT(vec, i);			\
+	    if (NAMED(vec) > NAMED(elt))			\
+		SET_NAMED(elt, NAMED(vec));			\
+	    if (subset2)					\
+		SETSTACK_PTR(sv, elt);				\
+	    else						\
+		SETSTACK_PTR(sv, mkVector1(elt));		\
+	    return;						\
+	}							\
+    } while (0)
+
+#define FAST_VECELT_OK(vec) \
+    (ATTRIB(vec) == R_NilValue ||		\
+     (TAG(ATTRIB(vec)) == R_DimSymbol &&	\
+      CDR(ATTRIB(vec)) == R_NilValue))
+
 static R_INLINE void VECSUBSET_PTR(R_bcstack_t *sx, R_bcstack_t *si,
-				   R_bcstack_t *sv, SEXP rho)
+				   R_bcstack_t *sv, SEXP rho,
+				   SEXP consts, int callidx,
+				   Rboolean subset2)
 {
     SEXP idx, args, value;
     SEXP vec = GETSTACK_PTR(sx);
-    int i = bcStackIndex(si) - 1;
+    R_xlen_t i = bcStackIndex(si) - 1;
 
-    if (ATTRIB(vec) == R_NilValue && i >= 0) {
-	switch (TYPEOF(vec)) {
-	case REALSXP:
-	    if (LENGTH(vec) <= i) break;
-	    SETSTACK_REAL_PTR(sv, REAL(vec)[i]);
-	    return;
-	case INTSXP:
-	    if (LENGTH(vec) <= i) break;
-	    SETSTACK_INTEGER_PTR(sv, INTEGER(vec)[i]);
-	    return;
-	case LGLSXP:
-	    if (LENGTH(vec) <= i) break;
-	    SETSTACK_LOGICAL_PTR(sv, LOGICAL(vec)[i]);
-	    return;
-	case CPLXSXP:
-	    if (LENGTH(vec) <= i) break;
-	    SETSTACK_PTR(sv, ScalarComplex(COMPLEX(vec)[i]));
-	    return;
-	case RAWSXP:
-	    if (LENGTH(vec) <= i) break;
-	    SETSTACK_PTR(sv, ScalarRaw(RAW(vec)[i]));
-	    return;
-	}
-    }
+    if (i >= 0 && (subset2 || FAST_VECELT_OK(vec)))
+	DO_FAST_VECELT(sv, vec, i, subset2);
 
     /* fall through to the standard default handler */
     idx = GETSTACK_PTR(si);
     args = CONS_NR(idx, R_NilValue);
     args = CONS_NR(vec, args);
     PROTECT(args);
-    value = do_subset_dflt(R_NilValue, R_SubsetSym, args, rho);
+    SEXP call = callidx < 0 ? consts : VECTOR_ELT(consts, callidx);
+    if (subset2)
+	value = do_subset2_dflt(call, R_Subset2Sym, args, rho);
+    else
+	value = do_subset_dflt(call, R_SubsetSym, args, rho);
     UNPROTECT(1);
     SETSTACK_PTR(sv, value);
 }
 
-#define DO_VECSUBSET(rho) do { \
-    VECSUBSET_PTR(R_BCNodeStackTop - 2, R_BCNodeStackTop - 1, \
-		  R_BCNodeStackTop - 2, rho); \
-    R_BCNodeStackTop--; \
-} while(0)
+#define DO_VECSUBSET(rho, sub2) do {					\
+	int callidx = GETOP();						\
+	VECSUBSET_PTR(R_BCNodeStackTop - 2, R_BCNodeStackTop - 1,	\
+		      R_BCNodeStackTop - 2, rho,			\
+		      constants, callidx, sub2);			\
+	R_BCNodeStackTop--;						\
+    } while(0)
 
 static R_INLINE SEXP getMatrixDim(SEXP mat)
 {
-    if (! OBJECT(mat) &&
-	TAG(ATTRIB(mat)) == R_DimSymbol &&
-	CDR(ATTRIB(mat)) == R_NilValue) {
-	SEXP dim = CAR(ATTRIB(mat));
-	if (TYPEOF(dim) == INTSXP && LENGTH(dim) == 2)
-	    return dim;
-	else return R_NilValue;
-    }
+    SEXP attr = ATTRIB(mat);
+    /* look for the common case of 'dim' as the only attribute first */
+    SEXP dim = TAG(attr) == R_DimSymbol ? CAR(attr) :
+	getAttrib(mat, R_DimSymbol);
+    if (TYPEOF(dim) == INTSXP && LENGTH(dim) == 2)
+	return dim;
     else return R_NilValue;
 }
 
-static R_INLINE void DO_MATSUBSET(SEXP rho)
+static R_INLINE SEXP getArrayDim(SEXP mat)
 {
-    SEXP idx, jdx, args, value;
-    SEXP mat = GETSTACK(-3);
-    SEXP dim = getMatrixDim(mat);
+    SEXP attr = ATTRIB(mat);
+    /* look for the common case of 'dim' as the only attribute first */
+    SEXP dim = TAG(attr) == R_DimSymbol ? CAR(attr) :
+	getAttrib(mat, R_DimSymbol);
+    if (TYPEOF(dim) == INTSXP && LENGTH(dim) > 0)
+	return dim;
+    else return R_NilValue;
+}
 
-    if (dim != R_NilValue) {
-	int i = bcStackIndex(R_BCNodeStackTop - 2);
-	int j = bcStackIndex(R_BCNodeStackTop - 1);
-	int nrow = INTEGER(dim)[0];
-	int ncol = INTEGER(dim)[1];
-	if (i > 0 && j > 0 && i <= nrow && j <= ncol) {
-	    int k = i - 1 + nrow * (j - 1);
-	    switch (TYPEOF(mat)) {
-	    case REALSXP:
-		if (LENGTH(mat) <= k) break;
-		R_BCNodeStackTop -= 2;
-		SETSTACK_REAL(-1, REAL(mat)[k]);
-		return;
-	    case INTSXP:
-		if (LENGTH(mat) <= k) break;
-		R_BCNodeStackTop -= 2;
-		SETSTACK_INTEGER(-1, INTEGER(mat)[k]);
-		return;
-	    case LGLSXP:
-		if (LENGTH(mat) <= k) break;
-		R_BCNodeStackTop -= 2;
-		SETSTACK_LOGICAL(-1, LOGICAL(mat)[k]);
-		return;
-	    case CPLXSXP:
-		if (LENGTH(mat) <= k) break;
-		R_BCNodeStackTop -= 2;
-		SETSTACK(-1, ScalarComplex(COMPLEX(mat)[k]));
-		return;
+static R_INLINE R_xlen_t colMajorStackIndex(SEXP dim, int rank, R_bcstack_t *si)
+{
+    if (rank != LENGTH(dim))
+    return -1;
+
+    int *idim = INTEGER(dim);
+
+    R_xlen_t mul = idim[0];
+    R_xlen_t idx = bcStackIndex(si);
+
+    if (idx < 1 || idx > idim[0])
+	return -1;
+
+    R_xlen_t k = idx - 1;
+    for (int i = 1; i < rank; i++) {
+	idx = bcStackIndex(si + i);
+	if (idx < 1 || idx > idim[i])
+	    return -1;
+	k = k + mul * (idx - 1);
+	mul = mul * idim[i];
+    }
+    return k;
+}
+
+static R_INLINE void MATSUBSET_PTR(R_bcstack_t *sx,
+				   R_bcstack_t *si, R_bcstack_t *sj,
+				   R_bcstack_t *sv, SEXP rho,
+				   SEXP consts, int callidx,
+				   Rboolean subset2)
+{
+    SEXP idx, jdx, args, value;
+    SEXP mat = GETSTACK_PTR(sx);
+
+    if (subset2 || FAST_VECELT_OK(mat)) {
+	SEXP dim = getMatrixDim(mat);
+	if (dim != R_NilValue) {
+	    R_xlen_t i = bcStackIndex(si);
+	    R_xlen_t j = bcStackIndex(sj);
+	    R_xlen_t nrow = INTEGER(dim)[0];
+	    R_xlen_t ncol = INTEGER(dim)[1];
+	    if (i > 0 && j > 0 && i <= nrow && j <= ncol) {
+		R_xlen_t k = i - 1 + nrow * (j - 1);
+		DO_FAST_VECELT(sv, mat, k, subset2);
 	    }
 	}
     }
 
     /* fall through to the standard default handler */
-    idx = GETSTACK(-2);
-    jdx = GETSTACK(-1);
+    idx = GETSTACK_PTR(si);
+    jdx = GETSTACK_PTR(sj);
     args = CONS_NR(jdx, R_NilValue);
     args = CONS_NR(idx, args);
     args = CONS_NR(mat, args);
-    SETSTACK(-1, args); /* for GC protection */
-    value = do_subset_dflt(R_NilValue, R_SubsetSym, args, rho);
-    R_BCNodeStackTop -= 2;
-    SETSTACK(-1, value);
+    PROTECT(args);
+    SEXP call = callidx < 0 ? consts : VECTOR_ELT(consts, callidx);
+    if (subset2)
+	value = do_subset2_dflt(call, R_Subset2Sym, args, rho);
+    else
+	value = do_subset_dflt(call, R_SubsetSym, args, rho);
+    UNPROTECT(1);
+    SETSTACK_PTR(sv, value);
 }
 
-#define INTEGER_TO_REAL(x) ((x) == NA_INTEGER ? NA_REAL : (x))
-#define LOGICAL_TO_REAL(x) ((x) == NA_LOGICAL ? NA_REAL : (x))
+#define DO_MATSUBSET(rho, sub2) do {					\
+	int callidx = GETOP();						\
+	MATSUBSET_PTR(R_BCNodeStackTop - 3,				\
+		      R_BCNodeStackTop - 2, R_BCNodeStackTop - 1,	\
+		      R_BCNodeStackTop - 3, rho,			\
+		      constants, callidx, sub2);			\
+	R_BCNodeStackTop -= 2;						\
+    } while (0)
+
+static R_INLINE SEXP addStackArgsList(int n, R_bcstack_t *start, SEXP val)
+{
+    R_bcstack_t *p = start + n - 1;
+    BCNPUSH(val); /* to protect */
+    for (int i = 0; i < n; i++, p--) {
+	val = CONS(GETSTACK_PTR(p), val);
+	SETSTACK(-1, val); /* to protect */
+    }
+    BCNPOP_IGNORE_VALUE();
+    return val;
+}
+
+static R_INLINE SEXP getStackArgsList(int n, R_bcstack_t *start)
+{
+    return addStackArgsList(n, start, R_NilValue);
+}
 
-static R_INLINE Rboolean setElementFromScalar(SEXP vec, int i, int typev,
+static R_INLINE void SUBSET_N_PTR(R_bcstack_t *sx, int rank,
+				  R_bcstack_t *si, R_bcstack_t *sv,
+				  SEXP rho, SEXP consts, int callidx,
+				  Rboolean subset2)
+{
+    SEXP args, value;
+    SEXP x = GETSTACK_PTR(sx);
+
+    if (subset2 || FAST_VECELT_OK(x)) {
+	SEXP dim = getArrayDim(x);
+	if (dim != R_NilValue) {
+	    R_xlen_t k = colMajorStackIndex(dim, rank, si);
+	    if (k >= 0)
+		DO_FAST_VECELT(sv, x, k, subset2);
+	}
+    }
+
+    /* fall through to the standard default handler */
+    PROTECT(args = CONS(x, getStackArgsList(rank, si)));
+    SEXP call = callidx < 0 ? consts : VECTOR_ELT(consts, callidx);
+    if (subset2)
+	value = do_subset2_dflt(call, R_Subset2Sym, args, rho);
+    else
+	value = do_subset_dflt(call, R_SubsetSym, args, rho);
+    UNPROTECT(1);
+    SETSTACK_PTR(sv, value);
+}
+
+#define DO_SUBSET_N(rho, sub2) do {					\
+	int callidx = GETOP();						\
+	int rank = GETOP();						\
+	SUBSET_N_PTR(R_BCNodeStackTop - rank - 1, rank,			\
+		     R_BCNodeStackTop - rank,				\
+		     R_BCNodeStackTop - rank - 1, rho,			\
+		     constants, callidx, sub2);				\
+	R_BCNodeStackTop -= rank;					\
+    } while (0)
+
+static R_INLINE Rboolean setElementFromScalar(SEXP vec, R_xlen_t i, int typev,
 					      scalar_value_t *v)
 {
     if (i < 0) return FALSE;
 
     if (TYPEOF(vec) == REALSXP) {
-	if (LENGTH(vec) <= i) return FALSE;
+	if (XLENGTH(vec) <= i) return FALSE;
 	switch(typev) {
 	case REALSXP: REAL(vec)[i] = v->dval; return TRUE;
 	case INTSXP: REAL(vec)[i] = INTEGER_TO_REAL(v->ival); return TRUE;
@@ -4115,18 +5349,41 @@ static R_INLINE Rboolean setElementFromScalar(SEXP vec, int i, int typev,
 	}
     }
     else if (typev == TYPEOF(vec)) {
-	if (LENGTH(vec) <= i) return FALSE;
-	switch (typev) {
-	case INTSXP: INTEGER(vec)[i] = v->ival; return TRUE;
-	case LGLSXP: LOGICAL(vec)[i] = v->ival; return TRUE;
+	switch(typev) {
+	case INTSXP:
+	    if (XLENGTH(vec) <= i) return FALSE;
+	    INTEGER(vec)[i] = v->ival;
+	    return TRUE;
+	case LGLSXP:
+	    if (XLENGTH(vec) <= i) return FALSE;
+	    LOGICAL(vec)[i] = INTEGER_TO_LOGICAL(v->ival);
+	    return TRUE;
 	}
     }
     return FALSE;
 }
 
-static R_INLINE void SETVECSUBSET_PTR(R_bcstack_t *sx, R_bcstack_t *srhs,
+#define DO_FAST_SETVECELT(sv, srhs, vec,  i, subset2) do {		\
+	scalar_value_t v;						\
+	int typev = bcStackScalar(srhs, &v);				\
+	if (setElementFromScalar(vec, i, typev, &v)) {			\
+	    SETSTACK_PTR(sv, vec);					\
+	    return;							\
+	}								\
+	else if (subassign2 && TYPEOF(vec) == VECSXP && i < XLENGTH(vec)) { \
+	    SEXP rhs = R_FixupRHS(vec, GETSTACK_PTR(srhs));		\
+	    if (rhs != R_NilValue) {					\
+		SET_VECTOR_ELT(vec, i, rhs);				\
+		SETSTACK_PTR(sv, vec);					\
+		return;							\
+	    }								\
+	}								\
+    } while (0)
+
+static R_INLINE void VECSUBASSIGN_PTR(R_bcstack_t *sx, R_bcstack_t *srhs,
 				      R_bcstack_t *si, R_bcstack_t *sv,
-				      SEXP rho)
+				      SEXP rho, SEXP consts, int callidx,
+				      Rboolean subassign2)
 {
     SEXP idx, args, value;
     SEXP vec = GETSTACK_PTR(sx);
@@ -4138,17 +5395,9 @@ static R_INLINE void SETVECSUBSET_PTR(R_bcstack_t *sx, R_bcstack_t *srhs,
     else if (NAMED(vec) == 1)
 	SET_NAMED(vec, 0);
 
-    if (ATTRIB(vec) == R_NilValue) {
-	int i = bcStackIndex(si);
-	if (i > 0) {
-	    scalar_value_t v;
-	    int typev = bcStackScalar(srhs, &v);
-	    if (setElementFromScalar(vec, i - 1, typev, &v)) {
-		SETSTACK_PTR(sv, vec);
-		return;
-	    }
-	}
-    }
+    R_xlen_t i = bcStackIndex(si) - 1;
+    if (i >= 0)
+	DO_FAST_SETVECELT(sv, srhs, vec,  i, subset2);
 
     /* fall through to the standard default handler */
     value = GETSTACK_PTR(srhs);
@@ -4158,26 +5407,35 @@ static R_INLINE void SETVECSUBSET_PTR(R_bcstack_t *sx, R_bcstack_t *srhs,
     args = CONS_NR(idx, args);
     args = CONS_NR(vec, args);
     PROTECT(args);
-    vec = do_subassign_dflt(R_NilValue, R_SubassignSym, args, rho);
+    SEXP call = callidx < 0 ? consts : VECTOR_ELT(consts, callidx);
+    if (subassign2)
+	vec = do_subassign2_dflt(call, R_Subassign2Sym, args, rho);
+    else
+	vec = do_subassign_dflt(call, R_SubassignSym, args, rho);
     UNPROTECT(1);
     SETSTACK_PTR(sv, vec);
 }
 
-static R_INLINE void DO_SETVECSUBSET(SEXP rho)
-{
-    SETVECSUBSET_PTR(R_BCNodeStackTop - 3, R_BCNodeStackTop - 2,
-		     R_BCNodeStackTop - 1, R_BCNodeStackTop - 3, rho);
-    R_BCNodeStackTop -= 2;
-}
+#define DO_VECSUBASSIGN(rho, sub2) do {					\
+	int callidx = GETOP();						\
+	VECSUBASSIGN_PTR(R_BCNodeStackTop - 3, R_BCNodeStackTop - 2,	\
+			 R_BCNodeStackTop - 1, R_BCNodeStackTop - 3,	\
+			 rho, constants, callidx, sub2);		\
+	R_BCNodeStackTop -= 2;						\
+    } while (0)
 
-static R_INLINE void DO_SETMATSUBSET(SEXP rho)
+static R_INLINE void MATSUBASSIGN_PTR(R_bcstack_t *sx, R_bcstack_t *srhs,
+				      R_bcstack_t *si, R_bcstack_t *sj,
+				      R_bcstack_t *sv,
+				      SEXP rho, SEXP consts, int callidx,
+				      Rboolean subassign2)
 {
     SEXP dim, idx, jdx, args, value;
-    SEXP mat = GETSTACK(-4);
+    SEXP mat = GETSTACK_PTR(sx);
 
     if (MAYBE_SHARED(mat)) {
 	mat = duplicate(mat);
-	SETSTACK(-4, mat);
+	SETSTACK_PTR(sx, mat);
     }
     else if (NAMED(mat) == 1)
 	SET_NAMED(mat, 0);
@@ -4185,40 +5443,96 @@ static R_INLINE void DO_SETMATSUBSET(SEXP rho)
     dim = getMatrixDim(mat);
 
     if (dim != R_NilValue) {
-	int i = bcStackIndex(R_BCNodeStackTop - 2);
-	int j = bcStackIndex(R_BCNodeStackTop - 1);
-	int nrow = INTEGER(dim)[0];
-	int ncol = INTEGER(dim)[1];
+	R_xlen_t i = bcStackIndex(si);
+	R_xlen_t j = bcStackIndex(sj);
+	R_xlen_t nrow = INTEGER(dim)[0];
+	R_xlen_t ncol = INTEGER(dim)[1];
 	if (i > 0 && j > 0 && i <= nrow && j <= ncol) {
-	    scalar_value_t v;
-	    int typev = bcStackScalar(R_BCNodeStackTop - 3, &v);
-	    int k = i - 1 + nrow * (j - 1);
-	    if (setElementFromScalar(mat, k, typev, &v)) {
-		R_BCNodeStackTop -= 3;
-		SETSTACK(-1, mat);
-		return;
-	    }
+	    R_xlen_t k = i - 1 + nrow * (j - 1);
+	    DO_FAST_SETVECELT(sv, srhs, mat,  k, subset2);
 	}
     }
 
     /* fall through to the standard default handler */
-    value = GETSTACK(-3);
-    idx = GETSTACK(-2);
-    jdx = GETSTACK(-1);
+    value = GETSTACK_PTR(srhs);
+    idx = GETSTACK_PTR(si);
+    jdx = GETSTACK_PTR(sj);
     args = CONS_NR(value, R_NilValue);
     SET_TAG(args, R_valueSym);
     args = CONS_NR(jdx, args);
     args = CONS_NR(idx, args);
     args = CONS_NR(mat, args);
-    SETSTACK(-1, args); /* for GC protection */
-    mat = do_subassign_dflt(R_NilValue, R_SubassignSym, args, rho);
-    R_BCNodeStackTop -= 3;
-    SETSTACK(-1, mat);
+    PROTECT(args);
+    SEXP call = callidx < 0 ? consts : VECTOR_ELT(consts, callidx);
+    if (subassign2)
+	mat = do_subassign2_dflt(call, R_Subassign2Sym, args, rho);
+    else
+	mat = do_subassign_dflt(call, R_SubassignSym, args, rho);
+    UNPROTECT(1);
+    SETSTACK_PTR(sv, mat);
+}
+
+#define DO_MATSUBASSIGN(rho, sub2) do {					\
+	int callidx = GETOP();						\
+	MATSUBASSIGN_PTR(R_BCNodeStackTop - 4, R_BCNodeStackTop - 3,	\
+			 R_BCNodeStackTop - 2, R_BCNodeStackTop - 1,	\
+			 R_BCNodeStackTop - 4,				\
+			 rho, constants, callidx, sub2);		\
+	R_BCNodeStackTop -= 3;						\
+    } while (0)
+
+static R_INLINE void SUBASSIGN_N_PTR(R_bcstack_t *sx, int rank,
+				     R_bcstack_t *srhs,
+				     R_bcstack_t *si, R_bcstack_t *sv,
+				     SEXP rho, SEXP consts, int callidx,
+				     Rboolean subassign2)
+{
+    SEXP dim, args, value;
+    SEXP x = GETSTACK_PTR(sx);
+
+    if (MAYBE_SHARED(x)) {
+	x = duplicate(x);
+	SETSTACK_PTR(sx, x);
+    }
+    else if (NAMED(x) == 1)
+	SET_NAMED(x, 0);
+
+    dim = getArrayDim(x);
+
+    if (dim != R_NilValue) {
+	R_xlen_t k = colMajorStackIndex(dim, rank, si);
+	if (k >= 0)
+	    DO_FAST_SETVECELT(sv, srhs, x,  k, subset2);
+    }
+
+    /* fall through to the standard default handler */
+    value = GETSTACK_PTR(srhs);
+    args = CONS_NR(value, R_NilValue);
+    SET_TAG(args, R_valueSym);
+    PROTECT(args = CONS(x, addStackArgsList(rank, si, args)));
+    SEXP call = callidx < 0 ? consts : VECTOR_ELT(consts, callidx);
+    if (subassign2)
+	x = do_subassign2_dflt(call, R_Subassign2Sym, args, rho);
+    else
+	x = do_subassign_dflt(call, R_SubassignSym, args, rho);
+    UNPROTECT(1);
+    SETSTACK_PTR(sv, x);
 }
 
+#define DO_SUBASSIGN_N(rho, sub2) do {					\
+	int callidx = GETOP();						\
+	int rank = GETOP();						\
+	SUBASSIGN_N_PTR(R_BCNodeStackTop - rank - 2, rank,		\
+			R_BCNodeStackTop - rank - 1,			\
+			R_BCNodeStackTop - rank,			\
+			R_BCNodeStackTop - rank - 2, rho,		\
+			constants, callidx, sub2);			\
+	R_BCNodeStackTop -= rank + 1;					\
+    } while (0)
+
 #define FIXUP_SCALAR_LOGICAL(callidx, arg, op) do { \
 	SEXP val = GETSTACK(-1); \
-	if (TYPEOF(val) != LGLSXP || LENGTH(val) != 1) { \
+	if (TYPEOF(val) != LGLSXP || XLENGTH(val) != 1) { \
 	    if (!isNumber(val))	\
 		errorcall(VECTOR_ELT(constants, callidx), \
 			  _("invalid %s type in 'x %s y'"), arg, op);	\
@@ -4226,7 +5540,7 @@ static R_INLINE void DO_SETMATSUBSET(SEXP rho)
 	} \
     } while(0)
 
-static R_INLINE void checkForMissings(SEXP args, SEXP call)
+static void signalMissingArgError(SEXP args, SEXP call)
 {
     SEXP a, c;
     int n, k;
@@ -4256,6 +5570,20 @@ static R_INLINE void checkForMissings(SEXP args, SEXP call)
 	}
 }
 
+static R_INLINE void checkForMissings(SEXP args, SEXP call)
+{
+    Rboolean found = FALSE;
+    for (SEXP a = args; a != R_NilValue; a = CDR(a))
+	if (CAR(a) == R_MissingArg) {
+	    found = TRUE;
+	    break;
+	}
+    if (found)
+	signalMissingArgError(args, call);
+}
+
+#define FOR_LOOP_STATE_SIZE 4
+
 #define GET_VEC_LOOP_VALUE(var, pos) do {		\
     (var) = GETSTACK(pos);				\
     if (MAYBE_SHARED(var)) {				\
@@ -4265,24 +5593,294 @@ static R_INLINE void checkForMissings(SEXP args, SEXP call)
     }							\
 } while (0)
 
+/* Loops that cannot have their SETJMPs optimized out are bracketed by
+   STARTLOOPCNTXT and ENLOOPCNTXT instructions.  The STARTLOOPCNTXT
+   instruction stores the target offset for a 'break' and then the
+   target offset for a 'next' on the stack. For a 'for' loop the loop
+   state information is then pushed on the stack as well. The
+   following functions retrieve the offsets. */
+
+static R_INLINE int LOOP_BREAK_OFFSET(int loop_state_size)
+{
+    return GETSTACK_IVAL_PTR(R_BCNodeStackTop - 2 - loop_state_size);
+}
+
+static R_INLINE int LOOP_NEXT_OFFSET(int loop_state_size)
+{
+    return GETSTACK_IVAL_PTR(R_BCNodeStackTop - 1 - loop_state_size);
+}
+
+/* Check whether a call is to a base function; if not use AST interpeter */
+/***** need a faster guard check */
+static R_INLINE SEXP SymbolValue(SEXP sym)
+{
+    if (IS_ACTIVE_BINDING(sym))
+	return eval(sym, R_BaseEnv);
+    else {
+	SEXP value = SYMVALUE(sym);
+	if (TYPEOF(value) == PROMSXP) {
+	    value = PRVALUE(value);
+	    if (value == R_UnboundValue)
+		value = eval(sym, R_BaseEnv);
+	}
+	return value;
+    }
+}
+
+#define DO_BASEGUARD() do {				\
+	SEXP expr = VECTOR_ELT(constants, GETOP());	\
+	int label = GETOP();				\
+	SEXP sym = CAR(expr);				\
+	if (findFun(sym, rho) != SymbolValue(sym)) {	\
+	    BCNPUSH(eval(expr, rho));			\
+	    pc = codebase + label;			\
+	}						\
+    } while (0)
+
 /* The CALLBUILTIN instruction handles calls to both true BUILTINs and
    to .Internals of type BUILTIN. To handle profiling in a way that is
    consistent with this instruction needs to be able to distinguish a
    true BUILTIN from a .Internal. LT */
 #define IS_TRUE_BUILTIN(x) ((R_FunTab[PRIMOFFSET(x)].eval % 100 )/10 == 0)
 
-static R_INLINE SEXP BUMPREFCNT(SEXP x)
+static R_INLINE Rboolean GETSTACK_LOGICAL_NO_NA_PTR(R_bcstack_t *s, int callidx,
+						    SEXP constants)
+{
+#ifdef TYPED_STACK
+    if (s->tag == LGLSXP && s->u.ival != NA_LOGICAL)
+	return s->u.ival;
+#endif
+    SEXP value = GETSTACK_PTR(s);
+    if (IS_SCALAR(value, LGLSXP) && LOGICAL(value)[0] != NA_LOGICAL)
+	return LOGICAL(value)[0];
+    else {
+	SEXP call = VECTOR_ELT(constants, callidx);
+	return asLogicalNoNA(value, call);
+    }
+}
+
+/* Find locations table in the constant pool */
+static SEXP findLocTable(SEXP constants, const char *tclass)
+{
+    int i;
+    /* location tables are at the end of the constant pool */
+    for(i = LENGTH(constants) - 1; i >= 0 ; i--) {
+	SEXP s = VECTOR_ELT(constants, i);
+	/* could use exact check instead of inherits */
+	if (TYPEOF(s) == INTSXP && inherits(s, tclass))
+	    return s;
+    }
+    return R_NilValue;
+}
+
+/* Get a constant pool entry through locations table element */
+static SEXP getLocTableElt(ptrdiff_t relpc, SEXP table, SEXP constants)
+{
+    if (table == R_NilValue || relpc >= LENGTH(table) || relpc < 0)
+	return R_NilValue;
+
+    int cidx = INTEGER(table)[relpc];
+    if (cidx < 0 || cidx >= LENGTH(constants))
+	return R_NilValue;
+    return VECTOR_ELT(constants, cidx);
+}
+
+/* Return the srcref/expression for the current instruction/operand
+   being executed by the byte-code interpreter, or the one that was
+   current when the supplied context was created. */
+static SEXP R_findBCInterpreterLocation(RCNTXT *cptr, const char *iname)
+{
+    SEXP body = cptr ? cptr->bcbody : R_BCbody;
+    if (body == NULL)
+	/* This has happened, but it is not clear how. */
+	/* (R_Srcref == R_InBCInterpreter && R_BCbody == NULL) */
+	return R_NilValue;
+    SEXP constants = BCCONSTS(body);
+    SEXP ltable = findLocTable(constants, iname);
+    if (ltable == R_NilValue)
+	/* location table not available */
+	return R_NilValue;
+
+    BCODE *codebase = BCCODE(body);
+    ptrdiff_t relpc = (*((BCODE **)(cptr ? cptr->bcpc : R_BCpc))) - codebase;
+
+    return getLocTableElt(relpc, ltable, constants);
+}
+
+SEXP attribute_hidden R_findBCInterpreterSrcref(RCNTXT *cptr)
+{
+    return R_findBCInterpreterLocation(cptr, "srcrefsIndex");
+}
+
+static SEXP R_findBCInterpreterExpression()
+{
+    return R_findBCInterpreterLocation(NULL, "expressionsIndex");
+}
+
+SEXP attribute_hidden R_getCurrentSrcref()
+{
+    if (R_Srcref != R_InBCInterpreter)
+	return R_Srcref;
+    else
+	return R_findBCInterpreterSrcref(NULL);
+}
+
+static Rboolean maybeClosureWrapper(SEXP expr)
+{
+    SEXP sym = CAR(expr);
+
+    if (!(sym == R_DotInternalSym || sym == R_DotExternalSym ||
+	sym == R_DotExternal2Sym || sym == R_DotExternalgraphicsSym ||
+	sym == R_DotCallSym || sym == R_DotFortranSym ||
+	sym == R_DotCSym || sym == R_DotCallgraphicsSym))
+
+	return FALSE;
+
+    return CDR(expr) != R_NilValue && CADR(expr) != R_NilValue;
+}
+
+static Rboolean maybeAssignmentCall(SEXP expr)
+{
+    if (TYPEOF(CAR(expr)) != SYMSXP)
+	return FALSE;
+    const char *name = CHAR(PRINTNAME(CAR(expr)));
+    size_t slen = strlen(name);
+    return slen > 2 && name[slen-2] == '<' && name[slen-1] == '-';
+}
+
+/* Check if the given expression is a call to a name that is also
+   a builtin or special (does not search the environment!). */
+static Rboolean maybePrimitiveCall(SEXP expr)
+{
+    if (TYPEOF(CAR(expr)) == SYMSXP) {
+	SEXP value = SYMVALUE(CAR(expr));
+	if (TYPEOF(value) == PROMSXP)
+	    value = PRVALUE(value);
+	return TYPEOF(value) == BUILTINSXP || TYPEOF(value) == SPECIALSXP;
+    }
+    return FALSE;
+}
+
+/* Inflate a (single-level) compiler-flattenned assignment call.
+   For example,
+           `[<-`(x, c(-1, 1), value = 2)
+   becomes
+            x[c(-1,1)] <- 2 */
+static SEXP inflateAssignmentCall(SEXP expr) {
+    if (CDR(expr) == R_NilValue || CDDR(expr) == R_NilValue)
+	return expr; /* need at least two arguments */
+
+    SEXP assignForm = CAR(expr);
+    if (TYPEOF(assignForm) != SYMSXP)
+	return expr;
+    const char *name = CHAR(PRINTNAME(assignForm));
+    size_t slen = strlen(name);
+    if (slen <= 2 || name[slen - 2] != '<' || name[slen - 1] != '-')
+	return expr;
+
+    char nonAssignName[slen - 1]; /* "names" for "names<-" */
+    strncpy(nonAssignName, name, slen - 2);
+    nonAssignName[slen - 2] = '\0';
+    SEXP nonAssignForm = install(nonAssignName);
+
+    int nargs = length(expr) - 2;
+    SEXP lhs = allocVector(LANGSXP, nargs + 1);
+    SETCAR(lhs, nonAssignForm);
+
+    SEXP porig = CDR(expr);
+    SEXP pnew = CDR(lhs);
+
+    /* copy args except the last - the "value" */
+    while(CDR(porig) != R_NilValue) {
+	SETCAR(pnew, CAR(porig));
+	SET_NAMED(CAR(porig), 2);
+	porig = CDR(porig);
+	pnew = CDR(pnew);
+    }
+    SEXP rhs = CAR(porig);
+    SET_NAMED(rhs, 2);
+    if (TAG(porig) != R_valueSym)
+	return expr;
+    return lang3(R_AssignSym, lhs, rhs);
+}
+
+/* Get the current expression being evaluated by the byte-code interpreter. */
+SEXP attribute_hidden R_getBCInterpreterExpression()
+{
+    SEXP exp = R_findBCInterpreterExpression();
+    if (TYPEOF(exp) == PROMSXP) {
+	exp = forcePromise(exp);
+	SET_NAMED(exp, 2);
+    }
+
+    /* This tries to mimick the behavior of the AST interpreter to a
+       reasonable level, based on relatively consistent expressions
+       provided by the compiler in the constant pool. The AST
+       interpreter behavior is rather inconsistent and should be fixed
+       at some point. When this happens, the code below will have to
+       be revisited, but the compiler code should mostly stay the
+       same.
+
+       Currently this code attempts to bypass implementation of
+       closure wrappers for internals and other foreign functions
+       called via a directive, hide away primitives, but show
+       assignment calls. This code ignores less usual problematic
+       situations such as overriding of builtins or inlining of the
+       wrappers by the compiler. Simple assignment calls are inflated
+       (back) into the usual form like x[1] <- y. Expressions made of
+       a single symbol are hidden away (note these are e.g. for
+       missing function arguments). */
+
+    if (maybeAssignmentCall(exp)) {
+	exp = inflateAssignmentCall(exp);
+    } else if (TYPEOF(exp) == SYMSXP || maybeClosureWrapper(exp)
+	|| maybePrimitiveCall(exp)) {
+
+	RCNTXT *c = R_GlobalContext;
+        while(c && c->callflag != CTXT_TOPLEVEL) {
+	    if (c->callflag & CTXT_FUNCTION) {
+		exp = c->call;
+		break;
+	    }
+	    c = c->nextcontext;
+	}
+    }
+    return exp;
+}
+
+static SEXP markSpecialArgs(SEXP args)
+{
+    SEXP arg;
+    for(arg = args; arg != R_NilValue; arg = CDR(arg))
+	MARK_NOT_MUTABLE(CAR(arg));
+    return args;
+}
+
+Rboolean attribute_hidden R_BCVersionOK(SEXP s)
 {
-    INCREMENT_REFCNT(x);
-    return x;
+    if (TYPEOF(s) != BCODESXP)
+	return FALSE;
+
+    BCODE *pc = BCCODE(s);
+    int version = GETOP();
+
+    /* must be kept in sync with bcEval version check */
+    return version < 2 ||
+	(version >= R_bcMinVersion && version <= R_bcVersion);
 }
 
 static SEXP bcEval(SEXP body, SEXP rho, Rboolean useCache)
 {
-  SEXP value, constants;
+  SEXP retvalue = R_NilValue, constants;
   BCODE *pc, *codebase;
   R_bcstack_t *oldntop = R_BCNodeStackTop;
   static int evalcount = 0;
+  SEXP oldsrcref = R_Srcref;
+  int oldbcintactive = R_BCIntActive;
+  SEXP oldbcbody = R_BCbody;
+  void *oldbcpc = R_BCpc;
+  BCODE *currentpc = NULL;
+
 #ifdef BC_INT_STACK
   IStackval *olditop = R_BCIntStackTop;
 #endif
@@ -4304,15 +5902,18 @@ static SEXP bcEval(SEXP body, SEXP rho, Rboolean useCache)
       return eval(bytecodeExpr(body), rho);
 
   /* check version */
+  /* must be kept in sync with R_BCVersionOK */
   {
       int version = GETOP();
       if (version < R_bcMinVersion || version > R_bcVersion) {
 	  if (version >= 2) {
+#ifdef BC_VERSION_MISMATCH_WARNING
 	      static Rboolean warned = FALSE;
 	      if (! warned) {
 		  warned = TRUE;
 		  warning(_("bytecode version mismatch; using eval"));
 	      }
+#endif
 	      return eval(bytecodeExpr(body), rho);
 	  }
 	  else if (version < R_bcMinVersion)
@@ -4321,6 +5922,10 @@ static SEXP bcEval(SEXP body, SEXP rho, Rboolean useCache)
       }
   }
 
+  R_Srcref = R_InBCInterpreter;
+  R_BCIntActive = 1;
+  R_BCbody = body;
+  R_BCpc = ¤tpc;
   R_binding_cache_t vcache = NULL;
   Rboolean smallcache = TRUE;
 #ifdef USE_BINDING_CACHE
@@ -4338,7 +5943,7 @@ static SEXP bcEval(SEXP body, SEXP rho, Rboolean useCache)
       if (R_BCNodeStackTop + n > R_BCNodeStackEnd)
 	  nodeStackOverflow();
       while (n > 0) {
-	  *R_BCNodeStackTop = R_NilValue;
+	  SETSTACK(0, R_NilValue);
 	  R_BCNodeStackTop++;
 	  n--;
       }
@@ -4352,7 +5957,7 @@ static SEXP bcEval(SEXP body, SEXP rho, Rboolean useCache)
 
   BEGIN_MACHINE {
     OP(BCMISMATCH, 0): error(_("byte code version mismatch"));
-    OP(RETURN, 0): value = GETSTACK(-1); goto done;
+    OP(RETURN, 0): retvalue = GETSTACK(-1); goto done;
     OP(GOTO, 1):
       {
 	int label = GETOP();
@@ -4364,10 +5969,9 @@ static SEXP bcEval(SEXP body, SEXP rho, Rboolean useCache)
       {
 	int callidx = GETOP();
 	int label = GETOP();
-	int cond;
-	SEXP call = VECTOR_ELT(constants, callidx);
-	value = BCNPOP();
-	cond = asLogicalNoNA(value, call);
+	Rboolean cond = GETSTACK_LOGICAL_NO_NA_PTR(R_BCNodeStackTop - 1,
+						   callidx, constants);
+	BCNPOP_IGNORE_VALUE();
 	if (! cond) {
 	    BC_CHECK_SIGINT(); /**** only on back branch?*/
 	    pc = codebase + label;
@@ -4377,18 +5981,64 @@ static SEXP bcEval(SEXP body, SEXP rho, Rboolean useCache)
     OP(POP, 0): BCNPOP_IGNORE_VALUE(); NEXT();
     OP(DUP, 0): BCNDUP(); NEXT();
     OP(PRINTVALUE, 0): PrintValue(BCNPOP()); NEXT();
-    OP(STARTLOOPCNTXT, 1):
+    OP(STARTLOOPCNTXT, 2):
 	{
-	    SEXP code = VECTOR_ELT(constants, GETOP());
-	    loopWithContext(code, rho);
+	    Rboolean is_for_loop = GETOP();
+	    R_bcstack_t *oldtop = R_BCNodeStackTop;
+	    RCNTXT *cntxt = BCNALLOC_CNTXT();
+	    BCNPUSH_INTEGER(GETOP());       /* pc offset for 'break' */
+	    BCNPUSH_INTEGER((int)(pc - codebase)); /* pc offset for 'next' */
+	    if (is_for_loop) {
+		/* duplicate the for loop state data on the top of the stack */
+		R_bcstack_t *loopdata = oldtop - FOR_LOOP_STATE_SIZE;
+		BCNSTACKCHECK(FOR_LOOP_STATE_SIZE);
+		for (int i = 0; i < FOR_LOOP_STATE_SIZE; i++)
+		    R_BCNodeStackTop[i] = loopdata[i];
+		R_BCNodeStackTop += FOR_LOOP_STATE_SIZE;
+
+		begincontext(cntxt, CTXT_LOOP, R_NilValue, rho, R_BaseEnv,
+			     R_NilValue, R_NilValue);
+		switch (SETJMP(cntxt->cjmpbuf)) {
+		case CTXT_BREAK:
+		    pc = codebase + LOOP_BREAK_OFFSET(FOR_LOOP_STATE_SIZE);
+		    break;
+		case CTXT_NEXT:
+		    pc = codebase + LOOP_NEXT_OFFSET(FOR_LOOP_STATE_SIZE);
+		    break;
+		}
+	    }
+	    else {
+		begincontext(cntxt, CTXT_LOOP, R_NilValue, rho, R_BaseEnv,
+			     R_NilValue, R_NilValue);
+		switch (SETJMP(cntxt->cjmpbuf)) {
+		case CTXT_BREAK:
+		    pc = codebase + LOOP_BREAK_OFFSET(0);
+		    break;
+		case CTXT_NEXT:
+		    pc = codebase + LOOP_NEXT_OFFSET(0);
+		    break;
+		}
+	    }
+	    /* context, offsets on stack, to be popped by ENDLOOPCNTXT */
+	    NEXT();
+	}
+    OP(ENDLOOPCNTXT, 1):
+	{
+	    Rboolean is_for_loop = GETOP();
+	    if (is_for_loop)
+		/* remove the duplicated for loop state data */
+		R_BCNodeStackTop -= FOR_LOOP_STATE_SIZE;
+	    BCNPOP_IGNORE_VALUE(); /* 'next' target */
+	    BCNPOP_IGNORE_VALUE(); /* 'break' target */
+	    BCNPOP_AND_END_CNTXT();
 	    NEXT();
 	}
-    OP(ENDLOOPCNTXT, 0): value = R_NilValue; goto done;
     OP(DOLOOPNEXT, 0): findcontext(CTXT_NEXT, rho, R_NilValue);
     OP(DOLOOPBREAK, 0): findcontext(CTXT_BREAK, rho, R_NilValue);
     OP(STARTFOR, 3):
       {
-	SEXP seq = GETSTACK(-1);
+	Rboolean iscompact = FALSE;
+	SEXP seq = getForLoopSeq(-1, &iscompact);
 	int callidx = GETOP();
 	SEXP symbol = VECTOR_ELT(constants, GETOP());
 	int label = GETOP();
@@ -4402,8 +6052,16 @@ static SEXP bcEval(SEXP body, SEXP rho, Rboolean useCache)
 	defineVar(symbol, R_NilValue, rho);
 	BCNPUSH(GET_BINDING_CELL(symbol, rho));
 
-	value = allocVector(INTSXP, 2);
+	SEXP value = allocVector(INTSXP, 2);
 	INTEGER(value)[0] = -1;
+#ifdef COMPACT_INTSEQ
+	if (iscompact) {
+	    int n1 = INTEGER(seq)[0];
+	    int n2 = INTEGER(seq)[1];
+	    INTEGER(value)[1] = n1 <= n2 ? n2 - n1 + 1 : n1 - n2 + 1;
+	}
+	else
+#endif
 	if (isVector(seq))
 	  INTEGER(value)[1] = LENGTH(seq);
 	else if (isList(seq) || isNull(seq))
@@ -4425,6 +6083,7 @@ static SEXP bcEval(SEXP body, SEXP rho, Rboolean useCache)
 	case STRSXP:
 	case RAWSXP:
 	    value = allocVector(TYPEOF(seq), 1);
+	    SET_NAMED(value, 1);
 	    BCNPUSH(value);
 	    break;
 	default: BCNPUSH(R_NilValue);
@@ -4437,11 +6096,14 @@ static SEXP bcEval(SEXP body, SEXP rho, Rboolean useCache)
     OP(STEPFOR, 1):
       {
 	int label = GETOP();
-	int i = ++(INTEGER(GETSTACK(-2))[0]);
-	int n = INTEGER(GETSTACK(-2))[1];
+	int *loopinfo = INTEGER(GETSTACK_SXPVAL(-2));
+	int i = ++loopinfo[0];
+	int n = loopinfo[1];
 	if (i < n) {
-	  SEXP seq = GETSTACK(-4);
+	  Rboolean iscompact = FALSE;
+	  SEXP seq = getForLoopSeq(-4, &iscompact);
 	  SEXP cell = GETSTACK(-3);
+	  SEXP value = NULL;
 	  switch (TYPEOF(seq)) {
 	  case LGLSXP:
 	    GET_VEC_LOOP_VALUE(value, -1);
@@ -4449,6 +6111,16 @@ static SEXP bcEval(SEXP body, SEXP rho, Rboolean useCache)
 	    break;
 	  case INTSXP:
 	    GET_VEC_LOOP_VALUE(value, -1);
+#ifdef COMPACT_INTSEQ
+	    if (iscompact) {
+		int *info = INTEGER(seq);
+		int n1 = info[0];
+		int n2 = info[1];
+		int val = n1 <= n2 ? n1 + i : n1 - i;
+		INTEGER(value)[0] = val;
+	    }
+	    else
+#endif
 	    INTEGER(value)[0] = INTEGER(seq)[i];
 	    break;
 	  case REALSXP:
@@ -4490,30 +6162,30 @@ static SEXP bcEval(SEXP body, SEXP rho, Rboolean useCache)
     OP(ENDFOR, 0):
       {
 #ifdef COMPUTE_REFCNT_VALUES
-	SEXP seq = GETSTACK(-4);
+	Rboolean iscompact = FALSE;
+	SEXP seq = getForLoopSeq(-4, &iscompact);
 	DECREMENT_REFCNT(seq);
 #endif
-	R_BCNodeStackTop -= 3;
+	R_BCNodeStackTop -= FOR_LOOP_STATE_SIZE - 1;
 	SETSTACK(-1, R_NilValue);
 	NEXT();
       }
     OP(SETLOOPVAL, 0):
       BCNPOP_IGNORE_VALUE(); SETSTACK(-1, R_NilValue); NEXT();
     OP(INVISIBLE,0): R_Visible = FALSE; NEXT();
-    /**** for now LDCONST, LDTRUE, and LDFALSE duplicate/allocate to
-	  be defensive against bad package C code */
     OP(LDCONST, 1):
-      R_Visible = TRUE;
-      value = VECTOR_ELT(constants, GETOP());
-      /* make sure NAMED = 2 -- lower values might be safe in some cases but
-	 not in general, especially if the constant pool was created by
-	 unserializing a compiled expression. */
-      /*if (NAMED(value) < 2) SET_NAMED(value, 2);*/
-      BCNPUSH(duplicate(value));
-      NEXT();
+      {
+	R_Visible = TRUE;
+	SEXP value = VECTOR_ELT(constants, GETOP());
+	if (R_check_constants < 0)
+	    value = duplicate(value);
+	MARK_NOT_MUTABLE(value);
+	BCNPUSH(value);
+	NEXT();
+      }
     OP(LDNULL, 0): R_Visible = TRUE; BCNPUSH(R_NilValue); NEXT();
-    OP(LDTRUE, 0): R_Visible = TRUE; BCNPUSH(mkTrue()); NEXT();
-    OP(LDFALSE, 0): R_Visible = TRUE; BCNPUSH(mkFalse()); NEXT();
+    OP(LDTRUE, 0): R_Visible = TRUE; BCNPUSH(R_TrueValue); NEXT();
+    OP(LDFALSE, 0): R_Visible = TRUE; BCNPUSH(R_FalseValue); NEXT();
     OP(GETVAR, 1): DO_GETVAR(FALSE, FALSE);
     OP(DDVAL, 1): DO_GETVAR(TRUE, FALSE);
     OP(SETVAR, 1):
@@ -4526,7 +6198,28 @@ static SEXP bcEval(SEXP body, SEXP rho, Rboolean useCache)
 	    SEXP symbol = VECTOR_ELT(constants, sidx);
 	    loc = GET_BINDING_CELL_CACHE(symbol, rho, vcache, sidx);
 	}
-	value = GETSTACK(-1);
+#ifdef TYPED_STACK
+	R_bcstack_t *s = R_BCNodeStackTop - 1;
+	/* reading the locked bit is OK even if cell is R_NilValue */
+	if (s->tag && ! BINDING_IS_LOCKED(loc)) {
+	    /* if cell is R_NilValue or an active binding, or if the value
+	       is R_UnboundValue, then TYPEOF(CAR(cell)) will not match the
+	       immediate value tag. */
+	    SEXP x = CAR(loc);  /* fast, but assumes binding is a CONS */
+	    if (NOT_SHARED(x) && IS_SIMPLE_SCALAR(x, s->tag)) {
+		/* if the binding value is not shared and is a simple
+		   scaler of the same type as the immediate value,
+		   then we can copy the stack value into the binding
+		   value */
+		switch (s->tag) {
+		case REALSXP: REAL(x)[0] = s->u.dval; NEXT();
+		case INTSXP: INTEGER(x)[0] = s->u.ival; NEXT();
+		case LGLSXP: LOGICAL(x)[0] = s->u.ival; NEXT();
+		}
+	    }
+	}
+#endif
+	SEXP value = GETSTACK(-1);
 	INCREMENT_NAMED(value);
 	if (! SET_BINDING_VALUE(loc, value)) {
 	    SEXP symbol = VECTOR_ELT(constants, sidx);
@@ -4540,45 +6233,31 @@ static SEXP bcEval(SEXP body, SEXP rho, Rboolean useCache)
       {
 	/* get the function */
 	SEXP symbol = VECTOR_ELT(constants, GETOP());
-	value = findFun(symbol, rho);
+	SEXP value = findFun(symbol, rho);
+	INIT_CALL_FRAME(value);
 	if(RTRACE(value)) {
 	  Rprintf("trace: ");
 	  PrintValue(symbol);
 	}
-
-	/* initialize the function type register, push the function, and
-	   push space for creating the argument list. */
-	BCNSTACKCHECK(3);
-	SETSTACK(0, value);
-	SETSTACK(1, R_NilValue);
-	SETSTACK(2, R_NilValue);
-	R_BCNodeStackTop += 3;
 	NEXT();
       }
     OP(GETGLOBFUN, 1):
       {
 	/* get the function */
 	SEXP symbol = VECTOR_ELT(constants, GETOP());
-	value = findFun(symbol, R_GlobalEnv);
+	SEXP value = findFun(symbol, R_GlobalEnv);
+	INIT_CALL_FRAME(value);
 	if(RTRACE(value)) {
 	  Rprintf("trace: ");
 	  PrintValue(symbol);
 	}
-
-	/* initialize the function type register, push the function, and
-	   push space for creating the argument list. */
-	BCNSTACKCHECK(3);
-	SETSTACK(0, value);
-	SETSTACK(1, R_NilValue);
-	SETSTACK(2, R_NilValue);
-	R_BCNodeStackTop += 3;
 	NEXT();
       }
     OP(GETSYMFUN, 1):
       {
 	/* get the function */
 	SEXP symbol = VECTOR_ELT(constants, GETOP());
-	value = SYMVALUE(symbol);
+	SEXP value = SYMVALUE(symbol);
 	if (TYPEOF(value) == PROMSXP) {
 	    value = forcePromise(value);
 	    SET_NAMED(value, 2);
@@ -4587,65 +6266,46 @@ static SEXP bcEval(SEXP body, SEXP rho, Rboolean useCache)
 	  Rprintf("trace: ");
 	  PrintValue(symbol);
 	}
-
-	/* initialize the function type register, push the function, and
-	   push space for creating the argument list. */
-	BCNSTACKCHECK(3);
-	SETSTACK(0, value);
-	SETSTACK(1, R_NilValue);
-	SETSTACK(2, R_NilValue);
-	R_BCNodeStackTop += 3;
+	INIT_CALL_FRAME(value);
 	NEXT();
       }
     OP(GETBUILTIN, 1):
       {
 	/* get the function */
 	SEXP symbol = VECTOR_ELT(constants, GETOP());
-	value = getPrimitive(symbol, BUILTINSXP);
+	SEXP value = getPrimitive(symbol, BUILTINSXP);
+//#define REPORT_OVERRIDEN_BUILTINS
+#ifdef REPORT_OVERRIDEN_BUILTINS
+	if (value != findFun(symbol, rho)) {
+	    Rprintf("Possibly overriden builtin: %s\n", PRIMNAME(value));
+	}
+#endif
 	if (RTRACE(value)) {
 	  Rprintf("trace: ");
 	  PrintValue(symbol);
 	}
-
-	/* push the function and push space for creating the argument list. */
-	BCNSTACKCHECK(3);
-	SETSTACK(0, value);
-	SETSTACK(1, R_NilValue);
-	SETSTACK(2, R_NilValue);
-	R_BCNodeStackTop += 3;
+	INIT_CALL_FRAME(value);
 	NEXT();
       }
     OP(GETINTLBUILTIN, 1):
       {
 	/* get the function */
 	SEXP symbol = VECTOR_ELT(constants, GETOP());
-	value = INTERNAL(symbol);
+	SEXP value = INTERNAL(symbol);
 	if (TYPEOF(value) != BUILTINSXP)
 	  error(_("there is no .Internal function '%s'"),
 		CHAR(PRINTNAME(symbol)));
-
-	/* push the function and push space for creating the argument list. */
-	BCNSTACKCHECK(3);
-	SETSTACK(0, value);
-	SETSTACK(1, R_NilValue);
-	SETSTACK(2, R_NilValue);
-	R_BCNodeStackTop += 3;
+	INIT_CALL_FRAME(value);
 	NEXT();
       }
     OP(CHECKFUN, 0):
       {
 	/* check then the value on the stack is a function */
-	value = GETSTACK(-1);
+	SEXP value = GETSTACK(-1);
 	if (TYPEOF(value) != CLOSXP && TYPEOF(value) != BUILTINSXP &&
 	    TYPEOF(value) != SPECIALSXP)
 	  error(_("attempt to apply non-function"));
-
-	/* initialize the function type register, and push space for
-	   creating the argument list. */
-	BCNSTACKCHECK(2);
-	SETSTACK(0, R_NilValue);
-	SETSTACK(1, R_NilValue);
-	R_BCNodeStackTop += 2;
+	INIT_CALL_FRAME_ARGS();
 	NEXT();
       }
     OP(MAKEPROM, 1):
@@ -4653,10 +6313,11 @@ static SEXP bcEval(SEXP body, SEXP rho, Rboolean useCache)
 	SEXP code = VECTOR_ELT(constants, GETOP());
 	SEXPTYPE ftype = CALL_FRAME_FTYPE();
 	if (ftype != SPECIALSXP) {
+	  SEXP value;
 	  if (ftype == BUILTINSXP)
 	      value = bcEval(code, rho, TRUE);
 	  else
-	    value = mkPROMISE(code, rho);
+	      value = mkPROMISE(code, rho);
 	  PUSHCALLARG(value);
 	}
 	NEXT();
@@ -4671,10 +6332,11 @@ static SEXP bcEval(SEXP body, SEXP rho, Rboolean useCache)
     OP(SETTAG, 1):
       {
 	SEXPTYPE ftype = CALL_FRAME_FTYPE();
-	SEXP tag = VECTOR_ELT(constants, GETOP());
-	SEXP cell = GETSTACK(-1);
-	if (ftype != SPECIALSXP && cell != R_NilValue)
-	  SET_TAG(cell, CreateTag(tag));
+	int tagidx = GETOP();
+	if (ftype != SPECIALSXP) {
+	    SEXP tag = VECTOR_ELT(constants, tagidx);
+	    SETCALLARG_TAG(tag);
+	}
 	NEXT();
       }
     OP(DODOTS, 0):
@@ -4683,14 +6345,15 @@ static SEXP bcEval(SEXP body, SEXP rho, Rboolean useCache)
 	if (ftype != SPECIALSXP) {
 	  SEXP h = findVar(R_DotsSymbol, rho);
 	  if (TYPEOF(h) == DOTSXP || h == R_NilValue) {
+	    PROTECT(h);
 	    for (; h != R_NilValue; h = CDR(h)) {
-	      SEXP val, cell;
+	      SEXP val;
 	      if (ftype == BUILTINSXP) val = eval(CAR(h), rho);
 	      else val = mkPROMISE(CAR(h), rho);
-	      cell = CONS_NR(val, R_NilValue);
-	      PUSHCALLARG_CELL(cell);
-	      if (TAG(h) != R_NilValue) SET_TAG(cell, CreateTag(TAG(h)));
+	      PUSHCALLARG(val);
+	      SETCALLARG_TAG(TAG(h));
 	    }
+	    UNPROTECT(1); /* h */
 	  }
 	  else if (h != R_MissingArg)
 	    error(_("'...' used in an incorrect context"));
@@ -4701,17 +6364,23 @@ static SEXP bcEval(SEXP body, SEXP rho, Rboolean useCache)
     /**** for now PUSHCONST, PUSHTRUE, and PUSHFALSE duplicate/allocate to
 	  be defensive against bad package C code */
     OP(PUSHCONSTARG, 1):
-      value = VECTOR_ELT(constants, GETOP());
-      PUSHCALLARG(BUMPREFCNT(duplicate(value)));
-      NEXT();
+      {
+	SEXP value = VECTOR_ELT(constants, GETOP());
+	if (R_check_constants < 0)
+	    value = duplicate(value);
+	MARK_NOT_MUTABLE(value);
+	PUSHCALLARG(value);
+	NEXT();
+      }
     OP(PUSHNULLARG, 0): PUSHCALLARG(R_NilValue); NEXT();
-    OP(PUSHTRUEARG, 0): PUSHCALLARG(BUMPREFCNT(mkTrue())); NEXT();
-    OP(PUSHFALSEARG, 0): PUSHCALLARG(BUMPREFCNT(mkFalse())); NEXT();
+    OP(PUSHTRUEARG, 0): PUSHCALLARG(R_TrueValue); NEXT();
+    OP(PUSHFALSEARG, 0): PUSHCALLARG(R_FalseValue); NEXT();
     OP(CALL, 1):
       {
-	SEXP fun = GETSTACK(-3);
+	SEXP fun = CALL_FRAME_FUN();
 	SEXP call = VECTOR_ELT(constants, GETOP());
-	SEXP args = GETSTACK(-2);
+	SEXP args = CALL_FRAME_ARGS();
+	SEXP value = NULL;
 	int flag;
 	switch (TYPEOF(fun)) {
 	case BUILTINSXP:
@@ -4724,29 +6393,29 @@ static SEXP bcEval(SEXP body, SEXP rho, Rboolean useCache)
 	case SPECIALSXP:
 	  flag = PRIMPRINT(fun);
 	  R_Visible = flag != 1;
-	  value = PRIMFUN(fun) (call, fun, CDR(call), rho);
+	  value = PRIMFUN(fun) (call, fun, markSpecialArgs(CDR(call)), rho);
 	  if (flag < 2) R_Visible = flag != 1;
 	  break;
 	case CLOSXP:
-	  value = applyClosure(call, fun, args, rho, R_BaseEnv);
+	  value = applyClosure(call, fun, args, rho, R_NilValue);
 	  break;
 	default: error(_("bad function"));
 	}
-	R_BCNodeStackTop -= 2;
-	SETSTACK(-1, value);
+	POP_CALL_FRAME(value);
 	NEXT();
       }
     OP(CALLBUILTIN, 1):
       {
-	SEXP fun = GETSTACK(-3);
+	SEXP fun = CALL_FRAME_FUN();
 	SEXP call = VECTOR_ELT(constants, GETOP());
-	SEXP args = GETSTACK(-2);
+	SEXP args = CALL_FRAME_ARGS();
 	int flag;
 	const void *vmax = vmaxget();
 	if (TYPEOF(fun) != BUILTINSXP)
 	  error(_("not a BUILTIN function"));
 	flag = PRIMPRINT(fun);
 	R_Visible = flag != 1;
+	SEXP value;
 	if (R_Profiling && IS_TRUE_BUILTIN(fun)) {
 	    RCNTXT cntxt;
 	    SEXP oldref = R_Srcref;
@@ -4761,8 +6430,7 @@ static SEXP bcEval(SEXP body, SEXP rho, Rboolean useCache)
 	}
 	if (flag < 2) R_Visible = flag != 1;
 	vmaxset(vmax);
-	R_BCNodeStackTop -= 2;
-	SETSTACK(-1, value);
+	POP_CALL_FRAME(value);
 	NEXT();
       }
     OP(CALLSPECIAL, 1):
@@ -4776,13 +6444,12 @@ static SEXP bcEval(SEXP body, SEXP rho, Rboolean useCache)
 	  Rprintf("trace: ");
 	  PrintValue(symbol);
 	}
-	BCNPUSH(fun);  /* for GC protection */
 	flag = PRIMPRINT(fun);
 	R_Visible = flag != 1;
-	value = PRIMFUN(fun) (call, fun, CDR(call), rho);
+	SEXP value = PRIMFUN(fun) (call, fun, markSpecialArgs(CDR(call)), rho);
 	if (flag < 2) R_Visible = flag != 1;
 	vmaxset(vmax);
-	SETSTACK(-1, value); /* replaces fun on stack */
+	BCNPUSH(value);
 	NEXT();
       }
     OP(MAKECLOSURE, 1):
@@ -4790,19 +6457,27 @@ static SEXP bcEval(SEXP body, SEXP rho, Rboolean useCache)
 	SEXP fb = VECTOR_ELT(constants, GETOP());
 	SEXP forms = VECTOR_ELT(fb, 0);
 	SEXP body = VECTOR_ELT(fb, 1);
-	value = mkCLOSXP(forms, body, rho);
+	SEXP value = mkCLOSXP(forms, body, rho);
+	/* The LENGTH check below allows for byte code object created
+	   by oder versions of the compiler that did not record a
+	   source attribute. */
+	/* FIXME: bump bc version and don't check LENGTH? */
+	if (LENGTH(fb) > 2) {
+	  SEXP srcref = VECTOR_ELT(fb, 2);
+	  if (!isNull(srcref)) setAttrib(value, R_SrcrefSymbol, srcref);
+	}
 	BCNPUSH(value);
 	NEXT();
       }
-    OP(UMINUS, 1): Arith1(R_SubSym);
-    OP(UPLUS, 1): Arith1(R_AddSym);
-    OP(ADD, 1): FastBinary(+, PLUSOP, R_AddSym);
-    OP(SUB, 1): FastBinary(-, MINUSOP, R_SubSym);
-    OP(MUL, 1): FastBinary(*, TIMESOP, R_MulSym);
-    OP(DIV, 1): FastBinary(/, DIVOP, R_DivSym);
-    OP(EXPT, 1): Arith2(POWOP, R_ExptSym);
-    OP(SQRT, 1): Math1(R_SqrtSym);
-    OP(EXP, 1): Math1(R_ExpSym);
+    OP(UMINUS, 1): FastUnary(-, R_SubSym);
+    OP(UPLUS, 1): FastUnary(+, R_AddSym);
+    OP(ADD, 1): FastBinary(R_ADD, PLUSOP, R_AddSym);
+    OP(SUB, 1): FastBinary(R_SUB, MINUSOP, R_SubSym);
+    OP(MUL, 1): FastBinary(R_MUL, TIMESOP, R_MulSym);
+    OP(DIV, 1): FastBinary(R_DIV, DIVOP, R_DivSym);
+    OP(EXPT, 1): FastBinary(R_POW, POWOP, R_ExptSym);
+    OP(SQRT, 1): FastMath1(R_sqrt, R_SqrtSym);
+    OP(EXP, 1): FastMath1(exp, R_ExpSym);
     OP(EQ, 1): FastRelop2(==, EQOP, R_EqSym);
     OP(NE, 1): FastRelop2(!=, NEOP, R_NeSym);
     OP(LT, 1): FastRelop2(<, LTOP, R_LtSym);
@@ -4818,7 +6493,7 @@ static SEXP bcEval(SEXP body, SEXP rho, Rboolean useCache)
 	int sidx = GETOP();
 	SEXP symbol = VECTOR_ELT(constants, sidx);
 	SEXP cell = GET_BINDING_CELL_CACHE(symbol, rho, vcache, sidx);
-	value = BINDING_VALUE(cell);
+	SEXP value = BINDING_VALUE(cell);
 	if (value == R_UnboundValue ||
 	    TYPEOF(value) == PROMSXP ||
 #ifdef SWITCH_TO_REFCNT
@@ -4831,8 +6506,10 @@ static SEXP bcEval(SEXP body, SEXP rho, Rboolean useCache)
 	BCNPUSH(value);
 	BCNDUP2ND();
 	/* top three stack entries are now RHS value, LHS value, RHS value */
-	FIXUP_RHS_NAMED(GETSTACK(-1));
-	INCREMENT_REFCNT(GETSTACK(-1));
+	if (IS_STACKVAL_BOXED(-1)) {
+	    FIXUP_RHS_NAMED(GETSTACK(-1));
+	    INCREMENT_REFCNT(GETSTACK(-1));
+	}
 	NEXT();
       }
     OP(ENDASSIGN, 1):
@@ -4840,7 +6517,7 @@ static SEXP bcEval(SEXP body, SEXP rho, Rboolean useCache)
 	int sidx = GETOP();
 	SEXP symbol = VECTOR_ELT(constants, sidx);
 	SEXP cell = GET_BINDING_CELL_CACHE(symbol, rho, vcache, sidx);
-	value = GETSTACK(-1); /* leave on stack for GC protection */
+	SEXP value = GETSTACK(-1); /* leave on stack for GC protection */
 	INCREMENT_NAMED(value);
 	if (! SET_BINDING_VALUE(cell, value))
 	    defineVar(symbol, value, rho);
@@ -4851,8 +6528,10 @@ static SEXP bcEval(SEXP body, SEXP rho, Rboolean useCache)
 	   conservative mark the value as NAMED = 2 */
 	SET_NAMED(GETSTACK(-1), 2);
 #else
-	INCREMENT_NAMED(GETSTACK(-1));
-	DECREMENT_REFCNT(GETSTACK(-1));
+	if (IS_STACKVAL_BOXED(-1)) {
+	    INCREMENT_NAMED(GETSTACK(-1));
+	    DECREMENT_REFCNT(GETSTACK(-1));
+	}
 #endif
 	NEXT();
       }
@@ -4874,6 +6553,7 @@ static SEXP bcEval(SEXP body, SEXP rho, Rboolean useCache)
 	SEXP call = VECTOR_ELT(constants, GETOP());
 	SEXP symbol = VECTOR_ELT(constants, GETOP());
 	SEXP x = GETSTACK(-1);
+	SEXP value = NULL;
 	if (isObject(x)) {
 	    SEXP ncall;
 	    PROTECT(ncall = duplicate(call));
@@ -4900,13 +6580,14 @@ static SEXP bcEval(SEXP body, SEXP rho, Rboolean useCache)
 	    SETSTACK(-2, x);
 	    SET_NAMED(x, 1);
 	}
+	SEXP value = NULL;
 	if (isObject(x)) {
 	    SEXP ncall, prom;
 	    PROTECT(ncall = duplicate(call));
 	    /**** hack to avoid evaluating the symbol */
 	    SETCAR(CDDR(ncall), ScalarString(PRINTNAME(symbol)));
 	    prom = mkRHSPROMISE(CADDDR(ncall), rhs);
-	    SETCAR(CDR(CDDR(ncall)), prom);
+	    SETCAR(CDDDR(ncall), prom);
 	    dispatched = tryDispatch("$<-", ncall, x, rho, &value);
 	    UNPROTECT(1);
 	}
@@ -4921,7 +6602,7 @@ static SEXP bcEval(SEXP body, SEXP rho, Rboolean useCache)
     OP(ISINTEGER, 0): {
 	SEXP arg = GETSTACK(-1);
 	Rboolean test = (TYPEOF(arg) == INTSXP) && ! inherits(arg, "factor");
-	SETSTACK(-1, test ? mkTrue() : mkFalse());
+	SETSTACK(-1, test ? R_TrueValue : R_FalseValue);
 	NEXT();
       }
     OP(ISDOUBLE, 0): DO_ISTYPE(REALSXP);
@@ -4930,15 +6611,15 @@ static SEXP bcEval(SEXP body, SEXP rho, Rboolean useCache)
     OP(ISSYMBOL, 0): DO_ISTYPE(SYMSXP); /**** S4 thingy allowed now???*/
     OP(ISOBJECT, 0): DO_ISTEST(OBJECT);
     OP(ISNUMERIC, 0): DO_ISTEST(isNumericOnly);
-    OP(VECSUBSET, 0): DO_VECSUBSET(rho); NEXT();
-    OP(MATSUBSET, 0): DO_MATSUBSET(rho); NEXT();
-    OP(SETVECSUBSET, 0): DO_SETVECSUBSET(rho); NEXT();
-    OP(SETMATSUBSET, 0): DO_SETMATSUBSET(rho); NEXT();
+    OP(VECSUBSET, 1): DO_VECSUBSET(rho, FALSE); NEXT();
+    OP(MATSUBSET, 1): DO_MATSUBSET(rho, FALSE); NEXT();
+    OP(VECSUBASSIGN, 1): DO_VECSUBASSIGN(rho, FALSE); NEXT();
+    OP(MATSUBASSIGN, 1): DO_MATSUBASSIGN(rho, FALSE); NEXT();
     OP(AND1ST, 2): {
 	int callidx = GETOP();
 	int label = GETOP();
 	FIXUP_SCALAR_LOGICAL(callidx, "'x'", "&&");
-	value = GETSTACK(-1);
+	SEXP value = GETSTACK(-1);
 	if (LOGICAL(value)[0] == FALSE)
 	    pc = codebase + label;
 	NEXT();
@@ -4946,7 +6627,7 @@ static SEXP bcEval(SEXP body, SEXP rho, Rboolean useCache)
     OP(AND2ND, 1): {
 	int callidx = GETOP();
 	FIXUP_SCALAR_LOGICAL(callidx, "'y'", "&&");
-	value = GETSTACK(-1);
+	SEXP value = GETSTACK(-1);
 	/* The first argument is TRUE or NA. If the second argument is
 	   not TRUE then its value is the result. If the second
 	   argument is TRUE, then the first argument's value is the
@@ -4960,7 +6641,7 @@ static SEXP bcEval(SEXP body, SEXP rho, Rboolean useCache)
 	int callidx = GETOP();
 	int label = GETOP();
 	FIXUP_SCALAR_LOGICAL(callidx, "'x'", "||");
-	value = GETSTACK(-1);
+	SEXP value = GETSTACK(-1);
 	if (LOGICAL(value)[0] != NA_LOGICAL && LOGICAL(value)[0]) /* is true */
 	    pc = codebase + label;
 	NEXT();
@@ -4968,7 +6649,7 @@ static SEXP bcEval(SEXP body, SEXP rho, Rboolean useCache)
     OP(OR2ND, 1):  {
 	int callidx = GETOP();
 	FIXUP_SCALAR_LOGICAL(callidx, "'y'", "||");
-	value = GETSTACK(-1);
+	SEXP value = GETSTACK(-1);
 	/* The first argument is FALSE or NA. If the second argument is
 	   not FALSE then its value is the result. If the second
 	   argument is FALSE, then the first argument's value is the
@@ -4984,18 +6665,15 @@ static SEXP bcEval(SEXP body, SEXP rho, Rboolean useCache)
     OP(SETVAR2, 1):
       {
 	SEXP symbol = VECTOR_ELT(constants, GETOP());
-	value = GETSTACK(-1);
-	if (MAYBE_REFERENCED(value)) {
-	    value = duplicate(value);
-	    SETSTACK(-1, value);
-	}
+	SEXP value = GETSTACK(-1);
+	INCREMENT_NAMED(value);
 	setVar(symbol, value, ENCLOS(rho));
 	NEXT();
       }
     OP(STARTASSIGN2, 1):
       {
 	SEXP symbol = VECTOR_ELT(constants, GETOP());
-	value = GETSTACK(-1);
+	SEXP value = GETSTACK(-1);
 	BCNPUSH(getvar(symbol, ENCLOS(rho), FALSE, FALSE, NULL, 0));
 	BCNPUSH(value);
 	/* top three stack entries are now RHS value, LHS value, RHS value */
@@ -5006,7 +6684,7 @@ static SEXP bcEval(SEXP body, SEXP rho, Rboolean useCache)
     OP(ENDASSIGN2, 1):
       {
 	SEXP symbol = VECTOR_ELT(constants, GETOP());
-	value = BCNPOP();
+	SEXP value = BCNPOP();
 	INCREMENT_NAMED(value);
 	setVar(symbol, value, ENCLOS(rho));
 	/* original right-hand side value is now on top of stack again */
@@ -5022,24 +6700,25 @@ static SEXP bcEval(SEXP body, SEXP rho, Rboolean useCache)
       }
     OP(SETTER_CALL, 2):
       {
-	SEXP lhs = GETSTACK(-5);
-	SEXP rhs = GETSTACK(-4);
-	SEXP fun = GETSTACK(-3);
+	SEXP lhs = GETSTACK_BELOW_CALL_FRAME(-2);
+	SEXP rhs = GETSTACK_BELOW_CALL_FRAME(-1);
+	SEXP fun = CALL_FRAME_FUN();
 	SEXP call = VECTOR_ELT(constants, GETOP());
 	SEXP vexpr = VECTOR_ELT(constants, GETOP());
 	SEXP args, prom, last;
 	if (MAYBE_SHARED(lhs)) {
 	  lhs = shallow_duplicate(lhs);
-	  SETSTACK(-5, lhs);
+	  SETSTACK_BELOW_CALL_FRAME(-2, lhs);
 	  SET_NAMED(lhs, 1);
 	}
+	SEXP value = NULL;
 	switch (TYPEOF(fun)) {
 	case BUILTINSXP:
 	  /* push RHS value onto arguments with 'value' tag */
 	  PUSHCALLARG(rhs);
-	  SET_TAG(GETSTACK(-1), R_valueSym);
+	  SETCALLARG_TAG_SYMBOL(R_valueSym);
 	  /* replace first argument with LHS value */
-	  args = GETSTACK(-2);
+	  args = CALL_FRAME_ARGS();
 	  SETCAR(args, lhs);
 	  /* make the call */
 	  checkForMissings(args, call);
@@ -5049,7 +6728,7 @@ static SEXP bcEval(SEXP body, SEXP rho, Rboolean useCache)
 	  /* duplicate arguments and protect */
 	  PROTECT(args = duplicate(CDR(call)));
 	  /* insert evaluated promise for LHS as first argument */
-	  /* promise won't be captured so don't track refrences */
+	  /* promise won't be captured so don't track references */
 	  prom = R_mkEVPROMISE_NR(R_TmpvalSymbol, lhs);
 	  SETCAR(args, prom);
 	  /* insert evaluated promise for RHS as last argument */
@@ -5066,31 +6745,31 @@ static SEXP bcEval(SEXP body, SEXP rho, Rboolean useCache)
 	  /* push evaluated promise for RHS onto arguments with 'value' tag */
 	  prom = mkRHSPROMISE(vexpr, rhs);
 	  PUSHCALLARG(prom);
-	  SET_TAG(GETSTACK(-1), R_valueSym);
+	  SETCALLARG_TAG_SYMBOL(R_valueSym);
 	  /* replace first argument with evaluated promise for LHS */
 	  /* promise might be captured, so track references */
+	  args = CALL_FRAME_ARGS();
 	  prom = R_mkEVPROMISE(R_TmpvalSymbol, lhs);
-	  args = GETSTACK(-2);
 	  SETCAR(args, prom);
 	  /* make the call */
-	  value = applyClosure(call, fun, args, rho, R_BaseEnv);
+	  value = applyClosure(call, fun, args, rho, R_NilValue);
 	  break;
 	default: error(_("bad function"));
 	}
-	R_BCNodeStackTop -= 4;
-	SETSTACK(-1, value);
+	POP_CALL_FRAME_PLUS(2, value);
 	NEXT();
       }
     OP(GETTER_CALL, 1):
       {
-	SEXP lhs = GETSTACK(-5);
-	SEXP fun = GETSTACK(-3);
+	SEXP lhs = GETSTACK_BELOW_CALL_FRAME(-2);
+	SEXP fun = CALL_FRAME_FUN();
 	SEXP call = VECTOR_ELT(constants, GETOP());
+	SEXP value = NULL;
 	SEXP args, prom;
 	switch (TYPEOF(fun)) {
 	case BUILTINSXP:
 	  /* replace first argument with LHS value */
-	  args = GETSTACK(-2);
+	  args = CALL_FRAME_ARGS();
 	  SETCAR(args, lhs);
 	  /* make the call */
 	  checkForMissings(args, call);
@@ -5110,16 +6789,15 @@ static SEXP bcEval(SEXP body, SEXP rho, Rboolean useCache)
 	case CLOSXP:
 	  /* replace first argument with evaluated promise for LHS */
 	  /* promise might be captured, so track references */
+	  args = CALL_FRAME_ARGS();
 	  prom = R_mkEVPROMISE(R_TmpvalSymbol, lhs);
-	  args = GETSTACK(-2);
 	  SETCAR(args, prom);
 	  /* make the call */
-	  value = applyClosure(call, fun, args, rho, R_BaseEnv);
+	  value = applyClosure(call, fun, args, rho, R_NilValue);
 	  break;
 	default: error(_("bad function"));
 	}
-	R_BCNodeStackTop -= 2;
-	SETSTACK(-1, value);
+	POP_CALL_FRAME(value);
 	NEXT();
       }
     OP(SWAP, 0): {
@@ -5137,9 +6815,22 @@ static SEXP bcEval(SEXP body, SEXP rho, Rboolean useCache)
 	   will need to see an unmodified LHS value. This heuristic
 	   fails if the accessor function called here is not a closure
 	   but the replacement function is. */
-	if (MAYBE_REFERENCED(tmp) &&
-	    (MAYBE_SHARED(tmp) || MAYBE_SHARED(R_BCNodeStackTop[-3])))
-	    tmp = shallow_duplicate(tmp);
+
+	/* For the typed stack it might be OK just to force boxing at
+	   this point, but for now this code tries to avoid doing
+	   that. The macros make the code a little more reabable. */
+#define STACKVAL_MAYBE_REFERENCED(idx)				\
+	(IS_STACKVAL_BOXED(idx) &&				\
+	 MAYBE_REFERENCED(GETSTACK_SXPVAL_PTR(R_BCNodeStackTop + (idx))))
+#define STACKVAL_MAYBE_SHARED(idx)				\
+	(IS_STACKVAL_BOXED(idx) &&				\
+	 MAYBE_SHARED(GETSTACK_SXPVAL_PTR(R_BCNodeStackTop + (idx))))
+
+	if (STACKVAL_MAYBE_REFERENCED(-1) &&
+	    (STACKVAL_MAYBE_SHARED(-1) || STACKVAL_MAYBE_SHARED(-3)))
+	    GETSTACK_SXPVAL_PTR(&tmp) =
+		shallow_duplicate(GETSTACK_SXPVAL_PTR(&tmp));
+
 	R_BCNodeStackTop[-1] = R_BCNodeStackTop[-2];
 	R_BCNodeStackTop[-2] = tmp;
 	NEXT();
@@ -5150,26 +6841,41 @@ static SEXP bcEval(SEXP body, SEXP rho, Rboolean useCache)
        SEXP names = VECTOR_ELT(constants, GETOP());
        SEXP coffsets = VECTOR_ELT(constants, GETOP());
        SEXP ioffsets = VECTOR_ELT(constants, GETOP());
-       value = BCNPOP();
+       SEXP value = BCNPOP();
        if (!isVector(value) || length(value) != 1)
 	   errorcall(call, _("EXPR must be a length 1 vector"));
+       if (isFactor(value))
+	   warningcall(call,
+		       _("EXPR is a \"factor\", treated as integer.\n"
+			 " Consider using '%s' instead."),
+		       "switch(as.character( * ), ...)");
        if (TYPEOF(value) == STRSXP) {
 	   int i, n, which;
-	   if (names == R_NilValue)
-	       errorcall(call, _("numeric EXPR required for 'switch' without named alternatives"));
-	   if (TYPEOF(coffsets) != INTSXP)
-	       errorcall(call, "bad character 'switch' offsets");
-	   if (TYPEOF(names) != STRSXP || LENGTH(names) != LENGTH(coffsets))
-	       errorcall(call, "bad 'switch' names");
-	   n = LENGTH(names);
-	   which = n - 1;
-	   for (i = 0; i < n - 1; i++)
-	       if (pmatch(STRING_ELT(value, 0),
-			  STRING_ELT(names, i), 1 /* exact */)) {
-		   which = i;
-		   break;
+	   if (names == R_NilValue) {
+	       if (TYPEOF(ioffsets) != INTSXP)
+		   errorcall(call, _("bad numeric 'switch' offsets"));
+	       if (LENGTH(ioffsets) == 1) {
+		   pc = codebase + INTEGER(ioffsets)[0]; /* returns NULL */
+		   warningcall(call, _("'switch' with no alternatives"));
 	       }
-	   pc = codebase + INTEGER(coffsets)[which];
+	       else
+		   errorcall(call, _("numeric EXPR required for 'switch' "
+				     "without named alternatives"));
+	   } else {
+	       if (TYPEOF(coffsets) != INTSXP)
+		   errorcall(call, _("bad character 'switch' offsets"));
+	       if (TYPEOF(names) != STRSXP || LENGTH(names) != LENGTH(coffsets))
+		   errorcall(call, "bad 'switch' names");
+	       n = LENGTH(names);
+	       which = n - 1;
+	       for (i = 0; i < n - 1; i++)
+		   if (pmatch(STRING_ELT(value, 0),
+			      STRING_ELT(names, i), 1 /* exact */)) {
+		       which = i;
+		       break;
+		   }
+	       pc = codebase + INTEGER(coffsets)[which];
+	   }
        }
        else {
 	   if (TYPEOF(ioffsets) != INTSXP)
@@ -5178,22 +6884,44 @@ static SEXP bcEval(SEXP body, SEXP rho, Rboolean useCache)
 	   if (which != NA_INTEGER) which--;
 	   if (which < 0 || which >= LENGTH(ioffsets))
 	       which = LENGTH(ioffsets) - 1;
+	   if (LENGTH(ioffsets) == 1)
+	       warningcall(call, _("'switch' with no alternatives"));
 	   pc = codebase + INTEGER(ioffsets)[which];
        }
        NEXT();
     }
     OP(RETURNJMP, 0): {
-      value = BCNPOP();
+      SEXP value = BCNPOP();
       findcontext(CTXT_BROWSER | CTXT_FUNCTION, rho, value);
     }
-    OP(STARTVECSUBSET, 2): DO_STARTDISPATCH_N("[");
-    OP(STARTMATSUBSET, 2): DO_STARTDISPATCH_N("[");
-    OP(STARTSETVECSUBSET, 2): DO_START_ASSIGN_DISPATCH_N("[<-");
-    OP(STARTSETMATSUBSET, 2): DO_START_ASSIGN_DISPATCH_N("[<-");
+    OP(STARTSUBSET_N, 2): DO_STARTDISPATCH_N("[");
+    OP(STARTSUBASSIGN_N, 2): DO_START_ASSIGN_DISPATCH_N("[<-");
+    OP(VECSUBSET2, 1): DO_VECSUBSET(rho, TRUE); NEXT();
+    OP(MATSUBSET2, 1): DO_MATSUBSET(rho, TRUE); NEXT();
+    OP(VECSUBASSIGN2, 1): DO_VECSUBASSIGN(rho, TRUE); NEXT();
+    OP(MATSUBASSIGN2, 1): DO_MATSUBASSIGN(rho, TRUE); NEXT();
+    OP(STARTSUBSET2_N, 2): DO_STARTDISPATCH_N("[[");
+    OP(STARTSUBASSIGN2_N, 2): DO_START_ASSIGN_DISPATCH_N("[[<-");
+    OP(SUBSET_N, 2): DO_SUBSET_N(rho, FALSE); NEXT();
+    OP(SUBSET2_N, 2): DO_SUBSET_N(rho, TRUE); NEXT();
+    OP(SUBASSIGN_N, 2): DO_SUBASSIGN_N(rho, FALSE); NEXT();
+    OP(SUBASSIGN2_N, 2): DO_SUBASSIGN_N(rho, TRUE); NEXT();
+    OP(LOG, 1): DO_LOG(); NEXT();
+    OP(LOGBASE, 1): DO_LOGBASE(); NEXT();
+    OP(MATH1, 2): DO_MATH1(); NEXT();
+    OP(DOTCALL, 2): DO_DOTCALL(); NEXT();
+    OP(COLON, 1): DO_COLON(); NEXT();
+    OP(SEQALONG, 1): DO_SEQ_ALONG(); NEXT();
+    OP(SEQLEN, 1): DO_SEQ_LEN(); NEXT();
+    OP(BASEGUARD, 2): DO_BASEGUARD(); NEXT();
     LASTOP;
   }
 
  done:
+  R_BCIntActive = oldbcintactive;
+  R_BCbody = oldbcbody;
+  R_BCpc = oldbcpc;
+  R_Srcref = oldsrcref;
   R_BCNodeStackTop = oldntop;
 #ifdef BC_INT_STACK
   R_BCIntStackTop = olditop;
@@ -5201,7 +6929,7 @@ static SEXP bcEval(SEXP body, SEXP rho, Rboolean useCache)
 #ifdef BC_PROFILING
   current_opcode = old_current_opcode;
 #endif
-  return value;
+  return retvalue;
 }
 
 #ifdef THREADED_CODE
@@ -5226,6 +6954,7 @@ SEXP R_bcEncode(SEXP bytes)
     }
     else {
 	code = allocVector(INTSXP, m * n);
+	memset(INTEGER(code), 0, m * n * sizeof(int));
 	pc = (BCODE *) INTEGER(code);
 
 	for (i = 0; i < n; i++) pc[i].i = ipc[i];
@@ -5233,6 +6962,13 @@ SEXP R_bcEncode(SEXP bytes)
 	/* install the current version number */
 	pc[0].i = R_bcVersion;
 
+	/* Revert to version 2 to allow for some one compiling in a
+	   new R, loading/saving in an old one, and then trying to run
+	   in a new one. This has happened! Setting the version number
+	   back tells bcEval to drop back to eval. */
+	if (n == 2 && ipc[1] == BCMISMATCH_OP)
+	    pc[0].i = 2;
+
 	for (i = 1; i < n;) {
 	    int op = pc[i].i;
 	    if (op < 0 || op >= OPCOUNT)
@@ -5288,6 +7024,202 @@ SEXP R_bcEncode(SEXP x) { return x; }
 SEXP R_bcDecode(SEXP x) { return duplicate(x); }
 #endif
 
+/* Add BCODESXP bc into the constants registry, performing a deep copy of the
+   bc's constants */
+#define CONST_CHECK_COUNT 1000
+void attribute_hidden R_registerBC(SEXP bcBytes, SEXP bcode)
+{
+    if (R_check_constants <= 0)
+	return;
+    if (TYPEOF(bcBytes) != INTSXP)
+	error("registerBC requires integer vector as bcBytes");
+    if (TYPEOF(bcode) != BCODESXP)
+	error("registerBC requires BCODESXP object as bcode");
+
+    static int count = CONST_CHECK_COUNT;
+    if (--count <= 0) {
+	count = CONST_CHECK_COUNT;
+	R_checkConstants(TRUE);
+    }
+
+    /* The constants registry is a linked list of constant records. Each
+       constant record is a generic vector, its first element is a pointer
+       to the next constant record, the second element is a weak reference
+       to the byte-code object, the third element is a reference to the whole
+       constant pool, and the following elements are interleaved original and
+       copied constants. A constant registry corresponds to a constant pool.
+       When the weak reference gets cleared, the respective constant record
+       can be removed from the list.
+
+       One could simply compare/duplicate the lists of all constants (the whole
+       constant pools), but that turned out too expensive */
+
+    SEXP consts = BCCONSTS(bcode); /* all constants, VECSXP */
+
+#define CHECK_ALL_CONSTANTS
+#ifndef CHECK_ALL_CONSTANTS
+    int *ipc = INTEGER(bcBytes);
+    int n = LENGTH(bcBytes);
+    int i;
+    int loadableConsts = 0;
+
+    /* add only constants loaded by certain instructions  */
+    for(i = 0; i < n; i += opinfo[ipc[i]].argc + 1)
+        if (ipc[i] == LDCONST_OP || ipc[i] == PUSHCONSTARG_OP ||
+		ipc[i] == CALLSPECIAL_OP)
+            loadableConsts++;
+
+    SEXP constsRecord = PROTECT(allocVector(VECSXP, loadableConsts * 2 + 3));
+    int crIdx = 3;
+    for(i = 0; i < n; i += opinfo[ipc[i]].argc + 1)
+        if (ipc[i] == LDCONST_OP || ipc[i] == PUSHCONSTARG_OP ||
+		ipc[i] == CALLSPECIAL_OP) {
+            SEXP corig = VECTOR_ELT(consts, ipc[i + 1]);
+            SET_VECTOR_ELT(constsRecord, crIdx++, corig);
+            SET_VECTOR_ELT(constsRecord, crIdx++, duplicate(corig));
+        }
+#else
+    /* add the whole constant pool */
+    SEXP constsRecord = PROTECT(allocVector(VECSXP, 2 + 3));
+    SET_VECTOR_ELT(constsRecord, 3, consts);
+    /* the consts reference is in the record twice to make the code simpler */
+    SET_VECTOR_ELT(constsRecord, 4, duplicate(consts));
+#endif
+
+    SEXP wref = R_MakeWeakRef(bcode, R_NilValue, R_NilValue, FALSE);
+    SET_VECTOR_ELT(constsRecord, 0, VECTOR_ELT(R_ConstantsRegistry, 0));
+    SET_VECTOR_ELT(constsRecord, 1, wref);
+    SET_VECTOR_ELT(constsRecord, 2, consts);
+    SET_VECTOR_ELT(R_ConstantsRegistry, 0, constsRecord);
+    UNPROTECT(1); /* constsRecord */
+}
+
+/* A potentially very verbose report for modified compiler constant. */
+static void reportModifiedConstant(SEXP crec, SEXP orig, SEXP copy, int idx)
+{
+    if (R_check_constants < 5)
+	return;
+
+    SEXP consts = VECTOR_ELT(crec, 2);
+    int n = LENGTH(consts);
+    int i;
+    if (idx == -1) {
+	for(i = 0; i < n; i++)
+	    if (VECTOR_ELT(consts, i) == orig) {
+		idx = i;
+		break;
+	    }
+    }
+    int oldout = R_OutputCon; /* redirect standard to error output */
+    R_OutputCon = 2;
+    int oldcheck = R_check_constants; /* guard against recursive invocation */
+    R_check_constants = 0;
+    if (idx != 0) {
+	REprintf("ERROR: the modified value of the constant is:\n");
+	PrintValue(orig);
+	REprintf("ERROR: the original value of the constant is:\n");
+	PrintValue(copy);
+	REprintf("ERROR: the modified constant is at index %d\n", idx);
+	REprintf("ERROR: the modified constant is in this function body:\n");
+	PrintValue(VECTOR_ELT(consts, 0));
+    } else {
+	REprintf("ERROR: the modified constant is function body:\n");
+	PrintValue(orig);
+	REprintf("ERROR: the body was originally:\n");
+	PrintValue(copy);
+    }
+    findFunctionForBody(VECTOR_ELT(consts, 0));
+    R_check_constants = oldcheck;
+    R_OutputCon = oldout;
+}
+
+/* Checks whether compiler constants linked from the given record
+   were modified. */
+static Rboolean checkConstantsInRecord(SEXP crec, Rboolean abortOnError)
+{
+    int i;
+    int n = LENGTH(crec);
+    Rboolean constsOK = TRUE;
+
+    for (i = 3; i < n;) {
+	SEXP corig = VECTOR_ELT(crec, i++);
+	SEXP ccopy = VECTOR_ELT(crec, i++);
+
+	/* 39: not numerical comparison, not single NA, not attributes as
+           set, do ignore byte-code, do ignore environments of closures,
+           not ignore srcref
+
+           srcref is not ignored because ignoring it is expensive
+           (it triggers duplication)
+        */
+	if (!R_compute_identical(corig, ccopy, 39)) {
+
+#ifndef CHECK_ALL_CONSTANTS
+	    REprintf("ERROR: modification of compiler constant of type %s"
+		", length %d\n", CHAR(type2str(TYPEOF(ccopy))), length(ccopy));
+	    reportModifiedConstant(crec, corig, ccopy, -1);
+#else
+	    int nc = LENGTH(corig);
+	    /* some variables are volatile to prevent the compiler from
+	       optimizing them out, for easier debugging */
+	    volatile int ci;
+	    for(ci = 0; ci < nc; ci++) {
+		volatile SEXP orig = VECTOR_ELT(corig, ci);
+		volatile SEXP copy = VECTOR_ELT(ccopy, ci);
+		if (!R_compute_identical(orig, copy, 39)) {
+		    REprintf("ERROR: modification of compiler constant"
+			" of type %s, length %d\n",
+			CHAR(type2str(TYPEOF(copy))), length(copy));
+		    reportModifiedConstant(crec, orig, copy, ci);
+		}
+	    }
+#endif
+	    constsOK = FALSE;
+        }
+    }
+
+    if (!constsOK && abortOnError) {
+	/* turn off constant checking to avoid infinite recursion through
+	   R_Suicide -> ... -> R_RunExitFinalizers -> R_checkConstants. */
+	R_check_constants = 0;
+	R_Suicide("compiler constants were modified!\n");
+    }
+
+    return constsOK;
+}
+
+/* Checks if constants of any registered BCODESXP have been modified.
+   Returns TRUE if the constants are ok, otherwise returns false or aborts.*/
+Rboolean attribute_hidden R_checkConstants(Rboolean abortOnError)
+{
+    if (R_check_constants <= 0 || R_ConstantsRegistry == NULL)
+	return TRUE;
+    static Rboolean checkingInProgress = FALSE;
+    if (checkingInProgress)
+	/* recursive invocation is possible because of allocation
+           in R_compute_identical */
+	return TRUE;
+    /* NOTE: non-local return could disable checking */
+    checkingInProgress = TRUE;
+    SEXP prev_crec = R_ConstantsRegistry;
+    SEXP crec = VECTOR_ELT(prev_crec, 0);
+    Rboolean constsOK = TRUE;
+    while(crec != R_NilValue) {
+	SEXP wref = VECTOR_ELT(crec, 1);
+	SEXP bc = R_WeakRefKey(wref);
+	if (!checkConstantsInRecord(crec, abortOnError))
+	    constsOK = FALSE;
+	if (bc == R_NilValue)
+	    /* remove no longer needed record from the registry */
+	    SET_VECTOR_ELT(prev_crec, 0, VECTOR_ELT(crec, 0));
+	else
+            prev_crec = crec;
+	crec = VECTOR_ELT(crec, 0);
+    }
+    checkingInProgress = FALSE;
+    return constsOK;
+}
+
 SEXP attribute_hidden do_mkcode(SEXP call, SEXP op, SEXP args, SEXP rho)
 {
     SEXP bytes, consts, ans;
@@ -5295,8 +7227,10 @@ SEXP attribute_hidden do_mkcode(SEXP call, SEXP op, SEXP args, SEXP rho)
     checkArity(op, args);
     bytes = CAR(args);
     consts = CADR(args);
-    ans = CONS(R_bcEncode(bytes), consts);
+    ans = PROTECT(CONS(R_bcEncode(bytes), consts));
     SET_TYPEOF(ans, BCODESXP);
+    R_registerBC(bytes, ans);
+    UNPROTECT(1); /* ans */
     return ans;
 }
 
@@ -5312,14 +7246,14 @@ SEXP attribute_hidden do_bcclose(SEXP call, SEXP op, SEXP args, SEXP rho)
     CheckFormals(forms);
 
     if (! isByteCode(body))
-	errorcall(call, _("invalid body"));
+	error(_("invalid body"));
 
     if (isNull(env)) {
 	error(_("use of NULL environment is defunct"));
 	env = R_BaseEnv;
     } else
     if (!isEnvironment(env))
-	errorcall(call, _("invalid environment"));
+	error(_("invalid environment"));
 
     return mkCLOSXP(forms, body, env);
 }
@@ -5332,7 +7266,7 @@ SEXP attribute_hidden do_is_builtin_internal(SEXP call, SEXP op, SEXP args, SEXP
     symbol = CAR(args);
 
     if (!isSymbol(symbol))
-	errorcall(call, _("invalid symbol"));
+	error(_("invalid symbol"));
 
     if ((i = INTERNAL(symbol)) != R_NilValue && TYPEOF(i) == BUILTINSXP)
 	return R_TrueValue;
@@ -5376,12 +7310,13 @@ SEXP attribute_hidden do_disassemble(SEXP call, SEXP op, SEXP args, SEXP rho)
   checkArity(op, args);
   code = CAR(args);
   if (! isByteCode(code))
-    errorcall(call, _("argument is not a byte code object"));
+    error(_("argument is not a byte code object"));
   return disassemble(code);
 }
 
 SEXP attribute_hidden do_bcversion(SEXP call, SEXP op, SEXP args, SEXP rho)
 {
+  checkArity(op, args);
   SEXP ans = allocVector(INTSXP, 1);
   INTEGER(ans)[0] = R_bcVersion;
   return ans;
@@ -5397,11 +7332,11 @@ SEXP attribute_hidden do_loadfile(SEXP call, SEXP op, SEXP args, SEXP env)
     PROTECT(file = coerceVector(CAR(args), STRSXP));
 
     if (! isValidStringF(file))
-	errorcall(call, _("bad file name"));
+	error(_("bad file name"));
 
     fp = RC_fopen(STRING_ELT(file, 0), "rb", TRUE);
     if (!fp)
-	errorcall(call, _("unable to open 'file'"));
+	error(_("unable to open 'file'"));
     s = R_LoadFromFile(fp, 0);
     fclose(fp);
 
@@ -5416,13 +7351,13 @@ SEXP attribute_hidden do_savefile(SEXP call, SEXP op, SEXP args, SEXP env)
     checkArity(op, args);
 
     if (!isValidStringF(CADR(args)))
-	errorcall(call, _("'file' must be non-empty string"));
+	error(_("'file' must be non-empty string"));
     if (TYPEOF(CADDR(args)) != LGLSXP)
-	errorcall(call, _("'ascii' must be logical"));
+	error(_("'ascii' must be logical"));
 
     fp = RC_fopen(STRING_ELT(CADR(args), 0), "wb", TRUE);
     if (!fp)
-	errorcall(call, _("unable to open 'file'"));
+	error(_("unable to open 'file'"));
 
     R_SaveToFileV(CAR(args), fp, INTEGER(CADDR(args))[0], 0);
 
@@ -5519,7 +7454,11 @@ SEXP attribute_hidden do_putconst(SEXP call, SEXP op, SEXP args, SEXP env)
     /* check for a match and return index if one is found */
     for (i = 0; i < constCount; i++) {
 	SEXP y = VECTOR_ELT(constBuf, i);
-	if (x == y || R_compute_identical(x, y, 0))
+	/* 16 - take closure environments into account, this is necessary
+	        as closures (closure literals) can get into the AST when
+	        the AST is generated by a program (e.g. distr package)
+	*/
+	if (x == y || R_compute_identical(x, y, 16))
 	    return ScalarInteger(i);
     }
 
@@ -5550,11 +7489,12 @@ SEXP attribute_hidden do_getconst(SEXP call, SEXP op, SEXP args, SEXP env)
 }
 
 #ifdef BC_PROFILING
-SEXP R_getbcprofcounts()
+SEXP do_bcprofcounts(SEXP call, SEXP op, SEXP args, SEXP env)
 {
     SEXP val;
     int i;
 
+    checkArity(op, args);
     val = allocVector(INTSXP, OPCOUNT);
     for (i = 0; i < OPCOUNT; i++)
 	INTEGER(val)[i] = opcode_counts[i];
@@ -5568,13 +7508,14 @@ static void dobcprof(int sig)
     signal(SIGPROF, dobcprof);
 }
 
-SEXP R_startbcprof()
+SEXP do_bcprofstart(SEXP call, SEXP op, SEXP args, SEXP env)
 {
     struct itimerval itv;
     int interval;
     double dinterval = 0.02;
     int i;
 
+    checkArity(op, args);
     if (R_Profiling)
 	error(_("profile timer in use"));
     if (bc_profiling)
@@ -5608,10 +7549,11 @@ static void dobcprof_null(int sig)
     signal(SIGPROF, dobcprof_null);
 }
 
-SEXP R_stopbcprof()
+SEXP do_bcprofstop(SEXP call, SEXP op, SEXP args, SEXP env)
 {
     struct itimerval itv;
 
+    checkArity(op, args);
     if (! bc_profiling)
 	error(_("not byte code profiling"));
 
@@ -5626,6 +7568,19 @@ SEXP R_stopbcprof()
 
     return R_NilValue;
 }
+#else
+SEXP NORET do_bcprofcounts(SEXP call, SEXP op, SEXP args, SEXP env) {
+    checkArity(op, args);
+    error(_("byte code profiling is not supported in this build"));
+}
+SEXP NORET do_bcprofstart(SEXP call, SEXP op, SEXP args, SEXP env) {
+    checkArity(op, args);
+    error(_("byte code profiling is not supported in this build"));
+}
+SEXP NORET do_bcprofstop(SEXP call, SEXP op, SEXP args, SEXP env) {
+    checkArity(op, args);
+    error(_("byte code profiling is not supported in this build"));
+}
 #endif
 
 /* end of byte code section */
@@ -5652,3 +7607,31 @@ SEXP attribute_hidden do_setmaxnumthreads(SEXP call, SEXP op, SEXP args, SEXP rh
     }
     return ScalarInteger(old);
 }
+
+SEXP attribute_hidden do_returnValue(SEXP call, SEXP op, SEXP args, SEXP rho)
+{
+    SEXP val;
+    checkArity(op, args);
+    if (R_ExitContext && (val = R_ExitContext->returnValue)){
+	MARK_NOT_MUTABLE(val);
+	return val;
+    }
+    return CAR(args); /* default */
+}
+
+#include <Parse.h>
+SEXP R_ParseEvalString(const char *str, SEXP env)
+{
+    SEXP s = PROTECT(mkString(str));
+
+    ParseStatus status;
+    SEXP ps = PROTECT(R_ParseVector(s, -1, &status, R_NilValue));
+    if (status != PARSE_OK ||
+	TYPEOF(ps) != EXPRSXP ||
+	LENGTH(ps) != 1)
+	error("parse error");
+
+    SEXP val = eval(VECTOR_ELT(ps, 0), env);
+    UNPROTECT(2); /* s, ps */
+    return val;
+}
diff --git a/src/main/format.c b/src/main/format.c
index 20f989e..8103d9b 100644
--- a/src/main/format.c
+++ b/src/main/format.c
@@ -1,8 +1,8 @@
 /*
  *  R : A Computer Language for Statistical Data Analysis
  *  Copyright (C) 1995, 1996  Robert Gentleman and Ross Ihaka
- *  Copyright (C) 1997--2013  The R Core Team.
- *  Copyright (C) 2003--2011  The R Foundation
+ *  Copyright (C) 1997--2016  The R Core Team.
+ *  Copyright (C) 2003--2016  The R Foundation
  *
  *  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
@@ -16,12 +16,13 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  *
  *
  * Object Formatting
  *
- *  See ./paste.c for do_paste() , do_format() and  do_formatinfo()
+ *  See ./paste.c for do_paste() , do_format() and do_formatinfo() and
+ *       ./util.c for do_formatC()
  *  See ./printutils.c for general remarks on Printing and the Encode.. utils.
  *  See ./print.c  for do_printdefault, do_prmatrix, etc.
  *
@@ -150,7 +151,7 @@ LDOUBLE private_nearbyintl(LDOUBLE x)
 #  define R_nearbyint rint
 # else
 #  define R_nearbyint private_rint
-extern double private_rint(double x);/* in ../nmath/fround.c  */
+#  include "nmath2.h" // for private_rint
 # endif
 #endif
 
@@ -171,7 +172,7 @@ static void format_via_sprintf(double r, int d, int *kpower, int *nsig)
 static const long double tbl[] =
 {
     /* Powers exactly representable with 64 bit mantissa (except the first, which is only used with digits=0) */
-    1e-1, 
+    1e-1,
     1e00, 1e01, 1e02, 1e03, 1e04, 1e05, 1e06, 1e07, 1e08, 1e09,
     1e10, 1e11, 1e12, 1e13, 1e14, 1e15, 1e16, 1e17, 1e18, 1e19,
     1e20, 1e21, 1e22, 1e23, 1e24, 1e25, 1e26, 1e27
@@ -180,7 +181,7 @@ static const long double tbl[] =
 #else
 static const double tbl[] =
 {
-    1e-1, 
+    1e-1,
     1e00, 1e01, 1e02, 1e03, 1e04, 1e05, 1e06, 1e07, 1e08, 1e09,
     1e10, 1e11, 1e12, 1e13, 1e14, 1e15, 1e16, 1e17, 1e18, 1e19,
     1e20, 1e21, 1e22
@@ -188,14 +189,14 @@ static const double tbl[] =
 #define KP_MAX 22
 #endif
 
-static void 
-scientific(double *x, int *sgn, int *kpower, int *nsig, int *roundingwidens)
+static void
+scientific(double *x, int *neg, int *kpower, int *nsig, Rboolean *roundingwidens)
 {
     /* for a number x , determine
-     *	sgn    = 1_{x < 0}  {0/1}
+     *	neg    = 1_{x < 0}  {0/1}
      *	kpower = Exponent of 10;
      *	nsig   = min(R_print.digits, #{significant digits of alpha})
-     *  roundingwidens = 1 if rounding causes x to increase in width, 0 otherwise
+     *  roundingwidens = TRUE iff rounding causes x to increase in width
      *
      * where  |x| = alpha * 10^kpower	and	 1 <= alpha < 10
      */
@@ -207,17 +208,17 @@ scientific(double *x, int *sgn, int *kpower, int *nsig, int *roundingwidens)
     if (*x == 0.0) {
 	*kpower = 0;
 	*nsig = 1;
-	*sgn = 0;
-	*roundingwidens = 0;
+	*neg = 0;
+	*roundingwidens = FALSE;
     } else {
 	if(*x < 0.0) {
-	    *sgn = 1; r = -*x;
+	    *neg = 1; r = -*x;
 	} else {
-	    *sgn = 0; r = *x;
+	    *neg = 0; r = *x;
 	}
         if (R_print.digits >= DBL_DIG + 1) {
             format_via_sprintf(r, R_print.digits, kpower, nsig);
-	    *roundingwidens = 0;
+	    *roundingwidens = FALSE;
             return;
         }
         kp = (int) floor(log10(r)) - R_print.digits + 1;/* r = |x|; 10^(kp + digits - 1) <= r */
@@ -264,7 +265,7 @@ scientific(double *x, int *sgn, int *kpower, int *nsig, int *roundingwidens)
             kp--;
         }
         /* round alpha to integer, 10^(digits-1) <= alpha <= 10^digits */
-        /* accuracy limited by double rounding problem, 
+        /* accuracy limited by double rounding problem,
 	   alpha already rounded to 53 bits */
         alpha = R_nearbyint(r_prec);
 #endif
@@ -288,12 +289,12 @@ scientific(double *x, int *sgn, int *kpower, int *nsig, int *roundingwidens)
 	   This happens when the true value r is less than 10^(kpower+1)
 	   and would not round up to it in fixed format.
 	   Here rgt is the decimal place that will be cut off by rounding */
-	   
+
 	int rgt = R_print.digits - *kpower;
 	/* bound rgt by 0 and KP_MAX */
 	rgt = rgt < 0 ? 0 : rgt > KP_MAX ? KP_MAX : rgt;
 	double fuzz = 0.5/(double)tbl[1 + rgt];
-	// kpower can be bigger than the table.	
+	// kpower can be bigger than the table.
 	*roundingwidens = *kpower > 0 && *kpower <= KP_MAX && r < tbl[*kpower + 1] - fuzz;
     }
 }
@@ -312,7 +313,8 @@ void formatReal(double *x, R_xlen_t n, int *w, int *d, int *e, int nsmall)
 {
     int left, right, sleft;
     int mnl, mxl, rgt, mxsl, mxns, wF;
-    int neg, sgn, kpower, nsig, roundingwidens;
+    Rboolean roundingwidens;
+    int neg_i, neg, kpower, nsig;
     int naflag, nanflag, posinf, neginf;
 
     nanflag = 0;
@@ -330,14 +332,14 @@ void formatReal(double *x, R_xlen_t n, int *w, int *d, int *e, int nsmall)
 	    else if(x[i] > 0) posinf = 1;
 	    else neginf = 1;
 	} else {
-	    scientific(&x[i], &sgn, &kpower, &nsig, &roundingwidens);
+	    scientific(&x[i], &neg_i, &kpower, &nsig, &roundingwidens);
 
 	    left = kpower + 1;
 	    if (roundingwidens) left--;
-	    
-	    sleft = sgn + ((left <= 0) ? 1 : left); /* >= 1 */
+
+	    sleft = neg_i + ((left <= 0) ? 1 : left); /* >= 1 */
 	    right = nsig - left; /* #{digits} right of '.' ( > 0 often)*/
-	    if (sgn) neg = 1;	 /* if any < 0, need extra space for sign */
+	    if (neg_i) neg = 1;	 /* if any < 0, need extra space for sign */
 
 	    /* Infinite precision "F" Format : */
 	    if (right > rgt) rgt = right;	/* max digits to right of . */
@@ -399,14 +401,13 @@ void z_prec_r(Rcomplex *r, Rcomplex *x, double digits);
 void formatComplex(Rcomplex *x, R_xlen_t n, int *wr, int *dr, int *er,
 		   int *wi, int *di, int *ei, int nsmall)
 {
-/* format.info() or  x[1..l] for both Re & Im */
+/* format.info() for  x[1..n] for both Re & Im */
     int left, right, sleft;
     int rt, mnl, mxl, mxsl, mxns, wF, i_wF;
     int i_rt, i_mnl, i_mxl, i_mxsl, i_mxns;
-    int neg, sgn;
-    int kpower, nsig, roundingwidens;
-    int naflag;
-    int rnanflag, rposinf, rneginf, inanflag, iposinf;
+    Rboolean roundingwidens;
+    int neg_i, neg, kpower, nsig;
+    int naflag, rnanflag, rposinf, rneginf, inanflag, iposinf;
     Rcomplex tmp;
     Rboolean all_re_zero = TRUE, all_im_zero = TRUE;
 
@@ -436,13 +437,13 @@ void formatComplex(Rcomplex *x, R_xlen_t n, int *wr, int *dr, int *er,
 		else rneginf = 1;
 	    } else {
 		if(x[i].r != 0) all_re_zero = FALSE;
-		scientific(&(tmp.r), &sgn, &kpower, &nsig, &roundingwidens);
+		scientific(&(tmp.r), &neg_i, &kpower, &nsig, &roundingwidens);
 
 		left = kpower + 1;
 		if (roundingwidens) left--;
-		sleft = sgn + ((left <= 0) ? 1 : left); /* >= 1 */
+		sleft = neg_i + ((left <= 0) ? 1 : left); /* >= 1 */
 		right = nsig - left; /* #{digits} right of '.' ( > 0 often)*/
-		if (sgn) neg = 1; /* if any < 0, need extra space for sign */
+		if (neg_i) neg = 1; /* if any < 0, need extra space for sign */
 
 		if (right > rt) rt = right;	/* max digits to right of . */
 		if (left > mxl) mxl = left;	/* max digits to left of . */
@@ -461,7 +462,7 @@ void formatComplex(Rcomplex *x, R_xlen_t n, int *wr, int *dr, int *er,
 		else iposinf = 1;
 	    } else {
 		if(x[i].i != 0) all_im_zero = FALSE;
-		scientific(&(tmp.i), &sgn, &kpower, &nsig, &roundingwidens);
+		scientific(&(tmp.i), &neg_i, &kpower, &nsig, &roundingwidens);
 
 		left = kpower + 1;
 		if (roundingwidens) left--;
diff --git a/src/main/g_alab_her.c b/src/main/g_alab_her.c
new file mode 100644
index 0000000..9d5a80f
--- /dev/null
+++ b/src/main/g_alab_her.c
@@ -0,0 +1,980 @@
+/* PAUL MURRELL
+   This is from the GNU plotutils libplot-2.3 distribution
+   Several modifications have been made to use the R graphics engine
+   for output.
+   All references to HAVE_PROTOS removed
+   All references to "plotter" replaced with references to "GEDevDesc"
+*/
+
+/* This file contains the internal method _falabel_hershey(), which plots a
+   label using Hershey fonts.  Each character in a Hershey font is a
+   sequence of pen motions, so this function simply calls fmoverel() and
+   fcontrel() to `stroke' each character in the argument string.
+
+   The width of the string in user units is returned.  The internal method
+   _flabelwidth_hershey() is similar, but does not actually plot the label.
+*/
+
+/* PAUL MURRELL
+   sys-defines.h not used
+*/
+/* #include "sys-defines.h" */
+
+/* PAUL MURRELL
+   extern.h renamed g_extern.h
+*/
+#include "g_extern.h"
+#include "g_control.h"
+#include "g_her_metr.h"
+
+/* Shearing factor for oblique fonts, new_x = x + SHEAR * y  */
+
+#define SHEAR (2.0/7.0)
+
+/* Relative size of subscripts/superscripts (i.e. `indexical' size) */
+
+#define SCRIPTSIZE (0.6)
+
+/* Positioning of subscripts/superscripts */
+
+#define SUBSCRIPT_DX 0.0
+#define SUBSCRIPT_DY (-0.25)
+#define SUPERSCRIPT_DX 0.0
+#define SUPERSCRIPT_DY 0.4
+
+/* Positioning of accents (in Hershey units).  UP_SHIFT is amount by which
+   accents are raised when placed over upper-case letters.  RIGHT_SHIFT is
+   applied as well, if the upper-case letter is italic. */
+
+#define ACCENT_UP_SHIFT 7.0
+#define ACCENT_RIGHT_SHIFT 2.0
+
+/* Relative size of small Japanese Kana */
+#define SMALL_KANA_SIZE 0.725
+
+/* Hershey glyph arrays */
+
+#define OCCIDENTAL 0
+#define ORIENTAL 1
+
+/* Location of first Kana in the occidental glyph arrays.  (Kana, unlike
+   Kanji, are placed in the occidental array, at the very end.) */
+#define BEGINNING_OF_KANA 4195
+
+/* PAUL MURRELL
+   Structure to contain vfont current position
+*/
+typedef struct {
+    double currX;
+    double currY;
+    double angle;
+} vfontContext;
+
+/* forward references */
+static bool _composite_char (unsigned char *composite,
+			     unsigned char *character,
+			     unsigned char *accent);
+static void _draw_stroke (vfontContext *vc, const pGEcontext gc,
+			  pGEDevDesc dd,
+			  bool pendown, double deltax, double deltay);
+static double _label_width_hershey (const pGEcontext gc, pGEDevDesc dd,
+				    const unsigned short *label);
+static void _draw_hershey_string (vfontContext *vc, const pGEcontext gc,
+				  pGEDevDesc dd,
+				  const unsigned short *string);
+
+/* _draw_hershey_stroke() draws a stroke, taking into account the
+   transformation from Hershey units to user units, and also the current
+   transformation matrix (as set by the user).  _draw_stroke is similar,
+   but takes arguments in user units. */
+/* PAUL MURRELL
+   _draw_stroke now takes arguments in INCHES;  it needs to work in
+   an absolute coordinate system because it does the rotation
+*/
+
+static
+void _draw_hershey_stroke (vfontContext *vc, const pGEcontext gc, pGEDevDesc dd,
+			   bool pendown, double deltax, double deltay)
+{
+    _draw_stroke(vc, gc, dd, pendown,
+		 fromDeviceWidth(HERSHEY_X_UNITS_TO_USER_UNITS (deltax),
+				 GE_INCHES, dd),
+		 fromDeviceHeight(HERSHEY_Y_UNITS_TO_USER_UNITS (deltay),
+				  GE_INCHES, dd));
+}
+
+static void moverel(double dx, double dy, vfontContext *vc) {
+    vc->currX += dx;
+    vc->currY += dy;
+}
+
+static void linerel(double dx, double dy,
+		    vfontContext *vc, const pGEcontext gc,
+		    pGEDevDesc dd) {
+    GELine(toDeviceX(vc->currX, GE_INCHES, dd),
+	   toDeviceY(vc->currY, GE_INCHES, dd),
+	   toDeviceX(vc->currX+dx, GE_INCHES, dd),
+	   toDeviceY(vc->currY+dy, GE_INCHES, dd),
+	   gc, dd);
+    vc->currX += dx;
+    vc->currY += dy;
+}
+
+/* e.g. for some Windows headers */
+#ifndef M_PI
+#define M_PI		3.141592653589793238462643383279502884197169399375
+#endif
+
+static void _draw_stroke (vfontContext *vc, const pGEcontext gc, pGEDevDesc dd,
+			  bool pendown, double deltax, double deltay)
+{
+  double dx, dy;
+  double theta;
+
+  theta = M_PI * vc->angle / 180.0;
+
+  dx = cos(theta) * deltax - sin(theta) * deltay;
+  dy = sin(theta) * deltax + cos(theta) * deltay;
+
+  if (pendown)
+      linerel(dx, dy, vc, gc, dd);
+  else
+      moverel(dx, dy, vc);
+}
+
+/* PAUL MURRELL
+   Renamed from _g_flabelwidth_hershey to GVStrWidth
+   ... and added unit argument
+   ... and rearranged order of arguments
+*/
+
+/* this is the version of the flabelwidth() method that is specific to the
+   case when the current Plotter font is a Hershey font; called in
+   g_flabelwidth () .
+   
+   Argument 'enc' is ignored: these are in their own encoding.
+*/
+attribute_hidden
+double R_GE_VStrWidth (const char *s, cetype_t enc, 
+		       const pGEcontext gc, pGEDevDesc dd)
+{
+  double label_width;
+  unsigned short *codestring;
+
+  /* PAUL MURRELL
+     _controlify using R_alloc instead of xmalloc so need to do
+     vmaxget() ... vmaxset() instead of free()
+  */
+
+  const void *vmax = vmaxget();
+
+  /* convert string to a codestring, including annotations */
+  codestring = _controlify (dd, (const unsigned char *) s,
+			    gc->fontfamily[7] - 1, gc->fontface);
+
+  label_width = _label_width_hershey (gc, dd, codestring);
+
+  vmaxset(vmax);
+  /*  free (codestring); */
+
+  return label_width;
+}
+
+/* PAUL MURRELL
+   Added _label_height_hershey and GVStrHeight function
+*/
+
+static double _label_height_hershey (const pGEcontext gc,
+				     pGEDevDesc dd,
+				     const unsigned short *label)
+{
+    return( HERSHEY_Y_UNITS_TO_USER_UNITS(HERSHEY_LARGE_CAPHEIGHT) );
+}
+
+attribute_hidden
+double R_GE_VStrHeight (const char *s, cetype_t enc, 
+			const pGEcontext gc, pGEDevDesc dd)
+{
+  double label_height;
+  unsigned short *codestring;
+
+  const void *vmax = vmaxget();
+
+  /* convert string to a codestring, including annotations */
+  codestring = _controlify (dd, (const unsigned char *) s,
+			    gc->fontfamily[7] - 1, gc->fontface);
+
+  label_height = _label_height_hershey (gc, dd, codestring);
+
+  vmaxset(vmax);
+
+  return label_height;
+}
+
+/* PAUL MURRELL
+   This guy is the entry point to the GNU code
+   Renamed from _g_falabel_hershey to GVText
+   Reordered arguments
+   Added x, y, rotation, and font specification arguments
+   Re-typed x/y_justify from int to double
+   Re-typed s from "unsigned char *" to char *
+   Changed return value from double to void
+*/
+
+/* this is the version of the falabel() method that is specific
+   to the case when the current Plotter font is a Hershey font */
+attribute_hidden
+void R_GE_VText (double x, double y, const char *s, cetype_t enc,
+		 double x_justify, double y_justify, double rotation,
+		 const pGEcontext gc, pGEDevDesc dd)
+{
+  unsigned short *codestring;
+  double label_width, label_height;
+  double x_offset, y_offset;
+/*  double x_displacement; */
+
+  /* PAUL MURRELL
+     _controlify using R_alloc instead of xmalloc so need to do
+     vmaxget() ... vmaxset() instead of free()
+  */
+  const void *vmax = vmaxget();
+
+  /* PAUL MURRELL
+     initialise the local currX and currY
+     work in INCHES because that is what moverel and linerel work in
+  */
+  vfontContext vc;
+  vc.currX = fromDeviceX(x, GE_INCHES, dd);
+  vc.currY = fromDeviceY(y, GE_INCHES, dd);
+  vc.angle = rotation;
+
+  /* PAUL MURRELL
+   * Override gc settings for lty and lwd
+   */
+  gc->lty = LTY_SOLID;
+  gc->lwd = HERSHEY_LINE_WIDTH_TO_LWD (HERSHEY_STROKE_WIDTH);
+  gc->lend = GE_ROUND_CAP;
+  gc->ljoin = GE_ROUND_JOIN;
+
+  /* convert string to a codestring, including annotations */
+  codestring = _controlify (dd, (const unsigned char *)s,
+			    gc->fontfamily[7] - 1, gc->fontface);
+
+
+  /* PAUL MURRELL
+     Justification changed from char (e.g., 'l', 'c', 'r') to
+     double (e.g., 0, .5, 1)
+     Also added handling of NaN x_justify and y_justify
+     ... and replaced HERSHEY_Y_UNITS_TO_USER_UNITS(HERSHEY_HEIGHT)
+     with HERSHEY_Y_UNITS_TO_USER_UNITS(HERSHEY_LARGE_CAPHEIGHT)
+     ... and replaced ((double)HERSHEY_ASCENT / (double)HERSHEY_HEIGHT)
+     with 1.0
+  */
+
+  /* dimensions of the string, in user units */
+  label_width = _label_width_hershey (gc, dd, codestring);
+  label_height = _label_height_hershey(gc, dd, codestring);
+
+  if (!R_FINITE(x_justify))
+      x_justify = 0.5;
+  if (!R_FINITE(y_justify))
+      y_justify = 0.5;
+
+  x_offset = 0 - x_justify;
+  /* x_displacement = 1 - 2 * x_justify; */
+
+  y_offset = 0 - y_justify * 1.0;
+
+  /* save relevant drawing attributes, and restore them later */
+
+  {
+/*
+    char *old_line_mode, *old_cap_mode, *old_join_mode;
+    int old_fill_type;
+    double oldposx, oldposy;
+    bool old_dash_array_in_effect;
+
+    old_line_mode = (char *)_plot_xmalloc (strlen (_plotter->drawstate->line_mode) + 1);
+    old_cap_mode = (char *)_plot_xmalloc (strlen (_plotter->drawstate->cap_mode) + 1);
+    old_join_mode = (char *)_plot_xmalloc (strlen (_plotter->drawstate->join_mode) + 1);
+    oldposx = (_plotter->drawstate->pos).x;
+    oldposy = (_plotter->drawstate->pos).y;
+
+    strcpy (old_line_mode, _plotter->drawstate->line_mode);
+    strcpy (old_cap_mode, _plotter->drawstate->cap_mode);
+    strcpy (old_join_mode, _plotter->drawstate->join_mode);
+    old_fill_type = _plotter->drawstate->fill_type;
+    old_dash_array_in_effect = _plotter->drawstate->dash_array_in_effect;
+*/
+    /* Our choices for rendering: solid lines, rounded capitals and joins,
+       a line width equal to slightly more than 1 Hershey unit, and
+       transparent filling. */
+/*
+    _plotter->linemod (R___(_plotter) "solid");
+    _plotter->capmod (R___(_plotter) "round");
+    _plotter->joinmod (R___(_plotter) "round");
+    _plotter->filltype (R___(_plotter) 0);
+*/
+
+    /* move to take horizontal and vertical justification into account;
+       arguments here are in user units */
+      /* PAUL MURRELL
+	 arguments now in INCHES because _draw_stroke does rotation
+	 so it needs to use absolute coordinates
+      */
+      _draw_stroke (&vc, gc, dd,
+		    false,
+		    fromDeviceWidth(x_offset * label_width, GE_INCHES, dd),
+		    fromDeviceHeight(y_offset * label_height, GE_INCHES, dd));
+    /* call stroker on the sequence of strokes obtained from each char (the
+       stroker may manipulate the line width) */
+      /* _draw_hershey_stroke (dd, true, 0, HERSHEY_EM);     */
+      _draw_hershey_string (&vc, gc, dd, codestring);
+
+    /* Restore original values of relevant drawing attributes, free
+       storage.  endpath() will be invoked in here automatically, flushing
+       the created polyline object comprising the stroked text. */
+/*
+    _plotter->linemod (R___(_plotter) old_line_mode);
+    _plotter->capmod (R___(_plotter) old_cap_mode);
+    _plotter->joinmod (R___(_plotter) old_join_mode);
+    _plotter->filltype (R___(_plotter) old_fill_type);
+    _plotter->drawstate->dash_array_in_effect = old_dash_array_in_effect;
+
+    free (old_line_mode);
+    free (old_cap_mode);
+    free (old_join_mode);
+*/
+    /* return to original position */
+      /*    _plotter->fmove (R___(_plotter) oldposx, oldposy); */
+  }
+
+  /* amount by which to shift after printing label (user units) */
+/*
+  postdx = x_displacement * label_width;
+  theta = M_PI * rotation / 180.0;
+  dx = cos (theta) * postdx
+    - sin (theta) * 0;
+  dy = sin (theta) * postdx
+    + cos (theta) * 0;
+
+  moverel(dx, dy);
+*/
+
+  vmaxset(vmax);
+  /*  free (codestring); */
+
+  /* PAUL MURRELL
+     No return value
+  */
+  /* return label_width;		 user units */
+}
+
+/* In addition to scaling the character sizes and the `width', we perform
+   the following (dx, dy):
+
+   enter subscript	(dx, dy) = (-1/9, -1/2) * width
+   exit subscript	(dx, dy) = (+1/6, +1/2) * width
+
+   enter superscript	(dx, dy) = (-1/9, +1/2) * width
+   exit superscript	(dx, dy) = (+1/6, -1/2) * width
+
+   For clarity here, `width' refers to the width _before_ it is
+   multiplied by a factor 2/3.
+
+   [N.B. In Bob Beach's original UGS character stroke generator,
+   the +1/6's here were +2/9 instead.  Better?] */
+
+/* _label_width_hershey() computes the width (total delta x) of a
+   controlified character string to be rendered in a vector font, in user
+   units */
+static double _label_width_hershey (const pGEcontext gc, pGEDevDesc dd,
+				    const unsigned short *label)
+{
+  const unsigned short *ptr = label;
+  unsigned short c;
+  double charsize = 1.0;	/* relative char size, 1.0 means full size */
+  double saved_charsize = 1.0;
+  double width = 0.0;		/* label width */
+  double saved_width = 0.0;
+
+  /* loop through unsigned shorts in label */
+  while ((c = (*ptr)) != (unsigned short)'\0')
+    {
+      int glyphnum;		/* glyph in Hershey array */
+      const unsigned char *glyph;
+
+      if (c & RAW_HERSHEY_GLYPH)
+	/* glyph was spec'd via an escape, not as a char in a font */
+	{
+	  glyphnum = c & GLYPH_SPEC;
+	  glyph = (const unsigned char *)(_occidental_hershey_glyphs[glyphnum]);
+
+	  if (*glyph != '\0')	/* nonempty glyph */
+	    /* 1st two chars are bounds */
+	    width += charsize * ((int)glyph[1] - (int)glyph[0]);
+	}
+      else if (c & RAW_ORIENTAL_HERSHEY_GLYPH)
+	/* glyph was spec'd via an escape, not as a char in a font */
+	{
+	  glyphnum = c & GLYPH_SPEC;
+	  glyph = (const unsigned char *)_oriental_hershey_glyphs[glyphnum];
+
+	  if (*glyph != '\0')	/* nonempty glyph */
+	    /* 1st two chars are bounds */
+	    width += charsize * ((int)glyph[1] - (int)glyph[0]);
+	}
+      else if (c & CONTROL_CODE)	/* parse control code */
+	{
+	  switch (c & ~CONTROL_CODE)
+	    {
+	    case C_BEGIN_SUBSCRIPT:
+	    case C_BEGIN_SUPERSCRIPT :
+	      charsize *= SCRIPTSIZE;
+	      break;
+
+	    case C_END_SUBSCRIPT:
+	    case C_END_SUPERSCRIPT:
+	      charsize /= SCRIPTSIZE;
+	      break;
+
+	    case C_PUSH_LOCATION:
+	      saved_width = width;
+	      saved_charsize = charsize;
+	      break;
+
+	    case C_POP_LOCATION:
+	      width = saved_width;
+	      charsize = saved_charsize;
+	      break;
+
+	    case C_RIGHT_ONE_EM:
+	      width += charsize * HERSHEY_EM;
+	      break;
+
+	    case C_RIGHT_HALF_EM:
+	      width += charsize * HERSHEY_EM / 2.0;
+	      break;
+
+	    case C_RIGHT_QUARTER_EM:
+	      width += charsize * HERSHEY_EM / 4.0;
+	      break;
+
+	    case C_RIGHT_SIXTH_EM:
+	      width += charsize * HERSHEY_EM / 6.0;
+	      break;
+
+	    case C_RIGHT_EIGHTH_EM:
+	      width += charsize * HERSHEY_EM / 8.0;
+	      break;
+
+	    case C_RIGHT_TWELFTH_EM:
+	      width += charsize * HERSHEY_EM / 12.0;
+	      break;
+
+	    case C_LEFT_ONE_EM:
+	      width -= charsize * HERSHEY_EM;
+	      break;
+
+	    case C_LEFT_HALF_EM:
+	      width -= charsize * HERSHEY_EM / 2.0;
+	      break;
+
+	    case C_LEFT_QUARTER_EM:
+	      width -= charsize * HERSHEY_EM / 4.0;
+	      break;
+
+	    case C_LEFT_SIXTH_EM:
+	      width -= charsize * HERSHEY_EM / 6.0;
+	      break;
+
+	    case C_LEFT_EIGHTH_EM:
+	      width -= charsize * HERSHEY_EM / 8.0;
+	      break;
+
+	    case C_LEFT_TWELFTH_EM:
+	      width -= charsize * HERSHEY_EM / 12.0;
+	      break;
+
+	      /* unrecognized control code */
+	    default:
+	      break;
+	    }
+	}
+      else			/* yow, an actual character */
+	{
+	  int raw_fontnum;
+
+	  /* compute index of font, in table in g_fontdb.c */
+	  raw_fontnum = (c >> FONT_SHIFT) & ONE_BYTE;
+
+	  c &= ~FONT_SPEC;	/* extract character proper */
+	  glyphnum = (_hershey_font_info[raw_fontnum].chars)[c];
+
+	  /* could be a pseudo glyph number, e.g. an indication that
+	     character is composite */
+	  if (glyphnum == ACC0 || glyphnum == ACC1 || glyphnum == ACC2)
+	    {
+		unsigned char composite, character = '\0' /* -Wall */, accent;
+
+	      /* if so, use 1st element of composite character */
+	      composite = (unsigned char)c;
+	      if (_composite_char (&composite, &character, &accent))
+		glyphnum = (_hershey_font_info[raw_fontnum].chars)[character];
+	      else
+		glyphnum = UNDE; /* hope this won't happen */
+	    }
+
+	  /* could also be a glyph number displaced by KS, to indicate
+	     that this is a small kana */
+	  if (glyphnum & KS)
+	    glyphnum -= KS;
+
+	  glyph = (const unsigned char *)(_occidental_hershey_glyphs[glyphnum]);
+	  if (*glyph != '\0')	/* nonempty glyph */
+	    /* 1st two chars are bounds */
+	    width += charsize * ((int)glyph[1] - (int)glyph[0]);
+	}
+
+      ptr++;			/* bump pointer in string */
+    }
+
+  return HERSHEY_X_UNITS_TO_USER_UNITS (width);
+}
+
+/* _draw_hershey_penup_stroke() draws a penup stroke, along a vector
+   specified in Hershey units.  Size scaling and obliquing (true/false) are
+   specified.  This is used for repositioning during rendering of
+   composite (accented) characters. */
+static
+void _draw_hershey_penup_stroke(vfontContext *vc, const pGEcontext gc,
+				pGEDevDesc dd,
+				double dx, double dy,
+				double charsize, bool oblique)
+{
+  double shear;
+
+  shear = oblique ? (SHEAR) : 0.0;
+  _draw_hershey_stroke (vc, gc, dd,
+			false,	/* pen up */
+			charsize * (dx + shear * dy),
+			charsize * dy);
+}
+
+/* _draw_hershey_glyph() invokes move() and cont() to draw a raw Hershey
+   glyph, specified by index in the occidental or oriental glyph arrays.
+   Size scaling and obliquing (true/false) are specified. */
+static
+void _draw_hershey_glyph (vfontContext *vc, const pGEcontext gc, pGEDevDesc dd,
+			  int glyphnum,
+			  double charsize, int type, bool oblique)
+{
+  double xcurr, ycurr;
+  double xfinal, yfinal;
+  bool pendown = false;
+  const unsigned char *glyph;
+  double dx, dy;
+  double shear;
+
+  shear = oblique ? (SHEAR) : 0.0;
+  switch (type)
+    {
+    case OCCIDENTAL:
+    default:
+      glyph = (const unsigned char *)(_occidental_hershey_glyphs[glyphnum]);
+      break;
+    case ORIENTAL:
+      glyph = (const unsigned char *)(_oriental_hershey_glyphs[glyphnum]);
+      break;
+    }
+
+  if (*glyph != '\0')	/* nonempty glyph */
+    {
+      xcurr = charsize * (double)glyph[0];
+      xfinal = charsize * (double)glyph[1];
+      ycurr = yfinal = 0.0;
+      glyph += 2;
+      while (*glyph)
+	{
+	  int xnewint;
+
+	  xnewint = (int)glyph[0];
+
+	  if (xnewint == (int)' ')
+	    pendown = false;
+	  else
+	    {
+	      double xnew, ynew;
+
+	      xnew = (double)charsize * xnewint;
+	      ynew = (double)charsize
+		* ((int)'R'
+		   - ((int)glyph[1] + (double)HERSHEY_BASELINE));
+	      dx = xnew - xcurr;
+	      dy = ynew - ycurr;
+	      _draw_hershey_stroke (vc, gc, dd,
+				    pendown, dx + shear * dy, dy);
+	      xcurr = xnew, ycurr = ynew;
+	      pendown = true;
+	    }
+
+	  glyph +=2;	/* on to next pair */
+	}
+
+      /* final penup stroke, to end where we should */
+      dx = xfinal - xcurr;
+      dy = yfinal - ycurr;
+      _draw_hershey_stroke (vc, gc, dd, false, dx + shear * dy, dy);
+    }
+}
+
+/* _draw_hershey_string() strokes a string beginning at present location,
+   which is taken to be on the string's baseline.  Besides invoking move()
+   and cont(), it invokes linewidth(). */
+static
+void _draw_hershey_string (vfontContext *vc, const pGEcontext gc, pGEDevDesc dd,
+			   const unsigned short *string)
+{
+  unsigned short c;
+  const unsigned short *ptr = string;
+  double charsize = 1.0;
+  int line_width_type = 0;	/* 0,1,2 = unset,occidental,oriental */
+
+  while ((c = (*ptr++)) != '\0')
+    {
+      /* Check for the four possibilities: (1) a Hershey glyph specified by
+	 glyph number, (2) an oriental Hershey glyph specified by glyph
+	 number, (3) a control code, and (4) an ordinary font character,
+	 which will be mapped to a Hershey glyph by one of the tables in
+	 g_fontdb.c. */
+
+      if (c & RAW_HERSHEY_GLYPH)
+	{
+	  if (line_width_type != 1)
+	    {
+	      gc->lwd = HERSHEY_LINE_WIDTH_TO_LWD (HERSHEY_STROKE_WIDTH);
+	      line_width_type = 1;
+	    }
+	  _draw_hershey_glyph (vc, gc, dd,
+			       c & GLYPH_SPEC, charsize, OCCIDENTAL, false);
+	}
+
+      else if (c & RAW_ORIENTAL_HERSHEY_GLYPH)
+	{
+	  if (line_width_type != 2)
+	    {
+	      gc->lwd = HERSHEY_LINE_WIDTH_TO_LWD (HERSHEY_STROKE_WIDTH);
+	      line_width_type = 2;
+	    }
+	  _draw_hershey_glyph (vc, gc, dd,
+			       c & GLYPH_SPEC, charsize, ORIENTAL, false);
+	}
+
+      else if (c & CONTROL_CODE)
+	switch (c & ~CONTROL_CODE) /* parse control codes */
+	  {
+	  case C_BEGIN_SUPERSCRIPT :
+	    _draw_hershey_stroke (vc, gc, dd,
+				  false,
+				  SUPERSCRIPT_DX * charsize * HERSHEY_EM,
+				  SUPERSCRIPT_DY * charsize * HERSHEY_EM);
+	    charsize *= SCRIPTSIZE;
+	    break;
+
+	  case C_END_SUPERSCRIPT:
+	    charsize /= SCRIPTSIZE;
+	    _draw_hershey_stroke (vc, gc, dd,
+				  false,
+				  - SUPERSCRIPT_DX * charsize * HERSHEY_EM,
+				  - SUPERSCRIPT_DY * charsize * HERSHEY_EM);
+	    break;
+
+	  case C_BEGIN_SUBSCRIPT:
+	    _draw_hershey_stroke (vc, gc, dd,
+				  false,
+				  SUBSCRIPT_DX * charsize * HERSHEY_EM,
+				  SUBSCRIPT_DY * charsize * HERSHEY_EM);
+	    charsize *= SCRIPTSIZE;
+	    break;
+
+	  case C_END_SUBSCRIPT:
+	    charsize /= SCRIPTSIZE;
+	    _draw_hershey_stroke (vc, gc, dd,
+				  false,
+				  - SUBSCRIPT_DX * charsize * HERSHEY_EM,
+				  - SUBSCRIPT_DY * charsize * HERSHEY_EM);
+	    break;
+
+	  case C_PUSH_LOCATION:
+	      /* saved_charsize = charsize;
+		 saved_position_x = _plotter->drawstate->pos.x;
+		 saved_position_y = _plotter->drawstate->pos.y; */
+	    break;
+
+	  case C_POP_LOCATION:
+	      /* charsize = saved_charsize;
+		 _plotter->fmove (R___(_plotter)
+		 saved_position_x, saved_position_y); */
+	    break;
+
+	  case C_RIGHT_ONE_EM:
+	    _draw_hershey_stroke (vc, gc, dd,
+				  false, charsize * HERSHEY_EM, 0.0);
+	    break;
+
+	  case C_RIGHT_HALF_EM:
+	    _draw_hershey_stroke (vc, gc, dd,
+				  false, charsize * HERSHEY_EM / 2.0, 0.0);
+	    break;
+
+	  case C_RIGHT_QUARTER_EM:
+	    _draw_hershey_stroke (vc, gc, dd,
+				  false, charsize * HERSHEY_EM / 4.0, 0.0);
+	    break;
+
+	  case C_RIGHT_SIXTH_EM:
+	    _draw_hershey_stroke (vc, gc, dd,
+				  false, charsize * HERSHEY_EM / 6.0, 0.0);
+	    break;
+
+	  case C_RIGHT_EIGHTH_EM:
+	    _draw_hershey_stroke (vc, gc, dd,
+				  false, charsize * HERSHEY_EM / 8.0, 0.0);
+	    break;
+
+	  case C_LEFT_ONE_EM:
+	    _draw_hershey_stroke (vc, gc, dd,
+				  false, - charsize * HERSHEY_EM, 0.0);
+	    break;
+
+	  case C_LEFT_HALF_EM:
+	    _draw_hershey_stroke (vc, gc, dd,
+				  false, - charsize * HERSHEY_EM / 2.0, 0.0);
+	    break;
+
+	  case C_LEFT_QUARTER_EM:
+	    _draw_hershey_stroke (vc, gc, dd,
+				  false, - charsize * HERSHEY_EM / 4.0, 0.0);
+	    break;
+
+	  case C_LEFT_SIXTH_EM:
+	    _draw_hershey_stroke (vc, gc, dd,
+				  false, - charsize * HERSHEY_EM / 6.0, 0.0);
+	    break;
+
+	  case C_LEFT_EIGHTH_EM:
+	    _draw_hershey_stroke (vc, gc, dd,
+				  false, - charsize * HERSHEY_EM / 8.0, 0.0);
+	    break;
+
+	    /* unrecognized control code, punt */
+	  default:
+	    break;
+	  }
+
+      else
+	/* yow, an actual font character!  Several possibilities: could be
+	   a composite (accented) character, could be a small Kana, or
+	   could be a garden-variety character. */
+	{
+	  int raw_fontnum;
+	  int glyphnum;		/* glyph in Hershey array */
+	  int char_glyphnum, accent_glyphnum; /* for composite chars */
+	  int char_width, accent_width; /* for composite chars */
+	  const unsigned char *char_glyph, *accent_glyph;
+	  unsigned char composite, character = '\0', accent = '\0' /* -Wall */;
+	  bool oblique, small_kana = false;
+
+	  /* compute index of font, in font table in g_fontdb.c */
+	  raw_fontnum = (c >> FONT_SHIFT) & ONE_BYTE;
+	  /* shear font?  (for HersheySans-Oblique, etc.) */
+	  oblique = _hershey_font_info[raw_fontnum].obliquing;
+
+	  c &= ~FONT_SPEC;	/* extract character proper */
+	  glyphnum = (_hershey_font_info[raw_fontnum].chars)[c];
+
+	  if (glyphnum & KS) /* a small kana? */
+	    {
+	      glyphnum -= KS;
+	      small_kana = true;
+	    }
+
+	  switch (glyphnum)
+	    {
+	      /* special case: this is a composite (accented) character;
+		 search font table in g_fontdb.c for it */
+	    case ACC0:
+	    case ACC1:
+	    case ACC2:
+	      composite = (unsigned char)c;
+	      if (_composite_char (&composite, &character, &accent))
+		{
+		  char_glyphnum =
+		    (_hershey_font_info[raw_fontnum].chars)[character];
+		  accent_glyphnum =
+		    (_hershey_font_info[raw_fontnum].chars)[accent];
+		}
+	      else
+		{		/* hope this won't happen */
+		  char_glyphnum = UNDE;
+		  accent_glyphnum = 0;
+		}
+	      char_glyph =
+		(const unsigned char *)_occidental_hershey_glyphs[char_glyphnum];
+	      accent_glyph =
+		(const unsigned char *)_occidental_hershey_glyphs[accent_glyphnum];
+
+	      if (*char_glyph != '\0') /* nonempty glyph */
+		/* 1st two chars are bounds, in Hershey units */
+		char_width = (int)char_glyph[1] - (int)char_glyph[0];
+	      else
+		char_width = 0;
+
+	      if (*accent_glyph != '\0') /* nonempty glyph */
+		/* 1st two chars are bounds, in Hershey units */
+		accent_width = (int)accent_glyph[1] - (int)accent_glyph[0];
+	      else
+		accent_width = 0;
+
+	      /* draw the character */
+	      if (line_width_type != 1)
+	      {
+		  gc->lwd = HERSHEY_LINE_WIDTH_TO_LWD (HERSHEY_STROKE_WIDTH);
+		  line_width_type = 1;
+		}
+	      _draw_hershey_glyph (vc, gc, dd,
+				   char_glyphnum, charsize,
+				   OCCIDENTAL, oblique);
+	      /* back up to draw accent */
+	      _draw_hershey_penup_stroke (vc, gc, dd,
+					  -0.5 * (double)char_width
+					  -0.5 * (double)accent_width,
+					  0.0, charsize, oblique);
+
+	      /* repositioning for uppercase and uppercase italic */
+	      if (glyphnum == ACC1)
+		_draw_hershey_penup_stroke (vc, gc, dd,
+					    0.0,
+					    (double)(ACCENT_UP_SHIFT),
+					    charsize, oblique);
+	      else if (glyphnum == ACC2)
+		_draw_hershey_penup_stroke (vc, gc, dd,
+					    (double)(ACCENT_RIGHT_SHIFT),
+					    (double)(ACCENT_UP_SHIFT),
+					    charsize, oblique);
+
+	      /* draw the accent */
+	      _draw_hershey_glyph (vc, gc, dd,
+				   accent_glyphnum, charsize,
+				   OCCIDENTAL, oblique);
+
+	      /* undo special repositioning if any */
+	      if (glyphnum == ACC1)
+		_draw_hershey_penup_stroke (vc, gc, dd,
+					    0.0,
+					    -(double)(ACCENT_UP_SHIFT),
+					    charsize, oblique);
+	      else if (glyphnum == ACC2)
+		_draw_hershey_penup_stroke (vc, gc, dd,
+					    -(double)(ACCENT_RIGHT_SHIFT),
+					    -(double)(ACCENT_UP_SHIFT),
+					    charsize, oblique);
+
+	      /* move forward, to end composite char where we should */
+	      _draw_hershey_penup_stroke (vc, gc, dd,
+					  0.5 * (double)char_width
+					  -0.5 * (double)accent_width,
+					  0.0, charsize, oblique);
+	      break;
+
+	      /* not a composite (accented) character; just an ordinary
+		 glyph from occidental+Kana array (could be a Kana, in
+		 particular, could be a small Kana) */
+	    default:
+	      if (small_kana)
+		{
+		  int kana_width;
+		  const unsigned char *kana_glyph;
+		  double shift = 0.5 * (1.0 - (SMALL_KANA_SIZE));
+
+		  kana_glyph =
+		    (const unsigned char *)_occidental_hershey_glyphs[glyphnum];
+		  kana_width = (int)kana_glyph[1] - (int)kana_glyph[0];
+
+		  /* draw small Kana, preceded and followed by a penup
+		     stroke in order to traverse the full width of an
+		     ordinary Kana */
+		  _draw_hershey_penup_stroke (vc, gc, dd,
+					      shift * (double)kana_width,
+					      0.0, charsize, oblique);
+		  if (line_width_type != 2)
+		    {
+			gc->lwd = HERSHEY_LINE_WIDTH_TO_LWD (HERSHEY_STROKE_WIDTH);
+		      line_width_type = 2;
+		    }
+		  _draw_hershey_glyph (vc, gc, dd,
+				       glyphnum,
+				       (SMALL_KANA_SIZE) * charsize,
+				       OCCIDENTAL, oblique);
+		  _draw_hershey_penup_stroke (vc, gc, dd,
+					      shift * (double)kana_width,
+					      0.0, charsize, oblique);
+		}
+	      else
+		/* whew! just an ordinary glyph from the occidental array
+		   (could be a Kana however, since they're confusingly
+		   placed in that array, at the end) */
+		{
+		  if (glyphnum >= BEGINNING_OF_KANA)
+		    {
+		      if (line_width_type != 2)
+			{
+			gc->lwd = HERSHEY_LINE_WIDTH_TO_LWD (HERSHEY_ORIENTAL_STROKE_WIDTH);
+			  line_width_type = 2;
+			}
+		    }
+		  else
+		      if (line_width_type != 1)
+			{
+			gc->lwd = HERSHEY_LINE_WIDTH_TO_LWD (HERSHEY_STROKE_WIDTH);
+			  line_width_type = 1;
+			}
+		_draw_hershey_glyph (vc, gc, dd,
+				     glyphnum, charsize,
+				     OCCIDENTAL, oblique);
+		}
+	      break;
+	    } /* end of case statement that switches based on glyphnum */
+
+	} /* end of font character case */
+
+    } /* end of loop through unsigned shorts in the codestring */
+
+  return;
+}
+
+/* retrieve the two elements of a composite character from the table in
+   g_fontdb.c */
+static bool _composite_char (unsigned char *composite,
+			     unsigned char *character,
+			     unsigned char *accent)
+{
+  const struct plHersheyAccentedCharInfoStruct *compchar = _hershey_accented_char_info;
+  bool found = false;
+  unsigned char given = *composite;
+
+  while (compchar->composite)
+    {
+      if (compchar->composite == given)
+	{
+	  found = true;
+	  /* return char and accent via pointers */
+	  *character = compchar->character;
+	  *accent = compchar->accent;
+	}
+      compchar++;
+    }
+
+  return found;
+}
+
diff --git a/src/main/g_cntrlify.c b/src/main/g_cntrlify.c
new file mode 100644
index 0000000..42b66c1
--- /dev/null
+++ b/src/main/g_cntrlify.c
@@ -0,0 +1,714 @@
+/* PAUL MURRELL
+   This is from the GNU plotutils libplot-2.3 distribution
+   All references to HAVE_PROTOS removed
+   All references to "plotter" replaced with references to "GEDevDesc"
+*/
+
+/* <UTF8-FIXME> This assumes single-byte encoding */
+
+/* _controlify() converts a "label" (i.e. a character string), which may
+   contain troff-like escape sequences, into a string of unsigned shorts.
+   The possible troff-like escape sequences are listed in g_cntrlify.h.
+
+   This conversion is to facilitate rendering.  _controlify() is called by
+   alabel(), and the converted label is rendered by _alabel_standard(),
+   _alabel_stroke(), or _alabel_device(), depending on what sort of font is
+   currently selected.  See g_alabel.c (_controlify() is called by
+   labelwidth() too).
+
+   If the currently selected font is a font with ISO-Latin-1 encoding, the
+   valid escape sequences include escape sequences for the non-ASCII
+   ISO-Latin-1 characters.  Also allowed are such escape sequences as \f0,
+   \f1, \f2, \f3, \f4, etc., which switch among the various fonts in the
+   current typeface:
+
+	\f1	Switch to font #1, basic
+	\f2	Switch to font #2, italic
+	\f3	Switch to font #3, bold
+	\f4	Switch to font #4, bold italic
+	\f0	Switch to font #0, symbol (including Greek characters)
+
+   \fP switches to the previously used font (there is a depth-1 stack,
+   i.e. only one previous font is remembered, as in troff).
+
+   All typefaces include at least two fonts: fonts #0 and #1.  Some may
+   include more than the above five.  Each unsigned short in the converted
+   string is really an annotated character: the low byte is the character,
+   and the high byte is the font number.
+
+   Besides font annotations, the controlified string may include control
+   codes (unsigned shorts with particular bit patterns in their high
+   bytes), which are produced by the escape sequences:
+
+	\sp  start superscript
+	\ep  end superscript
+
+	\sb  start subscript
+	\eb  end subscript
+
+	\mk  mark location
+	\rt  return to mark
+	     [useful e.g. for underlining, and filling square roots]
+
+    There are also control codes for horizontal shifts.  \r1, \r2, \r4,
+    \r6, \r8, \r^ will produce control codes that will shift right by 1 em,
+    1/2 em, 1/4 em, 1/6 em, 1/8 em, 1/12 em, respectively.  \l1, \l2, \l4,
+    \l6, \l8, \l^ are similar.
+
+    The string of unsigned shorts, which is returned, is allocated with
+    malloc and may be freed later. */
+
+/* PAUL MURRELL
+   sys-defines.h not used
+*/
+/* #include "sys-defines.h" */
+
+/* PAUL MURRELL
+   extern.h renamed g_extern.h
+*/
+#include "g_extern.h"
+#include "g_control.h"
+#include "g_cntrlify.h"
+#include "g_jis.h"
+
+/* these two array lengths must agree with values in file g_her_glyph.c */
+#define NUM_OCCIDENTAL_HERSHEY_GLYPHS 4400
+#define NUM_ORIENTAL_HERSHEY_GLYPHS 5500
+
+/* PAUL MURRELL
+   Added typeface and fontindex arguments
+*/
+
+attribute_hidden
+unsigned short * _controlify (pGEDevDesc dd, const unsigned char *src,
+			      int typeface, int fontindex)
+{
+  unsigned short *dest;
+  unsigned char c, d;
+  unsigned char esc[3];
+  int j = 0;
+  int raw_fontnum, raw_symbol_fontnum;
+  unsigned short fontword, symbol_fontword;
+
+  /* note: string length can grow by a factor of 6, because a single
+     printable character can be mapped to a sequence of unsigned shorts, of
+     length up to 6 (see comment below) */
+  /* PAUL MURRELL
+     replace _plot_xmalloc with R_alloc
+  */
+  dest = (unsigned short *) R_alloc (6 * strlen ((char *)src) + 1,
+				     sizeof(unsigned short));
+
+  /* PAUL MURRELL
+     only for Hershey fonts so removed switch ...
+  */
+      raw_fontnum = _hershey_typeface_info[typeface].fonts[fontindex];
+      raw_symbol_fontnum = _hershey_typeface_info[typeface].fonts[0];
+  /* Of the following two words, `fontword' is updated whenever an escape
+     sequence like \f0, \f1, \f2 etc. is seen, since raw_fontnum is itself
+     updated.  But `symbol_fontword' is fixed */
+      fontword = (unsigned short)(raw_fontnum << FONT_SHIFT);
+      symbol_fontword = (unsigned short)(raw_symbol_fontnum << FONT_SHIFT);
+
+  while (*src != (unsigned char)'\0')
+    {
+      /* If EUC, check first for high bit and process two-byte characters
+	 separately.  This approach is awkward (we duplicate a lot of code
+	 here, which appears elsewhere below). */
+
+      if ((raw_fontnum == HERSHEY_EUC)
+	  && (*src & 0x80) && (*(src + 1) & 0x80))
+	{
+	  unsigned char jis_row = *src & ~(0x80);
+	  unsigned char jis_col = *(src + 1) & ~(0x80);
+
+	  if (GOOD_JIS_INDEX(jis_row, jis_col))
+	    {
+	      int jis_glyphindex = 256 * jis_row + jis_col;
+
+	      if (jis_glyphindex >= BEGINNING_OF_KANJI)
+		/* in Kanji range, so check if we have it */
+		{
+#ifndef NO_KANJI
+		  const struct kanjipair *kanji = _builtin_kanji_glyphs;
+		  bool matched = false;
+
+		  while (kanji->jis != 0)
+		    {
+		      if (jis_glyphindex == kanji->jis)
+			{
+			  matched = true;
+			  break;
+			}
+		      kanji++;
+		    }
+		  if (matched)
+		    {
+		      dest[j++] = (unsigned short)( RAW_ORIENTAL_HERSHEY_GLYPH | (kanji->nelson));
+		      src += 2;
+		      continue;	/* back to top of while loop */
+		    }
+		  else		/* a Kanji we don't have */
+		    {
+		      /* render as standard `undefined character' glyph */
+		      dest[j++] = RAW_HERSHEY_GLYPH | UNDE;
+		      src += 2;
+		      continue;	/* back to top of while loop */
+		    }
+#endif /* not NO_KANJI */
+		}
+	      else
+		/* not in Kanji range, so look for it in char table */
+		{
+		  const struct jis_entry *char_mapping = _builtin_jis_chars;
+		  bool matched = false;
+
+		  while (char_mapping->jis != 0)
+		    {
+		      if (jis_glyphindex == char_mapping->jis)
+			{
+			  matched = true;
+			  break;
+			}
+		      char_mapping++;
+		    }
+		  if (matched)
+		    /* the entry in the character table maps the JIS
+		       character to a character (in 0..255 range) in
+		       one of the fonts in the master table in g_fontdb.c */
+		    {
+		      int fontnum = char_mapping->font;
+		      unsigned short charnum = char_mapping->charnum;
+
+		      if (charnum & RAW_HERSHEY_GLYPH)
+			/* a raw Hershey glyph, not in any font */
+			dest[j++] = RAW_HERSHEY_GLYPH | charnum;
+		      else
+			/* a character in one of the fonts in g_fontdb.c */
+			  dest[j++] = (unsigned short)((fontnum << FONT_SHIFT) | charnum);
+		      src += 2;
+		      continue; /* back to top of while loop */
+		    }
+		  else	/* a character we don't have */
+		    {
+		      /* render as standard `undefined character' glyph */
+		      dest[j++] = RAW_HERSHEY_GLYPH | UNDE;
+		      src += 2;
+		      continue;	/* back to top of while loop */
+		    }
+		}
+	    }
+	  else
+	    /* JIS index is OOB */
+	    {
+	      src += 2;
+	      continue;		/* back to top of while loop */
+	    }
+	}
+
+      /* if current font is Hershey, first try to match each ligature
+	 pattern (no ligatures supported in non-Hershey fonts) */
+      if (1) /* _plotter->drawstate->font_type == F_HERSHEY) */
+	{
+	  int i;
+	  bool matched = false;
+
+	  for (i = 0; i < NUM_LIGATURES; i++)
+	    if ((_ligature_tbl[i].font == raw_fontnum)
+		&& (strncmp ((char *)src, _ligature_tbl[i].from,
+			     strlen (_ligature_tbl[i].from)) == 0))
+	      {
+		matched = true;
+		break;
+	      }
+
+	  if (matched)
+	    {
+	      dest[j++] = fontword | (unsigned short)_ligature_tbl[i].byte;
+	      src += strlen (_ligature_tbl[i].from);
+	      continue;		/* back to top of while loop */
+	    }
+	}
+
+      c = *(src++);		/* no ligature, so get single new char */
+      if (c != (unsigned char)'\\') /* ordinary char, may pass through */
+	{
+	  /* if current font is an ISO-Latin-1 Hershey font ... */
+	    if (1 /* _plotter->drawstate->font_type == F_HERSHEY */
+	      && _hershey_font_info[raw_fontnum].iso8859_1)
+	    {
+	      int i;
+	      bool matched = false;
+
+	      /* check if this is a `raised' ISO-Latin-1 character */
+	      for (i = 0; i < NUM_RAISED_CHARS; i++)
+		if (c == _raised_char_tbl[i].from)
+		  {
+		    matched = true;
+		    break;
+		  }
+	      if (matched)	/* it's a raised character */
+		{
+		  /* map to string of unsigned shorts, length 3 or 6:
+		     `begin superscript' control code, [`mark'
+		     control code,] replacement char, [`return'
+		     control code, underline,] `end superscript' */
+		  dest[j++] =
+		    (unsigned short) (CONTROL_CODE | C_BEGIN_SUPERSCRIPT);
+		  if (_raised_char_tbl[i].underscored) /* also underline */
+		    {
+		      dest[j++] =
+			(unsigned short) (CONTROL_CODE | C_PUSH_LOCATION);
+		      dest[j++] =
+			fontword | (unsigned short)_raised_char_tbl[i].to;
+		      dest[j++] =
+			(unsigned short) (CONTROL_CODE | C_POP_LOCATION);
+		      /* select appropriate HersheySymbol font */
+		      dest[j++] =
+			symbol_fontword | (unsigned short)VECTOR_SYMBOL_FONT_UNDERSCORE;
+		    }
+		  else	/* just print raised char, no underline */
+		    dest[j++] =
+		      fontword | (unsigned short)_raised_char_tbl[i].to;
+
+		  dest[j++] =
+		    (unsigned short) (CONTROL_CODE | C_END_SUPERSCRIPT);
+
+		  continue; /* back to top of while loop */
+		}
+
+	      /* since current font is an ISO-Latin-1 Hershey font, also
+		 check if this char should be deligatured */
+	      for (i = 0; i < NUM_DELIGATURED_CHARS; i++)
+		if (c == _deligature_char_tbl[i].from)
+		  {
+		    matched = true;
+		    break;
+		  }
+	      if (matched)
+		{
+		  if (_deligature_char_tbl[i].except_font != raw_fontnum)
+		    {
+		      dest[j++] = fontword
+			| (unsigned short)_deligature_char_tbl[i].to[0];
+		      dest[j++] = fontword
+			| (unsigned short)_deligature_char_tbl[i].to[1];
+		      continue;	/* back to top of while loop */
+		    }
+		}
+	    }
+
+	  /* didn't do anything special, so just pass the character thru */
+	  dest[j++] = fontword | (unsigned short)c;
+	  continue;		/* back to top of while loop */
+	}
+      else			/* character is a backslash */
+	{
+	  int i;
+
+	  c = *(src++);		/* grab next character */
+	  if (c == (unsigned char)'\0')	/* ASCII NUL ? */
+	    {
+	      dest[j++] = fontword | (unsigned short)'\\';
+	      break;		/* string terminated with a backslash */
+	    }
+
+	  if (c == (unsigned char)'\\')
+	    {
+	      dest[j++] = fontword | (unsigned short)'\\';
+	      dest[j++] = fontword | (unsigned short)'\\';
+	      continue;		/* saw \\, leave as is */
+	    }
+
+	  d = *(src++);
+	  if (d == (unsigned char)'\0')
+	    {
+	      dest[j++] = fontword | (unsigned short)'\\';
+	      dest[j++] = fontword | (unsigned short)c;
+	      break;		/* string terminated with \c */
+	    }
+
+	  esc[0] = c;
+	  esc[1] = d;
+	  esc[2] = (unsigned char)'\0';	/* have an escape sequence */
+
+	  /* is this an escape seq. (e.g. \#H0001) for a raw Hershey glyph? */
+	  if (1 /* _plotter->drawstate->font_type == F_HERSHEY */
+	      && esc[0] == '#' && esc[1] == 'H'
+	      && src[0] >= '0' && src[0] <= '9'
+	      && src[1] >= '0' && src[1] <= '9'
+	      && src[2] >= '0' && src[2] <= '9'
+	      && src[3] >= '0' && src[3] <= '9')
+	    {
+	      int glyphindex;
+
+	      glyphindex = (src[3] - '0') + 10 * (src[2] - '0')
+		+ 100 * (src[1] - '0') + 1000 * (src[0] - '0');
+	      if (glyphindex < NUM_OCCIDENTAL_HERSHEY_GLYPHS)
+		{
+		  dest[j++] = (unsigned short)(RAW_HERSHEY_GLYPH | glyphindex);
+		  src += 4;
+		  continue;	/* back to top of while loop */
+		}
+	    }
+
+#ifndef NO_KANJI
+	  /* is this an escape seq. (e.g. \#N0001) for a raw Japanese
+	     Hershey glyph (Kanji), as numbered in Nelson's dictionary? */
+	  if (1 /* _plotter->drawstate->font_type == F_HERSHEY */
+	      && esc[0] == '#' && esc[1] == 'N'
+	      && src[0] >= '0' && src[0] <= '9'
+	      && src[1] >= '0' && src[1] <= '9'
+	      && src[2] >= '0' && src[2] <= '9'
+	      && src[3] >= '0' && src[3] <= '9')
+	    {
+	      int glyphindex;
+
+	      glyphindex = (src[3] - '0') + 10 * (src[2] - '0')
+		+ 100 * (src[1] - '0') + 1000 * (src[0] - '0');
+	      if (glyphindex < NUM_ORIENTAL_HERSHEY_GLYPHS)
+		{
+		  dest[j++] = (unsigned short)(RAW_ORIENTAL_HERSHEY_GLYPH | glyphindex);
+		  src += 4;
+		  continue;	/* back to top of while loop */
+		}
+	    }
+#endif /* not NO_KANJI */
+
+	  /* is this an escape seq. (e.g. \#J0001) for a raw Japanese
+	     Hershey glyph (JIS numbering, in hex)? */
+	  if (1 /* _plotter->drawstate->font_type == F_HERSHEY */
+	      && esc[0] == '#' && esc[1] == 'J'
+	      && ((src[0] >= '0' && src[0] <= '9')
+		  || (src[0] >= 'a' && src[0] <= 'f')
+		  || (src[0] >= 'A' && src[0] <= 'F'))
+	      && ((src[1] >= '0' && src[1] <= '9')
+		  || (src[1] >= 'a' && src[1] <= 'f')
+		  || (src[1] >= 'A' && src[1] <= 'F'))
+	      && ((src[2] >= '0' && src[2] <= '9')
+		  || (src[2] >= 'a' && src[2] <= 'f')
+		  || (src[2] >= 'A' && src[2] <= 'F'))
+	      && ((src[3] >= '0' && src[3] <= '9')
+		  || (src[3] >= 'a' && src[3] <= 'f')
+		  || (src[3] >= 'A' && src[3] <= 'F')))
+	    {
+	      int jis_glyphindex;
+	      int i, hexnum[4];
+	      int jis_row, jis_col;
+
+	      for (i = 0; i < 4; i++)
+		if (src[i] >= 'a' && src[i] <= 'f')
+		  hexnum[i] = 10 + src[i] - 'a';
+		else if (src[i] >= 'A' && src[i] <= 'F')
+		  hexnum[i] = 10 + src[i] - 'A';
+		else /* a decimal digit */
+		  hexnum[i] = src[i] - '0';
+
+	      jis_glyphindex = (hexnum[3] + 16 * hexnum[2]
+				+ 256 * hexnum[1] + 4096 * hexnum[0]);
+	      jis_row = hexnum[1] + 16 * hexnum[0];
+	      jis_col = hexnum[3] + 16 * hexnum[2];
+
+	      if (GOOD_JIS_INDEX(jis_row, jis_col))
+		{
+		  if (jis_glyphindex >= BEGINNING_OF_KANJI)
+		    /* in Kanji range, so check if we have it */
+		    {
+#ifndef NO_KANJI
+		      const struct kanjipair *kanji = _builtin_kanji_glyphs;
+		      bool matched = false;
+
+		      while (kanji->jis != 0)
+			{
+			  if (jis_glyphindex == kanji->jis)
+			    {
+			      matched = true;
+			      break;
+			    }
+			  kanji++;
+			}
+		      if (matched)
+			{
+			  dest[j++] = (unsigned short)(RAW_ORIENTAL_HERSHEY_GLYPH | (kanji->nelson));
+			  src += 4;
+			  continue;	/* back to top of while loop */
+			}
+		      else		/* a Kanji we don't have */
+			{
+			  /* render as standard `undefined character' glyph */
+			  dest[j++] = RAW_HERSHEY_GLYPH | UNDE;
+			  src += 4;
+			  continue;	/* back to top of while loop */
+			}
+#endif /* not NO_KANJI */
+		    }
+		  else
+		    /* not in Kanji range, so look for it in char table */
+		    {
+		      const struct jis_entry *char_mapping = _builtin_jis_chars;
+		      bool matched = false;
+
+		      while (char_mapping->jis != 0)
+			{
+			  if (jis_glyphindex == char_mapping->jis)
+			    {
+			      matched = true;
+			      break;
+			    }
+			  char_mapping++;
+			}
+		      if (matched)
+			/* the entry in the character table maps the JIS
+			   character to a character (in 0..255 range) in
+			   one of the fonts in the master table in g_fontdb.c*/
+			{
+			  int fontnum = char_mapping->font;
+			  unsigned short charnum = char_mapping->charnum;
+
+			  if (charnum & RAW_HERSHEY_GLYPH)
+			    /* a raw Hershey glyph, not in any font */
+			    dest[j++] = RAW_HERSHEY_GLYPH | charnum;
+			  else
+			    /* a character in one of the fonts in g_fontdb.c */
+			    dest[j++] = (unsigned short)((fontnum << FONT_SHIFT) | charnum);
+			  src += 4;
+			  continue; /* back to top of while loop */
+			}
+		      else	/* a character we don't have */
+			{
+			  /* render as standard `undefined character' glyph */
+			  dest[j++] = RAW_HERSHEY_GLYPH | UNDE;
+			  src += 4;
+			  continue;	/* back to top of while loop */
+			}
+		    }
+		}
+	    }
+
+	  {
+	    bool matched = false;
+
+	    /* is this an escape seq. for a control code? */
+	    for (i = 0; i < NUM_CONTROLS; i++)
+	      if (strcmp ((char *)esc, _control_tbl[i]) == 0)
+		{
+		  matched = true;
+		  break;
+		}
+	    if (matched)		/* it's a control code */
+	      {
+		dest[j++] = (unsigned short)(CONTROL_CODE | i);
+		continue;	/* back to top of while loop */
+	      }
+	  }
+
+	  /* if current font is an ISO-Latin-1 Hershey font, is this an
+	     escape sequence for an 8-bit (non-ASCII) char, which due to
+	     nonexistence should be deligatured? */
+	  if (1 /* _plotter->drawstate->font_type == F_HERSHEY */
+	      && _hershey_font_info[raw_fontnum].iso8859_1)
+	    {
+	      int i;
+	      bool matched = false;
+
+	      for (i = 0; i < NUM_DELIGATURED_ESCAPES; i++)
+		if (strcmp ((char *)esc, _deligature_escape_tbl[i].from) == 0)
+		  {
+		    matched = true;
+		    break;
+		  }
+	      if (matched)
+		{
+		  if (_deligature_escape_tbl[i].except_font != raw_fontnum)
+		    {
+		      dest[j++] = fontword
+			| (unsigned short)_deligature_escape_tbl[i].to[0];
+		      dest[j++] = fontword
+			| (unsigned short)_deligature_escape_tbl[i].to[1];
+
+		      continue;	/* back to top of while loop */
+		    }
+		}
+	    }
+
+	  /* if the current font is an ISO-Latin-1 font (no matter whether
+	     font is a a Hershey font, a PS or PCL/Stick font, or a
+	     device-specific font for which we have no table entry), is
+	     this an escape seq. for an 8-bit (non-ASCII) ISO8859-1 char?  */
+
+	  /* PAUL MURRELL
+	     Only concerned with Hershey fonts
+	  */
+/*
+	  if ((_plotter->drawstate->font_type == F_POSTSCRIPT
+	       && _ps_font_info[raw_fontnum].iso8859_1)
+	      || (_plotter->drawstate->font_type == F_HERSHEY
+		  && _hershey_font_info[raw_fontnum].iso8859_1)
+	      || (_plotter->drawstate->font_type == F_PCL
+		  && _pcl_font_info[raw_fontnum].iso8859_1)
+	      || (_plotter->drawstate->font_type == F_STICK
+		  && _stick_font_info[raw_fontnum].iso8859_1)
+	      || (_plotter->drawstate->font_type == F_OTHER
+		  && _plotter->drawstate->font_is_iso8859_1
+		  && raw_fontnum == 1))
+*/
+	  if (1 /* _plotter->drawstate->font_type == F_HERSHEY */
+	      && _hershey_font_info[raw_fontnum].iso8859_1)
+	    {
+	      bool matched = false;
+
+	      for (i = 0; i < NUM_ISO_ESCAPES; i++)
+		if (strcmp ((char *)esc, _iso_escape_tbl[i].string) == 0)
+		  {
+		    matched = true;
+		    break;
+		  }
+	      if (matched)	/* it's an 8-bit ISO8859-1 character */
+		{
+		  /* certain such characters are drawn in the Hershey fonts
+		     as superscripts */
+		    if (1) /* _plotter->drawstate->font_type == F_HERSHEY) */
+		    {
+		      int k;
+		      bool matched2 = false;
+
+		      /* check if this is a `raised' ISO-Latin-1 character */
+		      for (k = 0; k < NUM_RAISED_CHARS; k++)
+			if (_iso_escape_tbl[i].byte == _raised_char_tbl[k].from)
+			  {
+			    matched2 = true;
+			    break;
+			  }
+		      if (matched2)	/* it's a raised character */
+			{
+			  /* map to string of unsigned shorts, length 3 or 6:
+			     `begin superscript' control code, [`mark'
+			     control code,] replacement char, [`return'
+			     control code, underline,] `end superscript' */
+			  dest[j++] =
+			    (unsigned short) (CONTROL_CODE | C_BEGIN_SUPERSCRIPT);
+			  if (_raised_char_tbl[k].underscored) /* also underline */
+			    {
+			      dest[j++] =
+				(unsigned short) (CONTROL_CODE | C_PUSH_LOCATION);
+			      dest[j++] =
+				fontword | (unsigned short)_raised_char_tbl[k].to;
+			      dest[j++] =
+				(unsigned short) (CONTROL_CODE | C_POP_LOCATION);
+			      /* select appropriate HersheySymbol font */
+			      dest[j++] =
+				symbol_fontword | (unsigned short)VECTOR_SYMBOL_FONT_UNDERSCORE;
+			    }
+			  else	/* just print raised char, no underline */
+			    {
+			      dest[j++] =
+				fontword | (unsigned short)_raised_char_tbl[k].to;
+			    }
+
+			  dest[j++] =
+			    (unsigned short) (CONTROL_CODE | C_END_SUPERSCRIPT);
+
+			  continue; /* back to top of while loop */
+			}
+		    }
+
+		  /* won't draw this char as a superscript; just pass thru */
+		  dest[j++] = fontword | (unsigned short)(_iso_escape_tbl[i].byte);
+		  continue;	/* back to top of while loop */
+		}
+	    }
+
+	  /* is this an escape seq. for a `special' (non-ISO, non-Symbol)
+	     Hershey glyph?  Such glyphs include astronomical signs, and
+	     `final s'. */
+	  if (1) /* _plotter->drawstate->font_type == F_HERSHEY) */
+	    {
+	      bool matched = false;
+
+	      for (i = 0; i < NUM_SPECIAL_ESCAPES; i++)
+		if (strcmp ((char *)esc, _special_escape_tbl[i].string) == 0)
+		  {
+		    matched = true;
+		    break;
+		  }
+	      if (matched)	/* it's a special character */
+		{
+		  /* "\s-" is special; yields character in current font */
+		  if (_special_escape_tbl[i].byte == FINAL_LOWERCASE_S)
+		  dest[j++] =
+		    fontword | (unsigned short)(_special_escape_tbl[i].byte);
+		  else
+		  /* we select symbol font of typeface, in which we've
+		     stored all other special characters */
+		    dest[j++] = symbol_fontword | (unsigned short)(_special_escape_tbl[i].byte);
+		  continue;	/* back to top of while loop */
+		}
+	    }
+
+	  {
+	    bool matched = false;
+
+	    /* Irrespective of font type, is this an escape seq. for a char
+	       in the font's corresponding symbol font? */
+	    for (i = 0; i < NUM_SYMBOL_ESCAPES; i++)
+	      if (strcmp (_symbol_escape_tbl[i].string, "NO_ABBREV") != 0
+		  && strcmp ((char *)esc, _symbol_escape_tbl[i].string) == 0)
+		{
+		  matched = true;
+		  break;
+		}
+	    if (matched)	/* it's a character in the symbol font */
+	      {
+		/* select symbol font by OR'ing in the symbol fontword */
+		dest[j++] = symbol_fontword | (unsigned short)(_symbol_escape_tbl[i].byte);
+		continue;	/* back to top of while loop */
+	      }
+	  }
+
+	  /* Gross kludge.  In the non-Hershey fonts we handle the "\rn"
+	     control sequence in a painful way.  For a PS font we map it
+	     into (1) a left shift, (2) the `radicalex' character in the PS
+	     Symbol font, and (3) a right shift.  Shift distances are taken
+	     from the bbox of the radicalex char, and are slightly larger
+	     than 0.5 em.  For a PCL font it's similar, but the shifts are
+	     much smaller.  The reason it's different for PCL is that the
+	     PCL radicalex character is different from the PS radicalex
+	     character: the overbar is not displaced.  Possibly someone at
+	     HP made a mistake while reimplementing the Adobe Symbol font
+	     for PCL 5?
+
+	     We don't implement \rn for Stick fonts, because they have
+	     no associated symbol font. */
+
+	  /* couldn't match; unknown escape seq., so pass through unchanged */
+	  dest[j++] = fontword | (unsigned short)'\\';
+	  dest[j++] = fontword | (unsigned short)c;
+	  dest[j++] = fontword | (unsigned short)d;
+	}
+    }
+
+  dest[j] = (unsigned short)'\0';   /* terminate string */
+
+  return dest;
+}
+
+#ifdef UNUSED
+int
+#ifdef _HAVE_PROTOS
+_codestring_len (const unsigned short *codestring)
+#else
+_codestring_len (codestring)
+     const unsigned short *codestring;
+#endif
+{
+  int i = 0;
+
+  while (*codestring)
+    {
+      i++;
+      codestring++;
+    }
+
+  return i;
+}
+#endif
diff --git a/src/modules/vfonts/g_cntrlify.h b/src/main/g_cntrlify.h
similarity index 100%
rename from src/modules/vfonts/g_cntrlify.h
rename to src/main/g_cntrlify.h
diff --git a/src/modules/vfonts/g_control.h b/src/main/g_control.h
similarity index 100%
rename from src/modules/vfonts/g_control.h
rename to src/main/g_control.h
diff --git a/src/modules/vfonts/g_extern.h b/src/main/g_extern.h
similarity index 100%
rename from src/modules/vfonts/g_extern.h
rename to src/main/g_extern.h
diff --git a/src/modules/vfonts/g_fontdb.c b/src/main/g_fontdb.c
similarity index 100%
rename from src/modules/vfonts/g_fontdb.c
rename to src/main/g_fontdb.c
diff --git a/src/modules/vfonts/g_her_glyph.c b/src/main/g_her_glyph.c
similarity index 100%
rename from src/modules/vfonts/g_her_glyph.c
rename to src/main/g_her_glyph.c
diff --git a/src/modules/vfonts/g_her_metr.h b/src/main/g_her_metr.h
similarity index 100%
rename from src/modules/vfonts/g_her_metr.h
rename to src/main/g_her_metr.h
diff --git a/src/modules/vfonts/g_jis.h b/src/main/g_jis.h
similarity index 100%
rename from src/modules/vfonts/g_jis.h
rename to src/main/g_jis.h
diff --git a/src/main/gevents.c b/src/main/gevents.c
index 5317271..2a0cda2 100644
--- a/src/main/gevents.c
+++ b/src/main/gevents.c
@@ -1,7 +1,7 @@
 /*
  *  R : A Computer Language for Statistical Data Analysis
- *  Copyright (C) 2004-7  The R Foundation
- *  Copyright (C) 2013	  The R Core Team
+ *  Copyright (C) 2004-2007  The R Foundation
+ *  Copyright (C) 2013-2015  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
@@ -15,7 +15,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
 
 
  *  This is an implementation of modal event handling in R graphics
@@ -36,10 +36,12 @@ static const char * mouseHandlers[] =
 
 static const char * keybdHandler = "onKeybd";
 
+static const char * idleHandler = "onIdle";
+
 static void checkHandler(const char * name, SEXP eventEnv)
 {
     SEXP handler = findVar(install(name), eventEnv);
-    if (TYPEOF(handler) == CLOSXP) 
+    if (TYPEOF(handler) == CLOSXP)
 	warning(_("'%s' events not supported in this device"), name);
 }
 
@@ -52,7 +54,7 @@ do_setGraphicsEventEnv(SEXP call, SEXP op, SEXP args, SEXP env)
     pDevDesc dd;
 
     checkArity(op, args);
-    
+
     devnum = INTEGER(CAR(args))[0] - 1;
     if(devnum < 1 || devnum > R_MaxDevices)
 	error(_("invalid graphical device number"));
@@ -61,24 +63,26 @@ do_setGraphicsEventEnv(SEXP call, SEXP op, SEXP args, SEXP env)
     if(!gdd) errorcall(call, _("invalid device"));
     dd = gdd->dev;
     args=CDR(args);
-    
+
     eventEnv = CAR(args);
-    if (TYPEOF(eventEnv) != ENVSXP) 
-        error(_("internal error"));
-        
+    if (TYPEOF(eventEnv) != ENVSXP)
+	error(_("internal error"));
+
     if (!dd->canGenMouseDown &&
-    	!dd->canGenMouseUp &&
-    	!dd->canGenMouseMove &&
-    	!dd->canGenKeybd)
-    	error(_("this graphics device does not support event handling"));
-    
+	!dd->canGenMouseUp &&
+	!dd->canGenMouseMove &&
+	!dd->canGenKeybd &&
+	!dd->canGenIdle)
+	error(_("this graphics device does not support event handling"));
+
     if (!dd->canGenMouseDown) checkHandler(mouseHandlers[0], eventEnv);
     if (!dd->canGenMouseUp)   checkHandler(mouseHandlers[1], eventEnv);
     if (!dd->canGenMouseMove) checkHandler(mouseHandlers[2], eventEnv);
     if (!dd->canGenKeybd)     checkHandler(keybdHandler, eventEnv);
+    if (!dd->canGenIdle)      checkHandler(idleHandler, eventEnv);
 
     dd->eventEnv = eventEnv;
-	
+
     return(R_NilValue);
 }
 
@@ -87,13 +91,16 @@ do_getGraphicsEventEnv(SEXP call, SEXP op, SEXP args, SEXP env)
 {
     int devnum;
     pGEDevDesc gdd;
-    
+
     checkArity(op, args);
-    
-    devnum = INTEGER(CAR(args))[0] - 1;
+
+    devnum = INTEGER(CAR(args))[0];
+    if(devnum == NA_INTEGER)
+	error(_("invalid graphical device number"));
+    devnum--;
     if(devnum < 1 || devnum > R_MaxDevices)
 	error(_("invalid graphical device number"));
-    
+
     gdd = GEgetDevice(devnum);
     if(!gdd) errorcall(call, _("invalid device"));
     return gdd->dev->eventEnv;
@@ -110,9 +117,8 @@ Rboolean haveListeningDev()
     {
 	for(int i = 1; i < NumDevices(); i++)
 	{
-	    gd = GEgetDevice(i);
-	    dd = gd->dev;
-	    if(dd->gettingEvent){
+	    if ((gd = GEgetDevice(i)) && (dd = gd->dev)
+		 && dd->gettingEvent){
 		ret = TRUE;
 		break;
 	    }
@@ -120,7 +126,7 @@ Rboolean haveListeningDev()
     }
     return ret;
 }
-	  
+
 
 SEXP
 do_getGraphicsEvent(SEXP call, SEXP op, SEXP args, SEXP env)
@@ -129,41 +135,41 @@ do_getGraphicsEvent(SEXP call, SEXP op, SEXP args, SEXP env)
     pDevDesc dd;
     pGEDevDesc gd;
     int i, count=0, devNum;
-    
+
     checkArity(op, args);
-    
+
     prompt = CAR(args);
     if (!isString(prompt) || !length(prompt)) error(_("invalid prompt"));
-    
+
     /* NB:  cleanup of event handlers must be done by driver in onExit handler */
-    
+
     if (!NoDevices()) {
-        /* Initialize all devices */
-        i = 1;
+	/* Initialize all devices */
+	i = 1;
 	devNum = curDevice();
 	while (i++ < NumDevices()) {
-	    gd = GEgetDevice(devNum);
-	    dd = gd->dev;
-	    if (dd->gettingEvent)
-	    	error(_("recursive use of 'getGraphicsEvent' not supported"));
-	    if (dd->eventEnv != R_NilValue) {
-	        if (dd->eventHelper) dd->eventHelper(dd, 1);
-	        dd->gettingEvent = TRUE;
-	        defineVar(install("result"), R_NilValue, dd->eventEnv);
-	        count++;
+	    if ((gd = GEgetDevice(devNum)) && (dd = gd->dev)) {
+		if (dd->gettingEvent)
+		    error(_("recursive use of 'getGraphicsEvent' not supported"));
+		if (dd->eventEnv != R_NilValue) {
+		    if (dd->eventHelper) dd->eventHelper(dd, 1);
+		    dd->gettingEvent = TRUE;
+		    defineVar(install("result"), R_NilValue, dd->eventEnv);
+		    count++;
+		}
 	    }
 	    devNum = nextDevice(devNum);
 	}
 	if (!count)
 	    error(_("no graphics event handlers set"));
-	
+
 	Rprintf("%s\n", CHAR(asChar(prompt)));
 	R_FlushConsole();
-	
+
 	/* Poll them */
 	while (result == R_NilValue) {
 	    /* make sure we still have at least one device listening for events, and throw an error if not*/
-	    if(!haveListeningDev()) 
+	    if(!haveListeningDev())
 		return R_NilValue;
 #ifdef Win32
 	    R_WaitEvent();
@@ -173,31 +179,31 @@ do_getGraphicsEvent(SEXP call, SEXP op, SEXP args, SEXP env)
 	    i = 1;
 	    devNum = curDevice();
 	    while (i++ < NumDevices()) {
-		gd = GEgetDevice(devNum);
-		dd = gd->dev;
-		if (dd->eventEnv != R_NilValue) {
-		    if (dd->eventHelper) dd->eventHelper(dd, 2);
-		    result = findVar(install("result"), dd->eventEnv);
-		    if (result != R_NilValue && result != R_UnboundValue) {
-			break;
+		if ((gd = GEgetDevice(devNum)) && (dd = gd->dev)) {
+		    if (dd->eventEnv != R_NilValue) {
+			if (dd->eventHelper) dd->eventHelper(dd, 2);
+			result = findVar(install("result"), dd->eventEnv);
+			if (result != R_NilValue && result != R_UnboundValue) {
+			    break;
+			}
 		    }
 		}
 		devNum = nextDevice(devNum);
 	    }
 	}
 	/* clean up */
-        i = 1;
+	i = 1;
 	devNum = curDevice();
 	while (i++ < NumDevices()) {
-	    gd = GEgetDevice(devNum);
-	    dd = gd->dev;
-	    if (dd->eventEnv != R_NilValue) {
-	        if (dd->eventHelper) dd->eventHelper(dd, 0);
-	        dd->gettingEvent = FALSE;
+	    if ((gd = GEgetDevice(devNum)) && (dd = gd->dev)) {
+		if (dd->eventEnv != R_NilValue) {
+		    if (dd->eventHelper) dd->eventHelper(dd, 0);
+		    dd->gettingEvent = FALSE;
+		}
 	    }
 	    devNum = nextDevice(devNum);
 	}
-	
+
     }
     return(result);
 }
@@ -211,12 +217,15 @@ void doMouseEvent(pDevDesc dd, R_MouseEvent event,
 
     dd->gettingEvent = FALSE; /* avoid recursive calls */
 
-    handler = findVar(install(mouseHandlers[event]), dd->eventEnv);
-    if (TYPEOF(handler) == PROMSXP)
+    PROTECT(handler = findVar(install(mouseHandlers[event]), dd->eventEnv));
+    if (TYPEOF(handler) == PROMSXP) {
 	handler = eval(handler, dd->eventEnv);
-
+	UNPROTECT(1); /* handler */
+	PROTECT(handler);
+    }
     if (TYPEOF(handler) == CLOSXP) {
-        defineVar(install("which"), ScalarInteger(ndevNumber(dd)+1), dd->eventEnv);
+	SEXP s_which = install("which");
+	defineVar(s_which, ScalarInteger(ndevNumber(dd)+1), dd->eventEnv);
 	// Be portable: see PR#15793
 	int len = ((buttons & leftButton) != 0)
 	  + ((buttons & middleButton) != 0)
@@ -233,9 +242,10 @@ void doMouseEvent(pDevDesc dd, R_MouseEvent event,
 	PROTECT(temp = lang4(handler, bvec, sx, sy));
 	PROTECT(result = eval(temp, dd->eventEnv));
 	defineVar(install("result"), result, dd->eventEnv);
-	UNPROTECT(5);	
+	UNPROTECT(5);
 	R_FlushConsole();
     }
+    UNPROTECT(1); /* handler */
     dd->gettingEvent = TRUE;
     return;
 }
@@ -253,19 +263,63 @@ void doKeybd(pDevDesc dd, R_KeyName rkey,
 
     dd->gettingEvent = FALSE; /* avoid recursive calls */
 
-    handler = findVar(install(keybdHandler), dd->eventEnv);
-    if (TYPEOF(handler) == PROMSXP)
+    PROTECT(handler = findVar(install(keybdHandler), dd->eventEnv));
+    if (TYPEOF(handler) == PROMSXP) {
 	handler = eval(handler, dd->eventEnv);
+	UNPROTECT(1); /* handler */
+	PROTECT(handler);
+    }
 
     if (TYPEOF(handler) == CLOSXP) {
-        defineVar(install("which"), ScalarInteger(ndevNumber(dd)+1), dd->eventEnv);
+	SEXP s_which = install("which");
+	defineVar(s_which, ScalarInteger(ndevNumber(dd)+1), dd->eventEnv);
 	PROTECT(skey = mkString(keyname ? keyname : keynames[rkey]));
 	PROTECT(temp = lang2(handler, skey));
 	PROTECT(result = eval(temp, dd->eventEnv));
-        defineVar(install("result"), result, dd->eventEnv);
-	UNPROTECT(3);	
+	defineVar(install("result"), result, dd->eventEnv);
+	UNPROTECT(3);
 	R_FlushConsole();
     }
+    UNPROTECT(1); /* handler */
     dd->gettingEvent = TRUE;
     return;
 }
+
+/* Copy-modified from doKeybd -- Frederick Eaton 12 Jun 2016 */
+/* This "doIdle" (executing new "onIdle" hook) should enable users of
+   getGraphicsEvent to do background processing, e.g. reading from a
+   stream and updating a plot, in-between handling of keyboard and
+   mouse events.
+ */
+void doIdle(pDevDesc dd)
+{
+    SEXP handler, temp, result;
+
+    dd->gettingEvent = FALSE; /* avoid recursive calls */
+
+    PROTECT(handler = findVar(install(idleHandler), dd->eventEnv));
+    if (TYPEOF(handler) == PROMSXP) {
+	handler = eval(handler, dd->eventEnv);
+	UNPROTECT(1); /* handler */
+	PROTECT(handler);
+    }
+
+    if (TYPEOF(handler) == CLOSXP) {
+	SEXP s_which = install("which");
+	defineVar(s_which, ScalarInteger(ndevNumber(dd)+1), dd->eventEnv);
+	PROTECT(temp = lang1(handler));
+	PROTECT(result = eval(temp, dd->eventEnv));
+	defineVar(install("result"), result, dd->eventEnv);
+	UNPROTECT(2);
+	R_FlushConsole();
+    }
+    UNPROTECT(1); /* handler */
+    dd->gettingEvent = TRUE;
+    return;
+}
+
+Rboolean doesIdle(pDevDesc dd) {
+    SEXP handler = findVar(install(idleHandler), dd->eventEnv);
+    return (handler != R_UnboundValue) &&
+        (handler != R_NilValue);
+}
diff --git a/src/main/gram-ex.c b/src/main/gram-ex.c
index 57b2037..e562f49 100644
--- a/src/main/gram-ex.c
+++ b/src/main/gram-ex.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-2013  The R Core Team
+ *  Copyright (C) 1997-2014  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
@@ -15,7 +15,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  */
 
 /*--------------------------------------------------------------------------*/
diff --git a/src/main/gram.c b/src/main/gram.c
index 44e1dd6..a33282e 100644
--- a/src/main/gram.c
+++ b/src/main/gram.c
@@ -67,7 +67,7 @@
 /*
  *  R : A Computer Langage for Statistical Data Analysis
  *  Copyright (C) 1995, 1996, 1997  Robert Gentleman and Ross Ihaka
- *  Copyright (C) 1997--2014  The R Core Team
+ *  Copyright (C) 1997--2015  The R Core Team
  *  Copyright (C) 2009--2011  Romain Francois
  *
  *  This program is free software; you can redistribute it and/or modify
@@ -82,7 +82,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  */
 
 #ifdef HAVE_CONFIG_H
@@ -186,7 +186,7 @@ static void setId( SEXP expr, yyltype loc){
 # define YYLTYPE yyltype
 # 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;	\
 	    (Current).first_byte   = YYRHSLOC (Rhs, 1).first_byte;	\
@@ -213,7 +213,7 @@ static void setId( SEXP expr, yyltype loc){
 	  (Current).last_byte = (Current).first_byte - 1;		\
 	  (Current).id = NA_INTEGER;                                    \
 	} 								\
-    } while (YYID (0))
+    } while (0)
 
 		
 # define YY_LOCATION_PRINT(Loc)					\
@@ -2106,22 +2106,22 @@ yyreduce:
     {
         case 2:
 
-    { return 0; }
+    { YYACCEPT; }
     break;
 
   case 3:
 
-    { return xxvalue(NULL,2,NULL); }
+    { yyresult = xxvalue(NULL,2,NULL);	goto yyreturn; }
     break;
 
   case 4:
 
-    { return xxvalue((yyvsp[(1) - (2)]),3,&(yylsp[(1) - (2)])); }
+    { yyresult = xxvalue((yyvsp[(1) - (2)]),3,&(yylsp[(1) - (2)]));	goto yyreturn; }
     break;
 
   case 5:
 
-    { return xxvalue((yyvsp[(1) - (2)]),4,&(yylsp[(1) - (2)])); }
+    { yyresult = xxvalue((yyvsp[(1) - (2)]),4,&(yylsp[(1) - (2)]));	goto yyreturn; }
     break;
 
   case 6:
@@ -3246,7 +3246,7 @@ static SEXP xxfuncall(SEXP expr, SEXP args)
     SEXP ans, sav_expr = expr;
     if(GenerateCode) {
 	if (isString(expr))
-	    expr = install(CHAR(STRING_ELT(expr, 0)));
+	    expr = installTrChar(STRING_ELT(expr, 0));
 	PROTECT(expr);
 	if (length(CDR(args)) == 1 && CADR(args) == R_MissingArg && TAG(CDR(args)) == R_NilValue )
 	    ans = lang1(expr);
@@ -3731,8 +3731,10 @@ SEXP R_Parse1Buffer(IoBuffer *buffer, int gencode, ParseStatus *status)
    	    	buf[i] = (char) R_IoBufferGetc(buffer);
 
    	    buf[buflen] = 0;
-    	    defineVar(install("filename"), ScalarString(mkChar("")), ParseState.Original);
-    	    defineVar(install("lines"), ScalarString(mkChar(buf)), ParseState.Original);
+	    SEXP s_filename = install("filename");
+	    defineVar(s_filename, ScalarString(mkChar("")), ParseState.Original);
+	    SEXP s_lines = install("lines");
+	    defineVar(s_lines, ScalarString(mkChar(buf)), ParseState.Original);
     	    PROTECT(class = allocVector(STRSXP, 2));
             SET_STRING_ELT(class, 0, mkChar("srcfilecopy"));
             SET_STRING_ELT(class, 1, mkChar("srcfile"));
@@ -4225,16 +4227,6 @@ static void yyerror(const char *s)
     static char const yyunexpected[] = "syntax error, unexpected ";
     static char const yyexpecting[] = ", expecting ";
     char *expecting;
- #if 0
- /* these are just here to trigger the internationalization */
-    _("input");
-    _("end of input");
-    _("string constant");
-    _("numeric constant");
-    _("symbol");
-    _("assignment");
-    _("end of line");
-#endif
 
     R_ParseError     = yylloc.first_line;
     R_ParseErrorCol  = yylloc.first_column;
@@ -4247,9 +4239,37 @@ static void yyerror(const char *s)
 	if (expecting) *expecting = '\0';
 	for (i = 0; yytname_translations[i]; i += 2) {
 	    if (!strcmp(s + sizeof yyunexpected - 1, yytname_translations[i])) {
-		sprintf(R_ParseErrorMsg, _("unexpected %s"),
-		    i/2 < YYENGLISH ? _(yytname_translations[i+1])
-				    : yytname_translations[i+1]);
+                switch(i/2)
+                {
+                case 0:
+                        snprintf(R_ParseErrorMsg, PARSE_ERROR_SIZE, _("unexpected input"));
+                                break;
+                case 1:
+                        snprintf(R_ParseErrorMsg, PARSE_ERROR_SIZE, _("unexpected end of input"));
+                                break;
+                case 2:
+                        snprintf(R_ParseErrorMsg, PARSE_ERROR_SIZE, _("unexpected input"));
+                                break;
+                case 3:
+                        snprintf(R_ParseErrorMsg, PARSE_ERROR_SIZE, _("unexpected string constant"));
+                                break;
+                case 4:
+                        snprintf(R_ParseErrorMsg, PARSE_ERROR_SIZE, _("unexpected numeric constant"));
+                                break;
+                case 5:
+                        snprintf(R_ParseErrorMsg, PARSE_ERROR_SIZE, _("unexpected symbol"));
+                                break;
+                case 6:
+                        snprintf(R_ParseErrorMsg, PARSE_ERROR_SIZE, _("unexpected assignment"));
+                                break;
+                case 7:
+                        snprintf(R_ParseErrorMsg, PARSE_ERROR_SIZE, _("unexpected end of line"));
+                                break;
+                default:
+                  snprintf(R_ParseErrorMsg, PARSE_ERROR_SIZE, _("unexpected %s"),
+                           yytname_translations[i+1]);
+                                break;
+                }
                 
 		return;
 	    }
@@ -4661,6 +4681,8 @@ static int StringValue(int c, Rboolean forSymbol)
 		    xxungetc(c);
 		    CTEXT_POP();
 		}
+		if (!octal)
+		    error(_("nul character not allowed (line %d)"), ParseState.xxlineno);
 		c = octal;
 		oct_or_hex = TRUE;
 	    }
@@ -4682,6 +4704,8 @@ static int StringValue(int c, Rboolean forSymbol)
 		    }
 		    val = 16*val + ext;
 		}
+		if (!val)
+		    error(_("nul character not allowed (line %d)"), ParseState.xxlineno);
 		c = val;
 		oct_or_hex = TRUE;
 	    }
@@ -4717,6 +4741,8 @@ static int StringValue(int c, Rboolean forSymbol)
 			      ParseState.xxlineno);
 		    else CTEXT_PUSH(c);
 		}
+		if (!val)
+		    error(_("nul character not allowed (line %d)"), ParseState.xxlineno);
 		WTEXT_PUSH(val); /* this assumes wchar_t is Unicode */
 		use_wcs = TRUE;
 		continue;
@@ -4751,6 +4777,8 @@ static int StringValue(int c, Rboolean forSymbol)
 			error(_("invalid \\U{xxxxxxxx} sequence (line %d)"), ParseState.xxlineno);
 		    else CTEXT_PUSH(c);
 		}
+		if (!val)
+		    error(_("nul character not allowed (line %d)"), ParseState.xxlineno);		
 		WTEXT_PUSH(val);
 		use_wcs = TRUE;
 		continue;
@@ -4841,6 +4869,11 @@ static int StringValue(int c, Rboolean forSymbol)
     }
     if (!currtext_truncated)
     	strcpy(yytext, currtext);
+    else if (forSymbol || !use_wcs) {
+        size_t total = strlen(stext);
+        snprintf(yytext, MAXELTSIZE, "[%u chars quoted with '%c']", (unsigned int)total, quote);
+    } else 
+        snprintf(yytext, MAXELTSIZE, "[%d wide chars quoted with '%c']", wcnt, quote);
     if(forSymbol) {
 	PROTECT(yylval = install(stext));
 	if(stext != st0) free(stext);
diff --git a/src/main/gram.y b/src/main/gram.y
index 394ec85..79b78a8 100644
--- a/src/main/gram.y
+++ b/src/main/gram.y
@@ -2,7 +2,7 @@
 /*
  *  R : A Computer Langage for Statistical Data Analysis
  *  Copyright (C) 1995, 1996, 1997  Robert Gentleman and Ross Ihaka
- *  Copyright (C) 1997--2014  The R Core Team
+ *  Copyright (C) 1997--2015  The R Core Team
  *  Copyright (C) 2009--2011  Romain Francois
  *
  *  This program is free software; you can redistribute it and/or modify
@@ -17,7 +17,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  */
 
 #ifdef HAVE_CONFIG_H
@@ -121,7 +121,7 @@ static void setId( SEXP expr, yyltype loc){
 # define YYLTYPE yyltype
 # 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;	\
 	    (Current).first_byte   = YYRHSLOC (Rhs, 1).first_byte;	\
@@ -148,7 +148,7 @@ static void setId( SEXP expr, yyltype loc){
 	  (Current).last_byte = (Current).first_byte - 1;		\
 	  (Current).id = NA_INTEGER;                                    \
 	} 								\
-    } while (YYID (0))
+    } while (0)
 
 		
 # define YY_LOCATION_PRINT(Loc)					\
@@ -331,10 +331,10 @@ static int	xxvalue(SEXP, int, YYLTYPE *);
 
 %%
 
-prog	:	END_OF_INPUT			{ return 0; }
-	|	'\n'				{ return xxvalue(NULL,2,NULL); }
-	|	expr_or_assign '\n'			{ return xxvalue($1,3,&@1); }
-	|	expr_or_assign ';'			{ return xxvalue($1,4,&@1); }
+prog	:	END_OF_INPUT			{ YYACCEPT; }
+	|	'\n'				{ yyresult = xxvalue(NULL,2,NULL);	goto yyreturn; }
+	|	expr_or_assign '\n'			{ yyresult = xxvalue($1,3,&@1);	goto yyreturn; }
+	|	expr_or_assign ';'			{ yyresult = xxvalue($1,4,&@1);	goto yyreturn; }
 	|	error	 			{ YYABORT; }
 	;
 
@@ -908,7 +908,7 @@ static SEXP xxfuncall(SEXP expr, SEXP args)
     SEXP ans, sav_expr = expr;
     if(GenerateCode) {
 	if (isString(expr))
-	    expr = install(CHAR(STRING_ELT(expr, 0)));
+	    expr = installTrChar(STRING_ELT(expr, 0));
 	PROTECT(expr);
 	if (length(CDR(args)) == 1 && CADR(args) == R_MissingArg && TAG(CDR(args)) == R_NilValue )
 	    ans = lang1(expr);
@@ -1393,8 +1393,10 @@ SEXP R_Parse1Buffer(IoBuffer *buffer, int gencode, ParseStatus *status)
    	    	buf[i] = (char) R_IoBufferGetc(buffer);
 
    	    buf[buflen] = 0;
-    	    defineVar(install("filename"), ScalarString(mkChar("")), ParseState.Original);
-    	    defineVar(install("lines"), ScalarString(mkChar(buf)), ParseState.Original);
+	    SEXP s_filename = install("filename");
+	    defineVar(s_filename, ScalarString(mkChar("")), ParseState.Original);
+	    SEXP s_lines = install("lines");
+	    defineVar(s_lines, ScalarString(mkChar(buf)), ParseState.Original);
     	    PROTECT(class = allocVector(STRSXP, 2));
             SET_STRING_ELT(class, 0, mkChar("srcfilecopy"));
             SET_STRING_ELT(class, 1, mkChar("srcfile"));
@@ -1887,16 +1889,6 @@ static void yyerror(const char *s)
     static char const yyunexpected[] = "syntax error, unexpected ";
     static char const yyexpecting[] = ", expecting ";
     char *expecting;
- #if 0
- /* these are just here to trigger the internationalization */
-    _("input");
-    _("end of input");
-    _("string constant");
-    _("numeric constant");
-    _("symbol");
-    _("assignment");
-    _("end of line");
-#endif
 
     R_ParseError     = yylloc.first_line;
     R_ParseErrorCol  = yylloc.first_column;
@@ -1909,9 +1901,37 @@ static void yyerror(const char *s)
 	if (expecting) *expecting = '\0';
 	for (i = 0; yytname_translations[i]; i += 2) {
 	    if (!strcmp(s + sizeof yyunexpected - 1, yytname_translations[i])) {
-		sprintf(R_ParseErrorMsg, _("unexpected %s"),
-		    i/2 < YYENGLISH ? _(yytname_translations[i+1])
-				    : yytname_translations[i+1]);
+                switch(i/2)
+                {
+                case 0:
+                        snprintf(R_ParseErrorMsg, PARSE_ERROR_SIZE, _("unexpected input"));
+                                break;
+                case 1:
+                        snprintf(R_ParseErrorMsg, PARSE_ERROR_SIZE, _("unexpected end of input"));
+                                break;
+                case 2:
+                        snprintf(R_ParseErrorMsg, PARSE_ERROR_SIZE, _("unexpected input"));
+                                break;
+                case 3:
+                        snprintf(R_ParseErrorMsg, PARSE_ERROR_SIZE, _("unexpected string constant"));
+                                break;
+                case 4:
+                        snprintf(R_ParseErrorMsg, PARSE_ERROR_SIZE, _("unexpected numeric constant"));
+                                break;
+                case 5:
+                        snprintf(R_ParseErrorMsg, PARSE_ERROR_SIZE, _("unexpected symbol"));
+                                break;
+                case 6:
+                        snprintf(R_ParseErrorMsg, PARSE_ERROR_SIZE, _("unexpected assignment"));
+                                break;
+                case 7:
+                        snprintf(R_ParseErrorMsg, PARSE_ERROR_SIZE, _("unexpected end of line"));
+                                break;
+                default:
+                  snprintf(R_ParseErrorMsg, PARSE_ERROR_SIZE, _("unexpected %s"),
+                           yytname_translations[i+1]);
+                                break;
+                }
                 
 		return;
 	    }
@@ -2323,6 +2343,8 @@ static int StringValue(int c, Rboolean forSymbol)
 		    xxungetc(c);
 		    CTEXT_POP();
 		}
+		if (!octal)
+		    error(_("nul character not allowed (line %d)"), ParseState.xxlineno);
 		c = octal;
 		oct_or_hex = TRUE;
 	    }
@@ -2344,6 +2366,8 @@ static int StringValue(int c, Rboolean forSymbol)
 		    }
 		    val = 16*val + ext;
 		}
+		if (!val)
+		    error(_("nul character not allowed (line %d)"), ParseState.xxlineno);
 		c = val;
 		oct_or_hex = TRUE;
 	    }
@@ -2379,6 +2403,8 @@ static int StringValue(int c, Rboolean forSymbol)
 			      ParseState.xxlineno);
 		    else CTEXT_PUSH(c);
 		}
+		if (!val)
+		    error(_("nul character not allowed (line %d)"), ParseState.xxlineno);
 		WTEXT_PUSH(val); /* this assumes wchar_t is Unicode */
 		use_wcs = TRUE;
 		continue;
@@ -2413,6 +2439,8 @@ static int StringValue(int c, Rboolean forSymbol)
 			error(_("invalid \\U{xxxxxxxx} sequence (line %d)"), ParseState.xxlineno);
 		    else CTEXT_PUSH(c);
 		}
+		if (!val)
+		    error(_("nul character not allowed (line %d)"), ParseState.xxlineno);		
 		WTEXT_PUSH(val);
 		use_wcs = TRUE;
 		continue;
@@ -2503,6 +2531,11 @@ static int StringValue(int c, Rboolean forSymbol)
     }
     if (!currtext_truncated)
     	strcpy(yytext, currtext);
+    else if (forSymbol || !use_wcs) {
+        size_t total = strlen(stext);
+        snprintf(yytext, MAXELTSIZE, "[%u chars quoted with '%c']", (unsigned int)total, quote);
+    } else 
+        snprintf(yytext, MAXELTSIZE, "[%d wide chars quoted with '%c']", wcnt, quote);
     if(forSymbol) {
 	PROTECT(yylval = install(stext));
 	if(stext != st0) free(stext);
diff --git a/src/main/graphics.c b/src/main/graphics.c
index 65c7656..04100fa 100644
--- a/src/main/graphics.c
+++ b/src/main/graphics.c
@@ -16,7 +16,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
 
 
  *  This is an extensive reworking by Paul Murrell of an original
diff --git a/src/main/grep.c b/src/main/grep.c
index 6e6ec3e..af4b574 100644
--- a/src/main/grep.c
+++ b/src/main/grep.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--2014  The R Core Team
+ *  Copyright (C) 1997--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 Pulic License as published by
@@ -15,7 +15,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  */
 
 /*
@@ -78,6 +78,45 @@ strsplit grep [g]sub [g]regexpr
 # include <pcre.h>
 #endif
 
+/* Compatibility with PCRE < 8.20 */
+#ifndef PCRE_STUDY_JIT_COMPILE
+# define PCRE_STUDY_JIT_COMPILE 0
+#else
+/* 
+   Default maximum stack size: note this is reserved but not allocated
+   until needed.  The help says 1M suffices, but we found more was
+   needed for strings around a million bytes.
+*/
+#define JIT_STACK_MAX 64*1024*1024
+/* 
+   This will stay reserved until the end of the sesiion, but at 64MB
+   that is not an issue -- and most sessions will not use PCRE with
+   more than 10 strings.
+ */
+static pcre_jit_stack *jit_stack = NULL; // allocated at first use.
+
+static void setup_jit(pcre_extra *re_pe)
+{
+    if (!jit_stack) {
+	int stmax = JIT_STACK_MAX;
+	char *p = getenv("R_PCRE_JIT_STACK_MAXSIZE");
+	if (p) {
+	    char *endp;
+	    double xdouble = R_strtod(p, &endp);
+	    if (xdouble >= 0 && xdouble <= 1000) 
+		stmax = (int)(xdouble*1024*1024);
+	    else warning ("R_PCRE_JIT_STACK_MAXSIZE invalid and ignored");
+	}
+	jit_stack = pcre_jit_stack_alloc(32*1024, stmax);
+    }
+    if (jit_stack)
+	pcre_assign_jit_stack(re_pe, NULL, jit_stack);
+}
+
+#endif // PCRE >= 8.20
+
+
+
 #ifndef MAX
 # define MAX(a, b) ((a) > (b) ? (a) : (b))
 #endif
@@ -88,7 +127,7 @@ strsplit grep [g]sub [g]regexpr
 
 /* we allow pat == NULL if the regex cannot be safely expressed
    as a string (e.g., when using grepRaw) */
-static void reg_report(int rc,  regex_t *reg, const char *pat)
+static void NORET reg_report(int rc,  regex_t *reg, const char *pat)
 {
     char errbuf[1001];
     tre_regerror(rc, reg, errbuf, 1001);
@@ -126,6 +165,97 @@ static SEXP mkCharW(const wchar_t *wc)
 }
 
 
+static void pcre_exec_error(int rc, R_xlen_t i)
+{
+    if (rc > -2) return;
+    // too mucn effort to handle long-vector indices, including on Windows
+    switch (rc) {
+#ifdef PCRE_ERROR_JIT_STACKLIMIT
+    case PCRE_ERROR_JIT_STACKLIMIT:
+	warning("JIT stack limit reached in PCRE for element %d",
+		(int) i + 1);
+	break;
+#endif
+    case PCRE_ERROR_MATCHLIMIT:
+	warning("back-tracking limit reached in PCRE for element %d",
+		(int) i + 1);
+	break;
+    case PCRE_ERROR_RECURSIONLIMIT:
+	warning("recursion limit reached in PCRE for element %d\n  consider increasing the C stack size for the R process",
+		(int) i + 1);
+	break;
+    case PCRE_ERROR_INTERNAL:
+    case PCRE_ERROR_UNKNOWN_OPCODE:
+	warning("unexpected internal error in PCRE for element %d",
+		(int) i + 1);
+	break;
+#ifdef PCRE_ERROR_RECURSELOOP
+   case PCRE_ERROR_RECURSELOOP:
+	warning("PCRE detected a recursive loop in the pattern for element %d",
+		(int) i + 1);
+	break;
+#endif
+    }
+}
+
+static long R_pcre_max_recursions()
+{
+    uintptr_t ans, stack_used, current_frame;
+    /* Approximate size of stack frame in PCRE match(), actually
+       platform / compiler dependent.  Estimate found at
+       https://bugs.r-project.org/bugzilla3/show_bug.cgi?id=16757
+       However, it seems that on Solaris compiled with cc, the size is
+       much larger (not too surprising as that happens with R's
+       parser). OTOH, OpenCSW's builds of PCRE are built to use the
+       heap for recursion.
+    */
+    const uintptr_t recursion_size = 600;
+
+    const uintptr_t fallback_used = 10000;
+    /* This is about 6MB stack, reasonable since stacks are usually >= 8MB
+       OTOH, the out-of-box limit is 10000000.
+    */
+    const long fallback_limit = 10000;
+    /* Was PCRE compiled to use stack or heap for recursion? 1=stack */
+    int use_recursion;
+    pcre_config(PCRE_CONFIG_STACKRECURSE, &use_recursion);
+    if (!use_recursion) return -1L;
+    if (R_CStackLimit == -1) return fallback_limit;
+    current_frame = (uintptr_t) &ans;
+    /* Approximate number of bytes used in the stack, or fallback */
+    if (R_CStackDir == 1) {
+	stack_used =  (R_CStackStart >= current_frame) ?
+	    R_CStackStart - current_frame : fallback_used;
+    } else {
+	stack_used = (current_frame >= R_CStackStart) ?
+	    current_frame - R_CStackStart : fallback_used;
+    }
+    if (stack_used >= R_CStackLimit) return 0L;
+    ans = (R_CStackLimit - stack_used) / recursion_size;
+    return (long) ((ans <= LONG_MAX) ? ans : -1L);
+}
+
+static void 
+set_pcre_recursion_limit(pcre_extra **re_pe_ptr, const long limit)
+{
+    if (limit >= 0) {
+	pcre_extra *re_pe = *re_pe_ptr;
+	if (!re_pe) {
+	    // this will be freed by pcre_free_study so cannot use Calloc
+	    re_pe = (pcre_extra *) calloc(1, sizeof(pcre_extra));
+	    if (!re_pe) {
+		warning("allocation failure in set_pcre_recursion_limit");
+		return;
+	    }
+	    re_pe->flags = PCRE_EXTRA_MATCH_LIMIT_RECURSION;
+	    *re_pe_ptr = re_pe;
+	} else
+	    re_pe->flags |= PCRE_EXTRA_MATCH_LIMIT_RECURSION;
+	re_pe->match_limit_recursion = (unsigned long) limit;
+    }
+}
+
+
 /* strsplit is going to split the strings in the first argument into
  * tokens depending on the second argument. The characters of the second
  * argument are used to split the first argument.  A list of vectors is
@@ -267,7 +397,7 @@ SEXP attribute_hidden do_strsplit(SEXP call, SEXP op, SEXP args, SEXP env)
 			}
 		    }
 		} else {
-		    /* useBytes or ASCII or 
+		    /* useBytes or ASCII or
 		       single-byte locale and not marked as UTF-8 */
 		    char bf[2];
 		    ntok = strlen(buf);
@@ -293,7 +423,7 @@ SEXP attribute_hidden do_strsplit(SEXP call, SEXP op, SEXP args, SEXP env)
 	    } else {
 		split = translateChar(STRING_ELT(tok, itok));
 		if (mbcslocale && !mbcsValid(split))
-		    error(_("'split' string %d is invalid in this locale"), 
+		    error(_("'split' string %d is invalid in this locale"),
 			  itok+1);
 	    }
 	    int slen = (int) strlen(split);
@@ -369,15 +499,15 @@ SEXP attribute_hidden do_strsplit(SEXP call, SEXP op, SEXP args, SEXP env)
 		}
 		if (*bufp) {
 		    if (use_UTF8)
-		        SET_STRING_ELT(t, ntok, mkCharCE(bufp, CE_UTF8));
+			SET_STRING_ELT(t, ntok, mkCharCE(bufp, CE_UTF8));
 		    else
-		    	SET_STRING_ELT(t, ntok, markKnown(bufp, STRING_ELT(x, i)));
+			SET_STRING_ELT(t, ntok, markKnown(bufp, STRING_ELT(x, i)));
 		}
 		vmaxset(vmax2);
 	    }
 	} else if (perl_opt) {
 	    pcre *re_pcre;
-	    pcre_extra *re_pe;
+	    pcre_extra *re_pe = NULL;
 	    int erroffset, ovector[30];
 	    const char *errorptr;
 	    int options = 0;
@@ -395,6 +525,7 @@ SEXP attribute_hidden do_strsplit(SEXP call, SEXP op, SEXP args, SEXP env)
 		    error(_("'split' string %d is invalid in this locale"), itok+1);
 	    }
 
+	    // PCRE docs say this is not needed, but it is on Windows
 	    if (!tables) tables = pcre_maketables();
 	    re_pcre = pcre_compile(split, options,
 				   &errorptr, &erroffset, tables);
@@ -404,9 +535,26 @@ SEXP attribute_hidden do_strsplit(SEXP call, SEXP op, SEXP args, SEXP env)
 			    errorptr, split+erroffset);
 		error(_("invalid split pattern '%s'"), split);
 	    }
-	    re_pe = pcre_study(re_pcre, 0, &errorptr);
+	    re_pe = pcre_study(re_pcre,
+			       R_PCRE_use_JIT ?  PCRE_STUDY_JIT_COMPILE : 0, 
+			       &errorptr);
 	    if (errorptr)
 		warning(_("PCRE pattern study error\n\t'%s'\n"), errorptr);
+#if PCRE_STUDY_JIT_COMPILE
+	    else if(R_PCRE_use_JIT) setup_jit(re_pe);
+#endif
+	    if(R_PCRE_limit_recursion == NA_LOGICAL) {
+		// use recursion limit only on long strings
+		Rboolean use = FALSE;
+		for (i = 0 ; i < len ; i++)
+		    if(strlen(CHAR(STRING_ELT(x, i))) >= 1000) {
+			use = TRUE;
+			break;
+		    }
+		if (use)
+		    set_pcre_recursion_limit(&re_pe, R_pcre_max_recursions());
+	    } else if (R_PCRE_limit_recursion)
+		set_pcre_recursion_limit(&re_pe, R_pcre_max_recursions());
 
 	    vmax2 = vmaxget();
 	    for (i = itok; i < len; i += tlen) {
@@ -439,14 +587,17 @@ SEXP attribute_hidden do_strsplit(SEXP call, SEXP op, SEXP args, SEXP env)
 		ntok = 0;
 		bufp = buf;
 		if (*bufp) {
-		    while(pcre_exec(re_pcre, re_pe, bufp, (int) strlen(bufp),
-				    0, 0, ovector, 30) >= 0) {
+		    int rc;
+		    while((rc = pcre_exec(re_pcre, re_pe, bufp, 
+					  (int) strlen(bufp),
+					  0, 0, ovector, 30)) >= 0) {
 			/* Empty matches get the next char, so move by one. */
 			bufp += MAX(ovector[1], 1);
 			ntok++;
 			if (*bufp == '\0')
 			    break;
 		    }
+		    pcre_exec_error(rc, i);
 		}
 		SET_VECTOR_ELT(ans, i,
 			       t = allocVector(STRSXP, ntok + (*bufp ? 1 : 0)));
@@ -454,8 +605,10 @@ SEXP attribute_hidden do_strsplit(SEXP call, SEXP op, SEXP args, SEXP env)
 		bufp = buf;
 		pt = Realloc(pt, strlen(buf)+1, char);
 		for (j = 0; j < ntok; j++) {
-		    pcre_exec(re_pcre, re_pe, bufp, (int) strlen(bufp), 0, 0,
-			      ovector, 30);
+		    int rc = pcre_exec(re_pcre, re_pe, bufp, 
+				       (int) strlen(bufp), 0, 0,
+				       ovector, 30);
+		    pcre_exec_error(rc, i);
 		    if (ovector[1] > 0) {
 			/* Match was non-empty. */
 			if (ovector[0] > 0)
@@ -475,13 +628,17 @@ SEXP attribute_hidden do_strsplit(SEXP call, SEXP op, SEXP args, SEXP env)
 		}
 		if (*bufp) {
 		    if (use_UTF8)
-		        SET_STRING_ELT(t, ntok, mkCharCE(bufp, CE_UTF8));
+			SET_STRING_ELT(t, ntok, mkCharCE(bufp, CE_UTF8));
 		    else
-		    	SET_STRING_ELT(t, ntok, markKnown(bufp, STRING_ELT(x, i)));
+			SET_STRING_ELT(t, ntok, markKnown(bufp, STRING_ELT(x, i)));
 		}
 		vmaxset(vmax2);
 	    }
-	    pcre_free(re_pe);
+#if PCRE_STUDY_JIT_COMPILE
+	    if(re_pe) pcre_free_study(re_pe);
+#else
+	    if(re_pe) pcre_free(re_pe);
+#endif
 	    pcre_free(re_pcre);
 	} else if (!useBytes && use_UTF8) { /* ERE in wchar_t */
 	    regex_t reg;
@@ -540,7 +697,7 @@ SEXP attribute_hidden do_strsplit(SEXP call, SEXP op, SEXP args, SEXP env)
 			wpt[1] = 0;
 			wbufp++;
 		    }
-		    SET_STRING_ELT(t, j, 
+		    SET_STRING_ELT(t, j,
 				   mkCharWLen(wpt, regmatch[0].rm_so));
 		}
 		if (*wbufp)
@@ -596,12 +753,16 @@ SEXP attribute_hidden do_strsplit(SEXP call, SEXP op, SEXP args, SEXP env)
 		ntok = 0;
 		bufp = buf;
 		if (*bufp) {
-		    while(tre_regexec(&reg, bufp, 1, regmatch, 0) == 0) {
+		    while((rc = tre_regexec(&reg, bufp, 1, regmatch, 0)) == 0) {
 			/* Empty matches get the next char, so move by one. */
 			bufp += MAX(regmatch[0].rm_eo, 1);
 			ntok++;
 			if (*bufp == '\0') break;
 		    }
+		    // AFAICS the only possible error report is REG_ESPACE
+		    if (rc == REG_ESPACE)
+			warning("Out-of-memory error in regexp matching for element %d",
+				(int) i + 1);
 		}
 		SET_VECTOR_ELT(ans, i,
 			       t = allocVector(STRSXP, ntok + (*bufp ? 1 : 0)));
@@ -609,7 +770,11 @@ SEXP attribute_hidden do_strsplit(SEXP call, SEXP op, SEXP args, SEXP env)
 		bufp = buf;
 		pt = Realloc(pt, strlen(buf)+1, char);
 		for (j = 0; j < ntok; j++) {
-		    tre_regexec(&reg, bufp, 1, regmatch, 0);
+		    int rc = tre_regexec(&reg, bufp, 1, regmatch, 0);
+		    // AFAICS the only possible error report is REG_ESPACE
+		    if (rc == REG_ESPACE)
+			warning("Out-of-memory error in regexp matching for element %d",
+				(int) i + 1);
 		    if (regmatch[0].rm_eo > 0) {
 			/* Match was non-empty. */
 			if (regmatch[0].rm_so > 0)
@@ -664,27 +829,27 @@ static int fgrep_one(const char *pat, const char *target,
 	    }
 	return -1;
     }
-    if (!useBytes && mbcslocale) { /* skip along by chars */
-	mbstate_t mb_st;
-	int ib, used;
-	mbs_init(&mb_st);
+    if (!useBytes && use_UTF8) {
+        int ib, used;
 	for (ib = 0, i = 0; ib <= len-plen; i++) {
 	    if (strncmp(pat, target+ib, plen) == 0) {
 		if (next != NULL) *next = ib + plen;
 		return i;
 	    }
-	    used = (int) Mbrtowc(NULL,  target+ib, MB_CUR_MAX, &mb_st);
+	    used = utf8clen(target[ib]);
 	    if (used <= 0) break;
 	    ib += used;
 	}
-    } else if (!useBytes && use_UTF8) {
+    } else if (!useBytes && mbcslocale) { /* skip along by chars */
+	mbstate_t mb_st;
 	int ib, used;
+	mbs_init(&mb_st);
 	for (ib = 0, i = 0; ib <= len-plen; i++) {
 	    if (strncmp(pat, target+ib, plen) == 0) {
 		if (next != NULL) *next = ib + plen;
 		return i;
 	    }
-	    used = utf8clen(target[ib]);
+	    used = (int) Mbrtowc(NULL,  target+ib, MB_CUR_MAX, &mb_st);
 	    if (used <= 0) break;
 	    ib += used;
 	}
@@ -714,21 +879,21 @@ static int fgrep_one_bytes(const char *pat, const char *target, int len,
 	    if (*p == pat[0]) return i;
 	return -1;
     }
-    if (!useBytes && mbcslocale) { /* skip along by chars */
-	mbstate_t mb_st;
+    if (!useBytes && use_UTF8) { /* not really needed */
 	int ib, used;
-	mbs_init(&mb_st);
 	for (ib = 0, i = 0; ib <= len-plen; i++) {
 	    if (strncmp(pat, target+ib, plen) == 0) return ib;
-	    used = (int) Mbrtowc(NULL, target+ib, MB_CUR_MAX, &mb_st);
+	    used = utf8clen(target[ib]);
 	    if (used <= 0) break;
 	    ib += used;
 	}
-    } else if (!useBytes && use_UTF8) { /* not really needed */
+    } else if (!useBytes && mbcslocale) { /* skip along by chars */
+	mbstate_t mb_st;
 	int ib, used;
+	mbs_init(&mb_st);
 	for (ib = 0, i = 0; ib <= len-plen; i++) {
 	    if (strncmp(pat, target+ib, plen) == 0) return ib;
-	    used = utf8clen(target[ib]);
+	    used = (int) Mbrtowc(NULL, target+ib, MB_CUR_MAX, &mb_st);
 	    if (used <= 0) break;
 	    ib += used;
 	}
@@ -749,7 +914,7 @@ SEXP attribute_hidden do_grep(SEXP call, SEXP op, SEXP args, SEXP env)
     pcre *re_pcre = NULL /* -Wall */;
     pcre_extra *re_pe = NULL;
     const unsigned char *tables = NULL /* -Wall */;
-    Rboolean use_UTF8 = FALSE, use_WC =  FALSE;
+    Rboolean use_UTF8 = FALSE, use_WC = FALSE;
     const void *vmax;
     int nwarn = 0;
 
@@ -775,9 +940,9 @@ SEXP attribute_hidden do_grep(SEXP call, SEXP op, SEXP args, SEXP env)
 	perl_opt = 0;
     }
 
-    if (!isString(pat) || length(pat) < 1)
+    if (!isString(pat) || LENGTH(pat) < 1)
 	error(_("invalid '%s' argument"), "pattern");
-    if (length(pat) > 1)
+    if (LENGTH(pat) > 1)
 	warning(_("argument '%s' has length > 1 and only the first element will be used"), "pattern");
 
     if (!isString(text))
@@ -786,16 +951,16 @@ SEXP attribute_hidden do_grep(SEXP call, SEXP op, SEXP args, SEXP env)
     n = XLENGTH(text);
     if (STRING_ELT(pat, 0) == NA_STRING) {
 	if (value_opt) {
-	    SEXP nmold = getAttrib(text, R_NamesSymbol);
+	    SEXP nmold = PROTECT(getAttrib(text, R_NamesSymbol));
 	    PROTECT(ans = allocVector(STRSXP, n));
 	    for (i = 0; i < n; i++)  SET_STRING_ELT(ans, i, NA_STRING);
 	    if (!isNull(nmold))
 		setAttrib(ans, R_NamesSymbol, duplicate(nmold));
+	    UNPROTECT(2); /* ans, nmold */
 	} else {
-	    PROTECT(ans = allocVector(INTSXP, n));
+	    ans = allocVector(INTSXP, n);
 	    for (i = 0; i < n; i++)  INTEGER(ans)[i] = NA_INTEGER;
 	}
-	UNPROTECT(1);
 	return ans;
     }
 
@@ -803,7 +968,7 @@ SEXP attribute_hidden do_grep(SEXP call, SEXP op, SEXP args, SEXP env)
 	Rboolean onlyASCII = IS_ASCII(STRING_ELT(pat, 0));
 	if (onlyASCII)
 	    for (i = 0; i < n; i++) {
-	        if(STRING_ELT(text, i) == NA_STRING) continue;
+		if(STRING_ELT(text, i) == NA_STRING) continue;
 		if (!IS_ASCII(STRING_ELT(text, i))) {
 		    onlyASCII = FALSE;
 		    break;
@@ -838,7 +1003,7 @@ SEXP attribute_hidden do_grep(SEXP call, SEXP op, SEXP args, SEXP env)
     if (!fixed_opt && !perl_opt) {
 	/* if we have non-ASCII text in a DBCS locale, we need to use wchar */
 	if (!useBytes && mbcslocale && !utf8locale) use_UTF8 =TRUE;
-	use_WC = use_UTF8; use_UTF8 = FALSE; 
+	use_WC = use_UTF8; use_UTF8 = FALSE;
     }
     if (useBytes)
 	spat = CHAR(STRING_ELT(pat, 0));
@@ -852,25 +1017,44 @@ SEXP attribute_hidden do_grep(SEXP call, SEXP op, SEXP args, SEXP env)
 	    error(_("regular expression is invalid in this locale"));
     }
 
-    if (fixed_opt) ; 
+    if (fixed_opt) ;
     else if (perl_opt) {
 	int cflags = 0, erroffset;
 	const char *errorptr;
+	Rboolean pcre_st = R_PCRE_study == -2 ?  FALSE : n >= R_PCRE_study;
 	if (igcase_opt) cflags |= PCRE_CASELESS;
 	if (!useBytes && use_UTF8) cflags |= PCRE_UTF8;
+	// PCRE docs say this is not needed, but it is on Windows
 	tables = pcre_maketables();
 	re_pcre = pcre_compile(spat, cflags, &errorptr, &erroffset, tables);
 	if (!re_pcre) {
 	    if (errorptr)
 		warning(_("PCRE pattern compilation error\n\t'%s'\n\tat '%s'\n"),
-			errorptr, spat+erroffset);
+			errorptr, spat + erroffset);
 	    error(_("invalid regular expression '%s'"), spat);
-	    if (n > 10) {
-		re_pe = pcre_study(re_pcre, 0, &errorptr);
-		if (errorptr)
-		    warning(_("PCRE pattern study error\n\t'%s'\n"), errorptr);
-	    }
 	}
+	if (pcre_st) {
+	    re_pe = pcre_study(re_pcre,
+			       R_PCRE_use_JIT ?  PCRE_STUDY_JIT_COMPILE : 0, 
+			       &errorptr);
+	    if (errorptr)
+		warning(_("PCRE pattern study error\n\t'%s'\n"), errorptr);
+#if PCRE_STUDY_JIT_COMPILE
+	    else if(R_PCRE_use_JIT) setup_jit(re_pe);
+#endif
+	}
+	if(R_PCRE_limit_recursion == NA_LOGICAL) {
+	    // use recursion limit only on long strings
+	    Rboolean use = FALSE;
+	    for (i = 0 ; i < n ; i++)
+		if(strlen(CHAR(STRING_ELT(text, i))) >= 1000) {
+		    use = TRUE;
+		    break;
+		}
+	    if (use)
+		set_pcre_recursion_limit(&re_pe, R_pcre_max_recursions());
+	} else if (R_PCRE_limit_recursion)
+	    set_pcre_recursion_limit(&re_pe, R_pcre_max_recursions());
     } else {
 	int cflags = REG_NOSUB | REG_EXTENDED;
 	if (igcase_opt) cflags |= REG_ICASE;
@@ -910,8 +1094,13 @@ SEXP attribute_hidden do_grep(SEXP call, SEXP op, SEXP args, SEXP env)
 	    if (fixed_opt)
 		LOGICAL(ind)[i] = fgrep_one(spat, s, useBytes, use_UTF8, NULL) >= 0;
 	    else if (perl_opt) {
-		if (pcre_exec(re_pcre, re_pe, s, (int) strlen(s), 0, 0, ov, 0) >= 0)
-		    INTEGER(ind)[i] = 1;
+		int rc =
+		    pcre_exec(re_pcre, re_pe, s, (int) strlen(s), 0, 0, ov, 0);
+		if(rc >= 0) INTEGER(ind)[i] = 1;
+		else {
+		    INTEGER(ind)[i] = 0;
+		    pcre_exec_error(rc, i);
+		}
 	    } else {
 		if (!use_WC)
 		    rc = tre_regexecb(&reg, s, 0, NULL, 0);
@@ -919,6 +1108,10 @@ SEXP attribute_hidden do_grep(SEXP call, SEXP op, SEXP args, SEXP env)
 		    rc = tre_regwexec(&reg, wtransChar(STRING_ELT(text, i)),
 				      0, NULL, 0);
 		if (rc == 0) LOGICAL(ind)[i] = 1;
+		// AFAICS the only possible error report is REG_ESPACE
+		if (rc == REG_ESPACE)
+		    warning("Out-of-memory error in regexp matching for element %d",
+			    (int) i + 1);
 	    }
 	}
 	vmaxset(vmax);
@@ -927,19 +1120,24 @@ SEXP attribute_hidden do_grep(SEXP call, SEXP op, SEXP args, SEXP env)
 
     if (fixed_opt);
     else if (perl_opt) {
+#if PCRE_STUDY_JIT_COMPILE
+	// function added in 8.20, needed if JIT is used.
+	if (re_pe) pcre_free_study(re_pe);
+#else
 	if (re_pe) pcre_free(re_pe);
+#endif
 	pcre_free(re_pcre);
 	pcre_free((void *)tables);
     } else
 	tre_regfree(&reg);
 
     if (PRIMVAL(op)) {/* grepl case */
-	UNPROTECT(1);
+	UNPROTECT(1); /* ind */
 	return ind;
     }
 
     if (value_opt) {
-	SEXP nmold = getAttrib(text, R_NamesSymbol), nm;
+	SEXP nmold = PROTECT(getAttrib(text, R_NamesSymbol)), nm;
 	PROTECT(ans = allocVector(STRSXP, nmatches));
 	for (i = 0, j = 0; i < n ; i++)
 	    if (invert ^ LOGICAL(ind)[i])
@@ -952,7 +1150,7 @@ SEXP attribute_hidden do_grep(SEXP call, SEXP op, SEXP args, SEXP env)
 		    SET_STRING_ELT(nm, j++, STRING_ELT(nmold, i));
 	    setAttrib(ans, R_NamesSymbol, nm);
 	}
-	UNPROTECT(1);
+	UNPROTECT(2); /* ans, nmold */
     } else {
 #ifdef LONG_VECTOR_SUPPORT
 	if (n > INT_MAX) {
@@ -960,17 +1158,17 @@ SEXP attribute_hidden do_grep(SEXP call, SEXP op, SEXP args, SEXP env)
 	    j = 0;
 	    for (i = 0 ; i < n ; i++)
 		if (invert ^ LOGICAL(ind)[i]) REAL(ans)[j++] = (double)(i + 1);
-	} else 
+	} else
 #endif
 	{
 	    ans = allocVector(INTSXP, nmatches);
 	    j = 0;
 	    for (i = 0 ; i < n ; i++)
-		if (invert ^ LOGICAL(ind)[i]) 
+		if (invert ^ LOGICAL(ind)[i])
 		    INTEGER(ans)[j++] = (int) (i + 1);
 	}
     }
-    UNPROTECT(1);
+    UNPROTECT(1); /* ind */
     return ans;
 }
 
@@ -980,9 +1178,12 @@ SEXP attribute_hidden do_grep(SEXP call, SEXP op, SEXP args, SEXP env)
 static R_size_t fgrepraw1(SEXP pat, SEXP text, R_size_t offset) {
     Rbyte *haystack = RAW(text), *needle = RAW(pat);
     R_size_t n = LENGTH(text);
-    switch (LENGTH(pat)) { /* it may be silly but we optimize small needle
-			      searches, because they can be used to match
-			      single UTF8 chars (up to 3 bytes) */
+    R_size_t ncmp = LENGTH(pat);
+    if (n < ncmp)
+	return (R_size_t) -1;
+    switch (ncmp) { /* it may be silly but we optimize small needle
+		       searches, because they can be used to match
+		       single UTF8 chars (up to 3 bytes) */
     case 1:
 	{
 	    Rbyte c = needle[0];
@@ -997,7 +1198,8 @@ static R_size_t fgrepraw1(SEXP pat, SEXP text, R_size_t offset) {
 	{
 	    n--;
 	    while (offset < n) {
-		if (haystack[offset] == needle[0] && haystack[offset + 1] == needle[1])
+		if (haystack[offset    ] == needle[0] &&
+		    haystack[offset + 1] == needle[1])
 		    return offset;
 		offset++;
 	    }
@@ -1017,9 +1219,8 @@ static R_size_t fgrepraw1(SEXP pat, SEXP text, R_size_t offset) {
 	}
     default:
 	{
-	    R_size_t ncmp = LENGTH(pat);
-	    n -= ncmp;
 	    ncmp--;
+	    n -= ncmp;
 	    while (offset < n) {
 		if (haystack[offset] == needle[0] &&
 		    !memcmp(haystack + offset + 1, needle + 1, ncmp))
@@ -1028,7 +1229,7 @@ static R_size_t fgrepraw1(SEXP pat, SEXP text, R_size_t offset) {
 	    }
 	}
     }
-    return -1;
+    return (R_size_t) -1;
 }
 
 /* grepRaw(pattern, text, offset, ignore.case, fixed, value, all, invert) */
@@ -1101,7 +1302,7 @@ SEXP attribute_hidden do_grepraw(SEXP call, SEXP op, SEXP args, SEXP env)
 		ansp = RAW(ans);
 		if (res) {
 		    memcpy(ansp, RAW(text), res);
-		    ansp += res; 
+		    ansp += res;
 		}
 		res += LENGTH(pat);
 		if (res < LENGTH(text))
@@ -1141,9 +1342,9 @@ SEXP attribute_hidden do_grepraw(SEXP call, SEXP op, SEXP args, SEXP env)
 
 		    if (!nmatches) return text;
 
-		    /* if there are more matches than in the buffer, 
+		    /* if there are more matches than in the buffer,
 		       we actually need to get them first */
-		    if (nmatches > MAX_MATCHES_MINIBUF) { 
+		    if (nmatches > MAX_MATCHES_MINIBUF) {
 			mvec = PROTECT(allocVector(INTSXP, nmatches));
 			fmatches = INTEGER(mvec);
 			memcpy(fmatches, matches, sizeof(matches));
@@ -1174,9 +1375,9 @@ SEXP attribute_hidden do_grepraw(SEXP call, SEXP op, SEXP args, SEXP env)
 		    SET_VECTOR_ELT(ans, nmatches, elt);
 		    if (LENGTH(elt))
 			memcpy(RAW(elt), RAW(text) + LENGTH(text) - LENGTH(elt), LENGTH(elt));
+		    UNPROTECT(1); /* ans */
 		    if (mvec)
 			UNPROTECT(1);
-		    UNPROTECT(1);
 		    return ans;
 		}
 
@@ -1208,7 +1409,7 @@ SEXP attribute_hidden do_grepraw(SEXP call, SEXP op, SEXP args, SEXP env)
 	    }
 	    return ans;
 	}
-    }	
+    }
 
     cflags = REG_EXTENDED;
     if (igcase_opt) cflags |= REG_ICASE;
@@ -1243,7 +1444,7 @@ SEXP attribute_hidden do_grepraw(SEXP call, SEXP op, SEXP args, SEXP env)
 	}
 	return (rc == REG_OK) ? ScalarInteger((int)(ptag.rm_so + 1 + offset)) : allocVector(INTSXP, 0);
     }
-	
+
     /* match all - we use a pairlist of integer arrays to expand the result
        to allow use on big binary strings with many matches (it could be done
        by re-allocating a temp buffer but I chose sequential allocations to
@@ -1276,13 +1477,13 @@ SEXP attribute_hidden do_grepraw(SEXP call, SEXP op, SEXP args, SEXP env)
 		if (rc != REG_OK || ptag.rm_eo != 0)
 		    infinite_match = 0;
 	    }
-	    if (infinite_match)	    
+	    if (infinite_match)
 		warning(_("pattern matches an empty string infinitely, returning first match only"));
 	    break;
 	}
 	if (offset >= LENGTH(text)) break;
     }
-    
+
     if (value) { /* for values we store in fact the absolute start offsets and length in the integer vector */
 	SEXP vec = CAR(res_head);
 	R_size_t entry = 0, cptr = 0, clen = (CDR(res_head) == R_NilValue) ? res_ptr : LENGTH(vec);
@@ -1334,7 +1535,7 @@ SEXP attribute_hidden do_grepraw(SEXP call, SEXP op, SEXP args, SEXP env)
 	}
     }
     UNPROTECT(1);
-    
+
     tre_regfree(&reg);
 
     return ans;
@@ -1381,12 +1582,12 @@ static int count_subs(const char *repl)
 }
 
 /* FIXME: use UCP for upper/lower conversion */
-static 
+static
 char *pcre_string_adj(char *target, const char *orig, const char *repl,
 		      int *ovec, Rboolean use_UTF8)
 {
     int i, k, nb;
-    const char *p = repl; 
+    const char *p = repl;
     char *t = target, c;
     Rboolean upper = FALSE, lower = FALSE;
 
@@ -1522,13 +1723,13 @@ SEXP attribute_hidden do_gsub(SEXP call, SEXP op, SEXP args, SEXP env)
 	perl_opt = 0;
     }
 
-    if (!isString(pat) || length(pat) < 1)
+    if (!isString(pat) || LENGTH(pat) < 1)
 	error(_("invalid '%s' argument"), "pattern");
-    if (length(pat) > 1)
+    if (LENGTH(pat) > 1)
 	warning(_("argument '%s' has length > 1 and only the first element will be used"), "pattern");
-    if (!isString(rep) || length(rep) < 1)
+    if (!isString(rep) || LENGTH(rep) < 1)
 	error(_("invalid '%s' argument"), "replacement");
-    if (length(rep) > 1)
+    if (LENGTH(rep) > 1)
 	warning(_("argument '%s' has length > 1 and only the first element will be used"), "replacement");
 
     if (!isString(text))
@@ -1547,7 +1748,7 @@ SEXP attribute_hidden do_gsub(SEXP call, SEXP op, SEXP args, SEXP env)
 	Rboolean onlyASCII = IS_ASCII(STRING_ELT(pat, 0));
 	if (onlyASCII)
 	    for (i = 0; i < n; i++) {
-	    	if(STRING_ELT(text, i) == NA_STRING) continue;
+		if(STRING_ELT(text, i) == NA_STRING) continue;
 		if (!IS_ASCII(STRING_ELT(text, i))) {
 		    onlyASCII = FALSE;
 		    break;
@@ -1581,7 +1782,7 @@ SEXP attribute_hidden do_gsub(SEXP call, SEXP op, SEXP args, SEXP env)
     if (!fixed_opt && !perl_opt) {
 	/* if we have non-ASCII text in a DBCS locale, we need to use wchar */
 	if (!useBytes && mbcslocale && !utf8locale) use_UTF8 =TRUE;
-	use_WC = use_UTF8; use_UTF8 = FALSE; 
+	use_WC = use_UTF8; use_UTF8 = FALSE;
     }
 
     if (useBytes) {
@@ -1609,8 +1810,10 @@ SEXP attribute_hidden do_gsub(SEXP call, SEXP op, SEXP args, SEXP env)
     } else if (perl_opt) {
 	int cflags = 0, erroffset;
 	const char *errorptr;
+	Rboolean pcre_st = R_PCRE_study == -2 ?  FALSE : n >= R_PCRE_study;
 	if (use_UTF8) cflags |= PCRE_UTF8;
 	if (igcase_opt) cflags |= PCRE_CASELESS;
+	// PCRE docs say this is not needed, but it is on Windows
 	tables = pcre_maketables();
 	re_pcre = pcre_compile(spat, cflags, &errorptr, &erroffset, tables);
 	if (!re_pcre) {
@@ -1619,11 +1822,28 @@ SEXP attribute_hidden do_gsub(SEXP call, SEXP op, SEXP args, SEXP env)
 			errorptr, spat+erroffset);
 	    error(_("invalid regular expression '%s'"), spat);
 	}
-	if (n > 10) {
-	    re_pe = pcre_study(re_pcre, 0, &errorptr);
+	if (pcre_st) {
+	    re_pe = pcre_study(re_pcre,
+			       R_PCRE_use_JIT ?  PCRE_STUDY_JIT_COMPILE : 0, 
+			       &errorptr);
 	    if (errorptr)
 		warning(_("PCRE pattern study error\n\t'%s'\n"), errorptr);
+#if PCRE_STUDY_JIT_COMPILE
+	    else if(R_PCRE_use_JIT) setup_jit(re_pe);
+#endif
 	}
+	if(R_PCRE_limit_recursion == NA_LOGICAL) {
+	    // use recursion limit only on long strings
+	    Rboolean use = FALSE;
+	    for (i = 0 ; i < n ; i++)
+		if(strlen(CHAR(STRING_ELT(text, i))) >= 1000) {
+		    use = TRUE;
+		    break;
+		}
+	    if (use)
+		set_pcre_recursion_limit(&re_pe, R_pcre_max_recursions());
+	} else if (R_PCRE_limit_recursion)
+	    set_pcre_recursion_limit(&re_pe, R_pcre_max_recursions());
 	replen = strlen(srep);
     } else {
 	int cflags = REG_EXTENDED;
@@ -1678,19 +1898,19 @@ SEXP attribute_hidden do_gsub(SEXP call, SEXP op, SEXP args, SEXP env)
 		    do {
 			nr++;
 			ss += sst+patlen;
-                        slen -= (int)(sst+patlen);
+			slen -= (int)(sst+patlen);
 		    } while((sst = fgrep_one_bytes(spat, ss, slen, useBytes, use_UTF8)) >= 0);
 		} else nr = 1;
 		cbuf = u = Calloc(ns + nr*(replen - patlen) + 1, char);
 		*u = '\0';
-                slen = ns;
+		slen = ns;
 		do {
-                    strncpy(u, s, st);
-                    u += st;
-                    s += st+patlen;
-                    slen -= (int)(st+patlen);
+		    strncpy(u, s, st);
+		    u += st;
+		    s += st+patlen;
+		    slen -= (int)(st+patlen);
 		    strncpy(u, srep, replen);
-                    u += replen;
+		    u += replen;
 		} while(global && (st = fgrep_one_bytes(spat, s, slen, useBytes, use_UTF8)) >= 0);
 		strcpy(u, s);
 		if (useBytes)
@@ -1755,6 +1975,7 @@ SEXP attribute_hidden do_gsub(SEXP call, SEXP op, SEXP args, SEXP env)
 	       }
 	       eflag = PCRE_NOTBOL;  /* probably not needed */
 	   }
+	   pcre_exec_error(ncap, i);
 	   if (nmatch == 0)
 	       SET_STRING_ELT(ans, i, STRING_ELT(text, i));
 	   else if (STRING_ELT(rep, 0) == NA_STRING)
@@ -1777,10 +1998,10 @@ SEXP attribute_hidden do_gsub(SEXP call, SEXP op, SEXP args, SEXP env)
 		   SET_STRING_ELT(ans, i, mkCharCE(cbuf, CE_UTF8));
 	       else
 		   SET_STRING_ELT(ans, i, markKnown(cbuf, STRING_ELT(text, i)));
-	   }	
+	   }
 	   Free(cbuf);
        } else if (!use_WC) {
-	    int maxrep;
+	    int maxrep, rc;
 	    /* extended regexp in bytes */
 
 	    ns = (int) strlen(s);
@@ -1795,7 +2016,8 @@ SEXP attribute_hidden do_gsub(SEXP call, SEXP op, SEXP args, SEXP env)
 	    } else nns = ns + maxrep + 1000;
 	    u = cbuf = Calloc(nns, char);
 	    offset = 0; nmatch = 0; eflags = 0; last_end = -1;
-	    while (tre_regexecb(&reg, s+offset, 10, regmatch, eflags) == 0) {
+	    while ((rc = tre_regexecb(&reg, s+offset, 10, regmatch, eflags))
+		   == 0) {
 		/* printf("%s, %d %d\n", &s[offset],
 		   regmatch[0].rm_so, regmatch[0].rm_eo); */
 		nmatch++;
@@ -1819,6 +2041,11 @@ SEXP attribute_hidden do_gsub(SEXP call, SEXP op, SEXP args, SEXP env)
 		}
 		eflags = REG_NOTBOL;
 	    }
+	    // AFAICS the only possible error report is REG_ESPACE
+	    if (rc == REG_ESPACE)
+		warning("Out-of-memory error in regexp matching for element %d",
+			(int) i + 1);
+
 	    if (nmatch == 0)
 		SET_STRING_ELT(ans, i, STRING_ELT(text, i));
 	    else if (STRING_ELT(rep, 0) == NA_STRING)
@@ -1905,13 +2132,17 @@ SEXP attribute_hidden do_gsub(SEXP call, SEXP op, SEXP args, SEXP env)
 	vmaxset(vmax);
     }
 
-    if (fixed_opt) ; 
+    if (fixed_opt) ;
     else if (perl_opt) {
+#if PCRE_STUDY_JIT_COMPILE
+	if (re_pe) pcre_free_study(re_pe);
+#else
 	if (re_pe) pcre_free(re_pe);
+#endif
 	pcre_free(re_pcre);
 	pcre_free((void *)tables);
     } else tre_regfree(&reg);
-    DUPLICATE_ATTRIB(ans, text);
+    SHALLOW_DUPLICATE_ATTRIB(ans, text);
     /* This copied the class, if any */
     UNPROTECT(1);
     return ans;
@@ -1928,10 +2159,11 @@ static int getNc(const char *s, int st)
 
 
 
-static SEXP 
-gregexpr_Regexc(const regex_t *reg, SEXP sstr, int useBytes, int use_WC)
+static SEXP
+gregexpr_Regexc(const regex_t *reg, SEXP sstr, int useBytes, int use_WC,
+		R_xlen_t i)
 {
-    int matchIndex = -1, j, st, foundAll = 0, foundAny = 0;
+    int matchIndex = -1, j, st, foundAll = 0, foundAny = 0, rc;
     size_t len, offset = 0;
     regmatch_t regmatch[10];
     SEXP ans, matchlen;         /* Return vect and its attribute */
@@ -1959,7 +2191,7 @@ gregexpr_Regexc(const regex_t *reg, SEXP sstr, int useBytes, int use_WC)
 
     while (!foundAll) {
 	if ( offset < len &&
-	     (!use_WC ? tre_regexecb(reg, string+offset, 1, regmatch, eflags) :
+	     (rc = !use_WC ? tre_regexecb(reg, string+offset, 1, regmatch, eflags) :
 	      tre_regwexec(reg, ws+offset, 1, regmatch, eflags))
 	     == 0) {
 	    if ((matchIndex + 1) == bufsize) {
@@ -1999,6 +2231,10 @@ gregexpr_Regexc(const regex_t *reg, SEXP sstr, int useBytes, int use_WC)
 	    }
 	}
 	eflags = REG_NOTBOL;
+	// AFAICS the only possible error report is REG_ESPACE
+	if (rc == REG_ESPACE)
+	    warning("Out-of-memory error in regexp matching for element %d",
+		    (int) i + 1);
     }
     PROTECT(ans = allocVector(INTSXP, matchIndex + 1));
     PROTECT(matchlen = allocVector(INTSXP, matchIndex + 1));
@@ -2009,17 +2245,17 @@ gregexpr_Regexc(const regex_t *reg, SEXP sstr, int useBytes, int use_WC)
     }
     setAttrib(ans, install("match.length"), matchlen);
     if(useBytes) {
-	setAttrib(ans, install("useBytes"), ScalarLogical(TRUE));
+	setAttrib(ans, install("useBytes"), R_TrueValue);
     }
     UNPROTECT(4);
     return ans;
 }
 
 static SEXP
-gregexpr_fixed(const char *pattern, const char *string, 
+gregexpr_fixed(const char *pattern, const char *string,
 	       Rboolean useBytes, Rboolean use_UTF8)
 {
-    int patlen, matchIndex, st = 0, foundAll = 0, foundAny = 0, j, 
+    int patlen, matchIndex, st = 0, foundAll = 0, foundAny = 0, j,
 	ansSize, nb = 0;
     size_t curpos = 0, slen;
     SEXP ans, matchlen;         /* return vect and its attribute */
@@ -2090,7 +2326,7 @@ gregexpr_fixed(const char *pattern, const char *string,
     }
     setAttrib(ans, install("match.length"), matchlen);
     if(useBytes) {
-	setAttrib(ans, install("useBytes"), ScalarLogical(TRUE));
+	setAttrib(ans, install("useBytes"), R_TrueValue);
     }
     UNPROTECT(4);
     return ans;
@@ -2104,10 +2340,10 @@ gregexpr_fixed(const char *pattern, const char *string,
    We have to do this once for the match and once for every group, so
    I generalized the method and call it twice from
    extract_match_and_groups to avoid repetitive code.
-   
+
    Toby Dylan Hocking 2011-03-10
 */
-static Rboolean 
+static Rboolean
 ovector_extract_start_length(Rboolean use_UTF8,int *ovector,
 			     int *mptr,int *lenptr,const char *string)
 {
@@ -2138,10 +2374,10 @@ ovector_extract_start_length(Rboolean use_UTF8,int *ovector,
    organized as follows: match_start match_end group1_start group1_end
    group2_start group2_end ... we process these in regexpr and
    gregexpr, so I made this function to avoid duplicating code between
-   the 2. 
+   the 2.
 
    Toby Dylan Hocking 2011-03-10 */
-static Rboolean 
+static Rboolean
 extract_match_and_groups(Rboolean use_UTF8, int *ovector, int capture_count,
 			 int *mptr, int *lenptr, int *cptr, int *clenptr,
 			 const char *string, int capture_stride)
@@ -2162,7 +2398,7 @@ gregexpr_perl(const char *pattern, const char *string,
 	      pcre *re_pcre, pcre_extra *re_pe,
 	      Rboolean useBytes, Rboolean use_UTF8,
 	      int *ovector, int ovector_size,
-	      int capture_count, SEXP capture_names)
+	      int capture_count, SEXP capture_names, R_xlen_t n)
 {
     Rboolean foundAll = FALSE, foundAny = FALSE;
     int matchIndex = -1, start = 0;
@@ -2172,9 +2408,9 @@ gregexpr_perl(const char *pattern, const char *string,
     int bufsize = 1024;         /* starting size for buffers */
     PROTECT_INDEX cb, clb, mb, mlb;
 
-    PROTECT_WITH_INDEX(capturebuf = 
+    PROTECT_WITH_INDEX(capturebuf =
 		       allocVector(INTSXP, bufsize*capture_count), &cb);
-    PROTECT_WITH_INDEX(capturelenbuf = 
+    PROTECT_WITH_INDEX(capturelenbuf =
 		       allocVector(INTSXP, bufsize*capture_count), &clb);
     PROTECT_WITH_INDEX(matchbuf = allocVector(INTSXP, bufsize), &mb);
     PROTECT_WITH_INDEX(matchlenbuf = allocVector(INTSXP, bufsize), &mlb);
@@ -2182,6 +2418,7 @@ gregexpr_perl(const char *pattern, const char *string,
 	int rc, slen = (int) strlen(string);
 	rc = pcre_exec(re_pcre, re_pe, string, slen, start, 0, ovector,
 		       ovector_size);
+	pcre_exec_error(rc, n);
 	if (rc >= 0) {
 	    if ((matchIndex + 1) == bufsize) {
 		/* Reallocate match buffers */
@@ -2199,13 +2436,13 @@ gregexpr_perl(const char *pattern, const char *string,
 		    tmp = allocVector(INTSXP, newbufsize*capture_count);
 		    for(int j = 0; j < bufsize; j++)
 			for(int i = 0; i < capture_count; i++)
-			    INTEGER(tmp)[j + newbufsize*i] = 
+			    INTEGER(tmp)[j + newbufsize*i] =
 				INTEGER(capturebuf)[j + bufsize*i];
 		    REPROTECT(capturebuf = tmp, cb);
 		    tmp = allocVector(INTSXP, newbufsize*capture_count);
 		    for(int j = 0; j < bufsize; j++)
 			for(int i = 0; i < capture_count; i++)
-			    INTEGER(tmp)[j + newbufsize*i] = 
+			    INTEGER(tmp)[j + newbufsize*i] =
 				INTEGER(capturelenbuf)[j + bufsize*i];
 		    REPROTECT(capturelenbuf =  tmp, clb);
 		}
@@ -2213,7 +2450,7 @@ gregexpr_perl(const char *pattern, const char *string,
 	    }
 	    matchIndex++;
 	    foundAny = TRUE;
-	    foundAll = 
+	    foundAll =
 		extract_match_and_groups(use_UTF8, ovector, capture_count,
 					 INTEGER(matchbuf) + matchIndex,
 					 INTEGER(matchlenbuf) + matchIndex,
@@ -2236,7 +2473,7 @@ gregexpr_perl(const char *pattern, const char *string,
     PROTECT(matchlen = allocVector(INTSXP, matchIndex + 1));
     setAttrib(ans, install("match.length"), matchlen);
     if(useBytes) {
-	setAttrib(ans, install("useBytes"), ScalarLogical(TRUE));
+	setAttrib(ans, install("useBytes"), R_TrueValue);
     }
     UNPROTECT(1);
     if (foundAny) {
@@ -2338,9 +2575,9 @@ SEXP attribute_hidden do_regexpr(SEXP call, SEXP op, SEXP args, SEXP env)
     }
 
     /* Note that excluding NAs differs from grep/sub */
-    if (!isString(pat) || length(pat) < 1 || STRING_ELT(pat, 0) == NA_STRING)
+    if (!isString(pat) || LENGTH(pat) < 1 || STRING_ELT(pat, 0) == NA_STRING)
 	error(_("invalid '%s' argument"), "pattern");
-    if (length(pat) > 1)
+    if (LENGTH(pat) > 1)
 	warning(_("argument '%s' has length > 1 and only the first element will be used"), "pattern");
 
     if (!isString(text))
@@ -2351,7 +2588,7 @@ SEXP attribute_hidden do_regexpr(SEXP call, SEXP op, SEXP args, SEXP env)
 	Rboolean onlyASCII = IS_ASCII(STRING_ELT(pat, 0));
 	if (onlyASCII)
 	    for (i = 0; i < n; i++) {
-	        if(STRING_ELT(text, i) == NA_STRING) continue;
+		if(STRING_ELT(text, i) == NA_STRING) continue;
 		if (!IS_ASCII(STRING_ELT(text, i))) {
 		    onlyASCII = FALSE;
 		    break;
@@ -2387,7 +2624,7 @@ SEXP attribute_hidden do_regexpr(SEXP call, SEXP op, SEXP args, SEXP env)
     if (!fixed_opt && !perl_opt) {
 	/* if we have non-ASCII text in a DBCS locale, we need to use wchar */
 	if (!useBytes && mbcslocale && !utf8locale) use_UTF8 =TRUE;
-	use_WC = use_UTF8; use_UTF8 = FALSE; 
+	use_WC = use_UTF8; use_UTF8 = FALSE;
     }
 
     if (useBytes)
@@ -2402,12 +2639,14 @@ SEXP attribute_hidden do_regexpr(SEXP call, SEXP op, SEXP args, SEXP env)
 	    error(_("regular expression is invalid in this locale"));
     }
 
-    if (fixed_opt) ; 
+    if (fixed_opt) ;
     else if (perl_opt) {
 	int cflags = 0, erroffset;
 	const char *errorptr;
+	Rboolean pcre_st = R_PCRE_study == -2 ?  FALSE : n >= R_PCRE_study;
 	if (igcase_opt) cflags |= PCRE_CASELESS;
 	if (!useBytes && use_UTF8) cflags |= PCRE_UTF8;
+	// PCRE docs say this is not needed, but it is on Windows
 	tables = pcre_maketables();
 	re_pcre = pcre_compile(spat, cflags, &errorptr, &erroffset, tables);
 	if (!re_pcre) {
@@ -2416,17 +2655,34 @@ SEXP attribute_hidden do_regexpr(SEXP call, SEXP op, SEXP args, SEXP env)
 			errorptr, spat+erroffset);
 	    error(_("invalid regular expression '%s'"), spat);
 	}
-	if (n > 10) {
-	    re_pe = pcre_study(re_pcre, 0, &errorptr);
+	if (pcre_st) {
+	    re_pe = pcre_study(re_pcre,
+			       R_PCRE_use_JIT ?  PCRE_STUDY_JIT_COMPILE : 0, 
+			       &errorptr);
 	    if (errorptr)
 		warning(_("PCRE pattern study error\n\t'%s'\n"), errorptr);
+#if PCRE_STUDY_JIT_COMPILE
+	    else if(R_PCRE_use_JIT) setup_jit(re_pe);
+#endif
 	}
+	if(R_PCRE_limit_recursion == NA_LOGICAL) {
+	    // use recursion limit only on long strings
+	    Rboolean use = FALSE;
+	    for (i = 0 ; i < n ; i++)
+		if(strlen(CHAR(STRING_ELT(text, i))) >= 1000) {
+		    use = TRUE;
+		    break;
+		}
+	    if (use)
+		set_pcre_recursion_limit(&re_pe, R_pcre_max_recursions());
+	} else if (R_PCRE_limit_recursion)
+	    set_pcre_recursion_limit(&re_pe, R_pcre_max_recursions());
 	/* also extract info for named groups */
 	pcre_fullinfo(re_pcre, re_pe, PCRE_INFO_NAMECOUNT, &name_count);
 	pcre_fullinfo(re_pcre, re_pe, PCRE_INFO_NAMEENTRYSIZE, &name_entry_size);
 	pcre_fullinfo(re_pcre, re_pe, PCRE_INFO_NAMETABLE, &name_table);
-	info_code = 
-	    pcre_fullinfo(re_pcre, re_pe, PCRE_INFO_CAPTURECOUNT, 
+	info_code =
+	    pcre_fullinfo(re_pcre, re_pe, PCRE_INFO_CAPTURECOUNT,
 			  &capture_count);
 	if(info_code < 0)
 	    error(_("'pcre_fullinfo' returned '%d' "), info_code);
@@ -2459,7 +2715,7 @@ SEXP attribute_hidden do_regexpr(SEXP call, SEXP op, SEXP args, SEXP env)
 	PROTECT(matchlen = allocVector(INTSXP, n));
 	setAttrib(ans, install("match.length"), matchlen);
 	if(useBytes) {
-	    setAttrib(ans, install("useBytes"), ScalarLogical(TRUE));
+	    setAttrib(ans, install("useBytes"), R_TrueValue);
 	}
 	UNPROTECT(1);
 	if (perl_opt && capture_count) {
@@ -2478,7 +2734,10 @@ SEXP attribute_hidden do_regexpr(SEXP call, SEXP op, SEXP args, SEXP env)
 	    UNPROTECT(3);
 	    is = INTEGER(capture_start);
 	    il = INTEGER(capturelen);
-        } else is = il = NULL; /* not actually used */
+	    // initiialization needed for NA inputs: PR#16484
+	    for (i = 0 ; i < n * capture_count ; i++)
+		is[i] = il[i] = NA_INTEGER;
+	} else is = il = NULL; /* not actually used */
 	vmax = vmaxget();
 	for (i = 0 ; i < n ; i++) {
 //	    if ((i+1) % NINTERRUPT == 0) R_CheckUserInterrupt();
@@ -2519,10 +2778,11 @@ SEXP attribute_hidden do_regexpr(SEXP call, SEXP op, SEXP args, SEXP env)
 			    (int) strlen(spat):-1;
 		} else if (perl_opt) {
 		    int rc;
-		    rc = pcre_exec(re_pcre, re_pe, s, (int) strlen(s), 0, 0, 
+		    rc = pcre_exec(re_pcre, re_pe, s, (int) strlen(s), 0, 0,
 				   ovector, ovector_size);
+		    pcre_exec_error(rc, i);
 		    if (rc >= 0) {
-			extract_match_and_groups(use_UTF8, ovector, 
+			extract_match_and_groups(use_UTF8, ovector,
 						 capture_count,
 						 // don't use this for large i
 						 INTEGER(ans) + i,
@@ -2547,6 +2807,10 @@ SEXP attribute_hidden do_regexpr(SEXP call, SEXP op, SEXP args, SEXP env)
 			INTEGER(ans)[i] = st + 1; /* index from one */
 			INTEGER(matchlen)[i] = regmatch[0].rm_eo - st;
 		    } else INTEGER(ans)[i] = INTEGER(matchlen)[i] = -1;
+		    // AFAICS the only possible error report is REG_ESPACE
+		    if (rc == REG_ESPACE)
+			warning("Out-of-memory error in regexp matching for element %d",
+				(int) i + 1);
 		}
 	    }
 	    vmaxset(vmax);
@@ -2576,23 +2840,27 @@ SEXP attribute_hidden do_regexpr(SEXP call, SEXP op, SEXP args, SEXP env)
 			if (fixed_opt)
 			    elt = gregexpr_fixed(spat, s, useBytes, use_UTF8);
 			else
-			    elt = gregexpr_perl(spat, s, re_pcre, re_pe, 
+			    elt = gregexpr_perl(spat, s, re_pcre, re_pe,
 						useBytes, use_UTF8, ovector,
 						ovector_size, capture_count,
-						capture_names);
+						capture_names, i);
 		    }
 		} else
-		    elt = gregexpr_Regexc(&reg, STRING_ELT(text, i), 
-					  useBytes, use_WC);
+		    elt = gregexpr_Regexc(&reg, STRING_ELT(text, i),
+					  useBytes, use_WC, i);
 	    }
 	    SET_VECTOR_ELT(ans, i, elt);
 	    vmaxset(vmax);
 	}
     }
 
-    if (fixed_opt) ; 
+    if (fixed_opt) ;
     else if (perl_opt) {
+#if PCRE_STUDY_JIT_COMPILE
+	if (re_pe) pcre_free_study(re_pe);
+#else
 	if (re_pe) pcre_free(re_pe);
+#endif
 	pcre_free(re_pcre);
 	pcre_free((void *)tables);
 	UNPROTECT(1);
@@ -2606,13 +2874,13 @@ SEXP attribute_hidden do_regexpr(SEXP call, SEXP op, SEXP args, SEXP env)
 
 SEXP attribute_hidden do_regexec(SEXP call, SEXP op, SEXP args, SEXP env)
 {
-    SEXP pat, vec, ans, matchpos, matchlen;
+    SEXP pat, text, ans, matchpos, matchlen;
     int opt_icase, opt_fixed, useBytes;
 
-    Rboolean haveBytes, useWC = FALSE;
+    Rboolean use_WC = FALSE;
     const char *s, *t;
     const void *vmax = NULL;
-    
+
     regex_t reg;
     size_t nmatch;
     regmatch_t *pmatch;
@@ -2623,11 +2891,11 @@ SEXP attribute_hidden do_regexec(SEXP call, SEXP op, SEXP args, SEXP env)
     checkArity(op, args);
 
     pat = CAR(args); args = CDR(args);
-    vec = CAR(args); args = CDR(args);
+    text = CAR(args); args = CDR(args);
     opt_icase = asLogical(CAR(args)); args = CDR(args);
     opt_fixed = asLogical(CAR(args)); args = CDR(args);
     useBytes = asLogical(CAR(args));
-    
+
     if(opt_icase == NA_INTEGER) opt_icase = 0;
     if(opt_fixed == NA_INTEGER) opt_fixed = 0;
     if(useBytes == NA_INTEGER) useBytes = 0;
@@ -2640,56 +2908,70 @@ SEXP attribute_hidden do_regexec(SEXP call, SEXP op, SEXP args, SEXP env)
     if(opt_icase) cflags |= REG_ICASE;
 
     if(!isString(pat) ||
-       (length(pat) < 1) ||
+       (LENGTH(pat) < 1) ||
        (STRING_ELT(pat, 0) == NA_STRING))
 	error(_("invalid '%s' argument"), "pattern");
-    if(length(pat) > 1)
+    if(LENGTH(pat) > 1)
 	warning(_("argument '%s' has length > 1 and only the first element will be used"), "pattern");
-    
-    if(!isString(vec))
+
+    if(!isString(text))
 	error(_("invalid '%s' argument"), "text");
 
-    n = XLENGTH(vec);
+    n = XLENGTH(text);
 
+    if (!useBytes) {
+	Rboolean onlyASCII = IS_ASCII(STRING_ELT(pat, 0));
+	if(onlyASCII)
+	    for(i = 0; i < n; i++) {
+		if(STRING_ELT(text, i) == NA_STRING) continue;
+		if (!IS_ASCII(STRING_ELT(text, i))) {
+		    onlyASCII = FALSE;
+		    break;
+		}
+	    }
+	useBytes = onlyASCII;
+    }
     if(!useBytes) {
-        haveBytes = IS_BYTES(STRING_ELT(pat, 0));
+	Rboolean haveBytes = IS_BYTES(STRING_ELT(pat, 0));
 	if(!haveBytes)
-            for(i = 0; i < n; i++) {
-                if(IS_BYTES(STRING_ELT(vec, i))) {
-                    haveBytes = TRUE;
-                    break;
-                }
+	    for(i = 0; i < n; i++) {
+		if(IS_BYTES(STRING_ELT(text, i))) {
+		    haveBytes = TRUE;
+		    break;
+		}
 	    }
-	if (haveBytes) useBytes = TRUE;
+	if(haveBytes) {
+	    useBytes = TRUE;
+	}
     }
 
     if(!useBytes) {
-        useWC = !IS_ASCII(STRING_ELT(pat, 0));
-        if(!useWC) {
-            for(i = 0 ; i < n ; i++) {
-                if(STRING_ELT(vec, i) == NA_STRING) continue;
-                if(!IS_ASCII(STRING_ELT(vec, i))) {
-                    useWC = TRUE;
-                    break;
-                }
-            }
-        }
-    }
-    
+	use_WC = !IS_ASCII(STRING_ELT(pat, 0));
+	if(!use_WC) {
+	    for(i = 0 ; i < n ; i++) {
+		if(STRING_ELT(text, i) == NA_STRING) continue;
+		if(!IS_ASCII(STRING_ELT(text, i))) {
+		    use_WC = TRUE;
+		    break;
+		}
+	    }
+	}
+    }
+
     if(useBytes)
 	rc = tre_regcompb(&reg, CHAR(STRING_ELT(pat, 0)), cflags);
-    else if (useWC)
+    else if (use_WC)
 	rc = tre_regwcomp(&reg, wtransChar(STRING_ELT(pat, 0)), cflags);
     else {
-        s = translateChar(STRING_ELT(pat, 0));
-        if(mbcslocale && !mbcsValid(s))
-            error(_("regular expression is invalid in this locale"));
-        rc = tre_regcomp(&reg, s, cflags);
+	s = translateChar(STRING_ELT(pat, 0));
+	if(mbcslocale && !mbcsValid(s))
+	    error(_("regular expression is invalid in this locale"));
+	rc = tre_regcomp(&reg, s, cflags);
     }
     if(rc) {
-        char errbuf[1001];
-        tre_regerror(rc, &reg, errbuf, 1001);
-        error(_("regcomp error: '%s'"), errbuf);
+	char errbuf[1001];
+	tre_regerror(rc, &reg, errbuf, 1001);
+	error(_("regcomp error: '%s'"), errbuf);
     }
 
     nmatch = reg.re_nsub + 1;
@@ -2700,30 +2982,31 @@ SEXP attribute_hidden do_regexec(SEXP call, SEXP op, SEXP args, SEXP env)
 
     for(i = 0; i < n; i++) {
 //	if ((i+1) % NINTERRUPT == 0) R_CheckUserInterrupt();
-	if(STRING_ELT(vec, i) == NA_STRING) {
+	if(STRING_ELT(text, i) == NA_STRING) {
 	    PROTECT(matchpos = ScalarInteger(NA_INTEGER));
-	    setAttrib(matchpos, install("match.length"),
+	    SEXP s_match_length = install("match.length");
+	    setAttrib(matchpos, s_match_length ,
 		      ScalarInteger(NA_INTEGER));
 	    SET_VECTOR_ELT(ans, i, matchpos);
 	    UNPROTECT(1);
 	} else {
 	    vmax = vmaxget();
 	    if(useBytes)
-		rc = tre_regexecb(&reg, CHAR(STRING_ELT(vec, i)),
+		rc = tre_regexecb(&reg, CHAR(STRING_ELT(text, i)),
 				  nmatch, pmatch, 0);
-	    else if(useWC) {
-		rc = tre_regwexec(&reg, wtransChar(STRING_ELT(vec, i)),
+	    else if(use_WC) {
+		rc = tre_regwexec(&reg, wtransChar(STRING_ELT(text, i)),
 				  nmatch, pmatch, 0);
 		vmaxset(vmax);
 	    }
 	    else {
-		t = translateChar(STRING_ELT(vec, i));
+		t = translateChar(STRING_ELT(text, i));
 		if (mbcslocale && !mbcsValid(t))
 		    error(_("input string %d is invalid in this locale"),
 			  i + 1);
 		rc = tre_regexec(&reg, t,
 				 nmatch, pmatch, 0);
-		vmaxset(vmax);		
+		vmaxset(vmax);
 	    }
 	    if(rc == REG_OK) {
 		PROTECT(matchpos = allocVector(INTSXP, nmatch));
@@ -2736,22 +3019,29 @@ SEXP attribute_hidden do_regexec(SEXP call, SEXP op, SEXP args, SEXP env)
 		setAttrib(matchpos, install("match.length"), matchlen);
 		if(useBytes)
 		    setAttrib(matchpos, install("useBytes"),
-			      ScalarLogical(TRUE));
+			      R_TrueValue);
 		SET_VECTOR_ELT(ans, i, matchpos);
 		UNPROTECT(2);
 	    } else {
 		/* No match (or could there be an error?). */
 		/* Alternatively, could return nmatch -1 values.
-		*/
+		 */
+		// AFAICS the only possible error report is REG_ESPACE
+		if (rc == REG_ESPACE)
+		    warning("Out-of-memory error in regexp matching for element %d",
+			    (int) i + 1);
 		PROTECT(matchpos = ScalarInteger(-1));
 		PROTECT(matchlen = ScalarInteger(-1));
 		setAttrib(matchpos, install("match.length"), matchlen);
+		if(useBytes)
+		    setAttrib(matchpos, install("useBytes"),
+			      R_TrueValue);
 		SET_VECTOR_ELT(ans, i, matchpos);
 		UNPROTECT(2);
 	    }
 	}
     }
-    
+
     free(pmatch);
 
     tre_regfree(&reg);
@@ -2760,3 +3050,34 @@ SEXP attribute_hidden do_regexec(SEXP call, SEXP op, SEXP args, SEXP env)
 
     return ans;
 }
+
+/* pcre_config was added in PCRE 4.0, with PCRE_CONFIG_UTF8 .
+   PCRE_CONFIG_UNICODE_PROPERTIES had been added by 8.10,
+   the earliest version we allow.
+ */
+SEXP attribute_hidden do_pcre_config(SEXP call, SEXP op, SEXP args, SEXP env)
+{
+    int res;
+
+    checkArity(op, args);
+    SEXP ans = PROTECT(allocVector(LGLSXP, 4));
+    int *lans = LOGICAL(ans);
+    SEXP nm = allocVector(STRSXP, 4);
+    setAttrib(ans, R_NamesSymbol, nm);
+    SET_STRING_ELT(nm, 0, mkChar("UTF-8"));
+    pcre_config(PCRE_CONFIG_UTF8, &res); lans[0] = res;
+    SET_STRING_ELT(nm, 1, mkChar("Unicode properties"));
+    pcre_config(PCRE_CONFIG_UNICODE_PROPERTIES, &res); lans[1] = res;
+    SET_STRING_ELT(nm, 2, mkChar("JIT"));
+#ifdef PCRE_CONFIG_JIT
+    // added (and JIT support) in 8.20.
+    pcre_config(PCRE_CONFIG_JIT, &res);
+#else
+    res = FALSE;
+#endif
+    lans[2] = res;
+    pcre_config(PCRE_CONFIG_STACKRECURSE, &res); lans[3] = res;
+    SET_STRING_ELT(nm, 3, mkChar("stack"));
+    UNPROTECT(1);
+    return ans;
+}
diff --git a/src/main/gzio.h b/src/main/gzio.h
index 6271592..2813081 100644
--- a/src/main/gzio.h
+++ b/src/main/gzio.h
@@ -285,7 +285,13 @@ static int R_gzread (gzFile file, voidp buf, unsigned len)
 
     if (s == NULL || s->mode != 'r') return Z_STREAM_ERROR;
 
-    if (s->z_err == Z_DATA_ERROR || s->z_err == Z_ERRNO) return -1;
+    if (s->z_err == Z_DATA_ERROR) {
+	warning("invalid or incomplete compressed data");
+	return -1;
+    } else if(s->z_err == Z_ERRNO) {
+	warning("error reading the file");
+	return -1;
+    }
     if (s->z_err == Z_STREAM_END) return 0;  /* EOF */
 
     next_out = (Byte*) buf;
@@ -340,6 +346,7 @@ static int R_gzread (gzFile file, voidp buf, unsigned len)
             start = s->stream.next_out;
 
             if (getLong(s) != s->crc) {
+		warning("invalid or incomplete compressed data");
                 s->z_err = Z_DATA_ERROR;
             } else {
                 (void)getLong(s);
@@ -359,8 +366,13 @@ static int R_gzread (gzFile file, voidp buf, unsigned len)
     s->crc = crc32(s->crc, start, (uInt) (s->stream.next_out - start));
 
     if (len == s->stream.avail_out &&
-        (s->z_err == Z_DATA_ERROR || s->z_err == Z_ERRNO))
-        return -1;
+        (s->z_err == Z_DATA_ERROR || s->z_err == Z_ERRNO)) {
+	if(s->z_err == Z_DATA_ERROR)
+	    warning("invalid or incomplete compressed data");
+	else if(s->z_err == Z_ERRNO)
+	    warning("error reading the file");
+	return -1;
+    }
     return (int)(len - s->stream.avail_out);
 }
 
diff --git a/src/main/identical.c b/src/main/identical.c
index 5297168..eb4ef2f 100644
--- a/src/main/identical.c
+++ b/src/main/identical.c
@@ -1,6 +1,6 @@
 /*
  *  R : A Computer Language for Statistical Data Analysis
- *  Copyright (C) 2001-2013  The R Core Team
+ *  Copyright (C) 2001-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
@@ -14,7 +14,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  */
 
 
@@ -28,12 +28,11 @@
 
 /* How are  R "double"s compared : */
 typedef enum {
-    bit_NA__num_bit = 0,/* S's default - look at bit pattern, also for NA/NaN's */
-    bit_NA__num_eq  = 1,/* bitwise comparison for NA / NaN; '==' for other numbers */
-    single_NA__num_bit = 2,/*         one   "  "  NA          "  " 'bit'comparison */
-    single_NA__num_eq  = 3,/* R's default: one kind of NA or NaN; for num, use '==' */
+    bit_NA__num_bit = 0,// S's default - look at bit pattern, also for NA/NaN's
+    bit_NA__num_eq  = 1,// bitwise comparison for NA / NaN; '==' for other numbers
+ single_NA__num_bit = 2,// one kind of NA or NaN; for num, use 'bit'comparison
+ single_NA__num_eq  = 3,// one kind of NA or NaN; for num, use '==' : R's DEFAULT
 } ne_strictness_type;
-
 /* NOTE:  ne_strict = NUM_EQ + (SINGLE_NA * 2)  = NUM_EQ | (SINGLE_NA << 1)   */
 
 static Rboolean neWithNaN(double x, double y, ne_strictness_type str);
@@ -43,7 +42,7 @@ static Rboolean neWithNaN(double x, double y, ne_strictness_type str);
 SEXP attribute_hidden do_identical(SEXP call, SEXP op, SEXP args, SEXP env)
 {
     int num_eq = 1, single_NA = 1, attr_as_set = 1, ignore_bytecode = 1,
-	ignore_env = 0, nargs = length(args), flags;
+	ignore_env = 0, ignore_srcref = 1, nargs = length(args), flags;
     /* avoid problems with earlier (and future) versions captured in S4
        methods: but this should be fixed where it is caused, in
        'methods'!
@@ -62,23 +61,27 @@ SEXP attribute_hidden do_identical(SEXP call, SEXP op, SEXP args, SEXP env)
 	ignore_bytecode = asLogical(CAR(args));
     if (nargs >= 7)
 	ignore_env = asLogical(CADR(args));
+    if (nargs >= 8)
+	ignore_srcref = asLogical(CADDR(args));
 
-    if(num_eq == NA_LOGICAL) error(_("invalid '%s' value"), "num.eq");
-    if(single_NA == NA_LOGICAL) error(_("invalid '%s' value"), "single.NA");
-    if(attr_as_set == NA_LOGICAL) error(_("invalid '%s' value"), "attrib.as.set");
+    if(num_eq          == NA_LOGICAL) error(_("invalid '%s' value"), "num.eq");
+    if(single_NA       == NA_LOGICAL) error(_("invalid '%s' value"), "single.NA");
+    if(attr_as_set     == NA_LOGICAL) error(_("invalid '%s' value"), "attrib.as.set");
     if(ignore_bytecode == NA_LOGICAL) error(_("invalid '%s' value"), "ignore.bytecode");
-    if(ignore_env == NA_LOGICAL) error(_("invalid '%s' value"), "ignore.environment");
+    if(ignore_env      == NA_LOGICAL) error(_("invalid '%s' value"), "ignore.environment");
+    if(ignore_srcref   == NA_LOGICAL) error(_("invalid '%s' value"), "ignore.srcref");
 
     flags = (num_eq ? 0 : 1) + (single_NA ? 0 : 2) + (attr_as_set ? 0 : 4) +
-	(ignore_bytecode ? 0 : 8) + (ignore_env ? 0 : 16);
+	(ignore_bytecode ? 0 : 8) + (ignore_env ? 0 : 16) + (ignore_srcref ? 0 : 32);
     return ScalarLogical(R_compute_identical(x, y, flags));
 }
 
-#define NUM_EQ 		(!(flags & 1))
+#define NUM_EQ		(!(flags & 1))
 #define SINGLE_NA       (!(flags & 2))
 #define ATTR_AS_SET     (!(flags & 4))
 #define IGNORE_BYTECODE (!(flags & 8))
 #define IGNORE_ENV      (!(flags & 16))
+#define IGNORE_SRCREF   (!(flags & 32))
 
 /* do the two objects compute as identical?
    Also used in unique.c */
@@ -95,15 +98,27 @@ R_compute_identical(SEXP x, SEXP y, int flags)
 
     /* Skip attribute checks for CHARSXP
        -- such attributes are used for the cache.  */
-    if(TYPEOF(x) == CHARSXP)
-    {
+    if(TYPEOF(x) == CHARSXP) {
 	/* This matches NAs */
 	return Seql(x, y);
     }
-
-    ax = ATTRIB(x); ay = ATTRIB(y);
+    if (IGNORE_SRCREF && TYPEOF(x) == CLOSXP) {
+	/* Remove "srcref" attribute - and below, treat body(x), body(y) */
+	SEXP x_ = PROTECT(duplicate(x)), y_ = PROTECT(duplicate(y));
+	setAttrib(x_, R_SrcrefSymbol, R_NilValue);
+	setAttrib(y_, R_SrcrefSymbol, R_NilValue);
+	ax = ATTRIB(x_); ay = ATTRIB(y_);
+	UNPROTECT(2);
+    }
+    else {
+	ax = ATTRIB(x); ay = ATTRIB(y);
+    }
     if (!ATTR_AS_SET) {
-	if(!R_compute_identical(ax, ay, flags)) return FALSE;
+	PROTECT(ax);
+	PROTECT(ay);
+	Rboolean idattr = R_compute_identical(ax, ay, flags);
+	UNPROTECT(2);
+	if(! idattr) return FALSE;
     }
     /* Attributes are special: they should be tagged pairlists.  We
        don't test them if they are not, and we do not test the order
@@ -124,6 +139,12 @@ R_compute_identical(SEXP x, SEXP y, int flags)
 	    if(length(ax) != length(ay)) return FALSE;
 	    /* They are the same length and should have
 	       unique non-empty non-NA tags */
+	    /* ax, ay might be fresh allocations from duplicating into
+	       x_, y_) above, so need to be protected from possible
+	       allocations in getAttrib and recursive calls to
+	       R_compute_identical in the loop. */
+	    PROTECT(ax);
+	    PROTECT(ay);
 	    for(elx = ax; elx != R_NilValue; elx = CDR(elx)) {
 		const char *tx = CHAR(PRINTNAME(TAG(elx)));
 		for(ely = ay; ely != R_NilValue; ely = CDR(ely))
@@ -133,36 +154,43 @@ R_compute_identical(SEXP x, SEXP y, int flags)
 			    PROTECT(atrx = getAttrib(x, R_RowNamesSymbol));
 			    PROTECT(atry = getAttrib(y, R_RowNamesSymbol));
 			    if(!R_compute_identical(atrx, atry, flags)) {
-				UNPROTECT(2);
+				UNPROTECT(4); /* atrx, atry, ax, ay */
 				return FALSE;
 			    } else
-				UNPROTECT(2);
+				UNPROTECT(2); /* atrx, atry */
 			} else
-			    if(!R_compute_identical(CAR(elx), CAR(ely), flags))
+			    if(!R_compute_identical(CAR(elx), CAR(ely),
+						    flags)) {
+				UNPROTECT(2); /* ax, ay */
 				return FALSE;
+			    }
 			break;
 		    }
-		if(ely == R_NilValue) return FALSE;
+		if(ely == R_NilValue) {
+		    UNPROTECT(2); /* ax, ay */
+		    return FALSE;
+		}
 	    }
+	    UNPROTECT(2); /* ax, ay */    
 	}
     }
     switch (TYPEOF(x)) {
     case NILSXP:
 	return TRUE;
     case LGLSXP:
-	if (xlength(x) != xlength(y)) return FALSE;
+	if (XLENGTH(x) != XLENGTH(y)) return FALSE;
 	/* Use memcmp (which is ISO C90) to speed up the comparison */
 	return memcmp((void *)LOGICAL(x), (void *)LOGICAL(y),
 		      xlength(x) * sizeof(int)) == 0 ? TRUE : FALSE;
     case INTSXP:
-	if (xlength(x) != xlength(y)) return FALSE;
+	if (XLENGTH(x) != XLENGTH(y)) return FALSE;
 	/* Use memcmp (which is ISO C90) to speed up the comparison */
 	return memcmp((void *)INTEGER(x), (void *)INTEGER(y),
 		      xlength(x) * sizeof(int)) == 0 ? TRUE : FALSE;
     case REALSXP:
     {
-	R_xlen_t n = xlength(x);
-	if(n != xlength(y)) return FALSE;
+	R_xlen_t n = XLENGTH(x);
+	if(n != XLENGTH(y)) return FALSE;
 	else {
 	    double *xp = REAL(x), *yp = REAL(y);
 	    int ne_strict = NUM_EQ | (SINGLE_NA << 1);
@@ -173,8 +201,8 @@ R_compute_identical(SEXP x, SEXP y, int flags)
     }
     case CPLXSXP:
     {
-	R_xlen_t n = xlength(x);
-	if(n != xlength(y)) return FALSE;
+	R_xlen_t n = XLENGTH(x);
+	if(n != XLENGTH(y)) return FALSE;
 	else {
 	    Rcomplex *xp = COMPLEX(x), *yp = COMPLEX(y);
 	    int ne_strict = NUM_EQ | (SINGLE_NA << 1);
@@ -187,8 +215,8 @@ R_compute_identical(SEXP x, SEXP y, int flags)
     }
     case STRSXP:
     {
-	R_xlen_t i, n = xlength(x);
-	if(n != xlength(y)) return FALSE;
+	R_xlen_t i, n = XLENGTH(x);
+	if(n != XLENGTH(y)) return FALSE;
 	for(i = 0; i < n; i++) {
 	    /* This special-casing for NAs is not needed */
 	    Rboolean na1 = (STRING_ELT(x, i) == NA_STRING),
@@ -207,8 +235,8 @@ R_compute_identical(SEXP x, SEXP y, int flags)
     case VECSXP:
     case EXPRSXP:
     {
-	R_xlen_t i, n = xlength(x);
-	if(n != xlength(y)) return FALSE;
+	R_xlen_t i, n = XLENGTH(x);
+	if(n != XLENGTH(y)) return FALSE;
 	for(i = 0; i < n; i++)
 	    if(!R_compute_identical(VECTOR_ELT(x, i),VECTOR_ELT(y, i), flags))
 		return FALSE;
@@ -230,26 +258,41 @@ R_compute_identical(SEXP x, SEXP y, int flags)
 	return(y == R_NilValue);
     }
     case CLOSXP:
-	return(R_compute_identical(FORMALS(x), FORMALS(y), flags) &&
-	       R_compute_identical(BODY_EXPR(x), BODY_EXPR(y), flags) &&
-	       (IGNORE_ENV || CLOENV(x) == CLOENV(y) ? TRUE : FALSE) &&
-	       (IGNORE_BYTECODE || R_compute_identical(BODY(x), BODY(y), flags))
-	       );
+    {
+	if(!R_compute_identical(FORMALS(x), FORMALS(y), flags)) return FALSE;
+	if(IGNORE_BYTECODE) {
+	    if(IGNORE_SRCREF) {
+		SEXP x_ = PROTECT(R_body_no_src(x)),
+		     y_ = PROTECT(R_body_no_src(y));
+		Rboolean id_body = R_compute_identical(x_, y_, flags);
+		UNPROTECT(2);
+		if(!id_body) return FALSE;
+	    } else if(!R_compute_identical(BODY_EXPR(x), BODY_EXPR(y), flags))
+		return FALSE;
+	} else { // !IGNORE_BYTECODE: use byte code for comparison of function bodies :
+	    if(!R_compute_identical(BODY(x), BODY(y), flags)) return FALSE;
+	}
+	// now, formals and body are equal, check the enviroment(.)s:
+	return (IGNORE_ENV || CLOENV(x) == CLOENV(y) ? TRUE : FALSE);
+    }
     case SPECIALSXP:
     case BUILTINSXP:
 	return(PRIMOFFSET(x) == PRIMOFFSET(y) ? TRUE : FALSE);
     case ENVSXP:
     case SYMSXP:
-    case WEAKREFSXP:
-    case BCODESXP: /**** is this the best approach? */
+    case WEAKREFSXP: /**** is this the best approach? */
 	return(x == y ? TRUE : FALSE);
+    case BCODESXP:
+	return R_compute_identical(BCODE_CODE(x), BCODE_CODE(y), flags) &&
+	       R_compute_identical(BCODE_EXPR(x), BCODE_EXPR(y), flags) &&
+	       R_compute_identical(BCODE_CONSTS(x), BCODE_CONSTS(y), flags);
     case EXTPTRSXP:
 	return (EXTPTR_PTR(x) == EXTPTR_PTR(y) ? TRUE : FALSE);
     case RAWSXP:
-	if (xlength(x) != xlength(y)) return FALSE;
+	if (XLENGTH(x) != XLENGTH(y)) return FALSE;
 	/* Use memcmp (which is ISO C90) to speed up the comparison */
 	return memcmp((void *)RAW(x), (void *)RAW(y),
-		      xlength(x) * sizeof(Rbyte)) == 0 ? TRUE : FALSE;
+		      XLENGTH(x) * sizeof(Rbyte)) == 0 ? TRUE : FALSE;
 
 /*  case PROMSXP: args are evaluated, so will not be seen */
 	/* test for equality of the substituted expression -- or should
@@ -257,7 +300,7 @@ R_compute_identical(SEXP x, SEXP y, int flags)
 	/*#define PREXPR(x)	((x)->u.promsxp.expr)
 	  #define PRENV(x)	((x)->u.promsxp.env)
 	  return(R_compute_identical(subsititute(PREXPR(x), PRENV(x),
-	                             flags),
+				     flags),
 	  subsititute(PREXPR(y), PRENV(y))));*/
     case S4SXP:
 	/* attributes already tested, so all slots identical */
diff --git a/src/main/inlined.c b/src/main/inlined.c
index e3b0d2a..deebbe2 100644
--- a/src/main/inlined.c
+++ b/src/main/inlined.c
@@ -14,7 +14,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  */
 
 #ifdef HAVE_CONFIG_H
diff --git a/src/main/inspect.c b/src/main/inspect.c
index 5026885..813a457 100644
--- a/src/main/inspect.c
+++ b/src/main/inspect.c
@@ -1,6 +1,6 @@
 /*
  *  R : A Computer Language for Statistical Data Analysis
- *  Copyright (C) 2009-2012 The R Core Team.
+ *  Copyright (C) 2009-2014 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
@@ -14,7 +14,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  */
 
 /* This is an experimental facility for printing low-level information
@@ -84,10 +84,10 @@ static void inspect_tree(int pre, SEXP v, int deep, int pvec) {
        It is invalid on 64-bit Windows.
     */
 #ifdef _WIN64
-    Rprintf("@%p %02d %s g%dc%d [", v, TYPEOF(v), typename(v), 
+    Rprintf("@%p %02d %s g%dc%d [", v, TYPEOF(v), typename(v),
 	    v->sxpinfo.gcgen, v->sxpinfo.gccls);
 #else
-    Rprintf("@%lx %02d %s g%dc%d [", (long) v, TYPEOF(v), typename(v), 
+    Rprintf("@%lx %02d %s g%dc%d [", (long) v, TYPEOF(v), typename(v),
 	    v->sxpinfo.gcgen, v->sxpinfo.gccls);
 #endif
     if (OBJECT(v)) { a = 1; Rprintf("OBJ"); }
@@ -103,9 +103,9 @@ static void inspect_tree(int pre, SEXP v, int deep, int pvec) {
     if (TYPEOF(v) == SYMSXP || TYPEOF(v) == LISTSXP) {
 	if (IS_ACTIVE_BINDING(v)) { if (a) Rprintf(","); Rprintf("AB"); a = 1; }
 	if (BINDING_IS_LOCKED(v)) { if (a) Rprintf(","); Rprintf("LCK"); a = 1; }
-    }    
+    }
     if (TYPEOF(v) == ENVSXP) {
-        if (FRAME_IS_LOCKED(v)) { if (a) Rprintf(","); Rprintf("LCK"); a = 1; }
+	if (FRAME_IS_LOCKED(v)) { if (a) Rprintf(","); Rprintf("LCK"); a = 1; }
 	if (IS_GLOBAL_FRAME(v)) { if (a) Rprintf(","); Rprintf("GL"); a = 1; }
     }
     if (LEVELS(v)) { if (a) Rprintf(","); Rprintf("gp=0x%x", LEVELS(v)); a = 1; }
@@ -119,7 +119,7 @@ static void inspect_tree(int pre, SEXP v, int deep, int pvec) {
     if (TYPEOF(v) == ENVSXP) /* NOTE: this is not a trivial OP since it involves looking up things
 				in the environment, so for a low-level debugging we may want to
 				avoid it .. */
-        PrintEnvironment(v);
+	PrintEnvironment(v);
     if (TYPEOF(v) == CHARSXP) {
 	if (IS_BYTES(v)) Rprintf("[bytes] ");
 	if (IS_LATIN1(v)) Rprintf("[latin1] ");
@@ -202,7 +202,7 @@ static void inspect_tree(int pre, SEXP v, int deep, int pvec) {
 			pp(pre + 2);
 			Rprintf("TAG: "); /* TAG should be a one-liner since it's a symbol so we don't put it on an extra line*/
 			inspect_tree(0, TAG(lc), deep - 1, pvec);
-		    }		  
+		    }
 		    inspect_tree(pre + 2, CAR(lc), deep - 1, pvec);
 		    lc = CDR(lc);
 		}
@@ -220,7 +220,7 @@ static void inspect_tree(int pre, SEXP v, int deep, int pvec) {
 		inspect_tree(pre+2, HASHTAB(v), deep - 1, pvec);
 	    }
 	    break;
-	    
+
 	case CLOSXP:
 	    pp(pre); Rprintf("FORMALS:\n");
 	    inspect_tree(pre+2, FORMALS(v), deep - 1, pvec);
@@ -230,7 +230,7 @@ static void inspect_tree(int pre, SEXP v, int deep, int pvec) {
 	    inspect_tree(pre+2, CLOENV(v), 0, pvec);
 	    break;
 	}
-    
+
     if (ATTRIB(v) && ATTRIB(v) != R_NilValue && TYPEOF(v) != CHARSXP) {
 	pp(pre); Rprintf("ATTRIB:\n"); inspect_tree(pre+2, ATTRIB(v), deep, pvec);
     }
@@ -240,6 +240,7 @@ static void inspect_tree(int pre, SEXP v, int deep, int pvec) {
    two optional arguments (deep and pvec - see above), positional argument
    matching only */
 SEXP attribute_hidden do_inspect(SEXP call, SEXP op, SEXP args, SEXP env) {
+    checkArity(op, args);
     SEXP obj = CAR(args);
     int deep = -1;
     int pvec = 5;
@@ -248,11 +249,23 @@ SEXP attribute_hidden do_inspect(SEXP call, SEXP op, SEXP args, SEXP env) {
 	if (CDDR(args) != R_NilValue)
 	    pvec = asInteger(CADDR(args));
     }
-	
+
     inspect_tree(0, CAR(args), deep, pvec);
     return obj;
 }
 
+SEXP attribute_hidden do_address(SEXP call, SEXP op, SEXP args, SEXP rho)
+{
+    checkArity(op, args);
+    return R_MakeExternalPtr((void *) CAR(args), R_NilValue, R_NilValue);
+}
+
+SEXP attribute_hidden do_refcnt(SEXP call, SEXP op, SEXP args, SEXP rho)
+{
+    checkArity(op, args);
+    return ScalarInteger(REFCNT(CAR(args)));
+}
+
 /* the following functions can be use internally and for debugging purposes -
    so far they are not used in any actual code */
 SEXP attribute_hidden R_inspect(SEXP x) {
diff --git a/src/main/internet.c b/src/main/internet.c
index 8b7a66c..741b6ce 100644
--- a/src/main/internet.c
+++ b/src/main/internet.c
@@ -1,6 +1,6 @@
 /*
  *  R : A Computer Language for Statistical Data Analysis
- *  Copyright (C) 2001-12   The R Core Team.
+ *  Copyright (C) 2001-2015   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
@@ -14,7 +14,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  */
 
 #ifdef HAVE_CONFIG_H
@@ -33,7 +33,7 @@ static R_InternetRoutines routines, *ptr = &routines;
 
 
 /*
-SEXP Rdownload(SEXP call, SEXP op, SEXP args, SEXP env);
+SEXP Rdownload(SEXP args);
 Rconnection R_newurl(char *description, char *mode);
 Rconnection R_newsock(char *host, int port, int server, char *mode, int timeout);
 
@@ -73,19 +73,10 @@ R_setInternetRoutines(R_InternetRoutines *routines)
     return(tmp);
 }
 
-#ifdef Win32
-extern Rboolean UseInternet2;
-#endif
-
 static void internet_Init(void)
 {
     int res;
-#ifdef Win32
-    res = UseInternet2 ? R_moduleCdynload("internet2", 1, 1) :
-	R_moduleCdynload("internet", 1, 1);
-#else
     res = R_moduleCdynload("internet", 1, 1);
-#endif
     initialized = -1;
     if(!res) return;
     if(!ptr->download)
@@ -105,38 +96,12 @@ SEXP Rdownload(SEXP args)
     }
 }
 
-#ifdef Win32
-SEXP attribute_hidden do_setInternet2(SEXP call, SEXP op, SEXP args, SEXP env)
-{
-    int newUseInternet2;
-    SEXP newval, retval;
-    
-    PROTECT(retval = ScalarLogical(UseInternet2));
-    
-    checkArity(op, args);
-    newval = CAR(args);
-    if (length(newval) != 1) error(_("bad value"));
-    newUseInternet2 = asLogical(newval);
-    
-    if (newUseInternet2 != NA_LOGICAL) {
-    	R_Visible = FALSE;
-    	if (newUseInternet2 != UseInternet2) {
-    	    if (initialized) warning(_("internet routines were already initialized"));
-    	    UseInternet2 = newUseInternet2;
-    	    initialized = 0;
-    	}
-    }
-    UNPROTECT(1);
-    return retval;
-}
-#endif
-
-Rconnection attribute_hidden R_newurl(const char *description,
-				      const char * const mode)
+Rconnection attribute_hidden 
+R_newurl(const char *description, const char * const mode, int type)
 {
     if(!initialized) internet_Init();
     if(initialized > 0)
-	return (*ptr->newurl)(description, mode);
+	return (*ptr->newurl)(description, mode, type);
     else {
 	error(_("internet routines cannot be loaded"));
 	return (Rconnection)0;
@@ -274,6 +239,7 @@ SEXP Rsockclose(SEXP ssock)
 {
     if (length(ssock) != 1) error("invalid 'socket' argument");
     int sock = asInteger(ssock);
+    if (sock <= 0) error(_("attempt to close invalid socket"));
     if(!initialized) internet_Init();
     if(initialized > 0)
 	(*ptr->sockclose)(&sock);
@@ -341,3 +307,53 @@ int Rsockselect(int nsock, int *insockfd, int *ready, int *write,
 	return 0;
     }
 }
+
+SEXP attribute_hidden do_curlVersion(SEXP call, SEXP op, SEXP args, SEXP rho)
+{
+    checkArity(op, args);
+    if(!initialized) internet_Init();
+    if(initialized > 0)
+	return (*ptr->curlVersion)(call, op, args, rho);
+    else {
+	error(_("internet routines cannot be loaded"));
+	return R_NilValue;
+    }
+}
+
+SEXP attribute_hidden do_curlGetHeaders(SEXP call, SEXP op, SEXP args, SEXP rho)
+{
+    checkArity(op, args);
+    if(!initialized) internet_Init();
+    if(initialized > 0)
+	return (*ptr->curlGetHeaders)(call, op, args, rho);
+    else {
+	error(_("internet routines cannot be loaded"));
+	return R_NilValue;
+    }
+}
+
+SEXP attribute_hidden do_curlDownload(SEXP call, SEXP op, SEXP args, SEXP rho)
+{
+    checkArity(op, args);
+    if(!initialized) internet_Init();
+    if(initialized > 0)
+	return (*ptr->curlDownload)(call, op, args, rho);
+    else {
+	error(_("internet routines cannot be loaded"));
+	return R_NilValue;
+    }
+}
+
+Rconnection attribute_hidden
+R_newCurlUrl(const char *description, const char * const mode, int type)
+{
+    if(!initialized) internet_Init();
+    if(initialized > 0)
+	return (*ptr->newcurlurl)(description, mode, type);
+    else {
+	error(_("internet routines cannot be loaded"));
+	return (Rconnection)0;
+    }
+    return (Rconnection)0; /* -Wall */
+}
+
diff --git a/src/main/iosupport.c b/src/main/iosupport.c
index 7ed8e7c..dcb1170 100644
--- a/src/main/iosupport.c
+++ b/src/main/iosupport.c
@@ -1,7 +1,7 @@
 /*
  *  R : A Computer Language for Statistical Data Analysis
  *  Copyright (C) 1995, 1996, 1997,  Robert Gentleman and Ross Ihaka
- *                2007-2013 The R Core Team
+ *                2007-2014 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
@@ -15,7 +15,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  *
  *
  *  I/O Support Code
diff --git a/src/main/lapack.c b/src/main/lapack.c
index c130752..c3b6e4a 100644
--- a/src/main/lapack.c
+++ b/src/main/lapack.c
@@ -14,7 +14,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  */
 
 #ifdef HAVE_CONFIG_H
diff --git a/src/main/list.c b/src/main/list.c
index 900c5a8..2774efe 100644
--- a/src/main/list.c
+++ b/src/main/list.c
@@ -15,7 +15,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  *
  *
  *
diff --git a/src/main/localecharset.c b/src/main/localecharset.c
index b9498e3..5dce18f 100644
--- a/src/main/localecharset.c
+++ b/src/main/localecharset.c
@@ -14,11 +14,11 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  */
 
 /*  This file was contributed by Ei-ji Nakama.
- *  It exports locale2charset for use in gram.y, and rlocale.c on MacOS X.
+ *  It exports locale2charset for use in gram.y, and rlocale.c on macOS.
  *  And sysutils.c, grDevices/src/devPS.c
  */
 
@@ -34,18 +34,17 @@
  *                                or                                 *
  *         cc -o localecharset -DDEBUG_TEST=2  localecharset.c       *
  *********************************************************************/
-#ifdef DEBUG_TEST
-#define SPRINT(x) printf("%6d:" #x "=%s\n", __LINE__, x)
-#define DPRINT(x) printf("%6d:" #x "=%d\n", __LINE__, x)
-#define HAVE_STRING_H
-#endif
-
-
 
 #ifdef HAVE_CONFIG_H
 # include <config.h>
 #endif
 
+#ifdef DEBUG_TEST
+#define SPRINT(x) printf("%6d:" #x "=%s\n", __LINE__, x)
+#define DPRINT(x) printf("%6d:" #x "=%d\n", __LINE__, x)
+//#define HAVE_STRING_H
+#endif
+
 #include <string.h>
 #include <memory.h>
 #include <locale.h>
@@ -509,7 +508,7 @@ static const name_value known[] = {
     {"euccn", "GB2312"},
     {"big5-hkscs", "BIG5-HKSCS"},
 #ifdef __APPLE__
-    /* known additional Apple encodings (see locale -a) up to Mac OS X 10.5,
+    /* known additional Apple encodings (see locale -a) up to macOS 10.5,
        unlike other systems they correspond directly */
     {"iso8859-1", "ISO8859-1"},
     {"iso8859-2", "ISO8859-2"},
@@ -704,7 +703,7 @@ const char *locale2charset(const char *locale)
     }
 
 #ifdef __APPLE__
-    /* on Mac OS X *all* real locales w/o encoding part are UTF-8 locales
+    /* on macOS *all* real locales w/o encoding part are UTF-8 locales
        (C and POSIX are virtual and taken care of previously) */
     return "UTF-8";
 #else
diff --git a/src/main/logic.c b/src/main/logic.c
index df2a0e4..3c62ac2 100644
--- a/src/main/logic.c
+++ b/src/main/logic.c
@@ -1,7 +1,7 @@
 /*
  *  R : A Computer Language for Statistical Data Analysis
  *  Copyright (C) 1995, 1996  Robert Gentleman and Ross Ihaka
- *  Copyright (C) 1999--2012  The R Core Team.
+ *  Copyright (C) 1999--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
@@ -15,7 +15,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  */
 
 #ifdef HAVE_CONFIG_H
@@ -24,9 +24,10 @@
 
 #include <Defn.h>
 #include <Internal.h>
+#include <R_ext/Itermacros.h>
 
 /* interval at which to check interrupts, a guess */
-#define NINTERRUPT 10000000
+// #define NINTERRUPT 10000000
 
 
 static SEXP lunary(SEXP, SEXP, SEXP);
@@ -38,72 +39,68 @@ static SEXP binaryLogic2(int code, SEXP s1, SEXP s2);
 /* & | ! */
 SEXP attribute_hidden do_logic(SEXP call, SEXP op, SEXP args, SEXP env)
 {
-    SEXP ans, arg1, arg2;
-    int argc;
-
-    if (args == R_NilValue)
-	argc = 0;
-    else if (CDR(args) == R_NilValue)
-	argc = 1;
-    else if (CDDR(args) == R_NilValue)
-	argc = 2;
-    else
-	argc = length(args);
-    arg1 = CAR(args);
-    arg2 = CADR(args);
-
-    if (ATTRIB(arg1) != R_NilValue || ATTRIB(arg2) != R_NilValue) {
-	if (DispatchGroup("Ops",call, op, args, env, &ans))
+    SEXP arg1 = CAR(args); //, arg2 = CADR(args)
+    Rboolean attr1 = ATTRIB(arg1) != R_NilValue;
+    if (attr1 || ATTRIB(CADR(args)) != R_NilValue) {
+	SEXP ans;
+	if (DispatchGroup("Ops", call, op, args, env, &ans))
 	    return ans;
     }
-    else if (argc == 1 && IS_SCALAR(arg1, LGLSXP)) {
-	/* directly handle '!' operator for simple logical scalars. */
-        int v = LOGICAL(arg1)[0];
-        return ScalarLogical(v == NA_LOGICAL ? v : ! v);
-    }
-
-    if (argc == 1)
+    /* The above did dispatch to valid S3/S4 methods, including those with
+     * "wrong" number of arguments.
+     * Now require binary calls to `&` and `|`  or unary calls to `!` : */
+    checkArity(op, args);
+
+    if (CDR(args) == R_NilValue) { // one argument  <==>  !(arg1)
+	if (!attr1 && IS_SCALAR(arg1, LGLSXP)) {
+	    /* directly handle '!' operator for simple logical scalars. */
+	    int v = LOGICAL(arg1)[0];
+	    return ScalarLogical(v == NA_LOGICAL ? v : ! v);
+	}
 	return lunary(call, op, arg1);
-    else if (argc == 2)
-	return lbinary(call, op, args);
-    else
-	error(_("binary operations require two arguments"));
-    return R_NilValue;	/* for -Wall */
+    }
+    // else : two arguments
+    return lbinary(call, op, args);
 }
 
 #define isRaw(x) (TYPEOF(x) == RAWSXP)
 static SEXP lbinary(SEXP call, SEXP op, SEXP args)
 {
 /* logical binary : "&" or "|" */
-    SEXP x, y, dims, tsp, klass, xnames, ynames;
-    R_xlen_t mismatch, nx, ny;
-    int xarray, yarray, xts, yts;
-    mismatch = 0;
-    x = CAR(args);
-    y = CADR(args);
+    SEXP
+	x = CAR(args),
+	y = CADR(args);
+
     if (isRaw(x) && isRaw(y)) {
     }
-    else if (!isNumber(x) || !isNumber(y))
-    	errorcall(call,
-    		  _("operations are possible only for numeric, logical or complex types"));
-    tsp = R_NilValue;		/* -Wall */
-    klass = R_NilValue;		/* -Wall */
-    xarray = isArray(x);
-    yarray = isArray(y);
-    xts = isTs(x);
-    yts = isTs(y);
+    else if ( !(isNull(x) || isNumber(x)) ||
+	      !(isNull(y) || isNumber(y)) )
+	errorcall(call,
+		  _("operations are possible only for numeric, logical or complex types"));
+
+    R_xlen_t
+	nx = xlength(x),
+	ny = xlength(y);
+    Rboolean
+	xarray = isArray(x),
+	yarray = isArray(y),
+	xts = isTs(x),
+	yts = isTs(y);
+    SEXP dims, xnames, ynames;
     if (xarray || yarray) {
 	if (xarray && yarray) {
 	    if (!conformable(x, y))
-		error(_("binary operation on non-conformable arrays"));
+		errorcall(call, _("non-conformable arrays"));
 	    PROTECT(dims = getAttrib(x, R_DimSymbol));
 	}
-	else if (xarray) {
+	else if (xarray && (ny != 0 || nx == 0)) {
 	    PROTECT(dims = getAttrib(x, R_DimSymbol));
 	}
-	else /*(yarray)*/ {
+	else if (yarray && (nx != 0 || ny == 0)) {
 	    PROTECT(dims = getAttrib(y, R_DimSymbol));
-	}
+	} else
+	    PROTECT(dims = R_NilValue);
+
 	PROTECT(xnames = getAttrib(x, R_DimNamesSymbol));
 	PROTECT(ynames = getAttrib(y, R_DimNamesSymbol));
     }
@@ -112,12 +109,8 @@ static SEXP lbinary(SEXP call, SEXP op, SEXP args)
 	PROTECT(xnames = getAttrib(x, R_NamesSymbol));
 	PROTECT(ynames = getAttrib(y, R_NamesSymbol));
     }
-    nx = XLENGTH(x);
-    ny = XLENGTH(y);
-    if(nx > 0 && ny > 0) {
-	if(nx > ny) mismatch = nx % ny;
-	else mismatch = ny % nx;
-    }
+
+    SEXP klass = NULL, tsp = NULL; // -Wall
     if (xts || yts) {
 	if (xts && yts) {
 	    if (!tsConform(x, y))
@@ -126,34 +119,42 @@ static SEXP lbinary(SEXP call, SEXP op, SEXP args)
 	    PROTECT(klass = getAttrib(x, R_ClassSymbol));
 	}
 	else if (xts) {
-	    if (XLENGTH(x) < XLENGTH(y))
+	    if (nx < ny)
 		ErrorMessage(call, ERROR_TSVEC_MISMATCH);
 	    PROTECT(tsp = getAttrib(x, R_TspSymbol));
 	    PROTECT(klass = getAttrib(x, R_ClassSymbol));
 	}
 	else /*(yts)*/ {
-	    if (XLENGTH(y) < XLENGTH(x))
+	    if (ny < nx)
 		ErrorMessage(call, ERROR_TSVEC_MISMATCH);
 	    PROTECT(tsp = getAttrib(y, R_TspSymbol));
 	    PROTECT(klass = getAttrib(y, R_ClassSymbol));
 	}
     }
-    if(mismatch)
+  if (nx > 0 && ny > 0) {
+	if(((nx > ny) ? nx % ny : ny % nx) != 0) // mismatch
 	warningcall(call,
 		    _("longer object length is not a multiple of shorter object length"));
 
     if (isRaw(x) && isRaw(y)) {
-	PROTECT(x = binaryLogic2(PRIMVAL(op), x, y));
-    } else {
-	if (!isNumber(x) || !isNumber(y))
-	    errorcall(call,
-		      _("operations are possible only for numeric, logical or complex types"));
-	x = SETCAR(args, coerceVector(x, LGLSXP));
-	y = SETCADR(args, coerceVector(y, LGLSXP));
-	PROTECT(x = binaryLogic(PRIMVAL(op), x, y));
+	x = binaryLogic2(PRIMVAL(op), x, y);
     }
+    else {
+	if(isNull(x))
+	    x = SETCAR(args, allocVector(LGLSXP, 0));
+	else // isNumeric(x)
+	    x = SETCAR(args, coerceVector(x, LGLSXP));
+	if(isNull(y))
+	    y = SETCAR(args, allocVector(LGLSXP, 0));
+	else // isNumeric(y)
+	    y = SETCADR(args, coerceVector(y, LGLSXP));
+	x = binaryLogic(PRIMVAL(op), x, y);
+    }
+  } else { // nx == 0 || ny == 0
+	x = allocVector(LGLSXP, 0);
+  }
 
-
+    PROTECT(x);
     if (dims != R_NilValue) {
 	setAttrib(x, R_DimSymbol, dims);
 	if(xnames != R_NilValue)
@@ -162,9 +163,9 @@ static SEXP lbinary(SEXP call, SEXP op, SEXP args)
 	    setAttrib(x, R_DimNamesSymbol, ynames);
     }
     else {
-	if(XLENGTH(x) == XLENGTH(xnames))
+	if(xnames != R_NilValue && XLENGTH(x) == XLENGTH(xnames))
 	    setAttrib(x, R_NamesSymbol, xnames);
-	else if(XLENGTH(x) == XLENGTH(ynames))
+	else if(ynames != R_NilValue && XLENGTH(x) == XLENGTH(ynames))
 	    setAttrib(x, R_NamesSymbol, ynames);
     }
 
@@ -189,7 +190,8 @@ static SEXP lunary(SEXP call, SEXP op, SEXP arg)
 	errorcall(call, _("invalid argument type"));
     }
     if (isLogical(arg) || isRaw(arg))
-	x = PROTECT(duplicate(arg));  // copy all attributes in this case 
+	// copy all attributes in this case
+	x = PROTECT(shallow_duplicate(arg));
     else {
 	x = PROTECT(allocVector(isRaw(arg) ? RAWSXP : LGLSXP, len));
 	PROTECT(names = getAttrib(arg, R_NamesSymbol));
@@ -297,7 +299,7 @@ SEXP attribute_hidden do_logic2(SEXP call, SEXP op, SEXP args, SEXP env)
 
 static SEXP binaryLogic(int code, SEXP s1, SEXP s2)
 {
-    R_xlen_t i, n, n1, n2;
+    R_xlen_t i, n, n1, n2, i1, i2;
     int x1, x2;
     SEXP ans;
 
@@ -312,30 +314,30 @@ static SEXP binaryLogic(int code, SEXP s1, SEXP s2)
 
     switch (code) {
     case 1:		/* & : AND */
-	for (i = 0; i < n; i++) {
+	MOD_ITERATE2(n, n1, n2, i, i1, i2, {
 //	    if ((i+1) % NINTERRUPT == 0) R_CheckUserInterrupt();
-	    x1 = LOGICAL(s1)[i % n1];
-	    x2 = LOGICAL(s2)[i % n2];
+	    x1 = LOGICAL(s1)[i1];
+	    x2 = LOGICAL(s2)[i2];
 	    if (x1 == 0 || x2 == 0)
 		LOGICAL(ans)[i] = 0;
 	    else if (x1 == NA_LOGICAL || x2 == NA_LOGICAL)
 		LOGICAL(ans)[i] = NA_LOGICAL;
 	    else
 		LOGICAL(ans)[i] = 1;
-	}
+	});
 	break;
     case 2:		/* | : OR */
-	for (i = 0; i < n; i++) {
+	MOD_ITERATE2(n, n1, n2, i, i1, i2, {
 //	    if ((i+1) % NINTERRUPT == 0) R_CheckUserInterrupt();
-	    x1 = LOGICAL(s1)[i % n1];
-	    x2 = LOGICAL(s2)[i % n2];
+	    x1 = LOGICAL(s1)[i1];
+	    x2 = LOGICAL(s2)[i2];
 	    if ((x1 != NA_LOGICAL && x1) || (x2 != NA_LOGICAL && x2))
 		LOGICAL(ans)[i] = 1;
 	    else if (x1 == 0 && x2 == 0)
 		LOGICAL(ans)[i] = 0;
 	    else
 		LOGICAL(ans)[i] = NA_LOGICAL;
-	}
+	});
 	break;
     case 3:
 	error(_("Unary operator `!' called with two arguments"));
@@ -346,7 +348,7 @@ static SEXP binaryLogic(int code, SEXP s1, SEXP s2)
 
 static SEXP binaryLogic2(int code, SEXP s1, SEXP s2)
 {
-    R_xlen_t i, n, n1, n2;
+    R_xlen_t i, n, n1, n2, i1, i2;
     Rbyte x1, x2;
     SEXP ans;
 
@@ -361,20 +363,20 @@ static SEXP binaryLogic2(int code, SEXP s1, SEXP s2)
 
     switch (code) {
     case 1:		/* & : AND */
-	for (i = 0; i < n; i++) {
+	MOD_ITERATE2(n, n1, n2, i, i1, i2, {
 //	    if ((i+1) % NINTERRUPT == 0) R_CheckUserInterrupt();
-	    x1 = RAW(s1)[i % n1];
-	    x2 = RAW(s2)[i % n2];
+	    x1 = RAW(s1)[i1];
+	    x2 = RAW(s2)[i2];
 	    RAW(ans)[i] = x1 & x2;
-	}
+	});
 	break;
     case 2:		/* | : OR */
-	for (i = 0; i < n; i++) {
+	MOD_ITERATE2(n, n1, n2, i, i1, i2, {
 //	    if ((i+1) % NINTERRUPT == 0) R_CheckUserInterrupt();
-	    x1 = RAW(s1)[i % n1];
-	    x2 = RAW(s2)[i % n2];
+	    x1 = RAW(s1)[i1];
+	    x2 = RAW(s2)[i2];
 	    RAW(ans)[i] = x1 | x2;
-	}
+	});
 	break;
     }
     return ans;
@@ -389,25 +391,23 @@ static int checkValues(int op, int na_rm, int *x, R_xlen_t n)
     int has_na = 0;
     for (i = 0; i < n; i++) {
 //	if ((i+1) % NINTERRUPT == 0) R_CheckUserInterrupt();
-        if (!na_rm && x[i] == NA_LOGICAL) has_na = 1;
-        else {
-            if (x[i] == TRUE && op == _OP_ANY) return TRUE;
-            if (x[i] == FALSE && op == _OP_ALL) return FALSE;
-        }
+	if (!na_rm && x[i] == NA_LOGICAL) has_na = 1;
+	else {
+	    if (x[i] == TRUE && op == _OP_ANY) return TRUE;
+	    if (x[i] == FALSE && op == _OP_ALL) return FALSE;
+	}
     }
     switch (op) {
     case _OP_ANY:
-        return has_na ? NA_LOGICAL : FALSE;
+	return has_na ? NA_LOGICAL : FALSE;
     case _OP_ALL:
-        return has_na ? NA_LOGICAL : TRUE;
+	return has_na ? NA_LOGICAL : TRUE;
     default:
-        error("bad op value for do_logic3");
+	error("bad op value for do_logic3");
     }
     return NA_LOGICAL; /* -Wall */
 }
 
-extern SEXP fixup_NaRm(SEXP args); /* summary.c */
-
 /* all, any */
 SEXP attribute_hidden do_logic3(SEXP call, SEXP op, SEXP args, SEXP env)
 {
@@ -420,7 +420,7 @@ SEXP attribute_hidden do_logic3(SEXP call, SEXP op, SEXP args, SEXP env)
     Rboolean val = PRIMVAL(op) == _OP_ALL ? TRUE : FALSE;
 
     PROTECT(args = fixup_NaRm(args));
-    PROTECT(call2 = duplicate(call));
+    PROTECT(call2 = shallow_duplicate(call));
     SETCDR(call2, args);
 
     if (DispatchGroup("Summary", call2, op, args, env, &ans)) {
@@ -450,13 +450,13 @@ SEXP attribute_hidden do_logic3(SEXP call, SEXP op, SEXP args, SEXP env)
 	    t = coerceVector(t, LGLSXP);
 	}
 	val = checkValues(PRIMVAL(op), narm, LOGICAL(t), XLENGTH(t));
-        if (val != NA_LOGICAL) {
-            if ((PRIMVAL(op) == _OP_ANY && val)
-                || (PRIMVAL(op) == _OP_ALL && !val)) {
-                has_na = 0;
-                break;
-            }
-        } else has_na = 1;
+	if (val != NA_LOGICAL) {
+	    if ((PRIMVAL(op) == _OP_ANY && val)
+		|| (PRIMVAL(op) == _OP_ALL && !val)) {
+		has_na = 0;
+		break;
+	    }
+	} else has_na = 1;
     }
     UNPROTECT(2);
     return has_na ? ScalarLogical(NA_LOGICAL) : ScalarLogical(val);
diff --git a/src/main/main.c b/src/main/main.c
index 84a7efe..3de8e04 100644
--- a/src/main/main.c
+++ b/src/main/main.c
@@ -1,7 +1,7 @@
 /*
  *  R : A Computer Language for Statistical Data Analysis
  *  Copyright (C) 1995, 1996  Robert Gentleman and Ross Ihaka
- *  Copyright (C) 1998-2014   The R Core Team
+ *  Copyright (C) 1998-2015   The R Core Team
  *  Copyright (C) 2002-2005  The R Foundation
  *
  *  This program is free software; you can redistribute it and/or modify
@@ -16,7 +16,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  */
 
 #ifdef HAVE_CONFIG_H
@@ -73,8 +73,6 @@ void Rf_callToplevelHandlers(SEXP expr, SEXP value, Rboolean succeeded,
 static int ParseBrowser(SEXP, SEXP);
 
 
-extern void InitDynload(void);
-
 	/* Read-Eval-Print Loop [ =: REPL = repl ] with input from a file */
 
 static void R_ReplFile(FILE *fp, SEXP rho)
@@ -82,9 +80,9 @@ static void R_ReplFile(FILE *fp, SEXP rho)
     ParseStatus status;
     int count=0;
     int savestack;
-    
+
     R_InitSrcRefState();
-    savestack = R_PPStackTop;    
+    savestack = R_PPStackTop;
     for(;;) {
 	R_PPStackTop = savestack;
 	R_CurrentExpr = R_Parse1File(fp, 1, &status);
@@ -224,7 +222,7 @@ Rf_ReplIteration(SEXP rho, int savestack, int browselevel, R_ReplState *state)
 
     R_PPStackTop = savestack;
     R_CurrentExpr = R_Parse1Buffer(&R_ConsoleIob, 0, &state->status);
-    
+
     switch(state->status) {
 
     case PARSE_NULL:
@@ -248,16 +246,16 @@ Rf_ReplIteration(SEXP rho, int savestack, int browselevel, R_ReplState *state)
 		R_IoBufferWriteReset(&R_ConsoleIob);
 		return 0;
 	    }
-	    /* PR#15770 We don't want to step into expressions entered at the debug prompt. 
+	    /* PR#15770 We don't want to step into expressions entered at the debug prompt.
 	       The 'S' will be changed back to 's' after the next eval. */
-	    if (R_BrowserLastCommand == 's') R_BrowserLastCommand = 'S';  
+	    if (R_BrowserLastCommand == 's') R_BrowserLastCommand = 'S';
 	}
 	R_Visible = FALSE;
 	R_EvalDepth = 0;
 	resetTimeLimits();
 	PROTECT(thisExpr = R_CurrentExpr);
 	R_Busy(1);
-	value = eval(thisExpr, rho);
+	PROTECT(value = eval(thisExpr, rho));
 	SET_SYMVALUE(R_LastvalueSymbol, value);
 	wasDisplayed = R_Visible;
 	if (R_Visible)
@@ -266,8 +264,8 @@ Rf_ReplIteration(SEXP rho, int savestack, int browselevel, R_ReplState *state)
 	    PrintWarnings();
 	Rf_callToplevelHandlers(thisExpr, value, TRUE, wasDisplayed);
 	R_CurrentExpr = value; /* Necessary? Doubt it. */
-	UNPROTECT(1);
-	if (R_BrowserLastCommand == 'S') R_BrowserLastCommand = 's';  
+	UNPROTECT(2); /* thisExpr, value */
+	if (R_BrowserLastCommand == 'S') R_BrowserLastCommand = 's';
 	R_IoBufferWriteReset(&R_ConsoleIob);
 	state->prompt_type = 1;
 	return(1);
@@ -308,17 +306,44 @@ static void R_ReplConsole(SEXP rho, int savestack, int browselevel)
 	REprintf(" >R_ReplConsole(): before \"for(;;)\" {main.c}\n");
     for(;;) {
 	status = Rf_ReplIteration(rho, savestack, browselevel, &state);
-	if(status < 0)
+	if(status < 0) {
+	  if (state.status == PARSE_INCOMPLETE)
+	    error(_("unexpected end of input"));
 	  return;
+	}
     }
 }
 
 
 static unsigned char DLLbuf[CONSOLE_BUFFER_SIZE+1], *DLLbufp;
 
+static void check_session_exit()
+{
+    if (! R_Interactive) {
+	/* This funtion will be called again after a LONGJMP if an
+	   error is signaled from one of the functions called. The
+	   'exiting' variable identifies this and results in
+	   R_Suicide. */
+	static Rboolean exiting = FALSE;
+	if (exiting)
+	    R_Suicide(_("error during cleanup\n"));
+	else {
+	    exiting = TRUE;
+	    if (GetOption1(install("error")) != R_NilValue) {
+		exiting = FALSE;
+		return;
+	    }
+	    REprintf(_("Execution halted\n"));
+	    R_CleanUp(SA_NOSAVE, 1, 0); /* quit, no save, no .Last, status=1 */
+	}
+	
+    }
+}
+
 void R_ReplDLLinit(void)
 {
-    SETJMP(R_Toplevel.cjmpbuf);
+    if (SETJMP(R_Toplevel.cjmpbuf))
+	check_session_exit();
     R_GlobalContext = R_ToplevelContext = R_SessionContext = &R_Toplevel;
     R_IoBufferWriteReset(&R_ConsoleIob);
     prompt_type = 1;
@@ -410,6 +435,7 @@ static RETSIGTYPE handleInterrupt(int dummy)
  */
 
 #ifndef Win32
+// controlled by the internal http server in the internet module
 int R_ignore_SIGPIPE = 0;
 
 static RETSIGTYPE handlePipe(int dummy)
@@ -460,7 +486,6 @@ static void win32_segv(int signum)
    2005-12-17 BDR */
 
 static unsigned char ConsoleBuf[CONSOLE_BUFFER_SIZE];
-extern void R_CleanTempDir(void);
 
 static void sigactionSegv(int signum, siginfo_t *ip, void *context)
 {
@@ -529,12 +554,12 @@ static void sigactionSegv(int signum, siginfo_t *ip, void *context)
 		s = "invalid alignment";
 		break;
 #endif
-#ifdef BUS_ADRERR /* not on MacOS X, apparently */
+#ifdef BUS_ADRERR /* not on macOS, apparently */
 	    case BUS_ADRERR:
 		s = "non-existent physical address";
 		break;
 #endif
-#ifdef BUS_OBJERR /* not on MacOS X, apparently */
+#ifdef BUS_OBJERR /* not on macOS, apparently */
 	    case BUS_OBJERR:
 		s = "object specific hardware error";
 		break;
@@ -592,8 +617,10 @@ static void sigactionSegv(int signum, siginfo_t *ip, void *context)
 		if(ConsoleBuf[0] == '4') R_CleanUp(SA_SAVE, 71, 0);
 	    }
 	}
+	REprintf("R is aborting now ...\n");
     }
-    REprintf("aborting ...\n");
+    else // non-interactively :
+	REprintf("An irrecoverable exception occurred. R is aborting now ...\n");
     R_CleanTempDir();
     /* now do normal behaviour, e.g. core dump */
     signal(signum, SIG_DFL);
@@ -660,7 +687,9 @@ static void R_LoadProfile(FILE *fparg, SEXP env)
 {
     FILE * volatile fp = fparg; /* is this needed? */
     if (fp != NULL) {
-	if (! SETJMP(R_Toplevel.cjmpbuf)) {
+	if (SETJMP(R_Toplevel.cjmpbuf))
+	    check_session_exit();
+	else {
 	    R_GlobalContext = R_ToplevelContext = R_SessionContext = &R_Toplevel;
 	    R_ReplFile(fp, env);
 	}
@@ -671,8 +700,6 @@ static void R_LoadProfile(FILE *fparg, SEXP env)
 
 int R_SignalHandlers = 1;  /* Exposed in R_interface.h */
 
-unsigned int TimeToSeed(void); // times.c
-
 const char* get_workspace_name();  /* from startup.c */
 
 void attribute_hidden BindDomain(char *R_Home)
@@ -703,7 +730,7 @@ void setup_Rmainloop(void)
     /* In case this is a silly limit: 2^32 -3 has been seen and
      * casting to intptr_r relies on this being smaller than 2^31 on a
      * 32-bit platform. */
-    if(R_CStackLimit > 100000000U) 
+    if(R_CStackLimit > 100000000U)
 	R_CStackLimit = (uintptr_t)-1;
     /* make sure we have enough head room to handle errors */
     if(R_CStackLimit != -1)
@@ -719,7 +746,7 @@ void setup_Rmainloop(void)
 	char *p, Rlocale[1000]; /* Windows' locales can be very long */
 	p = getenv("LC_ALL");
 	strncpy(Rlocale, p ? p : "", 1000);
-        Rlocale[1000 - 1] = '\0';
+	Rlocale[1000 - 1] = '\0';
 	if(!(p = getenv("LC_CTYPE"))) p = Rlocale;
 	/* We'd like to use warning, but need to defer.
 	   Also cannot translate. */
@@ -791,14 +818,17 @@ void setup_Rmainloop(void)
     InitTempDir(); /* must be before InitEd */
     InitMemory();
     InitStringHash(); /* must be before InitNames */
-    InitNames();
     InitBaseEnv();
+    InitNames(); /* must be after InitBaseEnv to use R_EmptyEnv */
     InitGlobalEnv();
     InitDynload();
     InitOptions();
     InitEd();
     InitGraphics();
-    
+    InitTypeTables(); /* must be before InitS3DefaultTypes */
+    InitS3DefaultTypes();
+    PrintDefaults();
+
     R_Is_Running = 1;
     R_check_locale();
 
@@ -809,6 +839,7 @@ void setup_Rmainloop(void)
     R_Toplevel.nextcontext = NULL;
     R_Toplevel.callflag = CTXT_TOPLEVEL;
     R_Toplevel.cstacktop = 0;
+    R_Toplevel.gcenabled = R_GCEnabled;
     R_Toplevel.promargs = R_NilValue;
     R_Toplevel.callfun = R_NilValue;
     R_Toplevel.call = R_NilValue;
@@ -821,11 +852,17 @@ void setup_Rmainloop(void)
     R_Toplevel.intstack = R_BCIntStackTop;
 #endif
     R_Toplevel.cend = NULL;
+    R_Toplevel.cenddata = NULL;
     R_Toplevel.intsusp = FALSE;
     R_Toplevel.handlerstack = R_HandlerStack;
     R_Toplevel.restartstack = R_RestartStack;
     R_Toplevel.srcref = R_NilValue;
+    R_Toplevel.prstack = NULL;
+    R_Toplevel.returnValue = NULL;
+    R_Toplevel.evaldepth = 0;
+    R_Toplevel.browserfinish = 0;
     R_GlobalContext = R_ToplevelContext = R_SessionContext = &R_Toplevel;
+    R_ExitContext = NULL;
 
     R_Warnings = R_NilValue;
 
@@ -851,7 +888,8 @@ void setup_Rmainloop(void)
 	R_Suicide(_("unable to open the base package\n"));
 
     doneit = 0;
-    SETJMP(R_Toplevel.cjmpbuf);
+    if (SETJMP(R_Toplevel.cjmpbuf))
+	check_session_exit();
     R_GlobalContext = R_ToplevelContext = R_SessionContext = &R_Toplevel;
     if (R_SignalHandlers) init_signal_handlers();
     if (!doneit) {
@@ -875,12 +913,13 @@ void setup_Rmainloop(void)
 #endif
     /* At least temporarily unlock some bindings used in graphics */
     R_unLockBinding(R_DeviceSymbol, R_BaseEnv);
-    R_unLockBinding(install(".Devices"), R_BaseEnv);
+    R_unLockBinding(R_DevicesSymbol, R_BaseEnv);
     R_unLockBinding(install(".Library.site"), R_BaseEnv);
 
     /* require(methods) if it is in the default packages */
     doneit = 0;
-    SETJMP(R_Toplevel.cjmpbuf);
+    if (SETJMP(R_Toplevel.cjmpbuf))
+	check_session_exit();
     R_GlobalContext = R_ToplevelContext = R_SessionContext = &R_Toplevel;
     if (!doneit) {
 	doneit = 1;
@@ -906,7 +945,7 @@ void setup_Rmainloop(void)
      * the copyleft.
      */
     if(!R_Quiet) PrintGreeting();
- 
+
     R_LoadProfile(R_OpenSiteFile(), baseEnv);
     R_LockBinding(install(".Library.site"), R_BaseEnv);
     R_LoadProfile(R_OpenInitFile(), R_GlobalEnv);
@@ -918,24 +957,28 @@ void setup_Rmainloop(void)
        or dropped on the application.
     */
     doneit = 0;
-    SETJMP(R_Toplevel.cjmpbuf);
+    if (SETJMP(R_Toplevel.cjmpbuf))
+	check_session_exit();
     R_GlobalContext = R_ToplevelContext = R_SessionContext = &R_Toplevel;
     if (!doneit) {
 	doneit = 1;
 	R_InitialData();
     }
     else {
-    	if (! SETJMP(R_Toplevel.cjmpbuf)) {
-	    warning(_("unable to restore saved data in %s\n"), get_workspace_name());
+	if (SETJMP(R_Toplevel.cjmpbuf))
+	    check_session_exit();
+	else {
+    	    warning(_("unable to restore saved data in %s\n"), get_workspace_name());
 	}
     }
-    
+
     /* Initial Loading is done.
        At this point we try to invoke the .First Function.
        If there is an error we continue. */
 
     doneit = 0;
-    SETJMP(R_Toplevel.cjmpbuf);
+    if (SETJMP(R_Toplevel.cjmpbuf))
+	check_session_exit();
     R_GlobalContext = R_ToplevelContext = R_SessionContext = &R_Toplevel;
     if (!doneit) {
 	doneit = 1;
@@ -953,7 +996,8 @@ void setup_Rmainloop(void)
        If there is an error we continue. */
 
     doneit = 0;
-    SETJMP(R_Toplevel.cjmpbuf);
+    if (SETJMP(R_Toplevel.cjmpbuf))
+	check_session_exit();
     R_GlobalContext = R_ToplevelContext = R_SessionContext = &R_Toplevel;
     if (!doneit) {
 	doneit = 1;
@@ -976,9 +1020,20 @@ void setup_Rmainloop(void)
 	REprintf(_("During startup - "));
 	PrintWarnings();
     }
+    if(R_Verbose)
+	REprintf(" ending setup_Rmainloop(): R_Interactive = %d {main.c}\n",
+		 R_Interactive);
 
     /* trying to do this earlier seems to run into bootstrapping issues. */
-    R_init_jit_enabled();
+    doneit = 0;
+    if (SETJMP(R_Toplevel.cjmpbuf))
+	check_session_exit();
+    R_GlobalContext = R_ToplevelContext = R_SessionContext = &R_Toplevel;
+    if (!doneit) {
+	doneit = 1;
+	R_init_jit_enabled();
+    } else
+	R_Suicide(_("unable to initialize the JIT\n"));
     R_Is_Running = 2;
 }
 
@@ -998,7 +1053,8 @@ void run_Rmainloop(void)
 {
     /* Here is the real R read-eval-loop. */
     /* We handle the console until end-of-file. */
-    SETJMP(R_Toplevel.cjmpbuf);
+    if (SETJMP(R_Toplevel.cjmpbuf))
+	check_session_exit();
     R_GlobalContext = R_ToplevelContext = R_SessionContext = &R_Toplevel;
     R_ReplConsole(R_GlobalEnv, 0, 0);
     end_Rmainloop(); /* must go here */
@@ -1052,11 +1108,11 @@ static int ParseBrowser(SEXP CExpr, SEXP rho)
 	} else if (!strcmp(expr, "f")) {
 	    rval = 1;
 	    RCNTXT *cntxt = R_GlobalContext;
-	    while (cntxt != R_ToplevelContext 
+	    while (cntxt != R_ToplevelContext
 		      && !(cntxt->callflag & (CTXT_RETURN | CTXT_LOOP))) {
 		cntxt = cntxt->nextcontext;
 	    }
-	    cntxt->browserfinish = 1;	    
+	    cntxt->browserfinish = 1;
 	    SET_RDEBUG(rho, 1);
 	    R_BrowserLastCommand = 'f';
 	} else if (!strcmp(expr, "help")) {
@@ -1068,14 +1124,6 @@ static int ParseBrowser(SEXP CExpr, SEXP rho)
 	    R_BrowserLastCommand = 'n';
 	} else if (!strcmp(expr, "Q")) {
 
-	    /* Run onexit/cend code for everything above the target.
-	       The browser context is still on the stack, so any error
-	       will drop us back to the current browser.  Not clear
-	       this is a good thing.  Also not clear this should still
-	       be here now that jump_to_toplevel is used for the
-	       jump. */
-	    R_run_onexits(R_ToplevelContext);
-
 	    /* this is really dynamic state that should be managed as such */
 	    SET_RDEBUG(rho, 0); /*PR#1721*/
 
@@ -1083,32 +1131,56 @@ static int ParseBrowser(SEXP CExpr, SEXP rho)
 	} else if (!strcmp(expr, "s")) {
 	    rval = 1;
 	    SET_RDEBUG(rho, 1);
-	    R_BrowserLastCommand = 's';	    
+	    R_BrowserLastCommand = 's';
 	} else if (!strcmp(expr, "where")) {
 	    rval = 2;
 	    printwhere();
 	    /* SET_RDEBUG(rho, 1); */
+	} else if (!strcmp(expr, "r")) {
+	    SEXP hooksym = install(".tryResumeInterrupt");
+	    if (SYMVALUE(hooksym) != R_UnboundValue) {
+		SEXP hcall;
+		R_Busy(1);
+		PROTECT(hcall = LCONS(hooksym, R_NilValue));
+		eval(hcall, R_GlobalEnv);
+		UNPROTECT(1);
+	    }
 	}
     }
+
     return rval;
 }
 
+/* There's another copy of this in eval.c */
+static void PrintCall(SEXP call, SEXP rho)
+{
+    int old_bl = R_BrowseLines,
+	blines = asInteger(GetOption1(install("deparse.max.lines")));
+    if(blines != NA_INTEGER && blines > 0)
+	R_BrowseLines = blines;
+    PrintValueRec(call, rho);
+    R_BrowseLines = old_bl;
+}
 
-/* browser(text = "", condition = NULL, expr = TRUE, skipCalls = 0L) */
+/* browser(text = "", condition = NULL, expr = TRUE, skipCalls = 0L)
+ * ------- but also called from ./eval.c */
 SEXP attribute_hidden do_browser(SEXP call, SEXP op, SEXP args, SEXP rho)
 {
     RCNTXT *saveToplevelContext;
     RCNTXT *saveGlobalContext;
     RCNTXT thiscontext, returncontext, *cptr;
-    int savestack, browselevel, tmp;
+    int savestack, browselevel;
     SEXP ap, topExp, argList;
 
+    /* Cannot call checkArity(op, args), because "op" may be a closure  */
+    /* or a primitive other than "browser".  */
+
     /* argument matching */
     PROTECT(ap = list4(R_NilValue, R_NilValue, R_NilValue, R_NilValue));
     SET_TAG(ap,  install("text"));
     SET_TAG(CDR(ap), install("condition"));
     SET_TAG(CDDR(ap), install("expr"));
-    SET_TAG(CDR(CDDR(ap)), install("skipCalls"));
+    SET_TAG(CDDDR(ap), install("skipCalls"));
     argList = matchArgs(ap, args, call);
     UNPROTECT(1);
     PROTECT(argList);
@@ -1117,15 +1189,15 @@ SEXP attribute_hidden do_browser(SEXP call, SEXP op, SEXP args, SEXP rho)
 	SETCAR(argList, mkString(""));
     if(CADR(argList) == R_MissingArg)
 	SETCAR(CDR(argList), R_NilValue);
-    if(CADDR(argList) == R_MissingArg) 
+    if(CADDR(argList) == R_MissingArg)
 	SETCAR(CDDR(argList), ScalarLogical(1));
-    if(CADDDR(argList) == R_MissingArg) 
-	SETCAR(CDR(CDDR(argList)), ScalarInteger(0));
+    if(CADDDR(argList) == R_MissingArg)
+	SETCAR(CDDDR(argList), ScalarInteger(0));
 
     /* return if 'expr' is not TRUE */
     if( !asLogical(CADDR(argList)) ) {
-        UNPROTECT(1);
-        return R_NilValue;
+	UNPROTECT(1);
+	return R_NilValue;
     }
 
     /* Save the evaluator state information */
@@ -1138,19 +1210,17 @@ SEXP attribute_hidden do_browser(SEXP call, SEXP op, SEXP args, SEXP rho)
     saveGlobalContext = R_GlobalContext;
 
     if (!RDEBUG(rho)) {
-        int skipCalls = asInteger(CADDDR(argList));
+	int skipCalls = asInteger(CADDDR(argList));
 	cptr = R_GlobalContext;
-	while ( ( !(cptr->callflag & CTXT_FUNCTION) || skipCalls--) 
+	while ( ( !(cptr->callflag & CTXT_FUNCTION) || skipCalls--)
 		&& cptr->callflag )
 	    cptr = cptr->nextcontext;
 	Rprintf("Called from: ");
-	tmp = asInteger(GetOption(install("deparse.max.lines"), R_BaseEnv));
-	if(tmp != NA_INTEGER && tmp > 0) R_BrowseLines = tmp;
-        if( cptr != R_ToplevelContext ) {
-	    PrintValueRec(cptr->call, rho);
+	if( cptr != R_ToplevelContext ) {
+	    PrintCall(cptr->call, rho);
 	    SET_RDEBUG(cptr->cloenv, 1);
-        } else
-            Rprintf("top level \n");
+	} else
+	    Rprintf("top level \n");
 
 	R_BrowseLines = 0;
     }
@@ -1174,7 +1244,7 @@ SEXP attribute_hidden do_browser(SEXP call, SEXP op, SEXP args, SEXP rho)
 	    R_Visible = FALSE;
 	}
 	R_GlobalContext = &thiscontext;
-	R_InsertRestartHandlers(&thiscontext, TRUE);
+	R_InsertRestartHandlers(&thiscontext, "browser");
 	R_ReplConsole(rho, savestack, browselevel+1);
 	endcontext(&thiscontext);
     }
@@ -1224,13 +1294,14 @@ SEXP attribute_hidden do_quit(SEXP call, SEXP op, SEXP args, SEXP rho)
     SA_TYPE ask=SA_DEFAULT;
     int status, runLast;
 
+    checkArity(op, args);
     /* if there are any browser contexts active don't quit */
     if(countContexts(CTXT_BROWSER, 1)) {
 	warning(_("cannot quit from browser"));
 	return R_NilValue;
     }
     if( !isString(CAR(args)) )
-	errorcall(call, _("one of \"yes\", \"no\", \"ask\" or \"default\" expected."));
+	error(_("one of \"yes\", \"no\", \"ask\" or \"default\" expected."));
     tmp = CHAR(STRING_ELT(CAR(args), 0)); /* ASCII */
     if( !strcmp(tmp, "ask") ) {
 	ask = SA_SAVEASK;
@@ -1243,7 +1314,7 @@ SEXP attribute_hidden do_quit(SEXP call, SEXP op, SEXP args, SEXP rho)
     else if( !strcmp(tmp, "default") )
 	ask = SA_DEFAULT;
     else
-	errorcall(call, _("unrecognized value of 'save'"));
+	error(_("unrecognized value of 'save'"));
     status = asInteger(CADR(args));
     if (status == NA_INTEGER) {
 	warning(_("invalid 'status', 0 assumed"));
@@ -1304,8 +1375,8 @@ Rf_addTaskCallback(R_ToplevelCallback cb, void *data,
     }
 
     if(!name) {
-	char buf[10];
-	snprintf(buf, 10, "%d", which+1);
+	char buf[20];
+	snprintf(buf, 20, "%d", which+1);
 	el->name = strdup(buf);
     } else
 	el->name = strdup(name);
@@ -1407,7 +1478,10 @@ R_removeTaskCallback(SEXP which)
     Rboolean val;
 
     if(TYPEOF(which) == STRSXP) {
-	val = Rf_removeTaskCallbackByName(CHAR(STRING_ELT(which, 0)));
+	if (LENGTH(which) == 0)
+	    val = FALSE;
+	else
+	    val = Rf_removeTaskCallbackByName(CHAR(STRING_ELT(which, 0)));
     } else {
 	id = asInteger(which);
 	if (id != NA_INTEGER) val = Rf_removeTaskCallbackByIndex(id - 1);
@@ -1522,6 +1596,7 @@ R_taskCallbackRoutine(SEXP expr, SEXP value, Rboolean succeeded,
     }
 
     val = R_tryEval(e, NULL, &errorOccurred);
+    UNPROTECT(1); /* e */
     if(!errorOccurred) {
 	PROTECT(val);
 	if(TYPEOF(val) != LGLSXP) {
@@ -1585,7 +1660,7 @@ void attribute_hidden dummy12345(void)
 
 /* Used in unix/system.c, avoid inlining by using an extern there.
 
-   This is intended to return a local address.  
+   This is intended to return a local address.
    Use -Wno-return-local-addr when compiling.
  */
 uintptr_t dummy_ii(void)
diff --git a/src/main/mapply.c b/src/main/mapply.c
index fef81a0..ed1c24d 100644
--- a/src/main/mapply.c
+++ b/src/main/mapply.c
@@ -1,6 +1,6 @@
 /*
  *  R : A Computer Language for Statistical Data Analysis
- *  Copyright (C) 2003-2013  The R Core Team
+ *  Copyright (C) 2003-2015  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
@@ -14,7 +14,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  *
  */
 #ifdef HAVE_CONFIG_H
@@ -58,7 +58,7 @@ do_mapply(SEXP call, SEXP op, SEXP args, SEXP rho)
 	error(_("zero-length inputs cannot be mixed with those of non-zero length"));
 
     counters = (R_xlen_t *) R_alloc(m, sizeof(R_xlen_t));
-    memset(counters, 0, m * sizeof(R_xlen_t));
+    if (m) memset(counters, 0, m * sizeof(R_xlen_t));
 
     SEXP mindex = PROTECT(allocVector(VECSXP, m));
     SEXP nindex = PROTECT(allocVector(VECSXP, m));
@@ -102,7 +102,7 @@ do_mapply(SEXP call, SEXP op, SEXP args, SEXP rho)
 	    else
 		INTEGER(VECTOR_ELT(nindex, j))[0] = (int) counters[j];
 	}
-	SEXP tmp = eval(fcall, rho);
+	SEXP tmp = R_forceAndCall(fcall, m, rho);
 	if (MAYBE_REFERENCED(tmp))
 	    tmp = duplicate(tmp);
 	SET_VECTOR_ELT(ans, i, tmp);
diff --git a/src/main/match.c b/src/main/match.c
index bba3076..d4d4416 100644
--- a/src/main/match.c
+++ b/src/main/match.c
@@ -1,7 +1,7 @@
 /*
  *  R : A Computer Langage for Statistical Data Analysis
  *  Copyright (C) 1995, 1996  Robert Gentleman and Ross Ihaka
- *  Copyright (C) 1998-2013   The R Core Team.
+ *  Copyright (C) 1998-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
@@ -15,7 +15,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
 
 
  *  Matching and Partial Matching for Strings
@@ -186,7 +186,8 @@ SEXP attribute_hidden matchArgExact(SEXP tag, SEXP * list)
 
 SEXP attribute_hidden matchArgs(SEXP formals, SEXP supplied, SEXP call)
 {
-    int i, seendots, arg_i = 0;
+    Rboolean seendots;
+    int i, arg_i = 0;
     SEXP f, a, b, dots, actuals;
 
     actuals = R_NilValue;
@@ -220,21 +221,28 @@ SEXP attribute_hidden matchArgs(SEXP formals, SEXP supplied, SEXP call)
     a = actuals;
     arg_i = 0;
     while (f != R_NilValue) {
-	if (TAG(f) != R_DotsSymbol) {
-	    i = 1;
-	    for (b = supplied; b != R_NilValue; b = CDR(b)) {
-		if (TAG(b) != R_NilValue && pmatch(TAG(f), TAG(b), 1)) {
-		    if (fargused[arg_i] == 2)
-			error(_("formal argument \"%s\" matched by multiple actual arguments"),
-			      CHAR(PRINTNAME(TAG(f))));
-		    if (ARGUSED(b) == 2)
-			error(_("argument %d matches multiple formal arguments"), i);
-		    SETCAR(a, CAR(b));
-		    if(CAR(b) != R_MissingArg) SET_MISSING(a, 0);
-		    SET_ARGUSED(b, 2);
-		    fargused[arg_i] = 2;
-		}
-		i++;
+      SEXP ftag = TAG(f);
+      const char *ftag_name = CHAR(PRINTNAME(ftag));
+      if (ftag != R_DotsSymbol && ftag != R_NilValue) {
+	    for (b = supplied, i = 1; b != R_NilValue; b = CDR(b), i++) {
+	      SEXP btag = TAG(b);
+	      if (btag != R_NilValue) {
+		  const char *btag_name = CHAR(PRINTNAME(btag));
+		  if (streql( ftag_name, btag_name )) {
+		      if (fargused[arg_i] == 2)
+			  errorcall(call,
+	                      _("formal argument \"%s\" matched by multiple actual arguments"),
+	                      CHAR(PRINTNAME(TAG(f))));
+		      if (ARGUSED(b) == 2)
+			  errorcall(call,
+	                      _("argument %d matches multiple formal arguments"),
+                              i);
+		      SETCAR(a, CAR(b));
+		      if(CAR(b) != R_MissingArg) SET_MISSING(a, 0);
+		      SET_ARGUSED(b, 2);
+		      fargused[arg_i] = 2;
+		  }
+	      }
 	    }
 	}
 	f = CDR(f);
@@ -247,7 +255,7 @@ SEXP attribute_hidden matchArgs(SEXP formals, SEXP supplied, SEXP call)
     /* The location of the first ... is saved in "dots" */
 
     dots = R_NilValue;
-    seendots = 0;
+    seendots = FALSE;
     f = formals;
     a = actuals;
     arg_i = 0;
@@ -256,17 +264,18 @@ SEXP attribute_hidden matchArgs(SEXP formals, SEXP supplied, SEXP call)
 	    if (TAG(f) == R_DotsSymbol && !seendots) {
 		/* Record where ... value goes */
 		dots = a;
-		seendots = 1;
+		seendots = TRUE;
 	    } else {
-		i = 1;
-		for (b = supplied; b != R_NilValue; b = CDR(b)) {
+		for (b = supplied, i = 1; b != R_NilValue; b = CDR(b), i++) {
 		    if (ARGUSED(b) != 2 && TAG(b) != R_NilValue &&
 			pmatch(TAG(f), TAG(b), seendots)) {
 			if (ARGUSED(b))
-			    error(_("argument %d matches multiple formal arguments"), i);
+			    errorcall(call,
+				_("argument %d matches multiple formal arguments"), i);
 			if (fargused[arg_i] == 1)
-			    error(_("formal argument \"%s\" matched by multiple actual arguments"),
-				  CHAR(PRINTNAME(TAG(f))));
+			    errorcall(call,
+				_("formal argument \"%s\" matched by multiple actual arguments"),
+				CHAR(PRINTNAME(TAG(f))));
 			if (R_warn_partial_match_args) {
 			    warningcall(call,
 					_("partial argument match of '%s' to '%s'"),
@@ -278,7 +287,6 @@ SEXP attribute_hidden matchArgs(SEXP formals, SEXP supplied, SEXP call)
 			SET_ARGUSED(b, 1);
 			fargused[arg_i] = 1;
 		    }
-		    i++;
 		}
 	    }
 	}
@@ -297,12 +305,12 @@ SEXP attribute_hidden matchArgs(SEXP formals, SEXP supplied, SEXP call)
     f = formals;
     a = actuals;
     b = supplied;
-    seendots = 0;
+    seendots = FALSE;
 
     while (f != R_NilValue && b != R_NilValue && !seendots) {
 	if (TAG(f) == R_DotsSymbol) {
 	    /* Skip ... matching until all tags done */
-	    seendots = 1;
+	    seendots = TRUE;
 	    f = CDR(f);
 	    a = CDR(a);
 	} else if (CAR(a) != R_MissingArg) {
@@ -383,10 +391,165 @@ SEXP attribute_hidden matchArgs(SEXP formals, SEXP supplied, SEXP call)
 		      ngettext("unused argument %s",
 			       "unused arguments %s",
 			       (unsigned long) length(unusedForError)),
-		      CHAR(STRING_ELT(deparse1line(unusedForError, 0), 0)) + 4);
-                      /* '+ 4' is to remove 'list' from 'list(badTag1,...)' */
+		      strchr(CHAR(asChar(deparse1line(unusedForError, 0))), '('));
 	}
     }
     UNPROTECT(1);
     return(actuals);
 }
+
+
+/* patchArgsByActuals - patch promargs (given as 'supplied') to be promises
+   for the respective actuals in the given environment 'cloenv'.  This is
+   used by NextMethod to allow patching of arguments to the current closure
+   before dispatching to the next method.  The implementation is based on
+   matchArgs, but there is no error/warning checking, assuming that it has
+   already been done by a call to matchArgs when the current closure was
+   invoked.
+*/
+
+typedef enum {
+    FS_UNMATCHED       = 0, /* the formal was not matched by any supplied arg */
+    FS_MATCHED_PRESENT = 1, /* the formal was matched by a non-missing arg */
+    FS_MATCHED_MISSING = 2, /* the formal was matched, but by a missing arg */
+    FS_MATCHED_LOCAL   = 3, /* the formal was matched by a missing arg, but
+                               a local variable of the same name as the formal
+                               has been used */
+} fstype_t;
+
+static R_INLINE
+void patchArgument(SEXP suppliedSlot, SEXP name, fstype_t *farg, SEXP cloenv) {
+    SEXP value = CAR(suppliedSlot);
+    if (value == R_MissingArg) {
+        value = findVarInFrame3(cloenv, name, TRUE);
+        if (value == R_MissingArg) {
+            if (farg) *farg = FS_MATCHED_MISSING;
+            return;
+        }
+        if (farg) *farg = FS_MATCHED_LOCAL;
+    } else
+        if (farg) *farg = FS_MATCHED_PRESENT;
+
+    SETCAR(suppliedSlot, mkPROMISE(name, cloenv));
+}
+
+SEXP attribute_hidden
+patchArgsByActuals(SEXP formals, SEXP supplied, SEXP cloenv)
+{
+    int i, seendots, farg_i;
+    SEXP f, a, b, prsupplied;
+
+    int nfarg = length(formals);
+    if (!nfarg) nfarg = 1; // avoid undefined behaviour
+    fstype_t farg[nfarg];
+    for(i = 0; i < nfarg; i++) farg[i] = FS_UNMATCHED;
+
+    /* Shallow-duplicate supplied arguments */
+
+    PROTECT(prsupplied = allocList(length(supplied)));
+    for(b = supplied, a = prsupplied; b != R_NilValue; b = CDR(b), a = CDR(a)) {
+        SETCAR(a, CAR(b));
+        SET_ARGUSED(a, 0);
+        SET_TAG(a, TAG(b));
+    }
+
+    /* First pass: exact matches by tag */
+
+    f = formals;
+    farg_i = 0;
+    while (f != R_NilValue) {
+	if (TAG(f) != R_DotsSymbol) {
+	    for (b = prsupplied; b != R_NilValue; b = CDR(b)) {
+		if (TAG(b) != R_NilValue && pmatch(TAG(f), TAG(b), 1)) {
+		    patchArgument(b, TAG(f), &farg[farg_i], cloenv);
+		    SET_ARGUSED(b, 2);
+		    break; /* Previous invocation of matchArgs */
+		           /* ensured unique matches */
+		}
+	    }
+	}
+	f = CDR(f);
+	farg_i++;
+    }
+
+    /* Second pass: partial matches based on tags */
+    /* An exact match is required after first ... */
+    /* The location of the first ... is saved in "dots" */
+
+    seendots = 0;
+    f = formals;
+    farg_i = 0;
+    while (f != R_NilValue) {
+	if (farg[farg_i] == FS_UNMATCHED) {
+	    if (TAG(f) == R_DotsSymbol && !seendots) {
+		seendots = 1;
+	    } else {
+		for (b = prsupplied; b != R_NilValue; b = CDR(b)) {
+		    if (!ARGUSED(b) && TAG(b) != R_NilValue &&
+			pmatch(TAG(f), TAG(b), seendots)) {
+
+			patchArgument(b, TAG(f), &farg[farg_i], cloenv);
+			SET_ARGUSED(b, 1);
+			break; /* Previous invocation of matchArgs */
+			       /* ensured unique matches */
+		    }
+		}
+	    }
+	}
+	f = CDR(f);
+	farg_i++;
+    }
+
+    /* Third pass: matches based on order */
+    /* All args specified in tag=value form */
+    /* have now been matched.  If we find ... */
+    /* we gobble up all the remaining args. */
+    /* Otherwise we bind untagged values in */
+    /* order to any unmatched formals. */
+
+    f = formals;
+    b = prsupplied;
+    farg_i = 0;
+    while (f != R_NilValue && b != R_NilValue) {
+	if (TAG(f) == R_DotsSymbol) {
+	    /* Done, ... and following args cannot be patched */
+	    break;
+	} else if (farg[farg_i] == FS_MATCHED_PRESENT) {
+	    /* Note that this check corresponds to CAR(b) == R_MissingArg */
+	    /* in matchArgs */
+
+	    /* Already matched by tag */
+	    /* skip to next formal */
+	    f = CDR(f);
+	    farg_i++;
+	} else if (ARGUSED(b) || TAG(b) != R_NilValue) {
+	    /* This value is used or tagged, skip to next value */
+	    /* The second test above is needed because we */
+	    /* shouldn't consider tagged values for positional */
+	    /* matches. */
+	    /* The formal being considered remains the same */
+	    b = CDR(b);
+	} else {
+	    /* We have a positional match */
+	    if (farg[farg_i] == FS_MATCHED_LOCAL)
+	        /* Another supplied argument, a missing with a tag, has */
+	        /* been patched to a promise reading this formal, because */
+	        /* there was a local variable of that name. Hence, we have */
+	        /* to turn this supplied argument into a missing. */
+	        /* Otherwise, we would supply a value twice, confusing */
+	        /* argument matching in subsequently called functions. */
+	        SETCAR(b, R_MissingArg);
+	    else
+	        patchArgument(b, TAG(f), NULL, cloenv);
+
+	    SET_ARGUSED(b, 1);
+	    b = CDR(b);
+	    f = CDR(f);
+	    farg_i++;
+	}
+    }
+
+    /* Previous invocation of matchArgs ensured all args are used */
+    UNPROTECT(1);
+    return(prsupplied);
+}
diff --git a/src/main/memory.c b/src/main/memory.c
index 03f2088..20cb33c 100644
--- a/src/main/memory.c
+++ b/src/main/memory.c
@@ -1,7 +1,7 @@
 /*
  *  R : A Computer Language for Statistical Data Analysis
  *  Copyright (C) 1995, 1996  Robert Gentleman and Ross Ihaka
- *  Copyright (C) 1998--2013  The R Core Team.
+ *  Copyright (C) 1998--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
@@ -15,7 +15,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  */
 
 /*
@@ -29,11 +29,12 @@
 
 #define USE_RINTERNALS
 
-
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
 
+#include <stdarg.h>
+
 #include <R_ext/RS.h> /* for S4 allocation */
 #include <R_ext/Print.h>
 
@@ -46,13 +47,12 @@
    the value is 0.
 
    level 0 is no additional instrumentation
-   level 1 marks uninitialized numeric, logical, integer, raw, 
-          complex vectors and R_alloc memory
+   level 1 marks uninitialized numeric, logical, integer, raw,
+	   complex vectors and R_alloc memory
    level 2 marks the data section of vector nodes as inaccessible
-           when they are freed.
-   level 3 marks the first three bytes of sxpinfo and the ATTRIB
-           field on both vector and non-vector nodes, and the
-           three words of data in non-vector nodes.
+	   when they are freed.
+
+   level 3 was withdrawn in R 3.2.0.
 
    It may be necessary to define NVALGRIND for a non-gcc
    compiler on a supported architecture if it has different
@@ -66,15 +66,21 @@
 #endif
 #endif
 
-#ifndef NVALGRIND
-# include "memcheck.h"
-#endif
-
 
 #ifndef VALGRIND_LEVEL
 # define VALGRIND_LEVEL 0
 #endif
 
+#ifndef NVALGRIND
+# ifdef HAVE_VALGRIND_MEMCHECK_H
+#  include "valgrind/memcheck.h"
+# else
+// internal version of headers
+#  include "vg/memcheck.h"
+# endif
+#endif
+
+
 #define R_USE_SIGNALS 1
 #include <Defn.h>
 #include <Internal.h>
@@ -82,9 +88,9 @@
 #include <R_ext/Rdynload.h>
 #include <R_ext/Rallocators.h> /* for R_allocator_t structure */
 #include <Rmath.h> // R_pow_di
+#include <Print.h> // R_print
 
-#if defined(Win32) && defined(LEA_MALLOC)
-/*#include <stddef.h> */
+#if defined(Win32)
 extern void *Rm_malloc(size_t n);
 extern void *Rm_calloc(size_t n_elements, size_t element_size);
 extern void Rm_free(void * p);
@@ -105,7 +111,6 @@ static int gc_reporting = 0;
 static int gc_count = 0;
 
 /* These are used in profiling to separate out time in GC */
-static Rboolean R_in_gc = FALSE;
 int R_gc_running() { return R_in_gc; }
 
 #ifdef TESTING_WRITE_BARRIER
@@ -180,6 +185,7 @@ static R_INLINE void register_bad_sexp_type(SEXP s, int line)
 }
 
 /* also called from typename() in inspect.c */
+attribute_hidden
 const char *sexptype2char(SEXPTYPE type) {
     switch (type) {
     case NILSXP:	return "NILSXP";
@@ -208,12 +214,13 @@ const char *sexptype2char(SEXPTYPE type) {
     case RAWSXP:	return "RAWSXP";
     case NEWSXP:	return "NEWSXP"; /* should never happen */
     case FREESXP:	return "FREESXP";
-    default:	 	return "<unknown>";
+    default:		return "<unknown>";
     }
 }
 
 #define GC_TORTURE
 
+static int gc_pending = 0;
 #ifdef GC_TORTURE
 /* **** if the user specified a wait before starting to force
    **** collections it might make sense to also wait before starting
@@ -221,9 +228,9 @@ const char *sexptype2char(SEXPTYPE type) {
 static int gc_force_wait = 0;
 static int gc_force_gap = 0;
 static Rboolean gc_inhibit_release = FALSE;
-#define FORCE_GC (gc_force_wait > 0 ? (--gc_force_wait > 0 ? 0 : (gc_force_wait = gc_force_gap, 1)) : 0)
+#define FORCE_GC (gc_pending || (gc_force_wait > 0 ? (--gc_force_wait > 0 ? 0 : (gc_force_wait = gc_force_gap, 1)) : 0))
 #else
-# define FORCE_GC 0
+# define FORCE_GC gc_pending
 #endif
 
 #ifdef R_MEMORY_PROFILING
@@ -329,9 +336,9 @@ static int R_NGrowIncrMin = 50000, R_NShrinkIncrMin = 0;
 static double R_VGrowIncrFrac = 0.0, R_VShrinkIncrFrac = 0.2;
 static int R_VGrowIncrMin = 100000, R_VShrinkIncrMin = 0;
 #else
-static double R_NGrowIncrFrac = 0.05, R_NShrinkIncrFrac = 0.2;
+static double R_NGrowIncrFrac = 0.2, R_NShrinkIncrFrac = 0.2;
 static int R_NGrowIncrMin = 40000, R_NShrinkIncrMin = 0;
-static double R_VGrowIncrFrac = 0.05, R_VShrinkIncrFrac = 0.2;
+static double R_VGrowIncrFrac = 0.2, R_VShrinkIncrFrac = 0.2;
 static int R_VGrowIncrMin = 80000, R_VShrinkIncrMin = 0;
 #endif
 
@@ -350,8 +357,8 @@ static void init_gc_grow_settings()
 	case 1: /* default */
 	    break;
 	case 2: /* somewhat aggressive */
-	    R_NGrowIncrFrac = 0.2;
-	    R_VGrowIncrFrac = 0.2;
+	    R_NGrowIncrFrac = 0.3;
+	    R_VGrowIncrFrac = 0.3;
 	    break;
 	case 3: /* more aggressive */
 	    R_NGrowIncrFrac = 0.4;
@@ -642,9 +649,9 @@ static R_size_t R_NodesInUse = 0;
   case EXPRSXP: \
   case VECSXP: \
     { \
-      int i; \
-      for (i = 0; i < LENGTH(__n__); i++) \
-	dc__action__(STRING_ELT(__n__, i), dc__extra__); \
+      R_xlen_t i; \
+      for (i = 0; i < XLENGTH(__n__); i++) \
+	dc__action__(VECTOR_ELT(__n__, i), dc__extra__); \
     } \
     break; \
   case ENVSXP: \
@@ -722,6 +729,22 @@ static R_size_t R_NodesInUse = 0;
 #define NO_FREE_NODES() (R_NodesInUse >= R_NSize)
 #define GET_FREE_NODE(s) CLASS_GET_FREE_NODE(0,s)
 
+/* versions that assume nodes are avaialble without adding a new page */
+#define CLASS_QUICK_GET_FREE_NODE(c,s) do {		\
+	SEXP __n__ = R_GenHeap[c].Free;			\
+	if (__n__ == R_GenHeap[c].New)			\
+	    error("need new page - should not happen");	\
+	R_GenHeap[c].Free = NEXT_NODE(__n__);		\
+	R_NodesInUse++;					\
+	(s) = __n__;					\
+    } while (0)
+
+#define QUICK_GET_FREE_NODE(s) CLASS_QUICK_GET_FREE_NODE(0,s)
+
+/* QUICK versions can be used if (CLASS_)NEED_NEW_PAGE returns FALSE */
+#define CLASS_NEED_NEW_PAGE(c) (R_GenHeap[c].Free == R_GenHeap[c].New)
+#define NEED_NEW_PAGE() CLASS_NEED_NEW_PAGE(0)
+
 
 /* Debugging Routines. */
 
@@ -870,14 +893,8 @@ static void GetNewPage(int node_class)
 	R_GenHeap[node_class].AllocCount++;
 	SNAP_NODE(s, base);
 #if  VALGRIND_LEVEL > 1
-	if (NodeClassSize[node_class]>0)
-	    VALGRIND_MAKE_NOACCESS(DATAPTR(s), NodeClassSize[node_class]*sizeof(VECREC));
-#if  VALGRIND_LEVEL > 2
-        else 
-            VALGRIND_MAKE_NOACCESS(&(s->u), 3*(sizeof(void *)));
-        VALGRIND_MAKE_NOACCESS(s, 3); /* start of sxpinfo */	
-        VALGRIND_MAKE_NOACCESS(&ATTRIB(s), sizeof(void *));
-#endif
+	if (NodeClassSize[node_class] > 0)
+	    VALGRIND_MAKE_MEM_NOACCESS(DATAPTR(s), NodeClassSize[node_class]*sizeof(VECREC));
 #endif
 	s->sxpinfo = UnmarkedNodeTemplate.sxpinfo;
 	INIT_REFCNT(s);
@@ -966,6 +983,9 @@ static void TryToReleasePages(void)
 /* compute size in VEC units so result will fit in LENGTH field for FREESXPs */
 static R_INLINE R_size_t getVecSizeInVEC(SEXP s)
 {
+    if (IS_GROWABLE(s))
+	SETLENGTH(s, XTRUELENGTH(s));
+
     R_size_t size;
     switch (TYPEOF(s)) {	/* get size in bytes */
     case CHARSXP:
@@ -1228,6 +1248,7 @@ static SEXP NewWeakRef(SEXP key, SEXP val, SEXP fin, Rboolean onexit)
     case NILSXP:
     case ENVSXP:
     case EXTPTRSXP:
+    case BCODESXP:
 	break;
     default: error(_("can only weakly reference/finalize reference objects"));
     }
@@ -1393,6 +1414,10 @@ static Rboolean RunFinalizers(void)
 	    saveToplevelContext = R_ToplevelContext;
 	    PROTECT(topExp = R_CurrentExpr);
 	    savestack = R_PPStackTop;
+	    /* The value of 'next' is protected to make it safe
+	       for this routine to be called recursively from a
+	       gc triggered by a finalizer. */
+	    PROTECT(next);
 	    if (! SETJMP(thiscontext.cjmpbuf)) {
 		R_GlobalContext = R_ToplevelContext = &thiscontext;
 
@@ -1404,14 +1429,10 @@ static Rboolean RunFinalizers(void)
 		    R_weak_refs = next;
 		else
 		    SET_WEAKREF_NEXT(last, next);
-		/* The value of 'next' is protected to make is safe
-		   for thsis routine to be called recursively from a
-		   gc triggered by a finalizer. */
-		PROTECT(next);
 		R_RunWeakRefFinalizer(s);
-		UNPROTECT(1);
 	    }
 	    endcontext(&thiscontext);
+	    UNPROTECT(1); /* next */
 	    R_ToplevelContext = saveToplevelContext;
 	    R_PPStackTop = savestack;
 	    R_CurrentExpr = topExp;
@@ -1421,6 +1442,7 @@ static Rboolean RunFinalizers(void)
 	s = next;
     }
     running = FALSE;
+    R_finalizers_pending = FALSE;
     return finalizer_run;
 }
 
@@ -1428,6 +1450,8 @@ void R_RunExitFinalizers(void)
 {
     SEXP s;
 
+    R_checkConstants(TRUE);
+
     for (s = R_weak_refs; s != R_NilValue; s = WEAKREF_NEXT(s))
 	if (FINALIZE_ON_EXIT(s))
 	    SET_READY_TO_FINALIZE(s);
@@ -1575,24 +1599,32 @@ static void RunGenCollect(R_size_t size_needed)
     FORWARD_NODE(R_NilValue);	           /* Builtin constants */
     FORWARD_NODE(NA_STRING);
     FORWARD_NODE(R_BlankString);
+    FORWARD_NODE(R_BlankScalarString);
+    FORWARD_NODE(R_CurrentExpression);
     FORWARD_NODE(R_UnboundValue);
     FORWARD_NODE(R_RestartToken);
     FORWARD_NODE(R_MissingArg);
+    FORWARD_NODE(R_InBCInterpreter);
 
     FORWARD_NODE(R_GlobalEnv);	           /* Global environment */
     FORWARD_NODE(R_BaseEnv);
     FORWARD_NODE(R_EmptyEnv);
     FORWARD_NODE(R_Warnings);	           /* Warnings, if any */
+    FORWARD_NODE(R_ReturnedValue);
 
     FORWARD_NODE(R_HandlerStack);          /* Condition handler stack */
     FORWARD_NODE(R_RestartStack);          /* Available restarts stack */
 
+    FORWARD_NODE(R_BCbody);                /* Current byte code object */
     FORWARD_NODE(R_Srcref);                /* Current source reference */
 
     FORWARD_NODE(R_TrueValue);
     FORWARD_NODE(R_FalseValue);
     FORWARD_NODE(R_LogicalNAValue);
 
+    FORWARD_NODE(R_print.na_string);
+    FORWARD_NODE(R_print.na_string_noquote);
+
     if (R_SymbolTable != NULL)             /* in case of GC during startup */
 	for (i = 0; i < HSIZE; i++)        /* Symbol table */
 	    FORWARD_NODE(R_SymbolTable[i]);
@@ -1606,7 +1638,7 @@ static void RunGenCollect(R_size_t size_needed)
 	    FORWARD_NODE(gdd->displayList);
 	    FORWARD_NODE(gdd->savedSnapshot);
 	    if (gdd->dev)
-	    	FORWARD_NODE(gdd->dev->eventEnv);
+		FORWARD_NODE(gdd->dev->eventEnv);
 	}
     }
 
@@ -1617,9 +1649,11 @@ static void RunGenCollect(R_size_t size_needed)
 	FORWARD_NODE(ctxt->sysparent);     /* calling environment */
 	FORWARD_NODE(ctxt->call);          /* the call */
 	FORWARD_NODE(ctxt->cloenv);        /* the closure environment */
+	FORWARD_NODE(ctxt->bcbody);        /* the current byte code object */
 	FORWARD_NODE(ctxt->handlerstack);  /* the condition handler stack */
 	FORWARD_NODE(ctxt->restartstack);  /* the available restarts stack */
 	FORWARD_NODE(ctxt->srcref);	   /* the current source reference */
+	FORWARD_NODE(ctxt->returnValue);   /* For on.exit calls */
     }
 
     FORWARD_NODE(R_PreciousList);
@@ -1629,8 +1663,18 @@ static void RunGenCollect(R_size_t size_needed)
 
     FORWARD_NODE(R_VStack);		   /* R_alloc stack */
 
-    for (SEXP *sp = R_BCNodeStackBase; sp < R_BCNodeStackTop; sp++)
+    for (R_bcstack_t *sp = R_BCNodeStackBase; sp < R_BCNodeStackTop; sp++) {
+#ifdef TYPED_STACK
+	if (sp->tag == RAWMEM_TAG)
+	    sp += sp->u.ival;
+	else if (sp->tag == 0 || IS_PARTIAL_SXP_TAG(sp->tag))
+	    FORWARD_NODE(sp->u.sxpval);
+#else
 	FORWARD_NODE(*sp);
+#endif
+    }
+    FORWARD_NODE(R_CachedScalarReal);
+    FORWARD_NODE(R_CachedScalarInteger);
 
     /* main processing loop */
     PROCESS_NODES();
@@ -1748,21 +1792,14 @@ static void RunGenCollect(R_size_t size_needed)
 
     /* tell Valgrind about free nodes */
 #if VALGRIND_LEVEL > 1
-    for(i=1; i< NUM_NODE_CLASSES;i++){
-	for(s=NEXT_NODE(R_GenHeap[i].New); s!=R_GenHeap[i].Free; s=NEXT_NODE(s)){
-	    VALGRIND_MAKE_NOACCESS(DATAPTR(s), NodeClassSize[i]*sizeof(VECREC));
-# if VALGRIND_LEVEL > 2
-	    VALGRIND_MAKE_NOACCESS(&ATTRIB(s), sizeof(void *));
-            VALGRIND_MAKE_NOACCESS(s, 3);
-# endif
+    for(i = 1; i< NUM_NODE_CLASSES; i++) {
+	for(s = NEXT_NODE(R_GenHeap[i].New);
+	    s != R_GenHeap[i].Free;
+	    s = NEXT_NODE(s)) {
+	    VALGRIND_MAKE_MEM_NOACCESS(DATAPTR(s),
+				       NodeClassSize[i]*sizeof(VECREC));
 	}
     }
-#if VALGRIND_LEVEL > 2
-    for(s=NEXT_NODE(R_GenHeap[0].New);s!=R_GenHeap[0].Free; s=NEXT_NODE(s)){
-            VALGRIND_MAKE_NOACCESS(&(s->u), 3*(sizeof(void *)));
-            VALGRIND_MAKE_NOACCESS(s, 3);
-    }
-#endif
 #endif
 
     /* reset Free pointers */
@@ -1809,6 +1846,10 @@ static void RunGenCollect(R_size_t size_needed)
 	SortNodes();
 #endif
 
+    if (R_check_constants > 2 ||
+	    (R_check_constants > 1 && gens_collected == NUM_OLD_GENERATIONS))
+	R_checkConstants(TRUE);
+
     if (gc_reporting) {
 	REprintf("Garbage collection %d = %d", gc_count, gen_gc_counts[0]);
 	for (i = 0; i < NUM_OLD_GENERATIONS; i++)
@@ -1861,7 +1902,7 @@ SEXP attribute_hidden do_gctorture2(SEXP call, SEXP op, SEXP args, SEXP rho)
 {
     int gap, wait;
     Rboolean inhibit;
-    SEXP old = ScalarInteger(gc_force_gap);
+    int old = gc_force_gap;
 
     checkArity(op, args);
     gap = asInteger(CAR(args));
@@ -1869,7 +1910,7 @@ SEXP attribute_hidden do_gctorture2(SEXP call, SEXP op, SEXP args, SEXP rho)
     inhibit = asLogical(CADDR(args));
     R_gc_torture(gap, wait, inhibit);
 
-    return old;
+    return ScalarInteger(old);
 }
 
 /* initialize gctorture settings from environment variables */
@@ -1965,18 +2006,18 @@ SEXP attribute_hidden do_gc(SEXP call, SEXP op, SEXP args, SEXP rho)
 }
 
 
-static void mem_err_heap(R_size_t size)
+static void NORET mem_err_heap(R_size_t size)
 {
     errorcall(R_NilValue, _("vector memory exhausted (limit reached?)"));
 }
 
 
-static void mem_err_cons(void)
+static void NORET mem_err_cons(void)
 {
     errorcall(R_NilValue, _("cons memory exhausted (limit reached?)"));
 }
 
-static void mem_err_malloc(R_size_t size)
+static void NORET mem_err_malloc(R_size_t size)
 {
     errorcall(R_NilValue, _("memory exhausted (limit reached?)"));
 }
@@ -2002,7 +2043,7 @@ void attribute_hidden InitMemory()
 	R_Suicide("couldn't allocate memory for pointer stack");
     R_PPStackTop = 0;
 #if VALGRIND_LEVEL > 1
-    VALGRIND_MAKE_NOACCESS(R_PPStack+R_PPStackSize, PP_REDZONE_SIZE);
+    VALGRIND_MAKE_MEM_NOACCESS(R_PPStack+R_PPStackSize, PP_REDZONE_SIZE);
 #endif
     vsfac = sizeof(VECREC);
     R_VSize = (R_VSize + 1)/vsfac;
@@ -2046,14 +2087,15 @@ void attribute_hidden InitMemory()
     R_NilValue->sxpinfo = UnmarkedNodeTemplate.sxpinfo;
     INIT_REFCNT(R_NilValue);
     SET_REFCNT(R_NilValue, REFCNTMAX);
-    TYPEOF(R_NilValue) = NILSXP;
+    SET_TYPEOF(R_NilValue, NILSXP);
     CAR(R_NilValue) = R_NilValue;
     CDR(R_NilValue) = R_NilValue;
     TAG(R_NilValue) = R_NilValue;
     ATTRIB(R_NilValue) = R_NilValue;
     MARK_NOT_MUTABLE(R_NilValue);
 
-    R_BCNodeStackBase = (SEXP *) malloc(R_BCNODESTACKSIZE * sizeof(SEXP));
+    R_BCNodeStackBase =
+	(R_bcstack_t *) malloc(R_BCNODESTACKSIZE * sizeof(R_bcstack_t));
     if (R_BCNodeStackBase == NULL)
 	R_Suicide("couldn't allocate node stack");
 #ifdef BC_INT_STACK
@@ -2075,7 +2117,7 @@ void attribute_hidden InitMemory()
 
     /*  Unbound values which are to be preserved through GCs */
     R_PreciousList = R_NilValue;
-    
+
     /*  The current source line */
     R_Srcref = R_NilValue;
 
@@ -2130,6 +2172,31 @@ char *R_alloc(size_t nelem, int eltsize)
     else return NULL;
 }
 
+#ifdef HAVE_STDALIGN_H
+# include <stdalign.h>
+#endif
+
+#include <stdint.h>
+
+long double *R_allocLD(size_t nelem)
+{
+#if __alignof_is_defined
+    // This is C11: picky compilers may warn.
+    size_t ld_align = alignof(long double);
+#elif __GNUC__
+    // This is C99, but do not rely on it.
+    size_t ld_align = offsetof(struct { char __a; long double __b; }, __b);
+#else
+    size_t ld_align = 0x0F; // value of x86_64, known others are 4 or 8
+#endif
+    if (ld_align > 8) {
+	uintptr_t tmp = (uintptr_t) R_alloc(nelem + 1, sizeof(long double));
+	tmp = (tmp + ld_align - 1) & ~ld_align;
+	return (long double *) tmp;
+    } else {
+	return (long double *) R_alloc(nelem, sizeof(long double));
+    }
+}
 
 
 /* S COMPATIBILITY */
@@ -2139,7 +2206,7 @@ char *S_alloc(long nelem, int eltsize)
     R_size_t size  = nelem * eltsize;
     char *p = R_alloc(nelem, eltsize);
 
-    memset(p, 0, size);
+    if(p) memset(p, 0, size);
     return p;
 }
 
@@ -2149,7 +2216,7 @@ char *S_realloc(char *p, long new, long old, int size)
     size_t nold;
     char *q;
     /* shrinking is a no-op */
-    if(new <= old) return p;
+    if(new <= old) return p; // so nnew > 0 below
     q = R_alloc((size_t)new, size);
     nold = (size_t)old * size;
     memcpy(q, p, nold);
@@ -2171,15 +2238,10 @@ SEXP allocSExp(SEXPTYPE t)
     GET_FREE_NODE(s);
     s->sxpinfo = UnmarkedNodeTemplate.sxpinfo;
     INIT_REFCNT(s);
-    TYPEOF(s) = t;
+    SET_TYPEOF(s, t);
     CAR(s) = R_NilValue;
     CDR(s) = R_NilValue;
     TAG(s) = R_NilValue;
-#if VALGRIND_LEVEL > 2
-    VALGRIND_MAKE_WRITABLE(&ATTRIB(s), sizeof(void *));
-    VALGRIND_MAKE_WRITABLE(&(s->u), 3*(sizeof(void *)));
-    VALGRIND_MAKE_WRITABLE(s,3);
-#endif
     ATTRIB(s) = R_NilValue;
     return s;
 }
@@ -2195,13 +2257,8 @@ static SEXP allocSExpNonCons(SEXPTYPE t)
     GET_FREE_NODE(s);
     s->sxpinfo = UnmarkedNodeTemplate.sxpinfo;
     INIT_REFCNT(s);
-    TYPEOF(s) = t;
+    SET_TYPEOF(s, t);
     TAG(s) = R_NilValue;
-#if VALGRIND_LEVEL > 2
-    VALGRIND_MAKE_WRITABLE(&ATTRIB(s), sizeof(void *));
-    VALGRIND_MAKE_WRITABLE(&(s->u), 3*(sizeof(void *)));
-    VALGRIND_MAKE_WRITABLE(s,3);
-#endif
     ATTRIB(s) = R_NilValue;
     return s;
 }
@@ -2219,15 +2276,19 @@ SEXP cons(SEXP car, SEXP cdr)
 	if (NO_FREE_NODES())
 	    mem_err_cons();
     }
-    GET_FREE_NODE(s);
-#if VALGRIND_LEVEL > 2
-    VALGRIND_MAKE_WRITABLE(&ATTRIB(s), sizeof(void *));
-    VALGRIND_MAKE_WRITABLE(&(s->u), 3*(sizeof(void *)));
-    VALGRIND_MAKE_WRITABLE(s,3);
-#endif
+
+    if (NEED_NEW_PAGE()) {
+	PROTECT(car);
+	PROTECT(cdr);
+	GET_FREE_NODE(s);
+	UNPROTECT(2);
+    }
+    else
+	QUICK_GET_FREE_NODE(s);
+
     s->sxpinfo = UnmarkedNodeTemplate.sxpinfo;
     INIT_REFCNT(s);
-    TYPEOF(s) = LISTSXP;
+    SET_TYPEOF(s, LISTSXP);
     CAR(s) = CHK(car); if (car) INCREMENT_REFCNT(car);
     CDR(s) = CHK(cdr); if (cdr) INCREMENT_REFCNT(cdr);
     TAG(s) = R_NilValue;
@@ -2246,16 +2307,20 @@ SEXP CONS_NR(SEXP car, SEXP cdr)
 	if (NO_FREE_NODES())
 	    mem_err_cons();
     }
-    GET_FREE_NODE(s);
-#if VALGRIND_LEVEL > 2
-    VALGRIND_MAKE_WRITABLE(&ATTRIB(s), sizeof(void *));
-    VALGRIND_MAKE_WRITABLE(&(s->u), 3*(sizeof(void *)));
-    VALGRIND_MAKE_WRITABLE(s,3);
-#endif
+
+    if (NEED_NEW_PAGE()) {
+	PROTECT(car);
+	PROTECT(cdr);
+	GET_FREE_NODE(s);
+	UNPROTECT(2);
+    }
+    else
+	QUICK_GET_FREE_NODE(s);
+
     s->sxpinfo = UnmarkedNodeTemplate.sxpinfo;
     INIT_REFCNT(s);
     DISABLE_REFCNT(s);
-    TYPEOF(s) = LISTSXP;
+    SET_TYPEOF(s, LISTSXP);
     CAR(s) = CHK(car);
     CDR(s) = CHK(cdr);
     TAG(s) = R_NilValue;
@@ -2294,15 +2359,20 @@ SEXP NewEnvironment(SEXP namelist, SEXP valuelist, SEXP rho)
 	if (NO_FREE_NODES())
 	    mem_err_cons();
     }
-    GET_FREE_NODE(newrho);
-#if VALGRIND_LEVEL > 2
-    VALGRIND_MAKE_WRITABLE(&ATTRIB(newrho), sizeof(void *));
-    VALGRIND_MAKE_WRITABLE(&(newrho->u), 3*(sizeof(void *)));
-    VALGRIND_MAKE_WRITABLE(newrho,3);
-#endif
+
+    if (NEED_NEW_PAGE()) {
+	PROTECT(namelist);
+	PROTECT(valuelist);
+	PROTECT(rho);
+	GET_FREE_NODE(newrho);
+	UNPROTECT(3);
+    }
+    else
+	QUICK_GET_FREE_NODE(newrho);
+
     newrho->sxpinfo = UnmarkedNodeTemplate.sxpinfo;
     INIT_REFCNT(newrho);
-    TYPEOF(newrho) = ENVSXP;
+    SET_TYPEOF(newrho, ENVSXP);
     FRAME(newrho) = valuelist;
     ENCLOS(newrho) = CHK(rho);
     HASHTAB(newrho) = R_NilValue;
@@ -2331,19 +2401,23 @@ SEXP attribute_hidden mkPROMISE(SEXP expr, SEXP rho)
 	if (NO_FREE_NODES())
 	    mem_err_cons();
     }
-    GET_FREE_NODE(s);
-#if VALGRIND_LEVEL > 2
-    VALGRIND_MAKE_WRITABLE(&ATTRIB(s), sizeof(void *));
-    VALGRIND_MAKE_WRITABLE(&(s->u), 3*(sizeof(void *)));
-    VALGRIND_MAKE_WRITABLE(s,3);
-#endif
+
+    if (NEED_NEW_PAGE()) {
+	PROTECT(expr);
+	PROTECT(rho);
+	GET_FREE_NODE(s);
+	UNPROTECT(2);
+    }
+    else
+	QUICK_GET_FREE_NODE(s);
+
     /* precaution to ensure code does not get modified via
        substitute() and the like */
     if (NAMED(expr) < 2) SET_NAMED(expr, 2);
 
     s->sxpinfo = UnmarkedNodeTemplate.sxpinfo;
     INIT_REFCNT(s);
-    TYPEOF(s) = PROMSXP;
+    SET_TYPEOF(s, PROMSXP);
     PRCODE(s) = CHK(expr);
     PRENV(s) = CHK(rho);
     PRVALUE(s) = R_UnboundValue;
@@ -2403,13 +2477,12 @@ SEXP allocVector3(SEXPTYPE type, R_xlen_t length, R_allocator_t *allocator)
     SEXP s;     /* For the generational collector it would be safer to
 		   work in terms of a VECSEXP here, but that would
 		   require several casts below... */
-    R_len_t i;
     R_size_t size = 0, alloc_size, old_R_VSize;
     int node_class;
 #if VALGRIND_LEVEL > 0
     R_size_t actual_size = 0;
 #endif
-    
+
     /* Handle some scalars directly to improve speed. */
     if (length == 1) {
 	switch(type) {
@@ -2427,23 +2500,19 @@ SEXP allocVector3(SEXPTYPE type, R_xlen_t length, R_allocator_t *allocator)
 	    }
 
 	    CLASS_GET_FREE_NODE(node_class, s);
-#if VALGRIND_LEVEL > 2
-	    VALGRIND_MAKE_WRITABLE(&ATTRIB(s), sizeof(void *));
-            VALGRIND_MAKE_WRITABLE(s, 3);
-#endif
 #if VALGRIND_LEVEL > 1
 	    switch(type) {
 	    case REALSXP: actual_size = sizeof(double); break;
 	    case INTSXP: actual_size = sizeof(int); break;
 	    case LGLSXP: actual_size = sizeof(int); break;
 	    }
-	    VALGRIND_MAKE_WRITABLE(DATAPTR(s), actual_size);
+	    VALGRIND_MAKE_MEM_UNDEFINED(DATAPTR(s), actual_size);
 #endif
 	    s->sxpinfo = UnmarkedNodeTemplate.sxpinfo;
 	    SET_NODE_CLASS(s, node_class);
 	    R_SmallVallocSize += alloc_size;
 	    ATTRIB(s) = R_NilValue;
-	    TYPEOF(s) = type;
+	    SET_TYPEOF(s, type);
 	    SET_SHORT_VEC_LENGTH(s, (R_len_t) length); // is 1
 	    SET_SHORT_VEC_TRUELENGTH(s, 0);
 	    SET_NAMED(s, 0);
@@ -2453,11 +2522,9 @@ SEXP allocVector3(SEXPTYPE type, R_xlen_t length, R_allocator_t *allocator)
     }
 
     if (length > R_XLEN_T_MAX)
-	errorcall(R_GlobalContext->call,
-		  _("vector is too large")); /**** put length into message */
+	error(_("vector is too large")); /**** put length into message */
     else if (length < 0 )
-	errorcall(R_GlobalContext->call,
-		  _("negative length vectors are not allowed"));
+	error(_("negative length vectors are not allowed"));
     /* number of vector cells to allocate */
     switch (type) {
     case NILSXP:
@@ -2465,12 +2532,13 @@ SEXP allocVector3(SEXPTYPE type, R_xlen_t length, R_allocator_t *allocator)
     case RAWSXP:
 	size = BYTE2VEC(length);
 #if VALGRIND_LEVEL > 0
-	actual_size=length;
+	actual_size = length;
 #endif
 	break;
     case CHARSXP:
 	error("use of allocVector(CHARSXP ...) is defunct\n");
     case intCHARSXP:
+	type = CHARSXP;
 	size = BYTE2VEC(length + 1);
 #if VALGRIND_LEVEL > 0
 	actual_size = length + 1;
@@ -2482,8 +2550,7 @@ SEXP allocVector3(SEXPTYPE type, R_xlen_t length, R_allocator_t *allocator)
 	    size = 0;
 	else {
 	    if (length > R_SIZE_T_MAX / sizeof(int))
-		errorcall(R_GlobalContext->call,
-			  _("cannot allocate vector of length %d"), length);
+		error(_("cannot allocate vector of length %d"), length);
 	    size = INT2VEC(length);
 #if VALGRIND_LEVEL > 0
 	    actual_size = length*sizeof(int);
@@ -2495,8 +2562,7 @@ SEXP allocVector3(SEXPTYPE type, R_xlen_t length, R_allocator_t *allocator)
 	    size = 0;
 	else {
 	    if (length > R_SIZE_T_MAX / sizeof(double))
-		errorcall(R_GlobalContext->call,
-			  _("cannot allocate vector of length %d"), length);
+		error(_("cannot allocate vector of length %d"), length);
 	    size = FLOAT2VEC(length);
 #if VALGRIND_LEVEL > 0
 	    actual_size = length * sizeof(double);
@@ -2508,8 +2574,7 @@ SEXP allocVector3(SEXPTYPE type, R_xlen_t length, R_allocator_t *allocator)
 	    size = 0;
 	else {
 	    if (length > R_SIZE_T_MAX / sizeof(Rcomplex))
-		errorcall(R_GlobalContext->call,
-			  _("cannot allocate vector of length %d"), length);
+		error(_("cannot allocate vector of length %d"), length);
 	    size = COMPLEX2VEC(length);
 #if VALGRIND_LEVEL > 0
 	    actual_size = length * sizeof(Rcomplex);
@@ -2523,8 +2588,7 @@ SEXP allocVector3(SEXPTYPE type, R_xlen_t length, R_allocator_t *allocator)
 	    size = 0;
 	else {
 	    if (length > R_SIZE_T_MAX / sizeof(SEXP))
-		errorcall(R_GlobalContext->call,
-			  _("cannot allocate vector of length %d"), length);
+		error(_("cannot allocate vector of length %d"), length);
 	    size = PTR2VEC(length);
 #if VALGRIND_LEVEL > 0
 	    actual_size = length * sizeof(SEXP);
@@ -2537,7 +2601,7 @@ SEXP allocVector3(SEXPTYPE type, R_xlen_t length, R_allocator_t *allocator)
 	if (length > R_SHORT_LEN_MAX) error("invalid length for pairlist");
 #endif
 	s = allocList((int) length);
-	TYPEOF(s) = LANGSXP;
+	SET_TYPEOF(s, LANGSXP);
 	return s;
     case LISTSXP:
 #ifdef LONG_VECTOR_SUPPORT
@@ -2560,7 +2624,7 @@ SEXP allocVector3(SEXPTYPE type, R_xlen_t length, R_allocator_t *allocator)
 	else {
 	    node_class = LARGE_NODE_CLASS;
 	    alloc_size = size;
-	    for (i = 2; i < NUM_SMALL_NODE_CLASSES; i++) {
+	    for (int i = 2; i < NUM_SMALL_NODE_CLASSES; i++) {
 		if (size <= NodeClassSize[i]) {
 		    node_class = i;
 		    alloc_size = NodeClassSize[i];
@@ -2585,12 +2649,8 @@ SEXP allocVector3(SEXPTYPE type, R_xlen_t length, R_allocator_t *allocator)
     if (size > 0) {
 	if (node_class < NUM_SMALL_NODE_CLASSES) {
 	    CLASS_GET_FREE_NODE(node_class, s);
-#if VALGRIND_LEVEL > 2
-	    VALGRIND_MAKE_WRITABLE(&ATTRIB(s), sizeof(void *));
-            VALGRIND_MAKE_WRITABLE(s, 3);
-#endif
 #if VALGRIND_LEVEL > 1
-	    VALGRIND_MAKE_WRITABLE(DATAPTR(s), actual_size);
+	    VALGRIND_MAKE_MEM_UNDEFINED(DATAPTR(s), actual_size);
 #endif
 	    s->sxpinfo = UnmarkedNodeTemplate.sxpinfo;
 	    INIT_REFCNT(s);
@@ -2608,7 +2668,7 @@ SEXP allocVector3(SEXPTYPE type, R_xlen_t length, R_allocator_t *allocator)
 	    void *mem = NULL; /* initialize to suppress warning */
 	    if (size < (R_SIZE_T_MAX / sizeof(VECREC)) - hdrsize) { /*** not sure this test is quite right -- why subtract the header? LT */
 		mem = allocator ?
-		    custom_node_alloc(allocator, hdrsize + size * sizeof(VECREC)) : 
+		    custom_node_alloc(allocator, hdrsize + size * sizeof(VECREC)) :
 		    malloc(hdrsize + size * sizeof(VECREC));
 		if (mem == NULL) {
 		    /* If we are near the address space limit, we
@@ -2616,7 +2676,7 @@ SEXP allocVector3(SEXPTYPE type, R_xlen_t length, R_allocator_t *allocator)
 		       all unused objects to malloc and try again. */
 		    R_gc_full(alloc_size);
 		    mem = allocator ?
-			custom_node_alloc(allocator, hdrsize + size * sizeof(VECREC)) : 
+			custom_node_alloc(allocator, hdrsize + size * sizeof(VECREC)) :
 			malloc(hdrsize + size * sizeof(VECREC));
 		}
 		if (mem != NULL) {
@@ -2668,7 +2728,7 @@ SEXP allocVector3(SEXPTYPE type, R_xlen_t length, R_allocator_t *allocator)
 	    SNAP_NODE(s, R_GenHeap[node_class].New);
 	}
 	ATTRIB(s) = R_NilValue;
-	TYPEOF(s) = type;
+	SET_TYPEOF(s, type);
     }
     else {
 	GC_PROT(s = allocSExpNonCons(type));
@@ -2685,36 +2745,36 @@ SEXP allocVector3(SEXPTYPE type, R_xlen_t length, R_allocator_t *allocator)
     if (type == EXPRSXP || type == VECSXP) {
 	SEXP *data = STRING_PTR(s);
 #if VALGRIND_LEVEL > 1
-	VALGRIND_MAKE_READABLE(STRING_PTR(s), actual_size);
+	VALGRIND_MAKE_MEM_DEFINED(STRING_PTR(s), actual_size);
 #endif
-	for (i = 0; i < length; i++)
+	for (R_xlen_t i = 0; i < length; i++)
 	    data[i] = R_NilValue;
     }
     else if(type == STRSXP) {
 	SEXP *data = STRING_PTR(s);
 #if VALGRIND_LEVEL > 1
-	VALGRIND_MAKE_READABLE(STRING_PTR(s), actual_size);
+	VALGRIND_MAKE_MEM_DEFINED(STRING_PTR(s), actual_size);
 #endif
-	for (i = 0; i < length; i++)
+	for (R_xlen_t i = 0; i < length; i++)
 	    data[i] = R_BlankString;
     }
     else if (type == CHARSXP || type == intCHARSXP) {
 #if VALGRIND_LEVEL > 0
-	VALGRIND_MAKE_WRITABLE(CHAR(s), actual_size);
+	VALGRIND_MAKE_MEM_UNDEFINED(CHAR(s), actual_size);
 #endif
 	CHAR_RW(s)[length] = 0;
     }
 #if VALGRIND_LEVEL > 0
     else if (type == REALSXP)
-	VALGRIND_MAKE_WRITABLE(REAL(s), actual_size);
+	VALGRIND_MAKE_MEM_UNDEFINED(REAL(s), actual_size);
     else if (type == INTSXP)
-	VALGRIND_MAKE_WRITABLE(INTEGER(s), actual_size);
+	VALGRIND_MAKE_MEM_UNDEFINED(INTEGER(s), actual_size);
     else if (type == LGLSXP)
-	VALGRIND_MAKE_WRITABLE(LOGICAL(s), actual_size);
+	VALGRIND_MAKE_MEM_UNDEFINED(LOGICAL(s), actual_size);
     else if (type == CPLXSXP)
-	VALGRIND_MAKE_WRITABLE(COMPLEX(s), actual_size);
+	VALGRIND_MAKE_MEM_UNDEFINED(COMPLEX(s), actual_size);
     else if (type == RAWSXP)
-	VALGRIND_MAKE_WRITABLE(RAW(s), actual_size);
+	VALGRIND_MAKE_MEM_UNDEFINED(RAW(s), actual_size);
 #endif
     return s;
 }
@@ -2743,6 +2803,56 @@ SEXP allocS4Object(void)
    return s;
 }
 
+static SEXP allocFormalsList(int nargs, ...)
+{
+    SEXP res = R_NilValue;
+    SEXP n;
+    int i;
+    va_list(syms);
+    va_start(syms, nargs);
+
+    for(i = 0; i < nargs; i++) {
+	res = CONS(R_NilValue, res);
+    }
+    R_PreserveObject(res);
+
+    n = res;
+    for(i = 0; i < nargs; i++) {
+	SET_TAG(n, (SEXP) va_arg(syms, SEXP));
+	MARK_NOT_MUTABLE(n);
+	n = CDR(n);
+    }
+    va_end(syms);
+
+    return res;
+}
+
+
+SEXP allocFormalsList2(SEXP sym1, SEXP sym2)
+{
+    return allocFormalsList(2, sym1, sym2);
+}
+
+SEXP allocFormalsList3(SEXP sym1, SEXP sym2, SEXP sym3)
+{
+    return allocFormalsList(3, sym1, sym2, sym3);
+}
+
+SEXP allocFormalsList4(SEXP sym1, SEXP sym2, SEXP sym3, SEXP sym4)
+{
+    return allocFormalsList(4, sym1, sym2, sym3, sym4);
+}
+
+SEXP allocFormalsList5(SEXP sym1, SEXP sym2, SEXP sym3, SEXP sym4, SEXP sym5)
+{
+    return allocFormalsList(5, sym1, sym2, sym3, sym4, sym5);
+}
+
+SEXP allocFormalsList6(SEXP sym1, SEXP sym2, SEXP sym3, SEXP sym4,
+		       SEXP sym5, SEXP sym6)
+{
+    return allocFormalsList(6, sym1, sym2, sym3, sym4, sym5, sym6);
+}
 
 /* "gc" a mark-sweep or in-place generational garbage collector */
 
@@ -2757,9 +2867,6 @@ static void R_gc_full(R_size_t size_needed)
     R_gc_internal(size_needed);
 }
 
-extern double R_getClockIncrement(void);
-extern void R_getProcTime(double *data);
-
 static double gctimes[5], gcstarttimes[5];
 static Rboolean gctime_enabled = FALSE;
 
@@ -2815,6 +2922,16 @@ static void gc_end_timing(void)
 
 static void R_gc_internal(R_size_t size_needed)
 {
+    if (!R_GCEnabled) {
+      if (NO_FREE_NODES())
+	R_NSize = R_NodesInUse + 1;
+      if (size_needed > VHEAP_FREE())
+	R_VSize += size_needed - VHEAP_FREE();
+      gc_pending = TRUE;
+      return;
+    }
+    gc_pending = FALSE;
+
     R_size_t onsize = R_NSize /* can change during collection */;
     double ncells, vcells, vfrac, nfrac;
     SEXPTYPE first_bad_sexp_type = 0;
@@ -2918,40 +3035,16 @@ static void R_gc_internal(R_size_t size_needed)
 	LOGICAL(R_LogicalNAValue)[0] = NA_LOGICAL;
 	error("internal logical NA value has been modified");
     }
+    /* compiler constants are checked in RunGenCollect */
 }
 
-SEXP attribute_hidden do_memlimits(SEXP call, SEXP op, SEXP args, SEXP env)
-{
-    SEXP ans;
-    double nsize, vsize;
-    R_size_t tmp;
-
-    checkArity(op, args);
-    nsize = asReal(CAR(args));
-    vsize = asReal(CADR(args));
-
-    if (ISNAN(nsize) || nsize <= 0) ;
-    else if (nsize >= R_SIZE_T_MAX) R_MaxNSize = R_SIZE_T_MAX;
-    else if (R_FINITE(nsize)) R_SetMaxNSize((R_size_t) nsize);
-
-    if (ISNAN(vsize) || vsize <= 0) ;
-    else if (vsize >= R_SIZE_T_MAX) R_MaxVSize = R_SIZE_T_MAX;
-    else if (R_FINITE(vsize)) R_SetMaxVSize((R_size_t) vsize);
-
-    PROTECT(ans = allocVector(REALSXP, 2));
-    tmp = R_GetMaxNSize();
-    REAL(ans)[0] = (tmp < R_SIZE_T_MAX) ? tmp : NA_REAL;
-    tmp = R_GetMaxVSize();
-    REAL(ans)[1] = (tmp < R_SIZE_T_MAX) ? tmp : NA_REAL;
-    UNPROTECT(1);
-    return ans;
-}
 
 SEXP attribute_hidden do_memoryprofile(SEXP call, SEXP op, SEXP args, SEXP env)
 {
     SEXP ans, nms;
     int i, tmp;
 
+    checkArity(op, args);
     PROTECT(ans = allocVector(INTSXP, 24));
     PROTECT(nms = allocVector(STRSXP, 24));
     for (i = 0; i < 24; i++) {
@@ -3001,7 +3094,7 @@ static void reset_pp_stack(void *data)
     R_PPStackSize =  *poldpps;
 }
 
-void R_signal_protect_error(void)
+void NORET R_signal_protect_error(void)
 {
     RCNTXT cntxt;
     int oldpps = R_PPStackSize;
@@ -3018,9 +3111,11 @@ void R_signal_protect_error(void)
     endcontext(&cntxt); /* not reached */
 }
 
-void R_signal_unprotect_error(void)
+void NORET R_signal_unprotect_error(void)
 {
-    error(_("unprotect(): only %d protected items"), R_PPStackTop);
+    error(ngettext("unprotect(): only %d protected item",
+		   "unprotect(): only %d protected items", R_PPStackTop),
+	  R_PPStackTop);
 }
 
 #ifndef INLINE_PROTECT
@@ -3077,7 +3172,7 @@ int Rf_isProtected(SEXP s)
     } while ( R_PPStack[--i] != s );
 
     /* OK, got it, and  i  is indexing its location */
-    return(i);    
+    return(i);
 }
 
 
@@ -3089,12 +3184,14 @@ void R_ProtectWithIndex(SEXP s, PROTECT_INDEX *pi)
 }
 #endif
 
-void R_signal_reprotect_error(PROTECT_INDEX i)
+void NORET R_signal_reprotect_error(PROTECT_INDEX i)
 {
-    error(_("R_Reprotect: only %d protected items, can't reprotect index %d"),
+    error(ngettext("R_Reprotect: only %d protected item, can't reprotect index %d",
+		   "R_Reprotect: only %d protected items, can't reprotect index %d",
+		   R_PPStackTop),
 	  R_PPStackTop, i);
 }
-    
+
 #ifndef INLINE_PROTECT
 void R_Reprotect(SEXP s, PROTECT_INDEX i)
 {
@@ -3152,7 +3249,7 @@ void *R_chk_realloc(void *ptr, size_t size)
     /* Protect against broken realloc */
     if(ptr) p = realloc(ptr, size); else p = malloc(size);
     if(!p)
-	error(_("'Realloc' could not re-allocate memory (%.0f bytes)"), 
+	error(_("'Realloc' could not re-allocate memory (%.0f bytes)"),
 	      (double) size);
     return(p);
 }
@@ -3241,10 +3338,12 @@ void R_SetExternalPtrProtected(SEXP s, SEXP p)
     EXTPTR_PROT(s) = p;
 }
 
-/* Work around casting issues: works where it is needed */
+/* 
+   Added to API in R 3.4.0.
+   Work around casting issues: works where it is needed.
+ */
 typedef union {void *p; DL_FUNC fn;} fn_ptr;
 
-/* used in package methods */
 SEXP R_MakeExternalPtrFn(DL_FUNC p, SEXP tag, SEXP prot)
 {
     fn_ptr tmp;
@@ -3256,7 +3355,6 @@ SEXP R_MakeExternalPtrFn(DL_FUNC p, SEXP tag, SEXP prot)
     return s;
 }
 
-attribute_hidden
 DL_FUNC R_ExternalPtrAddrFn(SEXP s)
 {
     fn_ptr tmp;
@@ -3299,12 +3397,28 @@ void DUPLICATE_ATTRIB(SEXP to, SEXP from) {
     SET_OBJECT(CHK(to), OBJECT(from));
     IS_S4_OBJECT(from) ?  SET_S4_OBJECT(to) : UNSET_S4_OBJECT(to);
 }
+void SHALLOW_DUPLICATE_ATTRIB(SEXP to, SEXP from) {
+    SET_ATTRIB(CHK(to), shallow_duplicate(CHK(ATTRIB(CHK(from)))));
+    SET_OBJECT(CHK(to), OBJECT(from));
+    IS_S4_OBJECT(from) ?  SET_S4_OBJECT(to) : UNSET_S4_OBJECT(to);
+}
 
 /* S4 object testing */
 int (IS_S4_OBJECT)(SEXP x){ return IS_S4_OBJECT(CHK(x)); }
 void (SET_S4_OBJECT)(SEXP x){ SET_S4_OBJECT(CHK(x)); }
 void (UNSET_S4_OBJECT)(SEXP x){ UNSET_S4_OBJECT(CHK(x)); }
 
+/* JIT optimization support */
+int (NOJIT)(SEXP x) { return NOJIT(CHK(x)); }
+int (MAYBEJIT)(SEXP x) { return MAYBEJIT(CHK(x)); }
+void (SET_NOJIT)(SEXP x) { SET_NOJIT(CHK(x)); }
+void (SET_MAYBEJIT)(SEXP x) { SET_MAYBEJIT(CHK(x)); }
+void (UNSET_MAYBEJIT)(SEXP x) { UNSET_MAYBEJIT(CHK(x)); }
+
+/* Growable vector support */
+int (IS_GROWABLE)(SEXP x) { return IS_GROWABLE(CHK(x)); }
+void (SET_GROWABLE_BIT)(SEXP x) { SET_GROWABLE_BIT(CHK(x)); }
+
 static int nvec[32] = {
     0,1,1,1,1,1,1,1,  // does NILSXP really count?
     1,0,0,1,1,0,0,0,
@@ -3319,7 +3433,7 @@ static R_INLINE SEXP CHK2(SEXP x)
 	error("LENGTH or similar applied to %s object", type2char(TYPEOF(x)));
     return x;
 }
- 
+
 /* Vector Accessors */
 int (LENGTH)(SEXP x) { return LENGTH(CHK2(x)); }
 int (TRUELENGTH)(SEXP x) { return TRUELENGTH(CHK2(x)); }
@@ -3391,10 +3505,9 @@ Rcomplex *(COMPLEX)(SEXP x) {
 
 SEXP *(STRING_PTR)(SEXP x) { return STRING_PTR(CHK(x)); }
 
-SEXP *(VECTOR_PTR)(SEXP x)
+SEXP * NORET (VECTOR_PTR)(SEXP x)
 {
   error(_("not safe to return vector pointer"));
-  return NULL;
 }
 
 void (SET_STRING_ELT)(SEXP x, R_xlen_t i, SEXP v) {
@@ -3404,7 +3517,7 @@ void (SET_STRING_ELT)(SEXP x, R_xlen_t i, SEXP v) {
     if(TYPEOF(v) != CHARSXP)
        error("Value of SET_STRING_ELT() must be a 'CHARSXP' not a '%s'",
 	     type2char(TYPEOF(v)));
-    if (i < 0 || i >= XLENGTH(x)) 
+    if (i < 0 || i >= XLENGTH(x))
 	error(_("attempt to set index %lu/%lu in SET_STRING_ELT"),
 	      i, XLENGTH(x));
     FIX_REFCNT(x, STRING_ELT(x, i), v);
@@ -3420,8 +3533,8 @@ SEXP (SET_VECTOR_ELT)(SEXP x, R_xlen_t i, SEXP v) {
 	error("%s() can only be applied to a '%s', not a '%s'",
 	      "SET_VECTOR_ELT", "list", type2char(TYPEOF(x)));
     }
-    if (i < 0 || i >= XLENGTH(x)) 
-	error(_("attempt to set index %lu/%lu in SET_VECTOR_ELT"), 
+    if (i < 0 || i >= XLENGTH(x))
+	error(_("attempt to set index %lu/%lu in SET_VECTOR_ELT"),
 	      i, XLENGTH(x));
     FIX_REFCNT(x, VECTOR_ELT(x, i), v);
     CHECK_OLD_TO_NEW(x, v);
@@ -3437,6 +3550,7 @@ SEXP (CAAR)(SEXP e) { return CHK(CAAR(CHK(e))); }
 SEXP (CDAR)(SEXP e) { return CHK(CDAR(CHK(e))); }
 SEXP (CADR)(SEXP e) { return CHK(CADR(CHK(e))); }
 SEXP (CDDR)(SEXP e) { return CHK(CDDR(CHK(e))); }
+SEXP (CDDDR)(SEXP e) { return CHK(CDDDR(CHK(e))); }
 SEXP (CADDR)(SEXP e) { return CHK(CADDR(CHK(e))); }
 SEXP (CADDDR)(SEXP e) { return CHK(CADDDR(CHK(e))); }
 SEXP (CAD4R)(SEXP e) { return CHK(CAD4R(CHK(e))); }
@@ -3491,8 +3605,6 @@ SEXP (SETCADDR)(SEXP x, SEXP y)
     return y;
 }
 
-#define CDDDR(x) CDR(CDR(CDR(x)))
-
 SEXP (SETCADDDR)(SEXP x, SEXP y)
 {
     SEXP cell;
@@ -3544,6 +3656,7 @@ void (SET_RSTEP)(SEXP x, int v) { SET_RSTEP(CHK(x), v); }
 /* These are only needed with the write barrier on */
 #ifdef TESTING_WRITE_BARRIER
 /* Primitive Accessors */
+/* not hidden since needed in some base packages */
 int (PRIMOFFSET)(SEXP x) { return PRIMOFFSET(x); }
 attribute_hidden
 void (SET_PRIMOFFSET)(SEXP x, int v) { SET_PRIMOFFSET(x, v); }
@@ -3628,15 +3741,24 @@ void attribute_hidden
 void attribute_hidden (LOCK_BINDING)(SEXP b) {LOCK_BINDING(b);}
 void attribute_hidden (UNLOCK_BINDING)(SEXP b) {UNLOCK_BINDING(b);}
 
+attribute_hidden
 void (SET_BASE_SYM_CACHED)(SEXP b) { SET_BASE_SYM_CACHED(b); }
+attribute_hidden
 void (UNSET_BASE_SYM_CACHED)(SEXP b) { UNSET_BASE_SYM_CACHED(b); }
+attribute_hidden
 Rboolean (BASE_SYM_CACHED)(SEXP b) { return BASE_SYM_CACHED(b); }
 
+attribute_hidden
 void (SET_SPECIAL_SYMBOL)(SEXP b) { SET_SPECIAL_SYMBOL(b); }
+attribute_hidden
 void (UNSET_SPECIAL_SYMBOL)(SEXP b) { UNSET_SPECIAL_SYMBOL(b); }
+attribute_hidden
 Rboolean (IS_SPECIAL_SYMBOL)(SEXP b) { return IS_SPECIAL_SYMBOL(b); }
+attribute_hidden
 void (SET_NO_SPECIAL_SYMBOLS)(SEXP b) { SET_NO_SPECIAL_SYMBOLS(b); }
+attribute_hidden
 void (UNSET_NO_SPECIAL_SYMBOLS)(SEXP b) { UNSET_NO_SPECIAL_SYMBOLS(b); }
+attribute_hidden
 Rboolean (NO_SPECIAL_SYMBOLS)(SEXP b) { return NO_SPECIAL_SYMBOLS(b); }
 
 /* R_FunTab accessors, only needed when write barrier is on */
@@ -3669,10 +3791,9 @@ int  (IS_CACHED)(SEXP x) { return IS_CACHED(x); }
 
 #ifndef R_MEMORY_PROFILING
 
-SEXP do_Rprofmem(SEXP args)
+SEXP NORET do_Rprofmem(SEXP args)
 {
     error(_("memory profiling is not available on this system"));
-    return R_NilValue; /* not reached */
 }
 
 #else
@@ -3770,12 +3891,9 @@ void *R_AllocStringBuffer(size_t blen, R_StringBuffer *buf)
 {
     size_t blen1, bsize = buf->defaultSize;
 
-    /* for backwards compatibility, probably no longer needed */
-    if(blen == (size_t)-1) {
-	warning("R_AllocStringBuffer(-1) used: please report");
-	R_FreeStringBufferL(buf);
-	return NULL;
-    }
+    /* for backwards compatibility, this used to free the buffer */
+    if(blen == (size_t)-1)
+	error("R_AllocStringBuffer( (size_t)-1 ) is no longer allowed");
 
     if(blen * sizeof(char) < buf->bufsize) return buf->data;
     blen1 = blen = (blen + 1) * sizeof(char);
@@ -3833,18 +3951,17 @@ int Seql(SEXP a, SEXP b)
     if (IS_CACHED(a) && IS_CACHED(b) && ENC_KNOWN(a) == ENC_KNOWN(b))
 	return 0;
     else {
-    	SEXP vmax = R_VStack;
-    	int result = !strcmp(translateCharUTF8(a), translateCharUTF8(b));
-    	R_VStack = vmax; /* discard any memory used by translateCharUTF8 */
-    	return result;
+	SEXP vmax = R_VStack;
+	int result = !strcmp(translateCharUTF8(a), translateCharUTF8(b));
+	R_VStack = vmax; /* discard any memory used by translateCharUTF8 */
+	return result;
     }
 }
 
 
 #ifdef LONG_VECTOR_SUPPORT
-R_len_t R_BadLongVector(SEXP x, const char *file, int line)
+R_len_t NORET R_BadLongVector(SEXP x, const char *file, int line)
 {
     error(_("long vectors not supported yet: %s:%d"), file, line);
-    return 0; /* not reached */
 }
 #endif
diff --git a/src/main/mkdtemp.c b/src/main/mkdtemp.c
index 5cda845..375b4ed 100644
--- a/src/main/mkdtemp.c
+++ b/src/main/mkdtemp.c
@@ -20,13 +20,15 @@
    with R modifications for randomness and Win32.  
 
    mkdtemp was required by POSIX 2008: we use this substitute on
-   Windows and Solaris 10.
+   Windows (and formerly on Solaris).
 */
 
 #ifdef HAVE_CONFIG_H
 # include "config.h"
 #endif
 
+#include <Defn.h> // for TimeToSeed
+
 #include <errno.h>
 #ifndef __set_errno
 # define __set_errno(Val) errno = (Val)
@@ -96,8 +98,6 @@
 static const char letters[] =
 "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";
 
-unsigned int TimeToSeed(void); // times.c
-
 /* Generate a temporary file name based on TMPL.  TMPL must match the
    rules for mk[s]temp (i.e. end in "XXXXXX").  The name constructed
    does not exist at the time of the call to __gen_tempname.  TMPL is
@@ -128,7 +128,7 @@ gen_tempname (char *tmpl)
   XXXXXX = &tmpl[len - 6];
 
   /* Get some more or less random data.  We need 36 bits. */
-  random_time_bits = TimeToSeed();
+  random_time_bits = Rf_TimeToSeed();
   value += (random_time_bits << 8) ^ getpid ();
 
   for (count = 0; count < TMP_MAX; value += 7777, ++count)
diff --git a/src/main/names.c b/src/main/names.c
index ed211db..bc029fc 100644
--- a/src/main/names.c
+++ b/src/main/names.c
@@ -1,8 +1,8 @@
 /*
  *  R : A Computer Language for Statistical Data Analysis
  *  Copyright (C) 1995, 1996  Robert Gentleman and Ross Ihaka
- *  Copyright (C) 1997--2014  The R Core Team
- *  Copyright (C) 2003, 2004  The R Foundation
+ *  Copyright (C) 1997--2016  The R Core Team
+ *  Copyright (C) 2003--2016  The R Foundation
  *
  *  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
@@ -16,7 +16,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  */
 
 #ifdef HAVE_CONFIG_H
@@ -90,11 +90,11 @@ FUNTAB R_FunTab[] =
 
 /* Primitives */
 {"if",		do_if,		0,	200,	-1,	{PP_IF,	     PREC_FN,	  1}},
-{"while",	do_while,	0,	100,	-1,	{PP_WHILE,   PREC_FN,	  0}},
-{"for",		do_for,		0,	100,	-1,	{PP_FOR,     PREC_FN,	  0}},
-{"repeat",	do_repeat,	0,	100,	-1,	{PP_REPEAT,  PREC_FN,	  0}},
-{"break",	do_break, CTXT_BREAK,	0,	-1,	{PP_BREAK,   PREC_FN,	  0}},
-{"next",	do_break, CTXT_NEXT,	0,	-1,	{PP_NEXT,    PREC_FN,	  0}},
+{"while",	do_while,	0,	100,	2,	{PP_WHILE,   PREC_FN,	  0}},
+{"for",		do_for,		0,	100,	3,	{PP_FOR,     PREC_FN,	  0}},
+{"repeat",	do_repeat,	0,	100,	1,	{PP_REPEAT,  PREC_FN,	  0}},
+{"break",	do_break, CTXT_BREAK,	0,	0,	{PP_BREAK,   PREC_FN,	  0}},
+{"next",	do_break, CTXT_NEXT,	0,	0,	{PP_NEXT,    PREC_FN,	  0}},
 {"return",	do_return,	0,	0,	-1,	{PP_RETURN,  PREC_FN,	  0}},
 {"function",	do_function,	0,	0,	-1,	{PP_FUNCTION,PREC_FN,	  0}},
 {"<-",		do_set,		1,	100,	-1,	{PP_ASSIGN,  PREC_LEFT,	  1}},
@@ -112,7 +112,7 @@ FUNTAB R_FunTab[] =
 {"[[<-",	do_subassign2,	1,	0,	3,	{PP_SUBASS,  PREC_LEFT,	  1}},
 {"$<-",		do_subassign3,	1,	0,	3,	{PP_SUBASS,  PREC_LEFT,	  1}},
 {"switch",	do_switch,	0,	200,	-1,	{PP_FUNCALL, PREC_FN,	  0}},
-{"browser",	do_browser,	0,	101,	4,	{PP_FUNCALL, PREC_FN,	  0}},
+{"browser",	do_browser,	0,	101,	-1,	{PP_FUNCALL, PREC_FN,	  0}},
 {".primTrace",	do_trace,	0,	101,	1,	{PP_FUNCALL, PREC_FN,	  0}},
 {".primUntrace",do_trace,	1,	101,	1,	{PP_FUNCALL, PREC_FN,	  0}},
 {".Internal",	do_internal,	0,	200,	1,	{PP_FUNCALL, PREC_FN,	  0}},
@@ -122,7 +122,8 @@ FUNTAB R_FunTab[] =
 {"substitute",	do_substitute,	0,	0,	-1,	{PP_FUNCALL, PREC_FN,	0}},
 {"missing",	do_missing,	1,	0,	1,	{PP_FUNCALL, PREC_FN,	0}},
 {"nargs",	do_nargs,	1,	1,	0,	{PP_FUNCALL, PREC_FN,	0}},
-{"on.exit",	do_onexit,	0,	100,	1,	{PP_FUNCALL, PREC_FN,	  0}},
+{"on.exit",	do_onexit,	0,	100,	-1,	{PP_FUNCALL, PREC_FN,	  0}},
+{"forceAndCall",do_forceAndCall,	0,	0,	-1,	{PP_FUNCALL, PREC_FN,	  0}},
 
 /* .Internals */
 
@@ -144,7 +145,6 @@ FUNTAB R_FunTab[] =
 {"seterrmessage",do_seterrmessage, 0,	111,	1,	{PP_FUNCALL, PREC_FN,	  0}},
 {"printDeferredWarnings",do_printDeferredWarnings, 0,	111,	0,	{PP_FUNCALL, PREC_FN,	  0}},
 {"interruptsSuspended",do_interruptsSuspended, 0,	11,	-1,	{PP_FUNCALL, PREC_FN,	  0}},
-{"restart",	do_restart,	0,	11,	1,	{PP_FUNCALL, PREC_FN,	  0}},
 {"as.function.default",do_asfunction,0,	11,	2,	{PP_FUNCTION,PREC_FN,	  0}},
 {"debug",	do_debug,	0,	111,	3,	{PP_FUNCALL, PREC_FN,	  0}},
 {"undebug",	do_debug,	1,	111,	1,	{PP_FUNCALL, PREC_FN,	  0}},
@@ -153,13 +153,14 @@ FUNTAB R_FunTab[] =
 {"Recall",	do_recall,	0,	210,	-1,	{PP_FUNCALL, PREC_FN,	  0}},
 {"delayedAssign",do_delayed,	0,	111,	4,	{PP_FUNCALL, PREC_FN,	  0}},
 {"makeLazy",	do_makelazy,	0,	111,	5,	{PP_FUNCALL, PREC_FN,	  0}},
-{"identical",	do_identical,	0,	11,	7,	{PP_FUNCALL, PREC_FN,	  0}},
+{"identical",	do_identical,	0,	11,	8,	{PP_FUNCALL, PREC_FN,	  0}},
+{"C_tryCatchHelper",do_tryCatchHelper,0,11,	-1,	{PP_FUNCALL, PREC_FN,	0}},
 
 
 /* Binary Operators, all primitives */
 /* these are group generic and so need to eval args */
-{"+",		do_arith,	PLUSOP,	1,	2,	{PP_BINARY,  PREC_SUM,	  0}},
-{"-",		do_arith,	MINUSOP,1,	2,	{PP_BINARY,  PREC_SUM,	  0}},
+{"+",		do_arith,	PLUSOP,	1,	-1,	{PP_BINARY,  PREC_SUM,	  0}},
+{"-",		do_arith,	MINUSOP,1,	-1,	{PP_BINARY,  PREC_SUM,	  0}},
 {"*",		do_arith,	TIMESOP,1,	2,	{PP_BINARY,  PREC_PROD,	  0}},
 {"/",		do_arith,	DIVOP,	1,	2,	{PP_BINARY2, PREC_PROD,	  0}},
 {"^",		do_arith,	POWOP,	1,	2,	{PP_BINARY2, PREC_POWER,  1}},
@@ -182,7 +183,7 @@ FUNTAB R_FunTab[] =
 {"||",		do_logic2,	2,	0,	2,	{PP_BINARY,  PREC_OR,	  0}},
 {":",		do_colon,	0,	1,	2,	{PP_BINARY2, PREC_COLON,  0}},
 /* does not evaluate */
-{"~",		do_tilde,	0,	0,	2,	{PP_BINARY,  PREC_TILDE,  0}},
+{"~",		do_tilde,	0,	0,	-1,	{PP_BINARY,  PREC_TILDE,  0}},
 
 
 /* Logic Related Functions */
@@ -201,7 +202,7 @@ FUNTAB R_FunTab[] =
 {"oldClass",	do_class,	0,	1,	1,	{PP_FUNCALL, PREC_FN,	0}},
 {"oldClass<-",	do_classgets,	0,	1,	2,	{PP_FUNCALL, PREC_LEFT, 1}},
 {"class",	R_do_data_class,0,	1,	1,	{PP_FUNCALL, PREC_FN,	0}},
-{".cache_class",	R_do_data_class,	1,	1,	2,	{PP_FUNCALL, PREC_FN,	0}},
+{".cache_class",R_do_data_class,1,	1,	2,	{PP_FUNCALL, PREC_FN,	0}},
 {"class<-",	R_do_set_class,	0,	1,	2,	{PP_FUNCALL, PREC_FN,	0}},
 {"unclass",	do_unclass,	0,	1,	1,	{PP_FUNCALL, PREC_FN,	0}},
 {"names",	do_names,	0,	1,	1,	{PP_FUNCALL, PREC_FN,	0}},
@@ -236,6 +237,7 @@ FUNTAB R_FunTab[] =
 {"comment",	do_comment,	0,	11,	1,	{PP_FUNCALL, PREC_FN,	0}},
 {"comment<-",	do_commentgets,	0,	11,	2,	{PP_FUNCALL, PREC_LEFT,	1}},
 {"get",		do_get,		1,	11,	4,	{PP_FUNCALL, PREC_FN,	0}},
+{"get0",	do_get,		2,	11,	5,	{PP_FUNCALL, PREC_FN,	0}},
 {"mget",	do_mget,	1,	11,	5,	{PP_FUNCALL, PREC_FN,	0}},
 {"exists",	do_get,		0,	11,	4,	{PP_FUNCALL, PREC_FN,	0}},
 {"assign",	do_assign,	0,	111,	4,	{PP_FUNCALL, PREC_FN,	0}},
@@ -244,7 +246,7 @@ FUNTAB R_FunTab[] =
 {"duplicated",	do_duplicated,	0,	11,	4,	{PP_FUNCALL, PREC_FN,	0}},
 {"unique",	do_duplicated,	1,	11,	4,	{PP_FUNCALL, PREC_FN,	0}},
 {"anyDuplicated",do_duplicated,	2,	11,	3,	{PP_FUNCALL, PREC_FN,	0}},
-{"anyNA",	do_anyNA,	0,	1,	1,	{PP_FUNCALL, PREC_FN,	0}},
+{"anyNA",	do_anyNA,	0,	1,	-1,	{PP_FUNCALL, PREC_FN,	0}},
 {"which",	do_which,	0,	11,	1,	{PP_FUNCALL, PREC_FN,	0}},
 {"which.min",	do_first_min,	0,	11,	1,	{PP_FUNCALL, PREC_FN,	0}},
 {"pmin",	do_pmin,	0,	11,	-1,	{PP_FUNCALL, PREC_FN,	0}},
@@ -253,9 +255,10 @@ FUNTAB R_FunTab[] =
 {"match",	do_match,	0,	11,	4,	{PP_FUNCALL, PREC_FN,	0}},
 {"pmatch",	do_pmatch,	0,	11,	4,	{PP_FUNCALL, PREC_FN,	0}},
 {"charmatch",	do_charmatch,	0,	11,	3,	{PP_FUNCALL, PREC_FN,	0}},
-{"match.call",	do_matchcall,	0,	11,	3,	{PP_FUNCALL, PREC_FN,	0}},
-{"crossprod",	do_matprod,	1,	11,	2,	{PP_FUNCALL, PREC_FN,	  0}},
-{"tcrossprod",	do_matprod,	2,	11,	2,	{PP_FUNCALL, PREC_FN,	  0}},
+{"match.call",	do_matchcall,	0,	11,	4,	{PP_FUNCALL, PREC_FN,	0}},
+{"crossprod",	do_matprod,	1,	11,	2,	{PP_FUNCALL, PREC_FN,   0}},
+{"tcrossprod",	do_matprod,	2,	11,	2,	{PP_FUNCALL, PREC_FN,	0}},
+{"lengths",	do_lengths,	0,	11,	2,	{PP_FUNCALL, PREC_FN,	0}},
 
 {"attach",	do_attach,	0,	111,	3,	{PP_FUNCALL, PREC_FN,	0}},
 {"detach",	do_detach,	0,	111,	1,	{PP_FUNCALL, PREC_FN,	0}},
@@ -351,8 +354,8 @@ FUNTAB R_FunTab[] =
 {"psigamma",	do_math2,	26,	11,	2,	{PP_FUNCALL, PREC_FN,	0}},
 
 
-/* Mathematical Functions of a Complex Argument */
-/* these are group generic and so need to eval args */
+/* Mathematical Functions of a Complex Argument:
+ * These are group generic and so need to eval args --> ./complex.c */
 
 {"Re",		do_cmathfuns,	1,	1,	1,	{PP_FUNCALL, PREC_FN,	0}},
 {"Im",		do_cmathfuns,	2,	1,	1,	{PP_FUNCALL, PREC_FN,	0}},
@@ -496,34 +499,39 @@ FUNTAB R_FunTab[] =
 
 /* Type coercion */
 
-{"as.character",do_ascharacter,	0,	1,	-1,	{PP_FUNCALL, PREC_FN,	0}},
-{"as.integer",	do_ascharacter,	1,	1,	-1,	{PP_FUNCALL, PREC_FN,	0}},
-{"as.double",	do_ascharacter,	2,	1,	-1,	{PP_FUNCALL, PREC_FN,	0}},
-{"as.complex",	do_ascharacter,	3,	1,	-1,	{PP_FUNCALL, PREC_FN,	0}},
-{"as.logical",	do_ascharacter,	4,	1,	-1,	{PP_FUNCALL, PREC_FN,	0}},
-{"as.raw",	do_ascharacter,	5,	1,	1,	{PP_FUNCALL, PREC_FN,	0}},
+{"as.character",do_asatomic,	0,	1,	-1,	{PP_FUNCALL, PREC_FN,	0}},
+{"as.integer",	do_asatomic,	1,	1,	-1,	{PP_FUNCALL, PREC_FN,	0}},
+{"as.double",	do_asatomic,	2,	1,	-1,	{PP_FUNCALL, PREC_FN,	0}},
+{"as.numeric",	do_asatomic,	2,	1,	-1,	{PP_FUNCALL, PREC_FN,	0}},
+{"as.complex",	do_asatomic,	3,	1,	-1,	{PP_FUNCALL, PREC_FN,	0}},
+{"as.logical",	do_asatomic,	4,	1,	-1,	{PP_FUNCALL, PREC_FN,	0}},
+{"as.raw",	do_asatomic,	5,	1,	1,	{PP_FUNCALL, PREC_FN,	0}},
 {"as.call",	do_ascall,	0,	1,	1,	{PP_FUNCALL, PREC_FN,	0}},
 {"as.environment",do_as_environment,0,	1,	1,	{PP_FUNCALL, PREC_FN,	0}},
 {"storage.mode<-",do_storage_mode,0,	1,	2,	{PP_FUNCALL, PREC_FN,	0}},
+{"asCharacterFactor",	do_asCharacterFactor,	0,	11,	1,	{PP_FUNCALL, PREC_FN,	0}},
 
 {"as.vector",	do_asvector,	0,	11,	2,	{PP_FUNCALL, PREC_FN,	0}},
 {"paste",	do_paste,	0,	11,	3,	{PP_FUNCALL, PREC_FN,	0}},
 {"paste0",	do_paste,	1,	11,	2,	{PP_FUNCALL, PREC_FN,	0}},
 {"file.path",	do_filepath,	0,	11,	2,	{PP_FUNCALL, PREC_FN,	0}},
-{"format",	do_format,	0,	11,	8,	{PP_FUNCALL, PREC_FN,	0}},
+{"format",	do_format,	0,	11,	9,	{PP_FUNCALL, PREC_FN,	0}},
 {"format.info",	do_formatinfo,	0,	11,	3,	{PP_FUNCALL, PREC_FN,	0}},
 {"cat",		do_cat,		0,	111,	6,	{PP_FUNCALL, PREC_FN,	0}},
 {"do.call",	do_docall,	0,	211,	3,	{PP_FUNCALL, PREC_FN,	0}},
 
 /* String Manipulation */
 
-{"nchar",	do_nchar,	1,	11,	3,	{PP_FUNCALL, PREC_FN,	0}},
-{"nzchar",	do_nzchar,	1,	1,	1,	{PP_FUNCALL, PREC_FN,	0}},
+{"nchar",	do_nchar,	1,	11,	4,	{PP_FUNCALL, PREC_FN,	0}},
+{"nzchar",	do_nzchar,	1,	1,	-1,	{PP_FUNCALL, PREC_FN,	0}},
 {"substr",	do_substr,	1,	11,	3,	{PP_FUNCALL, PREC_FN,	0}},
+{"startsWith",	do_startsWith,  0,	11,	2,	{PP_FUNCALL, PREC_FN,	0}},
+{"endsWith",	do_startsWith,  1,	11,	2,	{PP_FUNCALL, PREC_FN,	0}},
 {"substr<-",	do_substrgets,	1,	11,	4,	{PP_FUNCALL, PREC_FN,	0}},
 {"strsplit",	do_strsplit,	1,	11,	5,	{PP_FUNCALL, PREC_FN,	0}},
 {"abbreviate",	do_abbrev,	1,	11,	3,	{PP_FUNCALL, PREC_FN,	0}},
 {"make.names",	do_makenames,	0,	11,	2,	{PP_FUNCALL, PREC_FN,	0}},
+{"pcre_config", do_pcre_config,	1,	11,	0,	{PP_FUNCALL, PREC_FN,	0}},
 {"grep",	do_grep,	0,	11,	8,	{PP_FUNCALL, PREC_FN,	0}},
 {"grepl",	do_grep,	1,	11,	8,	{PP_FUNCALL, PREC_FN,	0}},
 {"grepRaw",	do_grepraw,	0,	11,	8,	{PP_FUNCALL, PREC_FN,	0}},
@@ -549,10 +557,13 @@ FUNTAB R_FunTab[] =
 {"packBits",	do_packBits,	1,	11,	2,	{PP_FUNCALL, PREC_FN,	0}},
 {"utf8ToInt",	do_utf8ToInt,	1,	11,	1,	{PP_FUNCALL, PREC_FN,	0}},
 {"intToUtf8",	do_intToUtf8,	1,	11,	2,	{PP_FUNCALL, PREC_FN,	0}},
+{"validUTF8",	do_validUTF8,	1,	11,	1,	{PP_FUNCALL, PREC_FN,	0}},
+{"validEnc",	do_validEnc,	1,	11,	1,	{PP_FUNCALL, PREC_FN,	0}},
 {"encodeString",do_encodeString,1,	11,	5,	{PP_FUNCALL, PREC_FN,	0}},
 {"iconv",	do_iconv,	0,	11,	6,	{PP_FUNCALL, PREC_FN,	0}},
 {"strtrim",	do_strtrim,	0,	11,	2,	{PP_FUNCALL, PREC_FN,	0}},
 {"strtoi",	do_strtoi,	0,	11,	2,	{PP_FUNCALL, PREC_FN,	0}},
+{"strrep",	do_strrep,	0,	11,	2,	{PP_FUNCALL, PREC_FN,	0}},
 
 /* Type Checking (typically implemented in ./coerce.c ) */
 
@@ -563,6 +574,7 @@ FUNTAB R_FunTab[] =
 {"is.complex",	do_is,		CPLXSXP,1,	1,	{PP_FUNCALL, PREC_FN,	0}},
 {"is.character",do_is,		STRSXP,	1,	1,	{PP_FUNCALL, PREC_FN,	0}},
 {"is.symbol",	do_is,		SYMSXP,	1,	1,	{PP_FUNCALL, PREC_FN,	0}},
+{"is.name",	do_is,		SYMSXP,	1,	1,	{PP_FUNCALL, PREC_FN,	0}},
 {"is.environment",do_is,	ENVSXP,	1,	1,	{PP_FUNCALL, PREC_FN,	0}},
 {"is.list",	do_is,		VECSXP,	1,	1,	{PP_FUNCALL, PREC_FN,	0}},
 {"is.pairlist",	do_is,		LISTSXP,1,	1,	{PP_FUNCALL, PREC_FN,	0}},
@@ -597,9 +609,6 @@ FUNTAB R_FunTab[] =
 /* Primitive */
 {"proc.time",	do_proctime,	0,	1,	0,	{PP_FUNCALL, PREC_FN,	0}},
 {"gc.time",	do_gctime,	0,	1,	-1,	{PP_FUNCALL, PREC_FN,	0}},
-#if 0
-{"visibleflag", do_visibleflag,	0,	1,	0,	{PP_FUNCALL, PREC_FN,	0}},
-#endif
 {"withVisible", do_withVisible,	1,	10,	1,	{PP_FUNCALL, PREC_FN,	0}},
 {"expression",	do_expression,	1,	0,	-1,	{PP_FUNCALL, PREC_FN,	0}},
 {"interactive",	do_interactive,	0,	1,	0,	{PP_FUNCALL, PREC_FN,	0}},
@@ -638,6 +647,7 @@ FUNTAB R_FunTab[] =
 {"Version",	do_version,	0,	11,	0,	{PP_FUNCALL, PREC_FN,	0}},
 {"machine",	do_machine,	0,	11,	0,	{PP_FUNCALL, PREC_FN,	0}},
 {"commandArgs", do_commandArgs, 0,	11,	0,	{PP_FUNCALL, PREC_FN,	0}},
+{"internalsID",	do_internalsID,	0,	11,	0,	{PP_FUNCALL, PREC_FN,	  0}},
 
 #ifdef Win32
 {"system",	do_system,	0,	211,	5,	{PP_FUNCALL, PREC_FN,	0}},
@@ -648,14 +658,13 @@ FUNTAB R_FunTab[] =
 #ifdef Win32
 {"shell.exec",	do_shellexec,	0,	111,	1,	{PP_FUNCALL, PREC_FN,	0}},
 {"Sys.which",	do_syswhich,	0,	11,	1,	{PP_FUNCALL, PREC_FN,	0}},
-{"useInternet2",do_setInternet2,0,	211,	1,	{PP_FUNCALL, PREC_FN,	0}},
 {"mkjunction", do_mkjunction,	0,	11,	2,	{PP_FUNCALL, PREC_FN,	0}},
 {"tzone_name", do_tzone_name,	0,	11,	0,	{PP_FUNCALL, PREC_FN,	0}},
 #endif
 
 {"parse",	do_parse,	0,	11,	6,	{PP_FUNCALL, PREC_FN,	0}},
-//{"parse_Rd", 	do_parseRd,	0,	11,	7,	{PP_FUNCALL, PREC_FN,	0}},
-//{"deparseRd", 	do_deparseRd, 	0, 	11, 	2,	{PP_FUNCALL, PREC_FN, 	0}},
+//{"parse_Rd",	do_parseRd,	0,	11,	7,	{PP_FUNCALL, PREC_FN,	0}},
+//{"deparseRd",	do_deparseRd,	0,	11,	2,	{PP_FUNCALL, PREC_FN,	0}},
 //{"parseLatex",  do_parseLatex,  0,      11,     4,      {PP_FUNCALL, PREC_FN,	0}},
 {"save",	do_save,	0,	111,	6,	{PP_FUNCALL, PREC_FN,	0}},
 {"saveToConn",	do_saveToConn,	0,	111,	6,	{PP_FUNCALL, PREC_FN,	0}},
@@ -669,7 +678,7 @@ FUNTAB R_FunTab[] =
 {"quit",	do_quit,	0,	111,	3,	{PP_FUNCALL, PREC_FN,	0}},
 {"readline",	do_readln,	0,	11,	1,	{PP_FUNCALL, PREC_FN,	0}},
 {"print.default",do_printdefault,0,	111,	9,	{PP_FUNCALL, PREC_FN,	0}},
-{"print.function",do_printfunction,0,	111,	3,	{PP_FUNCALL, PREC_FN,	0}},
+{"print.function",do_printfunction,0,	111,	-1,	{PP_FUNCALL, PREC_FN,	0}},
 {"prmatrix",	do_prmatrix,	0,	111,	6,	{PP_FUNCALL, PREC_FN,	0}},
 {"gc",		do_gc,		0,	11,	2,	{PP_FUNCALL, PREC_FN,	0}},
 {"gcinfo",	do_gcinfo,	0,	11,	1,	{PP_FUNCALL, PREC_FN,	0}},
@@ -681,9 +690,10 @@ FUNTAB R_FunTab[] =
 {"recordGraphics", do_recordGraphics, 0, 211,     3,      {PP_FOREIGN, PREC_FN,	0}},
 {"dyn.load",	do_dynload,	0,	111,	4,	{PP_FUNCALL, PREC_FN,	0}},
 {"dyn.unload",	do_dynunload,	0,	111,	1,	{PP_FUNCALL, PREC_FN,	0}},
-{"ls",		do_ls,		1,	11,	2,	{PP_FUNCALL, PREC_FN,	0}},
+{"ls",		do_ls,		1,	11,	3,	{PP_FUNCALL, PREC_FN,	0}},
 {"typeof",	do_typeof,	1,	11,	1,	{PP_FUNCALL, PREC_FN,	0}},
 {"eval",	do_eval,	0,	211,	3,	{PP_FUNCALL, PREC_FN,	0}},
+{"returnValue",   do_returnValue,0,     11,     1,      {PP_FUNCALL, PREC_FN,	0}},
 {"sys.parent",	do_sys,		1,	11,	-1,	{PP_FUNCALL, PREC_FN,	0}},
 {"sys.call",	do_sys,		2,	11,	-1,	{PP_FUNCALL, PREC_FN,	0}},
 {"sys.frame",	do_sys,		3,	11,	-1,	{PP_FUNCALL, PREC_FN,	0}},
@@ -693,16 +703,16 @@ FUNTAB R_FunTab[] =
 {"sys.on.exit",	do_sys,		7,	11,	-1,	{PP_FUNCALL, PREC_FN,	0}},
 {"sys.parents",	do_sys,		8,	11,	-1,	{PP_FUNCALL, PREC_FN,	0}},
 {"sys.function",do_sys,		9,	11,	-1,	{PP_FUNCALL, PREC_FN,	0}},
-{"traceback",	do_traceback,  	0,      11,     1,      {PP_FUNCALL, PREC_FN,   0}},
+{"traceback",	do_traceback,	0,      11,     1,      {PP_FUNCALL, PREC_FN,   0}},
 {"browserText", do_sysbrowser,	1,	11,	1,	{PP_FUNCALL, PREC_FN,	0}},
 {"browserCondition", do_sysbrowser,	2,	11,	1,	{PP_FUNCALL, PREC_FN,	0}},
 {"browserSetDebug", do_sysbrowser,	3,	111,	1,	{PP_FUNCALL, PREC_FN,	0}},
-{"parent.frame",do_parentframe,	0,	11,	-1,	{PP_FUNCALL, PREC_FN,	0}},
+{"parent.frame",do_parentframe,	0,	11,	1,	{PP_FUNCALL, PREC_FN,	0}},
 {"sort",	do_sort,	1,	11,	2,	{PP_FUNCALL, PREC_FN,	0}},
 {"is.unsorted",	do_isunsorted,	0,	11,	2,	{PP_FUNCALL, PREC_FN,	0}},
 {"psort",	do_psort,	0,	11,	2,	{PP_FUNCALL, PREC_FN,	0}},
 {"qsort",	do_qsort,	0,	11,	2,	{PP_FUNCALL, PREC_FN,	0}},
-{"radixsort",	do_radixsort,	0,	11,	3,	{PP_FUNCALL, PREC_FN,	0}},
+{"radixsort",	do_radixsort,	0,	11,	-1,	{PP_FUNCALL, PREC_FN,	0}},
 {"order",	do_order,	0,	11,	-1,	{PP_FUNCALL, PREC_FN,	0}},
 {"rank",	do_rank,	0,	11,	3,	{PP_FUNCALL, PREC_FN,	0}},
 {"scan",	do_scan,	0,	11,	19,	{PP_FUNCALL, PREC_FN,	0}},
@@ -715,9 +725,10 @@ FUNTAB R_FunTab[] =
 {"bodyCode",	do_bodyCode,	0,	11,	1,	{PP_FUNCALL, PREC_FN,	0}},
 {"environment",	do_envir,	0,	11,	1,	{PP_FUNCALL, PREC_FN,	0}},
 {"environmentName",do_envirName,0,	11,	1,	{PP_FUNCALL, PREC_FN,	0}},
-{"env2list",	do_env2list,	0,	11,	2,	{PP_FUNCALL, PREC_FN,	0}},
+{"env2list",	do_env2list,	0,	11,	3,	{PP_FUNCALL, PREC_FN,	0}},
 {"reg.finalizer",do_regFinaliz,	0,	11,	3,	{PP_FUNCALL, PREC_FN,	0}},
-{"options",	do_options,	0,	211,	1,	{PP_FUNCALL, PREC_FN,	0}},
+{"options",	do_options,	0,	211,	-1,	{PP_FUNCALL, PREC_FN,	0}},
+{"getOption",	do_getOption,	0,	11,	1,	{PP_FUNCALL, PREC_FN,	0}},
 {"sink",	do_sink,	0,	111,	4,	{PP_FUNCALL, PREC_FN,	0}},
 {"sink.number",	do_sinknumber,	0,	11,	1,	{PP_FUNCALL, PREC_FN,	0}},
 {"rapply",	do_rapply,	0,	11,	5,	{PP_FUNCALL, PREC_FN,	0}},
@@ -729,14 +740,16 @@ FUNTAB R_FunTab[] =
 {"tracemem",    do_tracemem,    0,      1,	1,      {PP_FUNCALL, PREC_FN,	0}},
 {"retracemem",  do_retracemem,  0,      201,     -1,      {PP_FUNCALL, PREC_FN,	0}},
 {"untracemem",  do_untracemem,  0,      101,	1,      {PP_FUNCALL, PREC_FN,	0}},
-{"inspect",	do_inspect,	0,	111,	1,	{PP_FUNCALL, PREC_FN,	0}},
-{"mem.limits",	do_memlimits,	0,	11,	2,	{PP_FUNCALL, PREC_FN,	0}},
+{"inspect",	do_inspect,	0,	111,	-1,	{PP_FUNCALL, PREC_FN,	0}},
+{"address",     do_address,     0,       11,     1,     {PP_FUNCALL, PREC_FN, 0}},
+{"refcnt",      do_refcnt,      0,       11,     1,     {PP_FUNCALL, PREC_FN, 0}},
 {"merge",	do_merge,	0,	11,	4,	{PP_FUNCALL, PREC_FN,	0}},
 {"capabilities",do_capabilities,0,	11,	0,	{PP_FUNCALL, PREC_FN,	0}},
 {"capabilitiesX11",do_capabilitiesX11,0,	11,	0,	{PP_FUNCALL, PREC_FN,	0}},
 {"new.env",	do_newenv,	0,	11,     3,      {PP_FUNCALL, PREC_FN,	0}},
 {"parent.env",  do_parentenv,   0,	11,     1,      {PP_FUNCALL, PREC_FN,	0}},
 {"parent.env<-",do_parentenvgets, 0,	11,     2,      {PP_FUNCALL, PREC_LEFT,	1}},
+{"topenv",	do_topenv,	0,	11,	2,	{PP_FUNCALL, PREC_FN,	0}},
 {"l10n_info",	do_l10n_info,	0,	11,	0,	{PP_FUNCALL, PREC_FN,	0}},
 {"Cstack_info", do_Cstack_info,	0,	11,	0,	{PP_FUNCALL, PREC_FN,	0}},
 
@@ -754,8 +767,9 @@ FUNTAB R_FunTab[] =
 {"list.dirs",	do_listdirs,	0,	11,	3,	{PP_FUNCALL, PREC_FN,	0}},
 {"file.exists", do_fileexists,	0,	11,	1,	{PP_FUNCALL, PREC_FN,	0}},
 {"file.choose", do_filechoose,	0,	11,	1,	{PP_FUNCALL, PREC_FN,	0}},
-{"file.info",	do_fileinfo,	0,	11,	1,	{PP_FUNCALL, PREC_FN,	0}},
+{"file.info",	do_fileinfo,	0,	11,	2,	{PP_FUNCALL, PREC_FN,	0}},
 {"file.access",	do_fileaccess,	0,	11,	2,	{PP_FUNCALL, PREC_FN,	0}},
+{"dir.exists",	do_direxists,	0,	11,	1,	{PP_FUNCALL, PREC_FN,	0}},
 {"dir.create",	do_dircreate,	0,	111,	4,	{PP_FUNCALL, PREC_FN,	0}},
 {"tempfile",	do_tempfile,	0,	11,	3,	{PP_FUNCALL, PREC_FN,	0}},
 {"tempdir",	do_tempdir,	0,	11,	0,	{PP_FUNCALL, PREC_FN,	0}},
@@ -834,8 +848,8 @@ FUNTAB R_FunTab[] =
 {"isSeekable",	do_isseekable,	0,      11,     1,      {PP_FUNCALL, PREC_FN,	0}},
 {"close",	do_close,	0,      111,     2,      {PP_FUNCALL, PREC_FN,	0}},
 {"flush",	do_flush,	0,      111,     1,      {PP_FUNCALL, PREC_FN,	0}},
-{"file",	do_url,		1,      11,     5,      {PP_FUNCALL, PREC_FN,	0}},
-{"url",		do_url,		0,      11,     4,      {PP_FUNCALL, PREC_FN,	0}},
+{"file",	do_url,		1,      11,     6,      {PP_FUNCALL, PREC_FN,	0}},
+{"url",		do_url,		0,      11,     5,      {PP_FUNCALL, PREC_FN,	0}},
 {"pipe",	do_pipe,	0,      11,     3,      {PP_FUNCALL, PREC_FN,	0}},
 {"fifo",	do_fifo,	0,      11,     4,      {PP_FUNCALL, PREC_FN,	0}},
 {"gzfile",	do_gzfile,	0,      11,     4,      {PP_FUNCALL, PREC_FN,	0}},
@@ -856,7 +870,7 @@ FUNTAB R_FunTab[] =
 {"getConnection",do_getconnection,0,	11,	1,      {PP_FUNCALL, PREC_FN,	0}},
 {"getAllConnections",do_getallconnections,0,11, 0,      {PP_FUNCALL, PREC_FN,	0}},
 {"summary.connection",do_sumconnection,0,11,    1,      {PP_FUNCALL, PREC_FN,	0}},
-{"gzcon",	do_gzcon,	0,      11,     3,      {PP_FUNCALL, PREC_FN,	0}},
+{"gzcon",	do_gzcon,	0,      11,     4,      {PP_FUNCALL, PREC_FN,	0}},
 {"memCompress",do_memCompress,	0,	11,     2,      {PP_FUNCALL, PREC_FN,	0}},
 {"memDecompress",do_memDecompress,0,	11,     2,      {PP_FUNCALL, PREC_FN,	0}},
 
@@ -877,6 +891,7 @@ FUNTAB R_FunTab[] =
 {"registerNamespace",do_regNS,		0, 11,	2,      {PP_FUNCALL, PREC_FN,	0}},
 {"unregisterNamespace",do_unregNS,	0, 11,  1,      {PP_FUNCALL, PREC_FN,	0}},
 {"getRegisteredNamespace",do_getRegNS,	0, 11,  1,      {PP_FUNCALL, PREC_FN,	0}},
+{"isRegisteredNamespace", do_getRegNS,	1, 11,  1,      {PP_FUNCALL, PREC_FN,	0}},
 {"getNamespaceRegistry",do_getNSRegistry, 0, 11, 0,     {PP_FUNCALL, PREC_FN,	0}},
 {"importIntoEnv",do_importIntoEnv, 0,	11,	4,	{PP_FUNCALL, PREC_FN,	0}},
 {"env.profile",  do_envprofile,    0,	211,	1,	{PP_FUNCALL, PREC_FN,	0}},
@@ -900,51 +915,62 @@ FUNTAB R_FunTab[] =
 {"lazyLoadDBinsertValue",do_lazyLoadDBinsertValue, 0,	11,	5,	{PP_FUNCALL, PREC_FN,	0}},
 {"bincode",	do_bincode,	 0,	11,	4,	{PP_FUNCALL, PREC_FN,	0}},
 {"tabulate",	do_tabulate,	 0,	11,	2,	{PP_FUNCALL, PREC_FN,	0}},
-{"findInterval",do_findinterval, 0,	11,	4,	{PP_FUNCALL, PREC_FN,	0}},
-{"pretty",	do_pretty, 	0,	11,	7,	{PP_FUNCALL, PREC_FN,	0}},
-{"formatC",	do_formatC, 	0,	11,	7,	{PP_FUNCALL, PREC_FN,	0}},
-{"crc64",	do_crc64, 	0,	11,	1,	{PP_FUNCALL, PREC_FN,	0}},
-{"bitwiseAnd",	do_bitwise, 	1,	11,	2,	{PP_FUNCALL, PREC_FN,	0}},
-{"bitwiseNot",	do_bitwise, 	2,	11,	1,	{PP_FUNCALL, PREC_FN,	0}},
-{"bitwiseOr",	do_bitwise, 	3,	11,	2,	{PP_FUNCALL, PREC_FN,	0}},
-{"bitwiseXor",	do_bitwise, 	4,	11,	2,	{PP_FUNCALL, PREC_FN,	0}},
-{"bitwiseShiftL", do_bitwise, 	5,	11,	2,	{PP_FUNCALL, PREC_FN,	0}},
-{"bitwiseShiftR",  do_bitwise, 	6,	11,	2,	{PP_FUNCALL, PREC_FN,	0}},
-{"serialize",	do_serialize, 	0,	11,	5,	{PP_FUNCALL, PREC_FN,	0}},
-{"serializeb",	do_serialize, 	1,	11,	5,	{PP_FUNCALL, PREC_FN,	0}},
-{"unserialize",	do_serialize, 	2,	11,	2,	{PP_FUNCALL, PREC_FN,	0}},
-{"rowsum_matrix",do_rowsum, 	0,	11,	5,	{PP_FUNCALL, PREC_FN,	0}},
-{"rowsum_df",	do_rowsum, 	1,	11,	5,	{PP_FUNCALL, PREC_FN,	0}},
+{"findInterval",do_findinterval, 0,	11,	5,	{PP_FUNCALL, PREC_FN,	0}},
+{"pretty",	do_pretty,	0,	11,	7,	{PP_FUNCALL, PREC_FN,	0}},
+{"formatC",	do_formatC,	0,	11,	7,	{PP_FUNCALL, PREC_FN,	0}},
+{"crc64",	do_crc64,	0,	11,	1,	{PP_FUNCALL, PREC_FN,	0}},
+{"bitwiseAnd",	do_bitwise,	1,	11,	2,	{PP_FUNCALL, PREC_FN,	0}},
+{"bitwiseNot",	do_bitwise,	2,	11,	1,	{PP_FUNCALL, PREC_FN,	0}},
+{"bitwiseOr",	do_bitwise,	3,	11,	2,	{PP_FUNCALL, PREC_FN,	0}},
+{"bitwiseXor",	do_bitwise,	4,	11,	2,	{PP_FUNCALL, PREC_FN,	0}},
+{"bitwiseShiftL", do_bitwise,	5,	11,	2,	{PP_FUNCALL, PREC_FN,	0}},
+{"bitwiseShiftR",  do_bitwise,	6,	11,	2,	{PP_FUNCALL, PREC_FN,	0}},
+{"serialize",	do_serialize,	0,	11,	5,	{PP_FUNCALL, PREC_FN,	0}},
+{"serializeb",	do_serialize,	1,	11,	5,	{PP_FUNCALL, PREC_FN,	0}},
+{"unserialize",	do_serialize,	2,	11,	2,	{PP_FUNCALL, PREC_FN,	0}},
+{"rowsum_matrix",do_rowsum,	0,	11,	5,	{PP_FUNCALL, PREC_FN,	0}},
+{"rowsum_df",	do_rowsum,	1,	11,	5,	{PP_FUNCALL, PREC_FN,	0}},
 {"setS4Object",	do_setS4Object, 0,	11,	3,	{PP_FUNCALL, PREC_FN,	0}},
-{"traceOnOff",	do_traceOnOff, 	0,	11,	1,	{PP_FUNCALL, PREC_FN,	0}},
-
-{"La_qr_cmplx",	do_lapack,     	0,	11,	1,	{PP_FUNCALL, PREC_FN,	0}},
-{"La_rs",	do_lapack,     	1,	11,	2,	{PP_FUNCALL, PREC_FN,	0}},
-{"La_rs_cmplx",do_lapack,     	2,	11,	2,	{PP_FUNCALL, PREC_FN,	0}},
-{"La_rg",	do_lapack,     	3,	11,	2,	{PP_FUNCALL, PREC_FN,	0}},
-{"La_rg_cmplx",do_lapack,     	41,	11,	2,	{PP_FUNCALL, PREC_FN,	0}},
-{"La_rs",	do_lapack,     	5,	11,	2,	{PP_FUNCALL, PREC_FN,	0}},
-{"La_rs_cmplx",	do_lapack,     	51,	11,	2,	{PP_FUNCALL, PREC_FN,	0}},
-{"La_dlange",	do_lapack,     	6,	11,	2,	{PP_FUNCALL, PREC_FN,	0}},
-{"La_dgecon",	do_lapack,     	7,	11,	2,	{PP_FUNCALL, PREC_FN,	0}},
-{"La_dtrcon",	do_lapack,     	8,	11,	2,	{PP_FUNCALL, PREC_FN,	0}},
-{"La_zgecon",	do_lapack,     	9,	11,	2,	{PP_FUNCALL, PREC_FN,	0}},
-{"La_ztrcon",	do_lapack,     	10,	11,	2,	{PP_FUNCALL, PREC_FN,	0}},
+{"traceOnOff",	do_traceOnOff,	0,	11,	1,	{PP_FUNCALL, PREC_FN,	0}},
+{"debugOnOff",	do_traceOnOff,	1,	11,	1,	{PP_FUNCALL, PREC_FN,	0}},
+
+{"La_qr_cmplx",	do_lapack,	0,	11,	1,	{PP_FUNCALL, PREC_FN,	0}},
+{"La_rs",	do_lapack,	1,	11,	2,	{PP_FUNCALL, PREC_FN,	0}},
+{"La_rs_cmplx",do_lapack,	2,	11,	2,	{PP_FUNCALL, PREC_FN,	0}},
+{"La_rg",	do_lapack,	3,	11,	2,	{PP_FUNCALL, PREC_FN,	0}},
+{"La_rg_cmplx",do_lapack,	41,	11,	2,	{PP_FUNCALL, PREC_FN,	0}},
+{"La_rs",	do_lapack,	5,	11,	2,	{PP_FUNCALL, PREC_FN,	0}},
+{"La_rs_cmplx",	do_lapack,	51,	11,	2,	{PP_FUNCALL, PREC_FN,	0}},
+{"La_dlange",	do_lapack,	6,	11,	2,	{PP_FUNCALL, PREC_FN,	0}},
+{"La_dgecon",	do_lapack,	7,	11,	2,	{PP_FUNCALL, PREC_FN,	0}},
+{"La_dtrcon",	do_lapack,	8,	11,	2,	{PP_FUNCALL, PREC_FN,	0}},
+{"La_zgecon",	do_lapack,	9,	11,	2,	{PP_FUNCALL, PREC_FN,	0}},
+{"La_ztrcon",	do_lapack,	10,	11,	2,	{PP_FUNCALL, PREC_FN,	0}},
 {"La_solve_cmplx",do_lapack,    11,	11,	2,	{PP_FUNCALL, PREC_FN,	0}},
-{"La_solve",	do_lapack,     	100,	11,	3,	{PP_FUNCALL, PREC_FN,	0}},
-{"La_qr",	do_lapack,     	101,	11,	1,	{PP_FUNCALL, PREC_FN,	0}},
-{"La_chol",	do_lapack,     	200,	11,	3,	{PP_FUNCALL, PREC_FN,	0}},
-{"La_chol2inv",	do_lapack,     	201,	11,	2,	{PP_FUNCALL, PREC_FN,	0}},
-
-{"qr_coef_real",do_lapack,     	300,	11,	2,	{PP_FUNCALL, PREC_FN,	0}},
-{"qr_qy_real",	do_lapack,     	301,	11,	3,	{PP_FUNCALL, PREC_FN,	0}},
-{"det_ge_real",	do_lapack,     	302,	11,	2,	{PP_FUNCALL, PREC_FN,	0}},
-{"qr_coef_cmplx",do_lapack,    	303,	11,	2,	{PP_FUNCALL, PREC_FN,	0}},
-{"qr_qy_cmpl",	do_lapack,     	304,	11,	3,	{PP_FUNCALL, PREC_FN,	0}},
-
-{"La_svd",	do_lapack,     	400,	11,	5,	{PP_FUNCALL, PREC_FN,	0}},
-{"La_svd_cmplx",do_lapack,     	401,	11,	5,	{PP_FUNCALL, PREC_FN,	0}},
-{"La_version",	do_lapack,     	1000,	11,	0,	{PP_FUNCALL, PREC_FN,	0}},
+{"La_solve",	do_lapack,	100,	11,	3,	{PP_FUNCALL, PREC_FN,	0}},
+{"La_qr",	do_lapack,	101,	11,	1,	{PP_FUNCALL, PREC_FN,	0}},
+{"La_chol",	do_lapack,	200,	11,	3,	{PP_FUNCALL, PREC_FN,	0}},
+{"La_chol2inv",	do_lapack,	201,	11,	2,	{PP_FUNCALL, PREC_FN,	0}},
+
+{"qr_coef_real",do_lapack,	300,	11,	2,	{PP_FUNCALL, PREC_FN,	0}},
+{"qr_qy_real",	do_lapack,	301,	11,	3,	{PP_FUNCALL, PREC_FN,	0}},
+{"det_ge_real",	do_lapack,	302,	11,	2,	{PP_FUNCALL, PREC_FN,	0}},
+{"qr_coef_cmplx",do_lapack,	303,	11,	2,	{PP_FUNCALL, PREC_FN,	0}},
+{"qr_qy_cmplx",	do_lapack,	304,	11,	3,	{PP_FUNCALL, PREC_FN,	0}},
+
+{"La_svd",	do_lapack,	400,	11,	5,	{PP_FUNCALL, PREC_FN,	0}},
+{"La_svd_cmplx",do_lapack,	401,	11,	5,	{PP_FUNCALL, PREC_FN,	0}},
+{"La_version",	do_lapack,	1000,	11,	0,	{PP_FUNCALL, PREC_FN,	0}},
+{"La_library",	do_lapack,	1001,	11,	0,	{PP_FUNCALL, PREC_FN,	0}},
+
+{"bcprofcounts",do_bcprofcounts,0,	11,	0,	{PP_FUNCALL, PREC_FN,	0}},
+{"bcprofstart",	do_bcprofstart,	0,	11,	0,	{PP_FUNCALL, PREC_FN,	0}},
+{"bcprofstop",	do_bcprofstop,	0,	11,	0,	{PP_FUNCALL, PREC_FN,	0}},
+
+{"eSoftVersion",do_eSoftVersion, 0,	11,	0,	{PP_FUNCALL, PREC_FN,	0}},
+{"curlVersion", do_curlVersion, 0,	11,	0,	{PP_FUNCALL, PREC_FN,	0}},
+{"curlGetHeaders",do_curlGetHeaders,0,	11,	3,	{PP_FUNCALL, PREC_FN,	0}},
+{"curlDownload",do_curlDownload, 0,	11,	5,	{PP_FUNCALL, PREC_FN,	0}},
 
 {NULL,		NULL,		0,	0,	0,	{PP_INVALID, PREC_FN,	0}},
 };
@@ -992,7 +1018,7 @@ SEXP attribute_hidden do_primitive(SEXP call, SEXP op, SEXP args, SEXP env)
     SEXP name, prim;
     checkArity(op, args);
     name = CAR(args);
-    if (!isString(name) || length(name) != 1 ||
+    if (!isString(name) || LENGTH(name) != 1 ||
 	STRING_ELT(name, 0) == R_NilValue)
 	errorcall(call, _("string argument required"));
     prim = R_Primitive(CHAR(STRING_ELT(name, 0)));
@@ -1013,13 +1039,12 @@ int StrToInternal(const char *s)
 static void installFunTab(int i)
 {
     SEXP prim;
-    /* prim needs to be protected since install can (and does here) allocate */
-    PROTECT(prim = mkPRIMSXP(i, R_FunTab[i].eval % 10));
+    /* mkPRIMSXP caches its results, thus prim does not need protection */
+    prim = mkPRIMSXP(i, R_FunTab[i].eval % 10);
     if ((R_FunTab[i].eval % 100 )/10)
 	SET_INTERNAL(install(R_FunTab[i].name), prim);
     else
 	SET_SYMVALUE(install(R_FunTab[i].name), prim);
-    UNPROTECT(1);
 }
 
 static void SymbolShortcuts(void)
@@ -1051,10 +1076,12 @@ static void SymbolShortcuts(void)
     R_NamesSymbol = install("names");
     R_NaRmSymbol = install("na.rm");
     R_PackageSymbol = install("package");
+    R_PreviousSymbol = install("previous");
     R_QuoteSymbol = install("quote");
     R_RowNamesSymbol = install("row.names");
     R_SeedsSymbol = install(".Random.seed");
-    R_SourceSymbol = install("source");   /* Still present for back compatibility, but not used */
+    R_SortListSymbol = install("sort.list");
+    R_SourceSymbol = install("source");   /* Still present for use in methods package, not used elsewhere */
     R_TspSymbol = install("tsp");
     /* ../include/Defn.h , i.e. non-public : */
     R_CommentSymbol = install("comment");
@@ -1066,10 +1093,16 @@ static void SymbolShortcuts(void)
     R_WholeSrcrefSymbol = install("wholeSrcref");
     R_TmpvalSymbol = install("*tmp*");
     R_UseNamesSymbol = install("use.names");
+    R_ColonSymbol = install(":");
     R_DoubleColonSymbol = install("::");
     R_TripleColonSymbol = install(":::");
     R_ConnIdSymbol = install("conn_id");
     R_DevicesSymbol = install(".Devices");
+    R_baseSymbol = // <- back compatible, "deprecated"
+    R_BaseSymbol = install("base");
+    R_SpecSymbol = install("spec");
+    R_NamespaceEnvSymbol = install(".__NAMESPACE__.");
+    R_AsCharacterSymbol = install("as.character");
 
     R_dot_Generic = install(".Generic");
     R_dot_Method = install(".Method");
@@ -1080,6 +1113,41 @@ static void SymbolShortcuts(void)
     R_dot_Class = install(".Class");
     R_dot_GenericCallEnv = install(".GenericCallEnv");
     R_dot_GenericDefEnv = install(".GenericDefEnv");
+    R_dot_packageName = install(".packageName");
+}
+
+
+#define N_DDVAL_SYMBOLS 65
+
+static SEXP DDVALSymbols[N_DDVAL_SYMBOLS];
+
+static SEXP createDDVALSymbol(int n) {
+    char buf[10];
+    snprintf(buf, 10, "..%d", n);
+    return install(buf);
+}
+
+static void initializeDDVALSymbols() {
+    for(int i = 0; i < N_DDVAL_SYMBOLS; i++) {
+	DDVALSymbols[i] = createDDVALSymbol(i);
+    }
+}
+
+SEXP attribute_hidden installDDVAL(int n) {
+    if (n < N_DDVAL_SYMBOLS)
+	return DDVALSymbols[n];
+
+    return createDDVALSymbol(n);
+}
+
+
+static SEXP mkSymMarker(SEXP pname)
+{
+    SEXP ans = allocSExp(SYMSXP);
+    SET_SYMVALUE(ans, ans);
+    SET_ATTRIB(ans, R_NilValue);
+    SET_PRINTNAME(ans, pname);
+    return ans;
 }
 
 /* initialize the symbol table */
@@ -1089,21 +1157,13 @@ void attribute_hidden InitNames()
     if (!(R_SymbolTable = (SEXP *) calloc(HSIZE, sizeof(SEXP))))
 	R_Suicide("couldn't allocate memory for symbol table");
 
-    /* R_UnboundValue */
-    R_UnboundValue = allocSExp(SYMSXP);
-    SET_SYMVALUE(R_UnboundValue, R_UnboundValue);
-    SET_PRINTNAME(R_UnboundValue, R_NilValue);
-    SET_ATTRIB(R_UnboundValue, R_NilValue);
-    /* R_MissingArg */
-    R_MissingArg = allocSExp(SYMSXP);
-    SET_SYMVALUE(R_MissingArg, R_MissingArg);
-    SET_PRINTNAME(R_MissingArg, mkChar(""));
-    SET_ATTRIB(R_MissingArg, R_NilValue);
-    /* R_RestartToken */
-    R_RestartToken = allocSExp(SYMSXP);
-    SET_SYMVALUE(R_RestartToken, R_RestartToken);
-    SET_PRINTNAME(R_RestartToken, mkChar(""));
-    SET_ATTRIB(R_RestartToken, R_NilValue);
+    /* Create marker values */
+    R_UnboundValue = mkSymMarker(R_NilValue);
+    R_MissingArg = mkSymMarker(mkChar(""));
+    R_InBCInterpreter = mkSymMarker(mkChar("<in-bc-interp>"));
+    R_RestartToken = mkSymMarker(mkChar(""));
+    R_CurrentExpression = mkSymMarker(mkChar("<current-expression>"));
+
     /* String constants (CHARSXP values) */
     /* Note: we don't want NA_STRING to be in the CHARSXP cache, so that
        mkChar("NA") is distinct from NA_STRING */
@@ -1114,6 +1174,8 @@ void attribute_hidden InitNames()
     R_print.na_string = NA_STRING;
     /* R_BlankString */
     R_BlankString = mkChar("");
+    R_BlankScalarString = ScalarString(R_BlankString);
+    MARK_NOT_MUTABLE(R_BlankScalarString);
 
     /* Initialize the symbol Table */
     for (int i = 0; i < HSIZE; i++) R_SymbolTable[i] = R_NilValue;
@@ -1127,9 +1189,10 @@ void attribute_hidden InitNames()
 
     /* Special base functions */
     for (int i = 0; Spec_name[i]; i++)
-        SET_SPECIAL_SYMBOL(install(Spec_name[i]));
+	SET_SPECIAL_SYMBOL(install(Spec_name[i]));
 
-    R_initAsignSymbols();
+    R_initAssignSymbols();
+    initializeDDVALSymbols();
     R_initialize_bcode();
 }
 
@@ -1143,16 +1206,16 @@ SEXP install(const char *name)
     SEXP sym;
     int i, hashcode;
 
-    if (*name == '\0')
-	error(_("attempt to use zero-length variable name"));
-    if (strlen(name) > MAXIDSIZE)
-	error(_("variable names are limited to %d bytes"), MAXIDSIZE);
     hashcode = R_Newhashpjw(name);
     i = hashcode % HSIZE;
     /* Check to see if the symbol is already present;  if it is, return it. */
     for (sym = R_SymbolTable[i]; sym != R_NilValue; sym = CDR(sym))
 	if (strcmp(name, CHAR(PRINTNAME(CAR(sym)))) == 0) return (CAR(sym));
     /* Create a new symbol node and link it into the table. */
+    if (*name == '\0')
+	error(_("attempt to use zero-length variable name"));
+    if (strlen(name) > MAXIDSIZE)
+	error(_("variable names are limited to %d bytes"), MAXIDSIZE);
     sym = mkSYMSXP(mkChar(name), R_UnboundValue);
     SET_HASHVALUE(PRINTNAME(sym), hashcode);
     SET_HASHASH(PRINTNAME(sym), 1);
@@ -1161,6 +1224,80 @@ SEXP install(const char *name)
     return (sym);
 }
 
+/* This function is equivalent to install(CHAR(charSXP)), but faster.
+   Like the equivalent code pattern, it discards the encoding information,
+   hence in almost all cases installTrChar should be used, instead. */
+SEXP installChar(SEXP charSXP)
+{
+    SEXP sym;
+    int i, hashcode;
+
+    if( !HASHASH(charSXP) ) {
+	hashcode = R_Newhashpjw(CHAR(charSXP));
+	SET_HASHVALUE(charSXP, hashcode);
+	SET_HASHASH(charSXP, 1);
+    } else {
+	hashcode = HASHVALUE(charSXP);
+    }
+    i = hashcode % HSIZE;
+    /* Check to see if the symbol is already present;  if it is, return it. */
+    for (sym = R_SymbolTable[i]; sym != R_NilValue; sym = CDR(sym))
+	if (strcmp(CHAR(charSXP), CHAR(PRINTNAME(CAR(sym)))) == 0) return (CAR(sym));
+    /* Create a new symbol node and link it into the table. */
+    int len = LENGTH(charSXP);
+    if (len == 0)
+	error(_("attempt to use zero-length variable name"));
+    if (len > MAXIDSIZE)
+	error(_("variable names are limited to %d bytes"), MAXIDSIZE);
+    if (IS_ASCII(charSXP) || (IS_UTF8(charSXP) && utf8locale) ||
+					(IS_LATIN1(charSXP) && latin1locale) )
+	sym = mkSYMSXP(charSXP, R_UnboundValue);
+    else {
+	/* This branch is to match behaviour of install (which is older):
+	   symbol C-string names are always interpreted as if
+	   in the native locale, even when they are not in the native locale */
+	PROTECT(charSXP);
+	sym = mkSYMSXP(mkChar(CHAR(charSXP)), R_UnboundValue);
+	SET_HASHVALUE(PRINTNAME(sym), hashcode);
+	SET_HASHASH(PRINTNAME(sym), 1);
+	UNPROTECT(1);
+    }
+
+    R_SymbolTable[i] = CONS(sym, R_SymbolTable[i]);
+    return (sym);
+}
+
+#define maxLength 512
+attribute_hidden
+SEXP installS3Signature(const char *className, const char *methodName) {
+
+    const char *src;
+    char signature[maxLength];
+
+    int i = 0;
+    for(src = className; *src; src++) {
+	if (i == maxLength)
+	    error(_("class name too long in '%s'"), className);
+	signature[i++] = *src;
+    }
+
+    if (i == maxLength)
+	error(_("class name too long in '%s'"), className);
+    signature[i++] = '.';
+
+    for(src = methodName; *src; src++) {
+	if (i == maxLength)
+	    error(_("class name too long in '%s'"), className);
+	signature[i++] = *src;
+    }
+
+    if (i == maxLength)
+	error(_("class name too long in '%s'"), className);
+    signature[i] = 0;
+
+    return install(signature);
+}
+
 
 /*  do_internal - This is the code for .Internal(). */
 
diff --git a/src/main/objects.c b/src/main/objects.c
index 8ef0341..779ed8e 100644
--- a/src/main/objects.c
+++ b/src/main/objects.c
@@ -2,7 +2,7 @@
  *  R : A Computer Language for Statistical Data Analysis
  *  Copyright (C) 1995, 1996  Robert Gentleman and Ross Ihaka
  *  Copyright (C) 2002-3     The R Foundation
- *  Copyright (C) 1999-2013  The R Core Team.
+ *  Copyright (C) 1999-2015  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
@@ -16,7 +16,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  */
 
 /*  This module contains support for S-style generic */
@@ -33,16 +33,9 @@
 
 static SEXP GetObject(RCNTXT *cptr)
 {
-    SEXP s, sysp, b, formals, funcall, tag;
-    sysp = R_GlobalContext->sysparent;
-
-    PROTECT(funcall = R_syscall(0, cptr));
+    SEXP s, b, formals, tag;
 
-    if ( TYPEOF(CAR(funcall)) == SYMSXP )
-	PROTECT(b = findFun(CAR(funcall), sysp));
-    else
-	PROTECT(b = eval(CAR(funcall), sysp));
-    /**** use R_sysfunction here instead */
+    b = cptr->callfun;
     if (TYPEOF(b) != CLOSXP) error(_("generic 'function' is not a function"));
     formals = FORMALS(b);
 
@@ -84,7 +77,6 @@ static SEXP GetObject(RCNTXT *cptr)
     else
 	s = CAR(cptr->promargs);
 
-    UNPROTECT(2);
     if (TYPEOF(s) == PROMSXP) {
 	if (PRVALUE(s) == R_UnboundValue)
 	    s = eval(s, R_BaseEnv);
@@ -94,7 +86,7 @@ static SEXP GetObject(RCNTXT *cptr)
     return(s);
 }
 
-static SEXP applyMethod(SEXP call, SEXP op, SEXP args, SEXP rho, SEXP newrho)
+static SEXP applyMethod(SEXP call, SEXP op, SEXP args, SEXP rho, SEXP newvars)
 {
     SEXP ans;
     if (TYPEOF(op) == SPECIALSXP) {
@@ -123,7 +115,7 @@ static SEXP applyMethod(SEXP call, SEXP op, SEXP args, SEXP rho, SEXP newrho)
 	vmaxset(vmax);
     }
     else if (TYPEOF(op) == CLOSXP) {
-	ans = applyClosure(call, op, args, rho, newrho);
+	ans = applyClosure(call, op, args, rho, newvars);
     }
     else
 	ans = R_NilValue;  /* for -Wall */
@@ -162,7 +154,7 @@ static SEXP matchmethargs(SEXP oldargs, SEXP newargs)
    loaded, and back to R_GlobalEnv when it is unloaded. */
 
 #ifdef S3_for_S4_warn /* not currently used */
-static SEXP s_check_S3_for_S4 = 0;
+static SEXP s_check_S3_for_S4 = NULL;
 void R_warn_S3_for_S4(SEXP method) {
   SEXP call;
   if(!s_check_S3_for_S4)
@@ -192,21 +184,22 @@ attribute_hidden
 SEXP R_LookupMethod(SEXP method, SEXP rho, SEXP callrho, SEXP defrho)
 {
     SEXP val;
+    static SEXP s_S3MethodsTable = NULL;
 
-    if (TYPEOF(callrho) == NILSXP) {
-	error(_("use of NULL environment is defunct"));
-	callrho = R_BaseEnv;
-    } else
-	if (TYPEOF(callrho) != ENVSXP)
-	    error(_("bad generic call environment"));
-    if (TYPEOF(defrho) == NILSXP) {
+    if (TYPEOF(callrho) != ENVSXP) {
+	if (TYPEOF(callrho) == NILSXP)
 	    error(_("use of NULL environment is defunct"));
-	    defrho = R_BaseEnv;
-    } else
-	if (TYPEOF(defrho) != ENVSXP)
-	    error(_("bad generic definition environment"));
+	else
+	    error(_("bad generic call environment"));
+    }
     if (defrho == R_BaseEnv)
 	defrho = R_BaseNamespace;
+    else if (TYPEOF(defrho) != ENVSXP) {
+	if (TYPEOF(defrho) == NILSXP)
+	    error(_("use of NULL environment is defunct"));
+	else
+	    error(_("bad generic definition environment"));
+    }
 
     /* This evaluates promises */
     val = findVar1(method, callrho, FUNSXP, TRUE);
@@ -214,14 +207,24 @@ SEXP R_LookupMethod(SEXP method, SEXP rho, SEXP callrho, SEXP defrho)
 	return val;
     else {
 	/* We assume here that no one registered a non-function */
+	if (!s_S3MethodsTable)
+	    s_S3MethodsTable = install(".__S3MethodsTable__.");
 	SEXP table = findVarInFrame3(defrho,
-				     install(".__S3MethodsTable__."),
+				     s_S3MethodsTable,
 				     TRUE);
-	if (TYPEOF(table) == PROMSXP) table = eval(table, R_BaseEnv);
+	if (TYPEOF(table) == PROMSXP) {
+	    PROTECT(table);
+	    table = eval(table, R_BaseEnv);
+	    UNPROTECT(1);
+	}
 	if (TYPEOF(table) == ENVSXP) {
 	    val = findVarInFrame3(table, method, TRUE);
-	    if (TYPEOF(val) == PROMSXP) val = eval(val, rho);
-	    if (val != R_UnboundValue) return val;
+	    if (TYPEOF(val) == PROMSXP) {
+		PROTECT(val);
+		val = eval(val, rho);
+		UNPROTECT(1);
+	    }
+	    return val;
 	}
 	return R_UnboundValue;
     }
@@ -239,141 +242,152 @@ static int match_to_obj(SEXP arg, SEXP obj) {
    to an object from an S4 subclass.
 */
 int isBasicClass(const char *ss) {
-    static SEXP s_S3table = 0;
+    static SEXP s_S3table = NULL;
     if(!s_S3table) {
       s_S3table = findVarInFrame3(R_MethodsNamespace, install(".S3MethodsClasses"), TRUE);
       if(s_S3table == R_UnboundValue)
 	error(_("no '.S3MethodsClass' table, cannot use S4 objects with S3 methods ('methods' package not attached?)"));
-	if (TYPEOF(s_S3table) == PROMSXP)  /* findVar... ignores lazy data */
-	    s_S3table = eval(s_S3table, R_MethodsNamespace);
+      if (TYPEOF(s_S3table) == PROMSXP)  /* findVar... ignores lazy data */
+	s_S3table = eval(s_S3table, R_MethodsNamespace);
     }
     if(s_S3table == R_UnboundValue)
       return FALSE; /* too screwed up to do conversions */
     return findVarInFrame3(s_S3table, install(ss), FALSE) != R_UnboundValue;
 }
 
+/* Note that ./attrib.c 's S4_extends() has an alternative
+   'sanity check for methods package available' */
+Rboolean R_has_methods_attached(void) {
+    return(
+	isMethodsDispatchOn() &&
+	// based on unlockBinding() in ../library/methods/R/zzz.R  {since 2003}:
+	!R_BindingIsLocked(install(".BasicFunsList"), R_MethodsNamespace));
+}
+
+static R_INLINE
+SEXP addS3Var(SEXP vars, SEXP name, SEXP value) {
+
+    SEXP res = CONS(value, vars);
+    SET_TAG(res, name);
+    return res;
+}
 
 attribute_hidden
-int usemethod(const char *generic, SEXP obj, SEXP call, SEXP args,
-	      SEXP rho, SEXP callrho, SEXP defrho, SEXP *ans)
-{
-    SEXP klass, method, sxp, t, s, matchedarg, sort_list;
-    SEXP op, formals, newrho, newcall;
-    char buf[512];
-    int i, j, nclass, matched, /* S4toS3, */ nprotect;
-    RCNTXT *cptr;
+SEXP createS3Vars(SEXP dotGeneric, SEXP dotGroup, SEXP dotClass, SEXP dotMethod,
+		  SEXP dotGenericCallEnv, SEXP dotGenericDefEnv) {
+
+    SEXP v = R_NilValue;
+    v = addS3Var(v, R_dot_GenericDefEnv, dotGenericDefEnv);
+    v = addS3Var(v, R_dot_GenericCallEnv, dotGenericCallEnv);
+    v = addS3Var(v, R_dot_Group, dotGroup);
+    v = addS3Var(v, R_dot_Method, dotMethod);
+    v = addS3Var(v, R_dot_Class, dotClass);
+    v = addS3Var(v, R_dot_Generic, dotGeneric);
+
+    return v;
+}
 
-    /* Get the context which UseMethod was called from. */
 
-    cptr = R_GlobalContext;
-    if ( !(cptr->callflag & CTXT_FUNCTION) || cptr->cloenv != rho)
-	error(_("'UseMethod' used in an inappropriate fashion"));
+static
+SEXP dispatchMethod(SEXP op, SEXP sxp, SEXP dotClass, RCNTXT *cptr, SEXP method,
+		    const char *generic, SEXP rho, SEXP callrho, SEXP defrho) {
+
+    SEXP newvars = PROTECT(createS3Vars(
+	PROTECT(mkString(generic)),
+	R_BlankScalarString,
+	dotClass,
+	PROTECT(ScalarString(PRINTNAME(method))),
+	callrho,
+	defrho
+    ));
 
     /* Create a new environment without any */
     /* of the formals to the generic in it. */
 
-    PROTECT(newrho = allocSExp(ENVSXP));
-    op = CAR(cptr->call);
-    switch (TYPEOF(op)) {
-    case SYMSXP:
-	PROTECT(op = findFun(op, cptr->sysparent));
-	break;
-    case LANGSXP:
-	PROTECT(op = eval(op, cptr->sysparent));
-	break;
-    case CLOSXP:
-    case BUILTINSXP:
-    case SPECIALSXP:
-	PROTECT(op);
-	break;
-    default:
-	error(_("invalid generic function in 'usemethod'"));
-    }
-
-    nprotect = 5;
     if (TYPEOF(op) == CLOSXP) {
-	formals = FORMALS(op);
+	SEXP formals = FORMALS(op);
+	SEXP s, t;
+	int matched;
+
 	for (s = FRAME(cptr->cloenv); s != R_NilValue; s = CDR(s)) {
 	    matched = 0;
 	    for (t = formals; t != R_NilValue; t = CDR(t))
-	        if (TAG(t) == TAG(s)) {
+		if (TAG(t) == TAG(s)) {
 		    matched = 1;
+		    break;
 		}
-
-	    if (!matched) defineVar(TAG(s), CAR(s), newrho);
+	    if (!matched) {
+		UNPROTECT(1); /* newvars */
+		newvars = PROTECT(CONS(CAR(s), newvars));
+		SET_TAG(newvars, TAG(s));
+	    }
 	}
     }
 
-    PROTECT(matchedarg = cptr->promargs);
-    PROTECT(newcall = duplicate(cptr->call));
+    if( (RDEBUG(op) && R_current_debug_state()) || RSTEP(op) ) {
+	SET_RSTEP(sxp, 1);
+    }
+
+    SEXP newcall =  PROTECT(duplicate(cptr->call));
+    SETCAR(newcall, method);
+    R_GlobalContext->callflag = CTXT_GENERIC;
+    SEXP matchedarg = PROTECT(cptr->promargs); /* ? is this PROTECT needed ? */
+    SEXP ans = applyMethod(newcall, sxp, matchedarg, rho, newvars);
+    R_GlobalContext->callflag = CTXT_RETURN;
+    UNPROTECT(5); /* "generic,method", newvars, newcall, matchedarg */
+
+    return ans;
+}
 
+attribute_hidden
+int usemethod(const char *generic, SEXP obj, SEXP call, SEXP args,
+	      SEXP rho, SEXP callrho, SEXP defrho, SEXP *ans)
+{
+    SEXP klass, method, sxp;
+    SEXP op;
+    int i, nclass;
+    RCNTXT *cptr;
+
+    /* Get the context which UseMethod was called from. */
+
+    cptr = R_GlobalContext;
+    op = cptr->callfun;
     PROTECT(klass = R_data_class2(obj));
-    sort_list = install("sort.list");
 
     nclass = length(klass);
     for (i = 0; i < nclass; i++) {
 	const void *vmax = vmaxget();
-        const char *ss = translateChar(STRING_ELT(klass, i));
-	if(strlen(generic) + strlen(ss) + 2 > 512)
-	    error(_("class name too long in '%s'"), generic);
-	snprintf(buf, 512, "%s.%s", generic, ss);
-	method = install(buf);
+	const char *ss = translateChar(STRING_ELT(klass, i));
+	method = installS3Signature(generic, ss);
 	vmaxset(vmax);
 	sxp = R_LookupMethod(method, rho, callrho, defrho);
 	if (isFunction(sxp)) {
-	    if(method == sort_list && CLOENV(sxp) == R_BaseNamespace)
+	    if(method == R_SortListSymbol && CLOENV(sxp) == R_BaseNamespace)
 		continue; /* kludge because sort.list is not a method */
-            if( RDEBUG(op) || RSTEP(op) )
-                SET_RSTEP(sxp, 1);
-	    defineVar(R_dot_Generic, mkString(generic), newrho);
+	    PROTECT(sxp);
 	    if (i > 0) {
-	        int ii;
-		PROTECT(t = allocVector(STRSXP, nclass - i));
-		for(j = 0, ii = i; j < length(t); j++, ii++)
-		      SET_STRING_ELT(t, j, STRING_ELT(klass, ii));
-		setAttrib(t, install("previous"), klass);
-		defineVar(R_dot_Class, t, newrho);
-		UNPROTECT(1);
-	    } else
-		defineVar(R_dot_Class, klass, newrho);
-	    PROTECT(t = mkString(buf));
-	    defineVar(R_dot_Method, t, newrho);
-	    UNPROTECT(1);
-	    defineVar(R_dot_GenericCallEnv, callrho, newrho);
-	    defineVar(R_dot_GenericDefEnv, defrho, newrho);
-	    t = newcall;
-	    SETCAR(t, method);
-	    R_GlobalContext->callflag = CTXT_GENERIC;
-	    *ans = applyMethod(t, sxp, matchedarg, rho, newrho);
-	    R_GlobalContext->callflag = CTXT_RETURN;
-	    UNPROTECT(nprotect);
+		SEXP dotClass = PROTECT(stringSuffix(klass, i));
+		setAttrib(dotClass, R_PreviousSymbol, klass);
+		*ans = dispatchMethod(op, sxp, dotClass, cptr, method, generic,
+				      rho, callrho, defrho);
+		UNPROTECT(1); /* dotClass */
+	    } else {
+		*ans = dispatchMethod(op, sxp, klass, cptr, method, generic,
+				      rho, callrho, defrho);
+	    }
+	    UNPROTECT(2); /* klass, sxp */
 	    return 1;
 	}
     }
-    if(strlen(generic) + strlen("default") + 2 > 512)
-	error(_("class name too long in '%s'"), generic);
-    snprintf(buf, 512, "%s.default", generic);
-    method = install(buf);
-    sxp = R_LookupMethod(method, rho, callrho, defrho);
+    method = installS3Signature(generic, "default");
+    PROTECT(sxp = R_LookupMethod(method, rho, callrho, defrho));
     if (isFunction(sxp)) {
-        if( RDEBUG(op) || RSTEP(op) )
-            SET_RSTEP(sxp, 1);
-	defineVar(R_dot_Generic, mkString(generic), newrho);
-	defineVar(R_dot_Class, R_NilValue, newrho);
-	PROTECT(t = mkString(buf));
-	defineVar(R_dot_Method, t, newrho);
-	UNPROTECT(1);
-	defineVar(R_dot_GenericCallEnv, callrho, newrho);
-	defineVar(R_dot_GenericDefEnv, defrho, newrho);
-	t = newcall;
-	SETCAR(t, method);
-	R_GlobalContext->callflag = CTXT_GENERIC;
-	*ans = applyMethod(t, sxp, matchedarg, rho, newrho);
-	R_GlobalContext->callflag = CTXT_RETURN;
-	UNPROTECT(5);
+	*ans = dispatchMethod(op, sxp, R_NilValue, cptr, method, generic,
+			      rho, callrho, defrho);
+	UNPROTECT(2); /* klass, sxp */
 	return 1;
     }
-    UNPROTECT(5);
+    UNPROTECT(2); /* klass, sxp */
     cptr->callflag = CTXT_RETURN;
     return 0;
 }
@@ -384,22 +398,24 @@ int usemethod(const char *generic, SEXP obj, SEXP call, SEXP args,
 */
 
 /* This is a primitive SPECIALSXP */
-SEXP attribute_hidden do_usemethod(SEXP call, SEXP op, SEXP args, SEXP env)
+SEXP attribute_hidden NORET do_usemethod(SEXP call, SEXP op, SEXP args, SEXP env)
 {
     SEXP ans, generic = R_NilValue /* -Wall */, obj, val;
     SEXP callenv, defenv;
-    SEXP ap, argList;
+    SEXP argList;
     RCNTXT *cptr;
+    static SEXP do_usemethod_formals = NULL;
+
+    if (do_usemethod_formals == NULL)
+	do_usemethod_formals = allocFormalsList2(install("generic"),
+						 install("object"));
 
-    PROTECT(ap = list2(R_NilValue, R_NilValue));
-    SET_TAG(ap,  install("generic"));
-    SET_TAG(CDR(ap), install("object"));
-    PROTECT(argList =  matchArgs(ap, args, call));
+    PROTECT(argList = matchArgs(do_usemethod_formals, args, call));
     if (CAR(argList) == R_MissingArg)
 	errorcall(call, _("there must be a 'generic' argument"));
     else
 	PROTECT(generic = eval(CAR(argList), env));
-    if(!isString(generic) || length(generic) != 1)
+    if(!isString(generic) || LENGTH(generic) != 1)
 	errorcall(call, _("'generic' argument must be a character string"));
 
 
@@ -429,27 +445,12 @@ SEXP attribute_hidden do_usemethod(SEXP call, SEXP op, SEXP args, SEXP env)
 
     if (CADR(argList) != R_MissingArg)
 	PROTECT(obj = eval(CADR(argList), env));
-    else {
-	cptr = R_GlobalContext;
-	while (cptr != NULL) {
-	    if ( (cptr->callflag & CTXT_FUNCTION) && cptr->cloenv == env)
-		break;
-	    cptr = cptr->nextcontext;
-	}
-	if (cptr == NULL)
-	    errorcall(call, _("'UseMethod' called from outside a function"));
+    else
 	PROTECT(obj = GetObject(cptr));
-    }
-
-    if (TYPEOF(generic) != STRSXP ||
-	LENGTH(generic) < 1 ||
-	CHAR(STRING_ELT(generic, 0))[0] == '\0')
-	errorcall(call, _("first argument must be a generic name"));
 
     if (usemethod(translateChar(STRING_ELT(generic, 0)), obj, call, CDR(args),
 		  env, callenv, defenv, &ans) == 1) {
-	UNPROTECT(3); /* obj, ap, argList */
-	PROTECT(ans);
+	UNPROTECT(3); /* obj, generic, argList */
 	findcontext(CTXT_RETURN, env, ans); /* does not return */
     }
     else {
@@ -461,9 +462,8 @@ SEXP attribute_hidden do_usemethod(SEXP call, SEXP op, SEXP args, SEXP env)
 	if (nclass == 1)
 	    strcpy(cl, translateChar(STRING_ELT(klass, 0)));
 	else {
-	    int i;
 	    strcpy(cl, "c('");
-	    for (i = 0; i < nclass; i++) {
+	    for (int i = 0; i < nclass; i++) {
 		if (i > 0) strcat(cl, "', '");
 		strcat(cl, translateChar(STRING_ELT(klass, i)));
 	    }
@@ -472,8 +472,6 @@ SEXP attribute_hidden do_usemethod(SEXP call, SEXP op, SEXP args, SEXP env)
 	errorcall(call, _("no applicable method for '%s' applied to an object of class \"%s\""),
 		  translateChar(STRING_ELT(generic, 0)), cl);
     }
-    /* Not reached */
-    return R_NilValue;
 }
 
 /*
@@ -491,7 +489,10 @@ static SEXP fixcall(SEXP call, SEXP args)
 	if(TAG(t) != R_NilValue) {
 		found = 0;
 		for(s = call; CDR(s) != R_NilValue; s = CDR(s))
-		    if(TAG(CDR(s)) == TAG(t)) found = 1;
+		    if(TAG(CDR(s)) == TAG(t)) {
+			found = 1;
+			break;
+		    }
 		if( !found ) {
 			SETCDR(s, allocList(1));
 			SET_TAG(CDR(s), TAG(t));
@@ -502,20 +503,67 @@ static SEXP fixcall(SEXP call, SEXP args)
     return call;
 }
 
+/*
+   equalS3Signature: compares "signature" and "left.right"
+   all arguments must be non-null
+*/
+static
+Rboolean equalS3Signature(const char *signature, const char *left,
+			 const char *right) {
+
+    const char *s = signature;
+    const char *a;
+
+    for(a = left; *a; s++, a++) {
+	if (*s != *a)
+	    return FALSE;
+    }
+    if (*s++ != '.')
+	return FALSE;
+    for(a = right; *a; s++, a++) {
+	if (*s != *a)
+	    return FALSE;
+    }
+    return (*s == 0) ? TRUE : FALSE;
+}
+
+
+static R_INLINE SEXP getPrimitive(SEXP symbol)
+{
+    SEXP value = SYMVALUE(symbol);
+    if (TYPEOF(value) == PROMSXP) {
+	PROTECT(value);
+	value = eval(value, R_GlobalEnv);
+	UNPROTECT(1);
+	SET_NAMED(value, 2);
+    }
+    if (TYPEOF(value) == BUILTINSXP || TYPEOF(value) == SPECIALSXP)
+        return value;
+
+    if (TYPEOF(value) == CLOSXP) {
+	/* probably means a package redefined the base function so
+	   try to get the real thing from the internal table of
+	   primitives */
+	value = R_Primitive(CHAR(PRINTNAME(symbol)));
+    } else
+	value = R_NilValue;
+
+    return value;
+}
+
 /* If NextMethod has any arguments the first must be the generic */
 /* the second the object and any remaining are matched with the */
 /* formals of the chosen method. */
 
-#define ARGUSED(x) LEVELS(x)
 
 /* This is a special .Internal */
 SEXP attribute_hidden do_nextmethod(SEXP call, SEXP op, SEXP args, SEXP env)
 {
-    char buf[512], b[512], bb[512], tbuf[10];
     const char *sb, *sg, *sk;
-    SEXP ans, s, t, klass, method, matchedarg, generic, nextfun;
-    SEXP sysp, m, formals, actuals, tmp, newcall;
-    SEXP a, group, basename;
+    SEXP ans, s, t, klass, method, matchedarg, generic;
+    SEXP nextfun, nextfunSignature;
+    SEXP sysp, formals, newcall;
+    SEXP group, basename;
     SEXP callenv, defenv;
     RCNTXT *cptr;
     int i, j;
@@ -538,86 +586,36 @@ SEXP attribute_hidden do_nextmethod(SEXP call, SEXP op, SEXP args, SEXP env)
     if (TYPEOF(CAR(cptr->call)) == LANGSXP)
        error(_("'NextMethod' called from an anonymous function"));
 
+    readS3VarsFromFrame(sysp, &generic, &group, &klass, &method,
+			&callenv, &defenv);
+
     /* Find dispatching environments. Promises shouldn't occur, but
        check to be on the safe side.  If the variables are not in the
        environment (the method was called outside a method dispatch)
        then chose reasonable defaults. */
-    callenv = findVarInFrame3(R_GlobalContext->sysparent,
-			      R_dot_GenericCallEnv, TRUE);
     if (TYPEOF(callenv) == PROMSXP)
 	callenv = eval(callenv, R_BaseEnv);
     else if (callenv == R_UnboundValue)
-	    callenv = env;
-    defenv = findVarInFrame3(R_GlobalContext->sysparent,
-			     R_dot_GenericDefEnv, TRUE);
+	callenv = env;
     if (TYPEOF(defenv) == PROMSXP) defenv = eval(defenv, R_BaseEnv);
     else if (defenv == R_UnboundValue) defenv = R_GlobalEnv;
 
     /* set up the arglist */
-    if (TYPEOF(CAR(cptr->call)) == CLOSXP)
-	// e.g., in do.call(function(x) NextMethod('foo'),list())
-	s = CAR(cptr->call);
-    else
-	s = R_LookupMethod(CAR(cptr->call), env, callenv, defenv);
-    if (TYPEOF(s) == SYMSXP && s == R_UnboundValue)
-	error(_("no calling generic was found: was a method called directly?"));
+    s = cptr->callfun;
+
     if (TYPEOF(s) != CLOSXP){ /* R_LookupMethod looked for a function */
-	errorcall(R_NilValue,
+	if (s == R_UnboundValue)
+	    error(_("no calling generic was found: was a method called directly?"));
+	else
+	    errorcall(R_NilValue,
 		  _("'function' is not a function, but of type %d"),
 		  TYPEOF(s));
     }
     /* get formals and actuals; attach the names of the formals to
        the actuals, expanding any ... that occurs */
     formals = FORMALS(s);
-    PROTECT(actuals = matchArgs(formals, cptr->promargs, call));
-
-    i = 0;
-    for(s = formals, t = actuals; s != R_NilValue; s = CDR(s), t = CDR(t)) {
-	SET_TAG(t, TAG(s));
-	if(TAG(t) == R_DotsSymbol) i = length(CAR(t));
-    }
-    if(i) {   /* we need to expand out the dots */
-	PROTECT(t = allocList(i+length(actuals)-1));
-	for(s = actuals, m = t; s != R_NilValue; s = CDR(s)) {
-	    if(TYPEOF(CAR(s)) == DOTSXP) {
-		for(i = 1, a = CAR(s); a != R_NilValue;
-		    a = CDR(a), i++, m = CDR(m)) {
-		    snprintf(tbuf, 10, "..%d", i);
-		    SET_TAG(m, mkSYMSXP(mkChar(tbuf), R_UnboundValue));
-		    SETCAR(m, CAR(a));
-		}
-	    } else {
-		SET_TAG(m, TAG(s));
-		SETCAR(m, CAR(s));
-		m = CDR(m);
-	    }
-	}
-	UNPROTECT(1);
-	actuals = t;
-    }
-    PROTECT(actuals);
+    PROTECT(matchedarg = patchArgsByActuals(formals, cptr->promargs, cptr->cloenv));
 
-
-    /* we can't duplicate because it would force the promises */
-    /* so we do our own duplication of the promargs */
-
-    PROTECT(matchedarg = allocList(length(cptr->promargs)));
-    for (t = matchedarg, s = cptr->promargs; t != R_NilValue;
-	 s = CDR(s), t = CDR(t)) {
-	SETCAR(t, CAR(s));
-	SET_TAG(t, TAG(s));
-    }
-    for (t = matchedarg; t != R_NilValue; t = CDR(t)) {
-	for (m = actuals; m != R_NilValue; m = CDR(m))
-	    if (CAR(m) == CAR(t))  {
-		if (CAR(m) == R_MissingArg) {
-		    tmp = findVarInFrame3(cptr->cloenv, TAG(m), TRUE);
-		    if (tmp == R_MissingArg) break;
-		}
-		SETCAR(t, mkPROMISE(TAG(m), cptr->cloenv));
-		break;
-	   }
-    }
     /*
       Now see if there were any other arguments passed in
       Currently we seem to only allow named args to change
@@ -645,114 +643,96 @@ SEXP attribute_hidden do_nextmethod(SEXP call, SEXP op, SEXP args, SEXP env)
       the second argument to NextMethod is another option but
       isn't currently used).
     */
-    klass = findVarInFrame3(R_GlobalContext->sysparent,
-			    R_dot_Class, TRUE);
-
     if (klass == R_UnboundValue) {
+	/* we can get the object from actuals directly, but this
+	   branch seems to be very cold if not dead */
 	s = GetObject(cptr);
 	if (!isObject(s)) error(_("object not specified"));
 	klass = getAttrib(s, R_ClassSymbol);
     }
 
     /* the generic comes from either the sysparent or it's named */
-    generic = findVarInFrame3(R_GlobalContext->sysparent,
-			      R_dot_Generic, TRUE);
     if (generic == R_UnboundValue)
 	generic = eval(CAR(args), env);
-    if( generic == R_NilValue )
+    if (generic == R_NilValue)
 	error(_("generic function not specified"));
     PROTECT(generic);
 
-    if (!isString(generic) || length(generic) != 1)
+    if (!isString(generic) || LENGTH(generic) != 1)
 	error(_("invalid generic argument to 'NextMethod'"));
 
     if (CHAR(STRING_ELT(generic, 0))[0] == '\0')
 	error(_("generic function not specified"));
 
     /* determine whether we are in a Group dispatch */
-
-    group = findVarInFrame3(R_GlobalContext->sysparent,
-			    R_dot_Group, TRUE);
-    if (group == R_UnboundValue) PROTECT(group = mkString(""));
-    else PROTECT(group);
-
-    if (!isString(group) || length(group) != 1)
-	error(_("invalid 'group' argument found in 'NextMethod'"));
-
     /* determine the root: either the group or the generic will be it */
-
-    if (CHAR(STRING_ELT(group, 0))[0] == '\0') basename = generic;
-    else basename = group;
+    if (group == R_UnboundValue) {
+	group = R_BlankScalarString;
+	basename = generic;
+    } else {
+	if (!isString(group) || LENGTH(group) != 1)
+	    error(_("invalid 'group' argument found in 'NextMethod'"));
+	if (CHAR(STRING_ELT(group, 0))[0] == '\0') basename = generic;
+	else basename = group;
+    }
+    PROTECT(group);
 
     nextfun = R_NilValue;
+    nextfunSignature = R_NilValue;
 
     /*
        Find the method currently being invoked and jump over the current call
        If t is R_UnboundValue then we called the current method directly
     */
-
-    method = findVarInFrame3(R_GlobalContext->sysparent,
-			     R_dot_Method, TRUE);
-    if( method != R_UnboundValue) {
-	const char *ss;
-	if( !isString(method) )
+    const void *vmax = vmaxget(); /* needed for translateChar */
+    const char *b = NULL;
+    if (method != R_UnboundValue) {
+	if (!isString(method))
 	    error(_("wrong value for .Method"));
-	for(i = 0; i < length(method); i++) {
-	    ss = translateChar(STRING_ELT(method, i));
-	    if(strlen(ss) >= 512)
-		error(_("method name too long in '%s'"), ss);
-	    snprintf(b, 512, "%s", ss);
-	    if(strlen(b)) break;
+	for(i = 0; i < LENGTH(method); i++) {
+	    b = translateChar(STRING_ELT(method, i));
+	    if (strlen(b)) break;
 	}
 	/* for binary operators check that the second argument's method
 	   is the same or absent */
-	for(j = i; j < length(method); j++) {
-	    const char *ss = translateChar(STRING_ELT(method, j));
-	    if(strlen(ss) >= 512)
-		error(_("method name too long in '%s'"), ss);
-	    snprintf(bb, 512, "%s", ss);
+	for(j = i; j < LENGTH(method); j++) {
+	    const char *bb = translateChar(STRING_ELT(method, j));
 	    if (strlen(bb) && strcmp(b,bb))
 		warning(_("Incompatible methods ignored"));
 	}
     }
     else {
-	if(strlen(CHAR(PRINTNAME(CAR(cptr->call)))) >= 512)
-	   error(_("call name too long in '%s'"),
-		 EncodeChar(PRINTNAME(CAR(cptr->call))));
-	snprintf(b, 512, "%s", CHAR(PRINTNAME(CAR(cptr->call))));
+	b = CHAR(PRINTNAME(CAR(cptr->call)));
     }
 
     sb = translateChar(STRING_ELT(basename, 0));
-    for (j = 0; j < length(klass); j++) {
+    Rboolean foundSignature = FALSE;
+    for (j = 0; j < LENGTH(klass); j++) {
 	sk = translateChar(STRING_ELT(klass, j));
-	if(strlen(sb) + strlen(sk) + 2 > 512)
-	    error(_("class name too long in '%s'"), sb);
-	snprintf(buf, 512, "%s.%s", sb, sk);
-	if (!strcmp(buf, b)) break;
+	if (equalS3Signature(b, sb, sk)) { /* b == sb.sk */
+	    foundSignature = TRUE;
+	    break;
+	}
     }
 
-    if (!strcmp(buf, b)) /* we found a match and start from there */
+    if (foundSignature) /* we found a match and start from there */
       j++;
     else
-      j = 0;  /*no match so start with the first element of .Class */
+      j = 0;  /* no match so start with the first element of .Class */
 
     /* we need the value of i on exit from the for loop to figure out
 	   how many classes to drop. */
 
     sg = translateChar(STRING_ELT(generic, 0));
-    for (i = j ; i < length(klass); i++) {
+    for (i = j ; i < LENGTH(klass); i++) {
 	sk = translateChar(STRING_ELT(klass, i));
-	if(strlen(sg) + strlen(sk) + 2 > 512)
-	    error(_("class name too long in '%s'"), sg);
-	snprintf(buf, 512, "%s.%s", sg, sk);
-	nextfun = R_LookupMethod(install(buf), env, callenv, defenv);
+	nextfunSignature = installS3Signature(sg, sk);
+	nextfun = R_LookupMethod(nextfunSignature, env, callenv, defenv);
 	if (isFunction(nextfun)) break;
 	if (group != R_UnboundValue) {
 	    /* if not Generic.foo, look for Group.foo */
-	    if(strlen(sb) + strlen(sk) + 2 > 512)
-		error(_("class name too long in '%s'"), sb);
-	    snprintf(buf, 512, "%s.%s", sb, sk);
-	    nextfun = R_LookupMethod(install(buf), env, callenv, defenv);
+	    nextfunSignature = installS3Signature(sb, sk);
+	    nextfun = R_LookupMethod(nextfunSignature, env, callenv, defenv);
 	    if(isFunction(nextfun))
 		break;
 	}
@@ -760,8 +740,8 @@ SEXP attribute_hidden do_nextmethod(SEXP call, SEXP op, SEXP args, SEXP env)
 	    break;
     }
     if (!isFunction(nextfun)) {
-	snprintf(buf, 512, "%s.default", sg);
-	nextfun = R_LookupMethod(install(buf), env, callenv, defenv);
+	nextfunSignature = installS3Signature(sg, "default");
+	nextfun = R_LookupMethod(nextfunSignature, env, callenv, defenv);
 	/* If there is no default method, try the generic itself,
 	   provided it is primitive or a wrapper for a .Internal
 	   function of the same name.
@@ -769,55 +749,58 @@ SEXP attribute_hidden do_nextmethod(SEXP call, SEXP op, SEXP args, SEXP env)
 	if (!isFunction(nextfun)) {
 	    t = install(sg);
 	    nextfun = findVar(t, env);
-	    if (TYPEOF(nextfun) == PROMSXP)
+	    if (TYPEOF(nextfun) == PROMSXP) {
+		PROTECT(nextfun);
 		nextfun = eval(nextfun, env);
+		UNPROTECT(1);
+	    }
 	    if (!isFunction(nextfun))
 		error(_("no method to invoke"));
 	    if (TYPEOF(nextfun) == CLOSXP) {
 		if (INTERNAL(t) != R_NilValue)
 		    nextfun = INTERNAL(t);
-		else
-		    error(_("no method to invoke"));
+		else {
+		    nextfun = getPrimitive(t);
+		    if (nextfun == R_NilValue)
+		        error(_("no method to invoke"));
+		}
 	    }
 	}
     }
-    PROTECT(s = allocVector(STRSXP, length(klass) - i));
-    PROTECT(klass = duplicate(klass));
-    PROTECT(m = allocSExp(ENVSXP));
-    for (j = 0; j < length(s); j++)
-	SET_STRING_ELT(s, j, duplicate(STRING_ELT(klass, i++)));
-    setAttrib(s, install("previous"), klass);
-    defineVar(R_dot_Class, s, m);
+    PROTECT(nextfun);
+    PROTECT(s = stringSuffix(klass, i));
+    setAttrib(s, R_PreviousSymbol, klass);
     /* It is possible that if a method was called directly that
 	'method' is unset */
     if (method != R_UnboundValue) {
 	/* for Ops we need `method' to be a vector */
 	PROTECT(method = duplicate(method));
-	for(j = 0; j < length(method); j++) {
+	for(j = 0; j < LENGTH(method); j++) {
 	    if (strlen(CHAR(STRING_ELT(method,j))))
-		SET_STRING_ELT(method, j,  mkChar(buf));
+		SET_STRING_ELT(method, j,  PRINTNAME(nextfunSignature));
 	}
     } else
-	PROTECT(method = mkString(buf));
-    defineVar(R_dot_Method, method, m);
-    defineVar(R_dot_GenericCallEnv, callenv, m);
-    defineVar(R_dot_GenericDefEnv, defenv, m);
+	PROTECT(method = PRINTNAME(nextfunSignature));
 
-    method = install(buf);
+    SEXP newvars = PROTECT(createS3Vars(
+	generic,
+	group,
+	s,
+	method,
+	callenv,
+	defenv
+    ));
 
-    defineVar(R_dot_Generic, generic, m);
-
-    defineVar(R_dot_Group, group, m);
-
-    SETCAR(newcall, method);
+    SETCAR(newcall, nextfunSignature);
 
     /* applyMethod expects that the parent of the caller is the caller
        of the generic, so fixup by brute force. This should fix
        PR#15267 --pd */
     R_GlobalContext->sysparent = callenv;
 
-    ans = applyMethod(newcall, nextfun, matchedarg, env, m);
-    UNPROTECT(10);
+    ans = applyMethod(newcall, nextfun, matchedarg, env, newvars);
+    vmaxset(vmax);
+    UNPROTECT(8);
     return(ans);
 }
 
@@ -827,17 +810,17 @@ SEXP attribute_hidden do_unclass(SEXP call, SEXP op, SEXP args, SEXP env)
     checkArity(op, args);
     check1arg(args, call, "x");
 
-    switch(TYPEOF(CAR(args))) {
-    case ENVSXP:
-	errorcall(call, _("cannot unclass an environment"));
-	break;
-    case EXTPTRSXP:
-	errorcall(call, _("cannot unclass an external pointer"));
-	break;
-    default:
-	break;
-    }
     if (isObject(CAR(args))) {
+	switch(TYPEOF(CAR(args))) {
+	case ENVSXP:
+	    errorcall(call, _("cannot unclass an environment"));
+	    break;
+	case EXTPTRSXP:
+	    errorcall(call, _("cannot unclass an external pointer"));
+	    break;
+	default:
+	    break;
+	}
 	if (MAYBE_REFERENCED(CAR(args)))
 	    SETCAR(args, shallow_duplicate(CAR(args)));
 	setAttrib(CAR(args), R_ClassSymbol, R_NilValue);
@@ -845,7 +828,32 @@ SEXP attribute_hidden do_unclass(SEXP call, SEXP op, SEXP args, SEXP env)
     return CAR(args);
 }
 
+/** Version of inherits() that supports S4 inheritance and implicit
+    classes.  The inlined inherits() does not have access to private
+    entry points R_data_class() and R_data_class2(). The semantics of
+    inherits2() are identical to that of the R-level inherits(),
+    except there is no translation.
+*/
 
+Rboolean attribute_hidden inherits2(SEXP x, const char *what) {
+    if (OBJECT(x)) {
+	SEXP klass;
+  
+	if(IS_S4_OBJECT(x))
+	    PROTECT(klass = R_data_class2(x));
+	else
+	    PROTECT(klass = R_data_class(x, FALSE));
+	int nclass = length(klass);
+	for (int i = 0; i < nclass; i++) {
+	    if (!strcmp(CHAR(STRING_ELT(klass, i)), what)) {
+		UNPROTECT(1);
+		return TRUE;
+	    }
+	}
+	UNPROTECT(1);
+    }
+    return FALSE;
+}
 
 /* NOTE: Fast  inherits(x, what)    in ../include/Rinlinedfuns.h
  * ----        ----------------- */
@@ -864,47 +872,35 @@ static SEXP inherits3(SEXP x, SEXP what, SEXP which)
     SEXP klass, rval = R_NilValue /* -Wall */;
 
     if(IS_S4_OBJECT(x))
-	PROTECT(klass = R_data_class2(x));
+	PROTECT(klass = R_data_class2(x)); // -> := S4_extends( "class(x)" )
     else
 	PROTECT(klass = R_data_class(x, FALSE));
-    int nclass = length(klass);
 
     if(!isString(what))
 	error(_("'what' must be a character vector"));
-    int j, nwhat = length(what);
+    int j, nwhat = LENGTH(what);
 
-    if( !isLogical(which) || (length(which) != 1) )
+    if( !isLogical(which) || (LENGTH(which) != 1) )
 	error(_("'which' must be a length 1 logical vector"));
-    int isvec = asLogical(which);
-
-#ifdef _be_too_picky_
-    if(IS_S4_OBJECT(x) && nwhat == 1 && !isvec &&
-       !isNull(R_getClassDef(translateChar(STRING_ELT(what, 0)))))
-	warning(_("use 'is()' instead of 'inherits()' on S4 objects"));
-#endif
+    Rboolean isvec = asLogical(which);
 
     if(isvec)
 	PROTECT(rval = allocVector(INTSXP, nwhat));
 
     for(j = 0; j < nwhat; j++) {
-	const char *ss = translateChar(STRING_ELT(what, j)); int i;
-	if(isvec)
-	    INTEGER(rval)[j] = 0;
-	for(i = 0; i < nclass; i++) {
-	    if(!strcmp(translateChar(STRING_ELT(klass, i)), ss)) {
-		if(isvec)
-		    INTEGER(rval)[j] = i+1;
-		else {
-		    UNPROTECT(1);
-		    return mkTrue();
-		}
-		break;
-	    }
+	const char *ss = translateChar(STRING_ELT(what, j));
+	int i = stringPositionTr(klass, ss);
+	if (isvec)
+	    INTEGER(rval)[j] = i+1; /* 0 when ss is not in klass */
+	else if (i >= 0) {
+	    vmaxset(vmax);
+	    UNPROTECT(1);
+	    return mkTrue();
 	}
     }
     vmaxset(vmax);
     if(!isvec) {
-    	UNPROTECT(1);
+	UNPROTECT(1);
 	return mkFalse();
     }
     UNPROTECT(2);
@@ -942,12 +938,15 @@ SEXP attribute_hidden do_inherits(SEXP call, SEXP op, SEXP args, SEXP env)
 int R_check_class_and_super(SEXP x, const char **valid, SEXP rho)
 {
     int ans;
-    SEXP cl = getAttrib(x, R_ClassSymbol);
-    const char *class = CHAR(asChar(cl));
+    SEXP cl = PROTECT(asChar(getAttrib(x, R_ClassSymbol)));
+    const char *class = CHAR(cl);
     for (ans = 0; ; ans++) {
 	if (!strlen(valid[ans])) // empty string
 	    break;
-	if (!strcmp(class, valid[ans])) return ans;
+	if (!strcmp(class, valid[ans])) {
+	    UNPROTECT(1); /* cl */
+	    return ans;
+	}
     }
     /* if not found directly, now search the non-virtual super classes :*/
     if(IS_S4_OBJECT(x)) {
@@ -955,31 +954,31 @@ int R_check_class_and_super(SEXP x, const char **valid, SEXP rho)
 	   .selectSuperClasses(getClass("....")@contains, dropVirtual=TRUE)  */
 	SEXP classExts, superCl, _call;
 	static SEXP s_contains = NULL, s_selectSuperCl = NULL;
-	int i;
 	if(!s_contains) {
 	    s_contains      = install("contains");
 	    s_selectSuperCl = install(".selectSuperClasses");
 	}
-
-	PROTECT(classExts = R_do_slot(R_getClassDef(class), s_contains));
+	SEXP classDef = PROTECT(R_getClassDef(class));
+	PROTECT(classExts = R_do_slot(classDef, s_contains));
 	PROTECT(_call = lang3(s_selectSuperCl, classExts,
 			      /* dropVirtual = */ ScalarLogical(1)));
 	superCl = eval(_call, rho);
-	UNPROTECT(2);
+	UNPROTECT(3); /* _call, classExts, classDef */
 	PROTECT(superCl);
-	for(i=0; i < length(superCl); i++) {
+	for(int i=0; i < LENGTH(superCl); i++) {
 	    const char *s_class = CHAR(STRING_ELT(superCl, i));
 	    for (ans = 0; ; ans++) {
 		if (!strlen(valid[ans]))
 		    break;
 		if (!strcmp(s_class, valid[ans])) {
-		    UNPROTECT(1);
+		    UNPROTECT(2); /* superCl, cl */
 		    return ans;
 		}
 	    }
 	}
-	UNPROTECT(1);
+	UNPROTECT(1); /* superCl */
     }
+    UNPROTECT(1); /* cl */
     return -1;
 }
 
@@ -1012,7 +1011,10 @@ int R_check_class_etc(SEXP x, const char **valid)
 	if(!isEnvironment(rho))
 	    error(_("could not find correct environment; please report!"));
     }
-    return R_check_class_and_super(x, valid, rho);
+    PROTECT(rho);
+    int res = R_check_class_and_super(x, valid, rho);
+    UNPROTECT(1);
+    return res;
 }
 
 /* standardGeneric:  uses a pointer to R_standardGeneric, to be
@@ -1043,6 +1045,7 @@ R_stdGen_ptr_t R_set_standardGeneric_ptr(R_stdGen_ptr_t val, SEXP envir)
     return old;
 }
 
+// R's .isMethodsDispatchOn() -> do_S4on() ->
 static SEXP R_isMethodsDispatchOn(SEXP onOff)
 {
     R_stdGen_ptr_t old = R_get_standardGeneric_ptr();
@@ -1058,9 +1061,7 @@ static SEXP R_isMethodsDispatchOn(SEXP onOff)
 	    // so not already on
 	    // This may not work correctly: the default arg is incorrect.
 	    warning("R_isMethodsDispatchOn(TRUE) called -- may not work correctly");
-	    // FIXME: use call = PROTECT(lang1(install("initMethodDispatch")));
-	    SEXP call = PROTECT(allocList(2));
-	    SETCAR(call, install("initMethodDispatch"));
+	    SEXP call = PROTECT(lang1(install("initMethodDispatch")));
 	    eval(call, R_MethodsNamespace); // only works with methods loaded
 	    UNPROTECT(1);
 	}
@@ -1082,7 +1083,7 @@ Rboolean isMethodsDispatchOn(void)
 
    It seems it is not currently called with onOff = TRUE (and would
    not have worked prior to 3.0.2).
-*/ 
+*/
 attribute_hidden
 SEXP do_S4on(SEXP call, SEXP op, SEXP args, SEXP env)
 {
@@ -1180,20 +1181,19 @@ static SEXP *prim_generics;
 static SEXP *prim_mlist;
 #define DEFAULT_N_PRIM_METHODS 100
 
-/* This is used in the methods package, in src/methods_list_dispatch.c */
+// Called from methods package, ../library/methods/src/methods_list_dispatch.c
 SEXP R_set_prim_method(SEXP fname, SEXP op, SEXP code_vec, SEXP fundef,
 		       SEXP mlist)
 {
     const char *code_string;
     const void *vmax = vmaxget();
     if(!isValidString(code_vec))
-	error(_("argument 'code' must be a character string"));
+	error(_("argument '%s' must be a character string"), "code");
     code_string = translateChar(asChar(code_vec));
     /* with a NULL op, turns all primitive matching off or on (used to avoid possible infinite
      recursion in methods computations*/
     if(op == R_NilValue) {
-	SEXP value;
-	value = allowPrimitiveMethods ? mkTrue() : mkFalse();
+	SEXP value = allowPrimitiveMethods ? mkTrue() : mkFalse();
 	switch(code_string[0]) {
 	case 'c': case 'C':/* clear */
 	    allowPrimitiveMethods = FALSE; break;
@@ -1204,6 +1204,14 @@ SEXP R_set_prim_method(SEXP fname, SEXP op, SEXP code_vec, SEXP fundef,
 	}
 	return value;
     }
+    if (!isPrimitive(op)) {
+        SEXP internal = R_do_slot(op, install("internal"));
+        op = INTERNAL(installTrChar(asChar(internal)));
+        if (op == R_NilValue) {
+          error("'internal' slot does not name an internal function: %s",
+                CHAR(asChar(internal)));
+        }
+    }
     do_set_prim_method(op, code_string, fundef, mlist);
     vmaxset(vmax);
     return fname;
@@ -1231,7 +1239,7 @@ SEXP R_primitive_generic(SEXP op)
     }
 }
 
-/* This is used in the methods package, in src/methods_list_dispatch.c */
+// used in the methods package, but also here
 SEXP do_set_prim_method(SEXP op, const char *code_string, SEXP fundef,
 			SEXP mlist)
 {
@@ -1373,12 +1381,15 @@ static SEXP get_this_generic(SEXP args)
     for(i=0;  i<n; i++) {
 	SEXP rval = R_sysfunction(i, cptr);
 	if(isObject(rval)) {
+	    PROTECT(rval);
 	    SEXP generic = getAttrib(rval, gen_name);
 	    if(TYPEOF(generic) == STRSXP &&
 	       !strcmp(translateChar(asChar(generic)), fname)) {
 	      value = rval;
+	      UNPROTECT(1); /* rval */
 	      break;
 	    }
+	    UNPROTECT(1); /* rval */
 	}
     }
     UNPROTECT(1);
@@ -1437,7 +1448,7 @@ SEXP attribute_hidden
 R_possible_dispatch(SEXP call, SEXP op, SEXP args, SEXP rho,
 		    Rboolean promisedArgs)
 {
-    SEXP fundef, value, mlist=R_NilValue, s, a, b;
+    SEXP fundef, value, mlist=R_NilValue, s, a, b, suppliedvars;
     int offset;
     prim_methods_t current;
     offset = PRIMOFFSET(op);
@@ -1465,17 +1476,25 @@ R_possible_dispatch(SEXP call, SEXP op, SEXP args, SEXP rho,
 	if(isPrimitive(value))
 	    return(NULL);
 	if(isFunction(value)) {
+            if (inherits(value, "internalDispatchMethod")) {
+                return(NULL);
+            }
+            PROTECT(suppliedvars = list1(mkString(PRIMNAME(op))));
+            SET_TAG(suppliedvars, R_dot_Generic);
 	    /* found a method, call it with promised args */
 	    if(!promisedArgs) {
 		PROTECT(s = promiseArgs(CDR(call), rho));
 		if (length(s) != length(args)) error(_("dispatch error"));
 		for (a = args, b = s; a != R_NilValue; a = CDR(a), b = CDR(b))
 		    SET_PRVALUE(CAR(b), CAR(a));
-		value =  applyClosure(call, value, s, rho, R_BaseEnv);
-		UNPROTECT(1);
+		value =  applyClosure(call, value, s, rho, suppliedvars);
+		UNPROTECT(2);
 		return value;
-	    } else
-		return applyClosure(call, value, args, rho, R_BaseEnv);
+	    } else {
+		value = applyClosure(call, value, args, rho, suppliedvars);
+                UNPROTECT(1);
+                return value;
+            }
 	}
 	/* else, need to perform full method search */
     }
@@ -1490,10 +1509,10 @@ R_possible_dispatch(SEXP call, SEXP op, SEXP args, SEXP rho,
 	if (length(s) != length(args)) error(_("dispatch error"));
 	for (a = args, b = s; a != R_NilValue; a = CDR(a), b = CDR(b))
 	    SET_PRVALUE(CAR(b), CAR(a));
-	value = applyClosure(call, fundef, s, rho, R_BaseEnv);
+	value = applyClosure(call, fundef, s, rho, R_NilValue);
 	UNPROTECT(1);
     } else
-	value = applyClosure(call, fundef, args, rho, R_BaseEnv);
+	value = applyClosure(call, fundef, args, rho, R_NilValue);
     prim_methods[offset] = current;
     if(value == deferred_default_object)
 	return NULL;
@@ -1516,22 +1535,55 @@ SEXP R_do_MAKE_CLASS(const char *what)
     return(e);
 }
 
-/* this very similar, but gives NULL instead of an error for a non-existing class */
-SEXP R_getClassDef(const char *what)
+// similar, but gives NULL instead of an error for a non-existing class
+// and 'what' is never checked
+SEXP R_getClassDef_R(SEXP what)
 {
     static SEXP s_getClassDef = NULL;
-    SEXP e, call;
-    if(!what)
-	error(_("R_getClassDef(.) called with NULL string pointer"));
     if(!s_getClassDef) s_getClassDef = install("getClassDef");
-    PROTECT(call = allocVector(LANGSXP, 2));
-    SETCAR(call, s_getClassDef);
-    SETCAR(CDR(call), mkString(what));
-    e = eval(call, R_MethodsNamespace);
+    if(!isMethodsDispatchOn()) error(_("'methods' package not yet loaded"));
+    SEXP call = PROTECT(lang2(s_getClassDef, what));
+    SEXP e = eval(call, R_MethodsNamespace);
     UNPROTECT(1);
     return(e);
 }
 
+SEXP R_getClassDef(const char *what)
+{
+    if(!what)
+	error(_("R_getClassDef(.) called with NULL string pointer"));
+    SEXP s = PROTECT(mkString(what));
+    SEXP ans = R_getClassDef_R(s);
+    UNPROTECT(1); /* s */
+    return ans;
+}
+
+Rboolean R_isVirtualClass(SEXP class_def, SEXP env)
+{
+    if(!isMethodsDispatchOn()) return(FALSE);
+    static SEXP isVCl_sym = NULL;
+    if(!isVCl_sym) isVCl_sym = install("isVirtualClass");
+    SEXP call = PROTECT(lang2(isVCl_sym, class_def));
+    SEXP e = eval(call, env);
+    UNPROTECT(1);
+    // return(LOGICAL(e)[0]);
+    // more cautious:
+    return (asLogical(e) == TRUE);
+}
+
+Rboolean R_extends(SEXP class1, SEXP class2, SEXP env)
+{
+    if(!isMethodsDispatchOn()) return(FALSE);
+    static SEXP extends_sym = NULL;
+    if(!extends_sym) extends_sym = install("extends");
+    SEXP call = PROTECT(lang3(extends_sym, class1, class2));
+    SEXP e = eval(call, env);
+    UNPROTECT(1);
+    // return(LOGICAL(e)[0]);
+    // more cautious:
+    return (asLogical(e) == TRUE);
+}
+
 /* in Rinternals.h */
 SEXP R_do_new_object(SEXP class_def)
 {
@@ -1551,13 +1603,14 @@ SEXP R_do_new_object(SEXP class_def)
 	error(_("trying to generate an object from a virtual class (\"%s\")"),
 	      translateChar(asChar(e)));
     }
-    e = R_do_slot(class_def, s_className);
-    value = duplicate(R_do_slot(class_def, s_prototype));
+    PROTECT(e = R_do_slot(class_def, s_className));
+    PROTECT(value = duplicate(R_do_slot(class_def, s_prototype)));
     if(TYPEOF(value) == S4SXP || getAttrib(e, R_PackageSymbol) != R_NilValue)
     { /* Anything but an object from a base "class" (numeric, matrix,..) */
 	setAttrib(value, R_ClassSymbol, e);
 	SET_S4_OBJECT(value);
     }
+    UNPROTECT(2); /* value, e */
     vmaxset(vmax);
     return value;
 }
@@ -1612,24 +1665,32 @@ SEXP asS4(SEXP s, Rboolean flag, int complete)
     if(flag == IS_S4_OBJECT(s))
 	return s;
     PROTECT(s);
-    if(MAYBE_SHARED(s))
+    if(MAYBE_SHARED(s)) {
 	s = shallow_duplicate(s);
-    UNPROTECT(1);
+	UNPROTECT(1);
+	PROTECT(s);
+    }
     if(flag) SET_S4_OBJECT(s);
     else {
 	if(complete) {
 	    SEXP value;
 	    /* TENTATIVE:  how much does this change? */
 	    if((value = R_getS4DataSlot(s, ANYSXP))
-	       != R_NilValue && !IS_S4_OBJECT(value))
+	       != R_NilValue && !IS_S4_OBJECT(value)) {
+	      UNPROTECT(1);
 	      return value;
+	    }
 	    /* else no plausible S3 object*/
 	    else if(complete == 1) /* ordinary case (2, for conditional) */
 	      error(_("object of class \"%s\" does not correspond to a valid S3 object"),
 		      CHAR(STRING_ELT(R_data_class(s, FALSE), 0)));
-	    else return s; /*  unchanged */
+	    else {
+		UNPROTECT(1);
+		return s; /*  unchanged */
+	    }
 	}
 	UNSET_S4_OBJECT(s);
     }
+    UNPROTECT(1);
     return s;
 }
diff --git a/src/main/options.c b/src/main/options.c
index 1b2da4d..3275aa2 100644
--- a/src/main/options.c
+++ b/src/main/options.c
@@ -1,7 +1,7 @@
 /*
  *  R : A Computer Language for Statistical Data Analysis
  *  Copyright (C) 1995, 1996  Robert Gentleman and Ross Ihaka
- *  Copyright (C) 1998-2014   The R Core Team.
+ *  Copyright (C) 1998-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
@@ -15,7 +15,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  */
 
 #ifdef HAVE_CONFIG_H
@@ -25,6 +25,7 @@
 #include "Defn.h"
 #include <Internal.h>
 #include "Print.h"
+#include <Rinternals.h>
 
 /* The global var. R_Expressions is in Defn.h */
 #define R_MIN_EXPRESSIONS_OPT	25
@@ -72,6 +73,10 @@
  *	"warning.expression"
  *	"nwarnings"
 
+ *	"matprod"
+ *      "PCRE_study"
+ *      "PCRE_use_JIT"
+
  *
  * S additionally/instead has (and one might think about some)
  * "free",	"keep"
@@ -175,6 +180,7 @@ Rboolean Rf_GetOptionDeviceAsk(void)
 static SEXP SetOption(SEXP tag, SEXP value)
 {
     SEXP opt, old, t;
+    PROTECT(value);
     t = opt = SYMVALUE(Options());
     if (!isList(opt))
 	error(_("corrupted options list"));
@@ -186,8 +192,10 @@ static SEXP SetOption(SEXP tag, SEXP value)
 	    if (TAG(CDR(t)) == tag) {
 		old = CAR(CDR(t));
 		SETCDR(t, CDDR(t));
+		UNPROTECT(1); /* value */
 		return old;
 	    }
+	UNPROTECT(1); /* value */
 	return R_NilValue;
     }
     /* If the option is new, a new slot */
@@ -195,14 +203,13 @@ static SEXP SetOption(SEXP tag, SEXP value)
     if (opt == R_NilValue) {
 	while (CDR(t) != R_NilValue)
 	    t = CDR(t);
-	PROTECT(value);
 	SETCDR(t, allocList(1));
-	UNPROTECT(1);
 	opt = CDR(t);
 	SET_TAG(opt, tag);
     }
     old = CAR(opt);
     SETCAR(opt, value);
+    UNPROTECT(1); /* value */
     return old;
 }
 
@@ -241,9 +248,9 @@ void attribute_hidden InitOptions(void)
     char *p;
 
 #ifdef HAVE_RL_COMPLETION_MATCHES
-    PROTECT(v = val = allocList(17));
+    PROTECT(v = val = allocList(21));
 #else
-    PROTECT(v = val = allocList(16));
+    PROTECT(v = val = allocList(20));
 #endif
 
     SET_TAG(v, install("prompt"));
@@ -316,6 +323,34 @@ void attribute_hidden InitOptions(void)
     SETCAR(v, ScalarLogical(R_CBoundsCheck));
     v = CDR(v);
 
+    SET_TAG(v, install("matprod"));
+    switch(R_Matprod) {
+	case MATPROD_DEFAULT: p = "default"; break;
+	case MATPROD_INTERNAL: p = "internal"; break;
+	case MATPROD_BLAS: p = "blas"; break;
+	case MATPROD_DEFAULT_SIMD: p = "default.simd"; break;
+    }
+    SETCAR(v, mkString(p));
+    v = CDR(v);
+
+    SET_TAG(v, install("PCRE_study"));
+    if (R_PCRE_study == -1) 
+	SETCAR(v, ScalarLogical(TRUE));
+    else if (R_PCRE_study == -2) 
+	SETCAR(v, ScalarLogical(FALSE));
+    else
+	SETCAR(v, ScalarInteger(R_PCRE_study));
+    v = CDR(v);
+
+    SET_TAG(v, install("PCRE_use_JIT"));
+    SETCAR(v, ScalarLogical(R_PCRE_use_JIT));
+    v = CDR(v);
+
+    SET_TAG(v, install("PCRE_limit_recursion"));
+    R_PCRE_limit_recursion = NA_LOGICAL;
+    SETCAR(v, ScalarLogical(R_PCRE_limit_recursion));
+    v = CDR(v);
+
 #ifdef HAVE_RL_COMPLETION_MATCHES
     /* value from Rf_initialize_R */
     SET_TAG(v, install("rl_word_breaks"));
@@ -328,6 +363,16 @@ void attribute_hidden InitOptions(void)
 }
 
 
+SEXP attribute_hidden do_getOption(SEXP call, SEXP op, SEXP args, SEXP rho)
+{
+    checkArity(op, args);
+    SEXP x = CAR(args);
+    if (!isString(x) || LENGTH(x) != 1)
+	error(_("'%s' must be a character string"), "x");
+    return duplicate(GetOption1(installTrChar(STRING_ELT(x, 0))));
+}
+
+
 /* This needs to manage R_Visible */
 SEXP attribute_hidden do_options(SEXP call, SEXP op, SEXP args, SEXP rho)
 {
@@ -347,6 +392,7 @@ SEXP attribute_hidden do_options(SEXP call, SEXP op, SEXP args, SEXP rho)
        would apply to R_SetOption* too.
     */
 
+    checkArity(op, args);
     if (args == R_NilValue) {
 	/* This is the zero argument case.
 	   We alloc up a vector list and write the system values into it.
@@ -460,13 +506,13 @@ SEXP attribute_hidden do_options(SEXP call, SEXP op, SEXP args, SEXP rho)
 	    }
 	    else if (streql(CHAR(namei), "editor") && isString(argi)) {
 		SEXP s =  asChar(argi);
-		if (s == NA_STRING || length(s) == 0)
+		if (s == NA_STRING || LENGTH(s) == 0)
 		    error(_("invalid value for '%s'"), CHAR(namei));
 		SET_VECTOR_ELT(value, i, SetOption(tag, ScalarString(s)));
 	    }
 	    else if (streql(CHAR(namei), "continue")) {
 		SEXP s =  asChar(argi);
-		if (s == NA_STRING || length(s) == 0)
+		if (s == NA_STRING || LENGTH(s) == 0)
 		    error(_("invalid value for '%s'"), CHAR(namei));
 		/* We want to make sure these are in the native encoding */
 		SET_VECTOR_ELT(value, i,
@@ -474,7 +520,7 @@ SEXP attribute_hidden do_options(SEXP call, SEXP op, SEXP args, SEXP rho)
 	    }
 	    else if (streql(CHAR(namei), "prompt")) {
 		SEXP s =  asChar(argi);
-		if (s == NA_STRING || length(s) == 0)
+		if (s == NA_STRING || LENGTH(s) == 0)
 		    error(_("invalid value for '%s'"), CHAR(namei));
 		/* We want to make sure these are in the native encoding */
 		SET_VECTOR_ELT(value, i,
@@ -493,7 +539,7 @@ SEXP attribute_hidden do_options(SEXP call, SEXP op, SEXP args, SEXP rho)
 		SET_VECTOR_ELT(value, i, SetOption(tag, ScalarLogical(k)));
 	    }
 	    else if (streql(CHAR(namei), "warn")) {
-		if (!isNumeric(argi) || length(argi) != 1)
+		if (!isNumeric(argi) || LENGTH(argi) != 1)
 		    error(_("invalid value for '%s'"), CHAR(namei));
 		SET_VECTOR_ELT(value, i, SetOption(tag, argi));
 	    }
@@ -530,7 +576,7 @@ SEXP attribute_hidden do_options(SEXP call, SEXP op, SEXP args, SEXP rho)
 	    }
 /* handle this here to avoid GetOption during error handling */
 	    else if ( streql(CHAR(namei), "show.error.messages") ) {
-		if( !isLogical(argi) && length(argi) != 1 )
+		if( !isLogical(argi) && LENGTH(argi) != 1 )
 		    error(_("invalid value for '%s'"), CHAR(namei));
 		SET_VECTOR_ELT(value, i, SetOption(tag, argi));
 		R_ShowErrorMessages = LOGICAL(argi)[0];
@@ -546,10 +592,16 @@ SEXP attribute_hidden do_options(SEXP call, SEXP op, SEXP args, SEXP rho)
 		SET_VECTOR_ELT(value, i, SetOption(tag, ScalarLogical(k)));
 	    }
 	    else if (streql(CHAR(namei), "OutDec")) {
-		if (TYPEOF(argi) != STRSXP || LENGTH(argi) != 1 ||
-		    strlen(CHAR(STRING_ELT(argi, 0))) !=1)
+		if (TYPEOF(argi) != STRSXP || LENGTH(argi) != 1)
 		    error(_("invalid value for '%s'"), CHAR(namei));
-		OutDec = CHAR(STRING_ELT(argi, 0))[0];
+		static char sdec[11];
+		if(R_nchar(STRING_ELT(argi, 0), Chars,
+			   /* allowNA = */ FALSE, /* keepNA = */ FALSE,
+			   "OutDec") != 1) // will become an error
+		    warning(_("'OutDec' must be a string of one character"));
+		strncpy(sdec, CHAR(STRING_ELT(argi, 0)), 10);
+		sdec[10] = '\0';
+		OutDec = sdec;
 		SET_VECTOR_ELT(value, i, SetOption(tag, duplicate(argi)));
 	    }
 	    else if (streql(CHAR(namei), "max.contour.segments")) {
@@ -628,6 +680,53 @@ SEXP attribute_hidden do_options(SEXP call, SEXP op, SEXP args, SEXP rho)
 		R_CBoundsCheck = k;
 		SET_VECTOR_ELT(value, i, SetOption(tag, ScalarLogical(k)));
 	    }
+	    else if (streql(CHAR(namei), "matprod")) {
+		SEXP s = asChar(argi);
+		if (s == NA_STRING || LENGTH(s) == 0)
+		    error(_("invalid value for '%s'"), CHAR(namei));
+		if (streql(CHAR(s), "default"))
+		    R_Matprod = MATPROD_DEFAULT;
+		else if (streql(CHAR(s), "internal"))
+		    R_Matprod = MATPROD_INTERNAL;
+		else if (streql(CHAR(s), "blas"))
+		    R_Matprod = MATPROD_BLAS;
+		else if (streql(CHAR(s), "default.simd")) {
+		    R_Matprod = MATPROD_DEFAULT_SIMD;
+#if !defined(_OPENMP) || !defined(HAVE_OPENMP_SIMDRED)
+		    warning(_("OpenMP SIMD is not supported in this build of R"));
+#endif
+		} else
+		    error(_("invalid value for '%s'"), CHAR(namei));
+		SET_VECTOR_ELT(value, i, SetOption(tag, duplicate(argi)));
+	    }
+	    else if (streql(CHAR(namei), "PCRE_study")) {
+		if (TYPEOF(argi) == LGLSXP) {
+		    int k = asLogical(argi) > 0;
+		    R_PCRE_study = k ? -1 : -2;
+		    SET_VECTOR_ELT(value, i, 
+				   SetOption(tag, ScalarLogical(k)));
+		} else {
+		    R_PCRE_study = asInteger(argi);
+		    if (R_PCRE_study < 0) {
+			R_PCRE_study = -2;
+			SET_VECTOR_ELT(value, i, 
+				       SetOption(tag, ScalarLogical(-2)));
+		    } else
+			SET_VECTOR_ELT(value, i, 
+				       SetOption(tag, ScalarInteger(R_PCRE_study)));
+		}
+	    }
+	    else if (streql(CHAR(namei), "PCRE_use_JIT")) {
+		int use_JIT = asLogical(argi);
+		R_PCRE_use_JIT = (use_JIT > 0); // NA_LOGICAL is < 0
+		SET_VECTOR_ELT(value, i, 
+			       SetOption(tag, ScalarLogical(R_PCRE_use_JIT)));
+	    }
+	    else if (streql(CHAR(namei), "PCRE_limit_recursion")) {
+		R_PCRE_limit_recursion = asLogical(argi);
+		SET_VECTOR_ELT(value, i, 
+			       SetOption(tag, ScalarLogical(R_PCRE_limit_recursion)));
+	    }
 	    else {
 		SET_VECTOR_ELT(value, i, SetOption(tag, duplicate(argi)));
 	    }
@@ -637,7 +736,7 @@ SEXP attribute_hidden do_options(SEXP call, SEXP op, SEXP args, SEXP rho)
 	    const char *tag;
 	    if (!isString(argi) || LENGTH(argi) <= 0)
 		error(_("invalid argument"));
-	    tag = CHAR(STRING_ELT(argi, 0));
+	    tag = translateChar(STRING_ELT(argi, 0));
 	    if (streql(tag, "par.ask.default")) {
 		error(_("\"par.ask.default\" has been replaced by \"device.ask.default\""));
 	    }
diff --git a/src/main/paste.c b/src/main/paste.c
index cf41d23..6767b79 100644
--- a/src/main/paste.c
+++ b/src/main/paste.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--2014  The R Core Team
+ *  Copyright (C) 1997--2015  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
@@ -15,7 +15,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  *
  *
  *  See ./printutils.c	 for general remarks on Printing
@@ -106,7 +106,7 @@ SEXP attribute_hidden do_paste(SEXP call, SEXP op, SEXP args, SEXP env)
 	    /* formerly in R code: moved to C for speed */
 	    SEXP call, xj = VECTOR_ELT(x, j);
 	    if(OBJECT(xj)) { /* method dispatch */
-		PROTECT(call = lang2(install("as.character"), xj));
+		PROTECT(call = lang2(R_AsCharacterSymbol, xj));
 		SET_VECTOR_ELT(x, j, eval(call, env));
 		UNPROTECT(1);
 	    } else if (isSymbol(xj))
@@ -117,8 +117,8 @@ SEXP attribute_hidden do_paste(SEXP call, SEXP op, SEXP args, SEXP env)
 	    if (!isString(VECTOR_ELT(x, j)))
 		error(_("non-string argument to internal 'paste'"));
 	}
-	if(xlength(VECTOR_ELT(x, j)) > maxlen)
-	    maxlen = xlength(VECTOR_ELT(x, j));
+	if(XLENGTH(VECTOR_ELT(x, j)) > maxlen)
+	    maxlen = XLENGTH(VECTOR_ELT(x, j));
     }
     if(maxlen == 0)
 	return (!isNull(collapse)) ? mkString("") : allocVector(STRSXP, 0);
@@ -142,7 +142,7 @@ SEXP attribute_hidden do_paste(SEXP call, SEXP op, SEXP args, SEXP env)
 
 	pwidth = 0;
 	for (j = 0; j < nx; j++) {
-	    k = xlength(VECTOR_ELT(x, j));
+	    k = XLENGTH(VECTOR_ELT(x, j));
 	    if (k > 0) {
 		SEXP cs = STRING_ELT(VECTOR_ELT(x, j), i % k);
 		if(IS_UTF8(cs)) use_UTF8 = TRUE;
@@ -152,7 +152,7 @@ SEXP attribute_hidden do_paste(SEXP call, SEXP op, SEXP args, SEXP env)
 	if (use_Bytes) use_UTF8 = FALSE;
 	vmax = vmaxget();
 	for (j = 0; j < nx; j++) {
-	    k = xlength(VECTOR_ELT(x, j));
+	    k = XLENGTH(VECTOR_ELT(x, j));
 	    if (k > 0) {
 		if(use_Bytes)
 		    pwidth += strlen(CHAR(STRING_ELT(VECTOR_ELT(x, j), i % k)));
@@ -175,7 +175,7 @@ SEXP attribute_hidden do_paste(SEXP call, SEXP op, SEXP args, SEXP env)
 	cbuf = buf = R_AllocStringBuffer(pwidth, &cbuff);
 	vmax = vmaxget();
 	for (j = 0; j < nx; j++) {
-	    k = xlength(VECTOR_ELT(x, j));
+	    k = XLENGTH(VECTOR_ELT(x, j));
 	    if (k > 0) {
 		SEXP cs = STRING_ELT(VECTOR_ELT(x, j), i % k);
 		if (use_UTF8) {
@@ -281,7 +281,7 @@ SEXP attribute_hidden do_filepath(SEXP call, SEXP op, SEXP args, SEXP env)
 {
     SEXP ans, sep, x;
     int i, j, k, ln, maxlen, nx, nzero, pwidth, sepw;
-    const char *s, *csep, *cbuf; 
+    const char *s, *csep, *cbuf;
     char *buf;
 
     checkArity(op, args);
@@ -309,7 +309,7 @@ SEXP attribute_hidden do_filepath(SEXP call, SEXP op, SEXP args, SEXP env)
 	    /* formerly in R code: moved to C for speed */
 	    SEXP call, xj = VECTOR_ELT(x, j);
 	    if(OBJECT(xj)) { /* method dispatch */
-		PROTECT(call = lang2(install("as.character"), xj));
+		PROTECT(call = lang2(R_AsCharacterSymbol, xj));
 		SET_VECTOR_ELT(x, j, eval(call, env));
 		UNPROTECT(1);
 	    } else if (isSymbol(xj))
@@ -320,7 +320,7 @@ SEXP attribute_hidden do_filepath(SEXP call, SEXP op, SEXP args, SEXP env)
 	    if (!isString(VECTOR_ELT(x, j)))
 		error(_("non-string argument to Internal paste"));
 	}
-	ln = length(VECTOR_ELT(x, j));
+	ln = LENGTH(VECTOR_ELT(x, j));
 	if(ln > maxlen) maxlen = ln;
 	if(ln == 0) {nzero++; break;}
     }
@@ -331,13 +331,13 @@ SEXP attribute_hidden do_filepath(SEXP call, SEXP op, SEXP args, SEXP env)
     for (i = 0; i < maxlen; i++) {
 	pwidth = 0;
 	for (j = 0; j < nx; j++) {
-	    k = length(VECTOR_ELT(x, j));
+	    k = LENGTH(VECTOR_ELT(x, j));
 	    pwidth += (int) strlen(translateChar(STRING_ELT(VECTOR_ELT(x, j), i % k)));
 	}
 	pwidth += (nx - 1) * sepw;
 	cbuf = buf = R_AllocStringBuffer(pwidth, &cbuff);
 	for (j = 0; j < nx; j++) {
-	    k = length(VECTOR_ELT(x, j));
+	    k = LENGTH(VECTOR_ELT(x, j));
 	    if (k > 0) {
 		s = translateChar(STRING_ELT(VECTOR_ELT(x, j), i % k));
 		strcpy(buf, s);
@@ -366,7 +366,7 @@ SEXP attribute_hidden do_filepath(SEXP call, SEXP op, SEXP args, SEXP env)
 }
 
 /* format.default(x, trim, digits, nsmall, width, justify, na.encode,
-		  scientific) */
+		  scientific, decimal.mark) */
 SEXP attribute_hidden do_format(SEXP call, SEXP op, SEXP args, SEXP env)
 {
     SEXP l, x, y, swd;
@@ -381,10 +381,7 @@ SEXP attribute_hidden do_format(SEXP call, SEXP op, SEXP args, SEXP env)
     scikeep = R_print.scipen;
 
     if (isEnvironment(x = CAR(args))) {
-	PROTECT(y = allocVector(STRSXP, 1));
-	SET_STRING_ELT(y, 0, mkChar(EncodeEnvironment(x)));
-	UNPROTECT(1);
-	return y;
+	return mkString(EncodeEnvironment(x));
     }
     else if (!isVector(x))
 	error(_("first argument must be atomic"));
@@ -434,6 +431,26 @@ SEXP attribute_hidden do_format(SEXP call, SEXP op, SEXP args, SEXP env)
     } else
 	error(_("invalid '%s' argument"), "scientific");
     if(sci != NA_INTEGER) R_print.scipen = sci;
+    args = CDR(args);
+    // copy/paste from "OutDec" part of ./options.c
+    if (TYPEOF(CAR(args)) != STRSXP || LENGTH(CAR(args)) != 1)
+	error(_("invalid '%s' argument"), "decimal.mark");
+    char *my_OutDec;
+    if(STRING_ELT(CAR(args), 0) == NA_STRING)
+	my_OutDec = OutDec; // default
+    else {
+	static char sdec[11];
+// not warning here by default for now
+#ifdef _WARN_decimal_mark_non_1
+	if(R_nchar(STRING_ELT(CAR(args), 0), Chars,
+		   /* allowNA = */ FALSE, /* keepNA = */ FALSE,
+		   "decimal.mark") != 1) // will become an error
+	    warning(_("'decimal.mark' must be a string of one character"));
+#endif
+	strncpy(sdec, CHAR(STRING_ELT(CAR(args), 0)), 10);
+	sdec[10] = '\0';
+	my_OutDec = sdec;
+    }
 
     if ((n = XLENGTH(x)) <= 0) {
 	PROTECT(y = allocVector(STRSXP, 0));
@@ -467,7 +484,7 @@ SEXP attribute_hidden do_format(SEXP call, SEXP op, SEXP args, SEXP env)
 	    w = imax2(w, wd);
 	    PROTECT(y = allocVector(STRSXP, n));
 	    for (i = 0; i < n; i++) {
-		strp = EncodeReal(REAL(x)[i], w, d, e, OutDec);
+		strp = EncodeReal0(REAL(x)[i], w, d, e, my_OutDec);
 		SET_STRING_ELT(y, i, mkChar(strp));
 	    }
 	    break;
@@ -478,7 +495,7 @@ SEXP attribute_hidden do_format(SEXP call, SEXP op, SEXP args, SEXP env)
 	    w = imax2(w, wd); wi = imax2(wi, wd);
 	    PROTECT(y = allocVector(STRSXP, n));
 	    for (i = 0; i < n; i++) {
-		strp = EncodeComplex(COMPLEX(x)[i], w, d, e, wi, di, ei, OutDec);
+		strp = EncodeComplex(COMPLEX(x)[i], w, d, e, wi, di, ei, my_OutDec);
 		SET_STRING_ELT(y, i, mkChar(strp));
 	    }
 	    break;
@@ -527,7 +544,8 @@ SEXP attribute_hidden do_format(SEXP call, SEXP op, SEXP args, SEXP env)
 		if (STRING_ELT(xx, i) != NA_STRING) {
 		    il = Rstrlen(STRING_ELT(xx, i), 0);
 		    cnt = imax2(cnt, LENGTH(STRING_ELT(xx, i)) + imax2(0, w-il));
-		} else if (na) cnt  = imax2(cnt, R_print.na_width + imax2(0, w-R_print.na_width));
+		} else if (na)
+		    cnt = imax2(cnt, R_print.na_width + imax2(0, w-R_print.na_width));
 	    R_CheckStack2(cnt+1);
 	    char buff[cnt+1];
 	    PROTECT(y = allocVector(STRSXP, n));
@@ -554,7 +572,8 @@ SEXP attribute_hidden do_format(SEXP call, SEXP op, SEXP args, SEXP env)
 		}
 	    }
 	}
-	UNPROTECT(1);
+	UNPROTECT(2); /* xx , y */
+	PROTECT(y);
 	break;
 	default:
 	    error(_("Impossible mode ( x )")); y = R_NilValue;/* -Wall */
@@ -570,7 +589,7 @@ SEXP attribute_hidden do_format(SEXP call, SEXP op, SEXP args, SEXP env)
     /* In case something else forgets to set PrintDefaults(), PR#14477 */
     R_print.scipen = scikeep;
 
-    UNPROTECT(1);
+    UNPROTECT(1); /* y */
     return y;
 }
 
@@ -593,7 +612,6 @@ SEXP attribute_hidden do_formatinfo(SEXP call, SEXP op, SEXP args, SEXP env)
     R_xlen_t n = XLENGTH(x);
     PrintDefaults();
 
-    digits = asInteger(CADR(args));
     if (!isNull(CADR(args))) {
 	digits = asInteger(CADR(args));
 	if (digits == NA_INTEGER || digits < R_MIN_DIGITS_OPT
diff --git a/src/main/platform.c b/src/main/platform.c
index bb4a614..a2dfc93 100644
--- a/src/main/platform.c
+++ b/src/main/platform.c
@@ -1,7 +1,7 @@
 /*
  *  R : A Computer Language for Statistical Data Analysis
  *  Copyright (C) 1995, 1996  Robert Gentleman and Ross Ihaka
- *  Copyright (C) 1998--2013 The R Core Team
+ *  Copyright (C) 1998--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
@@ -15,7 +15,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  */
 
 
@@ -43,6 +43,9 @@
 #include <Rinterface.h>
 #include <Fileio.h>
 #include <ctype.h>			/* toupper */
+#include <limits.h>
+#include <string.h>
+#include <stdlib.h>			/* for realpath */
 #include <time.h>			/* for ctime */
 
 # include <errno.h>
@@ -171,8 +174,8 @@ static void Init_R_Platform(SEXP rho)
     SET_VECTOR_ELT(value, 4, mkString("little"));
 #endif
 /* pkgType should be "mac.binary" for CRAN build *only*, not for all
-   AQUA builds. Also we want to be able to use "mac.binary.leopard",
-   "mac.binary.mavericks" and similar. */
+   AQUA builds. Also we want to be able to use "mac.binary.mavericks",
+   "mac.binary.el-capitan" and similar. */
 #ifdef PLATFORM_PKGTYPE
     SET_VECTOR_ELT(value, 5, mkString(PLATFORM_PKGTYPE));
 #else /* unix default */
@@ -300,9 +303,9 @@ SEXP attribute_hidden do_fileshow(SEXP call, SEXP op, SEXP args, SEXP rho)
     dl = (Rboolean) asLogical(CAR(args)); args = CDR(args);
     pg = CAR(args);
     n = 0;			/* -Wall */
-    if (!isString(fn) || (n = length(fn)) < 1)
+    if (!isString(fn) || (n = LENGTH(fn)) < 1)
 	error(_("invalid filename specification"));
-    if (!isString(hd) || length(hd) != n)
+    if (!isString(hd) || LENGTH(hd) != n)
 	error(_("invalid '%s' argument"), "headers");
     if (!isString(tl))
 	error(_("invalid '%s' argument"), "title");
@@ -319,11 +322,11 @@ SEXP attribute_hidden do_fileshow(SEXP call, SEXP op, SEXP args, SEXP rho)
 	    f[i] = acopy_string(translateChar(el));
 #endif
 	else
-            error(_("invalid filename specification"));
+	    error(_("invalid filename specification"));
 	if (STRING_ELT(hd, i) != NA_STRING)
 	    h[i] = acopy_string(translateChar(STRING_ELT(hd, i)));
 	else
-            error(_("invalid '%s' argument"), "headers");
+	    error(_("invalid '%s' argument"), "headers");
     }
     if (isValidStringF(tl))
 	t = acopy_string(translateChar(STRING_ELT(tl, 0)));
@@ -331,10 +334,10 @@ SEXP attribute_hidden do_fileshow(SEXP call, SEXP op, SEXP args, SEXP rho)
 	t = "";
     if (isValidStringF(pg)) {
 	SEXP pg0 = STRING_ELT(pg, 0);
-        if (pg0 != NA_STRING)
-            pager = acopy_string(CHAR(pg0));
-        else
-            error(_("invalid '%s' argument"), "pager");
+	if (pg0 != NA_STRING)
+	    pager = acopy_string(CHAR(pg0));
+	else
+	    error(_("invalid '%s' argument"), "pager");
     } else
 	pager = "";
     R_ShowFiles(n, f, h, t, dl, pager);
@@ -384,12 +387,13 @@ SEXP attribute_hidden do_fileappend(SEXP call, SEXP op, SEXP args, SEXP rho)
     int n, n1, n2;
 
     checkArity(op, args);
-    f1 = CAR(args); n1 = length(f1);
-    f2 = CADR(args); n2 = length(f2);
+    f1 = CAR(args);
+    f2 = CADR(args);
     if (!isString(f1))
 	error(_("invalid '%s' argument"), "file1");
     if (!isString(f2))
 	error(_("invalid '%s' argument"), "file2");
+    n1 = LENGTH(f1); n2 = LENGTH(f2);
     if (n1 < 1)
 	error(_("nothing to append to"));
     if (n2 < 1)
@@ -448,7 +452,7 @@ SEXP attribute_hidden do_filecreate(SEXP call, SEXP op, SEXP args, SEXP rho)
 	error(_("invalid filename argument"));
     show = asLogical(CADR(args));
     if (show == NA_LOGICAL) show = 0;
-    n = length(fn);
+    n = LENGTH(fn);
     PROTECT(ans = allocVector(LGLSXP, n));
     for (i = 0; i < n; i++) {
 	LOGICAL(ans)[i] = 0;
@@ -473,7 +477,7 @@ SEXP attribute_hidden do_fileremove(SEXP call, SEXP op, SEXP args, SEXP rho)
     f = CAR(args);
     if (!isString(f))
 	error(_("invalid first filename"));
-    n = length(f);
+    n = LENGTH(f);
     PROTECT(ans = allocVector(LGLSXP, n));
     for (i = 0; i < n; i++) {
 	if (STRING_ELT(f, i) != NA_STRING) {
@@ -539,12 +543,13 @@ SEXP attribute_hidden do_filesymlink(SEXP call, SEXP op, SEXP args, SEXP rho)
     int i;
 #endif
     checkArity(op, args);
-    f1 = CAR(args); n1 = length(f1);
-    f2 = CADR(args); n2 = length(f2);
+    f1 = CAR(args);
+    f2 = CADR(args);
     if (!isString(f1))
 	error(_("invalid first filename"));
     if (!isString(f2))
 	error(_("invalid second filename"));
+    n1 = LENGTH(f1); n2 = LENGTH(f2);
     if (n1 < 1)
 	error(_("nothing to link"));
     if (n2 < 1)
@@ -567,10 +572,13 @@ SEXP attribute_hidden do_filesymlink(SEXP call, SEXP op, SEXP args, SEXP rho)
 	    LOGICAL(ans)[i] = 0;
 	else {
 #ifdef Win32
-	    wchar_t from[PATH_MAX+1], *to;
+	    wchar_t from[PATH_MAX+1], *to, *p;
 	    struct _stati64 sb;
 	    from[PATH_MAX] = L'\0';
-	    wcsncpy(from, filenameToWchar(STRING_ELT(f1, i%n1), TRUE), PATH_MAX);
+	    p = filenameToWchar(STRING_ELT(f1, i%n1), TRUE);
+	    if (wcslen(p) >= PATH_MAX)
+	    	error(_("'%s' path too long"), "from");
+	    wcsncpy(from, p, PATH_MAX);
 	    /* This Windows system call does not accept slashes */
 	    for (wchar_t *p = from; *p; p++) if (*p == L'/') *p = L'\\';
 	    to = filenameToWchar(STRING_ELT(f2, i%n2), TRUE);
@@ -621,12 +629,13 @@ SEXP attribute_hidden do_filelink(SEXP call, SEXP op, SEXP args, SEXP rho)
     int i;
 #endif
     checkArity(op, args);
-    f1 = CAR(args); n1 = length(f1);
-    f2 = CADR(args); n2 = length(f2);
+    f1 = CAR(args);
+    f2 = CADR(args);
     if (!isString(f1))
 	error(_("invalid first filename"));
     if (!isString(f2))
 	error(_("invalid second filename"));
+    n1 = LENGTH(f1); n2 = LENGTH(f2);
     if (n1 < 1)
 	error(_("nothing to link"));
     if (n2 < 1)
@@ -640,9 +649,11 @@ SEXP attribute_hidden do_filelink(SEXP call, SEXP op, SEXP args, SEXP rho)
 	    LOGICAL(ans)[i] = 0;
 	else {
 #ifdef Win32
-	    wchar_t from[PATH_MAX+1], *to;
-	    from[PATH_MAX] = L'\0';
-	    wcsncpy(from, filenameToWchar(STRING_ELT(f1, i%n1), TRUE), PATH_MAX);
+	    wchar_t from[PATH_MAX+1], *to, *p;
+	    p = filenameToWchar(STRING_ELT(f1, i%n1), TRUE);
+	    if (wcslen(p) >= PATH_MAX)
+	    	error(_("'%s' path too long"), "from");
+	    wcscpy(from, p);
 	    to = filenameToWchar(STRING_ELT(f2, i%n2), TRUE);
 	    LOGICAL(ans)[i] = CreateHardLinkW(to, from, NULL) != 0;
 	    if(!LOGICAL(ans)[i]) {
@@ -699,13 +710,14 @@ SEXP attribute_hidden do_filerename(SEXP call, SEXP op, SEXP args, SEXP rho)
 #endif
 
     checkArity(op, args);
-    f1 = CAR(args); n1 = length(f1);
-    f2 = CADR(args); n2 = length(f2);
+    f1 = CAR(args);
+    f2 = CADR(args);
     if (!isString(f1))
 	error(_("invalid '%s' argument"), "from");
     if (!isString(f2))
 	error(_("invalid '%s' argument"), "to");
-    if (n2 != n1)
+    n1 = LENGTH(f1); n2 = LENGTH(f2);
+   if (n2 != n1)
 	error(_("'from' and 'to' are of different lengths"));
     PROTECT(ans = allocVector(LGLSXP, n1));
     for (i = 0; i < n1; i++) {
@@ -777,10 +789,11 @@ SEXP attribute_hidden do_fileinfo(SEXP call, SEXP op, SEXP args, SEXP rho)
     SEXP fn, ans, ansnames, fsize, mtime, ctime, atime, isdir,
 	mode, xxclass;
 #ifdef UNIX_EXTRAS
-    SEXP uid, gid, uname, grname;
+    SEXP uid = R_NilValue, gid = R_NilValue,
+	uname = R_NilValue, grname = R_NilValue; // silence -Wall
 #endif
 #ifdef Win32
-    SEXP exe;
+    SEXP exe = R_NilValue;
     struct _stati64 sb;
 #else
     struct stat sb;
@@ -790,17 +803,19 @@ SEXP attribute_hidden do_fileinfo(SEXP call, SEXP op, SEXP args, SEXP rho)
     fn = CAR(args);
     if (!isString(fn))
 	error(_("invalid filename argument"));
-    int n = length(fn);
+    int extras = asInteger(CADR(args));
+    if(extras == NA_INTEGER)
+	error(_("invalid '%s' argument"), "extra_cols");
+    int n = LENGTH(fn), ncols = 6;
+    if(extras) {
 #ifdef UNIX_EXTRAS
-    PROTECT(ans = allocVector(VECSXP, 10));
-    PROTECT(ansnames = allocVector(STRSXP, 10));
+	ncols = 10;
 #elif defined(Win32)
-    PROTECT(ans = allocVector(VECSXP, 7));
-    PROTECT(ansnames = allocVector(STRSXP, 7));
-#else
-    PROTECT(ans = allocVector(VECSXP, 6));
-    PROTECT(ansnames = allocVector(STRSXP, 6));
+	ncols = 7;
 #endif
+    }
+    PROTECT(ans = allocVector(VECSXP, ncols));
+    PROTECT(ansnames = allocVector(STRSXP, ncols));
     fsize = SET_VECTOR_ELT(ans, 0, allocVector(REALSXP, n));
     SET_STRING_ELT(ansnames, 0, mkChar("size"));
     isdir = SET_VECTOR_ELT(ans, 1, allocVector(LGLSXP, n));
@@ -813,20 +828,22 @@ SEXP attribute_hidden do_fileinfo(SEXP call, SEXP op, SEXP args, SEXP rho)
     SET_STRING_ELT(ansnames, 4, mkChar("ctime"));
     atime = SET_VECTOR_ELT(ans, 5, allocVector(REALSXP, n));
     SET_STRING_ELT(ansnames, 5, mkChar("atime"));
+    if (extras) {
 #ifdef UNIX_EXTRAS
-    uid = SET_VECTOR_ELT(ans, 6, allocVector(INTSXP, n));
-    SET_STRING_ELT(ansnames, 6, mkChar("uid"));
-    gid = SET_VECTOR_ELT(ans, 7, allocVector(INTSXP, n));
-    SET_STRING_ELT(ansnames, 7, mkChar("gid"));
-    uname = SET_VECTOR_ELT(ans, 8, allocVector(STRSXP, n));
-    SET_STRING_ELT(ansnames, 8, mkChar("uname"));
-    grname = SET_VECTOR_ELT(ans, 9, allocVector(STRSXP, n));
-    SET_STRING_ELT(ansnames, 9, mkChar("grname"));
+	uid = SET_VECTOR_ELT(ans, 6, allocVector(INTSXP, n));
+	SET_STRING_ELT(ansnames, 6, mkChar("uid"));
+	gid = SET_VECTOR_ELT(ans, 7, allocVector(INTSXP, n));
+	SET_STRING_ELT(ansnames, 7, mkChar("gid"));
+	uname = SET_VECTOR_ELT(ans, 8, allocVector(STRSXP, n));
+	SET_STRING_ELT(ansnames, 8, mkChar("uname"));
+	grname = SET_VECTOR_ELT(ans, 9, allocVector(STRSXP, n));
+	SET_STRING_ELT(ansnames, 9, mkChar("grname"));
 #endif
 #ifdef Win32
-    exe = SET_VECTOR_ELT(ans, 6, allocVector(STRSXP, n));
-    SET_STRING_ELT(ansnames, 6, mkChar("exe"));
+	exe = SET_VECTOR_ELT(ans, 6, allocVector(STRSXP, n));
+	SET_STRING_ELT(ansnames, 6, mkChar("exe"));
 #endif
+    }
     for (int i = 0; i < n; i++) {
 #ifdef Win32
 	wchar_t *wfn = filenameToWchar(STRING_ELT(fn, i), TRUE);
@@ -837,9 +854,9 @@ SEXP attribute_hidden do_fileinfo(SEXP call, SEXP op, SEXP args, SEXP rho)
 	size_t len = wcslen(wfn);
 	if (len) {
 	    wchar_t *p = wfn + (len - 1);
-            if (len > 1 && (*p == L'/' || *p == L'\\') &&
-            	*(p-1) != L':') *p = 0;
-        }
+	    if (len > 1 && (*p == L'/' || *p == L'\\') &&
+		*(p-1) != L':') *p = 0;
+	}
 #else
 	const char *efn = R_ExpandFileName(translateChar(STRING_ELT(fn, i)));
 #endif
@@ -865,7 +882,39 @@ SEXP attribute_hidden do_fileinfo(SEXP call, SEXP op, SEXP args, SEXP rho)
 	    REAL(atime)[i] = (double) STAT_TIMESPEC(sb, st_atim).tv_sec
 		+ 1e-9 * (double) STAT_TIMESPEC(sb, st_atim).tv_nsec;
 #else
-	    /* FIXME: there are higher-resolution ways to do this on Windows */
+#ifdef Win32
+#define WINDOWS_TICK 10000000
+#define SEC_TO_UNIX_EPOCH 11644473600LL
+	    {
+		FILETIME c_ft, a_ft, m_ft; 
+		HANDLE h;
+		int success = 0;
+		h = CreateFileW(wfn, GENERIC_READ, 0, NULL, OPEN_EXISTING,
+				    FILE_FLAG_BACKUP_SEMANTICS, NULL);
+		if (h != INVALID_HANDLE_VALUE) {
+		    int res  = GetFileTime(h, &c_ft, &a_ft, &m_ft);
+		    CloseHandle(h);
+		    if (res) { 
+			ULARGE_INTEGER time;
+			time.LowPart = m_ft.dwLowDateTime;
+			time.HighPart = m_ft.dwHighDateTime;
+			REAL(mtime)[i] = (((double) time.QuadPart) / WINDOWS_TICK - SEC_TO_UNIX_EPOCH);
+			time.LowPart = c_ft.dwLowDateTime;
+			time.HighPart = c_ft.dwHighDateTime;
+			REAL(ctime)[i] = (((double) time.QuadPart) / WINDOWS_TICK - SEC_TO_UNIX_EPOCH);
+			time.LowPart = a_ft.dwLowDateTime;
+			time.HighPart = a_ft.dwHighDateTime;
+			REAL(atime)[i] = (((double) time.QuadPart) / WINDOWS_TICK - SEC_TO_UNIX_EPOCH);
+			success = 1;
+		    }
+		}
+		if (!success) {
+		    REAL(mtime)[i] = NA_REAL;
+		    REAL(ctime)[i] = NA_REAL;
+		    REAL(atime)[i] = NA_REAL;	
+	        }
+	    }
+#else
 	    REAL(mtime)[i] = (double) sb.st_mtime;
 	    REAL(ctime)[i] = (double) sb.st_ctime;
 	    REAL(atime)[i] = (double) sb.st_atime;
@@ -875,56 +924,59 @@ SEXP attribute_hidden do_fileinfo(SEXP call, SEXP op, SEXP args, SEXP rho)
 	    REAL(atime)[i] += STAT_TIMESPEC_NS (sb, st_atim);
 # endif
 #endif
+#endif
+	    if (extras) {
 #ifdef UNIX_EXTRAS
-	    INTEGER(uid)[i] = (int) sb.st_uid;
-	    INTEGER(gid)[i] = (int) sb.st_gid;
-
-            /* Usually all of the uid and gid values in a list of
-             * files are the same so we can avoid most of the calls
-             * to getpwuid() and getgrgid(), which can be quite slow
-             * on some systems.  (PR#15804)
-             */
-            if (i && INTEGER(uid)[i - 1] == (int) sb.st_uid)
-		SET_STRING_ELT(uname, i, STRING_ELT(uname, i - 1));
-            else {
-		struct passwd *stpwd = getpwuid(sb.st_uid);
-		SET_STRING_ELT(uname, i,
-			       stpwd ? mkChar(stpwd->pw_name): NA_STRING);
-            }
-
-            if (i && INTEGER(gid)[i - 1] == (int) sb.st_gid)
-		SET_STRING_ELT(grname, i, STRING_ELT(grname, i - 1));
-            else {
-		struct group *stgrp = getgrgid(sb.st_gid);
-		SET_STRING_ELT(grname, i, 
-			       stgrp ? mkChar(stgrp->gr_name): NA_STRING);
-            }
+		INTEGER(uid)[i] = (int) sb.st_uid;
+		INTEGER(gid)[i] = (int) sb.st_gid;
+
+		/* Usually all of the uid and gid values in a list of
+		 * files are the same so we can avoid most of the calls
+		 * to getpwuid() and getgrgid(), which can be quite slow
+		 * on some systems.  (PR#15804)
+		 */
+		if (i && INTEGER(uid)[i - 1] == (int) sb.st_uid)
+		    SET_STRING_ELT(uname, i, STRING_ELT(uname, i - 1));
+		else {
+		    struct passwd *stpwd = getpwuid(sb.st_uid);
+		    SET_STRING_ELT(uname, i,
+				   stpwd ? mkChar(stpwd->pw_name): NA_STRING);
+		}
+
+		if (i && INTEGER(gid)[i - 1] == (int) sb.st_gid)
+		    SET_STRING_ELT(grname, i, STRING_ELT(grname, i - 1));
+		else {
+		    struct group *stgrp = getgrgid(sb.st_gid);
+		    SET_STRING_ELT(grname, i,
+				   stgrp ? mkChar(stgrp->gr_name): NA_STRING);
+		}
 #endif
 #ifdef Win32
-	    {
-		char *s="no";
-		DWORD type;
-		if (GetBinaryTypeW(wfn, &type))
-		    switch(type) {
-		    case SCS_64BIT_BINARY:
-			s = "win64";
-			break;
-		    case SCS_32BIT_BINARY:
-			s = "win32";
-			break;
-		    case SCS_DOS_BINARY:
-		    case SCS_PIF_BINARY:
-			s = "msdos";
-			break;
-		    case SCS_WOW_BINARY:
-			s = "win16";
-			break;
-		    default:
-			s = "unknown";
-		    }
-		SET_STRING_ELT(exe, i, mkChar(s));
-	    }
+		{
+		    char *s="no";
+		    DWORD type;
+		    if (GetBinaryTypeW(wfn, &type))
+			switch(type) {
+			case SCS_64BIT_BINARY:
+			    s = "win64";
+			    break;
+			case SCS_32BIT_BINARY:
+			    s = "win32";
+			    break;
+			case SCS_DOS_BINARY:
+			case SCS_PIF_BINARY:
+			    s = "msdos";
+			    break;
+			case SCS_WOW_BINARY:
+			    s = "win16";
+			    break;
+			default:
+			    s = "unknown";
+			}
+		    SET_STRING_ELT(exe, i, mkChar(s));
+		}
 #endif
+	    }
 	} else {
 	    REAL(fsize)[i] = NA_REAL;
 	    LOGICAL(isdir)[i] = NA_INTEGER;
@@ -932,15 +984,17 @@ SEXP attribute_hidden do_fileinfo(SEXP call, SEXP op, SEXP args, SEXP rho)
 	    REAL(mtime)[i] = NA_REAL;
 	    REAL(ctime)[i] = NA_REAL;
 	    REAL(atime)[i] = NA_REAL;
+	    if (extras) {
 #ifdef UNIX_EXTRAS
-	    INTEGER(uid)[i] = NA_INTEGER;
-	    INTEGER(gid)[i] = NA_INTEGER;
-	    SET_STRING_ELT(uname, i, NA_STRING);
-	    SET_STRING_ELT(grname, i, NA_STRING);
+		INTEGER(uid)[i] = NA_INTEGER;
+		INTEGER(gid)[i] = NA_INTEGER;
+		SET_STRING_ELT(uname, i, NA_STRING);
+		SET_STRING_ELT(grname, i, NA_STRING);
 #endif
 #ifdef Win32
-	    SET_STRING_ELT(exe, i, NA_STRING);
+		SET_STRING_ELT(exe, i, NA_STRING);
 #endif
+	    }
 	}
     }
     setAttrib(ans, R_NamesSymbol, ansnames);
@@ -950,6 +1004,55 @@ SEXP attribute_hidden do_fileinfo(SEXP call, SEXP op, SEXP args, SEXP rho)
     return ans;
 }
 
+SEXP attribute_hidden do_direxists(SEXP call, SEXP op, SEXP args, SEXP rho)
+{
+    SEXP fn, ans;
+
+#ifdef Win32
+    struct _stati64 sb;
+#else
+    struct stat sb;
+#endif
+
+    checkArity(op, args);
+    fn = CAR(args);
+    if (!isString(fn))
+	error(_("invalid filename argument"));
+    int n = LENGTH(fn);
+    PROTECT(ans = allocVector(LGLSXP, n));
+    for (int i = 0; i < n; i++) {
+#ifdef Win32
+	wchar_t *wfn = filenameToWchar(STRING_ELT(fn, i), TRUE);
+	/* trailing \ is not valid on Windows except for the
+	   root directory on a drive, specified as "\", or "D:\",
+	   or "\\?\D:\", etc.  We remove it in other cases,
+	   to help those who think they're on Unix. */
+	size_t len = wcslen(wfn);
+	if (len) {
+	    wchar_t *p = wfn + (len - 1);
+	    if (len > 1 && (*p == L'/' || *p == L'\\') &&
+		*(p-1) != L':') *p = 0;
+	}
+#else
+	const char *efn = R_ExpandFileName(translateChar(STRING_ELT(fn, i)));
+#endif
+	if (STRING_ELT(fn, i) != NA_STRING &&
+#ifdef Win32
+	    _wstati64(wfn, &sb)
+#else
+	    /* Target not link */
+	    stat(efn, &sb)
+#endif
+	    == 0) {
+	    LOGICAL(ans)[i] = (sb.st_mode & S_IFDIR) > 0;
+
+	} else LOGICAL(ans)[i] = 0;
+    }
+    // copy names?
+    UNPROTECT(1);
+    return ans;
+}
+
 /* No longer required by POSIX, but maybe on earlier OSes */
 #ifdef HAVE_SYS_TYPES_H
 # include <sys/types.h>
@@ -1061,7 +1164,7 @@ list_files(const char *dnp, const char *stem, int *count, SEXP *pans,
 		    IF_MATCH_ADD_TO_ANS
 	    }
 
-        } // end while()
+	} // end while()
 	closedir(dir);
     }
 }
@@ -1076,9 +1179,9 @@ SEXP attribute_hidden do_listfiles(SEXP call, SEXP op, SEXP args, SEXP rho)
     if (!isString(d)) error(_("invalid '%s' argument"), "path");
     SEXP p = CAR(args); args = CDR(args);
     Rboolean pattern = FALSE;
-    if (isString(p) && length(p) >= 1 && STRING_ELT(p, 0) != NA_STRING)
+    if (isString(p) && LENGTH(p) >= 1 && STRING_ELT(p, 0) != NA_STRING)
 	pattern = TRUE;
-    else if (!isNull(p) && !(isString(p) && length(p) < 1))
+    else if (!isNull(p) && !(isString(p) && LENGTH(p) < 1))
 	error(_("invalid '%s' argument"), "pattern");
     int allfiles = asLogical(CAR(args)); args = CDR(args);
     if (allfiles == NA_LOGICAL)
@@ -1122,7 +1225,7 @@ SEXP attribute_hidden do_listfiles(SEXP call, SEXP op, SEXP args, SEXP rho)
     return ans;
 }
 
-static void list_dirs(const char *dnp, const char *nm, 
+static void list_dirs(const char *dnp, const char *nm,
 		      Rboolean full, int *count,
 		      SEXP *pans, int *countmax, PROTECT_INDEX idx,
 		      Rboolean recursive)
@@ -1164,7 +1267,7 @@ static void list_dirs(const char *dnp, const char *nm,
 		if (strcmp(de->d_name, ".") && strcmp(de->d_name, "..")) {
 		    if(recursive) {
 			char nm2[PATH_MAX];
-			snprintf(nm2, PATH_MAX, "%s%s%s", nm, R_FileSep, 
+			snprintf(nm2, PATH_MAX, "%s%s%s", nm, R_FileSep,
 				 de->d_name);
 			list_dirs(p, nm[0] ? nm2 : de->d_name, full, count,
 				  pans, countmax, idx, recursive);
@@ -1174,7 +1277,7 @@ static void list_dirs(const char *dnp, const char *nm,
 			    *countmax *= 2;
 			    REPROTECT(*pans = lengthgets(*pans, *countmax), idx);
 			}
-			SET_STRING_ELT(*pans, (*count)++, 
+			SET_STRING_ELT(*pans, (*count)++,
 				       mkChar(full ? p : de->d_name));
 		    }
 		}
@@ -1239,8 +1342,8 @@ SEXP attribute_hidden do_fileexists(SEXP call, SEXP op, SEXP args, SEXP rho)
     checkArity(op, args);
     if (!isString(file = CAR(args)))
 	error(_("invalid '%s' argument"), "file");
-    nfile = length(file);
-    ans = allocVector(LGLSXP, nfile);
+    nfile = LENGTH(file);
+    ans = PROTECT(allocVector(LGLSXP, nfile));
     for (i = 0; i < nfile; i++) {
 	LOGICAL(ans)[i] = 0;
 	if (STRING_ELT(file, i) != NA_STRING) {
@@ -1257,6 +1360,7 @@ SEXP attribute_hidden do_fileexists(SEXP call, SEXP op, SEXP args, SEXP rho)
 #endif
 	} else LOGICAL(ans)[i] = FALSE;
     }
+    UNPROTECT(1); /* ans */
     return ans;
 }
 
@@ -1296,7 +1400,7 @@ SEXP attribute_hidden do_fileaccess(SEXP call, SEXP op, SEXP args, SEXP rho)
     fn = CAR(args);
     if (!isString(fn))
 	error(_("invalid '%s' argument"), "names");
-    n = length(fn);
+    n = LENGTH(fn);
     mode = asInteger(CADR(args));
     if (mode < 0 || mode > 7) error(_("invalid '%s' argument"), "mode");
     modemask = 0;
@@ -1574,7 +1678,7 @@ SEXP attribute_hidden do_unlink(SEXP call, SEXP op, SEXP args, SEXP env)
 		globfree(&globbuf);
 	    } else failures++;
 #else /* HAVE_GLOB */
-	        failures += R_unlink(names, recursive, force);
+		failures += R_unlink(names, recursive, force);
 	    } else failures++;
 #endif
 	}
@@ -1583,69 +1687,6 @@ SEXP attribute_hidden do_unlink(SEXP call, SEXP op, SEXP args, SEXP env)
 }
 #endif
 
-#if 0
-static void chmod_one(const char *name)
-{
-    DIR *dir;
-    struct dirent *de;
-    char p[PATH_MAX];
-#ifdef Win32
-    struct _stati64 sb;
-#else
-    struct stat sb;
-#endif
-#ifndef Win32
-    mode_t mask = S_IRUSR | S_IRGRP | S_IROTH | S_IWUSR, /* 0644 */
-	dirmask = mask | S_IXUSR | S_IXGRP | S_IXOTH; /* 0755 */
-#endif
-
-    if (streql(name, ".") || streql(name, "..")) return;
-    if (!R_FileExists(name)) return;
-#ifdef Win32
-    _stati64(name, &sb);
-    chmod(name, _S_IWRITE);
-#else
-    stat(name, &sb);
-    chmod(name, (sb.st_mode | mask) & dirmask);
-#endif
-    if ((sb.st_mode & S_IFDIR) > 0) { /* a directory */
-#ifndef Win32
-	chmod(name, dirmask);
-#endif
-	if ((dir = opendir(name)) != NULL) {
-	    while ((de = readdir(dir))) {
-		if (streql(de->d_name, ".") || streql(de->d_name, ".."))
-		    continue;
-		size_t n = strlen(name);
-		if (name[n-1] == R_FileSep[0])
-		    snprintf(p, PATH_MAX, "%s%s", name, de->d_name);
-		else
-		    snprintf(p, PATH_MAX, "%s%s%s", name, R_FileSep, de->d_name);
-		chmod_one(p);
-	    }
-	    closedir(dir);
-	} else {
-	    /* we were unable to read a dir */
-	}
-    }
-}
-
-/* recursively fix up permissions: used for R CMD INSTALL and build.
-   NB: this overrides umask. */
-SEXP attribute_hidden do_dirchmod(SEXP call, SEXP op, SEXP args, SEXP env)
-{
-    SEXP dr;
-    checkArity(op, args);
-    dr = CAR(args);
-    if(!isString(dr) || length(dr) != 1)
-	error(_("invalid '%s' argument"), "dir");
-    chmod_one(translateChar(STRING_ELT(dr, 0)));
-
-    return R_NilValue;
-}
-#endif
-
-
 SEXP attribute_hidden do_getlocale(SEXP call, SEXP op, SEXP args, SEXP rho)
 {
     int cat;
@@ -1677,12 +1718,6 @@ SEXP attribute_hidden do_getlocale(SEXP call, SEXP op, SEXP args, SEXP rho)
     return mkString(p ? p : "");
 }
 
-extern void invalidate_cached_recodings(void);  /* from sysutils.c */
-
-extern void resetICUcollator(void); /* from util.c */
-
-extern void dt_invalidate_locale(); /* from Rstrptime.h */
-
 /* Locale specs are always ASCII */
 SEXP attribute_hidden do_setlocale(SEXP call, SEXP op, SEXP args, SEXP rho)
 {
@@ -1790,6 +1825,7 @@ SEXP attribute_hidden do_localeconv(SEXP call, SEXP op, SEXP args, SEXP rho)
     int i = 0;
     char buff[20];
 
+    checkArity(op, args);
     PROTECT(ans = allocVector(STRSXP, 18));
     PROTECT(ansnames = allocVector(STRSXP, 18));
     SET_STRING_ELT(ans, i, mkChar(lc->decimal_point));
@@ -1851,13 +1887,13 @@ SEXP attribute_hidden do_pathexpand(SEXP call, SEXP op, SEXP args, SEXP rho)
     fn = CAR(args);
     if (!isString(fn))
 	error(_("invalid '%s' argument"), "path");
-    n = length(fn);
+    n = LENGTH(fn);
     PROTECT(ans = allocVector(STRSXP, n));
     for (i = 0; i < n; i++) {
-        SEXP tmp = STRING_ELT(fn, i);
-        if (tmp != NA_STRING) {
-            tmp = markKnown(R_ExpandFileName(translateChar(tmp)), tmp);
-        }
+	SEXP tmp = STRING_ELT(fn, i);
+	if (tmp != NA_STRING) {
+	    tmp = markKnown(R_ExpandFileName(translateChar(tmp)), tmp);
+	}
 	SET_STRING_ELT(ans, i, tmp);
     }
     UNPROTECT(1);
@@ -1891,6 +1927,7 @@ static Rboolean R_can_use_X11(void)
 /* only actually used on Unix */
 SEXP attribute_hidden do_capabilitiesX11(SEXP call, SEXP op, SEXP args, SEXP rho)
 {
+    checkArity(op, args);
 #ifdef Unix
     return ScalarLogical(R_can_use_X11());
 #else
@@ -1912,8 +1949,8 @@ SEXP attribute_hidden do_capabilities(SEXP call, SEXP op, SEXP args, SEXP rho)
 
     checkArity(op, args);
 
-    PROTECT(ans = allocVector(LGLSXP, 16));
-    PROTECT(ansnames = allocVector(STRSXP, 16));
+    PROTECT(ans = allocVector(LGLSXP, 18));
+    PROTECT(ansnames = allocVector(STRSXP, 18));
 
     SET_STRING_ELT(ansnames, i, mkChar("jpeg"));
 #ifdef HAVE_JPEG
@@ -1974,25 +2011,13 @@ SEXP attribute_hidden do_capabilities(SEXP call, SEXP op, SEXP args, SEXP rho)
 #endif
 
     SET_STRING_ELT(ansnames, i, mkChar("http/ftp"));
-#if HAVE_INTERNET
     LOGICAL(ans)[i++] = TRUE;
-#else
-    LOGICAL(ans)[i++] = FALSE;
-#endif
 
     SET_STRING_ELT(ansnames, i, mkChar("sockets"));
-#ifdef HAVE_SOCKETS
     LOGICAL(ans)[i++] = TRUE;
-#else
-    LOGICAL(ans)[i++] = FALSE;
-#endif
 
     SET_STRING_ELT(ansnames, i, mkChar("libxml"));
-#ifdef SUPPORT_LIBXML
     LOGICAL(ans)[i++] = TRUE;
-#else
-    LOGICAL(ans)[i++] = FALSE;
-#endif
 
     SET_STRING_ELT(ansnames, i, mkChar("fifo"));
 #if (defined(HAVE_MKFIFO) && defined(HAVE_FCNTL_H)) || defined(_WIN32)
@@ -2062,51 +2087,21 @@ SEXP attribute_hidden do_capabilities(SEXP call, SEXP op, SEXP args, SEXP rho)
     LOGICAL(ans)[i++] = FALSE;
 #endif
 
-    setAttrib(ans, R_NamesSymbol, ansnames);
-    UNPROTECT(2);
-    return ans;
-}
-
-#if defined(HAVE_BSD_NETWORKING) && defined(HAVE_ARPA_INET_H)
-#include <netdb.h>
-#include <sys/socket.h>
-#include <netinet/in.h>
-#include <arpa/inet.h>
-
-SEXP attribute_hidden do_nsl(SEXP call, SEXP op, SEXP args, SEXP rho)
-{
-    SEXP ans = R_NilValue;
-    const char *name; char ip[] = "xxx.xxx.xxx.xxx";
-    struct hostent *hp;
+    SET_STRING_ELT(ansnames, i, mkChar("long.double"));
+    LOGICAL(ans)[i++] = sizeof(LDOUBLE) > sizeof(double);
 
-    checkArity(op, args);
-    if (!isString(CAR(args)) || length(CAR(args)) != 1)
-	error(_("'hostname' must be a character vector of length 1"));
-    name = translateChar(STRING_ELT(CAR(args), 0));
+    SET_STRING_ELT(ansnames, i, mkChar("libcurl"));
+#ifdef HAVE_LIBCURL
+    LOGICAL(ans)[i++] = TRUE;
+#else
+    LOGICAL(ans)[i++] = FALSE;
+#endif
 
-    hp = gethostbyname(name);
 
-    if (hp == NULL) {		/* cannot resolve the address */
-	warning(_("nsl() was unable to resolve host '%s'"), name);
-    } else {
-	if (hp->h_addrtype == AF_INET) {
-	    struct in_addr in;
-	    memcpy(&in.s_addr, *(hp->h_addr_list), sizeof (in.s_addr));
-	    strcpy(ip, inet_ntoa(in));
-	} else {
-	    warning(_("unknown format returned by C function 'gethostbyname'"));
-	}
-	ans = mkString(ip);
-    }
+    setAttrib(ans, R_NamesSymbol, ansnames);
+    UNPROTECT(2);
     return ans;
 }
-#else
-SEXP attribute_hidden do_nsl(SEXP call, SEXP op, SEXP args, SEXP rho)
-{
-    warning(_("nsl() is not supported on this platform"));
-    return R_NilValue;
-}
-#endif
 
 SEXP attribute_hidden do_sysgetpid(SEXP call, SEXP op, SEXP args, SEXP rho)
 {
@@ -2131,7 +2126,7 @@ SEXP attribute_hidden do_dircreate(SEXP call, SEXP op, SEXP args, SEXP env)
 
     checkArity(op, args);
     path = CAR(args);
-    if (!isString(path) || length(path) != 1)
+    if (!isString(path) || LENGTH(path) != 1)
 	error(_("invalid '%s' argument"), "path");
     if (STRING_ELT(path, 0) == NA_STRING) return ScalarLogical(FALSE);
     show = asLogical(CADR(args));
@@ -2191,14 +2186,17 @@ SEXP attribute_hidden do_dircreate(SEXP call, SEXP op, SEXP args, SEXP env)
 
     checkArity(op, args);
     path = CAR(args);
-    if (!isString(path) || length(path) != 1)
+    if (!isString(path) || LENGTH(path) != 1)
 	error(_("invalid '%s' argument"), "path");
     if (STRING_ELT(path, 0) == NA_STRING) return ScalarLogical(FALSE);
     show = asLogical(CADR(args));
     if (show == NA_LOGICAL) show = 0;
     recursive = asLogical(CADDR(args));
     if (recursive == NA_LOGICAL) recursive = 0;
-    wcscpy(dir, filenameToWchar(STRING_ELT(path, 0), TRUE));
+    p = filenameToWchar(STRING_ELT(path, 0), TRUE);
+    if (wcslen(p) >= MAX_PATH)
+    	error(_("'%s' too long"), "path");
+    wcsncpy(dir, p, MAX_PATH);
     for (p = dir; *p; p++) if (*p == L'/') *p = L'\\';
     /* remove trailing slashes */
     p = dir + wcslen(dir) - 1;
@@ -2222,8 +2220,13 @@ SEXP attribute_hidden do_dircreate(SEXP call, SEXP op, SEXP args, SEXP env)
     }
     res = _wmkdir(dir);
     serrno = errno;
-    if (show && res && serrno == EEXIST)
-	warning(_("'%ls' already exists"), dir);
+    if (show && res) {
+    	if (serrno == EEXIST)
+	    warning(_("'%ls' already exists"), dir);
+        else
+            warning(_("cannot create dir '%ls', reason '%s'"), dir,
+            	    strerror(serrno));
+    }
     return ScalarLogical(res == 0);
 end:
     if (show && res && serrno != EEXIST)
@@ -2241,14 +2244,14 @@ static void copyFileTime(const wchar_t *from, const wchar_t * to)
 {
     HANDLE hFrom, hTo;
     FILETIME modft;
-    
+
     hFrom = CreateFileW(from, GENERIC_READ, 0, NULL, OPEN_EXISTING,
 			FILE_FLAG_BACKUP_SEMANTICS, NULL);
     if (hFrom == INVALID_HANDLE_VALUE) return;
-    int res  = GetFileTime(hFrom, NULL, &modft, NULL);
+    int res  = GetFileTime(hFrom, NULL, NULL, &modft);
     CloseHandle(hFrom);
     if(!res) return;
-   
+
     hTo = CreateFileW(to, GENERIC_WRITE, 0, NULL, OPEN_EXISTING,
 		      FILE_FLAG_BACKUP_SEMANTICS, NULL);
     if (hTo == INVALID_HANDLE_VALUE) return;
@@ -2304,7 +2307,7 @@ static int do_copy(const wchar_t* from, const wchar_t* name, const wchar_t* to,
 		    return 1;
 		}
 		wsprintfW(p, L"%ls%\\%ls", name, de->d_name);
-		nfail += do_copy(from, p, to, over, recursive, 
+		nfail += do_copy(from, p, to, over, recursive,
 				 perms, dates, depth);
 	    }
 	    _wclosedir(dir);
@@ -2342,6 +2345,9 @@ static int do_copy(const wchar_t* from, const wchar_t* name, const wchar_t* to,
 		nfail++;
 		goto copy_error;
 	    }
+	} else if (!over) {
+	  nfail++;
+	  goto copy_error;
 	}
 	if(fp1) fclose(fp1); fp1 = NULL;
 	if(fp2) fclose(fp2); fp2 = NULL;
@@ -2375,7 +2381,7 @@ SEXP attribute_hidden do_filecopy(SEXP call, SEXP op, SEXP args, SEXP rho)
 	    error(_("invalid '%s' argument"), "to");
 	over = asLogical(CAR(args)); args = CDR(args);
 	if (over == NA_LOGICAL)
-	    error(_("invalid '%s' argument"), "over");
+	    error(_("invalid '%s' argument"), "overwrite");
 	recursive = asLogical(CAR(args)); args = CDR(args);
 	if (recursive == NA_LOGICAL)
 	    error(_("invalid '%s' argument"), "recursive");
@@ -2385,17 +2391,19 @@ SEXP attribute_hidden do_filecopy(SEXP call, SEXP op, SEXP args, SEXP rho)
 	dates = asLogical(CAR(args));
 	if (dates == NA_LOGICAL)
 	    error(_("invalid '%s' argument"), "copy.dates");
-	wcsncpy(dir,
-		filenameToWchar(STRING_ELT(to, 0), TRUE),
-		PATH_MAX);
-        dir[PATH_MAX - 1] = L'\0';		
+	p = filenameToWchar(STRING_ELT(to, 0), TRUE);
+	if (wcslen(p) >= PATH_MAX)
+	    error(_("'%s' path too long"), "to");
+	wcsncpy(dir, p, PATH_MAX);
+	dir[PATH_MAX - 1] = L'\0';
 	if (*(dir + (wcslen(dir) - 1)) !=  L'\\')
 	    wcsncat(dir, L"\\", PATH_MAX);
 	for (i = 0; i < nfiles; i++) {
 	    if (STRING_ELT(fn, i) != NA_STRING) {
-		wcsncpy(from,
-			filenameToWchar(STRING_ELT(fn, i), TRUE),
-			PATH_MAX);
+	    	p = filenameToWchar(STRING_ELT(fn, i), TRUE);
+	    	if (wcslen(p) >= PATH_MAX)
+	    	    error(_("'%s' path too long"), "from");
+		wcsncpy(from, p, PATH_MAX);
 		from[PATH_MAX - 1] = L'\0';
 		if(wcslen(from)) {
 		    /* If there was a trailing sep, this is a mistake */
@@ -2417,7 +2425,7 @@ SEXP attribute_hidden do_filecopy(SEXP call, SEXP op, SEXP args, SEXP rho)
 			    wcsncpy(from, L".\\", PATH_MAX);
 			}
 		    }
-		    nfail = do_copy(from, name, dir, over, recursive, 
+		    nfail = do_copy(from, name, dir, over, recursive,
 				    perms, dates, 1);
 		} else nfail = 1;
 	    } else nfail = 1;
@@ -2430,11 +2438,14 @@ SEXP attribute_hidden do_filecopy(SEXP call, SEXP op, SEXP args, SEXP rho)
 
 #else
 
-# ifdef HAVE_UTIMES
-#  include <sys/time.h>
-# elif defined(HAVE_UTIME)
-#  include <utime.h>
-# endif
+#if defined(HAVE_UTIMENSAT)
+# include <fcntl.h>
+# include <sys/stat.h>
+#elif defined(HAVE_UTIMES)
+# include <sys/time.h>
+#elif defined(HAVE_UTIME)
+# include <utime.h>
+#endif
 
 static void copyFileTime(const char *from, const char * to)
 {
@@ -2451,7 +2462,13 @@ static void copyFileTime(const char *from, const char * to)
     ftime = (double) sb.st_mtime;
 #endif
 
-#if defined(HAVE_UTIMES)
+#if defined(HAVE_UTIMENSAT)
+    struct timespec times[2];
+
+    times[0].tv_sec = times[1].tv_sec = (int)ftime;
+    times[0].tv_nsec = times[1].tv_nsec = (int)(1e9*(ftime - (int)ftime));
+    utimensat(AT_FDCWD, to, times, 0);
+#elif defined(HAVE_UTIMES)
     struct timeval times[2];
 
     times[0].tv_sec = times[1].tv_sec = (int)ftime;
@@ -2523,7 +2540,7 @@ static int do_copy(const char* from, const char* name, const char* to,
 		    return 1;
 		}
 		snprintf(p, PATH_MAX+1, "%s/%s", name, de->d_name);
-		nfail += do_copy(from, p, to, over, recursive, 
+		nfail += do_copy(from, p, to, over, recursive,
 				 perms, dates, depth);
 	    }
 	    closedir(dir);
@@ -2564,10 +2581,11 @@ static int do_copy(const char* from, const char* name, const char* to,
 		nfail++;
 		goto copy_error;
 	    }
-	    if(fp2) fclose(fp2); fp2 = NULL;
+	    if(fp2) {fclose(fp2); fp2 = NULL;}
 	    if(perms) chmod(dest, sb.st_mode & mask);
 	    if(dates) copyFileTime(this, dest);
-	}
+	} else if (!over)
+	    nfail++;
 copy_error:
 	if(fp2) fclose(fp2);
 	if(fp1) fclose(fp1);
@@ -2595,7 +2613,7 @@ SEXP attribute_hidden do_filecopy(SEXP call, SEXP op, SEXP args, SEXP rho)
 	    error(_("invalid '%s' argument"), "to");
 	over = asLogical(CAR(args)); args = CDR(args);
 	if (over == NA_LOGICAL)
-	    error(_("invalid '%s' argument"), "over");
+	    error(_("invalid '%s' argument"), "overwrite");
 	recursive = asLogical(CAR(args)); args = CDR(args);
 	if (recursive == NA_LOGICAL)
 	    error(_("invalid '%s' argument"), "recursive");
@@ -2608,7 +2626,7 @@ SEXP attribute_hidden do_filecopy(SEXP call, SEXP op, SEXP args, SEXP rho)
 	strncpy(dir,
 		R_ExpandFileName(translateChar(STRING_ELT(to, 0))),
 		PATH_MAX);
-        dir[PATH_MAX - 1] = '\0';
+	dir[PATH_MAX - 1] = '\0';
 	if (*(dir + (strlen(dir) - 1)) !=  '/')
 	    strncat(dir, "/", PATH_MAX);
 	for (i = 0; i < nfiles; i++) {
@@ -2616,7 +2634,7 @@ SEXP attribute_hidden do_filecopy(SEXP call, SEXP op, SEXP args, SEXP rho)
 		strncpy(from,
 			R_ExpandFileName(translateChar(STRING_ELT(fn, i))),
 			PATH_MAX);
-                from[PATH_MAX - 1] = '\0';
+		from[PATH_MAX - 1] = '\0';
 		size_t ll = strlen(from);
 		if (ll) {  // people do pass ""
 		    /* If there is a trailing sep, this is a mistake */
@@ -2625,14 +2643,14 @@ SEXP attribute_hidden do_filecopy(SEXP call, SEXP op, SEXP args, SEXP rho)
 		    p = strrchr(from, '/') ;
 		    if (p) {
 			strncpy(name, p+1, PATH_MAX);
-                        name[PATH_MAX - 1] = '\0';
+			name[PATH_MAX - 1] = '\0';
 			*(p+1) = '\0';
 		    } else {
 			strncpy(name, from, PATH_MAX);
-                        name[PATH_MAX - 1] = '\0';
+			name[PATH_MAX - 1] = '\0';
 			strncpy(from, "./", PATH_MAX);
 		    }
-		    nfail = do_copy(from, name, dir, over, recursive, 
+		    nfail = do_copy(from, name, dir, over, recursive,
 				    perms, dates, 1);
 		} else nfail = 1;
 	    } else nfail = 1;
@@ -2818,14 +2836,15 @@ SEXP attribute_hidden do_Cstack_info(SEXP call, SEXP op, SEXP args, SEXP rho)
 }
 
 #ifdef Win32
-static int winSetFileTime(const char *fn, time_t ftime)
+static int winSetFileTime(const char *fn, double ftime)
 {
     SYSTEMTIME st;
     FILETIME modft;
     struct tm *utctm;
     HANDLE hFile;
+    time_t ftimei = (time_t) ftime;
 
-    utctm = gmtime(&ftime);
+    utctm = gmtime(&ftimei);
     if (!utctm) return 0;
 
     st.wYear         = (WORD) utctm->tm_year + 1900;
@@ -2835,7 +2854,7 @@ static int winSetFileTime(const char *fn, time_t ftime)
     st.wHour         = (WORD) utctm->tm_hour;
     st.wMinute       = (WORD) utctm->tm_min;
     st.wSecond       = (WORD) utctm->tm_sec;
-    st.wMilliseconds = (WORD) 0;
+    st.wMilliseconds = (WORD) 1000*(ftime - ftimei);
     if (!SystemTimeToFileTime(&st, &modft)) return 0;
 
     hFile = CreateFile(fn, GENERIC_WRITE, 0, NULL, OPEN_EXISTING,
@@ -2852,20 +2871,28 @@ do_setFileTime(SEXP call, SEXP op, SEXP args, SEXP rho)
 {
     checkArity(op, args);
     const char *fn = translateChar(STRING_ELT(CAR(args), 0));
-    int ftime = asInteger(CADR(args)), res;
+    double ftime = asReal(CADR(args));
+    int res;
 
 #ifdef Win32
-    res  = winSetFileTime(fn, (time_t)ftime);
+    res  = winSetFileTime(fn, ftime);
+#elif defined(HAVE_UTIMENSAT)
+    struct timespec times[2];
+
+    times[0].tv_sec = times[1].tv_sec = (int)ftime;
+    times[0].tv_nsec = times[1].tv_nsec = (int)(1e9*(ftime - (int)ftime));
+
+    res = utimensat(AT_FDCWD, fn, times, 0) == 0;
 #elif defined(HAVE_UTIMES)
     struct timeval times[2];
 
-    times[0].tv_sec = times[1].tv_sec = ftime;
-    times[0].tv_usec = times[1].tv_usec = 0;
+    times[0].tv_sec = times[1].tv_sec = (int)ftime;
+    times[0].tv_usec = times[1].tv_usec = (int)(1e6*(ftime - (int)ftime));
     res = utimes(fn, times) == 0;
 #elif defined(HAVE_UTIME)
     struct utimbuf settime;
 
-    settime.actime = settime.modtime = ftime;
+    settime.actime = settime.modtime = (int)ftime;
     res = utime(fn, &settime) == 0;
 #endif
     return ScalarLogical(res);
@@ -2930,6 +2957,193 @@ SEXP attribute_hidden do_mkjunction(SEXP call, SEXP op, SEXP args, SEXP rho)
 }
 #endif
 
+#include <zlib.h>
+#include <bzlib.h>
+#include <lzma.h>
+#ifdef HAVE_PCRE_PCRE_H
+# include <pcre/pcre.h>
+#else
+# include <pcre.h>
+#endif
+
+#ifdef USE_ICU
+# ifndef USE_ICU_APPLE
+#  include <unicode/uversion.h>
+# else
+#  define U_MAX_VERSION_LENGTH 4
+#  define U_MAX_VERSION_STRING_LENGTH 20
+typedef uint8_t UVersionInfo[U_MAX_VERSION_LENGTH];
+void u_versionToString(const UVersionInfo versionArray, char *versionString);
+void u_getVersion(UVersionInfo versionArray);
+# endif
+#endif
+
+#include <iconv.h>
+#if defined(__GLIBC__)
+# include <gnu/libc-version.h>
+#endif
+
+#ifdef HAVE_LIBREADLINE
+// that ensures we have this header
+# include <readline/readline.h>
+#endif
+
+#if defined(HAVE_REALPATH) && defined(HAVE_DECL_REALPATH) && !HAVE_DECL_REALPATH
+extern char *realpath(const char *path, char *resolved_path);
+#endif
+
+#ifdef HAVE_DLFCN_H
+#include <dlfcn.h> /* for dladdr, dlsym */
+#endif
+
+#if defined(HAVE_DLADDR) && defined(HAVE_DECL_DLADDR) && !HAVE_DECL_DLADDR
+extern int dladdr(void *addr, Dl_info *info);
+#endif
+
+#if defined(HAVE_DLSYM) && defined(HAVE_DECL_DLSYM) && !HAVE_DECL_DLSYM
+extern void *dlsym(void *handle, const char *symbol);
+#endif
+
+/* extSoftVersion only detects versions of libraries that are available
+   without loading any modules; libraries available via modules are
+   treated individually (libcurlVersion(), La_version(), etc)
+*/
+SEXP attribute_hidden
+do_eSoftVersion(SEXP call, SEXP op, SEXP args, SEXP rho)
+{
+    checkArity(op, args);
+    SEXP ans = PROTECT(allocVector(STRSXP, 9));
+    SEXP nms = PROTECT(allocVector(STRSXP, 9));
+    setAttrib(ans, R_NamesSymbol, nms);
+    unsigned int i = 0;
+    char p[256];
+    snprintf(p, 256, "%s", zlibVersion());
+    SET_STRING_ELT(ans, i, mkChar(p));
+    SET_STRING_ELT(nms, i++, mkChar("zlib"));
+    snprintf(p, 256, "%s", BZ2_bzlibVersion());
+    SET_STRING_ELT(ans, i, mkChar(p));
+    SET_STRING_ELT(nms, i++, mkChar("bzlib"));
+    snprintf(p, 256, "%s", lzma_version_string());
+    SET_STRING_ELT(ans, i, mkChar(p));
+    SET_STRING_ELT(nms, i++, mkChar("xz"));
+    snprintf(p, 256, "%s", pcre_version());
+    SET_STRING_ELT(ans, i, mkChar(p));
+    SET_STRING_ELT(nms, i++, mkChar("PCRE"));
+#ifdef USE_ICU
+    UVersionInfo icu;
+    char pu[U_MAX_VERSION_STRING_LENGTH];
+    u_getVersion(icu);
+    u_versionToString(icu, pu);
+    SET_STRING_ELT(ans, i, mkChar(pu));
+#else
+    SET_STRING_ELT(ans, i, mkChar(""));
+#endif
+    SET_STRING_ELT(nms, i++, mkChar("ICU"));
+    snprintf(p, 256, "%s", tre_version());
+    SET_STRING_ELT(ans, i, mkChar(p));
+    SET_STRING_ELT(nms, i++, mkChar("TRE"));
+#ifdef _LIBICONV_VERSION
+    {
+	int ver = _libiconv_version;
+	snprintf(p, 256, "GNU libiconv %d.%d", ver/0x0100, ver%0x0100);
+    }
+#elif defined(_WIN32)
+    snprintf(p, 256, "%s", "win_iconv");
+#elif defined(__GLIBC__)
+    snprintf(p, 256, "glibc %s", gnu_get_libc_version());
+#else
+    snprintf(p, 256, "%s", "unknown");
+#endif
+    SET_STRING_ELT(ans, i, mkChar(p));
+    SET_STRING_ELT(nms, i++, mkChar("iconv"));
+#ifdef HAVE_LIBREADLINE
+    SET_STRING_ELT(ans, i, mkChar(rl_library_version));
+#else
+    SET_STRING_ELT(ans, i, mkChar(""));
+#endif
+    SET_STRING_ELT(nms, i++, mkChar("readline"));
+
+    SET_STRING_ELT(ans, i, mkChar(""));
+
+#if defined(HAVE_DLADDR) && defined(HAVE_REALPATH) && defined(HAVE_DLSYM) \
+    && defined(HAVE_DECL_RTLD_DEFAULT) && HAVE_DECL_RTLD_DEFAULT \
+    && defined(HAVE_DECL_RTLD_NEXT) && HAVE_DECL_RTLD_NEXT
+
+    /* Look for blas function dgemm and try to figure out in which
+       binary/shared library is it defined. This is based on experimentation
+       and heuristics, and depends on implementation details
+       of dynamic linkers.
+    */
+#ifdef HAVE_F77_UNDERSCORE
+    char *dgemm_name = "dgemm_";
+#else
+    char *dgemm_name = "dgemm";
+#endif
+
+    Rboolean ok = TRUE;
+
+    void *dgemm_addr = dlsym(RTLD_DEFAULT, dgemm_name);
+
+    Dl_info dl_info1, dl_info2;
+
+    if (!dladdr((void *)do_eSoftVersion, &dl_info1)) ok = FALSE;
+    if (!dladdr((void *)dladdr, &dl_info2)) ok = FALSE;
+
+    if (ok && !strcmp(dl_info1.dli_fname, dl_info2.dli_fname)) {
+
+	/* dladdr is not inside R, hence we probably have the PLT for
+	   dynamically linked symbols; lets use dlsym(RTLD_NEXT) to
+	   get the real address for dgemm.
+
+	   PLT is used on Linux and on Solaris when the main binary
+	   is _not_ position independent. PLT is not used on macOS.
+	*/
+	if (dgemm_addr != NULL) {
+
+	    /* If dgemm_addr is NULL, dgemm is statically linked and
+	       we are on Linux. On Solaris, dgemm_addr is never NULL.
+	    */
+	    void *dgemm_next_addr = dlsym(RTLD_NEXT, dgemm_name);
+	    if (dgemm_next_addr != NULL)
+
+		/* If dgemm_next_addr is NULL, dgemm is statically linked.
+		   Otherwise, it is linked dynamically and dgemm_next_addr
+		   is its true address (dgemm points to PLT).
+
+		   On Linux, dgemm_next_addr is only NULL here when
+		   dgemm is export-dynamic (yet statically linked).
+		*/
+		dgemm_addr = dgemm_next_addr;
+	}
+    }
+
+    char buf[PATH_MAX+1];
+    if (ok && dladdr(dgemm_addr, &dl_info1)) {
+	char *res = realpath(dl_info1.dli_fname, buf);
+	if (res)
+	    SET_STRING_ELT(ans, i, mkChar(res));
+    }
+#endif
+    SET_STRING_ELT(nms, i++, mkChar("BLAS"));
+
+    UNPROTECT(2);
+    return ans;
+}
+
+/* platform-specific */
+extern void Rsleep(double timeint);
+
+SEXP attribute_hidden do_syssleep(SEXP call, SEXP op, SEXP args, SEXP rho)
+{
+    checkArity(op, args);
+    double time = asReal(CAR(args));
+    if (ISNAN(time) || time < 0.)
+	error(_("invalid '%s' value"), "time");
+    Rsleep(time);
+    return R_NilValue;
+}
+
+
 /* Formerly src/appl/machar.c:
  * void machar()  -- computes ALL `machine constants' at once.
  * -------------  -- compare with ../nmath/i1mach.c & ../nmath/d1mach.c
diff --git a/src/main/plot.c b/src/main/plot.c
index 18f9cba..a1c4d57 100644
--- a/src/main/plot.c
+++ b/src/main/plot.c
@@ -16,7 +16,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  */
 
 #ifdef HAVE_CONFIG_H
@@ -133,8 +133,10 @@ SEXP CreateAtVector(double *axp, double *usr, int nint, Rboolean logflag)
 	    n = 0;
 	    if (0.5 * dn >= umin) n++;
 	    for (;;) {
-		if (dn > umax) break;		n++;
-		if (5 * dn > umax) break;	n++;
+		if (dn > umax) break;
+		n++;
+		if (5 * dn > umax) break;
+		n++;
 		dn *= 10;
 	    }
 	    if (!n)
@@ -159,9 +161,12 @@ SEXP CreateAtVector(double *axp, double *usr, int nint, Rboolean logflag)
 	    if (0.2 * dn >= umin) n++;
 	    if (0.5 * dn >= umin) n++;
 	    for (;;) {
-		if (dn > umax) break;		n++;
-		if (2 * dn > umax) break;	n++;
-		if (5 * dn > umax) break;	n++;
+		if (dn > umax) break;
+		n++;
+		if (2 * dn > umax) break;
+		n++;
+		if (5 * dn > umax) break;
+		n++;
 		dn *= 10;
 	    }
 	    if (!n)
diff --git a/src/main/plot3d.c b/src/main/plot3d.c
index a127cfa..c613353 100644
--- a/src/main/plot3d.c
+++ b/src/main/plot3d.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--2013  The R Core Team
+ *  Copyright (C) 1997--2014  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
@@ -15,7 +15,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  */
 
 
diff --git a/src/main/plotmath.c b/src/main/plotmath.c
index fb46cb4..ed92e5b 100644
--- a/src/main/plotmath.c
+++ b/src/main/plotmath.c
@@ -1,11 +1,11 @@
 /*
  *  R : A Computer Language for Statistical Data Analysis
  *  Copyright (C) 1995, 1996, 1997 Robert Gentleman and Ross Ihaka
- *  Copyright (C) 1998-2014 The R Core Team
+ *  Copyright (C) 1998-2015 The R Core Team
  *
  *  This source code module:
  *  Copyright (C) 1997, 1998 Paul Murrell and Ross Ihaka
- *  Copyright (C) 1998-2014 The R Core Team
+ *  Copyright (C) 1998-2015 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
@@ -19,7 +19,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  */
 
 #ifdef HAVE_CONFIG_H
@@ -827,7 +827,7 @@ static int TranslatedSymbol(SEXP expr)
 	code == 0321                    ||   /* nabla */
 	0)
 	return code;
-    else
+    else // not translated
 	return 0;
 }
 
@@ -876,7 +876,6 @@ static int UsingItalics(pGEcontext gc)
 	    gc->fontface == BoldItalicFont);
 }
 
-extern int Rf_AdobeSymbol2ucs2(int n);
 static BBOX GlyphBBox(int chr, pGEcontext gc, pGEDevDesc dd)
 {
     BBOX bbox;
@@ -1665,7 +1664,7 @@ static int AccentAtom(SEXP expr)
     return NameAtom(expr) && (AccentCode(expr) != 0);
 }
 
-static void InvalidAccent(SEXP expr)
+static void NORET InvalidAccent(SEXP expr)
 {
     errorcall(expr, _("invalid accent"));
 }
@@ -1943,8 +1942,8 @@ static int DelimCode(SEXP expr, SEXP head)
     else if (StringAtom(head) && length(head) > 0) {
 	if (StringMatch(head, "|"))
 	    code = '|';
-	else if (StringMatch(head, "||"))
-	    code = 2;
+	else if (StringMatch(head, "||"))  // historical anomaly
+	    code = '|';
 	else if (StringMatch(head, "("))
 	    code = '(';
 	else if (StringMatch(head, ")"))
@@ -1992,22 +1991,14 @@ static BBOX RenderGroup(SEXP expr, int draw, mathContext *mc,
     bbox = NullBBox();
     code = DelimCode(expr, CADR(expr));
     gc->cex = DelimSymbolMag * gc->cex;
-    if (code == 2) {
-	bbox = RenderSymbolChar('|', draw, mc, gc, dd);
-	bbox = RenderSymbolChar('|', draw, mc, gc, dd);
-    }
-    else if (code != '.')
+    if (code != '.')
 	bbox = RenderSymbolChar(code, draw, mc, gc, dd);
     gc->cex = cexSaved;
     bbox = CombineBBoxes(bbox, RenderElement(CADDR(expr), draw, mc, gc, dd));
     bbox = RenderItalicCorr(bbox, draw, mc, gc, dd);
     code = DelimCode(expr, CADDDR(expr));
     gc->cex = DelimSymbolMag * gc->cex;
-    if (code == 2) {
-	bbox = CombineBBoxes(bbox, RenderSymbolChar('|', draw, mc, gc, dd));
-	bbox = CombineBBoxes(bbox, RenderSymbolChar('|', draw, mc, gc, dd));
-    }
-    else if (code != '.')
+    if (code != '.')
 	bbox = CombineBBoxes(bbox, RenderSymbolChar(code, draw, mc, gc, dd));
     gc->cex = cexSaved;
     return bbox;
@@ -2037,7 +2028,6 @@ static BBOX RenderDelim(int which, double dist, int draw, mathContext *mc,
 	return NullBBox();
 	break;
     case '|':
-    case 2:
 	top = 239; ext = 239; bot = 239; mid = 0;
 	break;
     case '(':
diff --git a/src/main/print.c b/src/main/print.c
index 38e2d3f..8011c5a 100644
--- a/src/main/print.c
+++ b/src/main/print.c
@@ -1,7 +1,7 @@
 /*
  *  R : A Computer Language for Statistical Data Analysis
  *  Copyright (C) 1995-1998	Robert Gentleman and Ross Ihaka.
- *  Copyright (C) 2000-2012	The R Core Team.
+ *  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
@@ -15,7 +15,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  *
  *
  *  print.default()  ->	 do_printdefault (with call tree below)
@@ -66,8 +66,7 @@
 #include "Print.h"
 #include "Fileio.h"
 #include "Rconnections.h"
-#include <S.h>
-
+#include <R_ext/RS.h>
 
 /* Global print parameter struct: */
 R_print_par_t R_print;
@@ -79,7 +78,7 @@ static void PrintLanguageEtc(SEXP, Rboolean, Rboolean);
 
 #define TAGBUFLEN 256
 #define TAGBUFLEN0 TAGBUFLEN + 6
-static char tagbuf[TAGBUFLEN0];
+static char tagbuf[TAGBUFLEN0 * 2]; /* over-allocate to allow overflow check */
 
 
 /* Used in X11 module for dataentry */
@@ -119,13 +118,6 @@ SEXP attribute_hidden do_invisible(SEXP call, SEXP op, SEXP args, SEXP rho)
     }
 }
 
-#if 0
-SEXP attribute_hidden do_visibleflag(SEXP call, SEXP op, SEXP args, SEXP rho)
-{
-    return ScalarLogical(R_Visible);
-}
-#endif
-
 /* This is *only* called via outdated R_level prmatrix() : */
 SEXP attribute_hidden do_prmatrix(SEXP call, SEXP op, SEXP args, SEXP rho)
 {
@@ -167,6 +159,7 @@ SEXP attribute_hidden do_prmatrix(SEXP call, SEXP op, SEXP args, SEXP rho)
 /* .Internal( print.function(f, useSource, ...)) */
 SEXP attribute_hidden do_printfunction(SEXP call, SEXP op, SEXP args, SEXP rho)
 {
+    checkArity(op,args);
     SEXP s = CAR(args);
     switch (TYPEOF(s)) {
     case CLOSXP:
@@ -179,8 +172,7 @@ SEXP attribute_hidden do_printfunction(SEXP call, SEXP op, SEXP args, SEXP rho)
 	break;
 
     default: /* if(!isFunction(s)) */
-	errorcall(call,
-		  _("non-function argument to .Internal(print.function(.))"));
+	error(_("non-function argument to .Internal(print.function(.))"));
     }
     return s;
 }
@@ -193,9 +185,9 @@ static void PrintLanguageEtc(SEXP s, Rboolean useSource, Rboolean isClosure)
     if (!isInteger(t) || !useSource)
 	t = deparse1w(s, 0, useSource | DEFAULTDEPARSE);
     else {
-        PROTECT(t = lang2(install("as.character"), t));
-        t = eval(t, R_BaseEnv);
-        UNPROTECT(1);
+	PROTECT(t = lang2(R_AsCharacterSymbol, t));
+	t = eval(t, R_BaseEnv);
+	UNPROTECT(1);
     }
     PROTECT(t);
     for (i = 0; i < LENGTH(t); i++)
@@ -300,7 +292,9 @@ SEXP attribute_hidden do_printdefault(SEXP call, SEXP op, SEXP args, SEXP rho)
 	    SEXP methodsNS = R_FindNamespace(mkString("methods"));
 	    if(methodsNS == R_UnboundValue)
 		error("missing methods namespace: this should not happen");
+	    PROTECT(methodsNS);
 	    showS = findVarInFrame3(methodsNS, install("show"), TRUE);
+	    UNPROTECT(1);
 	    if(showS == R_UnboundValue)
 		error("missing show() in methods namespace: this should not happen");
 	}
@@ -362,7 +356,7 @@ static void PrintGenericVector(SEXP s, SEXP env)
 		if (LENGTH(tmp) == 1) {
 		    formatReal(REAL(tmp), 1, &w, &d, &e, 0);
 		    snprintf(pbuf, 115, "%s",
-			     EncodeReal(REAL(tmp)[0], w, d, e, OutDec));
+			     EncodeReal0(REAL(tmp)[0], w, d, e, OutDec));
 		} else
 		    snprintf(pbuf, 115, "Numeric,%d", LENGTH(tmp));
 		break;
@@ -372,7 +366,7 @@ static void PrintGenericVector(SEXP s, SEXP env)
 		    if (ISNA(x[0].r) || ISNA(x[0].i))
 			/* formatReal(NA) --> w=R_print.na_width, d=0, e=0 */
 			snprintf(pbuf, 115, "%s",
-				 EncodeReal(NA_REAL, R_print.na_width, 0, 0, OutDec));
+				 EncodeReal0(NA_REAL, R_print.na_width, 0, 0, OutDec));
 		    else {
 			formatComplex(x, 1, &wr, &dr, &er, &wi, &di, &ei, 0);
 			snprintf(pbuf, 115, "%s",
@@ -426,13 +420,14 @@ static void PrintGenericVector(SEXP s, SEXP env)
 			rn, cn);
 	}
 	else {
-	    names = GetArrayDimnames(s);
+	    PROTECT(names = GetArrayDimnames(s));
 	    printArray(t, dims, 0, Rprt_adj_left, names);
+	    UNPROTECT(1);
 	}
 	UNPROTECT(2);
     }
     else { // no dim()
-	names = getAttrib(s, R_NamesSymbol);
+	PROTECT(names = getAttrib(s, R_NamesSymbol));
 	taglen = (int) strlen(tagbuf);
 	ptag = tagbuf + taglen;
 	PROTECT(newcall = allocList(2));
@@ -453,7 +448,7 @@ static void PrintGenericVector(SEXP s, SEXP env)
 		    */
 		    const char *ss = EncodeChar(STRING_ELT(names, i));
 		    if (taglen + strlen(ss) > TAGBUFLEN) {
-		    	if (taglen <= TAGBUFLEN)
+			if (taglen <= TAGBUFLEN)
 			    sprintf(ptag, "$...");
 		    } else {
 			/* we need to distinguish character NA from "NA", which
@@ -469,7 +464,7 @@ static void PrintGenericVector(SEXP s, SEXP env)
 		}
 		else {
 		    if (taglen + IndexWidth(i) > TAGBUFLEN) {
-		    	if (taglen <= TAGBUFLEN)
+			if (taglen <= TAGBUFLEN)
 			    sprintf(ptag, "$...");
 		    } else
 			sprintf(ptag, "[[%d]]", i+1);
@@ -508,7 +503,7 @@ static void PrintGenericVector(SEXP s, SEXP env)
 	    }
 	    if(className) {
 		Rprintf("An object of class \"%s\"\n", className);
-		UNPROTECT(1);
+		UNPROTECT(2); /* newcall, names */
 		printAttributes(s, env, TRUE);
 		vmaxset(vmax);
 		return;
@@ -519,7 +514,7 @@ static void PrintGenericVector(SEXP s, SEXP env)
 	    }
 	    vmaxset(vmax);
 	}
-	UNPROTECT(1);
+	UNPROTECT(2); /* newcall, names */
     }
     printAttributes(s, env, FALSE);
 } // PrintGenericVector
@@ -590,8 +585,9 @@ static void printList(SEXP s, SEXP env)
 			rn, cn);
 	}
 	else {
-	    dimnames = getAttrib(s, R_DimNamesSymbol);
+	    PROTECT(dimnames = getAttrib(s, R_DimNamesSymbol));
 	    printArray(t, dims, 0, Rprt_adj_left, dimnames);
+	    UNPROTECT(1);
 	}
 	UNPROTECT(2);
     }
@@ -651,10 +647,11 @@ static void PrintExpression(SEXP s)
     SEXP u;
     int i, n;
 
-    u = deparse1w(s, 0, R_print.useSource | DEFAULTDEPARSE);
+    u = PROTECT(deparse1w(s, 0, R_print.useSource | DEFAULTDEPARSE));
     n = LENGTH(u);
     for (i = 0; i < n; i++)
 	Rprintf("%s\n", CHAR(STRING_ELT(u, i))); /*translated */
+    UNPROTECT(1); /* u */
 }
 
 static void PrintSpecial(SEXP s)
@@ -737,8 +734,8 @@ void attribute_hidden PrintValueRec(SEXP s, SEXP env)
 	Rprintf("<CHARSXP: ");
 	Rprintf("%s", EncodeString(s, 0, '"', Rprt_adj_left));
 	Rprintf(">\n");
-        return; /* skip attribute printing for CHARSXP; they are used */
-                /* in managing the CHARSXP cache. */
+	return; /* skip attribute printing for CHARSXP; they are used */
+		/* in managing the CHARSXP cache. */
     case EXPRSXP:
 	PrintExpression(s);
 	break;
@@ -797,8 +794,9 @@ void attribute_hidden PrintValueRec(SEXP s, SEXP env)
 	    }
 	    else {
 		SEXP dimnames;
-		dimnames = GetArrayDimnames(s);
+		PROTECT(dimnames = GetArrayDimnames(s));
 		printArray(s, t, R_print.quote, R_print.right, dimnames);
+		UNPROTECT(1);
 	    }
 	}
 	else {
@@ -847,6 +845,9 @@ static void printAttributes(SEXP s, SEXP env, Rboolean useSlots)
 
     a = ATTRIB(s);
     if (a != R_NilValue) {
+	/* guard against cycles through attributes on environments */
+	if (strlen(tagbuf) > TAGBUFLEN0)
+	    error(_("print buffer overflow"));
 	strcpy(save, tagbuf);
 	/* remove the tag if it looks like a list not an attribute */
 	if (strlen(tagbuf) > 0 &&
@@ -875,7 +876,7 @@ static void printAttributes(SEXP s, SEXP env, Rboolean useSlots)
 		if (TAG(a) == R_NamesSymbol)
 		    goto nextattr;
 	    }
-	    if(TAG(a) == R_CommentSymbol || TAG(a) == R_SourceSymbol || TAG(a) == R_SrcrefSymbol
+	    if(TAG(a) == R_CommentSymbol || TAG(a) == R_SrcrefSymbol
 	       || TAG(a) == R_WholeSrcrefSymbol || TAG(a) == R_SrcfileSymbol)
 		goto nextattr;
 	    if(useSlots)
@@ -899,7 +900,9 @@ static void printAttributes(SEXP s, SEXP env, Rboolean useSlots)
 		    SEXP methodsNS = R_FindNamespace(mkString("methods"));
 		    if(methodsNS == R_UnboundValue)
 			error("missing methods namespace: this should not happen");
+		    PROTECT(methodsNS);
 		    showS = findVarInFrame3(methodsNS, install("show"), TRUE);
+		    UNPROTECT(1);
 		    if(showS == R_UnboundValue)
 			error("missing show() in methods namespace: this should not happen");
 		}
@@ -966,37 +969,37 @@ void attribute_hidden PrintValueEnv(SEXP s, SEXP env)
 	  print(), so S4 methods for show() have precedence over those for
 	  print() to conform with the "green book", p. 332
 	*/
-	SEXP call, showS;
+	SEXP call, prinfun;
+	SEXP xsym = install("x");
 	if(isMethodsDispatchOn() && IS_S4_OBJECT(s)) {
 	    /*
-	      Note that we cannot assume that show() is visible from
-	      'env', but we can assume there is a loaded "methods"
+	      Note that can assume there is a loaded "methods"
 	      namespace.  It is tempting to cache the value of show in
 	      the namespace, but the latter could be unloaded and
 	      reloaded in a session.
 	    */
-	    showS = findVar(install("show"), env);
-	    if(showS == R_UnboundValue) {
-		SEXP methodsNS = R_FindNamespace(mkString("methods"));
-		if(methodsNS == R_UnboundValue)
-		    error("missing methods namespace: this should not happen");
-		showS = findVarInFrame3(methodsNS, install("show"), TRUE);
-		if(showS == R_UnboundValue)
-		    error("missing show() in methods namespace: this should not happen");
-	    }
-	    PROTECT(call = lang2(showS, s));
+	    SEXP methodsNS = R_FindNamespace(mkString("methods"));
+	    if(methodsNS == R_UnboundValue)
+		error("missing methods namespace: this should not happen");
+	    PROTECT(methodsNS);
+	    prinfun = findVarInFrame3(methodsNS, install("show"), TRUE);
+	    UNPROTECT(1);
+	    if(prinfun == R_UnboundValue)
+		error("missing show() in methods namespace: this should not happen");
 	}
 	else /* S3 */
-	    PROTECT(call = lang2(install("print"), s));
-
-	if (TYPEOF(s) == SYMSXP || TYPEOF(s) == LANGSXP)
-	    /* If s is not self-evaluating wrap it in a promise. Doing
-	       this unconditionally seems to create problems in the S4
-	       case. */
-	    SETCADR(call, R_mkEVPROMISE(s, s));
-
+	    prinfun = findVar(install("print"), R_BaseNamespace);
+
+	/* Bind value to a variable in a local environment, similar to
+	   a local({ x <- <value>; print(x) }) call. This avoids
+	   problems in previous approaches with value duplication and
+	   evaluating the value, which might be a call object. */
+	PROTECT(call = lang2(prinfun, xsym));
+	PROTECT(env = NewEnvironment(R_NilValue, R_NilValue, env));
+	defineVar(xsym, s, env);
 	eval(call, env);
-	UNPROTECT(1);
+	defineVar(xsym, R_NilValue, env); /* to eliminate reference to s */
+	UNPROTECT(2);
     } else PrintValueRec(s, env);
     UNPROTECT(1);
 }
@@ -1093,7 +1096,7 @@ int F77_NAME(realp0) (const char *label, int *nchar, float *data, int *ndata)
 
 /* Fortran-callable error routine for lapack */
 
-void F77_NAME(xerbla)(const char *srname, int *info)
+void NORET F77_NAME(xerbla)(const char *srname, int *info)
 {
    /* srname is not null-terminated.  It should be 6 characters. */
     char buf[7];
diff --git a/src/main/printarray.c b/src/main/printarray.c
index dd1ae12..39247f1 100644
--- a/src/main/printarray.c
+++ b/src/main/printarray.c
@@ -1,7 +1,7 @@
 /*
  *  R : A Computer Language for Statistical Data Analysis
  *  Copyright (C) 1995, 1996	Robert Gentleman and Ross Ihaka
- *  Copyright (C) 2000--2014	The R Core Team
+ *  Copyright (C) 2000--2016	The R Core Team
  *  Copyright (C) 2001--2012	The R Foundation
  *
  *  This program is free software; you can redistribute it and/or modify
@@ -16,7 +16,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  *
  *
  *  EXPORTS	printMatrix()
@@ -37,8 +37,10 @@
 
 #include <stdlib.h> /* for div() */
 
-/* FIXME: sort out encodings */
-/* We need display width of a string */
+/* We need display width of a string.
+   Used only for row/column names found by GetMatrixDimnames,
+   so in native encoding.  (NULL ones from do_prmatrix are skipped.)
+*/
 int Rstrwid(const char *str, int slen, int enc, int quote);  /* from printutils.c */
 #define strwidth(x) Rstrwid(x, (int) strlen(x), CE_NATIVE, 0)
 
@@ -243,7 +245,7 @@ static void printRealMatrix(SEXP sx, int offset, int r_pr, int r, int c,
     _COMPUTE_W_( formatReal(&x[j * r], (R_xlen_t) r, &w[j], &d[j], &e[j], 0) );
 
     _PRINT_MATRIX_( , STD_ColumnLabels,
-		   Rprintf("%s", EncodeReal(x[i + j * r], w[j], d[j], e[j], OutDec)) );
+		   Rprintf("%s", EncodeReal0(x[i + j * r], w[j], d[j], e[j], OutDec)) );
 }
 
 static void printComplexMatrix(SEXP sx, int offset, int r_pr, int r, int c,
@@ -267,11 +269,13 @@ static void printComplexMatrix(SEXP sx, int offset, int r_pr, int r, int c,
 
     _PRINT_MATRIX_( , STD_ColumnLabels,
 		   if (ISNA(x[i + j * r].r) || ISNA(x[i + j * r].i))
-		       Rprintf("%s", EncodeReal(NA_REAL, w[j], 0, 0, OutDec));
+		       Rprintf("%s", EncodeReal0(NA_REAL, w[j], 0, 0, OutDec));
 		   else
+		       /* Note that the label printing may modify w[j], so wr[j] is not 
+		          necessarily still valid, and we use w[j] - wi[j] - 2  */
 		       Rprintf("%s",
 			       EncodeComplex(x[i + j * r],
-					     wr[j] + R_print.gap, dr[j], er[j],
+					     w[j] - wi[j] - 2, dr[j], er[j],
 					     wi[j], di[j], ei[j], OutDec)) )
 }
 
@@ -312,6 +316,7 @@ static void printRawMatrix(SEXP sx, int offset, int r_pr, int r, int c,
 		   Rprintf("%*s%s", w[j]-2, "", EncodeRaw(x[i + j * r], "")) );
 }
 
+/* rm and cn are found by GetMatrixDimnames so in native encoding */
 attribute_hidden
 void printMatrix(SEXP x, int offset, SEXP dim, int quote, int right,
 		 SEXP rl, SEXP cl, const char *rn, const char *cn)
@@ -452,7 +457,7 @@ void printArray(SEXP x, SEXP dim, int quote, int right, SEXP dimnames)
 	    } else { // nb == 0 -- e.g. <2 x 3 x 0 array of logical>
 		for (i = 0; i < ndim; i++)
 		    Rprintf("%s%d", (i == 0) ? "<" : " x ", dims[i]);
-		Rprintf(" array of %s>\n", CHAR(type2str(TYPEOF(x))));
+		Rprintf(" array of %s>\n", CHAR(type2str_nowarn(TYPEOF(x))));
 	    }
 	    switch (TYPEOF(x)) {
 	    case LGLSXP:
diff --git a/src/main/printutils.c b/src/main/printutils.c
index 09cde88..af07fe7 100644
--- a/src/main/printutils.c
+++ b/src/main/printutils.c
@@ -1,7 +1,7 @@
 /*
  *  R : A Computer Language for Statistical Data Analysis
  *  Copyright (C) 1995, 1996  Robert Gentleman and Ross Ihaka
- *  Copyright (C) 1999--2014  The R Core Team
+ *  Copyright (C) 1999--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
@@ -15,7 +15,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  */
 
 
@@ -74,20 +74,14 @@
 #endif
 
 #ifdef Win32
-int trio_vsnprintf(char *buffer, size_t bufferSize, const char *format,
-		   va_list args);
-# define vsnprintf trio_vsnprintf
+#include <trioremap.h>
 #endif
-
-extern int R_OutputCon; /* from connections.c */
-
 #ifndef min
 #define min(a, b) (((a)<(b))?(a):(b))
 #endif
 
 #define BUFSIZE 8192  /* used by Rprintf etc */
 
-/* Only if ierr < 0 or not is currently used */
 attribute_hidden
 R_size_t R_Decode2Long(char *p, int *ierr)
 {
@@ -97,6 +91,7 @@ R_size_t R_Decode2Long(char *p, int *ierr)
     /* else look for letter-code ending : */
     if(R_Verbose)
 	REprintf("R_Decode2Long(): v=%ld\n", v);
+    // NOTE: currently, positive *ierr are not differentiated in the callers:
     if(p[0] == 'G') {
 	if((Giga * (double)v) > R_SIZE_T_MAX) { *ierr = 4; return(v); }
 	return (R_size_t) Giga * v;
@@ -125,9 +120,9 @@ R_size_t R_Decode2Long(char *p, int *ierr)
 const char *EncodeLogical(int x, int w)
 {
     static char buff[NB];
-    if(x == NA_LOGICAL) snprintf(buff, NB, "%*s", w, CHAR(R_print.na_string));
-    else if(x) snprintf(buff, NB, "%*s", w, "TRUE");
-    else snprintf(buff, NB, "%*s", w, "FALSE");
+    if(x == NA_LOGICAL) snprintf(buff, NB, "%*s", min(w, (NB-1)), CHAR(R_print.na_string));
+    else if(x) snprintf(buff, NB, "%*s", min(w, (NB-1)), "TRUE");
+    else snprintf(buff, NB, "%*s", min(w, (NB-1)), "FALSE");
     buff[NB-1] = '\0';
     return buff;
 }
@@ -135,7 +130,7 @@ const char *EncodeLogical(int x, int w)
 const char *EncodeInteger(int x, int w)
 {
     static char buff[NB];
-    if(x == NA_INTEGER) snprintf(buff, NB, "%*s", w, CHAR(R_print.na_string));
+    if(x == NA_INTEGER) snprintf(buff, NB, "%*s", min(w, (NB-1)), CHAR(R_print.na_string));
     else snprintf(buff, NB, "%*d", min(w, (NB-1)), x);
     buff[NB-1] = '\0';
     return buff;
@@ -174,16 +169,23 @@ const char *EncodeEnvironment(SEXP x)
 
 const char *EncodeReal(double x, int w, int d, int e, char cdec)
 {
-    static char buff[NB];
-    char *p, fmt[20];
+    char dec[2];
+    dec[0] = cdec; dec[1] = '\0';
+    return EncodeReal0(x, w, d, e, dec);
+}
+
+const char *EncodeReal0(double x, int w, int d, int e, const char *dec)
+{
+    static char buff[NB], buff2[2*NB];
+    char fmt[20], *out = buff;
 
     /* IEEE allows signed zeros (yuck!) */
     if (x == 0.0) x = 0.0;
     if (!R_FINITE(x)) {
-	if(ISNA(x)) snprintf(buff, NB, "%*s", w, CHAR(R_print.na_string));
-	else if(ISNAN(x)) snprintf(buff, NB, "%*s", w, "NaN");
-	else if(x > 0) snprintf(buff, NB, "%*s", w, "Inf");
-	else snprintf(buff, NB, "%*s", w, "-Inf");
+	if(ISNA(x)) snprintf(buff, NB, "%*s", min(w, (NB-1)), CHAR(R_print.na_string));
+	else if(ISNAN(x)) snprintf(buff, NB, "%*s", min(w, (NB-1)), "NaN");
+	else if(x > 0) snprintf(buff, NB, "%*s", min(w, (NB-1)), "Inf");
+	else snprintf(buff, NB, "%*s", min(w, (NB-1)), "-Inf");
     }
     else if (e) {
 	if(d) {
@@ -201,12 +203,85 @@ const char *EncodeReal(double x, int w, int d, int e, char cdec)
     }
     buff[NB-1] = '\0';
 
-    if(cdec != '.')
-      for(p = buff; *p; p++) if(*p == '.') *p = cdec;
+    if(strcmp(dec, ".")) {
+	char *p, *q;
+	for(p = buff, q = buff2; *p; p++) {
+	    if(*p == '.') for(const char *r = dec; *r; r++) *q++ = *r;
+	    else *q++ = *p;
+	}
+	*q = '\0';
+	out = buff2;
+    }
 
-    return buff;
+    return out;
+}
+
+static const char
+*EncodeRealDrop0(double x, int w, int d, int e, const char *dec)
+{
+    static char buff[NB], buff2[2*NB];
+    char fmt[20], *out = buff;
+
+    /* IEEE allows signed zeros (yuck!) */
+    if (x == 0.0) x = 0.0;
+    if (!R_FINITE(x)) {
+	if(ISNA(x)) snprintf(buff, NB, "%*s", min(w, (NB-1)), CHAR(R_print.na_string));
+	else if(ISNAN(x)) snprintf(buff, NB, "%*s", min(w, (NB-1)), "NaN");
+	else if(x > 0) snprintf(buff, NB, "%*s", min(w, (NB-1)), "Inf");
+	else snprintf(buff, NB, "%*s", min(w, (NB-1)), "-Inf");
+    }
+    else if (e) {
+	if(d) {
+	    sprintf(fmt,"%%#%d.%de", min(w, (NB-1)), d);
+	    snprintf(buff, NB, fmt, x);
+	}
+	else {
+	    sprintf(fmt,"%%%d.%de", min(w, (NB-1)), d);
+	    snprintf(buff, NB, fmt, x);
+	}
+    }
+    else { /* e = 0 */
+	sprintf(fmt,"%%%d.%df", min(w, (NB-1)), d);
+	snprintf(buff, NB, fmt, x);
+    }
+    buff[NB-1] = '\0';
+
+    // Drop trailing zeroes
+    for (char *p = buff; *p; p++) {
+	if(*p == '.') {
+	    char *replace = p++;
+	    while ('0' <= *p  &&  *p <= '9')
+		if(*(p++) != '0')
+		    replace = p;
+	    if(replace != p)
+		while((*(replace++) = *(p++)))
+		    ;
+	    break;
+	}
+    }
+
+    if(strcmp(dec, ".")) {
+	char *p, *q;
+	for(p = buff, q = buff2; *p; p++) {
+	    if(*p == '.') for(const char *r = dec; *r; r++) *q++ = *r;
+	    else *q++ = *p;
+	}
+	*q = '\0';
+	out = buff2;
+    }
+
+    return out;
+}
+
+SEXP attribute_hidden StringFromReal(double x, int *warn)
+{
+    int w, d, e;
+    formatReal(&x, 1, &w, &d, &e, 0);
+    if (ISNA(x)) return NA_STRING;
+    else return mkChar(EncodeRealDrop0(x, w, d, e, OutDec));
 }
 
+
 attribute_hidden
 const char *EncodeReal2(double x, int w, int d, int e)
 {
@@ -216,10 +291,10 @@ const char *EncodeReal2(double x, int w, int d, int e)
     /* IEEE allows signed zeros (yuck!) */
     if (x == 0.0) x = 0.0;
     if (!R_FINITE(x)) {
-	if(ISNA(x)) snprintf(buff, NB, "%*s", w, CHAR(R_print.na_string));
-	else if(ISNAN(x)) snprintf(buff, NB, "%*s", w, "NaN");
-	else if(x > 0) snprintf(buff, NB, "%*s", w, "Inf");
-	else snprintf(buff, NB, "%*s", w, "-Inf");
+	if(ISNA(x)) snprintf(buff, NB, "%*s", min(w, (NB-1)), CHAR(R_print.na_string));
+	else if(ISNAN(x)) snprintf(buff, NB, "%*s", min(w, (NB-1)), "NaN");
+	else if(x > 0) snprintf(buff, NB, "%*s", min(w, (NB-1)), "Inf");
+	else snprintf(buff, NB, "%*s", min(w, (NB-1)), "-Inf");
     }
     else if (e) {
 	if(d) {
@@ -243,13 +318,9 @@ void z_prec_r(Rcomplex *r, Rcomplex *x, double digits);
 
 const char
 *EncodeComplex(Rcomplex x, int wr, int dr, int er, int wi, int di, int ei,
-	       char cdec)
+	       const char *dec)
 {
     static char buff[NB];
-    char Re[NB];
-    const char *Im, *tmp;
-    int flagNegIm = 0;
-    Rcomplex y;
 
     /* IEEE allows signed zeros; strip these here */
     if (x.r == 0.0) x.r = 0.0;
@@ -258,8 +329,12 @@ const char
     if (ISNA(x.r) || ISNA(x.i)) {
 	snprintf(buff, NB,
 		 "%*s", /* was "%*s%*s", R_print.gap, "", */
-		 wr+wi+2, CHAR(R_print.na_string));
+		 min(wr+wi+2, (NB-1)), CHAR(R_print.na_string));
     } else {
+	char Re[NB];
+	const char *Im, *tmp;
+	int flagNegIm = 0;
+	Rcomplex y;
 	/* formatComplex rounded, but this does not, and we need to
 	   keep it that way so we don't get strange trailing zeros.
 	   But we do want to avoid printing small exponentials that
@@ -267,12 +342,10 @@ const char
 	 */
 	z_prec_r(&y, &x, R_print.digits);
 	/* EncodeReal has static buffer, so copy */
-	if(y.r == 0.) tmp = EncodeReal(y.r, wr, dr, er, cdec);
-	else tmp = EncodeReal(x.r, wr, dr, er, cdec);
+	tmp = EncodeReal0(y.r == 0. ? y.r : x.r, wr, dr, er, dec);
 	strcpy(Re, tmp);
 	if ( (flagNegIm = (x.i < 0)) ) x.i = -x.i;
-	if(y.i == 0.) Im = EncodeReal(y.i, wi, di, ei, cdec);
-	else Im = EncodeReal(x.i, wi, di, ei, cdec);
+	Im = EncodeReal0(y.i == 0. ? y.i : x.i, wi, di, ei, dec);
 	snprintf(buff, NB, "%s%s%si", Re, flagNegIm ? "-" : "+", Im);
     }
     buff[NB-1] = '\0';
@@ -288,8 +361,7 @@ const char
 
    On Windows with surrogate pairs it will not be canonical, but AFAIK
    they do not occur in any MBCS (so it would only matter if we implement
-   UTF-8, and then only if Windows has surrogate pairs switched on,
-   which Western versions at least do not.).
+   UTF-8, and then only if Windows has surrogate pairs switched on.).
 */
 
 #include <rlocale.h> /* redefines isw* functions */
@@ -298,10 +370,11 @@ const char
 #include "rgui_UTF8.h"
 #endif
 
-/* strlen() using escaped rather than literal form,
-   and allowing for embedded nuls.
+/* strlen() using escaped rather than literal form.
    In MBCS locales it works in characters, and reports in display width.
-   Also used in printarray.c.
+   Rstrwid is also used in printarray.c.
+
+   This supported embedded nuls when we had those.
  */
 attribute_hidden
 int Rstrwid(const char *str, int slen, cetype_t ienc, int quote)
@@ -309,6 +382,18 @@ int Rstrwid(const char *str, int slen, cetype_t ienc, int quote)
     const char *p = str;
     int len = 0, i;
 
+    if(ienc == CE_BYTES) { // not currently used for that encoding
+	for (i = 0; i < slen; i++) {
+	    unsigned char k = str[i];
+	    if (k >= 0x20 && k < 0x80) len += 1;
+	    else len += 4;
+	}
+	return len;
+    }
+    /* Future-proof: currently that is all Rstrlen calls it with,
+       and printarray has CE_NATIVE explicitly */
+    if(ienc > 2) // CE_NATIVE, CE_UTF8, CE_BYTES are supported
+	warning("unsupported encoding (%d) in Rstrwid", ienc);
     if(mbcslocale || ienc == CE_UTF8) {
 	int res;
 	mbstate_t mb_st;
@@ -367,10 +452,10 @@ int Rstrwid(const char *str, int slen, cetype_t ienc, int quote)
 		p++;
 	    }
 	}
-    } else
+    } else // not MBCS nor marked as UTF-8
 	for (i = 0; i < slen; i++) {
-	    /* ASCII */
 	    if((unsigned char) *p < 0x80) {
+		/* ASCII */
 		if(isprint((int)*p)) {
 		    switch(*p) {
 		    case '\\':
@@ -410,17 +495,25 @@ int Rstrwid(const char *str, int slen, cetype_t ienc, int quote)
     return len;
 }
 
+/* Match what EncodeString does with encodings */
 attribute_hidden
 int Rstrlen(SEXP s, int quote)
 {
-    return Rstrwid(CHAR(s), LENGTH(s), getCharCE(s), quote);
+    cetype_t ienc = getCharCE(s);
+    if (ienc == CE_UTF8 || ienc == CE_BYTES)
+	return Rstrwid(CHAR(s), LENGTH(s), ienc, quote);
+    const void *vmax = vmaxget();
+    const char *p = translateChar(s);
+    int len = Rstrwid(p, (int)strlen(p), CE_NATIVE, quote);
+    vmaxset(vmax);
+    return len;
 }
 
 /* Here w is the minimum field width
    If 'quote' is non-zero the result should be quoted (and internal quotes
    escaped and NA strings handled differently).
 
-   EncodeString is called from EncodeElements, cat() (for labels when
+   EncodeString is called from EncodeElement, cat() (for labels when
    filling), to (auto)print character vectors, arrays, names and
    CHARSXPs.  It is also called by do_encodeString, but not from
    format().
@@ -548,13 +641,15 @@ const char *EncodeString(SEXP s, int w, int quote, Rprt_adj justify)
 		if(res == 0) {k = 0; wc = L'\0';}
 		if(0x20 <= k && k < 0x7f && iswprint(wc)) {
 		    switch(wc) {
-		    case L'\\': *q++ = '\\'; *q++ = '\\'; p++;
-			break;
+		    case L'\\': *q++ = '\\'; *q++ = '\\'; p++; break;
 		    case L'\'':
 		    case L'"':
 		    case L'`':
-			if(quote == *p)  *q++ = '\\'; *q++ = *p++;
-			break;
+			{
+			    if(quote == *p)  *q++ = '\\';
+			    *q++ = *p++;
+			    break;
+			}
 		    default:
 			for(j = 0; j < res; j++) *q++ = *p++;
 			break;
@@ -573,7 +668,8 @@ const char *EncodeString(SEXP s, int w, int quote, Rprt_adj justify)
 
 		    default:
 			/* print in octal */
-			snprintf(buf, 5, "\\%03o", k);
+			// gcc 7 requires cast here
+			snprintf(buf, 5, "\\%03o", (unsigned char)k);
 			for(j = 0; j < 4; j++) *q++ = buf[j];
 			break;
 		    }
@@ -624,7 +720,11 @@ const char *EncodeString(SEXP s, int w, int quote, Rprt_adj justify)
 		    case '\'':
 		    case '"':
 		    case '`':
-			if(quote == *p)  *q++ = '\\'; *q++ = *p; break;
+		    {
+			if(quote == *p)  *q++ = '\\';
+			*q++ = *p;
+			break;
+		    }
 		    default: *q++ = *p; break;
 		    }
 		} else switch(*p) {
@@ -674,9 +774,16 @@ const char *EncodeString(SEXP s, int w, int quote, Rprt_adj justify)
 
 /* EncodeElement is called by cat(), write.table() and deparsing. */
 
-/* NB this is called by R.app even though it is in no public header, so 
+/* NB this is called by R.app even though it is in no public header, so
    alter there if you alter this */
-const char *EncodeElement(SEXP x, int indx, int quote, char dec)
+const char *EncodeElement(SEXP x, int indx, int quote, char cdec)
+{
+    char dec[2];
+    dec[0] = cdec; dec[1] = '\0';
+    return EncodeElement0(x, indx, quote, dec);
+}
+
+const char *EncodeElement0(SEXP x, int indx, int quote, const char *dec)
 {
     int w, d, e, wi, di, ei;
     const char *res;
@@ -692,7 +799,7 @@ const char *EncodeElement(SEXP x, int indx, int quote, char dec)
 	break;
     case REALSXP:
 	formatReal(&REAL(x)[indx], 1, &w, &d, &e, 0);
-	res = EncodeReal(REAL(x)[indx], w, d, e, dec);
+	res = EncodeReal0(REAL(x)[indx], w, d, e, dec);
 	break;
     case STRSXP:
 	formatString(&STRING_PTR(x)[indx], 1, &w, quote);
@@ -713,7 +820,14 @@ const char *EncodeElement(SEXP x, int indx, int quote, char dec)
 }
 
 /* EncodeChar is a simple wrapper for EncodeString
-   called by error messages to display CHARSXP values */
+   called by error messages to display CHARSXP values.
+
+   The pointer returned by EncodeChar points into an internal buffer
+   which is overwritten by subsequent calls to EncodeChar/EncodeString.
+   It is the responsibility of the caller to copy the result before
+   any subsequent call to EncodeChar/EncodeString may happen. Note that
+   particularly it is NOT safe to pass the result of EncodeChar as 3rd
+   argument to errorcall (errorcall_cpy can be used instead). */
 //attribute_hidden
 const char *EncodeChar(SEXP x)
 {
diff --git a/src/main/printvector.c b/src/main/printvector.c
index 7324ea2..8e677aa 100644
--- a/src/main/printvector.c
+++ b/src/main/printvector.c
@@ -1,7 +1,7 @@
 /*
  *  R : A Computer Language for Statistical Data Analysis
  *  Copyright (C) 1995-1997, 1998  Robert Gentleman and Ross Ihaka
- *  Copyright (C) 1998-2012  The R Core Team.
+ *  Copyright (C) 1998-2014  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
@@ -15,7 +15,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  *
  *  EXPORTS	printVector()
  *		printNamedVector()
@@ -105,7 +105,7 @@ void printRealVector(double *x, R_xlen_t n, int indx)
 	if (i > 0 && width + w > R_print.width) {
 	    DO_newline;
 	}
-	Rprintf("%s", EncodeReal(x[i], w, d, e, OutDec));
+	Rprintf("%s", EncodeReal0(x[i], w, d, e, OutDec));
 	width += w;
     }
     Rprintf("\n");
@@ -127,7 +127,7 @@ void printComplexVector(Rcomplex *x, R_xlen_t n, int indx)
 	    DO_newline;
 	}
 	if (ISNA(x[i].r) || ISNA(x[i].i))
-	    Rprintf("%s", EncodeReal(NA_REAL, w, 0, 0, OutDec));
+	    Rprintf("%s", EncodeReal0(NA_REAL, w, 0, 0, OutDec));
 	else
 	    Rprintf("%s", EncodeComplex(x[i], wr + R_print.gap , dr, er,
 					wi, di, ei, OutDec));
@@ -272,7 +272,8 @@ static void printNamedIntegerVector(int * x, int n, SEXP * names)
 
 static void printNamedRealVector(double * x, int n, SEXP * names)
     PRINT_N_VECTOR(INI_F_REAL,
-		   Rprintf("%s%*s", EncodeReal(x[k],w,d,e, OutDec),R_print.gap,""))
+		   Rprintf("%s%*s", 
+			   EncodeReal0(x[k],w,d,e, OutDec),R_print.gap,""))
 
 #undef INI_F_CPLX
 #define INI_F_CPLX					\
@@ -291,15 +292,15 @@ static void printNamedComplexVector(Rcomplex * x, int n, SEXP * names)
 	{ /* PRINT_1 */
 	    if(j) Rprintf("%*s", R_print.gap, "");
 	    if (ISNA(x[j].r) || ISNA(x[j].i)) {
-		Rprintf("%s", EncodeReal(NA_REAL, w, 0, 0, OutDec));
+		Rprintf("%s", EncodeReal0(NA_REAL, w, 0, 0, OutDec));
 	    }
 	    else {
-		Rprintf("%s", EncodeReal(x[k].r, wr, dr, er, OutDec));
+		Rprintf("%s", EncodeReal0(x[k].r, wr, dr, er, OutDec));
 		P_IMAG_NA
 		if (x[k].i >= 0)
-		    Rprintf("+%si", EncodeReal(x[k].i, wi, di, ei, OutDec));
+		    Rprintf("+%si", EncodeReal0(x[k].i, wi, di, ei, OutDec));
 		else
-		    Rprintf("-%si", EncodeReal(-x[k].i, wi, di, ei, OutDec));
+		    Rprintf("-%si", EncodeReal0(-x[k].i, wi, di, ei, OutDec));
 	    }
 	})
 
diff --git a/src/main/qsort-body.c b/src/main/qsort-body.c
index 950f705..85e3282 100644
--- a/src/main/qsort-body.c
+++ b/src/main/qsort-body.c
@@ -16,7 +16,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  */
 
 /*====== BODY of R_qsort() and R_qsorti() functions ====================
diff --git a/src/main/qsort.c b/src/main/qsort.c
index 278c9e1..0cbf0be 100644
--- a/src/main/qsort.c
+++ b/src/main/qsort.c
@@ -14,7 +14,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  */
 
 /* **********************************************************************
diff --git a/src/main/radixsort.c b/src/main/radixsort.c
new file mode 100644
index 0000000..392a531
--- /dev/null
+++ b/src/main/radixsort.c
@@ -0,0 +1,1915 @@
+/*
+ *  R : A Computer Language for Statistical Data Analysis
+ *  Copyright (C) 2016   The R Core Team
+ *
+ *  Based on code donated from the data.table package
+ *  (C) 2006-2015 Matt Dowle and Arun Srinivasan.
+ *
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, a copy is available at
+ *  https://www.R-project.org/Licenses/
+ */
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#define USE_RINTERNALS // read-only, promise.
+
+#include <Defn.h>
+#include <Internal.h>
+
+// gs = groupsizes e.g.23, 12, 87, 2, 1, 34,...
+static int *gs[2] = { NULL };
+//two vectors flip flopped:flip and 1 - flip
+static int flip = 0;
+//allocated stack size
+static int gsalloc[2] = { 0 };
+static int gsngrp[2] = { 0 };
+//max grpn so far
+static int gsmax[2] = { 0 };
+//max size of stack, set by do_radixsort to nrows
+static int gsmaxalloc = 0;
+//switched off for last arg unless retGrp==TRUE
+static Rboolean stackgrps = TRUE;
+// TRUE for setkey, FALSE for by=
+static Rboolean sortStr = TRUE;
+// used by do_radixsort and [i|d|c]sort to reorder order.
+// not needed if narg==1
+static int *newo = NULL;
+// =1, 0, -1 for TRUE, NA, FALSE respectively.
+// Value rewritten inside do_radixsort().
+static int nalast = -1;
+// =1, -1 for ascending and descending order respectively
+static int order = 1;
+
+//replaced n < 200 with n < N_SMALL.Easier to change later
+#define N_SMALL 200
+// range limit for counting sort. Should be less than INT_MAX
+// (see setRange for details)
+#define N_RANGE 100000
+
+static SEXP *saveds = NULL;
+static R_len_t *savedtl = NULL, nalloc = 0, nsaved = 0;
+
+static void savetl_init()
+{
+    if (nsaved || nalloc || saveds || savedtl)
+	error("Internal error: savetl_init checks failed (%d %d %p %p).",
+	      nsaved, nalloc, saveds, savedtl);
+    nsaved = 0;
+    nalloc = 100;
+    saveds = (SEXP *) malloc(nalloc * sizeof(SEXP));
+    if (saveds == NULL)
+	error("Could not allocate saveds in savetl_init");
+    savedtl = (R_len_t *) malloc(nalloc * sizeof(R_len_t));
+    if (savedtl == NULL) {
+	free(saveds);
+	error("Could not allocate saveds in savetl_init");
+    }
+}
+
+static void savetl_end()
+{
+    // Can get called if nothing has been saved yet (nsaved == 0), or
+    // even if _init() has not been called yet (pointers NULL). Such as
+    // to clear up before error. Also, it might be that nothing needed
+    // to be saved anyway.
+    for (int i = 0; i < nsaved; i++)
+	SET_TRUELENGTH(saveds[i], savedtl[i]);
+    free(saveds);  // does nothing on NULL input
+    free(savedtl);
+    nsaved = nalloc = 0;
+    saveds = NULL;
+    savedtl = NULL;
+}
+
+
+static void savetl(SEXP s)
+{
+    if (nsaved >= nalloc) {
+	nalloc *= 2;
+	char *tmp;
+	tmp = (char *) realloc(saveds, nalloc * sizeof(SEXP));
+	if (tmp == NULL) {
+	    savetl_end();
+	    error("Could not realloc saveds in savetl");
+	}
+	saveds = (SEXP *) tmp;
+	tmp = (char *) realloc(savedtl, nalloc * sizeof(R_len_t));
+	if (tmp == NULL) {
+	    savetl_end();
+	    error("Could not realloc savedtl in savetl");
+	}
+	savedtl = (R_len_t *) tmp;
+    }
+    saveds[nsaved] = s;
+    savedtl[nsaved] = TRUELENGTH(s);
+    nsaved++;
+}
+
+// http://gcc.gnu.org/onlinedocs/cpp/Swallowing-the-Semicolon.html#Swallowing-the-Semicolon
+#define Error(...) do {savetl_end(); error(__VA_ARGS__);} while(0)
+#undef warning
+// since it can be turned to error via warn = 2
+#define warning(...) Do not use warning in this file
+/* use malloc/realloc (not Calloc/Realloc) so we can trap errors
+   and call savetl_end() before the error(). */
+
+static void growstack(int newlen)
+{
+    // no link to icount range restriction,
+    // just 100,000 seems a good minimum at 0.4MB
+    if (newlen == 0) newlen = 100000;
+    if (newlen > gsmaxalloc) newlen = gsmaxalloc;
+    gs[flip] = realloc(gs[flip], newlen * sizeof(int));
+    if (gs[flip] == NULL)
+	Error("Failed to realloc working memory stack to %d*4bytes (flip=%d)",
+	      newlen, flip);
+    gsalloc[flip] = newlen;
+}
+
+static void push(int x)
+{
+    if (!stackgrps || x == 0)
+	return;
+    if (gsalloc[flip] == gsngrp[flip])
+	growstack(gsngrp[flip] * 2);
+    gs[flip][gsngrp[flip]++] = x;
+    if (x > gsmax[flip])
+	gsmax[flip] = x;
+}
+
+static void mpush(int x, int n)
+{
+    if (!stackgrps || x == 0)
+	return;
+    if (gsalloc[flip] < gsngrp[flip] + n)
+	growstack((gsngrp[flip] + n) * 2);
+    for (int i = 0; i < n; i++)
+	gs[flip][gsngrp[flip]++] = x;
+    if (x > gsmax[flip])
+	gsmax[flip] = x;
+}
+
+static void flipflop()
+{
+    flip = 1 - flip;
+    gsngrp[flip] = 0;
+    gsmax[flip] = 0;
+    if (gsalloc[flip] < gsalloc[1 - flip])
+	growstack(gsalloc[1 - flip] * 2);
+}
+
+static void gsfree()
+{
+    free(gs[0]);
+    free(gs[1]);
+    gs[0] = NULL;
+    gs[1] = NULL;
+    flip = 0;
+    gsalloc[0] = gsalloc[1] = 0;
+    gsngrp[0] = gsngrp[1] = 0;
+    gsmax[0] = gsmax[1] = 0;
+    gsmaxalloc = 0;
+}
+
+#ifdef TIMING_ON
+// many calls to clock() can be expensive,
+// hence compiled out rather than switch(verbose)
+#include <time.h>
+#define NBLOCK 20
+static clock_t tblock[NBLOCK], tstart;
+static int nblock[NBLOCK];
+#define TBEG() tstart = clock();
+#define TEND(i) tblock[i] += clock()-tstart; nblock[i]++; tstart = clock();
+#else
+#define TBEG()
+#define TEND(i)
+#endif
+
+static int range, xmin; // used by both icount and do_radixsort
+static void setRange(int *x, int n)
+{
+    xmin = NA_INTEGER;
+    int xmax = NA_INTEGER;
+    double overflow;
+
+    int i = 0;
+    while(i < n && x[i] == NA_INTEGER) i++;
+    if (i < n) xmax = xmin = x[i];
+    for (; i < n; i++) {
+	int tmp = x[i];
+	if (tmp == NA_INTEGER)
+	    continue;
+	if (tmp > xmax)
+	    xmax = tmp;
+	else if (tmp < xmin)
+	    xmin = tmp;
+    }
+    // all NAs, nothing to do
+    if (xmin == NA_INTEGER) {
+	range = NA_INTEGER;
+	return;
+    }
+    // ex: x=c(-2147483647L, NA_integer_, 1L) results in overflowing int range.
+    overflow = (double) xmax - (double) xmin + 1;
+    // detect and force iradix here, since icount is out of the picture
+    if (overflow > INT_MAX) {
+	range = INT_MAX;
+	return;
+    }
+
+    range = xmax - xmin + 1;
+
+    return;
+}
+
+// x*order results in integer overflow when -1*NA,
+// so careful to avoid that here :
+static inline int icheck(int x)
+{
+    // if nalast == 1, NAs must go last.
+    return ((nalast != 1) ? ((x != NA_INTEGER) ? x*order : x) :
+	    ((x != NA_INTEGER) ? (x*order) - 1 : INT_MAX));
+}
+
+
+static void icount(int *x, int *o, int n)
+/* Counting sort:
+   1. Places the ordering into o directly, overwriting whatever was there
+   2. Doesn't change x
+   3. Pushes group sizes onto stack
+*/
+{
+    int napos = range; // NA's always counted in last bin
+    // static is IMPORTANT, counting sort is called repetitively.
+    static unsigned int counts[N_RANGE + 1] = { 0 };
+    /* counts are set back to 0 at the end efficiently. 1e5 = 0.4MB i.e
+       tiny. We'll only use the front part of it, as large as range. So it's
+       just reserving space, not using it. Have defined N_RANGE to be 100000.*/
+    if (range > N_RANGE)
+	Error("Internal error: range = %d; isorted cannot handle range > %d",
+	      range, N_RANGE);
+    for (int i = 0; i < n; i++) {
+	// For nalast=NA case, we won't remove/skip NAs, rather set 'o' indices
+	// to 0. subset will skip them. We can't know how many NAs to skip
+	// beforehand - i.e. while allocating "ans" vector
+	if (x[i] == NA_INTEGER)
+	    counts[napos]++;
+	else
+	    counts[x[i] - xmin]++;
+    }
+    
+    int tmp = 0;
+    if (nalast != 1 && counts[napos]) {
+        push(counts[napos]);
+        tmp += counts[napos];
+    }
+    int w = (order==1) ? 0 : range-1;
+    for (int i = 0; i < range; i++) 
+        /* no point in adding tmp < n && i <= range, since range includes max, 
+           need to go to max, unlike 256 loops elsewhere in radixsort.c */
+    {
+	if (counts[w]) {
+	    // cumulate but not through 0's.
+	    // Helps resetting zeros when n < range, below.
+	    push(counts[w]);
+	    counts[w] = (tmp += counts[w]);
+	}
+        w += order; // order is +1 or -1
+    }
+    if (nalast == 1 && counts[napos]) {
+        push(counts[napos]);
+        counts[napos] = (tmp += counts[napos]);
+    }
+    for (int i = n - 1; i >= 0; i--) {
+	// This way na.last=TRUE/FALSE cases will have just a
+	// single if-check overhead.
+	o[--counts[(x[i] == NA_INTEGER) ? napos :
+		   x[i] - xmin]] = (int) (i + 1);
+    }
+    // nalast = 1, -1 are both taken care already.
+    if (nalast == 0)
+	// nalast = 0 is dealt with separately as it just sets o to 0
+	for (int i = 0; i < n; i++)
+	    o[i] = (x[o[i] - 1] == NA_INTEGER) ? 0 : o[i];
+    // at those indices where x is NA. x[o[i]-1] because x is not modifed here.
+
+    /* counts were cumulated above so leaves non zero.
+       Faster to clear up now ready for next time. */
+    if (n < range) {
+	/* Many zeros in counts already. Loop through n instead,
+	   doesn't matter if we set to 0 several times on any repeats */
+	counts[napos] = 0;
+	for (int i = 0; i < n; i++) {
+	    if (x[i] != NA_INTEGER)
+		counts[x[i] - xmin] = 0;
+	}
+    } else
+	memset(counts, 0, (range + 1) * sizeof(int));
+    return;
+}
+
+static void iinsert(int *x, int *o, int n)
+/*  orders both x and o by reference in-place. Fast for small vectors,
+    low overhead.  don't be tempted to binsearch backwards here, have
+    to shift anyway; many memmove would have overhead and do the same
+    thing. */
+/*  when nalast == 0, iinsert will be called only from within iradix,
+    where o[.] = 0 for x[.]=NA is already taken care of */
+{
+    for (int i = 1; i < n; i++) {
+	int xtmp = x[i];
+	if (xtmp < x[i - 1]) {
+	    int j = i - 1;
+	    int otmp = o[i];
+	    while (j >= 0 && xtmp < x[j]) {
+		x[j + 1] = x[j];
+		o[j + 1] = o[j];
+		j--;
+	    }
+	    x[j + 1] = xtmp;
+	    o[j + 1] = otmp;
+	}
+    }
+    int tt = 0;
+    for (int i = 1; i < n; i++)
+	if (x[i] == x[i - 1])
+	    tt++;
+	else {
+	    push(tt + 1);
+	    tt = 0;
+	}
+    push(tt + 1);
+}
+
+/*
+  iradix is a counting sort performed forwards from MSB to LSB, with
+  some tricks and short circuits building on Terdiman and Herf.
+  http://codercorner.com/RadixSortRevisited.htm
+  http://stereopsis.com/radix.html
+
+  ~ Note they are LSD, but we do MSD here which is more complicated,
+    for efficiency.
+  ~ NAs need no special treatment as NA is the most negative integer
+    in R (checked in init.c once,  for efficiency) so NA naturally sort
+    to the front.
+  ~ Using 4-pass 1-byte radix for the following reasons :
+
+  * 11-bit (Herf) reduces to 3-passes (3*11=33) yes, and LSD need
+    random access to o vector in each pass 1:n so reduction in passes is
+    good, but Terdiman's idea to skip a radix if all values are equal
+    occurs less the wider the radix. A narrower radix benefits more from that.
+    * That's detected here using a single 'if', an improvement on
+      Terdiman's exposition of a single loop to find if any count==n
+    * The pass through counts bites when radix is wider,
+      because we repetitively call this iradix from fastorder forwards.
+  *  Herf's parallel histogramming is neat. In 4-pass 1-byte it needs
+     4*256 storage, that's  tiny, and can be static. 4*256 << 3*2048.
+     4-pass 1-byte is simpler and tighter code than 3-pass 11-bit,
+     giving modern optimizers and modern CPUs a better chance.
+     We may get lucky anyway, if one or two of the 4-passes are skipped.
+
+  Recall: there are no comparisons at all in counting and radix,
+  there is wide random access in each LSD radix pass, though.
+*/
+
+// 4 are used for iradix, 8 for dradix and i64radix
+static unsigned int radixcounts[8][257] = { {0} };
+
+static int skip[8];
+/* global because iradix and iradix_r interact and are called repetitively.
+   counts are set back to 0 after each use, to benefit from skipped radix. */
+static void *radix_xsub = NULL;
+static size_t radix_xsuballoc = 0;
+
+static int *otmp = NULL, otmp_alloc = 0;
+static void alloc_otmp(int n)
+{
+    if (otmp_alloc >= n)
+	return;
+    otmp = (int *) realloc(otmp, n * sizeof(int));
+    if (otmp == NULL)
+	Error("Failed to allocate working memory for otmp. Requested %d * %d bytes",
+	      n, sizeof(int));
+    otmp_alloc = n;
+}
+
+// TO DO: save xtmp if possible, see allocs in do_radixsort
+static void *xtmp = NULL;
+static int xtmp_alloc = 0;
+// TO DO: currently always the largest type (double) but
+//        could be int if that's all that's needed
+static void alloc_xtmp(int n)
+{
+    if (xtmp_alloc >= n)
+	return;
+    xtmp = (double *) realloc(xtmp, n * sizeof(double));
+    if (xtmp == NULL)
+	Error("Failed to allocate working memory for xtmp. Requested %d * %d bytes",
+	      n, sizeof(double));
+    xtmp_alloc = n;
+}
+
+static void iradix_r(int *xsub, int *osub, int n, int radix);
+
+static void iradix(int *x, int *o, int n)
+/* As icount :
+   Places the ordering into o directly, overwriting whatever was there
+   Doesn't change x
+   Pushes group sizes onto stack */
+{
+    int nextradix, itmp, thisgrpn, maxgrpn;
+    unsigned int thisx = 0, shift, *thiscounts;
+
+    for (int i = 0; i < n;i++) {
+	/* parallel histogramming pass; i.e. count occurrences of
+	   0:255 in each byte.  Sequential so almost negligible. */
+	// relies on overflow behaviour. And shouldn't -INT_MIN be up in iradix?
+	thisx = (unsigned int) (icheck(x[i])) - INT_MIN;
+	// unrolled since inside n-loop
+	radixcounts[0][thisx & 0xFF]++;
+	radixcounts[1][thisx >> 8 & 0xFF]++;
+	radixcounts[2][thisx >> 16 & 0xFF]++;
+	radixcounts[3][thisx >> 24 & 0xFF]++;
+    }
+    for (int radix = 0; radix < 4; radix++) {
+	/* any(count == n) => all radix must have been that value =>
+	   last x (still thisx) was that value */
+	int i = thisx >> (radix*8) & 0xFF;
+	skip[radix] = radixcounts[radix][i] == n;
+	// clear it now, the other counts must be 0 already
+	if (skip[radix])
+	    radixcounts[radix][i] = 0;
+    }
+
+    int radix = 3;  // MSD
+    while (radix >= 0 && skip[radix]) radix--;
+    if (radix == -1) { // All radix are skipped; one number repeated n times.
+	if (nalast == 0 && x[0] == NA_INTEGER)
+	    // all values are identical. return 0 if nalast=0 & all NA
+	    // because of 'return', have to take care of it here.
+	    for (int i = 0; i < n; i++)
+		o[i] = 0;
+	else
+	    for (int i = 0; i < n; i++)
+		o[i] = (i + 1);
+	push(n);
+	return;
+    }
+    for (int i = radix - 1; i >= 0; i--) {
+	if (!skip[i])
+	    memset(radixcounts[i], 0, 257 * sizeof(unsigned int));
+	/* clear the counts as we only needed the parallel pass for skip[]
+	   and we're going to use radixcounts again below. Can't use parallel
+	   lower counts in MSD radix, unlike LSD. */
+    }
+    thiscounts = radixcounts[radix];
+    shift = radix * 8;
+
+    itmp = thiscounts[0];
+    maxgrpn = itmp;
+    for (int i = 1; itmp < n && i < 256; i++) {
+	thisgrpn = thiscounts[i];
+	if (thisgrpn) {
+	    // don't cummulate through 0s, important below.
+	    if (thisgrpn > maxgrpn)
+		maxgrpn = thisgrpn;
+	    thiscounts[i] = (itmp += thisgrpn);
+	}
+    }
+    for (int i = n - 1; i >= 0; i--) {
+	thisx = ((unsigned int) (icheck(x[i])) - INT_MIN) >> shift & 0xFF;
+	o[--thiscounts[thisx]] = i + 1;
+    }
+
+    if (radix_xsuballoc < maxgrpn) {
+        // The largest group according to the first non-skipped radix,
+        // so could be big (if radix is needed on first arg)
+        // TO DO: could include extra bits to divide the first radix
+        // up more. Often the MSD has groups in just 0-4 out of 256.
+        // free'd at the end of do_radixsort once we're done calling iradix
+        // repetitively
+        radix_xsub = (int *) realloc(radix_xsub, maxgrpn * sizeof(double));
+        if (!radix_xsub)
+            Error("Failed to realloc working memory %d*8bytes (xsub in iradix), radix=%d",
+                  maxgrpn, radix);
+        radix_xsuballoc = maxgrpn;
+    }
+
+    // TO DO: can we leave this to do_radixsort and remove these calls??
+    alloc_otmp(maxgrpn);
+    // TO DO: doesn't need to be sizeof(double) always, see inside
+    alloc_xtmp(maxgrpn);
+
+    nextradix = radix - 1;
+    while (nextradix >= 0 && skip[nextradix]) nextradix--;
+    if (thiscounts[0] != 0)
+	Error("Internal error. thiscounts[0]=%d but should have been decremented to 0. dradix=%d",
+	      thiscounts[0], radix);
+    thiscounts[256] = n;
+    itmp = 0;
+    for (int i = 1; itmp < n && i <= 256; i++) {
+        if (thiscounts[i] == 0) continue;
+        // undo cumulate; i.e. diff
+        thisgrpn = thiscounts[i] - itmp;
+        if (thisgrpn == 1 || nextradix == -1) {
+            push(thisgrpn);
+        } else {
+            for (int j = 0; j < thisgrpn; j++)
+                // this is why this xsub here can't be the same memory as
+                // xsub in do_radixsort.
+                ((int *)radix_xsub)[j] = icheck(x[o[itmp+j]-1]);
+            // changes xsub and o by reference recursively.
+            iradix_r(radix_xsub, o+itmp, thisgrpn, nextradix);
+        }
+        itmp = thiscounts[i];
+        thiscounts[i] = 0;
+    }
+    if (nalast == 0) // nalast = 1, -1 are both taken care already.
+	// nalast = 0 is dealt with separately as it just sets o to 0
+	for (int i = 0; i < n; i++)
+	    o[i] = (x[o[i] - 1] == NA_INTEGER) ? 0 : o[i];
+    // at those indices where x is NA. x[o[i]-1] because x is not
+    // modified by reference unlike iinsert or iradix_r
+}
+
+static void iradix_r(int *xsub, int *osub, int n, int radix)
+// xsub is a recursive offset into xsub working memory above in
+// iradix, reordered by reference.  osub is a an offset into the main
+// answer o, reordered by reference.  radix iterates 3,2,1,0
+{
+    int j, itmp, thisx, thisgrpn, nextradix, shift;
+    unsigned int *thiscounts;
+
+    // N_SMALL=200 is guess based on limited testing. Needs
+    // calibrate().  Was 50 based on sum(1:50)=1275 worst -vs- 256
+    // cummulate + 256 memset + allowance since reverse order is
+    // unlikely.  when nalast==0, iinsert will be called only from
+    // within iradix.
+    if (n < N_SMALL) {
+	iinsert(xsub, osub, n);
+	return;
+    }
+
+    shift = radix * 8;
+    thiscounts = radixcounts[radix];
+
+    for (int i = 0; i < n; i++) {
+	thisx = (unsigned int) xsub[i] - INT_MIN; // sequential in xsub
+	thiscounts[thisx >> shift & 0xFF]++;
+    }
+    itmp = thiscounts[0];
+    for (int i = 1; itmp < n && i < 256; i++)
+	// don't cummulate through 0s, important below
+	if (thiscounts[i])
+	    thiscounts[i] = (itmp += thiscounts[i]);
+    for (int i = n - 1; i >= 0; i--) {
+	thisx = ((unsigned int) xsub[i] - INT_MIN) >> shift & 0xFF;
+	j = --thiscounts[thisx];
+	otmp[j] = osub[i];
+	((int *) xtmp)[j] = xsub[i];
+    }
+    memcpy(osub, otmp, n * sizeof(int));
+    memcpy(xsub, xtmp, n * sizeof(int));
+
+    nextradix = radix - 1;
+    while (nextradix >= 0 && skip[nextradix]) nextradix--;
+    /* TO DO: If nextradix == -1 AND no further args from do_radixsort AND
+       !retGrp, we're done. We have o. Remember to memset thiscounts
+       before returning. */
+
+    if (thiscounts[0] != 0)
+	Error("Logical error. thiscounts[0]=%d but should have been decremented to 0. radix=%d",
+	      thiscounts[0], radix);
+    thiscounts[256] = n;
+    itmp = 0;
+    for (int i = 1; itmp < n && i <= 256; i++) {
+	if (thiscounts[i] == 0)
+	    continue;
+	thisgrpn = thiscounts[i] - itmp;        // undo cummulate; i.e. diff
+	if (thisgrpn == 1 || nextradix == -1) {
+	    push(thisgrpn);
+	} else {
+	    iradix_r(xsub+itmp, osub+itmp, thisgrpn, nextradix);
+	}
+	itmp = thiscounts[i];
+	thiscounts[i] = 0;
+    }
+}
+
+// dradix from Arun's fastradixdouble.c
+// + changed to MSD and hooked into do_radixsort framework here.
+// + replaced tolerance with rounding s.f.
+
+static unsigned long long dmask1;
+static unsigned long long dmask2;
+
+static void setNumericRounding(int dround)
+{
+    dmask1 = dround ? 1 << (8 * dround - 1) : 0;
+    dmask2 = 0xffffffffffffffff << dround * 8;
+}
+
+static union {
+    double d;
+    unsigned long long ull;
+} u;
+
+static
+unsigned long long dtwiddle(void *p, int i, int order)
+{
+    u.d = order * ((double *)p)[i]; // take care of 'order' at the beginning
+    if (R_FINITE(u.d)) {
+	u.ull = (u.d != 0.0) ? u.ull + ((u.ull & dmask1) << 1) : 0;
+    } else if (ISNAN(u.d)) {
+	u.ull = 0;
+	return (nalast == 1 ? ~u.ull : u.ull);
+    }
+    unsigned long long mask = (u.ull & 0x8000000000000000) ?
+	// always flip sign bit and if negative (sign bit was set)
+	// flip other bits too
+	0xffffffffffffffff : 0x8000000000000000;
+    return ((u.ull ^ mask) & dmask2);
+}
+
+static Rboolean dnan(void *p, int i)
+{
+    u.d = ((double *) p)[i];
+    return (ISNAN(u.d));
+}
+
+static unsigned long long (*twiddle) (void *, int, int);
+static Rboolean(*is_nan) (void *, int);
+// the size of the arg type (4 or 8). Just 8 currently until iradix is
+// merged in.
+static size_t colSize = 8;
+
+static void dradix_r(unsigned char *xsub, int *osub, int n, int radix);
+
+#ifdef WORDS_BIGENDIAN
+#define RADIX_BYTE colSize - radix - 1
+#else
+#define RADIX_BYTE radix
+#endif
+
+static void dradix(unsigned char *x, int *o, int n)
+{
+    int radix, nextradix, itmp, thisgrpn, maxgrpn;
+    unsigned int *thiscounts;
+    unsigned long long thisx = 0;
+    // see comments in iradix for structure.  This follows the same.
+    // TO DO: merge iradix in here (almost ready)
+    for (int i = 0; i < n; i++) {
+	thisx = twiddle(x, i, order);
+	for (radix = 0; radix < colSize; radix++)
+	    // if dround == 2 then radix 0 and 1 will be all 0 here and skipped.
+	    /* on little endian, 0 is the least significant bits (the right)
+	       and 7 is the most including sign (the left); i.e. reversed. */
+	    radixcounts[radix][((unsigned char *)&thisx)[RADIX_BYTE]]++;
+    }
+    for (radix = 0; radix < colSize; radix++) {
+	// thisx is the last x after loop above
+	int i = ((unsigned char *) &thisx)[RADIX_BYTE];
+	skip[radix] = radixcounts[radix][i] == n;
+	// clear it now, the other counts must be 0 already
+	if (skip[radix])
+	    radixcounts[radix][i] = 0;
+    }
+    radix = (int) colSize - 1;  // MSD
+    while (radix >= 0 && skip[radix]) radix--;
+    if (radix == -1) {
+	// All radix are skipped; i.e. one number repeated n times.
+	if (nalast == 0 && is_nan(x, 0))
+	    // all values are identical. return 0 if nalast=0 & all NA
+	    // because of 'return', have to take care of it here.
+	    for (int i = 0; i < n; i++)
+		o[i] = 0;
+	else
+	    for (int i = 0; i < n; i++)
+		o[i] = (i + 1);
+	push(n);
+	return;
+    }
+    for (int i = radix - 1; i >= 0; i--) {
+	// clear the lower radix counts, we only did them to know
+	// skip. will be reused within each group
+	if (!skip[i])
+	    memset(radixcounts[i], 0, 257 * sizeof(unsigned int));
+    }
+    thiscounts = radixcounts[radix];
+    itmp = thiscounts[0];
+    maxgrpn = itmp;
+    for (int i = 1; itmp < n && i < 256; i++) {
+	thisgrpn = thiscounts[i];
+	if (thisgrpn) {  // don't cummulate through 0s, important below
+	    if (thisgrpn > maxgrpn)
+		maxgrpn = thisgrpn;
+	    thiscounts[i] = (itmp += thisgrpn);
+	}
+    }
+    for (int i = n - 1; i >= 0; i--) {
+	thisx = twiddle(x, i, order);
+	o[ --thiscounts[((unsigned char *)&thisx)[RADIX_BYTE]] ] = i + 1;
+    }
+
+    if (radix_xsuballoc < maxgrpn) {
+        // TO DO: centralize this alloc
+        // The largest group according to the first non-skipped radix,
+        // so could be big (if radix is needed on first arg) TO DO:
+        // could include extra bits to divide the first radix up
+        // more. Often the MSD has groups in just 0-4 out of 256.
+        // free'd at the end of do_radixsort once we're done calling iradix
+        // repetitively
+        radix_xsub = (double *) realloc(radix_xsub, maxgrpn * sizeof(double));
+        if (!radix_xsub)
+            Error("Failed to realloc working memory %d*8bytes (xsub in dradix), radix=%d",
+                  maxgrpn, radix);
+        radix_xsuballoc = maxgrpn;
+    }
+
+    alloc_otmp(maxgrpn);   // TO DO: leave to do_radixsort and remove these?
+    alloc_xtmp(maxgrpn);
+
+    nextradix = radix - 1;
+    while (nextradix >= 0 && skip[nextradix])
+	nextradix--;
+    if (thiscounts[0] != 0)
+	Error("Logical error. thiscounts[0]=%d but should have been decremented to 0. dradix=%d",
+	      thiscounts[0], radix);
+    thiscounts[256] = n;
+    itmp = 0;
+    for (int i = 1; itmp < n && i <= 256; i++) {
+        if (thiscounts[i] == 0)
+            continue;
+        thisgrpn = thiscounts[i] - itmp;  // undo cummulate; i.e. diff
+        if (thisgrpn == 1 || nextradix == -1) {
+            push(thisgrpn);
+        } else {
+            if (colSize == 4) { // ready for merging in iradix ...
+                error("Not yet used, still using iradix instead");
+                for (int j = 0; j < thisgrpn; j++)
+                    ((int *)radix_xsub)[j] = (int)twiddle(x, o[itmp+j]-1, order);
+                // this is why this xsub here can't be the same memory
+                // as xsub in do_radixsort
+            } else 
+		for (int j = 0; j < thisgrpn; j++)
+		    ((unsigned long long *)radix_xsub)[j] =
+			twiddle(x, o[itmp+j]-1, order);
+	    // changes xsub and o by reference recursively.
+	    dradix_r(radix_xsub, o+itmp, thisgrpn, nextradix);
+	}
+	itmp = thiscounts[i];
+	thiscounts[i] = 0;
+    }
+    if (nalast == 0) // nalast = 1, -1 are both taken care already.
+	for (int i = 0; i < n; i++)
+	    o[i] = is_nan(x, o[i] - 1) ? 0 : o[i];
+    // nalast = 0 is dealt with separately as it just sets o to 0
+    // at those indices where x is NA. x[o[i]-1] because x is not
+    // modified by reference unlike iinsert or iradix_r
+
+}
+
+static void dinsert(unsigned long long *x, int *o, int n)
+// orders both x and o by reference in-place. Fast for small vectors,
+// low overhead.  don't be tempted to binsearch backwards here, have
+// to shift anyway; many memmove would have overhead and do the same
+// thing 'dinsert' will not be called when nalast = 0 and o[0] = -1.
+{
+    int otmp, tt;
+    unsigned long long xtmp;
+    for (int i = 1; i < n; i++) {
+	xtmp = x[i];
+	if (xtmp < x[i - 1]) {
+	    int j = i - 1;
+	    otmp = o[i];
+	    while (j >= 0 && xtmp < x[j]) {
+		x[j + 1] = x[j];
+		o[j + 1] = o[j];
+		j--;
+	    }
+	    x[j + 1] = xtmp;
+	    o[j + 1] = otmp;
+	}
+    }
+    tt = 0;
+    for (int i = 1; i < n; i++)
+	if (x[i] == x[i - 1])
+	    tt++;
+	else {
+	    push(tt + 1);
+	    tt = 0;
+	}
+    push(tt + 1);
+}
+
+static void dradix_r(unsigned char *xsub, int *osub, int n, int radix)
+/* xsub is a recursive offset into xsub working memory above in
+   dradix, reordered by reference.  osub is a an offset into the main
+   answer o, reordered by reference.  dradix iterates
+   7,6,5,4,3,2,1,0 */
+{
+    int itmp, thisgrpn, nextradix;
+    unsigned int *thiscounts;
+    unsigned char *p;
+    if (n < 200) {
+	/* 200 is guess based on limited testing. Needs calibrate(). Was 50
+	   based on sum(1:50)=1275 worst -vs- 256 cummulate + 256 memset +
+	   allowance since reverse order is unlikely */
+	// order=1 here because it's already taken care of in iradix
+	dinsert((void *)xsub, osub, n);
+
+	return;
+    }
+    thiscounts = radixcounts[radix];
+    p = xsub + RADIX_BYTE;
+    for (int i = 0; i < n; i++) {
+	thiscounts[*p]++;
+	p += colSize;
+    }
+    itmp = thiscounts[0];
+    for (int i = 1; itmp < n && i < 256; i++)
+	// don't cummulate through 0s, important below
+	if (thiscounts[i])
+	    thiscounts[i] = (itmp += thiscounts[i]);
+    p = xsub + (n - 1) * colSize;
+    if (colSize == 4) {
+	error("Not yet used, still using iradix instead");
+	for (int i = n - 1; i >= 0; i--) {
+	    int j = --thiscounts[*(p + RADIX_BYTE)];
+	    otmp[j] = osub[i];
+	    ((int *) xtmp)[j] = *(int *) p;
+	    p -= colSize;
+	}
+    } else {
+	for (int i = n - 1; i >= 0; i--) {
+	    int j = --thiscounts[*(p + RADIX_BYTE)];
+	    otmp[j] = osub[i];
+	    ((unsigned long long *) xtmp)[j] = *(unsigned long long *) p;
+	    p -= colSize;
+	}
+    }
+    memcpy(osub, otmp, n * sizeof(int));
+    memcpy(xsub, xtmp, n * colSize);
+
+    nextradix = radix - 1;
+    while (nextradix >= 0 && skip[nextradix])
+	nextradix--;
+    // TO DO: If nextradix==-1 and no further args from do_radixsort,
+    // we're done. We have o. Remember to memset thiscounts before
+    // returning.
+
+    if (thiscounts[0] != 0)
+	Error("Logical error. thiscounts[0]=%d but should have been decremented to 0. radix=%d",
+	      thiscounts[0], radix);
+    thiscounts[256] = n;
+    itmp = 0;
+    for (int i = 1; itmp < n && i <= 256; i++) {
+	if (thiscounts[i] == 0)
+	    continue;
+	thisgrpn = thiscounts[i] - itmp;        // undo cummulate; i.e. diff
+	if (thisgrpn == 1 || nextradix == -1)
+	    push(thisgrpn);
+	else
+	    dradix_r(xsub + itmp * colSize, osub + itmp, thisgrpn,
+		     nextradix);
+	itmp = thiscounts[i];
+	thiscounts[i] = 0;
+    }
+}
+
+// TO DO?: dcount. Find step size, then range = (max-min)/step and
+// proceed as icount. Many fixed precision floats (such as prices) may
+// be suitable. Fixed precision such as 1.10, 1.15, 1.20, 1.25, 1.30
+// ... do use all bits so dradix skipping may not help.
+
+static int *cradix_counts = NULL;
+static int cradix_counts_alloc = 0;
+static int maxlen = 1;
+static SEXP *cradix_xtmp = NULL;
+static int cradix_xtmp_alloc = 0;
+
+// same as StrCmp but also takes into account 'decreasing' and 'na.last' args.
+static int StrCmp2(SEXP x, SEXP y)
+{
+    // same cached pointer (including NA_STRING == NA_STRING)
+    if (x == y) return 0;
+    // if x=NA, nalast=1 ? then x > y else x < y (Note: nalast == 0 is
+    // already taken care of in 'csorted', won't be 0 here)
+    if (x == NA_STRING) return nalast;
+    if (y == NA_STRING) return -nalast;     // if y=NA, nalast=1 ? then y > x
+    return order*strcmp(CHAR(x), CHAR(y));  // same as explanation in StrCmp
+}
+
+static int StrCmp(SEXP x, SEXP y)            // also used by bmerge and chmatch
+{
+    // same cached pointer (including NA_STRING == NA_STRING)
+    if (x == y) return 0;
+    if (x == NA_STRING) return -1;    // x < y
+    if (y == NA_STRING) return 1;     // x > y
+    // assumes strings are in same encoding
+    return strcmp(CHAR(x), CHAR(y));
+}
+
+#define CHAR_ENCODING(x) (IS_ASCII(x) ? CE_UTF8 : getCharCE(x))
+
+static void checkEncodings(SEXP x)
+{
+    cetype_t ce;
+
+    int i;
+    for (i = 0; i < length(x) && STRING_ELT(x, i) == NA_STRING; i++);
+
+    if (i < length(x)) {
+        ce = CHAR_ENCODING(STRING_ELT(x, i));
+        if (ce == CE_NATIVE) {
+            error(_("Character encoding must be UTF-8, Latin-1 or bytes"));
+        }
+    }
+
+    /* Disabled for now -- doubles the time (for already sorted vectors): why?
+    for (int i = 1; i < length(x); i++) {
+        if (ce != CHAR_ENCODING(STRING_ELT(x, i))) {
+            error(_("Mixed character encodings are not supported"));
+        }
+    }
+    */
+}
+
+static void cradix_r(SEXP * xsub, int n, int radix)
+// xsub is a unique set of CHARSXP, to be ordered by reference
+
+// First time, radix == 0, and xsub == x. Then recursively moves SEXP together
+// for L1 cache efficiency.
+
+// Quite different to iradix because
+//   1) x is known to be unique so fits in cache
+//      (wide random access not an issue)
+//   2) they're variable length character strings
+//   3) no need to maintain o.  Just simply reorder x. No grps or push.
+
+// Fortunately, UTF sorts in the same order if treated as ASCII, so we
+// can simplify by doing it by bytes.
+
+// TO DO: confirm a forwards (MSD) radix for efficiency, although more
+// complicated.
+
+// This part has nothing to do with truelength. The
+// truelength stuff is to do with finding the unique strings.  We may
+// be able to improve CHARSXP derefencing by submitting patch to R to
+// make R's string cache contiguous but would likely be difficult. If
+// we strxfrm, then it'll then be contiguous and compact then anyway.
+{
+    int itmp, *thiscounts, thisgrpn=0, thisx=0;
+    SEXP stmp;
+
+    // TO DO?: chmatch to existing sorted vector, then grow it.
+    // TO DO?: if (n<N_SMALL = 200) insert sort, then loop through groups via ==
+    if (n <= 1) return;
+    if (n == 2) {
+	if (StrCmp(xsub[1], xsub[0]) < 0) {
+	    stmp = xsub[0];
+	    xsub[0] = xsub[1];
+	    xsub[1] = stmp;
+	}
+	return;
+    }
+    // TO DO: if (n < 50) cinsert (continuing from radix offset into
+    // CHAR) or using StrCmp. But 256 is narrow, so quick and not too
+    // much an issue.
+
+    thiscounts = cradix_counts + radix * 256;
+    for (int i = 0; i < n; i++) {
+	thisx = xsub[i] == NA_STRING ?
+	    0 : (radix < LENGTH(xsub[i]) ?
+		 (unsigned char) (CHAR(xsub[i])[radix]) : 1);
+	thiscounts[ thisx ]++;   // 0 for NA,  1 for ""
+    }
+    // this also catches when subx has shorter strings than the rest,
+    // thiscounts[0] == n and we'll recurse very quickly through to the
+    // overall maxlen with no 256 overhead each time
+    if (thiscounts[thisx] == n && radix < maxlen - 1) {
+	cradix_r(xsub, n, radix + 1);
+	thiscounts[thisx] = 0;  // the rest must be 0 already, save the memset
+	return;
+    }
+    itmp = thiscounts[0];
+    for (int i = 1; i < 256; i++)
+	// don't cummulate through 0s, important below
+	if (thiscounts[i])
+	    thiscounts[i] = (itmp += thiscounts[i]);
+    for (int i = n - 1; i >= 0; i--) {
+	thisx = xsub[i] == NA_STRING ?
+	    0 : (radix < LENGTH(xsub[i]) ?
+		 (unsigned char) (CHAR(xsub[i])[radix]) : 1);
+	int j = --thiscounts[thisx];
+	cradix_xtmp[j] = xsub[i];
+    }
+    memcpy(xsub, cradix_xtmp, n * sizeof(SEXP));
+    if (radix == maxlen - 1) {
+	memset(thiscounts, 0, 256 * sizeof(int));
+	return;
+    }
+    if (thiscounts[0] != 0)
+	Error("Logical error. counts[0]=%d in cradix but should have been decremented to 0. radix=%d",
+	      thiscounts[0], radix);
+    itmp = 0;
+    for (int i = 1; i < 256; i++) {
+	if (thiscounts[i] == 0)
+	    continue;
+	thisgrpn = thiscounts[i] - itmp;        // undo cummulate; i.e. diff
+	cradix_r(xsub + itmp, thisgrpn, radix + 1);
+	itmp = thiscounts[i];
+	// set to 0 now since we're here, saves memset
+	// afterwards. Important to clear! Also more portable for
+	// machines where 0 isn't all bits 0 (?!)
+	thiscounts[i] = 0;
+    }
+    if (itmp < n - 1)
+	cradix_r(xsub + itmp, n - itmp, radix + 1);     // final group
+}
+
+static SEXP *ustr = NULL;
+static int ustr_alloc = 0, ustr_n = 0;
+
+static void cgroup(SEXP * x, int *o, int n)
+// As icount :
+//   Places the ordering into o directly, overwriting whatever was there
+//   Doesn't change x
+//   Pushes group sizes onto stack
+
+// Only run when sortStr == FALSE. Basically a counting sort, in first
+// appearance order, directly.  Since it doesn't sort the strings, the
+// name is cgroup.  there is no _pre for this.  ustr created and
+// cleared each time.
+{
+    // savetl_init() is called once at the start of do_radixsort
+    if (ustr_n != 0)
+	Error
+	    ("Internal error. ustr isn't empty when starting cgroup: ustr_n=%d, ustr_alloc=%d",
+	     ustr_n, ustr_alloc);
+    for (int i = 0; i < n; i++) {
+	SEXP s = x[i];
+	if (TRUELENGTH(s) < 0) {        // this case first as it's the most frequent
+	    SET_TRUELENGTH(s, TRUELENGTH(s) - 1);
+	    // use negative counts so as to detect R's own (positive)
+	    // usage of tl on CHARSXP
+	    continue;
+	}
+	if (TRUELENGTH(s) > 0) {
+	    // Save any of R's own usage of tl (assumed positive, so
+	    // we can both count and save in one scan), to restore
+	    // afterwards. From R 2.14.0, tl is initialized to 0,
+	    // prior to that it was random so this step saved too much.
+	    savetl(s);
+	    SET_TRUELENGTH(s, 0);
+	}
+	if (ustr_alloc <= ustr_n) {
+	    // 10000 = 78k of 8byte pointers. Small initial guess,
+	    // negligible time to alloc.
+	    ustr_alloc = (ustr_alloc == 0) ? 10000 : ustr_alloc*2;
+	    if (ustr_alloc > n)
+		ustr_alloc = n;
+	    ustr = realloc(ustr, ustr_alloc * sizeof(SEXP));
+	    if (ustr == NULL)
+		Error("Unable to realloc %d * %d bytes in cgroup", ustr_alloc,
+		      sizeof(SEXP));
+	}
+	SET_TRUELENGTH(s, -1);
+	ustr[ustr_n++] = s;
+    }
+    // TO DO: the same string in different encodings will be
+    // considered different here. Sweep through ustr and merge counts
+    // where equal (sort needed therefore, unfortunately?, only if
+    // there are any marked encodings present)
+    int cumsum = 0;
+    for (int i = 0; i < ustr_n; i++) {      // 0.000
+	push(-TRUELENGTH(ustr[i]));
+	SET_TRUELENGTH(ustr[i], cumsum += -TRUELENGTH(ustr[i]));
+    }
+    int *target = (o[0] != -1) ? newo : o;
+    for (int i = n - 1; i >= 0; i--) {
+	SEXP s = x[i];           // 0.400 (page fetches on string cache)
+	int k = TRUELENGTH(s) - 1;
+	SET_TRUELENGTH(s, k);
+	target[k] = i + 1;      // 0.800 (random access to o)
+    }
+    // The cummulate meant counts are left non zero, so reset for next
+    // time (0.00s).
+    for (int i = 0; i < ustr_n; i++)
+	SET_TRUELENGTH(ustr[i], 0);
+    ustr_n = 0;
+}
+
+static int *csort_otmp = NULL, csort_otmp_alloc = 0;
+static void alloc_csort_otmp(int n)
+{
+    if (csort_otmp_alloc >= n)
+	return;
+    csort_otmp = (int *) realloc(csort_otmp, n * sizeof(int));
+    if (csort_otmp == NULL)
+	Error
+	    ("Failed to allocate working memory for csort_otmp. Requested %d * %d bytes",
+	     n, sizeof(int));
+    csort_otmp_alloc = n;
+}
+
+static void csort(SEXP * x, int *o, int n)
+/*
+   As icount :
+   Places the ordering into o directly, overwriting whatever was there
+   Doesn't change x
+   Pushes group sizes onto stack
+   Requires csort_pre() to have created and sorted ustr already
+*/
+{
+    /* can't use otmp, since iradix might be called here and that uses
+       otmp (and xtmp).  alloc_csort_otmp(n) is called from do_radixsort for
+       either n=nrow if 1st arg, or n=maxgrpn if onwards args */
+    for (int i = 0; i < n; i++)
+	csort_otmp[i] = (x[i] == NA_STRING) ? NA_INTEGER : -TRUELENGTH(x[i]);
+    if (nalast == 0 && n == 2) {
+        // special case for nalast == 0. n == 1 is handled inside
+        // do_radixsort. at least 1 will be NA here else use o from caller
+        // directly (not 1st arg)
+        if (o[0] == -1)
+            for (int i = 0; i < n; i++)
+                o[i] = i + 1;
+        for (int i = 0;  i < n; i++)
+            if (csort_otmp[i] == NA_INTEGER)
+                o[i] = 0;
+        push(1); push(1);
+        return; 
+    }
+    if (n < N_SMALL && nalast != 0) { // TO DO: calibrate() N_SMALL=200
+        if (o[0] == -1)
+            for (int i = 0; i < n; i++)
+                o[i] = i + 1;
+        // else use o from caller directly (not 1st arg)
+        for (int i = 0; i < n; i++)
+            csort_otmp[i] = icheck(csort_otmp[i]);
+        iinsert(csort_otmp, o, n);
+    } else {
+	setRange(csort_otmp, n);
+	if (range == NA_INTEGER)
+	    Error("Internal error. csort's otmp contains all-NA");
+	int *target = (o[0] != -1) ? newo : o;
+	if (range <= N_RANGE)
+	    // TO DO: calibrate(). radix was faster (9.2s
+	    // "range<=10000" instead of 11.6s "range<=N_RANGE &&
+	    // range<n") for run(7) where range=N_RANGE n=10000000
+	    icount(csort_otmp, target, n);
+	else
+	    iradix(csort_otmp, target, n);
+    }
+    // all i* push onto stack. Using their counts may be faster here
+    // than thrashing SEXP fetches over several passes as cgroup does
+    // (but cgroup needs that to keep orginal order, and cgroup saves
+    // the sort in csort_pre).
+}
+
+static void csort_pre(SEXP * x, int n)
+// Finds ustr and sorts it.  Runs once for each arg (if
+// sortStr == TRUE), then ustr is used by csort within each group ustr
+// is grown on each character arg, to save sorting the same strings
+// again if several args contain the same strings
+{
+    SEXP s;
+    int old_un, new_un;
+    // savetl_init() is called once at the start of do_radixsort
+    old_un = ustr_n;
+    for (int i = 0; i < n; i++) {
+	s = x[i];
+	// this case first as it's the most frequent. Already in ustr,
+	// this negative is its ordering.
+	if (TRUELENGTH(s) < 0)
+	    continue;
+	// Save any of R's own usage of tl (assumed positive, so we
+	// can both count and save in one scan), to restore
+	// afterwards. From R 2.14.0, tl is initialized to 0, prior to
+	// that it was random so this step saved too much.
+	if (TRUELENGTH(s) > 0) {
+	    savetl(s);
+	    SET_TRUELENGTH(s, 0);
+	}
+	if (ustr_alloc <= ustr_n) {
+	    // 10000 = 78k of 8byte pointers. Small initial guess,
+	    // negligible time to alloc.
+	    ustr_alloc = (ustr_alloc == 0) ? 10000 : ustr_alloc*2;
+	    if (ustr_alloc > old_un+n)
+		ustr_alloc = old_un + n;
+	    ustr = realloc(ustr, ustr_alloc * sizeof(SEXP));
+	    if (ustr == NULL)
+		Error("Failed to realloc ustr. Requested %d * %d bytes",
+		      ustr_alloc, sizeof(SEXP));
+	}
+	SET_TRUELENGTH(s, -1);  // this -1 will become its ordering later below
+	ustr[ustr_n++] = s;
+	// length on CHARSXP is the nchar of char * (excluding \0),
+	// and treats marked encodings as if ascii.
+	if (s != NA_STRING && LENGTH(s) > maxlen)
+	    maxlen = LENGTH(s);
+    }
+    new_un = ustr_n;
+    if (new_un == old_un)
+	return;
+    // No new strings observed, seen them all before in previous
+    // arg. ustr already sufficient.  If we ever make ustr
+    // permanently held by data.table, we'll just need to make the
+    // final loop to set -i-1 before returning here.  sort ustr.
+
+    // TODO: just sort new ones and merge them in.  These allocs are
+    // here, to save them being in the recursive cradix_r()
+    if (cradix_counts_alloc < maxlen) {
+	cradix_counts_alloc = maxlen + 10;   // +10 to save too many reallocs
+	cradix_counts = (int *)realloc(cradix_counts,
+				       cradix_counts_alloc * 256 * sizeof(int));
+	if (!cradix_counts)
+	    Error("Failed to alloc cradix_counts");
+	memset(cradix_counts, 0, cradix_counts_alloc * 256 * sizeof(int));
+    }
+    if (cradix_xtmp_alloc < ustr_n) {
+        cradix_xtmp = (SEXP *) realloc(cradix_xtmp,  ustr_n * sizeof(SEXP));
+        // TO DO: Reuse the one we have in do_radixsort.
+        // Does it need to be n length?
+        if (!cradix_xtmp)
+            Error("Failed to alloc cradix_tmp");
+        cradix_xtmp_alloc = ustr_n;
+    }
+    // sorts ustr in-place by reference save ordering in the
+    // CHARSXP. negative so as to distinguish with R's own usage.
+    cradix_r(ustr, ustr_n, 0);
+    for (int i = 0; i < ustr_n; i++)
+	SET_TRUELENGTH(ustr[i], -i - 1);
+}
+
+// functions to test vectors for sortedness: isorted, dsorted and csorted
+
+// base:is.unsorted returns NA in the presence of any NA, but we need
+// to consider na.last, and we also return -1 if x is sorted in
+// _strictly_ reverse order; a common case we optimize.  If a vector
+// is in decreasing order *with ties*, then an in-place reverse (no
+// sort) would result in instability of ties, so we are strict. We
+// also save grouping information during the check; that information
+// is required when sorting by multiple arguments.
+
+// TO DO: test in big steps first to return faster if unsortedness is
+// at the end (a common case of rbind'ing data to end) These are all
+// sequential access to x, so very quick and cache efficient.
+
+// order = 1 is ascending and order=-1 is descending; also takes care
+// of na.last argument with check through 'icheck' Relies on
+// NA_INTEGER == INT_MIN, checked in init.c
+static int isorted(int *x, int n)
+{
+    int i = 1, j = 0;
+    // when nalast = NA,
+    // all NAs ? return special value to replace all o's values with '0'
+    // any NAs ? return 0 = unsorted and leave it
+    //   to sort routines to replace o's with 0's
+    // no NAs ? continue to check rest of isorted - the same routine as usual
+    if (nalast == 0) {
+	for (int k = 0; k < n; k++)
+	    if (x[k] != NA_INTEGER)
+		j++;
+	if (j == 0) {
+	    push(n);
+	    return (-2);
+	}
+	if (j != n)
+	    return (0);
+    }
+    if (n <= 1) {
+	push(n);
+	return (1);
+    }
+    if (icheck(x[1]) < icheck(x[0])) {
+	i = 2;
+	while (i < n && icheck(x[i]) < icheck(x[i - 1]))
+	    i++;
+	// strictly opposite to expected 'order', no ties;
+	if (i == n) {
+	    mpush(1, n);
+	    return (-1);
+	}
+	// e.g. no more than one NA at the beginning/end (for order=-1/1)
+	else return (0);
+    }
+    int old = gsngrp[flip];
+    int tt = 1;
+    for (int i = 1; i < n; i++) {
+	if (icheck(x[i]) < icheck(x[i - 1])) {
+	    gsngrp[flip] = old;
+	    return (0);
+	}
+	if (x[i] == x[i - 1])
+	    tt++;
+	else {
+	    push(tt); tt = 1;
+	}
+    }
+    push(tt);
+    // same as 'order', NAs at the beginning for order=1, at end for
+    // order=-1, possibly with ties
+    return(1);
+}
+
+// order=1 is ascending and -1 is descending
+// also accounts for nalast=0 (=NA), =1 (TRUE), -1 (FALSE) (in twiddle)
+static int dsorted(double *x, int n)
+{
+    int i = 1, j = 0;
+    unsigned long long prev, this;
+    if (nalast == 0) {
+	// when nalast = NA,
+	// all NAs ? return special value to replace all o's values with '0'
+	// any NAs ? return 0 = unsorted and leave it to sort routines to
+	//           replace o's with 0's
+	// no NAs  ? continue to check the rest of isorted -
+	//           the same routine as usual
+	for (int k = 0; k < n; k++)
+	    if (!is_nan(x, k))
+		j++;
+	if (j == 0) {
+	    push(n);
+	    return (-2);
+	}
+	if (j != n)
+	    return (0);
+    }
+    if (n <= 1) {
+	push(n);
+	return (1);
+    }
+    prev = twiddle(x, 0, order);
+    this = twiddle(x, 1, order);
+    if (this < prev) {
+	i = 2;
+	prev = this;
+	while (i < n && (this = twiddle(x, i, order)) < prev) {
+	    i++;
+	    prev = this;
+	}
+	if (i == n) {
+	    mpush(1, n);
+	    return (-1);
+	}
+	// strictly opposite of expected 'order', no ties; e.g. no
+	// more than one NA at the beginning/end (for order=-1/1)
+
+	// TO DO: improve to be stable for ties in reverse
+	else return(0);
+    }
+    int old = gsngrp[flip];
+    int tt = 1;
+    for (int i = 1; i < n; i++) {
+	// TO DO: once we get past -Inf, NA and NaN at the bottom, and
+	//        +Inf at the top, the middle only need be twiddled
+	//        for tolerance (worth it?)
+	this = twiddle(x, i, order);
+	if (this < prev) {
+	    gsngrp[flip] = old;
+	    return (0);
+	}
+	if (this == prev)
+	    tt++;
+	else {
+	    push(tt);
+	    tt = 1;
+	}
+	prev = this;
+    }
+    push(tt);
+    // exactly as expected in 'order' (1=increasing, -1=decreasing),
+    // possibly with ties
+    return (1);
+}
+
+// order=1 is ascending and -1 is descending
+// also accounts for nalast=0 (=NA), =1 (TRUE), -1 (FALSE)
+static int csorted(SEXP *x, int n)
+{
+    int i = 1, j = 0, tmp;
+    if (nalast == 0) {
+	// when nalast = NA,
+	// all NAs ? return special value to replace all o's values with '0'
+	// any NAs ? return 0 = unsorted and leave it to sort routines
+	//           to replace o's with 0's
+	// no NAs  ? continue to check the rest of isorted -
+	//           the same routine as usual
+	for (int k = 0; k < n; k++)
+	    if (x[k] != NA_STRING)
+		j++;
+	if (j == 0) {
+	    push(n);
+	    return (-2);
+	}
+	if (j != n)
+	    return (0);
+    }
+    if (n <= 1) {
+	push(n);
+	return (1);
+    }
+    if (StrCmp2(x[1], x[0]) < 0) {
+	i = 2;
+	while (i < n && StrCmp2(x[i], x[i - 1]) < 0)
+	    i++;
+	if (i == n) {
+	    mpush(1, n);
+	    return (-1);
+	}
+	// strictly opposite of expected 'order', no ties;
+	// e.g. no more than one NA at the beginning/end (for order=-1/1)
+	else
+	    return (0);
+    }
+    int old = gsngrp[flip];
+    int tt = 1;
+    for (int i = 1; i < n; i++) {
+	tmp = StrCmp2(x[i], x[i - 1]);
+	if (tmp < 0) {
+	    gsngrp[flip] = old;
+	    return (0);
+	}
+	if (tmp == 0)
+	    tt++;
+	else {
+	    push(tt);
+	    tt = 1;
+	}
+    }
+    push(tt);
+    // exactly as expected in 'order', possibly with ties
+    return (1);
+}
+
+static void isort(int *x, int *o, int n)
+{
+    if (n <= 2) {
+	// nalast = 0 and n == 2 (check bottom of this file for explanation)
+	if (nalast == 0 && n == 2) {
+	    if (o[0] == -1) {
+		o[0] = 1;
+		o[1] = 2;
+	    }
+	    for (int i = 0; i < n; i++)
+		if (x[i] == NA_INTEGER)
+		    o[i] = 0;
+	    push(1); push(1);
+	    return;
+	} else Error("Internal error: isort received n=%d. isorted should have dealt with this (e.g. as a reverse sorted vector) already",n);
+    }
+    if (n < N_SMALL && o[0] != -1 && nalast != 0) {
+        // see comment above in iradix_r on N_SMALL=200.
+        /* if not o[0] then can't just populate with 1:n here, since x
+           is changed by ref too (so would need to be copied). */
+        /* pushes inside too. Changes x and o by reference, so not
+           suitable in first arg when o hasn't been populated yet
+           and x is an actual argument (hence check on o[0]). */
+        if (order != 1 || nalast != -1)
+            // so that default case, i.e., order=1, nalast=FALSE will
+            // not be affected (ex: `setkey`)
+            for (int i = 0; i < n; i++)
+                x[i] = icheck(x[i]);
+        iinsert(x, o, n);
+    } else {
+        /* Tighter range (e.g. copes better with a few abormally large
+           values in some groups), but also, when setRange was once at
+           arg level that caused an extra scan of (long) x
+           first. 10,000 calls to setRange takes just 0.04s
+           i.e. negligible. */
+        setRange(x, n);
+        if (range == NA_INTEGER)
+            Error("Internal error: isort passed all-NA. isorted should have caught this before this point");
+        int *target = (o[0] != -1) ? newo : o;
+        // was range < 10000 for subgroups, but 1e5 for the first
+        // arg, tried to generalise here.  1e4 rather than 1e5 here
+        // because iterated was (thisgrpn < 200 || range > 20000) then
+        // radix a short vector with large range can bite icount when
+        // iterated (BLOCK 4 and 6)
+        if (range <= N_RANGE && range <= n) {
+            icount(x, target, n);
+        } else {
+            iradix(x, target, n);
+        }
+    }
+}
+
+static void dsort(double *x, int *o, int n)
+{
+    if (n <= 2) {
+	if (nalast == 0 && n == 2) {
+	    // don't have to twiddle here.. at least one will be NA
+	    // and 'n' WILL BE 2.
+	    if (o[0] == -1) {
+		o[0] = 1;
+		o[1] = 2;
+	    }
+	    for (int i = 0; i < n; i++)
+		if (is_nan(x, i))
+		    o[i] = 0;
+	    push(1); push(1);
+	    return;
+	}
+	Error("Internal error: dsort received n=%d. dsorted should have dealt with this (e.g. as a reverse sorted vector) already",n);
+    }
+    if (n < N_SMALL && o[0] != -1 && nalast != 0) {
+	// see comment above in iradix_r re N_SMALL=200,  and isort for o[0]
+	for (int i = 0; i < n; i++)
+	    ((unsigned long long *)x)[i] = twiddle(x, i, order);
+	// have to twiddle here anyways, can't speed up default case
+	// like in isort
+	dinsert((unsigned long long *)x, o, n);
+    } else {
+	dradix((unsigned char *) x, (o[0] != -1) ? newo : o, n);
+    }
+}
+
+SEXP attribute_hidden do_radixsort(SEXP call, SEXP op, SEXP args, SEXP rho)
+{
+    int n = -1, narg = 0, ngrp, tmp, *osub, thisgrpn;
+    R_xlen_t nl = n;
+    Rboolean isSorted = TRUE, retGrp;
+    void *xd;
+    int *o = NULL;
+
+    /* ML: FIXME: Here are just two of the dangerous assumptions here */
+    if (sizeof(int) != 4) {
+        error("radix sort assumes sizeof(int) == 4");
+    }
+    if (sizeof(double) != 8) {
+        error("radix sort assumes sizeof(double) == 8");
+    }
+    
+    nalast = (asLogical(CAR(args)) == NA_LOGICAL) ? 0 :
+	(asLogical(CAR(args)) == TRUE) ? 1 : -1; // 1=TRUE, -1=FALSE, 0=NA
+    args = CDR(args);
+    SEXP decreasing = CAR(args);
+    args = CDR(args);
+
+    /* If TRUE, return starts of runs of identical values + max group size. */
+    retGrp = asLogical(CAR(args));
+    args = CDR(args);
+
+    /* If FALSE, get order of strings in appearance order. Essentially
+       abuses the CHARSXP table to group strings without hashing
+       them. Only makes sense when retGrp=TRUE.
+    */
+    sortStr = asLogical(CAR(args));
+    args = CDR(args);
+
+    /* When grouping, we round off doubles to account for imprecision */
+    setNumericRounding(retGrp ? 2 : 0);
+
+    if (args == R_NilValue)
+	return R_NilValue;
+    if (isVector(CAR(args)))
+	nl = XLENGTH(CAR(args));
+    for (SEXP ap = args; ap != R_NilValue; ap = CDR(ap), narg++) {
+	if (!isVector(CAR(ap)))
+	    error(_("argument %d is not a vector"), narg + 1);
+        //Rprintf("%d, %d\n", XLENGTH(CAR(ap)), nl);
+	if (XLENGTH(CAR(ap)) != nl)
+	    error(_("argument lengths differ"));
+    }
+
+    if (narg != length(decreasing))
+	error(_("length(decreasing) must match the number of order arguments"));
+    for (int i = 0; i < narg; i++) {
+	if (LOGICAL(decreasing)[i] == NA_LOGICAL)
+	    error(_("'decreasing' elements must be TRUE or FALSE"));
+    }
+    order = asLogical(decreasing) ? -1 : 1;
+
+    SEXP x = CAR(args);
+    args = CDR(args);
+
+    // (ML) FIXME: need to support long vectors
+    if (nl > INT_MAX) {
+	error(_("long vectors not supported"));
+    }
+    n = (int) nl;
+
+    // upper limit for stack size (all size 1 groups). We'll detect
+    // and avoid that limit, but if just one non-1 group (say 2), that
+    // can't be avoided.
+    gsmaxalloc = n;
+
+    // once for the result, needs to be length n.
+
+    // TO DO: save allocation if NULL is returned (isSorted = =TRUE) so
+    // [i|c|d]sort know they can populate o directly with no working
+    // memory needed to reorder existing order had to repace this from
+    // '0' to '-1' because 'nalast = 0' replace 'o[.]' with 0 values.
+
+    SEXP ans = PROTECT(allocVector(INTSXP, n));
+    o = INTEGER(ans);
+    o[0] = -1;
+    xd = DATAPTR(x);
+
+    stackgrps = narg > 1 || retGrp;
+
+    if (TYPEOF(x) == STRSXP) {
+        checkEncodings(x);
+    }
+    
+    savetl_init();   // from now on use Error not error.
+
+    switch (TYPEOF(x)) {
+    case INTSXP:
+    case LGLSXP:
+	tmp = isorted(xd, n);
+	break;
+    case REALSXP :
+	twiddle = &dtwiddle;
+	is_nan  = &dnan;
+	tmp = dsorted(xd, n);
+	break;
+    case STRSXP :
+	tmp = csorted(xd, n);
+	break;
+    default :
+        Error("First arg is type '%s', not yet supported",
+              type2char(TYPEOF(x)));
+    }
+    if (tmp) {
+	// -1 or 1. NEW: or -2 in case of nalast == 0 and all NAs
+	if (tmp == 1) {
+	    // same as expected in 'order' (1 = increasing, -1 = decreasing)
+	    isSorted = TRUE;
+	    for (int i = 0; i < n; i++)
+		o[i] = i + 1;
+	} else if (tmp == -1) {
+	    // -1 (or -n for result of strcmp), strictly opposite to
+	    // -expected 'order'
+	    isSorted = FALSE;
+	    for (int i = 0; i < n; i++)
+		o[i] = n - i;
+	} else if (nalast == 0 && tmp == -2) {
+	    // happens only when nalast=NA/0. Means all NAs, replace
+	    // with 0's therefore!
+	    isSorted = FALSE;
+	    for (int i = 0; i < n; i++)
+		o[i] = 0;
+	}
+    } else {
+	isSorted = FALSE;
+	switch (TYPEOF(x)) {
+	case INTSXP:
+	case LGLSXP:
+	    isort(xd, o, n);
+	    break;
+	case REALSXP :
+	    dsort(xd, o, n);
+	    break;
+	case STRSXP :
+	    if (sortStr) {
+		csort_pre(xd, n);
+		alloc_csort_otmp(n);
+		csort(xd, o, n);
+	    } else
+		cgroup(xd, o, n);
+	    break;
+	default:
+	    Error
+		("Internal error: previous default should have caught unsupported type");
+	}
+    }
+    
+    int maxgrpn = gsmax[flip];   // biggest group in the first arg
+    void *xsub = NULL;           // local
+    int (*f) ();
+    void (*g) ();
+    
+    if (narg > 1 && gsngrp[flip] < n) {
+        // double is the largest type, 8
+        xsub = (void *) malloc(maxgrpn * sizeof(double));
+        if (xsub == NULL)
+            Error("Couldn't allocate xsub in do_radixsort, requested %d * %d bytes.",
+                  maxgrpn, sizeof(double));
+        // global variable, used by isort, dsort, sort and cgroup
+        newo = (int *) malloc(maxgrpn * sizeof(int));
+        if (newo == NULL)
+            Error("Couldn't allocate newo in do_radixsort, requested %d * %d bytes.",
+                  maxgrpn, sizeof(int));
+    }
+
+    for (int col = 2; col <= narg; col++) {
+	x = CAR(args);
+	args = CDR(args);
+	xd = DATAPTR(x);
+	ngrp = gsngrp[flip];
+	if (ngrp == n && nalast != 0)
+	    break;
+	flipflop();
+	stackgrps = col != narg || retGrp;
+	order = LOGICAL(decreasing)[col - 1] ? -1 : 1;
+	switch (TYPEOF(x)) {
+	case INTSXP:
+	case LGLSXP:
+	    f = &isorted;
+	    g = &isort;
+	    break;
+	case REALSXP:
+	    twiddle = &dtwiddle;
+	    is_nan = &dnan;
+	    f = &dsorted;
+	    g = &dsort;
+	    break;
+	case STRSXP:
+	    f = &csorted;
+	    if (sortStr) {
+		csort_pre(xd, n);
+		alloc_csort_otmp(gsmax[1 - flip]);
+		g = &csort;
+	    }
+	    // no increasing/decreasing order required if sortStr = FALSE,
+	    // just a dummy argument
+	    else
+		g = &cgroup;
+	    break;
+	default:
+	    Error("Arg %d is type '%s', not yet supported",
+		  col, type2char(TYPEOF(x)));
+	}
+	int i = 0;
+	for (int grp = 0; grp < ngrp; grp++) {
+	    thisgrpn = gs[1 - flip][grp];
+	    if (thisgrpn == 1) {
+		if (nalast == 0) {
+		    // this edge case had to be taken care of
+		    // here.. (see the bottom of this file for
+		    // more explanation)
+		    switch (TYPEOF(x)) {
+		    case INTSXP:
+			if (INTEGER(x)[o[i] - 1] == NA_INTEGER) {
+			    isSorted = FALSE;
+			    o[i] = 0;
+			}
+			break;
+		    case LGLSXP:
+			if (LOGICAL(x)[o[i] - 1] == NA_LOGICAL) {
+			    isSorted = FALSE;
+			    o[i] = 0;
+			}
+			break;
+		    case REALSXP:
+			if (ISNAN(REAL(x)[o[i] - 1])) {
+			    isSorted = FALSE;
+			    o[i] = 0;
+			}
+			break;
+		    case STRSXP:
+			if (STRING_ELT(x, o[i] - 1) == NA_STRING) {
+			    isSorted = FALSE;
+			    o[i] = 0;
+                        } break;
+                    default :
+                        Error("Internal error: previous default should have caught unsupported type");
+                    }
+                }
+                i++;
+                push(1);
+                continue;
+            }
+            osub = o+i;
+            // ** TO DO **: if isSorted, we can just point xsub
+            //        into x directly. If (*f)() returns 0,
+            //        though, will have to copy x at that point
+            //        When doing this, xsub could be allocated at
+            //        that point for the first time.
+            if (TYPEOF(x) == STRSXP)
+                for (int j = 0; j < thisgrpn; j++)
+                    ((SEXP *) xsub)[j] = ((SEXP *) xd)[o[i++] - 1];
+            else if (TYPEOF(x) == REALSXP)
+                for (int j = 0; j < thisgrpn; j++)
+                    ((double *) xsub)[j] = ((double *) xd)[o[i++] - 1];
+            else
+                for (int j = 0; j < thisgrpn; j++)
+                    ((int *) xsub)[j] = ((int *) xd)[o[i++] - 1];
+                
+            // continue; // BASELINE short circuit timing
+            // point. Up to here is the cost of creating xsub.
+            // [i|d|c]sorted(); very low cost, sequential
+            tmp = (*f)(xsub, thisgrpn);
+            if (tmp) {
+                // *sorted will have already push()'d the groups
+                if (tmp == -1) {
+		    isSorted = FALSE;
+		    for (int k = 0; k < thisgrpn / 2; k++) {
+			// reverse the order in-place using no
+			// function call or working memory
+			// isorted only returns -1 for
+			// _strictly_ decreasing order,
+			// otherwise ties wouldn't be stable
+			tmp = osub[k];
+			osub[k] = osub[thisgrpn - 1 - k];
+			osub[thisgrpn - 1 - k] = tmp;
+		    }
+		} else if (nalast == 0 && tmp == -2) {
+		    // all NAs, replace osub[.] with 0s.
+		    isSorted = FALSE;
+		    for (int k = 0; k < thisgrpn; k++) osub[k] = 0;
+		}
+		continue;
+	    }
+	    isSorted = FALSE;
+	    // nalast=NA will result in newo[0] = 0. So had to change to -1.
+	    newo[0] = -1;
+	    // may update osub directly, or if not will put the
+	    // result in global newo
+	    (*g)(xsub, osub, thisgrpn);
+
+	    if (newo[0] != -1) {
+		if (nalast != 0)
+		    for (int j = 0; j < thisgrpn; j++)
+			// reuse xsub to reorder osub
+			((int *) xsub)[j] = osub[newo[j] - 1];
+		else
+		    for (int j = 0; j < thisgrpn; j++)
+			// final nalast case to handle!
+			((int *) xsub)[j] = (newo[j] == 0) ? 0 :
+			    osub[newo[j] - 1];
+		memcpy(osub, xsub, thisgrpn * sizeof(int));
+	    }
+	}
+    }
+
+    if (!sortStr && ustr_n != 0)
+        Error("Internal error: at the end of do_radixsort sortStr == FALSE but ustr_n !=0 [%d]",
+              ustr_n);
+    for(int i = 0; i < ustr_n; i++)
+        SET_TRUELENGTH(ustr[i], 0);
+    maxlen = 1;  // reset global. Minimum needed to count "" and NA
+    ustr_n = 0;
+    savetl_end();
+    free(ustr);
+    ustr = NULL;
+    ustr_alloc = 0;
+
+    if (retGrp) {
+        int maxgrpn = NA_INTEGER;
+        ngrp = gsngrp[flip];
+        SEXP s_ends = install("ends");
+        setAttrib(ans, s_ends, x = allocVector(INTSXP, ngrp));
+        if (ngrp > 0) {
+            INTEGER(x)[0] = gs[flip][0];
+            for (int i = 1; i < ngrp; i++)
+                INTEGER(x)[i] = INTEGER(x)[i - 1] + gs[flip][i];
+            maxgrpn = gsmax[flip];
+        }
+        SEXP s_maxgrpn = install("maxgrpn");
+        setAttrib(ans, s_maxgrpn, ScalarInteger(maxgrpn));
+        SEXP nms;
+        PROTECT(nms = allocVector(STRSXP, 2));
+        SET_STRING_ELT(nms, 0, mkChar("grouping"));
+        SET_STRING_ELT(nms, 1, mkChar("integer"));
+        setAttrib(ans, R_ClassSymbol, nms);
+        UNPROTECT(1);
+    }
+
+    Rboolean dropZeros = !retGrp && !isSorted && nalast == 0;
+    if (dropZeros) {
+        int zeros = 0;
+        for (int i = 0; i < n; i++) {
+            if (o[i] == 0)
+                zeros++;
+        }
+        if (zeros > 0) {
+            PROTECT(ans = allocVector(INTSXP, n - zeros));
+            int *o2 = INTEGER(ans);
+            for (int i = 0, i2 = 0; i < n; i++) {
+                if (o[i] > 0)
+                    o2[i2++] = o[i];
+            }
+            UNPROTECT(1);
+        }
+    }
+    
+    gsfree();
+    free(radix_xsub);          radix_xsub=NULL;    radix_xsuballoc=0;
+    free(xsub); free(newo);    xsub=newo=NULL;
+    free(xtmp);                xtmp=NULL;          xtmp_alloc=0;
+    free(otmp);                otmp=NULL;          otmp_alloc=0;
+    free(csort_otmp);          csort_otmp=NULL;    csort_otmp_alloc=0;
+
+    free(cradix_counts);       cradix_counts=NULL; cradix_counts_alloc=0;
+    free(cradix_xtmp);         cradix_xtmp=NULL;   cradix_xtmp_alloc=0;
+    // TO DO: use xtmp already got
+
+    UNPROTECT(1);
+    return ans;
+}
diff --git a/src/main/random.c b/src/main/random.c
index c740044..706edf0 100644
--- a/src/main/random.c
+++ b/src/main/random.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--2014  The R Core Team
+ *  Copyright (C) 1997--2015  The R Core Team
  *  Copyright (C) 2003--2008  The R Foundation
  *
  *  This program is free software; you can redistribute it and/or modify
@@ -16,7 +16,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  */
 
 #ifdef HAVE_CONFIG_H
@@ -24,6 +24,8 @@
 #endif
 
 #include <Defn.h>
+
+#include <R_ext/Itermacros.h>
 #include <R_ext/Random.h>
 #include <R_ext/RS.h>		/* for Calloc() */
 #include <Rmath.h>		/* for rxxx functions */
@@ -32,23 +34,23 @@
 /* Code down to do_random3 (inclusive) can be removed once the byte
   compiler knows how to optimize to .External rather than .Internal */
 #include <Internal.h>
-static void invalid(SEXP call)
+static void NORET invalid(SEXP call)
 {
     error(_("invalid arguments"));
 }
 
-static Rboolean 
+static Rboolean
 random1(double (*f) (double), double *a, R_xlen_t na, double *x, R_xlen_t n)
 {
     Rboolean naflag = FALSE;
     double ai;
-    R_xlen_t i;
+    R_xlen_t i, ia;
     errno = 0;
-    for (i = 0; i < n; i++) {
-	ai = a[i % na];
+    MOD_ITERATE1(n, na, i, ia, {
+	ai = a[ia];
 	x[i] = f(ai);
 	if (ISNAN(x[i])) naflag = TRUE;
-    }
+    });
     return(naflag);
 }
 
@@ -120,15 +122,16 @@ static Rboolean random2(double (*f) (double, double),
 			double *a, R_xlen_t na, double *b, R_xlen_t nb,
 			double *x, R_xlen_t n)
 {
-    double ai, bi; R_xlen_t i;
+    double ai, bi;
+    R_xlen_t i, ia, ib;
     Rboolean naflag = FALSE;
     errno = 0;
-    for (i = 0; i < n; i++) {
-	ai = a[i % na];
-	bi = b[i % nb];
+    MOD_ITERATE2(n, na, nb, i, ia, ib, {
+	ai = a[ia];
+	bi = b[ib];
 	x[i] = f(ai, bi);
 	if (ISNAN(x[i])) naflag = TRUE;
-    }
+    });
     return(naflag);
 }
 
@@ -207,22 +210,22 @@ SEXP attribute_hidden do_random2(SEXP call, SEXP op, SEXP args, SEXP rho)
     return x;
 }
 
-static Rboolean 
-random3(double (*f) (double, double, double), double *a, 
+static Rboolean
+random3(double (*f) (double, double, double), double *a,
 	R_xlen_t na, double *b, R_xlen_t nb, double *c, R_xlen_t nc,
 	double *x, R_xlen_t n)
 {
     double ai, bi, ci;
-    R_xlen_t i;
+    R_xlen_t i, ia, ib, ic;
     Rboolean naflag = FALSE;
     errno = 0;
-    for (i = 0; i < n; i++) {
-	ai = a[i % na];
-	bi = b[i % nb];
-	ci = c[i % nc];
+    MOD_ITERATE3(n, na, nb, nc, i, ia, ib, ic, {
+	ai = a[ia];
+	bi = b[ib];
+	ci = c[ic];
 	x[i] = f(ai, bi, ci);
 	if (ISNAN(x[i])) naflag = TRUE;
-    }
+    });
     return(naflag);
 }
 
@@ -426,33 +429,23 @@ static void ProbSampleNoReplace(int n, double *p, int *perm,
     }
 }
 
-void FixupProb(double *p, int n, int require_k, Rboolean replace)
+static void FixupProb(double *p, int n, int require_k, Rboolean replace)
 {
-    double sum;
-    int i, npos;
-    npos = 0;
-    sum = 0.;
-    for (i = 0; i < n; i++) {
+    double sum = 0.0;
+    int npos = 0;
+    for (int i = 0; i < n; i++) {
 	if (!R_FINITE(p[i]))
 	    error(_("NA in probability vector"));
-	if (p[i] < 0)
-	    error(_("non-positive probability"));
-	if (p[i] > 0) {
+	if (p[i] < 0.0)
+	    error(_("negative probability"));
+	if (p[i] > 0.0) {
 	    npos++;
 	    sum += p[i];
 	}
     }
     if (npos == 0 || (!replace && require_k > npos))
 	error(_("too few positive probabilities"));
-    for (i = 0; i < n; i++)
-	p[i] /= sum;
-}
-
-/* Our PRNGs have at most 32 bit of precision, and all have at least 25 */
-static R_INLINE double ru()
-{
-    double U = 33554432.0;
-    return (floor(U*unif_rand()) + unif_rand())/U;
+    for (int i = 0; i < n; i++) p[i] /= sum;
 }
 
 /* do_sample - probability sampling with/without replacement.
@@ -488,7 +481,7 @@ SEXP attribute_hidden do_sample(SEXP call, SEXP op, SEXP args, SEXP rho)
 	double *p = REAL(prob);
 	if (length(prob) != n)
 	    error(_("incorrect number of probabilities"));
-	FixupProb(p, n, k, (Rboolean)replace);
+	FixupProb(p, n, k, (Rboolean) replace);
 	PROTECT(x = allocVector(INTSXP, n));
 	if (replace) {
 	    int i, nc = 0;
@@ -504,7 +497,7 @@ SEXP attribute_hidden do_sample(SEXP call, SEXP op, SEXP args, SEXP rho)
     else {  // uniform sampling
 	double dn = asReal(sn);
 	R_xlen_t k = asVecSize(sk);
-	if (!R_FINITE(dn) || dn < 0 || dn > 4.5e15 || (k > 0 && dn == 0)) 
+	if (!R_FINITE(dn) || dn < 0 || dn > 4.5e15 || (k > 0 && dn == 0))
 	    error(_("invalid first argument"));
 	if (k < 0) error(_("invalid '%s' argument"), "size");
 	if (!replace && k > dn)
@@ -513,7 +506,7 @@ SEXP attribute_hidden do_sample(SEXP call, SEXP op, SEXP args, SEXP rho)
 	    PROTECT(y = allocVector(REALSXP, k));
 	    if (replace) {
 		double *ry = REAL(y);
-		for (R_xlen_t i = 0; i < k; i++) ry[i] = floor(dn * ru() + 1);
+		for (R_xlen_t i = 0; i < k; i++) ry[i] = R_unif_index(dn) + 1;
 	    } else {
 #ifdef LONG_VECTOR_SUPPORT
 		R_xlen_t n = (R_xlen_t) dn;
@@ -521,7 +514,7 @@ SEXP attribute_hidden do_sample(SEXP call, SEXP op, SEXP args, SEXP rho)
 		double *ry = REAL(y);
 		for (R_xlen_t i = 0; i < n; i++) x[i] = (double) i;
 		for (R_xlen_t i = 0; i < k; i++) {
-		    R_xlen_t j = (R_xlen_t)floor(n * ru());
+		    R_xlen_t j = (R_xlen_t) R_unif_index(n);
 		    ry[i] = x[j] + 1;
 		    x[j] = x[--n];
 		}
@@ -535,12 +528,12 @@ SEXP attribute_hidden do_sample(SEXP call, SEXP op, SEXP args, SEXP rho)
 	    int *iy = INTEGER(y);
 	    /* avoid allocation for a single sample */
 	    if (replace || k < 2) {
-		for (int i = 0; i < k; i++) iy[i] = (int)(dn * unif_rand() + 1);
+		for (int i = 0; i < k; i++) iy[i] = (int)(R_unif_index(dn) + 1);
 	    } else {
 		int *x = (int *)R_alloc(n, sizeof(int));
 		for (int i = 0; i < n; i++) x[i] = i;
 		for (int i = 0; i < k; i++) {
-		    int j = (int)(n * unif_rand());
+		    int j = (int)(R_unif_index(n));
 		    iy[i] = x[j] + 1;
 		    x[j] = x[--n];
 		}
diff --git a/src/main/raw.c b/src/main/raw.c
index 36d2b03..4ef5a1f 100644
--- a/src/main/raw.c
+++ b/src/main/raw.c
@@ -1,6 +1,6 @@
 /*
  *  R : A Computer Language for Statistical Data Analysis
- *  Copyright (C) 2001--2012 The R Core Team
+ *  Copyright (C) 2001--2015 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
@@ -14,7 +14,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  */
 
 #ifdef HAVE_CONFIG_H
@@ -39,7 +39,7 @@ SEXP attribute_hidden do_charToRaw(SEXP call, SEXP op, SEXP args, SEXP env)
 	warning(_("argument should be a character vector of length 1\nall but the first element will be ignored"));
     nc = LENGTH(STRING_ELT(x, 0));
     ans = allocVector(RAWSXP, nc);
-    memcpy(RAW(ans), CHAR(STRING_ELT(x, 0)), nc);
+    if (nc) memcpy(RAW(ans), CHAR(STRING_ELT(x, 0)), nc);
     return ans;
 }
 
@@ -81,10 +81,11 @@ SEXP attribute_hidden do_rawToChar(SEXP call, SEXP op, SEXP args, SEXP env)
 
 SEXP attribute_hidden do_rawShift(SEXP call, SEXP op, SEXP args, SEXP env)
 {
+    checkArity(op, args);
+
     SEXP ans, x = CAR(args);
     int shift = asInteger(CADR(args));
 
-
     if (!isRaw(x))
 	error(_("argument 'x' must be a raw vector"));
     if (shift == NA_INTEGER || shift < -8 || shift > 8)
@@ -102,6 +103,8 @@ SEXP attribute_hidden do_rawShift(SEXP call, SEXP op, SEXP args, SEXP env)
 
 SEXP attribute_hidden do_rawToBits(SEXP call, SEXP op, SEXP args, SEXP env)
 {
+    checkArity(op, args);
+
     SEXP ans, x = CAR(args);
     R_xlen_t i, j = 0;
     unsigned int tmp;
@@ -123,7 +126,8 @@ SEXP attribute_hidden do_intToBits(SEXP call, SEXP op, SEXP args, SEXP env)
     SEXP ans, x;
     R_xlen_t i, j = 0;
     unsigned int tmp;
-    
+
+    checkArity(op, args);
     PROTECT(x = coerceVector(CAR(args), INTSXP));
     if (!isInteger(x))
 	error(_("argument 'x' must be an integer vector"));
@@ -139,6 +143,7 @@ SEXP attribute_hidden do_intToBits(SEXP call, SEXP op, SEXP args, SEXP env)
 
 SEXP attribute_hidden do_packBits(SEXP call, SEXP op, SEXP args, SEXP env)
 {
+    checkArity(op, args);
     SEXP ans, x = CAR(args), stype = CADR(args);
     Rboolean useRaw;
     R_xlen_t i, len = XLENGTH(x), slen;
@@ -147,7 +152,7 @@ SEXP attribute_hidden do_packBits(SEXP call, SEXP op, SEXP args, SEXP env)
     if (TYPEOF(x) != RAWSXP && TYPEOF(x) != LGLSXP && TYPEOF(x) != INTSXP)
 	error(_("argument 'x' must be raw, integer or logical"));
     if (!isString(stype)  || LENGTH(stype) != 1)
-	error(_("argument 'type' must be a character string"));
+	error(_("argument '%s' must be a character string"), "type");
     useRaw = strcmp(CHAR(STRING_ELT(stype, 0)), "integer");
     fac = useRaw ? 8 : 32;
     if (len% fac)
@@ -265,7 +270,6 @@ SEXP attribute_hidden do_utf8ToInt(SEXP call, SEXP op, SEXP args, SEXP env)
 {
     SEXP ans, x = CAR(args);
     int tmp, used = 0; /* -Wall */
-    const char *s = CHAR(STRING_ELT(x, 0));
     R_xlen_t i, j, nc;
 
     checkArity(op, args);
@@ -274,6 +278,8 @@ SEXP attribute_hidden do_utf8ToInt(SEXP call, SEXP op, SEXP args, SEXP env)
     if (LENGTH(x) > 1)
 	warning(_("argument should be a character vector of length 1\nall but the first element will be ignored"));
     if (STRING_ELT(x, 0) == NA_STRING) return ScalarInteger(NA_INTEGER);
+    const char *s = CHAR(STRING_ELT(x, 0));
+    if (!utf8Valid(s)) return ScalarInteger(NA_INTEGER);
     nc = XLENGTH(STRING_ELT(x, 0)); /* ints will be shorter */
     int *ians = (int *) R_alloc(nc, sizeof(int));
     for (i = 0, j = 0; i < nc; i++) {
@@ -284,7 +290,7 @@ SEXP attribute_hidden do_utf8ToInt(SEXP call, SEXP op, SEXP args, SEXP env)
     }
     if (used < 0) error(_("invalid UTF-8 string"));
     ans = allocVector(INTSXP, j);
-    memcpy(INTEGER(ans), ians, sizeof(int) * j);
+    if (j) memcpy(INTEGER(ans), ians, sizeof(int) * j);
     return ans;
 }
 
diff --git a/src/main/registration.c b/src/main/registration.c
index fbf885a..95926ec 100644
--- a/src/main/registration.c
+++ b/src/main/registration.c
@@ -1,6 +1,6 @@
 /*
  *  R : A Computer Language for Statistical Data Analysis
- *  Copyright (C) 2002-2012	The R Core Team.
+ *  Copyright (C) 2002-2014	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
@@ -14,7 +14,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  *
  */
 /*
@@ -50,7 +50,7 @@
 #include <R_ext/Linpack.h>
 
 
-/*  These get the declarations of some routines refernced here but
+/*  These get the declarations of some routines referenced here but
     not explicitly declared.    This is necessary when we link with
     a C++ compiler because the linkage changes as the declarations
     are (currently) within extern "C" blocks.
@@ -70,13 +70,6 @@ static R_CallMethodDef callMethods [] = {
     CALLDEF(R_getTaskCallbackNames, 0),
     CALLDEF(R_removeTaskCallback, 1),
 
-#ifdef BC_PROFILING
-    // These have no interface in R, so used directly by .Call
-    CALLDEF(R_getbcprofcounts, 0),
-    CALLDEF(R_startbcprof, 0),
-    CALLDEF(R_stopbcprof, 0),
-#endif
-
     {NULL, NULL, 0}
 };
 
diff --git a/src/main/relop.c b/src/main/relop.c
index ce3a1fc..f455b2c 100644
--- a/src/main/relop.c
+++ b/src/main/relop.c
@@ -1,7 +1,7 @@
 /*
  *  R : A Computer Language for Statistical Data Analysis
+ *  Copyright (C) 1997--2017  The R Core Team
  *  Copyright (C) 1995, 1996  Robert Gentleman and Ross Ihaka
- *  Copyright (C) 1997--2013  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
@@ -15,7 +15,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  */
 
 
@@ -27,25 +27,25 @@
 #include <Internal.h>
 #include <Rmath.h>
 #include <errno.h>
+#include <R_ext/Itermacros.h>
 
 /* interval at which to check interrupts, a guess */
 #define NINTERRUPT 10000000
 
-static SEXP integer_relop(RELOP_TYPE code, SEXP s1, SEXP s2);
-static SEXP real_relop(RELOP_TYPE code, SEXP s1, SEXP s2);
+static SEXP numeric_relop(RELOP_TYPE code, SEXP s1, SEXP s2);
 static SEXP complex_relop(RELOP_TYPE code, SEXP s1, SEXP s2, SEXP call);
-static SEXP string_relop(RELOP_TYPE code, SEXP s1, SEXP s2);
-static SEXP raw_relop(RELOP_TYPE code, SEXP s1, SEXP s2);
-
-#define DO_SCALAR_RELOP(oper, x, y) do {			\
-	switch (oper) {						\
-	case EQOP: return ScalarLogical((x) == (y));		\
-	case NEOP: return ScalarLogical((x) != (y));		\
-	case LTOP: return ScalarLogical((x) < (y));		\
-	case GTOP: return ScalarLogical((x) > (y));		\
-	case LEOP: return ScalarLogical((x) <= (y));		\
-	case GEOP: return ScalarLogical((x) >= (y));		\
-	}							\
+static SEXP string_relop (RELOP_TYPE code, SEXP s1, SEXP s2);
+static SEXP raw_relop    (RELOP_TYPE code, SEXP s1, SEXP s2);
+
+#define DO_SCALAR_RELOP(oper, x, y) do {		\
+	switch (oper) {					\
+	case EQOP: return ScalarLogical((x) == (y));	\
+	case NEOP: return ScalarLogical((x) != (y));	\
+	case LTOP: return ScalarLogical((x) < (y));	\
+	case GTOP: return ScalarLogical((x) > (y));	\
+	case LEOP: return ScalarLogical((x) <= (y));	\
+	case GEOP: return ScalarLogical((x) >= (y));	\
+	}						\
     } while (0)
 
 SEXP attribute_hidden do_relop(SEXP call, SEXP op, SEXP args, SEXP env)
@@ -66,6 +66,8 @@ SEXP attribute_hidden do_relop(SEXP call, SEXP op, SEXP args, SEXP env)
     if (ATTRIB(arg1) != R_NilValue || ATTRIB(arg2) != R_NilValue) {
 	if (DispatchGroup("Ops", call, op, args, env, &ans))
 	    return ans;
+	if (argc != 2)
+	    error("operator needs two arguments");
     }
     else if (argc == 2) {
 	if (IS_SCALAR(arg1, INTSXP)) {
@@ -104,19 +106,16 @@ SEXP attribute_hidden do_relop(SEXP call, SEXP op, SEXP args, SEXP env)
     return do_relop_dflt(call, op, arg1, arg2);
 }
 
+// also called from cmp_relop() in eval.c :
 SEXP attribute_hidden do_relop_dflt(SEXP call, SEXP op, SEXP x, SEXP y)
 {
-    SEXP klass = R_NilValue, dims, tsp = R_NilValue, xnames, ynames;
-    R_xlen_t nx, ny;
-    int xarray, yarray, xts, yts;
-    Rboolean mismatch = FALSE, iS;
+    R_xlen_t
+	nx = xlength(x),
+	ny = xlength(y);
+    SEXPTYPE
+	typex = TYPEOF(x),
+	typey = TYPEOF(y);
     PROTECT_INDEX xpi, ypi;
-    SEXPTYPE typex, typey;
-
-    nx = xlength(x);
-    ny = xlength(y);
-    typex = TYPEOF(x);
-    typey = TYPEOF(y);
 
     /* pre-test to handle the most common case quickly.
        Used to skip warning too ....
@@ -147,26 +146,15 @@ SEXP attribute_hidden do_relop_dflt(SEXP call, SEXP op, SEXP x, SEXP y)
 	}
 
 	/* non-scalar case */
+
+	if (nx > 0 && ny > 0 &&
+	    ((nx > ny) ? nx % ny : ny % nx) != 0) // mismatch
+	    warningcall(call, _("longer object length is not "
+				"a multiple of shorter object length"));
 	PROTECT_WITH_INDEX(x, &xpi);
 	PROTECT_WITH_INDEX(y, &ypi);
 	SEXP ans;
-	if (typex == INTSXP && typey == INTSXP) 
-	    ans = integer_relop(PRIMVAL(op), x, y);
-	else {
-	    if (typex == INTSXP)
-		REPROTECT(x = coerceVector(x, REALSXP), xpi);
-	    if (typey == INTSXP)
-		REPROTECT(y = coerceVector(y, REALSXP), ypi);
-	    ans = real_relop(PRIMVAL(op), x, y);
-	}
-	if (nx > 0 && ny > 0)
-	    mismatch = ((nx > ny) ? nx % ny : ny % nx) != 0;
-	if (mismatch) {
-	    PROTECT(ans);
-	    warningcall(call, _("longer object length is not "
-				"a multiple of shorter object length"));
-	    UNPROTECT(1);
-	}
+	ans = numeric_relop(PRIMVAL(op), x, y);
 	UNPROTECT(2);
 	return ans;
     }
@@ -174,6 +162,7 @@ SEXP attribute_hidden do_relop_dflt(SEXP call, SEXP op, SEXP x, SEXP y)
     PROTECT_WITH_INDEX(x, &xpi);
     PROTECT_WITH_INDEX(y, &ypi);
 
+    Rboolean iS;
     /* That symbols and calls were allowed was undocumented prior to
        R 2.5.0.  We deparse them as deparse() would, minus attributes */
     if ((iS = isSymbol(x)) || TYPEOF(x) == LANGSXP) {
@@ -193,46 +182,38 @@ SEXP attribute_hidden do_relop_dflt(SEXP call, SEXP op, SEXP x, SEXP y)
 	UNPROTECT(1);
     }
 
-    if (!isVector(x) || !isVector(y)) {
-	if (isNull(x) || isNull(y)) {
-	    UNPROTECT(2);
-	    return allocVector(LGLSXP,0);
-	}
+    if (isNull(x)) REPROTECT(x = allocVector(INTSXP,0), xpi);
+    if (isNull(y)) REPROTECT(y = allocVector(INTSXP,0), ypi);
+    if (!isVector(x) || !isVector(y))
 	errorcall(call,
 		  _("comparison (%d) is possible only for atomic and list types"),
 		  PRIMVAL(op));
-    }
 
     if (TYPEOF(x) == EXPRSXP || TYPEOF(y) == EXPRSXP)
 	errorcall(call, _("comparison is not allowed for expressions"));
 
     /* ELSE :  x and y are both atomic or list */
 
-    if (XLENGTH(x) <= 0 || XLENGTH(y) <= 0) {
-	UNPROTECT(2);
-	return allocVector(LGLSXP, 0);
-    }
-
-    mismatch = FALSE;
-    xarray = isArray(x);
-    yarray = isArray(y);
-    xts = isTs(x);
-    yts = isTs(y);
-    if (nx > 0 && ny > 0)
-	mismatch = ((nx > ny) ? nx % ny : ny % nx) != 0;
-
+    Rboolean
+	xarray = isArray(x),
+	yarray = isArray(y),
+	xts = isTs(x),
+	yts = isTs(y);
+    SEXP dims, xnames, ynames;
     if (xarray || yarray) {
 	if (xarray && yarray) {
 	    if (!conformable(x, y))
 		errorcall(call, _("non-conformable arrays"));
 	    PROTECT(dims = getAttrib(x, R_DimSymbol));
 	}
-	else if (xarray) {
+	else if (xarray && (ny != 0 || nx == 0)) {
 	    PROTECT(dims = getAttrib(x, R_DimSymbol));
 	}
-	else /*(yarray)*/ {
+	else if (yarray && (nx != 0 || ny == 0)) {
 	    PROTECT(dims = getAttrib(y, R_DimSymbol));
-	}
+	} else
+	    PROTECT(dims = R_NilValue);
+
 	PROTECT(xnames = getAttrib(x, R_DimNamesSymbol));
 	PROTECT(ynames = getAttrib(y, R_DimNamesSymbol));
     }
@@ -241,6 +222,8 @@ SEXP attribute_hidden do_relop_dflt(SEXP call, SEXP op, SEXP x, SEXP y)
 	PROTECT(xnames = getAttrib(x, R_NamesSymbol));
 	PROTECT(ynames = getAttrib(y, R_NamesSymbol));
     }
+
+    SEXP klass = NULL, tsp = NULL; // -Wall
     if (xts || yts) {
 	if (xts && yts) {
 	    if (!tsConform(x, y))
@@ -261,8 +244,11 @@ SEXP attribute_hidden do_relop_dflt(SEXP call, SEXP op, SEXP x, SEXP y)
 	    PROTECT(klass = getAttrib(y, R_ClassSymbol));
 	}
     }
-    if (mismatch)
-	warningcall(call, _("longer object length is not a multiple of shorter object length"));
+
+  if (nx > 0 && ny > 0) {
+	if(((nx > ny) ? nx % ny : ny % nx) != 0) // mismatch
+            warningcall(call, _(
+		"longer object length is not a multiple of shorter object length"));
 
     if (isString(x) || isString(y)) {
 	REPROTECT(x = coerceVector(x, STRSXP), xpi);
@@ -274,27 +260,32 @@ SEXP attribute_hidden do_relop_dflt(SEXP call, SEXP op, SEXP x, SEXP y)
 	REPROTECT(y = coerceVector(y, CPLXSXP), ypi);
 	x = complex_relop((RELOP_TYPE) PRIMVAL(op), x, y, call);
     }
+    else if ((isNumeric(x) || isLogical(x)) && (isNumeric(y) || isLogical(y))) {
+        x = numeric_relop((RELOP_TYPE) PRIMVAL(op), x, y);
+    } // rest of cases only apply when 'x' or 'y' is raw
     else if (isReal(x) || isReal(y)) {
 	REPROTECT(x = coerceVector(x, REALSXP), xpi);
 	REPROTECT(y = coerceVector(y, REALSXP), ypi);
-	x = real_relop((RELOP_TYPE) PRIMVAL(op), x, y);
+	x = numeric_relop((RELOP_TYPE) PRIMVAL(op), x, y);
     }
     else if (isInteger(x) || isInteger(y)) {
 	REPROTECT(x = coerceVector(x, INTSXP), xpi);
 	REPROTECT(y = coerceVector(y, INTSXP), ypi);
-	x = integer_relop((RELOP_TYPE) PRIMVAL(op), x, y);
+	x = numeric_relop((RELOP_TYPE) PRIMVAL(op), x, y);
     }
     else if (isLogical(x) || isLogical(y)) {
 	REPROTECT(x = coerceVector(x, LGLSXP), xpi);
 	REPROTECT(y = coerceVector(y, LGLSXP), ypi);
-	x = integer_relop((RELOP_TYPE) PRIMVAL(op), x, y);
+	x = numeric_relop((RELOP_TYPE) PRIMVAL(op), x, y);
     }
     else if (TYPEOF(x) == RAWSXP || TYPEOF(y) == RAWSXP) {
 	REPROTECT(x = coerceVector(x, RAWSXP), xpi);
 	REPROTECT(y = coerceVector(y, RAWSXP), ypi);
 	x = raw_relop((RELOP_TYPE) PRIMVAL(op), x, y);
     } else errorcall(call, _("comparison of these types is not implemented"));
-
+  } else { // nx == 0 || ny == 0
+	x = allocVector(LGLSXP, 0);
+  }
 
     PROTECT(x);
     if (dims != R_NilValue) {
@@ -305,9 +296,9 @@ SEXP attribute_hidden do_relop_dflt(SEXP call, SEXP op, SEXP x, SEXP y)
 	    setAttrib(x, R_DimNamesSymbol, ynames);
     }
     else {
-	if (xlength(x) == xlength(xnames))
+	if (xnames != R_NilValue && xlength(x) == xlength(xnames))
 	    setAttrib(x, R_NamesSymbol, xnames);
-	else if (xlength(x) == xlength(ynames))
+	else if (ynames != R_NilValue && xlength(x) == xlength(ynames))
 	    setAttrib(x, R_NamesSymbol, ynames);
     }
     if (xts || yts) {
@@ -320,19 +311,79 @@ SEXP attribute_hidden do_relop_dflt(SEXP call, SEXP op, SEXP x, SEXP y)
     return x;
 }
 
-/* i1 = i % n1; i2 = i % n2;
- * this macro is quite a bit faster than having real modulo calls
- * in the loop (tested on Intel and Sparc)
- */
-#define mod_iterate(n1,n2,i1,i2) for (i=i1=i2=0; i<n; \
-	i1 = (++i1 == n1) ? 0 : i1,\
-	i2 = (++i2 == n2) ? 0 : i2,\
-	++i)
-
-static SEXP integer_relop(RELOP_TYPE code, SEXP s1, SEXP s2)
+#define ISNA_INT(x) x == NA_INTEGER
+
+#define NUMERIC_RELOP(type1, ACCESSOR1, ISNA1, type2, ACCESSOR2, ISNA2) do { \
+    type1 x1;                                                           \
+    type2 x2;                                                           \
+                                                                        \
+    switch (code) {                                                     \
+    case EQOP:                                                          \
+	MOD_ITERATE2(n, n1, n2, i, i1, i2, {                            \
+            x1 = ACCESSOR1(s1)[i1];                                     \
+	    x2 = ACCESSOR2(s2)[i2];                                     \
+	    if (ISNA1(x1) || ISNA2(x2))                                 \
+		LOGICAL(ans)[i] = NA_LOGICAL;                           \
+	    else                                                        \
+		LOGICAL(ans)[i] = (x1 == x2);                           \
+	});                                                             \
+	break;                                                          \
+    case NEOP:                                                          \
+	MOD_ITERATE2(n, n1, n2, i, i1, i2, {                            \
+	    x1 = ACCESSOR1(s1)[i1];                                     \
+	    x2 = ACCESSOR2(s2)[i2];                                     \
+	    if (ISNA1(x1) || ISNA2(x2))                                 \
+		LOGICAL(ans)[i] = NA_LOGICAL;                           \
+	    else                                                        \
+		LOGICAL(ans)[i] = (x1 != x2);                           \
+	});                                                             \
+	break;                                                          \
+    case LTOP:                                                          \
+	MOD_ITERATE2(n, n1, n2, i, i1, i2, {                            \
+	    x1 = ACCESSOR1(s1)[i1];                                     \
+	    x2 = ACCESSOR2(s2)[i2];                                     \
+	    if (ISNA1(x1) || ISNA2(x2))                                 \
+		LOGICAL(ans)[i] = NA_LOGICAL;                           \
+	    else                                                        \
+		LOGICAL(ans)[i] = (x1 < x2);                            \
+	});                                                             \
+	break;                                                          \
+    case GTOP:                                                          \
+	MOD_ITERATE2(n, n1, n2, i, i1, i2, {                            \
+	    x1 = ACCESSOR1(s1)[i1];                                     \
+	    x2 = ACCESSOR2(s2)[i2];                                     \
+	    if (ISNA1(x1) || ISNA2(x2))                                 \
+		LOGICAL(ans)[i] = NA_LOGICAL;                           \
+	    else                                                        \
+		LOGICAL(ans)[i] = (x1 > x2);                            \
+	});                                                             \
+	break;                                                          \
+    case LEOP:                                                          \
+	MOD_ITERATE2(n, n1, n2, i, i1, i2, {                            \
+	    x1 = ACCESSOR1(s1)[i1];                                     \
+	    x2 = ACCESSOR2(s2)[i2];                                     \
+	    if (ISNA1(x1) || ISNA2(x2))                                 \
+		LOGICAL(ans)[i] = NA_LOGICAL;                           \
+	    else                                                        \
+		LOGICAL(ans)[i] = (x1 <= x2);                           \
+	});                                                             \
+	break;                                                          \
+    case GEOP:                                                          \
+	MOD_ITERATE2(n, n1, n2, i, i1, i2, {                            \
+            x1 = ACCESSOR1(s1)[i1];                                     \
+	    x2 = ACCESSOR2(s2)[i2];                                     \
+	    if (ISNA1(x1) || ISNA2(x2))                                 \
+		LOGICAL(ans)[i] = NA_LOGICAL;                           \
+	    else                                                        \
+		LOGICAL(ans)[i] = (x1 >= x2);                           \
+	});                                                             \
+	break;                                                          \
+    }                                                                   \
+} while(0)
+
+static SEXP numeric_relop(RELOP_TYPE code, SEXP s1, SEXP s2)
 {
     R_xlen_t i, i1, i2, n, n1, n2;
-    int x1, x2;
     SEXP ans;
 
     n1 = XLENGTH(s1);
@@ -342,159 +393,18 @@ static SEXP integer_relop(RELOP_TYPE code, SEXP s1, SEXP s2)
     PROTECT(s2);
     ans = allocVector(LGLSXP, n);
 
-    switch (code) {
-    case EQOP:
-	mod_iterate(n1, n2, i1, i2) {
-//	    if ((i+1) % NINTERRUPT == 0) R_CheckUserInterrupt();
-	    x1 = INTEGER(s1)[i1];
-	    x2 = INTEGER(s2)[i2];
-	    if (x1 == NA_INTEGER || x2 == NA_INTEGER)
-		LOGICAL(ans)[i] = NA_LOGICAL;
-	    else
-		LOGICAL(ans)[i] = (x1 == x2);
-	}
-	break;
-    case NEOP:
-	mod_iterate(n1, n2, i1, i2) {
-//	    if ((i+1) % NINTERRUPT == 0) R_CheckUserInterrupt();
-	    x1 = INTEGER(s1)[i1];
-	    x2 = INTEGER(s2)[i2];
-	    if (x1 == NA_INTEGER || x2 == NA_INTEGER)
-		LOGICAL(ans)[i] = NA_LOGICAL;
-	    else
-		LOGICAL(ans)[i] = (x1 != x2);
-	}
-	break;
-    case LTOP:
-	mod_iterate(n1, n2, i1, i2) {
-//	    if ((i+1) % NINTERRUPT == 0) R_CheckUserInterrupt();
-	    x1 = INTEGER(s1)[i1];
-	    x2 = INTEGER(s2)[i2];
-	    if (x1 == NA_INTEGER || x2 == NA_INTEGER)
-		LOGICAL(ans)[i] = NA_LOGICAL;
-	    else
-		LOGICAL(ans)[i] = (x1 < x2);
-	}
-	break;
-    case GTOP:
-	mod_iterate(n1, n2, i1, i2) {
-//	    if ((i+1) % NINTERRUPT == 0) R_CheckUserInterrupt();
-	    x1 = INTEGER(s1)[i1];
-	    x2 = INTEGER(s2)[i2];
-	    if (x1 == NA_INTEGER || x2 == NA_INTEGER)
-		LOGICAL(ans)[i] = NA_LOGICAL;
-	    else
-		LOGICAL(ans)[i] = (x1 > x2);
-	}
-	break;
-    case LEOP:
-	mod_iterate(n1, n2, i1, i2) {
-//	    if ((i+1) % NINTERRUPT == 0) R_CheckUserInterrupt();
-	    x1 = INTEGER(s1)[i1];
-	    x2 = INTEGER(s2)[i2];
-	    if (x1 == NA_INTEGER || x2 == NA_INTEGER)
-		LOGICAL(ans)[i] = NA_LOGICAL;
-	    else
-		LOGICAL(ans)[i] = (x1 <= x2);
-	}
-	break;
-    case GEOP:
-	mod_iterate(n1, n2, i1, i2) {
-//	    if ((i+1) % NINTERRUPT == 0) R_CheckUserInterrupt();
-	    x1 = INTEGER(s1)[i1];
-	    x2 = INTEGER(s2)[i2];
-	    if (x1 == NA_INTEGER || x2 == NA_INTEGER)
-		LOGICAL(ans)[i] = NA_LOGICAL;
-	    else
-		LOGICAL(ans)[i] = (x1 >= x2);
-	}
-	break;
+    if (isInteger(s1) || isLogical(s1)) {
+        if (isInteger(s2) || isLogical(s2)) {
+            NUMERIC_RELOP(int, INTEGER, ISNA_INT, int, INTEGER, ISNA_INT);
+        } else {
+            NUMERIC_RELOP(int, INTEGER, ISNA_INT, double, REAL, ISNAN);
+        }
+    } else if (isInteger(s2) || isLogical(s2)) {
+        NUMERIC_RELOP(double, REAL, ISNAN, int, INTEGER, ISNA_INT);
+    } else {
+        NUMERIC_RELOP(double, REAL, ISNAN, double, REAL, ISNAN);
     }
-    UNPROTECT(2);
-    return ans;
-}
-
-static SEXP real_relop(RELOP_TYPE code, SEXP s1, SEXP s2)
-{
-    R_xlen_t i, i1, i2, n, n1, n2;
-    double x1, x2;
-    SEXP ans;
-
-    n1 = XLENGTH(s1);
-    n2 = XLENGTH(s2);
-    n = (n1 > n2) ? n1 : n2;
-    PROTECT(s1);
-    PROTECT(s2);
-    ans = allocVector(LGLSXP, n);
 
-    switch (code) {
-    case EQOP:
-	mod_iterate(n1, n2, i1, i2) {
-//	    if ((i+1) % NINTERRUPT == 0) R_CheckUserInterrupt();
-	    x1 = REAL(s1)[i1];
-	    x2 = REAL(s2)[i2];
-	    if (ISNAN(x1) || ISNAN(x2))
-		LOGICAL(ans)[i] = NA_LOGICAL;
-	    else
-		LOGICAL(ans)[i] = (x1 == x2);
-	}
-	break;
-    case NEOP:
-	mod_iterate(n1, n2, i1, i2) {
-//	    if ((i+1) % NINTERRUPT == 0) R_CheckUserInterrupt();
-	    x1 = REAL(s1)[i1];
-	    x2 = REAL(s2)[i2];
-	    if (ISNAN(x1) || ISNAN(x2))
-		LOGICAL(ans)[i] = NA_LOGICAL;
-	    else
-		LOGICAL(ans)[i] = (x1 != x2);
-	}
-	break;
-    case LTOP:
-	mod_iterate(n1, n2, i1, i2) {
-//	    if ((i+1) % NINTERRUPT == 0) R_CheckUserInterrupt();
-	    x1 = REAL(s1)[i1];
-	    x2 = REAL(s2)[i2];
-	    if (ISNAN(x1) || ISNAN(x2))
-		LOGICAL(ans)[i] = NA_LOGICAL;
-	    else
-		LOGICAL(ans)[i] = (x1 < x2);
-	}
-	break;
-    case GTOP:
-	mod_iterate(n1, n2, i1, i2) {
-//	    if ((i+1) % NINTERRUPT == 0) R_CheckUserInterrupt();
-	    x1 = REAL(s1)[i1];
-	    x2 = REAL(s2)[i2];
-	    if (ISNAN(x1) || ISNAN(x2))
-		LOGICAL(ans)[i] = NA_LOGICAL;
-	    else
-		LOGICAL(ans)[i] = (x1 > x2);
-	}
-	break;
-    case LEOP:
-	mod_iterate(n1, n2, i1, i2) {
-//	    if ((i+1) % NINTERRUPT == 0) R_CheckUserInterrupt();
-	    x1 = REAL(s1)[i1];
-	    x2 = REAL(s2)[i2];
-	    if (ISNAN(x1) || ISNAN(x2))
-		LOGICAL(ans)[i] = NA_LOGICAL;
-	    else
-		LOGICAL(ans)[i] = (x1 <= x2);
-	}
-	break;
-    case GEOP:
-	mod_iterate(n1, n2, i1, i2) {
-//	    if ((i+1) % NINTERRUPT == 0) R_CheckUserInterrupt();
-	    x1 = REAL(s1)[i1];
-	    x2 = REAL(s2)[i2];
-	    if (ISNAN(x1) || ISNAN(x2))
-		LOGICAL(ans)[i] = NA_LOGICAL;
-	    else
-		LOGICAL(ans)[i] = (x1 >= x2);
-	}
-	break;
-    }
     UNPROTECT(2);
     return ans;
 }
@@ -518,7 +428,7 @@ static SEXP complex_relop(RELOP_TYPE code, SEXP s1, SEXP s2, SEXP call)
 
     switch (code) {
     case EQOP:
-	mod_iterate(n1, n2, i1, i2) {
+	MOD_ITERATE2(n, n1, n2, i, i1, i2, {
 //	    if ((i+1) % NINTERRUPT == 0) R_CheckUserInterrupt();
 	    x1 = COMPLEX(s1)[i1];
 	    x2 = COMPLEX(s2)[i2];
@@ -527,10 +437,10 @@ static SEXP complex_relop(RELOP_TYPE code, SEXP s1, SEXP s2, SEXP call)
 		LOGICAL(ans)[i] = NA_LOGICAL;
 	    else
 		LOGICAL(ans)[i] = (x1.r == x2.r && x1.i == x2.i);
-	}
+	});
 	break;
     case NEOP:
-	mod_iterate(n1, n2, i1, i2) {
+	MOD_ITERATE2(n, n1, n2, i, i1, i2, {
 //	    if ((i+1) % NINTERRUPT == 0) R_CheckUserInterrupt();
 	    x1 = COMPLEX(s1)[i1];
 	    x2 = COMPLEX(s2)[i2];
@@ -539,7 +449,7 @@ static SEXP complex_relop(RELOP_TYPE code, SEXP s1, SEXP s2, SEXP call)
 		LOGICAL(ans)[i] = NA_LOGICAL;
 	    else
 		LOGICAL(ans)[i] = (x1.r != x2.r || x1.i != x2.i);
-	}
+	});
 	break;
     default:
 	/* never happens (-Wall) */
@@ -554,7 +464,7 @@ static SEXP complex_relop(RELOP_TYPE code, SEXP s1, SEXP s2, SEXP call)
    outside the collation domain. */
 static SEXP string_relop(RELOP_TYPE code, SEXP s1, SEXP s2)
 {
-    R_xlen_t i, n, n1, n2, res;
+    R_xlen_t i, n, n1, n2, res, i1, i2;
     SEXP ans, c1, c2;
     const void *vmax = vmaxget(); // for Scollate
 
@@ -567,32 +477,32 @@ static SEXP string_relop(RELOP_TYPE code, SEXP s1, SEXP s2)
 
     switch (code) {
     case EQOP:
-	for (i = 0; i < n; i++) {
+	MOD_ITERATE2(n, n1, n2, i, i1, i2, {
 //	    if ((i+1) % NINTERRUPT == 0) R_CheckUserInterrupt();
-	    c1 = STRING_ELT(s1, i % n1);
-	    c2 = STRING_ELT(s2, i % n2);
+	    c1 = STRING_ELT(s1, i1);
+	    c2 = STRING_ELT(s2, i2);
 	    if (c1 == NA_STRING || c2 == NA_STRING)
 		LOGICAL(ans)[i] = NA_LOGICAL;
 	    else
 		LOGICAL(ans)[i] = Seql(c1, c2) ? 1 : 0;
-	}
+	});
 	break;
     case NEOP:
-	for (i = 0; i < n; i++) {
+	MOD_ITERATE2(n, n1, n2, i, i1, i2, {
 //	    if ((i+1) % NINTERRUPT == 0) R_CheckUserInterrupt();
-	    c1 = STRING_ELT(s1, i % n1);
-	    c2 = STRING_ELT(s2, i % n2);
+	    c1 = STRING_ELT(s1, i1);
+	    c2 = STRING_ELT(s2, i2);
 	    if (c1 == NA_STRING || c2 == NA_STRING)
 		LOGICAL(ans)[i] = NA_LOGICAL;
 	    else
 		LOGICAL(ans)[i] = Seql(c1, c2) ? 0 : 1;
-	}
+	});
 	break;
     case LTOP:
-	for (i = 0; i < n; i++) {
+	MOD_ITERATE2(n, n1, n2, i, i1, i2, {
 //	    if ((i+1) % NINTERRUPT == 0) R_CheckUserInterrupt();
-	    c1 = STRING_ELT(s1, i % n1);
-	    c2 = STRING_ELT(s2, i % n2);
+	    c1 = STRING_ELT(s1, i1);
+	    c2 = STRING_ELT(s2, i2);
 	    if (c1 == NA_STRING || c2 == NA_STRING)
 		LOGICAL(ans)[i] = NA_LOGICAL;
 	    else if (c1 == c2)
@@ -605,13 +515,13 @@ static SEXP string_relop(RELOP_TYPE code, SEXP s1, SEXP s2)
 		else
 		    LOGICAL(ans)[i] = (res < 0) ? 1 : 0;
 	    }
-	}
+	});
 	break;
     case GTOP:
-	for (i = 0; i < n; i++) {
+	MOD_ITERATE2(n, n1, n2, i ,i1, i2, {
 //	    if ((i+1) % NINTERRUPT == 0) R_CheckUserInterrupt();
-	    c1 = STRING_ELT(s1, i % n1);
-	    c2 = STRING_ELT(s2, i % n2);
+	    c1 = STRING_ELT(s1, i1);
+	    c2 = STRING_ELT(s2, i2);
 	    if (c1 == NA_STRING || c2 == NA_STRING)
 		LOGICAL(ans)[i] = NA_LOGICAL;
 	    else if (c1 == c2)
@@ -624,13 +534,13 @@ static SEXP string_relop(RELOP_TYPE code, SEXP s1, SEXP s2)
 		else
 		    LOGICAL(ans)[i] = (res > 0) ? 1 : 0;
 	    }
-	}
+	});
 	break;
     case LEOP:
-	for (i = 0; i < n; i++) {
+	MOD_ITERATE2(n, n1, n2, i, i1, i2, {
 //	    if ((i+1) % NINTERRUPT == 0) R_CheckUserInterrupt();
-	    c1 = STRING_ELT(s1, i % n1);
-	    c2 = STRING_ELT(s2, i % n2);
+	    c1 = STRING_ELT(s1, i1);
+	    c2 = STRING_ELT(s2, i2);
 	    if (c1 == NA_STRING || c2 == NA_STRING)
 		LOGICAL(ans)[i] = NA_LOGICAL;
 	    else if (c1 == c2)
@@ -643,13 +553,13 @@ static SEXP string_relop(RELOP_TYPE code, SEXP s1, SEXP s2)
 		else
 		    LOGICAL(ans)[i] = (res <= 0) ? 1 : 0;
 	    }
-	}
+	});
 	break;
     case GEOP:
-	for (i = 0; i < n; i++) {
+	MOD_ITERATE2(n, n1, n2, i, i1, i2, {
 //	    if ((i+1) % NINTERRUPT == 0) R_CheckUserInterrupt();
-	    c1 = STRING_ELT(s1, i % n1);
-	    c2 = STRING_ELT(s2, i % n2);
+	    c1 = STRING_ELT(s1, i1);
+	    c2 = STRING_ELT(s2, i2);
 	    if (c1 == NA_STRING || c2 == NA_STRING)
 		LOGICAL(ans)[i] = NA_LOGICAL;
 	    else if (c1 == c2)
@@ -662,7 +572,7 @@ static SEXP string_relop(RELOP_TYPE code, SEXP s1, SEXP s2)
 		else
 		    LOGICAL(ans)[i] = (res >= 0) ? 1 : 0;
 	    }
-	}
+	});
 	break;
     }
     UNPROTECT(3);
@@ -685,52 +595,52 @@ static SEXP raw_relop(RELOP_TYPE code, SEXP s1, SEXP s2)
 
     switch (code) {
     case EQOP:
-	mod_iterate(n1, n2, i1, i2) {
+	MOD_ITERATE2(n, n1, n2, i, i1, i2, {
 //	    if ((i+1) % NINTERRUPT == 0) R_CheckUserInterrupt();
 	    x1 = RAW(s1)[i1];
 	    x2 = RAW(s2)[i2];
 	    LOGICAL(ans)[i] = (x1 == x2);
-	}
+	});
 	break;
     case NEOP:
-	mod_iterate(n1, n2, i1, i2) {
+	MOD_ITERATE2(n, n1, n2, i, i1, i2, {
 //	    if ((i+1) % NINTERRUPT == 0) R_CheckUserInterrupt();
 	    x1 = RAW(s1)[i1];
 	    x2 = RAW(s2)[i2];
 	    LOGICAL(ans)[i] = (x1 != x2);
-	}
+	});
 	break;
     case LTOP:
-	mod_iterate(n1, n2, i1, i2) {
+	MOD_ITERATE2(n, n1, n2, i, i1, i2, {
 //	    if ((i+1) % NINTERRUPT == 0) R_CheckUserInterrupt();
 	    x1 = RAW(s1)[i1];
 	    x2 = RAW(s2)[i2];
 	    LOGICAL(ans)[i] = (x1 < x2);
-	}
+	});
 	break;
     case GTOP:
-	mod_iterate(n1, n2, i1, i2) {
+	MOD_ITERATE2(n, n1, n2, i, i1, i2, {
 //	    if ((i+1) % NINTERRUPT == 0) R_CheckUserInterrupt();
 	    x1 = RAW(s1)[i1];
 	    x2 = RAW(s2)[i2];
 	    LOGICAL(ans)[i] = (x1 > x2);
-	}
+	});
 	break;
     case LEOP:
-	mod_iterate(n1, n2, i1, i2) {
+	MOD_ITERATE2(n, n1, n2, i, i1, i2, {
 //	    if ((i+1) % NINTERRUPT == 0) R_CheckUserInterrupt();
 	    x1 = RAW(s1)[i1];
 	    x2 = RAW(s2)[i2];
 	    LOGICAL(ans)[i] = (x1 <= x2);
-	}
+	});
 	break;
     case GEOP:
-	mod_iterate(n1, n2, i1, i2) {
+	MOD_ITERATE2(n, n1, n2, i, i1, i2, {
 //	    if ((i+1) % NINTERRUPT == 0) R_CheckUserInterrupt();
 	    x1 = RAW(s1)[i1];
 	    x2 = RAW(s2)[i2];
 	    LOGICAL(ans)[i] = (x1 >= x2);
-	}
+	});
 	break;
     }
     UNPROTECT(2);
@@ -752,7 +662,7 @@ static SEXP bitwiseNot(SEXP a)
 	}
 	break;
     default:
-	UNIMPLEMENTED_TYPE("bitNot", a);
+	UNIMPLEMENTED_TYPE("bitwNot", a);
     }
     if(np) UNPROTECT(np);
     return ans;
@@ -766,13 +676,14 @@ static SEXP bitwiseNot(SEXP a)
     if(isReal(b)) {b = PROTECT(coerceVector(b, INTSXP)); np++;} \
     if (TYPEOF(a) != TYPEOF(b)) error(_("'a' and 'b' must have the same type"));  \
     R_xlen_t i, m = XLENGTH(a), n = XLENGTH(b), mn = (m && n) ? mymax(m, n) : 0;  \
+    R_xlen_t ia, ib; \
     SEXP ans = allocVector(TYPEOF(a), mn); \
     switch(TYPEOF(a)) { \
     case INTSXP: \
-	for(i = 0; i < mn; i++) { \
-	    int aa = INTEGER(a)[i%m], bb =  INTEGER(b)[i%n]; \
+	MOD_ITERATE2(mn, m, n, i, ia, ib, { \
+	    int aa = INTEGER(a)[ia]; int bb = INTEGER(b)[ib]; \
 	    INTEGER(ans)[i] = (aa == NA_INTEGER || bb == NA_INTEGER) ? NA_INTEGER : aa op bb; \
-	} \
+	}); \
 	break; \
     default: \
 	UNIMPLEMENTED_TYPE(name, a); \
@@ -800,16 +711,17 @@ static SEXP bitwiseShiftL(SEXP a, SEXP b)
     int np = 0;
     if(isReal(a)) {a = PROTECT(coerceVector(a, INTSXP)); np++;}
     if(!isInteger(b)) {b = PROTECT(coerceVector(b, INTSXP)); np++;}
-    R_xlen_t i, m = XLENGTH(a), n = XLENGTH(b), 
+    R_xlen_t i, m = XLENGTH(a), n = XLENGTH(b),
 	mn = (m && n) ? mymax(m, n) : 0;
+    R_xlen_t ia, ib;
     SEXP ans = allocVector(TYPEOF(a), mn);
     switch(TYPEOF(a)) {
     case INTSXP:
-	for(i = 0; i < mn; i++) {
-	    int aa = INTEGER(a)[i%m], bb = INTEGER(b)[i%n];
-	    INTEGER(ans)[i] = 
+	MOD_ITERATE2(mn, m, n, i, ia, ib, {
+	    int aa = INTEGER(a)[ia]; int bb = INTEGER(b)[ib];
+	    INTEGER(ans)[i] =
 		(aa == NA_INTEGER || bb == NA_INTEGER || bb < 0 || bb > 31) ? NA_INTEGER : ((unsigned int)aa << bb);
-	}
+	});
 	break;
     default:
 	UNIMPLEMENTED_TYPE("bitShiftL", a);
@@ -823,16 +735,17 @@ static SEXP bitwiseShiftR(SEXP a, SEXP b)
     int np = 0;
     if(isReal(a)) {a = PROTECT(coerceVector(a, INTSXP)); np++;}
     if(!isInteger(b)) {b = PROTECT(coerceVector(b, INTSXP)); np++;}
-    R_xlen_t i, m = XLENGTH(a), n = XLENGTH(b), 
+    R_xlen_t i, m = XLENGTH(a), n = XLENGTH(b),
 	mn = (m && n) ? mymax(m, n) : 0;
+    R_xlen_t ia, ib;
     SEXP ans = allocVector(TYPEOF(a), mn);
     switch(TYPEOF(a)) {
     case INTSXP:
-	for(i = 0; i < mn; i++) {
-	    int aa = INTEGER(a)[i%m], bb = INTEGER(b)[i%n];
-	    INTEGER(ans)[i] = 
+	MOD_ITERATE2(mn, m, n, i, ia, ib, {
+	    int aa = INTEGER(a)[ia]; int bb = INTEGER(b)[ib];
+	    INTEGER(ans)[i] =
 		(aa == NA_INTEGER || bb == NA_INTEGER || bb < 0 || bb > 31) ? NA_INTEGER : ((unsigned int)aa >> bb);
-	}
+	});
 	break;
     default:
 	UNIMPLEMENTED_TYPE("bitShiftR", a);
diff --git a/src/main/rlocale.c b/src/main/rlocale.c
index f7dca77..4bea883 100644
--- a/src/main/rlocale.c
+++ b/src/main/rlocale.c
@@ -1,6 +1,6 @@
 /*
  *  R : A Computer Language for Statistical Data Analysis
- *  Copyright (C) 2005-2014   The R Core Team
+ *  Copyright (C) 2005-2015   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
@@ -14,19 +14,19 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  */
 
-/*  This file was contributed by Ei-ji Nakama.
- *  See also the comments in rlocale.h.
+/*  The original version of this file was contributed by Ei-ji Nakama.
+ *  See also the comments in ../include/rlocale.h.
  *
  *  It provides replacements for the wctype functions on
  *  Windows (where they are not correct in e.g. Japanese)
  *  AIX (missing)
- *  MacOS X in CJK (where these just call the ctype functions)
+ *  macOS in CJK (where these just call the ctype functions)
  *
  *  It also provides wc[s]width, where widths of CJK fonts are often
- *  wrong in vendor-supplied versions and in Marcus Kuhn's version
+ *  wrong in vendor-supplied versions and in Markus Kuhn's version
  *  used for Windows in R 2.[12].x.
  */
 
@@ -55,6 +55,27 @@
 #include <limits.h>
 #include <R_ext/Riconv.h>
 
+// This seems based on Markus Kuhn's function but with 1-based 'max'
+static int wcsearch(int wint, const struct interval *table, int max)
+{
+    int min = 0;
+    int mid;
+    max--;
+
+    if (wint < table[0].first || wint > table[max].last)
+	return 0;
+    while (max >= min) {
+	mid = (min + max) / 2;
+	if (wint > table[mid].last)
+	    min = mid + 1;
+	else if (wint < table[mid].first)
+	    max = mid - 1;
+	else
+	    return 1;
+    }
+    return 0;
+}
+
 static int wcwidthsearch(int wint, const struct interval_wcwidth *table,
 			 int max, int locale)
 {
@@ -62,7 +83,9 @@ static int wcwidthsearch(int wint, const struct interval_wcwidth *table,
     int mid;
     max--;
 
-    if (wint < table[0].first || wint > table[max].last) return 0;
+    /* This quickly gives one for ASCII characters since the table
+       starts at 0xa0 */
+    if (wint < table[0].first || wint > table[max].last) return 1;
     while (max >= min) {
 	mid = (min + max) / 2;
 	if (wint > table[mid].last)
@@ -76,12 +99,28 @@ static int wcwidthsearch(int wint, const struct interval_wcwidth *table,
     return -1;
 }
 
+/* The idea here here has never been explained.
+   See also the comments in ../include/rlocale.h.
+
+  That does not explain the separate entries for Singapore
+   (simplified) and Hong Kong/Macau (traditional) where it seems the
+   Windows system font is not different from PRC/Taiwan respectively,
+   nor what font was used for non-Windows, nor where the values came
+   from.
+
+   Except perhaps on macOS, the non-Windows locale names are for the
+   default MBCS encodings (e.g. GBK, GB1312, BIG5, EUCJP, EUCKR).
+   There are other non-UTF-8 encodings for those locales,
+   e.g. ja_JP.SJIS, ko_KR.CP949, zh_CN.eucCN, zh_HK.Big5HKSCS.
+*/
+
 typedef struct {
     char *name;
     int locale;
 } cjk_locale_name_t;
 
 static cjk_locale_name_t cjk_locale_name[] = {
+    // Windows locale names
     {"CHINESE(SINGAPORE)_SIGNAPORE",		MB_zh_SG},
     {"CHINESE_SIGNAPORE",			MB_zh_SG},
     {"CHINESE(PRC)_PEOPLE'S REPUBLIC OF CHINA",	MB_zh_CN},
@@ -97,20 +136,22 @@ static cjk_locale_name_t cjk_locale_name[] = {
     {"JAPANESE",				MB_ja_JP},
     {"KOREAN_KOREA",				MB_ko_KR},
     {"KOREAN",				        MB_ko_KR},
+    // Other OSes, but only in default encodings.
     {"ZH_TW",                                   MB_zh_TW},
     {"ZH_CN",                                   MB_zh_CN},
     {"ZH_CN.BIG5",                              MB_zh_TW},
     {"ZH_HK",                                   MB_zh_HK},
     {"ZH_SG",                                   MB_zh_SG},
-    {"JA_JP",				MB_ja_JP},
+    {"JA_JP",					MB_ja_JP},
     {"KO_KR",				        MB_ko_KR},
     {"ZH",				        MB_zh_CN},
-    {"JA",				MB_ja_JP},
+    {"JA",					MB_ja_JP},
     {"KO",				        MB_ko_KR},
-    {"",				        MB_UTF8},
+    // Default, where all EA Ambiguous characters have width one.
+    {"",				        MB_Default},
 };
 
-/* used in grDevices */
+// used in character.c, ../gnuwin32/console.c , ../library/grDevices/src/devP*.c :
 int Ri18n_wcwidth(wchar_t c)
 {
     char lc_str[128];
@@ -134,12 +175,15 @@ int Ri18n_wcwidth(wchar_t c)
 	}
     }
 
-    return(wcwidthsearch(c, table_wcwidth,
-			 (sizeof(table_wcwidth)/sizeof(struct interval_wcwidth)),
-			 lc));
+    int wd = wcwidthsearch(c, table_wcwidth,
+			   (sizeof(table_wcwidth)/sizeof(struct interval_wcwidth)),
+			   lc);
+    if (wd >= 0) return wd; // currently all are 1 or 2.
+    int zw = wcsearch(c, zero_width, zero_width_count);
+    return zw ? 0 : 1; // assume unknown chars are width one.
 }
 
-/* Used in charcter.c, gnuwin32/console.c */
+/* Used in character.c, errors.c, ../gnuwin32/console.c */
 attribute_hidden
 int Ri18n_wcswidth (const wchar_t *s, size_t n)
 {
@@ -154,36 +198,13 @@ int Ri18n_wcswidth (const wchar_t *s, size_t n)
     return rs;
 }
 
-#if defined(Win32) || defined(_AIX) || defined(__APPLE__)
-static int wcsearch(int wint, const struct interval *table, int max)
-{
-    int min = 0;
-    int mid;
-    max--;
-
-    if (wint < table[0].first || wint > table[max].last)
-	return 0;
-    while (max >= min) {
-	mid = (min + max) / 2;
-	if (wint > table[mid].last)
-	    min = mid + 1;
-	else if (wint < table[mid].first)
-	    max = mid - 1;
-	else
-	    return 1;
-    }
-    return 0;
-}
-#endif
-
-
 /*********************************************************************
- *  There is MacOS with a CSI(CodeSet Independence) system.
- *  (wchar_t != unicode)
- *  However, it is Unicode at the time of UTF-8.
+ *  macOS's wide character type functions are based on FreeBSD
+ *  and only work correctly for Latin-1 characters.
+ *  So we replace them.  May also be needed on FreeBSD.
  ********************************************************************/
 #if defined(__APPLE__)
-/* allow for both PPC and Intel platforms */
+/* allow for both PowerPC and Intel platforms */
 #ifdef WORDS_BIGENDIAN
 static const char UNICODE[] = "UCS-4BE";
 #else
@@ -193,7 +214,6 @@ static const char UNICODE[] = "UCS-4LE";
 /* in Defn.h which is not included here */
 extern const char *locale2charset(const char *);
 
-
 #define ISWFUNC(ISWNAME) static int Ri18n_isw ## ISWNAME (wint_t wc) \
 {	                                                             \
   char    mb_buf[MB_LEN_MAX+1];			                     \
@@ -226,7 +246,7 @@ extern const char *locale2charset(const char *);
   }                                                                  \
   return(-1);                                                        \
 }
-#endif
+#endif // __APPLE__
 
 /*********************************************************************
  *  iswalpha etc. does not function correctly for Windows
@@ -241,14 +261,14 @@ extern const char *locale2charset(const char *);
 #endif
 
 /*********************************************************************
- *  iswalpha etc. does function normally for Linux
+ *  iswalpha etc. do function correctly for Linux
  ********************************************************************/
 #ifndef ISWFUNC
 #define ISWFUNC(ISWNAME) static int Ri18n_isw ## ISWNAME (wint_t wc) \
 {                                                                       \
     return isw ## ISWNAME (wc); \
 }
-/* Solaris 8 is missing iswblank.  Its man page is missing iswcntrl,
+/* Solaris 8 was missing iswblank.  Its man page was missing iswcntrl,
    but the function is there.  MinGW used not to have iswblank until
    mingw-runtime-3.11. */
 #ifndef HAVE_ISWBLANK
diff --git a/src/main/rlocale_data.h b/src/main/rlocale_data.h
index 14ee258..c50b526 100644
--- a/src/main/rlocale_data.h
+++ b/src/main/rlocale_data.h
@@ -1,6 +1,6 @@
 /*
  *  R : A Computer Language for Statistical Data Analysis
- *  Copyright (C) 2005-8   The R Core Team
+ *  Copyright (C) 2005-2015   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
@@ -14,711 +14,344 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  */
 
 /* R i18n fake locale functions. */
-enum { MB_UTF8, MB_ja_JP, MB_ko_KR, MB_zh_SG, MB_zh_CN, MB_zh_HK,
+enum { MB_Default, MB_ja_JP, MB_ko_KR, MB_zh_SG, MB_zh_CN, MB_zh_HK,
        MB_zh_TW, MB_SIZE };
+
 struct interval {
     int first;
     int last;
 };
 
-
+/* ------------------- wcwidth -------------------- */
 struct interval_wcwidth {
     int first;
     int last;
     char mb[MB_SIZE];
 };
 
-/* ------------------- wcwidth -------------------- */
+/* Background info for the first column is in
+   http://www.unicode.org/Public/UCD/latest/ucd/EastAsianWidth.txt
+*/
+
+/* Anything not in this table nor the zero-width one is width one */
 static const struct interval_wcwidth table_wcwidth[] = {
-    {0x20,0x7e,{1,1,1,1,1,1,1}},
-    {0xa0,0xa0,{1,1,1,1,1,1,1}},
-    {0xa1,0xa1,{1,2,2,1,2,1,1}},
+    {0xa1,0xa1,{1,2,2,1,2,1,1}}, // 'East Asian' ambiguous
     {0xa2,0xa3,{1,2,1,1,1,2,1}},
-    {0xa4,0xa4,{1,2,2,2,2,1,1}},
+    {0xa4,0xa4,{1,2,2,2,2,1,1}}, // EA ambiguous
     {0xa5,0xa5,{1,1,1,1,1,2,1}},
     {0xa6,0xa6,{1,2,1,1,1,1,1}},
-    {0xa7,0xa7,{1,2,2,2,2,2,2}},
-    {0xa8,0xa8,{1,2,2,2,2,1,1}},
+    {0xa7,0xa7,{1,2,2,2,2,2,2}}, // EA ambiguous
+    {0xa8,0xa8,{1,2,2,2,2,1,1}}, // EA ambiguous
     {0xa9,0xa9,{1,2,1,1,1,1,1}},
-    {0xaa,0xaa,{1,2,2,1,2,1,1}},
-    {0xab,0xab,{1,1,1,1,1,1,1}},
+    {0xaa,0xaa,{1,2,2,1,2,1,1}}, // EA ambiguous
     {0xac,0xac,{1,2,1,1,1,1,1}},
     {0xad,0xad,{1,1,2,1,2,1,1}},
-    {0xae,0xae,{1,2,2,1,2,1,1}},
+    {0xae,0xae,{1,2,2,1,2,1,1}}, // EA ambiguous
     {0xaf,0xaf,{1,2,1,1,1,1,2}},
-    {0xb0,0xb1,{1,2,2,2,2,2,2}},
-    {0xb2,0xb3,{1,1,2,1,2,1,1}},
-    {0xb4,0xb4,{1,2,2,1,2,1,1}},
-    {0xb5,0xb5,{1,1,1,1,1,1,1}},
-    {0xb6,0xb6,{1,2,2,1,2,1,1}},
-    {0xb7,0xb7,{1,1,2,2,2,2,2}},
-    {0xb8,0xb8,{1,2,2,1,2,1,1}},
-    {0xb9,0xb9,{1,1,2,1,2,1,1}},
-    {0xba,0xba,{1,2,2,1,2,1,1}},
-    {0xbb,0xbb,{1,1,1,1,1,1,1}},
-    {0xbc,0xbe,{1,1,2,1,2,1,1}},
-    {0xbf,0xbf,{1,2,2,1,2,1,1}},
+    {0xb0,0xb1,{1,2,2,2,2,2,2}}, // EA ambiguous
+    {0xb2,0xb3,{1,1,2,1,2,1,1}}, // EA ambiguous
+    {0xb4,0xb4,{1,2,2,1,2,1,1}}, // EA ambiguous
+    {0xb6,0xb6,{1,2,2,1,2,1,1}}, // EA ambiguous
+    {0xb7,0xb7,{1,1,2,2,2,2,2}}, // EA ambiguous
+    {0xb8,0xb8,{1,2,2,1,2,1,1}}, // EA ambiguous
+    {0xb9,0xb9,{1,1,2,1,2,1,1}}, // EA ambiguous
+    {0xba,0xba,{1,2,2,1,2,1,1}}, // EA ambiguous
+    {0xbc,0xbe,{1,1,2,1,2,1,1}}, // EA ambiguous
+    {0xbf,0xbf,{1,2,2,1,2,1,1}}, // EA ambiguous
     {0xc0,0xc5,{1,2,1,1,1,1,1}},
-    {0xc6,0xc6,{1,2,2,1,2,1,1}},
+    {0xc6,0xc6,{1,2,2,1,2,1,1}}, // EA ambiguous
     {0xc7,0xcf,{1,2,1,1,1,1,1}},
-    {0xd0,0xd0,{1,1,2,1,2,1,1}},
+    {0xd0,0xd0,{1,1,2,1,2,1,1}}, // EA ambiguous
     {0xd1,0xd6,{1,2,1,1,1,1,1}},
-    {0xd7,0xd7,{1,2,2,2,2,2,2}},
-    {0xd8,0xd8,{1,2,2,1,2,1,1}},
+    {0xd7,0xd7,{1,2,2,2,2,2,2}}, // EA ambiguous
+    {0xd8,0xd8,{1,2,2,1,2,1,1}}, // EA ambiguous
     {0xd9,0xdd,{1,2,1,1,1,1,1}},
-    {0xde,0xdf,{1,2,2,1,2,1,1}},
+    {0xde,0xdf,{1,2,2,1,2,1,1}}, // 0xde is EA ambiguous
 #ifdef					Win32
-    {0xe0,0xe1,{1,2,1,2,1,1,1}},
+    {0xe0,0xe1,{1,2,1,2,1,1,1}}, // EA ambiguous
 #else					/* Win32 */
     {0xe0,0xe1,{1,2,1,2,2,1,1}},
 #endif					/* Win32 */
     {0xe2,0xe5,{1,2,1,1,1,1,1}},
-    {0xe6,0xe6,{1,2,2,1,2,1,1}},
+    {0xe6,0xe6,{1,2,2,1,2,1,1}}, // EA ambiguous
     {0xe7,0xe7,{1,2,1,1,1,1,1}},
 #ifdef					Win32
-    {0xe8,0xea,{1,2,1,2,1,1,1}},
+    {0xe8,0xea,{1,2,1,2,1,1,1}}, // EA ambiguous
 #else					/* Win32 */
     {0xe8,0xea,{1,2,1,2,2,1,1}},
 #endif					/* Win32 */
     {0xeb,0xeb,{1,2,1,1,1,1,1}},
 #ifdef					Win32
-    {0xec,0xed,{1,2,1,2,1,1,1}},
+    {0xec,0xed,{1,2,1,2,1,1,1}}, // EA ambiguous
 #else					/* Win32 */
     {0xec,0xed,{1,2,1,2,2,1,1}},
 #endif					/* Win32 */
     {0xee,0xef,{1,2,1,1,1,1,1}},
-    {0xf0,0xf0,{1,2,2,1,2,1,1}},
+    {0xf0,0xf0,{1,2,2,1,2,1,1}}, // EA ambiguous
     {0xf1,0xf1,{1,2,1,1,1,1,1}},
 #ifdef					Win32
-    {0xf2,0xf3,{1,2,1,2,1,1,1}},
+    {0xf2,0xf3,{1,2,1,2,1,1,1}}, // EA ambiguous
 #else					/* Win32 */
     {0xf2,0xf3,{1,2,1,2,2,1,1}},
 #endif					/* Win32 */
     {0xf4,0xf6,{1,2,1,1,1,1,1}},
-    {0xf7,0xf7,{1,2,2,2,2,2,2}},
-    {0xf8,0xf8,{1,2,2,1,2,1,1}},
+    {0xf7,0xf7,{1,2,2,2,2,2,2}}, // EA ambiguous
+    {0xf8,0xf8,{1,2,2,1,2,1,1}}, // EA ambiguous
 #ifdef					Win32
-    {0xf9,0xfa,{1,2,1,2,1,1,1}},
+    {0xf9,0xfa,{1,2,1,2,1,1,1}}, // EA ambiguous
 #else					/* Win32 */
     {0xf9,0xfa,{1,2,1,2,2,1,1}},
 #endif					/* Win32 */
     {0xfb,0xfb,{1,2,1,1,1,1,1}},
 #ifdef					Win32
-    {0xfc,0xfc,{1,2,1,2,1,1,1}},
+    {0xfc,0xfc,{1,2,1,2,1,1,1}}, // EA ambiguous
 #else					/* Win32 */
     {0xfc,0xfc,{1,2,1,2,2,1,1}},
 #endif					/* Win32 */
     {0xfd,0xfd,{1,2,1,1,1,1,1}},
-    {0xfe,0xfe,{1,2,2,1,2,1,1}},
+    {0xfe,0xfe,{1,2,2,1,2,1,1}}, // EA ambiguous
     {0xff,0x100,{1,2,1,1,1,1,1}},
 #ifdef					Win32
-    {0x101,0x101,{1,2,1,2,1,1,1}},
+    {0x101,0x101,{1,2,1,2,1,1,1}}, // EA ambiguous
 #else					/* Win32 */
     {0x101,0x101,{1,2,1,2,2,1,1}},
 #endif					/* Win32 */
     {0x102,0x110,{1,2,1,1,1,1,1}},
-    {0x111,0x111,{1,2,2,1,2,1,1}},
+    {0x111,0x111,{1,2,2,1,2,1,1}}, // EA ambiguous
     {0x112,0x112,{1,2,1,1,1,1,1}},
 #ifdef					Win32
-    {0x113,0x113,{1,2,1,2,1,1,1}},
+    {0x113,0x113,{1,2,1,2,1,1,1}}, // EA ambiguous
 #else					/* Win32 */
     {0x113,0x113,{1,2,1,2,2,1,1}},
 #endif					/* Win32 */
-    {0x114,0x115,{1,1,1,1,1,1,1}},
     {0x116,0x11a,{1,2,1,1,1,1,1}},
 #ifdef					Win32
-    {0x11b,0x11b,{1,2,1,2,1,1,1}},
+    {0x11b,0x11b,{1,2,1,2,1,1,1}}, // EA ambiguous
 #else					/* Win32 */
     {0x11b,0x11b,{1,2,1,2,2,1,1}},
 #endif					/* Win32 */
     {0x11c,0x122,{1,2,1,1,1,1,1}},
-    {0x123,0x123,{1,1,1,1,1,1,1}},
     {0x124,0x125,{1,2,1,1,1,1,1}},
-    {0x126,0x127,{1,2,2,1,2,1,1}},
+    {0x126,0x127,{1,2,2,1,2,1,1}}, // EA ambiguous
     {0x128,0x12a,{1,2,1,1,1,1,1}},
 #ifdef					Win32
-    {0x12b,0x12b,{1,2,1,2,1,1,1}},
+    {0x12b,0x12b,{1,2,1,2,1,1,1}}, // EA ambiguous
 #else					/* Win32 */
     {0x12b,0x12b,{1,2,1,2,2,1,1}},
 #endif					/* Win32 */
-    {0x12c,0x12d,{1,1,1,1,1,1,1}},
     {0x12e,0x130,{1,2,1,1,1,1,1}},
-    {0x131,0x133,{1,2,2,1,2,1,1}},
+    {0x131,0x133,{1,2,2,1,2,1,1}}, // EA ambiguous
     {0x134,0x137,{1,2,1,1,1,1,1}},
-    {0x138,0x138,{1,2,2,1,2,1,1}},
+    {0x138,0x138,{1,2,2,1,2,1,1}}, // EA ambiguous
     {0x139,0x13e,{1,2,1,1,1,1,1}},
-    {0x13f,0x142,{1,2,2,1,2,1,1}},
+    {0x13f,0x142,{1,2,2,1,2,1,1}}, // EA ambiguous
     {0x143,0x143,{1,2,1,1,1,1,1}},
 #ifdef					Win32
-    {0x144,0x144,{1,2,1,2,1,1,1}},
+    {0x144,0x144,{1,2,1,2,1,1,1}}, // EA ambiguous
 #else					/* Win32 */
     {0x144,0x144,{1,2,1,2,2,1,1}},
 #endif					/* Win32 */
     {0x145,0x147,{1,2,1,1,1,1,1}},
 #ifdef					Win32
-    {0x148,0x148,{1,2,1,2,1,1,1}},
+    {0x148,0x148,{1,2,1,2,1,1,1}}, // EA ambiguous
 #else					/* Win32 */
     {0x148,0x148,{1,2,1,2,2,1,1}},
 #endif					/* Win32 */
     {0x149,0x14b,{1,2,2,1,2,1,1}},
     {0x14c,0x14c,{1,2,1,1,1,1,1}},
 #ifdef					Win32
-    {0x14d,0x14d,{1,2,1,2,1,1,1}},
+    {0x14d,0x14d,{1,2,1,2,1,1,1}}, // EA ambiguous
 #else					/* Win32 */
     {0x14d,0x14d,{1,2,1,2,2,1,1}},
 #endif					/* Win32 */
-    {0x14e,0x14f,{1,1,1,1,1,1,1}},
     {0x150,0x151,{1,2,1,1,1,1,1}},
-    {0x152,0x153,{1,2,2,1,2,1,1}},
+    {0x152,0x153,{1,2,2,1,2,1,1}}, // EA ambiguous
     {0x154,0x165,{1,2,1,1,1,1,1}},
-    {0x166,0x167,{1,2,2,1,2,1,1}},
+    {0x166,0x167,{1,2,2,1,2,1,1}}, // EA ambiguous
     {0x168,0x16a,{1,2,1,1,1,1,1}},
 #ifdef					Win32
-    {0x16b,0x16b,{1,2,1,2,1,1,1}},
+    {0x16b,0x16b,{1,2,1,2,1,1,1}}, // EA ambiguous
 #else					/* Win32 */
     {0x16b,0x16b,{1,2,1,2,2,1,1}},
 #endif					/* Win32 */
     {0x16c,0x17e,{1,2,1,1,1,1,1}},
-    {0x17f,0x1cc,{1,1,1,1,1,1,1}},
     {0x1cd,0x1cd,{1,2,1,1,1,1,1}},
 #ifdef					Win32
-    {0x1ce,0x1ce,{1,2,1,2,1,1,1}},
+    {0x1ce,0x1ce,{1,2,1,2,1,1,1}}, // EA ambiguous
 #else					/* Win32 */
     {0x1ce,0x1ce,{1,2,1,2,2,1,1}},
 #endif					/* Win32 */
     {0x1cf,0x1cf,{1,2,1,1,1,1,1}},
 #ifdef					Win32
-    {0x1d0,0x1d0,{1,2,1,2,1,1,1}},
+    {0x1d0,0x1d0,{1,2,1,2,1,1,1}}, // EA ambiguous
 #else					/* Win32 */
     {0x1d0,0x1d0,{1,2,1,2,2,1,1}},
 #endif					/* Win32 */
     {0x1d1,0x1d1,{1,2,1,1,1,1,1}},
 #ifdef					Win32
-    {0x1d2,0x1d2,{1,2,1,2,1,1,1}},
+    {0x1d2,0x1d2,{1,2,1,2,1,1,1}}, // EA ambiguous
 #else					/* Win32 */
     {0x1d2,0x1d2,{1,2,1,2,2,1,1}},
 #endif					/* Win32 */
     {0x1d3,0x1d3,{1,2,1,1,1,1,1}},
 #ifdef					Win32
-    {0x1d4,0x1d4,{1,2,1,2,1,1,1}},
+    {0x1d4,0x1d4,{1,2,1,2,1,1,1}}, // EA ambiguous
 #else					/* Win32 */
     {0x1d4,0x1d4,{1,2,1,2,2,1,1}},
 #endif					/* Win32 */
     {0x1d5,0x1d5,{1,2,1,1,1,1,1}},
 #ifdef					Win32
-    {0x1d6,0x1d6,{1,2,1,2,1,1,1}},
+    {0x1d6,0x1d6,{1,2,1,2,1,1,1}}, // EA ambiguous
 #else					/* Win32 */
     {0x1d6,0x1d6,{1,2,1,2,2,1,1}},
 #endif					/* Win32 */
     {0x1d7,0x1d7,{1,2,1,1,1,1,1}},
 #ifdef					Win32
-    {0x1d8,0x1d8,{1,2,1,2,1,1,1}},
+    {0x1d8,0x1d8,{1,2,1,2,1,1,1}}, // EA ambiguous
 #else					/* Win32 */
     {0x1d8,0x1d8,{1,2,1,2,2,1,1}},
 #endif					/* Win32 */
     {0x1d9,0x1d9,{1,2,1,1,1,1,1}},
 #ifdef					Win32
-    {0x1da,0x1da,{1,2,1,2,1,1,1}},
+    {0x1da,0x1da,{1,2,1,2,1,1,1}}, // EA ambiguous
 #else					/* Win32 */
     {0x1da,0x1da,{1,2,1,2,2,1,1}},
 #endif					/* Win32 */
     {0x1db,0x1db,{1,2,1,1,1,1,1}},
 #ifdef					Win32
-    {0x1dc,0x1dc,{1,2,1,2,1,1,1}},
+    {0x1dc,0x1dc,{1,2,1,2,1,1,1}}, // EA ambiguous
 #else					/* Win32 */
     {0x1dc,0x1dc,{1,2,1,2,2,1,1}},
 #endif					/* Win32 */
-    {0x1dd,0x1f4,{1,1,1,1,1,1,1}},
     {0x1f5,0x1f5,{1,2,1,1,1,1,1}},
-    {0x1f6,0x1f8,{1,1,1,1,1,1,1}},
 #ifdef					Win32
-    {0x1f9,0x1f9,{1,1,1,1,1,1,1}},
-#else					/* Win32 */
-    {0x1f9,0x1f9,{1,1,1,1,1,1,1}},
-#endif					/* Win32 */
-    {0x1fa,0x220,{1,1,1,1,1,1,1}},
-    {0x222,0x233,{1,1,1,1,1,1,1}},
-    {0x250,0x250,{1,1,1,1,1,1,1}},
-#ifdef					Win32
-    {0x251,0x251,{1,1,1,2,1,1,1}},
+    {0x251,0x251,{1,1,1,2,1,1,1}}, // EA ambiguous
 #else					/* Win32 */
     {0x251,0x251,{1,1,1,2,2,1,1}},
 #endif					/* Win32 */
-    {0x252,0x260,{1,1,1,1,1,1,1}},
 #ifdef					Win32
-    {0x261,0x261,{1,1,1,2,1,1,1}},
+    {0x261,0x261,{1,1,1,2,1,1,1}}, // EA ambiguous
 #else					/* Win32 */
     {0x261,0x261,{1,1,1,2,2,1,1}},
 #endif					/* Win32 */
-    {0x262,0x2ad,{1,1,1,1,1,1,1}},
-    {0x2b0,0x2c3,{1,1,1,1,1,1,1}},
-    {0x2c4,0x2c4,{1,1,1,1,2,1,1}},
-    {0x2c5,0x2c6,{1,1,1,1,1,1,1}},
-    {0x2c7,0x2c7,{1,2,2,2,2,1,2}},
-    {0x2c8,0x2c8,{1,1,1,1,1,1,1}},
-    {0x2c9,0x2cb,{1,1,1,2,2,1,2}},
-    {0x2cc,0x2cc,{1,1,1,1,1,1,1}},
-    {0x2cd,0x2cd,{1,1,1,1,2,1,2}},
-    {0x2ce,0x2cf,{1,1,1,1,1,1,1}},
-    {0x2d0,0x2d0,{1,1,2,1,2,1,1}},
-    {0x2d1,0x2d7,{1,1,1,1,1,1,1}},
-    {0x2d8,0x2d8,{1,2,2,1,2,1,1}},
+    {0x2c4,0x2c4,{1,1,1,1,2,1,1}}, // EA ambiguous
+    {0x2c7,0x2c7,{1,2,2,2,2,1,2}}, // EA ambiguous
+    {0x2c9,0x2cb,{1,1,1,2,2,1,2}}, // EA ambiguous
+    {0x2cd,0x2cd,{1,1,1,1,2,1,2}}, // EA ambiguous
+    {0x2d0,0x2d0,{1,1,2,1,2,1,1}}, // EA ambiguous
+    {0x2d8,0x2d8,{1,2,2,1,2,1,1}}, // EA ambiguous
     {0x2d9,0x2d9,{1,2,2,2,2,1,2}},
     {0x2da,0x2db,{1,2,2,1,2,1,1}},
-    {0x2dc,0x2dc,{1,1,1,1,1,1,1}},
-    {0x2dd,0x2dd,{1,2,2,1,2,1,1}},
-    {0x2de,0x2de,{1,1,1,1,1,1,1}},
-    {0x2df,0x2df,{1,1,1,1,2,1,1}},
-    {0x2e0,0x2ee,{1,1,1,1,1,1,1}},
-    {0x374,0x375,{1,1,1,1,1,1,1}},
-    {0x37a,0x37a,{1,1,1,1,1,1,1}},
-    {0x37e,0x37e,{1,1,1,1,1,1,1}},
+    {0x2dd,0x2dd,{1,2,2,1,2,1,1}}, // EA ambiguous
+    {0x2df,0x2df,{1,1,1,1,2,1,1}}, // EA ambiguous
     {0x384,0x386,{1,2,1,1,1,1,1}},
-    {0x387,0x387,{1,1,1,1,1,1,1}},
     {0x388,0x38a,{1,2,1,1,1,1,1}},
     {0x38c,0x38c,{1,2,1,1,1,1,1}},
     {0x38e,0x390,{1,2,1,1,1,1,1}},
-    {0x391,0x3a1,{1,2,2,2,2,1,2}},
-    {0x3a3,0x3a9,{1,2,2,2,2,1,2}},
+    {0x391,0x3a1,{1,2,2,2,2,1,2}}, // EA ambiguous
+    {0x3a3,0x3a9,{1,2,2,2,2,1,2}}, // EA ambiguous
     {0x3aa,0x3b0,{1,2,1,1,1,1,1}},
-    {0x3b1,0x3c1,{1,2,2,2,2,1,2}},
+    {0x3b1,0x3c1,{1,2,2,2,2,1,2}}, // EA ambiguous
     {0x3c2,0x3c2,{1,2,1,1,1,1,1}},
-    {0x3c3,0x3c9,{1,2,2,2,2,1,2}},
+    {0x3c3,0x3c9,{1,2,2,2,2,1,2}}, // EA ambiguous
     {0x3ca,0x3ce,{1,2,1,1,1,1,1}},
-    {0x3d0,0x3f6,{1,1,1,1,1,1,1}},
-    {0x400,0x400,{1,1,1,1,1,1,1}},
-    {0x401,0x401,{1,2,2,2,2,1,1}},
+    {0x401,0x401,{1,2,2,2,2,1,1}}, // EA ambiguous
     {0x402,0x40c,{1,2,1,1,1,1,1}},
-    {0x40d,0x40d,{1,1,1,1,1,1,1}},
     {0x40e,0x40f,{1,2,1,1,1,1,1}},
-    {0x410,0x44f,{1,2,2,2,2,1,1}},
-    {0x450,0x450,{1,1,1,1,1,1,1}},
-    {0x451,0x451,{1,2,2,2,2,1,1}},
+    {0x410,0x44f,{1,2,2,2,2,1,1}}, // Greek and Cyrillic,  EA ambiguous
+    {0x451,0x451,{1,2,2,2,2,1,1}}, // EA ambiguous
     {0x452,0x45c,{1,2,1,1,1,1,1}},
-    {0x45d,0x45d,{1,1,1,1,1,1,1}},
     {0x45e,0x45f,{1,2,1,1,1,1,1}},
-    {0x460,0x482,{1,1,1,1,1,1,1}},
-    {0x48a,0x4ce,{1,1,1,1,1,1,1}},
-    {0x4d0,0x4f5,{1,1,1,1,1,1,1}},
-    {0x4f8,0x4f9,{1,1,1,1,1,1,1}},
-    {0x500,0x50f,{1,1,1,1,1,1,1}},
-    {0x531,0x556,{1,1,1,1,1,1,1}},
-    {0x559,0x55f,{1,1,1,1,1,1,1}},
-    {0x561,0x587,{1,1,1,1,1,1,1}},
-    {0x589,0x58a,{1,1,1,1,1,1,1}},
-    {0x5be,0x5be,{1,1,1,1,1,1,1}},
-    {0x5c0,0x5c0,{1,1,1,1,1,1,1}},
-    {0x5c3,0x5c3,{1,1,1,1,1,1,1}},
-    {0x5d0,0x5ea,{1,1,1,1,1,1,1}},
-    {0x5f0,0x5f4,{1,1,1,1,1,1,1}},
-    {0x60c,0x60c,{1,1,1,1,1,1,1}},
-    {0x61b,0x61b,{1,1,1,1,1,1,1}},
-    {0x61f,0x61f,{1,1,1,1,1,1,1}},
-    {0x621,0x63a,{1,1,1,1,1,1,1}},
-    {0x640,0x64a,{1,1,1,1,1,1,1}},
-    {0x660,0x66f,{1,1,1,1,1,1,1}},
-    {0x671,0x6d5,{1,1,1,1,1,1,1}},
-    {0x6e5,0x6e6,{1,1,1,1,1,1,1}},
-    {0x6e9,0x6e9,{1,1,1,1,1,1,1}},
-    {0x6f0,0x6fe,{1,1,1,1,1,1,1}},
-    {0x700,0x70d,{1,1,1,1,1,1,1}},
-    {0x710,0x710,{1,1,1,1,1,1,1}},
-    {0x712,0x72c,{1,1,1,1,1,1,1}},
-    {0x780,0x7a5,{1,1,1,1,1,1,1}},
-    {0x7b1,0x7b1,{1,1,1,1,1,1,1}},
-    {0x903,0x903,{1,1,1,1,1,1,1}},
-    {0x905,0x939,{1,1,1,1,1,1,1}},
-    {0x93d,0x940,{1,1,1,1,1,1,1}},
-    {0x949,0x94c,{1,1,1,1,1,1,1}},
-    {0x950,0x950,{1,1,1,1,1,1,1}},
-    {0x958,0x961,{1,1,1,1,1,1,1}},
-    {0x964,0x970,{1,1,1,1,1,1,1}},
-    {0x982,0x983,{1,1,1,1,1,1,1}},
-    {0x985,0x98c,{1,1,1,1,1,1,1}},
-    {0x98f,0x990,{1,1,1,1,1,1,1}},
-    {0x993,0x9a8,{1,1,1,1,1,1,1}},
-    {0x9aa,0x9b0,{1,1,1,1,1,1,1}},
-    {0x9b2,0x9b2,{1,1,1,1,1,1,1}},
-    {0x9b6,0x9b9,{1,1,1,1,1,1,1}},
-    {0x9be,0x9c0,{1,1,1,1,1,1,1}},
-    {0x9c7,0x9c8,{1,1,1,1,1,1,1}},
-    {0x9cb,0x9cc,{1,1,1,1,1,1,1}},
-    {0x9d7,0x9d7,{1,1,1,1,1,1,1}},
-    {0x9dc,0x9dd,{1,1,1,1,1,1,1}},
-    {0x9df,0x9e1,{1,1,1,1,1,1,1}},
-    {0x9e6,0x9fa,{1,1,1,1,1,1,1}},
-    {0xa05,0xa0a,{1,1,1,1,1,1,1}},
-    {0xa0f,0xa10,{1,1,1,1,1,1,1}},
-    {0xa13,0xa28,{1,1,1,1,1,1,1}},
-    {0xa2a,0xa30,{1,1,1,1,1,1,1}},
-    {0xa32,0xa33,{1,1,1,1,1,1,1}},
-    {0xa35,0xa36,{1,1,1,1,1,1,1}},
-    {0xa38,0xa39,{1,1,1,1,1,1,1}},
-    {0xa3e,0xa40,{1,1,1,1,1,1,1}},
-    {0xa59,0xa5c,{1,1,1,1,1,1,1}},
-    {0xa5e,0xa5e,{1,1,1,1,1,1,1}},
-    {0xa66,0xa6f,{1,1,1,1,1,1,1}},
-    {0xa72,0xa74,{1,1,1,1,1,1,1}},
-    {0xa83,0xa83,{1,1,1,1,1,1,1}},
-    {0xa85,0xa8b,{1,1,1,1,1,1,1}},
-    {0xa8d,0xa8d,{1,1,1,1,1,1,1}},
-    {0xa8f,0xa91,{1,1,1,1,1,1,1}},
-    {0xa93,0xaa8,{1,1,1,1,1,1,1}},
-    {0xaaa,0xab0,{1,1,1,1,1,1,1}},
-    {0xab2,0xab3,{1,1,1,1,1,1,1}},
-    {0xab5,0xab9,{1,1,1,1,1,1,1}},
-    {0xabd,0xac0,{1,1,1,1,1,1,1}},
-    {0xac9,0xac9,{1,1,1,1,1,1,1}},
-    {0xacb,0xacc,{1,1,1,1,1,1,1}},
-    {0xad0,0xad0,{1,1,1,1,1,1,1}},
-    {0xae0,0xae0,{1,1,1,1,1,1,1}},
-    {0xae6,0xaef,{1,1,1,1,1,1,1}},
-    {0xb02,0xb03,{1,1,1,1,1,1,1}},
-    {0xb05,0xb0c,{1,1,1,1,1,1,1}},
-    {0xb0f,0xb10,{1,1,1,1,1,1,1}},
-    {0xb13,0xb28,{1,1,1,1,1,1,1}},
-    {0xb2a,0xb30,{1,1,1,1,1,1,1}},
-    {0xb32,0xb33,{1,1,1,1,1,1,1}},
-    {0xb36,0xb39,{1,1,1,1,1,1,1}},
-    {0xb3d,0xb3e,{1,1,1,1,1,1,1}},
-    {0xb40,0xb40,{1,1,1,1,1,1,1}},
-    {0xb47,0xb48,{1,1,1,1,1,1,1}},
-    {0xb4b,0xb4c,{1,1,1,1,1,1,1}},
-    {0xb57,0xb57,{1,1,1,1,1,1,1}},
-    {0xb5c,0xb5d,{1,1,1,1,1,1,1}},
-    {0xb5f,0xb61,{1,1,1,1,1,1,1}},
-    {0xb66,0xb70,{1,1,1,1,1,1,1}},
-    {0xb83,0xb83,{1,1,1,1,1,1,1}},
-    {0xb85,0xb8a,{1,1,1,1,1,1,1}},
-    {0xb8e,0xb90,{1,1,1,1,1,1,1}},
-    {0xb92,0xb95,{1,1,1,1,1,1,1}},
-    {0xb99,0xb9a,{1,1,1,1,1,1,1}},
-    {0xb9c,0xb9c,{1,1,1,1,1,1,1}},
-    {0xb9e,0xb9f,{1,1,1,1,1,1,1}},
-    {0xba3,0xba4,{1,1,1,1,1,1,1}},
-    {0xba8,0xbaa,{1,1,1,1,1,1,1}},
-    {0xbae,0xbb5,{1,1,1,1,1,1,1}},
-    {0xbb7,0xbb9,{1,1,1,1,1,1,1}},
-    {0xbbe,0xbbf,{1,1,1,1,1,1,1}},
-    {0xbc1,0xbc2,{1,1,1,1,1,1,1}},
-    {0xbc6,0xbc8,{1,1,1,1,1,1,1}},
-    {0xbca,0xbcc,{1,1,1,1,1,1,1}},
-    {0xbd7,0xbd7,{1,1,1,1,1,1,1}},
-    {0xbe7,0xbf2,{1,1,1,1,1,1,1}},
-    {0xc01,0xc03,{1,1,1,1,1,1,1}},
-    {0xc05,0xc0c,{1,1,1,1,1,1,1}},
-    {0xc0e,0xc10,{1,1,1,1,1,1,1}},
-    {0xc12,0xc28,{1,1,1,1,1,1,1}},
-    {0xc2a,0xc33,{1,1,1,1,1,1,1}},
-    {0xc35,0xc39,{1,1,1,1,1,1,1}},
-    {0xc41,0xc44,{1,1,1,1,1,1,1}},
-    {0xc60,0xc61,{1,1,1,1,1,1,1}},
-    {0xc66,0xc6f,{1,1,1,1,1,1,1}},
-    {0xc82,0xc83,{1,1,1,1,1,1,1}},
-    {0xc85,0xc8c,{1,1,1,1,1,1,1}},
-    {0xc8e,0xc90,{1,1,1,1,1,1,1}},
-    {0xc92,0xca8,{1,1,1,1,1,1,1}},
-    {0xcaa,0xcb3,{1,1,1,1,1,1,1}},
-    {0xcb5,0xcb9,{1,1,1,1,1,1,1}},
-    {0xcbe,0xcbe,{1,1,1,1,1,1,1}},
-    {0xcc0,0xcc4,{1,1,1,1,1,1,1}},
-    {0xcc7,0xcc8,{1,1,1,1,1,1,1}},
-    {0xcca,0xccb,{1,1,1,1,1,1,1}},
-    {0xcd5,0xcd6,{1,1,1,1,1,1,1}},
-    {0xcde,0xcde,{1,1,1,1,1,1,1}},
-    {0xce0,0xce1,{1,1,1,1,1,1,1}},
-    {0xce6,0xcef,{1,1,1,1,1,1,1}},
-    {0xd02,0xd03,{1,1,1,1,1,1,1}},
-    {0xd05,0xd0c,{1,1,1,1,1,1,1}},
-    {0xd0e,0xd10,{1,1,1,1,1,1,1}},
-    {0xd12,0xd28,{1,1,1,1,1,1,1}},
-    {0xd2a,0xd39,{1,1,1,1,1,1,1}},
-    {0xd3e,0xd40,{1,1,1,1,1,1,1}},
-    {0xd46,0xd48,{1,1,1,1,1,1,1}},
-    {0xd4a,0xd4c,{1,1,1,1,1,1,1}},
-    {0xd57,0xd57,{1,1,1,1,1,1,1}},
-    {0xd60,0xd61,{1,1,1,1,1,1,1}},
-    {0xd66,0xd6f,{1,1,1,1,1,1,1}},
-    {0xd82,0xd83,{1,1,1,1,1,1,1}},
-    {0xd85,0xd96,{1,1,1,1,1,1,1}},
-    {0xd9a,0xdb1,{1,1,1,1,1,1,1}},
-    {0xdb3,0xdbb,{1,1,1,1,1,1,1}},
-    {0xdbd,0xdbd,{1,1,1,1,1,1,1}},
-    {0xdc0,0xdc6,{1,1,1,1,1,1,1}},
-    {0xdcf,0xdd1,{1,1,1,1,1,1,1}},
-    {0xdd8,0xddf,{1,1,1,1,1,1,1}},
-    {0xdf2,0xdf4,{1,1,1,1,1,1,1}},
-    {0xe01,0xe30,{1,1,1,1,1,1,1}},
-    {0xe32,0xe33,{1,1,1,1,1,1,1}},
-    {0xe3f,0xe46,{1,1,1,1,1,1,1}},
-    {0xe4f,0xe5b,{1,1,1,1,1,1,1}},
-    {0xe81,0xe82,{1,1,1,1,1,1,1}},
-    {0xe84,0xe84,{1,1,1,1,1,1,1}},
-    {0xe87,0xe88,{1,1,1,1,1,1,1}},
-    {0xe8a,0xe8a,{1,1,1,1,1,1,1}},
-    {0xe8d,0xe8d,{1,1,1,1,1,1,1}},
-    {0xe94,0xe97,{1,1,1,1,1,1,1}},
-    {0xe99,0xe9f,{1,1,1,1,1,1,1}},
-    {0xea1,0xea3,{1,1,1,1,1,1,1}},
-    {0xea5,0xea5,{1,1,1,1,1,1,1}},
-    {0xea7,0xea7,{1,1,1,1,1,1,1}},
-    {0xeaa,0xeab,{1,1,1,1,1,1,1}},
-    {0xead,0xeb0,{1,1,1,1,1,1,1}},
-    {0xeb2,0xeb3,{1,1,1,1,1,1,1}},
-    {0xebd,0xebd,{1,1,1,1,1,1,1}},
-    {0xec0,0xec4,{1,1,1,1,1,1,1}},
-    {0xec6,0xec6,{1,1,1,1,1,1,1}},
-    {0xed0,0xed9,{1,1,1,1,1,1,1}},
-    {0xedc,0xedd,{1,1,1,1,1,1,1}},
-    {0xf00,0xf17,{1,1,1,1,1,1,1}},
-    {0xf1a,0xf34,{1,1,1,1,1,1,1}},
-    {0xf36,0xf36,{1,1,1,1,1,1,1}},
-    {0xf38,0xf38,{1,1,1,1,1,1,1}},
-    {0xf3a,0xf47,{1,1,1,1,1,1,1}},
-    {0xf49,0xf6a,{1,1,1,1,1,1,1}},
-    {0xf7f,0xf7f,{1,1,1,1,1,1,1}},
-    {0xf85,0xf85,{1,1,1,1,1,1,1}},
-    {0xf88,0xf8b,{1,1,1,1,1,1,1}},
-    {0xfbe,0xfc5,{1,1,1,1,1,1,1}},
-    {0xfc7,0xfcc,{1,1,1,1,1,1,1}},
-    {0xfcf,0xfcf,{1,1,1,1,1,1,1}},
-    {0x1000,0x1021,{1,1,1,1,1,1,1}},
-    {0x1023,0x1027,{1,1,1,1,1,1,1}},
-    {0x1029,0x102a,{1,1,1,1,1,1,1}},
-    {0x102c,0x102c,{1,1,1,1,1,1,1}},
-    {0x1031,0x1031,{1,1,1,1,1,1,1}},
-    {0x1038,0x1038,{1,1,1,1,1,1,1}},
-    {0x1040,0x1057,{1,1,1,1,1,1,1}},
-    {0x10a0,0x10c5,{1,1,1,1,1,1,1}},
-    {0x10d0,0x10f8,{1,1,1,1,1,1,1}},
-    {0x10fb,0x10fb,{1,1,1,1,1,1,1}},
-    {0x1100,0x1159,{2,2,2,2,2,2,2}},
-    {0x115f,0x115f,{2,2,2,2,2,2,2}},
-    {0x1200,0x1206,{1,1,1,1,1,1,1}},
-    {0x1208,0x1246,{1,1,1,1,1,1,1}},
-    {0x1248,0x1248,{1,1,1,1,1,1,1}},
-    {0x124a,0x124d,{1,1,1,1,1,1,1}},
-    {0x1250,0x1256,{1,1,1,1,1,1,1}},
-    {0x1258,0x1258,{1,1,1,1,1,1,1}},
-    {0x125a,0x125d,{1,1,1,1,1,1,1}},
-    {0x1260,0x1286,{1,1,1,1,1,1,1}},
-    {0x1288,0x1288,{1,1,1,1,1,1,1}},
-    {0x128a,0x128d,{1,1,1,1,1,1,1}},
-    {0x1290,0x12ae,{1,1,1,1,1,1,1}},
-    {0x12b0,0x12b0,{1,1,1,1,1,1,1}},
-    {0x12b2,0x12b5,{1,1,1,1,1,1,1}},
-    {0x12b8,0x12be,{1,1,1,1,1,1,1}},
-    {0x12c0,0x12c0,{1,1,1,1,1,1,1}},
-    {0x12c2,0x12c5,{1,1,1,1,1,1,1}},
-    {0x12c8,0x12ce,{1,1,1,1,1,1,1}},
-    {0x12d0,0x12d6,{1,1,1,1,1,1,1}},
-    {0x12d8,0x12ee,{1,1,1,1,1,1,1}},
-    {0x12f0,0x130e,{1,1,1,1,1,1,1}},
-    {0x1310,0x1310,{1,1,1,1,1,1,1}},
-    {0x1312,0x1315,{1,1,1,1,1,1,1}},
-    {0x1318,0x131e,{1,1,1,1,1,1,1}},
-    {0x1320,0x1346,{1,1,1,1,1,1,1}},
-    {0x1348,0x135a,{1,1,1,1,1,1,1}},
-    {0x1361,0x137c,{1,1,1,1,1,1,1}},
-    {0x13a0,0x13f4,{1,1,1,1,1,1,1}},
-    {0x1401,0x1676,{1,1,1,1,1,1,1}},
-    {0x1680,0x169c,{1,1,1,1,1,1,1}},
-    {0x16a0,0x16f0,{1,1,1,1,1,1,1}},
-    {0x1700,0x170c,{1,1,1,1,1,1,1}},
-    {0x170e,0x1711,{1,1,1,1,1,1,1}},
-    {0x1720,0x1731,{1,1,1,1,1,1,1}},
-    {0x1735,0x1736,{1,1,1,1,1,1,1}},
-    {0x1740,0x1751,{1,1,1,1,1,1,1}},
-    {0x1760,0x176c,{1,1,1,1,1,1,1}},
-    {0x176e,0x1770,{1,1,1,1,1,1,1}},
-    {0x1780,0x17b6,{1,1,1,1,1,1,1}},
-    {0x17be,0x17c5,{1,1,1,1,1,1,1}},
-    {0x17c7,0x17c8,{1,1,1,1,1,1,1}},
-    {0x17d4,0x17dc,{1,1,1,1,1,1,1}},
-    {0x17e0,0x17e9,{1,1,1,1,1,1,1}},
-    {0x1800,0x180a,{1,1,1,1,1,1,1}},
-    {0x1810,0x1819,{1,1,1,1,1,1,1}},
-    {0x1820,0x1877,{1,1,1,1,1,1,1}},
-    {0x1880,0x18a8,{1,1,1,1,1,1,1}},
-    {0x1e00,0x1e9b,{1,1,1,1,1,1,1}},
-    {0x1ea0,0x1ef9,{1,1,1,1,1,1,1}},
-    {0x1f00,0x1f15,{1,1,1,1,1,1,1}},
-    {0x1f18,0x1f1d,{1,1,1,1,1,1,1}},
-    {0x1f20,0x1f45,{1,1,1,1,1,1,1}},
-    {0x1f48,0x1f4d,{1,1,1,1,1,1,1}},
-    {0x1f50,0x1f57,{1,1,1,1,1,1,1}},
-    {0x1f59,0x1f59,{1,1,1,1,1,1,1}},
-    {0x1f5b,0x1f5b,{1,1,1,1,1,1,1}},
-    {0x1f5d,0x1f5d,{1,1,1,1,1,1,1}},
-    {0x1f5f,0x1f7d,{1,1,1,1,1,1,1}},
-    {0x1f80,0x1fb4,{1,1,1,1,1,1,1}},
-    {0x1fb6,0x1fc4,{1,1,1,1,1,1,1}},
-    {0x1fc6,0x1fd3,{1,1,1,1,1,1,1}},
-    {0x1fd6,0x1fdb,{1,1,1,1,1,1,1}},
-    {0x1fdd,0x1fef,{1,1,1,1,1,1,1}},
-    {0x1ff2,0x1ff4,{1,1,1,1,1,1,1}},
-    {0x1ff6,0x1ffe,{1,1,1,1,1,1,1}},
-    {0x2000,0x200a,{1,1,1,1,1,1,1}},
-    {0x2010,0x2010,{1,2,1,2,2,1,1}},
-    {0x2011,0x2012,{1,1,1,1,1,1,1}},
-    {0x2013,0x2014,{1,1,1,2,2,2,2}},
-    {0x2015,0x2015,{1,2,2,2,2,1,1}},
-    {0x2016,0x2016,{1,2,1,2,2,1,2}},
-    {0x2017,0x2017,{1,1,1,1,1,1,1}},
-    {0x2018,0x2019,{1,2,2,2,2,2,2}},
-    {0x201a,0x201b,{1,1,1,1,1,1,1}},
-    {0x201c,0x201d,{1,2,2,2,2,2,2}},
-    {0x201e,0x201f,{1,1,1,1,1,1,1}},
-    {0x2020,0x2021,{1,2,2,1,2,1,1}},
-    {0x2022,0x2022,{1,1,1,1,2,2,1}},
-    {0x2023,0x2023,{1,1,1,1,1,1,1}},
-    {0x2024,0x2024,{1,1,1,1,2,1,1}},
-    {0x2025,0x2026,{1,2,2,2,2,2,2}},
-    {0x2027,0x2027,{1,1,1,1,2,1,2}},
-    {0x202f,0x202f,{1,1,1,1,1,1,1}},
-    {0x2030,0x2030,{1,2,2,2,2,1,1}},
-    {0x2031,0x2031,{1,1,1,1,1,1,1}},
-    {0x2032,0x2032,{1,2,2,2,2,2,2}},
-    {0x2033,0x2033,{1,2,2,2,2,1,1}},
-    {0x2034,0x2034,{1,1,1,1,1,1,1}},
-    {0x2035,0x2035,{1,1,1,2,2,2,2}},
-    {0x2036,0x203a,{1,1,1,1,1,1,1}},
-    {0x203b,0x203b,{1,2,2,2,2,2,2}},
-    {0x203c,0x203d,{1,1,1,1,1,1,1}},
-    {0x203e,0x203e,{1,1,1,1,2,2,2}},
-    {0x203f,0x2052,{1,1,1,1,1,1,1}},
-    {0x2057,0x2057,{1,1,1,1,1,1,1}},
-    {0x205f,0x205f,{1,1,1,1,1,1,1}},
-    {0x2070,0x2071,{1,1,1,1,1,1,1}},
-    {0x2074,0x2074,{1,1,2,1,2,1,1}},
-    {0x2075,0x207e,{1,1,1,1,1,1,1}},
-    {0x207f,0x207f,{1,1,2,1,2,1,1}},
-    {0x2080,0x2080,{1,1,1,1,1,1,1}},
-    {0x2081,0x2084,{1,1,2,1,2,1,1}},
-    {0x2085,0x208e,{1,1,1,1,1,1,1}},
-    {0x20a0,0x20ab,{1,1,1,1,1,1,1}},
-    {0x20ac,0x20ac,{1,1,2,1,2,1,2}},
-    {0x20ad,0x20b1,{1,1,1,1,1,1,1}},
-    {0x2100,0x2102,{1,1,1,1,1,1,1}},
-    {0x2103,0x2103,{1,2,2,2,2,2,2}},
-    {0x2104,0x2104,{1,1,1,1,1,1,1}},
-    {0x2105,0x2105,{1,1,1,2,2,2,2}},
-    {0x2106,0x2108,{1,1,1,1,1,1,1}},
-    {0x2109,0x2109,{1,1,2,2,2,2,2}},
-    {0x210a,0x2112,{1,1,1,1,1,1,1}},
-    {0x2113,0x2113,{1,1,2,1,2,1,1}},
-    {0x2114,0x2115,{1,1,1,1,1,1,1}},
-    {0x2116,0x2116,{1,2,2,2,2,2,1}},
-    {0x2117,0x2120,{1,1,1,1,1,1,1}},
-    {0x2121,0x2121,{1,1,2,2,2,2,1}},
-    {0x2122,0x2122,{1,2,2,1,2,1,1}},
-    {0x2123,0x2125,{1,1,1,1,1,1,1}},
-    {0x2126,0x2126,{1,1,2,1,2,1,1}},
-    {0x2127,0x212a,{1,1,1,1,1,1,1}},
-    {0x212b,0x212b,{1,2,2,1,2,1,1}},
-    {0x212c,0x213a,{1,1,1,1,1,1,1}},
-    {0x213d,0x214b,{1,1,1,1,1,1,1}},
-    {0x2153,0x2154,{1,1,2,1,2,1,1}},
-    {0x2155,0x215a,{1,1,1,1,1,1,1}},
-    {0x215b,0x215e,{1,1,2,1,2,1,1}},
-    {0x215f,0x215f,{1,1,1,1,1,1,1}},
-    {0x2160,0x2169,{1,1,2,2,2,2,2}},
-    {0x216a,0x216b,{1,1,1,2,2,1,1}},
-    {0x216c,0x216f,{1,1,1,1,1,1,1}},
-    {0x2170,0x2179,{1,1,2,2,2,2,2}},
-    {0x217a,0x2183,{1,1,1,1,1,1,1}},
-    {0x2190,0x2193,{1,2,2,2,2,2,2}},
-    {0x2194,0x2195,{1,1,2,1,2,1,1}},
-    {0x2196,0x2199,{1,1,2,2,2,2,2}},
-    {0x219a,0x21b7,{1,1,1,1,1,1,1}},
-    {0x21b8,0x21b9,{1,1,1,1,2,1,1}},
-    {0x21ba,0x21d1,{1,1,1,1,1,1,1}},
-    {0x21d2,0x21d2,{1,2,2,1,2,1,1}},
-    {0x21d3,0x21d3,{1,1,1,1,1,1,1}},
-    {0x21d4,0x21d4,{1,2,2,1,2,1,1}},
-    {0x21d5,0x21e6,{1,1,1,1,1,1,1}},
-    {0x21e7,0x21e7,{1,1,1,1,2,1,1}},
-    {0x21e8,0x21ff,{1,1,1,1,1,1,1}},
-    {0x2200,0x2200,{1,2,2,1,2,1,1}},
-    {0x2201,0x2201,{1,1,1,1,1,1,1}},
-    {0x2202,0x2203,{1,2,2,1,2,1,1}},
-    {0x2204,0x2206,{1,1,1,1,1,1,1}},
-    {0x2207,0x2207,{1,2,2,1,2,1,1}},
-    {0x2208,0x2208,{1,2,2,2,2,1,1}},
-    {0x2209,0x220a,{1,1,1,1,1,1,1}},
-    {0x220b,0x220b,{1,2,2,1,2,1,1}},
-    {0x220c,0x220e,{1,1,1,1,1,1,1}},
-    {0x220f,0x220f,{1,1,2,2,2,1,1}},
-    {0x2210,0x2210,{1,1,1,1,1,1,1}},
-    {0x2211,0x2211,{1,1,2,2,2,1,1}},
-    {0x2212,0x2212,{1,2,1,1,1,1,1}},
-    {0x2213,0x2214,{1,1,1,1,1,1,1}},
-    {0x2215,0x2215,{1,1,1,2,2,1,2}},
-    {0x2216,0x2219,{1,1,1,1,1,1,1}},
-    {0x221a,0x221a,{1,2,2,2,2,2,2}},
-    {0x221b,0x221c,{1,1,1,1,1,1,1}},
-    {0x221d,0x221d,{1,2,2,2,2,1,1}},
-    {0x221e,0x221e,{1,2,2,2,2,2,2}},
-    {0x221f,0x221f,{1,1,1,2,2,2,2}},
-    {0x2220,0x2220,{1,2,2,2,2,2,2}},
-    {0x2221,0x2222,{1,1,1,1,1,1,1}},
-    {0x2223,0x2223,{1,1,1,2,2,2,2}},
-    {0x2224,0x2224,{1,1,1,1,1,1,1}},
-    {0x2225,0x2225,{1,1,2,2,2,2,2}},
-    {0x2226,0x2226,{1,1,1,1,1,1,1}},
-    {0x2227,0x2228,{1,2,2,2,2,1,1}},
-    {0x2229,0x222b,{1,2,2,2,2,2,2}},
-    {0x222c,0x222c,{1,2,2,1,2,1,1}},
-    {0x222d,0x222d,{1,1,1,1,1,1,1}},
-    {0x222e,0x222e,{1,1,2,2,2,2,2}},
-    {0x222f,0x2233,{1,1,1,1,1,1,1}},
-    {0x2234,0x2235,{1,2,2,2,2,2,2}},
-    {0x2236,0x2237,{1,1,1,2,2,1,1}},
-    {0x2238,0x223b,{1,1,1,1,1,1,1}},
-    {0x223c,0x223c,{1,1,2,1,2,2,2}},
-    {0x223d,0x223d,{1,2,2,2,2,1,1}},
-    {0x223e,0x2247,{1,1,1,1,1,1,1}},
-    {0x2248,0x2248,{1,1,1,2,2,1,1}},
-    {0x2249,0x224b,{1,1,1,1,1,1,1}},
-    {0x224c,0x224c,{1,1,1,2,2,1,1}},
-    {0x224d,0x2251,{1,1,1,1,1,1,1}},
-    {0x2252,0x2252,{1,2,2,2,2,2,2}},
-    {0x2253,0x225f,{1,1,1,1,1,1,1}},
-    {0x2260,0x2261,{1,2,2,2,2,2,2}},
-    {0x2262,0x2263,{1,1,1,1,1,1,1}},
-    {0x2264,0x2265,{1,1,2,2,2,1,1}},
-    {0x2266,0x2267,{1,2,1,2,2,2,2}},
-    {0x2268,0x2269,{1,1,1,1,1,1,1}},
-    {0x226a,0x226b,{1,2,2,1,2,1,1}},
-    {0x226c,0x226d,{1,1,1,1,1,1,1}},
-    {0x226e,0x226f,{1,1,1,2,2,1,1}},
-    {0x2270,0x2281,{1,1,1,1,1,1,1}},
-    {0x2282,0x2283,{1,2,2,1,2,1,1}},
-    {0x2284,0x2285,{1,1,1,1,1,1,1}},
-    {0x2286,0x2287,{1,2,2,1,2,1,1}},
-    {0x2288,0x2294,{1,1,1,1,1,1,1}},
-    {0x2295,0x2295,{1,1,1,2,2,1,2}},
-    {0x2296,0x2298,{1,1,1,1,1,1,1}},
-    {0x2299,0x2299,{1,1,2,2,2,1,2}},
-    {0x229a,0x22a4,{1,1,1,1,1,1,1}},
-    {0x22a5,0x22a5,{1,2,2,2,2,2,2}},
-    {0x22a6,0x22be,{1,1,1,1,1,1,1}},
-    {0x22bf,0x22bf,{1,1,1,2,2,2,2}},
-    {0x22c0,0x2311,{1,1,1,1,1,1,1}},
-    {0x2312,0x2312,{1,2,2,2,2,1,1}},
-    {0x2313,0x2328,{1,1,1,1,1,1,1}},
-    {0x2329,0x232a,{2,2,2,2,2,2,2}},
-    {0x232b,0x23ce,{1,1,1,1,1,1,1}},
-    {0x2400,0x241f,{1,1,1,1,1,1,2}},
-    {0x2420,0x2420,{1,1,1,1,1,1,1}},
+    {0x1100,0x115f,{2,2,2,2,2,2,2}}, // Hangul
+    {0x2010,0x2010,{1,2,1,2,2,1,1}}, // EA ambiguous
+    {0x2013,0x2014,{1,1,1,2,2,2,2}}, // EA ambiguous
+    {0x2015,0x2015,{1,2,2,2,2,1,1}}, // EA ambiguous
+    {0x2016,0x2016,{1,2,1,2,2,1,2}}, // EA ambiguous
+    {0x2018,0x2019,{1,2,2,2,2,2,2}}, // EA ambiguous
+    {0x201c,0x201d,{1,2,2,2,2,2,2}}, // EA ambiguous
+    {0x2020,0x2021,{1,2,2,1,2,1,1}}, // EA ambiguous
+    {0x2022,0x2022,{1,1,1,1,2,2,1}}, // EA ambiguous
+    {0x2024,0x2024,{1,1,1,1,2,1,1}}, // EA ambiguous
+    {0x2025,0x2026,{1,2,2,2,2,2,2}}, // EA ambiguous
+    {0x2027,0x2027,{1,1,1,1,2,1,2}}, // EA ambiguous
+    {0x2030,0x2030,{1,2,2,2,2,1,1}}, // permille
+    {0x2032,0x2032,{1,2,2,2,2,2,2}}, // EA ambiguous
+    {0x2033,0x2033,{1,2,2,2,2,1,1}}, // EA ambiguous
+    {0x2035,0x2035,{1,1,1,2,2,2,2}}, // EA ambiguous
+    {0x203b,0x203b,{1,2,2,2,2,2,2}}, // EA ambiguous
+    {0x203e,0x203e,{1,1,1,1,2,2,2}}, // EA ambiguous
+    {0x2074,0x2074,{1,1,2,1,2,1,1}}, // EA ambiguous
+    {0x207f,0x207f,{1,1,2,1,2,1,1}}, // EA ambiguous
+    {0x2081,0x2084,{1,1,2,1,2,1,1}}, // EA ambiguous
+    {0x20ac,0x20ac,{1,1,2,1,2,1,2}}, // EA ambiguous
+    {0x2103,0x2103,{1,2,2,2,2,2,2}}, // EA ambiguous
+    {0x2105,0x2105,{1,1,1,2,2,2,2}}, // EA ambiguous
+    {0x2109,0x2109,{1,1,2,2,2,2,2}}, // EA ambiguous
+    {0x2113,0x2113,{1,1,2,1,2,1,1}}, // EA ambiguous
+    {0x2116,0x2116,{1,2,2,2,2,2,1}}, // EA ambiguous
+    {0x2121,0x2121,{1,1,2,2,2,2,1}}, // EA ambiguous
+    {0x2122,0x2122,{1,2,2,1,2,1,1}}, // EA ambiguous
+    {0x2126,0x2126,{1,1,2,1,2,1,1}}, // EA ambiguous
+    {0x212b,0x212b,{1,2,2,1,2,1,1}}, // EA ambiguous
+    {0x2153,0x2154,{1,1,2,1,2,1,1}}, // EA ambiguous
+    {0x215b,0x215e,{1,1,2,1,2,1,1}}, // EA ambiguous
+    {0x2160,0x2169,{1,1,2,2,2,2,2}}, // EA ambiguous
+    {0x216a,0x216b,{1,1,1,2,2,1,1}}, // EA ambiguous
+    {0x2170,0x2179,{1,1,2,2,2,2,2}}, // EA ambiguous
+    {0x2190,0x2193,{1,2,2,2,2,2,2}}, // EA ambiguous
+    {0x2194,0x2195,{1,1,2,1,2,1,1}}, // EA ambiguous
+    {0x2196,0x2199,{1,1,2,2,2,2,2}}, // EA ambiguous
+    {0x21b8,0x21b9,{1,1,1,1,2,1,1}}, // EA ambiguous
+    {0x21d2,0x21d2,{1,2,2,1,2,1,1}}, // EA ambiguous
+    {0x21d4,0x21d4,{1,2,2,1,2,1,1}}, // EA ambiguous
+    {0x21e7,0x21e7,{1,1,1,1,2,1,1}}, // EA ambiguous
+    {0x2200,0x2200,{1,2,2,1,2,1,1}}, // EA ambiguous
+    {0x2202,0x2203,{1,2,2,1,2,1,1}}, // EA ambiguous
+    {0x2207,0x2207,{1,2,2,1,2,1,1}}, // EA ambiguous
+    {0x2208,0x2208,{1,2,2,2,2,1,1}}, // EA ambiguous
+    {0x220b,0x220b,{1,2,2,1,2,1,1}}, // EA ambiguous
+    {0x220f,0x220f,{1,1,2,2,2,1,1}}, // EA ambiguous
+    {0x2211,0x2211,{1,1,2,2,2,1,1}}, // EA ambiguous
+    {0x2212,0x2212,{1,2,1,1,1,1,1}}, // minus sign
+    {0x2215,0x2215,{1,1,1,2,2,1,2}}, // EA ambiguous
+    {0x221a,0x221a,{1,2,2,2,2,2,2}}, // EA ambiguous
+    {0x221d,0x221d,{1,2,2,2,2,1,1}}, // EA ambiguous
+    {0x221e,0x221e,{1,2,2,2,2,2,2}}, // EA ambiguous
+    {0x221f,0x221f,{1,1,1,2,2,2,2}}, // EA ambiguous
+    {0x2220,0x2220,{1,2,2,2,2,2,2}}, // EA ambiguous
+    {0x2223,0x2223,{1,1,1,2,2,2,2}}, // EA ambiguous
+    {0x2225,0x2225,{1,1,2,2,2,2,2}}, // EA ambiguous
+    {0x2227,0x2228,{1,2,2,2,2,1,1}}, // EA ambiguous
+    {0x2229,0x222b,{1,2,2,2,2,2,2}}, // EA ambiguous
+    {0x222c,0x222c,{1,2,2,1,2,1,1}}, // EA ambiguous
+    {0x222e,0x222e,{1,1,2,2,2,2,2}}, // EA ambiguous
+    {0x2234,0x2235,{1,2,2,2,2,2,2}}, // EA ambiguous
+    {0x2236,0x2237,{1,1,1,2,2,1,1}}, // EA ambiguous
+    {0x223c,0x223c,{1,1,2,1,2,2,2}}, // EA ambiguous
+    {0x223d,0x223d,{1,2,2,2,2,1,1}}, // EA ambiguous
+    {0x2248,0x2248,{1,1,1,2,2,1,1}}, // EA ambiguous
+    {0x224c,0x224c,{1,1,1,2,2,1,1}}, // EA ambiguous
+    {0x2252,0x2252,{1,2,2,2,2,2,2}}, // EA ambiguous
+    {0x2260,0x2261,{1,2,2,2,2,2,2}}, // EA ambiguous
+    {0x2264,0x2265,{1,1,2,2,2,1,1}}, // EA ambiguous
+    {0x2266,0x2267,{1,2,1,2,2,2,2}}, // EA ambiguous
+    {0x226a,0x226b,{1,2,2,1,2,1,1}}, // EA ambiguous
+    {0x226e,0x226f,{1,1,1,2,2,1,1}}, // EA ambiguous
+    {0x2282,0x2283,{1,2,2,1,2,1,1}}, // EA ambiguous
+    {0x2286,0x2287,{1,2,2,1,2,1,1}}, // EA ambiguous
+    {0x2295,0x2295,{1,1,1,2,2,1,2}}, // EA ambiguous
+    {0x2299,0x2299,{1,1,2,2,2,1,2}}, // EA ambiguous
+    {0x22a5,0x22a5,{1,2,2,2,2,2,2}}, // EA ambiguous
+    {0x22bf,0x22bf,{1,1,1,2,2,2,2}}, // EA ambiguous
+    {0x2312,0x2312,{1,2,2,2,2,1,1}}, // EA ambiguous
+    {0x2329,0x232a,{2,2,2,2,2,2,2}}, // arrows (at least ends)
+    {0x2400,0x241f,{1,1,1,1,1,1,2}}, // control pictures
     {0x2421,0x2421,{1,1,1,1,1,1,2}},
-    {0x2422,0x2426,{1,1,1,1,1,1,1}},
-    {0x2440,0x244a,{1,1,1,1,1,1,1}},
-    {0x2460,0x2469,{1,1,2,2,2,2,2}},
+    {0x2460,0x2469,{1,1,2,2,2,2,2}}, // EA ambiguous to 24e9
     {0x246a,0x246e,{1,1,2,1,2,1,1}},
     {0x246f,0x2473,{1,1,1,1,2,1,1}},
     {0x2474,0x247d,{1,1,2,2,2,2,2}},
@@ -727,8 +360,7 @@ static const struct interval_wcwidth table_wcwidth[] = {
     {0x249c,0x24b5,{1,1,2,1,2,1,1}},
     {0x24b6,0x24cf,{1,1,1,1,2,1,1}},
     {0x24d0,0x24e9,{1,1,2,1,2,1,1}},
-    {0x24ea,0x24ea,{1,1,1,1,1,1,1}},
-    {0x24eb,0x24fe,{1,1,1,1,2,1,1}},
+    {0x24eb,0x24fe,{1,1,1,1,2,1,1}}, // EA ambiguous to 254b
     {0x2500,0x2500,{1,2,2,2,2,2,2}},
     {0x2501,0x2501,{1,2,2,2,2,1,1}},
     {0x2502,0x2502,{1,2,2,2,2,2,2}},
@@ -774,114 +406,76 @@ static const struct interval_wcwidth table_wcwidth[] = {
     {0x2540,0x2541,{1,1,2,2,2,1,1}},
     {0x2542,0x2542,{1,2,2,2,2,1,1}},
     {0x2543,0x254a,{1,1,2,2,2,1,1}},
-    {0x254b,0x254b,{1,2,2,2,2,1,1}},
-    {0x254c,0x254f,{1,1,1,1,1,1,1}},
-    {0x2550,0x2573,{1,1,1,2,2,2,2}},
+    {0x254b,0x254b,{1,2,2,2,2,1,1}},  // end of EA ambiguous
+    {0x2550,0x2573,{1,1,1,2,2,2,2}}, // EA ambiguous
     {0x2574,0x2574,{1,1,1,1,1,1,2}},
-    {0x2575,0x257f,{1,1,1,1,1,1,1}},
-    {0x2580,0x2580,{1,1,1,1,2,1,1}},
-    {0x2581,0x258f,{1,1,1,2,2,2,2}},
-    {0x2590,0x2591,{1,1,1,1,1,1,1}},
-    {0x2592,0x2592,{1,1,2,1,2,1,1}},
-    {0x2593,0x2593,{1,1,1,2,2,1,2}},
-    {0x2594,0x2595,{1,1,1,2,2,2,2}},
-    {0x2596,0x259f,{1,1,1,1,1,1,1}},
-    {0x25a0,0x25a1,{1,2,2,2,2,2,2}},
-    {0x25a2,0x25a2,{1,1,1,1,1,1,1}},
-    {0x25a3,0x25a9,{1,1,2,1,2,1,1}},
-    {0x25aa,0x25b1,{1,1,1,1,1,1,1}},
-    {0x25b2,0x25b3,{1,2,2,2,2,2,2}},
-    {0x25b4,0x25b5,{1,1,1,1,1,1,1}},
-    {0x25b6,0x25b7,{1,1,2,1,2,1,1}},
-    {0x25b8,0x25bb,{1,1,1,1,1,1,1}},
-    {0x25bc,0x25bd,{1,2,2,2,2,2,2}},
-    {0x25be,0x25bf,{1,1,1,1,1,1,1}},
-    {0x25c0,0x25c1,{1,1,2,1,2,1,1}},
-    {0x25c2,0x25c5,{1,1,1,1,1,1,1}},
-    {0x25c6,0x25c7,{1,2,2,2,2,2,2}},
-    {0x25c8,0x25c8,{1,1,2,1,2,1,1}},
-    {0x25c9,0x25ca,{1,1,1,1,1,1,1}},
-    {0x25cb,0x25cb,{1,2,2,2,2,2,2}},
-    {0x25cc,0x25cd,{1,1,1,1,1,1,1}},
-    {0x25ce,0x25cf,{1,2,2,2,2,2,2}},
-    {0x25d0,0x25d1,{1,1,2,1,2,1,1}},
-    {0x25d2,0x25e1,{1,1,1,1,1,1,1}},
-    {0x25e2,0x25e5,{1,1,1,2,2,2,2}},
-    {0x25e6,0x25ee,{1,1,1,1,1,1,1}},
-    {0x25ef,0x25ef,{1,2,1,1,2,1,1}},
-    {0x25f0,0x2604,{1,1,1,1,1,1,1}},
-    {0x2605,0x2606,{1,2,2,2,2,2,2}},
-    {0x2607,0x2608,{1,1,1,1,1,1,1}},
-    {0x2609,0x2609,{1,1,1,2,2,2,2}},
-    {0x260a,0x260d,{1,1,1,1,1,1,1}},
-    {0x260e,0x260f,{1,1,2,1,2,1,1}},
-    {0x2610,0x2613,{1,1,1,1,1,1,1}},
-    {0x2616,0x2617,{1,1,1,1,1,1,1}},
-    {0x2619,0x261b,{1,1,1,1,1,1,1}},
-    {0x261c,0x261c,{1,1,2,1,2,1,1}},
-    {0x261d,0x261d,{1,1,1,1,1,1,1}},
-    {0x261e,0x261e,{1,1,2,1,2,1,1}},
-    {0x261f,0x263f,{1,1,1,1,1,1,1}},
-    {0x2640,0x2640,{1,2,2,2,2,2,2}},
+    {0x2580,0x2580,{1,1,1,1,2,1,1}}, // EA ambiguous
+    {0x2581,0x258f,{1,1,1,2,2,2,2}}, // EA ambiguous
+    {0x2592,0x2592,{1,1,2,1,2,1,1}}, // EA ambiguous
+    {0x2593,0x2593,{1,1,1,2,2,1,2}}, // EA ambiguous
+    {0x2594,0x2595,{1,1,1,2,2,2,2}}, // EA ambiguous
+    {0x25a0,0x25a1,{1,2,2,2,2,2,2}}, // EA ambiguous
+    {0x25a3,0x25a9,{1,1,2,1,2,1,1}}, // EA ambiguous
+    {0x25b2,0x25b3,{1,2,2,2,2,2,2}}, // EA ambiguous
+    {0x25b6,0x25b7,{1,1,2,1,2,1,1}}, // EA ambiguous
+    {0x25bc,0x25bd,{1,2,2,2,2,2,2}}, // EA ambiguous
+    {0x25c0,0x25c1,{1,1,2,1,2,1,1}}, // EA ambiguous
+    {0x25c6,0x25c7,{1,2,2,2,2,2,2}}, // EA ambiguous
+    {0x25c8,0x25c8,{1,1,2,1,2,1,1}}, // EA ambiguous
+    {0x25cb,0x25cb,{1,2,2,2,2,2,2}}, // EA ambiguous
+    {0x25ce,0x25cf,{1,2,2,2,2,2,2}}, // EA ambiguous
+    {0x25d0,0x25d1,{1,1,2,1,2,1,1}}, // EA ambiguous
+    {0x25e2,0x25e5,{1,1,1,2,2,2,2}}, // EA ambiguous
+    {0x25ef,0x25ef,{1,2,1,1,2,1,1}}, // EA ambiguous
+    {0x2605,0x2606,{1,2,2,2,2,2,2}}, // EA ambiguous
+    {0x2609,0x2609,{1,1,1,2,2,2,2}}, // EA ambiguous
+    {0x260e,0x260f,{1,1,2,1,2,1,1}}, // EA ambiguous
+    // 2614-5 are EA ambiguous
+    {0x261c,0x261c,{1,1,2,1,2,1,1}}, // EA ambiguous
+    {0x261e,0x261e,{1,1,2,1,2,1,1}}, // EA ambiguous
+    {0x2640,0x2640,{1,2,2,2,2,2,2}}, // EA ambiguous
     {0x2641,0x2641,{1,1,1,1,1,2,2}},
-    {0x2642,0x2642,{1,2,2,2,2,2,2}},
-    {0x2643,0x265f,{1,1,1,1,1,1,1}},
-    {0x2660,0x2661,{1,1,2,1,2,1,1}},
-    {0x2662,0x2662,{1,1,1,1,1,1,1}},
-    {0x2663,0x2665,{1,1,2,1,2,1,1}},
-    {0x2666,0x2666,{1,1,1,1,1,1,1}},
-    {0x2667,0x2669,{1,1,2,1,2,1,1}},
-    {0x266a,0x266a,{1,2,2,1,2,1,1}},
-    {0x266b,0x266b,{1,1,1,1,1,1,1}},
-    {0x266c,0x266c,{1,1,2,1,2,1,1}},
-    {0x266d,0x266d,{1,2,2,1,2,1,1}},
-    {0x266e,0x266e,{1,1,1,1,1,1,1}},
-    {0x266f,0x266f,{1,2,1,1,2,1,1}},
-    {0x2670,0x267d,{1,1,1,1,1,1,1}},
-    {0x2680,0x2689,{1,1,1,1,1,1,1}},
-    {0x2701,0x2704,{1,1,1,1,1,1,1}},
-    {0x2706,0x2709,{1,1,1,1,1,1,1}},
-    {0x270c,0x2727,{1,1,1,1,1,1,1}},
-    {0x2729,0x273c,{1,1,1,1,1,1,1}},
+    {0x2642,0x2642,{1,2,2,2,2,2,2}}, // EA ambiguous
+    {0x2660,0x2661,{1,1,2,1,2,1,1}}, // EA ambiguous
+    {0x2663,0x2665,{1,1,2,1,2,1,1}}, // EA ambiguous
+    {0x2667,0x2669,{1,1,2,1,2,1,1}}, // EA ambiguous
+    {0x266a,0x266a,{1,2,2,1,2,1,1}}, // EA ambiguous
+    {0x266c,0x266c,{1,1,2,1,2,1,1}}, // EA ambiguous
+    {0x266d,0x266d,{1,2,2,1,2,1,1}}, // EA ambiguous
+    {0x266f,0x266f,{1,2,1,1,2,1,1}}, // EA ambiguous
     {0x273d,0x273d,{1,1,1,1,2,2,1}},
-    {0x273e,0x274b,{1,1,1,1,1,1,1}},
-    {0x274d,0x274d,{1,1,1,1,1,1,1}},
-    {0x274f,0x2752,{1,1,1,1,1,1,1}},
-    {0x2756,0x2756,{1,1,1,1,1,1,1}},
-    {0x2758,0x275e,{1,1,1,1,1,1,1}},
-    {0x2761,0x2775,{1,1,1,1,1,1,1}},
-    {0x2776,0x277f,{1,1,1,1,2,1,1}},
-    {0x2780,0x2794,{1,1,1,1,1,1,1}},
-    {0x2798,0x27af,{1,1,1,1,1,1,1}},
-    {0x27b1,0x27be,{1,1,1,1,1,1,1}},
-    {0x27d0,0x27eb,{1,1,1,1,1,1,1}},
-    {0x27f0,0x2aff,{1,1,1,1,1,1,1}},
+    {0x273e,0x274b,{1,1,1,1,1,1,1}}, // EA ambiguous
+    {0x2776,0x277f,{1,1,1,1,2,1,1}}, // EA ambiguous
     {0x2e80,0x2e99,{2,2,2,2,2,2,2}},
     {0x2e9b,0x2ef3,{2,2,2,2,2,2,2}},
     {0x2f00,0x2fd5,{2,2,2,2,2,2,2}},
     {0x2ff0,0x2ffb,{2,2,2,2,2,2,2}},
     {0x3000,0x3029,{2,2,2,2,2,2,2}},
     {0x3030,0x303e,{2,2,2,2,2,2,2}},
-    {0x303f,0x303f,{1,1,1,1,1,1,1}},
     {0x3041,0x3096,{2,2,2,2,2,2,2}},
-    {0x309b,0x30ff,{2,2,2,2,2,2,2}},
-    {0x3105,0x312c,{2,2,2,2,2,2,2}},
+    {0x309B,0x30ff,{2,2,2,2,2,2,2}},
+    {0x3105,0x312d,{2,2,2,2,2,2,2}},
     {0x3131,0x318e,{2,2,2,2,2,2,2}},
-    {0x3190,0x31b7,{2,2,2,2,2,2,2}},
+    {0x3190,0x31ba,{2,2,2,2,2,2,2}},
+    {0x31c0,0x31e3,{2,2,2,2,2,2,2}},
     {0x31f0,0x321c,{2,2,2,2,2,2,2}},
-    {0x3220,0x3243,{2,2,2,2,2,2,2}},
-    {0x3251,0x327b,{2,2,2,2,2,2,2}},
-    {0x327f,0x32cb,{2,2,2,2,2,2,2}},
+    {0x321d,0x321e,{2,2,2,2,2,2,2}},
+    {0x3220,0x32cf,{2,2,2,2,2,2,2}},
+    {0x3250,0x327b,{2,2,2,2,2,2,2}},
+    {0x327c,0x32cf,{2,2,2,2,2,2,2}},
     {0x32d0,0x32fe,{2,2,2,2,2,2,2}},
-    {0x3300,0x3376,{2,2,2,2,2,2,2}},
+    {0x3300,0x337a,{2,2,2,2,2,2,2}},
     {0x337b,0x33dd,{2,2,2,2,2,2,2}},
-    {0x33e0,0x33fe,{2,2,2,2,2,2,2}},
-    {0x3400,0x4db5,{2,2,2,2,2,2,2}},
-    {0x4e00,0x9fa5,{2,2,2,2,2,2,2}},
+    {0x33de,0x3edf,{2,2,2,2,2,2,2}},
+    {0x33e0,0x33ff,{2,2,2,2,2,2,2}},
+    {0x3400,0x4db5,{2,2,2,2,2,2,2}}, // CJK Unified Ideographs Externsion A (to 4dbf)
+    {0x4dc0,0x4dff,{2,2,2,2,2,2,2}},
+    {0x4e00,0x9fcc,{2,2,2,2,2,2,2}}, // CJK Unified Ideographs (to 9fff)
     {0xa000,0xa48c,{2,2,2,2,2,2,2}},
     {0xa490,0xa4c6,{2,2,2,2,2,2,2}},
-    {0xac00,0xd7a3,{2,2,2,2,2,2,2}},
-    {0xe000,0xe002,{1,1,1,1,2,1,1}},
+//    {0xa960,0xa97c,{2,2,2,2,2,2,2}},
+    {0xac00,0xd7a3,{2,2,2,2,2,2,2}}, // Hangul
+    {0xe000,0xe002,{1,1,1,1,2,1,1}}, // EA ambiguous to f8ff
     {0xe003,0xe003,{1,1,1,1,2,2,1}},
     {0xe004,0xe017,{1,1,1,1,2,1,1}},
     {0xe018,0xe018,{1,1,1,1,2,2,1}},
@@ -1685,81 +1279,27 @@ static const struct interval_wcwidth table_wcwidth[] = {
     {0xf7ea,0xf7eb,{1,1,1,1,2,2,2}},
     {0xf7ec,0xf7ec,{1,1,1,1,2,1,2}},
     {0xf7ed,0xf7ee,{1,1,1,1,2,2,2}},
-    {0xf7ef,0xf848,{1,1,1,1,2,1,2}},
+    {0xf7ef,0xf848,{1,1,1,1,2,1,2}},  // EA ambiguous to f8ff
     {0xf849,0xf8ef,{1,1,1,1,2,1,1}},
-    {0xf900,0xfa2d,{2,2,2,2,2,2,2}},
-    {0xfa30,0xfa6a,{2,2,2,2,2,2,2}},
-    {0xfb00,0xfb06,{1,1,1,1,1,1,1}},
-    {0xfb13,0xfb17,{1,1,1,1,1,1,1}},
-    {0xfb1d,0xfb1d,{1,1,1,1,1,1,1}},
-    {0xfb1f,0xfb36,{1,1,1,1,1,1,1}},
-    {0xfb38,0xfb3c,{1,1,1,1,1,1,1}},
-    {0xfb3e,0xfb3e,{1,1,1,1,1,1,1}},
-    {0xfb40,0xfb41,{1,1,1,1,1,1,1}},
-    {0xfb43,0xfb44,{1,1,1,1,1,1,1}},
-    {0xfb46,0xfbb1,{1,1,1,1,1,1,1}},
-    {0xfbd3,0xfd3f,{1,1,1,1,1,1,1}},
-    {0xfd50,0xfd8f,{1,1,1,1,1,1,1}},
-    {0xfd92,0xfdc7,{1,1,1,1,1,1,1}},
-    {0xfdf0,0xfdfc,{1,1,1,1,1,1,1}},
-    {0xfe30,0xfe46,{2,2,2,2,2,2,2}},
-    {0xfe49,0xfe52,{2,2,2,2,2,2,2}},
+    {0xf900,0xfa6d,{2,2,2,2,2,2,2}}, // CJK COMPATIBILITY IDEOGRAPH
+    {0xfa70,0xfad9,{2,2,2,2,2,2,2}}, // CJK COMPATIBILITY IDEOGRAPH
+    {0xfe10,0xfe19,{2,2,2,2,2,2,2}}, // Presentation forms, small signs
+    {0xfe30,0xfe52,{2,2,2,2,2,2,2}},
     {0xfe54,0xfe66,{2,2,2,2,2,2,2}},
-    {0xfe68,0xfe6b,{2,2,2,2,2,2,2}},
-    {0xfe70,0xfe74,{1,1,1,1,1,1,1}},
-    {0xfe76,0xfefc,{1,1,1,1,1,1,1}},
-    {0xff01,0xff60,{2,2,2,2,2,2,2}},
-    {0xff61,0xff63,{1,1,1,1,1,1,1}},
+    {0xfe68,0xfe6b,{2,2,2,2,2,2,2}}, // end of small signs
+    {0xff01,0xff60,{2,2,2,2,2,2,2}}, // fullwidth
     {0xff64,0xff64,{1,1,1,1,1,2,1}},
-    {0xff65,0xffbe,{1,1,1,1,1,1,1}},
-    {0xffc2,0xffc7,{1,1,1,1,1,1,1}},
-    {0xffca,0xffcf,{1,1,1,1,1,1,1}},
-    {0xffd2,0xffd7,{1,1,1,1,1,1,1}},
-    {0xffda,0xffdc,{1,1,1,1,1,1,1}},
-    {0xffe0,0xffe6,{2,2,2,2,2,2,2}},
-    {0xffe8,0xffee,{1,1,1,1,1,1,1}},
-    {0xfffc,0xfffc,{1,1,1,1,1,1,1}},
-    {0xfffd,0xfffd,{1,1,1,1,2,1,1}},
-    {0x10300,0x1031e,{1,1,1,1,1,1,1}},
-    {0x10320,0x10323,{1,1,1,1,1,1,1}},
-    {0x10330,0x1034a,{1,1,1,1,1,1,1}},
-    {0x10400,0x10425,{1,1,1,1,1,1,1}},
-    {0x10428,0x1044d,{1,1,1,1,1,1,1}},
-    {0x1d000,0x1d0f5,{1,1,1,1,1,1,1}},
-    {0x1d100,0x1d126,{1,1,1,1,1,1,1}},
-    {0x1d12a,0x1d166,{1,1,1,1,1,1,1}},
-    {0x1d16a,0x1d172,{1,1,1,1,1,1,1}},
-    {0x1d183,0x1d184,{1,1,1,1,1,1,1}},
-    {0x1d18c,0x1d1a9,{1,1,1,1,1,1,1}},
-    {0x1d1ae,0x1d1dd,{1,1,1,1,1,1,1}},
-    {0x1d400,0x1d454,{1,1,1,1,1,1,1}},
-    {0x1d456,0x1d49c,{1,1,1,1,1,1,1}},
-    {0x1d49e,0x1d49f,{1,1,1,1,1,1,1}},
-    {0x1d4a2,0x1d4a2,{1,1,1,1,1,1,1}},
-    {0x1d4a5,0x1d4a6,{1,1,1,1,1,1,1}},
-    {0x1d4a9,0x1d4ac,{1,1,1,1,1,1,1}},
-    {0x1d4ae,0x1d4b9,{1,1,1,1,1,1,1}},
-    {0x1d4bb,0x1d4bb,{1,1,1,1,1,1,1}},
-    {0x1d4bd,0x1d4c0,{1,1,1,1,1,1,1}},
-    {0x1d4c2,0x1d4c3,{1,1,1,1,1,1,1}},
-    {0x1d4c5,0x1d505,{1,1,1,1,1,1,1}},
-    {0x1d507,0x1d50a,{1,1,1,1,1,1,1}},
-    {0x1d50d,0x1d514,{1,1,1,1,1,1,1}},
-    {0x1d516,0x1d51c,{1,1,1,1,1,1,1}},
-    {0x1d51e,0x1d539,{1,1,1,1,1,1,1}},
-    {0x1d53b,0x1d53e,{1,1,1,1,1,1,1}},
-    {0x1d540,0x1d544,{1,1,1,1,1,1,1}},
-    {0x1d546,0x1d546,{1,1,1,1,1,1,1}},
-    {0x1d54a,0x1d550,{1,1,1,1,1,1,1}},
-    {0x1d552,0x1d6a3,{1,1,1,1,1,1,1}},
-    {0x1d6a8,0x1d7c9,{1,1,1,1,1,1,1}},
-    {0x1d7ce,0x1d7ff,{1,1,1,1,1,1,1}},
-    {0x20000,0x2a6d6,{2,2,2,2,2,2,2}},
-    {0x2f800,0x2fa1d,{2,2,2,2,2,2,2}},
-    {0xf0000,0xffffd,{1,1,1,1,2,1,1}},
-    {0x100000,0x10fffd,{1,1,1,1,2,1,1}},
+    {0xffe0,0xffe6,{2,2,2,2,2,2,2}}, // fullwidth
+    {0xfffd,0xfffd,{1,1,1,1,2,1,1}}, // EA ambiguous
+    // tr11 has all unassigned in these planes as wide chars
+    {0x20000,0x2a6d6,{2,2,2,2,2,2,2}}, // Supplementary Ideographic Plane
+    {0x2f800,0x2fa1d,{2,2,2,2,2,2,2}}, // to 2fffd
+    {0x30000,0x3fffd,{2,2,2,2,2,2,2}}, // Tertiary Ideographic Plane
+    {0xf0000,0xffffd,{1,1,1,1,2,1,1}}, // EA ambiguous
+    {0x100000,0x10fffd,{1,1,1,1,2,1,1}}, // EA ambiguous
 };
 
+#if defined(__APPLE__) || defined(Win32) || defined(_AIX)
 /* ------------------- iswalpha -------------------- */
 static const struct interval table_walpha[] = {
     { 0x41, 0x5a },
@@ -2101,8 +1641,9 @@ static const struct interval table_wblank[] = {
   { 0x20, 0x20 },
   { 0xa0, 0xa0 }, /* non-breaking space */
   { 0x1680, 0x1680 }, /* ogham space mark */
-  { 0x2000, 0x2006 }, /* why not figure space, 2007? */
+  { 0x2000, 0x2006 }, /* why not figure space, 2007? Not in glibc */
   { 0x2008, 0x200b },
+//  { 0x202f, 0x202f }, /* narrow no-break space, not in glibc */
   { 0x205f, 0x205f }, /* medium mathematical space */
   { 0x3000, 0x3000 }  /* (CJK) ideographic space */
 };
@@ -3973,6 +3514,7 @@ static const struct interval table_wupper[] = {
 static const int table_wupper_count =
   (sizeof(table_wupper)/sizeof(struct interval));
 
+
 /* ------------------- iswxdigit -------------------- */
 static const struct interval table_wxdigit[] = {
   { 0x30, 0x39 },
@@ -3981,3 +3523,86 @@ static const struct interval table_wxdigit[] = {
 };
 static const int table_wxdigit_count =
   (sizeof(table_wxdigit)/sizeof(struct interval));
+#endif
+
+/* -------------------helper for wcwidth -------------------- */
+
+/* From http://www.cl.cam.ac.uk/~mgk25/ucs/wcwidth.c
+ *    - Non-spacing and enclosing combining characters (general
+ *      category code Mn or Me in the Unicode database) have a
+ *      column width of 0.
+ *
+ *    - Other format characters (general category code Cf in the Unicode
+ *      database) and ZERO WIDTH SPACE (U+200B) have a column width of 0.
+ *
+ *    - Hangul Jamo medial vowels and final consonants (U+1160-U+11FF)
+ *      have a column width of 0.
+ *
+ *    Edited based on the Unicode 8.0.0 tables at
+ *    http://www.unicode.org/Public/UCD/latest/ucd/EastAsianWidth.txt
+ */
+
+static const struct interval zero_width[] = {
+    // added for our purposes, the Unicode control characters
+    { 0x0000, 0x001F }, { 0x007F, 0x009F },
+    // the rest is incomplete for Unicode 8, but omissions are esoteric
+    { 0x0300, 0x036F }, { 0x0483, 0x0487 }, { 0x0488, 0x0489 }, // MK had 0486
+    { 0x0591, 0x05BD }, { 0x05BF, 0x05BF }, { 0x05C1, 0x05C2 },
+    { 0x05C4, 0x05C5 }, { 0x05C7, 0x05C7 }, { 0x0600, 0x0603 },
+    { 0x0610, 0x0615 }, { 0x064B, 0x065F }, { 0x0670, 0x0670 }, // MK had 065E
+    { 0x06D6, 0x06DD },
+    { 0x06DF, 0x06E4 }, { 0x06E7, 0x06E8 }, { 0x06EA, 0x06ED },
+    { 0x070F, 0x070F }, { 0x0711, 0x0711 }, { 0x0730, 0x074A },
+    { 0x07A6, 0x07B0 }, { 0x07EB, 0x07F3 },
+    { 0x0816, 0x0819 }, { 0x081B, 0x0823 },  {0x0825, 0x0827 },
+    { 0x0829, 0x082D }, { 0x0859, 0x085B },  {0x08E3, 0x08FF },
+    { 0x0901, 0x0902 }, { 0x093A, 0x093A },
+    { 0x093C, 0x093C }, { 0x0941, 0x0948 }, { 0x094D, 0x094D },
+    { 0x0951, 0x0957 }, { 0x0962, 0x0963 }, { 0x0981, 0x0981 },
+    { 0x09BC, 0x09BC }, { 0x09C1, 0x09C4 }, { 0x09CD, 0x09CD },
+    { 0x09E2, 0x09E3 }, { 0x0A01, 0x0A02 }, { 0x0A3C, 0x0A3C },
+    { 0x0A41, 0x0A42 }, { 0x0A47, 0x0A48 }, { 0x0A4B, 0x0A4D },
+    { 0x0A70, 0x0A71 }, { 0x0A75, 0x0A75 }, { 0x0A81, 0x0A82 },
+    { 0x0ABC, 0x0ABC },
+    { 0x0AC1, 0x0AC5 }, { 0x0AC7, 0x0AC8 }, { 0x0ACD, 0x0ACD },
+    { 0x0AE2, 0x0AE3 }, { 0x0B01, 0x0B01 }, { 0x0B3C, 0x0B3C },
+    { 0x0B3F, 0x0B3F }, { 0x0B41, 0x0B43 }, { 0x0B4D, 0x0B4D },
+    { 0x0B56, 0x0B56 }, { 0x0B62, 0x0B63 }, { 0x0B82, 0x0B82 },
+    { 0x0BC0, 0x0BC0 }, { 0x0BCD, 0x0BCD }, { 0x0C00, 0x0C03 },
+    { 0x0C3E, 0x0C40 }, { 0x0C46, 0x0C48 }, { 0x0C4A, 0x0C4D },
+    { 0x0C55, 0x0C56 }, { 0x0C62, 0x0C63 }, { 0x0C81, 0x0C81 },
+    { 0x0CBC, 0x0CBC },
+    { 0x0CBF, 0x0CBF }, { 0x0CC6, 0x0CC6 }, { 0x0CCC, 0x0CCD },
+    { 0x0CE2, 0x0CE3 }, { 0x0D41, 0x0D4D },
+    { 0x0DCA, 0x0DCA }, { 0x0DCF, 0x0DD4 }, { 0x0DD6, 0x0DD6 },
+    { 0x0E31, 0x0E31 }, { 0x0E34, 0x0E3A }, { 0x0E47, 0x0E4E },
+    { 0x0EB1, 0x0EB1 }, { 0x0EB4, 0x0EB9 }, { 0x0EBB, 0x0EBC },
+    { 0x0EC8, 0x0ECD }, { 0x0F18, 0x0F19 }, { 0x0F35, 0x0F35 },
+    { 0x0F37, 0x0F37 }, { 0x0F39, 0x0F39 }, { 0x0F71, 0x0F7E },
+    { 0x0F80, 0x0F84 }, { 0x0F86, 0x0F87 }, { 0x0F8D, 0x0F97 },
+    { 0x0F99, 0x0FBC }, { 0x0FC6, 0x0FC6 }, { 0x102D, 0x1030 },
+    { 0x1032, 0x1037 }, { 0x1039, 0x103A }, { 0x103D, 0x103E },
+    { 0x1058, 0x1059 },  // several missing here
+    { 0x1160, 0x11FF }, { 0x135D, 0x135F },
+    { 0x1712, 0x1714 }, { 0x1732, 0x1734 }, { 0x1752, 0x1753 },
+    { 0x1772, 0x1773 }, { 0x17B4, 0x17BD },
+    { 0x17C6, 0x17C6 }, { 0x17C9, 0x17D3 }, { 0x17DD, 0x17DD },
+    { 0x180B, 0x180D }, { 0x18A9, 0x18A9 }, { 0x1920, 0x1922 },
+    { 0x1927, 0x193B },
+    { 0x1A17, 0x1A1B }, { 0x1B00, 0x1B03 }, { 0x1B34, 0x1B34 },
+    { 0x1B36, 0x1B3A }, { 0x1B3C, 0x1B3C }, { 0x1B42, 0x1B42 },
+    { 0x1B6B, 0x1B73 }, { 0x1DC0, 0x1DCA }, { 0x1DFE, 0x1DFF },
+    { 0x200B, 0x200F }, { 0x202A, 0x202E }, { 0x2060, 0x2063 },
+    { 0x206A, 0x206F }, { 0x20D0, 0x20EF }, { 0x302A, 0x302F },
+    { 0x3099, 0x309A }, { 0xA806, 0xA806 }, { 0xA80B, 0xA80B },
+    { 0xA825, 0xA826 }, { 0xFB1E, 0xFB1E }, { 0xFE00, 0xFE0F },
+    { 0xFE20, 0xFE23 }, { 0xFEFF, 0xFEFF }, { 0xFFF9, 0xFFFB },
+    { 0x10A01, 0x10A03 }, { 0x10A05, 0x10A06 }, { 0x10A0C, 0x10A0F },
+    { 0x10A38, 0x10A3A }, { 0x10A3F, 0x10A3F }, { 0x1D167, 0x1D169 },
+    { 0x1D173, 0x1D182 }, { 0x1D185, 0x1D18B }, { 0x1D1AA, 0x1D1AD },
+    { 0x1D242, 0x1D244 }, { 0xE0001, 0xE0001 }, { 0xE0020, 0xE007F },
+    { 0xE0100, 0xE01EF }
+  };
+
+static const int 
+zero_width_count = (sizeof(zero_width)/sizeof(struct interval));
diff --git a/src/main/saveload.c b/src/main/saveload.c
index 1c3493a..42e2cb4 100644
--- a/src/main/saveload.c
+++ b/src/main/saveload.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--2013  The R Core Team
+ *  Copyright (C) 1997--2015  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
@@ -15,7 +15,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  */
 
 /* <UTF8> byte-level access is only to compare with chars <= 0x7F */
@@ -112,6 +112,9 @@ typedef struct {
 #include <rpc/types.h>
 #include <rpc/xdr.h>
 
+#define SMBUF_SIZE 512
+#define SMBUF_SIZED_STRING "%511s"
+
 typedef struct {
 /* These variables are accessed in the
    InInteger, InComplex, InReal, InString
@@ -124,12 +127,11 @@ mean some of them wouldn't need the extra argument.
 */
 
     R_StringBuffer buffer;
-    char smbuf[512];		/* Small buffer for temp use */
+    char smbuf[SMBUF_SIZE];	/* Small buffer for temp use */
 				/* smbuf is only used by Ascii. */
     XDR xdrs;
 } SaveLoadData;
 
-
 /* ----- I / O -- F u n c t i o n -- P o i n t e r s ----- */
 
 typedef struct {
@@ -196,7 +198,7 @@ static void DummyTerm(FILE *fp, SaveLoadData *d)
 static int AsciiInInteger(FILE *fp, SaveLoadData *d)
 {
     int x, res;
-    res = fscanf(fp, "%s", d->smbuf);
+    res = fscanf(fp, SMBUF_SIZED_STRING, d->smbuf);
     if(res != 1) error(_("read error"));
     if (strcmp(d->smbuf, "NA") == 0)
 	return NA_INTEGER;
@@ -210,7 +212,7 @@ static int AsciiInInteger(FILE *fp, SaveLoadData *d)
 static double AsciiInReal(FILE *fp, SaveLoadData *d)
 {
     double x;
-    int res = fscanf(fp, "%s", d->smbuf);
+    int res = fscanf(fp, SMBUF_SIZED_STRING, d->smbuf);
     if(res != 1) error(_("read error"));
     if (strcmp(d->smbuf, "NA") == 0)
 	x = NA_REAL;
@@ -220,7 +222,7 @@ static double AsciiInReal(FILE *fp, SaveLoadData *d)
 	x = R_NegInf;
     else
 	res  = sscanf(d->smbuf, "%lg", &x);
-	if(res != 1) error(_("read error"));
+    if(res != 1) error(_("read error"));
     return x;
 }
 
@@ -228,7 +230,7 @@ static Rcomplex AsciiInComplex(FILE *fp, SaveLoadData *d)
 {
     Rcomplex x;
     int res;
-    res = fscanf(fp, "%s", d->smbuf);
+    res = fscanf(fp, SMBUF_SIZED_STRING, d->smbuf);
     if(res != 1) error(_("read error"));
     if (strcmp(d->smbuf, "NA") == 0)
 	x.r = NA_REAL;
@@ -241,7 +243,7 @@ static Rcomplex AsciiInComplex(FILE *fp, SaveLoadData *d)
 	if(res != 1) error(_("read error"));
     }
 
-    res = fscanf(fp, "%s", d->smbuf);
+    res = fscanf(fp, SMBUF_SIZED_STRING, d->smbuf);
     if(res != 1) error(_("read error"));
     if (strcmp(d->smbuf, "NA") == 0)
 	x.i = NA_REAL;
@@ -604,7 +606,7 @@ static void RestoreSEXP(SEXP s, FILE *fp, InputRoutines *m, NodeInfo *node, int
 	R_AllocStringBuffer(MAXELTSIZE - 1, &(d->buffer));
 	int index = StrToInternal(m->InString(fp, d));
 	if (index == NA_INTEGER) {
-	    warning(_("unrecognized internal function name \"%s\""), d->buffer.data); 
+	    warning(_("unrecognized internal function name \"%s\""), d->buffer.data);
 	    index = 0;   /* zero doesn't make sense, but is back compatible with 3.0.0 and earlier */
 	}
 	SET_PRIMOFFSET(s, index);
@@ -1267,7 +1269,7 @@ static SEXP NewReadItem (SEXP sym_table, SEXP env_table, FILE *fp,
 	R_AllocStringBuffer(MAXELTSIZE - 1, &(d->buffer));
 	int index = StrToInternal(m->InString(fp, d));
 	if (index == NA_INTEGER) {
-	    warning(_("unrecognized internal function name \"%s\""), d->buffer.data); 
+	    warning(_("unrecognized internal function name \"%s\""), d->buffer.data);
 	    PROTECT(s = R_NilValue);
 	} else
 	    PROTECT(s = mkPRIMSXP(index, type == BUILTINSXP));
@@ -1343,7 +1345,7 @@ static SEXP NewDataLoad (FILE *fp, InputRoutines *m, SaveLoadData *d)
     }
 
     /* Read the actual object back */
-    obj =  NewReadItem(sym_table, env_table, fp, m, d);
+    PROTECT(obj = NewReadItem(sym_table, env_table, fp, m, d));
 
     /* end the context after anything that could raise an error but before
        calling InTerm so it doesn't get called twice */
@@ -1351,7 +1353,7 @@ static SEXP NewDataLoad (FILE *fp, InputRoutines *m, SaveLoadData *d)
 
     /* Wrap up */
     m->InTerm(fp, d);
-    UNPROTECT(2);
+    UNPROTECT(3); /* obj, env_table, sym_table */
     return obj;
 }
 
@@ -1377,7 +1379,7 @@ static int InIntegerAscii(FILE *fp, SaveLoadData *unused)
 {
     char buf[128];
     int x, res;
-    res = fscanf(fp, "%s", buf);
+    res = fscanf(fp, SMBUF_SIZED_STRING, buf);
     if(res != 1) error(_("read error"));
     if (strcmp(buf, "NA") == 0)
 	return NA_INTEGER;
@@ -1494,7 +1496,7 @@ static double InDoubleAscii(FILE *fp, SaveLoadData *unused)
     char buf[128];
     double x;
     int res;
-    res = fscanf(fp, "%s", buf);
+    res = fscanf(fp, "%127s", buf);
     if(res != 1) error(_("read error"));
     if (strcmp(buf, "NA") == 0)
 	x = NA_REAL;
@@ -1972,7 +1974,7 @@ SEXP attribute_hidden do_save(SEXP call, SEXP op, SEXP args, SEXP env)
 
     t = s;
     for (j = 0; j < len; j++, t = CDR(t)) {
-	SET_TAG(t, install(CHAR(STRING_ELT(CAR(args), j))));
+	SET_TAG(t, installTrChar(STRING_ELT(CAR(args), j)));
 	tmp = findVar(TAG(t), source);
 	if (tmp == R_UnboundValue)
 	    error(_("object '%s' not found"), EncodeChar(PRINTNAME(TAG(t))));
@@ -2011,7 +2013,7 @@ static SEXP RestoreToEnv(SEXP ans, SEXP aenv)
 	if (TYPEOF(names) != STRSXP || LENGTH(names) != LENGTH(ans))
 	    error(_("not a valid named list"));
 	for (i = 0; i < LENGTH(ans); i++) {
-	    SEXP sym = install(CHAR(STRING_ELT(names, i)));
+	    SEXP sym = installTrChar(STRING_ELT(names, i));
 	    obj = VECTOR_ELT(ans, i);
 	    defineVar(sym, obj, aenv);
 	    if(R_seemsOldStyleS4Object(obj))
@@ -2212,7 +2214,7 @@ static void con_cleanup(void *data)
 	invisible(serialize(val, con, ascii = ascii))
 
    Unfortunately, this will result in too much duplication in the lapply
-   (and any other way of doing this).  Hence we need an internal version. 
+   (and any other way of doing this).  Hence we need an internal version.
 
    In case anyone wants to do this another way, in fact it is a
    pairlist of objects that is serialized, but RestoreToEnv copes
@@ -2261,13 +2263,13 @@ SEXP attribute_hidden do_saveToConn(SEXP call, SEXP op, SEXP args, SEXP env)
 
     wasopen = con->isopen;
     if(!wasopen) {
-	char mode[5];	
+	char mode[5];
 	strcpy(mode, con->mode);
 	strcpy(con->mode, "wb");
 	if(!con->open(con)) error(_("cannot open the connection"));
 	strcpy(con->mode, mode);
 	/* set up a context which will close the connection
- 	   if there is an error */
+	   if there is an error */
 	begincontext(&cntxt, CTXT_CCODE, R_NilValue, R_BaseEnv, R_BaseEnv,
 		     R_NilValue, R_NilValue);
 	cntxt.cend = &con_cleanup;
@@ -2278,7 +2280,8 @@ SEXP attribute_hidden do_saveToConn(SEXP call, SEXP op, SEXP args, SEXP env)
 
     if (ascii) {
 	magic = "RDA2\n";
-	type = R_pstream_ascii_format;
+	type = (ascii == NA_LOGICAL) ?
+	    R_pstream_asciihex_format : R_pstream_ascii_format;
     }
     else {
 	if (con->text)
@@ -2302,7 +2305,7 @@ SEXP attribute_hidden do_saveToConn(SEXP call, SEXP op, SEXP args, SEXP env)
 
     t = s;
     for (j = 0; j < len; j++, t = CDR(t)) {
-	SET_TAG(t, install(CHAR(STRING_ELT(list, j))));
+	SET_TAG(t, installTrChar(STRING_ELT(list, j)));
 	SETCAR(t, findVar(TAG(t), source));
 	tmp = findVar(TAG(t), source);
 	if (tmp == R_UnboundValue)
@@ -2323,9 +2326,6 @@ SEXP attribute_hidden do_saveToConn(SEXP call, SEXP op, SEXP args, SEXP env)
 
 /* Read and checks the magic number, open the connection if needed */
 
-extern int R_ReadItemDepth;
-extern int R_InitReadItemDepth;
-
 SEXP attribute_hidden do_loadFromConn2(SEXP call, SEXP op, SEXP args, SEXP env)
 {
     /* loadFromConn2(conn, environment, verbose) */
@@ -2341,16 +2341,16 @@ SEXP attribute_hidden do_loadFromConn2(SEXP call, SEXP op, SEXP args, SEXP env)
     checkArity(op, args);
 
     con = getConnection(asInteger(CAR(args)));
-    
+
     wasopen = con->isopen;
     if(!wasopen) {
-	char mode[5];	
+	char mode[5];
 	strcpy(mode, con->mode);
 	strcpy(con->mode, "rb");
 	if(!con->open(con)) error(_("cannot open the connection"));
 	strcpy(con->mode, mode);
 	/* set up a context which will close the connection
- 	   if there is an error */
+	   if there is an error */
 	begincontext(&cntxt, CTXT_CCODE, R_NilValue, R_BaseEnv, R_BaseEnv,
 		     R_NilValue, R_NilValue);
 	cntxt.cend = &con_cleanup;
diff --git a/src/main/scan.c b/src/main/scan.c
index a16f9c3..c742a54 100644
--- a/src/main/scan.c
+++ b/src/main/scan.c
@@ -1,7 +1,7 @@
 /*
  *  R : A Computer Language for Statistical Data Analysis
  *  Copyright (C) 1995, 1996  Robert Gentleman and Ross Ihaka
- *  Copyright (C) 1998-2013   The R Core Team.
+ *  Copyright (C) 1998-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
@@ -15,7 +15,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  */
 
 /* <UTF8>
@@ -361,7 +361,7 @@ fillBuffer(SEXPTYPE type, int strip, int *bch, LocalData *d,
 		    buffer->data[m++] = (char) scanchar2(d);
 	    }
 	    if (c == R_EOF)
-	    	warning(_("EOF within quoted string"));
+		warning(_("EOF within quoted string"));
 	    c = scanchar(FALSE, d);
 	    mm = m;
 	}
@@ -411,7 +411,7 @@ fillBuffer(SEXPTYPE type, int strip, int *bch, LocalData *d,
 			    buffer->data[m++] = (char) scanchar2(d);
 		    }
 		    if (c == R_EOF)
-		    	warning(_("EOF within quoted string"));
+			warning(_("EOF within quoted string"));
 		    c = scanchar(TRUE, d); /* only peek at lead byte
 					      unless ASCII */
 		    if (c == quote) {
@@ -453,7 +453,7 @@ fillBuffer(SEXPTYPE type, int strip, int *bch, LocalData *d,
     }
     *bufp = '\0';
     /* Remove UTF-8 BOM */
-    if(d->atStart && utf8locale && 
+    if(d->atStart && utf8locale &&
        !memcmp(buffer->data, "\xef\xbb\xbf", 3))
 	memmove(buffer->data, buffer->data+3, strlen(buffer->data) + 1);
     d->atStart = FALSE;
@@ -474,7 +474,7 @@ static R_INLINE int isNAstring(const char *buf, int mode, LocalData *d)
     return 0;
 }
 
-static R_INLINE void expected(char *what, char *got, LocalData *d)
+static R_INLINE void NORET expected(char *what, char *got, LocalData *d)
 {
     int c;
     if (d->ttyflag) { /* This is safe in a MBCS */
@@ -696,7 +696,10 @@ static SEXP scanFrame(SEXP what, int maxitems, int maxlines, int flush,
 
     if (d->ttyflag) sprintf(ConsolePrompt, "1: ");
 
-    strip = asLogical(stripwhite);
+    // we checked its type in do_scan
+    int *lstrip = LOGICAL(stripwhite);
+    Rboolean vec_strip = (length(stripwhite) == length(what));
+    strip = lstrip[0];
 
     for (;;) {
 	if(linesread % 1000 == 999) R_CheckUserInterrupt();
@@ -741,6 +744,7 @@ static SEXP scanFrame(SEXP what, int maxitems, int maxlines, int flush,
 	    }
 	}
 
+	if (vec_strip) strip = lstrip[colsread];
 	buffer = fillBuffer(TYPEOF(VECTOR_ELT(ans, ii)), strip, &bch, d, &buf);
 	if (colsread == 0 &&
 	    strlen(buffer) == 0 &&
@@ -752,8 +756,6 @@ static SEXP scanFrame(SEXP what, int maxitems, int maxlines, int flush,
 	    extractItem(buffer, VECTOR_ELT(ans, ii), n, d);
 	    ii++;
 	    colsread++;
-	    if (length(stripwhite) == length(what))
-		strip = LOGICAL(stripwhite)[colsread];
 	    /* increment n and reset i after filling a row */
 	    if (colsread == nc) {
 		n++;
@@ -763,8 +765,6 @@ static SEXP scanFrame(SEXP what, int maxitems, int maxlines, int flush,
 		    while ((c = scanchar(FALSE, d)) != '\n' && c != R_EOF);
 		    bch = c;
 		}
-		if (length(stripwhite) == length(what))
-		    strip = LOGICAL(stripwhite)[0];
 	    }
 	}
     }
@@ -822,12 +822,12 @@ static SEXP scanFrame(SEXP what, int maxitems, int maxlines, int flush,
 SEXP attribute_hidden do_scan(SEXP call, SEXP op, SEXP args, SEXP rho)
 {
     SEXP ans, file, sep, what, stripwhite, dec, quotes, comstr;
-    int i, c, nlines, nmax, nskip, flush, fill, blskip, multiline, 
+    int i, c, nlines, nmax, nskip, flush, fill, blskip, multiline,
 	escapes, skipNul;
     const char *p, *encoding;
     RCNTXT cntxt;
     LocalData data = {NULL, 0, 0, '.', NULL, NO_COMCHAR, 0, NULL, FALSE,
-		      FALSE, 0, FALSE, FALSE, FALSE, FALSE};
+		      FALSE, 0, FALSE, FALSE, FALSE, FALSE, FALSE, {FALSE}};
     data.NAstrings = R_NilValue;
 
     checkArity(op, args);
@@ -936,7 +936,7 @@ SEXP attribute_hidden do_scan(SEXP call, SEXP op, SEXP args, SEXP rho)
 		error(_("cannot read from this connection"));
 	    }
 	} else {
-	    if(!data.con->canread) 
+	    if(!data.con->canread)
 		error(_("cannot read from this connection"));
 	}
 	for (i = 0; i < nskip; i++) /* MBCS-safe */
@@ -948,8 +948,8 @@ SEXP attribute_hidden do_scan(SEXP call, SEXP op, SEXP args, SEXP rho)
 
     /* set up a context which will close the connection if there is
        an error or user interrupt */
-    begincontext(&cntxt, CTXT_CCODE, call, R_BaseEnv, R_BaseEnv,
-		 R_NilValue, R_NilValue);
+    begincontext(&cntxt, CTXT_CCODE, R_GlobalContext->call, R_BaseEnv,
+		 R_BaseEnv, R_NilValue, R_NilValue);
     cntxt.cend = &scan_cleanup;
     cntxt.cenddata = &data;
 
@@ -971,6 +971,7 @@ SEXP attribute_hidden do_scan(SEXP call, SEXP op, SEXP args, SEXP rho)
     default:
 	error(_("invalid '%s' argument"), "what");
     }
+    PROTECT(ans);
     endcontext(&cntxt);
 
     /* we might have a character that was unscanchar-ed.
@@ -983,8 +984,10 @@ SEXP attribute_hidden do_scan(SEXP call, SEXP op, SEXP args, SEXP rho)
     if (!data.ttyflag && !data.wasopen)
 	data.con->close(data.con);
     if (data.quoteset[0]) free(data.quoteset);
-    if (!skipNul && data.embedWarn) 
+    if (!skipNul && data.embedWarn)
 	warning(_("embedded nul(s) found in input"));
+
+    UNPROTECT(1); /* ans */
     return ans;
 }
 
@@ -1005,8 +1008,8 @@ SEXP attribute_hidden do_readln(SEXP call, SEXP op, SEXP args, SEXP rho)
 	if(length(prompt) > 0) {
 	    strncpy(ConsolePrompt, translateChar(STRING_ELT(prompt, 0)),
 		    CONSOLE_PROMPT_SIZE - 1);
-            ConsolePrompt[CONSOLE_PROMPT_SIZE - 1] = '\0';
-        }
+	    ConsolePrompt[CONSOLE_PROMPT_SIZE - 1] = '\0';
+	}
     }
 
     if(R_Interactive) {
diff --git a/src/main/seq.c b/src/main/seq.c
index 8e236d3..716ef3f 100644
--- a/src/main/seq.c
+++ b/src/main/seq.c
@@ -1,7 +1,7 @@
 /*
  *  R : A Computer Language for Statistical Data Analysis
  *  Copyright (C) 1995-1998  Robert Gentleman and Ross Ihaka
- *  Copyright (C) 1998-2013  The R Core Team.
+ *  Copyright (C) 1998-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
@@ -15,7 +15,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  */
 
 /* The x:y  primitive calls do_colon(); do_colon() calls cross_colon() if
@@ -30,6 +30,7 @@
 #include <Internal.h>
 #include <float.h>  /* for DBL_EPSILON */
 #include <Rmath.h>
+#include <R_ext/Itermacros.h>
 
 #include "RBufferUtils.h"
 static R_StringBuffer cbuff = {NULL, 0, MAXELTSIZE};
@@ -96,7 +97,7 @@ static SEXP cross_colon(SEXP call, SEXP s, SEXP t)
 static SEXP seq_colon(double n1, double n2, SEXP call)
 {
     double r = fabs(n2 - n1);
-    if(r >= R_XLEN_T_MAX) 
+    if(r >= R_XLEN_T_MAX)
 	errorcall(call, _("result would be too long a vector"));
 
     SEXP ans;
@@ -158,9 +159,15 @@ SEXP attribute_hidden do_colon(SEXP call, SEXP op, SEXP args, SEXP rho)
     if (n1 == 0 || n2 == 0)
 	errorcall(call, _("argument of length 0"));
     if (n1 > 1)
-	warningcall(call, _("numerical expression has %d elements: only the first used"), (int) n1);
+	warningcall(call,
+		    ngettext("numerical expression has %d element: only the first used",
+			     "numerical expression has %d elements: only the first used",
+			     (int) n1), (int) n1);
     if (n2 > 1)
-	warningcall(call, _("numerical expression has %d elements: only the first used"), (int) n2);
+	warningcall(call,
+		    ngettext("numerical expression has %d element: only the first used",
+			     "numerical expression has %d elements: only the first used",
+			     (int) n2), (int) n2);
     n1 = asReal(s1);
     n2 = asReal(s2);
     if (ISNAN(n1) || ISNAN(n2))
@@ -171,20 +178,96 @@ SEXP attribute_hidden do_colon(SEXP call, SEXP op, SEXP args, SEXP rho)
 /* rep.int(x, times) for a vector times */
 static SEXP rep2(SEXP s, SEXP ncopy)
 {
-    R_xlen_t i, na, nc, n;
-    int j;
+    R_xlen_t i, j, nc, n;
     SEXP a, t;
 
-    PROTECT(t = coerceVector(ncopy, INTSXP));
+#define R2_SWITCH_LOOP(it) \
+    switch (TYPEOF(s)) { \
+    case LGLSXP: \
+	for (i = 0; i < nc; i++) { \
+/*	    if ((i+1) % ni == 0) R_CheckUserInterrupt();*/ \
+	    for (j = 0; j < (R_xlen_t) it[i]; j++) \
+		LOGICAL(a)[n++] = LOGICAL(s)[i]; \
+	} \
+	break; \
+    case INTSXP: \
+	for (i = 0; i < nc; i++) { \
+/*	    if ((i+1) % ni == 0) R_CheckUserInterrupt();*/ \
+	    for (j = (R_xlen_t) it[i]; j > 0; j--) \
+		INTEGER(a)[n++] = INTEGER(s)[i]; \
+	} \
+	break; \
+    case REALSXP: \
+	for (i = 0; i < nc; i++) { \
+/*	    if ((i+1) % ni == 0) R_CheckUserInterrupt();*/ \
+	    for (j = (R_xlen_t) it[i]; j > 0; j--) \
+		REAL(a)[n++] = REAL(s)[i]; \
+	} \
+	break; \
+    case CPLXSXP: \
+	for (i = 0; i < nc; i++) { \
+/*	    if ((i+1) % ni == 0) R_CheckUserInterrupt();*/ \
+	    for (j = (R_xlen_t) it[i]; j > 0; j--) \
+		COMPLEX(a)[n++] = COMPLEX(s)[i]; \
+	} \
+	break; \
+    case STRSXP: \
+	for (i = 0; i < nc; i++) { \
+/*	    if ((i+1) % ni == 0) R_CheckUserInterrupt();*/ \
+	    for (j = (R_xlen_t) it[i]; j > 0; j--) \
+		SET_STRING_ELT(a, n++, STRING_ELT(s, i)); \
+	} \
+	break; \
+    case VECSXP: \
+    case EXPRSXP: \
+	for (i = 0; i < nc; i++) { \
+/*	    if ((i+1) % ni == 0) R_CheckUserInterrupt();*/ \
+	    SEXP elt = lazy_duplicate(VECTOR_ELT(s, i)); \
+	    for (j = (R_xlen_t) it[i]; j > 0; j--) \
+		SET_VECTOR_ELT(a, n++, elt); \
+	    if (j > 1) SET_NAMED(elt, 2); \
+	} \
+	break; \
+    case RAWSXP: \
+	for (i = 0; i < nc; i++) { \
+/*	    if ((i+1) % ni == 0) R_CheckUserInterrupt();*/ \
+	    for (j = (R_xlen_t) it[i]; j > 0; j--) \
+		RAW(a)[n++] = RAW(s)[i]; \
+	} \
+	break; \
+    default: \
+	UNIMPLEMENTED_TYPE("rep2", s); \
+    }
+
+#ifdef LONG_VECTOR_SUPPORT
+    if (TYPEOF(ncopy) != INTSXP)
+#else
+    if (TYPEOF(ncopy) == REALSXP)
+#endif
+	PROTECT(t = coerceVector(ncopy, REALSXP));
+    else
+	PROTECT(t = coerceVector(ncopy, INTSXP));
 
     nc = xlength(ncopy);
-    na = 0;
+    double sna = 0;
+    if (TYPEOF(t) == REALSXP)
+    for (i = 0; i < nc; i++) {
+//	if ((i+1) % NINTERRUPT == 0) R_CheckUserInterrupt();
+	if (ISNAN(REAL(t)[i]) || REAL(t)[i] <= -1 ||
+	    REAL(t)[i] >= R_XLEN_T_MAX+1.0)
+	    error(_("invalid '%s' value"), "times");
+	sna += (R_xlen_t) REAL(t)[i];
+    }
+    else
     for (i = 0; i < nc; i++) {
 //	if ((i+1) % NINTERRUPT == 0) R_CheckUserInterrupt();
 	if (INTEGER(t)[i] == NA_INTEGER || INTEGER(t)[i] < 0)
 	    error(_("invalid '%s' value"), "times");
-	na += INTEGER(t)[i];
+	sna += INTEGER(t)[i];
     }
+    if (sna > R_XLEN_T_MAX)
+	error(_("invalid '%s' value"), "times");
+    R_xlen_t na = (R_xlen_t) sna;
 
 /*    R_xlen_t ni = NINTERRUPT, ratio;
     if(nc > 0) {
@@ -193,65 +276,14 @@ static SEXP rep2(SEXP s, SEXP ncopy)
 	} */
     PROTECT(a = allocVector(TYPEOF(s), na));
     n = 0;
-    switch (TYPEOF(s)) {
-    case LGLSXP:
-	for (i = 0; i < nc; i++) {
-//	    if ((i+1) % ni == 0) R_CheckUserInterrupt();
-	    for (j = 0; j < INTEGER(t)[i]; j++)
-		LOGICAL(a)[n++] = LOGICAL(s)[i];
-	}
-	break;
-    case INTSXP:
-	for (i = 0; i < nc; i++) {
-//	    if ((i+1) % ni == 0) R_CheckUserInterrupt();
-	    for (j = 0; j < INTEGER(t)[i]; j++)
-		INTEGER(a)[n++] = INTEGER(s)[i];
-	}
-	break;
-    case REALSXP:
-	for (i = 0; i < nc; i++) {
-//	    if ((i+1) % ni == 0) R_CheckUserInterrupt();
-	    for (j = 0; j < INTEGER(t)[i]; j++)
-		REAL(a)[n++] = REAL(s)[i];
-	}
-	break;
-    case CPLXSXP:
-	for (i = 0; i < nc; i++) {
-//	    if ((i+1) % ni == 0) R_CheckUserInterrupt();
-	    for (j = 0; j < INTEGER(t)[i]; j++)
-		COMPLEX(a)[n++] = COMPLEX(s)[i];
-	}
-	break;
-    case STRSXP:
-	for (i = 0; i < nc; i++) {
-//	    if ((i+1) % ni == 0) R_CheckUserInterrupt();
-	    for (j = 0; j < INTEGER(t)[i]; j++)
-		SET_STRING_ELT(a, n++, STRING_ELT(s, i));
-	}
-	break;
-    case VECSXP:
-    case EXPRSXP:
-	for (i = 0; i < nc; i++) {
-//	    if ((i+1) % ni == 0) R_CheckUserInterrupt();
-	    SEXP elt = lazy_duplicate(VECTOR_ELT(s, i));
-	    for (j = 0; j < INTEGER(t)[i]; j++)
-		SET_VECTOR_ELT(a, n++, elt);
-	    if (j > 1) SET_NAMED(elt, 2);
-	}
-	break;
-    case RAWSXP:
-	for (i = 0; i < nc; i++) {
-//	    if ((i+1) % ni == 0) R_CheckUserInterrupt();
-	    for (j = 0; j < INTEGER(t)[i]; j++)
-		RAW(a)[n++] = RAW(s)[i];
-	}
-	break;
-    default:
-	UNIMPLEMENTED_TYPE("rep2", s);
-    }
+    if (TYPEOF(t) == REALSXP)
+	R2_SWITCH_LOOP(REAL(t))
+    else
+	R2_SWITCH_LOOP(INTEGER(t))
     UNPROTECT(2);
     return a;
 }
+#undef R2_SWITCH_LOOP
 
 /* rep_len(x, len), also used for rep.int() with scalar 'times' */
 static SEXP rep3(SEXP s, R_xlen_t ns, R_xlen_t na)
@@ -261,57 +293,49 @@ static SEXP rep3(SEXP s, R_xlen_t ns, R_xlen_t na)
 
     PROTECT(a = allocVector(TYPEOF(s), na));
 
-    // i % ns is slow, especially with long R_xlen_t
     switch (TYPEOF(s)) {
     case LGLSXP:
-	for (i = 0, j = 0; i < na;) {
+	MOD_ITERATE1(na, ns, i, j, {
 //	    if ((i+1) % NINTERRUPT == 0) R_CheckUserInterrupt();
-	    if (j >= ns) j = 0;
-	    LOGICAL(a)[i++] = LOGICAL(s)[j++];
-	}
+	    LOGICAL(a)[i] = LOGICAL(s)[j];
+	});
 	break;
     case INTSXP:
-	for (i = 0, j = 0; i < na;) {
+	MOD_ITERATE1(na, ns, i, j, {
 //	    if ((i+1) % NINTERRUPT == 0) R_CheckUserInterrupt();
-	    if (j >= ns) j = 0;
-	    INTEGER(a)[i++] = INTEGER(s)[j++];
-	}
+	    INTEGER(a)[i] = INTEGER(s)[j];
+	});
 	break;
     case REALSXP:
-	for (i = 0, j = 0; i < na;) {
+	MOD_ITERATE1(na, ns, i, j,  {
 //	    if ((i+1) % NINTERRUPT == 0) R_CheckUserInterrupt();
-	    if (j >= ns) j = 0;
-	    REAL(a)[i++] = REAL(s)[j++];
-	}
+	    REAL(a)[i] = REAL(s)[j];
+	});
 	break;
     case CPLXSXP:
-	for (i = 0, j = 0; i < na;) {
+	MOD_ITERATE1(na, ns, i, j, {
 //	    if ((i+1) % NINTERRUPT == 0) R_CheckUserInterrupt();
-	    if (j >= ns) j = 0;
-	    COMPLEX(a)[i++] = COMPLEX(s)[j++];
-	}
+	    COMPLEX(a)[i] = COMPLEX(s)[j];
+	});
 	break;
     case RAWSXP:
-	for (i = 0, j = 0; i < na;) {
+	MOD_ITERATE1(na, ns, i, j, {
 //	    if ((i+1) % NINTERRUPT == 0) R_CheckUserInterrupt();
-	    if (j >= ns) j = 0;
-	    RAW(a)[i++] = RAW(s)[j++];
-	}
+	    RAW(a)[i] = RAW(s)[j];
+	});
 	break;
     case STRSXP:
-	for (i = 0, j = 0; i < na;) {
+	MOD_ITERATE1(na, ns, i, j, {
 //	    if ((i+1) % NINTERRUPT == 0) R_CheckUserInterrupt();
-	    if (j >= ns) j = 0;
-	    SET_STRING_ELT(a, i++, STRING_ELT(s, j++));
-	}
+	    SET_STRING_ELT(a, i, STRING_ELT(s, j));
+	});
 	break;
     case VECSXP:
     case EXPRSXP:
-	for (i = 0, j = 0; i < na;) {
+	MOD_ITERATE1(na, ns, i, j, {
 //	    if ((i+1) % NINTERRUPT == 0) R_CheckUserInterrupt();
-	    if (j >= ns) j = 0;
-	    SET_VECTOR_ELT(a, i++, lazy_duplicate(VECTOR_ELT(s, j++)));
-	}
+	    SET_VECTOR_ELT(a, i, lazy_duplicate(VECTOR_ELT(s, j)));
+	});
 	break;
     default:
 	UNIMPLEMENTED_TYPE("rep3", s);
@@ -320,6 +344,7 @@ static SEXP rep3(SEXP s, R_xlen_t ns, R_xlen_t na)
     return a;
 }
 
+// .Internal(rep.int(x, times))
 SEXP attribute_hidden do_rep_int(SEXP call, SEXP op, SEXP args, SEXP rho)
 {
     checkArity(op, args);
@@ -328,28 +353,30 @@ SEXP attribute_hidden do_rep_int(SEXP call, SEXP op, SEXP args, SEXP rho)
     SEXP a;
 
     if (!isVector(ncopy))
-	error(_("incorrect type for second argument"));
+	error(_("invalid type (%s) for '%s' (must be a vector)"),
+	      type2char(TYPEOF(ncopy)), "times");
 
     if (!isVector(s) && s != R_NilValue)
-	error(_("attempt to replicate an object of type '%s'"), 
+	error(_("attempt to replicate an object of type '%s'"),
 	      type2char(TYPEOF(s)));
 
     nc = xlength(ncopy); // might be 0
-    if (nc == xlength(s)) 
+    if (nc == xlength(s))
 	PROTECT(a = rep2(s, ncopy));
     else {
 	if (nc != 1) error(_("invalid '%s' value"), "times");
-	
-#ifdef LONG_VECTOR_SUPPORT
-	double snc = asReal(ncopy);
-	if (!R_FINITE(snc) || snc < 0)
+
+	R_xlen_t ns = xlength(s);
+	if (TYPEOF(ncopy) != INTSXP) {
+	    double snc = asReal(ncopy);
+	    if (!R_FINITE(snc) || snc <= -1. ||
+		(ns > 0 && snc >= R_XLEN_T_MAX + 1.))
+		error(_("invalid '%s' value"), "times");
+	    nc = ns == 0 ? 1 : (R_xlen_t) snc;
+	} else if ((nc = asInteger(ncopy)) == NA_INTEGER || nc < 0) // nc = 0 ok
 	    error(_("invalid '%s' value"), "times");
-	nc = (R_xlen_t) snc;
-#else
-	if ((nc = asInteger(ncopy)) == NA_INTEGER || nc < 0)/* nc = 0 ok */
+	if ((double) nc * ns > R_XLEN_T_MAX)
 	    error(_("invalid '%s' value"), "times");
-#endif
-	R_xlen_t ns = xlength(s);
 	PROTECT(a = rep3(s, ns, nc * ns));
     }
 
@@ -389,15 +416,14 @@ SEXP attribute_hidden do_rep_len(SEXP call, SEXP op, SEXP args, SEXP rho)
     len = CADR(args);
     if(length(len) != 1)
 	error(_("invalid '%s' value"), "length.out");
-#ifdef LONG_VECTOR_SUPPORT
-    double sna = asReal(len);
-    if (!R_FINITE(sna) || sna < 0)
-	error(_("invalid '%s' value"), "length.out");
-    na = (R_xlen_t) sna;
-#else
-    if ((na = asInteger(len)) == NA_INTEGER || na < 0) /* na = 0 ok */
-	error(_("invalid '%s' value"), "length.out");
-#endif
+    if (TYPEOF(len) != INTSXP) {
+	double sna = asReal(len);
+	if (ISNAN(sna) || sna <= -1. || sna >= R_XLEN_T_MAX + 1.)
+	    error(_("invalid '%s' value"), "length.out");
+	na = (R_xlen_t) sna;
+    } else
+	if ((na = asInteger(len)) == NA_INTEGER || na < 0) /* na = 0 ok */
+	    error(_("invalid '%s' value"), "length.out");
 
     if (TYPEOF(s) == NILSXP && na > 0)
 	error(_("cannot replicate NULL to a non-zero length"));
@@ -433,8 +459,9 @@ SEXP attribute_hidden do_rep_len(SEXP call, SEXP op, SEXP args, SEXP rho)
     return a;
 }
 
-/* rep(), allowing for both times and each */
-static SEXP rep4(SEXP x, SEXP times, R_xlen_t len, int each, R_xlen_t nt)
+/* rep(), allowing for both times and each ;
+ * -----  nt == length(times) ;  if (nt == 1)  'times' is *not* accessed  */
+static SEXP rep4(SEXP x, SEXP times, R_xlen_t len, R_xlen_t each, R_xlen_t nt)
 {
     SEXP a;
     R_xlen_t lx = xlength(x);
@@ -445,134 +472,140 @@ static SEXP rep4(SEXP x, SEXP times, R_xlen_t len, int each, R_xlen_t nt)
 
     PROTECT(a = allocVector(TYPEOF(x), len));
 
-    switch (TYPEOF(x)) {
-    case LGLSXP:
-	if(nt == 1)
+#define R4_SWITCH_LOOP(itimes)						\
+    switch (TYPEOF(x)) {						\
+    case LGLSXP:							\
+	for(i = 0, k = 0, k2 = 0; i < lx; i++) {			\
+	    /*		if ((i+1) % NINTERRUPT == 0) R_CheckUserInterrupt();*/ \
+	    for(j = 0, sum = 0; j < each; j++) sum += (R_xlen_t) itimes[k++]; \
+	    for(k3 = 0; k3 < sum; k3++) {				\
+		LOGICAL(a)[k2++] = LOGICAL(x)[i];			\
+		if(k2 == len) goto done;				\
+	    }								\
+	}								\
+	break;								\
+    case INTSXP:							\
+	for(i = 0, k = 0, k2 = 0; i < lx; i++) {			\
+	    /*		if ((i+1) % NINTERRUPT == 0) R_CheckUserInterrupt();*/ \
+	    for(j = 0, sum = 0; j < each; j++) sum += (R_xlen_t) itimes[k++]; \
+	    for(k3 = 0; k3 < sum; k3++) {				\
+		INTEGER(a)[k2++] = INTEGER(x)[i];			\
+		if(k2 == len) goto done;				\
+	    }								\
+	}								\
+	break;								\
+    case REALSXP:							\
+	for(i = 0, k = 0, k2 = 0; i < lx; i++) {			\
+	    /*		if ((i+1) % NINTERRUPT == 0) R_CheckUserInterrupt();*/ \
+	    for(j = 0, sum = 0; j < each; j++) sum += (R_xlen_t) itimes[k++]; \
+	    for(k3 = 0; k3 < sum; k3++) {				\
+		REAL(a)[k2++] = REAL(x)[i];				\
+		if(k2 == len) goto done;				\
+	    }								\
+	}								\
+	break;								\
+    case CPLXSXP:							\
+	for(i = 0, k = 0, k2 = 0; i < lx; i++) {			\
+	    /*		if ((i+1) % NINTERRUPT == 0) R_CheckUserInterrupt();*/ \
+	    for(j = 0, sum = 0; j < each; j++) sum += (R_xlen_t) itimes[k++]; \
+	    for(k3 = 0; k3 < sum; k3++) {				\
+		COMPLEX(a)[k2++] = COMPLEX(x)[i];			\
+		if(k2 == len) goto done;				\
+	    }								\
+	}								\
+	break;								\
+    case STRSXP:							\
+	for(i = 0, k = 0, k2 = 0; i < lx; i++) {			\
+	    /*		if ((i+1) % NINTERRUPT == 0) R_CheckUserInterrupt();*/ \
+	    for(j = 0, sum = 0; j < each; j++) sum += (R_xlen_t) itimes[k++]; \
+	    for(k3 = 0; k3 < sum; k3++) {				\
+		SET_STRING_ELT(a, k2++, STRING_ELT(x, i));		\
+		if(k2 == len) goto done;				\
+	    }								\
+	}								\
+	break;								\
+    case VECSXP:							\
+    case EXPRSXP:							\
+	for(i = 0, k = 0, k2 = 0; i < lx; i++) {			\
+	    /*		if ((i+1) % NINTERRUPT == 0) R_CheckUserInterrupt();*/ \
+	    for(j = 0, sum = 0; j < each; j++) sum += (R_xlen_t) itimes[k++]; \
+	    for(k3 = 0; k3 < sum; k3++) {				\
+		SET_VECTOR_ELT(a, k2++, VECTOR_ELT(x, i));		\
+		if(k2 == len) goto done;				\
+	    }								\
+	}								\
+	break;								\
+    case RAWSXP:							\
+	for(i = 0, k = 0, k2 = 0; i < lx; i++) {			\
+	    /*		if ((i+1) % NINTERRUPT == 0) R_CheckUserInterrupt();*/ \
+	    for(j = 0, sum = 0; j < each; j++) sum += (R_xlen_t) itimes[k++]; \
+	    for(k3 = 0; k3 < sum; k3++) {				\
+		RAW(a)[k2++] = RAW(x)[i];				\
+		if(k2 == len) goto done;				\
+	    }								\
+	}								\
+	break;								\
+    default:								\
+	UNIMPLEMENTED_TYPE("rep4", x);					\
+    }
+
+    if(nt == 1)
+	switch (TYPEOF(x)) {
+	case LGLSXP:
 	    for(i = 0; i < len; i++) {
 //		if ((i+1) % NINTERRUPT == 0) R_CheckUserInterrupt();
 		LOGICAL(a)[i] = LOGICAL(x)[(i/each) % lx];
 	    }
-	else {
-	    for(i = 0, k = 0, k2 = 0; i < lx; i++) {
-//		if ((i+1) % NINTERRUPT == 0) R_CheckUserInterrupt();
-		for(j = 0, sum = 0; j < each; j++) sum += INTEGER(times)[k++];
-		for(k3 = 0; k3 < sum; k3++) {
-		    LOGICAL(a)[k2++] = LOGICAL(x)[i];
-		    if(k2 == len) goto done;
-		}
-	    }
-	}
-	break;
-    case INTSXP:
-	if(nt == 1)
+	    break;
+	case INTSXP:
 	    for(i = 0; i < len; i++) {
 //		if ((i+1) % NINTERRUPT == 0) R_CheckUserInterrupt();
 		INTEGER(a)[i] = INTEGER(x)[(i/each) % lx];
 	    }
-	else {
-	    for(i = 0, k = 0, k2 = 0; i < lx; i++) {
-//		if ((i+1) % NINTERRUPT == 0) R_CheckUserInterrupt();
-		for(j = 0, sum = 0; j < each; j++) sum += INTEGER(times)[k++];
-		for(k3 = 0; k3 < sum; k3++) {
-		    INTEGER(a)[k2++] = INTEGER(x)[i];
-		    if(k2 == len) goto done;
-		}
-	    }
-	}
-	break;
-    case REALSXP:
-	if(nt == 1)
+	    break;
+	case REALSXP:
 	    for(i = 0; i < len; i++) {
 //		if ((i+1) % NINTERRUPT == 0) R_CheckUserInterrupt();
 		REAL(a)[i] = REAL(x)[(i/each) % lx];
 	    }
-	else {
-	    for(i = 0, k = 0, k2 = 0; i < lx; i++) {
-//		if ((i+1) % NINTERRUPT == 0) R_CheckUserInterrupt();
-		for(j = 0, sum = 0; j < each; j++) sum += INTEGER(times)[k++];
-		for(k3 = 0; k3 < sum; k3++) {
-		    REAL(a)[k2++] = REAL(x)[i];
-		    if(k2 == len) goto done;
-		}
-	    }
-	}
-	break;
-    case CPLXSXP:
-	if(nt == 1)
+	    break;
+	case CPLXSXP:
 	    for(i = 0; i < len; i++) {
 //		if ((i+1) % NINTERRUPT == 0) R_CheckUserInterrupt();
 		COMPLEX(a)[i] = COMPLEX(x)[(i/each) % lx];
 	    }
-	else {
-	    for(i = 0, k = 0, k2 = 0; i < lx; i++) {
-//		if ((i+1) % NINTERRUPT == 0) R_CheckUserInterrupt();
-		for(j = 0, sum = 0; j < each; j++) sum += INTEGER(times)[k++];
-		for(k3 = 0; k3 < sum; k3++) {
-		    COMPLEX(a)[k2++] = COMPLEX(x)[i];
-		    if(k2 == len) goto done;
-		}
-	    }
-	}
-	break;
-    case STRSXP:
-	if(nt == 1)
+	    break;
+	case STRSXP:
 	    for(i = 0; i < len; i++) {
 //		if ((i+1) % NINTERRUPT == 0) R_CheckUserInterrupt();
 		SET_STRING_ELT(a, i, STRING_ELT(x, (i/each) % lx));
 	    }
-	else {
-	    for(i = 0, k = 0, k2 = 0; i < lx; i++) {
-//		if ((i+1) % NINTERRUPT == 0) R_CheckUserInterrupt();
-		for(j = 0, sum = 0; j < each; j++) sum += INTEGER(times)[k++];
-		for(k3 = 0; k3 < sum; k3++) {
-		    SET_STRING_ELT(a, k2++, STRING_ELT(x, i));
-		    if(k2 == len) goto done;
-		}
-	    }
-	}
-	break;
-    case VECSXP:
-    case EXPRSXP:
-	if(nt == 1)
+	    break;
+	case VECSXP:
+	case EXPRSXP:
 	    for(i = 0; i < len; i++) {
 //		if ((i+1) % NINTERRUPT == 0) R_CheckUserInterrupt();
 		SET_VECTOR_ELT(a, i, VECTOR_ELT(x, (i/each) % lx));
 	    }
-	else {
-	    for(i = 0, k = 0, k2 = 0; i < lx; i++) {
-//		if ((i+1) % NINTERRUPT == 0) R_CheckUserInterrupt();
-		for(j = 0, sum = 0; j < each; j++) sum += INTEGER(times)[k++];
-		for(k3 = 0; k3 < sum; k3++) {
-		    SET_VECTOR_ELT(a, k2++, VECTOR_ELT(x, i));
-		    if(k2 == len) goto done;
-		}
-	    }
-	}
-	break;
-    case RAWSXP:
-	if(nt == 1)
+	    break;
+	case RAWSXP:
 	    for(i = 0; i < len; i++) {
 //		if ((i+1) % NINTERRUPT == 0) R_CheckUserInterrupt();
 		RAW(a)[i] = RAW(x)[(i/each) % lx];
 	    }
-	else {
-	    for(i = 0, k = 0, k2 = 0; i < lx; i++) {
-//		if ((i+1) % NINTERRUPT == 0) R_CheckUserInterrupt();
-		for(j = 0, sum = 0; j < each; j++) sum += INTEGER(times)[k++];
-		for(k3 = 0; k3 < sum; k3++) {
-		    RAW(a)[k2++] = RAW(x)[i];
-		    if(k2 == len) goto done;
-		}
-	    }
+	    break;
+	default:
+	    UNIMPLEMENTED_TYPE("rep4", x);
 	}
-	break;
-    default:
-	UNIMPLEMENTED_TYPE("rep4", x);
-    }
-done:
-    UNPROTECT(1);
+    else if(TYPEOF(times) == REALSXP)
+	R4_SWITCH_LOOP(REAL(times))
+	else
+	    R4_SWITCH_LOOP(INTEGER(times))
+		done:
+	    UNPROTECT(1);
     return a;
 }
+#undef R4_SWITCH_LOOP
 
 /* We are careful to use evalListKeepMissing here (inside
    DispatchOrEval) to avoid dropping missing arguments so e.g.
@@ -581,9 +614,9 @@ done:
 /* This is a primitive SPECIALSXP with internal argument matching */
 SEXP attribute_hidden do_rep(SEXP call, SEXP op, SEXP args, SEXP rho)
 {
-    SEXP ans, x, ap, times = R_NilValue /* -Wall */;
-    int each = 1, nprotect = 4;
-    R_xlen_t i, lx, len = NA_INTEGER, nt;
+    SEXP ans, x, times = R_NilValue;
+    R_xlen_t i, lx, len = NA_INTEGER, each = 1, nt;
+    static SEXP do_rep_formals = NULL;
 
     /* includes factors, POSIX[cl]t, Date */
     if (DispatchOrEval(call, op, "rep", args, rho, &ans, 0, 0))
@@ -596,14 +629,11 @@ SEXP attribute_hidden do_rep(SEXP call, SEXP op, SEXP args, SEXP rho)
        so we manage the argument matching ourselves.  We pretend this is
        rep(x, times, length.out, each, ...)
     */
-    PROTECT(ap = CONS(R_NilValue,
-		      list4(R_NilValue, R_NilValue, R_NilValue, R_NilValue)));
-    SET_TAG(ap, install("x"));
-    SET_TAG(CDR(ap), install("times"));
-    SET_TAG(CDDR(ap), install("length.out"));
-    SET_TAG(CDR(CDDR(ap)), install("each"));
-    SET_TAG(CDDR(CDDR(ap)), R_DotsSymbol);
-    PROTECT(args = matchArgs(ap, args, call));
+    if (do_rep_formals == NULL)
+	do_rep_formals = allocFormalsList5(install("x"), install("times"),
+					   install("length.out"),
+					   install("each"), R_DotsSymbol);
+    PROTECT(args = matchArgs(do_rep_formals, args, call));
 
     x = CAR(args);
     /* supported in R 2.15.x */
@@ -612,34 +642,46 @@ SEXP attribute_hidden do_rep(SEXP call, SEXP op, SEXP args, SEXP rho)
 
     lx = xlength(x);
 
-    double slen = asReal(CADDR(args));
-    if (R_FINITE(slen)) {
-	if(slen < 0)
-	    errorcall(call, _("invalid '%s' argument"), "length.out");
-	len = (R_xlen_t) slen;
+    if (TYPEOF(CADDR(args)) != INTSXP) {
+	double slen = asReal(CADDR(args));
+	if (R_FINITE(slen)) {
+	    if (slen <= -1 || slen >= R_XLEN_T_MAX+1.0)
+		errorcall(call, _("invalid '%s' argument"), "length.out");
+	    len = (R_xlen_t) slen;
+	} else
+	    len = NA_INTEGER;
     } else {
 	len = asInteger(CADDR(args));
 	if(len != NA_INTEGER && len < 0)
 	    errorcall(call, _("invalid '%s' argument"), "length.out");
     }
     if(length(CADDR(args)) != 1)
-	warningcall(call, _("first element used of '%s' argument"), 
+	warningcall(call, _("first element used of '%s' argument"),
 		    "length.out");
 
-    each = asInteger(CADDDR(args));
-    if(each != NA_INTEGER && each < 0)
-	errorcall(call, _("invalid '%s' argument"), "each");
+    if (TYPEOF(CADDDR(args)) != INTSXP) {
+	double seach = asReal(CADDDR(args));
+	if (R_FINITE(seach)) {
+	    if (seach <= -1. || (lx > 0 && seach >= R_XLEN_T_MAX + 1.))
+		errorcall(call, _("invalid '%s' argument"), "each");
+	    each = lx == 0 ? NA_INTEGER : (R_xlen_t) seach;
+	} else each = NA_INTEGER;
+    } else {
+	each = asInteger(CADDDR(args));
+	if(each != NA_INTEGER && each < 0)
+	    errorcall(call, _("invalid '%s' argument"), "each");
+    }
     if(length(CADDDR(args)) != 1)
 	warningcall(call, _("first element used of '%s' argument"), "each");
     if(each == NA_INTEGER) each = 1;
 
     if(lx == 0) {
-	if(len > 0 && x == R_NilValue) 
+	if(len > 0 && x == R_NilValue)
 	    warningcall(call, "'x' is NULL so the result will be NULL");
 	SEXP a;
 	PROTECT(a = duplicate(x));
 	if(len != NA_INTEGER && len > 0) a = xlengthgets(a, len);
-	UNPROTECT(4);
+	UNPROTECT(3);
 	return a;
     }
     if (!isVector(x))
@@ -649,40 +691,68 @@ SEXP attribute_hidden do_rep(SEXP call, SEXP op, SEXP args, SEXP rho)
     /* So now we know x is a vector of positive length.  We need to
        replicate it, and its names if it has them. */
 
+    int nprotect = 2;
     /* First find the final length using 'times' and 'each' */
     if(len != NA_INTEGER) { /* takes precedence over times */
 	nt = 1;
     } else {
-	R_xlen_t sum = 0;
-	if(CADR(args) == R_MissingArg) PROTECT(times = ScalarInteger(1));
+	double sum = 0;
+	if(CADR(args) == R_MissingArg)
+	    PROTECT(times = ScalarInteger(1));
+#ifdef LONG_VECTOR_SUPPORT
+	else if(TYPEOF(CADR(args)) != INTSXP)
+#else
+	else if(TYPEOF(CADR(args)) == REALSXP)
+#endif
+	    PROTECT(times = coerceVector(CADR(args), REALSXP));
 	else PROTECT(times = coerceVector(CADR(args), INTSXP));
 	nprotect++;
 	nt = XLENGTH(times);
-	if(nt != 1 && nt != lx * each)
-	    errorcall(call, _("invalid '%s' argument"), "times");
 	if(nt == 1) {
-	    int it = INTEGER(times)[0];
-	    if (it == NA_INTEGER || it < 0)
-		errorcall(call, _("invalid '%s' argument"), "times");
-	    len = lx * it * each;
-	} else {
-	    for(i = 0; i < nt; i++) {
-		int it = INTEGER(times)[i];
+	    R_xlen_t it;
+	    if (TYPEOF(times) == REALSXP) {
+		double rt = REAL(times)[0];
+		if (ISNAN(rt) || rt <= -1 || rt >= R_XLEN_T_MAX+1.0)
+		    errorcall(call, _("invalid '%s' argument"), "times");
+		it = (R_xlen_t) rt;
+	    } else {
+		it = INTEGER(times)[0];
 		if (it == NA_INTEGER || it < 0)
 		    errorcall(call, _("invalid '%s' argument"), "times");
-		sum += it;
 	    }
-            len = sum;
+	    if ((double) lx * it * each > R_XLEN_T_MAX)
+		errorcall(call, _("invalid '%s' argument"), "times");
+	    len = lx * it * each;
+	} else { // nt != 1
+	    if(nt != (double) lx * each)
+		errorcall(call, _("invalid '%s' argument"), "times");
+	    if (TYPEOF(times) == REALSXP)
+		for(i = 0; i < nt; i++) {
+		    double rt = REAL(times)[i];
+		    if (ISNAN(rt) || rt <= -1 || rt >= R_XLEN_T_MAX+1.0)
+			errorcall(call, _("invalid '%s' argument"), "times");
+		    sum += (R_xlen_t) rt;
+		}
+	    else
+		for(i = 0; i < nt; i++) {
+		    int it = INTEGER(times)[i];
+		    if (it == NA_INTEGER || it < 0)
+			errorcall(call, _("invalid '%s' argument"), "times");
+		    sum += it;
+		}
+	    if (sum > R_XLEN_T_MAX)
+		errorcall(call, _("invalid '%s' argument"), "times");
+	    len = (R_xlen_t) sum;
 	}
     }
 
     if(len > 0 && each == 0)
 	errorcall(call, _("invalid '%s' argument"), "each");
 
-    SEXP xn = getAttrib(x, R_NamesSymbol);
+    SEXP xn = PROTECT(getAttrib(x, R_NamesSymbol));  nprotect++;
+    PROTECT(ans = rep4(x, times, len, each, nt));    nprotect++;
 
-    PROTECT(ans = rep4(x, times, len, each, nt));
-    if (length(xn) > 0)
+    if (xlength(xn) > 0)
 	setAttrib(ans, R_NamesSymbol, rep4(xn, times, len, each, nt));
 
 #ifdef _S4_rep_keepClass
@@ -698,21 +768,20 @@ SEXP attribute_hidden do_rep(SEXP call, SEXP op, SEXP args, SEXP rho)
 
 /*
   This is a primitive SPECIALSXP with internal argument matching,
-  implementing seq.int.
+  implementing seq.int().
 
    'along' has to be used on an unevaluated argument, and evalList
    tries to evaluate language objects.
  */
-
 #define FEPS 1e-10
-#define myabs(x) (x < 0 ? x : -x)
 /* to match seq.default */
 SEXP attribute_hidden do_seq(SEXP call, SEXP op, SEXP args, SEXP rho)
 {
-    SEXP ans = R_NilValue /* -Wall */, ap, tmp, from, to, by, len, along;
+    SEXP ans = R_NilValue /* -Wall */, from, to, by, len, along;
     int nargs = length(args), lf;
-    Rboolean One = nargs == 1;
+    Rboolean One = (nargs == 1);
     R_xlen_t i, lout = NA_INTEGER;
+    static SEXP do_seq_formals = NULL;
 
     if (DispatchOrEval(call, op, "seq", args, rho, &ans, 0, 1))
 	return(ans);
@@ -721,31 +790,27 @@ SEXP attribute_hidden do_seq(SEXP call, SEXP op, SEXP args, SEXP rho)
        We pretend this is
        seq(from, to, by, length.out, along.with, ...)
     */
-    PROTECT(ap = CONS(R_NilValue,
-		      CONS(R_NilValue,
-			   list4(R_NilValue, R_NilValue, R_NilValue,
-				 R_NilValue))));
-    tmp = ap;
-    SET_TAG(tmp, install("from")); tmp = CDR(tmp);
-    SET_TAG(tmp, install("to")); tmp = CDR(tmp);
-    SET_TAG(tmp, install("by")); tmp = CDR(tmp);
-    SET_TAG(tmp, install("length.out")); tmp = CDR(tmp);
-    SET_TAG(tmp, install("along.with")); tmp = CDR(tmp);
-    SET_TAG(tmp, R_DotsSymbol);
-    PROTECT(args = matchArgs(ap, args, call));
+    if (do_seq_formals == NULL)
+	do_seq_formals = allocFormalsList6(install("from"), install("to"),
+					   install("by"), install("length.out"),
+					   install("along.with"), R_DotsSymbol);
+    PROTECT(args = matchArgs(do_seq_formals, args, call));
 
     from = CAR(args); args = CDR(args);
-    to = CAR(args); args = CDR(args);
-    by = CAR(args); args = CDR(args);
-    len = CAR(args); args = CDR(args);
-    along = CAR(args);
-
-    if(One && from != R_MissingArg) {
+    to   = CAR(args); args = CDR(args);
+    by   = CAR(args); args = CDR(args);
+    len  = CAR(args); args = CDR(args);
+    along= CAR(args);
+    Rboolean
+	miss_from = (from == R_MissingArg),
+	miss_to   = (to   == R_MissingArg);
+
+    if(One && !miss_from) {
 	lf = length(from);
 	if(lf == 1 && (TYPEOF(from) == INTSXP || TYPEOF(from) == REALSXP)) {
 	    double rfrom = asReal(from);
 	    if (!R_FINITE(rfrom))
-		errorcall(call, "'from' cannot be NA, NaN or infinite");
+		errorcall(call, _("'%s' must be a finite number"), "from");
 	    ans = seq_colon(1.0, rfrom, call);
 	}
 	else if (lf)
@@ -765,47 +830,48 @@ SEXP attribute_hidden do_seq(SEXP call, SEXP op, SEXP args, SEXP rho)
 	if(ISNAN(rout) || rout <= -0.5)
 	    errorcall(call, _("'length.out' must be a non-negative number"));
 	if(length(len) != 1)
-	    warningcall(call, _("first element used of '%s' argument"), 
+	    warningcall(call, _("first element used of '%s' argument"),
 			"length.out");
 	lout = (R_xlen_t) ceil(rout);
     }
 
     if(lout == NA_INTEGER) {
-	double rfrom = asReal(from), rto = asReal(to), rby = asReal(by), *ra;
-	if(from == R_MissingArg) rfrom = 1.0;
-	else if(length(from) != 1) error("'from' must be of length 1");
-	if(to == R_MissingArg) rto = 1.0;
-	else if(length(to) != 1) error("'to' must be of length 1");
-	if (!R_FINITE(rfrom))
-	    errorcall(call, "'from' cannot be NA, NaN or infinite");
-	if (!R_FINITE(rto))
-	    errorcall(call, "'to' cannot be NA, NaN or infinite");
-	if(by == R_MissingArg)
-	    ans = seq_colon(rfrom, rto, call);
+	double rfrom, rto, rby = asReal(by);
+	if(miss_from) rfrom = 1.0;
 	else {
-	    if(length(by) != 1) error("'by' must be of length 1");
-	    double del = rto - rfrom, n, dd;
-	    R_xlen_t nn;
+	    if(length(from) != 1) errorcall(call, _("'%s' must be of length 1"), "from");
+	    rfrom = asReal(from);
 	    if(!R_FINITE(rfrom))
-		errorcall(call, _("'from' must be finite"));
+		errorcall(call, _("'%s' must be a finite number"), "from");
+	}
+	if(miss_to) rto = 1.0;
+	else {
+	    if(length(to) != 1) errorcall(call, _("'%s' must be of length 1"), "to");
+	    rto = asReal(to);
 	    if(!R_FINITE(rto))
-		errorcall(call, _("'to' must be finite"));
+		errorcall(call, _("'%s' must be a finite number"), "to");
+	}
+	if(by == R_MissingArg)
+	    ans = seq_colon(rfrom, rto, call);
+	else {
+	    if(length(by) != 1) errorcall(call, _("'%s' must be of length 1"), "by");
+	    double del = rto - rfrom;
 	    if(del == 0.0 && rto == 0.0) {
-		ans = to;
+		ans = to; // is *not* missing in this case
 		goto done;
 	    }
 	    /* printf("from = %f, to = %f, by = %f\n", rfrom, rto, rby); */
-	    n = del/rby;
+	    double n = del/rby;
 	    if(!R_FINITE(n)) {
 		if(del == 0.0 && rby == 0.0) {
-		    ans = from;
+		    ans = miss_from ? ScalarReal(rfrom) : from;
 		    goto done;
 		} else
-		    errorcall(call, _("invalid '(to - from)/by' in 'seq'"));
+		    errorcall(call, _("invalid '(to - from)/by'"));
 	    }
-	    dd = fabs(del)/fmax2(fabs(rto), fabs(rfrom));
+	    double dd = fabs(del)/fmax2(fabs(rto), fabs(rfrom));
 	    if(dd < 100 * DBL_EPSILON) {
-		ans = from;
+		ans = miss_from ? ScalarReal(rfrom) : from;
 		goto done;
 	    }
 #ifdef LONG_VECTOR_SUPPORT
@@ -816,10 +882,13 @@ SEXP attribute_hidden do_seq(SEXP call, SEXP op, SEXP args, SEXP rho)
 		errorcall(call, _("'by' argument is much too small"));
 	    if(n < - FEPS)
 		errorcall(call, _("wrong sign in 'by' argument"));
-	    if(TYPEOF(from) == INTSXP &&
-	       TYPEOF(to) == INTSXP &&
+
+	    R_xlen_t nn;
+	    if((miss_from || TYPEOF(from) == INTSXP) &&
+	       (miss_to   || TYPEOF(to)   == INTSXP) &&
 	       TYPEOF(by) == INTSXP) {
-		int *ia, ifrom = asInteger(from), iby = asInteger(by);
+		int *ia, ifrom = miss_from ? (int)rfrom : asInteger(from),
+		    iby = asInteger(by);
 		/* With the current limits on integers and FEPS
 		   reduced below 1/INT_MAX this is the same as the
 		   next, so this is future-proofing against longer integers.
@@ -835,7 +904,7 @@ SEXP attribute_hidden do_seq(SEXP call, SEXP op, SEXP args, SEXP rho)
 	    } else {
 		nn = (int)(n + FEPS);
 		ans = allocVector(REALSXP, nn+1);
-		ra = REAL(ans);
+		double *ra = REAL(ans);
 		for(i = 0; i <= nn; i++)
 		    ra[i] = rfrom + (double)i * rby;
 		/* Added in 2.9.0 */
@@ -848,14 +917,27 @@ SEXP attribute_hidden do_seq(SEXP call, SEXP op, SEXP args, SEXP rho)
 	ans = allocVector(INTSXP, 0);
     } else if (One) {
 	ans = seq_colon(1.0, (double)lout, call);
-    } else if (by == R_MissingArg) {
-	double rfrom = asReal(from), rto = asReal(to), rby;
-	if(to == R_MissingArg) rto = rfrom + (double)lout - 1;
-	if(from == R_MissingArg) rfrom = rto - (double)lout + 1;
-	if(!R_FINITE(rfrom))
-	    errorcall(call, _("'from' must be finite"));
-	if(!R_FINITE(rto))
-	    errorcall(call, _("'to' must be finite"));
+    } else if (by == R_MissingArg) { // and  len := length.out  specified
+	double rfrom = asReal(from), rto = asReal(to), rby = 0; // -Wall
+	if(miss_to)   rto   = rfrom + (double)lout - 1;
+	if(miss_from) rfrom = rto   - (double)lout + 1;
+	if(!R_FINITE(rfrom)) errorcall(call, _("'%s' must be a finite number"), "from");
+	if(!R_FINITE(rto))   errorcall(call, _("'%s' must be a finite number"), "to");
+	if(lout > 2) rby = (rto - rfrom)/(double)(lout - 1);
+	if(rfrom == (int)rfrom &&
+	   (lout <= 1 || rto == (int)rto) &&
+	   (lout <= 2 || rby == (int)rby) &&
+	   rfrom <= INT_MAX && rfrom >= INT_MIN &&
+	   rto   <= INT_MAX && rto   >= INT_MIN) {
+	    ans = allocVector(INTSXP, lout);
+	    if(lout > 0) INTEGER(ans)[0] = (int)rfrom;
+	    if(lout > 1) INTEGER(ans)[lout - 1] = (int)rto;
+	    if(lout > 2)
+		for(i = 1; i < lout-1; i++) {
+//		    if ((i+1) % NINTERRUPT == 0) R_CheckUserInterrupt();
+		    INTEGER(ans)[i] = (int)(rfrom + (double)i*rby);
+		}
+	} else {
 	ans = allocVector(REALSXP, lout);
 	if(lout > 0) REAL(ans)[0] = rfrom;
 	if(lout > 1) REAL(ans)[lout - 1] = rto;
@@ -866,13 +948,12 @@ SEXP attribute_hidden do_seq(SEXP call, SEXP op, SEXP args, SEXP rho)
 		REAL(ans)[i] = rfrom + (double)i*rby;
 	    }
 	}
-    } else if (to == R_MissingArg) {
+	}
+    } else if (miss_to) {
 	double rfrom = asReal(from), rby = asReal(by), rto;
-	if(from == R_MissingArg) rfrom = 1.0;
-	if(!R_FINITE(rfrom))
-	    errorcall(call, _("'from' must be finite"));
-	if(!R_FINITE(rby))
-	    errorcall(call, _("'by' must be finite"));
+	if(miss_from) rfrom = 1.0;
+	if(!R_FINITE(rfrom)) errorcall(call, _("'%s' must be a finite number"), "from");
+	if(!R_FINITE(rby))   errorcall(call, _("'%s' must be a finite number"), "by");
 	rto = rfrom + (double)(lout-1)*rby;
 	if(rby == (int)rby && rfrom <= INT_MAX && rfrom >= INT_MIN
 	   && rto <= INT_MAX && rto >= INT_MIN) {
@@ -888,13 +969,11 @@ SEXP attribute_hidden do_seq(SEXP call, SEXP op, SEXP args, SEXP rho)
 		REAL(ans)[i] = rfrom + (double)i*rby;
 	    }
 	}
-    } else if (from == R_MissingArg) {
+    } else if (miss_from) {
 	double rto = asReal(to), rby = asReal(by),
 	    rfrom = rto - (double)(lout-1)*rby;
-	if(!R_FINITE(rto))
-	    errorcall(call, _("'to' must be finite"));
-	if(!R_FINITE(rby))
-	    errorcall(call, _("'by' must be finite"));
+	if(!R_FINITE(rto)) errorcall(call, _("'%s' must be a finite number"), "to");
+	if(!R_FINITE(rby)) errorcall(call, _("'%s' must be a finite number"), "by");
 	if(rby == (int)rby && rfrom <= INT_MAX && rfrom >= INT_MIN
 	   && rto <= INT_MAX && rto >= INT_MIN) {
 	    ans = allocVector(INTSXP, lout);
@@ -913,7 +992,7 @@ SEXP attribute_hidden do_seq(SEXP call, SEXP op, SEXP args, SEXP rho)
 	errorcall(call, _("too many arguments"));
 
 done:
-    UNPROTECT(2);
+    UNPROTECT(1);
     return ans;
 }
 
@@ -995,7 +1074,7 @@ SEXP attribute_hidden do_seq_len(SEXP call, SEXP op, SEXP args, SEXP rho)
 	ans = allocVector(REALSXP, len);
 	double *p = REAL(ans);
 	for(R_xlen_t i = 0; i < len; i++) {
-//	    if ((i+1) % NINTERRUPT == 0) R_CheckUserInterrupt();	    
+//	    if ((i+1) % NINTERRUPT == 0) R_CheckUserInterrupt();
 	    p[i] = (double) (i+1);
 	}
     } else
diff --git a/src/main/serialize.c b/src/main/serialize.c
index c28a652..29434ac 100644
--- a/src/main/serialize.c
+++ b/src/main/serialize.c
@@ -1,6 +1,6 @@
 /*
  *  R : A Computer Language for Statistical Data Analysis
- *  Copyright (C) 1995--2013  The R Core Team
+ *  Copyright (C) 1995--2015  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
@@ -14,7 +14,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  */
 
 /* <UTF8> byte-level access is only to compare with chars <= 0x7F */
@@ -33,6 +33,9 @@
 #include <errno.h>
 #include <ctype.h>		/* for isspace */
 #include <stdarg.h>
+#ifdef Win32
+#include <trioremap.h>
+#endif
 
 /* From time to time changes in R, such as the addition of a new SXP,
  * may require changes in the save file format.  Here are some
@@ -190,7 +193,7 @@ static int Rsnprintf(char *buf, int size, const char *format, ...)
     int val;
     va_list(ap);
     va_start(ap, format);
-    /* On Windows this uses the non-C99 MSVCRT.dll version, which is OK */
+    /* On Windows this no longer uses the non-C99 MSVCRT.dll version */
     val = vsnprintf(buf, size, format, ap);
     buf[size-1] = '\0';
     va_end(ap);
@@ -207,6 +210,7 @@ static void OutInteger(R_outpstream_t stream, int i)
     char buf[128];
     switch (stream->type) {
     case R_pstream_ascii_format:
+    case R_pstream_asciihex_format:
 	if (i == NA_INTEGER)
 	    Rsnprintf(buf, sizeof(buf), "NA\n");
 	else
@@ -231,8 +235,10 @@ static void OutReal(R_outpstream_t stream, double d)
     switch (stream->type) {
     case R_pstream_ascii_format:
 	if (! R_FINITE(d)) {
-	    if (ISNAN(d))
+	    if (ISNA(d))
 		Rsnprintf(buf, sizeof(buf), "NA\n");
+	    else if (ISNAN(d))
+		Rsnprintf(buf, sizeof(buf), "NaN\n");
 	    else if (d < 0)
 		Rsnprintf(buf, sizeof(buf), "-Inf\n");
 	    else
@@ -243,6 +249,21 @@ static void OutReal(R_outpstream_t stream, double d)
 	    Rsnprintf(buf, sizeof(buf), "%.16g\n", d);
 	stream->OutBytes(stream, buf, (int)strlen(buf));
 	break;
+    case R_pstream_asciihex_format:
+	if (! R_FINITE(d)) {
+	    if (ISNA(d))
+		Rsnprintf(buf, sizeof(buf), "NA\n");
+	    else if (ISNAN(d))
+		Rsnprintf(buf, sizeof(buf), "NaN\n");
+	    else if (d < 0)
+		Rsnprintf(buf, sizeof(buf), "-Inf\n");
+	    else
+		Rsnprintf(buf, sizeof(buf), "Inf\n");
+	}
+	else
+	    Rsnprintf(buf, sizeof(buf), "%a\n", d);
+	stream->OutBytes(stream, buf, (int)strlen(buf));
+	break;
     case R_pstream_binary_format:
 	stream->OutBytes(stream, &d, sizeof(double));
 	break;
@@ -266,6 +287,7 @@ static void OutByte(R_outpstream_t stream, Rbyte i)
     char buf[128];
     switch (stream->type) {
     case R_pstream_ascii_format:
+    case R_pstream_asciihex_format:
 	Rsnprintf(buf, sizeof(buf), "%02x\n", i);
 	stream->OutBytes(stream, buf, (int)strlen(buf));
 	break;
@@ -281,7 +303,8 @@ static void OutByte(R_outpstream_t stream, Rbyte i)
 /* This assumes CHARSXPs remain limited to 2^31-1 bytes */
 static void OutString(R_outpstream_t stream, const char *s, int length)
 {
-    if (stream->type == R_pstream_ascii_format) {
+    if (stream->type == R_pstream_ascii_format ||
+	stream->type == R_pstream_asciihex_format) {
 	int i;
 	char buf[128];
 	for (i = 0; i < length; i++) {
@@ -382,16 +405,20 @@ static double InReal(R_inpstream_t stream)
 	if(sscanf(word, "%s", buf) != 1) error(_("read error"));
 	if (strcmp(buf, "NA") == 0)
 	    return NA_REAL;
+	else if (strcmp(buf, "NaN") == 0)
+	    return R_NaN;
 	else if (strcmp(buf, "Inf") == 0)
 	    return R_PosInf;
 	else if (strcmp(buf, "-Inf") == 0)
 	    return R_NegInf;
 	else
+	    if(
 #ifdef Win32
-	    if(trio_sscanf(buf, "%lg", &d) != 1) error(_("read error"));
+		trio_sscanf(buf, "%lg", &d)
 #else
-	    if(sscanf(buf, "%lg", &d) != 1) error(_("read error"));
+		sscanf(buf, "%lg", &d)
 #endif
+		!= 1) error(_("read error"));
 	return d;
     case R_pstream_binary_format:
 	stream->InBytes(stream, &d, sizeof(double));
@@ -506,7 +533,9 @@ static void OutFormat(R_outpstream_t stream)
 	stream->type = R_pstream_xdr_format;
 	} */
     switch (stream->type) {
-    case R_pstream_ascii_format:  stream->OutBytes(stream, "A\n", 2); break;
+    case R_pstream_ascii_format:
+    case R_pstream_asciihex_format:
+	stream->OutBytes(stream, "A\n", 2); break;
     case R_pstream_binary_format: stream->OutBytes(stream, "B\n", 2); break;
     case R_pstream_xdr_format:    stream->OutBytes(stream, "X\n", 2); break;
     case R_pstream_any_format:
@@ -786,7 +815,7 @@ static void WriteLENGTH(R_outpstream_t stream, SEXP s)
 	OutInteger(stream, -1);
 	R_xlen_t len = XLENGTH(s);
 	OutInteger(stream, (int)(len / 4294967296L));
- 	OutInteger(stream, (int)(len % 4294967296L));
+	OutInteger(stream, (int)(len % 4294967296L));
    } else OutInteger(stream, LENGTH(s));
 #else
     OutInteger(stream, LENGTH(s));
@@ -818,13 +847,13 @@ static void OutStringVec(R_outpstream_t stream, SEXP s, SEXP ref_table)
 #define min2(a, b) ((a) < (b)) ? (a) : (b)
 
 
-static R_INLINE void 
-OutIntegerVec(R_outpstream_t stream, SEXP s, R_xlen_t length) 
+static R_INLINE void
+OutIntegerVec(R_outpstream_t stream, SEXP s, R_xlen_t length)
 {
     switch (stream->type) {
     case R_pstream_xdr_format:
     {
-        static char buf[CHUNK_SIZE * sizeof(int)];
+	static char buf[CHUNK_SIZE * sizeof(int)];
 	R_xlen_t done, this;
 	XDR xdrs;
 	for (done = 0; done < length; done += this) {
@@ -844,7 +873,7 @@ OutIntegerVec(R_outpstream_t stream, SEXP s, R_xlen_t length)
 	R_xlen_t done, this;
 	for (done = 0; done < length; done += this) {
 	    this = min2(CHUNK_SIZE, length - done);
-	    stream->OutBytes(stream, INTEGER(s) + done, 
+	    stream->OutBytes(stream, INTEGER(s) + done,
 			     (int)(sizeof(int) * this));
 	}
 	break;
@@ -855,16 +884,16 @@ OutIntegerVec(R_outpstream_t stream, SEXP s, R_xlen_t length)
     }
 }
 
-static R_INLINE void 
-OutRealVec(R_outpstream_t stream, SEXP s, R_xlen_t length) 
+static R_INLINE void
+OutRealVec(R_outpstream_t stream, SEXP s, R_xlen_t length)
 {
     switch (stream->type) {
     case R_pstream_xdr_format:
     {
-        static char buf[CHUNK_SIZE * sizeof(double)];
+	static char buf[CHUNK_SIZE * sizeof(double)];
 	R_xlen_t done, this;
 	XDR xdrs;
-        for (done = 0; done < length; done += this) {
+	for (done = 0; done < length; done += this) {
 	    this = min2(CHUNK_SIZE, length - done);
 	    xdrmem_create(&xdrs, buf, (int)(this * sizeof(double)), XDR_ENCODE);
 	    for(int cnt = 0; cnt < this; cnt++)
@@ -878,9 +907,9 @@ OutRealVec(R_outpstream_t stream, SEXP s, R_xlen_t length)
     case R_pstream_binary_format:
     {
 	R_xlen_t done, this;
-        for (done = 0; done < length; done += this) {
+	for (done = 0; done < length; done += this) {
 	    this = min2(CHUNK_SIZE, length - done);
-	    stream->OutBytes(stream, REAL(s) + done, 
+	    stream->OutBytes(stream, REAL(s) + done,
 			     (int)(sizeof(double) * this));
 	}
 	break;
@@ -891,22 +920,22 @@ OutRealVec(R_outpstream_t stream, SEXP s, R_xlen_t length)
     }
 }
 
-static R_INLINE void 
-OutComplexVec(R_outpstream_t stream, SEXP s, R_xlen_t length) 
+static R_INLINE void
+OutComplexVec(R_outpstream_t stream, SEXP s, R_xlen_t length)
 {
     switch (stream->type) {
     case R_pstream_xdr_format:
     {
-        static char buf[CHUNK_SIZE * sizeof(Rcomplex)];
+	static char buf[CHUNK_SIZE * sizeof(Rcomplex)];
 	R_xlen_t done, this;
 	XDR xdrs;
 	Rcomplex *c = COMPLEX(s);
-        for (done = 0; done < length; done += this) {
+	for (done = 0; done < length; done += this) {
 	    this = min2(CHUNK_SIZE, length - done);
 	    xdrmem_create(&xdrs, buf, (int)(this * sizeof(Rcomplex)), XDR_ENCODE);
 	    for(int cnt = 0; cnt < this; cnt++) {
 		if(!xdr_double(&xdrs, &(c[done+cnt].r)) ||
-		   !xdr_double(&xdrs, &(c[done+cnt].i))) 
+		   !xdr_double(&xdrs, &(c[done+cnt].i)))
 		    error(_("XDR write failed"));
 	    }
 	    stream->OutBytes(stream, buf, (int)(sizeof(Rcomplex) * this));
@@ -917,9 +946,9 @@ OutComplexVec(R_outpstream_t stream, SEXP s, R_xlen_t length)
     case R_pstream_binary_format:
     {
 	R_xlen_t done, this;
-        for (done = 0; done < length; done += this) {
+	for (done = 0; done < length; done += this) {
 	    this = min2(CHUNK_SIZE, length - done);
-	    stream->OutBytes(stream, COMPLEX(s) + done, 
+	    stream->OutBytes(stream, COMPLEX(s) + done,
 			     (int)(sizeof(Rcomplex) * this));
 	}
 	break;
@@ -935,10 +964,12 @@ static void WriteItem (SEXP s, SEXP ref_table, R_outpstream_t stream)
     int i;
     SEXP t;
 
-    if (R_compile_pkgs && TYPEOF(s) == CLOSXP && TYPEOF(BODY(s)) != BCODESXP) {
+    if (R_compile_pkgs && TYPEOF(s) == CLOSXP && TYPEOF(BODY(s)) != BCODESXP &&
+        !R_disable_bytecode) {
+
 	SEXP new_s;
 	R_compile_pkgs = FALSE;
-	PROTECT(new_s = R_cmpfun(s));
+	PROTECT(new_s = R_cmpfun1(s));
 	WriteItem (new_s, ref_table, stream);
 	UNPROTECT(1);
 	R_compile_pkgs = TRUE;
@@ -979,7 +1010,8 @@ static void WriteItem (SEXP s, SEXP ref_table, R_outpstream_t stream)
 	    warning(_("namespaces may not be available when loading"));
 #endif
 	    OutInteger(stream, NAMESPACESXP);
-	    OutStringVec(stream, R_NamespaceEnvSpec(s), ref_table);
+	    OutStringVec(stream, PROTECT(R_NamespaceEnvSpec(s)), ref_table);
+	    UNPROTECT(1);
 	}
 	else {
 	    OutInteger(stream, ENVSXP);
@@ -1096,7 +1128,7 @@ static void WriteItem (SEXP s, SEXP ref_table, R_outpstream_t stream)
 		break;
 	    }
 	    default:
-		for (R_xlen_t ix = 0; ix < len; ix++) 
+		for (R_xlen_t ix = 0; ix < len; ix++)
 		    OutByte(stream, RAW(s)[ix]);
 	    }
 	    break;
@@ -1292,8 +1324,7 @@ void R_Serialize(SEXP s, R_outpstream_t stream)
  * Unserialize Code
  */
 
-int R_ReadItemDepth = 0;
-int R_InitReadItemDepth;
+attribute_hidden int R_ReadItemDepth = 0, R_InitReadItemDepth;
 static char lastname[8192];
 
 #define INITIAL_REFREAD_TABLE_SIZE 128
@@ -1353,16 +1384,16 @@ static SEXP InStringVec(R_inpstream_t stream, SEXP ref_table)
 }
 
 /* use static buffer to reuse storage */
-static R_INLINE void 
+static R_INLINE void
 InIntegerVec(R_inpstream_t stream, SEXP obj, R_xlen_t length)
 {
     switch (stream->type) {
     case R_pstream_xdr_format:
     {
-        static char buf[CHUNK_SIZE * sizeof(int)];
+	static char buf[CHUNK_SIZE * sizeof(int)];
 	R_xlen_t done, this;
 	XDR xdrs;
-        for (done = 0; done < length; done += this) {
+	for (done = 0; done < length; done += this) {
 	    this = min2(CHUNK_SIZE, length - done);
 	    stream->InBytes(stream, buf, (int)(sizeof(int) * this));
 	    xdrmem_create(&xdrs, buf, (int)(this * sizeof(int)), XDR_DECODE);
@@ -1376,9 +1407,9 @@ InIntegerVec(R_inpstream_t stream, SEXP obj, R_xlen_t length)
     case R_pstream_binary_format:
     {
 	R_xlen_t done, this;
-        for (done = 0; done < length; done += this) {
+	for (done = 0; done < length; done += this) {
 	    this = min2(CHUNK_SIZE, length - done);
-	    stream->InBytes(stream, INTEGER(obj) + done, 
+	    stream->InBytes(stream, INTEGER(obj) + done,
 			    (int)(sizeof(int) * this));
 	}
 	break;
@@ -1389,16 +1420,16 @@ InIntegerVec(R_inpstream_t stream, SEXP obj, R_xlen_t length)
     }
 }
 
-static R_INLINE void 
+static R_INLINE void
 InRealVec(R_inpstream_t stream, SEXP obj, R_xlen_t length)
 {
     switch (stream->type) {
     case R_pstream_xdr_format:
     {
-        static char buf[CHUNK_SIZE * sizeof(double)];
+	static char buf[CHUNK_SIZE * sizeof(double)];
 	R_xlen_t done, this;
 	XDR xdrs;
-        for (done = 0; done < length; done += this) {
+	for (done = 0; done < length; done += this) {
 	    this = min2(CHUNK_SIZE, length - done);
 	    stream->InBytes(stream, buf, (int)(sizeof(double) * this));
 	    xdrmem_create(&xdrs, buf, (int)(this * sizeof(double)), XDR_DECODE);
@@ -1412,9 +1443,9 @@ InRealVec(R_inpstream_t stream, SEXP obj, R_xlen_t length)
     case R_pstream_binary_format:
     {
 	R_xlen_t done, this;
-        for (done = 0; done < length; done += this) {
+	for (done = 0; done < length; done += this) {
 	    this = min2(CHUNK_SIZE, length - done);
-	    stream->InBytes(stream, REAL(obj) + done, 
+	    stream->InBytes(stream, REAL(obj) + done,
 			    (int)(sizeof(double) * this));
 	}
 	break;
@@ -1425,13 +1456,13 @@ InRealVec(R_inpstream_t stream, SEXP obj, R_xlen_t length)
     }
 }
 
-static R_INLINE void 
+static R_INLINE void
 InComplexVec(R_inpstream_t stream, SEXP obj, R_xlen_t length)
 {
     switch (stream->type) {
     case R_pstream_xdr_format:
     {
-        static char buf[CHUNK_SIZE * sizeof(Rcomplex)];
+	static char buf[CHUNK_SIZE * sizeof(Rcomplex)];
 	R_xlen_t done, this;
 	XDR xdrs;
 	Rcomplex *output = COMPLEX(obj);
@@ -1451,9 +1482,9 @@ InComplexVec(R_inpstream_t stream, SEXP obj, R_xlen_t length)
     case R_pstream_binary_format:
     {
 	R_xlen_t done, this;
-        for (done = 0; done < length; done += this) {
+	for (done = 0; done < length; done += this) {
 	    this = min2(CHUNK_SIZE, length - done);
-	    stream->InBytes(stream, COMPLEX(obj) + done, 
+	    stream->InBytes(stream, COMPLEX(obj) + done,
 			    (int)(sizeof(Rcomplex) * this));
 	}
 	break;
@@ -1474,7 +1505,7 @@ static R_xlen_t ReadLENGTH (R_inpstream_t stream)
 	unsigned int len1, len2;
 	len1 = InInteger(stream); /* upper part */
 	len2 = InInteger(stream); /* lower part */
-	R_xlen_t xlen = len1; 
+	R_xlen_t xlen = len1;
 	/* sanity check for now */
 	if (len1 > 65536)
 	    error (_("invalid upper part of serialized vector length"));
@@ -1493,7 +1524,8 @@ static SEXP R_FindNamespace1(SEXP info)
     SEXP expr, val, where;
     PROTECT(info);
     where = PROTECT(ScalarString(mkChar(lastname)));
-    PROTECT(expr = LCONS(install("..getNamespace"), 
+    SEXP s_getNamespace = install("..getNamespace");
+    PROTECT(expr = LCONS(s_getNamespace,
 			 LCONS(info, LCONS(where, R_NilValue))));
     val = eval(expr, R_GlobalEnv);
     UNPROTECT(3);
@@ -1531,10 +1563,10 @@ static SEXP ReadItem (SEXP ref_table, R_inpstream_t stream)
 	AddReadRef(ref_table, s);
 	return s;
     case SYMSXP:
-        R_ReadItemDepth++;
+	R_ReadItemDepth++;
 	PROTECT(s = ReadItem(ref_table, stream)); /* print name */
 	R_ReadItemDepth--;
-	s = install(CHAR(s));
+	s = installTrChar(s);
 	AddReadRef(ref_table, s);
 	UNPROTECT(1);
 	return s;
@@ -1642,7 +1674,7 @@ static SEXP ReadItem (SEXP ref_table, R_inpstream_t stream)
 		cbuf[length] = '\0';
 		int index = StrToInternal(cbuf);
 		if (index == NA_INTEGER) {
-		    warning(_("unrecognized internal function name \"%s\""), cbuf); 
+		    warning(_("unrecognized internal function name \"%s\""), cbuf);
 		    PROTECT(s = R_NilValue);
 		} else
 		    PROTECT(s = mkPRIMSXP(index, type == BUILTINSXP));
@@ -1703,7 +1735,7 @@ static SEXP ReadItem (SEXP ref_table, R_inpstream_t stream)
 	    PROTECT(s = allocVector(type, len));
 	    R_ReadItemDepth++;
 	    for (count = 0; count < len; ++count) {
-		if (R_ReadItemDepth <= 0) 
+		if (R_ReadItemDepth <= 0)
 		    Rprintf("%*s[%d]\n", 2*(R_ReadItemDepth - R_InitReadItemDepth), "", count+1);
 		SET_VECTOR_ELT(s, count, ReadItem(ref_table, stream));
 	    }
@@ -1753,6 +1785,8 @@ static SEXP ReadItem (SEXP ref_table, R_inpstream_t stream)
 	    R_ReadItemDepth--;
 	}
 	UNPROTECT(1); /* s */
+	if (TYPEOF(s) == BCODESXP && !R_BCVersionOK(s))
+	    return R_BytecodeExpr(s);
 	return s;
     }
 }
@@ -1785,7 +1819,7 @@ static SEXP ReadBCLang(int type, SEXP ref_table, SEXP reps,
 	    PROTECT(ans = allocSExp(type));
 	    if (pos >= 0)
 		SET_VECTOR_ELT(reps, pos, ans);
-            R_ReadItemDepth++;
+	    R_ReadItemDepth++;
 	    if (hasattr)
 		SET_ATTRIB(ans, ReadItem(ref_table, stream));
 	    SET_TAG(ans, ReadItem(ref_table, stream));
@@ -1797,13 +1831,13 @@ static SEXP ReadBCLang(int type, SEXP ref_table, SEXP reps,
 	    UNPROTECT(1);
 	    return ans;
 	}
-    default: 
-    	{
-    	    R_ReadItemDepth++;
-            SEXP res = ReadItem(ref_table, stream);
-            R_ReadItemDepth--;
-            return res;
-        }
+    default:
+	{
+	    R_ReadItemDepth++;
+	    SEXP res = ReadItem(ref_table, stream);
+	    R_ReadItemDepth--;
+	    return res;
+	}
     }
 }
 
@@ -1846,10 +1880,12 @@ static SEXP ReadBC1(SEXP ref_table, SEXP reps, R_inpstream_t stream)
     R_ReadItemDepth++;
     SETCAR(s, ReadItem(ref_table, stream)); /* code */
     R_ReadItemDepth--;
-    SETCAR(s, R_bcEncode(CAR(s)));
+    SEXP bytes = PROTECT(CAR(s));
+    SETCAR(s, R_bcEncode(bytes));
     SETCDR(s, ReadBCConsts(ref_table, reps, stream)); /* consts */
     SET_TAG(s, R_NilValue); /* expr */
-    UNPROTECT(1);
+    R_registerBC(bytes, s);
+    UNPROTECT(2);
     return s;
 }
 
@@ -2095,7 +2131,8 @@ void R_InitConnOutPStream(R_outpstream_t stream, Rconnection con,
 			  SEXP (*phook)(SEXP, SEXP), SEXP pdata)
 {
     CheckOutConn(con);
-    if (con->text && type != R_pstream_ascii_format)
+    if (con->text &&
+	!(type == R_pstream_ascii_format || type == R_pstream_asciihex_format) )
 	error(_("only ascii format can be written to text mode connections"));
     R_InitOutPStream(stream, (R_pstream_data_t) con, type, version,
 		     OutCharConn, OutBytesConn, phook, pdata);
@@ -2157,7 +2194,8 @@ do_serializeToConn(SEXP call, SEXP op, SEXP args, SEXP env)
     if (TYPEOF(CADDR(args)) != LGLSXP)
 	error(_("'ascii' must be logical"));
     ascii = INTEGER(CADDR(args))[0];
-    if (ascii) type = R_pstream_ascii_format;
+    if (ascii == NA_LOGICAL) type = R_pstream_asciihex_format;
+    else if (ascii) type = R_pstream_ascii_format;
     else type = R_pstream_xdr_format;
 
     if (CADDDR(args) == R_NilValue)
@@ -2305,7 +2343,7 @@ static void InitBConOutPStream(R_outpstream_t stream, bconbuf_t bb,
 }
 
 /* only for use by serialize(), with binary write to a socket connection */
-SEXP attribute_hidden
+static SEXP
 R_serializeb(SEXP object, SEXP icon, SEXP xdr, SEXP Sversion, SEXP fun)
 {
     struct R_outpstream_st out;
@@ -2350,7 +2388,7 @@ static void resize_buffer(membuf_t mb, R_size_t needed)
 #ifdef LONG_VECTOR_SUPPORT
     if(needed < 10000000) /* ca 10MB */
 	needed = (1+2*needed/INCR) * INCR;
-    else 
+    else
 	needed = (R_size_t)((1+1.2*(double)needed/INCR) * INCR);
 #else
     if(needed < 10000000) /* ca 10MB */
@@ -2455,7 +2493,7 @@ static SEXP CloseMemOutPStream(R_outpstream_t stream)
     return val;
 }
 
-SEXP attribute_hidden
+static SEXP
 R_serialize(SEXP object, SEXP icon, SEXP ascii, SEXP Sversion, SEXP fun)
 {
     struct R_outpstream_st out;
@@ -2471,10 +2509,14 @@ R_serialize(SEXP object, SEXP icon, SEXP ascii, SEXP Sversion, SEXP fun)
 
     hook = fun != R_NilValue ? CallHook : NULL;
 
-    int asc = asLogical(ascii);
-    if (asc == NA_LOGICAL) type = R_pstream_binary_format;
-    else if (asc) type = R_pstream_ascii_format;
-    else type = R_pstream_xdr_format; /**** binary or ascii if no XDR? */
+    // Prior to 3.2.0 this was logical, values 0/1/NA for binary.
+    int asc = asInteger(ascii);
+    switch(asc) {
+    case 1: type = R_pstream_ascii_format; break;
+    case 2: type = R_pstream_asciihex_format; break;
+    case 3: type = R_pstream_binary_format; break;
+    default: type = R_pstream_xdr_format; break;
+    }
 
     if (icon == R_NilValue) {
 	RCNTXT cntxt;
@@ -2490,12 +2532,13 @@ R_serialize(SEXP object, SEXP icon, SEXP ascii, SEXP Sversion, SEXP fun)
 	InitMemOutPStream(&out, &mbs, type, version, hook, fun);
 	R_Serialize(object, &out);
 
-	val =  CloseMemOutPStream(&out);
+	PROTECT(val = CloseMemOutPStream(&out));
 
 	/* end the context after anything that could raise an error but before
 	   calling OutTerm so it doesn't get called twice */
 	endcontext(&cntxt);
 
+	UNPROTECT(1); /* val */
 	return val;
     }
     else {
@@ -2590,7 +2633,7 @@ static int used = 0;
 static char names[NC][PATH_MAX];
 static char *ptr[NC];
 
-SEXP attribute_hidden 
+SEXP attribute_hidden
 do_lazyLoadDBflush(SEXP call, SEXP op, SEXP args, SEXP env)
 {
     checkArity(op, args);
@@ -2727,7 +2770,7 @@ static SEXP R_getVarsFromFrame(SEXP vars, SEXP env, SEXP forcesxp)
     len = LENGTH(vars);
     PROTECT(val = allocVector(VECSXP, len));
     for (i = 0; i < len; i++) {
-	sym = install(CHAR(STRING_ELT(vars, i)));
+	sym = installTrChar(STRING_ELT(vars, i));
 
 	tmp = findVarInFrame(env, sym);
 	if (tmp == R_UnboundValue) {
@@ -2853,10 +2896,10 @@ do_serialize(SEXP call, SEXP op, SEXP args, SEXP env)
     SEXP object, icon, type, ver, fun;
     object = CAR(args); args = CDR(args);
     icon = CAR(args); args = CDR(args);
-    type = CAR(args); args = CDR(args); // ascii or xdr
+    type = CAR(args); args = CDR(args);
     ver = CAR(args); args = CDR(args);
     fun = CAR(args);
-    
+
     if(PRIMVAL(op) == 1)
 	return R_serializeb(object, icon, type, ver, fun);
     else
diff --git a/src/main/sort.c b/src/main/sort.c
index a35c728..19d4a3f 100644
--- a/src/main/sort.c
+++ b/src/main/sort.c
@@ -16,7 +16,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  */
 
 #ifdef HAVE_CONFIG_H
@@ -172,14 +172,13 @@ SEXP attribute_hidden do_isunsorted(SEXP call, SEXP op, SEXP args, SEXP rho)
 
     int strictly = asLogical(CADR(args));
     if(strictly == NA_LOGICAL)
-	errorcall(call, _("invalid '%s' argument"), "strictly");
+	error(_("invalid '%s' argument"), "strictly");
     if(isVectorAtomic(x)) {
 	UNPROTECT(1);
 	return (xlength(x) < 2) ? ScalarLogical(FALSE) :
 	    ScalarLogical(isUnsorted(x, strictly));
     }
     if(isObject(x)) {
-	// try dispatch -- fails entirely for S4: need "DispatchOrEval()" ?
 	SEXP call;
 	PROTECT(call = 	// R>  .gtn(x, strictly) :
 		lang3(install(".gtn"), x, CADR(args)));
@@ -864,7 +863,7 @@ orderVectorl(R_xlen_t *indx, R_xlen_t n, SEXP key, Rboolean nalast,
 
     if (n < 2) return;
     for (t = 0; incs[t] > n; t++);
-    for (h = incs[t]; t < NI; h = incs[++t])
+    for (h = incs[t]; t < NI; h = incs[++t]) {
 	R_CheckUserInterrupt();
 	for (i = h; i < n; i++) {
 	    itmp = indx[i];
@@ -877,6 +876,7 @@ orderVectorl(R_xlen_t *indx, R_xlen_t n, SEXP key, Rboolean nalast,
 	    }
 	    indx[j] = itmp;
 	}
+    }
 }
 #endif
 
@@ -927,6 +927,12 @@ GREATER_2_SUB_DEF(intdbl2greater,    int, double, icmp, rcmp)
     }
 
 
+/* TODO: once LONG_VECTOR_SUPPORT and  R_xlen_t  belong to the R API,
+ * ----  also add "long" versions, say,
+ *    R_orderVectorl (R_xlen_t *indx, R_xlen_t n, SEXP arglist, ...)
+ *    R_orderVector1l(R_xlen_t *indx, R_xlen_t n, SEXP arg,  ...)
+ * to the API */
+
 // Usage:  R_orderVector(indx, n,  Rf_lang2(x,y),  nalast, decreasing)
 void R_orderVector(int *indx, // must be pre-allocated to length >= n
 		   int n,
@@ -939,6 +945,14 @@ void R_orderVector(int *indx, // must be pre-allocated to length >= n
     return;
 }
 
+// Fast version of 1-argument case of R_orderVector()
+void R_orderVector1(int *indx, int n, SEXP x,
+		    Rboolean nalast, Rboolean decreasing)
+{
+    for(int i = 0; i < n; i++) indx[i] = i;
+    orderVector1(indx, n, x, nalast, decreasing, R_NilValue);
+}
+
 
 
 /* Needs indx set to  0:(n-1)  initially.
@@ -1007,13 +1021,16 @@ orderVector1(int *indx, int n, SEXP key, Rboolean nalast, Rboolean decreasing,
 #define less(a, b) (isna[a] > isna[b] || (isna[a] == isna[b] && a > b))
 		sort2_with_index
 #undef less
-		    if(nalast) hi -= numna; else lo += numna;
+		if (n - numna < 2) {
+		    Free(isna);
+		    return;
+		}
+		if (nalast) hi -= numna; else lo += numna;
 	    }
     }
 
     /* Shell sort isn't stable, so add test on index */
 
-    /* FIXME: check hi-lo + 1 > 1 ? */
     for (t = 0; sincs[t] > hi-lo+1; t++);
 
     if (isObject(key) && !isNull(rho)) {
@@ -1141,13 +1158,16 @@ orderVector1l(R_xlen_t *indx, R_xlen_t n, SEXP key, Rboolean nalast,
 #define less(a, b) (isna[a] > isna[b] || (isna[a] == isna[b] && a > b))
 		sort2_with_index
 #undef less
-		    if(nalast) hi -= numna; else lo += numna;
+		if (n - numna < 2) {
+		    Free(isna);
+		    return;
+		}
+		if (nalast) hi -= numna; else lo += numna;
 	    }
     }
 
     /* Shell sort isn't stable, so add test on index */
 
-    /* FIXME: check hi-lo + 1 > 1 ? */
     for (t = 0; sincs[t] > hi-lo+1; t++);
 
     if (isObject(key) && !isNull(rho)) {
@@ -1342,11 +1362,14 @@ SEXP attribute_hidden do_rank(SEXP call, SEXP op, SEXP args, SEXP rho)
 		switch(ties_kind) {
 		case AVERAGE:
 		    for (k = i; k <= j; k++)
-			rk[in[k]] = (i + j + 2) / 2.; break;
+			rk[in[k]] = (i + j + 2) / 2.; 
+		    break;
 		case MAX:
-		    for (k = i; k <= j; k++) rk[in[k]] = j+1; break;
+		    for (k = i; k <= j; k++) rk[in[k]] = j+1;
+		    break;
 		case MIN:
-		    for (k = i; k <= j; k++) rk[in[k]] = i+1; break;
+		    for (k = i; k <= j; k++) rk[in[k]] = i+1;
+		    break;
 		}
 	    }
 	} else
@@ -1362,11 +1385,14 @@ SEXP attribute_hidden do_rank(SEXP call, SEXP op, SEXP args, SEXP rho)
 		switch(ties_kind) {
 		case AVERAGE:
 		    for (k = i; k <= j; k++)
-			rk[in[k]] = (i + j + 2) / 2.; break;
+			rk[in[k]] = (i + j + 2) / 2.;
+		    break;
 		case MAX:
-		    for (k = i; k <= j; k++) ik[in[k]] = j+1; break;
+		    for (k = i; k <= j; k++) ik[in[k]] = j+1;
+		    break;
 		case MIN:
-		    for (k = i; k <= j; k++) ik[in[k]] = i+1; break;
+		    for (k = i; k <= j; k++) ik[in[k]] = i+1; 
+		    break;
 		}
 	    }
 	}
@@ -1375,105 +1401,6 @@ SEXP attribute_hidden do_rank(SEXP call, SEXP op, SEXP args, SEXP rho)
     return rank;
 }
 
-#include <R_ext/RS.h>
-
-/* also returns integers/doubles (a method for sort.list) */
-SEXP attribute_hidden do_radixsort(SEXP call, SEXP op, SEXP args, SEXP rho)
-{
-    SEXP x, ans;
-    Rboolean nalast, decreasing;
-    R_xlen_t i, n;
-    int tmp, xmax = NA_INTEGER, xmin = NA_INTEGER, off, napos;
-
-    checkArity(op, args);
-
-    x = CAR(args);
-    nalast = asLogical(CADR(args));
-    if(nalast == NA_LOGICAL)
-	error(_("invalid '%s' value"), "na.last");
-    decreasing = asLogical(CADDR(args));
-    if(decreasing == NA_LOGICAL)
-	error(_("'decreasing' must be TRUE or FALSE"));
-    off = nalast^decreasing ? 0 : 1;
-    n = XLENGTH(x);
-#ifdef LONG_VECTOR_SUPPORT
-    Rboolean isLong = n > INT_MAX;
-    if(isLong)
-	ans = allocVector(REALSXP, n);
-    else
-	ans = allocVector(INTSXP, n);
-#else
-    ans = allocVector(INTSXP, n);
-#endif
-    PROTECT(ans); // not currently needed
-    for(i = 0; i < n; i++) {
-	tmp = INTEGER(x)[i];
-	if(tmp == NA_INTEGER) continue;
-	if(xmax == NA_INTEGER || tmp > xmax) xmax = tmp;
-	if(xmin == NA_INTEGER || tmp < xmin) xmin = tmp;
-    }
-    if(xmin == NA_INTEGER) {  /* all NAs, so nothing to do */
-#ifdef LONG_VECTOR_SUPPORT
-	if (isLong) {
-	    for(i = 0; i < n; i++) REAL(ans)[i] = (double)(i+1);
-	} else
-#endif
-	{
-	    for(i = 0; i < n; i++) INTEGER(ans)[i] = (int)(i+1);
-	}
-	UNPROTECT(1);
-	return ans;
-    }
-
-    xmax -= xmin;
-    if(xmax > 100000) error(_("too large a range of values in 'x'"));
-    napos = off ? 0 : xmax + 1;
-    off -= xmin;
-    /* automatic allocation should be fine here: we know this is small */
-    R_CheckStack2((xmax+2) * sizeof(R_xlen_t));
-    R_xlen_t cnts[xmax+2];
-
-    for(i = 0; i <= xmax+1; i++) cnts[i] = 0;
-    for(i = 0; i < n; i++) {
-	if(INTEGER(x)[i] == NA_INTEGER) cnts[napos]++;
-	else cnts[off+INTEGER(x)[i]]++;
-    }
-
-    for(i = 1; i <= xmax+1; i++) cnts[i] += cnts[i-1];
-#ifdef LONG_VECTOR_SUPPORT
-    if (isLong) {
-	if(decreasing)
-	    for(i = 0; i < n; i++) {
-		tmp = INTEGER(x)[i];
-		REAL(ans)[n-(cnts[(tmp == NA_INTEGER) ? napos : off+tmp]--)] =
-		    (double)(i+1);
-	    }
-	else
-	    for(i = n-1; i >= 0; i--) {
-		tmp = INTEGER(x)[i];
-		REAL(ans)[--cnts[(tmp == NA_INTEGER) ? napos : off+tmp]] =
-		    (double)(i+1);
-	    }
-    } else
-#endif
-    {
-	if(decreasing)
-	    for(i = 0; i < n; i++) {
-		tmp = INTEGER(x)[i];
-		INTEGER(ans)[n-(cnts[(tmp == NA_INTEGER) ? napos : off+tmp]--)] =
-		    (int)(i+1);
-	    }
-	else
-	    for(i = n-1; i >= 0; i--) {
-		tmp = INTEGER(x)[i];
-		INTEGER(ans)[--cnts[(tmp == NA_INTEGER) ? napos : off+tmp]] =
-		    (int)(i+1);
-	    }
-    }
-    UNPROTECT(1);
-    return ans;
-}
-
 SEXP attribute_hidden do_xtfrm(SEXP call, SEXP op, SEXP args, SEXP rho)
 {
     SEXP fn, prargs, ans;
diff --git a/src/main/source.c b/src/main/source.c
index f63184c..ee4d747 100644
--- a/src/main/source.c
+++ b/src/main/source.c
@@ -1,7 +1,7 @@
 /*
  *  R : A Computer Langage for Statistical Data Analysis
  *  Copyright (C) 1995, 1996  Robert Gentleman and Ross Ihaka
- *  Copyright (C) 2001-2013   The R Core Team
+ *  Copyright (C) 2001-2015   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
@@ -15,7 +15,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  */
 
 #ifdef HAVE_CONFIG_H
@@ -74,8 +74,8 @@ SEXP attribute_hidden getParseContext(void)
     }
     /* get rid of empty line after last newline */
     if (nread && !length(STRING_ELT(ans, nread-1))) {
-    	nread--;
-    	R_ParseContextLine--;
+	nread--;
+	R_ParseContextLine--;
     }
     PROTECT(ans2 = allocVector(STRSXP, nread));
     for(i = 0; i < nread; i++)
@@ -88,18 +88,18 @@ static void getParseFilename(char* buffer, size_t buflen)
 {
     buffer[0] = '\0';
     if (R_ParseErrorFile) {
-    	if (isEnvironment(R_ParseErrorFile)) {
+	if (isEnvironment(R_ParseErrorFile)) {
 	    SEXP filename;
 	    PROTECT(filename = findVar(install("filename"), R_ParseErrorFile));
 	    if (isString(filename) && length(filename)) {
-	        strncpy(buffer, CHAR(STRING_ELT(filename, 0)), buflen - 1);
-                buffer[buflen - 1] = '\0';
-            }
+		strncpy(buffer, CHAR(STRING_ELT(filename, 0)), buflen - 1);
+		buffer[buflen - 1] = '\0';
+	    }
 	    UNPROTECT(1);
-        } else if (isString(R_ParseErrorFile) && length(R_ParseErrorFile)) {
-            strncpy(buffer, CHAR(STRING_ELT(R_ParseErrorFile, 0)), buflen - 1);
-            buffer[buflen - 1] = '\0';
-        }
+	} else if (isString(R_ParseErrorFile) && length(R_ParseErrorFile)) {
+	    strncpy(buffer, CHAR(STRING_ELT(R_ParseErrorFile, 0)), buflen - 1);
+	    buffer[buflen - 1] = '\0';
+	}
     }
 }
 
@@ -112,21 +112,21 @@ static SEXP tabExpand(SEXP strings)
     PROTECT(strings);
     PROTECT(result = allocVector(STRSXP, length(strings)));
     for (i = 0; i < length(strings); i++) {
-    	input = CHAR(STRING_ELT(strings, i));
-    	for (b = buffer; *input && (b-buffer < 192); input++) {
-    	    if (*input == '\t') do {
-    	    	*b++ = ' ';
-    	    } while (((b-buffer) & 7) != 0);
-    	    else *b++ = *input;
-    	}
-    	*b = '\0';
-    	SET_STRING_ELT(result, i, mkCharCE(buffer, Rf_getCharCE(STRING_ELT(strings, i))));
+	input = CHAR(STRING_ELT(strings, i));
+	for (b = buffer; *input && (b-buffer < 192); input++) {
+	    if (*input == '\t') do {
+		*b++ = ' ';
+	    } while (((b-buffer) & 7) != 0);
+	    else *b++ = *input;
+	}
+	*b = '\0';
+	SET_STRING_ELT(result, i, mkCharCE(buffer, Rf_getCharCE(STRING_ELT(strings, i))));
     }
     UNPROTECT(2);
     return result;
 }
-    	
-void parseError(SEXP call, int linenum)
+
+void NORET parseError(SEXP call, int linenum)
 {
     SEXP context;
     int len, width;
@@ -143,10 +143,10 @@ void parseError(SEXP call, int linenum)
 		  filename, linenum, R_ParseErrorCol, R_ParseErrorMsg);
 	    break;
 	case 1: // replaces use of %n
-	    width = snprintf(buffer, 10, "%d: ", R_ParseContextLine); 
+	    width = snprintf(buffer, 10, "%d: ", R_ParseContextLine);
 	    error("%s%d:%d: %s\n%d: %s\n%*s",
 		  filename, linenum, R_ParseErrorCol, R_ParseErrorMsg,
-		  R_ParseContextLine, CHAR(STRING_ELT(context, 0)), 
+		  R_ParseContextLine, CHAR(STRING_ELT(context, 0)),
 		  width+R_ParseErrorCol+1, "^");
 	    break;
 	default:
@@ -154,7 +154,7 @@ void parseError(SEXP call, int linenum)
 	    error("%s%d:%d: %s\n%d: %s\n%d: %s\n%*s",
 		  filename, linenum, R_ParseErrorCol, R_ParseErrorMsg,
 		  R_ParseContextLine-1, CHAR(STRING_ELT(context, len-2)),
-		  R_ParseContextLine, CHAR(STRING_ELT(context, len-1)), 
+		  R_ParseContextLine, CHAR(STRING_ELT(context, len-1)),
 		  width+R_ParseErrorCol+1, "^");
 	    break;
 	}
@@ -217,7 +217,7 @@ SEXP attribute_hidden do_parse(SEXP call, SEXP op, SEXP args, SEXP env)
 
     PROTECT(text = coerceVector(CAR(args), STRSXP));
     if(length(CAR(args)) && !length(text))
-	errorcall(call, _("coercion of 'text' to character was unsuccessful"));
+	error(_("coercion of 'text' to character was unsuccessful"));
     args = CDR(args);
     prompt = CAR(args);					args = CDR(args);
     source = CAR(args);					args = CDR(args);
@@ -232,8 +232,8 @@ SEXP attribute_hidden do_parse(SEXP call, SEXP op, SEXP args, SEXP env)
     } else if(streql(encoding, "UTF-8"))  {
 	known_to_be_utf8 = TRUE;
 	allKnown = FALSE;
-    } else if(!streql(encoding, "unknown") && !streql(encoding, "native.enc")) 
-    	warning(_("argument '%s = \"%s\"' will be ignored"), "encoding", encoding);
+    } else if(!streql(encoding, "unknown") && !streql(encoding, "native.enc"))
+	warning(_("argument '%s = \"%s\"' will be ignored"), "encoding", encoding);
 
     if (prompt == R_NilValue)
 	PROTECT(prompt);
@@ -276,7 +276,12 @@ SEXP attribute_hidden do_parse(SEXP call, SEXP op, SEXP args, SEXP env)
 	}
 	if(!con->canread) error(_("cannot read from this connection"));
 	s = R_ParseConn(con, num, &status, source);
-	if(!wasopen) {endcontext(&cntxt); con->close(con);}
+	if(!wasopen) {
+	    PROTECT(s);
+	    endcontext(&cntxt);
+	    con->close(con);
+	    UNPROTECT(1);
+	}
 	if (status != PARSE_OK) parseError(call, R_ParseError);
     }
     else {
diff --git a/src/main/split-incl.c b/src/main/split-incl.c
new file mode 100644
index 0000000..82ef918
--- /dev/null
+++ b/src/main/split-incl.c
@@ -0,0 +1,67 @@
+/* included  twice  from  ./split.c   after defining
+    _L_INTSXP_, _L_INTEG_,  _L_int_
+    ===========  =========  ========    as
+      INTSXP  ,  INTEGER ,  int         or
+      REALSXP ,  REAL    ,  R_xlen_t
+*/
+{
+    PROTECT(counts = allocVector(_L_INTSXP_, nlevs));
+    for (int i = 0; i < nlevs; i++) _L_INTEG_(counts)[i] = 0;
+    R_xlen_t i, i1;
+    MOD_ITERATE1(nobs, nfac, i, i1, {
+	int j = INTEGER(f)[i1];
+	if (j != NA_INTEGER) {
+	    /* protect against malformed factors */
+	    if (j > nlevs || j < 1) error(_("factor has bad level"));
+	    _L_INTEG_(counts)[j - 1]++;
+	}
+    });
+    /* Allocate a generic vector to hold the results. */
+    /* The i-th element will hold the split-out data */
+    /* for the ith group. */
+    PROTECT(vec = allocVector(VECSXP, nlevs));
+    for (R_xlen_t i = 0;  i < nlevs; i++) {
+	SET_VECTOR_ELT(vec, i, 
+		       allocVector(TYPEOF(x), (_L_int_)_L_INTEG_(counts)[i]));
+	setAttrib(VECTOR_ELT(vec, i), R_LevelsSymbol,
+		  getAttrib(x, R_LevelsSymbol));
+	if(have_names)
+	    setAttrib(VECTOR_ELT(vec, i), R_NamesSymbol,
+		      allocVector(STRSXP, (_L_int_)_L_INTEG_(counts)[i]));
+    }
+    for (int i = 0; i < nlevs; i++) _L_INTEG_(counts)[i] = 0;
+    MOD_ITERATE1(nobs, nfac, i, i1, {
+	int j = INTEGER(f)[i1];
+	if (j != NA_INTEGER) {
+	    _L_int_ k = (_L_int_)_L_INTEG_(counts)[j - 1];
+	    switch (TYPEOF(x)) {
+	    case LGLSXP:
+	    case INTSXP:
+		INTEGER(VECTOR_ELT(vec, j - 1))[k] = INTEGER(x)[i];
+		break;
+	    case REALSXP:
+		REAL(VECTOR_ELT(vec, j - 1))[k] = REAL(x)[i];
+		break;
+	    case CPLXSXP:
+		COMPLEX(VECTOR_ELT(vec, j - 1))[k] = COMPLEX(x)[i];
+		break;
+	    case STRSXP:
+		SET_STRING_ELT(VECTOR_ELT(vec, j - 1), k, STRING_ELT(x, i));
+		break;
+	    case VECSXP:
+		SET_VECTOR_ELT(VECTOR_ELT(vec, j - 1), k, VECTOR_ELT(x, i));
+		break;
+	    case RAWSXP:
+		RAW(VECTOR_ELT(vec, j - 1))[k] = RAW(x)[i];
+		break;
+	    default:
+		UNIMPLEMENTED_TYPE("split", x);
+	    }
+	    if(have_names) {
+		nmj = getAttrib(VECTOR_ELT(vec, j - 1), R_NamesSymbol);
+		SET_STRING_ELT(nmj, k, STRING_ELT(nm, i));
+	    }
+	    _L_INTEG_(counts)[j - 1] += 1;
+	}
+    });
+}
diff --git a/src/main/split.c b/src/main/split.c
index e62aec7..34accec 100644
--- a/src/main/split.c
+++ b/src/main/split.c
@@ -1,7 +1,7 @@
 /*
  *  R : A Computer Langage for Statistical Data Analysis
  *  Copyright (C) 1995, 1996  Robert Gentleman and Ross Ihaka
- *  Copuright (C) 2006 The R Core Team
+ *  Copyright (C) 2006-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
@@ -15,7 +15,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  */
 
 #ifdef HAVE_CONFIG_H
@@ -24,6 +24,7 @@
 
 #include "Defn.h"
 #include <Internal.h>
+#include <R_ext/Itermacros.h>
 
 SEXP attribute_hidden do_split(SEXP call, SEXP op, SEXP args, SEXP env)
 {
@@ -47,63 +48,29 @@ SEXP attribute_hidden do_split(SEXP call, SEXP op, SEXP args, SEXP env)
 	warning(_("data length is not a multiple of split variable"));
     nm = getAttrib(x, R_NamesSymbol);
     have_names = nm != R_NilValue;
-    PROTECT(counts = allocVector(INTSXP, nlevs));
-    for (int i = 0; i < nlevs; i++) INTEGER(counts)[i] = 0;
-    for (R_xlen_t i = 0; i < nobs; i++) {
-	int j = INTEGER(f)[i % nfac];
-	if (j != NA_INTEGER) {
-	    /* protect against malformed factors */
-	    if (j > nlevs || j < 1) error(_("factor has bad level"));
-	    INTEGER(counts)[j - 1]++;
-	}
-    }
-    /* Allocate a generic vector to hold the results. */
-    /* The i-th element will hold the split-out data */
-    /* for the ith group. */
-    PROTECT(vec = allocVector(VECSXP, nlevs));
-    for (R_xlen_t i = 0;  i < nlevs; i++) {
-	SET_VECTOR_ELT(vec, i, allocVector(TYPEOF(x), INTEGER(counts)[i]));
-	setAttrib(VECTOR_ELT(vec, i), R_LevelsSymbol,
-		  getAttrib(x, R_LevelsSymbol));
-	if(have_names)
-	    setAttrib(VECTOR_ELT(vec, i), R_NamesSymbol,
-		      allocVector(STRSXP, INTEGER(counts)[i]));
-    }
-    for (int i = 0; i < nlevs; i++) INTEGER(counts)[i] = 0;
-    for (R_xlen_t i = 0;  i < nobs; i++) {
-	int j = INTEGER(f)[i % nfac];
-	if (j != NA_INTEGER) {
-	    int k = INTEGER(counts)[j - 1];
-	    switch (TYPEOF(x)) {
-	    case LGLSXP:
-	    case INTSXP:
-		INTEGER(VECTOR_ELT(vec, j - 1))[k] = INTEGER(x)[i];
-		break;
-	    case REALSXP:
-		REAL(VECTOR_ELT(vec, j - 1))[k] = REAL(x)[i];
-		break;
-	    case CPLXSXP:
-		COMPLEX(VECTOR_ELT(vec, j - 1))[k] = COMPLEX(x)[i];
-		break;
-	    case STRSXP:
-		SET_STRING_ELT(VECTOR_ELT(vec, j - 1), k, STRING_ELT(x, i));
-		break;
-	    case VECSXP:
-		SET_VECTOR_ELT(VECTOR_ELT(vec, j - 1), k, VECTOR_ELT(x, i));
-		break;
-	    case RAWSXP:
-		RAW(VECTOR_ELT(vec, j - 1))[k] = RAW(x)[i];
-		break;
-	    default:
-		UNIMPLEMENTED_TYPE("split", x);
-	    }
-	    if(have_names) {
-		nmj = getAttrib(VECTOR_ELT(vec, j - 1), R_NamesSymbol);
-		SET_STRING_ELT(nmj, k, STRING_ELT(nm, i));
-	    }
-	    INTEGER(counts)[j - 1] += 1;
-	}
-    }
+
+#ifdef LONG_VECTOR_SUPPORT
+    if (IS_LONG_VEC(x))
+# define _L_INTSXP_ REALSXP
+# define _L_INTEG_  REAL
+# define _L_int_    R_xlen_t
+# include "split-incl.c"
+
+# undef _L_INTSXP_
+# undef _L_INTEG_
+# undef _L_int_
+    else
+#endif
+
+# define _L_INTSXP_ INTSXP
+# define _L_INTEG_  INTEGER
+# define _L_int_    int
+# include "split-incl.c"
+
+# undef _L_INTSXP_
+# undef _L_INTEG_
+# undef _L_int_
+
     setAttrib(vec, R_NamesSymbol, getAttrib(f, R_LevelsSymbol));
     UNPROTECT(2);
     return vec;
diff --git a/src/main/sprintf.c b/src/main/sprintf.c
index dbefeba..47694d7 100644
--- a/src/main/sprintf.c
+++ b/src/main/sprintf.c
@@ -1,6 +1,6 @@
 /*
  *  R : A Computer Language for Statistical Data Analysis
- *  Copyright (C) 2002--2013     The R Core Team
+ *  Copyright (C) 2002--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
@@ -14,7 +14,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  *
  * Originally written by Jonathan Rougier
 */
@@ -27,6 +27,9 @@
 #include <Internal.h>
 #include "RBufferUtils.h"
 #include <R_ext/RS.h> /* for Calloc/Free */
+#ifdef Win32
+#include <trioremap.h>
+#endif
 
 #define MAXLINE MAXELTSIZE
 #define MAXNARGS 100
@@ -260,10 +263,12 @@ SEXP attribute_hidden do_sprintf(SEXP call, SEXP op, SEXP args, SEXP env)
 			} else fmtp = fmt;
 
 #define CHECK_this_length						\
-			PROTECT(_this);					\
-			thislen = length(_this);			\
-			if(thislen == 0)				\
-			    error(_("coercion has changed vector length to 0"))
+			do {						\
+			    PROTECT(_this);				\
+			    thislen = length(_this);			\
+			    if(thislen == 0)				\
+				error(_("coercion has changed vector length to 0")); \
+			} while (0)
 
 			/* Now let us see if some minimal coercion
 			   would be sensible, but only do so once, for ns = 0: */
@@ -277,7 +282,8 @@ SEXP attribute_hidden do_sprintf(SEXP call, SEXP op, SEXP args, SEXP env)
 			    case 'X':
 				if(TYPEOF(_this) == REALSXP) {
 				    double r = REAL(_this)[0];
-				    if((double)((int) r) == r)
+				    // qdapTools manages to call this with NaN
+				    if(R_FINITE(r) && (double)((int) r) == r)
 					_this = coerceVector(_this, INTSXP);
 				    PROTECT(a[nthis] = _this);
 				    nprotect++;
@@ -316,7 +322,7 @@ SEXP attribute_hidden do_sprintf(SEXP call, SEXP op, SEXP args, SEXP env)
 				    size_t nc = strlen(outputString);
 				    char *z = Calloc(nc+1, char);
 				    strcpy(z, outputString);
-				    PROTECT(tmp = lang2(install("as.character"), _this));
+				    PROTECT(tmp = lang2(R_AsCharacterSymbol, _this));
 
 				    COERCE_THIS_TO_A
 				    strcpy(outputString, z);
diff --git a/src/main/startup.c b/src/main/startup.c
index 2af70b1..2967f1c 100644
--- a/src/main/startup.c
+++ b/src/main/startup.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-2013   The R Core Team
+  Copyright (C) 1997-2015   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
@@ -15,7 +15,7 @@
 
   You should have received a copy of the GNU General Public License
   along with this program; if not, a copy is available at
-  http://www.r-project.org/Licenses/
+  https://www.R-project.org/Licenses/
 */
 
 /*
@@ -166,26 +166,39 @@ void R_DefParams(Rstart Rp)
 #define Max_Nsize 50000000	/* about 1.4Gb 32-bit, 2.8Gb 64-bit */
 #define Max_Vsize R_SIZE_T_MAX	/* unlimited */
 
-#define Min_Nsize 220000
-#define Min_Vsize (1*Mega)
+// small values ok for R_DEFAULT_PACKAGES=NULL (= 'base' only)
+#define Min_Nsize 50000
+#define Min_Vsize 262144 // = (Mega/4)
 
 void R_SizeFromEnv(Rstart Rp)
 {
     int ierr;
     R_size_t value;
-    char *p;
+    char *p, msg[256];
 
     if((p = getenv("R_VSIZE"))) {
 	value = R_Decode2Long(p, &ierr);
-	if(ierr != 0 || value > Max_Vsize || value < Min_Vsize)
+	if(ierr != 0 || value > Max_Vsize)
 	    R_ShowMessage("WARNING: invalid R_VSIZE ignored\n");
+	else if(value < Min_Vsize) {
+	    snprintf(msg, 256,
+		     "WARNING: R_VSIZE smaller than Min_Vsize = %lu is ignored\n",
+		     (unsigned long) Min_Vsize);
+	    R_ShowMessage(msg);
+	}
 	else
 	    Rp->vsize = value;
     }
     if((p = getenv("R_NSIZE"))) {
 	value = R_Decode2Long(p, &ierr);
-	if(ierr != 0 || value > Max_Nsize || value < Min_Nsize)
+	if(ierr != 0 || value > Max_Nsize)
 	    R_ShowMessage("WARNING: invalid R_NSIZE ignored\n");
+	else if(value < Min_Nsize) {
+	    snprintf(msg, 256,
+		     "WARNING: R_NSIZE smaller than Min_Nsize = %lu is ignored\n",
+		     (unsigned long) Min_Nsize);
+	    R_ShowMessage(msg);
+	}
 	else
 	    Rp->nsize = value;
     }
@@ -194,25 +207,27 @@ void R_SizeFromEnv(Rstart Rp)
 static void SetSize(R_size_t vsize, R_size_t nsize)
 {
     char msg[1024];
-
+    Rboolean sml;
     /* vsize > 0 to catch long->int overflow */
     if (vsize < 1000 && vsize > 0) {
 	R_ShowMessage("WARNING: vsize ridiculously low, Megabytes assumed\n");
 	vsize *= (R_size_t) Mega;
     }
-    if(vsize < Min_Vsize || vsize > Max_Vsize) {
-	snprintf(msg, 1024, 
-		 "WARNING: invalid v(ector heap)size `%lu' ignored\n"
-		 "using default = %gM\n", (unsigned long) vsize,
-		 R_VSIZE / Mega);
+    if((sml = vsize < Min_Vsize) || vsize > Max_Vsize) {
+	snprintf(msg, 1024,
+		 "WARNING: %s v(ector heap)size '%lu' ignored,"
+		 " using default = %gM\n",
+		 sml ? "too small" : "too large",
+		 (unsigned long) vsize, R_VSIZE / Mega);
 	R_ShowMessage(msg);
 	R_VSize = R_VSIZE;
     } else
 	R_VSize = vsize;
-    if(nsize < Min_Nsize || nsize > Max_Nsize) {
+    if((sml = nsize < Min_Nsize) || nsize > Max_Nsize) {
 	snprintf(msg, 1024,
-		 "WARNING: invalid language heap (n)size `%lu' ignored,"
-		 " using default = %ld\n", (unsigned long) nsize, R_NSIZE);
+		 "WARNING: %s language heap (n)size '%lu' ignored,"
+		 " using default = %ld\n",
+		 sml ? "too small" : "too large", (unsigned long) nsize, R_NSIZE);
 	R_ShowMessage(msg);
 	R_NSize = R_NSIZE;
     } else
diff --git a/src/main/strncasecmp.c b/src/main/strncasecmp.c
index ec92b36..e7a9301 100644
--- a/src/main/strncasecmp.c
+++ b/src/main/strncasecmp.c
@@ -14,7 +14,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  */
 
 #ifdef HAVE_CONFIG_H
diff --git a/src/main/subassign.c b/src/main/subassign.c
index 30cafc1..7aa8460 100644
--- a/src/main/subassign.c
+++ b/src/main/subassign.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-2013   The R Core Team
+ *  Copyright (C) 1997-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
@@ -15,7 +15,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  */
 
 /*		Warnings/Errors
@@ -87,6 +87,7 @@
 #include <Defn.h>
 #include <Internal.h>
 #include <R_ext/RS.h> /* for test of S4 objects */
+#include <R_ext/Itermacros.h>
 
 /* This version of SET_VECTOR_ELT does not increment the REFCNT for
    the new vector->element link. It assumes that the old vector is
@@ -103,14 +104,35 @@ static R_INLINE void SET_VECTOR_ELT_NR(SEXP x, R_xlen_t i, SEXP v)
 #endif
 }
 
+static R_INLINE SEXP getNames(SEXP x)
+{
+    /* defer to getAttrib if a 'dim' attribute is present */
+    for (SEXP attr = ATTRIB(x); attr != R_NilValue; attr = CDR(attr))
+	if (TAG(attr) == R_DimSymbol)
+	    return getAttrib(x, R_NamesSymbol);
+
+    /* don't use getAttrib since that would mark as immutable */
+    for (SEXP attr = ATTRIB(x); attr != R_NilValue; attr = CDR(attr))
+	if (TAG(attr) == R_NamesSymbol)
+	    return CAR(attr);
+
+    return R_NilValue;
+}
+
 /* EnlargeVector() takes a vector "x" and changes its length to "newlen".
    This allows to assign values "past the end" of the vector or list.
-   Note that, unlike S, we only extend as much as is necessary.
+   Overcommit by a small percentage to allow more efficient vector growth.
 */
+static SEXP EnlargeNames(SEXP, R_xlen_t, R_xlen_t);
+
 static SEXP EnlargeVector(SEXP x, R_xlen_t newlen)
 {
-    R_xlen_t i, len;
-    SEXP newx, names, newnames;
+    R_xlen_t len, newtruelen;
+    SEXP newx, names;
+    static SEXP R_CheckBoundsSymbol = NULL;
+
+    if (R_CheckBoundsSymbol == NULL)
+	R_CheckBoundsSymbol = install("check.bounds");
 
     /* Sanity Checks */
     if (!isVector(x))
@@ -118,86 +140,151 @@ static SEXP EnlargeVector(SEXP x, R_xlen_t newlen)
 
     /* Enlarge the vector itself. */
     len = xlength(x);
-    if (LOGICAL(GetOption1(install("check.bounds")))[0])
+    if (LOGICAL(GetOption1(R_CheckBoundsSymbol))[0])
 	warning(_("assignment outside vector/list limits (extending from %d to %d)"),
 		len, newlen);
+
+    /* if the vector is not shared, is growable. and has room, then
+       increase its length */
+    if (! MAYBE_SHARED(x) &&
+	IS_GROWABLE(x) &&
+	TRUELENGTH(x) >= newlen) {
+	SETLENGTH(x, newlen);
+	names = getNames(x);
+	if (!isNull(names)) {
+	    SEXP newnames = EnlargeNames(names, len, newlen);
+	    if (names != newnames)
+		setAttrib(x, R_NamesSymbol, newnames);
+	}
+	return x;
+    }
+
+    /* over-committing by 5% seems to be reasonable, but for
+       experimenting the environment variable R_EXPAND_Frac can be
+       used to adjust this */
+    static double expand_dflt = 1.05;
+    static double expand = 0;
+    if (expand == 0) {
+	char *envval = getenv("R_EXPAND_FRAC");
+	expand = envval != NULL ? atof(envval) : expand_dflt;
+	if (expand < 1 || expand > 2) {
+	    expand = expand_dflt;
+	    error("bad expand value");
+	}
+    }
+
+    if (newlen > len)
+	newtruelen = (R_xlen_t) (newlen * expand);
+    else
+	/* sometimes this is called when no expansion is needed */
+	newtruelen = newlen;
+
+    /**** for now, don't cross the long vector boundary; drop when
+	  ALTREP is merged */
+#ifdef ALTREP
+#error drop the limitation to short vectors
+#endif
+    if (newtruelen > R_LEN_T_MAX) newtruelen = newlen;
+
     PROTECT(x);
-    PROTECT(newx = allocVector(TYPEOF(x), newlen));
+    PROTECT(newx = allocVector(TYPEOF(x), newtruelen));
 
     /* Copy the elements into place. */
     switch(TYPEOF(x)) {
     case LGLSXP:
     case INTSXP:
-	for (i = 0; i < len; i++)
+	for (R_xlen_t i = 0; i < len; i++)
 	    INTEGER(newx)[i] = INTEGER(x)[i];
-	for (i = len; i < newlen; i++)
+	for (R_xlen_t i = len; i < newtruelen; i++)
 	    INTEGER(newx)[i] = NA_INTEGER;
 	break;
     case REALSXP:
-	for (i = 0; i < len; i++)
+	for (R_xlen_t i = 0; i < len; i++)
 	    REAL(newx)[i] = REAL(x)[i];
-	for (i = len; i < newlen; i++)
+	for (R_xlen_t i = len; i < newtruelen; i++)
 	    REAL(newx)[i] = NA_REAL;
 	break;
     case CPLXSXP:
-	for (i = 0; i < len; i++)
+	for (R_xlen_t i = 0; i < len; i++)
 	    COMPLEX(newx)[i] = COMPLEX(x)[i];
-	for (i = len; i < newlen; i++) {
+	for (R_xlen_t i = len; i < newtruelen; i++) {
 	    COMPLEX(newx)[i].r = NA_REAL;
 	    COMPLEX(newx)[i].i = NA_REAL;
 	}
 	break;
     case STRSXP:
-	for (i = 0; i < len; i++)
+	for (R_xlen_t i = 0; i < len; i++)
 	    SET_STRING_ELT(newx, i, STRING_ELT(x, i));
-	for (i = len; i < newlen; i++)
+	for (R_xlen_t i = len; i < newtruelen; i++)
 	    SET_STRING_ELT(newx, i, NA_STRING); /* was R_BlankString  < 1.6.0 */
 	break;
     case EXPRSXP:
     case VECSXP:
-	for (i = 0; i < len; i++)
+	for (R_xlen_t i = 0; i < len; i++)
 	    SET_VECTOR_ELT_NR(newx, i, VECTOR_ELT(x, i));
-	for (i = len; i < newlen; i++)
+	for (R_xlen_t i = len; i < newtruelen; i++)
 	    SET_VECTOR_ELT(newx, i, R_NilValue);
 	break;
     case RAWSXP:
-	for (i = 0; i < len; i++)
+	for (R_xlen_t i = 0; i < len; i++)
 	    RAW(newx)[i] = RAW(x)[i];
-	for (i = len; i < newlen; i++)
+	for (R_xlen_t i = len; i < newtruelen; i++)
 	    RAW(newx)[i] = (Rbyte) 0;
 	break;
     default:
 	UNIMPLEMENTED_TYPE("EnlargeVector", x);
     }
+    if (newlen < newtruelen) {
+	SET_GROWABLE_BIT(newx);
+	SET_TRUELENGTH(newx, newtruelen);
+	SETLENGTH(newx, newlen);
+    }
 
     /* Adjust the attribute list. */
-    names = getAttrib(x, R_NamesSymbol);
-    if (!isNull(names)) {
-	PROTECT(newnames = allocVector(STRSXP, newlen));
-	for (i = 0; i < len; i++)
-	    SET_STRING_ELT(newnames, i, STRING_ELT(names, i));
-	for (i = len; i < newlen; i++)
-	    SET_STRING_ELT(newnames, i, R_BlankString);
-	setAttrib(newx, R_NamesSymbol, newnames);
-	UNPROTECT(1);
-    }
+    names = getNames(x);
+    if (!isNull(names))
+	setAttrib(newx, R_NamesSymbol, EnlargeNames(names, len, newlen));
     copyMostAttrib(x, newx);
     UNPROTECT(2);
     return newx;
 }
 
+static SEXP EnlargeNames(SEXP names, R_xlen_t len, R_xlen_t newlen)
+{
+    if (TYPEOF(names) != STRSXP || XLENGTH(names) != len)
+	error(_("bad names attribute"));
+    SEXP newnames = PROTECT(EnlargeVector(names, newlen));
+    for (R_xlen_t i = len; i < newlen; i++)
+	SET_STRING_ELT(newnames, i, R_BlankString);
+    UNPROTECT(1);
+    return newnames;
+}
+
 /* used instead of coerceVector to embed a non-vector in a list for
    purposes of SubassignTypeFix, for cases in wich coerceVector should
    fail; namely, S4SXP */
-static SEXP embedInVector(SEXP v)
+static SEXP embedInVector(SEXP v, SEXP call)
 {
     SEXP ans;
+    warningcall(call, "implicit list embedding of S4 objects is deprecated");
     PROTECT(ans = allocVector(VECSXP, 1));
     SET_VECTOR_ELT(ans, 0, v);
     UNPROTECT(1);
     return (ans);
 }
 
+static Rboolean dispatch_asvector(SEXP *x, SEXP call, SEXP rho) {
+    static SEXP op = NULL;
+    SEXP args;
+    Rboolean ans;
+    if (op == NULL)
+        op = INTERNAL(install("as.vector"));
+    PROTECT(args = list2(*x, mkString("any")));
+    ans = DispatchOrEval(call, op, "as.vector", args, rho, x, 0, 1);
+    UNPROTECT(1);
+    return ans;
+}
+
 /* Level 1 is used in VectorAssign, MatrixAssign, ArrayAssign.
    That coerces RHS to a list or expression.
 
@@ -206,7 +293,7 @@ static SEXP embedInVector(SEXP v)
 */
 
 static int SubassignTypeFix(SEXP *x, SEXP *y, R_xlen_t stretch, int level,
-			    SEXP call)
+			    SEXP call, SEXP rho)
 {
     /* A rather pointless optimization, but level 2 used to be handled
        differently */
@@ -307,7 +394,7 @@ static int SubassignTypeFix(SEXP *x, SEXP *y, R_xlen_t stretch, int level,
 
 	if (level == 1) {
 	    /* Embed the RHS into a list */
-	    *y = embedInVector(*y);
+	    *y = embedInVector(*y, call);
 	} else {
 	    /* Nothing to do here: duplicate when used (if needed) */
 	    redo_which = FALSE;
@@ -356,13 +443,23 @@ static int SubassignTypeFix(SEXP *x, SEXP *y, R_xlen_t stretch, int level,
 
 	if (level == 1) {
 	    /* Embed the RHS into a list */
-	    *y = embedInVector(*y);
+	    *y = embedInVector(*y, call);
 	} else {
 	    /* Nothing to do here: duplicate when used (if needed) */
 	    redo_which = FALSE;
 	}
 	break;
 
+    case 1025: /* logical   <- S4 */
+    case 1325: /* integer   <- S4 */
+    case 1425: /* real      <- S4 */
+    case 1525: /* complex   <- S4 */
+    case 1625: /* character <- S4 */
+    case 2425: /* raw       <- S4 */
+        if (dispatch_asvector(y, call, rho)) {
+            return SubassignTypeFix(x, y, stretch, level, call, rho);
+        }
+        
     default:
 	error(_("incompatible types (from %s to %s) in subassignment type fix"),
 	      type2char(which%100), type2char(which/100));
@@ -461,14 +558,37 @@ static R_INLINE SEXP VECTOR_ELT_FIX_NAMED(SEXP y, R_xlen_t i) {
     return val;
 }
 
-static SEXP VectorAssign(SEXP call, SEXP x, SEXP s, SEXP y)
+static SEXP VectorAssign(SEXP call, SEXP rho, SEXP x, SEXP s, SEXP y)
 {
     SEXP indx, newnames;
-    R_xlen_t i, ii, n, nx, ny;
+    R_xlen_t i, ii, n, nx, ny, iny;
     int iy, which;
     R_xlen_t stretch;
     double ry;
 
+    /* try for quick return for simple scalar case */
+    if (ATTRIB(s) == R_NilValue) {
+	if (TYPEOF(x) == REALSXP && IS_SCALAR(y, REALSXP)) {
+	    if (IS_SCALAR(s, INTSXP)) {
+		R_xlen_t ival = INTEGER(s)[0];
+		if (1 <= ival && ival <= XLENGTH(x)) {
+		    REAL(x)[ival - 1] = REAL(y)[0];
+		    return x;
+		}
+	    }
+	    else if (IS_SCALAR(s, REALSXP)) {
+		double dval = REAL(s)[0];
+		if (R_FINITE(dval)) {
+		    R_xlen_t ival = (R_xlen_t) dval;
+		    if (1 <= ival && ival <= XLENGTH(x)) {
+			REAL(x)[ival - 1] = REAL(y)[0];
+			return x;
+		    }
+		}
+	    }
+	}
+    }
+		
     if (isNull(x) && isNull(y)) {
 	return R_NilValue;
     }
@@ -481,8 +601,9 @@ static SEXP VectorAssign(SEXP call, SEXP x, SEXP s, SEXP y)
 	SEXP dim = getAttrib(x, R_DimSymbol);
 	if (isMatrix(s) && isArray(x) && ncols(s) == length(dim)) {
 	    if (isString(s)) {
-		s = strmat2intmat(s, GetArrayDimnames(x), call);
-		UNPROTECT(1);
+		SEXP dnames = PROTECT(GetArrayDimnames(x));
+		s = strmat2intmat(s, dnames, call);
+		UNPROTECT(2); /* dnames, s */
 		PROTECT(s);
 	    }
 	    if (isInteger(s) || isReal(s)) {
@@ -504,7 +625,7 @@ static SEXP VectorAssign(SEXP call, SEXP x, SEXP s, SEXP y)
     /* Here we make sure that the LHS has */
     /* been coerced into a form which can */
     /* accept elements from the RHS. */
-    which = SubassignTypeFix(&x, &y, stretch, 1, call);
+    which = SubassignTypeFix(&x, &y, stretch, 1, call, rho);
     /* = 100 * TYPEOF(x) + TYPEOF(y);*/
     if (n == 0) {
 	UNPROTECT(2);
@@ -546,49 +667,49 @@ static SEXP VectorAssign(SEXP call, SEXP x, SEXP s, SEXP y)
     /* case 1013:  logical   <- integer	  */
     case 1313:	/* integer   <- integer	  */
 
-	for (i = 0; i < n; i++) {
+	MOD_ITERATE1(n, ny, i, iny, {
 	    ii = gi(indx, i);
 	    if (ii == NA_INTEGER) continue;
 	    ii = ii - 1;
-	    INTEGER(x)[ii] = INTEGER(y)[i % ny];
-	}
+	    INTEGER(x)[ii] = INTEGER(y)[iny];
+	});
 	break;
 
     case 1410:	/* real	     <- logical	  */
     case 1413:	/* real	     <- integer	  */
 
-	for (i = 0; i < n; i++) {
+	MOD_ITERATE1(n, ny, i, iny, {
 	    ii = gi(indx, i);
 	    if (ii == NA_INTEGER) continue;
 	    ii = ii - 1;
-	    iy = INTEGER(y)[i % ny];
+	    iy = INTEGER(y)[iny];
 	    if (iy == NA_INTEGER)
 		REAL(x)[ii] = NA_REAL;
 	    else
 		REAL(x)[ii] = iy;
-	}
+	});
 	break;
 
     /* case 1014:  logical   <- real	  */
     /* case 1314:  integer   <- real	  */
     case 1414:	/* real	     <- real	  */
 
-	for (i = 0; i < n; i++) {
+	MOD_ITERATE1(n, ny, i, iny, {
 	    ii = gi(indx, i);
 	    if (ii == NA_INTEGER) continue;
 	    ii = ii - 1;
-	    REAL(x)[ii] = REAL(y)[i % ny];
-	}
+	    REAL(x)[ii] = REAL(y)[iny];
+	});
 	break;
 
     case 1510:	/* complex   <- logical	  */
     case 1513:	/* complex   <- integer	  */
 
-	for (i = 0; i < n; i++) {
+	MOD_ITERATE1(n, ny, i, iny, {
 	    ii = gi(indx, i);
 	    if (ii == NA_INTEGER) continue;
 	    ii = ii - 1;
-	    iy = INTEGER(y)[i % ny];
+	    iy = INTEGER(y)[iny];
 	    if (iy == NA_INTEGER) {
 		COMPLEX(x)[ii].r = NA_REAL;
 		COMPLEX(x)[ii].i = NA_REAL;
@@ -597,16 +718,16 @@ static SEXP VectorAssign(SEXP call, SEXP x, SEXP s, SEXP y)
 		COMPLEX(x)[ii].r = iy;
 		COMPLEX(x)[ii].i = 0.0;
 	    }
-	}
+	});
 	break;
 
     case 1514:	/* complex   <- real	  */
 
-	for (i = 0; i < n; i++) {
+	MOD_ITERATE1(n, ny, i, iny, {
 	    ii = gi(indx, i);
 	    if (ii == NA_INTEGER) continue;
 	    ii = ii - 1;
-	    ry = REAL(y)[i % ny];
+	    ry = REAL(y)[iny];
 	    if (ISNA(ry)) {
 		COMPLEX(x)[ii].r = NA_REAL;
 		COMPLEX(x)[ii].i = NA_REAL;
@@ -615,7 +736,7 @@ static SEXP VectorAssign(SEXP call, SEXP x, SEXP s, SEXP y)
 		COMPLEX(x)[ii].r = ry;
 		COMPLEX(x)[ii].i = 0.0;
 	    }
-	}
+	});
 	break;
 
     /* case 1015:  logical   <- complex	  */
@@ -623,12 +744,12 @@ static SEXP VectorAssign(SEXP call, SEXP x, SEXP s, SEXP y)
     /* case 1415:  real	     <- complex	  */
     case 1515:	/* complex   <- complex	  */
 
-	for (i = 0; i < n; i++) {
+	MOD_ITERATE1(n, ny, i, iny, {
 	    ii = gi(indx, i);
 	    if (ii == NA_INTEGER) continue;
 	    ii = ii - 1;
-	    COMPLEX(x)[ii] = COMPLEX(y)[i % ny];
-	}
+	    COMPLEX(x)[ii] = COMPLEX(y)[iny];
+	});
 	break;
 
     case 1610:	/* character <- logical	  */
@@ -641,12 +762,12 @@ static SEXP VectorAssign(SEXP call, SEXP x, SEXP s, SEXP y)
     /* case 1416:  real	     <- character */
     /* case 1516:  complex   <- character */
 
-	for (i = 0; i < n; i++) {
+	MOD_ITERATE1(n, ny, i, iny, {
 	    ii = gi(indx, i);
 	    if (ii == NA_INTEGER) continue;
 	    ii = ii - 1;
-	    SET_STRING_ELT(x, ii, STRING_ELT(y, i % ny));
-	}
+	    SET_STRING_ELT(x, ii, STRING_ELT(y, iny));
+	});
 	break;
 
     /* case 1019:  logial     <- vector   */
@@ -663,18 +784,18 @@ static SEXP VectorAssign(SEXP call, SEXP x, SEXP s, SEXP y)
 
     case 1919:  /* vector     <- vector     */
 
-	for (i = 0; i < n; i++) {
+	MOD_ITERATE1(n, ny, i, iny, {
 	    ii = gi(indx, i);
 	    if (ii == NA_INTEGER) continue;
 	    ii = ii - 1;
 
 	    /* set NAMED on RHS value to 2 if used more than once
 	       (PR15098) */
-	    if (i >= ny && NAMED(VECTOR_ELT(y, i % ny)) < 2)
-		SET_NAMED(VECTOR_ELT(y, i % ny), 2);
+	    if (i >= ny && NAMED(VECTOR_ELT(y, iny)) < 2)
+		SET_NAMED(VECTOR_ELT(y, iny), 2);
 
-	    SET_VECTOR_ELT(x, ii, VECTOR_ELT_FIX_NAMED(y, i % ny));
-	}
+	    SET_VECTOR_ELT(x, ii, VECTOR_ELT_FIX_NAMED(y, iny));
+	});
 	break;
 
     /* case 2001: */
@@ -688,12 +809,12 @@ static SEXP VectorAssign(SEXP call, SEXP x, SEXP s, SEXP y)
 		   RHS  to a list */
     case 2020:	/* expression <- expression */
 
-	for (i = 0; i < n; i++) {
+	MOD_ITERATE1(n, ny, i, iny, {
 	    ii = gi(indx, i);
 	    if (ii == NA_INTEGER) continue;
 	    ii = ii - 1;
-	    SET_VECTOR_ELT(x, ii, VECTOR_ELT(y, i % ny));
-	}
+	    SET_VECTOR_ELT(x, ii, VECTOR_ELT(y, iny));
+	});
 	break;
 
     case 1900:  /* vector     <- null       */
@@ -706,12 +827,12 @@ static SEXP VectorAssign(SEXP call, SEXP x, SEXP s, SEXP y)
 
     case 2424:	/* raw   <- raw	  */
 
-	for (i = 0; i < n; i++) {
+	MOD_ITERATE1(n, ny, i, iny, {
 	    ii = gi(indx, i);
 	    if (ii == NA_INTEGER) continue;
 	    ii = ii - 1;
-	    RAW(x)[ii] = RAW(y)[i % ny];
-	}
+	    RAW(x)[ii] = RAW(y)[iny];
+	});
 	break;
 
     default:
@@ -755,7 +876,7 @@ static SEXP VectorAssign(SEXP call, SEXP x, SEXP s, SEXP y)
 
 SEXP int_arraySubscript(int dim, SEXP s, SEXP dims, SEXP x, SEXP call);
 
-static SEXP MatrixAssign(SEXP call, SEXP x, SEXP s, SEXP y)
+static SEXP MatrixAssign(SEXP call, SEXP rho, SEXP x, SEXP s, SEXP y)
 {
     int i, j, ii, jj, iy, which;
     double ry;
@@ -797,7 +918,7 @@ static SEXP MatrixAssign(SEXP call, SEXP x, SEXP s, SEXP y)
     if (n > 0 && n % ny)
 	error(_("number of items to replace is not a multiple of replacement length"));
 
-    which = SubassignTypeFix(&x, &y, 0, 1, call);
+    which = SubassignTypeFix(&x, &y, 0, 1, call, rho);
     if (n == 0) return x;
 
     PROTECT(x);
@@ -836,7 +957,8 @@ static SEXP MatrixAssign(SEXP call, SEXP x, SEXP s, SEXP y)
 		ii = ii - 1;
 		ij = ii + jj * NR;
 		INTEGER(x)[ij] = INTEGER(y)[k];
-		k = (k + 1) % ny;
+		k++;
+		if (k == ny) k = 0;
 	    }
 	}
 	break;
@@ -858,7 +980,8 @@ static SEXP MatrixAssign(SEXP call, SEXP x, SEXP s, SEXP y)
 		    REAL(x)[ij] = NA_REAL;
 		else
 		    REAL(x)[ij] = iy;
-		k = (k + 1) % ny;
+		k++;
+		if (k == ny) k = 0;
 	    }
 	}
 	break;
@@ -877,7 +1000,8 @@ static SEXP MatrixAssign(SEXP call, SEXP x, SEXP s, SEXP y)
 		ii = ii - 1;
 		ij = ii + jj * NR;
 		REAL(x)[ij] = REAL(y)[k];
-		k = (k + 1) % ny;
+		k++;
+		if (k == ny) k = 0;
 	    }
 	}
 	break;
@@ -903,7 +1027,8 @@ static SEXP MatrixAssign(SEXP call, SEXP x, SEXP s, SEXP y)
 		    COMPLEX(x)[ij].r = iy;
 		    COMPLEX(x)[ij].i = 0.0;
 		}
-		k = (k + 1) % ny;
+		k++;
+		if (k == ny) k = 0;
 	    }
 	}
 	break;
@@ -928,7 +1053,8 @@ static SEXP MatrixAssign(SEXP call, SEXP x, SEXP s, SEXP y)
 		    COMPLEX(x)[ij].r = ry;
 		    COMPLEX(x)[ij].i = 0.0;
 		}
-		k = (k + 1) % ny;
+		k++;
+		if (k == ny) k = 0;
 	    }
 	}
 	break;
@@ -948,7 +1074,8 @@ static SEXP MatrixAssign(SEXP call, SEXP x, SEXP s, SEXP y)
 		ii = ii - 1;
 		ij = ii + jj * NR;
 		COMPLEX(x)[ij] = COMPLEX(y)[k];
-		k = (k + 1) % ny;
+		k++;
+		if (k == ny) k = 0;
 	    }
 	}
 	break;
@@ -973,7 +1100,8 @@ static SEXP MatrixAssign(SEXP call, SEXP x, SEXP s, SEXP y)
 		ii = ii - 1;
 		ij = ii + jj * NR;
 		SET_STRING_ELT(x, ij, STRING_ELT(y, k));
-		k = (k + 1) % ny;
+		k++;
+		if (k == ny) k = 0;
 	    }
 	}
 	break;
@@ -996,7 +1124,8 @@ static SEXP MatrixAssign(SEXP call, SEXP x, SEXP s, SEXP y)
 		ii = ii - 1;
 		ij = ii + jj * NR;
 		SET_VECTOR_ELT(x, ij, VECTOR_ELT_FIX_NAMED(y, k));
-		k = (k + 1) % ny;
+		k++;
+		if (k == ny) k = 0;
 	    }
 	}
 	break;
@@ -1013,7 +1142,8 @@ static SEXP MatrixAssign(SEXP call, SEXP x, SEXP s, SEXP y)
 		ii = ii - 1;
 		ij = ii + jj * NR;
 		RAW(x)[ij] = RAW(y)[k];
-		k = (k + 1) % ny;
+		k++;
+		if (k == ny) k = 0;
 	    }
 	}
 	break;
@@ -1027,7 +1157,7 @@ static SEXP MatrixAssign(SEXP call, SEXP x, SEXP s, SEXP y)
 }
 
 
-static SEXP ArrayAssign(SEXP call, SEXP x, SEXP s, SEXP y)
+static SEXP ArrayAssign(SEXP call, SEXP rho, SEXP x, SEXP s, SEXP y)
 {
     int k = 0;
     SEXP dims, tmp;
@@ -1084,7 +1214,7 @@ static SEXP ArrayAssign(SEXP call, SEXP x, SEXP s, SEXP y)
     /* Here we make sure that the LHS has been coerced into */
     /* a form which can accept elements from the RHS. */
 
-    int which = SubassignTypeFix(&x, &y, 0, 1, call);/* = 100 * TYPEOF(x) + TYPEOF(y);*/
+    int which = SubassignTypeFix(&x, &y, 0, 1, call, rho);/* = 100 * TYPEOF(x) + TYPEOF(y);*/
 
     if (n == 0) {
 	UNPROTECT(1);
@@ -1107,7 +1237,8 @@ static SEXP ArrayAssign(SEXP call, SEXP x, SEXP s, SEXP y)
     /* existing objects any changes we make now are permanent. */
     /* Beware! */
 
-    for (int i = 0; i < n; i++) {
+    R_xlen_t i, iny;
+    MOD_ITERATE1(n, ny, i, iny, {
 	R_xlen_t ii = 0;
 	for (int j = 0; j < k; j++) {
 	    int jj = subs[j][indx[j]];
@@ -1122,14 +1253,14 @@ static SEXP ArrayAssign(SEXP call, SEXP x, SEXP s, SEXP y)
 	/* case 1013:	   logical   <- integer	  */
 	case 1313:	/* integer   <- integer	  */
 
-	    INTEGER(x)[ii] = INTEGER(y)[i % ny];
+	    INTEGER(x)[ii] = INTEGER(y)[iny];
 	    break;
 
 	case 1410:	/* real	     <- logical	  */
 	case 1413:	/* real	     <- integer	  */
 
 	{
-	    int iy = INTEGER(y)[i % ny];
+	    int iy = INTEGER(y)[iny];
 	    if (iy == NA_INTEGER)
 		REAL(x)[ii] = NA_REAL;
 	    else
@@ -1141,13 +1272,13 @@ static SEXP ArrayAssign(SEXP call, SEXP x, SEXP s, SEXP y)
 	/* case 1314:	   integer   <- real	  */
 	case 1414:	/* real	     <- real	  */
 
-	    REAL(x)[ii] = REAL(y)[i % ny];
+	    REAL(x)[ii] = REAL(y)[iny];
 	    break;
 
 	case 1510:	/* complex   <- logical	  */
 	case 1513:	/* complex   <- integer	  */
 	{
-	    int iy = INTEGER(y)[i % ny];
+	    int iy = INTEGER(y)[iny];
 	    if (iy == NA_INTEGER) {
 		COMPLEX(x)[ii].r = NA_REAL;
 		COMPLEX(x)[ii].i = NA_REAL;
@@ -1162,7 +1293,7 @@ static SEXP ArrayAssign(SEXP call, SEXP x, SEXP s, SEXP y)
 	case 1514:	/* complex   <- real	  */
 
 	{
-	    double ry = REAL(y)[i % ny];
+	    double ry = REAL(y)[iny];
 	    if (ISNA(ry)) {
 		COMPLEX(x)[ii].r = NA_REAL;
 		COMPLEX(x)[ii].i = NA_REAL;
@@ -1179,7 +1310,7 @@ static SEXP ArrayAssign(SEXP call, SEXP x, SEXP s, SEXP y)
 	/* case 1415:	   real	     <- complex	  */
 	case 1515:	/* complex   <- complex	  */
 
-	    COMPLEX(x)[ii] = COMPLEX(y)[i % ny];
+	    COMPLEX(x)[ii] = COMPLEX(y)[iny];
 	    break;
 
 	case 1610:	/* character <- logical	  */
@@ -1192,22 +1323,22 @@ static SEXP ArrayAssign(SEXP call, SEXP x, SEXP s, SEXP y)
 	/* case 1416:	   real	     <- character */
 	/* case 1516:	   complex   <- character */
 
-	    SET_STRING_ELT(x, ii, STRING_ELT(y, i % ny));
+	    SET_STRING_ELT(x, ii, STRING_ELT(y, iny));
 	    break;
 
 	case 1919: /* vector <- vector */
 
 	    /* set NAMED on RHS value to 2 if used more than once
 	       (PR15098) */
-	    if (i >= ny && NAMED(VECTOR_ELT(y, i % ny)) < 2)
-		SET_NAMED(VECTOR_ELT(y, i % ny), 2);
+	    if (i >= ny && NAMED(VECTOR_ELT(y, iny)) < 2)
+		SET_NAMED(VECTOR_ELT(y, iny), 2);
 
-	    SET_VECTOR_ELT(x, ii, VECTOR_ELT_FIX_NAMED(y, i % ny));
+	    SET_VECTOR_ELT(x, ii, VECTOR_ELT_FIX_NAMED(y, iny));
 	    break;
 
 	case 2424: /* raw <- raw */
 
-	    RAW(x)[ii] = RAW(y)[i % ny];
+	    RAW(x)[ii] = RAW(y)[iny];
 	    break;
 
 	default:
@@ -1220,10 +1351,11 @@ static SEXP ArrayAssign(SEXP call, SEXP x, SEXP s, SEXP y)
 	    int j = 0;
 	    while (++indx[j] >= bound[j]) {
 		indx[j] = 0;
-		j = (j + 1) % k;
+		j++;
+		if (j == k) j = 0;
 	    }
 	}
-    }
+    });
     UNPROTECT(3);
     vmaxset(vmax);
     return x;
@@ -1233,21 +1365,21 @@ static SEXP ArrayAssign(SEXP call, SEXP x, SEXP s, SEXP y)
 static SEXP GetOneIndex(SEXP sub, int ind)
 {
     if (ind < 0 || ind+1 > length(sub))
-    	error("internal error: index %d from length %d", ind, length(sub));
+	error("internal error: index %d from length %d", ind, length(sub));
     if (length(sub) > 1) {
-    	switch (TYPEOF(sub)) {
-    	case INTSXP:
-    	    sub = ScalarInteger(INTEGER(sub)[ind]);
-    	    break;
-    	case REALSXP:
-    	    sub = ScalarReal(REAL(sub)[ind]);
-    	    break;
-    	case STRSXP:
-    	    sub = ScalarString(STRING_ELT(sub, ind));
-    	    break;
-    	default:
-    	    error(_("invalid subscript in list assign"));
-    	}
+	switch (TYPEOF(sub)) {
+	case INTSXP:
+	    sub = ScalarInteger(INTEGER(sub)[ind]);
+	    break;
+	case REALSXP:
+	    sub = ScalarReal(REAL(sub)[ind]);
+	    break;
+	case STRSXP:
+	    sub = ScalarString(STRING_ELT(sub, ind));
+	    break;
+	default:
+	    error(_("invalid subscript in list assign"));
+	}
     }
     return sub;
 }
@@ -1267,13 +1399,13 @@ static SEXP SimpleListAssign(SEXP call, SEXP x, SEXP s, SEXP y, int ind)
 
     n = length(indx);
     if (n > 1)
-    	error(_("invalid subscript in list assign"));
+	error(_("invalid subscript in list assign"));
 
     nx = length(x);
 
     if (stretch) {
 	SEXP t = CAR(s);
-	SEXP yi = allocList((int)(stretch - nx));
+	SEXP yi = PROTECT(allocList((int)(stretch - nx)));
 	/* This is general enough for only usage */
 	if(isString(t) && length(t) == stretch - nx) {
 	    SEXP z = yi;
@@ -1281,6 +1413,7 @@ static SEXP SimpleListAssign(SEXP call, SEXP x, SEXP s, SEXP y, int ind)
 	    for(i = 0; i < LENGTH(t); i++, z = CDR(z))
 		SET_TAG(z, installTrChar(STRING_ELT(t, i)));
 	}
+	UNPROTECT(1);
 	PROTECT(x = listAppend(x, yi));
 	nx = (int) stretch;
     }
@@ -1480,16 +1613,16 @@ SEXP attribute_hidden do_subassign_dflt(SEXP call, SEXP op, SEXP args, SEXP rho)
     case RAWSXP:
 	switch (nsubs) {
 	case 0:
-	    x = VectorAssign(call, x, R_MissingArg, y);
+	    x = VectorAssign(call, rho, x, R_MissingArg, y);
 	    break;
 	case 1:
-	    x = VectorAssign(call, x, CAR(subs), y);
+	    x = VectorAssign(call, rho, x, CAR(subs), y);
 	    break;
 	case 2:
-	    x = MatrixAssign(call, x, subs, y);
+	    x = MatrixAssign(call, rho, x, subs, y);
 	    break;
 	default:
-	    x = ArrayAssign(call, x, subs, y);
+	    x = ArrayAssign(call, rho, x, subs, y);
 	    break;
 	}
 	break;
@@ -1582,14 +1715,13 @@ do_subassign2_dflt(SEXP call, SEXP op, SEXP args, SEXP rho)
 
     if (isNull(x)) {
 	if (isNull(y)) {
-	    UNPROTECT(1);
+	    UNPROTECT(1); /* args */
 	    return x;
 	}
-	UNPROTECT(1);
 	if (length(y) == 1)
-	    PROTECT(x = allocVector(TYPEOF(y), 0));
+	    x = allocVector(TYPEOF(y), 0);
 	else
-	    PROTECT(x = allocVector(VECSXP, 0));
+	    x = allocVector(VECSXP, 0);
     }
 
     /* Ensure that the LHS is a local variable. */
@@ -1598,25 +1730,26 @@ do_subassign2_dflt(SEXP call, SEXP op, SEXP args, SEXP rho)
     if (MAYBE_SHARED(x))
 	SETCAR(args, x = shallow_duplicate(x));
 
-    xtop = xup = x; /* x will be the element which is assigned to */
-
-    dims = getAttrib(x, R_DimSymbol);
-    ndims = length(dims);
-
     /* code to allow classes to extend ENVSXP */
     if(TYPEOF(x) == S4SXP) {
 	xOrig = x; /* will be an S4 object */
-        x = R_getS4DataSlot(x, ANYSXP);
+	x = R_getS4DataSlot(x, ANYSXP);
 	if(TYPEOF(x) != ENVSXP)
 	  errorcall(call, _("[[<- defined for objects of type \"S4\" only for subclasses of environment"));
     }
 
+    PROTECT(x);
+    xtop = xup = x; /* x will be the element which is assigned to */
+
+    dims = getAttrib(x, R_DimSymbol);
+    ndims = length(dims);
+
     /* ENVSXP special case first */
     if( TYPEOF(x) == ENVSXP) {
 	if( nsubs!=1 || !isString(CAR(subs)) || length(CAR(subs)) != 1 )
 	    error(_("wrong args for environment subassignment"));
 	defineVar(installTrChar(STRING_ELT(CAR(subs), 0)), y, x);
-	UNPROTECT(1);
+	UNPROTECT(2); /* x, args */
 	return(S4 ? xOrig : x);
     }
 
@@ -1629,11 +1762,15 @@ do_subassign2_dflt(SEXP call, SEXP op, SEXP args, SEXP rho)
 	    xup = vectorIndex(x, thesub, 0, len-2, /*partial ok*/TRUE, call,
 			      TRUE);
 	    /* OneIndex sets newname, but it will be overwritten before being used. */
+	    PROTECT(xup);
 	    off = OneIndex(xup, thesub, xlength(xup), 0, &newname, len-2, R_NilValue);
 	    x = vectorIndex(xup, thesub, len-2, len-1, TRUE, call, TRUE);
+	    UNPROTECT(2); /* xup, x */
+	    PROTECT(x);
 	    recursed = TRUE;
 	}
     }
+    PROTECT(xup);
 
     stretch = 0;
     if (isVector(x)) {
@@ -1644,13 +1781,19 @@ do_subassign2_dflt(SEXP call, SEXP op, SEXP args, SEXP rho)
 	if (nsubs == 0 || CAR(subs) == R_MissingArg)
 	    error(_("[[ ]] with missing subscript"));
 	if (nsubs == 1) {
-	    offset = OneIndex(x, thesub, xlength(x), 0, &newname, 
+	    offset = OneIndex(x, thesub, xlength(x), 0, &newname,
 			      recursed ? len-1 : -1, R_NilValue);
 	    if (isVectorList(x) && isNull(y)) {
 		x = DeleteOneVectorListItem(x, offset);
-		if(recursed) SET_VECTOR_ELT(xup, off, x);
-		else xtop = x;
-		UNPROTECT(1);
+		if(recursed) {
+		    if(isVectorList(xup)) SET_VECTOR_ELT(xup, off, x);
+		    else {
+			PROTECT(x);
+			xup = SimpleListAssign(call, xup, subs, x, len-2);
+			UNPROTECT(1); /* x */
+		    }
+		} else xtop = x;
+		UNPROTECT(3); /* xup, x, args */
 		return xtop;
 	    }
 	    if (offset < 0)
@@ -1678,12 +1821,13 @@ do_subassign2_dflt(SEXP call, SEXP op, SEXP args, SEXP rho)
 	    for (i = (ndims - 1); i > 0; i--)
 		offset = (offset + INTEGER(indx)[i]) * INTEGER(dims)[i - 1];
 	    offset += INTEGER(indx)[0];
-	    UNPROTECT(1);
+	    UNPROTECT(1); /* indx */
 	}
 
-	which = SubassignTypeFix(&x, &y, stretch, 2, call);
+	which = SubassignTypeFix(&x, &y, stretch, 2, call, rho);
 
 	PROTECT(x);
+	PROTECT(y);
 
 	switch (which) {
 	    /* as from 2.3.0 'which' is after conversion */
@@ -1791,8 +1935,8 @@ do_subassign2_dflt(SEXP call, SEXP op, SEXP args, SEXP rho)
 	case 2014:	/* expression <- real	    */
 	case 2015:	/* expression <- complex    */
 	case 2016:	/* expression <- character  */
-	case 2024:  	/* expression     <- raw */
-	case 2025:  	/* expression     <- S4 */
+	case 2024:	/* expression     <- raw */
+	case 2025:	/* expression     <- S4 */
 	case 1919:      /* vector     <- vector     */
 	case 2020:	/* expression <- expression */
 
@@ -1818,12 +1962,14 @@ do_subassign2_dflt(SEXP call, SEXP op, SEXP args, SEXP rho)
 		PROTECT(names = allocVector(STRSXP, length(x)));
 		SET_STRING_ELT(names, offset, newname);
 		setAttrib(x, R_NamesSymbol, names);
-		UNPROTECT(1);
+		UNPROTECT(1); /* names */
 	    }
 	    else
 		SET_STRING_ELT(names, offset, newname);
 	}
-	UNPROTECT(1);
+	UNPROTECT(4); /* y, x, xup, x */
+	PROTECT(x);
+	PROTECT(xup);
     }
     else if (isPairList(x)) {
 	y = R_FixupRHS(x, y);
@@ -1843,7 +1989,7 @@ do_subassign2_dflt(SEXP call, SEXP op, SEXP args, SEXP rho)
 	    names = getAttrib(x, R_DimNamesSymbol);
 	    for (i = 0; i < ndims; i++) {
 		INTEGER(indx)[i] = (int)
-		    get1index(CAR(subs), CAR(names),
+		    get1index(CAR(subs), VECTOR_ELT(names, i),
 			      INTEGER(dims)[i],
 			      /*partial ok*/FALSE, -1, call);
 		subs = CDR(subs);
@@ -1855,11 +2001,14 @@ do_subassign2_dflt(SEXP call, SEXP op, SEXP args, SEXP rho)
 	    for (i = (ndims - 1); i > 0; i--)
 		offset = (offset + INTEGER(indx)[i]) * INTEGER(dims)[i - 1];
 	    offset += INTEGER(indx)[0];
-	    SETCAR(nthcdr(x, (int) offset), duplicate(y));
+	    SEXP slot = nthcdr(x, (int) offset);
+	    SETCAR(slot, duplicate(y));
 	    /* FIXME: add name */
-	    UNPROTECT(1);
+	    UNPROTECT(1); /* indx */
 	}
-	UNPROTECT(1);
+	UNPROTECT(3); /* y, xup, x */
+	PROTECT(x);
+	PROTECT(xup);
     }
     else error(R_MSG_ob_nonsub, type2char(TYPEOF(x)));
 
@@ -1874,7 +2023,7 @@ do_subassign2_dflt(SEXP call, SEXP op, SEXP args, SEXP rho)
     }
     else xtop = x;
 
-    UNPROTECT(1);
+    UNPROTECT(3); /* xup, x, args */
     SET_NAMED(xtop, 0);
     if(S4) SET_S4_OBJECT(xtop);
     return xtop;
@@ -1886,36 +2035,23 @@ do_subassign2_dflt(SEXP call, SEXP op, SEXP args, SEXP rho)
 */
 SEXP attribute_hidden do_subassign3(SEXP call, SEXP op, SEXP args, SEXP env)
 {
-    SEXP nlist, ans, input;
-    int iS;
+    SEXP ans, nlist = R_NilValue;
 
     checkArity(op, args);
 
     /* Note the RHS has already been evaluated at this point */
+    PROTECT(args = fixSubset3Args(call, args, env, &nlist));
 
-    input = allocVector(STRSXP, 1);
-
-    nlist = CADR(args);
-    iS = isSymbol(nlist);
-    if (iS)
-	SET_STRING_ELT(input, 0, PRINTNAME(nlist));
-    else if(isString(nlist) )
-	SET_STRING_ELT(input, 0, STRING_ELT(nlist, 0));
-    else {
-	error(_("invalid subscript type '%s'"), type2char(TYPEOF(nlist)));
-	return R_NilValue; /*-Wall*/
+    if(R_DispatchOrEvalSP(call, op, "$<-", args, env, &ans)) {
+	UNPROTECT(1); /* args */
+	return(ans);
     }
-
-    /* replace the second argument with a string */
-    SETCADR(args, input);
-
-    if(R_DispatchOrEvalSP(call, op, "$<-", args, env, &ans))
-      return(ans);
-
-    if (! iS)
-	nlist = installTrChar(STRING_ELT(input, 0));
-
-    return R_subassign3_dflt(call, CAR(ans), nlist, CADDR(ans));
+    PROTECT(ans);
+    if (nlist == R_NilValue)
+	nlist = installTrChar(STRING_ELT(CADR(args), 0));
+    ans = R_subassign3_dflt(call, CAR(ans), nlist, CADDR(ans));
+    UNPROTECT(2); /* args, ans */
+    return ans;
 }
 
 /* used in "$<-" (above) and methods_list_dispatch.c */
@@ -1945,7 +2081,7 @@ SEXP R_subassign3_dflt(SEXP call, SEXP x, SEXP nlist, SEXP val)
     /* code to allow classes to extend ENVSXP */
     if(TYPEOF(x) == S4SXP) {
 	xS4 = x;
-        x = R_getS4DataSlot(x, ANYSXP);
+	REPROTECT(x = R_getS4DataSlot(x, ANYSXP), pxidx);
 	if(x == R_NilValue)
 	  errorcall(call, _("no method for assigning subsets of this S4 class"));
     }
@@ -2002,7 +2138,7 @@ SEXP R_subassign3_dflt(SEXP call, SEXP x, SEXP nlist, SEXP val)
 	SEXP names;
 	int type = VECSXP;
 
-	if (isExpression(x)) 
+	if (isExpression(x))
 	    type = EXPRSXP;
 	else if (!isNewList(x)) {
 	    warning(_("Coercing LHS to a list"));
diff --git a/src/main/subscript.c b/src/main/subscript.c
index c67de1a..3883b8f 100644
--- a/src/main/subscript.c
+++ b/src/main/subscript.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--2013  The R Core Team
+ *  Copyright (C) 1997--2015  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
@@ -15,7 +15,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  *
  * EXPORTS:
  *
@@ -36,8 +36,14 @@
 
 #include <Defn.h>
 
+#include <R_ext/Itermacros.h>
+
+/* interval at which to check interrupts, a guess (~subsecond on current hw) */
+#define NINTERRUPT 10000000
+
 /* We might get a call with R_NilValue from subassignment code */
-#define ECALL(call, yy) if(call == R_NilValue) error(yy); else errorcall(call, yy);
+#define ECALL(call, yy)     if(call == R_NilValue) error(yy);    else errorcall(call, yy);
+#define ECALL3(call, yy, A) if(call == R_NilValue) error(yy, A); else errorcall(call, yy, A);
 
 /* This allows for the unusual case where x is of length 2,
    and x[[-m]] selects one element for m = 1, 2.
@@ -50,18 +56,18 @@ static R_INLINE int integerOneIndex(int i, R_xlen_t len, SEXP call)
     if (i > 0) /* a regular 1-based index from R */
 	indx = i - 1;
     else if (i == 0 || len < 2) {
-	ECALL(call, _("attempt to select less than one element"));
+	ECALL3(call, _("attempt to select less than one element in %s"), "integerOneIndex");
     } else if (len == 2 && i > -3)
 	indx = 2 + i;
     else {
-	ECALL(call, _("attempt to select more than one element"));
+	ECALL3(call, _("attempt to select more than one element in %s"), "integerOneIndex");
     }
     return indx;
 }
 
 /* Utility used (only in) do_subassign2_dflt(), i.e. "[[<-" in ./subassign.c : */
 R_xlen_t attribute_hidden
-OneIndex(SEXP x, SEXP s, R_xlen_t len, int partial, SEXP *newname, 
+OneIndex(SEXP x, SEXP s, R_xlen_t len, int partial, SEXP *newname,
 	 int pos, SEXP call)
 {
     SEXP names;
@@ -69,10 +75,10 @@ OneIndex(SEXP x, SEXP s, R_xlen_t len, int partial, SEXP *newname,
     const void *vmax;
 
     if (pos < 0 && length(s) > 1) {
-	ECALL(call, _("attempt to select more than one element"));
+	ECALL3(call, _("attempt to select more than one element in %s"), "OneIndex");
     }
     if (pos < 0 && length(s) < 1) {
-	ECALL(call, _("attempt to select less than one element"));
+	ECALL3(call, _("attempt to select less than one element in %s"), "OneIndex");
     }
 
     if(pos < 0) pos = 0;
@@ -90,7 +96,7 @@ OneIndex(SEXP x, SEXP s, R_xlen_t len, int partial, SEXP *newname,
     case STRSXP:
 	vmax = vmaxget();
 	nx = xlength(x);
-	names = getAttrib(x, R_NamesSymbol);
+	names = PROTECT(getAttrib(x, R_NamesSymbol));
 	if (names != R_NilValue) {
 	    /* Try for exact match */
 	    for (i = 0; i < nx; i++) {
@@ -116,6 +122,7 @@ OneIndex(SEXP x, SEXP s, R_xlen_t len, int partial, SEXP *newname,
 		}
 	    }
 	}
+	UNPROTECT(1); /* names */
 	if (indx == -1)
 	    indx = nx;
 	*newname = STRING_ELT(s, pos);
@@ -126,12 +133,14 @@ OneIndex(SEXP x, SEXP s, R_xlen_t len, int partial, SEXP *newname,
 	nx = xlength(x);
 	names = getAttrib(x, R_NamesSymbol);
 	if (names != R_NilValue) {
+	    PROTECT(names);
 	    for (i = 0; i < nx; i++)
 		if (streql(translateChar(STRING_ELT(names, i)),
 			   translateChar(PRINTNAME(s)))) {
 		    indx = i;
 		    break;
 		}
+	    UNPROTECT(1); /* names */
 	}
 	if (indx == -1)
 	    indx = nx;
@@ -139,11 +148,7 @@ OneIndex(SEXP x, SEXP s, R_xlen_t len, int partial, SEXP *newname,
 	vmaxset(vmax);
 	break;
     default:
-	if (call == R_NilValue)
-	    error(_("invalid subscript type '%s'"), type2char(TYPEOF(s)));
-	else
-	    errorcall(call, _("invalid subscript type '%s'"),
-		      type2char(TYPEOF(s)));
+	ECALL3(call, _("invalid subscript type '%s'"), type2char(TYPEOF(s)));
     }
     return indx;
 }
@@ -175,9 +180,9 @@ get1index(SEXP s, SEXP names, R_xlen_t len, int pok, int pos, SEXP call)
 
     if (pos < 0 && length(s) != 1) {
 	if (length(s) > 1) {
-	    ECALL(call, _("attempt to select more than one element"));
+	    ECALL3(call, _("attempt to select more than one element in %s"), "get1index");
 	} else {
-	    ECALL(call, _("attempt to select less than one element"));
+	    ECALL3(call, _("attempt to select less than one element in %s"), "get1index");
 	}
     } else
 	if(pos >= length(s)) {
@@ -201,11 +206,11 @@ get1index(SEXP s, SEXP names, R_xlen_t len, int pok, int pos, SEXP call)
 	    /* see comment above integerOneIndex */
 	    if (dblind > 0) indx = (R_xlen_t)(dblind - 1);
 	    else if (dblind == 0 || len < 2) {
-		ECALL(call, _("attempt to select less than one element"));
+		ECALL3(call, _("attempt to select less than one element in %s"), "get1index <real>");
 	    } else if (len == 2 && dblind > -3)
 		indx = (R_xlen_t)(2 + dblind);
 	    else {
-		ECALL(call, _("attempt to select more than one element"));
+		ECALL3(call, _("attempt to select more than one element in %s"), "get1index <real>");
 	    }
 	}
 	break;
@@ -270,23 +275,19 @@ get1index(SEXP s, SEXP names, R_xlen_t len, int pok, int pos, SEXP call)
 		break;
 	    }
     default:
-	if (call == R_NilValue)
-	    error(_("invalid subscript type '%s'"), type2char(TYPEOF(s)));
-	else
-	    errorcall(call, _("invalid subscript type '%s'"),
-		      type2char(TYPEOF(s)));
+	ECALL3(call, _("invalid subscript type '%s'"), type2char(TYPEOF(s)));
     }
     return indx;
 }
 
 /* This is used for [[ and [[<- with a vector of indices of length > 1 .
-   x is a list or pairlist, and it is indexed recusively from 
+   x is a list or pairlist, and it is indexed recusively from
    level start to level stop-1.  ( 0...len-1 or 0..len-2 then len-1).
    For [[<- it needs to duplicate if substructure might be shared.
  */
 SEXP attribute_hidden
 vectorIndex(SEXP x, SEXP thesub, int start, int stop, int pok, SEXP call,
-	    Rboolean dup) 
+	    Rboolean dup)
 {
     int i;
     R_xlen_t offset;
@@ -301,10 +302,13 @@ vectorIndex(SEXP x, SEXP thesub, int start, int stop, int pok, SEXP call,
 	    if (i)
 		errorcall(call, _("recursive indexing failed at level %d\n"), i+1);
 	    else
-		errorcall(call, _("attempt to select more than one element"));
+		errorcall(call, _("attempt to select more than one element in %s"), "vectorIndex");
 	}
-	offset = get1index(thesub, getAttrib(x, R_NamesSymbol),
-		           xlength(x), pok, i, call);
+	PROTECT(x);
+	SEXP names = PROTECT(getAttrib(x, R_NamesSymbol));
+	offset = get1index(thesub, names,
+			   xlength(x), pok, i, call);
+	UNPROTECT(2); /* x, names */
 	if(offset < 0 || offset >= xlength(x))
 	    errorcall(call, _("no such index at level %d\n"), i+1);
 	if(isPairList(x)) {
@@ -317,8 +321,10 @@ vectorIndex(SEXP x, SEXP thesub, int start, int stop, int pok, SEXP call,
 		SET_NAMED(CAR(x), NAMED(x));
 	    x = CAR(cx);
 	    if (dup && MAYBE_SHARED(x)) {
+		PROTECT(cx);
 		x = shallow_duplicate(x);
 		SETCAR(cx, x);
+		UNPROTECT(1); /* cx */
 	    }
 	} else {
 	    cx = x;
@@ -326,10 +332,12 @@ vectorIndex(SEXP x, SEXP thesub, int start, int stop, int pok, SEXP call,
 	    if (NAMED(cx) > NAMED(x))
 		SET_NAMED(x, NAMED(cx));
 	    if (dup && MAYBE_SHARED(x)) {
+		PROTECT(cx);
 		x = shallow_duplicate(x);
 		SET_VECTOR_ELT(cx, offset, x);
+		UNPROTECT(1); /* cx */
 	    }
-    	}
+	}
     }
     return x;
 }
@@ -447,20 +455,20 @@ SEXP attribute_hidden strmat2intmat(SEXP s, SEXP dnamelist, SEXP call)
     PROTECT(si = allocVector(INTSXP, xlength(s)));
     dimgets(si, getAttrib(s, R_DimSymbol));
     for (i = 0; i < length(dnamelist); i++) {
-        dnames = VECTOR_ELT(dnamelist, i);
-        for (j = 0; j < nr; j++)
-            SET_STRING_ELT(snames, j, STRING_ELT(s, j + (i * NR)));
-        PROTECT(sicol = match(dnames, snames, 0));
-        for (j = 0; j < nr; j++) {
-            v = INTEGER(sicol)[j];
-            idx = j + (i * NR);
-            s_elt = STRING_ELT(s, idx);
-            if (s_elt == NA_STRING) v = NA_INTEGER;
-            if (!CHAR(s_elt)[0]) v = 0; /* disallow "" match */
-            if (v == 0) errorcall(call, _("subscript out of bounds"));
-            INTEGER(si)[idx] = v;
-        }
-        UNPROTECT(1);
+	dnames = VECTOR_ELT(dnamelist, i);
+	for (j = 0; j < nr; j++)
+	    SET_STRING_ELT(snames, j, STRING_ELT(s, j + (i * NR)));
+	PROTECT(sicol = match(dnames, snames, 0));
+	for (j = 0; j < nr; j++) {
+	    v = INTEGER(sicol)[j];
+	    idx = j + (i * NR);
+	    s_elt = STRING_ELT(s, idx);
+	    if (s_elt == NA_STRING) v = NA_INTEGER;
+	    if (!CHAR(s_elt)[0]) v = 0; /* disallow "" match */
+	    if (v == 0) errorcall(call, _("subscript out of bounds"));
+	    INTEGER(si)[idx] = v;
+	}
+	UNPROTECT(1);
     }
     UNPROTECT(2);
     return si;
@@ -471,10 +479,10 @@ static SEXP nullSubscript(R_xlen_t n)
     SEXP indx;
 #ifdef LONG_VECTOR_SUPPORT
     if (n > R_SHORT_LEN_MAX) {
- 	indx = allocVector(REALSXP, n);
+	indx = allocVector(REALSXP, n);
 	for (R_xlen_t i = 0; i < n; i++)
 	    REAL(indx)[i] = (double)(i + 1);
-    } else 
+    } else
 #endif
     {
 	indx = allocVector(INTSXP, n);
@@ -485,10 +493,10 @@ static SEXP nullSubscript(R_xlen_t n)
 }
 
 
-static SEXP 
+static SEXP
 logicalSubscript(SEXP s, R_xlen_t ns, R_xlen_t nx, R_xlen_t *stretch, SEXP call)
 {
-    R_xlen_t count, i, nmax;
+    R_xlen_t count, i, nmax, i1, i2;
     int canstretch;
     SEXP indx;
     canstretch = *stretch > 0;
@@ -500,33 +508,103 @@ logicalSubscript(SEXP s, R_xlen_t ns, R_xlen_t nx, R_xlen_t *stretch, SEXP call)
     if (ns == 0) return(allocVector(INTSXP, 0));
 #ifdef LONG_VECTOR_SUPPORT
     if (nmax > R_SHORT_LEN_MAX) {
+	if (ns == nmax) { /* no recycling - use fast single-index code */
+	    const void *vmax = vmaxget();
+	    double *buf = (double *) R_alloc(nmax, sizeof(double));
+	    count = 0;
+	    R_ITERATE_CHECK(NINTERRUPT, nmax, i,                    \
+		if (LOGICAL(s)[i]) {                                \
+		    if (LOGICAL(s)[i] == NA_LOGICAL)		    \
+			buf[count++] = NA_REAL;		    \
+		    else					    \
+			buf[count++] = (double)(i + 1);	    \
+		});
+	    PROTECT(indx = allocVector(REALSXP, count));
+	    memcpy(REAL(indx), buf, sizeof(double) * count);
+	    vmaxset(vmax);
+	    UNPROTECT(1);
+	    return indx;
+	}
 	count = 0;
-	for (R_xlen_t i = 0; i < nmax; i++)
-	    if (LOGICAL(s)[i%ns]) count++;
-	indx = allocVector(REALSXP, count);
-	count = 0;
-	for (i = 0; i < nmax; i++)
-	    if (LOGICAL(s)[i%ns]) {
-		if (LOGICAL(s)[i%ns] == NA_LOGICAL)
-		    REAL(indx)[count++] = NA_REAL;
-		else
-		    REAL(indx)[count++] = (double)(i + 1);
+	/* we only need to scan s once even if we recycle,
+	   just remember the total count as well as
+	   the count for the last incomplete chunk (if any) */
+	i1 = (ns < nmax) ? (nmax % ns) : 0;
+	if (i1 > 0) { /* last recycling chunk is incomplete -
+			 we have to get the truncated count as well */
+	    R_xlen_t rem = 0;
+	    for (i = 0; i < ns; i++) {
+		if (i == i1) rem = count;
+		if (LOGICAL(s)[i]) count++;
 	    }
+	    count = count * (nmax / ns) + rem;
+	} else { /* nested recycling, total is sufficient */
+	    for (i = 0; i < ns; i++)
+		if (LOGICAL(s)[i]) count++;
+	    count *= nmax / ns;
+	}
+	PROTECT(indx = allocVector(REALSXP, count));
+	count = 0;
+	MOD_ITERATE_CHECK(NINTERRUPT, nmax, ns, nmax, i, i1, i2, \
+	    if (LOGICAL(s)[i1]) {				 \
+		if (LOGICAL(s)[i1] == NA_LOGICAL)		 \
+		    REAL(indx)[count++] = NA_REAL;		 \
+		else						 \
+		    REAL(indx)[count++] = (double)(i + 1);	 \
+	    });
+
+	UNPROTECT(1);
 	return indx;
     }
 #endif
+// else --- the same code for  non-long vectors --------------------------
+    if (ns == nmax) {  /* no recycling - use fast single-index code */
+	const void *vmax = vmaxget();
+	int *buf = (int *) R_alloc(nmax, sizeof(int));
+	count = 0;
+	R_ITERATE_CHECK(NINTERRUPT, nmax, i,                    \
+	    if (LOGICAL(s)[i]) {                                \
+		if (LOGICAL(s)[i] == NA_LOGICAL)	        \
+		    buf[count++] = NA_INTEGER;		\
+		else                                            \
+		    buf[count++] = (int)(i + 1);		\
+	    });
+	PROTECT(indx = allocVector(INTSXP, count));
+	memcpy(INTEGER(indx), buf, sizeof(int) * count);
+	vmaxset(vmax);
+	UNPROTECT(1);
+	return indx;
+    }
+
     count = 0;
-    for (i = 0; i < nmax; i++)
-	if (LOGICAL(s)[i%ns]) count++;
-    indx = allocVector(INTSXP, count);
-    count = 0;
-    for (i = 0; i < nmax; i++)
-	if (LOGICAL(s)[i%ns]) {
-	    if (LOGICAL(s)[i%ns] == NA_LOGICAL)
-		INTEGER(indx)[count++] = NA_INTEGER;
-	    else
-		INTEGER(indx)[count++] = (int)(i + 1);
+    /* we only need to scan s once even if we recycle,
+       just remember the total count as well as
+       the count for the last incomplete chunk (if any) */
+    i1 = (ns < nmax) ? (nmax % ns) : 0;
+    if (i1 > 0) { /* last recycling chunk is incomplete -
+		     we have to get the truncated count as well */
+	R_xlen_t rem = 0;
+	for (i = 0; i < ns; i++) {
+	    if (i == i1) rem = count;
+	    if (LOGICAL(s)[i]) count++;
 	}
+	count = count * (nmax / ns) + rem;
+    } else { /* nested recycling, total is sufficient */
+	for (i = 0; i < ns; i++)
+	    if (LOGICAL(s)[i]) count++;
+	count *= nmax / ns;
+    }
+    PROTECT(indx = allocVector(INTSXP, count));
+    count = 0;
+    MOD_ITERATE_CHECK(NINTERRUPT, nmax, ns, nmax, i, i1, i2,	\
+	if (LOGICAL(s)[i1]) {				\
+	    if (LOGICAL(s)[i1] == NA_LOGICAL)			\
+		INTEGER(indx)[count++] = NA_INTEGER;		\
+	    else						\
+		INTEGER(indx)[count++] = (int)(i + 1);		\
+	});
+
+    UNPROTECT(1);
     return indx;
 }
 
@@ -563,7 +641,7 @@ static SEXP positiveSubscript(SEXP s, R_xlen_t ns, R_xlen_t nx)
     } else return s;
 }
 
-static SEXP 
+static SEXP
 integerSubscript(SEXP s, R_xlen_t ns, R_xlen_t nx, R_xlen_t *stretch, SEXP call)
 {
     R_xlen_t i;
@@ -598,7 +676,7 @@ integerSubscript(SEXP s, R_xlen_t ns, R_xlen_t nx, R_xlen_t *stretch, SEXP call)
     return R_NilValue;
 }
 
-static SEXP 
+static SEXP
 realSubscript(SEXP s, R_xlen_t ns, R_xlen_t nx, R_xlen_t *stretch, SEXP call)
 {
     R_xlen_t i;
@@ -826,11 +904,7 @@ int_arraySubscript(int dim, SEXP s, SEXP dims, SEXP x, SEXP call)
 	if (s == R_MissingArg)
 	    return nullSubscript(nd);
     default:
-	if (call == R_NilValue)
-	    error(_("invalid subscript type '%s'"), type2char(TYPEOF(s)));
-	else
-	    errorcall(call, _("invalid subscript type '%s'"),
-		      type2char(TYPEOF(s)));
+	ECALL3(call, _("invalid subscript type '%s'"), type2char(TYPEOF(s)));
     }
     return R_NilValue;
 }
@@ -886,10 +960,6 @@ makeSubscript(SEXP x, SEXP s, R_xlen_t *stretch, SEXP call)
 	}
     }
 
-    PROTECT(s = duplicate(s));
-    SET_ATTRIB(s, R_NilValue);
-    SET_OBJECT(s, 0);
-
     SEXP ans = R_NilValue;
     switch (TYPEOF(s)) {
     case NILSXP:
@@ -900,16 +970,24 @@ makeSubscript(SEXP x, SEXP s, R_xlen_t *stretch, SEXP call)
 	ans = logicalSubscript(s, ns, nx, stretch, call);
 	break;
     case INTSXP:
+	PROTECT(s = duplicate(s));
+	SET_ATTRIB(s, R_NilValue);
+	SET_OBJECT(s, 0);
 	ans = integerSubscript(s, ns, nx, stretch, call);
+	UNPROTECT(1);
 	break;
     case REALSXP:
 	ans = realSubscript(s, ns, nx, stretch, call);
 	break;
     case STRSXP:
     {
+	PROTECT(s = duplicate(s));
+	SET_ATTRIB(s, R_NilValue);
+	SET_OBJECT(s, 0);
 	SEXP names = getAttrib(x, R_NamesSymbol);
 	/* *stretch = 0; */
 	ans = stringSubscript(s, ns, nx, names, stretch, call);
+	UNPROTECT(1);
 	break;
     }
     case SYMSXP:
@@ -919,12 +997,7 @@ makeSubscript(SEXP x, SEXP s, R_xlen_t *stretch, SEXP call)
 	    break;
 	}
     default:
-	if (call == R_NilValue)
-	    error(_("invalid subscript type '%s'"), type2char(TYPEOF(s)));
-	else
-	    errorcall(call, _("invalid subscript type '%s'"),
-		      type2char(TYPEOF(s)));
+	ECALL3(call, _("invalid subscript type '%s'"), type2char(TYPEOF(s)));
     }
-    UNPROTECT(1);
     return ans;
 }
diff --git a/src/main/subset.c b/src/main/subset.c
index 8848796..25f7921 100644
--- a/src/main/subset.c
+++ b/src/main/subset.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-2012   The R Core Team
+ *  Copyright (C) 1997-2015   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
@@ -15,7 +15,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  *
  *
  *  Vector and List Subsetting
@@ -158,9 +158,7 @@ static SEXP ExtractSubset(SEXP x, SEXP result, SEXP indx, SEXP call)
    matrix indexing of arrays */
 static SEXP VectorSubset(SEXP x, SEXP s, SEXP call)
 {
-    R_xlen_t n;
-    int mode;
-    R_xlen_t stretch = 1;
+    R_xlen_t n, stretch = 1;
     SEXP indx, result, attrib, nattrib;
 
     if (s == R_MissingArg) return duplicate(x);
@@ -172,16 +170,16 @@ static SEXP VectorSubset(SEXP x, SEXP s, SEXP call)
     /* If we do, make a real subscript vector and protect it. */
 
     if (isMatrix(s) && isArray(x) && ncols(s) == length(attrib)) {
-        if (isString(s)) {
-            s = strmat2intmat(s, GetArrayDimnames(x), call);
-            UNPROTECT(1);
-            PROTECT(s);
-        }
-        if (isInteger(s) || isReal(s)) {
-            s = mat2indsub(attrib, s, call);
-            UNPROTECT(1);
-            PROTECT(s);
-        }
+	if (isString(s)) {
+	    s = strmat2intmat(s, GetArrayDimnames(x), call);
+	    UNPROTECT(1);
+	    PROTECT(s);
+	}
+	if (isInteger(s) || isReal(s)) {
+	    s = mat2indsub(attrib, s, call);
+	    UNPROTECT(1);
+	    PROTECT(s);
+	}
     }
 
     /* Convert to a vector of integer subscripts */
@@ -192,7 +190,7 @@ static SEXP VectorSubset(SEXP x, SEXP s, SEXP call)
 
     /* Allocate the result. */
 
-    mode = TYPEOF(x);
+    int mode = TYPEOF(x);
     /* No protection needed as ExtractSubset does not allocate */
     result = allocVector(mode, n);
     if (mode == VECSXP || mode == EXPRSXP)
@@ -205,16 +203,17 @@ static SEXP VectorSubset(SEXP x, SEXP s, SEXP call)
 	if (
 	    ((attrib = getAttrib(x, R_NamesSymbol)) != R_NilValue) ||
 	    ( /* here we might have an array.  Use row names if 1D */
-		isArray(x) && LENGTH(getAttrib(x, R_DimNamesSymbol)) == 1 &&
+		isArray(x) && length(getAttrib(x, R_DimNamesSymbol)) == 1 &&
 		(attrib = getAttrib(x, R_DimNamesSymbol)) != R_NilValue &&
 		(attrib = GetRowNames(attrib)) != R_NilValue
 		)
 	    ) {
+	    PROTECT(attrib);
 	    nattrib = allocVector(TYPEOF(attrib), n);
 	    PROTECT(nattrib); /* seems unneeded */
 	    nattrib = ExtractSubset(attrib, nattrib, indx, call);
 	    setAttrib(result, R_NamesSymbol, nattrib);
-	    UNPROTECT(1);
+	    UNPROTECT(2); /* attrib, nattrib */
 	}
 	if ((attrib = getAttrib(x, R_SrcrefSymbol)) != R_NilValue &&
 	    TYPEOF(attrib) == VECSXP) {
@@ -295,6 +294,7 @@ static SEXP MatrixSubset(SEXP x, SEXP s, SEXP call, int drop)
 		    SET_STRING_ELT(result, ij, NA_STRING);
 		    break;
 		case VECSXP:
+		case EXPRSXP:
 		    SET_VECTOR_ELT(result, ij, R_NilValue);
 		    break;
 		case RAWSXP:
@@ -324,6 +324,7 @@ static SEXP MatrixSubset(SEXP x, SEXP s, SEXP call, int drop)
 		    SET_STRING_ELT(result, ij, STRING_ELT(x, iijj));
 		    break;
 		case VECSXP:
+		case EXPRSXP:
 		    SET_VECTOR_ELT(result, ij, VECTOR_ELT_FIX_NAMED(x, iijj));
 		    break;
 		case RAWSXP:
@@ -340,6 +341,8 @@ static SEXP MatrixSubset(SEXP x, SEXP s, SEXP call, int drop)
 	PROTECT(attr = allocVector(INTSXP, 2));
 	INTEGER(attr)[0] = nrs;
 	INTEGER(attr)[1] = ncs;
+	if(!isNull(getAttrib(dim, R_NamesSymbol)))
+	    setAttrib(attr, R_NamesSymbol, getAttrib(dim, R_NamesSymbol));
 	setAttrib(result, R_DimSymbol, attr);
 	UNPROTECT(1);
     }
@@ -351,7 +354,7 @@ static SEXP MatrixSubset(SEXP x, SEXP s, SEXP call, int drop)
     if (nrs >= 0 && ncs >= 0) {
 	SEXP dimnames, dimnamesnames, newdimnames;
 	dimnames = getAttrib(x, R_DimNamesSymbol);
-	dimnamesnames = getAttrib(dimnames, R_NamesSymbol);
+	PROTECT(dimnamesnames = getAttrib(dimnames, R_NamesSymbol));
 	if (!isNull(dimnames)) {
 	    PROTECT(newdimnames = allocVector(VECSXP, 2));
 	    if (TYPEOF(dimnames) == VECSXP) {
@@ -372,8 +375,9 @@ static SEXP MatrixSubset(SEXP x, SEXP s, SEXP call, int drop)
 	    }
 	    setAttrib(newdimnames, R_NamesSymbol, dimnamesnames);
 	    setAttrib(result, R_DimNamesSymbol, newdimnames);
-	    UNPROTECT(1);
+	    UNPROTECT(1); /* newdimnames */
 	}
+	UNPROTECT(1); /* dimnamesnames */
     }
     /*  Probably should not do this:
     copyMostAttrib(x, result); */
@@ -473,6 +477,7 @@ static SEXP ArraySubset(SEXP x, SEXP s, SEXP call, int drop)
 		SET_STRING_ELT(result, i, NA_STRING);
 	    break;
 	case VECSXP:
+	case EXPRSXP:
 	    if (ii != NA_INTEGER)
 		SET_VECTOR_ELT(result, i, VECTOR_ELT_FIX_NAMED(x, ii));
 	    else
@@ -497,11 +502,13 @@ static SEXP ArraySubset(SEXP x, SEXP s, SEXP call, int drop)
 	}
     }
 
-    PROTECT(xdims = allocVector(INTSXP, k));
+    SEXP new_dim = PROTECT(allocVector(INTSXP, k));
     for(int i = 0 ; i < k ; i++)
-	INTEGER(xdims)[i] = bound[i];
-    setAttrib(result, R_DimSymbol, xdims);
-    UNPROTECT(1);
+	INTEGER(new_dim)[i] = bound[i];
+    if(!isNull(getAttrib(xdims, R_NamesSymbol)))
+	setAttrib(new_dim, R_NamesSymbol, getAttrib(xdims, R_NamesSymbol));
+    setAttrib(result, R_DimSymbol, new_dim);
+    UNPROTECT(1); // new_dim
 
     /* The array elements have been transferred. */
     /* Now we need to transfer the attributes. */
@@ -509,7 +516,7 @@ static SEXP ArraySubset(SEXP x, SEXP s, SEXP call, int drop)
     /* dimnames of the returned value. */
 
     dimnames = getAttrib(x, R_DimNamesSymbol);
-    dimnamesnames = getAttrib(dimnames, R_NamesSymbol);
+    PROTECT(dimnamesnames = getAttrib(dimnames, R_NamesSymbol));
     if (dimnames != R_NilValue) {
 	int j = 0;
 	PROTECT(xdims = allocVector(VECSXP, k));
@@ -541,7 +548,7 @@ static SEXP ArraySubset(SEXP x, SEXP s, SEXP call, int drop)
 	}
 	setAttrib(xdims, R_NamesSymbol, dimnamesnames);
 	setAttrib(result, R_DimNamesSymbol, xdims);
-	UNPROTECT(1);
+	UNPROTECT(1); /* xdims */
     }
     /* This was removed for matrices in 1998
        copyMostAttrib(x, result); */
@@ -549,7 +556,7 @@ static SEXP ArraySubset(SEXP x, SEXP s, SEXP call, int drop)
     vmaxset(vmaxsave);
     if (drop)
 	DropDims(result);
-    UNPROTECT(1);
+    UNPROTECT(2); /* dimnamesnames, result */
     return result;
 }
 
@@ -659,21 +666,25 @@ SEXP attribute_hidden do_subset(SEXP call, SEXP op, SEXP args, SEXP rho)
 
 static R_INLINE R_xlen_t scalarIndex(SEXP s)
 {
-    if (ATTRIB(s) == R_NilValue)
-	switch (TYPEOF(s)) {
-	case REALSXP: // treat infinite indices as NA, like asInteger
-	    if (XLENGTH(s) == 1 && R_FINITE(REAL(s)[0]))
-		return (R_xlen_t) REAL(s)[0];
+    if (ATTRIB(s) == R_NilValue) {
+	if (IS_SCALAR(s, INTSXP)) {
+	    int ival = INTEGER(s)[0];
+	    if (ival != NA_INTEGER)
+		return ival;
 	    else return -1;
-	case INTSXP:
-	    if (XLENGTH(s) == 1 && INTEGER(s)[0] != NA_INTEGER)
-		return INTEGER(s)[0];
+	}
+	else if (IS_SCALAR(s, REALSXP)) {
+	    double rval = REAL(s)[0];
+	    // treat infinite indices as NA, like asInteger
+	    if (R_FINITE(rval))
+		return (R_xlen_t) rval;
 	    else return -1;
-	default: return -1;
 	}
+	else return -1;
+    }
     else return -1;
 }
-    
+
 SEXP attribute_hidden do_subset_dflt(SEXP call, SEXP op, SEXP args, SEXP rho)
 {
     SEXP ans, ax, px, x, subs;
@@ -705,6 +716,15 @@ SEXP attribute_hidden do_subset_dflt(SEXP call, SEXP op, SEXP args, SEXP rho)
 		if (i >= 1 && i <= XLENGTH(x))
 		    return ScalarLogical( LOGICAL(x)[i-1] );
 		break;
+//	    do the more rare cases as well, since we've already prepared everything:
+	    case CPLXSXP:
+		if (i >= 1 && i <= XLENGTH(x))
+		    return ScalarComplex( COMPLEX(x)[i-1] );
+		break;
+	    case RAWSXP:
+		if (i >= 1 && i <= XLENGTH(x))
+		    return ScalarRaw( RAW(x)[i-1] );
+		break;
 	    default: break;
 	    }
 	}
@@ -730,17 +750,25 @@ SEXP attribute_hidden do_subset_dflt(SEXP call, SEXP op, SEXP args, SEXP rho)
 		    R_xlen_t k = i - 1 + nrow * (j - 1);
 		    switch (TYPEOF(x)) {
 		    case REALSXP:
-			if (k < LENGTH(x))
+			if (k < XLENGTH(x))
 			    return ScalarReal( REAL(x)[k] );
 			break;
 		    case INTSXP:
-			if (k < LENGTH(x))
+			if (k < XLENGTH(x))
 			    return ScalarInteger( INTEGER(x)[k] );
 			break;
 		    case LGLSXP:
-			if (k < LENGTH(x))
+			if (k < XLENGTH(x))
 			    return ScalarLogical( LOGICAL(x)[k] );
 			break;
+		    case CPLXSXP:
+			if (k < XLENGTH(x))
+			    return ScalarComplex( COMPLEX(x)[k] );
+			break;
+		    case RAWSXP:
+			if (k < XLENGTH(x))
+			    return ScalarRaw( RAW(x)[k] );
+			break;
 		    default: break;
 		    }
 		}
@@ -802,18 +830,19 @@ SEXP attribute_hidden do_subset_dflt(SEXP call, SEXP op, SEXP args, SEXP rho)
 	   length one and drop == TRUE
 	*/
 	if(ndim == 1) {
-	    SEXP attr, attrib, nattrib;
 	    int len = length(ans);
-
 	    if(!drop || len > 1) {
 		// must grab these before the dim is set.
 		SEXP nm = PROTECT(getAttrib(ans, R_NamesSymbol));
-		PROTECT(attr = allocVector(INTSXP, 1));
+		SEXP attr = PROTECT(allocVector(INTSXP, 1));
 		INTEGER(attr)[0] = length(ans);
+		if(!isNull(getAttrib(dim, R_NamesSymbol)))
+		    setAttrib(attr, R_NamesSymbol, getAttrib(dim, R_NamesSymbol));
 		setAttrib(ans, R_DimSymbol, attr);
+		SEXP attrib;
 		if((attrib = getAttrib(x, R_DimNamesSymbol)) != R_NilValue) {
 		    /* reinstate dimnames, include names of dimnames */
-		    PROTECT(nattrib = duplicate(attrib));
+		    SEXP nattrib = PROTECT(duplicate(attrib));
 		    SET_VECTOR_ELT(nattrib, 0, nm);
 		    setAttrib(ans, R_DimNamesSymbol, nattrib);
 		    setAttrib(ans, R_NamesSymbol, R_NilValue);
@@ -838,14 +867,15 @@ SEXP attribute_hidden do_subset_dflt(SEXP call, SEXP op, SEXP args, SEXP rho)
     if (type == LANGSXP) {
 	ax = ans;
 	PROTECT(ans = allocList(LENGTH(ax)));
-	if ( LENGTH(ax) > 0 )
+	if ( LENGTH(ax) > 0 ) {
 	    SET_TYPEOF(ans, LANGSXP);
-	for(px = ans, i = 0 ; px != R_NilValue ; px = CDR(px))
-	    SETCAR(px, VECTOR_ELT(ax, i++));
-	setAttrib(ans, R_DimSymbol, getAttrib(ax, R_DimSymbol));
-	setAttrib(ans, R_DimNamesSymbol, getAttrib(ax, R_DimNamesSymbol));
-	setAttrib(ans, R_NamesSymbol, getAttrib(ax, R_NamesSymbol));
-	SET_NAMED(ans, NAMED(ax)); /* PR#7924 */
+	    for(px = ans, i = 0 ; px != R_NilValue ; px = CDR(px))
+		SETCAR(px, VECTOR_ELT(ax, i++));
+	    setAttrib(ans, R_DimSymbol, getAttrib(ax, R_DimSymbol));
+	    setAttrib(ans, R_DimNamesSymbol, getAttrib(ax, R_DimNamesSymbol));
+	    setAttrib(ans, R_NamesSymbol, getAttrib(ax, R_NamesSymbol));
+	    SET_NAMED(ans, NAMED(ax)); /* PR#7924 */
+	}
     }
     else {
 	PROTECT(ans);
@@ -912,7 +942,7 @@ SEXP attribute_hidden do_subset2_dflt(SEXP call, SEXP op, SEXP args, SEXP rho)
     /* but in fact S does not do this.	Will anyone notice? */
 
     if (x == R_NilValue) {
-	UNPROTECT(1);
+	UNPROTECT(1); /* args */
 	return x;
     }
 
@@ -929,10 +959,11 @@ SEXP attribute_hidden do_subset2_dflt(SEXP call, SEXP op, SEXP args, SEXP rho)
 
     /* code to allow classes to extend environment */
     if(TYPEOF(x) == S4SXP) {
-        x = R_getS4DataSlot(x, ANYSXP);
+	x = R_getS4DataSlot(x, ANYSXP);
 	if(x == R_NilValue)
 	  errorcall(call, _("this S4 class is not subsettable"));
     }
+    PROTECT(x);
 
     /* split out ENVSXP for now */
     if( TYPEOF(x) == ENVSXP ) {
@@ -942,10 +973,10 @@ SEXP attribute_hidden do_subset2_dflt(SEXP call, SEXP op, SEXP args, SEXP rho)
 	if( TYPEOF(ans) == PROMSXP ) {
 	    PROTECT(ans);
 	    ans = eval(ans, R_GlobalEnv);
-	    UNPROTECT(1);
+	    UNPROTECT(1); /* ans */
 	} else SET_NAMED(ans, 2);
 
-	UNPROTECT(1);
+	UNPROTECT(2); /* args, x */
 	if(ans == R_UnboundValue)
 	    return(R_NilValue);
 	if (NAMED(ans))
@@ -980,17 +1011,21 @@ SEXP attribute_hidden do_subset2_dflt(SEXP call, SEXP op, SEXP args, SEXP rho)
 	    x = vectorIndex(x, thesub, 0, len-1, pok, call, FALSE);
 #endif
 	    named_x = NAMED(x);
+	    UNPROTECT(1); /* x */
+	    PROTECT(x);
 	}
-	    
-	offset = get1index(thesub, getAttrib(x, R_NamesSymbol),
+
+	SEXP xnames = PROTECT(getAttrib(x, R_NamesSymbol));
+	offset = get1index(thesub, xnames,
 			   xlength(x), pok, len > 1 ? len-1 : -1, call);
+	UNPROTECT(1); /* xnames */
 	if (offset < 0 || offset >= xlength(x)) {
 	    /* a bold attempt to get the same behaviour for $ and [[ */
 	    if (offset < 0 && (isNewList(x) ||
 			       isExpression(x) ||
 			       isList(x) ||
 			       isLanguage(x))) {
-		UNPROTECT(1);
+		UNPROTECT(2); /* args, x */
 		return R_NilValue;
 	    }
 	    else errorcall(call, R_MSG_subs_o_b);
@@ -1008,7 +1043,7 @@ SEXP attribute_hidden do_subset2_dflt(SEXP call, SEXP op, SEXP args, SEXP rho)
 	ndn = length(dimnames);
 	for (i = 0; i < nsubs; i++) {
 	    INTEGER(indx)[i] = (int)
-		get1index(CAR(subs), 
+		get1index(CAR(subs),
 			  (i < ndn) ? VECTOR_ELT(dimnames, i) : R_NilValue,
 			  INTEGER(indx)[i], pok, -1, call);
 	    subs = CDR(subs);
@@ -1020,7 +1055,7 @@ SEXP attribute_hidden do_subset2_dflt(SEXP call, SEXP op, SEXP args, SEXP rho)
 	for (i = (nsubs - 1); i > 0; i--)
 	    offset = (offset + INTEGER(indx)[i]) * INTEGER(dims)[i - 1];
 	offset += INTEGER(indx)[0];
-	UNPROTECT(1);
+	UNPROTECT(1); /* indx */
     }
 
     if(isPairList(x)) {
@@ -1059,10 +1094,26 @@ SEXP attribute_hidden do_subset2_dflt(SEXP call, SEXP op, SEXP args, SEXP rho)
 	    UNIMPLEMENTED_TYPE("do_subset2", x);
 	}
     }
-    UNPROTECT(1);
+    UNPROTECT(2); /* args, x */
     return ans;
 }
 
+SEXP attribute_hidden dispatch_subset2(SEXP x, R_xlen_t i, SEXP call, SEXP rho)
+{
+    static SEXP bracket_op = NULL;
+    SEXP args, x_elt;
+    if (isObject(x)) {
+        if (bracket_op == NULL)
+            bracket_op = R_Primitive("[[");
+        PROTECT(args = list2(x, ScalarReal(i + 1)));
+        x_elt = do_subset2(call, bracket_op, args, rho);
+        UNPROTECT(1);
+    } else {
+      // FIXME: throw error if not a list
+        x_elt = VECTOR_ELT(x, i);
+    }
+    return(x_elt);
+}
 
 enum pmatch {
     NO_MATCH,
@@ -1101,29 +1152,28 @@ pstrmatch(SEXP target, SEXP input, size_t slen)
     }
 }
 
-
-/* The $ subset operator.
-   We need to be sure to only evaluate the first argument.
-   The second will be a symbol that needs to be matched, not evaluated.
-*/
-SEXP attribute_hidden do_subset3(SEXP call, SEXP op, SEXP args, SEXP env)
+SEXP attribute_hidden
+fixSubset3Args(SEXP call, SEXP args, SEXP env, SEXP* syminp)
 {
-    SEXP input, nlist, ans;
-
-    checkArity(op, args);
+    SEXP input, nlist;
 
     /* first translate CADR of args into a string so that we can
        pass it down to DispatchorEval and have it behave correctly */
-    input = PROTECT(allocVector(STRSXP, 1));
 
+    PROTECT(input = allocVector(STRSXP, 1));
     nlist = CADR(args);
-    if(isSymbol(nlist) )
+    if (TYPEOF(nlist) == PROMSXP)
+	nlist = eval(nlist, env);
+    if(isSymbol(nlist)) {
+	if (syminp != NULL)
+	    *syminp = nlist;
 	SET_STRING_ELT(input, 0, PRINTNAME(nlist));
-    else if(isString(nlist) )
+    } else if(isString(nlist) )
 	SET_STRING_ELT(input, 0, STRING_ELT(nlist, 0));
     else {
 	errorcall(call,_("invalid subscript type '%s'"),
 		  type2char(TYPEOF(nlist)));
+	return R_NilValue; /*-Wall*/
     }
 
     /* replace the second argument with a string */
@@ -1131,7 +1181,23 @@ SEXP attribute_hidden do_subset3(SEXP call, SEXP op, SEXP args, SEXP env)
     /* Previously this was SETCADR(args, input); */
     /* which could cause problems when nlist was */
     /* ..., as in PR#8718 */
-    PROTECT(args = CONS(CAR(args), CONS(input, R_NilValue)));
+
+    args = shallow_duplicate(args);
+    SETCADR(args, input);
+    UNPROTECT(1); /* input */
+    return args;
+}
+
+/* The $ subset operator.
+   We need to be sure to only evaluate the first argument.
+   The second will be a symbol that needs to be matched, not evaluated.
+*/
+SEXP attribute_hidden do_subset3(SEXP call, SEXP op, SEXP args, SEXP env)
+{
+    SEXP ans;
+
+    checkArity(op, args);
+    PROTECT(args = fixSubset3Args(call, args, env, NULL));
 
     /* If the first argument is an object and there is */
     /* an approriate method, we dispatch to that method, */
@@ -1140,14 +1206,15 @@ SEXP attribute_hidden do_subset3(SEXP call, SEXP op, SEXP args, SEXP env)
     /* evaluation retains any missing argument indicators. */
 
     if(R_DispatchOrEvalSP(call, op, "$", args, env, &ans)) {
-	UNPROTECT(2);
+	UNPROTECT(1); /* args */
 	if (NAMED(ans))
 	    SET_NAMED(ans, 2);
 	return(ans);
     }
-
-    UNPROTECT(2);
-    return R_subset3_dflt(CAR(ans), STRING_ELT(input, 0), call);
+    PROTECT(ans);
+    ans = R_subset3_dflt(CAR(ans), STRING_ELT(CADR(args), 0), call);
+    UNPROTECT(2); /* args, ans */
+    return ans;
 }
 
 /* used in eval.c */
@@ -1156,30 +1223,32 @@ SEXP attribute_hidden R_subset3_dflt(SEXP x, SEXP input, SEXP call)
     SEXP y, nlist;
     size_t slen;
 
-    PROTECT(x);
     PROTECT(input);
+    PROTECT(x);
 
     /* Optimisation to prevent repeated recalculation */
     slen = strlen(translateChar(input));
      /* The mechanism to allow a class extending "environment" */
     if( IS_S4_OBJECT(x) && TYPEOF(x) == S4SXP ){
-        x = R_getS4DataSlot(x, ANYSXP);
+	x = R_getS4DataSlot(x, ANYSXP);
 	if(x == R_NilValue)
 	    errorcall(call, "$ operator not defined for this S4 class");
     }
+    UNPROTECT(1); /* x */
+    PROTECT(x);
 
     /* If this is not a list object we return NULL. */
 
     if (isPairList(x)) {
 	SEXP xmatch = R_NilValue;
 	int havematch;
-	UNPROTECT(2);
 	havematch = 0;
 	for (y = x ; y != R_NilValue ; y = CDR(y)) {
 	    switch(pstrmatch(TAG(y), input, slen)) {
 	    case EXACT_MATCH:
 		y = CAR(y);
 		if (NAMED(x) > NAMED(y)) SET_NAMED(y, NAMED(x));
+		UNPROTECT(2); /* input, x */
 		return y;
 	    case PARTIAL_MATCH:
 		havematch++;
@@ -1206,15 +1275,17 @@ SEXP attribute_hidden R_subset3_dflt(SEXP x, SEXP input, SEXP call)
 	    }
 	    y = CAR(xmatch);
 	    if (NAMED(x) > NAMED(y)) SET_NAMED(y, NAMED(x));
+	    UNPROTECT(2); /* input, x */
 	    return y;
 	}
+	UNPROTECT(2); /* input, x */
 	return R_NilValue;
     }
     else if (isVectorList(x)) {
 	R_xlen_t i, n, imatch = -1;
 	int havematch;
 	nlist = getAttrib(x, R_NamesSymbol);
-	UNPROTECT(2);
+
 	n = xlength(nlist);
 	havematch = 0;
 	for (i = 0 ; i < n ; i = i + 1) {
@@ -1223,6 +1294,7 @@ SEXP attribute_hidden R_subset3_dflt(SEXP x, SEXP input, SEXP call)
 		y = VECTOR_ELT(x, i);
 		if (NAMED(x) > NAMED(y))
 		    SET_NAMED(y, NAMED(x));
+		UNPROTECT(2); /* input, x */
 		return y;
 	    case PARTIAL_MATCH:
 		havematch++;
@@ -1257,8 +1329,10 @@ SEXP attribute_hidden R_subset3_dflt(SEXP x, SEXP input, SEXP call)
 	    }
 	    y = VECTOR_ELT(x, imatch);
 	    if (NAMED(x) > NAMED(y)) SET_NAMED(y, NAMED(x));
+	    UNPROTECT(2); /* input, x */
 	    return y;
 	}
+	UNPROTECT(2); /* input, x */
 	return R_NilValue;
     }
     else if( isEnvironment(x) ){
@@ -1266,9 +1340,9 @@ SEXP attribute_hidden R_subset3_dflt(SEXP x, SEXP input, SEXP call)
 	if( TYPEOF(y) == PROMSXP ) {
 	    PROTECT(y);
 	    y = eval(y, R_GlobalEnv);
-	    UNPROTECT(1);
+	    UNPROTECT(1); /* y */
 	}
-	UNPROTECT(2);
+	UNPROTECT(2); /* input, x */
 	if( y != R_UnboundValue ) {
 	    if (NAMED(y))
 		SET_NAMED(y, 2);
@@ -1283,6 +1357,6 @@ SEXP attribute_hidden R_subset3_dflt(SEXP x, SEXP input, SEXP call)
     }
     else /* e.g. a function */
 	errorcall(call, R_MSG_ob_nonsub, type2char(TYPEOF(x)));
-    UNPROTECT(2);
+    UNPROTECT(2); /* input, x */
     return R_NilValue;
 }
diff --git a/src/main/summary.c b/src/main/summary.c
index 945d5c7..9543d5b 100644
--- a/src/main/summary.c
+++ b/src/main/summary.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-2013   The R Core Team
+ *  Copyright (C) 1997--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
@@ -15,7 +15,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  */
 
 #ifdef HAVE_CONFIG_H
@@ -24,9 +24,12 @@
 
 #include <Defn.h>
 #include <Internal.h>
+#include <R_ext/Itermacros.h>
 
 #include <float.h> // for DBL_MAX
 
+#include "duplicate.h"
+
 #define R_MSG_type	_("invalid 'type' (%s) of argument")
 #define imax2(x, y) ((x < y) ? y : x)
 
@@ -404,6 +407,7 @@ SEXP attribute_hidden do_summary(SEXP call, SEXP op, SEXP args, SEXP env)
 	/* updated := 1 , as soon as (i)tmp (do_summary),
 	   or *value ([ir]min / max) is assigned */
 
+    checkArity(op, args);
     if(PRIMVAL(op) == 1) { /* mean */
 	LDOUBLE s = 0., si = 0., t = 0., ti = 0.;
 	R_xlen_t i, n = XLENGTH(CAR(args));
@@ -415,7 +419,7 @@ SEXP attribute_hidden do_summary(SEXP call, SEXP op, SEXP args, SEXP env)
 	    for (i = 0; i < n; i++) {
 		if(INTEGER(x)[i] == NA_INTEGER) {
 		    REAL(ans)[0] = R_NaReal;
-		    UNPROTECT(1);
+		    UNPROTECT(1); /* ans */
 		    return ans;
 		}
 		s += INTEGER(x)[i];
@@ -453,20 +457,20 @@ SEXP attribute_hidden do_summary(SEXP call, SEXP op, SEXP args, SEXP env)
 	    error(R_MSG_type, type2char(TYPEOF(x)));
 	    ans = R_NilValue; // -Wall on clang 4.2
 	}
-	UNPROTECT(1);
+	UNPROTECT(1); /* ans */
 	return ans;
     }
 
     /* match to foo(..., na.rm=FALSE) */
     PROTECT(args = fixup_NaRm(args));
-    PROTECT(call2 = duplicate(call));
+    PROTECT(call2 = shallow_duplicate(call));
     SETCDR(call2, args);
 
     if (DispatchGroup("Summary", call2, op, args, env, &ans)) {
-	UNPROTECT(2);
+	UNPROTECT(2); /* call2, args */
 	return(ans);
     }
-    UNPROTECT(1);
+    UNPROTECT(1); /* call2 */
 
 #ifdef DEBUG_Summary
     REprintf("C do_summary(op%s, *): did NOT dispatch\n", PRIMNAME(op));
@@ -525,6 +529,7 @@ SEXP attribute_hidden do_summary(SEXP call, SEXP op, SEXP args, SEXP env)
     }
 
     /*-- now loop over all arguments.  Do the 'op' switch INSIDE : */
+    PROTECT(scum);
     while (args != R_NilValue) {
 	a = CAR(args);
 	int_a = 0;/* int_a = 1	<-->	a is INTEGER */
@@ -554,10 +559,15 @@ SEXP attribute_hidden do_summary(SEXP call, SEXP op, SEXP args, SEXP env)
 		    else	  updated = rmax(REAL(a), XLENGTH(a), &tmp, narm);
 		    break;
 		case STRSXP:
-		    if(!empty && ans_type == INTSXP)
+		    if(!empty && ans_type == INTSXP) {
 			scum = StringFromInteger(icum, &warn);
-		    else if(!empty && ans_type == REALSXP)
+			UNPROTECT(1); /* scum */
+			PROTECT(scum);
+		    } else if(!empty && ans_type == REALSXP) {
 			scum = StringFromReal(zcum.r, &warn);
+			UNPROTECT(1); /* scum */
+			PROTECT(scum);
+		    }
 		    ans_type = STRSXP;
 		    if (iop == 2) updated = smin(a, &stmp, narm);
 		    else updated = smax(a, &stmp, narm);
@@ -586,17 +596,23 @@ SEXP attribute_hidden do_summary(SEXP call, SEXP op, SEXP args, SEXP env)
 			    (iop == 2 && tmp < zcum.r) ||
 			    (iop == 3 && tmp > zcum.r))	zcum.r = tmp;
 		    } else if(ans_type == STRSXP) {
-			if(empty) scum = stmp;
+			if(int_a)
+			   stmp = StringFromInteger(itmp, &warn);
+			else if(real_a)
+			   stmp = StringFromReal(tmp, &warn);
+
+			if(empty)
+			    scum = stmp;
 			else if (scum != NA_STRING) {
-			    if(int_a)
-				stmp = StringFromInteger(itmp, &warn);
-			    if(real_a)
-				stmp = StringFromReal(tmp, &warn);
+			    PROTECT(stmp);
 			    if(stmp == NA_STRING ||
 			       (iop == 2 && stmp != scum && Scollate(stmp, scum) < 0) ||
 			       (iop == 3 && stmp != scum && Scollate(stmp, scum) > 0) )
 				scum = stmp;
+			    UNPROTECT(1); /* stmp */
 			}
+			UNPROTECT(1); /* scum */
+			PROTECT(scum);
 		    }
 		}/*updated*/ else {
 		    /*-- in what cases does this happen here at all?
@@ -703,10 +719,15 @@ SEXP attribute_hidden do_summary(SEXP call, SEXP op, SEXP args, SEXP env)
 		break;
 	    case STRSXP:
 		if (iop == 2 || iop == 3) {
-		    if(!empty && ans_type == INTSXP)
+		    if(!empty && ans_type == INTSXP) {
 			scum = StringFromInteger(icum, &warn);
-		    else if(!empty && ans_type == REALSXP)
+			UNPROTECT(1); /* scum */
+			PROTECT(scum);
+		    } else if(!empty && ans_type == REALSXP) {
 			scum = StringFromReal(zcum.r, &warn);
+			UNPROTECT(1); /* scum */
+			PROTECT(scum);
+		    }
 		    ans_type = STRSXP;
 		    break;
 		}
@@ -745,7 +766,7 @@ SEXP attribute_hidden do_summary(SEXP call, SEXP op, SEXP args, SEXP env)
     case CPLXSXP:  COMPLEX(ans)[0].r = zcum.r; COMPLEX(ans)[0].i = zcum.i;break;
     case STRSXP:   SET_STRING_ELT(ans, 0, scum); break;
     }
-    UNPROTECT(1);  /* args */
+    UNPROTECT(2); /* scum, args */
     return ans;
 
 na_answer: /* only sum(INTSXP, ...) case currently used */
@@ -756,7 +777,7 @@ na_answer: /* only sum(INTSXP, ...) case currently used */
     case CPLXSXP:	COMPLEX(ans)[0].r = COMPLEX(ans)[0].i = NA_REAL; break;
     case STRSXP:        SET_STRING_ELT(ans, 0, NA_STRING); break;
     }
-    UNPROTECT(1);  /* args */
+    UNPROTECT(2); /* scum, args */
     return ans;
 
 invalid_type:
@@ -770,7 +791,7 @@ SEXP attribute_hidden do_range(SEXP call, SEXP op, SEXP args, SEXP env)
     SEXP ans, a, b, prargs, call2;
 
     PROTECT(args = fixup_NaRm(args));
-    PROTECT(call2 = duplicate(call));
+    PROTECT(call2 = shallow_duplicate(call));
     SETCDR(call2, args);
 
     if (DispatchGroup("Summary", call2, op, args, env, &ans)) {
@@ -783,44 +804,93 @@ SEXP attribute_hidden do_range(SEXP call, SEXP op, SEXP args, SEXP env)
     PROTECT(prargs = promiseArgs(args, R_GlobalEnv));
     for (a = args, b = prargs; a != R_NilValue; a = CDR(a), b = CDR(b))
 	SET_PRVALUE(CAR(b), CAR(a));
-    ans = applyClosure(call, op, prargs, env, R_BaseEnv);
+    ans = applyClosure(call, op, prargs, env, R_NilValue);
     UNPROTECT(3);
     return(ans);
 }
 

-/* which.min(x) : The index (starting at 1), of the first min(x) in x */
+// which.min(x) : The index (starting at 1), of the first min(x) in x
+// which.max(x) : The index (starting at 1), of the first max(x) in x
 SEXP attribute_hidden do_first_min(SEXP call, SEXP op, SEXP args, SEXP rho)
 {
-    SEXP sx, ans;
-    double s, *r;
-    int i, n, indx;
+    SEXP sx = CAR(args), ans;
+    int nprot = 1;
+    R_xlen_t i, n, indx = -1;
 
     checkArity(op, args);
-    PROTECT(sx = coerceVector(CAR(args), REALSXP));
-    if (!isNumeric(sx))
-	error(_("non-numeric argument"));
-    r = REAL(sx);
-    n = LENGTH(sx);
-    indx = NA_INTEGER;
-
-    if(PRIMVAL(op) == 0) { /* which.min */
-	s = R_PosInf;
-	for (i = 0; i < n; i++)
-	    if ( !ISNAN(r[i]) && (r[i] < s || indx == NA_INTEGER) ) {
-		s = r[i]; indx = i;
-	    }
-    } else { /* which.max */
-	s = R_NegInf;
-	for (i = 0; i < n; i++)
-	    if ( !ISNAN(r[i]) && (r[i] > s || indx == NA_INTEGER) ) {
-		s = r[i]; indx = i;
-	    }
+    if (!isNumeric(sx)) {
+	PROTECT(sx = coerceVector(CAR(args), REALSXP)); nprot++;
     }
+    n = XLENGTH(sx);
+    switch(TYPEOF(sx)) {
+    case LGLSXP: // with only (TRUE, FALSE, NA) -- may be fast
+    {
+	int *r = LOGICAL(sx);
+	if(PRIMVAL(op) == 0) { /* which.min */
+	    for (i = 0; i < n; i++)
+		if (r[i] == FALSE) {
+		    indx = i; break; // found FALSE: done
+		} else if (indx == -1 && r[i] != NA_LOGICAL) {
+		    indx = i; // first TRUE
+		}
+	} else { /* which.max */
+	    for (i = 0; i < n; i++)
+		if (r[i] == TRUE) {
+		    indx = i; break; // found TRUE: done
+		} else if (indx == -1 && r[i] != NA_LOGICAL) {
+		    indx = i; // first FALSE
+		}
+	}
+    }
+    break;
 
-    i = (indx != NA_INTEGER);
-    PROTECT(ans = allocVector(INTSXP, i ? 1 : 0));
+    case INTSXP:
+    {
+	int s, *r = INTEGER(sx);
+	if(PRIMVAL(op) == 0) { /* which.min */
+	    s = INT_MAX;
+	    for (i = 0; i < n; i++)
+		if (r[i] != NA_INTEGER && (r[i] < s || indx == -1)) {
+		    s = r[i]; indx = i;
+		}
+	} else { /* which.max */
+	    s = INT_MIN;
+	    for (i = 0; i < n; i++)
+		if (r[i] != NA_INTEGER && (r[i] > s || indx == -1)) {
+		    s = r[i]; indx = i;
+		}
+	}
+    }
+    break;
+
+    case REALSXP:
+    {
+	double s, *r = REAL(sx);
+	if(PRIMVAL(op) == 0) { /* which.min */
+	    s = R_PosInf;
+	    for (i = 0; i < n; i++)
+		if ( !ISNAN(r[i]) && (r[i] < s || indx == -1) ) {
+		    s = r[i]; indx = i;
+		}
+	} else { /* which.max */
+	    s = R_NegInf;
+	    for (i = 0; i < n; i++)
+		if ( !ISNAN(r[i]) && (r[i] > s || indx == -1) ) {
+		    s = r[i]; indx = i;
+		}
+	}
+    }
+    } // switch()
+
+
+    i = (indx != -1);
+    Rboolean large = (indx + 1) > INT_MAX;
+    PROTECT(ans = allocVector(large ? REALSXP : INTSXP, i ? 1 : 0));
     if (i) {
-	INTEGER(ans)[0] = indx + 1;
+	if(large)
+	    REAL(ans)[0] = (double)indx + 1;
+	else
+	    INTEGER(ans)[0] = (int)indx + 1;
 	if (getAttrib(sx, R_NamesSymbol) != R_NilValue) { /* preserve names */
 	    SEXP ansnam;
 	    PROTECT(ansnam =
@@ -829,10 +899,11 @@ SEXP attribute_hidden do_first_min(SEXP call, SEXP op, SEXP args, SEXP rho)
 	    UNPROTECT(1);
 	}
     }
-    UNPROTECT(2);
+    UNPROTECT(nprot);
     return ans;
 }
 
+
 /* which(x) : indices of non-NA TRUE values in x */
 SEXP attribute_hidden do_which(SEXP call, SEXP op, SEXP args, SEXP rho)
 {
@@ -842,29 +913,29 @@ SEXP attribute_hidden do_which(SEXP call, SEXP op, SEXP args, SEXP rho)
     checkArity(op, args);
     v = CAR(args);
     if (!isLogical(v))
-        error(_("argument to 'which' is not logical"));
+	error(_("argument to 'which' is not logical"));
     len = length(v);
     buf = (int *) R_alloc(len, sizeof(int));
 
     for (i = 0; i < len; i++) {
-        if (LOGICAL(v)[i] == TRUE) {
-            buf[j] = i + 1;
-            j++;
-        }
+	if (LOGICAL(v)[i] == TRUE) {
+	    buf[j] = i + 1;
+	    j++;
+	}
     }
 
     len = j;
     PROTECT(ans = allocVector(INTSXP, len));
-    memcpy(INTEGER(ans), buf, sizeof(int) * len);
+    if(len) memcpy(INTEGER(ans), buf, sizeof(int) * len);
 
     if ((v_nms = getAttrib(v, R_NamesSymbol)) != R_NilValue) {
-        PROTECT(ans_nms = allocVector(STRSXP, len));
-        for (i = 0; i < len; i++) {
-            SET_STRING_ELT(ans_nms, i,
-                           STRING_ELT(v_nms, INTEGER(ans)[i] - 1));
-        }
-        setAttrib(ans, R_NamesSymbol, ans_nms);
-        UNPROTECT(1);
+	PROTECT(ans_nms = allocVector(STRSXP, len));
+	for (i = 0; i < len; i++) {
+	    SET_STRING_ELT(ans_nms, i,
+			   STRING_ELT(v_nms, INTEGER(ans)[i] - 1));
+	}
+	setAttrib(ans, R_NamesSymbol, ans_nms);
+	UNPROTECT(1);
     }
     UNPROTECT(1);
     return ans;
@@ -878,7 +949,7 @@ SEXP attribute_hidden do_pmin(SEXP call, SEXP op, SEXP args, SEXP rho)
 {
     SEXP a, x, ans;
     int narm;
-    R_xlen_t i, n, len;
+    R_xlen_t i, n, len, i1;
     SEXPTYPE type, anstype;
 
     narm = asLogical(CAR(args));
@@ -944,15 +1015,15 @@ SEXP attribute_hidden do_pmin(SEXP call, SEXP op, SEXP args, SEXP rho)
 	PROTECT(x = coerceVector(CAR(args), anstype));
 	r = INTEGER(x);
 	n = XLENGTH(x);
-	for(i = 0; i < len; i++) ra[i] = r[i % n];
+	xcopyIntegerWithRecycle(ra, r, 0, len, n);
 	UNPROTECT(1);
 	for(a = CDR(args); a != R_NilValue; a = CDR(a)) {
 	    x = CAR(a);
 	    PROTECT(x = coerceVector(CAR(a), anstype));
 	    n = XLENGTH(x);
 	    r = INTEGER(x);
-	    for(i = 0; i < len; i++) {
-		tmp = r[i % n];
+	    MOD_ITERATE1(len, n, i, i1, {
+		tmp = r[i1];
 		if(PRIMVAL(op) == 1) {
 		    if( (narm && ra[i] == NA_INTEGER) ||
 			(ra[i] != NA_INTEGER && tmp != NA_INTEGER
@@ -966,7 +1037,7 @@ SEXP attribute_hidden do_pmin(SEXP call, SEXP op, SEXP args, SEXP rho)
 			(!narm && tmp == NA_INTEGER) )
 			ra[i] = tmp;
 		}
-	    }
+	    });
 	    UNPROTECT(1);
 	}
     }
@@ -977,14 +1048,14 @@ SEXP attribute_hidden do_pmin(SEXP call, SEXP op, SEXP args, SEXP rho)
 	PROTECT(x = coerceVector(CAR(args), anstype));
 	r = REAL(x);
 	n = XLENGTH(x);
-	for(i = 0; i < len; i++) ra[i] = r[i % n];
+	xcopyRealWithRecycle(ra, r, 0, len, n);
 	UNPROTECT(1);
 	for(a = CDR(args); a != R_NilValue; a = CDR(a)) {
 	    PROTECT(x = coerceVector(CAR(a), anstype));
 	    n = XLENGTH(x);
 	    r = REAL(x);
-	    for(i = 0; i < len; i++) {
-		tmp = r[i % n];
+	    MOD_ITERATE1(len, n, i, i1, {
+		tmp = r[i1];
 		if(PRIMVAL(op) == 1) {
 		    if( (narm && ISNAN(ra[i])) ||
 			(!ISNAN(ra[i]) && !ISNAN(tmp) && tmp > ra[i]) ||
@@ -996,7 +1067,7 @@ SEXP attribute_hidden do_pmin(SEXP call, SEXP op, SEXP args, SEXP rho)
 			(!narm && ISNAN(tmp)) )
 			ra[i] = tmp;
 		}
-	    }
+	    });
 	    UNPROTECT(1);
 	}
     }
@@ -1005,14 +1076,14 @@ SEXP attribute_hidden do_pmin(SEXP call, SEXP op, SEXP args, SEXP rho)
     {
 	PROTECT(x = coerceVector(CAR(args), anstype));
 	n = XLENGTH(x);
-	for(i = 0; i < len; i++) SET_STRING_ELT(ans, i, STRING_ELT(x, i % n));
+	xcopyStringWithRecycle(ans, x, 0, len, n);
 	UNPROTECT(1);
 	for(a = CDR(args); a != R_NilValue; a = CDR(a)) {
 	    SEXP tmp, t2;
 	    PROTECT(x = coerceVector(CAR(a), anstype));
 	    n = XLENGTH(x);
-	    for(i = 0; i < len; i++) {
-		tmp = STRING_ELT(x, i % n);
+	    MOD_ITERATE1(len, n, i, i1, {
+		tmp = STRING_ELT(x, i1);
 		t2 = STRING_ELT(ans, i);
 		if(PRIMVAL(op) == 1) {
 		    if( (narm && t2 == NA_STRING) ||
@@ -1025,7 +1096,7 @@ SEXP attribute_hidden do_pmin(SEXP call, SEXP op, SEXP args, SEXP rho)
 			(!narm && tmp == NA_STRING) )
 			SET_STRING_ELT(ans, i, tmp);
 		}
-	    }
+	    });
 	    UNPROTECT(1);
 	}
     }
diff --git a/src/main/sysutils.c b/src/main/sysutils.c
index a0499b2..8cba6d6 100644
--- a/src/main/sysutils.c
+++ b/src/main/sysutils.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-2013   The R Core Team
+ *  Copyright (C) 1997-2014   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
@@ -15,7 +15,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  */
 
 #ifdef HAVE_CONFIG_H
@@ -52,7 +52,6 @@
 
 #ifdef HAVE_AQUA
 int (*ptr_CocoaSystem)(const char*);
-extern	Rboolean useaqua;
 #endif
 
 #ifdef Win32
@@ -149,7 +148,7 @@ FILE *R_fopen(const char *filename, const char *mode)
 
 #if defined(Win32)
 
-#define BSIZE 100000 
+#define BSIZE 100000
 wchar_t *filenameToWchar(const SEXP fn, const Rboolean expand)
 {
     static wchar_t filename[BSIZE+1];
@@ -167,7 +166,7 @@ wchar_t *filenameToWchar(const SEXP fn, const Rboolean expand)
     if(IS_BYTES(fn)) error(_("encoding of a filename cannot be 'bytes'"));
     obj = Riconv_open("UCS-2LE", from);
     if(obj == (void *)(-1))
-	error(_("unsupported conversion from '%s' in codepage %d"), 
+	error(_("unsupported conversion from '%s' in codepage %d"),
 	      from, localeCP);
 
     if(expand) inbuf = R_ExpandFileName(CHAR(fn)); else inbuf = CHAR(fn);
@@ -256,7 +255,7 @@ SEXP attribute_hidden do_tempfile(SEXP call, SEXP op, SEXP args, SEXP env)
     if (n2 < 1)
 	error(_("no 'tempdir'"));
     if (n3 < 1)
-        error(_("no 'fileext'"));
+	error(_("no 'fileext'"));
     slen = (n1 > n2) ? n1 : n2;
     slen = (n3 > slen) ? n3 : slen;
     PROTECT(ans = allocVector(STRSXP, slen));
@@ -276,8 +275,9 @@ SEXP attribute_hidden do_tempfile(SEXP call, SEXP op, SEXP args, SEXP env)
 FILE *R_popen(const char *command, const char *type)
 {
     FILE *fp;
-#ifdef __APPLE__
+#ifdef OLD__APPLE__
     /* Luke recommends this to fix PR#1140 */
+    /* As of 2016-01-06 on El Capitan this may no longer be needed -- LT */
     sigset_t ss;
     sigemptyset(&ss);
     sigaddset(&ss, SIGPROF);
@@ -298,16 +298,21 @@ int R_system(const char *command)
 {
     int res;
 #ifdef __APPLE__
+# ifdef OLD__APPLE__
     /* Luke recommends this to fix PR#1140 */
+    /* As of 2016-01-06 on El Capitan this may no longer be needed -- LT */
     sigset_t ss;
     sigemptyset(&ss);
     sigaddset(&ss, SIGPROF);
     sigprocmask(SIG_BLOCK, &ss,  NULL);
+# endif
 #ifdef HAVE_AQUA
     if(ptr_CocoaSystem) res = ptr_CocoaSystem(command); else
 #endif
     res = system(command);
+# ifdef OLD__APPLE__
     sigprocmask(SIG_UNBLOCK, &ss, NULL);
+# endif
 #else // not APPLE
     res = system(command);
 #endif
@@ -361,7 +366,7 @@ SEXP attribute_hidden do_getenv(SEXP call, SEXP op, SEXP args, SEXP env)
 	wchar_t **w;
 	for (i = 0, w = _wenviron; *w != NULL; i++, w++)
 	    n = max(n, wcslen(*w));
-	N = 3*n+1; 
+	N = 3*n+1;
 	char buf[N];
 	PROTECT(ans = allocVector(STRSXP, i));
 	for (i = 0, w = _wenviron; *w != NULL; i++, w++) {
@@ -603,11 +608,11 @@ SEXP attribute_hidden do_iconv(SEXP call, SEXP op, SEXP args, SEXP env)
 	args = CDR(args);
 	mark = asLogical(CAR(args));
 	if(mark == NA_LOGICAL)
-	    error(_("invalid '%s' argument"), "mark");	
+	    error(_("invalid '%s' argument"), "mark");
 	args = CDR(args);
 	toRaw = asLogical(CAR(args));
 	if(toRaw == NA_LOGICAL)
-	    error(_("invalid '%s' argument"), "toRaw");	
+	    error(_("invalid '%s' argument"), "toRaw");
 	/* some iconv's allow "UTF8", but libiconv does not */
 	if(streql(from, "UTF8") || streql(from, "utf8") ) from = "UTF-8";
 	if(streql(to, "UTF8") || streql(to, "utf8") ) to = "UTF-8";
@@ -620,7 +625,7 @@ SEXP attribute_hidden do_iconv(SEXP call, SEXP op, SEXP args, SEXP env)
 	obj = Riconv_open(to, from);
 	if(obj == (iconv_t)(-1))
 #ifdef Win32
-	    error(_("unsupported conversion from '%s' to '%s' in codepage %d"), 
+	    error(_("unsupported conversion from '%s' to '%s' in codepage %d"),
 		  from, to, localeCP);
 #else
 	    error(_("unsupported conversion from '%s' to '%s'"), from, to);
@@ -631,15 +636,15 @@ SEXP attribute_hidden do_iconv(SEXP call, SEXP op, SEXP args, SEXP env)
 		PROTECT(ans = duplicate(x));
 	    else {
 		PROTECT(ans = allocVector(STRSXP, LENGTH(x)));
-		DUPLICATE_ATTRIB(ans, x);
+		SHALLOW_DUPLICATE_ATTRIB(ans, x);
 	    }
-	} else {   
+	} else {
 	    if(TYPEOF(x) != STRSXP)
 		error(_("'x' must be a character vector"));
 	    if(toRaw) {
 		PROTECT(ans = allocVector(VECSXP, LENGTH(x)));
-		DUPLICATE_ATTRIB(ans, x);
-	    } else 
+		SHALLOW_DUPLICATE_ATTRIB(ans, x);
+	    } else
 		PROTECT(ans = duplicate(x));
 	}
 	R_AllocStringBuffer(0, &cbuff);  /* 0 -> default */
@@ -650,7 +655,7 @@ SEXP attribute_hidden do_iconv(SEXP call, SEXP op, SEXP args, SEXP env)
 		    if (!toRaw) SET_STRING_ELT(ans, i, NA_STRING);
 		    continue;
 		} else if (TYPEOF(si) != RAWSXP)
-		    error(_("'x' must be a list of NULL or raw vectors"));
+		    error(_("'x' must be a character vector or a list of NULL or raw vectors"));
 	    } else {
 		si = STRING_ELT(x, i);
 		if (si == NA_STRING) {
@@ -659,7 +664,7 @@ SEXP attribute_hidden do_iconv(SEXP call, SEXP op, SEXP args, SEXP env)
 		}
 	    }
 	top_of_loop:
-	    inbuf = isRawlist ? (const char *) RAW(si) : CHAR(si); 
+	    inbuf = isRawlist ? (const char *) RAW(si) : CHAR(si);
 	    inb = LENGTH(si);
 	    outbuf = cbuff.data; outb = cbuff.bufsize - 1;
 	    /* First initialize output */
@@ -673,7 +678,7 @@ SEXP attribute_hidden do_iconv(SEXP call, SEXP op, SEXP args, SEXP env)
 	    if(res == -1 && errno == E2BIG) {
 		R_AllocStringBuffer(2*cbuff.bufsize, &cbuff);
 		goto top_of_loop;
-	    } else if(res == -1 && sub && 
+	    } else if(res == -1 && sub &&
 		      (errno == EILSEQ || errno == EINVAL)) {
 		/* it seems this gets thrown for non-convertible input too */
 		if(strcmp(sub, "byte") == 0) {
@@ -707,13 +712,13 @@ SEXP attribute_hidden do_iconv(SEXP call, SEXP op, SEXP args, SEXP env)
 	    } else {
 		if(res != -1 && inb == 0) {
 		    cetype_t ienc = CE_NATIVE;
-		    
+
 		    size_t nout = cbuff.bufsize - 1 - outb;
 		    if(mark) {
 			if(isLatin1) ienc = CE_LATIN1;
 			else if(isUTF8) ienc = CE_UTF8;
 		    }
-		    SET_STRING_ELT(ans, i, 
+		    SET_STRING_ELT(ans, i,
 				   mkCharLenCE(cbuff.data, (int) nout, ienc));
 		} else SET_STRING_ELT(ans, i, NA_STRING);
 	    }
@@ -739,6 +744,7 @@ cetype_t getCharCE(SEXP x)
 void * Riconv_open (const char* tocode, const char* fromcode)
 {
 #if defined Win32 || __APPLE__
+// These two support "utf8"
 # ifdef Win32
     const char *cp = "ASCII";
 #  ifndef SUPPORT_UTF8_WIN32 /* Always, at present */
@@ -755,7 +761,11 @@ void * Riconv_open (const char* tocode, const char* fromcode)
     else if(!*fromcode) return iconv_open(tocode, cp);
     else return iconv_open(tocode, fromcode);
 #else
-    return iconv_open(tocode, fromcode);
+// "utf8" is not valid but people keep on using it
+    const char *to = tocode, *from = fromcode;
+    if(strcasecmp(tocode, "utf8") == 0) to = "UTF-8";
+    if(strcasecmp(fromcode, "utf8") == 0) from = "UTF-8";
+    return iconv_open(to, from);
 #endif
 }
 
@@ -778,30 +788,46 @@ int Riconv_close (void *cd)
     return iconv_close((iconv_t) cd);
 }
 
+typedef enum {
+    NT_NONE        = 0, /* no translation to native encoding is needed */
+    NT_FROM_UTF8   = 1, /* need to translate from UTF8 */
+    NT_FROM_LATIN1 = 2, /* need to translated from latin1 */
+} nttype_t;
+
+/* Decides whether translation to native encoding is needed. */
+static R_INLINE nttype_t needsTranslation(SEXP x) {
+
+    if (IS_ASCII(x)) return NT_NONE;
+    if (IS_UTF8(x)) {
+	if (utf8locale || x == NA_STRING) return NT_NONE;
+	return NT_FROM_UTF8;
+    }
+    if (IS_LATIN1(x)) {
+	if (x == NA_STRING || latin1locale) return NT_NONE;
+	return NT_FROM_LATIN1;
+    }
+    if (IS_BYTES(x))
+	error(_("translating strings with \"bytes\" encoding is not allowed"));
+    return NT_NONE;
+}
+
 static void *latin1_obj = NULL, *utf8_obj=NULL, *ucsmb_obj=NULL,
     *ucsutf8_obj=NULL;
 
-/* This may return a R_alloc-ed result, so the caller has to manage the
-   R_alloc stack */
-const char *translateChar(SEXP x)
-{
+/* Translates string in "ans" to native encoding returning it as string
+   buffer "cbuff" */
+static void translateToNative(const char *ans, R_StringBuffer *cbuff,
+			      nttype_t ttype) {
+
+    if (ttype == NT_NONE)
+	error(_("internal error: no translation needed"));
+
     void * obj;
-    const char *inbuf, *ans = CHAR(x);
+    const char *inbuf;
     char *outbuf;
     size_t inb, outb, res;
-    cetype_t ienc = getCharCE(x);
-    R_StringBuffer cbuff = {NULL, 0, MAXELTSIZE};
-
-    if(TYPEOF(x) != CHARSXP)
-	error(_("'%s' must be called on a CHARSXP"), "translateChar");
-    if(x == NA_STRING || !(ENC_KNOWN(x))) return ans;
-    if(IS_BYTES(x))
-	error(_("translating strings with \"bytes\" encoding is not allowed"));
-    if(utf8locale && IS_UTF8(x)) return ans;
-    if(latin1locale && IS_LATIN1(x)) return ans;
-    if(IS_ASCII(x)) return ans;
 
-    if(IS_LATIN1(x)) {
+    if(ttype == NT_FROM_LATIN1) {
 	if(!latin1_obj) {
 	    obj = Riconv_open("", "latin1");
 	    /* should never happen */
@@ -810,7 +836,7 @@ const char *translateChar(SEXP x)
 		error(_("unsupported conversion from '%s' in codepage %d"),
 		      "latin1", localeCP);
 #else
-	        error(_("unsupported conversion from '%s' to '%s'"),
+		error(_("unsupported conversion from '%s' to '%s'"),
 		      "latin1", "");
 #endif
 	    latin1_obj = obj;
@@ -820,12 +846,12 @@ const char *translateChar(SEXP x)
 	if(!utf8_obj) {
 	    obj = Riconv_open("", "UTF-8");
 	    /* should never happen */
-	    if(obj == (void *)(-1)) 
+	    if(obj == (void *)(-1))
 #ifdef Win32
 		error(_("unsupported conversion from '%s' in codepage %d"),
 		      "latin1", localeCP);
 #else
-	        error(_("unsupported conversion from '%s' to '%s'"),
+		error(_("unsupported conversion from '%s' to '%s'"),
 		      "latin1", "");
 #endif
 	    utf8_obj = obj;
@@ -833,24 +859,24 @@ const char *translateChar(SEXP x)
 	obj = utf8_obj;
     }
 
-    R_AllocStringBuffer(0, &cbuff);
+    R_AllocStringBuffer(0, cbuff);
 top_of_loop:
     inbuf = ans; inb = strlen(inbuf);
-    outbuf = cbuff.data; outb = cbuff.bufsize - 1;
+    outbuf = cbuff->data; outb = cbuff->bufsize - 1;
     /* First initialize output */
     Riconv (obj, NULL, NULL, &outbuf, &outb);
 next_char:
     /* Then convert input  */
     res = Riconv(obj, &inbuf , &inb, &outbuf, &outb);
     if(res == -1 && errno == E2BIG) {
-	R_AllocStringBuffer(2*cbuff.bufsize, &cbuff);
+	R_AllocStringBuffer(2*cbuff->bufsize, cbuff);
 	goto top_of_loop;
     } else if(res == -1 && (errno == EILSEQ || errno == EINVAL)) {
 	if(outb < 13) {
-	    R_AllocStringBuffer(2*cbuff.bufsize, &cbuff);
+	    R_AllocStringBuffer(2*cbuff->bufsize, cbuff);
 	    goto top_of_loop;
 	}
-	if (ienc == CE_UTF8) {
+	if (ttype == NT_FROM_UTF8) {
 	    /* if starting in UTF-8, use \uxxxx */
 	    /* This must be the first byte */
 	    size_t clen;
@@ -861,7 +887,8 @@ next_char:
 # ifndef Win32
 		if((unsigned int) wc < 65536) {
 # endif
-		    snprintf(outbuf, 9, "<U+%04X>", (unsigned int) wc);
+		// gcc 7 objects to this with unsigned int
+		    snprintf(outbuf, 9, "<U+%04X>", (unsigned short) wc);
 		    outbuf += 8; outb -= 8;
 # ifndef Win32
 		} else {
@@ -882,7 +909,23 @@ next_char:
 	goto next_char;
     }
     *outbuf = '\0';
-    res = strlen(cbuff.data) + 1;
+}
+
+
+/* This may return a R_alloc-ed result, so the caller has to manage the
+   R_alloc stack */
+const char *translateChar(SEXP x)
+{
+    if(TYPEOF(x) != CHARSXP)
+	error(_("'%s' must be called on a CHARSXP"), "translateChar");
+    nttype_t t = needsTranslation(x);
+    const char *ans = CHAR(x);
+    if (t == NT_NONE) return ans;
+
+    R_StringBuffer cbuff = {NULL, 0, MAXELTSIZE};
+    translateToNative(ans, &cbuff, t);
+
+    size_t res = strlen(cbuff.data) + 1;
     char *p = R_alloc(res, 1);
     memcpy(p, cbuff.data, res);
     R_FreeStringBuffer(&cbuff);
@@ -891,103 +934,14 @@ next_char:
 
 SEXP installTrChar(SEXP x)
 {
-    void * obj;
-    const char *inbuf, *ans = CHAR(x);
-    char *outbuf;
-    size_t inb, outb, res;
-    cetype_t ienc = getCharCE(x);
-    R_StringBuffer cbuff = {NULL, 0, MAXELTSIZE};
-
     if(TYPEOF(x) != CHARSXP)
 	error(_("'%s' must be called on a CHARSXP"), "installTrChar");
-    if(x == NA_STRING || !(ENC_KNOWN(x))) return install(ans);
-    if(IS_BYTES(x))
-	error(_("translating strings with \"bytes\" encoding is not allowed"));
-    if(utf8locale && IS_UTF8(x)) return install(ans);
-    if(latin1locale && IS_LATIN1(x)) return install(ans);
-    if(IS_ASCII(x)) return install(ans);
+    nttype_t t = needsTranslation(x);
+    if (t == NT_NONE) return installChar(x);
 
-    if(IS_LATIN1(x)) {
-	if(!latin1_obj) {
-	    obj = Riconv_open("", "latin1");
-	    /* should never happen */
-	    if(obj == (void *)(-1))
-#ifdef Win32
-		error(_("unsupported conversion from '%s' in codepage %d"),
-		      "latin1", localeCP);
-#else
-	        error(_("unsupported conversion from '%s' to '%s'"),
-		      "latin1", "");
-#endif
-	    latin1_obj = obj;
-	}
-	obj = latin1_obj;
-    } else {
-	if(!utf8_obj) {
-	    obj = Riconv_open("", "UTF-8");
-	    /* should never happen */
-	    if(obj == (void *)(-1)) 
-#ifdef Win32
-		error(_("unsupported conversion from '%s' in codepage %d"),
-		      "latin1", localeCP);
-#else
-	        error(_("unsupported conversion from '%s' to '%s'"),
-		      "latin1", "");
-#endif
-	    utf8_obj = obj;
-	}
-	obj = utf8_obj;
-    }
+    R_StringBuffer cbuff = {NULL, 0, MAXELTSIZE};
+    translateToNative(CHAR(x), &cbuff, t);
 
-    R_AllocStringBuffer(0, &cbuff);
-top_of_loop:
-    inbuf = ans; inb = strlen(inbuf);
-    outbuf = cbuff.data; outb = cbuff.bufsize - 1;
-    /* First initialize output */
-    Riconv (obj, NULL, NULL, &outbuf, &outb);
-next_char:
-    /* Then convert input  */
-    res = Riconv(obj, &inbuf , &inb, &outbuf, &outb);
-    if(res == -1 && errno == E2BIG) {
-	R_AllocStringBuffer(2*cbuff.bufsize, &cbuff);
-	goto top_of_loop;
-    } else if(res == -1 && (errno == EILSEQ || errno == EINVAL)) {
-	if(outb < 13) {
-	    R_AllocStringBuffer(2*cbuff.bufsize, &cbuff);
-	    goto top_of_loop;
-	}
-	if (ienc == CE_UTF8) {
-	    /* if starting in UTF-8, use \uxxxx */
-	    /* This must be the first byte */
-	    size_t clen;
-	    wchar_t wc;
-	    clen = utf8toucs(&wc, inbuf);
-	    if(clen > 0 && inb >= clen) {
-		inbuf += clen; inb -= clen;
-# ifndef Win32
-		if((unsigned int) wc < 65536) {
-# endif
-		    snprintf(outbuf, 9, "<U+%04X>", (unsigned int) wc);
-		    outbuf += 8; outb -= 8;
-# ifndef Win32
-		} else {
-		    snprintf(outbuf, 13, "<U+%08X>", (unsigned int) wc);
-		    outbuf += 12; outb -= 12;
-		}
-# endif
-	    } else {
-		snprintf(outbuf, 5, "<%02x>", (unsigned char)*inbuf);
-		outbuf += 4; outb -= 4;
-		inbuf++; inb--;
-	    }
-	} else {
-	    snprintf(outbuf, 5, "<%02x>", (unsigned char)*inbuf);
-	    outbuf += 4; outb -= 4;
-	    inbuf++; inb--;
-	}
-	goto next_char;
-    }
-    *outbuf = '\0';
     SEXP Sans = install(cbuff.data);
     R_FreeStringBuffer(&cbuff);
     return Sans;
@@ -1022,7 +976,7 @@ const char *translateCharUTF8(SEXP x)
 	error(_("translating strings with \"bytes\" encoding is not allowed"));
 
     obj = Riconv_open("UTF-8", IS_LATIN1(x) ? "latin1" : "");
-    if(obj == (void *)(-1)) 
+    if(obj == (void *)(-1))
 #ifdef Win32
 	error(_("unsupported conversion from '%s' in codepage %d"),
 	      "latin1", localeCP);
@@ -1109,7 +1063,7 @@ const wchar_t *wtransChar(SEXP x)
     } else if(IS_UTF8(x)) {
 	if(!utf8_wobj) {
 	    obj = Riconv_open(TO_WCHAR, "UTF-8");
-	    if(obj == (void *)(-1)) 
+	    if(obj == (void *)(-1))
 		error(_("unsupported conversion from '%s' to '%s'"),
 		      "latin1", TO_WCHAR);
 	    utf8_wobj = obj;
@@ -1162,8 +1116,7 @@ next_char:
 }
 
 
-extern void *Rf_AdobeSymbol2utf8(char* work, const char *c0, size_t nwork); /* from util.c */
-
+#include <R_ext/GraphicsEngine.h>
 /* This may return a R_alloc-ed result, so the caller has to manage the
    R_alloc stack */
 const char *reEnc(const char *x, cetype_t ce_in, cetype_t ce_out, int subst)
@@ -1437,7 +1390,7 @@ size_t ucstomb(char *s, const unsigned int wc)
 	    char tocode[128];
 	    /* locale set fuzzy case */
 	    strncpy(tocode, locale2charset(NULL), sizeof(tocode));
-            tocode[sizeof(tocode) - 1] = '\0';
+	    tocode[sizeof(tocode) - 1] = '\0';
 	    if((void *)(-1) == (cd = Riconv_open(tocode, UNICODE)))
 		return (size_t)(-1);
 #else
@@ -1528,7 +1481,7 @@ size_t ucstoutf8(char *s, const unsigned int wc)
 	}
 	ucsutf8_obj = cd;
     }
-    
+
     status = Riconv(ucsutf8_obj, &inbuf, &inbytesleft, &outbuf, &outbytesleft);
 
     if (status == (size_t) -1) {
@@ -1676,7 +1629,7 @@ char * R_tmpnam(const char * prefix, const char * tempdir)
 }
 
 /* NB for use with multicore: parent and all children share the same
-   session directory and run in parallel.   
+   session directory and run in parallel.
    So as from 2.14.1, we make sure getpic() is part of the process.
 */
 char * R_tmpnam2(const char *prefix, const char *tempdir, const char *fileext)
@@ -1691,16 +1644,16 @@ char * R_tmpnam2(const char *prefix, const char *tempdir, const char *fileext)
 
     if(!prefix) prefix = "";	/* NULL */
     if(!fileext) fileext = "";  /*  "   */
-    
+
 #if RAND_MAX > 16777215
 #define RAND_WIDTH 8
 #else
 #define RAND_WIDTH 12
 #endif
-    
-    if(strlen(tempdir) + 1 + strlen(prefix) + RAND_WIDTH + strlen(fileext) >= PATH_MAX) 
-    	error(_("temporary name too long"));
-    	
+
+    if(strlen(tempdir) + 1 + strlen(prefix) + RAND_WIDTH + strlen(fileext) >= PATH_MAX)
+	error(_("temporary name too long"));
+
     for (n = 0; n < 100; n++) {
 	/* try a random number at the end.  Need at least 6 hex digits */
 #if RAND_MAX > 16777215
@@ -1828,7 +1781,7 @@ do_setSessionTimeLimit(SEXP call, SEXP op, SEXP args, SEXP rho)
 SEXP attribute_hidden do_glob(SEXP call, SEXP op, SEXP args, SEXP env)
 {
     SEXP x, ans;
-    R_xlen_t i, n; 
+    R_xlen_t i, n;
     int res, dirmark, initialized=FALSE;
     glob_t globbuf;
 #ifdef Win32
diff --git a/src/main/times.c b/src/main/times.c
index 261538b..20a6aab 100644
--- a/src/main/times.c
+++ b/src/main/times.c
@@ -1,6 +1,6 @@
 /*
  *  R : A Computer Language for Statistical Data Analysis
- *  Copyright (C) 2000-2013  The R Core Team.
+ *  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
@@ -14,7 +14,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  *
  *
  *      Interfaces to time functions.
@@ -24,22 +24,23 @@
     Notes on various time functions:
     ===============================
 
-    The current (2008) POSIX recommendation to find the calendar time
-    is to call clock_gettime(), defined in <time.h>.  This may also be
-    used to find time since some unspecified starting point
-    (e.g. machine reboot), but is not currently so used in R.  It
-    returns in second and nanoseconds, although not necessarily to
+    The current (2008/13) POSIX recommendation to find the calendar
+    time is to call clock_gettime(), defined in <time.h>.  This may
+    also be used to find the time since some unspecified starting
+    point (e.g. machine reboot), but is not currently so used in R.
+    It returns in second and nanoseconds, although not necessarily to
     more than clock-tick accuracy.
 
-    C11 adds 'struct timespec' to <time.h>.  And timespec_get() can get
-    the current time or interval after a base time.
+    C11 adds 'struct timespec' to <time.h>.  And timespec_get() which
+    can get the current time or interval after a base time.
 
     The previous POSIX recommendation was gettimeofday(), defined in
     <sys/time.h>.  This returns in seconds and microseconds (with
     unspecified granularity).
 
     Many systems (including AIX, FreeBSD, Linux, Solaris) have
-    clock_gettime().  Mac OS X and Cygwin have gettimeofday().
+    clock_gettime(): it appeared in macOS 10.12.  macOS and Cygwin
+    have gettimeofday().
 
     Function time() is C99 and defined in <time.h>.  C99 does not
     mandate the units, but POSIX does (as the number of seconds since
@@ -58,11 +59,11 @@
     POSIX function getrusage() defined in <sys/resource.h>.  This
     returns the same time structure as gettimeofday() and on some
     systems offers millisecond resolution.
-    It is available on Cygwin, FreeBSD, Mac OS X, Linux and Solaris.
+    It is available on Cygwin, FreeBSD, macOS, Linux and Solaris.
 
     currentTime() (in this file) uses
-    clock_gettime(): AIX, FreeBSD, Linux, Solaris
-    gettimeofday():  Mac OS X, Windows, Cygwin
+    clock_gettime(): AIX, FreeBSD, Linux, Solaris, macOS >= 10.12
+    gettimeofday():  macOS <= 10.11, Windows, Cygwin
     time() (as ultimate fallback, AFAIK unused).
 
     proc.time() uses currentTime() for elapsed time,
@@ -106,7 +107,7 @@ double currentTime(void)
 	ans = (double) tp.tv_sec + 1e-9 * (double) tp.tv_nsec;
 
 #elif defined(HAVE_GETTIMEOFDAY)
-    /* Mac OS X, mingw.org, used on mingw-w64.
+    /* macOS , mingw.org, used on mingw-w64.
        Has 2038 issue if time_t: tv.tv_sec is 32-bit.
      */
     struct timeval tv;
@@ -126,7 +127,7 @@ double currentTime(void)
     /* No known current OSes */
     /* Disallowed by POSIX (1988-):
        http://www.mail-archive.com/leapsecs@rom.usno.navy.mil/msg00109.html
-       http://en.wikipedia.org/wiki/Unix_time
+       https://en.wikipedia.org/wiki/Unix_time
     */
     if (!ISNAN(ans)) {
 	ans -= n_leapseconds;
@@ -137,6 +138,7 @@ double currentTime(void)
 
 SEXP attribute_hidden do_systime(SEXP call, SEXP op, SEXP args, SEXP env)
 {
+    checkArity(op, args);
     return ScalarReal(currentTime());
 }
 
@@ -145,8 +147,7 @@ SEXP attribute_hidden do_systime(SEXP call, SEXP op, SEXP args, SEXP env)
 #endif
 
 /* For RNG.c, main.c, mkdtemp.c */
-attribute_hidden
-unsigned int TimeToSeed(void)
+attribute_hidden unsigned int TimeToSeed(void)
 {
     unsigned int seed, pid = getpid();
 #if defined(HAVE_CLOCK_GETTIME) && defined(CLOCK_REALTIME)
diff --git a/src/main/unique.c b/src/main/unique.c
index 8431c67..7b30b64 100644
--- a/src/main/unique.c
+++ b/src/main/unique.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--2013  The R Core Team
+ *  Copyright (C) 1995, 1996, 2017  Robert Gentleman and Ross Ihaka
+ *  Copyright (C) 1997--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
@@ -15,7 +15,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  */
 
 /* This is currently restricted to vectors of length < 2^30 */
@@ -122,19 +122,24 @@ static hlen rhash(SEXP x, R_xlen_t indx, HashData *d)
 #endif
 }
 
+static Rcomplex unify_complex_na(Rcomplex z) {
+    Rcomplex ans;
+    ans.r = (z.r == 0.0) ? 0.0 : z.r;
+    ans.i = (z.i == 0.0) ? 0.0 : z.i;
+    if (R_IsNA(ans.r) || R_IsNA(ans.i))
+	ans.r = ans.i = NA_REAL;
+    else if (R_IsNaN(ans.r) || R_IsNaN(ans.i))
+	ans.r = ans.i = R_NaN;
+    return ans;
+}
+
 static hlen chash(SEXP x, R_xlen_t indx, HashData *d)
 {
-    Rcomplex tmp;
-    unsigned int u;
-    tmp.r = (COMPLEX(x)[indx].r == 0.0) ? 0.0 : COMPLEX(x)[indx].r;
-    tmp.i = (COMPLEX(x)[indx].i == 0.0) ? 0.0 : COMPLEX(x)[indx].i;
-    /* we want all NaNs except NA equal, and all NAs equal */
-    if (R_IsNA(tmp.r)) tmp.r = NA_REAL;
-    else if (R_IsNaN(tmp.r)) tmp.r = R_NaN;
-    if (R_IsNA(tmp.i)) tmp.i = NA_REAL;
-    else if (R_IsNaN(tmp.i)) tmp.i = R_NaN;
+    Rcomplex tmp = unify_complex_na(COMPLEX(x)[indx]);
+
 #if 2*SIZEOF_INT == SIZEOF_DOUBLE
     {
+	unsigned int u;
 	union foo tmpu;
 	tmpu.d = tmp.r;
 	u = tmpu.u[0] ^ tmpu.u[1];
@@ -199,21 +204,27 @@ static int requal(SEXP x, R_xlen_t i, SEXP y, R_xlen_t j)
     else return 0;
 }
 
+/* This is differentiating {NA,1}, {NA,0}, {NA, NaN}, {NA, NA},
+ * but R's print() and format()  render all as "NA" */
+static int cplx_eq(Rcomplex x, Rcomplex y)
+{
+    if (!ISNAN(x.r) && !ISNAN(x.i) && !ISNAN(y.r) && !ISNAN(y.i))
+	return x.r == y.r && x.i == y.i;
+    else if (R_IsNA(x.r) || R_IsNA(x.i)) // x is NA
+	return (R_IsNA(y.r) || R_IsNA(y.i)) ? 1 : 0;
+    else if (R_IsNA(y.r) || R_IsNA(y.i)) // y is NA but x is not
+	return 0;
+    // else : none is NA but there's at least one NaN;  hence  ISNAN(.) == R_IsNaN(.)
+    return
+	(((ISNAN(x.r) && ISNAN(y.r)) || (!ISNAN(x.r) && !ISNAN(y.r) && x.r == y.r)) && // Re
+	 ((ISNAN(x.i) && ISNAN(y.i)) || (!ISNAN(x.i) && !ISNAN(y.i) && x.i == y.i))    // Im
+	    ) ? 1 : 0;
+}
+
 static int cequal(SEXP x, R_xlen_t i, SEXP y, R_xlen_t j)
 {
     if (i < 0 || j < 0) return 0;
-    if (!ISNAN(COMPLEX(x)[i].r) && !ISNAN(COMPLEX(x)[i].i)
-       && !ISNAN(COMPLEX(y)[j].r) && !ISNAN(COMPLEX(y)[j].i))
-	return COMPLEX(x)[i].r == COMPLEX(y)[j].r &&
-	    COMPLEX(x)[i].i == COMPLEX(y)[j].i;
-    else if ((R_IsNA(COMPLEX(x)[i].r) || R_IsNA(COMPLEX(x)[i].i))
-	    && (R_IsNA(COMPLEX(y)[j].r) || R_IsNA(COMPLEX(y)[j].i)))
-	return 1;
-    else if ((R_IsNaN(COMPLEX(x)[i].r) || R_IsNaN(COMPLEX(x)[i].i))
-	    && (R_IsNaN(COMPLEX(y)[j].r) || R_IsNaN(COMPLEX(y)[j].i)))
-	return 1;
-    else
-	return 0;
+    return cplx_eq(COMPLEX(x)[i], COMPLEX(y)[j]);
 }
 
 static int sequal(SEXP x, R_xlen_t i, SEXP y, R_xlen_t j)
@@ -465,18 +476,18 @@ static void removeEntry(SEXP table, SEXP x, R_xlen_t indx, HashData *d)
 
 #define DUPLICATED_INIT						\
     HashData data;						\
-    HashTableSetup(x, &data, nmax);			       	\
+    HashTableSetup(x, &data, nmax);				\
     if(TYPEOF(x) == STRSXP) {					\
 	data.useUTF8 = FALSE; data.useCache = TRUE;		\
-	for(i = 0; i < n; i++) {			\
+	for(i = 0; i < n; i++) {				\
 	    if(IS_BYTES(STRING_ELT(x, i))) {			\
 		data.useUTF8 = FALSE; break;			\
-	    }                                                   \
-    	    if(ENC_KNOWN(STRING_ELT(x, i))) {                   \
-		data.useUTF8 = TRUE;                            \
 	    }							\
-	    if(!IS_CACHED(STRING_ELT(x, i))) {                  \
-		data.useCache = FALSE; break;                   \
+	    if(ENC_KNOWN(STRING_ELT(x, i))) {			\
+		data.useUTF8 = TRUE;				\
+	    }							\
+	    if(!IS_CACHED(STRING_ELT(x, i))) {			\
+		data.useCache = FALSE; break;			\
 	    }							\
 	}							\
     }
@@ -631,14 +642,14 @@ R_xlen_t any_duplicated3(SEXP x, SEXP incomp, Rboolean from_last)
 		if(isDup) {				\
 		    UNPROTECT(2);			\
 		    return ++i;				\
- 	        }					\
+		}					\
 		/* else continue */			\
 	    }
 	    IS_DUPLICATED_CHECK;
 	}
     else {
 	for (i = 0; i < n; i++) {
-            IS_DUPLICATED_CHECK;
+	    IS_DUPLICATED_CHECK;
 	}
     }
 
@@ -650,9 +661,9 @@ R_xlen_t any_duplicated3(SEXP x, SEXP incomp, Rboolean from_last)
 #undef DUPLICATED_INIT
 
 
-/* .Internal(duplicated(x))       [op=0]
-  .Internal(unique(x))	          [op=1]
-   .Internal(anyDuplicated(x))    [op=2]
+/* .Internal(duplicated(x))	  [op=0]
+  .Internal(unique(x))		  [op=1]
+   .Internal(anyDuplicated(x))	  [op=2]
 */
 SEXP attribute_hidden do_duplicated(SEXP call, SEXP op, SEXP args, SEXP env)
 {
@@ -812,9 +823,9 @@ static SEXP match_transform(SEXP s, SEXP env)
     if(OBJECT(s)) {
 	if(inherits(s, "factor")) return asCharacterFactor(s);
 	else if(inherits(s, "POSIXlt")) { /* and maybe more classes in the future:
-					   * Call R's (generic)  as.character(s) : */
+					   * Call R's (generic)	 as.character(s) : */
 	    SEXP call, r;
-	    PROTECT(call = lang2(install("as.character"), s));
+	    PROTECT(call = lang2(R_AsCharacterSymbol, s));
 	    r = eval(call, env);
 	    UNPROTECT(1);
 	    return r;
@@ -824,7 +835,7 @@ static SEXP match_transform(SEXP s, SEXP env)
     return duplicate(s);
 }
 
-/* currently used by fastmatch */
+// workhorse of R's match() and hence also  " ix %in% itable "
 SEXP match5(SEXP itable, SEXP ix, int nmatch, SEXP incomp, SEXP env)
 {
     SEXP ans, x, table;
@@ -842,9 +853,9 @@ SEXP match5(SEXP itable, SEXP ix, int nmatch, SEXP incomp, SEXP env)
     }
 
     int nprot = 0;
-    PROTECT(x     = match_transform(ix,     env)); nprot++;
+    PROTECT(x	  = match_transform(ix,	    env)); nprot++;
     PROTECT(table = match_transform(itable, env)); nprot++;
-    /* or should we use PROTECT_WITH_INDEX  and  REPROTECT below ? */
+    /* or should we use PROTECT_WITH_INDEX and REPROTECT below ? */
 
     /* Coerce to a common type; type == NILSXP is ok here.
      * Note that above we coerce factors and "POSIXlt", only to character.
@@ -852,17 +863,75 @@ SEXP match5(SEXP itable, SEXP ix, int nmatch, SEXP incomp, SEXP env)
      * (given that we have "Vector" or NULL) */
     if(TYPEOF(x) >= STRSXP || TYPEOF(table) >= STRSXP) type = STRSXP;
     else type = TYPEOF(x) < TYPEOF(table) ? TYPEOF(table) : TYPEOF(x);
-    PROTECT(x     = coerceVector(x,     type)); nprot++;
+    PROTECT(x	  = coerceVector(x,	type)); nprot++;
     PROTECT(table = coerceVector(table, type)); nprot++;
+
+    // special case scalar x -- for speed only :
+    if(XLENGTH(x) == 1 && !incomp) {
+      PROTECT(ans = ScalarInteger(nmatch)); nprot++;
+      switch (type) {
+      case STRSXP: {
+	  SEXP x_val = STRING_ELT(x,0);
+	  for (int i=0; i < LENGTH(itable); i++) if (Seql(STRING_ELT(table,i), x_val)) {
+		  INTEGER(ans)[0] = i + 1; break;
+	      }
+	  break; }
+      case LGLSXP:
+      case INTSXP: {
+	  int x_val = INTEGER(x)[0],
+	      *table_p = INTEGER(table);
+	  for (int i=0; i < LENGTH(itable); i++) if (table_p[i] == x_val) {
+		  INTEGER(ans)[0] = i + 1; break;
+	      }
+	  break; }
+      case REALSXP: {
+	  double x_val = (REAL(x)[0] == 0.) ? 0. : REAL(x)[0],// pblm with signed 0s under IEC60559
+	      *table_p = REAL(table);
+	  /* we want all NaNs except NA equal, and all NAs equal */
+	  if (R_IsNA(x_val)) {
+	      for (int i=0; i < LENGTH(itable); i++) if (R_IsNA(table_p[i])) {
+		      INTEGER(ans)[0] = i + 1; break;
+		  }
+	  }
+	  else if (R_IsNaN(x_val)) {
+	      for (int i=0; i < LENGTH(itable); i++) if (R_IsNaN(table_p[i])) {
+		      INTEGER(ans)[0] = i + 1; break;
+		  }
+	  }
+	  else {
+	      for (int i=0; i < LENGTH(itable); i++) if (table_p[i] == x_val) {
+		      INTEGER(ans)[0] = i + 1; break;
+	      }
+	  }
+	  break; }
+      case CPLXSXP: {
+	  Rcomplex x_val = COMPLEX(x)[0],
+	      *table_p = COMPLEX(table);
+	  for (int i=0; i < LENGTH(itable); i++)
+	      if (cplx_eq(table_p[i], x_val)) {
+		  INTEGER(ans)[0] = i + 1; break;
+	      }
+	  break; }
+      case RAWSXP: {
+	  Rbyte x_val = RAW(x)[0],
+	      *table_p = RAW(table);
+	  for (int i=0; i < LENGTH(itable); i++) if (table_p[i] == x_val) {
+		  INTEGER(ans)[0] = i + 1; break;
+	      }
+	  break; }
+      }
+    }
+    else { // regular case
+
     if (incomp) { PROTECT(incomp = coerceVector(incomp, type)); nprot++; }
     data.nomatch = nmatch;
     HashTableSetup(table, &data, NA_INTEGER);
     if(type == STRSXP) {
 	Rboolean useBytes = FALSE;
 	Rboolean useUTF8 = FALSE;
-        Rboolean useCache = TRUE;
+	Rboolean useCache = TRUE;
 	for(R_xlen_t i = 0; i < length(x); i++) {
-            SEXP s = STRING_ELT(x, i);
+	    SEXP s = STRING_ELT(x, i);
 	    if(IS_BYTES(s)) {
 		useBytes = TRUE;
 		useUTF8 = FALSE;
@@ -871,14 +940,14 @@ SEXP match5(SEXP itable, SEXP ix, int nmatch, SEXP incomp, SEXP env)
 	    if(ENC_KNOWN(s)) {
 		useUTF8 = TRUE;
 	    }
-            if(!IS_CACHED(s)) {
+	    if(!IS_CACHED(s)) {
 		useCache = FALSE;
 		break;
 	    }
-        }
+	}
 	if(!useBytes || useCache) {
 	    for(int i = 0; i < length(table); i++) {
-                SEXP s = STRING_ELT(table, i);
+		SEXP s = STRING_ELT(table, i);
 		if(IS_BYTES(s)) {
 		    useBytes = TRUE;
 		    useUTF8 = FALSE;
@@ -891,15 +960,16 @@ SEXP match5(SEXP itable, SEXP ix, int nmatch, SEXP incomp, SEXP env)
 		    useCache = FALSE;
 		    break;
 		}
-            }
-        }
+	    }
+	}
 	data.useUTF8 = useUTF8;
-        data.useCache = useCache;
+	data.useCache = useCache;
     }
     PROTECT(data.HashTable); nprot++;
     DoHashing(table, &data);
     if (incomp) UndoHashing(incomp, table, &data);
     ans = HashLookup(table, x, &data);
+  }
     UNPROTECT(nprot);
     return ans;
 }
@@ -916,6 +986,7 @@ SEXP match(SEXP itable, SEXP ix, int nmatch)
 }
 
 
+// .Internal(match(x, table, nomatch, incomparables)) :
 SEXP attribute_hidden do_match(SEXP call, SEXP op, SEXP args, SEXP env)
 {
     checkArity(op, args);
@@ -927,11 +998,11 @@ SEXP attribute_hidden do_match(SEXP call, SEXP op, SEXP args, SEXP env)
     int nomatch = asInteger(CADDR(args));
     SEXP incomp = CADDDR(args);
 
-    if(length(incomp) && /* S has FALSE to mean empty */
-       !(isLogical(incomp) && length(incomp) == 1 && LOGICAL(incomp)[0] == 0))
-	return match5(CADR(args), CAR(args), nomatch, incomp, env);
+    if (isNull(incomp) || /* S has FALSE to mean empty */
+	(length(incomp) == 1 && isLogical(incomp) && LOGICAL(incomp)[0] == 0))
+	return match5(CADR(args), CAR(args), nomatch, NULL, env);
     else
-	return matchE(CADR(args), CAR(args), nomatch, env);
+	return match5(CADR(args), CAR(args), nomatch, incomp, env);
 }
 
 /* pmatch and charmatch return integer positions, so cannot be used
@@ -940,12 +1011,12 @@ SEXP attribute_hidden do_match(SEXP call, SEXP op, SEXP args, SEXP env)
 /* Partial Matching of Strings */
 /* Fully S Compatible version. */
 
-/* Hmm, this was not all S compatible!  The desired behaviour is:
+/* Hmm, this was not all S compatible!	The desired behaviour is:
  * First do exact matches, and mark elements as used as they are matched
  *   unless dup_ok is true.
  * Then do partial matching, from left to right, using up the table
  *   unless dup_ok is true.  Multiple partial matches are ignored.
- * Empty strings are unmatched                        BDR 2000/2/16
+ * Empty strings are unmatched			      BDR 2000/2/16
  */
 
 SEXP attribute_hidden do_pmatch(SEXP call, SEXP op, SEXP args, SEXP env)
@@ -1027,48 +1098,35 @@ SEXP attribute_hidden do_pmatch(SEXP call, SEXP op, SEXP args, SEXP env)
     }
     /* First pass, exact matching */
     R_xlen_t nexact = 0;
-    if(no_dups) {
+    /* Compromise when hashing used changed in 3.2.0 (PR#15697) */
+    if (n_input <= 100 || n_target <= 100) {
 	for (R_xlen_t i = 0; i < n_input; i++) {
 	    const char *ss = in[i];
 	    if (strlen(ss) == 0) continue;
 	    for (int j = 0; j < n_target; j++) {
-		if (used[j]) continue;
+		if (no_dups && used[j]) continue;
 		if (strcmp(ss, tar[j]) == 0) {
-		    if(no_dups) used[j] = 1;
 		    ians[i] = j + 1;
+		    if (no_dups) used[j] = 1;
 		    nexact++;
 		    break;
 		}
 	    }
 	}
     } else {
-	/* only worth hashing if enough lookups will be done:
-	   since the tradeoff involves memory as well as time
-	   it is not really possible to optimize there.
-	 */
-	if((n_target > 100) && (10*n_input > n_target)) {
-	    HashData data;
-	    HashTableSetup(target, &data, NA_INTEGER);
-	    data.useUTF8 = useUTF8;
-	    data.nomatch = 0;
-	    DoHashing(target, &data);
-	    for (R_xlen_t i = 0; i < n_input; i++) {
-		/* we don't want to lookup "" */
-		if (strlen(in[i]) == 0) continue;
-		ians[i] = Lookup(target, input, i, &data);
-		if(ians[i]) nexact++;
-	    }
-	} else {
-	    for (R_xlen_t i = 0; i < n_input; i++) {
-		const char *ss = in[i];
-		if (strlen(ss) == 0) continue;
-		for (int j = 0; j < n_target; j++)
-		    if (strcmp(ss, tar[j]) == 0) {
-			ians[i] = j + 1;
-			nexact++;
-			break;
-		    }
-	    }
+	HashData data;
+	HashTableSetup(target, &data, NA_INTEGER);
+	data.useUTF8 = useUTF8;
+	data.nomatch = 0;
+	DoHashing(target, &data);
+	for (R_xlen_t i = 0; i < n_input; i++) {
+	    if (strlen(in[i]) == 0) /* don't look up "" */
+		continue;
+	    int j = Lookup(target, input, i, &data);
+	    if ((j == 0) || (no_dups && used[j - 1])) continue;
+	    if (no_dups) used[j - 1] = 1;
+	    ians[i] = j;
+	    nexact++;
 	}
     }
 
@@ -1197,8 +1255,6 @@ SEXP attribute_hidden do_charmatch(SEXP call, SEXP op, SEXP args, SEXP env)
 /* formal arguments of functions.  The returned value */
 /* is a list with all components named. */
 
-#define ARGUSED(x) LEVELS(x)
-
 static SEXP StripUnmatched(SEXP s)
 {
     if (s == R_NilValue) return s;
@@ -1242,7 +1298,6 @@ static SEXP subDots(SEXP rho)
 {
     SEXP rval, dots, a, b, t;
     int len,i;
-    char tbuf[10];
 
     dots = findVar(R_DotsSymbol, rho);
 
@@ -1252,20 +1307,23 @@ static SEXP subDots(SEXP rho)
     if (dots == R_MissingArg)
 	return dots;
 
+    if (!isPairList(dots))
+	error(_("... is not a pairlist"));
+
     len = length(dots);
+    PROTECT(dots);
     PROTECT(rval=allocList(len));
     for(a = dots, b = rval, i = 1; i <= len; a = CDR(a), b = CDR(b), i++) {
-	snprintf(tbuf, 10, "..%d",i);
 	SET_TAG(b, TAG(a));
 	t = CAR(a);
 	while (TYPEOF(t) == PROMSXP)
 	    t = PREXPR(t);
 	if( isSymbol(t) || isLanguage(t) )
-	    SETCAR(b, mkSYMSXP(mkChar(tbuf), R_UnboundValue));
+	    SETCAR(b, installDDVAL(i));
 	else
 	    SETCAR(b, t);
     }
-    UNPROTECT(1);
+    UNPROTECT(2);
     return rval;
 }
 
@@ -1274,7 +1332,7 @@ SEXP attribute_hidden do_matchcall(SEXP call, SEXP op, SEXP args, SEXP env)
 {
     SEXP formals, actuals, rlist;
     SEXP funcall, f, b, rval, sysp, t1, t2, tail;
-    RCNTXT *cptr;
+//    RCNTXT *cptr;
     int expdots;
 
     checkArity(op,args);
@@ -1287,66 +1345,13 @@ SEXP attribute_hidden do_matchcall(SEXP call, SEXP op, SEXP args, SEXP env)
     if (TYPEOF(funcall) != LANGSXP)
 	error(_("invalid '%s' argument"), "call");
 
-    /* Get the function definition */
-    sysp = R_GlobalContext->sysparent;
+    b = CAR(args);
+    if (TYPEOF(b) != CLOSXP)
+	error(_("invalid '%s' argument"), "definition");
 
-    if (TYPEOF(CAR(args)) == NILSXP) {
-	/* Get the env that the function containing */
-	/* matchcall was called from. */
-	cptr = R_GlobalContext;
-	while (cptr != NULL) {
-	    if (cptr->callflag & CTXT_FUNCTION && cptr->cloenv == sysp)
-		break;
-	    cptr = cptr->nextcontext;
-	}
-	if ( cptr == NULL ) {
-	    sysp = R_GlobalEnv;
-	    errorcall(R_NilValue,
-		      "match.call() was called from outside a function");
-	} else
-	    sysp = cptr->sysparent;
-	if (cptr != NULL)
-	    /* Changed to use the function from which match.call was
-	       called as recorded in the context.  This change is
-	       needed in case the current function is computed in a
-	       way that cannot be reproduced by a second computation,
-	       or if it is a registered S3 method that is not
-	       lexically visible at the call site.
-
-	       There is one particular case where this represents a
-	       change from previous semantics: The definition is NULL,
-	       the call is supplied explicitly, and the function in
-	       the call is NOT the current function.  The new behavior
-	       is to ignore the function in the call and use the
-	       current function.  This is consistent with (my reading
-	       of) the documentation in both R and Splus.  However,
-	       the old behavior of R was consistent with the behavior
-	       of Splus (and inconsistent with the documentation in
-	       both cases).
-
-	       The previous semantics for this case can be restored by
-	       having the .Internal receive an additional argument
-	       that indicates whether the call was supplied explicitly
-	       or missing, and using the function recorded in the
-	       context only if the call was not supplied explicitly.
-	       The documentation should also be changed to be
-	       consistent with this behavior.  LT */
-	    PROTECT(b = duplicate(cptr->callfun));
-	else if ( TYPEOF(CAR(funcall)) == SYMSXP )
-	    PROTECT(b = findFun(CAR(funcall), sysp));
-	else
-	    PROTECT(b = eval(CAR(funcall), sysp));
-
-	if (TYPEOF(b) != CLOSXP)
-	    error(_("unable to find a closure from within which 'match.call' was called"));
-
-    }
-    else {
-	/* It must be a closure! */
-	PROTECT(b = CAR(args));
-	if (TYPEOF(b) != CLOSXP)
-	    error(_("invalid '%s' argument"), "definition");
-    }
+    sysp = CAR(CDDDR(args));
+    if (!isEnvironment(sysp))
+	error(_("'envir' must be an environment"));
 
     /* Do we expand ... ? */
 
@@ -1366,8 +1371,8 @@ SEXP attribute_hidden do_matchcall(SEXP call, SEXP op, SEXP args, SEXP env)
     t2 = R_MissingArg;
     for (t1=actuals ; t1!=R_NilValue ; t1 = CDR(t1) ) {
 	if (CAR(t1) == R_DotsSymbol) {
-		t2 = subDots(sysp);
-		break;
+	    t2 = subDots(sysp);
+	    break;
 	}
     }
     /* now to splice t2 into the correct spot in actuals */
@@ -1424,7 +1429,7 @@ SEXP attribute_hidden do_matchcall(SEXP call, SEXP op, SEXP args, SEXP env)
     PROTECT(rval = allocSExp(LANGSXP));
     SETCAR(rval, duplicate(CAR(funcall)));
     SETCDR(rval, rlist);
-    UNPROTECT(4);
+    UNPROTECT(3);
     return rval;
 }
 
@@ -1501,7 +1506,7 @@ rowsum(SEXP x, SEXP g, SEXP uniqueg, SEXP snarm, SEXP rn)
     setAttrib(ans, R_DimNamesSymbol, dn);
     SET_VECTOR_ELT(dn, 0, rn);
     dn2 = getAttrib(x, R_DimNamesSymbol);
-    if(length(dn2 = getAttrib(x, R_DimNamesSymbol)) >= 2 &&
+    if(length(dn2) >= 2 &&
        !isNull(dn3 = VECTOR_ELT(dn2, 1))) SET_VECTOR_ELT(dn, 1, dn3);
 
     UNPROTECT(3); /* HashTable, matches, ans */
@@ -1639,7 +1644,7 @@ SEXP attribute_hidden do_makeunique(SEXP call, SEXP op, SEXP args, SEXP env)
     n = LENGTH(names);
     sep = CADR(args);
     if(!isString(sep) || LENGTH(sep) != 1)
-	error(_("'sep' must be a character string"));
+	error(_("'%s' must be a character string"), "sep");
     csep = translateChar(STRING_ELT(sep, 0));
     PROTECT(ans = allocVector(STRSXP, n));
     vmax = vmaxget();
@@ -1659,7 +1664,7 @@ SEXP attribute_hidden do_makeunique(SEXP call, SEXP op, SEXP args, SEXP env)
 	} else {
 	    /* This is going to be slow so use expensive allocation
 	       that will be recovered if interrupted. */
-	    cnts = (int *) R_alloc((size_t) n,  sizeof(int));
+	    cnts = (int *) R_alloc((size_t) n,	sizeof(int));
 	}
 	for(i = 0; i < n; i++) cnts[i] = 1;
 	data.nomatch = 0;
@@ -1709,7 +1714,7 @@ static void HashTableSetup1(SEXP x, HashData *d)
 }
 
 /* used in utils */
-SEXP csduplicated(SEXP x)
+SEXP Rf_csduplicated(SEXP x)
 {
     SEXP ans;
     int n;
@@ -1732,12 +1737,7 @@ SEXP csduplicated(SEXP x)
 
 #include <R_ext/Random.h>
 
-static R_INLINE double ru()
-{
-    double U = 33554432.0;
-    return (floor(U*unif_rand()) + unif_rand())/U;
-}
-
+// sample.int(.) --> .Internal(sample2(n, size)) :
 SEXP attribute_hidden do_sample2(SEXP call, SEXP op, SEXP args, SEXP env)
 {
     checkArity(op, args);
@@ -1757,7 +1757,7 @@ SEXP attribute_hidden do_sample2(SEXP call, SEXP op, SEXP args, SEXP env)
 	PROTECT(data.HashTable);
 	for (int i = 0; i < k; i++)
 	    for(int j = 0; j < 100; j++) { // average < 2
-		ry[i] = floor(dn * ru() + 1);
+		ry[i] = R_unif_index(dn) + 1;
 		if(!isDuplicated(ans, i, &data)) break;
 	    }
    } else {
@@ -1767,7 +1767,7 @@ SEXP attribute_hidden do_sample2(SEXP call, SEXP op, SEXP args, SEXP env)
 	PROTECT(data.HashTable);
 	for (int i = 0; i < k; i++)
 	    for(int j = 0; j < 100; j++) { // average < 2
-		iy[i] = (int)(dn * unif_rand() + 1);
+		iy[i] = (int)(R_unif_index(dn) + 1);
 		if(!isDuplicated(ans, i, &data)) break;
 	    }
     }
diff --git a/src/main/util.c b/src/main/util.c
index 02b229b..08a9afe 100644
--- a/src/main/util.c
+++ b/src/main/util.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--2014  The R Core Team
+ *  Copyright (C) 1997--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
@@ -15,10 +15,9 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  */
 
-
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
@@ -50,7 +49,7 @@ static void R_wfixslash(wchar_t *s);
 extern "C" {
 #endif
 void F77_SYMBOL(rwarnc)(char *msg, int *nchar);
-void F77_SYMBOL(rexitc)(char *msg, int *nchar);
+void NORET F77_SYMBOL(rexitc)(char *msg, int *nchar);
 
 #ifdef __cplusplus
 }
@@ -139,8 +138,7 @@ const static char * const falsenames[] = {
 
 SEXP asChar(SEXP x)
 {
-    if (XLENGTH(x) >= 1) {
-	if (isVectorAtomic(x)) {
+	if (isVectorAtomic(x) && XLENGTH(x) >= 1) {
 	    int w, d, e, wi, di, ei;
 	    char buf[MAXELTSIZE];  /* Probably 100 would suffice */
 
@@ -149,9 +147,9 @@ SEXP asChar(SEXP x)
 		if (LOGICAL(x)[0] == NA_LOGICAL)
 		    return NA_STRING;
 		if (LOGICAL(x)[0])
-		    sprintf(buf, "T");
+		    sprintf(buf, "TRUE");
 		else
-		    sprintf(buf, "F");
+		    sprintf(buf, "FALSE");
 		return mkChar(buf);
 	    case INTSXP:
 		if (INTEGER(x)[0] == NA_INTEGER)
@@ -161,7 +159,7 @@ SEXP asChar(SEXP x)
 	    case REALSXP:
 		PrintDefaults();
 		formatReal(REAL(x), 1, &w, &d, &e, 0);
-		return mkChar(EncodeReal(REAL(x)[0], w, d, e, OutDec));
+		return mkChar(EncodeReal0(REAL(x)[0], w, d, e, OutDec));
 	    case CPLXSXP:
 		PrintDefaults();
 		formatComplex(COMPLEX(x), 1, &w, &d, &e, &wi, &di, &ei, 0);
@@ -175,7 +173,6 @@ SEXP asChar(SEXP x)
 	    return x;
 	} else if(TYPEOF(x) == SYMSXP)
 	    return PRINTNAME(x);
-    }
     return NA_STRING;
 }
 
@@ -242,14 +239,66 @@ SEXPTYPE str2type(const char *s)
     return (SEXPTYPE) -1;
 }
 
+static struct {
+    const char *cstrName;
+    SEXP rcharName;
+    SEXP rstrName;
+    SEXP rsymName;
+} Type2Table[MAX_NUM_SEXPTYPE];
+
+
+static int findTypeInTypeTable(SEXPTYPE t)
+ {
+    for (int i = 0; TypeTable[i].str; i++)
+	if (TypeTable[i].type == t) return i;
+
+    return -1;
+}
+
+// called from main.c
+attribute_hidden
+void InitTypeTables(void) {
+
+    /* Type2Table */
+    for (int type = 0; type < MAX_NUM_SEXPTYPE; type++) {
+	int j = findTypeInTypeTable(type);
+
+	if (j != -1) {
+	    const char *cstr = TypeTable[j].str;
+	    SEXP rchar = PROTECT(mkChar(cstr));
+	    SEXP rstr = ScalarString(rchar);
+	    MARK_NOT_MUTABLE(rstr);
+	    R_PreserveObject(rstr);
+	    UNPROTECT(1); /* rchar */
+	    SEXP rsym = install(cstr);
+
+	    Type2Table[type].cstrName = cstr;
+	    Type2Table[type].rcharName = rchar;
+	    Type2Table[type].rstrName = rstr;
+	    Type2Table[type].rsymName = rsym;
+	} else {
+	    Type2Table[type].cstrName = NULL;
+	    Type2Table[type].rcharName = NULL;
+	    Type2Table[type].rstrName = NULL;
+	    Type2Table[type].rsymName = NULL;
+	}
+    }
+}
 
-SEXP type2str(SEXPTYPE t)
+SEXP type2str_nowarn(SEXPTYPE t) /* returns a CHARSXP */
 {
-    int i;
+    if (t < MAX_NUM_SEXPTYPE) { /* FIXME: branch not really needed */
+	SEXP res = Type2Table[t].rcharName;
+	if (res != NULL) return res;
+    }
+    return R_NilValue;
+}
 
-    for (i = 0; TypeTable[i].str; i++) {
-	if (TypeTable[i].type == t)
-	    return mkChar(TypeTable[i].str);
+SEXP type2str(SEXPTYPE t) /* returns a CHARSXP */
+{
+    SEXP s = type2str_nowarn(t);
+    if (s != R_NilValue) {
+	return s;
     }
     warning(_("type %d is unimplemented in '%s'"), t, "type2str");
     char buf[50];
@@ -257,13 +306,22 @@ SEXP type2str(SEXPTYPE t)
     return mkChar(buf);
 }
 
-const char *type2char(SEXPTYPE t)
+SEXP type2rstr(SEXPTYPE t) /* returns a STRSXP */
 {
-    int i;
+    if (t < MAX_NUM_SEXPTYPE) { /* FIXME: branch not really needed */
+	SEXP res = Type2Table[t].rstrName;
+	if (res != NULL) return res;
+    }
+    error(_("type %d is unimplemented in '%s'"), t,
+	  "type2ImmutableScalarString");
+    return R_NilValue; /* for -Wall */
+}
 
-    for (i = 0; TypeTable[i].str; i++) {
-	if (TypeTable[i].type == t)
-	    return TypeTable[i].str;
+const char *type2char(SEXPTYPE t) /* returns a char* */
+{
+    if (t < MAX_NUM_SEXPTYPE) { /* FIXME: branch not really needed */
+	const char * res = Type2Table[t].cstrName;
+	if (res != NULL) return res;
     }
     warning(_("type %d is unimplemented in '%s'"), t, "type2char");
     static char buf[50];
@@ -272,23 +330,20 @@ const char *type2char(SEXPTYPE t)
 }
 
 #ifdef UNUSED
-SEXP type2symbol(SEXPTYPE t)
+SEXP NORET type2symbol(SEXPTYPE t)
 {
-    int i;
-    /* for efficiency, a hash table set up to index TypeTable, and
-       with TypeTable pointing to both the
-       character string and to the symbol would be better */
-    for (i = 0; TypeTable[i].str; i++) {
-	if (TypeTable[i].type == t)
-	    return install((const char *)&TypeTable[i].str);
+    if (t >= 0 && t < MAX_NUM_SEXPTYPE) { /* FIXME: branch not really needed */
+	SEXP res = Type2Table[t].rsymName;
+	if (res != NULL) {
+	    return res;
+	}
     }
     error(_("type %d is unimplemented in '%s'"), t, "type2symbol");
-    return R_NilValue; /* for -Wall */
 }
 #endif
 
 attribute_hidden
-void UNIMPLEMENTED_TYPEt(const char *s, SEXPTYPE t)
+void NORET UNIMPLEMENTED_TYPEt(const char *s, SEXPTYPE t)
 {
     int i;
 
@@ -299,7 +354,7 @@ void UNIMPLEMENTED_TYPEt(const char *s, SEXPTYPE t)
     error(_("unimplemented type (%d) in '%s'\n"), t, s);
 }
 
-void UNIMPLEMENTED_TYPE(const char *s, SEXP x)
+void NORET UNIMPLEMENTED_TYPE(const char *s, SEXP x)
 {
     UNIMPLEMENTED_TYPEt(s, TYPEOF(x));
 }
@@ -558,6 +613,19 @@ static void isort_with_index(int *x, int *indx, int n)
 }
 
 
+// body(x) without attributes "srcref", "srcfile", "wholeSrcref" :
+// NOTE: Callers typically need  PROTECT(R_body_no_src(.))
+SEXP R_body_no_src(SEXP x) {
+    SEXP b = PROTECT(duplicate(BODY_EXPR(x)));
+    /* R's removeSource() works *recursively* on the body()
+       in  ../library/utils/R/sourceutils.R  but that seems unneeded (?) */
+    setAttrib(b, R_SrcrefSymbol, R_NilValue);
+    setAttrib(b, R_SrcfileSymbol, R_NilValue);
+    setAttrib(b, R_WholeSrcrefSymbol, R_NilValue);
+    UNPROTECT(1);
+    return b;
+}
+
 /* merge(xinds, yinds, all.x, all.y) */
 /* xinds, yinds are along x and y rows matching into the (numeric)
    common indices, with 0 for non-matches.
@@ -569,12 +637,10 @@ static void isort_with_index(int *x, int *indx, int n)
 */
 SEXP attribute_hidden do_merge(SEXP call, SEXP op, SEXP args, SEXP rho)
 {
-    SEXP xi, yi, ansx, ansy, ans, x_lone, y_lone;
+    SEXP xi, yi, ansx, ansy, ans;
     int nx = 0, ny = 0, i, j, k, nx_lone = 0, ny_lone = 0;
     int all_x = 0, all_y = 0, ll = 0/* "= 0" : for -Wall */;
-    int *ix, *iy, tmp, nnx, nny, i0, j0;
-    double dnans = 0;
-    const char *nms[] = {"xi", "yi", "x.alone", "y.alone", ""};
+    int nnx, nny;
 
     checkArity(op, args);
     xi = CAR(args);
@@ -590,18 +656,23 @@ SEXP attribute_hidden do_merge(SEXP call, SEXP op, SEXP args, SEXP rho)
 	error(_("'all.y' must be TRUE or FALSE"));
 
     /* 0. sort the indices */
-    ix = (int *) R_alloc((size_t) nx, sizeof(int));
-    iy = (int *) R_alloc((size_t) ny, sizeof(int));
+    int *ix = (int *) R_alloc((size_t) nx, sizeof(int));
+    int *iy = (int *) R_alloc((size_t) ny, sizeof(int));
     for(i = 0; i < nx; i++) ix[i] = i+1;
     for(i = 0; i < ny; i++) iy[i] = i+1;
     isort_with_index(INTEGER(xi), ix, nx);
     isort_with_index(INTEGER(yi), iy, ny);
 
     /* 1. determine result sizes */
-    for (i = 0; i < nx; i++) if (INTEGER(xi)[i] > 0) break; nx_lone = i;
-    for (i = 0; i < ny; i++) if (INTEGER(yi)[i] > 0) break; ny_lone = i;
+    for (i = 0; i < nx; i++)
+	if (INTEGER(xi)[i] > 0) break;
+    nx_lone = i;
+    for (i = 0; i < ny; i++)
+	if (INTEGER(yi)[i] > 0) break;
+    ny_lone = i;
+    double dnans = 0;
     for (i = nx_lone, j = ny_lone; i < nx; i = nnx, j = nny) {
-	tmp = INTEGER(xi)[i];
+	int tmp = INTEGER(xi)[i];
 	for(nnx = i; nnx < nx; nnx++) if(INTEGER(xi)[nnx] != tmp) break;
 	/* the next is not in theory necessary,
 	   since we have the common values only */
@@ -610,38 +681,39 @@ SEXP attribute_hidden do_merge(SEXP call, SEXP op, SEXP args, SEXP rho)
 	/* printf("i %d nnx %d j %d nny %d\n", i, nnx, j, nny); */
 	dnans += ((double)(nnx-i))*(nny-j);
     }
-    if (dnans > INT_MAX)
+    if (dnans > R_XLEN_T_MAX)
 	error(_("number of rows in the result exceeds maximum vector length"));
-    int nans = (int) dnans;
+    R_xlen_t nans = (int) dnans;
 
 
     /* 2. allocate and store result components */
 
-    PROTECT(ans = mkNamed(VECSXP, nms));
+    const char *nms[] = {"xi", "yi", "x.alone", "y.alone", ""};
+    ans = PROTECT(mkNamed(VECSXP, nms));
     ansx = allocVector(INTSXP, nans);    SET_VECTOR_ELT(ans, 0, ansx);
     ansy = allocVector(INTSXP, nans);    SET_VECTOR_ELT(ans, 1, ansy);
 
     if(all_x) {
-	x_lone = allocVector(INTSXP, nx_lone);
+	SEXP x_lone = allocVector(INTSXP, nx_lone);
 	SET_VECTOR_ELT(ans, 2, x_lone);
 	for (i = 0, ll = 0; i < nx_lone; i++)
 	    INTEGER(x_lone)[ll++] = ix[i];
     }
 
     if(all_y) {
-	y_lone = allocVector(INTSXP, ny_lone);
+	SEXP y_lone = allocVector(INTSXP, ny_lone);
 	SET_VECTOR_ELT(ans, 3, y_lone);
 	for (i = 0, ll = 0; i < ny_lone; i++)
 	    INTEGER(y_lone)[ll++] = iy[i];
     }
 
     for (i = nx_lone, j = ny_lone, k = 0; i < nx; i = nnx, j = nny) {
-	tmp = INTEGER(xi)[i];
+	int tmp = INTEGER(xi)[i];
 	for(nnx = i; nnx < nx; nnx++) if(INTEGER(xi)[nnx] != tmp) break;
 	for(; j < ny; j++) if(INTEGER(yi)[j] >= tmp) break;
 	for(nny = j; nny < ny; nny++) if(INTEGER(yi)[nny] != tmp) break;
-	for(i0 = i; i0 < nnx; i0++)
-	    for(j0 = j; j0 < nny; j0++) {
+	for(int i0 = i; i0 < nnx; i0++)
+	    for(int j0 = j; j0 < nny; j0++) {
 		INTEGER(ansx)[k]   = ix[i0];
 		INTEGER(ansy)[k++] = iy[j0];
 	    }
@@ -705,7 +777,7 @@ SEXP attribute_hidden do_setwd(SEXP call, SEXP op, SEXP args, SEXP rho)
 	error(_("missing value is invalid"));
 
     /* get current directory to return */
-    wd = intern_getwd();
+    PROTECT(wd = intern_getwd());
 
 #ifdef Win32
     {
@@ -721,6 +793,7 @@ SEXP attribute_hidden do_setwd(SEXP call, SEXP op, SEXP args, SEXP rho)
 	error(_("cannot change working directory"));
     }
 #endif
+    UNPROTECT(1); /* wd */
     return(wd);
 }
 
@@ -958,7 +1031,7 @@ const char *getTZinfo(void)
     const char *p = getenv("TZ");
     if(p) return p;
 #ifdef HAVE_REALPATH
-    // This works on Linux, OS X and *BSD: other known OSes set TZ.
+    // This works on Linux, macOS and *BSD: other known OSes set TZ.
     static char abspath[PATH_MAX+1] = "";
     if(abspath[0]) return abspath + 20;
     if(realpath("/etc/localtime", abspath))
@@ -1311,6 +1384,39 @@ Rboolean utf8Valid(const char *str)
     return valid_utf8(str, strlen(str)) == 0;
 }
 
+SEXP attribute_hidden do_validUTF8(SEXP call, SEXP op, SEXP args, SEXP rho)
+{
+    checkArity(op, args);
+    SEXP x = CAR(args);
+    if (!isString(x))
+	error(_("invalid '%s' argument"), "x");
+    R_xlen_t n = XLENGTH(x);
+    SEXP ans = allocVector(LGLSXP, n); // no allocation below
+    int *lans = LOGICAL(ans);
+    for (R_xlen_t i = 0; i < n; i++)
+	lans[i] = utf8Valid(CHAR(STRING_ELT(x, i)));
+    return ans;
+}
+
+SEXP attribute_hidden do_validEnc(SEXP call, SEXP op, SEXP args, SEXP rho)
+{
+    checkArity(op, args);
+    SEXP x = CAR(args);
+    if (!isString(x))
+	error(_("invalid '%s' argument"), "x");
+    R_xlen_t n = XLENGTH(x);
+    SEXP ans = allocVector(LGLSXP, n); // no allocation below
+    int *lans = LOGICAL(ans);
+    for (R_xlen_t i = 0; i < n; i++) {
+	SEXP p = STRING_ELT(x, i);
+	if (IS_BYTES(p) || IS_LATIN1(p)) lans[i] = 1;
+	else if (IS_UTF8(p) || utf8locale) lans[i] = utf8Valid(CHAR(p));
+	else if(mbcslocale) lans[i] = mbcsValid(CHAR(p));
+	else lans[i] = 1;
+    }
+    return ans;
+}
+
 
 /* MBCS-aware versions of common comparisons.  Only used for ASCII c */
 char *Rf_strchr(const char *s, int c)
@@ -1396,7 +1502,7 @@ void R_fixbackslash(char *s)
 }
 #endif
 
-void F77_SYMBOL(rexitc)(char *msg, int *nchar)
+void NORET F77_SYMBOL(rexitc)(char *msg, int *nchar)
 {
     int nc = *nchar;
     char buf[256];
@@ -1580,17 +1686,31 @@ double R_strtod5(const char *str, char **endptr, char dec,
 	    case '+': p++;
 	    default: ;
 	    }
-	    for (n = 0; *p >= '0' && *p <= '9'; p++) n = n * 10 + (*p - '0');
-	    expn += expsign * n;
-	    if(exph > 0) expn -= exph;
-	    if (expn < 0) {
-		for (n = -expn, fac = 1.0; n; n >>= 1, p2 *= p2)
-		    if (n & 1) fac *= p2;
-		ans /= fac;
-	    } else {
-		for (n = expn, fac = 1.0; n; n >>= 1, p2 *= p2)
-		    if (n & 1) fac *= p2;
-		ans *= fac;
+	    /* The test for n is in response to PR#16358; it's not right if the exponent is
+	       very large, but the overflow or underflow below will handle it. */
+#define MAX_EXPONENT_PREFIX 9999
+	    for (n = 0; *p >= '0' && *p <= '9'; p++) n = (n < MAX_EXPONENT_PREFIX) ? n * 10 + (*p - '0') : n;
+	    if (ans != 0.0) { /* PR#15976:  allow big exponents on 0 */
+		expn += expsign * n;
+		if(exph > 0) {
+		    if (expn - exph < -122) {	/* PR#17199:  fac may overflow below if expn - exph is too small.  
+		                                   2^-122 is a bit bigger than 1E-37, so should be fine on all systems */
+		    	for (n = exph, fac = 1.0; n; n >>= 1, p2 *= p2)
+			    if (n & 1) fac *= p2;
+			ans /= fac;
+			p2 = 2.0;
+		    } else
+			expn -= exph;
+		}
+		if (expn < 0) {
+		    for (n = -expn, fac = 1.0; n; n >>= 1, p2 *= p2)
+			if (n & 1) fac *= p2;
+		    ans /= fac;
+		} else {
+		    for (n = expn, fac = 1.0; n; n >>= 1, p2 *= p2)
+			if (n & 1) fac *= p2;
+		    ans *= fac;
+		}
 	    }
 	}
 	goto done;
@@ -1614,7 +1734,7 @@ double R_strtod5(const char *str, char **endptr, char dec,
 	case '+': p++;
 	default: ;
 	}
-	for (n = 0; *p >= '0' && *p <= '9'; p++) n = n * 10 + (*p - '0');
+	for (n = 0; *p >= '0' && *p <= '9'; p++) n = (n < MAX_EXPONENT_PREFIX) ? n * 10 + (*p - '0') : n;
 	expn += expsign * n;
     }
 
@@ -1631,7 +1751,7 @@ double R_strtod5(const char *str, char **endptr, char dec,
 	for (n = -expn, fac = 1.0; n; n >>= 1, p10 *= p10)
 	    if (n & 1) fac *= p10;
 	ans /= fac;
-    } else {
+    } else if (ans != 0.0) { /* PR#15976:  allow big exponents on 0, e.g. 0E4933 */
 	for (n = expn, fac = 1.0; n; n >>= 1, p10 *= p10)
 	    if (n & 1) fac *= p10;
 	ans *= fac;
@@ -1676,7 +1796,7 @@ SEXP attribute_hidden do_enc2(SEXP call, SEXP op, SEXP args, SEXP env)
     check1arg(args, call, "x");
 
     if (!isString(CAR(args)))
-	errorcall(call, "argumemt is not a character vector");
+	errorcall(call, "argument is not a character vector");
     ans = CAR(args);
     for (i = 0; i < XLENGTH(ans); i++) {
 	el = STRING_ELT(ans, i);
@@ -1684,7 +1804,7 @@ SEXP attribute_hidden do_enc2(SEXP call, SEXP op, SEXP args, SEXP env)
 	if (PRIMVAL(op) || known_to_be_utf8) { /* enc2utf8 */
 	    if (IS_UTF8(el) || IS_ASCII(el) || IS_BYTES(el)) continue;
 	    if (!duped) { ans = PROTECT(duplicate(ans)); duped = TRUE; }
-	    SET_STRING_ELT(ans, i, 
+	    SET_STRING_ELT(ans, i,
 			   mkCharCE(translateCharUTF8(el), CE_UTF8));
 	} else if (ENC_KNOWN(el)) { /* enc2native */
 	    if (IS_ASCII(el) || IS_BYTES(el)) continue;
@@ -1703,7 +1823,7 @@ SEXP attribute_hidden do_enc2(SEXP call, SEXP op, SEXP args, SEXP env)
 #ifdef USE_ICU
 # include <locale.h>
 #ifdef USE_ICU_APPLE
-/* Mac OS X is missing the headers */
+/* macOS is missing the headers */
 typedef int UErrorCode; /* really an enum these days */
 struct UCollator;
 typedef struct UCollator UCollator;
@@ -1795,15 +1915,14 @@ const char* ucol_getLocaleByType(const UCollator *coll,
 #endif
 
 static UCollator *collator = NULL;
-
-static Rboolean collationLocaleSet = FALSE;
+static int collationLocaleSet = 0;
 
 /* called from platform.c */
 void attribute_hidden resetICUcollator(void)
 {
     if (collator) ucol_close(collator);
     collator = NULL;
-    collationLocaleSet = FALSE;
+    collationLocaleSet = 0;
 }
 
 static const struct {
@@ -1832,12 +1951,36 @@ static const struct {
     { NULL,  0 }
 };
 
-// Idea is to remap Windows' locale names by 3.2.0.
+#ifdef Win32
+#define BUFFER_SIZE 512
+typedef int (WINAPI *PGSDLN)(LPWSTR, int);
+
+static const char *getLocale(void)
+{
+    const char *p = getenv("R_ICU_LOCALE");
+    if (p && p[0]) return p;
+
+    // This call is >= Vista/Server 2008
+    // ICU should accept almost all of these, e.g. en-US and uz-Latn-UZ
+    PGSDLN pGSDLN = (PGSDLN)
+	GetProcAddress(GetModuleHandle(TEXT("kernel32.dll")),
+		       "GetSystemDefaultLocaleName");
+    if(pGSDLN) {
+	WCHAR wcBuffer[BUFFER_SIZE];
+	pGSDLN(wcBuffer, BUFFER_SIZE);
+	static char locale[BUFFER_SIZE];
+	WideCharToMultiByte(CP_ACP, 0, wcBuffer, -1,
+			    locale, BUFFER_SIZE, NULL, NULL);
+	return locale;
+    } else return "root";
+}
+#else
 static const char *getLocale(void)
 {
     const char *p = getenv("R_ICU_LOCALE");
     return (p && p[0]) ? p : setlocale(LC_COLLATE, NULL);
 }
+#endif
 
 SEXP attribute_hidden do_ICUset(SEXP call, SEXP op, SEXP args, SEXP rho)
 {
@@ -1858,19 +2001,23 @@ SEXP attribute_hidden do_ICUset(SEXP call, SEXP op, SEXP args, SEXP rho)
 		ucol_close(collator);
 		collator = NULL;
 	    }
-	    if(strcmp(s, "none")) {
-		if(streql(s, "default")) 
-		    uloc_setDefault(getLocale(), &status);
-		else uloc_setDefault(s, &status);
-		if(U_FAILURE(status))
-		    error("failed to set ICU locale %s (%d)", s, status);
-		collator = ucol_open(NULL, &status);
-		if (U_FAILURE(status)) {
-		    collator = NULL;
-		    error("failed to open ICU collator (%d)", status);
+	    if(streql(s, "ASCII")) {
+		collationLocaleSet = 2;
+	    } else {
+		if(strcmp(s, "none")) {
+		    if(streql(s, "default"))
+			uloc_setDefault(getLocale(), &status);
+		    else uloc_setDefault(s, &status);
+		    if(U_FAILURE(status))
+			error("failed to set ICU locale %s (%d)", s, status);
+		    collator = ucol_open(NULL, &status);
+		    if (U_FAILURE(status)) {
+			collator = NULL;
+			error("failed to open ICU collator (%d)", status);
+		    }
 		}
+		collationLocaleSet = 1;
 	    }
-	    collationLocaleSet = TRUE;
 	} else {
 	    int i, at = -1, val = -1;
 	    for (i = 0; ATtable[i].str; i++)
@@ -1901,14 +2048,16 @@ SEXP attribute_hidden do_ICUget(SEXP call, SEXP op, SEXP args, SEXP rho)
     const char *ans = "unknown", *res;
     checkArity(op, args);
 
-    if(collator) {
+    if (collationLocaleSet == 2) {
+	ans = "ASCII";
+    } else if(collator) {
 	UErrorCode  status = U_ZERO_ERROR;
 	int type = asInteger(CAR(args));
 	if (type < 1 || type > 2)
 	    error(_("invalid '%s' value"), "type");
-	
-	res = ucol_getLocaleByType(collator, 
-				   type == 1 ? ULOC_ACTUAL_LOCALE : ULOC_VALID_LOCALE, 
+
+	res = ucol_getLocaleByType(collator,
+				   type == 1 ? ULOC_ACTUAL_LOCALE : ULOC_VALID_LOCALE,
 				   &status);
 	if(!U_FAILURE(status) && res) ans = res;
     } else ans = "ICU not in use";
@@ -1921,12 +2070,13 @@ attribute_hidden
 int Scollate(SEXP a, SEXP b)
 {
     if (!collationLocaleSet) {
-	collationLocaleSet = TRUE;
+	int errsv = errno;      /* OSX may set errno in the operations below. */
+	collationLocaleSet = 1;
 #ifndef Win32
 	if (strcmp("C", getLocale()) ) {
 #else
 	const char *p = getenv("R_ICU_LOCALE");
-        if(p && p[0]) {
+	if(p && p[0]) {
 #endif
 	    UErrorCode status = U_ZERO_ERROR;
 	    uloc_setDefault(getLocale(), &status);
@@ -1938,9 +2088,12 @@ int Scollate(SEXP a, SEXP b)
 		error("failed to open ICU collator (%d)", status);
 	    }
 	}
+	errno = errsv;
     }
     if (collator == NULL)
-	return strcoll(translateChar(a), translateChar(b));
+	return collationLocaleSet == 2 ?
+	    strcmp(translateChar(a), translateChar(b)) :
+	    strcoll(translateChar(a), translateChar(b));
 
     UCharIterator aIter, bIter;
     const char *as = translateCharUTF8(a), *bs = translateCharUTF8(b);
@@ -2080,27 +2233,44 @@ SEXP attribute_hidden do_tabulate(SEXP call, SEXP op, SEXP args, SEXP rho)
     SEXP in = CAR(args), nbin = CADR(args);
     if (TYPEOF(in) != INTSXP)  error("invalid input");
     R_xlen_t n = XLENGTH(in);
-    /* FIXME: could in principle be a long vector */
     int nb = asInteger(nbin);
     if (nb == NA_INTEGER || nb < 0)
 	error(_("invalid '%s' argument"), "nbin");
-    SEXP ans = allocVector(INTSXP, nb);
-    int *x = INTEGER(in), *y = INTEGER(ans);
-    memset(y, 0, nb * sizeof(int));
-    for(R_xlen_t i = 0 ; i < n ; i++)
-	if (x[i] != NA_INTEGER && x[i] > 0 && x[i] <= nb) y[x[i] - 1]++;
+    int *x = INTEGER(in);
+    SEXP ans;
+#ifdef LONG_VECTOR_SUPPORT
+    if (n > INT_MAX) {
+	ans = allocVector(REALSXP, nb);
+	double *y = REAL(ans);
+	if (nb) memset(y, 0, nb * sizeof(double));
+	for(R_xlen_t i = 0 ; i < n ; i++)
+	    if (x[i] != NA_INTEGER && x[i] > 0 && x[i] <= nb) y[x[i] - 1]++;
+    } else
+#endif
+    {
+	ans = allocVector(INTSXP, nb);
+	int *y = INTEGER(ans);
+	if (nb) memset(y, 0, nb * sizeof(int));
+	for(R_xlen_t i = 0 ; i < n ; i++)
+	    if (x[i] != NA_INTEGER && x[i] > 0 && x[i] <= nb) y[x[i] - 1]++;
+    }
     return ans;
 }
 
-/* x can be a long vector but xt cannot since the result is integer */
+/* Note: R's findInterval( x , vec, ...)  has first two arguments swapped !
+ * .Internal(findInterval(vec, x, rightmost.closed, all.inside,  left.open))
+ *                         xt  x    right             inside       leftOp
+ * x can be a long vector but xt cannot since the result is integer
+*/
 SEXP attribute_hidden do_findinterval(SEXP call, SEXP op, SEXP args, SEXP rho)
 {
     checkArity(op, args);
-    SEXP xt, x, right, inside;
+    SEXP xt, x, right, inside, leftOp;
     xt = CAR(args); args = CDR(args);
     x = CAR(args); args = CDR(args);
     right = CAR(args); args = CDR(args);
-    inside = CAR(args);
+    inside = CAR(args);args = CDR(args);
+    leftOp = CAR(args);
     if(TYPEOF(xt) != REALSXP || TYPEOF(x) != REALSXP) error("invalid input");
 #ifdef LONG_VECTOR_SUPPORT
     if (IS_LONG_VEC(xt))
@@ -2109,7 +2279,7 @@ SEXP attribute_hidden do_findinterval(SEXP call, SEXP op, SEXP args, SEXP rho)
     int n = LENGTH(xt);
     if (n == NA_INTEGER) error(_("invalid '%s' argument"), "vec");
     R_xlen_t nx = XLENGTH(x);
-    int sr = asLogical(right), si = asLogical(inside);
+    int sr = asLogical(right), si = asLogical(inside), lO = asLogical(leftOp);
     if (sr == NA_INTEGER)
 	error(_("invalid '%s' argument"), "rightmost.closed");
     if (si == NA_INTEGER)
@@ -2118,10 +2288,11 @@ SEXP attribute_hidden do_findinterval(SEXP call, SEXP op, SEXP args, SEXP rho)
     double *rxt = REAL(xt), *rx = REAL(x);
     int ii = 1;
     for(int i = 0; i < nx; i++) {
-	if (ISNAN(REAL(x)[i])) ii = NA_INTEGER;
+	if (ISNAN(rx[i]))
+	    ii = NA_INTEGER;
 	else {
-	    int mfl = si;
-	    ii = findInterval(rxt, n, rx[i], sr, si, ii, &mfl);
+	    int mfl;
+	    ii = findInterval2(rxt, n, rx[i], sr, si, lO, ii, &mfl); // -> ../appl/interv.c
 	}
 	INTEGER(ans)[i] = ii;
     }
@@ -2174,7 +2345,7 @@ SEXP attribute_hidden do_pretty(SEXP call, SEXP op, SEXP args, SEXP rho)
 
 /*
     r <- .Internal(formatC(x, as.character(mode), width, digits,
-                   as.character(format), as.character(flag), i.strlen))
+		   as.character(format), as.character(flag), i.strlen))
 */
 
 static void
@@ -2268,10 +2439,8 @@ SEXP attribute_hidden do_formatC(SEXP call, SEXP op, SEXP args, SEXP rho)
 
 #ifdef Win32
 /* avoid latest MinGW's redefinition in stdio.h */
-int trio_sprintf(char *buffer, const char *format, ...);
-#define sprintf trio_sprintf
+#include <trioremap.h>
 #endif
-
 #include <Rmath.h>		/* fround */
 
 static
diff --git a/src/main/version.c b/src/main/version.c
index ab3f4fe..a5b399b 100644
--- a/src/main/version.c
+++ b/src/main/version.c
@@ -15,7 +15,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  */
 
 #ifdef HAVE_CONFIG_H
@@ -143,3 +143,8 @@ void attribute_hidden PrintVersion_part_1(char *s, size_t len)
     if(strlen(R_ARCH)) { SPRINTF_2("/%s", R_ARCH); }
     SPRINTF_2(" (%d-bit)\n", 8*(int)sizeof(void *));
 }
+
+SEXP attribute_hidden do_internalsID(SEXP call, SEXP op, SEXP args, SEXP env)
+{
+    return mkString(R_INTERNALS_UUID);
+}
diff --git a/src/main/vfonts.c b/src/main/vfonts.c
deleted file mode 100644
index afed467..0000000
--- a/src/main/vfonts.c
+++ /dev/null
@@ -1,99 +0,0 @@
-/*
- *  R : A Computer Language for Statistical Data Analysis
- *  Copyright (C) 2001-8 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
- *  the Free Software Foundation; either version 2 of the License, or
- *  (at your option) any later version.
- *
- *  This program is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU General Public License for more details.
- *
- *  You should have received a copy of the GNU General Public License
- *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
- */
-
-/* This should be regarded as part of the graphics engine */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <Defn.h>
-#include <Rdynpriv.h>
-#include <R_ext/GraphicsEngine.h>
-#include <Rmodules/Rvfonts.h>
-
-static VfontRoutines routines;
-static int initialized = 0;
-
-void
-R_GE_setVFontRoutines(R_GE_VStrWidthRoutine vwidth,
-		      R_GE_VStrHeightRoutine vheight,
-		      R_GE_VTextRoutine vtext)
-{
-    routines.GEVStrWidth = vwidth;
-    routines.GEVStrHeight = vheight;
-    routines.GEVText = vtext;
-}
-
-static void vfonts_Init(void)
-{
-    int res = R_moduleCdynload("vfonts", 1, 1);
-    initialized = -1;
-    if(!res) return;
-    if(!routines.GEVStrWidth)
-	error(_("vfont routines cannot be accessed in module"));
-    initialized = 1;
-    return;
-}
-
-attribute_hidden
-double R_GE_VStrWidth(const char *s, cetype_t enc, const pGEcontext gc, pGEDevDesc dd)
-{
-    double res;
-    if(!initialized) vfonts_Init();
-    if(initialized > 0) {
-	const void *vmax = vmaxget();
-	const char *str = reEnc(s, enc, CE_LATIN1, 2 /* '.' */);
-	res = (*routines.GEVStrWidth)(str, gc, dd);
-	vmaxset(vmax);
-	return res;
-    } else {
-	error(_("Hershey fonts cannot be loaded"));
-	return 0.0; /* -Wall */
-    }
-}
-
-attribute_hidden
-double R_GE_VStrHeight(const char *s, cetype_t enc, const pGEcontext gc, pGEDevDesc dd)
-{
-    if(!initialized) vfonts_Init();
-    if(initialized > 0) {
-	/* The strheight does not depend on the encoding. */
-	return (*routines.GEVStrHeight)(s, gc, dd);
-    } else {
-	error(_("Hershey fonts cannot be loaded"));
-	return 0.0;
-    }
-}
-
-
-attribute_hidden
-void R_GE_VText(double x, double y, const char * const s, cetype_t enc,
-		double x_justify, double y_justify, double rotation,
-		const pGEcontext gc, pGEDevDesc dd)
-{
-    if(!initialized) vfonts_Init();
-    if(initialized > 0) {
-	const void *vmax = vmaxget();
-	const char *str = reEnc(s, enc, CE_LATIN1, 2 /* '.' */);
-	(*routines.GEVText)(x, y, str, x_justify, y_justify, rotation, gc, dd);
-	vmaxset(vmax);
-    } else
-	error(_("Hershey fonts cannot be loaded"));
-}
diff --git a/src/main/xxxpr.f b/src/main/xxxpr.f
index e8c6ce2..029a300 100644
--- a/src/main/xxxpr.f
+++ b/src/main/xxxpr.f
@@ -15,7 +15,7 @@ c  GNU General Public License for more details.
 c
 c  You should have received a copy of the GNU General Public License
 c  along with this program; if not, a copy is available at
-c  http://www.r-project.org/Licenses/
+c  https://www.R-project.org/Licenses/
 c
 c-----------------------------------------------------------------------
 
diff --git a/src/modules/Makefile.in b/src/modules/Makefile.in
index 88e8ed7..5dbed33 100644
--- a/src/modules/Makefile.in
+++ b/src/modules/Makefile.in
@@ -13,16 +13,16 @@ include $(top_builddir)/Makeconf
 distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
 DISTFILES = Makefile.in Makefile.win
 
-SUBDIRS = X11 internet lapack vfonts
+SUBDIRS = X11 internet lapack
 
-MODULES = internet lapack vfonts @BUILD_X11_TRUE at X11
+MODULES = internet lapack @BUILD_X11_TRUE at X11
 
 all: Makefile R
 
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	@cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
 
-R: Makefile make.internet make.lapack make.vfonts @BUILD_X11_TRUE at make.X11
+R: Makefile make.internet make.lapack @BUILD_X11_TRUE at make.X11
 
 make.X11: Makefile
 	@(cd X11 && $(MAKE))
@@ -33,9 +33,6 @@ make.internet: Makefile
 make.lapack: Makefile
 	@(cd lapack && $(MAKE))
 
-make.vfonts: Makefile
-	@(cd vfonts && $(MAKE))
-
 install install-strip:
 	@for d in $(MODULES); do \
 	  (cd $${d} && $(MAKE) $@) || exit 1; \
diff --git a/src/modules/Makefile.win b/src/modules/Makefile.win
index 4f06249..c04a248 100644
--- a/src/modules/Makefile.win
+++ b/src/modules/Makefile.win
@@ -1,10 +1,10 @@
 #-*- Makefile -*-
 include ../gnuwin32/MkRules
 
-MODULES=internet lapack vfonts
+MODULES = internet lapack
 
 ifndef DEBUG
-  DLLFLAGS=-s
+  DLLFLAGS = -s
 endif
 
 all clean:
diff --git a/src/modules/X11/Makefile.in b/src/modules/X11/Makefile.in
index 22bf47f..20e6f09 100644
--- a/src/modules/X11/Makefile.in
+++ b/src/modules/X11/Makefile.in
@@ -11,7 +11,10 @@ R_HOME = $(top_builddir)
 
 include $(top_builddir)/Makeconf
 
-ALL_CPPFLAGS = $(R_XTRA_CPPFLAGS) $(X_CFLAGS) @CAIROX11_CPPFLAGS@ \
+## When compiling rbitmap.c it is essential that we find the
+## png.h matching BITMAP_LIBS.  Since /opt/X11 on macOS contains libpng
+## and we might want our own version, we give priority to BITMAP_*
+ALL_CPPFLAGS = @BITMAP_CPPFLAGS@ $(R_XTRA_CPPFLAGS) $(X_CFLAGS) @CAIROX11_CPPFLAGS@ \
   -I$(top_srcdir)/src/library/grDevices/src/cairo $(CPPFLAGS) $(DEFS)
 ALL_CFLAGS = $(ALL_CFLAGS_LO)
 ALL_X_LIBS = $(X_PRE_LIBS) @CAIROX11_LIBS@ $(X_LIBS) $(X_EXTRA_LIBS)
@@ -28,8 +31,9 @@ DISTFILES = \
 	Makefile.in $(SOURCES) $(HEADERS) $(DE_SOURCES)
 
 R_X11_la = R_X11$(SHLIB_EXT)
+## Note that this is used after LDFLAGS, which usually contains -L flags.
 ## AIX needs LIBM
-R_X11_la_LIBADD = $(ALL_X_LIBS) @BITMAP_LIBS@ $(LIBR1) $(LIBM) @DYLIB_UNDEFINED_ALLOWED_FALSE@ $(LIBINTL)
+R_X11_la_LIBADD = @BITMAP_LIBS@ $(ALL_X_LIBS) $(LIBR1) $(LIBM) @DYLIB_UNDEFINED_ALLOWED_FALSE@ $(LIBINTL)
 
 R_de_la = R_de$(SHLIB_EXT)
 R_de_la_LIBADD = $(ALL_X_LIBS) $(LIBR1) $(LIBM) @DYLIB_UNDEFINED_ALLOWED_FALSE@ $(LIBINTL)
diff --git a/src/modules/X11/bitmap.h b/src/modules/X11/bitmap.h
index c35cff8..9c9b68c 100644
--- a/src/modules/X11/bitmap.h
+++ b/src/modules/X11/bitmap.h
@@ -14,7 +14,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  */
 
 extern int R_SaveAsPng(void  *d, int width, int height,
diff --git a/src/modules/X11/dataentry.c b/src/modules/X11/dataentry.c
index 762bb6b..b43a0c0 100644
--- a/src/modules/X11/dataentry.c
+++ b/src/modules/X11/dataentry.c
@@ -1,7 +1,7 @@
 /*
  *  R : A Computer Langage for Statistical Data Analysis
  *  Copyright (C) 1995, 1996  Robert Gentleman and Ross Ihaka
- *  Copyright (C) 1998--2013  The R Core Team
+ *  Copyright (C) 1998--2015  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
@@ -15,7 +15,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  */
 
 /* <UTF8>
@@ -1067,7 +1067,8 @@ static SEXP processEscapes(SEXP x)
 
     PROTECT( pattern = mkString("(?<!\\\\)((\\\\\\\\)*)\"") );
     PROTECT( replacement = mkString("\\1\\\\\"") );
-    PROTECT( expr = lang5(install("gsub"), ScalarLogical(1), pattern, replacement, x) );
+    SEXP s_gsub = install("gsub");
+    PROTECT( expr = lang5(s_gsub, ScalarLogical(1), pattern, replacement, x) );
     SET_TAG( CDR(expr), install("perl") );
 
     PROTECT( newval = eval(expr, R_BaseEnv) );
@@ -1149,8 +1150,10 @@ static void closerect(DEstruct DE)
 		if (newcol && warn) {
 		    /* change mode to character */
 		    SEXP tmp = coerceVector(cvec, STRSXP);
+		    PROTECT(tmp);
 		    SET_STRING_ELT(tmp, wrow - 1, mkChar(buf));
 		    SET_VECTOR_ELT(DE->work, wcol - 1, tmp);
+		    UNPROTECT(1);
 		}
 	    } else {
 		if (TYPEOF(cvec) == STRSXP)
@@ -1873,10 +1876,9 @@ static int R_X11Err(Display *dsp, XErrorEvent *event)
 }
 
 
-static int R_X11IOErr(Display *dsp)
+static int NORET R_X11IOErr(Display *dsp)
 {
     error("X11 fatal IO error: please save work and shut down R");
-    return 0; /* but should never get here */
 }
 
 /* set up the window, print the grid and column/row labels */
diff --git a/src/modules/X11/devX11.c b/src/modules/X11/devX11.c
index a8e7afc..4cb5bbc 100644
--- a/src/modules/X11/devX11.c
+++ b/src/modules/X11/devX11.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--2013  The R Core Team
+ *  Copyright (C) 1997--2015  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
@@ -15,7 +15,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  */
 
 /* The version for R 2.1.0 is partly based on patches by
@@ -1015,6 +1015,8 @@ static void *RLoadFont(pX11Desc xd, char* family, int face, int size)
 	   If we can't find a "fixed" font then something is seriously
 	   wrong */
 	if ( ADOBE_SIZE(pixelsize) ) {
+	    if(tmp)
+		R_XFreeFont(display, tmp);
 	    if(mbcslocale)
 		tmp = (void*) R_XLoadQueryFontSet(display,
 		   "-*-fixed-medium-r-*--13-*-*-*-*-*-*-*");
@@ -1247,15 +1249,14 @@ static int R_X11Err(Display *dsp, XErrorEvent *event)
     return 0;
 }
 
-static int R_X11IOErrSimple(Display *dsp)
+static int NORET R_X11IOErrSimple(Display *dsp)
 {
     char *dn = XDisplayName(dspname);
     strcpy(dspname, "");
     error(_("X11 I/O error while opening X11 connection to '%s'"), dn);
-    return 0; /* but should never get here */
 }
 
-static int R_X11IOErr(Display *dsp)
+static int NORET R_X11IOErr(Display *dsp)
 {
     int fd = ConnectionNumber(display);
     /*
@@ -1270,7 +1271,6 @@ static int R_X11IOErr(Display *dsp)
     strcpy(dspname, "");
     */
     error(_("X11 fatal IO error: please save work and shut down R"));
-    return 0; /* but should never get here */
 }
 
 #define USE_Xt 1
@@ -1481,7 +1481,7 @@ X11_Open(pDevDesc dd, pX11Desc xd, const char *dsp,
     attributes.border_pixel = blackpixel;
     attributes.backing_store = Always;
     attributes.event_mask = ButtonPressMask 
-      | ButtonMotionMask 
+      | PointerMotionMask 
       | PointerMotionHintMask
       | ButtonReleaseMask
       | ExposureMask
@@ -1608,7 +1608,7 @@ X11_Open(pDevDesc dd, pX11Desc xd, const char *dsp,
                             XInternAtom(display, "_NET_WM_ICON", False),
                             XInternAtom(display, "CARDINAL", False), 32,
                             PropModeReplace,
-                            (const unsigned char*) rlogo_icon, 2 + 48*48);
+                            (const unsigned char*) rlogo_icon, 2 + 99*77);
 
 	    /* set up protocols so that window manager sends */
 	    /* me an event when user "destroys" window */
@@ -1695,15 +1695,15 @@ X11_Open(pDevDesc dd, pX11Desc xd, const char *dsp,
 	if(alreadyCreated == 0) {
 	    XSelectInput(display, xd->window,
 			 ExposureMask | ButtonPressMask | StructureNotifyMask 
-			 | ButtonReleaseMask | ButtonMotionMask  
+			 | ButtonReleaseMask | PointerMotionMask  
                          | PointerMotionHintMask | KeyPressMask);
 	    XMapWindow(display, xd->window);
 	    XSync(display, 0);
 
-	    /* Gobble expose events */
+	    /* Gobble MapNotify events */
 
 	    while ( XPeekEvent(display, &event),
-		    !XCheckTypedEvent(display, Expose, &event))
+		    !XCheckTypedEvent(display, MapNotify, &event))
 		;
 	    /* XNextEvent(display, &event);
 	       if (event.xany.type == Expose) {
@@ -2600,14 +2600,24 @@ static void X11_eventHelper(pDevDesc dd, int code)
     	R_ProcessX11Events((void*)NULL);	/* discard pending events */
     	if (isEnvironment(dd->eventEnv)) {
     	    SEXP prompt = findVar(install("prompt"), dd->eventEnv);
-    	    if (length(prompt) == 1) {
+    	    if (isString(prompt) && length(prompt) == 1) {
+    		 PROTECT(prompt);
     		 XStoreName(display, xd->window, CHAR(asChar(prompt)));
-    	    }
+    		 UNPROTECT(1);
+    	    } else 
+    	    	XStoreName(display, xd->window, "");
     	}
     	XSync(display, 1);
     } else if (code == 2) {
-	XNextEvent(display, &event);
+	if (doesIdle(dd) && (XPending(display) == 0)) {
+            // The device descriptor event environment has an idle
+            // handler, and there are no pending events
+            doIdle(dd);
+            return;
+        }
+        XNextEvent(display, &event);
 	if (event.type == ButtonRelease || event.type == ButtonPress || event.type == MotionNotify) {
+	    int RButtons;
 	    XFindContext(display, event.xbutton.window,
 			 devPtrContext, &temp);
 	    ddEvent = (pDevDesc) temp;
@@ -2624,11 +2634,13 @@ static void X11_eventHelper(pDevDesc dd, int code)
 			event.xbutton.x = winX;
 			event.xbutton.y = winY;
 		    }
-		}
+		    RButtons = mask >> 8;  /* See PR#16700 */
+		} else
+		    RButtons = 1 << (event.xbutton.button - 1);
 		if (!done) {
         	    doMouseEvent(dd, event.type == ButtonRelease ? meMouseUp :
         	                 event.type == ButtonPress ? meMouseDown : meMouseMove, 
-        	                 event.xbutton.button, event.xbutton.x, event.xbutton.y);
+        	                 RButtons, event.xbutton.x, event.xbutton.y);
                     XSync(display, 0);
                     done = 1;
 		}
@@ -2873,11 +2885,6 @@ Rf_setX11DeviceData(pDevDesc dd, double gamma_fac, pX11Desc xd)
 	dd->polygon = X11_Polygon;
 	dd->metricInfo = X11_MetricInfo;
 	dd->hasTextUTF8 = FALSE;
-    	dd->eventHelper = X11_eventHelper;
-    	dd->canGenMouseDown = TRUE;
-	dd->canGenMouseUp = TRUE;
-	dd->canGenMouseMove = TRUE;
-	dd->canGenKeybd = TRUE;
 
 	dd->haveTransparency = 1;
 	dd->haveTransparentBg = 2;
@@ -2886,6 +2893,13 @@ Rf_setX11DeviceData(pDevDesc dd, double gamma_fac, pX11Desc xd)
 	dd->haveLocator = (xd->type > WINDOW) ? 1 : 2;
     }
 
+    dd->eventHelper = X11_eventHelper;
+    dd->canGenMouseDown = TRUE;
+    dd->canGenMouseUp = TRUE;
+    dd->canGenMouseMove = TRUE;
+    dd->canGenKeybd = TRUE;
+    dd->canGenIdle = TRUE;
+
     dd->activate = X11_Activate;
     dd->close = X11_Close;
     dd->deactivate = X11_Deactivate;
@@ -3389,6 +3403,11 @@ static Rboolean in_R_X11readclp(Rclpconn this, char *type)
 }
 
 #include <R_ext/Rdynload.h>
+
+extern const char * in_R_pngVersion(void);
+extern const char * in_R_jpegVersion(void);
+extern const char * in_R_tiffVersion(void);
+
 void R_init_R_X11(DllInfo *info)
 {
     R_X11Routines *tmp;
@@ -3402,5 +3421,8 @@ void R_init_R_X11(DllInfo *info)
     tmp->image = in_R_GetX11Image;
     tmp->access = in_R_X11_access;
     tmp->readclp = in_R_X11readclp;
+    tmp->R_pngVersion = in_R_pngVersion;
+    tmp->R_jpegVersion = in_R_jpegVersion;
+    tmp->R_tiffVersion = in_R_tiffVersion;
     R_setX11Routines(tmp);
 }
diff --git a/src/modules/X11/devX11.h b/src/modules/X11/devX11.h
index fcbdefc..1aed353 100644
--- a/src/modules/X11/devX11.h
+++ b/src/modules/X11/devX11.h
@@ -15,7 +15,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  */
 
 #ifndef R_DEV_X11_H
diff --git a/src/modules/X11/rbitmap.c b/src/modules/X11/rbitmap.c
index 2541260..4294ada 100644
--- a/src/modules/X11/rbitmap.c
+++ b/src/modules/X11/rbitmap.c
@@ -15,7 +15,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  */
 
 #ifdef HAVE_CONFIG_H
@@ -70,7 +70,7 @@
    (2) we can be arrived here from a button or menuitem callback maybe
    in a different thread from the one where R runs.
 */
-static void my_png_error(png_structp png_ptr, png_const_charp msg)
+static void NORET my_png_error(png_structp png_ptr, png_const_charp msg)
 {
     R_ShowMessage((char *) msg);
 #if PNG_LIBPNG_VER < 10400
@@ -325,7 +325,7 @@ typedef struct my_error_mgr * my_error_ptr;
  * Here's the routine that will replace the standard error_exit method:
 */
 
-static void my_error_exit (j_common_ptr cinfo)
+static void NORET my_error_exit (j_common_ptr cinfo)
 {
     /* cinfo->err really points to a my_error_mgr struct, so coerce pointer */
     my_error_ptr myerr = (my_error_ptr) cinfo->err;
@@ -705,3 +705,35 @@ int R_SaveAsBmp(void  *d, int width, int height,
     }
     return 1;
 }
+
+const char * in_R_pngVersion(void)
+{
+#ifdef HAVE_PNG
+    return png_get_header_ver(NULL /*ignored*/);
+#else
+    return "";
+#endif
+}
+const char * in_R_jpegVersion(void)
+{
+#ifdef HAVE_JPEG
+    static char ans[10];
+#ifdef JPEG_LIB_VERSION_MAJOR
+    sprintf(ans, "%d.%d", JPEG_LIB_VERSION_MAJOR, JPEG_LIB_VERSION_MINOR);
+#else
+    sprintf(ans, "%d.%d", JPEG_LIB_VERSION/10, JPEG_LIB_VERSION%10);
+#endif
+    return ans;
+#else
+    return "";
+#endif
+}
+
+const char * in_R_tiffVersion(void)
+{
+#ifdef HAVE_TIFF
+    return TIFFGetVersion();
+#else
+    return "";
+#endif
+}
diff --git a/src/modules/X11/rlogo_icon.h b/src/modules/X11/rlogo_icon.h
index f58cfa5..726ef19 100644
--- a/src/modules/X11/rlogo_icon.h
+++ b/src/modules/X11/rlogo_icon.h
@@ -1,51 +1,7644 @@
+/*
+ *  This file was produced from Rlogo.svg.
+ *  Copyright (C) 2016  The R Foundation
+ *
+ *  You can distribute the logo under the terms of the Creative
+ *  Commons Attribution-ShareAlike 4.0 International license (CC-BY-SA
+ *  4.0) or (at your option) the GNU General Public License version 2
+ *  (GPL-2).
+ *
+ *  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, a copy is available at
+ *  https://www.R-project.org/Licenses/
+ */
+ 
 unsigned long rlogo_icon[] = {
-    48,48,
-    0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
-    0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
-    0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
-    0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
-    0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
-    0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
-    0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1868983,0x27e837a,0x6959595,0x2a888b85,0x5881857f,0x7d7f827b,0x9b7e827a,0xb17c8078,0xc07c7f78,0xc97c8179,0xca797e76,0xc3777c73,0xb4777b74,0x9d747971,0x8074786f,0x5b757870,0x2e797d75,0x77e847e,0x164685f,0x16b7168,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
-    0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x38a8d88,0x68b8f89,0x288b8e89,0x71868983,0xba848881,0xf6838780,0xff838780,0xff838780,0xff848881,0xff848881,0xff848881,0xff848881,0xff858982,0xff81857e,0xff80847d,0xff7f837b,0xff7c8079,0xff787e76,0xff747a71,0xff71766d,0xf86f736b,0xbf6d7269,0x766c7169,0x2c70726c,0x7656a62,0x3666b63,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
-    0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x58a8e87,0x1a8d918b,0x608a8f88,0xc9888c86,0xff878c85,0xff898d87,0xff8b8f89,0xff8c9089,0xfe8d918b,0xfe8f938d,0xff90948e,0xff91958e,0xff91968f,0xff91968f,0xff939891,0xff8f948d,0xff8f938c,0xff8d918b,0xff8a8f88,0xff878c85,0xfe858983,0xfe82867f,0xff7d8179,0xff777c73,0xff70756c,0xff6a6f66,0xcf676c63,0x65666c63,0x1d656a61,0x55f655b,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
-    0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x290978c,0x208e918b,0x728c9089,0xe48a8f88,0xff8c918a,0xff90948d,0xff91958e,0xfe929690,0xff91958e,0xff8d918a,0xff8d9189,0xff8e938c,0xff92968f,0xff959992,0xff959a93,0xff959a93,0xff959a93,0xff949992,0xff939891,0xff939891,0xff929790,0xff91968f,0xff90948e,0xff8e938c,0xff8a8f88,0xff858a83,0xfe81857e,0xff7b8078,0xff737870,0xff696e65,0xe963685f,0x7a61675e,0x245f645b,0x3626660,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
-    0x0,0x0,0x0,0x0,0x0,0x0,0x1091948f,0x5a8f928c,0xd68e918a,0xff90948d,0xff969a93,0xfe979a94,0xfe939790,0xff878c84,0xff7b7f77,0xff7a7f77,0xff858983,0xff92968f,0xff9b9f99,0xff9da19b,0xff999e97,0xff91958f,0xfe888c84,0xff7e827b,0xff767a73,0xff70756d,0xff6d726a,0xff6c7068,0xff6d7169,0xff6f746b,0xff72776f,0xff777c74,0xff7c8179,0xfe81867f,0xfe848881,0xfe82857f,0xfe7b8079,0xff72776f,0xff656a62,0xdd5e635a,0x605b6058,0x135b6057,0x0,0x0,0x0,0x0,0x0,0x0,
-    0x0,0x0,0x0,0x0,0x0,0x2792968f,0x9790938d,0xff91948f,0xff9a9e97,0xfe9da19b,0xfe959992,0xff7e837b,0xff6f746c,0xff7c8078,0xff949791,0xffa8aca6,0xffb4b7b2,0xffafb2ad,0xfe999d97,0xff81857e,0xff6e726b,0xff5d6259,0xff53584f,0xfc4b4f47,0xf2464b43,0xea454941,0xe4454941,0xe1444941,0xe0474c44,0xe34b5048,0xe84f544c,0xf052574e,0xfa555a51,0xff5a6057,0xff62685e,0xff6e736b,0xff7a7e77,0xfe7d827a,0xfe797e75,0xff6d7169,0xff5d625a,0xa0575c53,0x2d54594f,0x0,0x0,0x0,0x0,0x0,
-    0x0,0x0,0x0,0x0,0x3791958f,0xbf91958e,0xff969993,0xffa5a9a3,0xfea0a49e,0xff848881,0xff6a6f67,0xff7b8078,0xff9ea29b,0xffbabdb8,0xffc6c9c4,0xfeb5b8b3,0xfe949892,0xff737770,0xff535850,0xf93e423a,0xdc30342d,0xf150534e,0xde52544f,0xf8767874,0xdf7f817d,0xca888a86,0xbb8f918d,0xb4929591,0xb3949692,0xba929490,0xc68e918c,0xda8a8c88,0xec82847f,0xe871756e,0xeb686d65,0xeb5c6159,0xf2545950,0xff61665e,0xff72766e,0xff797e76,0xff71766e,0xff5e635b,0xc853584f,0x3f4e534b,0x0,0x0,0x0,0x0,
-    0x0,0x0,0x0,0x37949892,0xcf92968f,0xff999d96,0xfeafb2ad,0xfe9a9e97,0xff72776f,0xff6d7169,0xff979b95,0xffbfc2be,0xffd1d3d0,0xfec0c2be,0xfe979c95,0xff6c7069,0xff434740,0xdf252922,0xe14a4d48,0xf180817d,0xc0999b96,0xe6d7d7d5,0xc3fbfbfa,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xf5ffffff,0xd5ffffff,0xdbe2e3e1,0xdebdbfbb,0xdf949892,0xe8787c76,0xe85b6057,0xfa5f645b,0xff72776f,0xfe737870,0xff60655c,0xd94f544b,0x3f4a4f47,0x0,0x0,0x0,
-    0x0,0x0,0x21959993,0xcb949791,0xff9a9e97,0xfeb8bbb6,0xff939690,0xff666b63,0xff787d75,0xffaeb1ac,0xffd5d7d4,0xffd4d6d3,0xfeaeb1ac,0xff797d76,0xff42463f,0xf331352e,0xeb61635f,0xd0969895,0xc5cbced2,0xf4eef1f7,0xffeef1f7,0xfceaedf2,0xffe7eaef,0xfae5e7ed,0xfae5e7ed,0xfae5e7ed,0xfae5e7ed,0xfae5e7ed,0xfae5e7ed,0xfae5e7ed,0xfae5e7ed,0xfae5e7ed,0xfbe5e7ed,0xfee6e9ee,0xfde9ecf1,0xf1f4f5f9,0xd4ffffff,0xd5f7f6f4,0xe8c4c5c1,0xe790938e,0xea62675f,0xfe696f66,0xff73776f,0xff5d625a,0xd4494e46,0x29494 [...]
-    0x0,0x4989e98,0xa7939791,0xff989c96,0xfebbbeb9,0xff979a94,0xff60655c,0xff7e827b,0xffbabdb9,0xffe0e2df,0xffd3d5d2,0xfea0a49e,0xff5f645d,0xf8272b24,0xdb3a3e38,0xe3a1a3a1,0xebf0f0f0,0xffffffff,0xd9bcc5d8,0xf4a0acc7,0xfaa0acc7,0xfaa1adc8,0xfaa1adc8,0xfaa1adc8,0xfaa1adc8,0xfaa1adc8,0xfaa1adc8,0xfaa1adc8,0xfaa1adc8,0xfaa1adc8,0xfaa1adc8,0xfaa1adc8,0xfaa1adc8,0xfaa1adc9,0xf99daac5,0xec94a0b9,0xe397a1b7,0xd8b3b8c7,0xcef1f2f7,0xe5fdfdfc,0xd1c4c7c3,0xd37d827a,0xfe6c7068,0xff72776f,0xff565b53,0 [...]
-    0x0,0x52959993,0xff969a93,0xffaeb2ad,0xfeabaea9,0xff5e625a,0xff7b7f78,0xffbabdb8,0xffe7e8e6,0xffd6d7d4,0xfe9ea19c,0xff525750,0xec1a1e17,0xce555753,0xd7d6d6d5,0xf7ffffff,0xffffffff,0xffffffff,0xcf929eb8,0xf79babcd,0xff7a86a2,0xff6a748d,0xff6a738c,0xff6a738c,0xff6a738c,0xff6a738c,0xff6a738c,0xff6a738c,0xff6a738c,0xff6a738c,0xff6a738c,0xff6a738c,0xff6a738c,0xff6a748d,0xff69758e,0xff6c7894,0xff7785a4,0xe96d7b9d,0xd76d7790,0xcfb6bac5,0xe5ffffff,0xebefefee,0xb2949791,0xf16d7269,0xff70756d, [...]
-    0x1b0a7b6,0xd2949891,0xff9ca09a,0xfec5c7c3,0xff656961,0xff6e736a,0xffaaada8,0xffe9eae8,0xffe0e2e0,0xfea9ada7,0xff565a52,0xeb181c16,0xbf565955,0xd7ededed,0xfdffffff,0xffffffff,0xfefefefe,0xffffffff,0xd093a0b8,0xf6a7b6d9,0xff5b657b,0xff6d7a96,0xff707c9a,0xff707c9a,0xff6f7c99,0xff6c7997,0xff6c7997,0xff6d7a98,0xff6d7a98,0xff6d7a98,0xff6d7a97,0xff6d7a98,0xff6e7a98,0xff6e7b99,0xff6d7b98,0xfe6a7692,0xfe5f6a83,0xff606b83,0xff677490,0xee58637c,0xc9a5a9b4,0xf8fdfdfe,0xdffcfcfc,0xaea9ada7,0xf77 [...]
-    0x39959992,0xff949892,0xffadb0ab,0xff9b9e99,0xff5a5e56,0xff90938d,0xffd8d9d7,0xffefefee,0xffc1c3bf,0xff6e726b,0xf821241e,0xd5525451,0xd9eeefee,0xfcffffff,0xfffefefe,0xfefefefe,0xffffffff,0xffffffff,0xd093a0b9,0xf6a5b5d8,0xff545d73,0xff7f91b6,0xff8495bc,0xff8395bc,0xff8496bc,0xffabbada,0xffaab9dc,0xffa5b5d9,0xffa5b5d9,0xffa5b5d9,0xffa7b6da,0xffa5b4d8,0xff9babcf,0xff90a1c5,0xff8798be,0xff7e8fb5,0xff7786aa,0xfe6f7d9c,0xfe636f89,0xff5b6781,0xea454e63,0xe4d1d3d7,0xffffffff,0xe9ffffff,0xb3 [...]
-    0x8292968f,0xff969a94,0xfebdc0bc,0xff62675e,0xff70756d,0xffb0b3ad,0xfff1f1f0,0xffdfe1de,0xfe9ca09a,0xff393d36,0xea3b3d39,0xdecacac9,0xfdffffff,0xffffffff,0xfefefefe,0xffffffff,0xffffffff,0xffffffff,0xd093a0b9,0xf6a5b5d8,0xff555e75,0xff8192b8,0xff8597be,0xff8496be,0xfea4b4d6,0xff8e9cb9,0xff5e6880,0xff5d6880,0xff5d6880,0xff5d6880,0xff5d677f,0xff5c677f,0xff68748e,0xfe7b89a7,0xff8291b2,0xff8495ba,0xff8799c1,0xff8496bd,0xff7887a9,0xfe677490,0xff424c62,0xd3797d88,0xf4f2f2f3,0xffffffff,0xee [...]
-    0xb590948d,0xff969a93,0xffafb2ad,0xff53584f,0xff82867e,0xffcaccc8,0xfff4f5f4,0xffcbcdc9,0xff777b74,0xf320241d,0xe9787a76,0xfcffffff,0xffffffff,0xfefefefe,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xd093a0b9,0xf6a5b5d8,0xff555e75,0xff8092b8,0xff8597be,0xff8496bd,0xff95a4c4,0xfe474f64,0xf31b1e26,0xcb222632,0xcd222632,0xcd222632,0xcc212531,0xcd222633,0xe9343b4b,0xff515c74,0xfe6f7b99,0xfe7886a5,0xff8294b9,0xff8597bf,0xff8597bf,0xfe7a89a9,0xff545f78,0xd3303745,0xf4e2e3e4,0xffffffff,0xff [...]
-    0xcf8e928b,0xff949892,0xff9b9e98,0xff585d54,0xff8d928a,0xffd8d9d7,0xfff0f1f0,0xffbcbfba,0xff5b5f57,0xeb31342e,0xe0abacab,0xffffffff,0xfefefefe,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xd093a0b9,0xf6a5b5d8,0xff555e75,0xff8092b8,0xff8597be,0xff8497be,0xff8895b4,0xfc3f475b,0xc7383a40,0xfcf7f7f7,0xf9efefef,0xf9efefef,0xf9efefef,0xfdf0f0f1,0xd3e0e1e4,0xaf6d778c,0xff717e9d,0xfe7783a0,0xff7080a1,0xff8699c0,0xff8597bf,0xff8596b9,0xff616d88,0xf2282e3b,0xfbdbdbdc,0xffffffff,0xff [...]
-    0xce8a8e88,0xff91958f,0xff8b8f89,0xff5b5f57,0xff90958e,0xffdbdddb,0xffedeeed,0xffb5b8b3,0xff4f544c,0xf74b4e49,0xf3cccdcd,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xd093a0b9,0xf6a5b5d8,0xff555e75,0xff8092b8,0xff8597be,0xff8497be,0xff8795b3,0xfc40475c,0xc33d3e45,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xfeffffff,0xe3cfd4dd,0xdc8091b3,0xff7a87a2,0xff6a7896,0xff8799c1,0xff8496be,0xff8e9ec2,0xfe67748f,0xff222734,0xffd7d7d9,0xfeffffff,0xff [...]
-    0xb4878b85,0xff8d918b,0xff8a8e87,0xff5b6057,0xff8d908a,0xffd5d7d5,0xffecedec,0xffb5b8b3,0xff535851,0xf74e524d,0xf2d0d1cf,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xd093a0b9,0xf6a5b5d8,0xff555e75,0xff8092b8,0xff8597be,0xff8497be,0xff8795b3,0xfc40475c,0xc33d3e45,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xfefefefe,0xffffffff,0xe6d6dae4,0xd88f9fc4,0xff7e8aa4,0xff657290,0xff8799c1,0xff8396bd,0xff95a6c9,0xff646f89,0xf01a1e28,0xfbd8d8d9,0xffffffff,0xfe [...]
-    0x83858982,0xff878c85,0xfe8a8e87,0xff5d625a,0xff82857f,0xffc4c6c3,0xffecedeb,0xffbdbfba,0xff6a6e67,0xe93e423c,0xdeb7b8b6,0xffffffff,0xfefefefe,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xd093a0b9,0xf6a5b5d8,0xff555e75,0xff8092b8,0xff8597be,0xff8497be,0xff8795b3,0xfc40475c,0xc43d3f45,0xffffffff,0xfefefefe,0xfefefefe,0xfefefefe,0xfffefefe,0xf5fcfcfd,0xecc0c9dc,0xfd9daed1,0xff818ba1,0xff5f6c8a,0xff889ac2,0xff8899c0,0xfe9dacd0,0xff535c72,0xcb0f1119,0xf2dfdfdf,0xffffffff,0xff [...]
-    0x37848881,0xff80847d,0xff888c85,0xff6b7068,0xff737870,0xffaaada8,0xffe6e7e5,0xffcbceca,0xff898d86,0xef343931,0xe58e8f8c,0xffffffff,0xffffffff,0xfefefefe,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xd093a0b9,0xf6a5b5d8,0xff555e75,0xff8092b8,0xff8597be,0xff8597be,0xff808ead,0xfd495268,0xe54f5668,0xfebcc4d5,0xf9bac0d2,0xfab9c0d2,0xfbbac1d2,0xeeb5bdcf,0xd894a3c1,0xf899abcf,0xff99a5ba,0xfe636e81,0xff7686ab,0xff8597bf,0xfea5b6d8,0xff8c9ab8,0xff292e3c,0xc0525356,0xf0f0f0f0,0xffffffff,0xff [...]
-    0x0,0xd27c8078,0xff81857e,0xfe7c817a,0xff696e66,0xff8e928b,0xffcbcdca,0xffd9dad8,0xfea7aba5,0xff5a5f56,0xe65b5f58,0xdbdfdfde,0xffffffff,0xfffefefe,0xfefefefe,0xffffffff,0xffffffff,0xffffffff,0xd093a0b9,0xf6a5b5d8,0xff555e75,0xff8092b8,0xff8597be,0xff8597be,0xfe7786a5,0xff6c7893,0xff7d8cab,0xff808eb1,0xff8190b2,0xff8090b2,0xff8090b1,0xff8493b5,0xff9eaecd,0xffa0adc1,0xfe5d6573,0xff657390,0xff90a2c8,0xfeaabad8,0xffa5b4d0,0xff4a5265,0xe90c0d12,0xd4c5c4c5,0xf7ffffff,0xffffffff,0xf8ffffff, [...]
-    0x0,0x51797d76,0xff787d75,0xff81857e,0xfe73776f,0xff787d75,0xffa3a5a0,0xffd4d6d3,0xffc1c4c0,0xff8e928b,0xf3464b42,0xcd7d807b,0xe0fcfdfc,0xffffffff,0xfffefefe,0xfefefefe,0xffffffff,0xffffffff,0xd093a0b9,0xf6a5b5d8,0xff555e75,0xff8092b8,0xff8597be,0xff8597be,0xff8294ba,0xff58647d,0xff596276,0xff5d657a,0xff5e677b,0xff5e677b,0xff5f677c,0xff5e667a,0xff4e5667,0xff525a6c,0xfe8f9db8,0xfeacbcdc,0xffacbad6,0xff8390aa,0xfe3a4153,0xfa16181c,0xad7e7e7f,0xe9fbfbfb,0xffffffff,0xffffffff,0xa1c4c6c2, [...]
-    0x0,0x0,0xae747870,0xff787c74,0xff7d817a,0xfe747871,0xff848880,0xffacafaa,0xffc9ccc7,0xfeb1b5af,0xff7f847d,0xe4484d45,0xd29c9f9b,0xeefcfcfc,0xfcffffff,0xffffffff,0xfefefefe,0xffffffff,0xd093a0b9,0xf6a5b5d8,0xff555e75,0xff8092b8,0xff8597be,0xff8496bd,0xff8597be,0xff92a3c9,0xff8b9bc0,0xff8797bb,0xff8697bb,0xff8394b8,0xff8090b5,0xff7c8eb3,0xff91a2c6,0xfea8b6d4,0xff707c95,0xff4b5469,0xfa353b4d,0xf01e212b,0xe3252527,0xcaa2a2a2,0xf5ffffff,0xffffffff,0xf2ffffff,0xeae4e6e4,0xf8828680,0xba282 [...]
-    0x0,0x0,0x1a73796f,0xd36f736b,0xff757a72,0xfe7b7e77,0xfe797d75,0xff898d86,0xffabaea9,0xffbbbeba,0xfea8aca6,0xff7e827b,0xec575c54,0xc6939791,0xdff0f0ef,0xfdffffff,0xffffffff,0xffffffff,0xcf93a0b9,0xf6a5b5d8,0xff555e75,0xff8092b8,0xff8597be,0xff8496bd,0xfe92a3c8,0xffabbad6,0xff97a5c3,0xff94a1bf,0xff93a1bf,0xff8f9dbd,0xfe8c9cbe,0xff8698bc,0xff8e9fc3,0xff68748d,0xfe242937,0xfa2b2e37,0xd23c3e43,0xb9868786,0xccf3f3f3,0xf8ffffff,0xffffffff,0xf0f9faf9,0xc6d6d7d4,0xee7e817b,0xd8333731,0x23272 [...]
-    0x0,0x0,0x0,0x326d7069,0xd66a6f67,0xff70756d,0xff787d75,0xfe7d817a,0xff8a8e87,0xffa3a6a1,0xffafb2ac,0xfea2a69f,0xff848881,0xef5c6158,0xd9858882,0xe5d2d3d1,0xedfafaf9,0xffffffff,0xd095a1ba,0xf6a5b5d8,0xff555e75,0xff8092b8,0xff8597be,0xff8496bd,0xffa3b3d3,0xfe66728b,0xfb2f3544,0xeb31384a,0xee333b4d,0xfc495369,0xff697693,0xfe7c8ba9,0xff7988a8,0xff626e88,0xfe616c86,0xef8490ab,0xcda5aec3,0xdbd5d8e1,0xf3fbfbfd,0xeaffffff,0xedededec,0xcbb7bab5,0xfd757972,0xde3a3d39,0x3d1f211e,0x0,0x0,0x0,
-    0x0,0x0,0x0,0x0,0x36696e66,0xc5656a62,0xff6a6f67,0xff737870,0xfe7c8079,0xff888b84,0xff999c96,0xffa2a6a0,0xfe9ca09a,0xff8b8f88,0xff6d7169,0xe76c7068,0xda9fa39d,0xe9dadad6,0xd18a97af,0xf7a5b5d8,0xff555e75,0xff8092b8,0xff8597be,0xff8496be,0xff8b9ab9,0xfd3b4255,0xdd212227,0xdd929397,0xdc8a8b90,0xdd747984,0xf95d6880,0xff6e7c9a,0xfe707d9a,0xfe697591,0xff6c7892,0xff6c7894,0xff687493,0xeb5d6985,0xd4969ba6,0xd4c2c4c1,0xda8c9089,0xff61655e,0xcd333731,0x401d1f1b,0x0,0x0,0x0,0x0,
-    0x0,0x0,0x0,0x0,0x0,0x26636960,0xa160665d,0xf6646960,0xff6a6f67,0xff767a72,0xfe81857d,0xff8e928b,0xff999c96,0xfe989c95,0xfe90948d,0xff81857d,0xfe6c7068,0xe8777a70,0xea727e92,0xfca5b5d7,0xff555e75,0xff8092b8,0xff8597be,0xff8497be,0xff8694b3,0xfc40475c,0xbe404249,0xffffffff,0xffffffff,0xdfffffff,0xd9a7adba,0xf462708e,0xff7b88a6,0xff687592,0xff687593,0xfe636e89,0xfe6b7791,0xff606c87,0xf94a5367,0xff5c6161,0xfb51544e,0xa9262924,0x2c171a15,0x0,0x0,0x0,0x0,0x0,
-    0x0,0x0,0x0,0x0,0x0,0x0,0xd63685f,0x695d6258,0xc95d6259,0xff60655d,0xff686d65,0xff737870,0xfe80837c,0xff8b8f88,0xff91958e,0xfe91968f,0xff8d918b,0xff84877d,0xff747f90,0xffa5b4d6,0xfe555e75,0xff8092b8,0xff8597be,0xff8497be,0xff8795b3,0xfd40475c,0xd0383a3f,0xd6dddedb,0xe8d8d9d7,0xb9cdceca,0xb5b0b3b3,0xe869748a,0xff717f9e,0xff7784a1,0xff7e8fb3,0xff8496bd,0xff7281a2,0xfe66738e,0xff515c74,0xff3d434f,0x7f252928,0xe121206,0x0,0x0,0x0,0x0,0x0,0x0,
-    0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x2d5b5f56,0x79585d54,0xcf585e55,0xff5a5f57,0xff61665e,0xff6b7068,0xff767b73,0xfe80847c,0xff878b84,0xff8c9087,0xff798497,0xffa5b4d6,0xff555e75,0xff8092b8,0xff8597be,0xff8497be,0xff8795b3,0xfe40485c,0xf33c3f41,0xdf92968f,0xed959993,0xcd848881,0xe08d918a,0xf983898f,0xff6d7a98,0xff7784a1,0xff717f9e,0xff8698c0,0xff8799c1,0xff7584a4,0xff626e89,0xff495267,0x68505869,0x3dae3fe,0x0,0x0,0x0,0x0,0x0,0x0,
-    0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x366685c,0x2d535850,0x65535850,0xae535850,0xf352584f,0xff555a51,0xff5b6058,0xff636860,0xff6c7066,0xff6e7a8c,0xfea5b4d6,0xff555e75,0xff8092b8,0xff8597be,0xff8497be,0xfe8795b3,0xff40485c,0xff3e4143,0xff898d85,0xff81857d,0xff7c8079,0xff72766e,0xff616662,0xff576071,0xff7380a0,0xfe7884a2,0xff7888ab,0xff8799c1,0xff8293b9,0xfe6d7a98,0xff56617a,0xe5495264,0x2f565b6a,0x0,0x0,0x0,0x0,0x0,0x0,
-    0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1b4f544c,0x374c5149,0x664e524a,0xa04d5249,0xd54c5249,0xff4b4e44,0xff5f6a7c,0xffa4b3d5,0xfe555e75,0xff8092b8,0xff8597be,0xff8497be,0xfe8795b3,0xff40475b,0xff2a2d2e,0xff51554c,0xff484c44,0xff41453e,0xff3c4039,0xd5363b33,0xc1444c53,0xf26e7b99,0xff74819e,0xff7482a1,0xff8496bd,0xff8698c0,0xff7a8aac,0xff677490,0xff4b556b,0x9d4e5566,0xe555b67,0x0,0x0,0x0,0x0,0x0,
-    0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x35b5f58,0x14494e46,0x22464b43,0x2534351d,0xb86d7b97,0xfba6b5d7,0xff555e75,0xff8092b8,0xff8597be,0xff8497be,0xff8795b3,0xfe40475b,0xde23262a,0x833d4038,0x6d3a3d37,0x4d393d36,0x3032352e,0x2026291f,0x29585f68,0xa2697591,0xff717f9e,0xfe7684a1,0xff7686a8,0xff8699c0,0xff8597be,0xfe6f7d9b,0xff5f6b85,0xff474f63,0x4b575d6c,0x2c9cccc,0x0,0x0,0x0,0x0,
-    0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xa17585a5,0xfaa7b6d9,0xff535c72,0xff7e90b6,0xff8295bc,0xff8294bc,0xff8593b2,0xfd40485c,0xb6292b32,0x28c8941,0x6434641,0x0,0x0,0x0,0x0,0x4d67728c,0xee6e7b97,0xff727f9c,0xfe7582a1,0xff8192b8,0xff8396be,0xff7e8fb3,0xfe687490,0xff4f5a72,0xd14a5264,0x14525869,0x0,0x0,0x0,0x0,
-    0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xa17585a4,0xfaa7b6d9,0xff717d97,0xffa5b5d7,0xffabbadd,0xffabbadd,0xff9faecd,0xfd40475c,0xb22a2c33,0x0,0x0,0x0,0x0,0x0,0x0,0xe9099aa,0x9766728e,0xff727f9e,0xfe8492b0,0xff9aa8ca,0xffadbcdf,0xffacbbde,0xfe9eadcc,0xff7f8ca8,0xff4a5369,0x76545b69,0x6616670,0x0,0x0,0x0,
-    0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xa37a8bac,0xfc72809c,0xff515b72,0xff515a71,0xff515b72,0xff515b72,0xff505a71,0xfe3a4255,0xb32a2c33,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x486c7690,0xe267738f,0xff56627b,0xff4c566b,0xff4e586e,0xff4e586e,0xff4e576d,0xff4d576c,0xff465065,0xf9434c5d,0x27616977,0x0,0x0,0x0,
-    0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x7e697289,0xcc393d48,0xd330333b,0xd330333b,0xd330333b,0xd330333b,0xd330333b,0xd931353e,0x983d4047,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x8ddebff,0x77525868,0xd4393d47,0xca2f323a,0xca30333b,0xca30333b,0xca30333b,0xca30333b,0xca30333b,0xd0343741,0x7a5a606c,0x6686e7b,0x0,0x0,
-    0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
-    0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
-    0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
-    0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
-    0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
-    0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
+99, 77,0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00ffffff,
+0x00ffffff,
+0x00fbfafa,
+0x00d3caca,
+0x00ffffff,
+0x00000000,
+0x00bfbcc4,
+0x01bcb9c2,
+0x08bcbfc1,
+0x10bfc1c3,
+0x1dbec1c4,
+0x32c0c2c5,
+0x48c3c4c7,
+0x5ac5c7ca,
+0x6ac4c6ca,
+0x7cc3c5c8,
+0x8bc1c4c6,
+0x97c0c2c5,
+0x9fbfc1c4,
+0xa4bec0c3,
+0xa5bdbfc3,
+0xa3bdbfc2,
+0x9dbdbec2,
+0x93bdbfc2,
+0x86bdbfc2,
+0x76bdbfc3,
+0x65bdc0c3,
+0x55bcbec1,
+0x41b8babd,
+0x2bb7b8bc,
+0x17b5b6ba,
+0x0db4b6b9,
+0x05b5bab9,
+0x00dfebd3,
+0x00bec4bf,
+0x00000000,
+0x00000000,
+0x00b5b5b5,
+0x00787878,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00fefefe,
+0x00f4f4f3,
+0x00c2c2bd,
+0x00000000,
+0x00bec3c1,
+0x00d3d8ee,
+0x05bec4c2,
+0x12c3c5c7,
+0x2dc3c5c8,
+0x50c6c9cb,
+0x73c6c8cc,
+0x99c4c7ca,
+0xb5c7cacd,
+0xccc7c9cc,
+0xe0c4c6c9,
+0xedc2c5c8,
+0xf1c4c7ca,
+0xf5c4c7ca,
+0xf8c3c6c9,
+0xfbc2c4c7,
+0xfdc0c3c6,
+0xfebfc1c5,
+0xfebec0c4,
+0xffbec0c3,
+0xfebdbfc3,
+0xfdbdbfc3,
+0xfcbdbfc3,
+0xfabdbfc3,
+0xf7bec0c3,
+0xf4bdbfc3,
+0xf0bbbdc1,
+0xeab9bbbf,
+0xdababcc0,
+0xc5bcbec1,
+0xadb9bbbf,
+0x8eb6b8bc,
+0x67b7b9bd,
+0x46b5b7bb,
+0x23b1b2b8,
+0x0db0b0b8,
+0x02b2b0b5,
+0x00b3b2b5,
+0x00a5a597,
+0x00a1a195,
+0x00b4b4b1,
+0x00e9e9ea,
+0x00fcfcfc,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00ffffff,
+0x00ededed,
+0x00c7c7c7,
+0x00aeaeae,
+0x00bdc1c6,
+0x02bec2c6,
+0x0fc4c7c8,
+0x30c7c9cb,
+0x60c8cacd,
+0x95c6c9cb,
+0xc1c9cbce,
+0xe2c6c9cc,
+0xf4c6c9cb,
+0xfbc6c9cc,
+0xffc4c6c9,
+0xffc2c5c8,
+0xffc2c5c8,
+0xffc1c4c7,
+0xffc0c2c5,
+0xffbfc2c5,
+0xfebec1c4,
+0xfebec0c3,
+0xfebdc0c3,
+0xfebdbfc2,
+0xfebcbec2,
+0xfebcbec1,
+0xfebbbdc1,
+0xfebbbdc0,
+0xfebabcbf,
+0xfebabbbf,
+0xfeb9bbbe,
+0xfeb8babe,
+0xfeb8b9bd,
+0xffb7b9bc,
+0xffb7b9bc,
+0xffb7b9bc,
+0xffb7b8bc,
+0xffb6b8bc,
+0xfeb6b8bc,
+0xf9b7b9bd,
+0xf0b5b7bb,
+0xd9b6b7bb,
+0xb4b5b7bb,
+0x84b2b3b8,
+0x51b3b5b9,
+0x24afb0b5,
+0x09aaabb5,
+0x009a91af,
+0x009995a0,
+0x008e8e90,
+0x008787c5,
+0x000000ff,
+0x008080ff,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00bebebe,
+0x00bebebe,
+0x00bebebe,
+0x00c0c4c7,
+0x02c0c4c6,
+0x12c4c7cb,
+0x3fc9cbce,
+0x7dc8cacd,
+0xb8cacccf,
+0xe4c8cacd,
+0xf8c8cacd,
+0xffc5c8cb,
+0xffc5c7ca,
+0xffc3c6c9,
+0xffc2c5c7,
+0xfec2c4c7,
+0xfec1c4c6,
+0xfec1c3c6,
+0xfec0c3c6,
+0xfec0c2c5,
+0xfebfc2c5,
+0xfebfc1c4,
+0xfebec0c4,
+0xfebec0c3,
+0xfebdbfc2,
+0xfebdbfc2,
+0xfebcbec1,
+0xfebcbdc1,
+0xfebbbdc0,
+0xfebbbcc0,
+0xfebabcbf,
+0xfeb9bbbe,
+0xfeb9bbbe,
+0xfeb8babd,
+0xfeb8b9bd,
+0xfeb7b9bc,
+0xfeb6b8bc,
+0xfeb6b7bb,
+0xfeb5b7bb,
+0xfeb4b6ba,
+0xfeb3b5b9,
+0xfeb3b4b8,
+0xffb2b3b8,
+0xffb2b4b8,
+0xffb2b3b7,
+0xfeb3b4b8,
+0xf4b2b4b8,
+0xd8b2b3b8,
+0xa7b2b3b8,
+0x68b0b2b7,
+0x2eafb0b5,
+0x0aa9abb0,
+0x008b8a93,
+0x00999aa5,
+0x00a19c9c,
+0x00e6e4e4,
+0x00ffffff,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00dcdcd7,
+0x00b5b5aa,
+0x00c7c7ca,
+0x09c5c8ca,
+0x32c9cccd,
+0x77c9ccce,
+0xbdcbced0,
+0xebc9cccf,
+0xfcc8cbce,
+0xffc6c8cb,
+0xffc5c7ca,
+0xfec4c6c9,
+0xfec3c6c9,
+0xfec3c5c8,
+0xfec2c5c8,
+0xfec2c4c7,
+0xfec1c4c7,
+0xfec1c3c6,
+0xfec0c3c6,
+0xfec0c2c5,
+0xfebfc2c5,
+0xfebfc1c4,
+0xfebec0c3,
+0xfebec0c3,
+0xfebdbfc2,
+0xfebdbfc2,
+0xfebcbec1,
+0xfebcbdc1,
+0xfebbbdc0,
+0xfebbbcc0,
+0xfebabcbf,
+0xfeb9bbbf,
+0xfeb9bbbe,
+0xfeb8babd,
+0xfeb7b9bd,
+0xfeb7b9bc,
+0xfeb6b8bc,
+0xfeb6b7bb,
+0xfeb5b7bb,
+0xfeb4b6ba,
+0xfeb4b5b9,
+0xfeb3b5b9,
+0xfeb2b4b8,
+0xfeb2b3b7,
+0xfeb1b3b7,
+0xfeb0b2b6,
+0xfeb0b1b5,
+0xfeafb0b5,
+0xffafb0b5,
+0xffafb0b5,
+0xf9b0b1b6,
+0xdfb0b1b6,
+0xa9afb1b6,
+0x60adaeb3,
+0x21a9aab0,
+0x04a3a5a9,
+0x00ada9b5,
+0x00808080,
+0x00808080,
+0x00808080,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00ffffff,
+0x00f8ffff,
+0x00c4a0ab,
+0x00bfb8c4,
+0x13c7cacc,
+0x4fcacdcf,
+0xa2cacdd0,
+0xe1cbced0,
+0xfbcacccf,
+0xffc7cacc,
+0xffc5c8ca,
+0xfec5c7ca,
+0xfec4c7c9,
+0xfec4c6c9,
+0xfec3c6c9,
+0xfec3c5c8,
+0xfec2c5c8,
+0xfec2c4c7,
+0xfec1c4c7,
+0xfec1c3c6,
+0xfec0c3c6,
+0xfec0c2c5,
+0xfebfc2c5,
+0xfebfc1c4,
+0xfebec0c4,
+0xfebec0c3,
+0xfebdbfc2,
+0xfebdbfc2,
+0xfebcbec1,
+0xfebcbec1,
+0xfebbbdc0,
+0xfebbbcc0,
+0xfebabcbf,
+0xfeb9bbbf,
+0xfeb9bbbe,
+0xfeb8babd,
+0xfeb8b9bd,
+0xfeb7b9bc,
+0xfeb6b8bc,
+0xfeb6b7bb,
+0xfeb5b7bb,
+0xfeb4b6ba,
+0xfeb4b5b9,
+0xfeb3b5b9,
+0xfeb2b4b8,
+0xfeb2b3b7,
+0xfeb1b3b7,
+0xfeb1b2b6,
+0xfeb0b1b6,
+0xfeafb0b5,
+0xfeaeb0b4,
+0xfeaeafb3,
+0xfeadaeb3,
+0xfeacadb2,
+0xffacadb2,
+0xffacadb2,
+0xf6adaeb3,
+0xd1adaeb3,
+0x88abadb2,
+0x37a9aaaf,
+0x09a8aaac,
+0x00a6a5aa,
+0x00898989,
+0x00aaaaaa,
+0x00acacac,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00bcffff,
+0x00bcffff,
+0x00b7ffff,
+0x00baf2e2,
+0x15c7cacd,
+0x5ecaccd0,
+0xb9cbced0,
+0xf1cacdd0,
+0xfec9cbce,
+0xffc7cacc,
+0xfec6c8cb,
+0xfec5c8ca,
+0xfec5c7ca,
+0xfec4c7c9,
+0xfec4c6c9,
+0xfec3c6c9,
+0xfec3c5c8,
+0xfec2c5c8,
+0xfec2c4c7,
+0xfec1c4c7,
+0xfec1c3c6,
+0xfec0c3c6,
+0xfec0c2c5,
+0xfebfc2c5,
+0xfebfc1c4,
+0xfebec0c4,
+0xfebec0c3,
+0xfebdbfc2,
+0xfebdbfc2,
+0xfebcbec1,
+0xfebcbec1,
+0xfebbbdc0,
+0xfebbbcc0,
+0xfebabcbf,
+0xfeb9bbbf,
+0xfeb9bbbe,
+0xfeb8babd,
+0xfeb8b9bd,
+0xfeb7b9bc,
+0xfeb6b8bc,
+0xfeb6b7bb,
+0xfeb5b7bb,
+0xfeb4b6ba,
+0xfeb4b5b9,
+0xfeb3b5b9,
+0xfeb2b4b8,
+0xfeb2b4b8,
+0xfeb1b3b7,
+0xfeb1b2b6,
+0xfeb0b1b6,
+0xfeafb0b5,
+0xfeaeb0b4,
+0xfeaeafb4,
+0xfeadafb3,
+0xfeacaeb2,
+0xfeacadb2,
+0xfeabacb1,
+0xfeaaabb0,
+0xfea9abaf,
+0xffa9abb0,
+0xfdaaabb0,
+0xe5aaabb0,
+0x9ea9aaaf,
+0x41a7a8ad,
+0x0aa3a3a7,
+0x00a0a2a9,
+0x0084847f,
+0x00808080,
+0x00808080,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00d2caca,
+0x00d8c8c8,
+0x00e1c4c4,
+0x10c4cacb,
+0x59cbced0,
+0xbdccced1,
+0xf5cacdcf,
+0xffc8cbcd,
+0xfec6c9cc,
+0xfec6c9cb,
+0xfec6c8cb,
+0xfec5c8ca,
+0xfec5c7ca,
+0xfec4c7c9,
+0xfec4c6c9,
+0xfec3c6c9,
+0xfec3c5c8,
+0xfec2c5c8,
+0xfec2c4c7,
+0xfec1c4c7,
+0xfec1c3c6,
+0xfec0c3c6,
+0xfec0c2c5,
+0xfebfc2c5,
+0xfebfc1c4,
+0xfebec0c4,
+0xfebec0c3,
+0xfebdbfc2,
+0xfebdbfc2,
+0xfebcbec1,
+0xfebcbec1,
+0xfebbbdc0,
+0xfebbbcc0,
+0xfebabcbf,
+0xfeb9bcbf,
+0xfeb9bbbe,
+0xfeb9babd,
+0xfeb8b9bd,
+0xfeb7b9bc,
+0xfeb6b8bc,
+0xfeb6b7bb,
+0xfeb5b7bb,
+0xfeb4b6ba,
+0xfeb4b6b9,
+0xfeb3b5b9,
+0xfeb2b4b8,
+0xfeb2b4b8,
+0xfeb1b3b7,
+0xfeb0b2b6,
+0xfeb0b1b6,
+0xfeafb1b5,
+0xfeaeb0b4,
+0xfeaeafb4,
+0xfeadafb3,
+0xfeadaeb2,
+0xfeacadb2,
+0xfeabacb1,
+0xfeaaabb0,
+0xfea9abaf,
+0xfea9aaaf,
+0xfea8a9ae,
+0xfea7a8ad,
+0xffa7a8ad,
+0xfea8a9ae,
+0xeaa8a9ae,
+0x9fa8a9ae,
+0x3ca5a6ab,
+0x069ea0a3,
+0x00a4a7a3,
+0x008080ff,
+0x008080ff,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00f9f9b1,
+0x005c5ce2,
+0x00cfd3cf,
+0x06c5c8c9,
+0x42cacdcf,
+0xaecdd0d2,
+0xf2cccfd1,
+0xffc8cbcd,
+0xfec7cacc,
+0xfec6c9cc,
+0xfec6c9cb,
+0xfec6c8cb,
+0xfec5c8ca,
+0xfec5c7ca,
+0xfec4c7c9,
+0xfec4c6c9,
+0xfec3c6c9,
+0xfec3c5c8,
+0xfec2c5c8,
+0xfec2c4c7,
+0xfec1c4c7,
+0xfec1c3c6,
+0xfec0c3c6,
+0xfec0c2c5,
+0xfebfc2c5,
+0xfebfc1c4,
+0xfebec0c4,
+0xfebec0c3,
+0xfebdbfc2,
+0xfebdbfc2,
+0xfebcbec1,
+0xfebcbec1,
+0xfebbbdc0,
+0xfebbbcc0,
+0xfebabcbf,
+0xfeb9bbbf,
+0xfeb9bbbe,
+0xfeb8babd,
+0xfeb8b9bd,
+0xfeb7b9bc,
+0xfeb6b8bc,
+0xfeb6b7bb,
+0xfeb5b7bb,
+0xfeb4b6ba,
+0xfeb4b5b9,
+0xfeb3b5b9,
+0xfeb2b4b8,
+0xfeb2b3b8,
+0xfeb1b3b7,
+0xfeb1b2b6,
+0xfeb0b1b6,
+0xfeafb1b5,
+0xfeafb0b4,
+0xfeaeafb4,
+0xfeadaeb3,
+0xfeacaeb2,
+0xfeacadb2,
+0xfeabacb1,
+0xfeaaabb0,
+0xfeaaabb0,
+0xfea9aaaf,
+0xfea8a9ae,
+0xfea8a8ad,
+0xfea7a8ad,
+0xfea6a7ac,
+0xfea6a6ac,
+0xffa5a6ab,
+0xfea6a6ac,
+0xe5a6a7ad,
+0x8da6a7ad,
+0x28a4a4aa,
+0x02989da0,
+0x00c8cfd9,
+0x00808080,
+0x00808080,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00b5b5ad,
+0x00919579,
+0x00ceb3cb,
+0x1fcaccd0,
+0x89cccfd1,
+0xe7cccfd1,
+0xffcacccf,
+0xfec7cacc,
+0xfec7cacc,
+0xfec7c9cc,
+0xfec6c9cb,
+0xfec6c8cb,
+0xfec5c8ca,
+0xfec5c7ca,
+0xfec4c7c9,
+0xfec4c6c9,
+0xfec3c6c9,
+0xfec3c5c8,
+0xfec2c5c8,
+0xfec2c4c7,
+0xfec1c4c7,
+0xfec1c3c6,
+0xfec0c3c6,
+0xfec0c2c5,
+0xfebfc2c5,
+0xfebfc1c4,
+0xfebec0c4,
+0xfebec0c3,
+0xfebdbfc2,
+0xfebdbfc2,
+0xfebcbec1,
+0xfebcbec1,
+0xfebbbdc0,
+0xfebbbcc0,
+0xfebabcbf,
+0xfeb9bbbf,
+0xfeb9bbbe,
+0xfeb8babd,
+0xfeb8b9bd,
+0xfeb7b9bc,
+0xfeb6b8bc,
+0xfeb6b7bb,
+0xfeb5b7bb,
+0xfeb4b6ba,
+0xfeb4b5b9,
+0xfeb3b5b9,
+0xfeb2b4b8,
+0xfeb2b3b8,
+0xfeb1b3b7,
+0xfeb1b2b6,
+0xfeb0b1b6,
+0xfeafb1b5,
+0xfeafb0b4,
+0xfeaeafb4,
+0xfeadaeb3,
+0xfeacaeb2,
+0xfeacadb2,
+0xfeabacb1,
+0xfeaaabb0,
+0xfeaaabb0,
+0xfea9aaaf,
+0xfea8a9ae,
+0xfea8a9ae,
+0xfea7a8ad,
+0xfea6a7ac,
+0xfea6a6ac,
+0xfea5a6ab,
+0xfea4a5aa,
+0xfea3a4aa,
+0xffa3a4a9,
+0xfca4a5ab,
+0xd1a5a6ab,
+0x63a3a4a9,
+0x0f9e9fa3,
+0x00a1a3a7,
+0x00808080,
+0x00808080,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00ffffff,
+0x00ffffff,
+0x00909298,
+0x04c4c3c9,
+0x4bccced0,
+0xc5cccfd2,
+0xfccbced0,
+0xffc8cbcd,
+0xfec7cacc,
+0xfec7cacc,
+0xfec7c9cc,
+0xfec6c9cb,
+0xfec6c8cb,
+0xfec5c8ca,
+0xfec5c7ca,
+0xfec4c7c9,
+0xfec4c6c9,
+0xfec3c6c9,
+0xfec3c5c8,
+0xfec2c5c8,
+0xfec2c4c7,
+0xfec1c4c7,
+0xfec1c3c6,
+0xfec0c3c6,
+0xfec0c2c5,
+0xfebfc2c5,
+0xfebfc1c4,
+0xfebec0c4,
+0xfebec0c3,
+0xfebdbfc2,
+0xfebdbfc2,
+0xfebcbec1,
+0xfebcbec1,
+0xfebbbdc0,
+0xfebbbcc0,
+0xfebabcbf,
+0xfeb9bbbf,
+0xfeb9bbbe,
+0xfeb8babd,
+0xfeb8b9bd,
+0xfeb7b9bc,
+0xfeb6b8bc,
+0xfeb6b7bb,
+0xfeb5b7bb,
+0xfeb4b6ba,
+0xfeb4b5b9,
+0xfeb3b5b9,
+0xfeb2b4b8,
+0xfeb2b3b7,
+0xfeb1b3b7,
+0xfeb0b2b6,
+0xfeb0b1b6,
+0xfeafb0b5,
+0xfeaeb0b4,
+0xfeaeafb4,
+0xfeadafb3,
+0xfeacaeb2,
+0xfeacadb2,
+0xfeabacb1,
+0xfeabacb1,
+0xfeaaabb0,
+0xfea9aaaf,
+0xfea8a9af,
+0xfea8a9ae,
+0xfea7a8ad,
+0xfea6a7ac,
+0xfea5a6ac,
+0xfea5a6ab,
+0xfea4a5aa,
+0xfea4a4aa,
+0xfea3a4a9,
+0xfea2a3a8,
+0xfea1a2a8,
+0xffa1a2a8,
+0xf3a3a4a9,
+0xa1a3a3a9,
+0x2a9fa0a7,
+0x01959397,
+0x00928780,
+0x00999494,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00cfcaca,
+0x00cfcaca,
+0x00c6cccf,
+0x12c7cacd,
+0x7bcdcfd2,
+0xe7cdcfd1,
+0xffc9ccce,
+0xfec8cacd,
+0xfec7cacc,
+0xfec7cacc,
+0xfec6c9cc,
+0xfec6c9cb,
+0xfec6c8cb,
+0xfec5c8ca,
+0xfec5c7ca,
+0xfec4c7c9,
+0xfec4c6c9,
+0xfec3c6c9,
+0xfec3c5c8,
+0xfec2c5c8,
+0xfec2c4c7,
+0xfec1c4c7,
+0xfec1c3c6,
+0xfec0c3c6,
+0xfec0c2c5,
+0xfebfc2c5,
+0xfebfc1c4,
+0xfebec0c4,
+0xfebec0c3,
+0xfebdbfc2,
+0xfebdbfc2,
+0xfebcbec1,
+0xfebcbec1,
+0xfebbbdc0,
+0xfebbbcc0,
+0xfebabcbf,
+0xfeb9bbbf,
+0xfeb9bbbe,
+0xfeb8babd,
+0xfeb7b9bc,
+0xfeb7b9bc,
+0xfeb6b8bc,
+0xfeb5b7bb,
+0xfeb5b7bb,
+0xfeb4b6ba,
+0xfeb4b5b9,
+0xfeb3b4b8,
+0xfeb2b4b8,
+0xfeb1b3b7,
+0xfeb1b2b6,
+0xfeb0b2b6,
+0xfeafb1b5,
+0xfeafb0b5,
+0xfeaeb0b4,
+0xfeaeafb3,
+0xfeadaeb3,
+0xfeacadb2,
+0xfeabadb1,
+0xfeabacb1,
+0xfeaaabb0,
+0xfeaaabb0,
+0xfea9aaaf,
+0xfea8a9af,
+0xfea8a8ae,
+0xfea7a8ad,
+0xfea6a7ac,
+0xfea6a6ac,
+0xfea5a6ab,
+0xfea4a5aa,
+0xfea4a4aa,
+0xfea3a4a9,
+0xfea2a3a8,
+0xfea1a2a8,
+0xfea1a1a7,
+0xfea0a1a6,
+0xfea0a0a6,
+0xfda1a1a7,
+0xd0a1a1a7,
+0x50a0a0a6,
+0x04979b9d,
+0x00f5f5ff,
+0x007f7f7f,
+0x007f7f7f,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00ffffff,
+0x00ffffff,
+0x00ddd9df,
+0x20cdd0d1,
+0xa2cdd0d3,
+0xf9cbced0,
+0xffc9cccd,
+0xfec8cacd,
+0xfec7cacc,
+0xfec7cacc,
+0xfec6c9cc,
+0xfec6c9cb,
+0xfec6c8cb,
+0xfec5c8ca,
+0xfec5c7ca,
+0xfec4c7c9,
+0xfec4c6c9,
+0xfec3c6c9,
+0xfec3c5c8,
+0xfec2c5c8,
+0xfec2c4c7,
+0xfec1c4c7,
+0xfec1c3c6,
+0xfec0c3c6,
+0xfec0c2c5,
+0xfebfc2c5,
+0xfebfc1c4,
+0xfebec0c4,
+0xfebec0c3,
+0xfebdbfc2,
+0xfebdbfc2,
+0xfebcbec1,
+0xfebcbec1,
+0xfebbbdc0,
+0xfebbbcc0,
+0xfebabcbf,
+0xfeb9bbbf,
+0xfeb9bbbe,
+0xfeb8babd,
+0xfeb7b9bd,
+0xffb7b8bc,
+0xffb6b8bc,
+0xffb7b9bd,
+0xffb7b9bd,
+0xffb6b8bc,
+0xffb5b6ba,
+0xffb4b6ba,
+0xfeb4b6ba,
+0xfcb4b6ba,
+0xfcb4b5ba,
+0xfcb3b5b9,
+0xfcb2b4b9,
+0xfeb1b3b7,
+0xffb0b1b6,
+0xffaeb0b4,
+0xffaeafb4,
+0xffaeafb4,
+0xffadafb3,
+0xffacaeb2,
+0xffabacb1,
+0xffa9abb0,
+0xfea9aaaf,
+0xfea8a9ae,
+0xfea8a9ae,
+0xfea7a8ad,
+0xfea6a7ac,
+0xfea6a7ac,
+0xfea5a6ab,
+0xfea4a5aa,
+0xfea4a4aa,
+0xfea3a4a9,
+0xfea2a3a9,
+0xfea1a2a8,
+0xfea1a2a7,
+0xfea0a1a6,
+0xfea0a0a6,
+0xfe9fa0a5,
+0xfe9e9fa4,
+0xff9e9fa4,
+0xe8a0a1a7,
+0x759fa0a6,
+0x0e99999e,
+0x0098989f,
+0x00aaaaaa,
+0x00aaaaaa,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x007f7f7f,
+0x00000000,
+0x00ffffff,
+0x31cacdcf,
+0xbacfd1d4,
+0xfdcbcdd0,
+0xfec8cbcd,
+0xfec8cacd,
+0xfec7cacc,
+0xfec7cacc,
+0xfec7c9cc,
+0xfec6c9cb,
+0xfec6c8cb,
+0xfec5c8ca,
+0xfec5c7ca,
+0xfec4c7c9,
+0xfec4c6c9,
+0xfec3c6c9,
+0xfec3c5c8,
+0xfec2c5c8,
+0xfec2c4c7,
+0xfec1c4c7,
+0xfec1c3c6,
+0xfec0c3c6,
+0xfec0c2c5,
+0xfebfc2c5,
+0xfebfc1c4,
+0xfebec0c4,
+0xfebec0c3,
+0xfebdbfc2,
+0xfebdbfc2,
+0xfebcbec1,
+0xfebcbec1,
+0xfebbbdc0,
+0xfebabcbf,
+0xfebabbbf,
+0xffb9bbbe,
+0xffb9bbbf,
+0xffb9bbbe,
+0xfeb9bbbe,
+0xf5bbbdc0,
+0xe9babcc0,
+0xdab7b9bd,
+0xc3b9bbbf,
+0xadbabdc1,
+0x9cbabcc0,
+0x8eb6b8bc,
+0x83b3b4b8,
+0x78b3b4b8,
+0x71b2b4b8,
+0x6db2b3b8,
+0x6db1b3b7,
+0x70b0b2b7,
+0x76afb1b5,
+0x7eafb0b4,
+0x88aeb0b4,
+0x93b0b2b7,
+0x9fb2b3b8,
+0xafb1b2b7,
+0xc3aeb0b4,
+0xd8abacb1,
+0xe6acadb2,
+0xf1adaeb3,
+0xfca9abb0,
+0xffa8a9ae,
+0xffa8a9ae,
+0xffa6a7ac,
+0xfea5a6ab,
+0xfea4a5aa,
+0xfea3a4aa,
+0xfea3a4a9,
+0xfea2a3a8,
+0xfea1a2a8,
+0xfea1a1a7,
+0xfea0a1a7,
+0xfea0a0a6,
+0xfe9fa0a5,
+0xfe9e9fa5,
+0xfe9e9ea4,
+0xfe9d9da3,
+0xff9c9da3,
+0xf59e9fa5,
+0x929d9da3,
+0x159b9ca2,
+0x00a6a89c,
+0x008080bf,
+0x008080bf,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x008c8686,
+0x008c756b,
+0x00ffffff,
+0x3acacdd0,
+0xcacdd0d2,
+0xffcbcdd0,
+0xfec8cbcd,
+0xfec8cbcd,
+0xfec7cacd,
+0xfec7cacc,
+0xfec7c9cc,
+0xfec6c9cb,
+0xfec6c8cb,
+0xfec5c8ca,
+0xfec5c7ca,
+0xfec4c7c9,
+0xfec4c6c9,
+0xfec3c6c9,
+0xfec3c5c8,
+0xfec2c5c8,
+0xfec2c4c7,
+0xfec1c4c7,
+0xfec1c3c6,
+0xfec0c3c6,
+0xfec0c2c5,
+0xfebfc2c5,
+0xfebfc1c4,
+0xfebec0c4,
+0xfebec0c3,
+0xfebdbfc2,
+0xfebdbfc2,
+0xfebcbec1,
+0xfebbbdc1,
+0xfebbbdc0,
+0xffbbbdc0,
+0xffbbbdc0,
+0xfbbcbec1,
+0xeabcbec1,
+0xcdbbbdc0,
+0xa4bcbec2,
+0x7cb9babe,
+0x54b9bbbf,
+0x39b9bbbe,
+0x23b5b6ba,
+0x12afb4b8,
+0x09adb0b5,
+0x05acaeb2,
+0x03a7aaac,
+0x029cb1b1,
+0x01b6cbbe,
+0x00ffffe3,
+0x00e0f6d3,
+0x00d6ffa5,
+0x00e3ff9d,
+0x00cadbb8,
+0x019595bb,
+0x02a9abae,
+0x04a9adb0,
+0x06a1a2a6,
+0x0aa5a6aa,
+0x12a8a9ac,
+0x21a9abaf,
+0x33abacb1,
+0x4baaacb1,
+0x6ca8aaae,
+0x93aaabb0,
+0xb9a9aab0,
+0xdea7a8ad,
+0xf3a7a8ae,
+0xfea5a6ab,
+0xffa4a5aa,
+0xffa2a3a9,
+0xfea1a2a8,
+0xfea1a1a7,
+0xfea0a1a6,
+0xfea0a0a6,
+0xfe9fa0a5,
+0xfe9f9fa5,
+0xfe9e9fa4,
+0xfe9d9ea3,
+0xfe9c9da3,
+0xfe9c9ca2,
+0xfe9b9ba1,
+0xfa9c9ca3,
+0x9f9d9da4,
+0x179b9ba2,
+0x00b0b0a7,
+0x0081817f,
+0x00808080,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00ffffff,
+0x00ffffff,
+0x00b9b8c4,
+0x38cacdd0,
+0xcfcccfd2,
+0xffcacdcf,
+0xfec8cbcd,
+0xfec8cbcd,
+0xfec7cacd,
+0xfec7cacc,
+0xfec7c9cc,
+0xfec6c9cb,
+0xfec6c8cb,
+0xfec5c8ca,
+0xfec5c7ca,
+0xfec4c7c9,
+0xfec4c6c9,
+0xfec3c6c9,
+0xfec3c5c8,
+0xfec2c5c8,
+0xfec2c4c7,
+0xfec1c4c7,
+0xfec1c3c6,
+0xfec0c3c6,
+0xfec0c2c5,
+0xfebfc2c5,
+0xfebfc1c4,
+0xfebec0c4,
+0xfebec0c3,
+0xfebdbfc2,
+0xfebdbfc2,
+0xfebcbec1,
+0xffbcbec2,
+0xffbdbfc2,
+0xf6bec0c3,
+0xd9bdbfc3,
+0xa6bdbfc3,
+0x6cbbbdc0,
+0x3cbabcc0,
+0x19b6b8bc,
+0x07b4b6b9,
+0x01b7b4b9,
+0x00bab9be,
+0x00000000,
+0x00988b82,
+0x0097857b,
+0x00a49f99,
+0x007a7874,
+0x00ffffff,
+0x0052c3bd,
+0x00bfcac7,
+0x00c9c6c4,
+0x00c7c7c3,
+0x00c6c5c3,
+0x00c8c7c6,
+0x00cfcbca,
+0x008f8dce,
+0x00150f24,
+0x005d5d5d,
+0x0076736e,
+0x00b3b1ab,
+0x00a7a38f,
+0x00c4cbf3,
+0x00887517,
+0x00a5a1ad,
+0x00aca6b3,
+0x04a3a3a8,
+0x0da2a3a9,
+0x28a6a6ab,
+0x4fa5a6ac,
+0x86a4a6ab,
+0xbda6a6ac,
+0xe8a4a5ab,
+0xfca3a4aa,
+0xffa1a2a7,
+0xfe9fa0a6,
+0xfe9f9fa5,
+0xfe9e9fa5,
+0xfe9e9fa4,
+0xfe9d9da3,
+0xfe9c9da3,
+0xfe9c9ca2,
+0xfe9b9ba1,
+0xfe9a9ba1,
+0xfe9a9aa0,
+0xfc9a9ba1,
+0xa19c9ca3,
+0x169999a0,
+0x0095958e,
+0x007d7dff,
+0x008080ff,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00cccccc,
+0x00cbc8c9,
+0x00c9ccd3,
+0x2dcacfd0,
+0xc7cdd0d3,
+0xffcacdcf,
+0xfec8cbcd,
+0xfec8cbcd,
+0xfec7cacd,
+0xfec7cacc,
+0xfec7c9cc,
+0xfec6c9cb,
+0xfec6c8cb,
+0xfec5c8ca,
+0xfec5c7ca,
+0xfec4c7c9,
+0xfec4c6c9,
+0xfec3c6c9,
+0xfec3c5c8,
+0xfec2c5c8,
+0xfec2c4c7,
+0xfec1c4c7,
+0xfec1c3c6,
+0xfec0c3c6,
+0xfec0c2c5,
+0xfebfc2c5,
+0xfebfc1c4,
+0xfebec0c4,
+0xfebec0c3,
+0xfebdbfc2,
+0xfebdbfc2,
+0xffbdbfc2,
+0xfbbec0c4,
+0xdfbfc1c5,
+0xa4bfc1c4,
+0x5dbcbfc1,
+0x27babdc0,
+0x09b1b4b7,
+0x01908d90,
+0x00a5a7a7,
+0x00f5f5f5,
+0x00fafafa,
+0x00bdbdb9,
+0x00afafae,
+0x00959595,
+0x00ffffff,
+0x00ffffff,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00959191,
+0x00829d9d,
+0x0093c1bd,
+0x001c1813,
+0x00000000,
+0x00000000,
+0x00adabb8,
+0x039a9d9f,
+0x12a0a0a5,
+0x3aa2a3a9,
+0x7ba3a4a9,
+0xc3a3a4aa,
+0xf2a2a3a8,
+0xffa0a0a6,
+0xff9d9ea4,
+0xfe9d9da3,
+0xfe9c9da3,
+0xfe9c9ca2,
+0xfe9b9ca1,
+0xfe9a9ba0,
+0xfe9a9aa0,
+0xfe9999a0,
+0xfe98989f,
+0xfb999aa0,
+0x999a9aa0,
+0x1096969b,
+0x00858590,
+0x00babab6,
+0x00999999,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00fefefe,
+0x00ffffff,
+0x00ced5d9,
+0x1bcbcdd0,
+0xb4cfd1d4,
+0xfecbced0,
+0xfec8cbcd,
+0xfec8cbcd,
+0xfec7cacc,
+0xfec7cacc,
+0xfec7c9cc,
+0xfec6c9cb,
+0xfec6c8cb,
+0xfec5c8ca,
+0xfec5c7ca,
+0xfec4c7c9,
+0xfec4c6c9,
+0xfec3c6c9,
+0xfec3c5c8,
+0xfec3c5c8,
+0xfec2c4c7,
+0xfec1c4c7,
+0xfec1c3c6,
+0xfec0c3c6,
+0xfec0c2c5,
+0xfebfc2c5,
+0xfebfc1c4,
+0xfebec0c4,
+0xfebec0c3,
+0xfebdbfc2,
+0xffbec0c3,
+0xf7bfc1c4,
+0xcabfc1c5,
+0x78bfc1c4,
+0x2fbec0c2,
+0x09b6b8bc,
+0x00b2b8b2,
+0x00ffecc6,
+0x008b7f77,
+0x009c9c9b,
+0x00939393,
+0x00e2e2e2,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00d1cece,
+0x009d9895,
+0x00c7c6b6,
+0x00ffffda,
+0x02999699,
+0x179e9fa4,
+0x52a1a1a7,
+0xaaa1a1a8,
+0xeda0a0a6,
+0xff9d9ea4,
+0xfe9c9ca2,
+0xfe9b9ba1,
+0xfe9a9ba1,
+0xfe9a9aa0,
+0xfe9999a0,
+0xfe99999f,
+0xfe98989f,
+0xfe97979e,
+0xf898999f,
+0x8298989f,
+0x07939297,
+0x008181a8,
+0x009e9e97,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00cfcfc9,
+0x00b5bcca,
+0x0bc6c8cb,
+0x95cccfd2,
+0xfccbced0,
+0xfec8cbcd,
+0xfec8cbcd,
+0xfec7cacd,
+0xfec7cacc,
+0xfec7c9cc,
+0xfec6c9cb,
+0xfec6c8cb,
+0xfec5c8ca,
+0xfec5c7ca,
+0xfec4c7c9,
+0xfec4c6c9,
+0xfec3c6c9,
+0xfec3c5c8,
+0xfec3c5c8,
+0xfec2c4c7,
+0xfec1c4c7,
+0xfec1c3c6,
+0xfec0c3c6,
+0xfec0c2c5,
+0xfebfc2c5,
+0xfebfc1c4,
+0xfebec0c4,
+0xfebec0c3,
+0xffbec0c3,
+0xf9c0c1c5,
+0xc4c0c2c5,
+0x66bfc1c4,
+0x1bbbbdc1,
+0x02adabae,
+0x00ffffff,
+0x00b8b6af,
+0x00d7d4d3,
+0x00ffffff,
+0x00fbffff,
+0x0000ffff,
+0x0000a3ff,
+0x000080ff,
+0x000080ff,
+0x000080ff,
+0x000080ff,
+0x000080ff,
+0x000080ff,
+0x000080ff,
+0x000080ff,
+0x000080ff,
+0x000080ff,
+0x000080ff,
+0x000080ff,
+0x000080ff,
+0x000080ff,
+0x000080ff,
+0x000080ff,
+0x000080ff,
+0x000080ff,
+0x000080ff,
+0x000080ff,
+0x000080ff,
+0x000080ff,
+0x000080ff,
+0x000080ff,
+0x000080ff,
+0x000080ff,
+0x000080ff,
+0x000080ff,
+0x000080ff,
+0x00007fff,
+0x000051ff,
+0x0000ffff,
+0x00e4cc9c,
+0x00ddc99b,
+0x00c1bc9f,
+0x0098988d,
+0x00ffffff,
+0x0c9b9ba1,
+0x499e9fa4,
+0xb19e9ea5,
+0xf59d9da4,
+0xff9b9ba2,
+0xfe999aa0,
+0xfe9999a0,
+0xfe98999f,
+0xfe98989f,
+0xfe97979e,
+0xfe97979d,
+0xff96969d,
+0xed98999f,
+0x5b98989f,
+0x007c7b7c,
+0x00f2f2e7,
+0x00aaaaaa,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00ababab,
+0x00a0a098,
+0x01685764,
+0x62ced0d2,
+0xf2cccfd2,
+0xffc8cbcd,
+0xfec8cbcd,
+0xfec7cacd,
+0xfec7cacc,
+0xfec7c9cc,
+0xfec6c9cb,
+0xfec6c8cb,
+0xfec5c8ca,
+0xfec5c7ca,
+0xfec4c7c9,
+0xfec4c6c9,
+0xfec3c6c9,
+0xfec3c5c8,
+0xfec2c5c8,
+0xfec2c4c7,
+0xfec1c4c7,
+0xfec1c3c6,
+0xfec0c3c6,
+0xfec0c2c5,
+0xfebfc2c5,
+0xfebfc1c4,
+0xfebec0c4,
+0xffbec0c3,
+0xfdc0c2c5,
+0xd4c0c2c5,
+0x6fbfc1c5,
+0x1abebfc3,
+0x01b1b4b8,
+0x00000000,
+0x00c9c9c8,
+0x00d0d0d0,
+0x00bababa,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x004f61ef,
+0x005757f0,
+0x00546efb,
+0x0020edfa,
+0x00978c8a,
+0x006b5941,
+0x00b7b8bf,
+0x109a9aa1,
+0x649d9da3,
+0xd59d9da3,
+0xfe9a9ba1,
+0xfe98989f,
+0xfe98989f,
+0xfe97979e,
+0xfe97979d,
+0xfe96969d,
+0xfe95959c,
+0xff95959c,
+0xd697979e,
+0x3195959b,
+0x007c7c87,
+0x00747474,
+0x007f7f7f,
+0x00000000,
+0x00838383,
+0x00656565,
+0x00d5d9dd,
+0x2ecacdcf,
+0xd6cdcfd1,
+0xffc9ccce,
+0xfec8cbcd,
+0xfec7cacc,
+0xfec7cacc,
+0xfec7c9cc,
+0xfec6c9cb,
+0xfec6c8cb,
+0xfec5c8ca,
+0xfec5c7ca,
+0xfec4c7c9,
+0xfec4c6c9,
+0xfec4c6c9,
+0xfec3c5c8,
+0xfec2c5c8,
+0xfec2c4c7,
+0xfec1c4c7,
+0xfec1c3c6,
+0xfec0c3c6,
+0xfec0c2c5,
+0xfebfc2c5,
+0xfebfc1c4,
+0xfebec0c4,
+0xffbfc1c4,
+0xefc0c3c6,
+0x95c0c3c6,
+0x29bdc0c3,
+0x01bec4c1,
+0x006e82c0,
+0x00c6c6c2,
+0x00f8f8f8,
+0x00ffffff,
+0x00000000,
+0x000052a9,
+0x00004ea4,
+0x00688cdf,
+0x0d296dc2,
+0x21296dc3,
+0x21296dc4,
+0x21296dc4,
+0x21296dc5,
+0x21296dc5,
+0x21296dc5,
+0x21296dc3,
+0x21296dc3,
+0x21296dc3,
+0x21296dc3,
+0x21296dc3,
+0x21296dc3,
+0x21296dc3,
+0x21296dc2,
+0x21296cc2,
+0x21296cc2,
+0x21296bc2,
+0x21276bc2,
+0x21276bc1,
+0x21276bc0,
+0x21276bc0,
+0x21276bc0,
+0x21276bc0,
+0x21276ac0,
+0x21266ac0,
+0x21266ac0,
+0x21266ac0,
+0x21266ac0,
+0x21266abf,
+0x21266abf,
+0x212668bf,
+0x212668bf,
+0x222669bf,
+0x21256abe,
+0x1b2569be,
+0x10286abe,
+0x032f63c3,
+0x002169bb,
+0x00027673,
+0x00057281,
+0x00355ab6,
+0x00a4a6a4,
+0x028f8e93,
+0x2f9b9ba1,
+0xab9c9ca2,
+0xfb999aa0,
+0xfe98989e,
+0xfe97979d,
+0xfe96969d,
+0xfe96969c,
+0xfe95959b,
+0xfe94949b,
+0xfe95959c,
+0xa497979d,
+0x0e909095,
+0x00797989,
+0x00868682,
+0x00000000,
+0x00c1c1c1,
+0x00a8b1be,
+0x08c2c3c6,
+0x98ccced1,
+0xfecacdcf,
+0xfec8cacd,
+0xfec7cacd,
+0xfec7cacc,
+0xfec7c9cc,
+0xfec6c9cb,
+0xfec6c8cb,
+0xfec5c8ca,
+0xfec5c7ca,
+0xfec4c7c9,
+0xfec4c6c9,
+0xfec3c6c9,
+0xfec3c5c8,
+0xfec3c5c8,
+0xfec2c4c7,
+0xfec1c4c7,
+0xfec1c3c6,
+0xfec0c3c6,
+0xfec0c2c5,
+0xfebfc2c5,
+0xfebfc1c4,
+0xfebec0c3,
+0xffbfc2c5,
+0xd4c1c3c6,
+0x57c1c3c6,
+0x09babbbe,
+0x00b0b0b5,
+0x00e9e8e6,
+0x00f3f2f1,
+0x00ffffff,
+0x00000000,
+0x00000000,
+0x00000000,
+0x002e74b9,
+0x003075b7,
+0x002a68d3,
+0x52296fc6,
+0xd62b72cb,
+0xd92a70c9,
+0xd92b71c9,
+0xd92b71c9,
+0xd92b70c9,
+0xd92a70c9,
+0xd92a70c8,
+0xd92970c8,
+0xd92970c8,
+0xd92970c8,
+0xd92970c8,
+0xd92970c8,
+0xd92970c8,
+0xd92970c7,
+0xd9296fc7,
+0xd92a6fc7,
+0xd9296fc7,
+0xd9286fc7,
+0xd9286fc6,
+0xd9286fc6,
+0xd9286fc6,
+0xd9286fc6,
+0xd9286ec6,
+0xd9286ec5,
+0xd9276ec5,
+0xd9276ec5,
+0xd9276ec5,
+0xd9276ec4,
+0xd9276dc4,
+0xd9276dc4,
+0xd9276cc4,
+0xd9266cc4,
+0xd9266cc3,
+0xd8266dc3,
+0xce266cc2,
+0xba266abf,
+0x93256abf,
+0x63256abf,
+0x2f2568bb,
+0x0b2267ba,
+0x002467bc,
+0x000f34e0,
+0x00232c5e,
+0x00d1d5a4,
+0x1597979e,
+0x8f9999a0,
+0xf59999a0,
+0xff96969d,
+0xfe95959c,
+0xfe95959b,
+0xfe94949b,
+0xfe94949a,
+0xff93939a,
+0xf395959c,
+0x5c94949b,
+0x00afafb9,
+0x0071716b,
+0x00808080,
+0x00b5b5b6,
+0x00cbd2d8,
+0x45cbced0,
+0xeacccfd1,
+0xffc8cacd,
+0xfec7cacc,
+0xfec7cacc,
+0xfec7c9cc,
+0xfec6c9cb,
+0xfec6c8cb,
+0xfec5c8ca,
+0xfec5c7ca,
+0xfec5c7c9,
+0xfec4c6c9,
+0xfec3c6c9,
+0xfec3c5c8,
+0xfec2c5c8,
+0xfec2c4c7,
+0xfec1c4c7,
+0xfec1c3c6,
+0xfec0c3c6,
+0xfec0c2c5,
+0xfebfc2c5,
+0xfebfc1c4,
+0xffbec0c3,
+0xfcc0c3c5,
+0xb5c1c4c6,
+0x31bdbfc2,
+0x00897983,
+0x00ffffff,
+0x00d4d2d2,
+0x00cfcece,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x004181bf,
+0x004582be,
+0x001255cc,
+0x5e296fc5,
+0xf82a70c8,
+0xff296dc4,
+0xff296dc4,
+0xff296dc4,
+0xff296dc4,
+0xff286cc3,
+0xff286cc3,
+0xff286cc3,
+0xff286cc3,
+0xff286cc3,
+0xff286cc3,
+0xff286cc2,
+0xff286cc2,
+0xff286cc2,
+0xff286cc2,
+0xff286bc2,
+0xff276bc2,
+0xff276bc1,
+0xff276bc1,
+0xff276bc1,
+0xff276bc1,
+0xff276bc1,
+0xff276ac0,
+0xff266ac0,
+0xff266ac0,
+0xff266ac0,
+0xff266abf,
+0xff266abf,
+0xff266abf,
+0xff2669bf,
+0xff2569bf,
+0xff2569be,
+0xff2569be,
+0xff2569be,
+0xff2569bd,
+0xff2569bd,
+0xff2569bf,
+0xfa256abe,
+0xe2256abf,
+0xac2569be,
+0x592569be,
+0x152266bd,
+0x00cf9d53,
+0x00627985,
+0x007f8391,
+0x0d96969c,
+0x8399999f,
+0xf598989e,
+0xff95959b,
+0xfe94949b,
+0xfe94949a,
+0xfe93939a,
+0xfe929299,
+0xff929299,
+0xc494949a,
+0x19909097,
+0x00a3a398,
+0x00797991,
+0x00ffffff,
+0x0bc4c8c8,
+0xa4ccd0d2,
+0xffcacccf,
+0xfec7cacc,
+0xfec7cacc,
+0xfec7c9cc,
+0xfec6c9cb,
+0xfec6c8cb,
+0xfec5c8ca,
+0xfec5c7ca,
+0xfec4c7c9,
+0xfec4c6c9,
+0xfec4c6c9,
+0xfec3c5c8,
+0xfec2c5c8,
+0xfec2c4c7,
+0xfec1c4c7,
+0xfec1c3c6,
+0xfec0c3c6,
+0xfec0c2c5,
+0xfebfc2c5,
+0xfebfc1c4,
+0xfebec0c3,
+0xfac0c2c5,
+0x9dc2c5c8,
+0x1bbec0c2,
+0x00c7cada,
+0x00abaaaa,
+0x00949391,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x004080bf,
+0x004482be,
+0x001256cd,
+0x5e296fc6,
+0xf82a70c8,
+0xfe296dc3,
+0xfe296dc3,
+0xfe296cc3,
+0xfe286cc2,
+0xfe286cc2,
+0xfe286cc2,
+0xfe286cc2,
+0xfe286cc2,
+0xfe286cc2,
+0xfe286cc2,
+0xfe286cc1,
+0xfe286bc1,
+0xfe286bc1,
+0xfe286bc1,
+0xfe276bc1,
+0xfe276bc0,
+0xfe276bc0,
+0xfe276bc0,
+0xfe276bc0,
+0xfe276ac0,
+0xfe276abf,
+0xfe266abf,
+0xfe266abf,
+0xfe266abf,
+0xfe266abf,
+0xfe266abe,
+0xfe2669be,
+0xfe2569be,
+0xfe2569be,
+0xfe2569bd,
+0xfe2569bd,
+0xfe2569bd,
+0xfe2568bd,
+0xfe2468bc,
+0xfe2468bc,
+0xfe2468bc,
+0xfe2468bc,
+0xfe2468bc,
+0xff2468bd,
+0xf52469bf,
+0xbb246ac0,
+0x502469bd,
+0x082466b4,
+0x001c4b9b,
+0x00825b49,
+0x0d949498,
+0x8f97979d,
+0xfb95969d,
+0xfe93939a,
+0xfe93939a,
+0xfe929399,
+0xfe929299,
+0xfe919198,
+0xf892929a,
+0x66929299,
+0x00a2a28d,
+0x008a8a7e,
+0x00dcd2d7,
+0x3bcacdcf,
+0xe7ccced1,
+0xffc8cacd,
+0xfec7cacc,
+0xfec7c9cc,
+0xfec6c9cb,
+0xfec6c8cb,
+0xfec5c8ca,
+0xfec5c7ca,
+0xfec4c7c9,
+0xfec4c6c9,
+0xfec3c6c9,
+0xfec3c5c8,
+0xfec2c5c8,
+0xfec2c4c7,
+0xfec1c4c7,
+0xfec1c3c6,
+0xfec0c3c6,
+0xfec0c2c5,
+0xfebfc2c5,
+0xfebfc1c4,
+0xfebec0c3,
+0xfbc0c3c6,
+0x98c2c5c8,
+0x12bec0c3,
+0x00aab0b6,
+0x00d7d5d5,
+0x00d3d1d1,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x004080bf,
+0x004482be,
+0x001256cd,
+0x5e296fc5,
+0xf82a70c8,
+0xfe296dc3,
+0xfe296cc3,
+0xfe286cc2,
+0xfe286cc2,
+0xfe286cc2,
+0xfe286cc2,
+0xfe286cc2,
+0xfe286cc2,
+0xfe286cc1,
+0xfe286cc1,
+0xfe286bc1,
+0xfe286bc1,
+0xfe286bc1,
+0xfe276bc1,
+0xfe276bc0,
+0xfe276bc0,
+0xfe276bc0,
+0xfe276bc0,
+0xfe276ac0,
+0xfe266abf,
+0xfe266abf,
+0xfe266abf,
+0xfe266abf,
+0xfe266abe,
+0xfe2669be,
+0xfe2669be,
+0xfe2569be,
+0xfe2569be,
+0xfe2569bd,
+0xfe2569bd,
+0xfe2569bd,
+0xfe2568bd,
+0xfe2468bc,
+0xfe2468bc,
+0xfe2468bc,
+0xfe2468bc,
+0xfe2468bc,
+0xfe2467bc,
+0xfe2367bb,
+0xfe2367bb,
+0xff2368bc,
+0xed2469be,
+0x8b2469be,
+0x182266b8,
+0x002868bf,
+0x00c1abb0,
+0x1694949b,
+0xaf97979e,
+0xff94949b,
+0xfe929299,
+0xfe929299,
+0xfe919198,
+0xfe919097,
+0xff919198,
+0xbd929299,
+0x148e8e96,
+0x008e90a8,
+0x03c0c9d0,
+0x85ccced1,
+0xfdcacdcf,
+0xfec7cacc,
+0xfec7c9cc,
+0xfec6c9cb,
+0xfec6c9cb,
+0xfec5c8ca,
+0xfec5c7ca,
+0xfec4c7c9,
+0xfec4c6c9,
+0xfec3c6c9,
+0xfec3c5c8,
+0xfec2c5c8,
+0xfec2c4c7,
+0xfec1c4c7,
+0xfec1c3c6,
+0xfec0c3c6,
+0xfec0c2c5,
+0xfebfc2c5,
+0xfebfc1c4,
+0xfebec0c4,
+0xfec0c2c5,
+0xa6c2c5c8,
+0x14bec1c4,
+0x00a4adb7,
+0x00cdcdcd,
+0x00cdcdcd,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x004080bf,
+0x004482be,
+0x001255ce,
+0x5d296fc6,
+0xf82a6fc8,
+0xfe296cc2,
+0xfe286cc2,
+0xfe286cc2,
+0xfe286cc2,
+0xfe286cc2,
+0xfe286cc2,
+0xfe286cc2,
+0xfe286cc2,
+0xfe286cc1,
+0xfe286bc1,
+0xfe286bc1,
+0xfe276bc1,
+0xfe276bc1,
+0xfe276bc0,
+0xfe276bc0,
+0xfe276bc0,
+0xfe276bc0,
+0xfe276ac0,
+0xfe266abf,
+0xfe266abf,
+0xfe266abf,
+0xfe266abf,
+0xfe266abe,
+0xfe2669be,
+0xfe2669be,
+0xfe2569be,
+0xfe2569be,
+0xfe2569bd,
+0xfe2569bd,
+0xfe2568bd,
+0xfe2568bd,
+0xfe2468bc,
+0xfe2468bc,
+0xfe2468bc,
+0xfe2468bc,
+0xfe2467bc,
+0xfe2467bc,
+0xfe2367bc,
+0xfe2367bb,
+0xfe2367ba,
+0xfe2367ba,
+0xfe2366ba,
+0xfb2367bc,
+0xa92368bc,
+0x1d2367bc,
+0x002066bd,
+0x009e949b,
+0x3594949c,
+0xdc95959c,
+0xff929299,
+0xfe919198,
+0xfe919198,
+0xfe909097,
+0xff908f96,
+0xef929299,
+0x49909098,
+0x00a6a59a,
+0x1ac7c9cb,
+0xc5cccfd2,
+0xffc8cbcd,
+0xfec7c9cc,
+0xfec6c9cb,
+0xfec6c8cb,
+0xfec5c8cb,
+0xfec5c7ca,
+0xfec4c7c9,
+0xfec4c6c9,
+0xfec3c6c9,
+0xfec3c5c8,
+0xfec2c5c8,
+0xfec2c4c7,
+0xfec1c4c7,
+0xfec1c3c6,
+0xfec0c3c6,
+0xfec0c2c5,
+0xfebfc2c5,
+0xfebfc1c4,
+0xfebec0c4,
+0xffbfc1c4,
+0xc5c1c3c6,
+0x24bebfc3,
+0x00b0b2bc,
+0x00cdcdcd,
+0x00cccccc,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x004080bf,
+0x004482be,
+0x001254cd,
+0x5d296ec6,
+0xf8296fc7,
+0xfe286cc2,
+0xfe286cc2,
+0xfe286cc2,
+0xfe286cc2,
+0xfe286cc2,
+0xfe286cc2,
+0xfe286cc1,
+0xfe286cc1,
+0xfe286bc1,
+0xfe286bc1,
+0xfe276bc1,
+0xfe276bc1,
+0xfe276bc0,
+0xfe276bc0,
+0xfe276bc0,
+0xfe276ac0,
+0xfe276ac0,
+0xfe266abf,
+0xfe266abf,
+0xfe266abf,
+0xfe266abf,
+0xfe266abe,
+0xfe2669be,
+0xfe2669be,
+0xfe2569be,
+0xfe2569bd,
+0xfe2569bd,
+0xfe2569bd,
+0xfe2568bd,
+0xfe2568bd,
+0xfe2468bc,
+0xfe2468bc,
+0xfe2468bc,
+0xfe2468bc,
+0xfe2467bc,
+0xfe2367bc,
+0xfe2367bc,
+0xfe2367bb,
+0xfe2367bb,
+0xfe2367bb,
+0xfe2366ba,
+0xfe2266b9,
+0xfe2266b9,
+0xfd2267bb,
+0xa42267bb,
+0x132164b7,
+0x001ba5aa,
+0x0287888b,
+0x7894949b,
+0xfa93939a,
+0xfe909097,
+0xfe909097,
+0xfe909097,
+0xfe8f8f96,
+0xfe909097,
+0x8d919098,
+0x058e8e93,
+0x4acbcecf,
+0xeccbced0,
+0xffc7c9cc,
+0xfec6c9cb,
+0xfec6c8cb,
+0xfec5c8cb,
+0xfec5c8ca,
+0xfec4c7c9,
+0xfec4c6c9,
+0xfec3c6c9,
+0xfec3c5c8,
+0xfec2c5c8,
+0xfec2c4c7,
+0xfec1c4c7,
+0xfec1c3c6,
+0xfec0c3c6,
+0xfec0c2c5,
+0xfebfc2c5,
+0xfebfc1c4,
+0xfebec0c4,
+0xffbec0c3,
+0xe7c1c3c7,
+0x45c1c3c6,
+0x00bfc3c9,
+0x00e2e2e2,
+0x00e8e8e8,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x004080bf,
+0x004482be,
+0x001053cd,
+0x5e286ec5,
+0xf8296fc7,
+0xfe286cc2,
+0xfe286cc2,
+0xfe286cc2,
+0xfe286cc2,
+0xfe286cc2,
+0xfe286cc1,
+0xfe286cc1,
+0xfe286bc1,
+0xfe286bc1,
+0xfe276bc1,
+0xfe276bc1,
+0xfe276bc0,
+0xfe276bc0,
+0xfe276bc0,
+0xfe276ac0,
+0xfe276abf,
+0xfe266abf,
+0xfe266abf,
+0xfe266abf,
+0xfe266abf,
+0xfe266abe,
+0xfe2669be,
+0xfe2669be,
+0xfe2569be,
+0xfe2569bd,
+0xfe2569bd,
+0xfe2569bd,
+0xfe2568bd,
+0xfe2568bc,
+0xfe2468bc,
+0xfe2468bc,
+0xfe2468bc,
+0xfe2468bc,
+0xfe2467bc,
+0xfe2367bc,
+0xfe2367bb,
+0xfe2367bb,
+0xfe2367bb,
+0xfe2367bb,
+0xfe2366ba,
+0xfe2266b9,
+0xfe2266b9,
+0xfe2266b9,
+0xfe2266b9,
+0xf92267bb,
+0x792268bd,
+0x03165eae,
+0x00d2c6c6,
+0x21919098,
+0xce93939a,
+0xff919198,
+0xfe908f97,
+0xfe8f8f96,
+0xfe8f8e95,
+0xff8f8f96,
+0xc4919198,
+0x198d8b94,
+0x81cacdcf,
+0xfacacdd0,
+0xfec6c9cb,
+0xfec6c8cb,
+0xfec5c8ca,
+0xfec5c8ca,
+0xfec5c7ca,
+0xfec4c6c9,
+0xfec3c6c9,
+0xfec3c5c8,
+0xfec2c5c8,
+0xfec2c4c7,
+0xfec1c4c7,
+0xfec1c3c6,
+0xfec0c2c5,
+0xfec0c2c5,
+0xfebfc2c5,
+0xfebfc1c4,
+0xfebec0c4,
+0xfebdc0c3,
+0xfcc0c2c5,
+0x88c1c3c6,
+0x05b5baba,
+0x009f9998,
+0x00b3b3b3,
+0x008e8e8e,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x004080bf,
+0x004482be,
+0x001053cc,
+0x5e286ec5,
+0xf8296fc7,
+0xfe286cc2,
+0xfe286cc2,
+0xfe286cc2,
+0xfe286cc2,
+0xfe286cc1,
+0xfe286cc1,
+0xfe286bc1,
+0xfe286bc1,
+0xfe276bc1,
+0xfe276bc0,
+0xfe276bc0,
+0xfe276bc0,
+0xfe276bc0,
+0xfe276ac0,
+0xfe276abf,
+0xfe266abf,
+0xfe266abf,
+0xfe266abf,
+0xfe266abf,
+0xfe266abe,
+0xfe2669be,
+0xfe2569be,
+0xfe2569be,
+0xfe2569bd,
+0xfe2569bd,
+0xfe2569bd,
+0xfe2568bd,
+0xfe2468bc,
+0xfe2468bc,
+0xfe2468bc,
+0xfe2468bc,
+0xfe2468bc,
+0xfe2467bc,
+0xfe2367bc,
+0xfe2367bb,
+0xfe2367bb,
+0xfe2367bb,
+0xfe2367bb,
+0xfe2366ba,
+0xfe2266b9,
+0xfe2266b9,
+0xfe2266b9,
+0xfe2266b9,
+0xfe2265b9,
+0xff2165b9,
+0xe02267bc,
+0x372166b9,
+0x002f7cbd,
+0x029c989b,
+0x7e929299,
+0xfd919198,
+0xfe8f8f96,
+0xfe8f8f96,
+0xfe8e8e95,
+0xff8e8d95,
+0xe88f8f96,
+0x408f8e96,
+0xb3cacdcf,
+0xffc7cacc,
+0xfec6c8cb,
+0xfec5c8ca,
+0xfec5c7ca,
+0xfec5c7ca,
+0xfec4c6c9,
+0xfec3c6c9,
+0xfec3c5c8,
+0xfec2c5c8,
+0xfec2c4c7,
+0xfec1c4c7,
+0xfec1c3c6,
+0xfec0c3c6,
+0xfec0c2c5,
+0xfebfc2c5,
+0xfebfc1c4,
+0xfebec1c4,
+0xfebec0c3,
+0xffbec0c3,
+0xd6c0c3c6,
+0x28bec0c3,
+0x00e2ecf7,
+0x004f5454,
+0x00989898,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x004080bf,
+0x004482be,
+0x001053cd,
+0x5e286ec5,
+0xf8296fc7,
+0xfe286cc2,
+0xfe286cc2,
+0xfe286cc2,
+0xfe286cc1,
+0xfe286cc1,
+0xfe286bc1,
+0xfe286bc1,
+0xfe276bc1,
+0xfe276bc0,
+0xfe276bc0,
+0xfe276bc0,
+0xfe276bc0,
+0xfe276ac0,
+0xfe276abf,
+0xfe266abf,
+0xfe266abf,
+0xfe266abf,
+0xfe266abf,
+0xfe266abe,
+0xfe2669be,
+0xfe2569be,
+0xfe2569be,
+0xfe2569bd,
+0xfe2569bd,
+0xfe2569bd,
+0xfe2568bd,
+0xfe2468bc,
+0xfe2468bc,
+0xfe2468bc,
+0xfe2468bc,
+0xfe2468bc,
+0xfe2467bc,
+0xfe2367bc,
+0xfe2367bb,
+0xfe2367bb,
+0xfe2367bb,
+0xfe2366bb,
+0xfe2366ba,
+0xfe2266b9,
+0xfe2266b9,
+0xfe2266b9,
+0xfe2266b9,
+0xfe2265b9,
+0xfe2165b9,
+0xfe2165b8,
+0xfe2266b9,
+0x932267ba,
+0x061d5bb3,
+0x0093958d,
+0x37909098,
+0xe7919199,
+0xff8f8e96,
+0xfe8e8e95,
+0xfe8e8d95,
+0xfe8d8d94,
+0xf4909097,
+0x68908f97,
+0xd3cdcfd1,
+0xfec7cacc,
+0xfec5c8ca,
+0xfec5c8ca,
+0xfec5c7ca,
+0xfec4c6c9,
+0xfec3c6c9,
+0xfec3c5c8,
+0xfec2c5c8,
+0xfec2c4c7,
+0xfec1c4c7,
+0xfec1c3c6,
+0xfec0c3c6,
+0xfec0c2c5,
+0xfebfc2c5,
+0xfebfc1c4,
+0xfebec0c4,
+0xfebec0c3,
+0xfebdbfc2,
+0xfebfc1c4,
+0x87c0c2c5,
+0x03b2b3b4,
+0x00c4c3c2,
+0x00bfbfbf,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x004080bf,
+0x004482be,
+0x001053cd,
+0x5d286ec5,
+0xf8296fc7,
+0xfe286cc2,
+0xfe286cc2,
+0xfe286cc1,
+0xfe286bc1,
+0xfe286bc1,
+0xfe286bc1,
+0xfe276bc1,
+0xfe276bc0,
+0xfe276bc0,
+0xfe276bc0,
+0xfe276bc0,
+0xfe276ac0,
+0xfe276abf,
+0xfe266abf,
+0xfe266abf,
+0xfe266abf,
+0xfe266abe,
+0xfe266abe,
+0xfe2669be,
+0xfe2569be,
+0xfe2569be,
+0xfe2569bd,
+0xfe2569bd,
+0xfe2569bd,
+0xfe2568bd,
+0xfe2468bc,
+0xfe2468bc,
+0xfe2468bc,
+0xfe2468bc,
+0xfe2468bc,
+0xfe2467bc,
+0xfe2367bc,
+0xfe2367bb,
+0xfe2367ba,
+0xfe2367bb,
+0xfe2366bb,
+0xfe2266ba,
+0xfe2266b9,
+0xfe2266b9,
+0xfe2266b9,
+0xfe2266b9,
+0xfe2265b9,
+0xfe2165b9,
+0xfe2165b8,
+0xfe2165b7,
+0xff2165b8,
+0xd82267bb,
+0x262164b7,
+0x0062819b,
+0x0f8c8c94,
+0xbb929299,
+0xff8f8f96,
+0xfe8e8d95,
+0xfe8d8d94,
+0xfe8c8c93,
+0xfc8e8e95,
+0x8f8d8d94,
+0xebcacccf,
+0xfec6c9cb,
+0xfec5c7ca,
+0xfec5c7ca,
+0xfec4c6c9,
+0xfec3c6c9,
+0xfec3c5c8,
+0xfec2c5c8,
+0xfec2c4c7,
+0xfec1c4c7,
+0xfec1c3c6,
+0xfec0c3c6,
+0xfec0c2c5,
+0xfebfc2c5,
+0xfebfc1c4,
+0xfebec0c4,
+0xfebec0c3,
+0xfebdbfc2,
+0xffbdbfc2,
+0xeac0c2c5,
+0x3dbec0c3,
+0x00a8adb3,
+0x00d8d8d8,
+0x00d6d6d6,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x004080bf,
+0x004482be,
+0x001053cd,
+0x5d286ec6,
+0xf8296fc7,
+0xfe286cc1,
+0xfe286cc1,
+0xfe286bc1,
+0xfe286bc1,
+0xfe276bc1,
+0xfe276bc1,
+0xfe276bc0,
+0xfe276bc0,
+0xfe276bc0,
+0xfe276bc0,
+0xfe276ac0,
+0xfe276abf,
+0xfe266abf,
+0xfe266abf,
+0xfe266abf,
+0xfe266abf,
+0xfe266abe,
+0xfe2669be,
+0xfe2569be,
+0xfe2569be,
+0xfe2569bd,
+0xfe2569bd,
+0xfe2569bd,
+0xfe2568bd,
+0xfe2468bc,
+0xfe2468bc,
+0xfe2468bc,
+0xfe2468bc,
+0xfe2467bb,
+0xfe2467bb,
+0xfe2367bb,
+0xfe2367bb,
+0xfe2367bb,
+0xfe2367ba,
+0xfe2366ba,
+0xfe2266ba,
+0xfe2266b9,
+0xfe2266b9,
+0xfe2266b9,
+0xfe2266b9,
+0xfe2265b9,
+0xfe2165b9,
+0xfe2165b8,
+0xfe2165b8,
+0xfe2165b8,
+0xfe2164b7,
+0xf72166b9,
+0x5a2166b9,
+0x004273c6,
+0x03808697,
+0x8c909097,
+0xff8e8e95,
+0xfe8d8d94,
+0xfe8d8d94,
+0xfe8c8c93,
+0xff8c8c93,
+0xad8c8c94,
+0xfcc5c8cb,
+0xfec5c8ca,
+0xfec5c7ca,
+0xfec4c7c9,
+0xfec3c6c9,
+0xfec3c5c8,
+0xfec2c5c8,
+0xfec2c4c7,
+0xfec1c4c7,
+0xfec1c3c6,
+0xfec0c3c6,
+0xfec0c2c5,
+0xfebfc2c5,
+0xfebfc1c4,
+0xfebec1c4,
+0xfebec0c3,
+0xfebdbfc2,
+0xfebdbfc2,
+0xffbdbfc3,
+0xc4bfc1c4,
+0x15bbbec0,
+0x00c3886e,
+0x00bcbcbc,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x004080bf,
+0x004482be,
+0x001053cb,
+0x5d286ec5,
+0xf8296fc6,
+0xfe286cc1,
+0xfe286bc1,
+0xfe286bc1,
+0xfe276bc1,
+0xfe276bc1,
+0xfe276bc0,
+0xfe276bc0,
+0xfe276bc0,
+0xfe276bc0,
+0xfe276ac0,
+0xfe276abf,
+0xfe266abf,
+0xfe266abf,
+0xfe266abf,
+0xfe266abe,
+0xf7266bc0,
+0xec276cc4,
+0xec276cc4,
+0xec266cc3,
+0xec266cc3,
+0xec266cc3,
+0xec266cc3,
+0xec266bc2,
+0xec256bc2,
+0xec256bc2,
+0xec256bc2,
+0xef256bc1,
+0xfb2569be,
+0xff2468bd,
+0xfe2367bb,
+0xfe2367bb,
+0xfe2367bb,
+0xfe2367bb,
+0xfe2366ba,
+0xfe2266b9,
+0xfe2266b9,
+0xfe2266b9,
+0xfe2266b9,
+0xfe2265b9,
+0xfe2265b9,
+0xfe2165b9,
+0xfe2165b8,
+0xfe2165b8,
+0xfe2165b8,
+0xfe2164b7,
+0xfe2064b6,
+0xfe2066b9,
+0x892166b9,
+0x02176aa3,
+0x00aca5a5,
+0x628f8f96,
+0xf8909097,
+0xfe8c8c93,
+0xfe8d8c93,
+0xfe8c8b93,
+0xff8c8b93,
+0xbb8e8e96,
+0xfec5c7ca,
+0xfec5c7ca,
+0xfec4c7c9,
+0xfec3c6c9,
+0xfec3c5c8,
+0xfec2c5c8,
+0xfec2c4c7,
+0xfec1c4c7,
+0xfec1c3c6,
+0xfec0c3c6,
+0xfec0c2c5,
+0xfebfc2c5,
+0xfebfc1c4,
+0xfebec0c4,
+0xfebec0c3,
+0xfebdbfc2,
+0xfebdbfc2,
+0xfebcbec1,
+0xffbdbfc3,
+0x98c0c2c5,
+0x03b1b2b3,
+0x00b7b6b6,
+0x00b7b7b7,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x004080bf,
+0x004482be,
+0x001053c8,
+0x5d286ec4,
+0xf8296ec6,
+0xfe286bc1,
+0xfe286bc1,
+0xfe276bc1,
+0xfe276bc1,
+0xfe276bc0,
+0xfe276bc0,
+0xfe276bc0,
+0xfe276bc0,
+0xfe276ac0,
+0xfe266abf,
+0xfe266abf,
+0xfe266abf,
+0xfe266abf,
+0xfe266abe,
+0xff266abf,
+0xb1276bc2,
+0x40266ac0,
+0x3d2669c0,
+0x3d2669c0,
+0x3d2669c0,
+0x3d266abf,
+0x3e2569be,
+0x3e2568be,
+0x3e2568bd,
+0x3e2568bd,
+0x3d2568be,
+0x432569bd,
+0x672569bd,
+0xb52469bf,
+0xf72368bc,
+0xff2367ba,
+0xfe2367ba,
+0xfe2366ba,
+0xfe2266b9,
+0xfe2266b9,
+0xfe2266b9,
+0xfe2266b9,
+0xfe2265b8,
+0xfe2165b9,
+0xfe2165b9,
+0xfe2165b8,
+0xfe2165b8,
+0xfe2165b8,
+0xfe2164b7,
+0xfe2064b6,
+0xfe2064b6,
+0xff2065b7,
+0xae2065b7,
+0x0c1d64b7,
+0x008c878b,
+0x47909098,
+0xef919098,
+0xff8c8c93,
+0xfe8c8c93,
+0xfe8c8b93,
+0xff8c8b93,
+0xc08f8f96,
+0xfec4c7c9,
+0xfec4c7c9,
+0xfec3c6c9,
+0xfec3c5c8,
+0xfec2c5c8,
+0xfec2c4c7,
+0xfec1c4c7,
+0xfec1c3c6,
+0xfec0c3c6,
+0xfec0c2c5,
+0xfebfc2c5,
+0xfebfc1c4,
+0xfebec1c4,
+0xfebec0c3,
+0xfebdbfc3,
+0xfebdbfc2,
+0xfebcbec1,
+0xfebbbdc1,
+0xffbcbec2,
+0x7abdbfc3,
+0x01a7a5a0,
+0x00bdbcbb,
+0x00bcbcbc,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x004080bf,
+0x004482be,
+0x001052c8,
+0x5d286ec4,
+0xf8296ec6,
+0xfe286bc1,
+0xfe276bc1,
+0xfe276bc1,
+0xfe276bc0,
+0xfe276bc0,
+0xfe276bc0,
+0xfe276bc0,
+0xfe276ac0,
+0xfe266abf,
+0xfe266abf,
+0xfe266abf,
+0xfe266abf,
+0xfe266abe,
+0xfe2669be,
+0xff266abf,
+0x9a266cc3,
+0x042268b8,
+0x002760ba,
+0x0000fdff,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x000076ae,
+0x003760c3,
+0x122268bc,
+0x8b2469be,
+0xfa2368bc,
+0xfe2366b9,
+0xfe2266b9,
+0xfe2266b9,
+0xfe2266b9,
+0xfe2266b9,
+0xfe2265b9,
+0xfe2165b9,
+0xfe2165b9,
+0xfe2165b8,
+0xfe2165b8,
+0xfe2165b8,
+0xfe2164b7,
+0xfe2064b7,
+0xfe2064b6,
+0xfe2064b6,
+0xff2064b6,
+0xbf2166ba,
+0x131f63b5,
+0x005b7094,
+0x388f8f96,
+0xea8f8e96,
+0xff8b8b92,
+0xfe8b8b92,
+0xfe8b8a92,
+0xff8b8a92,
+0xbd8e8d95,
+0xf2c6c9cc,
+0xfec4c7c9,
+0xfec3c5c8,
+0xfec2c5c8,
+0xfec2c4c7,
+0xfec1c4c7,
+0xfec1c3c6,
+0xfec0c3c6,
+0xfec0c2c5,
+0xfebfc2c5,
+0xfebfc1c4,
+0xfebec1c4,
+0xfebec0c3,
+0xfebdbfc2,
+0xfebdbfc2,
+0xfebcbec1,
+0xfebcbec1,
+0xfebbbdc0,
+0xfdbcbec1,
+0x69babdc0,
+0x008f9196,
+0x00dad9db,
+0x00d4d4d6,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x004080bf,
+0x004482be,
+0x001050c8,
+0x5d286dc4,
+0xf8296ec6,
+0xfe276bc1,
+0xfe276bc1,
+0xfe276bc0,
+0xfe276bc0,
+0xfe276bc0,
+0xfe276ac0,
+0xfe276abf,
+0xfe266abf,
+0xfe266abf,
+0xfe266abf,
+0xfe266abf,
+0xfe266abe,
+0xfe2669be,
+0xfe2569be,
+0xff256abf,
+0x9b266cc2,
+0x061c63b1,
+0x00fad5ff,
+0x000053a9,
+0x000055aa,
+0x000055aa,
+0x000055aa,
+0x000055aa,
+0x000055aa,
+0x000055aa,
+0x000055aa,
+0x000058a5,
+0x00053bd4,
+0x00234d94,
+0x1a2267bb,
+0xc82367bc,
+0xff2266ba,
+0xfe2266b9,
+0xfe2266b9,
+0xfe2266b9,
+0xfe2265b8,
+0xfe2165b9,
+0xfe2165b8,
+0xfe2165b8,
+0xfe2165b8,
+0xfe2164b8,
+0xfe2064b7,
+0xfe2064b6,
+0xfe2064b6,
+0xfe2064b6,
+0xfe2064b6,
+0xff2064b6,
+0xc72066bb,
+0x162062b5,
+0x005c7cbc,
+0x318d8c94,
+0xe78d8c94,
+0xff8b8b92,
+0xfe8b8a92,
+0xfe8b8a91,
+0xff8a8a91,
+0xb38b8b92,
+0xdbc9cccf,
+0xfec4c7ca,
+0xfec2c5c8,
+0xfec2c4c7,
+0xfec1c4c7,
+0xfec1c3c6,
+0xfec0c3c6,
+0xfec0c2c5,
+0xfebfc2c5,
+0xfebfc1c4,
+0xfebec1c4,
+0xfebec0c3,
+0xfebdbfc3,
+0xfebdbfc2,
+0xfebcbec1,
+0xfebcbec1,
+0xfebbbdc0,
+0xfebbbcc0,
+0xfdbbbdc1,
+0x66babbbf,
+0x00c2cc9b,
+0x00b2b2db,
+0x00b3b3d6,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x004080bf,
+0x004482be,
+0x000e50c8,
+0x5d286dc4,
+0xf8286ec6,
+0xfe276bc0,
+0xfe276bc0,
+0xfe276bc0,
+0xfe276bc0,
+0xfe276ac0,
+0xfe276abf,
+0xfe266abf,
+0xfe266abf,
+0xfe266abf,
+0xfe266abf,
+0xfe266abe,
+0xfe2669be,
+0xfe2569be,
+0xfe2569bd,
+0xff256abe,
+0x9b266cc2,
+0x061a62b2,
+0x005a87d8,
+0x000055aa,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x000640c6,
+0x00043dc4,
+0x01001f66,
+0x8c2368bd,
+0xff2367bc,
+0xfe2266b9,
+0xfe2266b9,
+0xfe2265b9,
+0xfe2165b9,
+0xfe2165b8,
+0xfe2165b8,
+0xfe2165b8,
+0xfe2164b7,
+0xfe2064b7,
+0xfe2064b6,
+0xfe2064b6,
+0xfe2064b6,
+0xfe2064b6,
+0xfe2063b6,
+0xff1f64b6,
+0xc82066bb,
+0x161f63b4,
+0x007485c8,
+0x308b8b92,
+0xe68c8b93,
+0xff8b8a91,
+0xfe8b8a91,
+0xfe8a8991,
+0xfe8b8a92,
+0x9b8a8991,
+0xbfc8cacd,
+0xffc4c6c9,
+0xfec2c4c7,
+0xfec1c4c7,
+0xfec1c3c6,
+0xfec0c3c6,
+0xfec0c2c5,
+0xfebfc2c5,
+0xfebfc1c4,
+0xfebec1c4,
+0xfebec0c3,
+0xfebdbfc2,
+0xfebdbfc2,
+0xfebcbec1,
+0xfebcbec1,
+0xfebbbdc0,
+0xfebbbcc0,
+0xfebabbbf,
+0xffbabcc0,
+0x74bbbcc0,
+0x00c9bab5,
+0x00c1c1c3,
+0x00c0c0c2,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x004080bf,
+0x004482be,
+0x000d50c7,
+0x5d276dc3,
+0xf8286ec5,
+0xfe276bc0,
+0xfe276bc0,
+0xfe276bc0,
+0xfe276ac0,
+0xfe276abf,
+0xfe266abf,
+0xfe266abf,
+0xfe266abf,
+0xfe266abe,
+0xfe2669be,
+0xfe2669be,
+0xfe2569be,
+0xfe2569be,
+0xfe2569bd,
+0xff256abe,
+0x9b266cc2,
+0x061a61b3,
+0x005986d9,
+0x000055aa,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00001224,
+0x00ffffff,
+0x752268be,
+0xfe2267bb,
+0xfe2266b9,
+0xfe2265b9,
+0xfe2165b8,
+0xfe2165b8,
+0xfe2165b8,
+0xfe2165b8,
+0xfe2164b7,
+0xfe2064b7,
+0xfe2064b6,
+0xfe2064b6,
+0xfe2064b6,
+0xfe2064b6,
+0xfe1f63b6,
+0xfe1f63b6,
+0xff1f63b5,
+0xc22066b9,
+0x131f63b4,
+0x00507097,
+0x358c8c94,
+0xe98c8c94,
+0xff8a8a91,
+0xfe8a8a91,
+0xfe898990,
+0xf78c8c93,
+0x758b8b92,
+0x93c4c7ca,
+0xfdc5c7ca,
+0xfec1c4c7,
+0xfec1c3c6,
+0xfec0c3c6,
+0xfec0c2c5,
+0xfebfc2c5,
+0xfebfc1c4,
+0xfebec1c4,
+0xfebec0c3,
+0xfebdbfc2,
+0xfebdbfc2,
+0xfebcbec1,
+0xfebcbec1,
+0xfebbbdc0,
+0xfebbbcc0,
+0xfebabcbf,
+0xfeb9bbbe,
+0xffbabcc0,
+0x8ebdbec3,
+0x02b4b4b8,
+0x00ffffff,
+0x00fbf1f1,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x004080bf,
+0x004482be,
+0x000d50c5,
+0x5d276dc3,
+0xf8286ec5,
+0xfe276bc0,
+0xfe276bc0,
+0xfe276ac0,
+0xfe276abf,
+0xfe266abf,
+0xfe266abf,
+0xfe266abf,
+0xfe266abf,
+0xfe2669be,
+0xfe2669be,
+0xfe2569be,
+0xfe2569be,
+0xfe2569bd,
+0xfe2569bd,
+0xff256abe,
+0x9b266bc2,
+0x061a62b3,
+0x005986d9,
+0x000055aa,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000041,
+0x00000e55,
+0x00d7ffff,
+0x7d2368bd,
+0xfe2267bb,
+0xfe2265b8,
+0xfe2165b9,
+0xfe2165b8,
+0xfe2165b8,
+0xfe2165b8,
+0xfe2164b7,
+0xfe2064b6,
+0xfe2064b6,
+0xfe2064b6,
+0xfe2064b6,
+0xfe2063b6,
+0xfe1f63b6,
+0xfe1f63b6,
+0xfe1f63b4,
+0xff1f64b5,
+0xb31f64b6,
+0x0d1e65b4,
+0x007a7888,
+0x428e8e95,
+0xed8e8d95,
+0xff8a8991,
+0xfe8a8990,
+0xff898890,
+0xee8b8b92,
+0x4e8a8a92,
+0x5bc7c8cb,
+0xf2c6c8cb,
+0xffc1c3c6,
+0xfec0c3c6,
+0xfec0c2c5,
+0xfebfc2c5,
+0xfebfc1c4,
+0xfebec1c4,
+0xfebec0c3,
+0xfebdbfc2,
+0xfebdbfc2,
+0xfebcbec1,
+0xfebcbec1,
+0xfebbbdc0,
+0xfebabcbf,
+0xfebabcbf,
+0xfeb9bbbf,
+0xfeb9babe,
+0xffbabcbf,
+0xb7babcc0,
+0x0db4b6bb,
+0x008fd3c7,
+0x00aac1c1,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x004080bf,
+0x004482be,
+0x000d50c5,
+0x5d276dc3,
+0xf8286ec5,
+0xfe276bc0,
+0xfe276ac0,
+0xfe276abf,
+0xfe266abf,
+0xfe266abf,
+0xfe266abf,
+0xfe266abe,
+0xfe2669be,
+0xfe2669be,
+0xfe2569be,
+0xfe2569be,
+0xfe2569bd,
+0xfe2569bd,
+0xfe2568bd,
+0xff2569be,
+0x9b256bc1,
+0x061b62b4,
+0x005986d9,
+0x000055aa,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x001874ea,
+0x000891ff,
+0x092264b9,
+0xa92367bb,
+0xff2266ba,
+0xfe2165b8,
+0xfe2165b8,
+0xfe2165b8,
+0xfe2165b8,
+0xfe2164b7,
+0xfe2064b6,
+0xfe2064b6,
+0xfe2064b6,
+0xfe2064b6,
+0xfe2063b6,
+0xfe1f63b6,
+0xfe1f63b5,
+0xfe1f63b5,
+0xfe1f63b4,
+0xff1f64b7,
+0x932064b6,
+0x041a62a7,
+0x00a88f9d,
+0x588d8c94,
+0xf58d8d95,
+0xfe898990,
+0xfe898990,
+0xff898990,
+0xd28b8a92,
+0x2487858e,
+0x28c2c4c6,
+0xd6c5c7ca,
+0xffc1c4c7,
+0xfec0c2c5,
+0xfebfc2c5,
+0xfebfc1c4,
+0xfebec0c4,
+0xfebec0c3,
+0xfebdbfc3,
+0xfebdbfc2,
+0xfebcbec1,
+0xfebcbec1,
+0xfebbbdc0,
+0xfebbbcc0,
+0xfebabcbf,
+0xfeb9bbbf,
+0xfeb9bbbe,
+0xfeb8babd,
+0xffb8b9bd,
+0xe1bbbcc0,
+0x2fb7b9bc,
+0x00c7bbc2,
+0x0085efef,
+0x00aaaaaa,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x004080bf,
+0x004482be,
+0x000d50c5,
+0x5d276dc3,
+0xf8286dc5,
+0xfe276abf,
+0xfe266abf,
+0xfe266abf,
+0xfe266abf,
+0xfe266abf,
+0xfe266abe,
+0xfe2669be,
+0xfe2669be,
+0xfe2569be,
+0xfe2569bd,
+0xfe2569bd,
+0xfe2569bd,
+0xfe2568bd,
+0xfe2568bc,
+0xff2469bd,
+0x9b256bc1,
+0x061b60b3,
+0x000000c3,
+0x000059a3,
+0x000054a9,
+0x000054a9,
+0x000054a9,
+0x000054a9,
+0x000054a9,
+0x000053a8,
+0x000054c1,
+0x000051c4,
+0x00008bb8,
+0x002264bc,
+0x472266bb,
+0xe82266bb,
+0xff2165b8,
+0xfe2165b8,
+0xfe2165b8,
+0xfe2165b8,
+0xfe2164b7,
+0xfe2064b6,
+0xfe2064b6,
+0xfe2064b6,
+0xfe2064b6,
+0xfe2063b6,
+0xfe1f63b6,
+0xfe1f63b5,
+0xfe1f63b4,
+0xfe1f63b4,
+0xfe1f63b4,
+0xfa1f64b7,
+0x681f64b7,
+0x002f7acb,
+0x017f8a8c,
+0x7f8b8b92,
+0xff8b8a92,
+0xfe898890,
+0xfe89888f,
+0xff898990,
+0xa28b8a92,
+0x0a86858c,
+0x09b9bcc2,
+0x9dc4c7ca,
+0xffc2c4c7,
+0xfebfc1c5,
+0xfebfc1c4,
+0xfebec1c4,
+0xfebec0c3,
+0xfebdbfc3,
+0xfebdbfc2,
+0xfebcbec1,
+0xfebcbec1,
+0xfebcbdc0,
+0xfebbbcc0,
+0xfebabcbf,
+0xfeb9bcbf,
+0xfeb9bbbe,
+0xfeb8babd,
+0xfeb8b9bd,
+0xfeb7b9bc,
+0xfbb9bbbe,
+0x70b8babe,
+0x015c5d58,
+0x00949494,
+0x008d8d8d,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x004080bf,
+0x004483be,
+0x000d53c5,
+0x5d286cc3,
+0xf8286dc4,
+0xfe266abf,
+0xfe266abf,
+0xfe266abf,
+0xfe266abf,
+0xfe266abe,
+0xfe2669be,
+0xfe2569be,
+0xfe2569be,
+0xfe2569bd,
+0xfe2569bd,
+0xfe2569bd,
+0xfe2568bd,
+0xfe2468bc,
+0xfe2468bc,
+0xff2469bd,
+0x9a256bc1,
+0x05215fb0,
+0x002677cd,
+0x001c3788,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x000a5563,
+0x005f8dff,
+0x0a2164b6,
+0x4b2266ba,
+0xd02267bb,
+0xff2165b9,
+0xfe2165b7,
+0xfe2165b8,
+0xfe2165b8,
+0xfe2164b7,
+0xfe2064b6,
+0xfe2064b6,
+0xfe2064b6,
+0xfe2064b6,
+0xfe2063b6,
+0xfe1f63b6,
+0xfe1f63b5,
+0xfe1f63b4,
+0xfe1f63b4,
+0xfe1f63b4,
+0xff1e62b4,
+0xe51e64b7,
+0x351e63b4,
+0x003f5592,
+0x0a86868c,
+0xad8d8c94,
+0xff8a8991,
+0xfe89888f,
+0xfe88878f,
+0xf78a8a91,
+0x5f898990,
+0x0089899a,
+0x00c8cdc3,
+0x52c3c5c8,
+0xf2c3c6c9,
+0xfebfc1c4,
+0xfebec1c4,
+0xfebec0c3,
+0xfebdbfc2,
+0xfebdbfc2,
+0xfebcbec1,
+0xfebcbec1,
+0xfebbbdc0,
+0xfebbbcc0,
+0xfebabcbf,
+0xfeb9bcbf,
+0xfeb9bbbe,
+0xfeb8babd,
+0xfeb8b9bd,
+0xfeb7b9bc,
+0xfeb6b8bc,
+0xffb7b9bc,
+0xc2b9bbbf,
+0x18b4b5b9,
+0x009b7cc0,
+0x006c6262,
+0x00e6f3f3,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x004080bf,
+0x004485be,
+0x000c5bc3,
+0x5d276bc2,
+0xf8276dc4,
+0xfe266abf,
+0xfe266abf,
+0xfe266abf,
+0xfe266abe,
+0xfe2669be,
+0xfe2569be,
+0xfe2569be,
+0xfe2569bd,
+0xfe2569bd,
+0xfe2569bd,
+0xfe2568bd,
+0xfe2468bc,
+0xfe2468bc,
+0xfe2468bc,
+0xff2468bc,
+0xc22469be,
+0x6a2366bb,
+0x692367bb,
+0x692366ba,
+0x692366ba,
+0x692366ba,
+0x692366b9,
+0x692265b9,
+0x692266b9,
+0x692266ba,
+0x6a2267ba,
+0x792368bd,
+0xad2367bc,
+0xeb2267bb,
+0xff2165b8,
+0xfe2165b7,
+0xfe2165b7,
+0xfe2164b8,
+0xfe2064b7,
+0xfe2064b6,
+0xfe2064b6,
+0xfe2064b6,
+0xfe2064b6,
+0xfe2063b6,
+0xfe1f63b6,
+0xfe1f63b5,
+0xfe1f63b4,
+0xfe1f63b4,
+0xfe1f62b4,
+0xfe1e62b3,
+0xff1e63b4,
+0xb01e64b7,
+0x0d1a63b2,
+0x007a849e,
+0x298b8991,
+0xdc8b8a92,
+0xff898990,
+0xfe89888f,
+0xff88888f,
+0xd28a8991,
+0x2288878d,
+0x007d7b90,
+0x00838c96,
+0x16bec1c3,
+0xbfc3c5c8,
+0xffc0c2c5,
+0xfebec0c3,
+0xfebdbfc2,
+0xfebdbfc2,
+0xfebcbec1,
+0xfebcbec1,
+0xfebbbdc0,
+0xfebbbcc0,
+0xfebabcbf,
+0xfeb9bbbf,
+0xfeb9bbbe,
+0xfeb8babd,
+0xfeb8b9bd,
+0xfeb7b9bc,
+0xfeb6b8bc,
+0xfeb6b7bb,
+0xfeb5b7bb,
+0xf7b7b9bd,
+0x68b6b9bc,
+0x00ff0000,
+0x00aab5b5,
+0x00aaabaa,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x004080bf,
+0x004485be,
+0x000a5cc2,
+0x5e276bc2,
+0xf8276dc4,
+0xfe266abf,
+0xfe266abf,
+0xfe266abe,
+0xfe2669be,
+0xfe2569be,
+0xfe2569be,
+0xfe2569bd,
+0xfe2569bd,
+0xfe2569bd,
+0xfe2568bd,
+0xfe2468bc,
+0xfe2468bc,
+0xfe2468bc,
+0xfe2468bc,
+0xfe2468bc,
+0xfe2467bb,
+0xfe2367bc,
+0xfe2367bb,
+0xfe2367bb,
+0xfe2367bb,
+0xfe2367bb,
+0xfe2366ba,
+0xfe2266ba,
+0xfe2266ba,
+0xfe2266ba,
+0xfe2266b9,
+0xff2266ba,
+0xff2266ba,
+0xfe2165b8,
+0xfe2165b7,
+0xfe2165b7,
+0xfe2164b7,
+0xfe2064b7,
+0xfe2064b6,
+0xfe2064b6,
+0xfe2064b6,
+0xfe2064b6,
+0xfe2063b6,
+0xfe1f63b6,
+0xfe1f63b5,
+0xfe1f63b4,
+0xfe1f63b4,
+0xfe1f62b4,
+0xfe1e62b4,
+0xfe1e62b3,
+0xf31e64b6,
+0x581e63b6,
+0x00386ac6,
+0x00c3b3ad,
+0x678a8992,
+0xf98a8a92,
+0xfe88888f,
+0xfe88878f,
+0xfd898890,
+0x85898891,
+0x03838186,
+0x00655b91,
+0x007c7c79,
+0x00ffffff,
+0x63c0c3c6,
+0xf6c1c3c6,
+0xfebdbfc3,
+0xfebdbfc2,
+0xfebcbec1,
+0xfebcbec1,
+0xfebbbdc0,
+0xfebbbcc0,
+0xfebabcbf,
+0xfeb9bbbf,
+0xfeb9bbbe,
+0xfeb8babd,
+0xfeb8b9bd,
+0xfeb7b9bc,
+0xfeb6b8bc,
+0xfeb6b7bc,
+0xfeb5b7bb,
+0xfeb4b6ba,
+0xffb4b6ba,
+0xd2b7b8bd,
+0x2ab3b4b9,
+0x00b8bcc5,
+0x00b7b7b7,
+0x00bfbfbf,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x004080bf,
+0x004485be,
+0x000a5bc2,
+0x5e276bc2,
+0xf8276dc4,
+0xfe266abe,
+0xfe266abe,
+0xfe2669be,
+0xfe2569be,
+0xfe2569be,
+0xfe2569bd,
+0xfe2569bd,
+0xfe2569bd,
+0xfe2568bd,
+0xfe2468bc,
+0xfe2468bc,
+0xfe2468bc,
+0xfe2468bc,
+0xfe2467bc,
+0xfe2467bc,
+0xfe2367bb,
+0xfe2367bb,
+0xfe2367bb,
+0xfe2367bb,
+0xfe2366ba,
+0xfe2266ba,
+0xfe2266b9,
+0xfe2266b9,
+0xfe2266b9,
+0xfe2266b8,
+0xfe2265b8,
+0xfe2165b8,
+0xfe2165b8,
+0xfe2165b7,
+0xfe2165b8,
+0xfe2164b8,
+0xfe2064b7,
+0xfe2064b6,
+0xfe2064b6,
+0xfe2064b6,
+0xfe2063b6,
+0xfe1f63b6,
+0xfe1f63b5,
+0xfe1f63b5,
+0xfe1f63b4,
+0xfe1f63b4,
+0xfe1f62b4,
+0xfe1e62b4,
+0xfe1e62b3,
+0xff1e63b5,
+0xad1f64b7,
+0x101e61b4,
+0x00425a8b,
+0x1288888f,
+0xb98b8a92,
+0xff898890,
+0xfe88888f,
+0xff88878f,
+0xdb8a8991,
+0x2f888790,
+0x009c99a9,
+0x007c7c7c,
+0x00d7d7d5,
+0x00a3a8af,
+0x15bdbfc2,
+0xbac1c3c6,
+0xffbec0c3,
+0xfebcbec1,
+0xfebcbec1,
+0xfebcbdc0,
+0xfebbbcc0,
+0xfebabcbf,
+0xfebabcbf,
+0xfeb9bbbe,
+0xfeb8babd,
+0xfeb8b9bd,
+0xfeb7b9bc,
+0xfeb6b8bc,
+0xfeb6b8bc,
+0xfeb5b7bb,
+0xfeb4b6ba,
+0xfeb4b5b9,
+0xfeb3b5b9,
+0xfeb4b6ba,
+0xa0b6b8bc,
+0x0eb1b3b7,
+0x00a2a7b9,
+0x0089898e,
+0x00010101,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x004080bf,
+0x004485be,
+0x000a5bc2,
+0x5e276bc2,
+0xf8276dc3,
+0xfe266abe,
+0xfe2669be,
+0xfe2569be,
+0xfe2569be,
+0xfe2569bd,
+0xfe2569bd,
+0xfe2569bd,
+0xfe2568bd,
+0xfe2468bc,
+0xfe2468bc,
+0xfe2468bc,
+0xfe2468bc,
+0xfe2467bc,
+0xfe2467bc,
+0xfe2367bc,
+0xfe2367bb,
+0xfe2367bb,
+0xfe2367bb,
+0xfe2366bb,
+0xfe2266ba,
+0xfe2266b9,
+0xfe2266b9,
+0xfe2266b9,
+0xfe2266b9,
+0xfe2265b9,
+0xfe2165b9,
+0xfe2165b8,
+0xfe2165b8,
+0xfe2165b8,
+0xfe2164b7,
+0xfe2064b6,
+0xfe2064b6,
+0xfe2064b6,
+0xfe2064b6,
+0xfe2063b6,
+0xfe1f63b6,
+0xfe1f63b6,
+0xfe1f63b5,
+0xfe1f63b4,
+0xfe1f63b4,
+0xfe1f62b4,
+0xfe1e62b4,
+0xfe1e62b3,
+0xff1e62b4,
+0xdc1f64b6,
+0x381f64b5,
+0x00037cc1,
+0x00f2c7c1,
+0x5a898990,
+0xf38a8a91,
+0xff88878f,
+0xfe87878e,
+0xfc898890,
+0x7f898991,
+0x0386868d,
+0x00ffffff,
+0x00858585,
+0x00bfbfbf,
+0x00c7bebf,
+0x00c8c6d0,
+0x4cc0c2c4,
+0xebc0c2c5,
+0xffbcbec1,
+0xfebbbdc0,
+0xfebbbcc0,
+0xfebabcbf,
+0xfeb9bbbf,
+0xfeb9bbbe,
+0xfeb8babd,
+0xfeb8b9bd,
+0xfeb7b9bc,
+0xfeb6b8bc,
+0xfeb6b7bc,
+0xfeb5b7bb,
+0xfeb4b6ba,
+0xfeb4b5ba,
+0xfeb3b5b9,
+0xfeb2b4b8,
+0xffb1b3b7,
+0xf8b3b5b9,
+0x7fb2b4b8,
+0x07aeaeb1,
+0x00576eaf,
+0x00b1bfd1,
+0x003f3f3f,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x004080bf,
+0x004484be,
+0x000a57c1,
+0x5e276bc1,
+0xf8276cc3,
+0xfe2669be,
+0xfe2569be,
+0xfe2569be,
+0xfe2569bd,
+0xfe2569bd,
+0xfe2568bd,
+0xfe2568bd,
+0xfe2468bc,
+0xfe2468bc,
+0xfe2468bc,
+0xfe2468bc,
+0xfe2467bc,
+0xfe2367bc,
+0xfe2367bb,
+0xfe2367bb,
+0xfe2367bb,
+0xfe2367bb,
+0xfe2366ba,
+0xfe2266b9,
+0xfe2266b9,
+0xfe2266b9,
+0xfe2266b9,
+0xfe2265b9,
+0xfe2165b9,
+0xfe2165b9,
+0xfe2165b8,
+0xfe2165b8,
+0xfe2165b8,
+0xfe2164b7,
+0xfe2064b6,
+0xfe2064b6,
+0xfe2064b6,
+0xfe2064b6,
+0xfe2063b5,
+0xfe1f63b6,
+0xfe1f63b5,
+0xfe1f63b4,
+0xfe1f63b4,
+0xfe1f63b4,
+0xfe1f62b4,
+0xfe1e62b4,
+0xfe1e62b3,
+0xff1e62b4,
+0xe91f64b6,
+0x5a1e63b4,
+0x01145695,
+0x00fdcdfb,
+0x1d89888f,
+0xc38b8a92,
+0xff88888f,
+0xfe87878e,
+0xff88878f,
+0xc7898991,
+0x1f888890,
+0x00b6b794,
+0x00000000,
+0x00111111,
+0x00000000,
+0x00dad8d8,
+0x006e7581,
+0x07bdbec1,
+0x8dbfc1c5,
+0xfcbebfc3,
+0xfebabcc0,
+0xfebabcbf,
+0xfeb9bcbf,
+0xfeb9bbbe,
+0xfeb8babd,
+0xfeb8b9bd,
+0xfeb7b9bc,
+0xfeb6b8bc,
+0xfeb6b8bc,
+0xfeb5b7bb,
+0xfeb4b6ba,
+0xfeb4b5b9,
+0xfeb3b5b9,
+0xfeb3b4b8,
+0xfeb2b3b8,
+0xfeb1b3b7,
+0xffb1b2b7,
+0xf1b2b4b8,
+0x6eb1b2b7,
+0x06adb0b5,
+0x00ffff23,
+0x00a2a2c4,
+0x00aaaaaa,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x004080bf,
+0x004484be,
+0x000a57c2,
+0x5e276bc2,
+0xf8276cc3,
+0xfe2569be,
+0xfe2569be,
+0xfe2569bd,
+0xfe2569bd,
+0xfe2568bd,
+0xfe2568bc,
+0xfe2468bc,
+0xfe2468bc,
+0xfe2468bc,
+0xfe2468bc,
+0xfe2467bc,
+0xfe2367bc,
+0xfe2367bb,
+0xfe2367bb,
+0xfe2367bb,
+0xfe2367bb,
+0xfe2366ba,
+0xfe2266ba,
+0xfe2266b9,
+0xfe2266b9,
+0xfe2266b9,
+0xfe2265b9,
+0xfe2165b9,
+0xfe2165b9,
+0xfe2165b8,
+0xfe2165b8,
+0xfe2165b8,
+0xfe2164b7,
+0xfe2064b6,
+0xfe2064b6,
+0xfe2064b6,
+0xfe2064b6,
+0xfe2063b6,
+0xfe1f63b6,
+0xfe1f63b5,
+0xfe1f63b4,
+0xfe1f63b4,
+0xfe1f63b4,
+0xfe1e62b4,
+0xfe1e62b4,
+0xfe1e62b4,
+0xff1e63b5,
+0xe41f64b5,
+0x5f1f64b5,
+0x031c60b1,
+0x000000c1,
+0x0884848b,
+0x8b8a8991,
+0xfc898990,
+0xfe87878e,
+0xff87878e,
+0xec898990,
+0x5288888f,
+0x00aba9b2,
+0x0078777b,
+0x007f7f81,
+0x00000000,
+0x00000000,
+0x00f2f2f2,
+0x00ffffff,
+0x00bcc1c6,
+0x1cbcbfc2,
+0xbcbfc1c5,
+0xffbcbec1,
+0xfeb9bbbe,
+0xfeb9bbbe,
+0xfeb8babd,
+0xfeb8b9bd,
+0xfeb7b9bc,
+0xfeb6b8bc,
+0xfeb6b8bb,
+0xfeb5b7bb,
+0xfeb4b6ba,
+0xfeb4b6b9,
+0xfeb3b5b9,
+0xfeb3b4b8,
+0xfeb2b3b8,
+0xfeb1b3b7,
+0xfeb1b2b6,
+0xfeb0b1b6,
+0xfeb0b1b6,
+0xedb1b3b7,
+0x71b0b1b5,
+0x09acabb3,
+0x005d6074,
+0x00aaaaa9,
+0x008e8e8d,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x004080bf,
+0x004485be,
+0x00085bc2,
+0x5d266bc2,
+0xf8266cc3,
+0xfe2569bd,
+0xfe2569bd,
+0xfe2569bd,
+0xfe2568bd,
+0xfe2468bc,
+0xfe2468bc,
+0xfe2468bc,
+0xfe2468bc,
+0xfe2468bc,
+0xfe2467bc,
+0xfe2367bc,
+0xfe2367bb,
+0xfe2367bb,
+0xfe2367bb,
+0xfe2367bb,
+0xfe2366ba,
+0xfe2266b9,
+0xfe2266b9,
+0xfe2266b9,
+0xfe2266b9,
+0xfe2265b9,
+0xfe2165b9,
+0xfe2165b8,
+0xfe2165b8,
+0xfe2165b8,
+0xfe2164b8,
+0xfe2064b7,
+0xfe2064b6,
+0xfe2064b6,
+0xfe2064b6,
+0xfe2064b6,
+0xfe2063b6,
+0xfe1f63b6,
+0xfe1f63b5,
+0xfe1f63b4,
+0xfe1f63b4,
+0xfe1f63b4,
+0xfe1e62b4,
+0xfe1e62b3,
+0xff1e62b3,
+0xfd1e63b5,
+0xc61f64b7,
+0x491e63b4,
+0x031b61ac,
+0x004a5e76,
+0x02808185,
+0x618b8a92,
+0xef8a8a92,
+0xff88878e,
+0xfe87868e,
+0xfb88888f,
+0x88898890,
+0x0788888d,
+0x004b43a7,
+0x00979793,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00989898,
+0x00918c8d,
+0x00f8f5ff,
+0x3cbbbcc0,
+0xdbbcbec1,
+0xffb9bbbf,
+0xfeb8babd,
+0xfeb8b9bd,
+0xfeb7b9bc,
+0xfeb6b8bc,
+0xfeb6b7bb,
+0xfeb5b7bb,
+0xfeb4b6ba,
+0xfeb4b6b9,
+0xfeb3b4b9,
+0xfeb3b4b8,
+0xfeb2b4b8,
+0xfeb1b3b7,
+0xfeb0b2b6,
+0xfeb0b1b6,
+0xfeafb1b5,
+0xfeafb0b4,
+0xffaeb0b4,
+0xf3afb0b5,
+0x85afb0b5,
+0x12acadb1,
+0x00b8bac1,
+0x00b9b8b7,
+0x00999998,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x004080bf,
+0x004485be,
+0x00085bc0,
+0x5d266bc1,
+0xf8266cc2,
+0xfe2569bd,
+0xfe2569bd,
+0xfe2568bd,
+0xfe2468bc,
+0xfe2468bc,
+0xfe2468bc,
+0xfe2468bc,
+0xfe2468bc,
+0xfe2467bc,
+0xfe2367bc,
+0xfe2367bb,
+0xfe2367bb,
+0xfe2367bb,
+0xfe2366bb,
+0xfe2366ba,
+0xfe2266b9,
+0xfe2266b9,
+0xfe2266b9,
+0xfe2266b9,
+0xfe2265b9,
+0xfe2165b9,
+0xfe2165b8,
+0xfe2165b8,
+0xfe2165b8,
+0xfe2164b8,
+0xfe2064b7,
+0xfe2064b6,
+0xfe2064b6,
+0xfe2064b6,
+0xfe2064b6,
+0xfe2063b6,
+0xfe1f63b6,
+0xfe1f63b5,
+0xfe1f63b4,
+0xfe1f63b4,
+0xfe1f62b4,
+0xfe1e62b4,
+0xff1e63b4,
+0xfd1e63b5,
+0xdf1e64b6,
+0x861f64b5,
+0x211d62b2,
+0x0085cbff,
+0x00699ecb,
+0x02807e84,
+0x538b8a92,
+0xe48a8a91,
+0xff88878e,
+0xfe87868e,
+0xfe88888f,
+0xad898991,
+0x1786848c,
+0x008f8c9f,
+0x00121212,
+0x00999999,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00e9e5e5,
+0x00ffffff,
+0x01b7bbb7,
+0x55bbbdc1,
+0xe7bcbec1,
+0xffb8babd,
+0xfeb7b9bc,
+0xfeb6b8bc,
+0xfeb6b8bc,
+0xfeb5b7bb,
+0xfeb4b6ba,
+0xfeb4b6ba,
+0xfeb3b5b9,
+0xfeb3b4b8,
+0xfeb2b3b8,
+0xfeb1b3b7,
+0xfeb1b2b6,
+0xfeb0b1b6,
+0xfeafb1b5,
+0xfeaeb0b4,
+0xfeaeafb4,
+0xfeadafb3,
+0xffacaeb2,
+0xf9aeafb4,
+0xa8afb0b5,
+0x2cabacb1,
+0x00696c70,
+0x00777674,
+0x00b8b8b7,
+0x00989795,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x004080bf,
+0x004485be,
+0x00095bbf,
+0x5d266bc1,
+0xf8266cc2,
+0xfe2569bd,
+0xfe2568bd,
+0xfe2468bc,
+0xfe2468bc,
+0xfe2468bc,
+0xfe2468bc,
+0xfe2468bc,
+0xfe2467bc,
+0xfe2367bc,
+0xfe2367bb,
+0xfe2367bb,
+0xfe2367bb,
+0xfe2366bb,
+0xfe2266ba,
+0xfe2266b9,
+0xfe2266b9,
+0xfe2266b9,
+0xfe2266b9,
+0xfe2265b9,
+0xfe2165b9,
+0xfe2165b8,
+0xfe2165b8,
+0xfe2165b8,
+0xfe2164b8,
+0xfe2064b7,
+0xfe2064b6,
+0xfe2064b6,
+0xfe2064b6,
+0xfe2064b6,
+0xfe2063b6,
+0xfe1f63b6,
+0xfe1f63b5,
+0xfe1f63b4,
+0xff1f63b5,
+0xff1f64b6,
+0xfd1f64b6,
+0xf11e64b6,
+0xcb1e64b7,
+0x831e64b6,
+0x301e62b5,
+0x041c60ae,
+0x00ff0000,
+0x00000045,
+0x05868485,
+0x5a8b8a92,
+0xe28a8991,
+0xff88878f,
+0xfe87868e,
+0xff88878f,
+0xc38a8991,
+0x27888790,
+0x008f8d9b,
+0x00808081,
+0x00808080,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00c2bbb7,
+0x00fdffff,
+0x02b4b4ba,
+0x62bcbec2,
+0xebbbbdc0,
+0xffb6b8bc,
+0xfeb5b7bb,
+0xfeb5b7bb,
+0xfeb4b6ba,
+0xfeb4b6ba,
+0xfeb3b5b9,
+0xfeb3b4b8,
+0xfeb2b4b8,
+0xfeb1b3b7,
+0xfeb1b2b6,
+0xfeb0b1b6,
+0xfeafb1b5,
+0xfeafb0b4,
+0xfeaeafb4,
+0xfeadafb3,
+0xfeacaeb3,
+0xfeacadb2,
+0xfeabacb1,
+0xfeacadb2,
+0xd2adaeb3,
+0x5facadb2,
+0x0da7a7ab,
+0x00ab9fbc,
+0x004e4d4d,
+0x00bdbdbc,
+0x00979793,
+0x00000000,
+0x00000000,
+0x004080bf,
+0x004485be,
+0x00095abf,
+0x5d266bc1,
+0xf8266cc2,
+0xfe2568bd,
+0xfe2468bc,
+0xfe2468bc,
+0xfe2468bc,
+0xfe2468bc,
+0xfe2467bc,
+0xfe2467bc,
+0xfe2367bc,
+0xfe2367bb,
+0xfe2367bb,
+0xfe2367bb,
+0xfe2366bb,
+0xfe2266ba,
+0xfe2266b9,
+0xfe2266b9,
+0xfe2266b9,
+0xfe2266b9,
+0xfe2265b9,
+0xfe2165b9,
+0xfe2165b8,
+0xfe2165b8,
+0xfe2165b8,
+0xfe2164b8,
+0xfe2064b7,
+0xfe2064b6,
+0xfe2064b6,
+0xfe2064b6,
+0xfe2063b6,
+0xfe1f63b6,
+0xfe1f63b6,
+0xfe1f63b5,
+0xfe1f63b4,
+0xff1f63b4,
+0xe61f62b5,
+0xad1f63b6,
+0x7b1f64b7,
+0x491e63b4,
+0x1b1d62b1,
+0x031e61aa,
+0x00225da0,
+0x003a7fc1,
+0x0097929c,
+0x1187848c,
+0x798b8a91,
+0xea8b8a92,
+0xff87878e,
+0xfe87868e,
+0xff88888f,
+0xcd898991,
+0x3686868f,
+0x00b0b0a2,
+0x005d5ea2,
+0x00676798,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00bfbfbf,
+0x00ffffff,
+0x00000000,
+0x04adb1b2,
+0x65bcbdc1,
+0xeab9bbbf,
+0xffb5b7bb,
+0xfeb4b6ba,
+0xfeb4b5ba,
+0xfeb3b5b9,
+0xfeb3b4b8,
+0xfeb2b3b8,
+0xfeb1b3b7,
+0xfeb1b2b6,
+0xfeb0b1b6,
+0xfeafb1b5,
+0xfeafb0b4,
+0xfeaeafb4,
+0xfeadafb3,
+0xfeacaeb3,
+0xfeacadb2,
+0xfeabacb1,
+0xfeabacb0,
+0xfeaaabaf,
+0xffa9abb0,
+0xf2abacb1,
+0xa6abacb1,
+0x3ba8a9ae,
+0x069e9ea3,
+0x00afb0b5,
+0x00777774,
+0x00aaaaa9,
+0x00ceceba,
+0x004080bf,
+0x004485be,
+0x000757bf,
+0x5d2669c1,
+0xf8266bc1,
+0xfe2468bc,
+0xfe2468bc,
+0xfe2468bc,
+0xfe2468bc,
+0xfe2467bc,
+0xfe2467bc,
+0xfe2367bc,
+0xfe2367bb,
+0xfe2367bb,
+0xfe2367bb,
+0xfe2366ba,
+0xfe2266ba,
+0xfe2266b9,
+0xfe2266b9,
+0xfe2266b9,
+0xfe2265b9,
+0xfe2165b9,
+0xfe2165b9,
+0xfe2165b8,
+0xfe2165b7,
+0xfe2165b8,
+0xfe2164b7,
+0xfe2064b6,
+0xfe2064b6,
+0xfe2064b6,
+0xfe2064b6,
+0xfe2063b6,
+0xfe1f63b6,
+0xfe1f63b6,
+0xfe1f63b5,
+0xfe1f63b4,
+0xfe1f63b4,
+0xff1f62b4,
+0xe71e63b5,
+0x9f1f65b9,
+0x541e63b5,
+0x191e62b3,
+0x00133961,
+0x00714caa,
+0x000000ff,
+0x02828387,
+0x348a8a91,
+0xa98b8a92,
+0xf88a8991,
+0xff88878e,
+0xfe87868e,
+0xfe88888f,
+0xcd898990,
+0x3b87868f,
+0x00ffffff,
+0x00000000,
+0x00363633,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x009999cc,
+0x009956c7,
+0x0000ffff,
+0x03b4b6b8,
+0x5dbabbbf,
+0xe4b7b9bd,
+0xffb5b6ba,
+0xfeb3b5b9,
+0xfeb3b4b8,
+0xfeb2b4b8,
+0xfeb1b3b7,
+0xfeb1b2b6,
+0xfeb0b1b6,
+0xfeafb1b5,
+0xfeafb0b4,
+0xfeaeafb4,
+0xfeadafb3,
+0xfeadaeb3,
+0xfeacadb2,
+0xfeabacb1,
+0xfeabacb1,
+0xfeaaabb0,
+0xfea9aaaf,
+0xfea8aaaf,
+0xfea8a9ae,
+0xffa9aaaf,
+0xe4a9aaaf,
+0x91a9aaaf,
+0x34a5a7ad,
+0x069c9fa1,
+0x00a6acb0,
+0x009b9a96,
+0x009b96b6,
+0x004782b8,
+0x000c59b7,
+0x5e2569bf,
+0xf8256bc1,
+0xfe2468bc,
+0xfe2468bc,
+0xfe2468bc,
+0xfe2467bc,
+0xfe2367bc,
+0xfe2367bc,
+0xfe2367bb,
+0xfe2367bb,
+0xfe2367bb,
+0xfe2366ba,
+0xfe2266ba,
+0xfe2266b9,
+0xfe2266b9,
+0xfe2266b9,
+0xfe2265b8,
+0xfe2165b9,
+0xfe2165b9,
+0xff2165b8,
+0xff2165b8,
+0xff2165b8,
+0xfe2164b7,
+0xfe2064b6,
+0xfe2064b6,
+0xfe2064b6,
+0xfe2064b6,
+0xfe2063b6,
+0xfe1f63b6,
+0xfe1f63b6,
+0xfe1f63b5,
+0xfe1f63b4,
+0xfe1f63b4,
+0xfe1e62b4,
+0xfe1e62b4,
+0xfe1e63b4,
+0xff1e64b6,
+0xf51f64b6,
+0xcd1e63b5,
+0x7b1e63b5,
+0x231d62b2,
+0x1f918d8e,
+0x7a8a8a91,
+0xdd8b8a92,
+0xfe898990,
+0xfe87878e,
+0xfe87868e,
+0xfe88878f,
+0xc28a8a91,
+0x3587868e,
+0x00000000,
+0x00ffffff,
+0x00dfdfd4,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x009999cc,
+0x008484d2,
+0x00f9eedd,
+0x02b3b5bb,
+0x4db5b7bb,
+0xd3b7b9bd,
+0xfeb4b6ba,
+0xfeb2b3b7,
+0xfeb1b3b7,
+0xfeb0b2b6,
+0xfeb0b1b6,
+0xfeafb1b5,
+0xfeafb0b4,
+0xfeaeafb4,
+0xfeadafb3,
+0xfeadaeb3,
+0xfeacadb2,
+0xfeabacb1,
+0xfeabacb1,
+0xfeaaabb0,
+0xfea9aaaf,
+0xfea8aaaf,
+0xfea8a9ae,
+0xfea7a8ad,
+0xfea6a7ac,
+0xffa6a7ac,
+0xfea7a8ad,
+0xe1a8a9ae,
+0x97a7a8ad,
+0x42a4a5aa,
+0x0f9fa1a8,
+0x018b90cf,
+0x00496db6,
+0x000969b4,
+0x5e2569bf,
+0xf8256bc1,
+0xfe2468bc,
+0xfe2468bc,
+0xfe2467bc,
+0xfe2367bc,
+0xfe2367bb,
+0xfe2367bb,
+0xfe2367bb,
+0xfe2367bb,
+0xfe2366ba,
+0xfe2266ba,
+0xfe2266b9,
+0xfe2266b9,
+0xfe2266b9,
+0xfe2265b9,
+0xff2165b8,
+0xf22166ba,
+0xe22268bd,
+0xe32268bc,
+0xe32267bc,
+0xe32267bc,
+0xea2166ba,
+0xfc2065b8,
+0xff2064b6,
+0xfe2064b6,
+0xfe2063b6,
+0xfe1f63b6,
+0xfe1f63b5,
+0xfe1f63b4,
+0xfe1f63b4,
+0xfe1f63b4,
+0xfe1e62b4,
+0xfe1e62b4,
+0xfe1e62b4,
+0xfe1e62b3,
+0xfe1e62b2,
+0xfe1e61b2,
+0xff1d62b3,
+0xfc1d62b4,
+0xd21f63b4,
+0xce647ba1,
+0xfb8a8991,
+0xff89888f,
+0xfe87878e,
+0xff87878e,
+0xfb88888f,
+0xad898890,
+0x2687868f,
+0x00bbb7aa,
+0x00000000,
+0x004a4a3b,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00bfbfbf,
+0x00c4c4c4,
+0x00a4a496,
+0x019f9bb1,
+0x32b5b6bb,
+0xb3b6b8bc,
+0xfbb3b5b9,
+0xffb1b2b7,
+0xfeb0b1b6,
+0xfeafb1b5,
+0xfeafb0b4,
+0xfeaeafb4,
+0xfeadafb3,
+0xfeacaeb3,
+0xfeacadb2,
+0xfeabacb1,
+0xfeabacb1,
+0xfeaaabb0,
+0xfeaaaaaf,
+0xfea8aaaf,
+0xfea8a9ae,
+0xfea7a8ad,
+0xfea6a8ad,
+0xfea6a7ac,
+0xfea5a6ab,
+0xfea4a5aa,
+0xffa4a5aa,
+0xffa5a6ab,
+0xeba6a6ac,
+0xb4a5a6ac,
+0x6aa3a4aa,
+0x2ca1a1a7,
+0x06dcb290,
+0x5c256abf,
+0xf7256bc1,
+0xfe2468bb,
+0xfe2467bc,
+0xfe2367bc,
+0xfe2367bb,
+0xfe2367bb,
+0xfe2367bb,
+0xfe2367bb,
+0xfe2366ba,
+0xfe2266b9,
+0xfe2266b9,
+0xfe2266b9,
+0xfe2266b9,
+0xfe2265b9,
+0xfe2165b9,
+0xff2165b8,
+0xa12166b9,
+0x2d2165b8,
+0x2e2264b8,
+0x2e2264b6,
+0x2d2163b6,
+0x392064b6,
+0x882066ba,
+0xed2065b8,
+0xff2063b5,
+0xfe1f63b5,
+0xfe1f63b5,
+0xfe1f63b5,
+0xfe1f63b4,
+0xfe1f62b4,
+0xfe1e62b4,
+0xfe1e62b4,
+0xfe1e62b4,
+0xfe1e62b3,
+0xfe1e62b3,
+0xfe1e61b2,
+0xfe1d61b2,
+0xfe1d61b2,
+0xfe1d61b1,
+0xff1d61b2,
+0xff2364b0,
+0xfe62789c,
+0xfe88878e,
+0xff87878f,
+0xee898991,
+0x8b89888f,
+0x1885848c,
+0x00949288,
+0x005a5aa0,
+0x005959a0,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00808080,
+0x00ffff00,
+0x00bdbdf6,
+0x00b8b9b2,
+0x18b1b2b7,
+0x85b4b5ba,
+0xeab3b5b9,
+0xffb0b2b6,
+0xfeaeb0b4,
+0xfeaeafb4,
+0xfeadafb3,
+0xfeadaeb3,
+0xfeacadb2,
+0xfeabacb1,
+0xfeabacb1,
+0xfeaaabb0,
+0xfea9aaaf,
+0xfea9a9ae,
+0xfea8a9ae,
+0xfea7a8ad,
+0xfea6a8ad,
+0xfea6a7ac,
+0xfea5a6ab,
+0xfea5a5ab,
+0xfea4a5aa,
+0xfea3a4a9,
+0xfea2a3a8,
+0xffa2a2a8,
+0xffa3a3a9,
+0xf9a3a4aa,
+0xdea3a3a9,
+0xa7a6a4a8,
+0xaa6183b3,
+0xfa2269be,
+0xfe2467bb,
+0xfe2367bc,
+0xfe2367bb,
+0xfe2367bb,
+0xfe2367bb,
+0xfe2366ba,
+0xfe2266b9,
+0xfe2266b9,
+0xfe2266b9,
+0xfe2266b9,
+0xfe2266b9,
+0xfe2265b9,
+0xfe2165b9,
+0xfe2165b8,
+0xff2165b8,
+0x8d2166b9,
+0x02246ab7,
+0x001c54a7,
+0x002b86d4,
+0x00000000,
+0x002166b6,
+0x061b63ae,
+0x652065b9,
+0xed2065b8,
+0xff1f63b5,
+0xfe1f63b4,
+0xff1f63b4,
+0xfe1f62b4,
+0xfe1e62b4,
+0xfe1e62b4,
+0xfe1e62b4,
+0xfe1e62b3,
+0xfe1e62b3,
+0xfe1e61b2,
+0xfe1d61b2,
+0xfe1d61b2,
+0xfe1d61b1,
+0xfe1d61b2,
+0xfe1d61b1,
+0xfe1b60b1,
+0xfe2564ad,
+0xfd748096,
+0xd48b8990,
+0x5c888890,
+0x0884838c,
+0x00686679,
+0x00a7a7a7,
+0x00aaaaaa,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00c0c0c0,
+0x00c1c1c1,
+0x009494a1,
+0x06aeadb4,
+0x4db2b3b8,
+0xc2b2b3b8,
+0xfbb0b1b6,
+0xfeadafb3,
+0xfeacaeb2,
+0xfeacadb2,
+0xfeabacb1,
+0xfeaaacb1,
+0xfeaaabb0,
+0xfeaaaaaf,
+0xfea8aaaf,
+0xfea8a9ae,
+0xfea7a8ad,
+0xfea6a8ac,
+0xfea6a7ac,
+0xfea6a6ab,
+0xfea5a5ab,
+0xfea4a5aa,
+0xfea3a4a9,
+0xfea2a3a9,
+0xfea2a3a8,
+0xfea1a2a7,
+0xfea0a1a7,
+0xfea0a0a6,
+0xff9fa0a6,
+0xffa2a1a6,
+0xfe778cae,
+0xfe1d67bb,
+0xfe2367bc,
+0xfe2367bb,
+0xfe2367bb,
+0xfe2367bb,
+0xfe2366bb,
+0xfe2266ba,
+0xfe2266b9,
+0xfe2266b9,
+0xfe2266b9,
+0xfe2266b9,
+0xfe2265b9,
+0xfe2165b9,
+0xfe2165b8,
+0xfe2165b7,
+0xff2165b8,
+0x8d2065b9,
+0x020e4ebd,
+0x002378ac,
+0x000000ee,
+0x00000000,
+0x00000000,
+0x002565b4,
+0x062c65b2,
+0x811d65b9,
+0xf91d64b7,
+0xfe1f63b4,
+0xfe1f62b4,
+0xfe1e62b4,
+0xfe1e62b4,
+0xfe1e62b4,
+0xfe1e62b3,
+0xfe1e62b2,
+0xfe1d61b2,
+0xfe1d61b2,
+0xfe1d61b2,
+0xfe1d61b1,
+0xfe1d61b1,
+0xfe1d61b1,
+0xfe1c60b1,
+0xfe1c60b0,
+0xff1860b1,
+0xd9386caa,
+0x37768293,
+0x00ffba5c,
+0x00ffffff,
+0x0090908e,
+0x00808080,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x008080ca,
+0x009494a5,
+0x00e1ddcc,
+0x00ffffd0,
+0x1cacaeb2,
+0x7eb0b2b6,
+0xdeb0b2b6,
+0xfeaeafb4,
+0xffabacb1,
+0xfeaaabb0,
+0xfeaaabb0,
+0xfea9aaaf,
+0xfea8aaaf,
+0xfea8a9ae,
+0xfea7a8ad,
+0xfea6a8ad,
+0xfea6a7ac,
+0xfea5a6ab,
+0xfea5a5ab,
+0xfea4a4aa,
+0xfea3a4a9,
+0xfea2a3a9,
+0xfea2a2a8,
+0xfea1a2a7,
+0xfea1a1a7,
+0xfea0a0a6,
+0xfe9fa0a6,
+0xfe9f9fa5,
+0xfea09fa4,
+0xfe768aac,
+0xfe1d67bb,
+0xfe2367bb,
+0xfe2367bb,
+0xfe2367bb,
+0xfe2366ba,
+0xfe2266b9,
+0xfe2266b9,
+0xfe2266b9,
+0xfe2266b9,
+0xfe2266b9,
+0xfe2265b9,
+0xfe2165b9,
+0xfe2165b8,
+0xfe2165b8,
+0xfe2165b8,
+0xff2065b7,
+0xa4326cb4,
+0x3a94949b,
+0x3c94949b,
+0x4193939b,
+0x4992939a,
+0x55919199,
+0x66909097,
+0x78908f96,
+0x9d838b9b,
+0xf23a6eaf,
+0xfe1c62b4,
+0xfe1e62b4,
+0xfe1e62b4,
+0xfe1e62b4,
+0xfe1e62b3,
+0xfe1e62b2,
+0xfe1d61b2,
+0xfe1d61b2,
+0xfe1d61b2,
+0xfe1d61b2,
+0xfe1d61b2,
+0xfe1d60b1,
+0xfe1c60b1,
+0xfe1c60b0,
+0xfe1c60b0,
+0xff1c60b0,
+0xee1b61b3,
+0x521b60b2,
+0x001a5fb2,
+0x001fb7c5,
+0x001caec8,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00808080,
+0x00554cd5,
+0x005f58c7,
+0x00e4ed9c,
+0x03a7a9ad,
+0x35aeb0b3,
+0x99afb0b5,
+0xe7aeafb4,
+0xfeacadb2,
+0xffa9aaaf,
+0xfea8a9ae,
+0xfea8a9ae,
+0xfea7a8ad,
+0xfea6a8ac,
+0xfea6a7ac,
+0xfea5a6ab,
+0xfea5a5ab,
+0xfea4a5aa,
+0xfea3a4a9,
+0xfea2a3a9,
+0xfea2a3a8,
+0xfea1a2a7,
+0xfea0a1a7,
+0xfea0a1a6,
+0xfe9fa0a6,
+0xfe9f9fa5,
+0xfe9e9fa4,
+0xfe9f9fa3,
+0xfe768aac,
+0xfe1d67bb,
+0xfe2367bb,
+0xfe2367bb,
+0xfe2366ba,
+0xfe2266b9,
+0xfe2266b9,
+0xfe2266b9,
+0xfe2266b9,
+0xfe2265b9,
+0xfe2165b9,
+0xfe2165b9,
+0xfe2165b8,
+0xfe2165b8,
+0xfe2165b8,
+0xfe2164b7,
+0xfe1d63b7,
+0xf4557aac,
+0xe897969c,
+0xea95959c,
+0xed95959c,
+0xf094949b,
+0xf593939a,
+0xfa919198,
+0xfe8f8f96,
+0xff908f95,
+0xfe74829d,
+0xfe2365b1,
+0xfe1d62b3,
+0xfe1e62b4,
+0xfe1e62b3,
+0xfe1e61b2,
+0xfe1d61b2,
+0xfe1d61b2,
+0xfe1d61b2,
+0xfe1d61b1,
+0xfe1d61b2,
+0xfe1d60b1,
+0xfe1c60b1,
+0xfe1c60b0,
+0xfe1c60b0,
+0xfe1c60b0,
+0xfe1c60b0,
+0xff1c60b0,
+0xc11b60b2,
+0x191b61b0,
+0x00215bbc,
+0x00569490,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00999999,
+0x00a3a3a3,
+0x00a5a5a5,
+0x00afaeb2,
+0x09a7aaae,
+0x3facadb2,
+0x9dadaeb3,
+0xe6acadb2,
+0xfea9abb0,
+0xffa7a8ad,
+0xfea6a7ac,
+0xfea5a6ac,
+0xfea5a6ab,
+0xfea4a5ab,
+0xfea4a5aa,
+0xfea3a4aa,
+0xfea2a3a9,
+0xfea2a3a8,
+0xfea1a2a7,
+0xfea0a1a6,
+0xfea0a1a6,
+0xfe9fa0a6,
+0xfe9f9fa5,
+0xfe9e9fa4,
+0xfe9d9ea4,
+0xfe9f9ea2,
+0xfe758aab,
+0xfe1d67ba,
+0xfe2367bb,
+0xfe2366ba,
+0xfe2266b9,
+0xfe2266b9,
+0xfe2266b9,
+0xfe2266b9,
+0xfe2265b9,
+0xfe2165b9,
+0xfe2165b8,
+0xfe2165b8,
+0xfe2165b8,
+0xfe2165b8,
+0xfe2164b7,
+0xfe2164b6,
+0xfe1d63b7,
+0xfe5679a9,
+0xff929197,
+0xff909097,
+0xff908f97,
+0xff8f8f96,
+0xfe8e8e96,
+0xfe8e8e95,
+0xfe8e8d95,
+0xfe8d8d94,
+0xfe8d8c94,
+0xfe4c74a7,
+0xfe1861b4,
+0xfe1e62b3,
+0xfe1e61b2,
+0xfe1d61b2,
+0xfe1d61b2,
+0xfe1d61b2,
+0xfe1d61b1,
+0xfe1d61b1,
+0xfe1d60b1,
+0xfe1c60b1,
+0xfe1c60b0,
+0xfe1c60b0,
+0xfe1c60b0,
+0xfe1c60b0,
+0xfe1c5faf,
+0xfe1b5faf,
+0xfa1b60b2,
+0x751c61b2,
+0x021f59a8,
+0x006f94ff,
+0x003466cc,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00808080,
+0x00807f7f,
+0x007c7770,
+0x00aaabad,
+0x09a6aaae,
+0x39aaabb0,
+0x8eaaabb0,
+0xd8aaabaf,
+0xfaa8a9ae,
+0xffa6a7ac,
+0xfea4a5ab,
+0xfea3a4aa,
+0xfea3a4a9,
+0xfea2a3a9,
+0xfea2a3a8,
+0xfea1a2a7,
+0xfea1a1a7,
+0xfea0a0a6,
+0xfe9fa0a5,
+0xfe9f9fa5,
+0xfe9e9fa4,
+0xfe9d9ea4,
+0xfe9d9da3,
+0xfe9e9da2,
+0xfe7589ab,
+0xfe1c66ba,
+0xfe2366ba,
+0xfe2266b9,
+0xfe2266b9,
+0xfe2266b9,
+0xfe2266b9,
+0xfe2265b9,
+0xfe2165b9,
+0xfe2165b8,
+0xfe2165b8,
+0xfe2165b8,
+0xfe2165b8,
+0xfe2164b7,
+0xfe2064b6,
+0xfe2064b6,
+0xfe1c63b7,
+0xfe5679a8,
+0xfe929197,
+0xfe909097,
+0xfe908f96,
+0xfe8f8e96,
+0xfe8e8e95,
+0xfe8e8d95,
+0xfe8d8d94,
+0xfe8d8c94,
+0xfe8e8d93,
+0xfe7a8499,
+0xfe2566b0,
+0xfe1c61b3,
+0xfe1d61b2,
+0xfe1d61b2,
+0xfe1d61b2,
+0xfe1d61b2,
+0xfe1d61b2,
+0xfe1d60b1,
+0xfe1c60b0,
+0xfe1c60b0,
+0xfe1c60b0,
+0xfe1c60b0,
+0xfe1c60af,
+0xfe1c5faf,
+0xfe1b5faf,
+0xfe1b5faf,
+0xff1b5faf,
+0xda1c61b2,
+0x2f1b5faf,
+0x003754a2,
+0x00003cc5,
+0x000039c6,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00ffffff,
+0x00ffffff,
+0x00ffffff,
+0x00a9a9aa,
+0x05a3a3a7,
+0x26a6a6ab,
+0x6ca7a8ae,
+0xb7a7a9ae,
+0xe9a7a8ad,
+0xfca6a6ac,
+0xffa3a4a9,
+0xfea2a3a8,
+0xfea1a2a7,
+0xfea1a1a7,
+0xfea0a1a6,
+0xfe9fa0a5,
+0xfe9f9fa5,
+0xfe9e9fa4,
+0xfe9d9ea4,
+0xfe9d9da3,
+0xfe9c9ca2,
+0xfe9d9da1,
+0xfe7488ab,
+0xfe1c66ba,
+0xfe2266b9,
+0xfe2266b9,
+0xfe2266b9,
+0xfe2266b9,
+0xfe2265b9,
+0xfe2165b9,
+0xfe2165b8,
+0xfe2165b8,
+0xfe2165b8,
+0xfe2164b8,
+0xfe2064b7,
+0xfe2064b6,
+0xfe2064b6,
+0xfe2064b6,
+0xfe1d63b6,
+0xfe5679a8,
+0xfe919097,
+0xfe8f8f96,
+0xfe8f8f96,
+0xfe8e8e95,
+0xfe8e8d95,
+0xfe8d8d94,
+0xfe8d8d94,
+0xfe8c8c93,
+0xfe8c8b93,
+0xfe8c8b92,
+0xfe5074a3,
+0xfe1760b2,
+0xfe1e61b2,
+0xfe1d61b1,
+0xfe1d61b1,
+0xfe1d61b1,
+0xfe1c60b1,
+0xfe1c60b0,
+0xfe1c60b0,
+0xfe1c60b0,
+0xfe1c60b0,
+0xfe1c60af,
+0xfe1b5faf,
+0xfe1b5faf,
+0xfe1b5faf,
+0xfe1b5faf,
+0xfe1b5fae,
+0xfe1b60b0,
+0x971b61b2,
+0x09175aa9,
+0x00ffff00,
+0x000052ac,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00ffffff,
+0x00f6f6f4,
+0x00c7c7be,
+0x009c9ba4,
+0x0199999f,
+0x10a2a3a8,
+0x3ca4a6ab,
+0x7da5a6ac,
+0xbba6a7ac,
+0xe7a4a5ab,
+0xfaa3a4aa,
+0xffa1a2a7,
+0xffa0a0a6,
+0xfe9f9fa5,
+0xfe9e9ea4,
+0xfe9d9ea4,
+0xfe9d9da3,
+0xfe9c9ca2,
+0xfe9b9ca2,
+0xfe9d9ca1,
+0xfe7488aa,
+0xfe1c66ba,
+0xfe2266b9,
+0xfe2266b9,
+0xfe2266b9,
+0xfe2265b9,
+0xfe2165b9,
+0xfe2165b8,
+0xfe2165b8,
+0xfe2165b8,
+0xfe2164b8,
+0xfe2064b7,
+0xfe2064b6,
+0xfe2064b6,
+0xfe2064b6,
+0xfe2064b6,
+0xfe1c62b6,
+0xfe5678a8,
+0xfe919096,
+0xfe8f8e96,
+0xfe8e8e95,
+0xfe8e8d95,
+0xfe8d8d94,
+0xfe8d8c94,
+0xfe8c8c93,
+0xff8c8c93,
+0xff8c8b93,
+0xfe8e8c93,
+0xf67e8699,
+0xf92766af,
+0xfe1c61b2,
+0xfe1d61b1,
+0xfe1d61b1,
+0xfe1c60b1,
+0xfe1c60b0,
+0xfe1c60b0,
+0xfe1c60b0,
+0xfe1c60b0,
+0xfe1c60af,
+0xfe1b5faf,
+0xfe1b5faf,
+0xfe1b5faf,
+0xfe1b5faf,
+0xfe1b5faf,
+0xfe1b5fae,
+0xff1b5eae,
+0xeb1b60b1,
+0x4b1a60b0,
+0x002e72b8,
+0x00006b7c,
+0x00006b80,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00131306,
+0x00b8b8b5,
+0x0094948f,
+0x009e9da0,
+0x02a0a0a3,
+0x11a0a2a6,
+0x36a2a2a8,
+0x6ba3a4aa,
+0xa3a2a2a8,
+0xcea3a3a9,
+0xeda0a0a6,
+0xfaa0a0a7,
+0xff9e9fa5,
+0xff9c9da3,
+0xff9c9ca2,
+0xfe9b9ba2,
+0xfe9b9ba0,
+0xfe7387aa,
+0xfe1c66ba,
+0xfe2266b9,
+0xfe2266b9,
+0xfe2265b9,
+0xfe2165b9,
+0xfe2165b8,
+0xfe2165b8,
+0xfe2165b8,
+0xfe2164b8,
+0xfe2064b7,
+0xfe2064b6,
+0xfe2064b6,
+0xfe2064b6,
+0xfe2063b6,
+0xfe2063b6,
+0xfe1c62b6,
+0xfe5678a7,
+0xfe908f95,
+0xfe8e8e95,
+0xff8e8e95,
+0xff8e8d95,
+0xff8d8d94,
+0xfd8e8e95,
+0xf78e8d95,
+0xe58d8d94,
+0xc28e8e96,
+0x928c8c93,
+0x578f8d93,
+0x8e2a67af,
+0xfc1d62b3,
+0xfe1d61b1,
+0xfe1c60b1,
+0xfe1c60b0,
+0xfe1c60b0,
+0xfe1c60b0,
+0xfe1c60b0,
+0xfe1c60af,
+0xfe1b5faf,
+0xfe1b5faf,
+0xfe1b5faf,
+0xfe1b5faf,
+0xfe1b5faf,
+0xfe1b5faf,
+0xfe1a5eaf,
+0xfe1a5eae,
+0xff1a5faf,
+0xb81b60b0,
+0x14195dad,
+0x003161d5,
+0x00003c5c,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x007e7e7e,
+0x007c7c7f,
+0x007f7f7d,
+0x0084847b,
+0x0092928e,
+0x00978d5d,
+0x08a09fa5,
+0x1b9e9ea4,
+0x3e9f9fa5,
+0x67a0a1a7,
+0x929d9ea4,
+0xb79e9fa5,
+0xd29e9fa5,
+0xe89b9ca3,
+0xf59d9da1,
+0xfb7489ab,
+0xfe1c66b9,
+0xfe2266b9,
+0xfe2265b9,
+0xfe2165b9,
+0xfe2165b8,
+0xfe2165b8,
+0xfe2165b8,
+0xfe2164b7,
+0xfe2064b6,
+0xfe2064b6,
+0xfe2064b6,
+0xfe2064b6,
+0xfe2063b6,
+0xfe1f63b6,
+0xfe1f63b6,
+0xfe1c62b5,
+0xfd5879a7,
+0xf8929197,
+0xf28f8f96,
+0xe28f8f97,
+0xca909098,
+0xad8e8e95,
+0x848e8d95,
+0x5a8e8e95,
+0x318b8b92,
+0x138a8991,
+0x04898991,
+0x002162af,
+0x231d61b2,
+0xd21d63b5,
+0xff1c60b1,
+0xfe1c60b0,
+0xfe1c60b0,
+0xfe1c60b0,
+0xfe1c60b0,
+0xfe1c5faf,
+0xfe1b5faf,
+0xfe1b5faf,
+0xfe1b5faf,
+0xfe1b5faf,
+0xfe1b5faf,
+0xfe1b5faf,
+0xfe1a5eae,
+0xfe1a5eae,
+0xfe1a5ead,
+0xfe1a5ead,
+0xf81a5faf,
+0x6b1a60b0,
+0x010033ac,
+0x00000ece,
+0x000047b8,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x0007070f,
+0x000f0f31,
+0x008080c0,
+0x00afafb7,
+0x00adadad,
+0x0092929d,
+0x009b9b9c,
+0x0495959d,
+0x0f99999e,
+0x1d9a9aa0,
+0x35999aa0,
+0x4da19ea0,
+0x99577db1,
+0xfa2167bb,
+0xfe2265b8,
+0xfe2165b9,
+0xfe2165b8,
+0xfe2165b8,
+0xfe2165b8,
+0xfe2164b7,
+0xfe2064b6,
+0xfe2064b6,
+0xfe2064b6,
+0xfe2064b6,
+0xfe2063b6,
+0xfe1f63b6,
+0xfe1f63b5,
+0xfe1f63b5,
+0xff1e63b5,
+0xba4070ad,
+0x60929197,
+0x488e8e95,
+0x2c8c8c93,
+0x178d8d94,
+0x0b8d8d93,
+0x01929397,
+0x00939398,
+0x00000000,
+0x0011119a,
+0x00a897ba,
+0x013274ba,
+0x011d58aa,
+0x731d62b4,
+0xfa1d62b3,
+0xfe1c60b0,
+0xfe1c60b0,
+0xfe1c60b0,
+0xfe1c5faf,
+0xfe1b5faf,
+0xfe1b5faf,
+0xfe1b5faf,
+0xfe1b5faf,
+0xfe1b5faf,
+0xfe1b5faf,
+0xfe1a5eae,
+0xfe1a5eae,
+0xfe1a5ead,
+0xfe1a5ead,
+0xfe1a5ead,
+0xff1a5ead,
+0xd31a60b0,
+0x291a5dad,
+0x001079a3,
+0x00004aa0,
+0x000049a4,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00131313,
+0x001e1e1e,
+0x00999998,
+0x00a2a29b,
+0x00ffffff,
+0x000053b4,
+0x000056bb,
+0x00336fbb,
+0x5b2066bb,
+0xf82268bd,
+0xfe2165b8,
+0xfe2165b8,
+0xfe2165b8,
+0xfe2165b8,
+0xfe2164b7,
+0xfe2064b6,
+0xfe2064b6,
+0xfe2064b6,
+0xfe2064b6,
+0xfe2063b6,
+0xfe1f63b6,
+0xfe1f63b5,
+0xfe1f63b4,
+0xfe1f63b4,
+0xff1f63b5,
+0x861c62b4,
+0x01000fad,
+0x001985c2,
+0x00000095,
+0x00fffffb,
+0x00f7f7f2,
+0x00b1b1aa,
+0x00717170,
+0x00000000,
+0x00000000,
+0x00000000,
+0x0000aa35,
+0x00114cad,
+0x1e1c61b0,
+0xca1d62b4,
+0xff1c61b1,
+0xfe1c60af,
+0xfe1c5faf,
+0xfe1b5faf,
+0xfe1b5faf,
+0xfe1b5faf,
+0xfe1b5faf,
+0xfe1b5faf,
+0xfe1b5faf,
+0xfe1a5eae,
+0xfe1a5eae,
+0xfe1a5eae,
+0xfe1a5ead,
+0xfe1a5eae,
+0xfe1a5ead,
+0xfe1a5eac,
+0xfd1a5eae,
+0x8e195faf,
+0x06155fa9,
+0x0000ffbd,
+0x00006db4,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x001a7bbd,
+0x00177ebd,
+0x002655ba,
+0x5e2267bb,
+0xf82268bd,
+0xfe2165b7,
+0xfe2165b8,
+0xfe2165b8,
+0xfe2064b7,
+0xfe2064b6,
+0xfe2064b6,
+0xfe2064b6,
+0xfe2064b6,
+0xfe2063b6,
+0xfe1f63b6,
+0xfe1f63b5,
+0xfe1f63b4,
+0xfe1f63b4,
+0xfe1f63b4,
+0xff1e62b4,
+0x871e62b3,
+0x020c5aae,
+0x00000000,
+0x000055aa,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00224387,
+0x0020468b,
+0x0000e57c,
+0x691c62b2,
+0xf81c61b2,
+0xfe1b5faf,
+0xfe1b5faf,
+0xfe1b5faf,
+0xfe1b5faf,
+0xfe1b5fae,
+0xfe1b5faf,
+0xfe1b5faf,
+0xfe1a5eae,
+0xfe1a5ead,
+0xfe1a5eae,
+0xfe1a5eae,
+0xfe1a5ead,
+0xfe1a5ead,
+0xfe1a5eac,
+0xfe195dac,
+0xff195dad,
+0xe61a5fb0,
+0x421a5faf,
+0x003151c6,
+0x00008493,
+0x00008097,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x000080bf,
+0x000085c0,
+0x00424fb4,
+0x5d2267bb,
+0xf82268bc,
+0xfe2165b7,
+0xfe2164b7,
+0xfe2064b7,
+0xfe2064b6,
+0xfe2064b6,
+0xfe2064b6,
+0xfe2064b6,
+0xfe2063b6,
+0xfe1f63b6,
+0xfe1f63b5,
+0xfe1f63b4,
+0xfe1f63b4,
+0xfe1f62b4,
+0xfe1e62b4,
+0xff1e62b4,
+0x861e62b3,
+0x020858ac,
+0x00000000,
+0x000055aa,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x0000399e,
+0x003a5bae,
+0x181b60af,
+0xc11c61b3,
+0xff1b60b0,
+0xfe1b5faf,
+0xfe1b5faf,
+0xfe1b5faf,
+0xfe1b5faf,
+0xfe1b5faf,
+0xfe1a5eae,
+0xfe1a5eae,
+0xfe1a5eae,
+0xfe1a5eae,
+0xfe1a5ead,
+0xfe1a5ead,
+0xfe1a5eac,
+0xfe195dac,
+0xfe195dac,
+0xfe195dac,
+0xff195eae,
+0xaf1a5fb0,
+0x10195eac,
+0x004b4daa,
+0x000081b6,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x000080bf,
+0x000085c1,
+0x00424fb9,
+0x5e2267b9,
+0xf82268bc,
+0xfe2164b7,
+0xfe2064b7,
+0xfe2064b6,
+0xfe2064b6,
+0xfe2064b6,
+0xfe2064b6,
+0xfe2063b6,
+0xfe1f63b6,
+0xfe1f63b5,
+0xfe1f63b4,
+0xfe1f63b4,
+0xfe1f62b4,
+0xfe1e62b4,
+0xfe1e62b3,
+0xff1e62b4,
+0x851e62b3,
+0x020153a8,
+0x0000001a,
+0x000055aa,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x000055aa,
+0x000058b0,
+0x003569b2,
+0x5d1b61b2,
+0xf51b60b1,
+0xfe1b5faf,
+0xfe1b5faf,
+0xfe1b5faf,
+0xfe1b5eae,
+0xfe1a5eae,
+0xfe1a5ead,
+0xfe1a5ead,
+0xfe1a5ead,
+0xfe1a5ead,
+0xfe1a5ead,
+0xfe1a5dac,
+0xfe195dac,
+0xfe195dac,
+0xfe195dac,
+0xfe195dac,
+0xfe195dab,
+0xf5195fae,
+0x62195fae,
+0x004077d6,
+0x00004572,
+0x00005a9f,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00007abf,
+0x00007ec1,
+0x004253b9,
+0x5e2266b9,
+0xf82267bc,
+0xfe2064b6,
+0xfe2064b6,
+0xfe2064b6,
+0xfe2064b6,
+0xfe2063b6,
+0xfe1f63b6,
+0xfe1f63b5,
+0xfe1f63b5,
+0xfe1f63b4,
+0xfe1f63b4,
+0xfe1f62b4,
+0xfe1e62b4,
+0xfe1e62b4,
+0xfe1e62b3,
+0xff1e62b4,
+0x851e62b3,
+0x020253a8,
+0x00000044,
+0x000055aa,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x000060c1,
+0x0085b4ff,
+0x131b5eae,
+0xb71c61b2,
+0xff1b60af,
+0xfe1b5fae,
+0xfe1b5eaf,
+0xfe1a5eae,
+0xfe1a5ead,
+0xfe1a5eae,
+0xfe1a5eae,
+0xfe1a5ead,
+0xfe1a5ead,
+0xfe1a5dac,
+0xfe195dac,
+0xfe195dac,
+0xfe195dac,
+0xfe195dac,
+0xfe195dab,
+0xfe195dab,
+0xff195dac,
+0xcc195fae,
+0x23195dab,
+0x002a79ba,
+0x00000008,
+0x0000ffff,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x000048bf,
+0x000044c1,
+0x004188b7,
+0x5e2165b9,
+0xf82167bb,
+0xfe2064b6,
+0xfe2064b6,
+0xfe2064b6,
+0xfe2063b6,
+0xfe1f63b6,
+0xfe1f63b6,
+0xfe1f63b5,
+0xfe1f63b4,
+0xfe1f63b4,
+0xfe1f62b4,
+0xfe1e62b4,
+0xfe1e62b4,
+0xfe1e62b4,
+0xfe1e62b3,
+0xff1e62b3,
+0x841e61b2,
+0x010255a9,
+0x0000005e,
+0x000055aa,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00002b56,
+0x00003367,
+0x003f7fd3,
+0x521b60b1,
+0xf11b61b1,
+0xfe1b5eae,
+0xfe1a5eae,
+0xfe1a5ead,
+0xfe1a5ead,
+0xfe1a5ead,
+0xfe1a5ead,
+0xfe1a5eac,
+0xfe195dac,
+0xfe195dac,
+0xfe195dac,
+0xfe195dac,
+0xfe195dac,
+0xfe195dab,
+0xfe195dab,
+0xfe195dab,
+0xfe195dab,
+0xfc195ead,
+0x85185dae,
+0x05125fa4,
+0x0000ff00,
+0x00007ca5,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00003fbf,
+0x00003ac1,
+0x004091b6,
+0x5e2165b8,
+0xf82167bb,
+0xfe2064b6,
+0xfe2064b6,
+0xfe2063b6,
+0xfe1f63b6,
+0xfe1f63b6,
+0xfe1f63b5,
+0xfe1f63b4,
+0xfe1f63b4,
+0xfe1e62b4,
+0xfe1e62b4,
+0xfe1e62b4,
+0xfe1e62b4,
+0xfe1e62b3,
+0xfe1e61b2,
+0xff1d61b3,
+0x831d61b2,
+0x010656a7,
+0x00000072,
+0x000055aa,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x000045ba,
+0x000000ff,
+0x0f195dad,
+0xae1b60b1,
+0xff1a5faf,
+0xfe1a5ead,
+0xfe1a5ead,
+0xfe1a5ead,
+0xfe1a5ead,
+0xfe1a5eac,
+0xfe195dac,
+0xfe195dac,
+0xfe195dac,
+0xfe195dac,
+0xfe195dac,
+0xfe195dab,
+0xfe195dab,
+0xfe195dab,
+0xfe195dab,
+0xfe185cab,
+0xff185cab,
+0xe2185ead,
+0x3b185dac,
+0x00326ec2,
+0x000071e8,
+0x000066cc,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x000040bf,
+0x00003ac1,
+0x004191b6,
+0x5d2165b8,
+0xf82167bb,
+0xfe2064b5,
+0xfe2063b6,
+0xfe1f63b6,
+0xfe1f63b5,
+0xfe1f63b4,
+0xfe1f63b4,
+0xfe1f63b4,
+0xfe1e62b4,
+0xfe1e62b4,
+0xfe1e62b4,
+0xfe1e62b4,
+0xfe1e62b3,
+0xfe1e61b2,
+0xfe1d61b2,
+0xff1d61b3,
+0x821d61b2,
+0x010653a4,
+0x0000057e,
+0x000055aa,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x000057a8,
+0x000f61ae,
+0x000f4eab,
+0x4a1a5fae,
+0xed1b60b0,
+0xfe1a5ead,
+0xfe1a5ead,
+0xfe1a5ead,
+0xfe1a5eac,
+0xfe195dac,
+0xfe195dac,
+0xfe195dac,
+0xfe195dac,
+0xfe195dac,
+0xfe195dab,
+0xfe195dab,
+0xfe195dab,
+0xfe195dab,
+0xfe185cab,
+0xfe185cab,
+0xfe185caa,
+0xff185dac,
+0xa6185eae,
+0x0d155bab,
+0x0048192b,
+0x000075e5,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x000848bf,
+0x000344c1,
+0x003689b4,
+0x5e2165b8,
+0xf82166ba,
+0xfe2064b6,
+0xfe1f64b6,
+0xfe1f64b6,
+0xfe1f64b5,
+0xfe1f64b5,
+0xfe1f63b5,
+0xfe1e62b4,
+0xfe1e62b3,
+0xfe1e62b3,
+0xfe1e62b3,
+0xfe1e62b3,
+0xfe1e61b2,
+0xfe1d61b2,
+0xfe1d61b2,
+0xff1d62b2,
+0x821d61b1,
+0x010055a5,
+0x00000983,
+0x000055aa,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x002a41c0,
+0x003625b5,
+0x0b1a5bab,
+0xa31b60b1,
+0xff1a5faf,
+0xfe1a5ead,
+0xfe1a5eac,
+0xfe195dac,
+0xfe195dac,
+0xfe195dac,
+0xfe195dac,
+0xfe195dab,
+0xfe195dab,
+0xfe195dab,
+0xfe195dab,
+0xfe195dab,
+0xfe185cab,
+0xfe185cab,
+0xfe185caa,
+0xfe185caa,
+0xfe185caa,
+0xf2185ead,
+0x5a185eae,
+0x00ff2ae3,
+0x00000584,
+0x00003890,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x001f67b7,
+0x001f68b8,
+0x002066ba,
+0x562065b7,
+0xe22167bb,
+0xe62065b9,
+0xe72066b9,
+0xe92066b8,
+0xea2066b8,
+0xed1f65b7,
+0xf01f63b6,
+0xf31e63b5,
+0xf61e63b4,
+0xf91e62b4,
+0xfc1e62b2,
+0xfe1e61b2,
+0xfe1d61b2,
+0xfe1d61b2,
+0xfe1d61b2,
+0xff1d62b2,
+0x811d61b2,
+0x01004ea8,
+0x00001882,
+0x000055aa,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x000000ff,
+0x00004ab5,
+0x002e64bc,
+0x471a5faf,
+0xed1a60b0,
+0xff1a5eac,
+0xfe195dac,
+0xfe195dac,
+0xfe195dac,
+0xfe195dac,
+0xfe195dac,
+0xfe195dab,
+0xfe195dab,
+0xfe195dab,
+0xfe195dab,
+0xfe185cab,
+0xfd185cab,
+0xfc185caa,
+0xfb185caa,
+0xf9185cab,
+0xf8185cab,
+0xf9185dac,
+0xb9185ead,
+0x15165ba9,
+0x003e9289,
+0x000036bc,
+0x00000000,
 };
diff --git a/src/modules/X11/rotated.c b/src/modules/X11/rotated.c
index 3648817..e9230b1 100644
--- a/src/modules/X11/rotated.c
+++ b/src/modules/X11/rotated.c
@@ -20,6 +20,7 @@
  * BEWARE: function arguments have CHANGED since version 2.0!!
  *
  * Protoized (ANSI C, no longer old K&R C):  Martin Maechler, R core team.
+ * float -> double
  */
 
 /* The version for R 2.1.0 is based on patches by
@@ -350,7 +351,7 @@ static int XRotPaintAlignedString(Display *dpy, XFontStruct *font, double angle,
     Pixmap bitmap_to_paint;
 
     /* return early for NULL/empty strings */
-    if(text==NULL || *text=='\0')
+    if(text==NULL || *text=='\0') // R change in original R version
 	return 0;
 
     if(strlen(text)==0)
@@ -376,6 +377,7 @@ static int XRotPaintAlignedString(Display *dpy, XFontStruct *font, double angle,
 	return 0;
 
     /* this gc has similar properties to the user's gc */
+    // GCClipMask added in r6259 for clipping
     my_gc=XCreateGC(dpy, drawable, (unsigned long)0, 0);
     XCopyGC(dpy, gc, GCForeground|GCBackground|GCFunction|GCPlaneMask
 	    |GCClipMask,
@@ -386,23 +388,24 @@ static int XRotPaintAlignedString(Display *dpy, XFontStruct *font, double angle,
 
     /* y position */
     if(align==TLEFT || align==TCENTRE || align==TRIGHT)
-	hot_y=(double)item->rows_in/2*style.magnify;
+	hot_y=item->rows_in/2.*style.magnify;
     else if(align==MLEFT || align==MCENTRE || align==MRIGHT)
 	hot_y=0;
     else if(align==BLEFT || align==BCENTRE || align==BRIGHT)
-	hot_y= -(double)item->rows_in/2*style.magnify;
+	hot_y= -item->rows_in/2.*style.magnify;
     else
-	hot_y= -((double)item->rows_in/2-(double)font->descent)*style.magnify;
+	hot_y= -(item->rows_in/2.-font->descent)*style.magnify;
 
     /* x position */
     if(align==TLEFT || align==MLEFT || align==BLEFT || align==NONE)
-	hot_x= -(double)item->max_width/2*style.magnify;
+	hot_x= -item->max_width/2.*style.magnify;
     else if(align==TCENTRE || align==MCENTRE || align==BCENTRE)
 	hot_x=0;
     else
-	hot_x=(double)item->max_width/2*style.magnify;
+	hot_x=item->max_width/2.*style.magnify;
 
     /* pre-calculate sin and cos */
+    // rounding added in original R version
     sin_angle = myround(sin(angle)*1000.0) / 1000.0;
     cos_angle = myround(cos(angle)*1000.0) / 1000.0;
 
@@ -423,10 +426,10 @@ static int XRotPaintAlignedString(Display *dpy, XFontStruct *font, double angle,
 
 	/* rotate corner positions */
 	for(i=0; i<4*item->nl; i++) {
-	    xpoints[i].x=(double)x + ( (item->corners_x[i]-hot_x)*cos_angle +
-				      (item->corners_y[i]+hot_y)*sin_angle);
-	    xpoints[i].y=(double)y + (-(item->corners_x[i]-hot_x)*sin_angle +
-				      (item->corners_y[i]+hot_y)*cos_angle);
+	    xpoints[i].x=(short)(x + ( (item->corners_x[i]-hot_x)*cos_angle +
+					(item->corners_y[i]+hot_y)*sin_angle));
+	    xpoints[i].y=(short)(y + (-(item->corners_x[i]-hot_x)*sin_angle +
+				      (item->corners_y[i]+hot_y)*cos_angle));
 	}
 
 	/* we want to swap foreground and background colors here;
@@ -451,8 +454,8 @@ static int XRotPaintAlignedString(Display *dpy, XFontStruct *font, double angle,
     }
 
     /* where should top left corner of bitmap go ? */
-    xp=(double)x-((double)item->cols_out/2 +hot_xp);
-    yp=(double)y-((double)item->rows_out/2 -hot_yp);
+    xp=(short)(x - (item->cols_out/2. + hot_xp));
+    yp=(short)(y - (item->rows_out/2. - hot_yp));
 
     /* by default we draw the rotated bitmap, solid */
     bitmap_to_paint=item->bitmap;
@@ -584,13 +587,14 @@ static int XRotDrawHorizontalString(Display *dpy, XFontStruct *font,
     int dir, asc, desc;
     XCharStruct overall;
 
-    if (text == NULL || *text=='\0') {
+    if (text == NULL || *text=='\0') {  // addition in original R version
       DEBUG_PRINT1("Empty string, ignoring\n");
       return 0;
     }
 
     /* this gc has similar properties to the user's gc (including stipple) */
     my_gc=XCreateGC(dpy, drawable, (unsigned long)0, 0);
+    // GCClipMask added in r6259 for clipping
     XCopyGC(dpy, gc,
 	    GCForeground|GCBackground|GCFunction|GCStipple|GCFillStyle|
 	    GCTileStipXOrigin|GCTileStipYOrigin|GCPlaneMask|GCClipMask, my_gc);
@@ -598,7 +602,7 @@ static int XRotDrawHorizontalString(Display *dpy, XFontStruct *font,
 
     /* count number of sections in string */
     if(align!=NONE)
-	for(i=strlen(text)-2; i >= 0; i--)
+	for(i=(int)strlen(text)-2; i >= 0; i--)
 	    if(text[i]=='\n')
 		nl++;
 
@@ -629,7 +633,7 @@ static int XRotDrawHorizontalString(Display *dpy, XFontStruct *font,
 
     /* loop through each section in the string */
     do {
-	XTextExtents(font, str3, strlen(str3), &dir, &asc, &desc,
+	XTextExtents(font, str3, (int)strlen(str3), &dir, &asc, &desc,
 		     &overall);
 
 	/* where to draw section in x ? */
@@ -642,9 +646,9 @@ static int XRotDrawHorizontalString(Display *dpy, XFontStruct *font,
 
 	/* draw string onto bitmap */
 	if(!bg)
-	    XDrawString(dpy, drawable, my_gc, xp, yp, str3, strlen(str3));
+	    XDrawString(dpy, drawable, my_gc, xp, yp, str3, (int)strlen(str3));
 	else
-	    XDrawImageString(dpy, drawable, my_gc, xp, yp, str3, strlen(str3));
+	    XDrawImageString(dpy, drawable, my_gc, xp, yp, str3, (int)strlen(str3));
 
 	/* move to next line */
 	yp+=height;
@@ -846,7 +850,7 @@ static RotatedTextItem *XRotCreateTextItem(Display *dpy, XFontStruct *font,
     /* count number of sections in string */
     item->nl=1;
     if(align!=NONE)
-	for(i=strlen(text)-2; i >= 0; i--)
+	for(i=(int)strlen(text)-2; i >= 0; i--)
 	    if(text[i]=='\n')
 		item->nl++;
 
@@ -858,12 +862,14 @@ static RotatedTextItem *XRotCreateTextItem(Display *dpy, XFontStruct *font,
 
     /* find width of longest section */
     str1=strdup(text);
-    if(str1==NULL)
+    if(str1==NULL) {
+	free(item);
 	return NULL;
+    }
 
     str3=strtok(str1, str2);
 
-    XTextExtents(font, str3, strlen(str3), &dir, &asc, &desc,
+    XTextExtents(font, str3, (int)strlen(str3), &dir, &asc, &desc,
 		 &overall);
 
     item->max_width=overall.rbearing;
@@ -873,7 +879,7 @@ static RotatedTextItem *XRotCreateTextItem(Display *dpy, XFontStruct *font,
 	str3=strtok((char *)NULL, str2);
 
 	if(str3!=NULL) {
-	    XTextExtents(font, str3, strlen(str3), &dir, &asc, &desc,
+	    XTextExtents(font, str3, (int)strlen(str3), &dir, &asc, &desc,
 			 &overall);
 
 	    if(overall.rbearing>item->max_width)
@@ -891,7 +897,9 @@ static RotatedTextItem *XRotCreateTextItem(Display *dpy, XFontStruct *font,
     item->cols_in=item->max_width;
     item->rows_in=item->nl*height;
 
-    /* fudge in case one of the above is zero: */
+    /* fudge in case one of the above is zero: 
+       for " ", r8300
+     */
     if (!item->cols_in) item->cols_in=1;
     if (!item->rows_in) item->rows_in=1;
 
@@ -917,13 +925,17 @@ static RotatedTextItem *XRotCreateTextItem(Display *dpy, XFontStruct *font,
     /* text background will be drawn using XFillPolygon */
     item->corners_x=
 	(double *)malloc((unsigned)(4*item->nl*sizeof(double)));
-    if(!item->corners_x)
+    if(!item->corners_x) {
+	free(item);
 	return NULL;
-
+    }
     item->corners_y=
 	(double *)malloc((unsigned)(4*item->nl*sizeof(double)));
-    if(!item->corners_y)
+    if(!item->corners_y) {
+	free(item->corners_x);
+	free(item);
 	return NULL;
+    }
 
     /* draw text horizontally */
 
@@ -931,14 +943,18 @@ static RotatedTextItem *XRotCreateTextItem(Display *dpy, XFontStruct *font,
     yp=font->ascent;
 
     str1=strdup(text);
-    if(str1==NULL)
+    if(str1==NULL) {
+	free(item->corners_y);
+	free(item->corners_x);
+	free(item);
 	return NULL;
+    }
 
     str3=strtok(str1, str2);
 
     /* loop through each section in the string */
     do {
-	XTextExtents(font, str3, strlen(str3), &dir, &asc, &desc,
+	XTextExtents(font, str3, (int)strlen(str3), &dir, &asc, &desc,
 		     &overall);
 
 	/* where to draw section in x ? */
@@ -950,16 +966,15 @@ static RotatedTextItem *XRotCreateTextItem(Display *dpy, XFontStruct *font,
 	    xp=item->max_width-overall.rbearing;
 
 	/* draw string onto bitmap */
-	XDrawString(dpy, canvas, font_gc, xp, yp, str3, strlen(str3));
+	XDrawString(dpy, canvas, font_gc, xp, yp, str3, (int)strlen(str3));
 
 	/* keep a note of corner positions of this string */
-	item->corners_x[ic]=((double)xp-(double)item->cols_in/2)*style.magnify;
-	item->corners_y[ic]=((double)(yp-font->ascent)-(double)item->rows_in/2)
-	    *style.magnify;
+	item->corners_x[ic]=(xp-item->cols_in/2.)*style.magnify;
+	item->corners_y[ic]=(yp-font->ascent-item->rows_in/2.) *style.magnify;
 	item->corners_x[ic+1]=item->corners_x[ic];
-	item->corners_y[ic+1]=item->corners_y[ic]+(double)height*style.magnify;
+	item->corners_y[ic+1]=item->corners_y[ic]+height*style.magnify;
 	item->corners_x[item->nl*4-1-ic]=item->corners_x[ic]+
-	    (double)overall.rbearing*style.magnify;
+	    overall.rbearing*style.magnify;
 	item->corners_y[item->nl*4-1-ic]=item->corners_y[ic];
 	item->corners_x[item->nl*4-2-ic]=
 	    item->corners_x[item->nl*4-1-ic];
@@ -978,8 +993,12 @@ static RotatedTextItem *XRotCreateTextItem(Display *dpy, XFontStruct *font,
 
     /* create image to hold horizontal text */
     I_in=MakeXImage(dpy, item->cols_in, item->rows_in);
-    if(I_in==NULL)
+    if(I_in==NULL) {
+	free(item->corners_y);
+	free(item->corners_x);
+	free(item);
 	return NULL;
+    }
 
     /* extract horizontal text */
     XGetSubImage(dpy, canvas, 0, 0, item->cols_in, item->rows_in,
@@ -992,16 +1011,16 @@ static RotatedTextItem *XRotCreateTextItem(Display *dpy, XFontStruct *font,
 
 	old_cols_in=item->cols_in;
 	old_rows_in=item->rows_in;
-	item->cols_in=(double)item->cols_in*style.magnify;
-	item->rows_in=(double)item->rows_in*style.magnify;
+	item->cols_in=(int)(item->cols_in*style.magnify);
+	item->rows_in=(int)(item->rows_in*style.magnify);
     }
 
     /* how big will rotated text be ? */
-    item->cols_out=fabs((double)item->rows_in*sin_angle) +
-	fabs((double)item->cols_in*cos_angle) +0.99999 +2;
+    item->cols_out=(int)(fabs(item->rows_in*sin_angle) +
+			 fabs(item->cols_in*cos_angle) +0.99999 +2);
 
-    item->rows_out=fabs((double)item->rows_in*cos_angle) +
-	fabs((double)item->cols_in*sin_angle) +0.99999 +2;
+    item->rows_out=(int)(fabs(item->rows_in*cos_angle) +
+			 fabs(item->cols_in*sin_angle) +0.99999 +2);
 
     if(item->cols_out%2==0)
 	item->cols_out++;
@@ -1011,8 +1030,13 @@ static RotatedTextItem *XRotCreateTextItem(Display *dpy, XFontStruct *font,
 
     /* create image to hold rotated text */
     item->ximage=MakeXImage(dpy, item->cols_out, item->rows_out);
-    if(item->ximage==NULL)
+    if(item->ximage==NULL) {
+	XDestroyImage(I_in);
+	free(item->corners_y);
+	free(item->corners_x);
+	free(item);
 	return NULL;
+    }
 
     byte_w_in=(item->cols_in-1)/8+1;
     byte_w_out=(item->cols_out-1)/8+1;
@@ -1021,32 +1045,33 @@ static RotatedTextItem *XRotCreateTextItem(Display *dpy, XFontStruct *font,
        a bit over-the-top */
 
     /* vertical distance from centre */
-    dj=0.5-(double)item->rows_out/2;
+    dj=0.5-item->rows_out/2.;
 
     /* where abouts does text actually lie in rotated image? */
     /* check angle within 0.5 degrees (0.008 radians) */
-    if(fabs((double)angle)<0.008 || fabs((double)angle-M_PI/2)<0.008 ||
-       fabs((double)angle-M_PI)<0.008 || fabs((double)angle-3*M_PI/2)<0.008) {
+    // This tolerance is in first R version, but not original
+    if(fabs(angle)<0.008 || fabs(angle-M_PI/2)<0.008 ||
+       fabs(angle-M_PI)<0.008 || fabs(angle-3*M_PI/2)<0.008) {
 	xl=0;
 	xr=(double)item->cols_out;
 	xinc=0;
     }
     else if(angle<M_PI) {
-	xl=(double)item->cols_out/2+
-	    (dj-(double)item->rows_in/(2*cos_angle))/
-	    tan(angle)-2;
-	xr=(double)item->cols_out/2+
-	    (dj+(double)item->rows_in/(2*cos_angle))/
+	xl=item->cols_out/2.+
+	    (dj-item->rows_in/(2.*cos_angle))/
+	    tan(angle)-2.;
+	xr=item->cols_out/2.+
+	    (dj+item->rows_in/(2.*cos_angle))/
 	    tan(angle)+2;
 	xinc=1./tan(angle);
     }
     else {
-	xl=(double)item->cols_out/2+
-	    (dj+(double)item->rows_in/(2*cos_angle))/
-	    tan(angle)-2;
-	xr=(double)item->cols_out/2+
-	    (dj-(double)item->rows_in/(2*cos_angle))/
-	    tan(angle)+2;
+	xl=item->cols_out/2.+
+	    (dj+item->rows_in/(2.*cos_angle))/
+	    tan(angle)-2.;
+	xr=item->cols_out/2.+
+	    (dj-item->rows_in/(2.*cos_angle))/
+	    tan(angle)+2.;
 
 	xinc=1./tan(angle);
     }
@@ -1055,7 +1080,7 @@ static RotatedTextItem *XRotCreateTextItem(Display *dpy, XFontStruct *font,
     for(j=0; j<item->rows_out; j++) {
 
 	/* no point re-calculating these every pass */
-	di=(double)((xl<0)?0:(int)xl)+0.5-(double)item->cols_out/2;
+	di=(double)((xl<0)?0:(int)xl)+0.5-item->cols_out/2.;
 	byte_out=(item->rows_out-j-1)*byte_w_out;
 
 	/* loop through meaningful columns */
@@ -1063,10 +1088,11 @@ static RotatedTextItem *XRotCreateTextItem(Display *dpy, XFontStruct *font,
 	    i<((xr>=item->cols_out)?item->cols_out:(int)xr); i++) {
 
 	    /* rotate coordinates */
-	    itd=(double)item->cols_in/2 + ( di*cos_angle + dj*sin_angle);
-	    jtd=(double)item->rows_in/2 - (-di*sin_angle + dj*cos_angle);
-	    it = itd - (itd < 0); /* (int) -0.5 == 0 */
-	    jt = jtd - (jtd < 0);
+	    // Using [ij]td is r6635
+	    itd=item->cols_in/2. + ( di*cos_angle + dj*sin_angle);
+	    jtd=item->rows_in/2. - (-di*sin_angle + dj*cos_angle);
+	    it = (int)(itd - (itd < 0)); /* (int) -0.5 == 0 */
+	    jt = (int)(jtd - (jtd < 0));
 
 	    /* set pixel if required */
 	    if(it>=0 && it<item->cols_in && jt>=0 && jt<item->rows_in)
@@ -1135,11 +1161,11 @@ static void XRotAddToLinkedList(Display *dpy, RotatedTextItem *item)
     /* this is pretty much the size of a RotatedTextItem */
 
     item->size=((item->cols_out-1)/8+1)*item->rows_out +
-	sizeof(XImage) + strlen(item->text) +
+	sizeof(XImage) + (int)strlen(item->text) +
 	item->nl*8*sizeof(double) + sizeof(RotatedTextItem);
 
     if(item->font_name!=NULL)
-	item->size+=strlen(item->font_name);
+	item->size+=(int)strlen(item->font_name);
     else
 	item->size+=sizeof(Font);
 
@@ -1269,8 +1295,8 @@ static XImage *XRotMagnifyImage(Display *dpy, XImage *ximage)
     rows_in=ximage->height;
 
     /* size of final image */
-    cols_out=(double)cols_in*style.magnify;
-    rows_out=(double)rows_in*style.magnify;
+    cols_out=(int)(cols_in*style.magnify);
+    rows_out=(int)(rows_in*style.magnify);
 
     /* this will hold final image */
     I_out=MakeXImage(dpy, cols_out, rows_out);
@@ -1289,10 +1315,10 @@ static XImage *XRotMagnifyImage(Display *dpy, XImage *ximage)
     /* loop over magnified image */
     for(j2=0; j2<rows_out; j2++) {
 	x=0;
-	j=y;
+	j=(int)y;
 
 	for(i2=0; i2<cols_out; i2++) {
-	    i=x;
+	    i=(int)x;
 
 	    /* bilinear interpolation - where are we on bitmap ? */
 	    /* right edge */
@@ -1389,7 +1415,7 @@ XPoint *XRotTextExtents(Display *dpy, XFontStruct *font, double angle,
     /* count number of sections in string */
     nl=1;
     if(align!=NONE)
-	for(i=strlen(text)-2; i >= 0; i--)
+	for(i=(int)strlen(text)-2; i >= 0; i--)
 	    if(text[i]=='\n')
 		nl++;
 
@@ -1406,7 +1432,7 @@ XPoint *XRotTextExtents(Display *dpy, XFontStruct *font, double angle,
 
     str3=strtok(str1, str2);
 
-    XTextExtents(font, str3, strlen(str3), &dir, &asc, &desc,
+    XTextExtents(font, str3, (int)strlen(str3), &dir, &asc, &desc,
 		 &overall);
 
     max_width=overall.rbearing;
@@ -1416,7 +1442,7 @@ XPoint *XRotTextExtents(Display *dpy, XFontStruct *font, double angle,
 	str3=strtok((char *)NULL, str2);
 
 	if(str3!=NULL) {
-	    XTextExtents(font, str3, strlen(str3), &dir, &asc, &desc,
+	    XTextExtents(font, str3, (int)strlen(str3), &dir, &asc, &desc,
 			 &overall);
 
 	    if(overall.rbearing>max_width)
@@ -1440,21 +1466,21 @@ XPoint *XRotTextExtents(Display *dpy, XFontStruct *font, double angle,
 
     /* y position */
     if(align==TLEFT || align==TCENTRE || align==TRIGHT)
-	hot_y=(double)rows_in/2*style.magnify;
+	hot_y=rows_in/2.*style.magnify;
     else if(align==MLEFT || align==MCENTRE || align==MRIGHT)
 	hot_y=0;
     else if(align==BLEFT || align==BCENTRE || align==BRIGHT)
-	hot_y= -(double)rows_in/2*style.magnify;
+	hot_y= -rows_in/2.*style.magnify;
     else
-	hot_y= -((double)rows_in/2-(double)font->descent)*style.magnify;
+	hot_y= -(rows_in/2.- font->descent)*style.magnify;
 
     /* x position */
     if(align==TLEFT || align==MLEFT || align==BLEFT || align==NONE)
-	hot_x= -(double)max_width/2*style.magnify;
+	hot_x= -max_width/2.*style.magnify;
     else if(align==TCENTRE || align==MCENTRE || align==BCENTRE)
 	hot_x=0;
     else
-	hot_x=(double)max_width/2*style.magnify;
+	hot_x=max_width/2.*style.magnify;
 
     /* reserve space for XPoints */
     xp_in=(XPoint *)malloc((unsigned)(5*sizeof(XPoint)));
@@ -1462,27 +1488,29 @@ XPoint *XRotTextExtents(Display *dpy, XFontStruct *font, double angle,
 	return NULL;
 
     xp_out=(XPoint *)malloc((unsigned)(5*sizeof(XPoint)));
-    if(!xp_out)
+    if(!xp_out) {
+	free(xp_in);
 	return NULL;
+    }
 
     /* bounding box when horizontal, relative to bitmap centre */
-    xp_in[0].x= -(double)cols_in*style.magnify/2-style.bbx_pad;
-    xp_in[0].y= (double)rows_in*style.magnify/2+style.bbx_pad;
-    xp_in[1].x= (double)cols_in*style.magnify/2+style.bbx_pad;
-    xp_in[1].y= (double)rows_in*style.magnify/2+style.bbx_pad;
-    xp_in[2].x= (double)cols_in*style.magnify/2+style.bbx_pad;
-    xp_in[2].y= -(double)rows_in*style.magnify/2-style.bbx_pad;
-    xp_in[3].x= -(double)cols_in*style.magnify/2-style.bbx_pad;
-    xp_in[3].y=-(double)rows_in*style.magnify/2-style.bbx_pad;
+    xp_in[0].x= -(short)(cols_in*style.magnify/2. - style.bbx_pad);
+    xp_in[0].y= (short)(rows_in*style.magnify/2. + style.bbx_pad);
+    xp_in[1].x= (short)(cols_in*style.magnify/2. + style.bbx_pad);
+    xp_in[1].y= (short)(rows_in*style.magnify/2. + style.bbx_pad);
+    xp_in[2].x= (short)(cols_in*style.magnify/2. + style.bbx_pad);
+    xp_in[2].y= -(short)(rows_in*style.magnify/2. - style.bbx_pad);
+    xp_in[3].x= -(short)(cols_in*style.magnify/2. - style.bbx_pad);
+    xp_in[3].y=-(short)(rows_in*style.magnify/2. - style.bbx_pad);
     xp_in[4].x=xp_in[0].x;
     xp_in[4].y=xp_in[0].y;
 
     /* rotate and translate bounding box */
     for(i=0; i<5; i++) {
-	xp_out[i].x=(double)x + ( ((double)xp_in[i].x-hot_x)*cos_angle +
-				  ((double)xp_in[i].y+hot_y)*sin_angle);
-	xp_out[i].y=(double)y + (-((double)xp_in[i].x-hot_x)*sin_angle +
-				 ((double)xp_in[i].y+hot_y)*cos_angle);
+	xp_out[i].x=(short)(x + ( ((double)xp_in[i].x-hot_x)*cos_angle +
+				  ((double)xp_in[i].y+hot_y)*sin_angle));
+	xp_out[i].y=(short)(y + (-((double)xp_in[i].x-hot_x)*sin_angle +
+				 ((double)xp_in[i].y+hot_y)*cos_angle));
     }
 
     free((char *)xp_in);
@@ -1642,8 +1670,8 @@ XmbRotPaintAlignedString(Display *dpy, XFontSet font, double angle,
     hot_yp = hot_x*sin_angle + hot_y*cos_angle;
 
     /* where should top left corner of bitmap go ? */
-    xp=(double)x-((double)item->cols_out/2 +hot_xp);
-    yp=(double)y-((double)item->rows_out/2 -hot_yp);
+    xp=(int)(x-((double)item->cols_out/2 +hot_xp));
+    yp=(int)(y-((double)item->rows_out/2 -hot_yp));
 
     /* by default we draw the rotated bitmap, solid */
     bitmap_to_paint=item->bitmap;
@@ -1785,8 +1813,10 @@ static int XmbRotDrawHorizontalString(Display *dpy, XFontSet font,
 	    GCTileStipXOrigin|GCTileStipYOrigin|GCPlaneMask|GCClipMask, my_gc);
 
     /* count number of sections in string */
+    // for() loop changed in r42804 
+    // (efficiency, PR#9902, avoid recalculating strlen)
     if(align!=NONE)
-	for(i=strlen(text)-2; i >= 0; i--)
+	for(i=(int)strlen(text)-2; i >= 0; i--)
 	    if(text[i]=='\n')
 		nl++;
 
@@ -1820,7 +1850,7 @@ static int XmbRotDrawHorizontalString(Display *dpy, XFontSet font,
     do {
 
 	XRectangle    r_ink, r_log;
-	XRfTextExtents(font, str3, strlen(str3), &r_ink, &r_log);
+	XRfTextExtents(font, str3, (int)strlen(str3), &r_ink, &r_log);
 
 	/* where to draw section in x ? */
 	if(align==TLEFT || align==MLEFT || align==BLEFT || align==NONE)
@@ -1831,7 +1861,7 @@ static int XmbRotDrawHorizontalString(Display *dpy, XFontSet font,
 	    xp=x-r_log.width;
 
 	/* draw string onto bitmap */
-	XRfDrawString(dpy, drawable, font, my_gc, xp, yp, str3, strlen(str3));
+	XRfDrawString(dpy, drawable, font, my_gc, xp, yp, str3, (int)strlen(str3));
 
 	/* move to next line */
 	yp+=height;
@@ -1896,6 +1926,7 @@ static RotatedTextItem
        angles close enough (<0.0001 here, could be smaller);
        HORIZONTAL alignment matches, OR it's a one line string;
        magnifications the same */
+    // original version had 0.00001, first R version 0.0001
 
     while(i1 && !item) {
 	/* match everything EXCEPT fontname/ID */
@@ -2034,7 +2065,7 @@ static RotatedTextItem
     /* count number of sections in string */
     item->nl=1;
     if(align!=NONE)
-	for(i=strlen(text)-2; i >= 0; i--)
+	for(i=(int)strlen(text)-2; i >= 0; i--)
 	    if(text[i]=='\n')
 		item->nl++;
 
@@ -2046,12 +2077,14 @@ static RotatedTextItem
 
     /* find width of longest section */
     str1=strdup(text);
-    if(str1==NULL)
+    if(str1==NULL) {
+	free(item);
 	return NULL;
+    }
 
     str3=strtok(str1, str2);
 
-    XRfTextExtents(font, str3, strlen(str3), &r_ink, &r_log);
+    XRfTextExtents(font, str3, (int)strlen(str3), &r_ink, &r_log);
 
     item->max_width=r_log.width;
 
@@ -2060,7 +2093,7 @@ static RotatedTextItem
 	str3=strtok((char *)NULL, str2);
 
 	if(str3!=NULL) {
-	  XRfTextExtents(font, str3, strlen(str3), &r_ink, &r_log);
+	  XRfTextExtents(font, str3, (int)strlen(str3), &r_ink, &r_log);
 
 	    if(r_log.width>item->max_width)
 		item->max_width=r_log.width;
@@ -2103,13 +2136,22 @@ static RotatedTextItem
     /* text background will be drawn using XFillPolygon */
     item->corners_x=
 	(double *)malloc((unsigned)(4*item->nl*sizeof(double)));
-    if(!item->corners_x)
+    if(!item->corners_x) {
+	free(item);
+	XFreeGC(dpy, font_gc);
+	XFreePixmap(dpy, canvas);
 	return NULL;
+    }
 
     item->corners_y=
 	(double *)malloc((unsigned)(4*item->nl*sizeof(double)));
-    if(!item->corners_y)
+    if(!item->corners_y) {
+	free(item->corners_x);
+	free(item);
+	XFreeGC(dpy, font_gc);
+	XFreePixmap(dpy, canvas);
 	return NULL;
+    }
 
     /* draw text horizontally */
 
@@ -2117,15 +2159,21 @@ static RotatedTextItem
     yp=RXFontStructOfFontSet(font)->ascent;
 
     str1=strdup(text);
-    if(str1==NULL)
+    if(str1==NULL) {
+	free(item->corners_y);
+	free(item->corners_x);
+	free(item);
+	XFreeGC(dpy, font_gc);
+	XFreePixmap(dpy, canvas);
 	return NULL;
+    }
 
     str3=strtok(str1, str2);
 
     /* loop through each section in the string */
     do {
 	XRectangle    r_ink, r_log;
-	XRfTextExtents(font, str3, strlen(str3), &r_ink, &r_log);
+	XRfTextExtents(font, str3, (int)strlen(str3), &r_ink, &r_log);
 
 	/* where to draw section in x ? */
 	if(align==TLEFT || align==MLEFT || align==BLEFT || align==NONE)
@@ -2136,7 +2184,7 @@ static RotatedTextItem
 	    xp=item->max_width-r_log.width;
 
 	/* draw string onto bitmap */
-	XRfDrawString(dpy, canvas, font, font_gc, xp, yp, str3, strlen(str3));
+	XRfDrawString(dpy, canvas, font, font_gc, xp, yp, str3, (int)strlen(str3));
 
 	/* keep a note of corner positions of this string */
 	item->corners_x[ic]=((double)xp-(double)item->cols_in/2)*style.magnify;
@@ -2164,8 +2212,14 @@ static RotatedTextItem
 
     /* create image to hold horizontal text */
     I_in=MakeXImage(dpy, item->cols_in, item->rows_in);
-    if(I_in==NULL)
+    if(I_in==NULL) {
+	free(item->corners_y);
+	free(item->corners_x);
+	free(item);
+	XFreeGC(dpy, font_gc);
+	XFreePixmap(dpy, canvas);
 	return NULL;
+    }
 
     /* extract horizontal text */
     XGetSubImage(dpy, canvas, 0, 0, item->cols_in, item->rows_in,
@@ -2178,16 +2232,16 @@ static RotatedTextItem
 
 	old_cols_in=item->cols_in;
 	old_rows_in=item->rows_in;
-	item->cols_in=(double)item->cols_in*style.magnify;
-	item->rows_in=(double)item->rows_in*style.magnify;
+	item->cols_in=(int)(item->cols_in*style.magnify);
+	item->rows_in=(int)(item->rows_in*style.magnify);
     }
 
     /* how big will rotated text be ? */
-    item->cols_out=fabs((double)item->rows_in*sin_angle) +
-	fabs((double)item->cols_in*cos_angle) +0.99999 +2;
+    item->cols_out=(int)(fabs(item->rows_in*sin_angle) +
+			 fabs(item->cols_in*cos_angle) +0.99999 +2);
 
-    item->rows_out=fabs((double)item->rows_in*cos_angle) +
-	fabs((double)item->cols_in*sin_angle) +0.99999 +2;
+    item->rows_out=(int)(fabs(item->rows_in*cos_angle) +
+			 fabs(item->cols_in*sin_angle) +0.99999 +2);
 
     if(item->cols_out%2==0)
 	item->cols_out++;
@@ -2197,8 +2251,15 @@ static RotatedTextItem
 
     /* create image to hold rotated text */
     item->ximage=MakeXImage(dpy, item->cols_out, item->rows_out);
-    if(item->ximage==NULL)
+    if(item->ximage==NULL) {
+	XDestroyImage(I_in);
+	free(item->corners_y);
+	free(item->corners_x);
+	free(item);
+	XFreeGC(dpy, font_gc);
+	XFreePixmap(dpy, canvas);
 	return NULL;
+    }
 
     byte_w_in=(item->cols_in-1)/8+1;
     byte_w_out=(item->cols_out-1)/8+1;
@@ -2211,9 +2272,9 @@ static RotatedTextItem
 
     /* where abouts does text actually lie in rotated image? */
     /* check angle within 0.5 degrees (0.008 radians) */
-    if(fabs((double)angle)<0.008 || fabs((double)angle-M_PI/2)<0.008 ||
-       fabs((double)angle-M_PI)<0.008 || fabs((double)angle-3*M_PI/2)<0.008 ||
-       fabs((double)angle-2*M_PI)<0.008) {
+    if(fabs(angle)<0.008 || fabs(angle-M_PI/2)<0.008 ||
+       fabs(angle-M_PI)<0.008 || fabs(angle-3*M_PI/2)<0.008 ||
+       fabs(angle-2*M_PI)<0.008) {
 	xl=0;
 	xr=(double)item->cols_out;
 	xinc=0;
@@ -2252,8 +2313,8 @@ static RotatedTextItem
 	    /* rotate coordinates */
 	    itd=(double)item->cols_in/2 + ( di*cos_angle + dj*sin_angle);
 	    jtd=(double)item->rows_in/2 - (-di*sin_angle + dj*cos_angle);
-	    it = itd - (itd < 0); /* (int) -0.5 == 0 */
-	    jt = jtd - (jtd < 0);
+	    it = (int)(itd - (itd < 0)); /* (int) -0.5 == 0 */
+	    jt = (int)(jtd - (jtd < 0));
 
 	    /* set pixel if required */
 	    if(it>=0 && it<item->cols_in && jt>=0 && jt<item->rows_in)
@@ -2328,7 +2389,7 @@ XPoint *XmbRotTextExtents(Display *dpy, XFontSet font, double angle,
     /* count number of sections in string */
     nl=1;
     if(align!=NONE)
-	for(i=strlen(text)-2; i >= 0; i--)
+	for(i=(int)strlen(text)-2; i >= 0; i--)
 	    if(text[i]=='\n')
 		nl++;
 
@@ -2345,7 +2406,7 @@ XPoint *XmbRotTextExtents(Display *dpy, XFontSet font, double angle,
 
     str3=strtok(str1, str2);
 
-    XRfTextExtents(font, str3, strlen(str3), &r_ink, &r_log);
+    XRfTextExtents(font, str3, (int)strlen(str3), &r_ink, &r_log);
 
     max_width=r_log.width;
 
@@ -2354,7 +2415,7 @@ XPoint *XmbRotTextExtents(Display *dpy, XFontSet font, double angle,
 	str3=strtok((char *)NULL, str2);
 
 	if(str3!=NULL) {
-	  XRfTextExtents(font, str3, strlen(str3), &r_ink, &r_log);
+	  XRfTextExtents(font, str3, (int)strlen(str3), &r_ink, &r_log);
 
 	    if(r_log.width>max_width)
 		max_width=r_log.width;
@@ -2401,27 +2462,29 @@ XPoint *XmbRotTextExtents(Display *dpy, XFontSet font, double angle,
 	return NULL;
 
     xp_out=(XPoint *)malloc((unsigned)(5*sizeof(XPoint)));
-    if(!xp_out)
+    if(!xp_out) {
+	free(xp_in);
 	return NULL;
+    }
 
     /* bounding box when horizontal, relative to bitmap centre */
-    xp_in[0].x= -(double)cols_in*style.magnify/2-style.bbx_pad;
-    xp_in[0].y= (double)rows_in*style.magnify/2+style.bbx_pad;
-    xp_in[1].x= (double)cols_in*style.magnify/2+style.bbx_pad;
-    xp_in[1].y= (double)rows_in*style.magnify/2+style.bbx_pad;
-    xp_in[2].x= (double)cols_in*style.magnify/2+style.bbx_pad;
-    xp_in[2].y= -(double)rows_in*style.magnify/2-style.bbx_pad;
-    xp_in[3].x= -(double)cols_in*style.magnify/2-style.bbx_pad;
-    xp_in[3].y=-(double)rows_in*style.magnify/2-style.bbx_pad;
+    xp_in[0].x= -(short)(cols_in*style.magnify/2. - style.bbx_pad);
+    xp_in[0].y= (short)(rows_in*style.magnify/2. + style.bbx_pad);
+    xp_in[1].x= (short)(cols_in*style.magnify/2. + style.bbx_pad);
+    xp_in[1].y= (short)(rows_in*style.magnify/2. + style.bbx_pad);
+    xp_in[2].x= (short)(cols_in*style.magnify/2. + style.bbx_pad);
+    xp_in[2].y= -(short)(rows_in*style.magnify/2. - style.bbx_pad);
+    xp_in[3].x= -(short)(cols_in*style.magnify/2. - style.bbx_pad);
+    xp_in[3].y=-(short)(rows_in*style.magnify/2. - style.bbx_pad);
     xp_in[4].x=xp_in[0].x;
     xp_in[4].y=xp_in[0].y;
 
     /* rotate and translate bounding box */
     for(i=0; i<5; i++) {
-	xp_out[i].x=(double)x + ( ((double)xp_in[i].x-hot_x)*cos_angle +
-				  ((double)xp_in[i].y+hot_y)*sin_angle);
-	xp_out[i].y=(double)y + (-((double)xp_in[i].x-hot_x)*sin_angle +
-				 ((double)xp_in[i].y+hot_y)*cos_angle);
+	xp_out[i].x=(short)(x + ( ((double)xp_in[i].x-hot_x)*cos_angle +
+				((double)xp_in[i].y+hot_y)*sin_angle));
+	xp_out[i].y=(short)(y + (-((double)xp_in[i].x-hot_x)*sin_angle +
+				 ((double)xp_in[i].y+hot_y)*cos_angle));
     }
 
     free((char *)xp_in);
diff --git a/src/modules/internet/Makefile.in b/src/modules/internet/Makefile.in
index f6a6468..62139cb 100644
--- a/src/modules/internet/Makefile.in
+++ b/src/modules/internet/Makefile.in
@@ -11,7 +11,7 @@ R_HOME = $(top_builddir)
 
 include $(top_builddir)/Makeconf
 
-SOURCES = Rhttpd.c Rsock.c internet.c nanoftp.c nanohttp.c sock.c sockconn.c
+SOURCES = Rhttpd.c Rsock.c internet.c libcurl.c nanoftp.c nanohttp.c sock.c sockconn.c
 HEADERS = sock.h
 DEPENDS = $(SOURCES:.c=.d)
 OBJECTS = $(SOURCES:.c=.o)
@@ -22,9 +22,10 @@ DISTFILES = \
 	dllversion.rc
 
 internet_la = internet$(SHLIB_EXT)
-internet_la_LIBADD = $(LIBR1) @INTERNET_LIBS@ @DYLIB_UNDEFINED_ALLOWED_FALSE@ $(LIBINTL)
+internet_la_LIBADD = $(CURL_LIBS) $(LIBR1) @INTERNET_LIBS@ @DYLIB_UNDEFINED_ALLOWED_FALSE@ $(LIBINTL)
 
-ALL_CFLAGS = $(ALL_CFLAGS_LO) @C_VISIBILITY@
+ALL_CPPFLAGS = $(R_XTRA_CPPFLAGS) $(CURL_CPPFLAGS) $(CPPFLAGS) $(DEFS)
+ALL_CFLAGS = $(ALL_CFLAGS_LO)  @C_VISIBILITY@
 
 all: R
 
diff --git a/src/modules/internet/Makefile.win b/src/modules/internet/Makefile.win
index f14a408..4df445d 100644
--- a/src/modules/internet/Makefile.win
+++ b/src/modules/internet/Makefile.win
@@ -1,44 +1,34 @@
 #-*- Makefile -*-
 include ../../gnuwin32/MkRules
 
-MODULE=internet
-all: makeMakedeps ../../../modules$(R_ARCH)/internet.dll ../../../modules$(R_ARCH)/internet2.dll
+MODULE = internet
+all: makeMakedeps ../../../modules$(R_ARCH)/internet.dll
 
-CSOURCES=internet.c nanoftp.c nanohttp.c sockconn.c Rsock.c sock.c Rhttpd.c
+CSOURCES = internet.c libcurl.c nanoftp.c nanohttp.c sockconn.c Rsock.c sock.c Rhttpd.c
 
-CPPFLAGS=-I../../include -I../../extra/graphapp -DHAVE_CONFIG_H
+CPPFLAGS = -I../../include -I../../extra/graphapp -DHAVE_CONFIG_H
 
-WSOCK=-lws2_32
+EXTRA_LIBS = -lwininet -lws2_32
 
-../../../modules$(R_ARCH)/internet.dll: internet.o nanoftp.o nanohttp.o sockconn.o Rhttpd.o Rsock.o sock.o dllversion.o
+ifdef USE_LIBCURL
+libcurl-CPPFLAGS += -DHAVE_CURL_CURL_H -DHAVE_LIBCURL -DCURL_STATICLIB -I"$(CURL_PATH)"/include
+EXTRA_LIBS += -L"$(CURL_PATH)"/lib$(R_ARCH) $(CURL_LIBS)
+endif
+
+
+../../../modules$(R_ARCH)/internet.dll: internet.o libcurl.o nanoftp.o nanohttp.o sockconn.o Rhttpd.o Rsock.o sock.o dllversion.o
 	@$(MKDIR) -p ../../../modules$(R_ARCH)
 	@$(ECHO) "EXPORTS" > internet.def
 	@$(ECHO) " R_init_internet" >> internet.def
-	$(DLL) -shared  -o $@ $^ internet.def -L../../../$(IMPDIR) -lR -lRgraphapp $(WSOCK)
+	$(DLL) -shared  -o $@ $^ internet.def -L../../../$(IMPDIR) -lR -lRgraphapp $(EXTRA_LIBS)
 	@$(RM) internet.def
 
-../../../modules$(R_ARCH)/internet2.dll: internet2.o sockconn.o Rhttpd.o Rsock.o sock.o dllversion.o
-	@$(MKDIR) -p ../../../modules$(R_ARCH)
-	@$(ECHO) "EXPORTS" > internet2.def
-	@$(ECHO) " R_init_internet2" >> internet2.def
-	$(DLL) -shared  -o $@ $^ internet2.def -L../../../$(IMPDIR) -lR -lRgraphapp -lwininet $(WSOCK) 
-	@$(RM) internet2.def
-
-internet2.o: internet.c
-	@$(CC) $(CPPFLAGS) $(CFLAGS) -DUSE_WININET -c $< -o $@
-
 clean:
 	@$(RM) Makedeps *.d *.o *.def *.dll
 
 # Dependencies
 dllversion.o: ../../include/Rversion.h
-DEPS=$(CSOURCES:.c=.d) internet2.d
-
-internet2.d: internet.c
-	@echo "making $@ from $<"
-	@$(CC) -MM $(CPPFLAGS) -DUSE_WININET -c $< -o foo
-	@sed -e 's/internet.o/internet2.o/' foo > internet2.d
-	@rm foo
+DEPS = $(CSOURCES:.c=.d)
 
 
 makeMakedeps: $(DEPS)
diff --git a/src/modules/internet/Rhttpd.c b/src/modules/internet/Rhttpd.c
index f603ad3..3b18b03 100644
--- a/src/modules/internet/Rhttpd.c
+++ b/src/modules/internet/Rhttpd.c
@@ -1,6 +1,6 @@
 /*
  *  R : A Computer Language for Statistical Data Analysis
- *  Copyright (C) 2009-12 The R Core Team.
+ *  Copyright (C) 2009-2015 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
@@ -14,7 +14,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  */
 
 /* This is a small HTTP server that serves requests by evaluating
@@ -64,12 +64,10 @@
 # ifdef HAVE_UNISTD_H
 #  include <unistd.h>
 # endif
-# ifdef HAVE_BSD_NETWORKING
-#  include <netdb.h>
-#  include <sys/socket.h>
-#  include <netinet/in.h>
-#  include <arpa/inet.h>
-# endif
+# include <netdb.h>
+# include <sys/socket.h>
+# include <netinet/in.h>
+# include <arpa/inet.h>
 # include <errno.h>
 
 # define sockerrno errno
@@ -539,7 +537,9 @@ static SEXP handler_for_path(const char *path) {
 	    /* we cache custom_handlers_env so in case it has not been loaded yet, fetch it */
 	    if (!custom_handlers_env) {
 		if (!R_HandlersName) R_HandlersName = install(".httpd.handlers.env");
-		custom_handlers_env = eval(R_HandlersName, R_FindNamespace(mkString("tools")));
+		SEXP toolsNS = PROTECT(R_FindNamespace(mkString("tools")));
+		custom_handlers_env = eval(R_HandlersName, toolsNS);
+		UNPROTECT(1); /* toolsNS */
 	    }
 	    /* we only proceed if .httpd.handlers.env really exists */
 	    if (TYPEOF(custom_handlers_env) == ENVSXP) {
@@ -584,7 +584,10 @@ static void process_request_(void *ptr)
 	DBG(Rprintf("eval(try(httpd('%s'),silent=TRUE))\n", c->url));
 	
 	/* evaluate the above in the tools namespace */
-	x = PROTECT(eval(x, R_FindNamespace(mkString("tools"))));
+	SEXP toolsNS = PROTECT(R_FindNamespace(mkString("tools")));
+	x = eval(x, toolsNS);
+	UNPROTECT(1); /* toolsNS */
+	PROTECT(x);
 
 	/* the result is expected to have one of the following forms:
 
@@ -681,6 +684,7 @@ static void process_request_(void *ptr)
 				    free(fbuf);
 				    UNPROTECT(7);
 				    c->attr |= CONNECTION_CLOSE;
+				    fclose(f);
 				    return;
 				}
 				send_response(c->sock, fbuf, rd);
@@ -690,6 +694,7 @@ static void process_request_(void *ptr)
 			} else { /* allocation error - get out */
 			    UNPROTECT(7);
 			    c->attr |= CONNECTION_CLOSE;
+			    fclose(f);
 			    return;
 			}
 		    }
@@ -951,7 +956,11 @@ static void worker_input_handler(void *data) {
 			    }
 			    if (!strcmp(bol, "content-type")) {
 				char *l = k;
-				while (*l) { if (*l >= 'A' && *l <= 'Z') *l |= 0x20; l++; }
+				/* convert content-type to lowercase to facilitate comparison
+				   since MIME types are case-insensitive.
+				   However, we have to stop at ; since parameters
+				   may be case-sensitive (see PR 16541) */
+				while (*l && *l != ';') { if (*l >= 'A' && *l <= 'Z') *l |= 0x20; l++; }
 				c->attr |= CONTENT_TYPE;
 				if (c->content_type) free(c->content_type);
 				c->content_type = strdup(k);
diff --git a/src/modules/internet/Rsock.c b/src/modules/internet/Rsock.c
index 5da9aaa..34ecbc4 100644
--- a/src/modules/internet/Rsock.c
+++ b/src/modules/internet/Rsock.c
@@ -2,7 +2,7 @@
  *  R : A Computer Language for Statistical Data Analysis
 
  *  Copyright (C) 1996, 1997  Robert Gentleman and Ross Ihaka
- *  Copyright (C) 1998-2012   The R Core Team
+ *  Copyright (C) 1998-2015   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
@@ -16,7 +16,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  */
 
 /* <UTF8> chars are handled as a whole */
@@ -150,7 +150,6 @@ void in_Rsockwrite(int *sockp, char **buf, int *start, int *end, int *len)
 
 /* --------- for use in socket connections ---------- */
 
-#ifdef HAVE_SOCKETS
 #include <R_ext/R-ftp-http.h>
 
 #ifdef Win32
@@ -158,12 +157,10 @@ void in_Rsockwrite(int *sockp, char **buf, int *start, int *end, int *len)
 #include <io.h>
 #define EWOULDBLOCK             WSAEWOULDBLOCK
 #define EINPROGRESS             WSAEINPROGRESS
-#endif
-
-#ifdef HAVE_BSD_NETWORKING
-#  include <netdb.h>
-#  include <sys/socket.h>
-#  include <netinet/in.h>
+#else
+# include <netdb.h>
+# include <sys/socket.h>
+# include <netinet/in.h>
 #endif
 
 #ifdef HAVE_FCNTL_H
@@ -260,7 +257,7 @@ static int R_SocketWait(int sockfd, int write, int timeout)
 	howmany = R_SelectEx(maxfd+1, &rfd, &wfd, NULL, &tv, NULL);
 
 	if (howmany < 0) {
-	    return -1;
+	    return -socket_errno();
 	}
 	if (howmany == 0) {
 	    if(used >= timeout) return 1;
@@ -345,7 +342,7 @@ int R_SocketWaitMultiple(int nsock, int *insockfd, int *ready, int *write,
 	howmany = R_SelectEx(maxfd+1, &rfd, &wfd, NULL, &tv, NULL);
 
 	if (howmany < 0) {
-	    return -1;
+	    return -socket_errno();
 	}
 	if (howmany == 0) {
 	    if(mytimeout >= 0 && used >= mytimeout) {
@@ -520,7 +517,8 @@ ssize_t R_SockRead(int sockp, void *buf, size_t len, int blocking, int timeout)
 {
     ssize_t res;
 
-    if(blocking && R_SocketWait(sockp, 0, timeout) != 0) return 0;
+    if(blocking && (res = R_SocketWait(sockp, 0, timeout)) != 0)
+        return res < 0 ? res : 0; /* socket error or timeout */
     res = recv(sockp, buf, len, 0);
     return (res >= 0) ? res : -socket_errno();
 }
@@ -537,7 +535,12 @@ int R_SockListen(int sockp, char *buf, int len, int timeout)
     /* inserting a wait here will eliminate most blocking, but there
        are scenarios under which the Sock_listen call might block
        after the wait has completed. LT */
-    R_SocketWait(sockp, 0, timeout);
+    int res = 0;
+    do {
+        res = R_SocketWait(sockp, 0, timeout);
+    } while (res < 0 && -res == EINTR);
+    if(res != 0)
+        return -1;              /* socket error or timeout */
     return Sock_listen(sockp, buf, len, NULL);
 }
 
@@ -552,7 +555,8 @@ ssize_t R_SockWrite(int sockp, const void *buf, size_t len, int timeout)
        interface since there is no way to tell how much, if anything,
        has been written.  LT */
     do {
-	if(R_SocketWait(sockp, 1, timeout) != 0) return out;
+	if((res = R_SocketWait(sockp, 1, timeout)) != 0)
+	    return res < 0 ? res : 0; /* socket error or timeout */
 	res = send(sockp, buf, len, 0);
 	if (res < 0 && socket_errno() != EWOULDBLOCK)
 	    return -socket_errno();
@@ -565,4 +569,3 @@ ssize_t R_SockWrite(int sockp, const void *buf, size_t len, int timeout)
     return out;
 }
 
-#endif
diff --git a/src/modules/internet/dllversion.rc b/src/modules/internet/dllversion.rc
index 56f7d01..469aabc 100644
--- a/src/modules/internet/dllversion.rc
+++ b/src/modules/internet/dllversion.rc
@@ -16,7 +16,7 @@ BEGIN
             VALUE "FileVersion", R_MAJOR "." R_MINOR " " R_STATUS " (" R_YEAR "-" R_MONTH "-" R_DAY ")\0"
             VALUE "LegalCopyright", "R Core Team 1995-" R_YEAR "\0"
             VALUE "R Version", R_MAJOR "." R_MINOR " " R_STATUS " (" R_YEAR "-" R_MONTH "-" R_DAY ")\0"
-            VALUE "Project info", "http://www.r-project.org\0"
+            VALUE "Project info", "https://www.r-project.org\0"
         END
     END
     BLOCK "VarFileInfo"
diff --git a/src/modules/internet/internet.c b/src/modules/internet/internet.c
index 2d1e0b3..0a43053 100644
--- a/src/modules/internet/internet.c
+++ b/src/modules/internet/internet.c
@@ -1,6 +1,6 @@
 /*
  *  R : A Computer Language for Statistical Data Analysis
- *  Copyright (C) 2000-2014   The R Core Team.
+ *  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
@@ -14,7 +14,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  */
 
 /* <UTF8> the only interpretation of char is ASCII */
@@ -23,6 +23,7 @@
 #include <config.h>
 #endif
 
+// for contexts
 #define R_USE_SIGNALS 1
 #include <Defn.h>
 #include <Fileio.h>
@@ -39,6 +40,45 @@ static void *in_R_FTPOpen(const char *url);
 static int   in_R_FTPRead(void *ctx, char *dest, int len);
 static void  in_R_FTPClose(void *ctx);
 
+SEXP in_do_curlVersion(SEXP call, SEXP op, SEXP args, SEXP rho);
+SEXP in_do_curlGetHeaders(SEXP call, SEXP op, SEXP args, SEXP rho);
+SEXP in_do_curlDownload(SEXP call, SEXP op, SEXP args, SEXP rho);
+Rconnection 
+in_newCurlUrl(const char *description, const char * const mode, int type);
+
+#ifdef Win32
+static void *in_R_HTTPOpen2(const char *url, const char *headers, const int cacheOK);
+static int   in_R_HTTPRead2(void *ctx, char *dest, int len);
+static void  in_R_HTTPClose2(void *ctx);
+static void *in_R_FTPOpen2(const char *url);
+
+#define Ri_HTTPOpen(url, headers, cacheOK) \
+    (meth ? in_R_HTTPOpen2(url, headers, cacheOK) : \
+	in_R_HTTPOpen(url, headers, cacheOK));
+
+#define Ri_HTTPRead(ctx, dest, len) \
+    (meth ? in_R_HTTPRead2(ctx, dest, len) : in_R_HTTPRead(ctx, dest, len))
+
+#define Ri_HTTPClose(ctx) \
+    if(meth) in_R_HTTPClose2(ctx); else in_R_HTTPClose(ctx);
+
+#define Ri_FTPOpen(url) \
+    (meth ? in_R_FTPOpen2(url) : in_R_FTPOpen(url));
+
+#define Ri_FTPRead(ctx, dest, len) \
+    (meth ? in_R_HTTPRead2(ctx, dest, len) : in_R_FTPRead(ctx, dest, len))
+
+#define Ri_FTPClose(ctx) \
+    if(meth) in_R_HTTPClose2(ctx); else in_R_FTPClose(ctx);
+
+#else
+#define Ri_HTTPOpen in_R_HTTPOpen
+#define Ri_HTTPRead in_R_HTTPRead
+#define Ri_HTTPClose in_R_HTTPClose
+#define Ri_FTPOpen in_R_FTPOpen
+#define Ri_FTPRead in_R_FTPRead
+#define Ri_FTPClose in_R_FTPClose
+#endif
 
 #include <Rmodules/Rinternet.h>
 
@@ -54,11 +94,7 @@ static void  in_R_FTPClose(void *ctx);
 
 /* ------------------- internet access functions  --------------------- */
 
-#if defined(USE_WININET_ASYNC) && !defined(USE_WININET)
-#define USE_WININET 2
-#endif
-
-static Rboolean IDquiet=TRUE;
+static Rboolean IDquiet = TRUE;
 
 static Rboolean url_open(Rconnection con)
 {
@@ -72,20 +108,21 @@ static Rboolean url_open(Rconnection con)
     }
 
     switch(type) {
-#ifdef USE_WININET
+#ifdef Win32
     case HTTPSsh:
+	    warning(_("for https:// URLs use method = \"wininet\""));
+	    return FALSE;
 #endif
     case HTTPsh:
     {
 	SEXP sheaders, agentFun;
 	const char *headers;
-#ifdef USE_WININET
-	PROTECT(agentFun = lang2(install("makeUserAgent"), ScalarLogical(0)));
-#else
-	PROTECT(agentFun = lang1(install("makeUserAgent")));
-#endif
-	PROTECT(sheaders = eval(agentFun, R_FindNamespace(mkString("utils"))));
-
+	SEXP s_makeUserAgent = install("makeUserAgent");
+	agentFun = PROTECT(lang1(s_makeUserAgent)); // defaults to ,TRUE
+	SEXP utilsNS = PROTECT(R_FindNamespace(mkString("utils")));
+	sheaders = eval(agentFun, utilsNS);
+	UNPROTECT(1); /* utilsNS */
+	PROTECT(sheaders);
 	if(TYPEOF(sheaders) == NILSXP)
 	    headers = NULL;
 	else
@@ -111,8 +148,9 @@ static Rboolean url_open(Rconnection con)
 	}
 	((Rurlconn)(con->private))->ctxt = ctxt;
 	break;
+
     default:
-	warning(_("unsupported URL scheme"));
+	warning(_("scheme not supported in URL '%s'"), url);
 	return FALSE;
     }
 
@@ -130,13 +168,15 @@ static void url_close(Rconnection con)
 {
     UrlScheme type = ((Rurlconn)(con->private))->type;
     switch(type) {
-    case HTTPSsh:
     case HTTPsh:
+    case HTTPSsh:
 	in_R_HTTPClose(((Rurlconn)(con->private))->ctxt);
 	break;
     case FTPsh:
 	in_R_FTPClose(((Rurlconn)(con->private))->ctxt);
 	break;
+    default:
+	break;
     }
     con->isopen = FALSE;
 }
@@ -149,13 +189,15 @@ static int url_fgetc_internal(Rconnection con)
     size_t n = 0; /* -Wall */
 
     switch(type) {
-    case HTTPSsh:
     case HTTPsh:
+    case HTTPSsh:
 	n = in_R_HTTPRead(ctxt, (char *)&c, 1);
 	break;
     case FTPsh:
 	n = in_R_FTPRead(ctxt, (char *)&c, 1);
 	break;
+    default:
+	break;
     }
     return (n == 1) ? c : R_EOF;
 }
@@ -168,46 +210,178 @@ static size_t url_read(void *ptr, size_t size, size_t nitems,
     size_t n = 0; /* -Wall */
 
     switch(type) {
-    case HTTPSsh:
     case HTTPsh:
+    case HTTPSsh:
 	n = in_R_HTTPRead(ctxt, ptr, (int)(size*nitems));
 	break;
     case FTPsh:
 	n = in_R_FTPRead(ctxt, ptr, (int)(size*nitems));
 	break;
+    default:
+	break;
     }
     return n/size;
 }
 
+#ifdef Win32
+static Rboolean url_open2(Rconnection con)
+{
+    void *ctxt;
+    char *url = con->description;
+    UrlScheme type = ((Rurlconn)(con->private))->type;
+
+    if(con->mode[0] != 'r') {
+	REprintf("can only open URLs for reading");
+	return FALSE;
+    }
+
+    switch(type) {
+    case HTTPSsh:
+    case HTTPsh:
+    {
+	SEXP sheaders, agentFun;
+	const char *headers;
+	SEXP s_makeUserAgent = install("makeUserAgent");
+	agentFun = PROTECT(lang2(s_makeUserAgent, ScalarLogical(0)));
+	sheaders = PROTECT(eval(agentFun, R_FindNamespace(mkString("utils"))));
+	if(TYPEOF(sheaders) == NILSXP)
+	    headers = NULL;
+	else
+	    headers = CHAR(STRING_ELT(sheaders, 0));
+	ctxt = in_R_HTTPOpen2(url, headers, 0);
+	UNPROTECT(2);
+	if(ctxt == NULL) {
+	  /* if we call error() we get a connection leak*/
+	  /* so do_url has to raise the error*/
+	  /* error("cannot open URL '%s'", url); */
+	    return FALSE;
+	}
+	((Rurlconn)(con->private))->ctxt = ctxt;
+    }
+	break;
+    case FTPsh:
+	ctxt = in_R_FTPOpen2(url);
+	if(ctxt == NULL) {
+	  /* if we call error() we get a connection leak*/
+	  /* so do_url has to raise the error*/
+	  /* error("cannot open URL '%s'", url); */
+	    return FALSE;
+	}
+	((Rurlconn)(con->private))->ctxt = ctxt;
+	break;
+
+    default:
+	warning(_("scheme not supported in URL '%s'"), url);
+	return FALSE;
+    }
+
+    con->isopen = TRUE;
+    con->canwrite = (con->mode[0] == 'w' || con->mode[0] == 'a');
+    con->canread = !con->canwrite;
+    if(strlen(con->mode) >= 2 && con->mode[1] == 'b') con->text = FALSE;
+    else con->text = TRUE;
+    con->save = -1000;
+    set_iconv(con);
+    return TRUE;
+}
+
+static void url_close2(Rconnection con)
+{
+    UrlScheme type = ((Rurlconn)(con->private))->type;
+    switch(type) {
+    case HTTPsh:
+    case HTTPSsh:
+    case FTPsh:
+	in_R_HTTPClose2(((Rurlconn)(con->private))->ctxt);
+	break;
+    default:
+	break;
+    }
+    con->isopen = FALSE;
+}
+
+static int url_fgetc_internal2(Rconnection con)
+{
+    UrlScheme type = ((Rurlconn)(con->private))->type;
+    void * ctxt = ((Rurlconn)(con->private))->ctxt;
+    unsigned char c;
+    size_t n = 0; /* -Wall */
+
+    switch(type) {
+    case HTTPsh:
+    case HTTPSsh:
+    case FTPsh:
+	n = in_R_HTTPRead2(ctxt, (char *)&c, 1);
+	break;
+    default:
+	break;
+    }
+    return (n == 1) ? c : R_EOF;
+}
+
+static size_t url_read2(void *ptr, size_t size, size_t nitems,
+			Rconnection con)
+{
+    UrlScheme type = ((Rurlconn)(con->private))->type;
+    void * ctxt = ((Rurlconn)(con->private))->ctxt;
+    size_t n = 0; /* -Wall */
+
+    switch(type) {
+    case HTTPsh:
+    case HTTPSsh:
+    case FTPsh:
+	n = in_R_HTTPRead2(ctxt, ptr, (int)(size*nitems));
+	break;
+    default:
+	break;
+    }
+    return n/size;
+}
+#endif
 
-static Rconnection in_R_newurl(const char *description, const char * const mode)
+static Rconnection 
+in_R_newurl(const char *description, const char * const mode, int type)
 {
     Rconnection new;
 
     new = (Rconnection) malloc(sizeof(struct Rconn));
     if(!new) error(_("allocation of url connection failed"));
-    new->class = (char *) malloc(strlen("url") + 1);
+    new->class = (char *) malloc(strlen("url-wininet") + 1);
     if(!new->class) {
 	free(new);
 	error(_("allocation of url connection failed"));
+        /* for Solaris 12.5 */ new = NULL;
     }
-    strcpy(new->class, "url");
     new->description = (char *) malloc(strlen(description) + 1);
     if(!new->description) {
 	free(new->class); free(new);
 	error(_("allocation of url connection failed"));
+        /* for Solaris 12.5 */ new = NULL;
     }
     init_con(new, description, CE_NATIVE, mode);
     new->canwrite = FALSE;
-    new->open = &url_open;
-    new->close = &url_close;
-    new->fgetc_internal = &url_fgetc_internal;
+#ifdef Win32
+    if (type) {
+	new->open = &url_open2;
+	new->read = &url_read2;
+	new->close = &url_close2;
+	new->fgetc_internal = &url_fgetc_internal2;
+	strcpy(new->class, "url-wininet");
+   } else
+#endif
+    {
+	new->open = &url_open;
+	new->read = &url_read;
+	new->close = &url_close;
+	new->fgetc_internal = &url_fgetc_internal;
+	strcpy(new->class, "url");
+    }
     new->fgetc = &dummy_fgetc;
-    new->read = &url_read;
     new->private = (void *) malloc(sizeof(struct urlconn));
     if(!new->private) {
 	free(new->description); free(new->class); free(new);
 	error(_("allocation of url connection failed"));
+	/* for Solaris 12.5 */ new = NULL;
     }
 
     IDquiet = TRUE;
@@ -216,10 +390,9 @@ static Rconnection in_R_newurl(const char *description, const char * const mode)
 
 
 
-#ifndef Win32
-static void putdots(ssize_t *pold, ssize_t new)
+static void putdots(DLsize_t *pold, DLsize_t new)
 {
-    ssize_t i, old = *pold;
+    DLsize_t i, old = *pold;
     *pold = new;
     for(i = old; i < new; i++) {
 	REprintf(".");
@@ -236,11 +409,10 @@ static void putdashes(int *pold, int new)
     for(i = old; i < new; i++)  REprintf("=");
     if(R_Consolefile) fflush(R_Consolefile);
 }
-#endif
 
 /* note, ALL the possible structures have the first two elements */
 typedef struct {
-    ssize_t length;
+    DLsize_t length;
     char *type;
     void *ctxt;
 } inetconn;
@@ -271,8 +443,8 @@ static void doneprogressbar(void *data)
 #define IBUFSIZE 4096
 static SEXP in_do_download(SEXP args)
 {
-    SEXP scmd, sfile, smode, sheaders, agentFun;
-    const char *url, *file, *mode, *headers;
+    SEXP scmd, sfile, smode;
+    const char *url, *file, *mode;
     int quiet, status = 0, cacheOK;
 #ifdef Win32
     char pbuf[30];
@@ -301,19 +473,13 @@ static SEXP in_do_download(SEXP args)
     cacheOK = asLogical(CAR(args));
     if(cacheOK == NA_LOGICAL)
 	error(_("invalid '%s' argument"), "cacheOK");
-#ifdef USE_WININET
-    PROTECT(agentFun = lang2(install("makeUserAgent"), ScalarLogical(0)));
-#else
-    PROTECT(agentFun = lang1(install("makeUserAgent")));
-#endif
-    PROTECT(sheaders = eval(agentFun, R_FindNamespace(mkString("utils"))));
-    UNPROTECT(1);
-    if(TYPEOF(sheaders) == NILSXP)
-	headers = NULL;
-    else
-	headers = CHAR(STRING_ELT(sheaders, 0));
+    Rboolean file_URL = (strncmp(url, "file://", 7) == 0);
 #ifdef Win32
-    if (!quiet && !pbar.wprog) {
+    int meth = asLogical(CADR(args));
+    if(meth == NA_LOGICAL)
+	error(_("invalid '%s' argument"), "method");
+//    if(meth == 0) meth = UseInternet2;
+    if (!file_URL && R_Interactive && !quiet && !pbar.wprog) {
 	pbar.wprog = newwindow(_("Download progress"), rect(0, 0, 540, 100),
 			       Titlebar | Centered);
 	setbackground(pbar.wprog, dialog_bg());
@@ -322,7 +488,7 @@ static SEXP in_do_download(SEXP args)
 	pbar.pc = 0;
     }
 #endif
-    if(strncmp(url, "file://", 7) == 0) {
+    if(file_URL) {
 	FILE *in, *out;
 	static char buf[CPBUFSIZE];
 	size_t n;
@@ -333,7 +499,7 @@ static SEXP in_do_download(SEXP args)
 	if (strlen(url) > 9 && url[7] == '/' && url[9] == ':') nh = 8;
 #endif
 
-	/* Use binary transfers */
+	/* Use binary transfers? */
 	in = R_fopen(R_ExpandFileName(url+nh), (mode[2] == 'b') ? "rb" : "r");
 	if(!in) {
 	    error(_("cannot open URL '%s', reason '%s'"),
@@ -352,21 +518,19 @@ static SEXP in_do_download(SEXP args)
 	}
 	fclose(out); fclose(in);
 
-#ifdef HAVE_INTERNET
     } else if (strncmp(url, "http://", 7) == 0
-#ifdef USE_WININET
-	       || strncmp(url, "https://", 8) == 0
+#ifdef Win32
+	       || ((strncmp(url, "https://", 8) == 0) && meth)
 #endif
 	) {
 
 	FILE *out;
 	void *ctxt;
-	ssize_t len, total, guess, nbytes = 0;
+	DLsize_t len, total, guess, nbytes = 0;
 	char buf[IBUFSIZE];
-#ifndef Win32
 	int ndashes = 0;
-	ssize_t ndots = 0;
-#else
+	DLsize_t ndots = 0;
+#ifdef Win32
 	int factor = 1;
 #endif
 
@@ -378,89 +542,109 @@ static SEXP in_do_download(SEXP args)
 
 	R_Busy(1);
 	if(!quiet) REprintf(_("trying URL '%s'\n"), url);
+	SEXP agentFun, sheaders;
 #ifdef Win32
 	R_FlushConsole();
+	if(meth)
+	    agentFun = PROTECT(lang2(install("makeUserAgent"), ScalarLogical(0)));
+	else
+	    agentFun = PROTECT(lang1(install("makeUserAgent")));
+#else
+	agentFun = PROTECT(lang1(install("makeUserAgent")));
 #endif
-	ctxt = in_R_HTTPOpen(url, headers, cacheOK);
+	SEXP utilsNS = PROTECT(R_FindNamespace(mkString("utils")));
+	sheaders = eval(agentFun, utilsNS);
+	UNPROTECT(1); /* utilsNS */
+	PROTECT(sheaders);
+	const char *headers = (TYPEOF(sheaders) == NILSXP) ?
+	    NULL : CHAR(STRING_ELT(sheaders, 0));
+	ctxt = Ri_HTTPOpen(url, headers, cacheOK);
+	UNPROTECT(2);
 	if(ctxt == NULL) status = 1;
 	else {
-	    if(!quiet) REprintf(_("opened URL\n"), url);
+//	    if(!quiet) REprintf(_("opened URL\n"), url);
 	    guess = total = ((inetconn *)ctxt)->length;
 #ifdef Win32
-	    if (guess <= 0) guess = 100 * 1024;
-	    if (guess > 1e9) factor = guess/1e6;
-	    R_FlushConsole();
-	    strcpy(buf, "URL: ");
-	    if(strlen(url) > 60) {
-		strcat(buf, "... ");
-		strcat(buf, url + (strlen(url) - 60));
-	    } else strcat(buf, url);
-	    if(!quiet) {
-		settext(pbar.l_url, buf);
-		setprogressbarrange(pbar.pb, 0, guess/factor);
-		setprogressbar(pbar.pb, 0);
-		settext(pbar.wprog, "Download progress");
-		show(pbar.wprog);
-		begincontext(&(pbar.cntxt), CTXT_CCODE, R_NilValue, R_NilValue,
-			     R_NilValue, R_NilValue, R_NilValue);
-		pbar.cntxt.cend = &doneprogressbar;
-		pbar.cntxt.cenddata = &pbar;
-		pbar.pc = 0;
+	    if(R_Interactive) {
+		if (guess <= 0) guess = 100 * 1024;
+		if (guess > 1e9) factor = guess/1e6;
+		R_FlushConsole();
+		strcpy(buf, "URL: ");
+		if(strlen(url) > 60) {
+		    strcat(buf, "... ");
+		    strcat(buf, url + (strlen(url) - 60));
+		} else strcat(buf, url);
+		if(!quiet) {
+		    settext(pbar.l_url, buf);
+		    setprogressbarrange(pbar.pb, 0, guess/factor);
+		    setprogressbar(pbar.pb, 0);
+		    settext(pbar.wprog, "Download progress");
+		    show(pbar.wprog);
+		    begincontext(&(pbar.cntxt), CTXT_CCODE, R_NilValue, R_NilValue,
+				 R_NilValue, R_NilValue, R_NilValue);
+		    pbar.cntxt.cend = &doneprogressbar;
+		    pbar.cntxt.cenddata = &pbar;
+		    pbar.pc = 0;
+		}
 	    }
 #endif
-	    while ((len = in_R_HTTPRead(ctxt, buf, sizeof(buf))) > 0) {
+	    while ((len = Ri_HTTPRead(ctxt, buf, sizeof(buf))) > 0) {
 		size_t res = fwrite(buf, 1, len, out);
 		if(res != len) error(_("write failed"));
 		nbytes += len;
-#ifdef Win32
 		if(!quiet) {
-		    if(nbytes > guess) {
-			guess *= 2;
-			if (guess > 1e9) factor = guess/1e6;
-			setprogressbarrange(pbar.pb, 0, guess/factor);
-		    }
-		    setprogressbar(pbar.pb, nbytes/factor);
-		    if (total > 0) {
-			pc = 0.499 + 100.0*nbytes/total;
-			if (pc > pbar.pc) {
-			    snprintf(pbuf, 30, "%d%% downloaded", pc);
-			    settext(pbar.wprog, pbuf);
-			    pbar.pc = pc;
+#ifdef Win32
+		    if(R_Interactive) {
+			if(nbytes > guess) {
+			    guess *= 2;
+			    if (guess > 1e9) factor = guess/1e6;
+			    setprogressbarrange(pbar.pb, 0, guess/factor);
 			}
+			setprogressbar(pbar.pb, nbytes/factor);
+			if (total > 0) {
+			    pc = 0.499 + 100.0*nbytes/total;
+			    if (pc > pbar.pc) {
+				snprintf(pbuf, 30, "%d%% downloaded", pc);
+				settext(pbar.wprog, pbuf);
+				pbar.pc = pc;
+			    }
+			}
+		    } else
+#endif
+		    {
+			if(guess <= 0) putdots(&ndots, nbytes/1024);
+			else putdashes(&ndashes, (int)(50*nbytes/guess));
 		    }
 		}
-#else
-		if(!quiet) {
-		    if(guess <= 0) putdots(&ndots, nbytes/1024);
-		    else putdashes(&ndashes, (int)(50*nbytes/guess));
-		}
-#endif
 	    }
-	    in_R_HTTPClose(ctxt);
+	    Ri_HTTPClose(ctxt);
 	    if(!quiet) {
-#ifndef Win32
+#ifdef Win32
+		if(!R_Interactive) REprintf("\n");
+#else
 		REprintf("\n");
 #endif
 		if(nbytes > 1024*1024)
-		    REprintf("downloaded %0.1f Mb\n\n",
-			     (double)nbytes/1024/1024, url);
+		    REprintf("downloaded %0.1f MB\n\n",
+			     (double)nbytes/1024/1024);
 		else if(nbytes > 10240)
-		    REprintf("downloaded %d Kb\n\n", nbytes/1024, url);
+		    REprintf("downloaded %d KB\n\n", (int) nbytes/1024);
 		else
-		    REprintf("downloaded %d bytes\n\n", nbytes, url);
+		    REprintf("downloaded %d bytes\n\n", (int) nbytes);
 	    }
 #ifdef Win32
 	    R_FlushConsole();
-	    if(!quiet) {
+	    if(R_Interactive && !quiet) {
 		endcontext(&(pbar.cntxt));
 		doneprogressbar(&pbar);
 	    }
 #endif
 	    if (total > 0 && total != nbytes)
-		warning(_("downloaded length %d != reported length %d"),
-			nbytes, total);
+		warning(_("downloaded length %0.f != reported length %0.f"),
+			(double)nbytes, (double)total);
 	}
 	fclose(out);
+	if (status == 1 && strchr(mode, 'w')) unlink(R_ExpandFileName(file));
 	R_Busy(0);
 	if (status == 1) error(_("cannot open URL '%s'"), url);
 
@@ -468,12 +652,11 @@ static SEXP in_do_download(SEXP args)
 
 	FILE *out;
 	void *ctxt;
-	ssize_t len, total, guess, nbytes = 0;
+	DLsize_t len, total, guess, nbytes = 0;
 	char buf[IBUFSIZE];
-#ifndef Win32
 	int ndashes = 0;
-	ssize_t ndots = 0;
-#else
+	DLsize_t ndots = 0;
+#ifdef Win32
 	int factor = 1;
 #endif
 
@@ -488,27 +671,27 @@ static SEXP in_do_download(SEXP args)
 #ifdef Win32
 	R_FlushConsole();
 #endif
-	ctxt = in_R_FTPOpen(url);
+	ctxt = Ri_FTPOpen(url);
 	if(ctxt == NULL) status = 1;
 	else {
-	    if(!quiet) REprintf(_("opened URL\n"), url);
+//	    if(!quiet) REprintf(_("opened URL\n"), url);
 	    guess = total = ((inetconn *)ctxt)->length;
 #ifdef Win32
-	    if (guess <= 0) guess = 100 * 1024;
-	    if (guess > 1e9) factor = guess/1e6;
-	    R_FlushConsole();
-	    strcpy(buf, "URL: ");
-	    if(strlen(url) > 60) {
-		strcat(buf, "... ");
-		strcat(buf, url + (strlen(url) - 60));
-	    } else strcat(buf, url);
-	    if(!quiet) {
+	    if(R_Interactive && !quiet) {
+		if (guess <= 0) guess = 100 * 1024;
+		if (guess > 1e9) factor = guess/1e6;
+		R_FlushConsole();
+		strcpy(buf, "URL: ");
+		if(strlen(url) > 60) {
+		    strcat(buf, "... ");
+		    strcat(buf, url + (strlen(url) - 60));
+		} else strcat(buf, url);
 		settext(pbar.l_url, buf);
 		setprogressbarrange(pbar.pb, 0, guess/factor);
 		setprogressbar(pbar.pb, 0);
 		settext(pbar.wprog, "Download progress");
 		show(pbar.wprog);
-
+		
 		/* set up a context which will close progressbar on error. */
 		begincontext(&(pbar.cntxt), CTXT_CCODE, R_NilValue, R_NilValue,
 			     R_NilValue, R_NilValue, R_NilValue);
@@ -516,81 +699,79 @@ static SEXP in_do_download(SEXP args)
 		pbar.cntxt.cenddata = &pbar;
 		pbar.pc = 0;
 	    }
-
 #endif
-	    while ((len = in_R_FTPRead(ctxt, buf, sizeof(buf))) > 0) {
+	    while ((len = Ri_FTPRead(ctxt, buf, sizeof(buf))) > 0) {
 		size_t res = fwrite(buf, 1, len, out);
 		if(res != len) error(_("write failed"));
 		nbytes += len;
-#ifdef Win32
 		if(!quiet) {
-		    if(nbytes > guess) {
-			guess *= 2;
-			if (guess > 1e9) factor = guess/1e6;
-			setprogressbarrange(pbar.pb, 0, guess/factor);
-		    }
-		    setprogressbar(pbar.pb, nbytes/factor);
-		    if (total > 0) {
-			pc = 0.499 + 100.0*nbytes/total;
+#ifdef Win32
+		    if(R_Interactive) {
+			if(nbytes > guess) {
+			    guess *= 2;
+			    if (guess > 1e9) factor = guess/1e6;
+			    setprogressbarrange(pbar.pb, 0, guess/factor);
+			}
+			setprogressbar(pbar.pb, nbytes/factor);
+			if (total > 0) {
+			    pc = 0.499 + 100.0*nbytes/total;
 			if (pc > pbar.pc) {
 			    snprintf(pbuf, 30, "%d%% downloaded", pc);
 			    settext(pbar.wprog, pbuf);
 			    pbar.pc = pc;
 			}
+			}
+		    } else
+#endif
+		    {
+			if(guess <= 0) putdots(&ndots, nbytes/1024);
+			else putdashes(&ndashes, (int)(50*nbytes/guess));
 		    }
 		}
-#else
-		if(!quiet) {
-		    if(guess <= 0) putdots(&ndots, nbytes/1024);
-		    else putdashes(&ndashes, (int)(50*nbytes/guess));
-		}
-#endif
 	    }
-	    in_R_FTPClose(ctxt);
+	    Ri_FTPClose(ctxt);
 	    if(!quiet) {
-#ifndef Win32
+#ifdef Win32
+		if(!R_Interactive) REprintf("\n");
+#else
 		REprintf("\n");
 #endif
 		if(nbytes > 1024*1024)
-		    REprintf("downloaded %0.1f Mb\n\n",
-			     (double)nbytes/1024/1024, url);
+		    REprintf("downloaded %0.1f MB\n\n",
+			     (double)nbytes/1024/1024);
 		else if(nbytes > 10240)
-		    REprintf("downloaded %d Kb\n\n", nbytes/1024, url);
+		    REprintf("downloaded %d KB\n\n", (int) nbytes/1024);
 		else
-		    REprintf("downloaded %d bytes\n\n", nbytes, url);
+		    REprintf("downloaded %d bytes\n\n", (int) nbytes);
 	    }
 #ifdef Win32
 	    R_FlushConsole();
-	    if(!quiet) {
+	    if(R_Interactive && !quiet) {
 		endcontext(&(pbar.cntxt));
 		doneprogressbar(&pbar);
 	    }
 #endif
 	    if (total > 0 && total != nbytes)
-		warning(_("downloaded length %d != reported length %d"),
-			nbytes, total);
+		warning(_("downloaded length %0.f != reported length %0.f"),
+			(double)nbytes, (double)total);
 	}
 	R_Busy(0);
 	fclose(out);
+	if (status == 1 && strchr(mode, 'w')) unlink(R_ExpandFileName(file));
 	if (status == 1) error(_("cannot open URL '%s'"), url);
-#endif
-
     } else
-	error(_("unsupported URL scheme"));
+	error(_("scheme not supported in URL '%s'"), url);
 
-    UNPROTECT(1);
     return ScalarInteger(status);
 }
 
 
-#if defined(SUPPORT_LIBXML) && !defined(USE_WININET)
-
 void *in_R_HTTPOpen(const char *url, const char *headers, const int cacheOK)
 {
     inetconn *con;
     void *ctxt;
     int timeout = asInteger(GetOption1(install("timeout")));
-    ssize_t len = -1;
+    DLsize_t len = -1;
     char *type = NULL;
 
     if(timeout == NA_INTEGER || timeout <= 0) timeout = 60;
@@ -600,8 +781,9 @@ void *in_R_HTTPOpen(const char *url, const char *headers, const int cacheOK)
     if(ctxt != NULL) {
 	int rc = RxmlNanoHTTPReturnCode(ctxt);
 	if(rc != 200) {
-	    warning(_("cannot open: HTTP status was '%d %s'"), rc,
-		    RxmlNanoHTTPStatusMsg(ctxt));
+	    // FIXME: should this be ctxt->location, after redirection?
+	    warning(_("cannot open URL '%s': %s status was '%d %s'"), 
+		    url, "HTTP", rc, RxmlNanoHTTPStatusMsg(ctxt));
 	    RxmlNanoHTTPClose(ctxt);
 	    return NULL;
 	} else {
@@ -611,12 +793,13 @@ void *in_R_HTTPOpen(const char *url, const char *headers, const int cacheOK)
 		REprintf("Content type '%s'", type ? type : "unknown");
 		if(len > 1024*1024)
 		    // might be longer than long, and is on 64-bit windows
-		    REprintf(" length %0.0f bytes (%0.1f Mb)\n", (double)len,
+		    REprintf(" length %0.0f bytes (%0.1f MB)\n", (double)len,
 			len/1024.0/1024.0);
 		else if(len > 10240)
-		    REprintf(" length %d bytes (%d Kb)\n", len, len/1024);
+		    REprintf(" length %d bytes (%d KB)\n", 
+			     (int)len, (int)(len/1024));
 		else if(len >= 0)
-		    REprintf(" length %d bytes\n", len);
+		    REprintf(" length %d bytes\n", (int)len);
 		else REprintf(" length unknown\n", len);
 #ifdef Win32
 		R_FlushConsole();
@@ -651,7 +834,7 @@ static void *in_R_FTPOpen(const char *url)
     inetconn *con;
     void *ctxt;
     int timeout = asInteger(GetOption1(install("timeout")));
-    ssize_t len = 0;
+    DLsize_t len = 0;
 
     if(timeout == NA_INTEGER || timeout <= 0) timeout = 60;
     RxmlNanoFTPTimeout(timeout);
@@ -688,114 +871,42 @@ static void in_R_FTPClose(void *ctx)
 	free(ctx);
     }
 }
-#endif /* SUPPORT_LIBXML */
 
 
-#ifdef USE_WININET
+#ifdef Win32
 
 #define WIN32_LEAN_AND_MEAN 1
 #include <windows.h>
 #include <wininet.h>
 typedef struct wictxt {
-    int length;
+    DLsize_t length;
     char * type;
     HINTERNET hand;
     HINTERNET session;
 } wIctxt, *WIctxt;
 
-#ifdef USE_WININET_ASYNC
-static int timeout;
-
-static int callback_status;
-static LPINTERNET_ASYNC_RESULT callback_res;
-
-static void CALLBACK
-InternetCallback(HINTERNET hInternet, DWORD context, DWORD Status,
-		 LPVOID lpvStatusInformation,
-		 DWORD dwStatusInformationLength)
-{
-    callback_status = Status;
-    /* printf("callback with context %ld, code %ld\n", context, Status); */
-    if(Status == INTERNET_STATUS_REQUEST_COMPLETE) {
-	callback_res = (LPINTERNET_ASYNC_RESULT) lpvStatusInformation;
-    }
-}
-#endif /* USE_WININET_ASYNC */
-
-static void *in_R_HTTPOpen(const char *url, const char *headers,
-			   const int cacheOK)
+static void *in_R_HTTPOpen2(const char *url, const char *headers,
+			    const int cacheOK)
 {
     WIctxt  wictxt;
-    DWORD status, d1 = 4, d2 = 0, d3 = 100;
+    DWORD status = 0, len = 0, d1 = 4, d2 = 0, d3 = 100;
     char buf[101], *p;
 
-/*	BOOL res = InternetAttemptConnect(0);
-
-	if (res != ERROR_SUCCESS) {
-	warning("no Internet connection available");
-	return NULL;
-	}*/
-
     wictxt = (WIctxt) malloc(sizeof(wIctxt));
     wictxt->length = -1;
     wictxt->type = NULL;
     wictxt->hand =
-	InternetOpen(headers, INTERNET_OPEN_TYPE_PRECONFIG, NULL, NULL,
-#ifdef USE_WININET_ASYNC
-		     INTERNET_FLAG_ASYNC
-#else
-		     0
-#endif
-		     );
+	InternetOpen(headers, INTERNET_OPEN_TYPE_PRECONFIG, NULL, NULL, 0);
     if(!wictxt->hand) {
 	free(wictxt);
 	/* error("cannot open Internet connection"); */
 	return NULL;
     }
 
-#ifdef USE_WININET_ASYNC
-    timeout = asInteger(GetOption1(install("timeout")));
-    if(timeout == NA_INTEGER || timeout <= 0) timeout = 60;
-    InternetSetStatusCallback(wictxt->hand,
-			      (INTERNET_STATUS_CALLBACK) InternetCallback);
-/*    if(!IDquiet) {
-	REprintf("using Asynchronous WinInet calls, timeout %d secs\n",
-		timeout);
-	R_FlushConsole();
-	}*/
-
-    callback_status = 0;
-    InternetOpenUrl(wictxt->hand, url,
-		    NULL, 0,
-	INTERNET_FLAG_KEEP_CONNECTION | INTERNET_FLAG_NO_CACHE_WRITE,
-		    17);
-
-    {
-	DWORD t1 = GetTickCount();
-	while(callback_status != INTERNET_STATUS_REQUEST_COMPLETE
-	      && GetTickCount() < t1 + 1000*timeout) {
-	    R_ProcessEvents();
-	    Sleep(100);
-	}
-	if(callback_status != INTERNET_STATUS_REQUEST_COMPLETE) {
-	    InternetCloseHandle(wictxt->hand);
-	    free(wictxt);
-	    warning(_("InternetOpenUrl timed out"));
-	    return NULL;
-	}
-    }
-
-    wictxt->session = (HINTERNET) callback_res->dwResult;
-#else
-/*    if(!IDquiet) {
-	REprintf("using Synchronous WinInet calls\n");
-	R_FlushConsole();
-	} */
-    wictxt->session = InternetOpenUrl(wictxt->hand, url,
-				      NULL, 0,
-	INTERNET_FLAG_KEEP_CONNECTION | INTERNET_FLAG_NO_CACHE_WRITE,
-				      0);
-#endif /* USE_WININET_ASYNC */
+    // use keep-alive semantics, do not use local WinINet cache.
+    DWORD flags = INTERNET_FLAG_KEEP_CONNECTION | INTERNET_FLAG_NO_CACHE_WRITE;
+    if(!cacheOK) flags |= INTERNET_FLAG_PRAGMA_NOCACHE;
+    wictxt->session = InternetOpenUrl(wictxt->hand, url, NULL, 0, flags, 0);
     if(!wictxt->session) {
 	DWORD err1 = GetLastError(), err2, blen = 101;
 	InternetCloseHandle(wictxt->hand);
@@ -836,28 +947,31 @@ static void *in_R_HTTPOpen(const char *url, const char *headers,
 	InternetCloseHandle(wictxt->session);
 	InternetCloseHandle(wictxt->hand);
 	free(wictxt);
-	warning(_("cannot open: HTTP status was '%d %s'"), status, buf);
+	warning(_("cannot open URL '%s': %s status was '%d %s'"), 
+		url, "HTTP", status, buf);
 	return NULL;
     }
 
     HttpQueryInfo(wictxt->session,
 		  HTTP_QUERY_CONTENT_TYPE, &buf, &d3, &d2);
     d2 = 0;
-    HttpQueryInfo(wictxt->session,
-		  HTTP_QUERY_CONTENT_LENGTH | HTTP_QUERY_FLAG_NUMBER,
-		  &status, &d1, &d2);
-    wictxt->length = status;
+    // NB: this can only retrieve in a DWORD, so up to 2GB or 4GB?
+    if (HttpQueryInfo(wictxt->session,
+		      HTTP_QUERY_CONTENT_LENGTH | HTTP_QUERY_FLAG_NUMBER,
+		      &len, &d1, &d2))
+	wictxt->length = len;
     wictxt->type = strdup(buf);
     if(!IDquiet) {
-	if(status > 1024*1024)
-	    // might be longer than long, and is on 64-bit windows
-	    REprintf("Content type '%s' length %0.0f bytes (%0.1f Mb)\n",
-		     buf, (double) status, status/1024.0/1024.0);
-	else if(status > 10240)
-	    REprintf("Content type '%s' length %d bytes (%d Kb)\n",
-		     buf, status, status/1024);
-	else
-	    REprintf("Content type '%s' length %d bytes\n", buf, status);
+	REprintf("Content type '%s'", buf);
+	if(len > 1024*1024)
+	    REprintf(" length %0.0f bytes (%0.1f MB)\n", (double)len,
+		     len/1024.0/1024.0);
+	else if(len > 10240)
+	    REprintf(" length %d bytes (%d KB)\n", 
+		     (int)len, (int)(len/1024));
+	else if(wictxt->length >= 0) /* signed; len is not */
+	    REprintf(" length %d bytes\n", (int)len);
+	else REprintf(" length unknown\n", len);
 	R_FlushConsole();
     }
 
@@ -865,31 +979,17 @@ static void *in_R_HTTPOpen(const char *url, const char *headers,
     return (void *)wictxt;
 }
 
-static int in_R_HTTPRead(void *ctx, char *dest, int len)
+static int in_R_HTTPRead2(void *ctx, char *dest, int len)
 {
     DWORD nread;
 
     InternetReadFile(((WIctxt)ctx)->session, dest, len, &nread);
-#ifdef USE_WININET_ASYNC
-    {
-	DWORD t1 = GetTickCount();
-	while(callback_status != INTERNET_STATUS_REQUEST_COMPLETE
-	      && GetTickCount() < t1 + 1000*timeout) {
-	    R_ProcessEvents();
-	    Sleep(100);
-	}
-	if(callback_status != INTERNET_STATUS_REQUEST_COMPLETE) {
-	    warning(_("Internet read timed out"));
-	    nread = 0;
-	}
-    }
-#endif
     R_ProcessEvents();
     return (int) nread;
 }
 
 
-static void in_R_HTTPClose(void *ctx)
+static void in_R_HTTPClose2(void *ctx)
 {
     InternetCloseHandle(((WIctxt)ctx)->session);
     InternetCloseHandle(((WIctxt)ctx)->hand);
@@ -897,7 +997,7 @@ static void in_R_HTTPClose(void *ctx)
     free(ctx);
 }
 
-static void *in_R_FTPOpen(const char *url)
+static void *in_R_FTPOpen2(const char *url)
 {
     WIctxt  wictxt;
 
@@ -906,59 +1006,17 @@ static void *in_R_FTPOpen(const char *url)
     wictxt->type = NULL;
 
     wictxt->hand =
-	InternetOpen("R", INTERNET_OPEN_TYPE_PRECONFIG, NULL, NULL,
-#ifdef USE_WININET_ASYNC
-		     INTERNET_FLAG_ASYNC
-#else
-		     0
-#endif
-		     );
+	InternetOpen("R", INTERNET_OPEN_TYPE_PRECONFIG, NULL, NULL, 0);
     if(!wictxt->hand) {
 	free(wictxt);
 	return NULL;
     }
 
-#ifdef USE_WININET_ASYNC
-    timeout = asInteger(GetOption1(install("timeout")));
-    if(timeout == NA_INTEGER || timeout <= 0) timeout = 60;
-    InternetSetStatusCallback(wictxt->hand,
-			      (INTERNET_STATUS_CALLBACK) InternetCallback);
-    if(!IDquiet) {
-	REprintf("using Asynchronous WinInet calls, timeout %d secs\n",
-		timeout);
-	R_FlushConsole();
-    }
-
-    callback_status = 0;
-    InternetOpenUrl(wictxt->hand, url,
-		    NULL, 0,
-	INTERNET_FLAG_KEEP_CONNECTION | INTERNET_FLAG_NO_CACHE_WRITE,
-		    17);
-    {
-	DWORD t1 = GetTickCount();
-	while(callback_status != INTERNET_STATUS_REQUEST_COMPLETE
-	      && GetTickCount() < t1 + 1000*timeout) {
-	    R_ProcessEvents();
-	    Sleep(100);
-	}
-	if(callback_status != INTERNET_STATUS_REQUEST_COMPLETE) {
-	    InternetCloseHandle(wictxt->hand);
-	    free(wictxt);
-	    warning(_("InternetOpenUrl timed out"));
-	    return NULL;
-	}
-    }
-
-    wictxt->session = (HINTERNET) callback_res->dwResult;
-#else
-    if(!IDquiet) {
-	REprintf("using Synchronous WinInet calls\n");
-	R_FlushConsole();
-    }
-    wictxt->session = InternetOpenUrl(wictxt->hand, url,
-				      NULL, 0,
-	INTERNET_FLAG_KEEP_CONNECTION | INTERNET_FLAG_NO_CACHE_WRITE,
-				      0);
+    DWORD flag = INTERNET_FLAG_KEEP_CONNECTION | INTERNET_FLAG_NO_CACHE_WRITE;
+    wictxt->session = InternetOpenUrl(wictxt->hand, url, NULL, 0,
+    	flag | INTERNET_FLAG_PASSIVE, 0);
+    if(!wictxt->session)
+    	wictxt->session = InternetOpenUrl(wictxt->hand, url, NULL, 0, flag, 0);
     if(!wictxt->session) {
 	char buf[256];
 	DWORD err1 = GetLastError(), err2, blen = 256;
@@ -979,52 +1037,10 @@ static void *in_R_FTPOpen(const char *url)
 	    return NULL;
 	}
     }
-#endif /* USE_WININET_ASYNC */
     R_ProcessEvents();
     return (void *)wictxt;
 }
-
-static int in_R_FTPRead(void *ctx, char *dest, int len)
-{
-    return R_HTTPRead(ctx, dest, len);
-}
-
-static void in_R_FTPClose(void *ctx)
-{
-    R_HTTPClose(ctx);
-}
-#endif
-
-#ifndef HAVE_INTERNET
-static void *in_R_HTTPOpen(const char *url, const char *headers,
-			   const int cacheOK)
-{
-    return NULL;
-}
-
-static int in_R_HTTPRead(void *ctx, char *dest, int len)
-{
-    return -1;
-}
-
-static void in_R_HTTPClose(void *ctx)
-{
-}
-
-static void *in_R_FTPOpen(const char *url)
-{
-    return NULL;
-}
-
-static int in_R_FTPRead(void *ctx, char *dest, int len)
-{
-    return -1;
-}
-
-static void in_R_FTPClose(void *ctx)
-{
-}
-#endif
+#endif // Win32
 
 
 #define MBUFSIZE 8192
@@ -1057,11 +1073,7 @@ void
 #ifdef HAVE_VISIBILITY_ATTRIBUTE
 __attribute__ ((visibility ("default")))
 #endif
-#ifdef USE_WININET
-R_init_internet2(DllInfo *info)
-#else
 R_init_internet(DllInfo *info)
-#endif
 {
     R_InternetRoutines *tmp;
     tmp = R_Calloc(1, R_InternetRoutines);
@@ -1090,5 +1102,10 @@ R_init_internet(DllInfo *info)
     tmp->HTTPDCreate = in_R_HTTPDCreate;
     tmp->HTTPDStop = in_R_HTTPDStop;
 
+    tmp->curlVersion = in_do_curlVersion;
+    tmp->curlGetHeaders = in_do_curlGetHeaders;
+    tmp->curlDownload = in_do_curlDownload;
+    tmp->newcurlurl =  in_newCurlUrl;
+
     R_setInternetRoutines(tmp);
 }
diff --git a/src/modules/internet/libcurl.c b/src/modules/internet/libcurl.c
new file mode 100644
index 0000000..fecc52b
--- /dev/null
+++ b/src/modules/internet/libcurl.c
@@ -0,0 +1,907 @@
+/*
+ *  R : A Computer Language for Statistical Data Analysis
+ *  Copyright (C) 2015-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
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, a copy is available at
+ *  https://www.R-project.org/Licenses/
+ */
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#ifdef Win32
+# define R_USE_SIGNALS 1
+#endif
+#include <Defn.h>
+#include <Internal.h>
+#include <Fileio.h>
+#include <errno.h>
+
+#ifdef HAVE_UNISTD_H
+// for unlink
+# include <unistd.h>
+#endif
+
+#ifdef HAVE_LIBCURL
+# include <curl/curl.h>
+/*
+  This needed libcurl >= 7.28.0 (Oct 2012) for curl_multi_wait.
+  Substitute code is provided for a Unix-alike only.
+
+  There is a configure test but it is not used on Windows and system
+  software can change.
+*/
+# ifdef Win32
+#  if LIBCURL_VERSION_MAJOR < 7 || (LIBCURL_VERSION_MAJOR == 7 && LIBCURL_VERSION_MINOR < 28)
+#  error libcurl 7.28.0 or later is required.
+#  endif
+# else
+#  if LIBCURL_VERSION_MAJOR < 7 || (LIBCURL_VERSION_MAJOR == 7 && LIBCURL_VERSION_MINOR < 22)
+#  error libcurl 7.22.0 or later is required.
+#  endif
+# endif
+extern void Rsleep(double timeint);
+#endif
+
+# if (LIBCURL_VERSION_MAJOR == 7 && LIBCURL_VERSION_MINOR < 28)
+
+// curl/curl.h includes <sys/select.h> and headers it requires.
+
+#define curl_multi_wait R_curl_multi_wait
+
+static CURLMcode
+R_curl_multi_wait(CURLM *multi_handle,
+		  /* IGNORED */ void *unused,
+		  /* IGNORED */ unsigned int extra,
+		  int timeout_ms, int *ret)
+{
+    fd_set fdread;
+    fd_set fdwrite;
+    fd_set fdexcep;
+    FD_ZERO(&fdread);
+    FD_ZERO(&fdwrite);
+    FD_ZERO(&fdexcep);
+
+    struct timeval timeout;
+
+    timeout.tv_sec = timeout_ms / 1000;
+    timeout.tv_usec = (timeout_ms % 1000) * 1000;
+
+    int maxfd = -1;
+    CURLMcode
+	mc = curl_multi_fdset(multi_handle, &fdread, &fdwrite, &fdexcep, &maxfd);
+    if (maxfd == -1) {
+	*ret = 0;
+	Rsleep(0.1);
+    } else
+	*ret = select(maxfd+1, &fdread, &fdwrite, &fdexcep, &timeout);
+
+    return mc;
+}
+#endif
+
+SEXP attribute_hidden in_do_curlVersion(SEXP call, SEXP op, SEXP args, SEXP rho)
+{
+    checkArity(op, args);
+    SEXP ans = PROTECT(allocVector(STRSXP, 1));
+#ifdef HAVE_LIBCURL
+    curl_version_info_data *d = curl_version_info(CURLVERSION_NOW);
+    SET_STRING_ELT(ans, 0, mkChar(d->version));
+    SEXP sSSLVersion = install("ssl_version");
+    setAttrib(ans, sSSLVersion,
+	      mkString(d->ssl_version ? d->ssl_version : "none"));
+    SEXP sLibSSHVersion = install("libssh_version");
+    setAttrib(ans, sLibSSHVersion,
+	      mkString(((d->age >= 3) && d->libssh_version) ? d->libssh_version : ""));
+    const char * const *p;
+    int n, i;
+    for (p = d->protocols, n = 0; *p; p++, n++) ;
+    SEXP protocols = PROTECT(allocVector(STRSXP, n));
+    for (p = d->protocols, i = 0; i < n; i++, p++)
+	SET_STRING_ELT(protocols, i, mkChar(*p));
+    setAttrib(ans, install("protocols"), protocols);
+    UNPROTECT(1);
+#else
+    SET_STRING_ELT(ans, 0, mkChar(""));
+#endif
+    UNPROTECT(1);
+    return ans;
+}
+
+#ifdef HAVE_LIBCURL
+static const char *http_errstr(const long status)
+{
+    const char *str;
+    switch(status) {
+    case 400: str = "Bad Request"; break;
+    case 401: str = "Unauthorized"; break;
+    case 402: str = "Payment Required"; break;
+    case 403: str = "Forbidden"; break;
+    case 404: str = "Not Found"; break;
+    case 405: str = "Method Not Allowed"; break;
+    case 406: str = "Not Acceptable"; break;
+    case 407: str = "Proxy Authentication Required"; break;
+    case 408: str = "Request Timeout"; break;
+    case 409: str = "Conflict"; break;
+    case 410: str = "Gone"; break;
+    case 411: str = "Length Required"; break;
+    case 412: str = "Precondition Failed"; break;
+    case 413: str = "Request Entity Too Large"; break;
+    case 414: str = "Request-URI Too Long"; break;
+    case 415: str = "Unsupported Media Type"; break;
+    case 416: str = "Requested Range Not Satisfiable"; break;
+    case 417: str = "Expectation Failed"; break;
+    case 500: str = "Internal Server Error"; break;
+    case 501: str = "Not Implemented"; break;
+    case 502: str = "Bad Gateway"; break;
+    case 503: str = "Service Unavailable"; break;
+    case 504: str = "Gateway Timeout"; break;
+    default: str = "Unknown Error"; break;
+    }
+    return str;
+}
+
+static const char *ftp_errstr(const long status)
+{
+    const char *str;
+    switch (status) {
+    case 421: str = "Service not available, closing control connection"; break;
+    case 425: str = "Cannot open data connection"; break;
+    case 426: str = "Connection closed; transfer aborted"; break;
+    case 430: str = "Invalid username or password"; break;
+    case 434: str = "Requested host unavailable"; break;
+    case 450: str = "Requested file action not taken"; break;
+    case 451: str = "Requested action aborted; local error in processing"; break;
+    case 452:
+	str = "Requested action not taken; insufficient storage space in system";
+	break;
+    case 501: str = "Syntax error in parameters or arguments"; break;
+    case 502: str = "Command not implemented"; break;
+    case 503: str = "Bad sequence of commands"; break;
+    case 504: str = "Command not implemented for that parameter"; break;
+    case 530: str = "Not logged in"; break;
+    case 532: str = "Need account for storing files"; break;
+    case 550:
+	str = "Requested action not taken; file unavailable";
+	break;
+    case 551: str = "Requested action aborted; page type unknown"; break;
+    case 552:
+	str = "Requested file action aborted; exceeded storage allocation";
+	break;
+    case 553: str = "Requested action not taken; file name not allowed"; break;
+    default: str = "Unknown Error"; break;
+    }
+    return str;
+}
+
+/*
+  Check curl_multi_info_read for errors, reporting as warnings
+
+  Return: number of errors encountered
+ */
+static int curlMultiCheckerrs(CURLM *mhnd)
+{
+    int retval = 0;
+    for(int n = 1; n > 0;) {
+	CURLMsg *msg = curl_multi_info_read(mhnd, &n);
+	if (msg && (msg->data.result != CURLE_OK)) {
+	    const char *url, *strerr, *type;
+	    long status = 0;
+	    curl_easy_getinfo(msg->easy_handle, CURLINFO_EFFECTIVE_URL, &url);
+	    curl_easy_getinfo(msg->easy_handle, CURLINFO_RESPONSE_CODE,
+			      &status);
+	    // This reports the redirected URL
+	    if (status >= 400) {
+		if (url && url[0] == 'h') {
+		    strerr = http_errstr(status);
+		    type = "HTTP";
+		} else {
+		    strerr = ftp_errstr(status);
+		    type = "FTP";
+		}
+		warning(_("cannot open URL '%s': %s status was '%d %s'"),
+			url, type, status, strerr);
+	    } else {
+		strerr = curl_easy_strerror(msg->data.result);
+		warning(_("URL '%s': status was '%s'"), url, strerr);
+	    }
+	    retval++;
+	}
+    }
+    return retval;
+}
+
+static void curlCommon(CURL *hnd, int redirect, int verify)
+{
+    const char *capath = getenv("CURL_CA_BUNDLE");
+    if (verify) {
+	if (capath && capath[0])
+	    curl_easy_setopt(hnd, CURLOPT_CAINFO, capath);
+#ifdef Win32
+	else
+	    curl_easy_setopt(hnd, CURLOPT_SSL_VERIFYPEER, 0L);
+#endif
+    } else {
+	curl_easy_setopt(hnd, CURLOPT_SSL_VERIFYHOST, 0L);
+	curl_easy_setopt(hnd, CURLOPT_SSL_VERIFYPEER, 0L);
+    }
+    // for consistency, but all utils:::makeUserAgent does is look up an option.
+    SEXP sMakeUserAgent = install("makeUserAgent");
+    SEXP agentFun = PROTECT(lang2(sMakeUserAgent, ScalarLogical(0)));
+    SEXP utilsNS = PROTECT(R_FindNamespace(mkString("utils")));
+    SEXP sua = eval(agentFun, utilsNS);
+    UNPROTECT(1); /* utilsNS */
+    PROTECT(sua);
+    if(TYPEOF(sua) != NILSXP)
+	curl_easy_setopt(hnd, CURLOPT_USERAGENT, CHAR(STRING_ELT(sua, 0)));
+    UNPROTECT(2);
+    int timeout0 = asInteger(GetOption1(install("timeout")));
+    long timeout = timeout0 = NA_INTEGER ? 0 : 1000L * timeout0;
+    curl_easy_setopt(hnd, CURLOPT_CONNECTTIMEOUT_MS, timeout);
+    curl_easy_setopt(hnd, CURLOPT_TIMEOUT_MS, timeout);
+    if (redirect) {
+	curl_easy_setopt(hnd, CURLOPT_FOLLOWLOCATION, 1L);
+	curl_easy_setopt(hnd, CURLOPT_MAXREDIRS, 20L);
+    }
+    int verbosity = asInteger(GetOption1(install("internet.info")));
+    if (verbosity < 2) curl_easy_setopt(hnd, CURLOPT_VERBOSE, 1L);
+
+    // enable the cookie engine, keep cookies in memory
+    curl_easy_setopt(hnd, CURLOPT_COOKIEFILE, "");
+}
+
+static char headers[500][2049]; // allow for terminator
+static int used;
+
+static size_t
+rcvHeaders(void *buffer, size_t size, size_t nmemb, void *userp)
+{
+    char *d = (char*)buffer;
+    size_t result = size * nmemb, res = result > 2048 ? 2048 : result;
+    if (used >= 500) return result;
+    strncpy(headers[used], d, res);
+    // 'Do not assume that the header line is zero terminated!'
+    headers[used][res] = '\0';
+    used++;
+    return result;
+}
+
+static size_t
+rcvBody(void *buffer, size_t size, size_t nmemb, void *userp)
+{
+    // needed to discard spurious ftp 'body' otherwise written to stdout
+    return size * nmemb;
+}
+#endif
+
+
+SEXP attribute_hidden
+in_do_curlGetHeaders(SEXP call, SEXP op, SEXP args, SEXP rho)
+{
+    checkArity(op, args);
+#ifndef HAVE_LIBCURL
+    error(_("curlGetHeaders is not supported on this platform"));
+    return R_NilValue;
+#else
+    if (!isString(CAR(args)) || LENGTH(CAR(args)) != 1)
+       error("invalid %s argument", "url");
+    const char *url = translateChar(STRING_ELT(CAR(args), 0));
+    used = 0;
+    int redirect = asLogical(CADR(args));
+    if (redirect == NA_LOGICAL)
+	error(_("invalid %s argument"), "redirect");
+    int verify = asLogical(CADDR(args));
+    if (verify == NA_LOGICAL)
+	error(_("invalid %s argument"), "verify");
+
+    CURL *hnd = curl_easy_init();
+    curl_easy_setopt(hnd, CURLOPT_URL, url);
+    curl_easy_setopt(hnd, CURLOPT_NOPROGRESS, 1L);
+    curl_easy_setopt(hnd, CURLOPT_NOBODY, 1L);
+    curl_easy_setopt(hnd, CURLOPT_HEADERFUNCTION, &rcvHeaders);
+    curl_easy_setopt(hnd, CURLOPT_WRITEHEADER, &headers);
+    /* libcurl (at least 7.40.0) does not respect CURLOPT_NOBODY
+       for some ftp header info (Content-Length and Accept-ranges). */
+    curl_easy_setopt(hnd, CURLOPT_WRITEFUNCTION, &rcvBody);
+    curlCommon(hnd, redirect, verify);
+
+    char errbuf[CURL_ERROR_SIZE];
+    curl_easy_setopt(hnd, CURLOPT_ERRORBUFFER, errbuf);
+    CURLcode ret = curl_easy_perform(hnd);
+    if (ret != CURLE_OK)
+	error(_("libcurl error code %d\n\t%s\n"), ret, errbuf);
+    long http_code = 0;
+    curl_easy_getinfo (hnd, CURLINFO_RESPONSE_CODE, &http_code);
+    curl_easy_cleanup(hnd);
+
+    SEXP ans = PROTECT(allocVector(STRSXP, used));
+    for (int i = 0; i < used; i++)
+	SET_STRING_ELT(ans, i, mkChar(headers[i]));
+    SEXP sStatus = install("status");
+    setAttrib(ans, sStatus, ScalarInteger((int) http_code));
+    UNPROTECT(1);
+    return ans;
+#endif
+}
+
+#ifdef HAVE_LIBCURL
+static double total;
+
+static int ndashes;
+static void putdashes(int *pold, int new)
+{
+    for (int i = *pold; i < new; i++)  REprintf("=");
+    if (R_Consolefile) fflush(R_Consolefile);
+    *pold = new;
+}
+
+# ifdef Win32
+// ------- Windows progress bar -----------
+#include <ga.h>
+
+/* We could share this window with internet.c, then re-positioning
+   would apply to both */
+typedef struct {
+    window wprog;
+    progressbar pb;
+    label l_url;
+    RCNTXT cntxt;
+    int pc;
+} winprogressbar;
+
+static winprogressbar pbar = {NULL, NULL, NULL};
+
+static void doneprogressbar(void *data)
+{
+    winprogressbar *pbar = data;
+    hide(pbar->wprog);
+}
+
+static
+int progress(void *clientp, double dltotal, double dlnow,
+	     double ultotal, double ulnow)
+{
+    static int factor = 1;
+    // we only use downloads.  dltotal may be zero.
+    if (dltotal > 0.) {
+	if (total == 0.) {
+	    total = dltotal;
+	    char *type = NULL;
+	    CURL *hnd = (CURL *) clientp;
+	    curl_easy_getinfo(hnd, CURLINFO_CONTENT_TYPE, &type);
+	    if (total > 1024.0*1024.0)
+		// might be longer than long, and is on 64-bit windows
+		REprintf(" length %0.0f bytes (%0.1f MB)\n",
+			 total, total/1024.0/1024.0);
+	    else if (total > 10240)
+		REprintf("Content length %d bytes (%d KB)\n",
+			 (int)total, (int)(total/1024));
+	    else
+		REprintf("Content length %d bytes\n", (int)total);
+	    R_FlushConsole();
+	    if(R_Interactive) {
+		if (total > 1e9) factor = total/1e6; else factor = 1;
+		setprogressbarrange(pbar.pb, 0, total/factor);
+		show(pbar.wprog);
+	    }
+	}
+	if (R_Interactive) {
+	    setprogressbar(pbar.pb, dlnow/factor);
+	    if (total > 0) {
+		static char pbuf[30];
+		int pc = 0.499 + 100.0*dlnow/total;
+		if (pc > pbar.pc) {
+		    snprintf(pbuf, 30, "%d%% downloaded", pc);
+		    settext(pbar.wprog, pbuf);
+		    pbar.pc = pc;
+		}
+	    }
+	} else putdashes(&ndashes, (int)(50*dlnow/total));
+    }
+    R_ProcessEvents();
+    return 0;
+}
+
+# else
+// ------- Unix-alike progress bar -----------
+
+static
+int progress(void *clientp, double dltotal, double dlnow,
+	     double ultotal, double ulnow)
+{
+    CURL *hnd = (CURL *) clientp;
+    long status;
+    curl_easy_getinfo(hnd, CURLINFO_RESPONSE_CODE, &status);
+
+    // we only use downloads.  dltotal may be zero.
+    if ((status < 300) && (dltotal > 0.)) {
+	if (total == 0.) {
+	    total = dltotal;
+	    char *type = NULL;
+	    curl_easy_getinfo(hnd, CURLINFO_CONTENT_TYPE, &type);
+	    REprintf("Content type '%s'", type ? type : "unknown");
+	    if (total > 1024.0*1024.0)
+		// might be longer than long, and is on 64-bit windows
+		REprintf(" length %0.0f bytes (%0.1f MB)\n",
+			 total, total/1024.0/1024.0);
+	    else if (total > 10240)
+		REprintf(" length %d bytes (%d KB)\n",
+			 (int)total, (int)(total/1024));
+	    else
+		REprintf(" length %d bytes\n", (int)total);
+	    if (R_Consolefile) fflush(R_Consolefile);
+	}
+	putdashes(&ndashes, (int)(50*dlnow/total));
+    }
+    return 0;
+}
+# endif // Win32
+#endif // HAVE_LIBCURL
+
+/* download(url, destfile, quiet, mode, headers, cacheOK) */
+
+SEXP attribute_hidden
+in_do_curlDownload(SEXP call, SEXP op, SEXP args, SEXP rho)
+{
+    checkArity(op, args);
+#ifndef HAVE_LIBCURL
+    error(_("download.file(method = \"libcurl\") is not supported on this platform"));
+    return R_NilValue;
+#else
+    SEXP scmd, sfile, smode;
+    const char *url, *file, *mode;
+    int quiet, cacheOK;
+    struct curl_slist *slist1 = NULL;
+
+    scmd = CAR(args); args = CDR(args);
+    if (!isString(scmd) || length(scmd) < 1)
+	error(_("invalid '%s' argument"), "url");
+    int nurls = length(scmd);
+    sfile = CAR(args); args = CDR(args);
+    if (!isString(sfile) || length(sfile) < 1)
+	error(_("invalid '%s' argument"), "destfile");
+    if (length(sfile) != length(scmd))
+	error(_("lengths of 'url' and 'destfile' must match"));
+    quiet = asLogical(CAR(args)); args = CDR(args);
+    if (quiet == NA_LOGICAL)
+	error(_("invalid '%s' argument"), "quiet");
+    smode =  CAR(args); args = CDR(args);
+    if (!isString(smode) || length(smode) != 1)
+	error(_("invalid '%s' argument"), "mode");
+    mode = CHAR(STRING_ELT(smode, 0));
+    cacheOK = asLogical(CAR(args));
+    if (cacheOK == NA_LOGICAL)
+	error(_("invalid '%s' argument"), "cacheOK");
+
+    /* This comes mainly from curl --libcurl on the call used by
+       download.file(method = "curl").
+       Also http://curl.haxx.se/libcurl/c/multi-single.html.
+    */
+
+    if (!cacheOK) {
+	/* This _is_ the right way to do this: see §14.9 of
+	   http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html */
+	slist1 = curl_slist_append(slist1, "Pragma: no-cache");
+    }
+
+    CURLM *mhnd = curl_multi_init();
+    int still_running, repeats = 0, n_err = 0;
+    CURL **hnd[nurls];
+    FILE *out[nurls];
+
+    for(int i = 0; i < nurls; i++) {
+	url = CHAR(STRING_ELT(scmd, i));
+	hnd[i] = curl_easy_init();
+	curl_easy_setopt(hnd[i], CURLOPT_URL, url);
+	curl_easy_setopt(hnd[i], CURLOPT_FAILONERROR, 1L);
+	/* Users will normally expect to follow redirections, although
+	   that is not the default in either curl or libcurl. */
+	curlCommon(hnd[i], 1, 1);
+#if (LIBCURL_VERSION_MINOR >= 25)
+	curl_easy_setopt(hnd[i], CURLOPT_TCP_KEEPALIVE, 1L);
+#endif
+	if (!cacheOK)
+	    curl_easy_setopt(hnd[i], CURLOPT_HTTPHEADER, slist1);
+
+	/* check that destfile can be written */
+	file = translateChar(STRING_ELT(sfile, i));
+	out[i] = R_fopen(R_ExpandFileName(file), mode);
+	if (!out[i]) {
+	    n_err += 1;
+	    warning(_("URL %s: cannot open destfile '%s', reason '%s'"),
+		    url, file, strerror(errno));
+	    if (nurls == 1) break; else continue;
+	} else {
+	    // This uses the internal CURLOPT_WRITEFUNCTION
+	    curl_easy_setopt(hnd[i], CURLOPT_WRITEDATA, out[i]);
+	    curl_multi_add_handle(mhnd, hnd[i]);
+	}
+
+	total = 0.;
+	if (!quiet && nurls <= 1) {
+	    // It would in principle be possible to have
+	    // multiple progress bars on Windows.
+	    curl_easy_setopt(hnd[i], CURLOPT_NOPROGRESS, 0L);
+	    ndashes = 0;
+#ifdef Win32
+	    if (R_Interactive) {
+		if (!pbar.wprog) {
+		    pbar.wprog = newwindow(_("Download progress"),
+					   rect(0, 0, 540, 100),
+					   Titlebar | Centered);
+		    setbackground(pbar.wprog, dialog_bg());
+		    pbar.l_url = newlabel(" ", rect(10, 15, 520, 25),
+					  AlignCenter);
+		    pbar.pb = newprogressbar(rect(20, 50, 500, 20),
+					     0, 1024, 1024, 1);
+		    pbar.pc = 0;
+		}
+
+		settext(pbar.l_url, url);
+		setprogressbar(pbar.pb, 0);
+		settext(pbar.wprog, "Download progress");
+		show(pbar.wprog);
+		begincontext(&(pbar.cntxt), CTXT_CCODE, R_NilValue, R_NilValue,
+			     R_NilValue, R_NilValue, R_NilValue);
+		pbar.cntxt.cend = &doneprogressbar;
+		pbar.cntxt.cenddata = &pbar;
+	    }
+#endif
+	    // For libcurl >= 7.32.0 use CURLOPT_XFERINFOFUNCTION
+	    curl_easy_setopt(hnd[i], CURLOPT_PROGRESSFUNCTION, progress);
+	    curl_easy_setopt(hnd[i], CURLOPT_PROGRESSDATA, hnd[i]);
+	} else curl_easy_setopt(hnd[i], CURLOPT_NOPROGRESS, 1L);
+
+	/* This would allow the negotiation of compressed HTTP transfers,
+	   but it is not clear it is always a good idea.
+	   curl_easy_setopt(hnd[i], CURLOPT_ACCEPT_ENCODING, "gzip, deflate");
+	*/
+
+	if (!quiet) REprintf(_("trying URL '%s'\n"), url);
+    }
+
+    if (n_err == nurls) {
+	// no dest files could be opened, so bail out
+	curl_multi_cleanup(mhnd);
+	return ScalarInteger(1);
+    }
+
+    R_Busy(1);
+    //  curl_multi_wait needs curl >= 7.28.0 .
+    curl_multi_perform(mhnd, &still_running);
+    do {
+	int numfds;
+	CURLMcode mc = curl_multi_wait(mhnd, NULL, 0, 100, &numfds);
+	if (mc != CURLM_OK)  { // internal, do not translate
+	    warning("curl_multi_wait() failed, code %d", mc);
+	    break;
+	}
+	if (!numfds) {
+	    /* 'numfds' being zero means either a timeout or no file
+	       descriptors to wait for. Try timeout on first
+	       occurrence, then assume no file descriptors to wait for
+	       means 'sleep for 100 milliseconds'.
+	    */
+	    if (repeats++ > 0) Rsleep(0.1); // do not block R process
+	} else repeats = 0;
+	R_ProcessEvents();
+	curl_multi_perform(mhnd, &still_running);
+    } while(still_running);
+    R_Busy(0);
+#ifdef Win32
+    if (R_Interactive && !quiet) {
+	endcontext(&(pbar.cntxt));
+	doneprogressbar(&pbar);
+    } else if (total > 0.) {
+	REprintf("\n");
+	R_FlushConsole();
+    }
+#else
+    if (total > 0.) REprintf("\n");
+    if (R_Consolefile) fflush(R_Consolefile);
+#endif
+    if (nurls == 1) {
+	long status;
+	curl_easy_getinfo(hnd[0], CURLINFO_RESPONSE_CODE, &status);
+	double cl, dl;
+	curl_easy_getinfo(hnd[0], CURLINFO_SIZE_DOWNLOAD, &dl);
+	if (!quiet && status == 200) {
+	    if (dl > 1024*1024)
+		REprintf("downloaded %0.1f MB\n\n", (double)dl/1024/1024);
+	    else if (dl > 10240)
+		REprintf("downloaded %d KB\n\n", (int) dl/1024);
+	    else
+		REprintf("downloaded %d bytes\n\n", (int) dl);
+	}
+	curl_easy_getinfo(hnd[0], CURLINFO_CONTENT_LENGTH_DOWNLOAD, &cl);
+	if (cl >= 0 && dl != cl)
+	    warning(_("downloaded length %0.f != reported length %0.f"), dl, cl);
+    }
+
+    n_err += curlMultiCheckerrs(mhnd);
+
+    for (int i = 0; i < nurls; i++) {
+	if (out[i]) {
+	    fclose(out[i]);
+	    double dl;
+	    curl_easy_getinfo(hnd[i], CURLINFO_SIZE_DOWNLOAD, &dl);
+	    long status;
+	    curl_easy_getinfo(hnd[i], CURLINFO_RESPONSE_CODE, &status);
+	    // should we do something about incomplete transfers?
+	    if (status != 200 && dl == 0. && strchr(mode, 'w'))
+		unlink(R_ExpandFileName(translateChar(STRING_ELT(sfile, i))));
+	}
+	curl_multi_remove_handle(mhnd, hnd[i]);
+	curl_easy_cleanup(hnd[i]);
+    }
+    long status = 0L;
+    if(nurls == 1)
+	curl_easy_getinfo(hnd[0], CURLINFO_RESPONSE_CODE, &status);
+    curl_multi_cleanup(mhnd);
+    if (!cacheOK) curl_slist_free_all(slist1);
+
+    if(nurls > 1) {
+	if (n_err == nurls) error(_("cannot download any files"));
+	else if (n_err) warning(_("some files were not downloaded"));
+    } else if(n_err) {
+	if (status != 200)
+	    error(_("cannot open URL '%s'"), CHAR(STRING_ELT(scmd, 0)));
+	else
+	    error(_("download from '%s' failed"), CHAR(STRING_ELT(scmd, 0)));
+    }
+
+    return ScalarInteger(0);
+#endif
+}
+
+/* -------------------------- connections part ------------------------*/
+
+/* Unfortunately the libcurl interface is not well adapted to reading
+   data in user-requested chunks.
+
+   But it does read in up to CURL_MAX_WRITE_SIZE chunks, which is 16K.
+   So we implement a buffer which holds two chunks, and when what we
+   have is not enough we move down what it left and fetch another
+   chunk above it.  For safety, the buffer is expandable but this
+   should not be exercised.
+
+   An alternative design would be for consumeData to return what is
+   available and reset current.  Then rcvData would only be called on
+   a completely empty buffer.
+ */
+
+#include <Rconnections.h>
+
+#define R_MIN(a, b) ((a) < (b) ? (a) : (b))
+
+#ifdef HAVE_LIBCURL
+typedef struct Curlconn {
+    char *buf, *current; // base of buffer, last read address
+    size_t bufsize, filled;  // buffer size, amount which has been filled
+    Rboolean available; // to be read out
+    int sr; // 'still running' count
+    CURLM *mh; CURL *hnd;
+} *RCurlconn;
+
+static size_t rcvData(void *ptr, size_t size, size_t nitems, void *ctx)
+{
+    RCurlconn ctxt = (RCurlconn) ctx;
+
+    /* move down any unused data: can overlap */
+    if (ctxt->filled) memmove(ctxt->buf, ctxt->current, ctxt->filled);
+    ctxt->current = ctxt->buf;
+
+    size_t add = size * nitems;
+    if (add) {
+	/* Allocate more space if required: unlikely.
+	   Do so as an integer multiple of the current size.
+	 */
+	if (ctxt->filled + add > ctxt->bufsize) {
+	    int mult = (int) ceil((double)(ctxt->filled + add)/ctxt->bufsize);
+	    size_t newbufsize = mult * ctxt->bufsize;
+	    void *newbuf = realloc(ctxt->buf, newbufsize);
+	    if (!newbuf) error("Failure in re-allocation in rcvData");
+	    ctxt->buf = newbuf; ctxt->bufsize = newbufsize;
+	}
+
+	memcpy(ctxt->buf + ctxt->filled, ptr, add);
+	ctxt->filled += add;
+	ctxt->available = TRUE;
+    }
+    return add;
+}
+
+static size_t consumeData(void *ptr, size_t max, RCurlconn ctxt)
+{
+    size_t size = R_MIN(ctxt->filled, max);  // guaranteed > 0
+    memcpy(ptr, ctxt->current, size);
+    ctxt->current += size; ctxt->filled -= size;
+    return size;
+}
+
+/*
+  return: number of errors encountered
+ */
+static int fetchData(RCurlconn ctxt)
+{
+    int repeats = 0;
+    CURLM *mhnd = ctxt->mh;
+
+    do {
+	int numfds;
+	CURLMcode mc = curl_multi_wait(mhnd, NULL, 0, 100, &numfds);
+	if (mc != CURLM_OK) {
+	    warning("curl_multi_wait() failed, code %d", mc);
+	    break;
+	}
+	if (!numfds) {
+	    if (repeats++ > 0) Rsleep(0.1);
+	} else repeats = 0;
+	curl_multi_perform(mhnd, &ctxt->sr);
+	if (ctxt->available) break;
+	R_ProcessEvents();
+    } while(ctxt->sr);
+
+    return curlMultiCheckerrs(mhnd);
+}
+
+static void Curl_close(Rconnection con)
+{
+    RCurlconn ctxt = (RCurlconn)(con->private);
+
+    curl_multi_remove_handle(ctxt->mh, ctxt->hnd);
+    curl_easy_cleanup(ctxt->hnd);
+    curl_multi_cleanup(ctxt->mh);
+    con->isopen = FALSE;
+}
+
+static void Curl_destroy(Rconnection con)
+{
+    RCurlconn ctxt;
+
+    if (NULL == con)
+	return;
+    ctxt = (RCurlconn)(con->private);
+
+    if (NULL == ctxt)
+	return;
+
+    free(ctxt->buf);
+    free(ctxt);
+}
+
+static size_t Curl_read(void *ptr, size_t size, size_t nitems,
+			Rconnection con)
+{
+    RCurlconn ctxt = (RCurlconn)(con->private);
+    size_t nbytes = size*nitems;
+    char *p = (char *) ptr;
+    size_t total = consumeData(ptr, nbytes, ctxt);
+    int n_err = 0;
+    while((total < nbytes) && ctxt->sr) {
+	n_err += fetchData(ctxt);
+	total += consumeData(p + total, (nbytes - total), ctxt);
+    }
+    if (n_err != 0) {
+	Curl_close(con);
+	error(_("cannot read from connection"), n_err);
+    }
+    return total/size;
+}
+
+static Rboolean Curl_open(Rconnection con)
+{
+    char *url = con->description;
+    RCurlconn ctxt = (RCurlconn)(con->private);
+
+    if (con->mode[0] != 'r') {
+	REprintf("can only open URLs for reading");
+	return FALSE;
+    }
+
+    ctxt->hnd = curl_easy_init();
+    curl_easy_setopt(ctxt->hnd, CURLOPT_URL, url);
+    curl_easy_setopt(ctxt->hnd, CURLOPT_FAILONERROR, 1L);
+    curlCommon(ctxt->hnd, 1, 1);
+    curl_easy_setopt(ctxt->hnd, CURLOPT_NOPROGRESS, 1L);
+#if (LIBCURL_VERSION_MINOR >= 25)
+    curl_easy_setopt(ctxt->hnd, CURLOPT_TCP_KEEPALIVE, 1L);
+#endif
+
+    curl_easy_setopt(ctxt->hnd, CURLOPT_WRITEFUNCTION, rcvData);
+    curl_easy_setopt(ctxt->hnd, CURLOPT_WRITEDATA, ctxt);
+    ctxt->mh = curl_multi_init();
+    curl_multi_add_handle(ctxt->mh, ctxt->hnd);
+
+    ctxt->current = ctxt->buf; ctxt->filled = 0; ctxt->available = FALSE;
+
+    // Establish the connection: not clear if we should do this now.
+    ctxt->sr = 1;
+    int n_err = 0;
+    while(ctxt->sr && !ctxt->available)
+	n_err += fetchData(ctxt);
+    if (n_err != 0) {
+	Curl_close(con);
+	error(_("cannot open the connection to '%s'"), url);
+    }
+
+    con->isopen = TRUE;
+    con->canwrite = (con->mode[0] == 'w' || con->mode[0] == 'a');
+    con->canread = !con->canwrite;
+    if (strlen(con->mode) >= 2 && con->mode[1] == 'b') con->text = FALSE;
+    else con->text = TRUE;
+    con->save = -1000;
+    set_iconv(con);
+    return TRUE;
+}
+
+static int Curl_fgetc_internal(Rconnection con)
+{
+    unsigned char c;
+    size_t n = Curl_read(&c, 1, 1, con);
+    return (n == 1) ? c : R_EOF;
+}
+#endif
+
+
+// 'type' is unused.
+Rconnection
+in_newCurlUrl(const char *description, const char * const mode, int type)
+{
+#ifdef HAVE_LIBCURL
+    Rconnection new = (Rconnection) malloc(sizeof(struct Rconn));
+    if (!new) error(_("allocation of url connection failed"));
+    new->class = (char *) malloc(strlen("url-libcurl") + 1);
+    if (!new->class) {
+	free(new);
+	error(_("allocation of url connection failed"));
+	/* for Solaris 12.5 */ new = NULL;
+    }
+    strcpy(new->class, "url-libcurl");
+    new->description = (char *) malloc(strlen(description) + 1);
+    if (!new->description) {
+	free(new->class); free(new);
+	error(_("allocation of url connection failed"));
+	/* for Solaris 12.5 */ new = NULL;
+    }
+    init_con(new, description, CE_NATIVE, mode);
+    new->canwrite = FALSE;
+    new->open = &Curl_open;
+    new->close = &Curl_close;
+    new->destroy = &Curl_destroy;
+    new->fgetc_internal = &Curl_fgetc_internal;
+    new->fgetc = &dummy_fgetc;
+    new->read = &Curl_read;
+    new->private = (void *) malloc(sizeof(struct Curlconn));
+    if (!new->private) {
+	free(new->description); free(new->class); free(new);
+	error(_("allocation of url connection failed"));
+	/* for Solaris 12.5 */ new = NULL;
+    }
+    RCurlconn ctxt = (RCurlconn) new->private;
+    ctxt->bufsize = 2 * CURL_MAX_WRITE_SIZE;
+    ctxt->buf = malloc(ctxt->bufsize);
+    if (!ctxt->buf) {
+	free(new->description); free(new->class); free(new->private);
+	free(new);
+	error(_("allocation of url connection failed"));
+	/* for Solaris 12.5 */ new = NULL;
+    }
+    return new;
+#else
+    error(_("url(method = \"libcurl\") is not supported on this platform"));
+    return (Rconnection)0; /* -Wall */
+#endif
+}
diff --git a/src/modules/internet/nanoftp.c b/src/modules/internet/nanoftp.c
index 841ee42..96ee80f 100644
--- a/src/modules/internet/nanoftp.c
+++ b/src/modules/internet/nanoftp.c
@@ -1,7 +1,7 @@
 /*
  *  R : A Computer Language for Statistical Data Analysis
  *  Copyright (C) 1998-2001  Daniel Veillard.
- *  Copyright (C) 2001-2014  The R Core Team.
+ *  Copyright (C) 2001-2015  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
@@ -15,7 +15,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  */
 
 /* <UTF8> the only interpretation of char is ASCII
@@ -34,8 +34,6 @@
 #endif
 
 
-#include <sys/types.h> // for ssize_t
-
 #ifdef ENABLE_NLS
 #include <libintl.h>
 #define _(String) gettext (String)
@@ -44,7 +42,6 @@
 #endif
 
 extern void R_ProcessEvents(void);
-#if !defined(Unix) || defined(HAVE_BSD_NETWORKING)
 
 #ifdef Win32
 #include <io.h>
@@ -66,13 +63,13 @@ extern void R_ProcessEvents(void);
 #include <stdlib.h>
 
 #ifdef HAVE_UNISTD_H
-#include <unistd.h>
+# include <unistd.h>
 #endif
 
-#ifdef HAVE_BSD_NETWORKING
-#  include <netdb.h>
-#  include <sys/socket.h>
-#  include <netinet/in.h>
+#ifdef Unix
+# include <netdb.h>
+# include <sys/socket.h>
+# include <netinet/in.h>
 #endif
 
 #ifdef HAVE_FCNTL_H
@@ -151,7 +148,7 @@ typedef struct RxmlNanoFTPCtxt {
     SOCKET dataFd;	/* the file descriptor for the data socket */
     int state;		/* WRITE / READ / CLOSED */
     int returnValue;	/* the protocol return value */
-    ssize_t contentLength;
+    DLsize_t contentLength;
     /* buffer for data received from the control connection */
     char controlBuf[FTP_BUF_SIZE + 1];
     int controlBufIndex;
@@ -603,11 +600,11 @@ static void RxmlFindLength(void *ctxt, char *ptr)
 	p++;
 	q = strchr(p, 'b');
 	if(!q || strncmp(q, "bytes)", 6) != 0) return;
-	// was atoi, but ssize_t may be > long, let alone int.
+	// was atoi, but DLsize_t may be > long, let alone int.
 	char *endp;
 	double len = strtod(p, &endp);
 	if(len >= 0)
-	    ((RxmlNanoFTPCtxtPtr) ctxt)->contentLength = (ssize_t) len;
+	    ((RxmlNanoFTPCtxtPtr) ctxt)->contentLength = (DLsize_t) len;
     }
 }
 
@@ -818,7 +815,7 @@ RxmlNanoFTPConnect(void *ctx) {
     RxmlNanoFTPCtxtPtr ctxt = (RxmlNanoFTPCtxtPtr) ctx;
     struct hostent *hp;
     int port;
-    ssize_t res;
+    int res;
 
     if (ctxt == NULL)
 	return(-1);
@@ -925,12 +922,12 @@ RxmlNanoFTPConnect(void *ctx) {
 	    buf[sizeof(buf) - 1] = 0;
 	    len = (int) strlen(buf);
 	    RxmlMessage(0, "%s", buf);
-	    res = send(ctxt->controlFd, buf, len, 0);
+	    res = (int) send(ctxt->controlFd, buf, len, 0);
 	    if (res < 0) {
 		RxmlMessage(1, "send failed");
 		closesocket(ctxt->controlFd);
 		ctxt->controlFd = -1;
-		return((int) res);
+		return(res);
 	    }
 	    res = RxmlNanoFTPGetResponse(ctxt);
 	    switch (res) {
@@ -945,12 +942,12 @@ RxmlNanoFTPConnect(void *ctx) {
 		    buf[sizeof(buf) - 1] = 0;
 		    len = (int) strlen(buf);
 		    RxmlMessage(0, "%s", buf);
-		    res = send(ctxt->controlFd, buf, len, 0);
+		    res = (int) send(ctxt->controlFd, buf, len, 0);
 		    if (res < 0) {
 			RxmlMessage(1, "send failed");
 			closesocket(ctxt->controlFd);
 			ctxt->controlFd = -1;
-			return((int) res);
+			return(res);
 		    }
 		    res = RxmlNanoFTPGetResponse(ctxt);
 		    if (res > 3) {
@@ -984,12 +981,12 @@ RxmlNanoFTPConnect(void *ctx) {
 		buf[sizeof(buf) - 1] = 0;
 		len = (int) strlen(buf);
 		RxmlMessage(0, "%s", buf);
-		res = send(ctxt->controlFd, buf, len, 0);
+		res = (int) send(ctxt->controlFd, buf, len, 0);
 		if (res < 0) {
 		    RxmlMessage(1, "send failed");
 		    closesocket(ctxt->controlFd); ctxt->controlFd = -1;
 		    ctxt->controlFd = -1;
-		    return((int) res);
+		    return(res);
 		}
 		res = RxmlNanoFTPGetResponse(ctxt);
 		if (res == 2) {
@@ -1013,12 +1010,12 @@ RxmlNanoFTPConnect(void *ctx) {
 		buf[sizeof(buf) - 1] = 0;
 		len = (int) strlen(buf);
 		RxmlMessage(0, "%s", buf);
-		res = send(ctxt->controlFd, buf, len, 0);
+		res = (int) send(ctxt->controlFd, buf, len, 0);
 		if (res < 0) {
 		    RxmlMessage(1, "send failed");
 		    closesocket(ctxt->controlFd); ctxt->controlFd = -1;
 		    ctxt->controlFd = -1;
-		    return((int) res);
+		    return(res);
 		}
 		res = RxmlNanoFTPGetResponse(ctxt);
 		if ((res == 1) || (res == 2)) {
@@ -1034,12 +1031,12 @@ RxmlNanoFTPConnect(void *ctx) {
 		buf[sizeof(buf) - 1] = 0;
 		len = (int) strlen(buf);
 		RxmlMessage(0, "%s", buf);
-		res = send(ctxt->controlFd, buf, len, 0);
+		res = (int) send(ctxt->controlFd, buf, len, 0);
 		if (res < 0) {
 		    RxmlMessage(1, "send failed");
 		    closesocket(ctxt->controlFd); ctxt->controlFd = -1;
 		    ctxt->controlFd = -1;
-		    return((int) res);
+		    return(res);
 		}
 		res = RxmlNanoFTPGetResponse(ctxt);
 		if ((res == 1) || (res == 2)) {
@@ -1465,7 +1462,7 @@ RxmlNanoFTPTimeout(int delay) {
     timeout = (unsigned int) delay;
 }
 
-ssize_t
+DLsize_t
 RxmlNanoFTPContentLength(void *ctx)
 {
     RxmlNanoFTPCtxtPtr ctxt = (RxmlNanoFTPCtxtPtr) ctx;
@@ -1473,5 +1470,3 @@ RxmlNanoFTPContentLength(void *ctx)
     if (ctxt == NULL) return(-1);
     return(ctxt->contentLength);
 }
-
-#endif /* !Unix or BSD_NETWORKING */
diff --git a/src/modules/internet/nanohttp.c b/src/modules/internet/nanohttp.c
index 3bd5bc8..5f70347 100644
--- a/src/modules/internet/nanohttp.c
+++ b/src/modules/internet/nanohttp.c
@@ -1,7 +1,7 @@
 /*
  *  R : A Computer Language for Statistical Data Analysis
  *  Copyright (C) 1998-2001  Daniel Veillard.
- *  Copyright (C) 2001-2014   The R Core Team.
+ *  Copyright (C) 2001-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
@@ -15,7 +15,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  */
 
 /* <UTF8> the only interpretation of char is ASCII 
@@ -40,8 +40,6 @@
 #include <config.h>
 #endif
 
-#include <sys/types.h> // for ssize_t
-
 #undef HAVE_ZLIB_H
 
 #ifdef ENABLE_NLS
@@ -57,7 +55,6 @@
 #endif
 
 extern void R_ProcessEvents(void);
-#if !defined(Unix) || defined(HAVE_BSD_NETWORKING)
 
 #ifdef Win32
 #include <io.h>
@@ -94,10 +91,10 @@ extern void R_FlushConsole(void);
 #include <unistd.h>
 #endif
 
-#ifdef HAVE_BSD_NETWORKING
-#  include <netdb.h>
-#  include <sys/socket.h>
-#  include <netinet/in.h>
+#ifdef Unix
+# include <netdb.h>
+# include <sys/socket.h>
+# include <netinet/in.h>
 #endif
 
 #ifdef HAVE_FCNTL_H
@@ -209,7 +206,7 @@ typedef struct RxmlNanoHTTPCtxt {
     int returnValue;	/* the protocol return value */
     char *statusMsg;    /* the protocol status message */
     char *contentType;	/* the MIME type for the input */
-    ssize_t contentLength;	/* the reported length */
+    DLsize_t contentLength;	/* the reported length */
     char *location;	/* the new URL in case of redirect */
     char *authHeader;	/* contents of {WWW,Proxy}-Authenticate header */
     char *encoding;	/* encoding extracted from the contentType */
@@ -369,7 +366,10 @@ RxmlNanoHTTPScanURL(RxmlNanoHTTPCtxtPtr ctxt, const char *URL)
 	    break;
 	}
 	if(indx >= 40959)
-	    RxmlMessage(2, _("RxmlNanoHTTPScanURL: overlong (invalid?) URL"));	buf[indx++] = *cur++;
+	    RxmlMessage(2, _("RxmlNanoHTTPScanURL: overlong (invalid?) URL"));
+	else {
+	    buf[indx++] = *cur++;
+	}
     }
     if (*cur == 0) return;
 
@@ -397,7 +397,10 @@ RxmlNanoHTTPScanURL(RxmlNanoHTTPCtxtPtr ctxt, const char *URL)
 	    break;
 	}
 	if(indx >= 40959)
-	    RxmlMessage(2, _("RxmlNanoHTTPScanURL: overlong (invalid?) URL"));	buf[indx++] = *cur++;
+	    RxmlMessage(2, _("RxmlNanoHTTPScanURL: overlong (invalid?) URL"));
+	else { 
+	    buf[indx++] = *cur++;
+	}
     }
     if (*cur == 0)
         ctxt->path = xmlMemStrdup("/");
@@ -454,7 +457,9 @@ RxmlNanoHTTPScanProxy(const char *URL)
 	}
 	if(indx >= 4095)
 	    RxmlMessage(2, _("RxmlNanoHTTPScanProxy: overlong (invalid?) URL"));
-	buf[indx++] = *cur++;
+	else {
+	    buf[indx++] = *cur++;
+	}
     }
     if (*cur == 0) return;
 
@@ -489,7 +494,10 @@ RxmlNanoHTTPScanProxy(const char *URL)
 	    break;
 	}
 	if(indx >= 4095)
-	    RxmlMessage(2, _("RxmlNanoHTTPScanProxy: overlong (invalid?) URL"));	buf[indx++] = *cur++;
+	    RxmlMessage(2, _("RxmlNanoHTTPScanProxy: overlong (invalid?) URL"));
+	else {
+	    buf[indx++] = *cur++;
+	}
     }
 }
 
@@ -547,6 +555,7 @@ RxmlNanoHTTPFreeCtxt(RxmlNanoHTTPCtxtPtr ctxt)
     if (ctxt->mimeType != NULL) xmlFree(ctxt->mimeType);
     if (ctxt->location != NULL) xmlFree(ctxt->location);
     if (ctxt->authHeader != NULL) xmlFree(ctxt->authHeader);
+    if (ctxt->statusMsg != NULL) xmlFree(ctxt->statusMsg);
 #ifdef HAVE_ZLIB_H
     if (ctxt->strm != NULL) {
 	inflateEnd(ctxt->strm);
@@ -573,7 +582,7 @@ RxmlNanoHTTPSend(RxmlNanoHTTPCtxtPtr ctxt)
     if (ctxt->state & XML_NANO_HTTP_WRITE) {
         unsigned int total_sent = 0;
         while (total_sent <strlen(ctxt->outptr)) {
-            ssize_t nsent = send(ctxt->fd, ctxt->outptr+total_sent,
+            DLsize_t nsent = send(ctxt->fd, ctxt->outptr+total_sent,
 				 strlen(ctxt->outptr)-total_sent, 0);
             if (nsent > 0)
                 total_sent += nsent;
@@ -709,6 +718,12 @@ RxmlNanoHTTPRecv(RxmlNanoHTTPCtxtPtr ctxt)
 #if defined(EAGAIN) && EAGAIN != EWOULDBLOCK
 		case EAGAIN:
 #endif
+#if defined(WSAEINPROGRESS) && WSAEINPROGRESS != EINPROGRESS
+		case WSAEINPROGRESS:
+#endif
+#if defined(WSAEWOULDBLOCK) && WSAEWOULDBLOCK != EWOULDBLOCK
+		case WSAEWOULDBLOCK:
+#endif
 		    break;
 
 		default:
@@ -875,10 +890,10 @@ RxmlNanoHTTPScanAnswer(RxmlNanoHTTPCtxtPtr ctxt, const char *line)
         cur += 15;
 	while ((*cur == ' ') || (*cur == '\t')) cur++;
 	{
-	    // was atoi, but ssize_t may be > long, let alone int.
+	    // was atoi, but DLsize_t may be > long, let alone int.
 	    char *endp;
 	    double len = strtod(cur, &endp);
-	    ctxt->contentLength = (ssize_t) len;
+	    ctxt->contentLength = (DLsize_t) len;
 	}
     } else if (!xmlStrncasecmp(BAD_CAST line, BAD_CAST"Location:", 9)) {
         cur += 9;
@@ -997,6 +1012,12 @@ RxmlNanoHTTPConnectAttempt(struct sockaddr *addr)
 	switch (socket_errno()) {
 	case EINPROGRESS:
 	case EWOULDBLOCK:
+#if defined(WSAEINPROGRESS) && WSAEINPROGRESS != EINPROGRESS
+	case WSAEINPROGRESS:
+#endif
+#if defined(WSAEWOULDBLOCK) && WSAEWOULDBLOCK != EWOULDBLOCK
+	case WSAEWOULDBLOCK:
+#endif	
 	    break;
 	default:
 	    perror("connect");
@@ -1120,7 +1141,13 @@ RxmlNanoHTTPConnectHost(const char *host, int port)
 	if (h->h_addrtype == AF_INET) {
 	    /* A records (IPv4) */
 	    memcpy(&ia, h->h_addr_list[i], h->h_length);
+#ifdef _WIN32
+	    // this is a u_short
 	    sockin.sin_family = h->h_addrtype;
+#else
+	    // this is usually a unsigned char.
+	    sockin.sin_family = (sa_family_t) h->h_addrtype;
+#endif
 	    sockin.sin_addr   = ia;
 	    sockin.sin_port   = htons(port);
 	    addr = (struct sockaddr *)&sockin;
@@ -1447,7 +1474,11 @@ RxmlNanoHTTPMethod(const char *URL, const char *method, const char *input,
 
     if ((ctxt->location != NULL) && (ctxt->returnValue >= 300) &&
         (ctxt->returnValue < 400)) {
-	RxmlMessage(1, _("redirect to: '%s'"), ctxt->location);
+	if(strncmp(ctxt->location, "https://", 8) == 0)
+	    RxmlMessage(2, _("\"internal\" method cannot handle https redirection to: '%s'"),
+			ctxt->location);
+	else
+	    RxmlMessage(1, _("redirect to: '%s'"), ctxt->location);
 	while (RxmlNanoHTTPRecv(ctxt)) 
 	    ;  // clang likes this on a separate line
         if (nbRedirects < XML_NANO_HTTP_MAX_REDIR) {
@@ -1505,7 +1536,7 @@ RxmlNanoHTTPStatusMsg(void *ctx)
     return(ctxt->statusMsg);
 }
 
-ssize_t
+DLsize_t
 RxmlNanoHTTPContentLength(void *ctx)
 {
     RxmlNanoHTTPCtxtPtr ctxt = (RxmlNanoHTTPCtxtPtr) ctx;
@@ -1521,4 +1552,3 @@ RxmlNanoHTTPContentType(void *ctx)
     RxmlNanoHTTPCtxtPtr ctxt = (RxmlNanoHTTPCtxtPtr) ctx;
     return(ctxt->contentType);
 }
-#endif /* !Unix or BSD_NETWORKING */
diff --git a/src/modules/internet/sock.c b/src/modules/internet/sock.c
index 9b59361..c68d0f0 100644
--- a/src/modules/internet/sock.c
+++ b/src/modules/internet/sock.c
@@ -1,7 +1,7 @@
 /*
  *  R : A Computer Language for Statistical Data Analysis
 
- *  Copyright (C) 1998-2001   The R Core Team
+ *  Copyright (C) 1998-2015   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
@@ -15,7 +15,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  */
 
 /* <UTF8> chars are only handled as a whole */
@@ -43,11 +43,9 @@
 #  ifdef HAVE_UNISTD_H
 #    include <unistd.h>
 #  endif
-#  ifdef HAVE_BSD_NETWORKING
-#    include <netdb.h>
-#    include <sys/socket.h>
-#    include <netinet/in.h>
-#  endif
+#  include <netdb.h>
+#  include <sys/socket.h>
+#  include <netinet/in.h>
 #endif
 
 #include <R_ext/Error.h>
@@ -59,10 +57,6 @@
 
 #define MAXBACKLOG 5
 
-#ifndef HAVE_SOCKETS
-static char socket_msg[] = "sockets are not available on this system";
-#endif
-
 static int Sock_error(Sock_error_t perr, int e, int he)
 {
     if (perr != NULL) {
@@ -72,7 +66,7 @@ static int Sock_error(Sock_error_t perr, int e, int he)
     return -1;
 }
 
-/* <FIXME> is this classic MacOS X? */
+/* <FIXME> is this classic Mac OS? */
 #ifdef MACINTOSH
 extern void __sinit(void);
 extern int __initialize (void *ignoredParameter);
@@ -109,7 +103,6 @@ int Sock_init()
 /* open a socket for listening */
 int Sock_open(Sock_port_t port, Sock_error_t perr)
 {
-#ifdef HAVE_SOCKETS
     int sock;
     struct sockaddr_in server;
 
@@ -159,16 +152,11 @@ int Sock_open(Sock_port_t port, Sock_error_t perr)
 	(listen(sock, MAXBACKLOG) < 0))
 	return Sock_error(perr, errno, 0);
     return sock;
-#else
-    error(socket_msg);
-    return(-1);
-#endif
 }
 
 /* listen on a socket, return name of connecting host in cname */
 int Sock_listen(int fd, char *cname, int buflen, Sock_error_t perr)
 {
-#ifdef HAVE_SOCKETS
     struct sockaddr_in net_client;
     R_SOCKLEN_T len = sizeof(struct sockaddr);
     int retval;
@@ -194,16 +182,11 @@ int Sock_listen(int fd, char *cname, int buflen, Sock_error_t perr)
 	cname[nlen] = 0;
     }
     return retval;
-#else
-    error(socket_msg);
-    return(-1);
-#endif
 }
 
 /* open and connect to a socket */
 int Sock_connect(Sock_port_t port, char *sname, Sock_error_t perr)
 {
-#ifdef HAVE_SOCKETS
     struct sockaddr_in server;
     struct hostent *hp;
     int sock;
@@ -230,10 +213,6 @@ int Sock_connect(Sock_port_t port, char *sname, Sock_error_t perr)
 	return -1;
     }
     return sock;
-#else
-    error(socket_msg);
-    return(-1);
-#endif
 }
 
 /* close a socket */
@@ -253,7 +232,6 @@ int Sock_close(int fd, Sock_error_t perr)
 /* read from a socket */
 ssize_t Sock_read(int fd, void *buf, size_t size, Sock_error_t perr)
 {
-#ifdef HAVE_SOCKETS
     ssize_t retval;
     do
 	retval = recv(fd, buf, size, 0);
@@ -262,16 +240,11 @@ ssize_t Sock_read(int fd, void *buf, size_t size, Sock_error_t perr)
 	return Sock_error(perr, errno, 0);
     else
 	return retval;
-#else
-    error(socket_msg);
-    return(-1);
-#endif
 }
 
 /* write to a socket */
 ssize_t Sock_write(int fd, const void *buf, size_t size, Sock_error_t perr)
 {
-#ifdef HAVE_SOCKETS
     ssize_t retval;
     do
 	retval = send(fd, buf, size, 0);
@@ -280,8 +253,4 @@ ssize_t Sock_write(int fd, const void *buf, size_t size, Sock_error_t perr)
 	return Sock_error(perr, errno, 0);
     else
 	return retval;
-#else
-    error(socket_msg);
-    return(-1);
-#endif
 }
diff --git a/src/modules/internet/sock.h b/src/modules/internet/sock.h
index 704b51f..37210d4 100644
--- a/src/modules/internet/sock.h
+++ b/src/modules/internet/sock.h
@@ -15,7 +15,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  */
 
 /* POSIX says ssize_t is defined in unistd.h, but apparently on
diff --git a/src/modules/internet/sockconn.c b/src/modules/internet/sockconn.c
index 96d9b27..1ddd09f 100644
--- a/src/modules/internet/sockconn.c
+++ b/src/modules/internet/sockconn.c
@@ -1,6 +1,6 @@
 /*
  *  R : A Computer Language for Statistical Data Analysis
- *  Copyright (C)  2001-12   The R Core Team.
+ *  Copyright (C)  2001-2015   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
@@ -14,7 +14,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  */
 
 /* <UTF8> chars are only handled as a whole */
@@ -23,8 +23,6 @@
 #include <config.h>
 #endif
 
-#ifdef HAVE_SOCKETS
-
 
 /* ------------------- socket connections  --------------------- */
 
@@ -104,7 +102,7 @@ static void sock_close(Rconnection con)
     con->isopen = FALSE;
 }
 
-static size_t sock_read_helper(Rconnection con, void *ptr, size_t size)
+static ssize_t sock_read_helper(Rconnection con, void *ptr, size_t size)
 {
     Rsockconn this = (Rsockconn)con->private;
     ssize_t res;
@@ -148,7 +146,7 @@ static size_t sock_read_helper(Rconnection con, void *ptr, size_t size)
 static int sock_fgetc_internal(Rconnection con)
 {
     unsigned char c;
-    size_t n;
+    ssize_t n;
 
     n = sock_read_helper(con, (char *)&c, 1);
     return (n == 1) ? c : R_EOF;
@@ -157,15 +155,17 @@ static int sock_fgetc_internal(Rconnection con)
 static size_t sock_read(void *ptr, size_t size, size_t nitems,
 			Rconnection con)
 {
-    return sock_read_helper(con, ptr, size * nitems)/size;
+    ssize_t n = sock_read_helper(con, ptr, size * nitems)/size;
+    return n > 0 ? n : 0;
 }
 
 static size_t sock_write(const void *ptr, size_t size, size_t nitems,
 			 Rconnection con)
 {
     Rsockconn this = (Rsockconn)con->private;
-
-    return R_SockWrite(this->fd, ptr, (int)(size * nitems), this->timeout)/size;
+    ssize_t n = R_SockWrite(this->fd, ptr, (int)(size * nitems),
+			    this->timeout)/size;
+    return n > 0 ? n : 0;
 }
 
 Rconnection in_R_newsock(const char *host, int port, int server,
@@ -179,12 +179,14 @@ Rconnection in_R_newsock(const char *host, int port, int server,
     if(!new->class) {
 	free(new);
 	error(_("allocation of socket connection failed"));
+        /* for Solaris 12.5 */ new = NULL;
     }
     strcpy(new->class, "sockconn");
     new->description = (char *) malloc(strlen(host) + 10);
     if(!new->description) {
 	free(new->class); free(new);
 	error(_("allocation of socket connection failed"));
+        /* for Solaris 12.5 */ new = NULL;
     }
     init_con(new, host, CE_NATIVE, mode);
     new->open = &sock_open;
@@ -198,11 +200,10 @@ Rconnection in_R_newsock(const char *host, int port, int server,
     if(!new->private) {
 	free(new->description); free(new->class); free(new);
 	error(_("allocation of socket connection failed"));
+	/* for Solaris 12.5 */ new = NULL;
     }
     ((Rsockconn)new->private)-> port = port;
     ((Rsockconn)new->private)-> server = server;
     ((Rsockconn)new->private)-> timeout = timeout;
     return new;
 }
-
-#endif /* HAVE_SOCKETS */
diff --git a/src/modules/lapack/LICENSE b/src/modules/lapack/LICENSE
index 98b79eb..eefcbda 100644
--- a/src/modules/lapack/LICENSE
+++ b/src/modules/lapack/LICENSE
@@ -1,9 +1,9 @@
-Copyright (c) 1992-2011 The University of Tennessee and The University
+Copyright (c) 1992-2016 The University of Tennessee and The University
                         of Tennessee Research Foundation.  All rights
                         reserved.
-Copyright (c) 2000-2011 The University of California Berkeley. All
+Copyright (c) 2000-2016 The University of California Berkeley. All
                         rights reserved.
-Copyright (c) 2006-2012 The University of Colorado Denver.  All rights
+Copyright (c) 2006-2016 The University of Colorado Denver.  All rights
                         reserved.
 
 $COPYRIGHT$
diff --git a/src/modules/lapack/Lapack.c b/src/modules/lapack/Lapack.c
index ee37ea4..373abc9 100644
--- a/src/modules/lapack/Lapack.c
+++ b/src/modules/lapack/Lapack.c
@@ -1,6 +1,6 @@
 /*
  *  R : A Computer Language for Statistical Data Analysis
- *  Copyright (C) 2001--2013  The R Core Team.
+ *  Copyright (C) 2001--2017  The R Core Team.
  *  Copyright (C) 2003--2010  The R Foundation
  *
  *  This program is free software; you can redistribute it and/or modify
@@ -15,7 +15,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  */
 
 /* Interface routines, callable from R using .Internal, for Lapack code */
@@ -25,13 +25,31 @@
 #endif
 
 #include <Defn.h>
-#include <ctype.h> /* for toupper */
+#include <ctype.h>  /* for toupper */
+#include <limits.h> /* for PATH_MAX */
+#include <stdlib.h> /* for realpath */
+
+#ifdef HAVE_UNISTD_H
+# include <unistd.h> /* for realpath on some systems */
+#endif
+
+#ifdef HAVE_DLFCN_H
+# include <dlfcn.h>  /* for dladdr */
+#endif
+
+#if defined(HAVE_REALPATH) && defined(HAVE_DECL_REALPATH) && !HAVE_DECL_REALPATH
+extern char *realpath(const char *path, char *resolved_path);
+#endif
+
+#if defined(HAVE_DLADDR) && defined(HAVE_DECL_DLADDR) && !HAVE_DECL_DLADDR
+extern int dladdr(void *addr, Dl_info *info);
+#endif
 
 #include "Lapack.h"
 
 /* NB: the handling of dims is odd here.  Most are coerced to be
  * integers (which dimgets currently guarantees), but a couple were
- * used unchecked. 
+ * used unchecked.
  */
 
 /* FIXME: MM would want to make these available to packages;
@@ -78,29 +96,26 @@ static char La_rcond_type(const char *typstr)
 /* La.svd, called from svd */
 static SEXP La_svd(SEXP jobu, SEXP x, SEXP s, SEXP u, SEXP vt)
 {
-    int n, p, info = 0;
-
     if (!isString(jobu))
 	error("'jobu' must be a character string");
-    int *xdims = INTEGER(coerceVector(getAttrib(x, R_DimSymbol), INTSXP));
-    n = xdims[0]; p = xdims[1];
+    int *xdims = INTEGER(coerceVector(getAttrib(x, R_DimSymbol), INTSXP)),
+	n = xdims[0], p = xdims[1], nprot = 2;
 
     /* work on a copy of x  */
     double *xvals;
     if (!isReal(x)) {
-       x = coerceVector(x, REALSXP);
-       xvals = REAL(x);
+	x = PROTECT(coerceVector(x, REALSXP)); nprot++;
+	xvals = REAL(x);
     } else {
 	xvals = (double *) R_alloc(n * (size_t) p, sizeof(double));
 	Memcpy(xvals, REAL(x), n * (size_t) p);
     }
-    PROTECT(x);
 
     SEXP dims = getAttrib(u, R_DimSymbol);
-    if (TYPEOF(dims) != INTSXP) error("non-integer dims");
+    if (TYPEOF(dims) != INTSXP) error("non-integer dim(u)");
     int ldu = INTEGER(dims)[0];
     dims = getAttrib(vt, R_DimSymbol);
-    if (TYPEOF(dims) != INTSXP) error("non-integer dims");
+    if (TYPEOF(dims) != INTSXP) error("non-integer dim(vt)");
     int ldvt = INTEGER(dims)[0];
     double tmp;
     /* min(n,p) large is implausible, but cast to be sure */
@@ -108,7 +123,7 @@ static SEXP La_svd(SEXP jobu, SEXP x, SEXP s, SEXP u, SEXP vt)
 
     /* ask for optimal size of work array */
     const char *ju = CHAR(STRING_ELT(jobu, 0));
-    int lwork = -1;
+    int info = 0, lwork = -1;
     F77_CALL(dgesdd)(ju, &n, &p, xvals, &n, REAL(s),
 		     REAL(u), &ldu, REAL(vt), &ldvt,
 		     &tmp, &lwork, iwork, &info);
@@ -131,7 +146,7 @@ static SEXP La_svd(SEXP jobu, SEXP x, SEXP s, SEXP u, SEXP vt)
     SET_VECTOR_ELT(val, 0, s);
     SET_VECTOR_ELT(val, 1, u);
     SET_VECTOR_ELT(val, 2, vt);
-    UNPROTECT(3);
+    UNPROTECT(nprot);
     return val;
 }
 
@@ -558,7 +573,7 @@ static SEXP La_solve_cmplx(SEXP A, SEXP Bin)
 	p = 1;
 	if(length(Bin) != n)
 	    error(_("'b' (%d x %d) must be compatible with 'a' (%d x %d)"),
-		  length(Bin), p, n, n);	
+		  length(Bin), p, n, n);
 	PROTECT(B = allocVector(CPLXSXP, n));
 	if (!isNull(Adn)) setAttrib(B, R_NamesSymbol, VECTOR_ELT(Adn, 1));
     }
@@ -824,7 +839,7 @@ static SEXP La_rs_cmplx(SEXP xin, SEXP only_values)
     SEXP values = PROTECT(allocVector(REALSXP, n));
     rvalues = REAL(values);
 
-    rwork = (double *) R_alloc((3*(size_t)n-2) > 1 ? 3*(size_t)n-2 : 1, 
+    rwork = (double *) R_alloc((3*(size_t)n-2) > 1 ? 3*(size_t)n-2 : 1,
 			       sizeof(double));
     /* ask for optimal size of work array */
     lwork = -1;
@@ -963,13 +978,14 @@ static SEXP La_chol(SEXP A, SEXP pivot, SEXP stol)
 		      -info, "dpstrf");
 	}
 	setAttrib(ans, install("pivot"), piv);
-	setAttrib(ans, install("rank"), ScalarInteger(rank));
+	SEXP s_rank = install("rank");
+	setAttrib(ans, s_rank, ScalarInteger(rank));
 	SEXP cn, dn = getAttrib(ans, R_DimNamesSymbol);
 	if (!isNull(dn) && !isNull(cn = VECTOR_ELT(dn, 1))) {
 	    // need to pivot the colnames
 	    SEXP dn2 = PROTECT(duplicate(dn));
 	    SEXP cn2 = VECTOR_ELT(dn2, 1);
-	    for(int i = 0; i < m; i++) 
+	    for(int i = 0; i < m; i++)
 		SET_STRING_ELT(cn2, i, STRING_ELT(cn, ip[i] - 1)); // base 1
 	    setAttrib(ans, R_DimNamesSymbol, dn2);
 	    UNPROTECT(1);
@@ -1034,7 +1050,7 @@ static SEXP La_solve(SEXP A, SEXP Bin, SEXP tolin)
     double *avals, anorm, rcond, tol = asReal(tolin), *work;
     SEXP B, Adn, Bdn;
 
-    if (!(isMatrix(A) && 
+    if (!(isMatrix(A) &&
 	  (TYPEOF(A) == REALSXP || TYPEOF(A) == INTSXP || TYPEOF(A) == LGLSXP)))
 	error(_("'a' must be a numeric matrix"));
     int *Adims = INTEGER(coerceVector(getAttrib(A, R_DimSymbol), INTSXP));
@@ -1067,13 +1083,13 @@ static SEXP La_solve(SEXP A, SEXP Bin, SEXP tolin)
 	p = 1;
 	if(length(Bin) != n)
 	    error(_("'b' (%d x %d) must be compatible with 'a' (%d x %d)"),
-		  length(Bin), p, n, n);	
+		  length(Bin), p, n, n);
 	PROTECT(B = allocVector(REALSXP, n));
 	if (!isNull(Adn)) setAttrib(B, R_NamesSymbol, VECTOR_ELT(Adn, 1));
     }
     PROTECT(Bin = coerceVector(Bin, REALSXP));
     Memcpy(REAL(B), REAL(Bin), (size_t)n * p);
-    
+
     int *ipiv = (int *) R_alloc(n, sizeof(int));
 
     /* work on a copy of A */
@@ -1172,7 +1188,7 @@ static SEXP qr_coef_real(SEXP Q, SEXP Bin)
 
     k = LENGTH(tau);
     if (!isMatrix(Bin)) error(_("'b' must be a numeric matrix"));
-    
+
     B = PROTECT(isReal(Bin) ? duplicate(Bin) : coerceVector(Bin, REALSXP));
 
     n = INTEGER(coerceVector(getAttrib(qr, R_DimSymbol), INTSXP))[0];
@@ -1287,7 +1303,8 @@ static SEXP det_ge_real(SEXP Ain, SEXP logarithm)
     SET_STRING_ELT(nm, 1, mkChar("sign"));
     setAttrib(val, R_NamesSymbol, nm);
     SET_VECTOR_ELT(val, 0, ScalarReal(modulus));
-    setAttrib(VECTOR_ELT(val, 0), install("logarithm"), ScalarLogical(useLog));
+    SEXP s_logarithm = install("logarithm");
+    setAttrib(VECTOR_ELT(val, 0), s_logarithm, ScalarLogical(useLog));
     SET_VECTOR_ELT(val, 1, ScalarInteger(sign));
     setAttrib(val, R_ClassSymbol, ScalarString(mkChar("det")));
     UNPROTECT(3);
@@ -1354,6 +1371,23 @@ static SEXP mod_do_lapack(SEXP call, SEXP op, SEXP args, SEXP env)
 	ans = mkString(str);
 	break;
     }
+    case 1001:
+    {
+#if defined(HAVE_DLADDR) && defined(HAVE_REALPATH)
+	Dl_info dl_info;
+	if (dladdr(F77_NAME(ilaver), &dl_info)) {
+	    char buf[PATH_MAX+1];
+	    char *res = realpath(dl_info.dli_fname, buf);
+	    if (res) {
+		ans = mkString(res);
+		break;
+	    }
+	}
+#endif
+	ans = mkString(""); /* LAPACK library not known */
+	break;
+
+    }
     }
 
     return ans;
diff --git a/src/modules/lapack/Lapack.h b/src/modules/lapack/Lapack.h
index 9bf5020..bcde453 100644
--- a/src/modules/lapack/Lapack.h
+++ b/src/modules/lapack/Lapack.h
@@ -14,7 +14,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  */
 
 #include <R_ext/Complex.h>
diff --git a/src/modules/lapack/Makefile.in b/src/modules/lapack/Makefile.in
index 5a6b559..fefea9e 100644
--- a/src/modules/lapack/Makefile.in
+++ b/src/modules/lapack/Makefile.in
@@ -34,7 +34,7 @@ DISTFILES = \
 	cmplx.f dlapack.f dlamch.f
 
 lapack_la = lapack$(SHLIB_EXT)
-Rlapack_la = libRlapack$(DYLIB_EXT)
+Rlapack_la = libRlapack$(R_DYLIB_EXT)
 lapack_la_OBJECTS = $(OBJECTS)
 ## Used for passing '+s' to SHLIB_LINK on HP-UX.
 lapack_la_LDFLAGS = @LAPACK_LDFLAGS@
@@ -111,7 +111,7 @@ mostlyclean: clean
 clean:
 	@-rm -rf .libs _libs
 	@-rm -f Makedeps *.d *.o *.a *.lo *.la \
-	  lapack$(SHLIB_EXT) libRlapack$(DYLIB_EXT)
+	  $(lapack_la) $(Rlapack_la)
 distclean: clean
 	@-rm -f Makefile
 maintainer-clean: distclean
diff --git a/src/modules/lapack/Makefile.win b/src/modules/lapack/Makefile.win
index a13f9e4..35ed0c8 100644
--- a/src/modules/lapack/Makefile.win
+++ b/src/modules/lapack/Makefile.win
@@ -1,7 +1,7 @@
 #-*- Makefile -*-
 include ../../gnuwin32/MkRules
 
-MODULE=lapack
+MODULE = lapack
 all: 
 	@$(MAKE) --no-print-directory -f Makefile.win -s makeMakedeps 
 	@$(MAKE) --no-print-directory -f Makefile.win ../../../$(BINDIR)/Rlapack.dll 
@@ -15,14 +15,14 @@ OBJS=$(CSOURCES:.c=.o) dllversion.o
 LIBSOURCES = dlamch.f dlapack.f cmplx.f
 LIBOBJECTS = $(LIBSOURCES:.f=.o) init_win.o Rlapackrc.o
 
-CPPFLAGS=-I../../include -DHAVE_CONFIG_H
-dlamch-FFLAGS=-ffloat-store
+CPPFLAGS = -I../../include -DHAVE_CONFIG_H
+dlamch-FFLAGS = -ffloat-store
 
 install: $(MODULE).dll
 	@$(MKDIR) -p ../../../modules$(R_ARCH)
 	$(CP) $< ../../../modules$(R_ARCH)/$(MODULE).dll
 
-lapack-DLLLIBS=-L../../../$(IMPDIR) -lRlapack -lRblas -lR
+lapack-DLLLIBS = -L../../../$(IMPDIR) -lRlapack -lRblas -lR
 
 implib: libRlapack.dll.a
 	@$(CP) libRlapack.dll.a ../../../lib
@@ -48,7 +48,7 @@ clean:
 dllversion.o: ../../include/Rversion.h
 Rlapackrc.o: ../../include/Rversion.h
 
-DEPS=$(CSOURCES:.c=.d)
+DEPS = $(CSOURCES:.c=.d)
 
 makeMakedeps: $(DEPS)
 	@$(RM) Makedeps
diff --git a/src/modules/lapack/R.patch b/src/modules/lapack/R.patch
index 18a4576..7222931 100644
--- a/src/modules/lapack/R.patch
+++ b/src/modules/lapack/R.patch
@@ -1,159 +1,11 @@
-diff -u keep/dlapack.f ./dlapack.f
---- keep/dlapack.f	2013-11-25 09:13:35.000000000 +0000
-+++ ./dlapack.f	2013-11-25 09:21:56.000000000 +0000
-@@ -21126,7 +21126,8 @@
+--- dlamch.f.orig	2015-11-15 20:33:40.000000000 +0000
++++ dlamch.f	2016-01-01 08:33:45.000000000 +0000
+@@ -69,7 +69,7 @@
+ *     November 2015
  *
- *        Compute Householder transform when N=1
+ *     .. Scalar Arguments ..
+-      CHARACTER          CMACH
++      CHARACTER*1        CMACH
+ *     ..
  *
--         CALL DLARFG( M, A, A( MIN( 2, M ), 1 ), 1, T )
-+*  R change to stop gfortran warning
-+         CALL DLARFG( M, A(1,1), A( MIN( 2, M ), 1 ), 1, T(1,1) )
- *         
-       ELSE
- *
-diff -u keep/cmplx.f ./cmplx.f
---- keep/cmplx.f	2013-11-25 09:09:10.000000000 +0000
-+++ ./cmplx.f	2013-11-25 09:11:47.000000000 +0000
-@@ -6048,24 +6048,24 @@
- *
-             MNTHR = ILAENV( 6, 'ZGESVD', JOBU // JOBVT, M, N, 0, 0 )
- *           Compute space needed for ZGEQRF
--            CALL ZGEQRF( M, N, A, LDA, DUM(1), DUM(1), -1, IERR )
--            LWORK_ZGEQRF=DUM(1)
-+            CALL ZGEQRF( M, N, A, LDA, CDUM(1), CDUM(1), -1, IERR )
-+            LWORK_ZGEQRF=CDUM(1)
- *           Compute space needed for ZUNGQR
--            CALL ZUNGQR( M, N, N, A, LDA, DUM(1), DUM(1), -1, IERR )
--            LWORK_ZUNGQR_N=DUM(1)
--            CALL ZUNGQR( M, M, N, A, LDA, DUM(1), DUM(1), -1, IERR )
--            LWORK_ZUNGQR_M=DUM(1)
-+            CALL ZUNGQR( M, N, N, A, LDA, CDUM(1), CDUM(1), -1, IERR )
-+            LWORK_ZUNGQR_N=CDUM(1)
-+            CALL ZUNGQR( M, M, N, A, LDA, CDUM(1), CDUM(1), -1, IERR )
-+            LWORK_ZUNGQR_M=CDUM(1)
- *           Compute space needed for ZGEBRD
--            CALL ZGEBRD( N, N, A, LDA, S, DUM(1), DUM(1),
--     $                   DUM(1), DUM(1), -1, IERR )
--            LWORK_ZGEBRD=DUM(1)
-+            CALL ZGEBRD( N, N, A, LDA, S, DUM(1), CDUM(1),
-+     $                   CDUM(1), CDUM(1), -1, IERR )
-+            LWORK_ZGEBRD=CDUM(1)
- *           Compute space needed for ZUNGBR
--            CALL ZUNGBR( 'P', N, N, N, A, LDA, DUM(1),
--     $                   DUM(1), -1, IERR )
--            LWORK_ZUNGBR_P=DUM(1)
--            CALL ZUNGBR( 'Q', N, N, N, A, LDA, DUM(1),
--     $                   DUM(1), -1, IERR )
--            LWORK_ZUNGBR_Q=DUM(1)
-+            CALL ZUNGBR( 'P', N, N, N, A, LDA, CDUM(1),
-+     $                   CDUM(1), -1, IERR )
-+            LWORK_ZUNGBR_P=CDUM(1)
-+            CALL ZUNGBR( 'Q', N, N, N, A, LDA, CDUM(1),
-+     $                   CDUM(1), -1, IERR )
-+            LWORK_ZUNGBR_Q=CDUM(1)
- *
-             IF( M.GE.MNTHR ) THEN
-                IF( WNTUN ) THEN
-@@ -6170,20 +6170,20 @@
- *
- *              Path 10 (M at least N, but not much larger)
- *
--               CALL ZGEBRD( M, N, A, LDA, S, DUM(1), DUM(1),
--     $                   DUM(1), DUM(1), -1, IERR )
--               LWORK_ZGEBRD=DUM(1)
-+               CALL ZGEBRD( M, N, A, LDA, S, DUM(1), CDUM(1),
-+     $                   CDUM(1), CDUM(1), -1, IERR )
-+               LWORK_ZGEBRD=CDUM(1)
-                MAXWRK = 2*N + LWORK_ZGEBRD
-                IF( WNTUS .OR. WNTUO ) THEN
--                  CALL ZUNGBR( 'Q', M, N, N, A, LDA, DUM(1),
--     $                   DUM(1), -1, IERR )
--                  LWORK_ZUNGBR_Q=DUM(1)
-+                  CALL ZUNGBR( 'Q', M, N, N, A, LDA, CDUM(1),
-+     $                   CDUM(1), -1, IERR )
-+                  LWORK_ZUNGBR_Q=CDUM(1)
-                   MAXWRK = MAX( MAXWRK, 2*N+LWORK_ZUNGBR_Q )
-                END IF
-                IF( WNTUA ) THEN
--                  CALL ZUNGBR( 'Q', M, M, N, A, LDA, DUM(1),
--     $                   DUM(1), -1, IERR )
--                  LWORK_ZUNGBR_Q=DUM(1)
-+                  CALL ZUNGBR( 'Q', M, M, N, A, LDA, CDUM(1),
-+     $                   CDUM(1), -1, IERR )
-+                  LWORK_ZUNGBR_Q=CDUM(1)
-                   MAXWRK = MAX( MAXWRK, 2*N+LWORK_ZUNGBR_Q )
-                END IF
-                IF( .NOT.WNTVN ) THEN
-@@ -6197,25 +6197,26 @@
- *
-             MNTHR = ILAENV( 6, 'ZGESVD', JOBU // JOBVT, M, N, 0, 0 )
- *           Compute space needed for ZGELQF
--            CALL ZGELQF( M, N, A, LDA, DUM(1), DUM(1), -1, IERR )
--            LWORK_ZGELQF=DUM(1)
-+            CALL ZGELQF( M, N, A, LDA, CDUM(1), CDUM(1), -1, IERR )
-+            LWORK_ZGELQF=CDUM(1)
- *           Compute space needed for ZUNGLQ
--            CALL ZUNGLQ( N, N, M, DUM(1), N, DUM(1), DUM(1), -1, IERR )
--            LWORK_ZUNGLQ_N=DUM(1)
--            CALL ZUNGLQ( M, N, M, A, LDA, DUM(1), DUM(1), -1, IERR )
--            LWORK_ZUNGLQ_M=DUM(1)
-+            CALL ZUNGLQ( N, N, M, CDUM(1), N, CDUM(1), CDUM(1), -1,
-+     $                  IERR )
-+            LWORK_ZUNGLQ_N=CDUM(1)
-+            CALL ZUNGLQ( M, N, M, A, LDA, CDUM(1), CDUM(1), -1, IERR )
-+            LWORK_ZUNGLQ_M=CDUM(1)
- *           Compute space needed for ZGEBRD
--            CALL ZGEBRD( M, M, A, LDA, S, DUM(1), DUM(1),
--     $                   DUM(1), DUM(1), -1, IERR )
--            LWORK_ZGEBRD=DUM(1)
-+            CALL ZGEBRD( M, M, A, LDA, S, DUM(1), CDUM(1),
-+     $                   CDUM(1), CDUM(1), -1, IERR )
-+            LWORK_ZGEBRD=CDUM(1)
- *            Compute space needed for ZUNGBR P
--            CALL ZUNGBR( 'P', M, M, M, A, N, DUM(1),
--     $                   DUM(1), -1, IERR )
--            LWORK_ZUNGBR_P=DUM(1)
-+            CALL ZUNGBR( 'P', M, M, M, A, N, CDUM(1),
-+     $                   CDUM(1), -1, IERR )
-+            LWORK_ZUNGBR_P=CDUM(1)
- *           Compute space needed for ZUNGBR Q
--            CALL ZUNGBR( 'Q', M, M, M, A, N, DUM(1),
--     $                   DUM(1), -1, IERR )
--            LWORK_ZUNGBR_Q=DUM(1)
-+            CALL ZUNGBR( 'Q', M, M, M, A, N, CDUM(1),
-+     $                   CDUM(1), -1, IERR )
-+            LWORK_ZUNGBR_Q=CDUM(1)
-             IF( N.GE.MNTHR ) THEN
-                IF( WNTVN ) THEN
- *
-@@ -6319,21 +6320,21 @@
- *
- *              Path 10t(N greater than M, but not much larger)
- *
--               CALL ZGEBRD( M, N, A, LDA, S, DUM(1), DUM(1),
--     $                   DUM(1), DUM(1), -1, IERR )
--               LWORK_ZGEBRD=DUM(1)
-+               CALL ZGEBRD( M, N, A, LDA, S, DUM(1), CDUM(1),
-+     $                   CDUM(1), CDUM(1), -1, IERR )
-+               LWORK_ZGEBRD=CDUM(1)
-                MAXWRK = 2*M + LWORK_ZGEBRD
-                IF( WNTVS .OR. WNTVO ) THEN
- *                Compute space needed for ZUNGBR P
--                 CALL ZUNGBR( 'P', M, N, M, A, N, DUM(1),
--     $                   DUM(1), -1, IERR )
--                 LWORK_ZUNGBR_P=DUM(1)
-+                 CALL ZUNGBR( 'P', M, N, M, A, N, CDUM(1),
-+     $                   CDUM(1), -1, IERR )
-+                 LWORK_ZUNGBR_P=CDUM(1)
-                  MAXWRK = MAX( MAXWRK, 2*M+LWORK_ZUNGBR_P )
-                END IF
-                IF( WNTVA ) THEN
--                 CALL ZUNGBR( 'P', N,  N, M, A, N, DUM(1),
--     $                   DUM(1), -1, IERR )
--                 LWORK_ZUNGBR_P=DUM(1)
-+                 CALL ZUNGBR( 'P', N,  N, M, A, N, CDUM(1),
-+     $                   CDUM(1), -1, IERR )
-+                 LWORK_ZUNGBR_P=CDUM(1)
-                  MAXWRK = MAX( MAXWRK, 2*M+LWORK_ZUNGBR_P )
-                END IF
-                IF( .NOT.WNTUN ) THEN
+ * =====================================================================
diff --git a/src/modules/lapack/README b/src/modules/lapack/README
index a407f50..a661a60 100644
--- a/src/modules/lapack/README
+++ b/src/modules/lapack/README
@@ -1,12 +1,82 @@
-The Fortran routines here are extracted from LAPACK 3.1.0, then 3.1.1,
-3.4.1, 3.4.2, 3.5.0.  (http://www.netlib.org/lapack and mirrors).
+The Fortran routines here were extracted from LAPACK 3.1.0, then
+3.1.1, 3.4.1, 3.4.2, 3.5.0, 3.6.0, 3.6.1, 3.7.0.
+(Sources from http://www.netlib.org/lapack and mirrors).
 
-dlapack?.f are support routines for `real' LAPACK calls
-cmplx.f are support routines for LAPACK calls from complex arithmetic
-routines, that are only used if COMPLEX*16 is supported by the Fortran
-compiler and compatible with the Rcomplex type.
+dlapack.f contains support routines for `real' LAPACK calls.  
+cmplx.f contains support routines for LAPACK calls from complex
+arithmetic routines, that are only used if COMPLEX*16 is supported by
+the Fortran compiler and compatible with the Rcomplex type.
 Neither will be compiled if an external LAPACK is used.
 
+We have tried to avoid including any single-precision routines.
+
+
+Preparation
+-----------
+
+dlapack.f and cmplx.f were created in the LAPACK 3.7.0 sources by
+
+dir.create('dble')
+foo <- scan('dble.txt', "")
+file.copy(file.path("SRC", foo), 'dble')
+system('cpp SRC/iparam2stage.F > dble/iparam2stage.f')
+system("cat dble/* > dlapack.f")
+
+dir.create('cmplx ')
+foo <- scan('cmplx.txt', "")
+file.copy(file.path("SRC", foo), 'cmplx')
+system("cat cmplx/* > cmplx.f")
+
+If you update the LAPACK version, you need to copy over the LICENSE
+file and update it in doc/copyrights.  And if you patch the sources,
+*DO* mention it here and add the patch to R.patch.
+
+New LAPACK versions (even point releases) often add new auxiliary
+routines, and these can be hard to track down.  I found it helpful to
+compare the outputs of
+
+nm -g dlapack.o | grep ' T ' | cut -b20-
+nm -g dlapack.o | grep ' U ' | cut -b20-
+
+before and after upating (ditto for cmplx.o).  (This may need
+adjusting for your platform's nm.)
+
+
+History
+-------
+
+zlahr2 zlaqr0 zlaqr1 zlaqr2 zlaqr3 zlaqr4 zlaqr5 zlartg zpotf2 zpotrf
+zrot ztrexc
+were added in R 2.5.0.
+
+izmax1 zdrscl zgecon zlacn2 zlantr ztrcon
+were added in R 2.7.0.
+
+dzsum1 ilazlc ilazlr zunmhr
+were added in R 2.15.2.
+
+zgelsd zgesdd zlacp2 zlacrm zlals0 zlalsa zlalsd zlarcm
+were added in R 3.1.0.
+
+zgeequ zgees zgels zgerfs zgesc2 zgesvx zgetc2 zgetri zggbak zggbal
+zgges zggev zgghrd zheevd zhgeqz zlaed0 zlaed7 zlaed8 zlaqge zlasyf
+zlatdf zlauu2 zlauum zpotri zstedc zsymv zsyr zsytf2 zsytrf zsytri
+ztgevc ztgex2 ztgexc ztgsen ztgsy2 ztgsyl ztrsen ztrsyl ztrti2 ztrtri
+zunm2l zunmql zunmtr
+were added in R 3.3.0 for use by a CRAN package.
+
+dbdsvdx dgesvdx dgetrf2 dgges3 dggev3 dgghd3 dggsvd3 dggsvp3 dorm22 dpotrf2
+zgetrf2 zpotrf2
+were new in LAPACK 3.6.0 and added in R 3.3.0.
+
+dtrevc3 and ztrevc3 were new in LAPACK 3.6.1 and added in R 3.4.0.
+
+-------------------------------------------------
+
+R.patch helps with Fortran array-bounds checking.
+
+-------------------------------------------------
+
 For 'base' R addition of a new .Call()able Lapack routine,
 all these files must be updated {path relative to R's topdir}:
 
@@ -19,113 +89,3 @@ all these files must be updated {path relative to R's topdir}:
   src/modules/lapack/Lapack.c
   src/modules/lapack/Lapack.h
   src/modules/lapack/cmplx.f or dlapack.f
-
-We have tried to avoid including any single-precision routines.
-
-dlapack.f is the concatenation of
-
-dbbcsd.f	dgtsvx.f	dlarf.f		dorm2r.f	dstemr.f
-dbdsdc.f	dgttrf.f	dlarfb.f	dormbr.f	dsteqr.f
-dbdsqr.f	dgttrs.f	dlarfg.f	dormhr.f	dsterf.f
-ddisna.f	dgtts2.f	dlarfgp.f	dorml2.f	dstev.f
-dgbbrd.f	dhgeqz.f	dlarft.f	dormlq.f	dstevd.f
-dgbcon.f	dhsein.f	dlarfx.f	dormql.f	dstevr.f
-dgbequ.f	dhseqr.f	dlargv.f	dormqr.f	dstevx.f
-dgbequb.f	disnan.f	dlarnv.f	dormr2.f	dsycon.f
-dgbrfs.f	dlabad.f	dlarra.f	dormr3.f	dsyconv.f
-dgbsv.f		dlabrd.f	dlarrb.f	dormrq.f	dsyequb.f
-dgbsvx.f	dlacn2.f	dlarrc.f	dormrz.f	dsyev.f
-dgbtf2.f	dlacon.f	dlarrd.f	dormtr.f	dsyevd.f
-dgbtrf.f	dlacpy.f	dlarre.f	dpbcon.f	dsyevr.f
-dgbtrs.f	dladiv.f	dlarrf.f	dpbequ.f	dsyevx.f
-dgebak.f	dlae2.f		dlarrj.f	dpbrfs.f	dsygs2.f
-dgebal.f	dlaebz.f	dlarrk.f	dpbstf.f	dsygst.f
-dgebd2.f	dlaed0.f	dlarrr.f	dpbsv.f		dsygv.f
-dgebrd.f	dlaed1.f	dlarrv.f	dpbsvx.f	dsygvd.f
-dgecon.f	dlaed2.f	dlarscl2.f	dpbtf2.f	dsygvx.f
-dgeequ.f	dlaed3.f	dlartg.f	dpbtrf.f	dsyrfs.f
-dgeequb.f	dlaed4.f	dlartgp.f	dpbtrs.f	dsysv.f
-dgees.f		dlaed5.f	dlartgs.f	dpftrf.f	dsysvx.f
-dgeesx.f	dlaed6.f	dlartv.f	dpftri.f	dsyswapr.f
-dgeev.f		dlaed7.f	dlaruv.f	dpftrs.f	dsytd2.f
-dgeevx.f	dlaed8.f	dlarz.f		dpocon.f	dsytf2.f
-dgegs.f		dlaed9.f	dlarzb.f	dpoequ.f	dsytrd.f
-dgegv.f		dlaeda.f	dlarzt.f	dpoequb.f	dsytrf.f
-dgehd2.f	dlaein.f	dlas2.f		dporfs.f	dsytri.f
-dgehrd.f	dlaev2.f	dlascl.f	dposv.f		dsytri2.f
-dgejsv.f	dlaexc.f	dlascl2.f	dposvx.f	dsytri2x.f
-dgelq2.f	dlag2.f		dlasd0.f	dpotf2.f	dsytrs.f
-dgelqf.f	dlags2.f	dlasd1.f	dpotrf.f	dsytrs2.f
-dgels.f		dlagtf.f	dlasd2.f	dpotri.f	dtbcon.f
-dgelsd.f	dlagtm.f	dlasd3.f	dpotrs.f	dtbrfs.f
-dgelss.f	dlagts.f	dlasd4.f	dppcon.f	dtbtrs.f
-dgelsx.f	dlagv2.f	dlasd5.f	dppequ.f	dtfsm.f
-dgelsy.f	dlahqr.f	dlasd6.f	dpprfs.f	dtftri.f
-dgemqrt.f	dlahr2.f	dlasd7.f	dppsv.f		dtfttp.f
-dgeql2.f	dlahrd.f	dlasd8.f	dppsvx.f	dtfttr.f
-dgeqlf.f	dlaic1.f	dlasda.f	dpptrf.f	dtgevc.f
-dgeqp3.f	dlaisnan.f	dlasdq.f	dpptri.f	dtgex2.f
-dgeqpf.f	dlaln2.f	dlasdt.f	dpptrs.f	dtgexc.f
-dgeqr2.f	dlals0.f	dlaset.f	dpstf2.f	dtgsen.f
-dgeqr2p.f	dlalsa.f	dlasq1.f	dpstrf.f	dtgsja.f
-dgeqrf.f	dlalsd.f	dlasq2.f	dptcon.f	dtgsna.f
-dgeqrfp.f	dlamrg.f	dlasq3.f	dpteqr.f	dtgsy2.f
-dgeqrt.f	dlaneg.f	dlasq4.f	dptrfs.f	dtgsyl.f
-dgeqrt2.f	dlangb.f	dlasq5.f	dptsv.f		dtpcon.f
-dgeqrt3.f	dlange.f	dlasq6.f	dptsvx.f	dtpmqrt.f
-dgerfs.f	dlangt.f	dlasr.f		dpttrf.f	dtpqrt.f
-dgerq2.f	dlanhs.f	dlasrt.f	dpttrs.f	dtpqrt2.f
-dgerqf.f	dlansb.f	dlassq.f	dptts2.f	dtprfb.f
-dgesc2.f	dlansf.f	dlasv2.f	drscl.f		dtprfs.f
-dgesdd.f	dlansp.f	dlaswp.f	dsbev.f		dtptri.f
-dgesv.f		dlanst.f	dlasy2.f	dsbevd.f	dtptrs.f
-dgesvd.f	dlansy.f	dlasyf.f	dsbevx.f	dtpttf.f
-dgesvj.f	dlantb.f	dlatbs.f	dsbgst.f	dtpttr.f
-dgesvx.f	dlantp.f	dlatdf.f	dsbgv.f		dtrcon.f
-dgetc2.f	dlantr.f	dlatps.f	dsbgvd.f	dtrevc.f
-dgetf2.f	dlanv2.f	dlatrd.f	dsbgvx.f	dtrexc.f
-dgetrf.f	dlapll.f	dlatrs.f	dsbtrd.f	dtrrfs.f
-dgetri.f	dlapmr.f	dlatrz.f	dsfrk.f		dtrsen.f
-dgetrs.f	dlapmt.f	dlatzm.f	dspcon.f	dtrsna.f
-dggbak.f	dlapy2.f	dlauu2.f	dspev.f		dtrsyl.f
-dggbal.f	dlapy3.f	dlauum.f	dspevd.f	dtrti2.f
-dgges.f		dlaqgb.f	dopgtr.f	dspevx.f	dtrtri.f
-dggesx.f	dlaqge.f	dopmtr.f	dspgst.f	dtrtrs.f
-dggev.f		dlaqp2.f	dorbdb.f	dspgv.f		dtrttf.f
-dggevx.f	dlaqps.f	dorcsd.f	dspgvd.f	dtrttp.f
-dggglm.f	dlaqr0.f	dorg2l.f	dspgvx.f	dtzrqf.f
-dgghrd.f	dlaqr1.f	dorg2r.f	dsprfs.f	dtzrzf.f
-dgglse.f	dlaqr2.f	dorgbr.f	dspsv.f		ieeeck.f
-dggqrf.f	dlaqr3.f	dorghr.f	dspsvx.f	iladlc.f
-dggrqf.f	dlaqr4.f	dorgl2.f	dsptrd.f	iladlr.f
-dggsvd.f	dlaqr5.f	dorglq.f	dsptrf.f	ilaenv.f
-dggsvp.f	dlaqsb.f	dorgql.f	dsptri.f	ilaprec.f
-dgsvj0.f	dlaqsp.f	dorgqr.f	dsptrs.f	ilatrans.f
-dgsvj1.f	dlaqsy.f	dorgr2.f	dstebz.f	ilaver.f
-dgtcon.f	dlaqtr.f	dorgrq.f	dstedc.f	iparmq.f
-dgtrfs.f	dlar1v.f	dorgtr.f	dstegr.f
-dgtsv.f		dlar2v.f	dorm2l.f	dstein.f
-
-cmplx.f is the concatenation of
-
-dzsum1.f ilazlc.f ilazlr.f izmax1.f zbdsqr.f
-zdrscl.f zgebak.f zgebal.f zgebd2.f zgebrd.f
-zgecon.f zgeev.f  zgehd2.f zgehrd.f zgelq2.f
-zgelqf.f zgelsd.f zgeqp3.f zgeqr2.f zgeqrf.f
-zgesdd.f zgesv.f  zgesvd.f zgetf2.f zgetrf.f
-zgetrs.f zheev.f  zhetd2.f zhetrd.f zhseqr.f
-zlabrd.f zlacgv.f zlacn2.f zlacp2.f zlacpy.f
-zlacrm.f zladiv.f zlahqr.f zlahr2.f zlahrd.f
-zlals0.f zlalsa.f zlalsd.f zlange.f zlanhe.f
-zlanhs.f zlantr.f zlaqp2.f zlaqps.f zlaqr0.f
-zlaqr1.f zlaqr2.f zlaqr3.f zlaqr4.f zlaqr5.f
-zlarcm.f zlarf.f  zlarfb.f zlarfg.f zlarft.f
-zlarfx.f zlartg.f zlascl.f zlaset.f zlasr.f
-zlassq.f zlaswp.f zlatrd.f zlatrs.f zpotf2.f
-zpotrf.f zrot.f   zsteqr.f ztrcon.f ztrevc.f
-ztrexc.f ztrtrs.f zung2l.f zung2r.f zungbr.f
-zunghr.f zungl2.f zunglq.f zungql.f zungqr.f
-zungr2.f zungrq.f zungtr.f zunm2r.f zunmbr.f
-zunmhr.f zunml2.f zunmlq.f zunmqr.f
-
-R.patch suppresses warnings with Fortran array-bounds checking.
diff --git a/src/modules/lapack/Rlapackrc.rc b/src/modules/lapack/Rlapackrc.rc
index cf83d15..8d286ec 100644
--- a/src/modules/lapack/Rlapackrc.rc
+++ b/src/modules/lapack/Rlapackrc.rc
@@ -16,7 +16,7 @@ BEGIN
             VALUE "FileVersion", R_MAJOR "." R_MINOR " " R_STATUS "   (" R_YEAR "-" R_MONTH "-" R_DAY ")\0"
             VALUE "LegalCopyright", "R Core Team 2002-" R_YEAR "\0"
             VALUE "R Version", R_MAJOR "." R_MINOR " " R_STATUS " (" R_YEAR "-" R_MONTH "-" R_DAY ")\0"
-            VALUE "Project info", "http://www.r-project.org\0"
+            VALUE "Project info", "https://www.r-project.org\0"
         END
     END
     BLOCK "VarFileInfo"
diff --git a/src/modules/lapack/cmplx.f b/src/modules/lapack/cmplx.f
index 4331340..9441804 100644
--- a/src/modules/lapack/cmplx.f
+++ b/src/modules/lapack/cmplx.f
@@ -2,31 +2,31 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DZSUM1 + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dzsum1.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dzsum1.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dzsum1.f"> 
+*> Download DZSUM1 + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dzsum1.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dzsum1.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dzsum1.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       DOUBLE PRECISION FUNCTION DZSUM1( N, CX, INCX )
-* 
+*
 *       .. Scalar Arguments ..
 *       INTEGER            INCX, N
 *       ..
 *       .. Array Arguments ..
 *       COMPLEX*16         CX( * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -64,12 +64,12 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date September 2012
+*> \date December 2016
 *
 *> \ingroup complex16OTHERauxiliary
 *
@@ -81,10 +81,10 @@
 *  =====================================================================
       DOUBLE PRECISION FUNCTION DZSUM1( N, CX, INCX )
 *
-*  -- LAPACK auxiliary routine (version 3.4.2) --
+*  -- LAPACK auxiliary routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     September 2012
+*     December 2016
 *
 *     .. Scalar Arguments ..
       INTEGER            INCX, N
@@ -142,31 +142,31 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download ILAZLC + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/ilazlc.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/ilazlc.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/ilazlc.f"> 
+*> Download ILAZLC + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/ilazlc.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/ilazlc.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/ilazlc.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       INTEGER FUNCTION ILAZLC( M, N, A, LDA )
-* 
+*
 *       .. Scalar Arguments ..
 *       INTEGER            M, N, LDA
 *       ..
 *       .. Array Arguments ..
 *       COMPLEX*16         A( LDA, * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -206,22 +206,22 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date September 2012
+*> \date December 2016
 *
 *> \ingroup complex16OTHERauxiliary
 *
 *  =====================================================================
       INTEGER FUNCTION ILAZLC( M, N, A, LDA )
 *
-*  -- LAPACK auxiliary routine (version 3.4.2) --
+*  -- LAPACK auxiliary routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     September 2012
+*     December 2016
 *
 *     .. Scalar Arguments ..
       INTEGER            M, N, LDA
@@ -260,31 +260,31 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download ILAZLR + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/ilazlr.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/ilazlr.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/ilazlr.f"> 
+*> Download ILAZLR + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/ilazlr.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/ilazlr.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/ilazlr.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       INTEGER FUNCTION ILAZLR( M, N, A, LDA )
-* 
+*
 *       .. Scalar Arguments ..
 *       INTEGER            M, N, LDA
 *       ..
 *       .. Array Arguments ..
 *       COMPLEX*16         A( LDA, * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -324,22 +324,22 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date September 2012
+*> \date December 2016
 *
 *> \ingroup complex16OTHERauxiliary
 *
 *  =====================================================================
       INTEGER FUNCTION ILAZLR( M, N, A, LDA )
 *
-*  -- LAPACK auxiliary routine (version 3.4.2) --
+*  -- LAPACK auxiliary routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     September 2012
+*     December 2016
 *
 *     .. Scalar Arguments ..
       INTEGER            M, N, LDA
@@ -377,43 +377,42 @@
       END IF
       RETURN
       END
-*> \brief \b IZMAX1 finds the index of the vector element whose real part has maximum absolute value.
+*> \brief \b IZMAX1 finds the index of the first vector element of maximum absolute value.
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download IZMAX1 + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/izmax1.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/izmax1.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/izmax1.f"> 
+*> Download IZMAX1 + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/izmax1.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/izmax1.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/izmax1.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
-*       INTEGER          FUNCTION IZMAX1( N, CX, INCX )
-* 
+*       INTEGER          FUNCTION IZMAX1( N, ZX, INCX )
+*
 *       .. Scalar Arguments ..
 *       INTEGER            INCX, N
 *       ..
 *       .. Array Arguments ..
-*       COMPLEX*16         CX( * )
+*       COMPLEX*16         ZX( * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
 *>
 *> \verbatim
 *>
-*> IZMAX1 finds the index of the element whose real part has maximum
-*> absolute value.
+*> IZMAX1 finds the index of the first vector element of maximum absolute value.
 *>
 *> Based on IZAMAX from Level 1 BLAS.
 *> The change is to use the 'genuine' absolute value.
@@ -425,32 +424,33 @@
 *> \param[in] N
 *> \verbatim
 *>          N is INTEGER
-*>          The number of elements in the vector CX.
+*>          The number of elements in the vector ZX.
 *> \endverbatim
 *>
-*> \param[in] CX
+*> \param[in] ZX
 *> \verbatim
-*>          CX is COMPLEX*16 array, dimension (N)
-*>          The vector whose elements will be summed.
+*>          ZX is COMPLEX*16 array, dimension (N)
+*>          The vector ZX. The IZMAX1 function returns the index of its first
+*>          element of maximum absolute value.
 *> \endverbatim
 *>
 *> \param[in] INCX
 *> \verbatim
 *>          INCX is INTEGER
-*>          The spacing between successive values of CX.  INCX >= 1.
+*>          The spacing between successive values of ZX.  INCX >= 1.
 *> \endverbatim
 *
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date September 2012
+*> \date February 2014
 *
-*> \ingroup complex16OTHERauxiliary
+*> \ingroup complexOTHERauxiliary
 *
 *> \par Contributors:
 *  ==================
@@ -458,74 +458,61 @@
 *> Nick Higham for use with ZLACON.
 *
 *  =====================================================================
-      INTEGER          FUNCTION IZMAX1( N, CX, INCX )
+      INTEGER FUNCTION IZMAX1( N, ZX, INCX )
 *
-*  -- LAPACK auxiliary routine (version 3.4.2) --
+*  -- LAPACK auxiliary routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     September 2012
+*     February 2014
 *
 *     .. Scalar Arguments ..
       INTEGER            INCX, N
 *     ..
 *     .. Array Arguments ..
-      COMPLEX*16         CX( * )
+      COMPLEX*16         ZX(*)
 *     ..
 *
-* =====================================================================
+*  =====================================================================
 *
 *     .. Local Scalars ..
+      DOUBLE PRECISION   DMAX
       INTEGER            I, IX
-      DOUBLE PRECISION   SMAX
-      COMPLEX*16         ZDUM
 *     ..
 *     .. Intrinsic Functions ..
       INTRINSIC          ABS
 *     ..
-*     .. Statement Functions ..
-      DOUBLE PRECISION   CABS1
-*     ..
-*     .. Statement Function definitions ..
-*
-*     NEXT LINE IS THE ONLY MODIFICATION.
-      CABS1( ZDUM ) = ABS( ZDUM )
-*     ..
 *     .. Executable Statements ..
 *
       IZMAX1 = 0
-      IF( N.LT.1 )
-     $   RETURN
+      IF (N.LT.1 .OR. INCX.LE.0) RETURN
       IZMAX1 = 1
-      IF( N.EQ.1 )
-     $   RETURN
-      IF( INCX.EQ.1 )
-     $   GO TO 30
+      IF (N.EQ.1) RETURN
+      IF (INCX.EQ.1) THEN
 *
-*     CODE FOR INCREMENT NOT EQUAL TO 1
+*        code for increment equal to 1
 *
-      IX = 1
-      SMAX = CABS1( CX( 1 ) )
-      IX = IX + INCX
-      DO 20 I = 2, N
-         IF( CABS1( CX( IX ) ).LE.SMAX )
-     $      GO TO 10
-         IZMAX1 = I
-         SMAX = CABS1( CX( IX ) )
-   10    CONTINUE
-         IX = IX + INCX
-   20 CONTINUE
-      RETURN
+         DMAX = ABS(ZX(1))
+         DO I = 2,N
+            IF (ABS(ZX(I)).GT.DMAX) THEN
+               IZMAX1 = I
+               DMAX = ABS(ZX(I))
+            END IF
+         END DO
+      ELSE
 *
-*     CODE FOR INCREMENT EQUAL TO 1
+*        code for increment not equal to 1
 *
-   30 CONTINUE
-      SMAX = CABS1( CX( 1 ) )
-      DO 40 I = 2, N
-         IF( CABS1( CX( I ) ).LE.SMAX )
-     $      GO TO 40
-         IZMAX1 = I
-         SMAX = CABS1( CX( I ) )
-   40 CONTINUE
+         IX = 1
+         DMAX = ABS(ZX(1))
+         IX = IX + INCX
+         DO I = 2,N
+            IF (ABS(ZX(IX)).GT.DMAX) THEN
+               IZMAX1 = I
+               DMAX = ABS(ZX(IX))
+            END IF
+            IX = IX + INCX
+         END DO
+      END IF
       RETURN
 *
 *     End of IZMAX1
@@ -535,25 +522,25 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download ZBDSQR + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/zbdsqr.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/zbdsqr.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/zbdsqr.f"> 
+*> Download ZBDSQR + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/zbdsqr.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/zbdsqr.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/zbdsqr.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       SUBROUTINE ZBDSQR( UPLO, N, NCVT, NRU, NCC, D, E, VT, LDVT, U,
 *                          LDU, C, LDC, RWORK, INFO )
-* 
+*
 *       .. Scalar Arguments ..
 *       CHARACTER          UPLO
 *       INTEGER            INFO, LDC, LDU, LDVT, N, NCC, NCVT, NRU
@@ -562,7 +549,7 @@
 *       DOUBLE PRECISION   D( * ), E( * ), RWORK( * )
 *       COMPLEX*16         C( LDC, * ), U( LDU, * ), VT( LDVT, * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -573,9 +560,9 @@
 *> left singular vectors from the singular value decomposition (SVD) of
 *> a real N-by-N (upper or lower) bidiagonal matrix B using the implicit
 *> zero-shift QR algorithm.  The SVD of B has the form
-*> 
+*>
 *>    B = Q * S * P**H
-*> 
+*>
 *> where S is the diagonal matrix of singular values, Q is an orthogonal
 *> matrix of left singular vectors, and P is an orthogonal matrix of
 *> right singular vectors.  If left singular vectors are requested, this
@@ -584,9 +571,9 @@
 *> P**H, for given complex input matrices U and VT.  When U and VT are
 *> the unitary matrices that reduce a general matrix A to bidiagonal
 *> form: A = U*B*VT, as computed by ZGEBRD, then
-*> 
+*>
 *>    A = (U*Q) * S * (P**H*VT)
-*> 
+*>
 *> is the SVD of A.  Optionally, the subroutine may also compute Q**H*C
 *> for a given complex input matrix C.
 *>
@@ -699,8 +686,7 @@
 *>
 *> \param[out] RWORK
 *> \verbatim
-*>          RWORK is DOUBLE PRECISION array, dimension (2*N)
-*>          if NCVT = NRU = NCC = 0, (max(1, 4*N-4)) otherwise
+*>          RWORK is DOUBLE PRECISION array, dimension (4*N)
 *> \endverbatim
 *>
 *> \param[out] INFO
@@ -743,12 +729,12 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date November 2011
+*> \date December 2016
 *
 *> \ingroup complex16OTHERcomputational
 *
@@ -756,10 +742,10 @@
       SUBROUTINE ZBDSQR( UPLO, N, NCVT, NRU, NCC, D, E, VT, LDVT, U,
      $                   LDU, C, LDC, RWORK, INFO )
 *
-*  -- LAPACK computational routine (version 3.4.0) --
+*  -- LAPACK computational routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     November 2011
+*     December 2016
 *
 *     .. Scalar Arguments ..
       CHARACTER          UPLO
@@ -855,7 +841,7 @@
          CALL DLASQ1( N, D, E, RWORK, INFO )
 *
 *     If INFO equals 2, dqds didn't finish, try to finish
-*         
+*
          IF( INFO .NE. 2 ) RETURN
          INFO = 0
       END IF
@@ -1378,24 +1364,24 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download ZDRSCL + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/zdrscl.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/zdrscl.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/zdrscl.f"> 
+*> Download ZDRSCL + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/zdrscl.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/zdrscl.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/zdrscl.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       SUBROUTINE ZDRSCL( N, SA, SX, INCX )
-* 
+*
 *       .. Scalar Arguments ..
 *       INTEGER            INCX, N
 *       DOUBLE PRECISION   SA
@@ -1403,7 +1389,7 @@
 *       .. Array Arguments ..
 *       COMPLEX*16         SX( * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -1448,22 +1434,22 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date September 2012
+*> \date December 2016
 *
 *> \ingroup complex16OTHERauxiliary
 *
 *  =====================================================================
       SUBROUTINE ZDRSCL( N, SA, SX, INCX )
 *
-*  -- LAPACK auxiliary routine (version 3.4.2) --
+*  -- LAPACK auxiliary routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     September 2012
+*     December 2016
 *
 *     .. Scalar Arguments ..
       INTEGER            INCX, N
@@ -1552,25 +1538,25 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download ZGEBAK + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/zgebak.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/zgebak.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/zgebak.f"> 
+*> Download ZGEBAK + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/zgebak.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/zgebak.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/zgebak.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       SUBROUTINE ZGEBAK( JOB, SIDE, N, ILO, IHI, SCALE, M, V, LDV,
 *                          INFO )
-* 
+*
 *       .. Scalar Arguments ..
 *       CHARACTER          JOB, SIDE
 *       INTEGER            IHI, ILO, INFO, LDV, M, N
@@ -1579,7 +1565,7 @@
 *       DOUBLE PRECISION   SCALE( * )
 *       COMPLEX*16         V( LDV, * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -1668,12 +1654,12 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date November 2011
+*> \date December 2016
 *
 *> \ingroup complex16GEcomputational
 *
@@ -1681,10 +1667,10 @@
       SUBROUTINE ZGEBAK( JOB, SIDE, N, ILO, IHI, SCALE, M, V, LDV,
      $                   INFO )
 *
-*  -- LAPACK computational routine (version 3.4.0) --
+*  -- LAPACK computational routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     November 2011
+*     December 2016
 *
 *     .. Scalar Arguments ..
       CHARACTER          JOB, SIDE
@@ -1822,24 +1808,24 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download ZGEBAL + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/zgebal.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/zgebal.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/zgebal.f"> 
+*> Download ZGEBAL + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/zgebal.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/zgebal.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/zgebal.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       SUBROUTINE ZGEBAL( JOB, N, A, LDA, ILO, IHI, SCALE, INFO )
-* 
+*
 *       .. Scalar Arguments ..
 *       CHARACTER          JOB
 *       INTEGER            IHI, ILO, INFO, LDA, N
@@ -1848,7 +1834,7 @@
 *       DOUBLE PRECISION   SCALE( * )
 *       COMPLEX*16         A( LDA, * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -1936,12 +1922,12 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date November 2013
+*> \date December 2016
 *
 *> \ingroup complex16GEcomputational
 *
@@ -1980,10 +1966,10 @@
 *  =====================================================================
       SUBROUTINE ZGEBAL( JOB, N, A, LDA, ILO, IHI, SCALE, INFO )
 *
-*  -- LAPACK computational routine (version 3.5.0) --
+*  -- LAPACK computational routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     November 2013
+*     December 2016
 *
 *     .. Scalar Arguments ..
       CHARACTER          JOB
@@ -2009,7 +1995,6 @@
       INTEGER            I, ICA, IEXC, IRA, J, K, L, M
       DOUBLE PRECISION   C, CA, F, G, R, RA, S, SFMAX1, SFMAX2, SFMIN1,
      $                   SFMIN2
-      COMPLEX*16         CDUM
 *     ..
 *     .. External Functions ..
       LOGICAL            DISNAN, LSAME
@@ -2022,14 +2007,6 @@
 *     ..
 *     .. Intrinsic Functions ..
       INTRINSIC          ABS, DBLE, DIMAG, MAX, MIN
-*     ..
-*     .. Statement Functions ..
-      DOUBLE PRECISION   CABS1
-*     ..
-*     .. Statement Function definitions ..
-      CABS1( CDUM ) = ABS( DBLE( CDUM ) ) + ABS( DIMAG( CDUM ) )
-*     ..
-*     .. Executable Statements ..
 *
 *     Test the input parameters
 *
@@ -2229,24 +2206,24 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download ZGEBD2 + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/zgebd2.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/zgebd2.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/zgebd2.f"> 
+*> Download ZGEBD2 + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/zgebd2.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/zgebd2.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/zgebd2.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       SUBROUTINE ZGEBD2( M, N, A, LDA, D, E, TAUQ, TAUP, WORK, INFO )
-* 
+*
 *       .. Scalar Arguments ..
 *       INTEGER            INFO, LDA, M, N
 *       ..
@@ -2254,7 +2231,7 @@
 *       DOUBLE PRECISION   D( * ), E( * )
 *       COMPLEX*16         A( LDA, * ), TAUP( * ), TAUQ( * ), WORK( * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -2354,12 +2331,12 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date September 2012
+*> \date December 2016
 *
 *> \ingroup complex16GEcomputational
 *
@@ -2416,10 +2393,10 @@
 *  =====================================================================
       SUBROUTINE ZGEBD2( M, N, A, LDA, D, E, TAUQ, TAUP, WORK, INFO )
 *
-*  -- LAPACK computational routine (version 3.4.2) --
+*  -- LAPACK computational routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     September 2012
+*     December 2016
 *
 *     .. Scalar Arguments ..
       INTEGER            INFO, LDA, M, N
@@ -2560,25 +2537,25 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download ZGEBRD + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/zgebrd.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/zgebrd.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/zgebrd.f"> 
+*> Download ZGEBRD + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/zgebrd.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/zgebrd.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/zgebrd.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       SUBROUTINE ZGEBRD( M, N, A, LDA, D, E, TAUQ, TAUP, WORK, LWORK,
 *                          INFO )
-* 
+*
 *       .. Scalar Arguments ..
 *       INTEGER            INFO, LDA, LWORK, M, N
 *       ..
@@ -2586,7 +2563,7 @@
 *       DOUBLE PRECISION   D( * ), E( * )
 *       COMPLEX*16         A( LDA, * ), TAUP( * ), TAUQ( * ), WORK( * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -2700,12 +2677,12 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date November 2011
+*> \date December 2016
 *
 *> \ingroup complex16GEcomputational
 *
@@ -2763,10 +2740,10 @@
       SUBROUTINE ZGEBRD( M, N, A, LDA, D, E, TAUQ, TAUP, WORK, LWORK,
      $                   INFO )
 *
-*  -- LAPACK computational routine (version 3.4.0) --
+*  -- LAPACK computational routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     November 2011
+*     December 2016
 *
 *     .. Scalar Arguments ..
       INTEGER            INFO, LDA, LWORK, M, N
@@ -2913,25 +2890,25 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download ZGECON + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/zgecon.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/zgecon.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/zgecon.f"> 
+*> Download ZGECON + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/zgecon.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/zgecon.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/zgecon.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       SUBROUTINE ZGECON( NORM, N, A, LDA, ANORM, RCOND, WORK, RWORK,
 *                          INFO )
-* 
+*
 *       .. Scalar Arguments ..
 *       CHARACTER          NORM
 *       INTEGER            INFO, LDA, N
@@ -2941,7 +2918,7 @@
 *       DOUBLE PRECISION   RWORK( * )
 *       COMPLEX*16         A( LDA, * ), WORK( * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -3022,12 +2999,12 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date November 2011
+*> \date December 2016
 *
 *> \ingroup complex16GEcomputational
 *
@@ -3035,10 +3012,10 @@
       SUBROUTINE ZGECON( NORM, N, A, LDA, ANORM, RCOND, WORK, RWORK,
      $                   INFO )
 *
-*  -- LAPACK computational routine (version 3.4.0) --
+*  -- LAPACK computational routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     November 2011
+*     December 2016
 *
 *     .. Scalar Arguments ..
       CHARACTER          NORM
@@ -3178,74 +3155,401 @@
 *     End of ZGECON
 *
       END
-*> \brief <b> ZGEEV computes the eigenvalues and, optionally, the left and/or right eigenvectors for GE matrices</b>
+*> \brief \b ZGEEQU
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download ZGEEV + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/zgeev.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/zgeev.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/zgeev.f"> 
+*> Download ZGEEQU + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/zgeequ.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/zgeequ.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/zgeequ.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
-*       SUBROUTINE ZGEEV( JOBVL, JOBVR, N, A, LDA, W, VL, LDVL, VR, LDVR,
-*                         WORK, LWORK, RWORK, INFO )
-* 
+*       SUBROUTINE ZGEEQU( M, N, A, LDA, R, C, ROWCND, COLCND, AMAX,
+*                          INFO )
+*
 *       .. Scalar Arguments ..
-*       CHARACTER          JOBVL, JOBVR
-*       INTEGER            INFO, LDA, LDVL, LDVR, LWORK, N
+*       INTEGER            INFO, LDA, M, N
+*       DOUBLE PRECISION   AMAX, COLCND, ROWCND
+*       ..
+*       .. Array Arguments ..
+*       DOUBLE PRECISION   C( * ), R( * )
+*       COMPLEX*16         A( LDA, * )
+*       ..
+*
+*
+*> \par Purpose:
+*  =============
+*>
+*> \verbatim
+*>
+*> ZGEEQU computes row and column scalings intended to equilibrate an
+*> M-by-N matrix A and reduce its condition number.  R returns the row
+*> scale factors and C the column scale factors, chosen to try to make
+*> the largest element in each row and column of the matrix B with
+*> elements B(i,j)=R(i)*A(i,j)*C(j) have absolute value 1.
+*>
+*> R(i) and C(j) are restricted to be between SMLNUM = smallest safe
+*> number and BIGNUM = largest safe number.  Use of these scaling
+*> factors is not guaranteed to reduce the condition number of A but
+*> works well in practice.
+*> \endverbatim
+*
+*  Arguments:
+*  ==========
+*
+*> \param[in] M
+*> \verbatim
+*>          M is INTEGER
+*>          The number of rows of the matrix A.  M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*>          N is INTEGER
+*>          The number of columns of the matrix A.  N >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*>          A is COMPLEX*16 array, dimension (LDA,N)
+*>          The M-by-N matrix whose equilibration factors are
+*>          to be computed.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*>          LDA is INTEGER
+*>          The leading dimension of the array A.  LDA >= max(1,M).
+*> \endverbatim
+*>
+*> \param[out] R
+*> \verbatim
+*>          R is DOUBLE PRECISION array, dimension (M)
+*>          If INFO = 0 or INFO > M, R contains the row scale factors
+*>          for A.
+*> \endverbatim
+*>
+*> \param[out] C
+*> \verbatim
+*>          C is DOUBLE PRECISION array, dimension (N)
+*>          If INFO = 0,  C contains the column scale factors for A.
+*> \endverbatim
+*>
+*> \param[out] ROWCND
+*> \verbatim
+*>          ROWCND is DOUBLE PRECISION
+*>          If INFO = 0 or INFO > M, ROWCND contains the ratio of the
+*>          smallest R(i) to the largest R(i).  If ROWCND >= 0.1 and
+*>          AMAX is neither too large nor too small, it is not worth
+*>          scaling by R.
+*> \endverbatim
+*>
+*> \param[out] COLCND
+*> \verbatim
+*>          COLCND is DOUBLE PRECISION
+*>          If INFO = 0, COLCND contains the ratio of the smallest
+*>          C(i) to the largest C(i).  If COLCND >= 0.1, it is not
+*>          worth scaling by C.
+*> \endverbatim
+*>
+*> \param[out] AMAX
+*> \verbatim
+*>          AMAX is DOUBLE PRECISION
+*>          Absolute value of largest matrix element.  If AMAX is very
+*>          close to overflow or very close to underflow, the matrix
+*>          should be scaled.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*>          INFO is INTEGER
+*>          = 0:  successful exit
+*>          < 0:  if INFO = -i, the i-th argument had an illegal value
+*>          > 0:  if INFO = i,  and i is
+*>                <= M:  the i-th row of A is exactly zero
+*>                >  M:  the (i-M)-th column of A is exactly zero
+*> \endverbatim
+*
+*  Authors:
+*  ========
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date December 2016
+*
+*> \ingroup complex16GEcomputational
+*
+*  =====================================================================
+      SUBROUTINE ZGEEQU( M, N, A, LDA, R, C, ROWCND, COLCND, AMAX,
+     $                   INFO )
+*
+*  -- LAPACK computational routine (version 3.7.0) --
+*  -- LAPACK is a software package provided by Univ. of Tennessee,    --
+*  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+*     December 2016
+*
+*     .. Scalar Arguments ..
+      INTEGER            INFO, LDA, M, N
+      DOUBLE PRECISION   AMAX, COLCND, ROWCND
+*     ..
+*     .. Array Arguments ..
+      DOUBLE PRECISION   C( * ), R( * )
+      COMPLEX*16         A( LDA, * )
+*     ..
+*
+*  =====================================================================
+*
+*     .. Parameters ..
+      DOUBLE PRECISION   ONE, ZERO
+      PARAMETER          ( ONE = 1.0D+0, ZERO = 0.0D+0 )
+*     ..
+*     .. Local Scalars ..
+      INTEGER            I, J
+      DOUBLE PRECISION   BIGNUM, RCMAX, RCMIN, SMLNUM
+      COMPLEX*16         ZDUM
+*     ..
+*     .. External Functions ..
+      DOUBLE PRECISION   DLAMCH
+      EXTERNAL           DLAMCH
+*     ..
+*     .. External Subroutines ..
+      EXTERNAL           XERBLA
+*     ..
+*     .. Intrinsic Functions ..
+      INTRINSIC          ABS, DBLE, DIMAG, MAX, MIN
+*     ..
+*     .. Statement Functions ..
+      DOUBLE PRECISION   CABS1
+*     ..
+*     .. Statement Function definitions ..
+      CABS1( ZDUM ) = ABS( DBLE( ZDUM ) ) + ABS( DIMAG( ZDUM ) )
+*     ..
+*     .. Executable Statements ..
+*
+*     Test the input parameters.
+*
+      INFO = 0
+      IF( M.LT.0 ) THEN
+         INFO = -1
+      ELSE IF( N.LT.0 ) THEN
+         INFO = -2
+      ELSE IF( LDA.LT.MAX( 1, M ) ) THEN
+         INFO = -4
+      END IF
+      IF( INFO.NE.0 ) THEN
+         CALL XERBLA( 'ZGEEQU', -INFO )
+         RETURN
+      END IF
+*
+*     Quick return if possible
+*
+      IF( M.EQ.0 .OR. N.EQ.0 ) THEN
+         ROWCND = ONE
+         COLCND = ONE
+         AMAX = ZERO
+         RETURN
+      END IF
+*
+*     Get machine constants.
+*
+      SMLNUM = DLAMCH( 'S' )
+      BIGNUM = ONE / SMLNUM
+*
+*     Compute row scale factors.
+*
+      DO 10 I = 1, M
+         R( I ) = ZERO
+   10 CONTINUE
+*
+*     Find the maximum element in each row.
+*
+      DO 30 J = 1, N
+         DO 20 I = 1, M
+            R( I ) = MAX( R( I ), CABS1( A( I, J ) ) )
+   20    CONTINUE
+   30 CONTINUE
+*
+*     Find the maximum and minimum scale factors.
+*
+      RCMIN = BIGNUM
+      RCMAX = ZERO
+      DO 40 I = 1, M
+         RCMAX = MAX( RCMAX, R( I ) )
+         RCMIN = MIN( RCMIN, R( I ) )
+   40 CONTINUE
+      AMAX = RCMAX
+*
+      IF( RCMIN.EQ.ZERO ) THEN
+*
+*        Find the first zero scale factor and return an error code.
+*
+         DO 50 I = 1, M
+            IF( R( I ).EQ.ZERO ) THEN
+               INFO = I
+               RETURN
+            END IF
+   50    CONTINUE
+      ELSE
+*
+*        Invert the scale factors.
+*
+         DO 60 I = 1, M
+            R( I ) = ONE / MIN( MAX( R( I ), SMLNUM ), BIGNUM )
+   60    CONTINUE
+*
+*        Compute ROWCND = min(R(I)) / max(R(I))
+*
+         ROWCND = MAX( RCMIN, SMLNUM ) / MIN( RCMAX, BIGNUM )
+      END IF
+*
+*     Compute column scale factors
+*
+      DO 70 J = 1, N
+         C( J ) = ZERO
+   70 CONTINUE
+*
+*     Find the maximum element in each column,
+*     assuming the row scaling computed above.
+*
+      DO 90 J = 1, N
+         DO 80 I = 1, M
+            C( J ) = MAX( C( J ), CABS1( A( I, J ) )*R( I ) )
+   80    CONTINUE
+   90 CONTINUE
+*
+*     Find the maximum and minimum scale factors.
+*
+      RCMIN = BIGNUM
+      RCMAX = ZERO
+      DO 100 J = 1, N
+         RCMIN = MIN( RCMIN, C( J ) )
+         RCMAX = MAX( RCMAX, C( J ) )
+  100 CONTINUE
+*
+      IF( RCMIN.EQ.ZERO ) THEN
+*
+*        Find the first zero scale factor and return an error code.
+*
+         DO 110 J = 1, N
+            IF( C( J ).EQ.ZERO ) THEN
+               INFO = M + J
+               RETURN
+            END IF
+  110    CONTINUE
+      ELSE
+*
+*        Invert the scale factors.
+*
+         DO 120 J = 1, N
+            C( J ) = ONE / MIN( MAX( C( J ), SMLNUM ), BIGNUM )
+  120    CONTINUE
+*
+*        Compute COLCND = min(C(J)) / max(C(J))
+*
+         COLCND = MAX( RCMIN, SMLNUM ) / MIN( RCMAX, BIGNUM )
+      END IF
+*
+      RETURN
+*
+*     End of ZGEEQU
+*
+      END
+*> \brief <b> ZGEES computes the eigenvalues, the Schur form, and, optionally, the matrix of Schur vectors for GE matrices</b>
+*
+*  =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
+*
+*> \htmlonly
+*> Download ZGEES + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/zgees.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/zgees.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/zgees.f">
+*> [TXT]</a>
+*> \endhtmlonly
+*
+*  Definition:
+*  ===========
+*
+*       SUBROUTINE ZGEES( JOBVS, SORT, SELECT, N, A, LDA, SDIM, W, VS,
+*                         LDVS, WORK, LWORK, RWORK, BWORK, INFO )
+*
+*       .. Scalar Arguments ..
+*       CHARACTER          JOBVS, SORT
+*       INTEGER            INFO, LDA, LDVS, LWORK, N, SDIM
 *       ..
 *       .. Array Arguments ..
+*       LOGICAL            BWORK( * )
 *       DOUBLE PRECISION   RWORK( * )
-*       COMPLEX*16         A( LDA, * ), VL( LDVL, * ), VR( LDVR, * ),
-*      $                   W( * ), WORK( * )
+*       COMPLEX*16         A( LDA, * ), VS( LDVS, * ), W( * ), WORK( * )
+*       ..
+*       .. Function Arguments ..
+*       LOGICAL            SELECT
+*       EXTERNAL           SELECT
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
 *>
 *> \verbatim
 *>
-*> ZGEEV computes for an N-by-N complex nonsymmetric matrix A, the
-*> eigenvalues and, optionally, the left and/or right eigenvectors.
+*> ZGEES computes for an N-by-N complex nonsymmetric matrix A, the
+*> eigenvalues, the Schur form T, and, optionally, the matrix of Schur
+*> vectors Z.  This gives the Schur factorization A = Z*T*(Z**H).
 *>
-*> The right eigenvector v(j) of A satisfies
-*>                  A * v(j) = lambda(j) * v(j)
-*> where lambda(j) is its eigenvalue.
-*> The left eigenvector u(j) of A satisfies
-*>               u(j)**H * A = lambda(j) * u(j)**H
-*> where u(j)**H denotes the conjugate transpose of u(j).
+*> Optionally, it also orders the eigenvalues on the diagonal of the
+*> Schur form so that selected eigenvalues are at the top left.
+*> The leading columns of Z then form an orthonormal basis for the
+*> invariant subspace corresponding to the selected eigenvalues.
 *>
-*> The computed eigenvectors are normalized to have Euclidean norm
-*> equal to 1 and largest component real.
+*> A complex matrix is in Schur form if it is upper triangular.
 *> \endverbatim
 *
 *  Arguments:
 *  ==========
 *
-*> \param[in] JOBVL
+*> \param[in] JOBVS
 *> \verbatim
-*>          JOBVL is CHARACTER*1
-*>          = 'N': left eigenvectors of A are not computed;
-*>          = 'V': left eigenvectors of are computed.
+*>          JOBVS is CHARACTER*1
+*>          = 'N': Schur vectors are not computed;
+*>          = 'V': Schur vectors are computed.
 *> \endverbatim
 *>
-*> \param[in] JOBVR
+*> \param[in] SORT
 *> \verbatim
-*>          JOBVR is CHARACTER*1
-*>          = 'N': right eigenvectors of A are not computed;
-*>          = 'V': right eigenvectors of A are computed.
+*>          SORT is CHARACTER*1
+*>          Specifies whether or not to order the eigenvalues on the
+*>          diagonal of the Schur form.
+*>          = 'N': Eigenvalues are not ordered:
+*>          = 'S': Eigenvalues are ordered (see SELECT).
+*> \endverbatim
+*>
+*> \param[in] SELECT
+*> \verbatim
+*>          SELECT is a LOGICAL FUNCTION of one COMPLEX*16 argument
+*>          SELECT must be declared EXTERNAL in the calling subroutine.
+*>          If SORT = 'S', SELECT is used to select eigenvalues to order
+*>          to the top left of the Schur form.
+*>          IF SORT = 'N', SELECT is not referenced.
+*>          The eigenvalue W(j) is selected if SELECT(W(j)) is true.
 *> \endverbatim
 *>
 *> \param[in] N
@@ -3258,7 +3562,7 @@
 *> \verbatim
 *>          A is COMPLEX*16 array, dimension (LDA,N)
 *>          On entry, the N-by-N matrix A.
-*>          On exit, A has been overwritten.
+*>          On exit, A has been overwritten by its Schur form T.
 *> \endverbatim
 *>
 *> \param[in] LDA
@@ -3267,44 +3571,34 @@
 *>          The leading dimension of the array A.  LDA >= max(1,N).
 *> \endverbatim
 *>
-*> \param[out] W
+*> \param[out] SDIM
 *> \verbatim
-*>          W is COMPLEX*16 array, dimension (N)
-*>          W contains the computed eigenvalues.
-*> \endverbatim
-*>
-*> \param[out] VL
-*> \verbatim
-*>          VL is COMPLEX*16 array, dimension (LDVL,N)
-*>          If JOBVL = 'V', the left eigenvectors u(j) are stored one
-*>          after another in the columns of VL, in the same order
-*>          as their eigenvalues.
-*>          If JOBVL = 'N', VL is not referenced.
-*>          u(j) = VL(:,j), the j-th column of VL.
+*>          SDIM is INTEGER
+*>          If SORT = 'N', SDIM = 0.
+*>          If SORT = 'S', SDIM = number of eigenvalues for which
+*>                         SELECT is true.
 *> \endverbatim
 *>
-*> \param[in] LDVL
+*> \param[out] W
 *> \verbatim
-*>          LDVL is INTEGER
-*>          The leading dimension of the array VL.  LDVL >= 1; if
-*>          JOBVL = 'V', LDVL >= N.
+*>          W is COMPLEX*16 array, dimension (N)
+*>          W contains the computed eigenvalues, in the same order that
+*>          they appear on the diagonal of the output Schur form T.
 *> \endverbatim
 *>
-*> \param[out] VR
+*> \param[out] VS
 *> \verbatim
-*>          VR is COMPLEX*16 array, dimension (LDVR,N)
-*>          If JOBVR = 'V', the right eigenvectors v(j) are stored one
-*>          after another in the columns of VR, in the same order
-*>          as their eigenvalues.
-*>          If JOBVR = 'N', VR is not referenced.
-*>          v(j) = VR(:,j), the j-th column of VR.
+*>          VS is COMPLEX*16 array, dimension (LDVS,N)
+*>          If JOBVS = 'V', VS contains the unitary matrix Z of Schur
+*>          vectors.
+*>          If JOBVS = 'N', VS is not referenced.
 *> \endverbatim
 *>
-*> \param[in] LDVR
+*> \param[in] LDVS
 *> \verbatim
-*>          LDVR is INTEGER
-*>          The leading dimension of the array VR.  LDVR >= 1; if
-*>          JOBVR = 'V', LDVR >= N.
+*>          LDVS is INTEGER
+*>          The leading dimension of the array VS.  LDVS >= 1; if
+*>          JOBVS = 'V', LDVS >= N.
 *> \endverbatim
 *>
 *> \param[out] WORK
@@ -3327,49 +3621,69 @@
 *>
 *> \param[out] RWORK
 *> \verbatim
-*>          RWORK is DOUBLE PRECISION array, dimension (2*N)
+*>          RWORK is DOUBLE PRECISION array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] BWORK
+*> \verbatim
+*>          BWORK is LOGICAL array, dimension (N)
+*>          Not referenced if SORT = 'N'.
 *> \endverbatim
 *>
 *> \param[out] INFO
 *> \verbatim
 *>          INFO is INTEGER
-*>          = 0:  successful exit
-*>          < 0:  if INFO = -i, the i-th argument had an illegal value.
-*>          > 0:  if INFO = i, the QR algorithm failed to compute all the
-*>                eigenvalues, and no eigenvectors have been computed;
-*>                elements and i+1:N of W contain eigenvalues which have
-*>                converged.
+*>          = 0: successful exit
+*>          < 0: if INFO = -i, the i-th argument had an illegal value.
+*>          > 0: if INFO = i, and i is
+*>               <= N:  the QR algorithm failed to compute all the
+*>                      eigenvalues; elements 1:ILO-1 and i+1:N of W
+*>                      contain those eigenvalues which have converged;
+*>                      if JOBVS = 'V', VS contains the matrix which
+*>                      reduces A to its partially converged Schur form.
+*>               = N+1: the eigenvalues could not be reordered because
+*>                      some eigenvalues were too close to separate (the
+*>                      problem is very ill-conditioned);
+*>               = N+2: after reordering, roundoff changed values of
+*>                      some complex eigenvalues so that leading
+*>                      eigenvalues in the Schur form no longer satisfy
+*>                      SELECT = .TRUE..  This could also be caused by
+*>                      underflow due to scaling.
 *> \endverbatim
 *
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date November 2011
+*> \date December 2016
 *
 *> \ingroup complex16GEeigen
 *
 *  =====================================================================
-      SUBROUTINE ZGEEV( JOBVL, JOBVR, N, A, LDA, W, VL, LDVL, VR, LDVR,
-     $                  WORK, LWORK, RWORK, INFO )
+      SUBROUTINE ZGEES( JOBVS, SORT, SELECT, N, A, LDA, SDIM, W, VS,
+     $                  LDVS, WORK, LWORK, RWORK, BWORK, INFO )
 *
-*  -- LAPACK driver routine (version 3.4.0) --
+*  -- LAPACK driver routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     November 2011
+*     December 2016
 *
 *     .. Scalar Arguments ..
-      CHARACTER          JOBVL, JOBVR
-      INTEGER            INFO, LDA, LDVL, LDVR, LWORK, N
+      CHARACTER          JOBVS, SORT
+      INTEGER            INFO, LDA, LDVS, LWORK, N, SDIM
 *     ..
 *     .. Array Arguments ..
+      LOGICAL            BWORK( * )
       DOUBLE PRECISION   RWORK( * )
-      COMPLEX*16         A( LDA, * ), VL( LDVL, * ), VR( LDVR, * ),
-     $                   W( * ), WORK( * )
+      COMPLEX*16         A( LDA, * ), VS( LDVS, * ), W( * ), WORK( * )
+*     ..
+*     .. Function Arguments ..
+      LOGICAL            SELECT
+      EXTERNAL           SELECT
 *     ..
 *
 *  =====================================================================
@@ -3379,29 +3693,26 @@
       PARAMETER          ( ZERO = 0.0D0, ONE = 1.0D0 )
 *     ..
 *     .. Local Scalars ..
-      LOGICAL            LQUERY, SCALEA, WANTVL, WANTVR
-      CHARACTER          SIDE
-      INTEGER            HSWORK, I, IBAL, IERR, IHI, ILO, IRWORK, ITAU,
-     $                   IWRK, K, MAXWRK, MINWRK, NOUT
-      DOUBLE PRECISION   ANRM, BIGNUM, CSCALE, EPS, SCL, SMLNUM
-      COMPLEX*16         TMP
+      LOGICAL            LQUERY, SCALEA, WANTST, WANTVS
+      INTEGER            HSWORK, I, IBAL, ICOND, IERR, IEVAL, IHI, ILO,
+     $                   ITAU, IWRK, MAXWRK, MINWRK
+      DOUBLE PRECISION   ANRM, BIGNUM, CSCALE, EPS, S, SEP, SMLNUM
 *     ..
 *     .. Local Arrays ..
-      LOGICAL            SELECT( 1 )
       DOUBLE PRECISION   DUM( 1 )
 *     ..
 *     .. External Subroutines ..
-      EXTERNAL           DLABAD, XERBLA, ZDSCAL, ZGEBAK, ZGEBAL, ZGEHRD,
-     $                   ZHSEQR, ZLACPY, ZLASCL, ZSCAL, ZTREVC, ZUNGHR
+      EXTERNAL           DLABAD, XERBLA, ZCOPY, ZGEBAK, ZGEBAL, ZGEHRD,
+     $                   ZHSEQR, ZLACPY, ZLASCL, ZTRSEN, ZUNGHR
 *     ..
 *     .. External Functions ..
       LOGICAL            LSAME
-      INTEGER            IDAMAX, ILAENV
-      DOUBLE PRECISION   DLAMCH, DZNRM2, ZLANGE
-      EXTERNAL           LSAME, IDAMAX, ILAENV, DLAMCH, DZNRM2, ZLANGE
+      INTEGER            ILAENV
+      DOUBLE PRECISION   DLAMCH, ZLANGE
+      EXTERNAL           LSAME, ILAENV, DLAMCH, ZLANGE
 *     ..
 *     .. Intrinsic Functions ..
-      INTRINSIC          DBLE, DCMPLX, DCONJG, DIMAG, MAX, SQRT
+      INTRINSIC          MAX, SQRT
 *     ..
 *     .. Executable Statements ..
 *
@@ -3409,19 +3720,425 @@
 *
       INFO = 0
       LQUERY = ( LWORK.EQ.-1 )
-      WANTVL = LSAME( JOBVL, 'V' )
-      WANTVR = LSAME( JOBVR, 'V' )
-      IF( ( .NOT.WANTVL ) .AND. ( .NOT.LSAME( JOBVL, 'N' ) ) ) THEN
+      WANTVS = LSAME( JOBVS, 'V' )
+      WANTST = LSAME( SORT, 'S' )
+      IF( ( .NOT.WANTVS ) .AND. ( .NOT.LSAME( JOBVS, 'N' ) ) ) THEN
          INFO = -1
-      ELSE IF( ( .NOT.WANTVR ) .AND. ( .NOT.LSAME( JOBVR, 'N' ) ) ) THEN
+      ELSE IF( ( .NOT.WANTST ) .AND. ( .NOT.LSAME( SORT, 'N' ) ) ) THEN
          INFO = -2
       ELSE IF( N.LT.0 ) THEN
-         INFO = -3
+         INFO = -4
       ELSE IF( LDA.LT.MAX( 1, N ) ) THEN
-         INFO = -5
-      ELSE IF( LDVL.LT.1 .OR. ( WANTVL .AND. LDVL.LT.N ) ) THEN
-         INFO = -8
-      ELSE IF( LDVR.LT.1 .OR. ( WANTVR .AND. LDVR.LT.N ) ) THEN
+         INFO = -6
+      ELSE IF( LDVS.LT.1 .OR. ( WANTVS .AND. LDVS.LT.N ) ) THEN
+         INFO = -10
+      END IF
+*
+*     Compute workspace
+*      (Note: Comments in the code beginning "Workspace:" describe the
+*       minimal amount of workspace needed at that point in the code,
+*       as well as the preferred amount for good performance.
+*       CWorkspace refers to complex workspace, and RWorkspace to real
+*       workspace. NB refers to the optimal block size for the
+*       immediately following subroutine, as returned by ILAENV.
+*       HSWORK refers to the workspace preferred by ZHSEQR, as
+*       calculated below. HSWORK is computed assuming ILO=1 and IHI=N,
+*       the worst case.)
+*
+      IF( INFO.EQ.0 ) THEN
+         IF( N.EQ.0 ) THEN
+            MINWRK = 1
+            MAXWRK = 1
+         ELSE
+            MAXWRK = N + N*ILAENV( 1, 'ZGEHRD', ' ', N, 1, N, 0 )
+            MINWRK = 2*N
+*
+            CALL ZHSEQR( 'S', JOBVS, N, 1, N, A, LDA, W, VS, LDVS,
+     $             WORK, -1, IEVAL )
+            HSWORK = WORK( 1 )
+*
+            IF( .NOT.WANTVS ) THEN
+               MAXWRK = MAX( MAXWRK, HSWORK )
+            ELSE
+               MAXWRK = MAX( MAXWRK, N + ( N - 1 )*ILAENV( 1, 'ZUNGHR',
+     $                       ' ', N, 1, N, -1 ) )
+               MAXWRK = MAX( MAXWRK, HSWORK )
+            END IF
+         END IF
+         WORK( 1 ) = MAXWRK
+*
+         IF( LWORK.LT.MINWRK .AND. .NOT.LQUERY ) THEN
+            INFO = -12
+         END IF
+      END IF
+*
+      IF( INFO.NE.0 ) THEN
+         CALL XERBLA( 'ZGEES ', -INFO )
+         RETURN
+      ELSE IF( LQUERY ) THEN
+         RETURN
+      END IF
+*
+*     Quick return if possible
+*
+      IF( N.EQ.0 ) THEN
+         SDIM = 0
+         RETURN
+      END IF
+*
+*     Get machine constants
+*
+      EPS = DLAMCH( 'P' )
+      SMLNUM = DLAMCH( 'S' )
+      BIGNUM = ONE / SMLNUM
+      CALL DLABAD( SMLNUM, BIGNUM )
+      SMLNUM = SQRT( SMLNUM ) / EPS
+      BIGNUM = ONE / SMLNUM
+*
+*     Scale A if max element outside range [SMLNUM,BIGNUM]
+*
+      ANRM = ZLANGE( 'M', N, N, A, LDA, DUM )
+      SCALEA = .FALSE.
+      IF( ANRM.GT.ZERO .AND. ANRM.LT.SMLNUM ) THEN
+         SCALEA = .TRUE.
+         CSCALE = SMLNUM
+      ELSE IF( ANRM.GT.BIGNUM ) THEN
+         SCALEA = .TRUE.
+         CSCALE = BIGNUM
+      END IF
+      IF( SCALEA )
+     $   CALL ZLASCL( 'G', 0, 0, ANRM, CSCALE, N, N, A, LDA, IERR )
+*
+*     Permute the matrix to make it more nearly triangular
+*     (CWorkspace: none)
+*     (RWorkspace: need N)
+*
+      IBAL = 1
+      CALL ZGEBAL( 'P', N, A, LDA, ILO, IHI, RWORK( IBAL ), IERR )
+*
+*     Reduce to upper Hessenberg form
+*     (CWorkspace: need 2*N, prefer N+N*NB)
+*     (RWorkspace: none)
+*
+      ITAU = 1
+      IWRK = N + ITAU
+      CALL ZGEHRD( N, ILO, IHI, A, LDA, WORK( ITAU ), WORK( IWRK ),
+     $             LWORK-IWRK+1, IERR )
+*
+      IF( WANTVS ) THEN
+*
+*        Copy Householder vectors to VS
+*
+         CALL ZLACPY( 'L', N, N, A, LDA, VS, LDVS )
+*
+*        Generate unitary matrix in VS
+*        (CWorkspace: need 2*N-1, prefer N+(N-1)*NB)
+*        (RWorkspace: none)
+*
+         CALL ZUNGHR( N, ILO, IHI, VS, LDVS, WORK( ITAU ), WORK( IWRK ),
+     $                LWORK-IWRK+1, IERR )
+      END IF
+*
+      SDIM = 0
+*
+*     Perform QR iteration, accumulating Schur vectors in VS if desired
+*     (CWorkspace: need 1, prefer HSWORK (see comments) )
+*     (RWorkspace: none)
+*
+      IWRK = ITAU
+      CALL ZHSEQR( 'S', JOBVS, N, ILO, IHI, A, LDA, W, VS, LDVS,
+     $             WORK( IWRK ), LWORK-IWRK+1, IEVAL )
+      IF( IEVAL.GT.0 )
+     $   INFO = IEVAL
+*
+*     Sort eigenvalues if desired
+*
+      IF( WANTST .AND. INFO.EQ.0 ) THEN
+         IF( SCALEA )
+     $      CALL ZLASCL( 'G', 0, 0, CSCALE, ANRM, N, 1, W, N, IERR )
+         DO 10 I = 1, N
+            BWORK( I ) = SELECT( W( I ) )
+   10    CONTINUE
+*
+*        Reorder eigenvalues and transform Schur vectors
+*        (CWorkspace: none)
+*        (RWorkspace: none)
+*
+         CALL ZTRSEN( 'N', JOBVS, BWORK, N, A, LDA, VS, LDVS, W, SDIM,
+     $                S, SEP, WORK( IWRK ), LWORK-IWRK+1, ICOND )
+      END IF
+*
+      IF( WANTVS ) THEN
+*
+*        Undo balancing
+*        (CWorkspace: none)
+*        (RWorkspace: need N)
+*
+         CALL ZGEBAK( 'P', 'R', N, ILO, IHI, RWORK( IBAL ), N, VS, LDVS,
+     $                IERR )
+      END IF
+*
+      IF( SCALEA ) THEN
+*
+*        Undo scaling for the Schur form of A
+*
+         CALL ZLASCL( 'U', 0, 0, CSCALE, ANRM, N, N, A, LDA, IERR )
+         CALL ZCOPY( N, A, LDA+1, W, 1 )
+      END IF
+*
+      WORK( 1 ) = MAXWRK
+      RETURN
+*
+*     End of ZGEES
+*
+      END
+*> \brief <b> ZGEEV computes the eigenvalues and, optionally, the left and/or right eigenvectors for GE matrices</b>
+*
+*  =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
+*
+*> \htmlonly
+*> Download ZGEEV + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/zgeev.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/zgeev.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/zgeev.f">
+*> [TXT]</a>
+*> \endhtmlonly
+*
+*  Definition:
+*  ===========
+*
+*       SUBROUTINE ZGEEV( JOBVL, JOBVR, N, A, LDA, W, VL, LDVL, VR, LDVR,
+*                         WORK, LWORK, RWORK, INFO )
+*
+*       .. Scalar Arguments ..
+*       CHARACTER          JOBVL, JOBVR
+*       INTEGER            INFO, LDA, LDVL, LDVR, LWORK, N
+*       ..
+*       .. Array Arguments ..
+*       DOUBLE PRECISION   RWORK( * )
+*       COMPLEX*16         A( LDA, * ), VL( LDVL, * ), VR( LDVR, * ),
+*      $                   W( * ), WORK( * )
+*       ..
+*
+*
+*> \par Purpose:
+*  =============
+*>
+*> \verbatim
+*>
+*> ZGEEV computes for an N-by-N complex nonsymmetric matrix A, the
+*> eigenvalues and, optionally, the left and/or right eigenvectors.
+*>
+*> The right eigenvector v(j) of A satisfies
+*>                  A * v(j) = lambda(j) * v(j)
+*> where lambda(j) is its eigenvalue.
+*> The left eigenvector u(j) of A satisfies
+*>               u(j)**H * A = lambda(j) * u(j)**H
+*> where u(j)**H denotes the conjugate transpose of u(j).
+*>
+*> The computed eigenvectors are normalized to have Euclidean norm
+*> equal to 1 and largest component real.
+*> \endverbatim
+*
+*  Arguments:
+*  ==========
+*
+*> \param[in] JOBVL
+*> \verbatim
+*>          JOBVL is CHARACTER*1
+*>          = 'N': left eigenvectors of A are not computed;
+*>          = 'V': left eigenvectors of are computed.
+*> \endverbatim
+*>
+*> \param[in] JOBVR
+*> \verbatim
+*>          JOBVR is CHARACTER*1
+*>          = 'N': right eigenvectors of A are not computed;
+*>          = 'V': right eigenvectors of A are computed.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*>          N is INTEGER
+*>          The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*>          A is COMPLEX*16 array, dimension (LDA,N)
+*>          On entry, the N-by-N matrix A.
+*>          On exit, A has been overwritten.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*>          LDA is INTEGER
+*>          The leading dimension of the array A.  LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] W
+*> \verbatim
+*>          W is COMPLEX*16 array, dimension (N)
+*>          W contains the computed eigenvalues.
+*> \endverbatim
+*>
+*> \param[out] VL
+*> \verbatim
+*>          VL is COMPLEX*16 array, dimension (LDVL,N)
+*>          If JOBVL = 'V', the left eigenvectors u(j) are stored one
+*>          after another in the columns of VL, in the same order
+*>          as their eigenvalues.
+*>          If JOBVL = 'N', VL is not referenced.
+*>          u(j) = VL(:,j), the j-th column of VL.
+*> \endverbatim
+*>
+*> \param[in] LDVL
+*> \verbatim
+*>          LDVL is INTEGER
+*>          The leading dimension of the array VL.  LDVL >= 1; if
+*>          JOBVL = 'V', LDVL >= N.
+*> \endverbatim
+*>
+*> \param[out] VR
+*> \verbatim
+*>          VR is COMPLEX*16 array, dimension (LDVR,N)
+*>          If JOBVR = 'V', the right eigenvectors v(j) are stored one
+*>          after another in the columns of VR, in the same order
+*>          as their eigenvalues.
+*>          If JOBVR = 'N', VR is not referenced.
+*>          v(j) = VR(:,j), the j-th column of VR.
+*> \endverbatim
+*>
+*> \param[in] LDVR
+*> \verbatim
+*>          LDVR is INTEGER
+*>          The leading dimension of the array VR.  LDVR >= 1; if
+*>          JOBVR = 'V', LDVR >= N.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*>          WORK is COMPLEX*16 array, dimension (MAX(1,LWORK))
+*>          On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*>          LWORK is INTEGER
+*>          The dimension of the array WORK.  LWORK >= max(1,2*N).
+*>          For good performance, LWORK must generally be larger.
+*>
+*>          If LWORK = -1, then a workspace query is assumed; the routine
+*>          only calculates the optimal size of the WORK array, returns
+*>          this value as the first entry of the WORK array, and no error
+*>          message related to LWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*>          RWORK is DOUBLE PRECISION array, dimension (2*N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*>          INFO is INTEGER
+*>          = 0:  successful exit
+*>          < 0:  if INFO = -i, the i-th argument had an illegal value.
+*>          > 0:  if INFO = i, the QR algorithm failed to compute all the
+*>                eigenvalues, and no eigenvectors have been computed;
+*>                elements and i+1:N of W contain eigenvalues which have
+*>                converged.
+*> \endverbatim
+*
+*  Authors:
+*  ========
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date June 2016
+*
+*  @precisions fortran z -> c
+*
+*> \ingroup complex16GEeigen
+*
+*  =====================================================================
+      SUBROUTINE ZGEEV( JOBVL, JOBVR, N, A, LDA, W, VL, LDVL, VR, LDVR,
+     $                  WORK, LWORK, RWORK, INFO )
+      implicit none
+*
+*  -- LAPACK driver routine (version 3.7.0) --
+*  -- LAPACK is a software package provided by Univ. of Tennessee,    --
+*  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+*     June 2016
+*
+*     .. Scalar Arguments ..
+      CHARACTER          JOBVL, JOBVR
+      INTEGER            INFO, LDA, LDVL, LDVR, LWORK, N
+*     ..
+*     .. Array Arguments ..
+      DOUBLE PRECISION   RWORK( * )
+      COMPLEX*16         A( LDA, * ), VL( LDVL, * ), VR( LDVR, * ),
+     $                   W( * ), WORK( * )
+*     ..
+*
+*  =====================================================================
+*
+*     .. Parameters ..
+      DOUBLE PRECISION   ZERO, ONE
+      PARAMETER          ( ZERO = 0.0D0, ONE = 1.0D0 )
+*     ..
+*     .. Local Scalars ..
+      LOGICAL            LQUERY, SCALEA, WANTVL, WANTVR
+      CHARACTER          SIDE
+      INTEGER            HSWORK, I, IBAL, IERR, IHI, ILO, IRWORK, ITAU,
+     $                   IWRK, K, LWORK_TREVC, MAXWRK, MINWRK, NOUT
+      DOUBLE PRECISION   ANRM, BIGNUM, CSCALE, EPS, SCL, SMLNUM
+      COMPLEX*16         TMP
+*     ..
+*     .. Local Arrays ..
+      LOGICAL            SELECT( 1 )
+      DOUBLE PRECISION   DUM( 1 )
+*     ..
+*     .. External Subroutines ..
+      EXTERNAL           DLABAD, XERBLA, ZDSCAL, ZGEBAK, ZGEBAL, ZGEHRD,
+     $                   ZHSEQR, ZLACPY, ZLASCL, ZSCAL, ZTREVC3, ZUNGHR
+*     ..
+*     .. External Functions ..
+      LOGICAL            LSAME
+      INTEGER            IDAMAX, ILAENV
+      DOUBLE PRECISION   DLAMCH, DZNRM2, ZLANGE
+      EXTERNAL           LSAME, IDAMAX, ILAENV, DLAMCH, DZNRM2, ZLANGE
+*     ..
+*     .. Intrinsic Functions ..
+      INTRINSIC          DBLE, DCMPLX, CONJG, AIMAG, MAX, SQRT
+*     ..
+*     .. Executable Statements ..
+*
+*     Test the input arguments
+*
+      INFO = 0
+      LQUERY = ( LWORK.EQ.-1 )
+      WANTVL = LSAME( JOBVL, 'V' )
+      WANTVR = LSAME( JOBVR, 'V' )
+      IF( ( .NOT.WANTVL ) .AND. ( .NOT.LSAME( JOBVL, 'N' ) ) ) THEN
+         INFO = -1
+      ELSE IF( ( .NOT.WANTVR ) .AND. ( .NOT.LSAME( JOBVR, 'N' ) ) ) THEN
+         INFO = -2
+      ELSE IF( N.LT.0 ) THEN
+         INFO = -3
+      ELSE IF( LDA.LT.MAX( 1, N ) ) THEN
+         INFO = -5
+      ELSE IF( LDVL.LT.1 .OR. ( WANTVL .AND. LDVL.LT.N ) ) THEN
+         INFO = -8
+      ELSE IF( LDVR.LT.1 .OR. ( WANTVR .AND. LDVR.LT.N ) ) THEN
          INFO = -10
       END IF
 *
@@ -3446,18 +4163,28 @@
             IF( WANTVL ) THEN
                MAXWRK = MAX( MAXWRK, N + ( N - 1 )*ILAENV( 1, 'ZUNGHR',
      $                       ' ', N, 1, N, -1 ) )
+               CALL ZTREVC3( 'L', 'B', SELECT, N, A, LDA,
+     $                       VL, LDVL, VR, LDVR,
+     $                       N, NOUT, WORK, -1, RWORK, -1, IERR )
+               LWORK_TREVC = INT( WORK(1) )
+               MAXWRK = MAX( MAXWRK, N + LWORK_TREVC )
                CALL ZHSEQR( 'S', 'V', N, 1, N, A, LDA, W, VL, LDVL,
-     $                WORK, -1, INFO )
+     $                      WORK, -1, INFO )
             ELSE IF( WANTVR ) THEN
                MAXWRK = MAX( MAXWRK, N + ( N - 1 )*ILAENV( 1, 'ZUNGHR',
      $                       ' ', N, 1, N, -1 ) )
+               CALL ZTREVC3( 'R', 'B', SELECT, N, A, LDA,
+     $                       VL, LDVL, VR, LDVR,
+     $                       N, NOUT, WORK, -1, RWORK, -1, IERR )
+               LWORK_TREVC = INT( WORK(1) )
+               MAXWRK = MAX( MAXWRK, N + LWORK_TREVC )
                CALL ZHSEQR( 'S', 'V', N, 1, N, A, LDA, W, VR, LDVR,
-     $                WORK, -1, INFO )
+     $                      WORK, -1, INFO )
             ELSE
                CALL ZHSEQR( 'E', 'N', N, 1, N, A, LDA, W, VR, LDVR,
-     $                WORK, -1, INFO )
+     $                      WORK, -1, INFO )
             END IF
-            HSWORK = WORK( 1 )
+            HSWORK = INT( WORK(1) )
             MAXWRK = MAX( MAXWRK, HSWORK, MINWRK )
          END IF
          WORK( 1 ) = MAXWRK
@@ -3584,20 +4311,21 @@
      $                WORK( IWRK ), LWORK-IWRK+1, INFO )
       END IF
 *
-*     If INFO > 0 from ZHSEQR, then quit
+*     If INFO .NE. 0 from ZHSEQR, then quit
 *
-      IF( INFO.GT.0 )
+      IF( INFO.NE.0 )
      $   GO TO 50
 *
       IF( WANTVL .OR. WANTVR ) THEN
 *
 *        Compute left and/or right eigenvectors
-*        (CWorkspace: need 2*N)
+*        (CWorkspace: need 2*N, prefer N + 2*N*NB)
 *        (RWorkspace: need 2*N)
 *
          IRWORK = IBAL + N
-         CALL ZTREVC( SIDE, 'B', SELECT, N, A, LDA, VL, LDVL, VR, LDVR,
-     $                N, NOUT, WORK( IWRK ), RWORK( IRWORK ), IERR )
+         CALL ZTREVC3( SIDE, 'B', SELECT, N, A, LDA, VL, LDVL, VR, LDVR,
+     $                 N, NOUT, WORK( IWRK ), LWORK-IWRK+1,
+     $                 RWORK( IRWORK ), N, IERR )
       END IF
 *
       IF( WANTVL ) THEN
@@ -3616,10 +4344,10 @@
             CALL ZDSCAL( N, SCL, VL( 1, I ), 1 )
             DO 10 K = 1, N
                RWORK( IRWORK+K-1 ) = DBLE( VL( K, I ) )**2 +
-     $                               DIMAG( VL( K, I ) )**2
+     $                               AIMAG( VL( K, I ) )**2
    10       CONTINUE
             K = IDAMAX( N, RWORK( IRWORK ), 1 )
-            TMP = DCONJG( VL( K, I ) ) / SQRT( RWORK( IRWORK+K-1 ) )
+            TMP = CONJG( VL( K, I ) ) / SQRT( RWORK( IRWORK+K-1 ) )
             CALL ZSCAL( N, TMP, VL( 1, I ), 1 )
             VL( K, I ) = DCMPLX( DBLE( VL( K, I ) ), ZERO )
    20    CONTINUE
@@ -3641,10 +4369,10 @@
             CALL ZDSCAL( N, SCL, VR( 1, I ), 1 )
             DO 30 K = 1, N
                RWORK( IRWORK+K-1 ) = DBLE( VR( K, I ) )**2 +
-     $                               DIMAG( VR( K, I ) )**2
+     $                               AIMAG( VR( K, I ) )**2
    30       CONTINUE
             K = IDAMAX( N, RWORK( IRWORK ), 1 )
-            TMP = DCONJG( VR( K, I ) ) / SQRT( RWORK( IRWORK+K-1 ) )
+            TMP = CONJG( VR( K, I ) ) / SQRT( RWORK( IRWORK+K-1 ) )
             CALL ZSCAL( N, TMP, VR( 1, I ), 1 )
             VR( K, I ) = DCMPLX( DBLE( VR( K, I ) ), ZERO )
    40    CONTINUE
@@ -3671,31 +4399,31 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download ZGEHD2 + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/zgehd2.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/zgehd2.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/zgehd2.f"> 
+*> Download ZGEHD2 + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/zgehd2.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/zgehd2.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/zgehd2.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       SUBROUTINE ZGEHD2( N, ILO, IHI, A, LDA, TAU, WORK, INFO )
-* 
+*
 *       .. Scalar Arguments ..
 *       INTEGER            IHI, ILO, INFO, LDA, N
 *       ..
 *       .. Array Arguments ..
 *       COMPLEX*16         A( LDA, * ), TAU( * ), WORK( * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -3770,12 +4498,12 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date September 2012
+*> \date December 2016
 *
 *> \ingroup complex16GEcomputational
 *
@@ -3818,10 +4546,10 @@
 *  =====================================================================
       SUBROUTINE ZGEHD2( N, ILO, IHI, A, LDA, TAU, WORK, INFO )
 *
-*  -- LAPACK computational routine (version 3.4.2) --
+*  -- LAPACK computational routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     September 2012
+*     December 2016
 *
 *     .. Scalar Arguments ..
       INTEGER            IHI, ILO, INFO, LDA, N
@@ -3895,31 +4623,31 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download ZGEHRD + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/zgehrd.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/zgehrd.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/zgehrd.f"> 
+*> Download ZGEHRD + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/zgehrd.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/zgehrd.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/zgehrd.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       SUBROUTINE ZGEHRD( N, ILO, IHI, A, LDA, TAU, WORK, LWORK, INFO )
-* 
+*
 *       .. Scalar Arguments ..
 *       INTEGER            IHI, ILO, INFO, LDA, LWORK, N
 *       ..
 *       .. Array Arguments ..
 *       COMPLEX*16        A( LDA, * ), TAU( * ), WORK( * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -3990,8 +4718,7 @@
 *> \verbatim
 *>          LWORK is INTEGER
 *>          The length of the array WORK.  LWORK >= max(1,N).
-*>          For optimum performance LWORK >= N*NB, where NB is the
-*>          optimal blocksize.
+*>          For good performance, LWORK should generally be larger.
 *>
 *>          If LWORK = -1, then a workspace query is assumed; the routine
 *>          only calculates the optimal size of the WORK array, returns
@@ -4009,12 +4736,12 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date November 2011
+*> \date December 2016
 *
 *> \ingroup complex16GEcomputational
 *
@@ -4061,10 +4788,10 @@
 *  =====================================================================
       SUBROUTINE ZGEHRD( N, ILO, IHI, A, LDA, TAU, WORK, LWORK, INFO )
 *
-*  -- LAPACK computational routine (version 3.4.0) --
+*  -- LAPACK computational routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     November 2011
+*     December 2016
 *
 *     .. Scalar Arguments ..
       INTEGER            IHI, ILO, INFO, LDA, LWORK, N
@@ -4076,21 +4803,19 @@
 *  =====================================================================
 *
 *     .. Parameters ..
-      INTEGER            NBMAX, LDT
-      PARAMETER          ( NBMAX = 64, LDT = NBMAX+1 )
+      INTEGER            NBMAX, LDT, TSIZE
+      PARAMETER          ( NBMAX = 64, LDT = NBMAX+1,
+     $                     TSIZE = LDT*NBMAX )
       COMPLEX*16        ZERO, ONE
-      PARAMETER          ( ZERO = ( 0.0D+0, 0.0D+0 ), 
+      PARAMETER          ( ZERO = ( 0.0D+0, 0.0D+0 ),
      $                     ONE = ( 1.0D+0, 0.0D+0 ) )
 *     ..
 *     .. Local Scalars ..
       LOGICAL            LQUERY
-      INTEGER            I, IB, IINFO, IWS, J, LDWORK, LWKOPT, NB,
+      INTEGER            I, IB, IINFO, IWT, J, LDWORK, LWKOPT, NB,
      $                   NBMIN, NH, NX
       COMPLEX*16        EI
 *     ..
-*     .. Local Arrays ..
-      COMPLEX*16        T( LDT, NBMAX )
-*     ..
 *     .. External Subroutines ..
       EXTERNAL           ZAXPY, ZGEHD2, ZGEMM, ZLAHR2, ZLARFB, ZTRMM,
      $                   XERBLA
@@ -4107,9 +4832,6 @@
 *     Test the input parameters
 *
       INFO = 0
-      NB = MIN( NBMAX, ILAENV( 1, 'ZGEHRD', ' ', N, ILO, IHI, -1 ) )
-      LWKOPT = N*NB
-      WORK( 1 ) = LWKOPT
       LQUERY = ( LWORK.EQ.-1 )
       IF( N.LT.0 ) THEN
          INFO = -1
@@ -4122,6 +4844,16 @@
       ELSE IF( LWORK.LT.MAX( 1, N ) .AND. .NOT.LQUERY ) THEN
          INFO = -8
       END IF
+*
+      IF( INFO.EQ.0 ) THEN
+*
+*        Compute the workspace requirements
+*
+         NB = MIN( NBMAX, ILAENV( 1, 'ZGEHRD', ' ', N, ILO, IHI, -1 ) )
+         LWKOPT = N*NB + TSIZE
+         WORK( 1 ) = LWKOPT
+      ENDIF
+*
       IF( INFO.NE.0 ) THEN
          CALL XERBLA( 'ZGEHRD', -INFO )
          RETURN
@@ -4150,7 +4882,6 @@
 *
       NB = MIN( NBMAX, ILAENV( 1, 'ZGEHRD', ' ', N, ILO, IHI, -1 ) )
       NBMIN = 2
-      IWS = 1
       IF( NB.GT.1 .AND. NB.LT.NH ) THEN
 *
 *        Determine when to cross over from blocked to unblocked code
@@ -4161,8 +4892,7 @@
 *
 *           Determine if workspace is large enough for blocked code
 *
-            IWS = N*NB
-            IF( LWORK.LT.IWS ) THEN
+            IF( LWORK.LT.N*NB+TSIZE ) THEN
 *
 *              Not enough workspace to use optimal NB:  determine the
 *              minimum value of NB, and reduce NB or force use of
@@ -4170,8 +4900,8 @@
 *
                NBMIN = MAX( 2, ILAENV( 2, 'ZGEHRD', ' ', N, ILO, IHI,
      $                 -1 ) )
-               IF( LWORK.GE.N*NBMIN ) THEN
-                  NB = LWORK / N
+               IF( LWORK.GE.(N*NBMIN + TSIZE) ) THEN
+                  NB = (LWORK-TSIZE) / N
                ELSE
                   NB = 1
                END IF
@@ -4190,6 +4920,7 @@
 *
 *        Use blocked code
 *
+         IWT = 1 + N*NB
          DO 40 I = ILO, IHI - 1 - NX, NB
             IB = MIN( NB, IHI-I )
 *
@@ -4197,8 +4928,8 @@
 *           matrices V and T of the block reflector H = I - V*T*V**H
 *           which performs the reduction, and also the matrix Y = A*V*T
 *
-            CALL ZLAHR2( IHI, I, IB, A( 1, I ), LDA, TAU( I ), T, LDT,
-     $                   WORK, LDWORK )
+            CALL ZLAHR2( IHI, I, IB, A( 1, I ), LDA, TAU( I ),
+     $                   WORK( IWT ), LDT, WORK, LDWORK )
 *
 *           Apply the block reflector H to A(1:ihi,i+ib:ihi) from the
 *           right, computing  A := A - Y * V**H. V(i+ib,ib-1) must be set
@@ -4206,7 +4937,7 @@
 *
             EI = A( I+IB, I+IB-1 )
             A( I+IB, I+IB-1 ) = ONE
-            CALL ZGEMM( 'No transpose', 'Conjugate transpose', 
+            CALL ZGEMM( 'No transpose', 'Conjugate transpose',
      $                  IHI, IHI-I-IB+1,
      $                  IB, -ONE, WORK, LDWORK, A( I+IB, I ), LDA, ONE,
      $                  A( 1, I+IB ), LDA )
@@ -4228,15 +4959,16 @@
 *
             CALL ZLARFB( 'Left', 'Conjugate transpose', 'Forward',
      $                   'Columnwise',
-     $                   IHI-I, N-I-IB+1, IB, A( I+1, I ), LDA, T, LDT,
-     $                   A( I+1, I+IB ), LDA, WORK, LDWORK )
+     $                   IHI-I, N-I-IB+1, IB, A( I+1, I ), LDA,
+     $                   WORK( IWT ), LDT, A( I+1, I+IB ), LDA,
+     $                   WORK, LDWORK )
    40    CONTINUE
       END IF
 *
 *     Use unblocked code to reduce the rest of the matrix
 *
       CALL ZGEHD2( N, I, IHI, A, LDA, TAU, WORK, IINFO )
-      WORK( 1 ) = IWS
+      WORK( 1 ) = LWKOPT
 *
       RETURN
 *
@@ -4247,31 +4979,31 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download ZGELQ2 + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/zgelq2.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/zgelq2.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/zgelq2.f"> 
+*> Download ZGELQ2 + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/zgelq2.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/zgelq2.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/zgelq2.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       SUBROUTINE ZGELQ2( M, N, A, LDA, TAU, WORK, INFO )
-* 
+*
 *       .. Scalar Arguments ..
 *       INTEGER            INFO, LDA, M, N
 *       ..
 *       .. Array Arguments ..
 *       COMPLEX*16         A( LDA, * ), TAU( * ), WORK( * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -4336,12 +5068,12 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date September 2012
+*> \date December 2016
 *
 *> \ingroup complex16GEcomputational
 *
@@ -4366,10 +5098,10 @@
 *  =====================================================================
       SUBROUTINE ZGELQ2( M, N, A, LDA, TAU, WORK, INFO )
 *
-*  -- LAPACK computational routine (version 3.4.2) --
+*  -- LAPACK computational routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     September 2012
+*     December 2016
 *
 *     .. Scalar Arguments ..
       INTEGER            INFO, LDA, M, N
@@ -4441,31 +5173,31 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download ZGELQF + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/zgelqf.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/zgelqf.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/zgelqf.f"> 
+*> Download ZGELQF + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/zgelqf.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/zgelqf.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/zgelqf.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       SUBROUTINE ZGELQF( M, N, A, LDA, TAU, WORK, LWORK, INFO )
-* 
+*
 *       .. Scalar Arguments ..
 *       INTEGER            INFO, LDA, LWORK, M, N
 *       ..
 *       .. Array Arguments ..
 *       COMPLEX*16         A( LDA, * ), TAU( * ), WORK( * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -4544,12 +5276,12 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date November 2011
+*> \date December 2016
 *
 *> \ingroup complex16GEcomputational
 *
@@ -4574,10 +5306,10 @@
 *  =====================================================================
       SUBROUTINE ZGELQF( M, N, A, LDA, TAU, WORK, LWORK, INFO )
 *
-*  -- LAPACK computational routine (version 3.4.0) --
+*  -- LAPACK computational routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     November 2011
+*     December 2016
 *
 *     .. Scalar Arguments ..
       INTEGER            INFO, LDA, LWORK, M, N
@@ -4706,55 +5438,83 @@
 *     End of ZGELQF
 *
       END
-*> \brief \b ZGEQP3
+*> \brief <b> ZGELS solves overdetermined or underdetermined systems for GE matrices</b>
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download ZGEQP3 + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/zgeqp3.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/zgeqp3.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/zgeqp3.f"> 
+*> Download ZGELS + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/zgels.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/zgels.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/zgels.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
-*       SUBROUTINE ZGEQP3( M, N, A, LDA, JPVT, TAU, WORK, LWORK, RWORK,
-*                          INFO )
-* 
+*       SUBROUTINE ZGELS( TRANS, M, N, NRHS, A, LDA, B, LDB, WORK, LWORK,
+*                         INFO )
+*
 *       .. Scalar Arguments ..
-*       INTEGER            INFO, LDA, LWORK, M, N
+*       CHARACTER          TRANS
+*       INTEGER            INFO, LDA, LDB, LWORK, M, N, NRHS
 *       ..
 *       .. Array Arguments ..
-*       INTEGER            JPVT( * )
-*       DOUBLE PRECISION   RWORK( * )
-*       COMPLEX*16         A( LDA, * ), TAU( * ), WORK( * )
+*       COMPLEX*16         A( LDA, * ), B( LDB, * ), WORK( * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
 *>
 *> \verbatim
 *>
-*> ZGEQP3 computes a QR factorization with column pivoting of a
-*> matrix A:  A*P = Q*R  using Level 3 BLAS.
+*> ZGELS solves overdetermined or underdetermined complex linear systems
+*> involving an M-by-N matrix A, or its conjugate-transpose, using a QR
+*> or LQ factorization of A.  It is assumed that A has full rank.
+*>
+*> The following options are provided:
+*>
+*> 1. If TRANS = 'N' and m >= n:  find the least squares solution of
+*>    an overdetermined system, i.e., solve the least squares problem
+*>                 minimize || B - A*X ||.
+*>
+*> 2. If TRANS = 'N' and m < n:  find the minimum norm solution of
+*>    an underdetermined system A * X = B.
+*>
+*> 3. If TRANS = 'C' and m >= n:  find the minimum norm solution of
+*>    an underdetermined system A**H * X = B.
+*>
+*> 4. If TRANS = 'C' and m < n:  find the least squares solution of
+*>    an overdetermined system, i.e., solve the least squares problem
+*>                 minimize || B - A**H * X ||.
+*>
+*> Several right hand side vectors b and solution vectors x can be
+*> handled in a single call; they are stored as the columns of the
+*> M-by-NRHS right hand side matrix B and the N-by-NRHS solution
+*> matrix X.
 *> \endverbatim
 *
 *  Arguments:
 *  ==========
 *
+*> \param[in] TRANS
+*> \verbatim
+*>          TRANS is CHARACTER*1
+*>          = 'N': the linear system involves A;
+*>          = 'C': the linear system involves A**H.
+*> \endverbatim
+*>
 *> \param[in] M
 *> \verbatim
 *>          M is INTEGER
-*>          The number of rows of the matrix A. M >= 0.
+*>          The number of rows of the matrix A.  M >= 0.
 *> \endverbatim
 *>
 *> \param[in] N
@@ -4763,51 +5523,71 @@
 *>          The number of columns of the matrix A.  N >= 0.
 *> \endverbatim
 *>
+*> \param[in] NRHS
+*> \verbatim
+*>          NRHS is INTEGER
+*>          The number of right hand sides, i.e., the number of
+*>          columns of the matrices B and X. NRHS >= 0.
+*> \endverbatim
+*>
 *> \param[in,out] A
 *> \verbatim
 *>          A is COMPLEX*16 array, dimension (LDA,N)
 *>          On entry, the M-by-N matrix A.
-*>          On exit, the upper triangle of the array contains the
-*>          min(M,N)-by-N upper trapezoidal matrix R; the elements below
-*>          the diagonal, together with the array TAU, represent the
-*>          unitary matrix Q as a product of min(M,N) elementary
-*>          reflectors.
+*>            if M >= N, A is overwritten by details of its QR
+*>                       factorization as returned by ZGEQRF;
+*>            if M <  N, A is overwritten by details of its LQ
+*>                       factorization as returned by ZGELQF.
 *> \endverbatim
 *>
 *> \param[in] LDA
 *> \verbatim
 *>          LDA is INTEGER
-*>          The leading dimension of the array A. LDA >= max(1,M).
+*>          The leading dimension of the array A.  LDA >= max(1,M).
 *> \endverbatim
 *>
-*> \param[in,out] JPVT
+*> \param[in,out] B
 *> \verbatim
-*>          JPVT is INTEGER array, dimension (N)
-*>          On entry, if JPVT(J).ne.0, the J-th column of A is permuted
-*>          to the front of A*P (a leading column); if JPVT(J)=0,
-*>          the J-th column of A is a free column.
-*>          On exit, if JPVT(J)=K, then the J-th column of A*P was the
-*>          the K-th column of A.
+*>          B is COMPLEX*16 array, dimension (LDB,NRHS)
+*>          On entry, the matrix B of right hand side vectors, stored
+*>          columnwise; B is M-by-NRHS if TRANS = 'N', or N-by-NRHS
+*>          if TRANS = 'C'.
+*>          On exit, if INFO = 0, B is overwritten by the solution
+*>          vectors, stored columnwise:
+*>          if TRANS = 'N' and m >= n, rows 1 to n of B contain the least
+*>          squares solution vectors; the residual sum of squares for the
+*>          solution in each column is given by the sum of squares of the
+*>          modulus of elements N+1 to M in that column;
+*>          if TRANS = 'N' and m < n, rows 1 to N of B contain the
+*>          minimum norm solution vectors;
+*>          if TRANS = 'C' and m >= n, rows 1 to M of B contain the
+*>          minimum norm solution vectors;
+*>          if TRANS = 'C' and m < n, rows 1 to M of B contain the
+*>          least squares solution vectors; the residual sum of squares
+*>          for the solution in each column is given by the sum of
+*>          squares of the modulus of elements M+1 to N in that column.
 *> \endverbatim
 *>
-*> \param[out] TAU
+*> \param[in] LDB
 *> \verbatim
-*>          TAU is COMPLEX*16 array, dimension (min(M,N))
-*>          The scalar factors of the elementary reflectors.
+*>          LDB is INTEGER
+*>          The leading dimension of the array B. LDB >= MAX(1,M,N).
 *> \endverbatim
 *>
 *> \param[out] WORK
 *> \verbatim
 *>          WORK is COMPLEX*16 array, dimension (MAX(1,LWORK))
-*>          On exit, if INFO=0, WORK(1) returns the optimal LWORK.
+*>          On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
 *> \endverbatim
 *>
 *> \param[in] LWORK
 *> \verbatim
 *>          LWORK is INTEGER
-*>          The dimension of the array WORK. LWORK >= N+1.
-*>          For optimal performance LWORK >= ( N+1 )*NB, where NB
-*>          is the optimal blocksize.
+*>          The dimension of the array WORK.
+*>          LWORK >= max( 1, MN + max( MN, NRHS ) ).
+*>          For optimal performance,
+*>          LWORK >= max( 1, MN + max( MN, NRHS )*NB ).
+*>          where MN = min(M,N) and NB is the optimum block size.
 *>
 *>          If LWORK = -1, then a workspace query is assumed; the routine
 *>          only calculates the optimal size of the WORK array, returns
@@ -4815,312 +5595,422 @@
 *>          message related to LWORK is issued by XERBLA.
 *> \endverbatim
 *>
-*> \param[out] RWORK
-*> \verbatim
-*>          RWORK is DOUBLE PRECISION array, dimension (2*N)
-*> \endverbatim
-*>
 *> \param[out] INFO
 *> \verbatim
 *>          INFO is INTEGER
-*>          = 0: successful exit.
-*>          < 0: if INFO = -i, the i-th argument had an illegal value.
+*>          = 0:  successful exit
+*>          < 0:  if INFO = -i, the i-th argument had an illegal value
+*>          > 0:  if INFO =  i, the i-th diagonal element of the
+*>                triangular factor of A is zero, so that A does not have
+*>                full rank; the least squares solution could not be
+*>                computed.
 *> \endverbatim
 *
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date September 2012
-*
-*> \ingroup complex16GEcomputational
+*> \date December 2016
 *
-*> \par Further Details:
-*  =====================
-*>
-*> \verbatim
-*>
-*>  The matrix Q is represented as a product of elementary reflectors
-*>
-*>     Q = H(1) H(2) . . . H(k), where k = min(m,n).
-*>
-*>  Each H(i) has the form
-*>
-*>     H(i) = I - tau * v * v**H
-*>
-*>  where tau is a complex scalar, and v is a real/complex vector
-*>  with v(1:i-1) = 0 and v(i) = 1; v(i+1:m) is stored on exit in
-*>  A(i+1:m,i), and tau in TAU(i).
-*> \endverbatim
+*> \ingroup complex16GEsolve
 *
-*> \par Contributors:
-*  ==================
-*>
-*>    G. Quintana-Orti, Depto. de Informatica, Universidad Jaime I, Spain
-*>    X. Sun, Computer Science Dept., Duke University, USA
-*>
 *  =====================================================================
-      SUBROUTINE ZGEQP3( M, N, A, LDA, JPVT, TAU, WORK, LWORK, RWORK,
-     $                   INFO )
+      SUBROUTINE ZGELS( TRANS, M, N, NRHS, A, LDA, B, LDB, WORK, LWORK,
+     $                  INFO )
 *
-*  -- LAPACK computational routine (version 3.4.2) --
+*  -- LAPACK driver routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     September 2012
+*     December 2016
 *
 *     .. Scalar Arguments ..
-      INTEGER            INFO, LDA, LWORK, M, N
+      CHARACTER          TRANS
+      INTEGER            INFO, LDA, LDB, LWORK, M, N, NRHS
 *     ..
 *     .. Array Arguments ..
-      INTEGER            JPVT( * )
-      DOUBLE PRECISION   RWORK( * )
-      COMPLEX*16         A( LDA, * ), TAU( * ), WORK( * )
+      COMPLEX*16         A( LDA, * ), B( LDB, * ), WORK( * )
 *     ..
 *
 *  =====================================================================
 *
 *     .. Parameters ..
-      INTEGER            INB, INBMIN, IXOVER
-      PARAMETER          ( INB = 1, INBMIN = 2, IXOVER = 3 )
+      DOUBLE PRECISION   ZERO, ONE
+      PARAMETER          ( ZERO = 0.0D+0, ONE = 1.0D+0 )
+      COMPLEX*16         CZERO
+      PARAMETER          ( CZERO = ( 0.0D+0, 0.0D+0 ) )
 *     ..
 *     .. Local Scalars ..
-      LOGICAL            LQUERY
-      INTEGER            FJB, IWS, J, JB, LWKOPT, MINMN, MINWS, NA, NB,
-     $                   NBMIN, NFXD, NX, SM, SMINMN, SN, TOPBMN
+      LOGICAL            LQUERY, TPSD
+      INTEGER            BROW, I, IASCL, IBSCL, J, MN, NB, SCLLEN, WSIZE
+      DOUBLE PRECISION   ANRM, BIGNUM, BNRM, SMLNUM
 *     ..
-*     .. External Subroutines ..
-      EXTERNAL           XERBLA, ZGEQRF, ZLAQP2, ZLAQPS, ZSWAP, ZUNMQR
+*     .. Local Arrays ..
+      DOUBLE PRECISION   RWORK( 1 )
 *     ..
 *     .. External Functions ..
+      LOGICAL            LSAME
       INTEGER            ILAENV
-      DOUBLE PRECISION   DZNRM2
-      EXTERNAL           ILAENV, DZNRM2
+      DOUBLE PRECISION   DLAMCH, ZLANGE
+      EXTERNAL           LSAME, ILAENV, DLAMCH, ZLANGE
+*     ..
+*     .. External Subroutines ..
+      EXTERNAL           DLABAD, XERBLA, ZGELQF, ZGEQRF, ZLASCL, ZLASET,
+     $                   ZTRTRS, ZUNMLQ, ZUNMQR
 *     ..
 *     .. Intrinsic Functions ..
-      INTRINSIC          INT, MAX, MIN
+      INTRINSIC          DBLE, MAX, MIN
 *     ..
 *     .. Executable Statements ..
 *
-*     Test input arguments
-*  ====================
+*     Test the input arguments.
 *
       INFO = 0
+      MN = MIN( M, N )
       LQUERY = ( LWORK.EQ.-1 )
-      IF( M.LT.0 ) THEN
+      IF( .NOT.( LSAME( TRANS, 'N' ) .OR. LSAME( TRANS, 'C' ) ) ) THEN
          INFO = -1
-      ELSE IF( N.LT.0 ) THEN
+      ELSE IF( M.LT.0 ) THEN
          INFO = -2
-      ELSE IF( LDA.LT.MAX( 1, M ) ) THEN
+      ELSE IF( N.LT.0 ) THEN
+         INFO = -3
+      ELSE IF( NRHS.LT.0 ) THEN
          INFO = -4
+      ELSE IF( LDA.LT.MAX( 1, M ) ) THEN
+         INFO = -6
+      ELSE IF( LDB.LT.MAX( 1, M, N ) ) THEN
+         INFO = -8
+      ELSE IF( LWORK.LT.MAX( 1, MN+MAX( MN, NRHS ) ) .AND. .NOT.LQUERY )
+     $          THEN
+         INFO = -10
       END IF
 *
-      IF( INFO.EQ.0 ) THEN
-         MINMN = MIN( M, N )
-         IF( MINMN.EQ.0 ) THEN
-            IWS = 1
-            LWKOPT = 1
+*     Figure out optimal block size
+*
+      IF( INFO.EQ.0 .OR. INFO.EQ.-10 ) THEN
+*
+         TPSD = .TRUE.
+         IF( LSAME( TRANS, 'N' ) )
+     $      TPSD = .FALSE.
+*
+         IF( M.GE.N ) THEN
+            NB = ILAENV( 1, 'ZGEQRF', ' ', M, N, -1, -1 )
+            IF( TPSD ) THEN
+               NB = MAX( NB, ILAENV( 1, 'ZUNMQR', 'LN', M, NRHS, N,
+     $              -1 ) )
+            ELSE
+               NB = MAX( NB, ILAENV( 1, 'ZUNMQR', 'LC', M, NRHS, N,
+     $              -1 ) )
+            END IF
          ELSE
-            IWS = N + 1
-            NB = ILAENV( INB, 'ZGEQRF', ' ', M, N, -1, -1 )
-            LWKOPT = ( N + 1 )*NB
+            NB = ILAENV( 1, 'ZGELQF', ' ', M, N, -1, -1 )
+            IF( TPSD ) THEN
+               NB = MAX( NB, ILAENV( 1, 'ZUNMLQ', 'LC', N, NRHS, M,
+     $              -1 ) )
+            ELSE
+               NB = MAX( NB, ILAENV( 1, 'ZUNMLQ', 'LN', N, NRHS, M,
+     $              -1 ) )
+            END IF
          END IF
-         WORK( 1 ) = LWKOPT
 *
-         IF( ( LWORK.LT.IWS ) .AND. .NOT.LQUERY ) THEN
-            INFO = -8
-         END IF
+         WSIZE = MAX( 1, MN+MAX( MN, NRHS )*NB )
+         WORK( 1 ) = DBLE( WSIZE )
+*
       END IF
 *
       IF( INFO.NE.0 ) THEN
-         CALL XERBLA( 'ZGEQP3', -INFO )
+         CALL XERBLA( 'ZGELS ', -INFO )
          RETURN
       ELSE IF( LQUERY ) THEN
          RETURN
       END IF
 *
-*     Quick return if possible.
+*     Quick return if possible
 *
-      IF( MINMN.EQ.0 ) THEN
+      IF( MIN( M, N, NRHS ).EQ.0 ) THEN
+         CALL ZLASET( 'Full', MAX( M, N ), NRHS, CZERO, CZERO, B, LDB )
          RETURN
       END IF
 *
-*     Move initial columns up front.
+*     Get machine parameters
 *
-      NFXD = 1
-      DO 10 J = 1, N
-         IF( JPVT( J ).NE.0 ) THEN
-            IF( J.NE.NFXD ) THEN
-               CALL ZSWAP( M, A( 1, J ), 1, A( 1, NFXD ), 1 )
-               JPVT( J ) = JPVT( NFXD )
-               JPVT( NFXD ) = J
-            ELSE
-               JPVT( J ) = J
-            END IF
-            NFXD = NFXD + 1
-         ELSE
-            JPVT( J ) = J
-         END IF
-   10 CONTINUE
-      NFXD = NFXD - 1
+      SMLNUM = DLAMCH( 'S' ) / DLAMCH( 'P' )
+      BIGNUM = ONE / SMLNUM
+      CALL DLABAD( SMLNUM, BIGNUM )
 *
-*     Factorize fixed columns
-*  =======================
+*     Scale A, B if max element outside range [SMLNUM,BIGNUM]
 *
-*     Compute the QR factorization of fixed columns and update
-*     remaining columns.
+      ANRM = ZLANGE( 'M', M, N, A, LDA, RWORK )
+      IASCL = 0
+      IF( ANRM.GT.ZERO .AND. ANRM.LT.SMLNUM ) THEN
 *
-      IF( NFXD.GT.0 ) THEN
-         NA = MIN( M, NFXD )
-*CC      CALL ZGEQR2( M, NA, A, LDA, TAU, WORK, INFO )
-         CALL ZGEQRF( M, NA, A, LDA, TAU, WORK, LWORK, INFO )
-         IWS = MAX( IWS, INT( WORK( 1 ) ) )
-         IF( NA.LT.N ) THEN
-*CC         CALL ZUNM2R( 'Left', 'Conjugate Transpose', M, N-NA,
-*CC  $                   NA, A, LDA, TAU, A( 1, NA+1 ), LDA, WORK,
-*CC  $                   INFO )
-            CALL ZUNMQR( 'Left', 'Conjugate Transpose', M, N-NA, NA, A,
-     $                   LDA, TAU, A( 1, NA+1 ), LDA, WORK, LWORK,
-     $                   INFO )
-            IWS = MAX( IWS, INT( WORK( 1 ) ) )
-         END IF
+*        Scale matrix norm up to SMLNUM
+*
+         CALL ZLASCL( 'G', 0, 0, ANRM, SMLNUM, M, N, A, LDA, INFO )
+         IASCL = 1
+      ELSE IF( ANRM.GT.BIGNUM ) THEN
+*
+*        Scale matrix norm down to BIGNUM
+*
+         CALL ZLASCL( 'G', 0, 0, ANRM, BIGNUM, M, N, A, LDA, INFO )
+         IASCL = 2
+      ELSE IF( ANRM.EQ.ZERO ) THEN
+*
+*        Matrix all zero. Return zero solution.
+*
+         CALL ZLASET( 'F', MAX( M, N ), NRHS, CZERO, CZERO, B, LDB )
+         GO TO 50
       END IF
 *
-*     Factorize free columns
-*  ======================
+      BROW = M
+      IF( TPSD )
+     $   BROW = N
+      BNRM = ZLANGE( 'M', BROW, NRHS, B, LDB, RWORK )
+      IBSCL = 0
+      IF( BNRM.GT.ZERO .AND. BNRM.LT.SMLNUM ) THEN
 *
-      IF( NFXD.LT.MINMN ) THEN
+*        Scale matrix norm up to SMLNUM
 *
-         SM = M - NFXD
-         SN = N - NFXD
-         SMINMN = MINMN - NFXD
+         CALL ZLASCL( 'G', 0, 0, BNRM, SMLNUM, BROW, NRHS, B, LDB,
+     $                INFO )
+         IBSCL = 1
+      ELSE IF( BNRM.GT.BIGNUM ) THEN
 *
-*        Determine the block size.
+*        Scale matrix norm down to BIGNUM
 *
-         NB = ILAENV( INB, 'ZGEQRF', ' ', SM, SN, -1, -1 )
-         NBMIN = 2
-         NX = 0
+         CALL ZLASCL( 'G', 0, 0, BNRM, BIGNUM, BROW, NRHS, B, LDB,
+     $                INFO )
+         IBSCL = 2
+      END IF
 *
-         IF( ( NB.GT.1 ) .AND. ( NB.LT.SMINMN ) ) THEN
+      IF( M.GE.N ) THEN
 *
-*           Determine when to cross over from blocked to unblocked code.
+*        compute QR factorization of A
 *
-            NX = MAX( 0, ILAENV( IXOVER, 'ZGEQRF', ' ', SM, SN, -1,
-     $           -1 ) )
+         CALL ZGEQRF( M, N, A, LDA, WORK( 1 ), WORK( MN+1 ), LWORK-MN,
+     $                INFO )
 *
+*        workspace at least N, optimally N*NB
 *
-            IF( NX.LT.SMINMN ) THEN
+         IF( .NOT.TPSD ) THEN
 *
-*              Determine if workspace is large enough for blocked code.
+*           Least-Squares Problem min || A * X - B ||
 *
-               MINWS = ( SN+1 )*NB
-               IWS = MAX( IWS, MINWS )
-               IF( LWORK.LT.MINWS ) THEN
+*           B(1:M,1:NRHS) := Q**H * B(1:M,1:NRHS)
 *
-*                 Not enough workspace to use optimal NB: Reduce NB and
-*                 determine the minimum value of NB.
+            CALL ZUNMQR( 'Left', 'Conjugate transpose', M, NRHS, N, A,
+     $                   LDA, WORK( 1 ), B, LDB, WORK( MN+1 ), LWORK-MN,
+     $                   INFO )
 *
-                  NB = LWORK / ( SN+1 )
-                  NBMIN = MAX( 2, ILAENV( INBMIN, 'ZGEQRF', ' ', SM, SN,
-     $                    -1, -1 ) )
+*           workspace at least NRHS, optimally NRHS*NB
 *
+*           B(1:N,1:NRHS) := inv(R) * B(1:N,1:NRHS)
 *
-               END IF
+            CALL ZTRTRS( 'Upper', 'No transpose', 'Non-unit', N, NRHS,
+     $                   A, LDA, B, LDB, INFO )
+*
+            IF( INFO.GT.0 ) THEN
+               RETURN
             END IF
-         END IF
 *
-*        Initialize partial column norms. The first N elements of work
-*        store the exact column norms.
+            SCLLEN = N
 *
-         DO 20 J = NFXD + 1, N
-            RWORK( J ) = DZNRM2( SM, A( NFXD+1, J ), 1 )
-            RWORK( N+J ) = RWORK( J )
-   20    CONTINUE
+         ELSE
 *
-         IF( ( NB.GE.NBMIN ) .AND. ( NB.LT.SMINMN ) .AND.
-     $       ( NX.LT.SMINMN ) ) THEN
+*           Underdetermined system of equations A**T * X = B
 *
-*           Use blocked code initially.
+*           B(1:N,1:NRHS) := inv(R**H) * B(1:N,1:NRHS)
 *
-            J = NFXD + 1
+            CALL ZTRTRS( 'Upper', 'Conjugate transpose','Non-unit',
+     $                   N, NRHS, A, LDA, B, LDB, INFO )
 *
-*           Compute factorization: while loop.
+            IF( INFO.GT.0 ) THEN
+               RETURN
+            END IF
 *
+*           B(N+1:M,1:NRHS) = ZERO
 *
-            TOPBMN = MINMN - NX
-   30       CONTINUE
-            IF( J.LE.TOPBMN ) THEN
-               JB = MIN( NB, TOPBMN-J+1 )
+            DO 20 J = 1, NRHS
+               DO 10 I = N + 1, M
+                  B( I, J ) = CZERO
+   10          CONTINUE
+   20       CONTINUE
 *
-*              Factorize JB columns among columns J:N.
+*           B(1:M,1:NRHS) := Q(1:N,:) * B(1:N,1:NRHS)
 *
-               CALL ZLAQPS( M, N-J+1, J-1, JB, FJB, A( 1, J ), LDA,
-     $                      JPVT( J ), TAU( J ), RWORK( J ),
-     $                      RWORK( N+J ), WORK( 1 ), WORK( JB+1 ),
-     $                      N-J+1 )
+            CALL ZUNMQR( 'Left', 'No transpose', M, NRHS, N, A, LDA,
+     $                   WORK( 1 ), B, LDB, WORK( MN+1 ), LWORK-MN,
+     $                   INFO )
 *
-               J = J + FJB
-               GO TO 30
+*           workspace at least NRHS, optimally NRHS*NB
+*
+            SCLLEN = M
+*
+         END IF
+*
+      ELSE
+*
+*        Compute LQ factorization of A
+*
+         CALL ZGELQF( M, N, A, LDA, WORK( 1 ), WORK( MN+1 ), LWORK-MN,
+     $                INFO )
+*
+*        workspace at least M, optimally M*NB.
+*
+         IF( .NOT.TPSD ) THEN
+*
+*           underdetermined system of equations A * X = B
+*
+*           B(1:M,1:NRHS) := inv(L) * B(1:M,1:NRHS)
+*
+            CALL ZTRTRS( 'Lower', 'No transpose', 'Non-unit', M, NRHS,
+     $                   A, LDA, B, LDB, INFO )
+*
+            IF( INFO.GT.0 ) THEN
+               RETURN
             END IF
+*
+*           B(M+1:N,1:NRHS) = 0
+*
+            DO 40 J = 1, NRHS
+               DO 30 I = M + 1, N
+                  B( I, J ) = CZERO
+   30          CONTINUE
+   40       CONTINUE
+*
+*           B(1:N,1:NRHS) := Q(1:N,:)**H * B(1:M,1:NRHS)
+*
+            CALL ZUNMLQ( 'Left', 'Conjugate transpose', N, NRHS, M, A,
+     $                   LDA, WORK( 1 ), B, LDB, WORK( MN+1 ), LWORK-MN,
+     $                   INFO )
+*
+*           workspace at least NRHS, optimally NRHS*NB
+*
+            SCLLEN = N
+*
          ELSE
-            J = NFXD + 1
-         END IF
 *
-*        Use unblocked code to factor the last or only block.
+*           overdetermined system min || A**H * X - B ||
 *
+*           B(1:N,1:NRHS) := Q * B(1:N,1:NRHS)
 *
-         IF( J.LE.MINMN )
-     $      CALL ZLAQP2( M, N-J+1, J-1, A( 1, J ), LDA, JPVT( J ),
-     $                   TAU( J ), RWORK( J ), RWORK( N+J ), WORK( 1 ) )
+            CALL ZUNMLQ( 'Left', 'No transpose', N, NRHS, M, A, LDA,
+     $                   WORK( 1 ), B, LDB, WORK( MN+1 ), LWORK-MN,
+     $                   INFO )
+*
+*           workspace at least NRHS, optimally NRHS*NB
+*
+*           B(1:M,1:NRHS) := inv(L**H) * B(1:M,1:NRHS)
+*
+            CALL ZTRTRS( 'Lower', 'Conjugate transpose', 'Non-unit',
+     $                   M, NRHS, A, LDA, B, LDB, INFO )
+*
+            IF( INFO.GT.0 ) THEN
+               RETURN
+            END IF
+*
+            SCLLEN = M
+*
+         END IF
 *
       END IF
 *
-      WORK( 1 ) = IWS
+*     Undo scaling
+*
+      IF( IASCL.EQ.1 ) THEN
+         CALL ZLASCL( 'G', 0, 0, ANRM, SMLNUM, SCLLEN, NRHS, B, LDB,
+     $                INFO )
+      ELSE IF( IASCL.EQ.2 ) THEN
+         CALL ZLASCL( 'G', 0, 0, ANRM, BIGNUM, SCLLEN, NRHS, B, LDB,
+     $                INFO )
+      END IF
+      IF( IBSCL.EQ.1 ) THEN
+         CALL ZLASCL( 'G', 0, 0, SMLNUM, BNRM, SCLLEN, NRHS, B, LDB,
+     $                INFO )
+      ELSE IF( IBSCL.EQ.2 ) THEN
+         CALL ZLASCL( 'G', 0, 0, BIGNUM, BNRM, SCLLEN, NRHS, B, LDB,
+     $                INFO )
+      END IF
+*
+   50 CONTINUE
+      WORK( 1 ) = DBLE( WSIZE )
+*
       RETURN
 *
-*     End of ZGEQP3
+*     End of ZGELS
 *
       END
-*> \brief \b ZGEQR2 computes the QR factorization of a general rectangular matrix using an unblocked algorithm.
+*> \brief <b> ZGELSD computes the minimum-norm solution to a linear least squares problem for GE matrices</b>
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download ZGEQR2 + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/zgeqr2.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/zgeqr2.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/zgeqr2.f"> 
+*> Download ZGELSD + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/zgelsd.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/zgelsd.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/zgelsd.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
-*       SUBROUTINE ZGEQR2( M, N, A, LDA, TAU, WORK, INFO )
-* 
+*       SUBROUTINE ZGELSD( M, N, NRHS, A, LDA, B, LDB, S, RCOND, RANK,
+*                          WORK, LWORK, RWORK, IWORK, INFO )
+*
 *       .. Scalar Arguments ..
-*       INTEGER            INFO, LDA, M, N
+*       INTEGER            INFO, LDA, LDB, LWORK, M, N, NRHS, RANK
+*       DOUBLE PRECISION   RCOND
 *       ..
 *       .. Array Arguments ..
-*       COMPLEX*16         A( LDA, * ), TAU( * ), WORK( * )
+*       INTEGER            IWORK( * )
+*       DOUBLE PRECISION   RWORK( * ), S( * )
+*       COMPLEX*16         A( LDA, * ), B( LDB, * ), WORK( * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
 *>
 *> \verbatim
 *>
-*> ZGEQR2 computes a QR factorization of a complex m by n matrix A:
-*> A = Q * R.
+*> ZGELSD computes the minimum-norm solution to a real linear least
+*> squares problem:
+*>     minimize 2-norm(| b - A*x |)
+*> using the singular value decomposition (SVD) of A. A is an M-by-N
+*> matrix which may be rank-deficient.
+*>
+*> Several right hand side vectors b and solution vectors x can be
+*> handled in a single call; they are stored as the columns of the
+*> M-by-NRHS right hand side matrix B and the N-by-NRHS solution
+*> matrix X.
+*>
+*> The problem is solved in three steps:
+*> (1) Reduce the coefficient matrix A to bidiagonal form with
+*>     Householder transformations, reducing the original problem
+*>     into a "bidiagonal least squares problem" (BLS)
+*> (2) Solve the BLS using a divide and conquer approach.
+*> (3) Apply back all the Householder transformations to solve
+*>     the original least squares problem.
+*>
+*> The effective rank of A is determined by treating as zero those
+*> singular values which are less than RCOND times the largest singular
+*> value.
+*>
+*> The divide and conquer algorithm makes very mild assumptions about
+*> floating point arithmetic. It will work on machines with a guard
+*> digit in add/subtract, or on those binary machines without guard
+*> digits which subtract like the Cray X-MP, Cray Y-MP, Cray C-90, or
+*> Cray-2. It could conceivably fail on hexadecimal or decimal machines
+*> without guard digits, but we know of none.
 *> \endverbatim
 *
 *  Arguments:
@@ -5129,774 +6019,697 @@
 *> \param[in] M
 *> \verbatim
 *>          M is INTEGER
-*>          The number of rows of the matrix A.  M >= 0.
+*>          The number of rows of the matrix A. M >= 0.
 *> \endverbatim
 *>
 *> \param[in] N
 *> \verbatim
 *>          N is INTEGER
-*>          The number of columns of the matrix A.  N >= 0.
+*>          The number of columns of the matrix A. N >= 0.
 *> \endverbatim
 *>
-*> \param[in,out] A
+*> \param[in] NRHS
+*> \verbatim
+*>          NRHS is INTEGER
+*>          The number of right hand sides, i.e., the number of columns
+*>          of the matrices B and X. NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
 *> \verbatim
 *>          A is COMPLEX*16 array, dimension (LDA,N)
-*>          On entry, the m by n matrix A.
-*>          On exit, the elements on and above the diagonal of the array
-*>          contain the min(m,n) by n upper trapezoidal matrix R (R is
-*>          upper triangular if m >= n); the elements below the diagonal,
-*>          with the array TAU, represent the unitary matrix Q as a
-*>          product of elementary reflectors (see Further Details).
+*>          On entry, the M-by-N matrix A.
+*>          On exit, A has been destroyed.
 *> \endverbatim
 *>
 *> \param[in] LDA
 *> \verbatim
 *>          LDA is INTEGER
-*>          The leading dimension of the array A.  LDA >= max(1,M).
+*>          The leading dimension of the array A. LDA >= max(1,M).
 *> \endverbatim
 *>
-*> \param[out] TAU
+*> \param[in,out] B
 *> \verbatim
-*>          TAU is COMPLEX*16 array, dimension (min(M,N))
-*>          The scalar factors of the elementary reflectors (see Further
-*>          Details).
+*>          B is COMPLEX*16 array, dimension (LDB,NRHS)
+*>          On entry, the M-by-NRHS right hand side matrix B.
+*>          On exit, B is overwritten by the N-by-NRHS solution matrix X.
+*>          If m >= n and RANK = n, the residual sum-of-squares for
+*>          the solution in the i-th column is given by the sum of
+*>          squares of the modulus of elements n+1:m in that column.
 *> \endverbatim
 *>
-*> \param[out] WORK
+*> \param[in] LDB
 *> \verbatim
-*>          WORK is COMPLEX*16 array, dimension (N)
+*>          LDB is INTEGER
+*>          The leading dimension of the array B.  LDB >= max(1,M,N).
 *> \endverbatim
 *>
-*> \param[out] INFO
+*> \param[out] S
 *> \verbatim
-*>          INFO is INTEGER
-*>          = 0: successful exit
-*>          < 0: if INFO = -i, the i-th argument had an illegal value
+*>          S is DOUBLE PRECISION array, dimension (min(M,N))
+*>          The singular values of A in decreasing order.
+*>          The condition number of A in the 2-norm = S(1)/S(min(m,n)).
 *> \endverbatim
-*
-*  Authors:
-*  ========
-*
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
-*
-*> \date September 2012
-*
-*> \ingroup complex16GEcomputational
-*
-*> \par Further Details:
-*  =====================
 *>
+*> \param[in] RCOND
 *> \verbatim
+*>          RCOND is DOUBLE PRECISION
+*>          RCOND is used to determine the effective rank of A.
+*>          Singular values S(i) <= RCOND*S(1) are treated as zero.
+*>          If RCOND < 0, machine precision is used instead.
+*> \endverbatim
 *>
-*>  The matrix Q is represented as a product of elementary reflectors
-*>
-*>     Q = H(1) H(2) . . . H(k), where k = min(m,n).
+*> \param[out] RANK
+*> \verbatim
+*>          RANK is INTEGER
+*>          The effective rank of A, i.e., the number of singular values
+*>          which are greater than RCOND*S(1).
+*> \endverbatim
 *>
-*>  Each H(i) has the form
+*> \param[out] WORK
+*> \verbatim
+*>          WORK is COMPLEX*16 array, dimension (MAX(1,LWORK))
+*>          On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+*> \endverbatim
 *>
-*>     H(i) = I - tau * v * v**H
+*> \param[in] LWORK
+*> \verbatim
+*>          LWORK is INTEGER
+*>          The dimension of the array WORK. LWORK must be at least 1.
+*>          The exact minimum amount of workspace needed depends on M,
+*>          N and NRHS. As long as LWORK is at least
+*>              2*N + N*NRHS
+*>          if M is greater than or equal to N or
+*>              2*M + M*NRHS
+*>          if M is less than N, the code will execute correctly.
+*>          For good performance, LWORK should generally be larger.
 *>
-*>  where tau is a complex scalar, and v is a complex vector with
-*>  v(1:i-1) = 0 and v(i) = 1; v(i+1:m) is stored on exit in A(i+1:m,i),
-*>  and tau in TAU(i).
+*>          If LWORK = -1, then a workspace query is assumed; the routine
+*>          only calculates the optimal size of the array WORK and the
+*>          minimum sizes of the arrays RWORK and IWORK, and returns
+*>          these values as the first entries of the WORK, RWORK and
+*>          IWORK arrays, and no error message related to LWORK is issued
+*>          by XERBLA.
 *> \endverbatim
 *>
-*  =====================================================================
-      SUBROUTINE ZGEQR2( M, N, A, LDA, TAU, WORK, INFO )
-*
-*  -- LAPACK computational routine (version 3.4.2) --
-*  -- LAPACK is a software package provided by Univ. of Tennessee,    --
-*  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     September 2012
-*
-*     .. Scalar Arguments ..
-      INTEGER            INFO, LDA, M, N
-*     ..
-*     .. Array Arguments ..
-      COMPLEX*16         A( LDA, * ), TAU( * ), WORK( * )
-*     ..
-*
-*  =====================================================================
-*
-*     .. Parameters ..
-      COMPLEX*16         ONE
-      PARAMETER          ( ONE = ( 1.0D+0, 0.0D+0 ) )
-*     ..
-*     .. Local Scalars ..
-      INTEGER            I, K
-      COMPLEX*16         ALPHA
-*     ..
-*     .. External Subroutines ..
-      EXTERNAL           XERBLA, ZLARF, ZLARFG
-*     ..
-*     .. Intrinsic Functions ..
-      INTRINSIC          DCONJG, MAX, MIN
-*     ..
-*     .. Executable Statements ..
-*
-*     Test the input arguments
-*
-      INFO = 0
-      IF( M.LT.0 ) THEN
-         INFO = -1
-      ELSE IF( N.LT.0 ) THEN
-         INFO = -2
-      ELSE IF( LDA.LT.MAX( 1, M ) ) THEN
-         INFO = -4
-      END IF
-      IF( INFO.NE.0 ) THEN
-         CALL XERBLA( 'ZGEQR2', -INFO )
-         RETURN
-      END IF
-*
-      K = MIN( M, N )
-*
-      DO 10 I = 1, K
-*
-*        Generate elementary reflector H(i) to annihilate A(i+1:m,i)
-*
-         CALL ZLARFG( M-I+1, A( I, I ), A( MIN( I+1, M ), I ), 1,
-     $                TAU( I ) )
-         IF( I.LT.N ) THEN
-*
-*           Apply H(i)**H to A(i:m,i+1:n) from the left
-*
-            ALPHA = A( I, I )
-            A( I, I ) = ONE
-            CALL ZLARF( 'Left', M-I+1, N-I, A( I, I ), 1,
-     $                  DCONJG( TAU( I ) ), A( I, I+1 ), LDA, WORK )
-            A( I, I ) = ALPHA
-         END IF
-   10 CONTINUE
-      RETURN
-*
-*     End of ZGEQR2
-*
-      END
-*> \brief \b ZGEQRF
-*
-*  =========== DOCUMENTATION ===========
-*
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
-*
-*> \htmlonly
-*> Download ZGEQRF + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/zgeqrf.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/zgeqrf.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/zgeqrf.f"> 
-*> [TXT]</a>
-*> \endhtmlonly 
-*
-*  Definition:
-*  ===========
-*
-*       SUBROUTINE ZGEQRF( M, N, A, LDA, TAU, WORK, LWORK, INFO )
-* 
-*       .. Scalar Arguments ..
-*       INTEGER            INFO, LDA, LWORK, M, N
-*       ..
-*       .. Array Arguments ..
-*       COMPLEX*16         A( LDA, * ), TAU( * ), WORK( * )
-*       ..
-*  
-*
-*> \par Purpose:
-*  =============
-*>
-*> \verbatim
-*>
-*> ZGEQRF computes a QR factorization of a complex M-by-N matrix A:
-*> A = Q * R.
-*> \endverbatim
-*
-*  Arguments:
-*  ==========
-*
-*> \param[in] M
-*> \verbatim
-*>          M is INTEGER
-*>          The number of rows of the matrix A.  M >= 0.
-*> \endverbatim
-*>
-*> \param[in] N
-*> \verbatim
-*>          N is INTEGER
-*>          The number of columns of the matrix A.  N >= 0.
-*> \endverbatim
-*>
-*> \param[in,out] A
-*> \verbatim
-*>          A is COMPLEX*16 array, dimension (LDA,N)
-*>          On entry, the M-by-N matrix A.
-*>          On exit, the elements on and above the diagonal of the array
-*>          contain the min(M,N)-by-N upper trapezoidal matrix R (R is
-*>          upper triangular if m >= n); the elements below the diagonal,
-*>          with the array TAU, represent the unitary matrix Q as a
-*>          product of min(m,n) elementary reflectors (see Further
-*>          Details).
-*> \endverbatim
-*>
-*> \param[in] LDA
-*> \verbatim
-*>          LDA is INTEGER
-*>          The leading dimension of the array A.  LDA >= max(1,M).
-*> \endverbatim
-*>
-*> \param[out] TAU
-*> \verbatim
-*>          TAU is COMPLEX*16 array, dimension (min(M,N))
-*>          The scalar factors of the elementary reflectors (see Further
-*>          Details).
-*> \endverbatim
-*>
-*> \param[out] WORK
+*> \param[out] RWORK
 *> \verbatim
-*>          WORK is COMPLEX*16 array, dimension (MAX(1,LWORK))
-*>          On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+*>          RWORK is DOUBLE PRECISION array, dimension (MAX(1,LRWORK))
+*>          LRWORK >=
+*>             10*N + 2*N*SMLSIZ + 8*N*NLVL + 3*SMLSIZ*NRHS +
+*>             MAX( (SMLSIZ+1)**2, N*(1+NRHS) + 2*NRHS )
+*>          if M is greater than or equal to N or
+*>             10*M + 2*M*SMLSIZ + 8*M*NLVL + 3*SMLSIZ*NRHS +
+*>             MAX( (SMLSIZ+1)**2, N*(1+NRHS) + 2*NRHS )
+*>          if M is less than N, the code will execute correctly.
+*>          SMLSIZ is returned by ILAENV and is equal to the maximum
+*>          size of the subproblems at the bottom of the computation
+*>          tree (usually about 25), and
+*>             NLVL = MAX( 0, INT( LOG_2( MIN( M,N )/(SMLSIZ+1) ) ) + 1 )
+*>          On exit, if INFO = 0, RWORK(1) returns the minimum LRWORK.
 *> \endverbatim
 *>
-*> \param[in] LWORK
+*> \param[out] IWORK
 *> \verbatim
-*>          LWORK is INTEGER
-*>          The dimension of the array WORK.  LWORK >= max(1,N).
-*>          For optimum performance LWORK >= N*NB, where NB is
-*>          the optimal blocksize.
-*>
-*>          If LWORK = -1, then a workspace query is assumed; the routine
-*>          only calculates the optimal size of the WORK array, returns
-*>          this value as the first entry of the WORK array, and no error
-*>          message related to LWORK is issued by XERBLA.
+*>          IWORK is INTEGER array, dimension (MAX(1,LIWORK))
+*>          LIWORK >= max(1, 3*MINMN*NLVL + 11*MINMN),
+*>          where MINMN = MIN( M,N ).
+*>          On exit, if INFO = 0, IWORK(1) returns the minimum LIWORK.
 *> \endverbatim
 *>
 *> \param[out] INFO
 *> \verbatim
 *>          INFO is INTEGER
-*>          = 0:  successful exit
-*>          < 0:  if INFO = -i, the i-th argument had an illegal value
+*>          = 0: successful exit
+*>          < 0: if INFO = -i, the i-th argument had an illegal value.
+*>          > 0:  the algorithm for computing the SVD failed to converge;
+*>                if INFO = i, i off-diagonal elements of an intermediate
+*>                bidiagonal form did not converge to zero.
 *> \endverbatim
 *
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date November 2011
+*> \date December 2016
 *
-*> \ingroup complex16GEcomputational
+*> \ingroup complex16GEsolve
 *
-*> \par Further Details:
-*  =====================
-*>
-*> \verbatim
-*>
-*>  The matrix Q is represented as a product of elementary reflectors
-*>
-*>     Q = H(1) H(2) . . . H(k), where k = min(m,n).
-*>
-*>  Each H(i) has the form
-*>
-*>     H(i) = I - tau * v * v**H
-*>
-*>  where tau is a complex scalar, and v is a complex vector with
-*>  v(1:i-1) = 0 and v(i) = 1; v(i+1:m) is stored on exit in A(i+1:m,i),
-*>  and tau in TAU(i).
-*> \endverbatim
+*> \par Contributors:
+*  ==================
 *>
+*>     Ming Gu and Ren-Cang Li, Computer Science Division, University of
+*>       California at Berkeley, USA \n
+*>     Osni Marques, LBNL/NERSC, USA \n
+*
 *  =====================================================================
-      SUBROUTINE ZGEQRF( M, N, A, LDA, TAU, WORK, LWORK, INFO )
+      SUBROUTINE ZGELSD( M, N, NRHS, A, LDA, B, LDB, S, RCOND, RANK,
+     $                   WORK, LWORK, RWORK, IWORK, INFO )
 *
-*  -- LAPACK computational routine (version 3.4.0) --
+*  -- LAPACK driver routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     November 2011
+*     December 2016
 *
 *     .. Scalar Arguments ..
-      INTEGER            INFO, LDA, LWORK, M, N
+      INTEGER            INFO, LDA, LDB, LWORK, M, N, NRHS, RANK
+      DOUBLE PRECISION   RCOND
 *     ..
 *     .. Array Arguments ..
-      COMPLEX*16         A( LDA, * ), TAU( * ), WORK( * )
+      INTEGER            IWORK( * )
+      DOUBLE PRECISION   RWORK( * ), S( * )
+      COMPLEX*16         A( LDA, * ), B( LDB, * ), WORK( * )
 *     ..
 *
 *  =====================================================================
 *
+*     .. Parameters ..
+      DOUBLE PRECISION   ZERO, ONE, TWO
+      PARAMETER          ( ZERO = 0.0D+0, ONE = 1.0D+0, TWO = 2.0D+0 )
+      COMPLEX*16         CZERO
+      PARAMETER          ( CZERO = ( 0.0D+0, 0.0D+0 ) )
+*     ..
 *     .. Local Scalars ..
       LOGICAL            LQUERY
-      INTEGER            I, IB, IINFO, IWS, K, LDWORK, LWKOPT, NB,
-     $                   NBMIN, NX
+      INTEGER            IASCL, IBSCL, IE, IL, ITAU, ITAUP, ITAUQ,
+     $                   LDWORK, LIWORK, LRWORK, MAXMN, MAXWRK, MINMN,
+     $                   MINWRK, MM, MNTHR, NLVL, NRWORK, NWORK, SMLSIZ
+      DOUBLE PRECISION   ANRM, BIGNUM, BNRM, EPS, SFMIN, SMLNUM
 *     ..
 *     .. External Subroutines ..
-      EXTERNAL           XERBLA, ZGEQR2, ZLARFB, ZLARFT
-*     ..
-*     .. Intrinsic Functions ..
-      INTRINSIC          MAX, MIN
+      EXTERNAL           DLABAD, DLASCL, DLASET, XERBLA, ZGEBRD, ZGELQF,
+     $                   ZGEQRF, ZLACPY, ZLALSD, ZLASCL, ZLASET, ZUNMBR,
+     $                   ZUNMLQ, ZUNMQR
 *     ..
 *     .. External Functions ..
       INTEGER            ILAENV
-      EXTERNAL           ILAENV
+      DOUBLE PRECISION   DLAMCH, ZLANGE
+      EXTERNAL           ILAENV, DLAMCH, ZLANGE
+*     ..
+*     .. Intrinsic Functions ..
+      INTRINSIC          INT, LOG, MAX, MIN, DBLE
 *     ..
 *     .. Executable Statements ..
 *
-*     Test the input arguments
+*     Test the input arguments.
 *
       INFO = 0
-      NB = ILAENV( 1, 'ZGEQRF', ' ', M, N, -1, -1 )
-      LWKOPT = N*NB
-      WORK( 1 ) = LWKOPT
+      MINMN = MIN( M, N )
+      MAXMN = MAX( M, N )
       LQUERY = ( LWORK.EQ.-1 )
       IF( M.LT.0 ) THEN
          INFO = -1
       ELSE IF( N.LT.0 ) THEN
          INFO = -2
+      ELSE IF( NRHS.LT.0 ) THEN
+         INFO = -3
       ELSE IF( LDA.LT.MAX( 1, M ) ) THEN
-         INFO = -4
-      ELSE IF( LWORK.LT.MAX( 1, N ) .AND. .NOT.LQUERY ) THEN
+         INFO = -5
+      ELSE IF( LDB.LT.MAX( 1, MAXMN ) ) THEN
          INFO = -7
       END IF
+*
+*     Compute workspace.
+*     (Note: Comments in the code beginning "Workspace:" describe the
+*     minimal amount of workspace needed at that point in the code,
+*     as well as the preferred amount for good performance.
+*     NB refers to the optimal block size for the immediately
+*     following subroutine, as returned by ILAENV.)
+*
+      IF( INFO.EQ.0 ) THEN
+         MINWRK = 1
+         MAXWRK = 1
+         LIWORK = 1
+         LRWORK = 1
+         IF( MINMN.GT.0 ) THEN
+            SMLSIZ = ILAENV( 9, 'ZGELSD', ' ', 0, 0, 0, 0 )
+            MNTHR = ILAENV( 6, 'ZGELSD', ' ', M, N, NRHS, -1 )
+            NLVL = MAX( INT( LOG( DBLE( MINMN ) / DBLE( SMLSIZ + 1 ) ) /
+     $                  LOG( TWO ) ) + 1, 0 )
+            LIWORK = 3*MINMN*NLVL + 11*MINMN
+            MM = M
+            IF( M.GE.N .AND. M.GE.MNTHR ) THEN
+*
+*              Path 1a - overdetermined, with many more rows than
+*                        columns.
+*
+               MM = N
+               MAXWRK = MAX( MAXWRK, N*ILAENV( 1, 'ZGEQRF', ' ', M, N,
+     $                       -1, -1 ) )
+               MAXWRK = MAX( MAXWRK, NRHS*ILAENV( 1, 'ZUNMQR', 'LC', M,
+     $                       NRHS, N, -1 ) )
+            END IF
+            IF( M.GE.N ) THEN
+*
+*              Path 1 - overdetermined or exactly determined.
+*
+               LRWORK = 10*N + 2*N*SMLSIZ + 8*N*NLVL + 3*SMLSIZ*NRHS +
+     $                  MAX( (SMLSIZ+1)**2, N*(1+NRHS) + 2*NRHS )
+               MAXWRK = MAX( MAXWRK, 2*N + ( MM + N )*ILAENV( 1,
+     $                       'ZGEBRD', ' ', MM, N, -1, -1 ) )
+               MAXWRK = MAX( MAXWRK, 2*N + NRHS*ILAENV( 1, 'ZUNMBR',
+     $                       'QLC', MM, NRHS, N, -1 ) )
+               MAXWRK = MAX( MAXWRK, 2*N + ( N - 1 )*ILAENV( 1,
+     $                       'ZUNMBR', 'PLN', N, NRHS, N, -1 ) )
+               MAXWRK = MAX( MAXWRK, 2*N + N*NRHS )
+               MINWRK = MAX( 2*N + MM, 2*N + N*NRHS )
+            END IF
+            IF( N.GT.M ) THEN
+               LRWORK = 10*M + 2*M*SMLSIZ + 8*M*NLVL + 3*SMLSIZ*NRHS +
+     $                  MAX( (SMLSIZ+1)**2, N*(1+NRHS) + 2*NRHS )
+               IF( N.GE.MNTHR ) THEN
+*
+*                 Path 2a - underdetermined, with many more columns
+*                           than rows.
+*
+                  MAXWRK = M + M*ILAENV( 1, 'ZGELQF', ' ', M, N, -1,
+     $                     -1 )
+                  MAXWRK = MAX( MAXWRK, M*M + 4*M + 2*M*ILAENV( 1,
+     $                          'ZGEBRD', ' ', M, M, -1, -1 ) )
+                  MAXWRK = MAX( MAXWRK, M*M + 4*M + NRHS*ILAENV( 1,
+     $                          'ZUNMBR', 'QLC', M, NRHS, M, -1 ) )
+                  MAXWRK = MAX( MAXWRK, M*M + 4*M + ( M - 1 )*ILAENV( 1,
+     $                          'ZUNMLQ', 'LC', N, NRHS, M, -1 ) )
+                  IF( NRHS.GT.1 ) THEN
+                     MAXWRK = MAX( MAXWRK, M*M + M + M*NRHS )
+                  ELSE
+                     MAXWRK = MAX( MAXWRK, M*M + 2*M )
+                  END IF
+                  MAXWRK = MAX( MAXWRK, M*M + 4*M + M*NRHS )
+!     XXX: Ensure the Path 2a case below is triggered.  The workspace
+!     calculation should use queries for all routines eventually.
+                  MAXWRK = MAX( MAXWRK,
+     $                 4*M+M*M+MAX( M, 2*M-4, NRHS, N-3*M ) )
+               ELSE
+*
+*                 Path 2 - underdetermined.
+*
+                  MAXWRK = 2*M + ( N + M )*ILAENV( 1, 'ZGEBRD', ' ', M,
+     $                     N, -1, -1 )
+                  MAXWRK = MAX( MAXWRK, 2*M + NRHS*ILAENV( 1, 'ZUNMBR',
+     $                          'QLC', M, NRHS, M, -1 ) )
+                  MAXWRK = MAX( MAXWRK, 2*M + M*ILAENV( 1, 'ZUNMBR',
+     $                          'PLN', N, NRHS, M, -1 ) )
+                  MAXWRK = MAX( MAXWRK, 2*M + M*NRHS )
+               END IF
+               MINWRK = MAX( 2*M + N, 2*M + M*NRHS )
+            END IF
+         END IF
+         MINWRK = MIN( MINWRK, MAXWRK )
+         WORK( 1 ) = MAXWRK
+         IWORK( 1 ) = LIWORK
+         RWORK( 1 ) = LRWORK
+*
+         IF( LWORK.LT.MINWRK .AND. .NOT.LQUERY ) THEN
+            INFO = -12
+         END IF
+      END IF
+*
       IF( INFO.NE.0 ) THEN
-         CALL XERBLA( 'ZGEQRF', -INFO )
+         CALL XERBLA( 'ZGELSD', -INFO )
          RETURN
       ELSE IF( LQUERY ) THEN
          RETURN
       END IF
 *
-*     Quick return if possible
+*     Quick return if possible.
 *
-      K = MIN( M, N )
-      IF( K.EQ.0 ) THEN
-         WORK( 1 ) = 1
+      IF( M.EQ.0 .OR. N.EQ.0 ) THEN
+         RANK = 0
          RETURN
       END IF
 *
-      NBMIN = 2
-      NX = 0
-      IWS = N
-      IF( NB.GT.1 .AND. NB.LT.K ) THEN
+*     Get machine parameters.
 *
-*        Determine when to cross over from blocked to unblocked code.
+      EPS = DLAMCH( 'P' )
+      SFMIN = DLAMCH( 'S' )
+      SMLNUM = SFMIN / EPS
+      BIGNUM = ONE / SMLNUM
+      CALL DLABAD( SMLNUM, BIGNUM )
 *
-         NX = MAX( 0, ILAENV( 3, 'ZGEQRF', ' ', M, N, -1, -1 ) )
-         IF( NX.LT.K ) THEN
+*     Scale A if max entry outside range [SMLNUM,BIGNUM].
 *
-*           Determine if workspace is large enough for blocked code.
+      ANRM = ZLANGE( 'M', M, N, A, LDA, RWORK )
+      IASCL = 0
+      IF( ANRM.GT.ZERO .AND. ANRM.LT.SMLNUM ) THEN
 *
-            LDWORK = N
-            IWS = LDWORK*NB
-            IF( LWORK.LT.IWS ) THEN
+*        Scale matrix norm up to SMLNUM
 *
-*              Not enough workspace to use optimal NB:  reduce NB and
-*              determine the minimum value of NB.
+         CALL ZLASCL( 'G', 0, 0, ANRM, SMLNUM, M, N, A, LDA, INFO )
+         IASCL = 1
+      ELSE IF( ANRM.GT.BIGNUM ) THEN
 *
-               NB = LWORK / LDWORK
-               NBMIN = MAX( 2, ILAENV( 2, 'ZGEQRF', ' ', M, N, -1,
-     $                 -1 ) )
-            END IF
-         END IF
-      END IF
+*        Scale matrix norm down to BIGNUM.
 *
-      IF( NB.GE.NBMIN .AND. NB.LT.K .AND. NX.LT.K ) THEN
+         CALL ZLASCL( 'G', 0, 0, ANRM, BIGNUM, M, N, A, LDA, INFO )
+         IASCL = 2
+      ELSE IF( ANRM.EQ.ZERO ) THEN
 *
-*        Use blocked code initially
+*        Matrix all zero. Return zero solution.
 *
-         DO 10 I = 1, K - NX, NB
-            IB = MIN( K-I+1, NB )
+         CALL ZLASET( 'F', MAX( M, N ), NRHS, CZERO, CZERO, B, LDB )
+         CALL DLASET( 'F', MINMN, 1, ZERO, ZERO, S, 1 )
+         RANK = 0
+         GO TO 10
+      END IF
 *
-*           Compute the QR factorization of the current block
-*           A(i:m,i:i+ib-1)
+*     Scale B if max entry outside range [SMLNUM,BIGNUM].
 *
-            CALL ZGEQR2( M-I+1, IB, A( I, I ), LDA, TAU( I ), WORK,
-     $                   IINFO )
-            IF( I+IB.LE.N ) THEN
+      BNRM = ZLANGE( 'M', M, NRHS, B, LDB, RWORK )
+      IBSCL = 0
+      IF( BNRM.GT.ZERO .AND. BNRM.LT.SMLNUM ) THEN
 *
-*              Form the triangular factor of the block reflector
-*              H = H(i) H(i+1) . . . H(i+ib-1)
+*        Scale matrix norm up to SMLNUM.
 *
-               CALL ZLARFT( 'Forward', 'Columnwise', M-I+1, IB,
-     $                      A( I, I ), LDA, TAU( I ), WORK, LDWORK )
+         CALL ZLASCL( 'G', 0, 0, BNRM, SMLNUM, M, NRHS, B, LDB, INFO )
+         IBSCL = 1
+      ELSE IF( BNRM.GT.BIGNUM ) THEN
 *
-*              Apply H**H to A(i:m,i+ib:n) from the left
+*        Scale matrix norm down to BIGNUM.
 *
-               CALL ZLARFB( 'Left', 'Conjugate transpose', 'Forward',
-     $                      'Columnwise', M-I+1, N-I-IB+1, IB,
-     $                      A( I, I ), LDA, WORK, LDWORK, A( I, I+IB ),
-     $                      LDA, WORK( IB+1 ), LDWORK )
-            END IF
-   10    CONTINUE
-      ELSE
-         I = 1
+         CALL ZLASCL( 'G', 0, 0, BNRM, BIGNUM, M, NRHS, B, LDB, INFO )
+         IBSCL = 2
       END IF
 *
-*     Use unblocked code to factor the last or only block.
+*     If M < N make sure B(M+1:N,:) = 0
 *
-      IF( I.LE.K )
-     $   CALL ZGEQR2( M-I+1, N-I+1, A( I, I ), LDA, TAU( I ), WORK,
-     $                IINFO )
+      IF( M.LT.N )
+     $   CALL ZLASET( 'F', N-M, NRHS, CZERO, CZERO, B( M+1, 1 ), LDB )
 *
-      WORK( 1 ) = IWS
-      RETURN
+*     Overdetermined case.
 *
-*     End of ZGEQRF
+      IF( M.GE.N ) THEN
 *
-      END
-*> \brief <b> ZGESV computes the solution to system of linear equations A * X = B for GE matrices</b> (simple driver)
+*        Path 1 - overdetermined or exactly determined.
 *
-*  =========== DOCUMENTATION ===========
+         MM = M
+         IF( M.GE.MNTHR ) THEN
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+*           Path 1a - overdetermined, with many more rows than columns
 *
-*> \htmlonly
-*> Download ZGESV + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/zgesv.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/zgesv.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/zgesv.f"> 
-*> [TXT]</a>
-*> \endhtmlonly 
+            MM = N
+            ITAU = 1
+            NWORK = ITAU + N
 *
-*  Definition:
-*  ===========
+*           Compute A=Q*R.
+*           (RWorkspace: need N)
+*           (CWorkspace: need N, prefer N*NB)
 *
-*       SUBROUTINE ZGESV( N, NRHS, A, LDA, IPIV, B, LDB, INFO )
-* 
-*       .. Scalar Arguments ..
-*       INTEGER            INFO, LDA, LDB, N, NRHS
-*       ..
-*       .. Array Arguments ..
-*       INTEGER            IPIV( * )
-*       COMPLEX*16         A( LDA, * ), B( LDB, * )
-*       ..
-*  
+            CALL ZGEQRF( M, N, A, LDA, WORK( ITAU ), WORK( NWORK ),
+     $                   LWORK-NWORK+1, INFO )
 *
-*> \par Purpose:
-*  =============
-*>
-*> \verbatim
-*>
-*> ZGESV computes the solution to a complex system of linear equations
-*>    A * X = B,
-*> where A is an N-by-N matrix and X and B are N-by-NRHS matrices.
-*>
-*> The LU decomposition with partial pivoting and row interchanges is
-*> used to factor A as
-*>    A = P * L * U,
-*> where P is a permutation matrix, L is unit lower triangular, and U is
-*> upper triangular.  The factored form of A is then used to solve the
-*> system of equations A * X = B.
-*> \endverbatim
+*           Multiply B by transpose(Q).
+*           (RWorkspace: need N)
+*           (CWorkspace: need NRHS, prefer NRHS*NB)
 *
-*  Arguments:
-*  ==========
+            CALL ZUNMQR( 'L', 'C', M, NRHS, N, A, LDA, WORK( ITAU ), B,
+     $                   LDB, WORK( NWORK ), LWORK-NWORK+1, INFO )
 *
-*> \param[in] N
-*> \verbatim
-*>          N is INTEGER
-*>          The number of linear equations, i.e., the order of the
-*>          matrix A.  N >= 0.
-*> \endverbatim
-*>
-*> \param[in] NRHS
-*> \verbatim
-*>          NRHS is INTEGER
-*>          The number of right hand sides, i.e., the number of columns
-*>          of the matrix B.  NRHS >= 0.
-*> \endverbatim
-*>
-*> \param[in,out] A
-*> \verbatim
-*>          A is COMPLEX*16 array, dimension (LDA,N)
-*>          On entry, the N-by-N coefficient matrix A.
-*>          On exit, the factors L and U from the factorization
-*>          A = P*L*U; the unit diagonal elements of L are not stored.
-*> \endverbatim
-*>
-*> \param[in] LDA
-*> \verbatim
-*>          LDA is INTEGER
-*>          The leading dimension of the array A.  LDA >= max(1,N).
-*> \endverbatim
-*>
-*> \param[out] IPIV
-*> \verbatim
-*>          IPIV is INTEGER array, dimension (N)
-*>          The pivot indices that define the permutation matrix P;
-*>          row i of the matrix was interchanged with row IPIV(i).
-*> \endverbatim
-*>
-*> \param[in,out] B
-*> \verbatim
-*>          B is COMPLEX*16 array, dimension (LDB,NRHS)
-*>          On entry, the N-by-NRHS matrix of right hand side matrix B.
-*>          On exit, if INFO = 0, the N-by-NRHS solution matrix X.
-*> \endverbatim
-*>
-*> \param[in] LDB
-*> \verbatim
-*>          LDB is INTEGER
-*>          The leading dimension of the array B.  LDB >= max(1,N).
-*> \endverbatim
-*>
-*> \param[out] INFO
-*> \verbatim
-*>          INFO is INTEGER
-*>          = 0:  successful exit
-*>          < 0:  if INFO = -i, the i-th argument had an illegal value
-*>          > 0:  if INFO = i, U(i,i) is exactly zero.  The factorization
-*>                has been completed, but the factor U is exactly
-*>                singular, so the solution could not be computed.
-*> \endverbatim
+*           Zero out below R.
 *
-*  Authors:
-*  ========
+            IF( N.GT.1 ) THEN
+               CALL ZLASET( 'L', N-1, N-1, CZERO, CZERO, A( 2, 1 ),
+     $                      LDA )
+            END IF
+         END IF
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+         ITAUQ = 1
+         ITAUP = ITAUQ + N
+         NWORK = ITAUP + N
+         IE = 1
+         NRWORK = IE + N
 *
-*> \date November 2011
+*        Bidiagonalize R in A.
+*        (RWorkspace: need N)
+*        (CWorkspace: need 2*N+MM, prefer 2*N+(MM+N)*NB)
 *
-*> \ingroup complex16GEsolve
+         CALL ZGEBRD( MM, N, A, LDA, S, RWORK( IE ), WORK( ITAUQ ),
+     $                WORK( ITAUP ), WORK( NWORK ), LWORK-NWORK+1,
+     $                INFO )
 *
-*  =====================================================================
-      SUBROUTINE ZGESV( N, NRHS, A, LDA, IPIV, B, LDB, INFO )
+*        Multiply B by transpose of left bidiagonalizing vectors of R.
+*        (CWorkspace: need 2*N+NRHS, prefer 2*N+NRHS*NB)
 *
-*  -- LAPACK driver routine (version 3.4.0) --
-*  -- LAPACK is a software package provided by Univ. of Tennessee,    --
-*  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     November 2011
+         CALL ZUNMBR( 'Q', 'L', 'C', MM, NRHS, N, A, LDA, WORK( ITAUQ ),
+     $                B, LDB, WORK( NWORK ), LWORK-NWORK+1, INFO )
 *
-*     .. Scalar Arguments ..
-      INTEGER            INFO, LDA, LDB, N, NRHS
-*     ..
-*     .. Array Arguments ..
-      INTEGER            IPIV( * )
-      COMPLEX*16         A( LDA, * ), B( LDB, * )
-*     ..
+*        Solve the bidiagonal least squares problem.
 *
-*  =====================================================================
+         CALL ZLALSD( 'U', SMLSIZ, N, NRHS, S, RWORK( IE ), B, LDB,
+     $                RCOND, RANK, WORK( NWORK ), RWORK( NRWORK ),
+     $                IWORK, INFO )
+         IF( INFO.NE.0 ) THEN
+            GO TO 10
+         END IF
 *
-*     .. External Subroutines ..
-      EXTERNAL           XERBLA, ZGETRF, ZGETRS
-*     ..
-*     .. Intrinsic Functions ..
-      INTRINSIC          MAX
-*     ..
-*     .. Executable Statements ..
+*        Multiply B by right bidiagonalizing vectors of R.
 *
-*     Test the input parameters.
+         CALL ZUNMBR( 'P', 'L', 'N', N, NRHS, N, A, LDA, WORK( ITAUP ),
+     $                B, LDB, WORK( NWORK ), LWORK-NWORK+1, INFO )
 *
-      INFO = 0
-      IF( N.LT.0 ) THEN
-         INFO = -1
-      ELSE IF( NRHS.LT.0 ) THEN
-         INFO = -2
-      ELSE IF( LDA.LT.MAX( 1, N ) ) THEN
-         INFO = -4
-      ELSE IF( LDB.LT.MAX( 1, N ) ) THEN
-         INFO = -7
-      END IF
-      IF( INFO.NE.0 ) THEN
-         CALL XERBLA( 'ZGESV ', -INFO )
-         RETURN
-      END IF
+      ELSE IF( N.GE.MNTHR .AND. LWORK.GE.4*M+M*M+
+     $         MAX( M, 2*M-4, NRHS, N-3*M ) ) THEN
 *
-*     Compute the LU factorization of A.
+*        Path 2a - underdetermined, with many more columns than rows
+*        and sufficient workspace for an efficient algorithm.
 *
-      CALL ZGETRF( N, N, A, LDA, IPIV, INFO )
-      IF( INFO.EQ.0 ) THEN
+         LDWORK = M
+         IF( LWORK.GE.MAX( 4*M+M*LDA+MAX( M, 2*M-4, NRHS, N-3*M ),
+     $       M*LDA+M+M*NRHS ) )LDWORK = LDA
+         ITAU = 1
+         NWORK = M + 1
 *
-*        Solve the system A*X = B, overwriting B with X.
+*        Compute A=L*Q.
+*        (CWorkspace: need 2*M, prefer M+M*NB)
 *
-         CALL ZGETRS( 'No transpose', N, NRHS, A, LDA, IPIV, B, LDB,
+         CALL ZGELQF( M, N, A, LDA, WORK( ITAU ), WORK( NWORK ),
+     $                LWORK-NWORK+1, INFO )
+         IL = NWORK
+*
+*        Copy L to WORK(IL), zeroing out above its diagonal.
+*
+         CALL ZLACPY( 'L', M, M, A, LDA, WORK( IL ), LDWORK )
+         CALL ZLASET( 'U', M-1, M-1, CZERO, CZERO, WORK( IL+LDWORK ),
+     $                LDWORK )
+         ITAUQ = IL + LDWORK*M
+         ITAUP = ITAUQ + M
+         NWORK = ITAUP + M
+         IE = 1
+         NRWORK = IE + M
+*
+*        Bidiagonalize L in WORK(IL).
+*        (RWorkspace: need M)
+*        (CWorkspace: need M*M+4*M, prefer M*M+4*M+2*M*NB)
+*
+         CALL ZGEBRD( M, M, WORK( IL ), LDWORK, S, RWORK( IE ),
+     $                WORK( ITAUQ ), WORK( ITAUP ), WORK( NWORK ),
+     $                LWORK-NWORK+1, INFO )
+*
+*        Multiply B by transpose of left bidiagonalizing vectors of L.
+*        (CWorkspace: need M*M+4*M+NRHS, prefer M*M+4*M+NRHS*NB)
+*
+         CALL ZUNMBR( 'Q', 'L', 'C', M, NRHS, M, WORK( IL ), LDWORK,
+     $                WORK( ITAUQ ), B, LDB, WORK( NWORK ),
+     $                LWORK-NWORK+1, INFO )
+*
+*        Solve the bidiagonal least squares problem.
+*
+         CALL ZLALSD( 'U', SMLSIZ, M, NRHS, S, RWORK( IE ), B, LDB,
+     $                RCOND, RANK, WORK( NWORK ), RWORK( NRWORK ),
+     $                IWORK, INFO )
+         IF( INFO.NE.0 ) THEN
+            GO TO 10
+         END IF
+*
+*        Multiply B by right bidiagonalizing vectors of L.
+*
+         CALL ZUNMBR( 'P', 'L', 'N', M, NRHS, M, WORK( IL ), LDWORK,
+     $                WORK( ITAUP ), B, LDB, WORK( NWORK ),
+     $                LWORK-NWORK+1, INFO )
+*
+*        Zero out below first M rows of B.
+*
+         CALL ZLASET( 'F', N-M, NRHS, CZERO, CZERO, B( M+1, 1 ), LDB )
+         NWORK = ITAU + M
+*
+*        Multiply transpose(Q) by B.
+*        (CWorkspace: need NRHS, prefer NRHS*NB)
+*
+         CALL ZUNMLQ( 'L', 'C', N, NRHS, M, A, LDA, WORK( ITAU ), B,
+     $                LDB, WORK( NWORK ), LWORK-NWORK+1, INFO )
+*
+      ELSE
+*
+*        Path 2 - remaining underdetermined cases.
+*
+         ITAUQ = 1
+         ITAUP = ITAUQ + M
+         NWORK = ITAUP + M
+         IE = 1
+         NRWORK = IE + M
+*
+*        Bidiagonalize A.
+*        (RWorkspace: need M)
+*        (CWorkspace: need 2*M+N, prefer 2*M+(M+N)*NB)
+*
+         CALL ZGEBRD( M, N, A, LDA, S, RWORK( IE ), WORK( ITAUQ ),
+     $                WORK( ITAUP ), WORK( NWORK ), LWORK-NWORK+1,
+     $                INFO )
+*
+*        Multiply B by transpose of left bidiagonalizing vectors.
+*        (CWorkspace: need 2*M+NRHS, prefer 2*M+NRHS*NB)
+*
+         CALL ZUNMBR( 'Q', 'L', 'C', M, NRHS, N, A, LDA, WORK( ITAUQ ),
+     $                B, LDB, WORK( NWORK ), LWORK-NWORK+1, INFO )
+*
+*        Solve the bidiagonal least squares problem.
+*
+         CALL ZLALSD( 'L', SMLSIZ, M, NRHS, S, RWORK( IE ), B, LDB,
+     $                RCOND, RANK, WORK( NWORK ), RWORK( NRWORK ),
+     $                IWORK, INFO )
+         IF( INFO.NE.0 ) THEN
+            GO TO 10
+         END IF
+*
+*        Multiply B by right bidiagonalizing vectors of A.
+*
+         CALL ZUNMBR( 'P', 'L', 'N', N, NRHS, M, A, LDA, WORK( ITAUP ),
+     $                B, LDB, WORK( NWORK ), LWORK-NWORK+1, INFO )
+*
+      END IF
+*
+*     Undo scaling.
+*
+      IF( IASCL.EQ.1 ) THEN
+         CALL ZLASCL( 'G', 0, 0, ANRM, SMLNUM, N, NRHS, B, LDB, INFO )
+         CALL DLASCL( 'G', 0, 0, SMLNUM, ANRM, MINMN, 1, S, MINMN,
+     $                INFO )
+      ELSE IF( IASCL.EQ.2 ) THEN
+         CALL ZLASCL( 'G', 0, 0, ANRM, BIGNUM, N, NRHS, B, LDB, INFO )
+         CALL DLASCL( 'G', 0, 0, BIGNUM, ANRM, MINMN, 1, S, MINMN,
      $                INFO )
       END IF
+      IF( IBSCL.EQ.1 ) THEN
+         CALL ZLASCL( 'G', 0, 0, SMLNUM, BNRM, N, NRHS, B, LDB, INFO )
+      ELSE IF( IBSCL.EQ.2 ) THEN
+         CALL ZLASCL( 'G', 0, 0, BIGNUM, BNRM, N, NRHS, B, LDB, INFO )
+      END IF
+*
+   10 CONTINUE
+      WORK( 1 ) = MAXWRK
+      IWORK( 1 ) = LIWORK
+      RWORK( 1 ) = LRWORK
       RETURN
 *
-*     End of ZGESV
+*     End of ZGELSD
 *
       END
-*> \brief <b> ZGESVD computes the singular value decomposition (SVD) for GE matrices</b>
+*> \brief \b ZGEQP3
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download ZGESVD + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/zgesvd.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/zgesvd.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/zgesvd.f"> 
+*> Download ZGEQP3 + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/zgeqp3.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/zgeqp3.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/zgeqp3.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
-*       SUBROUTINE ZGESVD( JOBU, JOBVT, M, N, A, LDA, S, U, LDU, VT, LDVT,
-*                          WORK, LWORK, RWORK, INFO )
-* 
+*       SUBROUTINE ZGEQP3( M, N, A, LDA, JPVT, TAU, WORK, LWORK, RWORK,
+*                          INFO )
+*
 *       .. Scalar Arguments ..
-*       CHARACTER          JOBU, JOBVT
-*       INTEGER            INFO, LDA, LDU, LDVT, LWORK, M, N
+*       INTEGER            INFO, LDA, LWORK, M, N
 *       ..
 *       .. Array Arguments ..
-*       DOUBLE PRECISION   RWORK( * ), S( * )
-*       COMPLEX*16         A( LDA, * ), U( LDU, * ), VT( LDVT, * ),
-*      $                   WORK( * )
+*       INTEGER            JPVT( * )
+*       DOUBLE PRECISION   RWORK( * )
+*       COMPLEX*16         A( LDA, * ), TAU( * ), WORK( * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
 *>
 *> \verbatim
 *>
-*> ZGESVD computes the singular value decomposition (SVD) of a complex
-*> M-by-N matrix A, optionally computing the left and/or right singular
-*> vectors. The SVD is written
-*>
-*>      A = U * SIGMA * conjugate-transpose(V)
-*>
-*> where SIGMA is an M-by-N matrix which is zero except for its
-*> min(m,n) diagonal elements, U is an M-by-M unitary matrix, and
-*> V is an N-by-N unitary matrix.  The diagonal elements of SIGMA
-*> are the singular values of A; they are real and non-negative, and
-*> are returned in descending order.  The first min(m,n) columns of
-*> U and V are the left and right singular vectors of A.
-*>
-*> Note that the routine returns V**H, not V.
+*> ZGEQP3 computes a QR factorization with column pivoting of a
+*> matrix A:  A*P = Q*R  using Level 3 BLAS.
 *> \endverbatim
 *
 *  Arguments:
 *  ==========
 *
-*> \param[in] JOBU
-*> \verbatim
-*>          JOBU is CHARACTER*1
-*>          Specifies options for computing all or part of the matrix U:
-*>          = 'A':  all M columns of U are returned in array U:
-*>          = 'S':  the first min(m,n) columns of U (the left singular
-*>                  vectors) are returned in the array U;
-*>          = 'O':  the first min(m,n) columns of U (the left singular
-*>                  vectors) are overwritten on the array A;
-*>          = 'N':  no columns of U (no left singular vectors) are
-*>                  computed.
-*> \endverbatim
-*>
-*> \param[in] JOBVT
-*> \verbatim
-*>          JOBVT is CHARACTER*1
-*>          Specifies options for computing all or part of the matrix
-*>          V**H:
-*>          = 'A':  all N rows of V**H are returned in the array VT;
-*>          = 'S':  the first min(m,n) rows of V**H (the right singular
-*>                  vectors) are returned in the array VT;
-*>          = 'O':  the first min(m,n) rows of V**H (the right singular
-*>                  vectors) are overwritten on the array A;
-*>          = 'N':  no rows of V**H (no right singular vectors) are
-*>                  computed.
-*>
-*>          JOBVT and JOBU cannot both be 'O'.
-*> \endverbatim
-*>
 *> \param[in] M
 *> \verbatim
 *>          M is INTEGER
-*>          The number of rows of the input matrix A.  M >= 0.
+*>          The number of rows of the matrix A. M >= 0.
 *> \endverbatim
 *>
 *> \param[in] N
 *> \verbatim
 *>          N is INTEGER
-*>          The number of columns of the input matrix A.  N >= 0.
+*>          The number of columns of the matrix A.  N >= 0.
 *> \endverbatim
 *>
 *> \param[in,out] A
 *> \verbatim
 *>          A is COMPLEX*16 array, dimension (LDA,N)
 *>          On entry, the M-by-N matrix A.
-*>          On exit,
-*>          if JOBU = 'O',  A is overwritten with the first min(m,n)
-*>                          columns of U (the left singular vectors,
-*>                          stored columnwise);
-*>          if JOBVT = 'O', A is overwritten with the first min(m,n)
-*>                          rows of V**H (the right singular vectors,
-*>                          stored rowwise);
-*>          if JOBU .ne. 'O' and JOBVT .ne. 'O', the contents of A
-*>                          are destroyed.
+*>          On exit, the upper triangle of the array contains the
+*>          min(M,N)-by-N upper trapezoidal matrix R; the elements below
+*>          the diagonal, together with the array TAU, represent the
+*>          unitary matrix Q as a product of min(M,N) elementary
+*>          reflectors.
 *> \endverbatim
 *>
 *> \param[in] LDA
 *> \verbatim
 *>          LDA is INTEGER
-*>          The leading dimension of the array A.  LDA >= max(1,M).
-*> \endverbatim
-*>
-*> \param[out] S
-*> \verbatim
-*>          S is DOUBLE PRECISION array, dimension (min(M,N))
-*>          The singular values of A, sorted so that S(i) >= S(i+1).
-*> \endverbatim
-*>
-*> \param[out] U
-*> \verbatim
-*>          U is COMPLEX*16 array, dimension (LDU,UCOL)
-*>          (LDU,M) if JOBU = 'A' or (LDU,min(M,N)) if JOBU = 'S'.
-*>          If JOBU = 'A', U contains the M-by-M unitary matrix U;
-*>          if JOBU = 'S', U contains the first min(m,n) columns of U
-*>          (the left singular vectors, stored columnwise);
-*>          if JOBU = 'N' or 'O', U is not referenced.
-*> \endverbatim
-*>
-*> \param[in] LDU
-*> \verbatim
-*>          LDU is INTEGER
-*>          The leading dimension of the array U.  LDU >= 1; if
-*>          JOBU = 'S' or 'A', LDU >= M.
+*>          The leading dimension of the array A. LDA >= max(1,M).
 *> \endverbatim
 *>
-*> \param[out] VT
+*> \param[in,out] JPVT
 *> \verbatim
-*>          VT is COMPLEX*16 array, dimension (LDVT,N)
-*>          If JOBVT = 'A', VT contains the N-by-N unitary matrix
-*>          V**H;
-*>          if JOBVT = 'S', VT contains the first min(m,n) rows of
-*>          V**H (the right singular vectors, stored rowwise);
-*>          if JOBVT = 'N' or 'O', VT is not referenced.
+*>          JPVT is INTEGER array, dimension (N)
+*>          On entry, if JPVT(J).ne.0, the J-th column of A is permuted
+*>          to the front of A*P (a leading column); if JPVT(J)=0,
+*>          the J-th column of A is a free column.
+*>          On exit, if JPVT(J)=K, then the J-th column of A*P was the
+*>          the K-th column of A.
 *> \endverbatim
 *>
-*> \param[in] LDVT
+*> \param[out] TAU
 *> \verbatim
-*>          LDVT is INTEGER
-*>          The leading dimension of the array VT.  LDVT >= 1; if
-*>          JOBVT = 'A', LDVT >= N; if JOBVT = 'S', LDVT >= min(M,N).
+*>          TAU is COMPLEX*16 array, dimension (min(M,N))
+*>          The scalar factors of the elementary reflectors.
 *> \endverbatim
 *>
 *> \param[out] WORK
 *> \verbatim
 *>          WORK is COMPLEX*16 array, dimension (MAX(1,LWORK))
-*>          On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+*>          On exit, if INFO=0, WORK(1) returns the optimal LWORK.
 *> \endverbatim
 *>
 *> \param[in] LWORK
 *> \verbatim
 *>          LWORK is INTEGER
-*>          The dimension of the array WORK.
-*>          LWORK >=  MAX(1,2*MIN(M,N)+MAX(M,N)).
-*>          For good performance, LWORK should generally be larger.
+*>          The dimension of the array WORK. LWORK >= N+1.
+*>          For optimal performance LWORK >= ( N+1 )*NB, where NB
+*>          is the optimal blocksize.
 *>
 *>          If LWORK = -1, then a workspace query is assumed; the routine
 *>          only calculates the optimal size of the WORK array, returns
@@ -5906,1980 +6719,2798 @@
 *>
 *> \param[out] RWORK
 *> \verbatim
-*>          RWORK is DOUBLE PRECISION array, dimension (5*min(M,N))
-*>          On exit, if INFO > 0, RWORK(1:MIN(M,N)-1) contains the
-*>          unconverged superdiagonal elements of an upper bidiagonal
-*>          matrix B whose diagonal is in S (not necessarily sorted).
-*>          B satisfies A = U * B * VT, so it has the same singular
-*>          values as A, and singular vectors related by U and VT.
+*>          RWORK is DOUBLE PRECISION array, dimension (2*N)
 *> \endverbatim
 *>
 *> \param[out] INFO
 *> \verbatim
 *>          INFO is INTEGER
-*>          = 0:  successful exit.
-*>          < 0:  if INFO = -i, the i-th argument had an illegal value.
-*>          > 0:  if ZBDSQR did not converge, INFO specifies how many
-*>                superdiagonals of an intermediate bidiagonal form B
-*>                did not converge to zero. See the description of RWORK
-*>                above for details.
+*>          = 0: successful exit.
+*>          < 0: if INFO = -i, the i-th argument had an illegal value.
 *> \endverbatim
 *
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date April 2012
+*> \date December 2016
 *
-*> \ingroup complex16GEsing
+*> \ingroup complex16GEcomputational
+*
+*> \par Further Details:
+*  =====================
+*>
+*> \verbatim
+*>
+*>  The matrix Q is represented as a product of elementary reflectors
+*>
+*>     Q = H(1) H(2) . . . H(k), where k = min(m,n).
+*>
+*>  Each H(i) has the form
+*>
+*>     H(i) = I - tau * v * v**H
+*>
+*>  where tau is a complex scalar, and v is a real/complex vector
+*>  with v(1:i-1) = 0 and v(i) = 1; v(i+1:m) is stored on exit in
+*>  A(i+1:m,i), and tau in TAU(i).
+*> \endverbatim
 *
+*> \par Contributors:
+*  ==================
+*>
+*>    G. Quintana-Orti, Depto. de Informatica, Universidad Jaime I, Spain
+*>    X. Sun, Computer Science Dept., Duke University, USA
+*>
 *  =====================================================================
-      SUBROUTINE ZGESVD( JOBU, JOBVT, M, N, A, LDA, S, U, LDU, 
-     $                   VT, LDVT, WORK, LWORK, RWORK, INFO )
+      SUBROUTINE ZGEQP3( M, N, A, LDA, JPVT, TAU, WORK, LWORK, RWORK,
+     $                   INFO )
 *
-*  -- LAPACK driver routine (version 3.4.1) --
+*  -- LAPACK computational routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     April 2012
+*     December 2016
 *
 *     .. Scalar Arguments ..
-      CHARACTER          JOBU, JOBVT
-      INTEGER            INFO, LDA, LDU, LDVT, LWORK, M, N
+      INTEGER            INFO, LDA, LWORK, M, N
 *     ..
 *     .. Array Arguments ..
-      DOUBLE PRECISION   RWORK( * ), S( * )
-      COMPLEX*16         A( LDA, * ), U( LDU, * ), VT( LDVT, * ),
-     $                   WORK( * )
+      INTEGER            JPVT( * )
+      DOUBLE PRECISION   RWORK( * )
+      COMPLEX*16         A( LDA, * ), TAU( * ), WORK( * )
 *     ..
 *
 *  =====================================================================
 *
 *     .. Parameters ..
-      COMPLEX*16         CZERO, CONE
-      PARAMETER          ( CZERO = ( 0.0D0, 0.0D0 ),
-     $                   CONE = ( 1.0D0, 0.0D0 ) )
-      DOUBLE PRECISION   ZERO, ONE
-      PARAMETER          ( ZERO = 0.0D0, ONE = 1.0D0 )
+      INTEGER            INB, INBMIN, IXOVER
+      PARAMETER          ( INB = 1, INBMIN = 2, IXOVER = 3 )
 *     ..
 *     .. Local Scalars ..
-      LOGICAL            LQUERY, WNTUA, WNTUAS, WNTUN, WNTUO, WNTUS,
-     $                   WNTVA, WNTVAS, WNTVN, WNTVO, WNTVS
-      INTEGER            BLK, CHUNK, I, IE, IERR, IR, IRWORK, ISCL,
-     $                   ITAU, ITAUP, ITAUQ, IU, IWORK, LDWRKR, LDWRKU,
-     $                   MAXWRK, MINMN, MINWRK, MNTHR, NCU, NCVT, NRU,
-     $                   NRVT, WRKBL
-      INTEGER            LWORK_ZGEQRF, LWORK_ZUNGQR_N, LWORK_ZUNGQR_M,
-     $                   LWORK_ZGEBRD, LWORK_ZUNGBR_P, LWORK_ZUNGBR_Q,
-     $                   LWORK_ZGELQF, LWORK_ZUNGLQ_N, LWORK_ZUNGLQ_M
-      DOUBLE PRECISION   ANRM, BIGNUM, EPS, SMLNUM
-*     ..
-*     .. Local Arrays ..
-      DOUBLE PRECISION   DUM( 1 )
-      COMPLEX*16         CDUM( 1 )
+      LOGICAL            LQUERY
+      INTEGER            FJB, IWS, J, JB, LWKOPT, MINMN, MINWS, NA, NB,
+     $                   NBMIN, NFXD, NX, SM, SMINMN, SN, TOPBMN
 *     ..
 *     .. External Subroutines ..
-      EXTERNAL           DLASCL, XERBLA, ZBDSQR, ZGEBRD, ZGELQF, ZGEMM,
-     $                   ZGEQRF, ZLACPY, ZLASCL, ZLASET, ZUNGBR, ZUNGLQ,
-     $                   ZUNGQR, ZUNMBR
+      EXTERNAL           XERBLA, ZGEQRF, ZLAQP2, ZLAQPS, ZSWAP, ZUNMQR
 *     ..
 *     .. External Functions ..
-      LOGICAL            LSAME
       INTEGER            ILAENV
-      DOUBLE PRECISION   DLAMCH, ZLANGE
-      EXTERNAL           LSAME, ILAENV, DLAMCH, ZLANGE
+      DOUBLE PRECISION   DZNRM2
+      EXTERNAL           ILAENV, DZNRM2
 *     ..
 *     .. Intrinsic Functions ..
-      INTRINSIC          MAX, MIN, SQRT
+      INTRINSIC          INT, MAX, MIN
 *     ..
 *     .. Executable Statements ..
 *
-*     Test the input arguments
+*     Test input arguments
+*  ====================
 *
       INFO = 0
-      MINMN = MIN( M, N )
-      WNTUA = LSAME( JOBU, 'A' )
-      WNTUS = LSAME( JOBU, 'S' )
-      WNTUAS = WNTUA .OR. WNTUS
-      WNTUO = LSAME( JOBU, 'O' )
-      WNTUN = LSAME( JOBU, 'N' )
-      WNTVA = LSAME( JOBVT, 'A' )
-      WNTVS = LSAME( JOBVT, 'S' )
-      WNTVAS = WNTVA .OR. WNTVS
-      WNTVO = LSAME( JOBVT, 'O' )
-      WNTVN = LSAME( JOBVT, 'N' )
       LQUERY = ( LWORK.EQ.-1 )
-*
-      IF( .NOT.( WNTUA .OR. WNTUS .OR. WNTUO .OR. WNTUN ) ) THEN
+      IF( M.LT.0 ) THEN
          INFO = -1
-      ELSE IF( .NOT.( WNTVA .OR. WNTVS .OR. WNTVO .OR. WNTVN ) .OR.
-     $         ( WNTVO .AND. WNTUO ) ) THEN
-         INFO = -2
-      ELSE IF( M.LT.0 ) THEN
-         INFO = -3
       ELSE IF( N.LT.0 ) THEN
-         INFO = -4
+         INFO = -2
       ELSE IF( LDA.LT.MAX( 1, M ) ) THEN
-         INFO = -6
-      ELSE IF( LDU.LT.1 .OR. ( WNTUAS .AND. LDU.LT.M ) ) THEN
-         INFO = -9
-      ELSE IF( LDVT.LT.1 .OR. ( WNTVA .AND. LDVT.LT.N ) .OR.
-     $         ( WNTVS .AND. LDVT.LT.MINMN ) ) THEN
-         INFO = -11
+         INFO = -4
       END IF
 *
-*     Compute workspace
-*      (Note: Comments in the code beginning "Workspace:" describe the
-*       minimal amount of workspace needed at that point in the code,
-*       as well as the preferred amount for good performance.
-*       CWorkspace refers to complex workspace, and RWorkspace to
-*       real workspace. NB refers to the optimal block size for the
-*       immediately following subroutine, as returned by ILAENV.)
-*
       IF( INFO.EQ.0 ) THEN
-         MINWRK = 1
-         MAXWRK = 1
-         IF( M.GE.N .AND. MINMN.GT.0 ) THEN
+         MINMN = MIN( M, N )
+         IF( MINMN.EQ.0 ) THEN
+            IWS = 1
+            LWKOPT = 1
+         ELSE
+            IWS = N + 1
+            NB = ILAENV( INB, 'ZGEQRF', ' ', M, N, -1, -1 )
+            LWKOPT = ( N + 1 )*NB
+         END IF
+         WORK( 1 ) = DCMPLX( LWKOPT )
 *
-*           Space needed for ZBDSQR is BDSPAC = 5*N
+         IF( ( LWORK.LT.IWS ) .AND. .NOT.LQUERY ) THEN
+            INFO = -8
+         END IF
+      END IF
 *
-            MNTHR = ILAENV( 6, 'ZGESVD', JOBU // JOBVT, M, N, 0, 0 )
-*           Compute space needed for ZGEQRF
-            CALL ZGEQRF( M, N, A, LDA, CDUM(1), CDUM(1), -1, IERR )
-            LWORK_ZGEQRF=CDUM(1)
-*           Compute space needed for ZUNGQR
-            CALL ZUNGQR( M, N, N, A, LDA, CDUM(1), CDUM(1), -1, IERR )
-            LWORK_ZUNGQR_N=CDUM(1)
-            CALL ZUNGQR( M, M, N, A, LDA, CDUM(1), CDUM(1), -1, IERR )
-            LWORK_ZUNGQR_M=CDUM(1)
-*           Compute space needed for ZGEBRD
-            CALL ZGEBRD( N, N, A, LDA, S, DUM(1), CDUM(1),
-     $                   CDUM(1), CDUM(1), -1, IERR )
-            LWORK_ZGEBRD=CDUM(1)
-*           Compute space needed for ZUNGBR
-            CALL ZUNGBR( 'P', N, N, N, A, LDA, CDUM(1),
-     $                   CDUM(1), -1, IERR )
-            LWORK_ZUNGBR_P=CDUM(1)
-            CALL ZUNGBR( 'Q', N, N, N, A, LDA, CDUM(1),
-     $                   CDUM(1), -1, IERR )
-            LWORK_ZUNGBR_Q=CDUM(1)
+      IF( INFO.NE.0 ) THEN
+         CALL XERBLA( 'ZGEQP3', -INFO )
+         RETURN
+      ELSE IF( LQUERY ) THEN
+         RETURN
+      END IF
 *
-            IF( M.GE.MNTHR ) THEN
-               IF( WNTUN ) THEN
+*     Move initial columns up front.
 *
-*                 Path 1 (M much larger than N, JOBU='N')
+      NFXD = 1
+      DO 10 J = 1, N
+         IF( JPVT( J ).NE.0 ) THEN
+            IF( J.NE.NFXD ) THEN
+               CALL ZSWAP( M, A( 1, J ), 1, A( 1, NFXD ), 1 )
+               JPVT( J ) = JPVT( NFXD )
+               JPVT( NFXD ) = J
+            ELSE
+               JPVT( J ) = J
+            END IF
+            NFXD = NFXD + 1
+         ELSE
+            JPVT( J ) = J
+         END IF
+   10 CONTINUE
+      NFXD = NFXD - 1
 *
-                  MAXWRK = N + LWORK_ZGEQRF
-                  MAXWRK = MAX( MAXWRK, 2*N+LWORK_ZGEBRD )
-                  IF( WNTVO .OR. WNTVAS )
-     $               MAXWRK = MAX( MAXWRK, 2*N+LWORK_ZUNGBR_P )
-                  MINWRK = 3*N
-               ELSE IF( WNTUO .AND. WNTVN ) THEN
+*     Factorize fixed columns
+*  =======================
 *
-*                 Path 2 (M much larger than N, JOBU='O', JOBVT='N')
+*     Compute the QR factorization of fixed columns and update
+*     remaining columns.
 *
-                  WRKBL = N + LWORK_ZGEQRF
-                  WRKBL = MAX( WRKBL, N+LWORK_ZUNGQR_N )
-                  WRKBL = MAX( WRKBL, 2*N+LWORK_ZGEBRD )
-                  WRKBL = MAX( WRKBL, 2*N+LWORK_ZUNGBR_Q )
-                  MAXWRK = MAX( N*N+WRKBL, N*N+M*N )
-                  MINWRK = 2*N + M
-               ELSE IF( WNTUO .AND. WNTVAS ) THEN
+      IF( NFXD.GT.0 ) THEN
+         NA = MIN( M, NFXD )
+*CC      CALL ZGEQR2( M, NA, A, LDA, TAU, WORK, INFO )
+         CALL ZGEQRF( M, NA, A, LDA, TAU, WORK, LWORK, INFO )
+         IWS = MAX( IWS, INT( WORK( 1 ) ) )
+         IF( NA.LT.N ) THEN
+*CC         CALL ZUNM2R( 'Left', 'Conjugate Transpose', M, N-NA,
+*CC  $                   NA, A, LDA, TAU, A( 1, NA+1 ), LDA, WORK,
+*CC  $                   INFO )
+            CALL ZUNMQR( 'Left', 'Conjugate Transpose', M, N-NA, NA, A,
+     $                   LDA, TAU, A( 1, NA+1 ), LDA, WORK, LWORK,
+     $                   INFO )
+            IWS = MAX( IWS, INT( WORK( 1 ) ) )
+         END IF
+      END IF
 *
-*                 Path 3 (M much larger than N, JOBU='O', JOBVT='S' or
-*                 'A')
+*     Factorize free columns
+*  ======================
 *
-                  WRKBL = N + LWORK_ZGEQRF
-                  WRKBL = MAX( WRKBL, N+LWORK_ZUNGQR_N )
-                  WRKBL = MAX( WRKBL, 2*N+LWORK_ZGEBRD )
-                  WRKBL = MAX( WRKBL, 2*N+LWORK_ZUNGBR_Q )
-                  WRKBL = MAX( WRKBL, 2*N+LWORK_ZUNGBR_P )
-                  MAXWRK = MAX( N*N+WRKBL, N*N+M*N )
-                  MINWRK = 2*N + M
-               ELSE IF( WNTUS .AND. WNTVN ) THEN
+      IF( NFXD.LT.MINMN ) THEN
 *
-*                 Path 4 (M much larger than N, JOBU='S', JOBVT='N')
+         SM = M - NFXD
+         SN = N - NFXD
+         SMINMN = MINMN - NFXD
 *
-                  WRKBL = N + LWORK_ZGEQRF
-                  WRKBL = MAX( WRKBL, N+LWORK_ZUNGQR_N )
-                  WRKBL = MAX( WRKBL, 2*N+LWORK_ZGEBRD )
-                  WRKBL = MAX( WRKBL, 2*N+LWORK_ZUNGBR_Q )
-                  MAXWRK = N*N + WRKBL
-                  MINWRK = 2*N + M
-               ELSE IF( WNTUS .AND. WNTVO ) THEN
+*        Determine the block size.
 *
-*                 Path 5 (M much larger than N, JOBU='S', JOBVT='O')
+         NB = ILAENV( INB, 'ZGEQRF', ' ', SM, SN, -1, -1 )
+         NBMIN = 2
+         NX = 0
 *
-                  WRKBL = N + LWORK_ZGEQRF
-                  WRKBL = MAX( WRKBL, N+LWORK_ZUNGQR_N )
-                  WRKBL = MAX( WRKBL, 2*N+LWORK_ZGEBRD )
-                  WRKBL = MAX( WRKBL, 2*N+LWORK_ZUNGBR_Q )
-                  WRKBL = MAX( WRKBL, 2*N+LWORK_ZUNGBR_P )
-                  MAXWRK = 2*N*N + WRKBL
-                  MINWRK = 2*N + M
-               ELSE IF( WNTUS .AND. WNTVAS ) THEN
+         IF( ( NB.GT.1 ) .AND. ( NB.LT.SMINMN ) ) THEN
 *
-*                 Path 6 (M much larger than N, JOBU='S', JOBVT='S' or
-*                 'A')
+*           Determine when to cross over from blocked to unblocked code.
 *
-                  WRKBL = N + LWORK_ZGEQRF
-                  WRKBL = MAX( WRKBL, N+LWORK_ZUNGQR_N )
-                  WRKBL = MAX( WRKBL, 2*N+LWORK_ZGEBRD )
-                  WRKBL = MAX( WRKBL, 2*N+LWORK_ZUNGBR_Q )
-                  WRKBL = MAX( WRKBL, 2*N+LWORK_ZUNGBR_P )
-                  MAXWRK = N*N + WRKBL
-                  MINWRK = 2*N + M
-               ELSE IF( WNTUA .AND. WNTVN ) THEN
+            NX = MAX( 0, ILAENV( IXOVER, 'ZGEQRF', ' ', SM, SN, -1,
+     $           -1 ) )
 *
-*                 Path 7 (M much larger than N, JOBU='A', JOBVT='N')
 *
-                  WRKBL = N + LWORK_ZGEQRF
-                  WRKBL = MAX( WRKBL, N+LWORK_ZUNGQR_M )
-                  WRKBL = MAX( WRKBL, 2*N+LWORK_ZGEBRD )
-                  WRKBL = MAX( WRKBL, 2*N+LWORK_ZUNGBR_Q )
-                  MAXWRK = N*N + WRKBL
-                  MINWRK = 2*N + M
-               ELSE IF( WNTUA .AND. WNTVO ) THEN
+            IF( NX.LT.SMINMN ) THEN
 *
-*                 Path 8 (M much larger than N, JOBU='A', JOBVT='O')
+*              Determine if workspace is large enough for blocked code.
 *
-                  WRKBL = N + LWORK_ZGEQRF
-                  WRKBL = MAX( WRKBL, N+LWORK_ZUNGQR_M )
-                  WRKBL = MAX( WRKBL, 2*N+LWORK_ZGEBRD )
-                  WRKBL = MAX( WRKBL, 2*N+LWORK_ZUNGBR_Q )
-                  WRKBL = MAX( WRKBL, 2*N+LWORK_ZUNGBR_P )
-                  MAXWRK = 2*N*N + WRKBL
-                  MINWRK = 2*N + M
-               ELSE IF( WNTUA .AND. WNTVAS ) THEN
+               MINWS = ( SN+1 )*NB
+               IWS = MAX( IWS, MINWS )
+               IF( LWORK.LT.MINWS ) THEN
 *
-*                 Path 9 (M much larger than N, JOBU='A', JOBVT='S' or
-*                 'A')
+*                 Not enough workspace to use optimal NB: Reduce NB and
+*                 determine the minimum value of NB.
 *
-                  WRKBL = N + LWORK_ZGEQRF
-                  WRKBL = MAX( WRKBL, N+LWORK_ZUNGQR_M )
-                  WRKBL = MAX( WRKBL, 2*N+LWORK_ZGEBRD )
-                  WRKBL = MAX( WRKBL, 2*N+LWORK_ZUNGBR_Q )
-                  WRKBL = MAX( WRKBL, 2*N+LWORK_ZUNGBR_P )
-                  MAXWRK = N*N + WRKBL
-                  MINWRK = 2*N + M
-               END IF
-            ELSE
+                  NB = LWORK / ( SN+1 )
+                  NBMIN = MAX( 2, ILAENV( INBMIN, 'ZGEQRF', ' ', SM, SN,
+     $                    -1, -1 ) )
 *
-*              Path 10 (M at least N, but not much larger)
 *
-               CALL ZGEBRD( M, N, A, LDA, S, DUM(1), CDUM(1),
-     $                   CDUM(1), CDUM(1), -1, IERR )
-               LWORK_ZGEBRD=CDUM(1)
-               MAXWRK = 2*N + LWORK_ZGEBRD
-               IF( WNTUS .OR. WNTUO ) THEN
-                  CALL ZUNGBR( 'Q', M, N, N, A, LDA, CDUM(1),
-     $                   CDUM(1), -1, IERR )
-                  LWORK_ZUNGBR_Q=CDUM(1)
-                  MAXWRK = MAX( MAXWRK, 2*N+LWORK_ZUNGBR_Q )
-               END IF
-               IF( WNTUA ) THEN
-                  CALL ZUNGBR( 'Q', M, M, N, A, LDA, CDUM(1),
-     $                   CDUM(1), -1, IERR )
-                  LWORK_ZUNGBR_Q=CDUM(1)
-                  MAXWRK = MAX( MAXWRK, 2*N+LWORK_ZUNGBR_Q )
-               END IF
-               IF( .NOT.WNTVN ) THEN
-                  MAXWRK = MAX( MAXWRK, 2*N+LWORK_ZUNGBR_P )
-               MINWRK = 2*N + M
                END IF
             END IF
-         ELSE IF( MINMN.GT.0 ) THEN
+         END IF
 *
-*           Space needed for ZBDSQR is BDSPAC = 5*M
+*        Initialize partial column norms. The first N elements of work
+*        store the exact column norms.
 *
-            MNTHR = ILAENV( 6, 'ZGESVD', JOBU // JOBVT, M, N, 0, 0 )
-*           Compute space needed for ZGELQF
-            CALL ZGELQF( M, N, A, LDA, CDUM(1), CDUM(1), -1, IERR )
-            LWORK_ZGELQF=CDUM(1)
-*           Compute space needed for ZUNGLQ
-            CALL ZUNGLQ( N, N, M, CDUM(1), N, CDUM(1), CDUM(1), -1,
-     $                  IERR )
-            LWORK_ZUNGLQ_N=CDUM(1)
-            CALL ZUNGLQ( M, N, M, A, LDA, CDUM(1), CDUM(1), -1, IERR )
-            LWORK_ZUNGLQ_M=CDUM(1)
-*           Compute space needed for ZGEBRD
-            CALL ZGEBRD( M, M, A, LDA, S, DUM(1), CDUM(1),
-     $                   CDUM(1), CDUM(1), -1, IERR )
-            LWORK_ZGEBRD=CDUM(1)
-*            Compute space needed for ZUNGBR P
-            CALL ZUNGBR( 'P', M, M, M, A, N, CDUM(1),
-     $                   CDUM(1), -1, IERR )
-            LWORK_ZUNGBR_P=CDUM(1)
-*           Compute space needed for ZUNGBR Q
-            CALL ZUNGBR( 'Q', M, M, M, A, N, CDUM(1),
-     $                   CDUM(1), -1, IERR )
-            LWORK_ZUNGBR_Q=CDUM(1)
-            IF( N.GE.MNTHR ) THEN
-               IF( WNTVN ) THEN
+         DO 20 J = NFXD + 1, N
+            RWORK( J ) = DZNRM2( SM, A( NFXD+1, J ), 1 )
+            RWORK( N+J ) = RWORK( J )
+   20    CONTINUE
 *
-*                 Path 1t(N much larger than M, JOBVT='N')
+         IF( ( NB.GE.NBMIN ) .AND. ( NB.LT.SMINMN ) .AND.
+     $       ( NX.LT.SMINMN ) ) THEN
 *
-                  MAXWRK = M + LWORK_ZGELQF
-                  MAXWRK = MAX( MAXWRK, 2*M+LWORK_ZGEBRD )
-                  IF( WNTUO .OR. WNTUAS )
-     $               MAXWRK = MAX( MAXWRK, 2*M+LWORK_ZUNGBR_Q )
-                  MINWRK = 3*M
-               ELSE IF( WNTVO .AND. WNTUN ) THEN
+*           Use blocked code initially.
 *
-*                 Path 2t(N much larger than M, JOBU='N', JOBVT='O')
+            J = NFXD + 1
 *
-                  WRKBL = M + LWORK_ZGELQF
-                  WRKBL = MAX( WRKBL, M+LWORK_ZUNGLQ_M )
-                  WRKBL = MAX( WRKBL, 2*M+LWORK_ZGEBRD )
-                  WRKBL = MAX( WRKBL, 2*M+LWORK_ZUNGBR_P )
-                  MAXWRK = MAX( M*M+WRKBL, M*M+M*N )
-                  MINWRK = 2*M + N
-               ELSE IF( WNTVO .AND. WNTUAS ) THEN
+*           Compute factorization: while loop.
 *
-*                 Path 3t(N much larger than M, JOBU='S' or 'A',
-*                 JOBVT='O')
 *
-                  WRKBL = M + LWORK_ZGELQF
-                  WRKBL = MAX( WRKBL, M+LWORK_ZUNGLQ_M )
-                  WRKBL = MAX( WRKBL, 2*M+LWORK_ZGEBRD )
-                  WRKBL = MAX( WRKBL, 2*M+LWORK_ZUNGBR_P )
-                  WRKBL = MAX( WRKBL, 2*M+LWORK_ZUNGBR_Q )
-                  MAXWRK = MAX( M*M+WRKBL, M*M+M*N )
-                  MINWRK = 2*M + N
-               ELSE IF( WNTVS .AND. WNTUN ) THEN
+            TOPBMN = MINMN - NX
+   30       CONTINUE
+            IF( J.LE.TOPBMN ) THEN
+               JB = MIN( NB, TOPBMN-J+1 )
 *
-*                 Path 4t(N much larger than M, JOBU='N', JOBVT='S')
+*              Factorize JB columns among columns J:N.
 *
-                  WRKBL = M + LWORK_ZGELQF
-                  WRKBL = MAX( WRKBL, M+LWORK_ZUNGLQ_M )
-                  WRKBL = MAX( WRKBL, 2*M+LWORK_ZGEBRD )
-                  WRKBL = MAX( WRKBL, 2*M+LWORK_ZUNGBR_P )
-                  MAXWRK = M*M + WRKBL
-                  MINWRK = 2*M + N
-               ELSE IF( WNTVS .AND. WNTUO ) THEN
+               CALL ZLAQPS( M, N-J+1, J-1, JB, FJB, A( 1, J ), LDA,
+     $                      JPVT( J ), TAU( J ), RWORK( J ),
+     $                      RWORK( N+J ), WORK( 1 ), WORK( JB+1 ),
+     $                      N-J+1 )
 *
-*                 Path 5t(N much larger than M, JOBU='O', JOBVT='S')
+               J = J + FJB
+               GO TO 30
+            END IF
+         ELSE
+            J = NFXD + 1
+         END IF
 *
-                  WRKBL = M + LWORK_ZGELQF
-                  WRKBL = MAX( WRKBL, M+LWORK_ZUNGLQ_M )
-                  WRKBL = MAX( WRKBL, 2*M+LWORK_ZGEBRD )
-                  WRKBL = MAX( WRKBL, 2*M+LWORK_ZUNGBR_P )
-                  WRKBL = MAX( WRKBL, 2*M+LWORK_ZUNGBR_Q )
-                  MAXWRK = 2*M*M + WRKBL
-                  MINWRK = 2*M + N
-               ELSE IF( WNTVS .AND. WNTUAS ) THEN
+*        Use unblocked code to factor the last or only block.
 *
-*                 Path 6t(N much larger than M, JOBU='S' or 'A',
-*                 JOBVT='S')
 *
-                  WRKBL = M + LWORK_ZGELQF
-                  WRKBL = MAX( WRKBL, M+LWORK_ZUNGLQ_M )
-                  WRKBL = MAX( WRKBL, 2*M+LWORK_ZGEBRD )
-                  WRKBL = MAX( WRKBL, 2*M+LWORK_ZUNGBR_P )
-                  WRKBL = MAX( WRKBL, 2*M+LWORK_ZUNGBR_Q )
-                  MAXWRK = M*M + WRKBL
-                  MINWRK = 2*M + N
-               ELSE IF( WNTVA .AND. WNTUN ) THEN
+         IF( J.LE.MINMN )
+     $      CALL ZLAQP2( M, N-J+1, J-1, A( 1, J ), LDA, JPVT( J ),
+     $                   TAU( J ), RWORK( J ), RWORK( N+J ), WORK( 1 ) )
 *
-*                 Path 7t(N much larger than M, JOBU='N', JOBVT='A')
+      END IF
 *
-                  WRKBL = M + LWORK_ZGELQF
-                  WRKBL = MAX( WRKBL, M+LWORK_ZUNGLQ_N )
-                  WRKBL = MAX( WRKBL, 2*M+LWORK_ZGEBRD )
-                  WRKBL = MAX( WRKBL, 2*M+LWORK_ZUNGBR_P )
-                  MAXWRK = M*M + WRKBL
-                  MINWRK = 2*M + N
-               ELSE IF( WNTVA .AND. WNTUO ) THEN
+      WORK( 1 ) = DCMPLX( LWKOPT )
+      RETURN
 *
-*                 Path 8t(N much larger than M, JOBU='O', JOBVT='A')
+*     End of ZGEQP3
 *
-                  WRKBL = M + LWORK_ZGELQF
-                  WRKBL = MAX( WRKBL, M+LWORK_ZUNGLQ_N )
-                  WRKBL = MAX( WRKBL, 2*M+LWORK_ZGEBRD )
-                  WRKBL = MAX( WRKBL, 2*M+LWORK_ZUNGBR_P )
-                  WRKBL = MAX( WRKBL, 2*M+LWORK_ZUNGBR_Q )
-                  MAXWRK = 2*M*M + WRKBL
-                  MINWRK = 2*M + N
-               ELSE IF( WNTVA .AND. WNTUAS ) THEN
+      END
+*> \brief \b ZGEQR2 computes the QR factorization of a general rectangular matrix using an unblocked algorithm.
 *
-*                 Path 9t(N much larger than M, JOBU='S' or 'A',
-*                 JOBVT='A')
+*  =========== DOCUMENTATION ===========
 *
-                  WRKBL = M + LWORK_ZGELQF
-                  WRKBL = MAX( WRKBL, M+LWORK_ZUNGLQ_N )
-                  WRKBL = MAX( WRKBL, 2*M+LWORK_ZGEBRD )
-                  WRKBL = MAX( WRKBL, 2*M+LWORK_ZUNGBR_P )
-                  WRKBL = MAX( WRKBL, 2*M+LWORK_ZUNGBR_Q )
-                  MAXWRK = M*M + WRKBL
-                  MINWRK = 2*M + N
-               END IF
-            ELSE
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
-*              Path 10t(N greater than M, but not much larger)
+*> \htmlonly
+*> Download ZGEQR2 + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/zgeqr2.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/zgeqr2.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/zgeqr2.f">
+*> [TXT]</a>
+*> \endhtmlonly
 *
-               CALL ZGEBRD( M, N, A, LDA, S, DUM(1), CDUM(1),
-     $                   CDUM(1), CDUM(1), -1, IERR )
-               LWORK_ZGEBRD=CDUM(1)
-               MAXWRK = 2*M + LWORK_ZGEBRD
-               IF( WNTVS .OR. WNTVO ) THEN
-*                Compute space needed for ZUNGBR P
-                 CALL ZUNGBR( 'P', M, N, M, A, N, CDUM(1),
-     $                   CDUM(1), -1, IERR )
-                 LWORK_ZUNGBR_P=CDUM(1)
-                 MAXWRK = MAX( MAXWRK, 2*M+LWORK_ZUNGBR_P )
-               END IF
-               IF( WNTVA ) THEN
-                 CALL ZUNGBR( 'P', N,  N, M, A, N, CDUM(1),
-     $                   CDUM(1), -1, IERR )
-                 LWORK_ZUNGBR_P=CDUM(1)
-                 MAXWRK = MAX( MAXWRK, 2*M+LWORK_ZUNGBR_P )
-               END IF
-               IF( .NOT.WNTUN ) THEN
-                  MAXWRK = MAX( MAXWRK, 2*M+LWORK_ZUNGBR_Q )
-               MINWRK = 2*M + N
-               END IF
-            END IF
-         END IF
-         MAXWRK = MAX( MAXWRK, MINWRK )
-         WORK( 1 ) = MAXWRK
+*  Definition:
+*  ===========
 *
-         IF( LWORK.LT.MINWRK .AND. .NOT.LQUERY ) THEN
-            INFO = -13
-         END IF
-      END IF
+*       SUBROUTINE ZGEQR2( M, N, A, LDA, TAU, WORK, INFO )
 *
-      IF( INFO.NE.0 ) THEN
-         CALL XERBLA( 'ZGESVD', -INFO )
-         RETURN
-      ELSE IF( LQUERY ) THEN
-         RETURN
-      END IF
+*       .. Scalar Arguments ..
+*       INTEGER            INFO, LDA, M, N
+*       ..
+*       .. Array Arguments ..
+*       COMPLEX*16         A( LDA, * ), TAU( * ), WORK( * )
+*       ..
 *
-*     Quick return if possible
 *
-      IF( M.EQ.0 .OR. N.EQ.0 ) THEN
-         RETURN
-      END IF
+*> \par Purpose:
+*  =============
+*>
+*> \verbatim
+*>
+*> ZGEQR2 computes a QR factorization of a complex m by n matrix A:
+*> A = Q * R.
+*> \endverbatim
 *
-*     Get machine constants
+*  Arguments:
+*  ==========
 *
-      EPS = DLAMCH( 'P' )
-      SMLNUM = SQRT( DLAMCH( 'S' ) ) / EPS
-      BIGNUM = ONE / SMLNUM
+*> \param[in] M
+*> \verbatim
+*>          M is INTEGER
+*>          The number of rows of the matrix A.  M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*>          N is INTEGER
+*>          The number of columns of the matrix A.  N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*>          A is COMPLEX*16 array, dimension (LDA,N)
+*>          On entry, the m by n matrix A.
+*>          On exit, the elements on and above the diagonal of the array
+*>          contain the min(m,n) by n upper trapezoidal matrix R (R is
+*>          upper triangular if m >= n); the elements below the diagonal,
+*>          with the array TAU, represent the unitary matrix Q as a
+*>          product of elementary reflectors (see Further Details).
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*>          LDA is INTEGER
+*>          The leading dimension of the array A.  LDA >= max(1,M).
+*> \endverbatim
+*>
+*> \param[out] TAU
+*> \verbatim
+*>          TAU is COMPLEX*16 array, dimension (min(M,N))
+*>          The scalar factors of the elementary reflectors (see Further
+*>          Details).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*>          WORK is COMPLEX*16 array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*>          INFO is INTEGER
+*>          = 0: successful exit
+*>          < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
 *
-*     Scale A if max element outside range [SMLNUM,BIGNUM]
+*  Authors:
+*  ========
 *
-      ANRM = ZLANGE( 'M', M, N, A, LDA, DUM )
-      ISCL = 0
-      IF( ANRM.GT.ZERO .AND. ANRM.LT.SMLNUM ) THEN
-         ISCL = 1
-         CALL ZLASCL( 'G', 0, 0, ANRM, SMLNUM, M, N, A, LDA, IERR )
-      ELSE IF( ANRM.GT.BIGNUM ) THEN
-         ISCL = 1
-         CALL ZLASCL( 'G', 0, 0, ANRM, BIGNUM, M, N, A, LDA, IERR )
-      END IF
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-      IF( M.GE.N ) THEN
+*> \date December 2016
 *
-*        A has at least as many rows as columns. If A has sufficiently
-*        more rows than columns, first reduce using the QR
-*        decomposition (if sufficient workspace available)
+*> \ingroup complex16GEcomputational
 *
-         IF( M.GE.MNTHR ) THEN
+*> \par Further Details:
+*  =====================
+*>
+*> \verbatim
+*>
+*>  The matrix Q is represented as a product of elementary reflectors
+*>
+*>     Q = H(1) H(2) . . . H(k), where k = min(m,n).
+*>
+*>  Each H(i) has the form
+*>
+*>     H(i) = I - tau * v * v**H
+*>
+*>  where tau is a complex scalar, and v is a complex vector with
+*>  v(1:i-1) = 0 and v(i) = 1; v(i+1:m) is stored on exit in A(i+1:m,i),
+*>  and tau in TAU(i).
+*> \endverbatim
+*>
+*  =====================================================================
+      SUBROUTINE ZGEQR2( M, N, A, LDA, TAU, WORK, INFO )
 *
-            IF( WNTUN ) THEN
+*  -- LAPACK computational routine (version 3.7.0) --
+*  -- LAPACK is a software package provided by Univ. of Tennessee,    --
+*  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+*     December 2016
 *
-*              Path 1 (M much larger than N, JOBU='N')
-*              No left singular vectors to be computed
+*     .. Scalar Arguments ..
+      INTEGER            INFO, LDA, M, N
+*     ..
+*     .. Array Arguments ..
+      COMPLEX*16         A( LDA, * ), TAU( * ), WORK( * )
+*     ..
 *
-               ITAU = 1
-               IWORK = ITAU + N
+*  =====================================================================
 *
-*              Compute A=Q*R
-*              (CWorkspace: need 2*N, prefer N+N*NB)
-*              (RWorkspace: need 0)
+*     .. Parameters ..
+      COMPLEX*16         ONE
+      PARAMETER          ( ONE = ( 1.0D+0, 0.0D+0 ) )
+*     ..
+*     .. Local Scalars ..
+      INTEGER            I, K
+      COMPLEX*16         ALPHA
+*     ..
+*     .. External Subroutines ..
+      EXTERNAL           XERBLA, ZLARF, ZLARFG
+*     ..
+*     .. Intrinsic Functions ..
+      INTRINSIC          DCONJG, MAX, MIN
+*     ..
+*     .. Executable Statements ..
 *
-               CALL ZGEQRF( M, N, A, LDA, WORK( ITAU ), WORK( IWORK ),
-     $                      LWORK-IWORK+1, IERR )
+*     Test the input arguments
 *
-*              Zero out below R
+      INFO = 0
+      IF( M.LT.0 ) THEN
+         INFO = -1
+      ELSE IF( N.LT.0 ) THEN
+         INFO = -2
+      ELSE IF( LDA.LT.MAX( 1, M ) ) THEN
+         INFO = -4
+      END IF
+      IF( INFO.NE.0 ) THEN
+         CALL XERBLA( 'ZGEQR2', -INFO )
+         RETURN
+      END IF
 *
-               CALL ZLASET( 'L', N-1, N-1, CZERO, CZERO, A( 2, 1 ),
-     $                      LDA )
-               IE = 1
-               ITAUQ = 1
-               ITAUP = ITAUQ + N
-               IWORK = ITAUP + N
+      K = MIN( M, N )
 *
-*              Bidiagonalize R in A
-*              (CWorkspace: need 3*N, prefer 2*N+2*N*NB)
-*              (RWorkspace: need N)
+      DO 10 I = 1, K
 *
-               CALL ZGEBRD( N, N, A, LDA, S, RWORK( IE ), WORK( ITAUQ ),
-     $                      WORK( ITAUP ), WORK( IWORK ), LWORK-IWORK+1,
-     $                      IERR )
-               NCVT = 0
-               IF( WNTVO .OR. WNTVAS ) THEN
+*        Generate elementary reflector H(i) to annihilate A(i+1:m,i)
 *
-*                 If right singular vectors desired, generate P'.
-*                 (CWorkspace: need 3*N-1, prefer 2*N+(N-1)*NB)
-*                 (RWorkspace: 0)
+         CALL ZLARFG( M-I+1, A( I, I ), A( MIN( I+1, M ), I ), 1,
+     $                TAU( I ) )
+         IF( I.LT.N ) THEN
 *
-                  CALL ZUNGBR( 'P', N, N, N, A, LDA, WORK( ITAUP ),
-     $                         WORK( IWORK ), LWORK-IWORK+1, IERR )
-                  NCVT = N
-               END IF
-               IRWORK = IE + N
+*           Apply H(i)**H to A(i:m,i+1:n) from the left
 *
-*              Perform bidiagonal QR iteration, computing right
-*              singular vectors of A in A if desired
-*              (CWorkspace: 0)
-*              (RWorkspace: need BDSPAC)
+            ALPHA = A( I, I )
+            A( I, I ) = ONE
+            CALL ZLARF( 'Left', M-I+1, N-I, A( I, I ), 1,
+     $                  DCONJG( TAU( I ) ), A( I, I+1 ), LDA, WORK )
+            A( I, I ) = ALPHA
+         END IF
+   10 CONTINUE
+      RETURN
 *
-               CALL ZBDSQR( 'U', N, NCVT, 0, 0, S, RWORK( IE ), A, LDA,
-     $                      CDUM, 1, CDUM, 1, RWORK( IRWORK ), INFO )
+*     End of ZGEQR2
 *
-*              If right singular vectors desired in VT, copy them there
+      END
+*> \brief \b ZGEQRF
 *
-               IF( WNTVAS )
-     $            CALL ZLACPY( 'F', N, N, A, LDA, VT, LDVT )
+*  =========== DOCUMENTATION ===========
 *
-            ELSE IF( WNTUO .AND. WNTVN ) THEN
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
-*              Path 2 (M much larger than N, JOBU='O', JOBVT='N')
-*              N left singular vectors to be overwritten on A and
-*              no right singular vectors to be computed
+*> \htmlonly
+*> Download ZGEQRF + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/zgeqrf.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/zgeqrf.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/zgeqrf.f">
+*> [TXT]</a>
+*> \endhtmlonly
 *
-               IF( LWORK.GE.N*N+3*N ) THEN
+*  Definition:
+*  ===========
 *
-*                 Sufficient workspace for a fast algorithm
+*       SUBROUTINE ZGEQRF( M, N, A, LDA, TAU, WORK, LWORK, INFO )
 *
-                  IR = 1
-                  IF( LWORK.GE.MAX( WRKBL, LDA*N )+LDA*N ) THEN
+*       .. Scalar Arguments ..
+*       INTEGER            INFO, LDA, LWORK, M, N
+*       ..
+*       .. Array Arguments ..
+*       COMPLEX*16         A( LDA, * ), TAU( * ), WORK( * )
+*       ..
 *
-*                    WORK(IU) is LDA by N, WORK(IR) is LDA by N
 *
-                     LDWRKU = LDA
-                     LDWRKR = LDA
-                  ELSE IF( LWORK.GE.MAX( WRKBL, LDA*N )+N*N ) THEN
+*> \par Purpose:
+*  =============
+*>
+*> \verbatim
+*>
+*> ZGEQRF computes a QR factorization of a complex M-by-N matrix A:
+*> A = Q * R.
+*> \endverbatim
 *
-*                    WORK(IU) is LDA by N, WORK(IR) is N by N
+*  Arguments:
+*  ==========
 *
-                     LDWRKU = LDA
-                     LDWRKR = N
-                  ELSE
+*> \param[in] M
+*> \verbatim
+*>          M is INTEGER
+*>          The number of rows of the matrix A.  M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*>          N is INTEGER
+*>          The number of columns of the matrix A.  N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*>          A is COMPLEX*16 array, dimension (LDA,N)
+*>          On entry, the M-by-N matrix A.
+*>          On exit, the elements on and above the diagonal of the array
+*>          contain the min(M,N)-by-N upper trapezoidal matrix R (R is
+*>          upper triangular if m >= n); the elements below the diagonal,
+*>          with the array TAU, represent the unitary matrix Q as a
+*>          product of min(m,n) elementary reflectors (see Further
+*>          Details).
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*>          LDA is INTEGER
+*>          The leading dimension of the array A.  LDA >= max(1,M).
+*> \endverbatim
+*>
+*> \param[out] TAU
+*> \verbatim
+*>          TAU is COMPLEX*16 array, dimension (min(M,N))
+*>          The scalar factors of the elementary reflectors (see Further
+*>          Details).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*>          WORK is COMPLEX*16 array, dimension (MAX(1,LWORK))
+*>          On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*>          LWORK is INTEGER
+*>          The dimension of the array WORK.  LWORK >= max(1,N).
+*>          For optimum performance LWORK >= N*NB, where NB is
+*>          the optimal blocksize.
+*>
+*>          If LWORK = -1, then a workspace query is assumed; the routine
+*>          only calculates the optimal size of the WORK array, returns
+*>          this value as the first entry of the WORK array, and no error
+*>          message related to LWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*>          INFO is INTEGER
+*>          = 0:  successful exit
+*>          < 0:  if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
 *
-*                    WORK(IU) is LDWRKU by N, WORK(IR) is N by N
+*  Authors:
+*  ========
 *
-                     LDWRKU = ( LWORK-N*N ) / N
-                     LDWRKR = N
-                  END IF
-                  ITAU = IR + LDWRKR*N
-                  IWORK = ITAU + N
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*                 Compute A=Q*R
-*                 (CWorkspace: need N*N+2*N, prefer N*N+N+N*NB)
-*                 (RWorkspace: 0)
+*> \date December 2016
 *
-                  CALL ZGEQRF( M, N, A, LDA, WORK( ITAU ),
-     $                         WORK( IWORK ), LWORK-IWORK+1, IERR )
+*> \ingroup complex16GEcomputational
 *
-*                 Copy R to WORK(IR) and zero out below it
+*> \par Further Details:
+*  =====================
+*>
+*> \verbatim
+*>
+*>  The matrix Q is represented as a product of elementary reflectors
+*>
+*>     Q = H(1) H(2) . . . H(k), where k = min(m,n).
+*>
+*>  Each H(i) has the form
+*>
+*>     H(i) = I - tau * v * v**H
+*>
+*>  where tau is a complex scalar, and v is a complex vector with
+*>  v(1:i-1) = 0 and v(i) = 1; v(i+1:m) is stored on exit in A(i+1:m,i),
+*>  and tau in TAU(i).
+*> \endverbatim
+*>
+*  =====================================================================
+      SUBROUTINE ZGEQRF( M, N, A, LDA, TAU, WORK, LWORK, INFO )
 *
-                  CALL ZLACPY( 'U', N, N, A, LDA, WORK( IR ), LDWRKR )
-                  CALL ZLASET( 'L', N-1, N-1, CZERO, CZERO,
-     $                         WORK( IR+1 ), LDWRKR )
+*  -- LAPACK computational routine (version 3.7.0) --
+*  -- LAPACK is a software package provided by Univ. of Tennessee,    --
+*  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+*     December 2016
 *
-*                 Generate Q in A
-*                 (CWorkspace: need N*N+2*N, prefer N*N+N+N*NB)
-*                 (RWorkspace: 0)
+*     .. Scalar Arguments ..
+      INTEGER            INFO, LDA, LWORK, M, N
+*     ..
+*     .. Array Arguments ..
+      COMPLEX*16         A( LDA, * ), TAU( * ), WORK( * )
+*     ..
 *
-                  CALL ZUNGQR( M, N, N, A, LDA, WORK( ITAU ),
-     $                         WORK( IWORK ), LWORK-IWORK+1, IERR )
-                  IE = 1
-                  ITAUQ = ITAU
-                  ITAUP = ITAUQ + N
-                  IWORK = ITAUP + N
+*  =====================================================================
 *
-*                 Bidiagonalize R in WORK(IR)
-*                 (CWorkspace: need N*N+3*N, prefer N*N+2*N+2*N*NB)
-*                 (RWorkspace: need N)
+*     .. Local Scalars ..
+      LOGICAL            LQUERY
+      INTEGER            I, IB, IINFO, IWS, K, LDWORK, LWKOPT, NB,
+     $                   NBMIN, NX
+*     ..
+*     .. External Subroutines ..
+      EXTERNAL           XERBLA, ZGEQR2, ZLARFB, ZLARFT
+*     ..
+*     .. Intrinsic Functions ..
+      INTRINSIC          MAX, MIN
+*     ..
+*     .. External Functions ..
+      INTEGER            ILAENV
+      EXTERNAL           ILAENV
+*     ..
+*     .. Executable Statements ..
 *
-                  CALL ZGEBRD( N, N, WORK( IR ), LDWRKR, S, RWORK( IE ),
-     $                         WORK( ITAUQ ), WORK( ITAUP ),
-     $                         WORK( IWORK ), LWORK-IWORK+1, IERR )
+*     Test the input arguments
 *
-*                 Generate left vectors bidiagonalizing R
-*                 (CWorkspace: need N*N+3*N, prefer N*N+2*N+N*NB)
-*                 (RWorkspace: need 0)
+      INFO = 0
+      NB = ILAENV( 1, 'ZGEQRF', ' ', M, N, -1, -1 )
+      LWKOPT = N*NB
+      WORK( 1 ) = LWKOPT
+      LQUERY = ( LWORK.EQ.-1 )
+      IF( M.LT.0 ) THEN
+         INFO = -1
+      ELSE IF( N.LT.0 ) THEN
+         INFO = -2
+      ELSE IF( LDA.LT.MAX( 1, M ) ) THEN
+         INFO = -4
+      ELSE IF( LWORK.LT.MAX( 1, N ) .AND. .NOT.LQUERY ) THEN
+         INFO = -7
+      END IF
+      IF( INFO.NE.0 ) THEN
+         CALL XERBLA( 'ZGEQRF', -INFO )
+         RETURN
+      ELSE IF( LQUERY ) THEN
+         RETURN
+      END IF
 *
-                  CALL ZUNGBR( 'Q', N, N, N, WORK( IR ), LDWRKR,
-     $                         WORK( ITAUQ ), WORK( IWORK ),
-     $                         LWORK-IWORK+1, IERR )
-                  IRWORK = IE + N
+*     Quick return if possible
 *
-*                 Perform bidiagonal QR iteration, computing left
-*                 singular vectors of R in WORK(IR)
-*                 (CWorkspace: need N*N)
-*                 (RWorkspace: need BDSPAC)
+      K = MIN( M, N )
+      IF( K.EQ.0 ) THEN
+         WORK( 1 ) = 1
+         RETURN
+      END IF
 *
-                  CALL ZBDSQR( 'U', N, 0, N, 0, S, RWORK( IE ), CDUM, 1,
-     $                         WORK( IR ), LDWRKR, CDUM, 1,
-     $                         RWORK( IRWORK ), INFO )
-                  IU = ITAUQ
+      NBMIN = 2
+      NX = 0
+      IWS = N
+      IF( NB.GT.1 .AND. NB.LT.K ) THEN
 *
-*                 Multiply Q in A by left singular vectors of R in
-*                 WORK(IR), storing result in WORK(IU) and copying to A
-*                 (CWorkspace: need N*N+N, prefer N*N+M*N)
-*                 (RWorkspace: 0)
+*        Determine when to cross over from blocked to unblocked code.
 *
-                  DO 10 I = 1, M, LDWRKU
-                     CHUNK = MIN( M-I+1, LDWRKU )
-                     CALL ZGEMM( 'N', 'N', CHUNK, N, N, CONE, A( I, 1 ),
-     $                           LDA, WORK( IR ), LDWRKR, CZERO,
-     $                           WORK( IU ), LDWRKU )
-                     CALL ZLACPY( 'F', CHUNK, N, WORK( IU ), LDWRKU,
-     $                            A( I, 1 ), LDA )
-   10             CONTINUE
+         NX = MAX( 0, ILAENV( 3, 'ZGEQRF', ' ', M, N, -1, -1 ) )
+         IF( NX.LT.K ) THEN
 *
-               ELSE
+*           Determine if workspace is large enough for blocked code.
 *
-*                 Insufficient workspace for a fast algorithm
+            LDWORK = N
+            IWS = LDWORK*NB
+            IF( LWORK.LT.IWS ) THEN
 *
-                  IE = 1
-                  ITAUQ = 1
-                  ITAUP = ITAUQ + N
-                  IWORK = ITAUP + N
+*              Not enough workspace to use optimal NB:  reduce NB and
+*              determine the minimum value of NB.
 *
-*                 Bidiagonalize A
-*                 (CWorkspace: need 2*N+M, prefer 2*N+(M+N)*NB)
-*                 (RWorkspace: N)
+               NB = LWORK / LDWORK
+               NBMIN = MAX( 2, ILAENV( 2, 'ZGEQRF', ' ', M, N, -1,
+     $                 -1 ) )
+            END IF
+         END IF
+      END IF
 *
-                  CALL ZGEBRD( M, N, A, LDA, S, RWORK( IE ),
-     $                         WORK( ITAUQ ), WORK( ITAUP ),
-     $                         WORK( IWORK ), LWORK-IWORK+1, IERR )
+      IF( NB.GE.NBMIN .AND. NB.LT.K .AND. NX.LT.K ) THEN
 *
-*                 Generate left vectors bidiagonalizing A
-*                 (CWorkspace: need 3*N, prefer 2*N+N*NB)
-*                 (RWorkspace: 0)
+*        Use blocked code initially
 *
-                  CALL ZUNGBR( 'Q', M, N, N, A, LDA, WORK( ITAUQ ),
-     $                         WORK( IWORK ), LWORK-IWORK+1, IERR )
-                  IRWORK = IE + N
+         DO 10 I = 1, K - NX, NB
+            IB = MIN( K-I+1, NB )
 *
-*                 Perform bidiagonal QR iteration, computing left
-*                 singular vectors of A in A
-*                 (CWorkspace: need 0)
-*                 (RWorkspace: need BDSPAC)
+*           Compute the QR factorization of the current block
+*           A(i:m,i:i+ib-1)
 *
-                  CALL ZBDSQR( 'U', N, 0, M, 0, S, RWORK( IE ), CDUM, 1,
-     $                         A, LDA, CDUM, 1, RWORK( IRWORK ), INFO )
+            CALL ZGEQR2( M-I+1, IB, A( I, I ), LDA, TAU( I ), WORK,
+     $                   IINFO )
+            IF( I+IB.LE.N ) THEN
 *
-               END IF
+*              Form the triangular factor of the block reflector
+*              H = H(i) H(i+1) . . . H(i+ib-1)
 *
-            ELSE IF( WNTUO .AND. WNTVAS ) THEN
+               CALL ZLARFT( 'Forward', 'Columnwise', M-I+1, IB,
+     $                      A( I, I ), LDA, TAU( I ), WORK, LDWORK )
 *
-*              Path 3 (M much larger than N, JOBU='O', JOBVT='S' or 'A')
-*              N left singular vectors to be overwritten on A and
-*              N right singular vectors to be computed in VT
+*              Apply H**H to A(i:m,i+ib:n) from the left
 *
-               IF( LWORK.GE.N*N+3*N ) THEN
+               CALL ZLARFB( 'Left', 'Conjugate transpose', 'Forward',
+     $                      'Columnwise', M-I+1, N-I-IB+1, IB,
+     $                      A( I, I ), LDA, WORK, LDWORK, A( I, I+IB ),
+     $                      LDA, WORK( IB+1 ), LDWORK )
+            END IF
+   10    CONTINUE
+      ELSE
+         I = 1
+      END IF
 *
-*                 Sufficient workspace for a fast algorithm
+*     Use unblocked code to factor the last or only block.
 *
-                  IR = 1
-                  IF( LWORK.GE.MAX( WRKBL, LDA*N )+LDA*N ) THEN
+      IF( I.LE.K )
+     $   CALL ZGEQR2( M-I+1, N-I+1, A( I, I ), LDA, TAU( I ), WORK,
+     $                IINFO )
 *
-*                    WORK(IU) is LDA by N and WORK(IR) is LDA by N
+      WORK( 1 ) = IWS
+      RETURN
 *
-                     LDWRKU = LDA
-                     LDWRKR = LDA
-                  ELSE IF( LWORK.GE.MAX( WRKBL, LDA*N )+N*N ) THEN
+*     End of ZGEQRF
 *
-*                    WORK(IU) is LDA by N and WORK(IR) is N by N
+      END
+*> \brief \b ZGERFS
 *
-                     LDWRKU = LDA
-                     LDWRKR = N
-                  ELSE
+*  =========== DOCUMENTATION ===========
 *
-*                    WORK(IU) is LDWRKU by N and WORK(IR) is N by N
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
-                     LDWRKU = ( LWORK-N*N ) / N
-                     LDWRKR = N
-                  END IF
-                  ITAU = IR + LDWRKR*N
-                  IWORK = ITAU + N
+*> \htmlonly
+*> Download ZGERFS + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/zgerfs.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/zgerfs.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/zgerfs.f">
+*> [TXT]</a>
+*> \endhtmlonly
 *
-*                 Compute A=Q*R
-*                 (CWorkspace: need N*N+2*N, prefer N*N+N+N*NB)
-*                 (RWorkspace: 0)
+*  Definition:
+*  ===========
 *
-                  CALL ZGEQRF( M, N, A, LDA, WORK( ITAU ),
-     $                         WORK( IWORK ), LWORK-IWORK+1, IERR )
+*       SUBROUTINE ZGERFS( TRANS, N, NRHS, A, LDA, AF, LDAF, IPIV, B, LDB,
+*                          X, LDX, FERR, BERR, WORK, RWORK, INFO )
 *
-*                 Copy R to VT, zeroing out below it
+*       .. Scalar Arguments ..
+*       CHARACTER          TRANS
+*       INTEGER            INFO, LDA, LDAF, LDB, LDX, N, NRHS
+*       ..
+*       .. Array Arguments ..
+*       INTEGER            IPIV( * )
+*       DOUBLE PRECISION   BERR( * ), FERR( * ), RWORK( * )
+*       COMPLEX*16         A( LDA, * ), AF( LDAF, * ), B( LDB, * ),
+*      $                   WORK( * ), X( LDX, * )
+*       ..
 *
-                  CALL ZLACPY( 'U', N, N, A, LDA, VT, LDVT )
-                  IF( N.GT.1 )
-     $               CALL ZLASET( 'L', N-1, N-1, CZERO, CZERO,
-     $                            VT( 2, 1 ), LDVT )
 *
-*                 Generate Q in A
-*                 (CWorkspace: need N*N+2*N, prefer N*N+N+N*NB)
-*                 (RWorkspace: 0)
+*> \par Purpose:
+*  =============
+*>
+*> \verbatim
+*>
+*> ZGERFS improves the computed solution to a system of linear
+*> equations and provides error bounds and backward error estimates for
+*> the solution.
+*> \endverbatim
 *
-                  CALL ZUNGQR( M, N, N, A, LDA, WORK( ITAU ),
-     $                         WORK( IWORK ), LWORK-IWORK+1, IERR )
-                  IE = 1
-                  ITAUQ = ITAU
-                  ITAUP = ITAUQ + N
-                  IWORK = ITAUP + N
+*  Arguments:
+*  ==========
 *
-*                 Bidiagonalize R in VT, copying result to WORK(IR)
-*                 (CWorkspace: need N*N+3*N, prefer N*N+2*N+2*N*NB)
-*                 (RWorkspace: need N)
+*> \param[in] TRANS
+*> \verbatim
+*>          TRANS is CHARACTER*1
+*>          Specifies the form of the system of equations:
+*>          = 'N':  A * X = B     (No transpose)
+*>          = 'T':  A**T * X = B  (Transpose)
+*>          = 'C':  A**H * X = B  (Conjugate transpose)
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*>          N is INTEGER
+*>          The order of the matrix A.  N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*>          NRHS is INTEGER
+*>          The number of right hand sides, i.e., the number of columns
+*>          of the matrices B and X.  NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*>          A is COMPLEX*16 array, dimension (LDA,N)
+*>          The original N-by-N matrix A.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*>          LDA is INTEGER
+*>          The leading dimension of the array A.  LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] AF
+*> \verbatim
+*>          AF is COMPLEX*16 array, dimension (LDAF,N)
+*>          The factors L and U from the factorization A = P*L*U
+*>          as computed by ZGETRF.
+*> \endverbatim
+*>
+*> \param[in] LDAF
+*> \verbatim
+*>          LDAF is INTEGER
+*>          The leading dimension of the array AF.  LDAF >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] IPIV
+*> \verbatim
+*>          IPIV is INTEGER array, dimension (N)
+*>          The pivot indices from ZGETRF; for 1<=i<=N, row i of the
+*>          matrix was interchanged with row IPIV(i).
+*> \endverbatim
+*>
+*> \param[in] B
+*> \verbatim
+*>          B is COMPLEX*16 array, dimension (LDB,NRHS)
+*>          The right hand side matrix B.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*>          LDB is INTEGER
+*>          The leading dimension of the array B.  LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in,out] X
+*> \verbatim
+*>          X is COMPLEX*16 array, dimension (LDX,NRHS)
+*>          On entry, the solution matrix X, as computed by ZGETRS.
+*>          On exit, the improved solution matrix X.
+*> \endverbatim
+*>
+*> \param[in] LDX
+*> \verbatim
+*>          LDX is INTEGER
+*>          The leading dimension of the array X.  LDX >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] FERR
+*> \verbatim
+*>          FERR is DOUBLE PRECISION array, dimension (NRHS)
+*>          The estimated forward error bound for each solution vector
+*>          X(j) (the j-th column of the solution matrix X).
+*>          If XTRUE is the true solution corresponding to X(j), FERR(j)
+*>          is an estimated upper bound for the magnitude of the largest
+*>          element in (X(j) - XTRUE) divided by the magnitude of the
+*>          largest element in X(j).  The estimate is as reliable as
+*>          the estimate for RCOND, and is almost always a slight
+*>          overestimate of the true error.
+*> \endverbatim
+*>
+*> \param[out] BERR
+*> \verbatim
+*>          BERR is DOUBLE PRECISION array, dimension (NRHS)
+*>          The componentwise relative backward error of each solution
+*>          vector X(j) (i.e., the smallest relative change in
+*>          any element of A or B that makes X(j) an exact solution).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*>          WORK is COMPLEX*16 array, dimension (2*N)
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*>          RWORK is DOUBLE PRECISION array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*>          INFO is INTEGER
+*>          = 0:  successful exit
+*>          < 0:  if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
 *
-                  CALL ZGEBRD( N, N, VT, LDVT, S, RWORK( IE ),
-     $                         WORK( ITAUQ ), WORK( ITAUP ),
-     $                         WORK( IWORK ), LWORK-IWORK+1, IERR )
-                  CALL ZLACPY( 'L', N, N, VT, LDVT, WORK( IR ), LDWRKR )
+*> \par Internal Parameters:
+*  =========================
+*>
+*> \verbatim
+*>  ITMAX is the maximum number of steps of iterative refinement.
+*> \endverbatim
 *
-*                 Generate left vectors bidiagonalizing R in WORK(IR)
-*                 (CWorkspace: need N*N+3*N, prefer N*N+2*N+N*NB)
-*                 (RWorkspace: 0)
-*
-                  CALL ZUNGBR( 'Q', N, N, N, WORK( IR ), LDWRKR,
-     $                         WORK( ITAUQ ), WORK( IWORK ),
-     $                         LWORK-IWORK+1, IERR )
-*
-*                 Generate right vectors bidiagonalizing R in VT
-*                 (CWorkspace: need N*N+3*N-1, prefer N*N+2*N+(N-1)*NB)
-*                 (RWorkspace: 0)
-*
-                  CALL ZUNGBR( 'P', N, N, N, VT, LDVT, WORK( ITAUP ),
-     $                         WORK( IWORK ), LWORK-IWORK+1, IERR )
-                  IRWORK = IE + N
-*
-*                 Perform bidiagonal QR iteration, computing left
-*                 singular vectors of R in WORK(IR) and computing right
-*                 singular vectors of R in VT
-*                 (CWorkspace: need N*N)
-*                 (RWorkspace: need BDSPAC)
-*
-                  CALL ZBDSQR( 'U', N, N, N, 0, S, RWORK( IE ), VT,
-     $                         LDVT, WORK( IR ), LDWRKR, CDUM, 1,
-     $                         RWORK( IRWORK ), INFO )
-                  IU = ITAUQ
-*
-*                 Multiply Q in A by left singular vectors of R in
-*                 WORK(IR), storing result in WORK(IU) and copying to A
-*                 (CWorkspace: need N*N+N, prefer N*N+M*N)
-*                 (RWorkspace: 0)
-*
-                  DO 20 I = 1, M, LDWRKU
-                     CHUNK = MIN( M-I+1, LDWRKU )
-                     CALL ZGEMM( 'N', 'N', CHUNK, N, N, CONE, A( I, 1 ),
-     $                           LDA, WORK( IR ), LDWRKR, CZERO,
-     $                           WORK( IU ), LDWRKU )
-                     CALL ZLACPY( 'F', CHUNK, N, WORK( IU ), LDWRKU,
-     $                            A( I, 1 ), LDA )
-   20             CONTINUE
+*  Authors:
+*  ========
 *
-               ELSE
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*                 Insufficient workspace for a fast algorithm
+*> \date December 2016
 *
-                  ITAU = 1
-                  IWORK = ITAU + N
+*> \ingroup complex16GEcomputational
 *
-*                 Compute A=Q*R
-*                 (CWorkspace: need 2*N, prefer N+N*NB)
-*                 (RWorkspace: 0)
+*  =====================================================================
+      SUBROUTINE ZGERFS( TRANS, N, NRHS, A, LDA, AF, LDAF, IPIV, B, LDB,
+     $                   X, LDX, FERR, BERR, WORK, RWORK, INFO )
 *
-                  CALL ZGEQRF( M, N, A, LDA, WORK( ITAU ),
-     $                         WORK( IWORK ), LWORK-IWORK+1, IERR )
+*  -- LAPACK computational routine (version 3.7.0) --
+*  -- LAPACK is a software package provided by Univ. of Tennessee,    --
+*  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+*     December 2016
 *
-*                 Copy R to VT, zeroing out below it
+*     .. Scalar Arguments ..
+      CHARACTER          TRANS
+      INTEGER            INFO, LDA, LDAF, LDB, LDX, N, NRHS
+*     ..
+*     .. Array Arguments ..
+      INTEGER            IPIV( * )
+      DOUBLE PRECISION   BERR( * ), FERR( * ), RWORK( * )
+      COMPLEX*16         A( LDA, * ), AF( LDAF, * ), B( LDB, * ),
+     $                   WORK( * ), X( LDX, * )
+*     ..
 *
-                  CALL ZLACPY( 'U', N, N, A, LDA, VT, LDVT )
-                  IF( N.GT.1 )
-     $               CALL ZLASET( 'L', N-1, N-1, CZERO, CZERO,
-     $                            VT( 2, 1 ), LDVT )
+*  =====================================================================
 *
-*                 Generate Q in A
-*                 (CWorkspace: need 2*N, prefer N+N*NB)
-*                 (RWorkspace: 0)
+*     .. Parameters ..
+      INTEGER            ITMAX
+      PARAMETER          ( ITMAX = 5 )
+      DOUBLE PRECISION   ZERO
+      PARAMETER          ( ZERO = 0.0D+0 )
+      COMPLEX*16         ONE
+      PARAMETER          ( ONE = ( 1.0D+0, 0.0D+0 ) )
+      DOUBLE PRECISION   TWO
+      PARAMETER          ( TWO = 2.0D+0 )
+      DOUBLE PRECISION   THREE
+      PARAMETER          ( THREE = 3.0D+0 )
+*     ..
+*     .. Local Scalars ..
+      LOGICAL            NOTRAN
+      CHARACTER          TRANSN, TRANST
+      INTEGER            COUNT, I, J, K, KASE, NZ
+      DOUBLE PRECISION   EPS, LSTRES, S, SAFE1, SAFE2, SAFMIN, XK
+      COMPLEX*16         ZDUM
+*     ..
+*     .. Local Arrays ..
+      INTEGER            ISAVE( 3 )
+*     ..
+*     .. External Functions ..
+      LOGICAL            LSAME
+      DOUBLE PRECISION   DLAMCH
+      EXTERNAL           LSAME, DLAMCH
+*     ..
+*     .. External Subroutines ..
+      EXTERNAL           XERBLA, ZAXPY, ZCOPY, ZGEMV, ZGETRS, ZLACN2
+*     ..
+*     .. Intrinsic Functions ..
+      INTRINSIC          ABS, DBLE, DIMAG, MAX
+*     ..
+*     .. Statement Functions ..
+      DOUBLE PRECISION   CABS1
+*     ..
+*     .. Statement Function definitions ..
+      CABS1( ZDUM ) = ABS( DBLE( ZDUM ) ) + ABS( DIMAG( ZDUM ) )
+*     ..
+*     .. Executable Statements ..
 *
-                  CALL ZUNGQR( M, N, N, A, LDA, WORK( ITAU ),
-     $                         WORK( IWORK ), LWORK-IWORK+1, IERR )
-                  IE = 1
-                  ITAUQ = ITAU
-                  ITAUP = ITAUQ + N
-                  IWORK = ITAUP + N
+*     Test the input parameters.
 *
-*                 Bidiagonalize R in VT
-*                 (CWorkspace: need 3*N, prefer 2*N+2*N*NB)
-*                 (RWorkspace: N)
+      INFO = 0
+      NOTRAN = LSAME( TRANS, 'N' )
+      IF( .NOT.NOTRAN .AND. .NOT.LSAME( TRANS, 'T' ) .AND. .NOT.
+     $    LSAME( TRANS, 'C' ) ) THEN
+         INFO = -1
+      ELSE IF( N.LT.0 ) THEN
+         INFO = -2
+      ELSE IF( NRHS.LT.0 ) THEN
+         INFO = -3
+      ELSE IF( LDA.LT.MAX( 1, N ) ) THEN
+         INFO = -5
+      ELSE IF( LDAF.LT.MAX( 1, N ) ) THEN
+         INFO = -7
+      ELSE IF( LDB.LT.MAX( 1, N ) ) THEN
+         INFO = -10
+      ELSE IF( LDX.LT.MAX( 1, N ) ) THEN
+         INFO = -12
+      END IF
+      IF( INFO.NE.0 ) THEN
+         CALL XERBLA( 'ZGERFS', -INFO )
+         RETURN
+      END IF
 *
-                  CALL ZGEBRD( N, N, VT, LDVT, S, RWORK( IE ),
-     $                         WORK( ITAUQ ), WORK( ITAUP ),
-     $                         WORK( IWORK ), LWORK-IWORK+1, IERR )
+*     Quick return if possible
 *
-*                 Multiply Q in A by left vectors bidiagonalizing R
-*                 (CWorkspace: need 2*N+M, prefer 2*N+M*NB)
-*                 (RWorkspace: 0)
+      IF( N.EQ.0 .OR. NRHS.EQ.0 ) THEN
+         DO 10 J = 1, NRHS
+            FERR( J ) = ZERO
+            BERR( J ) = ZERO
+   10    CONTINUE
+         RETURN
+      END IF
 *
-                  CALL ZUNMBR( 'Q', 'R', 'N', M, N, N, VT, LDVT,
-     $                         WORK( ITAUQ ), A, LDA, WORK( IWORK ),
-     $                         LWORK-IWORK+1, IERR )
+      IF( NOTRAN ) THEN
+         TRANSN = 'N'
+         TRANST = 'C'
+      ELSE
+         TRANSN = 'C'
+         TRANST = 'N'
+      END IF
 *
-*                 Generate right vectors bidiagonalizing R in VT
-*                 (CWorkspace: need 3*N-1, prefer 2*N+(N-1)*NB)
-*                 (RWorkspace: 0)
+*     NZ = maximum number of nonzero elements in each row of A, plus 1
 *
-                  CALL ZUNGBR( 'P', N, N, N, VT, LDVT, WORK( ITAUP ),
-     $                         WORK( IWORK ), LWORK-IWORK+1, IERR )
-                  IRWORK = IE + N
+      NZ = N + 1
+      EPS = DLAMCH( 'Epsilon' )
+      SAFMIN = DLAMCH( 'Safe minimum' )
+      SAFE1 = NZ*SAFMIN
+      SAFE2 = SAFE1 / EPS
 *
-*                 Perform bidiagonal QR iteration, computing left
-*                 singular vectors of A in A and computing right
-*                 singular vectors of A in VT
-*                 (CWorkspace: 0)
-*                 (RWorkspace: need BDSPAC)
+*     Do for each right hand side
 *
-                  CALL ZBDSQR( 'U', N, N, M, 0, S, RWORK( IE ), VT,
-     $                         LDVT, A, LDA, CDUM, 1, RWORK( IRWORK ),
-     $                         INFO )
+      DO 140 J = 1, NRHS
 *
-               END IF
+         COUNT = 1
+         LSTRES = THREE
+   20    CONTINUE
 *
-            ELSE IF( WNTUS ) THEN
+*        Loop until stopping criterion is satisfied.
 *
-               IF( WNTVN ) THEN
+*        Compute residual R = B - op(A) * X,
+*        where op(A) = A, A**T, or A**H, depending on TRANS.
 *
-*                 Path 4 (M much larger than N, JOBU='S', JOBVT='N')
-*                 N left singular vectors to be computed in U and
-*                 no right singular vectors to be computed
+         CALL ZCOPY( N, B( 1, J ), 1, WORK, 1 )
+         CALL ZGEMV( TRANS, N, N, -ONE, A, LDA, X( 1, J ), 1, ONE, WORK,
+     $               1 )
 *
-                  IF( LWORK.GE.N*N+3*N ) THEN
+*        Compute componentwise relative backward error from formula
 *
-*                    Sufficient workspace for a fast algorithm
+*        max(i) ( abs(R(i)) / ( abs(op(A))*abs(X) + abs(B) )(i) )
 *
-                     IR = 1
-                     IF( LWORK.GE.WRKBL+LDA*N ) THEN
+*        where abs(Z) is the componentwise absolute value of the matrix
+*        or vector Z.  If the i-th component of the denominator is less
+*        than SAFE2, then SAFE1 is added to the i-th components of the
+*        numerator and denominator before dividing.
 *
-*                       WORK(IR) is LDA by N
+         DO 30 I = 1, N
+            RWORK( I ) = CABS1( B( I, J ) )
+   30    CONTINUE
 *
-                        LDWRKR = LDA
-                     ELSE
+*        Compute abs(op(A))*abs(X) + abs(B).
 *
-*                       WORK(IR) is N by N
+         IF( NOTRAN ) THEN
+            DO 50 K = 1, N
+               XK = CABS1( X( K, J ) )
+               DO 40 I = 1, N
+                  RWORK( I ) = RWORK( I ) + CABS1( A( I, K ) )*XK
+   40          CONTINUE
+   50       CONTINUE
+         ELSE
+            DO 70 K = 1, N
+               S = ZERO
+               DO 60 I = 1, N
+                  S = S + CABS1( A( I, K ) )*CABS1( X( I, J ) )
+   60          CONTINUE
+               RWORK( K ) = RWORK( K ) + S
+   70       CONTINUE
+         END IF
+         S = ZERO
+         DO 80 I = 1, N
+            IF( RWORK( I ).GT.SAFE2 ) THEN
+               S = MAX( S, CABS1( WORK( I ) ) / RWORK( I ) )
+            ELSE
+               S = MAX( S, ( CABS1( WORK( I ) )+SAFE1 ) /
+     $             ( RWORK( I )+SAFE1 ) )
+            END IF
+   80    CONTINUE
+         BERR( J ) = S
 *
-                        LDWRKR = N
-                     END IF
-                     ITAU = IR + LDWRKR*N
-                     IWORK = ITAU + N
+*        Test stopping criterion. Continue iterating if
+*           1) The residual BERR(J) is larger than machine epsilon, and
+*           2) BERR(J) decreased by at least a factor of 2 during the
+*              last iteration, and
+*           3) At most ITMAX iterations tried.
 *
-*                    Compute A=Q*R
-*                    (CWorkspace: need N*N+2*N, prefer N*N+N+N*NB)
-*                    (RWorkspace: 0)
+         IF( BERR( J ).GT.EPS .AND. TWO*BERR( J ).LE.LSTRES .AND.
+     $       COUNT.LE.ITMAX ) THEN
 *
-                     CALL ZGEQRF( M, N, A, LDA, WORK( ITAU ),
-     $                            WORK( IWORK ), LWORK-IWORK+1, IERR )
+*           Update solution and try again.
 *
-*                    Copy R to WORK(IR), zeroing out below it
+            CALL ZGETRS( TRANS, N, 1, AF, LDAF, IPIV, WORK, N, INFO )
+            CALL ZAXPY( N, ONE, WORK, 1, X( 1, J ), 1 )
+            LSTRES = BERR( J )
+            COUNT = COUNT + 1
+            GO TO 20
+         END IF
 *
-                     CALL ZLACPY( 'U', N, N, A, LDA, WORK( IR ),
-     $                            LDWRKR )
-                     CALL ZLASET( 'L', N-1, N-1, CZERO, CZERO,
-     $                            WORK( IR+1 ), LDWRKR )
+*        Bound error from formula
 *
-*                    Generate Q in A
-*                    (CWorkspace: need N*N+2*N, prefer N*N+N+N*NB)
-*                    (RWorkspace: 0)
+*        norm(X - XTRUE) / norm(X) .le. FERR =
+*        norm( abs(inv(op(A)))*
+*           ( abs(R) + NZ*EPS*( abs(op(A))*abs(X)+abs(B) ))) / norm(X)
 *
-                     CALL ZUNGQR( M, N, N, A, LDA, WORK( ITAU ),
-     $                            WORK( IWORK ), LWORK-IWORK+1, IERR )
-                     IE = 1
-                     ITAUQ = ITAU
-                     ITAUP = ITAUQ + N
-                     IWORK = ITAUP + N
+*        where
+*          norm(Z) is the magnitude of the largest component of Z
+*          inv(op(A)) is the inverse of op(A)
+*          abs(Z) is the componentwise absolute value of the matrix or
+*             vector Z
+*          NZ is the maximum number of nonzeros in any row of A, plus 1
+*          EPS is machine epsilon
 *
-*                    Bidiagonalize R in WORK(IR)
-*                    (CWorkspace: need N*N+3*N, prefer N*N+2*N+2*N*NB)
-*                    (RWorkspace: need N)
+*        The i-th component of abs(R)+NZ*EPS*(abs(op(A))*abs(X)+abs(B))
+*        is incremented by SAFE1 if the i-th component of
+*        abs(op(A))*abs(X) + abs(B) is less than SAFE2.
 *
-                     CALL ZGEBRD( N, N, WORK( IR ), LDWRKR, S,
-     $                            RWORK( IE ), WORK( ITAUQ ),
-     $                            WORK( ITAUP ), WORK( IWORK ),
-     $                            LWORK-IWORK+1, IERR )
+*        Use ZLACN2 to estimate the infinity-norm of the matrix
+*           inv(op(A)) * diag(W),
+*        where W = abs(R) + NZ*EPS*( abs(op(A))*abs(X)+abs(B) )))
 *
-*                    Generate left vectors bidiagonalizing R in WORK(IR)
-*                    (CWorkspace: need N*N+3*N, prefer N*N+2*N+N*NB)
-*                    (RWorkspace: 0)
+         DO 90 I = 1, N
+            IF( RWORK( I ).GT.SAFE2 ) THEN
+               RWORK( I ) = CABS1( WORK( I ) ) + NZ*EPS*RWORK( I )
+            ELSE
+               RWORK( I ) = CABS1( WORK( I ) ) + NZ*EPS*RWORK( I ) +
+     $                      SAFE1
+            END IF
+   90    CONTINUE
 *
-                     CALL ZUNGBR( 'Q', N, N, N, WORK( IR ), LDWRKR,
-     $                            WORK( ITAUQ ), WORK( IWORK ),
-     $                            LWORK-IWORK+1, IERR )
-                     IRWORK = IE + N
+         KASE = 0
+  100    CONTINUE
+         CALL ZLACN2( N, WORK( N+1 ), WORK, FERR( J ), KASE, ISAVE )
+         IF( KASE.NE.0 ) THEN
+            IF( KASE.EQ.1 ) THEN
 *
-*                    Perform bidiagonal QR iteration, computing left
-*                    singular vectors of R in WORK(IR)
-*                    (CWorkspace: need N*N)
-*                    (RWorkspace: need BDSPAC)
+*              Multiply by diag(W)*inv(op(A)**H).
 *
-                     CALL ZBDSQR( 'U', N, 0, N, 0, S, RWORK( IE ), CDUM,
-     $                            1, WORK( IR ), LDWRKR, CDUM, 1,
-     $                            RWORK( IRWORK ), INFO )
+               CALL ZGETRS( TRANST, N, 1, AF, LDAF, IPIV, WORK, N,
+     $                      INFO )
+               DO 110 I = 1, N
+                  WORK( I ) = RWORK( I )*WORK( I )
+  110          CONTINUE
+            ELSE
 *
-*                    Multiply Q in A by left singular vectors of R in
-*                    WORK(IR), storing result in U
-*                    (CWorkspace: need N*N)
-*                    (RWorkspace: 0)
+*              Multiply by inv(op(A))*diag(W).
 *
-                     CALL ZGEMM( 'N', 'N', M, N, N, CONE, A, LDA,
-     $                           WORK( IR ), LDWRKR, CZERO, U, LDU )
+               DO 120 I = 1, N
+                  WORK( I ) = RWORK( I )*WORK( I )
+  120          CONTINUE
+               CALL ZGETRS( TRANSN, N, 1, AF, LDAF, IPIV, WORK, N,
+     $                      INFO )
+            END IF
+            GO TO 100
+         END IF
 *
-                  ELSE
+*        Normalize error.
 *
-*                    Insufficient workspace for a fast algorithm
+         LSTRES = ZERO
+         DO 130 I = 1, N
+            LSTRES = MAX( LSTRES, CABS1( X( I, J ) ) )
+  130    CONTINUE
+         IF( LSTRES.NE.ZERO )
+     $      FERR( J ) = FERR( J ) / LSTRES
 *
-                     ITAU = 1
-                     IWORK = ITAU + N
+  140 CONTINUE
 *
-*                    Compute A=Q*R, copying result to U
-*                    (CWorkspace: need 2*N, prefer N+N*NB)
-*                    (RWorkspace: 0)
+      RETURN
 *
-                     CALL ZGEQRF( M, N, A, LDA, WORK( ITAU ),
-     $                            WORK( IWORK ), LWORK-IWORK+1, IERR )
-                     CALL ZLACPY( 'L', M, N, A, LDA, U, LDU )
+*     End of ZGERFS
 *
-*                    Generate Q in U
-*                    (CWorkspace: need 2*N, prefer N+N*NB)
-*                    (RWorkspace: 0)
+      END
+*> \brief \b ZGESC2 solves a system of linear equations using the LU factorization with complete pivoting computed by sgetc2.
 *
-                     CALL ZUNGQR( M, N, N, U, LDU, WORK( ITAU ),
-     $                            WORK( IWORK ), LWORK-IWORK+1, IERR )
-                     IE = 1
-                     ITAUQ = ITAU
-                     ITAUP = ITAUQ + N
-                     IWORK = ITAUP + N
+*  =========== DOCUMENTATION ===========
 *
-*                    Zero out below R in A
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
-                     CALL ZLASET( 'L', N-1, N-1, CZERO, CZERO,
-     $                            A( 2, 1 ), LDA )
+*> \htmlonly
+*> Download ZGESC2 + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/zgesc2.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/zgesc2.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/zgesc2.f">
+*> [TXT]</a>
+*> \endhtmlonly
 *
-*                    Bidiagonalize R in A
-*                    (CWorkspace: need 3*N, prefer 2*N+2*N*NB)
-*                    (RWorkspace: need N)
+*  Definition:
+*  ===========
 *
-                     CALL ZGEBRD( N, N, A, LDA, S, RWORK( IE ),
-     $                            WORK( ITAUQ ), WORK( ITAUP ),
-     $                            WORK( IWORK ), LWORK-IWORK+1, IERR )
+*       SUBROUTINE ZGESC2( N, A, LDA, RHS, IPIV, JPIV, SCALE )
 *
-*                    Multiply Q in U by left vectors bidiagonalizing R
-*                    (CWorkspace: need 2*N+M, prefer 2*N+M*NB)
-*                    (RWorkspace: 0)
+*       .. Scalar Arguments ..
+*       INTEGER            LDA, N
+*       DOUBLE PRECISION   SCALE
+*       ..
+*       .. Array Arguments ..
+*       INTEGER            IPIV( * ), JPIV( * )
+*       COMPLEX*16         A( LDA, * ), RHS( * )
+*       ..
 *
-                     CALL ZUNMBR( 'Q', 'R', 'N', M, N, N, A, LDA,
-     $                            WORK( ITAUQ ), U, LDU, WORK( IWORK ),
-     $                            LWORK-IWORK+1, IERR )
-                     IRWORK = IE + N
 *
-*                    Perform bidiagonal QR iteration, computing left
-*                    singular vectors of A in U
-*                    (CWorkspace: 0)
-*                    (RWorkspace: need BDSPAC)
+*> \par Purpose:
+*  =============
+*>
+*> \verbatim
+*>
+*> ZGESC2 solves a system of linear equations
+*>
+*>           A * X = scale* RHS
+*>
+*> with a general N-by-N matrix A using the LU factorization with
+*> complete pivoting computed by ZGETC2.
+*>
+*> \endverbatim
 *
-                     CALL ZBDSQR( 'U', N, 0, M, 0, S, RWORK( IE ), CDUM,
-     $                            1, U, LDU, CDUM, 1, RWORK( IRWORK ),
-     $                            INFO )
+*  Arguments:
+*  ==========
 *
-                  END IF
+*> \param[in] N
+*> \verbatim
+*>          N is INTEGER
+*>          The number of columns of the matrix A.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*>          A is COMPLEX*16 array, dimension (LDA, N)
+*>          On entry, the  LU part of the factorization of the n-by-n
+*>          matrix A computed by ZGETC2:  A = P * L * U * Q
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*>          LDA is INTEGER
+*>          The leading dimension of the array A.  LDA >= max(1, N).
+*> \endverbatim
+*>
+*> \param[in,out] RHS
+*> \verbatim
+*>          RHS is COMPLEX*16 array, dimension N.
+*>          On entry, the right hand side vector b.
+*>          On exit, the solution vector X.
+*> \endverbatim
+*>
+*> \param[in] IPIV
+*> \verbatim
+*>          IPIV is INTEGER array, dimension (N).
+*>          The pivot indices; for 1 <= i <= N, row i of the
+*>          matrix has been interchanged with row IPIV(i).
+*> \endverbatim
+*>
+*> \param[in] JPIV
+*> \verbatim
+*>          JPIV is INTEGER array, dimension (N).
+*>          The pivot indices; for 1 <= j <= N, column j of the
+*>          matrix has been interchanged with column JPIV(j).
+*> \endverbatim
+*>
+*> \param[out] SCALE
+*> \verbatim
+*>          SCALE is DOUBLE PRECISION
+*>           On exit, SCALE contains the scale factor. SCALE is chosen
+*>           0 <= SCALE <= 1 to prevent owerflow in the solution.
+*> \endverbatim
 *
-               ELSE IF( WNTVO ) THEN
+*  Authors:
+*  ========
 *
-*                 Path 5 (M much larger than N, JOBU='S', JOBVT='O')
-*                 N left singular vectors to be computed in U and
-*                 N right singular vectors to be overwritten on A
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-                  IF( LWORK.GE.2*N*N+3*N ) THEN
+*> \date December 2016
 *
-*                    Sufficient workspace for a fast algorithm
+*> \ingroup complex16GEauxiliary
 *
-                     IU = 1
-                     IF( LWORK.GE.WRKBL+2*LDA*N ) THEN
+*> \par Contributors:
+*  ==================
+*>
+*>     Bo Kagstrom and Peter Poromaa, Department of Computing Science,
+*>     Umea University, S-901 87 Umea, Sweden.
 *
-*                       WORK(IU) is LDA by N and WORK(IR) is LDA by N
+*  =====================================================================
+      SUBROUTINE ZGESC2( N, A, LDA, RHS, IPIV, JPIV, SCALE )
 *
-                        LDWRKU = LDA
-                        IR = IU + LDWRKU*N
-                        LDWRKR = LDA
-                     ELSE IF( LWORK.GE.WRKBL+( LDA+N )*N ) THEN
+*  -- LAPACK auxiliary routine (version 3.7.0) --
+*  -- LAPACK is a software package provided by Univ. of Tennessee,    --
+*  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+*     December 2016
 *
-*                       WORK(IU) is LDA by N and WORK(IR) is N by N
+*     .. Scalar Arguments ..
+      INTEGER            LDA, N
+      DOUBLE PRECISION   SCALE
+*     ..
+*     .. Array Arguments ..
+      INTEGER            IPIV( * ), JPIV( * )
+      COMPLEX*16         A( LDA, * ), RHS( * )
+*     ..
 *
-                        LDWRKU = LDA
-                        IR = IU + LDWRKU*N
-                        LDWRKR = N
-                     ELSE
+*  =====================================================================
 *
-*                       WORK(IU) is N by N and WORK(IR) is N by N
+*     .. Parameters ..
+      DOUBLE PRECISION   ZERO, ONE, TWO
+      PARAMETER          ( ZERO = 0.0D+0, ONE = 1.0D+0, TWO = 2.0D+0 )
+*     ..
+*     .. Local Scalars ..
+      INTEGER            I, J
+      DOUBLE PRECISION   BIGNUM, EPS, SMLNUM
+      COMPLEX*16         TEMP
+*     ..
+*     .. External Subroutines ..
+      EXTERNAL           ZLASWP, ZSCAL
+*     ..
+*     .. External Functions ..
+      INTEGER            IZAMAX
+      DOUBLE PRECISION   DLAMCH
+      EXTERNAL           IZAMAX, DLAMCH
+*     ..
+*     .. Intrinsic Functions ..
+      INTRINSIC          ABS, DBLE, DCMPLX
+*     ..
+*     .. Executable Statements ..
 *
-                        LDWRKU = N
-                        IR = IU + LDWRKU*N
-                        LDWRKR = N
-                     END IF
-                     ITAU = IR + LDWRKR*N
-                     IWORK = ITAU + N
+*     Set constant to control overflow
 *
-*                    Compute A=Q*R
-*                    (CWorkspace: need 2*N*N+2*N, prefer 2*N*N+N+N*NB)
-*                    (RWorkspace: 0)
+      EPS = DLAMCH( 'P' )
+      SMLNUM = DLAMCH( 'S' ) / EPS
+      BIGNUM = ONE / SMLNUM
+      CALL DLABAD( SMLNUM, BIGNUM )
 *
-                     CALL ZGEQRF( M, N, A, LDA, WORK( ITAU ),
-     $                            WORK( IWORK ), LWORK-IWORK+1, IERR )
+*     Apply permutations IPIV to RHS
 *
-*                    Copy R to WORK(IU), zeroing out below it
+      CALL ZLASWP( 1, RHS, LDA, 1, N-1, IPIV, 1 )
 *
-                     CALL ZLACPY( 'U', N, N, A, LDA, WORK( IU ),
-     $                            LDWRKU )
-                     CALL ZLASET( 'L', N-1, N-1, CZERO, CZERO,
-     $                            WORK( IU+1 ), LDWRKU )
+*     Solve for L part
 *
-*                    Generate Q in A
-*                    (CWorkspace: need 2*N*N+2*N, prefer 2*N*N+N+N*NB)
-*                    (RWorkspace: 0)
+      DO 20 I = 1, N - 1
+         DO 10 J = I + 1, N
+            RHS( J ) = RHS( J ) - A( J, I )*RHS( I )
+   10    CONTINUE
+   20 CONTINUE
 *
-                     CALL ZUNGQR( M, N, N, A, LDA, WORK( ITAU ),
-     $                            WORK( IWORK ), LWORK-IWORK+1, IERR )
-                     IE = 1
-                     ITAUQ = ITAU
-                     ITAUP = ITAUQ + N
-                     IWORK = ITAUP + N
+*     Solve for U part
 *
-*                    Bidiagonalize R in WORK(IU), copying result to
-*                    WORK(IR)
-*                    (CWorkspace: need   2*N*N+3*N,
-*                                 prefer 2*N*N+2*N+2*N*NB)
-*                    (RWorkspace: need   N)
+      SCALE = ONE
 *
-                     CALL ZGEBRD( N, N, WORK( IU ), LDWRKU, S,
-     $                            RWORK( IE ), WORK( ITAUQ ),
-     $                            WORK( ITAUP ), WORK( IWORK ),
-     $                            LWORK-IWORK+1, IERR )
-                     CALL ZLACPY( 'U', N, N, WORK( IU ), LDWRKU,
-     $                            WORK( IR ), LDWRKR )
+*     Check for scaling
 *
-*                    Generate left bidiagonalizing vectors in WORK(IU)
-*                    (CWorkspace: need 2*N*N+3*N, prefer 2*N*N+2*N+N*NB)
-*                    (RWorkspace: 0)
+      I = IZAMAX( N, RHS, 1 )
+      IF( TWO*SMLNUM*ABS( RHS( I ) ).GT.ABS( A( N, N ) ) ) THEN
+         TEMP = DCMPLX( ONE / TWO, ZERO ) / ABS( RHS( I ) )
+         CALL ZSCAL( N, TEMP, RHS( 1 ), 1 )
+         SCALE = SCALE*DBLE( TEMP )
+      END IF
+      DO 40 I = N, 1, -1
+         TEMP = DCMPLX( ONE, ZERO ) / A( I, I )
+         RHS( I ) = RHS( I )*TEMP
+         DO 30 J = I + 1, N
+            RHS( I ) = RHS( I ) - RHS( J )*( A( I, J )*TEMP )
+   30    CONTINUE
+   40 CONTINUE
 *
-                     CALL ZUNGBR( 'Q', N, N, N, WORK( IU ), LDWRKU,
-     $                            WORK( ITAUQ ), WORK( IWORK ),
-     $                            LWORK-IWORK+1, IERR )
+*     Apply permutations JPIV to the solution (RHS)
 *
-*                    Generate right bidiagonalizing vectors in WORK(IR)
-*                    (CWorkspace: need   2*N*N+3*N-1,
-*                                 prefer 2*N*N+2*N+(N-1)*NB)
-*                    (RWorkspace: 0)
+      CALL ZLASWP( 1, RHS, LDA, 1, N-1, JPIV, -1 )
+      RETURN
 *
-                     CALL ZUNGBR( 'P', N, N, N, WORK( IR ), LDWRKR,
-     $                            WORK( ITAUP ), WORK( IWORK ),
-     $                            LWORK-IWORK+1, IERR )
-                     IRWORK = IE + N
+*     End of ZGESC2
 *
-*                    Perform bidiagonal QR iteration, computing left
-*                    singular vectors of R in WORK(IU) and computing
-*                    right singular vectors of R in WORK(IR)
-*                    (CWorkspace: need 2*N*N)
-*                    (RWorkspace: need BDSPAC)
+      END
+*> \brief \b ZGESDD
 *
-                     CALL ZBDSQR( 'U', N, N, N, 0, S, RWORK( IE ),
-     $                            WORK( IR ), LDWRKR, WORK( IU ),
-     $                            LDWRKU, CDUM, 1, RWORK( IRWORK ),
-     $                            INFO )
+*  =========== DOCUMENTATION ===========
 *
-*                    Multiply Q in A by left singular vectors of R in
-*                    WORK(IU), storing result in U
-*                    (CWorkspace: need N*N)
-*                    (RWorkspace: 0)
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
-                     CALL ZGEMM( 'N', 'N', M, N, N, CONE, A, LDA,
-     $                           WORK( IU ), LDWRKU, CZERO, U, LDU )
+*> \htmlonly
+*> Download ZGESDD + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/zgesdd.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/zgesdd.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/zgesdd.f">
+*> [TXT]</a>
+*> \endhtmlonly
 *
-*                    Copy right singular vectors of R to A
-*                    (CWorkspace: need N*N)
-*                    (RWorkspace: 0)
+*  Definition:
+*  ===========
 *
-                     CALL ZLACPY( 'F', N, N, WORK( IR ), LDWRKR, A,
-     $                            LDA )
+*       SUBROUTINE ZGESDD( JOBZ, M, N, A, LDA, S, U, LDU, VT, LDVT,
+*                          WORK, LWORK, RWORK, IWORK, INFO )
 *
-                  ELSE
+*       .. Scalar Arguments ..
+*       CHARACTER          JOBZ
+*       INTEGER            INFO, LDA, LDU, LDVT, LWORK, M, N
+*       ..
+*       .. Array Arguments ..
+*       INTEGER            IWORK( * )
+*       DOUBLE PRECISION   RWORK( * ), S( * )
+*       COMPLEX*16         A( LDA, * ), U( LDU, * ), VT( LDVT, * ),
+*      $                   WORK( * )
+*       ..
 *
-*                    Insufficient workspace for a fast algorithm
 *
-                     ITAU = 1
-                     IWORK = ITAU + N
+*> \par Purpose:
+*  =============
+*>
+*> \verbatim
+*>
+*> ZGESDD computes the singular value decomposition (SVD) of a complex
+*> M-by-N matrix A, optionally computing the left and/or right singular
+*> vectors, by using divide-and-conquer method. The SVD is written
+*>
+*>      A = U * SIGMA * conjugate-transpose(V)
+*>
+*> where SIGMA is an M-by-N matrix which is zero except for its
+*> min(m,n) diagonal elements, U is an M-by-M unitary matrix, and
+*> V is an N-by-N unitary matrix.  The diagonal elements of SIGMA
+*> are the singular values of A; they are real and non-negative, and
+*> are returned in descending order.  The first min(m,n) columns of
+*> U and V are the left and right singular vectors of A.
+*>
+*> Note that the routine returns VT = V**H, not V.
+*>
+*> The divide and conquer algorithm makes very mild assumptions about
+*> floating point arithmetic. It will work on machines with a guard
+*> digit in add/subtract, or on those binary machines without guard
+*> digits which subtract like the Cray X-MP, Cray Y-MP, Cray C-90, or
+*> Cray-2. It could conceivably fail on hexadecimal or decimal machines
+*> without guard digits, but we know of none.
+*> \endverbatim
 *
-*                    Compute A=Q*R, copying result to U
-*                    (CWorkspace: need 2*N, prefer N+N*NB)
-*                    (RWorkspace: 0)
+*  Arguments:
+*  ==========
 *
-                     CALL ZGEQRF( M, N, A, LDA, WORK( ITAU ),
-     $                            WORK( IWORK ), LWORK-IWORK+1, IERR )
-                     CALL ZLACPY( 'L', M, N, A, LDA, U, LDU )
+*> \param[in] JOBZ
+*> \verbatim
+*>          JOBZ is CHARACTER*1
+*>          Specifies options for computing all or part of the matrix U:
+*>          = 'A':  all M columns of U and all N rows of V**H are
+*>                  returned in the arrays U and VT;
+*>          = 'S':  the first min(M,N) columns of U and the first
+*>                  min(M,N) rows of V**H are returned in the arrays U
+*>                  and VT;
+*>          = 'O':  If M >= N, the first N columns of U are overwritten
+*>                  in the array A and all rows of V**H are returned in
+*>                  the array VT;
+*>                  otherwise, all columns of U are returned in the
+*>                  array U and the first M rows of V**H are overwritten
+*>                  in the array A;
+*>          = 'N':  no columns of U or rows of V**H are computed.
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*>          M is INTEGER
+*>          The number of rows of the input matrix A.  M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*>          N is INTEGER
+*>          The number of columns of the input matrix A.  N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*>          A is COMPLEX*16 array, dimension (LDA,N)
+*>          On entry, the M-by-N matrix A.
+*>          On exit,
+*>          if JOBZ = 'O',  A is overwritten with the first N columns
+*>                          of U (the left singular vectors, stored
+*>                          columnwise) if M >= N;
+*>                          A is overwritten with the first M rows
+*>                          of V**H (the right singular vectors, stored
+*>                          rowwise) otherwise.
+*>          if JOBZ .ne. 'O', the contents of A are destroyed.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*>          LDA is INTEGER
+*>          The leading dimension of the array A.  LDA >= max(1,M).
+*> \endverbatim
+*>
+*> \param[out] S
+*> \verbatim
+*>          S is DOUBLE PRECISION array, dimension (min(M,N))
+*>          The singular values of A, sorted so that S(i) >= S(i+1).
+*> \endverbatim
+*>
+*> \param[out] U
+*> \verbatim
+*>          U is COMPLEX*16 array, dimension (LDU,UCOL)
+*>          UCOL = M if JOBZ = 'A' or JOBZ = 'O' and M < N;
+*>          UCOL = min(M,N) if JOBZ = 'S'.
+*>          If JOBZ = 'A' or JOBZ = 'O' and M < N, U contains the M-by-M
+*>          unitary matrix U;
+*>          if JOBZ = 'S', U contains the first min(M,N) columns of U
+*>          (the left singular vectors, stored columnwise);
+*>          if JOBZ = 'O' and M >= N, or JOBZ = 'N', U is not referenced.
+*> \endverbatim
+*>
+*> \param[in] LDU
+*> \verbatim
+*>          LDU is INTEGER
+*>          The leading dimension of the array U.  LDU >= 1;
+*>          if JOBZ = 'S' or 'A' or JOBZ = 'O' and M < N, LDU >= M.
+*> \endverbatim
+*>
+*> \param[out] VT
+*> \verbatim
+*>          VT is COMPLEX*16 array, dimension (LDVT,N)
+*>          If JOBZ = 'A' or JOBZ = 'O' and M >= N, VT contains the
+*>          N-by-N unitary matrix V**H;
+*>          if JOBZ = 'S', VT contains the first min(M,N) rows of
+*>          V**H (the right singular vectors, stored rowwise);
+*>          if JOBZ = 'O' and M < N, or JOBZ = 'N', VT is not referenced.
+*> \endverbatim
+*>
+*> \param[in] LDVT
+*> \verbatim
+*>          LDVT is INTEGER
+*>          The leading dimension of the array VT.  LDVT >= 1;
+*>          if JOBZ = 'A' or JOBZ = 'O' and M >= N, LDVT >= N;
+*>          if JOBZ = 'S', LDVT >= min(M,N).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*>          WORK is COMPLEX*16 array, dimension (MAX(1,LWORK))
+*>          On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*>          LWORK is INTEGER
+*>          The dimension of the array WORK. LWORK >= 1.
+*>          If LWORK = -1, a workspace query is assumed.  The optimal
+*>          size for the WORK array is calculated and stored in WORK(1),
+*>          and no other work except argument checking is performed.
+*>
+*>          Let mx = max(M,N) and mn = min(M,N).
+*>          If JOBZ = 'N', LWORK >= 2*mn + mx.
+*>          If JOBZ = 'O', LWORK >= 2*mn*mn + 2*mn + mx.
+*>          If JOBZ = 'S', LWORK >=   mn*mn + 3*mn.
+*>          If JOBZ = 'A', LWORK >=   mn*mn + 2*mn + mx.
+*>          These are not tight minimums in all cases; see comments inside code.
+*>          For good performance, LWORK should generally be larger;
+*>          a query is recommended.
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*>          RWORK is DOUBLE PRECISION array, dimension (MAX(1,LRWORK))
+*>          Let mx = max(M,N) and mn = min(M,N).
+*>          If JOBZ = 'N',    LRWORK >= 5*mn (LAPACK <= 3.6 needs 7*mn);
+*>          else if mx >> mn, LRWORK >= 5*mn*mn + 5*mn;
+*>          else              LRWORK >= max( 5*mn*mn + 5*mn,
+*>                                           2*mx*mn + 2*mn*mn + mn ).
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*>          IWORK is INTEGER array, dimension (8*min(M,N))
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*>          INFO is INTEGER
+*>          = 0:  successful exit.
+*>          < 0:  if INFO = -i, the i-th argument had an illegal value.
+*>          > 0:  The updating process of DBDSDC did not converge.
+*> \endverbatim
 *
-*                    Generate Q in U
-*                    (CWorkspace: need 2*N, prefer N+N*NB)
-*                    (RWorkspace: 0)
+*  Authors:
+*  ========
 *
-                     CALL ZUNGQR( M, N, N, U, LDU, WORK( ITAU ),
-     $                            WORK( IWORK ), LWORK-IWORK+1, IERR )
-                     IE = 1
-                     ITAUQ = ITAU
-                     ITAUP = ITAUQ + N
-                     IWORK = ITAUP + N
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*                    Zero out below R in A
+*> \date June 2016
 *
-                     CALL ZLASET( 'L', N-1, N-1, CZERO, CZERO,
-     $                            A( 2, 1 ), LDA )
+*> \ingroup complex16GEsing
 *
-*                    Bidiagonalize R in A
-*                    (CWorkspace: need 3*N, prefer 2*N+2*N*NB)
-*                    (RWorkspace: need N)
+*> \par Contributors:
+*  ==================
+*>
+*>     Ming Gu and Huan Ren, Computer Science Division, University of
+*>     California at Berkeley, USA
+*>
+*  =====================================================================
+      SUBROUTINE ZGESDD( JOBZ, M, N, A, LDA, S, U, LDU, VT, LDVT,
+     $                   WORK, LWORK, RWORK, IWORK, INFO )
+      implicit none
 *
-                     CALL ZGEBRD( N, N, A, LDA, S, RWORK( IE ),
-     $                            WORK( ITAUQ ), WORK( ITAUP ),
-     $                            WORK( IWORK ), LWORK-IWORK+1, IERR )
+*  -- LAPACK driver routine (version 3.7.0) --
+*  -- LAPACK is a software package provided by Univ. of Tennessee,    --
+*  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+*     June 2016
 *
-*                    Multiply Q in U by left vectors bidiagonalizing R
-*                    (CWorkspace: need 2*N+M, prefer 2*N+M*NB)
-*                    (RWorkspace: 0)
+*     .. Scalar Arguments ..
+      CHARACTER          JOBZ
+      INTEGER            INFO, LDA, LDU, LDVT, LWORK, M, N
+*     ..
+*     .. Array Arguments ..
+      INTEGER            IWORK( * )
+      DOUBLE PRECISION   RWORK( * ), S( * )
+      COMPLEX*16         A( LDA, * ), U( LDU, * ), VT( LDVT, * ),
+     $                   WORK( * )
+*     ..
 *
-                     CALL ZUNMBR( 'Q', 'R', 'N', M, N, N, A, LDA,
-     $                            WORK( ITAUQ ), U, LDU, WORK( IWORK ),
-     $                            LWORK-IWORK+1, IERR )
+*  =====================================================================
 *
-*                    Generate right vectors bidiagonalizing R in A
-*                    (CWorkspace: need 3*N-1, prefer 2*N+(N-1)*NB)
-*                    (RWorkspace: 0)
+*     .. Parameters ..
+      COMPLEX*16         CZERO, CONE
+      PARAMETER          ( CZERO = ( 0.0D+0, 0.0D+0 ),
+     $                   CONE = ( 1.0D+0, 0.0D+0 ) )
+      DOUBLE PRECISION   ZERO, ONE
+      PARAMETER          ( ZERO = 0.0D+0, ONE = 1.0D+0 )
+*     ..
+*     .. Local Scalars ..
+      LOGICAL            LQUERY, WNTQA, WNTQAS, WNTQN, WNTQO, WNTQS
+      INTEGER            BLK, CHUNK, I, IE, IERR, IL, IR, IRU, IRVT,
+     $                   ISCL, ITAU, ITAUP, ITAUQ, IU, IVT, LDWKVT,
+     $                   LDWRKL, LDWRKR, LDWRKU, MAXWRK, MINMN, MINWRK,
+     $                   MNTHR1, MNTHR2, NRWORK, NWORK, WRKBL
+      INTEGER            LWORK_ZGEBRD_MN, LWORK_ZGEBRD_MM,
+     $                   LWORK_ZGEBRD_NN, LWORK_ZGELQF_MN,
+     $                   LWORK_ZGEQRF_MN,
+     $                   LWORK_ZUNGBR_P_MN, LWORK_ZUNGBR_P_NN,
+     $                   LWORK_ZUNGBR_Q_MN, LWORK_ZUNGBR_Q_MM,
+     $                   LWORK_ZUNGLQ_MN, LWORK_ZUNGLQ_NN,
+     $                   LWORK_ZUNGQR_MM, LWORK_ZUNGQR_MN,
+     $                   LWORK_ZUNMBR_PRC_MM, LWORK_ZUNMBR_QLN_MM,
+     $                   LWORK_ZUNMBR_PRC_MN, LWORK_ZUNMBR_QLN_MN,
+     $                   LWORK_ZUNMBR_PRC_NN, LWORK_ZUNMBR_QLN_NN
+      DOUBLE PRECISION   ANRM, BIGNUM, EPS, SMLNUM
+*     ..
+*     .. Local Arrays ..
+      INTEGER            IDUM( 1 )
+      DOUBLE PRECISION   DUM( 1 )
+      COMPLEX*16         CDUM( 1 )
+*     ..
+*     .. External Subroutines ..
+      EXTERNAL           DBDSDC, DLASCL, XERBLA, ZGEBRD, ZGELQF, ZGEMM,
+     $                   ZGEQRF, ZLACP2, ZLACPY, ZLACRM, ZLARCM, ZLASCL,
+     $                   ZLASET, ZUNGBR, ZUNGLQ, ZUNGQR, ZUNMBR
+*     ..
+*     .. External Functions ..
+      LOGICAL            LSAME
+      DOUBLE PRECISION   DLAMCH, ZLANGE
+      EXTERNAL           LSAME, DLAMCH, ZLANGE
+*     ..
+*     .. Intrinsic Functions ..
+      INTRINSIC          INT, MAX, MIN, SQRT
+*     ..
+*     .. Executable Statements ..
 *
-                     CALL ZUNGBR( 'P', N, N, N, A, LDA, WORK( ITAUP ),
-     $                            WORK( IWORK ), LWORK-IWORK+1, IERR )
-                     IRWORK = IE + N
+*     Test the input arguments
 *
-*                    Perform bidiagonal QR iteration, computing left
-*                    singular vectors of A in U and computing right
-*                    singular vectors of A in A
-*                    (CWorkspace: 0)
-*                    (RWorkspace: need BDSPAC)
+      INFO   = 0
+      MINMN  = MIN( M, N )
+      MNTHR1 = INT( MINMN*17.0D0 / 9.0D0 )
+      MNTHR2 = INT( MINMN*5.0D0 / 3.0D0 )
+      WNTQA  = LSAME( JOBZ, 'A' )
+      WNTQS  = LSAME( JOBZ, 'S' )
+      WNTQAS = WNTQA .OR. WNTQS
+      WNTQO  = LSAME( JOBZ, 'O' )
+      WNTQN  = LSAME( JOBZ, 'N' )
+      LQUERY = ( LWORK.EQ.-1 )
+      MINWRK = 1
+      MAXWRK = 1
 *
-                     CALL ZBDSQR( 'U', N, N, M, 0, S, RWORK( IE ), A,
-     $                            LDA, U, LDU, CDUM, 1, RWORK( IRWORK ),
-     $                            INFO )
+      IF( .NOT.( WNTQA .OR. WNTQS .OR. WNTQO .OR. WNTQN ) ) THEN
+         INFO = -1
+      ELSE IF( M.LT.0 ) THEN
+         INFO = -2
+      ELSE IF( N.LT.0 ) THEN
+         INFO = -3
+      ELSE IF( LDA.LT.MAX( 1, M ) ) THEN
+         INFO = -5
+      ELSE IF( LDU.LT.1 .OR. ( WNTQAS .AND. LDU.LT.M ) .OR.
+     $         ( WNTQO .AND. M.LT.N .AND. LDU.LT.M ) ) THEN
+         INFO = -8
+      ELSE IF( LDVT.LT.1 .OR. ( WNTQA .AND. LDVT.LT.N ) .OR.
+     $         ( WNTQS .AND. LDVT.LT.MINMN ) .OR.
+     $         ( WNTQO .AND. M.GE.N .AND. LDVT.LT.N ) ) THEN
+         INFO = -10
+      END IF
 *
-                  END IF
+*     Compute workspace
+*       Note: Comments in the code beginning "Workspace:" describe the
+*       minimal amount of workspace allocated at that point in the code,
+*       as well as the preferred amount for good performance.
+*       CWorkspace refers to complex workspace, and RWorkspace to
+*       real workspace. NB refers to the optimal block size for the
+*       immediately following subroutine, as returned by ILAENV.)
 *
-               ELSE IF( WNTVAS ) THEN
+      IF( INFO.EQ.0 ) THEN
+         MINWRK = 1
+         MAXWRK = 1
+         IF( M.GE.N .AND. MINMN.GT.0 ) THEN
 *
-*                 Path 6 (M much larger than N, JOBU='S', JOBVT='S'
-*                         or 'A')
-*                 N left singular vectors to be computed in U and
-*                 N right singular vectors to be computed in VT
+*           There is no complex work space needed for bidiagonal SVD
+*           The real work space needed for bidiagonal SVD (dbdsdc) is
+*           BDSPAC = 3*N*N + 4*N for singular values and vectors;
+*           BDSPAC = 4*N         for singular values only;
+*           not including e, RU, and RVT matrices.
 *
-                  IF( LWORK.GE.N*N+3*N ) THEN
+*           Compute space preferred for each routine
+            CALL ZGEBRD( M, N, CDUM(1), M, DUM(1), DUM(1), CDUM(1),
+     $                   CDUM(1), CDUM(1), -1, IERR )
+            LWORK_ZGEBRD_MN = INT( CDUM(1) )
 *
-*                    Sufficient workspace for a fast algorithm
+            CALL ZGEBRD( N, N, CDUM(1), N, DUM(1), DUM(1), CDUM(1),
+     $                   CDUM(1), CDUM(1), -1, IERR )
+            LWORK_ZGEBRD_NN = INT( CDUM(1) )
 *
-                     IU = 1
-                     IF( LWORK.GE.WRKBL+LDA*N ) THEN
+            CALL ZGEQRF( M, N, CDUM(1), M, CDUM(1), CDUM(1), -1, IERR )
+            LWORK_ZGEQRF_MN = INT( CDUM(1) )
 *
-*                       WORK(IU) is LDA by N
+            CALL ZUNGBR( 'P', N, N, N, CDUM(1), N, CDUM(1), CDUM(1),
+     $                   -1, IERR )
+            LWORK_ZUNGBR_P_NN = INT( CDUM(1) )
 *
-                        LDWRKU = LDA
-                     ELSE
+            CALL ZUNGBR( 'Q', M, M, N, CDUM(1), M, CDUM(1), CDUM(1),
+     $                   -1, IERR )
+            LWORK_ZUNGBR_Q_MM = INT( CDUM(1) )
 *
-*                       WORK(IU) is N by N
+            CALL ZUNGBR( 'Q', M, N, N, CDUM(1), M, CDUM(1), CDUM(1),
+     $                   -1, IERR )
+            LWORK_ZUNGBR_Q_MN = INT( CDUM(1) )
 *
-                        LDWRKU = N
-                     END IF
-                     ITAU = IU + LDWRKU*N
-                     IWORK = ITAU + N
+            CALL ZUNGQR( M, M, N, CDUM(1), M, CDUM(1), CDUM(1),
+     $                   -1, IERR )
+            LWORK_ZUNGQR_MM = INT( CDUM(1) )
 *
-*                    Compute A=Q*R
-*                    (CWorkspace: need N*N+2*N, prefer N*N+N+N*NB)
-*                    (RWorkspace: 0)
+            CALL ZUNGQR( M, N, N, CDUM(1), M, CDUM(1), CDUM(1),
+     $                   -1, IERR )
+            LWORK_ZUNGQR_MN = INT( CDUM(1) )
 *
-                     CALL ZGEQRF( M, N, A, LDA, WORK( ITAU ),
-     $                            WORK( IWORK ), LWORK-IWORK+1, IERR )
+            CALL ZUNMBR( 'P', 'R', 'C', N, N, N, CDUM(1), N, CDUM(1),
+     $                   CDUM(1), N, CDUM(1), -1, IERR )
+            LWORK_ZUNMBR_PRC_NN = INT( CDUM(1) )
 *
-*                    Copy R to WORK(IU), zeroing out below it
+            CALL ZUNMBR( 'Q', 'L', 'N', M, M, N, CDUM(1), M, CDUM(1),
+     $                   CDUM(1), M, CDUM(1), -1, IERR )
+            LWORK_ZUNMBR_QLN_MM = INT( CDUM(1) )
 *
-                     CALL ZLACPY( 'U', N, N, A, LDA, WORK( IU ),
-     $                            LDWRKU )
-                     CALL ZLASET( 'L', N-1, N-1, CZERO, CZERO,
-     $                            WORK( IU+1 ), LDWRKU )
+            CALL ZUNMBR( 'Q', 'L', 'N', M, N, N, CDUM(1), M, CDUM(1),
+     $                   CDUM(1), M, CDUM(1), -1, IERR )
+            LWORK_ZUNMBR_QLN_MN = INT( CDUM(1) )
 *
-*                    Generate Q in A
-*                    (CWorkspace: need N*N+2*N, prefer N*N+N+N*NB)
-*                    (RWorkspace: 0)
+            CALL ZUNMBR( 'Q', 'L', 'N', N, N, N, CDUM(1), N, CDUM(1),
+     $                   CDUM(1), N, CDUM(1), -1, IERR )
+            LWORK_ZUNMBR_QLN_NN = INT( CDUM(1) )
 *
-                     CALL ZUNGQR( M, N, N, A, LDA, WORK( ITAU ),
-     $                            WORK( IWORK ), LWORK-IWORK+1, IERR )
-                     IE = 1
-                     ITAUQ = ITAU
-                     ITAUP = ITAUQ + N
-                     IWORK = ITAUP + N
+            IF( M.GE.MNTHR1 ) THEN
+               IF( WNTQN ) THEN
 *
-*                    Bidiagonalize R in WORK(IU), copying result to VT
-*                    (CWorkspace: need N*N+3*N, prefer N*N+2*N+2*N*NB)
-*                    (RWorkspace: need N)
+*                 Path 1 (M >> N, JOBZ='N')
 *
-                     CALL ZGEBRD( N, N, WORK( IU ), LDWRKU, S,
-     $                            RWORK( IE ), WORK( ITAUQ ),
-     $                            WORK( ITAUP ), WORK( IWORK ),
-     $                            LWORK-IWORK+1, IERR )
-                     CALL ZLACPY( 'U', N, N, WORK( IU ), LDWRKU, VT,
-     $                            LDVT )
+                  MAXWRK = N + LWORK_ZGEQRF_MN
+                  MAXWRK = MAX( MAXWRK, 2*N + LWORK_ZGEBRD_NN )
+                  MINWRK = 3*N
+               ELSE IF( WNTQO ) THEN
 *
-*                    Generate left bidiagonalizing vectors in WORK(IU)
-*                    (CWorkspace: need N*N+3*N, prefer N*N+2*N+N*NB)
-*                    (RWorkspace: 0)
+*                 Path 2 (M >> N, JOBZ='O')
 *
-                     CALL ZUNGBR( 'Q', N, N, N, WORK( IU ), LDWRKU,
-     $                            WORK( ITAUQ ), WORK( IWORK ),
-     $                            LWORK-IWORK+1, IERR )
+                  WRKBL = N + LWORK_ZGEQRF_MN
+                  WRKBL = MAX( WRKBL,   N + LWORK_ZUNGQR_MN )
+                  WRKBL = MAX( WRKBL, 2*N + LWORK_ZGEBRD_NN )
+                  WRKBL = MAX( WRKBL, 2*N + LWORK_ZUNMBR_QLN_NN )
+                  WRKBL = MAX( WRKBL, 2*N + LWORK_ZUNMBR_PRC_NN )
+                  MAXWRK = M*N + N*N + WRKBL
+                  MINWRK = 2*N*N + 3*N
+               ELSE IF( WNTQS ) THEN
 *
-*                    Generate right bidiagonalizing vectors in VT
-*                    (CWorkspace: need   N*N+3*N-1,
-*                                 prefer N*N+2*N+(N-1)*NB)
-*                    (RWorkspace: 0)
+*                 Path 3 (M >> N, JOBZ='S')
 *
-                     CALL ZUNGBR( 'P', N, N, N, VT, LDVT, WORK( ITAUP ),
-     $                            WORK( IWORK ), LWORK-IWORK+1, IERR )
-                     IRWORK = IE + N
+                  WRKBL = N + LWORK_ZGEQRF_MN
+                  WRKBL = MAX( WRKBL,   N + LWORK_ZUNGQR_MN )
+                  WRKBL = MAX( WRKBL, 2*N + LWORK_ZGEBRD_NN )
+                  WRKBL = MAX( WRKBL, 2*N + LWORK_ZUNMBR_QLN_NN )
+                  WRKBL = MAX( WRKBL, 2*N + LWORK_ZUNMBR_PRC_NN )
+                  MAXWRK = N*N + WRKBL
+                  MINWRK = N*N + 3*N
+               ELSE IF( WNTQA ) THEN
 *
-*                    Perform bidiagonal QR iteration, computing left
-*                    singular vectors of R in WORK(IU) and computing
-*                    right singular vectors of R in VT
-*                    (CWorkspace: need N*N)
-*                    (RWorkspace: need BDSPAC)
+*                 Path 4 (M >> N, JOBZ='A')
 *
-                     CALL ZBDSQR( 'U', N, N, N, 0, S, RWORK( IE ), VT,
-     $                            LDVT, WORK( IU ), LDWRKU, CDUM, 1,
-     $                            RWORK( IRWORK ), INFO )
+                  WRKBL = N + LWORK_ZGEQRF_MN
+                  WRKBL = MAX( WRKBL,   N + LWORK_ZUNGQR_MM )
+                  WRKBL = MAX( WRKBL, 2*N + LWORK_ZGEBRD_NN )
+                  WRKBL = MAX( WRKBL, 2*N + LWORK_ZUNMBR_QLN_NN )
+                  WRKBL = MAX( WRKBL, 2*N + LWORK_ZUNMBR_PRC_NN )
+                  MAXWRK = N*N + WRKBL
+                  MINWRK = N*N + MAX( 3*N, N + M )
+               END IF
+            ELSE IF( M.GE.MNTHR2 ) THEN
 *
-*                    Multiply Q in A by left singular vectors of R in
-*                    WORK(IU), storing result in U
-*                    (CWorkspace: need N*N)
-*                    (RWorkspace: 0)
+*              Path 5 (M >> N, but not as much as MNTHR1)
 *
-                     CALL ZGEMM( 'N', 'N', M, N, N, CONE, A, LDA,
-     $                           WORK( IU ), LDWRKU, CZERO, U, LDU )
+               MAXWRK = 2*N + LWORK_ZGEBRD_MN
+               MINWRK = 2*N + M
+               IF( WNTQO ) THEN
+*                 Path 5o (M >> N, JOBZ='O')
+                  MAXWRK = MAX( MAXWRK, 2*N + LWORK_ZUNGBR_P_NN )
+                  MAXWRK = MAX( MAXWRK, 2*N + LWORK_ZUNGBR_Q_MN )
+                  MAXWRK = MAXWRK + M*N
+                  MINWRK = MINWRK + N*N
+               ELSE IF( WNTQS ) THEN
+*                 Path 5s (M >> N, JOBZ='S')
+                  MAXWRK = MAX( MAXWRK, 2*N + LWORK_ZUNGBR_P_NN )
+                  MAXWRK = MAX( MAXWRK, 2*N + LWORK_ZUNGBR_Q_MN )
+               ELSE IF( WNTQA ) THEN
+*                 Path 5a (M >> N, JOBZ='A')
+                  MAXWRK = MAX( MAXWRK, 2*N + LWORK_ZUNGBR_P_NN )
+                  MAXWRK = MAX( MAXWRK, 2*N + LWORK_ZUNGBR_Q_MM )
+               END IF
+            ELSE
 *
-                  ELSE
+*              Path 6 (M >= N, but not much larger)
 *
-*                    Insufficient workspace for a fast algorithm
+               MAXWRK = 2*N + LWORK_ZGEBRD_MN
+               MINWRK = 2*N + M
+               IF( WNTQO ) THEN
+*                 Path 6o (M >= N, JOBZ='O')
+                  MAXWRK = MAX( MAXWRK, 2*N + LWORK_ZUNMBR_PRC_NN )
+                  MAXWRK = MAX( MAXWRK, 2*N + LWORK_ZUNMBR_QLN_MN )
+                  MAXWRK = MAXWRK + M*N
+                  MINWRK = MINWRK + N*N
+               ELSE IF( WNTQS ) THEN
+*                 Path 6s (M >= N, JOBZ='S')
+                  MAXWRK = MAX( MAXWRK, 2*N + LWORK_ZUNMBR_QLN_MN )
+                  MAXWRK = MAX( MAXWRK, 2*N + LWORK_ZUNMBR_PRC_NN )
+               ELSE IF( WNTQA ) THEN
+*                 Path 6a (M >= N, JOBZ='A')
+                  MAXWRK = MAX( MAXWRK, 2*N + LWORK_ZUNMBR_QLN_MM )
+                  MAXWRK = MAX( MAXWRK, 2*N + LWORK_ZUNMBR_PRC_NN )
+               END IF
+            END IF
+         ELSE IF( MINMN.GT.0 ) THEN
 *
-                     ITAU = 1
-                     IWORK = ITAU + N
+*           There is no complex work space needed for bidiagonal SVD
+*           The real work space needed for bidiagonal SVD (dbdsdc) is
+*           BDSPAC = 3*M*M + 4*M for singular values and vectors;
+*           BDSPAC = 4*M         for singular values only;
+*           not including e, RU, and RVT matrices.
 *
-*                    Compute A=Q*R, copying result to U
-*                    (CWorkspace: need 2*N, prefer N+N*NB)
-*                    (RWorkspace: 0)
+*           Compute space preferred for each routine
+            CALL ZGEBRD( M, N, CDUM(1), M, DUM(1), DUM(1), CDUM(1),
+     $                   CDUM(1), CDUM(1), -1, IERR )
+            LWORK_ZGEBRD_MN = INT( CDUM(1) )
 *
-                     CALL ZGEQRF( M, N, A, LDA, WORK( ITAU ),
-     $                            WORK( IWORK ), LWORK-IWORK+1, IERR )
-                     CALL ZLACPY( 'L', M, N, A, LDA, U, LDU )
+            CALL ZGEBRD( M, M, CDUM(1), M, DUM(1), DUM(1), CDUM(1),
+     $                   CDUM(1), CDUM(1), -1, IERR )
+            LWORK_ZGEBRD_MM = INT( CDUM(1) )
 *
-*                    Generate Q in U
-*                    (CWorkspace: need 2*N, prefer N+N*NB)
-*                    (RWorkspace: 0)
+            CALL ZGELQF( M, N, CDUM(1), M, CDUM(1), CDUM(1), -1, IERR )
+            LWORK_ZGELQF_MN = INT( CDUM(1) )
 *
-                     CALL ZUNGQR( M, N, N, U, LDU, WORK( ITAU ),
-     $                            WORK( IWORK ), LWORK-IWORK+1, IERR )
+            CALL ZUNGBR( 'P', M, N, M, CDUM(1), M, CDUM(1), CDUM(1),
+     $                   -1, IERR )
+            LWORK_ZUNGBR_P_MN = INT( CDUM(1) )
 *
-*                    Copy R to VT, zeroing out below it
+            CALL ZUNGBR( 'P', N, N, M, CDUM(1), N, CDUM(1), CDUM(1),
+     $                   -1, IERR )
+            LWORK_ZUNGBR_P_NN = INT( CDUM(1) )
 *
-                     CALL ZLACPY( 'U', N, N, A, LDA, VT, LDVT )
-                     IF( N.GT.1 )
-     $                  CALL ZLASET( 'L', N-1, N-1, CZERO, CZERO,
-     $                               VT( 2, 1 ), LDVT )
-                     IE = 1
-                     ITAUQ = ITAU
-                     ITAUP = ITAUQ + N
-                     IWORK = ITAUP + N
+            CALL ZUNGBR( 'Q', M, M, N, CDUM(1), M, CDUM(1), CDUM(1),
+     $                   -1, IERR )
+            LWORK_ZUNGBR_Q_MM = INT( CDUM(1) )
 *
-*                    Bidiagonalize R in VT
-*                    (CWorkspace: need 3*N, prefer 2*N+2*N*NB)
-*                    (RWorkspace: need N)
+            CALL ZUNGLQ( M, N, M, CDUM(1), M, CDUM(1), CDUM(1),
+     $                   -1, IERR )
+            LWORK_ZUNGLQ_MN = INT( CDUM(1) )
 *
-                     CALL ZGEBRD( N, N, VT, LDVT, S, RWORK( IE ),
-     $                            WORK( ITAUQ ), WORK( ITAUP ),
-     $                            WORK( IWORK ), LWORK-IWORK+1, IERR )
+            CALL ZUNGLQ( N, N, M, CDUM(1), N, CDUM(1), CDUM(1),
+     $                   -1, IERR )
+            LWORK_ZUNGLQ_NN = INT( CDUM(1) )
 *
-*                    Multiply Q in U by left bidiagonalizing vectors
-*                    in VT
-*                    (CWorkspace: need 2*N+M, prefer 2*N+M*NB)
-*                    (RWorkspace: 0)
+            CALL ZUNMBR( 'P', 'R', 'C', M, M, M, CDUM(1), M, CDUM(1),
+     $                   CDUM(1), M, CDUM(1), -1, IERR )
+            LWORK_ZUNMBR_PRC_MM = INT( CDUM(1) )
 *
-                     CALL ZUNMBR( 'Q', 'R', 'N', M, N, N, VT, LDVT,
-     $                            WORK( ITAUQ ), U, LDU, WORK( IWORK ),
-     $                            LWORK-IWORK+1, IERR )
+            CALL ZUNMBR( 'P', 'R', 'C', M, N, M, CDUM(1), M, CDUM(1),
+     $                   CDUM(1), M, CDUM(1), -1, IERR )
+            LWORK_ZUNMBR_PRC_MN = INT( CDUM(1) )
 *
-*                    Generate right bidiagonalizing vectors in VT
-*                    (CWorkspace: need 3*N-1, prefer 2*N+(N-1)*NB)
-*                    (RWorkspace: 0)
+            CALL ZUNMBR( 'P', 'R', 'C', N, N, M, CDUM(1), N, CDUM(1),
+     $                   CDUM(1), N, CDUM(1), -1, IERR )
+            LWORK_ZUNMBR_PRC_NN = INT( CDUM(1) )
 *
-                     CALL ZUNGBR( 'P', N, N, N, VT, LDVT, WORK( ITAUP ),
-     $                            WORK( IWORK ), LWORK-IWORK+1, IERR )
-                     IRWORK = IE + N
+            CALL ZUNMBR( 'Q', 'L', 'N', M, M, M, CDUM(1), M, CDUM(1),
+     $                   CDUM(1), M, CDUM(1), -1, IERR )
+            LWORK_ZUNMBR_QLN_MM = INT( CDUM(1) )
 *
-*                    Perform bidiagonal QR iteration, computing left
-*                    singular vectors of A in U and computing right
-*                    singular vectors of A in VT
-*                    (CWorkspace: 0)
-*                    (RWorkspace: need BDSPAC)
+            IF( N.GE.MNTHR1 ) THEN
+               IF( WNTQN ) THEN
 *
-                     CALL ZBDSQR( 'U', N, N, M, 0, S, RWORK( IE ), VT,
-     $                            LDVT, U, LDU, CDUM, 1,
-     $                            RWORK( IRWORK ), INFO )
+*                 Path 1t (N >> M, JOBZ='N')
 *
-                  END IF
+                  MAXWRK = M + LWORK_ZGELQF_MN
+                  MAXWRK = MAX( MAXWRK, 2*M + LWORK_ZGEBRD_MM )
+                  MINWRK = 3*M
+               ELSE IF( WNTQO ) THEN
 *
-               END IF
+*                 Path 2t (N >> M, JOBZ='O')
 *
-            ELSE IF( WNTUA ) THEN
+                  WRKBL = M + LWORK_ZGELQF_MN
+                  WRKBL = MAX( WRKBL,   M + LWORK_ZUNGLQ_MN )
+                  WRKBL = MAX( WRKBL, 2*M + LWORK_ZGEBRD_MM )
+                  WRKBL = MAX( WRKBL, 2*M + LWORK_ZUNMBR_QLN_MM )
+                  WRKBL = MAX( WRKBL, 2*M + LWORK_ZUNMBR_PRC_MM )
+                  MAXWRK = M*N + M*M + WRKBL
+                  MINWRK = 2*M*M + 3*M
+               ELSE IF( WNTQS ) THEN
 *
-               IF( WNTVN ) THEN
+*                 Path 3t (N >> M, JOBZ='S')
 *
-*                 Path 7 (M much larger than N, JOBU='A', JOBVT='N')
-*                 M left singular vectors to be computed in U and
-*                 no right singular vectors to be computed
+                  WRKBL = M + LWORK_ZGELQF_MN
+                  WRKBL = MAX( WRKBL,   M + LWORK_ZUNGLQ_MN )
+                  WRKBL = MAX( WRKBL, 2*M + LWORK_ZGEBRD_MM )
+                  WRKBL = MAX( WRKBL, 2*M + LWORK_ZUNMBR_QLN_MM )
+                  WRKBL = MAX( WRKBL, 2*M + LWORK_ZUNMBR_PRC_MM )
+                  MAXWRK = M*M + WRKBL
+                  MINWRK = M*M + 3*M
+               ELSE IF( WNTQA ) THEN
 *
-                  IF( LWORK.GE.N*N+MAX( N+M, 3*N ) ) THEN
+*                 Path 4t (N >> M, JOBZ='A')
 *
-*                    Sufficient workspace for a fast algorithm
+                  WRKBL = M + LWORK_ZGELQF_MN
+                  WRKBL = MAX( WRKBL,   M + LWORK_ZUNGLQ_NN )
+                  WRKBL = MAX( WRKBL, 2*M + LWORK_ZGEBRD_MM )
+                  WRKBL = MAX( WRKBL, 2*M + LWORK_ZUNMBR_QLN_MM )
+                  WRKBL = MAX( WRKBL, 2*M + LWORK_ZUNMBR_PRC_MM )
+                  MAXWRK = M*M + WRKBL
+                  MINWRK = M*M + MAX( 3*M, M + N )
+               END IF
+            ELSE IF( N.GE.MNTHR2 ) THEN
 *
-                     IR = 1
-                     IF( LWORK.GE.WRKBL+LDA*N ) THEN
+*              Path 5t (N >> M, but not as much as MNTHR1)
 *
-*                       WORK(IR) is LDA by N
+               MAXWRK = 2*M + LWORK_ZGEBRD_MN
+               MINWRK = 2*M + N
+               IF( WNTQO ) THEN
+*                 Path 5to (N >> M, JOBZ='O')
+                  MAXWRK = MAX( MAXWRK, 2*M + LWORK_ZUNGBR_Q_MM )
+                  MAXWRK = MAX( MAXWRK, 2*M + LWORK_ZUNGBR_P_MN )
+                  MAXWRK = MAXWRK + M*N
+                  MINWRK = MINWRK + M*M
+               ELSE IF( WNTQS ) THEN
+*                 Path 5ts (N >> M, JOBZ='S')
+                  MAXWRK = MAX( MAXWRK, 2*M + LWORK_ZUNGBR_Q_MM )
+                  MAXWRK = MAX( MAXWRK, 2*M + LWORK_ZUNGBR_P_MN )
+               ELSE IF( WNTQA ) THEN
+*                 Path 5ta (N >> M, JOBZ='A')
+                  MAXWRK = MAX( MAXWRK, 2*M + LWORK_ZUNGBR_Q_MM )
+                  MAXWRK = MAX( MAXWRK, 2*M + LWORK_ZUNGBR_P_NN )
+               END IF
+            ELSE
 *
-                        LDWRKR = LDA
-                     ELSE
+*              Path 6t (N > M, but not much larger)
 *
-*                       WORK(IR) is N by N
+               MAXWRK = 2*M + LWORK_ZGEBRD_MN
+               MINWRK = 2*M + N
+               IF( WNTQO ) THEN
+*                 Path 6to (N > M, JOBZ='O')
+                  MAXWRK = MAX( MAXWRK, 2*M + LWORK_ZUNMBR_QLN_MM )
+                  MAXWRK = MAX( MAXWRK, 2*M + LWORK_ZUNMBR_PRC_MN )
+                  MAXWRK = MAXWRK + M*N
+                  MINWRK = MINWRK + M*M
+               ELSE IF( WNTQS ) THEN
+*                 Path 6ts (N > M, JOBZ='S')
+                  MAXWRK = MAX( MAXWRK, 2*M + LWORK_ZUNMBR_QLN_MM )
+                  MAXWRK = MAX( MAXWRK, 2*M + LWORK_ZUNMBR_PRC_MN )
+               ELSE IF( WNTQA ) THEN
+*                 Path 6ta (N > M, JOBZ='A')
+                  MAXWRK = MAX( MAXWRK, 2*M + LWORK_ZUNMBR_QLN_MM )
+                  MAXWRK = MAX( MAXWRK, 2*M + LWORK_ZUNMBR_PRC_NN )
+               END IF
+            END IF
+         END IF
+         MAXWRK = MAX( MAXWRK, MINWRK )
+      END IF
+      IF( INFO.EQ.0 ) THEN
+         WORK( 1 ) = MAXWRK
+         IF( LWORK.LT.MINWRK .AND. .NOT. LQUERY ) THEN
+            INFO = -12
+         END IF
+      END IF
 *
-                        LDWRKR = N
-                     END IF
-                     ITAU = IR + LDWRKR*N
-                     IWORK = ITAU + N
+      IF( INFO.NE.0 ) THEN
+         CALL XERBLA( 'ZGESDD', -INFO )
+         RETURN
+      ELSE IF( LQUERY ) THEN
+         RETURN
+      END IF
 *
-*                    Compute A=Q*R, copying result to U
-*                    (CWorkspace: need N*N+2*N, prefer N*N+N+N*NB)
-*                    (RWorkspace: 0)
+*     Quick return if possible
 *
-                     CALL ZGEQRF( M, N, A, LDA, WORK( ITAU ),
-     $                            WORK( IWORK ), LWORK-IWORK+1, IERR )
-                     CALL ZLACPY( 'L', M, N, A, LDA, U, LDU )
+      IF( M.EQ.0 .OR. N.EQ.0 ) THEN
+         RETURN
+      END IF
 *
-*                    Copy R to WORK(IR), zeroing out below it
+*     Get machine constants
 *
-                     CALL ZLACPY( 'U', N, N, A, LDA, WORK( IR ),
-     $                            LDWRKR )
-                     CALL ZLASET( 'L', N-1, N-1, CZERO, CZERO,
-     $                            WORK( IR+1 ), LDWRKR )
+      EPS = DLAMCH( 'P' )
+      SMLNUM = SQRT( DLAMCH( 'S' ) ) / EPS
+      BIGNUM = ONE / SMLNUM
 *
-*                    Generate Q in U
-*                    (CWorkspace: need N*N+N+M, prefer N*N+N+M*NB)
-*                    (RWorkspace: 0)
+*     Scale A if max element outside range [SMLNUM,BIGNUM]
 *
-                     CALL ZUNGQR( M, M, N, U, LDU, WORK( ITAU ),
-     $                            WORK( IWORK ), LWORK-IWORK+1, IERR )
-                     IE = 1
-                     ITAUQ = ITAU
-                     ITAUP = ITAUQ + N
-                     IWORK = ITAUP + N
+      ANRM = ZLANGE( 'M', M, N, A, LDA, DUM )
+      ISCL = 0
+      IF( ANRM.GT.ZERO .AND. ANRM.LT.SMLNUM ) THEN
+         ISCL = 1
+         CALL ZLASCL( 'G', 0, 0, ANRM, SMLNUM, M, N, A, LDA, IERR )
+      ELSE IF( ANRM.GT.BIGNUM ) THEN
+         ISCL = 1
+         CALL ZLASCL( 'G', 0, 0, ANRM, BIGNUM, M, N, A, LDA, IERR )
+      END IF
 *
-*                    Bidiagonalize R in WORK(IR)
-*                    (CWorkspace: need N*N+3*N, prefer N*N+2*N+2*N*NB)
-*                    (RWorkspace: need N)
+      IF( M.GE.N ) THEN
 *
-                     CALL ZGEBRD( N, N, WORK( IR ), LDWRKR, S,
-     $                            RWORK( IE ), WORK( ITAUQ ),
-     $                            WORK( ITAUP ), WORK( IWORK ),
-     $                            LWORK-IWORK+1, IERR )
+*        A has at least as many rows as columns. If A has sufficiently
+*        more rows than columns, first reduce using the QR
+*        decomposition (if sufficient workspace available)
 *
-*                    Generate left bidiagonalizing vectors in WORK(IR)
-*                    (CWorkspace: need N*N+3*N, prefer N*N+2*N+N*NB)
-*                    (RWorkspace: 0)
+         IF( M.GE.MNTHR1 ) THEN
 *
-                     CALL ZUNGBR( 'Q', N, N, N, WORK( IR ), LDWRKR,
-     $                            WORK( ITAUQ ), WORK( IWORK ),
-     $                            LWORK-IWORK+1, IERR )
-                     IRWORK = IE + N
+            IF( WNTQN ) THEN
 *
-*                    Perform bidiagonal QR iteration, computing left
-*                    singular vectors of R in WORK(IR)
-*                    (CWorkspace: need N*N)
-*                    (RWorkspace: need BDSPAC)
+*              Path 1 (M >> N, JOBZ='N')
+*              No singular vectors to be computed
 *
-                     CALL ZBDSQR( 'U', N, 0, N, 0, S, RWORK( IE ), CDUM,
-     $                            1, WORK( IR ), LDWRKR, CDUM, 1,
-     $                            RWORK( IRWORK ), INFO )
+               ITAU = 1
+               NWORK = ITAU + N
 *
-*                    Multiply Q in U by left singular vectors of R in
-*                    WORK(IR), storing result in A
-*                    (CWorkspace: need N*N)
-*                    (RWorkspace: 0)
+*              Compute A=Q*R
+*              CWorkspace: need   N [tau] + N    [work]
+*              CWorkspace: prefer N [tau] + N*NB [work]
+*              RWorkspace: need   0
 *
-                     CALL ZGEMM( 'N', 'N', M, N, N, CONE, U, LDU,
-     $                           WORK( IR ), LDWRKR, CZERO, A, LDA )
+               CALL ZGEQRF( M, N, A, LDA, WORK( ITAU ), WORK( NWORK ),
+     $                      LWORK-NWORK+1, IERR )
 *
-*                    Copy left singular vectors of A from A to U
+*              Zero out below R
 *
-                     CALL ZLACPY( 'F', M, N, A, LDA, U, LDU )
+               CALL ZLASET( 'L', N-1, N-1, CZERO, CZERO, A( 2, 1 ),
+     $                      LDA )
+               IE = 1
+               ITAUQ = 1
+               ITAUP = ITAUQ + N
+               NWORK = ITAUP + N
 *
-                  ELSE
+*              Bidiagonalize R in A
+*              CWorkspace: need   2*N [tauq, taup] + N      [work]
+*              CWorkspace: prefer 2*N [tauq, taup] + 2*N*NB [work]
+*              RWorkspace: need   N [e]
 *
-*                    Insufficient workspace for a fast algorithm
+               CALL ZGEBRD( N, N, A, LDA, S, RWORK( IE ), WORK( ITAUQ ),
+     $                      WORK( ITAUP ), WORK( NWORK ), LWORK-NWORK+1,
+     $                      IERR )
+               NRWORK = IE + N
 *
-                     ITAU = 1
-                     IWORK = ITAU + N
+*              Perform bidiagonal SVD, compute singular values only
+*              CWorkspace: need   0
+*              RWorkspace: need   N [e] + BDSPAC
 *
-*                    Compute A=Q*R, copying result to U
-*                    (CWorkspace: need 2*N, prefer N+N*NB)
-*                    (RWorkspace: 0)
+               CALL DBDSDC( 'U', 'N', N, S, RWORK( IE ), DUM,1,DUM,1,
+     $                      DUM, IDUM, RWORK( NRWORK ), IWORK, INFO )
 *
-                     CALL ZGEQRF( M, N, A, LDA, WORK( ITAU ),
-     $                            WORK( IWORK ), LWORK-IWORK+1, IERR )
-                     CALL ZLACPY( 'L', M, N, A, LDA, U, LDU )
+            ELSE IF( WNTQO ) THEN
 *
-*                    Generate Q in U
-*                    (CWorkspace: need N+M, prefer N+M*NB)
-*                    (RWorkspace: 0)
+*              Path 2 (M >> N, JOBZ='O')
+*              N left singular vectors to be overwritten on A and
+*              N right singular vectors to be computed in VT
 *
-                     CALL ZUNGQR( M, M, N, U, LDU, WORK( ITAU ),
-     $                            WORK( IWORK ), LWORK-IWORK+1, IERR )
-                     IE = 1
-                     ITAUQ = ITAU
-                     ITAUP = ITAUQ + N
-                     IWORK = ITAUP + N
+               IU = 1
 *
-*                    Zero out below R in A
+*              WORK(IU) is N by N
 *
-                     CALL ZLASET( 'L', N-1, N-1, CZERO, CZERO,
-     $                            A( 2, 1 ), LDA )
+               LDWRKU = N
+               IR = IU + LDWRKU*N
+               IF( LWORK .GE. M*N + N*N + 3*N ) THEN
 *
-*                    Bidiagonalize R in A
-*                    (CWorkspace: need 3*N, prefer 2*N+2*N*NB)
-*                    (RWorkspace: need N)
+*                 WORK(IR) is M by N
 *
-                     CALL ZGEBRD( N, N, A, LDA, S, RWORK( IE ),
-     $                            WORK( ITAUQ ), WORK( ITAUP ),
-     $                            WORK( IWORK ), LWORK-IWORK+1, IERR )
+                  LDWRKR = M
+               ELSE
+                  LDWRKR = ( LWORK - N*N - 3*N ) / N
+               END IF
+               ITAU = IR + LDWRKR*N
+               NWORK = ITAU + N
 *
-*                    Multiply Q in U by left bidiagonalizing vectors
-*                    in A
-*                    (CWorkspace: need 2*N+M, prefer 2*N+M*NB)
-*                    (RWorkspace: 0)
+*              Compute A=Q*R
+*              CWorkspace: need   N*N [U] + N*N [R] + N [tau] + N    [work]
+*              CWorkspace: prefer N*N [U] + N*N [R] + N [tau] + N*NB [work]
+*              RWorkspace: need   0
 *
-                     CALL ZUNMBR( 'Q', 'R', 'N', M, N, N, A, LDA,
-     $                            WORK( ITAUQ ), U, LDU, WORK( IWORK ),
-     $                            LWORK-IWORK+1, IERR )
-                     IRWORK = IE + N
+               CALL ZGEQRF( M, N, A, LDA, WORK( ITAU ), WORK( NWORK ),
+     $                      LWORK-NWORK+1, IERR )
 *
-*                    Perform bidiagonal QR iteration, computing left
-*                    singular vectors of A in U
-*                    (CWorkspace: 0)
-*                    (RWorkspace: need BDSPAC)
+*              Copy R to WORK( IR ), zeroing out below it
 *
-                     CALL ZBDSQR( 'U', N, 0, M, 0, S, RWORK( IE ), CDUM,
-     $                            1, U, LDU, CDUM, 1, RWORK( IRWORK ),
-     $                            INFO )
+               CALL ZLACPY( 'U', N, N, A, LDA, WORK( IR ), LDWRKR )
+               CALL ZLASET( 'L', N-1, N-1, CZERO, CZERO, WORK( IR+1 ),
+     $                      LDWRKR )
 *
-                  END IF
+*              Generate Q in A
+*              CWorkspace: need   N*N [U] + N*N [R] + N [tau] + N    [work]
+*              CWorkspace: prefer N*N [U] + N*N [R] + N [tau] + N*NB [work]
+*              RWorkspace: need   0
 *
-               ELSE IF( WNTVO ) THEN
+               CALL ZUNGQR( M, N, N, A, LDA, WORK( ITAU ),
+     $                      WORK( NWORK ), LWORK-NWORK+1, IERR )
+               IE = 1
+               ITAUQ = ITAU
+               ITAUP = ITAUQ + N
+               NWORK = ITAUP + N
 *
-*                 Path 8 (M much larger than N, JOBU='A', JOBVT='O')
-*                 M left singular vectors to be computed in U and
-*                 N right singular vectors to be overwritten on A
+*              Bidiagonalize R in WORK(IR)
+*              CWorkspace: need   N*N [U] + N*N [R] + 2*N [tauq, taup] + N      [work]
+*              CWorkspace: prefer N*N [U] + N*N [R] + 2*N [tauq, taup] + 2*N*NB [work]
+*              RWorkspace: need   N [e]
 *
-                  IF( LWORK.GE.2*N*N+MAX( N+M, 3*N ) ) THEN
+               CALL ZGEBRD( N, N, WORK( IR ), LDWRKR, S, RWORK( IE ),
+     $                      WORK( ITAUQ ), WORK( ITAUP ), WORK( NWORK ),
+     $                      LWORK-NWORK+1, IERR )
 *
-*                    Sufficient workspace for a fast algorithm
+*              Perform bidiagonal SVD, computing left singular vectors
+*              of R in WORK(IRU) and computing right singular vectors
+*              of R in WORK(IRVT)
+*              CWorkspace: need   0
+*              RWorkspace: need   N [e] + N*N [RU] + N*N [RVT] + BDSPAC
 *
-                     IU = 1
-                     IF( LWORK.GE.WRKBL+2*LDA*N ) THEN
+               IRU = IE + N
+               IRVT = IRU + N*N
+               NRWORK = IRVT + N*N
+               CALL DBDSDC( 'U', 'I', N, S, RWORK( IE ), RWORK( IRU ),
+     $                      N, RWORK( IRVT ), N, DUM, IDUM,
+     $                      RWORK( NRWORK ), IWORK, INFO )
 *
-*                       WORK(IU) is LDA by N and WORK(IR) is LDA by N
+*              Copy real matrix RWORK(IRU) to complex matrix WORK(IU)
+*              Overwrite WORK(IU) by the left singular vectors of R
+*              CWorkspace: need   N*N [U] + N*N [R] + 2*N [tauq, taup] + N    [work]
+*              CWorkspace: prefer N*N [U] + N*N [R] + 2*N [tauq, taup] + N*NB [work]
+*              RWorkspace: need   0
 *
-                        LDWRKU = LDA
-                        IR = IU + LDWRKU*N
-                        LDWRKR = LDA
-                     ELSE IF( LWORK.GE.WRKBL+( LDA+N )*N ) THEN
+               CALL ZLACP2( 'F', N, N, RWORK( IRU ), N, WORK( IU ),
+     $                      LDWRKU )
+               CALL ZUNMBR( 'Q', 'L', 'N', N, N, N, WORK( IR ), LDWRKR,
+     $                      WORK( ITAUQ ), WORK( IU ), LDWRKU,
+     $                      WORK( NWORK ), LWORK-NWORK+1, IERR )
 *
-*                       WORK(IU) is LDA by N and WORK(IR) is N by N
+*              Copy real matrix RWORK(IRVT) to complex matrix VT
+*              Overwrite VT by the right singular vectors of R
+*              CWorkspace: need   N*N [U] + N*N [R] + 2*N [tauq, taup] + N    [work]
+*              CWorkspace: prefer N*N [U] + N*N [R] + 2*N [tauq, taup] + N*NB [work]
+*              RWorkspace: need   0
 *
-                        LDWRKU = LDA
-                        IR = IU + LDWRKU*N
-                        LDWRKR = N
-                     ELSE
+               CALL ZLACP2( 'F', N, N, RWORK( IRVT ), N, VT, LDVT )
+               CALL ZUNMBR( 'P', 'R', 'C', N, N, N, WORK( IR ), LDWRKR,
+     $                      WORK( ITAUP ), VT, LDVT, WORK( NWORK ),
+     $                      LWORK-NWORK+1, IERR )
 *
-*                       WORK(IU) is N by N and WORK(IR) is N by N
+*              Multiply Q in A by left singular vectors of R in
+*              WORK(IU), storing result in WORK(IR) and copying to A
+*              CWorkspace: need   N*N [U] + N*N [R]
+*              CWorkspace: prefer N*N [U] + M*N [R]
+*              RWorkspace: need   0
 *
-                        LDWRKU = N
-                        IR = IU + LDWRKU*N
-                        LDWRKR = N
-                     END IF
-                     ITAU = IR + LDWRKR*N
-                     IWORK = ITAU + N
+               DO 10 I = 1, M, LDWRKR
+                  CHUNK = MIN( M-I+1, LDWRKR )
+                  CALL ZGEMM( 'N', 'N', CHUNK, N, N, CONE, A( I, 1 ),
+     $                        LDA, WORK( IU ), LDWRKU, CZERO,
+     $                        WORK( IR ), LDWRKR )
+                  CALL ZLACPY( 'F', CHUNK, N, WORK( IR ), LDWRKR,
+     $                         A( I, 1 ), LDA )
+   10          CONTINUE
 *
-*                    Compute A=Q*R, copying result to U
-*                    (CWorkspace: need 2*N*N+2*N, prefer 2*N*N+N+N*NB)
-*                    (RWorkspace: 0)
+            ELSE IF( WNTQS ) THEN
 *
-                     CALL ZGEQRF( M, N, A, LDA, WORK( ITAU ),
-     $                            WORK( IWORK ), LWORK-IWORK+1, IERR )
-                     CALL ZLACPY( 'L', M, N, A, LDA, U, LDU )
+*              Path 3 (M >> N, JOBZ='S')
+*              N left singular vectors to be computed in U and
+*              N right singular vectors to be computed in VT
 *
-*                    Generate Q in U
-*                    (CWorkspace: need 2*N*N+N+M, prefer 2*N*N+N+M*NB)
-*                    (RWorkspace: 0)
+               IR = 1
 *
-                     CALL ZUNGQR( M, M, N, U, LDU, WORK( ITAU ),
-     $                            WORK( IWORK ), LWORK-IWORK+1, IERR )
+*              WORK(IR) is N by N
 *
-*                    Copy R to WORK(IU), zeroing out below it
+               LDWRKR = N
+               ITAU = IR + LDWRKR*N
+               NWORK = ITAU + N
 *
-                     CALL ZLACPY( 'U', N, N, A, LDA, WORK( IU ),
-     $                            LDWRKU )
-                     CALL ZLASET( 'L', N-1, N-1, CZERO, CZERO,
-     $                            WORK( IU+1 ), LDWRKU )
-                     IE = 1
-                     ITAUQ = ITAU
-                     ITAUP = ITAUQ + N
-                     IWORK = ITAUP + N
+*              Compute A=Q*R
+*              CWorkspace: need   N*N [R] + N [tau] + N    [work]
+*              CWorkspace: prefer N*N [R] + N [tau] + N*NB [work]
+*              RWorkspace: need   0
 *
-*                    Bidiagonalize R in WORK(IU), copying result to
-*                    WORK(IR)
-*                    (CWorkspace: need   2*N*N+3*N,
-*                                 prefer 2*N*N+2*N+2*N*NB)
-*                    (RWorkspace: need   N)
+               CALL ZGEQRF( M, N, A, LDA, WORK( ITAU ), WORK( NWORK ),
+     $                      LWORK-NWORK+1, IERR )
 *
-                     CALL ZGEBRD( N, N, WORK( IU ), LDWRKU, S,
-     $                            RWORK( IE ), WORK( ITAUQ ),
-     $                            WORK( ITAUP ), WORK( IWORK ),
-     $                            LWORK-IWORK+1, IERR )
-                     CALL ZLACPY( 'U', N, N, WORK( IU ), LDWRKU,
-     $                            WORK( IR ), LDWRKR )
+*              Copy R to WORK(IR), zeroing out below it
 *
-*                    Generate left bidiagonalizing vectors in WORK(IU)
-*                    (CWorkspace: need 2*N*N+3*N, prefer 2*N*N+2*N+N*NB)
-*                    (RWorkspace: 0)
+               CALL ZLACPY( 'U', N, N, A, LDA, WORK( IR ), LDWRKR )
+               CALL ZLASET( 'L', N-1, N-1, CZERO, CZERO, WORK( IR+1 ),
+     $                      LDWRKR )
 *
-                     CALL ZUNGBR( 'Q', N, N, N, WORK( IU ), LDWRKU,
-     $                            WORK( ITAUQ ), WORK( IWORK ),
-     $                            LWORK-IWORK+1, IERR )
+*              Generate Q in A
+*              CWorkspace: need   N*N [R] + N [tau] + N    [work]
+*              CWorkspace: prefer N*N [R] + N [tau] + N*NB [work]
+*              RWorkspace: need   0
 *
-*                    Generate right bidiagonalizing vectors in WORK(IR)
-*                    (CWorkspace: need   2*N*N+3*N-1,
-*                                 prefer 2*N*N+2*N+(N-1)*NB)
-*                    (RWorkspace: 0)
+               CALL ZUNGQR( M, N, N, A, LDA, WORK( ITAU ),
+     $                      WORK( NWORK ), LWORK-NWORK+1, IERR )
+               IE = 1
+               ITAUQ = ITAU
+               ITAUP = ITAUQ + N
+               NWORK = ITAUP + N
 *
-                     CALL ZUNGBR( 'P', N, N, N, WORK( IR ), LDWRKR,
-     $                            WORK( ITAUP ), WORK( IWORK ),
-     $                            LWORK-IWORK+1, IERR )
-                     IRWORK = IE + N
+*              Bidiagonalize R in WORK(IR)
+*              CWorkspace: need   N*N [R] + 2*N [tauq, taup] + N      [work]
+*              CWorkspace: prefer N*N [R] + 2*N [tauq, taup] + 2*N*NB [work]
+*              RWorkspace: need   N [e]
 *
-*                    Perform bidiagonal QR iteration, computing left
-*                    singular vectors of R in WORK(IU) and computing
-*                    right singular vectors of R in WORK(IR)
-*                    (CWorkspace: need 2*N*N)
-*                    (RWorkspace: need BDSPAC)
+               CALL ZGEBRD( N, N, WORK( IR ), LDWRKR, S, RWORK( IE ),
+     $                      WORK( ITAUQ ), WORK( ITAUP ), WORK( NWORK ),
+     $                      LWORK-NWORK+1, IERR )
 *
-                     CALL ZBDSQR( 'U', N, N, N, 0, S, RWORK( IE ),
-     $                            WORK( IR ), LDWRKR, WORK( IU ),
-     $                            LDWRKU, CDUM, 1, RWORK( IRWORK ),
-     $                            INFO )
+*              Perform bidiagonal SVD, computing left singular vectors
+*              of bidiagonal matrix in RWORK(IRU) and computing right
+*              singular vectors of bidiagonal matrix in RWORK(IRVT)
+*              CWorkspace: need   0
+*              RWorkspace: need   N [e] + N*N [RU] + N*N [RVT] + BDSPAC
 *
-*                    Multiply Q in U by left singular vectors of R in
-*                    WORK(IU), storing result in A
-*                    (CWorkspace: need N*N)
-*                    (RWorkspace: 0)
+               IRU = IE + N
+               IRVT = IRU + N*N
+               NRWORK = IRVT + N*N
+               CALL DBDSDC( 'U', 'I', N, S, RWORK( IE ), RWORK( IRU ),
+     $                      N, RWORK( IRVT ), N, DUM, IDUM,
+     $                      RWORK( NRWORK ), IWORK, INFO )
 *
-                     CALL ZGEMM( 'N', 'N', M, N, N, CONE, U, LDU,
-     $                           WORK( IU ), LDWRKU, CZERO, A, LDA )
+*              Copy real matrix RWORK(IRU) to complex matrix U
+*              Overwrite U by left singular vectors of R
+*              CWorkspace: need   N*N [R] + 2*N [tauq, taup] + N    [work]
+*              CWorkspace: prefer N*N [R] + 2*N [tauq, taup] + N*NB [work]
+*              RWorkspace: need   0
 *
-*                    Copy left singular vectors of A from A to U
+               CALL ZLACP2( 'F', N, N, RWORK( IRU ), N, U, LDU )
+               CALL ZUNMBR( 'Q', 'L', 'N', N, N, N, WORK( IR ), LDWRKR,
+     $                      WORK( ITAUQ ), U, LDU, WORK( NWORK ),
+     $                      LWORK-NWORK+1, IERR )
 *
-                     CALL ZLACPY( 'F', M, N, A, LDA, U, LDU )
+*              Copy real matrix RWORK(IRVT) to complex matrix VT
+*              Overwrite VT by right singular vectors of R
+*              CWorkspace: need   N*N [R] + 2*N [tauq, taup] + N    [work]
+*              CWorkspace: prefer N*N [R] + 2*N [tauq, taup] + N*NB [work]
+*              RWorkspace: need   0
 *
-*                    Copy right singular vectors of R from WORK(IR) to A
+               CALL ZLACP2( 'F', N, N, RWORK( IRVT ), N, VT, LDVT )
+               CALL ZUNMBR( 'P', 'R', 'C', N, N, N, WORK( IR ), LDWRKR,
+     $                      WORK( ITAUP ), VT, LDVT, WORK( NWORK ),
+     $                      LWORK-NWORK+1, IERR )
 *
-                     CALL ZLACPY( 'F', N, N, WORK( IR ), LDWRKR, A,
-     $                            LDA )
+*              Multiply Q in A by left singular vectors of R in
+*              WORK(IR), storing result in U
+*              CWorkspace: need   N*N [R]
+*              RWorkspace: need   0
 *
-                  ELSE
+               CALL ZLACPY( 'F', N, N, U, LDU, WORK( IR ), LDWRKR )
+               CALL ZGEMM( 'N', 'N', M, N, N, CONE, A, LDA, WORK( IR ),
+     $                     LDWRKR, CZERO, U, LDU )
 *
-*                    Insufficient workspace for a fast algorithm
+            ELSE IF( WNTQA ) THEN
 *
-                     ITAU = 1
-                     IWORK = ITAU + N
+*              Path 4 (M >> N, JOBZ='A')
+*              M left singular vectors to be computed in U and
+*              N right singular vectors to be computed in VT
 *
-*                    Compute A=Q*R, copying result to U
-*                    (CWorkspace: need 2*N, prefer N+N*NB)
-*                    (RWorkspace: 0)
+               IU = 1
 *
-                     CALL ZGEQRF( M, N, A, LDA, WORK( ITAU ),
-     $                            WORK( IWORK ), LWORK-IWORK+1, IERR )
-                     CALL ZLACPY( 'L', M, N, A, LDA, U, LDU )
+*              WORK(IU) is N by N
 *
-*                    Generate Q in U
-*                    (CWorkspace: need N+M, prefer N+M*NB)
-*                    (RWorkspace: 0)
+               LDWRKU = N
+               ITAU = IU + LDWRKU*N
+               NWORK = ITAU + N
 *
-                     CALL ZUNGQR( M, M, N, U, LDU, WORK( ITAU ),
-     $                            WORK( IWORK ), LWORK-IWORK+1, IERR )
-                     IE = 1
-                     ITAUQ = ITAU
-                     ITAUP = ITAUQ + N
-                     IWORK = ITAUP + N
+*              Compute A=Q*R, copying result to U
+*              CWorkspace: need   N*N [U] + N [tau] + N    [work]
+*              CWorkspace: prefer N*N [U] + N [tau] + N*NB [work]
+*              RWorkspace: need   0
 *
-*                    Zero out below R in A
+               CALL ZGEQRF( M, N, A, LDA, WORK( ITAU ), WORK( NWORK ),
+     $                      LWORK-NWORK+1, IERR )
+               CALL ZLACPY( 'L', M, N, A, LDA, U, LDU )
 *
-                     CALL ZLASET( 'L', N-1, N-1, CZERO, CZERO,
-     $                            A( 2, 1 ), LDA )
+*              Generate Q in U
+*              CWorkspace: need   N*N [U] + N [tau] + M    [work]
+*              CWorkspace: prefer N*N [U] + N [tau] + M*NB [work]
+*              RWorkspace: need   0
 *
-*                    Bidiagonalize R in A
-*                    (CWorkspace: need 3*N, prefer 2*N+2*N*NB)
-*                    (RWorkspace: need N)
+               CALL ZUNGQR( M, M, N, U, LDU, WORK( ITAU ),
+     $                      WORK( NWORK ), LWORK-NWORK+1, IERR )
 *
-                     CALL ZGEBRD( N, N, A, LDA, S, RWORK( IE ),
-     $                            WORK( ITAUQ ), WORK( ITAUP ),
-     $                            WORK( IWORK ), LWORK-IWORK+1, IERR )
+*              Produce R in A, zeroing out below it
 *
-*                    Multiply Q in U by left bidiagonalizing vectors
-*                    in A
-*                    (CWorkspace: need 2*N+M, prefer 2*N+M*NB)
-*                    (RWorkspace: 0)
+               CALL ZLASET( 'L', N-1, N-1, CZERO, CZERO, A( 2, 1 ),
+     $                      LDA )
+               IE = 1
+               ITAUQ = ITAU
+               ITAUP = ITAUQ + N
+               NWORK = ITAUP + N
 *
-                     CALL ZUNMBR( 'Q', 'R', 'N', M, N, N, A, LDA,
-     $                            WORK( ITAUQ ), U, LDU, WORK( IWORK ),
-     $                            LWORK-IWORK+1, IERR )
+*              Bidiagonalize R in A
+*              CWorkspace: need   N*N [U] + 2*N [tauq, taup] + N      [work]
+*              CWorkspace: prefer N*N [U] + 2*N [tauq, taup] + 2*N*NB [work]
+*              RWorkspace: need   N [e]
 *
-*                    Generate right bidiagonalizing vectors in A
-*                    (CWorkspace: need 3*N-1, prefer 2*N+(N-1)*NB)
-*                    (RWorkspace: 0)
+               CALL ZGEBRD( N, N, A, LDA, S, RWORK( IE ), WORK( ITAUQ ),
+     $                      WORK( ITAUP ), WORK( NWORK ), LWORK-NWORK+1,
+     $                      IERR )
+               IRU = IE + N
+               IRVT = IRU + N*N
+               NRWORK = IRVT + N*N
 *
-                     CALL ZUNGBR( 'P', N, N, N, A, LDA, WORK( ITAUP ),
-     $                            WORK( IWORK ), LWORK-IWORK+1, IERR )
-                     IRWORK = IE + N
+*              Perform bidiagonal SVD, computing left singular vectors
+*              of bidiagonal matrix in RWORK(IRU) and computing right
+*              singular vectors of bidiagonal matrix in RWORK(IRVT)
+*              CWorkspace: need   0
+*              RWorkspace: need   N [e] + N*N [RU] + N*N [RVT] + BDSPAC
 *
-*                    Perform bidiagonal QR iteration, computing left
-*                    singular vectors of A in U and computing right
-*                    singular vectors of A in A
-*                    (CWorkspace: 0)
-*                    (RWorkspace: need BDSPAC)
+               CALL DBDSDC( 'U', 'I', N, S, RWORK( IE ), RWORK( IRU ),
+     $                      N, RWORK( IRVT ), N, DUM, IDUM,
+     $                      RWORK( NRWORK ), IWORK, INFO )
 *
-                     CALL ZBDSQR( 'U', N, N, M, 0, S, RWORK( IE ), A,
-     $                            LDA, U, LDU, CDUM, 1, RWORK( IRWORK ),
-     $                            INFO )
+*              Copy real matrix RWORK(IRU) to complex matrix WORK(IU)
+*              Overwrite WORK(IU) by left singular vectors of R
+*              CWorkspace: need   N*N [U] + 2*N [tauq, taup] + N    [work]
+*              CWorkspace: prefer N*N [U] + 2*N [tauq, taup] + N*NB [work]
+*              RWorkspace: need   0
 *
-                  END IF
+               CALL ZLACP2( 'F', N, N, RWORK( IRU ), N, WORK( IU ),
+     $                      LDWRKU )
+               CALL ZUNMBR( 'Q', 'L', 'N', N, N, N, A, LDA,
+     $                      WORK( ITAUQ ), WORK( IU ), LDWRKU,
+     $                      WORK( NWORK ), LWORK-NWORK+1, IERR )
 *
-               ELSE IF( WNTVAS ) THEN
+*              Copy real matrix RWORK(IRVT) to complex matrix VT
+*              Overwrite VT by right singular vectors of R
+*              CWorkspace: need   N*N [U] + 2*N [tauq, taup] + N    [work]
+*              CWorkspace: prefer N*N [U] + 2*N [tauq, taup] + N*NB [work]
+*              RWorkspace: need   0
 *
-*                 Path 9 (M much larger than N, JOBU='A', JOBVT='S'
-*                         or 'A')
-*                 M left singular vectors to be computed in U and
-*                 N right singular vectors to be computed in VT
+               CALL ZLACP2( 'F', N, N, RWORK( IRVT ), N, VT, LDVT )
+               CALL ZUNMBR( 'P', 'R', 'C', N, N, N, A, LDA,
+     $                      WORK( ITAUP ), VT, LDVT, WORK( NWORK ),
+     $                      LWORK-NWORK+1, IERR )
 *
-                  IF( LWORK.GE.N*N+MAX( N+M, 3*N ) ) THEN
+*              Multiply Q in U by left singular vectors of R in
+*              WORK(IU), storing result in A
+*              CWorkspace: need   N*N [U]
+*              RWorkspace: need   0
 *
-*                    Sufficient workspace for a fast algorithm
+               CALL ZGEMM( 'N', 'N', M, N, N, CONE, U, LDU, WORK( IU ),
+     $                     LDWRKU, CZERO, A, LDA )
 *
-                     IU = 1
-                     IF( LWORK.GE.WRKBL+LDA*N ) THEN
+*              Copy left singular vectors of A from A to U
 *
-*                       WORK(IU) is LDA by N
+               CALL ZLACPY( 'F', M, N, A, LDA, U, LDU )
 *
-                        LDWRKU = LDA
-                     ELSE
+            END IF
 *
-*                       WORK(IU) is N by N
+         ELSE IF( M.GE.MNTHR2 ) THEN
 *
-                        LDWRKU = N
-                     END IF
-                     ITAU = IU + LDWRKU*N
-                     IWORK = ITAU + N
+*           MNTHR2 <= M < MNTHR1
 *
-*                    Compute A=Q*R, copying result to U
-*                    (CWorkspace: need N*N+2*N, prefer N*N+N+N*NB)
-*                    (RWorkspace: 0)
+*           Path 5 (M >> N, but not as much as MNTHR1)
+*           Reduce to bidiagonal form without QR decomposition, use
+*           ZUNGBR and matrix multiplication to compute singular vectors
 *
-                     CALL ZGEQRF( M, N, A, LDA, WORK( ITAU ),
-     $                            WORK( IWORK ), LWORK-IWORK+1, IERR )
-                     CALL ZLACPY( 'L', M, N, A, LDA, U, LDU )
+            IE = 1
+            NRWORK = IE + N
+            ITAUQ = 1
+            ITAUP = ITAUQ + N
+            NWORK = ITAUP + N
 *
-*                    Generate Q in U
-*                    (CWorkspace: need N*N+N+M, prefer N*N+N+M*NB)
-*                    (RWorkspace: 0)
+*           Bidiagonalize A
+*           CWorkspace: need   2*N [tauq, taup] + M        [work]
+*           CWorkspace: prefer 2*N [tauq, taup] + (M+N)*NB [work]
+*           RWorkspace: need   N [e]
 *
-                     CALL ZUNGQR( M, M, N, U, LDU, WORK( ITAU ),
-     $                            WORK( IWORK ), LWORK-IWORK+1, IERR )
+            CALL ZGEBRD( M, N, A, LDA, S, RWORK( IE ), WORK( ITAUQ ),
+     $                   WORK( ITAUP ), WORK( NWORK ), LWORK-NWORK+1,
+     $                   IERR )
+            IF( WNTQN ) THEN
 *
-*                    Copy R to WORK(IU), zeroing out below it
+*              Path 5n (M >> N, JOBZ='N')
+*              Compute singular values only
+*              CWorkspace: need   0
+*              RWorkspace: need   N [e] + BDSPAC
 *
-                     CALL ZLACPY( 'U', N, N, A, LDA, WORK( IU ),
-     $                            LDWRKU )
-                     CALL ZLASET( 'L', N-1, N-1, CZERO, CZERO,
-     $                            WORK( IU+1 ), LDWRKU )
-                     IE = 1
-                     ITAUQ = ITAU
-                     ITAUP = ITAUQ + N
-                     IWORK = ITAUP + N
+               CALL DBDSDC( 'U', 'N', N, S, RWORK( IE ), DUM, 1,DUM,1,
+     $                      DUM, IDUM, RWORK( NRWORK ), IWORK, INFO )
+            ELSE IF( WNTQO ) THEN
+               IU = NWORK
+               IRU = NRWORK
+               IRVT = IRU + N*N
+               NRWORK = IRVT + N*N
 *
-*                    Bidiagonalize R in WORK(IU), copying result to VT
-*                    (CWorkspace: need N*N+3*N, prefer N*N+2*N+2*N*NB)
-*                    (RWorkspace: need N)
+*              Path 5o (M >> N, JOBZ='O')
+*              Copy A to VT, generate P**H
+*              CWorkspace: need   2*N [tauq, taup] + N    [work]
+*              CWorkspace: prefer 2*N [tauq, taup] + N*NB [work]
+*              RWorkspace: need   0
 *
-                     CALL ZGEBRD( N, N, WORK( IU ), LDWRKU, S,
-     $                            RWORK( IE ), WORK( ITAUQ ),
-     $                            WORK( ITAUP ), WORK( IWORK ),
-     $                            LWORK-IWORK+1, IERR )
-                     CALL ZLACPY( 'U', N, N, WORK( IU ), LDWRKU, VT,
-     $                            LDVT )
+               CALL ZLACPY( 'U', N, N, A, LDA, VT, LDVT )
+               CALL ZUNGBR( 'P', N, N, N, VT, LDVT, WORK( ITAUP ),
+     $                      WORK( NWORK ), LWORK-NWORK+1, IERR )
 *
-*                    Generate left bidiagonalizing vectors in WORK(IU)
-*                    (CWorkspace: need N*N+3*N, prefer N*N+2*N+N*NB)
-*                    (RWorkspace: 0)
+*              Generate Q in A
+*              CWorkspace: need   2*N [tauq, taup] + N    [work]
+*              CWorkspace: prefer 2*N [tauq, taup] + N*NB [work]
+*              RWorkspace: need   0
 *
-                     CALL ZUNGBR( 'Q', N, N, N, WORK( IU ), LDWRKU,
-     $                            WORK( ITAUQ ), WORK( IWORK ),
-     $                            LWORK-IWORK+1, IERR )
+               CALL ZUNGBR( 'Q', M, N, N, A, LDA, WORK( ITAUQ ),
+     $                      WORK( NWORK ), LWORK-NWORK+1, IERR )
 *
-*                    Generate right bidiagonalizing vectors in VT
-*                    (CWorkspace: need   N*N+3*N-1,
-*                                 prefer N*N+2*N+(N-1)*NB)
-*                    (RWorkspace: need   0)
+               IF( LWORK .GE. M*N + 3*N ) THEN
 *
-                     CALL ZUNGBR( 'P', N, N, N, VT, LDVT, WORK( ITAUP ),
-     $                            WORK( IWORK ), LWORK-IWORK+1, IERR )
-                     IRWORK = IE + N
+*                 WORK( IU ) is M by N
 *
-*                    Perform bidiagonal QR iteration, computing left
-*                    singular vectors of R in WORK(IU) and computing
-*                    right singular vectors of R in VT
-*                    (CWorkspace: need N*N)
-*                    (RWorkspace: need BDSPAC)
+                  LDWRKU = M
+               ELSE
 *
-                     CALL ZBDSQR( 'U', N, N, N, 0, S, RWORK( IE ), VT,
-     $                            LDVT, WORK( IU ), LDWRKU, CDUM, 1,
-     $                            RWORK( IRWORK ), INFO )
+*                 WORK(IU) is LDWRKU by N
 *
-*                    Multiply Q in U by left singular vectors of R in
-*                    WORK(IU), storing result in A
-*                    (CWorkspace: need N*N)
-*                    (RWorkspace: 0)
+                  LDWRKU = ( LWORK - 3*N ) / N
+               END IF
+               NWORK = IU + LDWRKU*N
 *
-                     CALL ZGEMM( 'N', 'N', M, N, N, CONE, U, LDU,
-     $                           WORK( IU ), LDWRKU, CZERO, A, LDA )
+*              Perform bidiagonal SVD, computing left singular vectors
+*              of bidiagonal matrix in RWORK(IRU) and computing right
+*              singular vectors of bidiagonal matrix in RWORK(IRVT)
+*              CWorkspace: need   0
+*              RWorkspace: need   N [e] + N*N [RU] + N*N [RVT] + BDSPAC
 *
-*                    Copy left singular vectors of A from A to U
+               CALL DBDSDC( 'U', 'I', N, S, RWORK( IE ), RWORK( IRU ),
+     $                      N, RWORK( IRVT ), N, DUM, IDUM,
+     $                      RWORK( NRWORK ), IWORK, INFO )
 *
-                     CALL ZLACPY( 'F', M, N, A, LDA, U, LDU )
+*              Multiply real matrix RWORK(IRVT) by P**H in VT,
+*              storing the result in WORK(IU), copying to VT
+*              CWorkspace: need   2*N [tauq, taup] + N*N [U]
+*              RWorkspace: need   N [e] + N*N [RU] + N*N [RVT] + 2*N*N [rwork]
 *
-                  ELSE
+               CALL ZLARCM( N, N, RWORK( IRVT ), N, VT, LDVT,
+     $                      WORK( IU ), LDWRKU, RWORK( NRWORK ) )
+               CALL ZLACPY( 'F', N, N, WORK( IU ), LDWRKU, VT, LDVT )
 *
-*                    Insufficient workspace for a fast algorithm
+*              Multiply Q in A by real matrix RWORK(IRU), storing the
+*              result in WORK(IU), copying to A
+*              CWorkspace: need   2*N [tauq, taup] + N*N [U]
+*              CWorkspace: prefer 2*N [tauq, taup] + M*N [U]
+*              RWorkspace: need   N [e] + N*N [RU] + 2*N*N [rwork]
+*              RWorkspace: prefer N [e] + N*N [RU] + 2*M*N [rwork] < N + 5*N*N since M < 2*N here
 *
-                     ITAU = 1
-                     IWORK = ITAU + N
+               NRWORK = IRVT
+               DO 20 I = 1, M, LDWRKU
+                  CHUNK = MIN( M-I+1, LDWRKU )
+                  CALL ZLACRM( CHUNK, N, A( I, 1 ), LDA, RWORK( IRU ),
+     $                         N, WORK( IU ), LDWRKU, RWORK( NRWORK ) )
+                  CALL ZLACPY( 'F', CHUNK, N, WORK( IU ), LDWRKU,
+     $                         A( I, 1 ), LDA )
+   20          CONTINUE
 *
-*                    Compute A=Q*R, copying result to U
-*                    (CWorkspace: need 2*N, prefer N+N*NB)
-*                    (RWorkspace: 0)
+            ELSE IF( WNTQS ) THEN
 *
-                     CALL ZGEQRF( M, N, A, LDA, WORK( ITAU ),
-     $                            WORK( IWORK ), LWORK-IWORK+1, IERR )
-                     CALL ZLACPY( 'L', M, N, A, LDA, U, LDU )
+*              Path 5s (M >> N, JOBZ='S')
+*              Copy A to VT, generate P**H
+*              CWorkspace: need   2*N [tauq, taup] + N    [work]
+*              CWorkspace: prefer 2*N [tauq, taup] + N*NB [work]
+*              RWorkspace: need   0
 *
-*                    Generate Q in U
-*                    (CWorkspace: need N+M, prefer N+M*NB)
-*                    (RWorkspace: 0)
+               CALL ZLACPY( 'U', N, N, A, LDA, VT, LDVT )
+               CALL ZUNGBR( 'P', N, N, N, VT, LDVT, WORK( ITAUP ),
+     $                      WORK( NWORK ), LWORK-NWORK+1, IERR )
 *
-                     CALL ZUNGQR( M, M, N, U, LDU, WORK( ITAU ),
-     $                            WORK( IWORK ), LWORK-IWORK+1, IERR )
+*              Copy A to U, generate Q
+*              CWorkspace: need   2*N [tauq, taup] + N    [work]
+*              CWorkspace: prefer 2*N [tauq, taup] + N*NB [work]
+*              RWorkspace: need   0
 *
-*                    Copy R from A to VT, zeroing out below it
+               CALL ZLACPY( 'L', M, N, A, LDA, U, LDU )
+               CALL ZUNGBR( 'Q', M, N, N, U, LDU, WORK( ITAUQ ),
+     $                      WORK( NWORK ), LWORK-NWORK+1, IERR )
 *
-                     CALL ZLACPY( 'U', N, N, A, LDA, VT, LDVT )
-                     IF( N.GT.1 )
-     $                  CALL ZLASET( 'L', N-1, N-1, CZERO, CZERO,
-     $                               VT( 2, 1 ), LDVT )
-                     IE = 1
-                     ITAUQ = ITAU
-                     ITAUP = ITAUQ + N
-                     IWORK = ITAUP + N
+*              Perform bidiagonal SVD, computing left singular vectors
+*              of bidiagonal matrix in RWORK(IRU) and computing right
+*              singular vectors of bidiagonal matrix in RWORK(IRVT)
+*              CWorkspace: need   0
+*              RWorkspace: need   N [e] + N*N [RU] + N*N [RVT] + BDSPAC
 *
-*                    Bidiagonalize R in VT
-*                    (CWorkspace: need 3*N, prefer 2*N+2*N*NB)
-*                    (RWorkspace: need N)
+               IRU = NRWORK
+               IRVT = IRU + N*N
+               NRWORK = IRVT + N*N
+               CALL DBDSDC( 'U', 'I', N, S, RWORK( IE ), RWORK( IRU ),
+     $                      N, RWORK( IRVT ), N, DUM, IDUM,
+     $                      RWORK( NRWORK ), IWORK, INFO )
 *
-                     CALL ZGEBRD( N, N, VT, LDVT, S, RWORK( IE ),
-     $                            WORK( ITAUQ ), WORK( ITAUP ),
-     $                            WORK( IWORK ), LWORK-IWORK+1, IERR )
+*              Multiply real matrix RWORK(IRVT) by P**H in VT,
+*              storing the result in A, copying to VT
+*              CWorkspace: need   0
+*              RWorkspace: need   N [e] + N*N [RU] + N*N [RVT] + 2*N*N [rwork]
 *
-*                    Multiply Q in U by left bidiagonalizing vectors
-*                    in VT
-*                    (CWorkspace: need 2*N+M, prefer 2*N+M*NB)
-*                    (RWorkspace: 0)
+               CALL ZLARCM( N, N, RWORK( IRVT ), N, VT, LDVT, A, LDA,
+     $                      RWORK( NRWORK ) )
+               CALL ZLACPY( 'F', N, N, A, LDA, VT, LDVT )
 *
-                     CALL ZUNMBR( 'Q', 'R', 'N', M, N, N, VT, LDVT,
-     $                            WORK( ITAUQ ), U, LDU, WORK( IWORK ),
-     $                            LWORK-IWORK+1, IERR )
+*              Multiply Q in U by real matrix RWORK(IRU), storing the
+*              result in A, copying to U
+*              CWorkspace: need   0
+*              RWorkspace: need   N [e] + N*N [RU] + 2*M*N [rwork] < N + 5*N*N since M < 2*N here
 *
-*                    Generate right bidiagonalizing vectors in VT
-*                    (CWorkspace: need 3*N-1, prefer 2*N+(N-1)*NB)
-*                    (RWorkspace: 0)
+               NRWORK = IRVT
+               CALL ZLACRM( M, N, U, LDU, RWORK( IRU ), N, A, LDA,
+     $                      RWORK( NRWORK ) )
+               CALL ZLACPY( 'F', M, N, A, LDA, U, LDU )
+            ELSE
 *
-                     CALL ZUNGBR( 'P', N, N, N, VT, LDVT, WORK( ITAUP ),
-     $                            WORK( IWORK ), LWORK-IWORK+1, IERR )
-                     IRWORK = IE + N
+*              Path 5a (M >> N, JOBZ='A')
+*              Copy A to VT, generate P**H
+*              CWorkspace: need   2*N [tauq, taup] + N    [work]
+*              CWorkspace: prefer 2*N [tauq, taup] + N*NB [work]
+*              RWorkspace: need   0
 *
-*                    Perform bidiagonal QR iteration, computing left
-*                    singular vectors of A in U and computing right
-*                    singular vectors of A in VT
-*                    (CWorkspace: 0)
-*                    (RWorkspace: need BDSPAC)
+               CALL ZLACPY( 'U', N, N, A, LDA, VT, LDVT )
+               CALL ZUNGBR( 'P', N, N, N, VT, LDVT, WORK( ITAUP ),
+     $                      WORK( NWORK ), LWORK-NWORK+1, IERR )
 *
-                     CALL ZBDSQR( 'U', N, N, M, 0, S, RWORK( IE ), VT,
-     $                            LDVT, U, LDU, CDUM, 1,
-     $                            RWORK( IRWORK ), INFO )
+*              Copy A to U, generate Q
+*              CWorkspace: need   2*N [tauq, taup] + M    [work]
+*              CWorkspace: prefer 2*N [tauq, taup] + M*NB [work]
+*              RWorkspace: need   0
 *
-                  END IF
+               CALL ZLACPY( 'L', M, N, A, LDA, U, LDU )
+               CALL ZUNGBR( 'Q', M, M, N, U, LDU, WORK( ITAUQ ),
+     $                      WORK( NWORK ), LWORK-NWORK+1, IERR )
 *
-               END IF
+*              Perform bidiagonal SVD, computing left singular vectors
+*              of bidiagonal matrix in RWORK(IRU) and computing right
+*              singular vectors of bidiagonal matrix in RWORK(IRVT)
+*              CWorkspace: need   0
+*              RWorkspace: need   N [e] + N*N [RU] + N*N [RVT] + BDSPAC
+*
+               IRU = NRWORK
+               IRVT = IRU + N*N
+               NRWORK = IRVT + N*N
+               CALL DBDSDC( 'U', 'I', N, S, RWORK( IE ), RWORK( IRU ),
+     $                      N, RWORK( IRVT ), N, DUM, IDUM,
+     $                      RWORK( NRWORK ), IWORK, INFO )
+*
+*              Multiply real matrix RWORK(IRVT) by P**H in VT,
+*              storing the result in A, copying to VT
+*              CWorkspace: need   0
+*              RWorkspace: need   N [e] + N*N [RU] + N*N [RVT] + 2*N*N [rwork]
 *
+               CALL ZLARCM( N, N, RWORK( IRVT ), N, VT, LDVT, A, LDA,
+     $                      RWORK( NRWORK ) )
+               CALL ZLACPY( 'F', N, N, A, LDA, VT, LDVT )
+*
+*              Multiply Q in U by real matrix RWORK(IRU), storing the
+*              result in A, copying to U
+*              CWorkspace: need   0
+*              RWorkspace: need   N [e] + N*N [RU] + 2*M*N [rwork] < N + 5*N*N since M < 2*N here
+*
+               NRWORK = IRVT
+               CALL ZLACRM( M, N, U, LDU, RWORK( IRU ), N, A, LDA,
+     $                      RWORK( NRWORK ) )
+               CALL ZLACPY( 'F', M, N, A, LDA, U, LDU )
             END IF
 *
          ELSE
 *
-*           M .LT. MNTHR
+*           M .LT. MNTHR2
 *
-*           Path 10 (M at least N, but not much larger)
+*           Path 6 (M >= N, but not much larger)
 *           Reduce to bidiagonal form without QR decomposition
+*           Use ZUNMBR to compute singular vectors
 *
             IE = 1
+            NRWORK = IE + N
             ITAUQ = 1
             ITAUP = ITAUQ + N
-            IWORK = ITAUP + N
+            NWORK = ITAUP + N
 *
 *           Bidiagonalize A
-*           (CWorkspace: need 2*N+M, prefer 2*N+(M+N)*NB)
-*           (RWorkspace: need N)
+*           CWorkspace: need   2*N [tauq, taup] + M        [work]
+*           CWorkspace: prefer 2*N [tauq, taup] + (M+N)*NB [work]
+*           RWorkspace: need   N [e]
 *
             CALL ZGEBRD( M, N, A, LDA, S, RWORK( IE ), WORK( ITAUQ ),
-     $                   WORK( ITAUP ), WORK( IWORK ), LWORK-IWORK+1,
+     $                   WORK( ITAUP ), WORK( NWORK ), LWORK-NWORK+1,
      $                   IERR )
-            IF( WNTUAS ) THEN
+            IF( WNTQN ) THEN
 *
-*              If left singular vectors desired in U, copy result to U
-*              and generate left bidiagonalizing vectors in U
-*              (CWorkspace: need 2*N+NCU, prefer 2*N+NCU*NB)
-*              (RWorkspace: 0)
+*              Path 6n (M >= N, JOBZ='N')
+*              Compute singular values only
+*              CWorkspace: need   0
+*              RWorkspace: need   N [e] + BDSPAC
 *
-               CALL ZLACPY( 'L', M, N, A, LDA, U, LDU )
-               IF( WNTUS )
-     $            NCU = N
-               IF( WNTUA )
-     $            NCU = M
-               CALL ZUNGBR( 'Q', M, NCU, N, U, LDU, WORK( ITAUQ ),
-     $                      WORK( IWORK ), LWORK-IWORK+1, IERR )
-            END IF
-            IF( WNTVAS ) THEN
+               CALL DBDSDC( 'U', 'N', N, S, RWORK( IE ), DUM,1,DUM,1,
+     $                      DUM, IDUM, RWORK( NRWORK ), IWORK, INFO )
+            ELSE IF( WNTQO ) THEN
+               IU = NWORK
+               IRU = NRWORK
+               IRVT = IRU + N*N
+               NRWORK = IRVT + N*N
+               IF( LWORK .GE. M*N + 3*N ) THEN
 *
-*              If right singular vectors desired in VT, copy result to
-*              VT and generate right bidiagonalizing vectors in VT
-*              (CWorkspace: need 3*N-1, prefer 2*N+(N-1)*NB)
-*              (RWorkspace: 0)
+*                 WORK( IU ) is M by N
 *
-               CALL ZLACPY( 'U', N, N, A, LDA, VT, LDVT )
-               CALL ZUNGBR( 'P', N, N, N, VT, LDVT, WORK( ITAUP ),
-     $                      WORK( IWORK ), LWORK-IWORK+1, IERR )
-            END IF
-            IF( WNTUO ) THEN
+                  LDWRKU = M
+               ELSE
 *
-*              If left singular vectors desired in A, generate left
-*              bidiagonalizing vectors in A
-*              (CWorkspace: need 3*N, prefer 2*N+N*NB)
-*              (RWorkspace: 0)
+*                 WORK( IU ) is LDWRKU by N
 *
-               CALL ZUNGBR( 'Q', M, N, N, A, LDA, WORK( ITAUQ ),
-     $                      WORK( IWORK ), LWORK-IWORK+1, IERR )
-            END IF
-            IF( WNTVO ) THEN
+                  LDWRKU = ( LWORK - 3*N ) / N
+               END IF
+               NWORK = IU + LDWRKU*N
 *
-*              If right singular vectors desired in A, generate right
-*              bidiagonalizing vectors in A
-*              (CWorkspace: need 3*N-1, prefer 2*N+(N-1)*NB)
-*              (RWorkspace: 0)
+*              Path 6o (M >= N, JOBZ='O')
+*              Perform bidiagonal SVD, computing left singular vectors
+*              of bidiagonal matrix in RWORK(IRU) and computing right
+*              singular vectors of bidiagonal matrix in RWORK(IRVT)
+*              CWorkspace: need   0
+*              RWorkspace: need   N [e] + N*N [RU] + N*N [RVT] + BDSPAC
 *
-               CALL ZUNGBR( 'P', N, N, N, A, LDA, WORK( ITAUP ),
-     $                      WORK( IWORK ), LWORK-IWORK+1, IERR )
-            END IF
-            IRWORK = IE + N
-            IF( WNTUAS .OR. WNTUO )
-     $         NRU = M
-            IF( WNTUN )
-     $         NRU = 0
-            IF( WNTVAS .OR. WNTVO )
-     $         NCVT = N
-            IF( WNTVN )
-     $         NCVT = 0
-            IF( ( .NOT.WNTUO ) .AND. ( .NOT.WNTVO ) ) THEN
+               CALL DBDSDC( 'U', 'I', N, S, RWORK( IE ), RWORK( IRU ),
+     $                      N, RWORK( IRVT ), N, DUM, IDUM,
+     $                      RWORK( NRWORK ), IWORK, INFO )
 *
-*              Perform bidiagonal QR iteration, if desired, computing
-*              left singular vectors in U and computing right singular
-*              vectors in VT
-*              (CWorkspace: 0)
-*              (RWorkspace: need BDSPAC)
+*              Copy real matrix RWORK(IRVT) to complex matrix VT
+*              Overwrite VT by right singular vectors of A
+*              CWorkspace: need   2*N [tauq, taup] + N*N [U] + N    [work]
+*              CWorkspace: prefer 2*N [tauq, taup] + N*N [U] + N*NB [work]
+*              RWorkspace: need   N [e] + N*N [RU] + N*N [RVT]
 *
-               CALL ZBDSQR( 'U', N, NCVT, NRU, 0, S, RWORK( IE ), VT,
-     $                      LDVT, U, LDU, CDUM, 1, RWORK( IRWORK ),
-     $                      INFO )
-            ELSE IF( ( .NOT.WNTUO ) .AND. WNTVO ) THEN
+               CALL ZLACP2( 'F', N, N, RWORK( IRVT ), N, VT, LDVT )
+               CALL ZUNMBR( 'P', 'R', 'C', N, N, N, A, LDA,
+     $                      WORK( ITAUP ), VT, LDVT, WORK( NWORK ),
+     $                      LWORK-NWORK+1, IERR )
 *
-*              Perform bidiagonal QR iteration, if desired, computing
-*              left singular vectors in U and computing right singular
-*              vectors in A
-*              (CWorkspace: 0)
-*              (RWorkspace: need BDSPAC)
+               IF( LWORK .GE. M*N + 3*N ) THEN
 *
-               CALL ZBDSQR( 'U', N, NCVT, NRU, 0, S, RWORK( IE ), A,
-     $                      LDA, U, LDU, CDUM, 1, RWORK( IRWORK ),
-     $                      INFO )
+*                 Path 6o-fast
+*                 Copy real matrix RWORK(IRU) to complex matrix WORK(IU)
+*                 Overwrite WORK(IU) by left singular vectors of A, copying
+*                 to A
+*                 CWorkspace: need   2*N [tauq, taup] + M*N [U] + N    [work]
+*                 CWorkspace: prefer 2*N [tauq, taup] + M*N [U] + N*NB [work]
+*                 RWorkspace: need   N [e] + N*N [RU]
+*
+                  CALL ZLASET( 'F', M, N, CZERO, CZERO, WORK( IU ),
+     $                         LDWRKU )
+                  CALL ZLACP2( 'F', N, N, RWORK( IRU ), N, WORK( IU ),
+     $                         LDWRKU )
+                  CALL ZUNMBR( 'Q', 'L', 'N', M, N, N, A, LDA,
+     $                         WORK( ITAUQ ), WORK( IU ), LDWRKU,
+     $                         WORK( NWORK ), LWORK-NWORK+1, IERR )
+                  CALL ZLACPY( 'F', M, N, WORK( IU ), LDWRKU, A, LDA )
+               ELSE
+*
+*                 Path 6o-slow
+*                 Generate Q in A
+*                 CWorkspace: need   2*N [tauq, taup] + N*N [U] + N    [work]
+*                 CWorkspace: prefer 2*N [tauq, taup] + N*N [U] + N*NB [work]
+*                 RWorkspace: need   0
+*
+                  CALL ZUNGBR( 'Q', M, N, N, A, LDA, WORK( ITAUQ ),
+     $                         WORK( NWORK ), LWORK-NWORK+1, IERR )
+*
+*                 Multiply Q in A by real matrix RWORK(IRU), storing the
+*                 result in WORK(IU), copying to A
+*                 CWorkspace: need   2*N [tauq, taup] + N*N [U]
+*                 CWorkspace: prefer 2*N [tauq, taup] + M*N [U]
+*                 RWorkspace: need   N [e] + N*N [RU] + 2*N*N [rwork]
+*                 RWorkspace: prefer N [e] + N*N [RU] + 2*M*N [rwork] < N + 5*N*N since M < 2*N here
+*
+                  NRWORK = IRVT
+                  DO 30 I = 1, M, LDWRKU
+                     CHUNK = MIN( M-I+1, LDWRKU )
+                     CALL ZLACRM( CHUNK, N, A( I, 1 ), LDA,
+     $                            RWORK( IRU ), N, WORK( IU ), LDWRKU,
+     $                            RWORK( NRWORK ) )
+                     CALL ZLACPY( 'F', CHUNK, N, WORK( IU ), LDWRKU,
+     $                            A( I, 1 ), LDA )
+   30             CONTINUE
+               END IF
+*
+            ELSE IF( WNTQS ) THEN
+*
+*              Path 6s (M >= N, JOBZ='S')
+*              Perform bidiagonal SVD, computing left singular vectors
+*              of bidiagonal matrix in RWORK(IRU) and computing right
+*              singular vectors of bidiagonal matrix in RWORK(IRVT)
+*              CWorkspace: need   0
+*              RWorkspace: need   N [e] + N*N [RU] + N*N [RVT] + BDSPAC
+*
+               IRU = NRWORK
+               IRVT = IRU + N*N
+               NRWORK = IRVT + N*N
+               CALL DBDSDC( 'U', 'I', N, S, RWORK( IE ), RWORK( IRU ),
+     $                      N, RWORK( IRVT ), N, DUM, IDUM,
+     $                      RWORK( NRWORK ), IWORK, INFO )
+*
+*              Copy real matrix RWORK(IRU) to complex matrix U
+*              Overwrite U by left singular vectors of A
+*              CWorkspace: need   2*N [tauq, taup] + N    [work]
+*              CWorkspace: prefer 2*N [tauq, taup] + N*NB [work]
+*              RWorkspace: need   N [e] + N*N [RU] + N*N [RVT]
+*
+               CALL ZLASET( 'F', M, N, CZERO, CZERO, U, LDU )
+               CALL ZLACP2( 'F', N, N, RWORK( IRU ), N, U, LDU )
+               CALL ZUNMBR( 'Q', 'L', 'N', M, N, N, A, LDA,
+     $                      WORK( ITAUQ ), U, LDU, WORK( NWORK ),
+     $                      LWORK-NWORK+1, IERR )
+*
+*              Copy real matrix RWORK(IRVT) to complex matrix VT
+*              Overwrite VT by right singular vectors of A
+*              CWorkspace: need   2*N [tauq, taup] + N    [work]
+*              CWorkspace: prefer 2*N [tauq, taup] + N*NB [work]
+*              RWorkspace: need   N [e] + N*N [RU] + N*N [RVT]
+*
+               CALL ZLACP2( 'F', N, N, RWORK( IRVT ), N, VT, LDVT )
+               CALL ZUNMBR( 'P', 'R', 'C', N, N, N, A, LDA,
+     $                      WORK( ITAUP ), VT, LDVT, WORK( NWORK ),
+     $                      LWORK-NWORK+1, IERR )
             ELSE
 *
-*              Perform bidiagonal QR iteration, if desired, computing
-*              left singular vectors in A and computing right singular
-*              vectors in VT
-*              (CWorkspace: 0)
-*              (RWorkspace: need BDSPAC)
+*              Path 6a (M >= N, JOBZ='A')
+*              Perform bidiagonal SVD, computing left singular vectors
+*              of bidiagonal matrix in RWORK(IRU) and computing right
+*              singular vectors of bidiagonal matrix in RWORK(IRVT)
+*              CWorkspace: need   0
+*              RWorkspace: need   N [e] + N*N [RU] + N*N [RVT] + BDSPAC
 *
-               CALL ZBDSQR( 'U', N, NCVT, NRU, 0, S, RWORK( IE ), VT,
-     $                      LDVT, A, LDA, CDUM, 1, RWORK( IRWORK ),
-     $                      INFO )
+               IRU = NRWORK
+               IRVT = IRU + N*N
+               NRWORK = IRVT + N*N
+               CALL DBDSDC( 'U', 'I', N, S, RWORK( IE ), RWORK( IRU ),
+     $                      N, RWORK( IRVT ), N, DUM, IDUM,
+     $                      RWORK( NRWORK ), IWORK, INFO )
+*
+*              Set the right corner of U to identity matrix
+*
+               CALL ZLASET( 'F', M, M, CZERO, CZERO, U, LDU )
+               IF( M.GT.N ) THEN
+                  CALL ZLASET( 'F', M-N, M-N, CZERO, CONE,
+     $                         U( N+1, N+1 ), LDU )
+               END IF
+*
+*              Copy real matrix RWORK(IRU) to complex matrix U
+*              Overwrite U by left singular vectors of A
+*              CWorkspace: need   2*N [tauq, taup] + M    [work]
+*              CWorkspace: prefer 2*N [tauq, taup] + M*NB [work]
+*              RWorkspace: need   N [e] + N*N [RU] + N*N [RVT]
+*
+               CALL ZLACP2( 'F', N, N, RWORK( IRU ), N, U, LDU )
+               CALL ZUNMBR( 'Q', 'L', 'N', M, M, N, A, LDA,
+     $                      WORK( ITAUQ ), U, LDU, WORK( NWORK ),
+     $                      LWORK-NWORK+1, IERR )
+*
+*              Copy real matrix RWORK(IRVT) to complex matrix VT
+*              Overwrite VT by right singular vectors of A
+*              CWorkspace: need   2*N [tauq, taup] + N    [work]
+*              CWorkspace: prefer 2*N [tauq, taup] + N*NB [work]
+*              RWorkspace: need   N [e] + N*N [RU] + N*N [RVT]
+*
+               CALL ZLACP2( 'F', N, N, RWORK( IRVT ), N, VT, LDVT )
+               CALL ZUNMBR( 'P', 'R', 'C', N, N, N, A, LDA,
+     $                      WORK( ITAUP ), VT, LDVT, WORK( NWORK ),
+     $                      LWORK-NWORK+1, IERR )
             END IF
 *
          END IF
@@ -7890,22 +9521,23 @@
 *        columns than rows, first reduce using the LQ decomposition (if
 *        sufficient workspace available)
 *
-         IF( N.GE.MNTHR ) THEN
+         IF( N.GE.MNTHR1 ) THEN
 *
-            IF( WNTVN ) THEN
+            IF( WNTQN ) THEN
 *
-*              Path 1t(N much larger than M, JOBVT='N')
-*              No right singular vectors to be computed
+*              Path 1t (N >> M, JOBZ='N')
+*              No singular vectors to be computed
 *
                ITAU = 1
-               IWORK = ITAU + M
+               NWORK = ITAU + M
 *
 *              Compute A=L*Q
-*              (CWorkspace: need 2*M, prefer M+M*NB)
-*              (RWorkspace: 0)
+*              CWorkspace: need   M [tau] + M    [work]
+*              CWorkspace: prefer M [tau] + M*NB [work]
+*              RWorkspace: need   0
 *
-               CALL ZGELQF( M, N, A, LDA, WORK( ITAU ), WORK( IWORK ),
-     $                      LWORK-IWORK+1, IERR )
+               CALL ZGELQF( M, N, A, LDA, WORK( ITAU ), WORK( NWORK ),
+     $                      LWORK-NWORK+1, IERR )
 *
 *              Zero out above L
 *
@@ -7914,1653 +9546,13957 @@
                IE = 1
                ITAUQ = 1
                ITAUP = ITAUQ + M
-               IWORK = ITAUP + M
+               NWORK = ITAUP + M
 *
 *              Bidiagonalize L in A
-*              (CWorkspace: need 3*M, prefer 2*M+2*M*NB)
-*              (RWorkspace: need M)
+*              CWorkspace: need   2*M [tauq, taup] + M      [work]
+*              CWorkspace: prefer 2*M [tauq, taup] + 2*M*NB [work]
+*              RWorkspace: need   M [e]
 *
                CALL ZGEBRD( M, M, A, LDA, S, RWORK( IE ), WORK( ITAUQ ),
-     $                      WORK( ITAUP ), WORK( IWORK ), LWORK-IWORK+1,
+     $                      WORK( ITAUP ), WORK( NWORK ), LWORK-NWORK+1,
      $                      IERR )
-               IF( WNTUO .OR. WNTUAS ) THEN
+               NRWORK = IE + M
 *
-*                 If left singular vectors desired, generate Q
-*                 (CWorkspace: need 3*M, prefer 2*M+M*NB)
-*                 (RWorkspace: 0)
+*              Perform bidiagonal SVD, compute singular values only
+*              CWorkspace: need   0
+*              RWorkspace: need   M [e] + BDSPAC
 *
-                  CALL ZUNGBR( 'Q', M, M, M, A, LDA, WORK( ITAUQ ),
-     $                         WORK( IWORK ), LWORK-IWORK+1, IERR )
-               END IF
-               IRWORK = IE + M
-               NRU = 0
-               IF( WNTUO .OR. WNTUAS )
-     $            NRU = M
+               CALL DBDSDC( 'U', 'N', M, S, RWORK( IE ), DUM,1,DUM,1,
+     $                      DUM, IDUM, RWORK( NRWORK ), IWORK, INFO )
 *
-*              Perform bidiagonal QR iteration, computing left singular
-*              vectors of A in A if desired
-*              (CWorkspace: 0)
-*              (RWorkspace: need BDSPAC)
+            ELSE IF( WNTQO ) THEN
 *
-               CALL ZBDSQR( 'U', M, 0, NRU, 0, S, RWORK( IE ), CDUM, 1,
-     $                      A, LDA, CDUM, 1, RWORK( IRWORK ), INFO )
+*              Path 2t (N >> M, JOBZ='O')
+*              M right singular vectors to be overwritten on A and
+*              M left singular vectors to be computed in U
 *
-*              If left singular vectors desired in U, copy them there
+               IVT = 1
+               LDWKVT = M
 *
-               IF( WNTUAS )
-     $            CALL ZLACPY( 'F', M, M, A, LDA, U, LDU )
+*              WORK(IVT) is M by M
 *
-            ELSE IF( WNTVO .AND. WNTUN ) THEN
+               IL = IVT + LDWKVT*M
+               IF( LWORK .GE. M*N + M*M + 3*M ) THEN
 *
-*              Path 2t(N much larger than M, JOBU='N', JOBVT='O')
-*              M right singular vectors to be overwritten on A and
-*              no left singular vectors to be computed
+*                 WORK(IL) M by N
 *
-               IF( LWORK.GE.M*M+3*M ) THEN
+                  LDWRKL = M
+                  CHUNK = N
+               ELSE
 *
-*                 Sufficient workspace for a fast algorithm
+*                 WORK(IL) is M by CHUNK
 *
-                  IR = 1
-                  IF( LWORK.GE.MAX( WRKBL, LDA*N )+LDA*M ) THEN
+                  LDWRKL = M
+                  CHUNK = ( LWORK - M*M - 3*M ) / M
+               END IF
+               ITAU = IL + LDWRKL*CHUNK
+               NWORK = ITAU + M
 *
-*                    WORK(IU) is LDA by N and WORK(IR) is LDA by M
+*              Compute A=L*Q
+*              CWorkspace: need   M*M [VT] + M*M [L] + M [tau] + M    [work]
+*              CWorkspace: prefer M*M [VT] + M*M [L] + M [tau] + M*NB [work]
+*              RWorkspace: need   0
 *
-                     LDWRKU = LDA
-                     CHUNK = N
-                     LDWRKR = LDA
-                  ELSE IF( LWORK.GE.MAX( WRKBL, LDA*N )+M*M ) THEN
+               CALL ZGELQF( M, N, A, LDA, WORK( ITAU ), WORK( NWORK ),
+     $                      LWORK-NWORK+1, IERR )
 *
-*                    WORK(IU) is LDA by N and WORK(IR) is M by M
+*              Copy L to WORK(IL), zeroing about above it
 *
-                     LDWRKU = LDA
-                     CHUNK = N
-                     LDWRKR = M
-                  ELSE
+               CALL ZLACPY( 'L', M, M, A, LDA, WORK( IL ), LDWRKL )
+               CALL ZLASET( 'U', M-1, M-1, CZERO, CZERO,
+     $                      WORK( IL+LDWRKL ), LDWRKL )
 *
-*                    WORK(IU) is M by CHUNK and WORK(IR) is M by M
+*              Generate Q in A
+*              CWorkspace: need   M*M [VT] + M*M [L] + M [tau] + M    [work]
+*              CWorkspace: prefer M*M [VT] + M*M [L] + M [tau] + M*NB [work]
+*              RWorkspace: need   0
 *
-                     LDWRKU = M
-                     CHUNK = ( LWORK-M*M ) / M
-                     LDWRKR = M
-                  END IF
-                  ITAU = IR + LDWRKR*M
-                  IWORK = ITAU + M
+               CALL ZUNGLQ( M, N, M, A, LDA, WORK( ITAU ),
+     $                      WORK( NWORK ), LWORK-NWORK+1, IERR )
+               IE = 1
+               ITAUQ = ITAU
+               ITAUP = ITAUQ + M
+               NWORK = ITAUP + M
 *
-*                 Compute A=L*Q
-*                 (CWorkspace: need M*M+2*M, prefer M*M+M+M*NB)
-*                 (RWorkspace: 0)
+*              Bidiagonalize L in WORK(IL)
+*              CWorkspace: need   M*M [VT] + M*M [L] + 2*M [tauq, taup] + M      [work]
+*              CWorkspace: prefer M*M [VT] + M*M [L] + 2*M [tauq, taup] + 2*M*NB [work]
+*              RWorkspace: need   M [e]
 *
-                  CALL ZGELQF( M, N, A, LDA, WORK( ITAU ),
-     $                         WORK( IWORK ), LWORK-IWORK+1, IERR )
+               CALL ZGEBRD( M, M, WORK( IL ), LDWRKL, S, RWORK( IE ),
+     $                      WORK( ITAUQ ), WORK( ITAUP ), WORK( NWORK ),
+     $                      LWORK-NWORK+1, IERR )
 *
-*                 Copy L to WORK(IR) and zero out above it
+*              Perform bidiagonal SVD, computing left singular vectors
+*              of bidiagonal matrix in RWORK(IRU) and computing right
+*              singular vectors of bidiagonal matrix in RWORK(IRVT)
+*              CWorkspace: need   0
+*              RWorkspace: need   M [e] + M*M [RU] + M*M [RVT] + BDSPAC
 *
-                  CALL ZLACPY( 'L', M, M, A, LDA, WORK( IR ), LDWRKR )
-                  CALL ZLASET( 'U', M-1, M-1, CZERO, CZERO,
-     $                         WORK( IR+LDWRKR ), LDWRKR )
+               IRU = IE + M
+               IRVT = IRU + M*M
+               NRWORK = IRVT + M*M
+               CALL DBDSDC( 'U', 'I', M, S, RWORK( IE ), RWORK( IRU ),
+     $                      M, RWORK( IRVT ), M, DUM, IDUM,
+     $                      RWORK( NRWORK ), IWORK, INFO )
 *
-*                 Generate Q in A
-*                 (CWorkspace: need M*M+2*M, prefer M*M+M+M*NB)
-*                 (RWorkspace: 0)
+*              Copy real matrix RWORK(IRU) to complex matrix WORK(IU)
+*              Overwrite WORK(IU) by the left singular vectors of L
+*              CWorkspace: need   M*M [VT] + M*M [L] + 2*M [tauq, taup] + M    [work]
+*              CWorkspace: prefer M*M [VT] + M*M [L] + 2*M [tauq, taup] + M*NB [work]
+*              RWorkspace: need   0
 *
-                  CALL ZUNGLQ( M, N, M, A, LDA, WORK( ITAU ),
-     $                         WORK( IWORK ), LWORK-IWORK+1, IERR )
-                  IE = 1
-                  ITAUQ = ITAU
-                  ITAUP = ITAUQ + M
-                  IWORK = ITAUP + M
+               CALL ZLACP2( 'F', M, M, RWORK( IRU ), M, U, LDU )
+               CALL ZUNMBR( 'Q', 'L', 'N', M, M, M, WORK( IL ), LDWRKL,
+     $                      WORK( ITAUQ ), U, LDU, WORK( NWORK ),
+     $                      LWORK-NWORK+1, IERR )
 *
-*                 Bidiagonalize L in WORK(IR)
-*                 (CWorkspace: need M*M+3*M, prefer M*M+2*M+2*M*NB)
-*                 (RWorkspace: need M)
-*
-                  CALL ZGEBRD( M, M, WORK( IR ), LDWRKR, S, RWORK( IE ),
-     $                         WORK( ITAUQ ), WORK( ITAUP ),
-     $                         WORK( IWORK ), LWORK-IWORK+1, IERR )
+*              Copy real matrix RWORK(IRVT) to complex matrix WORK(IVT)
+*              Overwrite WORK(IVT) by the right singular vectors of L
+*              CWorkspace: need   M*M [VT] + M*M [L] + 2*M [tauq, taup] + M    [work]
+*              CWorkspace: prefer M*M [VT] + M*M [L] + 2*M [tauq, taup] + M*NB [work]
+*              RWorkspace: need   0
 *
-*                 Generate right vectors bidiagonalizing L
-*                 (CWorkspace: need M*M+3*M-1, prefer M*M+2*M+(M-1)*NB)
-*                 (RWorkspace: 0)
+               CALL ZLACP2( 'F', M, M, RWORK( IRVT ), M, WORK( IVT ),
+     $                      LDWKVT )
+               CALL ZUNMBR( 'P', 'R', 'C', M, M, M, WORK( IL ), LDWRKL,
+     $                      WORK( ITAUP ), WORK( IVT ), LDWKVT,
+     $                      WORK( NWORK ), LWORK-NWORK+1, IERR )
 *
-                  CALL ZUNGBR( 'P', M, M, M, WORK( IR ), LDWRKR,
-     $                         WORK( ITAUP ), WORK( IWORK ),
-     $                         LWORK-IWORK+1, IERR )
-                  IRWORK = IE + M
+*              Multiply right singular vectors of L in WORK(IL) by Q
+*              in A, storing result in WORK(IL) and copying to A
+*              CWorkspace: need   M*M [VT] + M*M [L]
+*              CWorkspace: prefer M*M [VT] + M*N [L]
+*              RWorkspace: need   0
 *
-*                 Perform bidiagonal QR iteration, computing right
-*                 singular vectors of L in WORK(IR)
-*                 (CWorkspace: need M*M)
-*                 (RWorkspace: need BDSPAC)
+               DO 40 I = 1, N, CHUNK
+                  BLK = MIN( N-I+1, CHUNK )
+                  CALL ZGEMM( 'N', 'N', M, BLK, M, CONE, WORK( IVT ), M,
+     $                        A( 1, I ), LDA, CZERO, WORK( IL ),
+     $                        LDWRKL )
+                  CALL ZLACPY( 'F', M, BLK, WORK( IL ), LDWRKL,
+     $                         A( 1, I ), LDA )
+   40          CONTINUE
 *
-                  CALL ZBDSQR( 'U', M, M, 0, 0, S, RWORK( IE ),
-     $                         WORK( IR ), LDWRKR, CDUM, 1, CDUM, 1,
-     $                         RWORK( IRWORK ), INFO )
-                  IU = ITAUQ
+            ELSE IF( WNTQS ) THEN
 *
-*                 Multiply right singular vectors of L in WORK(IR) by Q
-*                 in A, storing result in WORK(IU) and copying to A
-*                 (CWorkspace: need M*M+M, prefer M*M+M*N)
-*                 (RWorkspace: 0)
+*              Path 3t (N >> M, JOBZ='S')
+*              M right singular vectors to be computed in VT and
+*              M left singular vectors to be computed in U
 *
-                  DO 30 I = 1, N, CHUNK
-                     BLK = MIN( N-I+1, CHUNK )
-                     CALL ZGEMM( 'N', 'N', M, BLK, M, CONE, WORK( IR ),
-     $                           LDWRKR, A( 1, I ), LDA, CZERO,
-     $                           WORK( IU ), LDWRKU )
-                     CALL ZLACPY( 'F', M, BLK, WORK( IU ), LDWRKU,
-     $                            A( 1, I ), LDA )
-   30             CONTINUE
+               IL = 1
 *
-               ELSE
+*              WORK(IL) is M by M
 *
-*                 Insufficient workspace for a fast algorithm
+               LDWRKL = M
+               ITAU = IL + LDWRKL*M
+               NWORK = ITAU + M
 *
-                  IE = 1
-                  ITAUQ = 1
-                  ITAUP = ITAUQ + M
-                  IWORK = ITAUP + M
+*              Compute A=L*Q
+*              CWorkspace: need   M*M [L] + M [tau] + M    [work]
+*              CWorkspace: prefer M*M [L] + M [tau] + M*NB [work]
+*              RWorkspace: need   0
 *
-*                 Bidiagonalize A
-*                 (CWorkspace: need 2*M+N, prefer 2*M+(M+N)*NB)
-*                 (RWorkspace: need M)
+               CALL ZGELQF( M, N, A, LDA, WORK( ITAU ), WORK( NWORK ),
+     $                      LWORK-NWORK+1, IERR )
 *
-                  CALL ZGEBRD( M, N, A, LDA, S, RWORK( IE ),
-     $                         WORK( ITAUQ ), WORK( ITAUP ),
-     $                         WORK( IWORK ), LWORK-IWORK+1, IERR )
+*              Copy L to WORK(IL), zeroing out above it
 *
-*                 Generate right vectors bidiagonalizing A
-*                 (CWorkspace: need 3*M, prefer 2*M+M*NB)
-*                 (RWorkspace: 0)
+               CALL ZLACPY( 'L', M, M, A, LDA, WORK( IL ), LDWRKL )
+               CALL ZLASET( 'U', M-1, M-1, CZERO, CZERO,
+     $                      WORK( IL+LDWRKL ), LDWRKL )
 *
-                  CALL ZUNGBR( 'P', M, N, M, A, LDA, WORK( ITAUP ),
-     $                         WORK( IWORK ), LWORK-IWORK+1, IERR )
-                  IRWORK = IE + M
+*              Generate Q in A
+*              CWorkspace: need   M*M [L] + M [tau] + M    [work]
+*              CWorkspace: prefer M*M [L] + M [tau] + M*NB [work]
+*              RWorkspace: need   0
 *
-*                 Perform bidiagonal QR iteration, computing right
-*                 singular vectors of A in A
-*                 (CWorkspace: 0)
-*                 (RWorkspace: need BDSPAC)
+               CALL ZUNGLQ( M, N, M, A, LDA, WORK( ITAU ),
+     $                      WORK( NWORK ), LWORK-NWORK+1, IERR )
+               IE = 1
+               ITAUQ = ITAU
+               ITAUP = ITAUQ + M
+               NWORK = ITAUP + M
 *
-                  CALL ZBDSQR( 'L', M, N, 0, 0, S, RWORK( IE ), A, LDA,
-     $                         CDUM, 1, CDUM, 1, RWORK( IRWORK ), INFO )
+*              Bidiagonalize L in WORK(IL)
+*              CWorkspace: need   M*M [L] + 2*M [tauq, taup] + M      [work]
+*              CWorkspace: prefer M*M [L] + 2*M [tauq, taup] + 2*M*NB [work]
+*              RWorkspace: need   M [e]
 *
-               END IF
+               CALL ZGEBRD( M, M, WORK( IL ), LDWRKL, S, RWORK( IE ),
+     $                      WORK( ITAUQ ), WORK( ITAUP ), WORK( NWORK ),
+     $                      LWORK-NWORK+1, IERR )
 *
-            ELSE IF( WNTVO .AND. WNTUAS ) THEN
+*              Perform bidiagonal SVD, computing left singular vectors
+*              of bidiagonal matrix in RWORK(IRU) and computing right
+*              singular vectors of bidiagonal matrix in RWORK(IRVT)
+*              CWorkspace: need   0
+*              RWorkspace: need   M [e] + M*M [RU] + M*M [RVT] + BDSPAC
 *
-*              Path 3t(N much larger than M, JOBU='S' or 'A', JOBVT='O')
-*              M right singular vectors to be overwritten on A and
-*              M left singular vectors to be computed in U
+               IRU = IE + M
+               IRVT = IRU + M*M
+               NRWORK = IRVT + M*M
+               CALL DBDSDC( 'U', 'I', M, S, RWORK( IE ), RWORK( IRU ),
+     $                      M, RWORK( IRVT ), M, DUM, IDUM,
+     $                      RWORK( NRWORK ), IWORK, INFO )
 *
-               IF( LWORK.GE.M*M+3*M ) THEN
+*              Copy real matrix RWORK(IRU) to complex matrix U
+*              Overwrite U by left singular vectors of L
+*              CWorkspace: need   M*M [L] + 2*M [tauq, taup] + M    [work]
+*              CWorkspace: prefer M*M [L] + 2*M [tauq, taup] + M*NB [work]
+*              RWorkspace: need   0
 *
-*                 Sufficient workspace for a fast algorithm
+               CALL ZLACP2( 'F', M, M, RWORK( IRU ), M, U, LDU )
+               CALL ZUNMBR( 'Q', 'L', 'N', M, M, M, WORK( IL ), LDWRKL,
+     $                      WORK( ITAUQ ), U, LDU, WORK( NWORK ),
+     $                      LWORK-NWORK+1, IERR )
 *
-                  IR = 1
-                  IF( LWORK.GE.MAX( WRKBL, LDA*N )+LDA*M ) THEN
+*              Copy real matrix RWORK(IRVT) to complex matrix VT
+*              Overwrite VT by left singular vectors of L
+*              CWorkspace: need   M*M [L] + 2*M [tauq, taup] + M    [work]
+*              CWorkspace: prefer M*M [L] + 2*M [tauq, taup] + M*NB [work]
+*              RWorkspace: need   0
 *
-*                    WORK(IU) is LDA by N and WORK(IR) is LDA by M
+               CALL ZLACP2( 'F', M, M, RWORK( IRVT ), M, VT, LDVT )
+               CALL ZUNMBR( 'P', 'R', 'C', M, M, M, WORK( IL ), LDWRKL,
+     $                      WORK( ITAUP ), VT, LDVT, WORK( NWORK ),
+     $                      LWORK-NWORK+1, IERR )
 *
-                     LDWRKU = LDA
-                     CHUNK = N
-                     LDWRKR = LDA
-                  ELSE IF( LWORK.GE.MAX( WRKBL, LDA*N )+M*M ) THEN
+*              Copy VT to WORK(IL), multiply right singular vectors of L
+*              in WORK(IL) by Q in A, storing result in VT
+*              CWorkspace: need   M*M [L]
+*              RWorkspace: need   0
 *
-*                    WORK(IU) is LDA by N and WORK(IR) is M by M
+               CALL ZLACPY( 'F', M, M, VT, LDVT, WORK( IL ), LDWRKL )
+               CALL ZGEMM( 'N', 'N', M, N, M, CONE, WORK( IL ), LDWRKL,
+     $                     A, LDA, CZERO, VT, LDVT )
 *
-                     LDWRKU = LDA
-                     CHUNK = N
-                     LDWRKR = M
-                  ELSE
+            ELSE IF( WNTQA ) THEN
 *
-*                    WORK(IU) is M by CHUNK and WORK(IR) is M by M
+*              Path 4t (N >> M, JOBZ='A')
+*              N right singular vectors to be computed in VT and
+*              M left singular vectors to be computed in U
 *
-                     LDWRKU = M
-                     CHUNK = ( LWORK-M*M ) / M
-                     LDWRKR = M
-                  END IF
-                  ITAU = IR + LDWRKR*M
-                  IWORK = ITAU + M
+               IVT = 1
 *
-*                 Compute A=L*Q
-*                 (CWorkspace: need M*M+2*M, prefer M*M+M+M*NB)
-*                 (RWorkspace: 0)
+*              WORK(IVT) is M by M
 *
-                  CALL ZGELQF( M, N, A, LDA, WORK( ITAU ),
-     $                         WORK( IWORK ), LWORK-IWORK+1, IERR )
+               LDWKVT = M
+               ITAU = IVT + LDWKVT*M
+               NWORK = ITAU + M
 *
-*                 Copy L to U, zeroing about above it
+*              Compute A=L*Q, copying result to VT
+*              CWorkspace: need   M*M [VT] + M [tau] + M    [work]
+*              CWorkspace: prefer M*M [VT] + M [tau] + M*NB [work]
+*              RWorkspace: need   0
 *
-                  CALL ZLACPY( 'L', M, M, A, LDA, U, LDU )
-                  CALL ZLASET( 'U', M-1, M-1, CZERO, CZERO, U( 1, 2 ),
-     $                         LDU )
+               CALL ZGELQF( M, N, A, LDA, WORK( ITAU ), WORK( NWORK ),
+     $                      LWORK-NWORK+1, IERR )
+               CALL ZLACPY( 'U', M, N, A, LDA, VT, LDVT )
 *
-*                 Generate Q in A
-*                 (CWorkspace: need M*M+2*M, prefer M*M+M+M*NB)
-*                 (RWorkspace: 0)
+*              Generate Q in VT
+*              CWorkspace: need   M*M [VT] + M [tau] + N    [work]
+*              CWorkspace: prefer M*M [VT] + M [tau] + N*NB [work]
+*              RWorkspace: need   0
 *
-                  CALL ZUNGLQ( M, N, M, A, LDA, WORK( ITAU ),
-     $                         WORK( IWORK ), LWORK-IWORK+1, IERR )
-                  IE = 1
-                  ITAUQ = ITAU
-                  ITAUP = ITAUQ + M
-                  IWORK = ITAUP + M
+               CALL ZUNGLQ( N, N, M, VT, LDVT, WORK( ITAU ),
+     $                      WORK( NWORK ), LWORK-NWORK+1, IERR )
 *
-*                 Bidiagonalize L in U, copying result to WORK(IR)
-*                 (CWorkspace: need M*M+3*M, prefer M*M+2*M+2*M*NB)
-*                 (RWorkspace: need M)
+*              Produce L in A, zeroing out above it
 *
-                  CALL ZGEBRD( M, M, U, LDU, S, RWORK( IE ),
-     $                         WORK( ITAUQ ), WORK( ITAUP ),
-     $                         WORK( IWORK ), LWORK-IWORK+1, IERR )
-                  CALL ZLACPY( 'U', M, M, U, LDU, WORK( IR ), LDWRKR )
+               CALL ZLASET( 'U', M-1, M-1, CZERO, CZERO, A( 1, 2 ),
+     $                      LDA )
+               IE = 1
+               ITAUQ = ITAU
+               ITAUP = ITAUQ + M
+               NWORK = ITAUP + M
 *
-*                 Generate right vectors bidiagonalizing L in WORK(IR)
-*                 (CWorkspace: need M*M+3*M-1, prefer M*M+2*M+(M-1)*NB)
-*                 (RWorkspace: 0)
+*              Bidiagonalize L in A
+*              CWorkspace: need   M*M [VT] + 2*M [tauq, taup] + M      [work]
+*              CWorkspace: prefer M*M [VT] + 2*M [tauq, taup] + 2*M*NB [work]
+*              RWorkspace: need   M [e]
 *
-                  CALL ZUNGBR( 'P', M, M, M, WORK( IR ), LDWRKR,
-     $                         WORK( ITAUP ), WORK( IWORK ),
-     $                         LWORK-IWORK+1, IERR )
+               CALL ZGEBRD( M, M, A, LDA, S, RWORK( IE ), WORK( ITAUQ ),
+     $                      WORK( ITAUP ), WORK( NWORK ), LWORK-NWORK+1,
+     $                      IERR )
 *
-*                 Generate left vectors bidiagonalizing L in U
-*                 (CWorkspace: need M*M+3*M, prefer M*M+2*M+M*NB)
-*                 (RWorkspace: 0)
+*              Perform bidiagonal SVD, computing left singular vectors
+*              of bidiagonal matrix in RWORK(IRU) and computing right
+*              singular vectors of bidiagonal matrix in RWORK(IRVT)
+*              CWorkspace: need   0
+*              RWorkspace: need   M [e] + M*M [RU] + M*M [RVT] + BDSPAC
 *
-                  CALL ZUNGBR( 'Q', M, M, M, U, LDU, WORK( ITAUQ ),
-     $                         WORK( IWORK ), LWORK-IWORK+1, IERR )
-                  IRWORK = IE + M
+               IRU = IE + M
+               IRVT = IRU + M*M
+               NRWORK = IRVT + M*M
+               CALL DBDSDC( 'U', 'I', M, S, RWORK( IE ), RWORK( IRU ),
+     $                      M, RWORK( IRVT ), M, DUM, IDUM,
+     $                      RWORK( NRWORK ), IWORK, INFO )
 *
-*                 Perform bidiagonal QR iteration, computing left
-*                 singular vectors of L in U, and computing right
-*                 singular vectors of L in WORK(IR)
-*                 (CWorkspace: need M*M)
-*                 (RWorkspace: need BDSPAC)
+*              Copy real matrix RWORK(IRU) to complex matrix U
+*              Overwrite U by left singular vectors of L
+*              CWorkspace: need   M*M [VT] + 2*M [tauq, taup] + M    [work]
+*              CWorkspace: prefer M*M [VT] + 2*M [tauq, taup] + M*NB [work]
+*              RWorkspace: need   0
 *
-                  CALL ZBDSQR( 'U', M, M, M, 0, S, RWORK( IE ),
-     $                         WORK( IR ), LDWRKR, U, LDU, CDUM, 1,
-     $                         RWORK( IRWORK ), INFO )
-                  IU = ITAUQ
+               CALL ZLACP2( 'F', M, M, RWORK( IRU ), M, U, LDU )
+               CALL ZUNMBR( 'Q', 'L', 'N', M, M, M, A, LDA,
+     $                      WORK( ITAUQ ), U, LDU, WORK( NWORK ),
+     $                      LWORK-NWORK+1, IERR )
 *
-*                 Multiply right singular vectors of L in WORK(IR) by Q
-*                 in A, storing result in WORK(IU) and copying to A
-*                 (CWorkspace: need M*M+M, prefer M*M+M*N))
-*                 (RWorkspace: 0)
+*              Copy real matrix RWORK(IRVT) to complex matrix WORK(IVT)
+*              Overwrite WORK(IVT) by right singular vectors of L
+*              CWorkspace: need   M*M [VT] + 2*M [tauq, taup] + M    [work]
+*              CWorkspace: prefer M*M [VT] + 2*M [tauq, taup] + M*NB [work]
+*              RWorkspace: need   0
 *
-                  DO 40 I = 1, N, CHUNK
-                     BLK = MIN( N-I+1, CHUNK )
-                     CALL ZGEMM( 'N', 'N', M, BLK, M, CONE, WORK( IR ),
-     $                           LDWRKR, A( 1, I ), LDA, CZERO,
-     $                           WORK( IU ), LDWRKU )
-                     CALL ZLACPY( 'F', M, BLK, WORK( IU ), LDWRKU,
-     $                            A( 1, I ), LDA )
-   40             CONTINUE
+               CALL ZLACP2( 'F', M, M, RWORK( IRVT ), M, WORK( IVT ),
+     $                      LDWKVT )
+               CALL ZUNMBR( 'P', 'R', 'C', M, M, M, A, LDA,
+     $                      WORK( ITAUP ), WORK( IVT ), LDWKVT,
+     $                      WORK( NWORK ), LWORK-NWORK+1, IERR )
 *
-               ELSE
+*              Multiply right singular vectors of L in WORK(IVT) by
+*              Q in VT, storing result in A
+*              CWorkspace: need   M*M [VT]
+*              RWorkspace: need   0
 *
-*                 Insufficient workspace for a fast algorithm
+               CALL ZGEMM( 'N', 'N', M, N, M, CONE, WORK( IVT ), LDWKVT,
+     $                     VT, LDVT, CZERO, A, LDA )
 *
-                  ITAU = 1
-                  IWORK = ITAU + M
+*              Copy right singular vectors of A from A to VT
 *
-*                 Compute A=L*Q
-*                 (CWorkspace: need 2*M, prefer M+M*NB)
-*                 (RWorkspace: 0)
+               CALL ZLACPY( 'F', M, N, A, LDA, VT, LDVT )
 *
-                  CALL ZGELQF( M, N, A, LDA, WORK( ITAU ),
-     $                         WORK( IWORK ), LWORK-IWORK+1, IERR )
+            END IF
 *
-*                 Copy L to U, zeroing out above it
+         ELSE IF( N.GE.MNTHR2 ) THEN
 *
-                  CALL ZLACPY( 'L', M, M, A, LDA, U, LDU )
-                  CALL ZLASET( 'U', M-1, M-1, CZERO, CZERO, U( 1, 2 ),
-     $                         LDU )
+*           MNTHR2 <= N < MNTHR1
 *
-*                 Generate Q in A
-*                 (CWorkspace: need 2*M, prefer M+M*NB)
-*                 (RWorkspace: 0)
+*           Path 5t (N >> M, but not as much as MNTHR1)
+*           Reduce to bidiagonal form without QR decomposition, use
+*           ZUNGBR and matrix multiplication to compute singular vectors
 *
-                  CALL ZUNGLQ( M, N, M, A, LDA, WORK( ITAU ),
-     $                         WORK( IWORK ), LWORK-IWORK+1, IERR )
-                  IE = 1
-                  ITAUQ = ITAU
-                  ITAUP = ITAUQ + M
-                  IWORK = ITAUP + M
+            IE = 1
+            NRWORK = IE + M
+            ITAUQ = 1
+            ITAUP = ITAUQ + M
+            NWORK = ITAUP + M
 *
-*                 Bidiagonalize L in U
-*                 (CWorkspace: need 3*M, prefer 2*M+2*M*NB)
-*                 (RWorkspace: need M)
+*           Bidiagonalize A
+*           CWorkspace: need   2*M [tauq, taup] + N        [work]
+*           CWorkspace: prefer 2*M [tauq, taup] + (M+N)*NB [work]
+*           RWorkspace: need   M [e]
 *
-                  CALL ZGEBRD( M, M, U, LDU, S, RWORK( IE ),
-     $                         WORK( ITAUQ ), WORK( ITAUP ),
-     $                         WORK( IWORK ), LWORK-IWORK+1, IERR )
+            CALL ZGEBRD( M, N, A, LDA, S, RWORK( IE ), WORK( ITAUQ ),
+     $                   WORK( ITAUP ), WORK( NWORK ), LWORK-NWORK+1,
+     $                   IERR )
 *
-*                 Multiply right vectors bidiagonalizing L by Q in A
-*                 (CWorkspace: need 2*M+N, prefer 2*M+N*NB)
-*                 (RWorkspace: 0)
+            IF( WNTQN ) THEN
 *
-                  CALL ZUNMBR( 'P', 'L', 'C', M, N, M, U, LDU,
-     $                         WORK( ITAUP ), A, LDA, WORK( IWORK ),
-     $                         LWORK-IWORK+1, IERR )
+*              Path 5tn (N >> M, JOBZ='N')
+*              Compute singular values only
+*              CWorkspace: need   0
+*              RWorkspace: need   M [e] + BDSPAC
 *
-*                 Generate left vectors bidiagonalizing L in U
-*                 (CWorkspace: need 3*M, prefer 2*M+M*NB)
-*                 (RWorkspace: 0)
+               CALL DBDSDC( 'L', 'N', M, S, RWORK( IE ), DUM,1,DUM,1,
+     $                      DUM, IDUM, RWORK( NRWORK ), IWORK, INFO )
+            ELSE IF( WNTQO ) THEN
+               IRVT = NRWORK
+               IRU = IRVT + M*M
+               NRWORK = IRU + M*M
+               IVT = NWORK
 *
-                  CALL ZUNGBR( 'Q', M, M, M, U, LDU, WORK( ITAUQ ),
-     $                         WORK( IWORK ), LWORK-IWORK+1, IERR )
-                  IRWORK = IE + M
+*              Path 5to (N >> M, JOBZ='O')
+*              Copy A to U, generate Q
+*              CWorkspace: need   2*M [tauq, taup] + M    [work]
+*              CWorkspace: prefer 2*M [tauq, taup] + M*NB [work]
+*              RWorkspace: need   0
 *
-*                 Perform bidiagonal QR iteration, computing left
-*                 singular vectors of A in U and computing right
-*                 singular vectors of A in A
-*                 (CWorkspace: 0)
-*                 (RWorkspace: need BDSPAC)
+               CALL ZLACPY( 'L', M, M, A, LDA, U, LDU )
+               CALL ZUNGBR( 'Q', M, M, N, U, LDU, WORK( ITAUQ ),
+     $                      WORK( NWORK ), LWORK-NWORK+1, IERR )
 *
-                  CALL ZBDSQR( 'U', M, N, M, 0, S, RWORK( IE ), A, LDA,
-     $                         U, LDU, CDUM, 1, RWORK( IRWORK ), INFO )
+*              Generate P**H in A
+*              CWorkspace: need   2*M [tauq, taup] + M    [work]
+*              CWorkspace: prefer 2*M [tauq, taup] + M*NB [work]
+*              RWorkspace: need   0
 *
-               END IF
+               CALL ZUNGBR( 'P', M, N, M, A, LDA, WORK( ITAUP ),
+     $                      WORK( NWORK ), LWORK-NWORK+1, IERR )
 *
-            ELSE IF( WNTVS ) THEN
+               LDWKVT = M
+               IF( LWORK .GE. M*N + 3*M ) THEN
 *
-               IF( WNTUN ) THEN
+*                 WORK( IVT ) is M by N
 *
-*                 Path 4t(N much larger than M, JOBU='N', JOBVT='S')
-*                 M right singular vectors to be computed in VT and
-*                 no left singular vectors to be computed
+                  NWORK = IVT + LDWKVT*N
+                  CHUNK = N
+               ELSE
 *
-                  IF( LWORK.GE.M*M+3*M ) THEN
+*                 WORK( IVT ) is M by CHUNK
 *
-*                    Sufficient workspace for a fast algorithm
+                  CHUNK = ( LWORK - 3*M ) / M
+                  NWORK = IVT + LDWKVT*CHUNK
+               END IF
 *
-                     IR = 1
-                     IF( LWORK.GE.WRKBL+LDA*M ) THEN
+*              Perform bidiagonal SVD, computing left singular vectors
+*              of bidiagonal matrix in RWORK(IRU) and computing right
+*              singular vectors of bidiagonal matrix in RWORK(IRVT)
+*              CWorkspace: need   0
+*              RWorkspace: need   M [e] + M*M [RVT] + M*M [RU] + BDSPAC
 *
-*                       WORK(IR) is LDA by M
+               CALL DBDSDC( 'L', 'I', M, S, RWORK( IE ), RWORK( IRU ),
+     $                      M, RWORK( IRVT ), M, DUM, IDUM,
+     $                      RWORK( NRWORK ), IWORK, INFO )
 *
-                        LDWRKR = LDA
-                     ELSE
+*              Multiply Q in U by real matrix RWORK(IRVT)
+*              storing the result in WORK(IVT), copying to U
+*              CWorkspace: need   2*M [tauq, taup] + M*M [VT]
+*              RWorkspace: need   M [e] + M*M [RVT] + M*M [RU] + 2*M*M [rwork]
 *
-*                       WORK(IR) is M by M
+               CALL ZLACRM( M, M, U, LDU, RWORK( IRU ), M, WORK( IVT ),
+     $                      LDWKVT, RWORK( NRWORK ) )
+               CALL ZLACPY( 'F', M, M, WORK( IVT ), LDWKVT, U, LDU )
 *
-                        LDWRKR = M
-                     END IF
-                     ITAU = IR + LDWRKR*M
-                     IWORK = ITAU + M
+*              Multiply RWORK(IRVT) by P**H in A, storing the
+*              result in WORK(IVT), copying to A
+*              CWorkspace: need   2*M [tauq, taup] + M*M [VT]
+*              CWorkspace: prefer 2*M [tauq, taup] + M*N [VT]
+*              RWorkspace: need   M [e] + M*M [RVT] + 2*M*M [rwork]
+*              RWorkspace: prefer M [e] + M*M [RVT] + 2*M*N [rwork] < M + 5*M*M since N < 2*M here
 *
-*                    Compute A=L*Q
-*                    (CWorkspace: need M*M+2*M, prefer M*M+M+M*NB)
-*                    (RWorkspace: 0)
+               NRWORK = IRU
+               DO 50 I = 1, N, CHUNK
+                  BLK = MIN( N-I+1, CHUNK )
+                  CALL ZLARCM( M, BLK, RWORK( IRVT ), M, A( 1, I ), LDA,
+     $                         WORK( IVT ), LDWKVT, RWORK( NRWORK ) )
+                  CALL ZLACPY( 'F', M, BLK, WORK( IVT ), LDWKVT,
+     $                         A( 1, I ), LDA )
+   50          CONTINUE
+            ELSE IF( WNTQS ) THEN
 *
-                     CALL ZGELQF( M, N, A, LDA, WORK( ITAU ),
-     $                            WORK( IWORK ), LWORK-IWORK+1, IERR )
+*              Path 5ts (N >> M, JOBZ='S')
+*              Copy A to U, generate Q
+*              CWorkspace: need   2*M [tauq, taup] + M    [work]
+*              CWorkspace: prefer 2*M [tauq, taup] + M*NB [work]
+*              RWorkspace: need   0
 *
-*                    Copy L to WORK(IR), zeroing out above it
+               CALL ZLACPY( 'L', M, M, A, LDA, U, LDU )
+               CALL ZUNGBR( 'Q', M, M, N, U, LDU, WORK( ITAUQ ),
+     $                      WORK( NWORK ), LWORK-NWORK+1, IERR )
 *
-                     CALL ZLACPY( 'L', M, M, A, LDA, WORK( IR ),
-     $                            LDWRKR )
-                     CALL ZLASET( 'U', M-1, M-1, CZERO, CZERO,
-     $                            WORK( IR+LDWRKR ), LDWRKR )
+*              Copy A to VT, generate P**H
+*              CWorkspace: need   2*M [tauq, taup] + M    [work]
+*              CWorkspace: prefer 2*M [tauq, taup] + M*NB [work]
+*              RWorkspace: need   0
 *
-*                    Generate Q in A
-*                    (CWorkspace: need M*M+2*M, prefer M*M+M+M*NB)
-*                    (RWorkspace: 0)
+               CALL ZLACPY( 'U', M, N, A, LDA, VT, LDVT )
+               CALL ZUNGBR( 'P', M, N, M, VT, LDVT, WORK( ITAUP ),
+     $                      WORK( NWORK ), LWORK-NWORK+1, IERR )
 *
-                     CALL ZUNGLQ( M, N, M, A, LDA, WORK( ITAU ),
-     $                            WORK( IWORK ), LWORK-IWORK+1, IERR )
-                     IE = 1
-                     ITAUQ = ITAU
-                     ITAUP = ITAUQ + M
-                     IWORK = ITAUP + M
+*              Perform bidiagonal SVD, computing left singular vectors
+*              of bidiagonal matrix in RWORK(IRU) and computing right
+*              singular vectors of bidiagonal matrix in RWORK(IRVT)
+*              CWorkspace: need   0
+*              RWorkspace: need   M [e] + M*M [RVT] + M*M [RU] + BDSPAC
 *
-*                    Bidiagonalize L in WORK(IR)
-*                    (CWorkspace: need M*M+3*M, prefer M*M+2*M+2*M*NB)
-*                    (RWorkspace: need M)
+               IRVT = NRWORK
+               IRU = IRVT + M*M
+               NRWORK = IRU + M*M
+               CALL DBDSDC( 'L', 'I', M, S, RWORK( IE ), RWORK( IRU ),
+     $                      M, RWORK( IRVT ), M, DUM, IDUM,
+     $                      RWORK( NRWORK ), IWORK, INFO )
 *
-                     CALL ZGEBRD( M, M, WORK( IR ), LDWRKR, S,
-     $                            RWORK( IE ), WORK( ITAUQ ),
-     $                            WORK( ITAUP ), WORK( IWORK ),
-     $                            LWORK-IWORK+1, IERR )
+*              Multiply Q in U by real matrix RWORK(IRU), storing the
+*              result in A, copying to U
+*              CWorkspace: need   0
+*              RWorkspace: need   M [e] + M*M [RVT] + M*M [RU] + 2*M*M [rwork]
 *
-*                    Generate right vectors bidiagonalizing L in
-*                    WORK(IR)
-*                    (CWorkspace: need M*M+3*M, prefer M*M+2*M+(M-1)*NB)
-*                    (RWorkspace: 0)
+               CALL ZLACRM( M, M, U, LDU, RWORK( IRU ), M, A, LDA,
+     $                      RWORK( NRWORK ) )
+               CALL ZLACPY( 'F', M, M, A, LDA, U, LDU )
 *
-                     CALL ZUNGBR( 'P', M, M, M, WORK( IR ), LDWRKR,
-     $                            WORK( ITAUP ), WORK( IWORK ),
-     $                            LWORK-IWORK+1, IERR )
-                     IRWORK = IE + M
+*              Multiply real matrix RWORK(IRVT) by P**H in VT,
+*              storing the result in A, copying to VT
+*              CWorkspace: need   0
+*              RWorkspace: need   M [e] + M*M [RVT] + 2*M*N [rwork] < M + 5*M*M since N < 2*M here
 *
-*                    Perform bidiagonal QR iteration, computing right
-*                    singular vectors of L in WORK(IR)
-*                    (CWorkspace: need M*M)
-*                    (RWorkspace: need BDSPAC)
+               NRWORK = IRU
+               CALL ZLARCM( M, N, RWORK( IRVT ), M, VT, LDVT, A, LDA,
+     $                      RWORK( NRWORK ) )
+               CALL ZLACPY( 'F', M, N, A, LDA, VT, LDVT )
+            ELSE
 *
-                     CALL ZBDSQR( 'U', M, M, 0, 0, S, RWORK( IE ),
-     $                            WORK( IR ), LDWRKR, CDUM, 1, CDUM, 1,
-     $                            RWORK( IRWORK ), INFO )
+*              Path 5ta (N >> M, JOBZ='A')
+*              Copy A to U, generate Q
+*              CWorkspace: need   2*M [tauq, taup] + M    [work]
+*              CWorkspace: prefer 2*M [tauq, taup] + M*NB [work]
+*              RWorkspace: need   0
 *
-*                    Multiply right singular vectors of L in WORK(IR) by
-*                    Q in A, storing result in VT
-*                    (CWorkspace: need M*M)
-*                    (RWorkspace: 0)
+               CALL ZLACPY( 'L', M, M, A, LDA, U, LDU )
+               CALL ZUNGBR( 'Q', M, M, N, U, LDU, WORK( ITAUQ ),
+     $                      WORK( NWORK ), LWORK-NWORK+1, IERR )
 *
-                     CALL ZGEMM( 'N', 'N', M, N, M, CONE, WORK( IR ),
-     $                           LDWRKR, A, LDA, CZERO, VT, LDVT )
+*              Copy A to VT, generate P**H
+*              CWorkspace: need   2*M [tauq, taup] + N    [work]
+*              CWorkspace: prefer 2*M [tauq, taup] + N*NB [work]
+*              RWorkspace: need   0
 *
-                  ELSE
+               CALL ZLACPY( 'U', M, N, A, LDA, VT, LDVT )
+               CALL ZUNGBR( 'P', N, N, M, VT, LDVT, WORK( ITAUP ),
+     $                      WORK( NWORK ), LWORK-NWORK+1, IERR )
 *
-*                    Insufficient workspace for a fast algorithm
+*              Perform bidiagonal SVD, computing left singular vectors
+*              of bidiagonal matrix in RWORK(IRU) and computing right
+*              singular vectors of bidiagonal matrix in RWORK(IRVT)
+*              CWorkspace: need   0
+*              RWorkspace: need   M [e] + M*M [RVT] + M*M [RU] + BDSPAC
 *
-                     ITAU = 1
-                     IWORK = ITAU + M
+               IRVT = NRWORK
+               IRU = IRVT + M*M
+               NRWORK = IRU + M*M
+               CALL DBDSDC( 'L', 'I', M, S, RWORK( IE ), RWORK( IRU ),
+     $                      M, RWORK( IRVT ), M, DUM, IDUM,
+     $                      RWORK( NRWORK ), IWORK, INFO )
 *
-*                    Compute A=L*Q
-*                    (CWorkspace: need 2*M, prefer M+M*NB)
-*                    (RWorkspace: 0)
+*              Multiply Q in U by real matrix RWORK(IRU), storing the
+*              result in A, copying to U
+*              CWorkspace: need   0
+*              RWorkspace: need   M [e] + M*M [RVT] + M*M [RU] + 2*M*M [rwork]
 *
-                     CALL ZGELQF( M, N, A, LDA, WORK( ITAU ),
-     $                            WORK( IWORK ), LWORK-IWORK+1, IERR )
+               CALL ZLACRM( M, M, U, LDU, RWORK( IRU ), M, A, LDA,
+     $                      RWORK( NRWORK ) )
+               CALL ZLACPY( 'F', M, M, A, LDA, U, LDU )
 *
-*                    Copy result to VT
+*              Multiply real matrix RWORK(IRVT) by P**H in VT,
+*              storing the result in A, copying to VT
+*              CWorkspace: need   0
+*              RWorkspace: need   M [e] + M*M [RVT] + 2*M*N [rwork] < M + 5*M*M since N < 2*M here
 *
-                     CALL ZLACPY( 'U', M, N, A, LDA, VT, LDVT )
+               NRWORK = IRU
+               CALL ZLARCM( M, N, RWORK( IRVT ), M, VT, LDVT, A, LDA,
+     $                      RWORK( NRWORK ) )
+               CALL ZLACPY( 'F', M, N, A, LDA, VT, LDVT )
+            END IF
 *
-*                    Generate Q in VT
-*                    (CWorkspace: need 2*M, prefer M+M*NB)
-*                    (RWorkspace: 0)
+         ELSE
 *
-                     CALL ZUNGLQ( M, N, M, VT, LDVT, WORK( ITAU ),
-     $                            WORK( IWORK ), LWORK-IWORK+1, IERR )
-                     IE = 1
-                     ITAUQ = ITAU
-                     ITAUP = ITAUQ + M
-                     IWORK = ITAUP + M
+*           N .LT. MNTHR2
 *
-*                    Zero out above L in A
+*           Path 6t (N > M, but not much larger)
+*           Reduce to bidiagonal form without LQ decomposition
+*           Use ZUNMBR to compute singular vectors
 *
-                     CALL ZLASET( 'U', M-1, M-1, CZERO, CZERO,
-     $                            A( 1, 2 ), LDA )
+            IE = 1
+            NRWORK = IE + M
+            ITAUQ = 1
+            ITAUP = ITAUQ + M
+            NWORK = ITAUP + M
 *
-*                    Bidiagonalize L in A
-*                    (CWorkspace: need 3*M, prefer 2*M+2*M*NB)
-*                    (RWorkspace: need M)
+*           Bidiagonalize A
+*           CWorkspace: need   2*M [tauq, taup] + N        [work]
+*           CWorkspace: prefer 2*M [tauq, taup] + (M+N)*NB [work]
+*           RWorkspace: need   M [e]
 *
-                     CALL ZGEBRD( M, M, A, LDA, S, RWORK( IE ),
-     $                            WORK( ITAUQ ), WORK( ITAUP ),
-     $                            WORK( IWORK ), LWORK-IWORK+1, IERR )
+            CALL ZGEBRD( M, N, A, LDA, S, RWORK( IE ), WORK( ITAUQ ),
+     $                   WORK( ITAUP ), WORK( NWORK ), LWORK-NWORK+1,
+     $                   IERR )
+            IF( WNTQN ) THEN
 *
-*                    Multiply right vectors bidiagonalizing L by Q in VT
-*                    (CWorkspace: need 2*M+N, prefer 2*M+N*NB)
-*                    (RWorkspace: 0)
+*              Path 6tn (N > M, JOBZ='N')
+*              Compute singular values only
+*              CWorkspace: need   0
+*              RWorkspace: need   M [e] + BDSPAC
 *
-                     CALL ZUNMBR( 'P', 'L', 'C', M, N, M, A, LDA,
-     $                            WORK( ITAUP ), VT, LDVT,
-     $                            WORK( IWORK ), LWORK-IWORK+1, IERR )
-                     IRWORK = IE + M
+               CALL DBDSDC( 'L', 'N', M, S, RWORK( IE ), DUM,1,DUM,1,
+     $                      DUM, IDUM, RWORK( NRWORK ), IWORK, INFO )
+            ELSE IF( WNTQO ) THEN
+*              Path 6to (N > M, JOBZ='O')
+               LDWKVT = M
+               IVT = NWORK
+               IF( LWORK .GE. M*N + 3*M ) THEN
 *
-*                    Perform bidiagonal QR iteration, computing right
-*                    singular vectors of A in VT
-*                    (CWorkspace: 0)
-*                    (RWorkspace: need BDSPAC)
+*                 WORK( IVT ) is M by N
 *
-                     CALL ZBDSQR( 'U', M, N, 0, 0, S, RWORK( IE ), VT,
-     $                            LDVT, CDUM, 1, CDUM, 1,
-     $                            RWORK( IRWORK ), INFO )
+                  CALL ZLASET( 'F', M, N, CZERO, CZERO, WORK( IVT ),
+     $                         LDWKVT )
+                  NWORK = IVT + LDWKVT*N
+               ELSE
 *
-                  END IF
+*                 WORK( IVT ) is M by CHUNK
 *
-               ELSE IF( WNTUO ) THEN
+                  CHUNK = ( LWORK - 3*M ) / M
+                  NWORK = IVT + LDWKVT*CHUNK
+               END IF
 *
-*                 Path 5t(N much larger than M, JOBU='O', JOBVT='S')
-*                 M right singular vectors to be computed in VT and
-*                 M left singular vectors to be overwritten on A
+*              Perform bidiagonal SVD, computing left singular vectors
+*              of bidiagonal matrix in RWORK(IRU) and computing right
+*              singular vectors of bidiagonal matrix in RWORK(IRVT)
+*              CWorkspace: need   0
+*              RWorkspace: need   M [e] + M*M [RVT] + M*M [RU] + BDSPAC
 *
-                  IF( LWORK.GE.2*M*M+3*M ) THEN
+               IRVT = NRWORK
+               IRU = IRVT + M*M
+               NRWORK = IRU + M*M
+               CALL DBDSDC( 'L', 'I', M, S, RWORK( IE ), RWORK( IRU ),
+     $                      M, RWORK( IRVT ), M, DUM, IDUM,
+     $                      RWORK( NRWORK ), IWORK, INFO )
 *
-*                    Sufficient workspace for a fast algorithm
+*              Copy real matrix RWORK(IRU) to complex matrix U
+*              Overwrite U by left singular vectors of A
+*              CWorkspace: need   2*M [tauq, taup] + M*M [VT] + M    [work]
+*              CWorkspace: prefer 2*M [tauq, taup] + M*M [VT] + M*NB [work]
+*              RWorkspace: need   M [e] + M*M [RVT] + M*M [RU]
 *
-                     IU = 1
-                     IF( LWORK.GE.WRKBL+2*LDA*M ) THEN
+               CALL ZLACP2( 'F', M, M, RWORK( IRU ), M, U, LDU )
+               CALL ZUNMBR( 'Q', 'L', 'N', M, M, N, A, LDA,
+     $                      WORK( ITAUQ ), U, LDU, WORK( NWORK ),
+     $                      LWORK-NWORK+1, IERR )
 *
-*                       WORK(IU) is LDA by M and WORK(IR) is LDA by M
+               IF( LWORK .GE. M*N + 3*M ) THEN
 *
-                        LDWRKU = LDA
-                        IR = IU + LDWRKU*M
-                        LDWRKR = LDA
-                     ELSE IF( LWORK.GE.WRKBL+( LDA+M )*M ) THEN
+*                 Path 6to-fast
+*                 Copy real matrix RWORK(IRVT) to complex matrix WORK(IVT)
+*                 Overwrite WORK(IVT) by right singular vectors of A,
+*                 copying to A
+*                 CWorkspace: need   2*M [tauq, taup] + M*N [VT] + M    [work]
+*                 CWorkspace: prefer 2*M [tauq, taup] + M*N [VT] + M*NB [work]
+*                 RWorkspace: need   M [e] + M*M [RVT]
 *
-*                       WORK(IU) is LDA by M and WORK(IR) is M by M
+                  CALL ZLACP2( 'F', M, M, RWORK( IRVT ), M, WORK( IVT ),
+     $                         LDWKVT )
+                  CALL ZUNMBR( 'P', 'R', 'C', M, N, M, A, LDA,
+     $                         WORK( ITAUP ), WORK( IVT ), LDWKVT,
+     $                         WORK( NWORK ), LWORK-NWORK+1, IERR )
+                  CALL ZLACPY( 'F', M, N, WORK( IVT ), LDWKVT, A, LDA )
+               ELSE
 *
-                        LDWRKU = LDA
-                        IR = IU + LDWRKU*M
-                        LDWRKR = M
-                     ELSE
+*                 Path 6to-slow
+*                 Generate P**H in A
+*                 CWorkspace: need   2*M [tauq, taup] + M*M [VT] + M    [work]
+*                 CWorkspace: prefer 2*M [tauq, taup] + M*M [VT] + M*NB [work]
+*                 RWorkspace: need   0
 *
-*                       WORK(IU) is M by M and WORK(IR) is M by M
+                  CALL ZUNGBR( 'P', M, N, M, A, LDA, WORK( ITAUP ),
+     $                         WORK( NWORK ), LWORK-NWORK+1, IERR )
 *
-                        LDWRKU = M
-                        IR = IU + LDWRKU*M
-                        LDWRKR = M
-                     END IF
-                     ITAU = IR + LDWRKR*M
-                     IWORK = ITAU + M
+*                 Multiply Q in A by real matrix RWORK(IRU), storing the
+*                 result in WORK(IU), copying to A
+*                 CWorkspace: need   2*M [tauq, taup] + M*M [VT]
+*                 CWorkspace: prefer 2*M [tauq, taup] + M*N [VT]
+*                 RWorkspace: need   M [e] + M*M [RVT] + 2*M*M [rwork]
+*                 RWorkspace: prefer M [e] + M*M [RVT] + 2*M*N [rwork] < M + 5*M*M since N < 2*M here
 *
-*                    Compute A=L*Q
-*                    (CWorkspace: need 2*M*M+2*M, prefer 2*M*M+M+M*NB)
-*                    (RWorkspace: 0)
+                  NRWORK = IRU
+                  DO 60 I = 1, N, CHUNK
+                     BLK = MIN( N-I+1, CHUNK )
+                     CALL ZLARCM( M, BLK, RWORK( IRVT ), M, A( 1, I ),
+     $                            LDA, WORK( IVT ), LDWKVT,
+     $                            RWORK( NRWORK ) )
+                     CALL ZLACPY( 'F', M, BLK, WORK( IVT ), LDWKVT,
+     $                            A( 1, I ), LDA )
+   60             CONTINUE
+               END IF
+            ELSE IF( WNTQS ) THEN
 *
-                     CALL ZGELQF( M, N, A, LDA, WORK( ITAU ),
-     $                            WORK( IWORK ), LWORK-IWORK+1, IERR )
+*              Path 6ts (N > M, JOBZ='S')
+*              Perform bidiagonal SVD, computing left singular vectors
+*              of bidiagonal matrix in RWORK(IRU) and computing right
+*              singular vectors of bidiagonal matrix in RWORK(IRVT)
+*              CWorkspace: need   0
+*              RWorkspace: need   M [e] + M*M [RVT] + M*M [RU] + BDSPAC
 *
-*                    Copy L to WORK(IU), zeroing out below it
+               IRVT = NRWORK
+               IRU = IRVT + M*M
+               NRWORK = IRU + M*M
+               CALL DBDSDC( 'L', 'I', M, S, RWORK( IE ), RWORK( IRU ),
+     $                      M, RWORK( IRVT ), M, DUM, IDUM,
+     $                      RWORK( NRWORK ), IWORK, INFO )
 *
-                     CALL ZLACPY( 'L', M, M, A, LDA, WORK( IU ),
-     $                            LDWRKU )
-                     CALL ZLASET( 'U', M-1, M-1, CZERO, CZERO,
-     $                            WORK( IU+LDWRKU ), LDWRKU )
+*              Copy real matrix RWORK(IRU) to complex matrix U
+*              Overwrite U by left singular vectors of A
+*              CWorkspace: need   2*M [tauq, taup] + M    [work]
+*              CWorkspace: prefer 2*M [tauq, taup] + M*NB [work]
+*              RWorkspace: need   M [e] + M*M [RVT] + M*M [RU]
 *
-*                    Generate Q in A
-*                    (CWorkspace: need 2*M*M+2*M, prefer 2*M*M+M+M*NB)
-*                    (RWorkspace: 0)
+               CALL ZLACP2( 'F', M, M, RWORK( IRU ), M, U, LDU )
+               CALL ZUNMBR( 'Q', 'L', 'N', M, M, N, A, LDA,
+     $                      WORK( ITAUQ ), U, LDU, WORK( NWORK ),
+     $                      LWORK-NWORK+1, IERR )
 *
-                     CALL ZUNGLQ( M, N, M, A, LDA, WORK( ITAU ),
-     $                            WORK( IWORK ), LWORK-IWORK+1, IERR )
-                     IE = 1
-                     ITAUQ = ITAU
-                     ITAUP = ITAUQ + M
-                     IWORK = ITAUP + M
+*              Copy real matrix RWORK(IRVT) to complex matrix VT
+*              Overwrite VT by right singular vectors of A
+*              CWorkspace: need   2*M [tauq, taup] + M    [work]
+*              CWorkspace: prefer 2*M [tauq, taup] + M*NB [work]
+*              RWorkspace: need   M [e] + M*M [RVT]
 *
-*                    Bidiagonalize L in WORK(IU), copying result to
-*                    WORK(IR)
-*                    (CWorkspace: need   2*M*M+3*M,
-*                                 prefer 2*M*M+2*M+2*M*NB)
-*                    (RWorkspace: need   M)
+               CALL ZLASET( 'F', M, N, CZERO, CZERO, VT, LDVT )
+               CALL ZLACP2( 'F', M, M, RWORK( IRVT ), M, VT, LDVT )
+               CALL ZUNMBR( 'P', 'R', 'C', M, N, M, A, LDA,
+     $                      WORK( ITAUP ), VT, LDVT, WORK( NWORK ),
+     $                      LWORK-NWORK+1, IERR )
+            ELSE
 *
-                     CALL ZGEBRD( M, M, WORK( IU ), LDWRKU, S,
-     $                            RWORK( IE ), WORK( ITAUQ ),
-     $                            WORK( ITAUP ), WORK( IWORK ),
-     $                            LWORK-IWORK+1, IERR )
-                     CALL ZLACPY( 'L', M, M, WORK( IU ), LDWRKU,
-     $                            WORK( IR ), LDWRKR )
+*              Path 6ta (N > M, JOBZ='A')
+*              Perform bidiagonal SVD, computing left singular vectors
+*              of bidiagonal matrix in RWORK(IRU) and computing right
+*              singular vectors of bidiagonal matrix in RWORK(IRVT)
+*              CWorkspace: need   0
+*              RWorkspace: need   M [e] + M*M [RVT] + M*M [RU] + BDSPAC
 *
-*                    Generate right bidiagonalizing vectors in WORK(IU)
-*                    (CWorkspace: need   2*M*M+3*M-1,
-*                                 prefer 2*M*M+2*M+(M-1)*NB)
-*                    (RWorkspace: 0)
+               IRVT = NRWORK
+               IRU = IRVT + M*M
+               NRWORK = IRU + M*M
 *
-                     CALL ZUNGBR( 'P', M, M, M, WORK( IU ), LDWRKU,
-     $                            WORK( ITAUP ), WORK( IWORK ),
-     $                            LWORK-IWORK+1, IERR )
+               CALL DBDSDC( 'L', 'I', M, S, RWORK( IE ), RWORK( IRU ),
+     $                      M, RWORK( IRVT ), M, DUM, IDUM,
+     $                      RWORK( NRWORK ), IWORK, INFO )
 *
-*                    Generate left bidiagonalizing vectors in WORK(IR)
-*                    (CWorkspace: need 2*M*M+3*M, prefer 2*M*M+2*M+M*NB)
-*                    (RWorkspace: 0)
+*              Copy real matrix RWORK(IRU) to complex matrix U
+*              Overwrite U by left singular vectors of A
+*              CWorkspace: need   2*M [tauq, taup] + M    [work]
+*              CWorkspace: prefer 2*M [tauq, taup] + M*NB [work]
+*              RWorkspace: need   M [e] + M*M [RVT] + M*M [RU]
 *
-                     CALL ZUNGBR( 'Q', M, M, M, WORK( IR ), LDWRKR,
-     $                            WORK( ITAUQ ), WORK( IWORK ),
-     $                            LWORK-IWORK+1, IERR )
-                     IRWORK = IE + M
+               CALL ZLACP2( 'F', M, M, RWORK( IRU ), M, U, LDU )
+               CALL ZUNMBR( 'Q', 'L', 'N', M, M, N, A, LDA,
+     $                      WORK( ITAUQ ), U, LDU, WORK( NWORK ),
+     $                      LWORK-NWORK+1, IERR )
 *
-*                    Perform bidiagonal QR iteration, computing left
-*                    singular vectors of L in WORK(IR) and computing
-*                    right singular vectors of L in WORK(IU)
-*                    (CWorkspace: need 2*M*M)
-*                    (RWorkspace: need BDSPAC)
+*              Set all of VT to identity matrix
 *
-                     CALL ZBDSQR( 'U', M, M, M, 0, S, RWORK( IE ),
-     $                            WORK( IU ), LDWRKU, WORK( IR ),
-     $                            LDWRKR, CDUM, 1, RWORK( IRWORK ),
-     $                            INFO )
+               CALL ZLASET( 'F', N, N, CZERO, CONE, VT, LDVT )
 *
-*                    Multiply right singular vectors of L in WORK(IU) by
-*                    Q in A, storing result in VT
-*                    (CWorkspace: need M*M)
-*                    (RWorkspace: 0)
+*              Copy real matrix RWORK(IRVT) to complex matrix VT
+*              Overwrite VT by right singular vectors of A
+*              CWorkspace: need   2*M [tauq, taup] + N    [work]
+*              CWorkspace: prefer 2*M [tauq, taup] + N*NB [work]
+*              RWorkspace: need   M [e] + M*M [RVT]
 *
-                     CALL ZGEMM( 'N', 'N', M, N, M, CONE, WORK( IU ),
-     $                           LDWRKU, A, LDA, CZERO, VT, LDVT )
+               CALL ZLACP2( 'F', M, M, RWORK( IRVT ), M, VT, LDVT )
+               CALL ZUNMBR( 'P', 'R', 'C', N, N, M, A, LDA,
+     $                      WORK( ITAUP ), VT, LDVT, WORK( NWORK ),
+     $                      LWORK-NWORK+1, IERR )
+            END IF
 *
-*                    Copy left singular vectors of L to A
-*                    (CWorkspace: need M*M)
-*                    (RWorkspace: 0)
+         END IF
 *
-                     CALL ZLACPY( 'F', M, M, WORK( IR ), LDWRKR, A,
-     $                            LDA )
+      END IF
 *
-                  ELSE
+*     Undo scaling if necessary
 *
-*                    Insufficient workspace for a fast algorithm
+      IF( ISCL.EQ.1 ) THEN
+         IF( ANRM.GT.BIGNUM )
+     $      CALL DLASCL( 'G', 0, 0, BIGNUM, ANRM, MINMN, 1, S, MINMN,
+     $                   IERR )
+         IF( INFO.NE.0 .AND. ANRM.GT.BIGNUM )
+     $      CALL DLASCL( 'G', 0, 0, BIGNUM, ANRM, MINMN-1, 1,
+     $                   RWORK( IE ), MINMN, IERR )
+         IF( ANRM.LT.SMLNUM )
+     $      CALL DLASCL( 'G', 0, 0, SMLNUM, ANRM, MINMN, 1, S, MINMN,
+     $                   IERR )
+         IF( INFO.NE.0 .AND. ANRM.LT.SMLNUM )
+     $      CALL DLASCL( 'G', 0, 0, SMLNUM, ANRM, MINMN-1, 1,
+     $                   RWORK( IE ), MINMN, IERR )
+      END IF
 *
-                     ITAU = 1
-                     IWORK = ITAU + M
+*     Return optimal workspace in WORK(1)
 *
-*                    Compute A=L*Q, copying result to VT
-*                    (CWorkspace: need 2*M, prefer M+M*NB)
-*                    (RWorkspace: 0)
+      WORK( 1 ) = MAXWRK
 *
-                     CALL ZGELQF( M, N, A, LDA, WORK( ITAU ),
-     $                            WORK( IWORK ), LWORK-IWORK+1, IERR )
-                     CALL ZLACPY( 'U', M, N, A, LDA, VT, LDVT )
+      RETURN
 *
-*                    Generate Q in VT
-*                    (CWorkspace: need 2*M, prefer M+M*NB)
-*                    (RWorkspace: 0)
+*     End of ZGESDD
 *
-                     CALL ZUNGLQ( M, N, M, VT, LDVT, WORK( ITAU ),
-     $                            WORK( IWORK ), LWORK-IWORK+1, IERR )
-                     IE = 1
-                     ITAUQ = ITAU
-                     ITAUP = ITAUQ + M
-                     IWORK = ITAUP + M
+      END
+*> \brief <b> ZGESV computes the solution to system of linear equations A * X = B for GE matrices</b> (simple driver) </b>
 *
-*                    Zero out above L in A
+*  =========== DOCUMENTATION ===========
 *
-                     CALL ZLASET( 'U', M-1, M-1, CZERO, CZERO,
-     $                            A( 1, 2 ), LDA )
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
-*                    Bidiagonalize L in A
-*                    (CWorkspace: need 3*M, prefer 2*M+2*M*NB)
-*                    (RWorkspace: need M)
+*> \htmlonly
+*> Download ZGESV + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/zgesv.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/zgesv.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/zgesv.f">
+*> [TXT]</a>
+*> \endhtmlonly
 *
-                     CALL ZGEBRD( M, M, A, LDA, S, RWORK( IE ),
-     $                            WORK( ITAUQ ), WORK( ITAUP ),
-     $                            WORK( IWORK ), LWORK-IWORK+1, IERR )
+*  Definition:
+*  ===========
 *
-*                    Multiply right vectors bidiagonalizing L by Q in VT
-*                    (CWorkspace: need 2*M+N, prefer 2*M+N*NB)
-*                    (RWorkspace: 0)
+*       SUBROUTINE ZGESV( N, NRHS, A, LDA, IPIV, B, LDB, INFO )
 *
-                     CALL ZUNMBR( 'P', 'L', 'C', M, N, M, A, LDA,
-     $                            WORK( ITAUP ), VT, LDVT,
-     $                            WORK( IWORK ), LWORK-IWORK+1, IERR )
+*       .. Scalar Arguments ..
+*       INTEGER            INFO, LDA, LDB, N, NRHS
+*       ..
+*       .. Array Arguments ..
+*       INTEGER            IPIV( * )
+*       COMPLEX*16         A( LDA, * ), B( LDB, * )
+*       ..
 *
-*                    Generate left bidiagonalizing vectors of L in A
-*                    (CWorkspace: need 3*M, prefer 2*M+M*NB)
-*                    (RWorkspace: 0)
 *
-                     CALL ZUNGBR( 'Q', M, M, M, A, LDA, WORK( ITAUQ ),
-     $                            WORK( IWORK ), LWORK-IWORK+1, IERR )
-                     IRWORK = IE + M
+*> \par Purpose:
+*  =============
+*>
+*> \verbatim
+*>
+*> ZGESV computes the solution to a complex system of linear equations
+*>    A * X = B,
+*> where A is an N-by-N matrix and X and B are N-by-NRHS matrices.
+*>
+*> The LU decomposition with partial pivoting and row interchanges is
+*> used to factor A as
+*>    A = P * L * U,
+*> where P is a permutation matrix, L is unit lower triangular, and U is
+*> upper triangular.  The factored form of A is then used to solve the
+*> system of equations A * X = B.
+*> \endverbatim
 *
-*                    Perform bidiagonal QR iteration, computing left
-*                    singular vectors of A in A and computing right
-*                    singular vectors of A in VT
-*                    (CWorkspace: 0)
-*                    (RWorkspace: need BDSPAC)
+*  Arguments:
+*  ==========
 *
-                     CALL ZBDSQR( 'U', M, N, M, 0, S, RWORK( IE ), VT,
-     $                            LDVT, A, LDA, CDUM, 1,
-     $                            RWORK( IRWORK ), INFO )
+*> \param[in] N
+*> \verbatim
+*>          N is INTEGER
+*>          The number of linear equations, i.e., the order of the
+*>          matrix A.  N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*>          NRHS is INTEGER
+*>          The number of right hand sides, i.e., the number of columns
+*>          of the matrix B.  NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*>          A is COMPLEX*16 array, dimension (LDA,N)
+*>          On entry, the N-by-N coefficient matrix A.
+*>          On exit, the factors L and U from the factorization
+*>          A = P*L*U; the unit diagonal elements of L are not stored.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*>          LDA is INTEGER
+*>          The leading dimension of the array A.  LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] IPIV
+*> \verbatim
+*>          IPIV is INTEGER array, dimension (N)
+*>          The pivot indices that define the permutation matrix P;
+*>          row i of the matrix was interchanged with row IPIV(i).
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*>          B is COMPLEX*16 array, dimension (LDB,NRHS)
+*>          On entry, the N-by-NRHS matrix of right hand side matrix B.
+*>          On exit, if INFO = 0, the N-by-NRHS solution matrix X.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*>          LDB is INTEGER
+*>          The leading dimension of the array B.  LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*>          INFO is INTEGER
+*>          = 0:  successful exit
+*>          < 0:  if INFO = -i, the i-th argument had an illegal value
+*>          > 0:  if INFO = i, U(i,i) is exactly zero.  The factorization
+*>                has been completed, but the factor U is exactly
+*>                singular, so the solution could not be computed.
+*> \endverbatim
 *
-                  END IF
+*  Authors:
+*  ========
 *
-               ELSE IF( WNTUAS ) THEN
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*                 Path 6t(N much larger than M, JOBU='S' or 'A',
-*                         JOBVT='S')
-*                 M right singular vectors to be computed in VT and
-*                 M left singular vectors to be computed in U
+*> \date December 2016
 *
-                  IF( LWORK.GE.M*M+3*M ) THEN
+*> \ingroup complex16GEsolve
 *
-*                    Sufficient workspace for a fast algorithm
+*  =====================================================================
+      SUBROUTINE ZGESV( N, NRHS, A, LDA, IPIV, B, LDB, INFO )
 *
-                     IU = 1
-                     IF( LWORK.GE.WRKBL+LDA*M ) THEN
+*  -- LAPACK driver routine (version 3.7.0) --
+*  -- LAPACK is a software package provided by Univ. of Tennessee,    --
+*  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+*     December 2016
 *
-*                       WORK(IU) is LDA by N
+*     .. Scalar Arguments ..
+      INTEGER            INFO, LDA, LDB, N, NRHS
+*     ..
+*     .. Array Arguments ..
+      INTEGER            IPIV( * )
+      COMPLEX*16         A( LDA, * ), B( LDB, * )
+*     ..
 *
-                        LDWRKU = LDA
-                     ELSE
+*  =====================================================================
 *
-*                       WORK(IU) is LDA by M
+*     .. External Subroutines ..
+      EXTERNAL           XERBLA, ZGETRF, ZGETRS
+*     ..
+*     .. Intrinsic Functions ..
+      INTRINSIC          MAX
+*     ..
+*     .. Executable Statements ..
 *
-                        LDWRKU = M
-                     END IF
-                     ITAU = IU + LDWRKU*M
-                     IWORK = ITAU + M
+*     Test the input parameters.
 *
-*                    Compute A=L*Q
-*                    (CWorkspace: need M*M+2*M, prefer M*M+M+M*NB)
-*                    (RWorkspace: 0)
+      INFO = 0
+      IF( N.LT.0 ) THEN
+         INFO = -1
+      ELSE IF( NRHS.LT.0 ) THEN
+         INFO = -2
+      ELSE IF( LDA.LT.MAX( 1, N ) ) THEN
+         INFO = -4
+      ELSE IF( LDB.LT.MAX( 1, N ) ) THEN
+         INFO = -7
+      END IF
+      IF( INFO.NE.0 ) THEN
+         CALL XERBLA( 'ZGESV ', -INFO )
+         RETURN
+      END IF
 *
-                     CALL ZGELQF( M, N, A, LDA, WORK( ITAU ),
-     $                            WORK( IWORK ), LWORK-IWORK+1, IERR )
+*     Compute the LU factorization of A.
 *
-*                    Copy L to WORK(IU), zeroing out above it
+      CALL ZGETRF( N, N, A, LDA, IPIV, INFO )
+      IF( INFO.EQ.0 ) THEN
 *
-                     CALL ZLACPY( 'L', M, M, A, LDA, WORK( IU ),
-     $                            LDWRKU )
-                     CALL ZLASET( 'U', M-1, M-1, CZERO, CZERO,
-     $                            WORK( IU+LDWRKU ), LDWRKU )
+*        Solve the system A*X = B, overwriting B with X.
 *
-*                    Generate Q in A
-*                    (CWorkspace: need M*M+2*M, prefer M*M+M+M*NB)
-*                    (RWorkspace: 0)
+         CALL ZGETRS( 'No transpose', N, NRHS, A, LDA, IPIV, B, LDB,
+     $                INFO )
+      END IF
+      RETURN
 *
-                     CALL ZUNGLQ( M, N, M, A, LDA, WORK( ITAU ),
-     $                            WORK( IWORK ), LWORK-IWORK+1, IERR )
-                     IE = 1
-                     ITAUQ = ITAU
-                     ITAUP = ITAUQ + M
-                     IWORK = ITAUP + M
+*     End of ZGESV
 *
-*                    Bidiagonalize L in WORK(IU), copying result to U
-*                    (CWorkspace: need M*M+3*M, prefer M*M+2*M+2*M*NB)
-*                    (RWorkspace: need M)
+      END
+*> \brief <b> ZGESVD computes the singular value decomposition (SVD) for GE matrices</b>
 *
-                     CALL ZGEBRD( M, M, WORK( IU ), LDWRKU, S,
-     $                            RWORK( IE ), WORK( ITAUQ ),
-     $                            WORK( ITAUP ), WORK( IWORK ),
-     $                            LWORK-IWORK+1, IERR )
-                     CALL ZLACPY( 'L', M, M, WORK( IU ), LDWRKU, U,
-     $                            LDU )
+*  =========== DOCUMENTATION ===========
 *
-*                    Generate right bidiagonalizing vectors in WORK(IU)
-*                    (CWorkspace: need   M*M+3*M-1,
-*                                 prefer M*M+2*M+(M-1)*NB)
-*                    (RWorkspace: 0)
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
-                     CALL ZUNGBR( 'P', M, M, M, WORK( IU ), LDWRKU,
-     $                            WORK( ITAUP ), WORK( IWORK ),
-     $                            LWORK-IWORK+1, IERR )
+*> \htmlonly
+*> Download ZGESVD + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/zgesvd.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/zgesvd.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/zgesvd.f">
+*> [TXT]</a>
+*> \endhtmlonly
 *
-*                    Generate left bidiagonalizing vectors in U
-*                    (CWorkspace: need M*M+3*M, prefer M*M+2*M+M*NB)
-*                    (RWorkspace: 0)
+*  Definition:
+*  ===========
 *
-                     CALL ZUNGBR( 'Q', M, M, M, U, LDU, WORK( ITAUQ ),
-     $                            WORK( IWORK ), LWORK-IWORK+1, IERR )
-                     IRWORK = IE + M
+*       SUBROUTINE ZGESVD( JOBU, JOBVT, M, N, A, LDA, S, U, LDU, VT, LDVT,
+*                          WORK, LWORK, RWORK, INFO )
 *
-*                    Perform bidiagonal QR iteration, computing left
-*                    singular vectors of L in U and computing right
-*                    singular vectors of L in WORK(IU)
-*                    (CWorkspace: need M*M)
-*                    (RWorkspace: need BDSPAC)
+*       .. Scalar Arguments ..
+*       CHARACTER          JOBU, JOBVT
+*       INTEGER            INFO, LDA, LDU, LDVT, LWORK, M, N
+*       ..
+*       .. Array Arguments ..
+*       DOUBLE PRECISION   RWORK( * ), S( * )
+*       COMPLEX*16         A( LDA, * ), U( LDU, * ), VT( LDVT, * ),
+*      $                   WORK( * )
+*       ..
 *
-                     CALL ZBDSQR( 'U', M, M, M, 0, S, RWORK( IE ),
-     $                            WORK( IU ), LDWRKU, U, LDU, CDUM, 1,
-     $                            RWORK( IRWORK ), INFO )
+*
+*> \par Purpose:
+*  =============
+*>
+*> \verbatim
+*>
+*> ZGESVD computes the singular value decomposition (SVD) of a complex
+*> M-by-N matrix A, optionally computing the left and/or right singular
+*> vectors. The SVD is written
+*>
+*>      A = U * SIGMA * conjugate-transpose(V)
+*>
+*> where SIGMA is an M-by-N matrix which is zero except for its
+*> min(m,n) diagonal elements, U is an M-by-M unitary matrix, and
+*> V is an N-by-N unitary matrix.  The diagonal elements of SIGMA
+*> are the singular values of A; they are real and non-negative, and
+*> are returned in descending order.  The first min(m,n) columns of
+*> U and V are the left and right singular vectors of A.
+*>
+*> Note that the routine returns V**H, not V.
+*> \endverbatim
+*
+*  Arguments:
+*  ==========
+*
+*> \param[in] JOBU
+*> \verbatim
+*>          JOBU is CHARACTER*1
+*>          Specifies options for computing all or part of the matrix U:
+*>          = 'A':  all M columns of U are returned in array U:
+*>          = 'S':  the first min(m,n) columns of U (the left singular
+*>                  vectors) are returned in the array U;
+*>          = 'O':  the first min(m,n) columns of U (the left singular
+*>                  vectors) are overwritten on the array A;
+*>          = 'N':  no columns of U (no left singular vectors) are
+*>                  computed.
+*> \endverbatim
+*>
+*> \param[in] JOBVT
+*> \verbatim
+*>          JOBVT is CHARACTER*1
+*>          Specifies options for computing all or part of the matrix
+*>          V**H:
+*>          = 'A':  all N rows of V**H are returned in the array VT;
+*>          = 'S':  the first min(m,n) rows of V**H (the right singular
+*>                  vectors) are returned in the array VT;
+*>          = 'O':  the first min(m,n) rows of V**H (the right singular
+*>                  vectors) are overwritten on the array A;
+*>          = 'N':  no rows of V**H (no right singular vectors) are
+*>                  computed.
+*>
+*>          JOBVT and JOBU cannot both be 'O'.
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*>          M is INTEGER
+*>          The number of rows of the input matrix A.  M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*>          N is INTEGER
+*>          The number of columns of the input matrix A.  N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*>          A is COMPLEX*16 array, dimension (LDA,N)
+*>          On entry, the M-by-N matrix A.
+*>          On exit,
+*>          if JOBU = 'O',  A is overwritten with the first min(m,n)
+*>                          columns of U (the left singular vectors,
+*>                          stored columnwise);
+*>          if JOBVT = 'O', A is overwritten with the first min(m,n)
+*>                          rows of V**H (the right singular vectors,
+*>                          stored rowwise);
+*>          if JOBU .ne. 'O' and JOBVT .ne. 'O', the contents of A
+*>                          are destroyed.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*>          LDA is INTEGER
+*>          The leading dimension of the array A.  LDA >= max(1,M).
+*> \endverbatim
+*>
+*> \param[out] S
+*> \verbatim
+*>          S is DOUBLE PRECISION array, dimension (min(M,N))
+*>          The singular values of A, sorted so that S(i) >= S(i+1).
+*> \endverbatim
+*>
+*> \param[out] U
+*> \verbatim
+*>          U is COMPLEX*16 array, dimension (LDU,UCOL)
+*>          (LDU,M) if JOBU = 'A' or (LDU,min(M,N)) if JOBU = 'S'.
+*>          If JOBU = 'A', U contains the M-by-M unitary matrix U;
+*>          if JOBU = 'S', U contains the first min(m,n) columns of U
+*>          (the left singular vectors, stored columnwise);
+*>          if JOBU = 'N' or 'O', U is not referenced.
+*> \endverbatim
+*>
+*> \param[in] LDU
+*> \verbatim
+*>          LDU is INTEGER
+*>          The leading dimension of the array U.  LDU >= 1; if
+*>          JOBU = 'S' or 'A', LDU >= M.
+*> \endverbatim
+*>
+*> \param[out] VT
+*> \verbatim
+*>          VT is COMPLEX*16 array, dimension (LDVT,N)
+*>          If JOBVT = 'A', VT contains the N-by-N unitary matrix
+*>          V**H;
+*>          if JOBVT = 'S', VT contains the first min(m,n) rows of
+*>          V**H (the right singular vectors, stored rowwise);
+*>          if JOBVT = 'N' or 'O', VT is not referenced.
+*> \endverbatim
+*>
+*> \param[in] LDVT
+*> \verbatim
+*>          LDVT is INTEGER
+*>          The leading dimension of the array VT.  LDVT >= 1; if
+*>          JOBVT = 'A', LDVT >= N; if JOBVT = 'S', LDVT >= min(M,N).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*>          WORK is COMPLEX*16 array, dimension (MAX(1,LWORK))
+*>          On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*>          LWORK is INTEGER
+*>          The dimension of the array WORK.
+*>          LWORK >=  MAX(1,2*MIN(M,N)+MAX(M,N)).
+*>          For good performance, LWORK should generally be larger.
+*>
+*>          If LWORK = -1, then a workspace query is assumed; the routine
+*>          only calculates the optimal size of the WORK array, returns
+*>          this value as the first entry of the WORK array, and no error
+*>          message related to LWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*>          RWORK is DOUBLE PRECISION array, dimension (5*min(M,N))
+*>          On exit, if INFO > 0, RWORK(1:MIN(M,N)-1) contains the
+*>          unconverged superdiagonal elements of an upper bidiagonal
+*>          matrix B whose diagonal is in S (not necessarily sorted).
+*>          B satisfies A = U * B * VT, so it has the same singular
+*>          values as A, and singular vectors related by U and VT.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*>          INFO is INTEGER
+*>          = 0:  successful exit.
+*>          < 0:  if INFO = -i, the i-th argument had an illegal value.
+*>          > 0:  if ZBDSQR did not converge, INFO specifies how many
+*>                superdiagonals of an intermediate bidiagonal form B
+*>                did not converge to zero. See the description of RWORK
+*>                above for details.
+*> \endverbatim
+*
+*  Authors:
+*  ========
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date April 2012
+*
+*> \ingroup complex16GEsing
+*
+*  =====================================================================
+      SUBROUTINE ZGESVD( JOBU, JOBVT, M, N, A, LDA, S, U, LDU,
+     $                   VT, LDVT, WORK, LWORK, RWORK, INFO )
+*
+*  -- LAPACK driver routine (version 3.7.0) --
+*  -- LAPACK is a software package provided by Univ. of Tennessee,    --
+*  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+*     April 2012
+*
+*     .. Scalar Arguments ..
+      CHARACTER          JOBU, JOBVT
+      INTEGER            INFO, LDA, LDU, LDVT, LWORK, M, N
+*     ..
+*     .. Array Arguments ..
+      DOUBLE PRECISION   RWORK( * ), S( * )
+      COMPLEX*16         A( LDA, * ), U( LDU, * ), VT( LDVT, * ),
+     $                   WORK( * )
+*     ..
+*
+*  =====================================================================
+*
+*     .. Parameters ..
+      COMPLEX*16         CZERO, CONE
+      PARAMETER          ( CZERO = ( 0.0D0, 0.0D0 ),
+     $                   CONE = ( 1.0D0, 0.0D0 ) )
+      DOUBLE PRECISION   ZERO, ONE
+      PARAMETER          ( ZERO = 0.0D0, ONE = 1.0D0 )
+*     ..
+*     .. Local Scalars ..
+      LOGICAL            LQUERY, WNTUA, WNTUAS, WNTUN, WNTUO, WNTUS,
+     $                   WNTVA, WNTVAS, WNTVN, WNTVO, WNTVS
+      INTEGER            BLK, CHUNK, I, IE, IERR, IR, IRWORK, ISCL,
+     $                   ITAU, ITAUP, ITAUQ, IU, IWORK, LDWRKR, LDWRKU,
+     $                   MAXWRK, MINMN, MINWRK, MNTHR, NCU, NCVT, NRU,
+     $                   NRVT, WRKBL
+      INTEGER            LWORK_ZGEQRF, LWORK_ZUNGQR_N, LWORK_ZUNGQR_M,
+     $                   LWORK_ZGEBRD, LWORK_ZUNGBR_P, LWORK_ZUNGBR_Q,
+     $                   LWORK_ZGELQF, LWORK_ZUNGLQ_N, LWORK_ZUNGLQ_M
+      DOUBLE PRECISION   ANRM, BIGNUM, EPS, SMLNUM
+*     ..
+*     .. Local Arrays ..
+      DOUBLE PRECISION   DUM( 1 )
+      COMPLEX*16         CDUM( 1 )
+*     ..
+*     .. External Subroutines ..
+      EXTERNAL           DLASCL, XERBLA, ZBDSQR, ZGEBRD, ZGELQF, ZGEMM,
+     $                   ZGEQRF, ZLACPY, ZLASCL, ZLASET, ZUNGBR, ZUNGLQ,
+     $                   ZUNGQR, ZUNMBR
+*     ..
+*     .. External Functions ..
+      LOGICAL            LSAME
+      INTEGER            ILAENV
+      DOUBLE PRECISION   DLAMCH, ZLANGE
+      EXTERNAL           LSAME, ILAENV, DLAMCH, ZLANGE
+*     ..
+*     .. Intrinsic Functions ..
+      INTRINSIC          MAX, MIN, SQRT
+*     ..
+*     .. Executable Statements ..
+*
+*     Test the input arguments
+*
+      INFO = 0
+      MINMN = MIN( M, N )
+      WNTUA = LSAME( JOBU, 'A' )
+      WNTUS = LSAME( JOBU, 'S' )
+      WNTUAS = WNTUA .OR. WNTUS
+      WNTUO = LSAME( JOBU, 'O' )
+      WNTUN = LSAME( JOBU, 'N' )
+      WNTVA = LSAME( JOBVT, 'A' )
+      WNTVS = LSAME( JOBVT, 'S' )
+      WNTVAS = WNTVA .OR. WNTVS
+      WNTVO = LSAME( JOBVT, 'O' )
+      WNTVN = LSAME( JOBVT, 'N' )
+      LQUERY = ( LWORK.EQ.-1 )
+*
+      IF( .NOT.( WNTUA .OR. WNTUS .OR. WNTUO .OR. WNTUN ) ) THEN
+         INFO = -1
+      ELSE IF( .NOT.( WNTVA .OR. WNTVS .OR. WNTVO .OR. WNTVN ) .OR.
+     $         ( WNTVO .AND. WNTUO ) ) THEN
+         INFO = -2
+      ELSE IF( M.LT.0 ) THEN
+         INFO = -3
+      ELSE IF( N.LT.0 ) THEN
+         INFO = -4
+      ELSE IF( LDA.LT.MAX( 1, M ) ) THEN
+         INFO = -6
+      ELSE IF( LDU.LT.1 .OR. ( WNTUAS .AND. LDU.LT.M ) ) THEN
+         INFO = -9
+      ELSE IF( LDVT.LT.1 .OR. ( WNTVA .AND. LDVT.LT.N ) .OR.
+     $         ( WNTVS .AND. LDVT.LT.MINMN ) ) THEN
+         INFO = -11
+      END IF
+*
+*     Compute workspace
+*      (Note: Comments in the code beginning "Workspace:" describe the
+*       minimal amount of workspace needed at that point in the code,
+*       as well as the preferred amount for good performance.
+*       CWorkspace refers to complex workspace, and RWorkspace to
+*       real workspace. NB refers to the optimal block size for the
+*       immediately following subroutine, as returned by ILAENV.)
+*
+      IF( INFO.EQ.0 ) THEN
+         MINWRK = 1
+         MAXWRK = 1
+         IF( M.GE.N .AND. MINMN.GT.0 ) THEN
+*
+*           Space needed for ZBDSQR is BDSPAC = 5*N
+*
+            MNTHR = ILAENV( 6, 'ZGESVD', JOBU // JOBVT, M, N, 0, 0 )
+*           Compute space needed for ZGEQRF
+            CALL ZGEQRF( M, N, A, LDA, CDUM(1), CDUM(1), -1, IERR )
+            LWORK_ZGEQRF = INT( CDUM(1) )
+*           Compute space needed for ZUNGQR
+            CALL ZUNGQR( M, N, N, A, LDA, CDUM(1), CDUM(1), -1, IERR )
+            LWORK_ZUNGQR_N = INT( CDUM(1) )
+            CALL ZUNGQR( M, M, N, A, LDA, CDUM(1), CDUM(1), -1, IERR )
+            LWORK_ZUNGQR_M = INT( CDUM(1) )
+*           Compute space needed for ZGEBRD
+            CALL ZGEBRD( N, N, A, LDA, S, DUM(1), CDUM(1),
+     $                   CDUM(1), CDUM(1), -1, IERR )
+            LWORK_ZGEBRD = INT( CDUM(1) )
+*           Compute space needed for ZUNGBR
+            CALL ZUNGBR( 'P', N, N, N, A, LDA, CDUM(1),
+     $                   CDUM(1), -1, IERR )
+            LWORK_ZUNGBR_P = INT( CDUM(1) )
+            CALL ZUNGBR( 'Q', N, N, N, A, LDA, CDUM(1),
+     $                   CDUM(1), -1, IERR )
+            LWORK_ZUNGBR_Q = INT( CDUM(1) )
+*
+            IF( M.GE.MNTHR ) THEN
+               IF( WNTUN ) THEN
+*
+*                 Path 1 (M much larger than N, JOBU='N')
+*
+                  MAXWRK = N + LWORK_ZGEQRF
+                  MAXWRK = MAX( MAXWRK, 2*N+LWORK_ZGEBRD )
+                  IF( WNTVO .OR. WNTVAS )
+     $               MAXWRK = MAX( MAXWRK, 2*N+LWORK_ZUNGBR_P )
+                  MINWRK = 3*N
+               ELSE IF( WNTUO .AND. WNTVN ) THEN
+*
+*                 Path 2 (M much larger than N, JOBU='O', JOBVT='N')
+*
+                  WRKBL = N + LWORK_ZGEQRF
+                  WRKBL = MAX( WRKBL, N+LWORK_ZUNGQR_N )
+                  WRKBL = MAX( WRKBL, 2*N+LWORK_ZGEBRD )
+                  WRKBL = MAX( WRKBL, 2*N+LWORK_ZUNGBR_Q )
+                  MAXWRK = MAX( N*N+WRKBL, N*N+M*N )
+                  MINWRK = 2*N + M
+               ELSE IF( WNTUO .AND. WNTVAS ) THEN
+*
+*                 Path 3 (M much larger than N, JOBU='O', JOBVT='S' or
+*                 'A')
+*
+                  WRKBL = N + LWORK_ZGEQRF
+                  WRKBL = MAX( WRKBL, N+LWORK_ZUNGQR_N )
+                  WRKBL = MAX( WRKBL, 2*N+LWORK_ZGEBRD )
+                  WRKBL = MAX( WRKBL, 2*N+LWORK_ZUNGBR_Q )
+                  WRKBL = MAX( WRKBL, 2*N+LWORK_ZUNGBR_P )
+                  MAXWRK = MAX( N*N+WRKBL, N*N+M*N )
+                  MINWRK = 2*N + M
+               ELSE IF( WNTUS .AND. WNTVN ) THEN
+*
+*                 Path 4 (M much larger than N, JOBU='S', JOBVT='N')
+*
+                  WRKBL = N + LWORK_ZGEQRF
+                  WRKBL = MAX( WRKBL, N+LWORK_ZUNGQR_N )
+                  WRKBL = MAX( WRKBL, 2*N+LWORK_ZGEBRD )
+                  WRKBL = MAX( WRKBL, 2*N+LWORK_ZUNGBR_Q )
+                  MAXWRK = N*N + WRKBL
+                  MINWRK = 2*N + M
+               ELSE IF( WNTUS .AND. WNTVO ) THEN
+*
+*                 Path 5 (M much larger than N, JOBU='S', JOBVT='O')
+*
+                  WRKBL = N + LWORK_ZGEQRF
+                  WRKBL = MAX( WRKBL, N+LWORK_ZUNGQR_N )
+                  WRKBL = MAX( WRKBL, 2*N+LWORK_ZGEBRD )
+                  WRKBL = MAX( WRKBL, 2*N+LWORK_ZUNGBR_Q )
+                  WRKBL = MAX( WRKBL, 2*N+LWORK_ZUNGBR_P )
+                  MAXWRK = 2*N*N + WRKBL
+                  MINWRK = 2*N + M
+               ELSE IF( WNTUS .AND. WNTVAS ) THEN
+*
+*                 Path 6 (M much larger than N, JOBU='S', JOBVT='S' or
+*                 'A')
+*
+                  WRKBL = N + LWORK_ZGEQRF
+                  WRKBL = MAX( WRKBL, N+LWORK_ZUNGQR_N )
+                  WRKBL = MAX( WRKBL, 2*N+LWORK_ZGEBRD )
+                  WRKBL = MAX( WRKBL, 2*N+LWORK_ZUNGBR_Q )
+                  WRKBL = MAX( WRKBL, 2*N+LWORK_ZUNGBR_P )
+                  MAXWRK = N*N + WRKBL
+                  MINWRK = 2*N + M
+               ELSE IF( WNTUA .AND. WNTVN ) THEN
+*
+*                 Path 7 (M much larger than N, JOBU='A', JOBVT='N')
+*
+                  WRKBL = N + LWORK_ZGEQRF
+                  WRKBL = MAX( WRKBL, N+LWORK_ZUNGQR_M )
+                  WRKBL = MAX( WRKBL, 2*N+LWORK_ZGEBRD )
+                  WRKBL = MAX( WRKBL, 2*N+LWORK_ZUNGBR_Q )
+                  MAXWRK = N*N + WRKBL
+                  MINWRK = 2*N + M
+               ELSE IF( WNTUA .AND. WNTVO ) THEN
+*
+*                 Path 8 (M much larger than N, JOBU='A', JOBVT='O')
+*
+                  WRKBL = N + LWORK_ZGEQRF
+                  WRKBL = MAX( WRKBL, N+LWORK_ZUNGQR_M )
+                  WRKBL = MAX( WRKBL, 2*N+LWORK_ZGEBRD )
+                  WRKBL = MAX( WRKBL, 2*N+LWORK_ZUNGBR_Q )
+                  WRKBL = MAX( WRKBL, 2*N+LWORK_ZUNGBR_P )
+                  MAXWRK = 2*N*N + WRKBL
+                  MINWRK = 2*N + M
+               ELSE IF( WNTUA .AND. WNTVAS ) THEN
+*
+*                 Path 9 (M much larger than N, JOBU='A', JOBVT='S' or
+*                 'A')
+*
+                  WRKBL = N + LWORK_ZGEQRF
+                  WRKBL = MAX( WRKBL, N+LWORK_ZUNGQR_M )
+                  WRKBL = MAX( WRKBL, 2*N+LWORK_ZGEBRD )
+                  WRKBL = MAX( WRKBL, 2*N+LWORK_ZUNGBR_Q )
+                  WRKBL = MAX( WRKBL, 2*N+LWORK_ZUNGBR_P )
+                  MAXWRK = N*N + WRKBL
+                  MINWRK = 2*N + M
+               END IF
+            ELSE
+*
+*              Path 10 (M at least N, but not much larger)
+*
+               CALL ZGEBRD( M, N, A, LDA, S, DUM(1), CDUM(1),
+     $                   CDUM(1), CDUM(1), -1, IERR )
+               LWORK_ZGEBRD = INT( CDUM(1) )
+               MAXWRK = 2*N + LWORK_ZGEBRD
+               IF( WNTUS .OR. WNTUO ) THEN
+                  CALL ZUNGBR( 'Q', M, N, N, A, LDA, CDUM(1),
+     $                   CDUM(1), -1, IERR )
+                  LWORK_ZUNGBR_Q = INT( CDUM(1) )
+                  MAXWRK = MAX( MAXWRK, 2*N+LWORK_ZUNGBR_Q )
+               END IF
+               IF( WNTUA ) THEN
+                  CALL ZUNGBR( 'Q', M, M, N, A, LDA, CDUM(1),
+     $                   CDUM(1), -1, IERR )
+                  LWORK_ZUNGBR_Q = INT( CDUM(1) )
+                  MAXWRK = MAX( MAXWRK, 2*N+LWORK_ZUNGBR_Q )
+               END IF
+               IF( .NOT.WNTVN ) THEN
+                  MAXWRK = MAX( MAXWRK, 2*N+LWORK_ZUNGBR_P )
+               END IF
+               MINWRK = 2*N + M
+            END IF
+         ELSE IF( MINMN.GT.0 ) THEN
+*
+*           Space needed for ZBDSQR is BDSPAC = 5*M
+*
+            MNTHR = ILAENV( 6, 'ZGESVD', JOBU // JOBVT, M, N, 0, 0 )
+*           Compute space needed for ZGELQF
+            CALL ZGELQF( M, N, A, LDA, CDUM(1), CDUM(1), -1, IERR )
+            LWORK_ZGELQF = INT( CDUM(1) )
+*           Compute space needed for ZUNGLQ
+            CALL ZUNGLQ( N, N, M, CDUM(1), N, CDUM(1), CDUM(1), -1,
+     $                   IERR )
+            LWORK_ZUNGLQ_N = INT( CDUM(1) )
+            CALL ZUNGLQ( M, N, M, A, LDA, CDUM(1), CDUM(1), -1, IERR )
+            LWORK_ZUNGLQ_M = INT( CDUM(1) )
+*           Compute space needed for ZGEBRD
+            CALL ZGEBRD( M, M, A, LDA, S, DUM(1), CDUM(1),
+     $                   CDUM(1), CDUM(1), -1, IERR )
+            LWORK_ZGEBRD = INT( CDUM(1) )
+*            Compute space needed for ZUNGBR P
+            CALL ZUNGBR( 'P', M, M, M, A, N, CDUM(1),
+     $                   CDUM(1), -1, IERR )
+            LWORK_ZUNGBR_P = INT( CDUM(1) )
+*           Compute space needed for ZUNGBR Q
+            CALL ZUNGBR( 'Q', M, M, M, A, N, CDUM(1),
+     $                   CDUM(1), -1, IERR )
+            LWORK_ZUNGBR_Q = INT( CDUM(1) )
+            IF( N.GE.MNTHR ) THEN
+               IF( WNTVN ) THEN
+*
+*                 Path 1t(N much larger than M, JOBVT='N')
+*
+                  MAXWRK = M + LWORK_ZGELQF
+                  MAXWRK = MAX( MAXWRK, 2*M+LWORK_ZGEBRD )
+                  IF( WNTUO .OR. WNTUAS )
+     $               MAXWRK = MAX( MAXWRK, 2*M+LWORK_ZUNGBR_Q )
+                  MINWRK = 3*M
+               ELSE IF( WNTVO .AND. WNTUN ) THEN
+*
+*                 Path 2t(N much larger than M, JOBU='N', JOBVT='O')
+*
+                  WRKBL = M + LWORK_ZGELQF
+                  WRKBL = MAX( WRKBL, M+LWORK_ZUNGLQ_M )
+                  WRKBL = MAX( WRKBL, 2*M+LWORK_ZGEBRD )
+                  WRKBL = MAX( WRKBL, 2*M+LWORK_ZUNGBR_P )
+                  MAXWRK = MAX( M*M+WRKBL, M*M+M*N )
+                  MINWRK = 2*M + N
+               ELSE IF( WNTVO .AND. WNTUAS ) THEN
+*
+*                 Path 3t(N much larger than M, JOBU='S' or 'A',
+*                 JOBVT='O')
+*
+                  WRKBL = M + LWORK_ZGELQF
+                  WRKBL = MAX( WRKBL, M+LWORK_ZUNGLQ_M )
+                  WRKBL = MAX( WRKBL, 2*M+LWORK_ZGEBRD )
+                  WRKBL = MAX( WRKBL, 2*M+LWORK_ZUNGBR_P )
+                  WRKBL = MAX( WRKBL, 2*M+LWORK_ZUNGBR_Q )
+                  MAXWRK = MAX( M*M+WRKBL, M*M+M*N )
+                  MINWRK = 2*M + N
+               ELSE IF( WNTVS .AND. WNTUN ) THEN
+*
+*                 Path 4t(N much larger than M, JOBU='N', JOBVT='S')
+*
+                  WRKBL = M + LWORK_ZGELQF
+                  WRKBL = MAX( WRKBL, M+LWORK_ZUNGLQ_M )
+                  WRKBL = MAX( WRKBL, 2*M+LWORK_ZGEBRD )
+                  WRKBL = MAX( WRKBL, 2*M+LWORK_ZUNGBR_P )
+                  MAXWRK = M*M + WRKBL
+                  MINWRK = 2*M + N
+               ELSE IF( WNTVS .AND. WNTUO ) THEN
+*
+*                 Path 5t(N much larger than M, JOBU='O', JOBVT='S')
+*
+                  WRKBL = M + LWORK_ZGELQF
+                  WRKBL = MAX( WRKBL, M+LWORK_ZUNGLQ_M )
+                  WRKBL = MAX( WRKBL, 2*M+LWORK_ZGEBRD )
+                  WRKBL = MAX( WRKBL, 2*M+LWORK_ZUNGBR_P )
+                  WRKBL = MAX( WRKBL, 2*M+LWORK_ZUNGBR_Q )
+                  MAXWRK = 2*M*M + WRKBL
+                  MINWRK = 2*M + N
+               ELSE IF( WNTVS .AND. WNTUAS ) THEN
+*
+*                 Path 6t(N much larger than M, JOBU='S' or 'A',
+*                 JOBVT='S')
+*
+                  WRKBL = M + LWORK_ZGELQF
+                  WRKBL = MAX( WRKBL, M+LWORK_ZUNGLQ_M )
+                  WRKBL = MAX( WRKBL, 2*M+LWORK_ZGEBRD )
+                  WRKBL = MAX( WRKBL, 2*M+LWORK_ZUNGBR_P )
+                  WRKBL = MAX( WRKBL, 2*M+LWORK_ZUNGBR_Q )
+                  MAXWRK = M*M + WRKBL
+                  MINWRK = 2*M + N
+               ELSE IF( WNTVA .AND. WNTUN ) THEN
+*
+*                 Path 7t(N much larger than M, JOBU='N', JOBVT='A')
+*
+                  WRKBL = M + LWORK_ZGELQF
+                  WRKBL = MAX( WRKBL, M+LWORK_ZUNGLQ_N )
+                  WRKBL = MAX( WRKBL, 2*M+LWORK_ZGEBRD )
+                  WRKBL = MAX( WRKBL, 2*M+LWORK_ZUNGBR_P )
+                  MAXWRK = M*M + WRKBL
+                  MINWRK = 2*M + N
+               ELSE IF( WNTVA .AND. WNTUO ) THEN
+*
+*                 Path 8t(N much larger than M, JOBU='O', JOBVT='A')
+*
+                  WRKBL = M + LWORK_ZGELQF
+                  WRKBL = MAX( WRKBL, M+LWORK_ZUNGLQ_N )
+                  WRKBL = MAX( WRKBL, 2*M+LWORK_ZGEBRD )
+                  WRKBL = MAX( WRKBL, 2*M+LWORK_ZUNGBR_P )
+                  WRKBL = MAX( WRKBL, 2*M+LWORK_ZUNGBR_Q )
+                  MAXWRK = 2*M*M + WRKBL
+                  MINWRK = 2*M + N
+               ELSE IF( WNTVA .AND. WNTUAS ) THEN
+*
+*                 Path 9t(N much larger than M, JOBU='S' or 'A',
+*                 JOBVT='A')
+*
+                  WRKBL = M + LWORK_ZGELQF
+                  WRKBL = MAX( WRKBL, M+LWORK_ZUNGLQ_N )
+                  WRKBL = MAX( WRKBL, 2*M+LWORK_ZGEBRD )
+                  WRKBL = MAX( WRKBL, 2*M+LWORK_ZUNGBR_P )
+                  WRKBL = MAX( WRKBL, 2*M+LWORK_ZUNGBR_Q )
+                  MAXWRK = M*M + WRKBL
+                  MINWRK = 2*M + N
+               END IF
+            ELSE
+*
+*              Path 10t(N greater than M, but not much larger)
+*
+               CALL ZGEBRD( M, N, A, LDA, S, DUM(1), CDUM(1),
+     $                   CDUM(1), CDUM(1), -1, IERR )
+               LWORK_ZGEBRD = INT( CDUM(1) )
+               MAXWRK = 2*M + LWORK_ZGEBRD
+               IF( WNTVS .OR. WNTVO ) THEN
+*                Compute space needed for ZUNGBR P
+                 CALL ZUNGBR( 'P', M, N, M, A, N, CDUM(1),
+     $                   CDUM(1), -1, IERR )
+                 LWORK_ZUNGBR_P = INT( CDUM(1) )
+                 MAXWRK = MAX( MAXWRK, 2*M+LWORK_ZUNGBR_P )
+               END IF
+               IF( WNTVA ) THEN
+                 CALL ZUNGBR( 'P', N,  N, M, A, N, CDUM(1),
+     $                   CDUM(1), -1, IERR )
+                 LWORK_ZUNGBR_P = INT( CDUM(1) )
+                 MAXWRK = MAX( MAXWRK, 2*M+LWORK_ZUNGBR_P )
+               END IF
+               IF( .NOT.WNTUN ) THEN
+                  MAXWRK = MAX( MAXWRK, 2*M+LWORK_ZUNGBR_Q )
+               END IF
+               MINWRK = 2*M + N
+            END IF
+         END IF
+         MAXWRK = MAX( MAXWRK, MINWRK )
+         WORK( 1 ) = MAXWRK
+*
+         IF( LWORK.LT.MINWRK .AND. .NOT.LQUERY ) THEN
+            INFO = -13
+         END IF
+      END IF
+*
+      IF( INFO.NE.0 ) THEN
+         CALL XERBLA( 'ZGESVD', -INFO )
+         RETURN
+      ELSE IF( LQUERY ) THEN
+         RETURN
+      END IF
+*
+*     Quick return if possible
+*
+      IF( M.EQ.0 .OR. N.EQ.0 ) THEN
+         RETURN
+      END IF
+*
+*     Get machine constants
+*
+      EPS = DLAMCH( 'P' )
+      SMLNUM = SQRT( DLAMCH( 'S' ) ) / EPS
+      BIGNUM = ONE / SMLNUM
+*
+*     Scale A if max element outside range [SMLNUM,BIGNUM]
+*
+      ANRM = ZLANGE( 'M', M, N, A, LDA, DUM )
+      ISCL = 0
+      IF( ANRM.GT.ZERO .AND. ANRM.LT.SMLNUM ) THEN
+         ISCL = 1
+         CALL ZLASCL( 'G', 0, 0, ANRM, SMLNUM, M, N, A, LDA, IERR )
+      ELSE IF( ANRM.GT.BIGNUM ) THEN
+         ISCL = 1
+         CALL ZLASCL( 'G', 0, 0, ANRM, BIGNUM, M, N, A, LDA, IERR )
+      END IF
+*
+      IF( M.GE.N ) THEN
+*
+*        A has at least as many rows as columns. If A has sufficiently
+*        more rows than columns, first reduce using the QR
+*        decomposition (if sufficient workspace available)
+*
+         IF( M.GE.MNTHR ) THEN
+*
+            IF( WNTUN ) THEN
+*
+*              Path 1 (M much larger than N, JOBU='N')
+*              No left singular vectors to be computed
+*
+               ITAU = 1
+               IWORK = ITAU + N
+*
+*              Compute A=Q*R
+*              (CWorkspace: need 2*N, prefer N+N*NB)
+*              (RWorkspace: need 0)
+*
+               CALL ZGEQRF( M, N, A, LDA, WORK( ITAU ), WORK( IWORK ),
+     $                      LWORK-IWORK+1, IERR )
+*
+*              Zero out below R
+*
+               IF( N .GT. 1 ) THEN
+                  CALL ZLASET( 'L', N-1, N-1, CZERO, CZERO, A( 2, 1 ),
+     $                         LDA )
+               END IF
+               IE = 1
+               ITAUQ = 1
+               ITAUP = ITAUQ + N
+               IWORK = ITAUP + N
+*
+*              Bidiagonalize R in A
+*              (CWorkspace: need 3*N, prefer 2*N+2*N*NB)
+*              (RWorkspace: need N)
+*
+               CALL ZGEBRD( N, N, A, LDA, S, RWORK( IE ), WORK( ITAUQ ),
+     $                      WORK( ITAUP ), WORK( IWORK ), LWORK-IWORK+1,
+     $                      IERR )
+               NCVT = 0
+               IF( WNTVO .OR. WNTVAS ) THEN
+*
+*                 If right singular vectors desired, generate P'.
+*                 (CWorkspace: need 3*N-1, prefer 2*N+(N-1)*NB)
+*                 (RWorkspace: 0)
+*
+                  CALL ZUNGBR( 'P', N, N, N, A, LDA, WORK( ITAUP ),
+     $                         WORK( IWORK ), LWORK-IWORK+1, IERR )
+                  NCVT = N
+               END IF
+               IRWORK = IE + N
+*
+*              Perform bidiagonal QR iteration, computing right
+*              singular vectors of A in A if desired
+*              (CWorkspace: 0)
+*              (RWorkspace: need BDSPAC)
+*
+               CALL ZBDSQR( 'U', N, NCVT, 0, 0, S, RWORK( IE ), A, LDA,
+     $                      CDUM, 1, CDUM, 1, RWORK( IRWORK ), INFO )
+*
+*              If right singular vectors desired in VT, copy them there
+*
+               IF( WNTVAS )
+     $            CALL ZLACPY( 'F', N, N, A, LDA, VT, LDVT )
+*
+            ELSE IF( WNTUO .AND. WNTVN ) THEN
+*
+*              Path 2 (M much larger than N, JOBU='O', JOBVT='N')
+*              N left singular vectors to be overwritten on A and
+*              no right singular vectors to be computed
+*
+               IF( LWORK.GE.N*N+3*N ) THEN
+*
+*                 Sufficient workspace for a fast algorithm
+*
+                  IR = 1
+                  IF( LWORK.GE.MAX( WRKBL, LDA*N )+LDA*N ) THEN
+*
+*                    WORK(IU) is LDA by N, WORK(IR) is LDA by N
+*
+                     LDWRKU = LDA
+                     LDWRKR = LDA
+                  ELSE IF( LWORK.GE.MAX( WRKBL, LDA*N )+N*N ) THEN
+*
+*                    WORK(IU) is LDA by N, WORK(IR) is N by N
+*
+                     LDWRKU = LDA
+                     LDWRKR = N
+                  ELSE
+*
+*                    WORK(IU) is LDWRKU by N, WORK(IR) is N by N
+*
+                     LDWRKU = ( LWORK-N*N ) / N
+                     LDWRKR = N
+                  END IF
+                  ITAU = IR + LDWRKR*N
+                  IWORK = ITAU + N
+*
+*                 Compute A=Q*R
+*                 (CWorkspace: need N*N+2*N, prefer N*N+N+N*NB)
+*                 (RWorkspace: 0)
+*
+                  CALL ZGEQRF( M, N, A, LDA, WORK( ITAU ),
+     $                         WORK( IWORK ), LWORK-IWORK+1, IERR )
+*
+*                 Copy R to WORK(IR) and zero out below it
+*
+                  CALL ZLACPY( 'U', N, N, A, LDA, WORK( IR ), LDWRKR )
+                  CALL ZLASET( 'L', N-1, N-1, CZERO, CZERO,
+     $                         WORK( IR+1 ), LDWRKR )
+*
+*                 Generate Q in A
+*                 (CWorkspace: need N*N+2*N, prefer N*N+N+N*NB)
+*                 (RWorkspace: 0)
+*
+                  CALL ZUNGQR( M, N, N, A, LDA, WORK( ITAU ),
+     $                         WORK( IWORK ), LWORK-IWORK+1, IERR )
+                  IE = 1
+                  ITAUQ = ITAU
+                  ITAUP = ITAUQ + N
+                  IWORK = ITAUP + N
+*
+*                 Bidiagonalize R in WORK(IR)
+*                 (CWorkspace: need N*N+3*N, prefer N*N+2*N+2*N*NB)
+*                 (RWorkspace: need N)
+*
+                  CALL ZGEBRD( N, N, WORK( IR ), LDWRKR, S, RWORK( IE ),
+     $                         WORK( ITAUQ ), WORK( ITAUP ),
+     $                         WORK( IWORK ), LWORK-IWORK+1, IERR )
+*
+*                 Generate left vectors bidiagonalizing R
+*                 (CWorkspace: need N*N+3*N, prefer N*N+2*N+N*NB)
+*                 (RWorkspace: need 0)
+*
+                  CALL ZUNGBR( 'Q', N, N, N, WORK( IR ), LDWRKR,
+     $                         WORK( ITAUQ ), WORK( IWORK ),
+     $                         LWORK-IWORK+1, IERR )
+                  IRWORK = IE + N
+*
+*                 Perform bidiagonal QR iteration, computing left
+*                 singular vectors of R in WORK(IR)
+*                 (CWorkspace: need N*N)
+*                 (RWorkspace: need BDSPAC)
+*
+                  CALL ZBDSQR( 'U', N, 0, N, 0, S, RWORK( IE ), CDUM, 1,
+     $                         WORK( IR ), LDWRKR, CDUM, 1,
+     $                         RWORK( IRWORK ), INFO )
+                  IU = ITAUQ
+*
+*                 Multiply Q in A by left singular vectors of R in
+*                 WORK(IR), storing result in WORK(IU) and copying to A
+*                 (CWorkspace: need N*N+N, prefer N*N+M*N)
+*                 (RWorkspace: 0)
+*
+                  DO 10 I = 1, M, LDWRKU
+                     CHUNK = MIN( M-I+1, LDWRKU )
+                     CALL ZGEMM( 'N', 'N', CHUNK, N, N, CONE, A( I, 1 ),
+     $                           LDA, WORK( IR ), LDWRKR, CZERO,
+     $                           WORK( IU ), LDWRKU )
+                     CALL ZLACPY( 'F', CHUNK, N, WORK( IU ), LDWRKU,
+     $                            A( I, 1 ), LDA )
+   10             CONTINUE
+*
+               ELSE
+*
+*                 Insufficient workspace for a fast algorithm
+*
+                  IE = 1
+                  ITAUQ = 1
+                  ITAUP = ITAUQ + N
+                  IWORK = ITAUP + N
+*
+*                 Bidiagonalize A
+*                 (CWorkspace: need 2*N+M, prefer 2*N+(M+N)*NB)
+*                 (RWorkspace: N)
+*
+                  CALL ZGEBRD( M, N, A, LDA, S, RWORK( IE ),
+     $                         WORK( ITAUQ ), WORK( ITAUP ),
+     $                         WORK( IWORK ), LWORK-IWORK+1, IERR )
+*
+*                 Generate left vectors bidiagonalizing A
+*                 (CWorkspace: need 3*N, prefer 2*N+N*NB)
+*                 (RWorkspace: 0)
+*
+                  CALL ZUNGBR( 'Q', M, N, N, A, LDA, WORK( ITAUQ ),
+     $                         WORK( IWORK ), LWORK-IWORK+1, IERR )
+                  IRWORK = IE + N
+*
+*                 Perform bidiagonal QR iteration, computing left
+*                 singular vectors of A in A
+*                 (CWorkspace: need 0)
+*                 (RWorkspace: need BDSPAC)
+*
+                  CALL ZBDSQR( 'U', N, 0, M, 0, S, RWORK( IE ), CDUM, 1,
+     $                         A, LDA, CDUM, 1, RWORK( IRWORK ), INFO )
+*
+               END IF
+*
+            ELSE IF( WNTUO .AND. WNTVAS ) THEN
+*
+*              Path 3 (M much larger than N, JOBU='O', JOBVT='S' or 'A')
+*              N left singular vectors to be overwritten on A and
+*              N right singular vectors to be computed in VT
+*
+               IF( LWORK.GE.N*N+3*N ) THEN
+*
+*                 Sufficient workspace for a fast algorithm
+*
+                  IR = 1
+                  IF( LWORK.GE.MAX( WRKBL, LDA*N )+LDA*N ) THEN
+*
+*                    WORK(IU) is LDA by N and WORK(IR) is LDA by N
+*
+                     LDWRKU = LDA
+                     LDWRKR = LDA
+                  ELSE IF( LWORK.GE.MAX( WRKBL, LDA*N )+N*N ) THEN
+*
+*                    WORK(IU) is LDA by N and WORK(IR) is N by N
+*
+                     LDWRKU = LDA
+                     LDWRKR = N
+                  ELSE
+*
+*                    WORK(IU) is LDWRKU by N and WORK(IR) is N by N
+*
+                     LDWRKU = ( LWORK-N*N ) / N
+                     LDWRKR = N
+                  END IF
+                  ITAU = IR + LDWRKR*N
+                  IWORK = ITAU + N
+*
+*                 Compute A=Q*R
+*                 (CWorkspace: need N*N+2*N, prefer N*N+N+N*NB)
+*                 (RWorkspace: 0)
+*
+                  CALL ZGEQRF( M, N, A, LDA, WORK( ITAU ),
+     $                         WORK( IWORK ), LWORK-IWORK+1, IERR )
+*
+*                 Copy R to VT, zeroing out below it
+*
+                  CALL ZLACPY( 'U', N, N, A, LDA, VT, LDVT )
+                  IF( N.GT.1 )
+     $               CALL ZLASET( 'L', N-1, N-1, CZERO, CZERO,
+     $                            VT( 2, 1 ), LDVT )
+*
+*                 Generate Q in A
+*                 (CWorkspace: need N*N+2*N, prefer N*N+N+N*NB)
+*                 (RWorkspace: 0)
+*
+                  CALL ZUNGQR( M, N, N, A, LDA, WORK( ITAU ),
+     $                         WORK( IWORK ), LWORK-IWORK+1, IERR )
+                  IE = 1
+                  ITAUQ = ITAU
+                  ITAUP = ITAUQ + N
+                  IWORK = ITAUP + N
+*
+*                 Bidiagonalize R in VT, copying result to WORK(IR)
+*                 (CWorkspace: need N*N+3*N, prefer N*N+2*N+2*N*NB)
+*                 (RWorkspace: need N)
+*
+                  CALL ZGEBRD( N, N, VT, LDVT, S, RWORK( IE ),
+     $                         WORK( ITAUQ ), WORK( ITAUP ),
+     $                         WORK( IWORK ), LWORK-IWORK+1, IERR )
+                  CALL ZLACPY( 'L', N, N, VT, LDVT, WORK( IR ), LDWRKR )
+*
+*                 Generate left vectors bidiagonalizing R in WORK(IR)
+*                 (CWorkspace: need N*N+3*N, prefer N*N+2*N+N*NB)
+*                 (RWorkspace: 0)
+*
+                  CALL ZUNGBR( 'Q', N, N, N, WORK( IR ), LDWRKR,
+     $                         WORK( ITAUQ ), WORK( IWORK ),
+     $                         LWORK-IWORK+1, IERR )
+*
+*                 Generate right vectors bidiagonalizing R in VT
+*                 (CWorkspace: need N*N+3*N-1, prefer N*N+2*N+(N-1)*NB)
+*                 (RWorkspace: 0)
+*
+                  CALL ZUNGBR( 'P', N, N, N, VT, LDVT, WORK( ITAUP ),
+     $                         WORK( IWORK ), LWORK-IWORK+1, IERR )
+                  IRWORK = IE + N
+*
+*                 Perform bidiagonal QR iteration, computing left
+*                 singular vectors of R in WORK(IR) and computing right
+*                 singular vectors of R in VT
+*                 (CWorkspace: need N*N)
+*                 (RWorkspace: need BDSPAC)
+*
+                  CALL ZBDSQR( 'U', N, N, N, 0, S, RWORK( IE ), VT,
+     $                         LDVT, WORK( IR ), LDWRKR, CDUM, 1,
+     $                         RWORK( IRWORK ), INFO )
+                  IU = ITAUQ
+*
+*                 Multiply Q in A by left singular vectors of R in
+*                 WORK(IR), storing result in WORK(IU) and copying to A
+*                 (CWorkspace: need N*N+N, prefer N*N+M*N)
+*                 (RWorkspace: 0)
+*
+                  DO 20 I = 1, M, LDWRKU
+                     CHUNK = MIN( M-I+1, LDWRKU )
+                     CALL ZGEMM( 'N', 'N', CHUNK, N, N, CONE, A( I, 1 ),
+     $                           LDA, WORK( IR ), LDWRKR, CZERO,
+     $                           WORK( IU ), LDWRKU )
+                     CALL ZLACPY( 'F', CHUNK, N, WORK( IU ), LDWRKU,
+     $                            A( I, 1 ), LDA )
+   20             CONTINUE
+*
+               ELSE
+*
+*                 Insufficient workspace for a fast algorithm
+*
+                  ITAU = 1
+                  IWORK = ITAU + N
+*
+*                 Compute A=Q*R
+*                 (CWorkspace: need 2*N, prefer N+N*NB)
+*                 (RWorkspace: 0)
+*
+                  CALL ZGEQRF( M, N, A, LDA, WORK( ITAU ),
+     $                         WORK( IWORK ), LWORK-IWORK+1, IERR )
+*
+*                 Copy R to VT, zeroing out below it
+*
+                  CALL ZLACPY( 'U', N, N, A, LDA, VT, LDVT )
+                  IF( N.GT.1 )
+     $               CALL ZLASET( 'L', N-1, N-1, CZERO, CZERO,
+     $                            VT( 2, 1 ), LDVT )
+*
+*                 Generate Q in A
+*                 (CWorkspace: need 2*N, prefer N+N*NB)
+*                 (RWorkspace: 0)
+*
+                  CALL ZUNGQR( M, N, N, A, LDA, WORK( ITAU ),
+     $                         WORK( IWORK ), LWORK-IWORK+1, IERR )
+                  IE = 1
+                  ITAUQ = ITAU
+                  ITAUP = ITAUQ + N
+                  IWORK = ITAUP + N
+*
+*                 Bidiagonalize R in VT
+*                 (CWorkspace: need 3*N, prefer 2*N+2*N*NB)
+*                 (RWorkspace: N)
+*
+                  CALL ZGEBRD( N, N, VT, LDVT, S, RWORK( IE ),
+     $                         WORK( ITAUQ ), WORK( ITAUP ),
+     $                         WORK( IWORK ), LWORK-IWORK+1, IERR )
+*
+*                 Multiply Q in A by left vectors bidiagonalizing R
+*                 (CWorkspace: need 2*N+M, prefer 2*N+M*NB)
+*                 (RWorkspace: 0)
+*
+                  CALL ZUNMBR( 'Q', 'R', 'N', M, N, N, VT, LDVT,
+     $                         WORK( ITAUQ ), A, LDA, WORK( IWORK ),
+     $                         LWORK-IWORK+1, IERR )
+*
+*                 Generate right vectors bidiagonalizing R in VT
+*                 (CWorkspace: need 3*N-1, prefer 2*N+(N-1)*NB)
+*                 (RWorkspace: 0)
+*
+                  CALL ZUNGBR( 'P', N, N, N, VT, LDVT, WORK( ITAUP ),
+     $                         WORK( IWORK ), LWORK-IWORK+1, IERR )
+                  IRWORK = IE + N
+*
+*                 Perform bidiagonal QR iteration, computing left
+*                 singular vectors of A in A and computing right
+*                 singular vectors of A in VT
+*                 (CWorkspace: 0)
+*                 (RWorkspace: need BDSPAC)
+*
+                  CALL ZBDSQR( 'U', N, N, M, 0, S, RWORK( IE ), VT,
+     $                         LDVT, A, LDA, CDUM, 1, RWORK( IRWORK ),
+     $                         INFO )
+*
+               END IF
+*
+            ELSE IF( WNTUS ) THEN
+*
+               IF( WNTVN ) THEN
+*
+*                 Path 4 (M much larger than N, JOBU='S', JOBVT='N')
+*                 N left singular vectors to be computed in U and
+*                 no right singular vectors to be computed
+*
+                  IF( LWORK.GE.N*N+3*N ) THEN
+*
+*                    Sufficient workspace for a fast algorithm
+*
+                     IR = 1
+                     IF( LWORK.GE.WRKBL+LDA*N ) THEN
+*
+*                       WORK(IR) is LDA by N
+*
+                        LDWRKR = LDA
+                     ELSE
+*
+*                       WORK(IR) is N by N
+*
+                        LDWRKR = N
+                     END IF
+                     ITAU = IR + LDWRKR*N
+                     IWORK = ITAU + N
+*
+*                    Compute A=Q*R
+*                    (CWorkspace: need N*N+2*N, prefer N*N+N+N*NB)
+*                    (RWorkspace: 0)
+*
+                     CALL ZGEQRF( M, N, A, LDA, WORK( ITAU ),
+     $                            WORK( IWORK ), LWORK-IWORK+1, IERR )
+*
+*                    Copy R to WORK(IR), zeroing out below it
+*
+                     CALL ZLACPY( 'U', N, N, A, LDA, WORK( IR ),
+     $                            LDWRKR )
+                     CALL ZLASET( 'L', N-1, N-1, CZERO, CZERO,
+     $                            WORK( IR+1 ), LDWRKR )
+*
+*                    Generate Q in A
+*                    (CWorkspace: need N*N+2*N, prefer N*N+N+N*NB)
+*                    (RWorkspace: 0)
+*
+                     CALL ZUNGQR( M, N, N, A, LDA, WORK( ITAU ),
+     $                            WORK( IWORK ), LWORK-IWORK+1, IERR )
+                     IE = 1
+                     ITAUQ = ITAU
+                     ITAUP = ITAUQ + N
+                     IWORK = ITAUP + N
+*
+*                    Bidiagonalize R in WORK(IR)
+*                    (CWorkspace: need N*N+3*N, prefer N*N+2*N+2*N*NB)
+*                    (RWorkspace: need N)
+*
+                     CALL ZGEBRD( N, N, WORK( IR ), LDWRKR, S,
+     $                            RWORK( IE ), WORK( ITAUQ ),
+     $                            WORK( ITAUP ), WORK( IWORK ),
+     $                            LWORK-IWORK+1, IERR )
+*
+*                    Generate left vectors bidiagonalizing R in WORK(IR)
+*                    (CWorkspace: need N*N+3*N, prefer N*N+2*N+N*NB)
+*                    (RWorkspace: 0)
+*
+                     CALL ZUNGBR( 'Q', N, N, N, WORK( IR ), LDWRKR,
+     $                            WORK( ITAUQ ), WORK( IWORK ),
+     $                            LWORK-IWORK+1, IERR )
+                     IRWORK = IE + N
+*
+*                    Perform bidiagonal QR iteration, computing left
+*                    singular vectors of R in WORK(IR)
+*                    (CWorkspace: need N*N)
+*                    (RWorkspace: need BDSPAC)
+*
+                     CALL ZBDSQR( 'U', N, 0, N, 0, S, RWORK( IE ), CDUM,
+     $                            1, WORK( IR ), LDWRKR, CDUM, 1,
+     $                            RWORK( IRWORK ), INFO )
+*
+*                    Multiply Q in A by left singular vectors of R in
+*                    WORK(IR), storing result in U
+*                    (CWorkspace: need N*N)
+*                    (RWorkspace: 0)
+*
+                     CALL ZGEMM( 'N', 'N', M, N, N, CONE, A, LDA,
+     $                           WORK( IR ), LDWRKR, CZERO, U, LDU )
+*
+                  ELSE
+*
+*                    Insufficient workspace for a fast algorithm
+*
+                     ITAU = 1
+                     IWORK = ITAU + N
+*
+*                    Compute A=Q*R, copying result to U
+*                    (CWorkspace: need 2*N, prefer N+N*NB)
+*                    (RWorkspace: 0)
+*
+                     CALL ZGEQRF( M, N, A, LDA, WORK( ITAU ),
+     $                            WORK( IWORK ), LWORK-IWORK+1, IERR )
+                     CALL ZLACPY( 'L', M, N, A, LDA, U, LDU )
+*
+*                    Generate Q in U
+*                    (CWorkspace: need 2*N, prefer N+N*NB)
+*                    (RWorkspace: 0)
+*
+                     CALL ZUNGQR( M, N, N, U, LDU, WORK( ITAU ),
+     $                            WORK( IWORK ), LWORK-IWORK+1, IERR )
+                     IE = 1
+                     ITAUQ = ITAU
+                     ITAUP = ITAUQ + N
+                     IWORK = ITAUP + N
+*
+*                    Zero out below R in A
+*
+                     IF( N .GT. 1 ) THEN
+                        CALL ZLASET( 'L', N-1, N-1, CZERO, CZERO,
+     $                               A( 2, 1 ), LDA )
+                     END IF
+*
+*                    Bidiagonalize R in A
+*                    (CWorkspace: need 3*N, prefer 2*N+2*N*NB)
+*                    (RWorkspace: need N)
+*
+                     CALL ZGEBRD( N, N, A, LDA, S, RWORK( IE ),
+     $                            WORK( ITAUQ ), WORK( ITAUP ),
+     $                            WORK( IWORK ), LWORK-IWORK+1, IERR )
+*
+*                    Multiply Q in U by left vectors bidiagonalizing R
+*                    (CWorkspace: need 2*N+M, prefer 2*N+M*NB)
+*                    (RWorkspace: 0)
+*
+                     CALL ZUNMBR( 'Q', 'R', 'N', M, N, N, A, LDA,
+     $                            WORK( ITAUQ ), U, LDU, WORK( IWORK ),
+     $                            LWORK-IWORK+1, IERR )
+                     IRWORK = IE + N
+*
+*                    Perform bidiagonal QR iteration, computing left
+*                    singular vectors of A in U
+*                    (CWorkspace: 0)
+*                    (RWorkspace: need BDSPAC)
+*
+                     CALL ZBDSQR( 'U', N, 0, M, 0, S, RWORK( IE ), CDUM,
+     $                            1, U, LDU, CDUM, 1, RWORK( IRWORK ),
+     $                            INFO )
+*
+                  END IF
+*
+               ELSE IF( WNTVO ) THEN
+*
+*                 Path 5 (M much larger than N, JOBU='S', JOBVT='O')
+*                 N left singular vectors to be computed in U and
+*                 N right singular vectors to be overwritten on A
+*
+                  IF( LWORK.GE.2*N*N+3*N ) THEN
+*
+*                    Sufficient workspace for a fast algorithm
+*
+                     IU = 1
+                     IF( LWORK.GE.WRKBL+2*LDA*N ) THEN
+*
+*                       WORK(IU) is LDA by N and WORK(IR) is LDA by N
+*
+                        LDWRKU = LDA
+                        IR = IU + LDWRKU*N
+                        LDWRKR = LDA
+                     ELSE IF( LWORK.GE.WRKBL+( LDA+N )*N ) THEN
+*
+*                       WORK(IU) is LDA by N and WORK(IR) is N by N
+*
+                        LDWRKU = LDA
+                        IR = IU + LDWRKU*N
+                        LDWRKR = N
+                     ELSE
+*
+*                       WORK(IU) is N by N and WORK(IR) is N by N
+*
+                        LDWRKU = N
+                        IR = IU + LDWRKU*N
+                        LDWRKR = N
+                     END IF
+                     ITAU = IR + LDWRKR*N
+                     IWORK = ITAU + N
+*
+*                    Compute A=Q*R
+*                    (CWorkspace: need 2*N*N+2*N, prefer 2*N*N+N+N*NB)
+*                    (RWorkspace: 0)
+*
+                     CALL ZGEQRF( M, N, A, LDA, WORK( ITAU ),
+     $                            WORK( IWORK ), LWORK-IWORK+1, IERR )
+*
+*                    Copy R to WORK(IU), zeroing out below it
+*
+                     CALL ZLACPY( 'U', N, N, A, LDA, WORK( IU ),
+     $                            LDWRKU )
+                     CALL ZLASET( 'L', N-1, N-1, CZERO, CZERO,
+     $                            WORK( IU+1 ), LDWRKU )
+*
+*                    Generate Q in A
+*                    (CWorkspace: need 2*N*N+2*N, prefer 2*N*N+N+N*NB)
+*                    (RWorkspace: 0)
+*
+                     CALL ZUNGQR( M, N, N, A, LDA, WORK( ITAU ),
+     $                            WORK( IWORK ), LWORK-IWORK+1, IERR )
+                     IE = 1
+                     ITAUQ = ITAU
+                     ITAUP = ITAUQ + N
+                     IWORK = ITAUP + N
+*
+*                    Bidiagonalize R in WORK(IU), copying result to
+*                    WORK(IR)
+*                    (CWorkspace: need   2*N*N+3*N,
+*                                 prefer 2*N*N+2*N+2*N*NB)
+*                    (RWorkspace: need   N)
+*
+                     CALL ZGEBRD( N, N, WORK( IU ), LDWRKU, S,
+     $                            RWORK( IE ), WORK( ITAUQ ),
+     $                            WORK( ITAUP ), WORK( IWORK ),
+     $                            LWORK-IWORK+1, IERR )
+                     CALL ZLACPY( 'U', N, N, WORK( IU ), LDWRKU,
+     $                            WORK( IR ), LDWRKR )
+*
+*                    Generate left bidiagonalizing vectors in WORK(IU)
+*                    (CWorkspace: need 2*N*N+3*N, prefer 2*N*N+2*N+N*NB)
+*                    (RWorkspace: 0)
+*
+                     CALL ZUNGBR( 'Q', N, N, N, WORK( IU ), LDWRKU,
+     $                            WORK( ITAUQ ), WORK( IWORK ),
+     $                            LWORK-IWORK+1, IERR )
+*
+*                    Generate right bidiagonalizing vectors in WORK(IR)
+*                    (CWorkspace: need   2*N*N+3*N-1,
+*                                 prefer 2*N*N+2*N+(N-1)*NB)
+*                    (RWorkspace: 0)
+*
+                     CALL ZUNGBR( 'P', N, N, N, WORK( IR ), LDWRKR,
+     $                            WORK( ITAUP ), WORK( IWORK ),
+     $                            LWORK-IWORK+1, IERR )
+                     IRWORK = IE + N
+*
+*                    Perform bidiagonal QR iteration, computing left
+*                    singular vectors of R in WORK(IU) and computing
+*                    right singular vectors of R in WORK(IR)
+*                    (CWorkspace: need 2*N*N)
+*                    (RWorkspace: need BDSPAC)
+*
+                     CALL ZBDSQR( 'U', N, N, N, 0, S, RWORK( IE ),
+     $                            WORK( IR ), LDWRKR, WORK( IU ),
+     $                            LDWRKU, CDUM, 1, RWORK( IRWORK ),
+     $                            INFO )
+*
+*                    Multiply Q in A by left singular vectors of R in
+*                    WORK(IU), storing result in U
+*                    (CWorkspace: need N*N)
+*                    (RWorkspace: 0)
+*
+                     CALL ZGEMM( 'N', 'N', M, N, N, CONE, A, LDA,
+     $                           WORK( IU ), LDWRKU, CZERO, U, LDU )
+*
+*                    Copy right singular vectors of R to A
+*                    (CWorkspace: need N*N)
+*                    (RWorkspace: 0)
+*
+                     CALL ZLACPY( 'F', N, N, WORK( IR ), LDWRKR, A,
+     $                            LDA )
+*
+                  ELSE
+*
+*                    Insufficient workspace for a fast algorithm
+*
+                     ITAU = 1
+                     IWORK = ITAU + N
+*
+*                    Compute A=Q*R, copying result to U
+*                    (CWorkspace: need 2*N, prefer N+N*NB)
+*                    (RWorkspace: 0)
+*
+                     CALL ZGEQRF( M, N, A, LDA, WORK( ITAU ),
+     $                            WORK( IWORK ), LWORK-IWORK+1, IERR )
+                     CALL ZLACPY( 'L', M, N, A, LDA, U, LDU )
+*
+*                    Generate Q in U
+*                    (CWorkspace: need 2*N, prefer N+N*NB)
+*                    (RWorkspace: 0)
+*
+                     CALL ZUNGQR( M, N, N, U, LDU, WORK( ITAU ),
+     $                            WORK( IWORK ), LWORK-IWORK+1, IERR )
+                     IE = 1
+                     ITAUQ = ITAU
+                     ITAUP = ITAUQ + N
+                     IWORK = ITAUP + N
+*
+*                    Zero out below R in A
+*
+                     IF( N .GT. 1 ) THEN
+                        CALL ZLASET( 'L', N-1, N-1, CZERO, CZERO,
+     $                               A( 2, 1 ), LDA )
+                     END IF
+*
+*                    Bidiagonalize R in A
+*                    (CWorkspace: need 3*N, prefer 2*N+2*N*NB)
+*                    (RWorkspace: need N)
+*
+                     CALL ZGEBRD( N, N, A, LDA, S, RWORK( IE ),
+     $                            WORK( ITAUQ ), WORK( ITAUP ),
+     $                            WORK( IWORK ), LWORK-IWORK+1, IERR )
+*
+*                    Multiply Q in U by left vectors bidiagonalizing R
+*                    (CWorkspace: need 2*N+M, prefer 2*N+M*NB)
+*                    (RWorkspace: 0)
+*
+                     CALL ZUNMBR( 'Q', 'R', 'N', M, N, N, A, LDA,
+     $                            WORK( ITAUQ ), U, LDU, WORK( IWORK ),
+     $                            LWORK-IWORK+1, IERR )
+*
+*                    Generate right vectors bidiagonalizing R in A
+*                    (CWorkspace: need 3*N-1, prefer 2*N+(N-1)*NB)
+*                    (RWorkspace: 0)
+*
+                     CALL ZUNGBR( 'P', N, N, N, A, LDA, WORK( ITAUP ),
+     $                            WORK( IWORK ), LWORK-IWORK+1, IERR )
+                     IRWORK = IE + N
+*
+*                    Perform bidiagonal QR iteration, computing left
+*                    singular vectors of A in U and computing right
+*                    singular vectors of A in A
+*                    (CWorkspace: 0)
+*                    (RWorkspace: need BDSPAC)
+*
+                     CALL ZBDSQR( 'U', N, N, M, 0, S, RWORK( IE ), A,
+     $                            LDA, U, LDU, CDUM, 1, RWORK( IRWORK ),
+     $                            INFO )
+*
+                  END IF
+*
+               ELSE IF( WNTVAS ) THEN
+*
+*                 Path 6 (M much larger than N, JOBU='S', JOBVT='S'
+*                         or 'A')
+*                 N left singular vectors to be computed in U and
+*                 N right singular vectors to be computed in VT
+*
+                  IF( LWORK.GE.N*N+3*N ) THEN
+*
+*                    Sufficient workspace for a fast algorithm
+*
+                     IU = 1
+                     IF( LWORK.GE.WRKBL+LDA*N ) THEN
+*
+*                       WORK(IU) is LDA by N
+*
+                        LDWRKU = LDA
+                     ELSE
+*
+*                       WORK(IU) is N by N
+*
+                        LDWRKU = N
+                     END IF
+                     ITAU = IU + LDWRKU*N
+                     IWORK = ITAU + N
+*
+*                    Compute A=Q*R
+*                    (CWorkspace: need N*N+2*N, prefer N*N+N+N*NB)
+*                    (RWorkspace: 0)
+*
+                     CALL ZGEQRF( M, N, A, LDA, WORK( ITAU ),
+     $                            WORK( IWORK ), LWORK-IWORK+1, IERR )
+*
+*                    Copy R to WORK(IU), zeroing out below it
+*
+                     CALL ZLACPY( 'U', N, N, A, LDA, WORK( IU ),
+     $                            LDWRKU )
+                     CALL ZLASET( 'L', N-1, N-1, CZERO, CZERO,
+     $                            WORK( IU+1 ), LDWRKU )
+*
+*                    Generate Q in A
+*                    (CWorkspace: need N*N+2*N, prefer N*N+N+N*NB)
+*                    (RWorkspace: 0)
+*
+                     CALL ZUNGQR( M, N, N, A, LDA, WORK( ITAU ),
+     $                            WORK( IWORK ), LWORK-IWORK+1, IERR )
+                     IE = 1
+                     ITAUQ = ITAU
+                     ITAUP = ITAUQ + N
+                     IWORK = ITAUP + N
+*
+*                    Bidiagonalize R in WORK(IU), copying result to VT
+*                    (CWorkspace: need N*N+3*N, prefer N*N+2*N+2*N*NB)
+*                    (RWorkspace: need N)
+*
+                     CALL ZGEBRD( N, N, WORK( IU ), LDWRKU, S,
+     $                            RWORK( IE ), WORK( ITAUQ ),
+     $                            WORK( ITAUP ), WORK( IWORK ),
+     $                            LWORK-IWORK+1, IERR )
+                     CALL ZLACPY( 'U', N, N, WORK( IU ), LDWRKU, VT,
+     $                            LDVT )
+*
+*                    Generate left bidiagonalizing vectors in WORK(IU)
+*                    (CWorkspace: need N*N+3*N, prefer N*N+2*N+N*NB)
+*                    (RWorkspace: 0)
+*
+                     CALL ZUNGBR( 'Q', N, N, N, WORK( IU ), LDWRKU,
+     $                            WORK( ITAUQ ), WORK( IWORK ),
+     $                            LWORK-IWORK+1, IERR )
+*
+*                    Generate right bidiagonalizing vectors in VT
+*                    (CWorkspace: need   N*N+3*N-1,
+*                                 prefer N*N+2*N+(N-1)*NB)
+*                    (RWorkspace: 0)
+*
+                     CALL ZUNGBR( 'P', N, N, N, VT, LDVT, WORK( ITAUP ),
+     $                            WORK( IWORK ), LWORK-IWORK+1, IERR )
+                     IRWORK = IE + N
+*
+*                    Perform bidiagonal QR iteration, computing left
+*                    singular vectors of R in WORK(IU) and computing
+*                    right singular vectors of R in VT
+*                    (CWorkspace: need N*N)
+*                    (RWorkspace: need BDSPAC)
+*
+                     CALL ZBDSQR( 'U', N, N, N, 0, S, RWORK( IE ), VT,
+     $                            LDVT, WORK( IU ), LDWRKU, CDUM, 1,
+     $                            RWORK( IRWORK ), INFO )
+*
+*                    Multiply Q in A by left singular vectors of R in
+*                    WORK(IU), storing result in U
+*                    (CWorkspace: need N*N)
+*                    (RWorkspace: 0)
+*
+                     CALL ZGEMM( 'N', 'N', M, N, N, CONE, A, LDA,
+     $                           WORK( IU ), LDWRKU, CZERO, U, LDU )
+*
+                  ELSE
+*
+*                    Insufficient workspace for a fast algorithm
+*
+                     ITAU = 1
+                     IWORK = ITAU + N
+*
+*                    Compute A=Q*R, copying result to U
+*                    (CWorkspace: need 2*N, prefer N+N*NB)
+*                    (RWorkspace: 0)
+*
+                     CALL ZGEQRF( M, N, A, LDA, WORK( ITAU ),
+     $                            WORK( IWORK ), LWORK-IWORK+1, IERR )
+                     CALL ZLACPY( 'L', M, N, A, LDA, U, LDU )
+*
+*                    Generate Q in U
+*                    (CWorkspace: need 2*N, prefer N+N*NB)
+*                    (RWorkspace: 0)
+*
+                     CALL ZUNGQR( M, N, N, U, LDU, WORK( ITAU ),
+     $                            WORK( IWORK ), LWORK-IWORK+1, IERR )
+*
+*                    Copy R to VT, zeroing out below it
+*
+                     CALL ZLACPY( 'U', N, N, A, LDA, VT, LDVT )
+                     IF( N.GT.1 )
+     $                  CALL ZLASET( 'L', N-1, N-1, CZERO, CZERO,
+     $                               VT( 2, 1 ), LDVT )
+                     IE = 1
+                     ITAUQ = ITAU
+                     ITAUP = ITAUQ + N
+                     IWORK = ITAUP + N
+*
+*                    Bidiagonalize R in VT
+*                    (CWorkspace: need 3*N, prefer 2*N+2*N*NB)
+*                    (RWorkspace: need N)
+*
+                     CALL ZGEBRD( N, N, VT, LDVT, S, RWORK( IE ),
+     $                            WORK( ITAUQ ), WORK( ITAUP ),
+     $                            WORK( IWORK ), LWORK-IWORK+1, IERR )
+*
+*                    Multiply Q in U by left bidiagonalizing vectors
+*                    in VT
+*                    (CWorkspace: need 2*N+M, prefer 2*N+M*NB)
+*                    (RWorkspace: 0)
+*
+                     CALL ZUNMBR( 'Q', 'R', 'N', M, N, N, VT, LDVT,
+     $                            WORK( ITAUQ ), U, LDU, WORK( IWORK ),
+     $                            LWORK-IWORK+1, IERR )
+*
+*                    Generate right bidiagonalizing vectors in VT
+*                    (CWorkspace: need 3*N-1, prefer 2*N+(N-1)*NB)
+*                    (RWorkspace: 0)
+*
+                     CALL ZUNGBR( 'P', N, N, N, VT, LDVT, WORK( ITAUP ),
+     $                            WORK( IWORK ), LWORK-IWORK+1, IERR )
+                     IRWORK = IE + N
+*
+*                    Perform bidiagonal QR iteration, computing left
+*                    singular vectors of A in U and computing right
+*                    singular vectors of A in VT
+*                    (CWorkspace: 0)
+*                    (RWorkspace: need BDSPAC)
+*
+                     CALL ZBDSQR( 'U', N, N, M, 0, S, RWORK( IE ), VT,
+     $                            LDVT, U, LDU, CDUM, 1,
+     $                            RWORK( IRWORK ), INFO )
+*
+                  END IF
+*
+               END IF
+*
+            ELSE IF( WNTUA ) THEN
+*
+               IF( WNTVN ) THEN
+*
+*                 Path 7 (M much larger than N, JOBU='A', JOBVT='N')
+*                 M left singular vectors to be computed in U and
+*                 no right singular vectors to be computed
+*
+                  IF( LWORK.GE.N*N+MAX( N+M, 3*N ) ) THEN
+*
+*                    Sufficient workspace for a fast algorithm
+*
+                     IR = 1
+                     IF( LWORK.GE.WRKBL+LDA*N ) THEN
+*
+*                       WORK(IR) is LDA by N
+*
+                        LDWRKR = LDA
+                     ELSE
+*
+*                       WORK(IR) is N by N
+*
+                        LDWRKR = N
+                     END IF
+                     ITAU = IR + LDWRKR*N
+                     IWORK = ITAU + N
+*
+*                    Compute A=Q*R, copying result to U
+*                    (CWorkspace: need N*N+2*N, prefer N*N+N+N*NB)
+*                    (RWorkspace: 0)
+*
+                     CALL ZGEQRF( M, N, A, LDA, WORK( ITAU ),
+     $                            WORK( IWORK ), LWORK-IWORK+1, IERR )
+                     CALL ZLACPY( 'L', M, N, A, LDA, U, LDU )
+*
+*                    Copy R to WORK(IR), zeroing out below it
+*
+                     CALL ZLACPY( 'U', N, N, A, LDA, WORK( IR ),
+     $                            LDWRKR )
+                     CALL ZLASET( 'L', N-1, N-1, CZERO, CZERO,
+     $                            WORK( IR+1 ), LDWRKR )
+*
+*                    Generate Q in U
+*                    (CWorkspace: need N*N+N+M, prefer N*N+N+M*NB)
+*                    (RWorkspace: 0)
+*
+                     CALL ZUNGQR( M, M, N, U, LDU, WORK( ITAU ),
+     $                            WORK( IWORK ), LWORK-IWORK+1, IERR )
+                     IE = 1
+                     ITAUQ = ITAU
+                     ITAUP = ITAUQ + N
+                     IWORK = ITAUP + N
+*
+*                    Bidiagonalize R in WORK(IR)
+*                    (CWorkspace: need N*N+3*N, prefer N*N+2*N+2*N*NB)
+*                    (RWorkspace: need N)
+*
+                     CALL ZGEBRD( N, N, WORK( IR ), LDWRKR, S,
+     $                            RWORK( IE ), WORK( ITAUQ ),
+     $                            WORK( ITAUP ), WORK( IWORK ),
+     $                            LWORK-IWORK+1, IERR )
+*
+*                    Generate left bidiagonalizing vectors in WORK(IR)
+*                    (CWorkspace: need N*N+3*N, prefer N*N+2*N+N*NB)
+*                    (RWorkspace: 0)
+*
+                     CALL ZUNGBR( 'Q', N, N, N, WORK( IR ), LDWRKR,
+     $                            WORK( ITAUQ ), WORK( IWORK ),
+     $                            LWORK-IWORK+1, IERR )
+                     IRWORK = IE + N
+*
+*                    Perform bidiagonal QR iteration, computing left
+*                    singular vectors of R in WORK(IR)
+*                    (CWorkspace: need N*N)
+*                    (RWorkspace: need BDSPAC)
+*
+                     CALL ZBDSQR( 'U', N, 0, N, 0, S, RWORK( IE ), CDUM,
+     $                            1, WORK( IR ), LDWRKR, CDUM, 1,
+     $                            RWORK( IRWORK ), INFO )
+*
+*                    Multiply Q in U by left singular vectors of R in
+*                    WORK(IR), storing result in A
+*                    (CWorkspace: need N*N)
+*                    (RWorkspace: 0)
+*
+                     CALL ZGEMM( 'N', 'N', M, N, N, CONE, U, LDU,
+     $                           WORK( IR ), LDWRKR, CZERO, A, LDA )
+*
+*                    Copy left singular vectors of A from A to U
+*
+                     CALL ZLACPY( 'F', M, N, A, LDA, U, LDU )
+*
+                  ELSE
+*
+*                    Insufficient workspace for a fast algorithm
+*
+                     ITAU = 1
+                     IWORK = ITAU + N
+*
+*                    Compute A=Q*R, copying result to U
+*                    (CWorkspace: need 2*N, prefer N+N*NB)
+*                    (RWorkspace: 0)
+*
+                     CALL ZGEQRF( M, N, A, LDA, WORK( ITAU ),
+     $                            WORK( IWORK ), LWORK-IWORK+1, IERR )
+                     CALL ZLACPY( 'L', M, N, A, LDA, U, LDU )
+*
+*                    Generate Q in U
+*                    (CWorkspace: need N+M, prefer N+M*NB)
+*                    (RWorkspace: 0)
+*
+                     CALL ZUNGQR( M, M, N, U, LDU, WORK( ITAU ),
+     $                            WORK( IWORK ), LWORK-IWORK+1, IERR )
+                     IE = 1
+                     ITAUQ = ITAU
+                     ITAUP = ITAUQ + N
+                     IWORK = ITAUP + N
+*
+*                    Zero out below R in A
+*
+                     IF( N .GT. 1 ) THEN
+                        CALL ZLASET( 'L', N-1, N-1, CZERO, CZERO,
+     $                               A( 2, 1 ), LDA )
+                     END IF
+*
+*                    Bidiagonalize R in A
+*                    (CWorkspace: need 3*N, prefer 2*N+2*N*NB)
+*                    (RWorkspace: need N)
+*
+                     CALL ZGEBRD( N, N, A, LDA, S, RWORK( IE ),
+     $                            WORK( ITAUQ ), WORK( ITAUP ),
+     $                            WORK( IWORK ), LWORK-IWORK+1, IERR )
+*
+*                    Multiply Q in U by left bidiagonalizing vectors
+*                    in A
+*                    (CWorkspace: need 2*N+M, prefer 2*N+M*NB)
+*                    (RWorkspace: 0)
+*
+                     CALL ZUNMBR( 'Q', 'R', 'N', M, N, N, A, LDA,
+     $                            WORK( ITAUQ ), U, LDU, WORK( IWORK ),
+     $                            LWORK-IWORK+1, IERR )
+                     IRWORK = IE + N
+*
+*                    Perform bidiagonal QR iteration, computing left
+*                    singular vectors of A in U
+*                    (CWorkspace: 0)
+*                    (RWorkspace: need BDSPAC)
+*
+                     CALL ZBDSQR( 'U', N, 0, M, 0, S, RWORK( IE ), CDUM,
+     $                            1, U, LDU, CDUM, 1, RWORK( IRWORK ),
+     $                            INFO )
+*
+                  END IF
+*
+               ELSE IF( WNTVO ) THEN
+*
+*                 Path 8 (M much larger than N, JOBU='A', JOBVT='O')
+*                 M left singular vectors to be computed in U and
+*                 N right singular vectors to be overwritten on A
+*
+                  IF( LWORK.GE.2*N*N+MAX( N+M, 3*N ) ) THEN
+*
+*                    Sufficient workspace for a fast algorithm
+*
+                     IU = 1
+                     IF( LWORK.GE.WRKBL+2*LDA*N ) THEN
+*
+*                       WORK(IU) is LDA by N and WORK(IR) is LDA by N
+*
+                        LDWRKU = LDA
+                        IR = IU + LDWRKU*N
+                        LDWRKR = LDA
+                     ELSE IF( LWORK.GE.WRKBL+( LDA+N )*N ) THEN
+*
+*                       WORK(IU) is LDA by N and WORK(IR) is N by N
+*
+                        LDWRKU = LDA
+                        IR = IU + LDWRKU*N
+                        LDWRKR = N
+                     ELSE
+*
+*                       WORK(IU) is N by N and WORK(IR) is N by N
+*
+                        LDWRKU = N
+                        IR = IU + LDWRKU*N
+                        LDWRKR = N
+                     END IF
+                     ITAU = IR + LDWRKR*N
+                     IWORK = ITAU + N
+*
+*                    Compute A=Q*R, copying result to U
+*                    (CWorkspace: need 2*N*N+2*N, prefer 2*N*N+N+N*NB)
+*                    (RWorkspace: 0)
+*
+                     CALL ZGEQRF( M, N, A, LDA, WORK( ITAU ),
+     $                            WORK( IWORK ), LWORK-IWORK+1, IERR )
+                     CALL ZLACPY( 'L', M, N, A, LDA, U, LDU )
+*
+*                    Generate Q in U
+*                    (CWorkspace: need 2*N*N+N+M, prefer 2*N*N+N+M*NB)
+*                    (RWorkspace: 0)
+*
+                     CALL ZUNGQR( M, M, N, U, LDU, WORK( ITAU ),
+     $                            WORK( IWORK ), LWORK-IWORK+1, IERR )
+*
+*                    Copy R to WORK(IU), zeroing out below it
+*
+                     CALL ZLACPY( 'U', N, N, A, LDA, WORK( IU ),
+     $                            LDWRKU )
+                     CALL ZLASET( 'L', N-1, N-1, CZERO, CZERO,
+     $                            WORK( IU+1 ), LDWRKU )
+                     IE = 1
+                     ITAUQ = ITAU
+                     ITAUP = ITAUQ + N
+                     IWORK = ITAUP + N
+*
+*                    Bidiagonalize R in WORK(IU), copying result to
+*                    WORK(IR)
+*                    (CWorkspace: need   2*N*N+3*N,
+*                                 prefer 2*N*N+2*N+2*N*NB)
+*                    (RWorkspace: need   N)
+*
+                     CALL ZGEBRD( N, N, WORK( IU ), LDWRKU, S,
+     $                            RWORK( IE ), WORK( ITAUQ ),
+     $                            WORK( ITAUP ), WORK( IWORK ),
+     $                            LWORK-IWORK+1, IERR )
+                     CALL ZLACPY( 'U', N, N, WORK( IU ), LDWRKU,
+     $                            WORK( IR ), LDWRKR )
+*
+*                    Generate left bidiagonalizing vectors in WORK(IU)
+*                    (CWorkspace: need 2*N*N+3*N, prefer 2*N*N+2*N+N*NB)
+*                    (RWorkspace: 0)
+*
+                     CALL ZUNGBR( 'Q', N, N, N, WORK( IU ), LDWRKU,
+     $                            WORK( ITAUQ ), WORK( IWORK ),
+     $                            LWORK-IWORK+1, IERR )
+*
+*                    Generate right bidiagonalizing vectors in WORK(IR)
+*                    (CWorkspace: need   2*N*N+3*N-1,
+*                                 prefer 2*N*N+2*N+(N-1)*NB)
+*                    (RWorkspace: 0)
+*
+                     CALL ZUNGBR( 'P', N, N, N, WORK( IR ), LDWRKR,
+     $                            WORK( ITAUP ), WORK( IWORK ),
+     $                            LWORK-IWORK+1, IERR )
+                     IRWORK = IE + N
+*
+*                    Perform bidiagonal QR iteration, computing left
+*                    singular vectors of R in WORK(IU) and computing
+*                    right singular vectors of R in WORK(IR)
+*                    (CWorkspace: need 2*N*N)
+*                    (RWorkspace: need BDSPAC)
+*
+                     CALL ZBDSQR( 'U', N, N, N, 0, S, RWORK( IE ),
+     $                            WORK( IR ), LDWRKR, WORK( IU ),
+     $                            LDWRKU, CDUM, 1, RWORK( IRWORK ),
+     $                            INFO )
+*
+*                    Multiply Q in U by left singular vectors of R in
+*                    WORK(IU), storing result in A
+*                    (CWorkspace: need N*N)
+*                    (RWorkspace: 0)
+*
+                     CALL ZGEMM( 'N', 'N', M, N, N, CONE, U, LDU,
+     $                           WORK( IU ), LDWRKU, CZERO, A, LDA )
+*
+*                    Copy left singular vectors of A from A to U
+*
+                     CALL ZLACPY( 'F', M, N, A, LDA, U, LDU )
+*
+*                    Copy right singular vectors of R from WORK(IR) to A
+*
+                     CALL ZLACPY( 'F', N, N, WORK( IR ), LDWRKR, A,
+     $                            LDA )
+*
+                  ELSE
+*
+*                    Insufficient workspace for a fast algorithm
+*
+                     ITAU = 1
+                     IWORK = ITAU + N
+*
+*                    Compute A=Q*R, copying result to U
+*                    (CWorkspace: need 2*N, prefer N+N*NB)
+*                    (RWorkspace: 0)
+*
+                     CALL ZGEQRF( M, N, A, LDA, WORK( ITAU ),
+     $                            WORK( IWORK ), LWORK-IWORK+1, IERR )
+                     CALL ZLACPY( 'L', M, N, A, LDA, U, LDU )
+*
+*                    Generate Q in U
+*                    (CWorkspace: need N+M, prefer N+M*NB)
+*                    (RWorkspace: 0)
+*
+                     CALL ZUNGQR( M, M, N, U, LDU, WORK( ITAU ),
+     $                            WORK( IWORK ), LWORK-IWORK+1, IERR )
+                     IE = 1
+                     ITAUQ = ITAU
+                     ITAUP = ITAUQ + N
+                     IWORK = ITAUP + N
+*
+*                    Zero out below R in A
+*
+                     IF( N .GT. 1 ) THEN
+                        CALL ZLASET( 'L', N-1, N-1, CZERO, CZERO,
+     $                               A( 2, 1 ), LDA )
+                     END IF
+*
+*                    Bidiagonalize R in A
+*                    (CWorkspace: need 3*N, prefer 2*N+2*N*NB)
+*                    (RWorkspace: need N)
+*
+                     CALL ZGEBRD( N, N, A, LDA, S, RWORK( IE ),
+     $                            WORK( ITAUQ ), WORK( ITAUP ),
+     $                            WORK( IWORK ), LWORK-IWORK+1, IERR )
+*
+*                    Multiply Q in U by left bidiagonalizing vectors
+*                    in A
+*                    (CWorkspace: need 2*N+M, prefer 2*N+M*NB)
+*                    (RWorkspace: 0)
+*
+                     CALL ZUNMBR( 'Q', 'R', 'N', M, N, N, A, LDA,
+     $                            WORK( ITAUQ ), U, LDU, WORK( IWORK ),
+     $                            LWORK-IWORK+1, IERR )
+*
+*                    Generate right bidiagonalizing vectors in A
+*                    (CWorkspace: need 3*N-1, prefer 2*N+(N-1)*NB)
+*                    (RWorkspace: 0)
+*
+                     CALL ZUNGBR( 'P', N, N, N, A, LDA, WORK( ITAUP ),
+     $                            WORK( IWORK ), LWORK-IWORK+1, IERR )
+                     IRWORK = IE + N
+*
+*                    Perform bidiagonal QR iteration, computing left
+*                    singular vectors of A in U and computing right
+*                    singular vectors of A in A
+*                    (CWorkspace: 0)
+*                    (RWorkspace: need BDSPAC)
+*
+                     CALL ZBDSQR( 'U', N, N, M, 0, S, RWORK( IE ), A,
+     $                            LDA, U, LDU, CDUM, 1, RWORK( IRWORK ),
+     $                            INFO )
+*
+                  END IF
+*
+               ELSE IF( WNTVAS ) THEN
+*
+*                 Path 9 (M much larger than N, JOBU='A', JOBVT='S'
+*                         or 'A')
+*                 M left singular vectors to be computed in U and
+*                 N right singular vectors to be computed in VT
+*
+                  IF( LWORK.GE.N*N+MAX( N+M, 3*N ) ) THEN
+*
+*                    Sufficient workspace for a fast algorithm
+*
+                     IU = 1
+                     IF( LWORK.GE.WRKBL+LDA*N ) THEN
+*
+*                       WORK(IU) is LDA by N
+*
+                        LDWRKU = LDA
+                     ELSE
+*
+*                       WORK(IU) is N by N
+*
+                        LDWRKU = N
+                     END IF
+                     ITAU = IU + LDWRKU*N
+                     IWORK = ITAU + N
+*
+*                    Compute A=Q*R, copying result to U
+*                    (CWorkspace: need N*N+2*N, prefer N*N+N+N*NB)
+*                    (RWorkspace: 0)
+*
+                     CALL ZGEQRF( M, N, A, LDA, WORK( ITAU ),
+     $                            WORK( IWORK ), LWORK-IWORK+1, IERR )
+                     CALL ZLACPY( 'L', M, N, A, LDA, U, LDU )
+*
+*                    Generate Q in U
+*                    (CWorkspace: need N*N+N+M, prefer N*N+N+M*NB)
+*                    (RWorkspace: 0)
+*
+                     CALL ZUNGQR( M, M, N, U, LDU, WORK( ITAU ),
+     $                            WORK( IWORK ), LWORK-IWORK+1, IERR )
+*
+*                    Copy R to WORK(IU), zeroing out below it
+*
+                     CALL ZLACPY( 'U', N, N, A, LDA, WORK( IU ),
+     $                            LDWRKU )
+                     CALL ZLASET( 'L', N-1, N-1, CZERO, CZERO,
+     $                            WORK( IU+1 ), LDWRKU )
+                     IE = 1
+                     ITAUQ = ITAU
+                     ITAUP = ITAUQ + N
+                     IWORK = ITAUP + N
+*
+*                    Bidiagonalize R in WORK(IU), copying result to VT
+*                    (CWorkspace: need N*N+3*N, prefer N*N+2*N+2*N*NB)
+*                    (RWorkspace: need N)
+*
+                     CALL ZGEBRD( N, N, WORK( IU ), LDWRKU, S,
+     $                            RWORK( IE ), WORK( ITAUQ ),
+     $                            WORK( ITAUP ), WORK( IWORK ),
+     $                            LWORK-IWORK+1, IERR )
+                     CALL ZLACPY( 'U', N, N, WORK( IU ), LDWRKU, VT,
+     $                            LDVT )
+*
+*                    Generate left bidiagonalizing vectors in WORK(IU)
+*                    (CWorkspace: need N*N+3*N, prefer N*N+2*N+N*NB)
+*                    (RWorkspace: 0)
+*
+                     CALL ZUNGBR( 'Q', N, N, N, WORK( IU ), LDWRKU,
+     $                            WORK( ITAUQ ), WORK( IWORK ),
+     $                            LWORK-IWORK+1, IERR )
+*
+*                    Generate right bidiagonalizing vectors in VT
+*                    (CWorkspace: need   N*N+3*N-1,
+*                                 prefer N*N+2*N+(N-1)*NB)
+*                    (RWorkspace: need   0)
+*
+                     CALL ZUNGBR( 'P', N, N, N, VT, LDVT, WORK( ITAUP ),
+     $                            WORK( IWORK ), LWORK-IWORK+1, IERR )
+                     IRWORK = IE + N
+*
+*                    Perform bidiagonal QR iteration, computing left
+*                    singular vectors of R in WORK(IU) and computing
+*                    right singular vectors of R in VT
+*                    (CWorkspace: need N*N)
+*                    (RWorkspace: need BDSPAC)
+*
+                     CALL ZBDSQR( 'U', N, N, N, 0, S, RWORK( IE ), VT,
+     $                            LDVT, WORK( IU ), LDWRKU, CDUM, 1,
+     $                            RWORK( IRWORK ), INFO )
+*
+*                    Multiply Q in U by left singular vectors of R in
+*                    WORK(IU), storing result in A
+*                    (CWorkspace: need N*N)
+*                    (RWorkspace: 0)
+*
+                     CALL ZGEMM( 'N', 'N', M, N, N, CONE, U, LDU,
+     $                           WORK( IU ), LDWRKU, CZERO, A, LDA )
+*
+*                    Copy left singular vectors of A from A to U
+*
+                     CALL ZLACPY( 'F', M, N, A, LDA, U, LDU )
+*
+                  ELSE
+*
+*                    Insufficient workspace for a fast algorithm
+*
+                     ITAU = 1
+                     IWORK = ITAU + N
+*
+*                    Compute A=Q*R, copying result to U
+*                    (CWorkspace: need 2*N, prefer N+N*NB)
+*                    (RWorkspace: 0)
+*
+                     CALL ZGEQRF( M, N, A, LDA, WORK( ITAU ),
+     $                            WORK( IWORK ), LWORK-IWORK+1, IERR )
+                     CALL ZLACPY( 'L', M, N, A, LDA, U, LDU )
+*
+*                    Generate Q in U
+*                    (CWorkspace: need N+M, prefer N+M*NB)
+*                    (RWorkspace: 0)
+*
+                     CALL ZUNGQR( M, M, N, U, LDU, WORK( ITAU ),
+     $                            WORK( IWORK ), LWORK-IWORK+1, IERR )
+*
+*                    Copy R from A to VT, zeroing out below it
+*
+                     CALL ZLACPY( 'U', N, N, A, LDA, VT, LDVT )
+                     IF( N.GT.1 )
+     $                  CALL ZLASET( 'L', N-1, N-1, CZERO, CZERO,
+     $                               VT( 2, 1 ), LDVT )
+                     IE = 1
+                     ITAUQ = ITAU
+                     ITAUP = ITAUQ + N
+                     IWORK = ITAUP + N
+*
+*                    Bidiagonalize R in VT
+*                    (CWorkspace: need 3*N, prefer 2*N+2*N*NB)
+*                    (RWorkspace: need N)
+*
+                     CALL ZGEBRD( N, N, VT, LDVT, S, RWORK( IE ),
+     $                            WORK( ITAUQ ), WORK( ITAUP ),
+     $                            WORK( IWORK ), LWORK-IWORK+1, IERR )
+*
+*                    Multiply Q in U by left bidiagonalizing vectors
+*                    in VT
+*                    (CWorkspace: need 2*N+M, prefer 2*N+M*NB)
+*                    (RWorkspace: 0)
+*
+                     CALL ZUNMBR( 'Q', 'R', 'N', M, N, N, VT, LDVT,
+     $                            WORK( ITAUQ ), U, LDU, WORK( IWORK ),
+     $                            LWORK-IWORK+1, IERR )
+*
+*                    Generate right bidiagonalizing vectors in VT
+*                    (CWorkspace: need 3*N-1, prefer 2*N+(N-1)*NB)
+*                    (RWorkspace: 0)
+*
+                     CALL ZUNGBR( 'P', N, N, N, VT, LDVT, WORK( ITAUP ),
+     $                            WORK( IWORK ), LWORK-IWORK+1, IERR )
+                     IRWORK = IE + N
+*
+*                    Perform bidiagonal QR iteration, computing left
+*                    singular vectors of A in U and computing right
+*                    singular vectors of A in VT
+*                    (CWorkspace: 0)
+*                    (RWorkspace: need BDSPAC)
+*
+                     CALL ZBDSQR( 'U', N, N, M, 0, S, RWORK( IE ), VT,
+     $                            LDVT, U, LDU, CDUM, 1,
+     $                            RWORK( IRWORK ), INFO )
+*
+                  END IF
+*
+               END IF
+*
+            END IF
+*
+         ELSE
+*
+*           M .LT. MNTHR
+*
+*           Path 10 (M at least N, but not much larger)
+*           Reduce to bidiagonal form without QR decomposition
+*
+            IE = 1
+            ITAUQ = 1
+            ITAUP = ITAUQ + N
+            IWORK = ITAUP + N
+*
+*           Bidiagonalize A
+*           (CWorkspace: need 2*N+M, prefer 2*N+(M+N)*NB)
+*           (RWorkspace: need N)
+*
+            CALL ZGEBRD( M, N, A, LDA, S, RWORK( IE ), WORK( ITAUQ ),
+     $                   WORK( ITAUP ), WORK( IWORK ), LWORK-IWORK+1,
+     $                   IERR )
+            IF( WNTUAS ) THEN
+*
+*              If left singular vectors desired in U, copy result to U
+*              and generate left bidiagonalizing vectors in U
+*              (CWorkspace: need 2*N+NCU, prefer 2*N+NCU*NB)
+*              (RWorkspace: 0)
+*
+               CALL ZLACPY( 'L', M, N, A, LDA, U, LDU )
+               IF( WNTUS )
+     $            NCU = N
+               IF( WNTUA )
+     $            NCU = M
+               CALL ZUNGBR( 'Q', M, NCU, N, U, LDU, WORK( ITAUQ ),
+     $                      WORK( IWORK ), LWORK-IWORK+1, IERR )
+            END IF
+            IF( WNTVAS ) THEN
+*
+*              If right singular vectors desired in VT, copy result to
+*              VT and generate right bidiagonalizing vectors in VT
+*              (CWorkspace: need 3*N-1, prefer 2*N+(N-1)*NB)
+*              (RWorkspace: 0)
+*
+               CALL ZLACPY( 'U', N, N, A, LDA, VT, LDVT )
+               CALL ZUNGBR( 'P', N, N, N, VT, LDVT, WORK( ITAUP ),
+     $                      WORK( IWORK ), LWORK-IWORK+1, IERR )
+            END IF
+            IF( WNTUO ) THEN
+*
+*              If left singular vectors desired in A, generate left
+*              bidiagonalizing vectors in A
+*              (CWorkspace: need 3*N, prefer 2*N+N*NB)
+*              (RWorkspace: 0)
+*
+               CALL ZUNGBR( 'Q', M, N, N, A, LDA, WORK( ITAUQ ),
+     $                      WORK( IWORK ), LWORK-IWORK+1, IERR )
+            END IF
+            IF( WNTVO ) THEN
+*
+*              If right singular vectors desired in A, generate right
+*              bidiagonalizing vectors in A
+*              (CWorkspace: need 3*N-1, prefer 2*N+(N-1)*NB)
+*              (RWorkspace: 0)
+*
+               CALL ZUNGBR( 'P', N, N, N, A, LDA, WORK( ITAUP ),
+     $                      WORK( IWORK ), LWORK-IWORK+1, IERR )
+            END IF
+            IRWORK = IE + N
+            IF( WNTUAS .OR. WNTUO )
+     $         NRU = M
+            IF( WNTUN )
+     $         NRU = 0
+            IF( WNTVAS .OR. WNTVO )
+     $         NCVT = N
+            IF( WNTVN )
+     $         NCVT = 0
+            IF( ( .NOT.WNTUO ) .AND. ( .NOT.WNTVO ) ) THEN
+*
+*              Perform bidiagonal QR iteration, if desired, computing
+*              left singular vectors in U and computing right singular
+*              vectors in VT
+*              (CWorkspace: 0)
+*              (RWorkspace: need BDSPAC)
+*
+               CALL ZBDSQR( 'U', N, NCVT, NRU, 0, S, RWORK( IE ), VT,
+     $                      LDVT, U, LDU, CDUM, 1, RWORK( IRWORK ),
+     $                      INFO )
+            ELSE IF( ( .NOT.WNTUO ) .AND. WNTVO ) THEN
+*
+*              Perform bidiagonal QR iteration, if desired, computing
+*              left singular vectors in U and computing right singular
+*              vectors in A
+*              (CWorkspace: 0)
+*              (RWorkspace: need BDSPAC)
+*
+               CALL ZBDSQR( 'U', N, NCVT, NRU, 0, S, RWORK( IE ), A,
+     $                      LDA, U, LDU, CDUM, 1, RWORK( IRWORK ),
+     $                      INFO )
+            ELSE
+*
+*              Perform bidiagonal QR iteration, if desired, computing
+*              left singular vectors in A and computing right singular
+*              vectors in VT
+*              (CWorkspace: 0)
+*              (RWorkspace: need BDSPAC)
+*
+               CALL ZBDSQR( 'U', N, NCVT, NRU, 0, S, RWORK( IE ), VT,
+     $                      LDVT, A, LDA, CDUM, 1, RWORK( IRWORK ),
+     $                      INFO )
+            END IF
+*
+         END IF
+*
+      ELSE
+*
+*        A has more columns than rows. If A has sufficiently more
+*        columns than rows, first reduce using the LQ decomposition (if
+*        sufficient workspace available)
+*
+         IF( N.GE.MNTHR ) THEN
+*
+            IF( WNTVN ) THEN
+*
+*              Path 1t(N much larger than M, JOBVT='N')
+*              No right singular vectors to be computed
+*
+               ITAU = 1
+               IWORK = ITAU + M
+*
+*              Compute A=L*Q
+*              (CWorkspace: need 2*M, prefer M+M*NB)
+*              (RWorkspace: 0)
+*
+               CALL ZGELQF( M, N, A, LDA, WORK( ITAU ), WORK( IWORK ),
+     $                      LWORK-IWORK+1, IERR )
+*
+*              Zero out above L
+*
+               CALL ZLASET( 'U', M-1, M-1, CZERO, CZERO, A( 1, 2 ),
+     $                      LDA )
+               IE = 1
+               ITAUQ = 1
+               ITAUP = ITAUQ + M
+               IWORK = ITAUP + M
+*
+*              Bidiagonalize L in A
+*              (CWorkspace: need 3*M, prefer 2*M+2*M*NB)
+*              (RWorkspace: need M)
+*
+               CALL ZGEBRD( M, M, A, LDA, S, RWORK( IE ), WORK( ITAUQ ),
+     $                      WORK( ITAUP ), WORK( IWORK ), LWORK-IWORK+1,
+     $                      IERR )
+               IF( WNTUO .OR. WNTUAS ) THEN
+*
+*                 If left singular vectors desired, generate Q
+*                 (CWorkspace: need 3*M, prefer 2*M+M*NB)
+*                 (RWorkspace: 0)
+*
+                  CALL ZUNGBR( 'Q', M, M, M, A, LDA, WORK( ITAUQ ),
+     $                         WORK( IWORK ), LWORK-IWORK+1, IERR )
+               END IF
+               IRWORK = IE + M
+               NRU = 0
+               IF( WNTUO .OR. WNTUAS )
+     $            NRU = M
+*
+*              Perform bidiagonal QR iteration, computing left singular
+*              vectors of A in A if desired
+*              (CWorkspace: 0)
+*              (RWorkspace: need BDSPAC)
+*
+               CALL ZBDSQR( 'U', M, 0, NRU, 0, S, RWORK( IE ), CDUM, 1,
+     $                      A, LDA, CDUM, 1, RWORK( IRWORK ), INFO )
+*
+*              If left singular vectors desired in U, copy them there
+*
+               IF( WNTUAS )
+     $            CALL ZLACPY( 'F', M, M, A, LDA, U, LDU )
+*
+            ELSE IF( WNTVO .AND. WNTUN ) THEN
+*
+*              Path 2t(N much larger than M, JOBU='N', JOBVT='O')
+*              M right singular vectors to be overwritten on A and
+*              no left singular vectors to be computed
+*
+               IF( LWORK.GE.M*M+3*M ) THEN
+*
+*                 Sufficient workspace for a fast algorithm
+*
+                  IR = 1
+                  IF( LWORK.GE.MAX( WRKBL, LDA*N )+LDA*M ) THEN
+*
+*                    WORK(IU) is LDA by N and WORK(IR) is LDA by M
+*
+                     LDWRKU = LDA
+                     CHUNK = N
+                     LDWRKR = LDA
+                  ELSE IF( LWORK.GE.MAX( WRKBL, LDA*N )+M*M ) THEN
+*
+*                    WORK(IU) is LDA by N and WORK(IR) is M by M
+*
+                     LDWRKU = LDA
+                     CHUNK = N
+                     LDWRKR = M
+                  ELSE
+*
+*                    WORK(IU) is M by CHUNK and WORK(IR) is M by M
+*
+                     LDWRKU = M
+                     CHUNK = ( LWORK-M*M ) / M
+                     LDWRKR = M
+                  END IF
+                  ITAU = IR + LDWRKR*M
+                  IWORK = ITAU + M
+*
+*                 Compute A=L*Q
+*                 (CWorkspace: need M*M+2*M, prefer M*M+M+M*NB)
+*                 (RWorkspace: 0)
+*
+                  CALL ZGELQF( M, N, A, LDA, WORK( ITAU ),
+     $                         WORK( IWORK ), LWORK-IWORK+1, IERR )
+*
+*                 Copy L to WORK(IR) and zero out above it
+*
+                  CALL ZLACPY( 'L', M, M, A, LDA, WORK( IR ), LDWRKR )
+                  CALL ZLASET( 'U', M-1, M-1, CZERO, CZERO,
+     $                         WORK( IR+LDWRKR ), LDWRKR )
+*
+*                 Generate Q in A
+*                 (CWorkspace: need M*M+2*M, prefer M*M+M+M*NB)
+*                 (RWorkspace: 0)
+*
+                  CALL ZUNGLQ( M, N, M, A, LDA, WORK( ITAU ),
+     $                         WORK( IWORK ), LWORK-IWORK+1, IERR )
+                  IE = 1
+                  ITAUQ = ITAU
+                  ITAUP = ITAUQ + M
+                  IWORK = ITAUP + M
+*
+*                 Bidiagonalize L in WORK(IR)
+*                 (CWorkspace: need M*M+3*M, prefer M*M+2*M+2*M*NB)
+*                 (RWorkspace: need M)
+*
+                  CALL ZGEBRD( M, M, WORK( IR ), LDWRKR, S, RWORK( IE ),
+     $                         WORK( ITAUQ ), WORK( ITAUP ),
+     $                         WORK( IWORK ), LWORK-IWORK+1, IERR )
+*
+*                 Generate right vectors bidiagonalizing L
+*                 (CWorkspace: need M*M+3*M-1, prefer M*M+2*M+(M-1)*NB)
+*                 (RWorkspace: 0)
+*
+                  CALL ZUNGBR( 'P', M, M, M, WORK( IR ), LDWRKR,
+     $                         WORK( ITAUP ), WORK( IWORK ),
+     $                         LWORK-IWORK+1, IERR )
+                  IRWORK = IE + M
+*
+*                 Perform bidiagonal QR iteration, computing right
+*                 singular vectors of L in WORK(IR)
+*                 (CWorkspace: need M*M)
+*                 (RWorkspace: need BDSPAC)
+*
+                  CALL ZBDSQR( 'U', M, M, 0, 0, S, RWORK( IE ),
+     $                         WORK( IR ), LDWRKR, CDUM, 1, CDUM, 1,
+     $                         RWORK( IRWORK ), INFO )
+                  IU = ITAUQ
+*
+*                 Multiply right singular vectors of L in WORK(IR) by Q
+*                 in A, storing result in WORK(IU) and copying to A
+*                 (CWorkspace: need M*M+M, prefer M*M+M*N)
+*                 (RWorkspace: 0)
+*
+                  DO 30 I = 1, N, CHUNK
+                     BLK = MIN( N-I+1, CHUNK )
+                     CALL ZGEMM( 'N', 'N', M, BLK, M, CONE, WORK( IR ),
+     $                           LDWRKR, A( 1, I ), LDA, CZERO,
+     $                           WORK( IU ), LDWRKU )
+                     CALL ZLACPY( 'F', M, BLK, WORK( IU ), LDWRKU,
+     $                            A( 1, I ), LDA )
+   30             CONTINUE
+*
+               ELSE
+*
+*                 Insufficient workspace for a fast algorithm
+*
+                  IE = 1
+                  ITAUQ = 1
+                  ITAUP = ITAUQ + M
+                  IWORK = ITAUP + M
+*
+*                 Bidiagonalize A
+*                 (CWorkspace: need 2*M+N, prefer 2*M+(M+N)*NB)
+*                 (RWorkspace: need M)
+*
+                  CALL ZGEBRD( M, N, A, LDA, S, RWORK( IE ),
+     $                         WORK( ITAUQ ), WORK( ITAUP ),
+     $                         WORK( IWORK ), LWORK-IWORK+1, IERR )
+*
+*                 Generate right vectors bidiagonalizing A
+*                 (CWorkspace: need 3*M, prefer 2*M+M*NB)
+*                 (RWorkspace: 0)
+*
+                  CALL ZUNGBR( 'P', M, N, M, A, LDA, WORK( ITAUP ),
+     $                         WORK( IWORK ), LWORK-IWORK+1, IERR )
+                  IRWORK = IE + M
+*
+*                 Perform bidiagonal QR iteration, computing right
+*                 singular vectors of A in A
+*                 (CWorkspace: 0)
+*                 (RWorkspace: need BDSPAC)
+*
+                  CALL ZBDSQR( 'L', M, N, 0, 0, S, RWORK( IE ), A, LDA,
+     $                         CDUM, 1, CDUM, 1, RWORK( IRWORK ), INFO )
+*
+               END IF
+*
+            ELSE IF( WNTVO .AND. WNTUAS ) THEN
+*
+*              Path 3t(N much larger than M, JOBU='S' or 'A', JOBVT='O')
+*              M right singular vectors to be overwritten on A and
+*              M left singular vectors to be computed in U
+*
+               IF( LWORK.GE.M*M+3*M ) THEN
+*
+*                 Sufficient workspace for a fast algorithm
+*
+                  IR = 1
+                  IF( LWORK.GE.MAX( WRKBL, LDA*N )+LDA*M ) THEN
+*
+*                    WORK(IU) is LDA by N and WORK(IR) is LDA by M
+*
+                     LDWRKU = LDA
+                     CHUNK = N
+                     LDWRKR = LDA
+                  ELSE IF( LWORK.GE.MAX( WRKBL, LDA*N )+M*M ) THEN
+*
+*                    WORK(IU) is LDA by N and WORK(IR) is M by M
+*
+                     LDWRKU = LDA
+                     CHUNK = N
+                     LDWRKR = M
+                  ELSE
+*
+*                    WORK(IU) is M by CHUNK and WORK(IR) is M by M
+*
+                     LDWRKU = M
+                     CHUNK = ( LWORK-M*M ) / M
+                     LDWRKR = M
+                  END IF
+                  ITAU = IR + LDWRKR*M
+                  IWORK = ITAU + M
+*
+*                 Compute A=L*Q
+*                 (CWorkspace: need M*M+2*M, prefer M*M+M+M*NB)
+*                 (RWorkspace: 0)
+*
+                  CALL ZGELQF( M, N, A, LDA, WORK( ITAU ),
+     $                         WORK( IWORK ), LWORK-IWORK+1, IERR )
+*
+*                 Copy L to U, zeroing about above it
+*
+                  CALL ZLACPY( 'L', M, M, A, LDA, U, LDU )
+                  CALL ZLASET( 'U', M-1, M-1, CZERO, CZERO, U( 1, 2 ),
+     $                         LDU )
+*
+*                 Generate Q in A
+*                 (CWorkspace: need M*M+2*M, prefer M*M+M+M*NB)
+*                 (RWorkspace: 0)
+*
+                  CALL ZUNGLQ( M, N, M, A, LDA, WORK( ITAU ),
+     $                         WORK( IWORK ), LWORK-IWORK+1, IERR )
+                  IE = 1
+                  ITAUQ = ITAU
+                  ITAUP = ITAUQ + M
+                  IWORK = ITAUP + M
+*
+*                 Bidiagonalize L in U, copying result to WORK(IR)
+*                 (CWorkspace: need M*M+3*M, prefer M*M+2*M+2*M*NB)
+*                 (RWorkspace: need M)
+*
+                  CALL ZGEBRD( M, M, U, LDU, S, RWORK( IE ),
+     $                         WORK( ITAUQ ), WORK( ITAUP ),
+     $                         WORK( IWORK ), LWORK-IWORK+1, IERR )
+                  CALL ZLACPY( 'U', M, M, U, LDU, WORK( IR ), LDWRKR )
+*
+*                 Generate right vectors bidiagonalizing L in WORK(IR)
+*                 (CWorkspace: need M*M+3*M-1, prefer M*M+2*M+(M-1)*NB)
+*                 (RWorkspace: 0)
+*
+                  CALL ZUNGBR( 'P', M, M, M, WORK( IR ), LDWRKR,
+     $                         WORK( ITAUP ), WORK( IWORK ),
+     $                         LWORK-IWORK+1, IERR )
+*
+*                 Generate left vectors bidiagonalizing L in U
+*                 (CWorkspace: need M*M+3*M, prefer M*M+2*M+M*NB)
+*                 (RWorkspace: 0)
+*
+                  CALL ZUNGBR( 'Q', M, M, M, U, LDU, WORK( ITAUQ ),
+     $                         WORK( IWORK ), LWORK-IWORK+1, IERR )
+                  IRWORK = IE + M
+*
+*                 Perform bidiagonal QR iteration, computing left
+*                 singular vectors of L in U, and computing right
+*                 singular vectors of L in WORK(IR)
+*                 (CWorkspace: need M*M)
+*                 (RWorkspace: need BDSPAC)
+*
+                  CALL ZBDSQR( 'U', M, M, M, 0, S, RWORK( IE ),
+     $                         WORK( IR ), LDWRKR, U, LDU, CDUM, 1,
+     $                         RWORK( IRWORK ), INFO )
+                  IU = ITAUQ
+*
+*                 Multiply right singular vectors of L in WORK(IR) by Q
+*                 in A, storing result in WORK(IU) and copying to A
+*                 (CWorkspace: need M*M+M, prefer M*M+M*N))
+*                 (RWorkspace: 0)
+*
+                  DO 40 I = 1, N, CHUNK
+                     BLK = MIN( N-I+1, CHUNK )
+                     CALL ZGEMM( 'N', 'N', M, BLK, M, CONE, WORK( IR ),
+     $                           LDWRKR, A( 1, I ), LDA, CZERO,
+     $                           WORK( IU ), LDWRKU )
+                     CALL ZLACPY( 'F', M, BLK, WORK( IU ), LDWRKU,
+     $                            A( 1, I ), LDA )
+   40             CONTINUE
+*
+               ELSE
+*
+*                 Insufficient workspace for a fast algorithm
+*
+                  ITAU = 1
+                  IWORK = ITAU + M
+*
+*                 Compute A=L*Q
+*                 (CWorkspace: need 2*M, prefer M+M*NB)
+*                 (RWorkspace: 0)
+*
+                  CALL ZGELQF( M, N, A, LDA, WORK( ITAU ),
+     $                         WORK( IWORK ), LWORK-IWORK+1, IERR )
+*
+*                 Copy L to U, zeroing out above it
+*
+                  CALL ZLACPY( 'L', M, M, A, LDA, U, LDU )
+                  CALL ZLASET( 'U', M-1, M-1, CZERO, CZERO, U( 1, 2 ),
+     $                         LDU )
+*
+*                 Generate Q in A
+*                 (CWorkspace: need 2*M, prefer M+M*NB)
+*                 (RWorkspace: 0)
+*
+                  CALL ZUNGLQ( M, N, M, A, LDA, WORK( ITAU ),
+     $                         WORK( IWORK ), LWORK-IWORK+1, IERR )
+                  IE = 1
+                  ITAUQ = ITAU
+                  ITAUP = ITAUQ + M
+                  IWORK = ITAUP + M
+*
+*                 Bidiagonalize L in U
+*                 (CWorkspace: need 3*M, prefer 2*M+2*M*NB)
+*                 (RWorkspace: need M)
+*
+                  CALL ZGEBRD( M, M, U, LDU, S, RWORK( IE ),
+     $                         WORK( ITAUQ ), WORK( ITAUP ),
+     $                         WORK( IWORK ), LWORK-IWORK+1, IERR )
+*
+*                 Multiply right vectors bidiagonalizing L by Q in A
+*                 (CWorkspace: need 2*M+N, prefer 2*M+N*NB)
+*                 (RWorkspace: 0)
+*
+                  CALL ZUNMBR( 'P', 'L', 'C', M, N, M, U, LDU,
+     $                         WORK( ITAUP ), A, LDA, WORK( IWORK ),
+     $                         LWORK-IWORK+1, IERR )
+*
+*                 Generate left vectors bidiagonalizing L in U
+*                 (CWorkspace: need 3*M, prefer 2*M+M*NB)
+*                 (RWorkspace: 0)
+*
+                  CALL ZUNGBR( 'Q', M, M, M, U, LDU, WORK( ITAUQ ),
+     $                         WORK( IWORK ), LWORK-IWORK+1, IERR )
+                  IRWORK = IE + M
+*
+*                 Perform bidiagonal QR iteration, computing left
+*                 singular vectors of A in U and computing right
+*                 singular vectors of A in A
+*                 (CWorkspace: 0)
+*                 (RWorkspace: need BDSPAC)
+*
+                  CALL ZBDSQR( 'U', M, N, M, 0, S, RWORK( IE ), A, LDA,
+     $                         U, LDU, CDUM, 1, RWORK( IRWORK ), INFO )
+*
+               END IF
+*
+            ELSE IF( WNTVS ) THEN
+*
+               IF( WNTUN ) THEN
+*
+*                 Path 4t(N much larger than M, JOBU='N', JOBVT='S')
+*                 M right singular vectors to be computed in VT and
+*                 no left singular vectors to be computed
+*
+                  IF( LWORK.GE.M*M+3*M ) THEN
+*
+*                    Sufficient workspace for a fast algorithm
+*
+                     IR = 1
+                     IF( LWORK.GE.WRKBL+LDA*M ) THEN
+*
+*                       WORK(IR) is LDA by M
+*
+                        LDWRKR = LDA
+                     ELSE
+*
+*                       WORK(IR) is M by M
+*
+                        LDWRKR = M
+                     END IF
+                     ITAU = IR + LDWRKR*M
+                     IWORK = ITAU + M
+*
+*                    Compute A=L*Q
+*                    (CWorkspace: need M*M+2*M, prefer M*M+M+M*NB)
+*                    (RWorkspace: 0)
+*
+                     CALL ZGELQF( M, N, A, LDA, WORK( ITAU ),
+     $                            WORK( IWORK ), LWORK-IWORK+1, IERR )
+*
+*                    Copy L to WORK(IR), zeroing out above it
+*
+                     CALL ZLACPY( 'L', M, M, A, LDA, WORK( IR ),
+     $                            LDWRKR )
+                     CALL ZLASET( 'U', M-1, M-1, CZERO, CZERO,
+     $                            WORK( IR+LDWRKR ), LDWRKR )
+*
+*                    Generate Q in A
+*                    (CWorkspace: need M*M+2*M, prefer M*M+M+M*NB)
+*                    (RWorkspace: 0)
+*
+                     CALL ZUNGLQ( M, N, M, A, LDA, WORK( ITAU ),
+     $                            WORK( IWORK ), LWORK-IWORK+1, IERR )
+                     IE = 1
+                     ITAUQ = ITAU
+                     ITAUP = ITAUQ + M
+                     IWORK = ITAUP + M
+*
+*                    Bidiagonalize L in WORK(IR)
+*                    (CWorkspace: need M*M+3*M, prefer M*M+2*M+2*M*NB)
+*                    (RWorkspace: need M)
+*
+                     CALL ZGEBRD( M, M, WORK( IR ), LDWRKR, S,
+     $                            RWORK( IE ), WORK( ITAUQ ),
+     $                            WORK( ITAUP ), WORK( IWORK ),
+     $                            LWORK-IWORK+1, IERR )
+*
+*                    Generate right vectors bidiagonalizing L in
+*                    WORK(IR)
+*                    (CWorkspace: need M*M+3*M, prefer M*M+2*M+(M-1)*NB)
+*                    (RWorkspace: 0)
+*
+                     CALL ZUNGBR( 'P', M, M, M, WORK( IR ), LDWRKR,
+     $                            WORK( ITAUP ), WORK( IWORK ),
+     $                            LWORK-IWORK+1, IERR )
+                     IRWORK = IE + M
+*
+*                    Perform bidiagonal QR iteration, computing right
+*                    singular vectors of L in WORK(IR)
+*                    (CWorkspace: need M*M)
+*                    (RWorkspace: need BDSPAC)
+*
+                     CALL ZBDSQR( 'U', M, M, 0, 0, S, RWORK( IE ),
+     $                            WORK( IR ), LDWRKR, CDUM, 1, CDUM, 1,
+     $                            RWORK( IRWORK ), INFO )
+*
+*                    Multiply right singular vectors of L in WORK(IR) by
+*                    Q in A, storing result in VT
+*                    (CWorkspace: need M*M)
+*                    (RWorkspace: 0)
+*
+                     CALL ZGEMM( 'N', 'N', M, N, M, CONE, WORK( IR ),
+     $                           LDWRKR, A, LDA, CZERO, VT, LDVT )
+*
+                  ELSE
+*
+*                    Insufficient workspace for a fast algorithm
+*
+                     ITAU = 1
+                     IWORK = ITAU + M
+*
+*                    Compute A=L*Q
+*                    (CWorkspace: need 2*M, prefer M+M*NB)
+*                    (RWorkspace: 0)
+*
+                     CALL ZGELQF( M, N, A, LDA, WORK( ITAU ),
+     $                            WORK( IWORK ), LWORK-IWORK+1, IERR )
+*
+*                    Copy result to VT
+*
+                     CALL ZLACPY( 'U', M, N, A, LDA, VT, LDVT )
+*
+*                    Generate Q in VT
+*                    (CWorkspace: need 2*M, prefer M+M*NB)
+*                    (RWorkspace: 0)
+*
+                     CALL ZUNGLQ( M, N, M, VT, LDVT, WORK( ITAU ),
+     $                            WORK( IWORK ), LWORK-IWORK+1, IERR )
+                     IE = 1
+                     ITAUQ = ITAU
+                     ITAUP = ITAUQ + M
+                     IWORK = ITAUP + M
+*
+*                    Zero out above L in A
+*
+                     CALL ZLASET( 'U', M-1, M-1, CZERO, CZERO,
+     $                            A( 1, 2 ), LDA )
+*
+*                    Bidiagonalize L in A
+*                    (CWorkspace: need 3*M, prefer 2*M+2*M*NB)
+*                    (RWorkspace: need M)
+*
+                     CALL ZGEBRD( M, M, A, LDA, S, RWORK( IE ),
+     $                            WORK( ITAUQ ), WORK( ITAUP ),
+     $                            WORK( IWORK ), LWORK-IWORK+1, IERR )
+*
+*                    Multiply right vectors bidiagonalizing L by Q in VT
+*                    (CWorkspace: need 2*M+N, prefer 2*M+N*NB)
+*                    (RWorkspace: 0)
+*
+                     CALL ZUNMBR( 'P', 'L', 'C', M, N, M, A, LDA,
+     $                            WORK( ITAUP ), VT, LDVT,
+     $                            WORK( IWORK ), LWORK-IWORK+1, IERR )
+                     IRWORK = IE + M
+*
+*                    Perform bidiagonal QR iteration, computing right
+*                    singular vectors of A in VT
+*                    (CWorkspace: 0)
+*                    (RWorkspace: need BDSPAC)
+*
+                     CALL ZBDSQR( 'U', M, N, 0, 0, S, RWORK( IE ), VT,
+     $                            LDVT, CDUM, 1, CDUM, 1,
+     $                            RWORK( IRWORK ), INFO )
+*
+                  END IF
+*
+               ELSE IF( WNTUO ) THEN
+*
+*                 Path 5t(N much larger than M, JOBU='O', JOBVT='S')
+*                 M right singular vectors to be computed in VT and
+*                 M left singular vectors to be overwritten on A
+*
+                  IF( LWORK.GE.2*M*M+3*M ) THEN
+*
+*                    Sufficient workspace for a fast algorithm
+*
+                     IU = 1
+                     IF( LWORK.GE.WRKBL+2*LDA*M ) THEN
+*
+*                       WORK(IU) is LDA by M and WORK(IR) is LDA by M
+*
+                        LDWRKU = LDA
+                        IR = IU + LDWRKU*M
+                        LDWRKR = LDA
+                     ELSE IF( LWORK.GE.WRKBL+( LDA+M )*M ) THEN
+*
+*                       WORK(IU) is LDA by M and WORK(IR) is M by M
+*
+                        LDWRKU = LDA
+                        IR = IU + LDWRKU*M
+                        LDWRKR = M
+                     ELSE
+*
+*                       WORK(IU) is M by M and WORK(IR) is M by M
+*
+                        LDWRKU = M
+                        IR = IU + LDWRKU*M
+                        LDWRKR = M
+                     END IF
+                     ITAU = IR + LDWRKR*M
+                     IWORK = ITAU + M
+*
+*                    Compute A=L*Q
+*                    (CWorkspace: need 2*M*M+2*M, prefer 2*M*M+M+M*NB)
+*                    (RWorkspace: 0)
+*
+                     CALL ZGELQF( M, N, A, LDA, WORK( ITAU ),
+     $                            WORK( IWORK ), LWORK-IWORK+1, IERR )
+*
+*                    Copy L to WORK(IU), zeroing out below it
+*
+                     CALL ZLACPY( 'L', M, M, A, LDA, WORK( IU ),
+     $                            LDWRKU )
+                     CALL ZLASET( 'U', M-1, M-1, CZERO, CZERO,
+     $                            WORK( IU+LDWRKU ), LDWRKU )
+*
+*                    Generate Q in A
+*                    (CWorkspace: need 2*M*M+2*M, prefer 2*M*M+M+M*NB)
+*                    (RWorkspace: 0)
+*
+                     CALL ZUNGLQ( M, N, M, A, LDA, WORK( ITAU ),
+     $                            WORK( IWORK ), LWORK-IWORK+1, IERR )
+                     IE = 1
+                     ITAUQ = ITAU
+                     ITAUP = ITAUQ + M
+                     IWORK = ITAUP + M
+*
+*                    Bidiagonalize L in WORK(IU), copying result to
+*                    WORK(IR)
+*                    (CWorkspace: need   2*M*M+3*M,
+*                                 prefer 2*M*M+2*M+2*M*NB)
+*                    (RWorkspace: need   M)
+*
+                     CALL ZGEBRD( M, M, WORK( IU ), LDWRKU, S,
+     $                            RWORK( IE ), WORK( ITAUQ ),
+     $                            WORK( ITAUP ), WORK( IWORK ),
+     $                            LWORK-IWORK+1, IERR )
+                     CALL ZLACPY( 'L', M, M, WORK( IU ), LDWRKU,
+     $                            WORK( IR ), LDWRKR )
+*
+*                    Generate right bidiagonalizing vectors in WORK(IU)
+*                    (CWorkspace: need   2*M*M+3*M-1,
+*                                 prefer 2*M*M+2*M+(M-1)*NB)
+*                    (RWorkspace: 0)
+*
+                     CALL ZUNGBR( 'P', M, M, M, WORK( IU ), LDWRKU,
+     $                            WORK( ITAUP ), WORK( IWORK ),
+     $                            LWORK-IWORK+1, IERR )
+*
+*                    Generate left bidiagonalizing vectors in WORK(IR)
+*                    (CWorkspace: need 2*M*M+3*M, prefer 2*M*M+2*M+M*NB)
+*                    (RWorkspace: 0)
+*
+                     CALL ZUNGBR( 'Q', M, M, M, WORK( IR ), LDWRKR,
+     $                            WORK( ITAUQ ), WORK( IWORK ),
+     $                            LWORK-IWORK+1, IERR )
+                     IRWORK = IE + M
+*
+*                    Perform bidiagonal QR iteration, computing left
+*                    singular vectors of L in WORK(IR) and computing
+*                    right singular vectors of L in WORK(IU)
+*                    (CWorkspace: need 2*M*M)
+*                    (RWorkspace: need BDSPAC)
+*
+                     CALL ZBDSQR( 'U', M, M, M, 0, S, RWORK( IE ),
+     $                            WORK( IU ), LDWRKU, WORK( IR ),
+     $                            LDWRKR, CDUM, 1, RWORK( IRWORK ),
+     $                            INFO )
+*
+*                    Multiply right singular vectors of L in WORK(IU) by
+*                    Q in A, storing result in VT
+*                    (CWorkspace: need M*M)
+*                    (RWorkspace: 0)
+*
+                     CALL ZGEMM( 'N', 'N', M, N, M, CONE, WORK( IU ),
+     $                           LDWRKU, A, LDA, CZERO, VT, LDVT )
+*
+*                    Copy left singular vectors of L to A
+*                    (CWorkspace: need M*M)
+*                    (RWorkspace: 0)
+*
+                     CALL ZLACPY( 'F', M, M, WORK( IR ), LDWRKR, A,
+     $                            LDA )
+*
+                  ELSE
+*
+*                    Insufficient workspace for a fast algorithm
+*
+                     ITAU = 1
+                     IWORK = ITAU + M
+*
+*                    Compute A=L*Q, copying result to VT
+*                    (CWorkspace: need 2*M, prefer M+M*NB)
+*                    (RWorkspace: 0)
+*
+                     CALL ZGELQF( M, N, A, LDA, WORK( ITAU ),
+     $                            WORK( IWORK ), LWORK-IWORK+1, IERR )
+                     CALL ZLACPY( 'U', M, N, A, LDA, VT, LDVT )
+*
+*                    Generate Q in VT
+*                    (CWorkspace: need 2*M, prefer M+M*NB)
+*                    (RWorkspace: 0)
+*
+                     CALL ZUNGLQ( M, N, M, VT, LDVT, WORK( ITAU ),
+     $                            WORK( IWORK ), LWORK-IWORK+1, IERR )
+                     IE = 1
+                     ITAUQ = ITAU
+                     ITAUP = ITAUQ + M
+                     IWORK = ITAUP + M
+*
+*                    Zero out above L in A
+*
+                     CALL ZLASET( 'U', M-1, M-1, CZERO, CZERO,
+     $                            A( 1, 2 ), LDA )
+*
+*                    Bidiagonalize L in A
+*                    (CWorkspace: need 3*M, prefer 2*M+2*M*NB)
+*                    (RWorkspace: need M)
+*
+                     CALL ZGEBRD( M, M, A, LDA, S, RWORK( IE ),
+     $                            WORK( ITAUQ ), WORK( ITAUP ),
+     $                            WORK( IWORK ), LWORK-IWORK+1, IERR )
+*
+*                    Multiply right vectors bidiagonalizing L by Q in VT
+*                    (CWorkspace: need 2*M+N, prefer 2*M+N*NB)
+*                    (RWorkspace: 0)
+*
+                     CALL ZUNMBR( 'P', 'L', 'C', M, N, M, A, LDA,
+     $                            WORK( ITAUP ), VT, LDVT,
+     $                            WORK( IWORK ), LWORK-IWORK+1, IERR )
+*
+*                    Generate left bidiagonalizing vectors of L in A
+*                    (CWorkspace: need 3*M, prefer 2*M+M*NB)
+*                    (RWorkspace: 0)
+*
+                     CALL ZUNGBR( 'Q', M, M, M, A, LDA, WORK( ITAUQ ),
+     $                            WORK( IWORK ), LWORK-IWORK+1, IERR )
+                     IRWORK = IE + M
+*
+*                    Perform bidiagonal QR iteration, computing left
+*                    singular vectors of A in A and computing right
+*                    singular vectors of A in VT
+*                    (CWorkspace: 0)
+*                    (RWorkspace: need BDSPAC)
+*
+                     CALL ZBDSQR( 'U', M, N, M, 0, S, RWORK( IE ), VT,
+     $                            LDVT, A, LDA, CDUM, 1,
+     $                            RWORK( IRWORK ), INFO )
+*
+                  END IF
+*
+               ELSE IF( WNTUAS ) THEN
+*
+*                 Path 6t(N much larger than M, JOBU='S' or 'A',
+*                         JOBVT='S')
+*                 M right singular vectors to be computed in VT and
+*                 M left singular vectors to be computed in U
+*
+                  IF( LWORK.GE.M*M+3*M ) THEN
+*
+*                    Sufficient workspace for a fast algorithm
+*
+                     IU = 1
+                     IF( LWORK.GE.WRKBL+LDA*M ) THEN
+*
+*                       WORK(IU) is LDA by N
+*
+                        LDWRKU = LDA
+                     ELSE
+*
+*                       WORK(IU) is LDA by M
+*
+                        LDWRKU = M
+                     END IF
+                     ITAU = IU + LDWRKU*M
+                     IWORK = ITAU + M
+*
+*                    Compute A=L*Q
+*                    (CWorkspace: need M*M+2*M, prefer M*M+M+M*NB)
+*                    (RWorkspace: 0)
+*
+                     CALL ZGELQF( M, N, A, LDA, WORK( ITAU ),
+     $                            WORK( IWORK ), LWORK-IWORK+1, IERR )
+*
+*                    Copy L to WORK(IU), zeroing out above it
+*
+                     CALL ZLACPY( 'L', M, M, A, LDA, WORK( IU ),
+     $                            LDWRKU )
+                     CALL ZLASET( 'U', M-1, M-1, CZERO, CZERO,
+     $                            WORK( IU+LDWRKU ), LDWRKU )
+*
+*                    Generate Q in A
+*                    (CWorkspace: need M*M+2*M, prefer M*M+M+M*NB)
+*                    (RWorkspace: 0)
+*
+                     CALL ZUNGLQ( M, N, M, A, LDA, WORK( ITAU ),
+     $                            WORK( IWORK ), LWORK-IWORK+1, IERR )
+                     IE = 1
+                     ITAUQ = ITAU
+                     ITAUP = ITAUQ + M
+                     IWORK = ITAUP + M
+*
+*                    Bidiagonalize L in WORK(IU), copying result to U
+*                    (CWorkspace: need M*M+3*M, prefer M*M+2*M+2*M*NB)
+*                    (RWorkspace: need M)
+*
+                     CALL ZGEBRD( M, M, WORK( IU ), LDWRKU, S,
+     $                            RWORK( IE ), WORK( ITAUQ ),
+     $                            WORK( ITAUP ), WORK( IWORK ),
+     $                            LWORK-IWORK+1, IERR )
+                     CALL ZLACPY( 'L', M, M, WORK( IU ), LDWRKU, U,
+     $                            LDU )
+*
+*                    Generate right bidiagonalizing vectors in WORK(IU)
+*                    (CWorkspace: need   M*M+3*M-1,
+*                                 prefer M*M+2*M+(M-1)*NB)
+*                    (RWorkspace: 0)
+*
+                     CALL ZUNGBR( 'P', M, M, M, WORK( IU ), LDWRKU,
+     $                            WORK( ITAUP ), WORK( IWORK ),
+     $                            LWORK-IWORK+1, IERR )
+*
+*                    Generate left bidiagonalizing vectors in U
+*                    (CWorkspace: need M*M+3*M, prefer M*M+2*M+M*NB)
+*                    (RWorkspace: 0)
+*
+                     CALL ZUNGBR( 'Q', M, M, M, U, LDU, WORK( ITAUQ ),
+     $                            WORK( IWORK ), LWORK-IWORK+1, IERR )
+                     IRWORK = IE + M
+*
+*                    Perform bidiagonal QR iteration, computing left
+*                    singular vectors of L in U and computing right
+*                    singular vectors of L in WORK(IU)
+*                    (CWorkspace: need M*M)
+*                    (RWorkspace: need BDSPAC)
+*
+                     CALL ZBDSQR( 'U', M, M, M, 0, S, RWORK( IE ),
+     $                            WORK( IU ), LDWRKU, U, LDU, CDUM, 1,
+     $                            RWORK( IRWORK ), INFO )
+*
+*                    Multiply right singular vectors of L in WORK(IU) by
+*                    Q in A, storing result in VT
+*                    (CWorkspace: need M*M)
+*                    (RWorkspace: 0)
+*
+                     CALL ZGEMM( 'N', 'N', M, N, M, CONE, WORK( IU ),
+     $                           LDWRKU, A, LDA, CZERO, VT, LDVT )
+*
+                  ELSE
+*
+*                    Insufficient workspace for a fast algorithm
+*
+                     ITAU = 1
+                     IWORK = ITAU + M
+*
+*                    Compute A=L*Q, copying result to VT
+*                    (CWorkspace: need 2*M, prefer M+M*NB)
+*                    (RWorkspace: 0)
+*
+                     CALL ZGELQF( M, N, A, LDA, WORK( ITAU ),
+     $                            WORK( IWORK ), LWORK-IWORK+1, IERR )
+                     CALL ZLACPY( 'U', M, N, A, LDA, VT, LDVT )
+*
+*                    Generate Q in VT
+*                    (CWorkspace: need 2*M, prefer M+M*NB)
+*                    (RWorkspace: 0)
+*
+                     CALL ZUNGLQ( M, N, M, VT, LDVT, WORK( ITAU ),
+     $                            WORK( IWORK ), LWORK-IWORK+1, IERR )
+*
+*                    Copy L to U, zeroing out above it
+*
+                     CALL ZLACPY( 'L', M, M, A, LDA, U, LDU )
+                     CALL ZLASET( 'U', M-1, M-1, CZERO, CZERO,
+     $                            U( 1, 2 ), LDU )
+                     IE = 1
+                     ITAUQ = ITAU
+                     ITAUP = ITAUQ + M
+                     IWORK = ITAUP + M
+*
+*                    Bidiagonalize L in U
+*                    (CWorkspace: need 3*M, prefer 2*M+2*M*NB)
+*                    (RWorkspace: need M)
+*
+                     CALL ZGEBRD( M, M, U, LDU, S, RWORK( IE ),
+     $                            WORK( ITAUQ ), WORK( ITAUP ),
+     $                            WORK( IWORK ), LWORK-IWORK+1, IERR )
+*
+*                    Multiply right bidiagonalizing vectors in U by Q
+*                    in VT
+*                    (CWorkspace: need 2*M+N, prefer 2*M+N*NB)
+*                    (RWorkspace: 0)
+*
+                     CALL ZUNMBR( 'P', 'L', 'C', M, N, M, U, LDU,
+     $                            WORK( ITAUP ), VT, LDVT,
+     $                            WORK( IWORK ), LWORK-IWORK+1, IERR )
+*
+*                    Generate left bidiagonalizing vectors in U
+*                    (CWorkspace: need 3*M, prefer 2*M+M*NB)
+*                    (RWorkspace: 0)
+*
+                     CALL ZUNGBR( 'Q', M, M, M, U, LDU, WORK( ITAUQ ),
+     $                            WORK( IWORK ), LWORK-IWORK+1, IERR )
+                     IRWORK = IE + M
+*
+*                    Perform bidiagonal QR iteration, computing left
+*                    singular vectors of A in U and computing right
+*                    singular vectors of A in VT
+*                    (CWorkspace: 0)
+*                    (RWorkspace: need BDSPAC)
+*
+                     CALL ZBDSQR( 'U', M, N, M, 0, S, RWORK( IE ), VT,
+     $                            LDVT, U, LDU, CDUM, 1,
+     $                            RWORK( IRWORK ), INFO )
+*
+                  END IF
+*
+               END IF
+*
+            ELSE IF( WNTVA ) THEN
+*
+               IF( WNTUN ) THEN
+*
+*                 Path 7t(N much larger than M, JOBU='N', JOBVT='A')
+*                 N right singular vectors to be computed in VT and
+*                 no left singular vectors to be computed
+*
+                  IF( LWORK.GE.M*M+MAX( N+M, 3*M ) ) THEN
+*
+*                    Sufficient workspace for a fast algorithm
+*
+                     IR = 1
+                     IF( LWORK.GE.WRKBL+LDA*M ) THEN
+*
+*                       WORK(IR) is LDA by M
+*
+                        LDWRKR = LDA
+                     ELSE
+*
+*                       WORK(IR) is M by M
+*
+                        LDWRKR = M
+                     END IF
+                     ITAU = IR + LDWRKR*M
+                     IWORK = ITAU + M
+*
+*                    Compute A=L*Q, copying result to VT
+*                    (CWorkspace: need M*M+2*M, prefer M*M+M+M*NB)
+*                    (RWorkspace: 0)
+*
+                     CALL ZGELQF( M, N, A, LDA, WORK( ITAU ),
+     $                            WORK( IWORK ), LWORK-IWORK+1, IERR )
+                     CALL ZLACPY( 'U', M, N, A, LDA, VT, LDVT )
+*
+*                    Copy L to WORK(IR), zeroing out above it
+*
+                     CALL ZLACPY( 'L', M, M, A, LDA, WORK( IR ),
+     $                            LDWRKR )
+                     CALL ZLASET( 'U', M-1, M-1, CZERO, CZERO,
+     $                            WORK( IR+LDWRKR ), LDWRKR )
+*
+*                    Generate Q in VT
+*                    (CWorkspace: need M*M+M+N, prefer M*M+M+N*NB)
+*                    (RWorkspace: 0)
+*
+                     CALL ZUNGLQ( N, N, M, VT, LDVT, WORK( ITAU ),
+     $                            WORK( IWORK ), LWORK-IWORK+1, IERR )
+                     IE = 1
+                     ITAUQ = ITAU
+                     ITAUP = ITAUQ + M
+                     IWORK = ITAUP + M
+*
+*                    Bidiagonalize L in WORK(IR)
+*                    (CWorkspace: need M*M+3*M, prefer M*M+2*M+2*M*NB)
+*                    (RWorkspace: need M)
+*
+                     CALL ZGEBRD( M, M, WORK( IR ), LDWRKR, S,
+     $                            RWORK( IE ), WORK( ITAUQ ),
+     $                            WORK( ITAUP ), WORK( IWORK ),
+     $                            LWORK-IWORK+1, IERR )
+*
+*                    Generate right bidiagonalizing vectors in WORK(IR)
+*                    (CWorkspace: need   M*M+3*M-1,
+*                                 prefer M*M+2*M+(M-1)*NB)
+*                    (RWorkspace: 0)
+*
+                     CALL ZUNGBR( 'P', M, M, M, WORK( IR ), LDWRKR,
+     $                            WORK( ITAUP ), WORK( IWORK ),
+     $                            LWORK-IWORK+1, IERR )
+                     IRWORK = IE + M
+*
+*                    Perform bidiagonal QR iteration, computing right
+*                    singular vectors of L in WORK(IR)
+*                    (CWorkspace: need M*M)
+*                    (RWorkspace: need BDSPAC)
+*
+                     CALL ZBDSQR( 'U', M, M, 0, 0, S, RWORK( IE ),
+     $                            WORK( IR ), LDWRKR, CDUM, 1, CDUM, 1,
+     $                            RWORK( IRWORK ), INFO )
+*
+*                    Multiply right singular vectors of L in WORK(IR) by
+*                    Q in VT, storing result in A
+*                    (CWorkspace: need M*M)
+*                    (RWorkspace: 0)
+*
+                     CALL ZGEMM( 'N', 'N', M, N, M, CONE, WORK( IR ),
+     $                           LDWRKR, VT, LDVT, CZERO, A, LDA )
+*
+*                    Copy right singular vectors of A from A to VT
+*
+                     CALL ZLACPY( 'F', M, N, A, LDA, VT, LDVT )
+*
+                  ELSE
+*
+*                    Insufficient workspace for a fast algorithm
+*
+                     ITAU = 1
+                     IWORK = ITAU + M
+*
+*                    Compute A=L*Q, copying result to VT
+*                    (CWorkspace: need 2*M, prefer M+M*NB)
+*                    (RWorkspace: 0)
+*
+                     CALL ZGELQF( M, N, A, LDA, WORK( ITAU ),
+     $                            WORK( IWORK ), LWORK-IWORK+1, IERR )
+                     CALL ZLACPY( 'U', M, N, A, LDA, VT, LDVT )
+*
+*                    Generate Q in VT
+*                    (CWorkspace: need M+N, prefer M+N*NB)
+*                    (RWorkspace: 0)
+*
+                     CALL ZUNGLQ( N, N, M, VT, LDVT, WORK( ITAU ),
+     $                            WORK( IWORK ), LWORK-IWORK+1, IERR )
+                     IE = 1
+                     ITAUQ = ITAU
+                     ITAUP = ITAUQ + M
+                     IWORK = ITAUP + M
+*
+*                    Zero out above L in A
+*
+                     CALL ZLASET( 'U', M-1, M-1, CZERO, CZERO,
+     $                            A( 1, 2 ), LDA )
+*
+*                    Bidiagonalize L in A
+*                    (CWorkspace: need 3*M, prefer 2*M+2*M*NB)
+*                    (RWorkspace: need M)
+*
+                     CALL ZGEBRD( M, M, A, LDA, S, RWORK( IE ),
+     $                            WORK( ITAUQ ), WORK( ITAUP ),
+     $                            WORK( IWORK ), LWORK-IWORK+1, IERR )
+*
+*                    Multiply right bidiagonalizing vectors in A by Q
+*                    in VT
+*                    (CWorkspace: need 2*M+N, prefer 2*M+N*NB)
+*                    (RWorkspace: 0)
+*
+                     CALL ZUNMBR( 'P', 'L', 'C', M, N, M, A, LDA,
+     $                            WORK( ITAUP ), VT, LDVT,
+     $                            WORK( IWORK ), LWORK-IWORK+1, IERR )
+                     IRWORK = IE + M
+*
+*                    Perform bidiagonal QR iteration, computing right
+*                    singular vectors of A in VT
+*                    (CWorkspace: 0)
+*                    (RWorkspace: need BDSPAC)
+*
+                     CALL ZBDSQR( 'U', M, N, 0, 0, S, RWORK( IE ), VT,
+     $                            LDVT, CDUM, 1, CDUM, 1,
+     $                            RWORK( IRWORK ), INFO )
+*
+                  END IF
+*
+               ELSE IF( WNTUO ) THEN
+*
+*                 Path 8t(N much larger than M, JOBU='O', JOBVT='A')
+*                 N right singular vectors to be computed in VT and
+*                 M left singular vectors to be overwritten on A
+*
+                  IF( LWORK.GE.2*M*M+MAX( N+M, 3*M ) ) THEN
+*
+*                    Sufficient workspace for a fast algorithm
+*
+                     IU = 1
+                     IF( LWORK.GE.WRKBL+2*LDA*M ) THEN
+*
+*                       WORK(IU) is LDA by M and WORK(IR) is LDA by M
+*
+                        LDWRKU = LDA
+                        IR = IU + LDWRKU*M
+                        LDWRKR = LDA
+                     ELSE IF( LWORK.GE.WRKBL+( LDA+M )*M ) THEN
+*
+*                       WORK(IU) is LDA by M and WORK(IR) is M by M
+*
+                        LDWRKU = LDA
+                        IR = IU + LDWRKU*M
+                        LDWRKR = M
+                     ELSE
+*
+*                       WORK(IU) is M by M and WORK(IR) is M by M
+*
+                        LDWRKU = M
+                        IR = IU + LDWRKU*M
+                        LDWRKR = M
+                     END IF
+                     ITAU = IR + LDWRKR*M
+                     IWORK = ITAU + M
+*
+*                    Compute A=L*Q, copying result to VT
+*                    (CWorkspace: need 2*M*M+2*M, prefer 2*M*M+M+M*NB)
+*                    (RWorkspace: 0)
+*
+                     CALL ZGELQF( M, N, A, LDA, WORK( ITAU ),
+     $                            WORK( IWORK ), LWORK-IWORK+1, IERR )
+                     CALL ZLACPY( 'U', M, N, A, LDA, VT, LDVT )
+*
+*                    Generate Q in VT
+*                    (CWorkspace: need 2*M*M+M+N, prefer 2*M*M+M+N*NB)
+*                    (RWorkspace: 0)
+*
+                     CALL ZUNGLQ( N, N, M, VT, LDVT, WORK( ITAU ),
+     $                            WORK( IWORK ), LWORK-IWORK+1, IERR )
+*
+*                    Copy L to WORK(IU), zeroing out above it
+*
+                     CALL ZLACPY( 'L', M, M, A, LDA, WORK( IU ),
+     $                            LDWRKU )
+                     CALL ZLASET( 'U', M-1, M-1, CZERO, CZERO,
+     $                            WORK( IU+LDWRKU ), LDWRKU )
+                     IE = 1
+                     ITAUQ = ITAU
+                     ITAUP = ITAUQ + M
+                     IWORK = ITAUP + M
+*
+*                    Bidiagonalize L in WORK(IU), copying result to
+*                    WORK(IR)
+*                    (CWorkspace: need   2*M*M+3*M,
+*                                 prefer 2*M*M+2*M+2*M*NB)
+*                    (RWorkspace: need   M)
+*
+                     CALL ZGEBRD( M, M, WORK( IU ), LDWRKU, S,
+     $                            RWORK( IE ), WORK( ITAUQ ),
+     $                            WORK( ITAUP ), WORK( IWORK ),
+     $                            LWORK-IWORK+1, IERR )
+                     CALL ZLACPY( 'L', M, M, WORK( IU ), LDWRKU,
+     $                            WORK( IR ), LDWRKR )
+*
+*                    Generate right bidiagonalizing vectors in WORK(IU)
+*                    (CWorkspace: need   2*M*M+3*M-1,
+*                                 prefer 2*M*M+2*M+(M-1)*NB)
+*                    (RWorkspace: 0)
+*
+                     CALL ZUNGBR( 'P', M, M, M, WORK( IU ), LDWRKU,
+     $                            WORK( ITAUP ), WORK( IWORK ),
+     $                            LWORK-IWORK+1, IERR )
+*
+*                    Generate left bidiagonalizing vectors in WORK(IR)
+*                    (CWorkspace: need 2*M*M+3*M, prefer 2*M*M+2*M+M*NB)
+*                    (RWorkspace: 0)
+*
+                     CALL ZUNGBR( 'Q', M, M, M, WORK( IR ), LDWRKR,
+     $                            WORK( ITAUQ ), WORK( IWORK ),
+     $                            LWORK-IWORK+1, IERR )
+                     IRWORK = IE + M
+*
+*                    Perform bidiagonal QR iteration, computing left
+*                    singular vectors of L in WORK(IR) and computing
+*                    right singular vectors of L in WORK(IU)
+*                    (CWorkspace: need 2*M*M)
+*                    (RWorkspace: need BDSPAC)
+*
+                     CALL ZBDSQR( 'U', M, M, M, 0, S, RWORK( IE ),
+     $                            WORK( IU ), LDWRKU, WORK( IR ),
+     $                            LDWRKR, CDUM, 1, RWORK( IRWORK ),
+     $                            INFO )
+*
+*                    Multiply right singular vectors of L in WORK(IU) by
+*                    Q in VT, storing result in A
+*                    (CWorkspace: need M*M)
+*                    (RWorkspace: 0)
+*
+                     CALL ZGEMM( 'N', 'N', M, N, M, CONE, WORK( IU ),
+     $                           LDWRKU, VT, LDVT, CZERO, A, LDA )
+*
+*                    Copy right singular vectors of A from A to VT
+*
+                     CALL ZLACPY( 'F', M, N, A, LDA, VT, LDVT )
+*
+*                    Copy left singular vectors of A from WORK(IR) to A
+*
+                     CALL ZLACPY( 'F', M, M, WORK( IR ), LDWRKR, A,
+     $                            LDA )
+*
+                  ELSE
+*
+*                    Insufficient workspace for a fast algorithm
+*
+                     ITAU = 1
+                     IWORK = ITAU + M
+*
+*                    Compute A=L*Q, copying result to VT
+*                    (CWorkspace: need 2*M, prefer M+M*NB)
+*                    (RWorkspace: 0)
+*
+                     CALL ZGELQF( M, N, A, LDA, WORK( ITAU ),
+     $                            WORK( IWORK ), LWORK-IWORK+1, IERR )
+                     CALL ZLACPY( 'U', M, N, A, LDA, VT, LDVT )
+*
+*                    Generate Q in VT
+*                    (CWorkspace: need M+N, prefer M+N*NB)
+*                    (RWorkspace: 0)
+*
+                     CALL ZUNGLQ( N, N, M, VT, LDVT, WORK( ITAU ),
+     $                            WORK( IWORK ), LWORK-IWORK+1, IERR )
+                     IE = 1
+                     ITAUQ = ITAU
+                     ITAUP = ITAUQ + M
+                     IWORK = ITAUP + M
+*
+*                    Zero out above L in A
+*
+                     CALL ZLASET( 'U', M-1, M-1, CZERO, CZERO,
+     $                            A( 1, 2 ), LDA )
+*
+*                    Bidiagonalize L in A
+*                    (CWorkspace: need 3*M, prefer 2*M+2*M*NB)
+*                    (RWorkspace: need M)
+*
+                     CALL ZGEBRD( M, M, A, LDA, S, RWORK( IE ),
+     $                            WORK( ITAUQ ), WORK( ITAUP ),
+     $                            WORK( IWORK ), LWORK-IWORK+1, IERR )
+*
+*                    Multiply right bidiagonalizing vectors in A by Q
+*                    in VT
+*                    (CWorkspace: need 2*M+N, prefer 2*M+N*NB)
+*                    (RWorkspace: 0)
+*
+                     CALL ZUNMBR( 'P', 'L', 'C', M, N, M, A, LDA,
+     $                            WORK( ITAUP ), VT, LDVT,
+     $                            WORK( IWORK ), LWORK-IWORK+1, IERR )
+*
+*                    Generate left bidiagonalizing vectors in A
+*                    (CWorkspace: need 3*M, prefer 2*M+M*NB)
+*                    (RWorkspace: 0)
+*
+                     CALL ZUNGBR( 'Q', M, M, M, A, LDA, WORK( ITAUQ ),
+     $                            WORK( IWORK ), LWORK-IWORK+1, IERR )
+                     IRWORK = IE + M
+*
+*                    Perform bidiagonal QR iteration, computing left
+*                    singular vectors of A in A and computing right
+*                    singular vectors of A in VT
+*                    (CWorkspace: 0)
+*                    (RWorkspace: need BDSPAC)
+*
+                     CALL ZBDSQR( 'U', M, N, M, 0, S, RWORK( IE ), VT,
+     $                            LDVT, A, LDA, CDUM, 1,
+     $                            RWORK( IRWORK ), INFO )
+*
+                  END IF
+*
+               ELSE IF( WNTUAS ) THEN
+*
+*                 Path 9t(N much larger than M, JOBU='S' or 'A',
+*                         JOBVT='A')
+*                 N right singular vectors to be computed in VT and
+*                 M left singular vectors to be computed in U
+*
+                  IF( LWORK.GE.M*M+MAX( N+M, 3*M ) ) THEN
+*
+*                    Sufficient workspace for a fast algorithm
+*
+                     IU = 1
+                     IF( LWORK.GE.WRKBL+LDA*M ) THEN
+*
+*                       WORK(IU) is LDA by M
+*
+                        LDWRKU = LDA
+                     ELSE
+*
+*                       WORK(IU) is M by M
+*
+                        LDWRKU = M
+                     END IF
+                     ITAU = IU + LDWRKU*M
+                     IWORK = ITAU + M
+*
+*                    Compute A=L*Q, copying result to VT
+*                    (CWorkspace: need M*M+2*M, prefer M*M+M+M*NB)
+*                    (RWorkspace: 0)
+*
+                     CALL ZGELQF( M, N, A, LDA, WORK( ITAU ),
+     $                            WORK( IWORK ), LWORK-IWORK+1, IERR )
+                     CALL ZLACPY( 'U', M, N, A, LDA, VT, LDVT )
+*
+*                    Generate Q in VT
+*                    (CWorkspace: need M*M+M+N, prefer M*M+M+N*NB)
+*                    (RWorkspace: 0)
+*
+                     CALL ZUNGLQ( N, N, M, VT, LDVT, WORK( ITAU ),
+     $                            WORK( IWORK ), LWORK-IWORK+1, IERR )
+*
+*                    Copy L to WORK(IU), zeroing out above it
+*
+                     CALL ZLACPY( 'L', M, M, A, LDA, WORK( IU ),
+     $                            LDWRKU )
+                     CALL ZLASET( 'U', M-1, M-1, CZERO, CZERO,
+     $                            WORK( IU+LDWRKU ), LDWRKU )
+                     IE = 1
+                     ITAUQ = ITAU
+                     ITAUP = ITAUQ + M
+                     IWORK = ITAUP + M
+*
+*                    Bidiagonalize L in WORK(IU), copying result to U
+*                    (CWorkspace: need M*M+3*M, prefer M*M+2*M+2*M*NB)
+*                    (RWorkspace: need M)
+*
+                     CALL ZGEBRD( M, M, WORK( IU ), LDWRKU, S,
+     $                            RWORK( IE ), WORK( ITAUQ ),
+     $                            WORK( ITAUP ), WORK( IWORK ),
+     $                            LWORK-IWORK+1, IERR )
+                     CALL ZLACPY( 'L', M, M, WORK( IU ), LDWRKU, U,
+     $                            LDU )
+*
+*                    Generate right bidiagonalizing vectors in WORK(IU)
+*                    (CWorkspace: need M*M+3*M, prefer M*M+2*M+(M-1)*NB)
+*                    (RWorkspace: 0)
+*
+                     CALL ZUNGBR( 'P', M, M, M, WORK( IU ), LDWRKU,
+     $                            WORK( ITAUP ), WORK( IWORK ),
+     $                            LWORK-IWORK+1, IERR )
+*
+*                    Generate left bidiagonalizing vectors in U
+*                    (CWorkspace: need M*M+3*M, prefer M*M+2*M+M*NB)
+*                    (RWorkspace: 0)
+*
+                     CALL ZUNGBR( 'Q', M, M, M, U, LDU, WORK( ITAUQ ),
+     $                            WORK( IWORK ), LWORK-IWORK+1, IERR )
+                     IRWORK = IE + M
+*
+*                    Perform bidiagonal QR iteration, computing left
+*                    singular vectors of L in U and computing right
+*                    singular vectors of L in WORK(IU)
+*                    (CWorkspace: need M*M)
+*                    (RWorkspace: need BDSPAC)
+*
+                     CALL ZBDSQR( 'U', M, M, M, 0, S, RWORK( IE ),
+     $                            WORK( IU ), LDWRKU, U, LDU, CDUM, 1,
+     $                            RWORK( IRWORK ), INFO )
 *
 *                    Multiply right singular vectors of L in WORK(IU) by
-*                    Q in A, storing result in VT
+*                    Q in VT, storing result in A
 *                    (CWorkspace: need M*M)
 *                    (RWorkspace: 0)
 *
-                     CALL ZGEMM( 'N', 'N', M, N, M, CONE, WORK( IU ),
-     $                           LDWRKU, A, LDA, CZERO, VT, LDVT )
+                     CALL ZGEMM( 'N', 'N', M, N, M, CONE, WORK( IU ),
+     $                           LDWRKU, VT, LDVT, CZERO, A, LDA )
+*
+*                    Copy right singular vectors of A from A to VT
+*
+                     CALL ZLACPY( 'F', M, N, A, LDA, VT, LDVT )
+*
+                  ELSE
+*
+*                    Insufficient workspace for a fast algorithm
+*
+                     ITAU = 1
+                     IWORK = ITAU + M
+*
+*                    Compute A=L*Q, copying result to VT
+*                    (CWorkspace: need 2*M, prefer M+M*NB)
+*                    (RWorkspace: 0)
+*
+                     CALL ZGELQF( M, N, A, LDA, WORK( ITAU ),
+     $                            WORK( IWORK ), LWORK-IWORK+1, IERR )
+                     CALL ZLACPY( 'U', M, N, A, LDA, VT, LDVT )
+*
+*                    Generate Q in VT
+*                    (CWorkspace: need M+N, prefer M+N*NB)
+*                    (RWorkspace: 0)
+*
+                     CALL ZUNGLQ( N, N, M, VT, LDVT, WORK( ITAU ),
+     $                            WORK( IWORK ), LWORK-IWORK+1, IERR )
+*
+*                    Copy L to U, zeroing out above it
+*
+                     CALL ZLACPY( 'L', M, M, A, LDA, U, LDU )
+                     CALL ZLASET( 'U', M-1, M-1, CZERO, CZERO,
+     $                            U( 1, 2 ), LDU )
+                     IE = 1
+                     ITAUQ = ITAU
+                     ITAUP = ITAUQ + M
+                     IWORK = ITAUP + M
+*
+*                    Bidiagonalize L in U
+*                    (CWorkspace: need 3*M, prefer 2*M+2*M*NB)
+*                    (RWorkspace: need M)
+*
+                     CALL ZGEBRD( M, M, U, LDU, S, RWORK( IE ),
+     $                            WORK( ITAUQ ), WORK( ITAUP ),
+     $                            WORK( IWORK ), LWORK-IWORK+1, IERR )
+*
+*                    Multiply right bidiagonalizing vectors in U by Q
+*                    in VT
+*                    (CWorkspace: need 2*M+N, prefer 2*M+N*NB)
+*                    (RWorkspace: 0)
+*
+                     CALL ZUNMBR( 'P', 'L', 'C', M, N, M, U, LDU,
+     $                            WORK( ITAUP ), VT, LDVT,
+     $                            WORK( IWORK ), LWORK-IWORK+1, IERR )
+*
+*                    Generate left bidiagonalizing vectors in U
+*                    (CWorkspace: need 3*M, prefer 2*M+M*NB)
+*                    (RWorkspace: 0)
+*
+                     CALL ZUNGBR( 'Q', M, M, M, U, LDU, WORK( ITAUQ ),
+     $                            WORK( IWORK ), LWORK-IWORK+1, IERR )
+                     IRWORK = IE + M
+*
+*                    Perform bidiagonal QR iteration, computing left
+*                    singular vectors of A in U and computing right
+*                    singular vectors of A in VT
+*                    (CWorkspace: 0)
+*                    (RWorkspace: need BDSPAC)
+*
+                     CALL ZBDSQR( 'U', M, N, M, 0, S, RWORK( IE ), VT,
+     $                            LDVT, U, LDU, CDUM, 1,
+     $                            RWORK( IRWORK ), INFO )
+*
+                  END IF
+*
+               END IF
+*
+            END IF
+*
+         ELSE
+*
+*           N .LT. MNTHR
+*
+*           Path 10t(N greater than M, but not much larger)
+*           Reduce to bidiagonal form without LQ decomposition
+*
+            IE = 1
+            ITAUQ = 1
+            ITAUP = ITAUQ + M
+            IWORK = ITAUP + M
+*
+*           Bidiagonalize A
+*           (CWorkspace: need 2*M+N, prefer 2*M+(M+N)*NB)
+*           (RWorkspace: M)
+*
+            CALL ZGEBRD( M, N, A, LDA, S, RWORK( IE ), WORK( ITAUQ ),
+     $                   WORK( ITAUP ), WORK( IWORK ), LWORK-IWORK+1,
+     $                   IERR )
+            IF( WNTUAS ) THEN
+*
+*              If left singular vectors desired in U, copy result to U
+*              and generate left bidiagonalizing vectors in U
+*              (CWorkspace: need 3*M-1, prefer 2*M+(M-1)*NB)
+*              (RWorkspace: 0)
+*
+               CALL ZLACPY( 'L', M, M, A, LDA, U, LDU )
+               CALL ZUNGBR( 'Q', M, M, N, U, LDU, WORK( ITAUQ ),
+     $                      WORK( IWORK ), LWORK-IWORK+1, IERR )
+            END IF
+            IF( WNTVAS ) THEN
+*
+*              If right singular vectors desired in VT, copy result to
+*              VT and generate right bidiagonalizing vectors in VT
+*              (CWorkspace: need 2*M+NRVT, prefer 2*M+NRVT*NB)
+*              (RWorkspace: 0)
+*
+               CALL ZLACPY( 'U', M, N, A, LDA, VT, LDVT )
+               IF( WNTVA )
+     $            NRVT = N
+               IF( WNTVS )
+     $            NRVT = M
+               CALL ZUNGBR( 'P', NRVT, N, M, VT, LDVT, WORK( ITAUP ),
+     $                      WORK( IWORK ), LWORK-IWORK+1, IERR )
+            END IF
+            IF( WNTUO ) THEN
+*
+*              If left singular vectors desired in A, generate left
+*              bidiagonalizing vectors in A
+*              (CWorkspace: need 3*M-1, prefer 2*M+(M-1)*NB)
+*              (RWorkspace: 0)
+*
+               CALL ZUNGBR( 'Q', M, M, N, A, LDA, WORK( ITAUQ ),
+     $                      WORK( IWORK ), LWORK-IWORK+1, IERR )
+            END IF
+            IF( WNTVO ) THEN
+*
+*              If right singular vectors desired in A, generate right
+*              bidiagonalizing vectors in A
+*              (CWorkspace: need 3*M, prefer 2*M+M*NB)
+*              (RWorkspace: 0)
+*
+               CALL ZUNGBR( 'P', M, N, M, A, LDA, WORK( ITAUP ),
+     $                      WORK( IWORK ), LWORK-IWORK+1, IERR )
+            END IF
+            IRWORK = IE + M
+            IF( WNTUAS .OR. WNTUO )
+     $         NRU = M
+            IF( WNTUN )
+     $         NRU = 0
+            IF( WNTVAS .OR. WNTVO )
+     $         NCVT = N
+            IF( WNTVN )
+     $         NCVT = 0
+            IF( ( .NOT.WNTUO ) .AND. ( .NOT.WNTVO ) ) THEN
+*
+*              Perform bidiagonal QR iteration, if desired, computing
+*              left singular vectors in U and computing right singular
+*              vectors in VT
+*              (CWorkspace: 0)
+*              (RWorkspace: need BDSPAC)
+*
+               CALL ZBDSQR( 'L', M, NCVT, NRU, 0, S, RWORK( IE ), VT,
+     $                      LDVT, U, LDU, CDUM, 1, RWORK( IRWORK ),
+     $                      INFO )
+            ELSE IF( ( .NOT.WNTUO ) .AND. WNTVO ) THEN
+*
+*              Perform bidiagonal QR iteration, if desired, computing
+*              left singular vectors in U and computing right singular
+*              vectors in A
+*              (CWorkspace: 0)
+*              (RWorkspace: need BDSPAC)
+*
+               CALL ZBDSQR( 'L', M, NCVT, NRU, 0, S, RWORK( IE ), A,
+     $                      LDA, U, LDU, CDUM, 1, RWORK( IRWORK ),
+     $                      INFO )
+            ELSE
+*
+*              Perform bidiagonal QR iteration, if desired, computing
+*              left singular vectors in A and computing right singular
+*              vectors in VT
+*              (CWorkspace: 0)
+*              (RWorkspace: need BDSPAC)
+*
+               CALL ZBDSQR( 'L', M, NCVT, NRU, 0, S, RWORK( IE ), VT,
+     $                      LDVT, A, LDA, CDUM, 1, RWORK( IRWORK ),
+     $                      INFO )
+            END IF
+*
+         END IF
+*
+      END IF
+*
+*     Undo scaling if necessary
+*
+      IF( ISCL.EQ.1 ) THEN
+         IF( ANRM.GT.BIGNUM )
+     $      CALL DLASCL( 'G', 0, 0, BIGNUM, ANRM, MINMN, 1, S, MINMN,
+     $                   IERR )
+         IF( INFO.NE.0 .AND. ANRM.GT.BIGNUM )
+     $      CALL DLASCL( 'G', 0, 0, BIGNUM, ANRM, MINMN-1, 1,
+     $                   RWORK( IE ), MINMN, IERR )
+         IF( ANRM.LT.SMLNUM )
+     $      CALL DLASCL( 'G', 0, 0, SMLNUM, ANRM, MINMN, 1, S, MINMN,
+     $                   IERR )
+         IF( INFO.NE.0 .AND. ANRM.LT.SMLNUM )
+     $      CALL DLASCL( 'G', 0, 0, SMLNUM, ANRM, MINMN-1, 1,
+     $                   RWORK( IE ), MINMN, IERR )
+      END IF
+*
+*     Return optimal workspace in WORK(1)
+*
+      WORK( 1 ) = MAXWRK
+*
+      RETURN
+*
+*     End of ZGESVD
+*
+      END
+*> \brief <b> ZGESVX computes the solution to system of linear equations A * X = B for GE matrices</b>
+*
+*  =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
+*
+*> \htmlonly
+*> Download ZGESVX + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/zgesvx.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/zgesvx.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/zgesvx.f">
+*> [TXT]</a>
+*> \endhtmlonly
+*
+*  Definition:
+*  ===========
+*
+*       SUBROUTINE ZGESVX( FACT, TRANS, N, NRHS, A, LDA, AF, LDAF, IPIV,
+*                          EQUED, R, C, B, LDB, X, LDX, RCOND, FERR, BERR,
+*                          WORK, RWORK, INFO )
+*
+*       .. Scalar Arguments ..
+*       CHARACTER          EQUED, FACT, TRANS
+*       INTEGER            INFO, LDA, LDAF, LDB, LDX, N, NRHS
+*       DOUBLE PRECISION   RCOND
+*       ..
+*       .. Array Arguments ..
+*       INTEGER            IPIV( * )
+*       DOUBLE PRECISION   BERR( * ), C( * ), FERR( * ), R( * ),
+*      $                   RWORK( * )
+*       COMPLEX*16         A( LDA, * ), AF( LDAF, * ), B( LDB, * ),
+*      $                   WORK( * ), X( LDX, * )
+*       ..
+*
+*
+*> \par Purpose:
+*  =============
+*>
+*> \verbatim
+*>
+*> ZGESVX uses the LU factorization to compute the solution to a complex
+*> system of linear equations
+*>    A * X = B,
+*> where A is an N-by-N matrix and X and B are N-by-NRHS matrices.
+*>
+*> Error bounds on the solution and a condition estimate are also
+*> provided.
+*> \endverbatim
+*
+*> \par Description:
+*  =================
+*>
+*> \verbatim
+*>
+*> The following steps are performed:
+*>
+*> 1. If FACT = 'E', real scaling factors are computed to equilibrate
+*>    the system:
+*>       TRANS = 'N':  diag(R)*A*diag(C)     *inv(diag(C))*X = diag(R)*B
+*>       TRANS = 'T': (diag(R)*A*diag(C))**T *inv(diag(R))*X = diag(C)*B
+*>       TRANS = 'C': (diag(R)*A*diag(C))**H *inv(diag(R))*X = diag(C)*B
+*>    Whether or not the system will be equilibrated depends on the
+*>    scaling of the matrix A, but if equilibration is used, A is
+*>    overwritten by diag(R)*A*diag(C) and B by diag(R)*B (if TRANS='N')
+*>    or diag(C)*B (if TRANS = 'T' or 'C').
+*>
+*> 2. If FACT = 'N' or 'E', the LU decomposition is used to factor the
+*>    matrix A (after equilibration if FACT = 'E') as
+*>       A = P * L * U,
+*>    where P is a permutation matrix, L is a unit lower triangular
+*>    matrix, and U is upper triangular.
+*>
+*> 3. If some U(i,i)=0, so that U is exactly singular, then the routine
+*>    returns with INFO = i. Otherwise, the factored form of A is used
+*>    to estimate the condition number of the matrix A.  If the
+*>    reciprocal of the condition number is less than machine precision,
+*>    INFO = N+1 is returned as a warning, but the routine still goes on
+*>    to solve for X and compute error bounds as described below.
+*>
+*> 4. The system of equations is solved for X using the factored form
+*>    of A.
+*>
+*> 5. Iterative refinement is applied to improve the computed solution
+*>    matrix and calculate error bounds and backward error estimates
+*>    for it.
+*>
+*> 6. If equilibration was used, the matrix X is premultiplied by
+*>    diag(C) (if TRANS = 'N') or diag(R) (if TRANS = 'T' or 'C') so
+*>    that it solves the original system before equilibration.
+*> \endverbatim
+*
+*  Arguments:
+*  ==========
+*
+*> \param[in] FACT
+*> \verbatim
+*>          FACT is CHARACTER*1
+*>          Specifies whether or not the factored form of the matrix A is
+*>          supplied on entry, and if not, whether the matrix A should be
+*>          equilibrated before it is factored.
+*>          = 'F':  On entry, AF and IPIV contain the factored form of A.
+*>                  If EQUED is not 'N', the matrix A has been
+*>                  equilibrated with scaling factors given by R and C.
+*>                  A, AF, and IPIV are not modified.
+*>          = 'N':  The matrix A will be copied to AF and factored.
+*>          = 'E':  The matrix A will be equilibrated if necessary, then
+*>                  copied to AF and factored.
+*> \endverbatim
+*>
+*> \param[in] TRANS
+*> \verbatim
+*>          TRANS is CHARACTER*1
+*>          Specifies the form of the system of equations:
+*>          = 'N':  A * X = B     (No transpose)
+*>          = 'T':  A**T * X = B  (Transpose)
+*>          = 'C':  A**H * X = B  (Conjugate transpose)
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*>          N is INTEGER
+*>          The number of linear equations, i.e., the order of the
+*>          matrix A.  N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*>          NRHS is INTEGER
+*>          The number of right hand sides, i.e., the number of columns
+*>          of the matrices B and X.  NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*>          A is COMPLEX*16 array, dimension (LDA,N)
+*>          On entry, the N-by-N matrix A.  If FACT = 'F' and EQUED is
+*>          not 'N', then A must have been equilibrated by the scaling
+*>          factors in R and/or C.  A is not modified if FACT = 'F' or
+*>          'N', or if FACT = 'E' and EQUED = 'N' on exit.
+*>
+*>          On exit, if EQUED .ne. 'N', A is scaled as follows:
+*>          EQUED = 'R':  A := diag(R) * A
+*>          EQUED = 'C':  A := A * diag(C)
+*>          EQUED = 'B':  A := diag(R) * A * diag(C).
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*>          LDA is INTEGER
+*>          The leading dimension of the array A.  LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in,out] AF
+*> \verbatim
+*>          AF is COMPLEX*16 array, dimension (LDAF,N)
+*>          If FACT = 'F', then AF is an input argument and on entry
+*>          contains the factors L and U from the factorization
+*>          A = P*L*U as computed by ZGETRF.  If EQUED .ne. 'N', then
+*>          AF is the factored form of the equilibrated matrix A.
+*>
+*>          If FACT = 'N', then AF is an output argument and on exit
+*>          returns the factors L and U from the factorization A = P*L*U
+*>          of the original matrix A.
+*>
+*>          If FACT = 'E', then AF is an output argument and on exit
+*>          returns the factors L and U from the factorization A = P*L*U
+*>          of the equilibrated matrix A (see the description of A for
+*>          the form of the equilibrated matrix).
+*> \endverbatim
+*>
+*> \param[in] LDAF
+*> \verbatim
+*>          LDAF is INTEGER
+*>          The leading dimension of the array AF.  LDAF >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in,out] IPIV
+*> \verbatim
+*>          IPIV is INTEGER array, dimension (N)
+*>          If FACT = 'F', then IPIV is an input argument and on entry
+*>          contains the pivot indices from the factorization A = P*L*U
+*>          as computed by ZGETRF; row i of the matrix was interchanged
+*>          with row IPIV(i).
+*>
+*>          If FACT = 'N', then IPIV is an output argument and on exit
+*>          contains the pivot indices from the factorization A = P*L*U
+*>          of the original matrix A.
+*>
+*>          If FACT = 'E', then IPIV is an output argument and on exit
+*>          contains the pivot indices from the factorization A = P*L*U
+*>          of the equilibrated matrix A.
+*> \endverbatim
+*>
+*> \param[in,out] EQUED
+*> \verbatim
+*>          EQUED is CHARACTER*1
+*>          Specifies the form of equilibration that was done.
+*>          = 'N':  No equilibration (always true if FACT = 'N').
+*>          = 'R':  Row equilibration, i.e., A has been premultiplied by
+*>                  diag(R).
+*>          = 'C':  Column equilibration, i.e., A has been postmultiplied
+*>                  by diag(C).
+*>          = 'B':  Both row and column equilibration, i.e., A has been
+*>                  replaced by diag(R) * A * diag(C).
+*>          EQUED is an input argument if FACT = 'F'; otherwise, it is an
+*>          output argument.
+*> \endverbatim
+*>
+*> \param[in,out] R
+*> \verbatim
+*>          R is DOUBLE PRECISION array, dimension (N)
+*>          The row scale factors for A.  If EQUED = 'R' or 'B', A is
+*>          multiplied on the left by diag(R); if EQUED = 'N' or 'C', R
+*>          is not accessed.  R is an input argument if FACT = 'F';
+*>          otherwise, R is an output argument.  If FACT = 'F' and
+*>          EQUED = 'R' or 'B', each element of R must be positive.
+*> \endverbatim
+*>
+*> \param[in,out] C
+*> \verbatim
+*>          C is DOUBLE PRECISION array, dimension (N)
+*>          The column scale factors for A.  If EQUED = 'C' or 'B', A is
+*>          multiplied on the right by diag(C); if EQUED = 'N' or 'R', C
+*>          is not accessed.  C is an input argument if FACT = 'F';
+*>          otherwise, C is an output argument.  If FACT = 'F' and
+*>          EQUED = 'C' or 'B', each element of C must be positive.
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*>          B is COMPLEX*16 array, dimension (LDB,NRHS)
+*>          On entry, the N-by-NRHS right hand side matrix B.
+*>          On exit,
+*>          if EQUED = 'N', B is not modified;
+*>          if TRANS = 'N' and EQUED = 'R' or 'B', B is overwritten by
+*>          diag(R)*B;
+*>          if TRANS = 'T' or 'C' and EQUED = 'C' or 'B', B is
+*>          overwritten by diag(C)*B.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*>          LDB is INTEGER
+*>          The leading dimension of the array B.  LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] X
+*> \verbatim
+*>          X is COMPLEX*16 array, dimension (LDX,NRHS)
+*>          If INFO = 0 or INFO = N+1, the N-by-NRHS solution matrix X
+*>          to the original system of equations.  Note that A and B are
+*>          modified on exit if EQUED .ne. 'N', and the solution to the
+*>          equilibrated system is inv(diag(C))*X if TRANS = 'N' and
+*>          EQUED = 'C' or 'B', or inv(diag(R))*X if TRANS = 'T' or 'C'
+*>          and EQUED = 'R' or 'B'.
+*> \endverbatim
+*>
+*> \param[in] LDX
+*> \verbatim
+*>          LDX is INTEGER
+*>          The leading dimension of the array X.  LDX >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] RCOND
+*> \verbatim
+*>          RCOND is DOUBLE PRECISION
+*>          The estimate of the reciprocal condition number of the matrix
+*>          A after equilibration (if done).  If RCOND is less than the
+*>          machine precision (in particular, if RCOND = 0), the matrix
+*>          is singular to working precision.  This condition is
+*>          indicated by a return code of INFO > 0.
+*> \endverbatim
+*>
+*> \param[out] FERR
+*> \verbatim
+*>          FERR is DOUBLE PRECISION array, dimension (NRHS)
+*>          The estimated forward error bound for each solution vector
+*>          X(j) (the j-th column of the solution matrix X).
+*>          If XTRUE is the true solution corresponding to X(j), FERR(j)
+*>          is an estimated upper bound for the magnitude of the largest
+*>          element in (X(j) - XTRUE) divided by the magnitude of the
+*>          largest element in X(j).  The estimate is as reliable as
+*>          the estimate for RCOND, and is almost always a slight
+*>          overestimate of the true error.
+*> \endverbatim
+*>
+*> \param[out] BERR
+*> \verbatim
+*>          BERR is DOUBLE PRECISION array, dimension (NRHS)
+*>          The componentwise relative backward error of each solution
+*>          vector X(j) (i.e., the smallest relative change in
+*>          any element of A or B that makes X(j) an exact solution).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*>          WORK is COMPLEX*16 array, dimension (2*N)
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*>          RWORK is DOUBLE PRECISION array, dimension (2*N)
+*>          On exit, RWORK(1) contains the reciprocal pivot growth
+*>          factor norm(A)/norm(U). The "max absolute element" norm is
+*>          used. If RWORK(1) is much less than 1, then the stability
+*>          of the LU factorization of the (equilibrated) matrix A
+*>          could be poor. This also means that the solution X, condition
+*>          estimator RCOND, and forward error bound FERR could be
+*>          unreliable. If factorization fails with 0<INFO<=N, then
+*>          RWORK(1) contains the reciprocal pivot growth factor for the
+*>          leading INFO columns of A.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*>          INFO is INTEGER
+*>          = 0:  successful exit
+*>          < 0:  if INFO = -i, the i-th argument had an illegal value
+*>          > 0:  if INFO = i, and i is
+*>                <= N:  U(i,i) is exactly zero.  The factorization has
+*>                       been completed, but the factor U is exactly
+*>                       singular, so the solution and error bounds
+*>                       could not be computed. RCOND = 0 is returned.
+*>                = N+1: U is nonsingular, but RCOND is less than machine
+*>                       precision, meaning that the matrix is singular
+*>                       to working precision.  Nevertheless, the
+*>                       solution and error bounds are computed because
+*>                       there are a number of situations where the
+*>                       computed solution can be more accurate than the
+*>                       value of RCOND would suggest.
+*> \endverbatim
+*
+*  Authors:
+*  ========
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date April 2012
+*
+*> \ingroup complex16GEsolve
+*
+*  =====================================================================
+      SUBROUTINE ZGESVX( FACT, TRANS, N, NRHS, A, LDA, AF, LDAF, IPIV,
+     $                   EQUED, R, C, B, LDB, X, LDX, RCOND, FERR, BERR,
+     $                   WORK, RWORK, INFO )
+*
+*  -- LAPACK driver routine (version 3.7.0) --
+*  -- LAPACK is a software package provided by Univ. of Tennessee,    --
+*  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+*     April 2012
+*
+*     .. Scalar Arguments ..
+      CHARACTER          EQUED, FACT, TRANS
+      INTEGER            INFO, LDA, LDAF, LDB, LDX, N, NRHS
+      DOUBLE PRECISION   RCOND
+*     ..
+*     .. Array Arguments ..
+      INTEGER            IPIV( * )
+      DOUBLE PRECISION   BERR( * ), C( * ), FERR( * ), R( * ),
+     $                   RWORK( * )
+      COMPLEX*16         A( LDA, * ), AF( LDAF, * ), B( LDB, * ),
+     $                   WORK( * ), X( LDX, * )
+*     ..
+*
+*  =====================================================================
+*
+*     .. Parameters ..
+      DOUBLE PRECISION   ZERO, ONE
+      PARAMETER          ( ZERO = 0.0D+0, ONE = 1.0D+0 )
+*     ..
+*     .. Local Scalars ..
+      LOGICAL            COLEQU, EQUIL, NOFACT, NOTRAN, ROWEQU
+      CHARACTER          NORM
+      INTEGER            I, INFEQU, J
+      DOUBLE PRECISION   AMAX, ANORM, BIGNUM, COLCND, RCMAX, RCMIN,
+     $                   ROWCND, RPVGRW, SMLNUM
+*     ..
+*     .. External Functions ..
+      LOGICAL            LSAME
+      DOUBLE PRECISION   DLAMCH, ZLANGE, ZLANTR
+      EXTERNAL           LSAME, DLAMCH, ZLANGE, ZLANTR
+*     ..
+*     .. External Subroutines ..
+      EXTERNAL           XERBLA, ZGECON, ZGEEQU, ZGERFS, ZGETRF, ZGETRS,
+     $                   ZLACPY, ZLAQGE
+*     ..
+*     .. Intrinsic Functions ..
+      INTRINSIC          MAX, MIN
+*     ..
+*     .. Executable Statements ..
+*
+      INFO = 0
+      NOFACT = LSAME( FACT, 'N' )
+      EQUIL = LSAME( FACT, 'E' )
+      NOTRAN = LSAME( TRANS, 'N' )
+      IF( NOFACT .OR. EQUIL ) THEN
+         EQUED = 'N'
+         ROWEQU = .FALSE.
+         COLEQU = .FALSE.
+      ELSE
+         ROWEQU = LSAME( EQUED, 'R' ) .OR. LSAME( EQUED, 'B' )
+         COLEQU = LSAME( EQUED, 'C' ) .OR. LSAME( EQUED, 'B' )
+         SMLNUM = DLAMCH( 'Safe minimum' )
+         BIGNUM = ONE / SMLNUM
+      END IF
+*
+*     Test the input parameters.
+*
+      IF( .NOT.NOFACT .AND. .NOT.EQUIL .AND. .NOT.LSAME( FACT, 'F' ) )
+     $     THEN
+         INFO = -1
+      ELSE IF( .NOT.NOTRAN .AND. .NOT.LSAME( TRANS, 'T' ) .AND. .NOT.
+     $         LSAME( TRANS, 'C' ) ) THEN
+         INFO = -2
+      ELSE IF( N.LT.0 ) THEN
+         INFO = -3
+      ELSE IF( NRHS.LT.0 ) THEN
+         INFO = -4
+      ELSE IF( LDA.LT.MAX( 1, N ) ) THEN
+         INFO = -6
+      ELSE IF( LDAF.LT.MAX( 1, N ) ) THEN
+         INFO = -8
+      ELSE IF( LSAME( FACT, 'F' ) .AND. .NOT.
+     $         ( ROWEQU .OR. COLEQU .OR. LSAME( EQUED, 'N' ) ) ) THEN
+         INFO = -10
+      ELSE
+         IF( ROWEQU ) THEN
+            RCMIN = BIGNUM
+            RCMAX = ZERO
+            DO 10 J = 1, N
+               RCMIN = MIN( RCMIN, R( J ) )
+               RCMAX = MAX( RCMAX, R( J ) )
+   10       CONTINUE
+            IF( RCMIN.LE.ZERO ) THEN
+               INFO = -11
+            ELSE IF( N.GT.0 ) THEN
+               ROWCND = MAX( RCMIN, SMLNUM ) / MIN( RCMAX, BIGNUM )
+            ELSE
+               ROWCND = ONE
+            END IF
+         END IF
+         IF( COLEQU .AND. INFO.EQ.0 ) THEN
+            RCMIN = BIGNUM
+            RCMAX = ZERO
+            DO 20 J = 1, N
+               RCMIN = MIN( RCMIN, C( J ) )
+               RCMAX = MAX( RCMAX, C( J ) )
+   20       CONTINUE
+            IF( RCMIN.LE.ZERO ) THEN
+               INFO = -12
+            ELSE IF( N.GT.0 ) THEN
+               COLCND = MAX( RCMIN, SMLNUM ) / MIN( RCMAX, BIGNUM )
+            ELSE
+               COLCND = ONE
+            END IF
+         END IF
+         IF( INFO.EQ.0 ) THEN
+            IF( LDB.LT.MAX( 1, N ) ) THEN
+               INFO = -14
+            ELSE IF( LDX.LT.MAX( 1, N ) ) THEN
+               INFO = -16
+            END IF
+         END IF
+      END IF
+*
+      IF( INFO.NE.0 ) THEN
+         CALL XERBLA( 'ZGESVX', -INFO )
+         RETURN
+      END IF
+*
+      IF( EQUIL ) THEN
+*
+*        Compute row and column scalings to equilibrate the matrix A.
+*
+         CALL ZGEEQU( N, N, A, LDA, R, C, ROWCND, COLCND, AMAX, INFEQU )
+         IF( INFEQU.EQ.0 ) THEN
+*
+*           Equilibrate the matrix.
+*
+            CALL ZLAQGE( N, N, A, LDA, R, C, ROWCND, COLCND, AMAX,
+     $                   EQUED )
+            ROWEQU = LSAME( EQUED, 'R' ) .OR. LSAME( EQUED, 'B' )
+            COLEQU = LSAME( EQUED, 'C' ) .OR. LSAME( EQUED, 'B' )
+         END IF
+      END IF
+*
+*     Scale the right hand side.
+*
+      IF( NOTRAN ) THEN
+         IF( ROWEQU ) THEN
+            DO 40 J = 1, NRHS
+               DO 30 I = 1, N
+                  B( I, J ) = R( I )*B( I, J )
+   30          CONTINUE
+   40       CONTINUE
+         END IF
+      ELSE IF( COLEQU ) THEN
+         DO 60 J = 1, NRHS
+            DO 50 I = 1, N
+               B( I, J ) = C( I )*B( I, J )
+   50       CONTINUE
+   60    CONTINUE
+      END IF
+*
+      IF( NOFACT .OR. EQUIL ) THEN
+*
+*        Compute the LU factorization of A.
+*
+         CALL ZLACPY( 'Full', N, N, A, LDA, AF, LDAF )
+         CALL ZGETRF( N, N, AF, LDAF, IPIV, INFO )
+*
+*        Return if INFO is non-zero.
+*
+         IF( INFO.GT.0 ) THEN
+*
+*           Compute the reciprocal pivot growth factor of the
+*           leading rank-deficient INFO columns of A.
+*
+            RPVGRW = ZLANTR( 'M', 'U', 'N', INFO, INFO, AF, LDAF,
+     $               RWORK )
+            IF( RPVGRW.EQ.ZERO ) THEN
+               RPVGRW = ONE
+            ELSE
+               RPVGRW = ZLANGE( 'M', N, INFO, A, LDA, RWORK ) /
+     $                  RPVGRW
+            END IF
+            RWORK( 1 ) = RPVGRW
+            RCOND = ZERO
+            RETURN
+         END IF
+      END IF
+*
+*     Compute the norm of the matrix A and the
+*     reciprocal pivot growth factor RPVGRW.
+*
+      IF( NOTRAN ) THEN
+         NORM = '1'
+      ELSE
+         NORM = 'I'
+      END IF
+      ANORM = ZLANGE( NORM, N, N, A, LDA, RWORK )
+      RPVGRW = ZLANTR( 'M', 'U', 'N', N, N, AF, LDAF, RWORK )
+      IF( RPVGRW.EQ.ZERO ) THEN
+         RPVGRW = ONE
+      ELSE
+         RPVGRW = ZLANGE( 'M', N, N, A, LDA, RWORK ) / RPVGRW
+      END IF
+*
+*     Compute the reciprocal of the condition number of A.
+*
+      CALL ZGECON( NORM, N, AF, LDAF, ANORM, RCOND, WORK, RWORK, INFO )
+*
+*     Compute the solution matrix X.
+*
+      CALL ZLACPY( 'Full', N, NRHS, B, LDB, X, LDX )
+      CALL ZGETRS( TRANS, N, NRHS, AF, LDAF, IPIV, X, LDX, INFO )
+*
+*     Use iterative refinement to improve the computed solution and
+*     compute error bounds and backward error estimates for it.
+*
+      CALL ZGERFS( TRANS, N, NRHS, A, LDA, AF, LDAF, IPIV, B, LDB, X,
+     $             LDX, FERR, BERR, WORK, RWORK, INFO )
+*
+*     Transform the solution matrix X to a solution of the original
+*     system.
+*
+      IF( NOTRAN ) THEN
+         IF( COLEQU ) THEN
+            DO 80 J = 1, NRHS
+               DO 70 I = 1, N
+                  X( I, J ) = C( I )*X( I, J )
+   70          CONTINUE
+   80       CONTINUE
+            DO 90 J = 1, NRHS
+               FERR( J ) = FERR( J ) / COLCND
+   90       CONTINUE
+         END IF
+      ELSE IF( ROWEQU ) THEN
+         DO 110 J = 1, NRHS
+            DO 100 I = 1, N
+               X( I, J ) = R( I )*X( I, J )
+  100       CONTINUE
+  110    CONTINUE
+         DO 120 J = 1, NRHS
+            FERR( J ) = FERR( J ) / ROWCND
+  120    CONTINUE
+      END IF
+*
+*     Set INFO = N+1 if the matrix is singular to working precision.
+*
+      IF( RCOND.LT.DLAMCH( 'Epsilon' ) )
+     $   INFO = N + 1
+*
+      RWORK( 1 ) = RPVGRW
+      RETURN
+*
+*     End of ZGESVX
+*
+      END
+*> \brief \b ZGETC2 computes the LU factorization with complete pivoting of the general n-by-n matrix.
+*
+*  =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
+*
+*> \htmlonly
+*> Download ZGETC2 + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/zgetc2.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/zgetc2.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/zgetc2.f">
+*> [TXT]</a>
+*> \endhtmlonly
+*
+*  Definition:
+*  ===========
+*
+*       SUBROUTINE ZGETC2( N, A, LDA, IPIV, JPIV, INFO )
+*
+*       .. Scalar Arguments ..
+*       INTEGER            INFO, LDA, N
+*       ..
+*       .. Array Arguments ..
+*       INTEGER            IPIV( * ), JPIV( * )
+*       COMPLEX*16         A( LDA, * )
+*       ..
+*
+*
+*> \par Purpose:
+*  =============
+*>
+*> \verbatim
+*>
+*> ZGETC2 computes an LU factorization, using complete pivoting, of the
+*> n-by-n matrix A. The factorization has the form A = P * L * U * Q,
+*> where P and Q are permutation matrices, L is lower triangular with
+*> unit diagonal elements and U is upper triangular.
+*>
+*> This is a level 1 BLAS version of the algorithm.
+*> \endverbatim
+*
+*  Arguments:
+*  ==========
+*
+*> \param[in] N
+*> \verbatim
+*>          N is INTEGER
+*>          The order of the matrix A. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*>          A is COMPLEX*16 array, dimension (LDA, N)
+*>          On entry, the n-by-n matrix to be factored.
+*>          On exit, the factors L and U from the factorization
+*>          A = P*L*U*Q; the unit diagonal elements of L are not stored.
+*>          If U(k, k) appears to be less than SMIN, U(k, k) is given the
+*>          value of SMIN, giving a nonsingular perturbed system.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*>          LDA is INTEGER
+*>          The leading dimension of the array A.  LDA >= max(1, N).
+*> \endverbatim
+*>
+*> \param[out] IPIV
+*> \verbatim
+*>          IPIV is INTEGER array, dimension (N).
+*>          The pivot indices; for 1 <= i <= N, row i of the
+*>          matrix has been interchanged with row IPIV(i).
+*> \endverbatim
+*>
+*> \param[out] JPIV
+*> \verbatim
+*>          JPIV is INTEGER array, dimension (N).
+*>          The pivot indices; for 1 <= j <= N, column j of the
+*>          matrix has been interchanged with column JPIV(j).
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*>          INFO is INTEGER
+*>           = 0: successful exit
+*>           > 0: if INFO = k, U(k, k) is likely to produce overflow if
+*>                one tries to solve for x in Ax = b. So U is perturbed
+*>                to avoid the overflow.
+*> \endverbatim
+*
+*  Authors:
+*  ========
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date June 2016
+*
+*> \ingroup complex16GEauxiliary
+*
+*> \par Contributors:
+*  ==================
+*>
+*>     Bo Kagstrom and Peter Poromaa, Department of Computing Science,
+*>     Umea University, S-901 87 Umea, Sweden.
+*
+*  =====================================================================
+      SUBROUTINE ZGETC2( N, A, LDA, IPIV, JPIV, INFO )
+*
+*  -- LAPACK auxiliary routine (version 3.7.0) --
+*  -- LAPACK is a software package provided by Univ. of Tennessee,    --
+*  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+*     June 2016
+*
+*     .. Scalar Arguments ..
+      INTEGER            INFO, LDA, N
+*     ..
+*     .. Array Arguments ..
+      INTEGER            IPIV( * ), JPIV( * )
+      COMPLEX*16         A( LDA, * )
+*     ..
+*
+*  =====================================================================
+*
+*     .. Parameters ..
+      DOUBLE PRECISION   ZERO, ONE
+      PARAMETER          ( ZERO = 0.0D+0, ONE = 1.0D+0 )
+*     ..
+*     .. Local Scalars ..
+      INTEGER            I, IP, IPV, J, JP, JPV
+      DOUBLE PRECISION   BIGNUM, EPS, SMIN, SMLNUM, XMAX
+*     ..
+*     .. External Subroutines ..
+      EXTERNAL           ZGERU, ZSWAP
+*     ..
+*     .. External Functions ..
+      DOUBLE PRECISION   DLAMCH
+      EXTERNAL           DLAMCH
+*     ..
+*     .. Intrinsic Functions ..
+      INTRINSIC          ABS, DCMPLX, MAX
+*     ..
+*     .. Executable Statements ..
+*
+      INFO = 0
+*
+*     Quick return if possible
+*
+      IF( N.EQ.0 )
+     $   RETURN
+*
+*     Set constants to control overflow
+*
+      EPS = DLAMCH( 'P' )
+      SMLNUM = DLAMCH( 'S' ) / EPS
+      BIGNUM = ONE / SMLNUM
+      CALL DLABAD( SMLNUM, BIGNUM )
+*
+*     Handle the case N=1 by itself
+*
+      IF( N.EQ.1 ) THEN
+         IPIV( 1 ) = 1
+         JPIV( 1 ) = 1
+         IF( ABS( A( 1, 1 ) ).LT.SMLNUM ) THEN
+            INFO = 1
+            A( 1, 1 ) = DCMPLX( SMLNUM, ZERO )
+         END IF
+         RETURN
+      END IF
+*
+*     Factorize A using complete pivoting.
+*     Set pivots less than SMIN to SMIN
+*
+      DO 40 I = 1, N - 1
+*
+*        Find max element in matrix A
+*
+         XMAX = ZERO
+         DO 20 IP = I, N
+            DO 10 JP = I, N
+               IF( ABS( A( IP, JP ) ).GE.XMAX ) THEN
+                  XMAX = ABS( A( IP, JP ) )
+                  IPV = IP
+                  JPV = JP
+               END IF
+   10       CONTINUE
+   20    CONTINUE
+         IF( I.EQ.1 )
+     $      SMIN = MAX( EPS*XMAX, SMLNUM )
+*
+*        Swap rows
+*
+         IF( IPV.NE.I )
+     $      CALL ZSWAP( N, A( IPV, 1 ), LDA, A( I, 1 ), LDA )
+         IPIV( I ) = IPV
+*
+*        Swap columns
+*
+         IF( JPV.NE.I )
+     $      CALL ZSWAP( N, A( 1, JPV ), 1, A( 1, I ), 1 )
+         JPIV( I ) = JPV
+*
+*        Check for singularity
+*
+         IF( ABS( A( I, I ) ).LT.SMIN ) THEN
+            INFO = I
+            A( I, I ) = DCMPLX( SMIN, ZERO )
+         END IF
+         DO 30 J = I + 1, N
+            A( J, I ) = A( J, I ) / A( I, I )
+   30    CONTINUE
+         CALL ZGERU( N-I, N-I, -DCMPLX( ONE ), A( I+1, I ), 1,
+     $               A( I, I+1 ), LDA, A( I+1, I+1 ), LDA )
+   40 CONTINUE
+*
+      IF( ABS( A( N, N ) ).LT.SMIN ) THEN
+         INFO = N
+         A( N, N ) = DCMPLX( SMIN, ZERO )
+      END IF
+*
+*     Set last pivots to N
+*
+      IPIV( N ) = N
+      JPIV( N ) = N
+*
+      RETURN
+*
+*     End of ZGETC2
+*
+      END
+*> \brief \b ZGETF2 computes the LU factorization of a general m-by-n matrix using partial pivoting with row interchanges (unblocked algorithm).
+*
+*  =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
+*
+*> \htmlonly
+*> Download ZGETF2 + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/zgetf2.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/zgetf2.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/zgetf2.f">
+*> [TXT]</a>
+*> \endhtmlonly
+*
+*  Definition:
+*  ===========
+*
+*       SUBROUTINE ZGETF2( M, N, A, LDA, IPIV, INFO )
+*
+*       .. Scalar Arguments ..
+*       INTEGER            INFO, LDA, M, N
+*       ..
+*       .. Array Arguments ..
+*       INTEGER            IPIV( * )
+*       COMPLEX*16         A( LDA, * )
+*       ..
+*
+*
+*> \par Purpose:
+*  =============
+*>
+*> \verbatim
+*>
+*> ZGETF2 computes an LU factorization of a general m-by-n matrix A
+*> using partial pivoting with row interchanges.
+*>
+*> The factorization has the form
+*>    A = P * L * U
+*> where P is a permutation matrix, L is lower triangular with unit
+*> diagonal elements (lower trapezoidal if m > n), and U is upper
+*> triangular (upper trapezoidal if m < n).
+*>
+*> This is the right-looking Level 2 BLAS version of the algorithm.
+*> \endverbatim
+*
+*  Arguments:
+*  ==========
+*
+*> \param[in] M
+*> \verbatim
+*>          M is INTEGER
+*>          The number of rows of the matrix A.  M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*>          N is INTEGER
+*>          The number of columns of the matrix A.  N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*>          A is COMPLEX*16 array, dimension (LDA,N)
+*>          On entry, the m by n matrix to be factored.
+*>          On exit, the factors L and U from the factorization
+*>          A = P*L*U; the unit diagonal elements of L are not stored.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*>          LDA is INTEGER
+*>          The leading dimension of the array A.  LDA >= max(1,M).
+*> \endverbatim
+*>
+*> \param[out] IPIV
+*> \verbatim
+*>          IPIV is INTEGER array, dimension (min(M,N))
+*>          The pivot indices; for 1 <= i <= min(M,N), row i of the
+*>          matrix was interchanged with row IPIV(i).
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*>          INFO is INTEGER
+*>          = 0: successful exit
+*>          < 0: if INFO = -k, the k-th argument had an illegal value
+*>          > 0: if INFO = k, U(k,k) is exactly zero. The factorization
+*>               has been completed, but the factor U is exactly
+*>               singular, and division by zero will occur if it is used
+*>               to solve a system of equations.
+*> \endverbatim
+*
+*  Authors:
+*  ========
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date December 2016
+*
+*> \ingroup complex16GEcomputational
+*
+*  =====================================================================
+      SUBROUTINE ZGETF2( M, N, A, LDA, IPIV, INFO )
+*
+*  -- LAPACK computational routine (version 3.7.0) --
+*  -- LAPACK is a software package provided by Univ. of Tennessee,    --
+*  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+*     December 2016
+*
+*     .. Scalar Arguments ..
+      INTEGER            INFO, LDA, M, N
+*     ..
+*     .. Array Arguments ..
+      INTEGER            IPIV( * )
+      COMPLEX*16         A( LDA, * )
+*     ..
+*
+*  =====================================================================
+*
+*     .. Parameters ..
+      COMPLEX*16         ONE, ZERO
+      PARAMETER          ( ONE = ( 1.0D+0, 0.0D+0 ),
+     $                   ZERO = ( 0.0D+0, 0.0D+0 ) )
+*     ..
+*     .. Local Scalars ..
+      DOUBLE PRECISION   SFMIN
+      INTEGER            I, J, JP
+*     ..
+*     .. External Functions ..
+      DOUBLE PRECISION   DLAMCH
+      INTEGER            IZAMAX
+      EXTERNAL           DLAMCH, IZAMAX
+*     ..
+*     .. External Subroutines ..
+      EXTERNAL           XERBLA, ZGERU, ZSCAL, ZSWAP
+*     ..
+*     .. Intrinsic Functions ..
+      INTRINSIC          MAX, MIN
+*     ..
+*     .. Executable Statements ..
+*
+*     Test the input parameters.
+*
+      INFO = 0
+      IF( M.LT.0 ) THEN
+         INFO = -1
+      ELSE IF( N.LT.0 ) THEN
+         INFO = -2
+      ELSE IF( LDA.LT.MAX( 1, M ) ) THEN
+         INFO = -4
+      END IF
+      IF( INFO.NE.0 ) THEN
+         CALL XERBLA( 'ZGETF2', -INFO )
+         RETURN
+      END IF
+*
+*     Quick return if possible
+*
+      IF( M.EQ.0 .OR. N.EQ.0 )
+     $   RETURN
+*
+*     Compute machine safe minimum
+*
+      SFMIN = DLAMCH('S')
+*
+      DO 10 J = 1, MIN( M, N )
+*
+*        Find pivot and test for singularity.
+*
+         JP = J - 1 + IZAMAX( M-J+1, A( J, J ), 1 )
+         IPIV( J ) = JP
+         IF( A( JP, J ).NE.ZERO ) THEN
+*
+*           Apply the interchange to columns 1:N.
+*
+            IF( JP.NE.J )
+     $         CALL ZSWAP( N, A( J, 1 ), LDA, A( JP, 1 ), LDA )
+*
+*           Compute elements J+1:M of J-th column.
+*
+            IF( J.LT.M ) THEN
+               IF( ABS(A( J, J )) .GE. SFMIN ) THEN
+                  CALL ZSCAL( M-J, ONE / A( J, J ), A( J+1, J ), 1 )
+               ELSE
+                  DO 20 I = 1, M-J
+                     A( J+I, J ) = A( J+I, J ) / A( J, J )
+   20             CONTINUE
+               END IF
+            END IF
+*
+         ELSE IF( INFO.EQ.0 ) THEN
+*
+            INFO = J
+         END IF
+*
+         IF( J.LT.MIN( M, N ) ) THEN
+*
+*           Update trailing submatrix.
+*
+            CALL ZGERU( M-J, N-J, -ONE, A( J+1, J ), 1, A( J, J+1 ),
+     $                  LDA, A( J+1, J+1 ), LDA )
+         END IF
+   10 CONTINUE
+      RETURN
+*
+*     End of ZGETF2
+*
+      END
+*> \brief \b ZGETRF
+*
+*  =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
+*
+*> \htmlonly
+*> Download ZGETRF + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/zgetrf.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/zgetrf.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/zgetrf.f">
+*> [TXT]</a>
+*> \endhtmlonly
+*
+*  Definition:
+*  ===========
+*
+*       SUBROUTINE ZGETRF( M, N, A, LDA, IPIV, INFO )
+*
+*       .. Scalar Arguments ..
+*       INTEGER            INFO, LDA, M, N
+*       ..
+*       .. Array Arguments ..
+*       INTEGER            IPIV( * )
+*       COMPLEX*16         A( LDA, * )
+*       ..
+*
+*
+*> \par Purpose:
+*  =============
+*>
+*> \verbatim
+*>
+*> ZGETRF computes an LU factorization of a general M-by-N matrix A
+*> using partial pivoting with row interchanges.
+*>
+*> The factorization has the form
+*>    A = P * L * U
+*> where P is a permutation matrix, L is lower triangular with unit
+*> diagonal elements (lower trapezoidal if m > n), and U is upper
+*> triangular (upper trapezoidal if m < n).
+*>
+*> This is the right-looking Level 3 BLAS version of the algorithm.
+*> \endverbatim
+*
+*  Arguments:
+*  ==========
+*
+*> \param[in] M
+*> \verbatim
+*>          M is INTEGER
+*>          The number of rows of the matrix A.  M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*>          N is INTEGER
+*>          The number of columns of the matrix A.  N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*>          A is COMPLEX*16 array, dimension (LDA,N)
+*>          On entry, the M-by-N matrix to be factored.
+*>          On exit, the factors L and U from the factorization
+*>          A = P*L*U; the unit diagonal elements of L are not stored.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*>          LDA is INTEGER
+*>          The leading dimension of the array A.  LDA >= max(1,M).
+*> \endverbatim
+*>
+*> \param[out] IPIV
+*> \verbatim
+*>          IPIV is INTEGER array, dimension (min(M,N))
+*>          The pivot indices; for 1 <= i <= min(M,N), row i of the
+*>          matrix was interchanged with row IPIV(i).
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*>          INFO is INTEGER
+*>          = 0:  successful exit
+*>          < 0:  if INFO = -i, the i-th argument had an illegal value
+*>          > 0:  if INFO = i, U(i,i) is exactly zero. The factorization
+*>                has been completed, but the factor U is exactly
+*>                singular, and division by zero will occur if it is used
+*>                to solve a system of equations.
+*> \endverbatim
+*
+*  Authors:
+*  ========
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date December 2016
+*
+*> \ingroup complex16GEcomputational
+*
+*  =====================================================================
+      SUBROUTINE ZGETRF( M, N, A, LDA, IPIV, INFO )
+*
+*  -- LAPACK computational routine (version 3.7.0) --
+*  -- LAPACK is a software package provided by Univ. of Tennessee,    --
+*  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+*     December 2016
+*
+*     .. Scalar Arguments ..
+      INTEGER            INFO, LDA, M, N
+*     ..
+*     .. Array Arguments ..
+      INTEGER            IPIV( * )
+      COMPLEX*16         A( LDA, * )
+*     ..
+*
+*  =====================================================================
+*
+*     .. Parameters ..
+      COMPLEX*16         ONE
+      PARAMETER          ( ONE = ( 1.0D+0, 0.0D+0 ) )
+*     ..
+*     .. Local Scalars ..
+      INTEGER            I, IINFO, J, JB, NB
+*     ..
+*     .. External Subroutines ..
+      EXTERNAL           XERBLA, ZGEMM, ZGETRF2, ZLASWP, ZTRSM
+*     ..
+*     .. External Functions ..
+      INTEGER            ILAENV
+      EXTERNAL           ILAENV
+*     ..
+*     .. Intrinsic Functions ..
+      INTRINSIC          MAX, MIN
+*     ..
+*     .. Executable Statements ..
+*
+*     Test the input parameters.
+*
+      INFO = 0
+      IF( M.LT.0 ) THEN
+         INFO = -1
+      ELSE IF( N.LT.0 ) THEN
+         INFO = -2
+      ELSE IF( LDA.LT.MAX( 1, M ) ) THEN
+         INFO = -4
+      END IF
+      IF( INFO.NE.0 ) THEN
+         CALL XERBLA( 'ZGETRF', -INFO )
+         RETURN
+      END IF
+*
+*     Quick return if possible
+*
+      IF( M.EQ.0 .OR. N.EQ.0 )
+     $   RETURN
+*
+*     Determine the block size for this environment.
+*
+      NB = ILAENV( 1, 'ZGETRF', ' ', M, N, -1, -1 )
+      IF( NB.LE.1 .OR. NB.GE.MIN( M, N ) ) THEN
+*
+*        Use unblocked code.
+*
+         CALL ZGETRF2( M, N, A, LDA, IPIV, INFO )
+      ELSE
+*
+*        Use blocked code.
+*
+         DO 20 J = 1, MIN( M, N ), NB
+            JB = MIN( MIN( M, N )-J+1, NB )
+*
+*           Factor diagonal and subdiagonal blocks and test for exact
+*           singularity.
+*
+            CALL ZGETRF2( M-J+1, JB, A( J, J ), LDA, IPIV( J ), IINFO )
+*
+*           Adjust INFO and the pivot indices.
+*
+            IF( INFO.EQ.0 .AND. IINFO.GT.0 )
+     $         INFO = IINFO + J - 1
+            DO 10 I = J, MIN( M, J+JB-1 )
+               IPIV( I ) = J - 1 + IPIV( I )
+   10       CONTINUE
+*
+*           Apply interchanges to columns 1:J-1.
+*
+            CALL ZLASWP( J-1, A, LDA, J, J+JB-1, IPIV, 1 )
+*
+            IF( J+JB.LE.N ) THEN
+*
+*              Apply interchanges to columns J+JB:N.
+*
+               CALL ZLASWP( N-J-JB+1, A( 1, J+JB ), LDA, J, J+JB-1,
+     $                      IPIV, 1 )
+*
+*              Compute block row of U.
+*
+               CALL ZTRSM( 'Left', 'Lower', 'No transpose', 'Unit', JB,
+     $                     N-J-JB+1, ONE, A( J, J ), LDA, A( J, J+JB ),
+     $                     LDA )
+               IF( J+JB.LE.M ) THEN
+*
+*                 Update trailing submatrix.
+*
+                  CALL ZGEMM( 'No transpose', 'No transpose', M-J-JB+1,
+     $                        N-J-JB+1, JB, -ONE, A( J+JB, J ), LDA,
+     $                        A( J, J+JB ), LDA, ONE, A( J+JB, J+JB ),
+     $                        LDA )
+               END IF
+            END IF
+   20    CONTINUE
+      END IF
+      RETURN
+*
+*     End of ZGETRF
+*
+      END
+*> \brief \b ZGETRF2
+*
+*  =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
+*
+*  Definition:
+*  ===========
+*
+*       RECURSIVE SUBROUTINE ZGETRF2( M, N, A, LDA, IPIV, INFO )
+*
+*       .. Scalar Arguments ..
+*       INTEGER            INFO, LDA, M, N
+*       ..
+*       .. Array Arguments ..
+*       INTEGER            IPIV( * )
+*       COMPLEX*16         A( LDA, * )
+*       ..
+*
+*
+*> \par Purpose:
+*  =============
+*>
+*> \verbatim
+*>
+*> ZGETRF2 computes an LU factorization of a general M-by-N matrix A
+*> using partial pivoting with row interchanges.
+*>
+*> The factorization has the form
+*>    A = P * L * U
+*> where P is a permutation matrix, L is lower triangular with unit
+*> diagonal elements (lower trapezoidal if m > n), and U is upper
+*> triangular (upper trapezoidal if m < n).
+*>
+*> This is the recursive version of the algorithm. It divides
+*> the matrix into four submatrices:
+*>
+*>        [  A11 | A12  ]  where A11 is n1 by n1 and A22 is n2 by n2
+*>    A = [ -----|----- ]  with n1 = min(m,n)/2
+*>        [  A21 | A22  ]       n2 = n-n1
+*>
+*>                                       [ A11 ]
+*> The subroutine calls itself to factor [ --- ],
+*>                                       [ A12 ]
+*>                 [ A12 ]
+*> do the swaps on [ --- ], solve A12, update A22,
+*>                 [ A22 ]
+*>
+*> then calls itself to factor A22 and do the swaps on A21.
+*>
+*> \endverbatim
+*
+*  Arguments:
+*  ==========
+*
+*> \param[in] M
+*> \verbatim
+*>          M is INTEGER
+*>          The number of rows of the matrix A.  M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*>          N is INTEGER
+*>          The number of columns of the matrix A.  N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*>          A is COMPLEX*16 array, dimension (LDA,N)
+*>          On entry, the M-by-N matrix to be factored.
+*>          On exit, the factors L and U from the factorization
+*>          A = P*L*U; the unit diagonal elements of L are not stored.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*>          LDA is INTEGER
+*>          The leading dimension of the array A.  LDA >= max(1,M).
+*> \endverbatim
+*>
+*> \param[out] IPIV
+*> \verbatim
+*>          IPIV is INTEGER array, dimension (min(M,N))
+*>          The pivot indices; for 1 <= i <= min(M,N), row i of the
+*>          matrix was interchanged with row IPIV(i).
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*>          INFO is INTEGER
+*>          = 0:  successful exit
+*>          < 0:  if INFO = -i, the i-th argument had an illegal value
+*>          > 0:  if INFO = i, U(i,i) is exactly zero. The factorization
+*>                has been completed, but the factor U is exactly
+*>                singular, and division by zero will occur if it is used
+*>                to solve a system of equations.
+*> \endverbatim
+*
+*  Authors:
+*  ========
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date June 2016
+*
+*> \ingroup complex16GEcomputational
+*
+*  =====================================================================
+      RECURSIVE SUBROUTINE ZGETRF2( M, N, A, LDA, IPIV, INFO )
+*
+*  -- LAPACK computational routine (version 3.7.0) --
+*  -- LAPACK is a software package provided by Univ. of Tennessee,    --
+*  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+*     June 2016
+*
+*     .. Scalar Arguments ..
+      INTEGER            INFO, LDA, M, N
+*     ..
+*     .. Array Arguments ..
+      INTEGER            IPIV( * )
+      COMPLEX*16         A( LDA, * )
+*     ..
+*
+*  =====================================================================
+*
+*     .. Parameters ..
+      COMPLEX*16         ONE, ZERO
+      PARAMETER          ( ONE = ( 1.0D+0, 0.0D+0 ),
+     $                     ZERO = ( 0.0D+0, 0.0D+0 ) )
+*     ..
+*     .. Local Scalars ..
+      DOUBLE PRECISION   SFMIN
+      COMPLEX*16         TEMP
+      INTEGER            I, IINFO, N1, N2
+*     ..
+*     .. External Functions ..
+      DOUBLE PRECISION   DLAMCH
+      INTEGER            IZAMAX
+      EXTERNAL           DLAMCH, IZAMAX
+*     ..
+*     .. External Subroutines ..
+      EXTERNAL           ZGEMM, ZSCAL, ZLASWP, ZTRSM, XERBLA
+*     ..
+*     .. Intrinsic Functions ..
+      INTRINSIC          MAX, MIN
+*     ..
+*     .. Executable Statements ..
+*
+*     Test the input parameters
+*
+      INFO = 0
+      IF( M.LT.0 ) THEN
+         INFO = -1
+      ELSE IF( N.LT.0 ) THEN
+         INFO = -2
+      ELSE IF( LDA.LT.MAX( 1, M ) ) THEN
+         INFO = -4
+      END IF
+      IF( INFO.NE.0 ) THEN
+         CALL XERBLA( 'ZGETRF2', -INFO )
+         RETURN
+      END IF
+*
+*     Quick return if possible
+*
+      IF( M.EQ.0 .OR. N.EQ.0 )
+     $   RETURN
+
+      IF ( M.EQ.1 ) THEN
+*
+*        Use unblocked code for one row case
+*        Just need to handle IPIV and INFO
+*
+         IPIV( 1 ) = 1
+         IF ( A(1,1).EQ.ZERO )
+     $      INFO = 1
+*
+      ELSE IF( N.EQ.1 ) THEN
+*
+*        Use unblocked code for one column case
+*
+*
+*        Compute machine safe minimum
+*
+         SFMIN = DLAMCH('S')
+*
+*        Find pivot and test for singularity
+*
+         I = IZAMAX( M, A( 1, 1 ), 1 )
+         IPIV( 1 ) = I
+         IF( A( I, 1 ).NE.ZERO ) THEN
+*
+*           Apply the interchange
+*
+            IF( I.NE.1 ) THEN
+               TEMP = A( 1, 1 )
+               A( 1, 1 ) = A( I, 1 )
+               A( I, 1 ) = TEMP
+            END IF
+*
+*           Compute elements 2:M of the column
+*
+            IF( ABS(A( 1, 1 )) .GE. SFMIN ) THEN
+               CALL ZSCAL( M-1, ONE / A( 1, 1 ), A( 2, 1 ), 1 )
+            ELSE
+               DO 10 I = 1, M-1
+                  A( 1+I, 1 ) = A( 1+I, 1 ) / A( 1, 1 )
+   10          CONTINUE
+            END IF
+*
+         ELSE
+            INFO = 1
+         END IF
+
+      ELSE
+*
+*        Use recursive code
+*
+         N1 = MIN( M, N ) / 2
+         N2 = N-N1
+*
+*               [ A11 ]
+*        Factor [ --- ]
+*               [ A21 ]
+*
+         CALL ZGETRF2( M, N1, A, LDA, IPIV, IINFO )
+
+         IF ( INFO.EQ.0 .AND. IINFO.GT.0 )
+     $      INFO = IINFO
+*
+*                              [ A12 ]
+*        Apply interchanges to [ --- ]
+*                              [ A22 ]
+*
+         CALL ZLASWP( N2, A( 1, N1+1 ), LDA, 1, N1, IPIV, 1 )
+*
+*        Solve A12
+*
+         CALL ZTRSM( 'L', 'L', 'N', 'U', N1, N2, ONE, A, LDA,
+     $               A( 1, N1+1 ), LDA )
+*
+*        Update A22
+*
+         CALL ZGEMM( 'N', 'N', M-N1, N2, N1, -ONE, A( N1+1, 1 ), LDA,
+     $               A( 1, N1+1 ), LDA, ONE, A( N1+1, N1+1 ), LDA )
+*
+*        Factor A22
+*
+         CALL ZGETRF2( M-N1, N2, A( N1+1, N1+1 ), LDA, IPIV( N1+1 ),
+     $                 IINFO )
+*
+*        Adjust INFO and the pivot indices
+*
+         IF ( INFO.EQ.0 .AND. IINFO.GT.0 )
+     $      INFO = IINFO + N1
+         DO 20 I = N1+1, MIN( M, N )
+            IPIV( I ) = IPIV( I ) + N1
+   20    CONTINUE
+*
+*        Apply interchanges to A21
+*
+         CALL ZLASWP( N1, A( 1, 1 ), LDA, N1+1, MIN( M, N), IPIV, 1 )
+*
+      END IF
+      RETURN
+*
+*     End of ZGETRF2
+*
+      END
+*> \brief \b ZGETRI
+*
+*  =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
+*
+*> \htmlonly
+*> Download ZGETRI + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/zgetri.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/zgetri.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/zgetri.f">
+*> [TXT]</a>
+*> \endhtmlonly
+*
+*  Definition:
+*  ===========
+*
+*       SUBROUTINE ZGETRI( N, A, LDA, IPIV, WORK, LWORK, INFO )
+*
+*       .. Scalar Arguments ..
+*       INTEGER            INFO, LDA, LWORK, N
+*       ..
+*       .. Array Arguments ..
+*       INTEGER            IPIV( * )
+*       COMPLEX*16         A( LDA, * ), WORK( * )
+*       ..
+*
+*
+*> \par Purpose:
+*  =============
+*>
+*> \verbatim
+*>
+*> ZGETRI computes the inverse of a matrix using the LU factorization
+*> computed by ZGETRF.
+*>
+*> This method inverts U and then computes inv(A) by solving the system
+*> inv(A)*L = inv(U) for inv(A).
+*> \endverbatim
+*
+*  Arguments:
+*  ==========
+*
+*> \param[in] N
+*> \verbatim
+*>          N is INTEGER
+*>          The order of the matrix A.  N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*>          A is COMPLEX*16 array, dimension (LDA,N)
+*>          On entry, the factors L and U from the factorization
+*>          A = P*L*U as computed by ZGETRF.
+*>          On exit, if INFO = 0, the inverse of the original matrix A.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*>          LDA is INTEGER
+*>          The leading dimension of the array A.  LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] IPIV
+*> \verbatim
+*>          IPIV is INTEGER array, dimension (N)
+*>          The pivot indices from ZGETRF; for 1<=i<=N, row i of the
+*>          matrix was interchanged with row IPIV(i).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*>          WORK is COMPLEX*16 array, dimension (MAX(1,LWORK))
+*>          On exit, if INFO=0, then WORK(1) returns the optimal LWORK.
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*>          LWORK is INTEGER
+*>          The dimension of the array WORK.  LWORK >= max(1,N).
+*>          For optimal performance LWORK >= N*NB, where NB is
+*>          the optimal blocksize returned by ILAENV.
+*>
+*>          If LWORK = -1, then a workspace query is assumed; the routine
+*>          only calculates the optimal size of the WORK array, returns
+*>          this value as the first entry of the WORK array, and no error
+*>          message related to LWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*>          INFO is INTEGER
+*>          = 0:  successful exit
+*>          < 0:  if INFO = -i, the i-th argument had an illegal value
+*>          > 0:  if INFO = i, U(i,i) is exactly zero; the matrix is
+*>                singular and its inverse could not be computed.
+*> \endverbatim
+*
+*  Authors:
+*  ========
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date December 2016
+*
+*> \ingroup complex16GEcomputational
+*
+*  =====================================================================
+      SUBROUTINE ZGETRI( N, A, LDA, IPIV, WORK, LWORK, INFO )
+*
+*  -- LAPACK computational routine (version 3.7.0) --
+*  -- LAPACK is a software package provided by Univ. of Tennessee,    --
+*  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+*     December 2016
+*
+*     .. Scalar Arguments ..
+      INTEGER            INFO, LDA, LWORK, N
+*     ..
+*     .. Array Arguments ..
+      INTEGER            IPIV( * )
+      COMPLEX*16         A( LDA, * ), WORK( * )
+*     ..
+*
+*  =====================================================================
+*
+*     .. Parameters ..
+      COMPLEX*16         ZERO, ONE
+      PARAMETER          ( ZERO = ( 0.0D+0, 0.0D+0 ),
+     $                   ONE = ( 1.0D+0, 0.0D+0 ) )
+*     ..
+*     .. Local Scalars ..
+      LOGICAL            LQUERY
+      INTEGER            I, IWS, J, JB, JJ, JP, LDWORK, LWKOPT, NB,
+     $                   NBMIN, NN
+*     ..
+*     .. External Functions ..
+      INTEGER            ILAENV
+      EXTERNAL           ILAENV
+*     ..
+*     .. External Subroutines ..
+      EXTERNAL           XERBLA, ZGEMM, ZGEMV, ZSWAP, ZTRSM, ZTRTRI
+*     ..
+*     .. Intrinsic Functions ..
+      INTRINSIC          MAX, MIN
+*     ..
+*     .. Executable Statements ..
+*
+*     Test the input parameters.
+*
+      INFO = 0
+      NB = ILAENV( 1, 'ZGETRI', ' ', N, -1, -1, -1 )
+      LWKOPT = N*NB
+      WORK( 1 ) = LWKOPT
+      LQUERY = ( LWORK.EQ.-1 )
+      IF( N.LT.0 ) THEN
+         INFO = -1
+      ELSE IF( LDA.LT.MAX( 1, N ) ) THEN
+         INFO = -3
+      ELSE IF( LWORK.LT.MAX( 1, N ) .AND. .NOT.LQUERY ) THEN
+         INFO = -6
+      END IF
+      IF( INFO.NE.0 ) THEN
+         CALL XERBLA( 'ZGETRI', -INFO )
+         RETURN
+      ELSE IF( LQUERY ) THEN
+         RETURN
+      END IF
+*
+*     Quick return if possible
+*
+      IF( N.EQ.0 )
+     $   RETURN
+*
+*     Form inv(U).  If INFO > 0 from ZTRTRI, then U is singular,
+*     and the inverse is not computed.
+*
+      CALL ZTRTRI( 'Upper', 'Non-unit', N, A, LDA, INFO )
+      IF( INFO.GT.0 )
+     $   RETURN
+*
+      NBMIN = 2
+      LDWORK = N
+      IF( NB.GT.1 .AND. NB.LT.N ) THEN
+         IWS = MAX( LDWORK*NB, 1 )
+         IF( LWORK.LT.IWS ) THEN
+            NB = LWORK / LDWORK
+            NBMIN = MAX( 2, ILAENV( 2, 'ZGETRI', ' ', N, -1, -1, -1 ) )
+         END IF
+      ELSE
+         IWS = N
+      END IF
+*
+*     Solve the equation inv(A)*L = inv(U) for inv(A).
+*
+      IF( NB.LT.NBMIN .OR. NB.GE.N ) THEN
+*
+*        Use unblocked code.
+*
+         DO 20 J = N, 1, -1
+*
+*           Copy current column of L to WORK and replace with zeros.
+*
+            DO 10 I = J + 1, N
+               WORK( I ) = A( I, J )
+               A( I, J ) = ZERO
+   10       CONTINUE
+*
+*           Compute current column of inv(A).
+*
+            IF( J.LT.N )
+     $         CALL ZGEMV( 'No transpose', N, N-J, -ONE, A( 1, J+1 ),
+     $                     LDA, WORK( J+1 ), 1, ONE, A( 1, J ), 1 )
+   20    CONTINUE
+      ELSE
+*
+*        Use blocked code.
+*
+         NN = ( ( N-1 ) / NB )*NB + 1
+         DO 50 J = NN, 1, -NB
+            JB = MIN( NB, N-J+1 )
+*
+*           Copy current block column of L to WORK and replace with
+*           zeros.
+*
+            DO 40 JJ = J, J + JB - 1
+               DO 30 I = JJ + 1, N
+                  WORK( I+( JJ-J )*LDWORK ) = A( I, JJ )
+                  A( I, JJ ) = ZERO
+   30          CONTINUE
+   40       CONTINUE
+*
+*           Compute current block column of inv(A).
+*
+            IF( J+JB.LE.N )
+     $         CALL ZGEMM( 'No transpose', 'No transpose', N, JB,
+     $                     N-J-JB+1, -ONE, A( 1, J+JB ), LDA,
+     $                     WORK( J+JB ), LDWORK, ONE, A( 1, J ), LDA )
+            CALL ZTRSM( 'Right', 'Lower', 'No transpose', 'Unit', N, JB,
+     $                  ONE, WORK( J ), LDWORK, A( 1, J ), LDA )
+   50    CONTINUE
+      END IF
+*
+*     Apply column interchanges.
+*
+      DO 60 J = N - 1, 1, -1
+         JP = IPIV( J )
+         IF( JP.NE.J )
+     $      CALL ZSWAP( N, A( 1, J ), 1, A( 1, JP ), 1 )
+   60 CONTINUE
+*
+      WORK( 1 ) = IWS
+      RETURN
+*
+*     End of ZGETRI
+*
+      END
+*> \brief \b ZGETRS
+*
+*  =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
+*
+*> \htmlonly
+*> Download ZGETRS + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/zgetrs.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/zgetrs.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/zgetrs.f">
+*> [TXT]</a>
+*> \endhtmlonly
+*
+*  Definition:
+*  ===========
+*
+*       SUBROUTINE ZGETRS( TRANS, N, NRHS, A, LDA, IPIV, B, LDB, INFO )
+*
+*       .. Scalar Arguments ..
+*       CHARACTER          TRANS
+*       INTEGER            INFO, LDA, LDB, N, NRHS
+*       ..
+*       .. Array Arguments ..
+*       INTEGER            IPIV( * )
+*       COMPLEX*16         A( LDA, * ), B( LDB, * )
+*       ..
+*
+*
+*> \par Purpose:
+*  =============
+*>
+*> \verbatim
+*>
+*> ZGETRS solves a system of linear equations
+*>    A * X = B,  A**T * X = B,  or  A**H * X = B
+*> with a general N-by-N matrix A using the LU factorization computed
+*> by ZGETRF.
+*> \endverbatim
+*
+*  Arguments:
+*  ==========
+*
+*> \param[in] TRANS
+*> \verbatim
+*>          TRANS is CHARACTER*1
+*>          Specifies the form of the system of equations:
+*>          = 'N':  A * X = B     (No transpose)
+*>          = 'T':  A**T * X = B  (Transpose)
+*>          = 'C':  A**H * X = B  (Conjugate transpose)
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*>          N is INTEGER
+*>          The order of the matrix A.  N >= 0.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*>          NRHS is INTEGER
+*>          The number of right hand sides, i.e., the number of columns
+*>          of the matrix B.  NRHS >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*>          A is COMPLEX*16 array, dimension (LDA,N)
+*>          The factors L and U from the factorization A = P*L*U
+*>          as computed by ZGETRF.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*>          LDA is INTEGER
+*>          The leading dimension of the array A.  LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] IPIV
+*> \verbatim
+*>          IPIV is INTEGER array, dimension (N)
+*>          The pivot indices from ZGETRF; for 1<=i<=N, row i of the
+*>          matrix was interchanged with row IPIV(i).
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*>          B is COMPLEX*16 array, dimension (LDB,NRHS)
+*>          On entry, the right hand side matrix B.
+*>          On exit, the solution matrix X.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*>          LDB is INTEGER
+*>          The leading dimension of the array B.  LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*>          INFO is INTEGER
+*>          = 0:  successful exit
+*>          < 0:  if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*
+*  Authors:
+*  ========
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date December 2016
+*
+*> \ingroup complex16GEcomputational
+*
+*  =====================================================================
+      SUBROUTINE ZGETRS( TRANS, N, NRHS, A, LDA, IPIV, B, LDB, INFO )
+*
+*  -- LAPACK computational routine (version 3.7.0) --
+*  -- LAPACK is a software package provided by Univ. of Tennessee,    --
+*  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+*     December 2016
+*
+*     .. Scalar Arguments ..
+      CHARACTER          TRANS
+      INTEGER            INFO, LDA, LDB, N, NRHS
+*     ..
+*     .. Array Arguments ..
+      INTEGER            IPIV( * )
+      COMPLEX*16         A( LDA, * ), B( LDB, * )
+*     ..
+*
+*  =====================================================================
+*
+*     .. Parameters ..
+      COMPLEX*16         ONE
+      PARAMETER          ( ONE = ( 1.0D+0, 0.0D+0 ) )
+*     ..
+*     .. Local Scalars ..
+      LOGICAL            NOTRAN
+*     ..
+*     .. External Functions ..
+      LOGICAL            LSAME
+      EXTERNAL           LSAME
+*     ..
+*     .. External Subroutines ..
+      EXTERNAL           XERBLA, ZLASWP, ZTRSM
+*     ..
+*     .. Intrinsic Functions ..
+      INTRINSIC          MAX
+*     ..
+*     .. Executable Statements ..
+*
+*     Test the input parameters.
+*
+      INFO = 0
+      NOTRAN = LSAME( TRANS, 'N' )
+      IF( .NOT.NOTRAN .AND. .NOT.LSAME( TRANS, 'T' ) .AND. .NOT.
+     $    LSAME( TRANS, 'C' ) ) THEN
+         INFO = -1
+      ELSE IF( N.LT.0 ) THEN
+         INFO = -2
+      ELSE IF( NRHS.LT.0 ) THEN
+         INFO = -3
+      ELSE IF( LDA.LT.MAX( 1, N ) ) THEN
+         INFO = -5
+      ELSE IF( LDB.LT.MAX( 1, N ) ) THEN
+         INFO = -8
+      END IF
+      IF( INFO.NE.0 ) THEN
+         CALL XERBLA( 'ZGETRS', -INFO )
+         RETURN
+      END IF
+*
+*     Quick return if possible
+*
+      IF( N.EQ.0 .OR. NRHS.EQ.0 )
+     $   RETURN
+*
+      IF( NOTRAN ) THEN
+*
+*        Solve A * X = B.
+*
+*        Apply row interchanges to the right hand sides.
+*
+         CALL ZLASWP( NRHS, B, LDB, 1, N, IPIV, 1 )
+*
+*        Solve L*X = B, overwriting B with X.
+*
+         CALL ZTRSM( 'Left', 'Lower', 'No transpose', 'Unit', N, NRHS,
+     $               ONE, A, LDA, B, LDB )
+*
+*        Solve U*X = B, overwriting B with X.
+*
+         CALL ZTRSM( 'Left', 'Upper', 'No transpose', 'Non-unit', N,
+     $               NRHS, ONE, A, LDA, B, LDB )
+      ELSE
+*
+*        Solve A**T * X = B  or A**H * X = B.
+*
+*        Solve U**T *X = B or U**H *X = B, overwriting B with X.
+*
+         CALL ZTRSM( 'Left', 'Upper', TRANS, 'Non-unit', N, NRHS, ONE,
+     $               A, LDA, B, LDB )
+*
+*        Solve L**T *X = B, or L**H *X = B overwriting B with X.
+*
+         CALL ZTRSM( 'Left', 'Lower', TRANS, 'Unit', N, NRHS, ONE, A,
+     $               LDA, B, LDB )
+*
+*        Apply row interchanges to the solution vectors.
+*
+         CALL ZLASWP( NRHS, B, LDB, 1, N, IPIV, -1 )
+      END IF
+*
+      RETURN
+*
+*     End of ZGETRS
+*
+      END
+*> \brief \b ZGGBAK
+*
+*  =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
+*
+*> \htmlonly
+*> Download ZGGBAK + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/zggbak.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/zggbak.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/zggbak.f">
+*> [TXT]</a>
+*> \endhtmlonly
+*
+*  Definition:
+*  ===========
+*
+*       SUBROUTINE ZGGBAK( JOB, SIDE, N, ILO, IHI, LSCALE, RSCALE, M, V,
+*                          LDV, INFO )
+*
+*       .. Scalar Arguments ..
+*       CHARACTER          JOB, SIDE
+*       INTEGER            IHI, ILO, INFO, LDV, M, N
+*       ..
+*       .. Array Arguments ..
+*       DOUBLE PRECISION   LSCALE( * ), RSCALE( * )
+*       COMPLEX*16         V( LDV, * )
+*       ..
+*
+*
+*> \par Purpose:
+*  =============
+*>
+*> \verbatim
+*>
+*> ZGGBAK forms the right or left eigenvectors of a complex generalized
+*> eigenvalue problem A*x = lambda*B*x, by backward transformation on
+*> the computed eigenvectors of the balanced pair of matrices output by
+*> ZGGBAL.
+*> \endverbatim
+*
+*  Arguments:
+*  ==========
+*
+*> \param[in] JOB
+*> \verbatim
+*>          JOB is CHARACTER*1
+*>          Specifies the type of backward transformation required:
+*>          = 'N':  do nothing, return immediately;
+*>          = 'P':  do backward transformation for permutation only;
+*>          = 'S':  do backward transformation for scaling only;
+*>          = 'B':  do backward transformations for both permutation and
+*>                  scaling.
+*>          JOB must be the same as the argument JOB supplied to ZGGBAL.
+*> \endverbatim
+*>
+*> \param[in] SIDE
+*> \verbatim
+*>          SIDE is CHARACTER*1
+*>          = 'R':  V contains right eigenvectors;
+*>          = 'L':  V contains left eigenvectors.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*>          N is INTEGER
+*>          The number of rows of the matrix V.  N >= 0.
+*> \endverbatim
+*>
+*> \param[in] ILO
+*> \verbatim
+*>          ILO is INTEGER
+*> \endverbatim
+*>
+*> \param[in] IHI
+*> \verbatim
+*>          IHI is INTEGER
+*>          The integers ILO and IHI determined by ZGGBAL.
+*>          1 <= ILO <= IHI <= N, if N > 0; ILO=1 and IHI=0, if N=0.
+*> \endverbatim
+*>
+*> \param[in] LSCALE
+*> \verbatim
+*>          LSCALE is DOUBLE PRECISION array, dimension (N)
+*>          Details of the permutations and/or scaling factors applied
+*>          to the left side of A and B, as returned by ZGGBAL.
+*> \endverbatim
+*>
+*> \param[in] RSCALE
+*> \verbatim
+*>          RSCALE is DOUBLE PRECISION array, dimension (N)
+*>          Details of the permutations and/or scaling factors applied
+*>          to the right side of A and B, as returned by ZGGBAL.
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*>          M is INTEGER
+*>          The number of columns of the matrix V.  M >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] V
+*> \verbatim
+*>          V is COMPLEX*16 array, dimension (LDV,M)
+*>          On entry, the matrix of right or left eigenvectors to be
+*>          transformed, as returned by ZTGEVC.
+*>          On exit, V is overwritten by the transformed eigenvectors.
+*> \endverbatim
+*>
+*> \param[in] LDV
+*> \verbatim
+*>          LDV is INTEGER
+*>          The leading dimension of the matrix V. LDV >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*>          INFO is INTEGER
+*>          = 0:  successful exit.
+*>          < 0:  if INFO = -i, the i-th argument had an illegal value.
+*> \endverbatim
+*
+*  Authors:
+*  ========
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date December 2016
+*
+*> \ingroup complex16GBcomputational
+*
+*> \par Further Details:
+*  =====================
+*>
+*> \verbatim
+*>
+*>  See R.C. Ward, Balancing the generalized eigenvalue problem,
+*>                 SIAM J. Sci. Stat. Comp. 2 (1981), 141-152.
+*> \endverbatim
+*>
+*  =====================================================================
+      SUBROUTINE ZGGBAK( JOB, SIDE, N, ILO, IHI, LSCALE, RSCALE, M, V,
+     $                   LDV, INFO )
+*
+*  -- LAPACK computational routine (version 3.7.0) --
+*  -- LAPACK is a software package provided by Univ. of Tennessee,    --
+*  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+*     December 2016
+*
+*     .. Scalar Arguments ..
+      CHARACTER          JOB, SIDE
+      INTEGER            IHI, ILO, INFO, LDV, M, N
+*     ..
+*     .. Array Arguments ..
+      DOUBLE PRECISION   LSCALE( * ), RSCALE( * )
+      COMPLEX*16         V( LDV, * )
+*     ..
+*
+*  =====================================================================
+*
+*     .. Local Scalars ..
+      LOGICAL            LEFTV, RIGHTV
+      INTEGER            I, K
+*     ..
+*     .. External Functions ..
+      LOGICAL            LSAME
+      EXTERNAL           LSAME
+*     ..
+*     .. External Subroutines ..
+      EXTERNAL           XERBLA, ZDSCAL, ZSWAP
+*     ..
+*     .. Intrinsic Functions ..
+      INTRINSIC          MAX, INT
+*     ..
+*     .. Executable Statements ..
+*
+*     Test the input parameters
+*
+      RIGHTV = LSAME( SIDE, 'R' )
+      LEFTV = LSAME( SIDE, 'L' )
+*
+      INFO = 0
+      IF( .NOT.LSAME( JOB, 'N' ) .AND. .NOT.LSAME( JOB, 'P' ) .AND.
+     $    .NOT.LSAME( JOB, 'S' ) .AND. .NOT.LSAME( JOB, 'B' ) ) THEN
+         INFO = -1
+      ELSE IF( .NOT.RIGHTV .AND. .NOT.LEFTV ) THEN
+         INFO = -2
+      ELSE IF( N.LT.0 ) THEN
+         INFO = -3
+      ELSE IF( ILO.LT.1 ) THEN
+         INFO = -4
+      ELSE IF( N.EQ.0 .AND. IHI.EQ.0 .AND. ILO.NE.1 ) THEN
+         INFO = -4
+      ELSE IF( N.GT.0 .AND. ( IHI.LT.ILO .OR. IHI.GT.MAX( 1, N ) ) )
+     $   THEN
+         INFO = -5
+      ELSE IF( N.EQ.0 .AND. ILO.EQ.1 .AND. IHI.NE.0 ) THEN
+         INFO = -5
+      ELSE IF( M.LT.0 ) THEN
+         INFO = -8
+      ELSE IF( LDV.LT.MAX( 1, N ) ) THEN
+         INFO = -10
+      END IF
+      IF( INFO.NE.0 ) THEN
+         CALL XERBLA( 'ZGGBAK', -INFO )
+         RETURN
+      END IF
+*
+*     Quick return if possible
+*
+      IF( N.EQ.0 )
+     $   RETURN
+      IF( M.EQ.0 )
+     $   RETURN
+      IF( LSAME( JOB, 'N' ) )
+     $   RETURN
+*
+      IF( ILO.EQ.IHI )
+     $   GO TO 30
+*
+*     Backward balance
+*
+      IF( LSAME( JOB, 'S' ) .OR. LSAME( JOB, 'B' ) ) THEN
+*
+*        Backward transformation on right eigenvectors
+*
+         IF( RIGHTV ) THEN
+            DO 10 I = ILO, IHI
+               CALL ZDSCAL( M, RSCALE( I ), V( I, 1 ), LDV )
+   10       CONTINUE
+         END IF
+*
+*        Backward transformation on left eigenvectors
+*
+         IF( LEFTV ) THEN
+            DO 20 I = ILO, IHI
+               CALL ZDSCAL( M, LSCALE( I ), V( I, 1 ), LDV )
+   20       CONTINUE
+         END IF
+      END IF
+*
+*     Backward permutation
+*
+   30 CONTINUE
+      IF( LSAME( JOB, 'P' ) .OR. LSAME( JOB, 'B' ) ) THEN
+*
+*        Backward permutation on right eigenvectors
+*
+         IF( RIGHTV ) THEN
+            IF( ILO.EQ.1 )
+     $         GO TO 50
+            DO 40 I = ILO - 1, 1, -1
+               K = INT(RSCALE( I ))
+               IF( K.EQ.I )
+     $            GO TO 40
+               CALL ZSWAP( M, V( I, 1 ), LDV, V( K, 1 ), LDV )
+   40       CONTINUE
+*
+   50       CONTINUE
+            IF( IHI.EQ.N )
+     $         GO TO 70
+            DO 60 I = IHI + 1, N
+               K = INT(RSCALE( I ))
+               IF( K.EQ.I )
+     $            GO TO 60
+               CALL ZSWAP( M, V( I, 1 ), LDV, V( K, 1 ), LDV )
+   60       CONTINUE
+         END IF
+*
+*        Backward permutation on left eigenvectors
+*
+   70    CONTINUE
+         IF( LEFTV ) THEN
+            IF( ILO.EQ.1 )
+     $         GO TO 90
+            DO 80 I = ILO - 1, 1, -1
+               K = INT(LSCALE( I ))
+               IF( K.EQ.I )
+     $            GO TO 80
+               CALL ZSWAP( M, V( I, 1 ), LDV, V( K, 1 ), LDV )
+   80       CONTINUE
+*
+   90       CONTINUE
+            IF( IHI.EQ.N )
+     $         GO TO 110
+            DO 100 I = IHI + 1, N
+               K = INT(LSCALE( I ))
+               IF( K.EQ.I )
+     $            GO TO 100
+               CALL ZSWAP( M, V( I, 1 ), LDV, V( K, 1 ), LDV )
+  100       CONTINUE
+         END IF
+      END IF
+*
+  110 CONTINUE
+*
+      RETURN
+*
+*     End of ZGGBAK
+*
+      END
+*> \brief \b ZGGBAL
+*
+*  =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
+*
+*> \htmlonly
+*> Download ZGGBAL + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/zggbal.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/zggbal.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/zggbal.f">
+*> [TXT]</a>
+*> \endhtmlonly
+*
+*  Definition:
+*  ===========
+*
+*       SUBROUTINE ZGGBAL( JOB, N, A, LDA, B, LDB, ILO, IHI, LSCALE,
+*                          RSCALE, WORK, INFO )
+*
+*       .. Scalar Arguments ..
+*       CHARACTER          JOB
+*       INTEGER            IHI, ILO, INFO, LDA, LDB, N
+*       ..
+*       .. Array Arguments ..
+*       DOUBLE PRECISION   LSCALE( * ), RSCALE( * ), WORK( * )
+*       COMPLEX*16         A( LDA, * ), B( LDB, * )
+*       ..
+*
+*
+*> \par Purpose:
+*  =============
+*>
+*> \verbatim
+*>
+*> ZGGBAL balances a pair of general complex matrices (A,B).  This
+*> involves, first, permuting A and B by similarity transformations to
+*> isolate eigenvalues in the first 1 to ILO$-$1 and last IHI+1 to N
+*> elements on the diagonal; and second, applying a diagonal similarity
+*> transformation to rows and columns ILO to IHI to make the rows
+*> and columns as close in norm as possible. Both steps are optional.
+*>
+*> Balancing may reduce the 1-norm of the matrices, and improve the
+*> accuracy of the computed eigenvalues and/or eigenvectors in the
+*> generalized eigenvalue problem A*x = lambda*B*x.
+*> \endverbatim
+*
+*  Arguments:
+*  ==========
+*
+*> \param[in] JOB
+*> \verbatim
+*>          JOB is CHARACTER*1
+*>          Specifies the operations to be performed on A and B:
+*>          = 'N':  none:  simply set ILO = 1, IHI = N, LSCALE(I) = 1.0
+*>                  and RSCALE(I) = 1.0 for i=1,...,N;
+*>          = 'P':  permute only;
+*>          = 'S':  scale only;
+*>          = 'B':  both permute and scale.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*>          N is INTEGER
+*>          The order of the matrices A and B.  N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*>          A is COMPLEX*16 array, dimension (LDA,N)
+*>          On entry, the input matrix A.
+*>          On exit, A is overwritten by the balanced matrix.
+*>          If JOB = 'N', A is not referenced.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*>          LDA is INTEGER
+*>          The leading dimension of the array A. LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*>          B is COMPLEX*16 array, dimension (LDB,N)
+*>          On entry, the input matrix B.
+*>          On exit, B is overwritten by the balanced matrix.
+*>          If JOB = 'N', B is not referenced.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*>          LDB is INTEGER
+*>          The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] ILO
+*> \verbatim
+*>          ILO is INTEGER
+*> \endverbatim
+*>
+*> \param[out] IHI
+*> \verbatim
+*>          IHI is INTEGER
+*>          ILO and IHI are set to integers such that on exit
+*>          A(i,j) = 0 and B(i,j) = 0 if i > j and
+*>          j = 1,...,ILO-1 or i = IHI+1,...,N.
+*>          If JOB = 'N' or 'S', ILO = 1 and IHI = N.
+*> \endverbatim
+*>
+*> \param[out] LSCALE
+*> \verbatim
+*>          LSCALE is DOUBLE PRECISION array, dimension (N)
+*>          Details of the permutations and scaling factors applied
+*>          to the left side of A and B.  If P(j) is the index of the
+*>          row interchanged with row j, and D(j) is the scaling factor
+*>          applied to row j, then
+*>            LSCALE(j) = P(j)    for J = 1,...,ILO-1
+*>                      = D(j)    for J = ILO,...,IHI
+*>                      = P(j)    for J = IHI+1,...,N.
+*>          The order in which the interchanges are made is N to IHI+1,
+*>          then 1 to ILO-1.
+*> \endverbatim
+*>
+*> \param[out] RSCALE
+*> \verbatim
+*>          RSCALE is DOUBLE PRECISION array, dimension (N)
+*>          Details of the permutations and scaling factors applied
+*>          to the right side of A and B.  If P(j) is the index of the
+*>          column interchanged with column j, and D(j) is the scaling
+*>          factor applied to column j, then
+*>            RSCALE(j) = P(j)    for J = 1,...,ILO-1
+*>                      = D(j)    for J = ILO,...,IHI
+*>                      = P(j)    for J = IHI+1,...,N.
+*>          The order in which the interchanges are made is N to IHI+1,
+*>          then 1 to ILO-1.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*>          WORK is DOUBLE PRECISION array, dimension (lwork)
+*>          lwork must be at least max(1,6*N) when JOB = 'S' or 'B', and
+*>          at least 1 when JOB = 'N' or 'P'.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*>          INFO is INTEGER
+*>          = 0:  successful exit
+*>          < 0:  if INFO = -i, the i-th argument had an illegal value.
+*> \endverbatim
+*
+*  Authors:
+*  ========
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date June 2016
+*
+*> \ingroup complex16GBcomputational
+*
+*> \par Further Details:
+*  =====================
+*>
+*> \verbatim
+*>
+*>  See R.C. WARD, Balancing the generalized eigenvalue problem,
+*>                 SIAM J. Sci. Stat. Comp. 2 (1981), 141-152.
+*> \endverbatim
+*>
+*  =====================================================================
+      SUBROUTINE ZGGBAL( JOB, N, A, LDA, B, LDB, ILO, IHI, LSCALE,
+     $                   RSCALE, WORK, INFO )
+*
+*  -- LAPACK computational routine (version 3.7.0) --
+*  -- LAPACK is a software package provided by Univ. of Tennessee,    --
+*  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+*     June 2016
+*
+*     .. Scalar Arguments ..
+      CHARACTER          JOB
+      INTEGER            IHI, ILO, INFO, LDA, LDB, N
+*     ..
+*     .. Array Arguments ..
+      DOUBLE PRECISION   LSCALE( * ), RSCALE( * ), WORK( * )
+      COMPLEX*16         A( LDA, * ), B( LDB, * )
+*     ..
+*
+*  =====================================================================
+*
+*     .. Parameters ..
+      DOUBLE PRECISION   ZERO, HALF, ONE
+      PARAMETER          ( ZERO = 0.0D+0, HALF = 0.5D+0, ONE = 1.0D+0 )
+      DOUBLE PRECISION   THREE, SCLFAC
+      PARAMETER          ( THREE = 3.0D+0, SCLFAC = 1.0D+1 )
+      COMPLEX*16         CZERO
+      PARAMETER          ( CZERO = ( 0.0D+0, 0.0D+0 ) )
+*     ..
+*     .. Local Scalars ..
+      INTEGER            I, ICAB, IFLOW, IP1, IR, IRAB, IT, J, JC, JP1,
+     $                   K, KOUNT, L, LCAB, LM1, LRAB, LSFMAX, LSFMIN,
+     $                   M, NR, NRP2
+      DOUBLE PRECISION   ALPHA, BASL, BETA, CAB, CMAX, COEF, COEF2,
+     $                   COEF5, COR, EW, EWC, GAMMA, PGAMMA, RAB, SFMAX,
+     $                   SFMIN, SUM, T, TA, TB, TC
+      COMPLEX*16         CDUM
+*     ..
+*     .. External Functions ..
+      LOGICAL            LSAME
+      INTEGER            IZAMAX
+      DOUBLE PRECISION   DDOT, DLAMCH
+      EXTERNAL           LSAME, IZAMAX, DDOT, DLAMCH
+*     ..
+*     .. External Subroutines ..
+      EXTERNAL           DAXPY, DSCAL, XERBLA, ZDSCAL, ZSWAP
+*     ..
+*     .. Intrinsic Functions ..
+      INTRINSIC          ABS, DBLE, DIMAG, INT, LOG10, MAX, MIN, SIGN
+*     ..
+*     .. Statement Functions ..
+      DOUBLE PRECISION   CABS1
+*     ..
+*     .. Statement Function definitions ..
+      CABS1( CDUM ) = ABS( DBLE( CDUM ) ) + ABS( DIMAG( CDUM ) )
+*     ..
+*     .. Executable Statements ..
+*
+*     Test the input parameters
+*
+      INFO = 0
+      IF( .NOT.LSAME( JOB, 'N' ) .AND. .NOT.LSAME( JOB, 'P' ) .AND.
+     $    .NOT.LSAME( JOB, 'S' ) .AND. .NOT.LSAME( JOB, 'B' ) ) THEN
+         INFO = -1
+      ELSE IF( N.LT.0 ) THEN
+         INFO = -2
+      ELSE IF( LDA.LT.MAX( 1, N ) ) THEN
+         INFO = -4
+      ELSE IF( LDB.LT.MAX( 1, N ) ) THEN
+         INFO = -6
+      END IF
+      IF( INFO.NE.0 ) THEN
+         CALL XERBLA( 'ZGGBAL', -INFO )
+         RETURN
+      END IF
+*
+*     Quick return if possible
+*
+      IF( N.EQ.0 ) THEN
+         ILO = 1
+         IHI = N
+         RETURN
+      END IF
+*
+      IF( N.EQ.1 ) THEN
+         ILO = 1
+         IHI = N
+         LSCALE( 1 ) = ONE
+         RSCALE( 1 ) = ONE
+         RETURN
+      END IF
+*
+      IF( LSAME( JOB, 'N' ) ) THEN
+         ILO = 1
+         IHI = N
+         DO 10 I = 1, N
+            LSCALE( I ) = ONE
+            RSCALE( I ) = ONE
+   10    CONTINUE
+         RETURN
+      END IF
+*
+      K = 1
+      L = N
+      IF( LSAME( JOB, 'S' ) )
+     $   GO TO 190
+*
+      GO TO 30
+*
+*     Permute the matrices A and B to isolate the eigenvalues.
+*
+*     Find row with one nonzero in columns 1 through L
+*
+   20 CONTINUE
+      L = LM1
+      IF( L.NE.1 )
+     $   GO TO 30
+*
+      RSCALE( 1 ) = 1
+      LSCALE( 1 ) = 1
+      GO TO 190
+*
+   30 CONTINUE
+      LM1 = L - 1
+      DO 80 I = L, 1, -1
+         DO 40 J = 1, LM1
+            JP1 = J + 1
+            IF( A( I, J ).NE.CZERO .OR. B( I, J ).NE.CZERO )
+     $         GO TO 50
+   40    CONTINUE
+         J = L
+         GO TO 70
+*
+   50    CONTINUE
+         DO 60 J = JP1, L
+            IF( A( I, J ).NE.CZERO .OR. B( I, J ).NE.CZERO )
+     $         GO TO 80
+   60    CONTINUE
+         J = JP1 - 1
+*
+   70    CONTINUE
+         M = L
+         IFLOW = 1
+         GO TO 160
+   80 CONTINUE
+      GO TO 100
+*
+*     Find column with one nonzero in rows K through N
+*
+   90 CONTINUE
+      K = K + 1
+*
+  100 CONTINUE
+      DO 150 J = K, L
+         DO 110 I = K, LM1
+            IP1 = I + 1
+            IF( A( I, J ).NE.CZERO .OR. B( I, J ).NE.CZERO )
+     $         GO TO 120
+  110    CONTINUE
+         I = L
+         GO TO 140
+  120    CONTINUE
+         DO 130 I = IP1, L
+            IF( A( I, J ).NE.CZERO .OR. B( I, J ).NE.CZERO )
+     $         GO TO 150
+  130    CONTINUE
+         I = IP1 - 1
+  140    CONTINUE
+         M = K
+         IFLOW = 2
+         GO TO 160
+  150 CONTINUE
+      GO TO 190
+*
+*     Permute rows M and I
+*
+  160 CONTINUE
+      LSCALE( M ) = I
+      IF( I.EQ.M )
+     $   GO TO 170
+      CALL ZSWAP( N-K+1, A( I, K ), LDA, A( M, K ), LDA )
+      CALL ZSWAP( N-K+1, B( I, K ), LDB, B( M, K ), LDB )
+*
+*     Permute columns M and J
+*
+  170 CONTINUE
+      RSCALE( M ) = J
+      IF( J.EQ.M )
+     $   GO TO 180
+      CALL ZSWAP( L, A( 1, J ), 1, A( 1, M ), 1 )
+      CALL ZSWAP( L, B( 1, J ), 1, B( 1, M ), 1 )
+*
+  180 CONTINUE
+      GO TO ( 20, 90 )IFLOW
+*
+  190 CONTINUE
+      ILO = K
+      IHI = L
+*
+      IF( LSAME( JOB, 'P' ) ) THEN
+         DO 195 I = ILO, IHI
+            LSCALE( I ) = ONE
+            RSCALE( I ) = ONE
+  195    CONTINUE
+         RETURN
+      END IF
+*
+      IF( ILO.EQ.IHI )
+     $   RETURN
+*
+*     Balance the submatrix in rows ILO to IHI.
+*
+      NR = IHI - ILO + 1
+      DO 200 I = ILO, IHI
+         RSCALE( I ) = ZERO
+         LSCALE( I ) = ZERO
+*
+         WORK( I ) = ZERO
+         WORK( I+N ) = ZERO
+         WORK( I+2*N ) = ZERO
+         WORK( I+3*N ) = ZERO
+         WORK( I+4*N ) = ZERO
+         WORK( I+5*N ) = ZERO
+  200 CONTINUE
+*
+*     Compute right side vector in resulting linear equations
+*
+      BASL = LOG10( SCLFAC )
+      DO 240 I = ILO, IHI
+         DO 230 J = ILO, IHI
+            IF( A( I, J ).EQ.CZERO ) THEN
+               TA = ZERO
+               GO TO 210
+            END IF
+            TA = LOG10( CABS1( A( I, J ) ) ) / BASL
+*
+  210       CONTINUE
+            IF( B( I, J ).EQ.CZERO ) THEN
+               TB = ZERO
+               GO TO 220
+            END IF
+            TB = LOG10( CABS1( B( I, J ) ) ) / BASL
+*
+  220       CONTINUE
+            WORK( I+4*N ) = WORK( I+4*N ) - TA - TB
+            WORK( J+5*N ) = WORK( J+5*N ) - TA - TB
+  230    CONTINUE
+  240 CONTINUE
+*
+      COEF = ONE / DBLE( 2*NR )
+      COEF2 = COEF*COEF
+      COEF5 = HALF*COEF2
+      NRP2 = NR + 2
+      BETA = ZERO
+      IT = 1
+*
+*     Start generalized conjugate gradient iteration
+*
+  250 CONTINUE
+*
+      GAMMA = DDOT( NR, WORK( ILO+4*N ), 1, WORK( ILO+4*N ), 1 ) +
+     $        DDOT( NR, WORK( ILO+5*N ), 1, WORK( ILO+5*N ), 1 )
+*
+      EW = ZERO
+      EWC = ZERO
+      DO 260 I = ILO, IHI
+         EW = EW + WORK( I+4*N )
+         EWC = EWC + WORK( I+5*N )
+  260 CONTINUE
+*
+      GAMMA = COEF*GAMMA - COEF2*( EW**2+EWC**2 ) - COEF5*( EW-EWC )**2
+      IF( GAMMA.EQ.ZERO )
+     $   GO TO 350
+      IF( IT.NE.1 )
+     $   BETA = GAMMA / PGAMMA
+      T = COEF5*( EWC-THREE*EW )
+      TC = COEF5*( EW-THREE*EWC )
+*
+      CALL DSCAL( NR, BETA, WORK( ILO ), 1 )
+      CALL DSCAL( NR, BETA, WORK( ILO+N ), 1 )
+*
+      CALL DAXPY( NR, COEF, WORK( ILO+4*N ), 1, WORK( ILO+N ), 1 )
+      CALL DAXPY( NR, COEF, WORK( ILO+5*N ), 1, WORK( ILO ), 1 )
+*
+      DO 270 I = ILO, IHI
+         WORK( I ) = WORK( I ) + TC
+         WORK( I+N ) = WORK( I+N ) + T
+  270 CONTINUE
+*
+*     Apply matrix to vector
+*
+      DO 300 I = ILO, IHI
+         KOUNT = 0
+         SUM = ZERO
+         DO 290 J = ILO, IHI
+            IF( A( I, J ).EQ.CZERO )
+     $         GO TO 280
+            KOUNT = KOUNT + 1
+            SUM = SUM + WORK( J )
+  280       CONTINUE
+            IF( B( I, J ).EQ.CZERO )
+     $         GO TO 290
+            KOUNT = KOUNT + 1
+            SUM = SUM + WORK( J )
+  290    CONTINUE
+         WORK( I+2*N ) = DBLE( KOUNT )*WORK( I+N ) + SUM
+  300 CONTINUE
+*
+      DO 330 J = ILO, IHI
+         KOUNT = 0
+         SUM = ZERO
+         DO 320 I = ILO, IHI
+            IF( A( I, J ).EQ.CZERO )
+     $         GO TO 310
+            KOUNT = KOUNT + 1
+            SUM = SUM + WORK( I+N )
+  310       CONTINUE
+            IF( B( I, J ).EQ.CZERO )
+     $         GO TO 320
+            KOUNT = KOUNT + 1
+            SUM = SUM + WORK( I+N )
+  320    CONTINUE
+         WORK( J+3*N ) = DBLE( KOUNT )*WORK( J ) + SUM
+  330 CONTINUE
+*
+      SUM = DDOT( NR, WORK( ILO+N ), 1, WORK( ILO+2*N ), 1 ) +
+     $      DDOT( NR, WORK( ILO ), 1, WORK( ILO+3*N ), 1 )
+      ALPHA = GAMMA / SUM
+*
+*     Determine correction to current iteration
+*
+      CMAX = ZERO
+      DO 340 I = ILO, IHI
+         COR = ALPHA*WORK( I+N )
+         IF( ABS( COR ).GT.CMAX )
+     $      CMAX = ABS( COR )
+         LSCALE( I ) = LSCALE( I ) + COR
+         COR = ALPHA*WORK( I )
+         IF( ABS( COR ).GT.CMAX )
+     $      CMAX = ABS( COR )
+         RSCALE( I ) = RSCALE( I ) + COR
+  340 CONTINUE
+      IF( CMAX.LT.HALF )
+     $   GO TO 350
+*
+      CALL DAXPY( NR, -ALPHA, WORK( ILO+2*N ), 1, WORK( ILO+4*N ), 1 )
+      CALL DAXPY( NR, -ALPHA, WORK( ILO+3*N ), 1, WORK( ILO+5*N ), 1 )
+*
+      PGAMMA = GAMMA
+      IT = IT + 1
+      IF( IT.LE.NRP2 )
+     $   GO TO 250
+*
+*     End generalized conjugate gradient iteration
+*
+  350 CONTINUE
+      SFMIN = DLAMCH( 'S' )
+      SFMAX = ONE / SFMIN
+      LSFMIN = INT( LOG10( SFMIN ) / BASL+ONE )
+      LSFMAX = INT( LOG10( SFMAX ) / BASL )
+      DO 360 I = ILO, IHI
+         IRAB = IZAMAX( N-ILO+1, A( I, ILO ), LDA )
+         RAB = ABS( A( I, IRAB+ILO-1 ) )
+         IRAB = IZAMAX( N-ILO+1, B( I, ILO ), LDB )
+         RAB = MAX( RAB, ABS( B( I, IRAB+ILO-1 ) ) )
+         LRAB = INT( LOG10( RAB+SFMIN ) / BASL+ONE )
+         IR = INT(LSCALE( I ) + SIGN( HALF, LSCALE( I ) ))
+         IR = MIN( MAX( IR, LSFMIN ), LSFMAX, LSFMAX-LRAB )
+         LSCALE( I ) = SCLFAC**IR
+         ICAB = IZAMAX( IHI, A( 1, I ), 1 )
+         CAB = ABS( A( ICAB, I ) )
+         ICAB = IZAMAX( IHI, B( 1, I ), 1 )
+         CAB = MAX( CAB, ABS( B( ICAB, I ) ) )
+         LCAB = INT( LOG10( CAB+SFMIN ) / BASL+ONE )
+         JC = INT(RSCALE( I ) + SIGN( HALF, RSCALE( I ) ))
+         JC = MIN( MAX( JC, LSFMIN ), LSFMAX, LSFMAX-LCAB )
+         RSCALE( I ) = SCLFAC**JC
+  360 CONTINUE
+*
+*     Row scaling of matrices A and B
+*
+      DO 370 I = ILO, IHI
+         CALL ZDSCAL( N-ILO+1, LSCALE( I ), A( I, ILO ), LDA )
+         CALL ZDSCAL( N-ILO+1, LSCALE( I ), B( I, ILO ), LDB )
+  370 CONTINUE
+*
+*     Column scaling of matrices A and B
+*
+      DO 380 J = ILO, IHI
+         CALL ZDSCAL( IHI, RSCALE( J ), A( 1, J ), 1 )
+         CALL ZDSCAL( IHI, RSCALE( J ), B( 1, J ), 1 )
+  380 CONTINUE
+*
+      RETURN
+*
+*     End of ZGGBAL
+*
+      END
+*> \brief <b> ZGGES computes the eigenvalues, the Schur form, and, optionally, the matrix of Schur vectors for GE matrices</b>
+*
+*  =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
+*
+*> \htmlonly
+*> Download ZGGES + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/zgges.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/zgges.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/zgges.f">
+*> [TXT]</a>
+*> \endhtmlonly
+*
+*  Definition:
+*  ===========
+*
+*       SUBROUTINE ZGGES( JOBVSL, JOBVSR, SORT, SELCTG, N, A, LDA, B, LDB,
+*                         SDIM, ALPHA, BETA, VSL, LDVSL, VSR, LDVSR, WORK,
+*                         LWORK, RWORK, BWORK, INFO )
+*
+*       .. Scalar Arguments ..
+*       CHARACTER          JOBVSL, JOBVSR, SORT
+*       INTEGER            INFO, LDA, LDB, LDVSL, LDVSR, LWORK, N, SDIM
+*       ..
+*       .. Array Arguments ..
+*       LOGICAL            BWORK( * )
+*       DOUBLE PRECISION   RWORK( * )
+*       COMPLEX*16         A( LDA, * ), ALPHA( * ), B( LDB, * ),
+*      $                   BETA( * ), VSL( LDVSL, * ), VSR( LDVSR, * ),
+*      $                   WORK( * )
+*       ..
+*       .. Function Arguments ..
+*       LOGICAL            SELCTG
+*       EXTERNAL           SELCTG
+*       ..
+*
+*
+*> \par Purpose:
+*  =============
+*>
+*> \verbatim
+*>
+*> ZGGES computes for a pair of N-by-N complex nonsymmetric matrices
+*> (A,B), the generalized eigenvalues, the generalized complex Schur
+*> form (S, T), and optionally left and/or right Schur vectors (VSL
+*> and VSR). This gives the generalized Schur factorization
+*>
+*>         (A,B) = ( (VSL)*S*(VSR)**H, (VSL)*T*(VSR)**H )
+*>
+*> where (VSR)**H is the conjugate-transpose of VSR.
+*>
+*> Optionally, it also orders the eigenvalues so that a selected cluster
+*> of eigenvalues appears in the leading diagonal blocks of the upper
+*> triangular matrix S and the upper triangular matrix T. The leading
+*> columns of VSL and VSR then form an unitary basis for the
+*> corresponding left and right eigenspaces (deflating subspaces).
+*>
+*> (If only the generalized eigenvalues are needed, use the driver
+*> ZGGEV instead, which is faster.)
+*>
+*> A generalized eigenvalue for a pair of matrices (A,B) is a scalar w
+*> or a ratio alpha/beta = w, such that  A - w*B is singular.  It is
+*> usually represented as the pair (alpha,beta), as there is a
+*> reasonable interpretation for beta=0, and even for both being zero.
+*>
+*> A pair of matrices (S,T) is in generalized complex Schur form if S
+*> and T are upper triangular and, in addition, the diagonal elements
+*> of T are non-negative real numbers.
+*> \endverbatim
+*
+*  Arguments:
+*  ==========
+*
+*> \param[in] JOBVSL
+*> \verbatim
+*>          JOBVSL is CHARACTER*1
+*>          = 'N':  do not compute the left Schur vectors;
+*>          = 'V':  compute the left Schur vectors.
+*> \endverbatim
+*>
+*> \param[in] JOBVSR
+*> \verbatim
+*>          JOBVSR is CHARACTER*1
+*>          = 'N':  do not compute the right Schur vectors;
+*>          = 'V':  compute the right Schur vectors.
+*> \endverbatim
+*>
+*> \param[in] SORT
+*> \verbatim
+*>          SORT is CHARACTER*1
+*>          Specifies whether or not to order the eigenvalues on the
+*>          diagonal of the generalized Schur form.
+*>          = 'N':  Eigenvalues are not ordered;
+*>          = 'S':  Eigenvalues are ordered (see SELCTG).
+*> \endverbatim
+*>
+*> \param[in] SELCTG
+*> \verbatim
+*>          SELCTG is a LOGICAL FUNCTION of two COMPLEX*16 arguments
+*>          SELCTG must be declared EXTERNAL in the calling subroutine.
+*>          If SORT = 'N', SELCTG is not referenced.
+*>          If SORT = 'S', SELCTG is used to select eigenvalues to sort
+*>          to the top left of the Schur form.
+*>          An eigenvalue ALPHA(j)/BETA(j) is selected if
+*>          SELCTG(ALPHA(j),BETA(j)) is true.
+*>
+*>          Note that a selected complex eigenvalue may no longer satisfy
+*>          SELCTG(ALPHA(j),BETA(j)) = .TRUE. after ordering, since
+*>          ordering may change the value of complex eigenvalues
+*>          (especially if the eigenvalue is ill-conditioned), in this
+*>          case INFO is set to N+2 (See INFO below).
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*>          N is INTEGER
+*>          The order of the matrices A, B, VSL, and VSR.  N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*>          A is COMPLEX*16 array, dimension (LDA, N)
+*>          On entry, the first of the pair of matrices.
+*>          On exit, A has been overwritten by its generalized Schur
+*>          form S.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*>          LDA is INTEGER
+*>          The leading dimension of A.  LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*>          B is COMPLEX*16 array, dimension (LDB, N)
+*>          On entry, the second of the pair of matrices.
+*>          On exit, B has been overwritten by its generalized Schur
+*>          form T.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*>          LDB is INTEGER
+*>          The leading dimension of B.  LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] SDIM
+*> \verbatim
+*>          SDIM is INTEGER
+*>          If SORT = 'N', SDIM = 0.
+*>          If SORT = 'S', SDIM = number of eigenvalues (after sorting)
+*>          for which SELCTG is true.
+*> \endverbatim
+*>
+*> \param[out] ALPHA
+*> \verbatim
+*>          ALPHA is COMPLEX*16 array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] BETA
+*> \verbatim
+*>          BETA is COMPLEX*16 array, dimension (N)
+*>          On exit,  ALPHA(j)/BETA(j), j=1,...,N, will be the
+*>          generalized eigenvalues.  ALPHA(j), j=1,...,N  and  BETA(j),
+*>          j=1,...,N  are the diagonals of the complex Schur form (A,B)
+*>          output by ZGGES. The  BETA(j) will be non-negative real.
+*>
+*>          Note: the quotients ALPHA(j)/BETA(j) may easily over- or
+*>          underflow, and BETA(j) may even be zero.  Thus, the user
+*>          should avoid naively computing the ratio alpha/beta.
+*>          However, ALPHA will be always less than and usually
+*>          comparable with norm(A) in magnitude, and BETA always less
+*>          than and usually comparable with norm(B).
+*> \endverbatim
+*>
+*> \param[out] VSL
+*> \verbatim
+*>          VSL is COMPLEX*16 array, dimension (LDVSL,N)
+*>          If JOBVSL = 'V', VSL will contain the left Schur vectors.
+*>          Not referenced if JOBVSL = 'N'.
+*> \endverbatim
+*>
+*> \param[in] LDVSL
+*> \verbatim
+*>          LDVSL is INTEGER
+*>          The leading dimension of the matrix VSL. LDVSL >= 1, and
+*>          if JOBVSL = 'V', LDVSL >= N.
+*> \endverbatim
+*>
+*> \param[out] VSR
+*> \verbatim
+*>          VSR is COMPLEX*16 array, dimension (LDVSR,N)
+*>          If JOBVSR = 'V', VSR will contain the right Schur vectors.
+*>          Not referenced if JOBVSR = 'N'.
+*> \endverbatim
+*>
+*> \param[in] LDVSR
+*> \verbatim
+*>          LDVSR is INTEGER
+*>          The leading dimension of the matrix VSR. LDVSR >= 1, and
+*>          if JOBVSR = 'V', LDVSR >= N.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*>          WORK is COMPLEX*16 array, dimension (MAX(1,LWORK))
+*>          On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*>          LWORK is INTEGER
+*>          The dimension of the array WORK.  LWORK >= max(1,2*N).
+*>          For good performance, LWORK must generally be larger.
+*>
+*>          If LWORK = -1, then a workspace query is assumed; the routine
+*>          only calculates the optimal size of the WORK array, returns
+*>          this value as the first entry of the WORK array, and no error
+*>          message related to LWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*>          RWORK is DOUBLE PRECISION array, dimension (8*N)
+*> \endverbatim
+*>
+*> \param[out] BWORK
+*> \verbatim
+*>          BWORK is LOGICAL array, dimension (N)
+*>          Not referenced if SORT = 'N'.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*>          INFO is INTEGER
+*>          = 0:  successful exit
+*>          < 0:  if INFO = -i, the i-th argument had an illegal value.
+*>          =1,...,N:
+*>                The QZ iteration failed.  (A,B) are not in Schur
+*>                form, but ALPHA(j) and BETA(j) should be correct for
+*>                j=INFO+1,...,N.
+*>          > N:  =N+1: other than QZ iteration failed in ZHGEQZ
+*>                =N+2: after reordering, roundoff changed values of
+*>                      some complex eigenvalues so that leading
+*>                      eigenvalues in the Generalized Schur form no
+*>                      longer satisfy SELCTG=.TRUE.  This could also
+*>                      be caused due to scaling.
+*>                =N+3: reordering failed in ZTGSEN.
+*> \endverbatim
+*
+*  Authors:
+*  ========
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date December 2016
+*
+*> \ingroup complex16GEeigen
+*
+*  =====================================================================
+      SUBROUTINE ZGGES( JOBVSL, JOBVSR, SORT, SELCTG, N, A, LDA, B, LDB,
+     $                  SDIM, ALPHA, BETA, VSL, LDVSL, VSR, LDVSR, WORK,
+     $                  LWORK, RWORK, BWORK, INFO )
+*
+*  -- LAPACK driver routine (version 3.7.0) --
+*  -- LAPACK is a software package provided by Univ. of Tennessee,    --
+*  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+*     December 2016
+*
+*     .. Scalar Arguments ..
+      CHARACTER          JOBVSL, JOBVSR, SORT
+      INTEGER            INFO, LDA, LDB, LDVSL, LDVSR, LWORK, N, SDIM
+*     ..
+*     .. Array Arguments ..
+      LOGICAL            BWORK( * )
+      DOUBLE PRECISION   RWORK( * )
+      COMPLEX*16         A( LDA, * ), ALPHA( * ), B( LDB, * ),
+     $                   BETA( * ), VSL( LDVSL, * ), VSR( LDVSR, * ),
+     $                   WORK( * )
+*     ..
+*     .. Function Arguments ..
+      LOGICAL            SELCTG
+      EXTERNAL           SELCTG
+*     ..
+*
+*  =====================================================================
+*
+*     .. Parameters ..
+      DOUBLE PRECISION   ZERO, ONE
+      PARAMETER          ( ZERO = 0.0D0, ONE = 1.0D0 )
+      COMPLEX*16         CZERO, CONE
+      PARAMETER          ( CZERO = ( 0.0D0, 0.0D0 ),
+     $                   CONE = ( 1.0D0, 0.0D0 ) )
+*     ..
+*     .. Local Scalars ..
+      LOGICAL            CURSL, ILASCL, ILBSCL, ILVSL, ILVSR, LASTSL,
+     $                   LQUERY, WANTST
+      INTEGER            I, ICOLS, IERR, IHI, IJOBVL, IJOBVR, ILEFT,
+     $                   ILO, IRIGHT, IROWS, IRWRK, ITAU, IWRK, LWKMIN,
+     $                   LWKOPT
+      DOUBLE PRECISION   ANRM, ANRMTO, BIGNUM, BNRM, BNRMTO, EPS, PVSL,
+     $                   PVSR, SMLNUM
+*     ..
+*     .. Local Arrays ..
+      INTEGER            IDUM( 1 )
+      DOUBLE PRECISION   DIF( 2 )
+*     ..
+*     .. External Subroutines ..
+      EXTERNAL           DLABAD, XERBLA, ZGEQRF, ZGGBAK, ZGGBAL, ZGGHRD,
+     $                   ZHGEQZ, ZLACPY, ZLASCL, ZLASET, ZTGSEN, ZUNGQR,
+     $                   ZUNMQR
+*     ..
+*     .. External Functions ..
+      LOGICAL            LSAME
+      INTEGER            ILAENV
+      DOUBLE PRECISION   DLAMCH, ZLANGE
+      EXTERNAL           LSAME, ILAENV, DLAMCH, ZLANGE
+*     ..
+*     .. Intrinsic Functions ..
+      INTRINSIC          MAX, SQRT
+*     ..
+*     .. Executable Statements ..
+*
+*     Decode the input arguments
+*
+      IF( LSAME( JOBVSL, 'N' ) ) THEN
+         IJOBVL = 1
+         ILVSL = .FALSE.
+      ELSE IF( LSAME( JOBVSL, 'V' ) ) THEN
+         IJOBVL = 2
+         ILVSL = .TRUE.
+      ELSE
+         IJOBVL = -1
+         ILVSL = .FALSE.
+      END IF
+*
+      IF( LSAME( JOBVSR, 'N' ) ) THEN
+         IJOBVR = 1
+         ILVSR = .FALSE.
+      ELSE IF( LSAME( JOBVSR, 'V' ) ) THEN
+         IJOBVR = 2
+         ILVSR = .TRUE.
+      ELSE
+         IJOBVR = -1
+         ILVSR = .FALSE.
+      END IF
+*
+      WANTST = LSAME( SORT, 'S' )
+*
+*     Test the input arguments
+*
+      INFO = 0
+      LQUERY = ( LWORK.EQ.-1 )
+      IF( IJOBVL.LE.0 ) THEN
+         INFO = -1
+      ELSE IF( IJOBVR.LE.0 ) THEN
+         INFO = -2
+      ELSE IF( ( .NOT.WANTST ) .AND. ( .NOT.LSAME( SORT, 'N' ) ) ) THEN
+         INFO = -3
+      ELSE IF( N.LT.0 ) THEN
+         INFO = -5
+      ELSE IF( LDA.LT.MAX( 1, N ) ) THEN
+         INFO = -7
+      ELSE IF( LDB.LT.MAX( 1, N ) ) THEN
+         INFO = -9
+      ELSE IF( LDVSL.LT.1 .OR. ( ILVSL .AND. LDVSL.LT.N ) ) THEN
+         INFO = -14
+      ELSE IF( LDVSR.LT.1 .OR. ( ILVSR .AND. LDVSR.LT.N ) ) THEN
+         INFO = -16
+      END IF
+*
+*     Compute workspace
+*      (Note: Comments in the code beginning "Workspace:" describe the
+*       minimal amount of workspace needed at that point in the code,
+*       as well as the preferred amount for good performance.
+*       NB refers to the optimal block size for the immediately
+*       following subroutine, as returned by ILAENV.)
+*
+      IF( INFO.EQ.0 ) THEN
+         LWKMIN = MAX( 1, 2*N )
+         LWKOPT = MAX( 1, N + N*ILAENV( 1, 'ZGEQRF', ' ', N, 1, N, 0 ) )
+         LWKOPT = MAX( LWKOPT, N +
+     $                 N*ILAENV( 1, 'ZUNMQR', ' ', N, 1, N, -1 ) )
+         IF( ILVSL ) THEN
+            LWKOPT = MAX( LWKOPT, N +
+     $                    N*ILAENV( 1, 'ZUNGQR', ' ', N, 1, N, -1 ) )
+         END IF
+         WORK( 1 ) = LWKOPT
+*
+         IF( LWORK.LT.LWKMIN .AND. .NOT.LQUERY )
+     $      INFO = -18
+      END IF
+*
+      IF( INFO.NE.0 ) THEN
+         CALL XERBLA( 'ZGGES ', -INFO )
+         RETURN
+      ELSE IF( LQUERY ) THEN
+         RETURN
+      END IF
+*
+*     Quick return if possible
+*
+      IF( N.EQ.0 ) THEN
+         SDIM = 0
+         RETURN
+      END IF
+*
+*     Get machine constants
+*
+      EPS = DLAMCH( 'P' )
+      SMLNUM = DLAMCH( 'S' )
+      BIGNUM = ONE / SMLNUM
+      CALL DLABAD( SMLNUM, BIGNUM )
+      SMLNUM = SQRT( SMLNUM ) / EPS
+      BIGNUM = ONE / SMLNUM
+*
+*     Scale A if max element outside range [SMLNUM,BIGNUM]
+*
+      ANRM = ZLANGE( 'M', N, N, A, LDA, RWORK )
+      ILASCL = .FALSE.
+      IF( ANRM.GT.ZERO .AND. ANRM.LT.SMLNUM ) THEN
+         ANRMTO = SMLNUM
+         ILASCL = .TRUE.
+      ELSE IF( ANRM.GT.BIGNUM ) THEN
+         ANRMTO = BIGNUM
+         ILASCL = .TRUE.
+      END IF
+*
+      IF( ILASCL )
+     $   CALL ZLASCL( 'G', 0, 0, ANRM, ANRMTO, N, N, A, LDA, IERR )
+*
+*     Scale B if max element outside range [SMLNUM,BIGNUM]
+*
+      BNRM = ZLANGE( 'M', N, N, B, LDB, RWORK )
+      ILBSCL = .FALSE.
+      IF( BNRM.GT.ZERO .AND. BNRM.LT.SMLNUM ) THEN
+         BNRMTO = SMLNUM
+         ILBSCL = .TRUE.
+      ELSE IF( BNRM.GT.BIGNUM ) THEN
+         BNRMTO = BIGNUM
+         ILBSCL = .TRUE.
+      END IF
+*
+      IF( ILBSCL )
+     $   CALL ZLASCL( 'G', 0, 0, BNRM, BNRMTO, N, N, B, LDB, IERR )
+*
+*     Permute the matrix to make it more nearly triangular
+*     (Real Workspace: need 6*N)
+*
+      ILEFT = 1
+      IRIGHT = N + 1
+      IRWRK = IRIGHT + N
+      CALL ZGGBAL( 'P', N, A, LDA, B, LDB, ILO, IHI, RWORK( ILEFT ),
+     $             RWORK( IRIGHT ), RWORK( IRWRK ), IERR )
+*
+*     Reduce B to triangular form (QR decomposition of B)
+*     (Complex Workspace: need N, prefer N*NB)
+*
+      IROWS = IHI + 1 - ILO
+      ICOLS = N + 1 - ILO
+      ITAU = 1
+      IWRK = ITAU + IROWS
+      CALL ZGEQRF( IROWS, ICOLS, B( ILO, ILO ), LDB, WORK( ITAU ),
+     $             WORK( IWRK ), LWORK+1-IWRK, IERR )
+*
+*     Apply the orthogonal transformation to matrix A
+*     (Complex Workspace: need N, prefer N*NB)
+*
+      CALL ZUNMQR( 'L', 'C', IROWS, ICOLS, IROWS, B( ILO, ILO ), LDB,
+     $             WORK( ITAU ), A( ILO, ILO ), LDA, WORK( IWRK ),
+     $             LWORK+1-IWRK, IERR )
+*
+*     Initialize VSL
+*     (Complex Workspace: need N, prefer N*NB)
+*
+      IF( ILVSL ) THEN
+         CALL ZLASET( 'Full', N, N, CZERO, CONE, VSL, LDVSL )
+         IF( IROWS.GT.1 ) THEN
+            CALL ZLACPY( 'L', IROWS-1, IROWS-1, B( ILO+1, ILO ), LDB,
+     $                   VSL( ILO+1, ILO ), LDVSL )
+         END IF
+         CALL ZUNGQR( IROWS, IROWS, IROWS, VSL( ILO, ILO ), LDVSL,
+     $                WORK( ITAU ), WORK( IWRK ), LWORK+1-IWRK, IERR )
+      END IF
+*
+*     Initialize VSR
+*
+      IF( ILVSR )
+     $   CALL ZLASET( 'Full', N, N, CZERO, CONE, VSR, LDVSR )
+*
+*     Reduce to generalized Hessenberg form
+*     (Workspace: none needed)
+*
+      CALL ZGGHRD( JOBVSL, JOBVSR, N, ILO, IHI, A, LDA, B, LDB, VSL,
+     $             LDVSL, VSR, LDVSR, IERR )
+*
+      SDIM = 0
+*
+*     Perform QZ algorithm, computing Schur vectors if desired
+*     (Complex Workspace: need N)
+*     (Real Workspace: need N)
+*
+      IWRK = ITAU
+      CALL ZHGEQZ( 'S', JOBVSL, JOBVSR, N, ILO, IHI, A, LDA, B, LDB,
+     $             ALPHA, BETA, VSL, LDVSL, VSR, LDVSR, WORK( IWRK ),
+     $             LWORK+1-IWRK, RWORK( IRWRK ), IERR )
+      IF( IERR.NE.0 ) THEN
+         IF( IERR.GT.0 .AND. IERR.LE.N ) THEN
+            INFO = IERR
+         ELSE IF( IERR.GT.N .AND. IERR.LE.2*N ) THEN
+            INFO = IERR - N
+         ELSE
+            INFO = N + 1
+         END IF
+         GO TO 30
+      END IF
+*
+*     Sort eigenvalues ALPHA/BETA if desired
+*     (Workspace: none needed)
+*
+      IF( WANTST ) THEN
+*
+*        Undo scaling on eigenvalues before selecting
+*
+         IF( ILASCL )
+     $      CALL ZLASCL( 'G', 0, 0, ANRM, ANRMTO, N, 1, ALPHA, N, IERR )
+         IF( ILBSCL )
+     $      CALL ZLASCL( 'G', 0, 0, BNRM, BNRMTO, N, 1, BETA, N, IERR )
+*
+*        Select eigenvalues
+*
+         DO 10 I = 1, N
+            BWORK( I ) = SELCTG( ALPHA( I ), BETA( I ) )
+   10    CONTINUE
+*
+         CALL ZTGSEN( 0, ILVSL, ILVSR, BWORK, N, A, LDA, B, LDB, ALPHA,
+     $                BETA, VSL, LDVSL, VSR, LDVSR, SDIM, PVSL, PVSR,
+     $                DIF, WORK( IWRK ), LWORK-IWRK+1, IDUM, 1, IERR )
+         IF( IERR.EQ.1 )
+     $      INFO = N + 3
+*
+      END IF
+*
+*     Apply back-permutation to VSL and VSR
+*     (Workspace: none needed)
+*
+      IF( ILVSL )
+     $   CALL ZGGBAK( 'P', 'L', N, ILO, IHI, RWORK( ILEFT ),
+     $                RWORK( IRIGHT ), N, VSL, LDVSL, IERR )
+      IF( ILVSR )
+     $   CALL ZGGBAK( 'P', 'R', N, ILO, IHI, RWORK( ILEFT ),
+     $                RWORK( IRIGHT ), N, VSR, LDVSR, IERR )
+*
+*     Undo scaling
+*
+      IF( ILASCL ) THEN
+         CALL ZLASCL( 'U', 0, 0, ANRMTO, ANRM, N, N, A, LDA, IERR )
+         CALL ZLASCL( 'G', 0, 0, ANRMTO, ANRM, N, 1, ALPHA, N, IERR )
+      END IF
+*
+      IF( ILBSCL ) THEN
+         CALL ZLASCL( 'U', 0, 0, BNRMTO, BNRM, N, N, B, LDB, IERR )
+         CALL ZLASCL( 'G', 0, 0, BNRMTO, BNRM, N, 1, BETA, N, IERR )
+      END IF
+*
+      IF( WANTST ) THEN
+*
+*        Check if reordering is correct
+*
+         LASTSL = .TRUE.
+         SDIM = 0
+         DO 20 I = 1, N
+            CURSL = SELCTG( ALPHA( I ), BETA( I ) )
+            IF( CURSL )
+     $         SDIM = SDIM + 1
+            IF( CURSL .AND. .NOT.LASTSL )
+     $         INFO = N + 2
+            LASTSL = CURSL
+   20    CONTINUE
+*
+      END IF
+*
+   30 CONTINUE
+*
+      WORK( 1 ) = LWKOPT
+*
+      RETURN
+*
+*     End of ZGGES
+*
+      END
+*> \brief <b> ZGGEV computes the eigenvalues and, optionally, the left and/or right eigenvectors for GE matrices</b>
+*
+*  =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
+*
+*> \htmlonly
+*> Download ZGGEV + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/zggev.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/zggev.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/zggev.f">
+*> [TXT]</a>
+*> \endhtmlonly
+*
+*  Definition:
+*  ===========
+*
+*       SUBROUTINE ZGGEV( JOBVL, JOBVR, N, A, LDA, B, LDB, ALPHA, BETA,
+*                         VL, LDVL, VR, LDVR, WORK, LWORK, RWORK, INFO )
+*
+*       .. Scalar Arguments ..
+*       CHARACTER          JOBVL, JOBVR
+*       INTEGER            INFO, LDA, LDB, LDVL, LDVR, LWORK, N
+*       ..
+*       .. Array Arguments ..
+*       DOUBLE PRECISION   RWORK( * )
+*       COMPLEX*16         A( LDA, * ), ALPHA( * ), B( LDB, * ),
+*      $                   BETA( * ), VL( LDVL, * ), VR( LDVR, * ),
+*      $                   WORK( * )
+*       ..
+*
+*
+*> \par Purpose:
+*  =============
+*>
+*> \verbatim
+*>
+*> ZGGEV computes for a pair of N-by-N complex nonsymmetric matrices
+*> (A,B), the generalized eigenvalues, and optionally, the left and/or
+*> right generalized eigenvectors.
+*>
+*> A generalized eigenvalue for a pair of matrices (A,B) is a scalar
+*> lambda or a ratio alpha/beta = lambda, such that A - lambda*B is
+*> singular. It is usually represented as the pair (alpha,beta), as
+*> there is a reasonable interpretation for beta=0, and even for both
+*> being zero.
+*>
+*> The right generalized eigenvector v(j) corresponding to the
+*> generalized eigenvalue lambda(j) of (A,B) satisfies
+*>
+*>              A * v(j) = lambda(j) * B * v(j).
+*>
+*> The left generalized eigenvector u(j) corresponding to the
+*> generalized eigenvalues lambda(j) of (A,B) satisfies
+*>
+*>              u(j)**H * A = lambda(j) * u(j)**H * B
+*>
+*> where u(j)**H is the conjugate-transpose of u(j).
+*> \endverbatim
+*
+*  Arguments:
+*  ==========
+*
+*> \param[in] JOBVL
+*> \verbatim
+*>          JOBVL is CHARACTER*1
+*>          = 'N':  do not compute the left generalized eigenvectors;
+*>          = 'V':  compute the left generalized eigenvectors.
+*> \endverbatim
+*>
+*> \param[in] JOBVR
+*> \verbatim
+*>          JOBVR is CHARACTER*1
+*>          = 'N':  do not compute the right generalized eigenvectors;
+*>          = 'V':  compute the right generalized eigenvectors.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*>          N is INTEGER
+*>          The order of the matrices A, B, VL, and VR.  N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*>          A is COMPLEX*16 array, dimension (LDA, N)
+*>          On entry, the matrix A in the pair (A,B).
+*>          On exit, A has been overwritten.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*>          LDA is INTEGER
+*>          The leading dimension of A.  LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*>          B is COMPLEX*16 array, dimension (LDB, N)
+*>          On entry, the matrix B in the pair (A,B).
+*>          On exit, B has been overwritten.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*>          LDB is INTEGER
+*>          The leading dimension of B.  LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] ALPHA
+*> \verbatim
+*>          ALPHA is COMPLEX*16 array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] BETA
+*> \verbatim
+*>          BETA is COMPLEX*16 array, dimension (N)
+*>          On exit, ALPHA(j)/BETA(j), j=1,...,N, will be the
+*>          generalized eigenvalues.
+*>
+*>          Note: the quotients ALPHA(j)/BETA(j) may easily over- or
+*>          underflow, and BETA(j) may even be zero.  Thus, the user
+*>          should avoid naively computing the ratio alpha/beta.
+*>          However, ALPHA will be always less than and usually
+*>          comparable with norm(A) in magnitude, and BETA always less
+*>          than and usually comparable with norm(B).
+*> \endverbatim
+*>
+*> \param[out] VL
+*> \verbatim
+*>          VL is COMPLEX*16 array, dimension (LDVL,N)
+*>          If JOBVL = 'V', the left generalized eigenvectors u(j) are
+*>          stored one after another in the columns of VL, in the same
+*>          order as their eigenvalues.
+*>          Each eigenvector is scaled so the largest component has
+*>          abs(real part) + abs(imag. part) = 1.
+*>          Not referenced if JOBVL = 'N'.
+*> \endverbatim
+*>
+*> \param[in] LDVL
+*> \verbatim
+*>          LDVL is INTEGER
+*>          The leading dimension of the matrix VL. LDVL >= 1, and
+*>          if JOBVL = 'V', LDVL >= N.
+*> \endverbatim
+*>
+*> \param[out] VR
+*> \verbatim
+*>          VR is COMPLEX*16 array, dimension (LDVR,N)
+*>          If JOBVR = 'V', the right generalized eigenvectors v(j) are
+*>          stored one after another in the columns of VR, in the same
+*>          order as their eigenvalues.
+*>          Each eigenvector is scaled so the largest component has
+*>          abs(real part) + abs(imag. part) = 1.
+*>          Not referenced if JOBVR = 'N'.
+*> \endverbatim
+*>
+*> \param[in] LDVR
+*> \verbatim
+*>          LDVR is INTEGER
+*>          The leading dimension of the matrix VR. LDVR >= 1, and
+*>          if JOBVR = 'V', LDVR >= N.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*>          WORK is COMPLEX*16 array, dimension (MAX(1,LWORK))
+*>          On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*>          LWORK is INTEGER
+*>          The dimension of the array WORK.  LWORK >= max(1,2*N).
+*>          For good performance, LWORK must generally be larger.
+*>
+*>          If LWORK = -1, then a workspace query is assumed; the routine
+*>          only calculates the optimal size of the WORK array, returns
+*>          this value as the first entry of the WORK array, and no error
+*>          message related to LWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*>          RWORK is DOUBLE PRECISION array, dimension (8*N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*>          INFO is INTEGER
+*>          = 0:  successful exit
+*>          < 0:  if INFO = -i, the i-th argument had an illegal value.
+*>          =1,...,N:
+*>                The QZ iteration failed.  No eigenvectors have been
+*>                calculated, but ALPHA(j) and BETA(j) should be
+*>                correct for j=INFO+1,...,N.
+*>          > N:  =N+1: other then QZ iteration failed in DHGEQZ,
+*>                =N+2: error return from DTGEVC.
+*> \endverbatim
+*
+*  Authors:
+*  ========
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date April 2012
+*
+*> \ingroup complex16GEeigen
+*
+*  =====================================================================
+      SUBROUTINE ZGGEV( JOBVL, JOBVR, N, A, LDA, B, LDB, ALPHA, BETA,
+     $                  VL, LDVL, VR, LDVR, WORK, LWORK, RWORK, INFO )
+*
+*  -- LAPACK driver routine (version 3.7.0) --
+*  -- LAPACK is a software package provided by Univ. of Tennessee,    --
+*  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+*     April 2012
+*
+*     .. Scalar Arguments ..
+      CHARACTER          JOBVL, JOBVR
+      INTEGER            INFO, LDA, LDB, LDVL, LDVR, LWORK, N
+*     ..
+*     .. Array Arguments ..
+      DOUBLE PRECISION   RWORK( * )
+      COMPLEX*16         A( LDA, * ), ALPHA( * ), B( LDB, * ),
+     $                   BETA( * ), VL( LDVL, * ), VR( LDVR, * ),
+     $                   WORK( * )
+*     ..
+*
+*  =====================================================================
+*
+*     .. Parameters ..
+      DOUBLE PRECISION   ZERO, ONE
+      PARAMETER          ( ZERO = 0.0D0, ONE = 1.0D0 )
+      COMPLEX*16         CZERO, CONE
+      PARAMETER          ( CZERO = ( 0.0D0, 0.0D0 ),
+     $                   CONE = ( 1.0D0, 0.0D0 ) )
+*     ..
+*     .. Local Scalars ..
+      LOGICAL            ILASCL, ILBSCL, ILV, ILVL, ILVR, LQUERY
+      CHARACTER          CHTEMP
+      INTEGER            ICOLS, IERR, IHI, IJOBVL, IJOBVR, ILEFT, ILO,
+     $                   IN, IRIGHT, IROWS, IRWRK, ITAU, IWRK, JC, JR,
+     $                   LWKMIN, LWKOPT
+      DOUBLE PRECISION   ANRM, ANRMTO, BIGNUM, BNRM, BNRMTO, EPS,
+     $                   SMLNUM, TEMP
+      COMPLEX*16         X
+*     ..
+*     .. Local Arrays ..
+      LOGICAL            LDUMMA( 1 )
+*     ..
+*     .. External Subroutines ..
+      EXTERNAL           DLABAD, XERBLA, ZGEQRF, ZGGBAK, ZGGBAL, ZGGHRD,
+     $                   ZHGEQZ, ZLACPY, ZLASCL, ZLASET, ZTGEVC, ZUNGQR,
+     $                   ZUNMQR
+*     ..
+*     .. External Functions ..
+      LOGICAL            LSAME
+      INTEGER            ILAENV
+      DOUBLE PRECISION   DLAMCH, ZLANGE
+      EXTERNAL           LSAME, ILAENV, DLAMCH, ZLANGE
+*     ..
+*     .. Intrinsic Functions ..
+      INTRINSIC          ABS, DBLE, DIMAG, MAX, SQRT
+*     ..
+*     .. Statement Functions ..
+      DOUBLE PRECISION   ABS1
+*     ..
+*     .. Statement Function definitions ..
+      ABS1( X ) = ABS( DBLE( X ) ) + ABS( DIMAG( X ) )
+*     ..
+*     .. Executable Statements ..
+*
+*     Decode the input arguments
+*
+      IF( LSAME( JOBVL, 'N' ) ) THEN
+         IJOBVL = 1
+         ILVL = .FALSE.
+      ELSE IF( LSAME( JOBVL, 'V' ) ) THEN
+         IJOBVL = 2
+         ILVL = .TRUE.
+      ELSE
+         IJOBVL = -1
+         ILVL = .FALSE.
+      END IF
+*
+      IF( LSAME( JOBVR, 'N' ) ) THEN
+         IJOBVR = 1
+         ILVR = .FALSE.
+      ELSE IF( LSAME( JOBVR, 'V' ) ) THEN
+         IJOBVR = 2
+         ILVR = .TRUE.
+      ELSE
+         IJOBVR = -1
+         ILVR = .FALSE.
+      END IF
+      ILV = ILVL .OR. ILVR
+*
+*     Test the input arguments
+*
+      INFO = 0
+      LQUERY = ( LWORK.EQ.-1 )
+      IF( IJOBVL.LE.0 ) THEN
+         INFO = -1
+      ELSE IF( IJOBVR.LE.0 ) THEN
+         INFO = -2
+      ELSE IF( N.LT.0 ) THEN
+         INFO = -3
+      ELSE IF( LDA.LT.MAX( 1, N ) ) THEN
+         INFO = -5
+      ELSE IF( LDB.LT.MAX( 1, N ) ) THEN
+         INFO = -7
+      ELSE IF( LDVL.LT.1 .OR. ( ILVL .AND. LDVL.LT.N ) ) THEN
+         INFO = -11
+      ELSE IF( LDVR.LT.1 .OR. ( ILVR .AND. LDVR.LT.N ) ) THEN
+         INFO = -13
+      END IF
+*
+*     Compute workspace
+*      (Note: Comments in the code beginning "Workspace:" describe the
+*       minimal amount of workspace needed at that point in the code,
+*       as well as the preferred amount for good performance.
+*       NB refers to the optimal block size for the immediately
+*       following subroutine, as returned by ILAENV. The workspace is
+*       computed assuming ILO = 1 and IHI = N, the worst case.)
+*
+      IF( INFO.EQ.0 ) THEN
+         LWKMIN = MAX( 1, 2*N )
+         LWKOPT = MAX( 1, N + N*ILAENV( 1, 'ZGEQRF', ' ', N, 1, N, 0 ) )
+         LWKOPT = MAX( LWKOPT, N +
+     $                 N*ILAENV( 1, 'ZUNMQR', ' ', N, 1, N, 0 ) )
+         IF( ILVL ) THEN
+            LWKOPT = MAX( LWKOPT, N +
+     $                    N*ILAENV( 1, 'ZUNGQR', ' ', N, 1, N, -1 ) )
+         END IF
+         WORK( 1 ) = LWKOPT
+*
+         IF( LWORK.LT.LWKMIN .AND. .NOT.LQUERY )
+     $      INFO = -15
+      END IF
+*
+      IF( INFO.NE.0 ) THEN
+         CALL XERBLA( 'ZGGEV ', -INFO )
+         RETURN
+      ELSE IF( LQUERY ) THEN
+         RETURN
+      END IF
+*
+*     Quick return if possible
+*
+      IF( N.EQ.0 )
+     $   RETURN
+*
+*     Get machine constants
+*
+      EPS = DLAMCH( 'E' )*DLAMCH( 'B' )
+      SMLNUM = DLAMCH( 'S' )
+      BIGNUM = ONE / SMLNUM
+      CALL DLABAD( SMLNUM, BIGNUM )
+      SMLNUM = SQRT( SMLNUM ) / EPS
+      BIGNUM = ONE / SMLNUM
+*
+*     Scale A if max element outside range [SMLNUM,BIGNUM]
+*
+      ANRM = ZLANGE( 'M', N, N, A, LDA, RWORK )
+      ILASCL = .FALSE.
+      IF( ANRM.GT.ZERO .AND. ANRM.LT.SMLNUM ) THEN
+         ANRMTO = SMLNUM
+         ILASCL = .TRUE.
+      ELSE IF( ANRM.GT.BIGNUM ) THEN
+         ANRMTO = BIGNUM
+         ILASCL = .TRUE.
+      END IF
+      IF( ILASCL )
+     $   CALL ZLASCL( 'G', 0, 0, ANRM, ANRMTO, N, N, A, LDA, IERR )
+*
+*     Scale B if max element outside range [SMLNUM,BIGNUM]
+*
+      BNRM = ZLANGE( 'M', N, N, B, LDB, RWORK )
+      ILBSCL = .FALSE.
+      IF( BNRM.GT.ZERO .AND. BNRM.LT.SMLNUM ) THEN
+         BNRMTO = SMLNUM
+         ILBSCL = .TRUE.
+      ELSE IF( BNRM.GT.BIGNUM ) THEN
+         BNRMTO = BIGNUM
+         ILBSCL = .TRUE.
+      END IF
+      IF( ILBSCL )
+     $   CALL ZLASCL( 'G', 0, 0, BNRM, BNRMTO, N, N, B, LDB, IERR )
+*
+*     Permute the matrices A, B to isolate eigenvalues if possible
+*     (Real Workspace: need 6*N)
+*
+      ILEFT = 1
+      IRIGHT = N + 1
+      IRWRK = IRIGHT + N
+      CALL ZGGBAL( 'P', N, A, LDA, B, LDB, ILO, IHI, RWORK( ILEFT ),
+     $             RWORK( IRIGHT ), RWORK( IRWRK ), IERR )
+*
+*     Reduce B to triangular form (QR decomposition of B)
+*     (Complex Workspace: need N, prefer N*NB)
+*
+      IROWS = IHI + 1 - ILO
+      IF( ILV ) THEN
+         ICOLS = N + 1 - ILO
+      ELSE
+         ICOLS = IROWS
+      END IF
+      ITAU = 1
+      IWRK = ITAU + IROWS
+      CALL ZGEQRF( IROWS, ICOLS, B( ILO, ILO ), LDB, WORK( ITAU ),
+     $             WORK( IWRK ), LWORK+1-IWRK, IERR )
+*
+*     Apply the orthogonal transformation to matrix A
+*     (Complex Workspace: need N, prefer N*NB)
+*
+      CALL ZUNMQR( 'L', 'C', IROWS, ICOLS, IROWS, B( ILO, ILO ), LDB,
+     $             WORK( ITAU ), A( ILO, ILO ), LDA, WORK( IWRK ),
+     $             LWORK+1-IWRK, IERR )
+*
+*     Initialize VL
+*     (Complex Workspace: need N, prefer N*NB)
+*
+      IF( ILVL ) THEN
+         CALL ZLASET( 'Full', N, N, CZERO, CONE, VL, LDVL )
+         IF( IROWS.GT.1 ) THEN
+            CALL ZLACPY( 'L', IROWS-1, IROWS-1, B( ILO+1, ILO ), LDB,
+     $                   VL( ILO+1, ILO ), LDVL )
+         END IF
+         CALL ZUNGQR( IROWS, IROWS, IROWS, VL( ILO, ILO ), LDVL,
+     $                WORK( ITAU ), WORK( IWRK ), LWORK+1-IWRK, IERR )
+      END IF
+*
+*     Initialize VR
+*
+      IF( ILVR )
+     $   CALL ZLASET( 'Full', N, N, CZERO, CONE, VR, LDVR )
+*
+*     Reduce to generalized Hessenberg form
+*
+      IF( ILV ) THEN
+*
+*        Eigenvectors requested -- work on whole matrix.
+*
+         CALL ZGGHRD( JOBVL, JOBVR, N, ILO, IHI, A, LDA, B, LDB, VL,
+     $                LDVL, VR, LDVR, IERR )
+      ELSE
+         CALL ZGGHRD( 'N', 'N', IROWS, 1, IROWS, A( ILO, ILO ), LDA,
+     $                B( ILO, ILO ), LDB, VL, LDVL, VR, LDVR, IERR )
+      END IF
+*
+*     Perform QZ algorithm (Compute eigenvalues, and optionally, the
+*     Schur form and Schur vectors)
+*     (Complex Workspace: need N)
+*     (Real Workspace: need N)
+*
+      IWRK = ITAU
+      IF( ILV ) THEN
+         CHTEMP = 'S'
+      ELSE
+         CHTEMP = 'E'
+      END IF
+      CALL ZHGEQZ( CHTEMP, JOBVL, JOBVR, N, ILO, IHI, A, LDA, B, LDB,
+     $             ALPHA, BETA, VL, LDVL, VR, LDVR, WORK( IWRK ),
+     $             LWORK+1-IWRK, RWORK( IRWRK ), IERR )
+      IF( IERR.NE.0 ) THEN
+         IF( IERR.GT.0 .AND. IERR.LE.N ) THEN
+            INFO = IERR
+         ELSE IF( IERR.GT.N .AND. IERR.LE.2*N ) THEN
+            INFO = IERR - N
+         ELSE
+            INFO = N + 1
+         END IF
+         GO TO 70
+      END IF
+*
+*     Compute Eigenvectors
+*     (Real Workspace: need 2*N)
+*     (Complex Workspace: need 2*N)
+*
+      IF( ILV ) THEN
+         IF( ILVL ) THEN
+            IF( ILVR ) THEN
+               CHTEMP = 'B'
+            ELSE
+               CHTEMP = 'L'
+            END IF
+         ELSE
+            CHTEMP = 'R'
+         END IF
+*
+         CALL ZTGEVC( CHTEMP, 'B', LDUMMA, N, A, LDA, B, LDB, VL, LDVL,
+     $                VR, LDVR, N, IN, WORK( IWRK ), RWORK( IRWRK ),
+     $                IERR )
+         IF( IERR.NE.0 ) THEN
+            INFO = N + 2
+            GO TO 70
+         END IF
+*
+*        Undo balancing on VL and VR and normalization
+*        (Workspace: none needed)
+*
+         IF( ILVL ) THEN
+            CALL ZGGBAK( 'P', 'L', N, ILO, IHI, RWORK( ILEFT ),
+     $                   RWORK( IRIGHT ), N, VL, LDVL, IERR )
+            DO 30 JC = 1, N
+               TEMP = ZERO
+               DO 10 JR = 1, N
+                  TEMP = MAX( TEMP, ABS1( VL( JR, JC ) ) )
+   10          CONTINUE
+               IF( TEMP.LT.SMLNUM )
+     $            GO TO 30
+               TEMP = ONE / TEMP
+               DO 20 JR = 1, N
+                  VL( JR, JC ) = VL( JR, JC )*TEMP
+   20          CONTINUE
+   30       CONTINUE
+         END IF
+         IF( ILVR ) THEN
+            CALL ZGGBAK( 'P', 'R', N, ILO, IHI, RWORK( ILEFT ),
+     $                   RWORK( IRIGHT ), N, VR, LDVR, IERR )
+            DO 60 JC = 1, N
+               TEMP = ZERO
+               DO 40 JR = 1, N
+                  TEMP = MAX( TEMP, ABS1( VR( JR, JC ) ) )
+   40          CONTINUE
+               IF( TEMP.LT.SMLNUM )
+     $            GO TO 60
+               TEMP = ONE / TEMP
+               DO 50 JR = 1, N
+                  VR( JR, JC ) = VR( JR, JC )*TEMP
+   50          CONTINUE
+   60       CONTINUE
+         END IF
+      END IF
+*
+*     Undo scaling if necessary
+*
+   70 CONTINUE
+*
+      IF( ILASCL )
+     $   CALL ZLASCL( 'G', 0, 0, ANRMTO, ANRM, N, 1, ALPHA, N, IERR )
+*
+      IF( ILBSCL )
+     $   CALL ZLASCL( 'G', 0, 0, BNRMTO, BNRM, N, 1, BETA, N, IERR )
+*
+      WORK( 1 ) = LWKOPT
+      RETURN
+*
+*     End of ZGGEV
+*
+      END
+*> \brief \b ZGGHRD
+*
+*  =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
+*
+*> \htmlonly
+*> Download ZGGHRD + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/zgghrd.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/zgghrd.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/zgghrd.f">
+*> [TXT]</a>
+*> \endhtmlonly
+*
+*  Definition:
+*  ===========
+*
+*       SUBROUTINE ZGGHRD( COMPQ, COMPZ, N, ILO, IHI, A, LDA, B, LDB, Q,
+*                          LDQ, Z, LDZ, INFO )
+*
+*       .. Scalar Arguments ..
+*       CHARACTER          COMPQ, COMPZ
+*       INTEGER            IHI, ILO, INFO, LDA, LDB, LDQ, LDZ, N
+*       ..
+*       .. Array Arguments ..
+*       COMPLEX*16         A( LDA, * ), B( LDB, * ), Q( LDQ, * ),
+*      $                   Z( LDZ, * )
+*       ..
+*
+*
+*> \par Purpose:
+*  =============
+*>
+*> \verbatim
+*>
+*> ZGGHRD reduces a pair of complex matrices (A,B) to generalized upper
+*> Hessenberg form using unitary transformations, where A is a
+*> general matrix and B is upper triangular.  The form of the
+*> generalized eigenvalue problem is
+*>    A*x = lambda*B*x,
+*> and B is typically made upper triangular by computing its QR
+*> factorization and moving the unitary matrix Q to the left side
+*> of the equation.
+*>
+*> This subroutine simultaneously reduces A to a Hessenberg matrix H:
+*>    Q**H*A*Z = H
+*> and transforms B to another upper triangular matrix T:
+*>    Q**H*B*Z = T
+*> in order to reduce the problem to its standard form
+*>    H*y = lambda*T*y
+*> where y = Z**H*x.
+*>
+*> The unitary matrices Q and Z are determined as products of Givens
+*> rotations.  They may either be formed explicitly, or they may be
+*> postmultiplied into input matrices Q1 and Z1, so that
+*>      Q1 * A * Z1**H = (Q1*Q) * H * (Z1*Z)**H
+*>      Q1 * B * Z1**H = (Q1*Q) * T * (Z1*Z)**H
+*> If Q1 is the unitary matrix from the QR factorization of B in the
+*> original equation A*x = lambda*B*x, then ZGGHRD reduces the original
+*> problem to generalized Hessenberg form.
+*> \endverbatim
+*
+*  Arguments:
+*  ==========
+*
+*> \param[in] COMPQ
+*> \verbatim
+*>          COMPQ is CHARACTER*1
+*>          = 'N': do not compute Q;
+*>          = 'I': Q is initialized to the unit matrix, and the
+*>                 unitary matrix Q is returned;
+*>          = 'V': Q must contain a unitary matrix Q1 on entry,
+*>                 and the product Q1*Q is returned.
+*> \endverbatim
+*>
+*> \param[in] COMPZ
+*> \verbatim
+*>          COMPZ is CHARACTER*1
+*>          = 'N': do not compute Z;
+*>          = 'I': Z is initialized to the unit matrix, and the
+*>                 unitary matrix Z is returned;
+*>          = 'V': Z must contain a unitary matrix Z1 on entry,
+*>                 and the product Z1*Z is returned.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*>          N is INTEGER
+*>          The order of the matrices A and B.  N >= 0.
+*> \endverbatim
+*>
+*> \param[in] ILO
+*> \verbatim
+*>          ILO is INTEGER
+*> \endverbatim
+*>
+*> \param[in] IHI
+*> \verbatim
+*>          IHI is INTEGER
+*>
+*>          ILO and IHI mark the rows and columns of A which are to be
+*>          reduced.  It is assumed that A is already upper triangular
+*>          in rows and columns 1:ILO-1 and IHI+1:N.  ILO and IHI are
+*>          normally set by a previous call to ZGGBAL; otherwise they
+*>          should be set to 1 and N respectively.
+*>          1 <= ILO <= IHI <= N, if N > 0; ILO=1 and IHI=0, if N=0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*>          A is COMPLEX*16 array, dimension (LDA, N)
+*>          On entry, the N-by-N general matrix to be reduced.
+*>          On exit, the upper triangle and the first subdiagonal of A
+*>          are overwritten with the upper Hessenberg matrix H, and the
+*>          rest is set to zero.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*>          LDA is INTEGER
+*>          The leading dimension of the array A.  LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*>          B is COMPLEX*16 array, dimension (LDB, N)
+*>          On entry, the N-by-N upper triangular matrix B.
+*>          On exit, the upper triangular matrix T = Q**H B Z.  The
+*>          elements below the diagonal are set to zero.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*>          LDB is INTEGER
+*>          The leading dimension of the array B.  LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in,out] Q
+*> \verbatim
+*>          Q is COMPLEX*16 array, dimension (LDQ, N)
+*>          On entry, if COMPQ = 'V', the unitary matrix Q1, typically
+*>          from the QR factorization of B.
+*>          On exit, if COMPQ='I', the unitary matrix Q, and if
+*>          COMPQ = 'V', the product Q1*Q.
+*>          Not referenced if COMPQ='N'.
+*> \endverbatim
+*>
+*> \param[in] LDQ
+*> \verbatim
+*>          LDQ is INTEGER
+*>          The leading dimension of the array Q.
+*>          LDQ >= N if COMPQ='V' or 'I'; LDQ >= 1 otherwise.
+*> \endverbatim
+*>
+*> \param[in,out] Z
+*> \verbatim
+*>          Z is COMPLEX*16 array, dimension (LDZ, N)
+*>          On entry, if COMPZ = 'V', the unitary matrix Z1.
+*>          On exit, if COMPZ='I', the unitary matrix Z, and if
+*>          COMPZ = 'V', the product Z1*Z.
+*>          Not referenced if COMPZ='N'.
+*> \endverbatim
+*>
+*> \param[in] LDZ
+*> \verbatim
+*>          LDZ is INTEGER
+*>          The leading dimension of the array Z.
+*>          LDZ >= N if COMPZ='V' or 'I'; LDZ >= 1 otherwise.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*>          INFO is INTEGER
+*>          = 0:  successful exit.
+*>          < 0:  if INFO = -i, the i-th argument had an illegal value.
+*> \endverbatim
+*
+*  Authors:
+*  ========
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date December 2016
+*
+*> \ingroup complex16OTHERcomputational
+*
+*> \par Further Details:
+*  =====================
+*>
+*> \verbatim
+*>
+*>  This routine reduces A to Hessenberg and B to triangular form by
+*>  an unblocked reduction, as described in _Matrix_Computations_,
+*>  by Golub and van Loan (Johns Hopkins Press).
+*> \endverbatim
+*>
+*  =====================================================================
+      SUBROUTINE ZGGHRD( COMPQ, COMPZ, N, ILO, IHI, A, LDA, B, LDB, Q,
+     $                   LDQ, Z, LDZ, INFO )
+*
+*  -- LAPACK computational routine (version 3.7.0) --
+*  -- LAPACK is a software package provided by Univ. of Tennessee,    --
+*  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+*     December 2016
+*
+*     .. Scalar Arguments ..
+      CHARACTER          COMPQ, COMPZ
+      INTEGER            IHI, ILO, INFO, LDA, LDB, LDQ, LDZ, N
+*     ..
+*     .. Array Arguments ..
+      COMPLEX*16         A( LDA, * ), B( LDB, * ), Q( LDQ, * ),
+     $                   Z( LDZ, * )
+*     ..
+*
+*  =====================================================================
+*
+*     .. Parameters ..
+      COMPLEX*16         CONE, CZERO
+      PARAMETER          ( CONE = ( 1.0D+0, 0.0D+0 ),
+     $                   CZERO = ( 0.0D+0, 0.0D+0 ) )
+*     ..
+*     .. Local Scalars ..
+      LOGICAL            ILQ, ILZ
+      INTEGER            ICOMPQ, ICOMPZ, JCOL, JROW
+      DOUBLE PRECISION   C
+      COMPLEX*16         CTEMP, S
+*     ..
+*     .. External Functions ..
+      LOGICAL            LSAME
+      EXTERNAL           LSAME
+*     ..
+*     .. External Subroutines ..
+      EXTERNAL           XERBLA, ZLARTG, ZLASET, ZROT
+*     ..
+*     .. Intrinsic Functions ..
+      INTRINSIC          DCONJG, MAX
+*     ..
+*     .. Executable Statements ..
+*
+*     Decode COMPQ
+*
+      IF( LSAME( COMPQ, 'N' ) ) THEN
+         ILQ = .FALSE.
+         ICOMPQ = 1
+      ELSE IF( LSAME( COMPQ, 'V' ) ) THEN
+         ILQ = .TRUE.
+         ICOMPQ = 2
+      ELSE IF( LSAME( COMPQ, 'I' ) ) THEN
+         ILQ = .TRUE.
+         ICOMPQ = 3
+      ELSE
+         ICOMPQ = 0
+      END IF
+*
+*     Decode COMPZ
+*
+      IF( LSAME( COMPZ, 'N' ) ) THEN
+         ILZ = .FALSE.
+         ICOMPZ = 1
+      ELSE IF( LSAME( COMPZ, 'V' ) ) THEN
+         ILZ = .TRUE.
+         ICOMPZ = 2
+      ELSE IF( LSAME( COMPZ, 'I' ) ) THEN
+         ILZ = .TRUE.
+         ICOMPZ = 3
+      ELSE
+         ICOMPZ = 0
+      END IF
+*
+*     Test the input parameters.
+*
+      INFO = 0
+      IF( ICOMPQ.LE.0 ) THEN
+         INFO = -1
+      ELSE IF( ICOMPZ.LE.0 ) THEN
+         INFO = -2
+      ELSE IF( N.LT.0 ) THEN
+         INFO = -3
+      ELSE IF( ILO.LT.1 ) THEN
+         INFO = -4
+      ELSE IF( IHI.GT.N .OR. IHI.LT.ILO-1 ) THEN
+         INFO = -5
+      ELSE IF( LDA.LT.MAX( 1, N ) ) THEN
+         INFO = -7
+      ELSE IF( LDB.LT.MAX( 1, N ) ) THEN
+         INFO = -9
+      ELSE IF( ( ILQ .AND. LDQ.LT.N ) .OR. LDQ.LT.1 ) THEN
+         INFO = -11
+      ELSE IF( ( ILZ .AND. LDZ.LT.N ) .OR. LDZ.LT.1 ) THEN
+         INFO = -13
+      END IF
+      IF( INFO.NE.0 ) THEN
+         CALL XERBLA( 'ZGGHRD', -INFO )
+         RETURN
+      END IF
+*
+*     Initialize Q and Z if desired.
+*
+      IF( ICOMPQ.EQ.3 )
+     $   CALL ZLASET( 'Full', N, N, CZERO, CONE, Q, LDQ )
+      IF( ICOMPZ.EQ.3 )
+     $   CALL ZLASET( 'Full', N, N, CZERO, CONE, Z, LDZ )
+*
+*     Quick return if possible
+*
+      IF( N.LE.1 )
+     $   RETURN
+*
+*     Zero out lower triangle of B
+*
+      DO 20 JCOL = 1, N - 1
+         DO 10 JROW = JCOL + 1, N
+            B( JROW, JCOL ) = CZERO
+   10    CONTINUE
+   20 CONTINUE
+*
+*     Reduce A and B
+*
+      DO 40 JCOL = ILO, IHI - 2
+*
+         DO 30 JROW = IHI, JCOL + 2, -1
+*
+*           Step 1: rotate rows JROW-1, JROW to kill A(JROW,JCOL)
+*
+            CTEMP = A( JROW-1, JCOL )
+            CALL ZLARTG( CTEMP, A( JROW, JCOL ), C, S,
+     $                   A( JROW-1, JCOL ) )
+            A( JROW, JCOL ) = CZERO
+            CALL ZROT( N-JCOL, A( JROW-1, JCOL+1 ), LDA,
+     $                 A( JROW, JCOL+1 ), LDA, C, S )
+            CALL ZROT( N+2-JROW, B( JROW-1, JROW-1 ), LDB,
+     $                 B( JROW, JROW-1 ), LDB, C, S )
+            IF( ILQ )
+     $         CALL ZROT( N, Q( 1, JROW-1 ), 1, Q( 1, JROW ), 1, C,
+     $                    DCONJG( S ) )
+*
+*           Step 2: rotate columns JROW, JROW-1 to kill B(JROW,JROW-1)
+*
+            CTEMP = B( JROW, JROW )
+            CALL ZLARTG( CTEMP, B( JROW, JROW-1 ), C, S,
+     $                   B( JROW, JROW ) )
+            B( JROW, JROW-1 ) = CZERO
+            CALL ZROT( IHI, A( 1, JROW ), 1, A( 1, JROW-1 ), 1, C, S )
+            CALL ZROT( JROW-1, B( 1, JROW ), 1, B( 1, JROW-1 ), 1, C,
+     $                 S )
+            IF( ILZ )
+     $         CALL ZROT( N, Z( 1, JROW ), 1, Z( 1, JROW-1 ), 1, C, S )
+   30    CONTINUE
+   40 CONTINUE
+*
+      RETURN
+*
+*     End of ZGGHRD
+*
+      END
+*> \brief <b> ZHEEV computes the eigenvalues and, optionally, the left and/or right eigenvectors for HE matrices</b>
+*
+*  =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
+*
+*> \htmlonly
+*> Download ZHEEV + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/zheev.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/zheev.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/zheev.f">
+*> [TXT]</a>
+*> \endhtmlonly
+*
+*  Definition:
+*  ===========
+*
+*       SUBROUTINE ZHEEV( JOBZ, UPLO, N, A, LDA, W, WORK, LWORK, RWORK,
+*                         INFO )
+*
+*       .. Scalar Arguments ..
+*       CHARACTER          JOBZ, UPLO
+*       INTEGER            INFO, LDA, LWORK, N
+*       ..
+*       .. Array Arguments ..
+*       DOUBLE PRECISION   RWORK( * ), W( * )
+*       COMPLEX*16         A( LDA, * ), WORK( * )
+*       ..
+*
+*
+*> \par Purpose:
+*  =============
+*>
+*> \verbatim
+*>
+*> ZHEEV computes all eigenvalues and, optionally, eigenvectors of a
+*> complex Hermitian matrix A.
+*> \endverbatim
+*
+*  Arguments:
+*  ==========
+*
+*> \param[in] JOBZ
+*> \verbatim
+*>          JOBZ is CHARACTER*1
+*>          = 'N':  Compute eigenvalues only;
+*>          = 'V':  Compute eigenvalues and eigenvectors.
+*> \endverbatim
+*>
+*> \param[in] UPLO
+*> \verbatim
+*>          UPLO is CHARACTER*1
+*>          = 'U':  Upper triangle of A is stored;
+*>          = 'L':  Lower triangle of A is stored.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*>          N is INTEGER
+*>          The order of the matrix A.  N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*>          A is COMPLEX*16 array, dimension (LDA, N)
+*>          On entry, the Hermitian matrix A.  If UPLO = 'U', the
+*>          leading N-by-N upper triangular part of A contains the
+*>          upper triangular part of the matrix A.  If UPLO = 'L',
+*>          the leading N-by-N lower triangular part of A contains
+*>          the lower triangular part of the matrix A.
+*>          On exit, if JOBZ = 'V', then if INFO = 0, A contains the
+*>          orthonormal eigenvectors of the matrix A.
+*>          If JOBZ = 'N', then on exit the lower triangle (if UPLO='L')
+*>          or the upper triangle (if UPLO='U') of A, including the
+*>          diagonal, is destroyed.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*>          LDA is INTEGER
+*>          The leading dimension of the array A.  LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] W
+*> \verbatim
+*>          W is DOUBLE PRECISION array, dimension (N)
+*>          If INFO = 0, the eigenvalues in ascending order.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*>          WORK is COMPLEX*16 array, dimension (MAX(1,LWORK))
+*>          On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*>          LWORK is INTEGER
+*>          The length of the array WORK.  LWORK >= max(1,2*N-1).
+*>          For optimal efficiency, LWORK >= (NB+1)*N,
+*>          where NB is the blocksize for ZHETRD returned by ILAENV.
+*>
+*>          If LWORK = -1, then a workspace query is assumed; the routine
+*>          only calculates the optimal size of the WORK array, returns
+*>          this value as the first entry of the WORK array, and no error
+*>          message related to LWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*>          RWORK is DOUBLE PRECISION array, dimension (max(1, 3*N-2))
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*>          INFO is INTEGER
+*>          = 0:  successful exit
+*>          < 0:  if INFO = -i, the i-th argument had an illegal value
+*>          > 0:  if INFO = i, the algorithm failed to converge; i
+*>                off-diagonal elements of an intermediate tridiagonal
+*>                form did not converge to zero.
+*> \endverbatim
+*
+*  Authors:
+*  ========
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date December 2016
+*
+*> \ingroup complex16HEeigen
+*
+*  =====================================================================
+      SUBROUTINE ZHEEV( JOBZ, UPLO, N, A, LDA, W, WORK, LWORK, RWORK,
+     $                  INFO )
+*
+*  -- LAPACK driver routine (version 3.7.0) --
+*  -- LAPACK is a software package provided by Univ. of Tennessee,    --
+*  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+*     December 2016
+*
+*     .. Scalar Arguments ..
+      CHARACTER          JOBZ, UPLO
+      INTEGER            INFO, LDA, LWORK, N
+*     ..
+*     .. Array Arguments ..
+      DOUBLE PRECISION   RWORK( * ), W( * )
+      COMPLEX*16         A( LDA, * ), WORK( * )
+*     ..
+*
+*  =====================================================================
+*
+*     .. Parameters ..
+      DOUBLE PRECISION   ZERO, ONE
+      PARAMETER          ( ZERO = 0.0D0, ONE = 1.0D0 )
+      COMPLEX*16         CONE
+      PARAMETER          ( CONE = ( 1.0D0, 0.0D0 ) )
+*     ..
+*     .. Local Scalars ..
+      LOGICAL            LOWER, LQUERY, WANTZ
+      INTEGER            IINFO, IMAX, INDE, INDTAU, INDWRK, ISCALE,
+     $                   LLWORK, LWKOPT, NB
+      DOUBLE PRECISION   ANRM, BIGNUM, EPS, RMAX, RMIN, SAFMIN, SIGMA,
+     $                   SMLNUM
+*     ..
+*     .. External Functions ..
+      LOGICAL            LSAME
+      INTEGER            ILAENV
+      DOUBLE PRECISION   DLAMCH, ZLANHE
+      EXTERNAL           LSAME, ILAENV, DLAMCH, ZLANHE
+*     ..
+*     .. External Subroutines ..
+      EXTERNAL           DSCAL, DSTERF, XERBLA, ZHETRD, ZLASCL, ZSTEQR,
+     $                   ZUNGTR
+*     ..
+*     .. Intrinsic Functions ..
+      INTRINSIC          MAX, SQRT
+*     ..
+*     .. Executable Statements ..
+*
+*     Test the input parameters.
+*
+      WANTZ = LSAME( JOBZ, 'V' )
+      LOWER = LSAME( UPLO, 'L' )
+      LQUERY = ( LWORK.EQ.-1 )
+*
+      INFO = 0
+      IF( .NOT.( WANTZ .OR. LSAME( JOBZ, 'N' ) ) ) THEN
+         INFO = -1
+      ELSE IF( .NOT.( LOWER .OR. LSAME( UPLO, 'U' ) ) ) THEN
+         INFO = -2
+      ELSE IF( N.LT.0 ) THEN
+         INFO = -3
+      ELSE IF( LDA.LT.MAX( 1, N ) ) THEN
+         INFO = -5
+      END IF
+*
+      IF( INFO.EQ.0 ) THEN
+         NB = ILAENV( 1, 'ZHETRD', UPLO, N, -1, -1, -1 )
+         LWKOPT = MAX( 1, ( NB+1 )*N )
+         WORK( 1 ) = LWKOPT
+*
+         IF( LWORK.LT.MAX( 1, 2*N-1 ) .AND. .NOT.LQUERY )
+     $      INFO = -8
+      END IF
+*
+      IF( INFO.NE.0 ) THEN
+         CALL XERBLA( 'ZHEEV ', -INFO )
+         RETURN
+      ELSE IF( LQUERY ) THEN
+         RETURN
+      END IF
+*
+*     Quick return if possible
+*
+      IF( N.EQ.0 ) THEN
+         RETURN
+      END IF
+*
+      IF( N.EQ.1 ) THEN
+         W( 1 ) = A( 1, 1 )
+         WORK( 1 ) = 1
+         IF( WANTZ )
+     $      A( 1, 1 ) = CONE
+         RETURN
+      END IF
+*
+*     Get machine constants.
+*
+      SAFMIN = DLAMCH( 'Safe minimum' )
+      EPS = DLAMCH( 'Precision' )
+      SMLNUM = SAFMIN / EPS
+      BIGNUM = ONE / SMLNUM
+      RMIN = SQRT( SMLNUM )
+      RMAX = SQRT( BIGNUM )
+*
+*     Scale matrix to allowable range, if necessary.
+*
+      ANRM = ZLANHE( 'M', UPLO, N, A, LDA, RWORK )
+      ISCALE = 0
+      IF( ANRM.GT.ZERO .AND. ANRM.LT.RMIN ) THEN
+         ISCALE = 1
+         SIGMA = RMIN / ANRM
+      ELSE IF( ANRM.GT.RMAX ) THEN
+         ISCALE = 1
+         SIGMA = RMAX / ANRM
+      END IF
+      IF( ISCALE.EQ.1 )
+     $   CALL ZLASCL( UPLO, 0, 0, ONE, SIGMA, N, N, A, LDA, INFO )
+*
+*     Call ZHETRD to reduce Hermitian matrix to tridiagonal form.
+*
+      INDE = 1
+      INDTAU = 1
+      INDWRK = INDTAU + N
+      LLWORK = LWORK - INDWRK + 1
+      CALL ZHETRD( UPLO, N, A, LDA, W, RWORK( INDE ), WORK( INDTAU ),
+     $             WORK( INDWRK ), LLWORK, IINFO )
+*
+*     For eigenvalues only, call DSTERF.  For eigenvectors, first call
+*     ZUNGTR to generate the unitary matrix, then call ZSTEQR.
+*
+      IF( .NOT.WANTZ ) THEN
+         CALL DSTERF( N, W, RWORK( INDE ), INFO )
+      ELSE
+         CALL ZUNGTR( UPLO, N, A, LDA, WORK( INDTAU ), WORK( INDWRK ),
+     $                LLWORK, IINFO )
+         INDWRK = INDE + N
+         CALL ZSTEQR( JOBZ, N, W, RWORK( INDE ), A, LDA,
+     $                RWORK( INDWRK ), INFO )
+      END IF
+*
+*     If matrix was scaled, then rescale eigenvalues appropriately.
+*
+      IF( ISCALE.EQ.1 ) THEN
+         IF( INFO.EQ.0 ) THEN
+            IMAX = N
+         ELSE
+            IMAX = INFO - 1
+         END IF
+         CALL DSCAL( IMAX, ONE / SIGMA, W, 1 )
+      END IF
+*
+*     Set WORK(1) to optimal complex workspace size.
+*
+      WORK( 1 ) = LWKOPT
+*
+      RETURN
+*
+*     End of ZHEEV
+*
+      END
+*> \brief <b> ZHEEVD computes the eigenvalues and, optionally, the left and/or right eigenvectors for HE matrices</b>
+*
+*  =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
+*
+*> \htmlonly
+*> Download ZHEEVD + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/zheevd.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/zheevd.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/zheevd.f">
+*> [TXT]</a>
+*> \endhtmlonly
+*
+*  Definition:
+*  ===========
+*
+*       SUBROUTINE ZHEEVD( JOBZ, UPLO, N, A, LDA, W, WORK, LWORK, RWORK,
+*                          LRWORK, IWORK, LIWORK, INFO )
+*
+*       .. Scalar Arguments ..
+*       CHARACTER          JOBZ, UPLO
+*       INTEGER            INFO, LDA, LIWORK, LRWORK, LWORK, N
+*       ..
+*       .. Array Arguments ..
+*       INTEGER            IWORK( * )
+*       DOUBLE PRECISION   RWORK( * ), W( * )
+*       COMPLEX*16         A( LDA, * ), WORK( * )
+*       ..
+*
+*
+*> \par Purpose:
+*  =============
+*>
+*> \verbatim
+*>
+*> ZHEEVD computes all eigenvalues and, optionally, eigenvectors of a
+*> complex Hermitian matrix A.  If eigenvectors are desired, it uses a
+*> divide and conquer algorithm.
+*>
+*> The divide and conquer algorithm makes very mild assumptions about
+*> floating point arithmetic. It will work on machines with a guard
+*> digit in add/subtract, or on those binary machines without guard
+*> digits which subtract like the Cray X-MP, Cray Y-MP, Cray C-90, or
+*> Cray-2. It could conceivably fail on hexadecimal or decimal machines
+*> without guard digits, but we know of none.
+*> \endverbatim
+*
+*  Arguments:
+*  ==========
+*
+*> \param[in] JOBZ
+*> \verbatim
+*>          JOBZ is CHARACTER*1
+*>          = 'N':  Compute eigenvalues only;
+*>          = 'V':  Compute eigenvalues and eigenvectors.
+*> \endverbatim
+*>
+*> \param[in] UPLO
+*> \verbatim
+*>          UPLO is CHARACTER*1
+*>          = 'U':  Upper triangle of A is stored;
+*>          = 'L':  Lower triangle of A is stored.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*>          N is INTEGER
+*>          The order of the matrix A.  N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*>          A is COMPLEX*16 array, dimension (LDA, N)
+*>          On entry, the Hermitian matrix A.  If UPLO = 'U', the
+*>          leading N-by-N upper triangular part of A contains the
+*>          upper triangular part of the matrix A.  If UPLO = 'L',
+*>          the leading N-by-N lower triangular part of A contains
+*>          the lower triangular part of the matrix A.
+*>          On exit, if JOBZ = 'V', then if INFO = 0, A contains the
+*>          orthonormal eigenvectors of the matrix A.
+*>          If JOBZ = 'N', then on exit the lower triangle (if UPLO='L')
+*>          or the upper triangle (if UPLO='U') of A, including the
+*>          diagonal, is destroyed.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*>          LDA is INTEGER
+*>          The leading dimension of the array A.  LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] W
+*> \verbatim
+*>          W is DOUBLE PRECISION array, dimension (N)
+*>          If INFO = 0, the eigenvalues in ascending order.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*>          WORK is COMPLEX*16 array, dimension (MAX(1,LWORK))
+*>          On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*>          LWORK is INTEGER
+*>          The length of the array WORK.
+*>          If N <= 1,                LWORK must be at least 1.
+*>          If JOBZ  = 'N' and N > 1, LWORK must be at least N + 1.
+*>          If JOBZ  = 'V' and N > 1, LWORK must be at least 2*N + N**2.
+*>
+*>          If LWORK = -1, then a workspace query is assumed; the routine
+*>          only calculates the optimal sizes of the WORK, RWORK and
+*>          IWORK arrays, returns these values as the first entries of
+*>          the WORK, RWORK and IWORK arrays, and no error message
+*>          related to LWORK or LRWORK or LIWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*>          RWORK is DOUBLE PRECISION array,
+*>                                         dimension (LRWORK)
+*>          On exit, if INFO = 0, RWORK(1) returns the optimal LRWORK.
+*> \endverbatim
+*>
+*> \param[in] LRWORK
+*> \verbatim
+*>          LRWORK is INTEGER
+*>          The dimension of the array RWORK.
+*>          If N <= 1,                LRWORK must be at least 1.
+*>          If JOBZ  = 'N' and N > 1, LRWORK must be at least N.
+*>          If JOBZ  = 'V' and N > 1, LRWORK must be at least
+*>                         1 + 5*N + 2*N**2.
+*>
+*>          If LRWORK = -1, then a workspace query is assumed; the
+*>          routine only calculates the optimal sizes of the WORK, RWORK
+*>          and IWORK arrays, returns these values as the first entries
+*>          of the WORK, RWORK and IWORK arrays, and no error message
+*>          related to LWORK or LRWORK or LIWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*>          IWORK is INTEGER array, dimension (MAX(1,LIWORK))
+*>          On exit, if INFO = 0, IWORK(1) returns the optimal LIWORK.
+*> \endverbatim
+*>
+*> \param[in] LIWORK
+*> \verbatim
+*>          LIWORK is INTEGER
+*>          The dimension of the array IWORK.
+*>          If N <= 1,                LIWORK must be at least 1.
+*>          If JOBZ  = 'N' and N > 1, LIWORK must be at least 1.
+*>          If JOBZ  = 'V' and N > 1, LIWORK must be at least 3 + 5*N.
+*>
+*>          If LIWORK = -1, then a workspace query is assumed; the
+*>          routine only calculates the optimal sizes of the WORK, RWORK
+*>          and IWORK arrays, returns these values as the first entries
+*>          of the WORK, RWORK and IWORK arrays, and no error message
+*>          related to LWORK or LRWORK or LIWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*>          INFO is INTEGER
+*>          = 0:  successful exit
+*>          < 0:  if INFO = -i, the i-th argument had an illegal value
+*>          > 0:  if INFO = i and JOBZ = 'N', then the algorithm failed
+*>                to converge; i off-diagonal elements of an intermediate
+*>                tridiagonal form did not converge to zero;
+*>                if INFO = i and JOBZ = 'V', then the algorithm failed
+*>                to compute an eigenvalue while working on the submatrix
+*>                lying in rows and columns INFO/(N+1) through
+*>                mod(INFO,N+1).
+*> \endverbatim
+*
+*  Authors:
+*  ========
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date December 2016
+*
+*> \ingroup complex16HEeigen
+*
+*> \par Further Details:
+*  =====================
+*>
+*>  Modified description of INFO. Sven, 16 Feb 05.
+*
+*> \par Contributors:
+*  ==================
+*>
+*> Jeff Rutter, Computer Science Division, University of California
+*> at Berkeley, USA
+*>
+*  =====================================================================
+      SUBROUTINE ZHEEVD( JOBZ, UPLO, N, A, LDA, W, WORK, LWORK, RWORK,
+     $                   LRWORK, IWORK, LIWORK, INFO )
+*
+*  -- LAPACK driver routine (version 3.7.0) --
+*  -- LAPACK is a software package provided by Univ. of Tennessee,    --
+*  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+*     December 2016
+*
+*     .. Scalar Arguments ..
+      CHARACTER          JOBZ, UPLO
+      INTEGER            INFO, LDA, LIWORK, LRWORK, LWORK, N
+*     ..
+*     .. Array Arguments ..
+      INTEGER            IWORK( * )
+      DOUBLE PRECISION   RWORK( * ), W( * )
+      COMPLEX*16         A( LDA, * ), WORK( * )
+*     ..
+*
+*  =====================================================================
+*
+*     .. Parameters ..
+      DOUBLE PRECISION   ZERO, ONE
+      PARAMETER          ( ZERO = 0.0D0, ONE = 1.0D0 )
+      COMPLEX*16         CONE
+      PARAMETER          ( CONE = ( 1.0D0, 0.0D0 ) )
+*     ..
+*     .. Local Scalars ..
+      LOGICAL            LOWER, LQUERY, WANTZ
+      INTEGER            IINFO, IMAX, INDE, INDRWK, INDTAU, INDWK2,
+     $                   INDWRK, ISCALE, LIOPT, LIWMIN, LLRWK, LLWORK,
+     $                   LLWRK2, LOPT, LROPT, LRWMIN, LWMIN
+      DOUBLE PRECISION   ANRM, BIGNUM, EPS, RMAX, RMIN, SAFMIN, SIGMA,
+     $                   SMLNUM
+*     ..
+*     .. External Functions ..
+      LOGICAL            LSAME
+      INTEGER            ILAENV
+      DOUBLE PRECISION   DLAMCH, ZLANHE
+      EXTERNAL           LSAME, ILAENV, DLAMCH, ZLANHE
+*     ..
+*     .. External Subroutines ..
+      EXTERNAL           DSCAL, DSTERF, XERBLA, ZHETRD, ZLACPY, ZLASCL,
+     $                   ZSTEDC, ZUNMTR
+*     ..
+*     .. Intrinsic Functions ..
+      INTRINSIC          MAX, SQRT
+*     ..
+*     .. Executable Statements ..
+*
+*     Test the input parameters.
+*
+      WANTZ = LSAME( JOBZ, 'V' )
+      LOWER = LSAME( UPLO, 'L' )
+      LQUERY = ( LWORK.EQ.-1 .OR. LRWORK.EQ.-1 .OR. LIWORK.EQ.-1 )
+*
+      INFO = 0
+      IF( .NOT.( WANTZ .OR. LSAME( JOBZ, 'N' ) ) ) THEN
+         INFO = -1
+      ELSE IF( .NOT.( LOWER .OR. LSAME( UPLO, 'U' ) ) ) THEN
+         INFO = -2
+      ELSE IF( N.LT.0 ) THEN
+         INFO = -3
+      ELSE IF( LDA.LT.MAX( 1, N ) ) THEN
+         INFO = -5
+      END IF
+*
+      IF( INFO.EQ.0 ) THEN
+         IF( N.LE.1 ) THEN
+            LWMIN = 1
+            LRWMIN = 1
+            LIWMIN = 1
+            LOPT = LWMIN
+            LROPT = LRWMIN
+            LIOPT = LIWMIN
+         ELSE
+            IF( WANTZ ) THEN
+               LWMIN = 2*N + N*N
+               LRWMIN = 1 + 5*N + 2*N**2
+               LIWMIN = 3 + 5*N
+            ELSE
+               LWMIN = N + 1
+               LRWMIN = N
+               LIWMIN = 1
+            END IF
+            LOPT = MAX( LWMIN, N +
+     $                  ILAENV( 1, 'ZHETRD', UPLO, N, -1, -1, -1 ) )
+            LROPT = LRWMIN
+            LIOPT = LIWMIN
+         END IF
+         WORK( 1 ) = LOPT
+         RWORK( 1 ) = LROPT
+         IWORK( 1 ) = LIOPT
+*
+         IF( LWORK.LT.LWMIN .AND. .NOT.LQUERY ) THEN
+            INFO = -8
+         ELSE IF( LRWORK.LT.LRWMIN .AND. .NOT.LQUERY ) THEN
+            INFO = -10
+         ELSE IF( LIWORK.LT.LIWMIN .AND. .NOT.LQUERY ) THEN
+            INFO = -12
+         END IF
+      END IF
+*
+      IF( INFO.NE.0 ) THEN
+         CALL XERBLA( 'ZHEEVD', -INFO )
+         RETURN
+      ELSE IF( LQUERY ) THEN
+         RETURN
+      END IF
+*
+*     Quick return if possible
+*
+      IF( N.EQ.0 )
+     $   RETURN
+*
+      IF( N.EQ.1 ) THEN
+         W( 1 ) = A( 1, 1 )
+         IF( WANTZ )
+     $      A( 1, 1 ) = CONE
+         RETURN
+      END IF
+*
+*     Get machine constants.
+*
+      SAFMIN = DLAMCH( 'Safe minimum' )
+      EPS = DLAMCH( 'Precision' )
+      SMLNUM = SAFMIN / EPS
+      BIGNUM = ONE / SMLNUM
+      RMIN = SQRT( SMLNUM )
+      RMAX = SQRT( BIGNUM )
+*
+*     Scale matrix to allowable range, if necessary.
+*
+      ANRM = ZLANHE( 'M', UPLO, N, A, LDA, RWORK )
+      ISCALE = 0
+      IF( ANRM.GT.ZERO .AND. ANRM.LT.RMIN ) THEN
+         ISCALE = 1
+         SIGMA = RMIN / ANRM
+      ELSE IF( ANRM.GT.RMAX ) THEN
+         ISCALE = 1
+         SIGMA = RMAX / ANRM
+      END IF
+      IF( ISCALE.EQ.1 )
+     $   CALL ZLASCL( UPLO, 0, 0, ONE, SIGMA, N, N, A, LDA, INFO )
+*
+*     Call ZHETRD to reduce Hermitian matrix to tridiagonal form.
+*
+      INDE = 1
+      INDTAU = 1
+      INDWRK = INDTAU + N
+      INDRWK = INDE + N
+      INDWK2 = INDWRK + N*N
+      LLWORK = LWORK - INDWRK + 1
+      LLWRK2 = LWORK - INDWK2 + 1
+      LLRWK = LRWORK - INDRWK + 1
+      CALL ZHETRD( UPLO, N, A, LDA, W, RWORK( INDE ), WORK( INDTAU ),
+     $             WORK( INDWRK ), LLWORK, IINFO )
+*
+*     For eigenvalues only, call DSTERF.  For eigenvectors, first call
+*     ZSTEDC to generate the eigenvector matrix, WORK(INDWRK), of the
+*     tridiagonal matrix, then call ZUNMTR to multiply it to the
+*     Householder transformations represented as Householder vectors in
+*     A.
+*
+      IF( .NOT.WANTZ ) THEN
+         CALL DSTERF( N, W, RWORK( INDE ), INFO )
+      ELSE
+         CALL ZSTEDC( 'I', N, W, RWORK( INDE ), WORK( INDWRK ), N,
+     $                WORK( INDWK2 ), LLWRK2, RWORK( INDRWK ), LLRWK,
+     $                IWORK, LIWORK, INFO )
+         CALL ZUNMTR( 'L', UPLO, 'N', N, N, A, LDA, WORK( INDTAU ),
+     $                WORK( INDWRK ), N, WORK( INDWK2 ), LLWRK2, IINFO )
+         CALL ZLACPY( 'A', N, N, WORK( INDWRK ), N, A, LDA )
+      END IF
+*
+*     If matrix was scaled, then rescale eigenvalues appropriately.
+*
+      IF( ISCALE.EQ.1 ) THEN
+         IF( INFO.EQ.0 ) THEN
+            IMAX = N
+         ELSE
+            IMAX = INFO - 1
+         END IF
+         CALL DSCAL( IMAX, ONE / SIGMA, W, 1 )
+      END IF
+*
+      WORK( 1 ) = LOPT
+      RWORK( 1 ) = LROPT
+      IWORK( 1 ) = LIOPT
+*
+      RETURN
+*
+*     End of ZHEEVD
+*
+      END
+*> \brief \b ZHETD2 reduces a Hermitian matrix to real symmetric tridiagonal form by an unitary similarity transformation (unblocked algorithm).
+*
+*  =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
+*
+*> \htmlonly
+*> Download ZHETD2 + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/zhetd2.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/zhetd2.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/zhetd2.f">
+*> [TXT]</a>
+*> \endhtmlonly
+*
+*  Definition:
+*  ===========
+*
+*       SUBROUTINE ZHETD2( UPLO, N, A, LDA, D, E, TAU, INFO )
+*
+*       .. Scalar Arguments ..
+*       CHARACTER          UPLO
+*       INTEGER            INFO, LDA, N
+*       ..
+*       .. Array Arguments ..
+*       DOUBLE PRECISION   D( * ), E( * )
+*       COMPLEX*16         A( LDA, * ), TAU( * )
+*       ..
+*
+*
+*> \par Purpose:
+*  =============
+*>
+*> \verbatim
+*>
+*> ZHETD2 reduces a complex Hermitian matrix A to real symmetric
+*> tridiagonal form T by a unitary similarity transformation:
+*> Q**H * A * Q = T.
+*> \endverbatim
+*
+*  Arguments:
+*  ==========
+*
+*> \param[in] UPLO
+*> \verbatim
+*>          UPLO is CHARACTER*1
+*>          Specifies whether the upper or lower triangular part of the
+*>          Hermitian matrix A is stored:
+*>          = 'U':  Upper triangular
+*>          = 'L':  Lower triangular
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*>          N is INTEGER
+*>          The order of the matrix A.  N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*>          A is COMPLEX*16 array, dimension (LDA,N)
+*>          On entry, the Hermitian matrix A.  If UPLO = 'U', the leading
+*>          n-by-n upper triangular part of A contains the upper
+*>          triangular part of the matrix A, and the strictly lower
+*>          triangular part of A is not referenced.  If UPLO = 'L', the
+*>          leading n-by-n lower triangular part of A contains the lower
+*>          triangular part of the matrix A, and the strictly upper
+*>          triangular part of A is not referenced.
+*>          On exit, if UPLO = 'U', the diagonal and first superdiagonal
+*>          of A are overwritten by the corresponding elements of the
+*>          tridiagonal matrix T, and the elements above the first
+*>          superdiagonal, with the array TAU, represent the unitary
+*>          matrix Q as a product of elementary reflectors; if UPLO
+*>          = 'L', the diagonal and first subdiagonal of A are over-
+*>          written by the corresponding elements of the tridiagonal
+*>          matrix T, and the elements below the first subdiagonal, with
+*>          the array TAU, represent the unitary matrix Q as a product
+*>          of elementary reflectors. See Further Details.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*>          LDA is INTEGER
+*>          The leading dimension of the array A.  LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] D
+*> \verbatim
+*>          D is DOUBLE PRECISION array, dimension (N)
+*>          The diagonal elements of the tridiagonal matrix T:
+*>          D(i) = A(i,i).
+*> \endverbatim
+*>
+*> \param[out] E
+*> \verbatim
+*>          E is DOUBLE PRECISION array, dimension (N-1)
+*>          The off-diagonal elements of the tridiagonal matrix T:
+*>          E(i) = A(i,i+1) if UPLO = 'U', E(i) = A(i+1,i) if UPLO = 'L'.
+*> \endverbatim
+*>
+*> \param[out] TAU
+*> \verbatim
+*>          TAU is COMPLEX*16 array, dimension (N-1)
+*>          The scalar factors of the elementary reflectors (see Further
+*>          Details).
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*>          INFO is INTEGER
+*>          = 0:  successful exit
+*>          < 0:  if INFO = -i, the i-th argument had an illegal value.
+*> \endverbatim
+*
+*  Authors:
+*  ========
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date December 2016
+*
+*> \ingroup complex16HEcomputational
+*
+*> \par Further Details:
+*  =====================
+*>
+*> \verbatim
+*>
+*>  If UPLO = 'U', the matrix Q is represented as a product of elementary
+*>  reflectors
+*>
+*>     Q = H(n-1) . . . H(2) H(1).
+*>
+*>  Each H(i) has the form
+*>
+*>     H(i) = I - tau * v * v**H
+*>
+*>  where tau is a complex scalar, and v is a complex vector with
+*>  v(i+1:n) = 0 and v(i) = 1; v(1:i-1) is stored on exit in
+*>  A(1:i-1,i+1), and tau in TAU(i).
+*>
+*>  If UPLO = 'L', the matrix Q is represented as a product of elementary
+*>  reflectors
+*>
+*>     Q = H(1) H(2) . . . H(n-1).
+*>
+*>  Each H(i) has the form
+*>
+*>     H(i) = I - tau * v * v**H
+*>
+*>  where tau is a complex scalar, and v is a complex vector with
+*>  v(1:i) = 0 and v(i+1) = 1; v(i+2:n) is stored on exit in A(i+2:n,i),
+*>  and tau in TAU(i).
+*>
+*>  The contents of A on exit are illustrated by the following examples
+*>  with n = 5:
+*>
+*>  if UPLO = 'U':                       if UPLO = 'L':
+*>
+*>    (  d   e   v2  v3  v4 )              (  d                  )
+*>    (      d   e   v3  v4 )              (  e   d              )
+*>    (          d   e   v4 )              (  v1  e   d          )
+*>    (              d   e  )              (  v1  v2  e   d      )
+*>    (                  d  )              (  v1  v2  v3  e   d  )
+*>
+*>  where d and e denote diagonal and off-diagonal elements of T, and vi
+*>  denotes an element of the vector defining H(i).
+*> \endverbatim
+*>
+*  =====================================================================
+      SUBROUTINE ZHETD2( UPLO, N, A, LDA, D, E, TAU, INFO )
+*
+*  -- LAPACK computational routine (version 3.7.0) --
+*  -- LAPACK is a software package provided by Univ. of Tennessee,    --
+*  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+*     December 2016
+*
+*     .. Scalar Arguments ..
+      CHARACTER          UPLO
+      INTEGER            INFO, LDA, N
+*     ..
+*     .. Array Arguments ..
+      DOUBLE PRECISION   D( * ), E( * )
+      COMPLEX*16         A( LDA, * ), TAU( * )
+*     ..
+*
+*  =====================================================================
+*
+*     .. Parameters ..
+      COMPLEX*16         ONE, ZERO, HALF
+      PARAMETER          ( ONE = ( 1.0D+0, 0.0D+0 ),
+     $                   ZERO = ( 0.0D+0, 0.0D+0 ),
+     $                   HALF = ( 0.5D+0, 0.0D+0 ) )
+*     ..
+*     .. Local Scalars ..
+      LOGICAL            UPPER
+      INTEGER            I
+      COMPLEX*16         ALPHA, TAUI
+*     ..
+*     .. External Subroutines ..
+      EXTERNAL           XERBLA, ZAXPY, ZHEMV, ZHER2, ZLARFG
+*     ..
+*     .. External Functions ..
+      LOGICAL            LSAME
+      COMPLEX*16         ZDOTC
+      EXTERNAL           LSAME, ZDOTC
+*     ..
+*     .. Intrinsic Functions ..
+      INTRINSIC          DBLE, MAX, MIN
+*     ..
+*     .. Executable Statements ..
+*
+*     Test the input parameters
+*
+      INFO = 0
+      UPPER = LSAME( UPLO, 'U')
+      IF( .NOT.UPPER .AND. .NOT.LSAME( UPLO, 'L' ) ) THEN
+         INFO = -1
+      ELSE IF( N.LT.0 ) THEN
+         INFO = -2
+      ELSE IF( LDA.LT.MAX( 1, N ) ) THEN
+         INFO = -4
+      END IF
+      IF( INFO.NE.0 ) THEN
+         CALL XERBLA( 'ZHETD2', -INFO )
+         RETURN
+      END IF
+*
+*     Quick return if possible
+*
+      IF( N.LE.0 )
+     $   RETURN
+*
+      IF( UPPER ) THEN
+*
+*        Reduce the upper triangle of A
+*
+         A( N, N ) = DBLE( A( N, N ) )
+         DO 10 I = N - 1, 1, -1
+*
+*           Generate elementary reflector H(i) = I - tau * v * v**H
+*           to annihilate A(1:i-1,i+1)
+*
+            ALPHA = A( I, I+1 )
+            CALL ZLARFG( I, ALPHA, A( 1, I+1 ), 1, TAUI )
+            E( I ) = ALPHA
+*
+            IF( TAUI.NE.ZERO ) THEN
+*
+*              Apply H(i) from both sides to A(1:i,1:i)
+*
+               A( I, I+1 ) = ONE
+*
+*              Compute  x := tau * A * v  storing x in TAU(1:i)
+*
+               CALL ZHEMV( UPLO, I, TAUI, A, LDA, A( 1, I+1 ), 1, ZERO,
+     $                     TAU, 1 )
+*
+*              Compute  w := x - 1/2 * tau * (x**H * v) * v
+*
+               ALPHA = -HALF*TAUI*ZDOTC( I, TAU, 1, A( 1, I+1 ), 1 )
+               CALL ZAXPY( I, ALPHA, A( 1, I+1 ), 1, TAU, 1 )
+*
+*              Apply the transformation as a rank-2 update:
+*                 A := A - v * w**H - w * v**H
+*
+               CALL ZHER2( UPLO, I, -ONE, A( 1, I+1 ), 1, TAU, 1, A,
+     $                     LDA )
+*
+            ELSE
+               A( I, I ) = DBLE( A( I, I ) )
+            END IF
+            A( I, I+1 ) = E( I )
+            D( I+1 ) = A( I+1, I+1 )
+            TAU( I ) = TAUI
+   10    CONTINUE
+         D( 1 ) = A( 1, 1 )
+      ELSE
+*
+*        Reduce the lower triangle of A
+*
+         A( 1, 1 ) = DBLE( A( 1, 1 ) )
+         DO 20 I = 1, N - 1
+*
+*           Generate elementary reflector H(i) = I - tau * v * v**H
+*           to annihilate A(i+2:n,i)
+*
+            ALPHA = A( I+1, I )
+            CALL ZLARFG( N-I, ALPHA, A( MIN( I+2, N ), I ), 1, TAUI )
+            E( I ) = ALPHA
+*
+            IF( TAUI.NE.ZERO ) THEN
+*
+*              Apply H(i) from both sides to A(i+1:n,i+1:n)
+*
+               A( I+1, I ) = ONE
+*
+*              Compute  x := tau * A * v  storing y in TAU(i:n-1)
+*
+               CALL ZHEMV( UPLO, N-I, TAUI, A( I+1, I+1 ), LDA,
+     $                     A( I+1, I ), 1, ZERO, TAU( I ), 1 )
+*
+*              Compute  w := x - 1/2 * tau * (x**H * v) * v
+*
+               ALPHA = -HALF*TAUI*ZDOTC( N-I, TAU( I ), 1, A( I+1, I ),
+     $                 1 )
+               CALL ZAXPY( N-I, ALPHA, A( I+1, I ), 1, TAU( I ), 1 )
+*
+*              Apply the transformation as a rank-2 update:
+*                 A := A - v * w**H - w * v**H
+*
+               CALL ZHER2( UPLO, N-I, -ONE, A( I+1, I ), 1, TAU( I ), 1,
+     $                     A( I+1, I+1 ), LDA )
+*
+            ELSE
+               A( I+1, I+1 ) = DBLE( A( I+1, I+1 ) )
+            END IF
+            A( I+1, I ) = E( I )
+            D( I ) = A( I, I )
+            TAU( I ) = TAUI
+   20    CONTINUE
+         D( N ) = A( N, N )
+      END IF
+*
+      RETURN
+*
+*     End of ZHETD2
+*
+      END
+*> \brief \b ZHETRD
+*
+*  =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
+*
+*> \htmlonly
+*> Download ZHETRD + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/zhetrd.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/zhetrd.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/zhetrd.f">
+*> [TXT]</a>
+*> \endhtmlonly
+*
+*  Definition:
+*  ===========
+*
+*       SUBROUTINE ZHETRD( UPLO, N, A, LDA, D, E, TAU, WORK, LWORK, INFO )
+*
+*       .. Scalar Arguments ..
+*       CHARACTER          UPLO
+*       INTEGER            INFO, LDA, LWORK, N
+*       ..
+*       .. Array Arguments ..
+*       DOUBLE PRECISION   D( * ), E( * )
+*       COMPLEX*16         A( LDA, * ), TAU( * ), WORK( * )
+*       ..
+*
+*
+*> \par Purpose:
+*  =============
+*>
+*> \verbatim
+*>
+*> ZHETRD reduces a complex Hermitian matrix A to real symmetric
+*> tridiagonal form T by a unitary similarity transformation:
+*> Q**H * A * Q = T.
+*> \endverbatim
+*
+*  Arguments:
+*  ==========
+*
+*> \param[in] UPLO
+*> \verbatim
+*>          UPLO is CHARACTER*1
+*>          = 'U':  Upper triangle of A is stored;
+*>          = 'L':  Lower triangle of A is stored.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*>          N is INTEGER
+*>          The order of the matrix A.  N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*>          A is COMPLEX*16 array, dimension (LDA,N)
+*>          On entry, the Hermitian matrix A.  If UPLO = 'U', the leading
+*>          N-by-N upper triangular part of A contains the upper
+*>          triangular part of the matrix A, and the strictly lower
+*>          triangular part of A is not referenced.  If UPLO = 'L', the
+*>          leading N-by-N lower triangular part of A contains the lower
+*>          triangular part of the matrix A, and the strictly upper
+*>          triangular part of A is not referenced.
+*>          On exit, if UPLO = 'U', the diagonal and first superdiagonal
+*>          of A are overwritten by the corresponding elements of the
+*>          tridiagonal matrix T, and the elements above the first
+*>          superdiagonal, with the array TAU, represent the unitary
+*>          matrix Q as a product of elementary reflectors; if UPLO
+*>          = 'L', the diagonal and first subdiagonal of A are over-
+*>          written by the corresponding elements of the tridiagonal
+*>          matrix T, and the elements below the first subdiagonal, with
+*>          the array TAU, represent the unitary matrix Q as a product
+*>          of elementary reflectors. See Further Details.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*>          LDA is INTEGER
+*>          The leading dimension of the array A.  LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] D
+*> \verbatim
+*>          D is DOUBLE PRECISION array, dimension (N)
+*>          The diagonal elements of the tridiagonal matrix T:
+*>          D(i) = A(i,i).
+*> \endverbatim
+*>
+*> \param[out] E
+*> \verbatim
+*>          E is DOUBLE PRECISION array, dimension (N-1)
+*>          The off-diagonal elements of the tridiagonal matrix T:
+*>          E(i) = A(i,i+1) if UPLO = 'U', E(i) = A(i+1,i) if UPLO = 'L'.
+*> \endverbatim
+*>
+*> \param[out] TAU
+*> \verbatim
+*>          TAU is COMPLEX*16 array, dimension (N-1)
+*>          The scalar factors of the elementary reflectors (see Further
+*>          Details).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*>          WORK is COMPLEX*16 array, dimension (MAX(1,LWORK))
+*>          On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*>          LWORK is INTEGER
+*>          The dimension of the array WORK.  LWORK >= 1.
+*>          For optimum performance LWORK >= N*NB, where NB is the
+*>          optimal blocksize.
+*>
+*>          If LWORK = -1, then a workspace query is assumed; the routine
+*>          only calculates the optimal size of the WORK array, returns
+*>          this value as the first entry of the WORK array, and no error
+*>          message related to LWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*>          INFO is INTEGER
+*>          = 0:  successful exit
+*>          < 0:  if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*
+*  Authors:
+*  ========
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date December 2016
+*
+*> \ingroup complex16HEcomputational
+*
+*> \par Further Details:
+*  =====================
+*>
+*> \verbatim
+*>
+*>  If UPLO = 'U', the matrix Q is represented as a product of elementary
+*>  reflectors
+*>
+*>     Q = H(n-1) . . . H(2) H(1).
+*>
+*>  Each H(i) has the form
+*>
+*>     H(i) = I - tau * v * v**H
+*>
+*>  where tau is a complex scalar, and v is a complex vector with
+*>  v(i+1:n) = 0 and v(i) = 1; v(1:i-1) is stored on exit in
+*>  A(1:i-1,i+1), and tau in TAU(i).
+*>
+*>  If UPLO = 'L', the matrix Q is represented as a product of elementary
+*>  reflectors
+*>
+*>     Q = H(1) H(2) . . . H(n-1).
+*>
+*>  Each H(i) has the form
+*>
+*>     H(i) = I - tau * v * v**H
+*>
+*>  where tau is a complex scalar, and v is a complex vector with
+*>  v(1:i) = 0 and v(i+1) = 1; v(i+2:n) is stored on exit in A(i+2:n,i),
+*>  and tau in TAU(i).
+*>
+*>  The contents of A on exit are illustrated by the following examples
+*>  with n = 5:
+*>
+*>  if UPLO = 'U':                       if UPLO = 'L':
+*>
+*>    (  d   e   v2  v3  v4 )              (  d                  )
+*>    (      d   e   v3  v4 )              (  e   d              )
+*>    (          d   e   v4 )              (  v1  e   d          )
+*>    (              d   e  )              (  v1  v2  e   d      )
+*>    (                  d  )              (  v1  v2  v3  e   d  )
+*>
+*>  where d and e denote diagonal and off-diagonal elements of T, and vi
+*>  denotes an element of the vector defining H(i).
+*> \endverbatim
+*>
+*  =====================================================================
+      SUBROUTINE ZHETRD( UPLO, N, A, LDA, D, E, TAU, WORK, LWORK, INFO )
+*
+*  -- LAPACK computational routine (version 3.7.0) --
+*  -- LAPACK is a software package provided by Univ. of Tennessee,    --
+*  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+*     December 2016
+*
+*     .. Scalar Arguments ..
+      CHARACTER          UPLO
+      INTEGER            INFO, LDA, LWORK, N
+*     ..
+*     .. Array Arguments ..
+      DOUBLE PRECISION   D( * ), E( * )
+      COMPLEX*16         A( LDA, * ), TAU( * ), WORK( * )
+*     ..
+*
+*  =====================================================================
+*
+*     .. Parameters ..
+      DOUBLE PRECISION   ONE
+      PARAMETER          ( ONE = 1.0D+0 )
+      COMPLEX*16         CONE
+      PARAMETER          ( CONE = ( 1.0D+0, 0.0D+0 ) )
+*     ..
+*     .. Local Scalars ..
+      LOGICAL            LQUERY, UPPER
+      INTEGER            I, IINFO, IWS, J, KK, LDWORK, LWKOPT, NB,
+     $                   NBMIN, NX
+*     ..
+*     .. External Subroutines ..
+      EXTERNAL           XERBLA, ZHER2K, ZHETD2, ZLATRD
+*     ..
+*     .. Intrinsic Functions ..
+      INTRINSIC          MAX
+*     ..
+*     .. External Functions ..
+      LOGICAL            LSAME
+      INTEGER            ILAENV
+      EXTERNAL           LSAME, ILAENV
+*     ..
+*     .. Executable Statements ..
+*
+*     Test the input parameters
+*
+      INFO = 0
+      UPPER = LSAME( UPLO, 'U' )
+      LQUERY = ( LWORK.EQ.-1 )
+      IF( .NOT.UPPER .AND. .NOT.LSAME( UPLO, 'L' ) ) THEN
+         INFO = -1
+      ELSE IF( N.LT.0 ) THEN
+         INFO = -2
+      ELSE IF( LDA.LT.MAX( 1, N ) ) THEN
+         INFO = -4
+      ELSE IF( LWORK.LT.1 .AND. .NOT.LQUERY ) THEN
+         INFO = -9
+      END IF
+*
+      IF( INFO.EQ.0 ) THEN
+*
+*        Determine the block size.
+*
+         NB = ILAENV( 1, 'ZHETRD', UPLO, N, -1, -1, -1 )
+         LWKOPT = N*NB
+         WORK( 1 ) = LWKOPT
+      END IF
+*
+      IF( INFO.NE.0 ) THEN
+         CALL XERBLA( 'ZHETRD', -INFO )
+         RETURN
+      ELSE IF( LQUERY ) THEN
+         RETURN
+      END IF
+*
+*     Quick return if possible
+*
+      IF( N.EQ.0 ) THEN
+         WORK( 1 ) = 1
+         RETURN
+      END IF
+*
+      NX = N
+      IWS = 1
+      IF( NB.GT.1 .AND. NB.LT.N ) THEN
+*
+*        Determine when to cross over from blocked to unblocked code
+*        (last block is always handled by unblocked code).
+*
+         NX = MAX( NB, ILAENV( 3, 'ZHETRD', UPLO, N, -1, -1, -1 ) )
+         IF( NX.LT.N ) THEN
+*
+*           Determine if workspace is large enough for blocked code.
+*
+            LDWORK = N
+            IWS = LDWORK*NB
+            IF( LWORK.LT.IWS ) THEN
+*
+*              Not enough workspace to use optimal NB:  determine the
+*              minimum value of NB, and reduce NB or force use of
+*              unblocked code by setting NX = N.
+*
+               NB = MAX( LWORK / LDWORK, 1 )
+               NBMIN = ILAENV( 2, 'ZHETRD', UPLO, N, -1, -1, -1 )
+               IF( NB.LT.NBMIN )
+     $            NX = N
+            END IF
+         ELSE
+            NX = N
+         END IF
+      ELSE
+         NB = 1
+      END IF
+*
+      IF( UPPER ) THEN
+*
+*        Reduce the upper triangle of A.
+*        Columns 1:kk are handled by the unblocked method.
+*
+         KK = N - ( ( N-NX+NB-1 ) / NB )*NB
+         DO 20 I = N - NB + 1, KK + 1, -NB
+*
+*           Reduce columns i:i+nb-1 to tridiagonal form and form the
+*           matrix W which is needed to update the unreduced part of
+*           the matrix
+*
+            CALL ZLATRD( UPLO, I+NB-1, NB, A, LDA, E, TAU, WORK,
+     $                   LDWORK )
+*
+*           Update the unreduced submatrix A(1:i-1,1:i-1), using an
+*           update of the form:  A := A - V*W**H - W*V**H
+*
+            CALL ZHER2K( UPLO, 'No transpose', I-1, NB, -CONE,
+     $                   A( 1, I ), LDA, WORK, LDWORK, ONE, A, LDA )
+*
+*           Copy superdiagonal elements back into A, and diagonal
+*           elements into D
+*
+            DO 10 J = I, I + NB - 1
+               A( J-1, J ) = E( J-1 )
+               D( J ) = A( J, J )
+   10       CONTINUE
+   20    CONTINUE
+*
+*        Use unblocked code to reduce the last or only block
+*
+         CALL ZHETD2( UPLO, KK, A, LDA, D, E, TAU, IINFO )
+      ELSE
+*
+*        Reduce the lower triangle of A
+*
+         DO 40 I = 1, N - NX, NB
+*
+*           Reduce columns i:i+nb-1 to tridiagonal form and form the
+*           matrix W which is needed to update the unreduced part of
+*           the matrix
+*
+            CALL ZLATRD( UPLO, N-I+1, NB, A( I, I ), LDA, E( I ),
+     $                   TAU( I ), WORK, LDWORK )
+*
+*           Update the unreduced submatrix A(i+nb:n,i+nb:n), using
+*           an update of the form:  A := A - V*W**H - W*V**H
+*
+            CALL ZHER2K( UPLO, 'No transpose', N-I-NB+1, NB, -CONE,
+     $                   A( I+NB, I ), LDA, WORK( NB+1 ), LDWORK, ONE,
+     $                   A( I+NB, I+NB ), LDA )
+*
+*           Copy subdiagonal elements back into A, and diagonal
+*           elements into D
+*
+            DO 30 J = I, I + NB - 1
+               A( J+1, J ) = E( J )
+               D( J ) = A( J, J )
+   30       CONTINUE
+   40    CONTINUE
+*
+*        Use unblocked code to reduce the last or only block
+*
+         CALL ZHETD2( UPLO, N-I+1, A( I, I ), LDA, D( I ), E( I ),
+     $                TAU( I ), IINFO )
+      END IF
+*
+      WORK( 1 ) = LWKOPT
+      RETURN
+*
+*     End of ZHETRD
+*
+      END
+*> \brief \b ZHGEQZ
+*
+*  =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
+*
+*> \htmlonly
+*> Download ZHGEQZ + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/zhgeqz.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/zhgeqz.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/zhgeqz.f">
+*> [TXT]</a>
+*> \endhtmlonly
+*
+*  Definition:
+*  ===========
+*
+*       SUBROUTINE ZHGEQZ( JOB, COMPQ, COMPZ, N, ILO, IHI, H, LDH, T, LDT,
+*                          ALPHA, BETA, Q, LDQ, Z, LDZ, WORK, LWORK,
+*                          RWORK, INFO )
+*
+*       .. Scalar Arguments ..
+*       CHARACTER          COMPQ, COMPZ, JOB
+*       INTEGER            IHI, ILO, INFO, LDH, LDQ, LDT, LDZ, LWORK, N
+*       ..
+*       .. Array Arguments ..
+*       DOUBLE PRECISION   RWORK( * )
+*       COMPLEX*16         ALPHA( * ), BETA( * ), H( LDH, * ),
+*      $                   Q( LDQ, * ), T( LDT, * ), WORK( * ),
+*      $                   Z( LDZ, * )
+*       ..
+*
+*
+*> \par Purpose:
+*  =============
+*>
+*> \verbatim
+*>
+*> ZHGEQZ computes the eigenvalues of a complex matrix pair (H,T),
+*> where H is an upper Hessenberg matrix and T is upper triangular,
+*> using the single-shift QZ method.
+*> Matrix pairs of this type are produced by the reduction to
+*> generalized upper Hessenberg form of a complex matrix pair (A,B):
+*>
+*>    A = Q1*H*Z1**H,  B = Q1*T*Z1**H,
+*>
+*> as computed by ZGGHRD.
+*>
+*> If JOB='S', then the Hessenberg-triangular pair (H,T) is
+*> also reduced to generalized Schur form,
+*>
+*>    H = Q*S*Z**H,  T = Q*P*Z**H,
+*>
+*> where Q and Z are unitary matrices and S and P are upper triangular.
+*>
+*> Optionally, the unitary matrix Q from the generalized Schur
+*> factorization may be postmultiplied into an input matrix Q1, and the
+*> unitary matrix Z may be postmultiplied into an input matrix Z1.
+*> If Q1 and Z1 are the unitary matrices from ZGGHRD that reduced
+*> the matrix pair (A,B) to generalized Hessenberg form, then the output
+*> matrices Q1*Q and Z1*Z are the unitary factors from the generalized
+*> Schur factorization of (A,B):
+*>
+*>    A = (Q1*Q)*S*(Z1*Z)**H,  B = (Q1*Q)*P*(Z1*Z)**H.
+*>
+*> To avoid overflow, eigenvalues of the matrix pair (H,T)
+*> (equivalently, of (A,B)) are computed as a pair of complex values
+*> (alpha,beta).  If beta is nonzero, lambda = alpha / beta is an
+*> eigenvalue of the generalized nonsymmetric eigenvalue problem (GNEP)
+*>    A*x = lambda*B*x
+*> and if alpha is nonzero, mu = beta / alpha is an eigenvalue of the
+*> alternate form of the GNEP
+*>    mu*A*y = B*y.
+*> The values of alpha and beta for the i-th eigenvalue can be read
+*> directly from the generalized Schur form:  alpha = S(i,i),
+*> beta = P(i,i).
+*>
+*> Ref: C.B. Moler & G.W. Stewart, "An Algorithm for Generalized Matrix
+*>      Eigenvalue Problems", SIAM J. Numer. Anal., 10(1973),
+*>      pp. 241--256.
+*> \endverbatim
+*
+*  Arguments:
+*  ==========
+*
+*> \param[in] JOB
+*> \verbatim
+*>          JOB is CHARACTER*1
+*>          = 'E': Compute eigenvalues only;
+*>          = 'S': Computer eigenvalues and the Schur form.
+*> \endverbatim
+*>
+*> \param[in] COMPQ
+*> \verbatim
+*>          COMPQ is CHARACTER*1
+*>          = 'N': Left Schur vectors (Q) are not computed;
+*>          = 'I': Q is initialized to the unit matrix and the matrix Q
+*>                 of left Schur vectors of (H,T) is returned;
+*>          = 'V': Q must contain a unitary matrix Q1 on entry and
+*>                 the product Q1*Q is returned.
+*> \endverbatim
+*>
+*> \param[in] COMPZ
+*> \verbatim
+*>          COMPZ is CHARACTER*1
+*>          = 'N': Right Schur vectors (Z) are not computed;
+*>          = 'I': Q is initialized to the unit matrix and the matrix Z
+*>                 of right Schur vectors of (H,T) is returned;
+*>          = 'V': Z must contain a unitary matrix Z1 on entry and
+*>                 the product Z1*Z is returned.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*>          N is INTEGER
+*>          The order of the matrices H, T, Q, and Z.  N >= 0.
+*> \endverbatim
+*>
+*> \param[in] ILO
+*> \verbatim
+*>          ILO is INTEGER
+*> \endverbatim
+*>
+*> \param[in] IHI
+*> \verbatim
+*>          IHI is INTEGER
+*>          ILO and IHI mark the rows and columns of H which are in
+*>          Hessenberg form.  It is assumed that A is already upper
+*>          triangular in rows and columns 1:ILO-1 and IHI+1:N.
+*>          If N > 0, 1 <= ILO <= IHI <= N; if N = 0, ILO=1 and IHI=0.
+*> \endverbatim
+*>
+*> \param[in,out] H
+*> \verbatim
+*>          H is COMPLEX*16 array, dimension (LDH, N)
+*>          On entry, the N-by-N upper Hessenberg matrix H.
+*>          On exit, if JOB = 'S', H contains the upper triangular
+*>          matrix S from the generalized Schur factorization.
+*>          If JOB = 'E', the diagonal of H matches that of S, but
+*>          the rest of H is unspecified.
+*> \endverbatim
+*>
+*> \param[in] LDH
+*> \verbatim
+*>          LDH is INTEGER
+*>          The leading dimension of the array H.  LDH >= max( 1, N ).
+*> \endverbatim
+*>
+*> \param[in,out] T
+*> \verbatim
+*>          T is COMPLEX*16 array, dimension (LDT, N)
+*>          On entry, the N-by-N upper triangular matrix T.
+*>          On exit, if JOB = 'S', T contains the upper triangular
+*>          matrix P from the generalized Schur factorization.
+*>          If JOB = 'E', the diagonal of T matches that of P, but
+*>          the rest of T is unspecified.
+*> \endverbatim
+*>
+*> \param[in] LDT
+*> \verbatim
+*>          LDT is INTEGER
+*>          The leading dimension of the array T.  LDT >= max( 1, N ).
+*> \endverbatim
+*>
+*> \param[out] ALPHA
+*> \verbatim
+*>          ALPHA is COMPLEX*16 array, dimension (N)
+*>          The complex scalars alpha that define the eigenvalues of
+*>          GNEP.  ALPHA(i) = S(i,i) in the generalized Schur
+*>          factorization.
+*> \endverbatim
+*>
+*> \param[out] BETA
+*> \verbatim
+*>          BETA is COMPLEX*16 array, dimension (N)
+*>          The real non-negative scalars beta that define the
+*>          eigenvalues of GNEP.  BETA(i) = P(i,i) in the generalized
+*>          Schur factorization.
+*>
+*>          Together, the quantities alpha = ALPHA(j) and beta = BETA(j)
+*>          represent the j-th eigenvalue of the matrix pair (A,B), in
+*>          one of the forms lambda = alpha/beta or mu = beta/alpha.
+*>          Since either lambda or mu may overflow, they should not,
+*>          in general, be computed.
+*> \endverbatim
+*>
+*> \param[in,out] Q
+*> \verbatim
+*>          Q is COMPLEX*16 array, dimension (LDQ, N)
+*>          On entry, if COMPQ = 'V', the unitary matrix Q1 used in the
+*>          reduction of (A,B) to generalized Hessenberg form.
+*>          On exit, if COMPQ = 'I', the unitary matrix of left Schur
+*>          vectors of (H,T), and if COMPQ = 'V', the unitary matrix of
+*>          left Schur vectors of (A,B).
+*>          Not referenced if COMPQ = 'N'.
+*> \endverbatim
+*>
+*> \param[in] LDQ
+*> \verbatim
+*>          LDQ is INTEGER
+*>          The leading dimension of the array Q.  LDQ >= 1.
+*>          If COMPQ='V' or 'I', then LDQ >= N.
+*> \endverbatim
+*>
+*> \param[in,out] Z
+*> \verbatim
+*>          Z is COMPLEX*16 array, dimension (LDZ, N)
+*>          On entry, if COMPZ = 'V', the unitary matrix Z1 used in the
+*>          reduction of (A,B) to generalized Hessenberg form.
+*>          On exit, if COMPZ = 'I', the unitary matrix of right Schur
+*>          vectors of (H,T), and if COMPZ = 'V', the unitary matrix of
+*>          right Schur vectors of (A,B).
+*>          Not referenced if COMPZ = 'N'.
+*> \endverbatim
+*>
+*> \param[in] LDZ
+*> \verbatim
+*>          LDZ is INTEGER
+*>          The leading dimension of the array Z.  LDZ >= 1.
+*>          If COMPZ='V' or 'I', then LDZ >= N.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*>          WORK is COMPLEX*16 array, dimension (MAX(1,LWORK))
+*>          On exit, if INFO >= 0, WORK(1) returns the optimal LWORK.
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*>          LWORK is INTEGER
+*>          The dimension of the array WORK.  LWORK >= max(1,N).
+*>
+*>          If LWORK = -1, then a workspace query is assumed; the routine
+*>          only calculates the optimal size of the WORK array, returns
+*>          this value as the first entry of the WORK array, and no error
+*>          message related to LWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*>          RWORK is DOUBLE PRECISION array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*>          INFO is INTEGER
+*>          = 0: successful exit
+*>          < 0: if INFO = -i, the i-th argument had an illegal value
+*>          = 1,...,N: the QZ iteration did not converge.  (H,T) is not
+*>                     in Schur form, but ALPHA(i) and BETA(i),
+*>                     i=INFO+1,...,N should be correct.
+*>          = N+1,...,2*N: the shift calculation failed.  (H,T) is not
+*>                     in Schur form, but ALPHA(i) and BETA(i),
+*>                     i=INFO-N+1,...,N should be correct.
+*> \endverbatim
+*
+*  Authors:
+*  ========
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date April 2012
+*
+*> \ingroup complex16GEcomputational
+*
+*> \par Further Details:
+*  =====================
+*>
+*> \verbatim
+*>
+*>  We assume that complex ABS works as long as its value is less than
+*>  overflow.
+*> \endverbatim
+*>
+*  =====================================================================
+      SUBROUTINE ZHGEQZ( JOB, COMPQ, COMPZ, N, ILO, IHI, H, LDH, T, LDT,
+     $                   ALPHA, BETA, Q, LDQ, Z, LDZ, WORK, LWORK,
+     $                   RWORK, INFO )
+*
+*  -- LAPACK computational routine (version 3.7.0) --
+*  -- LAPACK is a software package provided by Univ. of Tennessee,    --
+*  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+*     April 2012
+*
+*     .. Scalar Arguments ..
+      CHARACTER          COMPQ, COMPZ, JOB
+      INTEGER            IHI, ILO, INFO, LDH, LDQ, LDT, LDZ, LWORK, N
+*     ..
+*     .. Array Arguments ..
+      DOUBLE PRECISION   RWORK( * )
+      COMPLEX*16         ALPHA( * ), BETA( * ), H( LDH, * ),
+     $                   Q( LDQ, * ), T( LDT, * ), WORK( * ),
+     $                   Z( LDZ, * )
+*     ..
+*
+*  =====================================================================
+*
+*     .. Parameters ..
+      COMPLEX*16         CZERO, CONE
+      PARAMETER          ( CZERO = ( 0.0D+0, 0.0D+0 ),
+     $                   CONE = ( 1.0D+0, 0.0D+0 ) )
+      DOUBLE PRECISION   ZERO, ONE
+      PARAMETER          ( ZERO = 0.0D+0, ONE = 1.0D+0 )
+      DOUBLE PRECISION   HALF
+      PARAMETER          ( HALF = 0.5D+0 )
+*     ..
+*     .. Local Scalars ..
+      LOGICAL            ILAZR2, ILAZRO, ILQ, ILSCHR, ILZ, LQUERY
+      INTEGER            ICOMPQ, ICOMPZ, IFIRST, IFRSTM, IITER, ILAST,
+     $                   ILASTM, IN, ISCHUR, ISTART, J, JC, JCH, JITER,
+     $                   JR, MAXIT
+      DOUBLE PRECISION   ABSB, ANORM, ASCALE, ATOL, BNORM, BSCALE, BTOL,
+     $                   C, SAFMIN, TEMP, TEMP2, TEMPR, ULP
+      COMPLEX*16         ABI22, AD11, AD12, AD21, AD22, CTEMP, CTEMP2,
+     $                   CTEMP3, ESHIFT, RTDISC, S, SHIFT, SIGNBC, T1,
+     $                   U12, X
+*     ..
+*     .. External Functions ..
+      LOGICAL            LSAME
+      DOUBLE PRECISION   DLAMCH, ZLANHS
+      EXTERNAL           LSAME, DLAMCH, ZLANHS
+*     ..
+*     .. External Subroutines ..
+      EXTERNAL           XERBLA, ZLARTG, ZLASET, ZROT, ZSCAL
+*     ..
+*     .. Intrinsic Functions ..
+      INTRINSIC          ABS, DBLE, DCMPLX, DCONJG, DIMAG, MAX, MIN,
+     $                   SQRT
+*     ..
+*     .. Statement Functions ..
+      DOUBLE PRECISION   ABS1
+*     ..
+*     .. Statement Function definitions ..
+      ABS1( X ) = ABS( DBLE( X ) ) + ABS( DIMAG( X ) )
+*     ..
+*     .. Executable Statements ..
+*
+*     Decode JOB, COMPQ, COMPZ
+*
+      IF( LSAME( JOB, 'E' ) ) THEN
+         ILSCHR = .FALSE.
+         ISCHUR = 1
+      ELSE IF( LSAME( JOB, 'S' ) ) THEN
+         ILSCHR = .TRUE.
+         ISCHUR = 2
+      ELSE
+         ISCHUR = 0
+      END IF
+*
+      IF( LSAME( COMPQ, 'N' ) ) THEN
+         ILQ = .FALSE.
+         ICOMPQ = 1
+      ELSE IF( LSAME( COMPQ, 'V' ) ) THEN
+         ILQ = .TRUE.
+         ICOMPQ = 2
+      ELSE IF( LSAME( COMPQ, 'I' ) ) THEN
+         ILQ = .TRUE.
+         ICOMPQ = 3
+      ELSE
+         ICOMPQ = 0
+      END IF
+*
+      IF( LSAME( COMPZ, 'N' ) ) THEN
+         ILZ = .FALSE.
+         ICOMPZ = 1
+      ELSE IF( LSAME( COMPZ, 'V' ) ) THEN
+         ILZ = .TRUE.
+         ICOMPZ = 2
+      ELSE IF( LSAME( COMPZ, 'I' ) ) THEN
+         ILZ = .TRUE.
+         ICOMPZ = 3
+      ELSE
+         ICOMPZ = 0
+      END IF
+*
+*     Check Argument Values
+*
+      INFO = 0
+      WORK( 1 ) = MAX( 1, N )
+      LQUERY = ( LWORK.EQ.-1 )
+      IF( ISCHUR.EQ.0 ) THEN
+         INFO = -1
+      ELSE IF( ICOMPQ.EQ.0 ) THEN
+         INFO = -2
+      ELSE IF( ICOMPZ.EQ.0 ) THEN
+         INFO = -3
+      ELSE IF( N.LT.0 ) THEN
+         INFO = -4
+      ELSE IF( ILO.LT.1 ) THEN
+         INFO = -5
+      ELSE IF( IHI.GT.N .OR. IHI.LT.ILO-1 ) THEN
+         INFO = -6
+      ELSE IF( LDH.LT.N ) THEN
+         INFO = -8
+      ELSE IF( LDT.LT.N ) THEN
+         INFO = -10
+      ELSE IF( LDQ.LT.1 .OR. ( ILQ .AND. LDQ.LT.N ) ) THEN
+         INFO = -14
+      ELSE IF( LDZ.LT.1 .OR. ( ILZ .AND. LDZ.LT.N ) ) THEN
+         INFO = -16
+      ELSE IF( LWORK.LT.MAX( 1, N ) .AND. .NOT.LQUERY ) THEN
+         INFO = -18
+      END IF
+      IF( INFO.NE.0 ) THEN
+         CALL XERBLA( 'ZHGEQZ', -INFO )
+         RETURN
+      ELSE IF( LQUERY ) THEN
+         RETURN
+      END IF
+*
+*     Quick return if possible
+*
+*     WORK( 1 ) = CMPLX( 1 )
+      IF( N.LE.0 ) THEN
+         WORK( 1 ) = DCMPLX( 1 )
+         RETURN
+      END IF
+*
+*     Initialize Q and Z
+*
+      IF( ICOMPQ.EQ.3 )
+     $   CALL ZLASET( 'Full', N, N, CZERO, CONE, Q, LDQ )
+      IF( ICOMPZ.EQ.3 )
+     $   CALL ZLASET( 'Full', N, N, CZERO, CONE, Z, LDZ )
+*
+*     Machine Constants
+*
+      IN = IHI + 1 - ILO
+      SAFMIN = DLAMCH( 'S' )
+      ULP = DLAMCH( 'E' )*DLAMCH( 'B' )
+      ANORM = ZLANHS( 'F', IN, H( ILO, ILO ), LDH, RWORK )
+      BNORM = ZLANHS( 'F', IN, T( ILO, ILO ), LDT, RWORK )
+      ATOL = MAX( SAFMIN, ULP*ANORM )
+      BTOL = MAX( SAFMIN, ULP*BNORM )
+      ASCALE = ONE / MAX( SAFMIN, ANORM )
+      BSCALE = ONE / MAX( SAFMIN, BNORM )
+*
+*
+*     Set Eigenvalues IHI+1:N
+*
+      DO 10 J = IHI + 1, N
+         ABSB = ABS( T( J, J ) )
+         IF( ABSB.GT.SAFMIN ) THEN
+            SIGNBC = DCONJG( T( J, J ) / ABSB )
+            T( J, J ) = ABSB
+            IF( ILSCHR ) THEN
+               CALL ZSCAL( J-1, SIGNBC, T( 1, J ), 1 )
+               CALL ZSCAL( J, SIGNBC, H( 1, J ), 1 )
+            ELSE
+               CALL ZSCAL( 1, SIGNBC, H( J, J ), 1 )
+            END IF
+            IF( ILZ )
+     $         CALL ZSCAL( N, SIGNBC, Z( 1, J ), 1 )
+         ELSE
+            T( J, J ) = CZERO
+         END IF
+         ALPHA( J ) = H( J, J )
+         BETA( J ) = T( J, J )
+   10 CONTINUE
+*
+*     If IHI < ILO, skip QZ steps
+*
+      IF( IHI.LT.ILO )
+     $   GO TO 190
+*
+*     MAIN QZ ITERATION LOOP
+*
+*     Initialize dynamic indices
+*
+*     Eigenvalues ILAST+1:N have been found.
+*        Column operations modify rows IFRSTM:whatever
+*        Row operations modify columns whatever:ILASTM
+*
+*     If only eigenvalues are being computed, then
+*        IFRSTM is the row of the last splitting row above row ILAST;
+*        this is always at least ILO.
+*     IITER counts iterations since the last eigenvalue was found,
+*        to tell when to use an extraordinary shift.
+*     MAXIT is the maximum number of QZ sweeps allowed.
+*
+      ILAST = IHI
+      IF( ILSCHR ) THEN
+         IFRSTM = 1
+         ILASTM = N
+      ELSE
+         IFRSTM = ILO
+         ILASTM = IHI
+      END IF
+      IITER = 0
+      ESHIFT = CZERO
+      MAXIT = 30*( IHI-ILO+1 )
+*
+      DO 170 JITER = 1, MAXIT
+*
+*        Check for too many iterations.
+*
+         IF( JITER.GT.MAXIT )
+     $      GO TO 180
+*
+*        Split the matrix if possible.
+*
+*        Two tests:
+*           1: H(j,j-1)=0  or  j=ILO
+*           2: T(j,j)=0
+*
+*        Special case: j=ILAST
+*
+         IF( ILAST.EQ.ILO ) THEN
+            GO TO 60
+         ELSE
+            IF( ABS1( H( ILAST, ILAST-1 ) ).LE.ATOL ) THEN
+               H( ILAST, ILAST-1 ) = CZERO
+               GO TO 60
+            END IF
+         END IF
+*
+         IF( ABS( T( ILAST, ILAST ) ).LE.BTOL ) THEN
+            T( ILAST, ILAST ) = CZERO
+            GO TO 50
+         END IF
+*
+*        General case: j<ILAST
+*
+         DO 40 J = ILAST - 1, ILO, -1
+*
+*           Test 1: for H(j,j-1)=0 or j=ILO
+*
+            IF( J.EQ.ILO ) THEN
+               ILAZRO = .TRUE.
+            ELSE
+               IF( ABS1( H( J, J-1 ) ).LE.ATOL ) THEN
+                  H( J, J-1 ) = CZERO
+                  ILAZRO = .TRUE.
+               ELSE
+                  ILAZRO = .FALSE.
+               END IF
+            END IF
+*
+*           Test 2: for T(j,j)=0
+*
+            IF( ABS( T( J, J ) ).LT.BTOL ) THEN
+               T( J, J ) = CZERO
+*
+*              Test 1a: Check for 2 consecutive small subdiagonals in A
+*
+               ILAZR2 = .FALSE.
+               IF( .NOT.ILAZRO ) THEN
+                  IF( ABS1( H( J, J-1 ) )*( ASCALE*ABS1( H( J+1,
+     $                J ) ) ).LE.ABS1( H( J, J ) )*( ASCALE*ATOL ) )
+     $                ILAZR2 = .TRUE.
+               END IF
+*
+*              If both tests pass (1 & 2), i.e., the leading diagonal
+*              element of B in the block is zero, split a 1x1 block off
+*              at the top. (I.e., at the J-th row/column) The leading
+*              diagonal element of the remainder can also be zero, so
+*              this may have to be done repeatedly.
+*
+               IF( ILAZRO .OR. ILAZR2 ) THEN
+                  DO 20 JCH = J, ILAST - 1
+                     CTEMP = H( JCH, JCH )
+                     CALL ZLARTG( CTEMP, H( JCH+1, JCH ), C, S,
+     $                            H( JCH, JCH ) )
+                     H( JCH+1, JCH ) = CZERO
+                     CALL ZROT( ILASTM-JCH, H( JCH, JCH+1 ), LDH,
+     $                          H( JCH+1, JCH+1 ), LDH, C, S )
+                     CALL ZROT( ILASTM-JCH, T( JCH, JCH+1 ), LDT,
+     $                          T( JCH+1, JCH+1 ), LDT, C, S )
+                     IF( ILQ )
+     $                  CALL ZROT( N, Q( 1, JCH ), 1, Q( 1, JCH+1 ), 1,
+     $                             C, DCONJG( S ) )
+                     IF( ILAZR2 )
+     $                  H( JCH, JCH-1 ) = H( JCH, JCH-1 )*C
+                     ILAZR2 = .FALSE.
+                     IF( ABS1( T( JCH+1, JCH+1 ) ).GE.BTOL ) THEN
+                        IF( JCH+1.GE.ILAST ) THEN
+                           GO TO 60
+                        ELSE
+                           IFIRST = JCH + 1
+                           GO TO 70
+                        END IF
+                     END IF
+                     T( JCH+1, JCH+1 ) = CZERO
+   20             CONTINUE
+                  GO TO 50
+               ELSE
+*
+*                 Only test 2 passed -- chase the zero to T(ILAST,ILAST)
+*                 Then process as in the case T(ILAST,ILAST)=0
+*
+                  DO 30 JCH = J, ILAST - 1
+                     CTEMP = T( JCH, JCH+1 )
+                     CALL ZLARTG( CTEMP, T( JCH+1, JCH+1 ), C, S,
+     $                            T( JCH, JCH+1 ) )
+                     T( JCH+1, JCH+1 ) = CZERO
+                     IF( JCH.LT.ILASTM-1 )
+     $                  CALL ZROT( ILASTM-JCH-1, T( JCH, JCH+2 ), LDT,
+     $                             T( JCH+1, JCH+2 ), LDT, C, S )
+                     CALL ZROT( ILASTM-JCH+2, H( JCH, JCH-1 ), LDH,
+     $                          H( JCH+1, JCH-1 ), LDH, C, S )
+                     IF( ILQ )
+     $                  CALL ZROT( N, Q( 1, JCH ), 1, Q( 1, JCH+1 ), 1,
+     $                             C, DCONJG( S ) )
+                     CTEMP = H( JCH+1, JCH )
+                     CALL ZLARTG( CTEMP, H( JCH+1, JCH-1 ), C, S,
+     $                            H( JCH+1, JCH ) )
+                     H( JCH+1, JCH-1 ) = CZERO
+                     CALL ZROT( JCH+1-IFRSTM, H( IFRSTM, JCH ), 1,
+     $                          H( IFRSTM, JCH-1 ), 1, C, S )
+                     CALL ZROT( JCH-IFRSTM, T( IFRSTM, JCH ), 1,
+     $                          T( IFRSTM, JCH-1 ), 1, C, S )
+                     IF( ILZ )
+     $                  CALL ZROT( N, Z( 1, JCH ), 1, Z( 1, JCH-1 ), 1,
+     $                             C, S )
+   30             CONTINUE
+                  GO TO 50
+               END IF
+            ELSE IF( ILAZRO ) THEN
+*
+*              Only test 1 passed -- work on J:ILAST
+*
+               IFIRST = J
+               GO TO 70
+            END IF
+*
+*           Neither test passed -- try next J
+*
+   40    CONTINUE
+*
+*        (Drop-through is "impossible")
+*
+         INFO = 2*N + 1
+         GO TO 210
+*
+*        T(ILAST,ILAST)=0 -- clear H(ILAST,ILAST-1) to split off a
+*        1x1 block.
+*
+   50    CONTINUE
+         CTEMP = H( ILAST, ILAST )
+         CALL ZLARTG( CTEMP, H( ILAST, ILAST-1 ), C, S,
+     $                H( ILAST, ILAST ) )
+         H( ILAST, ILAST-1 ) = CZERO
+         CALL ZROT( ILAST-IFRSTM, H( IFRSTM, ILAST ), 1,
+     $              H( IFRSTM, ILAST-1 ), 1, C, S )
+         CALL ZROT( ILAST-IFRSTM, T( IFRSTM, ILAST ), 1,
+     $              T( IFRSTM, ILAST-1 ), 1, C, S )
+         IF( ILZ )
+     $      CALL ZROT( N, Z( 1, ILAST ), 1, Z( 1, ILAST-1 ), 1, C, S )
+*
+*        H(ILAST,ILAST-1)=0 -- Standardize B, set ALPHA and BETA
+*
+   60    CONTINUE
+         ABSB = ABS( T( ILAST, ILAST ) )
+         IF( ABSB.GT.SAFMIN ) THEN
+            SIGNBC = DCONJG( T( ILAST, ILAST ) / ABSB )
+            T( ILAST, ILAST ) = ABSB
+            IF( ILSCHR ) THEN
+               CALL ZSCAL( ILAST-IFRSTM, SIGNBC, T( IFRSTM, ILAST ), 1 )
+               CALL ZSCAL( ILAST+1-IFRSTM, SIGNBC, H( IFRSTM, ILAST ),
+     $                     1 )
+            ELSE
+               CALL ZSCAL( 1, SIGNBC, H( ILAST, ILAST ), 1 )
+            END IF
+            IF( ILZ )
+     $         CALL ZSCAL( N, SIGNBC, Z( 1, ILAST ), 1 )
+         ELSE
+            T( ILAST, ILAST ) = CZERO
+         END IF
+         ALPHA( ILAST ) = H( ILAST, ILAST )
+         BETA( ILAST ) = T( ILAST, ILAST )
+*
+*        Go to next block -- exit if finished.
+*
+         ILAST = ILAST - 1
+         IF( ILAST.LT.ILO )
+     $      GO TO 190
+*
+*        Reset counters
+*
+         IITER = 0
+         ESHIFT = CZERO
+         IF( .NOT.ILSCHR ) THEN
+            ILASTM = ILAST
+            IF( IFRSTM.GT.ILAST )
+     $         IFRSTM = ILO
+         END IF
+         GO TO 160
+*
+*        QZ step
+*
+*        This iteration only involves rows/columns IFIRST:ILAST.  We
+*        assume IFIRST < ILAST, and that the diagonal of B is non-zero.
+*
+   70    CONTINUE
+         IITER = IITER + 1
+         IF( .NOT.ILSCHR ) THEN
+            IFRSTM = IFIRST
+         END IF
+*
+*        Compute the Shift.
+*
+*        At this point, IFIRST < ILAST, and the diagonal elements of
+*        T(IFIRST:ILAST,IFIRST,ILAST) are larger than BTOL (in
+*        magnitude)
+*
+         IF( ( IITER / 10 )*10.NE.IITER ) THEN
+*
+*           The Wilkinson shift (AEP p.512), i.e., the eigenvalue of
+*           the bottom-right 2x2 block of A inv(B) which is nearest to
+*           the bottom-right element.
+*
+*           We factor B as U*D, where U has unit diagonals, and
+*           compute (A*inv(D))*inv(U).
+*
+            U12 = ( BSCALE*T( ILAST-1, ILAST ) ) /
+     $            ( BSCALE*T( ILAST, ILAST ) )
+            AD11 = ( ASCALE*H( ILAST-1, ILAST-1 ) ) /
+     $             ( BSCALE*T( ILAST-1, ILAST-1 ) )
+            AD21 = ( ASCALE*H( ILAST, ILAST-1 ) ) /
+     $             ( BSCALE*T( ILAST-1, ILAST-1 ) )
+            AD12 = ( ASCALE*H( ILAST-1, ILAST ) ) /
+     $             ( BSCALE*T( ILAST, ILAST ) )
+            AD22 = ( ASCALE*H( ILAST, ILAST ) ) /
+     $             ( BSCALE*T( ILAST, ILAST ) )
+            ABI22 = AD22 - U12*AD21
+*
+            T1 = HALF*( AD11+ABI22 )
+            RTDISC = SQRT( T1**2+AD12*AD21-AD11*AD22 )
+            TEMP = DBLE( T1-ABI22 )*DBLE( RTDISC ) +
+     $             DIMAG( T1-ABI22 )*DIMAG( RTDISC )
+            IF( TEMP.LE.ZERO ) THEN
+               SHIFT = T1 + RTDISC
+            ELSE
+               SHIFT = T1 - RTDISC
+            END IF
+         ELSE
+*
+*           Exceptional shift.  Chosen for no particularly good reason.
+*
+            ESHIFT = ESHIFT + (ASCALE*H(ILAST,ILAST-1))/
+     $                        (BSCALE*T(ILAST-1,ILAST-1))
+            SHIFT = ESHIFT
+         END IF
+*
+*        Now check for two consecutive small subdiagonals.
+*
+         DO 80 J = ILAST - 1, IFIRST + 1, -1
+            ISTART = J
+            CTEMP = ASCALE*H( J, J ) - SHIFT*( BSCALE*T( J, J ) )
+            TEMP = ABS1( CTEMP )
+            TEMP2 = ASCALE*ABS1( H( J+1, J ) )
+            TEMPR = MAX( TEMP, TEMP2 )
+            IF( TEMPR.LT.ONE .AND. TEMPR.NE.ZERO ) THEN
+               TEMP = TEMP / TEMPR
+               TEMP2 = TEMP2 / TEMPR
+            END IF
+            IF( ABS1( H( J, J-1 ) )*TEMP2.LE.TEMP*ATOL )
+     $         GO TO 90
+   80    CONTINUE
+*
+         ISTART = IFIRST
+         CTEMP = ASCALE*H( IFIRST, IFIRST ) -
+     $           SHIFT*( BSCALE*T( IFIRST, IFIRST ) )
+   90    CONTINUE
+*
+*        Do an implicit-shift QZ sweep.
+*
+*        Initial Q
+*
+         CTEMP2 = ASCALE*H( ISTART+1, ISTART )
+         CALL ZLARTG( CTEMP, CTEMP2, C, S, CTEMP3 )
+*
+*        Sweep
+*
+         DO 150 J = ISTART, ILAST - 1
+            IF( J.GT.ISTART ) THEN
+               CTEMP = H( J, J-1 )
+               CALL ZLARTG( CTEMP, H( J+1, J-1 ), C, S, H( J, J-1 ) )
+               H( J+1, J-1 ) = CZERO
+            END IF
+*
+            DO 100 JC = J, ILASTM
+               CTEMP = C*H( J, JC ) + S*H( J+1, JC )
+               H( J+1, JC ) = -DCONJG( S )*H( J, JC ) + C*H( J+1, JC )
+               H( J, JC ) = CTEMP
+               CTEMP2 = C*T( J, JC ) + S*T( J+1, JC )
+               T( J+1, JC ) = -DCONJG( S )*T( J, JC ) + C*T( J+1, JC )
+               T( J, JC ) = CTEMP2
+  100       CONTINUE
+            IF( ILQ ) THEN
+               DO 110 JR = 1, N
+                  CTEMP = C*Q( JR, J ) + DCONJG( S )*Q( JR, J+1 )
+                  Q( JR, J+1 ) = -S*Q( JR, J ) + C*Q( JR, J+1 )
+                  Q( JR, J ) = CTEMP
+  110          CONTINUE
+            END IF
+*
+            CTEMP = T( J+1, J+1 )
+            CALL ZLARTG( CTEMP, T( J+1, J ), C, S, T( J+1, J+1 ) )
+            T( J+1, J ) = CZERO
+*
+            DO 120 JR = IFRSTM, MIN( J+2, ILAST )
+               CTEMP = C*H( JR, J+1 ) + S*H( JR, J )
+               H( JR, J ) = -DCONJG( S )*H( JR, J+1 ) + C*H( JR, J )
+               H( JR, J+1 ) = CTEMP
+  120       CONTINUE
+            DO 130 JR = IFRSTM, J
+               CTEMP = C*T( JR, J+1 ) + S*T( JR, J )
+               T( JR, J ) = -DCONJG( S )*T( JR, J+1 ) + C*T( JR, J )
+               T( JR, J+1 ) = CTEMP
+  130       CONTINUE
+            IF( ILZ ) THEN
+               DO 140 JR = 1, N
+                  CTEMP = C*Z( JR, J+1 ) + S*Z( JR, J )
+                  Z( JR, J ) = -DCONJG( S )*Z( JR, J+1 ) + C*Z( JR, J )
+                  Z( JR, J+1 ) = CTEMP
+  140          CONTINUE
+            END IF
+  150    CONTINUE
+*
+  160    CONTINUE
+*
+  170 CONTINUE
+*
+*     Drop-through = non-convergence
+*
+  180 CONTINUE
+      INFO = ILAST
+      GO TO 210
+*
+*     Successful completion of all QZ steps
+*
+  190 CONTINUE
+*
+*     Set Eigenvalues 1:ILO-1
+*
+      DO 200 J = 1, ILO - 1
+         ABSB = ABS( T( J, J ) )
+         IF( ABSB.GT.SAFMIN ) THEN
+            SIGNBC = DCONJG( T( J, J ) / ABSB )
+            T( J, J ) = ABSB
+            IF( ILSCHR ) THEN
+               CALL ZSCAL( J-1, SIGNBC, T( 1, J ), 1 )
+               CALL ZSCAL( J, SIGNBC, H( 1, J ), 1 )
+            ELSE
+               CALL ZSCAL( 1, SIGNBC, H( J, J ), 1 )
+            END IF
+            IF( ILZ )
+     $         CALL ZSCAL( N, SIGNBC, Z( 1, J ), 1 )
+         ELSE
+            T( J, J ) = CZERO
+         END IF
+         ALPHA( J ) = H( J, J )
+         BETA( J ) = T( J, J )
+  200 CONTINUE
+*
+*     Normal Termination
+*
+      INFO = 0
+*
+*     Exit (other than argument error) -- return optimal workspace size
+*
+  210 CONTINUE
+      WORK( 1 ) = DCMPLX( N )
+      RETURN
+*
+*     End of ZHGEQZ
+*
+      END
+*> \brief \b ZHSEQR
+*
+*  =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
+*
+*> \htmlonly
+*> Download ZHSEQR + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/zhseqr.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/zhseqr.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/zhseqr.f">
+*> [TXT]</a>
+*> \endhtmlonly
+*
+*  Definition:
+*  ===========
+*
+*       SUBROUTINE ZHSEQR( JOB, COMPZ, N, ILO, IHI, H, LDH, W, Z, LDZ,
+*                          WORK, LWORK, INFO )
+*
+*       .. Scalar Arguments ..
+*       INTEGER            IHI, ILO, INFO, LDH, LDZ, LWORK, N
+*       CHARACTER          COMPZ, JOB
+*       ..
+*       .. Array Arguments ..
+*       COMPLEX*16         H( LDH, * ), W( * ), WORK( * ), Z( LDZ, * )
+*       ..
+*
+*
+*> \par Purpose:
+*  =============
+*>
+*> \verbatim
+*>
+*>    ZHSEQR computes the eigenvalues of a Hessenberg matrix H
+*>    and, optionally, the matrices T and Z from the Schur decomposition
+*>    H = Z T Z**H, where T is an upper triangular matrix (the
+*>    Schur form), and Z is the unitary matrix of Schur vectors.
+*>
+*>    Optionally Z may be postmultiplied into an input unitary
+*>    matrix Q so that this routine can give the Schur factorization
+*>    of a matrix A which has been reduced to the Hessenberg form H
+*>    by the unitary matrix Q:  A = Q*H*Q**H = (QZ)*T*(QZ)**H.
+*> \endverbatim
+*
+*  Arguments:
+*  ==========
+*
+*> \param[in] JOB
+*> \verbatim
+*>          JOB is CHARACTER*1
+*>           = 'E':  compute eigenvalues only;
+*>           = 'S':  compute eigenvalues and the Schur form T.
+*> \endverbatim
+*>
+*> \param[in] COMPZ
+*> \verbatim
+*>          COMPZ is CHARACTER*1
+*>           = 'N':  no Schur vectors are computed;
+*>           = 'I':  Z is initialized to the unit matrix and the matrix Z
+*>                   of Schur vectors of H is returned;
+*>           = 'V':  Z must contain an unitary matrix Q on entry, and
+*>                   the product Q*Z is returned.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*>          N is INTEGER
+*>           The order of the matrix H.  N .GE. 0.
+*> \endverbatim
+*>
+*> \param[in] ILO
+*> \verbatim
+*>          ILO is INTEGER
+*> \endverbatim
+*>
+*> \param[in] IHI
+*> \verbatim
+*>          IHI is INTEGER
+*>
+*>           It is assumed that H is already upper triangular in rows
+*>           and columns 1:ILO-1 and IHI+1:N. ILO and IHI are normally
+*>           set by a previous call to ZGEBAL, and then passed to ZGEHRD
+*>           when the matrix output by ZGEBAL is reduced to Hessenberg
+*>           form. Otherwise ILO and IHI should be set to 1 and N
+*>           respectively.  If N.GT.0, then 1.LE.ILO.LE.IHI.LE.N.
+*>           If N = 0, then ILO = 1 and IHI = 0.
+*> \endverbatim
+*>
+*> \param[in,out] H
+*> \verbatim
+*>          H is COMPLEX*16 array, dimension (LDH,N)
+*>           On entry, the upper Hessenberg matrix H.
+*>           On exit, if INFO = 0 and JOB = 'S', H contains the upper
+*>           triangular matrix T from the Schur decomposition (the
+*>           Schur form). If INFO = 0 and JOB = 'E', the contents of
+*>           H are unspecified on exit.  (The output value of H when
+*>           INFO.GT.0 is given under the description of INFO below.)
+*>
+*>           Unlike earlier versions of ZHSEQR, this subroutine may
+*>           explicitly H(i,j) = 0 for i.GT.j and j = 1, 2, ... ILO-1
+*>           or j = IHI+1, IHI+2, ... N.
+*> \endverbatim
+*>
+*> \param[in] LDH
+*> \verbatim
+*>          LDH is INTEGER
+*>           The leading dimension of the array H. LDH .GE. max(1,N).
+*> \endverbatim
+*>
+*> \param[out] W
+*> \verbatim
+*>          W is COMPLEX*16 array, dimension (N)
+*>           The computed eigenvalues. If JOB = 'S', the eigenvalues are
+*>           stored in the same order as on the diagonal of the Schur
+*>           form returned in H, with W(i) = H(i,i).
+*> \endverbatim
+*>
+*> \param[in,out] Z
+*> \verbatim
+*>          Z is COMPLEX*16 array, dimension (LDZ,N)
+*>           If COMPZ = 'N', Z is not referenced.
+*>           If COMPZ = 'I', on entry Z need not be set and on exit,
+*>           if INFO = 0, Z contains the unitary matrix Z of the Schur
+*>           vectors of H.  If COMPZ = 'V', on entry Z must contain an
+*>           N-by-N matrix Q, which is assumed to be equal to the unit
+*>           matrix except for the submatrix Z(ILO:IHI,ILO:IHI). On exit,
+*>           if INFO = 0, Z contains Q*Z.
+*>           Normally Q is the unitary matrix generated by ZUNGHR
+*>           after the call to ZGEHRD which formed the Hessenberg matrix
+*>           H. (The output value of Z when INFO.GT.0 is given under
+*>           the description of INFO below.)
+*> \endverbatim
+*>
+*> \param[in] LDZ
+*> \verbatim
+*>          LDZ is INTEGER
+*>           The leading dimension of the array Z.  if COMPZ = 'I' or
+*>           COMPZ = 'V', then LDZ.GE.MAX(1,N).  Otherwize, LDZ.GE.1.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*>          WORK is COMPLEX*16 array, dimension (LWORK)
+*>           On exit, if INFO = 0, WORK(1) returns an estimate of
+*>           the optimal value for LWORK.
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*>          LWORK is INTEGER
+*>           The dimension of the array WORK.  LWORK .GE. max(1,N)
+*>           is sufficient and delivers very good and sometimes
+*>           optimal performance.  However, LWORK as large as 11*N
+*>           may be required for optimal performance.  A workspace
+*>           query is recommended to determine the optimal workspace
+*>           size.
+*>
+*>           If LWORK = -1, then ZHSEQR does a workspace query.
+*>           In this case, ZHSEQR checks the input parameters and
+*>           estimates the optimal workspace size for the given
+*>           values of N, ILO and IHI.  The estimate is returned
+*>           in WORK(1).  No error message related to LWORK is
+*>           issued by XERBLA.  Neither H nor Z are accessed.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*>          INFO is INTEGER
+*>             =  0:  successful exit
+*>           .LT. 0:  if INFO = -i, the i-th argument had an illegal
+*>                    value
+*>           .GT. 0:  if INFO = i, ZHSEQR failed to compute all of
+*>                the eigenvalues.  Elements 1:ilo-1 and i+1:n of WR
+*>                and WI contain those eigenvalues which have been
+*>                successfully computed.  (Failures are rare.)
+*>
+*>                If INFO .GT. 0 and JOB = 'E', then on exit, the
+*>                remaining unconverged eigenvalues are the eigen-
+*>                values of the upper Hessenberg matrix rows and
+*>                columns ILO through INFO of the final, output
+*>                value of H.
+*>
+*>                If INFO .GT. 0 and JOB   = 'S', then on exit
+*>
+*>           (*)  (initial value of H)*U  = U*(final value of H)
+*>
+*>                where U is a unitary matrix.  The final
+*>                value of  H is upper Hessenberg and triangular in
+*>                rows and columns INFO+1 through IHI.
+*>
+*>                If INFO .GT. 0 and COMPZ = 'V', then on exit
+*>
+*>                  (final value of Z)  =  (initial value of Z)*U
+*>
+*>                where U is the unitary matrix in (*) (regard-
+*>                less of the value of JOB.)
+*>
+*>                If INFO .GT. 0 and COMPZ = 'I', then on exit
+*>                      (final value of Z)  = U
+*>                where U is the unitary matrix in (*) (regard-
+*>                less of the value of JOB.)
+*>
+*>                If INFO .GT. 0 and COMPZ = 'N', then Z is not
+*>                accessed.
+*> \endverbatim
+*
+*  Authors:
+*  ========
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date December 2016
+*
+*> \ingroup complex16OTHERcomputational
+*
+*> \par Contributors:
+*  ==================
+*>
+*>       Karen Braman and Ralph Byers, Department of Mathematics,
+*>       University of Kansas, USA
+*
+*> \par Further Details:
+*  =====================
+*>
+*> \verbatim
+*>
+*>             Default values supplied by
+*>             ILAENV(ISPEC,'ZHSEQR',JOB(:1)//COMPZ(:1),N,ILO,IHI,LWORK).
+*>             It is suggested that these defaults be adjusted in order
+*>             to attain best performance in each particular
+*>             computational environment.
+*>
+*>            ISPEC=12: The ZLAHQR vs ZLAQR0 crossover point.
+*>                      Default: 75. (Must be at least 11.)
+*>
+*>            ISPEC=13: Recommended deflation window size.
+*>                      This depends on ILO, IHI and NS.  NS is the
+*>                      number of simultaneous shifts returned
+*>                      by ILAENV(ISPEC=15).  (See ISPEC=15 below.)
+*>                      The default for (IHI-ILO+1).LE.500 is NS.
+*>                      The default for (IHI-ILO+1).GT.500 is 3*NS/2.
+*>
+*>            ISPEC=14: Nibble crossover point. (See IPARMQ for
+*>                      details.)  Default: 14% of deflation window
+*>                      size.
+*>
+*>            ISPEC=15: Number of simultaneous shifts in a multishift
+*>                      QR iteration.
+*>
+*>                      If IHI-ILO+1 is ...
+*>
+*>                      greater than      ...but less    ... the
+*>                      or equal to ...      than        default is
+*>
+*>                           1               30          NS =   2(+)
+*>                          30               60          NS =   4(+)
+*>                          60              150          NS =  10(+)
+*>                         150              590          NS =  **
+*>                         590             3000          NS =  64
+*>                        3000             6000          NS = 128
+*>                        6000             infinity      NS = 256
+*>
+*>                  (+)  By default some or all matrices of this order
+*>                       are passed to the implicit double shift routine
+*>                       ZLAHQR and this parameter is ignored.  See
+*>                       ISPEC=12 above and comments in IPARMQ for
+*>                       details.
+*>
+*>                 (**)  The asterisks (**) indicate an ad-hoc
+*>                       function of N increasing from 10 to 64.
+*>
+*>            ISPEC=16: Select structured matrix multiply.
+*>                      If the number of simultaneous shifts (specified
+*>                      by ISPEC=15) is less than 14, then the default
+*>                      for ISPEC=16 is 0.  Otherwise the default for
+*>                      ISPEC=16 is 2.
+*> \endverbatim
+*
+*> \par References:
+*  ================
+*>
+*>       K. Braman, R. Byers and R. Mathias, The Multi-Shift QR
+*>       Algorithm Part I: Maintaining Well Focused Shifts, and Level 3
+*>       Performance, SIAM Journal of Matrix Analysis, volume 23, pages
+*>       929--947, 2002.
+*> \n
+*>       K. Braman, R. Byers and R. Mathias, The Multi-Shift QR
+*>       Algorithm Part II: Aggressive Early Deflation, SIAM Journal
+*>       of Matrix Analysis, volume 23, pages 948--973, 2002.
+*
+*  =====================================================================
+      SUBROUTINE ZHSEQR( JOB, COMPZ, N, ILO, IHI, H, LDH, W, Z, LDZ,
+     $                   WORK, LWORK, INFO )
+*
+*  -- LAPACK computational routine (version 3.7.0) --
+*  -- LAPACK is a software package provided by Univ. of Tennessee,    --
+*  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+*     December 2016
+*
+*     .. Scalar Arguments ..
+      INTEGER            IHI, ILO, INFO, LDH, LDZ, LWORK, N
+      CHARACTER          COMPZ, JOB
+*     ..
+*     .. Array Arguments ..
+      COMPLEX*16         H( LDH, * ), W( * ), WORK( * ), Z( LDZ, * )
+*     ..
+*
+*  =====================================================================
+*
+*     .. Parameters ..
+*
+*     ==== Matrices of order NTINY or smaller must be processed by
+*     .    ZLAHQR because of insufficient subdiagonal scratch space.
+*     .    (This is a hard limit.) ====
+      INTEGER            NTINY
+      PARAMETER          ( NTINY = 11 )
+*
+*     ==== NL allocates some local workspace to help small matrices
+*     .    through a rare ZLAHQR failure.  NL .GT. NTINY = 11 is
+*     .    required and NL .LE. NMIN = ILAENV(ISPEC=12,...) is recom-
+*     .    mended.  (The default value of NMIN is 75.)  Using NL = 49
+*     .    allows up to six simultaneous shifts and a 16-by-16
+*     .    deflation window.  ====
+      INTEGER            NL
+      PARAMETER          ( NL = 49 )
+      COMPLEX*16         ZERO, ONE
+      PARAMETER          ( ZERO = ( 0.0d0, 0.0d0 ),
+     $                   ONE = ( 1.0d0, 0.0d0 ) )
+      DOUBLE PRECISION   RZERO
+      PARAMETER          ( RZERO = 0.0d0 )
+*     ..
+*     .. Local Arrays ..
+      COMPLEX*16         HL( NL, NL ), WORKL( NL )
+*     ..
+*     .. Local Scalars ..
+      INTEGER            KBOT, NMIN
+      LOGICAL            INITZ, LQUERY, WANTT, WANTZ
+*     ..
+*     .. External Functions ..
+      INTEGER            ILAENV
+      LOGICAL            LSAME
+      EXTERNAL           ILAENV, LSAME
+*     ..
+*     .. External Subroutines ..
+      EXTERNAL           XERBLA, ZCOPY, ZLACPY, ZLAHQR, ZLAQR0, ZLASET
+*     ..
+*     .. Intrinsic Functions ..
+      INTRINSIC          DBLE, DCMPLX, MAX, MIN
+*     ..
+*     .. Executable Statements ..
+*
+*     ==== Decode and check the input parameters. ====
+*
+      WANTT = LSAME( JOB, 'S' )
+      INITZ = LSAME( COMPZ, 'I' )
+      WANTZ = INITZ .OR. LSAME( COMPZ, 'V' )
+      WORK( 1 ) = DCMPLX( DBLE( MAX( 1, N ) ), RZERO )
+      LQUERY = LWORK.EQ.-1
+*
+      INFO = 0
+      IF( .NOT.LSAME( JOB, 'E' ) .AND. .NOT.WANTT ) THEN
+         INFO = -1
+      ELSE IF( .NOT.LSAME( COMPZ, 'N' ) .AND. .NOT.WANTZ ) THEN
+         INFO = -2
+      ELSE IF( N.LT.0 ) THEN
+         INFO = -3
+      ELSE IF( ILO.LT.1 .OR. ILO.GT.MAX( 1, N ) ) THEN
+         INFO = -4
+      ELSE IF( IHI.LT.MIN( ILO, N ) .OR. IHI.GT.N ) THEN
+         INFO = -5
+      ELSE IF( LDH.LT.MAX( 1, N ) ) THEN
+         INFO = -7
+      ELSE IF( LDZ.LT.1 .OR. ( WANTZ .AND. LDZ.LT.MAX( 1, N ) ) ) THEN
+         INFO = -10
+      ELSE IF( LWORK.LT.MAX( 1, N ) .AND. .NOT.LQUERY ) THEN
+         INFO = -12
+      END IF
+*
+      IF( INFO.NE.0 ) THEN
+*
+*        ==== Quick return in case of invalid argument. ====
+*
+         CALL XERBLA( 'ZHSEQR', -INFO )
+         RETURN
+*
+      ELSE IF( N.EQ.0 ) THEN
+*
+*        ==== Quick return in case N = 0; nothing to do. ====
+*
+         RETURN
+*
+      ELSE IF( LQUERY ) THEN
+*
+*        ==== Quick return in case of a workspace query ====
+*
+         CALL ZLAQR0( WANTT, WANTZ, N, ILO, IHI, H, LDH, W, ILO, IHI, Z,
+     $                LDZ, WORK, LWORK, INFO )
+*        ==== Ensure reported workspace size is backward-compatible with
+*        .    previous LAPACK versions. ====
+         WORK( 1 ) = DCMPLX( MAX( DBLE( WORK( 1 ) ), DBLE( MAX( 1,
+     $               N ) ) ), RZERO )
+         RETURN
+*
+      ELSE
+*
+*        ==== copy eigenvalues isolated by ZGEBAL ====
+*
+         IF( ILO.GT.1 )
+     $      CALL ZCOPY( ILO-1, H, LDH+1, W, 1 )
+         IF( IHI.LT.N )
+     $      CALL ZCOPY( N-IHI, H( IHI+1, IHI+1 ), LDH+1, W( IHI+1 ), 1 )
+*
+*        ==== Initialize Z, if requested ====
+*
+         IF( INITZ )
+     $      CALL ZLASET( 'A', N, N, ZERO, ONE, Z, LDZ )
+*
+*        ==== Quick return if possible ====
+*
+         IF( ILO.EQ.IHI ) THEN
+            W( ILO ) = H( ILO, ILO )
+            RETURN
+         END IF
+*
+*        ==== ZLAHQR/ZLAQR0 crossover point ====
+*
+         NMIN = ILAENV( 12, 'ZHSEQR', JOB( : 1 ) // COMPZ( : 1 ), N,
+     $          ILO, IHI, LWORK )
+         NMIN = MAX( NTINY, NMIN )
+*
+*        ==== ZLAQR0 for big matrices; ZLAHQR for small ones ====
+*
+         IF( N.GT.NMIN ) THEN
+            CALL ZLAQR0( WANTT, WANTZ, N, ILO, IHI, H, LDH, W, ILO, IHI,
+     $                   Z, LDZ, WORK, LWORK, INFO )
+         ELSE
+*
+*           ==== Small matrix ====
+*
+            CALL ZLAHQR( WANTT, WANTZ, N, ILO, IHI, H, LDH, W, ILO, IHI,
+     $                   Z, LDZ, INFO )
+*
+            IF( INFO.GT.0 ) THEN
+*
+*              ==== A rare ZLAHQR failure!  ZLAQR0 sometimes succeeds
+*              .    when ZLAHQR fails. ====
+*
+               KBOT = INFO
+*
+               IF( N.GE.NL ) THEN
+*
+*                 ==== Larger matrices have enough subdiagonal scratch
+*                 .    space to call ZLAQR0 directly. ====
+*
+                  CALL ZLAQR0( WANTT, WANTZ, N, ILO, KBOT, H, LDH, W,
+     $                         ILO, IHI, Z, LDZ, WORK, LWORK, INFO )
+*
+               ELSE
+*
+*                 ==== Tiny matrices don't have enough subdiagonal
+*                 .    scratch space to benefit from ZLAQR0.  Hence,
+*                 .    tiny matrices must be copied into a larger
+*                 .    array before calling ZLAQR0. ====
+*
+                  CALL ZLACPY( 'A', N, N, H, LDH, HL, NL )
+                  HL( N+1, N ) = ZERO
+                  CALL ZLASET( 'A', NL, NL-N, ZERO, ZERO, HL( 1, N+1 ),
+     $                         NL )
+                  CALL ZLAQR0( WANTT, WANTZ, NL, ILO, KBOT, HL, NL, W,
+     $                         ILO, IHI, Z, LDZ, WORKL, NL, INFO )
+                  IF( WANTT .OR. INFO.NE.0 )
+     $               CALL ZLACPY( 'A', N, N, HL, NL, H, LDH )
+               END IF
+            END IF
+         END IF
+*
+*        ==== Clear out the trash, if necessary. ====
+*
+         IF( ( WANTT .OR. INFO.NE.0 ) .AND. N.GT.2 )
+     $      CALL ZLASET( 'L', N-2, N-2, ZERO, ZERO, H( 3, 1 ), LDH )
+*
+*        ==== Ensure reported workspace size is backward-compatible with
+*        .    previous LAPACK versions. ====
+*
+         WORK( 1 ) = DCMPLX( MAX( DBLE( MAX( 1, N ) ),
+     $               DBLE( WORK( 1 ) ) ), RZERO )
+      END IF
+*
+*     ==== End of ZHSEQR ====
+*
+      END
+*> \brief \b ZLABRD reduces the first nb rows and columns of a general matrix to a bidiagonal form.
+*
+*  =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
+*
+*> \htmlonly
+*> Download ZLABRD + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/zlabrd.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/zlabrd.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/zlabrd.f">
+*> [TXT]</a>
+*> \endhtmlonly
+*
+*  Definition:
+*  ===========
+*
+*       SUBROUTINE ZLABRD( M, N, NB, A, LDA, D, E, TAUQ, TAUP, X, LDX, Y,
+*                          LDY )
+*
+*       .. Scalar Arguments ..
+*       INTEGER            LDA, LDX, LDY, M, N, NB
+*       ..
+*       .. Array Arguments ..
+*       DOUBLE PRECISION   D( * ), E( * )
+*       COMPLEX*16         A( LDA, * ), TAUP( * ), TAUQ( * ), X( LDX, * ),
+*      $                   Y( LDY, * )
+*       ..
+*
 *
-                  ELSE
+*> \par Purpose:
+*  =============
+*>
+*> \verbatim
+*>
+*> ZLABRD reduces the first NB rows and columns of a complex general
+*> m by n matrix A to upper or lower real bidiagonal form by a unitary
+*> transformation Q**H * A * P, and returns the matrices X and Y which
+*> are needed to apply the transformation to the unreduced part of A.
+*>
+*> If m >= n, A is reduced to upper bidiagonal form; if m < n, to lower
+*> bidiagonal form.
+*>
+*> This is an auxiliary routine called by ZGEBRD
+*> \endverbatim
 *
-*                    Insufficient workspace for a fast algorithm
+*  Arguments:
+*  ==========
 *
-                     ITAU = 1
-                     IWORK = ITAU + M
+*> \param[in] M
+*> \verbatim
+*>          M is INTEGER
+*>          The number of rows in the matrix A.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*>          N is INTEGER
+*>          The number of columns in the matrix A.
+*> \endverbatim
+*>
+*> \param[in] NB
+*> \verbatim
+*>          NB is INTEGER
+*>          The number of leading rows and columns of A to be reduced.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*>          A is COMPLEX*16 array, dimension (LDA,N)
+*>          On entry, the m by n general matrix to be reduced.
+*>          On exit, the first NB rows and columns of the matrix are
+*>          overwritten; the rest of the array is unchanged.
+*>          If m >= n, elements on and below the diagonal in the first NB
+*>            columns, with the array TAUQ, represent the unitary
+*>            matrix Q as a product of elementary reflectors; and
+*>            elements above the diagonal in the first NB rows, with the
+*>            array TAUP, represent the unitary matrix P as a product
+*>            of elementary reflectors.
+*>          If m < n, elements below the diagonal in the first NB
+*>            columns, with the array TAUQ, represent the unitary
+*>            matrix Q as a product of elementary reflectors, and
+*>            elements on and above the diagonal in the first NB rows,
+*>            with the array TAUP, represent the unitary matrix P as
+*>            a product of elementary reflectors.
+*>          See Further Details.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*>          LDA is INTEGER
+*>          The leading dimension of the array A.  LDA >= max(1,M).
+*> \endverbatim
+*>
+*> \param[out] D
+*> \verbatim
+*>          D is DOUBLE PRECISION array, dimension (NB)
+*>          The diagonal elements of the first NB rows and columns of
+*>          the reduced matrix.  D(i) = A(i,i).
+*> \endverbatim
+*>
+*> \param[out] E
+*> \verbatim
+*>          E is DOUBLE PRECISION array, dimension (NB)
+*>          The off-diagonal elements of the first NB rows and columns of
+*>          the reduced matrix.
+*> \endverbatim
+*>
+*> \param[out] TAUQ
+*> \verbatim
+*>          TAUQ is COMPLEX*16 array dimension (NB)
+*>          The scalar factors of the elementary reflectors which
+*>          represent the unitary matrix Q. See Further Details.
+*> \endverbatim
+*>
+*> \param[out] TAUP
+*> \verbatim
+*>          TAUP is COMPLEX*16 array, dimension (NB)
+*>          The scalar factors of the elementary reflectors which
+*>          represent the unitary matrix P. See Further Details.
+*> \endverbatim
+*>
+*> \param[out] X
+*> \verbatim
+*>          X is COMPLEX*16 array, dimension (LDX,NB)
+*>          The m-by-nb matrix X required to update the unreduced part
+*>          of A.
+*> \endverbatim
+*>
+*> \param[in] LDX
+*> \verbatim
+*>          LDX is INTEGER
+*>          The leading dimension of the array X. LDX >= max(1,M).
+*> \endverbatim
+*>
+*> \param[out] Y
+*> \verbatim
+*>          Y is COMPLEX*16 array, dimension (LDY,NB)
+*>          The n-by-nb matrix Y required to update the unreduced part
+*>          of A.
+*> \endverbatim
+*>
+*> \param[in] LDY
+*> \verbatim
+*>          LDY is INTEGER
+*>          The leading dimension of the array Y. LDY >= max(1,N).
+*> \endverbatim
 *
-*                    Compute A=L*Q, copying result to VT
-*                    (CWorkspace: need 2*M, prefer M+M*NB)
-*                    (RWorkspace: 0)
+*  Authors:
+*  ========
 *
-                     CALL ZGELQF( M, N, A, LDA, WORK( ITAU ),
-     $                            WORK( IWORK ), LWORK-IWORK+1, IERR )
-                     CALL ZLACPY( 'U', M, N, A, LDA, VT, LDVT )
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*                    Generate Q in VT
-*                    (CWorkspace: need 2*M, prefer M+M*NB)
-*                    (RWorkspace: 0)
+*> \date December 2016
 *
-                     CALL ZUNGLQ( M, N, M, VT, LDVT, WORK( ITAU ),
-     $                            WORK( IWORK ), LWORK-IWORK+1, IERR )
+*> \ingroup complex16OTHERauxiliary
 *
-*                    Copy L to U, zeroing out above it
+*> \par Further Details:
+*  =====================
+*>
+*> \verbatim
+*>
+*>  The matrices Q and P are represented as products of elementary
+*>  reflectors:
+*>
+*>     Q = H(1) H(2) . . . H(nb)  and  P = G(1) G(2) . . . G(nb)
+*>
+*>  Each H(i) and G(i) has the form:
+*>
+*>     H(i) = I - tauq * v * v**H  and G(i) = I - taup * u * u**H
+*>
+*>  where tauq and taup are complex scalars, and v and u are complex
+*>  vectors.
+*>
+*>  If m >= n, v(1:i-1) = 0, v(i) = 1, and v(i:m) is stored on exit in
+*>  A(i:m,i); u(1:i) = 0, u(i+1) = 1, and u(i+1:n) is stored on exit in
+*>  A(i,i+1:n); tauq is stored in TAUQ(i) and taup in TAUP(i).
+*>
+*>  If m < n, v(1:i) = 0, v(i+1) = 1, and v(i+1:m) is stored on exit in
+*>  A(i+2:m,i); u(1:i-1) = 0, u(i) = 1, and u(i:n) is stored on exit in
+*>  A(i,i+1:n); tauq is stored in TAUQ(i) and taup in TAUP(i).
+*>
+*>  The elements of the vectors v and u together form the m-by-nb matrix
+*>  V and the nb-by-n matrix U**H which are needed, with X and Y, to apply
+*>  the transformation to the unreduced part of the matrix, using a block
+*>  update of the form:  A := A - V*Y**H - X*U**H.
+*>
+*>  The contents of A on exit are illustrated by the following examples
+*>  with nb = 2:
+*>
+*>  m = 6 and n = 5 (m > n):          m = 5 and n = 6 (m < n):
+*>
+*>    (  1   1   u1  u1  u1 )           (  1   u1  u1  u1  u1  u1 )
+*>    (  v1  1   1   u2  u2 )           (  1   1   u2  u2  u2  u2 )
+*>    (  v1  v2  a   a   a  )           (  v1  1   a   a   a   a  )
+*>    (  v1  v2  a   a   a  )           (  v1  v2  a   a   a   a  )
+*>    (  v1  v2  a   a   a  )           (  v1  v2  a   a   a   a  )
+*>    (  v1  v2  a   a   a  )
+*>
+*>  where a denotes an element of the original matrix which is unchanged,
+*>  vi denotes an element of the vector defining H(i), and ui an element
+*>  of the vector defining G(i).
+*> \endverbatim
+*>
+*  =====================================================================
+      SUBROUTINE ZLABRD( M, N, NB, A, LDA, D, E, TAUQ, TAUP, X, LDX, Y,
+     $                   LDY )
+*
+*  -- LAPACK auxiliary routine (version 3.7.0) --
+*  -- LAPACK is a software package provided by Univ. of Tennessee,    --
+*  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+*     December 2016
+*
+*     .. Scalar Arguments ..
+      INTEGER            LDA, LDX, LDY, M, N, NB
+*     ..
+*     .. Array Arguments ..
+      DOUBLE PRECISION   D( * ), E( * )
+      COMPLEX*16         A( LDA, * ), TAUP( * ), TAUQ( * ), X( LDX, * ),
+     $                   Y( LDY, * )
+*     ..
+*
+*  =====================================================================
+*
+*     .. Parameters ..
+      COMPLEX*16         ZERO, ONE
+      PARAMETER          ( ZERO = ( 0.0D+0, 0.0D+0 ),
+     $                   ONE = ( 1.0D+0, 0.0D+0 ) )
+*     ..
+*     .. Local Scalars ..
+      INTEGER            I
+      COMPLEX*16         ALPHA
+*     ..
+*     .. External Subroutines ..
+      EXTERNAL           ZGEMV, ZLACGV, ZLARFG, ZSCAL
+*     ..
+*     .. Intrinsic Functions ..
+      INTRINSIC          MIN
+*     ..
+*     .. Executable Statements ..
+*
+*     Quick return if possible
+*
+      IF( M.LE.0 .OR. N.LE.0 )
+     $   RETURN
+*
+      IF( M.GE.N ) THEN
+*
+*        Reduce to upper bidiagonal form
+*
+         DO 10 I = 1, NB
+*
+*           Update A(i:m,i)
+*
+            CALL ZLACGV( I-1, Y( I, 1 ), LDY )
+            CALL ZGEMV( 'No transpose', M-I+1, I-1, -ONE, A( I, 1 ),
+     $                  LDA, Y( I, 1 ), LDY, ONE, A( I, I ), 1 )
+            CALL ZLACGV( I-1, Y( I, 1 ), LDY )
+            CALL ZGEMV( 'No transpose', M-I+1, I-1, -ONE, X( I, 1 ),
+     $                  LDX, A( 1, I ), 1, ONE, A( I, I ), 1 )
+*
+*           Generate reflection Q(i) to annihilate A(i+1:m,i)
+*
+            ALPHA = A( I, I )
+            CALL ZLARFG( M-I+1, ALPHA, A( MIN( I+1, M ), I ), 1,
+     $                   TAUQ( I ) )
+            D( I ) = ALPHA
+            IF( I.LT.N ) THEN
+               A( I, I ) = ONE
+*
+*              Compute Y(i+1:n,i)
+*
+               CALL ZGEMV( 'Conjugate transpose', M-I+1, N-I, ONE,
+     $                     A( I, I+1 ), LDA, A( I, I ), 1, ZERO,
+     $                     Y( I+1, I ), 1 )
+               CALL ZGEMV( 'Conjugate transpose', M-I+1, I-1, ONE,
+     $                     A( I, 1 ), LDA, A( I, I ), 1, ZERO,
+     $                     Y( 1, I ), 1 )
+               CALL ZGEMV( 'No transpose', N-I, I-1, -ONE, Y( I+1, 1 ),
+     $                     LDY, Y( 1, I ), 1, ONE, Y( I+1, I ), 1 )
+               CALL ZGEMV( 'Conjugate transpose', M-I+1, I-1, ONE,
+     $                     X( I, 1 ), LDX, A( I, I ), 1, ZERO,
+     $                     Y( 1, I ), 1 )
+               CALL ZGEMV( 'Conjugate transpose', I-1, N-I, -ONE,
+     $                     A( 1, I+1 ), LDA, Y( 1, I ), 1, ONE,
+     $                     Y( I+1, I ), 1 )
+               CALL ZSCAL( N-I, TAUQ( I ), Y( I+1, I ), 1 )
+*
+*              Update A(i,i+1:n)
+*
+               CALL ZLACGV( N-I, A( I, I+1 ), LDA )
+               CALL ZLACGV( I, A( I, 1 ), LDA )
+               CALL ZGEMV( 'No transpose', N-I, I, -ONE, Y( I+1, 1 ),
+     $                     LDY, A( I, 1 ), LDA, ONE, A( I, I+1 ), LDA )
+               CALL ZLACGV( I, A( I, 1 ), LDA )
+               CALL ZLACGV( I-1, X( I, 1 ), LDX )
+               CALL ZGEMV( 'Conjugate transpose', I-1, N-I, -ONE,
+     $                     A( 1, I+1 ), LDA, X( I, 1 ), LDX, ONE,
+     $                     A( I, I+1 ), LDA )
+               CALL ZLACGV( I-1, X( I, 1 ), LDX )
+*
+*              Generate reflection P(i) to annihilate A(i,i+2:n)
+*
+               ALPHA = A( I, I+1 )
+               CALL ZLARFG( N-I, ALPHA, A( I, MIN( I+2, N ) ), LDA,
+     $                      TAUP( I ) )
+               E( I ) = ALPHA
+               A( I, I+1 ) = ONE
+*
+*              Compute X(i+1:m,i)
+*
+               CALL ZGEMV( 'No transpose', M-I, N-I, ONE, A( I+1, I+1 ),
+     $                     LDA, A( I, I+1 ), LDA, ZERO, X( I+1, I ), 1 )
+               CALL ZGEMV( 'Conjugate transpose', N-I, I, ONE,
+     $                     Y( I+1, 1 ), LDY, A( I, I+1 ), LDA, ZERO,
+     $                     X( 1, I ), 1 )
+               CALL ZGEMV( 'No transpose', M-I, I, -ONE, A( I+1, 1 ),
+     $                     LDA, X( 1, I ), 1, ONE, X( I+1, I ), 1 )
+               CALL ZGEMV( 'No transpose', I-1, N-I, ONE, A( 1, I+1 ),
+     $                     LDA, A( I, I+1 ), LDA, ZERO, X( 1, I ), 1 )
+               CALL ZGEMV( 'No transpose', M-I, I-1, -ONE, X( I+1, 1 ),
+     $                     LDX, X( 1, I ), 1, ONE, X( I+1, I ), 1 )
+               CALL ZSCAL( M-I, TAUP( I ), X( I+1, I ), 1 )
+               CALL ZLACGV( N-I, A( I, I+1 ), LDA )
+            END IF
+   10    CONTINUE
+      ELSE
+*
+*        Reduce to lower bidiagonal form
+*
+         DO 20 I = 1, NB
+*
+*           Update A(i,i:n)
+*
+            CALL ZLACGV( N-I+1, A( I, I ), LDA )
+            CALL ZLACGV( I-1, A( I, 1 ), LDA )
+            CALL ZGEMV( 'No transpose', N-I+1, I-1, -ONE, Y( I, 1 ),
+     $                  LDY, A( I, 1 ), LDA, ONE, A( I, I ), LDA )
+            CALL ZLACGV( I-1, A( I, 1 ), LDA )
+            CALL ZLACGV( I-1, X( I, 1 ), LDX )
+            CALL ZGEMV( 'Conjugate transpose', I-1, N-I+1, -ONE,
+     $                  A( 1, I ), LDA, X( I, 1 ), LDX, ONE, A( I, I ),
+     $                  LDA )
+            CALL ZLACGV( I-1, X( I, 1 ), LDX )
+*
+*           Generate reflection P(i) to annihilate A(i,i+1:n)
+*
+            ALPHA = A( I, I )
+            CALL ZLARFG( N-I+1, ALPHA, A( I, MIN( I+1, N ) ), LDA,
+     $                   TAUP( I ) )
+            D( I ) = ALPHA
+            IF( I.LT.M ) THEN
+               A( I, I ) = ONE
+*
+*              Compute X(i+1:m,i)
+*
+               CALL ZGEMV( 'No transpose', M-I, N-I+1, ONE, A( I+1, I ),
+     $                     LDA, A( I, I ), LDA, ZERO, X( I+1, I ), 1 )
+               CALL ZGEMV( 'Conjugate transpose', N-I+1, I-1, ONE,
+     $                     Y( I, 1 ), LDY, A( I, I ), LDA, ZERO,
+     $                     X( 1, I ), 1 )
+               CALL ZGEMV( 'No transpose', M-I, I-1, -ONE, A( I+1, 1 ),
+     $                     LDA, X( 1, I ), 1, ONE, X( I+1, I ), 1 )
+               CALL ZGEMV( 'No transpose', I-1, N-I+1, ONE, A( 1, I ),
+     $                     LDA, A( I, I ), LDA, ZERO, X( 1, I ), 1 )
+               CALL ZGEMV( 'No transpose', M-I, I-1, -ONE, X( I+1, 1 ),
+     $                     LDX, X( 1, I ), 1, ONE, X( I+1, I ), 1 )
+               CALL ZSCAL( M-I, TAUP( I ), X( I+1, I ), 1 )
+               CALL ZLACGV( N-I+1, A( I, I ), LDA )
+*
+*              Update A(i+1:m,i)
+*
+               CALL ZLACGV( I-1, Y( I, 1 ), LDY )
+               CALL ZGEMV( 'No transpose', M-I, I-1, -ONE, A( I+1, 1 ),
+     $                     LDA, Y( I, 1 ), LDY, ONE, A( I+1, I ), 1 )
+               CALL ZLACGV( I-1, Y( I, 1 ), LDY )
+               CALL ZGEMV( 'No transpose', M-I, I, -ONE, X( I+1, 1 ),
+     $                     LDX, A( 1, I ), 1, ONE, A( I+1, I ), 1 )
+*
+*              Generate reflection Q(i) to annihilate A(i+2:m,i)
+*
+               ALPHA = A( I+1, I )
+               CALL ZLARFG( M-I, ALPHA, A( MIN( I+2, M ), I ), 1,
+     $                      TAUQ( I ) )
+               E( I ) = ALPHA
+               A( I+1, I ) = ONE
+*
+*              Compute Y(i+1:n,i)
+*
+               CALL ZGEMV( 'Conjugate transpose', M-I, N-I, ONE,
+     $                     A( I+1, I+1 ), LDA, A( I+1, I ), 1, ZERO,
+     $                     Y( I+1, I ), 1 )
+               CALL ZGEMV( 'Conjugate transpose', M-I, I-1, ONE,
+     $                     A( I+1, 1 ), LDA, A( I+1, I ), 1, ZERO,
+     $                     Y( 1, I ), 1 )
+               CALL ZGEMV( 'No transpose', N-I, I-1, -ONE, Y( I+1, 1 ),
+     $                     LDY, Y( 1, I ), 1, ONE, Y( I+1, I ), 1 )
+               CALL ZGEMV( 'Conjugate transpose', M-I, I, ONE,
+     $                     X( I+1, 1 ), LDX, A( I+1, I ), 1, ZERO,
+     $                     Y( 1, I ), 1 )
+               CALL ZGEMV( 'Conjugate transpose', I, N-I, -ONE,
+     $                     A( 1, I+1 ), LDA, Y( 1, I ), 1, ONE,
+     $                     Y( I+1, I ), 1 )
+               CALL ZSCAL( N-I, TAUQ( I ), Y( I+1, I ), 1 )
+            ELSE
+               CALL ZLACGV( N-I+1, A( I, I ), LDA )
+            END IF
+   20    CONTINUE
+      END IF
+      RETURN
+*
+*     End of ZLABRD
+*
+      END
+*> \brief \b ZLACGV conjugates a complex vector.
+*
+*  =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
+*
+*> \htmlonly
+*> Download ZLACGV + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/zlacgv.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/zlacgv.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/zlacgv.f">
+*> [TXT]</a>
+*> \endhtmlonly
+*
+*  Definition:
+*  ===========
+*
+*       SUBROUTINE ZLACGV( N, X, INCX )
+*
+*       .. Scalar Arguments ..
+*       INTEGER            INCX, N
+*       ..
+*       .. Array Arguments ..
+*       COMPLEX*16         X( * )
+*       ..
+*
+*
+*> \par Purpose:
+*  =============
+*>
+*> \verbatim
+*>
+*> ZLACGV conjugates a complex vector of length N.
+*> \endverbatim
+*
+*  Arguments:
+*  ==========
+*
+*> \param[in] N
+*> \verbatim
+*>          N is INTEGER
+*>          The length of the vector X.  N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] X
+*> \verbatim
+*>          X is COMPLEX*16 array, dimension
+*>                         (1+(N-1)*abs(INCX))
+*>          On entry, the vector of length N to be conjugated.
+*>          On exit, X is overwritten with conjg(X).
+*> \endverbatim
+*>
+*> \param[in] INCX
+*> \verbatim
+*>          INCX is INTEGER
+*>          The spacing between successive elements of X.
+*> \endverbatim
+*
+*  Authors:
+*  ========
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date December 2016
+*
+*> \ingroup complex16OTHERauxiliary
+*
+*  =====================================================================
+      SUBROUTINE ZLACGV( N, X, INCX )
+*
+*  -- LAPACK auxiliary routine (version 3.7.0) --
+*  -- LAPACK is a software package provided by Univ. of Tennessee,    --
+*  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+*     December 2016
+*
+*     .. Scalar Arguments ..
+      INTEGER            INCX, N
+*     ..
+*     .. Array Arguments ..
+      COMPLEX*16         X( * )
+*     ..
+*
+* =====================================================================
+*
+*     .. Local Scalars ..
+      INTEGER            I, IOFF
+*     ..
+*     .. Intrinsic Functions ..
+      INTRINSIC          DCONJG
+*     ..
+*     .. Executable Statements ..
+*
+      IF( INCX.EQ.1 ) THEN
+         DO 10 I = 1, N
+            X( I ) = DCONJG( X( I ) )
+   10    CONTINUE
+      ELSE
+         IOFF = 1
+         IF( INCX.LT.0 )
+     $      IOFF = 1 - ( N-1 )*INCX
+         DO 20 I = 1, N
+            X( IOFF ) = DCONJG( X( IOFF ) )
+            IOFF = IOFF + INCX
+   20    CONTINUE
+      END IF
+      RETURN
+*
+*     End of ZLACGV
+*
+      END
+*> \brief \b ZLACN2 estimates the 1-norm of a square matrix, using reverse communication for evaluating matrix-vector products.
+*
+*  =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
+*
+*> \htmlonly
+*> Download ZLACN2 + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/zlacn2.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/zlacn2.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/zlacn2.f">
+*> [TXT]</a>
+*> \endhtmlonly
+*
+*  Definition:
+*  ===========
+*
+*       SUBROUTINE ZLACN2( N, V, X, EST, KASE, ISAVE )
+*
+*       .. Scalar Arguments ..
+*       INTEGER            KASE, N
+*       DOUBLE PRECISION   EST
+*       ..
+*       .. Array Arguments ..
+*       INTEGER            ISAVE( 3 )
+*       COMPLEX*16         V( * ), X( * )
+*       ..
 *
-                     CALL ZLACPY( 'L', M, M, A, LDA, U, LDU )
-                     CALL ZLASET( 'U', M-1, M-1, CZERO, CZERO,
-     $                            U( 1, 2 ), LDU )
-                     IE = 1
-                     ITAUQ = ITAU
-                     ITAUP = ITAUQ + M
-                     IWORK = ITAUP + M
 *
-*                    Bidiagonalize L in U
-*                    (CWorkspace: need 3*M, prefer 2*M+2*M*NB)
-*                    (RWorkspace: need M)
+*> \par Purpose:
+*  =============
+*>
+*> \verbatim
+*>
+*> ZLACN2 estimates the 1-norm of a square, complex matrix A.
+*> Reverse communication is used for evaluating matrix-vector products.
+*> \endverbatim
 *
-                     CALL ZGEBRD( M, M, U, LDU, S, RWORK( IE ),
-     $                            WORK( ITAUQ ), WORK( ITAUP ),
-     $                            WORK( IWORK ), LWORK-IWORK+1, IERR )
+*  Arguments:
+*  ==========
 *
-*                    Multiply right bidiagonalizing vectors in U by Q
-*                    in VT
-*                    (CWorkspace: need 2*M+N, prefer 2*M+N*NB)
-*                    (RWorkspace: 0)
+*> \param[in] N
+*> \verbatim
+*>          N is INTEGER
+*>         The order of the matrix.  N >= 1.
+*> \endverbatim
+*>
+*> \param[out] V
+*> \verbatim
+*>          V is COMPLEX*16 array, dimension (N)
+*>         On the final return, V = A*W,  where  EST = norm(V)/norm(W)
+*>         (W is not returned).
+*> \endverbatim
+*>
+*> \param[in,out] X
+*> \verbatim
+*>          X is COMPLEX*16 array, dimension (N)
+*>         On an intermediate return, X should be overwritten by
+*>               A * X,   if KASE=1,
+*>               A**H * X,  if KASE=2,
+*>         where A**H is the conjugate transpose of A, and ZLACN2 must be
+*>         re-called with all the other parameters unchanged.
+*> \endverbatim
+*>
+*> \param[in,out] EST
+*> \verbatim
+*>          EST is DOUBLE PRECISION
+*>         On entry with KASE = 1 or 2 and ISAVE(1) = 3, EST should be
+*>         unchanged from the previous call to ZLACN2.
+*>         On exit, EST is an estimate (a lower bound) for norm(A).
+*> \endverbatim
+*>
+*> \param[in,out] KASE
+*> \verbatim
+*>          KASE is INTEGER
+*>         On the initial call to ZLACN2, KASE should be 0.
+*>         On an intermediate return, KASE will be 1 or 2, indicating
+*>         whether X should be overwritten by A * X  or A**H * X.
+*>         On the final return from ZLACN2, KASE will again be 0.
+*> \endverbatim
+*>
+*> \param[in,out] ISAVE
+*> \verbatim
+*>          ISAVE is INTEGER array, dimension (3)
+*>         ISAVE is used to save variables between calls to ZLACN2
+*> \endverbatim
 *
-                     CALL ZUNMBR( 'P', 'L', 'C', M, N, M, U, LDU,
-     $                            WORK( ITAUP ), VT, LDVT,
-     $                            WORK( IWORK ), LWORK-IWORK+1, IERR )
+*  Authors:
+*  ========
 *
-*                    Generate left bidiagonalizing vectors in U
-*                    (CWorkspace: need 3*M, prefer 2*M+M*NB)
-*                    (RWorkspace: 0)
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-                     CALL ZUNGBR( 'Q', M, M, M, U, LDU, WORK( ITAUQ ),
-     $                            WORK( IWORK ), LWORK-IWORK+1, IERR )
-                     IRWORK = IE + M
+*> \date December 2016
 *
-*                    Perform bidiagonal QR iteration, computing left
-*                    singular vectors of A in U and computing right
-*                    singular vectors of A in VT
-*                    (CWorkspace: 0)
-*                    (RWorkspace: need BDSPAC)
+*> \ingroup complex16OTHERauxiliary
 *
-                     CALL ZBDSQR( 'U', M, N, M, 0, S, RWORK( IE ), VT,
-     $                            LDVT, U, LDU, CDUM, 1,
-     $                            RWORK( IRWORK ), INFO )
+*> \par Further Details:
+*  =====================
+*>
+*> \verbatim
+*>
+*>  Originally named CONEST, dated March 16, 1988.
+*>
+*>  Last modified:  April, 1999
+*>
+*>  This is a thread safe version of ZLACON, which uses the array ISAVE
+*>  in place of a SAVE statement, as follows:
+*>
+*>     ZLACON     ZLACN2
+*>      JUMP     ISAVE(1)
+*>      J        ISAVE(2)
+*>      ITER     ISAVE(3)
+*> \endverbatim
 *
-                  END IF
+*> \par Contributors:
+*  ==================
+*>
+*>     Nick Higham, University of Manchester
 *
-               END IF
+*> \par References:
+*  ================
+*>
+*>  N.J. Higham, "FORTRAN codes for estimating the one-norm of
+*>  a real or complex matrix, with applications to condition estimation",
+*>  ACM Trans. Math. Soft., vol. 14, no. 4, pp. 381-396, December 1988.
+*>
+*  =====================================================================
+      SUBROUTINE ZLACN2( N, V, X, EST, KASE, ISAVE )
 *
-            ELSE IF( WNTVA ) THEN
+*  -- LAPACK auxiliary routine (version 3.7.0) --
+*  -- LAPACK is a software package provided by Univ. of Tennessee,    --
+*  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+*     December 2016
 *
-               IF( WNTUN ) THEN
+*     .. Scalar Arguments ..
+      INTEGER            KASE, N
+      DOUBLE PRECISION   EST
+*     ..
+*     .. Array Arguments ..
+      INTEGER            ISAVE( 3 )
+      COMPLEX*16         V( * ), X( * )
+*     ..
 *
-*                 Path 7t(N much larger than M, JOBU='N', JOBVT='A')
-*                 N right singular vectors to be computed in VT and
-*                 no left singular vectors to be computed
+*  =====================================================================
 *
-                  IF( LWORK.GE.M*M+MAX( N+M, 3*M ) ) THEN
+*     .. Parameters ..
+      INTEGER              ITMAX
+      PARAMETER          ( ITMAX = 5 )
+      DOUBLE PRECISION     ONE,         TWO
+      PARAMETER          ( ONE = 1.0D0, TWO = 2.0D0 )
+      COMPLEX*16           CZERO, CONE
+      PARAMETER          ( CZERO = ( 0.0D0, 0.0D0 ),
+     $                            CONE = ( 1.0D0, 0.0D0 ) )
+*     ..
+*     .. Local Scalars ..
+      INTEGER            I, JLAST
+      DOUBLE PRECISION   ABSXI, ALTSGN, ESTOLD, SAFMIN, TEMP
+*     ..
+*     .. External Functions ..
+      INTEGER            IZMAX1
+      DOUBLE PRECISION   DLAMCH, DZSUM1
+      EXTERNAL           IZMAX1, DLAMCH, DZSUM1
+*     ..
+*     .. External Subroutines ..
+      EXTERNAL           ZCOPY
+*     ..
+*     .. Intrinsic Functions ..
+      INTRINSIC          ABS, DBLE, DCMPLX, DIMAG
+*     ..
+*     .. Executable Statements ..
 *
-*                    Sufficient workspace for a fast algorithm
+      SAFMIN = DLAMCH( 'Safe minimum' )
+      IF( KASE.EQ.0 ) THEN
+         DO 10 I = 1, N
+            X( I ) = DCMPLX( ONE / DBLE( N ) )
+   10    CONTINUE
+         KASE = 1
+         ISAVE( 1 ) = 1
+         RETURN
+      END IF
 *
-                     IR = 1
-                     IF( LWORK.GE.WRKBL+LDA*M ) THEN
+      GO TO ( 20, 40, 70, 90, 120 )ISAVE( 1 )
 *
-*                       WORK(IR) is LDA by M
+*     ................ ENTRY   (ISAVE( 1 ) = 1)
+*     FIRST ITERATION.  X HAS BEEN OVERWRITTEN BY A*X.
 *
-                        LDWRKR = LDA
-                     ELSE
+   20 CONTINUE
+      IF( N.EQ.1 ) THEN
+         V( 1 ) = X( 1 )
+         EST = ABS( V( 1 ) )
+*        ... QUIT
+         GO TO 130
+      END IF
+      EST = DZSUM1( N, X, 1 )
 *
-*                       WORK(IR) is M by M
+      DO 30 I = 1, N
+         ABSXI = ABS( X( I ) )
+         IF( ABSXI.GT.SAFMIN ) THEN
+            X( I ) = DCMPLX( DBLE( X( I ) ) / ABSXI,
+     $               DIMAG( X( I ) ) / ABSXI )
+         ELSE
+            X( I ) = CONE
+         END IF
+   30 CONTINUE
+      KASE = 2
+      ISAVE( 1 ) = 2
+      RETURN
 *
-                        LDWRKR = M
-                     END IF
-                     ITAU = IR + LDWRKR*M
-                     IWORK = ITAU + M
+*     ................ ENTRY   (ISAVE( 1 ) = 2)
+*     FIRST ITERATION.  X HAS BEEN OVERWRITTEN BY CTRANS(A)*X.
 *
-*                    Compute A=L*Q, copying result to VT
-*                    (CWorkspace: need M*M+2*M, prefer M*M+M+M*NB)
-*                    (RWorkspace: 0)
+   40 CONTINUE
+      ISAVE( 2 ) = IZMAX1( N, X, 1 )
+      ISAVE( 3 ) = 2
 *
-                     CALL ZGELQF( M, N, A, LDA, WORK( ITAU ),
-     $                            WORK( IWORK ), LWORK-IWORK+1, IERR )
-                     CALL ZLACPY( 'U', M, N, A, LDA, VT, LDVT )
+*     MAIN LOOP - ITERATIONS 2,3,...,ITMAX.
 *
-*                    Copy L to WORK(IR), zeroing out above it
+   50 CONTINUE
+      DO 60 I = 1, N
+         X( I ) = CZERO
+   60 CONTINUE
+      X( ISAVE( 2 ) ) = CONE
+      KASE = 1
+      ISAVE( 1 ) = 3
+      RETURN
 *
-                     CALL ZLACPY( 'L', M, M, A, LDA, WORK( IR ),
-     $                            LDWRKR )
-                     CALL ZLASET( 'U', M-1, M-1, CZERO, CZERO,
-     $                            WORK( IR+LDWRKR ), LDWRKR )
+*     ................ ENTRY   (ISAVE( 1 ) = 3)
+*     X HAS BEEN OVERWRITTEN BY A*X.
 *
-*                    Generate Q in VT
-*                    (CWorkspace: need M*M+M+N, prefer M*M+M+N*NB)
-*                    (RWorkspace: 0)
+   70 CONTINUE
+      CALL ZCOPY( N, X, 1, V, 1 )
+      ESTOLD = EST
+      EST = DZSUM1( N, V, 1 )
 *
-                     CALL ZUNGLQ( N, N, M, VT, LDVT, WORK( ITAU ),
-     $                            WORK( IWORK ), LWORK-IWORK+1, IERR )
-                     IE = 1
-                     ITAUQ = ITAU
-                     ITAUP = ITAUQ + M
-                     IWORK = ITAUP + M
+*     TEST FOR CYCLING.
+      IF( EST.LE.ESTOLD )
+     $   GO TO 100
 *
-*                    Bidiagonalize L in WORK(IR)
-*                    (CWorkspace: need M*M+3*M, prefer M*M+2*M+2*M*NB)
-*                    (RWorkspace: need M)
+      DO 80 I = 1, N
+         ABSXI = ABS( X( I ) )
+         IF( ABSXI.GT.SAFMIN ) THEN
+            X( I ) = DCMPLX( DBLE( X( I ) ) / ABSXI,
+     $               DIMAG( X( I ) ) / ABSXI )
+         ELSE
+            X( I ) = CONE
+         END IF
+   80 CONTINUE
+      KASE = 2
+      ISAVE( 1 ) = 4
+      RETURN
 *
-                     CALL ZGEBRD( M, M, WORK( IR ), LDWRKR, S,
-     $                            RWORK( IE ), WORK( ITAUQ ),
-     $                            WORK( ITAUP ), WORK( IWORK ),
-     $                            LWORK-IWORK+1, IERR )
+*     ................ ENTRY   (ISAVE( 1 ) = 4)
+*     X HAS BEEN OVERWRITTEN BY CTRANS(A)*X.
 *
-*                    Generate right bidiagonalizing vectors in WORK(IR)
-*                    (CWorkspace: need   M*M+3*M-1,
-*                                 prefer M*M+2*M+(M-1)*NB)
-*                    (RWorkspace: 0)
+   90 CONTINUE
+      JLAST = ISAVE( 2 )
+      ISAVE( 2 ) = IZMAX1( N, X, 1 )
+      IF( ( ABS( X( JLAST ) ).NE.ABS( X( ISAVE( 2 ) ) ) ) .AND.
+     $    ( ISAVE( 3 ).LT.ITMAX ) ) THEN
+         ISAVE( 3 ) = ISAVE( 3 ) + 1
+         GO TO 50
+      END IF
 *
-                     CALL ZUNGBR( 'P', M, M, M, WORK( IR ), LDWRKR,
-     $                            WORK( ITAUP ), WORK( IWORK ),
-     $                            LWORK-IWORK+1, IERR )
-                     IRWORK = IE + M
+*     ITERATION COMPLETE.  FINAL STAGE.
 *
-*                    Perform bidiagonal QR iteration, computing right
-*                    singular vectors of L in WORK(IR)
-*                    (CWorkspace: need M*M)
-*                    (RWorkspace: need BDSPAC)
+  100 CONTINUE
+      ALTSGN = ONE
+      DO 110 I = 1, N
+         X( I ) = DCMPLX( ALTSGN*( ONE+DBLE( I-1 ) / DBLE( N-1 ) ) )
+         ALTSGN = -ALTSGN
+  110 CONTINUE
+      KASE = 1
+      ISAVE( 1 ) = 5
+      RETURN
 *
-                     CALL ZBDSQR( 'U', M, M, 0, 0, S, RWORK( IE ),
-     $                            WORK( IR ), LDWRKR, CDUM, 1, CDUM, 1,
-     $                            RWORK( IRWORK ), INFO )
+*     ................ ENTRY   (ISAVE( 1 ) = 5)
+*     X HAS BEEN OVERWRITTEN BY A*X.
 *
-*                    Multiply right singular vectors of L in WORK(IR) by
-*                    Q in VT, storing result in A
-*                    (CWorkspace: need M*M)
-*                    (RWorkspace: 0)
+  120 CONTINUE
+      TEMP = TWO*( DZSUM1( N, X, 1 ) / DBLE( 3*N ) )
+      IF( TEMP.GT.EST ) THEN
+         CALL ZCOPY( N, X, 1, V, 1 )
+         EST = TEMP
+      END IF
 *
-                     CALL ZGEMM( 'N', 'N', M, N, M, CONE, WORK( IR ),
-     $                           LDWRKR, VT, LDVT, CZERO, A, LDA )
+  130 CONTINUE
+      KASE = 0
+      RETURN
 *
-*                    Copy right singular vectors of A from A to VT
+*     End of ZLACN2
 *
-                     CALL ZLACPY( 'F', M, N, A, LDA, VT, LDVT )
+      END
+*> \brief \b ZLACP2 copies all or part of a real two-dimensional array to a complex array.
 *
-                  ELSE
+*  =========== DOCUMENTATION ===========
 *
-*                    Insufficient workspace for a fast algorithm
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
-                     ITAU = 1
-                     IWORK = ITAU + M
+*> \htmlonly
+*> Download ZLACP2 + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/zlacp2.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/zlacp2.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/zlacp2.f">
+*> [TXT]</a>
+*> \endhtmlonly
 *
-*                    Compute A=L*Q, copying result to VT
-*                    (CWorkspace: need 2*M, prefer M+M*NB)
-*                    (RWorkspace: 0)
+*  Definition:
+*  ===========
 *
-                     CALL ZGELQF( M, N, A, LDA, WORK( ITAU ),
-     $                            WORK( IWORK ), LWORK-IWORK+1, IERR )
-                     CALL ZLACPY( 'U', M, N, A, LDA, VT, LDVT )
+*       SUBROUTINE ZLACP2( UPLO, M, N, A, LDA, B, LDB )
 *
-*                    Generate Q in VT
-*                    (CWorkspace: need M+N, prefer M+N*NB)
-*                    (RWorkspace: 0)
+*       .. Scalar Arguments ..
+*       CHARACTER          UPLO
+*       INTEGER            LDA, LDB, M, N
+*       ..
+*       .. Array Arguments ..
+*       DOUBLE PRECISION   A( LDA, * )
+*       COMPLEX*16         B( LDB, * )
+*       ..
 *
-                     CALL ZUNGLQ( N, N, M, VT, LDVT, WORK( ITAU ),
-     $                            WORK( IWORK ), LWORK-IWORK+1, IERR )
-                     IE = 1
-                     ITAUQ = ITAU
-                     ITAUP = ITAUQ + M
-                     IWORK = ITAUP + M
 *
-*                    Zero out above L in A
+*> \par Purpose:
+*  =============
+*>
+*> \verbatim
+*>
+*> ZLACP2 copies all or part of a real two-dimensional matrix A to a
+*> complex matrix B.
+*> \endverbatim
 *
-                     CALL ZLASET( 'U', M-1, M-1, CZERO, CZERO,
-     $                            A( 1, 2 ), LDA )
+*  Arguments:
+*  ==========
 *
-*                    Bidiagonalize L in A
-*                    (CWorkspace: need 3*M, prefer 2*M+2*M*NB)
-*                    (RWorkspace: need M)
+*> \param[in] UPLO
+*> \verbatim
+*>          UPLO is CHARACTER*1
+*>          Specifies the part of the matrix A to be copied to B.
+*>          = 'U':      Upper triangular part
+*>          = 'L':      Lower triangular part
+*>          Otherwise:  All of the matrix A
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*>          M is INTEGER
+*>          The number of rows of the matrix A.  M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*>          N is INTEGER
+*>          The number of columns of the matrix A.  N >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*>          A is DOUBLE PRECISION array, dimension (LDA,N)
+*>          The m by n matrix A.  If UPLO = 'U', only the upper trapezium
+*>          is accessed; if UPLO = 'L', only the lower trapezium is
+*>          accessed.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*>          LDA is INTEGER
+*>          The leading dimension of the array A.  LDA >= max(1,M).
+*> \endverbatim
+*>
+*> \param[out] B
+*> \verbatim
+*>          B is COMPLEX*16 array, dimension (LDB,N)
+*>          On exit, B = A in the locations specified by UPLO.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*>          LDB is INTEGER
+*>          The leading dimension of the array B.  LDB >= max(1,M).
+*> \endverbatim
 *
-                     CALL ZGEBRD( M, M, A, LDA, S, RWORK( IE ),
-     $                            WORK( ITAUQ ), WORK( ITAUP ),
-     $                            WORK( IWORK ), LWORK-IWORK+1, IERR )
+*  Authors:
+*  ========
 *
-*                    Multiply right bidiagonalizing vectors in A by Q
-*                    in VT
-*                    (CWorkspace: need 2*M+N, prefer 2*M+N*NB)
-*                    (RWorkspace: 0)
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-                     CALL ZUNMBR( 'P', 'L', 'C', M, N, M, A, LDA,
-     $                            WORK( ITAUP ), VT, LDVT,
-     $                            WORK( IWORK ), LWORK-IWORK+1, IERR )
-                     IRWORK = IE + M
+*> \date December 2016
 *
-*                    Perform bidiagonal QR iteration, computing right
-*                    singular vectors of A in VT
-*                    (CWorkspace: 0)
-*                    (RWorkspace: need BDSPAC)
+*> \ingroup complex16OTHERauxiliary
 *
-                     CALL ZBDSQR( 'U', M, N, 0, 0, S, RWORK( IE ), VT,
-     $                            LDVT, CDUM, 1, CDUM, 1,
-     $                            RWORK( IRWORK ), INFO )
+*  =====================================================================
+      SUBROUTINE ZLACP2( UPLO, M, N, A, LDA, B, LDB )
 *
-                  END IF
+*  -- LAPACK auxiliary routine (version 3.7.0) --
+*  -- LAPACK is a software package provided by Univ. of Tennessee,    --
+*  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+*     December 2016
 *
-               ELSE IF( WNTUO ) THEN
+*     .. Scalar Arguments ..
+      CHARACTER          UPLO
+      INTEGER            LDA, LDB, M, N
+*     ..
+*     .. Array Arguments ..
+      DOUBLE PRECISION   A( LDA, * )
+      COMPLEX*16         B( LDB, * )
+*     ..
 *
-*                 Path 8t(N much larger than M, JOBU='O', JOBVT='A')
-*                 N right singular vectors to be computed in VT and
-*                 M left singular vectors to be overwritten on A
+*  =====================================================================
 *
-                  IF( LWORK.GE.2*M*M+MAX( N+M, 3*M ) ) THEN
+*     .. Local Scalars ..
+      INTEGER            I, J
+*     ..
+*     .. External Functions ..
+      LOGICAL            LSAME
+      EXTERNAL           LSAME
+*     ..
+*     .. Intrinsic Functions ..
+      INTRINSIC          MIN
+*     ..
+*     .. Executable Statements ..
 *
-*                    Sufficient workspace for a fast algorithm
+      IF( LSAME( UPLO, 'U' ) ) THEN
+         DO 20 J = 1, N
+            DO 10 I = 1, MIN( J, M )
+               B( I, J ) = A( I, J )
+   10       CONTINUE
+   20    CONTINUE
 *
-                     IU = 1
-                     IF( LWORK.GE.WRKBL+2*LDA*M ) THEN
+      ELSE IF( LSAME( UPLO, 'L' ) ) THEN
+         DO 40 J = 1, N
+            DO 30 I = J, M
+               B( I, J ) = A( I, J )
+   30       CONTINUE
+   40    CONTINUE
 *
-*                       WORK(IU) is LDA by M and WORK(IR) is LDA by M
+      ELSE
+         DO 60 J = 1, N
+            DO 50 I = 1, M
+               B( I, J ) = A( I, J )
+   50       CONTINUE
+   60    CONTINUE
+      END IF
 *
-                        LDWRKU = LDA
-                        IR = IU + LDWRKU*M
-                        LDWRKR = LDA
-                     ELSE IF( LWORK.GE.WRKBL+( LDA+M )*M ) THEN
+      RETURN
 *
-*                       WORK(IU) is LDA by M and WORK(IR) is M by M
+*     End of ZLACP2
 *
-                        LDWRKU = LDA
-                        IR = IU + LDWRKU*M
-                        LDWRKR = M
-                     ELSE
+      END
+*> \brief \b ZLACPY copies all or part of one two-dimensional array to another.
 *
-*                       WORK(IU) is M by M and WORK(IR) is M by M
+*  =========== DOCUMENTATION ===========
 *
-                        LDWRKU = M
-                        IR = IU + LDWRKU*M
-                        LDWRKR = M
-                     END IF
-                     ITAU = IR + LDWRKR*M
-                     IWORK = ITAU + M
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
-*                    Compute A=L*Q, copying result to VT
-*                    (CWorkspace: need 2*M*M+2*M, prefer 2*M*M+M+M*NB)
-*                    (RWorkspace: 0)
+*> \htmlonly
+*> Download ZLACPY + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/zlacpy.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/zlacpy.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/zlacpy.f">
+*> [TXT]</a>
+*> \endhtmlonly
 *
-                     CALL ZGELQF( M, N, A, LDA, WORK( ITAU ),
-     $                            WORK( IWORK ), LWORK-IWORK+1, IERR )
-                     CALL ZLACPY( 'U', M, N, A, LDA, VT, LDVT )
+*  Definition:
+*  ===========
 *
-*                    Generate Q in VT
-*                    (CWorkspace: need 2*M*M+M+N, prefer 2*M*M+M+N*NB)
-*                    (RWorkspace: 0)
+*       SUBROUTINE ZLACPY( UPLO, M, N, A, LDA, B, LDB )
 *
-                     CALL ZUNGLQ( N, N, M, VT, LDVT, WORK( ITAU ),
-     $                            WORK( IWORK ), LWORK-IWORK+1, IERR )
+*       .. Scalar Arguments ..
+*       CHARACTER          UPLO
+*       INTEGER            LDA, LDB, M, N
+*       ..
+*       .. Array Arguments ..
+*       COMPLEX*16         A( LDA, * ), B( LDB, * )
+*       ..
 *
-*                    Copy L to WORK(IU), zeroing out above it
 *
-                     CALL ZLACPY( 'L', M, M, A, LDA, WORK( IU ),
-     $                            LDWRKU )
-                     CALL ZLASET( 'U', M-1, M-1, CZERO, CZERO,
-     $                            WORK( IU+LDWRKU ), LDWRKU )
-                     IE = 1
-                     ITAUQ = ITAU
-                     ITAUP = ITAUQ + M
-                     IWORK = ITAUP + M
+*> \par Purpose:
+*  =============
+*>
+*> \verbatim
+*>
+*> ZLACPY copies all or part of a two-dimensional matrix A to another
+*> matrix B.
+*> \endverbatim
 *
-*                    Bidiagonalize L in WORK(IU), copying result to
-*                    WORK(IR)
-*                    (CWorkspace: need   2*M*M+3*M,
-*                                 prefer 2*M*M+2*M+2*M*NB)
-*                    (RWorkspace: need   M)
+*  Arguments:
+*  ==========
 *
-                     CALL ZGEBRD( M, M, WORK( IU ), LDWRKU, S,
-     $                            RWORK( IE ), WORK( ITAUQ ),
-     $                            WORK( ITAUP ), WORK( IWORK ),
-     $                            LWORK-IWORK+1, IERR )
-                     CALL ZLACPY( 'L', M, M, WORK( IU ), LDWRKU,
-     $                            WORK( IR ), LDWRKR )
+*> \param[in] UPLO
+*> \verbatim
+*>          UPLO is CHARACTER*1
+*>          Specifies the part of the matrix A to be copied to B.
+*>          = 'U':      Upper triangular part
+*>          = 'L':      Lower triangular part
+*>          Otherwise:  All of the matrix A
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*>          M is INTEGER
+*>          The number of rows of the matrix A.  M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*>          N is INTEGER
+*>          The number of columns of the matrix A.  N >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*>          A is COMPLEX*16 array, dimension (LDA,N)
+*>          The m by n matrix A.  If UPLO = 'U', only the upper trapezium
+*>          is accessed; if UPLO = 'L', only the lower trapezium is
+*>          accessed.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*>          LDA is INTEGER
+*>          The leading dimension of the array A.  LDA >= max(1,M).
+*> \endverbatim
+*>
+*> \param[out] B
+*> \verbatim
+*>          B is COMPLEX*16 array, dimension (LDB,N)
+*>          On exit, B = A in the locations specified by UPLO.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*>          LDB is INTEGER
+*>          The leading dimension of the array B.  LDB >= max(1,M).
+*> \endverbatim
 *
-*                    Generate right bidiagonalizing vectors in WORK(IU)
-*                    (CWorkspace: need   2*M*M+3*M-1,
-*                                 prefer 2*M*M+2*M+(M-1)*NB)
-*                    (RWorkspace: 0)
+*  Authors:
+*  ========
 *
-                     CALL ZUNGBR( 'P', M, M, M, WORK( IU ), LDWRKU,
-     $                            WORK( ITAUP ), WORK( IWORK ),
-     $                            LWORK-IWORK+1, IERR )
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*                    Generate left bidiagonalizing vectors in WORK(IR)
-*                    (CWorkspace: need 2*M*M+3*M, prefer 2*M*M+2*M+M*NB)
-*                    (RWorkspace: 0)
+*> \date December 2016
 *
-                     CALL ZUNGBR( 'Q', M, M, M, WORK( IR ), LDWRKR,
-     $                            WORK( ITAUQ ), WORK( IWORK ),
-     $                            LWORK-IWORK+1, IERR )
-                     IRWORK = IE + M
+*> \ingroup complex16OTHERauxiliary
 *
-*                    Perform bidiagonal QR iteration, computing left
-*                    singular vectors of L in WORK(IR) and computing
-*                    right singular vectors of L in WORK(IU)
-*                    (CWorkspace: need 2*M*M)
-*                    (RWorkspace: need BDSPAC)
+*  =====================================================================
+      SUBROUTINE ZLACPY( UPLO, M, N, A, LDA, B, LDB )
 *
-                     CALL ZBDSQR( 'U', M, M, M, 0, S, RWORK( IE ),
-     $                            WORK( IU ), LDWRKU, WORK( IR ),
-     $                            LDWRKR, CDUM, 1, RWORK( IRWORK ),
-     $                            INFO )
+*  -- LAPACK auxiliary routine (version 3.7.0) --
+*  -- LAPACK is a software package provided by Univ. of Tennessee,    --
+*  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+*     December 2016
 *
-*                    Multiply right singular vectors of L in WORK(IU) by
-*                    Q in VT, storing result in A
-*                    (CWorkspace: need M*M)
-*                    (RWorkspace: 0)
+*     .. Scalar Arguments ..
+      CHARACTER          UPLO
+      INTEGER            LDA, LDB, M, N
+*     ..
+*     .. Array Arguments ..
+      COMPLEX*16         A( LDA, * ), B( LDB, * )
+*     ..
 *
-                     CALL ZGEMM( 'N', 'N', M, N, M, CONE, WORK( IU ),
-     $                           LDWRKU, VT, LDVT, CZERO, A, LDA )
+*  =====================================================================
 *
-*                    Copy right singular vectors of A from A to VT
+*     .. Local Scalars ..
+      INTEGER            I, J
+*     ..
+*     .. External Functions ..
+      LOGICAL            LSAME
+      EXTERNAL           LSAME
+*     ..
+*     .. Intrinsic Functions ..
+      INTRINSIC          MIN
+*     ..
+*     .. Executable Statements ..
 *
-                     CALL ZLACPY( 'F', M, N, A, LDA, VT, LDVT )
+      IF( LSAME( UPLO, 'U' ) ) THEN
+         DO 20 J = 1, N
+            DO 10 I = 1, MIN( J, M )
+               B( I, J ) = A( I, J )
+   10       CONTINUE
+   20    CONTINUE
 *
-*                    Copy left singular vectors of A from WORK(IR) to A
+      ELSE IF( LSAME( UPLO, 'L' ) ) THEN
+         DO 40 J = 1, N
+            DO 30 I = J, M
+               B( I, J ) = A( I, J )
+   30       CONTINUE
+   40    CONTINUE
 *
-                     CALL ZLACPY( 'F', M, M, WORK( IR ), LDWRKR, A,
-     $                            LDA )
+      ELSE
+         DO 60 J = 1, N
+            DO 50 I = 1, M
+               B( I, J ) = A( I, J )
+   50       CONTINUE
+   60    CONTINUE
+      END IF
 *
-                  ELSE
+      RETURN
 *
-*                    Insufficient workspace for a fast algorithm
+*     End of ZLACPY
 *
-                     ITAU = 1
-                     IWORK = ITAU + M
+      END
+*> \brief \b ZLACRM multiplies a complex matrix by a square real matrix.
 *
-*                    Compute A=L*Q, copying result to VT
-*                    (CWorkspace: need 2*M, prefer M+M*NB)
-*                    (RWorkspace: 0)
+*  =========== DOCUMENTATION ===========
 *
-                     CALL ZGELQF( M, N, A, LDA, WORK( ITAU ),
-     $                            WORK( IWORK ), LWORK-IWORK+1, IERR )
-                     CALL ZLACPY( 'U', M, N, A, LDA, VT, LDVT )
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
-*                    Generate Q in VT
-*                    (CWorkspace: need M+N, prefer M+N*NB)
-*                    (RWorkspace: 0)
+*> \htmlonly
+*> Download ZLACRM + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/zlacrm.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/zlacrm.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/zlacrm.f">
+*> [TXT]</a>
+*> \endhtmlonly
 *
-                     CALL ZUNGLQ( N, N, M, VT, LDVT, WORK( ITAU ),
-     $                            WORK( IWORK ), LWORK-IWORK+1, IERR )
-                     IE = 1
-                     ITAUQ = ITAU
-                     ITAUP = ITAUQ + M
-                     IWORK = ITAUP + M
+*  Definition:
+*  ===========
 *
-*                    Zero out above L in A
+*       SUBROUTINE ZLACRM( M, N, A, LDA, B, LDB, C, LDC, RWORK )
 *
-                     CALL ZLASET( 'U', M-1, M-1, CZERO, CZERO,
-     $                            A( 1, 2 ), LDA )
+*       .. Scalar Arguments ..
+*       INTEGER            LDA, LDB, LDC, M, N
+*       ..
+*       .. Array Arguments ..
+*       DOUBLE PRECISION   B( LDB, * ), RWORK( * )
+*       COMPLEX*16         A( LDA, * ), C( LDC, * )
+*       ..
 *
-*                    Bidiagonalize L in A
-*                    (CWorkspace: need 3*M, prefer 2*M+2*M*NB)
-*                    (RWorkspace: need M)
 *
-                     CALL ZGEBRD( M, M, A, LDA, S, RWORK( IE ),
-     $                            WORK( ITAUQ ), WORK( ITAUP ),
-     $                            WORK( IWORK ), LWORK-IWORK+1, IERR )
+*> \par Purpose:
+*  =============
+*>
+*> \verbatim
+*>
+*> ZLACRM performs a very simple matrix-matrix multiplication:
+*>          C := A * B,
+*> where A is M by N and complex; B is N by N and real;
+*> C is M by N and complex.
+*> \endverbatim
 *
-*                    Multiply right bidiagonalizing vectors in A by Q
-*                    in VT
-*                    (CWorkspace: need 2*M+N, prefer 2*M+N*NB)
-*                    (RWorkspace: 0)
+*  Arguments:
+*  ==========
 *
-                     CALL ZUNMBR( 'P', 'L', 'C', M, N, M, A, LDA,
-     $                            WORK( ITAUP ), VT, LDVT,
-     $                            WORK( IWORK ), LWORK-IWORK+1, IERR )
+*> \param[in] M
+*> \verbatim
+*>          M is INTEGER
+*>          The number of rows of the matrix A and of the matrix C.
+*>          M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*>          N is INTEGER
+*>          The number of columns and rows of the matrix B and
+*>          the number of columns of the matrix C.
+*>          N >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*>          A is COMPLEX*16 array, dimension (LDA, N)
+*>          On entry, A contains the M by N matrix A.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*>          LDA is INTEGER
+*>          The leading dimension of the array A. LDA >=max(1,M).
+*> \endverbatim
+*>
+*> \param[in] B
+*> \verbatim
+*>          B is DOUBLE PRECISION array, dimension (LDB, N)
+*>          On entry, B contains the N by N matrix B.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*>          LDB is INTEGER
+*>          The leading dimension of the array B. LDB >=max(1,N).
+*> \endverbatim
+*>
+*> \param[out] C
+*> \verbatim
+*>          C is COMPLEX*16 array, dimension (LDC, N)
+*>          On exit, C contains the M by N matrix C.
+*> \endverbatim
+*>
+*> \param[in] LDC
+*> \verbatim
+*>          LDC is INTEGER
+*>          The leading dimension of the array C. LDC >=max(1,N).
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*>          RWORK is DOUBLE PRECISION array, dimension (2*M*N)
+*> \endverbatim
 *
-*                    Generate left bidiagonalizing vectors in A
-*                    (CWorkspace: need 3*M, prefer 2*M+M*NB)
-*                    (RWorkspace: 0)
+*  Authors:
+*  ========
 *
-                     CALL ZUNGBR( 'Q', M, M, M, A, LDA, WORK( ITAUQ ),
-     $                            WORK( IWORK ), LWORK-IWORK+1, IERR )
-                     IRWORK = IE + M
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*                    Perform bidiagonal QR iteration, computing left
-*                    singular vectors of A in A and computing right
-*                    singular vectors of A in VT
-*                    (CWorkspace: 0)
-*                    (RWorkspace: need BDSPAC)
+*> \date December 2016
 *
-                     CALL ZBDSQR( 'U', M, N, M, 0, S, RWORK( IE ), VT,
-     $                            LDVT, A, LDA, CDUM, 1,
-     $                            RWORK( IRWORK ), INFO )
+*> \ingroup complex16OTHERauxiliary
 *
-                  END IF
+*  =====================================================================
+      SUBROUTINE ZLACRM( M, N, A, LDA, B, LDB, C, LDC, RWORK )
 *
-               ELSE IF( WNTUAS ) THEN
+*  -- LAPACK auxiliary routine (version 3.7.0) --
+*  -- LAPACK is a software package provided by Univ. of Tennessee,    --
+*  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+*     December 2016
 *
-*                 Path 9t(N much larger than M, JOBU='S' or 'A',
-*                         JOBVT='A')
-*                 N right singular vectors to be computed in VT and
-*                 M left singular vectors to be computed in U
+*     .. Scalar Arguments ..
+      INTEGER            LDA, LDB, LDC, M, N
+*     ..
+*     .. Array Arguments ..
+      DOUBLE PRECISION   B( LDB, * ), RWORK( * )
+      COMPLEX*16         A( LDA, * ), C( LDC, * )
+*     ..
 *
-                  IF( LWORK.GE.M*M+MAX( N+M, 3*M ) ) THEN
+*  =====================================================================
 *
-*                    Sufficient workspace for a fast algorithm
+*     .. Parameters ..
+      DOUBLE PRECISION   ONE, ZERO
+      PARAMETER          ( ONE = 1.0D0, ZERO = 0.0D0 )
+*     ..
+*     .. Local Scalars ..
+      INTEGER            I, J, L
+*     ..
+*     .. Intrinsic Functions ..
+      INTRINSIC          DBLE, DCMPLX, DIMAG
+*     ..
+*     .. External Subroutines ..
+      EXTERNAL           DGEMM
+*     ..
+*     .. Executable Statements ..
 *
-                     IU = 1
-                     IF( LWORK.GE.WRKBL+LDA*M ) THEN
+*     Quick return if possible.
 *
-*                       WORK(IU) is LDA by M
+      IF( ( M.EQ.0 ) .OR. ( N.EQ.0 ) )
+     $   RETURN
 *
-                        LDWRKU = LDA
-                     ELSE
+      DO 20 J = 1, N
+         DO 10 I = 1, M
+            RWORK( ( J-1 )*M+I ) = DBLE( A( I, J ) )
+   10    CONTINUE
+   20 CONTINUE
 *
-*                       WORK(IU) is M by M
+      L = M*N + 1
+      CALL DGEMM( 'N', 'N', M, N, N, ONE, RWORK, M, B, LDB, ZERO,
+     $            RWORK( L ), M )
+      DO 40 J = 1, N
+         DO 30 I = 1, M
+            C( I, J ) = RWORK( L+( J-1 )*M+I-1 )
+   30    CONTINUE
+   40 CONTINUE
 *
-                        LDWRKU = M
-                     END IF
-                     ITAU = IU + LDWRKU*M
-                     IWORK = ITAU + M
+      DO 60 J = 1, N
+         DO 50 I = 1, M
+            RWORK( ( J-1 )*M+I ) = DIMAG( A( I, J ) )
+   50    CONTINUE
+   60 CONTINUE
+      CALL DGEMM( 'N', 'N', M, N, N, ONE, RWORK, M, B, LDB, ZERO,
+     $            RWORK( L ), M )
+      DO 80 J = 1, N
+         DO 70 I = 1, M
+            C( I, J ) = DCMPLX( DBLE( C( I, J ) ),
+     $                  RWORK( L+( J-1 )*M+I-1 ) )
+   70    CONTINUE
+   80 CONTINUE
 *
-*                    Compute A=L*Q, copying result to VT
-*                    (CWorkspace: need M*M+2*M, prefer M*M+M+M*NB)
-*                    (RWorkspace: 0)
+      RETURN
 *
-                     CALL ZGELQF( M, N, A, LDA, WORK( ITAU ),
-     $                            WORK( IWORK ), LWORK-IWORK+1, IERR )
-                     CALL ZLACPY( 'U', M, N, A, LDA, VT, LDVT )
+*     End of ZLACRM
 *
-*                    Generate Q in VT
-*                    (CWorkspace: need M*M+M+N, prefer M*M+M+N*NB)
-*                    (RWorkspace: 0)
+      END
+*> \brief \b ZLADIV performs complex division in real arithmetic, avoiding unnecessary overflow.
 *
-                     CALL ZUNGLQ( N, N, M, VT, LDVT, WORK( ITAU ),
-     $                            WORK( IWORK ), LWORK-IWORK+1, IERR )
+*  =========== DOCUMENTATION ===========
 *
-*                    Copy L to WORK(IU), zeroing out above it
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
-                     CALL ZLACPY( 'L', M, M, A, LDA, WORK( IU ),
-     $                            LDWRKU )
-                     CALL ZLASET( 'U', M-1, M-1, CZERO, CZERO,
-     $                            WORK( IU+LDWRKU ), LDWRKU )
-                     IE = 1
-                     ITAUQ = ITAU
-                     ITAUP = ITAUQ + M
-                     IWORK = ITAUP + M
+*> \htmlonly
+*> Download ZLADIV + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/zladiv.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/zladiv.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/zladiv.f">
+*> [TXT]</a>
+*> \endhtmlonly
 *
-*                    Bidiagonalize L in WORK(IU), copying result to U
-*                    (CWorkspace: need M*M+3*M, prefer M*M+2*M+2*M*NB)
-*                    (RWorkspace: need M)
+*  Definition:
+*  ===========
 *
-                     CALL ZGEBRD( M, M, WORK( IU ), LDWRKU, S,
-     $                            RWORK( IE ), WORK( ITAUQ ),
-     $                            WORK( ITAUP ), WORK( IWORK ),
-     $                            LWORK-IWORK+1, IERR )
-                     CALL ZLACPY( 'L', M, M, WORK( IU ), LDWRKU, U,
-     $                            LDU )
+*       COMPLEX*16     FUNCTION ZLADIV( X, Y )
 *
-*                    Generate right bidiagonalizing vectors in WORK(IU)
-*                    (CWorkspace: need M*M+3*M, prefer M*M+2*M+(M-1)*NB)
-*                    (RWorkspace: 0)
+*       .. Scalar Arguments ..
+*       COMPLEX*16         X, Y
+*       ..
 *
-                     CALL ZUNGBR( 'P', M, M, M, WORK( IU ), LDWRKU,
-     $                            WORK( ITAUP ), WORK( IWORK ),
-     $                            LWORK-IWORK+1, IERR )
 *
-*                    Generate left bidiagonalizing vectors in U
-*                    (CWorkspace: need M*M+3*M, prefer M*M+2*M+M*NB)
-*                    (RWorkspace: 0)
+*> \par Purpose:
+*  =============
+*>
+*> \verbatim
+*>
+*> ZLADIV := X / Y, where X and Y are complex.  The computation of X / Y
+*> will not overflow on an intermediary step unless the results
+*> overflows.
+*> \endverbatim
 *
-                     CALL ZUNGBR( 'Q', M, M, M, U, LDU, WORK( ITAUQ ),
-     $                            WORK( IWORK ), LWORK-IWORK+1, IERR )
-                     IRWORK = IE + M
+*  Arguments:
+*  ==========
 *
-*                    Perform bidiagonal QR iteration, computing left
-*                    singular vectors of L in U and computing right
-*                    singular vectors of L in WORK(IU)
-*                    (CWorkspace: need M*M)
-*                    (RWorkspace: need BDSPAC)
+*> \param[in] X
+*> \verbatim
+*>          X is COMPLEX*16
+*> \endverbatim
+*>
+*> \param[in] Y
+*> \verbatim
+*>          Y is COMPLEX*16
+*>          The complex scalars X and Y.
+*> \endverbatim
 *
-                     CALL ZBDSQR( 'U', M, M, M, 0, S, RWORK( IE ),
-     $                            WORK( IU ), LDWRKU, U, LDU, CDUM, 1,
-     $                            RWORK( IRWORK ), INFO )
+*  Authors:
+*  ========
 *
-*                    Multiply right singular vectors of L in WORK(IU) by
-*                    Q in VT, storing result in A
-*                    (CWorkspace: need M*M)
-*                    (RWorkspace: 0)
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-                     CALL ZGEMM( 'N', 'N', M, N, M, CONE, WORK( IU ),
-     $                           LDWRKU, VT, LDVT, CZERO, A, LDA )
+*> \date December 2016
 *
-*                    Copy right singular vectors of A from A to VT
+*> \ingroup complex16OTHERauxiliary
 *
-                     CALL ZLACPY( 'F', M, N, A, LDA, VT, LDVT )
+*  =====================================================================
+      COMPLEX*16     FUNCTION ZLADIV( X, Y )
 *
-                  ELSE
+*  -- LAPACK auxiliary routine (version 3.7.0) --
+*  -- LAPACK is a software package provided by Univ. of Tennessee,    --
+*  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+*     December 2016
 *
-*                    Insufficient workspace for a fast algorithm
+*     .. Scalar Arguments ..
+      COMPLEX*16         X, Y
+*     ..
 *
-                     ITAU = 1
-                     IWORK = ITAU + M
+*  =====================================================================
 *
-*                    Compute A=L*Q, copying result to VT
-*                    (CWorkspace: need 2*M, prefer M+M*NB)
-*                    (RWorkspace: 0)
+*     .. Local Scalars ..
+      DOUBLE PRECISION   ZI, ZR
+*     ..
+*     .. External Subroutines ..
+      EXTERNAL           DLADIV
+*     ..
+*     .. Intrinsic Functions ..
+      INTRINSIC          DBLE, DCMPLX, DIMAG
+*     ..
+*     .. Executable Statements ..
 *
-                     CALL ZGELQF( M, N, A, LDA, WORK( ITAU ),
-     $                            WORK( IWORK ), LWORK-IWORK+1, IERR )
-                     CALL ZLACPY( 'U', M, N, A, LDA, VT, LDVT )
+      CALL DLADIV( DBLE( X ), DIMAG( X ), DBLE( Y ), DIMAG( Y ), ZR,
+     $             ZI )
+      ZLADIV = DCMPLX( ZR, ZI )
 *
-*                    Generate Q in VT
-*                    (CWorkspace: need M+N, prefer M+N*NB)
-*                    (RWorkspace: 0)
+      RETURN
 *
-                     CALL ZUNGLQ( N, N, M, VT, LDVT, WORK( ITAU ),
-     $                            WORK( IWORK ), LWORK-IWORK+1, IERR )
+*     End of ZLADIV
 *
-*                    Copy L to U, zeroing out above it
+      END
+*> \brief \b ZLAED0 used by sstedc. Computes all eigenvalues and corresponding eigenvectors of an unreduced symmetric tridiagonal matrix using the divide and conquer method.
 *
-                     CALL ZLACPY( 'L', M, M, A, LDA, U, LDU )
-                     CALL ZLASET( 'U', M-1, M-1, CZERO, CZERO,
-     $                            U( 1, 2 ), LDU )
-                     IE = 1
-                     ITAUQ = ITAU
-                     ITAUP = ITAUQ + M
-                     IWORK = ITAUP + M
+*  =========== DOCUMENTATION ===========
 *
-*                    Bidiagonalize L in U
-*                    (CWorkspace: need 3*M, prefer 2*M+2*M*NB)
-*                    (RWorkspace: need M)
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
-                     CALL ZGEBRD( M, M, U, LDU, S, RWORK( IE ),
-     $                            WORK( ITAUQ ), WORK( ITAUP ),
-     $                            WORK( IWORK ), LWORK-IWORK+1, IERR )
+*> \htmlonly
+*> Download ZLAED0 + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/zlaed0.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/zlaed0.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/zlaed0.f">
+*> [TXT]</a>
+*> \endhtmlonly
 *
-*                    Multiply right bidiagonalizing vectors in U by Q
-*                    in VT
-*                    (CWorkspace: need 2*M+N, prefer 2*M+N*NB)
-*                    (RWorkspace: 0)
+*  Definition:
+*  ===========
 *
-                     CALL ZUNMBR( 'P', 'L', 'C', M, N, M, U, LDU,
-     $                            WORK( ITAUP ), VT, LDVT,
-     $                            WORK( IWORK ), LWORK-IWORK+1, IERR )
+*       SUBROUTINE ZLAED0( QSIZ, N, D, E, Q, LDQ, QSTORE, LDQS, RWORK,
+*                          IWORK, INFO )
 *
-*                    Generate left bidiagonalizing vectors in U
-*                    (CWorkspace: need 3*M, prefer 2*M+M*NB)
-*                    (RWorkspace: 0)
+*       .. Scalar Arguments ..
+*       INTEGER            INFO, LDQ, LDQS, N, QSIZ
+*       ..
+*       .. Array Arguments ..
+*       INTEGER            IWORK( * )
+*       DOUBLE PRECISION   D( * ), E( * ), RWORK( * )
+*       COMPLEX*16         Q( LDQ, * ), QSTORE( LDQS, * )
+*       ..
 *
-                     CALL ZUNGBR( 'Q', M, M, M, U, LDU, WORK( ITAUQ ),
-     $                            WORK( IWORK ), LWORK-IWORK+1, IERR )
-                     IRWORK = IE + M
 *
-*                    Perform bidiagonal QR iteration, computing left
-*                    singular vectors of A in U and computing right
-*                    singular vectors of A in VT
-*                    (CWorkspace: 0)
-*                    (RWorkspace: need BDSPAC)
+*> \par Purpose:
+*  =============
+*>
+*> \verbatim
+*>
+*> Using the divide and conquer method, ZLAED0 computes all eigenvalues
+*> of a symmetric tridiagonal matrix which is one diagonal block of
+*> those from reducing a dense or band Hermitian matrix and
+*> corresponding eigenvectors of the dense or band matrix.
+*> \endverbatim
 *
-                     CALL ZBDSQR( 'U', M, N, M, 0, S, RWORK( IE ), VT,
-     $                            LDVT, U, LDU, CDUM, 1,
-     $                            RWORK( IRWORK ), INFO )
+*  Arguments:
+*  ==========
 *
-                  END IF
+*> \param[in] QSIZ
+*> \verbatim
+*>          QSIZ is INTEGER
+*>         The dimension of the unitary matrix used to reduce
+*>         the full matrix to tridiagonal form.  QSIZ >= N if ICOMPQ = 1.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*>          N is INTEGER
+*>         The dimension of the symmetric tridiagonal matrix.  N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] D
+*> \verbatim
+*>          D is DOUBLE PRECISION array, dimension (N)
+*>         On entry, the diagonal elements of the tridiagonal matrix.
+*>         On exit, the eigenvalues in ascending order.
+*> \endverbatim
+*>
+*> \param[in,out] E
+*> \verbatim
+*>          E is DOUBLE PRECISION array, dimension (N-1)
+*>         On entry, the off-diagonal elements of the tridiagonal matrix.
+*>         On exit, E has been destroyed.
+*> \endverbatim
+*>
+*> \param[in,out] Q
+*> \verbatim
+*>          Q is COMPLEX*16 array, dimension (LDQ,N)
+*>         On entry, Q must contain an QSIZ x N matrix whose columns
+*>         unitarily orthonormal. It is a part of the unitary matrix
+*>         that reduces the full dense Hermitian matrix to a
+*>         (reducible) symmetric tridiagonal matrix.
+*> \endverbatim
+*>
+*> \param[in] LDQ
+*> \verbatim
+*>          LDQ is INTEGER
+*>         The leading dimension of the array Q.  LDQ >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*>          IWORK is INTEGER array,
+*>         the dimension of IWORK must be at least
+*>                      6 + 6*N + 5*N*lg N
+*>                      ( lg( N ) = smallest integer k
+*>                                  such that 2^k >= N )
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*>          RWORK is DOUBLE PRECISION array,
+*>                               dimension (1 + 3*N + 2*N*lg N + 3*N**2)
+*>                        ( lg( N ) = smallest integer k
+*>                                    such that 2^k >= N )
+*> \endverbatim
+*>
+*> \param[out] QSTORE
+*> \verbatim
+*>          QSTORE is COMPLEX*16 array, dimension (LDQS, N)
+*>         Used to store parts of
+*>         the eigenvector matrix when the updating matrix multiplies
+*>         take place.
+*> \endverbatim
+*>
+*> \param[in] LDQS
+*> \verbatim
+*>          LDQS is INTEGER
+*>         The leading dimension of the array QSTORE.
+*>         LDQS >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*>          INFO is INTEGER
+*>          = 0:  successful exit.
+*>          < 0:  if INFO = -i, the i-th argument had an illegal value.
+*>          > 0:  The algorithm failed to compute an eigenvalue while
+*>                working on the submatrix lying in rows and columns
+*>                INFO/(N+1) through mod(INFO,N+1).
+*> \endverbatim
 *
-               END IF
+*  Authors:
+*  ========
 *
-            END IF
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-         ELSE
+*> \date December 2016
 *
-*           N .LT. MNTHR
+*> \ingroup complex16OTHERcomputational
 *
-*           Path 10t(N greater than M, but not much larger)
-*           Reduce to bidiagonal form without LQ decomposition
+*  =====================================================================
+      SUBROUTINE ZLAED0( QSIZ, N, D, E, Q, LDQ, QSTORE, LDQS, RWORK,
+     $                   IWORK, INFO )
 *
-            IE = 1
-            ITAUQ = 1
-            ITAUP = ITAUQ + M
-            IWORK = ITAUP + M
+*  -- LAPACK computational routine (version 3.7.0) --
+*  -- LAPACK is a software package provided by Univ. of Tennessee,    --
+*  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+*     December 2016
 *
-*           Bidiagonalize A
-*           (CWorkspace: need 2*M+N, prefer 2*M+(M+N)*NB)
-*           (RWorkspace: M)
+*     .. Scalar Arguments ..
+      INTEGER            INFO, LDQ, LDQS, N, QSIZ
+*     ..
+*     .. Array Arguments ..
+      INTEGER            IWORK( * )
+      DOUBLE PRECISION   D( * ), E( * ), RWORK( * )
+      COMPLEX*16         Q( LDQ, * ), QSTORE( LDQS, * )
+*     ..
 *
-            CALL ZGEBRD( M, N, A, LDA, S, RWORK( IE ), WORK( ITAUQ ),
-     $                   WORK( ITAUP ), WORK( IWORK ), LWORK-IWORK+1,
-     $                   IERR )
-            IF( WNTUAS ) THEN
+*  =====================================================================
 *
-*              If left singular vectors desired in U, copy result to U
-*              and generate left bidiagonalizing vectors in U
-*              (CWorkspace: need 3*M-1, prefer 2*M+(M-1)*NB)
-*              (RWorkspace: 0)
+*  Warning:      N could be as big as QSIZ!
 *
-               CALL ZLACPY( 'L', M, M, A, LDA, U, LDU )
-               CALL ZUNGBR( 'Q', M, M, N, U, LDU, WORK( ITAUQ ),
-     $                      WORK( IWORK ), LWORK-IWORK+1, IERR )
-            END IF
-            IF( WNTVAS ) THEN
+*     .. Parameters ..
+      DOUBLE PRECISION   TWO
+      PARAMETER          ( TWO = 2.D+0 )
+*     ..
+*     .. Local Scalars ..
+      INTEGER            CURLVL, CURPRB, CURR, I, IGIVCL, IGIVNM,
+     $                   IGIVPT, INDXQ, IPERM, IPRMPT, IQ, IQPTR, IWREM,
+     $                   J, K, LGN, LL, MATSIZ, MSD2, SMLSIZ, SMM1,
+     $                   SPM1, SPM2, SUBMAT, SUBPBS, TLVLS
+      DOUBLE PRECISION   TEMP
+*     ..
+*     .. External Subroutines ..
+      EXTERNAL           DCOPY, DSTEQR, XERBLA, ZCOPY, ZLACRM, ZLAED7
+*     ..
+*     .. External Functions ..
+      INTEGER            ILAENV
+      EXTERNAL           ILAENV
+*     ..
+*     .. Intrinsic Functions ..
+      INTRINSIC          ABS, DBLE, INT, LOG, MAX
+*     ..
+*     .. Executable Statements ..
 *
-*              If right singular vectors desired in VT, copy result to
-*              VT and generate right bidiagonalizing vectors in VT
-*              (CWorkspace: need 2*M+NRVT, prefer 2*M+NRVT*NB)
-*              (RWorkspace: 0)
+*     Test the input parameters.
 *
-               CALL ZLACPY( 'U', M, N, A, LDA, VT, LDVT )
-               IF( WNTVA )
-     $            NRVT = N
-               IF( WNTVS )
-     $            NRVT = M
-               CALL ZUNGBR( 'P', NRVT, N, M, VT, LDVT, WORK( ITAUP ),
-     $                      WORK( IWORK ), LWORK-IWORK+1, IERR )
-            END IF
-            IF( WNTUO ) THEN
+      INFO = 0
 *
-*              If left singular vectors desired in A, generate left
-*              bidiagonalizing vectors in A
-*              (CWorkspace: need 3*M-1, prefer 2*M+(M-1)*NB)
-*              (RWorkspace: 0)
+*     IF( ICOMPQ .LT. 0 .OR. ICOMPQ .GT. 2 ) THEN
+*        INFO = -1
+*     ELSE IF( ( ICOMPQ .EQ. 1 ) .AND. ( QSIZ .LT. MAX( 0, N ) ) )
+*    $        THEN
+      IF( QSIZ.LT.MAX( 0, N ) ) THEN
+         INFO = -1
+      ELSE IF( N.LT.0 ) THEN
+         INFO = -2
+      ELSE IF( LDQ.LT.MAX( 1, N ) ) THEN
+         INFO = -6
+      ELSE IF( LDQS.LT.MAX( 1, N ) ) THEN
+         INFO = -8
+      END IF
+      IF( INFO.NE.0 ) THEN
+         CALL XERBLA( 'ZLAED0', -INFO )
+         RETURN
+      END IF
 *
-               CALL ZUNGBR( 'Q', M, M, N, A, LDA, WORK( ITAUQ ),
-     $                      WORK( IWORK ), LWORK-IWORK+1, IERR )
-            END IF
-            IF( WNTVO ) THEN
+*     Quick return if possible
 *
-*              If right singular vectors desired in A, generate right
-*              bidiagonalizing vectors in A
-*              (CWorkspace: need 3*M, prefer 2*M+M*NB)
-*              (RWorkspace: 0)
+      IF( N.EQ.0 )
+     $   RETURN
 *
-               CALL ZUNGBR( 'P', M, N, M, A, LDA, WORK( ITAUP ),
-     $                      WORK( IWORK ), LWORK-IWORK+1, IERR )
-            END IF
-            IRWORK = IE + M
-            IF( WNTUAS .OR. WNTUO )
-     $         NRU = M
-            IF( WNTUN )
-     $         NRU = 0
-            IF( WNTVAS .OR. WNTVO )
-     $         NCVT = N
-            IF( WNTVN )
-     $         NCVT = 0
-            IF( ( .NOT.WNTUO ) .AND. ( .NOT.WNTVO ) ) THEN
+      SMLSIZ = ILAENV( 9, 'ZLAED0', ' ', 0, 0, 0, 0 )
 *
-*              Perform bidiagonal QR iteration, if desired, computing
-*              left singular vectors in U and computing right singular
-*              vectors in VT
-*              (CWorkspace: 0)
-*              (RWorkspace: need BDSPAC)
+*     Determine the size and placement of the submatrices, and save in
+*     the leading elements of IWORK.
 *
-               CALL ZBDSQR( 'L', M, NCVT, NRU, 0, S, RWORK( IE ), VT,
-     $                      LDVT, U, LDU, CDUM, 1, RWORK( IRWORK ),
-     $                      INFO )
-            ELSE IF( ( .NOT.WNTUO ) .AND. WNTVO ) THEN
+      IWORK( 1 ) = N
+      SUBPBS = 1
+      TLVLS = 0
+   10 CONTINUE
+      IF( IWORK( SUBPBS ).GT.SMLSIZ ) THEN
+         DO 20 J = SUBPBS, 1, -1
+            IWORK( 2*J ) = ( IWORK( J )+1 ) / 2
+            IWORK( 2*J-1 ) = IWORK( J ) / 2
+   20    CONTINUE
+         TLVLS = TLVLS + 1
+         SUBPBS = 2*SUBPBS
+         GO TO 10
+      END IF
+      DO 30 J = 2, SUBPBS
+         IWORK( J ) = IWORK( J ) + IWORK( J-1 )
+   30 CONTINUE
 *
-*              Perform bidiagonal QR iteration, if desired, computing
-*              left singular vectors in U and computing right singular
-*              vectors in A
-*              (CWorkspace: 0)
-*              (RWorkspace: need BDSPAC)
+*     Divide the matrix into SUBPBS submatrices of size at most SMLSIZ+1
+*     using rank-1 modifications (cuts).
 *
-               CALL ZBDSQR( 'L', M, NCVT, NRU, 0, S, RWORK( IE ), A,
-     $                      LDA, U, LDU, CDUM, 1, RWORK( IRWORK ),
-     $                      INFO )
-            ELSE
+      SPM1 = SUBPBS - 1
+      DO 40 I = 1, SPM1
+         SUBMAT = IWORK( I ) + 1
+         SMM1 = SUBMAT - 1
+         D( SMM1 ) = D( SMM1 ) - ABS( E( SMM1 ) )
+         D( SUBMAT ) = D( SUBMAT ) - ABS( E( SMM1 ) )
+   40 CONTINUE
 *
-*              Perform bidiagonal QR iteration, if desired, computing
-*              left singular vectors in A and computing right singular
-*              vectors in VT
-*              (CWorkspace: 0)
-*              (RWorkspace: need BDSPAC)
+      INDXQ = 4*N + 3
+*
+*     Set up workspaces for eigenvalues only/accumulate new vectors
+*     routine
+*
+      TEMP = LOG( DBLE( N ) ) / LOG( TWO )
+      LGN = INT( TEMP )
+      IF( 2**LGN.LT.N )
+     $   LGN = LGN + 1
+      IF( 2**LGN.LT.N )
+     $   LGN = LGN + 1
+      IPRMPT = INDXQ + N + 1
+      IPERM = IPRMPT + N*LGN
+      IQPTR = IPERM + N*LGN
+      IGIVPT = IQPTR + N + 2
+      IGIVCL = IGIVPT + N*LGN
+*
+      IGIVNM = 1
+      IQ = IGIVNM + 2*N*LGN
+      IWREM = IQ + N**2 + 1
+*     Initialize pointers
+      DO 50 I = 0, SUBPBS
+         IWORK( IPRMPT+I ) = 1
+         IWORK( IGIVPT+I ) = 1
+   50 CONTINUE
+      IWORK( IQPTR ) = 1
 *
-               CALL ZBDSQR( 'L', M, NCVT, NRU, 0, S, RWORK( IE ), VT,
-     $                      LDVT, A, LDA, CDUM, 1, RWORK( IRWORK ),
-     $                      INFO )
-            END IF
+*     Solve each submatrix eigenproblem at the bottom of the divide and
+*     conquer tree.
 *
+      CURR = 0
+      DO 70 I = 0, SPM1
+         IF( I.EQ.0 ) THEN
+            SUBMAT = 1
+            MATSIZ = IWORK( 1 )
+         ELSE
+            SUBMAT = IWORK( I ) + 1
+            MATSIZ = IWORK( I+1 ) - IWORK( I )
          END IF
+         LL = IQ - 1 + IWORK( IQPTR+CURR )
+         CALL DSTEQR( 'I', MATSIZ, D( SUBMAT ), E( SUBMAT ),
+     $                RWORK( LL ), MATSIZ, RWORK, INFO )
+         CALL ZLACRM( QSIZ, MATSIZ, Q( 1, SUBMAT ), LDQ, RWORK( LL ),
+     $                MATSIZ, QSTORE( 1, SUBMAT ), LDQS,
+     $                RWORK( IWREM ) )
+         IWORK( IQPTR+CURR+1 ) = IWORK( IQPTR+CURR ) + MATSIZ**2
+         CURR = CURR + 1
+         IF( INFO.GT.0 ) THEN
+            INFO = SUBMAT*( N+1 ) + SUBMAT + MATSIZ - 1
+            RETURN
+         END IF
+         K = 1
+         DO 60 J = SUBMAT, IWORK( I+1 )
+            IWORK( INDXQ+J ) = K
+            K = K + 1
+   60    CONTINUE
+   70 CONTINUE
 *
-      END IF
+*     Successively merge eigensystems of adjacent submatrices
+*     into eigensystem for the corresponding larger matrix.
 *
-*     Undo scaling if necessary
+*     while ( SUBPBS > 1 )
 *
-      IF( ISCL.EQ.1 ) THEN
-         IF( ANRM.GT.BIGNUM )
-     $      CALL DLASCL( 'G', 0, 0, BIGNUM, ANRM, MINMN, 1, S, MINMN,
-     $                   IERR )
-         IF( INFO.NE.0 .AND. ANRM.GT.BIGNUM )
-     $      CALL DLASCL( 'G', 0, 0, BIGNUM, ANRM, MINMN-1, 1,
-     $                   RWORK( IE ), MINMN, IERR )
-         IF( ANRM.LT.SMLNUM )
-     $      CALL DLASCL( 'G', 0, 0, SMLNUM, ANRM, MINMN, 1, S, MINMN,
-     $                   IERR )
-         IF( INFO.NE.0 .AND. ANRM.LT.SMLNUM )
-     $      CALL DLASCL( 'G', 0, 0, SMLNUM, ANRM, MINMN-1, 1,
-     $                   RWORK( IE ), MINMN, IERR )
+      CURLVL = 1
+   80 CONTINUE
+      IF( SUBPBS.GT.1 ) THEN
+         SPM2 = SUBPBS - 2
+         DO 90 I = 0, SPM2, 2
+            IF( I.EQ.0 ) THEN
+               SUBMAT = 1
+               MATSIZ = IWORK( 2 )
+               MSD2 = IWORK( 1 )
+               CURPRB = 0
+            ELSE
+               SUBMAT = IWORK( I ) + 1
+               MATSIZ = IWORK( I+2 ) - IWORK( I )
+               MSD2 = MATSIZ / 2
+               CURPRB = CURPRB + 1
+            END IF
+*
+*     Merge lower order eigensystems (of size MSD2 and MATSIZ - MSD2)
+*     into an eigensystem of size MATSIZ.  ZLAED7 handles the case
+*     when the eigenvectors of a full or band Hermitian matrix (which
+*     was reduced to tridiagonal form) are desired.
+*
+*     I am free to use Q as a valuable working space until Loop 150.
+*
+            CALL ZLAED7( MATSIZ, MSD2, QSIZ, TLVLS, CURLVL, CURPRB,
+     $                   D( SUBMAT ), QSTORE( 1, SUBMAT ), LDQS,
+     $                   E( SUBMAT+MSD2-1 ), IWORK( INDXQ+SUBMAT ),
+     $                   RWORK( IQ ), IWORK( IQPTR ), IWORK( IPRMPT ),
+     $                   IWORK( IPERM ), IWORK( IGIVPT ),
+     $                   IWORK( IGIVCL ), RWORK( IGIVNM ),
+     $                   Q( 1, SUBMAT ), RWORK( IWREM ),
+     $                   IWORK( SUBPBS+1 ), INFO )
+            IF( INFO.GT.0 ) THEN
+               INFO = SUBMAT*( N+1 ) + SUBMAT + MATSIZ - 1
+               RETURN
+            END IF
+            IWORK( I / 2+1 ) = IWORK( I+2 )
+   90    CONTINUE
+         SUBPBS = SUBPBS / 2
+         CURLVL = CURLVL + 1
+         GO TO 80
       END IF
 *
-*     Return optimal workspace in WORK(1)
+*     end while
 *
-      WORK( 1 ) = MAXWRK
+*     Re-merge the eigenvalues/vectors which were deflated at the final
+*     merge step.
+*
+      DO 100 I = 1, N
+         J = IWORK( INDXQ+I )
+         RWORK( I ) = D( J )
+         CALL ZCOPY( QSIZ, QSTORE( 1, J ), 1, Q( 1, I ), 1 )
+  100 CONTINUE
+      CALL DCOPY( N, RWORK, 1, D, 1 )
 *
       RETURN
 *
-*     End of ZGESVD
+*     End of ZLAED0
 *
       END
-*> \brief \b ZGETF2 computes the LU factorization of a general m-by-n matrix using partial pivoting with row interchanges (unblocked algorithm).
+*> \brief \b ZLAED7 used by sstedc. Computes the updated eigensystem of a diagonal matrix after modification by a rank-one symmetric matrix. Used when the original matrix is dense.
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download ZGETF2 + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/zgetf2.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/zgetf2.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/zgetf2.f"> 
+*> Download ZLAED7 + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/zlaed7.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/zlaed7.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/zlaed7.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
-*       SUBROUTINE ZGETF2( M, N, A, LDA, IPIV, INFO )
-* 
+*       SUBROUTINE ZLAED7( N, CUTPNT, QSIZ, TLVLS, CURLVL, CURPBM, D, Q,
+*                          LDQ, RHO, INDXQ, QSTORE, QPTR, PRMPTR, PERM,
+*                          GIVPTR, GIVCOL, GIVNUM, WORK, RWORK, IWORK,
+*                          INFO )
+*
 *       .. Scalar Arguments ..
-*       INTEGER            INFO, LDA, M, N
+*       INTEGER            CURLVL, CURPBM, CUTPNT, INFO, LDQ, N, QSIZ,
+*      $                   TLVLS
+*       DOUBLE PRECISION   RHO
 *       ..
 *       .. Array Arguments ..
-*       INTEGER            IPIV( * )
-*       COMPLEX*16         A( LDA, * )
+*       INTEGER            GIVCOL( 2, * ), GIVPTR( * ), INDXQ( * ),
+*      $                   IWORK( * ), PERM( * ), PRMPTR( * ), QPTR( * )
+*       DOUBLE PRECISION   D( * ), GIVNUM( 2, * ), QSTORE( * ), RWORK( * )
+*       COMPLEX*16         Q( LDQ, * ), WORK( * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
 *>
 *> \verbatim
 *>
-*> ZGETF2 computes an LU factorization of a general m-by-n matrix A
-*> using partial pivoting with row interchanges.
+*> ZLAED7 computes the updated eigensystem of a diagonal
+*> matrix after modification by a rank-one symmetric matrix. This
+*> routine is used only for the eigenproblem which requires all
+*> eigenvalues and optionally eigenvectors of a dense or banded
+*> Hermitian matrix that has been reduced to tridiagonal form.
 *>
-*> The factorization has the form
-*>    A = P * L * U
-*> where P is a permutation matrix, L is lower triangular with unit
-*> diagonal elements (lower trapezoidal if m > n), and U is upper
-*> triangular (upper trapezoidal if m < n).
+*>   T = Q(in) ( D(in) + RHO * Z*Z**H ) Q**H(in) = Q(out) * D(out) * Q**H(out)
 *>
-*> This is the right-looking Level 2 BLAS version of the algorithm.
+*>   where Z = Q**Hu, u is a vector of length N with ones in the
+*>   CUTPNT and CUTPNT + 1 th elements and zeros elsewhere.
+*>
+*>    The eigenvectors of the original matrix are stored in Q, and the
+*>    eigenvalues are in D.  The algorithm consists of three stages:
+*>
+*>       The first stage consists of deflating the size of the problem
+*>       when there are multiple eigenvalues or if there is a zero in
+*>       the Z vector.  For each such occurrence the dimension of the
+*>       secular equation problem is reduced by one.  This stage is
+*>       performed by the routine DLAED2.
+*>
+*>       The second stage consists of calculating the updated
+*>       eigenvalues. This is done by finding the roots of the secular
+*>       equation via the routine DLAED4 (as called by SLAED3).
+*>       This routine also calculates the eigenvectors of the current
+*>       problem.
+*>
+*>       The final stage consists of computing the updated eigenvectors
+*>       directly using the updated eigenvalues.  The eigenvectors for
+*>       the current problem are multiplied with the eigenvectors from
+*>       the overall problem.
 *> \endverbatim
 *
 *  Arguments:
 *  ==========
 *
-*> \param[in] M
+*> \param[in] N
 *> \verbatim
-*>          M is INTEGER
-*>          The number of rows of the matrix A.  M >= 0.
+*>          N is INTEGER
+*>         The dimension of the symmetric tridiagonal matrix.  N >= 0.
 *> \endverbatim
 *>
-*> \param[in] N
+*> \param[in] CUTPNT
 *> \verbatim
-*>          N is INTEGER
-*>          The number of columns of the matrix A.  N >= 0.
+*>          CUTPNT is INTEGER
+*>         Contains the location of the last eigenvalue in the leading
+*>         sub-matrix.  min(1,N) <= CUTPNT <= N.
 *> \endverbatim
 *>
-*> \param[in,out] A
+*> \param[in] QSIZ
 *> \verbatim
-*>          A is COMPLEX*16 array, dimension (LDA,N)
-*>          On entry, the m by n matrix to be factored.
-*>          On exit, the factors L and U from the factorization
-*>          A = P*L*U; the unit diagonal elements of L are not stored.
+*>          QSIZ is INTEGER
+*>         The dimension of the unitary matrix used to reduce
+*>         the full matrix to tridiagonal form.  QSIZ >= N.
 *> \endverbatim
 *>
-*> \param[in] LDA
+*> \param[in] TLVLS
 *> \verbatim
-*>          LDA is INTEGER
-*>          The leading dimension of the array A.  LDA >= max(1,M).
+*>          TLVLS is INTEGER
+*>         The total number of merging levels in the overall divide and
+*>         conquer tree.
 *> \endverbatim
 *>
-*> \param[out] IPIV
+*> \param[in] CURLVL
 *> \verbatim
-*>          IPIV is INTEGER array, dimension (min(M,N))
-*>          The pivot indices; for 1 <= i <= min(M,N), row i of the
-*>          matrix was interchanged with row IPIV(i).
+*>          CURLVL is INTEGER
+*>         The current level in the overall merge routine,
+*>         0 <= curlvl <= tlvls.
+*> \endverbatim
+*>
+*> \param[in] CURPBM
+*> \verbatim
+*>          CURPBM is INTEGER
+*>         The current problem in the current level in the overall
+*>         merge routine (counting from upper left to lower right).
+*> \endverbatim
+*>
+*> \param[in,out] D
+*> \verbatim
+*>          D is DOUBLE PRECISION array, dimension (N)
+*>         On entry, the eigenvalues of the rank-1-perturbed matrix.
+*>         On exit, the eigenvalues of the repaired matrix.
+*> \endverbatim
+*>
+*> \param[in,out] Q
+*> \verbatim
+*>          Q is COMPLEX*16 array, dimension (LDQ,N)
+*>         On entry, the eigenvectors of the rank-1-perturbed matrix.
+*>         On exit, the eigenvectors of the repaired tridiagonal matrix.
+*> \endverbatim
+*>
+*> \param[in] LDQ
+*> \verbatim
+*>          LDQ is INTEGER
+*>         The leading dimension of the array Q.  LDQ >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in] RHO
+*> \verbatim
+*>          RHO is DOUBLE PRECISION
+*>         Contains the subdiagonal element used to create the rank-1
+*>         modification.
+*> \endverbatim
+*>
+*> \param[out] INDXQ
+*> \verbatim
+*>          INDXQ is INTEGER array, dimension (N)
+*>         This contains the permutation which will reintegrate the
+*>         subproblem just solved back into sorted order,
+*>         ie. D( INDXQ( I = 1, N ) ) will be in ascending order.
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*>          IWORK is INTEGER array, dimension (4*N)
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*>          RWORK is DOUBLE PRECISION array,
+*>                                 dimension (3*N+2*QSIZ*N)
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*>          WORK is COMPLEX*16 array, dimension (QSIZ*N)
+*> \endverbatim
+*>
+*> \param[in,out] QSTORE
+*> \verbatim
+*>          QSTORE is DOUBLE PRECISION array, dimension (N**2+1)
+*>         Stores eigenvectors of submatrices encountered during
+*>         divide and conquer, packed together. QPTR points to
+*>         beginning of the submatrices.
+*> \endverbatim
+*>
+*> \param[in,out] QPTR
+*> \verbatim
+*>          QPTR is INTEGER array, dimension (N+2)
+*>         List of indices pointing to beginning of submatrices stored
+*>         in QSTORE. The submatrices are numbered starting at the
+*>         bottom left of the divide and conquer tree, from left to
+*>         right and bottom to top.
+*> \endverbatim
+*>
+*> \param[in] PRMPTR
+*> \verbatim
+*>          PRMPTR is INTEGER array, dimension (N lg N)
+*>         Contains a list of pointers which indicate where in PERM a
+*>         level's permutation is stored.  PRMPTR(i+1) - PRMPTR(i)
+*>         indicates the size of the permutation and also the size of
+*>         the full, non-deflated problem.
+*> \endverbatim
+*>
+*> \param[in] PERM
+*> \verbatim
+*>          PERM is INTEGER array, dimension (N lg N)
+*>         Contains the permutations (from deflation and sorting) to be
+*>         applied to each eigenblock.
+*> \endverbatim
+*>
+*> \param[in] GIVPTR
+*> \verbatim
+*>          GIVPTR is INTEGER array, dimension (N lg N)
+*>         Contains a list of pointers which indicate where in GIVCOL a
+*>         level's Givens rotations are stored.  GIVPTR(i+1) - GIVPTR(i)
+*>         indicates the number of Givens rotations.
+*> \endverbatim
+*>
+*> \param[in] GIVCOL
+*> \verbatim
+*>          GIVCOL is INTEGER array, dimension (2, N lg N)
+*>         Each pair of numbers indicates a pair of columns to take place
+*>         in a Givens rotation.
+*> \endverbatim
+*>
+*> \param[in] GIVNUM
+*> \verbatim
+*>          GIVNUM is DOUBLE PRECISION array, dimension (2, N lg N)
+*>         Each number indicates the S value to be used in the
+*>         corresponding Givens rotation.
 *> \endverbatim
 *>
 *> \param[out] INFO
 *> \verbatim
 *>          INFO is INTEGER
-*>          = 0: successful exit
-*>          < 0: if INFO = -k, the k-th argument had an illegal value
-*>          > 0: if INFO = k, U(k,k) is exactly zero. The factorization
-*>               has been completed, but the factor U is exactly
-*>               singular, and division by zero will occur if it is used
-*>               to solve a system of equations.
+*>          = 0:  successful exit.
+*>          < 0:  if INFO = -i, the i-th argument had an illegal value.
+*>          > 0:  if INFO = 1, an eigenvalue did not converge
 *> \endverbatim
 *
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date September 2012
+*> \date June 2016
 *
-*> \ingroup complex16GEcomputational
+*> \ingroup complex16OTHERcomputational
 *
 *  =====================================================================
-      SUBROUTINE ZGETF2( M, N, A, LDA, IPIV, INFO )
+      SUBROUTINE ZLAED7( N, CUTPNT, QSIZ, TLVLS, CURLVL, CURPBM, D, Q,
+     $                   LDQ, RHO, INDXQ, QSTORE, QPTR, PRMPTR, PERM,
+     $                   GIVPTR, GIVCOL, GIVNUM, WORK, RWORK, IWORK,
+     $                   INFO )
 *
-*  -- LAPACK computational routine (version 3.4.2) --
+*  -- LAPACK computational routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     September 2012
+*     June 2016
 *
 *     .. Scalar Arguments ..
-      INTEGER            INFO, LDA, M, N
+      INTEGER            CURLVL, CURPBM, CUTPNT, INFO, LDQ, N, QSIZ,
+     $                   TLVLS
+      DOUBLE PRECISION   RHO
 *     ..
 *     .. Array Arguments ..
-      INTEGER            IPIV( * )
-      COMPLEX*16         A( LDA, * )
+      INTEGER            GIVCOL( 2, * ), GIVPTR( * ), INDXQ( * ),
+     $                   IWORK( * ), PERM( * ), PRMPTR( * ), QPTR( * )
+      DOUBLE PRECISION   D( * ), GIVNUM( 2, * ), QSTORE( * ), RWORK( * )
+      COMPLEX*16         Q( LDQ, * ), WORK( * )
 *     ..
 *
 *  =====================================================================
 *
-*     .. Parameters ..
-      COMPLEX*16         ONE, ZERO
-      PARAMETER          ( ONE = ( 1.0D+0, 0.0D+0 ),
-     $                   ZERO = ( 0.0D+0, 0.0D+0 ) )
-*     ..
 *     .. Local Scalars ..
-      DOUBLE PRECISION   SFMIN
-      INTEGER            I, J, JP
-*     ..
-*     .. External Functions ..
-      DOUBLE PRECISION   DLAMCH
-      INTEGER            IZAMAX
-      EXTERNAL           DLAMCH, IZAMAX
+      INTEGER            COLTYP, CURR, I, IDLMDA, INDX,
+     $                   INDXC, INDXP, IQ, IW, IZ, K, N1, N2, PTR
 *     ..
 *     .. External Subroutines ..
-      EXTERNAL           XERBLA, ZGERU, ZSCAL, ZSWAP
+      EXTERNAL           DLAED9, DLAEDA, DLAMRG, XERBLA, ZLACRM, ZLAED8
 *     ..
 *     .. Intrinsic Functions ..
       INTRINSIC          MAX, MIN
@@ -9570,598 +23506,1241 @@
 *     Test the input parameters.
 *
       INFO = 0
-      IF( M.LT.0 ) THEN
+*
+*     IF( ICOMPQ.LT.0 .OR. ICOMPQ.GT.1 ) THEN
+*        INFO = -1
+*     ELSE IF( N.LT.0 ) THEN
+      IF( N.LT.0 ) THEN
          INFO = -1
-      ELSE IF( N.LT.0 ) THEN
+      ELSE IF( MIN( 1, N ).GT.CUTPNT .OR. N.LT.CUTPNT ) THEN
          INFO = -2
-      ELSE IF( LDA.LT.MAX( 1, M ) ) THEN
-         INFO = -4
+      ELSE IF( QSIZ.LT.N ) THEN
+         INFO = -3
+      ELSE IF( LDQ.LT.MAX( 1, N ) ) THEN
+         INFO = -9
       END IF
       IF( INFO.NE.0 ) THEN
-         CALL XERBLA( 'ZGETF2', -INFO )
+         CALL XERBLA( 'ZLAED7', -INFO )
          RETURN
       END IF
 *
 *     Quick return if possible
 *
-      IF( M.EQ.0 .OR. N.EQ.0 )
+      IF( N.EQ.0 )
      $   RETURN
 *
-*     Compute machine safe minimum
-*
-      SFMIN = DLAMCH('S') 
+*     The following values are for bookkeeping purposes only.  They are
+*     integer pointers which indicate the portion of the workspace
+*     used by a particular array in DLAED2 and SLAED3.
 *
-      DO 10 J = 1, MIN( M, N )
-*
-*        Find pivot and test for singularity.
-*
-         JP = J - 1 + IZAMAX( M-J+1, A( J, J ), 1 )
-         IPIV( J ) = JP
-         IF( A( JP, J ).NE.ZERO ) THEN
-*
-*           Apply the interchange to columns 1:N.
-*
-            IF( JP.NE.J )
-     $         CALL ZSWAP( N, A( J, 1 ), LDA, A( JP, 1 ), LDA )
+      IZ = 1
+      IDLMDA = IZ + N
+      IW = IDLMDA + N
+      IQ = IW + N
 *
-*           Compute elements J+1:M of J-th column.
-*
-            IF( J.LT.M ) THEN
-               IF( ABS(A( J, J )) .GE. SFMIN ) THEN
-                  CALL ZSCAL( M-J, ONE / A( J, J ), A( J+1, J ), 1 )
-               ELSE
-                  DO 20 I = 1, M-J
-                     A( J+I, J ) = A( J+I, J ) / A( J, J )
-   20             CONTINUE
-               END IF
-            END IF
+      INDX = 1
+      INDXC = INDX + N
+      COLTYP = INDXC + N
+      INDXP = COLTYP + N
 *
-         ELSE IF( INFO.EQ.0 ) THEN
+*     Form the z-vector which consists of the last row of Q_1 and the
+*     first row of Q_2.
 *
-            INFO = J
+      PTR = 1 + 2**TLVLS
+      DO 10 I = 1, CURLVL - 1
+         PTR = PTR + 2**( TLVLS-I )
+   10 CONTINUE
+      CURR = PTR + CURPBM
+      CALL DLAEDA( N, TLVLS, CURLVL, CURPBM, PRMPTR, PERM, GIVPTR,
+     $             GIVCOL, GIVNUM, QSTORE, QPTR, RWORK( IZ ),
+     $             RWORK( IZ+N ), INFO )
+*
+*     When solving the final problem, we no longer need the stored data,
+*     so we will overwrite the data from this level onto the previously
+*     used storage space.
+*
+      IF( CURLVL.EQ.TLVLS ) THEN
+         QPTR( CURR ) = 1
+         PRMPTR( CURR ) = 1
+         GIVPTR( CURR ) = 1
+      END IF
+*
+*     Sort and Deflate eigenvalues.
+*
+      CALL ZLAED8( K, N, QSIZ, Q, LDQ, D, RHO, CUTPNT, RWORK( IZ ),
+     $             RWORK( IDLMDA ), WORK, QSIZ, RWORK( IW ),
+     $             IWORK( INDXP ), IWORK( INDX ), INDXQ,
+     $             PERM( PRMPTR( CURR ) ), GIVPTR( CURR+1 ),
+     $             GIVCOL( 1, GIVPTR( CURR ) ),
+     $             GIVNUM( 1, GIVPTR( CURR ) ), INFO )
+      PRMPTR( CURR+1 ) = PRMPTR( CURR ) + N
+      GIVPTR( CURR+1 ) = GIVPTR( CURR+1 ) + GIVPTR( CURR )
+*
+*     Solve Secular Equation.
+*
+      IF( K.NE.0 ) THEN
+         CALL DLAED9( K, 1, K, N, D, RWORK( IQ ), K, RHO,
+     $                RWORK( IDLMDA ), RWORK( IW ),
+     $                QSTORE( QPTR( CURR ) ), K, INFO )
+         CALL ZLACRM( QSIZ, K, WORK, QSIZ, QSTORE( QPTR( CURR ) ), K, Q,
+     $                LDQ, RWORK( IQ ) )
+         QPTR( CURR+1 ) = QPTR( CURR ) + K**2
+         IF( INFO.NE.0 ) THEN
+            RETURN
          END IF
 *
-         IF( J.LT.MIN( M, N ) ) THEN
+*     Prepare the INDXQ sorting premutation.
 *
-*           Update trailing submatrix.
+         N1 = K
+         N2 = N - K
+         CALL DLAMRG( N1, N2, D, 1, -1, INDXQ )
+      ELSE
+         QPTR( CURR+1 ) = QPTR( CURR )
+         DO 20 I = 1, N
+            INDXQ( I ) = I
+   20    CONTINUE
+      END IF
 *
-            CALL ZGERU( M-J, N-J, -ONE, A( J+1, J ), 1, A( J, J+1 ),
-     $                  LDA, A( J+1, J+1 ), LDA )
-         END IF
-   10 CONTINUE
       RETURN
 *
-*     End of ZGETF2
+*     End of ZLAED7
 *
       END
-*> \brief \b ZGETRF
+*> \brief \b ZLAED8 used by sstedc. Merges eigenvalues and deflates secular equation. Used when the original matrix is dense.
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download ZGETRF + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/zgetrf.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/zgetrf.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/zgetrf.f"> 
+*> Download ZLAED8 + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/zlaed8.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/zlaed8.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/zlaed8.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
-*       SUBROUTINE ZGETRF( M, N, A, LDA, IPIV, INFO )
-* 
+*       SUBROUTINE ZLAED8( K, N, QSIZ, Q, LDQ, D, RHO, CUTPNT, Z, DLAMDA,
+*                          Q2, LDQ2, W, INDXP, INDX, INDXQ, PERM, GIVPTR,
+*                          GIVCOL, GIVNUM, INFO )
+*
 *       .. Scalar Arguments ..
-*       INTEGER            INFO, LDA, M, N
+*       INTEGER            CUTPNT, GIVPTR, INFO, K, LDQ, LDQ2, N, QSIZ
+*       DOUBLE PRECISION   RHO
 *       ..
 *       .. Array Arguments ..
-*       INTEGER            IPIV( * )
-*       COMPLEX*16         A( LDA, * )
+*       INTEGER            GIVCOL( 2, * ), INDX( * ), INDXP( * ),
+*      $                   INDXQ( * ), PERM( * )
+*       DOUBLE PRECISION   D( * ), DLAMDA( * ), GIVNUM( 2, * ), W( * ),
+*      $                   Z( * )
+*       COMPLEX*16         Q( LDQ, * ), Q2( LDQ2, * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
 *>
 *> \verbatim
 *>
-*> ZGETRF computes an LU factorization of a general M-by-N matrix A
-*> using partial pivoting with row interchanges.
+*> ZLAED8 merges the two sets of eigenvalues together into a single
+*> sorted set.  Then it tries to deflate the size of the problem.
+*> There are two ways in which deflation can occur:  when two or more
+*> eigenvalues are close together or if there is a tiny element in the
+*> Z vector.  For each such occurrence the order of the related secular
+*> equation problem is reduced by one.
+*> \endverbatim
+*
+*  Arguments:
+*  ==========
+*
+*> \param[out] K
+*> \verbatim
+*>          K is INTEGER
+*>         Contains the number of non-deflated eigenvalues.
+*>         This is the order of the related secular equation.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*>          N is INTEGER
+*>         The dimension of the symmetric tridiagonal matrix.  N >= 0.
+*> \endverbatim
+*>
+*> \param[in] QSIZ
+*> \verbatim
+*>          QSIZ is INTEGER
+*>         The dimension of the unitary matrix used to reduce
+*>         the dense or band matrix to tridiagonal form.
+*>         QSIZ >= N if ICOMPQ = 1.
+*> \endverbatim
+*>
+*> \param[in,out] Q
+*> \verbatim
+*>          Q is COMPLEX*16 array, dimension (LDQ,N)
+*>         On entry, Q contains the eigenvectors of the partially solved
+*>         system which has been previously updated in matrix
+*>         multiplies with other partially solved eigensystems.
+*>         On exit, Q contains the trailing (N-K) updated eigenvectors
+*>         (those which were deflated) in its last N-K columns.
+*> \endverbatim
+*>
+*> \param[in] LDQ
+*> \verbatim
+*>          LDQ is INTEGER
+*>         The leading dimension of the array Q.  LDQ >= max( 1, N ).
+*> \endverbatim
+*>
+*> \param[in,out] D
+*> \verbatim
+*>          D is DOUBLE PRECISION array, dimension (N)
+*>         On entry, D contains the eigenvalues of the two submatrices to
+*>         be combined.  On exit, D contains the trailing (N-K) updated
+*>         eigenvalues (those which were deflated) sorted into increasing
+*>         order.
+*> \endverbatim
+*>
+*> \param[in,out] RHO
+*> \verbatim
+*>          RHO is DOUBLE PRECISION
+*>         Contains the off diagonal element associated with the rank-1
+*>         cut which originally split the two submatrices which are now
+*>         being recombined. RHO is modified during the computation to
+*>         the value required by DLAED3.
+*> \endverbatim
+*>
+*> \param[in] CUTPNT
+*> \verbatim
+*>          CUTPNT is INTEGER
+*>         Contains the location of the last eigenvalue in the leading
+*>         sub-matrix.  MIN(1,N) <= CUTPNT <= N.
+*> \endverbatim
 *>
-*> The factorization has the form
-*>    A = P * L * U
-*> where P is a permutation matrix, L is lower triangular with unit
-*> diagonal elements (lower trapezoidal if m > n), and U is upper
-*> triangular (upper trapezoidal if m < n).
+*> \param[in] Z
+*> \verbatim
+*>          Z is DOUBLE PRECISION array, dimension (N)
+*>         On input this vector contains the updating vector (the last
+*>         row of the first sub-eigenvector matrix and the first row of
+*>         the second sub-eigenvector matrix).  The contents of Z are
+*>         destroyed during the updating process.
+*> \endverbatim
 *>
-*> This is the right-looking Level 3 BLAS version of the algorithm.
+*> \param[out] DLAMDA
+*> \verbatim
+*>          DLAMDA is DOUBLE PRECISION array, dimension (N)
+*>         Contains a copy of the first K eigenvalues which will be used
+*>         by DLAED3 to form the secular equation.
 *> \endverbatim
-*
-*  Arguments:
-*  ==========
-*
-*> \param[in] M
+*>
+*> \param[out] Q2
 *> \verbatim
-*>          M is INTEGER
-*>          The number of rows of the matrix A.  M >= 0.
+*>          Q2 is COMPLEX*16 array, dimension (LDQ2,N)
+*>         If ICOMPQ = 0, Q2 is not referenced.  Otherwise,
+*>         Contains a copy of the first K eigenvectors which will be used
+*>         by DLAED7 in a matrix multiply (DGEMM) to update the new
+*>         eigenvectors.
 *> \endverbatim
 *>
-*> \param[in] N
+*> \param[in] LDQ2
 *> \verbatim
-*>          N is INTEGER
-*>          The number of columns of the matrix A.  N >= 0.
+*>          LDQ2 is INTEGER
+*>         The leading dimension of the array Q2.  LDQ2 >= max( 1, N ).
 *> \endverbatim
 *>
-*> \param[in,out] A
+*> \param[out] W
 *> \verbatim
-*>          A is COMPLEX*16 array, dimension (LDA,N)
-*>          On entry, the M-by-N matrix to be factored.
-*>          On exit, the factors L and U from the factorization
-*>          A = P*L*U; the unit diagonal elements of L are not stored.
+*>          W is DOUBLE PRECISION array, dimension (N)
+*>         This will hold the first k values of the final
+*>         deflation-altered z-vector and will be passed to DLAED3.
 *> \endverbatim
 *>
-*> \param[in] LDA
+*> \param[out] INDXP
 *> \verbatim
-*>          LDA is INTEGER
-*>          The leading dimension of the array A.  LDA >= max(1,M).
+*>          INDXP is INTEGER array, dimension (N)
+*>         This will contain the permutation used to place deflated
+*>         values of D at the end of the array. On output INDXP(1:K)
+*>         points to the nondeflated D-values and INDXP(K+1:N)
+*>         points to the deflated eigenvalues.
 *> \endverbatim
 *>
-*> \param[out] IPIV
+*> \param[out] INDX
 *> \verbatim
-*>          IPIV is INTEGER array, dimension (min(M,N))
-*>          The pivot indices; for 1 <= i <= min(M,N), row i of the
-*>          matrix was interchanged with row IPIV(i).
+*>          INDX is INTEGER array, dimension (N)
+*>         This will contain the permutation used to sort the contents of
+*>         D into ascending order.
+*> \endverbatim
+*>
+*> \param[in] INDXQ
+*> \verbatim
+*>          INDXQ is INTEGER array, dimension (N)
+*>         This contains the permutation which separately sorts the two
+*>         sub-problems in D into ascending order.  Note that elements in
+*>         the second half of this permutation must first have CUTPNT
+*>         added to their values in order to be accurate.
+*> \endverbatim
+*>
+*> \param[out] PERM
+*> \verbatim
+*>          PERM is INTEGER array, dimension (N)
+*>         Contains the permutations (from deflation and sorting) to be
+*>         applied to each eigenblock.
+*> \endverbatim
+*>
+*> \param[out] GIVPTR
+*> \verbatim
+*>          GIVPTR is INTEGER
+*>         Contains the number of Givens rotations which took place in
+*>         this subproblem.
+*> \endverbatim
+*>
+*> \param[out] GIVCOL
+*> \verbatim
+*>          GIVCOL is INTEGER array, dimension (2, N)
+*>         Each pair of numbers indicates a pair of columns to take place
+*>         in a Givens rotation.
+*> \endverbatim
+*>
+*> \param[out] GIVNUM
+*> \verbatim
+*>          GIVNUM is DOUBLE PRECISION array, dimension (2, N)
+*>         Each number indicates the S value to be used in the
+*>         corresponding Givens rotation.
 *> \endverbatim
 *>
 *> \param[out] INFO
 *> \verbatim
 *>          INFO is INTEGER
-*>          = 0:  successful exit
-*>          < 0:  if INFO = -i, the i-th argument had an illegal value
-*>          > 0:  if INFO = i, U(i,i) is exactly zero. The factorization
-*>                has been completed, but the factor U is exactly
-*>                singular, and division by zero will occur if it is used
-*>                to solve a system of equations.
+*>          = 0:  successful exit.
+*>          < 0:  if INFO = -i, the i-th argument had an illegal value.
 *> \endverbatim
 *
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date November 2011
+*> \date December 2016
 *
-*> \ingroup complex16GEcomputational
+*> \ingroup complex16OTHERcomputational
 *
 *  =====================================================================
-      SUBROUTINE ZGETRF( M, N, A, LDA, IPIV, INFO )
+      SUBROUTINE ZLAED8( K, N, QSIZ, Q, LDQ, D, RHO, CUTPNT, Z, DLAMDA,
+     $                   Q2, LDQ2, W, INDXP, INDX, INDXQ, PERM, GIVPTR,
+     $                   GIVCOL, GIVNUM, INFO )
 *
-*  -- LAPACK computational routine (version 3.4.0) --
+*  -- LAPACK computational routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     November 2011
+*     December 2016
 *
 *     .. Scalar Arguments ..
-      INTEGER            INFO, LDA, M, N
+      INTEGER            CUTPNT, GIVPTR, INFO, K, LDQ, LDQ2, N, QSIZ
+      DOUBLE PRECISION   RHO
 *     ..
 *     .. Array Arguments ..
-      INTEGER            IPIV( * )
-      COMPLEX*16         A( LDA, * )
+      INTEGER            GIVCOL( 2, * ), INDX( * ), INDXP( * ),
+     $                   INDXQ( * ), PERM( * )
+      DOUBLE PRECISION   D( * ), DLAMDA( * ), GIVNUM( 2, * ), W( * ),
+     $                   Z( * )
+      COMPLEX*16         Q( LDQ, * ), Q2( LDQ2, * )
 *     ..
 *
 *  =====================================================================
 *
 *     .. Parameters ..
-      COMPLEX*16         ONE
-      PARAMETER          ( ONE = ( 1.0D+0, 0.0D+0 ) )
+      DOUBLE PRECISION   MONE, ZERO, ONE, TWO, EIGHT
+      PARAMETER          ( MONE = -1.0D0, ZERO = 0.0D0, ONE = 1.0D0,
+     $                   TWO = 2.0D0, EIGHT = 8.0D0 )
 *     ..
 *     .. Local Scalars ..
-      INTEGER            I, IINFO, J, JB, NB
-*     ..
-*     .. External Subroutines ..
-      EXTERNAL           XERBLA, ZGEMM, ZGETF2, ZLASWP, ZTRSM
+      INTEGER            I, IMAX, J, JLAM, JMAX, JP, K2, N1, N1P1, N2
+      DOUBLE PRECISION   C, EPS, S, T, TAU, TOL
 *     ..
 *     .. External Functions ..
-      INTEGER            ILAENV
-      EXTERNAL           ILAENV
+      INTEGER            IDAMAX
+      DOUBLE PRECISION   DLAMCH, DLAPY2
+      EXTERNAL           IDAMAX, DLAMCH, DLAPY2
+*     ..
+*     .. External Subroutines ..
+      EXTERNAL           DCOPY, DLAMRG, DSCAL, XERBLA, ZCOPY, ZDROT,
+     $                   ZLACPY
 *     ..
 *     .. Intrinsic Functions ..
-      INTRINSIC          MAX, MIN
+      INTRINSIC          ABS, MAX, MIN, SQRT
 *     ..
 *     .. Executable Statements ..
 *
 *     Test the input parameters.
 *
       INFO = 0
-      IF( M.LT.0 ) THEN
-         INFO = -1
-      ELSE IF( N.LT.0 ) THEN
+*
+      IF( N.LT.0 ) THEN
          INFO = -2
-      ELSE IF( LDA.LT.MAX( 1, M ) ) THEN
-         INFO = -4
+      ELSE IF( QSIZ.LT.N ) THEN
+         INFO = -3
+      ELSE IF( LDQ.LT.MAX( 1, N ) ) THEN
+         INFO = -5
+      ELSE IF( CUTPNT.LT.MIN( 1, N ) .OR. CUTPNT.GT.N ) THEN
+         INFO = -8
+      ELSE IF( LDQ2.LT.MAX( 1, N ) ) THEN
+         INFO = -12
       END IF
       IF( INFO.NE.0 ) THEN
-         CALL XERBLA( 'ZGETRF', -INFO )
+         CALL XERBLA( 'ZLAED8', -INFO )
          RETURN
       END IF
 *
+*     Need to initialize GIVPTR to O here in case of quick exit
+*     to prevent an unspecified code behavior (usually sigfault)
+*     when IWORK array on entry to *stedc is not zeroed
+*     (or at least some IWORK entries which used in *laed7 for GIVPTR).
+*
+      GIVPTR = 0
+*
 *     Quick return if possible
 *
-      IF( M.EQ.0 .OR. N.EQ.0 )
+      IF( N.EQ.0 )
      $   RETURN
 *
-*     Determine the block size for this environment.
+      N1 = CUTPNT
+      N2 = N - N1
+      N1P1 = N1 + 1
 *
-      NB = ILAENV( 1, 'ZGETRF', ' ', M, N, -1, -1 )
-      IF( NB.LE.1 .OR. NB.GE.MIN( M, N ) ) THEN
+      IF( RHO.LT.ZERO ) THEN
+         CALL DSCAL( N2, MONE, Z( N1P1 ), 1 )
+      END IF
 *
-*        Use unblocked code.
+*     Normalize z so that norm(z) = 1
 *
-         CALL ZGETF2( M, N, A, LDA, IPIV, INFO )
-      ELSE
+      T = ONE / SQRT( TWO )
+      DO 10 J = 1, N
+         INDX( J ) = J
+   10 CONTINUE
+      CALL DSCAL( N, T, Z, 1 )
+      RHO = ABS( TWO*RHO )
 *
-*        Use blocked code.
+*     Sort the eigenvalues into increasing order
 *
-         DO 20 J = 1, MIN( M, N ), NB
-            JB = MIN( MIN( M, N )-J+1, NB )
+      DO 20 I = CUTPNT + 1, N
+         INDXQ( I ) = INDXQ( I ) + CUTPNT
+   20 CONTINUE
+      DO 30 I = 1, N
+         DLAMDA( I ) = D( INDXQ( I ) )
+         W( I ) = Z( INDXQ( I ) )
+   30 CONTINUE
+      I = 1
+      J = CUTPNT + 1
+      CALL DLAMRG( N1, N2, DLAMDA, 1, 1, INDX )
+      DO 40 I = 1, N
+         D( I ) = DLAMDA( INDX( I ) )
+         Z( I ) = W( INDX( I ) )
+   40 CONTINUE
 *
-*           Factor diagonal and subdiagonal blocks and test for exact
-*           singularity.
+*     Calculate the allowable deflation tolerance
 *
-            CALL ZGETF2( M-J+1, JB, A( J, J ), LDA, IPIV( J ), IINFO )
+      IMAX = IDAMAX( N, Z, 1 )
+      JMAX = IDAMAX( N, D, 1 )
+      EPS = DLAMCH( 'Epsilon' )
+      TOL = EIGHT*EPS*ABS( D( JMAX ) )
 *
-*           Adjust INFO and the pivot indices.
+*     If the rank-1 modifier is small enough, no more needs to be done
+*     -- except to reorganize Q so that its columns correspond with the
+*     elements in D.
 *
-            IF( INFO.EQ.0 .AND. IINFO.GT.0 )
-     $         INFO = IINFO + J - 1
-            DO 10 I = J, MIN( M, J+JB-1 )
-               IPIV( I ) = J - 1 + IPIV( I )
-   10       CONTINUE
+      IF( RHO*ABS( Z( IMAX ) ).LE.TOL ) THEN
+         K = 0
+         DO 50 J = 1, N
+            PERM( J ) = INDXQ( INDX( J ) )
+            CALL ZCOPY( QSIZ, Q( 1, PERM( J ) ), 1, Q2( 1, J ), 1 )
+   50    CONTINUE
+         CALL ZLACPY( 'A', QSIZ, N, Q2( 1, 1 ), LDQ2, Q( 1, 1 ), LDQ )
+         RETURN
+      END IF
 *
-*           Apply interchanges to columns 1:J-1.
+*     If there are multiple eigenvalues then the problem deflates.  Here
+*     the number of equal eigenvalues are found.  As each equal
+*     eigenvalue is found, an elementary reflector is computed to rotate
+*     the corresponding eigensubspace so that the corresponding
+*     components of Z are zero in this new basis.
 *
-            CALL ZLASWP( J-1, A, LDA, J, J+JB-1, IPIV, 1 )
+      K = 0
+      K2 = N + 1
+      DO 60 J = 1, N
+         IF( RHO*ABS( Z( J ) ).LE.TOL ) THEN
 *
-            IF( J+JB.LE.N ) THEN
+*           Deflate due to small z component.
 *
-*              Apply interchanges to columns J+JB:N.
+            K2 = K2 - 1
+            INDXP( K2 ) = J
+            IF( J.EQ.N )
+     $         GO TO 100
+         ELSE
+            JLAM = J
+            GO TO 70
+         END IF
+   60 CONTINUE
+   70 CONTINUE
+      J = J + 1
+      IF( J.GT.N )
+     $   GO TO 90
+      IF( RHO*ABS( Z( J ) ).LE.TOL ) THEN
 *
-               CALL ZLASWP( N-J-JB+1, A( 1, J+JB ), LDA, J, J+JB-1,
-     $                      IPIV, 1 )
+*        Deflate due to small z component.
 *
-*              Compute block row of U.
+         K2 = K2 - 1
+         INDXP( K2 ) = J
+      ELSE
 *
-               CALL ZTRSM( 'Left', 'Lower', 'No transpose', 'Unit', JB,
-     $                     N-J-JB+1, ONE, A( J, J ), LDA, A( J, J+JB ),
-     $                     LDA )
-               IF( J+JB.LE.M ) THEN
+*        Check if eigenvalues are close enough to allow deflation.
 *
-*                 Update trailing submatrix.
+         S = Z( JLAM )
+         C = Z( J )
 *
-                  CALL ZGEMM( 'No transpose', 'No transpose', M-J-JB+1,
-     $                        N-J-JB+1, JB, -ONE, A( J+JB, J ), LDA,
-     $                        A( J, J+JB ), LDA, ONE, A( J+JB, J+JB ),
-     $                        LDA )
+*        Find sqrt(a**2+b**2) without overflow or
+*        destructive underflow.
+*
+         TAU = DLAPY2( C, S )
+         T = D( J ) - D( JLAM )
+         C = C / TAU
+         S = -S / TAU
+         IF( ABS( T*C*S ).LE.TOL ) THEN
+*
+*           Deflation is possible.
+*
+            Z( J ) = TAU
+            Z( JLAM ) = ZERO
+*
+*           Record the appropriate Givens rotation
+*
+            GIVPTR = GIVPTR + 1
+            GIVCOL( 1, GIVPTR ) = INDXQ( INDX( JLAM ) )
+            GIVCOL( 2, GIVPTR ) = INDXQ( INDX( J ) )
+            GIVNUM( 1, GIVPTR ) = C
+            GIVNUM( 2, GIVPTR ) = S
+            CALL ZDROT( QSIZ, Q( 1, INDXQ( INDX( JLAM ) ) ), 1,
+     $                  Q( 1, INDXQ( INDX( J ) ) ), 1, C, S )
+            T = D( JLAM )*C*C + D( J )*S*S
+            D( J ) = D( JLAM )*S*S + D( J )*C*C
+            D( JLAM ) = T
+            K2 = K2 - 1
+            I = 1
+   80       CONTINUE
+            IF( K2+I.LE.N ) THEN
+               IF( D( JLAM ).LT.D( INDXP( K2+I ) ) ) THEN
+                  INDXP( K2+I-1 ) = INDXP( K2+I )
+                  INDXP( K2+I ) = JLAM
+                  I = I + 1
+                  GO TO 80
+               ELSE
+                  INDXP( K2+I-1 ) = JLAM
                END IF
+            ELSE
+               INDXP( K2+I-1 ) = JLAM
             END IF
-   20    CONTINUE
+            JLAM = J
+         ELSE
+            K = K + 1
+            W( K ) = Z( JLAM )
+            DLAMDA( K ) = D( JLAM )
+            INDXP( K ) = JLAM
+            JLAM = J
+         END IF
+      END IF
+      GO TO 70
+   90 CONTINUE
+*
+*     Record the last eigenvalue.
+*
+      K = K + 1
+      W( K ) = Z( JLAM )
+      DLAMDA( K ) = D( JLAM )
+      INDXP( K ) = JLAM
+*
+  100 CONTINUE
+*
+*     Sort the eigenvalues and corresponding eigenvectors into DLAMDA
+*     and Q2 respectively.  The eigenvalues/vectors which were not
+*     deflated go into the first K slots of DLAMDA and Q2 respectively,
+*     while those which were deflated go into the last N - K slots.
+*
+      DO 110 J = 1, N
+         JP = INDXP( J )
+         DLAMDA( J ) = D( JP )
+         PERM( J ) = INDXQ( INDX( JP ) )
+         CALL ZCOPY( QSIZ, Q( 1, PERM( J ) ), 1, Q2( 1, J ), 1 )
+  110 CONTINUE
+*
+*     The deflated eigenvalues and their corresponding vectors go back
+*     into the last N - K slots of D and Q respectively.
+*
+      IF( K.LT.N ) THEN
+         CALL DCOPY( N-K, DLAMDA( K+1 ), 1, D( K+1 ), 1 )
+         CALL ZLACPY( 'A', QSIZ, N-K, Q2( 1, K+1 ), LDQ2, Q( 1, K+1 ),
+     $                LDQ )
       END IF
+*
       RETURN
 *
-*     End of ZGETRF
+*     End of ZLAED8
 *
       END
-*> \brief \b ZGETRS
+*> \brief \b ZLAHQR computes the eigenvalues and Schur factorization of an upper Hessenberg matrix, using the double-shift/single-shift QR algorithm.
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download ZGETRS + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/zgetrs.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/zgetrs.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/zgetrs.f"> 
+*> Download ZLAHQR + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/zlahqr.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/zlahqr.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/zlahqr.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
-*       SUBROUTINE ZGETRS( TRANS, N, NRHS, A, LDA, IPIV, B, LDB, INFO )
-* 
+*       SUBROUTINE ZLAHQR( WANTT, WANTZ, N, ILO, IHI, H, LDH, W, ILOZ,
+*                          IHIZ, Z, LDZ, INFO )
+*
 *       .. Scalar Arguments ..
-*       CHARACTER          TRANS
-*       INTEGER            INFO, LDA, LDB, N, NRHS
+*       INTEGER            IHI, IHIZ, ILO, ILOZ, INFO, LDH, LDZ, N
+*       LOGICAL            WANTT, WANTZ
 *       ..
 *       .. Array Arguments ..
-*       INTEGER            IPIV( * )
-*       COMPLEX*16         A( LDA, * ), B( LDB, * )
+*       COMPLEX*16         H( LDH, * ), W( * ), Z( LDZ, * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
 *>
 *> \verbatim
 *>
-*> ZGETRS solves a system of linear equations
-*>    A * X = B,  A**T * X = B,  or  A**H * X = B
-*> with a general N-by-N matrix A using the LU factorization computed
-*> by ZGETRF.
+*>    ZLAHQR is an auxiliary routine called by CHSEQR to update the
+*>    eigenvalues and Schur decomposition already computed by CHSEQR, by
+*>    dealing with the Hessenberg submatrix in rows and columns ILO to
+*>    IHI.
 *> \endverbatim
 *
 *  Arguments:
 *  ==========
 *
-*> \param[in] TRANS
+*> \param[in] WANTT
 *> \verbatim
-*>          TRANS is CHARACTER*1
-*>          Specifies the form of the system of equations:
-*>          = 'N':  A * X = B     (No transpose)
-*>          = 'T':  A**T * X = B  (Transpose)
-*>          = 'C':  A**H * X = B  (Conjugate transpose)
+*>          WANTT is LOGICAL
+*>          = .TRUE. : the full Schur form T is required;
+*>          = .FALSE.: only eigenvalues are required.
+*> \endverbatim
+*>
+*> \param[in] WANTZ
+*> \verbatim
+*>          WANTZ is LOGICAL
+*>          = .TRUE. : the matrix of Schur vectors Z is required;
+*>          = .FALSE.: Schur vectors are not required.
 *> \endverbatim
 *>
 *> \param[in] N
 *> \verbatim
 *>          N is INTEGER
-*>          The order of the matrix A.  N >= 0.
+*>          The order of the matrix H.  N >= 0.
 *> \endverbatim
 *>
-*> \param[in] NRHS
+*> \param[in] ILO
 *> \verbatim
-*>          NRHS is INTEGER
-*>          The number of right hand sides, i.e., the number of columns
-*>          of the matrix B.  NRHS >= 0.
+*>          ILO is INTEGER
 *> \endverbatim
 *>
-*> \param[in] A
+*> \param[in] IHI
 *> \verbatim
-*>          A is COMPLEX*16 array, dimension (LDA,N)
-*>          The factors L and U from the factorization A = P*L*U
-*>          as computed by ZGETRF.
+*>          IHI is INTEGER
+*>          It is assumed that H is already upper triangular in rows and
+*>          columns IHI+1:N, and that H(ILO,ILO-1) = 0 (unless ILO = 1).
+*>          ZLAHQR works primarily with the Hessenberg submatrix in rows
+*>          and columns ILO to IHI, but applies transformations to all of
+*>          H if WANTT is .TRUE..
+*>          1 <= ILO <= max(1,IHI); IHI <= N.
 *> \endverbatim
 *>
-*> \param[in] LDA
+*> \param[in,out] H
 *> \verbatim
-*>          LDA is INTEGER
-*>          The leading dimension of the array A.  LDA >= max(1,N).
+*>          H is COMPLEX*16 array, dimension (LDH,N)
+*>          On entry, the upper Hessenberg matrix H.
+*>          On exit, if INFO is zero and if WANTT is .TRUE., then H
+*>          is upper triangular in rows and columns ILO:IHI.  If INFO
+*>          is zero and if WANTT is .FALSE., then the contents of H
+*>          are unspecified on exit.  The output state of H in case
+*>          INF is positive is below under the description of INFO.
 *> \endverbatim
 *>
-*> \param[in] IPIV
+*> \param[in] LDH
 *> \verbatim
-*>          IPIV is INTEGER array, dimension (N)
-*>          The pivot indices from ZGETRF; for 1<=i<=N, row i of the
-*>          matrix was interchanged with row IPIV(i).
+*>          LDH is INTEGER
+*>          The leading dimension of the array H. LDH >= max(1,N).
 *> \endverbatim
 *>
-*> \param[in,out] B
+*> \param[out] W
 *> \verbatim
-*>          B is COMPLEX*16 array, dimension (LDB,NRHS)
-*>          On entry, the right hand side matrix B.
-*>          On exit, the solution matrix X.
+*>          W is COMPLEX*16 array, dimension (N)
+*>          The computed eigenvalues ILO to IHI are stored in the
+*>          corresponding elements of W. If WANTT is .TRUE., the
+*>          eigenvalues are stored in the same order as on the diagonal
+*>          of the Schur form returned in H, with W(i) = H(i,i).
 *> \endverbatim
 *>
-*> \param[in] LDB
+*> \param[in] ILOZ
 *> \verbatim
-*>          LDB is INTEGER
-*>          The leading dimension of the array B.  LDB >= max(1,N).
+*>          ILOZ is INTEGER
+*> \endverbatim
+*>
+*> \param[in] IHIZ
+*> \verbatim
+*>          IHIZ is INTEGER
+*>          Specify the rows of Z to which transformations must be
+*>          applied if WANTZ is .TRUE..
+*>          1 <= ILOZ <= ILO; IHI <= IHIZ <= N.
+*> \endverbatim
+*>
+*> \param[in,out] Z
+*> \verbatim
+*>          Z is COMPLEX*16 array, dimension (LDZ,N)
+*>          If WANTZ is .TRUE., on entry Z must contain the current
+*>          matrix Z of transformations accumulated by CHSEQR, and on
+*>          exit Z has been updated; transformations are applied only to
+*>          the submatrix Z(ILOZ:IHIZ,ILO:IHI).
+*>          If WANTZ is .FALSE., Z is not referenced.
+*> \endverbatim
+*>
+*> \param[in] LDZ
+*> \verbatim
+*>          LDZ is INTEGER
+*>          The leading dimension of the array Z. LDZ >= max(1,N).
 *> \endverbatim
 *>
 *> \param[out] INFO
 *> \verbatim
 *>          INFO is INTEGER
-*>          = 0:  successful exit
-*>          < 0:  if INFO = -i, the i-th argument had an illegal value
+*>           =   0: successful exit
+*>          .GT. 0: if INFO = i, ZLAHQR failed to compute all the
+*>                  eigenvalues ILO to IHI in a total of 30 iterations
+*>                  per eigenvalue; elements i+1:ihi of W contain
+*>                  those eigenvalues which have been successfully
+*>                  computed.
+*>
+*>                  If INFO .GT. 0 and WANTT is .FALSE., then on exit,
+*>                  the remaining unconverged eigenvalues are the
+*>                  eigenvalues of the upper Hessenberg matrix
+*>                  rows and columns ILO thorugh INFO of the final,
+*>                  output value of H.
+*>
+*>                  If INFO .GT. 0 and WANTT is .TRUE., then on exit
+*>          (*)       (initial value of H)*U  = U*(final value of H)
+*>                  where U is an orthognal matrix.    The final
+*>                  value of H is upper Hessenberg and triangular in
+*>                  rows and columns INFO+1 through IHI.
+*>
+*>                  If INFO .GT. 0 and WANTZ is .TRUE., then on exit
+*>                      (final value of Z)  = (initial value of Z)*U
+*>                  where U is the orthogonal matrix in (*)
+*>                  (regardless of the value of WANTT.)
+*> \endverbatim
+*
+*  Authors:
+*  ========
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date December 2016
+*
+*> \ingroup complex16OTHERauxiliary
+*
+*> \par Contributors:
+*  ==================
+*>
+*> \verbatim
+*>
+*>     02-96 Based on modifications by
+*>     David Day, Sandia National Laboratory, USA
+*>
+*>     12-04 Further modifications by
+*>     Ralph Byers, University of Kansas, USA
+*>     This is a modified version of ZLAHQR from LAPACK version 3.0.
+*>     It is (1) more robust against overflow and underflow and
+*>     (2) adopts the more conservative Ahues & Tisseur stopping
+*>     criterion (LAWN 122, 1997).
 *> \endverbatim
+*>
+*  =====================================================================
+      SUBROUTINE ZLAHQR( WANTT, WANTZ, N, ILO, IHI, H, LDH, W, ILOZ,
+     $                   IHIZ, Z, LDZ, INFO )
+*
+*  -- LAPACK auxiliary routine (version 3.7.0) --
+*  -- LAPACK is a software package provided by Univ. of Tennessee,    --
+*  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+*     December 2016
+*
+*     .. Scalar Arguments ..
+      INTEGER            IHI, IHIZ, ILO, ILOZ, INFO, LDH, LDZ, N
+      LOGICAL            WANTT, WANTZ
+*     ..
+*     .. Array Arguments ..
+      COMPLEX*16         H( LDH, * ), W( * ), Z( LDZ, * )
+*     ..
+*
+*  =========================================================
+*
+*     .. Parameters ..
+      COMPLEX*16         ZERO, ONE
+      PARAMETER          ( ZERO = ( 0.0d0, 0.0d0 ),
+     $                   ONE = ( 1.0d0, 0.0d0 ) )
+      DOUBLE PRECISION   RZERO, RONE, HALF
+      PARAMETER          ( RZERO = 0.0d0, RONE = 1.0d0, HALF = 0.5d0 )
+      DOUBLE PRECISION   DAT1
+      PARAMETER          ( DAT1 = 3.0d0 / 4.0d0 )
+*     ..
+*     .. Local Scalars ..
+      COMPLEX*16         CDUM, H11, H11S, H22, SC, SUM, T, T1, TEMP, U,
+     $                   V2, X, Y
+      DOUBLE PRECISION   AA, AB, BA, BB, H10, H21, RTEMP, S, SAFMAX,
+     $                   SAFMIN, SMLNUM, SX, T2, TST, ULP
+      INTEGER            I, I1, I2, ITS, ITMAX, J, JHI, JLO, K, L, M,
+     $                   NH, NZ
+*     ..
+*     .. Local Arrays ..
+      COMPLEX*16         V( 2 )
+*     ..
+*     .. External Functions ..
+      COMPLEX*16         ZLADIV
+      DOUBLE PRECISION   DLAMCH
+      EXTERNAL           ZLADIV, DLAMCH
+*     ..
+*     .. External Subroutines ..
+      EXTERNAL           DLABAD, ZCOPY, ZLARFG, ZSCAL
+*     ..
+*     .. Statement Functions ..
+      DOUBLE PRECISION   CABS1
+*     ..
+*     .. Intrinsic Functions ..
+      INTRINSIC          ABS, DBLE, DCONJG, DIMAG, MAX, MIN, SQRT
+*     ..
+*     .. Statement Function definitions ..
+      CABS1( CDUM ) = ABS( DBLE( CDUM ) ) + ABS( DIMAG( CDUM ) )
+*     ..
+*     .. Executable Statements ..
+*
+      INFO = 0
+*
+*     Quick return if possible
+*
+      IF( N.EQ.0 )
+     $   RETURN
+      IF( ILO.EQ.IHI ) THEN
+         W( ILO ) = H( ILO, ILO )
+         RETURN
+      END IF
+*
+*     ==== clear out the trash ====
+      DO 10 J = ILO, IHI - 3
+         H( J+2, J ) = ZERO
+         H( J+3, J ) = ZERO
+   10 CONTINUE
+      IF( ILO.LE.IHI-2 )
+     $   H( IHI, IHI-2 ) = ZERO
+*     ==== ensure that subdiagonal entries are real ====
+      IF( WANTT ) THEN
+         JLO = 1
+         JHI = N
+      ELSE
+         JLO = ILO
+         JHI = IHI
+      END IF
+      DO 20 I = ILO + 1, IHI
+         IF( DIMAG( H( I, I-1 ) ).NE.RZERO ) THEN
+*           ==== The following redundant normalization
+*           .    avoids problems with both gradual and
+*           .    sudden underflow in ABS(H(I,I-1)) ====
+            SC = H( I, I-1 ) / CABS1( H( I, I-1 ) )
+            SC = DCONJG( SC ) / ABS( SC )
+            H( I, I-1 ) = ABS( H( I, I-1 ) )
+            CALL ZSCAL( JHI-I+1, SC, H( I, I ), LDH )
+            CALL ZSCAL( MIN( JHI, I+1 )-JLO+1, DCONJG( SC ),
+     $                  H( JLO, I ), 1 )
+            IF( WANTZ )
+     $         CALL ZSCAL( IHIZ-ILOZ+1, DCONJG( SC ), Z( ILOZ, I ), 1 )
+         END IF
+   20 CONTINUE
+*
+      NH = IHI - ILO + 1
+      NZ = IHIZ - ILOZ + 1
+*
+*     Set machine-dependent constants for the stopping criterion.
+*
+      SAFMIN = DLAMCH( 'SAFE MINIMUM' )
+      SAFMAX = RONE / SAFMIN
+      CALL DLABAD( SAFMIN, SAFMAX )
+      ULP = DLAMCH( 'PRECISION' )
+      SMLNUM = SAFMIN*( DBLE( NH ) / ULP )
+*
+*     I1 and I2 are the indices of the first row and last column of H
+*     to which transformations must be applied. If eigenvalues only are
+*     being computed, I1 and I2 are set inside the main loop.
+*
+      IF( WANTT ) THEN
+         I1 = 1
+         I2 = N
+      END IF
+*
+*     ITMAX is the total number of QR iterations allowed.
+*
+      ITMAX = 30 * MAX( 10, NH )
+*
+*     The main loop begins here. I is the loop index and decreases from
+*     IHI to ILO in steps of 1. Each iteration of the loop works
+*     with the active submatrix in rows and columns L to I.
+*     Eigenvalues I+1 to IHI have already converged. Either L = ILO, or
+*     H(L,L-1) is negligible so that the matrix splits.
+*
+      I = IHI
+   30 CONTINUE
+      IF( I.LT.ILO )
+     $   GO TO 150
+*
+*     Perform QR iterations on rows and columns ILO to I until a
+*     submatrix of order 1 splits off at the bottom because a
+*     subdiagonal element has become negligible.
+*
+      L = ILO
+      DO 130 ITS = 0, ITMAX
+*
+*        Look for a single small subdiagonal element.
+*
+         DO 40 K = I, L + 1, -1
+            IF( CABS1( H( K, K-1 ) ).LE.SMLNUM )
+     $         GO TO 50
+            TST = CABS1( H( K-1, K-1 ) ) + CABS1( H( K, K ) )
+            IF( TST.EQ.ZERO ) THEN
+               IF( K-2.GE.ILO )
+     $            TST = TST + ABS( DBLE( H( K-1, K-2 ) ) )
+               IF( K+1.LE.IHI )
+     $            TST = TST + ABS( DBLE( H( K+1, K ) ) )
+            END IF
+*           ==== The following is a conservative small subdiagonal
+*           .    deflation criterion due to Ahues & Tisseur (LAWN 122,
+*           .    1997). It has better mathematical foundation and
+*           .    improves accuracy in some examples.  ====
+            IF( ABS( DBLE( H( K, K-1 ) ) ).LE.ULP*TST ) THEN
+               AB = MAX( CABS1( H( K, K-1 ) ), CABS1( H( K-1, K ) ) )
+               BA = MIN( CABS1( H( K, K-1 ) ), CABS1( H( K-1, K ) ) )
+               AA = MAX( CABS1( H( K, K ) ),
+     $              CABS1( H( K-1, K-1 )-H( K, K ) ) )
+               BB = MIN( CABS1( H( K, K ) ),
+     $              CABS1( H( K-1, K-1 )-H( K, K ) ) )
+               S = AA + AB
+               IF( BA*( AB / S ).LE.MAX( SMLNUM,
+     $             ULP*( BB*( AA / S ) ) ) )GO TO 50
+            END IF
+   40    CONTINUE
+   50    CONTINUE
+         L = K
+         IF( L.GT.ILO ) THEN
+*
+*           H(L,L-1) is negligible
+*
+            H( L, L-1 ) = ZERO
+         END IF
 *
-*  Authors:
-*  ========
+*        Exit from loop if a submatrix of order 1 has split off.
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+         IF( L.GE.I )
+     $      GO TO 140
 *
-*> \date November 2011
+*        Now the active submatrix is in rows and columns L to I. If
+*        eigenvalues only are being computed, only the active submatrix
+*        need be transformed.
 *
-*> \ingroup complex16GEcomputational
+         IF( .NOT.WANTT ) THEN
+            I1 = L
+            I2 = I
+         END IF
 *
-*  =====================================================================
-      SUBROUTINE ZGETRS( TRANS, N, NRHS, A, LDA, IPIV, B, LDB, INFO )
+         IF( ITS.EQ.10 ) THEN
 *
-*  -- LAPACK computational routine (version 3.4.0) --
-*  -- LAPACK is a software package provided by Univ. of Tennessee,    --
-*  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     November 2011
+*           Exceptional shift.
 *
-*     .. Scalar Arguments ..
-      CHARACTER          TRANS
-      INTEGER            INFO, LDA, LDB, N, NRHS
-*     ..
-*     .. Array Arguments ..
-      INTEGER            IPIV( * )
-      COMPLEX*16         A( LDA, * ), B( LDB, * )
-*     ..
+            S = DAT1*ABS( DBLE( H( L+1, L ) ) )
+            T = S + H( L, L )
+         ELSE IF( ITS.EQ.20 ) THEN
 *
-*  =====================================================================
+*           Exceptional shift.
 *
-*     .. Parameters ..
-      COMPLEX*16         ONE
-      PARAMETER          ( ONE = ( 1.0D+0, 0.0D+0 ) )
-*     ..
-*     .. Local Scalars ..
-      LOGICAL            NOTRAN
-*     ..
-*     .. External Functions ..
-      LOGICAL            LSAME
-      EXTERNAL           LSAME
-*     ..
-*     .. External Subroutines ..
-      EXTERNAL           XERBLA, ZLASWP, ZTRSM
-*     ..
-*     .. Intrinsic Functions ..
-      INTRINSIC          MAX
-*     ..
-*     .. Executable Statements ..
+            S = DAT1*ABS( DBLE( H( I, I-1 ) ) )
+            T = S + H( I, I )
+         ELSE
 *
-*     Test the input parameters.
+*           Wilkinson's shift.
 *
-      INFO = 0
-      NOTRAN = LSAME( TRANS, 'N' )
-      IF( .NOT.NOTRAN .AND. .NOT.LSAME( TRANS, 'T' ) .AND. .NOT.
-     $    LSAME( TRANS, 'C' ) ) THEN
-         INFO = -1
-      ELSE IF( N.LT.0 ) THEN
-         INFO = -2
-      ELSE IF( NRHS.LT.0 ) THEN
-         INFO = -3
-      ELSE IF( LDA.LT.MAX( 1, N ) ) THEN
-         INFO = -5
-      ELSE IF( LDB.LT.MAX( 1, N ) ) THEN
-         INFO = -8
-      END IF
-      IF( INFO.NE.0 ) THEN
-         CALL XERBLA( 'ZGETRS', -INFO )
-         RETURN
-      END IF
+            T = H( I, I )
+            U = SQRT( H( I-1, I ) )*SQRT( H( I, I-1 ) )
+            S = CABS1( U )
+            IF( S.NE.RZERO ) THEN
+               X = HALF*( H( I-1, I-1 )-T )
+               SX = CABS1( X )
+               S = MAX( S, CABS1( X ) )
+               Y = S*SQRT( ( X / S )**2+( U / S )**2 )
+               IF( SX.GT.RZERO ) THEN
+                  IF( DBLE( X / SX )*DBLE( Y )+DIMAG( X / SX )*
+     $                DIMAG( Y ).LT.RZERO )Y = -Y
+               END IF
+               T = T - U*ZLADIV( U, ( X+Y ) )
+            END IF
+         END IF
 *
-*     Quick return if possible
+*        Look for two consecutive small subdiagonal elements.
 *
-      IF( N.EQ.0 .OR. NRHS.EQ.0 )
-     $   RETURN
+         DO 60 M = I - 1, L + 1, -1
 *
-      IF( NOTRAN ) THEN
+*           Determine the effect of starting the single-shift QR
+*           iteration at row M, and see if this would make H(M,M-1)
+*           negligible.
 *
-*        Solve A * X = B.
+            H11 = H( M, M )
+            H22 = H( M+1, M+1 )
+            H11S = H11 - T
+            H21 = DBLE( H( M+1, M ) )
+            S = CABS1( H11S ) + ABS( H21 )
+            H11S = H11S / S
+            H21 = H21 / S
+            V( 1 ) = H11S
+            V( 2 ) = H21
+            H10 = DBLE( H( M, M-1 ) )
+            IF( ABS( H10 )*ABS( H21 ).LE.ULP*
+     $          ( CABS1( H11S )*( CABS1( H11 )+CABS1( H22 ) ) ) )
+     $          GO TO 70
+   60    CONTINUE
+         H11 = H( L, L )
+         H22 = H( L+1, L+1 )
+         H11S = H11 - T
+         H21 = DBLE( H( L+1, L ) )
+         S = CABS1( H11S ) + ABS( H21 )
+         H11S = H11S / S
+         H21 = H21 / S
+         V( 1 ) = H11S
+         V( 2 ) = H21
+   70    CONTINUE
 *
-*        Apply row interchanges to the right hand sides.
+*        Single-shift QR step
 *
-         CALL ZLASWP( NRHS, B, LDB, 1, N, IPIV, 1 )
+         DO 120 K = M, I - 1
 *
-*        Solve L*X = B, overwriting B with X.
+*           The first iteration of this loop determines a reflection G
+*           from the vector V and applies it from left and right to H,
+*           thus creating a nonzero bulge below the subdiagonal.
 *
-         CALL ZTRSM( 'Left', 'Lower', 'No transpose', 'Unit', N, NRHS,
-     $               ONE, A, LDA, B, LDB )
+*           Each subsequent iteration determines a reflection G to
+*           restore the Hessenberg form in the (K-1)th column, and thus
+*           chases the bulge one step toward the bottom of the active
+*           submatrix.
 *
-*        Solve U*X = B, overwriting B with X.
+*           V(2) is always real before the call to ZLARFG, and hence
+*           after the call T2 ( = T1*V(2) ) is also real.
 *
-         CALL ZTRSM( 'Left', 'Upper', 'No transpose', 'Non-unit', N,
-     $               NRHS, ONE, A, LDA, B, LDB )
-      ELSE
+            IF( K.GT.M )
+     $         CALL ZCOPY( 2, H( K, K-1 ), 1, V, 1 )
+            CALL ZLARFG( 2, V( 1 ), V( 2 ), 1, T1 )
+            IF( K.GT.M ) THEN
+               H( K, K-1 ) = V( 1 )
+               H( K+1, K-1 ) = ZERO
+            END IF
+            V2 = V( 2 )
+            T2 = DBLE( T1*V2 )
 *
-*        Solve A**T * X = B  or A**H * X = B.
+*           Apply G from the left to transform the rows of the matrix
+*           in columns K to I2.
 *
-*        Solve U**T *X = B or U**H *X = B, overwriting B with X.
+            DO 80 J = K, I2
+               SUM = DCONJG( T1 )*H( K, J ) + T2*H( K+1, J )
+               H( K, J ) = H( K, J ) - SUM
+               H( K+1, J ) = H( K+1, J ) - SUM*V2
+   80       CONTINUE
 *
-         CALL ZTRSM( 'Left', 'Upper', TRANS, 'Non-unit', N, NRHS, ONE,
-     $               A, LDA, B, LDB )
+*           Apply G from the right to transform the columns of the
+*           matrix in rows I1 to min(K+2,I).
 *
-*        Solve L**T *X = B, or L**H *X = B overwriting B with X.
+            DO 90 J = I1, MIN( K+2, I )
+               SUM = T1*H( J, K ) + T2*H( J, K+1 )
+               H( J, K ) = H( J, K ) - SUM
+               H( J, K+1 ) = H( J, K+1 ) - SUM*DCONJG( V2 )
+   90       CONTINUE
 *
-         CALL ZTRSM( 'Left', 'Lower', TRANS, 'Unit', N, NRHS, ONE, A,
-     $               LDA, B, LDB )
+            IF( WANTZ ) THEN
 *
-*        Apply row interchanges to the solution vectors.
+*              Accumulate transformations in the matrix Z
 *
-         CALL ZLASWP( NRHS, B, LDB, 1, N, IPIV, -1 )
-      END IF
+               DO 100 J = ILOZ, IHIZ
+                  SUM = T1*Z( J, K ) + T2*Z( J, K+1 )
+                  Z( J, K ) = Z( J, K ) - SUM
+                  Z( J, K+1 ) = Z( J, K+1 ) - SUM*DCONJG( V2 )
+  100          CONTINUE
+            END IF
+*
+            IF( K.EQ.M .AND. M.GT.L ) THEN
+*
+*              If the QR step was started at row M > L because two
+*              consecutive small subdiagonals were found, then extra
+*              scaling must be performed to ensure that H(M,M-1) remains
+*              real.
 *
+               TEMP = ONE - T1
+               TEMP = TEMP / ABS( TEMP )
+               H( M+1, M ) = H( M+1, M )*DCONJG( TEMP )
+               IF( M+2.LE.I )
+     $            H( M+2, M+1 ) = H( M+2, M+1 )*TEMP
+               DO 110 J = M, I
+                  IF( J.NE.M+1 ) THEN
+                     IF( I2.GT.J )
+     $                  CALL ZSCAL( I2-J, TEMP, H( J, J+1 ), LDH )
+                     CALL ZSCAL( J-I1, DCONJG( TEMP ), H( I1, J ), 1 )
+                     IF( WANTZ ) THEN
+                        CALL ZSCAL( NZ, DCONJG( TEMP ), Z( ILOZ, J ),
+     $                              1 )
+                     END IF
+                  END IF
+  110          CONTINUE
+            END IF
+  120    CONTINUE
+*
+*        Ensure that H(I,I-1) is real.
+*
+         TEMP = H( I, I-1 )
+         IF( DIMAG( TEMP ).NE.RZERO ) THEN
+            RTEMP = ABS( TEMP )
+            H( I, I-1 ) = RTEMP
+            TEMP = TEMP / RTEMP
+            IF( I2.GT.I )
+     $         CALL ZSCAL( I2-I, DCONJG( TEMP ), H( I, I+1 ), LDH )
+            CALL ZSCAL( I-I1, TEMP, H( I1, I ), 1 )
+            IF( WANTZ ) THEN
+               CALL ZSCAL( NZ, TEMP, Z( ILOZ, I ), 1 )
+            END IF
+         END IF
+*
+  130 CONTINUE
+*
+*     Failure to converge in remaining number of iterations
+*
+      INFO = I
       RETURN
 *
-*     End of ZGETRS
+  140 CONTINUE
+*
+*     H(I,I-1) is negligible: one eigenvalue has converged.
+*
+      W( I ) = H( I, I )
+*
+*     return to start of the main loop with new value of I.
+*
+      I = L - 1
+      GO TO 30
+*
+  150 CONTINUE
+      RETURN
+*
+*     End of ZLAHQR
 *
       END
-*> \brief <b> ZHEEV computes the eigenvalues and, optionally, the left and/or right eigenvectors for HE matrices</b>
+*> \brief \b ZLAHR2 reduces the specified number of first columns of a general rectangular matrix A so that elements below the specified subdiagonal are zero, and returns auxiliary matrices which are needed to apply the transformation to the unreduced part of A.
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download ZHEEV + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/zheev.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/zheev.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/zheev.f"> 
+*> Download ZLAHR2 + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/zlahr2.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/zlahr2.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/zlahr2.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
-*       SUBROUTINE ZHEEV( JOBZ, UPLO, N, A, LDA, W, WORK, LWORK, RWORK,
-*                         INFO )
-* 
+*       SUBROUTINE ZLAHR2( N, K, NB, A, LDA, TAU, T, LDT, Y, LDY )
+*
 *       .. Scalar Arguments ..
-*       CHARACTER          JOBZ, UPLO
-*       INTEGER            INFO, LDA, LWORK, N
+*       INTEGER            K, LDA, LDT, LDY, N, NB
 *       ..
 *       .. Array Arguments ..
-*       DOUBLE PRECISION   RWORK( * ), W( * )
-*       COMPLEX*16         A( LDA, * ), WORK( * )
+*       COMPLEX*16        A( LDA, * ), T( LDT, NB ), TAU( NB ),
+*      $                   Y( LDY, NB )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
 *>
 *> \verbatim
 *>
-*> ZHEEV computes all eigenvalues and, optionally, eigenvectors of a
-*> complex Hermitian matrix A.
+*> ZLAHR2 reduces the first NB columns of A complex general n-BY-(n-k+1)
+*> matrix A so that elements below the k-th subdiagonal are zero. The
+*> reduction is performed by an unitary similarity transformation
+*> Q**H * A * Q. The routine returns the matrices V and T which determine
+*> Q as a block reflector I - V*T*V**H, and also the matrix Y = A * V * T.
+*>
+*> This is an auxiliary routine called by ZGEHRD.
 *> \endverbatim
 *
 *  Arguments:
 *  ==========
 *
-*> \param[in] JOBZ
+*> \param[in] N
 *> \verbatim
-*>          JOBZ is CHARACTER*1
-*>          = 'N':  Compute eigenvalues only;
-*>          = 'V':  Compute eigenvalues and eigenvectors.
+*>          N is INTEGER
+*>          The order of the matrix A.
 *> \endverbatim
 *>
-*> \param[in] UPLO
+*> \param[in] K
 *> \verbatim
-*>          UPLO is CHARACTER*1
-*>          = 'U':  Upper triangle of A is stored;
-*>          = 'L':  Lower triangle of A is stored.
+*>          K is INTEGER
+*>          The offset for the reduction. Elements below the k-th
+*>          subdiagonal in the first NB columns are reduced to zero.
+*>          K < N.
 *> \endverbatim
 *>
-*> \param[in] N
+*> \param[in] NB
 *> \verbatim
-*>          N is INTEGER
-*>          The order of the matrix A.  N >= 0.
+*>          NB is INTEGER
+*>          The number of columns to be reduced.
 *> \endverbatim
 *>
 *> \param[in,out] A
 *> \verbatim
-*>          A is COMPLEX*16 array, dimension (LDA, N)
-*>          On entry, the Hermitian matrix A.  If UPLO = 'U', the
-*>          leading N-by-N upper triangular part of A contains the
-*>          upper triangular part of the matrix A.  If UPLO = 'L',
-*>          the leading N-by-N lower triangular part of A contains
-*>          the lower triangular part of the matrix A.
-*>          On exit, if JOBZ = 'V', then if INFO = 0, A contains the
-*>          orthonormal eigenvectors of the matrix A.
-*>          If JOBZ = 'N', then on exit the lower triangle (if UPLO='L')
-*>          or the upper triangle (if UPLO='U') of A, including the
-*>          diagonal, is destroyed.
+*>          A is COMPLEX*16 array, dimension (LDA,N-K+1)
+*>          On entry, the n-by-(n-k+1) general matrix A.
+*>          On exit, the elements on and above the k-th subdiagonal in
+*>          the first NB columns are overwritten with the corresponding
+*>          elements of the reduced matrix; the elements below the k-th
+*>          subdiagonal, with the array TAU, represent the matrix Q as a
+*>          product of elementary reflectors. The other columns of A are
+*>          unchanged. See Further Details.
 *> \endverbatim
 *>
 *> \param[in] LDA
@@ -10170,298 +24749,325 @@
 *>          The leading dimension of the array A.  LDA >= max(1,N).
 *> \endverbatim
 *>
-*> \param[out] W
+*> \param[out] TAU
 *> \verbatim
-*>          W is DOUBLE PRECISION array, dimension (N)
-*>          If INFO = 0, the eigenvalues in ascending order.
+*>          TAU is COMPLEX*16 array, dimension (NB)
+*>          The scalar factors of the elementary reflectors. See Further
+*>          Details.
 *> \endverbatim
 *>
-*> \param[out] WORK
+*> \param[out] T
 *> \verbatim
-*>          WORK is COMPLEX*16 array, dimension (MAX(1,LWORK))
-*>          On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+*>          T is COMPLEX*16 array, dimension (LDT,NB)
+*>          The upper triangular matrix T.
 *> \endverbatim
 *>
-*> \param[in] LWORK
+*> \param[in] LDT
 *> \verbatim
-*>          LWORK is INTEGER
-*>          The length of the array WORK.  LWORK >= max(1,2*N-1).
-*>          For optimal efficiency, LWORK >= (NB+1)*N,
-*>          where NB is the blocksize for ZHETRD returned by ILAENV.
-*>
-*>          If LWORK = -1, then a workspace query is assumed; the routine
-*>          only calculates the optimal size of the WORK array, returns
-*>          this value as the first entry of the WORK array, and no error
-*>          message related to LWORK is issued by XERBLA.
+*>          LDT is INTEGER
+*>          The leading dimension of the array T.  LDT >= NB.
 *> \endverbatim
 *>
-*> \param[out] RWORK
+*> \param[out] Y
 *> \verbatim
-*>          RWORK is DOUBLE PRECISION array, dimension (max(1, 3*N-2))
+*>          Y is COMPLEX*16 array, dimension (LDY,NB)
+*>          The n-by-nb matrix Y.
 *> \endverbatim
 *>
-*> \param[out] INFO
+*> \param[in] LDY
 *> \verbatim
-*>          INFO is INTEGER
-*>          = 0:  successful exit
-*>          < 0:  if INFO = -i, the i-th argument had an illegal value
-*>          > 0:  if INFO = i, the algorithm failed to converge; i
-*>                off-diagonal elements of an intermediate tridiagonal
-*>                form did not converge to zero.
+*>          LDY is INTEGER
+*>          The leading dimension of the array Y. LDY >= N.
 *> \endverbatim
 *
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date November 2011
+*> \date December 2016
 *
-*> \ingroup complex16HEeigen
+*> \ingroup complex16OTHERauxiliary
+*
+*> \par Further Details:
+*  =====================
+*>
+*> \verbatim
+*>
+*>  The matrix Q is represented as a product of nb elementary reflectors
+*>
+*>     Q = H(1) H(2) . . . H(nb).
+*>
+*>  Each H(i) has the form
+*>
+*>     H(i) = I - tau * v * v**H
+*>
+*>  where tau is a complex scalar, and v is a complex vector with
+*>  v(1:i+k-1) = 0, v(i+k) = 1; v(i+k+1:n) is stored on exit in
+*>  A(i+k+1:n,i), and tau in TAU(i).
+*>
+*>  The elements of the vectors v together form the (n-k+1)-by-nb matrix
+*>  V which is needed, with T and Y, to apply the transformation to the
+*>  unreduced part of the matrix, using an update of the form:
+*>  A := (I - V*T*V**H) * (A - Y*V**H).
+*>
+*>  The contents of A on exit are illustrated by the following example
+*>  with n = 7, k = 3 and nb = 2:
+*>
+*>     ( a   a   a   a   a )
+*>     ( a   a   a   a   a )
+*>     ( a   a   a   a   a )
+*>     ( h   h   a   a   a )
+*>     ( v1  h   a   a   a )
+*>     ( v1  v2  a   a   a )
+*>     ( v1  v2  a   a   a )
+*>
+*>  where a denotes an element of the original matrix A, h denotes a
+*>  modified element of the upper Hessenberg matrix H, and vi denotes an
+*>  element of the vector defining H(i).
+*>
+*>  This subroutine is a slight modification of LAPACK-3.0's DLAHRD
+*>  incorporating improvements proposed by Quintana-Orti and Van de
+*>  Gejin. Note that the entries of A(1:K,2:NB) differ from those
+*>  returned by the original LAPACK-3.0's DLAHRD routine. (This
+*>  subroutine is not backward compatible with LAPACK-3.0's DLAHRD.)
+*> \endverbatim
 *
+*> \par References:
+*  ================
+*>
+*>  Gregorio Quintana-Orti and Robert van de Geijn, "Improving the
+*>  performance of reduction to Hessenberg form," ACM Transactions on
+*>  Mathematical Software, 32(2):180-194, June 2006.
+*>
 *  =====================================================================
-      SUBROUTINE ZHEEV( JOBZ, UPLO, N, A, LDA, W, WORK, LWORK, RWORK,
-     $                  INFO )
+      SUBROUTINE ZLAHR2( N, K, NB, A, LDA, TAU, T, LDT, Y, LDY )
 *
-*  -- LAPACK driver routine (version 3.4.0) --
+*  -- LAPACK auxiliary routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     November 2011
+*     December 2016
 *
 *     .. Scalar Arguments ..
-      CHARACTER          JOBZ, UPLO
-      INTEGER            INFO, LDA, LWORK, N
+      INTEGER            K, LDA, LDT, LDY, N, NB
 *     ..
 *     .. Array Arguments ..
-      DOUBLE PRECISION   RWORK( * ), W( * )
-      COMPLEX*16         A( LDA, * ), WORK( * )
+      COMPLEX*16        A( LDA, * ), T( LDT, NB ), TAU( NB ),
+     $                   Y( LDY, NB )
 *     ..
 *
 *  =====================================================================
 *
 *     .. Parameters ..
-      DOUBLE PRECISION   ZERO, ONE
-      PARAMETER          ( ZERO = 0.0D0, ONE = 1.0D0 )
-      COMPLEX*16         CONE
-      PARAMETER          ( CONE = ( 1.0D0, 0.0D0 ) )
+      COMPLEX*16        ZERO, ONE
+      PARAMETER          ( ZERO = ( 0.0D+0, 0.0D+0 ),
+     $                     ONE = ( 1.0D+0, 0.0D+0 ) )
 *     ..
 *     .. Local Scalars ..
-      LOGICAL            LOWER, LQUERY, WANTZ
-      INTEGER            IINFO, IMAX, INDE, INDTAU, INDWRK, ISCALE,
-     $                   LLWORK, LWKOPT, NB
-      DOUBLE PRECISION   ANRM, BIGNUM, EPS, RMAX, RMIN, SAFMIN, SIGMA,
-     $                   SMLNUM
-*     ..
-*     .. External Functions ..
-      LOGICAL            LSAME
-      INTEGER            ILAENV
-      DOUBLE PRECISION   DLAMCH, ZLANHE
-      EXTERNAL           LSAME, ILAENV, DLAMCH, ZLANHE
+      INTEGER            I
+      COMPLEX*16        EI
 *     ..
 *     .. External Subroutines ..
-      EXTERNAL           DSCAL, DSTERF, XERBLA, ZHETRD, ZLASCL, ZSTEQR,
-     $                   ZUNGTR
+      EXTERNAL           ZAXPY, ZCOPY, ZGEMM, ZGEMV, ZLACPY,
+     $                   ZLARFG, ZSCAL, ZTRMM, ZTRMV, ZLACGV
 *     ..
 *     .. Intrinsic Functions ..
-      INTRINSIC          MAX, SQRT
+      INTRINSIC          MIN
 *     ..
 *     .. Executable Statements ..
 *
-*     Test the input parameters.
+*     Quick return if possible
 *
-      WANTZ = LSAME( JOBZ, 'V' )
-      LOWER = LSAME( UPLO, 'L' )
-      LQUERY = ( LWORK.EQ.-1 )
+      IF( N.LE.1 )
+     $   RETURN
 *
-      INFO = 0
-      IF( .NOT.( WANTZ .OR. LSAME( JOBZ, 'N' ) ) ) THEN
-         INFO = -1
-      ELSE IF( .NOT.( LOWER .OR. LSAME( UPLO, 'U' ) ) ) THEN
-         INFO = -2
-      ELSE IF( N.LT.0 ) THEN
-         INFO = -3
-      ELSE IF( LDA.LT.MAX( 1, N ) ) THEN
-         INFO = -5
-      END IF
+      DO 10 I = 1, NB
+         IF( I.GT.1 ) THEN
 *
-      IF( INFO.EQ.0 ) THEN
-         NB = ILAENV( 1, 'ZHETRD', UPLO, N, -1, -1, -1 )
-         LWKOPT = MAX( 1, ( NB+1 )*N )
-         WORK( 1 ) = LWKOPT
+*           Update A(K+1:N,I)
 *
-         IF( LWORK.LT.MAX( 1, 2*N-1 ) .AND. .NOT.LQUERY )
-     $      INFO = -8
-      END IF
+*           Update I-th column of A - Y * V**H
 *
-      IF( INFO.NE.0 ) THEN
-         CALL XERBLA( 'ZHEEV ', -INFO )
-         RETURN
-      ELSE IF( LQUERY ) THEN
-         RETURN
-      END IF
+            CALL ZLACGV( I-1, A( K+I-1, 1 ), LDA )
+            CALL ZGEMV( 'NO TRANSPOSE', N-K, I-1, -ONE, Y(K+1,1), LDY,
+     $                  A( K+I-1, 1 ), LDA, ONE, A( K+1, I ), 1 )
+            CALL ZLACGV( I-1, A( K+I-1, 1 ), LDA )
 *
-*     Quick return if possible
+*           Apply I - V * T**H * V**H to this column (call it b) from the
+*           left, using the last column of T as workspace
 *
-      IF( N.EQ.0 ) THEN
-         RETURN
-      END IF
+*           Let  V = ( V1 )   and   b = ( b1 )   (first I-1 rows)
+*                    ( V2 )             ( b2 )
 *
-      IF( N.EQ.1 ) THEN
-         W( 1 ) = A( 1, 1 )
-         WORK( 1 ) = 1
-         IF( WANTZ )
-     $      A( 1, 1 ) = CONE
-         RETURN
-      END IF
+*           where V1 is unit lower triangular
+*
+*           w := V1**H * b1
+*
+            CALL ZCOPY( I-1, A( K+1, I ), 1, T( 1, NB ), 1 )
+            CALL ZTRMV( 'Lower', 'Conjugate transpose', 'UNIT',
+     $                  I-1, A( K+1, 1 ),
+     $                  LDA, T( 1, NB ), 1 )
+*
+*           w := w + V2**H * b2
+*
+            CALL ZGEMV( 'Conjugate transpose', N-K-I+1, I-1,
+     $                  ONE, A( K+I, 1 ),
+     $                  LDA, A( K+I, I ), 1, ONE, T( 1, NB ), 1 )
+*
+*           w := T**H * w
+*
+            CALL ZTRMV( 'Upper', 'Conjugate transpose', 'NON-UNIT',
+     $                  I-1, T, LDT,
+     $                  T( 1, NB ), 1 )
+*
+*           b2 := b2 - V2*w
 *
-*     Get machine constants.
+            CALL ZGEMV( 'NO TRANSPOSE', N-K-I+1, I-1, -ONE,
+     $                  A( K+I, 1 ),
+     $                  LDA, T( 1, NB ), 1, ONE, A( K+I, I ), 1 )
 *
-      SAFMIN = DLAMCH( 'Safe minimum' )
-      EPS = DLAMCH( 'Precision' )
-      SMLNUM = SAFMIN / EPS
-      BIGNUM = ONE / SMLNUM
-      RMIN = SQRT( SMLNUM )
-      RMAX = SQRT( BIGNUM )
+*           b1 := b1 - V1*w
 *
-*     Scale matrix to allowable range, if necessary.
+            CALL ZTRMV( 'Lower', 'NO TRANSPOSE',
+     $                  'UNIT', I-1,
+     $                  A( K+1, 1 ), LDA, T( 1, NB ), 1 )
+            CALL ZAXPY( I-1, -ONE, T( 1, NB ), 1, A( K+1, I ), 1 )
 *
-      ANRM = ZLANHE( 'M', UPLO, N, A, LDA, RWORK )
-      ISCALE = 0
-      IF( ANRM.GT.ZERO .AND. ANRM.LT.RMIN ) THEN
-         ISCALE = 1
-         SIGMA = RMIN / ANRM
-      ELSE IF( ANRM.GT.RMAX ) THEN
-         ISCALE = 1
-         SIGMA = RMAX / ANRM
-      END IF
-      IF( ISCALE.EQ.1 )
-     $   CALL ZLASCL( UPLO, 0, 0, ONE, SIGMA, N, N, A, LDA, INFO )
+            A( K+I-1, I-1 ) = EI
+         END IF
 *
-*     Call ZHETRD to reduce Hermitian matrix to tridiagonal form.
+*        Generate the elementary reflector H(I) to annihilate
+*        A(K+I+1:N,I)
 *
-      INDE = 1
-      INDTAU = 1
-      INDWRK = INDTAU + N
-      LLWORK = LWORK - INDWRK + 1
-      CALL ZHETRD( UPLO, N, A, LDA, W, RWORK( INDE ), WORK( INDTAU ),
-     $             WORK( INDWRK ), LLWORK, IINFO )
+         CALL ZLARFG( N-K-I+1, A( K+I, I ), A( MIN( K+I+1, N ), I ), 1,
+     $                TAU( I ) )
+         EI = A( K+I, I )
+         A( K+I, I ) = ONE
 *
-*     For eigenvalues only, call DSTERF.  For eigenvectors, first call
-*     ZUNGTR to generate the unitary matrix, then call ZSTEQR.
+*        Compute  Y(K+1:N,I)
 *
-      IF( .NOT.WANTZ ) THEN
-         CALL DSTERF( N, W, RWORK( INDE ), INFO )
-      ELSE
-         CALL ZUNGTR( UPLO, N, A, LDA, WORK( INDTAU ), WORK( INDWRK ),
-     $                LLWORK, IINFO )
-         INDWRK = INDE + N
-         CALL ZSTEQR( JOBZ, N, W, RWORK( INDE ), A, LDA,
-     $                RWORK( INDWRK ), INFO )
-      END IF
+         CALL ZGEMV( 'NO TRANSPOSE', N-K, N-K-I+1,
+     $               ONE, A( K+1, I+1 ),
+     $               LDA, A( K+I, I ), 1, ZERO, Y( K+1, I ), 1 )
+         CALL ZGEMV( 'Conjugate transpose', N-K-I+1, I-1,
+     $               ONE, A( K+I, 1 ), LDA,
+     $               A( K+I, I ), 1, ZERO, T( 1, I ), 1 )
+         CALL ZGEMV( 'NO TRANSPOSE', N-K, I-1, -ONE,
+     $               Y( K+1, 1 ), LDY,
+     $               T( 1, I ), 1, ONE, Y( K+1, I ), 1 )
+         CALL ZSCAL( N-K, TAU( I ), Y( K+1, I ), 1 )
 *
-*     If matrix was scaled, then rescale eigenvalues appropriately.
+*        Compute T(1:I,I)
 *
-      IF( ISCALE.EQ.1 ) THEN
-         IF( INFO.EQ.0 ) THEN
-            IMAX = N
-         ELSE
-            IMAX = INFO - 1
-         END IF
-         CALL DSCAL( IMAX, ONE / SIGMA, W, 1 )
-      END IF
+         CALL ZSCAL( I-1, -TAU( I ), T( 1, I ), 1 )
+         CALL ZTRMV( 'Upper', 'No Transpose', 'NON-UNIT',
+     $               I-1, T, LDT,
+     $               T( 1, I ), 1 )
+         T( I, I ) = TAU( I )
 *
-*     Set WORK(1) to optimal complex workspace size.
+   10 CONTINUE
+      A( K+NB, NB ) = EI
 *
-      WORK( 1 ) = LWKOPT
+*     Compute Y(1:K,1:NB)
+*
+      CALL ZLACPY( 'ALL', K, NB, A( 1, 2 ), LDA, Y, LDY )
+      CALL ZTRMM( 'RIGHT', 'Lower', 'NO TRANSPOSE',
+     $            'UNIT', K, NB,
+     $            ONE, A( K+1, 1 ), LDA, Y, LDY )
+      IF( N.GT.K+NB )
+     $   CALL ZGEMM( 'NO TRANSPOSE', 'NO TRANSPOSE', K,
+     $               NB, N-K-NB, ONE,
+     $               A( 1, 2+NB ), LDA, A( K+1+NB, 1 ), LDA, ONE, Y,
+     $               LDY )
+      CALL ZTRMM( 'RIGHT', 'Upper', 'NO TRANSPOSE',
+     $            'NON-UNIT', K, NB,
+     $            ONE, T, LDT, Y, LDY )
 *
       RETURN
 *
-*     End of ZHEEV
+*     End of ZLAHR2
 *
       END
-*> \brief \b ZHETD2 reduces a Hermitian matrix to real symmetric tridiagonal form by an unitary similarity transformation (unblocked algorithm).
+*> \brief \b ZLAHRD reduces the first nb columns of a general rectangular matrix A so that elements below the k-th subdiagonal are zero, and returns auxiliary matrices which are needed to apply the transformation to the unreduced part of A.
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download ZHETD2 + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/zhetd2.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/zhetd2.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/zhetd2.f"> 
+*> Download ZLAHRD + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/zlahrd.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/zlahrd.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/zlahrd.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
-*       SUBROUTINE ZHETD2( UPLO, N, A, LDA, D, E, TAU, INFO )
-* 
+*       SUBROUTINE ZLAHRD( N, K, NB, A, LDA, TAU, T, LDT, Y, LDY )
+*
 *       .. Scalar Arguments ..
-*       CHARACTER          UPLO
-*       INTEGER            INFO, LDA, N
+*       INTEGER            K, LDA, LDT, LDY, N, NB
 *       ..
 *       .. Array Arguments ..
-*       DOUBLE PRECISION   D( * ), E( * )
-*       COMPLEX*16         A( LDA, * ), TAU( * )
+*       COMPLEX*16         A( LDA, * ), T( LDT, NB ), TAU( NB ),
+*      $                   Y( LDY, NB )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
 *>
 *> \verbatim
 *>
-*> ZHETD2 reduces a complex Hermitian matrix A to real symmetric
-*> tridiagonal form T by a unitary similarity transformation:
-*> Q**H * A * Q = T.
+*> This routine is deprecated and has been replaced by routine ZLAHR2.
+*>
+*> ZLAHRD reduces the first NB columns of a complex general n-by-(n-k+1)
+*> matrix A so that elements below the k-th subdiagonal are zero. The
+*> reduction is performed by a unitary similarity transformation
+*> Q**H * A * Q. The routine returns the matrices V and T which determine
+*> Q as a block reflector I - V*T*V**H, and also the matrix Y = A * V * T.
 *> \endverbatim
 *
 *  Arguments:
 *  ==========
 *
-*> \param[in] UPLO
+*> \param[in] N
 *> \verbatim
-*>          UPLO is CHARACTER*1
-*>          Specifies whether the upper or lower triangular part of the
-*>          Hermitian matrix A is stored:
-*>          = 'U':  Upper triangular
-*>          = 'L':  Lower triangular
+*>          N is INTEGER
+*>          The order of the matrix A.
 *> \endverbatim
 *>
-*> \param[in] N
+*> \param[in] K
 *> \verbatim
-*>          N is INTEGER
-*>          The order of the matrix A.  N >= 0.
+*>          K is INTEGER
+*>          The offset for the reduction. Elements below the k-th
+*>          subdiagonal in the first NB columns are reduced to zero.
+*> \endverbatim
+*>
+*> \param[in] NB
+*> \verbatim
+*>          NB is INTEGER
+*>          The number of columns to be reduced.
 *> \endverbatim
 *>
 *> \param[in,out] A
 *> \verbatim
-*>          A is COMPLEX*16 array, dimension (LDA,N)
-*>          On entry, the Hermitian matrix A.  If UPLO = 'U', the leading
-*>          n-by-n upper triangular part of A contains the upper
-*>          triangular part of the matrix A, and the strictly lower
-*>          triangular part of A is not referenced.  If UPLO = 'L', the
-*>          leading n-by-n lower triangular part of A contains the lower
-*>          triangular part of the matrix A, and the strictly upper
-*>          triangular part of A is not referenced.
-*>          On exit, if UPLO = 'U', the diagonal and first superdiagonal
-*>          of A are overwritten by the corresponding elements of the
-*>          tridiagonal matrix T, and the elements above the first
-*>          superdiagonal, with the array TAU, represent the unitary
-*>          matrix Q as a product of elementary reflectors; if UPLO
-*>          = 'L', the diagonal and first subdiagonal of A are over-
-*>          written by the corresponding elements of the tridiagonal
-*>          matrix T, and the elements below the first subdiagonal, with
-*>          the array TAU, represent the unitary matrix Q as a product
-*>          of elementary reflectors. See Further Details.
+*>          A is COMPLEX*16 array, dimension (LDA,N-K+1)
+*>          On entry, the n-by-(n-k+1) general matrix A.
+*>          On exit, the elements on and above the k-th subdiagonal in
+*>          the first NB columns are overwritten with the corresponding
+*>          elements of the reduced matrix; the elements below the k-th
+*>          subdiagonal, with the array TAU, represent the matrix Q as a
+*>          product of elementary reflectors. The other columns of A are
+*>          unchanged. See Further Details.
 *> \endverbatim
 *>
 *> \param[in] LDA
@@ -10470,5100 +25076,6049 @@
 *>          The leading dimension of the array A.  LDA >= max(1,N).
 *> \endverbatim
 *>
-*> \param[out] D
+*> \param[out] TAU
 *> \verbatim
-*>          D is DOUBLE PRECISION array, dimension (N)
-*>          The diagonal elements of the tridiagonal matrix T:
-*>          D(i) = A(i,i).
+*>          TAU is COMPLEX*16 array, dimension (NB)
+*>          The scalar factors of the elementary reflectors. See Further
+*>          Details.
 *> \endverbatim
 *>
-*> \param[out] E
+*> \param[out] T
 *> \verbatim
-*>          E is DOUBLE PRECISION array, dimension (N-1)
-*>          The off-diagonal elements of the tridiagonal matrix T:
-*>          E(i) = A(i,i+1) if UPLO = 'U', E(i) = A(i+1,i) if UPLO = 'L'.
+*>          T is COMPLEX*16 array, dimension (LDT,NB)
+*>          The upper triangular matrix T.
 *> \endverbatim
 *>
-*> \param[out] TAU
+*> \param[in] LDT
 *> \verbatim
-*>          TAU is COMPLEX*16 array, dimension (N-1)
-*>          The scalar factors of the elementary reflectors (see Further
-*>          Details).
+*>          LDT is INTEGER
+*>          The leading dimension of the array T.  LDT >= NB.
 *> \endverbatim
 *>
-*> \param[out] INFO
+*> \param[out] Y
 *> \verbatim
-*>          INFO is INTEGER
-*>          = 0:  successful exit
-*>          < 0:  if INFO = -i, the i-th argument had an illegal value.
+*>          Y is COMPLEX*16 array, dimension (LDY,NB)
+*>          The n-by-nb matrix Y.
+*> \endverbatim
+*>
+*> \param[in] LDY
+*> \verbatim
+*>          LDY is INTEGER
+*>          The leading dimension of the array Y. LDY >= max(1,N).
 *> \endverbatim
 *
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date September 2012
+*> \date December 2016
 *
-*> \ingroup complex16HEcomputational
+*> \ingroup complex16OTHERauxiliary
 *
 *> \par Further Details:
 *  =====================
 *>
 *> \verbatim
 *>
-*>  If UPLO = 'U', the matrix Q is represented as a product of elementary
-*>  reflectors
-*>
-*>     Q = H(n-1) . . . H(2) H(1).
-*>
-*>  Each H(i) has the form
-*>
-*>     H(i) = I - tau * v * v**H
-*>
-*>  where tau is a complex scalar, and v is a complex vector with
-*>  v(i+1:n) = 0 and v(i) = 1; v(1:i-1) is stored on exit in
-*>  A(1:i-1,i+1), and tau in TAU(i).
-*>
-*>  If UPLO = 'L', the matrix Q is represented as a product of elementary
-*>  reflectors
+*>  The matrix Q is represented as a product of nb elementary reflectors
 *>
-*>     Q = H(1) H(2) . . . H(n-1).
+*>     Q = H(1) H(2) . . . H(nb).
 *>
 *>  Each H(i) has the form
 *>
 *>     H(i) = I - tau * v * v**H
 *>
 *>  where tau is a complex scalar, and v is a complex vector with
-*>  v(1:i) = 0 and v(i+1) = 1; v(i+2:n) is stored on exit in A(i+2:n,i),
-*>  and tau in TAU(i).
+*>  v(1:i+k-1) = 0, v(i+k) = 1; v(i+k+1:n) is stored on exit in
+*>  A(i+k+1:n,i), and tau in TAU(i).
 *>
-*>  The contents of A on exit are illustrated by the following examples
-*>  with n = 5:
+*>  The elements of the vectors v together form the (n-k+1)-by-nb matrix
+*>  V which is needed, with T and Y, to apply the transformation to the
+*>  unreduced part of the matrix, using an update of the form:
+*>  A := (I - V*T*V**H) * (A - Y*V**H).
 *>
-*>  if UPLO = 'U':                       if UPLO = 'L':
+*>  The contents of A on exit are illustrated by the following example
+*>  with n = 7, k = 3 and nb = 2:
 *>
-*>    (  d   e   v2  v3  v4 )              (  d                  )
-*>    (      d   e   v3  v4 )              (  e   d              )
-*>    (          d   e   v4 )              (  v1  e   d          )
-*>    (              d   e  )              (  v1  v2  e   d      )
-*>    (                  d  )              (  v1  v2  v3  e   d  )
+*>     ( a   h   a   a   a )
+*>     ( a   h   a   a   a )
+*>     ( a   h   a   a   a )
+*>     ( h   h   a   a   a )
+*>     ( v1  h   a   a   a )
+*>     ( v1  v2  a   a   a )
+*>     ( v1  v2  a   a   a )
 *>
-*>  where d and e denote diagonal and off-diagonal elements of T, and vi
-*>  denotes an element of the vector defining H(i).
+*>  where a denotes an element of the original matrix A, h denotes a
+*>  modified element of the upper Hessenberg matrix H, and vi denotes an
+*>  element of the vector defining H(i).
 *> \endverbatim
 *>
 *  =====================================================================
-      SUBROUTINE ZHETD2( UPLO, N, A, LDA, D, E, TAU, INFO )
+      SUBROUTINE ZLAHRD( N, K, NB, A, LDA, TAU, T, LDT, Y, LDY )
 *
-*  -- LAPACK computational routine (version 3.4.2) --
+*  -- LAPACK auxiliary routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     September 2012
+*     December 2016
 *
 *     .. Scalar Arguments ..
-      CHARACTER          UPLO
-      INTEGER            INFO, LDA, N
+      INTEGER            K, LDA, LDT, LDY, N, NB
 *     ..
 *     .. Array Arguments ..
-      DOUBLE PRECISION   D( * ), E( * )
-      COMPLEX*16         A( LDA, * ), TAU( * )
+      COMPLEX*16         A( LDA, * ), T( LDT, NB ), TAU( NB ),
+     $                   Y( LDY, NB )
 *     ..
 *
 *  =====================================================================
 *
 *     .. Parameters ..
-      COMPLEX*16         ONE, ZERO, HALF
-      PARAMETER          ( ONE = ( 1.0D+0, 0.0D+0 ),
-     $                   ZERO = ( 0.0D+0, 0.0D+0 ),
-     $                   HALF = ( 0.5D+0, 0.0D+0 ) )
+      COMPLEX*16         ZERO, ONE
+      PARAMETER          ( ZERO = ( 0.0D+0, 0.0D+0 ),
+     $                   ONE = ( 1.0D+0, 0.0D+0 ) )
 *     ..
 *     .. Local Scalars ..
-      LOGICAL            UPPER
       INTEGER            I
-      COMPLEX*16         ALPHA, TAUI
+      COMPLEX*16         EI
 *     ..
 *     .. External Subroutines ..
-      EXTERNAL           XERBLA, ZAXPY, ZHEMV, ZHER2, ZLARFG
-*     ..
-*     .. External Functions ..
-      LOGICAL            LSAME
-      COMPLEX*16         ZDOTC
-      EXTERNAL           LSAME, ZDOTC
+      EXTERNAL           ZAXPY, ZCOPY, ZGEMV, ZLACGV, ZLARFG, ZSCAL,
+     $                   ZTRMV
 *     ..
 *     .. Intrinsic Functions ..
-      INTRINSIC          DBLE, MAX, MIN
+      INTRINSIC          MIN
 *     ..
 *     .. Executable Statements ..
 *
-*     Test the input parameters
-*
-      INFO = 0
-      UPPER = LSAME( UPLO, 'U')
-      IF( .NOT.UPPER .AND. .NOT.LSAME( UPLO, 'L' ) ) THEN
-         INFO = -1
-      ELSE IF( N.LT.0 ) THEN
-         INFO = -2
-      ELSE IF( LDA.LT.MAX( 1, N ) ) THEN
-         INFO = -4
-      END IF
-      IF( INFO.NE.0 ) THEN
-         CALL XERBLA( 'ZHETD2', -INFO )
-         RETURN
-      END IF
-*
 *     Quick return if possible
 *
-      IF( N.LE.0 )
+      IF( N.LE.1 )
      $   RETURN
 *
-      IF( UPPER ) THEN
-*
-*        Reduce the upper triangle of A
-*
-         A( N, N ) = DBLE( A( N, N ) )
-         DO 10 I = N - 1, 1, -1
-*
-*           Generate elementary reflector H(i) = I - tau * v * v**H
-*           to annihilate A(1:i-1,i+1)
-*
-            ALPHA = A( I, I+1 )
-            CALL ZLARFG( I, ALPHA, A( 1, I+1 ), 1, TAUI )
-            E( I ) = ALPHA
+      DO 10 I = 1, NB
+         IF( I.GT.1 ) THEN
 *
-            IF( TAUI.NE.ZERO ) THEN
+*           Update A(1:n,i)
 *
-*              Apply H(i) from both sides to A(1:i,1:i)
+*           Compute i-th column of A - Y * V**H
 *
-               A( I, I+1 ) = ONE
+            CALL ZLACGV( I-1, A( K+I-1, 1 ), LDA )
+            CALL ZGEMV( 'No transpose', N, I-1, -ONE, Y, LDY,
+     $                  A( K+I-1, 1 ), LDA, ONE, A( 1, I ), 1 )
+            CALL ZLACGV( I-1, A( K+I-1, 1 ), LDA )
 *
-*              Compute  x := tau * A * v  storing x in TAU(1:i)
+*           Apply I - V * T**H * V**H to this column (call it b) from the
+*           left, using the last column of T as workspace
 *
-               CALL ZHEMV( UPLO, I, TAUI, A, LDA, A( 1, I+1 ), 1, ZERO,
-     $                     TAU, 1 )
+*           Let  V = ( V1 )   and   b = ( b1 )   (first I-1 rows)
+*                    ( V2 )             ( b2 )
 *
-*              Compute  w := x - 1/2 * tau * (x**H * v) * v
+*           where V1 is unit lower triangular
 *
-               ALPHA = -HALF*TAUI*ZDOTC( I, TAU, 1, A( 1, I+1 ), 1 )
-               CALL ZAXPY( I, ALPHA, A( 1, I+1 ), 1, TAU, 1 )
+*           w := V1**H * b1
 *
-*              Apply the transformation as a rank-2 update:
-*                 A := A - v * w**H - w * v**H
+            CALL ZCOPY( I-1, A( K+1, I ), 1, T( 1, NB ), 1 )
+            CALL ZTRMV( 'Lower', 'Conjugate transpose', 'Unit', I-1,
+     $                  A( K+1, 1 ), LDA, T( 1, NB ), 1 )
 *
-               CALL ZHER2( UPLO, I, -ONE, A( 1, I+1 ), 1, TAU, 1, A,
-     $                     LDA )
+*           w := w + V2**H *b2
 *
-            ELSE
-               A( I, I ) = DBLE( A( I, I ) )
-            END IF
-            A( I, I+1 ) = E( I )
-            D( I+1 ) = A( I+1, I+1 )
-            TAU( I ) = TAUI
-   10    CONTINUE
-         D( 1 ) = A( 1, 1 )
-      ELSE
+            CALL ZGEMV( 'Conjugate transpose', N-K-I+1, I-1, ONE,
+     $                  A( K+I, 1 ), LDA, A( K+I, I ), 1, ONE,
+     $                  T( 1, NB ), 1 )
 *
-*        Reduce the lower triangle of A
+*           w := T**H *w
 *
-         A( 1, 1 ) = DBLE( A( 1, 1 ) )
-         DO 20 I = 1, N - 1
+            CALL ZTRMV( 'Upper', 'Conjugate transpose', 'Non-unit', I-1,
+     $                  T, LDT, T( 1, NB ), 1 )
 *
-*           Generate elementary reflector H(i) = I - tau * v * v**H
-*           to annihilate A(i+2:n,i)
+*           b2 := b2 - V2*w
 *
-            ALPHA = A( I+1, I )
-            CALL ZLARFG( N-I, ALPHA, A( MIN( I+2, N ), I ), 1, TAUI )
-            E( I ) = ALPHA
+            CALL ZGEMV( 'No transpose', N-K-I+1, I-1, -ONE, A( K+I, 1 ),
+     $                  LDA, T( 1, NB ), 1, ONE, A( K+I, I ), 1 )
 *
-            IF( TAUI.NE.ZERO ) THEN
+*           b1 := b1 - V1*w
 *
-*              Apply H(i) from both sides to A(i+1:n,i+1:n)
+            CALL ZTRMV( 'Lower', 'No transpose', 'Unit', I-1,
+     $                  A( K+1, 1 ), LDA, T( 1, NB ), 1 )
+            CALL ZAXPY( I-1, -ONE, T( 1, NB ), 1, A( K+1, I ), 1 )
 *
-               A( I+1, I ) = ONE
+            A( K+I-1, I-1 ) = EI
+         END IF
 *
-*              Compute  x := tau * A * v  storing y in TAU(i:n-1)
+*        Generate the elementary reflector H(i) to annihilate
+*        A(k+i+1:n,i)
 *
-               CALL ZHEMV( UPLO, N-I, TAUI, A( I+1, I+1 ), LDA,
-     $                     A( I+1, I ), 1, ZERO, TAU( I ), 1 )
+         EI = A( K+I, I )
+         CALL ZLARFG( N-K-I+1, EI, A( MIN( K+I+1, N ), I ), 1,
+     $                TAU( I ) )
+         A( K+I, I ) = ONE
 *
-*              Compute  w := x - 1/2 * tau * (x**H * v) * v
+*        Compute  Y(1:n,i)
 *
-               ALPHA = -HALF*TAUI*ZDOTC( N-I, TAU( I ), 1, A( I+1, I ),
-     $                 1 )
-               CALL ZAXPY( N-I, ALPHA, A( I+1, I ), 1, TAU( I ), 1 )
+         CALL ZGEMV( 'No transpose', N, N-K-I+1, ONE, A( 1, I+1 ), LDA,
+     $               A( K+I, I ), 1, ZERO, Y( 1, I ), 1 )
+         CALL ZGEMV( 'Conjugate transpose', N-K-I+1, I-1, ONE,
+     $               A( K+I, 1 ), LDA, A( K+I, I ), 1, ZERO, T( 1, I ),
+     $               1 )
+         CALL ZGEMV( 'No transpose', N, I-1, -ONE, Y, LDY, T( 1, I ), 1,
+     $               ONE, Y( 1, I ), 1 )
+         CALL ZSCAL( N, TAU( I ), Y( 1, I ), 1 )
 *
-*              Apply the transformation as a rank-2 update:
-*                 A := A - v * w**H - w * v**H
+*        Compute T(1:i,i)
 *
-               CALL ZHER2( UPLO, N-I, -ONE, A( I+1, I ), 1, TAU( I ), 1,
-     $                     A( I+1, I+1 ), LDA )
+         CALL ZSCAL( I-1, -TAU( I ), T( 1, I ), 1 )
+         CALL ZTRMV( 'Upper', 'No transpose', 'Non-unit', I-1, T, LDT,
+     $               T( 1, I ), 1 )
+         T( I, I ) = TAU( I )
 *
-            ELSE
-               A( I+1, I+1 ) = DBLE( A( I+1, I+1 ) )
-            END IF
-            A( I+1, I ) = E( I )
-            D( I ) = A( I, I )
-            TAU( I ) = TAUI
-   20    CONTINUE
-         D( N ) = A( N, N )
-      END IF
+   10 CONTINUE
+      A( K+NB, NB ) = EI
 *
       RETURN
 *
-*     End of ZHETD2
+*     End of ZLAHRD
 *
       END
-*> \brief \b ZHETRD
+*> \brief \b ZLALS0 applies back multiplying factors in solving the least squares problem using divide and conquer SVD approach. Used by sgelsd.
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download ZHETRD + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/zhetrd.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/zhetrd.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/zhetrd.f"> 
+*> Download ZLALS0 + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/zlals0.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/zlals0.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/zlals0.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
-*       SUBROUTINE ZHETRD( UPLO, N, A, LDA, D, E, TAU, WORK, LWORK, INFO )
-* 
+*       SUBROUTINE ZLALS0( ICOMPQ, NL, NR, SQRE, NRHS, B, LDB, BX, LDBX,
+*                          PERM, GIVPTR, GIVCOL, LDGCOL, GIVNUM, LDGNUM,
+*                          POLES, DIFL, DIFR, Z, K, C, S, RWORK, INFO )
+*
 *       .. Scalar Arguments ..
-*       CHARACTER          UPLO
-*       INTEGER            INFO, LDA, LWORK, N
+*       INTEGER            GIVPTR, ICOMPQ, INFO, K, LDB, LDBX, LDGCOL,
+*      $                   LDGNUM, NL, NR, NRHS, SQRE
+*       DOUBLE PRECISION   C, S
 *       ..
 *       .. Array Arguments ..
-*       DOUBLE PRECISION   D( * ), E( * )
-*       COMPLEX*16         A( LDA, * ), TAU( * ), WORK( * )
+*       INTEGER            GIVCOL( LDGCOL, * ), PERM( * )
+*       DOUBLE PRECISION   DIFL( * ), DIFR( LDGNUM, * ),
+*      $                   GIVNUM( LDGNUM, * ), POLES( LDGNUM, * ),
+*      $                   RWORK( * ), Z( * )
+*       COMPLEX*16         B( LDB, * ), BX( LDBX, * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
 *>
 *> \verbatim
 *>
-*> ZHETRD reduces a complex Hermitian matrix A to real symmetric
-*> tridiagonal form T by a unitary similarity transformation:
-*> Q**H * A * Q = T.
+*> ZLALS0 applies back the multiplying factors of either the left or the
+*> right singular vector matrix of a diagonal matrix appended by a row
+*> to the right hand side matrix B in solving the least squares problem
+*> using the divide-and-conquer SVD approach.
+*>
+*> For the left singular vector matrix, three types of orthogonal
+*> matrices are involved:
+*>
+*> (1L) Givens rotations: the number of such rotations is GIVPTR; the
+*>      pairs of columns/rows they were applied to are stored in GIVCOL;
+*>      and the C- and S-values of these rotations are stored in GIVNUM.
+*>
+*> (2L) Permutation. The (NL+1)-st row of B is to be moved to the first
+*>      row, and for J=2:N, PERM(J)-th row of B is to be moved to the
+*>      J-th row.
+*>
+*> (3L) The left singular vector matrix of the remaining matrix.
+*>
+*> For the right singular vector matrix, four types of orthogonal
+*> matrices are involved:
+*>
+*> (1R) The right singular vector matrix of the remaining matrix.
+*>
+*> (2R) If SQRE = 1, one extra Givens rotation to generate the right
+*>      null space.
+*>
+*> (3R) The inverse transformation of (2L).
+*>
+*> (4R) The inverse transformation of (1L).
+*> \endverbatim
+*
+*  Arguments:
+*  ==========
+*
+*> \param[in] ICOMPQ
+*> \verbatim
+*>          ICOMPQ is INTEGER
+*>         Specifies whether singular vectors are to be computed in
+*>         factored form:
+*>         = 0: Left singular vector matrix.
+*>         = 1: Right singular vector matrix.
+*> \endverbatim
+*>
+*> \param[in] NL
+*> \verbatim
+*>          NL is INTEGER
+*>         The row dimension of the upper block. NL >= 1.
+*> \endverbatim
+*>
+*> \param[in] NR
+*> \verbatim
+*>          NR is INTEGER
+*>         The row dimension of the lower block. NR >= 1.
+*> \endverbatim
+*>
+*> \param[in] SQRE
+*> \verbatim
+*>          SQRE is INTEGER
+*>         = 0: the lower block is an NR-by-NR square matrix.
+*>         = 1: the lower block is an NR-by-(NR+1) rectangular matrix.
+*>
+*>         The bidiagonal matrix has row dimension N = NL + NR + 1,
+*>         and column dimension M = N + SQRE.
+*> \endverbatim
+*>
+*> \param[in] NRHS
+*> \verbatim
+*>          NRHS is INTEGER
+*>         The number of columns of B and BX. NRHS must be at least 1.
+*> \endverbatim
+*>
+*> \param[in,out] B
+*> \verbatim
+*>          B is COMPLEX*16 array, dimension ( LDB, NRHS )
+*>         On input, B contains the right hand sides of the least
+*>         squares problem in rows 1 through M. On output, B contains
+*>         the solution X in rows 1 through N.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*>          LDB is INTEGER
+*>         The leading dimension of B. LDB must be at least
+*>         max(1,MAX( M, N ) ).
+*> \endverbatim
+*>
+*> \param[out] BX
+*> \verbatim
+*>          BX is COMPLEX*16 array, dimension ( LDBX, NRHS )
 *> \endverbatim
-*
-*  Arguments:
-*  ==========
-*
-*> \param[in] UPLO
+*>
+*> \param[in] LDBX
 *> \verbatim
-*>          UPLO is CHARACTER*1
-*>          = 'U':  Upper triangle of A is stored;
-*>          = 'L':  Lower triangle of A is stored.
+*>          LDBX is INTEGER
+*>         The leading dimension of BX.
 *> \endverbatim
 *>
-*> \param[in] N
+*> \param[in] PERM
 *> \verbatim
-*>          N is INTEGER
-*>          The order of the matrix A.  N >= 0.
+*>          PERM is INTEGER array, dimension ( N )
+*>         The permutations (from deflation and sorting) applied
+*>         to the two blocks.
 *> \endverbatim
 *>
-*> \param[in,out] A
+*> \param[in] GIVPTR
 *> \verbatim
-*>          A is COMPLEX*16 array, dimension (LDA,N)
-*>          On entry, the Hermitian matrix A.  If UPLO = 'U', the leading
-*>          N-by-N upper triangular part of A contains the upper
-*>          triangular part of the matrix A, and the strictly lower
-*>          triangular part of A is not referenced.  If UPLO = 'L', the
-*>          leading N-by-N lower triangular part of A contains the lower
-*>          triangular part of the matrix A, and the strictly upper
-*>          triangular part of A is not referenced.
-*>          On exit, if UPLO = 'U', the diagonal and first superdiagonal
-*>          of A are overwritten by the corresponding elements of the
-*>          tridiagonal matrix T, and the elements above the first
-*>          superdiagonal, with the array TAU, represent the unitary
-*>          matrix Q as a product of elementary reflectors; if UPLO
-*>          = 'L', the diagonal and first subdiagonal of A are over-
-*>          written by the corresponding elements of the tridiagonal
-*>          matrix T, and the elements below the first subdiagonal, with
-*>          the array TAU, represent the unitary matrix Q as a product
-*>          of elementary reflectors. See Further Details.
+*>          GIVPTR is INTEGER
+*>         The number of Givens rotations which took place in this
+*>         subproblem.
 *> \endverbatim
 *>
-*> \param[in] LDA
+*> \param[in] GIVCOL
 *> \verbatim
-*>          LDA is INTEGER
-*>          The leading dimension of the array A.  LDA >= max(1,N).
+*>          GIVCOL is INTEGER array, dimension ( LDGCOL, 2 )
+*>         Each pair of numbers indicates a pair of rows/columns
+*>         involved in a Givens rotation.
 *> \endverbatim
 *>
-*> \param[out] D
+*> \param[in] LDGCOL
 *> \verbatim
-*>          D is DOUBLE PRECISION array, dimension (N)
-*>          The diagonal elements of the tridiagonal matrix T:
-*>          D(i) = A(i,i).
+*>          LDGCOL is INTEGER
+*>         The leading dimension of GIVCOL, must be at least N.
 *> \endverbatim
 *>
-*> \param[out] E
+*> \param[in] GIVNUM
 *> \verbatim
-*>          E is DOUBLE PRECISION array, dimension (N-1)
-*>          The off-diagonal elements of the tridiagonal matrix T:
-*>          E(i) = A(i,i+1) if UPLO = 'U', E(i) = A(i+1,i) if UPLO = 'L'.
+*>          GIVNUM is DOUBLE PRECISION array, dimension ( LDGNUM, 2 )
+*>         Each number indicates the C or S value used in the
+*>         corresponding Givens rotation.
 *> \endverbatim
 *>
-*> \param[out] TAU
+*> \param[in] LDGNUM
 *> \verbatim
-*>          TAU is COMPLEX*16 array, dimension (N-1)
-*>          The scalar factors of the elementary reflectors (see Further
-*>          Details).
+*>          LDGNUM is INTEGER
+*>         The leading dimension of arrays DIFR, POLES and
+*>         GIVNUM, must be at least K.
 *> \endverbatim
 *>
-*> \param[out] WORK
+*> \param[in] POLES
 *> \verbatim
-*>          WORK is COMPLEX*16 array, dimension (MAX(1,LWORK))
-*>          On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+*>          POLES is DOUBLE PRECISION array, dimension ( LDGNUM, 2 )
+*>         On entry, POLES(1:K, 1) contains the new singular
+*>         values obtained from solving the secular equation, and
+*>         POLES(1:K, 2) is an array containing the poles in the secular
+*>         equation.
 *> \endverbatim
 *>
-*> \param[in] LWORK
+*> \param[in] DIFL
 *> \verbatim
-*>          LWORK is INTEGER
-*>          The dimension of the array WORK.  LWORK >= 1.
-*>          For optimum performance LWORK >= N*NB, where NB is the
-*>          optimal blocksize.
+*>          DIFL is DOUBLE PRECISION array, dimension ( K ).
+*>         On entry, DIFL(I) is the distance between I-th updated
+*>         (undeflated) singular value and the I-th (undeflated) old
+*>         singular value.
+*> \endverbatim
 *>
-*>          If LWORK = -1, then a workspace query is assumed; the routine
-*>          only calculates the optimal size of the WORK array, returns
-*>          this value as the first entry of the WORK array, and no error
-*>          message related to LWORK is issued by XERBLA.
+*> \param[in] DIFR
+*> \verbatim
+*>          DIFR is DOUBLE PRECISION array, dimension ( LDGNUM, 2 ).
+*>         On entry, DIFR(I, 1) contains the distances between I-th
+*>         updated (undeflated) singular value and the I+1-th
+*>         (undeflated) old singular value. And DIFR(I, 2) is the
+*>         normalizing factor for the I-th right singular vector.
+*> \endverbatim
+*>
+*> \param[in] Z
+*> \verbatim
+*>          Z is DOUBLE PRECISION array, dimension ( K )
+*>         Contain the components of the deflation-adjusted updating row
+*>         vector.
+*> \endverbatim
+*>
+*> \param[in] K
+*> \verbatim
+*>          K is INTEGER
+*>         Contains the dimension of the non-deflated matrix,
+*>         This is the order of the related secular equation. 1 <= K <=N.
+*> \endverbatim
+*>
+*> \param[in] C
+*> \verbatim
+*>          C is DOUBLE PRECISION
+*>         C contains garbage if SQRE =0 and the C-value of a Givens
+*>         rotation related to the right null space if SQRE = 1.
+*> \endverbatim
+*>
+*> \param[in] S
+*> \verbatim
+*>          S is DOUBLE PRECISION
+*>         S contains garbage if SQRE =0 and the S-value of a Givens
+*>         rotation related to the right null space if SQRE = 1.
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*>          RWORK is DOUBLE PRECISION array, dimension
+*>         ( K*(1+NRHS) + 2*NRHS )
 *> \endverbatim
 *>
 *> \param[out] INFO
 *> \verbatim
 *>          INFO is INTEGER
-*>          = 0:  successful exit
-*>          < 0:  if INFO = -i, the i-th argument had an illegal value
+*>          = 0:  successful exit.
+*>          < 0:  if INFO = -i, the i-th argument had an illegal value.
 *> \endverbatim
 *
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date November 2011
+*> \date December 2016
 *
-*> \ingroup complex16HEcomputational
+*> \ingroup complex16OTHERcomputational
 *
-*> \par Further Details:
-*  =====================
-*>
-*> \verbatim
-*>
-*>  If UPLO = 'U', the matrix Q is represented as a product of elementary
-*>  reflectors
-*>
-*>     Q = H(n-1) . . . H(2) H(1).
-*>
-*>  Each H(i) has the form
-*>
-*>     H(i) = I - tau * v * v**H
-*>
-*>  where tau is a complex scalar, and v is a complex vector with
-*>  v(i+1:n) = 0 and v(i) = 1; v(1:i-1) is stored on exit in
-*>  A(1:i-1,i+1), and tau in TAU(i).
-*>
-*>  If UPLO = 'L', the matrix Q is represented as a product of elementary
-*>  reflectors
-*>
-*>     Q = H(1) H(2) . . . H(n-1).
-*>
-*>  Each H(i) has the form
-*>
-*>     H(i) = I - tau * v * v**H
-*>
-*>  where tau is a complex scalar, and v is a complex vector with
-*>  v(1:i) = 0 and v(i+1) = 1; v(i+2:n) is stored on exit in A(i+2:n,i),
-*>  and tau in TAU(i).
-*>
-*>  The contents of A on exit are illustrated by the following examples
-*>  with n = 5:
-*>
-*>  if UPLO = 'U':                       if UPLO = 'L':
-*>
-*>    (  d   e   v2  v3  v4 )              (  d                  )
-*>    (      d   e   v3  v4 )              (  e   d              )
-*>    (          d   e   v4 )              (  v1  e   d          )
-*>    (              d   e  )              (  v1  v2  e   d      )
-*>    (                  d  )              (  v1  v2  v3  e   d  )
-*>
-*>  where d and e denote diagonal and off-diagonal elements of T, and vi
-*>  denotes an element of the vector defining H(i).
-*> \endverbatim
+*> \par Contributors:
+*  ==================
 *>
+*>     Ming Gu and Ren-Cang Li, Computer Science Division, University of
+*>       California at Berkeley, USA \n
+*>     Osni Marques, LBNL/NERSC, USA \n
+*
 *  =====================================================================
-      SUBROUTINE ZHETRD( UPLO, N, A, LDA, D, E, TAU, WORK, LWORK, INFO )
+      SUBROUTINE ZLALS0( ICOMPQ, NL, NR, SQRE, NRHS, B, LDB, BX, LDBX,
+     $                   PERM, GIVPTR, GIVCOL, LDGCOL, GIVNUM, LDGNUM,
+     $                   POLES, DIFL, DIFR, Z, K, C, S, RWORK, INFO )
 *
-*  -- LAPACK computational routine (version 3.4.0) --
+*  -- LAPACK computational routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     November 2011
+*     December 2016
 *
 *     .. Scalar Arguments ..
-      CHARACTER          UPLO
-      INTEGER            INFO, LDA, LWORK, N
+      INTEGER            GIVPTR, ICOMPQ, INFO, K, LDB, LDBX, LDGCOL,
+     $                   LDGNUM, NL, NR, NRHS, SQRE
+      DOUBLE PRECISION   C, S
 *     ..
 *     .. Array Arguments ..
-      DOUBLE PRECISION   D( * ), E( * )
-      COMPLEX*16         A( LDA, * ), TAU( * ), WORK( * )
+      INTEGER            GIVCOL( LDGCOL, * ), PERM( * )
+      DOUBLE PRECISION   DIFL( * ), DIFR( LDGNUM, * ),
+     $                   GIVNUM( LDGNUM, * ), POLES( LDGNUM, * ),
+     $                   RWORK( * ), Z( * )
+      COMPLEX*16         B( LDB, * ), BX( LDBX, * )
 *     ..
 *
 *  =====================================================================
 *
 *     .. Parameters ..
-      DOUBLE PRECISION   ONE
-      PARAMETER          ( ONE = 1.0D+0 )
-      COMPLEX*16         CONE
-      PARAMETER          ( CONE = ( 1.0D+0, 0.0D+0 ) )
+      DOUBLE PRECISION   ONE, ZERO, NEGONE
+      PARAMETER          ( ONE = 1.0D0, ZERO = 0.0D0, NEGONE = -1.0D0 )
 *     ..
 *     .. Local Scalars ..
-      LOGICAL            LQUERY, UPPER
-      INTEGER            I, IINFO, IWS, J, KK, LDWORK, LWKOPT, NB,
-     $                   NBMIN, NX
+      INTEGER            I, J, JCOL, JROW, M, N, NLP1
+      DOUBLE PRECISION   DIFLJ, DIFRJ, DJ, DSIGJ, DSIGJP, TEMP
 *     ..
 *     .. External Subroutines ..
-      EXTERNAL           XERBLA, ZHER2K, ZHETD2, ZLATRD
-*     ..
-*     .. Intrinsic Functions ..
-      INTRINSIC          MAX
+      EXTERNAL           DGEMV, XERBLA, ZCOPY, ZDROT, ZDSCAL, ZLACPY,
+     $                   ZLASCL
 *     ..
 *     .. External Functions ..
-      LOGICAL            LSAME
-      INTEGER            ILAENV
-      EXTERNAL           LSAME, ILAENV
+      DOUBLE PRECISION   DLAMC3, DNRM2
+      EXTERNAL           DLAMC3, DNRM2
+*     ..
+*     .. Intrinsic Functions ..
+      INTRINSIC          DBLE, DCMPLX, DIMAG, MAX
 *     ..
 *     .. Executable Statements ..
 *
-*     Test the input parameters
+*     Test the input parameters.
 *
       INFO = 0
-      UPPER = LSAME( UPLO, 'U' )
-      LQUERY = ( LWORK.EQ.-1 )
-      IF( .NOT.UPPER .AND. .NOT.LSAME( UPLO, 'L' ) ) THEN
+      N = NL + NR + 1
+*
+      IF( ( ICOMPQ.LT.0 ) .OR. ( ICOMPQ.GT.1 ) ) THEN
          INFO = -1
-      ELSE IF( N.LT.0 ) THEN
+      ELSE IF( NL.LT.1 ) THEN
          INFO = -2
-      ELSE IF( LDA.LT.MAX( 1, N ) ) THEN
+      ELSE IF( NR.LT.1 ) THEN
+         INFO = -3
+      ELSE IF( ( SQRE.LT.0 ) .OR. ( SQRE.GT.1 ) ) THEN
          INFO = -4
-      ELSE IF( LWORK.LT.1 .AND. .NOT.LQUERY ) THEN
+      ELSE IF( NRHS.LT.1 ) THEN
+         INFO = -5
+      ELSE IF( LDB.LT.N ) THEN
+         INFO = -7
+      ELSE IF( LDBX.LT.N ) THEN
          INFO = -9
+      ELSE IF( GIVPTR.LT.0 ) THEN
+         INFO = -11
+      ELSE IF( LDGCOL.LT.N ) THEN
+         INFO = -13
+      ELSE IF( LDGNUM.LT.N ) THEN
+         INFO = -15
+      ELSE IF( K.LT.1 ) THEN
+         INFO = -20
       END IF
-*
-      IF( INFO.EQ.0 ) THEN
-*
-*        Determine the block size.
-*
-         NB = ILAENV( 1, 'ZHETRD', UPLO, N, -1, -1, -1 )
-         LWKOPT = N*NB
-         WORK( 1 ) = LWKOPT
-      END IF
-*
       IF( INFO.NE.0 ) THEN
-         CALL XERBLA( 'ZHETRD', -INFO )
-         RETURN
-      ELSE IF( LQUERY ) THEN
+         CALL XERBLA( 'ZLALS0', -INFO )
          RETURN
       END IF
 *
-*     Quick return if possible
+      M = N + SQRE
+      NLP1 = NL + 1
 *
-      IF( N.EQ.0 ) THEN
-         WORK( 1 ) = 1
-         RETURN
-      END IF
+      IF( ICOMPQ.EQ.0 ) THEN
 *
-      NX = N
-      IWS = 1
-      IF( NB.GT.1 .AND. NB.LT.N ) THEN
+*        Apply back orthogonal transformations from the left.
 *
-*        Determine when to cross over from blocked to unblocked code
-*        (last block is always handled by unblocked code).
+*        Step (1L): apply back the Givens rotations performed.
 *
-         NX = MAX( NB, ILAENV( 3, 'ZHETRD', UPLO, N, -1, -1, -1 ) )
-         IF( NX.LT.N ) THEN
+         DO 10 I = 1, GIVPTR
+            CALL ZDROT( NRHS, B( GIVCOL( I, 2 ), 1 ), LDB,
+     $                  B( GIVCOL( I, 1 ), 1 ), LDB, GIVNUM( I, 2 ),
+     $                  GIVNUM( I, 1 ) )
+   10    CONTINUE
 *
-*           Determine if workspace is large enough for blocked code.
+*        Step (2L): permute rows of B.
 *
-            LDWORK = N
-            IWS = LDWORK*NB
-            IF( LWORK.LT.IWS ) THEN
+         CALL ZCOPY( NRHS, B( NLP1, 1 ), LDB, BX( 1, 1 ), LDBX )
+         DO 20 I = 2, N
+            CALL ZCOPY( NRHS, B( PERM( I ), 1 ), LDB, BX( I, 1 ), LDBX )
+   20    CONTINUE
 *
-*              Not enough workspace to use optimal NB:  determine the
-*              minimum value of NB, and reduce NB or force use of
-*              unblocked code by setting NX = N.
+*        Step (3L): apply the inverse of the left singular vector
+*        matrix to BX.
 *
-               NB = MAX( LWORK / LDWORK, 1 )
-               NBMIN = ILAENV( 2, 'ZHETRD', UPLO, N, -1, -1, -1 )
-               IF( NB.LT.NBMIN )
-     $            NX = N
+         IF( K.EQ.1 ) THEN
+            CALL ZCOPY( NRHS, BX, LDBX, B, LDB )
+            IF( Z( 1 ).LT.ZERO ) THEN
+               CALL ZDSCAL( NRHS, NEGONE, B, LDB )
             END IF
          ELSE
-            NX = N
-         END IF
-      ELSE
-         NB = 1
-      END IF
-*
-      IF( UPPER ) THEN
-*
-*        Reduce the upper triangle of A.
-*        Columns 1:kk are handled by the unblocked method.
-*
-         KK = N - ( ( N-NX+NB-1 ) / NB )*NB
-         DO 20 I = N - NB + 1, KK + 1, -NB
-*
-*           Reduce columns i:i+nb-1 to tridiagonal form and form the
-*           matrix W which is needed to update the unreduced part of
-*           the matrix
-*
-            CALL ZLATRD( UPLO, I+NB-1, NB, A, LDA, E, TAU, WORK,
-     $                   LDWORK )
-*
-*           Update the unreduced submatrix A(1:i-1,1:i-1), using an
-*           update of the form:  A := A - V*W**H - W*V**H
+            DO 100 J = 1, K
+               DIFLJ = DIFL( J )
+               DJ = POLES( J, 1 )
+               DSIGJ = -POLES( J, 2 )
+               IF( J.LT.K ) THEN
+                  DIFRJ = -DIFR( J, 1 )
+                  DSIGJP = -POLES( J+1, 2 )
+               END IF
+               IF( ( Z( J ).EQ.ZERO ) .OR. ( POLES( J, 2 ).EQ.ZERO ) )
+     $              THEN
+                  RWORK( J ) = ZERO
+               ELSE
+                  RWORK( J ) = -POLES( J, 2 )*Z( J ) / DIFLJ /
+     $                         ( POLES( J, 2 )+DJ )
+               END IF
+               DO 30 I = 1, J - 1
+                  IF( ( Z( I ).EQ.ZERO ) .OR.
+     $                ( POLES( I, 2 ).EQ.ZERO ) ) THEN
+                     RWORK( I ) = ZERO
+                  ELSE
+                     RWORK( I ) = POLES( I, 2 )*Z( I ) /
+     $                            ( DLAMC3( POLES( I, 2 ), DSIGJ )-
+     $                            DIFLJ ) / ( POLES( I, 2 )+DJ )
+                  END IF
+   30          CONTINUE
+               DO 40 I = J + 1, K
+                  IF( ( Z( I ).EQ.ZERO ) .OR.
+     $                ( POLES( I, 2 ).EQ.ZERO ) ) THEN
+                     RWORK( I ) = ZERO
+                  ELSE
+                     RWORK( I ) = POLES( I, 2 )*Z( I ) /
+     $                            ( DLAMC3( POLES( I, 2 ), DSIGJP )+
+     $                            DIFRJ ) / ( POLES( I, 2 )+DJ )
+                  END IF
+   40          CONTINUE
+               RWORK( 1 ) = NEGONE
+               TEMP = DNRM2( K, RWORK, 1 )
 *
-            CALL ZHER2K( UPLO, 'No transpose', I-1, NB, -CONE,
-     $                   A( 1, I ), LDA, WORK, LDWORK, ONE, A, LDA )
+*              Since B and BX are complex, the following call to DGEMV
+*              is performed in two steps (real and imaginary parts).
 *
-*           Copy superdiagonal elements back into A, and diagonal
-*           elements into D
+*              CALL DGEMV( 'T', K, NRHS, ONE, BX, LDBX, WORK, 1, ZERO,
+*    $                     B( J, 1 ), LDB )
 *
-            DO 10 J = I, I + NB - 1
-               A( J-1, J ) = E( J-1 )
-               D( J ) = A( J, J )
-   10       CONTINUE
-   20    CONTINUE
+               I = K + NRHS*2
+               DO 60 JCOL = 1, NRHS
+                  DO 50 JROW = 1, K
+                     I = I + 1
+                     RWORK( I ) = DBLE( BX( JROW, JCOL ) )
+   50             CONTINUE
+   60          CONTINUE
+               CALL DGEMV( 'T', K, NRHS, ONE, RWORK( 1+K+NRHS*2 ), K,
+     $                     RWORK( 1 ), 1, ZERO, RWORK( 1+K ), 1 )
+               I = K + NRHS*2
+               DO 80 JCOL = 1, NRHS
+                  DO 70 JROW = 1, K
+                     I = I + 1
+                     RWORK( I ) = DIMAG( BX( JROW, JCOL ) )
+   70             CONTINUE
+   80          CONTINUE
+               CALL DGEMV( 'T', K, NRHS, ONE, RWORK( 1+K+NRHS*2 ), K,
+     $                     RWORK( 1 ), 1, ZERO, RWORK( 1+K+NRHS ), 1 )
+               DO 90 JCOL = 1, NRHS
+                  B( J, JCOL ) = DCMPLX( RWORK( JCOL+K ),
+     $                           RWORK( JCOL+K+NRHS ) )
+   90          CONTINUE
+               CALL ZLASCL( 'G', 0, 0, TEMP, ONE, 1, NRHS, B( J, 1 ),
+     $                      LDB, INFO )
+  100       CONTINUE
+         END IF
 *
-*        Use unblocked code to reduce the last or only block
+*        Move the deflated rows of BX to B also.
 *
-         CALL ZHETD2( UPLO, KK, A, LDA, D, E, TAU, IINFO )
+         IF( K.LT.MAX( M, N ) )
+     $      CALL ZLACPY( 'A', N-K, NRHS, BX( K+1, 1 ), LDBX,
+     $                   B( K+1, 1 ), LDB )
       ELSE
 *
-*        Reduce the lower triangle of A
+*        Apply back the right orthogonal transformations.
 *
-         DO 40 I = 1, N - NX, NB
+*        Step (1R): apply back the new right singular vector matrix
+*        to B.
 *
-*           Reduce columns i:i+nb-1 to tridiagonal form and form the
-*           matrix W which is needed to update the unreduced part of
-*           the matrix
+         IF( K.EQ.1 ) THEN
+            CALL ZCOPY( NRHS, B, LDB, BX, LDBX )
+         ELSE
+            DO 180 J = 1, K
+               DSIGJ = POLES( J, 2 )
+               IF( Z( J ).EQ.ZERO ) THEN
+                  RWORK( J ) = ZERO
+               ELSE
+                  RWORK( J ) = -Z( J ) / DIFL( J ) /
+     $                         ( DSIGJ+POLES( J, 1 ) ) / DIFR( J, 2 )
+               END IF
+               DO 110 I = 1, J - 1
+                  IF( Z( J ).EQ.ZERO ) THEN
+                     RWORK( I ) = ZERO
+                  ELSE
+                     RWORK( I ) = Z( J ) / ( DLAMC3( DSIGJ, -POLES( I+1,
+     $                            2 ) )-DIFR( I, 1 ) ) /
+     $                            ( DSIGJ+POLES( I, 1 ) ) / DIFR( I, 2 )
+                  END IF
+  110          CONTINUE
+               DO 120 I = J + 1, K
+                  IF( Z( J ).EQ.ZERO ) THEN
+                     RWORK( I ) = ZERO
+                  ELSE
+                     RWORK( I ) = Z( J ) / ( DLAMC3( DSIGJ, -POLES( I,
+     $                            2 ) )-DIFL( I ) ) /
+     $                            ( DSIGJ+POLES( I, 1 ) ) / DIFR( I, 2 )
+                  END IF
+  120          CONTINUE
 *
-            CALL ZLATRD( UPLO, N-I+1, NB, A( I, I ), LDA, E( I ),
-     $                   TAU( I ), WORK, LDWORK )
+*              Since B and BX are complex, the following call to DGEMV
+*              is performed in two steps (real and imaginary parts).
 *
-*           Update the unreduced submatrix A(i+nb:n,i+nb:n), using
-*           an update of the form:  A := A - V*W**H - W*V**H
+*              CALL DGEMV( 'T', K, NRHS, ONE, B, LDB, WORK, 1, ZERO,
+*    $                     BX( J, 1 ), LDBX )
+*
+               I = K + NRHS*2
+               DO 140 JCOL = 1, NRHS
+                  DO 130 JROW = 1, K
+                     I = I + 1
+                     RWORK( I ) = DBLE( B( JROW, JCOL ) )
+  130             CONTINUE
+  140          CONTINUE
+               CALL DGEMV( 'T', K, NRHS, ONE, RWORK( 1+K+NRHS*2 ), K,
+     $                     RWORK( 1 ), 1, ZERO, RWORK( 1+K ), 1 )
+               I = K + NRHS*2
+               DO 160 JCOL = 1, NRHS
+                  DO 150 JROW = 1, K
+                     I = I + 1
+                     RWORK( I ) = DIMAG( B( JROW, JCOL ) )
+  150             CONTINUE
+  160          CONTINUE
+               CALL DGEMV( 'T', K, NRHS, ONE, RWORK( 1+K+NRHS*2 ), K,
+     $                     RWORK( 1 ), 1, ZERO, RWORK( 1+K+NRHS ), 1 )
+               DO 170 JCOL = 1, NRHS
+                  BX( J, JCOL ) = DCMPLX( RWORK( JCOL+K ),
+     $                            RWORK( JCOL+K+NRHS ) )
+  170          CONTINUE
+  180       CONTINUE
+         END IF
 *
-            CALL ZHER2K( UPLO, 'No transpose', N-I-NB+1, NB, -CONE,
-     $                   A( I+NB, I ), LDA, WORK( NB+1 ), LDWORK, ONE,
-     $                   A( I+NB, I+NB ), LDA )
+*        Step (2R): if SQRE = 1, apply back the rotation that is
+*        related to the right null space of the subproblem.
 *
-*           Copy subdiagonal elements back into A, and diagonal
-*           elements into D
+         IF( SQRE.EQ.1 ) THEN
+            CALL ZCOPY( NRHS, B( M, 1 ), LDB, BX( M, 1 ), LDBX )
+            CALL ZDROT( NRHS, BX( 1, 1 ), LDBX, BX( M, 1 ), LDBX, C, S )
+         END IF
+         IF( K.LT.MAX( M, N ) )
+     $      CALL ZLACPY( 'A', N-K, NRHS, B( K+1, 1 ), LDB, BX( K+1, 1 ),
+     $                   LDBX )
 *
-            DO 30 J = I, I + NB - 1
-               A( J+1, J ) = E( J )
-               D( J ) = A( J, J )
-   30       CONTINUE
-   40    CONTINUE
+*        Step (3R): permute rows of B.
 *
-*        Use unblocked code to reduce the last or only block
+         CALL ZCOPY( NRHS, BX( 1, 1 ), LDBX, B( NLP1, 1 ), LDB )
+         IF( SQRE.EQ.1 ) THEN
+            CALL ZCOPY( NRHS, BX( M, 1 ), LDBX, B( M, 1 ), LDB )
+         END IF
+         DO 190 I = 2, N
+            CALL ZCOPY( NRHS, BX( I, 1 ), LDBX, B( PERM( I ), 1 ), LDB )
+  190    CONTINUE
 *
-         CALL ZHETD2( UPLO, N-I+1, A( I, I ), LDA, D( I ), E( I ),
-     $                TAU( I ), IINFO )
+*        Step (4R): apply back the Givens rotations performed.
+*
+         DO 200 I = GIVPTR, 1, -1
+            CALL ZDROT( NRHS, B( GIVCOL( I, 2 ), 1 ), LDB,
+     $                  B( GIVCOL( I, 1 ), 1 ), LDB, GIVNUM( I, 2 ),
+     $                  -GIVNUM( I, 1 ) )
+  200    CONTINUE
       END IF
 *
-      WORK( 1 ) = LWKOPT
       RETURN
 *
-*     End of ZHETRD
+*     End of ZLALS0
 *
       END
-*> \brief \b ZHSEQR
+*> \brief \b ZLALSA computes the SVD of the coefficient matrix in compact form. Used by sgelsd.
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download ZHSEQR + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/zhseqr.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/zhseqr.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/zhseqr.f"> 
+*> Download ZLALSA + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/zlalsa.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/zlalsa.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/zlalsa.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
-*       SUBROUTINE ZHSEQR( JOB, COMPZ, N, ILO, IHI, H, LDH, W, Z, LDZ,
-*                          WORK, LWORK, INFO )
-* 
+*       SUBROUTINE ZLALSA( ICOMPQ, SMLSIZ, N, NRHS, B, LDB, BX, LDBX, U,
+*                          LDU, VT, K, DIFL, DIFR, Z, POLES, GIVPTR,
+*                          GIVCOL, LDGCOL, PERM, GIVNUM, C, S, RWORK,
+*                          IWORK, INFO )
+*
 *       .. Scalar Arguments ..
-*       INTEGER            IHI, ILO, INFO, LDH, LDZ, LWORK, N
-*       CHARACTER          COMPZ, JOB
+*       INTEGER            ICOMPQ, INFO, LDB, LDBX, LDGCOL, LDU, N, NRHS,
+*      $                   SMLSIZ
 *       ..
 *       .. Array Arguments ..
-*       COMPLEX*16         H( LDH, * ), W( * ), WORK( * ), Z( LDZ, * )
+*       INTEGER            GIVCOL( LDGCOL, * ), GIVPTR( * ), IWORK( * ),
+*      $                   K( * ), PERM( LDGCOL, * )
+*       DOUBLE PRECISION   C( * ), DIFL( LDU, * ), DIFR( LDU, * ),
+*      $                   GIVNUM( LDU, * ), POLES( LDU, * ), RWORK( * ),
+*      $                   S( * ), U( LDU, * ), VT( LDU, * ), Z( LDU, * )
+*       COMPLEX*16         B( LDB, * ), BX( LDBX, * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
 *>
 *> \verbatim
 *>
-*>    ZHSEQR computes the eigenvalues of a Hessenberg matrix H
-*>    and, optionally, the matrices T and Z from the Schur decomposition
-*>    H = Z T Z**H, where T is an upper triangular matrix (the
-*>    Schur form), and Z is the unitary matrix of Schur vectors.
+*> ZLALSA is an itermediate step in solving the least squares problem
+*> by computing the SVD of the coefficient matrix in compact form (The
+*> singular vectors are computed as products of simple orthorgonal
+*> matrices.).
 *>
-*>    Optionally Z may be postmultiplied into an input unitary
-*>    matrix Q so that this routine can give the Schur factorization
-*>    of a matrix A which has been reduced to the Hessenberg form H
-*>    by the unitary matrix Q:  A = Q*H*Q**H = (QZ)*T*(QZ)**H.
+*> If ICOMPQ = 0, ZLALSA applies the inverse of the left singular vector
+*> matrix of an upper bidiagonal matrix to the right hand side; and if
+*> ICOMPQ = 1, ZLALSA applies the right singular vector matrix to the
+*> right hand side. The singular vector matrices were generated in
+*> compact form by ZLALSA.
 *> \endverbatim
 *
 *  Arguments:
 *  ==========
 *
-*> \param[in] JOB
+*> \param[in] ICOMPQ
 *> \verbatim
-*>          JOB is CHARACTER*1
-*>           = 'E':  compute eigenvalues only;
-*>           = 'S':  compute eigenvalues and the Schur form T.
+*>          ICOMPQ is INTEGER
+*>         Specifies whether the left or the right singular vector
+*>         matrix is involved.
+*>         = 0: Left singular vector matrix
+*>         = 1: Right singular vector matrix
 *> \endverbatim
 *>
-*> \param[in] COMPZ
+*> \param[in] SMLSIZ
 *> \verbatim
-*>          COMPZ is CHARACTER*1
-*>           = 'N':  no Schur vectors are computed;
-*>           = 'I':  Z is initialized to the unit matrix and the matrix Z
-*>                   of Schur vectors of H is returned;
-*>           = 'V':  Z must contain an unitary matrix Q on entry, and
-*>                   the product Q*Z is returned.
+*>          SMLSIZ is INTEGER
+*>         The maximum size of the subproblems at the bottom of the
+*>         computation tree.
 *> \endverbatim
 *>
 *> \param[in] N
 *> \verbatim
 *>          N is INTEGER
-*>           The order of the matrix H.  N .GE. 0.
+*>         The row and column dimensions of the upper bidiagonal matrix.
 *> \endverbatim
 *>
-*> \param[in] ILO
+*> \param[in] NRHS
 *> \verbatim
-*>          ILO is INTEGER
+*>          NRHS is INTEGER
+*>         The number of columns of B and BX. NRHS must be at least 1.
 *> \endverbatim
 *>
-*> \param[in] IHI
+*> \param[in,out] B
 *> \verbatim
-*>          IHI is INTEGER
+*>          B is COMPLEX*16 array, dimension ( LDB, NRHS )
+*>         On input, B contains the right hand sides of the least
+*>         squares problem in rows 1 through M.
+*>         On output, B contains the solution X in rows 1 through N.
+*> \endverbatim
 *>
-*>           It is assumed that H is already upper triangular in rows
-*>           and columns 1:ILO-1 and IHI+1:N. ILO and IHI are normally
-*>           set by a previous call to ZGEBAL, and then passed to ZGEHRD
-*>           when the matrix output by ZGEBAL is reduced to Hessenberg
-*>           form. Otherwise ILO and IHI should be set to 1 and N
-*>           respectively.  If N.GT.0, then 1.LE.ILO.LE.IHI.LE.N.
-*>           If N = 0, then ILO = 1 and IHI = 0.
+*> \param[in] LDB
+*> \verbatim
+*>          LDB is INTEGER
+*>         The leading dimension of B in the calling subprogram.
+*>         LDB must be at least max(1,MAX( M, N ) ).
 *> \endverbatim
 *>
-*> \param[in,out] H
+*> \param[out] BX
 *> \verbatim
-*>          H is COMPLEX*16 array, dimension (LDH,N)
-*>           On entry, the upper Hessenberg matrix H.
-*>           On exit, if INFO = 0 and JOB = 'S', H contains the upper
-*>           triangular matrix T from the Schur decomposition (the
-*>           Schur form). If INFO = 0 and JOB = 'E', the contents of
-*>           H are unspecified on exit.  (The output value of H when
-*>           INFO.GT.0 is given under the description of INFO below.)
+*>          BX is COMPLEX*16 array, dimension ( LDBX, NRHS )
+*>         On exit, the result of applying the left or right singular
+*>         vector matrix to B.
+*> \endverbatim
 *>
-*>           Unlike earlier versions of ZHSEQR, this subroutine may
-*>           explicitly H(i,j) = 0 for i.GT.j and j = 1, 2, ... ILO-1
-*>           or j = IHI+1, IHI+2, ... N.
+*> \param[in] LDBX
+*> \verbatim
+*>          LDBX is INTEGER
+*>         The leading dimension of BX.
 *> \endverbatim
 *>
-*> \param[in] LDH
+*> \param[in] U
 *> \verbatim
-*>          LDH is INTEGER
-*>           The leading dimension of the array H. LDH .GE. max(1,N).
+*>          U is DOUBLE PRECISION array, dimension ( LDU, SMLSIZ ).
+*>         On entry, U contains the left singular vector matrices of all
+*>         subproblems at the bottom level.
 *> \endverbatim
 *>
-*> \param[out] W
+*> \param[in] LDU
 *> \verbatim
-*>          W is COMPLEX*16 array, dimension (N)
-*>           The computed eigenvalues. If JOB = 'S', the eigenvalues are
-*>           stored in the same order as on the diagonal of the Schur
-*>           form returned in H, with W(i) = H(i,i).
+*>          LDU is INTEGER, LDU = > N.
+*>         The leading dimension of arrays U, VT, DIFL, DIFR,
+*>         POLES, GIVNUM, and Z.
 *> \endverbatim
 *>
-*> \param[in,out] Z
+*> \param[in] VT
 *> \verbatim
-*>          Z is COMPLEX*16 array, dimension (LDZ,N)
-*>           If COMPZ = 'N', Z is not referenced.
-*>           If COMPZ = 'I', on entry Z need not be set and on exit,
-*>           if INFO = 0, Z contains the unitary matrix Z of the Schur
-*>           vectors of H.  If COMPZ = 'V', on entry Z must contain an
-*>           N-by-N matrix Q, which is assumed to be equal to the unit
-*>           matrix except for the submatrix Z(ILO:IHI,ILO:IHI). On exit,
-*>           if INFO = 0, Z contains Q*Z.
-*>           Normally Q is the unitary matrix generated by ZUNGHR
-*>           after the call to ZGEHRD which formed the Hessenberg matrix
-*>           H. (The output value of Z when INFO.GT.0 is given under
-*>           the description of INFO below.)
+*>          VT is DOUBLE PRECISION array, dimension ( LDU, SMLSIZ+1 ).
+*>         On entry, VT**H contains the right singular vector matrices of
+*>         all subproblems at the bottom level.
 *> \endverbatim
 *>
-*> \param[in] LDZ
+*> \param[in] K
 *> \verbatim
-*>          LDZ is INTEGER
-*>           The leading dimension of the array Z.  if COMPZ = 'I' or
-*>           COMPZ = 'V', then LDZ.GE.MAX(1,N).  Otherwize, LDZ.GE.1.
+*>          K is INTEGER array, dimension ( N ).
 *> \endverbatim
 *>
-*> \param[out] WORK
+*> \param[in] DIFL
 *> \verbatim
-*>          WORK is COMPLEX*16 array, dimension (LWORK)
-*>           On exit, if INFO = 0, WORK(1) returns an estimate of
-*>           the optimal value for LWORK.
+*>          DIFL is DOUBLE PRECISION array, dimension ( LDU, NLVL ).
+*>         where NLVL = INT(log_2 (N/(SMLSIZ+1))) + 1.
 *> \endverbatim
 *>
-*> \param[in] LWORK
+*> \param[in] DIFR
 *> \verbatim
-*>          LWORK is INTEGER
-*>           The dimension of the array WORK.  LWORK .GE. max(1,N)
-*>           is sufficient and delivers very good and sometimes
-*>           optimal performance.  However, LWORK as large as 11*N
-*>           may be required for optimal performance.  A workspace
-*>           query is recommended to determine the optimal workspace
-*>           size.
+*>          DIFR is DOUBLE PRECISION array, dimension ( LDU, 2 * NLVL ).
+*>         On entry, DIFL(*, I) and DIFR(*, 2 * I -1) record
+*>         distances between singular values on the I-th level and
+*>         singular values on the (I -1)-th level, and DIFR(*, 2 * I)
+*>         record the normalizing factors of the right singular vectors
+*>         matrices of subproblems on I-th level.
+*> \endverbatim
 *>
-*>           If LWORK = -1, then ZHSEQR does a workspace query.
-*>           In this case, ZHSEQR checks the input parameters and
-*>           estimates the optimal workspace size for the given
-*>           values of N, ILO and IHI.  The estimate is returned
-*>           in WORK(1).  No error message related to LWORK is
-*>           issued by XERBLA.  Neither H nor Z are accessed.
+*> \param[in] Z
+*> \verbatim
+*>          Z is DOUBLE PRECISION array, dimension ( LDU, NLVL ).
+*>         On entry, Z(1, I) contains the components of the deflation-
+*>         adjusted updating row vector for subproblems on the I-th
+*>         level.
 *> \endverbatim
 *>
-*> \param[out] INFO
+*> \param[in] POLES
 *> \verbatim
-*>          INFO is INTEGER
-*>             =  0:  successful exit
-*>           .LT. 0:  if INFO = -i, the i-th argument had an illegal
-*>                    value
-*>           .GT. 0:  if INFO = i, ZHSEQR failed to compute all of
-*>                the eigenvalues.  Elements 1:ilo-1 and i+1:n of WR
-*>                and WI contain those eigenvalues which have been
-*>                successfully computed.  (Failures are rare.)
+*>          POLES is DOUBLE PRECISION array, dimension ( LDU, 2 * NLVL ).
+*>         On entry, POLES(*, 2 * I -1: 2 * I) contains the new and old
+*>         singular values involved in the secular equations on the I-th
+*>         level.
+*> \endverbatim
 *>
-*>                If INFO .GT. 0 and JOB = 'E', then on exit, the
-*>                remaining unconverged eigenvalues are the eigen-
-*>                values of the upper Hessenberg matrix rows and
-*>                columns ILO through INFO of the final, output
-*>                value of H.
+*> \param[in] GIVPTR
+*> \verbatim
+*>          GIVPTR is INTEGER array, dimension ( N ).
+*>         On entry, GIVPTR( I ) records the number of Givens
+*>         rotations performed on the I-th problem on the computation
+*>         tree.
+*> \endverbatim
 *>
-*>                If INFO .GT. 0 and JOB   = 'S', then on exit
+*> \param[in] GIVCOL
+*> \verbatim
+*>          GIVCOL is INTEGER array, dimension ( LDGCOL, 2 * NLVL ).
+*>         On entry, for each I, GIVCOL(*, 2 * I - 1: 2 * I) records the
+*>         locations of Givens rotations performed on the I-th level on
+*>         the computation tree.
+*> \endverbatim
 *>
-*>           (*)  (initial value of H)*U  = U*(final value of H)
+*> \param[in] LDGCOL
+*> \verbatim
+*>          LDGCOL is INTEGER, LDGCOL = > N.
+*>         The leading dimension of arrays GIVCOL and PERM.
+*> \endverbatim
 *>
-*>                where U is a unitary matrix.  The final
-*>                value of  H is upper Hessenberg and triangular in
-*>                rows and columns INFO+1 through IHI.
+*> \param[in] PERM
+*> \verbatim
+*>          PERM is INTEGER array, dimension ( LDGCOL, NLVL ).
+*>         On entry, PERM(*, I) records permutations done on the I-th
+*>         level of the computation tree.
+*> \endverbatim
 *>
-*>                If INFO .GT. 0 and COMPZ = 'V', then on exit
+*> \param[in] GIVNUM
+*> \verbatim
+*>          GIVNUM is DOUBLE PRECISION array, dimension ( LDU, 2 * NLVL ).
+*>         On entry, GIVNUM(*, 2 *I -1 : 2 * I) records the C- and S-
+*>         values of Givens rotations performed on the I-th level on the
+*>         computation tree.
+*> \endverbatim
 *>
-*>                  (final value of Z)  =  (initial value of Z)*U
+*> \param[in] C
+*> \verbatim
+*>          C is DOUBLE PRECISION array, dimension ( N ).
+*>         On entry, if the I-th subproblem is not square,
+*>         C( I ) contains the C-value of a Givens rotation related to
+*>         the right null space of the I-th subproblem.
+*> \endverbatim
 *>
-*>                where U is the unitary matrix in (*) (regard-
-*>                less of the value of JOB.)
+*> \param[in] S
+*> \verbatim
+*>          S is DOUBLE PRECISION array, dimension ( N ).
+*>         On entry, if the I-th subproblem is not square,
+*>         S( I ) contains the S-value of a Givens rotation related to
+*>         the right null space of the I-th subproblem.
+*> \endverbatim
 *>
-*>                If INFO .GT. 0 and COMPZ = 'I', then on exit
-*>                      (final value of Z)  = U
-*>                where U is the unitary matrix in (*) (regard-
-*>                less of the value of JOB.)
+*> \param[out] RWORK
+*> \verbatim
+*>          RWORK is DOUBLE PRECISION array, dimension at least
+*>         MAX( (SMLSZ+1)*NRHS*3, N*(1+NRHS) + 2*NRHS ).
+*> \endverbatim
 *>
-*>                If INFO .GT. 0 and COMPZ = 'N', then Z is not
-*>                accessed.
+*> \param[out] IWORK
+*> \verbatim
+*>          IWORK is INTEGER array.
+*>         The dimension must be at least 3 * N
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*>          INFO is INTEGER
+*>          = 0:  successful exit.
+*>          < 0:  if INFO = -i, the i-th argument had an illegal value.
 *> \endverbatim
 *
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date November 2013
+*> \date December 2016
 *
 *> \ingroup complex16OTHERcomputational
 *
 *> \par Contributors:
 *  ==================
 *>
-*>       Karen Braman and Ralph Byers, Department of Mathematics,
-*>       University of Kansas, USA
-*
-*> \par Further Details:
-*  =====================
-*>
-*> \verbatim
-*>
-*>             Default values supplied by
-*>             ILAENV(ISPEC,'ZHSEQR',JOB(:1)//COMPZ(:1),N,ILO,IHI,LWORK).
-*>             It is suggested that these defaults be adjusted in order
-*>             to attain best performance in each particular
-*>             computational environment.
-*>
-*>            ISPEC=12: The ZLAHQR vs ZLAQR0 crossover point.
-*>                      Default: 75. (Must be at least 11.)
-*>
-*>            ISPEC=13: Recommended deflation window size.
-*>                      This depends on ILO, IHI and NS.  NS is the
-*>                      number of simultaneous shifts returned
-*>                      by ILAENV(ISPEC=15).  (See ISPEC=15 below.)
-*>                      The default for (IHI-ILO+1).LE.500 is NS.
-*>                      The default for (IHI-ILO+1).GT.500 is 3*NS/2.
-*>
-*>            ISPEC=14: Nibble crossover point. (See IPARMQ for
-*>                      details.)  Default: 14% of deflation window
-*>                      size.
-*>
-*>            ISPEC=15: Number of simultaneous shifts in a multishift
-*>                      QR iteration.
-*>
-*>                      If IHI-ILO+1 is ...
-*>
-*>                      greater than      ...but less    ... the
-*>                      or equal to ...      than        default is
-*>
-*>                           1               30          NS =   2(+)
-*>                          30               60          NS =   4(+)
-*>                          60              150          NS =  10(+)
-*>                         150              590          NS =  **
-*>                         590             3000          NS =  64
-*>                        3000             6000          NS = 128
-*>                        6000             infinity      NS = 256
-*>
-*>                  (+)  By default some or all matrices of this order
-*>                       are passed to the implicit double shift routine
-*>                       ZLAHQR and this parameter is ignored.  See
-*>                       ISPEC=12 above and comments in IPARMQ for
-*>                       details.
-*>
-*>                 (**)  The asterisks (**) indicate an ad-hoc
-*>                       function of N increasing from 10 to 64.
-*>
-*>            ISPEC=16: Select structured matrix multiply.
-*>                      If the number of simultaneous shifts (specified
-*>                      by ISPEC=15) is less than 14, then the default
-*>                      for ISPEC=16 is 0.  Otherwise the default for
-*>                      ISPEC=16 is 2.
-*> \endverbatim
-*
-*> \par References:
-*  ================
-*>
-*>       K. Braman, R. Byers and R. Mathias, The Multi-Shift QR
-*>       Algorithm Part I: Maintaining Well Focused Shifts, and Level 3
-*>       Performance, SIAM Journal of Matrix Analysis, volume 23, pages
-*>       929--947, 2002.
-*> \n
-*>       K. Braman, R. Byers and R. Mathias, The Multi-Shift QR
-*>       Algorithm Part II: Aggressive Early Deflation, SIAM Journal
-*>       of Matrix Analysis, volume 23, pages 948--973, 2002.
+*>     Ming Gu and Ren-Cang Li, Computer Science Division, University of
+*>       California at Berkeley, USA \n
+*>     Osni Marques, LBNL/NERSC, USA \n
 *
 *  =====================================================================
-      SUBROUTINE ZHSEQR( JOB, COMPZ, N, ILO, IHI, H, LDH, W, Z, LDZ,
-     $                   WORK, LWORK, INFO )
+      SUBROUTINE ZLALSA( ICOMPQ, SMLSIZ, N, NRHS, B, LDB, BX, LDBX, U,
+     $                   LDU, VT, K, DIFL, DIFR, Z, POLES, GIVPTR,
+     $                   GIVCOL, LDGCOL, PERM, GIVNUM, C, S, RWORK,
+     $                   IWORK, INFO )
 *
-*  -- LAPACK computational routine (version 3.5.0) --
+*  -- LAPACK computational routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     November 2013
+*     December 2016
 *
 *     .. Scalar Arguments ..
-      INTEGER            IHI, ILO, INFO, LDH, LDZ, LWORK, N
-      CHARACTER          COMPZ, JOB
+      INTEGER            ICOMPQ, INFO, LDB, LDBX, LDGCOL, LDU, N, NRHS,
+     $                   SMLSIZ
 *     ..
 *     .. Array Arguments ..
-      COMPLEX*16         H( LDH, * ), W( * ), WORK( * ), Z( LDZ, * )
+      INTEGER            GIVCOL( LDGCOL, * ), GIVPTR( * ), IWORK( * ),
+     $                   K( * ), PERM( LDGCOL, * )
+      DOUBLE PRECISION   C( * ), DIFL( LDU, * ), DIFR( LDU, * ),
+     $                   GIVNUM( LDU, * ), POLES( LDU, * ), RWORK( * ),
+     $                   S( * ), U( LDU, * ), VT( LDU, * ), Z( LDU, * )
+      COMPLEX*16         B( LDB, * ), BX( LDBX, * )
 *     ..
 *
 *  =====================================================================
 *
 *     .. Parameters ..
-*
-*     ==== Matrices of order NTINY or smaller must be processed by
-*     .    ZLAHQR because of insufficient subdiagonal scratch space.
-*     .    (This is a hard limit.) ====
-      INTEGER            NTINY
-      PARAMETER          ( NTINY = 11 )
-*
-*     ==== NL allocates some local workspace to help small matrices
-*     .    through a rare ZLAHQR failure.  NL .GT. NTINY = 11 is
-*     .    required and NL .LE. NMIN = ILAENV(ISPEC=12,...) is recom-
-*     .    mended.  (The default value of NMIN is 75.)  Using NL = 49
-*     .    allows up to six simultaneous shifts and a 16-by-16
-*     .    deflation window.  ====
-      INTEGER            NL
-      PARAMETER          ( NL = 49 )
-      COMPLEX*16         ZERO, ONE
-      PARAMETER          ( ZERO = ( 0.0d0, 0.0d0 ),
-     $                   ONE = ( 1.0d0, 0.0d0 ) )
-      DOUBLE PRECISION   RZERO
-      PARAMETER          ( RZERO = 0.0d0 )
-*     ..
-*     .. Local Arrays ..
-      COMPLEX*16         HL( NL, NL ), WORKL( NL )
+      DOUBLE PRECISION   ZERO, ONE
+      PARAMETER          ( ZERO = 0.0D0, ONE = 1.0D0 )
 *     ..
 *     .. Local Scalars ..
-      INTEGER            KBOT, NMIN
-      LOGICAL            INITZ, LQUERY, WANTT, WANTZ
-*     ..
-*     .. External Functions ..
-      INTEGER            ILAENV
-      LOGICAL            LSAME
-      EXTERNAL           ILAENV, LSAME
+      INTEGER            I, I1, IC, IM1, INODE, J, JCOL, JIMAG, JREAL,
+     $                   JROW, LF, LL, LVL, LVL2, ND, NDB1, NDIML,
+     $                   NDIMR, NL, NLF, NLP1, NLVL, NR, NRF, NRP1, SQRE
 *     ..
 *     .. External Subroutines ..
-      EXTERNAL           XERBLA, ZCOPY, ZLACPY, ZLAHQR, ZLAQR0, ZLASET
+      EXTERNAL           DGEMM, DLASDT, XERBLA, ZCOPY, ZLALS0
 *     ..
 *     .. Intrinsic Functions ..
-      INTRINSIC          DBLE, DCMPLX, MAX, MIN
+      INTRINSIC          DBLE, DCMPLX, DIMAG
 *     ..
 *     .. Executable Statements ..
 *
-*     ==== Decode and check the input parameters. ====
-*
-      WANTT = LSAME( JOB, 'S' )
-      INITZ = LSAME( COMPZ, 'I' )
-      WANTZ = INITZ .OR. LSAME( COMPZ, 'V' )
-      WORK( 1 ) = DCMPLX( DBLE( MAX( 1, N ) ), RZERO )
-      LQUERY = LWORK.EQ.-1
+*     Test the input parameters.
 *
       INFO = 0
-      IF( .NOT.LSAME( JOB, 'E' ) .AND. .NOT.WANTT ) THEN
+*
+      IF( ( ICOMPQ.LT.0 ) .OR. ( ICOMPQ.GT.1 ) ) THEN
          INFO = -1
-      ELSE IF( .NOT.LSAME( COMPZ, 'N' ) .AND. .NOT.WANTZ ) THEN
+      ELSE IF( SMLSIZ.LT.3 ) THEN
          INFO = -2
-      ELSE IF( N.LT.0 ) THEN
+      ELSE IF( N.LT.SMLSIZ ) THEN
          INFO = -3
-      ELSE IF( ILO.LT.1 .OR. ILO.GT.MAX( 1, N ) ) THEN
+      ELSE IF( NRHS.LT.1 ) THEN
          INFO = -4
-      ELSE IF( IHI.LT.MIN( ILO, N ) .OR. IHI.GT.N ) THEN
-         INFO = -5
-      ELSE IF( LDH.LT.MAX( 1, N ) ) THEN
-         INFO = -7
-      ELSE IF( LDZ.LT.1 .OR. ( WANTZ .AND. LDZ.LT.MAX( 1, N ) ) ) THEN
+      ELSE IF( LDB.LT.N ) THEN
+         INFO = -6
+      ELSE IF( LDBX.LT.N ) THEN
+         INFO = -8
+      ELSE IF( LDU.LT.N ) THEN
          INFO = -10
-      ELSE IF( LWORK.LT.MAX( 1, N ) .AND. .NOT.LQUERY ) THEN
-         INFO = -12
+      ELSE IF( LDGCOL.LT.N ) THEN
+         INFO = -19
       END IF
-*
       IF( INFO.NE.0 ) THEN
+         CALL XERBLA( 'ZLALSA', -INFO )
+         RETURN
+      END IF
+*
+*     Book-keeping and  setting up the computation tree.
+*
+      INODE = 1
+      NDIML = INODE + N
+      NDIMR = NDIML + N
+*
+      CALL DLASDT( N, NLVL, ND, IWORK( INODE ), IWORK( NDIML ),
+     $             IWORK( NDIMR ), SMLSIZ )
+*
+*     The following code applies back the left singular vector factors.
+*     For applying back the right singular vector factors, go to 170.
+*
+      IF( ICOMPQ.EQ.1 ) THEN
+         GO TO 170
+      END IF
+*
+*     The nodes on the bottom level of the tree were solved
+*     by DLASDQ. The corresponding left and right singular vector
+*     matrices are in explicit form. First apply back the left
+*     singular vector matrices.
+*
+      NDB1 = ( ND+1 ) / 2
+      DO 130 I = NDB1, ND
+*
+*        IC : center row of each node
+*        NL : number of rows of left  subproblem
+*        NR : number of rows of right subproblem
+*        NLF: starting row of the left   subproblem
+*        NRF: starting row of the right  subproblem
 *
-*        ==== Quick return in case of invalid argument. ====
+         I1 = I - 1
+         IC = IWORK( INODE+I1 )
+         NL = IWORK( NDIML+I1 )
+         NR = IWORK( NDIMR+I1 )
+         NLF = IC - NL
+         NRF = IC + 1
 *
-         CALL XERBLA( 'ZHSEQR', -INFO )
-         RETURN
+*        Since B and BX are complex, the following call to DGEMM
+*        is performed in two steps (real and imaginary parts).
 *
-      ELSE IF( N.EQ.0 ) THEN
+*        CALL DGEMM( 'T', 'N', NL, NRHS, NL, ONE, U( NLF, 1 ), LDU,
+*     $               B( NLF, 1 ), LDB, ZERO, BX( NLF, 1 ), LDBX )
 *
-*        ==== Quick return in case N = 0; nothing to do. ====
+         J = NL*NRHS*2
+         DO 20 JCOL = 1, NRHS
+            DO 10 JROW = NLF, NLF + NL - 1
+               J = J + 1
+               RWORK( J ) = DBLE( B( JROW, JCOL ) )
+   10       CONTINUE
+   20    CONTINUE
+         CALL DGEMM( 'T', 'N', NL, NRHS, NL, ONE, U( NLF, 1 ), LDU,
+     $               RWORK( 1+NL*NRHS*2 ), NL, ZERO, RWORK( 1 ), NL )
+         J = NL*NRHS*2
+         DO 40 JCOL = 1, NRHS
+            DO 30 JROW = NLF, NLF + NL - 1
+               J = J + 1
+               RWORK( J ) = DIMAG( B( JROW, JCOL ) )
+   30       CONTINUE
+   40    CONTINUE
+         CALL DGEMM( 'T', 'N', NL, NRHS, NL, ONE, U( NLF, 1 ), LDU,
+     $               RWORK( 1+NL*NRHS*2 ), NL, ZERO, RWORK( 1+NL*NRHS ),
+     $               NL )
+         JREAL = 0
+         JIMAG = NL*NRHS
+         DO 60 JCOL = 1, NRHS
+            DO 50 JROW = NLF, NLF + NL - 1
+               JREAL = JREAL + 1
+               JIMAG = JIMAG + 1
+               BX( JROW, JCOL ) = DCMPLX( RWORK( JREAL ),
+     $                            RWORK( JIMAG ) )
+   50       CONTINUE
+   60    CONTINUE
 *
-         RETURN
+*        Since B and BX are complex, the following call to DGEMM
+*        is performed in two steps (real and imaginary parts).
 *
-      ELSE IF( LQUERY ) THEN
+*        CALL DGEMM( 'T', 'N', NR, NRHS, NR, ONE, U( NRF, 1 ), LDU,
+*    $               B( NRF, 1 ), LDB, ZERO, BX( NRF, 1 ), LDBX )
 *
-*        ==== Quick return in case of a workspace query ====
+         J = NR*NRHS*2
+         DO 80 JCOL = 1, NRHS
+            DO 70 JROW = NRF, NRF + NR - 1
+               J = J + 1
+               RWORK( J ) = DBLE( B( JROW, JCOL ) )
+   70       CONTINUE
+   80    CONTINUE
+         CALL DGEMM( 'T', 'N', NR, NRHS, NR, ONE, U( NRF, 1 ), LDU,
+     $               RWORK( 1+NR*NRHS*2 ), NR, ZERO, RWORK( 1 ), NR )
+         J = NR*NRHS*2
+         DO 100 JCOL = 1, NRHS
+            DO 90 JROW = NRF, NRF + NR - 1
+               J = J + 1
+               RWORK( J ) = DIMAG( B( JROW, JCOL ) )
+   90       CONTINUE
+  100    CONTINUE
+         CALL DGEMM( 'T', 'N', NR, NRHS, NR, ONE, U( NRF, 1 ), LDU,
+     $               RWORK( 1+NR*NRHS*2 ), NR, ZERO, RWORK( 1+NR*NRHS ),
+     $               NR )
+         JREAL = 0
+         JIMAG = NR*NRHS
+         DO 120 JCOL = 1, NRHS
+            DO 110 JROW = NRF, NRF + NR - 1
+               JREAL = JREAL + 1
+               JIMAG = JIMAG + 1
+               BX( JROW, JCOL ) = DCMPLX( RWORK( JREAL ),
+     $                            RWORK( JIMAG ) )
+  110       CONTINUE
+  120    CONTINUE
 *
-         CALL ZLAQR0( WANTT, WANTZ, N, ILO, IHI, H, LDH, W, ILO, IHI, Z,
-     $                LDZ, WORK, LWORK, INFO )
-*        ==== Ensure reported workspace size is backward-compatible with
-*        .    previous LAPACK versions. ====
-         WORK( 1 ) = DCMPLX( MAX( DBLE( WORK( 1 ) ), DBLE( MAX( 1,
-     $               N ) ) ), RZERO )
-         RETURN
+  130 CONTINUE
 *
-      ELSE
+*     Next copy the rows of B that correspond to unchanged rows
+*     in the bidiagonal matrix to BX.
 *
-*        ==== copy eigenvalues isolated by ZGEBAL ====
+      DO 140 I = 1, ND
+         IC = IWORK( INODE+I-1 )
+         CALL ZCOPY( NRHS, B( IC, 1 ), LDB, BX( IC, 1 ), LDBX )
+  140 CONTINUE
 *
-         IF( ILO.GT.1 )
-     $      CALL ZCOPY( ILO-1, H, LDH+1, W, 1 )
-         IF( IHI.LT.N )
-     $      CALL ZCOPY( N-IHI, H( IHI+1, IHI+1 ), LDH+1, W( IHI+1 ), 1 )
+*     Finally go through the left singular vector matrices of all
+*     the other subproblems bottom-up on the tree.
 *
-*        ==== Initialize Z, if requested ====
+      J = 2**NLVL
+      SQRE = 0
 *
-         IF( INITZ )
-     $      CALL ZLASET( 'A', N, N, ZERO, ONE, Z, LDZ )
+      DO 160 LVL = NLVL, 1, -1
+         LVL2 = 2*LVL - 1
 *
-*        ==== Quick return if possible ====
+*        find the first node LF and last node LL on
+*        the current level LVL
 *
-         IF( ILO.EQ.IHI ) THEN
-            W( ILO ) = H( ILO, ILO )
-            RETURN
+         IF( LVL.EQ.1 ) THEN
+            LF = 1
+            LL = 1
+         ELSE
+            LF = 2**( LVL-1 )
+            LL = 2*LF - 1
          END IF
+         DO 150 I = LF, LL
+            IM1 = I - 1
+            IC = IWORK( INODE+IM1 )
+            NL = IWORK( NDIML+IM1 )
+            NR = IWORK( NDIMR+IM1 )
+            NLF = IC - NL
+            NRF = IC + 1
+            J = J - 1
+            CALL ZLALS0( ICOMPQ, NL, NR, SQRE, NRHS, BX( NLF, 1 ), LDBX,
+     $                   B( NLF, 1 ), LDB, PERM( NLF, LVL ),
+     $                   GIVPTR( J ), GIVCOL( NLF, LVL2 ), LDGCOL,
+     $                   GIVNUM( NLF, LVL2 ), LDU, POLES( NLF, LVL2 ),
+     $                   DIFL( NLF, LVL ), DIFR( NLF, LVL2 ),
+     $                   Z( NLF, LVL ), K( J ), C( J ), S( J ), RWORK,
+     $                   INFO )
+  150    CONTINUE
+  160 CONTINUE
+      GO TO 330
 *
-*        ==== ZLAHQR/ZLAQR0 crossover point ====
-*
-         NMIN = ILAENV( 12, 'ZHSEQR', JOB( : 1 ) // COMPZ( : 1 ), N,
-     $          ILO, IHI, LWORK )
-         NMIN = MAX( NTINY, NMIN )
-*
-*        ==== ZLAQR0 for big matrices; ZLAHQR for small ones ====
+*     ICOMPQ = 1: applying back the right singular vector factors.
 *
-         IF( N.GT.NMIN ) THEN
-            CALL ZLAQR0( WANTT, WANTZ, N, ILO, IHI, H, LDH, W, ILO, IHI,
-     $                   Z, LDZ, WORK, LWORK, INFO )
-         ELSE
+  170 CONTINUE
 *
-*           ==== Small matrix ====
+*     First now go through the right singular vector matrices of all
+*     the tree nodes top-down.
 *
-            CALL ZLAHQR( WANTT, WANTZ, N, ILO, IHI, H, LDH, W, ILO, IHI,
-     $                   Z, LDZ, INFO )
+      J = 0
+      DO 190 LVL = 1, NLVL
+         LVL2 = 2*LVL - 1
 *
-            IF( INFO.GT.0 ) THEN
+*        Find the first node LF and last node LL on
+*        the current level LVL.
 *
-*              ==== A rare ZLAHQR failure!  ZLAQR0 sometimes succeeds
-*              .    when ZLAHQR fails. ====
+         IF( LVL.EQ.1 ) THEN
+            LF = 1
+            LL = 1
+         ELSE
+            LF = 2**( LVL-1 )
+            LL = 2*LF - 1
+         END IF
+         DO 180 I = LL, LF, -1
+            IM1 = I - 1
+            IC = IWORK( INODE+IM1 )
+            NL = IWORK( NDIML+IM1 )
+            NR = IWORK( NDIMR+IM1 )
+            NLF = IC - NL
+            NRF = IC + 1
+            IF( I.EQ.LL ) THEN
+               SQRE = 0
+            ELSE
+               SQRE = 1
+            END IF
+            J = J + 1
+            CALL ZLALS0( ICOMPQ, NL, NR, SQRE, NRHS, B( NLF, 1 ), LDB,
+     $                   BX( NLF, 1 ), LDBX, PERM( NLF, LVL ),
+     $                   GIVPTR( J ), GIVCOL( NLF, LVL2 ), LDGCOL,
+     $                   GIVNUM( NLF, LVL2 ), LDU, POLES( NLF, LVL2 ),
+     $                   DIFL( NLF, LVL ), DIFR( NLF, LVL2 ),
+     $                   Z( NLF, LVL ), K( J ), C( J ), S( J ), RWORK,
+     $                   INFO )
+  180    CONTINUE
+  190 CONTINUE
 *
-               KBOT = INFO
+*     The nodes on the bottom level of the tree were solved
+*     by DLASDQ. The corresponding right singular vector
+*     matrices are in explicit form. Apply them back.
 *
-               IF( N.GE.NL ) THEN
+      NDB1 = ( ND+1 ) / 2
+      DO 320 I = NDB1, ND
+         I1 = I - 1
+         IC = IWORK( INODE+I1 )
+         NL = IWORK( NDIML+I1 )
+         NR = IWORK( NDIMR+I1 )
+         NLP1 = NL + 1
+         IF( I.EQ.ND ) THEN
+            NRP1 = NR
+         ELSE
+            NRP1 = NR + 1
+         END IF
+         NLF = IC - NL
+         NRF = IC + 1
 *
-*                 ==== Larger matrices have enough subdiagonal scratch
-*                 .    space to call ZLAQR0 directly. ====
+*        Since B and BX are complex, the following call to DGEMM is
+*        performed in two steps (real and imaginary parts).
 *
-                  CALL ZLAQR0( WANTT, WANTZ, N, ILO, KBOT, H, LDH, W,
-     $                         ILO, IHI, Z, LDZ, WORK, LWORK, INFO )
+*        CALL DGEMM( 'T', 'N', NLP1, NRHS, NLP1, ONE, VT( NLF, 1 ), LDU,
+*    $               B( NLF, 1 ), LDB, ZERO, BX( NLF, 1 ), LDBX )
 *
-               ELSE
+         J = NLP1*NRHS*2
+         DO 210 JCOL = 1, NRHS
+            DO 200 JROW = NLF, NLF + NLP1 - 1
+               J = J + 1
+               RWORK( J ) = DBLE( B( JROW, JCOL ) )
+  200       CONTINUE
+  210    CONTINUE
+         CALL DGEMM( 'T', 'N', NLP1, NRHS, NLP1, ONE, VT( NLF, 1 ), LDU,
+     $               RWORK( 1+NLP1*NRHS*2 ), NLP1, ZERO, RWORK( 1 ),
+     $               NLP1 )
+         J = NLP1*NRHS*2
+         DO 230 JCOL = 1, NRHS
+            DO 220 JROW = NLF, NLF + NLP1 - 1
+               J = J + 1
+               RWORK( J ) = DIMAG( B( JROW, JCOL ) )
+  220       CONTINUE
+  230    CONTINUE
+         CALL DGEMM( 'T', 'N', NLP1, NRHS, NLP1, ONE, VT( NLF, 1 ), LDU,
+     $               RWORK( 1+NLP1*NRHS*2 ), NLP1, ZERO,
+     $               RWORK( 1+NLP1*NRHS ), NLP1 )
+         JREAL = 0
+         JIMAG = NLP1*NRHS
+         DO 250 JCOL = 1, NRHS
+            DO 240 JROW = NLF, NLF + NLP1 - 1
+               JREAL = JREAL + 1
+               JIMAG = JIMAG + 1
+               BX( JROW, JCOL ) = DCMPLX( RWORK( JREAL ),
+     $                            RWORK( JIMAG ) )
+  240       CONTINUE
+  250    CONTINUE
 *
-*                 ==== Tiny matrices don't have enough subdiagonal
-*                 .    scratch space to benefit from ZLAQR0.  Hence,
-*                 .    tiny matrices must be copied into a larger
-*                 .    array before calling ZLAQR0. ====
+*        Since B and BX are complex, the following call to DGEMM is
+*        performed in two steps (real and imaginary parts).
 *
-                  CALL ZLACPY( 'A', N, N, H, LDH, HL, NL )
-                  HL( N+1, N ) = ZERO
-                  CALL ZLASET( 'A', NL, NL-N, ZERO, ZERO, HL( 1, N+1 ),
-     $                         NL )
-                  CALL ZLAQR0( WANTT, WANTZ, NL, ILO, KBOT, HL, NL, W,
-     $                         ILO, IHI, Z, LDZ, WORKL, NL, INFO )
-                  IF( WANTT .OR. INFO.NE.0 )
-     $               CALL ZLACPY( 'A', N, N, HL, NL, H, LDH )
-               END IF
-            END IF
-         END IF
+*        CALL DGEMM( 'T', 'N', NRP1, NRHS, NRP1, ONE, VT( NRF, 1 ), LDU,
+*    $               B( NRF, 1 ), LDB, ZERO, BX( NRF, 1 ), LDBX )
 *
-*        ==== Clear out the trash, if necessary. ====
+         J = NRP1*NRHS*2
+         DO 270 JCOL = 1, NRHS
+            DO 260 JROW = NRF, NRF + NRP1 - 1
+               J = J + 1
+               RWORK( J ) = DBLE( B( JROW, JCOL ) )
+  260       CONTINUE
+  270    CONTINUE
+         CALL DGEMM( 'T', 'N', NRP1, NRHS, NRP1, ONE, VT( NRF, 1 ), LDU,
+     $               RWORK( 1+NRP1*NRHS*2 ), NRP1, ZERO, RWORK( 1 ),
+     $               NRP1 )
+         J = NRP1*NRHS*2
+         DO 290 JCOL = 1, NRHS
+            DO 280 JROW = NRF, NRF + NRP1 - 1
+               J = J + 1
+               RWORK( J ) = DIMAG( B( JROW, JCOL ) )
+  280       CONTINUE
+  290    CONTINUE
+         CALL DGEMM( 'T', 'N', NRP1, NRHS, NRP1, ONE, VT( NRF, 1 ), LDU,
+     $               RWORK( 1+NRP1*NRHS*2 ), NRP1, ZERO,
+     $               RWORK( 1+NRP1*NRHS ), NRP1 )
+         JREAL = 0
+         JIMAG = NRP1*NRHS
+         DO 310 JCOL = 1, NRHS
+            DO 300 JROW = NRF, NRF + NRP1 - 1
+               JREAL = JREAL + 1
+               JIMAG = JIMAG + 1
+               BX( JROW, JCOL ) = DCMPLX( RWORK( JREAL ),
+     $                            RWORK( JIMAG ) )
+  300       CONTINUE
+  310    CONTINUE
 *
-         IF( ( WANTT .OR. INFO.NE.0 ) .AND. N.GT.2 )
-     $      CALL ZLASET( 'L', N-2, N-2, ZERO, ZERO, H( 3, 1 ), LDH )
+  320 CONTINUE
 *
-*        ==== Ensure reported workspace size is backward-compatible with
-*        .    previous LAPACK versions. ====
+  330 CONTINUE
 *
-         WORK( 1 ) = DCMPLX( MAX( DBLE( MAX( 1, N ) ),
-     $               DBLE( WORK( 1 ) ) ), RZERO )
-      END IF
+      RETURN
 *
-*     ==== End of ZHSEQR ====
+*     End of ZLALSA
 *
       END
-*> \brief \b ZLABRD reduces the first nb rows and columns of a general matrix to a bidiagonal form.
+*> \brief \b ZLALSD uses the singular value decomposition of A to solve the least squares problem.
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download ZLABRD + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/zlabrd.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/zlabrd.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/zlabrd.f"> 
+*> Download ZLALSD + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/zlalsd.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/zlalsd.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/zlalsd.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
-*       SUBROUTINE ZLABRD( M, N, NB, A, LDA, D, E, TAUQ, TAUP, X, LDX, Y,
-*                          LDY )
-* 
+*       SUBROUTINE ZLALSD( UPLO, SMLSIZ, N, NRHS, D, E, B, LDB, RCOND,
+*                          RANK, WORK, RWORK, IWORK, INFO )
+*
 *       .. Scalar Arguments ..
-*       INTEGER            LDA, LDX, LDY, M, N, NB
+*       CHARACTER          UPLO
+*       INTEGER            INFO, LDB, N, NRHS, RANK, SMLSIZ
+*       DOUBLE PRECISION   RCOND
 *       ..
 *       .. Array Arguments ..
-*       DOUBLE PRECISION   D( * ), E( * )
-*       COMPLEX*16         A( LDA, * ), TAUP( * ), TAUQ( * ), X( LDX, * ),
-*      $                   Y( LDY, * )
+*       INTEGER            IWORK( * )
+*       DOUBLE PRECISION   D( * ), E( * ), RWORK( * )
+*       COMPLEX*16         B( LDB, * ), WORK( * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
 *>
 *> \verbatim
 *>
-*> ZLABRD reduces the first NB rows and columns of a complex general
-*> m by n matrix A to upper or lower real bidiagonal form by a unitary
-*> transformation Q**H * A * P, and returns the matrices X and Y which
-*> are needed to apply the transformation to the unreduced part of A.
+*> ZLALSD uses the singular value decomposition of A to solve the least
+*> squares problem of finding X to minimize the Euclidean norm of each
+*> column of A*X-B, where A is N-by-N upper bidiagonal, and X and B
+*> are N-by-NRHS. The solution X overwrites B.
 *>
-*> If m >= n, A is reduced to upper bidiagonal form; if m < n, to lower
-*> bidiagonal form.
+*> The singular values of A smaller than RCOND times the largest
+*> singular value are treated as zero in solving the least squares
+*> problem; in this case a minimum norm solution is returned.
+*> The actual singular values are returned in D in ascending order.
 *>
-*> This is an auxiliary routine called by ZGEBRD
+*> This code makes very mild assumptions about floating point
+*> arithmetic. It will work on machines with a guard digit in
+*> add/subtract, or on those binary machines without guard digits
+*> which subtract like the Cray XMP, Cray YMP, Cray C 90, or Cray 2.
+*> It could conceivably fail on hexadecimal or decimal machines
+*> without guard digits, but we know of none.
 *> \endverbatim
 *
 *  Arguments:
 *  ==========
 *
-*> \param[in] M
-*> \verbatim
-*>          M is INTEGER
-*>          The number of rows in the matrix A.
-*> \endverbatim
-*>
-*> \param[in] N
-*> \verbatim
-*>          N is INTEGER
-*>          The number of columns in the matrix A.
-*> \endverbatim
-*>
-*> \param[in] NB
+*> \param[in] UPLO
 *> \verbatim
-*>          NB is INTEGER
-*>          The number of leading rows and columns of A to be reduced.
+*>          UPLO is CHARACTER*1
+*>         = 'U': D and E define an upper bidiagonal matrix.
+*>         = 'L': D and E define a  lower bidiagonal matrix.
 *> \endverbatim
 *>
-*> \param[in,out] A
+*> \param[in] SMLSIZ
 *> \verbatim
-*>          A is COMPLEX*16 array, dimension (LDA,N)
-*>          On entry, the m by n general matrix to be reduced.
-*>          On exit, the first NB rows and columns of the matrix are
-*>          overwritten; the rest of the array is unchanged.
-*>          If m >= n, elements on and below the diagonal in the first NB
-*>            columns, with the array TAUQ, represent the unitary
-*>            matrix Q as a product of elementary reflectors; and
-*>            elements above the diagonal in the first NB rows, with the
-*>            array TAUP, represent the unitary matrix P as a product
-*>            of elementary reflectors.
-*>          If m < n, elements below the diagonal in the first NB
-*>            columns, with the array TAUQ, represent the unitary
-*>            matrix Q as a product of elementary reflectors, and
-*>            elements on and above the diagonal in the first NB rows,
-*>            with the array TAUP, represent the unitary matrix P as
-*>            a product of elementary reflectors.
-*>          See Further Details.
+*>          SMLSIZ is INTEGER
+*>         The maximum size of the subproblems at the bottom of the
+*>         computation tree.
 *> \endverbatim
 *>
-*> \param[in] LDA
+*> \param[in] N
 *> \verbatim
-*>          LDA is INTEGER
-*>          The leading dimension of the array A.  LDA >= max(1,M).
+*>          N is INTEGER
+*>         The dimension of the  bidiagonal matrix.  N >= 0.
 *> \endverbatim
 *>
-*> \param[out] D
+*> \param[in] NRHS
 *> \verbatim
-*>          D is DOUBLE PRECISION array, dimension (NB)
-*>          The diagonal elements of the first NB rows and columns of
-*>          the reduced matrix.  D(i) = A(i,i).
+*>          NRHS is INTEGER
+*>         The number of columns of B. NRHS must be at least 1.
 *> \endverbatim
 *>
-*> \param[out] E
+*> \param[in,out] D
 *> \verbatim
-*>          E is DOUBLE PRECISION array, dimension (NB)
-*>          The off-diagonal elements of the first NB rows and columns of
-*>          the reduced matrix.
+*>          D is DOUBLE PRECISION array, dimension (N)
+*>         On entry D contains the main diagonal of the bidiagonal
+*>         matrix. On exit, if INFO = 0, D contains its singular values.
 *> \endverbatim
 *>
-*> \param[out] TAUQ
+*> \param[in,out] E
 *> \verbatim
-*>          TAUQ is COMPLEX*16 array dimension (NB)
-*>          The scalar factors of the elementary reflectors which
-*>          represent the unitary matrix Q. See Further Details.
+*>          E is DOUBLE PRECISION array, dimension (N-1)
+*>         Contains the super-diagonal entries of the bidiagonal matrix.
+*>         On exit, E has been destroyed.
 *> \endverbatim
 *>
-*> \param[out] TAUP
+*> \param[in,out] B
 *> \verbatim
-*>          TAUP is COMPLEX*16 array, dimension (NB)
-*>          The scalar factors of the elementary reflectors which
-*>          represent the unitary matrix P. See Further Details.
+*>          B is COMPLEX*16 array, dimension (LDB,NRHS)
+*>         On input, B contains the right hand sides of the least
+*>         squares problem. On output, B contains the solution X.
 *> \endverbatim
 *>
-*> \param[out] X
+*> \param[in] LDB
 *> \verbatim
-*>          X is COMPLEX*16 array, dimension (LDX,NB)
-*>          The m-by-nb matrix X required to update the unreduced part
-*>          of A.
+*>          LDB is INTEGER
+*>         The leading dimension of B in the calling subprogram.
+*>         LDB must be at least max(1,N).
 *> \endverbatim
 *>
-*> \param[in] LDX
+*> \param[in] RCOND
 *> \verbatim
-*>          LDX is INTEGER
-*>          The leading dimension of the array X. LDX >= max(1,M).
+*>          RCOND is DOUBLE PRECISION
+*>         The singular values of A less than or equal to RCOND times
+*>         the largest singular value are treated as zero in solving
+*>         the least squares problem. If RCOND is negative,
+*>         machine precision is used instead.
+*>         For example, if diag(S)*X=B were the least squares problem,
+*>         where diag(S) is a diagonal matrix of singular values, the
+*>         solution would be X(i) = B(i) / S(i) if S(i) is greater than
+*>         RCOND*max(S), and X(i) = 0 if S(i) is less than or equal to
+*>         RCOND*max(S).
 *> \endverbatim
 *>
-*> \param[out] Y
+*> \param[out] RANK
 *> \verbatim
-*>          Y is COMPLEX*16 array, dimension (LDY,NB)
-*>          The n-by-nb matrix Y required to update the unreduced part
-*>          of A.
+*>          RANK is INTEGER
+*>         The number of singular values of A greater than RCOND times
+*>         the largest singular value.
 *> \endverbatim
 *>
-*> \param[in] LDY
+*> \param[out] WORK
 *> \verbatim
-*>          LDY is INTEGER
-*>          The leading dimension of the array Y. LDY >= max(1,N).
+*>          WORK is COMPLEX*16 array, dimension at least
+*>         (N * NRHS).
 *> \endverbatim
-*
-*  Authors:
-*  ========
-*
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
-*
-*> \date September 2012
-*
-*> \ingroup complex16OTHERauxiliary
-*
-*> \par Further Details:
-*  =====================
 *>
+*> \param[out] RWORK
 *> \verbatim
+*>          RWORK is DOUBLE PRECISION array, dimension at least
+*>         (9*N + 2*N*SMLSIZ + 8*N*NLVL + 3*SMLSIZ*NRHS +
+*>         MAX( (SMLSIZ+1)**2, N*(1+NRHS) + 2*NRHS ),
+*>         where
+*>         NLVL = MAX( 0, INT( LOG_2( MIN( M,N )/(SMLSIZ+1) ) ) + 1 )
+*> \endverbatim
 *>
-*>  The matrices Q and P are represented as products of elementary
-*>  reflectors:
-*>
-*>     Q = H(1) H(2) . . . H(nb)  and  P = G(1) G(2) . . . G(nb)
-*>
-*>  Each H(i) and G(i) has the form:
-*>
-*>     H(i) = I - tauq * v * v**H  and G(i) = I - taup * u * u**H
-*>
-*>  where tauq and taup are complex scalars, and v and u are complex
-*>  vectors.
-*>
-*>  If m >= n, v(1:i-1) = 0, v(i) = 1, and v(i:m) is stored on exit in
-*>  A(i:m,i); u(1:i) = 0, u(i+1) = 1, and u(i+1:n) is stored on exit in
-*>  A(i,i+1:n); tauq is stored in TAUQ(i) and taup in TAUP(i).
-*>
-*>  If m < n, v(1:i) = 0, v(i+1) = 1, and v(i+1:m) is stored on exit in
-*>  A(i+2:m,i); u(1:i-1) = 0, u(i) = 1, and u(i:n) is stored on exit in
-*>  A(i,i+1:n); tauq is stored in TAUQ(i) and taup in TAUP(i).
-*>
-*>  The elements of the vectors v and u together form the m-by-nb matrix
-*>  V and the nb-by-n matrix U**H which are needed, with X and Y, to apply
-*>  the transformation to the unreduced part of the matrix, using a block
-*>  update of the form:  A := A - V*Y**H - X*U**H.
-*>
-*>  The contents of A on exit are illustrated by the following examples
-*>  with nb = 2:
-*>
-*>  m = 6 and n = 5 (m > n):          m = 5 and n = 6 (m < n):
-*>
-*>    (  1   1   u1  u1  u1 )           (  1   u1  u1  u1  u1  u1 )
-*>    (  v1  1   1   u2  u2 )           (  1   1   u2  u2  u2  u2 )
-*>    (  v1  v2  a   a   a  )           (  v1  1   a   a   a   a  )
-*>    (  v1  v2  a   a   a  )           (  v1  v2  a   a   a   a  )
-*>    (  v1  v2  a   a   a  )           (  v1  v2  a   a   a   a  )
-*>    (  v1  v2  a   a   a  )
+*> \param[out] IWORK
+*> \verbatim
+*>          IWORK is INTEGER array, dimension at least
+*>         (3*N*NLVL + 11*N).
+*> \endverbatim
 *>
-*>  where a denotes an element of the original matrix which is unchanged,
-*>  vi denotes an element of the vector defining H(i), and ui an element
-*>  of the vector defining G(i).
+*> \param[out] INFO
+*> \verbatim
+*>          INFO is INTEGER
+*>         = 0:  successful exit.
+*>         < 0:  if INFO = -i, the i-th argument had an illegal value.
+*>         > 0:  The algorithm failed to compute a singular value while
+*>               working on the submatrix lying in rows and columns
+*>               INFO/(N+1) through MOD(INFO,N+1).
 *> \endverbatim
+*
+*  Authors:
+*  ========
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date December 2016
+*
+*> \ingroup complex16OTHERcomputational
+*
+*> \par Contributors:
+*  ==================
 *>
+*>     Ming Gu and Ren-Cang Li, Computer Science Division, University of
+*>       California at Berkeley, USA \n
+*>     Osni Marques, LBNL/NERSC, USA \n
+*
 *  =====================================================================
-      SUBROUTINE ZLABRD( M, N, NB, A, LDA, D, E, TAUQ, TAUP, X, LDX, Y,
-     $                   LDY )
+      SUBROUTINE ZLALSD( UPLO, SMLSIZ, N, NRHS, D, E, B, LDB, RCOND,
+     $                   RANK, WORK, RWORK, IWORK, INFO )
 *
-*  -- LAPACK auxiliary routine (version 3.4.2) --
+*  -- LAPACK computational routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     September 2012
+*     December 2016
 *
 *     .. Scalar Arguments ..
-      INTEGER            LDA, LDX, LDY, M, N, NB
+      CHARACTER          UPLO
+      INTEGER            INFO, LDB, N, NRHS, RANK, SMLSIZ
+      DOUBLE PRECISION   RCOND
 *     ..
 *     .. Array Arguments ..
-      DOUBLE PRECISION   D( * ), E( * )
-      COMPLEX*16         A( LDA, * ), TAUP( * ), TAUQ( * ), X( LDX, * ),
-     $                   Y( LDY, * )
+      INTEGER            IWORK( * )
+      DOUBLE PRECISION   D( * ), E( * ), RWORK( * )
+      COMPLEX*16         B( LDB, * ), WORK( * )
 *     ..
 *
 *  =====================================================================
 *
 *     .. Parameters ..
-      COMPLEX*16         ZERO, ONE
-      PARAMETER          ( ZERO = ( 0.0D+0, 0.0D+0 ),
-     $                   ONE = ( 1.0D+0, 0.0D+0 ) )
+      DOUBLE PRECISION   ZERO, ONE, TWO
+      PARAMETER          ( ZERO = 0.0D0, ONE = 1.0D0, TWO = 2.0D0 )
+      COMPLEX*16         CZERO
+      PARAMETER          ( CZERO = ( 0.0D0, 0.0D0 ) )
 *     ..
 *     .. Local Scalars ..
-      INTEGER            I
-      COMPLEX*16         ALPHA
+      INTEGER            BX, BXST, C, DIFL, DIFR, GIVCOL, GIVNUM,
+     $                   GIVPTR, I, ICMPQ1, ICMPQ2, IRWB, IRWIB, IRWRB,
+     $                   IRWU, IRWVT, IRWWRK, IWK, J, JCOL, JIMAG,
+     $                   JREAL, JROW, K, NLVL, NM1, NRWORK, NSIZE, NSUB,
+     $                   PERM, POLES, S, SIZEI, SMLSZP, SQRE, ST, ST1,
+     $                   U, VT, Z
+      DOUBLE PRECISION   CS, EPS, ORGNRM, RCND, R, SN, TOL
+*     ..
+*     .. External Functions ..
+      INTEGER            IDAMAX
+      DOUBLE PRECISION   DLAMCH, DLANST
+      EXTERNAL           IDAMAX, DLAMCH, DLANST
 *     ..
 *     .. External Subroutines ..
-      EXTERNAL           ZGEMV, ZLACGV, ZLARFG, ZSCAL
+      EXTERNAL           DGEMM, DLARTG, DLASCL, DLASDA, DLASDQ, DLASET,
+     $                   DLASRT, XERBLA, ZCOPY, ZDROT, ZLACPY, ZLALSA,
+     $                   ZLASCL, ZLASET
 *     ..
 *     .. Intrinsic Functions ..
-      INTRINSIC          MIN
+      INTRINSIC          ABS, DBLE, DCMPLX, DIMAG, INT, LOG, SIGN
 *     ..
 *     .. Executable Statements ..
 *
-*     Quick return if possible
+*     Test the input parameters.
 *
-      IF( M.LE.0 .OR. N.LE.0 )
-     $   RETURN
+      INFO = 0
 *
-      IF( M.GE.N ) THEN
+      IF( N.LT.0 ) THEN
+         INFO = -3
+      ELSE IF( NRHS.LT.1 ) THEN
+         INFO = -4
+      ELSE IF( ( LDB.LT.1 ) .OR. ( LDB.LT.N ) ) THEN
+         INFO = -8
+      END IF
+      IF( INFO.NE.0 ) THEN
+         CALL XERBLA( 'ZLALSD', -INFO )
+         RETURN
+      END IF
 *
-*        Reduce to upper bidiagonal form
+      EPS = DLAMCH( 'Epsilon' )
 *
-         DO 10 I = 1, NB
+*     Set up the tolerance.
 *
-*           Update A(i:m,i)
+      IF( ( RCOND.LE.ZERO ) .OR. ( RCOND.GE.ONE ) ) THEN
+         RCND = EPS
+      ELSE
+         RCND = RCOND
+      END IF
 *
-            CALL ZLACGV( I-1, Y( I, 1 ), LDY )
-            CALL ZGEMV( 'No transpose', M-I+1, I-1, -ONE, A( I, 1 ),
-     $                  LDA, Y( I, 1 ), LDY, ONE, A( I, I ), 1 )
-            CALL ZLACGV( I-1, Y( I, 1 ), LDY )
-            CALL ZGEMV( 'No transpose', M-I+1, I-1, -ONE, X( I, 1 ),
-     $                  LDX, A( 1, I ), 1, ONE, A( I, I ), 1 )
+      RANK = 0
 *
-*           Generate reflection Q(i) to annihilate A(i+1:m,i)
+*     Quick return if possible.
 *
-            ALPHA = A( I, I )
-            CALL ZLARFG( M-I+1, ALPHA, A( MIN( I+1, M ), I ), 1,
-     $                   TAUQ( I ) )
-            D( I ) = ALPHA
-            IF( I.LT.N ) THEN
-               A( I, I ) = ONE
+      IF( N.EQ.0 ) THEN
+         RETURN
+      ELSE IF( N.EQ.1 ) THEN
+         IF( D( 1 ).EQ.ZERO ) THEN
+            CALL ZLASET( 'A', 1, NRHS, CZERO, CZERO, B, LDB )
+         ELSE
+            RANK = 1
+            CALL ZLASCL( 'G', 0, 0, D( 1 ), ONE, 1, NRHS, B, LDB, INFO )
+            D( 1 ) = ABS( D( 1 ) )
+         END IF
+         RETURN
+      END IF
 *
-*              Compute Y(i+1:n,i)
+*     Rotate the matrix if it is lower bidiagonal.
 *
-               CALL ZGEMV( 'Conjugate transpose', M-I+1, N-I, ONE,
-     $                     A( I, I+1 ), LDA, A( I, I ), 1, ZERO,
-     $                     Y( I+1, I ), 1 )
-               CALL ZGEMV( 'Conjugate transpose', M-I+1, I-1, ONE,
-     $                     A( I, 1 ), LDA, A( I, I ), 1, ZERO,
-     $                     Y( 1, I ), 1 )
-               CALL ZGEMV( 'No transpose', N-I, I-1, -ONE, Y( I+1, 1 ),
-     $                     LDY, Y( 1, I ), 1, ONE, Y( I+1, I ), 1 )
-               CALL ZGEMV( 'Conjugate transpose', M-I+1, I-1, ONE,
-     $                     X( I, 1 ), LDX, A( I, I ), 1, ZERO,
-     $                     Y( 1, I ), 1 )
-               CALL ZGEMV( 'Conjugate transpose', I-1, N-I, -ONE,
-     $                     A( 1, I+1 ), LDA, Y( 1, I ), 1, ONE,
-     $                     Y( I+1, I ), 1 )
-               CALL ZSCAL( N-I, TAUQ( I ), Y( I+1, I ), 1 )
+      IF( UPLO.EQ.'L' ) THEN
+         DO 10 I = 1, N - 1
+            CALL DLARTG( D( I ), E( I ), CS, SN, R )
+            D( I ) = R
+            E( I ) = SN*D( I+1 )
+            D( I+1 ) = CS*D( I+1 )
+            IF( NRHS.EQ.1 ) THEN
+               CALL ZDROT( 1, B( I, 1 ), 1, B( I+1, 1 ), 1, CS, SN )
+            ELSE
+               RWORK( I*2-1 ) = CS
+               RWORK( I*2 ) = SN
+            END IF
+   10    CONTINUE
+         IF( NRHS.GT.1 ) THEN
+            DO 30 I = 1, NRHS
+               DO 20 J = 1, N - 1
+                  CS = RWORK( J*2-1 )
+                  SN = RWORK( J*2 )
+                  CALL ZDROT( 1, B( J, I ), 1, B( J+1, I ), 1, CS, SN )
+   20          CONTINUE
+   30       CONTINUE
+         END IF
+      END IF
 *
-*              Update A(i,i+1:n)
+*     Scale.
 *
-               CALL ZLACGV( N-I, A( I, I+1 ), LDA )
-               CALL ZLACGV( I, A( I, 1 ), LDA )
-               CALL ZGEMV( 'No transpose', N-I, I, -ONE, Y( I+1, 1 ),
-     $                     LDY, A( I, 1 ), LDA, ONE, A( I, I+1 ), LDA )
-               CALL ZLACGV( I, A( I, 1 ), LDA )
-               CALL ZLACGV( I-1, X( I, 1 ), LDX )
-               CALL ZGEMV( 'Conjugate transpose', I-1, N-I, -ONE,
-     $                     A( 1, I+1 ), LDA, X( I, 1 ), LDX, ONE,
-     $                     A( I, I+1 ), LDA )
-               CALL ZLACGV( I-1, X( I, 1 ), LDX )
+      NM1 = N - 1
+      ORGNRM = DLANST( 'M', N, D, E )
+      IF( ORGNRM.EQ.ZERO ) THEN
+         CALL ZLASET( 'A', N, NRHS, CZERO, CZERO, B, LDB )
+         RETURN
+      END IF
 *
-*              Generate reflection P(i) to annihilate A(i,i+2:n)
+      CALL DLASCL( 'G', 0, 0, ORGNRM, ONE, N, 1, D, N, INFO )
+      CALL DLASCL( 'G', 0, 0, ORGNRM, ONE, NM1, 1, E, NM1, INFO )
 *
-               ALPHA = A( I, I+1 )
-               CALL ZLARFG( N-I, ALPHA, A( I, MIN( I+2, N ) ), LDA,
-     $                      TAUP( I ) )
-               E( I ) = ALPHA
-               A( I, I+1 ) = ONE
+*     If N is smaller than the minimum divide size SMLSIZ, then solve
+*     the problem with another solver.
 *
-*              Compute X(i+1:m,i)
+      IF( N.LE.SMLSIZ ) THEN
+         IRWU = 1
+         IRWVT = IRWU + N*N
+         IRWWRK = IRWVT + N*N
+         IRWRB = IRWWRK
+         IRWIB = IRWRB + N*NRHS
+         IRWB = IRWIB + N*NRHS
+         CALL DLASET( 'A', N, N, ZERO, ONE, RWORK( IRWU ), N )
+         CALL DLASET( 'A', N, N, ZERO, ONE, RWORK( IRWVT ), N )
+         CALL DLASDQ( 'U', 0, N, N, N, 0, D, E, RWORK( IRWVT ), N,
+     $                RWORK( IRWU ), N, RWORK( IRWWRK ), 1,
+     $                RWORK( IRWWRK ), INFO )
+         IF( INFO.NE.0 ) THEN
+            RETURN
+         END IF
 *
-               CALL ZGEMV( 'No transpose', M-I, N-I, ONE, A( I+1, I+1 ),
-     $                     LDA, A( I, I+1 ), LDA, ZERO, X( I+1, I ), 1 )
-               CALL ZGEMV( 'Conjugate transpose', N-I, I, ONE,
-     $                     Y( I+1, 1 ), LDY, A( I, I+1 ), LDA, ZERO,
-     $                     X( 1, I ), 1 )
-               CALL ZGEMV( 'No transpose', M-I, I, -ONE, A( I+1, 1 ),
-     $                     LDA, X( 1, I ), 1, ONE, X( I+1, I ), 1 )
-               CALL ZGEMV( 'No transpose', I-1, N-I, ONE, A( 1, I+1 ),
-     $                     LDA, A( I, I+1 ), LDA, ZERO, X( 1, I ), 1 )
-               CALL ZGEMV( 'No transpose', M-I, I-1, -ONE, X( I+1, 1 ),
-     $                     LDX, X( 1, I ), 1, ONE, X( I+1, I ), 1 )
-               CALL ZSCAL( M-I, TAUP( I ), X( I+1, I ), 1 )
-               CALL ZLACGV( N-I, A( I, I+1 ), LDA )
+*        In the real version, B is passed to DLASDQ and multiplied
+*        internally by Q**H. Here B is complex and that product is
+*        computed below in two steps (real and imaginary parts).
+*
+         J = IRWB - 1
+         DO 50 JCOL = 1, NRHS
+            DO 40 JROW = 1, N
+               J = J + 1
+               RWORK( J ) = DBLE( B( JROW, JCOL ) )
+   40       CONTINUE
+   50    CONTINUE
+         CALL DGEMM( 'T', 'N', N, NRHS, N, ONE, RWORK( IRWU ), N,
+     $               RWORK( IRWB ), N, ZERO, RWORK( IRWRB ), N )
+         J = IRWB - 1
+         DO 70 JCOL = 1, NRHS
+            DO 60 JROW = 1, N
+               J = J + 1
+               RWORK( J ) = DIMAG( B( JROW, JCOL ) )
+   60       CONTINUE
+   70    CONTINUE
+         CALL DGEMM( 'T', 'N', N, NRHS, N, ONE, RWORK( IRWU ), N,
+     $               RWORK( IRWB ), N, ZERO, RWORK( IRWIB ), N )
+         JREAL = IRWRB - 1
+         JIMAG = IRWIB - 1
+         DO 90 JCOL = 1, NRHS
+            DO 80 JROW = 1, N
+               JREAL = JREAL + 1
+               JIMAG = JIMAG + 1
+               B( JROW, JCOL ) = DCMPLX( RWORK( JREAL ),
+     $                           RWORK( JIMAG ) )
+   80       CONTINUE
+   90    CONTINUE
+*
+         TOL = RCND*ABS( D( IDAMAX( N, D, 1 ) ) )
+         DO 100 I = 1, N
+            IF( D( I ).LE.TOL ) THEN
+               CALL ZLASET( 'A', 1, NRHS, CZERO, CZERO, B( I, 1 ), LDB )
+            ELSE
+               CALL ZLASCL( 'G', 0, 0, D( I ), ONE, 1, NRHS, B( I, 1 ),
+     $                      LDB, INFO )
+               RANK = RANK + 1
             END IF
-   10    CONTINUE
-      ELSE
+  100    CONTINUE
 *
-*        Reduce to lower bidiagonal form
+*        Since B is complex, the following call to DGEMM is performed
+*        in two steps (real and imaginary parts). That is for V * B
+*        (in the real version of the code V**H is stored in WORK).
 *
-         DO 20 I = 1, NB
+*        CALL DGEMM( 'T', 'N', N, NRHS, N, ONE, WORK, N, B, LDB, ZERO,
+*    $               WORK( NWORK ), N )
 *
-*           Update A(i,i:n)
+         J = IRWB - 1
+         DO 120 JCOL = 1, NRHS
+            DO 110 JROW = 1, N
+               J = J + 1
+               RWORK( J ) = DBLE( B( JROW, JCOL ) )
+  110       CONTINUE
+  120    CONTINUE
+         CALL DGEMM( 'T', 'N', N, NRHS, N, ONE, RWORK( IRWVT ), N,
+     $               RWORK( IRWB ), N, ZERO, RWORK( IRWRB ), N )
+         J = IRWB - 1
+         DO 140 JCOL = 1, NRHS
+            DO 130 JROW = 1, N
+               J = J + 1
+               RWORK( J ) = DIMAG( B( JROW, JCOL ) )
+  130       CONTINUE
+  140    CONTINUE
+         CALL DGEMM( 'T', 'N', N, NRHS, N, ONE, RWORK( IRWVT ), N,
+     $               RWORK( IRWB ), N, ZERO, RWORK( IRWIB ), N )
+         JREAL = IRWRB - 1
+         JIMAG = IRWIB - 1
+         DO 160 JCOL = 1, NRHS
+            DO 150 JROW = 1, N
+               JREAL = JREAL + 1
+               JIMAG = JIMAG + 1
+               B( JROW, JCOL ) = DCMPLX( RWORK( JREAL ),
+     $                           RWORK( JIMAG ) )
+  150       CONTINUE
+  160    CONTINUE
 *
-            CALL ZLACGV( N-I+1, A( I, I ), LDA )
-            CALL ZLACGV( I-1, A( I, 1 ), LDA )
-            CALL ZGEMV( 'No transpose', N-I+1, I-1, -ONE, Y( I, 1 ),
-     $                  LDY, A( I, 1 ), LDA, ONE, A( I, I ), LDA )
-            CALL ZLACGV( I-1, A( I, 1 ), LDA )
-            CALL ZLACGV( I-1, X( I, 1 ), LDX )
-            CALL ZGEMV( 'Conjugate transpose', I-1, N-I+1, -ONE,
-     $                  A( 1, I ), LDA, X( I, 1 ), LDX, ONE, A( I, I ),
-     $                  LDA )
-            CALL ZLACGV( I-1, X( I, 1 ), LDX )
+*        Unscale.
 *
-*           Generate reflection P(i) to annihilate A(i,i+1:n)
+         CALL DLASCL( 'G', 0, 0, ONE, ORGNRM, N, 1, D, N, INFO )
+         CALL DLASRT( 'D', N, D, INFO )
+         CALL ZLASCL( 'G', 0, 0, ORGNRM, ONE, N, NRHS, B, LDB, INFO )
 *
-            ALPHA = A( I, I )
-            CALL ZLARFG( N-I+1, ALPHA, A( I, MIN( I+1, N ) ), LDA,
-     $                   TAUP( I ) )
-            D( I ) = ALPHA
-            IF( I.LT.M ) THEN
-               A( I, I ) = ONE
+         RETURN
+      END IF
 *
-*              Compute X(i+1:m,i)
+*     Book-keeping and setting up some constants.
 *
-               CALL ZGEMV( 'No transpose', M-I, N-I+1, ONE, A( I+1, I ),
-     $                     LDA, A( I, I ), LDA, ZERO, X( I+1, I ), 1 )
-               CALL ZGEMV( 'Conjugate transpose', N-I+1, I-1, ONE,
-     $                     Y( I, 1 ), LDY, A( I, I ), LDA, ZERO,
-     $                     X( 1, I ), 1 )
-               CALL ZGEMV( 'No transpose', M-I, I-1, -ONE, A( I+1, 1 ),
-     $                     LDA, X( 1, I ), 1, ONE, X( I+1, I ), 1 )
-               CALL ZGEMV( 'No transpose', I-1, N-I+1, ONE, A( 1, I ),
-     $                     LDA, A( I, I ), LDA, ZERO, X( 1, I ), 1 )
-               CALL ZGEMV( 'No transpose', M-I, I-1, -ONE, X( I+1, 1 ),
-     $                     LDX, X( 1, I ), 1, ONE, X( I+1, I ), 1 )
-               CALL ZSCAL( M-I, TAUP( I ), X( I+1, I ), 1 )
-               CALL ZLACGV( N-I+1, A( I, I ), LDA )
+      NLVL = INT( LOG( DBLE( N ) / DBLE( SMLSIZ+1 ) ) / LOG( TWO ) ) + 1
 *
-*              Update A(i+1:m,i)
+      SMLSZP = SMLSIZ + 1
 *
-               CALL ZLACGV( I-1, Y( I, 1 ), LDY )
-               CALL ZGEMV( 'No transpose', M-I, I-1, -ONE, A( I+1, 1 ),
-     $                     LDA, Y( I, 1 ), LDY, ONE, A( I+1, I ), 1 )
-               CALL ZLACGV( I-1, Y( I, 1 ), LDY )
-               CALL ZGEMV( 'No transpose', M-I, I, -ONE, X( I+1, 1 ),
-     $                     LDX, A( 1, I ), 1, ONE, A( I+1, I ), 1 )
+      U = 1
+      VT = 1 + SMLSIZ*N
+      DIFL = VT + SMLSZP*N
+      DIFR = DIFL + NLVL*N
+      Z = DIFR + NLVL*N*2
+      C = Z + NLVL*N
+      S = C + N
+      POLES = S + N
+      GIVNUM = POLES + 2*NLVL*N
+      NRWORK = GIVNUM + 2*NLVL*N
+      BX = 1
 *
-*              Generate reflection Q(i) to annihilate A(i+2:m,i)
+      IRWRB = NRWORK
+      IRWIB = IRWRB + SMLSIZ*NRHS
+      IRWB = IRWIB + SMLSIZ*NRHS
 *
-               ALPHA = A( I+1, I )
-               CALL ZLARFG( M-I, ALPHA, A( MIN( I+2, M ), I ), 1,
-     $                      TAUQ( I ) )
-               E( I ) = ALPHA
-               A( I+1, I ) = ONE
+      SIZEI = 1 + N
+      K = SIZEI + N
+      GIVPTR = K + N
+      PERM = GIVPTR + N
+      GIVCOL = PERM + NLVL*N
+      IWK = GIVCOL + NLVL*N*2
 *
-*              Compute Y(i+1:n,i)
+      ST = 1
+      SQRE = 0
+      ICMPQ1 = 1
+      ICMPQ2 = 0
+      NSUB = 0
 *
-               CALL ZGEMV( 'Conjugate transpose', M-I, N-I, ONE,
-     $                     A( I+1, I+1 ), LDA, A( I+1, I ), 1, ZERO,
-     $                     Y( I+1, I ), 1 )
-               CALL ZGEMV( 'Conjugate transpose', M-I, I-1, ONE,
-     $                     A( I+1, 1 ), LDA, A( I+1, I ), 1, ZERO,
-     $                     Y( 1, I ), 1 )
-               CALL ZGEMV( 'No transpose', N-I, I-1, -ONE, Y( I+1, 1 ),
-     $                     LDY, Y( 1, I ), 1, ONE, Y( I+1, I ), 1 )
-               CALL ZGEMV( 'Conjugate transpose', M-I, I, ONE,
-     $                     X( I+1, 1 ), LDX, A( I+1, I ), 1, ZERO,
-     $                     Y( 1, I ), 1 )
-               CALL ZGEMV( 'Conjugate transpose', I, N-I, -ONE,
-     $                     A( 1, I+1 ), LDA, Y( 1, I ), 1, ONE,
-     $                     Y( I+1, I ), 1 )
-               CALL ZSCAL( N-I, TAUQ( I ), Y( I+1, I ), 1 )
+      DO 170 I = 1, N
+         IF( ABS( D( I ) ).LT.EPS ) THEN
+            D( I ) = SIGN( EPS, D( I ) )
+         END IF
+  170 CONTINUE
+*
+      DO 240 I = 1, NM1
+         IF( ( ABS( E( I ) ).LT.EPS ) .OR. ( I.EQ.NM1 ) ) THEN
+            NSUB = NSUB + 1
+            IWORK( NSUB ) = ST
+*
+*           Subproblem found. First determine its size and then
+*           apply divide and conquer on it.
+*
+            IF( I.LT.NM1 ) THEN
+*
+*              A subproblem with E(I) small for I < NM1.
+*
+               NSIZE = I - ST + 1
+               IWORK( SIZEI+NSUB-1 ) = NSIZE
+            ELSE IF( ABS( E( I ) ).GE.EPS ) THEN
+*
+*              A subproblem with E(NM1) not too small but I = NM1.
+*
+               NSIZE = N - ST + 1
+               IWORK( SIZEI+NSUB-1 ) = NSIZE
             ELSE
-               CALL ZLACGV( N-I+1, A( I, I ), LDA )
+*
+*              A subproblem with E(NM1) small. This implies an
+*              1-by-1 subproblem at D(N), which is not solved
+*              explicitly.
+*
+               NSIZE = I - ST + 1
+               IWORK( SIZEI+NSUB-1 ) = NSIZE
+               NSUB = NSUB + 1
+               IWORK( NSUB ) = N
+               IWORK( SIZEI+NSUB-1 ) = 1
+               CALL ZCOPY( NRHS, B( N, 1 ), LDB, WORK( BX+NM1 ), N )
             END IF
-   20    CONTINUE
-      END IF
-      RETURN
+            ST1 = ST - 1
+            IF( NSIZE.EQ.1 ) THEN
 *
-*     End of ZLABRD
+*              This is a 1-by-1 subproblem and is not solved
+*              explicitly.
 *
-      END
-*> \brief \b ZLACGV conjugates a complex vector.
+               CALL ZCOPY( NRHS, B( ST, 1 ), LDB, WORK( BX+ST1 ), N )
+            ELSE IF( NSIZE.LE.SMLSIZ ) THEN
 *
-*  =========== DOCUMENTATION ===========
+*              This is a small subproblem and is solved by DLASDQ.
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+               CALL DLASET( 'A', NSIZE, NSIZE, ZERO, ONE,
+     $                      RWORK( VT+ST1 ), N )
+               CALL DLASET( 'A', NSIZE, NSIZE, ZERO, ONE,
+     $                      RWORK( U+ST1 ), N )
+               CALL DLASDQ( 'U', 0, NSIZE, NSIZE, NSIZE, 0, D( ST ),
+     $                      E( ST ), RWORK( VT+ST1 ), N, RWORK( U+ST1 ),
+     $                      N, RWORK( NRWORK ), 1, RWORK( NRWORK ),
+     $                      INFO )
+               IF( INFO.NE.0 ) THEN
+                  RETURN
+               END IF
 *
-*> \htmlonly
-*> Download ZLACGV + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/zlacgv.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/zlacgv.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/zlacgv.f"> 
-*> [TXT]</a>
-*> \endhtmlonly 
+*              In the real version, B is passed to DLASDQ and multiplied
+*              internally by Q**H. Here B is complex and that product is
+*              computed below in two steps (real and imaginary parts).
 *
-*  Definition:
-*  ===========
+               J = IRWB - 1
+               DO 190 JCOL = 1, NRHS
+                  DO 180 JROW = ST, ST + NSIZE - 1
+                     J = J + 1
+                     RWORK( J ) = DBLE( B( JROW, JCOL ) )
+  180             CONTINUE
+  190          CONTINUE
+               CALL DGEMM( 'T', 'N', NSIZE, NRHS, NSIZE, ONE,
+     $                     RWORK( U+ST1 ), N, RWORK( IRWB ), NSIZE,
+     $                     ZERO, RWORK( IRWRB ), NSIZE )
+               J = IRWB - 1
+               DO 210 JCOL = 1, NRHS
+                  DO 200 JROW = ST, ST + NSIZE - 1
+                     J = J + 1
+                     RWORK( J ) = DIMAG( B( JROW, JCOL ) )
+  200             CONTINUE
+  210          CONTINUE
+               CALL DGEMM( 'T', 'N', NSIZE, NRHS, NSIZE, ONE,
+     $                     RWORK( U+ST1 ), N, RWORK( IRWB ), NSIZE,
+     $                     ZERO, RWORK( IRWIB ), NSIZE )
+               JREAL = IRWRB - 1
+               JIMAG = IRWIB - 1
+               DO 230 JCOL = 1, NRHS
+                  DO 220 JROW = ST, ST + NSIZE - 1
+                     JREAL = JREAL + 1
+                     JIMAG = JIMAG + 1
+                     B( JROW, JCOL ) = DCMPLX( RWORK( JREAL ),
+     $                                 RWORK( JIMAG ) )
+  220             CONTINUE
+  230          CONTINUE
+*
+               CALL ZLACPY( 'A', NSIZE, NRHS, B( ST, 1 ), LDB,
+     $                      WORK( BX+ST1 ), N )
+            ELSE
+*
+*              A large problem. Solve it using divide and conquer.
 *
-*       SUBROUTINE ZLACGV( N, X, INCX )
-* 
-*       .. Scalar Arguments ..
-*       INTEGER            INCX, N
-*       ..
-*       .. Array Arguments ..
-*       COMPLEX*16         X( * )
-*       ..
-*  
+               CALL DLASDA( ICMPQ1, SMLSIZ, NSIZE, SQRE, D( ST ),
+     $                      E( ST ), RWORK( U+ST1 ), N, RWORK( VT+ST1 ),
+     $                      IWORK( K+ST1 ), RWORK( DIFL+ST1 ),
+     $                      RWORK( DIFR+ST1 ), RWORK( Z+ST1 ),
+     $                      RWORK( POLES+ST1 ), IWORK( GIVPTR+ST1 ),
+     $                      IWORK( GIVCOL+ST1 ), N, IWORK( PERM+ST1 ),
+     $                      RWORK( GIVNUM+ST1 ), RWORK( C+ST1 ),
+     $                      RWORK( S+ST1 ), RWORK( NRWORK ),
+     $                      IWORK( IWK ), INFO )
+               IF( INFO.NE.0 ) THEN
+                  RETURN
+               END IF
+               BXST = BX + ST1
+               CALL ZLALSA( ICMPQ2, SMLSIZ, NSIZE, NRHS, B( ST, 1 ),
+     $                      LDB, WORK( BXST ), N, RWORK( U+ST1 ), N,
+     $                      RWORK( VT+ST1 ), IWORK( K+ST1 ),
+     $                      RWORK( DIFL+ST1 ), RWORK( DIFR+ST1 ),
+     $                      RWORK( Z+ST1 ), RWORK( POLES+ST1 ),
+     $                      IWORK( GIVPTR+ST1 ), IWORK( GIVCOL+ST1 ), N,
+     $                      IWORK( PERM+ST1 ), RWORK( GIVNUM+ST1 ),
+     $                      RWORK( C+ST1 ), RWORK( S+ST1 ),
+     $                      RWORK( NRWORK ), IWORK( IWK ), INFO )
+               IF( INFO.NE.0 ) THEN
+                  RETURN
+               END IF
+            END IF
+            ST = I + 1
+         END IF
+  240 CONTINUE
 *
-*> \par Purpose:
-*  =============
-*>
-*> \verbatim
-*>
-*> ZLACGV conjugates a complex vector of length N.
-*> \endverbatim
+*     Apply the singular values and treat the tiny ones as zero.
 *
-*  Arguments:
-*  ==========
+      TOL = RCND*ABS( D( IDAMAX( N, D, 1 ) ) )
 *
-*> \param[in] N
-*> \verbatim
-*>          N is INTEGER
-*>          The length of the vector X.  N >= 0.
-*> \endverbatim
-*>
-*> \param[in,out] X
-*> \verbatim
-*>          X is COMPLEX*16 array, dimension
-*>                         (1+(N-1)*abs(INCX))
-*>          On entry, the vector of length N to be conjugated.
-*>          On exit, X is overwritten with conjg(X).
-*> \endverbatim
-*>
-*> \param[in] INCX
-*> \verbatim
-*>          INCX is INTEGER
-*>          The spacing between successive elements of X.
-*> \endverbatim
+      DO 250 I = 1, N
 *
-*  Authors:
-*  ========
+*        Some of the elements in D can be negative because 1-by-1
+*        subproblems were not solved explicitly.
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+         IF( ABS( D( I ) ).LE.TOL ) THEN
+            CALL ZLASET( 'A', 1, NRHS, CZERO, CZERO, WORK( BX+I-1 ), N )
+         ELSE
+            RANK = RANK + 1
+            CALL ZLASCL( 'G', 0, 0, D( I ), ONE, 1, NRHS,
+     $                   WORK( BX+I-1 ), N, INFO )
+         END IF
+         D( I ) = ABS( D( I ) )
+  250 CONTINUE
 *
-*> \date September 2012
+*     Now apply back the right singular vectors.
 *
-*> \ingroup complex16OTHERauxiliary
+      ICMPQ2 = 1
+      DO 320 I = 1, NSUB
+         ST = IWORK( I )
+         ST1 = ST - 1
+         NSIZE = IWORK( SIZEI+I-1 )
+         BXST = BX + ST1
+         IF( NSIZE.EQ.1 ) THEN
+            CALL ZCOPY( NRHS, WORK( BXST ), N, B( ST, 1 ), LDB )
+         ELSE IF( NSIZE.LE.SMLSIZ ) THEN
 *
-*  =====================================================================
-      SUBROUTINE ZLACGV( N, X, INCX )
+*           Since B and BX are complex, the following call to DGEMM
+*           is performed in two steps (real and imaginary parts).
 *
-*  -- LAPACK auxiliary routine (version 3.4.2) --
-*  -- LAPACK is a software package provided by Univ. of Tennessee,    --
-*  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     September 2012
+*           CALL DGEMM( 'T', 'N', NSIZE, NRHS, NSIZE, ONE,
+*    $                  RWORK( VT+ST1 ), N, RWORK( BXST ), N, ZERO,
+*    $                  B( ST, 1 ), LDB )
 *
-*     .. Scalar Arguments ..
-      INTEGER            INCX, N
-*     ..
-*     .. Array Arguments ..
-      COMPLEX*16         X( * )
-*     ..
+            J = BXST - N - 1
+            JREAL = IRWB - 1
+            DO 270 JCOL = 1, NRHS
+               J = J + N
+               DO 260 JROW = 1, NSIZE
+                  JREAL = JREAL + 1
+                  RWORK( JREAL ) = DBLE( WORK( J+JROW ) )
+  260          CONTINUE
+  270       CONTINUE
+            CALL DGEMM( 'T', 'N', NSIZE, NRHS, NSIZE, ONE,
+     $                  RWORK( VT+ST1 ), N, RWORK( IRWB ), NSIZE, ZERO,
+     $                  RWORK( IRWRB ), NSIZE )
+            J = BXST - N - 1
+            JIMAG = IRWB - 1
+            DO 290 JCOL = 1, NRHS
+               J = J + N
+               DO 280 JROW = 1, NSIZE
+                  JIMAG = JIMAG + 1
+                  RWORK( JIMAG ) = DIMAG( WORK( J+JROW ) )
+  280          CONTINUE
+  290       CONTINUE
+            CALL DGEMM( 'T', 'N', NSIZE, NRHS, NSIZE, ONE,
+     $                  RWORK( VT+ST1 ), N, RWORK( IRWB ), NSIZE, ZERO,
+     $                  RWORK( IRWIB ), NSIZE )
+            JREAL = IRWRB - 1
+            JIMAG = IRWIB - 1
+            DO 310 JCOL = 1, NRHS
+               DO 300 JROW = ST, ST + NSIZE - 1
+                  JREAL = JREAL + 1
+                  JIMAG = JIMAG + 1
+                  B( JROW, JCOL ) = DCMPLX( RWORK( JREAL ),
+     $                              RWORK( JIMAG ) )
+  300          CONTINUE
+  310       CONTINUE
+         ELSE
+            CALL ZLALSA( ICMPQ2, SMLSIZ, NSIZE, NRHS, WORK( BXST ), N,
+     $                   B( ST, 1 ), LDB, RWORK( U+ST1 ), N,
+     $                   RWORK( VT+ST1 ), IWORK( K+ST1 ),
+     $                   RWORK( DIFL+ST1 ), RWORK( DIFR+ST1 ),
+     $                   RWORK( Z+ST1 ), RWORK( POLES+ST1 ),
+     $                   IWORK( GIVPTR+ST1 ), IWORK( GIVCOL+ST1 ), N,
+     $                   IWORK( PERM+ST1 ), RWORK( GIVNUM+ST1 ),
+     $                   RWORK( C+ST1 ), RWORK( S+ST1 ),
+     $                   RWORK( NRWORK ), IWORK( IWK ), INFO )
+            IF( INFO.NE.0 ) THEN
+               RETURN
+            END IF
+         END IF
+  320 CONTINUE
 *
-* =====================================================================
+*     Unscale and sort the singular values.
 *
-*     .. Local Scalars ..
-      INTEGER            I, IOFF
-*     ..
-*     .. Intrinsic Functions ..
-      INTRINSIC          DCONJG
-*     ..
-*     .. Executable Statements ..
+      CALL DLASCL( 'G', 0, 0, ONE, ORGNRM, N, 1, D, N, INFO )
+      CALL DLASRT( 'D', N, D, INFO )
+      CALL ZLASCL( 'G', 0, 0, ORGNRM, ONE, N, NRHS, B, LDB, INFO )
 *
-      IF( INCX.EQ.1 ) THEN
-         DO 10 I = 1, N
-            X( I ) = DCONJG( X( I ) )
-   10    CONTINUE
-      ELSE
-         IOFF = 1
-         IF( INCX.LT.0 )
-     $      IOFF = 1 - ( N-1 )*INCX
-         DO 20 I = 1, N
-            X( IOFF ) = DCONJG( X( IOFF ) )
-            IOFF = IOFF + INCX
-   20    CONTINUE
-      END IF
       RETURN
 *
-*     End of ZLACGV
+*     End of ZLALSD
 *
       END
-*> \brief \b ZLACN2 estimates the 1-norm of a square matrix, using reverse communication for evaluating matrix-vector products.
+*> \brief \b ZLANGE returns the value of the 1-norm, Frobenius norm, infinity-norm, or the largest absolute value of any element of a general rectangular matrix.
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download ZLACN2 + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/zlacn2.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/zlacn2.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/zlacn2.f"> 
+*> Download ZLANGE + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/zlange.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/zlange.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/zlange.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
-*       SUBROUTINE ZLACN2( N, V, X, EST, KASE, ISAVE )
-* 
+*       DOUBLE PRECISION FUNCTION ZLANGE( NORM, M, N, A, LDA, WORK )
+*
 *       .. Scalar Arguments ..
-*       INTEGER            KASE, N
-*       DOUBLE PRECISION   EST
+*       CHARACTER          NORM
+*       INTEGER            LDA, M, N
 *       ..
 *       .. Array Arguments ..
-*       INTEGER            ISAVE( 3 )
-*       COMPLEX*16         V( * ), X( * )
+*       DOUBLE PRECISION   WORK( * )
+*       COMPLEX*16         A( LDA, * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
 *>
 *> \verbatim
 *>
-*> ZLACN2 estimates the 1-norm of a square, complex matrix A.
-*> Reverse communication is used for evaluating matrix-vector products.
+*> ZLANGE  returns the value of the one norm,  or the Frobenius norm, or
+*> the  infinity norm,  or the  element of  largest absolute value  of a
+*> complex matrix A.
+*> \endverbatim
+*>
+*> \return ZLANGE
+*> \verbatim
+*>
+*>    ZLANGE = ( max(abs(A(i,j))), NORM = 'M' or 'm'
+*>             (
+*>             ( norm1(A),         NORM = '1', 'O' or 'o'
+*>             (
+*>             ( normI(A),         NORM = 'I' or 'i'
+*>             (
+*>             ( normF(A),         NORM = 'F', 'f', 'E' or 'e'
+*>
+*> where  norm1  denotes the  one norm of a matrix (maximum column sum),
+*> normI  denotes the  infinity norm  of a matrix  (maximum row sum) and
+*> normF  denotes the  Frobenius norm of a matrix (square root of sum of
+*> squares).  Note that  max(abs(A(i,j)))  is not a consistent matrix norm.
 *> \endverbatim
 *
 *  Arguments:
 *  ==========
 *
-*> \param[in] N
+*> \param[in] NORM
 *> \verbatim
-*>          N is INTEGER
-*>         The order of the matrix.  N >= 1.
+*>          NORM is CHARACTER*1
+*>          Specifies the value to be returned in ZLANGE as described
+*>          above.
 *> \endverbatim
 *>
-*> \param[out] V
+*> \param[in] M
 *> \verbatim
-*>          V is COMPLEX*16 array, dimension (N)
-*>         On the final return, V = A*W,  where  EST = norm(V)/norm(W)
-*>         (W is not returned).
+*>          M is INTEGER
+*>          The number of rows of the matrix A.  M >= 0.  When M = 0,
+*>          ZLANGE is set to zero.
 *> \endverbatim
 *>
-*> \param[in,out] X
+*> \param[in] N
 *> \verbatim
-*>          X is COMPLEX*16 array, dimension (N)
-*>         On an intermediate return, X should be overwritten by
-*>               A * X,   if KASE=1,
-*>               A**H * X,  if KASE=2,
-*>         where A**H is the conjugate transpose of A, and ZLACN2 must be
-*>         re-called with all the other parameters unchanged.
+*>          N is INTEGER
+*>          The number of columns of the matrix A.  N >= 0.  When N = 0,
+*>          ZLANGE is set to zero.
 *> \endverbatim
 *>
-*> \param[in,out] EST
+*> \param[in] A
 *> \verbatim
-*>          EST is DOUBLE PRECISION
-*>         On entry with KASE = 1 or 2 and ISAVE(1) = 3, EST should be
-*>         unchanged from the previous call to ZLACN2.
-*>         On exit, EST is an estimate (a lower bound) for norm(A). 
+*>          A is COMPLEX*16 array, dimension (LDA,N)
+*>          The m by n matrix A.
 *> \endverbatim
 *>
-*> \param[in,out] KASE
+*> \param[in] LDA
 *> \verbatim
-*>          KASE is INTEGER
-*>         On the initial call to ZLACN2, KASE should be 0.
-*>         On an intermediate return, KASE will be 1 or 2, indicating
-*>         whether X should be overwritten by A * X  or A**H * X.
-*>         On the final return from ZLACN2, KASE will again be 0.
+*>          LDA is INTEGER
+*>          The leading dimension of the array A.  LDA >= max(M,1).
 *> \endverbatim
 *>
-*> \param[in,out] ISAVE
+*> \param[out] WORK
 *> \verbatim
-*>          ISAVE is INTEGER array, dimension (3)
-*>         ISAVE is used to save variables between calls to ZLACN2
+*>          WORK is DOUBLE PRECISION array, dimension (MAX(1,LWORK)),
+*>          where LWORK >= M when NORM = 'I'; otherwise, WORK is not
+*>          referenced.
 *> \endverbatim
 *
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date September 2012
-*
-*> \ingroup complex16OTHERauxiliary
-*
-*> \par Further Details:
-*  =====================
-*>
-*> \verbatim
-*>
-*>  Originally named CONEST, dated March 16, 1988.
-*>
-*>  Last modified:  April, 1999
-*>
-*>  This is a thread safe version of ZLACON, which uses the array ISAVE
-*>  in place of a SAVE statement, as follows:
-*>
-*>     ZLACON     ZLACN2
-*>      JUMP     ISAVE(1)
-*>      J        ISAVE(2)
-*>      ITER     ISAVE(3)
-*> \endverbatim
+*> \date December 2016
 *
-*> \par Contributors:
-*  ==================
-*>
-*>     Nick Higham, University of Manchester
+*> \ingroup complex16GEauxiliary
 *
-*> \par References:
-*  ================
-*>
-*>  N.J. Higham, "FORTRAN codes for estimating the one-norm of
-*>  a real or complex matrix, with applications to condition estimation",
-*>  ACM Trans. Math. Soft., vol. 14, no. 4, pp. 381-396, December 1988.
-*>
 *  =====================================================================
-      SUBROUTINE ZLACN2( N, V, X, EST, KASE, ISAVE )
+      DOUBLE PRECISION FUNCTION ZLANGE( NORM, M, N, A, LDA, WORK )
 *
-*  -- LAPACK auxiliary routine (version 3.4.2) --
+*  -- LAPACK auxiliary routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     September 2012
+*     December 2016
 *
 *     .. Scalar Arguments ..
-      INTEGER            KASE, N
-      DOUBLE PRECISION   EST
+      CHARACTER          NORM
+      INTEGER            LDA, M, N
 *     ..
 *     .. Array Arguments ..
-      INTEGER            ISAVE( 3 )
-      COMPLEX*16         V( * ), X( * )
+      DOUBLE PRECISION   WORK( * )
+      COMPLEX*16         A( LDA, * )
 *     ..
 *
-*  =====================================================================
+* =====================================================================
 *
 *     .. Parameters ..
-      INTEGER              ITMAX
-      PARAMETER          ( ITMAX = 5 )
-      DOUBLE PRECISION     ONE,         TWO
-      PARAMETER          ( ONE = 1.0D0, TWO = 2.0D0 )
-      COMPLEX*16           CZERO, CONE
-      PARAMETER          ( CZERO = ( 0.0D0, 0.0D0 ),
-     $                            CONE = ( 1.0D0, 0.0D0 ) )
+      DOUBLE PRECISION   ONE, ZERO
+      PARAMETER          ( ONE = 1.0D+0, ZERO = 0.0D+0 )
 *     ..
 *     .. Local Scalars ..
-      INTEGER            I, JLAST
-      DOUBLE PRECISION   ABSXI, ALTSGN, ESTOLD, SAFMIN, TEMP
+      INTEGER            I, J
+      DOUBLE PRECISION   SCALE, SUM, VALUE, TEMP
 *     ..
 *     .. External Functions ..
-      INTEGER            IZMAX1
-      DOUBLE PRECISION   DLAMCH, DZSUM1
-      EXTERNAL           IZMAX1, DLAMCH, DZSUM1
+      LOGICAL            LSAME, DISNAN
+      EXTERNAL           LSAME, DISNAN
 *     ..
 *     .. External Subroutines ..
-      EXTERNAL           ZCOPY
+      EXTERNAL           ZLASSQ
 *     ..
 *     .. Intrinsic Functions ..
-      INTRINSIC          ABS, DBLE, DCMPLX, DIMAG
+      INTRINSIC          ABS, MIN, SQRT
 *     ..
 *     .. Executable Statements ..
 *
-      SAFMIN = DLAMCH( 'Safe minimum' )
-      IF( KASE.EQ.0 ) THEN
-         DO 10 I = 1, N
-            X( I ) = DCMPLX( ONE / DBLE( N ) )
-   10    CONTINUE
-         KASE = 1
-         ISAVE( 1 ) = 1
-         RETURN
-      END IF
-*
-      GO TO ( 20, 40, 70, 90, 120 )ISAVE( 1 )
-*
-*     ................ ENTRY   (ISAVE( 1 ) = 1)
-*     FIRST ITERATION.  X HAS BEEN OVERWRITTEN BY A*X.
-*
-   20 CONTINUE
-      IF( N.EQ.1 ) THEN
-         V( 1 ) = X( 1 )
-         EST = ABS( V( 1 ) )
-*        ... QUIT
-         GO TO 130
-      END IF
-      EST = DZSUM1( N, X, 1 )
-*
-      DO 30 I = 1, N
-         ABSXI = ABS( X( I ) )
-         IF( ABSXI.GT.SAFMIN ) THEN
-            X( I ) = DCMPLX( DBLE( X( I ) ) / ABSXI,
-     $               DIMAG( X( I ) ) / ABSXI )
-         ELSE
-            X( I ) = CONE
-         END IF
-   30 CONTINUE
-      KASE = 2
-      ISAVE( 1 ) = 2
-      RETURN
-*
-*     ................ ENTRY   (ISAVE( 1 ) = 2)
-*     FIRST ITERATION.  X HAS BEEN OVERWRITTEN BY CTRANS(A)*X.
-*
-   40 CONTINUE
-      ISAVE( 2 ) = IZMAX1( N, X, 1 )
-      ISAVE( 3 ) = 2
-*
-*     MAIN LOOP - ITERATIONS 2,3,...,ITMAX.
-*
-   50 CONTINUE
-      DO 60 I = 1, N
-         X( I ) = CZERO
-   60 CONTINUE
-      X( ISAVE( 2 ) ) = CONE
-      KASE = 1
-      ISAVE( 1 ) = 3
-      RETURN
-*
-*     ................ ENTRY   (ISAVE( 1 ) = 3)
-*     X HAS BEEN OVERWRITTEN BY A*X.
-*
-   70 CONTINUE
-      CALL ZCOPY( N, X, 1, V, 1 )
-      ESTOLD = EST
-      EST = DZSUM1( N, V, 1 )
+      IF( MIN( M, N ).EQ.0 ) THEN
+         VALUE = ZERO
+      ELSE IF( LSAME( NORM, 'M' ) ) THEN
 *
-*     TEST FOR CYCLING.
-      IF( EST.LE.ESTOLD )
-     $   GO TO 100
+*        Find max(abs(A(i,j))).
 *
-      DO 80 I = 1, N
-         ABSXI = ABS( X( I ) )
-         IF( ABSXI.GT.SAFMIN ) THEN
-            X( I ) = DCMPLX( DBLE( X( I ) ) / ABSXI,
-     $               DIMAG( X( I ) ) / ABSXI )
-         ELSE
-            X( I ) = CONE
-         END IF
-   80 CONTINUE
-      KASE = 2
-      ISAVE( 1 ) = 4
-      RETURN
+         VALUE = ZERO
+         DO 20 J = 1, N
+            DO 10 I = 1, M
+               TEMP = ABS( A( I, J ) )
+               IF( VALUE.LT.TEMP .OR. DISNAN( TEMP ) ) VALUE = TEMP
+   10       CONTINUE
+   20    CONTINUE
+      ELSE IF( ( LSAME( NORM, 'O' ) ) .OR. ( NORM.EQ.'1' ) ) THEN
 *
-*     ................ ENTRY   (ISAVE( 1 ) = 4)
-*     X HAS BEEN OVERWRITTEN BY CTRANS(A)*X.
+*        Find norm1(A).
 *
-   90 CONTINUE
-      JLAST = ISAVE( 2 )
-      ISAVE( 2 ) = IZMAX1( N, X, 1 )
-      IF( ( ABS( X( JLAST ) ).NE.ABS( X( ISAVE( 2 ) ) ) ) .AND.
-     $    ( ISAVE( 3 ).LT.ITMAX ) ) THEN
-         ISAVE( 3 ) = ISAVE( 3 ) + 1
-         GO TO 50
-      END IF
+         VALUE = ZERO
+         DO 40 J = 1, N
+            SUM = ZERO
+            DO 30 I = 1, M
+               SUM = SUM + ABS( A( I, J ) )
+   30       CONTINUE
+            IF( VALUE.LT.SUM .OR. DISNAN( SUM ) ) VALUE = SUM
+   40    CONTINUE
+      ELSE IF( LSAME( NORM, 'I' ) ) THEN
 *
-*     ITERATION COMPLETE.  FINAL STAGE.
+*        Find normI(A).
 *
-  100 CONTINUE
-      ALTSGN = ONE
-      DO 110 I = 1, N
-         X( I ) = DCMPLX( ALTSGN*( ONE+DBLE( I-1 ) / DBLE( N-1 ) ) )
-         ALTSGN = -ALTSGN
-  110 CONTINUE
-      KASE = 1
-      ISAVE( 1 ) = 5
-      RETURN
+         DO 50 I = 1, M
+            WORK( I ) = ZERO
+   50    CONTINUE
+         DO 70 J = 1, N
+            DO 60 I = 1, M
+               WORK( I ) = WORK( I ) + ABS( A( I, J ) )
+   60       CONTINUE
+   70    CONTINUE
+         VALUE = ZERO
+         DO 80 I = 1, M
+            TEMP = WORK( I )
+            IF( VALUE.LT.TEMP .OR. DISNAN( TEMP ) ) VALUE = TEMP
+   80    CONTINUE
+      ELSE IF( ( LSAME( NORM, 'F' ) ) .OR. ( LSAME( NORM, 'E' ) ) ) THEN
 *
-*     ................ ENTRY   (ISAVE( 1 ) = 5)
-*     X HAS BEEN OVERWRITTEN BY A*X.
+*        Find normF(A).
 *
-  120 CONTINUE
-      TEMP = TWO*( DZSUM1( N, X, 1 ) / DBLE( 3*N ) )
-      IF( TEMP.GT.EST ) THEN
-         CALL ZCOPY( N, X, 1, V, 1 )
-         EST = TEMP
+         SCALE = ZERO
+         SUM = ONE
+         DO 90 J = 1, N
+            CALL ZLASSQ( M, A( 1, J ), 1, SCALE, SUM )
+   90    CONTINUE
+         VALUE = SCALE*SQRT( SUM )
       END IF
 *
-  130 CONTINUE
-      KASE = 0
+      ZLANGE = VALUE
       RETURN
 *
-*     End of ZLACN2
+*     End of ZLANGE
 *
       END
-*> \brief \b ZLACPY copies all or part of one two-dimensional array to another.
+*> \brief \b ZLANHE returns the value of the 1-norm, or the Frobenius norm, or the infinity norm, or the element of largest absolute value of a complex Hermitian matrix.
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download ZLACPY + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/zlacpy.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/zlacpy.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/zlacpy.f"> 
+*> Download ZLANHE + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/zlanhe.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/zlanhe.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/zlanhe.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
-*       SUBROUTINE ZLACPY( UPLO, M, N, A, LDA, B, LDB )
-* 
+*       DOUBLE PRECISION FUNCTION ZLANHE( NORM, UPLO, N, A, LDA, WORK )
+*
 *       .. Scalar Arguments ..
-*       CHARACTER          UPLO
-*       INTEGER            LDA, LDB, M, N
+*       CHARACTER          NORM, UPLO
+*       INTEGER            LDA, N
 *       ..
 *       .. Array Arguments ..
-*       COMPLEX*16         A( LDA, * ), B( LDB, * )
+*       DOUBLE PRECISION   WORK( * )
+*       COMPLEX*16         A( LDA, * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
 *>
 *> \verbatim
 *>
-*> ZLACPY copies all or part of a two-dimensional matrix A to another
-*> matrix B.
+*> ZLANHE  returns the value of the one norm,  or the Frobenius norm, or
+*> the  infinity norm,  or the  element of  largest absolute value  of a
+*> complex hermitian matrix A.
+*> \endverbatim
+*>
+*> \return ZLANHE
+*> \verbatim
+*>
+*>    ZLANHE = ( max(abs(A(i,j))), NORM = 'M' or 'm'
+*>             (
+*>             ( norm1(A),         NORM = '1', 'O' or 'o'
+*>             (
+*>             ( normI(A),         NORM = 'I' or 'i'
+*>             (
+*>             ( normF(A),         NORM = 'F', 'f', 'E' or 'e'
+*>
+*> where  norm1  denotes the  one norm of a matrix (maximum column sum),
+*> normI  denotes the  infinity norm  of a matrix  (maximum row sum) and
+*> normF  denotes the  Frobenius norm of a matrix (square root of sum of
+*> squares).  Note that  max(abs(A(i,j)))  is not a consistent matrix norm.
 *> \endverbatim
 *
 *  Arguments:
 *  ==========
 *
-*> \param[in] UPLO
+*> \param[in] NORM
 *> \verbatim
-*>          UPLO is CHARACTER*1
-*>          Specifies the part of the matrix A to be copied to B.
-*>          = 'U':      Upper triangular part
-*>          = 'L':      Lower triangular part
-*>          Otherwise:  All of the matrix A
+*>          NORM is CHARACTER*1
+*>          Specifies the value to be returned in ZLANHE as described
+*>          above.
 *> \endverbatim
 *>
-*> \param[in] M
+*> \param[in] UPLO
 *> \verbatim
-*>          M is INTEGER
-*>          The number of rows of the matrix A.  M >= 0.
+*>          UPLO is CHARACTER*1
+*>          Specifies whether the upper or lower triangular part of the
+*>          hermitian matrix A is to be referenced.
+*>          = 'U':  Upper triangular part of A is referenced
+*>          = 'L':  Lower triangular part of A is referenced
 *> \endverbatim
 *>
 *> \param[in] N
 *> \verbatim
 *>          N is INTEGER
-*>          The number of columns of the matrix A.  N >= 0.
+*>          The order of the matrix A.  N >= 0.  When N = 0, ZLANHE is
+*>          set to zero.
 *> \endverbatim
 *>
 *> \param[in] A
 *> \verbatim
 *>          A is COMPLEX*16 array, dimension (LDA,N)
-*>          The m by n matrix A.  If UPLO = 'U', only the upper trapezium
-*>          is accessed; if UPLO = 'L', only the lower trapezium is
-*>          accessed.
+*>          The hermitian matrix A.  If UPLO = 'U', the leading n by n
+*>          upper triangular part of A contains the upper triangular part
+*>          of the matrix A, and the strictly lower triangular part of A
+*>          is not referenced.  If UPLO = 'L', the leading n by n lower
+*>          triangular part of A contains the lower triangular part of
+*>          the matrix A, and the strictly upper triangular part of A is
+*>          not referenced. Note that the imaginary parts of the diagonal
+*>          elements need not be set and are assumed to be zero.
 *> \endverbatim
 *>
 *> \param[in] LDA
 *> \verbatim
 *>          LDA is INTEGER
-*>          The leading dimension of the array A.  LDA >= max(1,M).
-*> \endverbatim
-*>
-*> \param[out] B
-*> \verbatim
-*>          B is COMPLEX*16 array, dimension (LDB,N)
-*>          On exit, B = A in the locations specified by UPLO.
+*>          The leading dimension of the array A.  LDA >= max(N,1).
 *> \endverbatim
 *>
-*> \param[in] LDB
+*> \param[out] WORK
 *> \verbatim
-*>          LDB is INTEGER
-*>          The leading dimension of the array B.  LDB >= max(1,M).
+*>          WORK is DOUBLE PRECISION array, dimension (MAX(1,LWORK)),
+*>          where LWORK >= N when NORM = 'I' or '1' or 'O'; otherwise,
+*>          WORK is not referenced.
 *> \endverbatim
 *
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date September 2012
+*> \date December 2016
 *
-*> \ingroup complex16OTHERauxiliary
+*> \ingroup complex16HEauxiliary
 *
 *  =====================================================================
-      SUBROUTINE ZLACPY( UPLO, M, N, A, LDA, B, LDB )
+      DOUBLE PRECISION FUNCTION ZLANHE( NORM, UPLO, N, A, LDA, WORK )
 *
-*  -- LAPACK auxiliary routine (version 3.4.2) --
+*  -- LAPACK auxiliary routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     September 2012
+*     December 2016
 *
 *     .. Scalar Arguments ..
-      CHARACTER          UPLO
-      INTEGER            LDA, LDB, M, N
+      CHARACTER          NORM, UPLO
+      INTEGER            LDA, N
 *     ..
 *     .. Array Arguments ..
-      COMPLEX*16         A( LDA, * ), B( LDB, * )
+      DOUBLE PRECISION   WORK( * )
+      COMPLEX*16         A( LDA, * )
 *     ..
 *
-*  =====================================================================
+* =====================================================================
 *
+*     .. Parameters ..
+      DOUBLE PRECISION   ONE, ZERO
+      PARAMETER          ( ONE = 1.0D+0, ZERO = 0.0D+0 )
+*     ..
 *     .. Local Scalars ..
       INTEGER            I, J
+      DOUBLE PRECISION   ABSA, SCALE, SUM, VALUE
 *     ..
 *     .. External Functions ..
-      LOGICAL            LSAME
-      EXTERNAL           LSAME
+      LOGICAL            LSAME, DISNAN
+      EXTERNAL           LSAME, DISNAN
+*     ..
+*     .. External Subroutines ..
+      EXTERNAL           ZLASSQ
 *     ..
 *     .. Intrinsic Functions ..
-      INTRINSIC          MIN
+      INTRINSIC          ABS, DBLE, SQRT
 *     ..
 *     .. Executable Statements ..
 *
-      IF( LSAME( UPLO, 'U' ) ) THEN
-         DO 20 J = 1, N
-            DO 10 I = 1, MIN( J, M )
-               B( I, J ) = A( I, J )
-   10       CONTINUE
-   20    CONTINUE
+      IF( N.EQ.0 ) THEN
+         VALUE = ZERO
+      ELSE IF( LSAME( NORM, 'M' ) ) THEN
 *
-      ELSE IF( LSAME( UPLO, 'L' ) ) THEN
-         DO 40 J = 1, N
-            DO 30 I = J, M
-               B( I, J ) = A( I, J )
-   30       CONTINUE
-   40    CONTINUE
+*        Find max(abs(A(i,j))).
 *
-      ELSE
-         DO 60 J = 1, N
-            DO 50 I = 1, M
-               B( I, J ) = A( I, J )
-   50       CONTINUE
-   60    CONTINUE
+         VALUE = ZERO
+         IF( LSAME( UPLO, 'U' ) ) THEN
+            DO 20 J = 1, N
+               DO 10 I = 1, J - 1
+                  SUM = ABS( A( I, J ) )
+                  IF( VALUE .LT. SUM .OR. DISNAN( SUM ) ) VALUE = SUM
+   10          CONTINUE
+               SUM = ABS( DBLE( A( J, J ) ) )
+               IF( VALUE .LT. SUM .OR. DISNAN( SUM ) ) VALUE = SUM
+   20       CONTINUE
+         ELSE
+            DO 40 J = 1, N
+               SUM = ABS( DBLE( A( J, J ) ) )
+               IF( VALUE .LT. SUM .OR. DISNAN( SUM ) ) VALUE = SUM
+               DO 30 I = J + 1, N
+                  SUM = ABS( A( I, J ) )
+                  IF( VALUE .LT. SUM .OR. DISNAN( SUM ) ) VALUE = SUM
+   30          CONTINUE
+   40       CONTINUE
+         END IF
+      ELSE IF( ( LSAME( NORM, 'I' ) ) .OR. ( LSAME( NORM, 'O' ) ) .OR.
+     $         ( NORM.EQ.'1' ) ) THEN
+*
+*        Find normI(A) ( = norm1(A), since A is hermitian).
+*
+         VALUE = ZERO
+         IF( LSAME( UPLO, 'U' ) ) THEN
+            DO 60 J = 1, N
+               SUM = ZERO
+               DO 50 I = 1, J - 1
+                  ABSA = ABS( A( I, J ) )
+                  SUM = SUM + ABSA
+                  WORK( I ) = WORK( I ) + ABSA
+   50          CONTINUE
+               WORK( J ) = SUM + ABS( DBLE( A( J, J ) ) )
+   60       CONTINUE
+            DO 70 I = 1, N
+               SUM = WORK( I )
+               IF( VALUE .LT. SUM .OR. DISNAN( SUM ) ) VALUE = SUM
+   70       CONTINUE
+         ELSE
+            DO 80 I = 1, N
+               WORK( I ) = ZERO
+   80       CONTINUE
+            DO 100 J = 1, N
+               SUM = WORK( J ) + ABS( DBLE( A( J, J ) ) )
+               DO 90 I = J + 1, N
+                  ABSA = ABS( A( I, J ) )
+                  SUM = SUM + ABSA
+                  WORK( I ) = WORK( I ) + ABSA
+   90          CONTINUE
+               IF( VALUE .LT. SUM .OR. DISNAN( SUM ) ) VALUE = SUM
+  100       CONTINUE
+         END IF
+      ELSE IF( ( LSAME( NORM, 'F' ) ) .OR. ( LSAME( NORM, 'E' ) ) ) THEN
+*
+*        Find normF(A).
+*
+         SCALE = ZERO
+         SUM = ONE
+         IF( LSAME( UPLO, 'U' ) ) THEN
+            DO 110 J = 2, N
+               CALL ZLASSQ( J-1, A( 1, J ), 1, SCALE, SUM )
+  110       CONTINUE
+         ELSE
+            DO 120 J = 1, N - 1
+               CALL ZLASSQ( N-J, A( J+1, J ), 1, SCALE, SUM )
+  120       CONTINUE
+         END IF
+         SUM = 2*SUM
+         DO 130 I = 1, N
+            IF( DBLE( A( I, I ) ).NE.ZERO ) THEN
+               ABSA = ABS( DBLE( A( I, I ) ) )
+               IF( SCALE.LT.ABSA ) THEN
+                  SUM = ONE + SUM*( SCALE / ABSA )**2
+                  SCALE = ABSA
+               ELSE
+                  SUM = SUM + ( ABSA / SCALE )**2
+               END IF
+            END IF
+  130    CONTINUE
+         VALUE = SCALE*SQRT( SUM )
       END IF
 *
+      ZLANHE = VALUE
       RETURN
 *
-*     End of ZLACPY
+*     End of ZLANHE
 *
       END
-*> \brief \b ZLADIV performs complex division in real arithmetic, avoiding unnecessary overflow.
+*> \brief \b ZLANHS returns the value of the 1-norm, Frobenius norm, infinity-norm, or the largest absolute value of any element of an upper Hessenberg matrix.
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download ZLADIV + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/zladiv.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/zladiv.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/zladiv.f"> 
+*> Download ZLANHS + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/zlanhs.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/zlanhs.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/zlanhs.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
-*       COMPLEX*16     FUNCTION ZLADIV( X, Y )
-* 
+*       DOUBLE PRECISION FUNCTION ZLANHS( NORM, N, A, LDA, WORK )
+*
 *       .. Scalar Arguments ..
-*       COMPLEX*16         X, Y
+*       CHARACTER          NORM
+*       INTEGER            LDA, N
+*       ..
+*       .. Array Arguments ..
+*       DOUBLE PRECISION   WORK( * )
+*       COMPLEX*16         A( LDA, * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
 *>
 *> \verbatim
 *>
-*> ZLADIV := X / Y, where X and Y are complex.  The computation of X / Y
-*> will not overflow on an intermediary step unless the results
-*> overflows.
+*> ZLANHS  returns the value of the one norm,  or the Frobenius norm, or
+*> the  infinity norm,  or the  element of  largest absolute value  of a
+*> Hessenberg matrix A.
+*> \endverbatim
+*>
+*> \return ZLANHS
+*> \verbatim
+*>
+*>    ZLANHS = ( max(abs(A(i,j))), NORM = 'M' or 'm'
+*>             (
+*>             ( norm1(A),         NORM = '1', 'O' or 'o'
+*>             (
+*>             ( normI(A),         NORM = 'I' or 'i'
+*>             (
+*>             ( normF(A),         NORM = 'F', 'f', 'E' or 'e'
+*>
+*> where  norm1  denotes the  one norm of a matrix (maximum column sum),
+*> normI  denotes the  infinity norm  of a matrix  (maximum row sum) and
+*> normF  denotes the  Frobenius norm of a matrix (square root of sum of
+*> squares).  Note that  max(abs(A(i,j)))  is not a consistent matrix norm.
 *> \endverbatim
 *
 *  Arguments:
 *  ==========
 *
-*> \param[in] X
+*> \param[in] NORM
 *> \verbatim
-*>          X is COMPLEX*16
+*>          NORM is CHARACTER*1
+*>          Specifies the value to be returned in ZLANHS as described
+*>          above.
 *> \endverbatim
 *>
-*> \param[in] Y
+*> \param[in] N
 *> \verbatim
-*>          Y is COMPLEX*16
-*>          The complex scalars X and Y.
+*>          N is INTEGER
+*>          The order of the matrix A.  N >= 0.  When N = 0, ZLANHS is
+*>          set to zero.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*>          A is COMPLEX*16 array, dimension (LDA,N)
+*>          The n by n upper Hessenberg matrix A; the part of A below the
+*>          first sub-diagonal is not referenced.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*>          LDA is INTEGER
+*>          The leading dimension of the array A.  LDA >= max(N,1).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*>          WORK is DOUBLE PRECISION array, dimension (MAX(1,LWORK)),
+*>          where LWORK >= N when NORM = 'I'; otherwise, WORK is not
+*>          referenced.
 *> \endverbatim
 *
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date September 2012
+*> \date December 2016
 *
 *> \ingroup complex16OTHERauxiliary
 *
 *  =====================================================================
-      COMPLEX*16     FUNCTION ZLADIV( X, Y )
+      DOUBLE PRECISION FUNCTION ZLANHS( NORM, N, A, LDA, WORK )
 *
-*  -- LAPACK auxiliary routine (version 3.4.2) --
+*  -- LAPACK auxiliary routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     September 2012
+*     December 2016
 *
 *     .. Scalar Arguments ..
-      COMPLEX*16         X, Y
+      CHARACTER          NORM
+      INTEGER            LDA, N
+*     ..
+*     .. Array Arguments ..
+      DOUBLE PRECISION   WORK( * )
+      COMPLEX*16         A( LDA, * )
 *     ..
 *
-*  =====================================================================
+* =====================================================================
 *
+*     .. Parameters ..
+      DOUBLE PRECISION   ONE, ZERO
+      PARAMETER          ( ONE = 1.0D+0, ZERO = 0.0D+0 )
+*     ..
 *     .. Local Scalars ..
-      DOUBLE PRECISION   ZI, ZR
+      INTEGER            I, J
+      DOUBLE PRECISION   SCALE, SUM, VALUE
+*     ..
+*     .. External Functions ..
+      LOGICAL            LSAME, DISNAN
+      EXTERNAL           LSAME, DISNAN
 *     ..
 *     .. External Subroutines ..
-      EXTERNAL           DLADIV
+      EXTERNAL           ZLASSQ
 *     ..
 *     .. Intrinsic Functions ..
-      INTRINSIC          DBLE, DCMPLX, DIMAG
+      INTRINSIC          ABS, MIN, SQRT
 *     ..
 *     .. Executable Statements ..
 *
-      CALL DLADIV( DBLE( X ), DIMAG( X ), DBLE( Y ), DIMAG( Y ), ZR,
-     $             ZI )
-      ZLADIV = DCMPLX( ZR, ZI )
+      IF( N.EQ.0 ) THEN
+         VALUE = ZERO
+      ELSE IF( LSAME( NORM, 'M' ) ) THEN
+*
+*        Find max(abs(A(i,j))).
+*
+         VALUE = ZERO
+         DO 20 J = 1, N
+            DO 10 I = 1, MIN( N, J+1 )
+               SUM = ABS( A( I, J ) )
+               IF( VALUE .LT. SUM .OR. DISNAN( SUM ) ) VALUE = SUM
+   10       CONTINUE
+   20    CONTINUE
+      ELSE IF( ( LSAME( NORM, 'O' ) ) .OR. ( NORM.EQ.'1' ) ) THEN
+*
+*        Find norm1(A).
+*
+         VALUE = ZERO
+         DO 40 J = 1, N
+            SUM = ZERO
+            DO 30 I = 1, MIN( N, J+1 )
+               SUM = SUM + ABS( A( I, J ) )
+   30       CONTINUE
+            IF( VALUE .LT. SUM .OR. DISNAN( SUM ) ) VALUE = SUM
+   40    CONTINUE
+      ELSE IF( LSAME( NORM, 'I' ) ) THEN
+*
+*        Find normI(A).
+*
+         DO 50 I = 1, N
+            WORK( I ) = ZERO
+   50    CONTINUE
+         DO 70 J = 1, N
+            DO 60 I = 1, MIN( N, J+1 )
+               WORK( I ) = WORK( I ) + ABS( A( I, J ) )
+   60       CONTINUE
+   70    CONTINUE
+         VALUE = ZERO
+         DO 80 I = 1, N
+            SUM = WORK( I )
+            IF( VALUE .LT. SUM .OR. DISNAN( SUM ) ) VALUE = SUM
+   80    CONTINUE
+      ELSE IF( ( LSAME( NORM, 'F' ) ) .OR. ( LSAME( NORM, 'E' ) ) ) THEN
+*
+*        Find normF(A).
+*
+         SCALE = ZERO
+         SUM = ONE
+         DO 90 J = 1, N
+            CALL ZLASSQ( MIN( N, J+1 ), A( 1, J ), 1, SCALE, SUM )
+   90    CONTINUE
+         VALUE = SCALE*SQRT( SUM )
+      END IF
 *
+      ZLANHS = VALUE
       RETURN
 *
-*     End of ZLADIV
+*     End of ZLANHS
 *
       END
-*> \brief \b ZLAHQR computes the eigenvalues and Schur factorization of an upper Hessenberg matrix, using the double-shift/single-shift QR algorithm.
+*> \brief \b ZLANTR returns the value of the 1-norm, or the Frobenius norm, or the infinity norm, or the element of largest absolute value of a trapezoidal or triangular matrix.
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download ZLAHQR + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/zlahqr.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/zlahqr.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/zlahqr.f"> 
+*> Download ZLANTR + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/zlantr.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/zlantr.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/zlantr.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
-*       SUBROUTINE ZLAHQR( WANTT, WANTZ, N, ILO, IHI, H, LDH, W, ILOZ,
-*                          IHIZ, Z, LDZ, INFO )
-* 
+*       DOUBLE PRECISION FUNCTION ZLANTR( NORM, UPLO, DIAG, M, N, A, LDA,
+*                        WORK )
+*
 *       .. Scalar Arguments ..
-*       INTEGER            IHI, IHIZ, ILO, ILOZ, INFO, LDH, LDZ, N
-*       LOGICAL            WANTT, WANTZ
+*       CHARACTER          DIAG, NORM, UPLO
+*       INTEGER            LDA, M, N
 *       ..
 *       .. Array Arguments ..
-*       COMPLEX*16         H( LDH, * ), W( * ), Z( LDZ, * )
+*       DOUBLE PRECISION   WORK( * )
+*       COMPLEX*16         A( LDA, * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
 *>
 *> \verbatim
 *>
-*>    ZLAHQR is an auxiliary routine called by CHSEQR to update the
-*>    eigenvalues and Schur decomposition already computed by CHSEQR, by
-*>    dealing with the Hessenberg submatrix in rows and columns ILO to
-*>    IHI.
-*> \endverbatim
-*
-*  Arguments:
-*  ==========
-*
-*> \param[in] WANTT
-*> \verbatim
-*>          WANTT is LOGICAL
-*>          = .TRUE. : the full Schur form T is required;
-*>          = .FALSE.: only eigenvalues are required.
-*> \endverbatim
-*>
-*> \param[in] WANTZ
-*> \verbatim
-*>          WANTZ is LOGICAL
-*>          = .TRUE. : the matrix of Schur vectors Z is required;
-*>          = .FALSE.: Schur vectors are not required.
-*> \endverbatim
-*>
-*> \param[in] N
-*> \verbatim
-*>          N is INTEGER
-*>          The order of the matrix H.  N >= 0.
+*> ZLANTR  returns the value of the one norm,  or the Frobenius norm, or
+*> the  infinity norm,  or the  element of  largest absolute value  of a
+*> trapezoidal or triangular matrix A.
 *> \endverbatim
 *>
-*> \param[in] ILO
+*> \return ZLANTR
 *> \verbatim
-*>          ILO is INTEGER
-*> \endverbatim
 *>
-*> \param[in] IHI
-*> \verbatim
-*>          IHI is INTEGER
-*>          It is assumed that H is already upper triangular in rows and
-*>          columns IHI+1:N, and that H(ILO,ILO-1) = 0 (unless ILO = 1).
-*>          ZLAHQR works primarily with the Hessenberg submatrix in rows
-*>          and columns ILO to IHI, but applies transformations to all of
-*>          H if WANTT is .TRUE..
-*>          1 <= ILO <= max(1,IHI); IHI <= N.
-*> \endverbatim
+*>    ZLANTR = ( max(abs(A(i,j))), NORM = 'M' or 'm'
+*>             (
+*>             ( norm1(A),         NORM = '1', 'O' or 'o'
+*>             (
+*>             ( normI(A),         NORM = 'I' or 'i'
+*>             (
+*>             ( normF(A),         NORM = 'F', 'f', 'E' or 'e'
 *>
-*> \param[in,out] H
-*> \verbatim
-*>          H is COMPLEX*16 array, dimension (LDH,N)
-*>          On entry, the upper Hessenberg matrix H.
-*>          On exit, if INFO is zero and if WANTT is .TRUE., then H
-*>          is upper triangular in rows and columns ILO:IHI.  If INFO
-*>          is zero and if WANTT is .FALSE., then the contents of H
-*>          are unspecified on exit.  The output state of H in case
-*>          INF is positive is below under the description of INFO.
+*> where  norm1  denotes the  one norm of a matrix (maximum column sum),
+*> normI  denotes the  infinity norm  of a matrix  (maximum row sum) and
+*> normF  denotes the  Frobenius norm of a matrix (square root of sum of
+*> squares).  Note that  max(abs(A(i,j)))  is not a consistent matrix norm.
 *> \endverbatim
-*>
-*> \param[in] LDH
+*
+*  Arguments:
+*  ==========
+*
+*> \param[in] NORM
 *> \verbatim
-*>          LDH is INTEGER
-*>          The leading dimension of the array H. LDH >= max(1,N).
+*>          NORM is CHARACTER*1
+*>          Specifies the value to be returned in ZLANTR as described
+*>          above.
 *> \endverbatim
 *>
-*> \param[out] W
+*> \param[in] UPLO
 *> \verbatim
-*>          W is COMPLEX*16 array, dimension (N)
-*>          The computed eigenvalues ILO to IHI are stored in the
-*>          corresponding elements of W. If WANTT is .TRUE., the
-*>          eigenvalues are stored in the same order as on the diagonal
-*>          of the Schur form returned in H, with W(i) = H(i,i).
+*>          UPLO is CHARACTER*1
+*>          Specifies whether the matrix A is upper or lower trapezoidal.
+*>          = 'U':  Upper trapezoidal
+*>          = 'L':  Lower trapezoidal
+*>          Note that A is triangular instead of trapezoidal if M = N.
 *> \endverbatim
 *>
-*> \param[in] ILOZ
+*> \param[in] DIAG
 *> \verbatim
-*>          ILOZ is INTEGER
+*>          DIAG is CHARACTER*1
+*>          Specifies whether or not the matrix A has unit diagonal.
+*>          = 'N':  Non-unit diagonal
+*>          = 'U':  Unit diagonal
 *> \endverbatim
 *>
-*> \param[in] IHIZ
+*> \param[in] M
 *> \verbatim
-*>          IHIZ is INTEGER
-*>          Specify the rows of Z to which transformations must be
-*>          applied if WANTZ is .TRUE..
-*>          1 <= ILOZ <= ILO; IHI <= IHIZ <= N.
+*>          M is INTEGER
+*>          The number of rows of the matrix A.  M >= 0, and if
+*>          UPLO = 'U', M <= N.  When M = 0, ZLANTR is set to zero.
 *> \endverbatim
 *>
-*> \param[in,out] Z
+*> \param[in] N
 *> \verbatim
-*>          Z is COMPLEX*16 array, dimension (LDZ,N)
-*>          If WANTZ is .TRUE., on entry Z must contain the current
-*>          matrix Z of transformations accumulated by CHSEQR, and on
-*>          exit Z has been updated; transformations are applied only to
-*>          the submatrix Z(ILOZ:IHIZ,ILO:IHI).
-*>          If WANTZ is .FALSE., Z is not referenced.
+*>          N is INTEGER
+*>          The number of columns of the matrix A.  N >= 0, and if
+*>          UPLO = 'L', N <= M.  When N = 0, ZLANTR is set to zero.
 *> \endverbatim
 *>
-*> \param[in] LDZ
+*> \param[in] A
 *> \verbatim
-*>          LDZ is INTEGER
-*>          The leading dimension of the array Z. LDZ >= max(1,N).
+*>          A is COMPLEX*16 array, dimension (LDA,N)
+*>          The trapezoidal matrix A (A is triangular if M = N).
+*>          If UPLO = 'U', the leading m by n upper trapezoidal part of
+*>          the array A contains the upper trapezoidal matrix, and the
+*>          strictly lower triangular part of A is not referenced.
+*>          If UPLO = 'L', the leading m by n lower trapezoidal part of
+*>          the array A contains the lower trapezoidal matrix, and the
+*>          strictly upper triangular part of A is not referenced.  Note
+*>          that when DIAG = 'U', the diagonal elements of A are not
+*>          referenced and are assumed to be one.
 *> \endverbatim
 *>
-*> \param[out] INFO
+*> \param[in] LDA
 *> \verbatim
-*>          INFO is INTEGER
-*>           =   0: successful exit
-*>          .GT. 0: if INFO = i, ZLAHQR failed to compute all the
-*>                  eigenvalues ILO to IHI in a total of 30 iterations
-*>                  per eigenvalue; elements i+1:ihi of W contain
-*>                  those eigenvalues which have been successfully
-*>                  computed.
-*>
-*>                  If INFO .GT. 0 and WANTT is .FALSE., then on exit,
-*>                  the remaining unconverged eigenvalues are the
-*>                  eigenvalues of the upper Hessenberg matrix
-*>                  rows and columns ILO thorugh INFO of the final,
-*>                  output value of H.
-*>
-*>                  If INFO .GT. 0 and WANTT is .TRUE., then on exit
-*>          (*)       (initial value of H)*U  = U*(final value of H)
-*>                  where U is an orthognal matrix.    The final
-*>                  value of H is upper Hessenberg and triangular in
-*>                  rows and columns INFO+1 through IHI.
+*>          LDA is INTEGER
+*>          The leading dimension of the array A.  LDA >= max(M,1).
+*> \endverbatim
 *>
-*>                  If INFO .GT. 0 and WANTZ is .TRUE., then on exit
-*>                      (final value of Z)  = (initial value of Z)*U
-*>                  where U is the orthogonal matrix in (*)
-*>                  (regardless of the value of WANTT.)
+*> \param[out] WORK
+*> \verbatim
+*>          WORK is DOUBLE PRECISION array, dimension (MAX(1,LWORK)),
+*>          where LWORK >= M when NORM = 'I'; otherwise, WORK is not
+*>          referenced.
 *> \endverbatim
 *
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date September 2012
+*> \date December 2016
 *
 *> \ingroup complex16OTHERauxiliary
 *
-*> \par Contributors:
-*  ==================
-*>
-*> \verbatim
-*>
-*>     02-96 Based on modifications by
-*>     David Day, Sandia National Laboratory, USA
-*>
-*>     12-04 Further modifications by
-*>     Ralph Byers, University of Kansas, USA
-*>     This is a modified version of ZLAHQR from LAPACK version 3.0.
-*>     It is (1) more robust against overflow and underflow and
-*>     (2) adopts the more conservative Ahues & Tisseur stopping
-*>     criterion (LAWN 122, 1997).
-*> \endverbatim
-*>
 *  =====================================================================
-      SUBROUTINE ZLAHQR( WANTT, WANTZ, N, ILO, IHI, H, LDH, W, ILOZ,
-     $                   IHIZ, Z, LDZ, INFO )
+      DOUBLE PRECISION FUNCTION ZLANTR( NORM, UPLO, DIAG, M, N, A, LDA,
+     $                 WORK )
 *
-*  -- LAPACK auxiliary routine (version 3.4.2) --
+*  -- LAPACK auxiliary routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     September 2012
+*     December 2016
 *
 *     .. Scalar Arguments ..
-      INTEGER            IHI, IHIZ, ILO, ILOZ, INFO, LDH, LDZ, N
-      LOGICAL            WANTT, WANTZ
+      CHARACTER          DIAG, NORM, UPLO
+      INTEGER            LDA, M, N
 *     ..
 *     .. Array Arguments ..
-      COMPLEX*16         H( LDH, * ), W( * ), Z( LDZ, * )
+      DOUBLE PRECISION   WORK( * )
+      COMPLEX*16         A( LDA, * )
 *     ..
 *
-*  =========================================================
+* =====================================================================
 *
 *     .. Parameters ..
-      INTEGER            ITMAX
-      PARAMETER          ( ITMAX = 30 )
-      COMPLEX*16         ZERO, ONE
-      PARAMETER          ( ZERO = ( 0.0d0, 0.0d0 ),
-     $                   ONE = ( 1.0d0, 0.0d0 ) )
-      DOUBLE PRECISION   RZERO, RONE, HALF
-      PARAMETER          ( RZERO = 0.0d0, RONE = 1.0d0, HALF = 0.5d0 )
-      DOUBLE PRECISION   DAT1
-      PARAMETER          ( DAT1 = 3.0d0 / 4.0d0 )
+      DOUBLE PRECISION   ONE, ZERO
+      PARAMETER          ( ONE = 1.0D+0, ZERO = 0.0D+0 )
 *     ..
 *     .. Local Scalars ..
-      COMPLEX*16         CDUM, H11, H11S, H22, SC, SUM, T, T1, TEMP, U,
-     $                   V2, X, Y
-      DOUBLE PRECISION   AA, AB, BA, BB, H10, H21, RTEMP, S, SAFMAX,
-     $                   SAFMIN, SMLNUM, SX, T2, TST, ULP
-      INTEGER            I, I1, I2, ITS, J, JHI, JLO, K, L, M, NH, NZ
-*     ..
-*     .. Local Arrays ..
-      COMPLEX*16         V( 2 )
+      LOGICAL            UDIAG
+      INTEGER            I, J
+      DOUBLE PRECISION   SCALE, SUM, VALUE
 *     ..
 *     .. External Functions ..
-      COMPLEX*16         ZLADIV
-      DOUBLE PRECISION   DLAMCH
-      EXTERNAL           ZLADIV, DLAMCH
+      LOGICAL            LSAME, DISNAN
+      EXTERNAL           LSAME, DISNAN
 *     ..
 *     .. External Subroutines ..
-      EXTERNAL           DLABAD, ZCOPY, ZLARFG, ZSCAL
-*     ..
-*     .. Statement Functions ..
-      DOUBLE PRECISION   CABS1
+      EXTERNAL           ZLASSQ
 *     ..
 *     .. Intrinsic Functions ..
-      INTRINSIC          ABS, DBLE, DCONJG, DIMAG, MAX, MIN, SQRT
-*     ..
-*     .. Statement Function definitions ..
-      CABS1( CDUM ) = ABS( DBLE( CDUM ) ) + ABS( DIMAG( CDUM ) )
+      INTRINSIC          ABS, MIN, SQRT
 *     ..
 *     .. Executable Statements ..
 *
-      INFO = 0
-*
-*     Quick return if possible
-*
-      IF( N.EQ.0 )
-     $   RETURN
-      IF( ILO.EQ.IHI ) THEN
-         W( ILO ) = H( ILO, ILO )
-         RETURN
-      END IF
-*
-*     ==== clear out the trash ====
-      DO 10 J = ILO, IHI - 3
-         H( J+2, J ) = ZERO
-         H( J+3, J ) = ZERO
-   10 CONTINUE
-      IF( ILO.LE.IHI-2 )
-     $   H( IHI, IHI-2 ) = ZERO
-*     ==== ensure that subdiagonal entries are real ====
-      IF( WANTT ) THEN
-         JLO = 1
-         JHI = N
-      ELSE
-         JLO = ILO
-         JHI = IHI
-      END IF
-      DO 20 I = ILO + 1, IHI
-         IF( DIMAG( H( I, I-1 ) ).NE.RZERO ) THEN
-*           ==== The following redundant normalization
-*           .    avoids problems with both gradual and
-*           .    sudden underflow in ABS(H(I,I-1)) ====
-            SC = H( I, I-1 ) / CABS1( H( I, I-1 ) )
-            SC = DCONJG( SC ) / ABS( SC )
-            H( I, I-1 ) = ABS( H( I, I-1 ) )
-            CALL ZSCAL( JHI-I+1, SC, H( I, I ), LDH )
-            CALL ZSCAL( MIN( JHI, I+1 )-JLO+1, DCONJG( SC ),
-     $                  H( JLO, I ), 1 )
-            IF( WANTZ )
-     $         CALL ZSCAL( IHIZ-ILOZ+1, DCONJG( SC ), Z( ILOZ, I ), 1 )
-         END IF
-   20 CONTINUE
-*
-      NH = IHI - ILO + 1
-      NZ = IHIZ - ILOZ + 1
-*
-*     Set machine-dependent constants for the stopping criterion.
-*
-      SAFMIN = DLAMCH( 'SAFE MINIMUM' )
-      SAFMAX = RONE / SAFMIN
-      CALL DLABAD( SAFMIN, SAFMAX )
-      ULP = DLAMCH( 'PRECISION' )
-      SMLNUM = SAFMIN*( DBLE( NH ) / ULP )
-*
-*     I1 and I2 are the indices of the first row and last column of H
-*     to which transformations must be applied. If eigenvalues only are
-*     being computed, I1 and I2 are set inside the main loop.
-*
-      IF( WANTT ) THEN
-         I1 = 1
-         I2 = N
-      END IF
-*
-*     The main loop begins here. I is the loop index and decreases from
-*     IHI to ILO in steps of 1. Each iteration of the loop works
-*     with the active submatrix in rows and columns L to I.
-*     Eigenvalues I+1 to IHI have already converged. Either L = ILO, or
-*     H(L,L-1) is negligible so that the matrix splits.
-*
-      I = IHI
-   30 CONTINUE
-      IF( I.LT.ILO )
-     $   GO TO 150
-*
-*     Perform QR iterations on rows and columns ILO to I until a
-*     submatrix of order 1 splits off at the bottom because a
-*     subdiagonal element has become negligible.
-*
-      L = ILO
-      DO 130 ITS = 0, ITMAX
+      IF( MIN( M, N ).EQ.0 ) THEN
+         VALUE = ZERO
+      ELSE IF( LSAME( NORM, 'M' ) ) THEN
 *
-*        Look for a single small subdiagonal element.
+*        Find max(abs(A(i,j))).
 *
-         DO 40 K = I, L + 1, -1
-            IF( CABS1( H( K, K-1 ) ).LE.SMLNUM )
-     $         GO TO 50
-            TST = CABS1( H( K-1, K-1 ) ) + CABS1( H( K, K ) )
-            IF( TST.EQ.ZERO ) THEN
-               IF( K-2.GE.ILO )
-     $            TST = TST + ABS( DBLE( H( K-1, K-2 ) ) )
-               IF( K+1.LE.IHI )
-     $            TST = TST + ABS( DBLE( H( K+1, K ) ) )
+         IF( LSAME( DIAG, 'U' ) ) THEN
+            VALUE = ONE
+            IF( LSAME( UPLO, 'U' ) ) THEN
+               DO 20 J = 1, N
+                  DO 10 I = 1, MIN( M, J-1 )
+                     SUM = ABS( A( I, J ) )
+                     IF( VALUE .LT. SUM .OR. DISNAN( SUM ) ) VALUE = SUM
+   10             CONTINUE
+   20          CONTINUE
+            ELSE
+               DO 40 J = 1, N
+                  DO 30 I = J + 1, M
+                     SUM = ABS( A( I, J ) )
+                     IF( VALUE .LT. SUM .OR. DISNAN( SUM ) ) VALUE = SUM
+   30             CONTINUE
+   40          CONTINUE
             END IF
-*           ==== The following is a conservative small subdiagonal
-*           .    deflation criterion due to Ahues & Tisseur (LAWN 122,
-*           .    1997). It has better mathematical foundation and
-*           .    improves accuracy in some examples.  ====
-            IF( ABS( DBLE( H( K, K-1 ) ) ).LE.ULP*TST ) THEN
-               AB = MAX( CABS1( H( K, K-1 ) ), CABS1( H( K-1, K ) ) )
-               BA = MIN( CABS1( H( K, K-1 ) ), CABS1( H( K-1, K ) ) )
-               AA = MAX( CABS1( H( K, K ) ),
-     $              CABS1( H( K-1, K-1 )-H( K, K ) ) )
-               BB = MIN( CABS1( H( K, K ) ),
-     $              CABS1( H( K-1, K-1 )-H( K, K ) ) )
-               S = AA + AB
-               IF( BA*( AB / S ).LE.MAX( SMLNUM,
-     $             ULP*( BB*( AA / S ) ) ) )GO TO 50
+         ELSE
+            VALUE = ZERO
+            IF( LSAME( UPLO, 'U' ) ) THEN
+               DO 60 J = 1, N
+                  DO 50 I = 1, MIN( M, J )
+                     SUM = ABS( A( I, J ) )
+                     IF( VALUE .LT. SUM .OR. DISNAN( SUM ) ) VALUE = SUM
+   50             CONTINUE
+   60          CONTINUE
+            ELSE
+               DO 80 J = 1, N
+                  DO 70 I = J, M
+                     SUM = ABS( A( I, J ) )
+                     IF( VALUE .LT. SUM .OR. DISNAN( SUM ) ) VALUE = SUM
+   70             CONTINUE
+   80          CONTINUE
             END IF
-   40    CONTINUE
-   50    CONTINUE
-         L = K
-         IF( L.GT.ILO ) THEN
-*
-*           H(L,L-1) is negligible
-*
-            H( L, L-1 ) = ZERO
-         END IF
-*
-*        Exit from loop if a submatrix of order 1 has split off.
-*
-         IF( L.GE.I )
-     $      GO TO 140
-*
-*        Now the active submatrix is in rows and columns L to I. If
-*        eigenvalues only are being computed, only the active submatrix
-*        need be transformed.
-*
-         IF( .NOT.WANTT ) THEN
-            I1 = L
-            I2 = I
          END IF
+      ELSE IF( ( LSAME( NORM, 'O' ) ) .OR. ( NORM.EQ.'1' ) ) THEN
 *
-         IF( ITS.EQ.10 ) THEN
-*
-*           Exceptional shift.
-*
-            S = DAT1*ABS( DBLE( H( L+1, L ) ) )
-            T = S + H( L, L )
-         ELSE IF( ITS.EQ.20 ) THEN
-*
-*           Exceptional shift.
+*        Find norm1(A).
 *
-            S = DAT1*ABS( DBLE( H( I, I-1 ) ) )
-            T = S + H( I, I )
+         VALUE = ZERO
+         UDIAG = LSAME( DIAG, 'U' )
+         IF( LSAME( UPLO, 'U' ) ) THEN
+            DO 110 J = 1, N
+               IF( ( UDIAG ) .AND. ( J.LE.M ) ) THEN
+                  SUM = ONE
+                  DO 90 I = 1, J - 1
+                     SUM = SUM + ABS( A( I, J ) )
+   90             CONTINUE
+               ELSE
+                  SUM = ZERO
+                  DO 100 I = 1, MIN( M, J )
+                     SUM = SUM + ABS( A( I, J ) )
+  100             CONTINUE
+               END IF
+               IF( VALUE .LT. SUM .OR. DISNAN( SUM ) ) VALUE = SUM
+  110       CONTINUE
          ELSE
-*
-*           Wilkinson's shift.
-*
-            T = H( I, I )
-            U = SQRT( H( I-1, I ) )*SQRT( H( I, I-1 ) )
-            S = CABS1( U )
-            IF( S.NE.RZERO ) THEN
-               X = HALF*( H( I-1, I-1 )-T )
-               SX = CABS1( X )
-               S = MAX( S, CABS1( X ) )
-               Y = S*SQRT( ( X / S )**2+( U / S )**2 )
-               IF( SX.GT.RZERO ) THEN
-                  IF( DBLE( X / SX )*DBLE( Y )+DIMAG( X / SX )*
-     $                DIMAG( Y ).LT.RZERO )Y = -Y
+            DO 140 J = 1, N
+               IF( UDIAG ) THEN
+                  SUM = ONE
+                  DO 120 I = J + 1, M
+                     SUM = SUM + ABS( A( I, J ) )
+  120             CONTINUE
+               ELSE
+                  SUM = ZERO
+                  DO 130 I = J, M
+                     SUM = SUM + ABS( A( I, J ) )
+  130             CONTINUE
                END IF
-               T = T - U*ZLADIV( U, ( X+Y ) )
-            END IF
+               IF( VALUE .LT. SUM .OR. DISNAN( SUM ) ) VALUE = SUM
+  140       CONTINUE
          END IF
+      ELSE IF( LSAME( NORM, 'I' ) ) THEN
 *
-*        Look for two consecutive small subdiagonal elements.
-*
-         DO 60 M = I - 1, L + 1, -1
-*
-*           Determine the effect of starting the single-shift QR
-*           iteration at row M, and see if this would make H(M,M-1)
-*           negligible.
-*
-            H11 = H( M, M )
-            H22 = H( M+1, M+1 )
-            H11S = H11 - T
-            H21 = DBLE( H( M+1, M ) )
-            S = CABS1( H11S ) + ABS( H21 )
-            H11S = H11S / S
-            H21 = H21 / S
-            V( 1 ) = H11S
-            V( 2 ) = H21
-            H10 = DBLE( H( M, M-1 ) )
-            IF( ABS( H10 )*ABS( H21 ).LE.ULP*
-     $          ( CABS1( H11S )*( CABS1( H11 )+CABS1( H22 ) ) ) )
-     $          GO TO 70
-   60    CONTINUE
-         H11 = H( L, L )
-         H22 = H( L+1, L+1 )
-         H11S = H11 - T
-         H21 = DBLE( H( L+1, L ) )
-         S = CABS1( H11S ) + ABS( H21 )
-         H11S = H11S / S
-         H21 = H21 / S
-         V( 1 ) = H11S
-         V( 2 ) = H21
-   70    CONTINUE
-*
-*        Single-shift QR step
-*
-         DO 120 K = M, I - 1
-*
-*           The first iteration of this loop determines a reflection G
-*           from the vector V and applies it from left and right to H,
-*           thus creating a nonzero bulge below the subdiagonal.
-*
-*           Each subsequent iteration determines a reflection G to
-*           restore the Hessenberg form in the (K-1)th column, and thus
-*           chases the bulge one step toward the bottom of the active
-*           submatrix.
-*
-*           V(2) is always real before the call to ZLARFG, and hence
-*           after the call T2 ( = T1*V(2) ) is also real.
+*        Find normI(A).
 *
-            IF( K.GT.M )
-     $         CALL ZCOPY( 2, H( K, K-1 ), 1, V, 1 )
-            CALL ZLARFG( 2, V( 1 ), V( 2 ), 1, T1 )
-            IF( K.GT.M ) THEN
-               H( K, K-1 ) = V( 1 )
-               H( K+1, K-1 ) = ZERO
+         IF( LSAME( UPLO, 'U' ) ) THEN
+            IF( LSAME( DIAG, 'U' ) ) THEN
+               DO 150 I = 1, M
+                  WORK( I ) = ONE
+  150          CONTINUE
+               DO 170 J = 1, N
+                  DO 160 I = 1, MIN( M, J-1 )
+                     WORK( I ) = WORK( I ) + ABS( A( I, J ) )
+  160             CONTINUE
+  170          CONTINUE
+            ELSE
+               DO 180 I = 1, M
+                  WORK( I ) = ZERO
+  180          CONTINUE
+               DO 200 J = 1, N
+                  DO 190 I = 1, MIN( M, J )
+                     WORK( I ) = WORK( I ) + ABS( A( I, J ) )
+  190             CONTINUE
+  200          CONTINUE
             END IF
-            V2 = V( 2 )
-            T2 = DBLE( T1*V2 )
-*
-*           Apply G from the left to transform the rows of the matrix
-*           in columns K to I2.
-*
-            DO 80 J = K, I2
-               SUM = DCONJG( T1 )*H( K, J ) + T2*H( K+1, J )
-               H( K, J ) = H( K, J ) - SUM
-               H( K+1, J ) = H( K+1, J ) - SUM*V2
-   80       CONTINUE
-*
-*           Apply G from the right to transform the columns of the
-*           matrix in rows I1 to min(K+2,I).
-*
-            DO 90 J = I1, MIN( K+2, I )
-               SUM = T1*H( J, K ) + T2*H( J, K+1 )
-               H( J, K ) = H( J, K ) - SUM
-               H( J, K+1 ) = H( J, K+1 ) - SUM*DCONJG( V2 )
-   90       CONTINUE
-*
-            IF( WANTZ ) THEN
-*
-*              Accumulate transformations in the matrix Z
-*
-               DO 100 J = ILOZ, IHIZ
-                  SUM = T1*Z( J, K ) + T2*Z( J, K+1 )
-                  Z( J, K ) = Z( J, K ) - SUM
-                  Z( J, K+1 ) = Z( J, K+1 ) - SUM*DCONJG( V2 )
-  100          CONTINUE
+         ELSE
+            IF( LSAME( DIAG, 'U' ) ) THEN
+               DO 210 I = 1, N
+                  WORK( I ) = ONE
+  210          CONTINUE
+               DO 220 I = N + 1, M
+                  WORK( I ) = ZERO
+  220          CONTINUE
+               DO 240 J = 1, N
+                  DO 230 I = J + 1, M
+                     WORK( I ) = WORK( I ) + ABS( A( I, J ) )
+  230             CONTINUE
+  240          CONTINUE
+            ELSE
+               DO 250 I = 1, M
+                  WORK( I ) = ZERO
+  250          CONTINUE
+               DO 270 J = 1, N
+                  DO 260 I = J, M
+                     WORK( I ) = WORK( I ) + ABS( A( I, J ) )
+  260             CONTINUE
+  270          CONTINUE
             END IF
+         END IF
+         VALUE = ZERO
+         DO 280 I = 1, M
+            SUM = WORK( I )
+            IF( VALUE .LT. SUM .OR. DISNAN( SUM ) ) VALUE = SUM
+  280    CONTINUE
+      ELSE IF( ( LSAME( NORM, 'F' ) ) .OR. ( LSAME( NORM, 'E' ) ) ) THEN
 *
-            IF( K.EQ.M .AND. M.GT.L ) THEN
-*
-*              If the QR step was started at row M > L because two
-*              consecutive small subdiagonals were found, then extra
-*              scaling must be performed to ensure that H(M,M-1) remains
-*              real.
+*        Find normF(A).
 *
-               TEMP = ONE - T1
-               TEMP = TEMP / ABS( TEMP )
-               H( M+1, M ) = H( M+1, M )*DCONJG( TEMP )
-               IF( M+2.LE.I )
-     $            H( M+2, M+1 ) = H( M+2, M+1 )*TEMP
-               DO 110 J = M, I
-                  IF( J.NE.M+1 ) THEN
-                     IF( I2.GT.J )
-     $                  CALL ZSCAL( I2-J, TEMP, H( J, J+1 ), LDH )
-                     CALL ZSCAL( J-I1, DCONJG( TEMP ), H( I1, J ), 1 )
-                     IF( WANTZ ) THEN
-                        CALL ZSCAL( NZ, DCONJG( TEMP ), Z( ILOZ, J ),
-     $                              1 )
-                     END IF
-                  END IF
-  110          CONTINUE
+         IF( LSAME( UPLO, 'U' ) ) THEN
+            IF( LSAME( DIAG, 'U' ) ) THEN
+               SCALE = ONE
+               SUM = MIN( M, N )
+               DO 290 J = 2, N
+                  CALL ZLASSQ( MIN( M, J-1 ), A( 1, J ), 1, SCALE, SUM )
+  290          CONTINUE
+            ELSE
+               SCALE = ZERO
+               SUM = ONE
+               DO 300 J = 1, N
+                  CALL ZLASSQ( MIN( M, J ), A( 1, J ), 1, SCALE, SUM )
+  300          CONTINUE
             END IF
-  120    CONTINUE
-*
-*        Ensure that H(I,I-1) is real.
-*
-         TEMP = H( I, I-1 )
-         IF( DIMAG( TEMP ).NE.RZERO ) THEN
-            RTEMP = ABS( TEMP )
-            H( I, I-1 ) = RTEMP
-            TEMP = TEMP / RTEMP
-            IF( I2.GT.I )
-     $         CALL ZSCAL( I2-I, DCONJG( TEMP ), H( I, I+1 ), LDH )
-            CALL ZSCAL( I-I1, TEMP, H( I1, I ), 1 )
-            IF( WANTZ ) THEN
-               CALL ZSCAL( NZ, TEMP, Z( ILOZ, I ), 1 )
+         ELSE
+            IF( LSAME( DIAG, 'U' ) ) THEN
+               SCALE = ONE
+               SUM = MIN( M, N )
+               DO 310 J = 1, N
+                  CALL ZLASSQ( M-J, A( MIN( M, J+1 ), J ), 1, SCALE,
+     $                         SUM )
+  310          CONTINUE
+            ELSE
+               SCALE = ZERO
+               SUM = ONE
+               DO 320 J = 1, N
+                  CALL ZLASSQ( M-J+1, A( J, J ), 1, SCALE, SUM )
+  320          CONTINUE
             END IF
          END IF
+         VALUE = SCALE*SQRT( SUM )
+      END IF
 *
-  130 CONTINUE
-*
-*     Failure to converge in remaining number of iterations
-*
-      INFO = I
-      RETURN
-*
-  140 CONTINUE
-*
-*     H(I,I-1) is negligible: one eigenvalue has converged.
-*
-      W( I ) = H( I, I )
-*
-*     return to start of the main loop with new value of I.
-*
-      I = L - 1
-      GO TO 30
-*
-  150 CONTINUE
+      ZLANTR = VALUE
       RETURN
 *
-*     End of ZLAHQR
+*     End of ZLANTR
 *
       END
-*> \brief \b ZLAHR2 reduces the specified number of first columns of a general rectangular matrix A so that elements below the specified subdiagonal are zero, and returns auxiliary matrices which are needed to apply the transformation to the unreduced part of A.
+*> \brief \b ZLAQGE scales a general rectangular matrix, using row and column scaling factors computed by sgeequ.
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download ZLAHR2 + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/zlahr2.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/zlahr2.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/zlahr2.f"> 
+*> Download ZLAQGE + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/zlaqge.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/zlaqge.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/zlaqge.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
-*       SUBROUTINE ZLAHR2( N, K, NB, A, LDA, TAU, T, LDT, Y, LDY )
-* 
+*       SUBROUTINE ZLAQGE( M, N, A, LDA, R, C, ROWCND, COLCND, AMAX,
+*                          EQUED )
+*
 *       .. Scalar Arguments ..
-*       INTEGER            K, LDA, LDT, LDY, N, NB
+*       CHARACTER          EQUED
+*       INTEGER            LDA, M, N
+*       DOUBLE PRECISION   AMAX, COLCND, ROWCND
 *       ..
 *       .. Array Arguments ..
-*       COMPLEX*16        A( LDA, * ), T( LDT, NB ), TAU( NB ),
-*      $                   Y( LDY, NB )
+*       DOUBLE PRECISION   C( * ), R( * )
+*       COMPLEX*16         A( LDA, * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
 *>
 *> \verbatim
 *>
-*> ZLAHR2 reduces the first NB columns of A complex general n-BY-(n-k+1)
-*> matrix A so that elements below the k-th subdiagonal are zero. The
-*> reduction is performed by an unitary similarity transformation
-*> Q**H * A * Q. The routine returns the matrices V and T which determine
-*> Q as a block reflector I - V*T*V**H, and also the matrix Y = A * V * T.
-*>
-*> This is an auxiliary routine called by ZGEHRD.
+*> ZLAQGE equilibrates a general M by N matrix A using the row and
+*> column scaling factors in the vectors R and C.
 *> \endverbatim
 *
 *  Arguments:
 *  ==========
 *
+*> \param[in] M
+*> \verbatim
+*>          M is INTEGER
+*>          The number of rows of the matrix A.  M >= 0.
+*> \endverbatim
+*>
 *> \param[in] N
 *> \verbatim
 *>          N is INTEGER
-*>          The order of the matrix A.
+*>          The number of columns of the matrix A.  N >= 0.
 *> \endverbatim
 *>
-*> \param[in] K
+*> \param[in,out] A
 *> \verbatim
-*>          K is INTEGER
-*>          The offset for the reduction. Elements below the k-th
-*>          subdiagonal in the first NB columns are reduced to zero.
-*>          K < N.
+*>          A is COMPLEX*16 array, dimension (LDA,N)
+*>          On entry, the M by N matrix A.
+*>          On exit, the equilibrated matrix.  See EQUED for the form of
+*>          the equilibrated matrix.
 *> \endverbatim
 *>
-*> \param[in] NB
+*> \param[in] LDA
 *> \verbatim
-*>          NB is INTEGER
-*>          The number of columns to be reduced.
+*>          LDA is INTEGER
+*>          The leading dimension of the array A.  LDA >= max(M,1).
 *> \endverbatim
 *>
-*> \param[in,out] A
+*> \param[in] R
 *> \verbatim
-*>          A is COMPLEX*16 array, dimension (LDA,N-K+1)
-*>          On entry, the n-by-(n-k+1) general matrix A.
-*>          On exit, the elements on and above the k-th subdiagonal in
-*>          the first NB columns are overwritten with the corresponding
-*>          elements of the reduced matrix; the elements below the k-th
-*>          subdiagonal, with the array TAU, represent the matrix Q as a
-*>          product of elementary reflectors. The other columns of A are
-*>          unchanged. See Further Details.
+*>          R is DOUBLE PRECISION array, dimension (M)
+*>          The row scale factors for A.
 *> \endverbatim
 *>
-*> \param[in] LDA
+*> \param[in] C
 *> \verbatim
-*>          LDA is INTEGER
-*>          The leading dimension of the array A.  LDA >= max(1,N).
+*>          C is DOUBLE PRECISION array, dimension (N)
+*>          The column scale factors for A.
 *> \endverbatim
 *>
-*> \param[out] TAU
+*> \param[in] ROWCND
 *> \verbatim
-*>          TAU is COMPLEX*16 array, dimension (NB)
-*>          The scalar factors of the elementary reflectors. See Further
-*>          Details.
+*>          ROWCND is DOUBLE PRECISION
+*>          Ratio of the smallest R(i) to the largest R(i).
 *> \endverbatim
 *>
-*> \param[out] T
+*> \param[in] COLCND
 *> \verbatim
-*>          T is COMPLEX*16 array, dimension (LDT,NB)
-*>          The upper triangular matrix T.
+*>          COLCND is DOUBLE PRECISION
+*>          Ratio of the smallest C(i) to the largest C(i).
 *> \endverbatim
 *>
-*> \param[in] LDT
+*> \param[in] AMAX
 *> \verbatim
-*>          LDT is INTEGER
-*>          The leading dimension of the array T.  LDT >= NB.
+*>          AMAX is DOUBLE PRECISION
+*>          Absolute value of largest matrix entry.
 *> \endverbatim
 *>
-*> \param[out] Y
+*> \param[out] EQUED
 *> \verbatim
-*>          Y is COMPLEX*16 array, dimension (LDY,NB)
-*>          The n-by-nb matrix Y.
+*>          EQUED is CHARACTER*1
+*>          Specifies the form of equilibration that was done.
+*>          = 'N':  No equilibration
+*>          = 'R':  Row equilibration, i.e., A has been premultiplied by
+*>                  diag(R).
+*>          = 'C':  Column equilibration, i.e., A has been postmultiplied
+*>                  by diag(C).
+*>          = 'B':  Both row and column equilibration, i.e., A has been
+*>                  replaced by diag(R) * A * diag(C).
 *> \endverbatim
+*
+*> \par Internal Parameters:
+*  =========================
 *>
-*> \param[in] LDY
 *> \verbatim
-*>          LDY is INTEGER
-*>          The leading dimension of the array Y. LDY >= N.
+*>  THRESH is a threshold value used to decide if row or column scaling
+*>  should be done based on the ratio of the row or column scaling
+*>  factors.  If ROWCND < THRESH, row scaling is done, and if
+*>  COLCND < THRESH, column scaling is done.
+*>
+*>  LARGE and SMALL are threshold values used to decide if row scaling
+*>  should be done based on the absolute size of the largest matrix
+*>  element.  If AMAX > LARGE or AMAX < SMALL, row scaling is done.
 *> \endverbatim
 *
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
-*
-*> \date September 2012
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \ingroup complex16OTHERauxiliary
+*> \date December 2016
 *
-*> \par Further Details:
-*  =====================
-*>
-*> \verbatim
-*>
-*>  The matrix Q is represented as a product of nb elementary reflectors
-*>
-*>     Q = H(1) H(2) . . . H(nb).
-*>
-*>  Each H(i) has the form
-*>
-*>     H(i) = I - tau * v * v**H
-*>
-*>  where tau is a complex scalar, and v is a complex vector with
-*>  v(1:i+k-1) = 0, v(i+k) = 1; v(i+k+1:n) is stored on exit in
-*>  A(i+k+1:n,i), and tau in TAU(i).
-*>
-*>  The elements of the vectors v together form the (n-k+1)-by-nb matrix
-*>  V which is needed, with T and Y, to apply the transformation to the
-*>  unreduced part of the matrix, using an update of the form:
-*>  A := (I - V*T*V**H) * (A - Y*V**H).
-*>
-*>  The contents of A on exit are illustrated by the following example
-*>  with n = 7, k = 3 and nb = 2:
-*>
-*>     ( a   a   a   a   a )
-*>     ( a   a   a   a   a )
-*>     ( a   a   a   a   a )
-*>     ( h   h   a   a   a )
-*>     ( v1  h   a   a   a )
-*>     ( v1  v2  a   a   a )
-*>     ( v1  v2  a   a   a )
-*>
-*>  where a denotes an element of the original matrix A, h denotes a
-*>  modified element of the upper Hessenberg matrix H, and vi denotes an
-*>  element of the vector defining H(i).
-*>
-*>  This subroutine is a slight modification of LAPACK-3.0's DLAHRD
-*>  incorporating improvements proposed by Quintana-Orti and Van de
-*>  Gejin. Note that the entries of A(1:K,2:NB) differ from those
-*>  returned by the original LAPACK-3.0's DLAHRD routine. (This
-*>  subroutine is not backward compatible with LAPACK-3.0's DLAHRD.)
-*> \endverbatim
+*> \ingroup complex16GEauxiliary
 *
-*> \par References:
-*  ================
-*>
-*>  Gregorio Quintana-Orti and Robert van de Geijn, "Improving the
-*>  performance of reduction to Hessenberg form," ACM Transactions on
-*>  Mathematical Software, 32(2):180-194, June 2006.
-*>
 *  =====================================================================
-      SUBROUTINE ZLAHR2( N, K, NB, A, LDA, TAU, T, LDT, Y, LDY )
+      SUBROUTINE ZLAQGE( M, N, A, LDA, R, C, ROWCND, COLCND, AMAX,
+     $                   EQUED )
 *
-*  -- LAPACK auxiliary routine (version 3.4.2) --
+*  -- LAPACK auxiliary routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     September 2012
+*     December 2016
 *
 *     .. Scalar Arguments ..
-      INTEGER            K, LDA, LDT, LDY, N, NB
+      CHARACTER          EQUED
+      INTEGER            LDA, M, N
+      DOUBLE PRECISION   AMAX, COLCND, ROWCND
 *     ..
 *     .. Array Arguments ..
-      COMPLEX*16        A( LDA, * ), T( LDT, NB ), TAU( NB ),
-     $                   Y( LDY, NB )
+      DOUBLE PRECISION   C( * ), R( * )
+      COMPLEX*16         A( LDA, * )
 *     ..
 *
 *  =====================================================================
 *
 *     .. Parameters ..
-      COMPLEX*16        ZERO, ONE
-      PARAMETER          ( ZERO = ( 0.0D+0, 0.0D+0 ), 
-     $                     ONE = ( 1.0D+0, 0.0D+0 ) )
+      DOUBLE PRECISION   ONE, THRESH
+      PARAMETER          ( ONE = 1.0D+0, THRESH = 0.1D+0 )
 *     ..
 *     .. Local Scalars ..
-      INTEGER            I
-      COMPLEX*16        EI
-*     ..
-*     .. External Subroutines ..
-      EXTERNAL           ZAXPY, ZCOPY, ZGEMM, ZGEMV, ZLACPY,
-     $                   ZLARFG, ZSCAL, ZTRMM, ZTRMV, ZLACGV
+      INTEGER            I, J
+      DOUBLE PRECISION   CJ, LARGE, SMALL
 *     ..
-*     .. Intrinsic Functions ..
-      INTRINSIC          MIN
+*     .. External Functions ..
+      DOUBLE PRECISION   DLAMCH
+      EXTERNAL           DLAMCH
 *     ..
 *     .. Executable Statements ..
 *
 *     Quick return if possible
 *
-      IF( N.LE.1 )
-     $   RETURN
-*
-      DO 10 I = 1, NB
-         IF( I.GT.1 ) THEN
-*
-*           Update A(K+1:N,I)
-*
-*           Update I-th column of A - Y * V**H
-*
-            CALL ZLACGV( I-1, A( K+I-1, 1 ), LDA ) 
-            CALL ZGEMV( 'NO TRANSPOSE', N-K, I-1, -ONE, Y(K+1,1), LDY,
-     $                  A( K+I-1, 1 ), LDA, ONE, A( K+1, I ), 1 )
-            CALL ZLACGV( I-1, A( K+I-1, 1 ), LDA ) 
-*
-*           Apply I - V * T**H * V**H to this column (call it b) from the
-*           left, using the last column of T as workspace
-*
-*           Let  V = ( V1 )   and   b = ( b1 )   (first I-1 rows)
-*                    ( V2 )             ( b2 )
-*
-*           where V1 is unit lower triangular
-*
-*           w := V1**H * b1
-*
-            CALL ZCOPY( I-1, A( K+1, I ), 1, T( 1, NB ), 1 )
-            CALL ZTRMV( 'Lower', 'Conjugate transpose', 'UNIT', 
-     $                  I-1, A( K+1, 1 ),
-     $                  LDA, T( 1, NB ), 1 )
+      IF( M.LE.0 .OR. N.LE.0 ) THEN
+         EQUED = 'N'
+         RETURN
+      END IF
 *
-*           w := w + V2**H * b2
+*     Initialize LARGE and SMALL.
 *
-            CALL ZGEMV( 'Conjugate transpose', N-K-I+1, I-1, 
-     $                  ONE, A( K+I, 1 ),
-     $                  LDA, A( K+I, I ), 1, ONE, T( 1, NB ), 1 )
+      SMALL = DLAMCH( 'Safe minimum' ) / DLAMCH( 'Precision' )
+      LARGE = ONE / SMALL
 *
-*           w := T**H * w
+      IF( ROWCND.GE.THRESH .AND. AMAX.GE.SMALL .AND. AMAX.LE.LARGE )
+     $     THEN
 *
-            CALL ZTRMV( 'Upper', 'Conjugate transpose', 'NON-UNIT', 
-     $                  I-1, T, LDT,
-     $                  T( 1, NB ), 1 )
+*        No row scaling
 *
-*           b2 := b2 - V2*w
+         IF( COLCND.GE.THRESH ) THEN
 *
-            CALL ZGEMV( 'NO TRANSPOSE', N-K-I+1, I-1, -ONE, 
-     $                  A( K+I, 1 ),
-     $                  LDA, T( 1, NB ), 1, ONE, A( K+I, I ), 1 )
+*           No column scaling
 *
-*           b1 := b1 - V1*w
+            EQUED = 'N'
+         ELSE
 *
-            CALL ZTRMV( 'Lower', 'NO TRANSPOSE', 
-     $                  'UNIT', I-1,
-     $                  A( K+1, 1 ), LDA, T( 1, NB ), 1 )
-            CALL ZAXPY( I-1, -ONE, T( 1, NB ), 1, A( K+1, I ), 1 )
+*           Column scaling
 *
-            A( K+I-1, I-1 ) = EI
+            DO 20 J = 1, N
+               CJ = C( J )
+               DO 10 I = 1, M
+                  A( I, J ) = CJ*A( I, J )
+   10          CONTINUE
+   20       CONTINUE
+            EQUED = 'C'
          END IF
+      ELSE IF( COLCND.GE.THRESH ) THEN
 *
-*        Generate the elementary reflector H(I) to annihilate
-*        A(K+I+1:N,I)
-*
-         CALL ZLARFG( N-K-I+1, A( K+I, I ), A( MIN( K+I+1, N ), I ), 1,
-     $                TAU( I ) )
-         EI = A( K+I, I )
-         A( K+I, I ) = ONE
-*
-*        Compute  Y(K+1:N,I)
-*
-         CALL ZGEMV( 'NO TRANSPOSE', N-K, N-K-I+1, 
-     $               ONE, A( K+1, I+1 ),
-     $               LDA, A( K+I, I ), 1, ZERO, Y( K+1, I ), 1 )
-         CALL ZGEMV( 'Conjugate transpose', N-K-I+1, I-1, 
-     $               ONE, A( K+I, 1 ), LDA,
-     $               A( K+I, I ), 1, ZERO, T( 1, I ), 1 )
-         CALL ZGEMV( 'NO TRANSPOSE', N-K, I-1, -ONE, 
-     $               Y( K+1, 1 ), LDY,
-     $               T( 1, I ), 1, ONE, Y( K+1, I ), 1 )
-         CALL ZSCAL( N-K, TAU( I ), Y( K+1, I ), 1 )
-*
-*        Compute T(1:I,I)
-*
-         CALL ZSCAL( I-1, -TAU( I ), T( 1, I ), 1 )
-         CALL ZTRMV( 'Upper', 'No Transpose', 'NON-UNIT', 
-     $               I-1, T, LDT,
-     $               T( 1, I ), 1 )
-         T( I, I ) = TAU( I )
+*        Row scaling, no column scaling
 *
-   10 CONTINUE
-      A( K+NB, NB ) = EI
+         DO 40 J = 1, N
+            DO 30 I = 1, M
+               A( I, J ) = R( I )*A( I, J )
+   30       CONTINUE
+   40    CONTINUE
+         EQUED = 'R'
+      ELSE
 *
-*     Compute Y(1:K,1:NB)
+*        Row and column scaling
 *
-      CALL ZLACPY( 'ALL', K, NB, A( 1, 2 ), LDA, Y, LDY )
-      CALL ZTRMM( 'RIGHT', 'Lower', 'NO TRANSPOSE', 
-     $            'UNIT', K, NB,
-     $            ONE, A( K+1, 1 ), LDA, Y, LDY )
-      IF( N.GT.K+NB )
-     $   CALL ZGEMM( 'NO TRANSPOSE', 'NO TRANSPOSE', K, 
-     $               NB, N-K-NB, ONE,
-     $               A( 1, 2+NB ), LDA, A( K+1+NB, 1 ), LDA, ONE, Y,
-     $               LDY )
-      CALL ZTRMM( 'RIGHT', 'Upper', 'NO TRANSPOSE', 
-     $            'NON-UNIT', K, NB,
-     $            ONE, T, LDT, Y, LDY )
+         DO 60 J = 1, N
+            CJ = C( J )
+            DO 50 I = 1, M
+               A( I, J ) = CJ*R( I )*A( I, J )
+   50       CONTINUE
+   60    CONTINUE
+         EQUED = 'B'
+      END IF
 *
       RETURN
 *
-*     End of ZLAHR2
+*     End of ZLAQGE
 *
       END
-*> \brief \b ZLAHRD reduces the first nb columns of a general rectangular matrix A so that elements below the k-th subdiagonal are zero, and returns auxiliary matrices which are needed to apply the transformation to the unreduced part of A.
+*> \brief \b ZLAQP2 computes a QR factorization with column pivoting of the matrix block.
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download ZLAHRD + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/zlahrd.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/zlahrd.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/zlahrd.f"> 
+*> Download ZLAQP2 + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/zlaqp2.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/zlaqp2.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/zlaqp2.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
-*       SUBROUTINE ZLAHRD( N, K, NB, A, LDA, TAU, T, LDT, Y, LDY )
-* 
+*       SUBROUTINE ZLAQP2( M, N, OFFSET, A, LDA, JPVT, TAU, VN1, VN2,
+*                          WORK )
+*
 *       .. Scalar Arguments ..
-*       INTEGER            K, LDA, LDT, LDY, N, NB
+*       INTEGER            LDA, M, N, OFFSET
 *       ..
 *       .. Array Arguments ..
-*       COMPLEX*16         A( LDA, * ), T( LDT, NB ), TAU( NB ),
-*      $                   Y( LDY, NB )
+*       INTEGER            JPVT( * )
+*       DOUBLE PRECISION   VN1( * ), VN2( * )
+*       COMPLEX*16         A( LDA, * ), TAU( * ), WORK( * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
 *>
 *> \verbatim
 *>
-*> ZLAHRD reduces the first NB columns of a complex general n-by-(n-k+1)
-*> matrix A so that elements below the k-th subdiagonal are zero. The
-*> reduction is performed by a unitary similarity transformation
-*> Q**H * A * Q. The routine returns the matrices V and T which determine
-*> Q as a block reflector I - V*T*V**H, and also the matrix Y = A * V * T.
-*>
-*> This is an OBSOLETE auxiliary routine. 
-*> This routine will be 'deprecated' in a  future release.
-*> Please use the new routine ZLAHR2 instead.
+*> ZLAQP2 computes a QR factorization with column pivoting of
+*> the block A(OFFSET+1:M,1:N).
+*> The block A(1:OFFSET,1:N) is accordingly pivoted, but not factorized.
 *> \endverbatim
 *
 *  Arguments:
 *  ==========
 *
-*> \param[in] N
+*> \param[in] M
 *> \verbatim
-*>          N is INTEGER
-*>          The order of the matrix A.
+*>          M is INTEGER
+*>          The number of rows of the matrix A. M >= 0.
 *> \endverbatim
 *>
-*> \param[in] K
+*> \param[in] N
 *> \verbatim
-*>          K is INTEGER
-*>          The offset for the reduction. Elements below the k-th
-*>          subdiagonal in the first NB columns are reduced to zero.
+*>          N is INTEGER
+*>          The number of columns of the matrix A. N >= 0.
 *> \endverbatim
 *>
-*> \param[in] NB
+*> \param[in] OFFSET
 *> \verbatim
-*>          NB is INTEGER
-*>          The number of columns to be reduced.
+*>          OFFSET is INTEGER
+*>          The number of rows of the matrix A that must be pivoted
+*>          but no factorized. OFFSET >= 0.
 *> \endverbatim
 *>
 *> \param[in,out] A
 *> \verbatim
-*>          A is COMPLEX*16 array, dimension (LDA,N-K+1)
-*>          On entry, the n-by-(n-k+1) general matrix A.
-*>          On exit, the elements on and above the k-th subdiagonal in
-*>          the first NB columns are overwritten with the corresponding
-*>          elements of the reduced matrix; the elements below the k-th
-*>          subdiagonal, with the array TAU, represent the matrix Q as a
-*>          product of elementary reflectors. The other columns of A are
-*>          unchanged. See Further Details.
+*>          A is COMPLEX*16 array, dimension (LDA,N)
+*>          On entry, the M-by-N matrix A.
+*>          On exit, the upper triangle of block A(OFFSET+1:M,1:N) is
+*>          the triangular factor obtained; the elements in block
+*>          A(OFFSET+1:M,1:N) below the diagonal, together with the
+*>          array TAU, represent the orthogonal matrix Q as a product of
+*>          elementary reflectors. Block A(1:OFFSET,1:N) has been
+*>          accordingly pivoted, but no factorized.
 *> \endverbatim
 *>
 *> \param[in] LDA
 *> \verbatim
 *>          LDA is INTEGER
-*>          The leading dimension of the array A.  LDA >= max(1,N).
+*>          The leading dimension of the array A. LDA >= max(1,M).
 *> \endverbatim
 *>
-*> \param[out] TAU
+*> \param[in,out] JPVT
 *> \verbatim
-*>          TAU is COMPLEX*16 array, dimension (NB)
-*>          The scalar factors of the elementary reflectors. See Further
-*>          Details.
+*>          JPVT is INTEGER array, dimension (N)
+*>          On entry, if JPVT(i) .ne. 0, the i-th column of A is permuted
+*>          to the front of A*P (a leading column); if JPVT(i) = 0,
+*>          the i-th column of A is a free column.
+*>          On exit, if JPVT(i) = k, then the i-th column of A*P
+*>          was the k-th column of A.
 *> \endverbatim
 *>
-*> \param[out] T
+*> \param[out] TAU
 *> \verbatim
-*>          T is COMPLEX*16 array, dimension (LDT,NB)
-*>          The upper triangular matrix T.
+*>          TAU is COMPLEX*16 array, dimension (min(M,N))
+*>          The scalar factors of the elementary reflectors.
 *> \endverbatim
 *>
-*> \param[in] LDT
+*> \param[in,out] VN1
 *> \verbatim
-*>          LDT is INTEGER
-*>          The leading dimension of the array T.  LDT >= NB.
+*>          VN1 is DOUBLE PRECISION array, dimension (N)
+*>          The vector with the partial column norms.
 *> \endverbatim
 *>
-*> \param[out] Y
+*> \param[in,out] VN2
 *> \verbatim
-*>          Y is COMPLEX*16 array, dimension (LDY,NB)
-*>          The n-by-nb matrix Y.
+*>          VN2 is DOUBLE PRECISION array, dimension (N)
+*>          The vector with the exact column norms.
 *> \endverbatim
 *>
-*> \param[in] LDY
+*> \param[out] WORK
 *> \verbatim
-*>          LDY is INTEGER
-*>          The leading dimension of the array Y. LDY >= max(1,N).
+*>          WORK is COMPLEX*16 array, dimension (N)
 *> \endverbatim
 *
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date September 2012
+*> \date December 2016
 *
 *> \ingroup complex16OTHERauxiliary
 *
-*> \par Further Details:
-*  =====================
-*>
-*> \verbatim
-*>
-*>  The matrix Q is represented as a product of nb elementary reflectors
-*>
-*>     Q = H(1) H(2) . . . H(nb).
-*>
-*>  Each H(i) has the form
-*>
-*>     H(i) = I - tau * v * v**H
-*>
-*>  where tau is a complex scalar, and v is a complex vector with
-*>  v(1:i+k-1) = 0, v(i+k) = 1; v(i+k+1:n) is stored on exit in
-*>  A(i+k+1:n,i), and tau in TAU(i).
-*>
-*>  The elements of the vectors v together form the (n-k+1)-by-nb matrix
-*>  V which is needed, with T and Y, to apply the transformation to the
-*>  unreduced part of the matrix, using an update of the form:
-*>  A := (I - V*T*V**H) * (A - Y*V**H).
-*>
-*>  The contents of A on exit are illustrated by the following example
-*>  with n = 7, k = 3 and nb = 2:
-*>
-*>     ( a   h   a   a   a )
-*>     ( a   h   a   a   a )
-*>     ( a   h   a   a   a )
-*>     ( h   h   a   a   a )
-*>     ( v1  h   a   a   a )
-*>     ( v1  v2  a   a   a )
-*>     ( v1  v2  a   a   a )
+*> \par Contributors:
+*  ==================
 *>
-*>  where a denotes an element of the original matrix A, h denotes a
-*>  modified element of the upper Hessenberg matrix H, and vi denotes an
-*>  element of the vector defining H(i).
-*> \endverbatim
+*>    G. Quintana-Orti, Depto. de Informatica, Universidad Jaime I, Spain
+*>    X. Sun, Computer Science Dept., Duke University, USA
+*> \n
+*>  Partial column norm updating strategy modified on April 2011
+*>    Z. Drmac and Z. Bujanovic, Dept. of Mathematics,
+*>    University of Zagreb, Croatia.
+*
+*> \par References:
+*  ================
 *>
+*> LAPACK Working Note 176
+*
+*> \htmlonly
+*> <a href="http://www.netlib.org/lapack/lawnspdf/lawn176.pdf">[PDF]</a>
+*> \endhtmlonly
+*
 *  =====================================================================
-      SUBROUTINE ZLAHRD( N, K, NB, A, LDA, TAU, T, LDT, Y, LDY )
+      SUBROUTINE ZLAQP2( M, N, OFFSET, A, LDA, JPVT, TAU, VN1, VN2,
+     $                   WORK )
 *
-*  -- LAPACK auxiliary routine (version 3.4.2) --
+*  -- LAPACK auxiliary routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     September 2012
+*     December 2016
 *
 *     .. Scalar Arguments ..
-      INTEGER            K, LDA, LDT, LDY, N, NB
+      INTEGER            LDA, M, N, OFFSET
 *     ..
 *     .. Array Arguments ..
-      COMPLEX*16         A( LDA, * ), T( LDT, NB ), TAU( NB ),
-     $                   Y( LDY, NB )
+      INTEGER            JPVT( * )
+      DOUBLE PRECISION   VN1( * ), VN2( * )
+      COMPLEX*16         A( LDA, * ), TAU( * ), WORK( * )
 *     ..
 *
 *  =====================================================================
 *
 *     .. Parameters ..
-      COMPLEX*16         ZERO, ONE
-      PARAMETER          ( ZERO = ( 0.0D+0, 0.0D+0 ),
-     $                   ONE = ( 1.0D+0, 0.0D+0 ) )
+      DOUBLE PRECISION   ZERO, ONE
+      COMPLEX*16         CONE
+      PARAMETER          ( ZERO = 0.0D+0, ONE = 1.0D+0,
+     $                   CONE = ( 1.0D+0, 0.0D+0 ) )
 *     ..
 *     .. Local Scalars ..
-      INTEGER            I
-      COMPLEX*16         EI
+      INTEGER            I, ITEMP, J, MN, OFFPI, PVT
+      DOUBLE PRECISION   TEMP, TEMP2, TOL3Z
+      COMPLEX*16         AII
 *     ..
 *     .. External Subroutines ..
-      EXTERNAL           ZAXPY, ZCOPY, ZGEMV, ZLACGV, ZLARFG, ZSCAL,
-     $                   ZTRMV
+      EXTERNAL           ZLARF, ZLARFG, ZSWAP
 *     ..
 *     .. Intrinsic Functions ..
-      INTRINSIC          MIN
+      INTRINSIC          ABS, DCONJG, MAX, MIN, SQRT
+*     ..
+*     .. External Functions ..
+      INTEGER            IDAMAX
+      DOUBLE PRECISION   DLAMCH, DZNRM2
+      EXTERNAL           IDAMAX, DLAMCH, DZNRM2
 *     ..
 *     .. Executable Statements ..
 *
-*     Quick return if possible
-*
-      IF( N.LE.1 )
-     $   RETURN
-*
-      DO 10 I = 1, NB
-         IF( I.GT.1 ) THEN
-*
-*           Update A(1:n,i)
-*
-*           Compute i-th column of A - Y * V**H
-*
-            CALL ZLACGV( I-1, A( K+I-1, 1 ), LDA )
-            CALL ZGEMV( 'No transpose', N, I-1, -ONE, Y, LDY,
-     $                  A( K+I-1, 1 ), LDA, ONE, A( 1, I ), 1 )
-            CALL ZLACGV( I-1, A( K+I-1, 1 ), LDA )
-*
-*           Apply I - V * T**H * V**H to this column (call it b) from the
-*           left, using the last column of T as workspace
-*
-*           Let  V = ( V1 )   and   b = ( b1 )   (first I-1 rows)
-*                    ( V2 )             ( b2 )
-*
-*           where V1 is unit lower triangular
+      MN = MIN( M-OFFSET, N )
+      TOL3Z = SQRT(DLAMCH('Epsilon'))
 *
-*           w := V1**H * b1
+*     Compute factorization.
 *
-            CALL ZCOPY( I-1, A( K+1, I ), 1, T( 1, NB ), 1 )
-            CALL ZTRMV( 'Lower', 'Conjugate transpose', 'Unit', I-1,
-     $                  A( K+1, 1 ), LDA, T( 1, NB ), 1 )
+      DO 20 I = 1, MN
 *
-*           w := w + V2**H *b2
+         OFFPI = OFFSET + I
 *
-            CALL ZGEMV( 'Conjugate transpose', N-K-I+1, I-1, ONE,
-     $                  A( K+I, 1 ), LDA, A( K+I, I ), 1, ONE,
-     $                  T( 1, NB ), 1 )
+*        Determine ith pivot column and swap if necessary.
 *
-*           w := T**H *w
+         PVT = ( I-1 ) + IDAMAX( N-I+1, VN1( I ), 1 )
 *
-            CALL ZTRMV( 'Upper', 'Conjugate transpose', 'Non-unit', I-1,
-     $                  T, LDT, T( 1, NB ), 1 )
+         IF( PVT.NE.I ) THEN
+            CALL ZSWAP( M, A( 1, PVT ), 1, A( 1, I ), 1 )
+            ITEMP = JPVT( PVT )
+            JPVT( PVT ) = JPVT( I )
+            JPVT( I ) = ITEMP
+            VN1( PVT ) = VN1( I )
+            VN2( PVT ) = VN2( I )
+         END IF
 *
-*           b2 := b2 - V2*w
+*        Generate elementary reflector H(i).
 *
-            CALL ZGEMV( 'No transpose', N-K-I+1, I-1, -ONE, A( K+I, 1 ),
-     $                  LDA, T( 1, NB ), 1, ONE, A( K+I, I ), 1 )
+         IF( OFFPI.LT.M ) THEN
+            CALL ZLARFG( M-OFFPI+1, A( OFFPI, I ), A( OFFPI+1, I ), 1,
+     $                   TAU( I ) )
+         ELSE
+            CALL ZLARFG( 1, A( M, I ), A( M, I ), 1, TAU( I ) )
+         END IF
 *
-*           b1 := b1 - V1*w
+         IF( I.LT.N ) THEN
 *
-            CALL ZTRMV( 'Lower', 'No transpose', 'Unit', I-1,
-     $                  A( K+1, 1 ), LDA, T( 1, NB ), 1 )
-            CALL ZAXPY( I-1, -ONE, T( 1, NB ), 1, A( K+1, I ), 1 )
+*           Apply H(i)**H to A(offset+i:m,i+1:n) from the left.
 *
-            A( K+I-1, I-1 ) = EI
+            AII = A( OFFPI, I )
+            A( OFFPI, I ) = CONE
+            CALL ZLARF( 'Left', M-OFFPI+1, N-I, A( OFFPI, I ), 1,
+     $                  DCONJG( TAU( I ) ), A( OFFPI, I+1 ), LDA,
+     $                  WORK( 1 ) )
+            A( OFFPI, I ) = AII
          END IF
 *
-*        Generate the elementary reflector H(i) to annihilate
-*        A(k+i+1:n,i)
-*
-         EI = A( K+I, I )
-         CALL ZLARFG( N-K-I+1, EI, A( MIN( K+I+1, N ), I ), 1,
-     $                TAU( I ) )
-         A( K+I, I ) = ONE
-*
-*        Compute  Y(1:n,i)
+*        Update partial column norms.
 *
-         CALL ZGEMV( 'No transpose', N, N-K-I+1, ONE, A( 1, I+1 ), LDA,
-     $               A( K+I, I ), 1, ZERO, Y( 1, I ), 1 )
-         CALL ZGEMV( 'Conjugate transpose', N-K-I+1, I-1, ONE,
-     $               A( K+I, 1 ), LDA, A( K+I, I ), 1, ZERO, T( 1, I ),
-     $               1 )
-         CALL ZGEMV( 'No transpose', N, I-1, -ONE, Y, LDY, T( 1, I ), 1,
-     $               ONE, Y( 1, I ), 1 )
-         CALL ZSCAL( N, TAU( I ), Y( 1, I ), 1 )
+         DO 10 J = I + 1, N
+            IF( VN1( J ).NE.ZERO ) THEN
 *
-*        Compute T(1:i,i)
+*              NOTE: The following 4 lines follow from the analysis in
+*              Lapack Working Note 176.
 *
-         CALL ZSCAL( I-1, -TAU( I ), T( 1, I ), 1 )
-         CALL ZTRMV( 'Upper', 'No transpose', 'Non-unit', I-1, T, LDT,
-     $               T( 1, I ), 1 )
-         T( I, I ) = TAU( I )
+               TEMP = ONE - ( ABS( A( OFFPI, J ) ) / VN1( J ) )**2
+               TEMP = MAX( TEMP, ZERO )
+               TEMP2 = TEMP*( VN1( J ) / VN2( J ) )**2
+               IF( TEMP2 .LE. TOL3Z ) THEN
+                  IF( OFFPI.LT.M ) THEN
+                     VN1( J ) = DZNRM2( M-OFFPI, A( OFFPI+1, J ), 1 )
+                     VN2( J ) = VN1( J )
+                  ELSE
+                     VN1( J ) = ZERO
+                     VN2( J ) = ZERO
+                  END IF
+               ELSE
+                  VN1( J ) = VN1( J )*SQRT( TEMP )
+               END IF
+            END IF
+   10    CONTINUE
 *
-   10 CONTINUE
-      A( K+NB, NB ) = EI
+   20 CONTINUE
 *
       RETURN
 *
-*     End of ZLAHRD
+*     End of ZLAQP2
 *
       END
-*> \brief \b ZLANGE returns the value of the 1-norm, Frobenius norm, infinity-norm, or the largest absolute value of any element of a general rectangular matrix.
+*> \brief \b ZLAQPS computes a step of QR factorization with column pivoting of a real m-by-n matrix A by using BLAS level 3.
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download ZLANGE + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/zlange.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/zlange.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/zlange.f"> 
+*> Download ZLAQPS + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/zlaqps.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/zlaqps.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/zlaqps.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
-*       DOUBLE PRECISION FUNCTION ZLANGE( NORM, M, N, A, LDA, WORK )
-* 
+*       SUBROUTINE ZLAQPS( M, N, OFFSET, NB, KB, A, LDA, JPVT, TAU, VN1,
+*                          VN2, AUXV, F, LDF )
+*
 *       .. Scalar Arguments ..
-*       CHARACTER          NORM
-*       INTEGER            LDA, M, N
+*       INTEGER            KB, LDA, LDF, M, N, NB, OFFSET
 *       ..
 *       .. Array Arguments ..
-*       DOUBLE PRECISION   WORK( * )
-*       COMPLEX*16         A( LDA, * )
+*       INTEGER            JPVT( * )
+*       DOUBLE PRECISION   VN1( * ), VN2( * )
+*       COMPLEX*16         A( LDA, * ), AUXV( * ), F( LDF, * ), TAU( * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
 *>
 *> \verbatim
 *>
-*> ZLANGE  returns the value of the one norm,  or the Frobenius norm, or
-*> the  infinity norm,  or the  element of  largest absolute value  of a
-*> complex matrix A.
-*> \endverbatim
-*>
-*> \return ZLANGE
-*> \verbatim
+*> ZLAQPS computes a step of QR factorization with column pivoting
+*> of a complex M-by-N matrix A by using Blas-3.  It tries to factorize
+*> NB columns from A starting from the row OFFSET+1, and updates all
+*> of the matrix with Blas-3 xGEMM.
 *>
-*>    ZLANGE = ( max(abs(A(i,j))), NORM = 'M' or 'm'
-*>             (
-*>             ( norm1(A),         NORM = '1', 'O' or 'o'
-*>             (
-*>             ( normI(A),         NORM = 'I' or 'i'
-*>             (
-*>             ( normF(A),         NORM = 'F', 'f', 'E' or 'e'
+*> In some cases, due to catastrophic cancellations, it cannot
+*> factorize NB columns.  Hence, the actual number of factorized
+*> columns is returned in KB.
 *>
-*> where  norm1  denotes the  one norm of a matrix (maximum column sum),
-*> normI  denotes the  infinity norm  of a matrix  (maximum row sum) and
-*> normF  denotes the  Frobenius norm of a matrix (square root of sum of
-*> squares).  Note that  max(abs(A(i,j)))  is not a consistent matrix norm.
+*> Block A(1:OFFSET,1:N) is accordingly pivoted, but not factorized.
 *> \endverbatim
 *
 *  Arguments:
 *  ==========
 *
-*> \param[in] NORM
-*> \verbatim
-*>          NORM is CHARACTER*1
-*>          Specifies the value to be returned in ZLANGE as described
-*>          above.
-*> \endverbatim
-*>
 *> \param[in] M
 *> \verbatim
 *>          M is INTEGER
-*>          The number of rows of the matrix A.  M >= 0.  When M = 0,
-*>          ZLANGE is set to zero.
+*>          The number of rows of the matrix A. M >= 0.
 *> \endverbatim
 *>
 *> \param[in] N
 *> \verbatim
 *>          N is INTEGER
-*>          The number of columns of the matrix A.  N >= 0.  When N = 0,
-*>          ZLANGE is set to zero.
+*>          The number of columns of the matrix A. N >= 0
 *> \endverbatim
 *>
-*> \param[in] A
+*> \param[in] OFFSET
+*> \verbatim
+*>          OFFSET is INTEGER
+*>          The number of rows of A that have been factorized in
+*>          previous steps.
+*> \endverbatim
+*>
+*> \param[in] NB
+*> \verbatim
+*>          NB is INTEGER
+*>          The number of columns to factorize.
+*> \endverbatim
+*>
+*> \param[out] KB
+*> \verbatim
+*>          KB is INTEGER
+*>          The number of columns actually factorized.
+*> \endverbatim
+*>
+*> \param[in,out] A
 *> \verbatim
 *>          A is COMPLEX*16 array, dimension (LDA,N)
-*>          The m by n matrix A.
+*>          On entry, the M-by-N matrix A.
+*>          On exit, block A(OFFSET+1:M,1:KB) is the triangular
+*>          factor obtained and block A(1:OFFSET,1:N) has been
+*>          accordingly pivoted, but no factorized.
+*>          The rest of the matrix, block A(OFFSET+1:M,KB+1:N) has
+*>          been updated.
 *> \endverbatim
 *>
 *> \param[in] LDA
 *> \verbatim
 *>          LDA is INTEGER
-*>          The leading dimension of the array A.  LDA >= max(M,1).
+*>          The leading dimension of the array A. LDA >= max(1,M).
 *> \endverbatim
 *>
-*> \param[out] WORK
+*> \param[in,out] JPVT
 *> \verbatim
-*>          WORK is DOUBLE PRECISION array, dimension (MAX(1,LWORK)),
-*>          where LWORK >= M when NORM = 'I'; otherwise, WORK is not
-*>          referenced.
+*>          JPVT is INTEGER array, dimension (N)
+*>          JPVT(I) = K <==> Column K of the full matrix A has been
+*>          permuted into position I in AP.
+*> \endverbatim
+*>
+*> \param[out] TAU
+*> \verbatim
+*>          TAU is COMPLEX*16 array, dimension (KB)
+*>          The scalar factors of the elementary reflectors.
+*> \endverbatim
+*>
+*> \param[in,out] VN1
+*> \verbatim
+*>          VN1 is DOUBLE PRECISION array, dimension (N)
+*>          The vector with the partial column norms.
+*> \endverbatim
+*>
+*> \param[in,out] VN2
+*> \verbatim
+*>          VN2 is DOUBLE PRECISION array, dimension (N)
+*>          The vector with the exact column norms.
+*> \endverbatim
+*>
+*> \param[in,out] AUXV
+*> \verbatim
+*>          AUXV is COMPLEX*16 array, dimension (NB)
+*>          Auxiliar vector.
+*> \endverbatim
+*>
+*> \param[in,out] F
+*> \verbatim
+*>          F is COMPLEX*16 array, dimension (LDF,NB)
+*>          Matrix F**H = L * Y**H * A.
+*> \endverbatim
+*>
+*> \param[in] LDF
+*> \verbatim
+*>          LDF is INTEGER
+*>          The leading dimension of the array F. LDF >= max(1,N).
 *> \endverbatim
 *
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date September 2012
+*> \date December 2016
 *
-*> \ingroup complex16GEauxiliary
+*> \ingroup complex16OTHERauxiliary
+*
+*> \par Contributors:
+*  ==================
+*>
+*>    G. Quintana-Orti, Depto. de Informatica, Universidad Jaime I, Spain
+*>    X. Sun, Computer Science Dept., Duke University, USA
+*> \n
+*>  Partial column norm updating strategy modified on April 2011
+*>    Z. Drmac and Z. Bujanovic, Dept. of Mathematics,
+*>    University of Zagreb, Croatia.
+*
+*> \par References:
+*  ================
+*>
+*> LAPACK Working Note 176
+*
+*> \htmlonly
+*> <a href="http://www.netlib.org/lapack/lawnspdf/lawn176.pdf">[PDF]</a>
+*> \endhtmlonly
 *
 *  =====================================================================
-      DOUBLE PRECISION FUNCTION ZLANGE( NORM, M, N, A, LDA, WORK )
+      SUBROUTINE ZLAQPS( M, N, OFFSET, NB, KB, A, LDA, JPVT, TAU, VN1,
+     $                   VN2, AUXV, F, LDF )
 *
-*  -- LAPACK auxiliary routine (version 3.4.2) --
+*  -- LAPACK auxiliary routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     September 2012
+*     December 2016
 *
 *     .. Scalar Arguments ..
-      CHARACTER          NORM
-      INTEGER            LDA, M, N
+      INTEGER            KB, LDA, LDF, M, N, NB, OFFSET
 *     ..
 *     .. Array Arguments ..
-      DOUBLE PRECISION   WORK( * )
-      COMPLEX*16         A( LDA, * )
+      INTEGER            JPVT( * )
+      DOUBLE PRECISION   VN1( * ), VN2( * )
+      COMPLEX*16         A( LDA, * ), AUXV( * ), F( LDF, * ), TAU( * )
 *     ..
 *
-* =====================================================================
+*  =====================================================================
 *
 *     .. Parameters ..
-      DOUBLE PRECISION   ONE, ZERO
-      PARAMETER          ( ONE = 1.0D+0, ZERO = 0.0D+0 )
+      DOUBLE PRECISION   ZERO, ONE
+      COMPLEX*16         CZERO, CONE
+      PARAMETER          ( ZERO = 0.0D+0, ONE = 1.0D+0,
+     $                   CZERO = ( 0.0D+0, 0.0D+0 ),
+     $                   CONE = ( 1.0D+0, 0.0D+0 ) )
 *     ..
 *     .. Local Scalars ..
-      INTEGER            I, J
-      DOUBLE PRECISION   SCALE, SUM, VALUE, TEMP
-*     ..
-*     .. External Functions ..
-      LOGICAL            LSAME, DISNAN
-      EXTERNAL           LSAME, DISNAN
+      INTEGER            ITEMP, J, K, LASTRK, LSTICC, PVT, RK
+      DOUBLE PRECISION   TEMP, TEMP2, TOL3Z
+      COMPLEX*16         AKK
 *     ..
 *     .. External Subroutines ..
-      EXTERNAL           ZLASSQ
+      EXTERNAL           ZGEMM, ZGEMV, ZLARFG, ZSWAP
 *     ..
 *     .. Intrinsic Functions ..
-      INTRINSIC          ABS, MIN, SQRT
+      INTRINSIC          ABS, DBLE, DCONJG, MAX, MIN, NINT, SQRT
+*     ..
+*     .. External Functions ..
+      INTEGER            IDAMAX
+      DOUBLE PRECISION   DLAMCH, DZNRM2
+      EXTERNAL           IDAMAX, DLAMCH, DZNRM2
 *     ..
 *     .. Executable Statements ..
 *
-      IF( MIN( M, N ).EQ.0 ) THEN
-         VALUE = ZERO
-      ELSE IF( LSAME( NORM, 'M' ) ) THEN
+      LASTRK = MIN( M, N+OFFSET )
+      LSTICC = 0
+      K = 0
+      TOL3Z = SQRT(DLAMCH('Epsilon'))
 *
-*        Find max(abs(A(i,j))).
+*     Beginning of while loop.
 *
-         VALUE = ZERO
-         DO 20 J = 1, N
-            DO 10 I = 1, M
-               TEMP = ABS( A( I, J ) )
-               IF( VALUE.LT.TEMP .OR. DISNAN( TEMP ) ) VALUE = TEMP
-   10       CONTINUE
-   20    CONTINUE
-      ELSE IF( ( LSAME( NORM, 'O' ) ) .OR. ( NORM.EQ.'1' ) ) THEN
+   10 CONTINUE
+      IF( ( K.LT.NB ) .AND. ( LSTICC.EQ.0 ) ) THEN
+         K = K + 1
+         RK = OFFSET + K
 *
-*        Find norm1(A).
+*        Determine ith pivot column and swap if necessary
 *
-         VALUE = ZERO
-         DO 40 J = 1, N
-            SUM = ZERO
-            DO 30 I = 1, M
-               SUM = SUM + ABS( A( I, J ) )
+         PVT = ( K-1 ) + IDAMAX( N-K+1, VN1( K ), 1 )
+         IF( PVT.NE.K ) THEN
+            CALL ZSWAP( M, A( 1, PVT ), 1, A( 1, K ), 1 )
+            CALL ZSWAP( K-1, F( PVT, 1 ), LDF, F( K, 1 ), LDF )
+            ITEMP = JPVT( PVT )
+            JPVT( PVT ) = JPVT( K )
+            JPVT( K ) = ITEMP
+            VN1( PVT ) = VN1( K )
+            VN2( PVT ) = VN2( K )
+         END IF
+*
+*        Apply previous Householder reflectors to column K:
+*        A(RK:M,K) := A(RK:M,K) - A(RK:M,1:K-1)*F(K,1:K-1)**H.
+*
+         IF( K.GT.1 ) THEN
+            DO 20 J = 1, K - 1
+               F( K, J ) = DCONJG( F( K, J ) )
+   20       CONTINUE
+            CALL ZGEMV( 'No transpose', M-RK+1, K-1, -CONE, A( RK, 1 ),
+     $                  LDA, F( K, 1 ), LDF, CONE, A( RK, K ), 1 )
+            DO 30 J = 1, K - 1
+               F( K, J ) = DCONJG( F( K, J ) )
    30       CONTINUE
-            IF( VALUE.LT.SUM .OR. DISNAN( SUM ) ) VALUE = SUM
+         END IF
+*
+*        Generate elementary reflector H(k).
+*
+         IF( RK.LT.M ) THEN
+            CALL ZLARFG( M-RK+1, A( RK, K ), A( RK+1, K ), 1, TAU( K ) )
+         ELSE
+            CALL ZLARFG( 1, A( RK, K ), A( RK, K ), 1, TAU( K ) )
+         END IF
+*
+         AKK = A( RK, K )
+         A( RK, K ) = CONE
+*
+*        Compute Kth column of F:
+*
+*        Compute  F(K+1:N,K) := tau(K)*A(RK:M,K+1:N)**H*A(RK:M,K).
+*
+         IF( K.LT.N ) THEN
+            CALL ZGEMV( 'Conjugate transpose', M-RK+1, N-K, TAU( K ),
+     $                  A( RK, K+1 ), LDA, A( RK, K ), 1, CZERO,
+     $                  F( K+1, K ), 1 )
+         END IF
+*
+*        Padding F(1:K,K) with zeros.
+*
+         DO 40 J = 1, K
+            F( J, K ) = CZERO
    40    CONTINUE
-      ELSE IF( LSAME( NORM, 'I' ) ) THEN
 *
-*        Find normI(A).
+*        Incremental updating of F:
+*        F(1:N,K) := F(1:N,K) - tau(K)*F(1:N,1:K-1)*A(RK:M,1:K-1)**H
+*                    *A(RK:M,K).
 *
-         DO 50 I = 1, M
-            WORK( I ) = ZERO
-   50    CONTINUE
-         DO 70 J = 1, N
-            DO 60 I = 1, M
-               WORK( I ) = WORK( I ) + ABS( A( I, J ) )
-   60       CONTINUE
-   70    CONTINUE
-         VALUE = ZERO
-         DO 80 I = 1, M
-            TEMP = WORK( I )
-            IF( VALUE.LT.TEMP .OR. DISNAN( TEMP ) ) VALUE = TEMP
-   80    CONTINUE
-      ELSE IF( ( LSAME( NORM, 'F' ) ) .OR. ( LSAME( NORM, 'E' ) ) ) THEN
+         IF( K.GT.1 ) THEN
+            CALL ZGEMV( 'Conjugate transpose', M-RK+1, K-1, -TAU( K ),
+     $                  A( RK, 1 ), LDA, A( RK, K ), 1, CZERO,
+     $                  AUXV( 1 ), 1 )
 *
-*        Find normF(A).
+            CALL ZGEMV( 'No transpose', N, K-1, CONE, F( 1, 1 ), LDF,
+     $                  AUXV( 1 ), 1, CONE, F( 1, K ), 1 )
+         END IF
 *
-         SCALE = ZERO
-         SUM = ONE
-         DO 90 J = 1, N
-            CALL ZLASSQ( M, A( 1, J ), 1, SCALE, SUM )
-   90    CONTINUE
-         VALUE = SCALE*SQRT( SUM )
+*        Update the current row of A:
+*        A(RK,K+1:N) := A(RK,K+1:N) - A(RK,1:K)*F(K+1:N,1:K)**H.
+*
+         IF( K.LT.N ) THEN
+            CALL ZGEMM( 'No transpose', 'Conjugate transpose', 1, N-K,
+     $                  K, -CONE, A( RK, 1 ), LDA, F( K+1, 1 ), LDF,
+     $                  CONE, A( RK, K+1 ), LDA )
+         END IF
+*
+*        Update partial column norms.
+*
+         IF( RK.LT.LASTRK ) THEN
+            DO 50 J = K + 1, N
+               IF( VN1( J ).NE.ZERO ) THEN
+*
+*                 NOTE: The following 4 lines follow from the analysis in
+*                 Lapack Working Note 176.
+*
+                  TEMP = ABS( A( RK, J ) ) / VN1( J )
+                  TEMP = MAX( ZERO, ( ONE+TEMP )*( ONE-TEMP ) )
+                  TEMP2 = TEMP*( VN1( J ) / VN2( J ) )**2
+                  IF( TEMP2 .LE. TOL3Z ) THEN
+                     VN2( J ) = DBLE( LSTICC )
+                     LSTICC = J
+                  ELSE
+                     VN1( J ) = VN1( J )*SQRT( TEMP )
+                  END IF
+               END IF
+   50       CONTINUE
+         END IF
+*
+         A( RK, K ) = AKK
+*
+*        End of while loop.
+*
+         GO TO 10
+      END IF
+      KB = K
+      RK = OFFSET + KB
+*
+*     Apply the block reflector to the rest of the matrix:
+*     A(OFFSET+KB+1:M,KB+1:N) := A(OFFSET+KB+1:M,KB+1:N) -
+*                         A(OFFSET+KB+1:M,1:KB)*F(KB+1:N,1:KB)**H.
+*
+      IF( KB.LT.MIN( N, M-OFFSET ) ) THEN
+         CALL ZGEMM( 'No transpose', 'Conjugate transpose', M-RK, N-KB,
+     $               KB, -CONE, A( RK+1, 1 ), LDA, F( KB+1, 1 ), LDF,
+     $               CONE, A( RK+1, KB+1 ), LDA )
+      END IF
+*
+*     Recomputation of difficult columns.
+*
+   60 CONTINUE
+      IF( LSTICC.GT.0 ) THEN
+         ITEMP = NINT( VN2( LSTICC ) )
+         VN1( LSTICC ) = DZNRM2( M-RK, A( RK+1, LSTICC ), 1 )
+*
+*        NOTE: The computation of VN1( LSTICC ) relies on the fact that
+*        SNRM2 does not fail on vectors with norm below the value of
+*        SQRT(DLAMCH('S'))
+*
+         VN2( LSTICC ) = VN1( LSTICC )
+         LSTICC = ITEMP
+         GO TO 60
       END IF
 *
-      ZLANGE = VALUE
       RETURN
 *
-*     End of ZLANGE
+*     End of ZLAQPS
 *
       END
-*> \brief \b ZLANHE returns the value of the 1-norm, or the Frobenius norm, or the infinity norm, or the element of largest absolute value of a complex Hermitian matrix.
+*> \brief \b ZLAQR0 computes the eigenvalues of a Hessenberg matrix, and optionally the matrices from the Schur decomposition.
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download ZLANHE + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/zlanhe.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/zlanhe.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/zlanhe.f"> 
+*> Download ZLAQR0 + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/zlaqr0.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/zlaqr0.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/zlaqr0.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
-*       DOUBLE PRECISION FUNCTION ZLANHE( NORM, UPLO, N, A, LDA, WORK )
-* 
+*       SUBROUTINE ZLAQR0( WANTT, WANTZ, N, ILO, IHI, H, LDH, W, ILOZ,
+*                          IHIZ, Z, LDZ, WORK, LWORK, INFO )
+*
 *       .. Scalar Arguments ..
-*       CHARACTER          NORM, UPLO
-*       INTEGER            LDA, N
+*       INTEGER            IHI, IHIZ, ILO, ILOZ, INFO, LDH, LDZ, LWORK, N
+*       LOGICAL            WANTT, WANTZ
 *       ..
 *       .. Array Arguments ..
-*       DOUBLE PRECISION   WORK( * )
-*       COMPLEX*16         A( LDA, * )
+*       COMPLEX*16         H( LDH, * ), W( * ), WORK( * ), Z( LDZ, * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
 *>
 *> \verbatim
 *>
-*> ZLANHE  returns the value of the one norm,  or the Frobenius norm, or
-*> the  infinity norm,  or the  element of  largest absolute value  of a
-*> complex hermitian matrix A.
-*> \endverbatim
-*>
-*> \return ZLANHE
-*> \verbatim
-*>
-*>    ZLANHE = ( max(abs(A(i,j))), NORM = 'M' or 'm'
-*>             (
-*>             ( norm1(A),         NORM = '1', 'O' or 'o'
-*>             (
-*>             ( normI(A),         NORM = 'I' or 'i'
-*>             (
-*>             ( normF(A),         NORM = 'F', 'f', 'E' or 'e'
+*>    ZLAQR0 computes the eigenvalues of a Hessenberg matrix H
+*>    and, optionally, the matrices T and Z from the Schur decomposition
+*>    H = Z T Z**H, where T is an upper triangular matrix (the
+*>    Schur form), and Z is the unitary matrix of Schur vectors.
 *>
-*> where  norm1  denotes the  one norm of a matrix (maximum column sum),
-*> normI  denotes the  infinity norm  of a matrix  (maximum row sum) and
-*> normF  denotes the  Frobenius norm of a matrix (square root of sum of
-*> squares).  Note that  max(abs(A(i,j)))  is not a consistent matrix norm.
+*>    Optionally Z may be postmultiplied into an input unitary
+*>    matrix Q so that this routine can give the Schur factorization
+*>    of a matrix A which has been reduced to the Hessenberg form H
+*>    by the unitary matrix Q:  A = Q*H*Q**H = (QZ)*H*(QZ)**H.
 *> \endverbatim
 *
 *  Arguments:
 *  ==========
 *
-*> \param[in] NORM
+*> \param[in] WANTT
 *> \verbatim
-*>          NORM is CHARACTER*1
-*>          Specifies the value to be returned in ZLANHE as described
-*>          above.
+*>          WANTT is LOGICAL
+*>          = .TRUE. : the full Schur form T is required;
+*>          = .FALSE.: only eigenvalues are required.
+*> \endverbatim
+*>
+*> \param[in] WANTZ
+*> \verbatim
+*>          WANTZ is LOGICAL
+*>          = .TRUE. : the matrix of Schur vectors Z is required;
+*>          = .FALSE.: Schur vectors are not required.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*>          N is INTEGER
+*>           The order of the matrix H.  N .GE. 0.
+*> \endverbatim
+*>
+*> \param[in] ILO
+*> \verbatim
+*>          ILO is INTEGER
+*> \endverbatim
+*>
+*> \param[in] IHI
+*> \verbatim
+*>          IHI is INTEGER
+*>
+*>           It is assumed that H is already upper triangular in rows
+*>           and columns 1:ILO-1 and IHI+1:N and, if ILO.GT.1,
+*>           H(ILO,ILO-1) is zero. ILO and IHI are normally set by a
+*>           previous call to ZGEBAL, and then passed to ZGEHRD when the
+*>           matrix output by ZGEBAL is reduced to Hessenberg form.
+*>           Otherwise, ILO and IHI should be set to 1 and N,
+*>           respectively.  If N.GT.0, then 1.LE.ILO.LE.IHI.LE.N.
+*>           If N = 0, then ILO = 1 and IHI = 0.
+*> \endverbatim
+*>
+*> \param[in,out] H
+*> \verbatim
+*>          H is COMPLEX*16 array, dimension (LDH,N)
+*>           On entry, the upper Hessenberg matrix H.
+*>           On exit, if INFO = 0 and WANTT is .TRUE., then H
+*>           contains the upper triangular matrix T from the Schur
+*>           decomposition (the Schur form). If INFO = 0 and WANT is
+*>           .FALSE., then the contents of H are unspecified on exit.
+*>           (The output value of H when INFO.GT.0 is given under the
+*>           description of INFO below.)
+*>
+*>           This subroutine may explicitly set H(i,j) = 0 for i.GT.j and
+*>           j = 1, 2, ... ILO-1 or j = IHI+1, IHI+2, ... N.
+*> \endverbatim
+*>
+*> \param[in] LDH
+*> \verbatim
+*>          LDH is INTEGER
+*>           The leading dimension of the array H. LDH .GE. max(1,N).
+*> \endverbatim
+*>
+*> \param[out] W
+*> \verbatim
+*>          W is COMPLEX*16 array, dimension (N)
+*>           The computed eigenvalues of H(ILO:IHI,ILO:IHI) are stored
+*>           in W(ILO:IHI). If WANTT is .TRUE., then the eigenvalues are
+*>           stored in the same order as on the diagonal of the Schur
+*>           form returned in H, with W(i) = H(i,i).
+*> \endverbatim
+*>
+*> \param[in] ILOZ
+*> \verbatim
+*>          ILOZ is INTEGER
+*> \endverbatim
+*>
+*> \param[in] IHIZ
+*> \verbatim
+*>          IHIZ is INTEGER
+*>           Specify the rows of Z to which transformations must be
+*>           applied if WANTZ is .TRUE..
+*>           1 .LE. ILOZ .LE. ILO; IHI .LE. IHIZ .LE. N.
 *> \endverbatim
 *>
-*> \param[in] UPLO
+*> \param[in,out] Z
 *> \verbatim
-*>          UPLO is CHARACTER*1
-*>          Specifies whether the upper or lower triangular part of the
-*>          hermitian matrix A is to be referenced.
-*>          = 'U':  Upper triangular part of A is referenced
-*>          = 'L':  Lower triangular part of A is referenced
+*>          Z is COMPLEX*16 array, dimension (LDZ,IHI)
+*>           If WANTZ is .FALSE., then Z is not referenced.
+*>           If WANTZ is .TRUE., then Z(ILO:IHI,ILOZ:IHIZ) is
+*>           replaced by Z(ILO:IHI,ILOZ:IHIZ)*U where U is the
+*>           orthogonal Schur factor of H(ILO:IHI,ILO:IHI).
+*>           (The output value of Z when INFO.GT.0 is given under
+*>           the description of INFO below.)
 *> \endverbatim
 *>
-*> \param[in] N
+*> \param[in] LDZ
 *> \verbatim
-*>          N is INTEGER
-*>          The order of the matrix A.  N >= 0.  When N = 0, ZLANHE is
-*>          set to zero.
+*>          LDZ is INTEGER
+*>           The leading dimension of the array Z.  if WANTZ is .TRUE.
+*>           then LDZ.GE.MAX(1,IHIZ).  Otherwize, LDZ.GE.1.
 *> \endverbatim
 *>
-*> \param[in] A
+*> \param[out] WORK
 *> \verbatim
-*>          A is COMPLEX*16 array, dimension (LDA,N)
-*>          The hermitian matrix A.  If UPLO = 'U', the leading n by n
-*>          upper triangular part of A contains the upper triangular part
-*>          of the matrix A, and the strictly lower triangular part of A
-*>          is not referenced.  If UPLO = 'L', the leading n by n lower
-*>          triangular part of A contains the lower triangular part of
-*>          the matrix A, and the strictly upper triangular part of A is
-*>          not referenced. Note that the imaginary parts of the diagonal
-*>          elements need not be set and are assumed to be zero.
+*>          WORK is COMPLEX*16 array, dimension LWORK
+*>           On exit, if LWORK = -1, WORK(1) returns an estimate of
+*>           the optimal value for LWORK.
 *> \endverbatim
 *>
-*> \param[in] LDA
+*> \param[in] LWORK
 *> \verbatim
-*>          LDA is INTEGER
-*>          The leading dimension of the array A.  LDA >= max(N,1).
+*>          LWORK is INTEGER
+*>           The dimension of the array WORK.  LWORK .GE. max(1,N)
+*>           is sufficient, but LWORK typically as large as 6*N may
+*>           be required for optimal performance.  A workspace query
+*>           to determine the optimal workspace size is recommended.
+*>
+*>           If LWORK = -1, then ZLAQR0 does a workspace query.
+*>           In this case, ZLAQR0 checks the input parameters and
+*>           estimates the optimal workspace size for the given
+*>           values of N, ILO and IHI.  The estimate is returned
+*>           in WORK(1).  No error message related to LWORK is
+*>           issued by XERBLA.  Neither H nor Z are accessed.
 *> \endverbatim
 *>
-*> \param[out] WORK
+*> \param[out] INFO
 *> \verbatim
-*>          WORK is DOUBLE PRECISION array, dimension (MAX(1,LWORK)),
-*>          where LWORK >= N when NORM = 'I' or '1' or 'O'; otherwise,
-*>          WORK is not referenced.
+*>          INFO is INTEGER
+*>             =  0:  successful exit
+*>           .GT. 0:  if INFO = i, ZLAQR0 failed to compute all of
+*>                the eigenvalues.  Elements 1:ilo-1 and i+1:n of WR
+*>                and WI contain those eigenvalues which have been
+*>                successfully computed.  (Failures are rare.)
+*>
+*>                If INFO .GT. 0 and WANT is .FALSE., then on exit,
+*>                the remaining unconverged eigenvalues are the eigen-
+*>                values of the upper Hessenberg matrix rows and
+*>                columns ILO through INFO of the final, output
+*>                value of H.
+*>
+*>                If INFO .GT. 0 and WANTT is .TRUE., then on exit
+*>
+*>           (*)  (initial value of H)*U  = U*(final value of H)
+*>
+*>                where U is a unitary matrix.  The final
+*>                value of  H is upper Hessenberg and triangular in
+*>                rows and columns INFO+1 through IHI.
+*>
+*>                If INFO .GT. 0 and WANTZ is .TRUE., then on exit
+*>
+*>                  (final value of Z(ILO:IHI,ILOZ:IHIZ)
+*>                   =  (initial value of Z(ILO:IHI,ILOZ:IHIZ)*U
+*>
+*>                where U is the unitary matrix in (*) (regard-
+*>                less of the value of WANTT.)
+*>
+*>                If INFO .GT. 0 and WANTZ is .FALSE., then Z is not
+*>                accessed.
 *> \endverbatim
 *
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date September 2012
+*> \date December 2016
 *
-*> \ingroup complex16HEauxiliary
+*> \ingroup complex16OTHERauxiliary
+*
+*> \par Contributors:
+*  ==================
+*>
+*>       Karen Braman and Ralph Byers, Department of Mathematics,
+*>       University of Kansas, USA
 *
+*> \par References:
+*  ================
+*>
+*>       K. Braman, R. Byers and R. Mathias, The Multi-Shift QR
+*>       Algorithm Part I: Maintaining Well Focused Shifts, and Level 3
+*>       Performance, SIAM Journal of Matrix Analysis, volume 23, pages
+*>       929--947, 2002.
+*> \n
+*>       K. Braman, R. Byers and R. Mathias, The Multi-Shift QR
+*>       Algorithm Part II: Aggressive Early Deflation, SIAM Journal
+*>       of Matrix Analysis, volume 23, pages 948--973, 2002.
+*>
 *  =====================================================================
-      DOUBLE PRECISION FUNCTION ZLANHE( NORM, UPLO, N, A, LDA, WORK )
+      SUBROUTINE ZLAQR0( WANTT, WANTZ, N, ILO, IHI, H, LDH, W, ILOZ,
+     $                   IHIZ, Z, LDZ, WORK, LWORK, INFO )
 *
-*  -- LAPACK auxiliary routine (version 3.4.2) --
+*  -- LAPACK auxiliary routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     September 2012
+*     December 2016
 *
 *     .. Scalar Arguments ..
-      CHARACTER          NORM, UPLO
-      INTEGER            LDA, N
+      INTEGER            IHI, IHIZ, ILO, ILOZ, INFO, LDH, LDZ, LWORK, N
+      LOGICAL            WANTT, WANTZ
 *     ..
 *     .. Array Arguments ..
-      DOUBLE PRECISION   WORK( * )
-      COMPLEX*16         A( LDA, * )
+      COMPLEX*16         H( LDH, * ), W( * ), WORK( * ), Z( LDZ, * )
 *     ..
 *
-* =====================================================================
+*  ================================================================
 *
 *     .. Parameters ..
-      DOUBLE PRECISION   ONE, ZERO
-      PARAMETER          ( ONE = 1.0D+0, ZERO = 0.0D+0 )
+*
+*     ==== Matrices of order NTINY or smaller must be processed by
+*     .    ZLAHQR because of insufficient subdiagonal scratch space.
+*     .    (This is a hard limit.) ====
+      INTEGER            NTINY
+      PARAMETER          ( NTINY = 11 )
+*
+*     ==== Exceptional deflation windows:  try to cure rare
+*     .    slow convergence by varying the size of the
+*     .    deflation window after KEXNW iterations. ====
+      INTEGER            KEXNW
+      PARAMETER          ( KEXNW = 5 )
+*
+*     ==== Exceptional shifts: try to cure rare slow convergence
+*     .    with ad-hoc exceptional shifts every KEXSH iterations.
+*     .    ====
+      INTEGER            KEXSH
+      PARAMETER          ( KEXSH = 6 )
+*
+*     ==== The constant WILK1 is used to form the exceptional
+*     .    shifts. ====
+      DOUBLE PRECISION   WILK1
+      PARAMETER          ( WILK1 = 0.75d0 )
+      COMPLEX*16         ZERO, ONE
+      PARAMETER          ( ZERO = ( 0.0d0, 0.0d0 ),
+     $                   ONE = ( 1.0d0, 0.0d0 ) )
+      DOUBLE PRECISION   TWO
+      PARAMETER          ( TWO = 2.0d0 )
 *     ..
 *     .. Local Scalars ..
-      INTEGER            I, J
-      DOUBLE PRECISION   ABSA, SCALE, SUM, VALUE
+      COMPLEX*16         AA, BB, CC, CDUM, DD, DET, RTDISC, SWAP, TR2
+      DOUBLE PRECISION   S
+      INTEGER            I, INF, IT, ITMAX, K, KACC22, KBOT, KDU, KS,
+     $                   KT, KTOP, KU, KV, KWH, KWTOP, KWV, LD, LS,
+     $                   LWKOPT, NDEC, NDFL, NH, NHO, NIBBLE, NMIN, NS,
+     $                   NSMAX, NSR, NVE, NW, NWMAX, NWR, NWUPBD
+      LOGICAL            SORTED
+      CHARACTER          JBCMPZ*2
 *     ..
 *     .. External Functions ..
-      LOGICAL            LSAME, DISNAN
-      EXTERNAL           LSAME, DISNAN
+      INTEGER            ILAENV
+      EXTERNAL           ILAENV
+*     ..
+*     .. Local Arrays ..
+      COMPLEX*16         ZDUM( 1, 1 )
 *     ..
 *     .. External Subroutines ..
-      EXTERNAL           ZLASSQ
+      EXTERNAL           ZLACPY, ZLAHQR, ZLAQR3, ZLAQR4, ZLAQR5
 *     ..
 *     .. Intrinsic Functions ..
-      INTRINSIC          ABS, DBLE, SQRT
+      INTRINSIC          ABS, DBLE, DCMPLX, DIMAG, INT, MAX, MIN, MOD,
+     $                   SQRT
+*     ..
+*     .. Statement Functions ..
+      DOUBLE PRECISION   CABS1
+*     ..
+*     .. Statement Function definitions ..
+      CABS1( CDUM ) = ABS( DBLE( CDUM ) ) + ABS( DIMAG( CDUM ) )
 *     ..
 *     .. Executable Statements ..
+      INFO = 0
+*
+*     ==== Quick return for N = 0: nothing to do. ====
 *
       IF( N.EQ.0 ) THEN
-         VALUE = ZERO
-      ELSE IF( LSAME( NORM, 'M' ) ) THEN
+         WORK( 1 ) = ONE
+         RETURN
+      END IF
 *
-*        Find max(abs(A(i,j))).
+      IF( N.LE.NTINY ) THEN
 *
-         VALUE = ZERO
-         IF( LSAME( UPLO, 'U' ) ) THEN
-            DO 20 J = 1, N
-               DO 10 I = 1, J - 1
-                  SUM = ABS( A( I, J ) )
-                  IF( VALUE .LT. SUM .OR. DISNAN( SUM ) ) VALUE = SUM
-   10          CONTINUE
-               SUM = ABS( DBLE( A( J, J ) ) )
-               IF( VALUE .LT. SUM .OR. DISNAN( SUM ) ) VALUE = SUM
-   20       CONTINUE
-         ELSE
-            DO 40 J = 1, N
-               SUM = ABS( DBLE( A( J, J ) ) )
-               IF( VALUE .LT. SUM .OR. DISNAN( SUM ) ) VALUE = SUM
-               DO 30 I = J + 1, N
-                  SUM = ABS( A( I, J ) )
-                  IF( VALUE .LT. SUM .OR. DISNAN( SUM ) ) VALUE = SUM
-   30          CONTINUE
-   40       CONTINUE
-         END IF
-      ELSE IF( ( LSAME( NORM, 'I' ) ) .OR. ( LSAME( NORM, 'O' ) ) .OR.
-     $         ( NORM.EQ.'1' ) ) THEN
+*        ==== Tiny matrices must use ZLAHQR. ====
 *
-*        Find normI(A) ( = norm1(A), since A is hermitian).
+         LWKOPT = 1
+         IF( LWORK.NE.-1 )
+     $      CALL ZLAHQR( WANTT, WANTZ, N, ILO, IHI, H, LDH, W, ILOZ,
+     $                   IHIZ, Z, LDZ, INFO )
+      ELSE
 *
-         VALUE = ZERO
-         IF( LSAME( UPLO, 'U' ) ) THEN
-            DO 60 J = 1, N
-               SUM = ZERO
-               DO 50 I = 1, J - 1
-                  ABSA = ABS( A( I, J ) )
-                  SUM = SUM + ABSA
-                  WORK( I ) = WORK( I ) + ABSA
-   50          CONTINUE
-               WORK( J ) = SUM + ABS( DBLE( A( J, J ) ) )
-   60       CONTINUE
-            DO 70 I = 1, N
-               SUM = WORK( I )
-               IF( VALUE .LT. SUM .OR. DISNAN( SUM ) ) VALUE = SUM
-   70       CONTINUE
+*        ==== Use small bulge multi-shift QR with aggressive early
+*        .    deflation on larger-than-tiny matrices. ====
+*
+*        ==== Hope for the best. ====
+*
+         INFO = 0
+*
+*        ==== Set up job flags for ILAENV. ====
+*
+         IF( WANTT ) THEN
+            JBCMPZ( 1: 1 ) = 'S'
          ELSE
-            DO 80 I = 1, N
-               WORK( I ) = ZERO
-   80       CONTINUE
-            DO 100 J = 1, N
-               SUM = WORK( J ) + ABS( DBLE( A( J, J ) ) )
-               DO 90 I = J + 1, N
-                  ABSA = ABS( A( I, J ) )
-                  SUM = SUM + ABSA
-                  WORK( I ) = WORK( I ) + ABSA
-   90          CONTINUE
-               IF( VALUE .LT. SUM .OR. DISNAN( SUM ) ) VALUE = SUM
-  100       CONTINUE
+            JBCMPZ( 1: 1 ) = 'E'
+         END IF
+         IF( WANTZ ) THEN
+            JBCMPZ( 2: 2 ) = 'V'
+         ELSE
+            JBCMPZ( 2: 2 ) = 'N'
          END IF
-      ELSE IF( ( LSAME( NORM, 'F' ) ) .OR. ( LSAME( NORM, 'E' ) ) ) THEN
 *
-*        Find normF(A).
+*        ==== NWR = recommended deflation window size.  At this
+*        .    point,  N .GT. NTINY = 11, so there is enough
+*        .    subdiagonal workspace for NWR.GE.2 as required.
+*        .    (In fact, there is enough subdiagonal space for
+*        .    NWR.GE.3.) ====
 *
-         SCALE = ZERO
-         SUM = ONE
-         IF( LSAME( UPLO, 'U' ) ) THEN
-            DO 110 J = 2, N
-               CALL ZLASSQ( J-1, A( 1, J ), 1, SCALE, SUM )
-  110       CONTINUE
-         ELSE
-            DO 120 J = 1, N - 1
-               CALL ZLASSQ( N-J, A( J+1, J ), 1, SCALE, SUM )
-  120       CONTINUE
+         NWR = ILAENV( 13, 'ZLAQR0', JBCMPZ, N, ILO, IHI, LWORK )
+         NWR = MAX( 2, NWR )
+         NWR = MIN( IHI-ILO+1, ( N-1 ) / 3, NWR )
+*
+*        ==== NSR = recommended number of simultaneous shifts.
+*        .    At this point N .GT. NTINY = 11, so there is at
+*        .    enough subdiagonal workspace for NSR to be even
+*        .    and greater than or equal to two as required. ====
+*
+         NSR = ILAENV( 15, 'ZLAQR0', JBCMPZ, N, ILO, IHI, LWORK )
+         NSR = MIN( NSR, ( N+6 ) / 9, IHI-ILO )
+         NSR = MAX( 2, NSR-MOD( NSR, 2 ) )
+*
+*        ==== Estimate optimal workspace ====
+*
+*        ==== Workspace query call to ZLAQR3 ====
+*
+         CALL ZLAQR3( WANTT, WANTZ, N, ILO, IHI, NWR+1, H, LDH, ILOZ,
+     $                IHIZ, Z, LDZ, LS, LD, W, H, LDH, N, H, LDH, N, H,
+     $                LDH, WORK, -1 )
+*
+*        ==== Optimal workspace = MAX(ZLAQR5, ZLAQR3) ====
+*
+         LWKOPT = MAX( 3*NSR / 2, INT( WORK( 1 ) ) )
+*
+*        ==== Quick return in case of workspace query. ====
+*
+         IF( LWORK.EQ.-1 ) THEN
+            WORK( 1 ) = DCMPLX( LWKOPT, 0 )
+            RETURN
          END IF
-         SUM = 2*SUM
-         DO 130 I = 1, N
-            IF( DBLE( A( I, I ) ).NE.ZERO ) THEN
-               ABSA = ABS( DBLE( A( I, I ) ) )
-               IF( SCALE.LT.ABSA ) THEN
-                  SUM = ONE + SUM*( SCALE / ABSA )**2
-                  SCALE = ABSA
+*
+*        ==== ZLAHQR/ZLAQR0 crossover point ====
+*
+         NMIN = ILAENV( 12, 'ZLAQR0', JBCMPZ, N, ILO, IHI, LWORK )
+         NMIN = MAX( NTINY, NMIN )
+*
+*        ==== Nibble crossover point ====
+*
+         NIBBLE = ILAENV( 14, 'ZLAQR0', JBCMPZ, N, ILO, IHI, LWORK )
+         NIBBLE = MAX( 0, NIBBLE )
+*
+*        ==== Accumulate reflections during ttswp?  Use block
+*        .    2-by-2 structure during matrix-matrix multiply? ====
+*
+         KACC22 = ILAENV( 16, 'ZLAQR0', JBCMPZ, N, ILO, IHI, LWORK )
+         KACC22 = MAX( 0, KACC22 )
+         KACC22 = MIN( 2, KACC22 )
+*
+*        ==== NWMAX = the largest possible deflation window for
+*        .    which there is sufficient workspace. ====
+*
+         NWMAX = MIN( ( N-1 ) / 3, LWORK / 2 )
+         NW = NWMAX
+*
+*        ==== NSMAX = the Largest number of simultaneous shifts
+*        .    for which there is sufficient workspace. ====
+*
+         NSMAX = MIN( ( N+6 ) / 9, 2*LWORK / 3 )
+         NSMAX = NSMAX - MOD( NSMAX, 2 )
+*
+*        ==== NDFL: an iteration count restarted at deflation. ====
+*
+         NDFL = 1
+*
+*        ==== ITMAX = iteration limit ====
+*
+         ITMAX = MAX( 30, 2*KEXSH )*MAX( 10, ( IHI-ILO+1 ) )
+*
+*        ==== Last row and column in the active block ====
+*
+         KBOT = IHI
+*
+*        ==== Main Loop ====
+*
+         DO 70 IT = 1, ITMAX
+*
+*           ==== Done when KBOT falls below ILO ====
+*
+            IF( KBOT.LT.ILO )
+     $         GO TO 80
+*
+*           ==== Locate active block ====
+*
+            DO 10 K = KBOT, ILO + 1, -1
+               IF( H( K, K-1 ).EQ.ZERO )
+     $            GO TO 20
+   10       CONTINUE
+            K = ILO
+   20       CONTINUE
+            KTOP = K
+*
+*           ==== Select deflation window size:
+*           .    Typical Case:
+*           .      If possible and advisable, nibble the entire
+*           .      active block.  If not, use size MIN(NWR,NWMAX)
+*           .      or MIN(NWR+1,NWMAX) depending upon which has
+*           .      the smaller corresponding subdiagonal entry
+*           .      (a heuristic).
+*           .
+*           .    Exceptional Case:
+*           .      If there have been no deflations in KEXNW or
+*           .      more iterations, then vary the deflation window
+*           .      size.   At first, because, larger windows are,
+*           .      in general, more powerful than smaller ones,
+*           .      rapidly increase the window to the maximum possible.
+*           .      Then, gradually reduce the window size. ====
+*
+            NH = KBOT - KTOP + 1
+            NWUPBD = MIN( NH, NWMAX )
+            IF( NDFL.LT.KEXNW ) THEN
+               NW = MIN( NWUPBD, NWR )
+            ELSE
+               NW = MIN( NWUPBD, 2*NW )
+            END IF
+            IF( NW.LT.NWMAX ) THEN
+               IF( NW.GE.NH-1 ) THEN
+                  NW = NH
                ELSE
-                  SUM = SUM + ( ABSA / SCALE )**2
+                  KWTOP = KBOT - NW + 1
+                  IF( CABS1( H( KWTOP, KWTOP-1 ) ).GT.
+     $                CABS1( H( KWTOP-1, KWTOP-2 ) ) )NW = NW + 1
                END IF
             END IF
-  130    CONTINUE
-         VALUE = SCALE*SQRT( SUM )
-      END IF
+            IF( NDFL.LT.KEXNW ) THEN
+               NDEC = -1
+            ELSE IF( NDEC.GE.0 .OR. NW.GE.NWUPBD ) THEN
+               NDEC = NDEC + 1
+               IF( NW-NDEC.LT.2 )
+     $            NDEC = 0
+               NW = NW - NDEC
+            END IF
 *
-      ZLANHE = VALUE
-      RETURN
+*           ==== Aggressive early deflation:
+*           .    split workspace under the subdiagonal into
+*           .      - an nw-by-nw work array V in the lower
+*           .        left-hand-corner,
+*           .      - an NW-by-at-least-NW-but-more-is-better
+*           .        (NW-by-NHO) horizontal work array along
+*           .        the bottom edge,
+*           .      - an at-least-NW-but-more-is-better (NHV-by-NW)
+*           .        vertical work array along the left-hand-edge.
+*           .        ====
 *
-*     End of ZLANHE
+            KV = N - NW + 1
+            KT = NW + 1
+            NHO = ( N-NW-1 ) - KT + 1
+            KWV = NW + 2
+            NVE = ( N-NW ) - KWV + 1
 *
-      END
-*> \brief \b ZLANHS returns the value of the 1-norm, Frobenius norm, infinity-norm, or the largest absolute value of any element of an upper Hessenberg matrix.
+*           ==== Aggressive early deflation ====
 *
-*  =========== DOCUMENTATION ===========
+            CALL ZLAQR3( WANTT, WANTZ, N, KTOP, KBOT, NW, H, LDH, ILOZ,
+     $                   IHIZ, Z, LDZ, LS, LD, W, H( KV, 1 ), LDH, NHO,
+     $                   H( KV, KT ), LDH, NVE, H( KWV, 1 ), LDH, WORK,
+     $                   LWORK )
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+*           ==== Adjust KBOT accounting for new deflations. ====
 *
-*> \htmlonly
-*> Download ZLANHS + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/zlanhs.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/zlanhs.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/zlanhs.f"> 
-*> [TXT]</a>
-*> \endhtmlonly 
+            KBOT = KBOT - LD
 *
-*  Definition:
-*  ===========
+*           ==== KS points to the shifts. ====
 *
-*       DOUBLE PRECISION FUNCTION ZLANHS( NORM, N, A, LDA, WORK )
-* 
-*       .. Scalar Arguments ..
-*       CHARACTER          NORM
-*       INTEGER            LDA, N
-*       ..
-*       .. Array Arguments ..
-*       DOUBLE PRECISION   WORK( * )
-*       COMPLEX*16         A( LDA, * )
-*       ..
-*  
+            KS = KBOT - LS + 1
 *
-*> \par Purpose:
-*  =============
-*>
-*> \verbatim
-*>
-*> ZLANHS  returns the value of the one norm,  or the Frobenius norm, or
-*> the  infinity norm,  or the  element of  largest absolute value  of a
-*> Hessenberg matrix A.
-*> \endverbatim
-*>
-*> \return ZLANHS
-*> \verbatim
-*>
-*>    ZLANHS = ( max(abs(A(i,j))), NORM = 'M' or 'm'
-*>             (
-*>             ( norm1(A),         NORM = '1', 'O' or 'o'
-*>             (
-*>             ( normI(A),         NORM = 'I' or 'i'
-*>             (
-*>             ( normF(A),         NORM = 'F', 'f', 'E' or 'e'
-*>
-*> where  norm1  denotes the  one norm of a matrix (maximum column sum),
-*> normI  denotes the  infinity norm  of a matrix  (maximum row sum) and
-*> normF  denotes the  Frobenius norm of a matrix (square root of sum of
-*> squares).  Note that  max(abs(A(i,j)))  is not a consistent matrix norm.
-*> \endverbatim
+*           ==== Skip an expensive QR sweep if there is a (partly
+*           .    heuristic) reason to expect that many eigenvalues
+*           .    will deflate without it.  Here, the QR sweep is
+*           .    skipped if many eigenvalues have just been deflated
+*           .    or if the remaining active block is small.
+*
+            IF( ( LD.EQ.0 ) .OR. ( ( 100*LD.LE.NW*NIBBLE ) .AND. ( KBOT-
+     $          KTOP+1.GT.MIN( NMIN, NWMAX ) ) ) ) THEN
+*
+*              ==== NS = nominal number of simultaneous shifts.
+*              .    This may be lowered (slightly) if ZLAQR3
+*              .    did not provide that many shifts. ====
+*
+               NS = MIN( NSMAX, NSR, MAX( 2, KBOT-KTOP ) )
+               NS = NS - MOD( NS, 2 )
+*
+*              ==== If there have been no deflations
+*              .    in a multiple of KEXSH iterations,
+*              .    then try exceptional shifts.
+*              .    Otherwise use shifts provided by
+*              .    ZLAQR3 above or from the eigenvalues
+*              .    of a trailing principal submatrix. ====
+*
+               IF( MOD( NDFL, KEXSH ).EQ.0 ) THEN
+                  KS = KBOT - NS + 1
+                  DO 30 I = KBOT, KS + 1, -2
+                     W( I ) = H( I, I ) + WILK1*CABS1( H( I, I-1 ) )
+                     W( I-1 ) = W( I )
+   30             CONTINUE
+               ELSE
 *
-*  Arguments:
-*  ==========
+*                 ==== Got NS/2 or fewer shifts? Use ZLAQR4 or
+*                 .    ZLAHQR on a trailing principal submatrix to
+*                 .    get more. (Since NS.LE.NSMAX.LE.(N+6)/9,
+*                 .    there is enough space below the subdiagonal
+*                 .    to fit an NS-by-NS scratch array.) ====
 *
-*> \param[in] NORM
-*> \verbatim
-*>          NORM is CHARACTER*1
-*>          Specifies the value to be returned in ZLANHS as described
-*>          above.
-*> \endverbatim
-*>
-*> \param[in] N
-*> \verbatim
-*>          N is INTEGER
-*>          The order of the matrix A.  N >= 0.  When N = 0, ZLANHS is
-*>          set to zero.
-*> \endverbatim
-*>
-*> \param[in] A
-*> \verbatim
-*>          A is COMPLEX*16 array, dimension (LDA,N)
-*>          The n by n upper Hessenberg matrix A; the part of A below the
-*>          first sub-diagonal is not referenced.
-*> \endverbatim
-*>
-*> \param[in] LDA
-*> \verbatim
-*>          LDA is INTEGER
-*>          The leading dimension of the array A.  LDA >= max(N,1).
-*> \endverbatim
-*>
-*> \param[out] WORK
-*> \verbatim
-*>          WORK is DOUBLE PRECISION array, dimension (MAX(1,LWORK)),
-*>          where LWORK >= N when NORM = 'I'; otherwise, WORK is not
-*>          referenced.
-*> \endverbatim
+                  IF( KBOT-KS+1.LE.NS / 2 ) THEN
+                     KS = KBOT - NS + 1
+                     KT = N - NS + 1
+                     CALL ZLACPY( 'A', NS, NS, H( KS, KS ), LDH,
+     $                            H( KT, 1 ), LDH )
+                     IF( NS.GT.NMIN ) THEN
+                        CALL ZLAQR4( .false., .false., NS, 1, NS,
+     $                               H( KT, 1 ), LDH, W( KS ), 1, 1,
+     $                               ZDUM, 1, WORK, LWORK, INF )
+                     ELSE
+                        CALL ZLAHQR( .false., .false., NS, 1, NS,
+     $                               H( KT, 1 ), LDH, W( KS ), 1, 1,
+     $                               ZDUM, 1, INF )
+                     END IF
+                     KS = KS + INF
 *
-*  Authors:
-*  ========
+*                    ==== In case of a rare QR failure use
+*                    .    eigenvalues of the trailing 2-by-2
+*                    .    principal submatrix.  Scale to avoid
+*                    .    overflows, underflows and subnormals.
+*                    .    (The scale factor S can not be zero,
+*                    .    because H(KBOT,KBOT-1) is nonzero.) ====
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+                     IF( KS.GE.KBOT ) THEN
+                        S = CABS1( H( KBOT-1, KBOT-1 ) ) +
+     $                      CABS1( H( KBOT, KBOT-1 ) ) +
+     $                      CABS1( H( KBOT-1, KBOT ) ) +
+     $                      CABS1( H( KBOT, KBOT ) )
+                        AA = H( KBOT-1, KBOT-1 ) / S
+                        CC = H( KBOT, KBOT-1 ) / S
+                        BB = H( KBOT-1, KBOT ) / S
+                        DD = H( KBOT, KBOT ) / S
+                        TR2 = ( AA+DD ) / TWO
+                        DET = ( AA-TR2 )*( DD-TR2 ) - BB*CC
+                        RTDISC = SQRT( -DET )
+                        W( KBOT-1 ) = ( TR2+RTDISC )*S
+                        W( KBOT ) = ( TR2-RTDISC )*S
 *
-*> \date September 2012
+                        KS = KBOT - 1
+                     END IF
+                  END IF
 *
-*> \ingroup complex16OTHERauxiliary
+                  IF( KBOT-KS+1.GT.NS ) THEN
 *
-*  =====================================================================
-      DOUBLE PRECISION FUNCTION ZLANHS( NORM, N, A, LDA, WORK )
+*                    ==== Sort the shifts (Helps a little) ====
 *
-*  -- LAPACK auxiliary routine (version 3.4.2) --
-*  -- LAPACK is a software package provided by Univ. of Tennessee,    --
-*  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     September 2012
+                     SORTED = .false.
+                     DO 50 K = KBOT, KS + 1, -1
+                        IF( SORTED )
+     $                     GO TO 60
+                        SORTED = .true.
+                        DO 40 I = KS, K - 1
+                           IF( CABS1( W( I ) ).LT.CABS1( W( I+1 ) ) )
+     $                          THEN
+                              SORTED = .false.
+                              SWAP = W( I )
+                              W( I ) = W( I+1 )
+                              W( I+1 ) = SWAP
+                           END IF
+   40                   CONTINUE
+   50                CONTINUE
+   60                CONTINUE
+                  END IF
+               END IF
 *
-*     .. Scalar Arguments ..
-      CHARACTER          NORM
-      INTEGER            LDA, N
-*     ..
-*     .. Array Arguments ..
-      DOUBLE PRECISION   WORK( * )
-      COMPLEX*16         A( LDA, * )
-*     ..
+*              ==== If there are only two shifts, then use
+*              .    only one.  ====
 *
-* =====================================================================
+               IF( KBOT-KS+1.EQ.2 ) THEN
+                  IF( CABS1( W( KBOT )-H( KBOT, KBOT ) ).LT.
+     $                CABS1( W( KBOT-1 )-H( KBOT, KBOT ) ) ) THEN
+                     W( KBOT-1 ) = W( KBOT )
+                  ELSE
+                     W( KBOT ) = W( KBOT-1 )
+                  END IF
+               END IF
 *
-*     .. Parameters ..
-      DOUBLE PRECISION   ONE, ZERO
-      PARAMETER          ( ONE = 1.0D+0, ZERO = 0.0D+0 )
-*     ..
-*     .. Local Scalars ..
-      INTEGER            I, J
-      DOUBLE PRECISION   SCALE, SUM, VALUE
-*     ..
-*     .. External Functions ..
-      LOGICAL            LSAME, DISNAN
-      EXTERNAL           LSAME, DISNAN
-*     ..
-*     .. External Subroutines ..
-      EXTERNAL           ZLASSQ
-*     ..
-*     .. Intrinsic Functions ..
-      INTRINSIC          ABS, MIN, SQRT
-*     ..
-*     .. Executable Statements ..
+*              ==== Use up to NS of the the smallest magnatiude
+*              .    shifts.  If there aren't NS shifts available,
+*              .    then use them all, possibly dropping one to
+*              .    make the number of shifts even. ====
 *
-      IF( N.EQ.0 ) THEN
-         VALUE = ZERO
-      ELSE IF( LSAME( NORM, 'M' ) ) THEN
+               NS = MIN( NS, KBOT-KS+1 )
+               NS = NS - MOD( NS, 2 )
+               KS = KBOT - NS + 1
 *
-*        Find max(abs(A(i,j))).
+*              ==== Small-bulge multi-shift QR sweep:
+*              .    split workspace under the subdiagonal into
+*              .    - a KDU-by-KDU work array U in the lower
+*              .      left-hand-corner,
+*              .    - a KDU-by-at-least-KDU-but-more-is-better
+*              .      (KDU-by-NHo) horizontal work array WH along
+*              .      the bottom edge,
+*              .    - and an at-least-KDU-but-more-is-better-by-KDU
+*              .      (NVE-by-KDU) vertical work WV arrow along
+*              .      the left-hand-edge. ====
 *
-         VALUE = ZERO
-         DO 20 J = 1, N
-            DO 10 I = 1, MIN( N, J+1 )
-               SUM = ABS( A( I, J ) )
-               IF( VALUE .LT. SUM .OR. DISNAN( SUM ) ) VALUE = SUM
-   10       CONTINUE
-   20    CONTINUE
-      ELSE IF( ( LSAME( NORM, 'O' ) ) .OR. ( NORM.EQ.'1' ) ) THEN
+               KDU = 3*NS - 3
+               KU = N - KDU + 1
+               KWH = KDU + 1
+               NHO = ( N-KDU+1-4 ) - ( KDU+1 ) + 1
+               KWV = KDU + 4
+               NVE = N - KDU - KWV + 1
 *
-*        Find norm1(A).
+*              ==== Small-bulge multi-shift QR sweep ====
 *
-         VALUE = ZERO
-         DO 40 J = 1, N
-            SUM = ZERO
-            DO 30 I = 1, MIN( N, J+1 )
-               SUM = SUM + ABS( A( I, J ) )
-   30       CONTINUE
-            IF( VALUE .LT. SUM .OR. DISNAN( SUM ) ) VALUE = SUM
-   40    CONTINUE
-      ELSE IF( LSAME( NORM, 'I' ) ) THEN
+               CALL ZLAQR5( WANTT, WANTZ, KACC22, N, KTOP, KBOT, NS,
+     $                      W( KS ), H, LDH, ILOZ, IHIZ, Z, LDZ, WORK,
+     $                      3, H( KU, 1 ), LDH, NVE, H( KWV, 1 ), LDH,
+     $                      NHO, H( KU, KWH ), LDH )
+            END IF
 *
-*        Find normI(A).
+*           ==== Note progress (or the lack of it). ====
 *
-         DO 50 I = 1, N
-            WORK( I ) = ZERO
-   50    CONTINUE
-         DO 70 J = 1, N
-            DO 60 I = 1, MIN( N, J+1 )
-               WORK( I ) = WORK( I ) + ABS( A( I, J ) )
-   60       CONTINUE
+            IF( LD.GT.0 ) THEN
+               NDFL = 1
+            ELSE
+               NDFL = NDFL + 1
+            END IF
+*
+*           ==== End of main loop ====
    70    CONTINUE
-         VALUE = ZERO
-         DO 80 I = 1, N
-            SUM = WORK( I )
-            IF( VALUE .LT. SUM .OR. DISNAN( SUM ) ) VALUE = SUM
-   80    CONTINUE
-      ELSE IF( ( LSAME( NORM, 'F' ) ) .OR. ( LSAME( NORM, 'E' ) ) ) THEN
 *
-*        Find normF(A).
+*        ==== Iteration limit exceeded.  Set INFO to show where
+*        .    the problem occurred and exit. ====
 *
-         SCALE = ZERO
-         SUM = ONE
-         DO 90 J = 1, N
-            CALL ZLASSQ( MIN( N, J+1 ), A( 1, J ), 1, SCALE, SUM )
-   90    CONTINUE
-         VALUE = SCALE*SQRT( SUM )
+         INFO = KBOT
+   80    CONTINUE
       END IF
 *
-      ZLANHS = VALUE
-      RETURN
+*     ==== Return the optimal value of LWORK. ====
 *
-*     End of ZLANHS
+      WORK( 1 ) = DCMPLX( LWKOPT, 0 )
+*
+*     ==== End of ZLAQR0 ====
 *
       END
-*> \brief \b ZLANTR returns the value of the 1-norm, or the Frobenius norm, or the infinity norm, or the element of largest absolute value of a trapezoidal or triangular matrix.
+*> \brief \b ZLAQR1 sets a scalar multiple of the first column of the product of 2-by-2 or 3-by-3 matrix H and specified shifts.
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download ZLANTR + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/zlantr.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/zlantr.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/zlantr.f"> 
+*> Download ZLAQR1 + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/zlaqr1.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/zlaqr1.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/zlaqr1.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
-*       DOUBLE PRECISION FUNCTION ZLANTR( NORM, UPLO, DIAG, M, N, A, LDA,
-*                        WORK )
-* 
+*       SUBROUTINE ZLAQR1( N, H, LDH, S1, S2, V )
+*
 *       .. Scalar Arguments ..
-*       CHARACTER          DIAG, NORM, UPLO
-*       INTEGER            LDA, M, N
+*       COMPLEX*16         S1, S2
+*       INTEGER            LDH, N
 *       ..
 *       .. Array Arguments ..
-*       DOUBLE PRECISION   WORK( * )
-*       COMPLEX*16         A( LDA, * )
+*       COMPLEX*16         H( LDH, * ), V( * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
 *>
 *> \verbatim
 *>
-*> ZLANTR  returns the value of the one norm,  or the Frobenius norm, or
-*> the  infinity norm,  or the  element of  largest absolute value  of a
-*> trapezoidal or triangular matrix A.
-*> \endverbatim
+*>      Given a 2-by-2 or 3-by-3 matrix H, ZLAQR1 sets v to a
+*>      scalar multiple of the first column of the product
 *>
-*> \return ZLANTR
-*> \verbatim
+*>      (*)  K = (H - s1*I)*(H - s2*I)
 *>
-*>    ZLANTR = ( max(abs(A(i,j))), NORM = 'M' or 'm'
-*>             (
-*>             ( norm1(A),         NORM = '1', 'O' or 'o'
-*>             (
-*>             ( normI(A),         NORM = 'I' or 'i'
-*>             (
-*>             ( normF(A),         NORM = 'F', 'f', 'E' or 'e'
+*>      scaling to avoid overflows and most underflows.
 *>
-*> where  norm1  denotes the  one norm of a matrix (maximum column sum),
-*> normI  denotes the  infinity norm  of a matrix  (maximum row sum) and
-*> normF  denotes the  Frobenius norm of a matrix (square root of sum of
-*> squares).  Note that  max(abs(A(i,j)))  is not a consistent matrix norm.
+*>      This is useful for starting double implicit shift bulges
+*>      in the QR algorithm.
 *> \endverbatim
 *
 *  Arguments:
 *  ==========
 *
-*> \param[in] NORM
-*> \verbatim
-*>          NORM is CHARACTER*1
-*>          Specifies the value to be returned in ZLANTR as described
-*>          above.
-*> \endverbatim
-*>
-*> \param[in] UPLO
+*> \param[in] N
 *> \verbatim
-*>          UPLO is CHARACTER*1
-*>          Specifies whether the matrix A is upper or lower trapezoidal.
-*>          = 'U':  Upper trapezoidal
-*>          = 'L':  Lower trapezoidal
-*>          Note that A is triangular instead of trapezoidal if M = N.
+*>          N is integer
+*>              Order of the matrix H. N must be either 2 or 3.
 *> \endverbatim
 *>
-*> \param[in] DIAG
+*> \param[in] H
 *> \verbatim
-*>          DIAG is CHARACTER*1
-*>          Specifies whether or not the matrix A has unit diagonal.
-*>          = 'N':  Non-unit diagonal
-*>          = 'U':  Unit diagonal
+*>          H is COMPLEX*16 array of dimension (LDH,N)
+*>              The 2-by-2 or 3-by-3 matrix H in (*).
 *> \endverbatim
 *>
-*> \param[in] M
+*> \param[in] LDH
 *> \verbatim
-*>          M is INTEGER
-*>          The number of rows of the matrix A.  M >= 0, and if
-*>          UPLO = 'U', M <= N.  When M = 0, ZLANTR is set to zero.
+*>          LDH is integer
+*>              The leading dimension of H as declared in
+*>              the calling procedure.  LDH.GE.N
 *> \endverbatim
 *>
-*> \param[in] N
+*> \param[in] S1
 *> \verbatim
-*>          N is INTEGER
-*>          The number of columns of the matrix A.  N >= 0, and if
-*>          UPLO = 'L', N <= M.  When N = 0, ZLANTR is set to zero.
+*>          S1 is COMPLEX*16
 *> \endverbatim
 *>
-*> \param[in] A
+*> \param[in] S2
 *> \verbatim
-*>          A is COMPLEX*16 array, dimension (LDA,N)
-*>          The trapezoidal matrix A (A is triangular if M = N).
-*>          If UPLO = 'U', the leading m by n upper trapezoidal part of
-*>          the array A contains the upper trapezoidal matrix, and the
-*>          strictly lower triangular part of A is not referenced.
-*>          If UPLO = 'L', the leading m by n lower trapezoidal part of
-*>          the array A contains the lower trapezoidal matrix, and the
-*>          strictly upper triangular part of A is not referenced.  Note
-*>          that when DIAG = 'U', the diagonal elements of A are not
-*>          referenced and are assumed to be one.
-*> \endverbatim
+*>          S2 is COMPLEX*16
 *>
-*> \param[in] LDA
-*> \verbatim
-*>          LDA is INTEGER
-*>          The leading dimension of the array A.  LDA >= max(M,1).
+*>          S1 and S2 are the shifts defining K in (*) above.
 *> \endverbatim
 *>
-*> \param[out] WORK
+*> \param[out] V
 *> \verbatim
-*>          WORK is DOUBLE PRECISION array, dimension (MAX(1,LWORK)),
-*>          where LWORK >= M when NORM = 'I'; otherwise, WORK is not
-*>          referenced.
+*>          V is COMPLEX*16 array of dimension N
+*>              A scalar multiple of the first column of the
+*>              matrix K in (*).
 *> \endverbatim
 *
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date September 2012
+*> \date December 2016
 *
 *> \ingroup complex16OTHERauxiliary
 *
+*> \par Contributors:
+*  ==================
+*>
+*>       Karen Braman and Ralph Byers, Department of Mathematics,
+*>       University of Kansas, USA
+*>
 *  =====================================================================
-      DOUBLE PRECISION FUNCTION ZLANTR( NORM, UPLO, DIAG, M, N, A, LDA,
-     $                 WORK )
+      SUBROUTINE ZLAQR1( N, H, LDH, S1, S2, V )
 *
-*  -- LAPACK auxiliary routine (version 3.4.2) --
+*  -- LAPACK auxiliary routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     September 2012
+*     December 2016
 *
 *     .. Scalar Arguments ..
-      CHARACTER          DIAG, NORM, UPLO
-      INTEGER            LDA, M, N
+      COMPLEX*16         S1, S2
+      INTEGER            LDH, N
 *     ..
 *     .. Array Arguments ..
-      DOUBLE PRECISION   WORK( * )
-      COMPLEX*16         A( LDA, * )
+      COMPLEX*16         H( LDH, * ), V( * )
 *     ..
 *
-* =====================================================================
+*  ================================================================
 *
 *     .. Parameters ..
-      DOUBLE PRECISION   ONE, ZERO
-      PARAMETER          ( ONE = 1.0D+0, ZERO = 0.0D+0 )
+      COMPLEX*16         ZERO
+      PARAMETER          ( ZERO = ( 0.0d0, 0.0d0 ) )
+      DOUBLE PRECISION   RZERO
+      PARAMETER          ( RZERO = 0.0d0 )
 *     ..
 *     .. Local Scalars ..
-      LOGICAL            UDIAG
-      INTEGER            I, J
-      DOUBLE PRECISION   SCALE, SUM, VALUE
+      COMPLEX*16         CDUM, H21S, H31S
+      DOUBLE PRECISION   S
 *     ..
-*     .. External Functions ..
-      LOGICAL            LSAME, DISNAN
-      EXTERNAL           LSAME, DISNAN
+*     .. Intrinsic Functions ..
+      INTRINSIC          ABS, DBLE, DIMAG
 *     ..
-*     .. External Subroutines ..
-      EXTERNAL           ZLASSQ
+*     .. Statement Functions ..
+      DOUBLE PRECISION   CABS1
 *     ..
-*     .. Intrinsic Functions ..
-      INTRINSIC          ABS, MIN, SQRT
+*     .. Statement Function definitions ..
+      CABS1( CDUM ) = ABS( DBLE( CDUM ) ) + ABS( DIMAG( CDUM ) )
 *     ..
 *     .. Executable Statements ..
-*
-      IF( MIN( M, N ).EQ.0 ) THEN
-         VALUE = ZERO
-      ELSE IF( LSAME( NORM, 'M' ) ) THEN
-*
-*        Find max(abs(A(i,j))).
-*
-         IF( LSAME( DIAG, 'U' ) ) THEN
-            VALUE = ONE
-            IF( LSAME( UPLO, 'U' ) ) THEN
-               DO 20 J = 1, N
-                  DO 10 I = 1, MIN( M, J-1 )
-                     SUM = ABS( A( I, J ) )
-                     IF( VALUE .LT. SUM .OR. DISNAN( SUM ) ) VALUE = SUM
-   10             CONTINUE
-   20          CONTINUE
-            ELSE
-               DO 40 J = 1, N
-                  DO 30 I = J + 1, M
-                     SUM = ABS( A( I, J ) )
-                     IF( VALUE .LT. SUM .OR. DISNAN( SUM ) ) VALUE = SUM
-   30             CONTINUE
-   40          CONTINUE
-            END IF
-         ELSE
-            VALUE = ZERO
-            IF( LSAME( UPLO, 'U' ) ) THEN
-               DO 60 J = 1, N
-                  DO 50 I = 1, MIN( M, J )
-                     SUM = ABS( A( I, J ) )
-                     IF( VALUE .LT. SUM .OR. DISNAN( SUM ) ) VALUE = SUM
-   50             CONTINUE
-   60          CONTINUE
-            ELSE
-               DO 80 J = 1, N
-                  DO 70 I = J, M
-                     SUM = ABS( A( I, J ) )
-                     IF( VALUE .LT. SUM .OR. DISNAN( SUM ) ) VALUE = SUM
-   70             CONTINUE
-   80          CONTINUE
-            END IF
-         END IF
-      ELSE IF( ( LSAME( NORM, 'O' ) ) .OR. ( NORM.EQ.'1' ) ) THEN
-*
-*        Find norm1(A).
-*
-         VALUE = ZERO
-         UDIAG = LSAME( DIAG, 'U' )
-         IF( LSAME( UPLO, 'U' ) ) THEN
-            DO 110 J = 1, N
-               IF( ( UDIAG ) .AND. ( J.LE.M ) ) THEN
-                  SUM = ONE
-                  DO 90 I = 1, J - 1
-                     SUM = SUM + ABS( A( I, J ) )
-   90             CONTINUE
-               ELSE
-                  SUM = ZERO
-                  DO 100 I = 1, MIN( M, J )
-                     SUM = SUM + ABS( A( I, J ) )
-  100             CONTINUE
-               END IF
-               IF( VALUE .LT. SUM .OR. DISNAN( SUM ) ) VALUE = SUM
-  110       CONTINUE
-         ELSE
-            DO 140 J = 1, N
-               IF( UDIAG ) THEN
-                  SUM = ONE
-                  DO 120 I = J + 1, M
-                     SUM = SUM + ABS( A( I, J ) )
-  120             CONTINUE
-               ELSE
-                  SUM = ZERO
-                  DO 130 I = J, M
-                     SUM = SUM + ABS( A( I, J ) )
-  130             CONTINUE
-               END IF
-               IF( VALUE .LT. SUM .OR. DISNAN( SUM ) ) VALUE = SUM
-  140       CONTINUE
-         END IF
-      ELSE IF( LSAME( NORM, 'I' ) ) THEN
-*
-*        Find normI(A).
-*
-         IF( LSAME( UPLO, 'U' ) ) THEN
-            IF( LSAME( DIAG, 'U' ) ) THEN
-               DO 150 I = 1, M
-                  WORK( I ) = ONE
-  150          CONTINUE
-               DO 170 J = 1, N
-                  DO 160 I = 1, MIN( M, J-1 )
-                     WORK( I ) = WORK( I ) + ABS( A( I, J ) )
-  160             CONTINUE
-  170          CONTINUE
-            ELSE
-               DO 180 I = 1, M
-                  WORK( I ) = ZERO
-  180          CONTINUE
-               DO 200 J = 1, N
-                  DO 190 I = 1, MIN( M, J )
-                     WORK( I ) = WORK( I ) + ABS( A( I, J ) )
-  190             CONTINUE
-  200          CONTINUE
-            END IF
-         ELSE
-            IF( LSAME( DIAG, 'U' ) ) THEN
-               DO 210 I = 1, N
-                  WORK( I ) = ONE
-  210          CONTINUE
-               DO 220 I = N + 1, M
-                  WORK( I ) = ZERO
-  220          CONTINUE
-               DO 240 J = 1, N
-                  DO 230 I = J + 1, M
-                     WORK( I ) = WORK( I ) + ABS( A( I, J ) )
-  230             CONTINUE
-  240          CONTINUE
-            ELSE
-               DO 250 I = 1, M
-                  WORK( I ) = ZERO
-  250          CONTINUE
-               DO 270 J = 1, N
-                  DO 260 I = J, M
-                     WORK( I ) = WORK( I ) + ABS( A( I, J ) )
-  260             CONTINUE
-  270          CONTINUE
-            END IF
+      IF( N.EQ.2 ) THEN
+         S = CABS1( H( 1, 1 )-S2 ) + CABS1( H( 2, 1 ) )
+         IF( S.EQ.RZERO ) THEN
+            V( 1 ) = ZERO
+            V( 2 ) = ZERO
+         ELSE
+            H21S = H( 2, 1 ) / S
+            V( 1 ) = H21S*H( 1, 2 ) + ( H( 1, 1 )-S1 )*
+     $               ( ( H( 1, 1 )-S2 ) / S )
+            V( 2 ) = H21S*( H( 1, 1 )+H( 2, 2 )-S1-S2 )
          END IF
-         VALUE = ZERO
-         DO 280 I = 1, M
-            SUM = WORK( I )
-            IF( VALUE .LT. SUM .OR. DISNAN( SUM ) ) VALUE = SUM
-  280    CONTINUE
-      ELSE IF( ( LSAME( NORM, 'F' ) ) .OR. ( LSAME( NORM, 'E' ) ) ) THEN
-*
-*        Find normF(A).
-*
-         IF( LSAME( UPLO, 'U' ) ) THEN
-            IF( LSAME( DIAG, 'U' ) ) THEN
-               SCALE = ONE
-               SUM = MIN( M, N )
-               DO 290 J = 2, N
-                  CALL ZLASSQ( MIN( M, J-1 ), A( 1, J ), 1, SCALE, SUM )
-  290          CONTINUE
-            ELSE
-               SCALE = ZERO
-               SUM = ONE
-               DO 300 J = 1, N
-                  CALL ZLASSQ( MIN( M, J ), A( 1, J ), 1, SCALE, SUM )
-  300          CONTINUE
-            END IF
+      ELSE
+         S = CABS1( H( 1, 1 )-S2 ) + CABS1( H( 2, 1 ) ) +
+     $       CABS1( H( 3, 1 ) )
+         IF( S.EQ.ZERO ) THEN
+            V( 1 ) = ZERO
+            V( 2 ) = ZERO
+            V( 3 ) = ZERO
          ELSE
-            IF( LSAME( DIAG, 'U' ) ) THEN
-               SCALE = ONE
-               SUM = MIN( M, N )
-               DO 310 J = 1, N
-                  CALL ZLASSQ( M-J, A( MIN( M, J+1 ), J ), 1, SCALE,
-     $                         SUM )
-  310          CONTINUE
-            ELSE
-               SCALE = ZERO
-               SUM = ONE
-               DO 320 J = 1, N
-                  CALL ZLASSQ( M-J+1, A( J, J ), 1, SCALE, SUM )
-  320          CONTINUE
-            END IF
+            H21S = H( 2, 1 ) / S
+            H31S = H( 3, 1 ) / S
+            V( 1 ) = ( H( 1, 1 )-S1 )*( ( H( 1, 1 )-S2 ) / S ) +
+     $               H( 1, 2 )*H21S + H( 1, 3 )*H31S
+            V( 2 ) = H21S*( H( 1, 1 )+H( 2, 2 )-S1-S2 ) + H( 2, 3 )*H31S
+            V( 3 ) = H31S*( H( 1, 1 )+H( 3, 3 )-S1-S2 ) + H21S*H( 3, 2 )
          END IF
-         VALUE = SCALE*SQRT( SUM )
       END IF
-*
-      ZLANTR = VALUE
-      RETURN
-*
-*     End of ZLANTR
-*
       END
-*> \brief \b ZLAQP2 computes a QR factorization with column pivoting of the matrix block.
+*> \brief \b ZLAQR2 performs the unitary similarity transformation of a Hessenberg matrix to detect and deflate fully converged eigenvalues from a trailing principal submatrix (aggressive early deflation).
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download ZLAQP2 + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/zlaqp2.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/zlaqp2.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/zlaqp2.f"> 
+*> Download ZLAQR2 + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/zlaqr2.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/zlaqr2.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/zlaqr2.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
-*       SUBROUTINE ZLAQP2( M, N, OFFSET, A, LDA, JPVT, TAU, VN1, VN2,
-*                          WORK )
-* 
+*       SUBROUTINE ZLAQR2( WANTT, WANTZ, N, KTOP, KBOT, NW, H, LDH, ILOZ,
+*                          IHIZ, Z, LDZ, NS, ND, SH, V, LDV, NH, T, LDT,
+*                          NV, WV, LDWV, WORK, LWORK )
+*
 *       .. Scalar Arguments ..
-*       INTEGER            LDA, M, N, OFFSET
+*       INTEGER            IHIZ, ILOZ, KBOT, KTOP, LDH, LDT, LDV, LDWV,
+*      $                   LDZ, LWORK, N, ND, NH, NS, NV, NW
+*       LOGICAL            WANTT, WANTZ
 *       ..
 *       .. Array Arguments ..
-*       INTEGER            JPVT( * )
-*       DOUBLE PRECISION   VN1( * ), VN2( * )
-*       COMPLEX*16         A( LDA, * ), TAU( * ), WORK( * )
+*       COMPLEX*16         H( LDH, * ), SH( * ), T( LDT, * ), V( LDV, * ),
+*      $                   WORK( * ), WV( LDWV, * ), Z( LDZ, * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
 *>
 *> \verbatim
 *>
-*> ZLAQP2 computes a QR factorization with column pivoting of
-*> the block A(OFFSET+1:M,1:N).
-*> The block A(1:OFFSET,1:N) is accordingly pivoted, but not factorized.
+*>    ZLAQR2 is identical to ZLAQR3 except that it avoids
+*>    recursion by calling ZLAHQR instead of ZLAQR4.
+*>
+*>    Aggressive early deflation:
+*>
+*>    ZLAQR2 accepts as input an upper Hessenberg matrix
+*>    H and performs an unitary similarity transformation
+*>    designed to detect and deflate fully converged eigenvalues from
+*>    a trailing principal submatrix.  On output H has been over-
+*>    written by a new Hessenberg matrix that is a perturbation of
+*>    an unitary similarity transformation of H.  It is to be
+*>    hoped that the final version of H has many zero subdiagonal
+*>    entries.
+*>
 *> \endverbatim
 *
 *  Arguments:
 *  ==========
 *
-*> \param[in] M
+*> \param[in] WANTT
 *> \verbatim
-*>          M is INTEGER
-*>          The number of rows of the matrix A. M >= 0.
+*>          WANTT is LOGICAL
+*>          If .TRUE., then the Hessenberg matrix H is fully updated
+*>          so that the triangular Schur factor may be
+*>          computed (in cooperation with the calling subroutine).
+*>          If .FALSE., then only enough of H is updated to preserve
+*>          the eigenvalues.
+*> \endverbatim
+*>
+*> \param[in] WANTZ
+*> \verbatim
+*>          WANTZ is LOGICAL
+*>          If .TRUE., then the unitary matrix Z is updated so
+*>          so that the unitary Schur factor may be computed
+*>          (in cooperation with the calling subroutine).
+*>          If .FALSE., then Z is not referenced.
 *> \endverbatim
 *>
 *> \param[in] N
 *> \verbatim
 *>          N is INTEGER
-*>          The number of columns of the matrix A. N >= 0.
+*>          The order of the matrix H and (if WANTZ is .TRUE.) the
+*>          order of the unitary matrix Z.
 *> \endverbatim
 *>
-*> \param[in] OFFSET
+*> \param[in] KTOP
 *> \verbatim
-*>          OFFSET is INTEGER
-*>          The number of rows of the matrix A that must be pivoted
-*>          but no factorized. OFFSET >= 0.
+*>          KTOP is INTEGER
+*>          It is assumed that either KTOP = 1 or H(KTOP,KTOP-1)=0.
+*>          KBOT and KTOP together determine an isolated block
+*>          along the diagonal of the Hessenberg matrix.
 *> \endverbatim
 *>
-*> \param[in,out] A
+*> \param[in] KBOT
 *> \verbatim
-*>          A is COMPLEX*16 array, dimension (LDA,N)
-*>          On entry, the M-by-N matrix A.
-*>          On exit, the upper triangle of block A(OFFSET+1:M,1:N) is
-*>          the triangular factor obtained; the elements in block
-*>          A(OFFSET+1:M,1:N) below the diagonal, together with the
-*>          array TAU, represent the orthogonal matrix Q as a product of
-*>          elementary reflectors. Block A(1:OFFSET,1:N) has been
-*>          accordingly pivoted, but no factorized.
+*>          KBOT is INTEGER
+*>          It is assumed without a check that either
+*>          KBOT = N or H(KBOT+1,KBOT)=0.  KBOT and KTOP together
+*>          determine an isolated block along the diagonal of the
+*>          Hessenberg matrix.
 *> \endverbatim
 *>
-*> \param[in] LDA
+*> \param[in] NW
 *> \verbatim
-*>          LDA is INTEGER
-*>          The leading dimension of the array A. LDA >= max(1,M).
+*>          NW is INTEGER
+*>          Deflation window size.  1 .LE. NW .LE. (KBOT-KTOP+1).
 *> \endverbatim
 *>
-*> \param[in,out] JPVT
+*> \param[in,out] H
 *> \verbatim
-*>          JPVT is INTEGER array, dimension (N)
-*>          On entry, if JPVT(i) .ne. 0, the i-th column of A is permuted
-*>          to the front of A*P (a leading column); if JPVT(i) = 0,
-*>          the i-th column of A is a free column.
-*>          On exit, if JPVT(i) = k, then the i-th column of A*P
-*>          was the k-th column of A.
+*>          H is COMPLEX*16 array, dimension (LDH,N)
+*>          On input the initial N-by-N section of H stores the
+*>          Hessenberg matrix undergoing aggressive early deflation.
+*>          On output H has been transformed by a unitary
+*>          similarity transformation, perturbed, and the returned
+*>          to Hessenberg form that (it is to be hoped) has some
+*>          zero subdiagonal entries.
 *> \endverbatim
 *>
-*> \param[out] TAU
+*> \param[in] LDH
 *> \verbatim
-*>          TAU is COMPLEX*16 array, dimension (min(M,N))
-*>          The scalar factors of the elementary reflectors.
+*>          LDH is integer
+*>          Leading dimension of H just as declared in the calling
+*>          subroutine.  N .LE. LDH
 *> \endverbatim
 *>
-*> \param[in,out] VN1
+*> \param[in] ILOZ
 *> \verbatim
-*>          VN1 is DOUBLE PRECISION array, dimension (N)
-*>          The vector with the partial column norms.
+*>          ILOZ is INTEGER
 *> \endverbatim
 *>
-*> \param[in,out] VN2
+*> \param[in] IHIZ
 *> \verbatim
-*>          VN2 is DOUBLE PRECISION array, dimension (N)
-*>          The vector with the exact column norms.
+*>          IHIZ is INTEGER
+*>          Specify the rows of Z to which transformations must be
+*>          applied if WANTZ is .TRUE.. 1 .LE. ILOZ .LE. IHIZ .LE. N.
+*> \endverbatim
+*>
+*> \param[in,out] Z
+*> \verbatim
+*>          Z is COMPLEX*16 array, dimension (LDZ,N)
+*>          IF WANTZ is .TRUE., then on output, the unitary
+*>          similarity transformation mentioned above has been
+*>          accumulated into Z(ILOZ:IHIZ,ILOZ:IHIZ) from the right.
+*>          If WANTZ is .FALSE., then Z is unreferenced.
+*> \endverbatim
+*>
+*> \param[in] LDZ
+*> \verbatim
+*>          LDZ is integer
+*>          The leading dimension of Z just as declared in the
+*>          calling subroutine.  1 .LE. LDZ.
+*> \endverbatim
+*>
+*> \param[out] NS
+*> \verbatim
+*>          NS is integer
+*>          The number of unconverged (ie approximate) eigenvalues
+*>          returned in SR and SI that may be used as shifts by the
+*>          calling subroutine.
+*> \endverbatim
+*>
+*> \param[out] ND
+*> \verbatim
+*>          ND is integer
+*>          The number of converged eigenvalues uncovered by this
+*>          subroutine.
+*> \endverbatim
+*>
+*> \param[out] SH
+*> \verbatim
+*>          SH is COMPLEX*16 array, dimension KBOT
+*>          On output, approximate eigenvalues that may
+*>          be used for shifts are stored in SH(KBOT-ND-NS+1)
+*>          through SR(KBOT-ND).  Converged eigenvalues are
+*>          stored in SH(KBOT-ND+1) through SH(KBOT).
+*> \endverbatim
+*>
+*> \param[out] V
+*> \verbatim
+*>          V is COMPLEX*16 array, dimension (LDV,NW)
+*>          An NW-by-NW work array.
+*> \endverbatim
+*>
+*> \param[in] LDV
+*> \verbatim
+*>          LDV is integer scalar
+*>          The leading dimension of V just as declared in the
+*>          calling subroutine.  NW .LE. LDV
+*> \endverbatim
+*>
+*> \param[in] NH
+*> \verbatim
+*>          NH is integer scalar
+*>          The number of columns of T.  NH.GE.NW.
+*> \endverbatim
+*>
+*> \param[out] T
+*> \verbatim
+*>          T is COMPLEX*16 array, dimension (LDT,NW)
+*> \endverbatim
+*>
+*> \param[in] LDT
+*> \verbatim
+*>          LDT is integer
+*>          The leading dimension of T just as declared in the
+*>          calling subroutine.  NW .LE. LDT
+*> \endverbatim
+*>
+*> \param[in] NV
+*> \verbatim
+*>          NV is integer
+*>          The number of rows of work array WV available for
+*>          workspace.  NV.GE.NW.
+*> \endverbatim
+*>
+*> \param[out] WV
+*> \verbatim
+*>          WV is COMPLEX*16 array, dimension (LDWV,NW)
+*> \endverbatim
+*>
+*> \param[in] LDWV
+*> \verbatim
+*>          LDWV is integer
+*>          The leading dimension of W just as declared in the
+*>          calling subroutine.  NW .LE. LDV
 *> \endverbatim
 *>
 *> \param[out] WORK
 *> \verbatim
-*>          WORK is COMPLEX*16 array, dimension (N)
+*>          WORK is COMPLEX*16 array, dimension LWORK.
+*>          On exit, WORK(1) is set to an estimate of the optimal value
+*>          of LWORK for the given values of N, NW, KTOP and KBOT.
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*>          LWORK is integer
+*>          The dimension of the work array WORK.  LWORK = 2*NW
+*>          suffices, but greater efficiency may result from larger
+*>          values of LWORK.
+*>
+*>          If LWORK = -1, then a workspace query is assumed; ZLAQR2
+*>          only estimates the optimal workspace size for the given
+*>          values of N, NW, KTOP and KBOT.  The estimate is returned
+*>          in WORK(1).  No error message related to LWORK is issued
+*>          by XERBLA.  Neither H nor Z are accessed.
 *> \endverbatim
 *
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date September 2012
+*> \date December 2016
 *
 *> \ingroup complex16OTHERauxiliary
 *
 *> \par Contributors:
 *  ==================
 *>
-*>    G. Quintana-Orti, Depto. de Informatica, Universidad Jaime I, Spain
-*>    X. Sun, Computer Science Dept., Duke University, USA
-*> \n
-*>  Partial column norm updating strategy modified on April 2011
-*>    Z. Drmac and Z. Bujanovic, Dept. of Mathematics,
-*>    University of Zagreb, Croatia.
-*
-*> \par References:
-*  ================
+*>       Karen Braman and Ralph Byers, Department of Mathematics,
+*>       University of Kansas, USA
 *>
-*> LAPACK Working Note 176
-*
-*> \htmlonly
-*> <a href="http://www.netlib.org/lapack/lawnspdf/lawn176.pdf">[PDF]</a> 
-*> \endhtmlonly 
-*
 *  =====================================================================
-      SUBROUTINE ZLAQP2( M, N, OFFSET, A, LDA, JPVT, TAU, VN1, VN2,
-     $                   WORK )
+      SUBROUTINE ZLAQR2( WANTT, WANTZ, N, KTOP, KBOT, NW, H, LDH, ILOZ,
+     $                   IHIZ, Z, LDZ, NS, ND, SH, V, LDV, NH, T, LDT,
+     $                   NV, WV, LDWV, WORK, LWORK )
 *
-*  -- LAPACK auxiliary routine (version 3.4.2) --
+*  -- LAPACK auxiliary routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     September 2012
+*     December 2016
 *
 *     .. Scalar Arguments ..
-      INTEGER            LDA, M, N, OFFSET
+      INTEGER            IHIZ, ILOZ, KBOT, KTOP, LDH, LDT, LDV, LDWV,
+     $                   LDZ, LWORK, N, ND, NH, NS, NV, NW
+      LOGICAL            WANTT, WANTZ
 *     ..
 *     .. Array Arguments ..
-      INTEGER            JPVT( * )
-      DOUBLE PRECISION   VN1( * ), VN2( * )
-      COMPLEX*16         A( LDA, * ), TAU( * ), WORK( * )
+      COMPLEX*16         H( LDH, * ), SH( * ), T( LDT, * ), V( LDV, * ),
+     $                   WORK( * ), WV( LDWV, * ), Z( LDZ, * )
 *     ..
 *
-*  =====================================================================
+*  ================================================================
 *
 *     .. Parameters ..
-      DOUBLE PRECISION   ZERO, ONE
-      COMPLEX*16         CONE
-      PARAMETER          ( ZERO = 0.0D+0, ONE = 1.0D+0,
-     $                   CONE = ( 1.0D+0, 0.0D+0 ) )
+      COMPLEX*16         ZERO, ONE
+      PARAMETER          ( ZERO = ( 0.0d0, 0.0d0 ),
+     $                   ONE = ( 1.0d0, 0.0d0 ) )
+      DOUBLE PRECISION   RZERO, RONE
+      PARAMETER          ( RZERO = 0.0d0, RONE = 1.0d0 )
 *     ..
 *     .. Local Scalars ..
-      INTEGER            I, ITEMP, J, MN, OFFPI, PVT
-      DOUBLE PRECISION   TEMP, TEMP2, TOL3Z
-      COMPLEX*16         AII
+      COMPLEX*16         BETA, CDUM, S, TAU
+      DOUBLE PRECISION   FOO, SAFMAX, SAFMIN, SMLNUM, ULP
+      INTEGER            I, IFST, ILST, INFO, INFQR, J, JW, KCOL, KLN,
+     $                   KNT, KROW, KWTOP, LTOP, LWK1, LWK2, LWKOPT
+*     ..
+*     .. External Functions ..
+      DOUBLE PRECISION   DLAMCH
+      EXTERNAL           DLAMCH
 *     ..
 *     .. External Subroutines ..
-      EXTERNAL           ZLARF, ZLARFG, ZSWAP
+      EXTERNAL           DLABAD, ZCOPY, ZGEHRD, ZGEMM, ZLACPY, ZLAHQR,
+     $                   ZLARF, ZLARFG, ZLASET, ZTREXC, ZUNMHR
 *     ..
 *     .. Intrinsic Functions ..
-      INTRINSIC          ABS, DCONJG, MAX, MIN, SQRT
+      INTRINSIC          ABS, DBLE, DCMPLX, DCONJG, DIMAG, INT, MAX, MIN
 *     ..
-*     .. External Functions ..
-      INTEGER            IDAMAX
-      DOUBLE PRECISION   DLAMCH, DZNRM2
-      EXTERNAL           IDAMAX, DLAMCH, DZNRM2
+*     .. Statement Functions ..
+      DOUBLE PRECISION   CABS1
+*     ..
+*     .. Statement Function definitions ..
+      CABS1( CDUM ) = ABS( DBLE( CDUM ) ) + ABS( DIMAG( CDUM ) )
 *     ..
 *     .. Executable Statements ..
 *
-      MN = MIN( M-OFFSET, N )
-      TOL3Z = SQRT(DLAMCH('Epsilon'))
+*     ==== Estimate optimal workspace. ====
+*
+      JW = MIN( NW, KBOT-KTOP+1 )
+      IF( JW.LE.2 ) THEN
+         LWKOPT = 1
+      ELSE
+*
+*        ==== Workspace query call to ZGEHRD ====
+*
+         CALL ZGEHRD( JW, 1, JW-1, T, LDT, WORK, WORK, -1, INFO )
+         LWK1 = INT( WORK( 1 ) )
+*
+*        ==== Workspace query call to ZUNMHR ====
+*
+         CALL ZUNMHR( 'R', 'N', JW, JW, 1, JW-1, T, LDT, WORK, V, LDV,
+     $                WORK, -1, INFO )
+         LWK2 = INT( WORK( 1 ) )
+*
+*        ==== Optimal workspace ====
+*
+         LWKOPT = JW + MAX( LWK1, LWK2 )
+      END IF
+*
+*     ==== Quick return in case of workspace query. ====
+*
+      IF( LWORK.EQ.-1 ) THEN
+         WORK( 1 ) = DCMPLX( LWKOPT, 0 )
+         RETURN
+      END IF
+*
+*     ==== Nothing to do ...
+*     ... for an empty active block ... ====
+      NS = 0
+      ND = 0
+      WORK( 1 ) = ONE
+      IF( KTOP.GT.KBOT )
+     $   RETURN
+*     ... nor for an empty deflation window. ====
+      IF( NW.LT.1 )
+     $   RETURN
+*
+*     ==== Machine constants ====
+*
+      SAFMIN = DLAMCH( 'SAFE MINIMUM' )
+      SAFMAX = RONE / SAFMIN
+      CALL DLABAD( SAFMIN, SAFMAX )
+      ULP = DLAMCH( 'PRECISION' )
+      SMLNUM = SAFMIN*( DBLE( N ) / ULP )
+*
+*     ==== Setup deflation window ====
+*
+      JW = MIN( NW, KBOT-KTOP+1 )
+      KWTOP = KBOT - JW + 1
+      IF( KWTOP.EQ.KTOP ) THEN
+         S = ZERO
+      ELSE
+         S = H( KWTOP, KWTOP-1 )
+      END IF
+*
+      IF( KBOT.EQ.KWTOP ) THEN
+*
+*        ==== 1-by-1 deflation window: not much to do ====
+*
+         SH( KWTOP ) = H( KWTOP, KWTOP )
+         NS = 1
+         ND = 0
+         IF( CABS1( S ).LE.MAX( SMLNUM, ULP*CABS1( H( KWTOP,
+     $       KWTOP ) ) ) ) THEN
+            NS = 0
+            ND = 1
+            IF( KWTOP.GT.KTOP )
+     $         H( KWTOP, KWTOP-1 ) = ZERO
+         END IF
+         WORK( 1 ) = ONE
+         RETURN
+      END IF
+*
+*     ==== Convert to spike-triangular form.  (In case of a
+*     .    rare QR failure, this routine continues to do
+*     .    aggressive early deflation using that part of
+*     .    the deflation window that converged using INFQR
+*     .    here and there to keep track.) ====
+*
+      CALL ZLACPY( 'U', JW, JW, H( KWTOP, KWTOP ), LDH, T, LDT )
+      CALL ZCOPY( JW-1, H( KWTOP+1, KWTOP ), LDH+1, T( 2, 1 ), LDT+1 )
+*
+      CALL ZLASET( 'A', JW, JW, ZERO, ONE, V, LDV )
+      CALL ZLAHQR( .true., .true., JW, 1, JW, T, LDT, SH( KWTOP ), 1,
+     $             JW, V, LDV, INFQR )
+*
+*     ==== Deflation detection loop ====
+*
+      NS = JW
+      ILST = INFQR + 1
+      DO 10 KNT = INFQR + 1, JW
+*
+*        ==== Small spike tip deflation test ====
+*
+         FOO = CABS1( T( NS, NS ) )
+         IF( FOO.EQ.RZERO )
+     $      FOO = CABS1( S )
+         IF( CABS1( S )*CABS1( V( 1, NS ) ).LE.MAX( SMLNUM, ULP*FOO ) )
+     $        THEN
+*
+*           ==== One more converged eigenvalue ====
+*
+            NS = NS - 1
+         ELSE
+*
+*           ==== One undeflatable eigenvalue.  Move it up out of the
+*           .    way.   (ZTREXC can not fail in this case.) ====
+*
+            IFST = NS
+            CALL ZTREXC( 'V', JW, T, LDT, V, LDV, IFST, ILST, INFO )
+            ILST = ILST + 1
+         END IF
+   10 CONTINUE
+*
+*        ==== Return to Hessenberg form ====
+*
+      IF( NS.EQ.0 )
+     $   S = ZERO
+*
+      IF( NS.LT.JW ) THEN
+*
+*        ==== sorting the diagonal of T improves accuracy for
+*        .    graded matrices.  ====
+*
+         DO 30 I = INFQR + 1, NS
+            IFST = I
+            DO 20 J = I + 1, NS
+               IF( CABS1( T( J, J ) ).GT.CABS1( T( IFST, IFST ) ) )
+     $            IFST = J
+   20       CONTINUE
+            ILST = I
+            IF( IFST.NE.ILST )
+     $         CALL ZTREXC( 'V', JW, T, LDT, V, LDV, IFST, ILST, INFO )
+   30    CONTINUE
+      END IF
+*
+*     ==== Restore shift/eigenvalue array from T ====
+*
+      DO 40 I = INFQR + 1, JW
+         SH( KWTOP+I-1 ) = T( I, I )
+   40 CONTINUE
+*
+*
+      IF( NS.LT.JW .OR. S.EQ.ZERO ) THEN
+         IF( NS.GT.1 .AND. S.NE.ZERO ) THEN
+*
+*           ==== Reflect spike back into lower triangle ====
+*
+            CALL ZCOPY( NS, V, LDV, WORK, 1 )
+            DO 50 I = 1, NS
+               WORK( I ) = DCONJG( WORK( I ) )
+   50       CONTINUE
+            BETA = WORK( 1 )
+            CALL ZLARFG( NS, BETA, WORK( 2 ), 1, TAU )
+            WORK( 1 ) = ONE
+*
+            CALL ZLASET( 'L', JW-2, JW-2, ZERO, ZERO, T( 3, 1 ), LDT )
 *
-*     Compute factorization.
+            CALL ZLARF( 'L', NS, JW, WORK, 1, DCONJG( TAU ), T, LDT,
+     $                  WORK( JW+1 ) )
+            CALL ZLARF( 'R', NS, NS, WORK, 1, TAU, T, LDT,
+     $                  WORK( JW+1 ) )
+            CALL ZLARF( 'R', JW, NS, WORK, 1, TAU, V, LDV,
+     $                  WORK( JW+1 ) )
 *
-      DO 20 I = 1, MN
+            CALL ZGEHRD( JW, 1, NS, T, LDT, WORK, WORK( JW+1 ),
+     $                   LWORK-JW, INFO )
+         END IF
 *
-         OFFPI = OFFSET + I
+*        ==== Copy updated reduced window into place ====
 *
-*        Determine ith pivot column and swap if necessary.
+         IF( KWTOP.GT.1 )
+     $      H( KWTOP, KWTOP-1 ) = S*DCONJG( V( 1, 1 ) )
+         CALL ZLACPY( 'U', JW, JW, T, LDT, H( KWTOP, KWTOP ), LDH )
+         CALL ZCOPY( JW-1, T( 2, 1 ), LDT+1, H( KWTOP+1, KWTOP ),
+     $               LDH+1 )
 *
-         PVT = ( I-1 ) + IDAMAX( N-I+1, VN1( I ), 1 )
+*        ==== Accumulate orthogonal matrix in order update
+*        .    H and Z, if requested.  ====
 *
-         IF( PVT.NE.I ) THEN
-            CALL ZSWAP( M, A( 1, PVT ), 1, A( 1, I ), 1 )
-            ITEMP = JPVT( PVT )
-            JPVT( PVT ) = JPVT( I )
-            JPVT( I ) = ITEMP
-            VN1( PVT ) = VN1( I )
-            VN2( PVT ) = VN2( I )
-         END IF
+         IF( NS.GT.1 .AND. S.NE.ZERO )
+     $      CALL ZUNMHR( 'R', 'N', JW, NS, 1, NS, T, LDT, WORK, V, LDV,
+     $                   WORK( JW+1 ), LWORK-JW, INFO )
 *
-*        Generate elementary reflector H(i).
+*        ==== Update vertical slab in H ====
 *
-         IF( OFFPI.LT.M ) THEN
-            CALL ZLARFG( M-OFFPI+1, A( OFFPI, I ), A( OFFPI+1, I ), 1,
-     $                   TAU( I ) )
+         IF( WANTT ) THEN
+            LTOP = 1
          ELSE
-            CALL ZLARFG( 1, A( M, I ), A( M, I ), 1, TAU( I ) )
+            LTOP = KTOP
          END IF
+         DO 60 KROW = LTOP, KWTOP - 1, NV
+            KLN = MIN( NV, KWTOP-KROW )
+            CALL ZGEMM( 'N', 'N', KLN, JW, JW, ONE, H( KROW, KWTOP ),
+     $                  LDH, V, LDV, ZERO, WV, LDWV )
+            CALL ZLACPY( 'A', KLN, JW, WV, LDWV, H( KROW, KWTOP ), LDH )
+   60    CONTINUE
 *
-         IF( I.LT.N ) THEN
+*        ==== Update horizontal slab in H ====
 *
-*           Apply H(i)**H to A(offset+i:m,i+1:n) from the left.
+         IF( WANTT ) THEN
+            DO 70 KCOL = KBOT + 1, N, NH
+               KLN = MIN( NH, N-KCOL+1 )
+               CALL ZGEMM( 'C', 'N', JW, KLN, JW, ONE, V, LDV,
+     $                     H( KWTOP, KCOL ), LDH, ZERO, T, LDT )
+               CALL ZLACPY( 'A', JW, KLN, T, LDT, H( KWTOP, KCOL ),
+     $                      LDH )
+   70       CONTINUE
+         END IF
 *
-            AII = A( OFFPI, I )
-            A( OFFPI, I ) = CONE
-            CALL ZLARF( 'Left', M-OFFPI+1, N-I, A( OFFPI, I ), 1,
-     $                  DCONJG( TAU( I ) ), A( OFFPI, I+1 ), LDA,
-     $                  WORK( 1 ) )
-            A( OFFPI, I ) = AII
+*        ==== Update vertical slab in Z ====
+*
+         IF( WANTZ ) THEN
+            DO 80 KROW = ILOZ, IHIZ, NV
+               KLN = MIN( NV, IHIZ-KROW+1 )
+               CALL ZGEMM( 'N', 'N', KLN, JW, JW, ONE, Z( KROW, KWTOP ),
+     $                     LDZ, V, LDV, ZERO, WV, LDWV )
+               CALL ZLACPY( 'A', KLN, JW, WV, LDWV, Z( KROW, KWTOP ),
+     $                      LDZ )
+   80       CONTINUE
          END IF
+      END IF
 *
-*        Update partial column norms.
+*     ==== Return the number of deflations ... ====
 *
-         DO 10 J = I + 1, N
-            IF( VN1( J ).NE.ZERO ) THEN
+      ND = JW - NS
 *
-*              NOTE: The following 4 lines follow from the analysis in
-*              Lapack Working Note 176.
+*     ==== ... and the number of shifts. (Subtracting
+*     .    INFQR from the spike length takes care
+*     .    of the case of a rare QR failure while
+*     .    calculating eigenvalues of the deflation
+*     .    window.)  ====
 *
-               TEMP = ONE - ( ABS( A( OFFPI, J ) ) / VN1( J ) )**2
-               TEMP = MAX( TEMP, ZERO )
-               TEMP2 = TEMP*( VN1( J ) / VN2( J ) )**2
-               IF( TEMP2 .LE. TOL3Z ) THEN
-                  IF( OFFPI.LT.M ) THEN
-                     VN1( J ) = DZNRM2( M-OFFPI, A( OFFPI+1, J ), 1 )
-                     VN2( J ) = VN1( J )
-                  ELSE
-                     VN1( J ) = ZERO
-                     VN2( J ) = ZERO
-                  END IF
-               ELSE
-                  VN1( J ) = VN1( J )*SQRT( TEMP )
-               END IF
-            END IF
-   10    CONTINUE
+      NS = NS - INFQR
 *
-   20 CONTINUE
+*      ==== Return optimal workspace. ====
 *
-      RETURN
+      WORK( 1 ) = DCMPLX( LWKOPT, 0 )
 *
-*     End of ZLAQP2
+*     ==== End of ZLAQR2 ====
 *
       END
-*> \brief \b ZLAQPS computes a step of QR factorization with column pivoting of a real m-by-n matrix A by using BLAS level 3.
+*> \brief \b ZLAQR3 performs the unitary similarity transformation of a Hessenberg matrix to detect and deflate fully converged eigenvalues from a trailing principal submatrix (aggressive early deflation).
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download ZLAQPS + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/zlaqps.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/zlaqps.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/zlaqps.f"> 
+*> Download ZLAQR3 + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/zlaqr3.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/zlaqr3.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/zlaqr3.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
-*       SUBROUTINE ZLAQPS( M, N, OFFSET, NB, KB, A, LDA, JPVT, TAU, VN1,
-*                          VN2, AUXV, F, LDF )
-* 
+*       SUBROUTINE ZLAQR3( WANTT, WANTZ, N, KTOP, KBOT, NW, H, LDH, ILOZ,
+*                          IHIZ, Z, LDZ, NS, ND, SH, V, LDV, NH, T, LDT,
+*                          NV, WV, LDWV, WORK, LWORK )
+*
 *       .. Scalar Arguments ..
-*       INTEGER            KB, LDA, LDF, M, N, NB, OFFSET
+*       INTEGER            IHIZ, ILOZ, KBOT, KTOP, LDH, LDT, LDV, LDWV,
+*      $                   LDZ, LWORK, N, ND, NH, NS, NV, NW
+*       LOGICAL            WANTT, WANTZ
 *       ..
 *       .. Array Arguments ..
-*       INTEGER            JPVT( * )
-*       DOUBLE PRECISION   VN1( * ), VN2( * )
-*       COMPLEX*16         A( LDA, * ), AUXV( * ), F( LDF, * ), TAU( * )
+*       COMPLEX*16         H( LDH, * ), SH( * ), T( LDT, * ), V( LDV, * ),
+*      $                   WORK( * ), WV( LDWV, * ), Z( LDZ, * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
 *>
 *> \verbatim
 *>
-*> ZLAQPS computes a step of QR factorization with column pivoting
-*> of a complex M-by-N matrix A by using Blas-3.  It tries to factorize
-*> NB columns from A starting from the row OFFSET+1, and updates all
-*> of the matrix with Blas-3 xGEMM.
+*>    Aggressive early deflation:
 *>
-*> In some cases, due to catastrophic cancellations, it cannot
-*> factorize NB columns.  Hence, the actual number of factorized
-*> columns is returned in KB.
+*>    ZLAQR3 accepts as input an upper Hessenberg matrix
+*>    H and performs an unitary similarity transformation
+*>    designed to detect and deflate fully converged eigenvalues from
+*>    a trailing principal submatrix.  On output H has been over-
+*>    written by a new Hessenberg matrix that is a perturbation of
+*>    an unitary similarity transformation of H.  It is to be
+*>    hoped that the final version of H has many zero subdiagonal
+*>    entries.
 *>
-*> Block A(1:OFFSET,1:N) is accordingly pivoted, but not factorized.
 *> \endverbatim
 *
 *  Arguments:
 *  ==========
 *
-*> \param[in] M
+*> \param[in] WANTT
 *> \verbatim
-*>          M is INTEGER
-*>          The number of rows of the matrix A. M >= 0.
+*>          WANTT is LOGICAL
+*>          If .TRUE., then the Hessenberg matrix H is fully updated
+*>          so that the triangular Schur factor may be
+*>          computed (in cooperation with the calling subroutine).
+*>          If .FALSE., then only enough of H is updated to preserve
+*>          the eigenvalues.
+*> \endverbatim
+*>
+*> \param[in] WANTZ
+*> \verbatim
+*>          WANTZ is LOGICAL
+*>          If .TRUE., then the unitary matrix Z is updated so
+*>          so that the unitary Schur factor may be computed
+*>          (in cooperation with the calling subroutine).
+*>          If .FALSE., then Z is not referenced.
 *> \endverbatim
 *>
 *> \param[in] N
 *> \verbatim
 *>          N is INTEGER
-*>          The number of columns of the matrix A. N >= 0
+*>          The order of the matrix H and (if WANTZ is .TRUE.) the
+*>          order of the unitary matrix Z.
 *> \endverbatim
 *>
-*> \param[in] OFFSET
+*> \param[in] KTOP
 *> \verbatim
-*>          OFFSET is INTEGER
-*>          The number of rows of A that have been factorized in
-*>          previous steps.
+*>          KTOP is INTEGER
+*>          It is assumed that either KTOP = 1 or H(KTOP,KTOP-1)=0.
+*>          KBOT and KTOP together determine an isolated block
+*>          along the diagonal of the Hessenberg matrix.
 *> \endverbatim
 *>
-*> \param[in] NB
+*> \param[in] KBOT
 *> \verbatim
-*>          NB is INTEGER
-*>          The number of columns to factorize.
+*>          KBOT is INTEGER
+*>          It is assumed without a check that either
+*>          KBOT = N or H(KBOT+1,KBOT)=0.  KBOT and KTOP together
+*>          determine an isolated block along the diagonal of the
+*>          Hessenberg matrix.
 *> \endverbatim
 *>
-*> \param[out] KB
+*> \param[in] NW
 *> \verbatim
-*>          KB is INTEGER
-*>          The number of columns actually factorized.
+*>          NW is INTEGER
+*>          Deflation window size.  1 .LE. NW .LE. (KBOT-KTOP+1).
 *> \endverbatim
 *>
-*> \param[in,out] A
+*> \param[in,out] H
 *> \verbatim
-*>          A is COMPLEX*16 array, dimension (LDA,N)
-*>          On entry, the M-by-N matrix A.
-*>          On exit, block A(OFFSET+1:M,1:KB) is the triangular
-*>          factor obtained and block A(1:OFFSET,1:N) has been
-*>          accordingly pivoted, but no factorized.
-*>          The rest of the matrix, block A(OFFSET+1:M,KB+1:N) has
-*>          been updated.
+*>          H is COMPLEX*16 array, dimension (LDH,N)
+*>          On input the initial N-by-N section of H stores the
+*>          Hessenberg matrix undergoing aggressive early deflation.
+*>          On output H has been transformed by a unitary
+*>          similarity transformation, perturbed, and the returned
+*>          to Hessenberg form that (it is to be hoped) has some
+*>          zero subdiagonal entries.
 *> \endverbatim
 *>
-*> \param[in] LDA
+*> \param[in] LDH
 *> \verbatim
-*>          LDA is INTEGER
-*>          The leading dimension of the array A. LDA >= max(1,M).
+*>          LDH is integer
+*>          Leading dimension of H just as declared in the calling
+*>          subroutine.  N .LE. LDH
 *> \endverbatim
 *>
-*> \param[in,out] JPVT
+*> \param[in] ILOZ
 *> \verbatim
-*>          JPVT is INTEGER array, dimension (N)
-*>          JPVT(I) = K <==> Column K of the full matrix A has been
-*>          permuted into position I in AP.
+*>          ILOZ is INTEGER
 *> \endverbatim
 *>
-*> \param[out] TAU
+*> \param[in] IHIZ
 *> \verbatim
-*>          TAU is COMPLEX*16 array, dimension (KB)
-*>          The scalar factors of the elementary reflectors.
+*>          IHIZ is INTEGER
+*>          Specify the rows of Z to which transformations must be
+*>          applied if WANTZ is .TRUE.. 1 .LE. ILOZ .LE. IHIZ .LE. N.
 *> \endverbatim
 *>
-*> \param[in,out] VN1
+*> \param[in,out] Z
 *> \verbatim
-*>          VN1 is DOUBLE PRECISION array, dimension (N)
-*>          The vector with the partial column norms.
+*>          Z is COMPLEX*16 array, dimension (LDZ,N)
+*>          IF WANTZ is .TRUE., then on output, the unitary
+*>          similarity transformation mentioned above has been
+*>          accumulated into Z(ILOZ:IHIZ,ILOZ:IHIZ) from the right.
+*>          If WANTZ is .FALSE., then Z is unreferenced.
 *> \endverbatim
 *>
-*> \param[in,out] VN2
+*> \param[in] LDZ
 *> \verbatim
-*>          VN2 is DOUBLE PRECISION array, dimension (N)
-*>          The vector with the exact column norms.
+*>          LDZ is integer
+*>          The leading dimension of Z just as declared in the
+*>          calling subroutine.  1 .LE. LDZ.
 *> \endverbatim
 *>
-*> \param[in,out] AUXV
+*> \param[out] NS
 *> \verbatim
-*>          AUXV is COMPLEX*16 array, dimension (NB)
-*>          Auxiliar vector.
+*>          NS is integer
+*>          The number of unconverged (ie approximate) eigenvalues
+*>          returned in SR and SI that may be used as shifts by the
+*>          calling subroutine.
 *> \endverbatim
 *>
-*> \param[in,out] F
+*> \param[out] ND
 *> \verbatim
-*>          F is COMPLEX*16 array, dimension (LDF,NB)
-*>          Matrix F**H = L * Y**H * A.
+*>          ND is integer
+*>          The number of converged eigenvalues uncovered by this
+*>          subroutine.
 *> \endverbatim
 *>
-*> \param[in] LDF
+*> \param[out] SH
 *> \verbatim
-*>          LDF is INTEGER
-*>          The leading dimension of the array F. LDF >= max(1,N).
+*>          SH is COMPLEX*16 array, dimension KBOT
+*>          On output, approximate eigenvalues that may
+*>          be used for shifts are stored in SH(KBOT-ND-NS+1)
+*>          through SR(KBOT-ND).  Converged eigenvalues are
+*>          stored in SH(KBOT-ND+1) through SH(KBOT).
+*> \endverbatim
+*>
+*> \param[out] V
+*> \verbatim
+*>          V is COMPLEX*16 array, dimension (LDV,NW)
+*>          An NW-by-NW work array.
+*> \endverbatim
+*>
+*> \param[in] LDV
+*> \verbatim
+*>          LDV is integer scalar
+*>          The leading dimension of V just as declared in the
+*>          calling subroutine.  NW .LE. LDV
+*> \endverbatim
+*>
+*> \param[in] NH
+*> \verbatim
+*>          NH is integer scalar
+*>          The number of columns of T.  NH.GE.NW.
+*> \endverbatim
+*>
+*> \param[out] T
+*> \verbatim
+*>          T is COMPLEX*16 array, dimension (LDT,NW)
+*> \endverbatim
+*>
+*> \param[in] LDT
+*> \verbatim
+*>          LDT is integer
+*>          The leading dimension of T just as declared in the
+*>          calling subroutine.  NW .LE. LDT
+*> \endverbatim
+*>
+*> \param[in] NV
+*> \verbatim
+*>          NV is integer
+*>          The number of rows of work array WV available for
+*>          workspace.  NV.GE.NW.
+*> \endverbatim
+*>
+*> \param[out] WV
+*> \verbatim
+*>          WV is COMPLEX*16 array, dimension (LDWV,NW)
+*> \endverbatim
+*>
+*> \param[in] LDWV
+*> \verbatim
+*>          LDWV is integer
+*>          The leading dimension of W just as declared in the
+*>          calling subroutine.  NW .LE. LDV
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*>          WORK is COMPLEX*16 array, dimension LWORK.
+*>          On exit, WORK(1) is set to an estimate of the optimal value
+*>          of LWORK for the given values of N, NW, KTOP and KBOT.
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*>          LWORK is integer
+*>          The dimension of the work array WORK.  LWORK = 2*NW
+*>          suffices, but greater efficiency may result from larger
+*>          values of LWORK.
+*>
+*>          If LWORK = -1, then a workspace query is assumed; ZLAQR3
+*>          only estimates the optimal workspace size for the given
+*>          values of N, NW, KTOP and KBOT.  The estimate is returned
+*>          in WORK(1).  No error message related to LWORK is issued
+*>          by XERBLA.  Neither H nor Z are accessed.
 *> \endverbatim
 *
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date September 2012
+*> \date June 2016
 *
 *> \ingroup complex16OTHERauxiliary
 *
 *> \par Contributors:
 *  ==================
 *>
-*>    G. Quintana-Orti, Depto. de Informatica, Universidad Jaime I, Spain
-*>    X. Sun, Computer Science Dept., Duke University, USA
-*> \n
-*>  Partial column norm updating strategy modified on April 2011
-*>    Z. Drmac and Z. Bujanovic, Dept. of Mathematics,
-*>    University of Zagreb, Croatia.
-*
-*> \par References:
-*  ================
+*>       Karen Braman and Ralph Byers, Department of Mathematics,
+*>       University of Kansas, USA
 *>
-*> LAPACK Working Note 176
-*
-*> \htmlonly
-*> <a href="http://www.netlib.org/lapack/lawnspdf/lawn176.pdf">[PDF]</a> 
-*> \endhtmlonly 
-*
 *  =====================================================================
-      SUBROUTINE ZLAQPS( M, N, OFFSET, NB, KB, A, LDA, JPVT, TAU, VN1,
-     $                   VN2, AUXV, F, LDF )
+      SUBROUTINE ZLAQR3( WANTT, WANTZ, N, KTOP, KBOT, NW, H, LDH, ILOZ,
+     $                   IHIZ, Z, LDZ, NS, ND, SH, V, LDV, NH, T, LDT,
+     $                   NV, WV, LDWV, WORK, LWORK )
 *
-*  -- LAPACK auxiliary routine (version 3.4.2) --
+*  -- LAPACK auxiliary routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     September 2012
+*     June 2016
 *
 *     .. Scalar Arguments ..
-      INTEGER            KB, LDA, LDF, M, N, NB, OFFSET
+      INTEGER            IHIZ, ILOZ, KBOT, KTOP, LDH, LDT, LDV, LDWV,
+     $                   LDZ, LWORK, N, ND, NH, NS, NV, NW
+      LOGICAL            WANTT, WANTZ
 *     ..
 *     .. Array Arguments ..
-      INTEGER            JPVT( * )
-      DOUBLE PRECISION   VN1( * ), VN2( * )
-      COMPLEX*16         A( LDA, * ), AUXV( * ), F( LDF, * ), TAU( * )
+      COMPLEX*16         H( LDH, * ), SH( * ), T( LDT, * ), V( LDV, * ),
+     $                   WORK( * ), WV( LDWV, * ), Z( LDZ, * )
+*     ..
+*
+*  ================================================================
+*
+*     .. Parameters ..
+      COMPLEX*16         ZERO, ONE
+      PARAMETER          ( ZERO = ( 0.0d0, 0.0d0 ),
+     $                   ONE = ( 1.0d0, 0.0d0 ) )
+      DOUBLE PRECISION   RZERO, RONE
+      PARAMETER          ( RZERO = 0.0d0, RONE = 1.0d0 )
+*     ..
+*     .. Local Scalars ..
+      COMPLEX*16         BETA, CDUM, S, TAU
+      DOUBLE PRECISION   FOO, SAFMAX, SAFMIN, SMLNUM, ULP
+      INTEGER            I, IFST, ILST, INFO, INFQR, J, JW, KCOL, KLN,
+     $                   KNT, KROW, KWTOP, LTOP, LWK1, LWK2, LWK3,
+     $                   LWKOPT, NMIN
+*     ..
+*     .. External Functions ..
+      DOUBLE PRECISION   DLAMCH
+      INTEGER            ILAENV
+      EXTERNAL           DLAMCH, ILAENV
+*     ..
+*     .. External Subroutines ..
+      EXTERNAL           DLABAD, ZCOPY, ZGEHRD, ZGEMM, ZLACPY, ZLAHQR,
+     $                   ZLAQR4, ZLARF, ZLARFG, ZLASET, ZTREXC, ZUNMHR
+*     ..
+*     .. Intrinsic Functions ..
+      INTRINSIC          ABS, DBLE, DCMPLX, DCONJG, DIMAG, INT, MAX, MIN
+*     ..
+*     .. Statement Functions ..
+      DOUBLE PRECISION   CABS1
 *     ..
+*     .. Statement Function definitions ..
+      CABS1( CDUM ) = ABS( DBLE( CDUM ) ) + ABS( DIMAG( CDUM ) )
+*     ..
+*     .. Executable Statements ..
+*
+*     ==== Estimate optimal workspace. ====
+*
+      JW = MIN( NW, KBOT-KTOP+1 )
+      IF( JW.LE.2 ) THEN
+         LWKOPT = 1
+      ELSE
+*
+*        ==== Workspace query call to ZGEHRD ====
+*
+         CALL ZGEHRD( JW, 1, JW-1, T, LDT, WORK, WORK, -1, INFO )
+         LWK1 = INT( WORK( 1 ) )
+*
+*        ==== Workspace query call to ZUNMHR ====
+*
+         CALL ZUNMHR( 'R', 'N', JW, JW, 1, JW-1, T, LDT, WORK, V, LDV,
+     $                WORK, -1, INFO )
+         LWK2 = INT( WORK( 1 ) )
+*
+*        ==== Workspace query call to ZLAQR4 ====
+*
+         CALL ZLAQR4( .true., .true., JW, 1, JW, T, LDT, SH, 1, JW, V,
+     $                LDV, WORK, -1, INFQR )
+         LWK3 = INT( WORK( 1 ) )
+*
+*        ==== Optimal workspace ====
+*
+         LWKOPT = MAX( JW+MAX( LWK1, LWK2 ), LWK3 )
+      END IF
+*
+*     ==== Quick return in case of workspace query. ====
+*
+      IF( LWORK.EQ.-1 ) THEN
+         WORK( 1 ) = DCMPLX( LWKOPT, 0 )
+         RETURN
+      END IF
+*
+*     ==== Nothing to do ...
+*     ... for an empty active block ... ====
+      NS = 0
+      ND = 0
+      WORK( 1 ) = ONE
+      IF( KTOP.GT.KBOT )
+     $   RETURN
+*     ... nor for an empty deflation window. ====
+      IF( NW.LT.1 )
+     $   RETURN
+*
+*     ==== Machine constants ====
+*
+      SAFMIN = DLAMCH( 'SAFE MINIMUM' )
+      SAFMAX = RONE / SAFMIN
+      CALL DLABAD( SAFMIN, SAFMAX )
+      ULP = DLAMCH( 'PRECISION' )
+      SMLNUM = SAFMIN*( DBLE( N ) / ULP )
+*
+*     ==== Setup deflation window ====
+*
+      JW = MIN( NW, KBOT-KTOP+1 )
+      KWTOP = KBOT - JW + 1
+      IF( KWTOP.EQ.KTOP ) THEN
+         S = ZERO
+      ELSE
+         S = H( KWTOP, KWTOP-1 )
+      END IF
+*
+      IF( KBOT.EQ.KWTOP ) THEN
+*
+*        ==== 1-by-1 deflation window: not much to do ====
+*
+         SH( KWTOP ) = H( KWTOP, KWTOP )
+         NS = 1
+         ND = 0
+         IF( CABS1( S ).LE.MAX( SMLNUM, ULP*CABS1( H( KWTOP,
+     $       KWTOP ) ) ) ) THEN
+            NS = 0
+            ND = 1
+            IF( KWTOP.GT.KTOP )
+     $         H( KWTOP, KWTOP-1 ) = ZERO
+         END IF
+         WORK( 1 ) = ONE
+         RETURN
+      END IF
+*
+*     ==== Convert to spike-triangular form.  (In case of a
+*     .    rare QR failure, this routine continues to do
+*     .    aggressive early deflation using that part of
+*     .    the deflation window that converged using INFQR
+*     .    here and there to keep track.) ====
+*
+      CALL ZLACPY( 'U', JW, JW, H( KWTOP, KWTOP ), LDH, T, LDT )
+      CALL ZCOPY( JW-1, H( KWTOP+1, KWTOP ), LDH+1, T( 2, 1 ), LDT+1 )
+*
+      CALL ZLASET( 'A', JW, JW, ZERO, ONE, V, LDV )
+      NMIN = ILAENV( 12, 'ZLAQR3', 'SV', JW, 1, JW, LWORK )
+      IF( JW.GT.NMIN ) THEN
+         CALL ZLAQR4( .true., .true., JW, 1, JW, T, LDT, SH( KWTOP ), 1,
+     $                JW, V, LDV, WORK, LWORK, INFQR )
+      ELSE
+         CALL ZLAHQR( .true., .true., JW, 1, JW, T, LDT, SH( KWTOP ), 1,
+     $                JW, V, LDV, INFQR )
+      END IF
 *
-*  =====================================================================
+*     ==== Deflation detection loop ====
 *
-*     .. Parameters ..
-      DOUBLE PRECISION   ZERO, ONE
-      COMPLEX*16         CZERO, CONE
-      PARAMETER          ( ZERO = 0.0D+0, ONE = 1.0D+0,
-     $                   CZERO = ( 0.0D+0, 0.0D+0 ),
-     $                   CONE = ( 1.0D+0, 0.0D+0 ) )
-*     ..
-*     .. Local Scalars ..
-      INTEGER            ITEMP, J, K, LASTRK, LSTICC, PVT, RK
-      DOUBLE PRECISION   TEMP, TEMP2, TOL3Z
-      COMPLEX*16         AKK
-*     ..
-*     .. External Subroutines ..
-      EXTERNAL           ZGEMM, ZGEMV, ZLARFG, ZSWAP
-*     ..
-*     .. Intrinsic Functions ..
-      INTRINSIC          ABS, DBLE, DCONJG, MAX, MIN, NINT, SQRT
-*     ..
-*     .. External Functions ..
-      INTEGER            IDAMAX
-      DOUBLE PRECISION   DLAMCH, DZNRM2
-      EXTERNAL           IDAMAX, DLAMCH, DZNRM2
-*     ..
-*     .. Executable Statements ..
+      NS = JW
+      ILST = INFQR + 1
+      DO 10 KNT = INFQR + 1, JW
 *
-      LASTRK = MIN( M, N+OFFSET )
-      LSTICC = 0
-      K = 0
-      TOL3Z = SQRT(DLAMCH('Epsilon'))
+*        ==== Small spike tip deflation test ====
 *
-*     Beginning of while loop.
+         FOO = CABS1( T( NS, NS ) )
+         IF( FOO.EQ.RZERO )
+     $      FOO = CABS1( S )
+         IF( CABS1( S )*CABS1( V( 1, NS ) ).LE.MAX( SMLNUM, ULP*FOO ) )
+     $        THEN
 *
-   10 CONTINUE
-      IF( ( K.LT.NB ) .AND. ( LSTICC.EQ.0 ) ) THEN
-         K = K + 1
-         RK = OFFSET + K
+*           ==== One more converged eigenvalue ====
 *
-*        Determine ith pivot column and swap if necessary
+            NS = NS - 1
+         ELSE
 *
-         PVT = ( K-1 ) + IDAMAX( N-K+1, VN1( K ), 1 )
-         IF( PVT.NE.K ) THEN
-            CALL ZSWAP( M, A( 1, PVT ), 1, A( 1, K ), 1 )
-            CALL ZSWAP( K-1, F( PVT, 1 ), LDF, F( K, 1 ), LDF )
-            ITEMP = JPVT( PVT )
-            JPVT( PVT ) = JPVT( K )
-            JPVT( K ) = ITEMP
-            VN1( PVT ) = VN1( K )
-            VN2( PVT ) = VN2( K )
+*           ==== One undeflatable eigenvalue.  Move it up out of the
+*           .    way.   (ZTREXC can not fail in this case.) ====
+*
+            IFST = NS
+            CALL ZTREXC( 'V', JW, T, LDT, V, LDV, IFST, ILST, INFO )
+            ILST = ILST + 1
          END IF
+   10 CONTINUE
 *
-*        Apply previous Householder reflectors to column K:
-*        A(RK:M,K) := A(RK:M,K) - A(RK:M,1:K-1)*F(K,1:K-1)**H.
+*        ==== Return to Hessenberg form ====
 *
-         IF( K.GT.1 ) THEN
-            DO 20 J = 1, K - 1
-               F( K, J ) = DCONJG( F( K, J ) )
-   20       CONTINUE
-            CALL ZGEMV( 'No transpose', M-RK+1, K-1, -CONE, A( RK, 1 ),
-     $                  LDA, F( K, 1 ), LDF, CONE, A( RK, K ), 1 )
-            DO 30 J = 1, K - 1
-               F( K, J ) = DCONJG( F( K, J ) )
-   30       CONTINUE
-         END IF
+      IF( NS.EQ.0 )
+     $   S = ZERO
 *
-*        Generate elementary reflector H(k).
+      IF( NS.LT.JW ) THEN
 *
-         IF( RK.LT.M ) THEN
-            CALL ZLARFG( M-RK+1, A( RK, K ), A( RK+1, K ), 1, TAU( K ) )
-         ELSE
-            CALL ZLARFG( 1, A( RK, K ), A( RK, K ), 1, TAU( K ) )
-         END IF
+*        ==== sorting the diagonal of T improves accuracy for
+*        .    graded matrices.  ====
 *
-         AKK = A( RK, K )
-         A( RK, K ) = CONE
+         DO 30 I = INFQR + 1, NS
+            IFST = I
+            DO 20 J = I + 1, NS
+               IF( CABS1( T( J, J ) ).GT.CABS1( T( IFST, IFST ) ) )
+     $            IFST = J
+   20       CONTINUE
+            ILST = I
+            IF( IFST.NE.ILST )
+     $         CALL ZTREXC( 'V', JW, T, LDT, V, LDV, IFST, ILST, INFO )
+   30    CONTINUE
+      END IF
 *
-*        Compute Kth column of F:
+*     ==== Restore shift/eigenvalue array from T ====
 *
-*        Compute  F(K+1:N,K) := tau(K)*A(RK:M,K+1:N)**H*A(RK:M,K).
+      DO 40 I = INFQR + 1, JW
+         SH( KWTOP+I-1 ) = T( I, I )
+   40 CONTINUE
 *
-         IF( K.LT.N ) THEN
-            CALL ZGEMV( 'Conjugate transpose', M-RK+1, N-K, TAU( K ),
-     $                  A( RK, K+1 ), LDA, A( RK, K ), 1, CZERO,
-     $                  F( K+1, K ), 1 )
-         END IF
 *
-*        Padding F(1:K,K) with zeros.
+      IF( NS.LT.JW .OR. S.EQ.ZERO ) THEN
+         IF( NS.GT.1 .AND. S.NE.ZERO ) THEN
 *
-         DO 40 J = 1, K
-            F( J, K ) = CZERO
-   40    CONTINUE
+*           ==== Reflect spike back into lower triangle ====
 *
-*        Incremental updating of F:
-*        F(1:N,K) := F(1:N,K) - tau(K)*F(1:N,1:K-1)*A(RK:M,1:K-1)**H
-*                    *A(RK:M,K).
+            CALL ZCOPY( NS, V, LDV, WORK, 1 )
+            DO 50 I = 1, NS
+               WORK( I ) = DCONJG( WORK( I ) )
+   50       CONTINUE
+            BETA = WORK( 1 )
+            CALL ZLARFG( NS, BETA, WORK( 2 ), 1, TAU )
+            WORK( 1 ) = ONE
 *
-         IF( K.GT.1 ) THEN
-            CALL ZGEMV( 'Conjugate transpose', M-RK+1, K-1, -TAU( K ),
-     $                  A( RK, 1 ), LDA, A( RK, K ), 1, CZERO,
-     $                  AUXV( 1 ), 1 )
+            CALL ZLASET( 'L', JW-2, JW-2, ZERO, ZERO, T( 3, 1 ), LDT )
 *
-            CALL ZGEMV( 'No transpose', N, K-1, CONE, F( 1, 1 ), LDF,
-     $                  AUXV( 1 ), 1, CONE, F( 1, K ), 1 )
+            CALL ZLARF( 'L', NS, JW, WORK, 1, DCONJG( TAU ), T, LDT,
+     $                  WORK( JW+1 ) )
+            CALL ZLARF( 'R', NS, NS, WORK, 1, TAU, T, LDT,
+     $                  WORK( JW+1 ) )
+            CALL ZLARF( 'R', JW, NS, WORK, 1, TAU, V, LDV,
+     $                  WORK( JW+1 ) )
+*
+            CALL ZGEHRD( JW, 1, NS, T, LDT, WORK, WORK( JW+1 ),
+     $                   LWORK-JW, INFO )
          END IF
 *
-*        Update the current row of A:
-*        A(RK,K+1:N) := A(RK,K+1:N) - A(RK,1:K)*F(K+1:N,1:K)**H.
+*        ==== Copy updated reduced window into place ====
 *
-         IF( K.LT.N ) THEN
-            CALL ZGEMM( 'No transpose', 'Conjugate transpose', 1, N-K,
-     $                  K, -CONE, A( RK, 1 ), LDA, F( K+1, 1 ), LDF,
-     $                  CONE, A( RK, K+1 ), LDA )
-         END IF
+         IF( KWTOP.GT.1 )
+     $      H( KWTOP, KWTOP-1 ) = S*DCONJG( V( 1, 1 ) )
+         CALL ZLACPY( 'U', JW, JW, T, LDT, H( KWTOP, KWTOP ), LDH )
+         CALL ZCOPY( JW-1, T( 2, 1 ), LDT+1, H( KWTOP+1, KWTOP ),
+     $               LDH+1 )
 *
-*        Update partial column norms.
+*        ==== Accumulate orthogonal matrix in order update
+*        .    H and Z, if requested.  ====
 *
-         IF( RK.LT.LASTRK ) THEN
-            DO 50 J = K + 1, N
-               IF( VN1( J ).NE.ZERO ) THEN
+         IF( NS.GT.1 .AND. S.NE.ZERO )
+     $      CALL ZUNMHR( 'R', 'N', JW, NS, 1, NS, T, LDT, WORK, V, LDV,
+     $                   WORK( JW+1 ), LWORK-JW, INFO )
 *
-*                 NOTE: The following 4 lines follow from the analysis in
-*                 Lapack Working Note 176.
+*        ==== Update vertical slab in H ====
 *
-                  TEMP = ABS( A( RK, J ) ) / VN1( J )
-                  TEMP = MAX( ZERO, ( ONE+TEMP )*( ONE-TEMP ) )
-                  TEMP2 = TEMP*( VN1( J ) / VN2( J ) )**2
-                  IF( TEMP2 .LE. TOL3Z ) THEN
-                     VN2( J ) = DBLE( LSTICC )
-                     LSTICC = J
-                  ELSE
-                     VN1( J ) = VN1( J )*SQRT( TEMP )
-                  END IF
-               END IF
-   50       CONTINUE
+         IF( WANTT ) THEN
+            LTOP = 1
+         ELSE
+            LTOP = KTOP
          END IF
+         DO 60 KROW = LTOP, KWTOP - 1, NV
+            KLN = MIN( NV, KWTOP-KROW )
+            CALL ZGEMM( 'N', 'N', KLN, JW, JW, ONE, H( KROW, KWTOP ),
+     $                  LDH, V, LDV, ZERO, WV, LDWV )
+            CALL ZLACPY( 'A', KLN, JW, WV, LDWV, H( KROW, KWTOP ), LDH )
+   60    CONTINUE
 *
-         A( RK, K ) = AKK
-*
-*        End of while loop.
+*        ==== Update horizontal slab in H ====
 *
-         GO TO 10
-      END IF
-      KB = K
-      RK = OFFSET + KB
+         IF( WANTT ) THEN
+            DO 70 KCOL = KBOT + 1, N, NH
+               KLN = MIN( NH, N-KCOL+1 )
+               CALL ZGEMM( 'C', 'N', JW, KLN, JW, ONE, V, LDV,
+     $                     H( KWTOP, KCOL ), LDH, ZERO, T, LDT )
+               CALL ZLACPY( 'A', JW, KLN, T, LDT, H( KWTOP, KCOL ),
+     $                      LDH )
+   70       CONTINUE
+         END IF
 *
-*     Apply the block reflector to the rest of the matrix:
-*     A(OFFSET+KB+1:M,KB+1:N) := A(OFFSET+KB+1:M,KB+1:N) -
-*                         A(OFFSET+KB+1:M,1:KB)*F(KB+1:N,1:KB)**H.
+*        ==== Update vertical slab in Z ====
 *
-      IF( KB.LT.MIN( N, M-OFFSET ) ) THEN
-         CALL ZGEMM( 'No transpose', 'Conjugate transpose', M-RK, N-KB,
-     $               KB, -CONE, A( RK+1, 1 ), LDA, F( KB+1, 1 ), LDF,
-     $               CONE, A( RK+1, KB+1 ), LDA )
+         IF( WANTZ ) THEN
+            DO 80 KROW = ILOZ, IHIZ, NV
+               KLN = MIN( NV, IHIZ-KROW+1 )
+               CALL ZGEMM( 'N', 'N', KLN, JW, JW, ONE, Z( KROW, KWTOP ),
+     $                     LDZ, V, LDV, ZERO, WV, LDWV )
+               CALL ZLACPY( 'A', KLN, JW, WV, LDWV, Z( KROW, KWTOP ),
+     $                      LDZ )
+   80       CONTINUE
+         END IF
       END IF
 *
-*     Recomputation of difficult columns.
+*     ==== Return the number of deflations ... ====
 *
-   60 CONTINUE
-      IF( LSTICC.GT.0 ) THEN
-         ITEMP = NINT( VN2( LSTICC ) )
-         VN1( LSTICC ) = DZNRM2( M-RK, A( RK+1, LSTICC ), 1 )
+      ND = JW - NS
 *
-*        NOTE: The computation of VN1( LSTICC ) relies on the fact that 
-*        SNRM2 does not fail on vectors with norm below the value of
-*        SQRT(DLAMCH('S')) 
+*     ==== ... and the number of shifts. (Subtracting
+*     .    INFQR from the spike length takes care
+*     .    of the case of a rare QR failure while
+*     .    calculating eigenvalues of the deflation
+*     .    window.)  ====
 *
-         VN2( LSTICC ) = VN1( LSTICC )
-         LSTICC = ITEMP
-         GO TO 60
-      END IF
+      NS = NS - INFQR
 *
-      RETURN
+*      ==== Return optimal workspace. ====
 *
-*     End of ZLAQPS
+      WORK( 1 ) = DCMPLX( LWKOPT, 0 )
+*
+*     ==== End of ZLAQR3 ====
 *
       END
-*> \brief \b ZLAQR0 computes the eigenvalues of a Hessenberg matrix, and optionally the matrices from the Schur decomposition.
+*> \brief \b ZLAQR4 computes the eigenvalues of a Hessenberg matrix, and optionally the matrices from the Schur decomposition.
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download ZLAQR0 + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/zlaqr0.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/zlaqr0.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/zlaqr0.f"> 
+*> Download ZLAQR4 + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/zlaqr4.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/zlaqr4.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/zlaqr4.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
-*       SUBROUTINE ZLAQR0( WANTT, WANTZ, N, ILO, IHI, H, LDH, W, ILOZ,
+*       SUBROUTINE ZLAQR4( WANTT, WANTZ, N, ILO, IHI, H, LDH, W, ILOZ,
 *                          IHIZ, Z, LDZ, WORK, LWORK, INFO )
-* 
+*
 *       .. Scalar Arguments ..
 *       INTEGER            IHI, IHIZ, ILO, ILOZ, INFO, LDH, LDZ, LWORK, N
 *       LOGICAL            WANTT, WANTZ
@@ -15571,14 +31126,21 @@
 *       .. Array Arguments ..
 *       COMPLEX*16         H( LDH, * ), W( * ), WORK( * ), Z( LDZ, * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
 *>
 *> \verbatim
 *>
-*>    ZLAQR0 computes the eigenvalues of a Hessenberg matrix H
+*>    ZLAQR4 implements one level of recursion for ZLAQR0.
+*>    It is a complete implementation of the small bulge multi-shift
+*>    QR algorithm.  It may be called by ZLAQR0 and, for large enough
+*>    deflation window size, it may be called by ZLAQR3.  This
+*>    subroutine is identical to ZLAQR0 except that it calls ZLAQR2
+*>    instead of ZLAQR3.
+*>
+*>    ZLAQR4 computes the eigenvalues of a Hessenberg matrix H
 *>    and, optionally, the matrices T and Z from the Schur decomposition
 *>    H = Z T Z**H, where T is an upper triangular matrix (the
 *>    Schur form), and Z is the unitary matrix of Schur vectors.
@@ -15620,7 +31182,6 @@
 *> \param[in] IHI
 *> \verbatim
 *>          IHI is INTEGER
-*>
 *>           It is assumed that H is already upper triangular in rows
 *>           and columns 1:ILO-1 and IHI+1:N and, if ILO.GT.1,
 *>           H(ILO,ILO-1) is zero. ILO and IHI are normally set by a
@@ -15707,8 +31268,8 @@
 *>           be required for optimal performance.  A workspace query
 *>           to determine the optimal workspace size is recommended.
 *>
-*>           If LWORK = -1, then ZLAQR0 does a workspace query.
-*>           In this case, ZLAQR0 checks the input parameters and
+*>           If LWORK = -1, then ZLAQR4 does a workspace query.
+*>           In this case, ZLAQR4 checks the input parameters and
 *>           estimates the optimal workspace size for the given
 *>           values of N, ILO and IHI.  The estimate is returned
 *>           in WORK(1).  No error message related to LWORK is
@@ -15719,7 +31280,7 @@
 *> \verbatim
 *>          INFO is INTEGER
 *>             =  0:  successful exit
-*>           .GT. 0:  if INFO = i, ZLAQR0 failed to compute all of
+*>           .GT. 0:  if INFO = i, ZLAQR4 failed to compute all of
 *>                the eigenvalues.  Elements 1:ilo-1 and i+1:n of WR
 *>                and WI contain those eigenvalues which have been
 *>                successfully computed.  (Failures are rare.)
@@ -15753,12 +31314,12 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date September 2012
+*> \date December 2016
 *
 *> \ingroup complex16OTHERauxiliary
 *
@@ -15781,13 +31342,13 @@
 *>       of Matrix Analysis, volume 23, pages 948--973, 2002.
 *>
 *  =====================================================================
-      SUBROUTINE ZLAQR0( WANTT, WANTZ, N, ILO, IHI, H, LDH, W, ILOZ,
+      SUBROUTINE ZLAQR4( WANTT, WANTZ, N, ILO, IHI, H, LDH, W, ILOZ,
      $                   IHIZ, Z, LDZ, WORK, LWORK, INFO )
 *
-*  -- LAPACK auxiliary routine (version 3.4.2) --
+*  -- LAPACK auxiliary routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     September 2012
+*     December 2016
 *
 *     .. Scalar Arguments ..
       INTEGER            IHI, IHIZ, ILO, ILOZ, INFO, LDH, LDZ, LWORK, N
@@ -15847,7 +31408,7 @@
       COMPLEX*16         ZDUM( 1, 1 )
 *     ..
 *     .. External Subroutines ..
-      EXTERNAL           ZLACPY, ZLAHQR, ZLAQR3, ZLAQR4, ZLAQR5
+      EXTERNAL           ZLACPY, ZLAHQR, ZLAQR2, ZLAQR5
 *     ..
 *     .. Intrinsic Functions ..
       INTRINSIC          ABS, DBLE, DCMPLX, DIMAG, INT, MAX, MIN, MOD,
@@ -15905,7 +31466,7 @@
 *        .    (In fact, there is enough subdiagonal space for
 *        .    NWR.GE.3.) ====
 *
-         NWR = ILAENV( 13, 'ZLAQR0', JBCMPZ, N, ILO, IHI, LWORK )
+         NWR = ILAENV( 13, 'ZLAQR4', JBCMPZ, N, ILO, IHI, LWORK )
          NWR = MAX( 2, NWR )
          NWR = MIN( IHI-ILO+1, ( N-1 ) / 3, NWR )
 *
@@ -15914,19 +31475,19 @@
 *        .    enough subdiagonal workspace for NSR to be even
 *        .    and greater than or equal to two as required. ====
 *
-         NSR = ILAENV( 15, 'ZLAQR0', JBCMPZ, N, ILO, IHI, LWORK )
+         NSR = ILAENV( 15, 'ZLAQR4', JBCMPZ, N, ILO, IHI, LWORK )
          NSR = MIN( NSR, ( N+6 ) / 9, IHI-ILO )
          NSR = MAX( 2, NSR-MOD( NSR, 2 ) )
 *
 *        ==== Estimate optimal workspace ====
 *
-*        ==== Workspace query call to ZLAQR3 ====
+*        ==== Workspace query call to ZLAQR2 ====
 *
-         CALL ZLAQR3( WANTT, WANTZ, N, ILO, IHI, NWR+1, H, LDH, ILOZ,
+         CALL ZLAQR2( WANTT, WANTZ, N, ILO, IHI, NWR+1, H, LDH, ILOZ,
      $                IHIZ, Z, LDZ, LS, LD, W, H, LDH, N, H, LDH, N, H,
      $                LDH, WORK, -1 )
 *
-*        ==== Optimal workspace = MAX(ZLAQR5, ZLAQR3) ====
+*        ==== Optimal workspace = MAX(ZLAQR5, ZLAQR2) ====
 *
          LWKOPT = MAX( 3*NSR / 2, INT( WORK( 1 ) ) )
 *
@@ -15939,18 +31500,18 @@
 *
 *        ==== ZLAHQR/ZLAQR0 crossover point ====
 *
-         NMIN = ILAENV( 12, 'ZLAQR0', JBCMPZ, N, ILO, IHI, LWORK )
+         NMIN = ILAENV( 12, 'ZLAQR4', JBCMPZ, N, ILO, IHI, LWORK )
          NMIN = MAX( NTINY, NMIN )
 *
 *        ==== Nibble crossover point ====
 *
-         NIBBLE = ILAENV( 14, 'ZLAQR0', JBCMPZ, N, ILO, IHI, LWORK )
+         NIBBLE = ILAENV( 14, 'ZLAQR4', JBCMPZ, N, ILO, IHI, LWORK )
          NIBBLE = MAX( 0, NIBBLE )
 *
 *        ==== Accumulate reflections during ttswp?  Use block
 *        .    2-by-2 structure during matrix-matrix multiply? ====
 *
-         KACC22 = ILAENV( 16, 'ZLAQR0', JBCMPZ, N, ILO, IHI, LWORK )
+         KACC22 = ILAENV( 16, 'ZLAQR4', JBCMPZ, N, ILO, IHI, LWORK )
          KACC22 = MAX( 0, KACC22 )
          KACC22 = MIN( 2, KACC22 )
 *
@@ -16057,7 +31618,7 @@
 *
 *           ==== Aggressive early deflation ====
 *
-            CALL ZLAQR3( WANTT, WANTZ, N, KTOP, KBOT, NW, H, LDH, ILOZ,
+            CALL ZLAQR2( WANTT, WANTZ, N, KTOP, KBOT, NW, H, LDH, ILOZ,
      $                   IHIZ, Z, LDZ, LS, LD, W, H( KV, 1 ), LDH, NHO,
      $                   H( KV, KT ), LDH, NVE, H( KWV, 1 ), LDH, WORK,
      $                   LWORK )
@@ -16080,7 +31641,7 @@
      $          KTOP+1.GT.MIN( NMIN, NWMAX ) ) ) ) THEN
 *
 *              ==== NS = nominal number of simultaneous shifts.
-*              .    This may be lowered (slightly) if ZLAQR3
+*              .    This may be lowered (slightly) if ZLAQR2
 *              .    did not provide that many shifts. ====
 *
                NS = MIN( NSMAX, NSR, MAX( 2, KBOT-KTOP ) )
@@ -16090,7 +31651,7 @@
 *              .    in a multiple of KEXSH iterations,
 *              .    then try exceptional shifts.
 *              .    Otherwise use shifts provided by
-*              .    ZLAQR3 above or from the eigenvalues
+*              .    ZLAQR2 above or from the eigenvalues
 *              .    of a trailing principal submatrix. ====
 *
                IF( MOD( NDFL, KEXSH ).EQ.0 ) THEN
@@ -16101,8 +31662,8 @@
    30             CONTINUE
                ELSE
 *
-*                 ==== Got NS/2 or fewer shifts? Use ZLAQR4 or
-*                 .    ZLAHQR on a trailing principal submatrix to
+*                 ==== Got NS/2 or fewer shifts? Use ZLAHQR
+*                 .    on a trailing principal submatrix to
 *                 .    get more. (Since NS.LE.NSMAX.LE.(N+6)/9,
 *                 .    there is enough space below the subdiagonal
 *                 .    to fit an NS-by-NS scratch array.) ====
@@ -16112,15 +31673,9 @@
                      KT = N - NS + 1
                      CALL ZLACPY( 'A', NS, NS, H( KS, KS ), LDH,
      $                            H( KT, 1 ), LDH )
-                     IF( NS.GT.NMIN ) THEN
-                        CALL ZLAQR4( .false., .false., NS, 1, NS,
-     $                               H( KT, 1 ), LDH, W( KS ), 1, 1,
-     $                               ZDUM, 1, WORK, LWORK, INF )
-                     ELSE
-                        CALL ZLAHQR( .false., .false., NS, 1, NS,
-     $                               H( KT, 1 ), LDH, W( KS ), 1, 1,
-     $                               ZDUM, 1, INF )
-                     END IF
+                     CALL ZLAHQR( .false., .false., NS, 1, NS,
+     $                            H( KT, 1 ), LDH, W( KS ), 1, 1, ZDUM,
+     $                            1, INF )
                      KS = KS + INF
 *
 *                    ==== In case of a rare QR failure use
@@ -16241,235 +31796,51 @@
 *
       WORK( 1 ) = DCMPLX( LWKOPT, 0 )
 *
-*     ==== End of ZLAQR0 ====
+*     ==== End of ZLAQR4 ====
 *
       END
-*> \brief \b ZLAQR1 sets a scalar multiple of the first column of the product of 2-by-2 or 3-by-3 matrix H and specified shifts.
+*> \brief \b ZLAQR5 performs a single small-bulge multi-shift QR sweep.
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download ZLAQR1 + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/zlaqr1.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/zlaqr1.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/zlaqr1.f"> 
+*> Download ZLAQR5 + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/zlaqr5.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/zlaqr5.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/zlaqr5.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
-*       SUBROUTINE ZLAQR1( N, H, LDH, S1, S2, V )
-* 
-*       .. Scalar Arguments ..
-*       COMPLEX*16         S1, S2
-*       INTEGER            LDH, N
-*       ..
-*       .. Array Arguments ..
-*       COMPLEX*16         H( LDH, * ), V( * )
-*       ..
-*  
-*
-*> \par Purpose:
-*  =============
-*>
-*> \verbatim
-*>
-*>      Given a 2-by-2 or 3-by-3 matrix H, ZLAQR1 sets v to a
-*>      scalar multiple of the first column of the product
-*>
-*>      (*)  K = (H - s1*I)*(H - s2*I)
-*>
-*>      scaling to avoid overflows and most underflows.
-*>
-*>      This is useful for starting double implicit shift bulges
-*>      in the QR algorithm.
-*> \endverbatim
-*
-*  Arguments:
-*  ==========
-*
-*> \param[in] N
-*> \verbatim
-*>          N is integer
-*>              Order of the matrix H. N must be either 2 or 3.
-*> \endverbatim
-*>
-*> \param[in] H
-*> \verbatim
-*>          H is COMPLEX*16 array of dimension (LDH,N)
-*>              The 2-by-2 or 3-by-3 matrix H in (*).
-*> \endverbatim
-*>
-*> \param[in] LDH
-*> \verbatim
-*>          LDH is integer
-*>              The leading dimension of H as declared in
-*>              the calling procedure.  LDH.GE.N
-*> \endverbatim
-*>
-*> \param[in] S1
-*> \verbatim
-*>          S1 is COMPLEX*16
-*> \endverbatim
-*>
-*> \param[in] S2
-*> \verbatim
-*>          S2 is COMPLEX*16
-*>
-*>          S1 and S2 are the shifts defining K in (*) above.
-*> \endverbatim
-*>
-*> \param[out] V
-*> \verbatim
-*>          V is COMPLEX*16 array of dimension N
-*>              A scalar multiple of the first column of the
-*>              matrix K in (*).
-*> \endverbatim
-*
-*  Authors:
-*  ========
-*
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
-*
-*> \date September 2012
-*
-*> \ingroup complex16OTHERauxiliary
-*
-*> \par Contributors:
-*  ==================
-*>
-*>       Karen Braman and Ralph Byers, Department of Mathematics,
-*>       University of Kansas, USA
-*>
-*  =====================================================================
-      SUBROUTINE ZLAQR1( N, H, LDH, S1, S2, V )
-*
-*  -- LAPACK auxiliary routine (version 3.4.2) --
-*  -- LAPACK is a software package provided by Univ. of Tennessee,    --
-*  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     September 2012
-*
-*     .. Scalar Arguments ..
-      COMPLEX*16         S1, S2
-      INTEGER            LDH, N
-*     ..
-*     .. Array Arguments ..
-      COMPLEX*16         H( LDH, * ), V( * )
-*     ..
-*
-*  ================================================================
-*
-*     .. Parameters ..
-      COMPLEX*16         ZERO
-      PARAMETER          ( ZERO = ( 0.0d0, 0.0d0 ) )
-      DOUBLE PRECISION   RZERO
-      PARAMETER          ( RZERO = 0.0d0 )
-*     ..
-*     .. Local Scalars ..
-      COMPLEX*16         CDUM, H21S, H31S
-      DOUBLE PRECISION   S
-*     ..
-*     .. Intrinsic Functions ..
-      INTRINSIC          ABS, DBLE, DIMAG
-*     ..
-*     .. Statement Functions ..
-      DOUBLE PRECISION   CABS1
-*     ..
-*     .. Statement Function definitions ..
-      CABS1( CDUM ) = ABS( DBLE( CDUM ) ) + ABS( DIMAG( CDUM ) )
-*     ..
-*     .. Executable Statements ..
-      IF( N.EQ.2 ) THEN
-         S = CABS1( H( 1, 1 )-S2 ) + CABS1( H( 2, 1 ) )
-         IF( S.EQ.RZERO ) THEN
-            V( 1 ) = ZERO
-            V( 2 ) = ZERO
-         ELSE
-            H21S = H( 2, 1 ) / S
-            V( 1 ) = H21S*H( 1, 2 ) + ( H( 1, 1 )-S1 )*
-     $               ( ( H( 1, 1 )-S2 ) / S )
-            V( 2 ) = H21S*( H( 1, 1 )+H( 2, 2 )-S1-S2 )
-         END IF
-      ELSE
-         S = CABS1( H( 1, 1 )-S2 ) + CABS1( H( 2, 1 ) ) +
-     $       CABS1( H( 3, 1 ) )
-         IF( S.EQ.ZERO ) THEN
-            V( 1 ) = ZERO
-            V( 2 ) = ZERO
-            V( 3 ) = ZERO
-         ELSE
-            H21S = H( 2, 1 ) / S
-            H31S = H( 3, 1 ) / S
-            V( 1 ) = ( H( 1, 1 )-S1 )*( ( H( 1, 1 )-S2 ) / S ) +
-     $               H( 1, 2 )*H21S + H( 1, 3 )*H31S
-            V( 2 ) = H21S*( H( 1, 1 )+H( 2, 2 )-S1-S2 ) + H( 2, 3 )*H31S
-            V( 3 ) = H31S*( H( 1, 1 )+H( 3, 3 )-S1-S2 ) + H21S*H( 3, 2 )
-         END IF
-      END IF
-      END
-*> \brief \b ZLAQR2 performs the unitary similarity transformation of a Hessenberg matrix to detect and deflate fully converged eigenvalues from a trailing principal submatrix (aggressive early deflation).
-*
-*  =========== DOCUMENTATION ===========
-*
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
-*
-*> \htmlonly
-*> Download ZLAQR2 + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/zlaqr2.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/zlaqr2.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/zlaqr2.f"> 
-*> [TXT]</a>
-*> \endhtmlonly 
-*
-*  Definition:
-*  ===========
+*       SUBROUTINE ZLAQR5( WANTT, WANTZ, KACC22, N, KTOP, KBOT, NSHFTS, S,
+*                          H, LDH, ILOZ, IHIZ, Z, LDZ, V, LDV, U, LDU, NV,
+*                          WV, LDWV, NH, WH, LDWH )
 *
-*       SUBROUTINE ZLAQR2( WANTT, WANTZ, N, KTOP, KBOT, NW, H, LDH, ILOZ,
-*                          IHIZ, Z, LDZ, NS, ND, SH, V, LDV, NH, T, LDT,
-*                          NV, WV, LDWV, WORK, LWORK )
-* 
 *       .. Scalar Arguments ..
-*       INTEGER            IHIZ, ILOZ, KBOT, KTOP, LDH, LDT, LDV, LDWV,
-*      $                   LDZ, LWORK, N, ND, NH, NS, NV, NW
+*       INTEGER            IHIZ, ILOZ, KACC22, KBOT, KTOP, LDH, LDU, LDV,
+*      $                   LDWH, LDWV, LDZ, N, NH, NSHFTS, NV
 *       LOGICAL            WANTT, WANTZ
 *       ..
 *       .. Array Arguments ..
-*       COMPLEX*16         H( LDH, * ), SH( * ), T( LDT, * ), V( LDV, * ),
-*      $                   WORK( * ), WV( LDWV, * ), Z( LDZ, * )
+*       COMPLEX*16         H( LDH, * ), S( * ), U( LDU, * ), V( LDV, * ),
+*      $                   WH( LDWH, * ), WV( LDWV, * ), Z( LDZ, * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
 *>
 *> \verbatim
 *>
-*>    ZLAQR2 is identical to ZLAQR3 except that it avoids
-*>    recursion by calling ZLAHQR instead of ZLAQR4.
-*>
-*>    Aggressive early deflation:
-*>
-*>    ZLAQR2 accepts as input an upper Hessenberg matrix
-*>    H and performs an unitary similarity transformation
-*>    designed to detect and deflate fully converged eigenvalues from
-*>    a trailing principal submatrix.  On output H has been over-
-*>    written by a new Hessenberg matrix that is a perturbation of
-*>    an unitary similarity transformation of H.  It is to be
-*>    hoped that the final version of H has many zero subdiagonal
-*>    entries.
-*>
+*>    ZLAQR5, called by ZLAQR0, performs a
+*>    single small-bulge multi-shift QR sweep.
 *> \endverbatim
 *
 *  Arguments:
@@ -16477,69 +31848,85 @@
 *
 *> \param[in] WANTT
 *> \verbatim
-*>          WANTT is LOGICAL
-*>          If .TRUE., then the Hessenberg matrix H is fully updated
-*>          so that the triangular Schur factor may be
-*>          computed (in cooperation with the calling subroutine).
-*>          If .FALSE., then only enough of H is updated to preserve
-*>          the eigenvalues.
+*>          WANTT is logical scalar
+*>             WANTT = .true. if the triangular Schur factor
+*>             is being computed.  WANTT is set to .false. otherwise.
 *> \endverbatim
 *>
 *> \param[in] WANTZ
 *> \verbatim
-*>          WANTZ is LOGICAL
-*>          If .TRUE., then the unitary matrix Z is updated so
-*>          so that the unitary Schur factor may be computed
-*>          (in cooperation with the calling subroutine).
-*>          If .FALSE., then Z is not referenced.
+*>          WANTZ is logical scalar
+*>             WANTZ = .true. if the unitary Schur factor is being
+*>             computed.  WANTZ is set to .false. otherwise.
+*> \endverbatim
+*>
+*> \param[in] KACC22
+*> \verbatim
+*>          KACC22 is integer with value 0, 1, or 2.
+*>             Specifies the computation mode of far-from-diagonal
+*>             orthogonal updates.
+*>        = 0: ZLAQR5 does not accumulate reflections and does not
+*>             use matrix-matrix multiply to update far-from-diagonal
+*>             matrix entries.
+*>        = 1: ZLAQR5 accumulates reflections and uses matrix-matrix
+*>             multiply to update the far-from-diagonal matrix entries.
+*>        = 2: ZLAQR5 accumulates reflections, uses matrix-matrix
+*>             multiply to update the far-from-diagonal matrix entries,
+*>             and takes advantage of 2-by-2 block structure during
+*>             matrix multiplies.
 *> \endverbatim
 *>
 *> \param[in] N
 *> \verbatim
-*>          N is INTEGER
-*>          The order of the matrix H and (if WANTZ is .TRUE.) the
-*>          order of the unitary matrix Z.
+*>          N is integer scalar
+*>             N is the order of the Hessenberg matrix H upon which this
+*>             subroutine operates.
 *> \endverbatim
 *>
 *> \param[in] KTOP
 *> \verbatim
-*>          KTOP is INTEGER
-*>          It is assumed that either KTOP = 1 or H(KTOP,KTOP-1)=0.
-*>          KBOT and KTOP together determine an isolated block
-*>          along the diagonal of the Hessenberg matrix.
+*>          KTOP is integer scalar
 *> \endverbatim
 *>
 *> \param[in] KBOT
 *> \verbatim
-*>          KBOT is INTEGER
-*>          It is assumed without a check that either
-*>          KBOT = N or H(KBOT+1,KBOT)=0.  KBOT and KTOP together
-*>          determine an isolated block along the diagonal of the
-*>          Hessenberg matrix.
+*>          KBOT is integer scalar
+*>             These are the first and last rows and columns of an
+*>             isolated diagonal block upon which the QR sweep is to be
+*>             applied. It is assumed without a check that
+*>                       either KTOP = 1  or   H(KTOP,KTOP-1) = 0
+*>             and
+*>                       either KBOT = N  or   H(KBOT+1,KBOT) = 0.
 *> \endverbatim
 *>
-*> \param[in] NW
+*> \param[in] NSHFTS
 *> \verbatim
-*>          NW is INTEGER
-*>          Deflation window size.  1 .LE. NW .LE. (KBOT-KTOP+1).
+*>          NSHFTS is integer scalar
+*>             NSHFTS gives the number of simultaneous shifts.  NSHFTS
+*>             must be positive and even.
+*> \endverbatim
+*>
+*> \param[in,out] S
+*> \verbatim
+*>          S is COMPLEX*16 array of size (NSHFTS)
+*>             S contains the shifts of origin that define the multi-
+*>             shift QR sweep.  On output S may be reordered.
 *> \endverbatim
 *>
 *> \param[in,out] H
 *> \verbatim
-*>          H is COMPLEX*16 array, dimension (LDH,N)
-*>          On input the initial N-by-N section of H stores the
-*>          Hessenberg matrix undergoing aggressive early deflation.
-*>          On output H has been transformed by a unitary
-*>          similarity transformation, perturbed, and the returned
-*>          to Hessenberg form that (it is to be hoped) has some
-*>          zero subdiagonal entries.
+*>          H is COMPLEX*16 array of size (LDH,N)
+*>             On input H contains a Hessenberg matrix.  On output a
+*>             multi-shift QR sweep with shifts SR(J)+i*SI(J) is applied
+*>             to the isolated diagonal block in rows and columns KTOP
+*>             through KBOT.
 *> \endverbatim
 *>
 *> \param[in] LDH
 *> \verbatim
-*>          LDH is integer
-*>          Leading dimension of H just as declared in the calling
-*>          subroutine.  N .LE. LDH
+*>          LDH is integer scalar
+*>             LDH is the leading dimension of H just as declared in the
+*>             calling procedure.  LDH.GE.MAX(1,N).
 *> \endverbatim
 *>
 *> \param[in] ILOZ
@@ -16550,130 +31937,99 @@
 *> \param[in] IHIZ
 *> \verbatim
 *>          IHIZ is INTEGER
-*>          Specify the rows of Z to which transformations must be
-*>          applied if WANTZ is .TRUE.. 1 .LE. ILOZ .LE. IHIZ .LE. N.
+*>             Specify the rows of Z to which transformations must be
+*>             applied if WANTZ is .TRUE.. 1 .LE. ILOZ .LE. IHIZ .LE. N
 *> \endverbatim
 *>
 *> \param[in,out] Z
 *> \verbatim
-*>          Z is COMPLEX*16 array, dimension (LDZ,N)
-*>          IF WANTZ is .TRUE., then on output, the unitary
-*>          similarity transformation mentioned above has been
-*>          accumulated into Z(ILOZ:IHIZ,ILO:IHI) from the right.
-*>          If WANTZ is .FALSE., then Z is unreferenced.
+*>          Z is COMPLEX*16 array of size (LDZ,IHIZ)
+*>             If WANTZ = .TRUE., then the QR Sweep unitary
+*>             similarity transformation is accumulated into
+*>             Z(ILOZ:IHIZ,ILOZ:IHIZ) from the right.
+*>             If WANTZ = .FALSE., then Z is unreferenced.
 *> \endverbatim
 *>
 *> \param[in] LDZ
 *> \verbatim
-*>          LDZ is integer
-*>          The leading dimension of Z just as declared in the
-*>          calling subroutine.  1 .LE. LDZ.
-*> \endverbatim
-*>
-*> \param[out] NS
-*> \verbatim
-*>          NS is integer
-*>          The number of unconverged (ie approximate) eigenvalues
-*>          returned in SR and SI that may be used as shifts by the
-*>          calling subroutine.
+*>          LDZ is integer scalar
+*>             LDA is the leading dimension of Z just as declared in
+*>             the calling procedure. LDZ.GE.N.
 *> \endverbatim
 *>
-*> \param[out] ND
+*> \param[out] V
 *> \verbatim
-*>          ND is integer
-*>          The number of converged eigenvalues uncovered by this
-*>          subroutine.
+*>          V is COMPLEX*16 array of size (LDV,NSHFTS/2)
 *> \endverbatim
 *>
-*> \param[out] SH
+*> \param[in] LDV
 *> \verbatim
-*>          SH is COMPLEX*16 array, dimension KBOT
-*>          On output, approximate eigenvalues that may
-*>          be used for shifts are stored in SH(KBOT-ND-NS+1)
-*>          through SR(KBOT-ND).  Converged eigenvalues are
-*>          stored in SH(KBOT-ND+1) through SH(KBOT).
+*>          LDV is integer scalar
+*>             LDV is the leading dimension of V as declared in the
+*>             calling procedure.  LDV.GE.3.
 *> \endverbatim
 *>
-*> \param[out] V
+*> \param[out] U
 *> \verbatim
-*>          V is COMPLEX*16 array, dimension (LDV,NW)
-*>          An NW-by-NW work array.
+*>          U is COMPLEX*16 array of size
+*>             (LDU,3*NSHFTS-3)
 *> \endverbatim
 *>
-*> \param[in] LDV
+*> \param[in] LDU
 *> \verbatim
-*>          LDV is integer scalar
-*>          The leading dimension of V just as declared in the
-*>          calling subroutine.  NW .LE. LDV
+*>          LDU is integer scalar
+*>             LDU is the leading dimension of U just as declared in the
+*>             in the calling subroutine.  LDU.GE.3*NSHFTS-3.
 *> \endverbatim
 *>
 *> \param[in] NH
 *> \verbatim
 *>          NH is integer scalar
-*>          The number of columns of T.  NH.GE.NW.
+*>             NH is the number of columns in array WH available for
+*>             workspace. NH.GE.1.
 *> \endverbatim
 *>
-*> \param[out] T
+*> \param[out] WH
 *> \verbatim
-*>          T is COMPLEX*16 array, dimension (LDT,NW)
+*>          WH is COMPLEX*16 array of size (LDWH,NH)
 *> \endverbatim
 *>
-*> \param[in] LDT
+*> \param[in] LDWH
 *> \verbatim
-*>          LDT is integer
-*>          The leading dimension of T just as declared in the
-*>          calling subroutine.  NW .LE. LDT
+*>          LDWH is integer scalar
+*>             Leading dimension of WH just as declared in the
+*>             calling procedure.  LDWH.GE.3*NSHFTS-3.
 *> \endverbatim
 *>
 *> \param[in] NV
 *> \verbatim
-*>          NV is integer
-*>          The number of rows of work array WV available for
-*>          workspace.  NV.GE.NW.
+*>          NV is integer scalar
+*>             NV is the number of rows in WV agailable for workspace.
+*>             NV.GE.1.
 *> \endverbatim
 *>
 *> \param[out] WV
 *> \verbatim
-*>          WV is COMPLEX*16 array, dimension (LDWV,NW)
+*>          WV is COMPLEX*16 array of size
+*>             (LDWV,3*NSHFTS-3)
 *> \endverbatim
 *>
 *> \param[in] LDWV
 *> \verbatim
-*>          LDWV is integer
-*>          The leading dimension of W just as declared in the
-*>          calling subroutine.  NW .LE. LDV
-*> \endverbatim
-*>
-*> \param[out] WORK
-*> \verbatim
-*>          WORK is COMPLEX*16 array, dimension LWORK.
-*>          On exit, WORK(1) is set to an estimate of the optimal value
-*>          of LWORK for the given values of N, NW, KTOP and KBOT.
-*> \endverbatim
-*>
-*> \param[in] LWORK
-*> \verbatim
-*>          LWORK is integer
-*>          The dimension of the work array WORK.  LWORK = 2*NW
-*>          suffices, but greater efficiency may result from larger
-*>          values of LWORK.
-*>
-*>          If LWORK = -1, then a workspace query is assumed; ZLAQR2
-*>          only estimates the optimal workspace size for the given
-*>          values of N, NW, KTOP and KBOT.  The estimate is returned
-*>          in WORK(1).  No error message related to LWORK is issued
-*>          by XERBLA.  Neither H nor Z are accessed.
+*>          LDWV is integer scalar
+*>             LDWV is the leading dimension of WV as declared in the
+*>             in the calling subroutine.  LDWV.GE.NV.
 *> \endverbatim
 *
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date September 2012
+*> \date June 2016
 *
 *> \ingroup complex16OTHERauxiliary
 *
@@ -16682,29 +32038,36 @@
 *>
 *>       Karen Braman and Ralph Byers, Department of Mathematics,
 *>       University of Kansas, USA
+*
+*> \par References:
+*  ================
+*>
+*>       K. Braman, R. Byers and R. Mathias, The Multi-Shift QR
+*>       Algorithm Part I: Maintaining Well Focused Shifts, and Level 3
+*>       Performance, SIAM Journal of Matrix Analysis, volume 23, pages
+*>       929--947, 2002.
 *>
 *  =====================================================================
-      SUBROUTINE ZLAQR2( WANTT, WANTZ, N, KTOP, KBOT, NW, H, LDH, ILOZ,
-     $                   IHIZ, Z, LDZ, NS, ND, SH, V, LDV, NH, T, LDT,
-     $                   NV, WV, LDWV, WORK, LWORK )
+      SUBROUTINE ZLAQR5( WANTT, WANTZ, KACC22, N, KTOP, KBOT, NSHFTS, S,
+     $                   H, LDH, ILOZ, IHIZ, Z, LDZ, V, LDV, U, LDU, NV,
+     $                   WV, LDWV, NH, WH, LDWH )
 *
-*  -- LAPACK auxiliary routine (version 3.4.2) --
+*  -- LAPACK auxiliary routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     September 2012
+*     June 2016
 *
 *     .. Scalar Arguments ..
-      INTEGER            IHIZ, ILOZ, KBOT, KTOP, LDH, LDT, LDV, LDWV,
-     $                   LDZ, LWORK, N, ND, NH, NS, NV, NW
+      INTEGER            IHIZ, ILOZ, KACC22, KBOT, KTOP, LDH, LDU, LDV,
+     $                   LDWH, LDWV, LDZ, N, NH, NSHFTS, NV
       LOGICAL            WANTT, WANTZ
 *     ..
 *     .. Array Arguments ..
-      COMPLEX*16         H( LDH, * ), SH( * ), T( LDT, * ), V( LDV, * ),
-     $                   WORK( * ), WV( LDWV, * ), Z( LDZ, * )
+      COMPLEX*16         H( LDH, * ), S( * ), U( LDU, * ), V( LDV, * ),
+     $                   WH( LDWH, * ), WV( LDWV, * ), Z( LDZ, * )
 *     ..
 *
 *  ================================================================
-*
 *     .. Parameters ..
       COMPLEX*16         ZERO, ONE
       PARAMETER          ( ZERO = ( 0.0d0, 0.0d0 ),
@@ -16713,21 +32076,29 @@
       PARAMETER          ( RZERO = 0.0d0, RONE = 1.0d0 )
 *     ..
 *     .. Local Scalars ..
-      COMPLEX*16         BETA, CDUM, S, TAU
-      DOUBLE PRECISION   FOO, SAFMAX, SAFMIN, SMLNUM, ULP
-      INTEGER            I, IFST, ILST, INFO, INFQR, J, JW, KCOL, KLN,
-     $                   KNT, KROW, KWTOP, LTOP, LWK1, LWK2, LWKOPT
+      COMPLEX*16         ALPHA, BETA, CDUM, REFSUM
+      DOUBLE PRECISION   H11, H12, H21, H22, SAFMAX, SAFMIN, SCL,
+     $                   SMLNUM, TST1, TST2, ULP
+      INTEGER            I2, I4, INCOL, J, J2, J4, JBOT, JCOL, JLEN,
+     $                   JROW, JTOP, K, K1, KDU, KMS, KNZ, KRCOL, KZS,
+     $                   M, M22, MBOT, MEND, MSTART, MTOP, NBMPS, NDCOL,
+     $                   NS, NU
+      LOGICAL            ACCUM, BLK22, BMP22
 *     ..
 *     .. External Functions ..
       DOUBLE PRECISION   DLAMCH
       EXTERNAL           DLAMCH
 *     ..
-*     .. External Subroutines ..
-      EXTERNAL           DLABAD, ZCOPY, ZGEHRD, ZGEMM, ZLACPY, ZLAHQR,
-     $                   ZLARF, ZLARFG, ZLASET, ZTREXC, ZUNMHR
-*     ..
 *     .. Intrinsic Functions ..
-      INTRINSIC          ABS, DBLE, DCMPLX, DCONJG, DIMAG, INT, MAX, MIN
+*
+      INTRINSIC          ABS, DBLE, DCONJG, DIMAG, MAX, MIN, MOD
+*     ..
+*     .. Local Arrays ..
+      COMPLEX*16         VT( 3 )
+*     ..
+*     .. External Subroutines ..
+      EXTERNAL           DLABAD, ZGEMM, ZLACPY, ZLAQR1, ZLARFG, ZLASET,
+     $                   ZTRMM
 *     ..
 *     .. Statement Functions ..
       DOUBLE PRECISION   CABS1
@@ -16737,48 +32108,23 @@
 *     ..
 *     .. Executable Statements ..
 *
-*     ==== Estimate optimal workspace. ====
-*
-      JW = MIN( NW, KBOT-KTOP+1 )
-      IF( JW.LE.2 ) THEN
-         LWKOPT = 1
-      ELSE
-*
-*        ==== Workspace query call to ZGEHRD ====
-*
-         CALL ZGEHRD( JW, 1, JW-1, T, LDT, WORK, WORK, -1, INFO )
-         LWK1 = INT( WORK( 1 ) )
-*
-*        ==== Workspace query call to ZUNMHR ====
-*
-         CALL ZUNMHR( 'R', 'N', JW, JW, 1, JW-1, T, LDT, WORK, V, LDV,
-     $                WORK, -1, INFO )
-         LWK2 = INT( WORK( 1 ) )
+*     ==== If there are no shifts, then there is nothing to do. ====
 *
-*        ==== Optimal workspace ====
+      IF( NSHFTS.LT.2 )
+     $   RETURN
 *
-         LWKOPT = JW + MAX( LWK1, LWK2 )
-      END IF
+*     ==== If the active block is empty or 1-by-1, then there
+*     .    is nothing to do. ====
 *
-*     ==== Quick return in case of workspace query. ====
+      IF( KTOP.GE.KBOT )
+     $   RETURN
 *
-      IF( LWORK.EQ.-1 ) THEN
-         WORK( 1 ) = DCMPLX( LWKOPT, 0 )
-         RETURN
-      END IF
+*     ==== NSHFTS is supposed to be even, but if it is odd,
+*     .    then simply reduce it by one.  ====
 *
-*     ==== Nothing to do ...
-*     ... for an empty active block ... ====
-      NS = 0
-      ND = 0
-      WORK( 1 ) = ONE
-      IF( KTOP.GT.KBOT )
-     $   RETURN
-*     ... nor for an empty deflation window. ====
-      IF( NW.LT.1 )
-     $   RETURN
+      NS = NSHFTS - MOD( NSHFTS, 2 )
 *
-*     ==== Machine constants ====
+*     ==== Machine constants for deflation ====
 *
       SAFMIN = DLAMCH( 'SAFE MINIMUM' )
       SAFMAX = RONE / SAFMIN
@@ -16786,3412 +32132,4256 @@
       ULP = DLAMCH( 'PRECISION' )
       SMLNUM = SAFMIN*( DBLE( N ) / ULP )
 *
-*     ==== Setup deflation window ====
+*     ==== Use accumulated reflections to update far-from-diagonal
+*     .    entries ? ====
 *
-      JW = MIN( NW, KBOT-KTOP+1 )
-      KWTOP = KBOT - JW + 1
-      IF( KWTOP.EQ.KTOP ) THEN
-         S = ZERO
-      ELSE
-         S = H( KWTOP, KWTOP-1 )
-      END IF
+      ACCUM = ( KACC22.EQ.1 ) .OR. ( KACC22.EQ.2 )
+*
+*     ==== If so, exploit the 2-by-2 block structure? ====
+*
+      BLK22 = ( NS.GT.2 ) .AND. ( KACC22.EQ.2 )
+*
+*     ==== clear trash ====
+*
+      IF( KTOP+2.LE.KBOT )
+     $   H( KTOP+2, KTOP ) = ZERO
+*
+*     ==== NBMPS = number of 2-shift bulges in the chain ====
+*
+      NBMPS = NS / 2
+*
+*     ==== KDU = width of slab ====
+*
+      KDU = 6*NBMPS - 3
+*
+*     ==== Create and chase chains of NBMPS bulges ====
+*
+      DO 210 INCOL = 3*( 1-NBMPS ) + KTOP - 1, KBOT - 2, 3*NBMPS - 2
+         NDCOL = INCOL + KDU
+         IF( ACCUM )
+     $      CALL ZLASET( 'ALL', KDU, KDU, ZERO, ONE, U, LDU )
+*
+*        ==== Near-the-diagonal bulge chase.  The following loop
+*        .    performs the near-the-diagonal part of a small bulge
+*        .    multi-shift QR sweep.  Each 6*NBMPS-2 column diagonal
+*        .    chunk extends from column INCOL to column NDCOL
+*        .    (including both column INCOL and column NDCOL). The
+*        .    following loop chases a 3*NBMPS column long chain of
+*        .    NBMPS bulges 3*NBMPS-2 columns to the right.  (INCOL
+*        .    may be less than KTOP and and NDCOL may be greater than
+*        .    KBOT indicating phantom columns from which to chase
+*        .    bulges before they are actually introduced or to which
+*        .    to chase bulges beyond column KBOT.)  ====
+*
+         DO 140 KRCOL = INCOL, MIN( INCOL+3*NBMPS-3, KBOT-2 )
+*
+*           ==== Bulges number MTOP to MBOT are active double implicit
+*           .    shift bulges.  There may or may not also be small
+*           .    2-by-2 bulge, if there is room.  The inactive bulges
+*           .    (if any) must wait until the active bulges have moved
+*           .    down the diagonal to make room.  The phantom matrix
+*           .    paradigm described above helps keep track.  ====
+*
+            MTOP = MAX( 1, ( ( KTOP-1 )-KRCOL+2 ) / 3+1 )
+            MBOT = MIN( NBMPS, ( KBOT-KRCOL ) / 3 )
+            M22 = MBOT + 1
+            BMP22 = ( MBOT.LT.NBMPS ) .AND. ( KRCOL+3*( M22-1 ) ).EQ.
+     $              ( KBOT-2 )
+*
+*           ==== Generate reflections to chase the chain right
+*           .    one column.  (The minimum value of K is KTOP-1.) ====
+*
+            DO 10 M = MTOP, MBOT
+               K = KRCOL + 3*( M-1 )
+               IF( K.EQ.KTOP-1 ) THEN
+                  CALL ZLAQR1( 3, H( KTOP, KTOP ), LDH, S( 2*M-1 ),
+     $                         S( 2*M ), V( 1, M ) )
+                  ALPHA = V( 1, M )
+                  CALL ZLARFG( 3, ALPHA, V( 2, M ), 1, V( 1, M ) )
+               ELSE
+                  BETA = H( K+1, K )
+                  V( 2, M ) = H( K+2, K )
+                  V( 3, M ) = H( K+3, K )
+                  CALL ZLARFG( 3, BETA, V( 2, M ), 1, V( 1, M ) )
+*
+*                 ==== A Bulge may collapse because of vigilant
+*                 .    deflation or destructive underflow.  In the
+*                 .    underflow case, try the two-small-subdiagonals
+*                 .    trick to try to reinflate the bulge.  ====
+*
+                  IF( H( K+3, K ).NE.ZERO .OR. H( K+3, K+1 ).NE.
+     $                ZERO .OR. H( K+3, K+2 ).EQ.ZERO ) THEN
+*
+*                    ==== Typical case: not collapsed (yet). ====
+*
+                     H( K+1, K ) = BETA
+                     H( K+2, K ) = ZERO
+                     H( K+3, K ) = ZERO
+                  ELSE
+*
+*                    ==== Atypical case: collapsed.  Attempt to
+*                    .    reintroduce ignoring H(K+1,K) and H(K+2,K).
+*                    .    If the fill resulting from the new
+*                    .    reflector is too large, then abandon it.
+*                    .    Otherwise, use the new one. ====
+*
+                     CALL ZLAQR1( 3, H( K+1, K+1 ), LDH, S( 2*M-1 ),
+     $                            S( 2*M ), VT )
+                     ALPHA = VT( 1 )
+                     CALL ZLARFG( 3, ALPHA, VT( 2 ), 1, VT( 1 ) )
+                     REFSUM = DCONJG( VT( 1 ) )*
+     $                        ( H( K+1, K )+DCONJG( VT( 2 ) )*
+     $                        H( K+2, K ) )
+*
+                     IF( CABS1( H( K+2, K )-REFSUM*VT( 2 ) )+
+     $                   CABS1( REFSUM*VT( 3 ) ).GT.ULP*
+     $                   ( CABS1( H( K, K ) )+CABS1( H( K+1,
+     $                   K+1 ) )+CABS1( H( K+2, K+2 ) ) ) ) THEN
+*
+*                       ==== Starting a new bulge here would
+*                       .    create non-negligible fill.  Use
+*                       .    the old one with trepidation. ====
+*
+                        H( K+1, K ) = BETA
+                        H( K+2, K ) = ZERO
+                        H( K+3, K ) = ZERO
+                     ELSE
+*
+*                       ==== Stating a new bulge here would
+*                       .    create only negligible fill.
+*                       .    Replace the old reflector with
+*                       .    the new one. ====
+*
+                        H( K+1, K ) = H( K+1, K ) - REFSUM
+                        H( K+2, K ) = ZERO
+                        H( K+3, K ) = ZERO
+                        V( 1, M ) = VT( 1 )
+                        V( 2, M ) = VT( 2 )
+                        V( 3, M ) = VT( 3 )
+                     END IF
+                  END IF
+               END IF
+   10       CONTINUE
+*
+*           ==== Generate a 2-by-2 reflection, if needed. ====
+*
+            K = KRCOL + 3*( M22-1 )
+            IF( BMP22 ) THEN
+               IF( K.EQ.KTOP-1 ) THEN
+                  CALL ZLAQR1( 2, H( K+1, K+1 ), LDH, S( 2*M22-1 ),
+     $                         S( 2*M22 ), V( 1, M22 ) )
+                  BETA = V( 1, M22 )
+                  CALL ZLARFG( 2, BETA, V( 2, M22 ), 1, V( 1, M22 ) )
+               ELSE
+                  BETA = H( K+1, K )
+                  V( 2, M22 ) = H( K+2, K )
+                  CALL ZLARFG( 2, BETA, V( 2, M22 ), 1, V( 1, M22 ) )
+                  H( K+1, K ) = BETA
+                  H( K+2, K ) = ZERO
+               END IF
+            END IF
+*
+*           ==== Multiply H by reflections from the left ====
+*
+            IF( ACCUM ) THEN
+               JBOT = MIN( NDCOL, KBOT )
+            ELSE IF( WANTT ) THEN
+               JBOT = N
+            ELSE
+               JBOT = KBOT
+            END IF
+            DO 30 J = MAX( KTOP, KRCOL ), JBOT
+               MEND = MIN( MBOT, ( J-KRCOL+2 ) / 3 )
+               DO 20 M = MTOP, MEND
+                  K = KRCOL + 3*( M-1 )
+                  REFSUM = DCONJG( V( 1, M ) )*
+     $                     ( H( K+1, J )+DCONJG( V( 2, M ) )*
+     $                     H( K+2, J )+DCONJG( V( 3, M ) )*H( K+3, J ) )
+                  H( K+1, J ) = H( K+1, J ) - REFSUM
+                  H( K+2, J ) = H( K+2, J ) - REFSUM*V( 2, M )
+                  H( K+3, J ) = H( K+3, J ) - REFSUM*V( 3, M )
+   20          CONTINUE
+   30       CONTINUE
+            IF( BMP22 ) THEN
+               K = KRCOL + 3*( M22-1 )
+               DO 40 J = MAX( K+1, KTOP ), JBOT
+                  REFSUM = DCONJG( V( 1, M22 ) )*
+     $                     ( H( K+1, J )+DCONJG( V( 2, M22 ) )*
+     $                     H( K+2, J ) )
+                  H( K+1, J ) = H( K+1, J ) - REFSUM
+                  H( K+2, J ) = H( K+2, J ) - REFSUM*V( 2, M22 )
+   40          CONTINUE
+            END IF
+*
+*           ==== Multiply H by reflections from the right.
+*           .    Delay filling in the last row until the
+*           .    vigilant deflation check is complete. ====
+*
+            IF( ACCUM ) THEN
+               JTOP = MAX( KTOP, INCOL )
+            ELSE IF( WANTT ) THEN
+               JTOP = 1
+            ELSE
+               JTOP = KTOP
+            END IF
+            DO 80 M = MTOP, MBOT
+               IF( V( 1, M ).NE.ZERO ) THEN
+                  K = KRCOL + 3*( M-1 )
+                  DO 50 J = JTOP, MIN( KBOT, K+3 )
+                     REFSUM = V( 1, M )*( H( J, K+1 )+V( 2, M )*
+     $                        H( J, K+2 )+V( 3, M )*H( J, K+3 ) )
+                     H( J, K+1 ) = H( J, K+1 ) - REFSUM
+                     H( J, K+2 ) = H( J, K+2 ) -
+     $                             REFSUM*DCONJG( V( 2, M ) )
+                     H( J, K+3 ) = H( J, K+3 ) -
+     $                             REFSUM*DCONJG( V( 3, M ) )
+   50             CONTINUE
+*
+                  IF( ACCUM ) THEN
+*
+*                    ==== Accumulate U. (If necessary, update Z later
+*                    .    with with an efficient matrix-matrix
+*                    .    multiply.) ====
+*
+                     KMS = K - INCOL
+                     DO 60 J = MAX( 1, KTOP-INCOL ), KDU
+                        REFSUM = V( 1, M )*( U( J, KMS+1 )+V( 2, M )*
+     $                           U( J, KMS+2 )+V( 3, M )*U( J, KMS+3 ) )
+                        U( J, KMS+1 ) = U( J, KMS+1 ) - REFSUM
+                        U( J, KMS+2 ) = U( J, KMS+2 ) -
+     $                                  REFSUM*DCONJG( V( 2, M ) )
+                        U( J, KMS+3 ) = U( J, KMS+3 ) -
+     $                                  REFSUM*DCONJG( V( 3, M ) )
+   60                CONTINUE
+                  ELSE IF( WANTZ ) THEN
+*
+*                    ==== U is not accumulated, so update Z
+*                    .    now by multiplying by reflections
+*                    .    from the right. ====
 *
-      IF( KBOT.EQ.KWTOP ) THEN
+                     DO 70 J = ILOZ, IHIZ
+                        REFSUM = V( 1, M )*( Z( J, K+1 )+V( 2, M )*
+     $                           Z( J, K+2 )+V( 3, M )*Z( J, K+3 ) )
+                        Z( J, K+1 ) = Z( J, K+1 ) - REFSUM
+                        Z( J, K+2 ) = Z( J, K+2 ) -
+     $                                REFSUM*DCONJG( V( 2, M ) )
+                        Z( J, K+3 ) = Z( J, K+3 ) -
+     $                                REFSUM*DCONJG( V( 3, M ) )
+   70                CONTINUE
+                  END IF
+               END IF
+   80       CONTINUE
 *
-*        ==== 1-by-1 deflation window: not much to do ====
+*           ==== Special case: 2-by-2 reflection (if needed) ====
 *
-         SH( KWTOP ) = H( KWTOP, KWTOP )
-         NS = 1
-         ND = 0
-         IF( CABS1( S ).LE.MAX( SMLNUM, ULP*CABS1( H( KWTOP,
-     $       KWTOP ) ) ) ) THEN
-            NS = 0
-            ND = 1
-            IF( KWTOP.GT.KTOP )
-     $         H( KWTOP, KWTOP-1 ) = ZERO
-         END IF
-         WORK( 1 ) = ONE
-         RETURN
-      END IF
+            K = KRCOL + 3*( M22-1 )
+            IF( BMP22 ) THEN
+               IF ( V( 1, M22 ).NE.ZERO ) THEN
+                  DO 90 J = JTOP, MIN( KBOT, K+3 )
+                     REFSUM = V( 1, M22 )*( H( J, K+1 )+V( 2, M22 )*
+     $                        H( J, K+2 ) )
+                     H( J, K+1 ) = H( J, K+1 ) - REFSUM
+                     H( J, K+2 ) = H( J, K+2 ) -
+     $                             REFSUM*DCONJG( V( 2, M22 ) )
+   90             CONTINUE
 *
-*     ==== Convert to spike-triangular form.  (In case of a
-*     .    rare QR failure, this routine continues to do
-*     .    aggressive early deflation using that part of
-*     .    the deflation window that converged using INFQR
-*     .    here and there to keep track.) ====
+                  IF( ACCUM ) THEN
+                     KMS = K - INCOL
+                     DO 100 J = MAX( 1, KTOP-INCOL ), KDU
+                        REFSUM = V( 1, M22 )*( U( J, KMS+1 )+
+     $                           V( 2, M22 )*U( J, KMS+2 ) )
+                        U( J, KMS+1 ) = U( J, KMS+1 ) - REFSUM
+                        U( J, KMS+2 ) = U( J, KMS+2 ) -
+     $                                  REFSUM*DCONJG( V( 2, M22 ) )
+  100                CONTINUE
+                  ELSE IF( WANTZ ) THEN
+                     DO 110 J = ILOZ, IHIZ
+                        REFSUM = V( 1, M22 )*( Z( J, K+1 )+V( 2, M22 )*
+     $                           Z( J, K+2 ) )
+                        Z( J, K+1 ) = Z( J, K+1 ) - REFSUM
+                        Z( J, K+2 ) = Z( J, K+2 ) -
+     $                                REFSUM*DCONJG( V( 2, M22 ) )
+  110                CONTINUE
+                  END IF
+               END IF
+            END IF
 *
-      CALL ZLACPY( 'U', JW, JW, H( KWTOP, KWTOP ), LDH, T, LDT )
-      CALL ZCOPY( JW-1, H( KWTOP+1, KWTOP ), LDH+1, T( 2, 1 ), LDT+1 )
+*           ==== Vigilant deflation check ====
 *
-      CALL ZLASET( 'A', JW, JW, ZERO, ONE, V, LDV )
-      CALL ZLAHQR( .true., .true., JW, 1, JW, T, LDT, SH( KWTOP ), 1,
-     $             JW, V, LDV, INFQR )
+            MSTART = MTOP
+            IF( KRCOL+3*( MSTART-1 ).LT.KTOP )
+     $         MSTART = MSTART + 1
+            MEND = MBOT
+            IF( BMP22 )
+     $         MEND = MEND + 1
+            IF( KRCOL.EQ.KBOT-2 )
+     $         MEND = MEND + 1
+            DO 120 M = MSTART, MEND
+               K = MIN( KBOT-1, KRCOL+3*( M-1 ) )
 *
-*     ==== Deflation detection loop ====
+*              ==== The following convergence test requires that
+*              .    the tradition small-compared-to-nearby-diagonals
+*              .    criterion and the Ahues & Tisseur (LAWN 122, 1997)
+*              .    criteria both be satisfied.  The latter improves
+*              .    accuracy in some examples. Falling back on an
+*              .    alternate convergence criterion when TST1 or TST2
+*              .    is zero (as done here) is traditional but probably
+*              .    unnecessary. ====
 *
-      NS = JW
-      ILST = INFQR + 1
-      DO 10 KNT = INFQR + 1, JW
+               IF( H( K+1, K ).NE.ZERO ) THEN
+                  TST1 = CABS1( H( K, K ) ) + CABS1( H( K+1, K+1 ) )
+                  IF( TST1.EQ.RZERO ) THEN
+                     IF( K.GE.KTOP+1 )
+     $                  TST1 = TST1 + CABS1( H( K, K-1 ) )
+                     IF( K.GE.KTOP+2 )
+     $                  TST1 = TST1 + CABS1( H( K, K-2 ) )
+                     IF( K.GE.KTOP+3 )
+     $                  TST1 = TST1 + CABS1( H( K, K-3 ) )
+                     IF( K.LE.KBOT-2 )
+     $                  TST1 = TST1 + CABS1( H( K+2, K+1 ) )
+                     IF( K.LE.KBOT-3 )
+     $                  TST1 = TST1 + CABS1( H( K+3, K+1 ) )
+                     IF( K.LE.KBOT-4 )
+     $                  TST1 = TST1 + CABS1( H( K+4, K+1 ) )
+                  END IF
+                  IF( CABS1( H( K+1, K ) ).LE.MAX( SMLNUM, ULP*TST1 ) )
+     $                 THEN
+                     H12 = MAX( CABS1( H( K+1, K ) ),
+     $                     CABS1( H( K, K+1 ) ) )
+                     H21 = MIN( CABS1( H( K+1, K ) ),
+     $                     CABS1( H( K, K+1 ) ) )
+                     H11 = MAX( CABS1( H( K+1, K+1 ) ),
+     $                     CABS1( H( K, K )-H( K+1, K+1 ) ) )
+                     H22 = MIN( CABS1( H( K+1, K+1 ) ),
+     $                     CABS1( H( K, K )-H( K+1, K+1 ) ) )
+                     SCL = H11 + H12
+                     TST2 = H22*( H11 / SCL )
 *
-*        ==== Small spike tip deflation test ====
+                     IF( TST2.EQ.RZERO .OR. H21*( H12 / SCL ).LE.
+     $                   MAX( SMLNUM, ULP*TST2 ) )H( K+1, K ) = ZERO
+                  END IF
+               END IF
+  120       CONTINUE
 *
-         FOO = CABS1( T( NS, NS ) )
-         IF( FOO.EQ.RZERO )
-     $      FOO = CABS1( S )
-         IF( CABS1( S )*CABS1( V( 1, NS ) ).LE.MAX( SMLNUM, ULP*FOO ) )
-     $        THEN
+*           ==== Fill in the last row of each bulge. ====
 *
-*           ==== One more converged eigenvalue ====
+            MEND = MIN( NBMPS, ( KBOT-KRCOL-1 ) / 3 )
+            DO 130 M = MTOP, MEND
+               K = KRCOL + 3*( M-1 )
+               REFSUM = V( 1, M )*V( 3, M )*H( K+4, K+3 )
+               H( K+4, K+1 ) = -REFSUM
+               H( K+4, K+2 ) = -REFSUM*DCONJG( V( 2, M ) )
+               H( K+4, K+3 ) = H( K+4, K+3 ) -
+     $                         REFSUM*DCONJG( V( 3, M ) )
+  130       CONTINUE
 *
-            NS = NS - 1
-         ELSE
+*           ==== End of near-the-diagonal bulge chase. ====
 *
-*           ==== One undeflatable eigenvalue.  Move it up out of the
-*           .    way.   (ZTREXC can not fail in this case.) ====
+  140    CONTINUE
 *
-            IFST = NS
-            CALL ZTREXC( 'V', JW, T, LDT, V, LDV, IFST, ILST, INFO )
-            ILST = ILST + 1
-         END IF
-   10 CONTINUE
+*        ==== Use U (if accumulated) to update far-from-diagonal
+*        .    entries in H.  If required, use U to update Z as
+*        .    well. ====
 *
-*        ==== Return to Hessenberg form ====
+         IF( ACCUM ) THEN
+            IF( WANTT ) THEN
+               JTOP = 1
+               JBOT = N
+            ELSE
+               JTOP = KTOP
+               JBOT = KBOT
+            END IF
+            IF( ( .NOT.BLK22 ) .OR. ( INCOL.LT.KTOP ) .OR.
+     $          ( NDCOL.GT.KBOT ) .OR. ( NS.LE.2 ) ) THEN
 *
-      IF( NS.EQ.0 )
-     $   S = ZERO
+*              ==== Updates not exploiting the 2-by-2 block
+*              .    structure of U.  K1 and NU keep track of
+*              .    the location and size of U in the special
+*              .    cases of introducing bulges and chasing
+*              .    bulges off the bottom.  In these special
+*              .    cases and in case the number of shifts
+*              .    is NS = 2, there is no 2-by-2 block
+*              .    structure to exploit.  ====
 *
-      IF( NS.LT.JW ) THEN
+               K1 = MAX( 1, KTOP-INCOL )
+               NU = ( KDU-MAX( 0, NDCOL-KBOT ) ) - K1 + 1
 *
-*        ==== sorting the diagonal of T improves accuracy for
-*        .    graded matrices.  ====
+*              ==== Horizontal Multiply ====
 *
-         DO 30 I = INFQR + 1, NS
-            IFST = I
-            DO 20 J = I + 1, NS
-               IF( CABS1( T( J, J ) ).GT.CABS1( T( IFST, IFST ) ) )
-     $            IFST = J
-   20       CONTINUE
-            ILST = I
-            IF( IFST.NE.ILST )
-     $         CALL ZTREXC( 'V', JW, T, LDT, V, LDV, IFST, ILST, INFO )
-   30    CONTINUE
-      END IF
+               DO 150 JCOL = MIN( NDCOL, KBOT ) + 1, JBOT, NH
+                  JLEN = MIN( NH, JBOT-JCOL+1 )
+                  CALL ZGEMM( 'C', 'N', NU, JLEN, NU, ONE, U( K1, K1 ),
+     $                        LDU, H( INCOL+K1, JCOL ), LDH, ZERO, WH,
+     $                        LDWH )
+                  CALL ZLACPY( 'ALL', NU, JLEN, WH, LDWH,
+     $                         H( INCOL+K1, JCOL ), LDH )
+  150          CONTINUE
 *
-*     ==== Restore shift/eigenvalue array from T ====
+*              ==== Vertical multiply ====
 *
-      DO 40 I = INFQR + 1, JW
-         SH( KWTOP+I-1 ) = T( I, I )
-   40 CONTINUE
+               DO 160 JROW = JTOP, MAX( KTOP, INCOL ) - 1, NV
+                  JLEN = MIN( NV, MAX( KTOP, INCOL )-JROW )
+                  CALL ZGEMM( 'N', 'N', JLEN, NU, NU, ONE,
+     $                        H( JROW, INCOL+K1 ), LDH, U( K1, K1 ),
+     $                        LDU, ZERO, WV, LDWV )
+                  CALL ZLACPY( 'ALL', JLEN, NU, WV, LDWV,
+     $                         H( JROW, INCOL+K1 ), LDH )
+  160          CONTINUE
 *
+*              ==== Z multiply (also vertical) ====
 *
-      IF( NS.LT.JW .OR. S.EQ.ZERO ) THEN
-         IF( NS.GT.1 .AND. S.NE.ZERO ) THEN
+               IF( WANTZ ) THEN
+                  DO 170 JROW = ILOZ, IHIZ, NV
+                     JLEN = MIN( NV, IHIZ-JROW+1 )
+                     CALL ZGEMM( 'N', 'N', JLEN, NU, NU, ONE,
+     $                           Z( JROW, INCOL+K1 ), LDZ, U( K1, K1 ),
+     $                           LDU, ZERO, WV, LDWV )
+                     CALL ZLACPY( 'ALL', JLEN, NU, WV, LDWV,
+     $                            Z( JROW, INCOL+K1 ), LDZ )
+  170             CONTINUE
+               END IF
+            ELSE
 *
-*           ==== Reflect spike back into lower triangle ====
+*              ==== Updates exploiting U's 2-by-2 block structure.
+*              .    (I2, I4, J2, J4 are the last rows and columns
+*              .    of the blocks.) ====
 *
-            CALL ZCOPY( NS, V, LDV, WORK, 1 )
-            DO 50 I = 1, NS
-               WORK( I ) = DCONJG( WORK( I ) )
-   50       CONTINUE
-            BETA = WORK( 1 )
-            CALL ZLARFG( NS, BETA, WORK( 2 ), 1, TAU )
-            WORK( 1 ) = ONE
+               I2 = ( KDU+1 ) / 2
+               I4 = KDU
+               J2 = I4 - I2
+               J4 = KDU
 *
-            CALL ZLASET( 'L', JW-2, JW-2, ZERO, ZERO, T( 3, 1 ), LDT )
+*              ==== KZS and KNZ deal with the band of zeros
+*              .    along the diagonal of one of the triangular
+*              .    blocks. ====
 *
-            CALL ZLARF( 'L', NS, JW, WORK, 1, DCONJG( TAU ), T, LDT,
-     $                  WORK( JW+1 ) )
-            CALL ZLARF( 'R', NS, NS, WORK, 1, TAU, T, LDT,
-     $                  WORK( JW+1 ) )
-            CALL ZLARF( 'R', JW, NS, WORK, 1, TAU, V, LDV,
-     $                  WORK( JW+1 ) )
+               KZS = ( J4-J2 ) - ( NS+1 )
+               KNZ = NS + 1
 *
-            CALL ZGEHRD( JW, 1, NS, T, LDT, WORK, WORK( JW+1 ),
-     $                   LWORK-JW, INFO )
-         END IF
+*              ==== Horizontal multiply ====
 *
-*        ==== Copy updated reduced window into place ====
+               DO 180 JCOL = MIN( NDCOL, KBOT ) + 1, JBOT, NH
+                  JLEN = MIN( NH, JBOT-JCOL+1 )
 *
-         IF( KWTOP.GT.1 )
-     $      H( KWTOP, KWTOP-1 ) = S*DCONJG( V( 1, 1 ) )
-         CALL ZLACPY( 'U', JW, JW, T, LDT, H( KWTOP, KWTOP ), LDH )
-         CALL ZCOPY( JW-1, T( 2, 1 ), LDT+1, H( KWTOP+1, KWTOP ),
-     $               LDH+1 )
+*                 ==== Copy bottom of H to top+KZS of scratch ====
+*                  (The first KZS rows get multiplied by zero.) ====
 *
-*        ==== Accumulate orthogonal matrix in order update
-*        .    H and Z, if requested.  ====
+                  CALL ZLACPY( 'ALL', KNZ, JLEN, H( INCOL+1+J2, JCOL ),
+     $                         LDH, WH( KZS+1, 1 ), LDWH )
 *
-         IF( NS.GT.1 .AND. S.NE.ZERO )
-     $      CALL ZUNMHR( 'R', 'N', JW, NS, 1, NS, T, LDT, WORK, V, LDV,
-     $                   WORK( JW+1 ), LWORK-JW, INFO )
+*                 ==== Multiply by U21**H ====
 *
-*        ==== Update vertical slab in H ====
+                  CALL ZLASET( 'ALL', KZS, JLEN, ZERO, ZERO, WH, LDWH )
+                  CALL ZTRMM( 'L', 'U', 'C', 'N', KNZ, JLEN, ONE,
+     $                        U( J2+1, 1+KZS ), LDU, WH( KZS+1, 1 ),
+     $                        LDWH )
 *
-         IF( WANTT ) THEN
-            LTOP = 1
-         ELSE
-            LTOP = KTOP
-         END IF
-         DO 60 KROW = LTOP, KWTOP - 1, NV
-            KLN = MIN( NV, KWTOP-KROW )
-            CALL ZGEMM( 'N', 'N', KLN, JW, JW, ONE, H( KROW, KWTOP ),
-     $                  LDH, V, LDV, ZERO, WV, LDWV )
-            CALL ZLACPY( 'A', KLN, JW, WV, LDWV, H( KROW, KWTOP ), LDH )
-   60    CONTINUE
+*                 ==== Multiply top of H by U11**H ====
 *
-*        ==== Update horizontal slab in H ====
+                  CALL ZGEMM( 'C', 'N', I2, JLEN, J2, ONE, U, LDU,
+     $                        H( INCOL+1, JCOL ), LDH, ONE, WH, LDWH )
 *
-         IF( WANTT ) THEN
-            DO 70 KCOL = KBOT + 1, N, NH
-               KLN = MIN( NH, N-KCOL+1 )
-               CALL ZGEMM( 'C', 'N', JW, KLN, JW, ONE, V, LDV,
-     $                     H( KWTOP, KCOL ), LDH, ZERO, T, LDT )
-               CALL ZLACPY( 'A', JW, KLN, T, LDT, H( KWTOP, KCOL ),
-     $                      LDH )
-   70       CONTINUE
-         END IF
+*                 ==== Copy top of H to bottom of WH ====
 *
-*        ==== Update vertical slab in Z ====
+                  CALL ZLACPY( 'ALL', J2, JLEN, H( INCOL+1, JCOL ), LDH,
+     $                         WH( I2+1, 1 ), LDWH )
 *
-         IF( WANTZ ) THEN
-            DO 80 KROW = ILOZ, IHIZ, NV
-               KLN = MIN( NV, IHIZ-KROW+1 )
-               CALL ZGEMM( 'N', 'N', KLN, JW, JW, ONE, Z( KROW, KWTOP ),
-     $                     LDZ, V, LDV, ZERO, WV, LDWV )
-               CALL ZLACPY( 'A', KLN, JW, WV, LDWV, Z( KROW, KWTOP ),
-     $                      LDZ )
-   80       CONTINUE
-         END IF
-      END IF
+*                 ==== Multiply by U21**H ====
 *
-*     ==== Return the number of deflations ... ====
+                  CALL ZTRMM( 'L', 'L', 'C', 'N', J2, JLEN, ONE,
+     $                        U( 1, I2+1 ), LDU, WH( I2+1, 1 ), LDWH )
 *
-      ND = JW - NS
+*                 ==== Multiply by U22 ====
 *
-*     ==== ... and the number of shifts. (Subtracting
-*     .    INFQR from the spike length takes care
-*     .    of the case of a rare QR failure while
-*     .    calculating eigenvalues of the deflation
-*     .    window.)  ====
+                  CALL ZGEMM( 'C', 'N', I4-I2, JLEN, J4-J2, ONE,
+     $                        U( J2+1, I2+1 ), LDU,
+     $                        H( INCOL+1+J2, JCOL ), LDH, ONE,
+     $                        WH( I2+1, 1 ), LDWH )
 *
-      NS = NS - INFQR
+*                 ==== Copy it back ====
 *
-*      ==== Return optimal workspace. ====
+                  CALL ZLACPY( 'ALL', KDU, JLEN, WH, LDWH,
+     $                         H( INCOL+1, JCOL ), LDH )
+  180          CONTINUE
 *
-      WORK( 1 ) = DCMPLX( LWKOPT, 0 )
+*              ==== Vertical multiply ====
 *
-*     ==== End of ZLAQR2 ====
+               DO 190 JROW = JTOP, MAX( INCOL, KTOP ) - 1, NV
+                  JLEN = MIN( NV, MAX( INCOL, KTOP )-JROW )
 *
-      END
-*> \brief \b ZLAQR3 performs the unitary similarity transformation of a Hessenberg matrix to detect and deflate fully converged eigenvalues from a trailing principal submatrix (aggressive early deflation).
+*                 ==== Copy right of H to scratch (the first KZS
+*                 .    columns get multiplied by zero) ====
 *
-*  =========== DOCUMENTATION ===========
+                  CALL ZLACPY( 'ALL', JLEN, KNZ, H( JROW, INCOL+1+J2 ),
+     $                         LDH, WV( 1, 1+KZS ), LDWV )
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+*                 ==== Multiply by U21 ====
 *
-*> \htmlonly
-*> Download ZLAQR3 + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/zlaqr3.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/zlaqr3.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/zlaqr3.f"> 
-*> [TXT]</a>
-*> \endhtmlonly 
+                  CALL ZLASET( 'ALL', JLEN, KZS, ZERO, ZERO, WV, LDWV )
+                  CALL ZTRMM( 'R', 'U', 'N', 'N', JLEN, KNZ, ONE,
+     $                        U( J2+1, 1+KZS ), LDU, WV( 1, 1+KZS ),
+     $                        LDWV )
 *
-*  Definition:
-*  ===========
+*                 ==== Multiply by U11 ====
 *
-*       SUBROUTINE ZLAQR3( WANTT, WANTZ, N, KTOP, KBOT, NW, H, LDH, ILOZ,
-*                          IHIZ, Z, LDZ, NS, ND, SH, V, LDV, NH, T, LDT,
-*                          NV, WV, LDWV, WORK, LWORK )
-* 
-*       .. Scalar Arguments ..
-*       INTEGER            IHIZ, ILOZ, KBOT, KTOP, LDH, LDT, LDV, LDWV,
-*      $                   LDZ, LWORK, N, ND, NH, NS, NV, NW
-*       LOGICAL            WANTT, WANTZ
-*       ..
-*       .. Array Arguments ..
-*       COMPLEX*16         H( LDH, * ), SH( * ), T( LDT, * ), V( LDV, * ),
-*      $                   WORK( * ), WV( LDWV, * ), Z( LDZ, * )
-*       ..
-*  
+                  CALL ZGEMM( 'N', 'N', JLEN, I2, J2, ONE,
+     $                        H( JROW, INCOL+1 ), LDH, U, LDU, ONE, WV,
+     $                        LDWV )
 *
-*> \par Purpose:
-*  =============
-*>
-*> \verbatim
-*>
-*>    Aggressive early deflation:
-*>
-*>    ZLAQR3 accepts as input an upper Hessenberg matrix
-*>    H and performs an unitary similarity transformation
-*>    designed to detect and deflate fully converged eigenvalues from
-*>    a trailing principal submatrix.  On output H has been over-
-*>    written by a new Hessenberg matrix that is a perturbation of
-*>    an unitary similarity transformation of H.  It is to be
-*>    hoped that the final version of H has many zero subdiagonal
-*>    entries.
-*>
-*> \endverbatim
+*                 ==== Copy left of H to right of scratch ====
 *
-*  Arguments:
-*  ==========
+                  CALL ZLACPY( 'ALL', JLEN, J2, H( JROW, INCOL+1 ), LDH,
+     $                         WV( 1, 1+I2 ), LDWV )
 *
-*> \param[in] WANTT
-*> \verbatim
-*>          WANTT is LOGICAL
-*>          If .TRUE., then the Hessenberg matrix H is fully updated
-*>          so that the triangular Schur factor may be
-*>          computed (in cooperation with the calling subroutine).
-*>          If .FALSE., then only enough of H is updated to preserve
-*>          the eigenvalues.
-*> \endverbatim
-*>
-*> \param[in] WANTZ
-*> \verbatim
-*>          WANTZ is LOGICAL
-*>          If .TRUE., then the unitary matrix Z is updated so
-*>          so that the unitary Schur factor may be computed
-*>          (in cooperation with the calling subroutine).
-*>          If .FALSE., then Z is not referenced.
-*> \endverbatim
-*>
-*> \param[in] N
-*> \verbatim
-*>          N is INTEGER
-*>          The order of the matrix H and (if WANTZ is .TRUE.) the
-*>          order of the unitary matrix Z.
-*> \endverbatim
-*>
-*> \param[in] KTOP
-*> \verbatim
-*>          KTOP is INTEGER
-*>          It is assumed that either KTOP = 1 or H(KTOP,KTOP-1)=0.
-*>          KBOT and KTOP together determine an isolated block
-*>          along the diagonal of the Hessenberg matrix.
-*> \endverbatim
-*>
-*> \param[in] KBOT
-*> \verbatim
-*>          KBOT is INTEGER
-*>          It is assumed without a check that either
-*>          KBOT = N or H(KBOT+1,KBOT)=0.  KBOT and KTOP together
-*>          determine an isolated block along the diagonal of the
-*>          Hessenberg matrix.
-*> \endverbatim
-*>
-*> \param[in] NW
-*> \verbatim
-*>          NW is INTEGER
-*>          Deflation window size.  1 .LE. NW .LE. (KBOT-KTOP+1).
-*> \endverbatim
-*>
-*> \param[in,out] H
-*> \verbatim
-*>          H is COMPLEX*16 array, dimension (LDH,N)
-*>          On input the initial N-by-N section of H stores the
-*>          Hessenberg matrix undergoing aggressive early deflation.
-*>          On output H has been transformed by a unitary
-*>          similarity transformation, perturbed, and the returned
-*>          to Hessenberg form that (it is to be hoped) has some
-*>          zero subdiagonal entries.
-*> \endverbatim
-*>
-*> \param[in] LDH
-*> \verbatim
-*>          LDH is integer
-*>          Leading dimension of H just as declared in the calling
-*>          subroutine.  N .LE. LDH
-*> \endverbatim
-*>
-*> \param[in] ILOZ
-*> \verbatim
-*>          ILOZ is INTEGER
-*> \endverbatim
-*>
-*> \param[in] IHIZ
-*> \verbatim
-*>          IHIZ is INTEGER
-*>          Specify the rows of Z to which transformations must be
-*>          applied if WANTZ is .TRUE.. 1 .LE. ILOZ .LE. IHIZ .LE. N.
-*> \endverbatim
-*>
-*> \param[in,out] Z
-*> \verbatim
-*>          Z is COMPLEX*16 array, dimension (LDZ,N)
-*>          IF WANTZ is .TRUE., then on output, the unitary
-*>          similarity transformation mentioned above has been
-*>          accumulated into Z(ILOZ:IHIZ,ILO:IHI) from the right.
-*>          If WANTZ is .FALSE., then Z is unreferenced.
-*> \endverbatim
-*>
-*> \param[in] LDZ
-*> \verbatim
-*>          LDZ is integer
-*>          The leading dimension of Z just as declared in the
-*>          calling subroutine.  1 .LE. LDZ.
-*> \endverbatim
-*>
-*> \param[out] NS
-*> \verbatim
-*>          NS is integer
-*>          The number of unconverged (ie approximate) eigenvalues
-*>          returned in SR and SI that may be used as shifts by the
-*>          calling subroutine.
-*> \endverbatim
-*>
-*> \param[out] ND
-*> \verbatim
-*>          ND is integer
-*>          The number of converged eigenvalues uncovered by this
-*>          subroutine.
-*> \endverbatim
+*                 ==== Multiply by U21 ====
+*
+                  CALL ZTRMM( 'R', 'L', 'N', 'N', JLEN, I4-I2, ONE,
+     $                        U( 1, I2+1 ), LDU, WV( 1, 1+I2 ), LDWV )
+*
+*                 ==== Multiply by U22 ====
+*
+                  CALL ZGEMM( 'N', 'N', JLEN, I4-I2, J4-J2, ONE,
+     $                        H( JROW, INCOL+1+J2 ), LDH,
+     $                        U( J2+1, I2+1 ), LDU, ONE, WV( 1, 1+I2 ),
+     $                        LDWV )
+*
+*                 ==== Copy it back ====
+*
+                  CALL ZLACPY( 'ALL', JLEN, KDU, WV, LDWV,
+     $                         H( JROW, INCOL+1 ), LDH )
+  190          CONTINUE
+*
+*              ==== Multiply Z (also vertical) ====
+*
+               IF( WANTZ ) THEN
+                  DO 200 JROW = ILOZ, IHIZ, NV
+                     JLEN = MIN( NV, IHIZ-JROW+1 )
+*
+*                    ==== Copy right of Z to left of scratch (first
+*                    .     KZS columns get multiplied by zero) ====
+*
+                     CALL ZLACPY( 'ALL', JLEN, KNZ,
+     $                            Z( JROW, INCOL+1+J2 ), LDZ,
+     $                            WV( 1, 1+KZS ), LDWV )
+*
+*                    ==== Multiply by U12 ====
+*
+                     CALL ZLASET( 'ALL', JLEN, KZS, ZERO, ZERO, WV,
+     $                            LDWV )
+                     CALL ZTRMM( 'R', 'U', 'N', 'N', JLEN, KNZ, ONE,
+     $                           U( J2+1, 1+KZS ), LDU, WV( 1, 1+KZS ),
+     $                           LDWV )
+*
+*                    ==== Multiply by U11 ====
+*
+                     CALL ZGEMM( 'N', 'N', JLEN, I2, J2, ONE,
+     $                           Z( JROW, INCOL+1 ), LDZ, U, LDU, ONE,
+     $                           WV, LDWV )
+*
+*                    ==== Copy left of Z to right of scratch ====
+*
+                     CALL ZLACPY( 'ALL', JLEN, J2, Z( JROW, INCOL+1 ),
+     $                            LDZ, WV( 1, 1+I2 ), LDWV )
+*
+*                    ==== Multiply by U21 ====
+*
+                     CALL ZTRMM( 'R', 'L', 'N', 'N', JLEN, I4-I2, ONE,
+     $                           U( 1, I2+1 ), LDU, WV( 1, 1+I2 ),
+     $                           LDWV )
+*
+*                    ==== Multiply by U22 ====
+*
+                     CALL ZGEMM( 'N', 'N', JLEN, I4-I2, J4-J2, ONE,
+     $                           Z( JROW, INCOL+1+J2 ), LDZ,
+     $                           U( J2+1, I2+1 ), LDU, ONE,
+     $                           WV( 1, 1+I2 ), LDWV )
+*
+*                    ==== Copy the result back to Z ====
+*
+                     CALL ZLACPY( 'ALL', JLEN, KDU, WV, LDWV,
+     $                            Z( JROW, INCOL+1 ), LDZ )
+  200             CONTINUE
+               END IF
+            END IF
+         END IF
+  210 CONTINUE
+*
+*     ==== End of ZLAQR5 ====
+*
+      END
+*> \brief \b ZLARCM copies all or part of a real two-dimensional array to a complex array.
+*
+*  =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
+*
+*> \htmlonly
+*> Download ZLARCM + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/zlarcm.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/zlarcm.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/zlarcm.f">
+*> [TXT]</a>
+*> \endhtmlonly
+*
+*  Definition:
+*  ===========
+*
+*       SUBROUTINE ZLARCM( M, N, A, LDA, B, LDB, C, LDC, RWORK )
+*
+*       .. Scalar Arguments ..
+*       INTEGER            LDA, LDB, LDC, M, N
+*       ..
+*       .. Array Arguments ..
+*       DOUBLE PRECISION   A( LDA, * ), RWORK( * )
+*       COMPLEX*16         B( LDB, * ), C( LDC, * )
+*       ..
+*
+*
+*> \par Purpose:
+*  =============
 *>
-*> \param[out] SH
 *> \verbatim
-*>          SH is COMPLEX*16 array, dimension KBOT
-*>          On output, approximate eigenvalues that may
-*>          be used for shifts are stored in SH(KBOT-ND-NS+1)
-*>          through SR(KBOT-ND).  Converged eigenvalues are
-*>          stored in SH(KBOT-ND+1) through SH(KBOT).
-*> \endverbatim
 *>
-*> \param[out] V
-*> \verbatim
-*>          V is COMPLEX*16 array, dimension (LDV,NW)
-*>          An NW-by-NW work array.
+*> ZLARCM performs a very simple matrix-matrix multiplication:
+*>          C := A * B,
+*> where A is M by M and real; B is M by N and complex;
+*> C is M by N and complex.
 *> \endverbatim
-*>
-*> \param[in] LDV
+*
+*  Arguments:
+*  ==========
+*
+*> \param[in] M
 *> \verbatim
-*>          LDV is integer scalar
-*>          The leading dimension of V just as declared in the
-*>          calling subroutine.  NW .LE. LDV
+*>          M is INTEGER
+*>          The number of rows of the matrix A and of the matrix C.
+*>          M >= 0.
 *> \endverbatim
 *>
-*> \param[in] NH
+*> \param[in] N
 *> \verbatim
-*>          NH is integer scalar
-*>          The number of columns of T.  NH.GE.NW.
+*>          N is INTEGER
+*>          The number of columns and rows of the matrix B and
+*>          the number of columns of the matrix C.
+*>          N >= 0.
 *> \endverbatim
 *>
-*> \param[out] T
+*> \param[in] A
 *> \verbatim
-*>          T is COMPLEX*16 array, dimension (LDT,NW)
+*>          A is DOUBLE PRECISION array, dimension (LDA, M)
+*>          On entry, A contains the M by M matrix A.
 *> \endverbatim
 *>
-*> \param[in] LDT
+*> \param[in] LDA
 *> \verbatim
-*>          LDT is integer
-*>          The leading dimension of T just as declared in the
-*>          calling subroutine.  NW .LE. LDT
+*>          LDA is INTEGER
+*>          The leading dimension of the array A. LDA >=max(1,M).
 *> \endverbatim
 *>
-*> \param[in] NV
+*> \param[in] B
 *> \verbatim
-*>          NV is integer
-*>          The number of rows of work array WV available for
-*>          workspace.  NV.GE.NW.
+*>          B is COMPLEX*16 array, dimension (LDB, N)
+*>          On entry, B contains the M by N matrix B.
 *> \endverbatim
 *>
-*> \param[out] WV
+*> \param[in] LDB
 *> \verbatim
-*>          WV is COMPLEX*16 array, dimension (LDWV,NW)
+*>          LDB is INTEGER
+*>          The leading dimension of the array B. LDB >=max(1,M).
 *> \endverbatim
 *>
-*> \param[in] LDWV
+*> \param[out] C
 *> \verbatim
-*>          LDWV is integer
-*>          The leading dimension of W just as declared in the
-*>          calling subroutine.  NW .LE. LDV
+*>          C is COMPLEX*16 array, dimension (LDC, N)
+*>          On exit, C contains the M by N matrix C.
 *> \endverbatim
 *>
-*> \param[out] WORK
+*> \param[in] LDC
 *> \verbatim
-*>          WORK is COMPLEX*16 array, dimension LWORK.
-*>          On exit, WORK(1) is set to an estimate of the optimal value
-*>          of LWORK for the given values of N, NW, KTOP and KBOT.
+*>          LDC is INTEGER
+*>          The leading dimension of the array C. LDC >=max(1,M).
 *> \endverbatim
 *>
-*> \param[in] LWORK
+*> \param[out] RWORK
 *> \verbatim
-*>          LWORK is integer
-*>          The dimension of the work array WORK.  LWORK = 2*NW
-*>          suffices, but greater efficiency may result from larger
-*>          values of LWORK.
-*>
-*>          If LWORK = -1, then a workspace query is assumed; ZLAQR3
-*>          only estimates the optimal workspace size for the given
-*>          values of N, NW, KTOP and KBOT.  The estimate is returned
-*>          in WORK(1).  No error message related to LWORK is issued
-*>          by XERBLA.  Neither H nor Z are accessed.
+*>          RWORK is DOUBLE PRECISION array, dimension (2*M*N)
 *> \endverbatim
 *
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date September 2012
+*> \date June 2016
 *
 *> \ingroup complex16OTHERauxiliary
 *
-*> \par Contributors:
-*  ==================
-*>
-*>       Karen Braman and Ralph Byers, Department of Mathematics,
-*>       University of Kansas, USA
-*>
 *  =====================================================================
-      SUBROUTINE ZLAQR3( WANTT, WANTZ, N, KTOP, KBOT, NW, H, LDH, ILOZ,
-     $                   IHIZ, Z, LDZ, NS, ND, SH, V, LDV, NH, T, LDT,
-     $                   NV, WV, LDWV, WORK, LWORK )
+      SUBROUTINE ZLARCM( M, N, A, LDA, B, LDB, C, LDC, RWORK )
 *
-*  -- LAPACK auxiliary routine (version 3.4.2) --
+*  -- LAPACK auxiliary routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     September 2012
+*     June 2016
 *
 *     .. Scalar Arguments ..
-      INTEGER            IHIZ, ILOZ, KBOT, KTOP, LDH, LDT, LDV, LDWV,
-     $                   LDZ, LWORK, N, ND, NH, NS, NV, NW
-      LOGICAL            WANTT, WANTZ
+      INTEGER            LDA, LDB, LDC, M, N
 *     ..
 *     .. Array Arguments ..
-      COMPLEX*16         H( LDH, * ), SH( * ), T( LDT, * ), V( LDV, * ),
-     $                   WORK( * ), WV( LDWV, * ), Z( LDZ, * )
+      DOUBLE PRECISION   A( LDA, * ), RWORK( * )
+      COMPLEX*16         B( LDB, * ), C( LDC, * )
 *     ..
 *
-*  ================================================================
+*  =====================================================================
 *
 *     .. Parameters ..
-      COMPLEX*16         ZERO, ONE
-      PARAMETER          ( ZERO = ( 0.0d0, 0.0d0 ),
-     $                   ONE = ( 1.0d0, 0.0d0 ) )
-      DOUBLE PRECISION   RZERO, RONE
-      PARAMETER          ( RZERO = 0.0d0, RONE = 1.0d0 )
+      DOUBLE PRECISION   ONE, ZERO
+      PARAMETER          ( ONE = 1.0D0, ZERO = 0.0D0 )
 *     ..
 *     .. Local Scalars ..
-      COMPLEX*16         BETA, CDUM, S, TAU
-      DOUBLE PRECISION   FOO, SAFMAX, SAFMIN, SMLNUM, ULP
-      INTEGER            I, IFST, ILST, INFO, INFQR, J, JW, KCOL, KLN,
-     $                   KNT, KROW, KWTOP, LTOP, LWK1, LWK2, LWK3,
-     $                   LWKOPT, NMIN
-*     ..
-*     .. External Functions ..
-      DOUBLE PRECISION   DLAMCH
-      INTEGER            ILAENV
-      EXTERNAL           DLAMCH, ILAENV
-*     ..
-*     .. External Subroutines ..
-      EXTERNAL           DLABAD, ZCOPY, ZGEHRD, ZGEMM, ZLACPY, ZLAHQR,
-     $                   ZLAQR4, ZLARF, ZLARFG, ZLASET, ZTREXC, ZUNMHR
+      INTEGER            I, J, L
 *     ..
 *     .. Intrinsic Functions ..
-      INTRINSIC          ABS, DBLE, DCMPLX, DCONJG, DIMAG, INT, MAX, MIN
-*     ..
-*     .. Statement Functions ..
-      DOUBLE PRECISION   CABS1
+      INTRINSIC          DBLE, DCMPLX, DIMAG
 *     ..
-*     .. Statement Function definitions ..
-      CABS1( CDUM ) = ABS( DBLE( CDUM ) ) + ABS( DIMAG( CDUM ) )
+*     .. External Subroutines ..
+      EXTERNAL           DGEMM
 *     ..
 *     .. Executable Statements ..
 *
-*     ==== Estimate optimal workspace. ====
-*
-      JW = MIN( NW, KBOT-KTOP+1 )
-      IF( JW.LE.2 ) THEN
-         LWKOPT = 1
-      ELSE
-*
-*        ==== Workspace query call to ZGEHRD ====
-*
-         CALL ZGEHRD( JW, 1, JW-1, T, LDT, WORK, WORK, -1, INFO )
-         LWK1 = INT( WORK( 1 ) )
-*
-*        ==== Workspace query call to ZUNMHR ====
-*
-         CALL ZUNMHR( 'R', 'N', JW, JW, 1, JW-1, T, LDT, WORK, V, LDV,
-     $                WORK, -1, INFO )
-         LWK2 = INT( WORK( 1 ) )
-*
-*        ==== Workspace query call to ZLAQR4 ====
-*
-         CALL ZLAQR4( .true., .true., JW, 1, JW, T, LDT, SH, 1, JW, V,
-     $                LDV, WORK, -1, INFQR )
-         LWK3 = INT( WORK( 1 ) )
-*
-*        ==== Optimal workspace ====
-*
-         LWKOPT = MAX( JW+MAX( LWK1, LWK2 ), LWK3 )
-      END IF
-*
-*     ==== Quick return in case of workspace query. ====
-*
-      IF( LWORK.EQ.-1 ) THEN
-         WORK( 1 ) = DCMPLX( LWKOPT, 0 )
-         RETURN
-      END IF
+*     Quick return if possible.
 *
-*     ==== Nothing to do ...
-*     ... for an empty active block ... ====
-      NS = 0
-      ND = 0
-      WORK( 1 ) = ONE
-      IF( KTOP.GT.KBOT )
-     $   RETURN
-*     ... nor for an empty deflation window. ====
-      IF( NW.LT.1 )
+      IF( ( M.EQ.0 ) .OR. ( N.EQ.0 ) )
      $   RETURN
 *
-*     ==== Machine constants ====
-*
-      SAFMIN = DLAMCH( 'SAFE MINIMUM' )
-      SAFMAX = RONE / SAFMIN
-      CALL DLABAD( SAFMIN, SAFMAX )
-      ULP = DLAMCH( 'PRECISION' )
-      SMLNUM = SAFMIN*( DBLE( N ) / ULP )
-*
-*     ==== Setup deflation window ====
-*
-      JW = MIN( NW, KBOT-KTOP+1 )
-      KWTOP = KBOT - JW + 1
-      IF( KWTOP.EQ.KTOP ) THEN
-         S = ZERO
-      ELSE
-         S = H( KWTOP, KWTOP-1 )
-      END IF
-*
-      IF( KBOT.EQ.KWTOP ) THEN
-*
-*        ==== 1-by-1 deflation window: not much to do ====
-*
-         SH( KWTOP ) = H( KWTOP, KWTOP )
-         NS = 1
-         ND = 0
-         IF( CABS1( S ).LE.MAX( SMLNUM, ULP*CABS1( H( KWTOP,
-     $       KWTOP ) ) ) ) THEN
-            NS = 0
-            ND = 1
-            IF( KWTOP.GT.KTOP )
-     $         H( KWTOP, KWTOP-1 ) = ZERO
-         END IF
-         WORK( 1 ) = ONE
-         RETURN
-      END IF
-*
-*     ==== Convert to spike-triangular form.  (In case of a
-*     .    rare QR failure, this routine continues to do
-*     .    aggressive early deflation using that part of
-*     .    the deflation window that converged using INFQR
-*     .    here and there to keep track.) ====
-*
-      CALL ZLACPY( 'U', JW, JW, H( KWTOP, KWTOP ), LDH, T, LDT )
-      CALL ZCOPY( JW-1, H( KWTOP+1, KWTOP ), LDH+1, T( 2, 1 ), LDT+1 )
-*
-      CALL ZLASET( 'A', JW, JW, ZERO, ONE, V, LDV )
-      NMIN = ILAENV( 12, 'ZLAQR3', 'SV', JW, 1, JW, LWORK )
-      IF( JW.GT.NMIN ) THEN
-         CALL ZLAQR4( .true., .true., JW, 1, JW, T, LDT, SH( KWTOP ), 1,
-     $                JW, V, LDV, WORK, LWORK, INFQR )
-      ELSE
-         CALL ZLAHQR( .true., .true., JW, 1, JW, T, LDT, SH( KWTOP ), 1,
-     $                JW, V, LDV, INFQR )
-      END IF
-*
-*     ==== Deflation detection loop ====
-*
-      NS = JW
-      ILST = INFQR + 1
-      DO 10 KNT = INFQR + 1, JW
-*
-*        ==== Small spike tip deflation test ====
+      DO 20 J = 1, N
+         DO 10 I = 1, M
+            RWORK( ( J-1 )*M+I ) = DBLE( B( I, J ) )
+   10    CONTINUE
+   20 CONTINUE
 *
-         FOO = CABS1( T( NS, NS ) )
-         IF( FOO.EQ.RZERO )
-     $      FOO = CABS1( S )
-         IF( CABS1( S )*CABS1( V( 1, NS ) ).LE.MAX( SMLNUM, ULP*FOO ) )
-     $        THEN
+      L = M*N + 1
+      CALL DGEMM( 'N', 'N', M, N, M, ONE, A, LDA, RWORK, M, ZERO,
+     $            RWORK( L ), M )
+      DO 40 J = 1, N
+         DO 30 I = 1, M
+            C( I, J ) = RWORK( L+( J-1 )*M+I-1 )
+   30    CONTINUE
+   40 CONTINUE
 *
-*           ==== One more converged eigenvalue ====
+      DO 60 J = 1, N
+         DO 50 I = 1, M
+            RWORK( ( J-1 )*M+I ) = DIMAG( B( I, J ) )
+   50    CONTINUE
+   60 CONTINUE
+      CALL DGEMM( 'N', 'N', M, N, M, ONE, A, LDA, RWORK, M, ZERO,
+     $            RWORK( L ), M )
+      DO 80 J = 1, N
+         DO 70 I = 1, M
+            C( I, J ) = DCMPLX( DBLE( C( I, J ) ),
+     $                  RWORK( L+( J-1 )*M+I-1 ) )
+   70    CONTINUE
+   80 CONTINUE
 *
-            NS = NS - 1
-         ELSE
+      RETURN
 *
-*           ==== One undeflatable eigenvalue.  Move it up out of the
-*           .    way.   (ZTREXC can not fail in this case.) ====
+*     End of ZLARCM
 *
-            IFST = NS
-            CALL ZTREXC( 'V', JW, T, LDT, V, LDV, IFST, ILST, INFO )
-            ILST = ILST + 1
-         END IF
-   10 CONTINUE
+      END
+*> \brief \b ZLARF applies an elementary reflector to a general rectangular matrix.
 *
-*        ==== Return to Hessenberg form ====
+*  =========== DOCUMENTATION ===========
 *
-      IF( NS.EQ.0 )
-     $   S = ZERO
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
-      IF( NS.LT.JW ) THEN
+*> \htmlonly
+*> Download ZLARF + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/zlarf.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/zlarf.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/zlarf.f">
+*> [TXT]</a>
+*> \endhtmlonly
 *
-*        ==== sorting the diagonal of T improves accuracy for
-*        .    graded matrices.  ====
+*  Definition:
+*  ===========
 *
-         DO 30 I = INFQR + 1, NS
-            IFST = I
-            DO 20 J = I + 1, NS
-               IF( CABS1( T( J, J ) ).GT.CABS1( T( IFST, IFST ) ) )
-     $            IFST = J
-   20       CONTINUE
-            ILST = I
-            IF( IFST.NE.ILST )
-     $         CALL ZTREXC( 'V', JW, T, LDT, V, LDV, IFST, ILST, INFO )
-   30    CONTINUE
-      END IF
+*       SUBROUTINE ZLARF( SIDE, M, N, V, INCV, TAU, C, LDC, WORK )
 *
-*     ==== Restore shift/eigenvalue array from T ====
+*       .. Scalar Arguments ..
+*       CHARACTER          SIDE
+*       INTEGER            INCV, LDC, M, N
+*       COMPLEX*16         TAU
+*       ..
+*       .. Array Arguments ..
+*       COMPLEX*16         C( LDC, * ), V( * ), WORK( * )
+*       ..
 *
-      DO 40 I = INFQR + 1, JW
-         SH( KWTOP+I-1 ) = T( I, I )
-   40 CONTINUE
 *
+*> \par Purpose:
+*  =============
+*>
+*> \verbatim
+*>
+*> ZLARF applies a complex elementary reflector H to a complex M-by-N
+*> matrix C, from either the left or the right. H is represented in the
+*> form
+*>
+*>       H = I - tau * v * v**H
+*>
+*> where tau is a complex scalar and v is a complex vector.
+*>
+*> If tau = 0, then H is taken to be the unit matrix.
+*>
+*> To apply H**H, supply conjg(tau) instead
+*> tau.
+*> \endverbatim
 *
-      IF( NS.LT.JW .OR. S.EQ.ZERO ) THEN
-         IF( NS.GT.1 .AND. S.NE.ZERO ) THEN
+*  Arguments:
+*  ==========
 *
-*           ==== Reflect spike back into lower triangle ====
+*> \param[in] SIDE
+*> \verbatim
+*>          SIDE is CHARACTER*1
+*>          = 'L': form  H * C
+*>          = 'R': form  C * H
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*>          M is INTEGER
+*>          The number of rows of the matrix C.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*>          N is INTEGER
+*>          The number of columns of the matrix C.
+*> \endverbatim
+*>
+*> \param[in] V
+*> \verbatim
+*>          V is COMPLEX*16 array, dimension
+*>                     (1 + (M-1)*abs(INCV)) if SIDE = 'L'
+*>                  or (1 + (N-1)*abs(INCV)) if SIDE = 'R'
+*>          The vector v in the representation of H. V is not used if
+*>          TAU = 0.
+*> \endverbatim
+*>
+*> \param[in] INCV
+*> \verbatim
+*>          INCV is INTEGER
+*>          The increment between elements of v. INCV <> 0.
+*> \endverbatim
+*>
+*> \param[in] TAU
+*> \verbatim
+*>          TAU is COMPLEX*16
+*>          The value tau in the representation of H.
+*> \endverbatim
+*>
+*> \param[in,out] C
+*> \verbatim
+*>          C is COMPLEX*16 array, dimension (LDC,N)
+*>          On entry, the M-by-N matrix C.
+*>          On exit, C is overwritten by the matrix H * C if SIDE = 'L',
+*>          or C * H if SIDE = 'R'.
+*> \endverbatim
+*>
+*> \param[in] LDC
+*> \verbatim
+*>          LDC is INTEGER
+*>          The leading dimension of the array C. LDC >= max(1,M).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*>          WORK is COMPLEX*16 array, dimension
+*>                         (N) if SIDE = 'L'
+*>                      or (M) if SIDE = 'R'
+*> \endverbatim
 *
-            CALL ZCOPY( NS, V, LDV, WORK, 1 )
-            DO 50 I = 1, NS
-               WORK( I ) = DCONJG( WORK( I ) )
-   50       CONTINUE
-            BETA = WORK( 1 )
-            CALL ZLARFG( NS, BETA, WORK( 2 ), 1, TAU )
-            WORK( 1 ) = ONE
+*  Authors:
+*  ========
 *
-            CALL ZLASET( 'L', JW-2, JW-2, ZERO, ZERO, T( 3, 1 ), LDT )
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-            CALL ZLARF( 'L', NS, JW, WORK, 1, DCONJG( TAU ), T, LDT,
-     $                  WORK( JW+1 ) )
-            CALL ZLARF( 'R', NS, NS, WORK, 1, TAU, T, LDT,
-     $                  WORK( JW+1 ) )
-            CALL ZLARF( 'R', JW, NS, WORK, 1, TAU, V, LDV,
-     $                  WORK( JW+1 ) )
+*> \date December 2016
 *
-            CALL ZGEHRD( JW, 1, NS, T, LDT, WORK, WORK( JW+1 ),
-     $                   LWORK-JW, INFO )
-         END IF
+*> \ingroup complex16OTHERauxiliary
 *
-*        ==== Copy updated reduced window into place ====
+*  =====================================================================
+      SUBROUTINE ZLARF( SIDE, M, N, V, INCV, TAU, C, LDC, WORK )
 *
-         IF( KWTOP.GT.1 )
-     $      H( KWTOP, KWTOP-1 ) = S*DCONJG( V( 1, 1 ) )
-         CALL ZLACPY( 'U', JW, JW, T, LDT, H( KWTOP, KWTOP ), LDH )
-         CALL ZCOPY( JW-1, T( 2, 1 ), LDT+1, H( KWTOP+1, KWTOP ),
-     $               LDH+1 )
+*  -- LAPACK auxiliary routine (version 3.7.0) --
+*  -- LAPACK is a software package provided by Univ. of Tennessee,    --
+*  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+*     December 2016
 *
-*        ==== Accumulate orthogonal matrix in order update
-*        .    H and Z, if requested.  ====
+*     .. Scalar Arguments ..
+      CHARACTER          SIDE
+      INTEGER            INCV, LDC, M, N
+      COMPLEX*16         TAU
+*     ..
+*     .. Array Arguments ..
+      COMPLEX*16         C( LDC, * ), V( * ), WORK( * )
+*     ..
 *
-         IF( NS.GT.1 .AND. S.NE.ZERO )
-     $      CALL ZUNMHR( 'R', 'N', JW, NS, 1, NS, T, LDT, WORK, V, LDV,
-     $                   WORK( JW+1 ), LWORK-JW, INFO )
+*  =====================================================================
 *
-*        ==== Update vertical slab in H ====
+*     .. Parameters ..
+      COMPLEX*16         ONE, ZERO
+      PARAMETER          ( ONE = ( 1.0D+0, 0.0D+0 ),
+     $                   ZERO = ( 0.0D+0, 0.0D+0 ) )
+*     ..
+*     .. Local Scalars ..
+      LOGICAL            APPLYLEFT
+      INTEGER            I, LASTV, LASTC
+*     ..
+*     .. External Subroutines ..
+      EXTERNAL           ZGEMV, ZGERC
+*     ..
+*     .. External Functions ..
+      LOGICAL            LSAME
+      INTEGER            ILAZLR, ILAZLC
+      EXTERNAL           LSAME, ILAZLR, ILAZLC
+*     ..
+*     .. Executable Statements ..
 *
-         IF( WANTT ) THEN
-            LTOP = 1
+      APPLYLEFT = LSAME( SIDE, 'L' )
+      LASTV = 0
+      LASTC = 0
+      IF( TAU.NE.ZERO ) THEN
+*     Set up variables for scanning V.  LASTV begins pointing to the end
+*     of V.
+         IF( APPLYLEFT ) THEN
+            LASTV = M
          ELSE
-            LTOP = KTOP
+            LASTV = N
          END IF
-         DO 60 KROW = LTOP, KWTOP - 1, NV
-            KLN = MIN( NV, KWTOP-KROW )
-            CALL ZGEMM( 'N', 'N', KLN, JW, JW, ONE, H( KROW, KWTOP ),
-     $                  LDH, V, LDV, ZERO, WV, LDWV )
-            CALL ZLACPY( 'A', KLN, JW, WV, LDWV, H( KROW, KWTOP ), LDH )
-   60    CONTINUE
+         IF( INCV.GT.0 ) THEN
+            I = 1 + (LASTV-1) * INCV
+         ELSE
+            I = 1
+         END IF
+*     Look for the last non-zero row in V.
+         DO WHILE( LASTV.GT.0 .AND. V( I ).EQ.ZERO )
+            LASTV = LASTV - 1
+            I = I - INCV
+         END DO
+         IF( APPLYLEFT ) THEN
+*     Scan for the last non-zero column in C(1:lastv,:).
+            LASTC = ILAZLC(LASTV, N, C, LDC)
+         ELSE
+*     Scan for the last non-zero row in C(:,1:lastv).
+            LASTC = ILAZLR(M, LASTV, C, LDC)
+         END IF
+      END IF
+*     Note that lastc.eq.0 renders the BLAS operations null; no special
+*     case is needed at this level.
+      IF( APPLYLEFT ) THEN
 *
-*        ==== Update horizontal slab in H ====
+*        Form  H * C
 *
-         IF( WANTT ) THEN
-            DO 70 KCOL = KBOT + 1, N, NH
-               KLN = MIN( NH, N-KCOL+1 )
-               CALL ZGEMM( 'C', 'N', JW, KLN, JW, ONE, V, LDV,
-     $                     H( KWTOP, KCOL ), LDH, ZERO, T, LDT )
-               CALL ZLACPY( 'A', JW, KLN, T, LDT, H( KWTOP, KCOL ),
-     $                      LDH )
-   70       CONTINUE
-         END IF
+         IF( LASTV.GT.0 ) THEN
 *
-*        ==== Update vertical slab in Z ====
+*           w(1:lastc,1) := C(1:lastv,1:lastc)**H * v(1:lastv,1)
 *
-         IF( WANTZ ) THEN
-            DO 80 KROW = ILOZ, IHIZ, NV
-               KLN = MIN( NV, IHIZ-KROW+1 )
-               CALL ZGEMM( 'N', 'N', KLN, JW, JW, ONE, Z( KROW, KWTOP ),
-     $                     LDZ, V, LDV, ZERO, WV, LDWV )
-               CALL ZLACPY( 'A', KLN, JW, WV, LDWV, Z( KROW, KWTOP ),
-     $                      LDZ )
-   80       CONTINUE
+            CALL ZGEMV( 'Conjugate transpose', LASTV, LASTC, ONE,
+     $           C, LDC, V, INCV, ZERO, WORK, 1 )
+*
+*           C(1:lastv,1:lastc) := C(...) - v(1:lastv,1) * w(1:lastc,1)**H
+*
+            CALL ZGERC( LASTV, LASTC, -TAU, V, INCV, WORK, 1, C, LDC )
          END IF
-      END IF
+      ELSE
 *
-*     ==== Return the number of deflations ... ====
+*        Form  C * H
 *
-      ND = JW - NS
+         IF( LASTV.GT.0 ) THEN
 *
-*     ==== ... and the number of shifts. (Subtracting
-*     .    INFQR from the spike length takes care
-*     .    of the case of a rare QR failure while
-*     .    calculating eigenvalues of the deflation
-*     .    window.)  ====
+*           w(1:lastc,1) := C(1:lastc,1:lastv) * v(1:lastv,1)
 *
-      NS = NS - INFQR
+            CALL ZGEMV( 'No transpose', LASTC, LASTV, ONE, C, LDC,
+     $           V, INCV, ZERO, WORK, 1 )
 *
-*      ==== Return optimal workspace. ====
+*           C(1:lastc,1:lastv) := C(...) - w(1:lastc,1) * v(1:lastv,1)**H
 *
-      WORK( 1 ) = DCMPLX( LWKOPT, 0 )
+            CALL ZGERC( LASTC, LASTV, -TAU, WORK, 1, V, INCV, C, LDC )
+         END IF
+      END IF
+      RETURN
 *
-*     ==== End of ZLAQR3 ====
+*     End of ZLARF
 *
       END
-*> \brief \b ZLAQR4 computes the eigenvalues of a Hessenberg matrix, and optionally the matrices from the Schur decomposition.
+*> \brief \b ZLARFB applies a block reflector or its conjugate-transpose to a general rectangular matrix.
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download ZLAQR4 + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/zlaqr4.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/zlaqr4.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/zlaqr4.f"> 
+*> Download ZLARFB + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/zlarfb.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/zlarfb.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/zlarfb.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
-*       SUBROUTINE ZLAQR4( WANTT, WANTZ, N, ILO, IHI, H, LDH, W, ILOZ,
-*                          IHIZ, Z, LDZ, WORK, LWORK, INFO )
-* 
+*       SUBROUTINE ZLARFB( SIDE, TRANS, DIRECT, STOREV, M, N, K, V, LDV,
+*                          T, LDT, C, LDC, WORK, LDWORK )
+*
 *       .. Scalar Arguments ..
-*       INTEGER            IHI, IHIZ, ILO, ILOZ, INFO, LDH, LDZ, LWORK, N
-*       LOGICAL            WANTT, WANTZ
+*       CHARACTER          DIRECT, SIDE, STOREV, TRANS
+*       INTEGER            K, LDC, LDT, LDV, LDWORK, M, N
 *       ..
 *       .. Array Arguments ..
-*       COMPLEX*16         H( LDH, * ), W( * ), WORK( * ), Z( LDZ, * )
+*       COMPLEX*16         C( LDC, * ), T( LDT, * ), V( LDV, * ),
+*      $                   WORK( LDWORK, * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
 *>
 *> \verbatim
 *>
-*>    ZLAQR4 implements one level of recursion for ZLAQR0.
-*>    It is a complete implementation of the small bulge multi-shift
-*>    QR algorithm.  It may be called by ZLAQR0 and, for large enough
-*>    deflation window size, it may be called by ZLAQR3.  This
-*>    subroutine is identical to ZLAQR0 except that it calls ZLAQR2
-*>    instead of ZLAQR3.
-*>
-*>    ZLAQR4 computes the eigenvalues of a Hessenberg matrix H
-*>    and, optionally, the matrices T and Z from the Schur decomposition
-*>    H = Z T Z**H, where T is an upper triangular matrix (the
-*>    Schur form), and Z is the unitary matrix of Schur vectors.
-*>
-*>    Optionally Z may be postmultiplied into an input unitary
-*>    matrix Q so that this routine can give the Schur factorization
-*>    of a matrix A which has been reduced to the Hessenberg form H
-*>    by the unitary matrix Q:  A = Q*H*Q**H = (QZ)*H*(QZ)**H.
+*> ZLARFB applies a complex block reflector H or its transpose H**H to a
+*> complex M-by-N matrix C, from either the left or the right.
 *> \endverbatim
 *
 *  Arguments:
 *  ==========
 *
-*> \param[in] WANTT
+*> \param[in] SIDE
 *> \verbatim
-*>          WANTT is LOGICAL
-*>          = .TRUE. : the full Schur form T is required;
-*>          = .FALSE.: only eigenvalues are required.
+*>          SIDE is CHARACTER*1
+*>          = 'L': apply H or H**H from the Left
+*>          = 'R': apply H or H**H from the Right
 *> \endverbatim
 *>
-*> \param[in] WANTZ
+*> \param[in] TRANS
 *> \verbatim
-*>          WANTZ is LOGICAL
-*>          = .TRUE. : the matrix of Schur vectors Z is required;
-*>          = .FALSE.: Schur vectors are not required.
+*>          TRANS is CHARACTER*1
+*>          = 'N': apply H (No transpose)
+*>          = 'C': apply H**H (Conjugate transpose)
 *> \endverbatim
 *>
-*> \param[in] N
+*> \param[in] DIRECT
 *> \verbatim
-*>          N is INTEGER
-*>           The order of the matrix H.  N .GE. 0.
+*>          DIRECT is CHARACTER*1
+*>          Indicates how H is formed from a product of elementary
+*>          reflectors
+*>          = 'F': H = H(1) H(2) . . . H(k) (Forward)
+*>          = 'B': H = H(k) . . . H(2) H(1) (Backward)
 *> \endverbatim
 *>
-*> \param[in] ILO
+*> \param[in] STOREV
 *> \verbatim
-*>          ILO is INTEGER
+*>          STOREV is CHARACTER*1
+*>          Indicates how the vectors which define the elementary
+*>          reflectors are stored:
+*>          = 'C': Columnwise
+*>          = 'R': Rowwise
 *> \endverbatim
 *>
-*> \param[in] IHI
+*> \param[in] M
 *> \verbatim
-*>          IHI is INTEGER
-*>           It is assumed that H is already upper triangular in rows
-*>           and columns 1:ILO-1 and IHI+1:N and, if ILO.GT.1,
-*>           H(ILO,ILO-1) is zero. ILO and IHI are normally set by a
-*>           previous call to ZGEBAL, and then passed to ZGEHRD when the
-*>           matrix output by ZGEBAL is reduced to Hessenberg form.
-*>           Otherwise, ILO and IHI should be set to 1 and N,
-*>           respectively.  If N.GT.0, then 1.LE.ILO.LE.IHI.LE.N.
-*>           If N = 0, then ILO = 1 and IHI = 0.
+*>          M is INTEGER
+*>          The number of rows of the matrix C.
 *> \endverbatim
 *>
-*> \param[in,out] H
+*> \param[in] N
 *> \verbatim
-*>          H is COMPLEX*16 array, dimension (LDH,N)
-*>           On entry, the upper Hessenberg matrix H.
-*>           On exit, if INFO = 0 and WANTT is .TRUE., then H
-*>           contains the upper triangular matrix T from the Schur
-*>           decomposition (the Schur form). If INFO = 0 and WANT is
-*>           .FALSE., then the contents of H are unspecified on exit.
-*>           (The output value of H when INFO.GT.0 is given under the
-*>           description of INFO below.)
+*>          N is INTEGER
+*>          The number of columns of the matrix C.
+*> \endverbatim
 *>
-*>           This subroutine may explicitly set H(i,j) = 0 for i.GT.j and
-*>           j = 1, 2, ... ILO-1 or j = IHI+1, IHI+2, ... N.
+*> \param[in] K
+*> \verbatim
+*>          K is INTEGER
+*>          The order of the matrix T (= the number of elementary
+*>          reflectors whose product defines the block reflector).
 *> \endverbatim
 *>
-*> \param[in] LDH
+*> \param[in] V
 *> \verbatim
-*>          LDH is INTEGER
-*>           The leading dimension of the array H. LDH .GE. max(1,N).
+*>          V is COMPLEX*16 array, dimension
+*>                                (LDV,K) if STOREV = 'C'
+*>                                (LDV,M) if STOREV = 'R' and SIDE = 'L'
+*>                                (LDV,N) if STOREV = 'R' and SIDE = 'R'
+*>          See Further Details.
 *> \endverbatim
 *>
-*> \param[out] W
+*> \param[in] LDV
 *> \verbatim
-*>          W is COMPLEX*16 array, dimension (N)
-*>           The computed eigenvalues of H(ILO:IHI,ILO:IHI) are stored
-*>           in W(ILO:IHI). If WANTT is .TRUE., then the eigenvalues are
-*>           stored in the same order as on the diagonal of the Schur
-*>           form returned in H, with W(i) = H(i,i).
+*>          LDV is INTEGER
+*>          The leading dimension of the array V.
+*>          If STOREV = 'C' and SIDE = 'L', LDV >= max(1,M);
+*>          if STOREV = 'C' and SIDE = 'R', LDV >= max(1,N);
+*>          if STOREV = 'R', LDV >= K.
 *> \endverbatim
 *>
-*> \param[in] ILOZ
+*> \param[in] T
 *> \verbatim
-*>          ILOZ is INTEGER
+*>          T is COMPLEX*16 array, dimension (LDT,K)
+*>          The triangular K-by-K matrix T in the representation of the
+*>          block reflector.
 *> \endverbatim
 *>
-*> \param[in] IHIZ
+*> \param[in] LDT
 *> \verbatim
-*>          IHIZ is INTEGER
-*>           Specify the rows of Z to which transformations must be
-*>           applied if WANTZ is .TRUE..
-*>           1 .LE. ILOZ .LE. ILO; IHI .LE. IHIZ .LE. N.
+*>          LDT is INTEGER
+*>          The leading dimension of the array T. LDT >= K.
 *> \endverbatim
 *>
-*> \param[in,out] Z
+*> \param[in,out] C
 *> \verbatim
-*>          Z is COMPLEX*16 array, dimension (LDZ,IHI)
-*>           If WANTZ is .FALSE., then Z is not referenced.
-*>           If WANTZ is .TRUE., then Z(ILO:IHI,ILOZ:IHIZ) is
-*>           replaced by Z(ILO:IHI,ILOZ:IHIZ)*U where U is the
-*>           orthogonal Schur factor of H(ILO:IHI,ILO:IHI).
-*>           (The output value of Z when INFO.GT.0 is given under
-*>           the description of INFO below.)
+*>          C is COMPLEX*16 array, dimension (LDC,N)
+*>          On entry, the M-by-N matrix C.
+*>          On exit, C is overwritten by H*C or H**H*C or C*H or C*H**H.
 *> \endverbatim
 *>
-*> \param[in] LDZ
+*> \param[in] LDC
 *> \verbatim
-*>          LDZ is INTEGER
-*>           The leading dimension of the array Z.  if WANTZ is .TRUE.
-*>           then LDZ.GE.MAX(1,IHIZ).  Otherwize, LDZ.GE.1.
+*>          LDC is INTEGER
+*>          The leading dimension of the array C. LDC >= max(1,M).
 *> \endverbatim
 *>
 *> \param[out] WORK
 *> \verbatim
-*>          WORK is COMPLEX*16 array, dimension LWORK
-*>           On exit, if LWORK = -1, WORK(1) returns an estimate of
-*>           the optimal value for LWORK.
+*>          WORK is COMPLEX*16 array, dimension (LDWORK,K)
 *> \endverbatim
 *>
-*> \param[in] LWORK
+*> \param[in] LDWORK
 *> \verbatim
-*>          LWORK is INTEGER
-*>           The dimension of the array WORK.  LWORK .GE. max(1,N)
-*>           is sufficient, but LWORK typically as large as 6*N may
-*>           be required for optimal performance.  A workspace query
-*>           to determine the optimal workspace size is recommended.
-*>
-*>           If LWORK = -1, then ZLAQR4 does a workspace query.
-*>           In this case, ZLAQR4 checks the input parameters and
-*>           estimates the optimal workspace size for the given
-*>           values of N, ILO and IHI.  The estimate is returned
-*>           in WORK(1).  No error message related to LWORK is
-*>           issued by XERBLA.  Neither H nor Z are accessed.
+*>          LDWORK is INTEGER
+*>          The leading dimension of the array WORK.
+*>          If SIDE = 'L', LDWORK >= max(1,N);
+*>          if SIDE = 'R', LDWORK >= max(1,M).
 *> \endverbatim
+*
+*  Authors:
+*  ========
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date June 2013
+*
+*> \ingroup complex16OTHERauxiliary
+*
+*> \par Further Details:
+*  =====================
 *>
-*> \param[out] INFO
 *> \verbatim
-*>          INFO is INTEGER
-*>             =  0:  successful exit
-*>           .GT. 0:  if INFO = i, ZLAQR4 failed to compute all of
-*>                the eigenvalues.  Elements 1:ilo-1 and i+1:n of WR
-*>                and WI contain those eigenvalues which have been
-*>                successfully computed.  (Failures are rare.)
-*>
-*>                If INFO .GT. 0 and WANT is .FALSE., then on exit,
-*>                the remaining unconverged eigenvalues are the eigen-
-*>                values of the upper Hessenberg matrix rows and
-*>                columns ILO through INFO of the final, output
-*>                value of H.
-*>
-*>                If INFO .GT. 0 and WANTT is .TRUE., then on exit
-*>
-*>           (*)  (initial value of H)*U  = U*(final value of H)
 *>
-*>                where U is a unitary matrix.  The final
-*>                value of  H is upper Hessenberg and triangular in
-*>                rows and columns INFO+1 through IHI.
+*>  The shape of the matrix V and the storage of the vectors which define
+*>  the H(i) is best illustrated by the following example with n = 5 and
+*>  k = 3. The elements equal to 1 are not stored; the corresponding
+*>  array elements are modified but restored on exit. The rest of the
+*>  array is not used.
 *>
-*>                If INFO .GT. 0 and WANTZ is .TRUE., then on exit
+*>  DIRECT = 'F' and STOREV = 'C':         DIRECT = 'F' and STOREV = 'R':
 *>
-*>                  (final value of Z(ILO:IHI,ILOZ:IHIZ)
-*>                   =  (initial value of Z(ILO:IHI,ILOZ:IHIZ)*U
+*>               V = (  1       )                 V = (  1 v1 v1 v1 v1 )
+*>                   ( v1  1    )                     (     1 v2 v2 v2 )
+*>                   ( v1 v2  1 )                     (        1 v3 v3 )
+*>                   ( v1 v2 v3 )
+*>                   ( v1 v2 v3 )
 *>
-*>                where U is the unitary matrix in (*) (regard-
-*>                less of the value of WANTT.)
+*>  DIRECT = 'B' and STOREV = 'C':         DIRECT = 'B' and STOREV = 'R':
 *>
-*>                If INFO .GT. 0 and WANTZ is .FALSE., then Z is not
-*>                accessed.
+*>               V = ( v1 v2 v3 )                 V = ( v1 v1  1       )
+*>                   ( v1 v2 v3 )                     ( v2 v2 v2  1    )
+*>                   (  1 v2 v3 )                     ( v3 v3 v3 v3  1 )
+*>                   (     1 v3 )
+*>                   (        1 )
 *> \endverbatim
+*>
+*  =====================================================================
+      SUBROUTINE ZLARFB( SIDE, TRANS, DIRECT, STOREV, M, N, K, V, LDV,
+     $                   T, LDT, C, LDC, WORK, LDWORK )
+*
+*  -- LAPACK auxiliary routine (version 3.7.0) --
+*  -- LAPACK is a software package provided by Univ. of Tennessee,    --
+*  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+*     June 2013
+*
+*     .. Scalar Arguments ..
+      CHARACTER          DIRECT, SIDE, STOREV, TRANS
+      INTEGER            K, LDC, LDT, LDV, LDWORK, M, N
+*     ..
+*     .. Array Arguments ..
+      COMPLEX*16         C( LDC, * ), T( LDT, * ), V( LDV, * ),
+     $                   WORK( LDWORK, * )
+*     ..
+*
+*  =====================================================================
+*
+*     .. Parameters ..
+      COMPLEX*16         ONE
+      PARAMETER          ( ONE = ( 1.0D+0, 0.0D+0 ) )
+*     ..
+*     .. Local Scalars ..
+      CHARACTER          TRANST
+      INTEGER            I, J
+*     ..
+*     .. External Functions ..
+      LOGICAL            LSAME
+      EXTERNAL           LSAME
+*     ..
+*     .. External Subroutines ..
+      EXTERNAL           ZCOPY, ZGEMM, ZLACGV, ZTRMM
+*     ..
+*     .. Intrinsic Functions ..
+      INTRINSIC          DCONJG
+*     ..
+*     .. Executable Statements ..
+*
+*     Quick return if possible
+*
+      IF( M.LE.0 .OR. N.LE.0 )
+     $   RETURN
+*
+      IF( LSAME( TRANS, 'N' ) ) THEN
+         TRANST = 'C'
+      ELSE
+         TRANST = 'N'
+      END IF
+*
+      IF( LSAME( STOREV, 'C' ) ) THEN
+*
+         IF( LSAME( DIRECT, 'F' ) ) THEN
+*
+*           Let  V =  ( V1 )    (first K rows)
+*                     ( V2 )
+*           where  V1  is unit lower triangular.
+*
+            IF( LSAME( SIDE, 'L' ) ) THEN
+*
+*              Form  H * C  or  H**H * C  where  C = ( C1 )
+*                                                    ( C2 )
+*
+*              W := C**H * V  =  (C1**H * V1 + C2**H * V2)  (stored in WORK)
+*
+*              W := C1**H
+*
+               DO 10 J = 1, K
+                  CALL ZCOPY( N, C( J, 1 ), LDC, WORK( 1, J ), 1 )
+                  CALL ZLACGV( N, WORK( 1, J ), 1 )
+   10          CONTINUE
+*
+*              W := W * V1
+*
+               CALL ZTRMM( 'Right', 'Lower', 'No transpose', 'Unit', N,
+     $                     K, ONE, V, LDV, WORK, LDWORK )
+               IF( M.GT.K ) THEN
+*
+*                 W := W + C2**H * V2
+*
+                  CALL ZGEMM( 'Conjugate transpose', 'No transpose', N,
+     $                        K, M-K, ONE, C( K+1, 1 ), LDC,
+     $                        V( K+1, 1 ), LDV, ONE, WORK, LDWORK )
+               END IF
+*
+*              W := W * T**H  or  W * T
+*
+               CALL ZTRMM( 'Right', 'Upper', TRANST, 'Non-unit', N, K,
+     $                     ONE, T, LDT, WORK, LDWORK )
+*
+*              C := C - V * W**H
+*
+               IF( M.GT.K ) THEN
+*
+*                 C2 := C2 - V2 * W**H
+*
+                  CALL ZGEMM( 'No transpose', 'Conjugate transpose',
+     $                        M-K, N, K, -ONE, V( K+1, 1 ), LDV, WORK,
+     $                        LDWORK, ONE, C( K+1, 1 ), LDC )
+               END IF
+*
+*              W := W * V1**H
+*
+               CALL ZTRMM( 'Right', 'Lower', 'Conjugate transpose',
+     $                     'Unit', N, K, ONE, V, LDV, WORK, LDWORK )
+*
+*              C1 := C1 - W**H
+*
+               DO 30 J = 1, K
+                  DO 20 I = 1, N
+                     C( J, I ) = C( J, I ) - DCONJG( WORK( I, J ) )
+   20             CONTINUE
+   30          CONTINUE
+*
+            ELSE IF( LSAME( SIDE, 'R' ) ) THEN
+*
+*              Form  C * H  or  C * H**H  where  C = ( C1  C2 )
+*
+*              W := C * V  =  (C1*V1 + C2*V2)  (stored in WORK)
+*
+*              W := C1
+*
+               DO 40 J = 1, K
+                  CALL ZCOPY( M, C( 1, J ), 1, WORK( 1, J ), 1 )
+   40          CONTINUE
+*
+*              W := W * V1
+*
+               CALL ZTRMM( 'Right', 'Lower', 'No transpose', 'Unit', M,
+     $                     K, ONE, V, LDV, WORK, LDWORK )
+               IF( N.GT.K ) THEN
+*
+*                 W := W + C2 * V2
+*
+                  CALL ZGEMM( 'No transpose', 'No transpose', M, K, N-K,
+     $                        ONE, C( 1, K+1 ), LDC, V( K+1, 1 ), LDV,
+     $                        ONE, WORK, LDWORK )
+               END IF
 *
-*  Authors:
-*  ========
+*              W := W * T  or  W * T**H
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+               CALL ZTRMM( 'Right', 'Upper', TRANS, 'Non-unit', M, K,
+     $                     ONE, T, LDT, WORK, LDWORK )
 *
-*> \date September 2012
+*              C := C - W * V**H
 *
-*> \ingroup complex16OTHERauxiliary
+               IF( N.GT.K ) THEN
 *
-*> \par Contributors:
-*  ==================
-*>
-*>       Karen Braman and Ralph Byers, Department of Mathematics,
-*>       University of Kansas, USA
+*                 C2 := C2 - W * V2**H
 *
-*> \par References:
-*  ================
-*>
-*>       K. Braman, R. Byers and R. Mathias, The Multi-Shift QR
-*>       Algorithm Part I: Maintaining Well Focused Shifts, and Level 3
-*>       Performance, SIAM Journal of Matrix Analysis, volume 23, pages
-*>       929--947, 2002.
-*> \n
-*>       K. Braman, R. Byers and R. Mathias, The Multi-Shift QR
-*>       Algorithm Part II: Aggressive Early Deflation, SIAM Journal
-*>       of Matrix Analysis, volume 23, pages 948--973, 2002.
-*>
-*  =====================================================================
-      SUBROUTINE ZLAQR4( WANTT, WANTZ, N, ILO, IHI, H, LDH, W, ILOZ,
-     $                   IHIZ, Z, LDZ, WORK, LWORK, INFO )
+                  CALL ZGEMM( 'No transpose', 'Conjugate transpose', M,
+     $                        N-K, K, -ONE, WORK, LDWORK, V( K+1, 1 ),
+     $                        LDV, ONE, C( 1, K+1 ), LDC )
+               END IF
 *
-*  -- LAPACK auxiliary routine (version 3.4.2) --
-*  -- LAPACK is a software package provided by Univ. of Tennessee,    --
-*  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     September 2012
+*              W := W * V1**H
 *
-*     .. Scalar Arguments ..
-      INTEGER            IHI, IHIZ, ILO, ILOZ, INFO, LDH, LDZ, LWORK, N
-      LOGICAL            WANTT, WANTZ
-*     ..
-*     .. Array Arguments ..
-      COMPLEX*16         H( LDH, * ), W( * ), WORK( * ), Z( LDZ, * )
-*     ..
+               CALL ZTRMM( 'Right', 'Lower', 'Conjugate transpose',
+     $                     'Unit', M, K, ONE, V, LDV, WORK, LDWORK )
 *
-*  ================================================================
+*              C1 := C1 - W
 *
-*     .. Parameters ..
+               DO 60 J = 1, K
+                  DO 50 I = 1, M
+                     C( I, J ) = C( I, J ) - WORK( I, J )
+   50             CONTINUE
+   60          CONTINUE
+            END IF
 *
-*     ==== Matrices of order NTINY or smaller must be processed by
-*     .    ZLAHQR because of insufficient subdiagonal scratch space.
-*     .    (This is a hard limit.) ====
-      INTEGER            NTINY
-      PARAMETER          ( NTINY = 11 )
+         ELSE
 *
-*     ==== Exceptional deflation windows:  try to cure rare
-*     .    slow convergence by varying the size of the
-*     .    deflation window after KEXNW iterations. ====
-      INTEGER            KEXNW
-      PARAMETER          ( KEXNW = 5 )
+*           Let  V =  ( V1 )
+*                     ( V2 )    (last K rows)
+*           where  V2  is unit upper triangular.
 *
-*     ==== Exceptional shifts: try to cure rare slow convergence
-*     .    with ad-hoc exceptional shifts every KEXSH iterations.
-*     .    ====
-      INTEGER            KEXSH
-      PARAMETER          ( KEXSH = 6 )
+            IF( LSAME( SIDE, 'L' ) ) THEN
 *
-*     ==== The constant WILK1 is used to form the exceptional
-*     .    shifts. ====
-      DOUBLE PRECISION   WILK1
-      PARAMETER          ( WILK1 = 0.75d0 )
-      COMPLEX*16         ZERO, ONE
-      PARAMETER          ( ZERO = ( 0.0d0, 0.0d0 ),
-     $                   ONE = ( 1.0d0, 0.0d0 ) )
-      DOUBLE PRECISION   TWO
-      PARAMETER          ( TWO = 2.0d0 )
-*     ..
-*     .. Local Scalars ..
-      COMPLEX*16         AA, BB, CC, CDUM, DD, DET, RTDISC, SWAP, TR2
-      DOUBLE PRECISION   S
-      INTEGER            I, INF, IT, ITMAX, K, KACC22, KBOT, KDU, KS,
-     $                   KT, KTOP, KU, KV, KWH, KWTOP, KWV, LD, LS,
-     $                   LWKOPT, NDEC, NDFL, NH, NHO, NIBBLE, NMIN, NS,
-     $                   NSMAX, NSR, NVE, NW, NWMAX, NWR, NWUPBD
-      LOGICAL            SORTED
-      CHARACTER          JBCMPZ*2
-*     ..
-*     .. External Functions ..
-      INTEGER            ILAENV
-      EXTERNAL           ILAENV
-*     ..
-*     .. Local Arrays ..
-      COMPLEX*16         ZDUM( 1, 1 )
-*     ..
-*     .. External Subroutines ..
-      EXTERNAL           ZLACPY, ZLAHQR, ZLAQR2, ZLAQR5
-*     ..
-*     .. Intrinsic Functions ..
-      INTRINSIC          ABS, DBLE, DCMPLX, DIMAG, INT, MAX, MIN, MOD,
-     $                   SQRT
-*     ..
-*     .. Statement Functions ..
-      DOUBLE PRECISION   CABS1
-*     ..
-*     .. Statement Function definitions ..
-      CABS1( CDUM ) = ABS( DBLE( CDUM ) ) + ABS( DIMAG( CDUM ) )
-*     ..
-*     .. Executable Statements ..
-      INFO = 0
+*              Form  H * C  or  H**H * C  where  C = ( C1 )
+*                                                    ( C2 )
 *
-*     ==== Quick return for N = 0: nothing to do. ====
+*              W := C**H * V  =  (C1**H * V1 + C2**H * V2)  (stored in WORK)
 *
-      IF( N.EQ.0 ) THEN
-         WORK( 1 ) = ONE
-         RETURN
-      END IF
+*              W := C2**H
 *
-      IF( N.LE.NTINY ) THEN
+               DO 70 J = 1, K
+                  CALL ZCOPY( N, C( M-K+J, 1 ), LDC, WORK( 1, J ), 1 )
+                  CALL ZLACGV( N, WORK( 1, J ), 1 )
+   70          CONTINUE
 *
-*        ==== Tiny matrices must use ZLAHQR. ====
+*              W := W * V2
 *
-         LWKOPT = 1
-         IF( LWORK.NE.-1 )
-     $      CALL ZLAHQR( WANTT, WANTZ, N, ILO, IHI, H, LDH, W, ILOZ,
-     $                   IHIZ, Z, LDZ, INFO )
-      ELSE
+               CALL ZTRMM( 'Right', 'Upper', 'No transpose', 'Unit', N,
+     $                     K, ONE, V( M-K+1, 1 ), LDV, WORK, LDWORK )
+               IF( M.GT.K ) THEN
 *
-*        ==== Use small bulge multi-shift QR with aggressive early
-*        .    deflation on larger-than-tiny matrices. ====
+*                 W := W + C1**H * V1
 *
-*        ==== Hope for the best. ====
+                  CALL ZGEMM( 'Conjugate transpose', 'No transpose', N,
+     $                        K, M-K, ONE, C, LDC, V, LDV, ONE, WORK,
+     $                        LDWORK )
+               END IF
 *
-         INFO = 0
+*              W := W * T**H  or  W * T
 *
-*        ==== Set up job flags for ILAENV. ====
+               CALL ZTRMM( 'Right', 'Lower', TRANST, 'Non-unit', N, K,
+     $                     ONE, T, LDT, WORK, LDWORK )
 *
-         IF( WANTT ) THEN
-            JBCMPZ( 1: 1 ) = 'S'
-         ELSE
-            JBCMPZ( 1: 1 ) = 'E'
-         END IF
-         IF( WANTZ ) THEN
-            JBCMPZ( 2: 2 ) = 'V'
-         ELSE
-            JBCMPZ( 2: 2 ) = 'N'
-         END IF
+*              C := C - V * W**H
 *
-*        ==== NWR = recommended deflation window size.  At this
-*        .    point,  N .GT. NTINY = 11, so there is enough
-*        .    subdiagonal workspace for NWR.GE.2 as required.
-*        .    (In fact, there is enough subdiagonal space for
-*        .    NWR.GE.3.) ====
+               IF( M.GT.K ) THEN
 *
-         NWR = ILAENV( 13, 'ZLAQR4', JBCMPZ, N, ILO, IHI, LWORK )
-         NWR = MAX( 2, NWR )
-         NWR = MIN( IHI-ILO+1, ( N-1 ) / 3, NWR )
+*                 C1 := C1 - V1 * W**H
 *
-*        ==== NSR = recommended number of simultaneous shifts.
-*        .    At this point N .GT. NTINY = 11, so there is at
-*        .    enough subdiagonal workspace for NSR to be even
-*        .    and greater than or equal to two as required. ====
+                  CALL ZGEMM( 'No transpose', 'Conjugate transpose',
+     $                        M-K, N, K, -ONE, V, LDV, WORK, LDWORK,
+     $                        ONE, C, LDC )
+               END IF
 *
-         NSR = ILAENV( 15, 'ZLAQR4', JBCMPZ, N, ILO, IHI, LWORK )
-         NSR = MIN( NSR, ( N+6 ) / 9, IHI-ILO )
-         NSR = MAX( 2, NSR-MOD( NSR, 2 ) )
+*              W := W * V2**H
 *
-*        ==== Estimate optimal workspace ====
+               CALL ZTRMM( 'Right', 'Upper', 'Conjugate transpose',
+     $                     'Unit', N, K, ONE, V( M-K+1, 1 ), LDV, WORK,
+     $                     LDWORK )
 *
-*        ==== Workspace query call to ZLAQR2 ====
+*              C2 := C2 - W**H
 *
-         CALL ZLAQR2( WANTT, WANTZ, N, ILO, IHI, NWR+1, H, LDH, ILOZ,
-     $                IHIZ, Z, LDZ, LS, LD, W, H, LDH, N, H, LDH, N, H,
-     $                LDH, WORK, -1 )
+               DO 90 J = 1, K
+                  DO 80 I = 1, N
+                     C( M-K+J, I ) = C( M-K+J, I ) -
+     $                               DCONJG( WORK( I, J ) )
+   80             CONTINUE
+   90          CONTINUE
 *
-*        ==== Optimal workspace = MAX(ZLAQR5, ZLAQR2) ====
+            ELSE IF( LSAME( SIDE, 'R' ) ) THEN
 *
-         LWKOPT = MAX( 3*NSR / 2, INT( WORK( 1 ) ) )
+*              Form  C * H  or  C * H**H  where  C = ( C1  C2 )
 *
-*        ==== Quick return in case of workspace query. ====
+*              W := C * V  =  (C1*V1 + C2*V2)  (stored in WORK)
 *
-         IF( LWORK.EQ.-1 ) THEN
-            WORK( 1 ) = DCMPLX( LWKOPT, 0 )
-            RETURN
+*              W := C2
+*
+               DO 100 J = 1, K
+                  CALL ZCOPY( M, C( 1, N-K+J ), 1, WORK( 1, J ), 1 )
+  100          CONTINUE
+*
+*              W := W * V2
+*
+               CALL ZTRMM( 'Right', 'Upper', 'No transpose', 'Unit', M,
+     $                     K, ONE, V( N-K+1, 1 ), LDV, WORK, LDWORK )
+               IF( N.GT.K ) THEN
+*
+*                 W := W + C1 * V1
+*
+                  CALL ZGEMM( 'No transpose', 'No transpose', M, K, N-K,
+     $                        ONE, C, LDC, V, LDV, ONE, WORK, LDWORK )
+               END IF
+*
+*              W := W * T  or  W * T**H
+*
+               CALL ZTRMM( 'Right', 'Lower', TRANS, 'Non-unit', M, K,
+     $                     ONE, T, LDT, WORK, LDWORK )
+*
+*              C := C - W * V**H
+*
+               IF( N.GT.K ) THEN
+*
+*                 C1 := C1 - W * V1**H
+*
+                  CALL ZGEMM( 'No transpose', 'Conjugate transpose', M,
+     $                        N-K, K, -ONE, WORK, LDWORK, V, LDV, ONE,
+     $                        C, LDC )
+               END IF
+*
+*              W := W * V2**H
+*
+               CALL ZTRMM( 'Right', 'Upper', 'Conjugate transpose',
+     $                     'Unit', M, K, ONE, V( N-K+1, 1 ), LDV, WORK,
+     $                     LDWORK )
+*
+*              C2 := C2 - W
+*
+               DO 120 J = 1, K
+                  DO 110 I = 1, M
+                     C( I, N-K+J ) = C( I, N-K+J ) - WORK( I, J )
+  110             CONTINUE
+  120          CONTINUE
+            END IF
          END IF
 *
-*        ==== ZLAHQR/ZLAQR0 crossover point ====
+      ELSE IF( LSAME( STOREV, 'R' ) ) THEN
 *
-         NMIN = ILAENV( 12, 'ZLAQR4', JBCMPZ, N, ILO, IHI, LWORK )
-         NMIN = MAX( NTINY, NMIN )
+         IF( LSAME( DIRECT, 'F' ) ) THEN
 *
-*        ==== Nibble crossover point ====
+*           Let  V =  ( V1  V2 )    (V1: first K columns)
+*           where  V1  is unit upper triangular.
 *
-         NIBBLE = ILAENV( 14, 'ZLAQR4', JBCMPZ, N, ILO, IHI, LWORK )
-         NIBBLE = MAX( 0, NIBBLE )
+            IF( LSAME( SIDE, 'L' ) ) THEN
 *
-*        ==== Accumulate reflections during ttswp?  Use block
-*        .    2-by-2 structure during matrix-matrix multiply? ====
+*              Form  H * C  or  H**H * C  where  C = ( C1 )
+*                                                    ( C2 )
 *
-         KACC22 = ILAENV( 16, 'ZLAQR4', JBCMPZ, N, ILO, IHI, LWORK )
-         KACC22 = MAX( 0, KACC22 )
-         KACC22 = MIN( 2, KACC22 )
+*              W := C**H * V**H  =  (C1**H * V1**H + C2**H * V2**H) (stored in WORK)
 *
-*        ==== NWMAX = the largest possible deflation window for
-*        .    which there is sufficient workspace. ====
+*              W := C1**H
 *
-         NWMAX = MIN( ( N-1 ) / 3, LWORK / 2 )
-         NW = NWMAX
+               DO 130 J = 1, K
+                  CALL ZCOPY( N, C( J, 1 ), LDC, WORK( 1, J ), 1 )
+                  CALL ZLACGV( N, WORK( 1, J ), 1 )
+  130          CONTINUE
 *
-*        ==== NSMAX = the Largest number of simultaneous shifts
-*        .    for which there is sufficient workspace. ====
+*              W := W * V1**H
 *
-         NSMAX = MIN( ( N+6 ) / 9, 2*LWORK / 3 )
-         NSMAX = NSMAX - MOD( NSMAX, 2 )
+               CALL ZTRMM( 'Right', 'Upper', 'Conjugate transpose',
+     $                     'Unit', N, K, ONE, V, LDV, WORK, LDWORK )
+               IF( M.GT.K ) THEN
 *
-*        ==== NDFL: an iteration count restarted at deflation. ====
+*                 W := W + C2**H * V2**H
 *
-         NDFL = 1
+                  CALL ZGEMM( 'Conjugate transpose',
+     $                        'Conjugate transpose', N, K, M-K, ONE,
+     $                        C( K+1, 1 ), LDC, V( 1, K+1 ), LDV, ONE,
+     $                        WORK, LDWORK )
+               END IF
 *
-*        ==== ITMAX = iteration limit ====
+*              W := W * T**H  or  W * T
 *
-         ITMAX = MAX( 30, 2*KEXSH )*MAX( 10, ( IHI-ILO+1 ) )
+               CALL ZTRMM( 'Right', 'Upper', TRANST, 'Non-unit', N, K,
+     $                     ONE, T, LDT, WORK, LDWORK )
 *
-*        ==== Last row and column in the active block ====
+*              C := C - V**H * W**H
 *
-         KBOT = IHI
+               IF( M.GT.K ) THEN
 *
-*        ==== Main Loop ====
+*                 C2 := C2 - V2**H * W**H
 *
-         DO 70 IT = 1, ITMAX
+                  CALL ZGEMM( 'Conjugate transpose',
+     $                        'Conjugate transpose', M-K, N, K, -ONE,
+     $                        V( 1, K+1 ), LDV, WORK, LDWORK, ONE,
+     $                        C( K+1, 1 ), LDC )
+               END IF
 *
-*           ==== Done when KBOT falls below ILO ====
+*              W := W * V1
 *
-            IF( KBOT.LT.ILO )
-     $         GO TO 80
+               CALL ZTRMM( 'Right', 'Upper', 'No transpose', 'Unit', N,
+     $                     K, ONE, V, LDV, WORK, LDWORK )
 *
-*           ==== Locate active block ====
+*              C1 := C1 - W**H
 *
-            DO 10 K = KBOT, ILO + 1, -1
-               IF( H( K, K-1 ).EQ.ZERO )
-     $            GO TO 20
-   10       CONTINUE
-            K = ILO
-   20       CONTINUE
-            KTOP = K
+               DO 150 J = 1, K
+                  DO 140 I = 1, N
+                     C( J, I ) = C( J, I ) - DCONJG( WORK( I, J ) )
+  140             CONTINUE
+  150          CONTINUE
 *
-*           ==== Select deflation window size:
-*           .    Typical Case:
-*           .      If possible and advisable, nibble the entire
-*           .      active block.  If not, use size MIN(NWR,NWMAX)
-*           .      or MIN(NWR+1,NWMAX) depending upon which has
-*           .      the smaller corresponding subdiagonal entry
-*           .      (a heuristic).
-*           .
-*           .    Exceptional Case:
-*           .      If there have been no deflations in KEXNW or
-*           .      more iterations, then vary the deflation window
-*           .      size.   At first, because, larger windows are,
-*           .      in general, more powerful than smaller ones,
-*           .      rapidly increase the window to the maximum possible.
-*           .      Then, gradually reduce the window size. ====
+            ELSE IF( LSAME( SIDE, 'R' ) ) THEN
 *
-            NH = KBOT - KTOP + 1
-            NWUPBD = MIN( NH, NWMAX )
-            IF( NDFL.LT.KEXNW ) THEN
-               NW = MIN( NWUPBD, NWR )
-            ELSE
-               NW = MIN( NWUPBD, 2*NW )
-            END IF
-            IF( NW.LT.NWMAX ) THEN
-               IF( NW.GE.NH-1 ) THEN
-                  NW = NH
-               ELSE
-                  KWTOP = KBOT - NW + 1
-                  IF( CABS1( H( KWTOP, KWTOP-1 ) ).GT.
-     $                CABS1( H( KWTOP-1, KWTOP-2 ) ) )NW = NW + 1
+*              Form  C * H  or  C * H**H  where  C = ( C1  C2 )
+*
+*              W := C * V**H  =  (C1*V1**H + C2*V2**H)  (stored in WORK)
+*
+*              W := C1
+*
+               DO 160 J = 1, K
+                  CALL ZCOPY( M, C( 1, J ), 1, WORK( 1, J ), 1 )
+  160          CONTINUE
+*
+*              W := W * V1**H
+*
+               CALL ZTRMM( 'Right', 'Upper', 'Conjugate transpose',
+     $                     'Unit', M, K, ONE, V, LDV, WORK, LDWORK )
+               IF( N.GT.K ) THEN
+*
+*                 W := W + C2 * V2**H
+*
+                  CALL ZGEMM( 'No transpose', 'Conjugate transpose', M,
+     $                        K, N-K, ONE, C( 1, K+1 ), LDC,
+     $                        V( 1, K+1 ), LDV, ONE, WORK, LDWORK )
                END IF
-            END IF
-            IF( NDFL.LT.KEXNW ) THEN
-               NDEC = -1
-            ELSE IF( NDEC.GE.0 .OR. NW.GE.NWUPBD ) THEN
-               NDEC = NDEC + 1
-               IF( NW-NDEC.LT.2 )
-     $            NDEC = 0
-               NW = NW - NDEC
+*
+*              W := W * T  or  W * T**H
+*
+               CALL ZTRMM( 'Right', 'Upper', TRANS, 'Non-unit', M, K,
+     $                     ONE, T, LDT, WORK, LDWORK )
+*
+*              C := C - W * V
+*
+               IF( N.GT.K ) THEN
+*
+*                 C2 := C2 - W * V2
+*
+                  CALL ZGEMM( 'No transpose', 'No transpose', M, N-K, K,
+     $                        -ONE, WORK, LDWORK, V( 1, K+1 ), LDV, ONE,
+     $                        C( 1, K+1 ), LDC )
+               END IF
+*
+*              W := W * V1
+*
+               CALL ZTRMM( 'Right', 'Upper', 'No transpose', 'Unit', M,
+     $                     K, ONE, V, LDV, WORK, LDWORK )
+*
+*              C1 := C1 - W
+*
+               DO 180 J = 1, K
+                  DO 170 I = 1, M
+                     C( I, J ) = C( I, J ) - WORK( I, J )
+  170             CONTINUE
+  180          CONTINUE
+*
             END IF
 *
-*           ==== Aggressive early deflation:
-*           .    split workspace under the subdiagonal into
-*           .      - an nw-by-nw work array V in the lower
-*           .        left-hand-corner,
-*           .      - an NW-by-at-least-NW-but-more-is-better
-*           .        (NW-by-NHO) horizontal work array along
-*           .        the bottom edge,
-*           .      - an at-least-NW-but-more-is-better (NHV-by-NW)
-*           .        vertical work array along the left-hand-edge.
-*           .        ====
+         ELSE
 *
-            KV = N - NW + 1
-            KT = NW + 1
-            NHO = ( N-NW-1 ) - KT + 1
-            KWV = NW + 2
-            NVE = ( N-NW ) - KWV + 1
+*           Let  V =  ( V1  V2 )    (V2: last K columns)
+*           where  V2  is unit lower triangular.
 *
-*           ==== Aggressive early deflation ====
+            IF( LSAME( SIDE, 'L' ) ) THEN
 *
-            CALL ZLAQR2( WANTT, WANTZ, N, KTOP, KBOT, NW, H, LDH, ILOZ,
-     $                   IHIZ, Z, LDZ, LS, LD, W, H( KV, 1 ), LDH, NHO,
-     $                   H( KV, KT ), LDH, NVE, H( KWV, 1 ), LDH, WORK,
-     $                   LWORK )
+*              Form  H * C  or  H**H * C  where  C = ( C1 )
+*                                                    ( C2 )
 *
-*           ==== Adjust KBOT accounting for new deflations. ====
+*              W := C**H * V**H  =  (C1**H * V1**H + C2**H * V2**H) (stored in WORK)
 *
-            KBOT = KBOT - LD
+*              W := C2**H
 *
-*           ==== KS points to the shifts. ====
+               DO 190 J = 1, K
+                  CALL ZCOPY( N, C( M-K+J, 1 ), LDC, WORK( 1, J ), 1 )
+                  CALL ZLACGV( N, WORK( 1, J ), 1 )
+  190          CONTINUE
 *
-            KS = KBOT - LS + 1
+*              W := W * V2**H
 *
-*           ==== Skip an expensive QR sweep if there is a (partly
-*           .    heuristic) reason to expect that many eigenvalues
-*           .    will deflate without it.  Here, the QR sweep is
-*           .    skipped if many eigenvalues have just been deflated
-*           .    or if the remaining active block is small.
+               CALL ZTRMM( 'Right', 'Lower', 'Conjugate transpose',
+     $                     'Unit', N, K, ONE, V( 1, M-K+1 ), LDV, WORK,
+     $                     LDWORK )
+               IF( M.GT.K ) THEN
 *
-            IF( ( LD.EQ.0 ) .OR. ( ( 100*LD.LE.NW*NIBBLE ) .AND. ( KBOT-
-     $          KTOP+1.GT.MIN( NMIN, NWMAX ) ) ) ) THEN
+*                 W := W + C1**H * V1**H
 *
-*              ==== NS = nominal number of simultaneous shifts.
-*              .    This may be lowered (slightly) if ZLAQR2
-*              .    did not provide that many shifts. ====
+                  CALL ZGEMM( 'Conjugate transpose',
+     $                        'Conjugate transpose', N, K, M-K, ONE, C,
+     $                        LDC, V, LDV, ONE, WORK, LDWORK )
+               END IF
 *
-               NS = MIN( NSMAX, NSR, MAX( 2, KBOT-KTOP ) )
-               NS = NS - MOD( NS, 2 )
+*              W := W * T**H  or  W * T
 *
-*              ==== If there have been no deflations
-*              .    in a multiple of KEXSH iterations,
-*              .    then try exceptional shifts.
-*              .    Otherwise use shifts provided by
-*              .    ZLAQR2 above or from the eigenvalues
-*              .    of a trailing principal submatrix. ====
+               CALL ZTRMM( 'Right', 'Lower', TRANST, 'Non-unit', N, K,
+     $                     ONE, T, LDT, WORK, LDWORK )
+*
+*              C := C - V**H * W**H
+*
+               IF( M.GT.K ) THEN
+*
+*                 C1 := C1 - V1**H * W**H
+*
+                  CALL ZGEMM( 'Conjugate transpose',
+     $                        'Conjugate transpose', M-K, N, K, -ONE, V,
+     $                        LDV, WORK, LDWORK, ONE, C, LDC )
+               END IF
+*
+*              W := W * V2
+*
+               CALL ZTRMM( 'Right', 'Lower', 'No transpose', 'Unit', N,
+     $                     K, ONE, V( 1, M-K+1 ), LDV, WORK, LDWORK )
 *
-               IF( MOD( NDFL, KEXSH ).EQ.0 ) THEN
-                  KS = KBOT - NS + 1
-                  DO 30 I = KBOT, KS + 1, -2
-                     W( I ) = H( I, I ) + WILK1*CABS1( H( I, I-1 ) )
-                     W( I-1 ) = W( I )
-   30             CONTINUE
-               ELSE
+*              C2 := C2 - W**H
 *
-*                 ==== Got NS/2 or fewer shifts? Use ZLAHQR
-*                 .    on a trailing principal submatrix to
-*                 .    get more. (Since NS.LE.NSMAX.LE.(N+6)/9,
-*                 .    there is enough space below the subdiagonal
-*                 .    to fit an NS-by-NS scratch array.) ====
+               DO 210 J = 1, K
+                  DO 200 I = 1, N
+                     C( M-K+J, I ) = C( M-K+J, I ) -
+     $                               DCONJG( WORK( I, J ) )
+  200             CONTINUE
+  210          CONTINUE
 *
-                  IF( KBOT-KS+1.LE.NS / 2 ) THEN
-                     KS = KBOT - NS + 1
-                     KT = N - NS + 1
-                     CALL ZLACPY( 'A', NS, NS, H( KS, KS ), LDH,
-     $                            H( KT, 1 ), LDH )
-                     CALL ZLAHQR( .false., .false., NS, 1, NS,
-     $                            H( KT, 1 ), LDH, W( KS ), 1, 1, ZDUM,
-     $                            1, INF )
-                     KS = KS + INF
+            ELSE IF( LSAME( SIDE, 'R' ) ) THEN
 *
-*                    ==== In case of a rare QR failure use
-*                    .    eigenvalues of the trailing 2-by-2
-*                    .    principal submatrix.  Scale to avoid
-*                    .    overflows, underflows and subnormals.
-*                    .    (The scale factor S can not be zero,
-*                    .    because H(KBOT,KBOT-1) is nonzero.) ====
+*              Form  C * H  or  C * H**H  where  C = ( C1  C2 )
 *
-                     IF( KS.GE.KBOT ) THEN
-                        S = CABS1( H( KBOT-1, KBOT-1 ) ) +
-     $                      CABS1( H( KBOT, KBOT-1 ) ) +
-     $                      CABS1( H( KBOT-1, KBOT ) ) +
-     $                      CABS1( H( KBOT, KBOT ) )
-                        AA = H( KBOT-1, KBOT-1 ) / S
-                        CC = H( KBOT, KBOT-1 ) / S
-                        BB = H( KBOT-1, KBOT ) / S
-                        DD = H( KBOT, KBOT ) / S
-                        TR2 = ( AA+DD ) / TWO
-                        DET = ( AA-TR2 )*( DD-TR2 ) - BB*CC
-                        RTDISC = SQRT( -DET )
-                        W( KBOT-1 ) = ( TR2+RTDISC )*S
-                        W( KBOT ) = ( TR2-RTDISC )*S
+*              W := C * V**H  =  (C1*V1**H + C2*V2**H)  (stored in WORK)
 *
-                        KS = KBOT - 1
-                     END IF
-                  END IF
+*              W := C2
 *
-                  IF( KBOT-KS+1.GT.NS ) THEN
+               DO 220 J = 1, K
+                  CALL ZCOPY( M, C( 1, N-K+J ), 1, WORK( 1, J ), 1 )
+  220          CONTINUE
 *
-*                    ==== Sort the shifts (Helps a little) ====
+*              W := W * V2**H
 *
-                     SORTED = .false.
-                     DO 50 K = KBOT, KS + 1, -1
-                        IF( SORTED )
-     $                     GO TO 60
-                        SORTED = .true.
-                        DO 40 I = KS, K - 1
-                           IF( CABS1( W( I ) ).LT.CABS1( W( I+1 ) ) )
-     $                          THEN
-                              SORTED = .false.
-                              SWAP = W( I )
-                              W( I ) = W( I+1 )
-                              W( I+1 ) = SWAP
-                           END IF
-   40                   CONTINUE
-   50                CONTINUE
-   60                CONTINUE
-                  END IF
-               END IF
+               CALL ZTRMM( 'Right', 'Lower', 'Conjugate transpose',
+     $                     'Unit', M, K, ONE, V( 1, N-K+1 ), LDV, WORK,
+     $                     LDWORK )
+               IF( N.GT.K ) THEN
 *
-*              ==== If there are only two shifts, then use
-*              .    only one.  ====
+*                 W := W + C1 * V1**H
 *
-               IF( KBOT-KS+1.EQ.2 ) THEN
-                  IF( CABS1( W( KBOT )-H( KBOT, KBOT ) ).LT.
-     $                CABS1( W( KBOT-1 )-H( KBOT, KBOT ) ) ) THEN
-                     W( KBOT-1 ) = W( KBOT )
-                  ELSE
-                     W( KBOT ) = W( KBOT-1 )
-                  END IF
+                  CALL ZGEMM( 'No transpose', 'Conjugate transpose', M,
+     $                        K, N-K, ONE, C, LDC, V, LDV, ONE, WORK,
+     $                        LDWORK )
                END IF
 *
-*              ==== Use up to NS of the the smallest magnatiude
-*              .    shifts.  If there aren't NS shifts available,
-*              .    then use them all, possibly dropping one to
-*              .    make the number of shifts even. ====
+*              W := W * T  or  W * T**H
 *
-               NS = MIN( NS, KBOT-KS+1 )
-               NS = NS - MOD( NS, 2 )
-               KS = KBOT - NS + 1
+               CALL ZTRMM( 'Right', 'Lower', TRANS, 'Non-unit', M, K,
+     $                     ONE, T, LDT, WORK, LDWORK )
 *
-*              ==== Small-bulge multi-shift QR sweep:
-*              .    split workspace under the subdiagonal into
-*              .    - a KDU-by-KDU work array U in the lower
-*              .      left-hand-corner,
-*              .    - a KDU-by-at-least-KDU-but-more-is-better
-*              .      (KDU-by-NHo) horizontal work array WH along
-*              .      the bottom edge,
-*              .    - and an at-least-KDU-but-more-is-better-by-KDU
-*              .      (NVE-by-KDU) vertical work WV arrow along
-*              .      the left-hand-edge. ====
+*              C := C - W * V
 *
-               KDU = 3*NS - 3
-               KU = N - KDU + 1
-               KWH = KDU + 1
-               NHO = ( N-KDU+1-4 ) - ( KDU+1 ) + 1
-               KWV = KDU + 4
-               NVE = N - KDU - KWV + 1
+               IF( N.GT.K ) THEN
 *
-*              ==== Small-bulge multi-shift QR sweep ====
+*                 C1 := C1 - W * V1
 *
-               CALL ZLAQR5( WANTT, WANTZ, KACC22, N, KTOP, KBOT, NS,
-     $                      W( KS ), H, LDH, ILOZ, IHIZ, Z, LDZ, WORK,
-     $                      3, H( KU, 1 ), LDH, NVE, H( KWV, 1 ), LDH,
-     $                      NHO, H( KU, KWH ), LDH )
-            END IF
+                  CALL ZGEMM( 'No transpose', 'No transpose', M, N-K, K,
+     $                        -ONE, WORK, LDWORK, V, LDV, ONE, C, LDC )
+               END IF
 *
-*           ==== Note progress (or the lack of it). ====
+*              W := W * V2
 *
-            IF( LD.GT.0 ) THEN
-               NDFL = 1
-            ELSE
-               NDFL = NDFL + 1
-            END IF
+               CALL ZTRMM( 'Right', 'Lower', 'No transpose', 'Unit', M,
+     $                     K, ONE, V( 1, N-K+1 ), LDV, WORK, LDWORK )
 *
-*           ==== End of main loop ====
-   70    CONTINUE
+*              C1 := C1 - W
 *
-*        ==== Iteration limit exceeded.  Set INFO to show where
-*        .    the problem occurred and exit. ====
+               DO 240 J = 1, K
+                  DO 230 I = 1, M
+                     C( I, N-K+J ) = C( I, N-K+J ) - WORK( I, J )
+  230             CONTINUE
+  240          CONTINUE
 *
-         INFO = KBOT
-   80    CONTINUE
-      END IF
+            END IF
 *
-*     ==== Return the optimal value of LWORK. ====
+         END IF
+      END IF
 *
-      WORK( 1 ) = DCMPLX( LWKOPT, 0 )
+      RETURN
 *
-*     ==== End of ZLAQR4 ====
+*     End of ZLARFB
 *
       END
-*> \brief \b ZLAQR5 performs a single small-bulge multi-shift QR sweep.
+*> \brief \b ZLARFG generates an elementary reflector (Householder matrix).
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download ZLAQR5 + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/zlaqr5.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/zlaqr5.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/zlaqr5.f"> 
+*> Download ZLARFG + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/zlarfg.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/zlarfg.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/zlarfg.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
-*       SUBROUTINE ZLAQR5( WANTT, WANTZ, KACC22, N, KTOP, KBOT, NSHFTS, S,
-*                          H, LDH, ILOZ, IHIZ, Z, LDZ, V, LDV, U, LDU, NV,
-*                          WV, LDWV, NH, WH, LDWH )
-* 
+*       SUBROUTINE ZLARFG( N, ALPHA, X, INCX, TAU )
+*
 *       .. Scalar Arguments ..
-*       INTEGER            IHIZ, ILOZ, KACC22, KBOT, KTOP, LDH, LDU, LDV,
-*      $                   LDWH, LDWV, LDZ, N, NH, NSHFTS, NV
-*       LOGICAL            WANTT, WANTZ
+*       INTEGER            INCX, N
+*       COMPLEX*16         ALPHA, TAU
 *       ..
 *       .. Array Arguments ..
-*       COMPLEX*16         H( LDH, * ), S( * ), U( LDU, * ), V( LDV, * ),
-*      $                   WH( LDWH, * ), WV( LDWV, * ), Z( LDZ, * )
+*       COMPLEX*16         X( * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
 *>
 *> \verbatim
 *>
-*>    ZLAQR5, called by ZLAQR0, performs a
-*>    single small-bulge multi-shift QR sweep.
+*> ZLARFG generates a complex elementary reflector H of order n, such
+*> that
+*>
+*>       H**H * ( alpha ) = ( beta ),   H**H * H = I.
+*>              (   x   )   (   0  )
+*>
+*> where alpha and beta are scalars, with beta real, and x is an
+*> (n-1)-element complex vector. H is represented in the form
+*>
+*>       H = I - tau * ( 1 ) * ( 1 v**H ) ,
+*>                     ( v )
+*>
+*> where tau is a complex scalar and v is a complex (n-1)-element
+*> vector. Note that H is not hermitian.
+*>
+*> If the elements of x are all zero and alpha is real, then tau = 0
+*> and H is taken to be the unit matrix.
+*>
+*> Otherwise  1 <= real(tau) <= 2  and  abs(tau-1) <= 1 .
 *> \endverbatim
 *
 *  Arguments:
 *  ==========
 *
-*> \param[in] WANTT
-*> \verbatim
-*>          WANTT is logical scalar
-*>             WANTT = .true. if the triangular Schur factor
-*>             is being computed.  WANTT is set to .false. otherwise.
-*> \endverbatim
-*>
-*> \param[in] WANTZ
-*> \verbatim
-*>          WANTZ is logical scalar
-*>             WANTZ = .true. if the unitary Schur factor is being
-*>             computed.  WANTZ is set to .false. otherwise.
-*> \endverbatim
-*>
-*> \param[in] KACC22
-*> \verbatim
-*>          KACC22 is integer with value 0, 1, or 2.
-*>             Specifies the computation mode of far-from-diagonal
-*>             orthogonal updates.
-*>        = 0: ZLAQR5 does not accumulate reflections and does not
-*>             use matrix-matrix multiply to update far-from-diagonal
-*>             matrix entries.
-*>        = 1: ZLAQR5 accumulates reflections and uses matrix-matrix
-*>             multiply to update the far-from-diagonal matrix entries.
-*>        = 2: ZLAQR5 accumulates reflections, uses matrix-matrix
-*>             multiply to update the far-from-diagonal matrix entries,
-*>             and takes advantage of 2-by-2 block structure during
-*>             matrix multiplies.
-*> \endverbatim
-*>
 *> \param[in] N
 *> \verbatim
-*>          N is integer scalar
-*>             N is the order of the Hessenberg matrix H upon which this
-*>             subroutine operates.
+*>          N is INTEGER
+*>          The order of the elementary reflector.
 *> \endverbatim
 *>
-*> \param[in] KTOP
+*> \param[in,out] ALPHA
 *> \verbatim
-*>          KTOP is integer scalar
+*>          ALPHA is COMPLEX*16
+*>          On entry, the value alpha.
+*>          On exit, it is overwritten with the value beta.
 *> \endverbatim
 *>
-*> \param[in] KBOT
+*> \param[in,out] X
 *> \verbatim
-*>          KBOT is integer scalar
-*>             These are the first and last rows and columns of an
-*>             isolated diagonal block upon which the QR sweep is to be
-*>             applied. It is assumed without a check that
-*>                       either KTOP = 1  or   H(KTOP,KTOP-1) = 0
-*>             and
-*>                       either KBOT = N  or   H(KBOT+1,KBOT) = 0.
+*>          X is COMPLEX*16 array, dimension
+*>                         (1+(N-2)*abs(INCX))
+*>          On entry, the vector x.
+*>          On exit, it is overwritten with the vector v.
 *> \endverbatim
 *>
-*> \param[in] NSHFTS
+*> \param[in] INCX
 *> \verbatim
-*>          NSHFTS is integer scalar
-*>             NSHFTS gives the number of simultaneous shifts.  NSHFTS
-*>             must be positive and even.
+*>          INCX is INTEGER
+*>          The increment between elements of X. INCX > 0.
 *> \endverbatim
 *>
-*> \param[in,out] S
+*> \param[out] TAU
 *> \verbatim
-*>          S is COMPLEX*16 array of size (NSHFTS)
-*>             S contains the shifts of origin that define the multi-
-*>             shift QR sweep.  On output S may be reordered.
+*>          TAU is COMPLEX*16
+*>          The value tau.
 *> \endverbatim
+*
+*  Authors:
+*  ========
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date December 2016
+*
+*> \ingroup complex16OTHERauxiliary
+*
+*  =====================================================================
+      SUBROUTINE ZLARFG( N, ALPHA, X, INCX, TAU )
+*
+*  -- LAPACK auxiliary routine (version 3.7.0) --
+*  -- LAPACK is a software package provided by Univ. of Tennessee,    --
+*  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+*     December 2016
+*
+*     .. Scalar Arguments ..
+      INTEGER            INCX, N
+      COMPLEX*16         ALPHA, TAU
+*     ..
+*     .. Array Arguments ..
+      COMPLEX*16         X( * )
+*     ..
+*
+*  =====================================================================
+*
+*     .. Parameters ..
+      DOUBLE PRECISION   ONE, ZERO
+      PARAMETER          ( ONE = 1.0D+0, ZERO = 0.0D+0 )
+*     ..
+*     .. Local Scalars ..
+      INTEGER            J, KNT
+      DOUBLE PRECISION   ALPHI, ALPHR, BETA, RSAFMN, SAFMIN, XNORM
+*     ..
+*     .. External Functions ..
+      DOUBLE PRECISION   DLAMCH, DLAPY3, DZNRM2
+      COMPLEX*16         ZLADIV
+      EXTERNAL           DLAMCH, DLAPY3, DZNRM2, ZLADIV
+*     ..
+*     .. Intrinsic Functions ..
+      INTRINSIC          ABS, DBLE, DCMPLX, DIMAG, SIGN
+*     ..
+*     .. External Subroutines ..
+      EXTERNAL           ZDSCAL, ZSCAL
+*     ..
+*     .. Executable Statements ..
+*
+      IF( N.LE.0 ) THEN
+         TAU = ZERO
+         RETURN
+      END IF
+*
+      XNORM = DZNRM2( N-1, X, INCX )
+      ALPHR = DBLE( ALPHA )
+      ALPHI = DIMAG( ALPHA )
+*
+      IF( XNORM.EQ.ZERO .AND. ALPHI.EQ.ZERO ) THEN
+*
+*        H  =  I
+*
+         TAU = ZERO
+      ELSE
+*
+*        general case
+*
+         BETA = -SIGN( DLAPY3( ALPHR, ALPHI, XNORM ), ALPHR )
+         SAFMIN = DLAMCH( 'S' ) / DLAMCH( 'E' )
+         RSAFMN = ONE / SAFMIN
+*
+         KNT = 0
+         IF( ABS( BETA ).LT.SAFMIN ) THEN
+*
+*           XNORM, BETA may be inaccurate; scale X and recompute them
+*
+   10       CONTINUE
+            KNT = KNT + 1
+            CALL ZDSCAL( N-1, RSAFMN, X, INCX )
+            BETA = BETA*RSAFMN
+            ALPHI = ALPHI*RSAFMN
+            ALPHR = ALPHR*RSAFMN
+            IF( ABS( BETA ).LT.SAFMIN )
+     $         GO TO 10
+*
+*           New BETA is at most 1, at least SAFMIN
+*
+            XNORM = DZNRM2( N-1, X, INCX )
+            ALPHA = DCMPLX( ALPHR, ALPHI )
+            BETA = -SIGN( DLAPY3( ALPHR, ALPHI, XNORM ), ALPHR )
+         END IF
+         TAU = DCMPLX( ( BETA-ALPHR ) / BETA, -ALPHI / BETA )
+         ALPHA = ZLADIV( DCMPLX( ONE ), ALPHA-BETA )
+         CALL ZSCAL( N-1, ALPHA, X, INCX )
+*
+*        If ALPHA is subnormal, it may lose relative accuracy
+*
+         DO 20 J = 1, KNT
+            BETA = BETA*SAFMIN
+ 20      CONTINUE
+         ALPHA = BETA
+      END IF
+*
+      RETURN
+*
+*     End of ZLARFG
+*
+      END
+*> \brief \b ZLARFT forms the triangular factor T of a block reflector H = I - vtvH
+*
+*  =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
+*
+*> \htmlonly
+*> Download ZLARFT + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/zlarft.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/zlarft.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/zlarft.f">
+*> [TXT]</a>
+*> \endhtmlonly
+*
+*  Definition:
+*  ===========
+*
+*       SUBROUTINE ZLARFT( DIRECT, STOREV, N, K, V, LDV, TAU, T, LDT )
+*
+*       .. Scalar Arguments ..
+*       CHARACTER          DIRECT, STOREV
+*       INTEGER            K, LDT, LDV, N
+*       ..
+*       .. Array Arguments ..
+*       COMPLEX*16         T( LDT, * ), TAU( * ), V( LDV, * )
+*       ..
+*
+*
+*> \par Purpose:
+*  =============
 *>
-*> \param[in,out] H
 *> \verbatim
-*>          H is COMPLEX*16 array of size (LDH,N)
-*>             On input H contains a Hessenberg matrix.  On output a
-*>             multi-shift QR sweep with shifts SR(J)+i*SI(J) is applied
-*>             to the isolated diagonal block in rows and columns KTOP
-*>             through KBOT.
-*> \endverbatim
 *>
-*> \param[in] LDH
-*> \verbatim
-*>          LDH is integer scalar
-*>             LDH is the leading dimension of H just as declared in the
-*>             calling procedure.  LDH.GE.MAX(1,N).
-*> \endverbatim
+*> ZLARFT forms the triangular factor T of a complex block reflector H
+*> of order n, which is defined as a product of k elementary reflectors.
 *>
-*> \param[in] ILOZ
-*> \verbatim
-*>          ILOZ is INTEGER
-*> \endverbatim
+*> If DIRECT = 'F', H = H(1) H(2) . . . H(k) and T is upper triangular;
 *>
-*> \param[in] IHIZ
-*> \verbatim
-*>          IHIZ is INTEGER
-*>             Specify the rows of Z to which transformations must be
-*>             applied if WANTZ is .TRUE.. 1 .LE. ILOZ .LE. IHIZ .LE. N
-*> \endverbatim
+*> If DIRECT = 'B', H = H(k) . . . H(2) H(1) and T is lower triangular.
 *>
-*> \param[in,out] Z
-*> \verbatim
-*>          Z is COMPLEX*16 array of size (LDZ,IHI)
-*>             If WANTZ = .TRUE., then the QR Sweep unitary
-*>             similarity transformation is accumulated into
-*>             Z(ILOZ:IHIZ,ILO:IHI) from the right.
-*>             If WANTZ = .FALSE., then Z is unreferenced.
-*> \endverbatim
+*> If STOREV = 'C', the vector which defines the elementary reflector
+*> H(i) is stored in the i-th column of the array V, and
 *>
-*> \param[in] LDZ
-*> \verbatim
-*>          LDZ is integer scalar
-*>             LDA is the leading dimension of Z just as declared in
-*>             the calling procedure. LDZ.GE.N.
-*> \endverbatim
+*>    H  =  I - V * T * V**H
 *>
-*> \param[out] V
-*> \verbatim
-*>          V is COMPLEX*16 array of size (LDV,NSHFTS/2)
-*> \endverbatim
+*> If STOREV = 'R', the vector which defines the elementary reflector
+*> H(i) is stored in the i-th row of the array V, and
 *>
-*> \param[in] LDV
+*>    H  =  I - V**H * T * V
+*> \endverbatim
+*
+*  Arguments:
+*  ==========
+*
+*> \param[in] DIRECT
 *> \verbatim
-*>          LDV is integer scalar
-*>             LDV is the leading dimension of V as declared in the
-*>             calling procedure.  LDV.GE.3.
+*>          DIRECT is CHARACTER*1
+*>          Specifies the order in which the elementary reflectors are
+*>          multiplied to form the block reflector:
+*>          = 'F': H = H(1) H(2) . . . H(k) (Forward)
+*>          = 'B': H = H(k) . . . H(2) H(1) (Backward)
 *> \endverbatim
 *>
-*> \param[out] U
+*> \param[in] STOREV
 *> \verbatim
-*>          U is COMPLEX*16 array of size
-*>             (LDU,3*NSHFTS-3)
+*>          STOREV is CHARACTER*1
+*>          Specifies how the vectors which define the elementary
+*>          reflectors are stored (see also Further Details):
+*>          = 'C': columnwise
+*>          = 'R': rowwise
 *> \endverbatim
 *>
-*> \param[in] LDU
+*> \param[in] N
 *> \verbatim
-*>          LDU is integer scalar
-*>             LDU is the leading dimension of U just as declared in the
-*>             in the calling subroutine.  LDU.GE.3*NSHFTS-3.
+*>          N is INTEGER
+*>          The order of the block reflector H. N >= 0.
 *> \endverbatim
 *>
-*> \param[in] NH
+*> \param[in] K
 *> \verbatim
-*>          NH is integer scalar
-*>             NH is the number of columns in array WH available for
-*>             workspace. NH.GE.1.
+*>          K is INTEGER
+*>          The order of the triangular factor T (= the number of
+*>          elementary reflectors). K >= 1.
 *> \endverbatim
 *>
-*> \param[out] WH
+*> \param[in] V
 *> \verbatim
-*>          WH is COMPLEX*16 array of size (LDWH,NH)
+*>          V is COMPLEX*16 array, dimension
+*>                               (LDV,K) if STOREV = 'C'
+*>                               (LDV,N) if STOREV = 'R'
+*>          The matrix V. See further details.
 *> \endverbatim
 *>
-*> \param[in] LDWH
+*> \param[in] LDV
 *> \verbatim
-*>          LDWH is integer scalar
-*>             Leading dimension of WH just as declared in the
-*>             calling procedure.  LDWH.GE.3*NSHFTS-3.
+*>          LDV is INTEGER
+*>          The leading dimension of the array V.
+*>          If STOREV = 'C', LDV >= max(1,N); if STOREV = 'R', LDV >= K.
 *> \endverbatim
 *>
-*> \param[in] NV
+*> \param[in] TAU
 *> \verbatim
-*>          NV is integer scalar
-*>             NV is the number of rows in WV agailable for workspace.
-*>             NV.GE.1.
+*>          TAU is COMPLEX*16 array, dimension (K)
+*>          TAU(i) must contain the scalar factor of the elementary
+*>          reflector H(i).
 *> \endverbatim
 *>
-*> \param[out] WV
+*> \param[out] T
 *> \verbatim
-*>          WV is COMPLEX*16 array of size
-*>             (LDWV,3*NSHFTS-3)
+*>          T is COMPLEX*16 array, dimension (LDT,K)
+*>          The k by k triangular factor T of the block reflector.
+*>          If DIRECT = 'F', T is upper triangular; if DIRECT = 'B', T is
+*>          lower triangular. The rest of the array is not used.
 *> \endverbatim
 *>
-*> \param[in] LDWV
+*> \param[in] LDT
 *> \verbatim
-*>          LDWV is integer scalar
-*>             LDWV is the leading dimension of WV as declared in the
-*>             in the calling subroutine.  LDWV.GE.NV.
+*>          LDT is INTEGER
+*>          The leading dimension of the array T. LDT >= K.
 *> \endverbatim
 *
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date September 2012
+*> \date June 2016
 *
 *> \ingroup complex16OTHERauxiliary
 *
-*> \par Contributors:
-*  ==================
+*> \par Further Details:
+*  =====================
 *>
-*>       Karen Braman and Ralph Byers, Department of Mathematics,
-*>       University of Kansas, USA
-*
-*> \par References:
-*  ================
+*> \verbatim
 *>
-*>       K. Braman, R. Byers and R. Mathias, The Multi-Shift QR
-*>       Algorithm Part I: Maintaining Well Focused Shifts, and Level 3
-*>       Performance, SIAM Journal of Matrix Analysis, volume 23, pages
-*>       929--947, 2002.
+*>  The shape of the matrix V and the storage of the vectors which define
+*>  the H(i) is best illustrated by the following example with n = 5 and
+*>  k = 3. The elements equal to 1 are not stored.
+*>
+*>  DIRECT = 'F' and STOREV = 'C':         DIRECT = 'F' and STOREV = 'R':
+*>
+*>               V = (  1       )                 V = (  1 v1 v1 v1 v1 )
+*>                   ( v1  1    )                     (     1 v2 v2 v2 )
+*>                   ( v1 v2  1 )                     (        1 v3 v3 )
+*>                   ( v1 v2 v3 )
+*>                   ( v1 v2 v3 )
+*>
+*>  DIRECT = 'B' and STOREV = 'C':         DIRECT = 'B' and STOREV = 'R':
+*>
+*>               V = ( v1 v2 v3 )                 V = ( v1 v1  1       )
+*>                   ( v1 v2 v3 )                     ( v2 v2 v2  1    )
+*>                   (  1 v2 v3 )                     ( v3 v3 v3 v3  1 )
+*>                   (     1 v3 )
+*>                   (        1 )
+*> \endverbatim
 *>
 *  =====================================================================
-      SUBROUTINE ZLAQR5( WANTT, WANTZ, KACC22, N, KTOP, KBOT, NSHFTS, S,
-     $                   H, LDH, ILOZ, IHIZ, Z, LDZ, V, LDV, U, LDU, NV,
-     $                   WV, LDWV, NH, WH, LDWH )
+      SUBROUTINE ZLARFT( DIRECT, STOREV, N, K, V, LDV, TAU, T, LDT )
 *
-*  -- LAPACK auxiliary routine (version 3.4.2) --
+*  -- LAPACK auxiliary routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     September 2012
+*     June 2016
 *
 *     .. Scalar Arguments ..
-      INTEGER            IHIZ, ILOZ, KACC22, KBOT, KTOP, LDH, LDU, LDV,
-     $                   LDWH, LDWV, LDZ, N, NH, NSHFTS, NV
-      LOGICAL            WANTT, WANTZ
+      CHARACTER          DIRECT, STOREV
+      INTEGER            K, LDT, LDV, N
 *     ..
 *     .. Array Arguments ..
-      COMPLEX*16         H( LDH, * ), S( * ), U( LDU, * ), V( LDV, * ),
-     $                   WH( LDWH, * ), WV( LDWV, * ), Z( LDZ, * )
+      COMPLEX*16         T( LDT, * ), TAU( * ), V( LDV, * )
 *     ..
 *
-*  ================================================================
+*  =====================================================================
+*
 *     .. Parameters ..
-      COMPLEX*16         ZERO, ONE
-      PARAMETER          ( ZERO = ( 0.0d0, 0.0d0 ),
-     $                   ONE = ( 1.0d0, 0.0d0 ) )
-      DOUBLE PRECISION   RZERO, RONE
-      PARAMETER          ( RZERO = 0.0d0, RONE = 1.0d0 )
+      COMPLEX*16         ONE, ZERO
+      PARAMETER          ( ONE = ( 1.0D+0, 0.0D+0 ),
+     $                   ZERO = ( 0.0D+0, 0.0D+0 ) )
 *     ..
 *     .. Local Scalars ..
-      COMPLEX*16         ALPHA, BETA, CDUM, REFSUM
-      DOUBLE PRECISION   H11, H12, H21, H22, SAFMAX, SAFMIN, SCL,
-     $                   SMLNUM, TST1, TST2, ULP
-      INTEGER            I2, I4, INCOL, J, J2, J4, JBOT, JCOL, JLEN,
-     $                   JROW, JTOP, K, K1, KDU, KMS, KNZ, KRCOL, KZS,
-     $                   M, M22, MBOT, MEND, MSTART, MTOP, NBMPS, NDCOL,
-     $                   NS, NU
-      LOGICAL            ACCUM, BLK22, BMP22
-*     ..
-*     .. External Functions ..
-      DOUBLE PRECISION   DLAMCH
-      EXTERNAL           DLAMCH
-*     ..
-*     .. Intrinsic Functions ..
-*
-      INTRINSIC          ABS, DBLE, DCONJG, DIMAG, MAX, MIN, MOD
-*     ..
-*     .. Local Arrays ..
-      COMPLEX*16         VT( 3 )
+      INTEGER            I, J, PREVLASTV, LASTV
 *     ..
 *     .. External Subroutines ..
-      EXTERNAL           DLABAD, ZGEMM, ZLACPY, ZLAQR1, ZLARFG, ZLASET,
-     $                   ZTRMM
-*     ..
-*     .. Statement Functions ..
-      DOUBLE PRECISION   CABS1
+      EXTERNAL           ZGEMV, ZTRMV, ZGEMM
 *     ..
-*     .. Statement Function definitions ..
-      CABS1( CDUM ) = ABS( DBLE( CDUM ) ) + ABS( DIMAG( CDUM ) )
+*     .. External Functions ..
+      LOGICAL            LSAME
+      EXTERNAL           LSAME
 *     ..
 *     .. Executable Statements ..
 *
-*     ==== If there are no shifts, then there is nothing to do. ====
-*
-      IF( NSHFTS.LT.2 )
-     $   RETURN
-*
-*     ==== If the active block is empty or 1-by-1, then there
-*     .    is nothing to do. ====
+*     Quick return if possible
 *
-      IF( KTOP.GE.KBOT )
+      IF( N.EQ.0 )
      $   RETURN
 *
-*     ==== NSHFTS is supposed to be even, but if it is odd,
-*     .    then simply reduce it by one.  ====
-*
-      NS = NSHFTS - MOD( NSHFTS, 2 )
-*
-*     ==== Machine constants for deflation ====
-*
-      SAFMIN = DLAMCH( 'SAFE MINIMUM' )
-      SAFMAX = RONE / SAFMIN
-      CALL DLABAD( SAFMIN, SAFMAX )
-      ULP = DLAMCH( 'PRECISION' )
-      SMLNUM = SAFMIN*( DBLE( N ) / ULP )
-*
-*     ==== Use accumulated reflections to update far-from-diagonal
-*     .    entries ? ====
-*
-      ACCUM = ( KACC22.EQ.1 ) .OR. ( KACC22.EQ.2 )
-*
-*     ==== If so, exploit the 2-by-2 block structure? ====
-*
-      BLK22 = ( NS.GT.2 ) .AND. ( KACC22.EQ.2 )
-*
-*     ==== clear trash ====
-*
-      IF( KTOP+2.LE.KBOT )
-     $   H( KTOP+2, KTOP ) = ZERO
-*
-*     ==== NBMPS = number of 2-shift bulges in the chain ====
-*
-      NBMPS = NS / 2
-*
-*     ==== KDU = width of slab ====
-*
-      KDU = 6*NBMPS - 3
-*
-*     ==== Create and chase chains of NBMPS bulges ====
-*
-      DO 210 INCOL = 3*( 1-NBMPS ) + KTOP - 1, KBOT - 2, 3*NBMPS - 2
-         NDCOL = INCOL + KDU
-         IF( ACCUM )
-     $      CALL ZLASET( 'ALL', KDU, KDU, ZERO, ONE, U, LDU )
+      IF( LSAME( DIRECT, 'F' ) ) THEN
+         PREVLASTV = N
+         DO I = 1, K
+            PREVLASTV = MAX( PREVLASTV, I )
+            IF( TAU( I ).EQ.ZERO ) THEN
 *
-*        ==== Near-the-diagonal bulge chase.  The following loop
-*        .    performs the near-the-diagonal part of a small bulge
-*        .    multi-shift QR sweep.  Each 6*NBMPS-2 column diagonal
-*        .    chunk extends from column INCOL to column NDCOL
-*        .    (including both column INCOL and column NDCOL). The
-*        .    following loop chases a 3*NBMPS column long chain of
-*        .    NBMPS bulges 3*NBMPS-2 columns to the right.  (INCOL
-*        .    may be less than KTOP and and NDCOL may be greater than
-*        .    KBOT indicating phantom columns from which to chase
-*        .    bulges before they are actually introduced or to which
-*        .    to chase bulges beyond column KBOT.)  ====
+*              H(i)  =  I
 *
-         DO 140 KRCOL = INCOL, MIN( INCOL+3*NBMPS-3, KBOT-2 )
+               DO J = 1, I
+                  T( J, I ) = ZERO
+               END DO
+            ELSE
 *
-*           ==== Bulges number MTOP to MBOT are active double implicit
-*           .    shift bulges.  There may or may not also be small
-*           .    2-by-2 bulge, if there is room.  The inactive bulges
-*           .    (if any) must wait until the active bulges have moved
-*           .    down the diagonal to make room.  The phantom matrix
-*           .    paradigm described above helps keep track.  ====
+*              general case
 *
-            MTOP = MAX( 1, ( ( KTOP-1 )-KRCOL+2 ) / 3+1 )
-            MBOT = MIN( NBMPS, ( KBOT-KRCOL ) / 3 )
-            M22 = MBOT + 1
-            BMP22 = ( MBOT.LT.NBMPS ) .AND. ( KRCOL+3*( M22-1 ) ).EQ.
-     $              ( KBOT-2 )
+               IF( LSAME( STOREV, 'C' ) ) THEN
+*                 Skip any trailing zeros.
+                  DO LASTV = N, I+1, -1
+                     IF( V( LASTV, I ).NE.ZERO ) EXIT
+                  END DO
+                  DO J = 1, I-1
+                     T( J, I ) = -TAU( I ) * CONJG( V( I , J ) )
+                  END DO
+                  J = MIN( LASTV, PREVLASTV )
 *
-*           ==== Generate reflections to chase the chain right
-*           .    one column.  (The minimum value of K is KTOP-1.) ====
+*                 T(1:i-1,i) := - tau(i) * V(i:j,1:i-1)**H * V(i:j,i)
 *
-            DO 10 M = MTOP, MBOT
-               K = KRCOL + 3*( M-1 )
-               IF( K.EQ.KTOP-1 ) THEN
-                  CALL ZLAQR1( 3, H( KTOP, KTOP ), LDH, S( 2*M-1 ),
-     $                         S( 2*M ), V( 1, M ) )
-                  ALPHA = V( 1, M )
-                  CALL ZLARFG( 3, ALPHA, V( 2, M ), 1, V( 1, M ) )
+                  CALL ZGEMV( 'Conjugate transpose', J-I, I-1,
+     $                        -TAU( I ), V( I+1, 1 ), LDV,
+     $                        V( I+1, I ), 1, ONE, T( 1, I ), 1 )
                ELSE
-                  BETA = H( K+1, K )
-                  V( 2, M ) = H( K+2, K )
-                  V( 3, M ) = H( K+3, K )
-                  CALL ZLARFG( 3, BETA, V( 2, M ), 1, V( 1, M ) )
-*
-*                 ==== A Bulge may collapse because of vigilant
-*                 .    deflation or destructive underflow.  In the
-*                 .    underflow case, try the two-small-subdiagonals
-*                 .    trick to try to reinflate the bulge.  ====
-*
-                  IF( H( K+3, K ).NE.ZERO .OR. H( K+3, K+1 ).NE.
-     $                ZERO .OR. H( K+3, K+2 ).EQ.ZERO ) THEN
-*
-*                    ==== Typical case: not collapsed (yet). ====
-*
-                     H( K+1, K ) = BETA
-                     H( K+2, K ) = ZERO
-                     H( K+3, K ) = ZERO
-                  ELSE
-*
-*                    ==== Atypical case: collapsed.  Attempt to
-*                    .    reintroduce ignoring H(K+1,K) and H(K+2,K).
-*                    .    If the fill resulting from the new
-*                    .    reflector is too large, then abandon it.
-*                    .    Otherwise, use the new one. ====
-*
-                     CALL ZLAQR1( 3, H( K+1, K+1 ), LDH, S( 2*M-1 ),
-     $                            S( 2*M ), VT )
-                     ALPHA = VT( 1 )
-                     CALL ZLARFG( 3, ALPHA, VT( 2 ), 1, VT( 1 ) )
-                     REFSUM = DCONJG( VT( 1 ) )*
-     $                        ( H( K+1, K )+DCONJG( VT( 2 ) )*
-     $                        H( K+2, K ) )
-*
-                     IF( CABS1( H( K+2, K )-REFSUM*VT( 2 ) )+
-     $                   CABS1( REFSUM*VT( 3 ) ).GT.ULP*
-     $                   ( CABS1( H( K, K ) )+CABS1( H( K+1,
-     $                   K+1 ) )+CABS1( H( K+2, K+2 ) ) ) ) THEN
-*
-*                       ==== Starting a new bulge here would
-*                       .    create non-negligible fill.  Use
-*                       .    the old one with trepidation. ====
-*
-                        H( K+1, K ) = BETA
-                        H( K+2, K ) = ZERO
-                        H( K+3, K ) = ZERO
-                     ELSE
+*                 Skip any trailing zeros.
+                  DO LASTV = N, I+1, -1
+                     IF( V( I, LASTV ).NE.ZERO ) EXIT
+                  END DO
+                  DO J = 1, I-1
+                     T( J, I ) = -TAU( I ) * V( J , I )
+                  END DO
+                  J = MIN( LASTV, PREVLASTV )
 *
-*                       ==== Stating a new bulge here would
-*                       .    create only negligible fill.
-*                       .    Replace the old reflector with
-*                       .    the new one. ====
+*                 T(1:i-1,i) := - tau(i) * V(1:i-1,i:j) * V(i,i:j)**H
 *
-                        H( K+1, K ) = H( K+1, K ) - REFSUM
-                        H( K+2, K ) = ZERO
-                        H( K+3, K ) = ZERO
-                        V( 1, M ) = VT( 1 )
-                        V( 2, M ) = VT( 2 )
-                        V( 3, M ) = VT( 3 )
-                     END IF
-                  END IF
+                  CALL ZGEMM( 'N', 'C', I-1, 1, J-I, -TAU( I ),
+     $                        V( 1, I+1 ), LDV, V( I, I+1 ), LDV,
+     $                        ONE, T( 1, I ), LDT )
                END IF
-   10       CONTINUE
 *
-*           ==== Generate a 2-by-2 reflection, if needed. ====
+*              T(1:i-1,i) := T(1:i-1,1:i-1) * T(1:i-1,i)
 *
-            K = KRCOL + 3*( M22-1 )
-            IF( BMP22 ) THEN
-               IF( K.EQ.KTOP-1 ) THEN
-                  CALL ZLAQR1( 2, H( K+1, K+1 ), LDH, S( 2*M22-1 ),
-     $                         S( 2*M22 ), V( 1, M22 ) )
-                  BETA = V( 1, M22 )
-                  CALL ZLARFG( 2, BETA, V( 2, M22 ), 1, V( 1, M22 ) )
+               CALL ZTRMV( 'Upper', 'No transpose', 'Non-unit', I-1, T,
+     $                     LDT, T( 1, I ), 1 )
+               T( I, I ) = TAU( I )
+               IF( I.GT.1 ) THEN
+                  PREVLASTV = MAX( PREVLASTV, LASTV )
                ELSE
-                  BETA = H( K+1, K )
-                  V( 2, M22 ) = H( K+2, K )
-                  CALL ZLARFG( 2, BETA, V( 2, M22 ), 1, V( 1, M22 ) )
-                  H( K+1, K ) = BETA
-                  H( K+2, K ) = ZERO
+                  PREVLASTV = LASTV
                END IF
-            END IF
+             END IF
+         END DO
+      ELSE
+         PREVLASTV = 1
+         DO I = K, 1, -1
+            IF( TAU( I ).EQ.ZERO ) THEN
 *
-*           ==== Multiply H by reflections from the left ====
+*              H(i)  =  I
 *
-            IF( ACCUM ) THEN
-               JBOT = MIN( NDCOL, KBOT )
-            ELSE IF( WANTT ) THEN
-               JBOT = N
+               DO J = I, K
+                  T( J, I ) = ZERO
+               END DO
             ELSE
-               JBOT = KBOT
-            END IF
-            DO 30 J = MAX( KTOP, KRCOL ), JBOT
-               MEND = MIN( MBOT, ( J-KRCOL+2 ) / 3 )
-               DO 20 M = MTOP, MEND
-                  K = KRCOL + 3*( M-1 )
-                  REFSUM = DCONJG( V( 1, M ) )*
-     $                     ( H( K+1, J )+DCONJG( V( 2, M ) )*
-     $                     H( K+2, J )+DCONJG( V( 3, M ) )*H( K+3, J ) )
-                  H( K+1, J ) = H( K+1, J ) - REFSUM
-                  H( K+2, J ) = H( K+2, J ) - REFSUM*V( 2, M )
-                  H( K+3, J ) = H( K+3, J ) - REFSUM*V( 3, M )
-   20          CONTINUE
-   30       CONTINUE
-            IF( BMP22 ) THEN
-               K = KRCOL + 3*( M22-1 )
-               DO 40 J = MAX( K+1, KTOP ), JBOT
-                  REFSUM = DCONJG( V( 1, M22 ) )*
-     $                     ( H( K+1, J )+DCONJG( V( 2, M22 ) )*
-     $                     H( K+2, J ) )
-                  H( K+1, J ) = H( K+1, J ) - REFSUM
-                  H( K+2, J ) = H( K+2, J ) - REFSUM*V( 2, M22 )
-   40          CONTINUE
-            END IF
-*
-*           ==== Multiply H by reflections from the right.
-*           .    Delay filling in the last row until the
-*           .    vigilant deflation check is complete. ====
 *
-            IF( ACCUM ) THEN
-               JTOP = MAX( KTOP, INCOL )
-            ELSE IF( WANTT ) THEN
-               JTOP = 1
-            ELSE
-               JTOP = KTOP
-            END IF
-            DO 80 M = MTOP, MBOT
-               IF( V( 1, M ).NE.ZERO ) THEN
-                  K = KRCOL + 3*( M-1 )
-                  DO 50 J = JTOP, MIN( KBOT, K+3 )
-                     REFSUM = V( 1, M )*( H( J, K+1 )+V( 2, M )*
-     $                        H( J, K+2 )+V( 3, M )*H( J, K+3 ) )
-                     H( J, K+1 ) = H( J, K+1 ) - REFSUM
-                     H( J, K+2 ) = H( J, K+2 ) -
-     $                             REFSUM*DCONJG( V( 2, M ) )
-                     H( J, K+3 ) = H( J, K+3 ) -
-     $                             REFSUM*DCONJG( V( 3, M ) )
-   50             CONTINUE
+*              general case
 *
-                  IF( ACCUM ) THEN
+               IF( I.LT.K ) THEN
+                  IF( LSAME( STOREV, 'C' ) ) THEN
+*                    Skip any leading zeros.
+                     DO LASTV = 1, I-1
+                        IF( V( LASTV, I ).NE.ZERO ) EXIT
+                     END DO
+                     DO J = I+1, K
+                        T( J, I ) = -TAU( I ) * CONJG( V( N-K+I , J ) )
+                     END DO
+                     J = MAX( LASTV, PREVLASTV )
 *
-*                    ==== Accumulate U. (If necessary, update Z later
-*                    .    with with an efficient matrix-matrix
-*                    .    multiply.) ====
+*                    T(i+1:k,i) = -tau(i) * V(j:n-k+i,i+1:k)**H * V(j:n-k+i,i)
 *
-                     KMS = K - INCOL
-                     DO 60 J = MAX( 1, KTOP-INCOL ), KDU
-                        REFSUM = V( 1, M )*( U( J, KMS+1 )+V( 2, M )*
-     $                           U( J, KMS+2 )+V( 3, M )*U( J, KMS+3 ) )
-                        U( J, KMS+1 ) = U( J, KMS+1 ) - REFSUM
-                        U( J, KMS+2 ) = U( J, KMS+2 ) -
-     $                                  REFSUM*DCONJG( V( 2, M ) )
-                        U( J, KMS+3 ) = U( J, KMS+3 ) -
-     $                                  REFSUM*DCONJG( V( 3, M ) )
-   60                CONTINUE
-                  ELSE IF( WANTZ ) THEN
+                     CALL ZGEMV( 'Conjugate transpose', N-K+I-J, K-I,
+     $                           -TAU( I ), V( J, I+1 ), LDV, V( J, I ),
+     $                           1, ONE, T( I+1, I ), 1 )
+                  ELSE
+*                    Skip any leading zeros.
+                     DO LASTV = 1, I-1
+                        IF( V( I, LASTV ).NE.ZERO ) EXIT
+                     END DO
+                     DO J = I+1, K
+                        T( J, I ) = -TAU( I ) * V( J, N-K+I )
+                     END DO
+                     J = MAX( LASTV, PREVLASTV )
 *
-*                    ==== U is not accumulated, so update Z
-*                    .    now by multiplying by reflections
-*                    .    from the right. ====
+*                    T(i+1:k,i) = -tau(i) * V(i+1:k,j:n-k+i) * V(i,j:n-k+i)**H
 *
-                     DO 70 J = ILOZ, IHIZ
-                        REFSUM = V( 1, M )*( Z( J, K+1 )+V( 2, M )*
-     $                           Z( J, K+2 )+V( 3, M )*Z( J, K+3 ) )
-                        Z( J, K+1 ) = Z( J, K+1 ) - REFSUM
-                        Z( J, K+2 ) = Z( J, K+2 ) -
-     $                                REFSUM*DCONJG( V( 2, M ) )
-                        Z( J, K+3 ) = Z( J, K+3 ) -
-     $                                REFSUM*DCONJG( V( 3, M ) )
-   70                CONTINUE
+                     CALL ZGEMM( 'N', 'C', K-I, 1, N-K+I-J, -TAU( I ),
+     $                           V( I+1, J ), LDV, V( I, J ), LDV,
+     $                           ONE, T( I+1, I ), LDT )
                   END IF
-               END IF
-   80       CONTINUE
-*
-*           ==== Special case: 2-by-2 reflection (if needed) ====
 *
-            K = KRCOL + 3*( M22-1 )
-            IF( BMP22 ) THEN
-               IF ( V( 1, M22 ).NE.ZERO ) THEN
-                  DO 90 J = JTOP, MIN( KBOT, K+3 )
-                     REFSUM = V( 1, M22 )*( H( J, K+1 )+V( 2, M22 )*
-     $                        H( J, K+2 ) )
-                     H( J, K+1 ) = H( J, K+1 ) - REFSUM
-                     H( J, K+2 ) = H( J, K+2 ) -
-     $                             REFSUM*DCONJG( V( 2, M22 ) )
-   90             CONTINUE
+*                 T(i+1:k,i) := T(i+1:k,i+1:k) * T(i+1:k,i)
 *
-                  IF( ACCUM ) THEN
-                     KMS = K - INCOL
-                     DO 100 J = MAX( 1, KTOP-INCOL ), KDU
-                        REFSUM = V( 1, M22 )*( U( J, KMS+1 )+
-     $                           V( 2, M22 )*U( J, KMS+2 ) )
-                        U( J, KMS+1 ) = U( J, KMS+1 ) - REFSUM
-                        U( J, KMS+2 ) = U( J, KMS+2 ) -
-     $                                  REFSUM*DCONJG( V( 2, M22 ) )
-  100                CONTINUE
-                  ELSE IF( WANTZ ) THEN
-                     DO 110 J = ILOZ, IHIZ
-                        REFSUM = V( 1, M22 )*( Z( J, K+1 )+V( 2, M22 )*
-     $                           Z( J, K+2 ) )
-                        Z( J, K+1 ) = Z( J, K+1 ) - REFSUM
-                        Z( J, K+2 ) = Z( J, K+2 ) -
-     $                                REFSUM*DCONJG( V( 2, M22 ) )
-  110                CONTINUE
+                  CALL ZTRMV( 'Lower', 'No transpose', 'Non-unit', K-I,
+     $                        T( I+1, I+1 ), LDT, T( I+1, I ), 1 )
+                  IF( I.GT.1 ) THEN
+                     PREVLASTV = MIN( PREVLASTV, LASTV )
+                  ELSE
+                     PREVLASTV = LASTV
                   END IF
                END IF
+               T( I, I ) = TAU( I )
             END IF
+         END DO
+      END IF
+      RETURN
 *
-*           ==== Vigilant deflation check ====
-*
-            MSTART = MTOP
-            IF( KRCOL+3*( MSTART-1 ).LT.KTOP )
-     $         MSTART = MSTART + 1
-            MEND = MBOT
-            IF( BMP22 )
-     $         MEND = MEND + 1
-            IF( KRCOL.EQ.KBOT-2 )
-     $         MEND = MEND + 1
-            DO 120 M = MSTART, MEND
-               K = MIN( KBOT-1, KRCOL+3*( M-1 ) )
-*
-*              ==== The following convergence test requires that
-*              .    the tradition small-compared-to-nearby-diagonals
-*              .    criterion and the Ahues & Tisseur (LAWN 122, 1997)
-*              .    criteria both be satisfied.  The latter improves
-*              .    accuracy in some examples. Falling back on an
-*              .    alternate convergence criterion when TST1 or TST2
-*              .    is zero (as done here) is traditional but probably
-*              .    unnecessary. ====
+*     End of ZLARFT
 *
-               IF( H( K+1, K ).NE.ZERO ) THEN
-                  TST1 = CABS1( H( K, K ) ) + CABS1( H( K+1, K+1 ) )
-                  IF( TST1.EQ.RZERO ) THEN
-                     IF( K.GE.KTOP+1 )
-     $                  TST1 = TST1 + CABS1( H( K, K-1 ) )
-                     IF( K.GE.KTOP+2 )
-     $                  TST1 = TST1 + CABS1( H( K, K-2 ) )
-                     IF( K.GE.KTOP+3 )
-     $                  TST1 = TST1 + CABS1( H( K, K-3 ) )
-                     IF( K.LE.KBOT-2 )
-     $                  TST1 = TST1 + CABS1( H( K+2, K+1 ) )
-                     IF( K.LE.KBOT-3 )
-     $                  TST1 = TST1 + CABS1( H( K+3, K+1 ) )
-                     IF( K.LE.KBOT-4 )
-     $                  TST1 = TST1 + CABS1( H( K+4, K+1 ) )
-                  END IF
-                  IF( CABS1( H( K+1, K ) ).LE.MAX( SMLNUM, ULP*TST1 ) )
-     $                 THEN
-                     H12 = MAX( CABS1( H( K+1, K ) ),
-     $                     CABS1( H( K, K+1 ) ) )
-                     H21 = MIN( CABS1( H( K+1, K ) ),
-     $                     CABS1( H( K, K+1 ) ) )
-                     H11 = MAX( CABS1( H( K+1, K+1 ) ),
-     $                     CABS1( H( K, K )-H( K+1, K+1 ) ) )
-                     H22 = MIN( CABS1( H( K+1, K+1 ) ),
-     $                     CABS1( H( K, K )-H( K+1, K+1 ) ) )
-                     SCL = H11 + H12
-                     TST2 = H22*( H11 / SCL )
+      END
+*> \brief \b ZLARFX applies an elementary reflector to a general rectangular matrix, with loop unrolling when the reflector has order ≤ 10.
 *
-                     IF( TST2.EQ.RZERO .OR. H21*( H12 / SCL ).LE.
-     $                   MAX( SMLNUM, ULP*TST2 ) )H( K+1, K ) = ZERO
-                  END IF
-               END IF
-  120       CONTINUE
+*  =========== DOCUMENTATION ===========
 *
-*           ==== Fill in the last row of each bulge. ====
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
-            MEND = MIN( NBMPS, ( KBOT-KRCOL-1 ) / 3 )
-            DO 130 M = MTOP, MEND
-               K = KRCOL + 3*( M-1 )
-               REFSUM = V( 1, M )*V( 3, M )*H( K+4, K+3 )
-               H( K+4, K+1 ) = -REFSUM
-               H( K+4, K+2 ) = -REFSUM*DCONJG( V( 2, M ) )
-               H( K+4, K+3 ) = H( K+4, K+3 ) -
-     $                         REFSUM*DCONJG( V( 3, M ) )
-  130       CONTINUE
+*> \htmlonly
+*> Download ZLARFX + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/zlarfx.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/zlarfx.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/zlarfx.f">
+*> [TXT]</a>
+*> \endhtmlonly
 *
-*           ==== End of near-the-diagonal bulge chase. ====
+*  Definition:
+*  ===========
 *
-  140    CONTINUE
+*       SUBROUTINE ZLARFX( SIDE, M, N, V, TAU, C, LDC, WORK )
 *
-*        ==== Use U (if accumulated) to update far-from-diagonal
-*        .    entries in H.  If required, use U to update Z as
-*        .    well. ====
+*       .. Scalar Arguments ..
+*       CHARACTER          SIDE
+*       INTEGER            LDC, M, N
+*       COMPLEX*16         TAU
+*       ..
+*       .. Array Arguments ..
+*       COMPLEX*16         C( LDC, * ), V( * ), WORK( * )
+*       ..
 *
-         IF( ACCUM ) THEN
-            IF( WANTT ) THEN
-               JTOP = 1
-               JBOT = N
-            ELSE
-               JTOP = KTOP
-               JBOT = KBOT
-            END IF
-            IF( ( .NOT.BLK22 ) .OR. ( INCOL.LT.KTOP ) .OR.
-     $          ( NDCOL.GT.KBOT ) .OR. ( NS.LE.2 ) ) THEN
 *
-*              ==== Updates not exploiting the 2-by-2 block
-*              .    structure of U.  K1 and NU keep track of
-*              .    the location and size of U in the special
-*              .    cases of introducing bulges and chasing
-*              .    bulges off the bottom.  In these special
-*              .    cases and in case the number of shifts
-*              .    is NS = 2, there is no 2-by-2 block
-*              .    structure to exploit.  ====
+*> \par Purpose:
+*  =============
+*>
+*> \verbatim
+*>
+*> ZLARFX applies a complex elementary reflector H to a complex m by n
+*> matrix C, from either the left or the right. H is represented in the
+*> form
+*>
+*>       H = I - tau * v * v**H
+*>
+*> where tau is a complex scalar and v is a complex vector.
+*>
+*> If tau = 0, then H is taken to be the unit matrix
+*>
+*> This version uses inline code if H has order < 11.
+*> \endverbatim
 *
-               K1 = MAX( 1, KTOP-INCOL )
-               NU = ( KDU-MAX( 0, NDCOL-KBOT ) ) - K1 + 1
+*  Arguments:
+*  ==========
 *
-*              ==== Horizontal Multiply ====
+*> \param[in] SIDE
+*> \verbatim
+*>          SIDE is CHARACTER*1
+*>          = 'L': form  H * C
+*>          = 'R': form  C * H
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*>          M is INTEGER
+*>          The number of rows of the matrix C.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*>          N is INTEGER
+*>          The number of columns of the matrix C.
+*> \endverbatim
+*>
+*> \param[in] V
+*> \verbatim
+*>          V is COMPLEX*16 array, dimension (M) if SIDE = 'L'
+*>                                        or (N) if SIDE = 'R'
+*>          The vector v in the representation of H.
+*> \endverbatim
+*>
+*> \param[in] TAU
+*> \verbatim
+*>          TAU is COMPLEX*16
+*>          The value tau in the representation of H.
+*> \endverbatim
+*>
+*> \param[in,out] C
+*> \verbatim
+*>          C is COMPLEX*16 array, dimension (LDC,N)
+*>          On entry, the m by n matrix C.
+*>          On exit, C is overwritten by the matrix H * C if SIDE = 'L',
+*>          or C * H if SIDE = 'R'.
+*> \endverbatim
+*>
+*> \param[in] LDC
+*> \verbatim
+*>          LDC is INTEGER
+*>          The leading dimension of the array C. LDA >= max(1,M).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*>          WORK is COMPLEX*16 array, dimension (N) if SIDE = 'L'
+*>                                            or (M) if SIDE = 'R'
+*>          WORK is not referenced if H has order < 11.
+*> \endverbatim
 *
-               DO 150 JCOL = MIN( NDCOL, KBOT ) + 1, JBOT, NH
-                  JLEN = MIN( NH, JBOT-JCOL+1 )
-                  CALL ZGEMM( 'C', 'N', NU, JLEN, NU, ONE, U( K1, K1 ),
-     $                        LDU, H( INCOL+K1, JCOL ), LDH, ZERO, WH,
-     $                        LDWH )
-                  CALL ZLACPY( 'ALL', NU, JLEN, WH, LDWH,
-     $                         H( INCOL+K1, JCOL ), LDH )
-  150          CONTINUE
+*  Authors:
+*  ========
 *
-*              ==== Vertical multiply ====
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-               DO 160 JROW = JTOP, MAX( KTOP, INCOL ) - 1, NV
-                  JLEN = MIN( NV, MAX( KTOP, INCOL )-JROW )
-                  CALL ZGEMM( 'N', 'N', JLEN, NU, NU, ONE,
-     $                        H( JROW, INCOL+K1 ), LDH, U( K1, K1 ),
-     $                        LDU, ZERO, WV, LDWV )
-                  CALL ZLACPY( 'ALL', JLEN, NU, WV, LDWV,
-     $                         H( JROW, INCOL+K1 ), LDH )
-  160          CONTINUE
+*> \date December 2016
 *
-*              ==== Z multiply (also vertical) ====
+*> \ingroup complex16OTHERauxiliary
 *
-               IF( WANTZ ) THEN
-                  DO 170 JROW = ILOZ, IHIZ, NV
-                     JLEN = MIN( NV, IHIZ-JROW+1 )
-                     CALL ZGEMM( 'N', 'N', JLEN, NU, NU, ONE,
-     $                           Z( JROW, INCOL+K1 ), LDZ, U( K1, K1 ),
-     $                           LDU, ZERO, WV, LDWV )
-                     CALL ZLACPY( 'ALL', JLEN, NU, WV, LDWV,
-     $                            Z( JROW, INCOL+K1 ), LDZ )
-  170             CONTINUE
-               END IF
-            ELSE
+*  =====================================================================
+      SUBROUTINE ZLARFX( SIDE, M, N, V, TAU, C, LDC, WORK )
 *
-*              ==== Updates exploiting U's 2-by-2 block structure.
-*              .    (I2, I4, J2, J4 are the last rows and columns
-*              .    of the blocks.) ====
+*  -- LAPACK auxiliary routine (version 3.7.0) --
+*  -- LAPACK is a software package provided by Univ. of Tennessee,    --
+*  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+*     December 2016
 *
-               I2 = ( KDU+1 ) / 2
-               I4 = KDU
-               J2 = I4 - I2
-               J4 = KDU
+*     .. Scalar Arguments ..
+      CHARACTER          SIDE
+      INTEGER            LDC, M, N
+      COMPLEX*16         TAU
+*     ..
+*     .. Array Arguments ..
+      COMPLEX*16         C( LDC, * ), V( * ), WORK( * )
+*     ..
 *
-*              ==== KZS and KNZ deal with the band of zeros
-*              .    along the diagonal of one of the triangular
-*              .    blocks. ====
+*  =====================================================================
 *
-               KZS = ( J4-J2 ) - ( NS+1 )
-               KNZ = NS + 1
+*     .. Parameters ..
+      COMPLEX*16         ZERO, ONE
+      PARAMETER          ( ZERO = ( 0.0D+0, 0.0D+0 ),
+     $                   ONE = ( 1.0D+0, 0.0D+0 ) )
+*     ..
+*     .. Local Scalars ..
+      INTEGER            J
+      COMPLEX*16         SUM, T1, T10, T2, T3, T4, T5, T6, T7, T8, T9,
+     $                   V1, V10, V2, V3, V4, V5, V6, V7, V8, V9
+*     ..
+*     .. External Functions ..
+      LOGICAL            LSAME
+      EXTERNAL           LSAME
+*     ..
+*     .. External Subroutines ..
+      EXTERNAL           ZLARF
+*     ..
+*     .. Intrinsic Functions ..
+      INTRINSIC          DCONJG
+*     ..
+*     .. Executable Statements ..
 *
-*              ==== Horizontal multiply ====
+      IF( TAU.EQ.ZERO )
+     $   RETURN
+      IF( LSAME( SIDE, 'L' ) ) THEN
 *
-               DO 180 JCOL = MIN( NDCOL, KBOT ) + 1, JBOT, NH
-                  JLEN = MIN( NH, JBOT-JCOL+1 )
+*        Form  H * C, where H has order m.
 *
-*                 ==== Copy bottom of H to top+KZS of scratch ====
-*                  (The first KZS rows get multiplied by zero.) ====
+         GO TO ( 10, 30, 50, 70, 90, 110, 130, 150,
+     $           170, 190 )M
 *
-                  CALL ZLACPY( 'ALL', KNZ, JLEN, H( INCOL+1+J2, JCOL ),
-     $                         LDH, WH( KZS+1, 1 ), LDWH )
+*        Code for general M
 *
-*                 ==== Multiply by U21**H ====
+         CALL ZLARF( SIDE, M, N, V, 1, TAU, C, LDC, WORK )
+         GO TO 410
+   10    CONTINUE
 *
-                  CALL ZLASET( 'ALL', KZS, JLEN, ZERO, ZERO, WH, LDWH )
-                  CALL ZTRMM( 'L', 'U', 'C', 'N', KNZ, JLEN, ONE,
-     $                        U( J2+1, 1+KZS ), LDU, WH( KZS+1, 1 ),
-     $                        LDWH )
+*        Special code for 1 x 1 Householder
 *
-*                 ==== Multiply top of H by U11**H ====
+         T1 = ONE - TAU*V( 1 )*DCONJG( V( 1 ) )
+         DO 20 J = 1, N
+            C( 1, J ) = T1*C( 1, J )
+   20    CONTINUE
+         GO TO 410
+   30    CONTINUE
 *
-                  CALL ZGEMM( 'C', 'N', I2, JLEN, J2, ONE, U, LDU,
-     $                        H( INCOL+1, JCOL ), LDH, ONE, WH, LDWH )
+*        Special code for 2 x 2 Householder
 *
-*                 ==== Copy top of H to bottom of WH ====
+         V1 = DCONJG( V( 1 ) )
+         T1 = TAU*DCONJG( V1 )
+         V2 = DCONJG( V( 2 ) )
+         T2 = TAU*DCONJG( V2 )
+         DO 40 J = 1, N
+            SUM = V1*C( 1, J ) + V2*C( 2, J )
+            C( 1, J ) = C( 1, J ) - SUM*T1
+            C( 2, J ) = C( 2, J ) - SUM*T2
+   40    CONTINUE
+         GO TO 410
+   50    CONTINUE
 *
-                  CALL ZLACPY( 'ALL', J2, JLEN, H( INCOL+1, JCOL ), LDH,
-     $                         WH( I2+1, 1 ), LDWH )
+*        Special code for 3 x 3 Householder
 *
-*                 ==== Multiply by U21**H ====
+         V1 = DCONJG( V( 1 ) )
+         T1 = TAU*DCONJG( V1 )
+         V2 = DCONJG( V( 2 ) )
+         T2 = TAU*DCONJG( V2 )
+         V3 = DCONJG( V( 3 ) )
+         T3 = TAU*DCONJG( V3 )
+         DO 60 J = 1, N
+            SUM = V1*C( 1, J ) + V2*C( 2, J ) + V3*C( 3, J )
+            C( 1, J ) = C( 1, J ) - SUM*T1
+            C( 2, J ) = C( 2, J ) - SUM*T2
+            C( 3, J ) = C( 3, J ) - SUM*T3
+   60    CONTINUE
+         GO TO 410
+   70    CONTINUE
 *
-                  CALL ZTRMM( 'L', 'L', 'C', 'N', J2, JLEN, ONE,
-     $                        U( 1, I2+1 ), LDU, WH( I2+1, 1 ), LDWH )
+*        Special code for 4 x 4 Householder
 *
-*                 ==== Multiply by U22 ====
+         V1 = DCONJG( V( 1 ) )
+         T1 = TAU*DCONJG( V1 )
+         V2 = DCONJG( V( 2 ) )
+         T2 = TAU*DCONJG( V2 )
+         V3 = DCONJG( V( 3 ) )
+         T3 = TAU*DCONJG( V3 )
+         V4 = DCONJG( V( 4 ) )
+         T4 = TAU*DCONJG( V4 )
+         DO 80 J = 1, N
+            SUM = V1*C( 1, J ) + V2*C( 2, J ) + V3*C( 3, J ) +
+     $            V4*C( 4, J )
+            C( 1, J ) = C( 1, J ) - SUM*T1
+            C( 2, J ) = C( 2, J ) - SUM*T2
+            C( 3, J ) = C( 3, J ) - SUM*T3
+            C( 4, J ) = C( 4, J ) - SUM*T4
+   80    CONTINUE
+         GO TO 410
+   90    CONTINUE
 *
-                  CALL ZGEMM( 'C', 'N', I4-I2, JLEN, J4-J2, ONE,
-     $                        U( J2+1, I2+1 ), LDU,
-     $                        H( INCOL+1+J2, JCOL ), LDH, ONE,
-     $                        WH( I2+1, 1 ), LDWH )
+*        Special code for 5 x 5 Householder
 *
-*                 ==== Copy it back ====
+         V1 = DCONJG( V( 1 ) )
+         T1 = TAU*DCONJG( V1 )
+         V2 = DCONJG( V( 2 ) )
+         T2 = TAU*DCONJG( V2 )
+         V3 = DCONJG( V( 3 ) )
+         T3 = TAU*DCONJG( V3 )
+         V4 = DCONJG( V( 4 ) )
+         T4 = TAU*DCONJG( V4 )
+         V5 = DCONJG( V( 5 ) )
+         T5 = TAU*DCONJG( V5 )
+         DO 100 J = 1, N
+            SUM = V1*C( 1, J ) + V2*C( 2, J ) + V3*C( 3, J ) +
+     $            V4*C( 4, J ) + V5*C( 5, J )
+            C( 1, J ) = C( 1, J ) - SUM*T1
+            C( 2, J ) = C( 2, J ) - SUM*T2
+            C( 3, J ) = C( 3, J ) - SUM*T3
+            C( 4, J ) = C( 4, J ) - SUM*T4
+            C( 5, J ) = C( 5, J ) - SUM*T5
+  100    CONTINUE
+         GO TO 410
+  110    CONTINUE
 *
-                  CALL ZLACPY( 'ALL', KDU, JLEN, WH, LDWH,
-     $                         H( INCOL+1, JCOL ), LDH )
-  180          CONTINUE
+*        Special code for 6 x 6 Householder
 *
-*              ==== Vertical multiply ====
+         V1 = DCONJG( V( 1 ) )
+         T1 = TAU*DCONJG( V1 )
+         V2 = DCONJG( V( 2 ) )
+         T2 = TAU*DCONJG( V2 )
+         V3 = DCONJG( V( 3 ) )
+         T3 = TAU*DCONJG( V3 )
+         V4 = DCONJG( V( 4 ) )
+         T4 = TAU*DCONJG( V4 )
+         V5 = DCONJG( V( 5 ) )
+         T5 = TAU*DCONJG( V5 )
+         V6 = DCONJG( V( 6 ) )
+         T6 = TAU*DCONJG( V6 )
+         DO 120 J = 1, N
+            SUM = V1*C( 1, J ) + V2*C( 2, J ) + V3*C( 3, J ) +
+     $            V4*C( 4, J ) + V5*C( 5, J ) + V6*C( 6, J )
+            C( 1, J ) = C( 1, J ) - SUM*T1
+            C( 2, J ) = C( 2, J ) - SUM*T2
+            C( 3, J ) = C( 3, J ) - SUM*T3
+            C( 4, J ) = C( 4, J ) - SUM*T4
+            C( 5, J ) = C( 5, J ) - SUM*T5
+            C( 6, J ) = C( 6, J ) - SUM*T6
+  120    CONTINUE
+         GO TO 410
+  130    CONTINUE
 *
-               DO 190 JROW = JTOP, MAX( INCOL, KTOP ) - 1, NV
-                  JLEN = MIN( NV, MAX( INCOL, KTOP )-JROW )
+*        Special code for 7 x 7 Householder
 *
-*                 ==== Copy right of H to scratch (the first KZS
-*                 .    columns get multiplied by zero) ====
+         V1 = DCONJG( V( 1 ) )
+         T1 = TAU*DCONJG( V1 )
+         V2 = DCONJG( V( 2 ) )
+         T2 = TAU*DCONJG( V2 )
+         V3 = DCONJG( V( 3 ) )
+         T3 = TAU*DCONJG( V3 )
+         V4 = DCONJG( V( 4 ) )
+         T4 = TAU*DCONJG( V4 )
+         V5 = DCONJG( V( 5 ) )
+         T5 = TAU*DCONJG( V5 )
+         V6 = DCONJG( V( 6 ) )
+         T6 = TAU*DCONJG( V6 )
+         V7 = DCONJG( V( 7 ) )
+         T7 = TAU*DCONJG( V7 )
+         DO 140 J = 1, N
+            SUM = V1*C( 1, J ) + V2*C( 2, J ) + V3*C( 3, J ) +
+     $            V4*C( 4, J ) + V5*C( 5, J ) + V6*C( 6, J ) +
+     $            V7*C( 7, J )
+            C( 1, J ) = C( 1, J ) - SUM*T1
+            C( 2, J ) = C( 2, J ) - SUM*T2
+            C( 3, J ) = C( 3, J ) - SUM*T3
+            C( 4, J ) = C( 4, J ) - SUM*T4
+            C( 5, J ) = C( 5, J ) - SUM*T5
+            C( 6, J ) = C( 6, J ) - SUM*T6
+            C( 7, J ) = C( 7, J ) - SUM*T7
+  140    CONTINUE
+         GO TO 410
+  150    CONTINUE
 *
-                  CALL ZLACPY( 'ALL', JLEN, KNZ, H( JROW, INCOL+1+J2 ),
-     $                         LDH, WV( 1, 1+KZS ), LDWV )
+*        Special code for 8 x 8 Householder
 *
-*                 ==== Multiply by U21 ====
+         V1 = DCONJG( V( 1 ) )
+         T1 = TAU*DCONJG( V1 )
+         V2 = DCONJG( V( 2 ) )
+         T2 = TAU*DCONJG( V2 )
+         V3 = DCONJG( V( 3 ) )
+         T3 = TAU*DCONJG( V3 )
+         V4 = DCONJG( V( 4 ) )
+         T4 = TAU*DCONJG( V4 )
+         V5 = DCONJG( V( 5 ) )
+         T5 = TAU*DCONJG( V5 )
+         V6 = DCONJG( V( 6 ) )
+         T6 = TAU*DCONJG( V6 )
+         V7 = DCONJG( V( 7 ) )
+         T7 = TAU*DCONJG( V7 )
+         V8 = DCONJG( V( 8 ) )
+         T8 = TAU*DCONJG( V8 )
+         DO 160 J = 1, N
+            SUM = V1*C( 1, J ) + V2*C( 2, J ) + V3*C( 3, J ) +
+     $            V4*C( 4, J ) + V5*C( 5, J ) + V6*C( 6, J ) +
+     $            V7*C( 7, J ) + V8*C( 8, J )
+            C( 1, J ) = C( 1, J ) - SUM*T1
+            C( 2, J ) = C( 2, J ) - SUM*T2
+            C( 3, J ) = C( 3, J ) - SUM*T3
+            C( 4, J ) = C( 4, J ) - SUM*T4
+            C( 5, J ) = C( 5, J ) - SUM*T5
+            C( 6, J ) = C( 6, J ) - SUM*T6
+            C( 7, J ) = C( 7, J ) - SUM*T7
+            C( 8, J ) = C( 8, J ) - SUM*T8
+  160    CONTINUE
+         GO TO 410
+  170    CONTINUE
 *
-                  CALL ZLASET( 'ALL', JLEN, KZS, ZERO, ZERO, WV, LDWV )
-                  CALL ZTRMM( 'R', 'U', 'N', 'N', JLEN, KNZ, ONE,
-     $                        U( J2+1, 1+KZS ), LDU, WV( 1, 1+KZS ),
-     $                        LDWV )
+*        Special code for 9 x 9 Householder
 *
-*                 ==== Multiply by U11 ====
+         V1 = DCONJG( V( 1 ) )
+         T1 = TAU*DCONJG( V1 )
+         V2 = DCONJG( V( 2 ) )
+         T2 = TAU*DCONJG( V2 )
+         V3 = DCONJG( V( 3 ) )
+         T3 = TAU*DCONJG( V3 )
+         V4 = DCONJG( V( 4 ) )
+         T4 = TAU*DCONJG( V4 )
+         V5 = DCONJG( V( 5 ) )
+         T5 = TAU*DCONJG( V5 )
+         V6 = DCONJG( V( 6 ) )
+         T6 = TAU*DCONJG( V6 )
+         V7 = DCONJG( V( 7 ) )
+         T7 = TAU*DCONJG( V7 )
+         V8 = DCONJG( V( 8 ) )
+         T8 = TAU*DCONJG( V8 )
+         V9 = DCONJG( V( 9 ) )
+         T9 = TAU*DCONJG( V9 )
+         DO 180 J = 1, N
+            SUM = V1*C( 1, J ) + V2*C( 2, J ) + V3*C( 3, J ) +
+     $            V4*C( 4, J ) + V5*C( 5, J ) + V6*C( 6, J ) +
+     $            V7*C( 7, J ) + V8*C( 8, J ) + V9*C( 9, J )
+            C( 1, J ) = C( 1, J ) - SUM*T1
+            C( 2, J ) = C( 2, J ) - SUM*T2
+            C( 3, J ) = C( 3, J ) - SUM*T3
+            C( 4, J ) = C( 4, J ) - SUM*T4
+            C( 5, J ) = C( 5, J ) - SUM*T5
+            C( 6, J ) = C( 6, J ) - SUM*T6
+            C( 7, J ) = C( 7, J ) - SUM*T7
+            C( 8, J ) = C( 8, J ) - SUM*T8
+            C( 9, J ) = C( 9, J ) - SUM*T9
+  180    CONTINUE
+         GO TO 410
+  190    CONTINUE
 *
-                  CALL ZGEMM( 'N', 'N', JLEN, I2, J2, ONE,
-     $                        H( JROW, INCOL+1 ), LDH, U, LDU, ONE, WV,
-     $                        LDWV )
+*        Special code for 10 x 10 Householder
 *
-*                 ==== Copy left of H to right of scratch ====
+         V1 = DCONJG( V( 1 ) )
+         T1 = TAU*DCONJG( V1 )
+         V2 = DCONJG( V( 2 ) )
+         T2 = TAU*DCONJG( V2 )
+         V3 = DCONJG( V( 3 ) )
+         T3 = TAU*DCONJG( V3 )
+         V4 = DCONJG( V( 4 ) )
+         T4 = TAU*DCONJG( V4 )
+         V5 = DCONJG( V( 5 ) )
+         T5 = TAU*DCONJG( V5 )
+         V6 = DCONJG( V( 6 ) )
+         T6 = TAU*DCONJG( V6 )
+         V7 = DCONJG( V( 7 ) )
+         T7 = TAU*DCONJG( V7 )
+         V8 = DCONJG( V( 8 ) )
+         T8 = TAU*DCONJG( V8 )
+         V9 = DCONJG( V( 9 ) )
+         T9 = TAU*DCONJG( V9 )
+         V10 = DCONJG( V( 10 ) )
+         T10 = TAU*DCONJG( V10 )
+         DO 200 J = 1, N
+            SUM = V1*C( 1, J ) + V2*C( 2, J ) + V3*C( 3, J ) +
+     $            V4*C( 4, J ) + V5*C( 5, J ) + V6*C( 6, J ) +
+     $            V7*C( 7, J ) + V8*C( 8, J ) + V9*C( 9, J ) +
+     $            V10*C( 10, J )
+            C( 1, J ) = C( 1, J ) - SUM*T1
+            C( 2, J ) = C( 2, J ) - SUM*T2
+            C( 3, J ) = C( 3, J ) - SUM*T3
+            C( 4, J ) = C( 4, J ) - SUM*T4
+            C( 5, J ) = C( 5, J ) - SUM*T5
+            C( 6, J ) = C( 6, J ) - SUM*T6
+            C( 7, J ) = C( 7, J ) - SUM*T7
+            C( 8, J ) = C( 8, J ) - SUM*T8
+            C( 9, J ) = C( 9, J ) - SUM*T9
+            C( 10, J ) = C( 10, J ) - SUM*T10
+  200    CONTINUE
+         GO TO 410
+      ELSE
 *
-                  CALL ZLACPY( 'ALL', JLEN, J2, H( JROW, INCOL+1 ), LDH,
-     $                         WV( 1, 1+I2 ), LDWV )
+*        Form  C * H, where H has order n.
 *
-*                 ==== Multiply by U21 ====
+         GO TO ( 210, 230, 250, 270, 290, 310, 330, 350,
+     $           370, 390 )N
 *
-                  CALL ZTRMM( 'R', 'L', 'N', 'N', JLEN, I4-I2, ONE,
-     $                        U( 1, I2+1 ), LDU, WV( 1, 1+I2 ), LDWV )
+*        Code for general N
 *
-*                 ==== Multiply by U22 ====
+         CALL ZLARF( SIDE, M, N, V, 1, TAU, C, LDC, WORK )
+         GO TO 410
+  210    CONTINUE
 *
-                  CALL ZGEMM( 'N', 'N', JLEN, I4-I2, J4-J2, ONE,
-     $                        H( JROW, INCOL+1+J2 ), LDH,
-     $                        U( J2+1, I2+1 ), LDU, ONE, WV( 1, 1+I2 ),
-     $                        LDWV )
+*        Special code for 1 x 1 Householder
+*
+         T1 = ONE - TAU*V( 1 )*DCONJG( V( 1 ) )
+         DO 220 J = 1, M
+            C( J, 1 ) = T1*C( J, 1 )
+  220    CONTINUE
+         GO TO 410
+  230    CONTINUE
 *
-*                 ==== Copy it back ====
+*        Special code for 2 x 2 Householder
 *
-                  CALL ZLACPY( 'ALL', JLEN, KDU, WV, LDWV,
-     $                         H( JROW, INCOL+1 ), LDH )
-  190          CONTINUE
+         V1 = V( 1 )
+         T1 = TAU*DCONJG( V1 )
+         V2 = V( 2 )
+         T2 = TAU*DCONJG( V2 )
+         DO 240 J = 1, M
+            SUM = V1*C( J, 1 ) + V2*C( J, 2 )
+            C( J, 1 ) = C( J, 1 ) - SUM*T1
+            C( J, 2 ) = C( J, 2 ) - SUM*T2
+  240    CONTINUE
+         GO TO 410
+  250    CONTINUE
 *
-*              ==== Multiply Z (also vertical) ====
+*        Special code for 3 x 3 Householder
 *
-               IF( WANTZ ) THEN
-                  DO 200 JROW = ILOZ, IHIZ, NV
-                     JLEN = MIN( NV, IHIZ-JROW+1 )
+         V1 = V( 1 )
+         T1 = TAU*DCONJG( V1 )
+         V2 = V( 2 )
+         T2 = TAU*DCONJG( V2 )
+         V3 = V( 3 )
+         T3 = TAU*DCONJG( V3 )
+         DO 260 J = 1, M
+            SUM = V1*C( J, 1 ) + V2*C( J, 2 ) + V3*C( J, 3 )
+            C( J, 1 ) = C( J, 1 ) - SUM*T1
+            C( J, 2 ) = C( J, 2 ) - SUM*T2
+            C( J, 3 ) = C( J, 3 ) - SUM*T3
+  260    CONTINUE
+         GO TO 410
+  270    CONTINUE
 *
-*                    ==== Copy right of Z to left of scratch (first
-*                    .     KZS columns get multiplied by zero) ====
+*        Special code for 4 x 4 Householder
 *
-                     CALL ZLACPY( 'ALL', JLEN, KNZ,
-     $                            Z( JROW, INCOL+1+J2 ), LDZ,
-     $                            WV( 1, 1+KZS ), LDWV )
+         V1 = V( 1 )
+         T1 = TAU*DCONJG( V1 )
+         V2 = V( 2 )
+         T2 = TAU*DCONJG( V2 )
+         V3 = V( 3 )
+         T3 = TAU*DCONJG( V3 )
+         V4 = V( 4 )
+         T4 = TAU*DCONJG( V4 )
+         DO 280 J = 1, M
+            SUM = V1*C( J, 1 ) + V2*C( J, 2 ) + V3*C( J, 3 ) +
+     $            V4*C( J, 4 )
+            C( J, 1 ) = C( J, 1 ) - SUM*T1
+            C( J, 2 ) = C( J, 2 ) - SUM*T2
+            C( J, 3 ) = C( J, 3 ) - SUM*T3
+            C( J, 4 ) = C( J, 4 ) - SUM*T4
+  280    CONTINUE
+         GO TO 410
+  290    CONTINUE
 *
-*                    ==== Multiply by U12 ====
+*        Special code for 5 x 5 Householder
 *
-                     CALL ZLASET( 'ALL', JLEN, KZS, ZERO, ZERO, WV,
-     $                            LDWV )
-                     CALL ZTRMM( 'R', 'U', 'N', 'N', JLEN, KNZ, ONE,
-     $                           U( J2+1, 1+KZS ), LDU, WV( 1, 1+KZS ),
-     $                           LDWV )
+         V1 = V( 1 )
+         T1 = TAU*DCONJG( V1 )
+         V2 = V( 2 )
+         T2 = TAU*DCONJG( V2 )
+         V3 = V( 3 )
+         T3 = TAU*DCONJG( V3 )
+         V4 = V( 4 )
+         T4 = TAU*DCONJG( V4 )
+         V5 = V( 5 )
+         T5 = TAU*DCONJG( V5 )
+         DO 300 J = 1, M
+            SUM = V1*C( J, 1 ) + V2*C( J, 2 ) + V3*C( J, 3 ) +
+     $            V4*C( J, 4 ) + V5*C( J, 5 )
+            C( J, 1 ) = C( J, 1 ) - SUM*T1
+            C( J, 2 ) = C( J, 2 ) - SUM*T2
+            C( J, 3 ) = C( J, 3 ) - SUM*T3
+            C( J, 4 ) = C( J, 4 ) - SUM*T4
+            C( J, 5 ) = C( J, 5 ) - SUM*T5
+  300    CONTINUE
+         GO TO 410
+  310    CONTINUE
 *
-*                    ==== Multiply by U11 ====
+*        Special code for 6 x 6 Householder
 *
-                     CALL ZGEMM( 'N', 'N', JLEN, I2, J2, ONE,
-     $                           Z( JROW, INCOL+1 ), LDZ, U, LDU, ONE,
-     $                           WV, LDWV )
+         V1 = V( 1 )
+         T1 = TAU*DCONJG( V1 )
+         V2 = V( 2 )
+         T2 = TAU*DCONJG( V2 )
+         V3 = V( 3 )
+         T3 = TAU*DCONJG( V3 )
+         V4 = V( 4 )
+         T4 = TAU*DCONJG( V4 )
+         V5 = V( 5 )
+         T5 = TAU*DCONJG( V5 )
+         V6 = V( 6 )
+         T6 = TAU*DCONJG( V6 )
+         DO 320 J = 1, M
+            SUM = V1*C( J, 1 ) + V2*C( J, 2 ) + V3*C( J, 3 ) +
+     $            V4*C( J, 4 ) + V5*C( J, 5 ) + V6*C( J, 6 )
+            C( J, 1 ) = C( J, 1 ) - SUM*T1
+            C( J, 2 ) = C( J, 2 ) - SUM*T2
+            C( J, 3 ) = C( J, 3 ) - SUM*T3
+            C( J, 4 ) = C( J, 4 ) - SUM*T4
+            C( J, 5 ) = C( J, 5 ) - SUM*T5
+            C( J, 6 ) = C( J, 6 ) - SUM*T6
+  320    CONTINUE
+         GO TO 410
+  330    CONTINUE
 *
-*                    ==== Copy left of Z to right of scratch ====
+*        Special code for 7 x 7 Householder
 *
-                     CALL ZLACPY( 'ALL', JLEN, J2, Z( JROW, INCOL+1 ),
-     $                            LDZ, WV( 1, 1+I2 ), LDWV )
+         V1 = V( 1 )
+         T1 = TAU*DCONJG( V1 )
+         V2 = V( 2 )
+         T2 = TAU*DCONJG( V2 )
+         V3 = V( 3 )
+         T3 = TAU*DCONJG( V3 )
+         V4 = V( 4 )
+         T4 = TAU*DCONJG( V4 )
+         V5 = V( 5 )
+         T5 = TAU*DCONJG( V5 )
+         V6 = V( 6 )
+         T6 = TAU*DCONJG( V6 )
+         V7 = V( 7 )
+         T7 = TAU*DCONJG( V7 )
+         DO 340 J = 1, M
+            SUM = V1*C( J, 1 ) + V2*C( J, 2 ) + V3*C( J, 3 ) +
+     $            V4*C( J, 4 ) + V5*C( J, 5 ) + V6*C( J, 6 ) +
+     $            V7*C( J, 7 )
+            C( J, 1 ) = C( J, 1 ) - SUM*T1
+            C( J, 2 ) = C( J, 2 ) - SUM*T2
+            C( J, 3 ) = C( J, 3 ) - SUM*T3
+            C( J, 4 ) = C( J, 4 ) - SUM*T4
+            C( J, 5 ) = C( J, 5 ) - SUM*T5
+            C( J, 6 ) = C( J, 6 ) - SUM*T6
+            C( J, 7 ) = C( J, 7 ) - SUM*T7
+  340    CONTINUE
+         GO TO 410
+  350    CONTINUE
 *
-*                    ==== Multiply by U21 ====
+*        Special code for 8 x 8 Householder
 *
-                     CALL ZTRMM( 'R', 'L', 'N', 'N', JLEN, I4-I2, ONE,
-     $                           U( 1, I2+1 ), LDU, WV( 1, 1+I2 ),
-     $                           LDWV )
+         V1 = V( 1 )
+         T1 = TAU*DCONJG( V1 )
+         V2 = V( 2 )
+         T2 = TAU*DCONJG( V2 )
+         V3 = V( 3 )
+         T3 = TAU*DCONJG( V3 )
+         V4 = V( 4 )
+         T4 = TAU*DCONJG( V4 )
+         V5 = V( 5 )
+         T5 = TAU*DCONJG( V5 )
+         V6 = V( 6 )
+         T6 = TAU*DCONJG( V6 )
+         V7 = V( 7 )
+         T7 = TAU*DCONJG( V7 )
+         V8 = V( 8 )
+         T8 = TAU*DCONJG( V8 )
+         DO 360 J = 1, M
+            SUM = V1*C( J, 1 ) + V2*C( J, 2 ) + V3*C( J, 3 ) +
+     $            V4*C( J, 4 ) + V5*C( J, 5 ) + V6*C( J, 6 ) +
+     $            V7*C( J, 7 ) + V8*C( J, 8 )
+            C( J, 1 ) = C( J, 1 ) - SUM*T1
+            C( J, 2 ) = C( J, 2 ) - SUM*T2
+            C( J, 3 ) = C( J, 3 ) - SUM*T3
+            C( J, 4 ) = C( J, 4 ) - SUM*T4
+            C( J, 5 ) = C( J, 5 ) - SUM*T5
+            C( J, 6 ) = C( J, 6 ) - SUM*T6
+            C( J, 7 ) = C( J, 7 ) - SUM*T7
+            C( J, 8 ) = C( J, 8 ) - SUM*T8
+  360    CONTINUE
+         GO TO 410
+  370    CONTINUE
 *
-*                    ==== Multiply by U22 ====
+*        Special code for 9 x 9 Householder
 *
-                     CALL ZGEMM( 'N', 'N', JLEN, I4-I2, J4-J2, ONE,
-     $                           Z( JROW, INCOL+1+J2 ), LDZ,
-     $                           U( J2+1, I2+1 ), LDU, ONE,
-     $                           WV( 1, 1+I2 ), LDWV )
+         V1 = V( 1 )
+         T1 = TAU*DCONJG( V1 )
+         V2 = V( 2 )
+         T2 = TAU*DCONJG( V2 )
+         V3 = V( 3 )
+         T3 = TAU*DCONJG( V3 )
+         V4 = V( 4 )
+         T4 = TAU*DCONJG( V4 )
+         V5 = V( 5 )
+         T5 = TAU*DCONJG( V5 )
+         V6 = V( 6 )
+         T6 = TAU*DCONJG( V6 )
+         V7 = V( 7 )
+         T7 = TAU*DCONJG( V7 )
+         V8 = V( 8 )
+         T8 = TAU*DCONJG( V8 )
+         V9 = V( 9 )
+         T9 = TAU*DCONJG( V9 )
+         DO 380 J = 1, M
+            SUM = V1*C( J, 1 ) + V2*C( J, 2 ) + V3*C( J, 3 ) +
+     $            V4*C( J, 4 ) + V5*C( J, 5 ) + V6*C( J, 6 ) +
+     $            V7*C( J, 7 ) + V8*C( J, 8 ) + V9*C( J, 9 )
+            C( J, 1 ) = C( J, 1 ) - SUM*T1
+            C( J, 2 ) = C( J, 2 ) - SUM*T2
+            C( J, 3 ) = C( J, 3 ) - SUM*T3
+            C( J, 4 ) = C( J, 4 ) - SUM*T4
+            C( J, 5 ) = C( J, 5 ) - SUM*T5
+            C( J, 6 ) = C( J, 6 ) - SUM*T6
+            C( J, 7 ) = C( J, 7 ) - SUM*T7
+            C( J, 8 ) = C( J, 8 ) - SUM*T8
+            C( J, 9 ) = C( J, 9 ) - SUM*T9
+  380    CONTINUE
+         GO TO 410
+  390    CONTINUE
 *
-*                    ==== Copy the result back to Z ====
+*        Special code for 10 x 10 Householder
 *
-                     CALL ZLACPY( 'ALL', JLEN, KDU, WV, LDWV,
-     $                            Z( JROW, INCOL+1 ), LDZ )
-  200             CONTINUE
-               END IF
-            END IF
-         END IF
-  210 CONTINUE
+         V1 = V( 1 )
+         T1 = TAU*DCONJG( V1 )
+         V2 = V( 2 )
+         T2 = TAU*DCONJG( V2 )
+         V3 = V( 3 )
+         T3 = TAU*DCONJG( V3 )
+         V4 = V( 4 )
+         T4 = TAU*DCONJG( V4 )
+         V5 = V( 5 )
+         T5 = TAU*DCONJG( V5 )
+         V6 = V( 6 )
+         T6 = TAU*DCONJG( V6 )
+         V7 = V( 7 )
+         T7 = TAU*DCONJG( V7 )
+         V8 = V( 8 )
+         T8 = TAU*DCONJG( V8 )
+         V9 = V( 9 )
+         T9 = TAU*DCONJG( V9 )
+         V10 = V( 10 )
+         T10 = TAU*DCONJG( V10 )
+         DO 400 J = 1, M
+            SUM = V1*C( J, 1 ) + V2*C( J, 2 ) + V3*C( J, 3 ) +
+     $            V4*C( J, 4 ) + V5*C( J, 5 ) + V6*C( J, 6 ) +
+     $            V7*C( J, 7 ) + V8*C( J, 8 ) + V9*C( J, 9 ) +
+     $            V10*C( J, 10 )
+            C( J, 1 ) = C( J, 1 ) - SUM*T1
+            C( J, 2 ) = C( J, 2 ) - SUM*T2
+            C( J, 3 ) = C( J, 3 ) - SUM*T3
+            C( J, 4 ) = C( J, 4 ) - SUM*T4
+            C( J, 5 ) = C( J, 5 ) - SUM*T5
+            C( J, 6 ) = C( J, 6 ) - SUM*T6
+            C( J, 7 ) = C( J, 7 ) - SUM*T7
+            C( J, 8 ) = C( J, 8 ) - SUM*T8
+            C( J, 9 ) = C( J, 9 ) - SUM*T9
+            C( J, 10 ) = C( J, 10 ) - SUM*T10
+  400    CONTINUE
+         GO TO 410
+      END IF
+  410 CONTINUE
+      RETURN
 *
-*     ==== End of ZLAQR5 ====
+*     End of ZLARFX
 *
       END
-*> \brief \b ZLARF applies an elementary reflector to a general rectangular matrix.
+*> \brief \b ZLARTG generates a plane rotation with real cosine and complex sine.
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download ZLARF + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/zlarf.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/zlarf.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/zlarf.f"> 
+*> Download ZLARTG + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/zlartg.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/zlartg.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/zlartg.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
-*       SUBROUTINE ZLARF( SIDE, M, N, V, INCV, TAU, C, LDC, WORK )
-* 
+*       SUBROUTINE ZLARTG( F, G, CS, SN, R )
+*
 *       .. Scalar Arguments ..
-*       CHARACTER          SIDE
-*       INTEGER            INCV, LDC, M, N
-*       COMPLEX*16         TAU
-*       ..
-*       .. Array Arguments ..
-*       COMPLEX*16         C( LDC, * ), V( * ), WORK( * )
+*       DOUBLE PRECISION   CS
+*       COMPLEX*16         F, G, R, SN
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
 *>
 *> \verbatim
 *>
-*> ZLARF applies a complex elementary reflector H to a complex M-by-N
-*> matrix C, from either the left or the right. H is represented in the
-*> form
-*>
-*>       H = I - tau * v * v**H
-*>
-*> where tau is a complex scalar and v is a complex vector.
+*> ZLARTG generates a plane rotation so that
 *>
-*> If tau = 0, then H is taken to be the unit matrix.
+*>    [  CS  SN  ]     [ F ]     [ R ]
+*>    [  __      ]  .  [   ]  =  [   ]   where CS**2 + |SN|**2 = 1.
+*>    [ -SN  CS  ]     [ G ]     [ 0 ]
 *>
-*> To apply H**H, supply conjg(tau) instead
-*> tau.
+*> This is a faster version of the BLAS1 routine ZROTG, except for
+*> the following differences:
+*>    F and G are unchanged on return.
+*>    If G=0, then CS=1 and SN=0.
+*>    If F=0, then CS=0 and SN is chosen so that R is real.
 *> \endverbatim
 *
 *  Arguments:
 *  ==========
 *
-*> \param[in] SIDE
-*> \verbatim
-*>          SIDE is CHARACTER*1
-*>          = 'L': form  H * C
-*>          = 'R': form  C * H
-*> \endverbatim
-*>
-*> \param[in] M
-*> \verbatim
-*>          M is INTEGER
-*>          The number of rows of the matrix C.
-*> \endverbatim
-*>
-*> \param[in] N
-*> \verbatim
-*>          N is INTEGER
-*>          The number of columns of the matrix C.
-*> \endverbatim
-*>
-*> \param[in] V
-*> \verbatim
-*>          V is COMPLEX*16 array, dimension
-*>                     (1 + (M-1)*abs(INCV)) if SIDE = 'L'
-*>                  or (1 + (N-1)*abs(INCV)) if SIDE = 'R'
-*>          The vector v in the representation of H. V is not used if
-*>          TAU = 0.
-*> \endverbatim
-*>
-*> \param[in] INCV
+*> \param[in] F
 *> \verbatim
-*>          INCV is INTEGER
-*>          The increment between elements of v. INCV <> 0.
+*>          F is COMPLEX*16
+*>          The first component of vector to be rotated.
 *> \endverbatim
 *>
-*> \param[in] TAU
+*> \param[in] G
 *> \verbatim
-*>          TAU is COMPLEX*16
-*>          The value tau in the representation of H.
+*>          G is COMPLEX*16
+*>          The second component of vector to be rotated.
 *> \endverbatim
 *>
-*> \param[in,out] C
+*> \param[out] CS
 *> \verbatim
-*>          C is COMPLEX*16 array, dimension (LDC,N)
-*>          On entry, the M-by-N matrix C.
-*>          On exit, C is overwritten by the matrix H * C if SIDE = 'L',
-*>          or C * H if SIDE = 'R'.
+*>          CS is DOUBLE PRECISION
+*>          The cosine of the rotation.
 *> \endverbatim
 *>
-*> \param[in] LDC
+*> \param[out] SN
 *> \verbatim
-*>          LDC is INTEGER
-*>          The leading dimension of the array C. LDC >= max(1,M).
+*>          SN is COMPLEX*16
+*>          The sine of the rotation.
 *> \endverbatim
 *>
-*> \param[out] WORK
+*> \param[out] R
 *> \verbatim
-*>          WORK is COMPLEX*16 array, dimension
-*>                         (N) if SIDE = 'L'
-*>                      or (M) if SIDE = 'R'
+*>          R is COMPLEX*16
+*>          The nonzero component of the rotated vector.
 *> \endverbatim
 *
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date September 2012
+*> \date December 2016
 *
 *> \ingroup complex16OTHERauxiliary
 *
+*> \par Further Details:
+*  =====================
+*>
+*> \verbatim
+*>
+*>  3-5-96 - Modified with a new algorithm by W. Kahan and J. Demmel
+*>
+*>  This version has a few statements commented out for thread safety
+*>  (machine parameters are computed on each entry). 10 feb 03, SJH.
+*> \endverbatim
+*>
 *  =====================================================================
-      SUBROUTINE ZLARF( SIDE, M, N, V, INCV, TAU, C, LDC, WORK )
+      SUBROUTINE ZLARTG( F, G, CS, SN, R )
 *
-*  -- LAPACK auxiliary routine (version 3.4.2) --
+*  -- LAPACK auxiliary routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     September 2012
+*     December 2016
 *
 *     .. Scalar Arguments ..
-      CHARACTER          SIDE
-      INTEGER            INCV, LDC, M, N
-      COMPLEX*16         TAU
-*     ..
-*     .. Array Arguments ..
-      COMPLEX*16         C( LDC, * ), V( * ), WORK( * )
+      DOUBLE PRECISION   CS
+      COMPLEX*16         F, G, R, SN
 *     ..
 *
 *  =====================================================================
 *
 *     .. Parameters ..
-      COMPLEX*16         ONE, ZERO
-      PARAMETER          ( ONE = ( 1.0D+0, 0.0D+0 ),
-     $                   ZERO = ( 0.0D+0, 0.0D+0 ) )
+      DOUBLE PRECISION   TWO, ONE, ZERO
+      PARAMETER          ( TWO = 2.0D+0, ONE = 1.0D+0, ZERO = 0.0D+0 )
+      COMPLEX*16         CZERO
+      PARAMETER          ( CZERO = ( 0.0D+0, 0.0D+0 ) )
 *     ..
 *     .. Local Scalars ..
-      LOGICAL            APPLYLEFT
-      INTEGER            I, LASTV, LASTC
-*     ..
-*     .. External Subroutines ..
-      EXTERNAL           ZGEMV, ZGERC
+*     LOGICAL            FIRST
+      INTEGER            COUNT, I
+      DOUBLE PRECISION   D, DI, DR, EPS, F2, F2S, G2, G2S, SAFMIN,
+     $                   SAFMN2, SAFMX2, SCALE
+      COMPLEX*16         FF, FS, GS
 *     ..
 *     .. External Functions ..
-      LOGICAL            LSAME
-      INTEGER            ILAZLR, ILAZLC
-      EXTERNAL           LSAME, ILAZLR, ILAZLC
+      DOUBLE PRECISION   DLAMCH, DLAPY2
+      LOGICAL            DISNAN
+      EXTERNAL           DLAMCH, DLAPY2, DISNAN
+*     ..
+*     .. Intrinsic Functions ..
+      INTRINSIC          ABS, DBLE, DCMPLX, DCONJG, DIMAG, INT, LOG,
+     $                   MAX, SQRT
+*     ..
+*     .. Statement Functions ..
+      DOUBLE PRECISION   ABS1, ABSSQ
+*     ..
+*     .. Statement Function definitions ..
+      ABS1( FF ) = MAX( ABS( DBLE( FF ) ), ABS( DIMAG( FF ) ) )
+      ABSSQ( FF ) = DBLE( FF )**2 + DIMAG( FF )**2
 *     ..
 *     .. Executable Statements ..
 *
-      APPLYLEFT = LSAME( SIDE, 'L' )
-      LASTV = 0
-      LASTC = 0
-      IF( TAU.NE.ZERO ) THEN
-*     Set up variables for scanning V.  LASTV begins pointing to the end
-*     of V.
-         IF( APPLYLEFT ) THEN
-            LASTV = M
-         ELSE
-            LASTV = N
-         END IF
-         IF( INCV.GT.0 ) THEN
-            I = 1 + (LASTV-1) * INCV
-         ELSE
-            I = 1
-         END IF
-*     Look for the last non-zero row in V.
-         DO WHILE( LASTV.GT.0 .AND. V( I ).EQ.ZERO )
-            LASTV = LASTV - 1
-            I = I - INCV
-         END DO
-         IF( APPLYLEFT ) THEN
-*     Scan for the last non-zero column in C(1:lastv,:).
-            LASTC = ILAZLC(LASTV, N, C, LDC)
-         ELSE
-*     Scan for the last non-zero row in C(:,1:lastv).
-            LASTC = ILAZLR(M, LASTV, C, LDC)
+      SAFMIN = DLAMCH( 'S' )
+      EPS = DLAMCH( 'E' )
+      SAFMN2 = DLAMCH( 'B' )**INT( LOG( SAFMIN / EPS ) /
+     $         LOG( DLAMCH( 'B' ) ) / TWO )
+      SAFMX2 = ONE / SAFMN2
+      SCALE = MAX( ABS1( F ), ABS1( G ) )
+      FS = F
+      GS = G
+      COUNT = 0
+      IF( SCALE.GE.SAFMX2 ) THEN
+   10    CONTINUE
+         COUNT = COUNT + 1
+         FS = FS*SAFMN2
+         GS = GS*SAFMN2
+         SCALE = SCALE*SAFMN2
+         IF( SCALE.GE.SAFMX2 )
+     $      GO TO 10
+      ELSE IF( SCALE.LE.SAFMN2 ) THEN
+         IF( G.EQ.CZERO.OR.DISNAN( ABS( G ) ) ) THEN
+            CS = ONE
+            SN = CZERO
+            R = F
+            RETURN
          END IF
+   20    CONTINUE
+         COUNT = COUNT - 1
+         FS = FS*SAFMX2
+         GS = GS*SAFMX2
+         SCALE = SCALE*SAFMX2
+         IF( SCALE.LE.SAFMN2 )
+     $      GO TO 20
       END IF
-*     Note that lastc.eq.0 renders the BLAS operations null; no special
-*     case is needed at this level.
-      IF( APPLYLEFT ) THEN
-*
-*        Form  H * C
-*
-         IF( LASTV.GT.0 ) THEN
-*
-*           w(1:lastc,1) := C(1:lastv,1:lastc)**H * v(1:lastv,1)
-*
-            CALL ZGEMV( 'Conjugate transpose', LASTV, LASTC, ONE,
-     $           C, LDC, V, INCV, ZERO, WORK, 1 )
+      F2 = ABSSQ( FS )
+      G2 = ABSSQ( GS )
+      IF( F2.LE.MAX( G2, ONE )*SAFMIN ) THEN
 *
-*           C(1:lastv,1:lastc) := C(...) - v(1:lastv,1) * w(1:lastc,1)**H
+*        This is a rare case: F is very small.
 *
-            CALL ZGERC( LASTV, LASTC, -TAU, V, INCV, WORK, 1, C, LDC )
+         IF( F.EQ.CZERO ) THEN
+            CS = ZERO
+            R = DLAPY2( DBLE( G ), DIMAG( G ) )
+*           Do complex/real division explicitly with two real divisions
+            D = DLAPY2( DBLE( GS ), DIMAG( GS ) )
+            SN = DCMPLX( DBLE( GS ) / D, -DIMAG( GS ) / D )
+            RETURN
+         END IF
+         F2S = DLAPY2( DBLE( FS ), DIMAG( FS ) )
+*        G2 and G2S are accurate
+*        G2 is at least SAFMIN, and G2S is at least SAFMN2
+         G2S = SQRT( G2 )
+*        Error in CS from underflow in F2S is at most
+*        UNFL / SAFMN2 .lt. sqrt(UNFL*EPS) .lt. EPS
+*        If MAX(G2,ONE)=G2, then F2 .lt. G2*SAFMIN,
+*        and so CS .lt. sqrt(SAFMIN)
+*        If MAX(G2,ONE)=ONE, then F2 .lt. SAFMIN
+*        and so CS .lt. sqrt(SAFMIN)/SAFMN2 = sqrt(EPS)
+*        Therefore, CS = F2S/G2S / sqrt( 1 + (F2S/G2S)**2 ) = F2S/G2S
+         CS = F2S / G2S
+*        Make sure abs(FF) = 1
+*        Do complex/real division explicitly with 2 real divisions
+         IF( ABS1( F ).GT.ONE ) THEN
+            D = DLAPY2( DBLE( F ), DIMAG( F ) )
+            FF = DCMPLX( DBLE( F ) / D, DIMAG( F ) / D )
+         ELSE
+            DR = SAFMX2*DBLE( F )
+            DI = SAFMX2*DIMAG( F )
+            D = DLAPY2( DR, DI )
+            FF = DCMPLX( DR / D, DI / D )
          END IF
+         SN = FF*DCMPLX( DBLE( GS ) / G2S, -DIMAG( GS ) / G2S )
+         R = CS*F + SN*G
       ELSE
 *
-*        Form  C * H
-*
-         IF( LASTV.GT.0 ) THEN
-*
-*           w(1:lastc,1) := C(1:lastc,1:lastv) * v(1:lastv,1)
-*
-            CALL ZGEMV( 'No transpose', LASTC, LASTV, ONE, C, LDC,
-     $           V, INCV, ZERO, WORK, 1 )
-*
-*           C(1:lastc,1:lastv) := C(...) - w(1:lastc,1) * v(1:lastv,1)**H
+*        This is the most common case.
+*        Neither F2 nor F2/G2 are less than SAFMIN
+*        F2S cannot overflow, and it is accurate
 *
-            CALL ZGERC( LASTC, LASTV, -TAU, WORK, 1, V, INCV, C, LDC )
+         F2S = SQRT( ONE+G2 / F2 )
+*        Do the F2S(real)*FS(complex) multiply with two real multiplies
+         R = DCMPLX( F2S*DBLE( FS ), F2S*DIMAG( FS ) )
+         CS = ONE / F2S
+         D = F2 + G2
+*        Do complex/real division explicitly with two real divisions
+         SN = DCMPLX( DBLE( R ) / D, DIMAG( R ) / D )
+         SN = SN*DCONJG( GS )
+         IF( COUNT.NE.0 ) THEN
+            IF( COUNT.GT.0 ) THEN
+               DO 30 I = 1, COUNT
+                  R = R*SAFMX2
+   30          CONTINUE
+            ELSE
+               DO 40 I = 1, -COUNT
+                  R = R*SAFMN2
+   40          CONTINUE
+            END IF
          END IF
       END IF
       RETURN
 *
-*     End of ZLARF
+*     End of ZLARTG
 *
       END
-*> \brief \b ZLARFB applies a block reflector or its conjugate-transpose to a general rectangular matrix.
+*> \brief \b ZLASCL multiplies a general rectangular matrix by a real scalar defined as cto/cfrom.
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download ZLARFB + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/zlarfb.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/zlarfb.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/zlarfb.f"> 
+*> Download ZLASCL + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/zlascl.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/zlascl.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/zlascl.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
-*       SUBROUTINE ZLARFB( SIDE, TRANS, DIRECT, STOREV, M, N, K, V, LDV,
-*                          T, LDT, C, LDC, WORK, LDWORK )
-* 
+*       SUBROUTINE ZLASCL( TYPE, KL, KU, CFROM, CTO, M, N, A, LDA, INFO )
+*
 *       .. Scalar Arguments ..
-*       CHARACTER          DIRECT, SIDE, STOREV, TRANS
-*       INTEGER            K, LDC, LDT, LDV, LDWORK, M, N
+*       CHARACTER          TYPE
+*       INTEGER            INFO, KL, KU, LDA, M, N
+*       DOUBLE PRECISION   CFROM, CTO
 *       ..
 *       .. Array Arguments ..
-*       COMPLEX*16         C( LDC, * ), T( LDT, * ), V( LDV, * ),
-*      $                   WORK( LDWORK, * )
+*       COMPLEX*16         A( LDA, * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
 *>
 *> \verbatim
 *>
-*> ZLARFB applies a complex block reflector H or its transpose H**H to a
-*> complex M-by-N matrix C, from either the left or the right.
+*> ZLASCL multiplies the M by N complex matrix A by the real scalar
+*> CTO/CFROM.  This is done without over/underflow as long as the final
+*> result CTO*A(I,J)/CFROM does not over/underflow. TYPE specifies that
+*> A may be full, upper triangular, lower triangular, upper Hessenberg,
+*> or banded.
 *> \endverbatim
 *
 *  Arguments:
 *  ==========
 *
-*> \param[in] SIDE
-*> \verbatim
-*>          SIDE is CHARACTER*1
-*>          = 'L': apply H or H**H from the Left
-*>          = 'R': apply H or H**H from the Right
-*> \endverbatim
-*>
-*> \param[in] TRANS
-*> \verbatim
-*>          TRANS is CHARACTER*1
-*>          = 'N': apply H (No transpose)
-*>          = 'C': apply H**H (Conjugate transpose)
-*> \endverbatim
-*>
-*> \param[in] DIRECT
-*> \verbatim
-*>          DIRECT is CHARACTER*1
-*>          Indicates how H is formed from a product of elementary
-*>          reflectors
-*>          = 'F': H = H(1) H(2) . . . H(k) (Forward)
-*>          = 'B': H = H(k) . . . H(2) H(1) (Backward)
-*> \endverbatim
-*>
-*> \param[in] STOREV
-*> \verbatim
-*>          STOREV is CHARACTER*1
-*>          Indicates how the vectors which define the elementary
-*>          reflectors are stored:
-*>          = 'C': Columnwise
-*>          = 'R': Rowwise
-*> \endverbatim
-*>
-*> \param[in] M
+*> \param[in] TYPE
 *> \verbatim
-*>          M is INTEGER
-*>          The number of rows of the matrix C.
+*>          TYPE is CHARACTER*1
+*>          TYPE indices the storage type of the input matrix.
+*>          = 'G':  A is a full matrix.
+*>          = 'L':  A is a lower triangular matrix.
+*>          = 'U':  A is an upper triangular matrix.
+*>          = 'H':  A is an upper Hessenberg matrix.
+*>          = 'B':  A is a symmetric band matrix with lower bandwidth KL
+*>                  and upper bandwidth KU and with the only the lower
+*>                  half stored.
+*>          = 'Q':  A is a symmetric band matrix with lower bandwidth KL
+*>                  and upper bandwidth KU and with the only the upper
+*>                  half stored.
+*>          = 'Z':  A is a band matrix with lower bandwidth KL and upper
+*>                  bandwidth KU. See ZGBTRF for storage details.
 *> \endverbatim
 *>
-*> \param[in] N
+*> \param[in] KL
 *> \verbatim
-*>          N is INTEGER
-*>          The number of columns of the matrix C.
+*>          KL is INTEGER
+*>          The lower bandwidth of A.  Referenced only if TYPE = 'B',
+*>          'Q' or 'Z'.
 *> \endverbatim
 *>
-*> \param[in] K
+*> \param[in] KU
 *> \verbatim
-*>          K is INTEGER
-*>          The order of the matrix T (= the number of elementary
-*>          reflectors whose product defines the block reflector).
+*>          KU is INTEGER
+*>          The upper bandwidth of A.  Referenced only if TYPE = 'B',
+*>          'Q' or 'Z'.
 *> \endverbatim
 *>
-*> \param[in] V
+*> \param[in] CFROM
 *> \verbatim
-*>          V is COMPLEX*16 array, dimension
-*>                                (LDV,K) if STOREV = 'C'
-*>                                (LDV,M) if STOREV = 'R' and SIDE = 'L'
-*>                                (LDV,N) if STOREV = 'R' and SIDE = 'R'
-*>          See Further Details.
+*>          CFROM is DOUBLE PRECISION
 *> \endverbatim
 *>
-*> \param[in] LDV
+*> \param[in] CTO
 *> \verbatim
-*>          LDV is INTEGER
-*>          The leading dimension of the array V.
-*>          If STOREV = 'C' and SIDE = 'L', LDV >= max(1,M);
-*>          if STOREV = 'C' and SIDE = 'R', LDV >= max(1,N);
-*>          if STOREV = 'R', LDV >= K.
-*> \endverbatim
+*>          CTO is DOUBLE PRECISION
 *>
-*> \param[in] T
-*> \verbatim
-*>          T is COMPLEX*16 array, dimension (LDT,K)
-*>          The triangular K-by-K matrix T in the representation of the
-*>          block reflector.
+*>          The matrix A is multiplied by CTO/CFROM. A(I,J) is computed
+*>          without over/underflow if the final result CTO*A(I,J)/CFROM
+*>          can be represented without over/underflow.  CFROM must be
+*>          nonzero.
 *> \endverbatim
 *>
-*> \param[in] LDT
+*> \param[in] M
 *> \verbatim
-*>          LDT is INTEGER
-*>          The leading dimension of the array T. LDT >= K.
+*>          M is INTEGER
+*>          The number of rows of the matrix A.  M >= 0.
 *> \endverbatim
 *>
-*> \param[in,out] C
+*> \param[in] N
 *> \verbatim
-*>          C is COMPLEX*16 array, dimension (LDC,N)
-*>          On entry, the M-by-N matrix C.
-*>          On exit, C is overwritten by H*C or H**H*C or C*H or C*H**H.
+*>          N is INTEGER
+*>          The number of columns of the matrix A.  N >= 0.
 *> \endverbatim
 *>
-*> \param[in] LDC
+*> \param[in,out] A
 *> \verbatim
-*>          LDC is INTEGER
-*>          The leading dimension of the array C. LDC >= max(1,M).
+*>          A is COMPLEX*16 array, dimension (LDA,N)
+*>          The matrix to be multiplied by CTO/CFROM.  See TYPE for the
+*>          storage type.
 *> \endverbatim
 *>
-*> \param[out] WORK
+*> \param[in] LDA
 *> \verbatim
-*>          WORK is COMPLEX*16 array, dimension (LDWORK,K)
+*>          LDA is INTEGER
+*>          The leading dimension of the array A.
+*>          If TYPE = 'G', 'L', 'U', 'H', LDA >= max(1,M);
+*>             TYPE = 'B', LDA >= KL+1;
+*>             TYPE = 'Q', LDA >= KU+1;
+*>             TYPE = 'Z', LDA >= 2*KL+KU+1.
 *> \endverbatim
 *>
-*> \param[in] LDWORK
+*> \param[out] INFO
 *> \verbatim
-*>          LDWORK is INTEGER
-*>          The leading dimension of the array WORK.
-*>          If SIDE = 'L', LDWORK >= max(1,N);
-*>          if SIDE = 'R', LDWORK >= max(1,M).
+*>          INFO is INTEGER
+*>          0  - successful exit
+*>          <0 - if INFO = -i, the i-th argument had an illegal value.
 *> \endverbatim
 *
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date June 2013
+*> \date June 2016
 *
 *> \ingroup complex16OTHERauxiliary
 *
-*> \par Further Details:
-*  =====================
-*>
-*> \verbatim
-*>
-*>  The shape of the matrix V and the storage of the vectors which define
-*>  the H(i) is best illustrated by the following example with n = 5 and
-*>  k = 3. The elements equal to 1 are not stored; the corresponding
-*>  array elements are modified but restored on exit. The rest of the
-*>  array is not used.
-*>
-*>  DIRECT = 'F' and STOREV = 'C':         DIRECT = 'F' and STOREV = 'R':
-*>
-*>               V = (  1       )                 V = (  1 v1 v1 v1 v1 )
-*>                   ( v1  1    )                     (     1 v2 v2 v2 )
-*>                   ( v1 v2  1 )                     (        1 v3 v3 )
-*>                   ( v1 v2 v3 )
-*>                   ( v1 v2 v3 )
-*>
-*>  DIRECT = 'B' and STOREV = 'C':         DIRECT = 'B' and STOREV = 'R':
-*>
-*>               V = ( v1 v2 v3 )                 V = ( v1 v1  1       )
-*>                   ( v1 v2 v3 )                     ( v2 v2 v2  1    )
-*>                   (  1 v2 v3 )                     ( v3 v3 v3 v3  1 )
-*>                   (     1 v3 )
-*>                   (        1 )
-*> \endverbatim
-*>
 *  =====================================================================
-      SUBROUTINE ZLARFB( SIDE, TRANS, DIRECT, STOREV, M, N, K, V, LDV,
-     $                   T, LDT, C, LDC, WORK, LDWORK )
+      SUBROUTINE ZLASCL( TYPE, KL, KU, CFROM, CTO, M, N, A, LDA, INFO )
 *
-*  -- LAPACK auxiliary routine (version 3.5.0) --
+*  -- LAPACK auxiliary routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     June 2013
+*     June 2016
 *
 *     .. Scalar Arguments ..
-      CHARACTER          DIRECT, SIDE, STOREV, TRANS
-      INTEGER            K, LDC, LDT, LDV, LDWORK, M, N
+      CHARACTER          TYPE
+      INTEGER            INFO, KL, KU, LDA, M, N
+      DOUBLE PRECISION   CFROM, CTO
 *     ..
 *     .. Array Arguments ..
-      COMPLEX*16         C( LDC, * ), T( LDT, * ), V( LDV, * ),
-     $                   WORK( LDWORK, * )
+      COMPLEX*16         A( LDA, * )
 *     ..
 *
 *  =====================================================================
 *
 *     .. Parameters ..
-      COMPLEX*16         ONE
-      PARAMETER          ( ONE = ( 1.0D+0, 0.0D+0 ) )
+      DOUBLE PRECISION   ZERO, ONE
+      PARAMETER          ( ZERO = 0.0D0, ONE = 1.0D0 )
 *     ..
 *     .. Local Scalars ..
-      CHARACTER          TRANST
-      INTEGER            I, J
+      LOGICAL            DONE
+      INTEGER            I, ITYPE, J, K1, K2, K3, K4
+      DOUBLE PRECISION   BIGNUM, CFROM1, CFROMC, CTO1, CTOC, MUL, SMLNUM
 *     ..
 *     .. External Functions ..
-      LOGICAL            LSAME
-      EXTERNAL           LSAME
-*     ..
-*     .. External Subroutines ..
-      EXTERNAL           ZCOPY, ZGEMM, ZLACGV, ZTRMM
+      LOGICAL            LSAME, DISNAN
+      DOUBLE PRECISION   DLAMCH
+      EXTERNAL           LSAME, DLAMCH, DISNAN
 *     ..
 *     .. Intrinsic Functions ..
-      INTRINSIC          DCONJG
+      INTRINSIC          ABS, MAX, MIN
+*     ..
+*     .. External Subroutines ..
+      EXTERNAL           XERBLA
 *     ..
 *     .. Executable Statements ..
 *
-*     Quick return if possible
+*     Test the input arguments
 *
-      IF( M.LE.0 .OR. N.LE.0 )
-     $   RETURN
+      INFO = 0
 *
-      IF( LSAME( TRANS, 'N' ) ) THEN
-         TRANST = 'C'
+      IF( LSAME( TYPE, 'G' ) ) THEN
+         ITYPE = 0
+      ELSE IF( LSAME( TYPE, 'L' ) ) THEN
+         ITYPE = 1
+      ELSE IF( LSAME( TYPE, 'U' ) ) THEN
+         ITYPE = 2
+      ELSE IF( LSAME( TYPE, 'H' ) ) THEN
+         ITYPE = 3
+      ELSE IF( LSAME( TYPE, 'B' ) ) THEN
+         ITYPE = 4
+      ELSE IF( LSAME( TYPE, 'Q' ) ) THEN
+         ITYPE = 5
+      ELSE IF( LSAME( TYPE, 'Z' ) ) THEN
+         ITYPE = 6
       ELSE
-         TRANST = 'N'
+         ITYPE = -1
       END IF
 *
-      IF( LSAME( STOREV, 'C' ) ) THEN
-*
-         IF( LSAME( DIRECT, 'F' ) ) THEN
-*
-*           Let  V =  ( V1 )    (first K rows)
-*                     ( V2 )
-*           where  V1  is unit lower triangular.
-*
-            IF( LSAME( SIDE, 'L' ) ) THEN
-*
-*              Form  H * C  or  H**H * C  where  C = ( C1 )
-*                                                    ( C2 )
-*
-*              W := C**H * V  =  (C1**H * V1 + C2**H * V2)  (stored in WORK)
-*
-*              W := C1**H
-*
-               DO 10 J = 1, K
-                  CALL ZCOPY( N, C( J, 1 ), LDC, WORK( 1, J ), 1 )
-                  CALL ZLACGV( N, WORK( 1, J ), 1 )
-   10          CONTINUE
-*
-*              W := W * V1
-*
-               CALL ZTRMM( 'Right', 'Lower', 'No transpose', 'Unit', N,
-     $                     K, ONE, V, LDV, WORK, LDWORK )
-               IF( M.GT.K ) THEN
-*
-*                 W := W + C2**H * V2
-*
-                  CALL ZGEMM( 'Conjugate transpose', 'No transpose', N,
-     $                        K, M-K, ONE, C( K+1, 1 ), LDC,
-     $                        V( K+1, 1 ), LDV, ONE, WORK, LDWORK )
-               END IF
-*
-*              W := W * T**H  or  W * T
-*
-               CALL ZTRMM( 'Right', 'Upper', TRANST, 'Non-unit', N, K,
-     $                     ONE, T, LDT, WORK, LDWORK )
-*
-*              C := C - V * W**H
-*
-               IF( M.GT.K ) THEN
-*
-*                 C2 := C2 - V2 * W**H
-*
-                  CALL ZGEMM( 'No transpose', 'Conjugate transpose',
-     $                        M-K, N, K, -ONE, V( K+1, 1 ), LDV, WORK,
-     $                        LDWORK, ONE, C( K+1, 1 ), LDC )
-               END IF
-*
-*              W := W * V1**H
-*
-               CALL ZTRMM( 'Right', 'Lower', 'Conjugate transpose',
-     $                     'Unit', N, K, ONE, V, LDV, WORK, LDWORK )
-*
-*              C1 := C1 - W**H
-*
-               DO 30 J = 1, K
-                  DO 20 I = 1, N
-                     C( J, I ) = C( J, I ) - DCONJG( WORK( I, J ) )
-   20             CONTINUE
-   30          CONTINUE
-*
-            ELSE IF( LSAME( SIDE, 'R' ) ) THEN
-*
-*              Form  C * H  or  C * H**H  where  C = ( C1  C2 )
-*
-*              W := C * V  =  (C1*V1 + C2*V2)  (stored in WORK)
-*
-*              W := C1
-*
-               DO 40 J = 1, K
-                  CALL ZCOPY( M, C( 1, J ), 1, WORK( 1, J ), 1 )
-   40          CONTINUE
-*
-*              W := W * V1
-*
-               CALL ZTRMM( 'Right', 'Lower', 'No transpose', 'Unit', M,
-     $                     K, ONE, V, LDV, WORK, LDWORK )
-               IF( N.GT.K ) THEN
-*
-*                 W := W + C2 * V2
-*
-                  CALL ZGEMM( 'No transpose', 'No transpose', M, K, N-K,
-     $                        ONE, C( 1, K+1 ), LDC, V( K+1, 1 ), LDV,
-     $                        ONE, WORK, LDWORK )
-               END IF
-*
-*              W := W * T  or  W * T**H
-*
-               CALL ZTRMM( 'Right', 'Upper', TRANS, 'Non-unit', M, K,
-     $                     ONE, T, LDT, WORK, LDWORK )
-*
-*              C := C - W * V**H
-*
-               IF( N.GT.K ) THEN
-*
-*                 C2 := C2 - W * V2**H
-*
-                  CALL ZGEMM( 'No transpose', 'Conjugate transpose', M,
-     $                        N-K, K, -ONE, WORK, LDWORK, V( K+1, 1 ),
-     $                        LDV, ONE, C( 1, K+1 ), LDC )
-               END IF
-*
-*              W := W * V1**H
-*
-               CALL ZTRMM( 'Right', 'Lower', 'Conjugate transpose',
-     $                     'Unit', M, K, ONE, V, LDV, WORK, LDWORK )
-*
-*              C1 := C1 - W
-*
-               DO 60 J = 1, K
-                  DO 50 I = 1, M
-                     C( I, J ) = C( I, J ) - WORK( I, J )
-   50             CONTINUE
-   60          CONTINUE
-            END IF
-*
-         ELSE
-*
-*           Let  V =  ( V1 )
-*                     ( V2 )    (last K rows)
-*           where  V2  is unit upper triangular.
-*
-            IF( LSAME( SIDE, 'L' ) ) THEN
-*
-*              Form  H * C  or  H**H * C  where  C = ( C1 )
-*                                                    ( C2 )
-*
-*              W := C**H * V  =  (C1**H * V1 + C2**H * V2)  (stored in WORK)
-*
-*              W := C2**H
-*
-               DO 70 J = 1, K
-                  CALL ZCOPY( N, C( M-K+J, 1 ), LDC, WORK( 1, J ), 1 )
-                  CALL ZLACGV( N, WORK( 1, J ), 1 )
-   70          CONTINUE
-*
-*              W := W * V2
-*
-               CALL ZTRMM( 'Right', 'Upper', 'No transpose', 'Unit', N,
-     $                     K, ONE, V( M-K+1, 1 ), LDV, WORK, LDWORK )
-               IF( M.GT.K ) THEN
-*
-*                 W := W + C1**H * V1
-*
-                  CALL ZGEMM( 'Conjugate transpose', 'No transpose', N,
-     $                        K, M-K, ONE, C, LDC, V, LDV, ONE, WORK,
-     $                        LDWORK )
-               END IF
-*
-*              W := W * T**H  or  W * T
-*
-               CALL ZTRMM( 'Right', 'Lower', TRANST, 'Non-unit', N, K,
-     $                     ONE, T, LDT, WORK, LDWORK )
-*
-*              C := C - V * W**H
-*
-               IF( M.GT.K ) THEN
-*
-*                 C1 := C1 - V1 * W**H
-*
-                  CALL ZGEMM( 'No transpose', 'Conjugate transpose',
-     $                        M-K, N, K, -ONE, V, LDV, WORK, LDWORK,
-     $                        ONE, C, LDC )
-               END IF
+      IF( ITYPE.EQ.-1 ) THEN
+         INFO = -1
+      ELSE IF( CFROM.EQ.ZERO .OR. DISNAN(CFROM) ) THEN
+         INFO = -4
+      ELSE IF( DISNAN(CTO) ) THEN
+         INFO = -5
+      ELSE IF( M.LT.0 ) THEN
+         INFO = -6
+      ELSE IF( N.LT.0 .OR. ( ITYPE.EQ.4 .AND. N.NE.M ) .OR.
+     $         ( ITYPE.EQ.5 .AND. N.NE.M ) ) THEN
+         INFO = -7
+      ELSE IF( ITYPE.LE.3 .AND. LDA.LT.MAX( 1, M ) ) THEN
+         INFO = -9
+      ELSE IF( ITYPE.GE.4 ) THEN
+         IF( KL.LT.0 .OR. KL.GT.MAX( M-1, 0 ) ) THEN
+            INFO = -2
+         ELSE IF( KU.LT.0 .OR. KU.GT.MAX( N-1, 0 ) .OR.
+     $            ( ( ITYPE.EQ.4 .OR. ITYPE.EQ.5 ) .AND. KL.NE.KU ) )
+     $             THEN
+            INFO = -3
+         ELSE IF( ( ITYPE.EQ.4 .AND. LDA.LT.KL+1 ) .OR.
+     $            ( ITYPE.EQ.5 .AND. LDA.LT.KU+1 ) .OR.
+     $            ( ITYPE.EQ.6 .AND. LDA.LT.2*KL+KU+1 ) ) THEN
+            INFO = -9
+         END IF
+      END IF
 *
-*              W := W * V2**H
+      IF( INFO.NE.0 ) THEN
+         CALL XERBLA( 'ZLASCL', -INFO )
+         RETURN
+      END IF
 *
-               CALL ZTRMM( 'Right', 'Upper', 'Conjugate transpose',
-     $                     'Unit', N, K, ONE, V( M-K+1, 1 ), LDV, WORK,
-     $                     LDWORK )
+*     Quick return if possible
 *
-*              C2 := C2 - W**H
+      IF( N.EQ.0 .OR. M.EQ.0 )
+     $   RETURN
 *
-               DO 90 J = 1, K
-                  DO 80 I = 1, N
-                     C( M-K+J, I ) = C( M-K+J, I ) -
-     $                               DCONJG( WORK( I, J ) )
-   80             CONTINUE
-   90          CONTINUE
+*     Get machine parameters
 *
-            ELSE IF( LSAME( SIDE, 'R' ) ) THEN
+      SMLNUM = DLAMCH( 'S' )
+      BIGNUM = ONE / SMLNUM
 *
-*              Form  C * H  or  C * H**H  where  C = ( C1  C2 )
+      CFROMC = CFROM
+      CTOC = CTO
 *
-*              W := C * V  =  (C1*V1 + C2*V2)  (stored in WORK)
+   10 CONTINUE
+      CFROM1 = CFROMC*SMLNUM
+      IF( CFROM1.EQ.CFROMC ) THEN
+!        CFROMC is an inf.  Multiply by a correctly signed zero for
+!        finite CTOC, or a NaN if CTOC is infinite.
+         MUL = CTOC / CFROMC
+         DONE = .TRUE.
+         CTO1 = CTOC
+      ELSE
+         CTO1 = CTOC / BIGNUM
+         IF( CTO1.EQ.CTOC ) THEN
+!           CTOC is either 0 or an inf.  In both cases, CTOC itself
+!           serves as the correct multiplication factor.
+            MUL = CTOC
+            DONE = .TRUE.
+            CFROMC = ONE
+         ELSE IF( ABS( CFROM1 ).GT.ABS( CTOC ) .AND. CTOC.NE.ZERO ) THEN
+            MUL = SMLNUM
+            DONE = .FALSE.
+            CFROMC = CFROM1
+         ELSE IF( ABS( CTO1 ).GT.ABS( CFROMC ) ) THEN
+            MUL = BIGNUM
+            DONE = .FALSE.
+            CTOC = CTO1
+         ELSE
+            MUL = CTOC / CFROMC
+            DONE = .TRUE.
+         END IF
+      END IF
 *
-*              W := C2
+      IF( ITYPE.EQ.0 ) THEN
 *
-               DO 100 J = 1, K
-                  CALL ZCOPY( M, C( 1, N-K+J ), 1, WORK( 1, J ), 1 )
-  100          CONTINUE
+*        Full matrix
 *
-*              W := W * V2
+         DO 30 J = 1, N
+            DO 20 I = 1, M
+               A( I, J ) = A( I, J )*MUL
+   20       CONTINUE
+   30    CONTINUE
 *
-               CALL ZTRMM( 'Right', 'Upper', 'No transpose', 'Unit', M,
-     $                     K, ONE, V( N-K+1, 1 ), LDV, WORK, LDWORK )
-               IF( N.GT.K ) THEN
+      ELSE IF( ITYPE.EQ.1 ) THEN
 *
-*                 W := W + C1 * V1
+*        Lower triangular matrix
 *
-                  CALL ZGEMM( 'No transpose', 'No transpose', M, K, N-K,
-     $                        ONE, C, LDC, V, LDV, ONE, WORK, LDWORK )
-               END IF
+         DO 50 J = 1, N
+            DO 40 I = J, M
+               A( I, J ) = A( I, J )*MUL
+   40       CONTINUE
+   50    CONTINUE
 *
-*              W := W * T  or  W * T**H
+      ELSE IF( ITYPE.EQ.2 ) THEN
 *
-               CALL ZTRMM( 'Right', 'Lower', TRANS, 'Non-unit', M, K,
-     $                     ONE, T, LDT, WORK, LDWORK )
+*        Upper triangular matrix
 *
-*              C := C - W * V**H
+         DO 70 J = 1, N
+            DO 60 I = 1, MIN( J, M )
+               A( I, J ) = A( I, J )*MUL
+   60       CONTINUE
+   70    CONTINUE
 *
-               IF( N.GT.K ) THEN
+      ELSE IF( ITYPE.EQ.3 ) THEN
 *
-*                 C1 := C1 - W * V1**H
+*        Upper Hessenberg matrix
 *
-                  CALL ZGEMM( 'No transpose', 'Conjugate transpose', M,
-     $                        N-K, K, -ONE, WORK, LDWORK, V, LDV, ONE,
-     $                        C, LDC )
-               END IF
+         DO 90 J = 1, N
+            DO 80 I = 1, MIN( J+1, M )
+               A( I, J ) = A( I, J )*MUL
+   80       CONTINUE
+   90    CONTINUE
 *
-*              W := W * V2**H
+      ELSE IF( ITYPE.EQ.4 ) THEN
 *
-               CALL ZTRMM( 'Right', 'Upper', 'Conjugate transpose',
-     $                     'Unit', M, K, ONE, V( N-K+1, 1 ), LDV, WORK,
-     $                     LDWORK )
+*        Lower half of a symmetric band matrix
 *
-*              C2 := C2 - W
+         K3 = KL + 1
+         K4 = N + 1
+         DO 110 J = 1, N
+            DO 100 I = 1, MIN( K3, K4-J )
+               A( I, J ) = A( I, J )*MUL
+  100       CONTINUE
+  110    CONTINUE
 *
-               DO 120 J = 1, K
-                  DO 110 I = 1, M
-                     C( I, N-K+J ) = C( I, N-K+J ) - WORK( I, J )
-  110             CONTINUE
-  120          CONTINUE
-            END IF
-         END IF
+      ELSE IF( ITYPE.EQ.5 ) THEN
 *
-      ELSE IF( LSAME( STOREV, 'R' ) ) THEN
+*        Upper half of a symmetric band matrix
 *
-         IF( LSAME( DIRECT, 'F' ) ) THEN
+         K1 = KU + 2
+         K3 = KU + 1
+         DO 130 J = 1, N
+            DO 120 I = MAX( K1-J, 1 ), K3
+               A( I, J ) = A( I, J )*MUL
+  120       CONTINUE
+  130    CONTINUE
 *
-*           Let  V =  ( V1  V2 )    (V1: first K columns)
-*           where  V1  is unit upper triangular.
+      ELSE IF( ITYPE.EQ.6 ) THEN
 *
-            IF( LSAME( SIDE, 'L' ) ) THEN
+*        Band matrix
 *
-*              Form  H * C  or  H**H * C  where  C = ( C1 )
-*                                                    ( C2 )
+         K1 = KL + KU + 2
+         K2 = KL + 1
+         K3 = 2*KL + KU + 1
+         K4 = KL + KU + 1 + M
+         DO 150 J = 1, N
+            DO 140 I = MAX( K1-J, K2 ), MIN( K3, K4-J )
+               A( I, J ) = A( I, J )*MUL
+  140       CONTINUE
+  150    CONTINUE
 *
-*              W := C**H * V**H  =  (C1**H * V1**H + C2**H * V2**H) (stored in WORK)
+      END IF
 *
-*              W := C1**H
+      IF( .NOT.DONE )
+     $   GO TO 10
 *
-               DO 130 J = 1, K
-                  CALL ZCOPY( N, C( J, 1 ), LDC, WORK( 1, J ), 1 )
-                  CALL ZLACGV( N, WORK( 1, J ), 1 )
-  130          CONTINUE
+      RETURN
 *
-*              W := W * V1**H
+*     End of ZLASCL
 *
-               CALL ZTRMM( 'Right', 'Upper', 'Conjugate transpose',
-     $                     'Unit', N, K, ONE, V, LDV, WORK, LDWORK )
-               IF( M.GT.K ) THEN
+      END
+*> \brief \b ZLASET initializes the off-diagonal elements and the diagonal elements of a matrix to given values.
 *
-*                 W := W + C2**H * V2**H
+*  =========== DOCUMENTATION ===========
 *
-                  CALL ZGEMM( 'Conjugate transpose',
-     $                        'Conjugate transpose', N, K, M-K, ONE,
-     $                        C( K+1, 1 ), LDC, V( 1, K+1 ), LDV, ONE,
-     $                        WORK, LDWORK )
-               END IF
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
-*              W := W * T**H  or  W * T
+*> \htmlonly
+*> Download ZLASET + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/zlaset.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/zlaset.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/zlaset.f">
+*> [TXT]</a>
+*> \endhtmlonly
 *
-               CALL ZTRMM( 'Right', 'Upper', TRANST, 'Non-unit', N, K,
-     $                     ONE, T, LDT, WORK, LDWORK )
+*  Definition:
+*  ===========
 *
-*              C := C - V**H * W**H
+*       SUBROUTINE ZLASET( UPLO, M, N, ALPHA, BETA, A, LDA )
 *
-               IF( M.GT.K ) THEN
+*       .. Scalar Arguments ..
+*       CHARACTER          UPLO
+*       INTEGER            LDA, M, N
+*       COMPLEX*16         ALPHA, BETA
+*       ..
+*       .. Array Arguments ..
+*       COMPLEX*16         A( LDA, * )
+*       ..
 *
-*                 C2 := C2 - V2**H * W**H
 *
-                  CALL ZGEMM( 'Conjugate transpose',
-     $                        'Conjugate transpose', M-K, N, K, -ONE,
-     $                        V( 1, K+1 ), LDV, WORK, LDWORK, ONE,
-     $                        C( K+1, 1 ), LDC )
-               END IF
+*> \par Purpose:
+*  =============
+*>
+*> \verbatim
+*>
+*> ZLASET initializes a 2-D array A to BETA on the diagonal and
+*> ALPHA on the offdiagonals.
+*> \endverbatim
 *
-*              W := W * V1
+*  Arguments:
+*  ==========
 *
-               CALL ZTRMM( 'Right', 'Upper', 'No transpose', 'Unit', N,
-     $                     K, ONE, V, LDV, WORK, LDWORK )
+*> \param[in] UPLO
+*> \verbatim
+*>          UPLO is CHARACTER*1
+*>          Specifies the part of the matrix A to be set.
+*>          = 'U':      Upper triangular part is set. The lower triangle
+*>                      is unchanged.
+*>          = 'L':      Lower triangular part is set. The upper triangle
+*>                      is unchanged.
+*>          Otherwise:  All of the matrix A is set.
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*>          M is INTEGER
+*>          On entry, M specifies the number of rows of A.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*>          N is INTEGER
+*>          On entry, N specifies the number of columns of A.
+*> \endverbatim
+*>
+*> \param[in] ALPHA
+*> \verbatim
+*>          ALPHA is COMPLEX*16
+*>          All the offdiagonal array elements are set to ALPHA.
+*> \endverbatim
+*>
+*> \param[in] BETA
+*> \verbatim
+*>          BETA is COMPLEX*16
+*>          All the diagonal array elements are set to BETA.
+*> \endverbatim
+*>
+*> \param[out] A
+*> \verbatim
+*>          A is COMPLEX*16 array, dimension (LDA,N)
+*>          On entry, the m by n matrix A.
+*>          On exit, A(i,j) = ALPHA, 1 <= i <= m, 1 <= j <= n, i.ne.j;
+*>                   A(i,i) = BETA , 1 <= i <= min(m,n)
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*>          LDA is INTEGER
+*>          The leading dimension of the array A.  LDA >= max(1,M).
+*> \endverbatim
 *
-*              C1 := C1 - W**H
+*  Authors:
+*  ========
 *
-               DO 150 J = 1, K
-                  DO 140 I = 1, N
-                     C( J, I ) = C( J, I ) - DCONJG( WORK( I, J ) )
-  140             CONTINUE
-  150          CONTINUE
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-            ELSE IF( LSAME( SIDE, 'R' ) ) THEN
+*> \date December 2016
 *
-*              Form  C * H  or  C * H**H  where  C = ( C1  C2 )
+*> \ingroup complex16OTHERauxiliary
 *
-*              W := C * V**H  =  (C1*V1**H + C2*V2**H)  (stored in WORK)
+*  =====================================================================
+      SUBROUTINE ZLASET( UPLO, M, N, ALPHA, BETA, A, LDA )
 *
-*              W := C1
+*  -- LAPACK auxiliary routine (version 3.7.0) --
+*  -- LAPACK is a software package provided by Univ. of Tennessee,    --
+*  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+*     December 2016
 *
-               DO 160 J = 1, K
-                  CALL ZCOPY( M, C( 1, J ), 1, WORK( 1, J ), 1 )
-  160          CONTINUE
+*     .. Scalar Arguments ..
+      CHARACTER          UPLO
+      INTEGER            LDA, M, N
+      COMPLEX*16         ALPHA, BETA
+*     ..
+*     .. Array Arguments ..
+      COMPLEX*16         A( LDA, * )
+*     ..
 *
-*              W := W * V1**H
+*  =====================================================================
 *
-               CALL ZTRMM( 'Right', 'Upper', 'Conjugate transpose',
-     $                     'Unit', M, K, ONE, V, LDV, WORK, LDWORK )
-               IF( N.GT.K ) THEN
+*     .. Local Scalars ..
+      INTEGER            I, J
+*     ..
+*     .. External Functions ..
+      LOGICAL            LSAME
+      EXTERNAL           LSAME
+*     ..
+*     .. Intrinsic Functions ..
+      INTRINSIC          MIN
+*     ..
+*     .. Executable Statements ..
 *
-*                 W := W + C2 * V2**H
+      IF( LSAME( UPLO, 'U' ) ) THEN
 *
-                  CALL ZGEMM( 'No transpose', 'Conjugate transpose', M,
-     $                        K, N-K, ONE, C( 1, K+1 ), LDC,
-     $                        V( 1, K+1 ), LDV, ONE, WORK, LDWORK )
-               END IF
+*        Set the diagonal to BETA and the strictly upper triangular
+*        part of the array to ALPHA.
 *
-*              W := W * T  or  W * T**H
+         DO 20 J = 2, N
+            DO 10 I = 1, MIN( J-1, M )
+               A( I, J ) = ALPHA
+   10       CONTINUE
+   20    CONTINUE
+         DO 30 I = 1, MIN( N, M )
+            A( I, I ) = BETA
+   30    CONTINUE
 *
-               CALL ZTRMM( 'Right', 'Upper', TRANS, 'Non-unit', M, K,
-     $                     ONE, T, LDT, WORK, LDWORK )
+      ELSE IF( LSAME( UPLO, 'L' ) ) THEN
 *
-*              C := C - W * V
+*        Set the diagonal to BETA and the strictly lower triangular
+*        part of the array to ALPHA.
 *
-               IF( N.GT.K ) THEN
+         DO 50 J = 1, MIN( M, N )
+            DO 40 I = J + 1, M
+               A( I, J ) = ALPHA
+   40       CONTINUE
+   50    CONTINUE
+         DO 60 I = 1, MIN( N, M )
+            A( I, I ) = BETA
+   60    CONTINUE
 *
-*                 C2 := C2 - W * V2
+      ELSE
 *
-                  CALL ZGEMM( 'No transpose', 'No transpose', M, N-K, K,
-     $                        -ONE, WORK, LDWORK, V( 1, K+1 ), LDV, ONE,
-     $                        C( 1, K+1 ), LDC )
-               END IF
+*        Set the array to BETA on the diagonal and ALPHA on the
+*        offdiagonal.
 *
-*              W := W * V1
+         DO 80 J = 1, N
+            DO 70 I = 1, M
+               A( I, J ) = ALPHA
+   70       CONTINUE
+   80    CONTINUE
+         DO 90 I = 1, MIN( M, N )
+            A( I, I ) = BETA
+   90    CONTINUE
+      END IF
 *
-               CALL ZTRMM( 'Right', 'Upper', 'No transpose', 'Unit', M,
-     $                     K, ONE, V, LDV, WORK, LDWORK )
+      RETURN
 *
-*              C1 := C1 - W
+*     End of ZLASET
 *
-               DO 180 J = 1, K
-                  DO 170 I = 1, M
-                     C( I, J ) = C( I, J ) - WORK( I, J )
-  170             CONTINUE
-  180          CONTINUE
+      END
+*> \brief \b ZLASR applies a sequence of plane rotations to a general rectangular matrix.
 *
-            END IF
+*  =========== DOCUMENTATION ===========
 *
-         ELSE
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
-*           Let  V =  ( V1  V2 )    (V2: last K columns)
-*           where  V2  is unit lower triangular.
+*> \htmlonly
+*> Download ZLASR + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/zlasr.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/zlasr.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/zlasr.f">
+*> [TXT]</a>
+*> \endhtmlonly
 *
-            IF( LSAME( SIDE, 'L' ) ) THEN
+*  Definition:
+*  ===========
 *
-*              Form  H * C  or  H**H * C  where  C = ( C1 )
-*                                                    ( C2 )
+*       SUBROUTINE ZLASR( SIDE, PIVOT, DIRECT, M, N, C, S, A, LDA )
 *
-*              W := C**H * V**H  =  (C1**H * V1**H + C2**H * V2**H) (stored in WORK)
+*       .. Scalar Arguments ..
+*       CHARACTER          DIRECT, PIVOT, SIDE
+*       INTEGER            LDA, M, N
+*       ..
+*       .. Array Arguments ..
+*       DOUBLE PRECISION   C( * ), S( * )
+*       COMPLEX*16         A( LDA, * )
+*       ..
 *
-*              W := C2**H
 *
-               DO 190 J = 1, K
-                  CALL ZCOPY( N, C( M-K+J, 1 ), LDC, WORK( 1, J ), 1 )
-                  CALL ZLACGV( N, WORK( 1, J ), 1 )
-  190          CONTINUE
+*> \par Purpose:
+*  =============
+*>
+*> \verbatim
+*>
+*> ZLASR applies a sequence of real plane rotations to a complex matrix
+*> A, from either the left or the right.
+*>
+*> When SIDE = 'L', the transformation takes the form
+*>
+*>    A := P*A
+*>
+*> and when SIDE = 'R', the transformation takes the form
+*>
+*>    A := A*P**T
+*>
+*> where P is an orthogonal matrix consisting of a sequence of z plane
+*> rotations, with z = M when SIDE = 'L' and z = N when SIDE = 'R',
+*> and P**T is the transpose of P.
+*>
+*> When DIRECT = 'F' (Forward sequence), then
+*>
+*>    P = P(z-1) * ... * P(2) * P(1)
+*>
+*> and when DIRECT = 'B' (Backward sequence), then
+*>
+*>    P = P(1) * P(2) * ... * P(z-1)
+*>
+*> where P(k) is a plane rotation matrix defined by the 2-by-2 rotation
+*>
+*>    R(k) = (  c(k)  s(k) )
+*>         = ( -s(k)  c(k) ).
+*>
+*> When PIVOT = 'V' (Variable pivot), the rotation is performed
+*> for the plane (k,k+1), i.e., P(k) has the form
+*>
+*>    P(k) = (  1                                            )
+*>           (       ...                                     )
+*>           (              1                                )
+*>           (                   c(k)  s(k)                  )
+*>           (                  -s(k)  c(k)                  )
+*>           (                                1              )
+*>           (                                     ...       )
+*>           (                                            1  )
+*>
+*> where R(k) appears as a rank-2 modification to the identity matrix in
+*> rows and columns k and k+1.
+*>
+*> When PIVOT = 'T' (Top pivot), the rotation is performed for the
+*> plane (1,k+1), so P(k) has the form
+*>
+*>    P(k) = (  c(k)                    s(k)                 )
+*>           (         1                                     )
+*>           (              ...                              )
+*>           (                     1                         )
+*>           ( -s(k)                    c(k)                 )
+*>           (                                 1             )
+*>           (                                      ...      )
+*>           (                                             1 )
+*>
+*> where R(k) appears in rows and columns 1 and k+1.
+*>
+*> Similarly, when PIVOT = 'B' (Bottom pivot), the rotation is
+*> performed for the plane (k,z), giving P(k) the form
+*>
+*>    P(k) = ( 1                                             )
+*>           (      ...                                      )
+*>           (             1                                 )
+*>           (                  c(k)                    s(k) )
+*>           (                         1                     )
+*>           (                              ...              )
+*>           (                                     1         )
+*>           (                 -s(k)                    c(k) )
+*>
+*> where R(k) appears in rows and columns k and z.  The rotations are
+*> performed without ever forming P(k) explicitly.
+*> \endverbatim
 *
-*              W := W * V2**H
+*  Arguments:
+*  ==========
 *
-               CALL ZTRMM( 'Right', 'Lower', 'Conjugate transpose',
-     $                     'Unit', N, K, ONE, V( 1, M-K+1 ), LDV, WORK,
-     $                     LDWORK )
-               IF( M.GT.K ) THEN
+*> \param[in] SIDE
+*> \verbatim
+*>          SIDE is CHARACTER*1
+*>          Specifies whether the plane rotation matrix P is applied to
+*>          A on the left or the right.
+*>          = 'L':  Left, compute A := P*A
+*>          = 'R':  Right, compute A:= A*P**T
+*> \endverbatim
+*>
+*> \param[in] PIVOT
+*> \verbatim
+*>          PIVOT is CHARACTER*1
+*>          Specifies the plane for which P(k) is a plane rotation
+*>          matrix.
+*>          = 'V':  Variable pivot, the plane (k,k+1)
+*>          = 'T':  Top pivot, the plane (1,k+1)
+*>          = 'B':  Bottom pivot, the plane (k,z)
+*> \endverbatim
+*>
+*> \param[in] DIRECT
+*> \verbatim
+*>          DIRECT is CHARACTER*1
+*>          Specifies whether P is a forward or backward sequence of
+*>          plane rotations.
+*>          = 'F':  Forward, P = P(z-1)*...*P(2)*P(1)
+*>          = 'B':  Backward, P = P(1)*P(2)*...*P(z-1)
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*>          M is INTEGER
+*>          The number of rows of the matrix A.  If m <= 1, an immediate
+*>          return is effected.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*>          N is INTEGER
+*>          The number of columns of the matrix A.  If n <= 1, an
+*>          immediate return is effected.
+*> \endverbatim
+*>
+*> \param[in] C
+*> \verbatim
+*>          C is DOUBLE PRECISION array, dimension
+*>                  (M-1) if SIDE = 'L'
+*>                  (N-1) if SIDE = 'R'
+*>          The cosines c(k) of the plane rotations.
+*> \endverbatim
+*>
+*> \param[in] S
+*> \verbatim
+*>          S is DOUBLE PRECISION array, dimension
+*>                  (M-1) if SIDE = 'L'
+*>                  (N-1) if SIDE = 'R'
+*>          The sines s(k) of the plane rotations.  The 2-by-2 plane
+*>          rotation part of the matrix P(k), R(k), has the form
+*>          R(k) = (  c(k)  s(k) )
+*>                 ( -s(k)  c(k) ).
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*>          A is COMPLEX*16 array, dimension (LDA,N)
+*>          The M-by-N matrix A.  On exit, A is overwritten by P*A if
+*>          SIDE = 'R' or by A*P**T if SIDE = 'L'.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*>          LDA is INTEGER
+*>          The leading dimension of the array A.  LDA >= max(1,M).
+*> \endverbatim
 *
-*                 W := W + C1**H * V1**H
+*  Authors:
+*  ========
 *
-                  CALL ZGEMM( 'Conjugate transpose',
-     $                        'Conjugate transpose', N, K, M-K, ONE, C,
-     $                        LDC, V, LDV, ONE, WORK, LDWORK )
-               END IF
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*              W := W * T**H  or  W * T
+*> \date December 2016
 *
-               CALL ZTRMM( 'Right', 'Lower', TRANST, 'Non-unit', N, K,
-     $                     ONE, T, LDT, WORK, LDWORK )
+*> \ingroup complex16OTHERauxiliary
 *
-*              C := C - V**H * W**H
+*  =====================================================================
+      SUBROUTINE ZLASR( SIDE, PIVOT, DIRECT, M, N, C, S, A, LDA )
 *
-               IF( M.GT.K ) THEN
+*  -- LAPACK auxiliary routine (version 3.7.0) --
+*  -- LAPACK is a software package provided by Univ. of Tennessee,    --
+*  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+*     December 2016
 *
-*                 C1 := C1 - V1**H * W**H
+*     .. Scalar Arguments ..
+      CHARACTER          DIRECT, PIVOT, SIDE
+      INTEGER            LDA, M, N
+*     ..
+*     .. Array Arguments ..
+      DOUBLE PRECISION   C( * ), S( * )
+      COMPLEX*16         A( LDA, * )
+*     ..
 *
-                  CALL ZGEMM( 'Conjugate transpose',
-     $                        'Conjugate transpose', M-K, N, K, -ONE, V,
-     $                        LDV, WORK, LDWORK, ONE, C, LDC )
-               END IF
+*  =====================================================================
 *
-*              W := W * V2
+*     .. Parameters ..
+      DOUBLE PRECISION   ONE, ZERO
+      PARAMETER          ( ONE = 1.0D+0, ZERO = 0.0D+0 )
+*     ..
+*     .. Local Scalars ..
+      INTEGER            I, INFO, J
+      DOUBLE PRECISION   CTEMP, STEMP
+      COMPLEX*16         TEMP
+*     ..
+*     .. Intrinsic Functions ..
+      INTRINSIC          MAX
+*     ..
+*     .. External Functions ..
+      LOGICAL            LSAME
+      EXTERNAL           LSAME
+*     ..
+*     .. External Subroutines ..
+      EXTERNAL           XERBLA
+*     ..
+*     .. Executable Statements ..
 *
-               CALL ZTRMM( 'Right', 'Lower', 'No transpose', 'Unit', N,
-     $                     K, ONE, V( 1, M-K+1 ), LDV, WORK, LDWORK )
+*     Test the input parameters
 *
-*              C2 := C2 - W**H
+      INFO = 0
+      IF( .NOT.( LSAME( SIDE, 'L' ) .OR. LSAME( SIDE, 'R' ) ) ) THEN
+         INFO = 1
+      ELSE IF( .NOT.( LSAME( PIVOT, 'V' ) .OR. LSAME( PIVOT,
+     $         'T' ) .OR. LSAME( PIVOT, 'B' ) ) ) THEN
+         INFO = 2
+      ELSE IF( .NOT.( LSAME( DIRECT, 'F' ) .OR. LSAME( DIRECT, 'B' ) ) )
+     $          THEN
+         INFO = 3
+      ELSE IF( M.LT.0 ) THEN
+         INFO = 4
+      ELSE IF( N.LT.0 ) THEN
+         INFO = 5
+      ELSE IF( LDA.LT.MAX( 1, M ) ) THEN
+         INFO = 9
+      END IF
+      IF( INFO.NE.0 ) THEN
+         CALL XERBLA( 'ZLASR ', INFO )
+         RETURN
+      END IF
 *
-               DO 210 J = 1, K
-                  DO 200 I = 1, N
-                     C( M-K+J, I ) = C( M-K+J, I ) -
-     $                               DCONJG( WORK( I, J ) )
-  200             CONTINUE
-  210          CONTINUE
+*     Quick return if possible
 *
-            ELSE IF( LSAME( SIDE, 'R' ) ) THEN
+      IF( ( M.EQ.0 ) .OR. ( N.EQ.0 ) )
+     $   RETURN
+      IF( LSAME( SIDE, 'L' ) ) THEN
 *
-*              Form  C * H  or  C * H**H  where  C = ( C1  C2 )
+*        Form  P * A
 *
-*              W := C * V**H  =  (C1*V1**H + C2*V2**H)  (stored in WORK)
+         IF( LSAME( PIVOT, 'V' ) ) THEN
+            IF( LSAME( DIRECT, 'F' ) ) THEN
+               DO 20 J = 1, M - 1
+                  CTEMP = C( J )
+                  STEMP = S( J )
+                  IF( ( CTEMP.NE.ONE ) .OR. ( STEMP.NE.ZERO ) ) THEN
+                     DO 10 I = 1, N
+                        TEMP = A( J+1, I )
+                        A( J+1, I ) = CTEMP*TEMP - STEMP*A( J, I )
+                        A( J, I ) = STEMP*TEMP + CTEMP*A( J, I )
+   10                CONTINUE
+                  END IF
+   20          CONTINUE
+            ELSE IF( LSAME( DIRECT, 'B' ) ) THEN
+               DO 40 J = M - 1, 1, -1
+                  CTEMP = C( J )
+                  STEMP = S( J )
+                  IF( ( CTEMP.NE.ONE ) .OR. ( STEMP.NE.ZERO ) ) THEN
+                     DO 30 I = 1, N
+                        TEMP = A( J+1, I )
+                        A( J+1, I ) = CTEMP*TEMP - STEMP*A( J, I )
+                        A( J, I ) = STEMP*TEMP + CTEMP*A( J, I )
+   30                CONTINUE
+                  END IF
+   40          CONTINUE
+            END IF
+         ELSE IF( LSAME( PIVOT, 'T' ) ) THEN
+            IF( LSAME( DIRECT, 'F' ) ) THEN
+               DO 60 J = 2, M
+                  CTEMP = C( J-1 )
+                  STEMP = S( J-1 )
+                  IF( ( CTEMP.NE.ONE ) .OR. ( STEMP.NE.ZERO ) ) THEN
+                     DO 50 I = 1, N
+                        TEMP = A( J, I )
+                        A( J, I ) = CTEMP*TEMP - STEMP*A( 1, I )
+                        A( 1, I ) = STEMP*TEMP + CTEMP*A( 1, I )
+   50                CONTINUE
+                  END IF
+   60          CONTINUE
+            ELSE IF( LSAME( DIRECT, 'B' ) ) THEN
+               DO 80 J = M, 2, -1
+                  CTEMP = C( J-1 )
+                  STEMP = S( J-1 )
+                  IF( ( CTEMP.NE.ONE ) .OR. ( STEMP.NE.ZERO ) ) THEN
+                     DO 70 I = 1, N
+                        TEMP = A( J, I )
+                        A( J, I ) = CTEMP*TEMP - STEMP*A( 1, I )
+                        A( 1, I ) = STEMP*TEMP + CTEMP*A( 1, I )
+   70                CONTINUE
+                  END IF
+   80          CONTINUE
+            END IF
+         ELSE IF( LSAME( PIVOT, 'B' ) ) THEN
+            IF( LSAME( DIRECT, 'F' ) ) THEN
+               DO 100 J = 1, M - 1
+                  CTEMP = C( J )
+                  STEMP = S( J )
+                  IF( ( CTEMP.NE.ONE ) .OR. ( STEMP.NE.ZERO ) ) THEN
+                     DO 90 I = 1, N
+                        TEMP = A( J, I )
+                        A( J, I ) = STEMP*A( M, I ) + CTEMP*TEMP
+                        A( M, I ) = CTEMP*A( M, I ) - STEMP*TEMP
+   90                CONTINUE
+                  END IF
+  100          CONTINUE
+            ELSE IF( LSAME( DIRECT, 'B' ) ) THEN
+               DO 120 J = M - 1, 1, -1
+                  CTEMP = C( J )
+                  STEMP = S( J )
+                  IF( ( CTEMP.NE.ONE ) .OR. ( STEMP.NE.ZERO ) ) THEN
+                     DO 110 I = 1, N
+                        TEMP = A( J, I )
+                        A( J, I ) = STEMP*A( M, I ) + CTEMP*TEMP
+                        A( M, I ) = CTEMP*A( M, I ) - STEMP*TEMP
+  110                CONTINUE
+                  END IF
+  120          CONTINUE
+            END IF
+         END IF
+      ELSE IF( LSAME( SIDE, 'R' ) ) THEN
 *
-*              W := C2
+*        Form A * P**T
 *
-               DO 220 J = 1, K
-                  CALL ZCOPY( M, C( 1, N-K+J ), 1, WORK( 1, J ), 1 )
+         IF( LSAME( PIVOT, 'V' ) ) THEN
+            IF( LSAME( DIRECT, 'F' ) ) THEN
+               DO 140 J = 1, N - 1
+                  CTEMP = C( J )
+                  STEMP = S( J )
+                  IF( ( CTEMP.NE.ONE ) .OR. ( STEMP.NE.ZERO ) ) THEN
+                     DO 130 I = 1, M
+                        TEMP = A( I, J+1 )
+                        A( I, J+1 ) = CTEMP*TEMP - STEMP*A( I, J )
+                        A( I, J ) = STEMP*TEMP + CTEMP*A( I, J )
+  130                CONTINUE
+                  END IF
+  140          CONTINUE
+            ELSE IF( LSAME( DIRECT, 'B' ) ) THEN
+               DO 160 J = N - 1, 1, -1
+                  CTEMP = C( J )
+                  STEMP = S( J )
+                  IF( ( CTEMP.NE.ONE ) .OR. ( STEMP.NE.ZERO ) ) THEN
+                     DO 150 I = 1, M
+                        TEMP = A( I, J+1 )
+                        A( I, J+1 ) = CTEMP*TEMP - STEMP*A( I, J )
+                        A( I, J ) = STEMP*TEMP + CTEMP*A( I, J )
+  150                CONTINUE
+                  END IF
+  160          CONTINUE
+            END IF
+         ELSE IF( LSAME( PIVOT, 'T' ) ) THEN
+            IF( LSAME( DIRECT, 'F' ) ) THEN
+               DO 180 J = 2, N
+                  CTEMP = C( J-1 )
+                  STEMP = S( J-1 )
+                  IF( ( CTEMP.NE.ONE ) .OR. ( STEMP.NE.ZERO ) ) THEN
+                     DO 170 I = 1, M
+                        TEMP = A( I, J )
+                        A( I, J ) = CTEMP*TEMP - STEMP*A( I, 1 )
+                        A( I, 1 ) = STEMP*TEMP + CTEMP*A( I, 1 )
+  170                CONTINUE
+                  END IF
+  180          CONTINUE
+            ELSE IF( LSAME( DIRECT, 'B' ) ) THEN
+               DO 200 J = N, 2, -1
+                  CTEMP = C( J-1 )
+                  STEMP = S( J-1 )
+                  IF( ( CTEMP.NE.ONE ) .OR. ( STEMP.NE.ZERO ) ) THEN
+                     DO 190 I = 1, M
+                        TEMP = A( I, J )
+                        A( I, J ) = CTEMP*TEMP - STEMP*A( I, 1 )
+                        A( I, 1 ) = STEMP*TEMP + CTEMP*A( I, 1 )
+  190                CONTINUE
+                  END IF
+  200          CONTINUE
+            END IF
+         ELSE IF( LSAME( PIVOT, 'B' ) ) THEN
+            IF( LSAME( DIRECT, 'F' ) ) THEN
+               DO 220 J = 1, N - 1
+                  CTEMP = C( J )
+                  STEMP = S( J )
+                  IF( ( CTEMP.NE.ONE ) .OR. ( STEMP.NE.ZERO ) ) THEN
+                     DO 210 I = 1, M
+                        TEMP = A( I, J )
+                        A( I, J ) = STEMP*A( I, N ) + CTEMP*TEMP
+                        A( I, N ) = CTEMP*A( I, N ) - STEMP*TEMP
+  210                CONTINUE
+                  END IF
   220          CONTINUE
-*
-*              W := W * V2**H
-*
-               CALL ZTRMM( 'Right', 'Lower', 'Conjugate transpose',
-     $                     'Unit', M, K, ONE, V( 1, N-K+1 ), LDV, WORK,
-     $                     LDWORK )
-               IF( N.GT.K ) THEN
-*
-*                 W := W + C1 * V1**H
-*
-                  CALL ZGEMM( 'No transpose', 'Conjugate transpose', M,
-     $                        K, N-K, ONE, C, LDC, V, LDV, ONE, WORK,
-     $                        LDWORK )
-               END IF
-*
-*              W := W * T  or  W * T**H
-*
-               CALL ZTRMM( 'Right', 'Lower', TRANS, 'Non-unit', M, K,
-     $                     ONE, T, LDT, WORK, LDWORK )
-*
-*              C := C - W * V
-*
-               IF( N.GT.K ) THEN
-*
-*                 C1 := C1 - W * V1
-*
-                  CALL ZGEMM( 'No transpose', 'No transpose', M, N-K, K,
-     $                        -ONE, WORK, LDWORK, V, LDV, ONE, C, LDC )
-               END IF
-*
-*              W := W * V2
-*
-               CALL ZTRMM( 'Right', 'Lower', 'No transpose', 'Unit', M,
-     $                     K, ONE, V( 1, N-K+1 ), LDV, WORK, LDWORK )
-*
-*              C1 := C1 - W
-*
-               DO 240 J = 1, K
-                  DO 230 I = 1, M
-                     C( I, N-K+J ) = C( I, N-K+J ) - WORK( I, J )
-  230             CONTINUE
+            ELSE IF( LSAME( DIRECT, 'B' ) ) THEN
+               DO 240 J = N - 1, 1, -1
+                  CTEMP = C( J )
+                  STEMP = S( J )
+                  IF( ( CTEMP.NE.ONE ) .OR. ( STEMP.NE.ZERO ) ) THEN
+                     DO 230 I = 1, M
+                        TEMP = A( I, J )
+                        A( I, J ) = STEMP*A( I, N ) + CTEMP*TEMP
+                        A( I, N ) = CTEMP*A( I, N ) - STEMP*TEMP
+  230                CONTINUE
+                  END IF
   240          CONTINUE
-*
             END IF
-*
          END IF
       END IF
 *
       RETURN
 *
-*     End of ZLARFB
+*     End of ZLASR
 *
       END
-*> \brief \b ZLARFG generates an elementary reflector (Householder matrix).
+*> \brief \b ZLASSQ updates a sum of squares represented in scaled form.
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download ZLARFG + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/zlarfg.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/zlarfg.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/zlarfg.f"> 
+*> Download ZLASSQ + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/zlassq.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/zlassq.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/zlassq.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
-*       SUBROUTINE ZLARFG( N, ALPHA, X, INCX, TAU )
-* 
+*       SUBROUTINE ZLASSQ( N, X, INCX, SCALE, SUMSQ )
+*
 *       .. Scalar Arguments ..
 *       INTEGER            INCX, N
-*       COMPLEX*16         ALPHA, TAU
+*       DOUBLE PRECISION   SCALE, SUMSQ
 *       ..
 *       .. Array Arguments ..
 *       COMPLEX*16         X( * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
 *>
 *> \verbatim
 *>
-*> ZLARFG generates a complex elementary reflector H of order n, such
-*> that
+*> ZLASSQ returns the values scl and ssq such that
 *>
-*>       H**H * ( alpha ) = ( beta ),   H**H * H = I.
-*>              (   x   )   (   0  )
+*>    ( scl**2 )*ssq = x( 1 )**2 +...+ x( n )**2 + ( scale**2 )*sumsq,
 *>
-*> where alpha and beta are scalars, with beta real, and x is an
-*> (n-1)-element complex vector. H is represented in the form
+*> where x( i ) = abs( X( 1 + ( i - 1 )*INCX ) ). The value of sumsq is
+*> assumed to be at least unity and the value of ssq will then satisfy
 *>
-*>       H = I - tau * ( 1 ) * ( 1 v**H ) ,
-*>                     ( v )
+*>    1.0 .le. ssq .le. ( sumsq + 2*n ).
 *>
-*> where tau is a complex scalar and v is a complex (n-1)-element
-*> vector. Note that H is not hermitian.
+*> scale is assumed to be non-negative and scl returns the value
 *>
-*> If the elements of x are all zero and alpha is real, then tau = 0
-*> and H is taken to be the unit matrix.
+*>    scl = max( scale, abs( real( x( i ) ) ), abs( aimag( x( i ) ) ) ),
+*>           i
 *>
-*> Otherwise  1 <= real(tau) <= 2  and  abs(tau-1) <= 1 .
+*> scale and sumsq must be supplied in SCALE and SUMSQ respectively.
+*> SCALE and SUMSQ are overwritten by scl and ssq respectively.
+*>
+*> The routine makes only one pass through the vector X.
 *> \endverbatim
 *
 *  Arguments:
@@ -20200,1261 +36390,1976 @@
 *> \param[in] N
 *> \verbatim
 *>          N is INTEGER
-*>          The order of the elementary reflector.
+*>          The number of elements to be used from the vector X.
 *> \endverbatim
 *>
-*> \param[in,out] ALPHA
+*> \param[in] X
 *> \verbatim
-*>          ALPHA is COMPLEX*16
-*>          On entry, the value alpha.
-*>          On exit, it is overwritten with the value beta.
+*>          X is COMPLEX*16 array, dimension (N)
+*>          The vector x as described above.
+*>             x( i )  = X( 1 + ( i - 1 )*INCX ), 1 <= i <= n.
 *> \endverbatim
 *>
-*> \param[in,out] X
+*> \param[in] INCX
 *> \verbatim
-*>          X is COMPLEX*16 array, dimension
-*>                         (1+(N-2)*abs(INCX))
-*>          On entry, the vector x.
-*>          On exit, it is overwritten with the vector v.
+*>          INCX is INTEGER
+*>          The increment between successive values of the vector X.
+*>          INCX > 0.
 *> \endverbatim
 *>
-*> \param[in] INCX
+*> \param[in,out] SCALE
 *> \verbatim
-*>          INCX is INTEGER
-*>          The increment between elements of X. INCX > 0.
+*>          SCALE is DOUBLE PRECISION
+*>          On entry, the value  scale  in the equation above.
+*>          On exit, SCALE is overwritten with the value  scl .
 *> \endverbatim
 *>
-*> \param[out] TAU
+*> \param[in,out] SUMSQ
 *> \verbatim
-*>          TAU is COMPLEX*16
-*>          The value tau.
+*>          SUMSQ is DOUBLE PRECISION
+*>          On entry, the value  sumsq  in the equation above.
+*>          On exit, SUMSQ is overwritten with the value  ssq .
 *> \endverbatim
 *
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date September 2012
+*> \date December 2016
 *
 *> \ingroup complex16OTHERauxiliary
 *
 *  =====================================================================
-      SUBROUTINE ZLARFG( N, ALPHA, X, INCX, TAU )
+      SUBROUTINE ZLASSQ( N, X, INCX, SCALE, SUMSQ )
 *
-*  -- LAPACK auxiliary routine (version 3.4.2) --
+*  -- LAPACK auxiliary routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     September 2012
+*     December 2016
 *
 *     .. Scalar Arguments ..
       INTEGER            INCX, N
-      COMPLEX*16         ALPHA, TAU
+      DOUBLE PRECISION   SCALE, SUMSQ
 *     ..
 *     .. Array Arguments ..
       COMPLEX*16         X( * )
 *     ..
 *
-*  =====================================================================
+* =====================================================================
 *
 *     .. Parameters ..
-      DOUBLE PRECISION   ONE, ZERO
-      PARAMETER          ( ONE = 1.0D+0, ZERO = 0.0D+0 )
+      DOUBLE PRECISION   ZERO
+      PARAMETER          ( ZERO = 0.0D+0 )
 *     ..
 *     .. Local Scalars ..
-      INTEGER            J, KNT
-      DOUBLE PRECISION   ALPHI, ALPHR, BETA, RSAFMN, SAFMIN, XNORM
+      INTEGER            IX
+      DOUBLE PRECISION   TEMP1
 *     ..
 *     .. External Functions ..
-      DOUBLE PRECISION   DLAMCH, DLAPY3, DZNRM2
-      COMPLEX*16         ZLADIV
-      EXTERNAL           DLAMCH, DLAPY3, DZNRM2, ZLADIV
+      LOGICAL            DISNAN
+      EXTERNAL           DISNAN
 *     ..
 *     .. Intrinsic Functions ..
-      INTRINSIC          ABS, DBLE, DCMPLX, DIMAG, SIGN
-*     ..
-*     .. External Subroutines ..
-      EXTERNAL           ZDSCAL, ZSCAL
+      INTRINSIC          ABS, DBLE, DIMAG
 *     ..
 *     .. Executable Statements ..
 *
-      IF( N.LE.0 ) THEN
-         TAU = ZERO
-         RETURN
+      IF( N.GT.0 ) THEN
+         DO 10 IX = 1, 1 + ( N-1 )*INCX, INCX
+            TEMP1 = ABS( DBLE( X( IX ) ) )
+            IF( TEMP1.GT.ZERO.OR.DISNAN( TEMP1 ) ) THEN
+               IF( SCALE.LT.TEMP1 ) THEN
+                  SUMSQ = 1 + SUMSQ*( SCALE / TEMP1 )**2
+                  SCALE = TEMP1
+               ELSE
+                  SUMSQ = SUMSQ + ( TEMP1 / SCALE )**2
+               END IF
+            END IF
+            TEMP1 = ABS( DIMAG( X( IX ) ) )
+            IF( TEMP1.GT.ZERO.OR.DISNAN( TEMP1 ) ) THEN
+               IF( SCALE.LT.TEMP1 ) THEN
+                  SUMSQ = 1 + SUMSQ*( SCALE / TEMP1 )**2
+                  SCALE = TEMP1
+               ELSE
+                  SUMSQ = SUMSQ + ( TEMP1 / SCALE )**2
+               END IF
+            END IF
+   10    CONTINUE
       END IF
 *
-      XNORM = DZNRM2( N-1, X, INCX )
-      ALPHR = DBLE( ALPHA )
-      ALPHI = DIMAG( ALPHA )
+      RETURN
 *
-      IF( XNORM.EQ.ZERO .AND. ALPHI.EQ.ZERO ) THEN
+*     End of ZLASSQ
 *
-*        H  =  I
+      END
+*> \brief \b ZLASWP performs a series of row interchanges on a general rectangular matrix.
 *
-         TAU = ZERO
-      ELSE
+*  =========== DOCUMENTATION ===========
 *
-*        general case
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
-         BETA = -SIGN( DLAPY3( ALPHR, ALPHI, XNORM ), ALPHR )
-         SAFMIN = DLAMCH( 'S' ) / DLAMCH( 'E' )
-         RSAFMN = ONE / SAFMIN
+*> \htmlonly
+*> Download ZLASWP + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/zlaswp.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/zlaswp.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/zlaswp.f">
+*> [TXT]</a>
+*> \endhtmlonly
+*
+*  Definition:
+*  ===========
+*
+*       SUBROUTINE ZLASWP( N, A, LDA, K1, K2, IPIV, INCX )
+*
+*       .. Scalar Arguments ..
+*       INTEGER            INCX, K1, K2, LDA, N
+*       ..
+*       .. Array Arguments ..
+*       INTEGER            IPIV( * )
+*       COMPLEX*16         A( LDA, * )
+*       ..
+*
+*
+*> \par Purpose:
+*  =============
+*>
+*> \verbatim
+*>
+*> ZLASWP performs a series of row interchanges on the matrix A.
+*> One row interchange is initiated for each of rows K1 through K2 of A.
+*> \endverbatim
+*
+*  Arguments:
+*  ==========
+*
+*> \param[in] N
+*> \verbatim
+*>          N is INTEGER
+*>          The number of columns of the matrix A.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*>          A is COMPLEX*16 array, dimension (LDA,N)
+*>          On entry, the matrix of column dimension N to which the row
+*>          interchanges will be applied.
+*>          On exit, the permuted matrix.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*>          LDA is INTEGER
+*>          The leading dimension of the array A.
+*> \endverbatim
+*>
+*> \param[in] K1
+*> \verbatim
+*>          K1 is INTEGER
+*>          The first element of IPIV for which a row interchange will
+*>          be done.
+*> \endverbatim
+*>
+*> \param[in] K2
+*> \verbatim
+*>          K2 is INTEGER
+*>          (K2-K1+1) is the number of elements of IPIV for which a row
+*>          interchange will be done.
+*> \endverbatim
+*>
+*> \param[in] IPIV
+*> \verbatim
+*>          IPIV is INTEGER array, dimension (K1+(K2-K1)*abs(INCX))
+*>          The vector of pivot indices. Only the elements in positions
+*>          K1 through K1+(K2-K1)*INCX of IPIV are accessed.
+*>          IPIV(K) = L implies rows K and L are to be interchanged.
+*> \endverbatim
+*>
+*> \param[in] INCX
+*> \verbatim
+*>          INCX is INTEGER
+*>          The increment between successive values of IPIV.  If IPIV
+*>          is negative, the pivots are applied in reverse order.
+*> \endverbatim
+*
+*  Authors:
+*  ========
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date December 2016
+*
+*> \ingroup complex16OTHERauxiliary
 *
-         KNT = 0
-         IF( ABS( BETA ).LT.SAFMIN ) THEN
+*> \par Further Details:
+*  =====================
+*>
+*> \verbatim
+*>
+*>  Modified by
+*>   R. C. Whaley, Computer Science Dept., Univ. of Tenn., Knoxville, USA
+*> \endverbatim
+*>
+*  =====================================================================
+      SUBROUTINE ZLASWP( N, A, LDA, K1, K2, IPIV, INCX )
 *
-*           XNORM, BETA may be inaccurate; scale X and recompute them
+*  -- LAPACK auxiliary routine (version 3.7.0) --
+*  -- LAPACK is a software package provided by Univ. of Tennessee,    --
+*  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+*     December 2016
 *
-   10       CONTINUE
-            KNT = KNT + 1
-            CALL ZDSCAL( N-1, RSAFMN, X, INCX )
-            BETA = BETA*RSAFMN
-            ALPHI = ALPHI*RSAFMN
-            ALPHR = ALPHR*RSAFMN
-            IF( ABS( BETA ).LT.SAFMIN )
-     $         GO TO 10
+*     .. Scalar Arguments ..
+      INTEGER            INCX, K1, K2, LDA, N
+*     ..
+*     .. Array Arguments ..
+      INTEGER            IPIV( * )
+      COMPLEX*16         A( LDA, * )
+*     ..
 *
-*           New BETA is at most 1, at least SAFMIN
+* =====================================================================
 *
-            XNORM = DZNRM2( N-1, X, INCX )
-            ALPHA = DCMPLX( ALPHR, ALPHI )
-            BETA = -SIGN( DLAPY3( ALPHR, ALPHI, XNORM ), ALPHR )
-         END IF
-         TAU = DCMPLX( ( BETA-ALPHR ) / BETA, -ALPHI / BETA )
-         ALPHA = ZLADIV( DCMPLX( ONE ), ALPHA-BETA )
-         CALL ZSCAL( N-1, ALPHA, X, INCX )
+*     .. Local Scalars ..
+      INTEGER            I, I1, I2, INC, IP, IX, IX0, J, K, N32
+      COMPLEX*16         TEMP
+*     ..
+*     .. Executable Statements ..
 *
-*        If ALPHA is subnormal, it may lose relative accuracy
+*     Interchange row I with row IPIV(I) for each of rows K1 through K2.
 *
-         DO 20 J = 1, KNT
-            BETA = BETA*SAFMIN
- 20      CONTINUE
-         ALPHA = BETA
+      IF( INCX.GT.0 ) THEN
+         IX0 = K1
+         I1 = K1
+         I2 = K2
+         INC = 1
+      ELSE IF( INCX.LT.0 ) THEN
+         IX0 = K1 + ( K1-K2 )*INCX
+         I1 = K2
+         I2 = K1
+         INC = -1
+      ELSE
+         RETURN
+      END IF
+*
+      N32 = ( N / 32 )*32
+      IF( N32.NE.0 ) THEN
+         DO 30 J = 1, N32, 32
+            IX = IX0
+            DO 20 I = I1, I2, INC
+               IP = IPIV( IX )
+               IF( IP.NE.I ) THEN
+                  DO 10 K = J, J + 31
+                     TEMP = A( I, K )
+                     A( I, K ) = A( IP, K )
+                     A( IP, K ) = TEMP
+   10             CONTINUE
+               END IF
+               IX = IX + INCX
+   20       CONTINUE
+   30    CONTINUE
+      END IF
+      IF( N32.NE.N ) THEN
+         N32 = N32 + 1
+         IX = IX0
+         DO 50 I = I1, I2, INC
+            IP = IPIV( IX )
+            IF( IP.NE.I ) THEN
+               DO 40 K = N32, N
+                  TEMP = A( I, K )
+                  A( I, K ) = A( IP, K )
+                  A( IP, K ) = TEMP
+   40          CONTINUE
+            END IF
+            IX = IX + INCX
+   50    CONTINUE
       END IF
 *
       RETURN
 *
-*     End of ZLARFG
+*     End of ZLASWP
 *
       END
-*> \brief \b ZLARFT forms the triangular factor T of a block reflector H = I - vtvH
+*> \brief \b ZLASYF computes a partial factorization of a complex symmetric matrix using the Bunch-Kaufman diagonal pivoting method.
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download ZLARFT + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/zlarft.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/zlarft.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/zlarft.f"> 
+*> Download ZLASYF + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/zlasyf.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/zlasyf.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/zlasyf.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
-*       SUBROUTINE ZLARFT( DIRECT, STOREV, N, K, V, LDV, TAU, T, LDT )
-* 
+*       SUBROUTINE ZLASYF( UPLO, N, NB, KB, A, LDA, IPIV, W, LDW, INFO )
+*
 *       .. Scalar Arguments ..
-*       CHARACTER          DIRECT, STOREV
-*       INTEGER            K, LDT, LDV, N
+*       CHARACTER          UPLO
+*       INTEGER            INFO, KB, LDA, LDW, N, NB
 *       ..
 *       .. Array Arguments ..
-*       COMPLEX*16         T( LDT, * ), TAU( * ), V( LDV, * )
+*       INTEGER            IPIV( * )
+*       COMPLEX*16         A( LDA, * ), W( LDW, * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
 *>
 *> \verbatim
 *>
-*> ZLARFT forms the triangular factor T of a complex block reflector H
-*> of order n, which is defined as a product of k elementary reflectors.
-*>
-*> If DIRECT = 'F', H = H(1) H(2) . . . H(k) and T is upper triangular;
-*>
-*> If DIRECT = 'B', H = H(k) . . . H(2) H(1) and T is lower triangular.
+*> ZLASYF computes a partial factorization of a complex symmetric matrix
+*> A using the Bunch-Kaufman diagonal pivoting method. The partial
+*> factorization has the form:
 *>
-*> If STOREV = 'C', the vector which defines the elementary reflector
-*> H(i) is stored in the i-th column of the array V, and
+*> A  =  ( I  U12 ) ( A11  0  ) (  I       0    )  if UPLO = 'U', or:
+*>       ( 0  U22 ) (  0   D  ) ( U12**T U22**T )
 *>
-*>    H  =  I - V * T * V**H
+*> A  =  ( L11  0 ) ( D    0  ) ( L11**T L21**T )  if UPLO = 'L'
+*>       ( L21  I ) ( 0   A22 ) (  0       I    )
 *>
-*> If STOREV = 'R', the vector which defines the elementary reflector
-*> H(i) is stored in the i-th row of the array V, and
+*> where the order of D is at most NB. The actual order is returned in
+*> the argument KB, and is either NB or NB-1, or N if N <= NB.
+*> Note that U**T denotes the transpose of U.
 *>
-*>    H  =  I - V**H * T * V
+*> ZLASYF is an auxiliary routine called by ZSYTRF. It uses blocked code
+*> (calling Level 3 BLAS) to update the submatrix A11 (if UPLO = 'U') or
+*> A22 (if UPLO = 'L').
 *> \endverbatim
 *
 *  Arguments:
 *  ==========
 *
-*> \param[in] DIRECT
+*> \param[in] UPLO
 *> \verbatim
-*>          DIRECT is CHARACTER*1
-*>          Specifies the order in which the elementary reflectors are
-*>          multiplied to form the block reflector:
-*>          = 'F': H = H(1) H(2) . . . H(k) (Forward)
-*>          = 'B': H = H(k) . . . H(2) H(1) (Backward)
+*>          UPLO is CHARACTER*1
+*>          Specifies whether the upper or lower triangular part of the
+*>          symmetric matrix A is stored:
+*>          = 'U':  Upper triangular
+*>          = 'L':  Lower triangular
 *> \endverbatim
 *>
-*> \param[in] STOREV
+*> \param[in] N
 *> \verbatim
-*>          STOREV is CHARACTER*1
-*>          Specifies how the vectors which define the elementary
-*>          reflectors are stored (see also Further Details):
-*>          = 'C': columnwise
-*>          = 'R': rowwise
+*>          N is INTEGER
+*>          The order of the matrix A.  N >= 0.
 *> \endverbatim
 *>
-*> \param[in] N
+*> \param[in] NB
 *> \verbatim
-*>          N is INTEGER
-*>          The order of the block reflector H. N >= 0.
+*>          NB is INTEGER
+*>          The maximum number of columns of the matrix A that should be
+*>          factored.  NB should be at least 2 to allow for 2-by-2 pivot
+*>          blocks.
 *> \endverbatim
 *>
-*> \param[in] K
+*> \param[out] KB
 *> \verbatim
-*>          K is INTEGER
-*>          The order of the triangular factor T (= the number of
-*>          elementary reflectors). K >= 1.
+*>          KB is INTEGER
+*>          The number of columns of A that were actually factored.
+*>          KB is either NB-1 or NB, or N if N <= NB.
 *> \endverbatim
 *>
-*> \param[in] V
+*> \param[in,out] A
 *> \verbatim
-*>          V is COMPLEX*16 array, dimension
-*>                               (LDV,K) if STOREV = 'C'
-*>                               (LDV,N) if STOREV = 'R'
-*>          The matrix V. See further details.
+*>          A is COMPLEX*16 array, dimension (LDA,N)
+*>          On entry, the symmetric matrix A.  If UPLO = 'U', the leading
+*>          n-by-n upper triangular part of A contains the upper
+*>          triangular part of the matrix A, and the strictly lower
+*>          triangular part of A is not referenced.  If UPLO = 'L', the
+*>          leading n-by-n lower triangular part of A contains the lower
+*>          triangular part of the matrix A, and the strictly upper
+*>          triangular part of A is not referenced.
+*>          On exit, A contains details of the partial factorization.
 *> \endverbatim
 *>
-*> \param[in] LDV
+*> \param[in] LDA
 *> \verbatim
-*>          LDV is INTEGER
-*>          The leading dimension of the array V.
-*>          If STOREV = 'C', LDV >= max(1,N); if STOREV = 'R', LDV >= K.
+*>          LDA is INTEGER
+*>          The leading dimension of the array A.  LDA >= max(1,N).
 *> \endverbatim
 *>
-*> \param[in] TAU
+*> \param[out] IPIV
 *> \verbatim
-*>          TAU is COMPLEX*16 array, dimension (K)
-*>          TAU(i) must contain the scalar factor of the elementary
-*>          reflector H(i).
+*>          IPIV is INTEGER array, dimension (N)
+*>          Details of the interchanges and the block structure of D.
+*>
+*>          If UPLO = 'U':
+*>             Only the last KB elements of IPIV are set.
+*>
+*>             If IPIV(k) > 0, then rows and columns k and IPIV(k) were
+*>             interchanged and D(k,k) is a 1-by-1 diagonal block.
+*>
+*>             If IPIV(k) = IPIV(k-1) < 0, then rows and columns
+*>             k-1 and -IPIV(k) were interchanged and D(k-1:k,k-1:k)
+*>             is a 2-by-2 diagonal block.
+*>
+*>          If UPLO = 'L':
+*>             Only the first KB elements of IPIV are set.
+*>
+*>             If IPIV(k) > 0, then rows and columns k and IPIV(k) were
+*>             interchanged and D(k,k) is a 1-by-1 diagonal block.
+*>
+*>             If IPIV(k) = IPIV(k+1) < 0, then rows and columns
+*>             k+1 and -IPIV(k) were interchanged and D(k:k+1,k:k+1)
+*>             is a 2-by-2 diagonal block.
 *> \endverbatim
 *>
-*> \param[out] T
+*> \param[out] W
 *> \verbatim
-*>          T is COMPLEX*16 array, dimension (LDT,K)
-*>          The k by k triangular factor T of the block reflector.
-*>          If DIRECT = 'F', T is upper triangular; if DIRECT = 'B', T is
-*>          lower triangular. The rest of the array is not used.
+*>          W is COMPLEX*16 array, dimension (LDW,NB)
 *> \endverbatim
 *>
-*> \param[in] LDT
+*> \param[in] LDW
 *> \verbatim
-*>          LDT is INTEGER
-*>          The leading dimension of the array T. LDT >= K.
+*>          LDW is INTEGER
+*>          The leading dimension of the array W.  LDW >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*>          INFO is INTEGER
+*>          = 0: successful exit
+*>          > 0: if INFO = k, D(k,k) is exactly zero.  The factorization
+*>               has been completed, but the block diagonal matrix D is
+*>               exactly singular.
 *> \endverbatim
 *
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date September 2012
+*> \date November 2013
 *
-*> \ingroup complex16OTHERauxiliary
+*> \ingroup complex16SYcomputational
 *
-*> \par Further Details:
-*  =====================
+*> \par Contributors:
+*  ==================
 *>
 *> \verbatim
 *>
-*>  The shape of the matrix V and the storage of the vectors which define
-*>  the H(i) is best illustrated by the following example with n = 5 and
-*>  k = 3. The elements equal to 1 are not stored.
-*>
-*>  DIRECT = 'F' and STOREV = 'C':         DIRECT = 'F' and STOREV = 'R':
-*>
-*>               V = (  1       )                 V = (  1 v1 v1 v1 v1 )
-*>                   ( v1  1    )                     (     1 v2 v2 v2 )
-*>                   ( v1 v2  1 )                     (        1 v3 v3 )
-*>                   ( v1 v2 v3 )
-*>                   ( v1 v2 v3 )
-*>
-*>  DIRECT = 'B' and STOREV = 'C':         DIRECT = 'B' and STOREV = 'R':
-*>
-*>               V = ( v1 v2 v3 )                 V = ( v1 v1  1       )
-*>                   ( v1 v2 v3 )                     ( v2 v2 v2  1    )
-*>                   (  1 v2 v3 )                     ( v3 v3 v3 v3  1 )
-*>                   (     1 v3 )
-*>                   (        1 )
+*>  November 2013,  Igor Kozachenko,
+*>                  Computer Science Division,
+*>                  University of California, Berkeley
 *> \endverbatim
-*>
+*
 *  =====================================================================
-      SUBROUTINE ZLARFT( DIRECT, STOREV, N, K, V, LDV, TAU, T, LDT )
+      SUBROUTINE ZLASYF( UPLO, N, NB, KB, A, LDA, IPIV, W, LDW, INFO )
 *
-*  -- LAPACK auxiliary routine (version 3.4.2) --
+*  -- LAPACK computational routine (version 3.5.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     September 2012
+*     November 2013
 *
 *     .. Scalar Arguments ..
-      CHARACTER          DIRECT, STOREV
-      INTEGER            K, LDT, LDV, N
+      CHARACTER          UPLO
+      INTEGER            INFO, KB, LDA, LDW, N, NB
 *     ..
 *     .. Array Arguments ..
-      COMPLEX*16         T( LDT, * ), TAU( * ), V( LDV, * )
+      INTEGER            IPIV( * )
+      COMPLEX*16         A( LDA, * ), W( LDW, * )
 *     ..
 *
 *  =====================================================================
 *
 *     .. Parameters ..
-      COMPLEX*16         ONE, ZERO
-      PARAMETER          ( ONE = ( 1.0D+0, 0.0D+0 ),
-     $                   ZERO = ( 0.0D+0, 0.0D+0 ) )
+      DOUBLE PRECISION   ZERO, ONE
+      PARAMETER          ( ZERO = 0.0D+0, ONE = 1.0D+0 )
+      DOUBLE PRECISION   EIGHT, SEVTEN
+      PARAMETER          ( EIGHT = 8.0D+0, SEVTEN = 17.0D+0 )
+      COMPLEX*16         CONE
+      PARAMETER          ( CONE = ( 1.0D+0, 0.0D+0 ) )
 *     ..
 *     .. Local Scalars ..
-      INTEGER            I, J, PREVLASTV, LASTV
-*     ..
-*     .. External Subroutines ..
-      EXTERNAL           ZGEMV, ZLACGV, ZTRMV
+      INTEGER            IMAX, J, JB, JJ, JMAX, JP, K, KK, KKW, KP,
+     $                   KSTEP, KW
+      DOUBLE PRECISION   ABSAKK, ALPHA, COLMAX, ROWMAX
+      COMPLEX*16         D11, D21, D22, R1, T, Z
 *     ..
 *     .. External Functions ..
       LOGICAL            LSAME
-      EXTERNAL           LSAME
+      INTEGER            IZAMAX
+      EXTERNAL           LSAME, IZAMAX
+*     ..
+*     .. External Subroutines ..
+      EXTERNAL           ZCOPY, ZGEMM, ZGEMV, ZSCAL, ZSWAP
+*     ..
+*     .. Intrinsic Functions ..
+      INTRINSIC          ABS, DBLE, DIMAG, MAX, MIN, SQRT
+*     ..
+*     .. Statement Functions ..
+      DOUBLE PRECISION   CABS1
+*     ..
+*     .. Statement Function definitions ..
+      CABS1( Z ) = ABS( DBLE( Z ) ) + ABS( DIMAG( Z ) )
 *     ..
 *     .. Executable Statements ..
 *
-*     Quick return if possible
+      INFO = 0
 *
-      IF( N.EQ.0 )
-     $   RETURN
+*     Initialize ALPHA for use in choosing pivot block size.
 *
-      IF( LSAME( DIRECT, 'F' ) ) THEN
-         PREVLASTV = N
-         DO I = 1, K
-            PREVLASTV = MAX( PREVLASTV, I )
-            IF( TAU( I ).EQ.ZERO ) THEN
+      ALPHA = ( ONE+SQRT( SEVTEN ) ) / EIGHT
 *
-*              H(i)  =  I
+      IF( LSAME( UPLO, 'U' ) ) THEN
 *
-               DO J = 1, I
-                  T( J, I ) = ZERO
-               END DO
+*        Factorize the trailing columns of A using the upper triangle
+*        of A and working backwards, and compute the matrix W = U12*D
+*        for use in updating A11
+*
+*        K is the main loop index, decreasing from N in steps of 1 or 2
+*
+*        KW is the column of W which corresponds to column K of A
+*
+         K = N
+   10    CONTINUE
+         KW = NB + K - N
+*
+*        Exit from loop
+*
+         IF( ( K.LE.N-NB+1 .AND. NB.LT.N ) .OR. K.LT.1 )
+     $      GO TO 30
+*
+*        Copy column K of A to column KW of W and update it
+*
+         CALL ZCOPY( K, A( 1, K ), 1, W( 1, KW ), 1 )
+         IF( K.LT.N )
+     $      CALL ZGEMV( 'No transpose', K, N-K, -CONE, A( 1, K+1 ), LDA,
+     $                  W( K, KW+1 ), LDW, CONE, W( 1, KW ), 1 )
+*
+         KSTEP = 1
+*
+*        Determine rows and columns to be interchanged and whether
+*        a 1-by-1 or 2-by-2 pivot block will be used
+*
+         ABSAKK = CABS1( W( K, KW ) )
+*
+*        IMAX is the row-index of the largest off-diagonal element in
+
+*
+         IF( K.GT.1 ) THEN
+            IMAX = IZAMAX( K-1, W( 1, KW ), 1 )
+            COLMAX = CABS1( W( IMAX, KW ) )
+         ELSE
+            COLMAX = ZERO
+         END IF
+*
+         IF( MAX( ABSAKK, COLMAX ).EQ.ZERO ) THEN
+*
+*           Column K is zero or underflow: set INFO and continue
+*
+            IF( INFO.EQ.0 )
+     $         INFO = K
+            KP = K
+         ELSE
+            IF( ABSAKK.GE.ALPHA*COLMAX ) THEN
+*
+*              no interchange, use 1-by-1 pivot block
+*
+               KP = K
             ELSE
 *
-*              general case
+*              Copy column IMAX to column KW-1 of W and update it
 *
-               IF( LSAME( STOREV, 'C' ) ) THEN
-*                 Skip any trailing zeros.
-                  DO LASTV = N, I+1, -1
-                     IF( V( LASTV, I ).NE.ZERO ) EXIT
-                  END DO
-                  DO J = 1, I-1
-                     T( J, I ) = -TAU( I ) * CONJG( V( I , J ) )
-                  END DO                     
-                  J = MIN( LASTV, PREVLASTV )
+               CALL ZCOPY( IMAX, A( 1, IMAX ), 1, W( 1, KW-1 ), 1 )
+               CALL ZCOPY( K-IMAX, A( IMAX, IMAX+1 ), LDA,
+     $                     W( IMAX+1, KW-1 ), 1 )
+               IF( K.LT.N )
+     $            CALL ZGEMV( 'No transpose', K, N-K, -CONE,
+     $                        A( 1, K+1 ), LDA, W( IMAX, KW+1 ), LDW,
+     $                        CONE, W( 1, KW-1 ), 1 )
 *
-*                 T(1:i-1,i) := - tau(i) * V(i:j,1:i-1)**H * V(i:j,i)
+*              JMAX is the column-index of the largest off-diagonal
+*              element in row IMAX, and ROWMAX is its absolute value
 *
-                  CALL ZGEMV( 'Conjugate transpose', J-I, I-1,
-     $                        -TAU( I ), V( I+1, 1 ), LDV, 
-     $                        V( I+1, I ), 1, ONE, T( 1, I ), 1 )
+               JMAX = IMAX + IZAMAX( K-IMAX, W( IMAX+1, KW-1 ), 1 )
+               ROWMAX = CABS1( W( JMAX, KW-1 ) )
+               IF( IMAX.GT.1 ) THEN
+                  JMAX = IZAMAX( IMAX-1, W( 1, KW-1 ), 1 )
+                  ROWMAX = MAX( ROWMAX, CABS1( W( JMAX, KW-1 ) ) )
+               END IF
+*
+               IF( ABSAKK.GE.ALPHA*COLMAX*( COLMAX / ROWMAX ) ) THEN
+*
+*                 no interchange, use 1-by-1 pivot block
+*
+                  KP = K
+               ELSE IF( CABS1( W( IMAX, KW-1 ) ).GE.ALPHA*ROWMAX ) THEN
+*
+*                 interchange rows and columns K and IMAX, use 1-by-1
+*                 pivot block
+*
+                  KP = IMAX
+*
+*                 copy column KW-1 of W to column KW of W
+*
+                  CALL ZCOPY( K, W( 1, KW-1 ), 1, W( 1, KW ), 1 )
                ELSE
-*                 Skip any trailing zeros.
-                  DO LASTV = N, I+1, -1
-                     IF( V( I, LASTV ).NE.ZERO ) EXIT
-                  END DO
-                  DO J = 1, I-1
-                     T( J, I ) = -TAU( I ) * V( J , I )
-                  END DO                     
-                  J = MIN( LASTV, PREVLASTV )
 *
-*                 T(1:i-1,i) := - tau(i) * V(1:i-1,i:j) * V(i,i:j)**H
+*                 interchange rows and columns K-1 and IMAX, use 2-by-2
+*                 pivot block
 *
-                  CALL ZGEMM( 'N', 'C', I-1, 1, J-I, -TAU( I ),
-     $                        V( 1, I+1 ), LDV, V( I, I+1 ), LDV,
-     $                        ONE, T( 1, I ), LDT )                  
+                  KP = IMAX
+                  KSTEP = 2
                END IF
+            END IF
 *
-*              T(1:i-1,i) := T(1:i-1,1:i-1) * T(1:i-1,i)
+*           ============================================================
 *
-               CALL ZTRMV( 'Upper', 'No transpose', 'Non-unit', I-1, T,
-     $                     LDT, T( 1, I ), 1 )
-               T( I, I ) = TAU( I )
-               IF( I.GT.1 ) THEN
-                  PREVLASTV = MAX( PREVLASTV, LASTV )
-               ELSE
-                  PREVLASTV = LASTV
+*           KK is the column of A where pivoting step stopped
+*
+            KK = K - KSTEP + 1
+*
+*           KKW is the column of W which corresponds to column KK of A
+*
+            KKW = NB + KK - N
+*
+*           Interchange rows and columns KP and KK.
+*           Updated column KP is already stored in column KKW of W.
+*
+            IF( KP.NE.KK ) THEN
+*
+*              Copy non-updated column KK to column KP of submatrix A
+*              at step K. No need to copy element into column K
+*              (or K and K-1 for 2-by-2 pivot) of A, since these columns
+*              will be later overwritten.
+*
+               A( KP, KP ) = A( KK, KK )
+               CALL ZCOPY( KK-1-KP, A( KP+1, KK ), 1, A( KP, KP+1 ),
+     $                     LDA )
+               IF( KP.GT.1 )
+     $            CALL ZCOPY( KP-1, A( 1, KK ), 1, A( 1, KP ), 1 )
+*
+*              Interchange rows KK and KP in last K+1 to N columns of A
+*              (columns K (or K and K-1 for 2-by-2 pivot) of A will be
+*              later overwritten). Interchange rows KK and KP
+*              in last KKW to NB columns of W.
+*
+               IF( K.LT.N )
+     $            CALL ZSWAP( N-K, A( KK, K+1 ), LDA, A( KP, K+1 ),
+     $                        LDA )
+               CALL ZSWAP( N-KK+1, W( KK, KKW ), LDW, W( KP, KKW ),
+     $                     LDW )
+            END IF
+*
+            IF( KSTEP.EQ.1 ) THEN
+*
+*              1-by-1 pivot block D(k): column kw of W now holds
+*
+*              W(kw) = U(k)*D(k),
+*
+*              where U(k) is the k-th column of U
+*
+*              Store subdiag. elements of column U(k)
+*              and 1-by-1 block D(k) in column k of A.
+*              NOTE: Diagonal element U(k,k) is a UNIT element
+*              and not stored.
+*                 A(k,k) := D(k,k) = W(k,kw)
+*                 A(1:k-1,k) := U(1:k-1,k) = W(1:k-1,kw)/D(k,k)
+*
+               CALL ZCOPY( K, W( 1, KW ), 1, A( 1, K ), 1 )
+               R1 = CONE / A( K, K )
+               CALL ZSCAL( K-1, R1, A( 1, K ), 1 )
+*
+            ELSE
+*
+*              2-by-2 pivot block D(k): columns kw and kw-1 of W now hold
+*
+*              ( W(kw-1) W(kw) ) = ( U(k-1) U(k) )*D(k)
+*
+*              where U(k) and U(k-1) are the k-th and (k-1)-th columns
+*              of U
+*
+*              Store U(1:k-2,k-1) and U(1:k-2,k) and 2-by-2
+*              block D(k-1:k,k-1:k) in columns k-1 and k of A.
+*              NOTE: 2-by-2 diagonal block U(k-1:k,k-1:k) is a UNIT
+*              block and not stored.
+*                 A(k-1:k,k-1:k) := D(k-1:k,k-1:k) = W(k-1:k,kw-1:kw)
+*                 A(1:k-2,k-1:k) := U(1:k-2,k:k-1:k) =
+*                 = W(1:k-2,kw-1:kw) * ( D(k-1:k,k-1:k)**(-1) )
+*
+               IF( K.GT.2 ) THEN
+*
+*                 Compose the columns of the inverse of 2-by-2 pivot
+*                 block D in the following way to reduce the number
+*                 of FLOPS when we myltiply panel ( W(kw-1) W(kw) ) by
+*                 this inverse
+*
+*                 D**(-1) = ( d11 d21 )**(-1) =
+*                           ( d21 d22 )
+*
+*                 = 1/(d11*d22-d21**2) * ( ( d22 ) (-d21 ) ) =
+*                                        ( (-d21 ) ( d11 ) )
+*
+*                 = 1/d21 * 1/((d11/d21)*(d22/d21)-1) *
+*
+*                   * ( ( d22/d21 ) (      -1 ) ) =
+*                     ( (      -1 ) ( d11/d21 ) )
+*
+*                 = 1/d21 * 1/(D22*D11-1) * ( ( D11 ) (  -1 ) ) =
+*                                           ( ( -1  ) ( D22 ) )
+*
+*                 = 1/d21 * T * ( ( D11 ) (  -1 ) )
+*                               ( (  -1 ) ( D22 ) )
+*
+*                 = D21 * ( ( D11 ) (  -1 ) )
+*                         ( (  -1 ) ( D22 ) )
+*
+                  D21 = W( K-1, KW )
+                  D11 = W( K, KW ) / D21
+                  D22 = W( K-1, KW-1 ) / D21
+                  T = CONE / ( D11*D22-CONE )
+                  D21 = T / D21
+*
+*                 Update elements in columns A(k-1) and A(k) as
+*                 dot products of rows of ( W(kw-1) W(kw) ) and columns
+*                 of D**(-1)
+*
+                  DO 20 J = 1, K - 2
+                     A( J, K-1 ) = D21*( D11*W( J, KW-1 )-W( J, KW ) )
+                     A( J, K ) = D21*( D22*W( J, KW )-W( J, KW-1 ) )
+   20             CONTINUE
                END IF
-             END IF
-         END DO
+*
+*              Copy D(k) to A
+*
+               A( K-1, K-1 ) = W( K-1, KW-1 )
+               A( K-1, K ) = W( K-1, KW )
+               A( K, K ) = W( K, KW )
+*
+            END IF
+*
+         END IF
+*
+*        Store details of the interchanges in IPIV
+*
+         IF( KSTEP.EQ.1 ) THEN
+            IPIV( K ) = KP
+         ELSE
+            IPIV( K ) = -KP
+            IPIV( K-1 ) = -KP
+         END IF
+*
+*        Decrease K and return to the start of the main loop
+*
+         K = K - KSTEP
+         GO TO 10
+*
+   30    CONTINUE
+*
+*        Update the upper triangle of A11 (= A(1:k,1:k)) as
+*
+*        A11 := A11 - U12*D*U12**T = A11 - U12*W**T
+*
+*        computing blocks of NB columns at a time
+*
+         DO 50 J = ( ( K-1 ) / NB )*NB + 1, 1, -NB
+            JB = MIN( NB, K-J+1 )
+*
+*           Update the upper triangle of the diagonal block
+*
+            DO 40 JJ = J, J + JB - 1
+               CALL ZGEMV( 'No transpose', JJ-J+1, N-K, -CONE,
+     $                     A( J, K+1 ), LDA, W( JJ, KW+1 ), LDW, CONE,
+     $                     A( J, JJ ), 1 )
+   40       CONTINUE
+*
+*           Update the rectangular superdiagonal block
+*
+            CALL ZGEMM( 'No transpose', 'Transpose', J-1, JB, N-K,
+     $                  -CONE, A( 1, K+1 ), LDA, W( J, KW+1 ), LDW,
+     $                  CONE, A( 1, J ), LDA )
+   50    CONTINUE
+*
+*        Put U12 in standard form by partially undoing the interchanges
+*        in columns k+1:n looping backwards from k+1 to n
+*
+         J = K + 1
+   60    CONTINUE
+*
+*           Undo the interchanges (if any) of rows JJ and JP at each
+*           step J
+*
+*           (Here, J is a diagonal index)
+            JJ = J
+            JP = IPIV( J )
+            IF( JP.LT.0 ) THEN
+               JP = -JP
+*              (Here, J is a diagonal index)
+               J = J + 1
+            END IF
+*           (NOTE: Here, J is used to determine row length. Length N-J+1
+*           of the rows to swap back doesn't include diagonal element)
+            J = J + 1
+            IF( JP.NE.JJ .AND. J.LE.N )
+     $         CALL ZSWAP( N-J+1, A( JP, J ), LDA, A( JJ, J ), LDA )
+         IF( J.LT.N )
+     $      GO TO 60
+*
+*        Set KB to the number of columns factorized
+*
+         KB = N - K
+*
       ELSE
-         PREVLASTV = 1
-         DO I = K, 1, -1
-            IF( TAU( I ).EQ.ZERO ) THEN
 *
-*              H(i)  =  I
+*        Factorize the leading columns of A using the lower triangle
+*        of A and working forwards, and compute the matrix W = L21*D
+*        for use in updating A22
 *
-               DO J = I, K
-                  T( J, I ) = ZERO
-               END DO
+*        K is the main loop index, increasing from 1 in steps of 1 or 2
+*
+         K = 1
+   70    CONTINUE
+*
+*        Exit from loop
+*
+         IF( ( K.GE.NB .AND. NB.LT.N ) .OR. K.GT.N )
+     $      GO TO 90
+*
+*        Copy column K of A to column K of W and update it
+*
+         CALL ZCOPY( N-K+1, A( K, K ), 1, W( K, K ), 1 )
+         CALL ZGEMV( 'No transpose', N-K+1, K-1, -CONE, A( K, 1 ), LDA,
+     $               W( K, 1 ), LDW, CONE, W( K, K ), 1 )
+*
+         KSTEP = 1
+*
+*        Determine rows and columns to be interchanged and whether
+*        a 1-by-1 or 2-by-2 pivot block will be used
+*
+         ABSAKK = CABS1( W( K, K ) )
+*
+*        IMAX is the row-index of the largest off-diagonal element in
+
+*
+         IF( K.LT.N ) THEN
+            IMAX = K + IZAMAX( N-K, W( K+1, K ), 1 )
+            COLMAX = CABS1( W( IMAX, K ) )
+         ELSE
+            COLMAX = ZERO
+         END IF
+*
+         IF( MAX( ABSAKK, COLMAX ).EQ.ZERO ) THEN
+*
+*           Column K is zero or underflow: set INFO and continue
+*
+            IF( INFO.EQ.0 )
+     $         INFO = K
+            KP = K
+         ELSE
+            IF( ABSAKK.GE.ALPHA*COLMAX ) THEN
+*
+*              no interchange, use 1-by-1 pivot block
+*
+               KP = K
             ELSE
 *
-*              general case
+*              Copy column IMAX to column K+1 of W and update it
 *
-               IF( I.LT.K ) THEN
-                  IF( LSAME( STOREV, 'C' ) ) THEN
-*                    Skip any leading zeros.
-                     DO LASTV = 1, I-1
-                        IF( V( LASTV, I ).NE.ZERO ) EXIT
-                     END DO
-                     DO J = I+1, K
-                        T( J, I ) = -TAU( I ) * CONJG( V( N-K+I , J ) )
-                     END DO                        
-                     J = MAX( LASTV, PREVLASTV )
+               CALL ZCOPY( IMAX-K, A( IMAX, K ), LDA, W( K, K+1 ), 1 )
+               CALL ZCOPY( N-IMAX+1, A( IMAX, IMAX ), 1, W( IMAX, K+1 ),
+     $                     1 )
+               CALL ZGEMV( 'No transpose', N-K+1, K-1, -CONE, A( K, 1 ),
+     $                     LDA, W( IMAX, 1 ), LDW, CONE, W( K, K+1 ),
+     $                     1 )
+*
+*              JMAX is the column-index of the largest off-diagonal
+*              element in row IMAX, and ROWMAX is its absolute value
+*
+               JMAX = K - 1 + IZAMAX( IMAX-K, W( K, K+1 ), 1 )
+               ROWMAX = CABS1( W( JMAX, K+1 ) )
+               IF( IMAX.LT.N ) THEN
+                  JMAX = IMAX + IZAMAX( N-IMAX, W( IMAX+1, K+1 ), 1 )
+                  ROWMAX = MAX( ROWMAX, CABS1( W( JMAX, K+1 ) ) )
+               END IF
+*
+               IF( ABSAKK.GE.ALPHA*COLMAX*( COLMAX / ROWMAX ) ) THEN
+*
+*                 no interchange, use 1-by-1 pivot block
+*
+                  KP = K
+               ELSE IF( CABS1( W( IMAX, K+1 ) ).GE.ALPHA*ROWMAX ) THEN
+*
+*                 interchange rows and columns K and IMAX, use 1-by-1
+*                 pivot block
+*
+                  KP = IMAX
+*
+*                 copy column K+1 of W to column K of W
+*
+                  CALL ZCOPY( N-K+1, W( K, K+1 ), 1, W( K, K ), 1 )
+               ELSE
+*
+*                 interchange rows and columns K+1 and IMAX, use 2-by-2
+*                 pivot block
+*
+                  KP = IMAX
+                  KSTEP = 2
+               END IF
+            END IF
+*
+*           ============================================================
+*
+*           KK is the column of A where pivoting step stopped
+*
+            KK = K + KSTEP - 1
+*
+*           Interchange rows and columns KP and KK.
+*           Updated column KP is already stored in column KK of W.
+*
+            IF( KP.NE.KK ) THEN
+*
+*              Copy non-updated column KK to column KP of submatrix A
+*              at step K. No need to copy element into column K
+*              (or K and K+1 for 2-by-2 pivot) of A, since these columns
+*              will be later overwritten.
+*
+               A( KP, KP ) = A( KK, KK )
+               CALL ZCOPY( KP-KK-1, A( KK+1, KK ), 1, A( KP, KK+1 ),
+     $                     LDA )
+               IF( KP.LT.N )
+     $            CALL ZCOPY( N-KP, A( KP+1, KK ), 1, A( KP+1, KP ), 1 )
+*
+*              Interchange rows KK and KP in first K-1 columns of A
+*              (columns K (or K and K+1 for 2-by-2 pivot) of A will be
+*              later overwritten). Interchange rows KK and KP
+*              in first KK columns of W.
+*
+               IF( K.GT.1 )
+     $            CALL ZSWAP( K-1, A( KK, 1 ), LDA, A( KP, 1 ), LDA )
+               CALL ZSWAP( KK, W( KK, 1 ), LDW, W( KP, 1 ), LDW )
+            END IF
+*
+            IF( KSTEP.EQ.1 ) THEN
+*
+*              1-by-1 pivot block D(k): column k of W now holds
+*
+*              W(k) = L(k)*D(k),
+*
+*              where L(k) is the k-th column of L
+*
+*              Store subdiag. elements of column L(k)
+*              and 1-by-1 block D(k) in column k of A.
+*              (NOTE: Diagonal element L(k,k) is a UNIT element
+*              and not stored)
+*                 A(k,k) := D(k,k) = W(k,k)
+*                 A(k+1:N,k) := L(k+1:N,k) = W(k+1:N,k)/D(k,k)
+*
+               CALL ZCOPY( N-K+1, W( K, K ), 1, A( K, K ), 1 )
+               IF( K.LT.N ) THEN
+                  R1 = CONE / A( K, K )
+                  CALL ZSCAL( N-K, R1, A( K+1, K ), 1 )
+               END IF
+*
+            ELSE
+*
+*              2-by-2 pivot block D(k): columns k and k+1 of W now hold
+*
+*              ( W(k) W(k+1) ) = ( L(k) L(k+1) )*D(k)
+*
+*              where L(k) and L(k+1) are the k-th and (k+1)-th columns
+*              of L
+*
+*              Store L(k+2:N,k) and L(k+2:N,k+1) and 2-by-2
+*              block D(k:k+1,k:k+1) in columns k and k+1 of A.
+*              (NOTE: 2-by-2 diagonal block L(k:k+1,k:k+1) is a UNIT
+*              block and not stored)
+*                 A(k:k+1,k:k+1) := D(k:k+1,k:k+1) = W(k:k+1,k:k+1)
+*                 A(k+2:N,k:k+1) := L(k+2:N,k:k+1) =
+*                 = W(k+2:N,k:k+1) * ( D(k:k+1,k:k+1)**(-1) )
+*
+               IF( K.LT.N-1 ) THEN
+*
+*                 Compose the columns of the inverse of 2-by-2 pivot
+*                 block D in the following way to reduce the number
+*                 of FLOPS when we myltiply panel ( W(k) W(k+1) ) by
+*                 this inverse
+*
+*                 D**(-1) = ( d11 d21 )**(-1) =
+*                           ( d21 d22 )
+*
+*                 = 1/(d11*d22-d21**2) * ( ( d22 ) (-d21 ) ) =
+*                                        ( (-d21 ) ( d11 ) )
+*
+*                 = 1/d21 * 1/((d11/d21)*(d22/d21)-1) *
+*
+*                   * ( ( d22/d21 ) (      -1 ) ) =
+*                     ( (      -1 ) ( d11/d21 ) )
+*
+*                 = 1/d21 * 1/(D22*D11-1) * ( ( D11 ) (  -1 ) ) =
+*                                           ( ( -1  ) ( D22 ) )
+*
+*                 = 1/d21 * T * ( ( D11 ) (  -1 ) )
+*                               ( (  -1 ) ( D22 ) )
+*
+*                 = D21 * ( ( D11 ) (  -1 ) )
+*                         ( (  -1 ) ( D22 ) )
+*
+                  D21 = W( K+1, K )
+                  D11 = W( K+1, K+1 ) / D21
+                  D22 = W( K, K ) / D21
+                  T = CONE / ( D11*D22-CONE )
+                  D21 = T / D21
+*
+*                 Update elements in columns A(k) and A(k+1) as
+*                 dot products of rows of ( W(k) W(k+1) ) and columns
+*                 of D**(-1)
+*
+                  DO 80 J = K + 2, N
+                     A( J, K ) = D21*( D11*W( J, K )-W( J, K+1 ) )
+                     A( J, K+1 ) = D21*( D22*W( J, K+1 )-W( J, K ) )
+   80             CONTINUE
+               END IF
+*
+*              Copy D(k) to A
+*
+               A( K, K ) = W( K, K )
+               A( K+1, K ) = W( K+1, K )
+               A( K+1, K+1 ) = W( K+1, K+1 )
+*
+            END IF
+*
+         END IF
+*
+*        Store details of the interchanges in IPIV
+*
+         IF( KSTEP.EQ.1 ) THEN
+            IPIV( K ) = KP
+         ELSE
+            IPIV( K ) = -KP
+            IPIV( K+1 ) = -KP
+         END IF
+*
+*        Increase K and return to the start of the main loop
+*
+         K = K + KSTEP
+         GO TO 70
+*
+   90    CONTINUE
+*
+*        Update the lower triangle of A22 (= A(k:n,k:n)) as
+*
+*        A22 := A22 - L21*D*L21**T = A22 - L21*W**T
 *
-*                    T(i+1:k,i) = -tau(i) * V(j:n-k+i,i+1:k)**H * V(j:n-k+i,i)
+*        computing blocks of NB columns at a time
 *
-                     CALL ZGEMV( 'Conjugate transpose', N-K+I-J, K-I,
-     $                           -TAU( I ), V( J, I+1 ), LDV, V( J, I ),
-     $                           1, ONE, T( I+1, I ), 1 )
-                  ELSE
-*                    Skip any leading zeros.
-                     DO LASTV = 1, I-1
-                        IF( V( I, LASTV ).NE.ZERO ) EXIT
-                     END DO
-                     DO J = I+1, K
-                        T( J, I ) = -TAU( I ) * V( J, N-K+I )
-                     END DO                                           
-                     J = MAX( LASTV, PREVLASTV )
+         DO 110 J = K, N, NB
+            JB = MIN( NB, N-J+1 )
 *
-*                    T(i+1:k,i) = -tau(i) * V(i+1:k,j:n-k+i) * V(i,j:n-k+i)**H
+*           Update the lower triangle of the diagonal block
 *
-                     CALL ZGEMM( 'N', 'C', K-I, 1, N-K+I-J, -TAU( I ),
-     $                           V( I+1, J ), LDV, V( I, J ), LDV,
-     $                           ONE, T( I+1, I ), LDT )                     
-                  END IF
+            DO 100 JJ = J, J + JB - 1
+               CALL ZGEMV( 'No transpose', J+JB-JJ, K-1, -CONE,
+     $                     A( JJ, 1 ), LDA, W( JJ, 1 ), LDW, CONE,
+     $                     A( JJ, JJ ), 1 )
+  100       CONTINUE
 *
-*                 T(i+1:k,i) := T(i+1:k,i+1:k) * T(i+1:k,i)
+*           Update the rectangular subdiagonal block
 *
-                  CALL ZTRMV( 'Lower', 'No transpose', 'Non-unit', K-I,
-     $                        T( I+1, I+1 ), LDT, T( I+1, I ), 1 )
-                  IF( I.GT.1 ) THEN
-                     PREVLASTV = MIN( PREVLASTV, LASTV )
-                  ELSE
-                     PREVLASTV = LASTV
-                  END IF
-               END IF
-               T( I, I ) = TAU( I )
+            IF( J+JB.LE.N )
+     $         CALL ZGEMM( 'No transpose', 'Transpose', N-J-JB+1, JB,
+     $                     K-1, -CONE, A( J+JB, 1 ), LDA, W( J, 1 ),
+     $                     LDW, CONE, A( J+JB, J ), LDA )
+  110    CONTINUE
+*
+*        Put L21 in standard form by partially undoing the interchanges
+*        of rows in columns 1:k-1 looping backwards from k-1 to 1
+*
+         J = K - 1
+  120    CONTINUE
+*
+*           Undo the interchanges (if any) of rows JJ and JP at each
+*           step J
+*
+*           (Here, J is a diagonal index)
+            JJ = J
+            JP = IPIV( J )
+            IF( JP.LT.0 ) THEN
+               JP = -JP
+*              (Here, J is a diagonal index)
+               J = J - 1
             END IF
-         END DO
+*           (NOTE: Here, J is used to determine row length. Length J
+*           of the rows to swap back doesn't include diagonal element)
+            J = J - 1
+            IF( JP.NE.JJ .AND. J.GE.1 )
+     $         CALL ZSWAP( J, A( JP, 1 ), LDA, A( JJ, 1 ), LDA )
+         IF( J.GT.1 )
+     $      GO TO 120
+*
+*        Set KB to the number of columns factorized
+*
+         KB = K - 1
+*
       END IF
       RETURN
 *
-*     End of ZLARFT
+*     End of ZLASYF
 *
       END
-*> \brief \b ZLARFX applies an elementary reflector to a general rectangular matrix, with loop unrolling when the reflector has order ≤ 10.
+*> \brief \b ZLATDF uses the LU factorization of the n-by-n matrix computed by sgetc2 and computes a contribution to the reciprocal Dif-estimate.
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download ZLARFX + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/zlarfx.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/zlarfx.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/zlarfx.f"> 
+*> Download ZLATDF + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/zlatdf.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/zlatdf.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/zlatdf.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
-*       SUBROUTINE ZLARFX( SIDE, M, N, V, TAU, C, LDC, WORK )
-* 
+*       SUBROUTINE ZLATDF( IJOB, N, Z, LDZ, RHS, RDSUM, RDSCAL, IPIV,
+*                          JPIV )
+*
 *       .. Scalar Arguments ..
-*       CHARACTER          SIDE
-*       INTEGER            LDC, M, N
-*       COMPLEX*16         TAU
+*       INTEGER            IJOB, LDZ, N
+*       DOUBLE PRECISION   RDSCAL, RDSUM
 *       ..
 *       .. Array Arguments ..
-*       COMPLEX*16         C( LDC, * ), V( * ), WORK( * )
+*       INTEGER            IPIV( * ), JPIV( * )
+*       COMPLEX*16         RHS( * ), Z( LDZ, * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
 *>
 *> \verbatim
 *>
-*> ZLARFX applies a complex elementary reflector H to a complex m by n
-*> matrix C, from either the left or the right. H is represented in the
-*> form
-*>
-*>       H = I - tau * v * v**H
-*>
-*> where tau is a complex scalar and v is a complex vector.
-*>
-*> If tau = 0, then H is taken to be the unit matrix
+*> ZLATDF computes the contribution to the reciprocal Dif-estimate
+*> by solving for x in Z * x = b, where b is chosen such that the norm
+*> of x is as large as possible. It is assumed that LU decomposition
+*> of Z has been computed by ZGETC2. On entry RHS = f holds the
+*> contribution from earlier solved sub-systems, and on return RHS = x.
 *>
-*> This version uses inline code if H has order < 11.
+*> The factorization of Z returned by ZGETC2 has the form
+*> Z = P * L * U * Q, where P and Q are permutation matrices. L is lower
+*> triangular with unit diagonal elements and U is upper triangular.
 *> \endverbatim
 *
 *  Arguments:
 *  ==========
 *
-*> \param[in] SIDE
+*> \param[in] IJOB
 *> \verbatim
-*>          SIDE is CHARACTER*1
-*>          = 'L': form  H * C
-*>          = 'R': form  C * H
+*>          IJOB is INTEGER
+*>          IJOB = 2: First compute an approximative null-vector e
+*>              of Z using ZGECON, e is normalized and solve for
+*>              Zx = +-e - f with the sign giving the greater value of
+*>              2-norm(x).  About 5 times as expensive as Default.
+*>          IJOB .ne. 2: Local look ahead strategy where
+*>              all entries of the r.h.s. b is chosen as either +1 or
+*>              -1.  Default.
 *> \endverbatim
 *>
-*> \param[in] M
+*> \param[in] N
 *> \verbatim
-*>          M is INTEGER
-*>          The number of rows of the matrix C.
+*>          N is INTEGER
+*>          The number of columns of the matrix Z.
 *> \endverbatim
 *>
-*> \param[in] N
+*> \param[in] Z
 *> \verbatim
-*>          N is INTEGER
-*>          The number of columns of the matrix C.
+*>          Z is COMPLEX*16 array, dimension (LDZ, N)
+*>          On entry, the LU part of the factorization of the n-by-n
+*>          matrix Z computed by ZGETC2:  Z = P * L * U * Q
 *> \endverbatim
 *>
-*> \param[in] V
+*> \param[in] LDZ
 *> \verbatim
-*>          V is COMPLEX*16 array, dimension (M) if SIDE = 'L'
-*>                                        or (N) if SIDE = 'R'
-*>          The vector v in the representation of H.
+*>          LDZ is INTEGER
+*>          The leading dimension of the array Z.  LDA >= max(1, N).
 *> \endverbatim
 *>
-*> \param[in] TAU
+*> \param[in,out] RHS
 *> \verbatim
-*>          TAU is COMPLEX*16
-*>          The value tau in the representation of H.
+*>          RHS is COMPLEX*16 array, dimension (N).
+*>          On entry, RHS contains contributions from other subsystems.
+*>          On exit, RHS contains the solution of the subsystem with
+*>          entries according to the value of IJOB (see above).
 *> \endverbatim
 *>
-*> \param[in,out] C
+*> \param[in,out] RDSUM
 *> \verbatim
-*>          C is COMPLEX*16 array, dimension (LDC,N)
-*>          On entry, the m by n matrix C.
-*>          On exit, C is overwritten by the matrix H * C if SIDE = 'L',
-*>          or C * H if SIDE = 'R'.
+*>          RDSUM is DOUBLE PRECISION
+*>          On entry, the sum of squares of computed contributions to
+*>          the Dif-estimate under computation by ZTGSYL, where the
+*>          scaling factor RDSCAL (see below) has been factored out.
+*>          On exit, the corresponding sum of squares updated with the
+*>          contributions from the current sub-system.
+*>          If TRANS = 'T' RDSUM is not touched.
+*>          NOTE: RDSUM only makes sense when ZTGSY2 is called by CTGSYL.
 *> \endverbatim
 *>
-*> \param[in] LDC
+*> \param[in,out] RDSCAL
 *> \verbatim
-*>          LDC is INTEGER
-*>          The leading dimension of the array C. LDA >= max(1,M).
+*>          RDSCAL is DOUBLE PRECISION
+*>          On entry, scaling factor used to prevent overflow in RDSUM.
+*>          On exit, RDSCAL is updated w.r.t. the current contributions
+*>          in RDSUM.
+*>          If TRANS = 'T', RDSCAL is not touched.
+*>          NOTE: RDSCAL only makes sense when ZTGSY2 is called by
+*>          ZTGSYL.
 *> \endverbatim
 *>
-*> \param[out] WORK
+*> \param[in] IPIV
 *> \verbatim
-*>          WORK is COMPLEX*16 array, dimension (N) if SIDE = 'L'
-*>                                            or (M) if SIDE = 'R'
-*>          WORK is not referenced if H has order < 11.
+*>          IPIV is INTEGER array, dimension (N).
+*>          The pivot indices; for 1 <= i <= N, row i of the
+*>          matrix has been interchanged with row IPIV(i).
+*> \endverbatim
+*>
+*> \param[in] JPIV
+*> \verbatim
+*>          JPIV is INTEGER array, dimension (N).
+*>          The pivot indices; for 1 <= j <= N, column j of the
+*>          matrix has been interchanged with column JPIV(j).
 *> \endverbatim
 *
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date September 2012
+*> \date June 2016
 *
 *> \ingroup complex16OTHERauxiliary
 *
+*> \par Further Details:
+*  =====================
+*>
+*>  This routine is a further developed implementation of algorithm
+*>  BSOLVE in [1] using complete pivoting in the LU factorization.
+*
+*> \par Contributors:
+*  ==================
+*>
+*>     Bo Kagstrom and Peter Poromaa, Department of Computing Science,
+*>     Umea University, S-901 87 Umea, Sweden.
+*
+*> \par References:
+*  ================
+*>
+*>   [1]   Bo Kagstrom and Lars Westin,
+*>         Generalized Schur Methods with Condition Estimators for
+*>         Solving the Generalized Sylvester Equation, IEEE Transactions
+*>         on Automatic Control, Vol. 34, No. 7, July 1989, pp 745-751.
+*>\n
+*>   [2]   Peter Poromaa,
+*>         On Efficient and Robust Estimators for the Separation
+*>         between two Regular Matrix Pairs with Applications in
+*>         Condition Estimation. Report UMINF-95.05, Department of
+*>         Computing Science, Umea University, S-901 87 Umea, Sweden,
+*>         1995.
+*
 *  =====================================================================
-      SUBROUTINE ZLARFX( SIDE, M, N, V, TAU, C, LDC, WORK )
+      SUBROUTINE ZLATDF( IJOB, N, Z, LDZ, RHS, RDSUM, RDSCAL, IPIV,
+     $                   JPIV )
 *
-*  -- LAPACK auxiliary routine (version 3.4.2) --
+*  -- LAPACK auxiliary routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     September 2012
+*     June 2016
 *
 *     .. Scalar Arguments ..
-      CHARACTER          SIDE
-      INTEGER            LDC, M, N
-      COMPLEX*16         TAU
+      INTEGER            IJOB, LDZ, N
+      DOUBLE PRECISION   RDSCAL, RDSUM
 *     ..
 *     .. Array Arguments ..
-      COMPLEX*16         C( LDC, * ), V( * ), WORK( * )
+      INTEGER            IPIV( * ), JPIV( * )
+      COMPLEX*16         RHS( * ), Z( LDZ, * )
 *     ..
 *
 *  =====================================================================
 *
 *     .. Parameters ..
-      COMPLEX*16         ZERO, ONE
-      PARAMETER          ( ZERO = ( 0.0D+0, 0.0D+0 ),
-     $                   ONE = ( 1.0D+0, 0.0D+0 ) )
+      INTEGER            MAXDIM
+      PARAMETER          ( MAXDIM = 2 )
+      DOUBLE PRECISION   ZERO, ONE
+      PARAMETER          ( ZERO = 0.0D+0, ONE = 1.0D+0 )
+      COMPLEX*16         CONE
+      PARAMETER          ( CONE = ( 1.0D+0, 0.0D+0 ) )
 *     ..
 *     .. Local Scalars ..
-      INTEGER            J
-      COMPLEX*16         SUM, T1, T10, T2, T3, T4, T5, T6, T7, T8, T9,
-     $                   V1, V10, V2, V3, V4, V5, V6, V7, V8, V9
+      INTEGER            I, INFO, J, K
+      DOUBLE PRECISION   RTEMP, SCALE, SMINU, SPLUS
+      COMPLEX*16         BM, BP, PMONE, TEMP
 *     ..
-*     .. External Functions ..
-      LOGICAL            LSAME
-      EXTERNAL           LSAME
+*     .. Local Arrays ..
+      DOUBLE PRECISION   RWORK( MAXDIM )
+      COMPLEX*16         WORK( 4*MAXDIM ), XM( MAXDIM ), XP( MAXDIM )
 *     ..
 *     .. External Subroutines ..
-      EXTERNAL           ZLARF
+      EXTERNAL           ZAXPY, ZCOPY, ZGECON, ZGESC2, ZLASSQ, ZLASWP,
+     $                   ZSCAL
+*     ..
+*     .. External Functions ..
+      DOUBLE PRECISION   DZASUM
+      COMPLEX*16         ZDOTC
+      EXTERNAL           DZASUM, ZDOTC
 *     ..
 *     .. Intrinsic Functions ..
-      INTRINSIC          DCONJG
+      INTRINSIC          ABS, DBLE, SQRT
 *     ..
 *     .. Executable Statements ..
 *
-      IF( TAU.EQ.ZERO )
-     $   RETURN
-      IF( LSAME( SIDE, 'L' ) ) THEN
+      IF( IJOB.NE.2 ) THEN
 *
-*        Form  H * C, where H has order m.
+*        Apply permutations IPIV to RHS
 *
-         GO TO ( 10, 30, 50, 70, 90, 110, 130, 150,
-     $           170, 190 )M
+         CALL ZLASWP( 1, RHS, LDZ, 1, N-1, IPIV, 1 )
 *
-*        Code for general M
+*        Solve for L-part choosing RHS either to +1 or -1.
 *
-         CALL ZLARF( SIDE, M, N, V, 1, TAU, C, LDC, WORK )
-         GO TO 410
-   10    CONTINUE
+         PMONE = -CONE
+         DO 10 J = 1, N - 1
+            BP = RHS( J ) + CONE
+            BM = RHS( J ) - CONE
+            SPLUS = ONE
 *
-*        Special code for 1 x 1 Householder
+*           Lockahead for L- part RHS(1:N-1) = +-1
+*           SPLUS and SMIN computed more efficiently than in BSOLVE[1].
 *
-         T1 = ONE - TAU*V( 1 )*DCONJG( V( 1 ) )
-         DO 20 J = 1, N
-            C( 1, J ) = T1*C( 1, J )
-   20    CONTINUE
-         GO TO 410
+            SPLUS = SPLUS + DBLE( ZDOTC( N-J, Z( J+1, J ), 1, Z( J+1,
+     $              J ), 1 ) )
+            SMINU = DBLE( ZDOTC( N-J, Z( J+1, J ), 1, RHS( J+1 ), 1 ) )
+            SPLUS = SPLUS*DBLE( RHS( J ) )
+            IF( SPLUS.GT.SMINU ) THEN
+               RHS( J ) = BP
+            ELSE IF( SMINU.GT.SPLUS ) THEN
+               RHS( J ) = BM
+            ELSE
+*
+*              In this case the updating sums are equal and we can
+*              choose RHS(J) +1 or -1. The first time this happens we
+*              choose -1, thereafter +1. This is a simple way to get
+*              good estimates of matrices like Byers well-known example
+*              (see [1]). (Not done in BSOLVE.)
+*
+               RHS( J ) = RHS( J ) + PMONE
+               PMONE = CONE
+            END IF
+*
+*           Compute the remaining r.h.s.
+*
+            TEMP = -RHS( J )
+            CALL ZAXPY( N-J, TEMP, Z( J+1, J ), 1, RHS( J+1 ), 1 )
+   10    CONTINUE
+*
+*        Solve for U- part, lockahead for RHS(N) = +-1. This is not done
+*        In BSOLVE and will hopefully give us a better estimate because
+*        any ill-conditioning of the original matrix is transfered to U
+*        and not to L. U(N, N) is an approximation to sigma_min(LU).
+*
+         CALL ZCOPY( N-1, RHS, 1, WORK, 1 )
+         WORK( N ) = RHS( N ) + CONE
+         RHS( N ) = RHS( N ) - CONE
+         SPLUS = ZERO
+         SMINU = ZERO
+         DO 30 I = N, 1, -1
+            TEMP = CONE / Z( I, I )
+            WORK( I ) = WORK( I )*TEMP
+            RHS( I ) = RHS( I )*TEMP
+            DO 20 K = I + 1, N
+               WORK( I ) = WORK( I ) - WORK( K )*( Z( I, K )*TEMP )
+               RHS( I ) = RHS( I ) - RHS( K )*( Z( I, K )*TEMP )
+   20       CONTINUE
+            SPLUS = SPLUS + ABS( WORK( I ) )
+            SMINU = SMINU + ABS( RHS( I ) )
    30    CONTINUE
+         IF( SPLUS.GT.SMINU )
+     $      CALL ZCOPY( N, WORK, 1, RHS, 1 )
 *
-*        Special code for 2 x 2 Householder
+*        Apply the permutations JPIV to the computed solution (RHS)
 *
-         V1 = DCONJG( V( 1 ) )
-         T1 = TAU*DCONJG( V1 )
-         V2 = DCONJG( V( 2 ) )
-         T2 = TAU*DCONJG( V2 )
-         DO 40 J = 1, N
-            SUM = V1*C( 1, J ) + V2*C( 2, J )
-            C( 1, J ) = C( 1, J ) - SUM*T1
-            C( 2, J ) = C( 2, J ) - SUM*T2
-   40    CONTINUE
-         GO TO 410
-   50    CONTINUE
+         CALL ZLASWP( 1, RHS, LDZ, 1, N-1, JPIV, -1 )
 *
-*        Special code for 3 x 3 Householder
+*        Compute the sum of squares
 *
-         V1 = DCONJG( V( 1 ) )
-         T1 = TAU*DCONJG( V1 )
-         V2 = DCONJG( V( 2 ) )
-         T2 = TAU*DCONJG( V2 )
-         V3 = DCONJG( V( 3 ) )
-         T3 = TAU*DCONJG( V3 )
-         DO 60 J = 1, N
-            SUM = V1*C( 1, J ) + V2*C( 2, J ) + V3*C( 3, J )
-            C( 1, J ) = C( 1, J ) - SUM*T1
-            C( 2, J ) = C( 2, J ) - SUM*T2
-            C( 3, J ) = C( 3, J ) - SUM*T3
-   60    CONTINUE
-         GO TO 410
-   70    CONTINUE
+         CALL ZLASSQ( N, RHS, 1, RDSCAL, RDSUM )
+         RETURN
+      END IF
 *
-*        Special code for 4 x 4 Householder
+*     ENTRY IJOB = 2
 *
-         V1 = DCONJG( V( 1 ) )
-         T1 = TAU*DCONJG( V1 )
-         V2 = DCONJG( V( 2 ) )
-         T2 = TAU*DCONJG( V2 )
-         V3 = DCONJG( V( 3 ) )
-         T3 = TAU*DCONJG( V3 )
-         V4 = DCONJG( V( 4 ) )
-         T4 = TAU*DCONJG( V4 )
-         DO 80 J = 1, N
-            SUM = V1*C( 1, J ) + V2*C( 2, J ) + V3*C( 3, J ) +
-     $            V4*C( 4, J )
-            C( 1, J ) = C( 1, J ) - SUM*T1
-            C( 2, J ) = C( 2, J ) - SUM*T2
-            C( 3, J ) = C( 3, J ) - SUM*T3
-            C( 4, J ) = C( 4, J ) - SUM*T4
-   80    CONTINUE
-         GO TO 410
-   90    CONTINUE
+*     Compute approximate nullvector XM of Z
 *
-*        Special code for 5 x 5 Householder
+      CALL ZGECON( 'I', N, Z, LDZ, ONE, RTEMP, WORK, RWORK, INFO )
+      CALL ZCOPY( N, WORK( N+1 ), 1, XM, 1 )
 *
-         V1 = DCONJG( V( 1 ) )
-         T1 = TAU*DCONJG( V1 )
-         V2 = DCONJG( V( 2 ) )
-         T2 = TAU*DCONJG( V2 )
-         V3 = DCONJG( V( 3 ) )
-         T3 = TAU*DCONJG( V3 )
-         V4 = DCONJG( V( 4 ) )
-         T4 = TAU*DCONJG( V4 )
-         V5 = DCONJG( V( 5 ) )
-         T5 = TAU*DCONJG( V5 )
-         DO 100 J = 1, N
-            SUM = V1*C( 1, J ) + V2*C( 2, J ) + V3*C( 3, J ) +
-     $            V4*C( 4, J ) + V5*C( 5, J )
-            C( 1, J ) = C( 1, J ) - SUM*T1
-            C( 2, J ) = C( 2, J ) - SUM*T2
-            C( 3, J ) = C( 3, J ) - SUM*T3
-            C( 4, J ) = C( 4, J ) - SUM*T4
-            C( 5, J ) = C( 5, J ) - SUM*T5
-  100    CONTINUE
-         GO TO 410
-  110    CONTINUE
+*     Compute RHS
 *
-*        Special code for 6 x 6 Householder
+      CALL ZLASWP( 1, XM, LDZ, 1, N-1, IPIV, -1 )
+      TEMP = CONE / SQRT( ZDOTC( N, XM, 1, XM, 1 ) )
+      CALL ZSCAL( N, TEMP, XM, 1 )
+      CALL ZCOPY( N, XM, 1, XP, 1 )
+      CALL ZAXPY( N, CONE, RHS, 1, XP, 1 )
+      CALL ZAXPY( N, -CONE, XM, 1, RHS, 1 )
+      CALL ZGESC2( N, Z, LDZ, RHS, IPIV, JPIV, SCALE )
+      CALL ZGESC2( N, Z, LDZ, XP, IPIV, JPIV, SCALE )
+      IF( DZASUM( N, XP, 1 ).GT.DZASUM( N, RHS, 1 ) )
+     $   CALL ZCOPY( N, XP, 1, RHS, 1 )
 *
-         V1 = DCONJG( V( 1 ) )
-         T1 = TAU*DCONJG( V1 )
-         V2 = DCONJG( V( 2 ) )
-         T2 = TAU*DCONJG( V2 )
-         V3 = DCONJG( V( 3 ) )
-         T3 = TAU*DCONJG( V3 )
-         V4 = DCONJG( V( 4 ) )
-         T4 = TAU*DCONJG( V4 )
-         V5 = DCONJG( V( 5 ) )
-         T5 = TAU*DCONJG( V5 )
-         V6 = DCONJG( V( 6 ) )
-         T6 = TAU*DCONJG( V6 )
-         DO 120 J = 1, N
-            SUM = V1*C( 1, J ) + V2*C( 2, J ) + V3*C( 3, J ) +
-     $            V4*C( 4, J ) + V5*C( 5, J ) + V6*C( 6, J )
-            C( 1, J ) = C( 1, J ) - SUM*T1
-            C( 2, J ) = C( 2, J ) - SUM*T2
-            C( 3, J ) = C( 3, J ) - SUM*T3
-            C( 4, J ) = C( 4, J ) - SUM*T4
-            C( 5, J ) = C( 5, J ) - SUM*T5
-            C( 6, J ) = C( 6, J ) - SUM*T6
-  120    CONTINUE
-         GO TO 410
-  130    CONTINUE
+*     Compute the sum of squares
 *
-*        Special code for 7 x 7 Householder
+      CALL ZLASSQ( N, RHS, 1, RDSCAL, RDSUM )
+      RETURN
 *
-         V1 = DCONJG( V( 1 ) )
-         T1 = TAU*DCONJG( V1 )
-         V2 = DCONJG( V( 2 ) )
-         T2 = TAU*DCONJG( V2 )
-         V3 = DCONJG( V( 3 ) )
-         T3 = TAU*DCONJG( V3 )
-         V4 = DCONJG( V( 4 ) )
-         T4 = TAU*DCONJG( V4 )
-         V5 = DCONJG( V( 5 ) )
-         T5 = TAU*DCONJG( V5 )
-         V6 = DCONJG( V( 6 ) )
-         T6 = TAU*DCONJG( V6 )
-         V7 = DCONJG( V( 7 ) )
-         T7 = TAU*DCONJG( V7 )
-         DO 140 J = 1, N
-            SUM = V1*C( 1, J ) + V2*C( 2, J ) + V3*C( 3, J ) +
-     $            V4*C( 4, J ) + V5*C( 5, J ) + V6*C( 6, J ) +
-     $            V7*C( 7, J )
-            C( 1, J ) = C( 1, J ) - SUM*T1
-            C( 2, J ) = C( 2, J ) - SUM*T2
-            C( 3, J ) = C( 3, J ) - SUM*T3
-            C( 4, J ) = C( 4, J ) - SUM*T4
-            C( 5, J ) = C( 5, J ) - SUM*T5
-            C( 6, J ) = C( 6, J ) - SUM*T6
-            C( 7, J ) = C( 7, J ) - SUM*T7
-  140    CONTINUE
-         GO TO 410
-  150    CONTINUE
+*     End of ZLATDF
 *
-*        Special code for 8 x 8 Householder
+      END
+*> \brief \b ZLATRD reduces the first nb rows and columns of a symmetric/Hermitian matrix A to real tridiagonal form by an unitary similarity transformation.
 *
-         V1 = DCONJG( V( 1 ) )
-         T1 = TAU*DCONJG( V1 )
-         V2 = DCONJG( V( 2 ) )
-         T2 = TAU*DCONJG( V2 )
-         V3 = DCONJG( V( 3 ) )
-         T3 = TAU*DCONJG( V3 )
-         V4 = DCONJG( V( 4 ) )
-         T4 = TAU*DCONJG( V4 )
-         V5 = DCONJG( V( 5 ) )
-         T5 = TAU*DCONJG( V5 )
-         V6 = DCONJG( V( 6 ) )
-         T6 = TAU*DCONJG( V6 )
-         V7 = DCONJG( V( 7 ) )
-         T7 = TAU*DCONJG( V7 )
-         V8 = DCONJG( V( 8 ) )
-         T8 = TAU*DCONJG( V8 )
-         DO 160 J = 1, N
-            SUM = V1*C( 1, J ) + V2*C( 2, J ) + V3*C( 3, J ) +
-     $            V4*C( 4, J ) + V5*C( 5, J ) + V6*C( 6, J ) +
-     $            V7*C( 7, J ) + V8*C( 8, J )
-            C( 1, J ) = C( 1, J ) - SUM*T1
-            C( 2, J ) = C( 2, J ) - SUM*T2
-            C( 3, J ) = C( 3, J ) - SUM*T3
-            C( 4, J ) = C( 4, J ) - SUM*T4
-            C( 5, J ) = C( 5, J ) - SUM*T5
-            C( 6, J ) = C( 6, J ) - SUM*T6
-            C( 7, J ) = C( 7, J ) - SUM*T7
-            C( 8, J ) = C( 8, J ) - SUM*T8
-  160    CONTINUE
-         GO TO 410
-  170    CONTINUE
+*  =========== DOCUMENTATION ===========
 *
-*        Special code for 9 x 9 Householder
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
-         V1 = DCONJG( V( 1 ) )
-         T1 = TAU*DCONJG( V1 )
-         V2 = DCONJG( V( 2 ) )
-         T2 = TAU*DCONJG( V2 )
-         V3 = DCONJG( V( 3 ) )
-         T3 = TAU*DCONJG( V3 )
-         V4 = DCONJG( V( 4 ) )
-         T4 = TAU*DCONJG( V4 )
-         V5 = DCONJG( V( 5 ) )
-         T5 = TAU*DCONJG( V5 )
-         V6 = DCONJG( V( 6 ) )
-         T6 = TAU*DCONJG( V6 )
-         V7 = DCONJG( V( 7 ) )
-         T7 = TAU*DCONJG( V7 )
-         V8 = DCONJG( V( 8 ) )
-         T8 = TAU*DCONJG( V8 )
-         V9 = DCONJG( V( 9 ) )
-         T9 = TAU*DCONJG( V9 )
-         DO 180 J = 1, N
-            SUM = V1*C( 1, J ) + V2*C( 2, J ) + V3*C( 3, J ) +
-     $            V4*C( 4, J ) + V5*C( 5, J ) + V6*C( 6, J ) +
-     $            V7*C( 7, J ) + V8*C( 8, J ) + V9*C( 9, J )
-            C( 1, J ) = C( 1, J ) - SUM*T1
-            C( 2, J ) = C( 2, J ) - SUM*T2
-            C( 3, J ) = C( 3, J ) - SUM*T3
-            C( 4, J ) = C( 4, J ) - SUM*T4
-            C( 5, J ) = C( 5, J ) - SUM*T5
-            C( 6, J ) = C( 6, J ) - SUM*T6
-            C( 7, J ) = C( 7, J ) - SUM*T7
-            C( 8, J ) = C( 8, J ) - SUM*T8
-            C( 9, J ) = C( 9, J ) - SUM*T9
-  180    CONTINUE
-         GO TO 410
-  190    CONTINUE
+*> \htmlonly
+*> Download ZLATRD + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/zlatrd.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/zlatrd.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/zlatrd.f">
+*> [TXT]</a>
+*> \endhtmlonly
 *
-*        Special code for 10 x 10 Householder
+*  Definition:
+*  ===========
+*
+*       SUBROUTINE ZLATRD( UPLO, N, NB, A, LDA, E, TAU, W, LDW )
+*
+*       .. Scalar Arguments ..
+*       CHARACTER          UPLO
+*       INTEGER            LDA, LDW, N, NB
+*       ..
+*       .. Array Arguments ..
+*       DOUBLE PRECISION   E( * )
+*       COMPLEX*16         A( LDA, * ), TAU( * ), W( LDW, * )
+*       ..
+*
+*
+*> \par Purpose:
+*  =============
+*>
+*> \verbatim
+*>
+*> ZLATRD reduces NB rows and columns of a complex Hermitian matrix A to
+*> Hermitian tridiagonal form by a unitary similarity
+*> transformation Q**H * A * Q, and returns the matrices V and W which are
+*> needed to apply the transformation to the unreduced part of A.
+*>
+*> If UPLO = 'U', ZLATRD reduces the last NB rows and columns of a
+*> matrix, of which the upper triangle is supplied;
+*> if UPLO = 'L', ZLATRD reduces the first NB rows and columns of a
+*> matrix, of which the lower triangle is supplied.
+*>
+*> This is an auxiliary routine called by ZHETRD.
+*> \endverbatim
+*
+*  Arguments:
+*  ==========
+*
+*> \param[in] UPLO
+*> \verbatim
+*>          UPLO is CHARACTER*1
+*>          Specifies whether the upper or lower triangular part of the
+*>          Hermitian matrix A is stored:
+*>          = 'U': Upper triangular
+*>          = 'L': Lower triangular
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*>          N is INTEGER
+*>          The order of the matrix A.
+*> \endverbatim
+*>
+*> \param[in] NB
+*> \verbatim
+*>          NB is INTEGER
+*>          The number of rows and columns to be reduced.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*>          A is COMPLEX*16 array, dimension (LDA,N)
+*>          On entry, the Hermitian matrix A.  If UPLO = 'U', the leading
+*>          n-by-n upper triangular part of A contains the upper
+*>          triangular part of the matrix A, and the strictly lower
+*>          triangular part of A is not referenced.  If UPLO = 'L', the
+*>          leading n-by-n lower triangular part of A contains the lower
+*>          triangular part of the matrix A, and the strictly upper
+*>          triangular part of A is not referenced.
+*>          On exit:
+*>          if UPLO = 'U', the last NB columns have been reduced to
+*>            tridiagonal form, with the diagonal elements overwriting
+*>            the diagonal elements of A; the elements above the diagonal
+*>            with the array TAU, represent the unitary matrix Q as a
+*>            product of elementary reflectors;
+*>          if UPLO = 'L', the first NB columns have been reduced to
+*>            tridiagonal form, with the diagonal elements overwriting
+*>            the diagonal elements of A; the elements below the diagonal
+*>            with the array TAU, represent the  unitary matrix Q as a
+*>            product of elementary reflectors.
+*>          See Further Details.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*>          LDA is INTEGER
+*>          The leading dimension of the array A.  LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] E
+*> \verbatim
+*>          E is DOUBLE PRECISION array, dimension (N-1)
+*>          If UPLO = 'U', E(n-nb:n-1) contains the superdiagonal
+*>          elements of the last NB columns of the reduced matrix;
+*>          if UPLO = 'L', E(1:nb) contains the subdiagonal elements of
+*>          the first NB columns of the reduced matrix.
+*> \endverbatim
+*>
+*> \param[out] TAU
+*> \verbatim
+*>          TAU is COMPLEX*16 array, dimension (N-1)
+*>          The scalar factors of the elementary reflectors, stored in
+*>          TAU(n-nb:n-1) if UPLO = 'U', and in TAU(1:nb) if UPLO = 'L'.
+*>          See Further Details.
+*> \endverbatim
+*>
+*> \param[out] W
+*> \verbatim
+*>          W is COMPLEX*16 array, dimension (LDW,NB)
+*>          The n-by-nb matrix W required to update the unreduced part
+*>          of A.
+*> \endverbatim
+*>
+*> \param[in] LDW
+*> \verbatim
+*>          LDW is INTEGER
+*>          The leading dimension of the array W. LDW >= max(1,N).
+*> \endverbatim
+*
+*  Authors:
+*  ========
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date December 2016
+*
+*> \ingroup complex16OTHERauxiliary
+*
+*> \par Further Details:
+*  =====================
+*>
+*> \verbatim
+*>
+*>  If UPLO = 'U', the matrix Q is represented as a product of elementary
+*>  reflectors
+*>
+*>     Q = H(n) H(n-1) . . . H(n-nb+1).
+*>
+*>  Each H(i) has the form
+*>
+*>     H(i) = I - tau * v * v**H
+*>
+*>  where tau is a complex scalar, and v is a complex vector with
+*>  v(i:n) = 0 and v(i-1) = 1; v(1:i-1) is stored on exit in A(1:i-1,i),
+*>  and tau in TAU(i-1).
+*>
+*>  If UPLO = 'L', the matrix Q is represented as a product of elementary
+*>  reflectors
+*>
+*>     Q = H(1) H(2) . . . H(nb).
+*>
+*>  Each H(i) has the form
+*>
+*>     H(i) = I - tau * v * v**H
+*>
+*>  where tau is a complex scalar, and v is a complex vector with
+*>  v(1:i) = 0 and v(i+1) = 1; v(i+1:n) is stored on exit in A(i+1:n,i),
+*>  and tau in TAU(i).
+*>
+*>  The elements of the vectors v together form the n-by-nb matrix V
+*>  which is needed, with W, to apply the transformation to the unreduced
+*>  part of the matrix, using a Hermitian rank-2k update of the form:
+*>  A := A - V*W**H - W*V**H.
+*>
+*>  The contents of A on exit are illustrated by the following examples
+*>  with n = 5 and nb = 2:
+*>
+*>  if UPLO = 'U':                       if UPLO = 'L':
+*>
+*>    (  a   a   a   v4  v5 )              (  d                  )
+*>    (      a   a   v4  v5 )              (  1   d              )
+*>    (          a   1   v5 )              (  v1  1   a          )
+*>    (              d   1  )              (  v1  v2  a   a      )
+*>    (                  d  )              (  v1  v2  a   a   a  )
+*>
+*>  where d denotes a diagonal element of the reduced matrix, a denotes
+*>  an element of the original matrix that is unchanged, and vi denotes
+*>  an element of the vector defining H(i).
+*> \endverbatim
+*>
+*  =====================================================================
+      SUBROUTINE ZLATRD( UPLO, N, NB, A, LDA, E, TAU, W, LDW )
 *
-         V1 = DCONJG( V( 1 ) )
-         T1 = TAU*DCONJG( V1 )
-         V2 = DCONJG( V( 2 ) )
-         T2 = TAU*DCONJG( V2 )
-         V3 = DCONJG( V( 3 ) )
-         T3 = TAU*DCONJG( V3 )
-         V4 = DCONJG( V( 4 ) )
-         T4 = TAU*DCONJG( V4 )
-         V5 = DCONJG( V( 5 ) )
-         T5 = TAU*DCONJG( V5 )
-         V6 = DCONJG( V( 6 ) )
-         T6 = TAU*DCONJG( V6 )
-         V7 = DCONJG( V( 7 ) )
-         T7 = TAU*DCONJG( V7 )
-         V8 = DCONJG( V( 8 ) )
-         T8 = TAU*DCONJG( V8 )
-         V9 = DCONJG( V( 9 ) )
-         T9 = TAU*DCONJG( V9 )
-         V10 = DCONJG( V( 10 ) )
-         T10 = TAU*DCONJG( V10 )
-         DO 200 J = 1, N
-            SUM = V1*C( 1, J ) + V2*C( 2, J ) + V3*C( 3, J ) +
-     $            V4*C( 4, J ) + V5*C( 5, J ) + V6*C( 6, J ) +
-     $            V7*C( 7, J ) + V8*C( 8, J ) + V9*C( 9, J ) +
-     $            V10*C( 10, J )
-            C( 1, J ) = C( 1, J ) - SUM*T1
-            C( 2, J ) = C( 2, J ) - SUM*T2
-            C( 3, J ) = C( 3, J ) - SUM*T3
-            C( 4, J ) = C( 4, J ) - SUM*T4
-            C( 5, J ) = C( 5, J ) - SUM*T5
-            C( 6, J ) = C( 6, J ) - SUM*T6
-            C( 7, J ) = C( 7, J ) - SUM*T7
-            C( 8, J ) = C( 8, J ) - SUM*T8
-            C( 9, J ) = C( 9, J ) - SUM*T9
-            C( 10, J ) = C( 10, J ) - SUM*T10
-  200    CONTINUE
-         GO TO 410
-      ELSE
+*  -- LAPACK auxiliary routine (version 3.7.0) --
+*  -- LAPACK is a software package provided by Univ. of Tennessee,    --
+*  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+*     December 2016
 *
-*        Form  C * H, where H has order n.
+*     .. Scalar Arguments ..
+      CHARACTER          UPLO
+      INTEGER            LDA, LDW, N, NB
+*     ..
+*     .. Array Arguments ..
+      DOUBLE PRECISION   E( * )
+      COMPLEX*16         A( LDA, * ), TAU( * ), W( LDW, * )
+*     ..
 *
-         GO TO ( 210, 230, 250, 270, 290, 310, 330, 350,
-     $           370, 390 )N
+*  =====================================================================
 *
-*        Code for general N
+*     .. Parameters ..
+      COMPLEX*16         ZERO, ONE, HALF
+      PARAMETER          ( ZERO = ( 0.0D+0, 0.0D+0 ),
+     $                   ONE = ( 1.0D+0, 0.0D+0 ),
+     $                   HALF = ( 0.5D+0, 0.0D+0 ) )
+*     ..
+*     .. Local Scalars ..
+      INTEGER            I, IW
+      COMPLEX*16         ALPHA
+*     ..
+*     .. External Subroutines ..
+      EXTERNAL           ZAXPY, ZGEMV, ZHEMV, ZLACGV, ZLARFG, ZSCAL
+*     ..
+*     .. External Functions ..
+      LOGICAL            LSAME
+      COMPLEX*16         ZDOTC
+      EXTERNAL           LSAME, ZDOTC
+*     ..
+*     .. Intrinsic Functions ..
+      INTRINSIC          DBLE, MIN
+*     ..
+*     .. Executable Statements ..
 *
-         CALL ZLARF( SIDE, M, N, V, 1, TAU, C, LDC, WORK )
-         GO TO 410
-  210    CONTINUE
+*     Quick return if possible
 *
-*        Special code for 1 x 1 Householder
+      IF( N.LE.0 )
+     $   RETURN
 *
-         T1 = ONE - TAU*V( 1 )*DCONJG( V( 1 ) )
-         DO 220 J = 1, M
-            C( J, 1 ) = T1*C( J, 1 )
-  220    CONTINUE
-         GO TO 410
-  230    CONTINUE
+      IF( LSAME( UPLO, 'U' ) ) THEN
 *
-*        Special code for 2 x 2 Householder
+*        Reduce last NB columns of upper triangle
 *
-         V1 = V( 1 )
-         T1 = TAU*DCONJG( V1 )
-         V2 = V( 2 )
-         T2 = TAU*DCONJG( V2 )
-         DO 240 J = 1, M
-            SUM = V1*C( J, 1 ) + V2*C( J, 2 )
-            C( J, 1 ) = C( J, 1 ) - SUM*T1
-            C( J, 2 ) = C( J, 2 ) - SUM*T2
-  240    CONTINUE
-         GO TO 410
-  250    CONTINUE
+         DO 10 I = N, N - NB + 1, -1
+            IW = I - N + NB
+            IF( I.LT.N ) THEN
 *
-*        Special code for 3 x 3 Householder
+*              Update A(1:i,i)
 *
-         V1 = V( 1 )
-         T1 = TAU*DCONJG( V1 )
-         V2 = V( 2 )
-         T2 = TAU*DCONJG( V2 )
-         V3 = V( 3 )
-         T3 = TAU*DCONJG( V3 )
-         DO 260 J = 1, M
-            SUM = V1*C( J, 1 ) + V2*C( J, 2 ) + V3*C( J, 3 )
-            C( J, 1 ) = C( J, 1 ) - SUM*T1
-            C( J, 2 ) = C( J, 2 ) - SUM*T2
-            C( J, 3 ) = C( J, 3 ) - SUM*T3
-  260    CONTINUE
-         GO TO 410
-  270    CONTINUE
+               A( I, I ) = DBLE( A( I, I ) )
+               CALL ZLACGV( N-I, W( I, IW+1 ), LDW )
+               CALL ZGEMV( 'No transpose', I, N-I, -ONE, A( 1, I+1 ),
+     $                     LDA, W( I, IW+1 ), LDW, ONE, A( 1, I ), 1 )
+               CALL ZLACGV( N-I, W( I, IW+1 ), LDW )
+               CALL ZLACGV( N-I, A( I, I+1 ), LDA )
+               CALL ZGEMV( 'No transpose', I, N-I, -ONE, W( 1, IW+1 ),
+     $                     LDW, A( I, I+1 ), LDA, ONE, A( 1, I ), 1 )
+               CALL ZLACGV( N-I, A( I, I+1 ), LDA )
+               A( I, I ) = DBLE( A( I, I ) )
+            END IF
+            IF( I.GT.1 ) THEN
 *
-*        Special code for 4 x 4 Householder
+*              Generate elementary reflector H(i) to annihilate
+*              A(1:i-2,i)
 *
-         V1 = V( 1 )
-         T1 = TAU*DCONJG( V1 )
-         V2 = V( 2 )
-         T2 = TAU*DCONJG( V2 )
-         V3 = V( 3 )
-         T3 = TAU*DCONJG( V3 )
-         V4 = V( 4 )
-         T4 = TAU*DCONJG( V4 )
-         DO 280 J = 1, M
-            SUM = V1*C( J, 1 ) + V2*C( J, 2 ) + V3*C( J, 3 ) +
-     $            V4*C( J, 4 )
-            C( J, 1 ) = C( J, 1 ) - SUM*T1
-            C( J, 2 ) = C( J, 2 ) - SUM*T2
-            C( J, 3 ) = C( J, 3 ) - SUM*T3
-            C( J, 4 ) = C( J, 4 ) - SUM*T4
-  280    CONTINUE
-         GO TO 410
-  290    CONTINUE
+               ALPHA = A( I-1, I )
+               CALL ZLARFG( I-1, ALPHA, A( 1, I ), 1, TAU( I-1 ) )
+               E( I-1 ) = ALPHA
+               A( I-1, I ) = ONE
 *
-*        Special code for 5 x 5 Householder
+*              Compute W(1:i-1,i)
 *
-         V1 = V( 1 )
-         T1 = TAU*DCONJG( V1 )
-         V2 = V( 2 )
-         T2 = TAU*DCONJG( V2 )
-         V3 = V( 3 )
-         T3 = TAU*DCONJG( V3 )
-         V4 = V( 4 )
-         T4 = TAU*DCONJG( V4 )
-         V5 = V( 5 )
-         T5 = TAU*DCONJG( V5 )
-         DO 300 J = 1, M
-            SUM = V1*C( J, 1 ) + V2*C( J, 2 ) + V3*C( J, 3 ) +
-     $            V4*C( J, 4 ) + V5*C( J, 5 )
-            C( J, 1 ) = C( J, 1 ) - SUM*T1
-            C( J, 2 ) = C( J, 2 ) - SUM*T2
-            C( J, 3 ) = C( J, 3 ) - SUM*T3
-            C( J, 4 ) = C( J, 4 ) - SUM*T4
-            C( J, 5 ) = C( J, 5 ) - SUM*T5
-  300    CONTINUE
-         GO TO 410
-  310    CONTINUE
+               CALL ZHEMV( 'Upper', I-1, ONE, A, LDA, A( 1, I ), 1,
+     $                     ZERO, W( 1, IW ), 1 )
+               IF( I.LT.N ) THEN
+                  CALL ZGEMV( 'Conjugate transpose', I-1, N-I, ONE,
+     $                        W( 1, IW+1 ), LDW, A( 1, I ), 1, ZERO,
+     $                        W( I+1, IW ), 1 )
+                  CALL ZGEMV( 'No transpose', I-1, N-I, -ONE,
+     $                        A( 1, I+1 ), LDA, W( I+1, IW ), 1, ONE,
+     $                        W( 1, IW ), 1 )
+                  CALL ZGEMV( 'Conjugate transpose', I-1, N-I, ONE,
+     $                        A( 1, I+1 ), LDA, A( 1, I ), 1, ZERO,
+     $                        W( I+1, IW ), 1 )
+                  CALL ZGEMV( 'No transpose', I-1, N-I, -ONE,
+     $                        W( 1, IW+1 ), LDW, W( I+1, IW ), 1, ONE,
+     $                        W( 1, IW ), 1 )
+               END IF
+               CALL ZSCAL( I-1, TAU( I-1 ), W( 1, IW ), 1 )
+               ALPHA = -HALF*TAU( I-1 )*ZDOTC( I-1, W( 1, IW ), 1,
+     $                 A( 1, I ), 1 )
+               CALL ZAXPY( I-1, ALPHA, A( 1, I ), 1, W( 1, IW ), 1 )
+            END IF
 *
-*        Special code for 6 x 6 Householder
+   10    CONTINUE
+      ELSE
 *
-         V1 = V( 1 )
-         T1 = TAU*DCONJG( V1 )
-         V2 = V( 2 )
-         T2 = TAU*DCONJG( V2 )
-         V3 = V( 3 )
-         T3 = TAU*DCONJG( V3 )
-         V4 = V( 4 )
-         T4 = TAU*DCONJG( V4 )
-         V5 = V( 5 )
-         T5 = TAU*DCONJG( V5 )
-         V6 = V( 6 )
-         T6 = TAU*DCONJG( V6 )
-         DO 320 J = 1, M
-            SUM = V1*C( J, 1 ) + V2*C( J, 2 ) + V3*C( J, 3 ) +
-     $            V4*C( J, 4 ) + V5*C( J, 5 ) + V6*C( J, 6 )
-            C( J, 1 ) = C( J, 1 ) - SUM*T1
-            C( J, 2 ) = C( J, 2 ) - SUM*T2
-            C( J, 3 ) = C( J, 3 ) - SUM*T3
-            C( J, 4 ) = C( J, 4 ) - SUM*T4
-            C( J, 5 ) = C( J, 5 ) - SUM*T5
-            C( J, 6 ) = C( J, 6 ) - SUM*T6
-  320    CONTINUE
-         GO TO 410
-  330    CONTINUE
+*        Reduce first NB columns of lower triangle
 *
-*        Special code for 7 x 7 Householder
+         DO 20 I = 1, NB
 *
-         V1 = V( 1 )
-         T1 = TAU*DCONJG( V1 )
-         V2 = V( 2 )
-         T2 = TAU*DCONJG( V2 )
-         V3 = V( 3 )
-         T3 = TAU*DCONJG( V3 )
-         V4 = V( 4 )
-         T4 = TAU*DCONJG( V4 )
-         V5 = V( 5 )
-         T5 = TAU*DCONJG( V5 )
-         V6 = V( 6 )
-         T6 = TAU*DCONJG( V6 )
-         V7 = V( 7 )
-         T7 = TAU*DCONJG( V7 )
-         DO 340 J = 1, M
-            SUM = V1*C( J, 1 ) + V2*C( J, 2 ) + V3*C( J, 3 ) +
-     $            V4*C( J, 4 ) + V5*C( J, 5 ) + V6*C( J, 6 ) +
-     $            V7*C( J, 7 )
-            C( J, 1 ) = C( J, 1 ) - SUM*T1
-            C( J, 2 ) = C( J, 2 ) - SUM*T2
-            C( J, 3 ) = C( J, 3 ) - SUM*T3
-            C( J, 4 ) = C( J, 4 ) - SUM*T4
-            C( J, 5 ) = C( J, 5 ) - SUM*T5
-            C( J, 6 ) = C( J, 6 ) - SUM*T6
-            C( J, 7 ) = C( J, 7 ) - SUM*T7
-  340    CONTINUE
-         GO TO 410
-  350    CONTINUE
+*           Update A(i:n,i)
 *
-*        Special code for 8 x 8 Householder
+            A( I, I ) = DBLE( A( I, I ) )
+            CALL ZLACGV( I-1, W( I, 1 ), LDW )
+            CALL ZGEMV( 'No transpose', N-I+1, I-1, -ONE, A( I, 1 ),
+     $                  LDA, W( I, 1 ), LDW, ONE, A( I, I ), 1 )
+            CALL ZLACGV( I-1, W( I, 1 ), LDW )
+            CALL ZLACGV( I-1, A( I, 1 ), LDA )
+            CALL ZGEMV( 'No transpose', N-I+1, I-1, -ONE, W( I, 1 ),
+     $                  LDW, A( I, 1 ), LDA, ONE, A( I, I ), 1 )
+            CALL ZLACGV( I-1, A( I, 1 ), LDA )
+            A( I, I ) = DBLE( A( I, I ) )
+            IF( I.LT.N ) THEN
 *
-         V1 = V( 1 )
-         T1 = TAU*DCONJG( V1 )
-         V2 = V( 2 )
-         T2 = TAU*DCONJG( V2 )
-         V3 = V( 3 )
-         T3 = TAU*DCONJG( V3 )
-         V4 = V( 4 )
-         T4 = TAU*DCONJG( V4 )
-         V5 = V( 5 )
-         T5 = TAU*DCONJG( V5 )
-         V6 = V( 6 )
-         T6 = TAU*DCONJG( V6 )
-         V7 = V( 7 )
-         T7 = TAU*DCONJG( V7 )
-         V8 = V( 8 )
-         T8 = TAU*DCONJG( V8 )
-         DO 360 J = 1, M
-            SUM = V1*C( J, 1 ) + V2*C( J, 2 ) + V3*C( J, 3 ) +
-     $            V4*C( J, 4 ) + V5*C( J, 5 ) + V6*C( J, 6 ) +
-     $            V7*C( J, 7 ) + V8*C( J, 8 )
-            C( J, 1 ) = C( J, 1 ) - SUM*T1
-            C( J, 2 ) = C( J, 2 ) - SUM*T2
-            C( J, 3 ) = C( J, 3 ) - SUM*T3
-            C( J, 4 ) = C( J, 4 ) - SUM*T4
-            C( J, 5 ) = C( J, 5 ) - SUM*T5
-            C( J, 6 ) = C( J, 6 ) - SUM*T6
-            C( J, 7 ) = C( J, 7 ) - SUM*T7
-            C( J, 8 ) = C( J, 8 ) - SUM*T8
-  360    CONTINUE
-         GO TO 410
-  370    CONTINUE
+*              Generate elementary reflector H(i) to annihilate
+*              A(i+2:n,i)
 *
-*        Special code for 9 x 9 Householder
+               ALPHA = A( I+1, I )
+               CALL ZLARFG( N-I, ALPHA, A( MIN( I+2, N ), I ), 1,
+     $                      TAU( I ) )
+               E( I ) = ALPHA
+               A( I+1, I ) = ONE
 *
-         V1 = V( 1 )
-         T1 = TAU*DCONJG( V1 )
-         V2 = V( 2 )
-         T2 = TAU*DCONJG( V2 )
-         V3 = V( 3 )
-         T3 = TAU*DCONJG( V3 )
-         V4 = V( 4 )
-         T4 = TAU*DCONJG( V4 )
-         V5 = V( 5 )
-         T5 = TAU*DCONJG( V5 )
-         V6 = V( 6 )
-         T6 = TAU*DCONJG( V6 )
-         V7 = V( 7 )
-         T7 = TAU*DCONJG( V7 )
-         V8 = V( 8 )
-         T8 = TAU*DCONJG( V8 )
-         V9 = V( 9 )
-         T9 = TAU*DCONJG( V9 )
-         DO 380 J = 1, M
-            SUM = V1*C( J, 1 ) + V2*C( J, 2 ) + V3*C( J, 3 ) +
-     $            V4*C( J, 4 ) + V5*C( J, 5 ) + V6*C( J, 6 ) +
-     $            V7*C( J, 7 ) + V8*C( J, 8 ) + V9*C( J, 9 )
-            C( J, 1 ) = C( J, 1 ) - SUM*T1
-            C( J, 2 ) = C( J, 2 ) - SUM*T2
-            C( J, 3 ) = C( J, 3 ) - SUM*T3
-            C( J, 4 ) = C( J, 4 ) - SUM*T4
-            C( J, 5 ) = C( J, 5 ) - SUM*T5
-            C( J, 6 ) = C( J, 6 ) - SUM*T6
-            C( J, 7 ) = C( J, 7 ) - SUM*T7
-            C( J, 8 ) = C( J, 8 ) - SUM*T8
-            C( J, 9 ) = C( J, 9 ) - SUM*T9
-  380    CONTINUE
-         GO TO 410
-  390    CONTINUE
+*              Compute W(i+1:n,i)
 *
-*        Special code for 10 x 10 Householder
+               CALL ZHEMV( 'Lower', N-I, ONE, A( I+1, I+1 ), LDA,
+     $                     A( I+1, I ), 1, ZERO, W( I+1, I ), 1 )
+               CALL ZGEMV( 'Conjugate transpose', N-I, I-1, ONE,
+     $                     W( I+1, 1 ), LDW, A( I+1, I ), 1, ZERO,
+     $                     W( 1, I ), 1 )
+               CALL ZGEMV( 'No transpose', N-I, I-1, -ONE, A( I+1, 1 ),
+     $                     LDA, W( 1, I ), 1, ONE, W( I+1, I ), 1 )
+               CALL ZGEMV( 'Conjugate transpose', N-I, I-1, ONE,
+     $                     A( I+1, 1 ), LDA, A( I+1, I ), 1, ZERO,
+     $                     W( 1, I ), 1 )
+               CALL ZGEMV( 'No transpose', N-I, I-1, -ONE, W( I+1, 1 ),
+     $                     LDW, W( 1, I ), 1, ONE, W( I+1, I ), 1 )
+               CALL ZSCAL( N-I, TAU( I ), W( I+1, I ), 1 )
+               ALPHA = -HALF*TAU( I )*ZDOTC( N-I, W( I+1, I ), 1,
+     $                 A( I+1, I ), 1 )
+               CALL ZAXPY( N-I, ALPHA, A( I+1, I ), 1, W( I+1, I ), 1 )
+            END IF
 *
-         V1 = V( 1 )
-         T1 = TAU*DCONJG( V1 )
-         V2 = V( 2 )
-         T2 = TAU*DCONJG( V2 )
-         V3 = V( 3 )
-         T3 = TAU*DCONJG( V3 )
-         V4 = V( 4 )
-         T4 = TAU*DCONJG( V4 )
-         V5 = V( 5 )
-         T5 = TAU*DCONJG( V5 )
-         V6 = V( 6 )
-         T6 = TAU*DCONJG( V6 )
-         V7 = V( 7 )
-         T7 = TAU*DCONJG( V7 )
-         V8 = V( 8 )
-         T8 = TAU*DCONJG( V8 )
-         V9 = V( 9 )
-         T9 = TAU*DCONJG( V9 )
-         V10 = V( 10 )
-         T10 = TAU*DCONJG( V10 )
-         DO 400 J = 1, M
-            SUM = V1*C( J, 1 ) + V2*C( J, 2 ) + V3*C( J, 3 ) +
-     $            V4*C( J, 4 ) + V5*C( J, 5 ) + V6*C( J, 6 ) +
-     $            V7*C( J, 7 ) + V8*C( J, 8 ) + V9*C( J, 9 ) +
-     $            V10*C( J, 10 )
-            C( J, 1 ) = C( J, 1 ) - SUM*T1
-            C( J, 2 ) = C( J, 2 ) - SUM*T2
-            C( J, 3 ) = C( J, 3 ) - SUM*T3
-            C( J, 4 ) = C( J, 4 ) - SUM*T4
-            C( J, 5 ) = C( J, 5 ) - SUM*T5
-            C( J, 6 ) = C( J, 6 ) - SUM*T6
-            C( J, 7 ) = C( J, 7 ) - SUM*T7
-            C( J, 8 ) = C( J, 8 ) - SUM*T8
-            C( J, 9 ) = C( J, 9 ) - SUM*T9
-            C( J, 10 ) = C( J, 10 ) - SUM*T10
-  400    CONTINUE
-         GO TO 410
+   20    CONTINUE
       END IF
-  410 CONTINUE
+*
       RETURN
 *
-*     End of ZLARFX
+*     End of ZLATRD
 *
       END
-*> \brief \b ZLARTG generates a plane rotation with real cosine and complex sine.
+*> \brief \b ZLATRS solves a triangular system of equations with the scale factor set to prevent overflow.
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download ZLARTG + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/zlartg.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/zlartg.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/zlartg.f"> 
+*> Download ZLATRS + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/zlatrs.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/zlatrs.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/zlatrs.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
-*       SUBROUTINE ZLARTG( F, G, CS, SN, R )
-* 
+*       SUBROUTINE ZLATRS( UPLO, TRANS, DIAG, NORMIN, N, A, LDA, X, SCALE,
+*                          CNORM, INFO )
+*
 *       .. Scalar Arguments ..
-*       DOUBLE PRECISION   CS
-*       COMPLEX*16         F, G, R, SN
+*       CHARACTER          DIAG, NORMIN, TRANS, UPLO
+*       INTEGER            INFO, LDA, N
+*       DOUBLE PRECISION   SCALE
+*       ..
+*       .. Array Arguments ..
+*       DOUBLE PRECISION   CNORM( * )
+*       COMPLEX*16         A( LDA, * ), X( * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
 *>
 *> \verbatim
 *>
-*> ZLARTG generates a plane rotation so that
+*> ZLATRS solves one of the triangular systems
 *>
-*>    [  CS  SN  ]     [ F ]     [ R ]
-*>    [  __      ]  .  [   ]  =  [   ]   where CS**2 + |SN|**2 = 1.
-*>    [ -SN  CS  ]     [ G ]     [ 0 ]
+*>    A * x = s*b,  A**T * x = s*b,  or  A**H * x = s*b,
 *>
-*> This is a faster version of the BLAS1 routine ZROTG, except for
-*> the following differences:
-*>    F and G are unchanged on return.
-*>    If G=0, then CS=1 and SN=0.
-*>    If F=0, then CS=0 and SN is chosen so that R is real.
+*> with scaling to prevent overflow.  Here A is an upper or lower
+*> triangular matrix, A**T denotes the transpose of A, A**H denotes the
+*> conjugate transpose of A, x and b are n-element vectors, and s is a
+*> scaling factor, usually less than or equal to 1, chosen so that the
+*> components of x will be less than the overflow threshold.  If the
+*> unscaled problem will not cause overflow, the Level 2 BLAS routine
+*> ZTRSV is called. If the matrix A is singular (A(j,j) = 0 for some j),
+*> then s is set to 0 and a non-trivial solution to A*x = 0 is returned.
+*> \endverbatim
+*
+*  Arguments:
+*  ==========
+*
+*> \param[in] UPLO
+*> \verbatim
+*>          UPLO is CHARACTER*1
+*>          Specifies whether the matrix A is upper or lower triangular.
+*>          = 'U':  Upper triangular
+*>          = 'L':  Lower triangular
+*> \endverbatim
+*>
+*> \param[in] TRANS
+*> \verbatim
+*>          TRANS is CHARACTER*1
+*>          Specifies the operation applied to A.
+*>          = 'N':  Solve A * x = s*b     (No transpose)
+*>          = 'T':  Solve A**T * x = s*b  (Transpose)
+*>          = 'C':  Solve A**H * x = s*b  (Conjugate transpose)
+*> \endverbatim
+*>
+*> \param[in] DIAG
+*> \verbatim
+*>          DIAG is CHARACTER*1
+*>          Specifies whether or not the matrix A is unit triangular.
+*>          = 'N':  Non-unit triangular
+*>          = 'U':  Unit triangular
+*> \endverbatim
+*>
+*> \param[in] NORMIN
+*> \verbatim
+*>          NORMIN is CHARACTER*1
+*>          Specifies whether CNORM has been set or not.
+*>          = 'Y':  CNORM contains the column norms on entry
+*>          = 'N':  CNORM is not set on entry.  On exit, the norms will
+*>                  be computed and stored in CNORM.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*>          N is INTEGER
+*>          The order of the matrix A.  N >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*>          A is COMPLEX*16 array, dimension (LDA,N)
+*>          The triangular matrix A.  If UPLO = 'U', the leading n by n
+*>          upper triangular part of the array A contains the upper
+*>          triangular matrix, and the strictly lower triangular part of
+*>          A is not referenced.  If UPLO = 'L', the leading n by n lower
+*>          triangular part of the array A contains the lower triangular
+*>          matrix, and the strictly upper triangular part of A is not
+*>          referenced.  If DIAG = 'U', the diagonal elements of A are
+*>          also not referenced and are assumed to be 1.
 *> \endverbatim
-*
-*  Arguments:
-*  ==========
-*
-*> \param[in] F
+*>
+*> \param[in] LDA
 *> \verbatim
-*>          F is COMPLEX*16
-*>          The first component of vector to be rotated.
+*>          LDA is INTEGER
+*>          The leading dimension of the array A.  LDA >= max (1,N).
 *> \endverbatim
 *>
-*> \param[in] G
+*> \param[in,out] X
 *> \verbatim
-*>          G is COMPLEX*16
-*>          The second component of vector to be rotated.
+*>          X is COMPLEX*16 array, dimension (N)
+*>          On entry, the right hand side b of the triangular system.
+*>          On exit, X is overwritten by the solution vector x.
 *> \endverbatim
 *>
-*> \param[out] CS
+*> \param[out] SCALE
 *> \verbatim
-*>          CS is DOUBLE PRECISION
-*>          The cosine of the rotation.
+*>          SCALE is DOUBLE PRECISION
+*>          The scaling factor s for the triangular system
+*>             A * x = s*b,  A**T * x = s*b,  or  A**H * x = s*b.
+*>          If SCALE = 0, the matrix A is singular or badly scaled, and
+*>          the vector x is an exact or approximate solution to A*x = 0.
 *> \endverbatim
 *>
-*> \param[out] SN
+*> \param[in,out] CNORM
 *> \verbatim
-*>          SN is COMPLEX*16
-*>          The sine of the rotation.
+*>          CNORM is DOUBLE PRECISION array, dimension (N)
+*>
+*>          If NORMIN = 'Y', CNORM is an input argument and CNORM(j)
+*>          contains the norm of the off-diagonal part of the j-th column
+*>          of A.  If TRANS = 'N', CNORM(j) must be greater than or equal
+*>          to the infinity-norm, and if TRANS = 'T' or 'C', CNORM(j)
+*>          must be greater than or equal to the 1-norm.
+*>
+*>          If NORMIN = 'N', CNORM is an output argument and CNORM(j)
+*>          returns the 1-norm of the offdiagonal part of the j-th column
+*>          of A.
 *> \endverbatim
 *>
-*> \param[out] R
+*> \param[out] INFO
 *> \verbatim
-*>          R is COMPLEX*16
-*>          The nonzero component of the rotated vector.
+*>          INFO is INTEGER
+*>          = 0:  successful exit
+*>          < 0:  if INFO = -k, the k-th argument had an illegal value
 *> \endverbatim
 *
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date November 2013
+*> \date December 2016
 *
 *> \ingroup complex16OTHERauxiliary
 *
@@ -21463,1554 +38368,1513 @@
 *>
 *> \verbatim
 *>
-*>  3-5-96 - Modified with a new algorithm by W. Kahan and J. Demmel
+*>  A rough bound on x is computed; if that is less than overflow, ZTRSV
+*>  is called, otherwise, specific code is used which checks for possible
+*>  overflow or divide-by-zero at every operation.
 *>
-*>  This version has a few statements commented out for thread safety
-*>  (machine parameters are computed on each entry). 10 feb 03, SJH.
+*>  A columnwise scheme is used for solving A*x = b.  The basic algorithm
+*>  if A is lower triangular is
+*>
+*>       x[1:n] := b[1:n]
+*>       for j = 1, ..., n
+*>            x(j) := x(j) / A(j,j)
+*>            x[j+1:n] := x[j+1:n] - x(j) * A[j+1:n,j]
+*>       end
+*>
+*>  Define bounds on the components of x after j iterations of the loop:
+*>     M(j) = bound on x[1:j]
+*>     G(j) = bound on x[j+1:n]
+*>  Initially, let M(0) = 0 and G(0) = max{x(i), i=1,...,n}.
+*>
+*>  Then for iteration j+1 we have
+*>     M(j+1) <= G(j) / | A(j+1,j+1) |
+*>     G(j+1) <= G(j) + M(j+1) * | A[j+2:n,j+1] |
+*>            <= G(j) ( 1 + CNORM(j+1) / | A(j+1,j+1) | )
+*>
+*>  where CNORM(j+1) is greater than or equal to the infinity-norm of
+*>  column j+1 of A, not counting the diagonal.  Hence
+*>
+*>     G(j) <= G(0) product ( 1 + CNORM(i) / | A(i,i) | )
+*>                  1<=i<=j
+*>  and
+*>
+*>     |x(j)| <= ( G(0) / |A(j,j)| ) product ( 1 + CNORM(i) / |A(i,i)| )
+*>                                   1<=i< j
+*>
+*>  Since |x(j)| <= M(j), we use the Level 2 BLAS routine ZTRSV if the
+*>  reciprocal of the largest M(j), j=1,..,n, is larger than
+*>  max(underflow, 1/overflow).
+*>
+*>  The bound on x(j) is also used to determine when a step in the
+*>  columnwise method can be performed without fear of overflow.  If
+*>  the computed bound is greater than a large constant, x is scaled to
+*>  prevent overflow, but if the bound overflows, x is set to 0, x(j) to
+*>  1, and scale to 0, and a non-trivial solution to A*x = 0 is found.
+*>
+*>  Similarly, a row-wise scheme is used to solve A**T *x = b  or
+*>  A**H *x = b.  The basic algorithm for A upper triangular is
+*>
+*>       for j = 1, ..., n
+*>            x(j) := ( b(j) - A[1:j-1,j]' * x[1:j-1] ) / A(j,j)
+*>       end
+*>
+*>  We simultaneously compute two bounds
+*>       G(j) = bound on ( b(i) - A[1:i-1,i]' * x[1:i-1] ), 1<=i<=j
+*>       M(j) = bound on x(i), 1<=i<=j
+*>
+*>  The initial values are G(0) = 0, M(0) = max{b(i), i=1,..,n}, and we
+*>  add the constraint G(j) >= G(j-1) and M(j) >= M(j-1) for j >= 1.
+*>  Then the bound on x(j) is
+*>
+*>       M(j) <= M(j-1) * ( 1 + CNORM(j) ) / | A(j,j) |
+*>
+*>            <= M(0) * product ( ( 1 + CNORM(i) ) / |A(i,i)| )
+*>                      1<=i<=j
+*>
+*>  and we can safely call ZTRSV if 1/M(n) and 1/G(n) are both greater
+*>  than max(underflow, 1/overflow).
 *> \endverbatim
 *>
 *  =====================================================================
-      SUBROUTINE ZLARTG( F, G, CS, SN, R )
+      SUBROUTINE ZLATRS( UPLO, TRANS, DIAG, NORMIN, N, A, LDA, X, SCALE,
+     $                   CNORM, INFO )
 *
-*  -- LAPACK auxiliary routine (version 3.5.0) --
+*  -- LAPACK auxiliary routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     November 2013
+*     December 2016
 *
 *     .. Scalar Arguments ..
-      DOUBLE PRECISION   CS
-      COMPLEX*16         F, G, R, SN
+      CHARACTER          DIAG, NORMIN, TRANS, UPLO
+      INTEGER            INFO, LDA, N
+      DOUBLE PRECISION   SCALE
+*     ..
+*     .. Array Arguments ..
+      DOUBLE PRECISION   CNORM( * )
+      COMPLEX*16         A( LDA, * ), X( * )
 *     ..
 *
 *  =====================================================================
 *
 *     .. Parameters ..
-      DOUBLE PRECISION   TWO, ONE, ZERO
-      PARAMETER          ( TWO = 2.0D+0, ONE = 1.0D+0, ZERO = 0.0D+0 )
-      COMPLEX*16         CZERO
-      PARAMETER          ( CZERO = ( 0.0D+0, 0.0D+0 ) )
+      DOUBLE PRECISION   ZERO, HALF, ONE, TWO
+      PARAMETER          ( ZERO = 0.0D+0, HALF = 0.5D+0, ONE = 1.0D+0,
+     $                   TWO = 2.0D+0 )
 *     ..
 *     .. Local Scalars ..
-*     LOGICAL            FIRST
-      INTEGER            COUNT, I
-      DOUBLE PRECISION   D, DI, DR, EPS, F2, F2S, G2, G2S, SAFMIN,
-     $                   SAFMN2, SAFMX2, SCALE
-      COMPLEX*16         FF, FS, GS
+      LOGICAL            NOTRAN, NOUNIT, UPPER
+      INTEGER            I, IMAX, J, JFIRST, JINC, JLAST
+      DOUBLE PRECISION   BIGNUM, GROW, REC, SMLNUM, TJJ, TMAX, TSCAL,
+     $                   XBND, XJ, XMAX
+      COMPLEX*16         CSUMJ, TJJS, USCAL, ZDUM
 *     ..
 *     .. External Functions ..
-      DOUBLE PRECISION   DLAMCH, DLAPY2
-      LOGICAL            DISNAN
-      EXTERNAL           DLAMCH, DLAPY2, DISNAN
+      LOGICAL            LSAME
+      INTEGER            IDAMAX, IZAMAX
+      DOUBLE PRECISION   DLAMCH, DZASUM
+      COMPLEX*16         ZDOTC, ZDOTU, ZLADIV
+      EXTERNAL           LSAME, IDAMAX, IZAMAX, DLAMCH, DZASUM, ZDOTC,
+     $                   ZDOTU, ZLADIV
+*     ..
+*     .. External Subroutines ..
+      EXTERNAL           DSCAL, XERBLA, ZAXPY, ZDSCAL, ZTRSV
 *     ..
 *     .. Intrinsic Functions ..
-      INTRINSIC          ABS, DBLE, DCMPLX, DCONJG, DIMAG, INT, LOG,
-     $                   MAX, SQRT
+      INTRINSIC          ABS, DBLE, DCMPLX, DCONJG, DIMAG, MAX, MIN
 *     ..
 *     .. Statement Functions ..
-      DOUBLE PRECISION   ABS1, ABSSQ
+      DOUBLE PRECISION   CABS1, CABS2
 *     ..
 *     .. Statement Function definitions ..
-      ABS1( FF ) = MAX( ABS( DBLE( FF ) ), ABS( DIMAG( FF ) ) )
-      ABSSQ( FF ) = DBLE( FF )**2 + DIMAG( FF )**2
+      CABS1( ZDUM ) = ABS( DBLE( ZDUM ) ) + ABS( DIMAG( ZDUM ) )
+      CABS2( ZDUM ) = ABS( DBLE( ZDUM ) / 2.D0 ) +
+     $                ABS( DIMAG( ZDUM ) / 2.D0 )
 *     ..
 *     .. Executable Statements ..
 *
-      SAFMIN = DLAMCH( 'S' )
-      EPS = DLAMCH( 'E' )
-      SAFMN2 = DLAMCH( 'B' )**INT( LOG( SAFMIN / EPS ) /
-     $         LOG( DLAMCH( 'B' ) ) / TWO )
-      SAFMX2 = ONE / SAFMN2
-      SCALE = MAX( ABS1( F ), ABS1( G ) )
-      FS = F
-      GS = G
-      COUNT = 0
-      IF( SCALE.GE.SAFMX2 ) THEN
-   10    CONTINUE
-         COUNT = COUNT + 1
-         FS = FS*SAFMN2
-         GS = GS*SAFMN2
-         SCALE = SCALE*SAFMN2
-         IF( SCALE.GE.SAFMX2 )
-     $      GO TO 10
-      ELSE IF( SCALE.LE.SAFMN2 ) THEN
-         IF( G.EQ.CZERO.OR.DISNAN( ABS( G ) ) ) THEN
-            CS = ONE
-            SN = CZERO
-            R = F
-            RETURN
+      INFO = 0
+      UPPER = LSAME( UPLO, 'U' )
+      NOTRAN = LSAME( TRANS, 'N' )
+      NOUNIT = LSAME( DIAG, 'N' )
+*
+*     Test the input parameters.
+*
+      IF( .NOT.UPPER .AND. .NOT.LSAME( UPLO, 'L' ) ) THEN
+         INFO = -1
+      ELSE IF( .NOT.NOTRAN .AND. .NOT.LSAME( TRANS, 'T' ) .AND. .NOT.
+     $         LSAME( TRANS, 'C' ) ) THEN
+         INFO = -2
+      ELSE IF( .NOT.NOUNIT .AND. .NOT.LSAME( DIAG, 'U' ) ) THEN
+         INFO = -3
+      ELSE IF( .NOT.LSAME( NORMIN, 'Y' ) .AND. .NOT.
+     $         LSAME( NORMIN, 'N' ) ) THEN
+         INFO = -4
+      ELSE IF( N.LT.0 ) THEN
+         INFO = -5
+      ELSE IF( LDA.LT.MAX( 1, N ) ) THEN
+         INFO = -7
+      END IF
+      IF( INFO.NE.0 ) THEN
+         CALL XERBLA( 'ZLATRS', -INFO )
+         RETURN
+      END IF
+*
+*     Quick return if possible
+*
+      IF( N.EQ.0 )
+     $   RETURN
+*
+*     Determine machine dependent parameters to control overflow.
+*
+      SMLNUM = DLAMCH( 'Safe minimum' )
+      BIGNUM = ONE / SMLNUM
+      CALL DLABAD( SMLNUM, BIGNUM )
+      SMLNUM = SMLNUM / DLAMCH( 'Precision' )
+      BIGNUM = ONE / SMLNUM
+      SCALE = ONE
+*
+      IF( LSAME( NORMIN, 'N' ) ) THEN
+*
+*        Compute the 1-norm of each column, not including the diagonal.
+*
+         IF( UPPER ) THEN
+*
+*           A is upper triangular.
+*
+            DO 10 J = 1, N
+               CNORM( J ) = DZASUM( J-1, A( 1, J ), 1 )
+   10       CONTINUE
+         ELSE
+*
+*           A is lower triangular.
+*
+            DO 20 J = 1, N - 1
+               CNORM( J ) = DZASUM( N-J, A( J+1, J ), 1 )
+   20       CONTINUE
+            CNORM( N ) = ZERO
          END IF
-   20    CONTINUE
-         COUNT = COUNT - 1
-         FS = FS*SAFMX2
-         GS = GS*SAFMX2
-         SCALE = SCALE*SAFMX2
-         IF( SCALE.LE.SAFMN2 )
-     $      GO TO 20
       END IF
-      F2 = ABSSQ( FS )
-      G2 = ABSSQ( GS )
-      IF( F2.LE.MAX( G2, ONE )*SAFMIN ) THEN
 *
-*        This is a rare case: F is very small.
+*     Scale the column norms by TSCAL if the maximum element in CNORM is
+*     greater than BIGNUM/2.
 *
-         IF( F.EQ.CZERO ) THEN
-            CS = ZERO
-            R = DLAPY2( DBLE( G ), DIMAG( G ) )
-*           Do complex/real division explicitly with two real divisions
-            D = DLAPY2( DBLE( GS ), DIMAG( GS ) )
-            SN = DCMPLX( DBLE( GS ) / D, -DIMAG( GS ) / D )
-            RETURN
+      IMAX = IDAMAX( N, CNORM, 1 )
+      TMAX = CNORM( IMAX )
+      IF( TMAX.LE.BIGNUM*HALF ) THEN
+         TSCAL = ONE
+      ELSE
+         TSCAL = HALF / ( SMLNUM*TMAX )
+         CALL DSCAL( N, TSCAL, CNORM, 1 )
+      END IF
+*
+*     Compute a bound on the computed solution vector to see if the
+*     Level 2 BLAS routine ZTRSV can be used.
+*
+      XMAX = ZERO
+      DO 30 J = 1, N
+         XMAX = MAX( XMAX, CABS2( X( J ) ) )
+   30 CONTINUE
+      XBND = XMAX
+*
+      IF( NOTRAN ) THEN
+*
+*        Compute the growth in A * x = b.
+*
+         IF( UPPER ) THEN
+            JFIRST = N
+            JLAST = 1
+            JINC = -1
+         ELSE
+            JFIRST = 1
+            JLAST = N
+            JINC = 1
          END IF
-         F2S = DLAPY2( DBLE( FS ), DIMAG( FS ) )
-*        G2 and G2S are accurate
-*        G2 is at least SAFMIN, and G2S is at least SAFMN2
-         G2S = SQRT( G2 )
-*        Error in CS from underflow in F2S is at most
-*        UNFL / SAFMN2 .lt. sqrt(UNFL*EPS) .lt. EPS
-*        If MAX(G2,ONE)=G2, then F2 .lt. G2*SAFMIN,
-*        and so CS .lt. sqrt(SAFMIN)
-*        If MAX(G2,ONE)=ONE, then F2 .lt. SAFMIN
-*        and so CS .lt. sqrt(SAFMIN)/SAFMN2 = sqrt(EPS)
-*        Therefore, CS = F2S/G2S / sqrt( 1 + (F2S/G2S)**2 ) = F2S/G2S
-         CS = F2S / G2S
-*        Make sure abs(FF) = 1
-*        Do complex/real division explicitly with 2 real divisions
-         IF( ABS1( F ).GT.ONE ) THEN
-            D = DLAPY2( DBLE( F ), DIMAG( F ) )
-            FF = DCMPLX( DBLE( F ) / D, DIMAG( F ) / D )
+*
+         IF( TSCAL.NE.ONE ) THEN
+            GROW = ZERO
+            GO TO 60
+         END IF
+*
+         IF( NOUNIT ) THEN
+*
+*           A is non-unit triangular.
+*
+*           Compute GROW = 1/G(j) and XBND = 1/M(j).
+*           Initially, G(0) = max{x(i), i=1,...,n}.
+*
+            GROW = HALF / MAX( XBND, SMLNUM )
+            XBND = GROW
+            DO 40 J = JFIRST, JLAST, JINC
+*
+*              Exit the loop if the growth factor is too small.
+*
+               IF( GROW.LE.SMLNUM )
+     $            GO TO 60
+*
+               TJJS = A( J, J )
+               TJJ = CABS1( TJJS )
+*
+               IF( TJJ.GE.SMLNUM ) THEN
+*
+*                 M(j) = G(j-1) / abs(A(j,j))
+*
+                  XBND = MIN( XBND, MIN( ONE, TJJ )*GROW )
+               ELSE
+*
+*                 M(j) could overflow, set XBND to 0.
+*
+                  XBND = ZERO
+               END IF
+*
+               IF( TJJ+CNORM( J ).GE.SMLNUM ) THEN
+*
+*                 G(j) = G(j-1)*( 1 + CNORM(j) / abs(A(j,j)) )
+*
+                  GROW = GROW*( TJJ / ( TJJ+CNORM( J ) ) )
+               ELSE
+*
+*                 G(j) could overflow, set GROW to 0.
+*
+                  GROW = ZERO
+               END IF
+   40       CONTINUE
+            GROW = XBND
          ELSE
-            DR = SAFMX2*DBLE( F )
-            DI = SAFMX2*DIMAG( F )
-            D = DLAPY2( DR, DI )
-            FF = DCMPLX( DR / D, DI / D )
+*
+*           A is unit triangular.
+*
+*           Compute GROW = 1/G(j), where G(0) = max{x(i), i=1,...,n}.
+*
+            GROW = MIN( ONE, HALF / MAX( XBND, SMLNUM ) )
+            DO 50 J = JFIRST, JLAST, JINC
+*
+*              Exit the loop if the growth factor is too small.
+*
+               IF( GROW.LE.SMLNUM )
+     $            GO TO 60
+*
+*              G(j) = G(j-1)*( 1 + CNORM(j) )
+*
+               GROW = GROW*( ONE / ( ONE+CNORM( J ) ) )
+   50       CONTINUE
          END IF
-         SN = FF*DCMPLX( DBLE( GS ) / G2S, -DIMAG( GS ) / G2S )
-         R = CS*F + SN*G
+   60    CONTINUE
+*
+      ELSE
+*
+*        Compute the growth in A**T * x = b  or  A**H * x = b.
+*
+         IF( UPPER ) THEN
+            JFIRST = 1
+            JLAST = N
+            JINC = 1
+         ELSE
+            JFIRST = N
+            JLAST = 1
+            JINC = -1
+         END IF
+*
+         IF( TSCAL.NE.ONE ) THEN
+            GROW = ZERO
+            GO TO 90
+         END IF
+*
+         IF( NOUNIT ) THEN
+*
+*           A is non-unit triangular.
+*
+*           Compute GROW = 1/G(j) and XBND = 1/M(j).
+*           Initially, M(0) = max{x(i), i=1,...,n}.
+*
+            GROW = HALF / MAX( XBND, SMLNUM )
+            XBND = GROW
+            DO 70 J = JFIRST, JLAST, JINC
+*
+*              Exit the loop if the growth factor is too small.
+*
+               IF( GROW.LE.SMLNUM )
+     $            GO TO 90
+*
+*              G(j) = max( G(j-1), M(j-1)*( 1 + CNORM(j) ) )
+*
+               XJ = ONE + CNORM( J )
+               GROW = MIN( GROW, XBND / XJ )
+*
+               TJJS = A( J, J )
+               TJJ = CABS1( TJJS )
+*
+               IF( TJJ.GE.SMLNUM ) THEN
+*
+*                 M(j) = M(j-1)*( 1 + CNORM(j) ) / abs(A(j,j))
+*
+                  IF( XJ.GT.TJJ )
+     $               XBND = XBND*( TJJ / XJ )
+               ELSE
+*
+*                 M(j) could overflow, set XBND to 0.
+*
+                  XBND = ZERO
+               END IF
+   70       CONTINUE
+            GROW = MIN( GROW, XBND )
+         ELSE
+*
+*           A is unit triangular.
+*
+*           Compute GROW = 1/G(j), where G(0) = max{x(i), i=1,...,n}.
+*
+            GROW = MIN( ONE, HALF / MAX( XBND, SMLNUM ) )
+            DO 80 J = JFIRST, JLAST, JINC
+*
+*              Exit the loop if the growth factor is too small.
+*
+               IF( GROW.LE.SMLNUM )
+     $            GO TO 90
+*
+*              G(j) = ( 1 + CNORM(j) )*G(j-1)
+*
+               XJ = ONE + CNORM( J )
+               GROW = GROW / XJ
+   80       CONTINUE
+         END IF
+   90    CONTINUE
+      END IF
+*
+      IF( ( GROW*TSCAL ).GT.SMLNUM ) THEN
+*
+*        Use the Level 2 BLAS solve if the reciprocal of the bound on
+*        elements of X is not too small.
+*
+         CALL ZTRSV( UPLO, TRANS, DIAG, N, A, LDA, X, 1 )
       ELSE
 *
-*        This is the most common case.
-*        Neither F2 nor F2/G2 are less than SAFMIN
-*        F2S cannot overflow, and it is accurate
+*        Use a Level 1 BLAS solve, scaling intermediate results.
+*
+         IF( XMAX.GT.BIGNUM*HALF ) THEN
+*
+*           Scale X so that its components are less than or equal to
+*           BIGNUM in absolute value.
+*
+            SCALE = ( BIGNUM*HALF ) / XMAX
+            CALL ZDSCAL( N, SCALE, X, 1 )
+            XMAX = BIGNUM
+         ELSE
+            XMAX = XMAX*TWO
+         END IF
+*
+         IF( NOTRAN ) THEN
+*
+*           Solve A * x = b
+*
+            DO 120 J = JFIRST, JLAST, JINC
+*
+*              Compute x(j) = b(j) / A(j,j), scaling x if necessary.
+*
+               XJ = CABS1( X( J ) )
+               IF( NOUNIT ) THEN
+                  TJJS = A( J, J )*TSCAL
+               ELSE
+                  TJJS = TSCAL
+                  IF( TSCAL.EQ.ONE )
+     $               GO TO 110
+               END IF
+               TJJ = CABS1( TJJS )
+               IF( TJJ.GT.SMLNUM ) THEN
+*
+*                    abs(A(j,j)) > SMLNUM:
 *
-         F2S = SQRT( ONE+G2 / F2 )
-*        Do the F2S(real)*FS(complex) multiply with two real multiplies
-         R = DCMPLX( F2S*DBLE( FS ), F2S*DIMAG( FS ) )
-         CS = ONE / F2S
-         D = F2 + G2
-*        Do complex/real division explicitly with two real divisions
-         SN = DCMPLX( DBLE( R ) / D, DIMAG( R ) / D )
-         SN = SN*DCONJG( GS )
-         IF( COUNT.NE.0 ) THEN
-            IF( COUNT.GT.0 ) THEN
-               DO 30 I = 1, COUNT
-                  R = R*SAFMX2
-   30          CONTINUE
-            ELSE
-               DO 40 I = 1, -COUNT
-                  R = R*SAFMN2
-   40          CONTINUE
-            END IF
-         END IF
-      END IF
-      RETURN
+                  IF( TJJ.LT.ONE ) THEN
+                     IF( XJ.GT.TJJ*BIGNUM ) THEN
 *
-*     End of ZLARTG
+*                          Scale x by 1/b(j).
 *
-      END
-*> \brief \b ZLASCL multiplies a general rectangular matrix by a real scalar defined as cto/cfrom.
+                        REC = ONE / XJ
+                        CALL ZDSCAL( N, REC, X, 1 )
+                        SCALE = SCALE*REC
+                        XMAX = XMAX*REC
+                     END IF
+                  END IF
+                  X( J ) = ZLADIV( X( J ), TJJS )
+                  XJ = CABS1( X( J ) )
+               ELSE IF( TJJ.GT.ZERO ) THEN
 *
-*  =========== DOCUMENTATION ===========
+*                    0 < abs(A(j,j)) <= SMLNUM:
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+                  IF( XJ.GT.TJJ*BIGNUM ) THEN
 *
-*> \htmlonly
-*> Download ZLASCL + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/zlascl.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/zlascl.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/zlascl.f"> 
-*> [TXT]</a>
-*> \endhtmlonly 
+*                       Scale x by (1/abs(x(j)))*abs(A(j,j))*BIGNUM
+*                       to avoid overflow when dividing by A(j,j).
 *
-*  Definition:
-*  ===========
+                     REC = ( TJJ*BIGNUM ) / XJ
+                     IF( CNORM( J ).GT.ONE ) THEN
 *
-*       SUBROUTINE ZLASCL( TYPE, KL, KU, CFROM, CTO, M, N, A, LDA, INFO )
-* 
-*       .. Scalar Arguments ..
-*       CHARACTER          TYPE
-*       INTEGER            INFO, KL, KU, LDA, M, N
-*       DOUBLE PRECISION   CFROM, CTO
-*       ..
-*       .. Array Arguments ..
-*       COMPLEX*16         A( LDA, * )
-*       ..
-*  
+*                          Scale by 1/CNORM(j) to avoid overflow when
+*                          multiplying x(j) times column j.
 *
-*> \par Purpose:
-*  =============
-*>
-*> \verbatim
-*>
-*> ZLASCL multiplies the M by N complex matrix A by the real scalar
-*> CTO/CFROM.  This is done without over/underflow as long as the final
-*> result CTO*A(I,J)/CFROM does not over/underflow. TYPE specifies that
-*> A may be full, upper triangular, lower triangular, upper Hessenberg,
-*> or banded.
-*> \endverbatim
+                        REC = REC / CNORM( J )
+                     END IF
+                     CALL ZDSCAL( N, REC, X, 1 )
+                     SCALE = SCALE*REC
+                     XMAX = XMAX*REC
+                  END IF
+                  X( J ) = ZLADIV( X( J ), TJJS )
+                  XJ = CABS1( X( J ) )
+               ELSE
 *
-*  Arguments:
-*  ==========
+*                    A(j,j) = 0:  Set x(1:n) = 0, x(j) = 1, and
+*                    scale = 0, and compute a solution to A*x = 0.
 *
-*> \param[in] TYPE
-*> \verbatim
-*>          TYPE is CHARACTER*1
-*>          TYPE indices the storage type of the input matrix.
-*>          = 'G':  A is a full matrix.
-*>          = 'L':  A is a lower triangular matrix.
-*>          = 'U':  A is an upper triangular matrix.
-*>          = 'H':  A is an upper Hessenberg matrix.
-*>          = 'B':  A is a symmetric band matrix with lower bandwidth KL
-*>                  and upper bandwidth KU and with the only the lower
-*>                  half stored.
-*>          = 'Q':  A is a symmetric band matrix with lower bandwidth KL
-*>                  and upper bandwidth KU and with the only the upper
-*>                  half stored.
-*>          = 'Z':  A is a band matrix with lower bandwidth KL and upper
-*>                  bandwidth KU. See ZGBTRF for storage details.
-*> \endverbatim
-*>
-*> \param[in] KL
-*> \verbatim
-*>          KL is INTEGER
-*>          The lower bandwidth of A.  Referenced only if TYPE = 'B',
-*>          'Q' or 'Z'.
-*> \endverbatim
-*>
-*> \param[in] KU
-*> \verbatim
-*>          KU is INTEGER
-*>          The upper bandwidth of A.  Referenced only if TYPE = 'B',
-*>          'Q' or 'Z'.
-*> \endverbatim
-*>
-*> \param[in] CFROM
-*> \verbatim
-*>          CFROM is DOUBLE PRECISION
-*> \endverbatim
-*>
-*> \param[in] CTO
-*> \verbatim
-*>          CTO is DOUBLE PRECISION
-*>
-*>          The matrix A is multiplied by CTO/CFROM. A(I,J) is computed
-*>          without over/underflow if the final result CTO*A(I,J)/CFROM
-*>          can be represented without over/underflow.  CFROM must be
-*>          nonzero.
-*> \endverbatim
-*>
-*> \param[in] M
-*> \verbatim
-*>          M is INTEGER
-*>          The number of rows of the matrix A.  M >= 0.
-*> \endverbatim
-*>
-*> \param[in] N
-*> \verbatim
-*>          N is INTEGER
-*>          The number of columns of the matrix A.  N >= 0.
-*> \endverbatim
-*>
-*> \param[in,out] A
-*> \verbatim
-*>          A is COMPLEX*16 array, dimension (LDA,N)
-*>          The matrix to be multiplied by CTO/CFROM.  See TYPE for the
-*>          storage type.
-*> \endverbatim
-*>
-*> \param[in] LDA
-*> \verbatim
-*>          LDA is INTEGER
-*>          The leading dimension of the array A.  LDA >= max(1,M).
-*> \endverbatim
-*>
-*> \param[out] INFO
-*> \verbatim
-*>          INFO is INTEGER
-*>          0  - successful exit
-*>          <0 - if INFO = -i, the i-th argument had an illegal value.
-*> \endverbatim
+                  DO 100 I = 1, N
+                     X( I ) = ZERO
+  100             CONTINUE
+                  X( J ) = ONE
+                  XJ = ONE
+                  SCALE = ZERO
+                  XMAX = ZERO
+               END IF
+  110          CONTINUE
 *
-*  Authors:
-*  ========
+*              Scale x if necessary to avoid overflow when adding a
+*              multiple of column j of A.
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+               IF( XJ.GT.ONE ) THEN
+                  REC = ONE / XJ
+                  IF( CNORM( J ).GT.( BIGNUM-XMAX )*REC ) THEN
 *
-*> \date September 2012
+*                    Scale x by 1/(2*abs(x(j))).
 *
-*> \ingroup complex16OTHERauxiliary
+                     REC = REC*HALF
+                     CALL ZDSCAL( N, REC, X, 1 )
+                     SCALE = SCALE*REC
+                  END IF
+               ELSE IF( XJ*CNORM( J ).GT.( BIGNUM-XMAX ) ) THEN
 *
-*  =====================================================================
-      SUBROUTINE ZLASCL( TYPE, KL, KU, CFROM, CTO, M, N, A, LDA, INFO )
+*                 Scale x by 1/2.
 *
-*  -- LAPACK auxiliary routine (version 3.4.2) --
-*  -- LAPACK is a software package provided by Univ. of Tennessee,    --
-*  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     September 2012
+                  CALL ZDSCAL( N, HALF, X, 1 )
+                  SCALE = SCALE*HALF
+               END IF
 *
-*     .. Scalar Arguments ..
-      CHARACTER          TYPE
-      INTEGER            INFO, KL, KU, LDA, M, N
-      DOUBLE PRECISION   CFROM, CTO
-*     ..
-*     .. Array Arguments ..
-      COMPLEX*16         A( LDA, * )
-*     ..
+               IF( UPPER ) THEN
+                  IF( J.GT.1 ) THEN
 *
-*  =====================================================================
+*                    Compute the update
+*                       x(1:j-1) := x(1:j-1) - x(j) * A(1:j-1,j)
 *
-*     .. Parameters ..
-      DOUBLE PRECISION   ZERO, ONE
-      PARAMETER          ( ZERO = 0.0D0, ONE = 1.0D0 )
-*     ..
-*     .. Local Scalars ..
-      LOGICAL            DONE
-      INTEGER            I, ITYPE, J, K1, K2, K3, K4
-      DOUBLE PRECISION   BIGNUM, CFROM1, CFROMC, CTO1, CTOC, MUL, SMLNUM
-*     ..
-*     .. External Functions ..
-      LOGICAL            LSAME, DISNAN
-      DOUBLE PRECISION   DLAMCH
-      EXTERNAL           LSAME, DLAMCH, DISNAN
-*     ..
-*     .. Intrinsic Functions ..
-      INTRINSIC          ABS, MAX, MIN
-*     ..
-*     .. External Subroutines ..
-      EXTERNAL           XERBLA
-*     ..
-*     .. Executable Statements ..
+                     CALL ZAXPY( J-1, -X( J )*TSCAL, A( 1, J ), 1, X,
+     $                           1 )
+                     I = IZAMAX( J-1, X, 1 )
+                     XMAX = CABS1( X( I ) )
+                  END IF
+               ELSE
+                  IF( J.LT.N ) THEN
 *
-*     Test the input arguments
+*                    Compute the update
+*                       x(j+1:n) := x(j+1:n) - x(j) * A(j+1:n,j)
 *
-      INFO = 0
+                     CALL ZAXPY( N-J, -X( J )*TSCAL, A( J+1, J ), 1,
+     $                           X( J+1 ), 1 )
+                     I = J + IZAMAX( N-J, X( J+1 ), 1 )
+                     XMAX = CABS1( X( I ) )
+                  END IF
+               END IF
+  120       CONTINUE
 *
-      IF( LSAME( TYPE, 'G' ) ) THEN
-         ITYPE = 0
-      ELSE IF( LSAME( TYPE, 'L' ) ) THEN
-         ITYPE = 1
-      ELSE IF( LSAME( TYPE, 'U' ) ) THEN
-         ITYPE = 2
-      ELSE IF( LSAME( TYPE, 'H' ) ) THEN
-         ITYPE = 3
-      ELSE IF( LSAME( TYPE, 'B' ) ) THEN
-         ITYPE = 4
-      ELSE IF( LSAME( TYPE, 'Q' ) ) THEN
-         ITYPE = 5
-      ELSE IF( LSAME( TYPE, 'Z' ) ) THEN
-         ITYPE = 6
-      ELSE
-         ITYPE = -1
-      END IF
+         ELSE IF( LSAME( TRANS, 'T' ) ) THEN
 *
-      IF( ITYPE.EQ.-1 ) THEN
-         INFO = -1
-      ELSE IF( CFROM.EQ.ZERO .OR. DISNAN(CFROM) ) THEN
-         INFO = -4
-      ELSE IF( DISNAN(CTO) ) THEN
-         INFO = -5
-      ELSE IF( M.LT.0 ) THEN
-         INFO = -6
-      ELSE IF( N.LT.0 .OR. ( ITYPE.EQ.4 .AND. N.NE.M ) .OR.
-     $         ( ITYPE.EQ.5 .AND. N.NE.M ) ) THEN
-         INFO = -7
-      ELSE IF( ITYPE.LE.3 .AND. LDA.LT.MAX( 1, M ) ) THEN
-         INFO = -9
-      ELSE IF( ITYPE.GE.4 ) THEN
-         IF( KL.LT.0 .OR. KL.GT.MAX( M-1, 0 ) ) THEN
-            INFO = -2
-         ELSE IF( KU.LT.0 .OR. KU.GT.MAX( N-1, 0 ) .OR.
-     $            ( ( ITYPE.EQ.4 .OR. ITYPE.EQ.5 ) .AND. KL.NE.KU ) )
-     $             THEN
-            INFO = -3
-         ELSE IF( ( ITYPE.EQ.4 .AND. LDA.LT.KL+1 ) .OR.
-     $            ( ITYPE.EQ.5 .AND. LDA.LT.KU+1 ) .OR.
-     $            ( ITYPE.EQ.6 .AND. LDA.LT.2*KL+KU+1 ) ) THEN
-            INFO = -9
-         END IF
-      END IF
+*           Solve A**T * x = b
 *
-      IF( INFO.NE.0 ) THEN
-         CALL XERBLA( 'ZLASCL', -INFO )
-         RETURN
-      END IF
+            DO 170 J = JFIRST, JLAST, JINC
 *
-*     Quick return if possible
+*              Compute x(j) = b(j) - sum A(k,j)*x(k).
+*                                    k<>j
 *
-      IF( N.EQ.0 .OR. M.EQ.0 )
-     $   RETURN
+               XJ = CABS1( X( J ) )
+               USCAL = TSCAL
+               REC = ONE / MAX( XMAX, ONE )
+               IF( CNORM( J ).GT.( BIGNUM-XJ )*REC ) THEN
 *
-*     Get machine parameters
+*                 If x(j) could overflow, scale x by 1/(2*XMAX).
 *
-      SMLNUM = DLAMCH( 'S' )
-      BIGNUM = ONE / SMLNUM
+                  REC = REC*HALF
+                  IF( NOUNIT ) THEN
+                     TJJS = A( J, J )*TSCAL
+                  ELSE
+                     TJJS = TSCAL
+                  END IF
+                  TJJ = CABS1( TJJS )
+                  IF( TJJ.GT.ONE ) THEN
 *
-      CFROMC = CFROM
-      CTOC = CTO
+*                       Divide by A(j,j) when scaling x if A(j,j) > 1.
 *
-   10 CONTINUE
-      CFROM1 = CFROMC*SMLNUM
-      IF( CFROM1.EQ.CFROMC ) THEN
-!        CFROMC is an inf.  Multiply by a correctly signed zero for
-!        finite CTOC, or a NaN if CTOC is infinite.
-         MUL = CTOC / CFROMC
-         DONE = .TRUE.
-         CTO1 = CTOC
-      ELSE
-         CTO1 = CTOC / BIGNUM
-         IF( CTO1.EQ.CTOC ) THEN
-!           CTOC is either 0 or an inf.  In both cases, CTOC itself
-!           serves as the correct multiplication factor.
-            MUL = CTOC
-            DONE = .TRUE.
-            CFROMC = ONE
-         ELSE IF( ABS( CFROM1 ).GT.ABS( CTOC ) .AND. CTOC.NE.ZERO ) THEN
-            MUL = SMLNUM
-            DONE = .FALSE.
-            CFROMC = CFROM1
-         ELSE IF( ABS( CTO1 ).GT.ABS( CFROMC ) ) THEN
-            MUL = BIGNUM
-            DONE = .FALSE.
-            CTOC = CTO1
-         ELSE
-            MUL = CTOC / CFROMC
-            DONE = .TRUE.
-         END IF
-      END IF
+                     REC = MIN( ONE, REC*TJJ )
+                     USCAL = ZLADIV( USCAL, TJJS )
+                  END IF
+                  IF( REC.LT.ONE ) THEN
+                     CALL ZDSCAL( N, REC, X, 1 )
+                     SCALE = SCALE*REC
+                     XMAX = XMAX*REC
+                  END IF
+               END IF
 *
-      IF( ITYPE.EQ.0 ) THEN
+               CSUMJ = ZERO
+               IF( USCAL.EQ.DCMPLX( ONE ) ) THEN
 *
-*        Full matrix
+*                 If the scaling needed for A in the dot product is 1,
+*                 call ZDOTU to perform the dot product.
 *
-         DO 30 J = 1, N
-            DO 20 I = 1, M
-               A( I, J ) = A( I, J )*MUL
-   20       CONTINUE
-   30    CONTINUE
+                  IF( UPPER ) THEN
+                     CSUMJ = ZDOTU( J-1, A( 1, J ), 1, X, 1 )
+                  ELSE IF( J.LT.N ) THEN
+                     CSUMJ = ZDOTU( N-J, A( J+1, J ), 1, X( J+1 ), 1 )
+                  END IF
+               ELSE
 *
-      ELSE IF( ITYPE.EQ.1 ) THEN
+*                 Otherwise, use in-line code for the dot product.
 *
-*        Lower triangular matrix
+                  IF( UPPER ) THEN
+                     DO 130 I = 1, J - 1
+                        CSUMJ = CSUMJ + ( A( I, J )*USCAL )*X( I )
+  130                CONTINUE
+                  ELSE IF( J.LT.N ) THEN
+                     DO 140 I = J + 1, N
+                        CSUMJ = CSUMJ + ( A( I, J )*USCAL )*X( I )
+  140                CONTINUE
+                  END IF
+               END IF
 *
-         DO 50 J = 1, N
-            DO 40 I = J, M
-               A( I, J ) = A( I, J )*MUL
-   40       CONTINUE
-   50    CONTINUE
+               IF( USCAL.EQ.DCMPLX( TSCAL ) ) THEN
 *
-      ELSE IF( ITYPE.EQ.2 ) THEN
+*                 Compute x(j) := ( x(j) - CSUMJ ) / A(j,j) if 1/A(j,j)
+*                 was not used to scale the dotproduct.
 *
-*        Upper triangular matrix
+                  X( J ) = X( J ) - CSUMJ
+                  XJ = CABS1( X( J ) )
+                  IF( NOUNIT ) THEN
+                     TJJS = A( J, J )*TSCAL
+                  ELSE
+                     TJJS = TSCAL
+                     IF( TSCAL.EQ.ONE )
+     $                  GO TO 160
+                  END IF
 *
-         DO 70 J = 1, N
-            DO 60 I = 1, MIN( J, M )
-               A( I, J ) = A( I, J )*MUL
-   60       CONTINUE
-   70    CONTINUE
+*                    Compute x(j) = x(j) / A(j,j), scaling if necessary.
 *
-      ELSE IF( ITYPE.EQ.3 ) THEN
+                  TJJ = CABS1( TJJS )
+                  IF( TJJ.GT.SMLNUM ) THEN
 *
-*        Upper Hessenberg matrix
+*                       abs(A(j,j)) > SMLNUM:
 *
-         DO 90 J = 1, N
-            DO 80 I = 1, MIN( J+1, M )
-               A( I, J ) = A( I, J )*MUL
-   80       CONTINUE
-   90    CONTINUE
+                     IF( TJJ.LT.ONE ) THEN
+                        IF( XJ.GT.TJJ*BIGNUM ) THEN
 *
-      ELSE IF( ITYPE.EQ.4 ) THEN
+*                             Scale X by 1/abs(x(j)).
 *
-*        Lower half of a symmetric band matrix
+                           REC = ONE / XJ
+                           CALL ZDSCAL( N, REC, X, 1 )
+                           SCALE = SCALE*REC
+                           XMAX = XMAX*REC
+                        END IF
+                     END IF
+                     X( J ) = ZLADIV( X( J ), TJJS )
+                  ELSE IF( TJJ.GT.ZERO ) THEN
 *
-         K3 = KL + 1
-         K4 = N + 1
-         DO 110 J = 1, N
-            DO 100 I = 1, MIN( K3, K4-J )
-               A( I, J ) = A( I, J )*MUL
-  100       CONTINUE
-  110    CONTINUE
+*                       0 < abs(A(j,j)) <= SMLNUM:
 *
-      ELSE IF( ITYPE.EQ.5 ) THEN
+                     IF( XJ.GT.TJJ*BIGNUM ) THEN
 *
-*        Upper half of a symmetric band matrix
+*                          Scale x by (1/abs(x(j)))*abs(A(j,j))*BIGNUM.
 *
-         K1 = KU + 2
-         K3 = KU + 1
-         DO 130 J = 1, N
-            DO 120 I = MAX( K1-J, 1 ), K3
-               A( I, J ) = A( I, J )*MUL
-  120       CONTINUE
-  130    CONTINUE
+                        REC = ( TJJ*BIGNUM ) / XJ
+                        CALL ZDSCAL( N, REC, X, 1 )
+                        SCALE = SCALE*REC
+                        XMAX = XMAX*REC
+                     END IF
+                     X( J ) = ZLADIV( X( J ), TJJS )
+                  ELSE
 *
-      ELSE IF( ITYPE.EQ.6 ) THEN
+*                       A(j,j) = 0:  Set x(1:n) = 0, x(j) = 1, and
+*                       scale = 0 and compute a solution to A**T *x = 0.
 *
-*        Band matrix
+                     DO 150 I = 1, N
+                        X( I ) = ZERO
+  150                CONTINUE
+                     X( J ) = ONE
+                     SCALE = ZERO
+                     XMAX = ZERO
+                  END IF
+  160             CONTINUE
+               ELSE
 *
-         K1 = KL + KU + 2
-         K2 = KL + 1
-         K3 = 2*KL + KU + 1
-         K4 = KL + KU + 1 + M
-         DO 150 J = 1, N
-            DO 140 I = MAX( K1-J, K2 ), MIN( K3, K4-J )
-               A( I, J ) = A( I, J )*MUL
-  140       CONTINUE
-  150    CONTINUE
+*                 Compute x(j) := x(j) / A(j,j) - CSUMJ if the dot
+*                 product has already been divided by 1/A(j,j).
 *
-      END IF
+                  X( J ) = ZLADIV( X( J ), TJJS ) - CSUMJ
+               END IF
+               XMAX = MAX( XMAX, CABS1( X( J ) ) )
+  170       CONTINUE
 *
-      IF( .NOT.DONE )
-     $   GO TO 10
+         ELSE
 *
-      RETURN
+*           Solve A**H * x = b
+*
+            DO 220 J = JFIRST, JLAST, JINC
+*
+*              Compute x(j) = b(j) - sum A(k,j)*x(k).
+*                                    k<>j
+*
+               XJ = CABS1( X( J ) )
+               USCAL = TSCAL
+               REC = ONE / MAX( XMAX, ONE )
+               IF( CNORM( J ).GT.( BIGNUM-XJ )*REC ) THEN
 *
-*     End of ZLASCL
+*                 If x(j) could overflow, scale x by 1/(2*XMAX).
 *
-      END
-*> \brief \b ZLASET initializes the off-diagonal elements and the diagonal elements of a matrix to given values.
+                  REC = REC*HALF
+                  IF( NOUNIT ) THEN
+                     TJJS = DCONJG( A( J, J ) )*TSCAL
+                  ELSE
+                     TJJS = TSCAL
+                  END IF
+                  TJJ = CABS1( TJJS )
+                  IF( TJJ.GT.ONE ) THEN
 *
-*  =========== DOCUMENTATION ===========
+*                       Divide by A(j,j) when scaling x if A(j,j) > 1.
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+                     REC = MIN( ONE, REC*TJJ )
+                     USCAL = ZLADIV( USCAL, TJJS )
+                  END IF
+                  IF( REC.LT.ONE ) THEN
+                     CALL ZDSCAL( N, REC, X, 1 )
+                     SCALE = SCALE*REC
+                     XMAX = XMAX*REC
+                  END IF
+               END IF
 *
-*> \htmlonly
-*> Download ZLASET + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/zlaset.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/zlaset.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/zlaset.f"> 
-*> [TXT]</a>
-*> \endhtmlonly 
+               CSUMJ = ZERO
+               IF( USCAL.EQ.DCMPLX( ONE ) ) THEN
 *
-*  Definition:
-*  ===========
+*                 If the scaling needed for A in the dot product is 1,
+*                 call ZDOTC to perform the dot product.
 *
-*       SUBROUTINE ZLASET( UPLO, M, N, ALPHA, BETA, A, LDA )
-* 
-*       .. Scalar Arguments ..
-*       CHARACTER          UPLO
-*       INTEGER            LDA, M, N
-*       COMPLEX*16         ALPHA, BETA
-*       ..
-*       .. Array Arguments ..
-*       COMPLEX*16         A( LDA, * )
-*       ..
-*  
+                  IF( UPPER ) THEN
+                     CSUMJ = ZDOTC( J-1, A( 1, J ), 1, X, 1 )
+                  ELSE IF( J.LT.N ) THEN
+                     CSUMJ = ZDOTC( N-J, A( J+1, J ), 1, X( J+1 ), 1 )
+                  END IF
+               ELSE
 *
-*> \par Purpose:
-*  =============
-*>
-*> \verbatim
-*>
-*> ZLASET initializes a 2-D array A to BETA on the diagonal and
-*> ALPHA on the offdiagonals.
-*> \endverbatim
+*                 Otherwise, use in-line code for the dot product.
 *
-*  Arguments:
-*  ==========
+                  IF( UPPER ) THEN
+                     DO 180 I = 1, J - 1
+                        CSUMJ = CSUMJ + ( DCONJG( A( I, J ) )*USCAL )*
+     $                          X( I )
+  180                CONTINUE
+                  ELSE IF( J.LT.N ) THEN
+                     DO 190 I = J + 1, N
+                        CSUMJ = CSUMJ + ( DCONJG( A( I, J ) )*USCAL )*
+     $                          X( I )
+  190                CONTINUE
+                  END IF
+               END IF
 *
-*> \param[in] UPLO
-*> \verbatim
-*>          UPLO is CHARACTER*1
-*>          Specifies the part of the matrix A to be set.
-*>          = 'U':      Upper triangular part is set. The lower triangle
-*>                      is unchanged.
-*>          = 'L':      Lower triangular part is set. The upper triangle
-*>                      is unchanged.
-*>          Otherwise:  All of the matrix A is set.
-*> \endverbatim
-*>
-*> \param[in] M
-*> \verbatim
-*>          M is INTEGER
-*>          On entry, M specifies the number of rows of A.
-*> \endverbatim
-*>
-*> \param[in] N
-*> \verbatim
-*>          N is INTEGER
-*>          On entry, N specifies the number of columns of A.
-*> \endverbatim
-*>
-*> \param[in] ALPHA
-*> \verbatim
-*>          ALPHA is COMPLEX*16
-*>          All the offdiagonal array elements are set to ALPHA.
-*> \endverbatim
-*>
-*> \param[in] BETA
-*> \verbatim
-*>          BETA is COMPLEX*16
-*>          All the diagonal array elements are set to BETA.
-*> \endverbatim
-*>
-*> \param[in,out] A
-*> \verbatim
-*>          A is COMPLEX*16 array, dimension (LDA,N)
-*>          On entry, the m by n matrix A.
-*>          On exit, A(i,j) = ALPHA, 1 <= i <= m, 1 <= j <= n, i.ne.j;
-*>                   A(i,i) = BETA , 1 <= i <= min(m,n)
-*> \endverbatim
-*>
-*> \param[in] LDA
-*> \verbatim
-*>          LDA is INTEGER
-*>          The leading dimension of the array A.  LDA >= max(1,M).
-*> \endverbatim
+               IF( USCAL.EQ.DCMPLX( TSCAL ) ) THEN
 *
-*  Authors:
-*  ========
+*                 Compute x(j) := ( x(j) - CSUMJ ) / A(j,j) if 1/A(j,j)
+*                 was not used to scale the dotproduct.
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+                  X( J ) = X( J ) - CSUMJ
+                  XJ = CABS1( X( J ) )
+                  IF( NOUNIT ) THEN
+                     TJJS = DCONJG( A( J, J ) )*TSCAL
+                  ELSE
+                     TJJS = TSCAL
+                     IF( TSCAL.EQ.ONE )
+     $                  GO TO 210
+                  END IF
 *
-*> \date September 2012
+*                    Compute x(j) = x(j) / A(j,j), scaling if necessary.
 *
-*> \ingroup complex16OTHERauxiliary
+                  TJJ = CABS1( TJJS )
+                  IF( TJJ.GT.SMLNUM ) THEN
 *
-*  =====================================================================
-      SUBROUTINE ZLASET( UPLO, M, N, ALPHA, BETA, A, LDA )
+*                       abs(A(j,j)) > SMLNUM:
 *
-*  -- LAPACK auxiliary routine (version 3.4.2) --
-*  -- LAPACK is a software package provided by Univ. of Tennessee,    --
-*  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     September 2012
+                     IF( TJJ.LT.ONE ) THEN
+                        IF( XJ.GT.TJJ*BIGNUM ) THEN
 *
-*     .. Scalar Arguments ..
-      CHARACTER          UPLO
-      INTEGER            LDA, M, N
-      COMPLEX*16         ALPHA, BETA
-*     ..
-*     .. Array Arguments ..
-      COMPLEX*16         A( LDA, * )
-*     ..
+*                             Scale X by 1/abs(x(j)).
 *
-*  =====================================================================
+                           REC = ONE / XJ
+                           CALL ZDSCAL( N, REC, X, 1 )
+                           SCALE = SCALE*REC
+                           XMAX = XMAX*REC
+                        END IF
+                     END IF
+                     X( J ) = ZLADIV( X( J ), TJJS )
+                  ELSE IF( TJJ.GT.ZERO ) THEN
 *
-*     .. Local Scalars ..
-      INTEGER            I, J
-*     ..
-*     .. External Functions ..
-      LOGICAL            LSAME
-      EXTERNAL           LSAME
-*     ..
-*     .. Intrinsic Functions ..
-      INTRINSIC          MIN
-*     ..
-*     .. Executable Statements ..
+*                       0 < abs(A(j,j)) <= SMLNUM:
 *
-      IF( LSAME( UPLO, 'U' ) ) THEN
+                     IF( XJ.GT.TJJ*BIGNUM ) THEN
 *
-*        Set the diagonal to BETA and the strictly upper triangular
-*        part of the array to ALPHA.
+*                          Scale x by (1/abs(x(j)))*abs(A(j,j))*BIGNUM.
 *
-         DO 20 J = 2, N
-            DO 10 I = 1, MIN( J-1, M )
-               A( I, J ) = ALPHA
-   10       CONTINUE
-   20    CONTINUE
-         DO 30 I = 1, MIN( N, M )
-            A( I, I ) = BETA
-   30    CONTINUE
+                        REC = ( TJJ*BIGNUM ) / XJ
+                        CALL ZDSCAL( N, REC, X, 1 )
+                        SCALE = SCALE*REC
+                        XMAX = XMAX*REC
+                     END IF
+                     X( J ) = ZLADIV( X( J ), TJJS )
+                  ELSE
 *
-      ELSE IF( LSAME( UPLO, 'L' ) ) THEN
+*                       A(j,j) = 0:  Set x(1:n) = 0, x(j) = 1, and
+*                       scale = 0 and compute a solution to A**H *x = 0.
 *
-*        Set the diagonal to BETA and the strictly lower triangular
-*        part of the array to ALPHA.
+                     DO 200 I = 1, N
+                        X( I ) = ZERO
+  200                CONTINUE
+                     X( J ) = ONE
+                     SCALE = ZERO
+                     XMAX = ZERO
+                  END IF
+  210             CONTINUE
+               ELSE
 *
-         DO 50 J = 1, MIN( M, N )
-            DO 40 I = J + 1, M
-               A( I, J ) = ALPHA
-   40       CONTINUE
-   50    CONTINUE
-         DO 60 I = 1, MIN( N, M )
-            A( I, I ) = BETA
-   60    CONTINUE
+*                 Compute x(j) := x(j) / A(j,j) - CSUMJ if the dot
+*                 product has already been divided by 1/A(j,j).
 *
-      ELSE
+                  X( J ) = ZLADIV( X( J ), TJJS ) - CSUMJ
+               END IF
+               XMAX = MAX( XMAX, CABS1( X( J ) ) )
+  220       CONTINUE
+         END IF
+         SCALE = SCALE / TSCAL
+      END IF
 *
-*        Set the array to BETA on the diagonal and ALPHA on the
-*        offdiagonal.
+*     Scale the column norms by 1/TSCAL for return.
 *
-         DO 80 J = 1, N
-            DO 70 I = 1, M
-               A( I, J ) = ALPHA
-   70       CONTINUE
-   80    CONTINUE
-         DO 90 I = 1, MIN( M, N )
-            A( I, I ) = BETA
-   90    CONTINUE
+      IF( TSCAL.NE.ONE ) THEN
+         CALL DSCAL( N, ONE / TSCAL, CNORM, 1 )
       END IF
 *
       RETURN
 *
-*     End of ZLASET
+*     End of ZLATRS
 *
       END
-*> \brief \b ZLASR applies a sequence of plane rotations to a general rectangular matrix.
+*> \brief \b ZLAUU2 computes the product UUH or LHL, where U and L are upper or lower triangular matrices (unblocked algorithm).
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download ZLASR + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/zlasr.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/zlasr.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/zlasr.f"> 
+*> Download ZLAUU2 + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/zlauu2.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/zlauu2.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/zlauu2.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
-*       SUBROUTINE ZLASR( SIDE, PIVOT, DIRECT, M, N, C, S, A, LDA )
-* 
+*       SUBROUTINE ZLAUU2( UPLO, N, A, LDA, INFO )
+*
 *       .. Scalar Arguments ..
-*       CHARACTER          DIRECT, PIVOT, SIDE
-*       INTEGER            LDA, M, N
+*       CHARACTER          UPLO
+*       INTEGER            INFO, LDA, N
 *       ..
 *       .. Array Arguments ..
-*       DOUBLE PRECISION   C( * ), S( * )
 *       COMPLEX*16         A( LDA, * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
 *>
 *> \verbatim
 *>
-*> ZLASR applies a sequence of real plane rotations to a complex matrix
-*> A, from either the left or the right.
-*>
-*> When SIDE = 'L', the transformation takes the form
-*>
-*>    A := P*A
-*>
-*> and when SIDE = 'R', the transformation takes the form
+*> ZLAUU2 computes the product U * U**H or L**H * L, where the triangular
+*> factor U or L is stored in the upper or lower triangular part of
+*> the array A.
 *>
-*>    A := A*P**T
+*> If UPLO = 'U' or 'u' then the upper triangle of the result is stored,
+*> overwriting the factor U in A.
+*> If UPLO = 'L' or 'l' then the lower triangle of the result is stored,
+*> overwriting the factor L in A.
 *>
-*> where P is an orthogonal matrix consisting of a sequence of z plane
-*> rotations, with z = M when SIDE = 'L' and z = N when SIDE = 'R',
-*> and P**T is the transpose of P.
-*> 
-*> When DIRECT = 'F' (Forward sequence), then
-*> 
-*>    P = P(z-1) * ... * P(2) * P(1)
-*> 
-*> and when DIRECT = 'B' (Backward sequence), then
-*> 
-*>    P = P(1) * P(2) * ... * P(z-1)
-*> 
-*> where P(k) is a plane rotation matrix defined by the 2-by-2 rotation
-*> 
-*>    R(k) = (  c(k)  s(k) )
-*>         = ( -s(k)  c(k) ).
-*> 
-*> When PIVOT = 'V' (Variable pivot), the rotation is performed
-*> for the plane (k,k+1), i.e., P(k) has the form
-*> 
-*>    P(k) = (  1                                            )
-*>           (       ...                                     )
-*>           (              1                                )
-*>           (                   c(k)  s(k)                  )
-*>           (                  -s(k)  c(k)                  )
-*>           (                                1              )
-*>           (                                     ...       )
-*>           (                                            1  )
-*> 
-*> where R(k) appears as a rank-2 modification to the identity matrix in
-*> rows and columns k and k+1.
-*> 
-*> When PIVOT = 'T' (Top pivot), the rotation is performed for the
-*> plane (1,k+1), so P(k) has the form
-*> 
-*>    P(k) = (  c(k)                    s(k)                 )
-*>           (         1                                     )
-*>           (              ...                              )
-*>           (                     1                         )
-*>           ( -s(k)                    c(k)                 )
-*>           (                                 1             )
-*>           (                                      ...      )
-*>           (                                             1 )
-*> 
-*> where R(k) appears in rows and columns 1 and k+1.
-*> 
-*> Similarly, when PIVOT = 'B' (Bottom pivot), the rotation is
-*> performed for the plane (k,z), giving P(k) the form
-*> 
-*>    P(k) = ( 1                                             )
-*>           (      ...                                      )
-*>           (             1                                 )
-*>           (                  c(k)                    s(k) )
-*>           (                         1                     )
-*>           (                              ...              )
-*>           (                                     1         )
-*>           (                 -s(k)                    c(k) )
-*> 
-*> where R(k) appears in rows and columns k and z.  The rotations are
-*> performed without ever forming P(k) explicitly.
+*> This is the unblocked form of the algorithm, calling Level 2 BLAS.
 *> \endverbatim
 *
 *  Arguments:
 *  ==========
 *
-*> \param[in] SIDE
-*> \verbatim
-*>          SIDE is CHARACTER*1
-*>          Specifies whether the plane rotation matrix P is applied to
-*>          A on the left or the right.
-*>          = 'L':  Left, compute A := P*A
-*>          = 'R':  Right, compute A:= A*P**T
-*> \endverbatim
-*>
-*> \param[in] PIVOT
-*> \verbatim
-*>          PIVOT is CHARACTER*1
-*>          Specifies the plane for which P(k) is a plane rotation
-*>          matrix.
-*>          = 'V':  Variable pivot, the plane (k,k+1)
-*>          = 'T':  Top pivot, the plane (1,k+1)
-*>          = 'B':  Bottom pivot, the plane (k,z)
-*> \endverbatim
-*>
-*> \param[in] DIRECT
-*> \verbatim
-*>          DIRECT is CHARACTER*1
-*>          Specifies whether P is a forward or backward sequence of
-*>          plane rotations.
-*>          = 'F':  Forward, P = P(z-1)*...*P(2)*P(1)
-*>          = 'B':  Backward, P = P(1)*P(2)*...*P(z-1)
-*> \endverbatim
-*>
-*> \param[in] M
+*> \param[in] UPLO
 *> \verbatim
-*>          M is INTEGER
-*>          The number of rows of the matrix A.  If m <= 1, an immediate
-*>          return is effected.
+*>          UPLO is CHARACTER*1
+*>          Specifies whether the triangular factor stored in the array A
+*>          is upper or lower triangular:
+*>          = 'U':  Upper triangular
+*>          = 'L':  Lower triangular
 *> \endverbatim
 *>
 *> \param[in] N
 *> \verbatim
 *>          N is INTEGER
-*>          The number of columns of the matrix A.  If n <= 1, an
-*>          immediate return is effected.
-*> \endverbatim
-*>
-*> \param[in] C
-*> \verbatim
-*>          C is DOUBLE PRECISION array, dimension
-*>                  (M-1) if SIDE = 'L'
-*>                  (N-1) if SIDE = 'R'
-*>          The cosines c(k) of the plane rotations.
-*> \endverbatim
-*>
-*> \param[in] S
-*> \verbatim
-*>          S is DOUBLE PRECISION array, dimension
-*>                  (M-1) if SIDE = 'L'
-*>                  (N-1) if SIDE = 'R'
-*>          The sines s(k) of the plane rotations.  The 2-by-2 plane
-*>          rotation part of the matrix P(k), R(k), has the form
-*>          R(k) = (  c(k)  s(k) )
-*>                 ( -s(k)  c(k) ).
+*>          The order of the triangular factor U or L.  N >= 0.
 *> \endverbatim
 *>
 *> \param[in,out] A
 *> \verbatim
 *>          A is COMPLEX*16 array, dimension (LDA,N)
-*>          The M-by-N matrix A.  On exit, A is overwritten by P*A if
-*>          SIDE = 'R' or by A*P**T if SIDE = 'L'.
+*>          On entry, the triangular factor U or L.
+*>          On exit, if UPLO = 'U', the upper triangle of A is
+*>          overwritten with the upper triangle of the product U * U**H;
+*>          if UPLO = 'L', the lower triangle of A is overwritten with
+*>          the lower triangle of the product L**H * L.
 *> \endverbatim
 *>
 *> \param[in] LDA
 *> \verbatim
 *>          LDA is INTEGER
-*>          The leading dimension of the array A.  LDA >= max(1,M).
+*>          The leading dimension of the array A.  LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*>          INFO is INTEGER
+*>          = 0: successful exit
+*>          < 0: if INFO = -k, the k-th argument had an illegal value
 *> \endverbatim
 *
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date September 2012
+*> \date December 2016
 *
 *> \ingroup complex16OTHERauxiliary
 *
 *  =====================================================================
-      SUBROUTINE ZLASR( SIDE, PIVOT, DIRECT, M, N, C, S, A, LDA )
+      SUBROUTINE ZLAUU2( UPLO, N, A, LDA, INFO )
 *
-*  -- LAPACK auxiliary routine (version 3.4.2) --
+*  -- LAPACK auxiliary routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     September 2012
+*     December 2016
 *
 *     .. Scalar Arguments ..
-      CHARACTER          DIRECT, PIVOT, SIDE
-      INTEGER            LDA, M, N
+      CHARACTER          UPLO
+      INTEGER            INFO, LDA, N
 *     ..
 *     .. Array Arguments ..
-      DOUBLE PRECISION   C( * ), S( * )
       COMPLEX*16         A( LDA, * )
 *     ..
 *
 *  =====================================================================
 *
 *     .. Parameters ..
-      DOUBLE PRECISION   ONE, ZERO
-      PARAMETER          ( ONE = 1.0D+0, ZERO = 0.0D+0 )
+      COMPLEX*16         ONE
+      PARAMETER          ( ONE = ( 1.0D+0, 0.0D+0 ) )
 *     ..
 *     .. Local Scalars ..
-      INTEGER            I, INFO, J
-      DOUBLE PRECISION   CTEMP, STEMP
-      COMPLEX*16         TEMP
-*     ..
-*     .. Intrinsic Functions ..
-      INTRINSIC          MAX
+      LOGICAL            UPPER
+      INTEGER            I
+      DOUBLE PRECISION   AII
 *     ..
 *     .. External Functions ..
       LOGICAL            LSAME
-      EXTERNAL           LSAME
+      COMPLEX*16         ZDOTC
+      EXTERNAL           LSAME, ZDOTC
 *     ..
 *     .. External Subroutines ..
-      EXTERNAL           XERBLA
+      EXTERNAL           XERBLA, ZDSCAL, ZGEMV, ZLACGV
 *     ..
-*     .. Executable Statements ..
-*
-*     Test the input parameters
-*
-      INFO = 0
-      IF( .NOT.( LSAME( SIDE, 'L' ) .OR. LSAME( SIDE, 'R' ) ) ) THEN
-         INFO = 1
-      ELSE IF( .NOT.( LSAME( PIVOT, 'V' ) .OR. LSAME( PIVOT,
-     $         'T' ) .OR. LSAME( PIVOT, 'B' ) ) ) THEN
-         INFO = 2
-      ELSE IF( .NOT.( LSAME( DIRECT, 'F' ) .OR. LSAME( DIRECT, 'B' ) ) )
-     $          THEN
-         INFO = 3
-      ELSE IF( M.LT.0 ) THEN
-         INFO = 4
-      ELSE IF( N.LT.0 ) THEN
-         INFO = 5
-      ELSE IF( LDA.LT.MAX( 1, M ) ) THEN
-         INFO = 9
-      END IF
-      IF( INFO.NE.0 ) THEN
-         CALL XERBLA( 'ZLASR ', INFO )
-         RETURN
-      END IF
-*
-*     Quick return if possible
-*
-      IF( ( M.EQ.0 ) .OR. ( N.EQ.0 ) )
-     $   RETURN
-      IF( LSAME( SIDE, 'L' ) ) THEN
-*
-*        Form  P * A
-*
-         IF( LSAME( PIVOT, 'V' ) ) THEN
-            IF( LSAME( DIRECT, 'F' ) ) THEN
-               DO 20 J = 1, M - 1
-                  CTEMP = C( J )
-                  STEMP = S( J )
-                  IF( ( CTEMP.NE.ONE ) .OR. ( STEMP.NE.ZERO ) ) THEN
-                     DO 10 I = 1, N
-                        TEMP = A( J+1, I )
-                        A( J+1, I ) = CTEMP*TEMP - STEMP*A( J, I )
-                        A( J, I ) = STEMP*TEMP + CTEMP*A( J, I )
-   10                CONTINUE
-                  END IF
-   20          CONTINUE
-            ELSE IF( LSAME( DIRECT, 'B' ) ) THEN
-               DO 40 J = M - 1, 1, -1
-                  CTEMP = C( J )
-                  STEMP = S( J )
-                  IF( ( CTEMP.NE.ONE ) .OR. ( STEMP.NE.ZERO ) ) THEN
-                     DO 30 I = 1, N
-                        TEMP = A( J+1, I )
-                        A( J+1, I ) = CTEMP*TEMP - STEMP*A( J, I )
-                        A( J, I ) = STEMP*TEMP + CTEMP*A( J, I )
-   30                CONTINUE
-                  END IF
-   40          CONTINUE
-            END IF
-         ELSE IF( LSAME( PIVOT, 'T' ) ) THEN
-            IF( LSAME( DIRECT, 'F' ) ) THEN
-               DO 60 J = 2, M
-                  CTEMP = C( J-1 )
-                  STEMP = S( J-1 )
-                  IF( ( CTEMP.NE.ONE ) .OR. ( STEMP.NE.ZERO ) ) THEN
-                     DO 50 I = 1, N
-                        TEMP = A( J, I )
-                        A( J, I ) = CTEMP*TEMP - STEMP*A( 1, I )
-                        A( 1, I ) = STEMP*TEMP + CTEMP*A( 1, I )
-   50                CONTINUE
-                  END IF
-   60          CONTINUE
-            ELSE IF( LSAME( DIRECT, 'B' ) ) THEN
-               DO 80 J = M, 2, -1
-                  CTEMP = C( J-1 )
-                  STEMP = S( J-1 )
-                  IF( ( CTEMP.NE.ONE ) .OR. ( STEMP.NE.ZERO ) ) THEN
-                     DO 70 I = 1, N
-                        TEMP = A( J, I )
-                        A( J, I ) = CTEMP*TEMP - STEMP*A( 1, I )
-                        A( 1, I ) = STEMP*TEMP + CTEMP*A( 1, I )
-   70                CONTINUE
-                  END IF
-   80          CONTINUE
-            END IF
-         ELSE IF( LSAME( PIVOT, 'B' ) ) THEN
-            IF( LSAME( DIRECT, 'F' ) ) THEN
-               DO 100 J = 1, M - 1
-                  CTEMP = C( J )
-                  STEMP = S( J )
-                  IF( ( CTEMP.NE.ONE ) .OR. ( STEMP.NE.ZERO ) ) THEN
-                     DO 90 I = 1, N
-                        TEMP = A( J, I )
-                        A( J, I ) = STEMP*A( M, I ) + CTEMP*TEMP
-                        A( M, I ) = CTEMP*A( M, I ) - STEMP*TEMP
-   90                CONTINUE
-                  END IF
-  100          CONTINUE
-            ELSE IF( LSAME( DIRECT, 'B' ) ) THEN
-               DO 120 J = M - 1, 1, -1
-                  CTEMP = C( J )
-                  STEMP = S( J )
-                  IF( ( CTEMP.NE.ONE ) .OR. ( STEMP.NE.ZERO ) ) THEN
-                     DO 110 I = 1, N
-                        TEMP = A( J, I )
-                        A( J, I ) = STEMP*A( M, I ) + CTEMP*TEMP
-                        A( M, I ) = CTEMP*A( M, I ) - STEMP*TEMP
-  110                CONTINUE
-                  END IF
-  120          CONTINUE
-            END IF
-         END IF
-      ELSE IF( LSAME( SIDE, 'R' ) ) THEN
+*     .. Intrinsic Functions ..
+      INTRINSIC          DBLE, DCMPLX, MAX
+*     ..
+*     .. Executable Statements ..
 *
-*        Form A * P**T
+*     Test the input parameters.
 *
-         IF( LSAME( PIVOT, 'V' ) ) THEN
-            IF( LSAME( DIRECT, 'F' ) ) THEN
-               DO 140 J = 1, N - 1
-                  CTEMP = C( J )
-                  STEMP = S( J )
-                  IF( ( CTEMP.NE.ONE ) .OR. ( STEMP.NE.ZERO ) ) THEN
-                     DO 130 I = 1, M
-                        TEMP = A( I, J+1 )
-                        A( I, J+1 ) = CTEMP*TEMP - STEMP*A( I, J )
-                        A( I, J ) = STEMP*TEMP + CTEMP*A( I, J )
-  130                CONTINUE
-                  END IF
-  140          CONTINUE
-            ELSE IF( LSAME( DIRECT, 'B' ) ) THEN
-               DO 160 J = N - 1, 1, -1
-                  CTEMP = C( J )
-                  STEMP = S( J )
-                  IF( ( CTEMP.NE.ONE ) .OR. ( STEMP.NE.ZERO ) ) THEN
-                     DO 150 I = 1, M
-                        TEMP = A( I, J+1 )
-                        A( I, J+1 ) = CTEMP*TEMP - STEMP*A( I, J )
-                        A( I, J ) = STEMP*TEMP + CTEMP*A( I, J )
-  150                CONTINUE
-                  END IF
-  160          CONTINUE
-            END IF
-         ELSE IF( LSAME( PIVOT, 'T' ) ) THEN
-            IF( LSAME( DIRECT, 'F' ) ) THEN
-               DO 180 J = 2, N
-                  CTEMP = C( J-1 )
-                  STEMP = S( J-1 )
-                  IF( ( CTEMP.NE.ONE ) .OR. ( STEMP.NE.ZERO ) ) THEN
-                     DO 170 I = 1, M
-                        TEMP = A( I, J )
-                        A( I, J ) = CTEMP*TEMP - STEMP*A( I, 1 )
-                        A( I, 1 ) = STEMP*TEMP + CTEMP*A( I, 1 )
-  170                CONTINUE
-                  END IF
-  180          CONTINUE
-            ELSE IF( LSAME( DIRECT, 'B' ) ) THEN
-               DO 200 J = N, 2, -1
-                  CTEMP = C( J-1 )
-                  STEMP = S( J-1 )
-                  IF( ( CTEMP.NE.ONE ) .OR. ( STEMP.NE.ZERO ) ) THEN
-                     DO 190 I = 1, M
-                        TEMP = A( I, J )
-                        A( I, J ) = CTEMP*TEMP - STEMP*A( I, 1 )
-                        A( I, 1 ) = STEMP*TEMP + CTEMP*A( I, 1 )
-  190                CONTINUE
-                  END IF
-  200          CONTINUE
+      INFO = 0
+      UPPER = LSAME( UPLO, 'U' )
+      IF( .NOT.UPPER .AND. .NOT.LSAME( UPLO, 'L' ) ) THEN
+         INFO = -1
+      ELSE IF( N.LT.0 ) THEN
+         INFO = -2
+      ELSE IF( LDA.LT.MAX( 1, N ) ) THEN
+         INFO = -4
+      END IF
+      IF( INFO.NE.0 ) THEN
+         CALL XERBLA( 'ZLAUU2', -INFO )
+         RETURN
+      END IF
+*
+*     Quick return if possible
+*
+      IF( N.EQ.0 )
+     $   RETURN
+*
+      IF( UPPER ) THEN
+*
+*        Compute the product U * U**H.
+*
+         DO 10 I = 1, N
+            AII = A( I, I )
+            IF( I.LT.N ) THEN
+               A( I, I ) = AII*AII + DBLE( ZDOTC( N-I, A( I, I+1 ), LDA,
+     $                     A( I, I+1 ), LDA ) )
+               CALL ZLACGV( N-I, A( I, I+1 ), LDA )
+               CALL ZGEMV( 'No transpose', I-1, N-I, ONE, A( 1, I+1 ),
+     $                     LDA, A( I, I+1 ), LDA, DCMPLX( AII ),
+     $                     A( 1, I ), 1 )
+               CALL ZLACGV( N-I, A( I, I+1 ), LDA )
+            ELSE
+               CALL ZDSCAL( I, AII, A( 1, I ), 1 )
             END IF
-         ELSE IF( LSAME( PIVOT, 'B' ) ) THEN
-            IF( LSAME( DIRECT, 'F' ) ) THEN
-               DO 220 J = 1, N - 1
-                  CTEMP = C( J )
-                  STEMP = S( J )
-                  IF( ( CTEMP.NE.ONE ) .OR. ( STEMP.NE.ZERO ) ) THEN
-                     DO 210 I = 1, M
-                        TEMP = A( I, J )
-                        A( I, J ) = STEMP*A( I, N ) + CTEMP*TEMP
-                        A( I, N ) = CTEMP*A( I, N ) - STEMP*TEMP
-  210                CONTINUE
-                  END IF
-  220          CONTINUE
-            ELSE IF( LSAME( DIRECT, 'B' ) ) THEN
-               DO 240 J = N - 1, 1, -1
-                  CTEMP = C( J )
-                  STEMP = S( J )
-                  IF( ( CTEMP.NE.ONE ) .OR. ( STEMP.NE.ZERO ) ) THEN
-                     DO 230 I = 1, M
-                        TEMP = A( I, J )
-                        A( I, J ) = STEMP*A( I, N ) + CTEMP*TEMP
-                        A( I, N ) = CTEMP*A( I, N ) - STEMP*TEMP
-  230                CONTINUE
-                  END IF
-  240          CONTINUE
+   10    CONTINUE
+*
+      ELSE
+*
+*        Compute the product L**H * L.
+*
+         DO 20 I = 1, N
+            AII = A( I, I )
+            IF( I.LT.N ) THEN
+               A( I, I ) = AII*AII + DBLE( ZDOTC( N-I, A( I+1, I ), 1,
+     $                     A( I+1, I ), 1 ) )
+               CALL ZLACGV( I-1, A( I, 1 ), LDA )
+               CALL ZGEMV( 'Conjugate transpose', N-I, I-1, ONE,
+     $                     A( I+1, 1 ), LDA, A( I+1, I ), 1,
+     $                     DCMPLX( AII ), A( I, 1 ), LDA )
+               CALL ZLACGV( I-1, A( I, 1 ), LDA )
+            ELSE
+               CALL ZDSCAL( I, AII, A( I, 1 ), LDA )
             END IF
-         END IF
+   20    CONTINUE
       END IF
 *
       RETURN
 *
-*     End of ZLASR
+*     End of ZLAUU2
 *
       END
-*> \brief \b ZLASSQ updates a sum of squares represented in scaled form.
+*> \brief \b ZLAUUM computes the product UUH or LHL, where U and L are upper or lower triangular matrices (blocked algorithm).
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download ZLASSQ + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/zlassq.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/zlassq.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/zlassq.f"> 
+*> Download ZLAUUM + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/zlauum.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/zlauum.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/zlauum.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
-*       SUBROUTINE ZLASSQ( N, X, INCX, SCALE, SUMSQ )
-* 
+*       SUBROUTINE ZLAUUM( UPLO, N, A, LDA, INFO )
+*
 *       .. Scalar Arguments ..
-*       INTEGER            INCX, N
-*       DOUBLE PRECISION   SCALE, SUMSQ
+*       CHARACTER          UPLO
+*       INTEGER            INFO, LDA, N
 *       ..
 *       .. Array Arguments ..
-*       COMPLEX*16         X( * )
+*       COMPLEX*16         A( LDA, * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
 *>
 *> \verbatim
 *>
-*> ZLASSQ returns the values scl and ssq such that
-*>
-*>    ( scl**2 )*ssq = x( 1 )**2 +...+ x( n )**2 + ( scale**2 )*sumsq,
-*>
-*> where x( i ) = abs( X( 1 + ( i - 1 )*INCX ) ). The value of sumsq is
-*> assumed to be at least unity and the value of ssq will then satisfy
-*>
-*>    1.0 .le. ssq .le. ( sumsq + 2*n ).
+*> ZLAUUM computes the product U * U**H or L**H * L, where the triangular
+*> factor U or L is stored in the upper or lower triangular part of
+*> the array A.
 *>
-*> scale is assumed to be non-negative and scl returns the value
-*>
-*>    scl = max( scale, abs( real( x( i ) ) ), abs( aimag( x( i ) ) ) ),
-*>           i
+*> If UPLO = 'U' or 'u' then the upper triangle of the result is stored,
+*> overwriting the factor U in A.
+*> If UPLO = 'L' or 'l' then the lower triangle of the result is stored,
+*> overwriting the factor L in A.
 *>
-*> scale and sumsq must be supplied in SCALE and SUMSQ respectively.
-*> SCALE and SUMSQ are overwritten by scl and ssq respectively.
-*>
-*> The routine makes only one pass through the vector X.
+*> This is the blocked form of the algorithm, calling Level 3 BLAS.
 *> \endverbatim
 *
 *  Arguments:
 *  ==========
 *
-*> \param[in] N
+*> \param[in] UPLO
 *> \verbatim
-*>          N is INTEGER
-*>          The number of elements to be used from the vector X.
+*>          UPLO is CHARACTER*1
+*>          Specifies whether the triangular factor stored in the array A
+*>          is upper or lower triangular:
+*>          = 'U':  Upper triangular
+*>          = 'L':  Lower triangular
 *> \endverbatim
 *>
-*> \param[in] X
+*> \param[in] N
 *> \verbatim
-*>          X is COMPLEX*16 array, dimension (N)
-*>          The vector x as described above.
-*>             x( i )  = X( 1 + ( i - 1 )*INCX ), 1 <= i <= n.
+*>          N is INTEGER
+*>          The order of the triangular factor U or L.  N >= 0.
 *> \endverbatim
 *>
-*> \param[in] INCX
+*> \param[in,out] A
 *> \verbatim
-*>          INCX is INTEGER
-*>          The increment between successive values of the vector X.
-*>          INCX > 0.
+*>          A is COMPLEX*16 array, dimension (LDA,N)
+*>          On entry, the triangular factor U or L.
+*>          On exit, if UPLO = 'U', the upper triangle of A is
+*>          overwritten with the upper triangle of the product U * U**H;
+*>          if UPLO = 'L', the lower triangle of A is overwritten with
+*>          the lower triangle of the product L**H * L.
 *> \endverbatim
 *>
-*> \param[in,out] SCALE
+*> \param[in] LDA
 *> \verbatim
-*>          SCALE is DOUBLE PRECISION
-*>          On entry, the value  scale  in the equation above.
-*>          On exit, SCALE is overwritten with the value  scl .
+*>          LDA is INTEGER
+*>          The leading dimension of the array A.  LDA >= max(1,N).
 *> \endverbatim
 *>
-*> \param[in,out] SUMSQ
+*> \param[out] INFO
 *> \verbatim
-*>          SUMSQ is DOUBLE PRECISION
-*>          On entry, the value  sumsq  in the equation above.
-*>          On exit, SUMSQ is overwritten with the value  ssq .
+*>          INFO is INTEGER
+*>          = 0: successful exit
+*>          < 0: if INFO = -k, the k-th argument had an illegal value
 *> \endverbatim
 *
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date September 2012
+*> \date December 2016
 *
 *> \ingroup complex16OTHERauxiliary
 *
 *  =====================================================================
-      SUBROUTINE ZLASSQ( N, X, INCX, SCALE, SUMSQ )
+      SUBROUTINE ZLAUUM( UPLO, N, A, LDA, INFO )
 *
-*  -- LAPACK auxiliary routine (version 3.4.2) --
+*  -- LAPACK auxiliary routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     September 2012
+*     December 2016
 *
 *     .. Scalar Arguments ..
-      INTEGER            INCX, N
-      DOUBLE PRECISION   SCALE, SUMSQ
+      CHARACTER          UPLO
+      INTEGER            INFO, LDA, N
 *     ..
 *     .. Array Arguments ..
-      COMPLEX*16         X( * )
+      COMPLEX*16         A( LDA, * )
 *     ..
 *
-* =====================================================================
+*  =====================================================================
 *
 *     .. Parameters ..
-      DOUBLE PRECISION   ZERO
-      PARAMETER          ( ZERO = 0.0D+0 )
+      DOUBLE PRECISION   ONE
+      PARAMETER          ( ONE = 1.0D+0 )
+      COMPLEX*16         CONE
+      PARAMETER          ( CONE = ( 1.0D+0, 0.0D+0 ) )
 *     ..
 *     .. Local Scalars ..
-      INTEGER            IX
-      DOUBLE PRECISION   TEMP1
+      LOGICAL            UPPER
+      INTEGER            I, IB, NB
 *     ..
 *     .. External Functions ..
-      LOGICAL            DISNAN
-      EXTERNAL           DISNAN
+      LOGICAL            LSAME
+      INTEGER            ILAENV
+      EXTERNAL           LSAME, ILAENV
+*     ..
+*     .. External Subroutines ..
+      EXTERNAL           XERBLA, ZGEMM, ZHERK, ZLAUU2, ZTRMM
 *     ..
 *     .. Intrinsic Functions ..
-      INTRINSIC          ABS, DBLE, DIMAG
+      INTRINSIC          MAX, MIN
 *     ..
 *     .. Executable Statements ..
 *
-      IF( N.GT.0 ) THEN
-         DO 10 IX = 1, 1 + ( N-1 )*INCX, INCX
-            TEMP1 = ABS( DBLE( X( IX ) ) )
-            IF( TEMP1.GT.ZERO.OR.DISNAN( TEMP1 ) ) THEN
-               IF( SCALE.LT.TEMP1 ) THEN
-                  SUMSQ = 1 + SUMSQ*( SCALE / TEMP1 )**2
-                  SCALE = TEMP1
-               ELSE
-                  SUMSQ = SUMSQ + ( TEMP1 / SCALE )**2
+*     Test the input parameters.
+*
+      INFO = 0
+      UPPER = LSAME( UPLO, 'U' )
+      IF( .NOT.UPPER .AND. .NOT.LSAME( UPLO, 'L' ) ) THEN
+         INFO = -1
+      ELSE IF( N.LT.0 ) THEN
+         INFO = -2
+      ELSE IF( LDA.LT.MAX( 1, N ) ) THEN
+         INFO = -4
+      END IF
+      IF( INFO.NE.0 ) THEN
+         CALL XERBLA( 'ZLAUUM', -INFO )
+         RETURN
+      END IF
+*
+*     Quick return if possible
+*
+      IF( N.EQ.0 )
+     $   RETURN
+*
+*     Determine the block size for this environment.
+*
+      NB = ILAENV( 1, 'ZLAUUM', UPLO, N, -1, -1, -1 )
+*
+      IF( NB.LE.1 .OR. NB.GE.N ) THEN
+*
+*        Use unblocked code
+*
+         CALL ZLAUU2( UPLO, N, A, LDA, INFO )
+      ELSE
+*
+*        Use blocked code
+*
+         IF( UPPER ) THEN
+*
+*           Compute the product U * U**H.
+*
+            DO 10 I = 1, N, NB
+               IB = MIN( NB, N-I+1 )
+               CALL ZTRMM( 'Right', 'Upper', 'Conjugate transpose',
+     $                     'Non-unit', I-1, IB, CONE, A( I, I ), LDA,
+     $                     A( 1, I ), LDA )
+               CALL ZLAUU2( 'Upper', IB, A( I, I ), LDA, INFO )
+               IF( I+IB.LE.N ) THEN
+                  CALL ZGEMM( 'No transpose', 'Conjugate transpose',
+     $                        I-1, IB, N-I-IB+1, CONE, A( 1, I+IB ),
+     $                        LDA, A( I, I+IB ), LDA, CONE, A( 1, I ),
+     $                        LDA )
+                  CALL ZHERK( 'Upper', 'No transpose', IB, N-I-IB+1,
+     $                        ONE, A( I, I+IB ), LDA, ONE, A( I, I ),
+     $                        LDA )
                END IF
-            END IF
-            TEMP1 = ABS( DIMAG( X( IX ) ) )
-            IF( TEMP1.GT.ZERO.OR.DISNAN( TEMP1 ) ) THEN
-               IF( SCALE.LT.TEMP1 ) THEN
-                  SUMSQ = 1 + SUMSQ*( SCALE / TEMP1 )**2
-                  SCALE = TEMP1
-               ELSE
-                  SUMSQ = SUMSQ + ( TEMP1 / SCALE )**2
+   10       CONTINUE
+         ELSE
+*
+*           Compute the product L**H * L.
+*
+            DO 20 I = 1, N, NB
+               IB = MIN( NB, N-I+1 )
+               CALL ZTRMM( 'Left', 'Lower', 'Conjugate transpose',
+     $                     'Non-unit', IB, I-1, CONE, A( I, I ), LDA,
+     $                     A( I, 1 ), LDA )
+               CALL ZLAUU2( 'Lower', IB, A( I, I ), LDA, INFO )
+               IF( I+IB.LE.N ) THEN
+                  CALL ZGEMM( 'Conjugate transpose', 'No transpose', IB,
+     $                        I-1, N-I-IB+1, CONE, A( I+IB, I ), LDA,
+     $                        A( I+IB, 1 ), LDA, CONE, A( I, 1 ), LDA )
+                  CALL ZHERK( 'Lower', 'Conjugate transpose', IB,
+     $                        N-I-IB+1, ONE, A( I+IB, I ), LDA, ONE,
+     $                        A( I, I ), LDA )
                END IF
-            END IF
-   10    CONTINUE
+   20       CONTINUE
+         END IF
       END IF
 *
       RETURN
 *
-*     End of ZLASSQ
+*     End of ZLAUUM
 *
       END
-*> \brief \b ZLASWP performs a series of row interchanges on a general rectangular matrix.
+*> \brief \b ZPOTF2 computes the Cholesky factorization of a symmetric/Hermitian positive definite matrix (unblocked algorithm).
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download ZLASWP + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/zlaswp.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/zlaswp.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/zlaswp.f"> 
+*> Download ZPOTF2 + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/zpotf2.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/zpotf2.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/zpotf2.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
-*       SUBROUTINE ZLASWP( N, A, LDA, K1, K2, IPIV, INCX )
-* 
+*       SUBROUTINE ZPOTF2( UPLO, N, A, LDA, INFO )
+*
 *       .. Scalar Arguments ..
-*       INTEGER            INCX, K1, K2, LDA, N
+*       CHARACTER          UPLO
+*       INTEGER            INFO, LDA, N
 *       ..
 *       .. Array Arguments ..
-*       INTEGER            IPIV( * )
 *       COMPLEX*16         A( LDA, * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
 *>
 *> \verbatim
 *>
-*> ZLASWP performs a series of row interchanges on the matrix A.
-*> One row interchange is initiated for each of rows K1 through K2 of A.
+*> ZPOTF2 computes the Cholesky factorization of a complex Hermitian
+*> positive definite matrix A.
+*>
+*> The factorization has the form
+*>    A = U**H * U ,  if UPLO = 'U', or
+*>    A = L  * L**H,  if UPLO = 'L',
+*> where U is an upper triangular matrix and L is lower triangular.
+*>
+*> This is the unblocked version of the algorithm, calling Level 2 BLAS.
 *> \endverbatim
 *
 *  Arguments:
 *  ==========
 *
+*> \param[in] UPLO
+*> \verbatim
+*>          UPLO is CHARACTER*1
+*>          Specifies whether the upper or lower triangular part of the
+*>          Hermitian matrix A is stored.
+*>          = 'U':  Upper triangular
+*>          = 'L':  Lower triangular
+*> \endverbatim
+*>
 *> \param[in] N
 *> \verbatim
 *>          N is INTEGER
-*>          The number of columns of the matrix A.
+*>          The order of the matrix A.  N >= 0.
 *> \endverbatim
 *>
 *> \param[in,out] A
 *> \verbatim
 *>          A is COMPLEX*16 array, dimension (LDA,N)
-*>          On entry, the matrix of column dimension N to which the row
-*>          interchanges will be applied.
-*>          On exit, the permuted matrix.
+*>          On entry, the Hermitian matrix A.  If UPLO = 'U', the leading
+*>          n by n upper triangular part of A contains the upper
+*>          triangular part of the matrix A, and the strictly lower
+*>          triangular part of A is not referenced.  If UPLO = 'L', the
+*>          leading n by n lower triangular part of A contains the lower
+*>          triangular part of the matrix A, and the strictly upper
+*>          triangular part of A is not referenced.
+*>
+*>          On exit, if INFO = 0, the factor U or L from the Cholesky
+*>          factorization A = U**H *U  or A = L*L**H.
 *> \endverbatim
 *>
 *> \param[in] LDA
 *> \verbatim
 *>          LDA is INTEGER
-*>          The leading dimension of the array A.
-*> \endverbatim
-*>
-*> \param[in] K1
-*> \verbatim
-*>          K1 is INTEGER
-*>          The first element of IPIV for which a row interchange will
-*>          be done.
-*> \endverbatim
-*>
-*> \param[in] K2
-*> \verbatim
-*>          K2 is INTEGER
-*>          The last element of IPIV for which a row interchange will
-*>          be done.
-*> \endverbatim
-*>
-*> \param[in] IPIV
-*> \verbatim
-*>          IPIV is INTEGER array, dimension (K2*abs(INCX))
-*>          The vector of pivot indices.  Only the elements in positions
-*>          K1 through K2 of IPIV are accessed.
-*>          IPIV(K) = L implies rows K and L are to be interchanged.
+*>          The leading dimension of the array A.  LDA >= max(1,N).
 *> \endverbatim
 *>
-*> \param[in] INCX
+*> \param[out] INFO
 *> \verbatim
-*>          INCX is INTEGER
-*>          The increment between successive values of IPIV.  If IPIV
-*>          is negative, the pivots are applied in reverse order.
+*>          INFO is INTEGER
+*>          = 0: successful exit
+*>          < 0: if INFO = -k, the k-th argument had an illegal value
+*>          > 0: if INFO = k, the leading minor of order k is not
+*>               positive definite, and the factorization could not be
+*>               completed.
 *> \endverbatim
 *
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date September 2012
+*> \date December 2016
 *
-*> \ingroup complex16OTHERauxiliary
+*> \ingroup complex16POcomputational
 *
-*> \par Further Details:
-*  =====================
-*>
-*> \verbatim
-*>
-*>  Modified by
-*>   R. C. Whaley, Computer Science Dept., Univ. of Tenn., Knoxville, USA
-*> \endverbatim
-*>
 *  =====================================================================
-      SUBROUTINE ZLASWP( N, A, LDA, K1, K2, IPIV, INCX )
+      SUBROUTINE ZPOTF2( UPLO, N, A, LDA, INFO )
 *
-*  -- LAPACK auxiliary routine (version 3.4.2) --
+*  -- LAPACK computational routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     September 2012
+*     December 2016
 *
 *     .. Scalar Arguments ..
-      INTEGER            INCX, K1, K2, LDA, N
+      CHARACTER          UPLO
+      INTEGER            INFO, LDA, N
 *     ..
 *     .. Array Arguments ..
-      INTEGER            IPIV( * )
       COMPLEX*16         A( LDA, * )
 *     ..
 *
-* =====================================================================
+*  =====================================================================
 *
+*     .. Parameters ..
+      DOUBLE PRECISION   ONE, ZERO
+      PARAMETER          ( ONE = 1.0D+0, ZERO = 0.0D+0 )
+      COMPLEX*16         CONE
+      PARAMETER          ( CONE = ( 1.0D+0, 0.0D+0 ) )
+*     ..
 *     .. Local Scalars ..
-      INTEGER            I, I1, I2, INC, IP, IX, IX0, J, K, N32
-      COMPLEX*16         TEMP
+      LOGICAL            UPPER
+      INTEGER            J
+      DOUBLE PRECISION   AJJ
+*     ..
+*     .. External Functions ..
+      LOGICAL            LSAME, DISNAN
+      COMPLEX*16         ZDOTC
+      EXTERNAL           LSAME, ZDOTC, DISNAN
+*     ..
+*     .. External Subroutines ..
+      EXTERNAL           XERBLA, ZDSCAL, ZGEMV, ZLACGV
+*     ..
+*     .. Intrinsic Functions ..
+      INTRINSIC          DBLE, MAX, SQRT
 *     ..
 *     .. Executable Statements ..
 *
-*     Interchange row I with row IPIV(I) for each of rows K1 through K2.
+*     Test the input parameters.
 *
-      IF( INCX.GT.0 ) THEN
-         IX0 = K1
-         I1 = K1
-         I2 = K2
-         INC = 1
-      ELSE IF( INCX.LT.0 ) THEN
-         IX0 = 1 + ( 1-K2 )*INCX
-         I1 = K2
-         I2 = K1
-         INC = -1
-      ELSE
+      INFO = 0
+      UPPER = LSAME( UPLO, 'U' )
+      IF( .NOT.UPPER .AND. .NOT.LSAME( UPLO, 'L' ) ) THEN
+         INFO = -1
+      ELSE IF( N.LT.0 ) THEN
+         INFO = -2
+      ELSE IF( LDA.LT.MAX( 1, N ) ) THEN
+         INFO = -4
+      END IF
+      IF( INFO.NE.0 ) THEN
+         CALL XERBLA( 'ZPOTF2', -INFO )
          RETURN
       END IF
 *
-      N32 = ( N / 32 )*32
-      IF( N32.NE.0 ) THEN
-         DO 30 J = 1, N32, 32
-            IX = IX0
-            DO 20 I = I1, I2, INC
-               IP = IPIV( IX )
-               IF( IP.NE.I ) THEN
-                  DO 10 K = J, J + 31
-                     TEMP = A( I, K )
-                     A( I, K ) = A( IP, K )
-                     A( IP, K ) = TEMP
-   10             CONTINUE
-               END IF
-               IX = IX + INCX
-   20       CONTINUE
-   30    CONTINUE
-      END IF
-      IF( N32.NE.N ) THEN
-         N32 = N32 + 1
-         IX = IX0
-         DO 50 I = I1, I2, INC
-            IP = IPIV( IX )
-            IF( IP.NE.I ) THEN
-               DO 40 K = N32, N
-                  TEMP = A( I, K )
-                  A( I, K ) = A( IP, K )
-                  A( IP, K ) = TEMP
-   40          CONTINUE
+*     Quick return if possible
+*
+      IF( N.EQ.0 )
+     $   RETURN
+*
+      IF( UPPER ) THEN
+*
+*        Compute the Cholesky factorization A = U**H *U.
+*
+         DO 10 J = 1, N
+*
+*           Compute U(J,J) and test for non-positive-definiteness.
+*
+            AJJ = DBLE( A( J, J ) ) - ZDOTC( J-1, A( 1, J ), 1,
+     $            A( 1, J ), 1 )
+            IF( AJJ.LE.ZERO.OR.DISNAN( AJJ ) ) THEN
+               A( J, J ) = AJJ
+               GO TO 30
             END IF
-            IX = IX + INCX
-   50    CONTINUE
+            AJJ = SQRT( AJJ )
+            A( J, J ) = AJJ
+*
+*           Compute elements J+1:N of row J.
+*
+            IF( J.LT.N ) THEN
+               CALL ZLACGV( J-1, A( 1, J ), 1 )
+               CALL ZGEMV( 'Transpose', J-1, N-J, -CONE, A( 1, J+1 ),
+     $                     LDA, A( 1, J ), 1, CONE, A( J, J+1 ), LDA )
+               CALL ZLACGV( J-1, A( 1, J ), 1 )
+               CALL ZDSCAL( N-J, ONE / AJJ, A( J, J+1 ), LDA )
+            END IF
+   10    CONTINUE
+      ELSE
+*
+*        Compute the Cholesky factorization A = L*L**H.
+*
+         DO 20 J = 1, N
+*
+*           Compute L(J,J) and test for non-positive-definiteness.
+*
+            AJJ = DBLE( A( J, J ) ) - ZDOTC( J-1, A( J, 1 ), LDA,
+     $            A( J, 1 ), LDA )
+            IF( AJJ.LE.ZERO.OR.DISNAN( AJJ ) ) THEN
+               A( J, J ) = AJJ
+               GO TO 30
+            END IF
+            AJJ = SQRT( AJJ )
+            A( J, J ) = AJJ
+*
+*           Compute elements J+1:N of column J.
+*
+            IF( J.LT.N ) THEN
+               CALL ZLACGV( J-1, A( J, 1 ), LDA )
+               CALL ZGEMV( 'No transpose', N-J, J-1, -CONE, A( J+1, 1 ),
+     $                     LDA, A( J, 1 ), LDA, CONE, A( J+1, J ), 1 )
+               CALL ZLACGV( J-1, A( J, 1 ), LDA )
+               CALL ZDSCAL( N-J, ONE / AJJ, A( J+1, J ), 1 )
+            END IF
+   20    CONTINUE
       END IF
+      GO TO 40
+*
+   30 CONTINUE
+      INFO = J
 *
+   40 CONTINUE
       RETURN
 *
-*     End of ZLASWP
+*     End of ZPOTF2
 *
       END
-*> \brief \b ZLATRD reduces the first nb rows and columns of a symmetric/Hermitian matrix A to real tridiagonal form by an unitary similarity transformation.
+*> \brief \b ZPOTRF
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download ZLATRD + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/zlatrd.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/zlatrd.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/zlatrd.f"> 
+*> Download ZPOTRF + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/zpotrf.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/zpotrf.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/zpotrf.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
-*       SUBROUTINE ZLATRD( UPLO, N, NB, A, LDA, E, TAU, W, LDW )
-* 
+*       SUBROUTINE ZPOTRF( UPLO, N, A, LDA, INFO )
+*
 *       .. Scalar Arguments ..
 *       CHARACTER          UPLO
-*       INTEGER            LDA, LDW, N, NB
+*       INTEGER            INFO, LDA, N
 *       ..
 *       .. Array Arguments ..
-*       DOUBLE PRECISION   E( * )
-*       COMPLEX*16         A( LDA, * ), TAU( * ), W( LDW, * )
+*       COMPLEX*16         A( LDA, * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
 *>
 *> \verbatim
 *>
-*> ZLATRD reduces NB rows and columns of a complex Hermitian matrix A to
-*> Hermitian tridiagonal form by a unitary similarity
-*> transformation Q**H * A * Q, and returns the matrices V and W which are
-*> needed to apply the transformation to the unreduced part of A.
+*> ZPOTRF computes the Cholesky factorization of a complex Hermitian
+*> positive definite matrix A.
 *>
-*> If UPLO = 'U', ZLATRD reduces the last NB rows and columns of a
-*> matrix, of which the upper triangle is supplied;
-*> if UPLO = 'L', ZLATRD reduces the first NB rows and columns of a
-*> matrix, of which the lower triangle is supplied.
+*> The factorization has the form
+*>    A = U**H * U,  if UPLO = 'U', or
+*>    A = L  * L**H,  if UPLO = 'L',
+*> where U is an upper triangular matrix and L is lower triangular.
 *>
-*> This is an auxiliary routine called by ZHETRD.
+*> This is the block version of the algorithm, calling Level 3 BLAS.
 *> \endverbatim
 *
 *  Arguments:
@@ -23019,46 +39883,29 @@
 *> \param[in] UPLO
 *> \verbatim
 *>          UPLO is CHARACTER*1
-*>          Specifies whether the upper or lower triangular part of the
-*>          Hermitian matrix A is stored:
-*>          = 'U': Upper triangular
-*>          = 'L': Lower triangular
+*>          = 'U':  Upper triangle of A is stored;
+*>          = 'L':  Lower triangle of A is stored.
 *> \endverbatim
 *>
 *> \param[in] N
 *> \verbatim
 *>          N is INTEGER
-*>          The order of the matrix A.
-*> \endverbatim
-*>
-*> \param[in] NB
-*> \verbatim
-*>          NB is INTEGER
-*>          The number of rows and columns to be reduced.
+*>          The order of the matrix A.  N >= 0.
 *> \endverbatim
 *>
 *> \param[in,out] A
 *> \verbatim
 *>          A is COMPLEX*16 array, dimension (LDA,N)
 *>          On entry, the Hermitian matrix A.  If UPLO = 'U', the leading
-*>          n-by-n upper triangular part of A contains the upper
+*>          N-by-N upper triangular part of A contains the upper
 *>          triangular part of the matrix A, and the strictly lower
 *>          triangular part of A is not referenced.  If UPLO = 'L', the
-*>          leading n-by-n lower triangular part of A contains the lower
+*>          leading N-by-N lower triangular part of A contains the lower
 *>          triangular part of the matrix A, and the strictly upper
 *>          triangular part of A is not referenced.
-*>          On exit:
-*>          if UPLO = 'U', the last NB columns have been reduced to
-*>            tridiagonal form, with the diagonal elements overwriting
-*>            the diagonal elements of A; the elements above the diagonal
-*>            with the array TAU, represent the unitary matrix Q as a
-*>            product of elementary reflectors;
-*>          if UPLO = 'L', the first NB columns have been reduced to
-*>            tridiagonal form, with the diagonal elements overwriting
-*>            the diagonal elements of A; the elements below the diagonal
-*>            with the array TAU, represent the  unitary matrix Q as a
-*>            product of elementary reflectors.
-*>          See Further Details.
+*>
+*>          On exit, if INFO = 0, the factor U or L from the Cholesky
+*>          factorization A = U**H *U or A = L*L**H.
 *> \endverbatim
 *>
 *> \param[in] LDA
@@ -23067,578 +39914,330 @@
 *>          The leading dimension of the array A.  LDA >= max(1,N).
 *> \endverbatim
 *>
-*> \param[out] E
-*> \verbatim
-*>          E is DOUBLE PRECISION array, dimension (N-1)
-*>          If UPLO = 'U', E(n-nb:n-1) contains the superdiagonal
-*>          elements of the last NB columns of the reduced matrix;
-*>          if UPLO = 'L', E(1:nb) contains the subdiagonal elements of
-*>          the first NB columns of the reduced matrix.
-*> \endverbatim
-*>
-*> \param[out] TAU
-*> \verbatim
-*>          TAU is COMPLEX*16 array, dimension (N-1)
-*>          The scalar factors of the elementary reflectors, stored in
-*>          TAU(n-nb:n-1) if UPLO = 'U', and in TAU(1:nb) if UPLO = 'L'.
-*>          See Further Details.
-*> \endverbatim
-*>
-*> \param[out] W
-*> \verbatim
-*>          W is COMPLEX*16 array, dimension (LDW,NB)
-*>          The n-by-nb matrix W required to update the unreduced part
-*>          of A.
-*> \endverbatim
-*>
-*> \param[in] LDW
+*> \param[out] INFO
 *> \verbatim
-*>          LDW is INTEGER
-*>          The leading dimension of the array W. LDW >= max(1,N).
+*>          INFO is INTEGER
+*>          = 0:  successful exit
+*>          < 0:  if INFO = -i, the i-th argument had an illegal value
+*>          > 0:  if INFO = i, the leading minor of order i is not
+*>                positive definite, and the factorization could not be
+*>                completed.
 *> \endverbatim
 *
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date September 2012
+*> \date December 2016
 *
-*> \ingroup complex16OTHERauxiliary
+*> \ingroup complex16POcomputational
 *
-*> \par Further Details:
-*  =====================
-*>
-*> \verbatim
-*>
-*>  If UPLO = 'U', the matrix Q is represented as a product of elementary
-*>  reflectors
-*>
-*>     Q = H(n) H(n-1) . . . H(n-nb+1).
-*>
-*>  Each H(i) has the form
-*>
-*>     H(i) = I - tau * v * v**H
-*>
-*>  where tau is a complex scalar, and v is a complex vector with
-*>  v(i:n) = 0 and v(i-1) = 1; v(1:i-1) is stored on exit in A(1:i-1,i),
-*>  and tau in TAU(i-1).
-*>
-*>  If UPLO = 'L', the matrix Q is represented as a product of elementary
-*>  reflectors
-*>
-*>     Q = H(1) H(2) . . . H(nb).
-*>
-*>  Each H(i) has the form
-*>
-*>     H(i) = I - tau * v * v**H
-*>
-*>  where tau is a complex scalar, and v is a complex vector with
-*>  v(1:i) = 0 and v(i+1) = 1; v(i+1:n) is stored on exit in A(i+1:n,i),
-*>  and tau in TAU(i).
-*>
-*>  The elements of the vectors v together form the n-by-nb matrix V
-*>  which is needed, with W, to apply the transformation to the unreduced
-*>  part of the matrix, using a Hermitian rank-2k update of the form:
-*>  A := A - V*W**H - W*V**H.
-*>
-*>  The contents of A on exit are illustrated by the following examples
-*>  with n = 5 and nb = 2:
-*>
-*>  if UPLO = 'U':                       if UPLO = 'L':
-*>
-*>    (  a   a   a   v4  v5 )              (  d                  )
-*>    (      a   a   v4  v5 )              (  1   d              )
-*>    (          a   1   v5 )              (  v1  1   a          )
-*>    (              d   1  )              (  v1  v2  a   a      )
-*>    (                  d  )              (  v1  v2  a   a   a  )
-*>
-*>  where d denotes a diagonal element of the reduced matrix, a denotes
-*>  an element of the original matrix that is unchanged, and vi denotes
-*>  an element of the vector defining H(i).
-*> \endverbatim
-*>
 *  =====================================================================
-      SUBROUTINE ZLATRD( UPLO, N, NB, A, LDA, E, TAU, W, LDW )
+      SUBROUTINE ZPOTRF( UPLO, N, A, LDA, INFO )
 *
-*  -- LAPACK auxiliary routine (version 3.4.2) --
+*  -- LAPACK computational routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     September 2012
+*     December 2016
 *
 *     .. Scalar Arguments ..
       CHARACTER          UPLO
-      INTEGER            LDA, LDW, N, NB
+      INTEGER            INFO, LDA, N
 *     ..
 *     .. Array Arguments ..
-      DOUBLE PRECISION   E( * )
-      COMPLEX*16         A( LDA, * ), TAU( * ), W( LDW, * )
+      COMPLEX*16         A( LDA, * )
 *     ..
 *
 *  =====================================================================
 *
 *     .. Parameters ..
-      COMPLEX*16         ZERO, ONE, HALF
-      PARAMETER          ( ZERO = ( 0.0D+0, 0.0D+0 ),
-     $                   ONE = ( 1.0D+0, 0.0D+0 ),
-     $                   HALF = ( 0.5D+0, 0.0D+0 ) )
+      DOUBLE PRECISION   ONE
+      COMPLEX*16         CONE
+      PARAMETER          ( ONE = 1.0D+0, CONE = ( 1.0D+0, 0.0D+0 ) )
 *     ..
 *     .. Local Scalars ..
-      INTEGER            I, IW
-      COMPLEX*16         ALPHA
-*     ..
-*     .. External Subroutines ..
-      EXTERNAL           ZAXPY, ZGEMV, ZHEMV, ZLACGV, ZLARFG, ZSCAL
+      LOGICAL            UPPER
+      INTEGER            J, JB, NB
 *     ..
 *     .. External Functions ..
       LOGICAL            LSAME
-      COMPLEX*16         ZDOTC
-      EXTERNAL           LSAME, ZDOTC
+      INTEGER            ILAENV
+      EXTERNAL           LSAME, ILAENV
+*     ..
+*     .. External Subroutines ..
+      EXTERNAL           XERBLA, ZGEMM, ZHERK, ZPOTRF2, ZTRSM
 *     ..
 *     .. Intrinsic Functions ..
-      INTRINSIC          DBLE, MIN
+      INTRINSIC          MAX, MIN
 *     ..
 *     .. Executable Statements ..
 *
+*     Test the input parameters.
+*
+      INFO = 0
+      UPPER = LSAME( UPLO, 'U' )
+      IF( .NOT.UPPER .AND. .NOT.LSAME( UPLO, 'L' ) ) THEN
+         INFO = -1
+      ELSE IF( N.LT.0 ) THEN
+         INFO = -2
+      ELSE IF( LDA.LT.MAX( 1, N ) ) THEN
+         INFO = -4
+      END IF
+      IF( INFO.NE.0 ) THEN
+         CALL XERBLA( 'ZPOTRF', -INFO )
+         RETURN
+      END IF
+*
 *     Quick return if possible
 *
-      IF( N.LE.0 )
+      IF( N.EQ.0 )
      $   RETURN
 *
-      IF( LSAME( UPLO, 'U' ) ) THEN
+*     Determine the block size for this environment.
 *
-*        Reduce last NB columns of upper triangle
+      NB = ILAENV( 1, 'ZPOTRF', UPLO, N, -1, -1, -1 )
+      IF( NB.LE.1 .OR. NB.GE.N ) THEN
 *
-         DO 10 I = N, N - NB + 1, -1
-            IW = I - N + NB
-            IF( I.LT.N ) THEN
+*        Use unblocked code.
 *
-*              Update A(1:i,i)
+         CALL ZPOTRF2( UPLO, N, A, LDA, INFO )
+      ELSE
 *
-               A( I, I ) = DBLE( A( I, I ) )
-               CALL ZLACGV( N-I, W( I, IW+1 ), LDW )
-               CALL ZGEMV( 'No transpose', I, N-I, -ONE, A( 1, I+1 ),
-     $                     LDA, W( I, IW+1 ), LDW, ONE, A( 1, I ), 1 )
-               CALL ZLACGV( N-I, W( I, IW+1 ), LDW )
-               CALL ZLACGV( N-I, A( I, I+1 ), LDA )
-               CALL ZGEMV( 'No transpose', I, N-I, -ONE, W( 1, IW+1 ),
-     $                     LDW, A( I, I+1 ), LDA, ONE, A( 1, I ), 1 )
-               CALL ZLACGV( N-I, A( I, I+1 ), LDA )
-               A( I, I ) = DBLE( A( I, I ) )
-            END IF
-            IF( I.GT.1 ) THEN
+*        Use blocked code.
 *
-*              Generate elementary reflector H(i) to annihilate
-*              A(1:i-2,i)
+         IF( UPPER ) THEN
 *
-               ALPHA = A( I-1, I )
-               CALL ZLARFG( I-1, ALPHA, A( 1, I ), 1, TAU( I-1 ) )
-               E( I-1 ) = ALPHA
-               A( I-1, I ) = ONE
+*           Compute the Cholesky factorization A = U**H *U.
 *
-*              Compute W(1:i-1,i)
+            DO 10 J = 1, N, NB
 *
-               CALL ZHEMV( 'Upper', I-1, ONE, A, LDA, A( 1, I ), 1,
-     $                     ZERO, W( 1, IW ), 1 )
-               IF( I.LT.N ) THEN
-                  CALL ZGEMV( 'Conjugate transpose', I-1, N-I, ONE,
-     $                        W( 1, IW+1 ), LDW, A( 1, I ), 1, ZERO,
-     $                        W( I+1, IW ), 1 )
-                  CALL ZGEMV( 'No transpose', I-1, N-I, -ONE,
-     $                        A( 1, I+1 ), LDA, W( I+1, IW ), 1, ONE,
-     $                        W( 1, IW ), 1 )
-                  CALL ZGEMV( 'Conjugate transpose', I-1, N-I, ONE,
-     $                        A( 1, I+1 ), LDA, A( 1, I ), 1, ZERO,
-     $                        W( I+1, IW ), 1 )
-                  CALL ZGEMV( 'No transpose', I-1, N-I, -ONE,
-     $                        W( 1, IW+1 ), LDW, W( I+1, IW ), 1, ONE,
-     $                        W( 1, IW ), 1 )
-               END IF
-               CALL ZSCAL( I-1, TAU( I-1 ), W( 1, IW ), 1 )
-               ALPHA = -HALF*TAU( I-1 )*ZDOTC( I-1, W( 1, IW ), 1,
-     $                 A( 1, I ), 1 )
-               CALL ZAXPY( I-1, ALPHA, A( 1, I ), 1, W( 1, IW ), 1 )
-            END IF
+*              Update and factorize the current diagonal block and test
+*              for non-positive-definiteness.
 *
-   10    CONTINUE
-      ELSE
+               JB = MIN( NB, N-J+1 )
+               CALL ZHERK( 'Upper', 'Conjugate transpose', JB, J-1,
+     $                     -ONE, A( 1, J ), LDA, ONE, A( J, J ), LDA )
+               CALL ZPOTRF2( 'Upper', JB, A( J, J ), LDA, INFO )
+               IF( INFO.NE.0 )
+     $            GO TO 30
+               IF( J+JB.LE.N ) THEN
 *
-*        Reduce first NB columns of lower triangle
+*                 Compute the current block row.
 *
-         DO 20 I = 1, NB
+                  CALL ZGEMM( 'Conjugate transpose', 'No transpose', JB,
+     $                        N-J-JB+1, J-1, -CONE, A( 1, J ), LDA,
+     $                        A( 1, J+JB ), LDA, CONE, A( J, J+JB ),
+     $                        LDA )
+                  CALL ZTRSM( 'Left', 'Upper', 'Conjugate transpose',
+     $                        'Non-unit', JB, N-J-JB+1, CONE, A( J, J ),
+     $                        LDA, A( J, J+JB ), LDA )
+               END IF
+   10       CONTINUE
 *
-*           Update A(i:n,i)
+         ELSE
 *
-            A( I, I ) = DBLE( A( I, I ) )
-            CALL ZLACGV( I-1, W( I, 1 ), LDW )
-            CALL ZGEMV( 'No transpose', N-I+1, I-1, -ONE, A( I, 1 ),
-     $                  LDA, W( I, 1 ), LDW, ONE, A( I, I ), 1 )
-            CALL ZLACGV( I-1, W( I, 1 ), LDW )
-            CALL ZLACGV( I-1, A( I, 1 ), LDA )
-            CALL ZGEMV( 'No transpose', N-I+1, I-1, -ONE, W( I, 1 ),
-     $                  LDW, A( I, 1 ), LDA, ONE, A( I, I ), 1 )
-            CALL ZLACGV( I-1, A( I, 1 ), LDA )
-            A( I, I ) = DBLE( A( I, I ) )
-            IF( I.LT.N ) THEN
+*           Compute the Cholesky factorization A = L*L**H.
 *
-*              Generate elementary reflector H(i) to annihilate
-*              A(i+2:n,i)
+            DO 20 J = 1, N, NB
 *
-               ALPHA = A( I+1, I )
-               CALL ZLARFG( N-I, ALPHA, A( MIN( I+2, N ), I ), 1,
-     $                      TAU( I ) )
-               E( I ) = ALPHA
-               A( I+1, I ) = ONE
+*              Update and factorize the current diagonal block and test
+*              for non-positive-definiteness.
 *
-*              Compute W(i+1:n,i)
+               JB = MIN( NB, N-J+1 )
+               CALL ZHERK( 'Lower', 'No transpose', JB, J-1, -ONE,
+     $                     A( J, 1 ), LDA, ONE, A( J, J ), LDA )
+               CALL ZPOTRF2( 'Lower', JB, A( J, J ), LDA, INFO )
+               IF( INFO.NE.0 )
+     $            GO TO 30
+               IF( J+JB.LE.N ) THEN
 *
-               CALL ZHEMV( 'Lower', N-I, ONE, A( I+1, I+1 ), LDA,
-     $                     A( I+1, I ), 1, ZERO, W( I+1, I ), 1 )
-               CALL ZGEMV( 'Conjugate transpose', N-I, I-1, ONE,
-     $                     W( I+1, 1 ), LDW, A( I+1, I ), 1, ZERO,
-     $                     W( 1, I ), 1 )
-               CALL ZGEMV( 'No transpose', N-I, I-1, -ONE, A( I+1, 1 ),
-     $                     LDA, W( 1, I ), 1, ONE, W( I+1, I ), 1 )
-               CALL ZGEMV( 'Conjugate transpose', N-I, I-1, ONE,
-     $                     A( I+1, 1 ), LDA, A( I+1, I ), 1, ZERO,
-     $                     W( 1, I ), 1 )
-               CALL ZGEMV( 'No transpose', N-I, I-1, -ONE, W( I+1, 1 ),
-     $                     LDW, W( 1, I ), 1, ONE, W( I+1, I ), 1 )
-               CALL ZSCAL( N-I, TAU( I ), W( I+1, I ), 1 )
-               ALPHA = -HALF*TAU( I )*ZDOTC( N-I, W( I+1, I ), 1,
-     $                 A( I+1, I ), 1 )
-               CALL ZAXPY( N-I, ALPHA, A( I+1, I ), 1, W( I+1, I ), 1 )
-            END IF
+*                 Compute the current block column.
 *
-   20    CONTINUE
+                  CALL ZGEMM( 'No transpose', 'Conjugate transpose',
+     $                        N-J-JB+1, JB, J-1, -CONE, A( J+JB, 1 ),
+     $                        LDA, A( J, 1 ), LDA, CONE, A( J+JB, J ),
+     $                        LDA )
+                  CALL ZTRSM( 'Right', 'Lower', 'Conjugate transpose',
+     $                        'Non-unit', N-J-JB+1, JB, CONE, A( J, J ),
+     $                        LDA, A( J+JB, J ), LDA )
+               END IF
+   20       CONTINUE
+         END IF
       END IF
+      GO TO 40
 *
+   30 CONTINUE
+      INFO = INFO + J - 1
+*
+   40 CONTINUE
       RETURN
 *
-*     End of ZLATRD
+*     End of ZPOTRF
 *
       END
-*> \brief \b ZLATRS solves a triangular system of equations with the scale factor set to prevent overflow.
+*> \brief \b ZPOTRF2
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
-*
-*> \htmlonly
-*> Download ZLATRS + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/zlatrs.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/zlatrs.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/zlatrs.f"> 
-*> [TXT]</a>
-*> \endhtmlonly 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *  Definition:
 *  ===========
 *
-*       SUBROUTINE ZLATRS( UPLO, TRANS, DIAG, NORMIN, N, A, LDA, X, SCALE,
-*                          CNORM, INFO )
-* 
+*       RECURSIVE SUBROUTINE ZPOTRF2( UPLO, N, A, LDA, INFO )
+*
 *       .. Scalar Arguments ..
-*       CHARACTER          DIAG, NORMIN, TRANS, UPLO
+*       CHARACTER          UPLO
 *       INTEGER            INFO, LDA, N
-*       DOUBLE PRECISION   SCALE
 *       ..
 *       .. Array Arguments ..
-*       DOUBLE PRECISION   CNORM( * )
-*       COMPLEX*16         A( LDA, * ), X( * )
+*       COMPLEX*16         A( LDA, * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
 *>
 *> \verbatim
 *>
-*> ZLATRS solves one of the triangular systems
-*>
-*>    A * x = s*b,  A**T * x = s*b,  or  A**H * x = s*b,
-*>
-*> with scaling to prevent overflow.  Here A is an upper or lower
-*> triangular matrix, A**T denotes the transpose of A, A**H denotes the
-*> conjugate transpose of A, x and b are n-element vectors, and s is a
-*> scaling factor, usually less than or equal to 1, chosen so that the
-*> components of x will be less than the overflow threshold.  If the
-*> unscaled problem will not cause overflow, the Level 2 BLAS routine
-*> ZTRSV is called. If the matrix A is singular (A(j,j) = 0 for some j),
-*> then s is set to 0 and a non-trivial solution to A*x = 0 is returned.
-*> \endverbatim
-*
-*  Arguments:
-*  ==========
-*
-*> \param[in] UPLO
-*> \verbatim
-*>          UPLO is CHARACTER*1
-*>          Specifies whether the matrix A is upper or lower triangular.
-*>          = 'U':  Upper triangular
-*>          = 'L':  Lower triangular
-*> \endverbatim
-*>
-*> \param[in] TRANS
-*> \verbatim
-*>          TRANS is CHARACTER*1
-*>          Specifies the operation applied to A.
-*>          = 'N':  Solve A * x = s*b     (No transpose)
-*>          = 'T':  Solve A**T * x = s*b  (Transpose)
-*>          = 'C':  Solve A**H * x = s*b  (Conjugate transpose)
-*> \endverbatim
-*>
-*> \param[in] DIAG
-*> \verbatim
-*>          DIAG is CHARACTER*1
-*>          Specifies whether or not the matrix A is unit triangular.
-*>          = 'N':  Non-unit triangular
-*>          = 'U':  Unit triangular
-*> \endverbatim
-*>
-*> \param[in] NORMIN
-*> \verbatim
-*>          NORMIN is CHARACTER*1
-*>          Specifies whether CNORM has been set or not.
-*>          = 'Y':  CNORM contains the column norms on entry
-*>          = 'N':  CNORM is not set on entry.  On exit, the norms will
-*>                  be computed and stored in CNORM.
-*> \endverbatim
-*>
-*> \param[in] N
-*> \verbatim
-*>          N is INTEGER
-*>          The order of the matrix A.  N >= 0.
-*> \endverbatim
-*>
-*> \param[in] A
-*> \verbatim
-*>          A is COMPLEX*16 array, dimension (LDA,N)
-*>          The triangular matrix A.  If UPLO = 'U', the leading n by n
-*>          upper triangular part of the array A contains the upper
-*>          triangular matrix, and the strictly lower triangular part of
-*>          A is not referenced.  If UPLO = 'L', the leading n by n lower
-*>          triangular part of the array A contains the lower triangular
-*>          matrix, and the strictly upper triangular part of A is not
-*>          referenced.  If DIAG = 'U', the diagonal elements of A are
-*>          also not referenced and are assumed to be 1.
-*> \endverbatim
-*>
-*> \param[in] LDA
-*> \verbatim
-*>          LDA is INTEGER
-*>          The leading dimension of the array A.  LDA >= max (1,N).
-*> \endverbatim
-*>
-*> \param[in,out] X
-*> \verbatim
-*>          X is COMPLEX*16 array, dimension (N)
-*>          On entry, the right hand side b of the triangular system.
-*>          On exit, X is overwritten by the solution vector x.
-*> \endverbatim
-*>
-*> \param[out] SCALE
-*> \verbatim
-*>          SCALE is DOUBLE PRECISION
-*>          The scaling factor s for the triangular system
-*>             A * x = s*b,  A**T * x = s*b,  or  A**H * x = s*b.
-*>          If SCALE = 0, the matrix A is singular or badly scaled, and
-*>          the vector x is an exact or approximate solution to A*x = 0.
-*> \endverbatim
-*>
-*> \param[in,out] CNORM
-*> \verbatim
-*>          CNORM is DOUBLE PRECISION array, dimension (N)
-*>
-*>          If NORMIN = 'Y', CNORM is an input argument and CNORM(j)
-*>          contains the norm of the off-diagonal part of the j-th column
-*>          of A.  If TRANS = 'N', CNORM(j) must be greater than or equal
-*>          to the infinity-norm, and if TRANS = 'T' or 'C', CNORM(j)
-*>          must be greater than or equal to the 1-norm.
-*>
-*>          If NORMIN = 'N', CNORM is an output argument and CNORM(j)
-*>          returns the 1-norm of the offdiagonal part of the j-th column
-*>          of A.
-*> \endverbatim
-*>
-*> \param[out] INFO
-*> \verbatim
-*>          INFO is INTEGER
-*>          = 0:  successful exit
-*>          < 0:  if INFO = -k, the k-th argument had an illegal value
-*> \endverbatim
-*
-*  Authors:
-*  ========
-*
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
-*
-*> \date September 2012
-*
-*> \ingroup complex16OTHERauxiliary
-*
-*> \par Further Details:
-*  =====================
-*>
-*> \verbatim
-*>
-*>  A rough bound on x is computed; if that is less than overflow, ZTRSV
-*>  is called, otherwise, specific code is used which checks for possible
-*>  overflow or divide-by-zero at every operation.
-*>
-*>  A columnwise scheme is used for solving A*x = b.  The basic algorithm
-*>  if A is lower triangular is
-*>
-*>       x[1:n] := b[1:n]
-*>       for j = 1, ..., n
-*>            x(j) := x(j) / A(j,j)
-*>            x[j+1:n] := x[j+1:n] - x(j) * A[j+1:n,j]
-*>       end
-*>
-*>  Define bounds on the components of x after j iterations of the loop:
-*>     M(j) = bound on x[1:j]
-*>     G(j) = bound on x[j+1:n]
-*>  Initially, let M(0) = 0 and G(0) = max{x(i), i=1,...,n}.
-*>
-*>  Then for iteration j+1 we have
-*>     M(j+1) <= G(j) / | A(j+1,j+1) |
-*>     G(j+1) <= G(j) + M(j+1) * | A[j+2:n,j+1] |
-*>            <= G(j) ( 1 + CNORM(j+1) / | A(j+1,j+1) | )
-*>
-*>  where CNORM(j+1) is greater than or equal to the infinity-norm of
-*>  column j+1 of A, not counting the diagonal.  Hence
-*>
-*>     G(j) <= G(0) product ( 1 + CNORM(i) / | A(i,i) | )
-*>                  1<=i<=j
-*>  and
-*>
-*>     |x(j)| <= ( G(0) / |A(j,j)| ) product ( 1 + CNORM(i) / |A(i,i)| )
-*>                                   1<=i< j
-*>
-*>  Since |x(j)| <= M(j), we use the Level 2 BLAS routine ZTRSV if the
-*>  reciprocal of the largest M(j), j=1,..,n, is larger than
-*>  max(underflow, 1/overflow).
+*> ZPOTRF2 computes the Cholesky factorization of a real symmetric
+*> positive definite matrix A using the recursive algorithm.
 *>
-*>  The bound on x(j) is also used to determine when a step in the
-*>  columnwise method can be performed without fear of overflow.  If
-*>  the computed bound is greater than a large constant, x is scaled to
-*>  prevent overflow, but if the bound overflows, x is set to 0, x(j) to
-*>  1, and scale to 0, and a non-trivial solution to A*x = 0 is found.
+*> The factorization has the form
+*>    A = U**H * U,  if UPLO = 'U', or
+*>    A = L  * L**H,  if UPLO = 'L',
+*> where U is an upper triangular matrix and L is lower triangular.
 *>
-*>  Similarly, a row-wise scheme is used to solve A**T *x = b  or
-*>  A**H *x = b.  The basic algorithm for A upper triangular is
+*> This is the recursive version of the algorithm. It divides
+*> the matrix into four submatrices:
 *>
-*>       for j = 1, ..., n
-*>            x(j) := ( b(j) - A[1:j-1,j]' * x[1:j-1] ) / A(j,j)
-*>       end
+*>        [  A11 | A12  ]  where A11 is n1 by n1 and A22 is n2 by n2
+*>    A = [ -----|----- ]  with n1 = n/2
+*>        [  A21 | A22  ]       n2 = n-n1
 *>
-*>  We simultaneously compute two bounds
-*>       G(j) = bound on ( b(i) - A[1:i-1,i]' * x[1:i-1] ), 1<=i<=j
-*>       M(j) = bound on x(i), 1<=i<=j
+*> The subroutine calls itself to factor A11. Update and scale A21
+*> or A12, update A22 then call itself to factor A22.
 *>
-*>  The initial values are G(0) = 0, M(0) = max{b(i), i=1,..,n}, and we
-*>  add the constraint G(j) >= G(j-1) and M(j) >= M(j-1) for j >= 1.
-*>  Then the bound on x(j) is
+*> \endverbatim
+*
+*  Arguments:
+*  ==========
+*
+*> \param[in] UPLO
+*> \verbatim
+*>          UPLO is CHARACTER*1
+*>          = 'U':  Upper triangle of A is stored;
+*>          = 'L':  Lower triangle of A is stored.
+*> \endverbatim
 *>
-*>       M(j) <= M(j-1) * ( 1 + CNORM(j) ) / | A(j,j) |
+*> \param[in] N
+*> \verbatim
+*>          N is INTEGER
+*>          The order of the matrix A.  N >= 0.
+*> \endverbatim
 *>
-*>            <= M(0) * product ( ( 1 + CNORM(i) ) / |A(i,i)| )
-*>                      1<=i<=j
+*> \param[in,out] A
+*> \verbatim
+*>          A is COMPLEX*16 array, dimension (LDA,N)
+*>          On entry, the symmetric matrix A.  If UPLO = 'U', the leading
+*>          N-by-N upper triangular part of A contains the upper
+*>          triangular part of the matrix A, and the strictly lower
+*>          triangular part of A is not referenced.  If UPLO = 'L', the
+*>          leading N-by-N lower triangular part of A contains the lower
+*>          triangular part of the matrix A, and the strictly upper
+*>          triangular part of A is not referenced.
 *>
-*>  and we can safely call ZTRSV if 1/M(n) and 1/G(n) are both greater
-*>  than max(underflow, 1/overflow).
+*>          On exit, if INFO = 0, the factor U or L from the Cholesky
+*>          factorization A = U**H*U or A = L*L**H.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*>          LDA is INTEGER
+*>          The leading dimension of the array A.  LDA >= max(1,N).
 *> \endverbatim
 *>
+*> \param[out] INFO
+*> \verbatim
+*>          INFO is INTEGER
+*>          = 0:  successful exit
+*>          < 0:  if INFO = -i, the i-th argument had an illegal value
+*>          > 0:  if INFO = i, the leading minor of order i is not
+*>                positive definite, and the factorization could not be
+*>                completed.
+*> \endverbatim
+*
+*  Authors:
+*  ========
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date December 2016
+*
+*> \ingroup complex16POcomputational
+*
 *  =====================================================================
-      SUBROUTINE ZLATRS( UPLO, TRANS, DIAG, NORMIN, N, A, LDA, X, SCALE,
-     $                   CNORM, INFO )
+      RECURSIVE SUBROUTINE ZPOTRF2( UPLO, N, A, LDA, INFO )
 *
-*  -- LAPACK auxiliary routine (version 3.4.2) --
+*  -- LAPACK computational routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     September 2012
+*     December 2016
 *
 *     .. Scalar Arguments ..
-      CHARACTER          DIAG, NORMIN, TRANS, UPLO
+      CHARACTER          UPLO
       INTEGER            INFO, LDA, N
-      DOUBLE PRECISION   SCALE
 *     ..
 *     .. Array Arguments ..
-      DOUBLE PRECISION   CNORM( * )
-      COMPLEX*16         A( LDA, * ), X( * )
+      COMPLEX*16         A( LDA, * )
 *     ..
 *
 *  =====================================================================
 *
 *     .. Parameters ..
-      DOUBLE PRECISION   ZERO, HALF, ONE, TWO
-      PARAMETER          ( ZERO = 0.0D+0, HALF = 0.5D+0, ONE = 1.0D+0,
-     $                   TWO = 2.0D+0 )
+      DOUBLE PRECISION   ONE, ZERO
+      PARAMETER          ( ONE = 1.0D+0, ZERO = 0.0D+0 )
+      COMPLEX*16         CONE
+      PARAMETER          ( CONE = (1.0D+0, 0.0D+0) )
 *     ..
 *     .. Local Scalars ..
-      LOGICAL            NOTRAN, NOUNIT, UPPER
-      INTEGER            I, IMAX, J, JFIRST, JINC, JLAST
-      DOUBLE PRECISION   BIGNUM, GROW, REC, SMLNUM, TJJ, TMAX, TSCAL,
-     $                   XBND, XJ, XMAX
-      COMPLEX*16         CSUMJ, TJJS, USCAL, ZDUM
+      LOGICAL            UPPER
+      INTEGER            N1, N2, IINFO
+      DOUBLE PRECISION   AJJ
 *     ..
 *     .. External Functions ..
-      LOGICAL            LSAME
-      INTEGER            IDAMAX, IZAMAX
-      DOUBLE PRECISION   DLAMCH, DZASUM
-      COMPLEX*16         ZDOTC, ZDOTU, ZLADIV
-      EXTERNAL           LSAME, IDAMAX, IZAMAX, DLAMCH, DZASUM, ZDOTC,
-     $                   ZDOTU, ZLADIV
+      LOGICAL            LSAME, DISNAN
+      EXTERNAL           LSAME, DISNAN
 *     ..
 *     .. External Subroutines ..
-      EXTERNAL           DSCAL, XERBLA, ZAXPY, ZDSCAL, ZTRSV
+      EXTERNAL           ZHERK, ZTRSM, XERBLA
 *     ..
 *     .. Intrinsic Functions ..
-      INTRINSIC          ABS, DBLE, DCMPLX, DCONJG, DIMAG, MAX, MIN
-*     ..
-*     .. Statement Functions ..
-      DOUBLE PRECISION   CABS1, CABS2
-*     ..
-*     .. Statement Function definitions ..
-      CABS1( ZDUM ) = ABS( DBLE( ZDUM ) ) + ABS( DIMAG( ZDUM ) )
-      CABS2( ZDUM ) = ABS( DBLE( ZDUM ) / 2.D0 ) +
-     $                ABS( DIMAG( ZDUM ) / 2.D0 )
+      INTRINSIC          MAX, DBLE, SQRT
 *     ..
 *     .. Executable Statements ..
 *
+*     Test the input parameters
+*
       INFO = 0
       UPPER = LSAME( UPLO, 'U' )
-      NOTRAN = LSAME( TRANS, 'N' )
-      NOUNIT = LSAME( DIAG, 'N' )
-*
-*     Test the input parameters.
-*
       IF( .NOT.UPPER .AND. .NOT.LSAME( UPLO, 'L' ) ) THEN
          INFO = -1
-      ELSE IF( .NOT.NOTRAN .AND. .NOT.LSAME( TRANS, 'T' ) .AND. .NOT.
-     $         LSAME( TRANS, 'C' ) ) THEN
-         INFO = -2
-      ELSE IF( .NOT.NOUNIT .AND. .NOT.LSAME( DIAG, 'U' ) ) THEN
-         INFO = -3
-      ELSE IF( .NOT.LSAME( NORMIN, 'Y' ) .AND. .NOT.
-     $         LSAME( NORMIN, 'N' ) ) THEN
-         INFO = -4
       ELSE IF( N.LT.0 ) THEN
-         INFO = -5
+         INFO = -2
       ELSE IF( LDA.LT.MAX( 1, N ) ) THEN
-         INFO = -7
+         INFO = -4
       END IF
       IF( INFO.NE.0 ) THEN
-         CALL XERBLA( 'ZLATRS', -INFO )
+         CALL XERBLA( 'ZPOTRF2', -INFO )
          RETURN
       END IF
 *
@@ -23647,809 +40246,1092 @@
       IF( N.EQ.0 )
      $   RETURN
 *
-*     Determine machine dependent parameters to control overflow.
-*
-      SMLNUM = DLAMCH( 'Safe minimum' )
-      BIGNUM = ONE / SMLNUM
-      CALL DLABAD( SMLNUM, BIGNUM )
-      SMLNUM = SMLNUM / DLAMCH( 'Precision' )
-      BIGNUM = ONE / SMLNUM
-      SCALE = ONE
-*
-      IF( LSAME( NORMIN, 'N' ) ) THEN
-*
-*        Compute the 1-norm of each column, not including the diagonal.
-*
-         IF( UPPER ) THEN
-*
-*           A is upper triangular.
+*     N=1 case
 *
-            DO 10 J = 1, N
-               CNORM( J ) = DZASUM( J-1, A( 1, J ), 1 )
-   10       CONTINUE
-         ELSE
+      IF( N.EQ.1 ) THEN
 *
-*           A is lower triangular.
+*        Test for non-positive-definiteness
 *
-            DO 20 J = 1, N - 1
-               CNORM( J ) = DZASUM( N-J, A( J+1, J ), 1 )
-   20       CONTINUE
-            CNORM( N ) = ZERO
+         AJJ = DBLE( A( 1, 1 ) )
+         IF( AJJ.LE.ZERO.OR.DISNAN( AJJ ) ) THEN
+            INFO = 1
+            RETURN
          END IF
-      END IF
-*
-*     Scale the column norms by TSCAL if the maximum element in CNORM is
-*     greater than BIGNUM/2.
-*
-      IMAX = IDAMAX( N, CNORM, 1 )
-      TMAX = CNORM( IMAX )
-      IF( TMAX.LE.BIGNUM*HALF ) THEN
-         TSCAL = ONE
-      ELSE
-         TSCAL = HALF / ( SMLNUM*TMAX )
-         CALL DSCAL( N, TSCAL, CNORM, 1 )
-      END IF
 *
-*     Compute a bound on the computed solution vector to see if the
-*     Level 2 BLAS routine ZTRSV can be used.
+*        Factor
 *
-      XMAX = ZERO
-      DO 30 J = 1, N
-         XMAX = MAX( XMAX, CABS2( X( J ) ) )
-   30 CONTINUE
-      XBND = XMAX
+         A( 1, 1 ) = SQRT( AJJ )
 *
-      IF( NOTRAN ) THEN
+*     Use recursive code
 *
-*        Compute the growth in A * x = b.
+      ELSE
+         N1 = N/2
+         N2 = N-N1
 *
-         IF( UPPER ) THEN
-            JFIRST = N
-            JLAST = 1
-            JINC = -1
-         ELSE
-            JFIRST = 1
-            JLAST = N
-            JINC = 1
-         END IF
+*        Factor A11
 *
-         IF( TSCAL.NE.ONE ) THEN
-            GROW = ZERO
-            GO TO 60
+         CALL ZPOTRF2( UPLO, N1, A( 1, 1 ), LDA, IINFO )
+         IF ( IINFO.NE.0 ) THEN
+            INFO = IINFO
+            RETURN
          END IF
 *
-         IF( NOUNIT ) THEN
-*
-*           A is non-unit triangular.
-*
-*           Compute GROW = 1/G(j) and XBND = 1/M(j).
-*           Initially, G(0) = max{x(i), i=1,...,n}.
-*
-            GROW = HALF / MAX( XBND, SMLNUM )
-            XBND = GROW
-            DO 40 J = JFIRST, JLAST, JINC
-*
-*              Exit the loop if the growth factor is too small.
-*
-               IF( GROW.LE.SMLNUM )
-     $            GO TO 60
-*
-               TJJS = A( J, J )
-               TJJ = CABS1( TJJS )
+*        Compute the Cholesky factorization A = U**H*U
 *
-               IF( TJJ.GE.SMLNUM ) THEN
-*
-*                 M(j) = G(j-1) / abs(A(j,j))
-*
-                  XBND = MIN( XBND, MIN( ONE, TJJ )*GROW )
-               ELSE
-*
-*                 M(j) could overflow, set XBND to 0.
+         IF( UPPER ) THEN
 *
-                  XBND = ZERO
-               END IF
+*           Update and scale A12
 *
-               IF( TJJ+CNORM( J ).GE.SMLNUM ) THEN
+            CALL ZTRSM( 'L', 'U', 'C', 'N', N1, N2, CONE,
+     $                  A( 1, 1 ), LDA, A( 1, N1+1 ), LDA )
 *
-*                 G(j) = G(j-1)*( 1 + CNORM(j) / abs(A(j,j)) )
+*           Update and factor A22
 *
-                  GROW = GROW*( TJJ / ( TJJ+CNORM( J ) ) )
-               ELSE
+            CALL ZHERK( UPLO, 'C', N2, N1, -ONE, A( 1, N1+1 ), LDA,
+     $                  ONE, A( N1+1, N1+1 ), LDA )
+            CALL ZPOTRF2( UPLO, N2, A( N1+1, N1+1 ), LDA, IINFO )
+            IF ( IINFO.NE.0 ) THEN
+               INFO = IINFO + N1
+               RETURN
+            END IF
 *
-*                 G(j) could overflow, set GROW to 0.
+*        Compute the Cholesky factorization A = L*L**H
 *
-                  GROW = ZERO
-               END IF
-   40       CONTINUE
-            GROW = XBND
          ELSE
 *
-*           A is unit triangular.
-*
-*           Compute GROW = 1/G(j), where G(0) = max{x(i), i=1,...,n}.
-*
-            GROW = MIN( ONE, HALF / MAX( XBND, SMLNUM ) )
-            DO 50 J = JFIRST, JLAST, JINC
+*           Update and scale A21
 *
-*              Exit the loop if the growth factor is too small.
-*
-               IF( GROW.LE.SMLNUM )
-     $            GO TO 60
+            CALL ZTRSM( 'R', 'L', 'C', 'N', N2, N1, CONE,
+     $                  A( 1, 1 ), LDA, A( N1+1, 1 ), LDA )
 *
-*              G(j) = G(j-1)*( 1 + CNORM(j) )
+*           Update and factor A22
 *
-               GROW = GROW*( ONE / ( ONE+CNORM( J ) ) )
-   50       CONTINUE
+            CALL ZHERK( UPLO, 'N', N2, N1, -ONE, A( N1+1, 1 ), LDA,
+     $                  ONE, A( N1+1, N1+1 ), LDA )
+            CALL ZPOTRF2( UPLO, N2, A( N1+1, N1+1 ), LDA, IINFO )
+            IF ( IINFO.NE.0 ) THEN
+               INFO = IINFO + N1
+               RETURN
+            END IF
          END IF
-   60    CONTINUE
-*
-      ELSE
-*
-*        Compute the growth in A**T * x = b  or  A**H * x = b.
+      END IF
+      RETURN
 *
-         IF( UPPER ) THEN
-            JFIRST = 1
-            JLAST = N
-            JINC = 1
-         ELSE
-            JFIRST = N
-            JLAST = 1
-            JINC = -1
-         END IF
+*     End of ZPOTRF2
 *
-         IF( TSCAL.NE.ONE ) THEN
-            GROW = ZERO
-            GO TO 90
-         END IF
+      END
+*> \brief \b ZPOTRI
 *
-         IF( NOUNIT ) THEN
+*  =========== DOCUMENTATION ===========
 *
-*           A is non-unit triangular.
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
-*           Compute GROW = 1/G(j) and XBND = 1/M(j).
-*           Initially, M(0) = max{x(i), i=1,...,n}.
+*> \htmlonly
+*> Download ZPOTRI + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/zpotri.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/zpotri.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/zpotri.f">
+*> [TXT]</a>
+*> \endhtmlonly
 *
-            GROW = HALF / MAX( XBND, SMLNUM )
-            XBND = GROW
-            DO 70 J = JFIRST, JLAST, JINC
+*  Definition:
+*  ===========
 *
-*              Exit the loop if the growth factor is too small.
+*       SUBROUTINE ZPOTRI( UPLO, N, A, LDA, INFO )
 *
-               IF( GROW.LE.SMLNUM )
-     $            GO TO 90
+*       .. Scalar Arguments ..
+*       CHARACTER          UPLO
+*       INTEGER            INFO, LDA, N
+*       ..
+*       .. Array Arguments ..
+*       COMPLEX*16         A( LDA, * )
+*       ..
 *
-*              G(j) = max( G(j-1), M(j-1)*( 1 + CNORM(j) ) )
 *
-               XJ = ONE + CNORM( J )
-               GROW = MIN( GROW, XBND / XJ )
+*> \par Purpose:
+*  =============
+*>
+*> \verbatim
+*>
+*> ZPOTRI computes the inverse of a complex Hermitian positive definite
+*> matrix A using the Cholesky factorization A = U**H*U or A = L*L**H
+*> computed by ZPOTRF.
+*> \endverbatim
 *
-               TJJS = A( J, J )
-               TJJ = CABS1( TJJS )
+*  Arguments:
+*  ==========
 *
-               IF( TJJ.GE.SMLNUM ) THEN
+*> \param[in] UPLO
+*> \verbatim
+*>          UPLO is CHARACTER*1
+*>          = 'U':  Upper triangle of A is stored;
+*>          = 'L':  Lower triangle of A is stored.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*>          N is INTEGER
+*>          The order of the matrix A.  N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*>          A is COMPLEX*16 array, dimension (LDA,N)
+*>          On entry, the triangular factor U or L from the Cholesky
+*>          factorization A = U**H*U or A = L*L**H, as computed by
+*>          ZPOTRF.
+*>          On exit, the upper or lower triangle of the (Hermitian)
+*>          inverse of A, overwriting the input factor U or L.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*>          LDA is INTEGER
+*>          The leading dimension of the array A.  LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*>          INFO is INTEGER
+*>          = 0:  successful exit
+*>          < 0:  if INFO = -i, the i-th argument had an illegal value
+*>          > 0:  if INFO = i, the (i,i) element of the factor U or L is
+*>                zero, and the inverse could not be computed.
+*> \endverbatim
 *
-*                 M(j) = M(j-1)*( 1 + CNORM(j) ) / abs(A(j,j))
+*  Authors:
+*  ========
 *
-                  IF( XJ.GT.TJJ )
-     $               XBND = XBND*( TJJ / XJ )
-               ELSE
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*                 M(j) could overflow, set XBND to 0.
+*> \date December 2016
 *
-                  XBND = ZERO
-               END IF
-   70       CONTINUE
-            GROW = MIN( GROW, XBND )
-         ELSE
+*> \ingroup complex16POcomputational
 *
-*           A is unit triangular.
+*  =====================================================================
+      SUBROUTINE ZPOTRI( UPLO, N, A, LDA, INFO )
 *
-*           Compute GROW = 1/G(j), where G(0) = max{x(i), i=1,...,n}.
+*  -- LAPACK computational routine (version 3.7.0) --
+*  -- LAPACK is a software package provided by Univ. of Tennessee,    --
+*  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+*     December 2016
 *
-            GROW = MIN( ONE, HALF / MAX( XBND, SMLNUM ) )
-            DO 80 J = JFIRST, JLAST, JINC
+*     .. Scalar Arguments ..
+      CHARACTER          UPLO
+      INTEGER            INFO, LDA, N
+*     ..
+*     .. Array Arguments ..
+      COMPLEX*16         A( LDA, * )
+*     ..
 *
-*              Exit the loop if the growth factor is too small.
+*  =====================================================================
 *
-               IF( GROW.LE.SMLNUM )
-     $            GO TO 90
+*     .. External Functions ..
+      LOGICAL            LSAME
+      EXTERNAL           LSAME
+*     ..
+*     .. External Subroutines ..
+      EXTERNAL           XERBLA, ZLAUUM, ZTRTRI
+*     ..
+*     .. Intrinsic Functions ..
+      INTRINSIC          MAX
+*     ..
+*     .. Executable Statements ..
 *
-*              G(j) = ( 1 + CNORM(j) )*G(j-1)
+*     Test the input parameters.
 *
-               XJ = ONE + CNORM( J )
-               GROW = GROW / XJ
-   80       CONTINUE
-         END IF
-   90    CONTINUE
+      INFO = 0
+      IF( .NOT.LSAME( UPLO, 'U' ) .AND. .NOT.LSAME( UPLO, 'L' ) ) THEN
+         INFO = -1
+      ELSE IF( N.LT.0 ) THEN
+         INFO = -2
+      ELSE IF( LDA.LT.MAX( 1, N ) ) THEN
+         INFO = -4
+      END IF
+      IF( INFO.NE.0 ) THEN
+         CALL XERBLA( 'ZPOTRI', -INFO )
+         RETURN
       END IF
 *
-      IF( ( GROW*TSCAL ).GT.SMLNUM ) THEN
+*     Quick return if possible
 *
-*        Use the Level 2 BLAS solve if the reciprocal of the bound on
-*        elements of X is not too small.
+      IF( N.EQ.0 )
+     $   RETURN
 *
-         CALL ZTRSV( UPLO, TRANS, DIAG, N, A, LDA, X, 1 )
-      ELSE
+*     Invert the triangular Cholesky factor U or L.
 *
-*        Use a Level 1 BLAS solve, scaling intermediate results.
+      CALL ZTRTRI( UPLO, 'Non-unit', N, A, LDA, INFO )
+      IF( INFO.GT.0 )
+     $   RETURN
 *
-         IF( XMAX.GT.BIGNUM*HALF ) THEN
+*     Form inv(U) * inv(U)**H or inv(L)**H * inv(L).
 *
-*           Scale X so that its components are less than or equal to
-*           BIGNUM in absolute value.
+      CALL ZLAUUM( UPLO, N, A, LDA, INFO )
 *
-            SCALE = ( BIGNUM*HALF ) / XMAX
-            CALL ZDSCAL( N, SCALE, X, 1 )
-            XMAX = BIGNUM
-         ELSE
-            XMAX = XMAX*TWO
-         END IF
+      RETURN
 *
-         IF( NOTRAN ) THEN
+*     End of ZPOTRI
 *
-*           Solve A * x = b
+      END
+*> \brief \b ZROT applies a plane rotation with real cosine and complex sine to a pair of complex vectors.
 *
-            DO 120 J = JFIRST, JLAST, JINC
+*  =========== DOCUMENTATION ===========
 *
-*              Compute x(j) = b(j) / A(j,j), scaling x if necessary.
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
-               XJ = CABS1( X( J ) )
-               IF( NOUNIT ) THEN
-                  TJJS = A( J, J )*TSCAL
-               ELSE
-                  TJJS = TSCAL
-                  IF( TSCAL.EQ.ONE )
-     $               GO TO 110
-               END IF
-               TJJ = CABS1( TJJS )
-               IF( TJJ.GT.SMLNUM ) THEN
+*> \htmlonly
+*> Download ZROT + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/zrot.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/zrot.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/zrot.f">
+*> [TXT]</a>
+*> \endhtmlonly
 *
-*                    abs(A(j,j)) > SMLNUM:
+*  Definition:
+*  ===========
 *
-                  IF( TJJ.LT.ONE ) THEN
-                     IF( XJ.GT.TJJ*BIGNUM ) THEN
+*       SUBROUTINE ZROT( N, CX, INCX, CY, INCY, C, S )
 *
-*                          Scale x by 1/b(j).
+*       .. Scalar Arguments ..
+*       INTEGER            INCX, INCY, N
+*       DOUBLE PRECISION   C
+*       COMPLEX*16         S
+*       ..
+*       .. Array Arguments ..
+*       COMPLEX*16         CX( * ), CY( * )
+*       ..
 *
-                        REC = ONE / XJ
-                        CALL ZDSCAL( N, REC, X, 1 )
-                        SCALE = SCALE*REC
-                        XMAX = XMAX*REC
-                     END IF
-                  END IF
-                  X( J ) = ZLADIV( X( J ), TJJS )
-                  XJ = CABS1( X( J ) )
-               ELSE IF( TJJ.GT.ZERO ) THEN
 *
-*                    0 < abs(A(j,j)) <= SMLNUM:
+*> \par Purpose:
+*  =============
+*>
+*> \verbatim
+*>
+*> ZROT   applies a plane rotation, where the cos (C) is real and the
+*> sin (S) is complex, and the vectors CX and CY are complex.
+*> \endverbatim
 *
-                  IF( XJ.GT.TJJ*BIGNUM ) THEN
+*  Arguments:
+*  ==========
 *
-*                       Scale x by (1/abs(x(j)))*abs(A(j,j))*BIGNUM
-*                       to avoid overflow when dividing by A(j,j).
+*> \param[in] N
+*> \verbatim
+*>          N is INTEGER
+*>          The number of elements in the vectors CX and CY.
+*> \endverbatim
+*>
+*> \param[in,out] CX
+*> \verbatim
+*>          CX is COMPLEX*16 array, dimension (N)
+*>          On input, the vector X.
+*>          On output, CX is overwritten with C*X + S*Y.
+*> \endverbatim
+*>
+*> \param[in] INCX
+*> \verbatim
+*>          INCX is INTEGER
+*>          The increment between successive values of CY.  INCX <> 0.
+*> \endverbatim
+*>
+*> \param[in,out] CY
+*> \verbatim
+*>          CY is COMPLEX*16 array, dimension (N)
+*>          On input, the vector Y.
+*>          On output, CY is overwritten with -CONJG(S)*X + C*Y.
+*> \endverbatim
+*>
+*> \param[in] INCY
+*> \verbatim
+*>          INCY is INTEGER
+*>          The increment between successive values of CY.  INCX <> 0.
+*> \endverbatim
+*>
+*> \param[in] C
+*> \verbatim
+*>          C is DOUBLE PRECISION
+*> \endverbatim
+*>
+*> \param[in] S
+*> \verbatim
+*>          S is COMPLEX*16
+*>          C and S define a rotation
+*>             [  C          S  ]
+*>             [ -conjg(S)   C  ]
+*>          where C*C + S*CONJG(S) = 1.0.
+*> \endverbatim
 *
-                     REC = ( TJJ*BIGNUM ) / XJ
-                     IF( CNORM( J ).GT.ONE ) THEN
+*  Authors:
+*  ========
 *
-*                          Scale by 1/CNORM(j) to avoid overflow when
-*                          multiplying x(j) times column j.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-                        REC = REC / CNORM( J )
-                     END IF
-                     CALL ZDSCAL( N, REC, X, 1 )
-                     SCALE = SCALE*REC
-                     XMAX = XMAX*REC
-                  END IF
-                  X( J ) = ZLADIV( X( J ), TJJS )
-                  XJ = CABS1( X( J ) )
-               ELSE
+*> \date December 2016
 *
-*                    A(j,j) = 0:  Set x(1:n) = 0, x(j) = 1, and
-*                    scale = 0, and compute a solution to A*x = 0.
+*> \ingroup complex16OTHERauxiliary
 *
-                  DO 100 I = 1, N
-                     X( I ) = ZERO
-  100             CONTINUE
-                  X( J ) = ONE
-                  XJ = ONE
-                  SCALE = ZERO
-                  XMAX = ZERO
-               END IF
-  110          CONTINUE
+*  =====================================================================
+      SUBROUTINE ZROT( N, CX, INCX, CY, INCY, C, S )
 *
-*              Scale x if necessary to avoid overflow when adding a
-*              multiple of column j of A.
+*  -- LAPACK auxiliary routine (version 3.7.0) --
+*  -- LAPACK is a software package provided by Univ. of Tennessee,    --
+*  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+*     December 2016
 *
-               IF( XJ.GT.ONE ) THEN
-                  REC = ONE / XJ
-                  IF( CNORM( J ).GT.( BIGNUM-XMAX )*REC ) THEN
+*     .. Scalar Arguments ..
+      INTEGER            INCX, INCY, N
+      DOUBLE PRECISION   C
+      COMPLEX*16         S
+*     ..
+*     .. Array Arguments ..
+      COMPLEX*16         CX( * ), CY( * )
+*     ..
 *
-*                    Scale x by 1/(2*abs(x(j))).
+* =====================================================================
 *
-                     REC = REC*HALF
-                     CALL ZDSCAL( N, REC, X, 1 )
-                     SCALE = SCALE*REC
-                  END IF
-               ELSE IF( XJ*CNORM( J ).GT.( BIGNUM-XMAX ) ) THEN
+*     .. Local Scalars ..
+      INTEGER            I, IX, IY
+      COMPLEX*16         STEMP
+*     ..
+*     .. Intrinsic Functions ..
+      INTRINSIC          DCONJG
+*     ..
+*     .. Executable Statements ..
 *
-*                 Scale x by 1/2.
+      IF( N.LE.0 )
+     $   RETURN
+      IF( INCX.EQ.1 .AND. INCY.EQ.1 )
+     $   GO TO 20
 *
-                  CALL ZDSCAL( N, HALF, X, 1 )
-                  SCALE = SCALE*HALF
-               END IF
+*     Code for unequal increments or equal increments not equal to 1
 *
-               IF( UPPER ) THEN
-                  IF( J.GT.1 ) THEN
+      IX = 1
+      IY = 1
+      IF( INCX.LT.0 )
+     $   IX = ( -N+1 )*INCX + 1
+      IF( INCY.LT.0 )
+     $   IY = ( -N+1 )*INCY + 1
+      DO 10 I = 1, N
+         STEMP = C*CX( IX ) + S*CY( IY )
+         CY( IY ) = C*CY( IY ) - DCONJG( S )*CX( IX )
+         CX( IX ) = STEMP
+         IX = IX + INCX
+         IY = IY + INCY
+   10 CONTINUE
+      RETURN
 *
-*                    Compute the update
-*                       x(1:j-1) := x(1:j-1) - x(j) * A(1:j-1,j)
+*     Code for both increments equal to 1
 *
-                     CALL ZAXPY( J-1, -X( J )*TSCAL, A( 1, J ), 1, X,
-     $                           1 )
-                     I = IZAMAX( J-1, X, 1 )
-                     XMAX = CABS1( X( I ) )
-                  END IF
-               ELSE
-                  IF( J.LT.N ) THEN
+   20 CONTINUE
+      DO 30 I = 1, N
+         STEMP = C*CX( I ) + S*CY( I )
+         CY( I ) = C*CY( I ) - DCONJG( S )*CX( I )
+         CX( I ) = STEMP
+   30 CONTINUE
+      RETURN
+      END
+*> \brief \b ZSTEDC
 *
-*                    Compute the update
-*                       x(j+1:n) := x(j+1:n) - x(j) * A(j+1:n,j)
+*  =========== DOCUMENTATION ===========
 *
-                     CALL ZAXPY( N-J, -X( J )*TSCAL, A( J+1, J ), 1,
-     $                           X( J+1 ), 1 )
-                     I = J + IZAMAX( N-J, X( J+1 ), 1 )
-                     XMAX = CABS1( X( I ) )
-                  END IF
-               END IF
-  120       CONTINUE
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
-         ELSE IF( LSAME( TRANS, 'T' ) ) THEN
+*> \htmlonly
+*> Download ZSTEDC + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/zstedc.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/zstedc.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/zstedc.f">
+*> [TXT]</a>
+*> \endhtmlonly
 *
-*           Solve A**T * x = b
+*  Definition:
+*  ===========
 *
-            DO 170 J = JFIRST, JLAST, JINC
+*       SUBROUTINE ZSTEDC( COMPZ, N, D, E, Z, LDZ, WORK, LWORK, RWORK,
+*                          LRWORK, IWORK, LIWORK, INFO )
 *
-*              Compute x(j) = b(j) - sum A(k,j)*x(k).
-*                                    k<>j
+*       .. Scalar Arguments ..
+*       CHARACTER          COMPZ
+*       INTEGER            INFO, LDZ, LIWORK, LRWORK, LWORK, N
+*       ..
+*       .. Array Arguments ..
+*       INTEGER            IWORK( * )
+*       DOUBLE PRECISION   D( * ), E( * ), RWORK( * )
+*       COMPLEX*16         WORK( * ), Z( LDZ, * )
+*       ..
 *
-               XJ = CABS1( X( J ) )
-               USCAL = TSCAL
-               REC = ONE / MAX( XMAX, ONE )
-               IF( CNORM( J ).GT.( BIGNUM-XJ )*REC ) THEN
 *
-*                 If x(j) could overflow, scale x by 1/(2*XMAX).
+*> \par Purpose:
+*  =============
+*>
+*> \verbatim
+*>
+*> ZSTEDC computes all eigenvalues and, optionally, eigenvectors of a
+*> symmetric tridiagonal matrix using the divide and conquer method.
+*> The eigenvectors of a full or band complex Hermitian matrix can also
+*> be found if ZHETRD or ZHPTRD or ZHBTRD has been used to reduce this
+*> matrix to tridiagonal form.
+*>
+*> This code makes very mild assumptions about floating point
+*> arithmetic. It will work on machines with a guard digit in
+*> add/subtract, or on those binary machines without guard digits
+*> which subtract like the Cray X-MP, Cray Y-MP, Cray C-90, or Cray-2.
+*> It could conceivably fail on hexadecimal or decimal machines
+*> without guard digits, but we know of none.  See DLAED3 for details.
+*> \endverbatim
 *
-                  REC = REC*HALF
-                  IF( NOUNIT ) THEN
-                     TJJS = A( J, J )*TSCAL
-                  ELSE
-                     TJJS = TSCAL
-                  END IF
-                  TJJ = CABS1( TJJS )
-                  IF( TJJ.GT.ONE ) THEN
+*  Arguments:
+*  ==========
 *
-*                       Divide by A(j,j) when scaling x if A(j,j) > 1.
+*> \param[in] COMPZ
+*> \verbatim
+*>          COMPZ is CHARACTER*1
+*>          = 'N':  Compute eigenvalues only.
+*>          = 'I':  Compute eigenvectors of tridiagonal matrix also.
+*>          = 'V':  Compute eigenvectors of original Hermitian matrix
+*>                  also.  On entry, Z contains the unitary matrix used
+*>                  to reduce the original matrix to tridiagonal form.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*>          N is INTEGER
+*>          The dimension of the symmetric tridiagonal matrix.  N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] D
+*> \verbatim
+*>          D is DOUBLE PRECISION array, dimension (N)
+*>          On entry, the diagonal elements of the tridiagonal matrix.
+*>          On exit, if INFO = 0, the eigenvalues in ascending order.
+*> \endverbatim
+*>
+*> \param[in,out] E
+*> \verbatim
+*>          E is DOUBLE PRECISION array, dimension (N-1)
+*>          On entry, the subdiagonal elements of the tridiagonal matrix.
+*>          On exit, E has been destroyed.
+*> \endverbatim
+*>
+*> \param[in,out] Z
+*> \verbatim
+*>          Z is COMPLEX*16 array, dimension (LDZ,N)
+*>          On entry, if COMPZ = 'V', then Z contains the unitary
+*>          matrix used in the reduction to tridiagonal form.
+*>          On exit, if INFO = 0, then if COMPZ = 'V', Z contains the
+*>          orthonormal eigenvectors of the original Hermitian matrix,
+*>          and if COMPZ = 'I', Z contains the orthonormal eigenvectors
+*>          of the symmetric tridiagonal matrix.
+*>          If  COMPZ = 'N', then Z is not referenced.
+*> \endverbatim
+*>
+*> \param[in] LDZ
+*> \verbatim
+*>          LDZ is INTEGER
+*>          The leading dimension of the array Z.  LDZ >= 1.
+*>          If eigenvectors are desired, then LDZ >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*>          WORK is COMPLEX*16 array, dimension (MAX(1,LWORK))
+*>          On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*>          LWORK is INTEGER
+*>          The dimension of the array WORK.
+*>          If COMPZ = 'N' or 'I', or N <= 1, LWORK must be at least 1.
+*>          If COMPZ = 'V' and N > 1, LWORK must be at least N*N.
+*>          Note that for COMPZ = 'V', then if N is less than or
+*>          equal to the minimum divide size, usually 25, then LWORK need
+*>          only be 1.
+*>
+*>          If LWORK = -1, then a workspace query is assumed; the routine
+*>          only calculates the optimal sizes of the WORK, RWORK and
+*>          IWORK arrays, returns these values as the first entries of
+*>          the WORK, RWORK and IWORK arrays, and no error message
+*>          related to LWORK or LRWORK or LIWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*>          RWORK is DOUBLE PRECISION array,
+*>                                         dimension (LRWORK)
+*>          On exit, if INFO = 0, RWORK(1) returns the optimal LRWORK.
+*> \endverbatim
+*>
+*> \param[in] LRWORK
+*> \verbatim
+*>          LRWORK is INTEGER
+*>          The dimension of the array RWORK.
+*>          If COMPZ = 'N' or N <= 1, LRWORK must be at least 1.
+*>          If COMPZ = 'V' and N > 1, LRWORK must be at least
+*>                         1 + 3*N + 2*N*lg N + 4*N**2 ,
+*>                         where lg( N ) = smallest integer k such
+*>                         that 2**k >= N.
+*>          If COMPZ = 'I' and N > 1, LRWORK must be at least
+*>                         1 + 4*N + 2*N**2 .
+*>          Note that for COMPZ = 'I' or 'V', then if N is less than or
+*>          equal to the minimum divide size, usually 25, then LRWORK
+*>          need only be max(1,2*(N-1)).
+*>
+*>          If LRWORK = -1, then a workspace query is assumed; the
+*>          routine only calculates the optimal sizes of the WORK, RWORK
+*>          and IWORK arrays, returns these values as the first entries
+*>          of the WORK, RWORK and IWORK arrays, and no error message
+*>          related to LWORK or LRWORK or LIWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] IWORK
+*> \verbatim
+*>          IWORK is INTEGER array, dimension (MAX(1,LIWORK))
+*>          On exit, if INFO = 0, IWORK(1) returns the optimal LIWORK.
+*> \endverbatim
+*>
+*> \param[in] LIWORK
+*> \verbatim
+*>          LIWORK is INTEGER
+*>          The dimension of the array IWORK.
+*>          If COMPZ = 'N' or N <= 1, LIWORK must be at least 1.
+*>          If COMPZ = 'V' or N > 1,  LIWORK must be at least
+*>                                    6 + 6*N + 5*N*lg N.
+*>          If COMPZ = 'I' or N > 1,  LIWORK must be at least
+*>                                    3 + 5*N .
+*>          Note that for COMPZ = 'I' or 'V', then if N is less than or
+*>          equal to the minimum divide size, usually 25, then LIWORK
+*>          need only be 1.
+*>
+*>          If LIWORK = -1, then a workspace query is assumed; the
+*>          routine only calculates the optimal sizes of the WORK, RWORK
+*>          and IWORK arrays, returns these values as the first entries
+*>          of the WORK, RWORK and IWORK arrays, and no error message
+*>          related to LWORK or LRWORK or LIWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*>          INFO is INTEGER
+*>          = 0:  successful exit.
+*>          < 0:  if INFO = -i, the i-th argument had an illegal value.
+*>          > 0:  The algorithm failed to compute an eigenvalue while
+*>                working on the submatrix lying in rows and columns
+*>                INFO/(N+1) through mod(INFO,N+1).
+*> \endverbatim
 *
-                     REC = MIN( ONE, REC*TJJ )
-                     USCAL = ZLADIV( USCAL, TJJS )
-                  END IF
-                  IF( REC.LT.ONE ) THEN
-                     CALL ZDSCAL( N, REC, X, 1 )
-                     SCALE = SCALE*REC
-                     XMAX = XMAX*REC
-                  END IF
-               END IF
+*  Authors:
+*  ========
 *
-               CSUMJ = ZERO
-               IF( USCAL.EQ.DCMPLX( ONE ) ) THEN
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*                 If the scaling needed for A in the dot product is 1,
-*                 call ZDOTU to perform the dot product.
+*> \date December 2016
 *
-                  IF( UPPER ) THEN
-                     CSUMJ = ZDOTU( J-1, A( 1, J ), 1, X, 1 )
-                  ELSE IF( J.LT.N ) THEN
-                     CSUMJ = ZDOTU( N-J, A( J+1, J ), 1, X( J+1 ), 1 )
-                  END IF
-               ELSE
+*> \ingroup complex16OTHERcomputational
 *
-*                 Otherwise, use in-line code for the dot product.
+*> \par Contributors:
+*  ==================
+*>
+*> Jeff Rutter, Computer Science Division, University of California
+*> at Berkeley, USA
 *
-                  IF( UPPER ) THEN
-                     DO 130 I = 1, J - 1
-                        CSUMJ = CSUMJ + ( A( I, J )*USCAL )*X( I )
-  130                CONTINUE
-                  ELSE IF( J.LT.N ) THEN
-                     DO 140 I = J + 1, N
-                        CSUMJ = CSUMJ + ( A( I, J )*USCAL )*X( I )
-  140                CONTINUE
-                  END IF
-               END IF
+*  =====================================================================
+      SUBROUTINE ZSTEDC( COMPZ, N, D, E, Z, LDZ, WORK, LWORK, RWORK,
+     $                   LRWORK, IWORK, LIWORK, INFO )
 *
-               IF( USCAL.EQ.DCMPLX( TSCAL ) ) THEN
+*  -- LAPACK computational routine (version 3.7.0) --
+*  -- LAPACK is a software package provided by Univ. of Tennessee,    --
+*  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+*     December 2016
 *
-*                 Compute x(j) := ( x(j) - CSUMJ ) / A(j,j) if 1/A(j,j)
-*                 was not used to scale the dotproduct.
+*     .. Scalar Arguments ..
+      CHARACTER          COMPZ
+      INTEGER            INFO, LDZ, LIWORK, LRWORK, LWORK, N
+*     ..
+*     .. Array Arguments ..
+      INTEGER            IWORK( * )
+      DOUBLE PRECISION   D( * ), E( * ), RWORK( * )
+      COMPLEX*16         WORK( * ), Z( LDZ, * )
+*     ..
 *
-                  X( J ) = X( J ) - CSUMJ
-                  XJ = CABS1( X( J ) )
-                  IF( NOUNIT ) THEN
-                     TJJS = A( J, J )*TSCAL
-                  ELSE
-                     TJJS = TSCAL
-                     IF( TSCAL.EQ.ONE )
-     $                  GO TO 160
-                  END IF
+*  =====================================================================
 *
-*                    Compute x(j) = x(j) / A(j,j), scaling if necessary.
+*     .. Parameters ..
+      DOUBLE PRECISION   ZERO, ONE, TWO
+      PARAMETER          ( ZERO = 0.0D0, ONE = 1.0D0, TWO = 2.0D0 )
+*     ..
+*     .. Local Scalars ..
+      LOGICAL            LQUERY
+      INTEGER            FINISH, I, ICOMPZ, II, J, K, LGN, LIWMIN, LL,
+     $                   LRWMIN, LWMIN, M, SMLSIZ, START
+      DOUBLE PRECISION   EPS, ORGNRM, P, TINY
+*     ..
+*     .. External Functions ..
+      LOGICAL            LSAME
+      INTEGER            ILAENV
+      DOUBLE PRECISION   DLAMCH, DLANST
+      EXTERNAL           LSAME, ILAENV, DLAMCH, DLANST
+*     ..
+*     .. External Subroutines ..
+      EXTERNAL           DLASCL, DLASET, DSTEDC, DSTEQR, DSTERF, XERBLA,
+     $                   ZLACPY, ZLACRM, ZLAED0, ZSTEQR, ZSWAP
+*     ..
+*     .. Intrinsic Functions ..
+      INTRINSIC          ABS, DBLE, INT, LOG, MAX, MOD, SQRT
+*     ..
+*     .. Executable Statements ..
 *
-                  TJJ = CABS1( TJJS )
-                  IF( TJJ.GT.SMLNUM ) THEN
+*     Test the input parameters.
 *
-*                       abs(A(j,j)) > SMLNUM:
+      INFO = 0
+      LQUERY = ( LWORK.EQ.-1 .OR. LRWORK.EQ.-1 .OR. LIWORK.EQ.-1 )
 *
-                     IF( TJJ.LT.ONE ) THEN
-                        IF( XJ.GT.TJJ*BIGNUM ) THEN
+      IF( LSAME( COMPZ, 'N' ) ) THEN
+         ICOMPZ = 0
+      ELSE IF( LSAME( COMPZ, 'V' ) ) THEN
+         ICOMPZ = 1
+      ELSE IF( LSAME( COMPZ, 'I' ) ) THEN
+         ICOMPZ = 2
+      ELSE
+         ICOMPZ = -1
+      END IF
+      IF( ICOMPZ.LT.0 ) THEN
+         INFO = -1
+      ELSE IF( N.LT.0 ) THEN
+         INFO = -2
+      ELSE IF( ( LDZ.LT.1 ) .OR.
+     $         ( ICOMPZ.GT.0 .AND. LDZ.LT.MAX( 1, N ) ) ) THEN
+         INFO = -6
+      END IF
 *
-*                             Scale X by 1/abs(x(j)).
+      IF( INFO.EQ.0 ) THEN
 *
-                           REC = ONE / XJ
-                           CALL ZDSCAL( N, REC, X, 1 )
-                           SCALE = SCALE*REC
-                           XMAX = XMAX*REC
-                        END IF
-                     END IF
-                     X( J ) = ZLADIV( X( J ), TJJS )
-                  ELSE IF( TJJ.GT.ZERO ) THEN
+*        Compute the workspace requirements
+*
+         SMLSIZ = ILAENV( 9, 'ZSTEDC', ' ', 0, 0, 0, 0 )
+         IF( N.LE.1 .OR. ICOMPZ.EQ.0 ) THEN
+            LWMIN = 1
+            LIWMIN = 1
+            LRWMIN = 1
+         ELSE IF( N.LE.SMLSIZ ) THEN
+            LWMIN = 1
+            LIWMIN = 1
+            LRWMIN = 2*( N - 1 )
+         ELSE IF( ICOMPZ.EQ.1 ) THEN
+            LGN = INT( LOG( DBLE( N ) ) / LOG( TWO ) )
+            IF( 2**LGN.LT.N )
+     $         LGN = LGN + 1
+            IF( 2**LGN.LT.N )
+     $         LGN = LGN + 1
+            LWMIN = N*N
+            LRWMIN = 1 + 3*N + 2*N*LGN + 4*N**2
+            LIWMIN = 6 + 6*N + 5*N*LGN
+         ELSE IF( ICOMPZ.EQ.2 ) THEN
+            LWMIN = 1
+            LRWMIN = 1 + 4*N + 2*N**2
+            LIWMIN = 3 + 5*N
+         END IF
+         WORK( 1 ) = LWMIN
+         RWORK( 1 ) = LRWMIN
+         IWORK( 1 ) = LIWMIN
 *
-*                       0 < abs(A(j,j)) <= SMLNUM:
+         IF( LWORK.LT.LWMIN .AND. .NOT.LQUERY ) THEN
+            INFO = -8
+         ELSE IF( LRWORK.LT.LRWMIN .AND. .NOT.LQUERY ) THEN
+            INFO = -10
+         ELSE IF( LIWORK.LT.LIWMIN .AND. .NOT.LQUERY ) THEN
+            INFO = -12
+         END IF
+      END IF
 *
-                     IF( XJ.GT.TJJ*BIGNUM ) THEN
+      IF( INFO.NE.0 ) THEN
+         CALL XERBLA( 'ZSTEDC', -INFO )
+         RETURN
+      ELSE IF( LQUERY ) THEN
+         RETURN
+      END IF
 *
-*                          Scale x by (1/abs(x(j)))*abs(A(j,j))*BIGNUM.
+*     Quick return if possible
 *
-                        REC = ( TJJ*BIGNUM ) / XJ
-                        CALL ZDSCAL( N, REC, X, 1 )
-                        SCALE = SCALE*REC
-                        XMAX = XMAX*REC
-                     END IF
-                     X( J ) = ZLADIV( X( J ), TJJS )
-                  ELSE
+      IF( N.EQ.0 )
+     $   RETURN
+      IF( N.EQ.1 ) THEN
+         IF( ICOMPZ.NE.0 )
+     $      Z( 1, 1 ) = ONE
+         RETURN
+      END IF
 *
-*                       A(j,j) = 0:  Set x(1:n) = 0, x(j) = 1, and
-*                       scale = 0 and compute a solution to A**T *x = 0.
+*     If the following conditional clause is removed, then the routine
+*     will use the Divide and Conquer routine to compute only the
+*     eigenvalues, which requires (3N + 3N**2) real workspace and
+*     (2 + 5N + 2N lg(N)) integer workspace.
+*     Since on many architectures DSTERF is much faster than any other
+*     algorithm for finding eigenvalues only, it is used here
+*     as the default. If the conditional clause is removed, then
+*     information on the size of workspace needs to be changed.
 *
-                     DO 150 I = 1, N
-                        X( I ) = ZERO
-  150                CONTINUE
-                     X( J ) = ONE
-                     SCALE = ZERO
-                     XMAX = ZERO
-                  END IF
-  160             CONTINUE
-               ELSE
+*     If COMPZ = 'N', use DSTERF to compute the eigenvalues.
 *
-*                 Compute x(j) := x(j) / A(j,j) - CSUMJ if the dot
-*                 product has already been divided by 1/A(j,j).
+      IF( ICOMPZ.EQ.0 ) THEN
+         CALL DSTERF( N, D, E, INFO )
+         GO TO 70
+      END IF
 *
-                  X( J ) = ZLADIV( X( J ), TJJS ) - CSUMJ
-               END IF
-               XMAX = MAX( XMAX, CABS1( X( J ) ) )
-  170       CONTINUE
+*     If N is smaller than the minimum divide size (SMLSIZ+1), then
+*     solve the problem with another solver.
 *
-         ELSE
+      IF( N.LE.SMLSIZ ) THEN
 *
-*           Solve A**H * x = b
+         CALL ZSTEQR( COMPZ, N, D, E, Z, LDZ, RWORK, INFO )
 *
-            DO 220 J = JFIRST, JLAST, JINC
+      ELSE
 *
-*              Compute x(j) = b(j) - sum A(k,j)*x(k).
-*                                    k<>j
+*        If COMPZ = 'I', we simply call DSTEDC instead.
 *
-               XJ = CABS1( X( J ) )
-               USCAL = TSCAL
-               REC = ONE / MAX( XMAX, ONE )
-               IF( CNORM( J ).GT.( BIGNUM-XJ )*REC ) THEN
+         IF( ICOMPZ.EQ.2 ) THEN
+            CALL DLASET( 'Full', N, N, ZERO, ONE, RWORK, N )
+            LL = N*N + 1
+            CALL DSTEDC( 'I', N, D, E, RWORK, N,
+     $                   RWORK( LL ), LRWORK-LL+1, IWORK, LIWORK, INFO )
+            DO 20 J = 1, N
+               DO 10 I = 1, N
+                  Z( I, J ) = RWORK( ( J-1 )*N+I )
+   10          CONTINUE
+   20       CONTINUE
+            GO TO 70
+         END IF
 *
-*                 If x(j) could overflow, scale x by 1/(2*XMAX).
+*        From now on, only option left to be handled is COMPZ = 'V',
+*        i.e. ICOMPZ = 1.
 *
-                  REC = REC*HALF
-                  IF( NOUNIT ) THEN
-                     TJJS = DCONJG( A( J, J ) )*TSCAL
-                  ELSE
-                     TJJS = TSCAL
-                  END IF
-                  TJJ = CABS1( TJJS )
-                  IF( TJJ.GT.ONE ) THEN
+*        Scale.
 *
-*                       Divide by A(j,j) when scaling x if A(j,j) > 1.
+         ORGNRM = DLANST( 'M', N, D, E )
+         IF( ORGNRM.EQ.ZERO )
+     $      GO TO 70
 *
-                     REC = MIN( ONE, REC*TJJ )
-                     USCAL = ZLADIV( USCAL, TJJS )
-                  END IF
-                  IF( REC.LT.ONE ) THEN
-                     CALL ZDSCAL( N, REC, X, 1 )
-                     SCALE = SCALE*REC
-                     XMAX = XMAX*REC
-                  END IF
-               END IF
+         EPS = DLAMCH( 'Epsilon' )
 *
-               CSUMJ = ZERO
-               IF( USCAL.EQ.DCMPLX( ONE ) ) THEN
+         START = 1
 *
-*                 If the scaling needed for A in the dot product is 1,
-*                 call ZDOTC to perform the dot product.
+*        while ( START <= N )
 *
-                  IF( UPPER ) THEN
-                     CSUMJ = ZDOTC( J-1, A( 1, J ), 1, X, 1 )
-                  ELSE IF( J.LT.N ) THEN
-                     CSUMJ = ZDOTC( N-J, A( J+1, J ), 1, X( J+1 ), 1 )
-                  END IF
-               ELSE
+   30    CONTINUE
+         IF( START.LE.N ) THEN
 *
-*                 Otherwise, use in-line code for the dot product.
+*           Let FINISH be the position of the next subdiagonal entry
+*           such that E( FINISH ) <= TINY or FINISH = N if no such
+*           subdiagonal exists.  The matrix identified by the elements
+*           between START and FINISH constitutes an independent
+*           sub-problem.
 *
-                  IF( UPPER ) THEN
-                     DO 180 I = 1, J - 1
-                        CSUMJ = CSUMJ + ( DCONJG( A( I, J ) )*USCAL )*
-     $                          X( I )
-  180                CONTINUE
-                  ELSE IF( J.LT.N ) THEN
-                     DO 190 I = J + 1, N
-                        CSUMJ = CSUMJ + ( DCONJG( A( I, J ) )*USCAL )*
-     $                          X( I )
-  190                CONTINUE
-                  END IF
+            FINISH = START
+   40       CONTINUE
+            IF( FINISH.LT.N ) THEN
+               TINY = EPS*SQRT( ABS( D( FINISH ) ) )*
+     $                    SQRT( ABS( D( FINISH+1 ) ) )
+               IF( ABS( E( FINISH ) ).GT.TINY ) THEN
+                  FINISH = FINISH + 1
+                  GO TO 40
                END IF
+            END IF
 *
-               IF( USCAL.EQ.DCMPLX( TSCAL ) ) THEN
-*
-*                 Compute x(j) := ( x(j) - CSUMJ ) / A(j,j) if 1/A(j,j)
-*                 was not used to scale the dotproduct.
-*
-                  X( J ) = X( J ) - CSUMJ
-                  XJ = CABS1( X( J ) )
-                  IF( NOUNIT ) THEN
-                     TJJS = DCONJG( A( J, J ) )*TSCAL
-                  ELSE
-                     TJJS = TSCAL
-                     IF( TSCAL.EQ.ONE )
-     $                  GO TO 210
-                  END IF
-*
-*                    Compute x(j) = x(j) / A(j,j), scaling if necessary.
-*
-                  TJJ = CABS1( TJJS )
-                  IF( TJJ.GT.SMLNUM ) THEN
-*
-*                       abs(A(j,j)) > SMLNUM:
-*
-                     IF( TJJ.LT.ONE ) THEN
-                        IF( XJ.GT.TJJ*BIGNUM ) THEN
-*
-*                             Scale X by 1/abs(x(j)).
-*
-                           REC = ONE / XJ
-                           CALL ZDSCAL( N, REC, X, 1 )
-                           SCALE = SCALE*REC
-                           XMAX = XMAX*REC
-                        END IF
-                     END IF
-                     X( J ) = ZLADIV( X( J ), TJJS )
-                  ELSE IF( TJJ.GT.ZERO ) THEN
-*
-*                       0 < abs(A(j,j)) <= SMLNUM:
-*
-                     IF( XJ.GT.TJJ*BIGNUM ) THEN
+*           (Sub) Problem determined.  Compute its size and solve it.
 *
-*                          Scale x by (1/abs(x(j)))*abs(A(j,j))*BIGNUM.
+            M = FINISH - START + 1
+            IF( M.GT.SMLSIZ ) THEN
 *
-                        REC = ( TJJ*BIGNUM ) / XJ
-                        CALL ZDSCAL( N, REC, X, 1 )
-                        SCALE = SCALE*REC
-                        XMAX = XMAX*REC
-                     END IF
-                     X( J ) = ZLADIV( X( J ), TJJS )
-                  ELSE
+*              Scale.
 *
-*                       A(j,j) = 0:  Set x(1:n) = 0, x(j) = 1, and
-*                       scale = 0 and compute a solution to A**H *x = 0.
+               ORGNRM = DLANST( 'M', M, D( START ), E( START ) )
+               CALL DLASCL( 'G', 0, 0, ORGNRM, ONE, M, 1, D( START ), M,
+     $                      INFO )
+               CALL DLASCL( 'G', 0, 0, ORGNRM, ONE, M-1, 1, E( START ),
+     $                      M-1, INFO )
+*
+               CALL ZLAED0( N, M, D( START ), E( START ), Z( 1, START ),
+     $                      LDZ, WORK, N, RWORK, IWORK, INFO )
+               IF( INFO.GT.0 ) THEN
+                  INFO = ( INFO / ( M+1 )+START-1 )*( N+1 ) +
+     $                   MOD( INFO, ( M+1 ) ) + START - 1
+                  GO TO 70
+               END IF
 *
-                     DO 200 I = 1, N
-                        X( I ) = ZERO
-  200                CONTINUE
-                     X( J ) = ONE
-                     SCALE = ZERO
-                     XMAX = ZERO
-                  END IF
-  210             CONTINUE
-               ELSE
+*              Scale back.
 *
-*                 Compute x(j) := x(j) / A(j,j) - CSUMJ if the dot
-*                 product has already been divided by 1/A(j,j).
+               CALL DLASCL( 'G', 0, 0, ONE, ORGNRM, M, 1, D( START ), M,
+     $                      INFO )
 *
-                  X( J ) = ZLADIV( X( J ), TJJS ) - CSUMJ
+            ELSE
+               CALL DSTEQR( 'I', M, D( START ), E( START ), RWORK, M,
+     $                      RWORK( M*M+1 ), INFO )
+               CALL ZLACRM( N, M, Z( 1, START ), LDZ, RWORK, M, WORK, N,
+     $                      RWORK( M*M+1 ) )
+               CALL ZLACPY( 'A', N, M, WORK, N, Z( 1, START ), LDZ )
+               IF( INFO.GT.0 ) THEN
+                  INFO = START*( N+1 ) + FINISH
+                  GO TO 70
                END IF
-               XMAX = MAX( XMAX, CABS1( X( J ) ) )
-  220       CONTINUE
+            END IF
+*
+            START = FINISH + 1
+            GO TO 30
          END IF
-         SCALE = SCALE / TSCAL
-      END IF
 *
-*     Scale the column norms by 1/TSCAL for return.
+*        endwhile
 *
-      IF( TSCAL.NE.ONE ) THEN
-         CALL DSCAL( N, ONE / TSCAL, CNORM, 1 )
+*
+*        Use Selection Sort to minimize swaps of eigenvectors
+*
+         DO 60 II = 2, N
+           I = II - 1
+           K = I
+           P = D( I )
+           DO 50 J = II, N
+              IF( D( J ).LT.P ) THEN
+                 K = J
+                 P = D( J )
+              END IF
+   50      CONTINUE
+           IF( K.NE.I ) THEN
+              D( K ) = D( I )
+              D( I ) = P
+              CALL ZSWAP( N, Z( 1, I ), 1, Z( 1, K ), 1 )
+           END IF
+   60    CONTINUE
       END IF
 *
+   70 CONTINUE
+      WORK( 1 ) = LWMIN
+      RWORK( 1 ) = LRWMIN
+      IWORK( 1 ) = LIWMIN
+*
       RETURN
 *
-*     End of ZLATRS
+*     End of ZSTEDC
 *
       END
-*> \brief \b ZPOTF2 computes the Cholesky factorization of a symmetric/Hermitian positive definite matrix (unblocked algorithm).
+*> \brief \b ZSTEQR
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download ZPOTF2 + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/zpotf2.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/zpotf2.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/zpotf2.f"> 
+*> Download ZSTEQR + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/zsteqr.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/zsteqr.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/zsteqr.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
-*       SUBROUTINE ZPOTF2( UPLO, N, A, LDA, INFO )
-* 
+*       SUBROUTINE ZSTEQR( COMPZ, N, D, E, Z, LDZ, WORK, INFO )
+*
 *       .. Scalar Arguments ..
-*       CHARACTER          UPLO
-*       INTEGER            INFO, LDA, N
+*       CHARACTER          COMPZ
+*       INTEGER            INFO, LDZ, N
 *       ..
 *       .. Array Arguments ..
-*       COMPLEX*16         A( LDA, * )
+*       DOUBLE PRECISION   D( * ), E( * ), WORK( * )
+*       COMPLEX*16         Z( LDZ, * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
 *>
 *> \verbatim
 *>
-*> ZPOTF2 computes the Cholesky factorization of a complex Hermitian
-*> positive definite matrix A.
-*>
-*> The factorization has the form
-*>    A = U**H * U ,  if UPLO = 'U', or
-*>    A = L  * L**H,  if UPLO = 'L',
-*> where U is an upper triangular matrix and L is lower triangular.
-*>
-*> This is the unblocked version of the algorithm, calling Level 2 BLAS.
+*> ZSTEQR computes all eigenvalues and, optionally, eigenvectors of a
+*> symmetric tridiagonal matrix using the implicit QL or QR method.
+*> The eigenvectors of a full or band complex Hermitian matrix can also
+*> be found if ZHETRD or ZHPTRD or ZHBTRD has been used to reduce this
+*> matrix to tridiagonal form.
 *> \endverbatim
 *
 *  Arguments:
 *  ==========
 *
-*> \param[in] UPLO
+*> \param[in] COMPZ
 *> \verbatim
-*>          UPLO is CHARACTER*1
-*>          Specifies whether the upper or lower triangular part of the
-*>          Hermitian matrix A is stored.
-*>          = 'U':  Upper triangular
-*>          = 'L':  Lower triangular
+*>          COMPZ is CHARACTER*1
+*>          = 'N':  Compute eigenvalues only.
+*>          = 'V':  Compute eigenvalues and eigenvectors of the original
+*>                  Hermitian matrix.  On entry, Z must contain the
+*>                  unitary matrix used to reduce the original matrix
+*>                  to tridiagonal form.
+*>          = 'I':  Compute eigenvalues and eigenvectors of the
+*>                  tridiagonal matrix.  Z is initialized to the identity
+*>                  matrix.
 *> \endverbatim
 *>
 *> \param[in] N
 *> \verbatim
 *>          N is INTEGER
-*>          The order of the matrix A.  N >= 0.
+*>          The order of the matrix.  N >= 0.
 *> \endverbatim
 *>
-*> \param[in,out] A
+*> \param[in,out] D
 *> \verbatim
-*>          A is COMPLEX*16 array, dimension (LDA,N)
-*>          On entry, the Hermitian matrix A.  If UPLO = 'U', the leading
-*>          n by n upper triangular part of A contains the upper
-*>          triangular part of the matrix A, and the strictly lower
-*>          triangular part of A is not referenced.  If UPLO = 'L', the
-*>          leading n by n lower triangular part of A contains the lower
-*>          triangular part of the matrix A, and the strictly upper
-*>          triangular part of A is not referenced.
+*>          D is DOUBLE PRECISION array, dimension (N)
+*>          On entry, the diagonal elements of the tridiagonal matrix.
+*>          On exit, if INFO = 0, the eigenvalues in ascending order.
+*> \endverbatim
 *>
-*>          On exit, if INFO = 0, the factor U or L from the Cholesky
-*>          factorization A = U**H *U  or A = L*L**H.
+*> \param[in,out] E
+*> \verbatim
+*>          E is DOUBLE PRECISION array, dimension (N-1)
+*>          On entry, the (n-1) subdiagonal elements of the tridiagonal
+*>          matrix.
+*>          On exit, E has been destroyed.
 *> \endverbatim
 *>
-*> \param[in] LDA
+*> \param[in,out] Z
 *> \verbatim
-*>          LDA is INTEGER
-*>          The leading dimension of the array A.  LDA >= max(1,N).
+*>          Z is COMPLEX*16 array, dimension (LDZ, N)
+*>          On entry, if  COMPZ = 'V', then Z contains the unitary
+*>          matrix used in the reduction to tridiagonal form.
+*>          On exit, if INFO = 0, then if COMPZ = 'V', Z contains the
+*>          orthonormal eigenvectors of the original Hermitian matrix,
+*>          and if COMPZ = 'I', Z contains the orthonormal eigenvectors
+*>          of the symmetric tridiagonal matrix.
+*>          If COMPZ = 'N', then Z is not referenced.
+*> \endverbatim
+*>
+*> \param[in] LDZ
+*> \verbatim
+*>          LDZ is INTEGER
+*>          The leading dimension of the array Z.  LDZ >= 1, and if
+*>          eigenvectors are desired, then  LDZ >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*>          WORK is DOUBLE PRECISION array, dimension (max(1,2*N-2))
+*>          If COMPZ = 'N', then WORK is not referenced.
 *> \endverbatim
 *>
 *> \param[out] INFO
 *> \verbatim
 *>          INFO is INTEGER
-*>          = 0: successful exit
-*>          < 0: if INFO = -k, the k-th argument had an illegal value
-*>          > 0: if INFO = k, the leading minor of order k is not
-*>               positive definite, and the factorization could not be
-*>               completed.
+*>          = 0:  successful exit
+*>          < 0:  if INFO = -i, the i-th argument had an illegal value
+*>          > 0:  the algorithm has failed to find all the eigenvalues in
+*>                a total of 30*N iterations; if INFO = i, then i
+*>                elements of E have not converged to zero; on exit, D
+*>                and E contain the elements of a symmetric tridiagonal
+*>                matrix which is unitarily similar to the original
+*>                matrix.
 *> \endverbatim
 *
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date September 2012
+*> \date December 2016
 *
-*> \ingroup complex16POcomputational
+*> \ingroup complex16OTHERcomputational
 *
 *  =====================================================================
-      SUBROUTINE ZPOTF2( UPLO, N, A, LDA, INFO )
+      SUBROUTINE ZSTEQR( COMPZ, N, D, E, Z, LDZ, WORK, INFO )
 *
-*  -- LAPACK computational routine (version 3.4.2) --
+*  -- LAPACK computational routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     September 2012
+*     December 2016
 *
 *     .. Scalar Arguments ..
-      CHARACTER          UPLO
-      INTEGER            INFO, LDA, N
+      CHARACTER          COMPZ
+      INTEGER            INFO, LDZ, N
 *     ..
 *     .. Array Arguments ..
-      COMPLEX*16         A( LDA, * )
+      DOUBLE PRECISION   D( * ), E( * ), WORK( * )
+      COMPLEX*16         Z( LDZ, * )
 *     ..
 *
 *  =====================================================================
 *
 *     .. Parameters ..
-      DOUBLE PRECISION   ONE, ZERO
-      PARAMETER          ( ONE = 1.0D+0, ZERO = 0.0D+0 )
-      COMPLEX*16         CONE
-      PARAMETER          ( CONE = ( 1.0D+0, 0.0D+0 ) )
+      DOUBLE PRECISION   ZERO, ONE, TWO, THREE
+      PARAMETER          ( ZERO = 0.0D0, ONE = 1.0D0, TWO = 2.0D0,
+     $                   THREE = 3.0D0 )
+      COMPLEX*16         CZERO, CONE
+      PARAMETER          ( CZERO = ( 0.0D0, 0.0D0 ),
+     $                   CONE = ( 1.0D0, 0.0D0 ) )
+      INTEGER            MAXIT
+      PARAMETER          ( MAXIT = 30 )
 *     ..
 *     .. Local Scalars ..
-      LOGICAL            UPPER
-      INTEGER            J
-      DOUBLE PRECISION   AJJ
+      INTEGER            I, ICOMPZ, II, ISCALE, J, JTOT, K, L, L1, LEND,
+     $                   LENDM1, LENDP1, LENDSV, LM1, LSV, M, MM, MM1,
+     $                   NM1, NMAXIT
+      DOUBLE PRECISION   ANORM, B, C, EPS, EPS2, F, G, P, R, RT1, RT2,
+     $                   S, SAFMAX, SAFMIN, SSFMAX, SSFMIN, TST
 *     ..
 *     .. External Functions ..
-      LOGICAL            LSAME, DISNAN
-      COMPLEX*16         ZDOTC
-      EXTERNAL           LSAME, ZDOTC, DISNAN
+      LOGICAL            LSAME
+      DOUBLE PRECISION   DLAMCH, DLANST, DLAPY2
+      EXTERNAL           LSAME, DLAMCH, DLANST, DLAPY2
 *     ..
 *     .. External Subroutines ..
-      EXTERNAL           XERBLA, ZDSCAL, ZGEMV, ZLACGV
+      EXTERNAL           DLAE2, DLAEV2, DLARTG, DLASCL, DLASRT, XERBLA,
+     $                   ZLASET, ZLASR, ZSWAP
 *     ..
 *     .. Intrinsic Functions ..
-      INTRINSIC          DBLE, MAX, SQRT
+      INTRINSIC          ABS, MAX, SIGN, SQRT
 *     ..
 *     .. Executable Statements ..
 *
 *     Test the input parameters.
 *
       INFO = 0
-      UPPER = LSAME( UPLO, 'U' )
-      IF( .NOT.UPPER .AND. .NOT.LSAME( UPLO, 'L' ) ) THEN
+*
+      IF( LSAME( COMPZ, 'N' ) ) THEN
+         ICOMPZ = 0
+      ELSE IF( LSAME( COMPZ, 'V' ) ) THEN
+         ICOMPZ = 1
+      ELSE IF( LSAME( COMPZ, 'I' ) ) THEN
+         ICOMPZ = 2
+      ELSE
+         ICOMPZ = -1
+      END IF
+      IF( ICOMPZ.LT.0 ) THEN
          INFO = -1
       ELSE IF( N.LT.0 ) THEN
          INFO = -2
-      ELSE IF( LDA.LT.MAX( 1, N ) ) THEN
-         INFO = -4
+      ELSE IF( ( LDZ.LT.1 ) .OR. ( ICOMPZ.GT.0 .AND. LDZ.LT.MAX( 1,
+     $         N ) ) ) THEN
+         INFO = -6
       END IF
       IF( INFO.NE.0 ) THEN
-         CALL XERBLA( 'ZPOTF2', -INFO )
+         CALL XERBLA( 'ZSTEQR', -INFO )
          RETURN
       END IF
 *
@@ -24458,117 +41340,413 @@
       IF( N.EQ.0 )
      $   RETURN
 *
-      IF( UPPER ) THEN
+      IF( N.EQ.1 ) THEN
+         IF( ICOMPZ.EQ.2 )
+     $      Z( 1, 1 ) = CONE
+         RETURN
+      END IF
 *
-*        Compute the Cholesky factorization A = U**H *U.
+*     Determine the unit roundoff and over/underflow thresholds.
 *
-         DO 10 J = 1, N
+      EPS = DLAMCH( 'E' )
+      EPS2 = EPS**2
+      SAFMIN = DLAMCH( 'S' )
+      SAFMAX = ONE / SAFMIN
+      SSFMAX = SQRT( SAFMAX ) / THREE
+      SSFMIN = SQRT( SAFMIN ) / EPS2
 *
-*           Compute U(J,J) and test for non-positive-definiteness.
+*     Compute the eigenvalues and eigenvectors of the tridiagonal
+*     matrix.
 *
-            AJJ = DBLE( A( J, J ) ) - ZDOTC( J-1, A( 1, J ), 1,
-     $            A( 1, J ), 1 )
-            IF( AJJ.LE.ZERO.OR.DISNAN( AJJ ) ) THEN
-               A( J, J ) = AJJ
+      IF( ICOMPZ.EQ.2 )
+     $   CALL ZLASET( 'Full', N, N, CZERO, CONE, Z, LDZ )
+*
+      NMAXIT = N*MAXIT
+      JTOT = 0
+*
+*     Determine where the matrix splits and choose QL or QR iteration
+*     for each block, according to whether top or bottom diagonal
+*     element is smaller.
+*
+      L1 = 1
+      NM1 = N - 1
+*
+   10 CONTINUE
+      IF( L1.GT.N )
+     $   GO TO 160
+      IF( L1.GT.1 )
+     $   E( L1-1 ) = ZERO
+      IF( L1.LE.NM1 ) THEN
+         DO 20 M = L1, NM1
+            TST = ABS( E( M ) )
+            IF( TST.EQ.ZERO )
+     $         GO TO 30
+            IF( TST.LE.( SQRT( ABS( D( M ) ) )*SQRT( ABS( D( M+
+     $          1 ) ) ) )*EPS ) THEN
+               E( M ) = ZERO
                GO TO 30
             END IF
-            AJJ = SQRT( AJJ )
-            A( J, J ) = AJJ
+   20    CONTINUE
+      END IF
+      M = N
 *
-*           Compute elements J+1:N of row J.
+   30 CONTINUE
+      L = L1
+      LSV = L
+      LEND = M
+      LENDSV = LEND
+      L1 = M + 1
+      IF( LEND.EQ.L )
+     $   GO TO 10
+*
+*     Scale submatrix in rows and columns L to LEND
+*
+      ANORM = DLANST( 'I', LEND-L+1, D( L ), E( L ) )
+      ISCALE = 0
+      IF( ANORM.EQ.ZERO )
+     $   GO TO 10
+      IF( ANORM.GT.SSFMAX ) THEN
+         ISCALE = 1
+         CALL DLASCL( 'G', 0, 0, ANORM, SSFMAX, LEND-L+1, 1, D( L ), N,
+     $                INFO )
+         CALL DLASCL( 'G', 0, 0, ANORM, SSFMAX, LEND-L, 1, E( L ), N,
+     $                INFO )
+      ELSE IF( ANORM.LT.SSFMIN ) THEN
+         ISCALE = 2
+         CALL DLASCL( 'G', 0, 0, ANORM, SSFMIN, LEND-L+1, 1, D( L ), N,
+     $                INFO )
+         CALL DLASCL( 'G', 0, 0, ANORM, SSFMIN, LEND-L, 1, E( L ), N,
+     $                INFO )
+      END IF
+*
+*     Choose between QL and QR iteration
+*
+      IF( ABS( D( LEND ) ).LT.ABS( D( L ) ) ) THEN
+         LEND = LSV
+         L = LENDSV
+      END IF
+*
+      IF( LEND.GT.L ) THEN
+*
+*        QL Iteration
+*
+*        Look for small subdiagonal element.
+*
+   40    CONTINUE
+         IF( L.NE.LEND ) THEN
+            LENDM1 = LEND - 1
+            DO 50 M = L, LENDM1
+               TST = ABS( E( M ) )**2
+               IF( TST.LE.( EPS2*ABS( D( M ) ) )*ABS( D( M+1 ) )+
+     $             SAFMIN )GO TO 60
+   50       CONTINUE
+         END IF
+*
+         M = LEND
+*
+   60    CONTINUE
+         IF( M.LT.LEND )
+     $      E( M ) = ZERO
+         P = D( L )
+         IF( M.EQ.L )
+     $      GO TO 80
+*
+*        If remaining matrix is 2-by-2, use DLAE2 or SLAEV2
+*        to compute its eigensystem.
+*
+         IF( M.EQ.L+1 ) THEN
+            IF( ICOMPZ.GT.0 ) THEN
+               CALL DLAEV2( D( L ), E( L ), D( L+1 ), RT1, RT2, C, S )
+               WORK( L ) = C
+               WORK( N-1+L ) = S
+               CALL ZLASR( 'R', 'V', 'B', N, 2, WORK( L ),
+     $                     WORK( N-1+L ), Z( 1, L ), LDZ )
+            ELSE
+               CALL DLAE2( D( L ), E( L ), D( L+1 ), RT1, RT2 )
+            END IF
+            D( L ) = RT1
+            D( L+1 ) = RT2
+            E( L ) = ZERO
+            L = L + 2
+            IF( L.LE.LEND )
+     $         GO TO 40
+            GO TO 140
+         END IF
+*
+         IF( JTOT.EQ.NMAXIT )
+     $      GO TO 140
+         JTOT = JTOT + 1
+*
+*        Form shift.
+*
+         G = ( D( L+1 )-P ) / ( TWO*E( L ) )
+         R = DLAPY2( G, ONE )
+         G = D( M ) - P + ( E( L ) / ( G+SIGN( R, G ) ) )
+*
+         S = ONE
+         C = ONE
+         P = ZERO
+*
+*        Inner loop
+*
+         MM1 = M - 1
+         DO 70 I = MM1, L, -1
+            F = S*E( I )
+            B = C*E( I )
+            CALL DLARTG( G, F, C, S, R )
+            IF( I.NE.M-1 )
+     $         E( I+1 ) = R
+            G = D( I+1 ) - P
+            R = ( D( I )-G )*S + TWO*C*B
+            P = S*R
+            D( I+1 ) = G + P
+            G = C*R - B
+*
+*           If eigenvectors are desired, then save rotations.
+*
+            IF( ICOMPZ.GT.0 ) THEN
+               WORK( I ) = C
+               WORK( N-1+I ) = -S
+            END IF
+*
+   70    CONTINUE
+*
+*        If eigenvectors are desired, then apply saved rotations.
+*
+         IF( ICOMPZ.GT.0 ) THEN
+            MM = M - L + 1
+            CALL ZLASR( 'R', 'V', 'B', N, MM, WORK( L ), WORK( N-1+L ),
+     $                  Z( 1, L ), LDZ )
+         END IF
+*
+         D( L ) = D( L ) - P
+         E( L ) = G
+         GO TO 40
+*
+*        Eigenvalue found.
+*
+   80    CONTINUE
+         D( L ) = P
+*
+         L = L + 1
+         IF( L.LE.LEND )
+     $      GO TO 40
+         GO TO 140
+*
+      ELSE
+*
+*        QR Iteration
+*
+*        Look for small superdiagonal element.
+*
+   90    CONTINUE
+         IF( L.NE.LEND ) THEN
+            LENDP1 = LEND + 1
+            DO 100 M = L, LENDP1, -1
+               TST = ABS( E( M-1 ) )**2
+               IF( TST.LE.( EPS2*ABS( D( M ) ) )*ABS( D( M-1 ) )+
+     $             SAFMIN )GO TO 110
+  100       CONTINUE
+         END IF
+*
+         M = LEND
+*
+  110    CONTINUE
+         IF( M.GT.LEND )
+     $      E( M-1 ) = ZERO
+         P = D( L )
+         IF( M.EQ.L )
+     $      GO TO 130
+*
+*        If remaining matrix is 2-by-2, use DLAE2 or SLAEV2
+*        to compute its eigensystem.
+*
+         IF( M.EQ.L-1 ) THEN
+            IF( ICOMPZ.GT.0 ) THEN
+               CALL DLAEV2( D( L-1 ), E( L-1 ), D( L ), RT1, RT2, C, S )
+               WORK( M ) = C
+               WORK( N-1+M ) = S
+               CALL ZLASR( 'R', 'V', 'F', N, 2, WORK( M ),
+     $                     WORK( N-1+M ), Z( 1, L-1 ), LDZ )
+            ELSE
+               CALL DLAE2( D( L-1 ), E( L-1 ), D( L ), RT1, RT2 )
+            END IF
+            D( L-1 ) = RT1
+            D( L ) = RT2
+            E( L-1 ) = ZERO
+            L = L - 2
+            IF( L.GE.LEND )
+     $         GO TO 90
+            GO TO 140
+         END IF
+*
+         IF( JTOT.EQ.NMAXIT )
+     $      GO TO 140
+         JTOT = JTOT + 1
+*
+*        Form shift.
+*
+         G = ( D( L-1 )-P ) / ( TWO*E( L-1 ) )
+         R = DLAPY2( G, ONE )
+         G = D( M ) - P + ( E( L-1 ) / ( G+SIGN( R, G ) ) )
+*
+         S = ONE
+         C = ONE
+         P = ZERO
+*
+*        Inner loop
+*
+         LM1 = L - 1
+         DO 120 I = M, LM1
+            F = S*E( I )
+            B = C*E( I )
+            CALL DLARTG( G, F, C, S, R )
+            IF( I.NE.M )
+     $         E( I-1 ) = R
+            G = D( I ) - P
+            R = ( D( I+1 )-G )*S + TWO*C*B
+            P = S*R
+            D( I ) = G + P
+            G = C*R - B
+*
+*           If eigenvectors are desired, then save rotations.
+*
+            IF( ICOMPZ.GT.0 ) THEN
+               WORK( I ) = C
+               WORK( N-1+I ) = S
+            END IF
+*
+  120    CONTINUE
+*
+*        If eigenvectors are desired, then apply saved rotations.
+*
+         IF( ICOMPZ.GT.0 ) THEN
+            MM = L - M + 1
+            CALL ZLASR( 'R', 'V', 'F', N, MM, WORK( M ), WORK( N-1+M ),
+     $                  Z( 1, M ), LDZ )
+         END IF
+*
+         D( L ) = D( L ) - P
+         E( LM1 ) = G
+         GO TO 90
+*
+*        Eigenvalue found.
+*
+  130    CONTINUE
+         D( L ) = P
+*
+         L = L - 1
+         IF( L.GE.LEND )
+     $      GO TO 90
+         GO TO 140
+*
+      END IF
+*
+*     Undo scaling if necessary
+*
+  140 CONTINUE
+      IF( ISCALE.EQ.1 ) THEN
+         CALL DLASCL( 'G', 0, 0, SSFMAX, ANORM, LENDSV-LSV+1, 1,
+     $                D( LSV ), N, INFO )
+         CALL DLASCL( 'G', 0, 0, SSFMAX, ANORM, LENDSV-LSV, 1, E( LSV ),
+     $                N, INFO )
+      ELSE IF( ISCALE.EQ.2 ) THEN
+         CALL DLASCL( 'G', 0, 0, SSFMIN, ANORM, LENDSV-LSV+1, 1,
+     $                D( LSV ), N, INFO )
+         CALL DLASCL( 'G', 0, 0, SSFMIN, ANORM, LENDSV-LSV, 1, E( LSV ),
+     $                N, INFO )
+      END IF
+*
+*     Check for no convergence to an eigenvalue after a total
+*     of N*MAXIT iterations.
+*
+      IF( JTOT.EQ.NMAXIT ) THEN
+         DO 150 I = 1, N - 1
+            IF( E( I ).NE.ZERO )
+     $         INFO = INFO + 1
+  150    CONTINUE
+         RETURN
+      END IF
+      GO TO 10
 *
-            IF( J.LT.N ) THEN
-               CALL ZLACGV( J-1, A( 1, J ), 1 )
-               CALL ZGEMV( 'Transpose', J-1, N-J, -CONE, A( 1, J+1 ),
-     $                     LDA, A( 1, J ), 1, CONE, A( J, J+1 ), LDA )
-               CALL ZLACGV( J-1, A( 1, J ), 1 )
-               CALL ZDSCAL( N-J, ONE / AJJ, A( J, J+1 ), LDA )
-            END IF
-   10    CONTINUE
-      ELSE
+*     Order eigenvalues and eigenvectors.
 *
-*        Compute the Cholesky factorization A = L*L**H.
+  160 CONTINUE
+      IF( ICOMPZ.EQ.0 ) THEN
 *
-         DO 20 J = 1, N
+*        Use Quick Sort
 *
-*           Compute L(J,J) and test for non-positive-definiteness.
+         CALL DLASRT( 'I', N, D, INFO )
 *
-            AJJ = DBLE( A( J, J ) ) - ZDOTC( J-1, A( J, 1 ), LDA,
-     $            A( J, 1 ), LDA )
-            IF( AJJ.LE.ZERO.OR.DISNAN( AJJ ) ) THEN
-               A( J, J ) = AJJ
-               GO TO 30
-            END IF
-            AJJ = SQRT( AJJ )
-            A( J, J ) = AJJ
+      ELSE
 *
-*           Compute elements J+1:N of column J.
+*        Use Selection Sort to minimize swaps of eigenvectors
 *
-            IF( J.LT.N ) THEN
-               CALL ZLACGV( J-1, A( J, 1 ), LDA )
-               CALL ZGEMV( 'No transpose', N-J, J-1, -CONE, A( J+1, 1 ),
-     $                     LDA, A( J, 1 ), LDA, CONE, A( J+1, J ), 1 )
-               CALL ZLACGV( J-1, A( J, 1 ), LDA )
-               CALL ZDSCAL( N-J, ONE / AJJ, A( J+1, J ), 1 )
+         DO 180 II = 2, N
+            I = II - 1
+            K = I
+            P = D( I )
+            DO 170 J = II, N
+               IF( D( J ).LT.P ) THEN
+                  K = J
+                  P = D( J )
+               END IF
+  170       CONTINUE
+            IF( K.NE.I ) THEN
+               D( K ) = D( I )
+               D( I ) = P
+               CALL ZSWAP( N, Z( 1, I ), 1, Z( 1, K ), 1 )
             END IF
-   20    CONTINUE
+  180    CONTINUE
       END IF
-      GO TO 40
-*
-   30 CONTINUE
-      INFO = J
-*
-   40 CONTINUE
       RETURN
 *
-*     End of ZPOTF2
+*     End of ZSTEQR
 *
       END
-*> \brief \b ZPOTRF
+*> \brief \b ZSYMV computes a matrix-vector product for a complex symmetric matrix.
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download ZPOTRF + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/zpotrf.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/zpotrf.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/zpotrf.f"> 
+*> Download ZSYMV + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/zsymv.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/zsymv.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/zsymv.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
-*       SUBROUTINE ZPOTRF( UPLO, N, A, LDA, INFO )
-* 
+*       SUBROUTINE ZSYMV( UPLO, N, ALPHA, A, LDA, X, INCX, BETA, Y, INCY )
+*
 *       .. Scalar Arguments ..
 *       CHARACTER          UPLO
-*       INTEGER            INFO, LDA, N
+*       INTEGER            INCX, INCY, LDA, N
+*       COMPLEX*16         ALPHA, BETA
 *       ..
 *       .. Array Arguments ..
-*       COMPLEX*16         A( LDA, * )
+*       COMPLEX*16         A( LDA, * ), X( * ), Y( * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
 *>
 *> \verbatim
 *>
-*> ZPOTRF computes the Cholesky factorization of a complex Hermitian
-*> positive definite matrix A.
+*> ZSYMV  performs the matrix-vector  operation
 *>
-*> The factorization has the form
-*>    A = U**H * U,  if UPLO = 'U', or
-*>    A = L  * L**H,  if UPLO = 'L',
-*> where U is an upper triangular matrix and L is lower triangular.
+*>    y := alpha*A*x + beta*y,
 *>
-*> This is the block version of the algorithm, calling Level 3 BLAS.
+*> where alpha and beta are scalars, x and y are n element vectors and
+*> A is an n by n symmetric matrix.
 *> \endverbatim
 *
 *  Arguments:
@@ -24577,1404 +41755,1293 @@
 *> \param[in] UPLO
 *> \verbatim
 *>          UPLO is CHARACTER*1
-*>          = 'U':  Upper triangle of A is stored;
-*>          = 'L':  Lower triangle of A is stored.
+*>           On entry, UPLO specifies whether the upper or lower
+*>           triangular part of the array A is to be referenced as
+*>           follows:
+*>
+*>              UPLO = 'U' or 'u'   Only the upper triangular part of A
+*>                                  is to be referenced.
+*>
+*>              UPLO = 'L' or 'l'   Only the lower triangular part of A
+*>                                  is to be referenced.
+*>
+*>           Unchanged on exit.
 *> \endverbatim
 *>
 *> \param[in] N
 *> \verbatim
 *>          N is INTEGER
-*>          The order of the matrix A.  N >= 0.
+*>           On entry, N specifies the order of the matrix A.
+*>           N must be at least zero.
+*>           Unchanged on exit.
 *> \endverbatim
 *>
-*> \param[in,out] A
+*> \param[in] ALPHA
 *> \verbatim
-*>          A is COMPLEX*16 array, dimension (LDA,N)
-*>          On entry, the Hermitian matrix A.  If UPLO = 'U', the leading
-*>          N-by-N upper triangular part of A contains the upper
-*>          triangular part of the matrix A, and the strictly lower
-*>          triangular part of A is not referenced.  If UPLO = 'L', the
-*>          leading N-by-N lower triangular part of A contains the lower
-*>          triangular part of the matrix A, and the strictly upper
-*>          triangular part of A is not referenced.
+*>          ALPHA is COMPLEX*16
+*>           On entry, ALPHA specifies the scalar alpha.
+*>           Unchanged on exit.
+*> \endverbatim
 *>
-*>          On exit, if INFO = 0, the factor U or L from the Cholesky
-*>          factorization A = U**H *U or A = L*L**H.
+*> \param[in] A
+*> \verbatim
+*>          A is COMPLEX*16 array, dimension ( LDA, N )
+*>           Before entry, with  UPLO = 'U' or 'u', the leading n by n
+*>           upper triangular part of the array A must contain the upper
+*>           triangular part of the symmetric matrix and the strictly
+*>           lower triangular part of A is not referenced.
+*>           Before entry, with UPLO = 'L' or 'l', the leading n by n
+*>           lower triangular part of the array A must contain the lower
+*>           triangular part of the symmetric matrix and the strictly
+*>           upper triangular part of A is not referenced.
+*>           Unchanged on exit.
 *> \endverbatim
 *>
 *> \param[in] LDA
 *> \verbatim
 *>          LDA is INTEGER
-*>          The leading dimension of the array A.  LDA >= max(1,N).
+*>           On entry, LDA specifies the first dimension of A as declared
+*>           in the calling (sub) program. LDA must be at least
+*>           max( 1, N ).
+*>           Unchanged on exit.
 *> \endverbatim
 *>
-*> \param[out] INFO
+*> \param[in] X
 *> \verbatim
-*>          INFO is INTEGER
-*>          = 0:  successful exit
-*>          < 0:  if INFO = -i, the i-th argument had an illegal value
-*>          > 0:  if INFO = i, the leading minor of order i is not
-*>                positive definite, and the factorization could not be
-*>                completed.
+*>          X is COMPLEX*16 array, dimension at least
+*>           ( 1 + ( N - 1 )*abs( INCX ) ).
+*>           Before entry, the incremented array X must contain the N-
+*>           element vector x.
+*>           Unchanged on exit.
+*> \endverbatim
+*>
+*> \param[in] INCX
+*> \verbatim
+*>          INCX is INTEGER
+*>           On entry, INCX specifies the increment for the elements of
+*>           X. INCX must not be zero.
+*>           Unchanged on exit.
+*> \endverbatim
+*>
+*> \param[in] BETA
+*> \verbatim
+*>          BETA is COMPLEX*16
+*>           On entry, BETA specifies the scalar beta. When BETA is
+*>           supplied as zero then Y need not be set on input.
+*>           Unchanged on exit.
+*> \endverbatim
+*>
+*> \param[in,out] Y
+*> \verbatim
+*>          Y is COMPLEX*16 array, dimension at least
+*>           ( 1 + ( N - 1 )*abs( INCY ) ).
+*>           Before entry, the incremented array Y must contain the n
+*>           element vector y. On exit, Y is overwritten by the updated
+*>           vector y.
+*> \endverbatim
+*>
+*> \param[in] INCY
+*> \verbatim
+*>          INCY is INTEGER
+*>           On entry, INCY specifies the increment for the elements of
+*>           Y. INCY must not be zero.
+*>           Unchanged on exit.
 *> \endverbatim
 *
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date November 2011
+*> \date December 2016
 *
-*> \ingroup complex16POcomputational
+*> \ingroup complex16SYauxiliary
 *
 *  =====================================================================
-      SUBROUTINE ZPOTRF( UPLO, N, A, LDA, INFO )
+      SUBROUTINE ZSYMV( UPLO, N, ALPHA, A, LDA, X, INCX, BETA, Y, INCY )
 *
-*  -- LAPACK computational routine (version 3.4.0) --
+*  -- LAPACK auxiliary routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     November 2011
+*     December 2016
 *
 *     .. Scalar Arguments ..
       CHARACTER          UPLO
-      INTEGER            INFO, LDA, N
+      INTEGER            INCX, INCY, LDA, N
+      COMPLEX*16         ALPHA, BETA
 *     ..
 *     .. Array Arguments ..
-      COMPLEX*16         A( LDA, * )
+      COMPLEX*16         A( LDA, * ), X( * ), Y( * )
 *     ..
 *
-*  =====================================================================
+* =====================================================================
 *
 *     .. Parameters ..
-      DOUBLE PRECISION   ONE
-      COMPLEX*16         CONE
-      PARAMETER          ( ONE = 1.0D+0, CONE = ( 1.0D+0, 0.0D+0 ) )
+      COMPLEX*16         ONE
+      PARAMETER          ( ONE = ( 1.0D+0, 0.0D+0 ) )
+      COMPLEX*16         ZERO
+      PARAMETER          ( ZERO = ( 0.0D+0, 0.0D+0 ) )
 *     ..
 *     .. Local Scalars ..
-      LOGICAL            UPPER
-      INTEGER            J, JB, NB
+      INTEGER            I, INFO, IX, IY, J, JX, JY, KX, KY
+      COMPLEX*16         TEMP1, TEMP2
 *     ..
 *     .. External Functions ..
       LOGICAL            LSAME
-      INTEGER            ILAENV
-      EXTERNAL           LSAME, ILAENV
+      EXTERNAL           LSAME
 *     ..
 *     .. External Subroutines ..
-      EXTERNAL           XERBLA, ZGEMM, ZHERK, ZPOTF2, ZTRSM
+      EXTERNAL           XERBLA
 *     ..
 *     .. Intrinsic Functions ..
-      INTRINSIC          MAX, MIN
+      INTRINSIC          MAX
 *     ..
 *     .. Executable Statements ..
 *
 *     Test the input parameters.
 *
       INFO = 0
-      UPPER = LSAME( UPLO, 'U' )
-      IF( .NOT.UPPER .AND. .NOT.LSAME( UPLO, 'L' ) ) THEN
-         INFO = -1
+      IF( .NOT.LSAME( UPLO, 'U' ) .AND. .NOT.LSAME( UPLO, 'L' ) ) THEN
+         INFO = 1
       ELSE IF( N.LT.0 ) THEN
-         INFO = -2
+         INFO = 2
       ELSE IF( LDA.LT.MAX( 1, N ) ) THEN
-         INFO = -4
+         INFO = 5
+      ELSE IF( INCX.EQ.0 ) THEN
+         INFO = 7
+      ELSE IF( INCY.EQ.0 ) THEN
+         INFO = 10
       END IF
       IF( INFO.NE.0 ) THEN
-         CALL XERBLA( 'ZPOTRF', -INFO )
+         CALL XERBLA( 'ZSYMV ', INFO )
          RETURN
       END IF
 *
-*     Quick return if possible
+*     Quick return if possible.
 *
-      IF( N.EQ.0 )
+      IF( ( N.EQ.0 ) .OR. ( ( ALPHA.EQ.ZERO ) .AND. ( BETA.EQ.ONE ) ) )
      $   RETURN
 *
-*     Determine the block size for this environment.
-*
-      NB = ILAENV( 1, 'ZPOTRF', UPLO, N, -1, -1, -1 )
-      IF( NB.LE.1 .OR. NB.GE.N ) THEN
+*     Set up the start points in  X  and  Y.
 *
-*        Use unblocked code.
-*
-         CALL ZPOTF2( UPLO, N, A, LDA, INFO )
+      IF( INCX.GT.0 ) THEN
+         KX = 1
       ELSE
+         KX = 1 - ( N-1 )*INCX
+      END IF
+      IF( INCY.GT.0 ) THEN
+         KY = 1
+      ELSE
+         KY = 1 - ( N-1 )*INCY
+      END IF
 *
-*        Use blocked code.
-*
-         IF( UPPER ) THEN
-*
-*           Compute the Cholesky factorization A = U**H *U.
-*
-            DO 10 J = 1, N, NB
-*
-*              Update and factorize the current diagonal block and test
-*              for non-positive-definiteness.
-*
-               JB = MIN( NB, N-J+1 )
-               CALL ZHERK( 'Upper', 'Conjugate transpose', JB, J-1,
-     $                     -ONE, A( 1, J ), LDA, ONE, A( J, J ), LDA )
-               CALL ZPOTF2( 'Upper', JB, A( J, J ), LDA, INFO )
-               IF( INFO.NE.0 )
-     $            GO TO 30
-               IF( J+JB.LE.N ) THEN
-*
-*                 Compute the current block row.
+*     Start the operations. In this version the elements of A are
+*     accessed sequentially with one pass through the triangular part
+*     of A.
 *
-                  CALL ZGEMM( 'Conjugate transpose', 'No transpose', JB,
-     $                        N-J-JB+1, J-1, -CONE, A( 1, J ), LDA,
-     $                        A( 1, J+JB ), LDA, CONE, A( J, J+JB ),
-     $                        LDA )
-                  CALL ZTRSM( 'Left', 'Upper', 'Conjugate transpose',
-     $                        'Non-unit', JB, N-J-JB+1, CONE, A( J, J ),
-     $                        LDA, A( J, J+JB ), LDA )
-               END IF
-   10       CONTINUE
+*     First form  y := beta*y.
 *
+      IF( BETA.NE.ONE ) THEN
+         IF( INCY.EQ.1 ) THEN
+            IF( BETA.EQ.ZERO ) THEN
+               DO 10 I = 1, N
+                  Y( I ) = ZERO
+   10          CONTINUE
+            ELSE
+               DO 20 I = 1, N
+                  Y( I ) = BETA*Y( I )
+   20          CONTINUE
+            END IF
          ELSE
+            IY = KY
+            IF( BETA.EQ.ZERO ) THEN
+               DO 30 I = 1, N
+                  Y( IY ) = ZERO
+                  IY = IY + INCY
+   30          CONTINUE
+            ELSE
+               DO 40 I = 1, N
+                  Y( IY ) = BETA*Y( IY )
+                  IY = IY + INCY
+   40          CONTINUE
+            END IF
+         END IF
+      END IF
+      IF( ALPHA.EQ.ZERO )
+     $   RETURN
+      IF( LSAME( UPLO, 'U' ) ) THEN
 *
-*           Compute the Cholesky factorization A = L*L**H.
-*
-            DO 20 J = 1, N, NB
-*
-*              Update and factorize the current diagonal block and test
-*              for non-positive-definiteness.
+*        Form  y  when A is stored in upper triangle.
 *
-               JB = MIN( NB, N-J+1 )
-               CALL ZHERK( 'Lower', 'No transpose', JB, J-1, -ONE,
-     $                     A( J, 1 ), LDA, ONE, A( J, J ), LDA )
-               CALL ZPOTF2( 'Lower', JB, A( J, J ), LDA, INFO )
-               IF( INFO.NE.0 )
-     $            GO TO 30
-               IF( J+JB.LE.N ) THEN
+         IF( ( INCX.EQ.1 ) .AND. ( INCY.EQ.1 ) ) THEN
+            DO 60 J = 1, N
+               TEMP1 = ALPHA*X( J )
+               TEMP2 = ZERO
+               DO 50 I = 1, J - 1
+                  Y( I ) = Y( I ) + TEMP1*A( I, J )
+                  TEMP2 = TEMP2 + A( I, J )*X( I )
+   50          CONTINUE
+               Y( J ) = Y( J ) + TEMP1*A( J, J ) + ALPHA*TEMP2
+   60       CONTINUE
+         ELSE
+            JX = KX
+            JY = KY
+            DO 80 J = 1, N
+               TEMP1 = ALPHA*X( JX )
+               TEMP2 = ZERO
+               IX = KX
+               IY = KY
+               DO 70 I = 1, J - 1
+                  Y( IY ) = Y( IY ) + TEMP1*A( I, J )
+                  TEMP2 = TEMP2 + A( I, J )*X( IX )
+                  IX = IX + INCX
+                  IY = IY + INCY
+   70          CONTINUE
+               Y( JY ) = Y( JY ) + TEMP1*A( J, J ) + ALPHA*TEMP2
+               JX = JX + INCX
+               JY = JY + INCY
+   80       CONTINUE
+         END IF
+      ELSE
 *
-*                 Compute the current block column.
+*        Form  y  when A is stored in lower triangle.
 *
-                  CALL ZGEMM( 'No transpose', 'Conjugate transpose',
-     $                        N-J-JB+1, JB, J-1, -CONE, A( J+JB, 1 ),
-     $                        LDA, A( J, 1 ), LDA, CONE, A( J+JB, J ),
-     $                        LDA )
-                  CALL ZTRSM( 'Right', 'Lower', 'Conjugate transpose',
-     $                        'Non-unit', N-J-JB+1, JB, CONE, A( J, J ),
-     $                        LDA, A( J+JB, J ), LDA )
-               END IF
-   20       CONTINUE
+         IF( ( INCX.EQ.1 ) .AND. ( INCY.EQ.1 ) ) THEN
+            DO 100 J = 1, N
+               TEMP1 = ALPHA*X( J )
+               TEMP2 = ZERO
+               Y( J ) = Y( J ) + TEMP1*A( J, J )
+               DO 90 I = J + 1, N
+                  Y( I ) = Y( I ) + TEMP1*A( I, J )
+                  TEMP2 = TEMP2 + A( I, J )*X( I )
+   90          CONTINUE
+               Y( J ) = Y( J ) + ALPHA*TEMP2
+  100       CONTINUE
+         ELSE
+            JX = KX
+            JY = KY
+            DO 120 J = 1, N
+               TEMP1 = ALPHA*X( JX )
+               TEMP2 = ZERO
+               Y( JY ) = Y( JY ) + TEMP1*A( J, J )
+               IX = JX
+               IY = JY
+               DO 110 I = J + 1, N
+                  IX = IX + INCX
+                  IY = IY + INCY
+                  Y( IY ) = Y( IY ) + TEMP1*A( I, J )
+                  TEMP2 = TEMP2 + A( I, J )*X( IX )
+  110          CONTINUE
+               Y( JY ) = Y( JY ) + ALPHA*TEMP2
+               JX = JX + INCX
+               JY = JY + INCY
+  120       CONTINUE
          END IF
       END IF
-      GO TO 40
-*
-   30 CONTINUE
-      INFO = INFO + J - 1
 *
-   40 CONTINUE
       RETURN
 *
-*     End of ZPOTRF
+*     End of ZSYMV
 *
       END
-*> \brief \b ZROT applies a plane rotation with real cosine and complex sine to a pair of complex vectors.
+*> \brief \b ZSYR performs the symmetric rank-1 update of a complex symmetric matrix.
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download ZROT + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/zrot.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/zrot.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/zrot.f"> 
+*> Download ZSYR + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/zsyr.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/zsyr.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/zsyr.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
-*       SUBROUTINE ZROT( N, CX, INCX, CY, INCY, C, S )
-* 
+*       SUBROUTINE ZSYR( UPLO, N, ALPHA, X, INCX, A, LDA )
+*
 *       .. Scalar Arguments ..
-*       INTEGER            INCX, INCY, N
-*       DOUBLE PRECISION   C
-*       COMPLEX*16         S
+*       CHARACTER          UPLO
+*       INTEGER            INCX, LDA, N
+*       COMPLEX*16         ALPHA
 *       ..
 *       .. Array Arguments ..
-*       COMPLEX*16         CX( * ), CY( * )
+*       COMPLEX*16         A( LDA, * ), X( * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
 *>
 *> \verbatim
 *>
-*> ZROT   applies a plane rotation, where the cos (C) is real and the
-*> sin (S) is complex, and the vectors CX and CY are complex.
+*> ZSYR   performs the symmetric rank 1 operation
+*>
+*>    A := alpha*x*x**H + A,
+*>
+*> where alpha is a complex scalar, x is an n element vector and A is an
+*> n by n symmetric matrix.
 *> \endverbatim
 *
 *  Arguments:
 *  ==========
 *
-*> \param[in] N
+*> \param[in] UPLO
 *> \verbatim
-*>          N is INTEGER
-*>          The number of elements in the vectors CX and CY.
+*>          UPLO is CHARACTER*1
+*>           On entry, UPLO specifies whether the upper or lower
+*>           triangular part of the array A is to be referenced as
+*>           follows:
+*>
+*>              UPLO = 'U' or 'u'   Only the upper triangular part of A
+*>                                  is to be referenced.
+*>
+*>              UPLO = 'L' or 'l'   Only the lower triangular part of A
+*>                                  is to be referenced.
+*>
+*>           Unchanged on exit.
 *> \endverbatim
 *>
-*> \param[in,out] CX
+*> \param[in] N
 *> \verbatim
-*>          CX is COMPLEX*16 array, dimension (N)
-*>          On input, the vector X.
-*>          On output, CX is overwritten with C*X + S*Y.
+*>          N is INTEGER
+*>           On entry, N specifies the order of the matrix A.
+*>           N must be at least zero.
+*>           Unchanged on exit.
 *> \endverbatim
 *>
-*> \param[in] INCX
+*> \param[in] ALPHA
 *> \verbatim
-*>          INCX is INTEGER
-*>          The increment between successive values of CY.  INCX <> 0.
+*>          ALPHA is COMPLEX*16
+*>           On entry, ALPHA specifies the scalar alpha.
+*>           Unchanged on exit.
 *> \endverbatim
 *>
-*> \param[in,out] CY
+*> \param[in] X
 *> \verbatim
-*>          CY is COMPLEX*16 array, dimension (N)
-*>          On input, the vector Y.
-*>          On output, CY is overwritten with -CONJG(S)*X + C*Y.
+*>          X is COMPLEX*16 array, dimension at least
+*>           ( 1 + ( N - 1 )*abs( INCX ) ).
+*>           Before entry, the incremented array X must contain the N-
+*>           element vector x.
+*>           Unchanged on exit.
 *> \endverbatim
 *>
-*> \param[in] INCY
+*> \param[in] INCX
 *> \verbatim
-*>          INCY is INTEGER
-*>          The increment between successive values of CY.  INCX <> 0.
+*>          INCX is INTEGER
+*>           On entry, INCX specifies the increment for the elements of
+*>           X. INCX must not be zero.
+*>           Unchanged on exit.
 *> \endverbatim
 *>
-*> \param[in] C
+*> \param[in,out] A
 *> \verbatim
-*>          C is DOUBLE PRECISION
+*>          A is COMPLEX*16 array, dimension ( LDA, N )
+*>           Before entry, with  UPLO = 'U' or 'u', the leading n by n
+*>           upper triangular part of the array A must contain the upper
+*>           triangular part of the symmetric matrix and the strictly
+*>           lower triangular part of A is not referenced. On exit, the
+*>           upper triangular part of the array A is overwritten by the
+*>           upper triangular part of the updated matrix.
+*>           Before entry, with UPLO = 'L' or 'l', the leading n by n
+*>           lower triangular part of the array A must contain the lower
+*>           triangular part of the symmetric matrix and the strictly
+*>           upper triangular part of A is not referenced. On exit, the
+*>           lower triangular part of the array A is overwritten by the
+*>           lower triangular part of the updated matrix.
 *> \endverbatim
 *>
-*> \param[in] S
+*> \param[in] LDA
 *> \verbatim
-*>          S is COMPLEX*16
-*>          C and S define a rotation
-*>             [  C          S  ]
-*>             [ -conjg(S)   C  ]
-*>          where C*C + S*CONJG(S) = 1.0.
+*>          LDA is INTEGER
+*>           On entry, LDA specifies the first dimension of A as declared
+*>           in the calling (sub) program. LDA must be at least
+*>           max( 1, N ).
+*>           Unchanged on exit.
 *> \endverbatim
 *
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date September 2012
+*> \date December 2016
 *
-*> \ingroup complex16OTHERauxiliary
+*> \ingroup complex16SYauxiliary
 *
 *  =====================================================================
-      SUBROUTINE ZROT( N, CX, INCX, CY, INCY, C, S )
+      SUBROUTINE ZSYR( UPLO, N, ALPHA, X, INCX, A, LDA )
 *
-*  -- LAPACK auxiliary routine (version 3.4.2) --
+*  -- LAPACK auxiliary routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     September 2012
+*     December 2016
 *
 *     .. Scalar Arguments ..
-      INTEGER            INCX, INCY, N
-      DOUBLE PRECISION   C
-      COMPLEX*16         S
+      CHARACTER          UPLO
+      INTEGER            INCX, LDA, N
+      COMPLEX*16         ALPHA
 *     ..
 *     .. Array Arguments ..
-      COMPLEX*16         CX( * ), CY( * )
+      COMPLEX*16         A( LDA, * ), X( * )
 *     ..
 *
 * =====================================================================
 *
+*     .. Parameters ..
+      COMPLEX*16         ZERO
+      PARAMETER          ( ZERO = ( 0.0D+0, 0.0D+0 ) )
+*     ..
 *     .. Local Scalars ..
-      INTEGER            I, IX, IY
-      COMPLEX*16         STEMP
+      INTEGER            I, INFO, IX, J, JX, KX
+      COMPLEX*16         TEMP
+*     ..
+*     .. External Functions ..
+      LOGICAL            LSAME
+      EXTERNAL           LSAME
+*     ..
+*     .. External Subroutines ..
+      EXTERNAL           XERBLA
 *     ..
 *     .. Intrinsic Functions ..
-      INTRINSIC          DCONJG
+      INTRINSIC          MAX
 *     ..
 *     .. Executable Statements ..
 *
-      IF( N.LE.0 )
+*     Test the input parameters.
+*
+      INFO = 0
+      IF( .NOT.LSAME( UPLO, 'U' ) .AND. .NOT.LSAME( UPLO, 'L' ) ) THEN
+         INFO = 1
+      ELSE IF( N.LT.0 ) THEN
+         INFO = 2
+      ELSE IF( INCX.EQ.0 ) THEN
+         INFO = 5
+      ELSE IF( LDA.LT.MAX( 1, N ) ) THEN
+         INFO = 7
+      END IF
+      IF( INFO.NE.0 ) THEN
+         CALL XERBLA( 'ZSYR  ', INFO )
+         RETURN
+      END IF
+*
+*     Quick return if possible.
+*
+      IF( ( N.EQ.0 ) .OR. ( ALPHA.EQ.ZERO ) )
      $   RETURN
-      IF( INCX.EQ.1 .AND. INCY.EQ.1 )
-     $   GO TO 20
 *
-*     Code for unequal increments or equal increments not equal to 1
+*     Set the start point in X if the increment is not unity.
 *
-      IX = 1
-      IY = 1
-      IF( INCX.LT.0 )
-     $   IX = ( -N+1 )*INCX + 1
-      IF( INCY.LT.0 )
-     $   IY = ( -N+1 )*INCY + 1
-      DO 10 I = 1, N
-         STEMP = C*CX( IX ) + S*CY( IY )
-         CY( IY ) = C*CY( IY ) - DCONJG( S )*CX( IX )
-         CX( IX ) = STEMP
-         IX = IX + INCX
-         IY = IY + INCY
-   10 CONTINUE
-      RETURN
+      IF( INCX.LE.0 ) THEN
+         KX = 1 - ( N-1 )*INCX
+      ELSE IF( INCX.NE.1 ) THEN
+         KX = 1
+      END IF
 *
-*     Code for both increments equal to 1
+*     Start the operations. In this version the elements of A are
+*     accessed sequentially with one pass through the triangular part
+*     of A.
+*
+      IF( LSAME( UPLO, 'U' ) ) THEN
+*
+*        Form  A  when A is stored in upper triangle.
+*
+         IF( INCX.EQ.1 ) THEN
+            DO 20 J = 1, N
+               IF( X( J ).NE.ZERO ) THEN
+                  TEMP = ALPHA*X( J )
+                  DO 10 I = 1, J
+                     A( I, J ) = A( I, J ) + X( I )*TEMP
+   10             CONTINUE
+               END IF
+   20       CONTINUE
+         ELSE
+            JX = KX
+            DO 40 J = 1, N
+               IF( X( JX ).NE.ZERO ) THEN
+                  TEMP = ALPHA*X( JX )
+                  IX = KX
+                  DO 30 I = 1, J
+                     A( I, J ) = A( I, J ) + X( IX )*TEMP
+                     IX = IX + INCX
+   30             CONTINUE
+               END IF
+               JX = JX + INCX
+   40       CONTINUE
+         END IF
+      ELSE
+*
+*        Form  A  when A is stored in lower triangle.
+*
+         IF( INCX.EQ.1 ) THEN
+            DO 60 J = 1, N
+               IF( X( J ).NE.ZERO ) THEN
+                  TEMP = ALPHA*X( J )
+                  DO 50 I = J, N
+                     A( I, J ) = A( I, J ) + X( I )*TEMP
+   50             CONTINUE
+               END IF
+   60       CONTINUE
+         ELSE
+            JX = KX
+            DO 80 J = 1, N
+               IF( X( JX ).NE.ZERO ) THEN
+                  TEMP = ALPHA*X( JX )
+                  IX = JX
+                  DO 70 I = J, N
+                     A( I, J ) = A( I, J ) + X( IX )*TEMP
+                     IX = IX + INCX
+   70             CONTINUE
+               END IF
+               JX = JX + INCX
+   80       CONTINUE
+         END IF
+      END IF
 *
-   20 CONTINUE
-      DO 30 I = 1, N
-         STEMP = C*CX( I ) + S*CY( I )
-         CY( I ) = C*CY( I ) - DCONJG( S )*CX( I )
-         CX( I ) = STEMP
-   30 CONTINUE
       RETURN
+*
+*     End of ZSYR
+*
       END
-*> \brief \b ZSTEQR
+*> \brief \b ZSYTF2 computes the factorization of a real symmetric indefinite matrix, using the diagonal pivoting method (unblocked algorithm).
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download ZSTEQR + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/zsteqr.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/zsteqr.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/zsteqr.f"> 
+*> Download ZSYTF2 + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/zsytf2.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/zsytf2.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/zsytf2.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
-*       SUBROUTINE ZSTEQR( COMPZ, N, D, E, Z, LDZ, WORK, INFO )
-* 
+*       SUBROUTINE ZSYTF2( UPLO, N, A, LDA, IPIV, INFO )
+*
 *       .. Scalar Arguments ..
-*       CHARACTER          COMPZ
-*       INTEGER            INFO, LDZ, N
+*       CHARACTER          UPLO
+*       INTEGER            INFO, LDA, N
 *       ..
 *       .. Array Arguments ..
-*       DOUBLE PRECISION   D( * ), E( * ), WORK( * )
-*       COMPLEX*16         Z( LDZ, * )
+*       INTEGER            IPIV( * )
+*       COMPLEX*16         A( LDA, * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
 *>
 *> \verbatim
 *>
-*> ZSTEQR computes all eigenvalues and, optionally, eigenvectors of a
-*> symmetric tridiagonal matrix using the implicit QL or QR method.
-*> The eigenvectors of a full or band complex Hermitian matrix can also
-*> be found if ZHETRD or ZHPTRD or ZHBTRD has been used to reduce this
-*> matrix to tridiagonal form.
+*> ZSYTF2 computes the factorization of a complex symmetric matrix A
+*> using the Bunch-Kaufman diagonal pivoting method:
+*>
+*>    A = U*D*U**T  or  A = L*D*L**T
+*>
+*> where U (or L) is a product of permutation and unit upper (lower)
+*> triangular matrices, U**T is the transpose of U, and D is symmetric and
+*> block diagonal with 1-by-1 and 2-by-2 diagonal blocks.
+*>
+*> This is the unblocked version of the algorithm, calling Level 2 BLAS.
 *> \endverbatim
 *
 *  Arguments:
 *  ==========
 *
-*> \param[in] COMPZ
+*> \param[in] UPLO
 *> \verbatim
-*>          COMPZ is CHARACTER*1
-*>          = 'N':  Compute eigenvalues only.
-*>          = 'V':  Compute eigenvalues and eigenvectors of the original
-*>                  Hermitian matrix.  On entry, Z must contain the
-*>                  unitary matrix used to reduce the original matrix
-*>                  to tridiagonal form.
-*>          = 'I':  Compute eigenvalues and eigenvectors of the
-*>                  tridiagonal matrix.  Z is initialized to the identity
-*>                  matrix.
+*>          UPLO is CHARACTER*1
+*>          Specifies whether the upper or lower triangular part of the
+*>          symmetric matrix A is stored:
+*>          = 'U':  Upper triangular
+*>          = 'L':  Lower triangular
 *> \endverbatim
 *>
 *> \param[in] N
 *> \verbatim
 *>          N is INTEGER
-*>          The order of the matrix.  N >= 0.
+*>          The order of the matrix A.  N >= 0.
 *> \endverbatim
 *>
-*> \param[in,out] D
+*> \param[in,out] A
 *> \verbatim
-*>          D is DOUBLE PRECISION array, dimension (N)
-*>          On entry, the diagonal elements of the tridiagonal matrix.
-*>          On exit, if INFO = 0, the eigenvalues in ascending order.
-*> \endverbatim
+*>          A is COMPLEX*16 array, dimension (LDA,N)
+*>          On entry, the symmetric matrix A.  If UPLO = 'U', the leading
+*>          n-by-n upper triangular part of A contains the upper
+*>          triangular part of the matrix A, and the strictly lower
+*>          triangular part of A is not referenced.  If UPLO = 'L', the
+*>          leading n-by-n lower triangular part of A contains the lower
+*>          triangular part of the matrix A, and the strictly upper
+*>          triangular part of A is not referenced.
 *>
-*> \param[in,out] E
-*> \verbatim
-*>          E is DOUBLE PRECISION array, dimension (N-1)
-*>          On entry, the (n-1) subdiagonal elements of the tridiagonal
-*>          matrix.
-*>          On exit, E has been destroyed.
+*>          On exit, the block diagonal matrix D and the multipliers used
+*>          to obtain the factor U or L (see below for further details).
 *> \endverbatim
 *>
-*> \param[in,out] Z
+*> \param[in] LDA
 *> \verbatim
-*>          Z is COMPLEX*16 array, dimension (LDZ, N)
-*>          On entry, if  COMPZ = 'V', then Z contains the unitary
-*>          matrix used in the reduction to tridiagonal form.
-*>          On exit, if INFO = 0, then if COMPZ = 'V', Z contains the
-*>          orthonormal eigenvectors of the original Hermitian matrix,
-*>          and if COMPZ = 'I', Z contains the orthonormal eigenvectors
-*>          of the symmetric tridiagonal matrix.
-*>          If COMPZ = 'N', then Z is not referenced.
+*>          LDA is INTEGER
+*>          The leading dimension of the array A.  LDA >= max(1,N).
 *> \endverbatim
 *>
-*> \param[in] LDZ
+*> \param[out] IPIV
 *> \verbatim
-*>          LDZ is INTEGER
-*>          The leading dimension of the array Z.  LDZ >= 1, and if
-*>          eigenvectors are desired, then  LDZ >= max(1,N).
-*> \endverbatim
+*>          IPIV is INTEGER array, dimension (N)
+*>          Details of the interchanges and the block structure of D.
 *>
-*> \param[out] WORK
-*> \verbatim
-*>          WORK is DOUBLE PRECISION array, dimension (max(1,2*N-2))
-*>          If COMPZ = 'N', then WORK is not referenced.
+*>          If UPLO = 'U':
+*>             If IPIV(k) > 0, then rows and columns k and IPIV(k) were
+*>             interchanged and D(k,k) is a 1-by-1 diagonal block.
+*>
+*>             If IPIV(k) = IPIV(k-1) < 0, then rows and columns
+*>             k-1 and -IPIV(k) were interchanged and D(k-1:k,k-1:k)
+*>             is a 2-by-2 diagonal block.
+*>
+*>          If UPLO = 'L':
+*>             If IPIV(k) > 0, then rows and columns k and IPIV(k) were
+*>             interchanged and D(k,k) is a 1-by-1 diagonal block.
+*>
+*>             If IPIV(k) = IPIV(k+1) < 0, then rows and columns
+*>             k+1 and -IPIV(k) were interchanged and D(k:k+1,k:k+1)
+*>             is a 2-by-2 diagonal block.
 *> \endverbatim
 *>
 *> \param[out] INFO
 *> \verbatim
 *>          INFO is INTEGER
-*>          = 0:  successful exit
-*>          < 0:  if INFO = -i, the i-th argument had an illegal value
-*>          > 0:  the algorithm has failed to find all the eigenvalues in
-*>                a total of 30*N iterations; if INFO = i, then i
-*>                elements of E have not converged to zero; on exit, D
-*>                and E contain the elements of a symmetric tridiagonal
-*>                matrix which is unitarily similar to the original
-*>                matrix.
+*>          = 0: successful exit
+*>          < 0: if INFO = -k, the k-th argument had an illegal value
+*>          > 0: if INFO = k, D(k,k) is exactly zero.  The factorization
+*>               has been completed, but the block diagonal matrix D is
+*>               exactly singular, and division by zero will occur if it
+*>               is used to solve a system of equations.
+*> \endverbatim
+*
+*  Authors:
+*  ========
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date December 2016
+*
+*> \ingroup complex16SYcomputational
+*
+*> \par Further Details:
+*  =====================
+*>
+*> \verbatim
+*>
+*>  If UPLO = 'U', then A = U*D*U**T, where
+*>     U = P(n)*U(n)* ... *P(k)U(k)* ...,
+*>  i.e., U is a product of terms P(k)*U(k), where k decreases from n to
+*>  1 in steps of 1 or 2, and D is a block diagonal matrix with 1-by-1
+*>  and 2-by-2 diagonal blocks D(k).  P(k) is a permutation matrix as
+*>  defined by IPIV(k), and U(k) is a unit upper triangular matrix, such
+*>  that if the diagonal block D(k) is of order s (s = 1 or 2), then
+*>
+*>             (   I    v    0   )   k-s
+*>     U(k) =  (   0    I    0   )   s
+*>             (   0    0    I   )   n-k
+*>                k-s   s   n-k
+*>
+*>  If s = 1, D(k) overwrites A(k,k), and v overwrites A(1:k-1,k).
+*>  If s = 2, the upper triangle of D(k) overwrites A(k-1,k-1), A(k-1,k),
+*>  and A(k,k), and v overwrites A(1:k-2,k-1:k).
+*>
+*>  If UPLO = 'L', then A = L*D*L**T, where
+*>     L = P(1)*L(1)* ... *P(k)*L(k)* ...,
+*>  i.e., L is a product of terms P(k)*L(k), where k increases from 1 to
+*>  n in steps of 1 or 2, and D is a block diagonal matrix with 1-by-1
+*>  and 2-by-2 diagonal blocks D(k).  P(k) is a permutation matrix as
+*>  defined by IPIV(k), and L(k) is a unit lower triangular matrix, such
+*>  that if the diagonal block D(k) is of order s (s = 1 or 2), then
+*>
+*>             (   I    0     0   )  k-1
+*>     L(k) =  (   0    I     0   )  s
+*>             (   0    v     I   )  n-k-s+1
+*>                k-1   s  n-k-s+1
+*>
+*>  If s = 1, D(k) overwrites A(k,k), and v overwrites A(k+1:n,k).
+*>  If s = 2, the lower triangle of D(k) overwrites A(k,k), A(k+1,k),
+*>  and A(k+1,k+1), and v overwrites A(k+2:n,k:k+1).
 *> \endverbatim
 *
-*  Authors:
-*  ========
-*
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
-*
-*> \date November 2011
-*
-*> \ingroup complex16OTHERcomputational
+*> \par Contributors:
+*  ==================
+*>
+*> \verbatim
+*>
+*>  09-29-06 - patch from
+*>    Bobby Cheng, MathWorks
+*>
+*>    Replace l.209 and l.377
+*>         IF( MAX( ABSAKK, COLMAX ).EQ.ZERO ) THEN
+*>    by
+*>         IF( (MAX( ABSAKK, COLMAX ).EQ.ZERO) .OR. DISNAN(ABSAKK) ) THEN
+*>
+*>  1-96 - Based on modifications by J. Lewis, Boeing Computer Services
+*>         Company
+*> \endverbatim
 *
 *  =====================================================================
-      SUBROUTINE ZSTEQR( COMPZ, N, D, E, Z, LDZ, WORK, INFO )
+      SUBROUTINE ZSYTF2( UPLO, N, A, LDA, IPIV, INFO )
 *
-*  -- LAPACK computational routine (version 3.4.0) --
+*  -- LAPACK computational routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     November 2011
+*     December 2016
 *
 *     .. Scalar Arguments ..
-      CHARACTER          COMPZ
-      INTEGER            INFO, LDZ, N
+      CHARACTER          UPLO
+      INTEGER            INFO, LDA, N
 *     ..
 *     .. Array Arguments ..
-      DOUBLE PRECISION   D( * ), E( * ), WORK( * )
-      COMPLEX*16         Z( LDZ, * )
+      INTEGER            IPIV( * )
+      COMPLEX*16         A( LDA, * )
 *     ..
 *
 *  =====================================================================
 *
 *     .. Parameters ..
-      DOUBLE PRECISION   ZERO, ONE, TWO, THREE
-      PARAMETER          ( ZERO = 0.0D0, ONE = 1.0D0, TWO = 2.0D0,
-     $                   THREE = 3.0D0 )
-      COMPLEX*16         CZERO, CONE
-      PARAMETER          ( CZERO = ( 0.0D0, 0.0D0 ),
-     $                   CONE = ( 1.0D0, 0.0D0 ) )
-      INTEGER            MAXIT
-      PARAMETER          ( MAXIT = 30 )
+      DOUBLE PRECISION   ZERO, ONE
+      PARAMETER          ( ZERO = 0.0D+0, ONE = 1.0D+0 )
+      DOUBLE PRECISION   EIGHT, SEVTEN
+      PARAMETER          ( EIGHT = 8.0D+0, SEVTEN = 17.0D+0 )
+      COMPLEX*16         CONE
+      PARAMETER          ( CONE = ( 1.0D+0, 0.0D+0 ) )
 *     ..
 *     .. Local Scalars ..
-      INTEGER            I, ICOMPZ, II, ISCALE, J, JTOT, K, L, L1, LEND,
-     $                   LENDM1, LENDP1, LENDSV, LM1, LSV, M, MM, MM1,
-     $                   NM1, NMAXIT
-      DOUBLE PRECISION   ANORM, B, C, EPS, EPS2, F, G, P, R, RT1, RT2,
-     $                   S, SAFMAX, SAFMIN, SSFMAX, SSFMIN, TST
+      LOGICAL            UPPER
+      INTEGER            I, IMAX, J, JMAX, K, KK, KP, KSTEP
+      DOUBLE PRECISION   ABSAKK, ALPHA, COLMAX, ROWMAX
+      COMPLEX*16         D11, D12, D21, D22, R1, T, WK, WKM1, WKP1, Z
 *     ..
 *     .. External Functions ..
-      LOGICAL            LSAME
-      DOUBLE PRECISION   DLAMCH, DLANST, DLAPY2
-      EXTERNAL           LSAME, DLAMCH, DLANST, DLAPY2
+      LOGICAL            DISNAN, LSAME
+      INTEGER            IZAMAX
+      EXTERNAL           DISNAN, LSAME, IZAMAX
 *     ..
 *     .. External Subroutines ..
-      EXTERNAL           DLAE2, DLAEV2, DLARTG, DLASCL, DLASRT, XERBLA,
-     $                   ZLASET, ZLASR, ZSWAP
+      EXTERNAL           XERBLA, ZSCAL, ZSWAP, ZSYR
 *     ..
 *     .. Intrinsic Functions ..
-      INTRINSIC          ABS, MAX, SIGN, SQRT
+      INTRINSIC          ABS, DBLE, DIMAG, MAX, SQRT
+*     ..
+*     .. Statement Functions ..
+      DOUBLE PRECISION   CABS1
+*     ..
+*     .. Statement Function definitions ..
+      CABS1( Z ) = ABS( DBLE( Z ) ) + ABS( DIMAG( Z ) )
 *     ..
 *     .. Executable Statements ..
 *
 *     Test the input parameters.
 *
       INFO = 0
-*
-      IF( LSAME( COMPZ, 'N' ) ) THEN
-         ICOMPZ = 0
-      ELSE IF( LSAME( COMPZ, 'V' ) ) THEN
-         ICOMPZ = 1
-      ELSE IF( LSAME( COMPZ, 'I' ) ) THEN
-         ICOMPZ = 2
-      ELSE
-         ICOMPZ = -1
-      END IF
-      IF( ICOMPZ.LT.0 ) THEN
+      UPPER = LSAME( UPLO, 'U' )
+      IF( .NOT.UPPER .AND. .NOT.LSAME( UPLO, 'L' ) ) THEN
          INFO = -1
       ELSE IF( N.LT.0 ) THEN
          INFO = -2
-      ELSE IF( ( LDZ.LT.1 ) .OR. ( ICOMPZ.GT.0 .AND. LDZ.LT.MAX( 1,
-     $         N ) ) ) THEN
-         INFO = -6
+      ELSE IF( LDA.LT.MAX( 1, N ) ) THEN
+         INFO = -4
       END IF
       IF( INFO.NE.0 ) THEN
-         CALL XERBLA( 'ZSTEQR', -INFO )
-         RETURN
-      END IF
-*
-*     Quick return if possible
-*
-      IF( N.EQ.0 )
-     $   RETURN
-*
-      IF( N.EQ.1 ) THEN
-         IF( ICOMPZ.EQ.2 )
-     $      Z( 1, 1 ) = CONE
+         CALL XERBLA( 'ZSYTF2', -INFO )
          RETURN
       END IF
 *
-*     Determine the unit roundoff and over/underflow thresholds.
-*
-      EPS = DLAMCH( 'E' )
-      EPS2 = EPS**2
-      SAFMIN = DLAMCH( 'S' )
-      SAFMAX = ONE / SAFMIN
-      SSFMAX = SQRT( SAFMAX ) / THREE
-      SSFMIN = SQRT( SAFMIN ) / EPS2
-*
-*     Compute the eigenvalues and eigenvectors of the tridiagonal
-*     matrix.
-*
-      IF( ICOMPZ.EQ.2 )
-     $   CALL ZLASET( 'Full', N, N, CZERO, CONE, Z, LDZ )
-*
-      NMAXIT = N*MAXIT
-      JTOT = 0
+*     Initialize ALPHA for use in choosing pivot block size.
 *
-*     Determine where the matrix splits and choose QL or QR iteration
-*     for each block, according to whether top or bottom diagonal
-*     element is smaller.
-*
-      L1 = 1
-      NM1 = N - 1
+      ALPHA = ( ONE+SQRT( SEVTEN ) ) / EIGHT
 *
-   10 CONTINUE
-      IF( L1.GT.N )
-     $   GO TO 160
-      IF( L1.GT.1 )
-     $   E( L1-1 ) = ZERO
-      IF( L1.LE.NM1 ) THEN
-         DO 20 M = L1, NM1
-            TST = ABS( E( M ) )
-            IF( TST.EQ.ZERO )
-     $         GO TO 30
-            IF( TST.LE.( SQRT( ABS( D( M ) ) )*SQRT( ABS( D( M+
-     $          1 ) ) ) )*EPS ) THEN
-               E( M ) = ZERO
-               GO TO 30
-            END IF
-   20    CONTINUE
-      END IF
-      M = N
+      IF( UPPER ) THEN
 *
-   30 CONTINUE
-      L = L1
-      LSV = L
-      LEND = M
-      LENDSV = LEND
-      L1 = M + 1
-      IF( LEND.EQ.L )
-     $   GO TO 10
+*        Factorize A as U*D*U**T using the upper triangle of A
 *
-*     Scale submatrix in rows and columns L to LEND
+*        K is the main loop index, decreasing from N to 1 in steps of
+*        1 or 2
 *
-      ANORM = DLANST( 'I', LEND-L+1, D( L ), E( L ) )
-      ISCALE = 0
-      IF( ANORM.EQ.ZERO )
-     $   GO TO 10
-      IF( ANORM.GT.SSFMAX ) THEN
-         ISCALE = 1
-         CALL DLASCL( 'G', 0, 0, ANORM, SSFMAX, LEND-L+1, 1, D( L ), N,
-     $                INFO )
-         CALL DLASCL( 'G', 0, 0, ANORM, SSFMAX, LEND-L, 1, E( L ), N,
-     $                INFO )
-      ELSE IF( ANORM.LT.SSFMIN ) THEN
-         ISCALE = 2
-         CALL DLASCL( 'G', 0, 0, ANORM, SSFMIN, LEND-L+1, 1, D( L ), N,
-     $                INFO )
-         CALL DLASCL( 'G', 0, 0, ANORM, SSFMIN, LEND-L, 1, E( L ), N,
-     $                INFO )
-      END IF
+         K = N
+   10    CONTINUE
 *
-*     Choose between QL and QR iteration
+*        If K < 1, exit from loop
 *
-      IF( ABS( D( LEND ) ).LT.ABS( D( L ) ) ) THEN
-         LEND = LSV
-         L = LENDSV
-      END IF
+         IF( K.LT.1 )
+     $      GO TO 70
+         KSTEP = 1
 *
-      IF( LEND.GT.L ) THEN
+*        Determine rows and columns to be interchanged and whether
+*        a 1-by-1 or 2-by-2 pivot block will be used
 *
-*        QL Iteration
+         ABSAKK = CABS1( A( K, K ) )
 *
-*        Look for small subdiagonal element.
+*        IMAX is the row-index of the largest off-diagonal element in
+*        column K, and COLMAX is its absolute value.
+*        Determine both COLMAX and IMAX.
 *
-   40    CONTINUE
-         IF( L.NE.LEND ) THEN
-            LENDM1 = LEND - 1
-            DO 50 M = L, LENDM1
-               TST = ABS( E( M ) )**2
-               IF( TST.LE.( EPS2*ABS( D( M ) ) )*ABS( D( M+1 ) )+
-     $             SAFMIN )GO TO 60
-   50       CONTINUE
+         IF( K.GT.1 ) THEN
+            IMAX = IZAMAX( K-1, A( 1, K ), 1 )
+            COLMAX = CABS1( A( IMAX, K ) )
+         ELSE
+            COLMAX = ZERO
          END IF
 *
-         M = LEND
+         IF( MAX( ABSAKK, COLMAX ).EQ.ZERO .OR. DISNAN(ABSAKK) ) THEN
 *
-   60    CONTINUE
-         IF( M.LT.LEND )
-     $      E( M ) = ZERO
-         P = D( L )
-         IF( M.EQ.L )
-     $      GO TO 80
+*           Column K is zero or underflow, or contains a NaN:
+*           set INFO and continue
 *
-*        If remaining matrix is 2-by-2, use DLAE2 or SLAEV2
-*        to compute its eigensystem.
+            IF( INFO.EQ.0 )
+     $         INFO = K
+            KP = K
+         ELSE
+            IF( ABSAKK.GE.ALPHA*COLMAX ) THEN
 *
-         IF( M.EQ.L+1 ) THEN
-            IF( ICOMPZ.GT.0 ) THEN
-               CALL DLAEV2( D( L ), E( L ), D( L+1 ), RT1, RT2, C, S )
-               WORK( L ) = C
-               WORK( N-1+L ) = S
-               CALL ZLASR( 'R', 'V', 'B', N, 2, WORK( L ),
-     $                     WORK( N-1+L ), Z( 1, L ), LDZ )
-            ELSE
-               CALL DLAE2( D( L ), E( L ), D( L+1 ), RT1, RT2 )
-            END IF
-            D( L ) = RT1
-            D( L+1 ) = RT2
-            E( L ) = ZERO
-            L = L + 2
-            IF( L.LE.LEND )
-     $         GO TO 40
-            GO TO 140
-         END IF
+*              no interchange, use 1-by-1 pivot block
 *
-         IF( JTOT.EQ.NMAXIT )
-     $      GO TO 140
-         JTOT = JTOT + 1
+               KP = K
+            ELSE
 *
-*        Form shift.
+*              JMAX is the column-index of the largest off-diagonal
+*              element in row IMAX, and ROWMAX is its absolute value
 *
-         G = ( D( L+1 )-P ) / ( TWO*E( L ) )
-         R = DLAPY2( G, ONE )
-         G = D( M ) - P + ( E( L ) / ( G+SIGN( R, G ) ) )
+               JMAX = IMAX + IZAMAX( K-IMAX, A( IMAX, IMAX+1 ), LDA )
+               ROWMAX = CABS1( A( IMAX, JMAX ) )
+               IF( IMAX.GT.1 ) THEN
+                  JMAX = IZAMAX( IMAX-1, A( 1, IMAX ), 1 )
+                  ROWMAX = MAX( ROWMAX, CABS1( A( JMAX, IMAX ) ) )
+               END IF
 *
-         S = ONE
-         C = ONE
-         P = ZERO
+               IF( ABSAKK.GE.ALPHA*COLMAX*( COLMAX / ROWMAX ) ) THEN
 *
-*        Inner loop
+*                 no interchange, use 1-by-1 pivot block
 *
-         MM1 = M - 1
-         DO 70 I = MM1, L, -1
-            F = S*E( I )
-            B = C*E( I )
-            CALL DLARTG( G, F, C, S, R )
-            IF( I.NE.M-1 )
-     $         E( I+1 ) = R
-            G = D( I+1 ) - P
-            R = ( D( I )-G )*S + TWO*C*B
-            P = S*R
-            D( I+1 ) = G + P
-            G = C*R - B
+                  KP = K
+               ELSE IF( CABS1( A( IMAX, IMAX ) ).GE.ALPHA*ROWMAX ) THEN
 *
-*           If eigenvectors are desired, then save rotations.
+*                 interchange rows and columns K and IMAX, use 1-by-1
+*                 pivot block
 *
-            IF( ICOMPZ.GT.0 ) THEN
-               WORK( I ) = C
-               WORK( N-1+I ) = -S
-            END IF
+                  KP = IMAX
+               ELSE
 *
-   70    CONTINUE
+*                 interchange rows and columns K-1 and IMAX, use 2-by-2
+*                 pivot block
 *
-*        If eigenvectors are desired, then apply saved rotations.
+                  KP = IMAX
+                  KSTEP = 2
+               END IF
+            END IF
 *
-         IF( ICOMPZ.GT.0 ) THEN
-            MM = M - L + 1
-            CALL ZLASR( 'R', 'V', 'B', N, MM, WORK( L ), WORK( N-1+L ),
-     $                  Z( 1, L ), LDZ )
-         END IF
+            KK = K - KSTEP + 1
+            IF( KP.NE.KK ) THEN
 *
-         D( L ) = D( L ) - P
-         E( L ) = G
-         GO TO 40
+*              Interchange rows and columns KK and KP in the leading
+*              submatrix A(1:k,1:k)
 *
-*        Eigenvalue found.
+               CALL ZSWAP( KP-1, A( 1, KK ), 1, A( 1, KP ), 1 )
+               CALL ZSWAP( KK-KP-1, A( KP+1, KK ), 1, A( KP, KP+1 ),
+     $                     LDA )
+               T = A( KK, KK )
+               A( KK, KK ) = A( KP, KP )
+               A( KP, KP ) = T
+               IF( KSTEP.EQ.2 ) THEN
+                  T = A( K-1, K )
+                  A( K-1, K ) = A( KP, K )
+                  A( KP, K ) = T
+               END IF
+            END IF
 *
-   80    CONTINUE
-         D( L ) = P
+*           Update the leading submatrix
 *
-         L = L + 1
-         IF( L.LE.LEND )
-     $      GO TO 40
-         GO TO 140
+            IF( KSTEP.EQ.1 ) THEN
 *
-      ELSE
+*              1-by-1 pivot block D(k): column k now holds
 *
-*        QR Iteration
+*              W(k) = U(k)*D(k)
 *
-*        Look for small superdiagonal element.
+*              where U(k) is the k-th column of U
 *
-   90    CONTINUE
-         IF( L.NE.LEND ) THEN
-            LENDP1 = LEND + 1
-            DO 100 M = L, LENDP1, -1
-               TST = ABS( E( M-1 ) )**2
-               IF( TST.LE.( EPS2*ABS( D( M ) ) )*ABS( D( M-1 ) )+
-     $             SAFMIN )GO TO 110
-  100       CONTINUE
-         END IF
+*              Perform a rank-1 update of A(1:k-1,1:k-1) as
 *
-         M = LEND
+*              A := A - U(k)*D(k)*U(k)**T = A - W(k)*1/D(k)*W(k)**T
 *
-  110    CONTINUE
-         IF( M.GT.LEND )
-     $      E( M-1 ) = ZERO
-         P = D( L )
-         IF( M.EQ.L )
-     $      GO TO 130
+               R1 = CONE / A( K, K )
+               CALL ZSYR( UPLO, K-1, -R1, A( 1, K ), 1, A, LDA )
 *
-*        If remaining matrix is 2-by-2, use DLAE2 or SLAEV2
-*        to compute its eigensystem.
+*              Store U(k) in column k
 *
-         IF( M.EQ.L-1 ) THEN
-            IF( ICOMPZ.GT.0 ) THEN
-               CALL DLAEV2( D( L-1 ), E( L-1 ), D( L ), RT1, RT2, C, S )
-               WORK( M ) = C
-               WORK( N-1+M ) = S
-               CALL ZLASR( 'R', 'V', 'F', N, 2, WORK( M ),
-     $                     WORK( N-1+M ), Z( 1, L-1 ), LDZ )
+               CALL ZSCAL( K-1, R1, A( 1, K ), 1 )
             ELSE
-               CALL DLAE2( D( L-1 ), E( L-1 ), D( L ), RT1, RT2 )
-            END IF
-            D( L-1 ) = RT1
-            D( L ) = RT2
-            E( L-1 ) = ZERO
-            L = L - 2
-            IF( L.GE.LEND )
-     $         GO TO 90
-            GO TO 140
-         END IF
-*
-         IF( JTOT.EQ.NMAXIT )
-     $      GO TO 140
-         JTOT = JTOT + 1
 *
-*        Form shift.
+*              2-by-2 pivot block D(k): columns k and k-1 now hold
 *
-         G = ( D( L-1 )-P ) / ( TWO*E( L-1 ) )
-         R = DLAPY2( G, ONE )
-         G = D( M ) - P + ( E( L-1 ) / ( G+SIGN( R, G ) ) )
+*              ( W(k-1) W(k) ) = ( U(k-1) U(k) )*D(k)
 *
-         S = ONE
-         C = ONE
-         P = ZERO
+*              where U(k) and U(k-1) are the k-th and (k-1)-th columns
+*              of U
 *
-*        Inner loop
+*              Perform a rank-2 update of A(1:k-2,1:k-2) as
 *
-         LM1 = L - 1
-         DO 120 I = M, LM1
-            F = S*E( I )
-            B = C*E( I )
-            CALL DLARTG( G, F, C, S, R )
-            IF( I.NE.M )
-     $         E( I-1 ) = R
-            G = D( I ) - P
-            R = ( D( I+1 )-G )*S + TWO*C*B
-            P = S*R
-            D( I ) = G + P
-            G = C*R - B
+*              A := A - ( U(k-1) U(k) )*D(k)*( U(k-1) U(k) )**T
+*                 = A - ( W(k-1) W(k) )*inv(D(k))*( W(k-1) W(k) )**T
 *
-*           If eigenvectors are desired, then save rotations.
+               IF( K.GT.2 ) THEN
 *
-            IF( ICOMPZ.GT.0 ) THEN
-               WORK( I ) = C
-               WORK( N-1+I ) = S
-            END IF
+                  D12 = A( K-1, K )
+                  D22 = A( K-1, K-1 ) / D12
+                  D11 = A( K, K ) / D12
+                  T = CONE / ( D11*D22-CONE )
+                  D12 = T / D12
 *
-  120    CONTINUE
+                  DO 30 J = K - 2, 1, -1
+                     WKM1 = D12*( D11*A( J, K-1 )-A( J, K ) )
+                     WK = D12*( D22*A( J, K )-A( J, K-1 ) )
+                     DO 20 I = J, 1, -1
+                        A( I, J ) = A( I, J ) - A( I, K )*WK -
+     $                              A( I, K-1 )*WKM1
+   20                CONTINUE
+                     A( J, K ) = WK
+                     A( J, K-1 ) = WKM1
+   30             CONTINUE
 *
-*        If eigenvectors are desired, then apply saved rotations.
+               END IF
 *
-         IF( ICOMPZ.GT.0 ) THEN
-            MM = L - M + 1
-            CALL ZLASR( 'R', 'V', 'F', N, MM, WORK( M ), WORK( N-1+M ),
-     $                  Z( 1, M ), LDZ )
+            END IF
          END IF
 *
-         D( L ) = D( L ) - P
-         E( LM1 ) = G
-         GO TO 90
-*
-*        Eigenvalue found.
-*
-  130    CONTINUE
-         D( L ) = P
+*        Store details of the interchanges in IPIV
 *
-         L = L - 1
-         IF( L.GE.LEND )
-     $      GO TO 90
-         GO TO 140
+         IF( KSTEP.EQ.1 ) THEN
+            IPIV( K ) = KP
+         ELSE
+            IPIV( K ) = -KP
+            IPIV( K-1 ) = -KP
+         END IF
 *
-      END IF
+*        Decrease K and return to the start of the main loop
 *
-*     Undo scaling if necessary
+         K = K - KSTEP
+         GO TO 10
 *
-  140 CONTINUE
-      IF( ISCALE.EQ.1 ) THEN
-         CALL DLASCL( 'G', 0, 0, SSFMAX, ANORM, LENDSV-LSV+1, 1,
-     $                D( LSV ), N, INFO )
-         CALL DLASCL( 'G', 0, 0, SSFMAX, ANORM, LENDSV-LSV, 1, E( LSV ),
-     $                N, INFO )
-      ELSE IF( ISCALE.EQ.2 ) THEN
-         CALL DLASCL( 'G', 0, 0, SSFMIN, ANORM, LENDSV-LSV+1, 1,
-     $                D( LSV ), N, INFO )
-         CALL DLASCL( 'G', 0, 0, SSFMIN, ANORM, LENDSV-LSV, 1, E( LSV ),
-     $                N, INFO )
-      END IF
+      ELSE
 *
-*     Check for no convergence to an eigenvalue after a total
-*     of N*MAXIT iterations.
+*        Factorize A as L*D*L**T using the lower triangle of A
 *
-      IF( JTOT.EQ.NMAXIT ) THEN
-         DO 150 I = 1, N - 1
-            IF( E( I ).NE.ZERO )
-     $         INFO = INFO + 1
-  150    CONTINUE
-         RETURN
-      END IF
-      GO TO 10
+*        K is the main loop index, increasing from 1 to N in steps of
+*        1 or 2
 *
-*     Order eigenvalues and eigenvectors.
+         K = 1
+   40    CONTINUE
 *
-  160 CONTINUE
-      IF( ICOMPZ.EQ.0 ) THEN
+*        If K > N, exit from loop
 *
-*        Use Quick Sort
+         IF( K.GT.N )
+     $      GO TO 70
+         KSTEP = 1
 *
-         CALL DLASRT( 'I', N, D, INFO )
+*        Determine rows and columns to be interchanged and whether
+*        a 1-by-1 or 2-by-2 pivot block will be used
 *
-      ELSE
+         ABSAKK = CABS1( A( K, K ) )
 *
-*        Use Selection Sort to minimize swaps of eigenvectors
+*        IMAX is the row-index of the largest off-diagonal element in
+*        column K, and COLMAX is its absolute value.
+*        Determine both COLMAX and IMAX.
 *
-         DO 180 II = 2, N
-            I = II - 1
-            K = I
-            P = D( I )
-            DO 170 J = II, N
-               IF( D( J ).LT.P ) THEN
-                  K = J
-                  P = D( J )
-               END IF
-  170       CONTINUE
-            IF( K.NE.I ) THEN
-               D( K ) = D( I )
-               D( I ) = P
-               CALL ZSWAP( N, Z( 1, I ), 1, Z( 1, K ), 1 )
-            END IF
-  180    CONTINUE
-      END IF
-      RETURN
+         IF( K.LT.N ) THEN
+            IMAX = K + IZAMAX( N-K, A( K+1, K ), 1 )
+            COLMAX = CABS1( A( IMAX, K ) )
+         ELSE
+            COLMAX = ZERO
+         END IF
 *
-*     End of ZSTEQR
+         IF( MAX( ABSAKK, COLMAX ).EQ.ZERO .OR. DISNAN(ABSAKK) ) THEN
 *
-      END
-*> \brief \b ZTRCON
+*           Column K is zero or underflow, or contains a NaN:
+*           set INFO and continue
 *
-*  =========== DOCUMENTATION ===========
+            IF( INFO.EQ.0 )
+     $         INFO = K
+            KP = K
+         ELSE
+            IF( ABSAKK.GE.ALPHA*COLMAX ) THEN
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+*              no interchange, use 1-by-1 pivot block
 *
-*> \htmlonly
-*> Download ZTRCON + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/ztrcon.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/ztrcon.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/ztrcon.f"> 
-*> [TXT]</a>
-*> \endhtmlonly 
+               KP = K
+            ELSE
 *
-*  Definition:
-*  ===========
+*              JMAX is the column-index of the largest off-diagonal
+*              element in row IMAX, and ROWMAX is its absolute value
 *
-*       SUBROUTINE ZTRCON( NORM, UPLO, DIAG, N, A, LDA, RCOND, WORK,
-*                          RWORK, INFO )
-* 
-*       .. Scalar Arguments ..
-*       CHARACTER          DIAG, NORM, UPLO
-*       INTEGER            INFO, LDA, N
-*       DOUBLE PRECISION   RCOND
-*       ..
-*       .. Array Arguments ..
-*       DOUBLE PRECISION   RWORK( * )
-*       COMPLEX*16         A( LDA, * ), WORK( * )
-*       ..
-*  
+               JMAX = K - 1 + IZAMAX( IMAX-K, A( IMAX, K ), LDA )
+               ROWMAX = CABS1( A( IMAX, JMAX ) )
+               IF( IMAX.LT.N ) THEN
+                  JMAX = IMAX + IZAMAX( N-IMAX, A( IMAX+1, IMAX ), 1 )
+                  ROWMAX = MAX( ROWMAX, CABS1( A( JMAX, IMAX ) ) )
+               END IF
 *
-*> \par Purpose:
-*  =============
-*>
-*> \verbatim
-*>
-*> ZTRCON estimates the reciprocal of the condition number of a
-*> triangular matrix A, in either the 1-norm or the infinity-norm.
-*>
-*> The norm of A is computed and an estimate is obtained for
-*> norm(inv(A)), then the reciprocal of the condition number is
-*> computed as
-*>    RCOND = 1 / ( norm(A) * norm(inv(A)) ).
-*> \endverbatim
+               IF( ABSAKK.GE.ALPHA*COLMAX*( COLMAX / ROWMAX ) ) THEN
 *
-*  Arguments:
-*  ==========
+*                 no interchange, use 1-by-1 pivot block
 *
-*> \param[in] NORM
-*> \verbatim
-*>          NORM is CHARACTER*1
-*>          Specifies whether the 1-norm condition number or the
-*>          infinity-norm condition number is required:
-*>          = '1' or 'O':  1-norm;
-*>          = 'I':         Infinity-norm.
-*> \endverbatim
-*>
-*> \param[in] UPLO
-*> \verbatim
-*>          UPLO is CHARACTER*1
-*>          = 'U':  A is upper triangular;
-*>          = 'L':  A is lower triangular.
-*> \endverbatim
-*>
-*> \param[in] DIAG
-*> \verbatim
-*>          DIAG is CHARACTER*1
-*>          = 'N':  A is non-unit triangular;
-*>          = 'U':  A is unit triangular.
-*> \endverbatim
-*>
-*> \param[in] N
-*> \verbatim
-*>          N is INTEGER
-*>          The order of the matrix A.  N >= 0.
-*> \endverbatim
-*>
-*> \param[in] A
-*> \verbatim
-*>          A is COMPLEX*16 array, dimension (LDA,N)
-*>          The triangular matrix A.  If UPLO = 'U', the leading N-by-N
-*>          upper triangular part of the array A contains the upper
-*>          triangular matrix, and the strictly lower triangular part of
-*>          A is not referenced.  If UPLO = 'L', the leading N-by-N lower
-*>          triangular part of the array A contains the lower triangular
-*>          matrix, and the strictly upper triangular part of A is not
-*>          referenced.  If DIAG = 'U', the diagonal elements of A are
-*>          also not referenced and are assumed to be 1.
-*> \endverbatim
-*>
-*> \param[in] LDA
-*> \verbatim
-*>          LDA is INTEGER
-*>          The leading dimension of the array A.  LDA >= max(1,N).
-*> \endverbatim
-*>
-*> \param[out] RCOND
-*> \verbatim
-*>          RCOND is DOUBLE PRECISION
-*>          The reciprocal of the condition number of the matrix A,
-*>          computed as RCOND = 1/(norm(A) * norm(inv(A))).
-*> \endverbatim
-*>
-*> \param[out] WORK
-*> \verbatim
-*>          WORK is COMPLEX*16 array, dimension (2*N)
-*> \endverbatim
-*>
-*> \param[out] RWORK
-*> \verbatim
-*>          RWORK is DOUBLE PRECISION array, dimension (N)
-*> \endverbatim
-*>
-*> \param[out] INFO
-*> \verbatim
-*>          INFO is INTEGER
-*>          = 0:  successful exit
-*>          < 0:  if INFO = -i, the i-th argument had an illegal value
-*> \endverbatim
+                  KP = K
+               ELSE IF( CABS1( A( IMAX, IMAX ) ).GE.ALPHA*ROWMAX ) THEN
 *
-*  Authors:
-*  ========
+*                 interchange rows and columns K and IMAX, use 1-by-1
+*                 pivot block
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+                  KP = IMAX
+               ELSE
 *
-*> \date November 2011
+*                 interchange rows and columns K+1 and IMAX, use 2-by-2
+*                 pivot block
 *
-*> \ingroup complex16OTHERcomputational
+                  KP = IMAX
+                  KSTEP = 2
+               END IF
+            END IF
 *
-*  =====================================================================
-      SUBROUTINE ZTRCON( NORM, UPLO, DIAG, N, A, LDA, RCOND, WORK,
-     $                   RWORK, INFO )
+            KK = K + KSTEP - 1
+            IF( KP.NE.KK ) THEN
 *
-*  -- LAPACK computational routine (version 3.4.0) --
-*  -- LAPACK is a software package provided by Univ. of Tennessee,    --
-*  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     November 2011
+*              Interchange rows and columns KK and KP in the trailing
+*              submatrix A(k:n,k:n)
 *
-*     .. Scalar Arguments ..
-      CHARACTER          DIAG, NORM, UPLO
-      INTEGER            INFO, LDA, N
-      DOUBLE PRECISION   RCOND
-*     ..
-*     .. Array Arguments ..
-      DOUBLE PRECISION   RWORK( * )
-      COMPLEX*16         A( LDA, * ), WORK( * )
-*     ..
+               IF( KP.LT.N )
+     $            CALL ZSWAP( N-KP, A( KP+1, KK ), 1, A( KP+1, KP ), 1 )
+               CALL ZSWAP( KP-KK-1, A( KK+1, KK ), 1, A( KP, KK+1 ),
+     $                     LDA )
+               T = A( KK, KK )
+               A( KK, KK ) = A( KP, KP )
+               A( KP, KP ) = T
+               IF( KSTEP.EQ.2 ) THEN
+                  T = A( K+1, K )
+                  A( K+1, K ) = A( KP, K )
+                  A( KP, K ) = T
+               END IF
+            END IF
 *
-*  =====================================================================
+*           Update the trailing submatrix
 *
-*     .. Parameters ..
-      DOUBLE PRECISION   ONE, ZERO
-      PARAMETER          ( ONE = 1.0D+0, ZERO = 0.0D+0 )
-*     ..
-*     .. Local Scalars ..
-      LOGICAL            NOUNIT, ONENRM, UPPER
-      CHARACTER          NORMIN
-      INTEGER            IX, KASE, KASE1
-      DOUBLE PRECISION   AINVNM, ANORM, SCALE, SMLNUM, XNORM
-      COMPLEX*16         ZDUM
-*     ..
-*     .. Local Arrays ..
-      INTEGER            ISAVE( 3 )
-*     ..
-*     .. External Functions ..
-      LOGICAL            LSAME
-      INTEGER            IZAMAX
-      DOUBLE PRECISION   DLAMCH, ZLANTR
-      EXTERNAL           LSAME, IZAMAX, DLAMCH, ZLANTR
-*     ..
-*     .. External Subroutines ..
-      EXTERNAL           XERBLA, ZDRSCL, ZLACN2, ZLATRS
-*     ..
-*     .. Intrinsic Functions ..
-      INTRINSIC          ABS, DBLE, DIMAG, MAX
-*     ..
-*     .. Statement Functions ..
-      DOUBLE PRECISION   CABS1
-*     ..
-*     .. Statement Function definitions ..
-      CABS1( ZDUM ) = ABS( DBLE( ZDUM ) ) + ABS( DIMAG( ZDUM ) )
-*     ..
-*     .. Executable Statements ..
+            IF( KSTEP.EQ.1 ) THEN
 *
-*     Test the input parameters.
+*              1-by-1 pivot block D(k): column k now holds
 *
-      INFO = 0
-      UPPER = LSAME( UPLO, 'U' )
-      ONENRM = NORM.EQ.'1' .OR. LSAME( NORM, 'O' )
-      NOUNIT = LSAME( DIAG, 'N' )
+*              W(k) = L(k)*D(k)
 *
-      IF( .NOT.ONENRM .AND. .NOT.LSAME( NORM, 'I' ) ) THEN
-         INFO = -1
-      ELSE IF( .NOT.UPPER .AND. .NOT.LSAME( UPLO, 'L' ) ) THEN
-         INFO = -2
-      ELSE IF( .NOT.NOUNIT .AND. .NOT.LSAME( DIAG, 'U' ) ) THEN
-         INFO = -3
-      ELSE IF( N.LT.0 ) THEN
-         INFO = -4
-      ELSE IF( LDA.LT.MAX( 1, N ) ) THEN
-         INFO = -6
-      END IF
-      IF( INFO.NE.0 ) THEN
-         CALL XERBLA( 'ZTRCON', -INFO )
-         RETURN
-      END IF
+*              where L(k) is the k-th column of L
 *
-*     Quick return if possible
+               IF( K.LT.N ) THEN
 *
-      IF( N.EQ.0 ) THEN
-         RCOND = ONE
-         RETURN
-      END IF
+*                 Perform a rank-1 update of A(k+1:n,k+1:n) as
 *
-      RCOND = ZERO
-      SMLNUM = DLAMCH( 'Safe minimum' )*DBLE( MAX( 1, N ) )
+*                 A := A - L(k)*D(k)*L(k)**T = A - W(k)*(1/D(k))*W(k)**T
 *
-*     Compute the norm of the triangular matrix A.
+                  R1 = CONE / A( K, K )
+                  CALL ZSYR( UPLO, N-K, -R1, A( K+1, K ), 1,
+     $                       A( K+1, K+1 ), LDA )
 *
-      ANORM = ZLANTR( NORM, UPLO, DIAG, N, N, A, LDA, RWORK )
+*                 Store L(k) in column K
 *
-*     Continue only if ANORM > 0.
+                  CALL ZSCAL( N-K, R1, A( K+1, K ), 1 )
+               END IF
+            ELSE
 *
-      IF( ANORM.GT.ZERO ) THEN
+*              2-by-2 pivot block D(k)
 *
-*        Estimate the norm of the inverse of A.
+               IF( K.LT.N-1 ) THEN
 *
-         AINVNM = ZERO
-         NORMIN = 'N'
-         IF( ONENRM ) THEN
-            KASE1 = 1
-         ELSE
-            KASE1 = 2
-         END IF
-         KASE = 0
-   10    CONTINUE
-         CALL ZLACN2( N, WORK( N+1 ), WORK, AINVNM, KASE, ISAVE )
-         IF( KASE.NE.0 ) THEN
-            IF( KASE.EQ.KASE1 ) THEN
+*                 Perform a rank-2 update of A(k+2:n,k+2:n) as
 *
-*              Multiply by inv(A).
+*                 A := A - ( L(k) L(k+1) )*D(k)*( L(k) L(k+1) )**T
+*                    = A - ( W(k) W(k+1) )*inv(D(k))*( W(k) W(k+1) )**T
 *
-               CALL ZLATRS( UPLO, 'No transpose', DIAG, NORMIN, N, A,
-     $                      LDA, WORK, SCALE, RWORK, INFO )
-            ELSE
+*                 where L(k) and L(k+1) are the k-th and (k+1)-th
+*                 columns of L
 *
-*              Multiply by inv(A**H).
+                  D21 = A( K+1, K )
+                  D11 = A( K+1, K+1 ) / D21
+                  D22 = A( K, K ) / D21
+                  T = CONE / ( D11*D22-CONE )
+                  D21 = T / D21
 *
-               CALL ZLATRS( UPLO, 'Conjugate transpose', DIAG, NORMIN,
-     $                      N, A, LDA, WORK, SCALE, RWORK, INFO )
+                  DO 60 J = K + 2, N
+                     WK = D21*( D11*A( J, K )-A( J, K+1 ) )
+                     WKP1 = D21*( D22*A( J, K+1 )-A( J, K ) )
+                     DO 50 I = J, N
+                        A( I, J ) = A( I, J ) - A( I, K )*WK -
+     $                              A( I, K+1 )*WKP1
+   50                CONTINUE
+                     A( J, K ) = WK
+                     A( J, K+1 ) = WKP1
+   60             CONTINUE
+               END IF
             END IF
-            NORMIN = 'Y'
+         END IF
 *
-*           Multiply by 1/SCALE if doing so will not cause overflow.
+*        Store details of the interchanges in IPIV
 *
-            IF( SCALE.NE.ONE ) THEN
-               IX = IZAMAX( N, WORK, 1 )
-               XNORM = CABS1( WORK( IX ) )
-               IF( SCALE.LT.XNORM*SMLNUM .OR. SCALE.EQ.ZERO )
-     $            GO TO 20
-               CALL ZDRSCL( N, SCALE, WORK, 1 )
-            END IF
-            GO TO 10
+         IF( KSTEP.EQ.1 ) THEN
+            IPIV( K ) = KP
+         ELSE
+            IPIV( K ) = -KP
+            IPIV( K+1 ) = -KP
          END IF
 *
-*        Compute the estimate of the reciprocal condition number.
+*        Increase K and return to the start of the main loop
+*
+         K = K + KSTEP
+         GO TO 40
 *
-         IF( AINVNM.NE.ZERO )
-     $      RCOND = ( ONE / ANORM ) / AINVNM
       END IF
 *
-   20 CONTINUE
+   70 CONTINUE
       RETURN
 *
-*     End of ZTRCON
+*     End of ZSYTF2
 *
       END
-*> \brief \b ZTREVC
+*> \brief \b ZSYTRF
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download ZTREVC + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/ztrevc.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/ztrevc.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/ztrevc.f"> 
+*> Download ZSYTRF + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/zsytrf.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/zsytrf.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/zsytrf.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
-*       SUBROUTINE ZTREVC( SIDE, HOWMNY, SELECT, N, T, LDT, VL, LDVL, VR,
-*                          LDVR, MM, M, WORK, RWORK, INFO )
-* 
+*       SUBROUTINE ZSYTRF( UPLO, N, A, LDA, IPIV, WORK, LWORK, INFO )
+*
 *       .. Scalar Arguments ..
-*       CHARACTER          HOWMNY, SIDE
-*       INTEGER            INFO, LDT, LDVL, LDVR, M, MM, N
+*       CHARACTER          UPLO
+*       INTEGER            INFO, LDA, LWORK, N
 *       ..
 *       .. Array Arguments ..
-*       LOGICAL            SELECT( * )
-*       DOUBLE PRECISION   RWORK( * )
-*       COMPLEX*16         T( LDT, * ), VL( LDVL, * ), VR( LDVR, * ),
-*      $                   WORK( * )
+*       INTEGER            IPIV( * )
+*       COMPLEX*16         A( LDA, * ), WORK( * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
 *>
 *> \verbatim
 *>
-*> ZTREVC computes some or all of the right and/or left eigenvectors of
-*> a complex upper triangular matrix T.
-*> Matrices of this type are produced by the Schur factorization of
-*> a complex general matrix:  A = Q*T*Q**H, as computed by ZHSEQR.
-*> 
-*> The right eigenvector x and the left eigenvector y of T corresponding
-*> to an eigenvalue w are defined by:
-*> 
-*>              T*x = w*x,     (y**H)*T = w*(y**H)
-*> 
-*> where y**H denotes the conjugate transpose of the vector y.
-*> The eigenvalues are not input to this routine, but are read directly
-*> from the diagonal of T.
-*> 
-*> This routine returns the matrices X and/or Y of right and left
-*> eigenvectors of T, or the products Q*X and/or Q*Y, where Q is an
-*> input matrix.  If Q is the unitary factor that reduces a matrix A to
-*> Schur form T, then Q*X and Q*Y are the matrices of right and left
-*> eigenvectors of A.
+*> ZSYTRF computes the factorization of a complex symmetric matrix A
+*> using the Bunch-Kaufman diagonal pivoting method.  The form of the
+*> factorization is
+*>
+*>    A = U*D*U**T  or  A = L*D*L**T
+*>
+*> where U (or L) is a product of permutation and unit upper (lower)
+*> triangular matrices, and D is symmetric and block diagonal with
+*> with 1-by-1 and 2-by-2 diagonal blocks.
+*>
+*> This is the blocked version of the algorithm, calling Level 3 BLAS.
 *> \endverbatim
 *
 *  Arguments:
 *  ==========
 *
-*> \param[in] SIDE
-*> \verbatim
-*>          SIDE is CHARACTER*1
-*>          = 'R':  compute right eigenvectors only;
-*>          = 'L':  compute left eigenvectors only;
-*>          = 'B':  compute both right and left eigenvectors.
-*> \endverbatim
-*>
-*> \param[in] HOWMNY
-*> \verbatim
-*>          HOWMNY is CHARACTER*1
-*>          = 'A':  compute all right and/or left eigenvectors;
-*>          = 'B':  compute all right and/or left eigenvectors,
-*>                  backtransformed using the matrices supplied in
-*>                  VR and/or VL;
-*>          = 'S':  compute selected right and/or left eigenvectors,
-*>                  as indicated by the logical array SELECT.
-*> \endverbatim
-*>
-*> \param[in] SELECT
+*> \param[in] UPLO
 *> \verbatim
-*>          SELECT is LOGICAL array, dimension (N)
-*>          If HOWMNY = 'S', SELECT specifies the eigenvectors to be
-*>          computed.
-*>          The eigenvector corresponding to the j-th eigenvalue is
-*>          computed if SELECT(j) = .TRUE..
-*>          Not referenced if HOWMNY = 'A' or 'B'.
+*>          UPLO is CHARACTER*1
+*>          = 'U':  Upper triangle of A is stored;
+*>          = 'L':  Lower triangle of A is stored.
 *> \endverbatim
 *>
 *> \param[in] N
 *> \verbatim
 *>          N is INTEGER
-*>          The order of the matrix T. N >= 0.
-*> \endverbatim
-*>
-*> \param[in,out] T
-*> \verbatim
-*>          T is COMPLEX*16 array, dimension (LDT,N)
-*>          The upper triangular matrix T.  T is modified, but restored
-*>          on exit.
-*> \endverbatim
-*>
-*> \param[in] LDT
-*> \verbatim
-*>          LDT is INTEGER
-*>          The leading dimension of the array T. LDT >= max(1,N).
-*> \endverbatim
-*>
-*> \param[in,out] VL
-*> \verbatim
-*>          VL is COMPLEX*16 array, dimension (LDVL,MM)
-*>          On entry, if SIDE = 'L' or 'B' and HOWMNY = 'B', VL must
-*>          contain an N-by-N matrix Q (usually the unitary matrix Q of
-*>          Schur vectors returned by ZHSEQR).
-*>          On exit, if SIDE = 'L' or 'B', VL contains:
-*>          if HOWMNY = 'A', the matrix Y of left eigenvectors of T;
-*>          if HOWMNY = 'B', the matrix Q*Y;
-*>          if HOWMNY = 'S', the left eigenvectors of T specified by
-*>                           SELECT, stored consecutively in the columns
-*>                           of VL, in the same order as their
-*>                           eigenvalues.
-*>          Not referenced if SIDE = 'R'.
-*> \endverbatim
-*>
-*> \param[in] LDVL
-*> \verbatim
-*>          LDVL is INTEGER
-*>          The leading dimension of the array VL.  LDVL >= 1, and if
-*>          SIDE = 'L' or 'B', LDVL >= N.
+*>          The order of the matrix A.  N >= 0.
 *> \endverbatim
 *>
-*> \param[in,out] VR
+*> \param[in,out] A
 *> \verbatim
-*>          VR is COMPLEX*16 array, dimension (LDVR,MM)
-*>          On entry, if SIDE = 'R' or 'B' and HOWMNY = 'B', VR must
-*>          contain an N-by-N matrix Q (usually the unitary matrix Q of
-*>          Schur vectors returned by ZHSEQR).
-*>          On exit, if SIDE = 'R' or 'B', VR contains:
-*>          if HOWMNY = 'A', the matrix X of right eigenvectors of T;
-*>          if HOWMNY = 'B', the matrix Q*X;
-*>          if HOWMNY = 'S', the right eigenvectors of T specified by
-*>                           SELECT, stored consecutively in the columns
-*>                           of VR, in the same order as their
-*>                           eigenvalues.
-*>          Not referenced if SIDE = 'L'.
-*> \endverbatim
+*>          A is COMPLEX*16 array, dimension (LDA,N)
+*>          On entry, the symmetric matrix A.  If UPLO = 'U', the leading
+*>          N-by-N upper triangular part of A contains the upper
+*>          triangular part of the matrix A, and the strictly lower
+*>          triangular part of A is not referenced.  If UPLO = 'L', the
+*>          leading N-by-N lower triangular part of A contains the lower
+*>          triangular part of the matrix A, and the strictly upper
+*>          triangular part of A is not referenced.
 *>
-*> \param[in] LDVR
-*> \verbatim
-*>          LDVR is INTEGER
-*>          The leading dimension of the array VR.  LDVR >= 1, and if
-*>          SIDE = 'R' or 'B'; LDVR >= N.
+*>          On exit, the block diagonal matrix D and the multipliers used
+*>          to obtain the factor U or L (see below for further details).
 *> \endverbatim
 *>
-*> \param[in] MM
+*> \param[in] LDA
 *> \verbatim
-*>          MM is INTEGER
-*>          The number of columns in the arrays VL and/or VR. MM >= M.
+*>          LDA is INTEGER
+*>          The leading dimension of the array A.  LDA >= max(1,N).
 *> \endverbatim
 *>
-*> \param[out] M
+*> \param[out] IPIV
 *> \verbatim
-*>          M is INTEGER
-*>          The number of columns in the arrays VL and/or VR actually
-*>          used to store the eigenvectors.  If HOWMNY = 'A' or 'B', M
-*>          is set to N.  Each selected eigenvector occupies one
-*>          column.
+*>          IPIV is INTEGER array, dimension (N)
+*>          Details of the interchanges and the block structure of D.
+*>          If IPIV(k) > 0, then rows and columns k and IPIV(k) were
+*>          interchanged and D(k,k) is a 1-by-1 diagonal block.
+*>          If UPLO = 'U' and IPIV(k) = IPIV(k-1) < 0, then rows and
+*>          columns k-1 and -IPIV(k) were interchanged and D(k-1:k,k-1:k)
+*>          is a 2-by-2 diagonal block.  If UPLO = 'L' and IPIV(k) =
+*>          IPIV(k+1) < 0, then rows and columns k+1 and -IPIV(k) were
+*>          interchanged and D(k:k+1,k:k+1) is a 2-by-2 diagonal block.
 *> \endverbatim
 *>
 *> \param[out] WORK
 *> \verbatim
-*>          WORK is COMPLEX*16 array, dimension (2*N)
+*>          WORK is COMPLEX*16 array, dimension (MAX(1,LWORK))
+*>          On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
 *> \endverbatim
 *>
-*> \param[out] RWORK
+*> \param[in] LWORK
 *> \verbatim
-*>          RWORK is DOUBLE PRECISION array, dimension (N)
+*>          LWORK is INTEGER
+*>          The length of WORK.  LWORK >=1.  For best performance
+*>          LWORK >= N*NB, where NB is the block size returned by ILAENV.
+*>
+*>          If LWORK = -1, then a workspace query is assumed; the routine
+*>          only calculates the optimal size of the WORK array, returns
+*>          this value as the first entry of the WORK array, and no error
+*>          message related to LWORK is issued by XERBLA.
 *> \endverbatim
 *>
 *> \param[out] INFO
@@ -25982,1286 +43049,2264 @@
 *>          INFO is INTEGER
 *>          = 0:  successful exit
 *>          < 0:  if INFO = -i, the i-th argument had an illegal value
+*>          > 0:  if INFO = i, D(i,i) is exactly zero.  The factorization
+*>                has been completed, but the block diagonal matrix D is
+*>                exactly singular, and division by zero will occur if it
+*>                is used to solve a system of equations.
 *> \endverbatim
 *
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date November 2011
+*> \date December 2016
 *
-*> \ingroup complex16OTHERcomputational
+*> \ingroup complex16SYcomputational
 *
 *> \par Further Details:
 *  =====================
 *>
 *> \verbatim
 *>
-*>  The algorithm used in this program is basically backward (forward)
-*>  substitution, with scaling to make the the code robust against
-*>  possible overflow.
+*>  If UPLO = 'U', then A = U*D*U**T, where
+*>     U = P(n)*U(n)* ... *P(k)U(k)* ...,
+*>  i.e., U is a product of terms P(k)*U(k), where k decreases from n to
+*>  1 in steps of 1 or 2, and D is a block diagonal matrix with 1-by-1
+*>  and 2-by-2 diagonal blocks D(k).  P(k) is a permutation matrix as
+*>  defined by IPIV(k), and U(k) is a unit upper triangular matrix, such
+*>  that if the diagonal block D(k) is of order s (s = 1 or 2), then
 *>
-*>  Each eigenvector is normalized so that the element of largest
-*>  magnitude has magnitude 1; here the magnitude of a complex number
-*>  (x,y) is taken to be |x| + |y|.
+*>             (   I    v    0   )   k-s
+*>     U(k) =  (   0    I    0   )   s
+*>             (   0    0    I   )   n-k
+*>                k-s   s   n-k
+*>
+*>  If s = 1, D(k) overwrites A(k,k), and v overwrites A(1:k-1,k).
+*>  If s = 2, the upper triangle of D(k) overwrites A(k-1,k-1), A(k-1,k),
+*>  and A(k,k), and v overwrites A(1:k-2,k-1:k).
+*>
+*>  If UPLO = 'L', then A = L*D*L**T, where
+*>     L = P(1)*L(1)* ... *P(k)*L(k)* ...,
+*>  i.e., L is a product of terms P(k)*L(k), where k increases from 1 to
+*>  n in steps of 1 or 2, and D is a block diagonal matrix with 1-by-1
+*>  and 2-by-2 diagonal blocks D(k).  P(k) is a permutation matrix as
+*>  defined by IPIV(k), and L(k) is a unit lower triangular matrix, such
+*>  that if the diagonal block D(k) is of order s (s = 1 or 2), then
+*>
+*>             (   I    0     0   )  k-1
+*>     L(k) =  (   0    I     0   )  s
+*>             (   0    v     I   )  n-k-s+1
+*>                k-1   s  n-k-s+1
+*>
+*>  If s = 1, D(k) overwrites A(k,k), and v overwrites A(k+1:n,k).
+*>  If s = 2, the lower triangle of D(k) overwrites A(k,k), A(k+1,k),
+*>  and A(k+1,k+1), and v overwrites A(k+2:n,k:k+1).
 *> \endverbatim
 *>
 *  =====================================================================
-      SUBROUTINE ZTREVC( SIDE, HOWMNY, SELECT, N, T, LDT, VL, LDVL, VR,
-     $                   LDVR, MM, M, WORK, RWORK, INFO )
+      SUBROUTINE ZSYTRF( UPLO, N, A, LDA, IPIV, WORK, LWORK, INFO )
 *
-*  -- LAPACK computational routine (version 3.4.0) --
+*  -- LAPACK computational routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     November 2011
+*     December 2016
 *
 *     .. Scalar Arguments ..
-      CHARACTER          HOWMNY, SIDE
-      INTEGER            INFO, LDT, LDVL, LDVR, M, MM, N
+      CHARACTER          UPLO
+      INTEGER            INFO, LDA, LWORK, N
 *     ..
 *     .. Array Arguments ..
-      LOGICAL            SELECT( * )
-      DOUBLE PRECISION   RWORK( * )
-      COMPLEX*16         T( LDT, * ), VL( LDVL, * ), VR( LDVR, * ),
-     $                   WORK( * )
+      INTEGER            IPIV( * )
+      COMPLEX*16         A( LDA, * ), WORK( * )
 *     ..
 *
 *  =====================================================================
 *
-*     .. Parameters ..
-      DOUBLE PRECISION   ZERO, ONE
-      PARAMETER          ( ZERO = 0.0D+0, ONE = 1.0D+0 )
-      COMPLEX*16         CMZERO, CMONE
-      PARAMETER          ( CMZERO = ( 0.0D+0, 0.0D+0 ),
-     $                   CMONE = ( 1.0D+0, 0.0D+0 ) )
-*     ..
 *     .. Local Scalars ..
-      LOGICAL            ALLV, BOTHV, LEFTV, OVER, RIGHTV, SOMEV
-      INTEGER            I, II, IS, J, K, KI
-      DOUBLE PRECISION   OVFL, REMAX, SCALE, SMIN, SMLNUM, ULP, UNFL
-      COMPLEX*16         CDUM
+      LOGICAL            LQUERY, UPPER
+      INTEGER            IINFO, IWS, J, K, KB, LDWORK, LWKOPT, NB, NBMIN
 *     ..
 *     .. External Functions ..
       LOGICAL            LSAME
-      INTEGER            IZAMAX
-      DOUBLE PRECISION   DLAMCH, DZASUM
-      EXTERNAL           LSAME, IZAMAX, DLAMCH, DZASUM
+      INTEGER            ILAENV
+      EXTERNAL           LSAME, ILAENV
 *     ..
 *     .. External Subroutines ..
-      EXTERNAL           XERBLA, ZCOPY, ZDSCAL, ZGEMV, ZLATRS
+      EXTERNAL           XERBLA, ZLASYF, ZSYTF2
 *     ..
 *     .. Intrinsic Functions ..
-      INTRINSIC          ABS, DBLE, DCMPLX, DCONJG, DIMAG, MAX
-*     ..
-*     .. Statement Functions ..
-      DOUBLE PRECISION   CABS1
-*     ..
-*     .. Statement Function definitions ..
-      CABS1( CDUM ) = ABS( DBLE( CDUM ) ) + ABS( DIMAG( CDUM ) )
+      INTRINSIC          MAX
 *     ..
 *     .. Executable Statements ..
 *
-*     Decode and test the input parameters
-*
-      BOTHV = LSAME( SIDE, 'B' )
-      RIGHTV = LSAME( SIDE, 'R' ) .OR. BOTHV
-      LEFTV = LSAME( SIDE, 'L' ) .OR. BOTHV
-*
-      ALLV = LSAME( HOWMNY, 'A' )
-      OVER = LSAME( HOWMNY, 'B' )
-      SOMEV = LSAME( HOWMNY, 'S' )
-*
-*     Set M to the number of columns required to store the selected
-*     eigenvectors.
-*
-      IF( SOMEV ) THEN
-         M = 0
-         DO 10 J = 1, N
-            IF( SELECT( J ) )
-     $         M = M + 1
-   10    CONTINUE
-      ELSE
-         M = N
-      END IF
+*     Test the input parameters.
 *
       INFO = 0
-      IF( .NOT.RIGHTV .AND. .NOT.LEFTV ) THEN
+      UPPER = LSAME( UPLO, 'U' )
+      LQUERY = ( LWORK.EQ.-1 )
+      IF( .NOT.UPPER .AND. .NOT.LSAME( UPLO, 'L' ) ) THEN
          INFO = -1
-      ELSE IF( .NOT.ALLV .AND. .NOT.OVER .AND. .NOT.SOMEV ) THEN
-         INFO = -2
       ELSE IF( N.LT.0 ) THEN
+         INFO = -2
+      ELSE IF( LDA.LT.MAX( 1, N ) ) THEN
          INFO = -4
-      ELSE IF( LDT.LT.MAX( 1, N ) ) THEN
-         INFO = -6
-      ELSE IF( LDVL.LT.1 .OR. ( LEFTV .AND. LDVL.LT.N ) ) THEN
-         INFO = -8
-      ELSE IF( LDVR.LT.1 .OR. ( RIGHTV .AND. LDVR.LT.N ) ) THEN
-         INFO = -10
-      ELSE IF( MM.LT.M ) THEN
-         INFO = -11
-      END IF
-      IF( INFO.NE.0 ) THEN
-         CALL XERBLA( 'ZTREVC', -INFO )
-         RETURN
+      ELSE IF( LWORK.LT.1 .AND. .NOT.LQUERY ) THEN
+         INFO = -7
       END IF
 *
-*     Quick return if possible.
-*
-      IF( N.EQ.0 )
-     $   RETURN
-*
-*     Set the constants to control overflow.
-*
-      UNFL = DLAMCH( 'Safe minimum' )
-      OVFL = ONE / UNFL
-      CALL DLABAD( UNFL, OVFL )
-      ULP = DLAMCH( 'Precision' )
-      SMLNUM = UNFL*( N / ULP )
-*
-*     Store the diagonal elements of T in working array WORK.
-*
-      DO 20 I = 1, N
-         WORK( I+N ) = T( I, I )
-   20 CONTINUE
+      IF( INFO.EQ.0 ) THEN
 *
-*     Compute 1-norm of each column of strictly upper triangular
-*     part of T to control overflow in triangular solver.
+*        Determine the block size
 *
-      RWORK( 1 ) = ZERO
-      DO 30 J = 2, N
-         RWORK( J ) = DZASUM( J-1, T( 1, J ), 1 )
-   30 CONTINUE
+         NB = ILAENV( 1, 'ZSYTRF', UPLO, N, -1, -1, -1 )
+         LWKOPT = N*NB
+         WORK( 1 ) = LWKOPT
+      END IF
 *
-      IF( RIGHTV ) THEN
+      IF( INFO.NE.0 ) THEN
+         CALL XERBLA( 'ZSYTRF', -INFO )
+         RETURN
+      ELSE IF( LQUERY ) THEN
+         RETURN
+      END IF
 *
-*        Compute right eigenvectors.
+      NBMIN = 2
+      LDWORK = N
+      IF( NB.GT.1 .AND. NB.LT.N ) THEN
+         IWS = LDWORK*NB
+         IF( LWORK.LT.IWS ) THEN
+            NB = MAX( LWORK / LDWORK, 1 )
+            NBMIN = MAX( 2, ILAENV( 2, 'ZSYTRF', UPLO, N, -1, -1, -1 ) )
+         END IF
+      ELSE
+         IWS = 1
+      END IF
+      IF( NB.LT.NBMIN )
+     $   NB = N
 *
-         IS = M
-         DO 80 KI = N, 1, -1
+      IF( UPPER ) THEN
 *
-            IF( SOMEV ) THEN
-               IF( .NOT.SELECT( KI ) )
-     $            GO TO 80
-            END IF
-            SMIN = MAX( ULP*( CABS1( T( KI, KI ) ) ), SMLNUM )
+*        Factorize A as U*D*U**T using the upper triangle of A
 *
-            WORK( 1 ) = CMONE
+*        K is the main loop index, decreasing from N to 1 in steps of
+*        KB, where KB is the number of columns factorized by ZLASYF;
+*        KB is either NB or NB-1, or K for the last block
 *
-*           Form right-hand side.
+         K = N
+   10    CONTINUE
 *
-            DO 40 K = 1, KI - 1
-               WORK( K ) = -T( K, KI )
-   40       CONTINUE
+*        If K < 1, exit from loop
 *
-*           Solve the triangular system:
-*              (T(1:KI-1,1:KI-1) - T(KI,KI))*X = SCALE*WORK.
+         IF( K.LT.1 )
+     $      GO TO 40
 *
-            DO 50 K = 1, KI - 1
-               T( K, K ) = T( K, K ) - T( KI, KI )
-               IF( CABS1( T( K, K ) ).LT.SMIN )
-     $            T( K, K ) = SMIN
-   50       CONTINUE
+         IF( K.GT.NB ) THEN
 *
-            IF( KI.GT.1 ) THEN
-               CALL ZLATRS( 'Upper', 'No transpose', 'Non-unit', 'Y',
-     $                      KI-1, T, LDT, WORK( 1 ), SCALE, RWORK,
-     $                      INFO )
-               WORK( KI ) = SCALE
-            END IF
+*           Factorize columns k-kb+1:k of A and use blocked code to
+*           update columns 1:k-kb
 *
-*           Copy the vector x or Q*x to VR and normalize.
+            CALL ZLASYF( UPLO, K, NB, KB, A, LDA, IPIV, WORK, N, IINFO )
+         ELSE
 *
-            IF( .NOT.OVER ) THEN
-               CALL ZCOPY( KI, WORK( 1 ), 1, VR( 1, IS ), 1 )
+*           Use unblocked code to factorize columns 1:k of A
 *
-               II = IZAMAX( KI, VR( 1, IS ), 1 )
-               REMAX = ONE / CABS1( VR( II, IS ) )
-               CALL ZDSCAL( KI, REMAX, VR( 1, IS ), 1 )
+            CALL ZSYTF2( UPLO, K, A, LDA, IPIV, IINFO )
+            KB = K
+         END IF
 *
-               DO 60 K = KI + 1, N
-                  VR( K, IS ) = CMZERO
-   60          CONTINUE
-            ELSE
-               IF( KI.GT.1 )
-     $            CALL ZGEMV( 'N', N, KI-1, CMONE, VR, LDVR, WORK( 1 ),
-     $                        1, DCMPLX( SCALE ), VR( 1, KI ), 1 )
+*        Set INFO on the first occurrence of a zero pivot
 *
-               II = IZAMAX( N, VR( 1, KI ), 1 )
-               REMAX = ONE / CABS1( VR( II, KI ) )
-               CALL ZDSCAL( N, REMAX, VR( 1, KI ), 1 )
-            END IF
+         IF( INFO.EQ.0 .AND. IINFO.GT.0 )
+     $      INFO = IINFO
 *
-*           Set back the original diagonal elements of T.
+*        Decrease K and return to the start of the main loop
 *
-            DO 70 K = 1, KI - 1
-               T( K, K ) = WORK( K+N )
-   70       CONTINUE
+         K = K - KB
+         GO TO 10
 *
-            IS = IS - 1
-   80    CONTINUE
-      END IF
+      ELSE
 *
-      IF( LEFTV ) THEN
+*        Factorize A as L*D*L**T using the lower triangle of A
 *
-*        Compute left eigenvectors.
+*        K is the main loop index, increasing from 1 to N in steps of
+*        KB, where KB is the number of columns factorized by ZLASYF;
+*        KB is either NB or NB-1, or N-K+1 for the last block
 *
-         IS = 1
-         DO 130 KI = 1, N
+         K = 1
+   20    CONTINUE
 *
-            IF( SOMEV ) THEN
-               IF( .NOT.SELECT( KI ) )
-     $            GO TO 130
-            END IF
-            SMIN = MAX( ULP*( CABS1( T( KI, KI ) ) ), SMLNUM )
+*        If K > N, exit from loop
 *
-            WORK( N ) = CMONE
+         IF( K.GT.N )
+     $      GO TO 40
 *
-*           Form right-hand side.
+         IF( K.LE.N-NB ) THEN
 *
-            DO 90 K = KI + 1, N
-               WORK( K ) = -DCONJG( T( KI, K ) )
-   90       CONTINUE
+*           Factorize columns k:k+kb-1 of A and use blocked code to
+*           update columns k+kb:n
 *
-*           Solve the triangular system:
-*              (T(KI+1:N,KI+1:N) - T(KI,KI))**H * X = SCALE*WORK.
+            CALL ZLASYF( UPLO, N-K+1, NB, KB, A( K, K ), LDA, IPIV( K ),
+     $                   WORK, N, IINFO )
+         ELSE
 *
-            DO 100 K = KI + 1, N
-               T( K, K ) = T( K, K ) - T( KI, KI )
-               IF( CABS1( T( K, K ) ).LT.SMIN )
-     $            T( K, K ) = SMIN
-  100       CONTINUE
+*           Use unblocked code to factorize columns k:n of A
 *
-            IF( KI.LT.N ) THEN
-               CALL ZLATRS( 'Upper', 'Conjugate transpose', 'Non-unit',
-     $                      'Y', N-KI, T( KI+1, KI+1 ), LDT,
-     $                      WORK( KI+1 ), SCALE, RWORK, INFO )
-               WORK( KI ) = SCALE
-            END IF
+            CALL ZSYTF2( UPLO, N-K+1, A( K, K ), LDA, IPIV( K ), IINFO )
+            KB = N - K + 1
+         END IF
 *
-*           Copy the vector x or Q*x to VL and normalize.
+*        Set INFO on the first occurrence of a zero pivot
 *
-            IF( .NOT.OVER ) THEN
-               CALL ZCOPY( N-KI+1, WORK( KI ), 1, VL( KI, IS ), 1 )
+         IF( INFO.EQ.0 .AND. IINFO.GT.0 )
+     $      INFO = IINFO + K - 1
 *
-               II = IZAMAX( N-KI+1, VL( KI, IS ), 1 ) + KI - 1
-               REMAX = ONE / CABS1( VL( II, IS ) )
-               CALL ZDSCAL( N-KI+1, REMAX, VL( KI, IS ), 1 )
+*        Adjust IPIV
 *
-               DO 110 K = 1, KI - 1
-                  VL( K, IS ) = CMZERO
-  110          CONTINUE
+         DO 30 J = K, K + KB - 1
+            IF( IPIV( J ).GT.0 ) THEN
+               IPIV( J ) = IPIV( J ) + K - 1
             ELSE
-               IF( KI.LT.N )
-     $            CALL ZGEMV( 'N', N, N-KI, CMONE, VL( 1, KI+1 ), LDVL,
-     $                        WORK( KI+1 ), 1, DCMPLX( SCALE ),
-     $                        VL( 1, KI ), 1 )
-*
-               II = IZAMAX( N, VL( 1, KI ), 1 )
-               REMAX = ONE / CABS1( VL( II, KI ) )
-               CALL ZDSCAL( N, REMAX, VL( 1, KI ), 1 )
+               IPIV( J ) = IPIV( J ) - K + 1
             END IF
+   30    CONTINUE
 *
-*           Set back the original diagonal elements of T.
+*        Increase K and return to the start of the main loop
 *
-            DO 120 K = KI + 1, N
-               T( K, K ) = WORK( K+N )
-  120       CONTINUE
+         K = K + KB
+         GO TO 20
 *
-            IS = IS + 1
-  130    CONTINUE
       END IF
 *
+   40 CONTINUE
+      WORK( 1 ) = LWKOPT
       RETURN
 *
-*     End of ZTREVC
+*     End of ZSYTRF
 *
       END
-*> \brief \b ZTREXC
+*> \brief \b ZSYTRI
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download ZTREXC + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/ztrexc.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/ztrexc.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/ztrexc.f"> 
+*> Download ZSYTRI + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/zsytri.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/zsytri.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/zsytri.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
-*       SUBROUTINE ZTREXC( COMPQ, N, T, LDT, Q, LDQ, IFST, ILST, INFO )
-* 
+*       SUBROUTINE ZSYTRI( UPLO, N, A, LDA, IPIV, WORK, INFO )
+*
 *       .. Scalar Arguments ..
-*       CHARACTER          COMPQ
-*       INTEGER            IFST, ILST, INFO, LDQ, LDT, N
+*       CHARACTER          UPLO
+*       INTEGER            INFO, LDA, N
 *       ..
 *       .. Array Arguments ..
-*       COMPLEX*16         Q( LDQ, * ), T( LDT, * )
+*       INTEGER            IPIV( * )
+*       COMPLEX*16         A( LDA, * ), WORK( * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
 *>
 *> \verbatim
 *>
-*> ZTREXC reorders the Schur factorization of a complex matrix
-*> A = Q*T*Q**H, so that the diagonal element of T with row index IFST
-*> is moved to row ILST.
-*>
-*> The Schur form T is reordered by a unitary similarity transformation
-*> Z**H*T*Z, and optionally the matrix Q of Schur vectors is updated by
-*> postmultplying it with Z.
+*> ZSYTRI computes the inverse of a complex symmetric indefinite matrix
+*> A using the factorization A = U*D*U**T or A = L*D*L**T computed by
+*> ZSYTRF.
 *> \endverbatim
 *
 *  Arguments:
 *  ==========
 *
-*> \param[in] COMPQ
+*> \param[in] UPLO
 *> \verbatim
-*>          COMPQ is CHARACTER*1
-*>          = 'V':  update the matrix Q of Schur vectors;
-*>          = 'N':  do not update Q.
+*>          UPLO is CHARACTER*1
+*>          Specifies whether the details of the factorization are stored
+*>          as an upper or lower triangular matrix.
+*>          = 'U':  Upper triangular, form is A = U*D*U**T;
+*>          = 'L':  Lower triangular, form is A = L*D*L**T.
 *> \endverbatim
 *>
 *> \param[in] N
 *> \verbatim
 *>          N is INTEGER
-*>          The order of the matrix T. N >= 0.
-*> \endverbatim
-*>
-*> \param[in,out] T
-*> \verbatim
-*>          T is COMPLEX*16 array, dimension (LDT,N)
-*>          On entry, the upper triangular matrix T.
-*>          On exit, the reordered upper triangular matrix.
+*>          The order of the matrix A.  N >= 0.
 *> \endverbatim
 *>
-*> \param[in] LDT
+*> \param[in,out] A
 *> \verbatim
-*>          LDT is INTEGER
-*>          The leading dimension of the array T. LDT >= max(1,N).
-*> \endverbatim
+*>          A is COMPLEX*16 array, dimension (LDA,N)
+*>          On entry, the block diagonal matrix D and the multipliers
+*>          used to obtain the factor U or L as computed by ZSYTRF.
 *>
-*> \param[in,out] Q
-*> \verbatim
-*>          Q is COMPLEX*16 array, dimension (LDQ,N)
-*>          On entry, if COMPQ = 'V', the matrix Q of Schur vectors.
-*>          On exit, if COMPQ = 'V', Q has been postmultiplied by the
-*>          unitary transformation matrix Z which reorders T.
-*>          If COMPQ = 'N', Q is not referenced.
+*>          On exit, if INFO = 0, the (symmetric) inverse of the original
+*>          matrix.  If UPLO = 'U', the upper triangular part of the
+*>          inverse is formed and the part of A below the diagonal is not
+*>          referenced; if UPLO = 'L' the lower triangular part of the
+*>          inverse is formed and the part of A above the diagonal is
+*>          not referenced.
 *> \endverbatim
 *>
-*> \param[in] LDQ
+*> \param[in] LDA
 *> \verbatim
-*>          LDQ is INTEGER
-*>          The leading dimension of the array Q.  LDQ >= max(1,N).
+*>          LDA is INTEGER
+*>          The leading dimension of the array A.  LDA >= max(1,N).
 *> \endverbatim
 *>
-*> \param[in] IFST
+*> \param[in] IPIV
 *> \verbatim
-*>          IFST is INTEGER
+*>          IPIV is INTEGER array, dimension (N)
+*>          Details of the interchanges and the block structure of D
+*>          as determined by ZSYTRF.
 *> \endverbatim
 *>
-*> \param[in] ILST
+*> \param[out] WORK
 *> \verbatim
-*>          ILST is INTEGER
-*>
-*>          Specify the reordering of the diagonal elements of T:
-*>          The element with row index IFST is moved to row ILST by a
-*>          sequence of transpositions between adjacent elements.
-*>          1 <= IFST <= N; 1 <= ILST <= N.
+*>          WORK is COMPLEX*16 array, dimension (2*N)
 *> \endverbatim
 *>
 *> \param[out] INFO
 *> \verbatim
 *>          INFO is INTEGER
-*>          = 0:  successful exit
-*>          < 0:  if INFO = -i, the i-th argument had an illegal value
+*>          = 0: successful exit
+*>          < 0: if INFO = -i, the i-th argument had an illegal value
+*>          > 0: if INFO = i, D(i,i) = 0; the matrix is singular and its
+*>               inverse could not be computed.
 *> \endverbatim
 *
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date November 2011
+*> \date December 2016
 *
-*> \ingroup complex16OTHERcomputational
+*> \ingroup complex16SYcomputational
 *
 *  =====================================================================
-      SUBROUTINE ZTREXC( COMPQ, N, T, LDT, Q, LDQ, IFST, ILST, INFO )
+      SUBROUTINE ZSYTRI( UPLO, N, A, LDA, IPIV, WORK, INFO )
 *
-*  -- LAPACK computational routine (version 3.4.0) --
+*  -- LAPACK computational routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     November 2011
+*     December 2016
 *
 *     .. Scalar Arguments ..
-      CHARACTER          COMPQ
-      INTEGER            IFST, ILST, INFO, LDQ, LDT, N
+      CHARACTER          UPLO
+      INTEGER            INFO, LDA, N
 *     ..
 *     .. Array Arguments ..
-      COMPLEX*16         Q( LDQ, * ), T( LDT, * )
+      INTEGER            IPIV( * )
+      COMPLEX*16         A( LDA, * ), WORK( * )
 *     ..
 *
 *  =====================================================================
 *
+*     .. Parameters ..
+      COMPLEX*16         ONE, ZERO
+      PARAMETER          ( ONE = ( 1.0D+0, 0.0D+0 ),
+     $                   ZERO = ( 0.0D+0, 0.0D+0 ) )
+*     ..
 *     .. Local Scalars ..
-      LOGICAL            WANTQ
-      INTEGER            K, M1, M2, M3
-      DOUBLE PRECISION   CS
-      COMPLEX*16         SN, T11, T22, TEMP
+      LOGICAL            UPPER
+      INTEGER            K, KP, KSTEP
+      COMPLEX*16         AK, AKKP1, AKP1, D, T, TEMP
 *     ..
 *     .. External Functions ..
       LOGICAL            LSAME
-      EXTERNAL           LSAME
+      COMPLEX*16         ZDOTU
+      EXTERNAL           LSAME, ZDOTU
 *     ..
 *     .. External Subroutines ..
-      EXTERNAL           XERBLA, ZLARTG, ZROT
+      EXTERNAL           XERBLA, ZCOPY, ZSWAP, ZSYMV
 *     ..
 *     .. Intrinsic Functions ..
-      INTRINSIC          DCONJG, MAX
+      INTRINSIC          ABS, MAX
 *     ..
 *     .. Executable Statements ..
 *
-*     Decode and test the input parameters.
+*     Test the input parameters.
 *
       INFO = 0
-      WANTQ = LSAME( COMPQ, 'V' )
-      IF( .NOT.LSAME( COMPQ, 'N' ) .AND. .NOT.WANTQ ) THEN
+      UPPER = LSAME( UPLO, 'U' )
+      IF( .NOT.UPPER .AND. .NOT.LSAME( UPLO, 'L' ) ) THEN
          INFO = -1
       ELSE IF( N.LT.0 ) THEN
          INFO = -2
-      ELSE IF( LDT.LT.MAX( 1, N ) ) THEN
+      ELSE IF( LDA.LT.MAX( 1, N ) ) THEN
          INFO = -4
-      ELSE IF( LDQ.LT.1 .OR. ( WANTQ .AND. LDQ.LT.MAX( 1, N ) ) ) THEN
-         INFO = -6
-      ELSE IF( IFST.LT.1 .OR. IFST.GT.N ) THEN
-         INFO = -7
-      ELSE IF( ILST.LT.1 .OR. ILST.GT.N ) THEN
-         INFO = -8
       END IF
       IF( INFO.NE.0 ) THEN
-         CALL XERBLA( 'ZTREXC', -INFO )
+         CALL XERBLA( 'ZSYTRI', -INFO )
          RETURN
       END IF
 *
 *     Quick return if possible
 *
-      IF( N.EQ.1 .OR. IFST.EQ.ILST )
+      IF( N.EQ.0 )
      $   RETURN
 *
-      IF( IFST.LT.ILST ) THEN
+*     Check that the diagonal matrix D is nonsingular.
 *
-*        Move the IFST-th diagonal element forward down the diagonal.
+      IF( UPPER ) THEN
 *
-         M1 = 0
-         M2 = -1
-         M3 = 1
+*        Upper triangular storage: examine D from bottom to top
+*
+         DO 10 INFO = N, 1, -1
+            IF( IPIV( INFO ).GT.0 .AND. A( INFO, INFO ).EQ.ZERO )
+     $         RETURN
+   10    CONTINUE
       ELSE
 *
-*        Move the IFST-th diagonal element backward up the diagonal.
+*        Lower triangular storage: examine D from top to bottom.
 *
-         M1 = -1
-         M2 = 0
-         M3 = -1
+         DO 20 INFO = 1, N
+            IF( IPIV( INFO ).GT.0 .AND. A( INFO, INFO ).EQ.ZERO )
+     $         RETURN
+   20    CONTINUE
       END IF
+      INFO = 0
 *
-      DO 10 K = IFST + M1, ILST + M2, M3
+      IF( UPPER ) THEN
 *
-*        Interchange the k-th and (k+1)-th diagonal elements.
+*        Compute inv(A) from the factorization A = U*D*U**T.
 *
-         T11 = T( K, K )
-         T22 = T( K+1, K+1 )
+*        K is the main loop index, increasing from 1 to N in steps of
+*        1 or 2, depending on the size of the diagonal blocks.
 *
-*        Determine the transformation to perform the interchange.
+         K = 1
+   30    CONTINUE
 *
-         CALL ZLARTG( T( K, K+1 ), T22-T11, CS, SN, TEMP )
+*        If K > N, exit from loop.
 *
-*        Apply transformation to the matrix T.
+         IF( K.GT.N )
+     $      GO TO 40
 *
-         IF( K+2.LE.N )
-     $      CALL ZROT( N-K-1, T( K, K+2 ), LDT, T( K+1, K+2 ), LDT, CS,
-     $                 SN )
-         CALL ZROT( K-1, T( 1, K ), 1, T( 1, K+1 ), 1, CS,
-     $              DCONJG( SN ) )
+         IF( IPIV( K ).GT.0 ) THEN
 *
-         T( K, K ) = T22
-         T( K+1, K+1 ) = T11
+*           1 x 1 diagonal block
 *
-         IF( WANTQ ) THEN
+*           Invert the diagonal block.
 *
-*           Accumulate transformation in the matrix Q.
+            A( K, K ) = ONE / A( K, K )
 *
-            CALL ZROT( N, Q( 1, K ), 1, Q( 1, K+1 ), 1, CS,
-     $                 DCONJG( SN ) )
+*           Compute column K of the inverse.
+*
+            IF( K.GT.1 ) THEN
+               CALL ZCOPY( K-1, A( 1, K ), 1, WORK, 1 )
+               CALL ZSYMV( UPLO, K-1, -ONE, A, LDA, WORK, 1, ZERO,
+     $                     A( 1, K ), 1 )
+               A( K, K ) = A( K, K ) - ZDOTU( K-1, WORK, 1, A( 1, K ),
+     $                     1 )
+            END IF
+            KSTEP = 1
+         ELSE
+*
+*           2 x 2 diagonal block
+*
+*           Invert the diagonal block.
+*
+            T = A( K, K+1 )
+            AK = A( K, K ) / T
+            AKP1 = A( K+1, K+1 ) / T
+            AKKP1 = A( K, K+1 ) / T
+            D = T*( AK*AKP1-ONE )
+            A( K, K ) = AKP1 / D
+            A( K+1, K+1 ) = AK / D
+            A( K, K+1 ) = -AKKP1 / D
+*
+*           Compute columns K and K+1 of the inverse.
+*
+            IF( K.GT.1 ) THEN
+               CALL ZCOPY( K-1, A( 1, K ), 1, WORK, 1 )
+               CALL ZSYMV( UPLO, K-1, -ONE, A, LDA, WORK, 1, ZERO,
+     $                     A( 1, K ), 1 )
+               A( K, K ) = A( K, K ) - ZDOTU( K-1, WORK, 1, A( 1, K ),
+     $                     1 )
+               A( K, K+1 ) = A( K, K+1 ) -
+     $                       ZDOTU( K-1, A( 1, K ), 1, A( 1, K+1 ), 1 )
+               CALL ZCOPY( K-1, A( 1, K+1 ), 1, WORK, 1 )
+               CALL ZSYMV( UPLO, K-1, -ONE, A, LDA, WORK, 1, ZERO,
+     $                     A( 1, K+1 ), 1 )
+               A( K+1, K+1 ) = A( K+1, K+1 ) -
+     $                         ZDOTU( K-1, WORK, 1, A( 1, K+1 ), 1 )
+            END IF
+            KSTEP = 2
          END IF
 *
-   10 CONTINUE
+         KP = ABS( IPIV( K ) )
+         IF( KP.NE.K ) THEN
+*
+*           Interchange rows and columns K and KP in the leading
+*           submatrix A(1:k+1,1:k+1)
+*
+            CALL ZSWAP( KP-1, A( 1, K ), 1, A( 1, KP ), 1 )
+            CALL ZSWAP( K-KP-1, A( KP+1, K ), 1, A( KP, KP+1 ), LDA )
+            TEMP = A( K, K )
+            A( K, K ) = A( KP, KP )
+            A( KP, KP ) = TEMP
+            IF( KSTEP.EQ.2 ) THEN
+               TEMP = A( K, K+1 )
+               A( K, K+1 ) = A( KP, K+1 )
+               A( KP, K+1 ) = TEMP
+            END IF
+         END IF
+*
+         K = K + KSTEP
+         GO TO 30
+   40    CONTINUE
+*
+      ELSE
+*
+*        Compute inv(A) from the factorization A = L*D*L**T.
+*
+*        K is the main loop index, increasing from 1 to N in steps of
+*        1 or 2, depending on the size of the diagonal blocks.
+*
+         K = N
+   50    CONTINUE
+*
+*        If K < 1, exit from loop.
+*
+         IF( K.LT.1 )
+     $      GO TO 60
+*
+         IF( IPIV( K ).GT.0 ) THEN
+*
+*           1 x 1 diagonal block
+*
+*           Invert the diagonal block.
+*
+            A( K, K ) = ONE / A( K, K )
+*
+*           Compute column K of the inverse.
+*
+            IF( K.LT.N ) THEN
+               CALL ZCOPY( N-K, A( K+1, K ), 1, WORK, 1 )
+               CALL ZSYMV( UPLO, N-K, -ONE, A( K+1, K+1 ), LDA, WORK, 1,
+     $                     ZERO, A( K+1, K ), 1 )
+               A( K, K ) = A( K, K ) - ZDOTU( N-K, WORK, 1, A( K+1, K ),
+     $                     1 )
+            END IF
+            KSTEP = 1
+         ELSE
+*
+*           2 x 2 diagonal block
+*
+*           Invert the diagonal block.
+*
+            T = A( K, K-1 )
+            AK = A( K-1, K-1 ) / T
+            AKP1 = A( K, K ) / T
+            AKKP1 = A( K, K-1 ) / T
+            D = T*( AK*AKP1-ONE )
+            A( K-1, K-1 ) = AKP1 / D
+            A( K, K ) = AK / D
+            A( K, K-1 ) = -AKKP1 / D
+*
+*           Compute columns K-1 and K of the inverse.
+*
+            IF( K.LT.N ) THEN
+               CALL ZCOPY( N-K, A( K+1, K ), 1, WORK, 1 )
+               CALL ZSYMV( UPLO, N-K, -ONE, A( K+1, K+1 ), LDA, WORK, 1,
+     $                     ZERO, A( K+1, K ), 1 )
+               A( K, K ) = A( K, K ) - ZDOTU( N-K, WORK, 1, A( K+1, K ),
+     $                     1 )
+               A( K, K-1 ) = A( K, K-1 ) -
+     $                       ZDOTU( N-K, A( K+1, K ), 1, A( K+1, K-1 ),
+     $                       1 )
+               CALL ZCOPY( N-K, A( K+1, K-1 ), 1, WORK, 1 )
+               CALL ZSYMV( UPLO, N-K, -ONE, A( K+1, K+1 ), LDA, WORK, 1,
+     $                     ZERO, A( K+1, K-1 ), 1 )
+               A( K-1, K-1 ) = A( K-1, K-1 ) -
+     $                         ZDOTU( N-K, WORK, 1, A( K+1, K-1 ), 1 )
+            END IF
+            KSTEP = 2
+         END IF
+*
+         KP = ABS( IPIV( K ) )
+         IF( KP.NE.K ) THEN
+*
+*           Interchange rows and columns K and KP in the trailing
+*           submatrix A(k-1:n,k-1:n)
+*
+            IF( KP.LT.N )
+     $         CALL ZSWAP( N-KP, A( KP+1, K ), 1, A( KP+1, KP ), 1 )
+            CALL ZSWAP( KP-K-1, A( K+1, K ), 1, A( KP, K+1 ), LDA )
+            TEMP = A( K, K )
+            A( K, K ) = A( KP, KP )
+            A( KP, KP ) = TEMP
+            IF( KSTEP.EQ.2 ) THEN
+               TEMP = A( K, K-1 )
+               A( K, K-1 ) = A( KP, K-1 )
+               A( KP, K-1 ) = TEMP
+            END IF
+         END IF
+*
+         K = K - KSTEP
+         GO TO 50
+   60    CONTINUE
+      END IF
 *
       RETURN
 *
-*     End of ZTREXC
+*     End of ZSYTRI
 *
       END
-*> \brief \b ZTRTRS
+*> \brief \b ZTGEVC
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download ZTRTRS + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/ztrtrs.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/ztrtrs.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/ztrtrs.f"> 
+*> Download ZTGEVC + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/ztgevc.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/ztgevc.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/ztgevc.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
-*       SUBROUTINE ZTRTRS( UPLO, TRANS, DIAG, N, NRHS, A, LDA, B, LDB,
-*                          INFO )
-* 
+*       SUBROUTINE ZTGEVC( SIDE, HOWMNY, SELECT, N, S, LDS, P, LDP, VL,
+*                          LDVL, VR, LDVR, MM, M, WORK, RWORK, INFO )
+*
 *       .. Scalar Arguments ..
-*       CHARACTER          DIAG, TRANS, UPLO
-*       INTEGER            INFO, LDA, LDB, N, NRHS
+*       CHARACTER          HOWMNY, SIDE
+*       INTEGER            INFO, LDP, LDS, LDVL, LDVR, M, MM, N
 *       ..
 *       .. Array Arguments ..
-*       COMPLEX*16         A( LDA, * ), B( LDB, * )
+*       LOGICAL            SELECT( * )
+*       DOUBLE PRECISION   RWORK( * )
+*       COMPLEX*16         P( LDP, * ), S( LDS, * ), VL( LDVL, * ),
+*      $                   VR( LDVR, * ), WORK( * )
 *       ..
-*  
+*
+*
 *
 *> \par Purpose:
 *  =============
 *>
 *> \verbatim
 *>
-*> ZTRTRS solves a triangular system of the form
+*> ZTGEVC computes some or all of the right and/or left eigenvectors of
+*> a pair of complex matrices (S,P), where S and P are upper triangular.
+*> Matrix pairs of this type are produced by the generalized Schur
+*> factorization of a complex matrix pair (A,B):
 *>
-*>    A * X = B,  A**T * X = B,  or  A**H * X = B,
+*>    A = Q*S*Z**H,  B = Q*P*Z**H
 *>
-*> where A is a triangular matrix of order N, and B is an N-by-NRHS
-*> matrix.  A check is made to verify that A is nonsingular.
+*> as computed by ZGGHRD + ZHGEQZ.
+*>
+*> The right eigenvector x and the left eigenvector y of (S,P)
+*> corresponding to an eigenvalue w are defined by:
+*>
+*>    S*x = w*P*x,  (y**H)*S = w*(y**H)*P,
+*>
+*> where y**H denotes the conjugate tranpose of y.
+*> The eigenvalues are not input to this routine, but are computed
+*> directly from the diagonal elements of S and P.
+*>
+*> This routine returns the matrices X and/or Y of right and left
+*> eigenvectors of (S,P), or the products Z*X and/or Q*Y,
+*> where Z and Q are input matrices.
+*> If Q and Z are the unitary factors from the generalized Schur
+*> factorization of a matrix pair (A,B), then Z*X and Q*Y
+*> are the matrices of right and left eigenvectors of (A,B).
 *> \endverbatim
 *
 *  Arguments:
 *  ==========
 *
-*> \param[in] UPLO
+*> \param[in] SIDE
 *> \verbatim
-*>          UPLO is CHARACTER*1
-*>          = 'U':  A is upper triangular;
-*>          = 'L':  A is lower triangular.
+*>          SIDE is CHARACTER*1
+*>          = 'R': compute right eigenvectors only;
+*>          = 'L': compute left eigenvectors only;
+*>          = 'B': compute both right and left eigenvectors.
 *> \endverbatim
 *>
-*> \param[in] TRANS
+*> \param[in] HOWMNY
 *> \verbatim
-*>          TRANS is CHARACTER*1
-*>          Specifies the form of the system of equations:
-*>          = 'N':  A * X = B     (No transpose)
-*>          = 'T':  A**T * X = B  (Transpose)
-*>          = 'C':  A**H * X = B  (Conjugate transpose)
+*>          HOWMNY is CHARACTER*1
+*>          = 'A': compute all right and/or left eigenvectors;
+*>          = 'B': compute all right and/or left eigenvectors,
+*>                 backtransformed by the matrices in VR and/or VL;
+*>          = 'S': compute selected right and/or left eigenvectors,
+*>                 specified by the logical array SELECT.
 *> \endverbatim
 *>
-*> \param[in] DIAG
+*> \param[in] SELECT
 *> \verbatim
-*>          DIAG is CHARACTER*1
-*>          = 'N':  A is non-unit triangular;
-*>          = 'U':  A is unit triangular.
+*>          SELECT is LOGICAL array, dimension (N)
+*>          If HOWMNY='S', SELECT specifies the eigenvectors to be
+*>          computed.  The eigenvector corresponding to the j-th
+*>          eigenvalue is computed if SELECT(j) = .TRUE..
+*>          Not referenced if HOWMNY = 'A' or 'B'.
 *> \endverbatim
 *>
 *> \param[in] N
 *> \verbatim
 *>          N is INTEGER
-*>          The order of the matrix A.  N >= 0.
+*>          The order of the matrices S and P.  N >= 0.
 *> \endverbatim
 *>
-*> \param[in] NRHS
+*> \param[in] S
 *> \verbatim
-*>          NRHS is INTEGER
-*>          The number of right hand sides, i.e., the number of columns
-*>          of the matrix B.  NRHS >= 0.
+*>          S is COMPLEX*16 array, dimension (LDS,N)
+*>          The upper triangular matrix S from a generalized Schur
+*>          factorization, as computed by ZHGEQZ.
 *> \endverbatim
 *>
-*> \param[in] A
+*> \param[in] LDS
 *> \verbatim
-*>          A is COMPLEX*16 array, dimension (LDA,N)
-*>          The triangular matrix A.  If UPLO = 'U', the leading N-by-N
-*>          upper triangular part of the array A contains the upper
-*>          triangular matrix, and the strictly lower triangular part of
-*>          A is not referenced.  If UPLO = 'L', the leading N-by-N lower
-*>          triangular part of the array A contains the lower triangular
-*>          matrix, and the strictly upper triangular part of A is not
-*>          referenced.  If DIAG = 'U', the diagonal elements of A are
-*>          also not referenced and are assumed to be 1.
+*>          LDS is INTEGER
+*>          The leading dimension of array S.  LDS >= max(1,N).
 *> \endverbatim
 *>
-*> \param[in] LDA
+*> \param[in] P
 *> \verbatim
-*>          LDA is INTEGER
-*>          The leading dimension of the array A.  LDA >= max(1,N).
+*>          P is COMPLEX*16 array, dimension (LDP,N)
+*>          The upper triangular matrix P from a generalized Schur
+*>          factorization, as computed by ZHGEQZ.  P must have real
+*>          diagonal elements.
 *> \endverbatim
 *>
-*> \param[in,out] B
+*> \param[in] LDP
 *> \verbatim
-*>          B is COMPLEX*16 array, dimension (LDB,NRHS)
-*>          On entry, the right hand side matrix B.
-*>          On exit, if INFO = 0, the solution matrix X.
+*>          LDP is INTEGER
+*>          The leading dimension of array P.  LDP >= max(1,N).
 *> \endverbatim
 *>
-*> \param[in] LDB
+*> \param[in,out] VL
 *> \verbatim
-*>          LDB is INTEGER
-*>          The leading dimension of the array B.  LDB >= max(1,N).
+*>          VL is COMPLEX*16 array, dimension (LDVL,MM)
+*>          On entry, if SIDE = 'L' or 'B' and HOWMNY = 'B', VL must
+*>          contain an N-by-N matrix Q (usually the unitary matrix Q
+*>          of left Schur vectors returned by ZHGEQZ).
+*>          On exit, if SIDE = 'L' or 'B', VL contains:
+*>          if HOWMNY = 'A', the matrix Y of left eigenvectors of (S,P);
+*>          if HOWMNY = 'B', the matrix Q*Y;
+*>          if HOWMNY = 'S', the left eigenvectors of (S,P) specified by
+*>                      SELECT, stored consecutively in the columns of
+*>                      VL, in the same order as their eigenvalues.
+*>          Not referenced if SIDE = 'R'.
+*> \endverbatim
+*>
+*> \param[in] LDVL
+*> \verbatim
+*>          LDVL is INTEGER
+*>          The leading dimension of array VL.  LDVL >= 1, and if
+*>          SIDE = 'L' or 'l' or 'B' or 'b', LDVL >= N.
+*> \endverbatim
+*>
+*> \param[in,out] VR
+*> \verbatim
+*>          VR is COMPLEX*16 array, dimension (LDVR,MM)
+*>          On entry, if SIDE = 'R' or 'B' and HOWMNY = 'B', VR must
+*>          contain an N-by-N matrix Q (usually the unitary matrix Z
+*>          of right Schur vectors returned by ZHGEQZ).
+*>          On exit, if SIDE = 'R' or 'B', VR contains:
+*>          if HOWMNY = 'A', the matrix X of right eigenvectors of (S,P);
+*>          if HOWMNY = 'B', the matrix Z*X;
+*>          if HOWMNY = 'S', the right eigenvectors of (S,P) specified by
+*>                      SELECT, stored consecutively in the columns of
+*>                      VR, in the same order as their eigenvalues.
+*>          Not referenced if SIDE = 'L'.
+*> \endverbatim
+*>
+*> \param[in] LDVR
+*> \verbatim
+*>          LDVR is INTEGER
+*>          The leading dimension of the array VR.  LDVR >= 1, and if
+*>          SIDE = 'R' or 'B', LDVR >= N.
+*> \endverbatim
+*>
+*> \param[in] MM
+*> \verbatim
+*>          MM is INTEGER
+*>          The number of columns in the arrays VL and/or VR. MM >= M.
+*> \endverbatim
+*>
+*> \param[out] M
+*> \verbatim
+*>          M is INTEGER
+*>          The number of columns in the arrays VL and/or VR actually
+*>          used to store the eigenvectors.  If HOWMNY = 'A' or 'B', M
+*>          is set to N.  Each selected eigenvector occupies one column.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*>          WORK is COMPLEX*16 array, dimension (2*N)
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*>          RWORK is DOUBLE PRECISION array, dimension (2*N)
 *> \endverbatim
 *>
 *> \param[out] INFO
 *> \verbatim
 *>          INFO is INTEGER
-*>          = 0:  successful exit
-*>          < 0: if INFO = -i, the i-th argument had an illegal value
-*>          > 0: if INFO = i, the i-th diagonal element of A is zero,
-*>               indicating that the matrix is singular and the solutions
-*>               X have not been computed.
+*>          = 0:  successful exit.
+*>          < 0:  if INFO = -i, the i-th argument had an illegal value.
 *> \endverbatim
 *
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date November 2011
+*> \date December 2016
 *
-*> \ingroup complex16OTHERcomputational
+*> \ingroup complex16GEcomputational
 *
 *  =====================================================================
-      SUBROUTINE ZTRTRS( UPLO, TRANS, DIAG, N, NRHS, A, LDA, B, LDB,
-     $                   INFO )
+      SUBROUTINE ZTGEVC( SIDE, HOWMNY, SELECT, N, S, LDS, P, LDP, VL,
+     $                   LDVL, VR, LDVR, MM, M, WORK, RWORK, INFO )
 *
-*  -- LAPACK computational routine (version 3.4.0) --
+*  -- LAPACK computational routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     November 2011
+*     December 2016
 *
 *     .. Scalar Arguments ..
-      CHARACTER          DIAG, TRANS, UPLO
-      INTEGER            INFO, LDA, LDB, N, NRHS
+      CHARACTER          HOWMNY, SIDE
+      INTEGER            INFO, LDP, LDS, LDVL, LDVR, M, MM, N
 *     ..
 *     .. Array Arguments ..
-      COMPLEX*16         A( LDA, * ), B( LDB, * )
+      LOGICAL            SELECT( * )
+      DOUBLE PRECISION   RWORK( * )
+      COMPLEX*16         P( LDP, * ), S( LDS, * ), VL( LDVL, * ),
+     $                   VR( LDVR, * ), WORK( * )
 *     ..
 *
+*
 *  =====================================================================
 *
 *     .. Parameters ..
-      COMPLEX*16         ZERO, ONE
-      PARAMETER          ( ZERO = ( 0.0D+0, 0.0D+0 ),
-     $                   ONE = ( 1.0D+0, 0.0D+0 ) )
+      DOUBLE PRECISION   ZERO, ONE
+      PARAMETER          ( ZERO = 0.0D+0, ONE = 1.0D+0 )
+      COMPLEX*16         CZERO, CONE
+      PARAMETER          ( CZERO = ( 0.0D+0, 0.0D+0 ),
+     $                   CONE = ( 1.0D+0, 0.0D+0 ) )
 *     ..
 *     .. Local Scalars ..
-      LOGICAL            NOUNIT
+      LOGICAL            COMPL, COMPR, ILALL, ILBACK, ILBBAD, ILCOMP,
+     $                   LSA, LSB
+      INTEGER            I, IBEG, IEIG, IEND, IHWMNY, IM, ISIDE, ISRC,
+     $                   J, JE, JR
+      DOUBLE PRECISION   ACOEFA, ACOEFF, ANORM, ASCALE, BCOEFA, BIG,
+     $                   BIGNUM, BNORM, BSCALE, DMIN, SAFMIN, SBETA,
+     $                   SCALE, SMALL, TEMP, ULP, XMAX
+      COMPLEX*16         BCOEFF, CA, CB, D, SALPHA, SUM, SUMA, SUMB, X
 *     ..
 *     .. External Functions ..
       LOGICAL            LSAME
-      EXTERNAL           LSAME
+      DOUBLE PRECISION   DLAMCH
+      COMPLEX*16         ZLADIV
+      EXTERNAL           LSAME, DLAMCH, ZLADIV
 *     ..
 *     .. External Subroutines ..
-      EXTERNAL           XERBLA, ZTRSM
+      EXTERNAL           DLABAD, XERBLA, ZGEMV
 *     ..
 *     .. Intrinsic Functions ..
-      INTRINSIC          MAX
+      INTRINSIC          ABS, DBLE, DCMPLX, DCONJG, DIMAG, MAX, MIN
+*     ..
+*     .. Statement Functions ..
+      DOUBLE PRECISION   ABS1
+*     ..
+*     .. Statement Function definitions ..
+      ABS1( X ) = ABS( DBLE( X ) ) + ABS( DIMAG( X ) )
 *     ..
 *     .. Executable Statements ..
 *
-*     Test the input parameters.
+*     Decode and Test the input parameters
+*
+      IF( LSAME( HOWMNY, 'A' ) ) THEN
+         IHWMNY = 1
+         ILALL = .TRUE.
+         ILBACK = .FALSE.
+      ELSE IF( LSAME( HOWMNY, 'S' ) ) THEN
+         IHWMNY = 2
+         ILALL = .FALSE.
+         ILBACK = .FALSE.
+      ELSE IF( LSAME( HOWMNY, 'B' ) ) THEN
+         IHWMNY = 3
+         ILALL = .TRUE.
+         ILBACK = .TRUE.
+      ELSE
+         IHWMNY = -1
+      END IF
+*
+      IF( LSAME( SIDE, 'R' ) ) THEN
+         ISIDE = 1
+         COMPL = .FALSE.
+         COMPR = .TRUE.
+      ELSE IF( LSAME( SIDE, 'L' ) ) THEN
+         ISIDE = 2
+         COMPL = .TRUE.
+         COMPR = .FALSE.
+      ELSE IF( LSAME( SIDE, 'B' ) ) THEN
+         ISIDE = 3
+         COMPL = .TRUE.
+         COMPR = .TRUE.
+      ELSE
+         ISIDE = -1
+      END IF
 *
       INFO = 0
-      NOUNIT = LSAME( DIAG, 'N' )
-      IF( .NOT.LSAME( UPLO, 'U' ) .AND. .NOT.LSAME( UPLO, 'L' ) ) THEN
+      IF( ISIDE.LT.0 ) THEN
          INFO = -1
-      ELSE IF( .NOT.LSAME( TRANS, 'N' ) .AND. .NOT.
-     $         LSAME( TRANS, 'T' ) .AND. .NOT.LSAME( TRANS, 'C' ) ) THEN
+      ELSE IF( IHWMNY.LT.0 ) THEN
          INFO = -2
-      ELSE IF( .NOT.NOUNIT .AND. .NOT.LSAME( DIAG, 'U' ) ) THEN
-         INFO = -3
       ELSE IF( N.LT.0 ) THEN
          INFO = -4
-      ELSE IF( NRHS.LT.0 ) THEN
-         INFO = -5
-      ELSE IF( LDA.LT.MAX( 1, N ) ) THEN
+      ELSE IF( LDS.LT.MAX( 1, N ) ) THEN
+         INFO = -6
+      ELSE IF( LDP.LT.MAX( 1, N ) ) THEN
+         INFO = -8
+      END IF
+      IF( INFO.NE.0 ) THEN
+         CALL XERBLA( 'ZTGEVC', -INFO )
+         RETURN
+      END IF
+*
+*     Count the number of eigenvectors
+*
+      IF( .NOT.ILALL ) THEN
+         IM = 0
+         DO 10 J = 1, N
+            IF( SELECT( J ) )
+     $         IM = IM + 1
+   10    CONTINUE
+      ELSE
+         IM = N
+      END IF
+*
+*     Check diagonal of B
+*
+      ILBBAD = .FALSE.
+      DO 20 J = 1, N
+         IF( DIMAG( P( J, J ) ).NE.ZERO )
+     $      ILBBAD = .TRUE.
+   20 CONTINUE
+*
+      IF( ILBBAD ) THEN
          INFO = -7
-      ELSE IF( LDB.LT.MAX( 1, N ) ) THEN
-         INFO = -9
+      ELSE IF( COMPL .AND. LDVL.LT.N .OR. LDVL.LT.1 ) THEN
+         INFO = -10
+      ELSE IF( COMPR .AND. LDVR.LT.N .OR. LDVR.LT.1 ) THEN
+         INFO = -12
+      ELSE IF( MM.LT.IM ) THEN
+         INFO = -13
       END IF
       IF( INFO.NE.0 ) THEN
-         CALL XERBLA( 'ZTRTRS', -INFO )
+         CALL XERBLA( 'ZTGEVC', -INFO )
          RETURN
       END IF
 *
-*     Quick return if possible
+*     Quick return if possible
+*
+      M = IM
+      IF( N.EQ.0 )
+     $   RETURN
+*
+*     Machine Constants
+*
+      SAFMIN = DLAMCH( 'Safe minimum' )
+      BIG = ONE / SAFMIN
+      CALL DLABAD( SAFMIN, BIG )
+      ULP = DLAMCH( 'Epsilon' )*DLAMCH( 'Base' )
+      SMALL = SAFMIN*N / ULP
+      BIG = ONE / SMALL
+      BIGNUM = ONE / ( SAFMIN*N )
+*
+*     Compute the 1-norm of each column of the strictly upper triangular
+*     part of A and B to check for possible overflow in the triangular
+*     solver.
+*
+      ANORM = ABS1( S( 1, 1 ) )
+      BNORM = ABS1( P( 1, 1 ) )
+      RWORK( 1 ) = ZERO
+      RWORK( N+1 ) = ZERO
+      DO 40 J = 2, N
+         RWORK( J ) = ZERO
+         RWORK( N+J ) = ZERO
+         DO 30 I = 1, J - 1
+            RWORK( J ) = RWORK( J ) + ABS1( S( I, J ) )
+            RWORK( N+J ) = RWORK( N+J ) + ABS1( P( I, J ) )
+   30    CONTINUE
+         ANORM = MAX( ANORM, RWORK( J )+ABS1( S( J, J ) ) )
+         BNORM = MAX( BNORM, RWORK( N+J )+ABS1( P( J, J ) ) )
+   40 CONTINUE
+*
+      ASCALE = ONE / MAX( ANORM, SAFMIN )
+      BSCALE = ONE / MAX( BNORM, SAFMIN )
+*
+*     Left eigenvectors
+*
+      IF( COMPL ) THEN
+         IEIG = 0
+*
+*        Main loop over eigenvalues
+*
+         DO 140 JE = 1, N
+            IF( ILALL ) THEN
+               ILCOMP = .TRUE.
+            ELSE
+               ILCOMP = SELECT( JE )
+            END IF
+            IF( ILCOMP ) THEN
+               IEIG = IEIG + 1
+*
+               IF( ABS1( S( JE, JE ) ).LE.SAFMIN .AND.
+     $             ABS( DBLE( P( JE, JE ) ) ).LE.SAFMIN ) THEN
+*
+*                 Singular matrix pencil -- return unit eigenvector
+*
+                  DO 50 JR = 1, N
+                     VL( JR, IEIG ) = CZERO
+   50             CONTINUE
+                  VL( IEIG, IEIG ) = CONE
+                  GO TO 140
+               END IF
+*
+*              Non-singular eigenvalue:
+*              Compute coefficients  a  and  b  in
+*                   H
+*                 y  ( a A - b B ) = 0
+*
+               TEMP = ONE / MAX( ABS1( S( JE, JE ) )*ASCALE,
+     $                ABS( DBLE( P( JE, JE ) ) )*BSCALE, SAFMIN )
+               SALPHA = ( TEMP*S( JE, JE ) )*ASCALE
+               SBETA = ( TEMP*DBLE( P( JE, JE ) ) )*BSCALE
+               ACOEFF = SBETA*ASCALE
+               BCOEFF = SALPHA*BSCALE
+*
+*              Scale to avoid underflow
+*
+               LSA = ABS( SBETA ).GE.SAFMIN .AND. ABS( ACOEFF ).LT.SMALL
+               LSB = ABS1( SALPHA ).GE.SAFMIN .AND. ABS1( BCOEFF ).LT.
+     $               SMALL
+*
+               SCALE = ONE
+               IF( LSA )
+     $            SCALE = ( SMALL / ABS( SBETA ) )*MIN( ANORM, BIG )
+               IF( LSB )
+     $            SCALE = MAX( SCALE, ( SMALL / ABS1( SALPHA ) )*
+     $                    MIN( BNORM, BIG ) )
+               IF( LSA .OR. LSB ) THEN
+                  SCALE = MIN( SCALE, ONE /
+     $                    ( SAFMIN*MAX( ONE, ABS( ACOEFF ),
+     $                    ABS1( BCOEFF ) ) ) )
+                  IF( LSA ) THEN
+                     ACOEFF = ASCALE*( SCALE*SBETA )
+                  ELSE
+                     ACOEFF = SCALE*ACOEFF
+                  END IF
+                  IF( LSB ) THEN
+                     BCOEFF = BSCALE*( SCALE*SALPHA )
+                  ELSE
+                     BCOEFF = SCALE*BCOEFF
+                  END IF
+               END IF
+*
+               ACOEFA = ABS( ACOEFF )
+               BCOEFA = ABS1( BCOEFF )
+               XMAX = ONE
+               DO 60 JR = 1, N
+                  WORK( JR ) = CZERO
+   60          CONTINUE
+               WORK( JE ) = CONE
+               DMIN = MAX( ULP*ACOEFA*ANORM, ULP*BCOEFA*BNORM, SAFMIN )
+*
+*                                              H
+*              Triangular solve of  (a A - b B)  y = 0
+*
+*                                      H
+*              (rowwise in  (a A - b B) , or columnwise in a A - b B)
+*
+               DO 100 J = JE + 1, N
+*
+*                 Compute
+*                       j-1
+*                 SUM = sum  conjg( a*S(k,j) - b*P(k,j) )*x(k)
+*                       k=je
+*                 (Scale if necessary)
+*
+                  TEMP = ONE / XMAX
+                  IF( ACOEFA*RWORK( J )+BCOEFA*RWORK( N+J ).GT.BIGNUM*
+     $                TEMP ) THEN
+                     DO 70 JR = JE, J - 1
+                        WORK( JR ) = TEMP*WORK( JR )
+   70                CONTINUE
+                     XMAX = ONE
+                  END IF
+                  SUMA = CZERO
+                  SUMB = CZERO
+*
+                  DO 80 JR = JE, J - 1
+                     SUMA = SUMA + DCONJG( S( JR, J ) )*WORK( JR )
+                     SUMB = SUMB + DCONJG( P( JR, J ) )*WORK( JR )
+   80             CONTINUE
+                  SUM = ACOEFF*SUMA - DCONJG( BCOEFF )*SUMB
+*
+*                 Form x(j) = - SUM / conjg( a*S(j,j) - b*P(j,j) )
+*
+*                 with scaling and perturbation of the denominator
+*
+                  D = DCONJG( ACOEFF*S( J, J )-BCOEFF*P( J, J ) )
+                  IF( ABS1( D ).LE.DMIN )
+     $               D = DCMPLX( DMIN )
+*
+                  IF( ABS1( D ).LT.ONE ) THEN
+                     IF( ABS1( SUM ).GE.BIGNUM*ABS1( D ) ) THEN
+                        TEMP = ONE / ABS1( SUM )
+                        DO 90 JR = JE, J - 1
+                           WORK( JR ) = TEMP*WORK( JR )
+   90                   CONTINUE
+                        XMAX = TEMP*XMAX
+                        SUM = TEMP*SUM
+                     END IF
+                  END IF
+                  WORK( J ) = ZLADIV( -SUM, D )
+                  XMAX = MAX( XMAX, ABS1( WORK( J ) ) )
+  100          CONTINUE
+*
+*              Back transform eigenvector if HOWMNY='B'.
+*
+               IF( ILBACK ) THEN
+                  CALL ZGEMV( 'N', N, N+1-JE, CONE, VL( 1, JE ), LDVL,
+     $                        WORK( JE ), 1, CZERO, WORK( N+1 ), 1 )
+                  ISRC = 2
+                  IBEG = 1
+               ELSE
+                  ISRC = 1
+                  IBEG = JE
+               END IF
+*
+*              Copy and scale eigenvector into column of VL
+*
+               XMAX = ZERO
+               DO 110 JR = IBEG, N
+                  XMAX = MAX( XMAX, ABS1( WORK( ( ISRC-1 )*N+JR ) ) )
+  110          CONTINUE
+*
+               IF( XMAX.GT.SAFMIN ) THEN
+                  TEMP = ONE / XMAX
+                  DO 120 JR = IBEG, N
+                     VL( JR, IEIG ) = TEMP*WORK( ( ISRC-1 )*N+JR )
+  120             CONTINUE
+               ELSE
+                  IBEG = N + 1
+               END IF
+*
+               DO 130 JR = 1, IBEG - 1
+                  VL( JR, IEIG ) = CZERO
+  130          CONTINUE
+*
+            END IF
+  140    CONTINUE
+      END IF
+*
+*     Right eigenvectors
+*
+      IF( COMPR ) THEN
+         IEIG = IM + 1
+*
+*        Main loop over eigenvalues
+*
+         DO 250 JE = N, 1, -1
+            IF( ILALL ) THEN
+               ILCOMP = .TRUE.
+            ELSE
+               ILCOMP = SELECT( JE )
+            END IF
+            IF( ILCOMP ) THEN
+               IEIG = IEIG - 1
+*
+               IF( ABS1( S( JE, JE ) ).LE.SAFMIN .AND.
+     $             ABS( DBLE( P( JE, JE ) ) ).LE.SAFMIN ) THEN
+*
+*                 Singular matrix pencil -- return unit eigenvector
+*
+                  DO 150 JR = 1, N
+                     VR( JR, IEIG ) = CZERO
+  150             CONTINUE
+                  VR( IEIG, IEIG ) = CONE
+                  GO TO 250
+               END IF
+*
+*              Non-singular eigenvalue:
+*              Compute coefficients  a  and  b  in
+*
+*              ( a A - b B ) x  = 0
+*
+               TEMP = ONE / MAX( ABS1( S( JE, JE ) )*ASCALE,
+     $                ABS( DBLE( P( JE, JE ) ) )*BSCALE, SAFMIN )
+               SALPHA = ( TEMP*S( JE, JE ) )*ASCALE
+               SBETA = ( TEMP*DBLE( P( JE, JE ) ) )*BSCALE
+               ACOEFF = SBETA*ASCALE
+               BCOEFF = SALPHA*BSCALE
+*
+*              Scale to avoid underflow
+*
+               LSA = ABS( SBETA ).GE.SAFMIN .AND. ABS( ACOEFF ).LT.SMALL
+               LSB = ABS1( SALPHA ).GE.SAFMIN .AND. ABS1( BCOEFF ).LT.
+     $               SMALL
+*
+               SCALE = ONE
+               IF( LSA )
+     $            SCALE = ( SMALL / ABS( SBETA ) )*MIN( ANORM, BIG )
+               IF( LSB )
+     $            SCALE = MAX( SCALE, ( SMALL / ABS1( SALPHA ) )*
+     $                    MIN( BNORM, BIG ) )
+               IF( LSA .OR. LSB ) THEN
+                  SCALE = MIN( SCALE, ONE /
+     $                    ( SAFMIN*MAX( ONE, ABS( ACOEFF ),
+     $                    ABS1( BCOEFF ) ) ) )
+                  IF( LSA ) THEN
+                     ACOEFF = ASCALE*( SCALE*SBETA )
+                  ELSE
+                     ACOEFF = SCALE*ACOEFF
+                  END IF
+                  IF( LSB ) THEN
+                     BCOEFF = BSCALE*( SCALE*SALPHA )
+                  ELSE
+                     BCOEFF = SCALE*BCOEFF
+                  END IF
+               END IF
+*
+               ACOEFA = ABS( ACOEFF )
+               BCOEFA = ABS1( BCOEFF )
+               XMAX = ONE
+               DO 160 JR = 1, N
+                  WORK( JR ) = CZERO
+  160          CONTINUE
+               WORK( JE ) = CONE
+               DMIN = MAX( ULP*ACOEFA*ANORM, ULP*BCOEFA*BNORM, SAFMIN )
+*
+*              Triangular solve of  (a A - b B) x = 0  (columnwise)
+*
+*              WORK(1:j-1) contains sums w,
+*              WORK(j+1:JE) contains x
+*
+               DO 170 JR = 1, JE - 1
+                  WORK( JR ) = ACOEFF*S( JR, JE ) - BCOEFF*P( JR, JE )
+  170          CONTINUE
+               WORK( JE ) = CONE
+*
+               DO 210 J = JE - 1, 1, -1
+*
+*                 Form x(j) := - w(j) / d
+*                 with scaling and perturbation of the denominator
+*
+                  D = ACOEFF*S( J, J ) - BCOEFF*P( J, J )
+                  IF( ABS1( D ).LE.DMIN )
+     $               D = DCMPLX( DMIN )
+*
+                  IF( ABS1( D ).LT.ONE ) THEN
+                     IF( ABS1( WORK( J ) ).GE.BIGNUM*ABS1( D ) ) THEN
+                        TEMP = ONE / ABS1( WORK( J ) )
+                        DO 180 JR = 1, JE
+                           WORK( JR ) = TEMP*WORK( JR )
+  180                   CONTINUE
+                     END IF
+                  END IF
+*
+                  WORK( J ) = ZLADIV( -WORK( J ), D )
+*
+                  IF( J.GT.1 ) THEN
+*
+*                    w = w + x(j)*(a S(*,j) - b P(*,j) ) with scaling
+*
+                     IF( ABS1( WORK( J ) ).GT.ONE ) THEN
+                        TEMP = ONE / ABS1( WORK( J ) )
+                        IF( ACOEFA*RWORK( J )+BCOEFA*RWORK( N+J ).GE.
+     $                      BIGNUM*TEMP ) THEN
+                           DO 190 JR = 1, JE
+                              WORK( JR ) = TEMP*WORK( JR )
+  190                      CONTINUE
+                        END IF
+                     END IF
+*
+                     CA = ACOEFF*WORK( J )
+                     CB = BCOEFF*WORK( J )
+                     DO 200 JR = 1, J - 1
+                        WORK( JR ) = WORK( JR ) + CA*S( JR, J ) -
+     $                               CB*P( JR, J )
+  200                CONTINUE
+                  END IF
+  210          CONTINUE
+*
+*              Back transform eigenvector if HOWMNY='B'.
 *
-      IF( N.EQ.0 )
-     $   RETURN
+               IF( ILBACK ) THEN
+                  CALL ZGEMV( 'N', N, JE, CONE, VR, LDVR, WORK, 1,
+     $                        CZERO, WORK( N+1 ), 1 )
+                  ISRC = 2
+                  IEND = N
+               ELSE
+                  ISRC = 1
+                  IEND = JE
+               END IF
 *
-*     Check for singularity.
+*              Copy and scale eigenvector into column of VR
 *
-      IF( NOUNIT ) THEN
-         DO 10 INFO = 1, N
-            IF( A( INFO, INFO ).EQ.ZERO )
-     $         RETURN
-   10    CONTINUE
-      END IF
-      INFO = 0
+               XMAX = ZERO
+               DO 220 JR = 1, IEND
+                  XMAX = MAX( XMAX, ABS1( WORK( ( ISRC-1 )*N+JR ) ) )
+  220          CONTINUE
 *
-*     Solve A * x = b,  A**T * x = b,  or  A**H * x = b.
+               IF( XMAX.GT.SAFMIN ) THEN
+                  TEMP = ONE / XMAX
+                  DO 230 JR = 1, IEND
+                     VR( JR, IEIG ) = TEMP*WORK( ( ISRC-1 )*N+JR )
+  230             CONTINUE
+               ELSE
+                  IEND = 0
+               END IF
 *
-      CALL ZTRSM( 'Left', UPLO, TRANS, DIAG, N, NRHS, ONE, A, LDA, B,
-     $            LDB )
+               DO 240 JR = IEND + 1, N
+                  VR( JR, IEIG ) = CZERO
+  240          CONTINUE
+*
+            END IF
+  250    CONTINUE
+      END IF
 *
       RETURN
 *
-*     End of ZTRTRS
+*     End of ZTGEVC
 *
       END
-*> \brief \b ZUNG2L generates all or part of the unitary matrix Q from a QL factorization determined by cgeqlf (unblocked algorithm).
+*> \brief \b ZTGEX2 swaps adjacent diagonal blocks in an upper (quasi) triangular matrix pair by an unitary equivalence transformation.
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download ZUNG2L + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/zung2l.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/zung2l.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/zung2l.f"> 
+*> Download ZTGEX2 + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/ztgex2.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/ztgex2.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/ztgex2.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
-*       SUBROUTINE ZUNG2L( M, N, K, A, LDA, TAU, WORK, INFO )
-* 
+*       SUBROUTINE ZTGEX2( WANTQ, WANTZ, N, A, LDA, B, LDB, Q, LDQ, Z,
+*                          LDZ, J1, INFO )
+*
 *       .. Scalar Arguments ..
-*       INTEGER            INFO, K, LDA, M, N
+*       LOGICAL            WANTQ, WANTZ
+*       INTEGER            INFO, J1, LDA, LDB, LDQ, LDZ, N
 *       ..
 *       .. Array Arguments ..
-*       COMPLEX*16         A( LDA, * ), TAU( * ), WORK( * )
+*       COMPLEX*16         A( LDA, * ), B( LDB, * ), Q( LDQ, * ),
+*      $                   Z( LDZ, * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
 *>
 *> \verbatim
 *>
-*> ZUNG2L generates an m by n complex matrix Q with orthonormal columns,
-*> which is defined as the last n columns of a product of k elementary
-*> reflectors of order m
+*> ZTGEX2 swaps adjacent diagonal 1 by 1 blocks (A11,B11) and (A22,B22)
+*> in an upper triangular matrix pair (A, B) by an unitary equivalence
+*> transformation.
 *>
-*>       Q  =  H(k) . . . H(2) H(1)
+*> (A, B) must be in generalized Schur canonical form, that is, A and
+*> B are both upper triangular.
+*>
+*> Optionally, the matrices Q and Z of generalized Schur vectors are
+*> updated.
+*>
+*>        Q(in) * A(in) * Z(in)**H = Q(out) * A(out) * Z(out)**H
+*>        Q(in) * B(in) * Z(in)**H = Q(out) * B(out) * Z(out)**H
 *>
-*> as returned by ZGEQLF.
 *> \endverbatim
 *
 *  Arguments:
 *  ==========
 *
-*> \param[in] M
+*> \param[in] WANTQ
 *> \verbatim
-*>          M is INTEGER
-*>          The number of rows of the matrix Q. M >= 0.
+*>          WANTQ is LOGICAL
+*>          .TRUE. : update the left transformation matrix Q;
+*>          .FALSE.: do not update Q.
 *> \endverbatim
 *>
-*> \param[in] N
+*> \param[in] WANTZ
 *> \verbatim
-*>          N is INTEGER
-*>          The number of columns of the matrix Q. M >= N >= 0.
+*>          WANTZ is LOGICAL
+*>          .TRUE. : update the right transformation matrix Z;
+*>          .FALSE.: do not update Z.
 *> \endverbatim
 *>
-*> \param[in] K
+*> \param[in] N
 *> \verbatim
-*>          K is INTEGER
-*>          The number of elementary reflectors whose product defines the
-*>          matrix Q. N >= K >= 0.
+*>          N is INTEGER
+*>          The order of the matrices A and B. N >= 0.
 *> \endverbatim
 *>
 *> \param[in,out] A
 *> \verbatim
-*>          A is COMPLEX*16 array, dimension (LDA,N)
-*>          On entry, the (n-k+i)-th column must contain the vector which
-*>          defines the elementary reflector H(i), for i = 1,2,...,k, as
-*>          returned by ZGEQLF in the last k columns of its array
-*>          argument A.
-*>          On exit, the m-by-n matrix Q.
+*>          A is COMPLEX*16 arrays, dimensions (LDA,N)
+*>          On entry, the matrix A in the pair (A, B).
+*>          On exit, the updated matrix A.
 *> \endverbatim
 *>
 *> \param[in] LDA
 *> \verbatim
 *>          LDA is INTEGER
-*>          The first dimension of the array A. LDA >= max(1,M).
+*>          The leading dimension of the array A. LDA >= max(1,N).
 *> \endverbatim
 *>
-*> \param[in] TAU
+*> \param[in,out] B
 *> \verbatim
-*>          TAU is COMPLEX*16 array, dimension (K)
-*>          TAU(i) must contain the scalar factor of the elementary
-*>          reflector H(i), as returned by ZGEQLF.
+*>          B is COMPLEX*16 arrays, dimensions (LDB,N)
+*>          On entry, the matrix B in the pair (A, B).
+*>          On exit, the updated matrix B.
 *> \endverbatim
 *>
-*> \param[out] WORK
+*> \param[in] LDB
 *> \verbatim
-*>          WORK is COMPLEX*16 array, dimension (N)
+*>          LDB is INTEGER
+*>          The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in,out] Q
+*> \verbatim
+*>          Q is COMPLEX*16 array, dimension (LDZ,N)
+*>          If WANTQ = .TRUE, on entry, the unitary matrix Q. On exit,
+*>          the updated matrix Q.
+*>          Not referenced if WANTQ = .FALSE..
+*> \endverbatim
+*>
+*> \param[in] LDQ
+*> \verbatim
+*>          LDQ is INTEGER
+*>          The leading dimension of the array Q. LDQ >= 1;
+*>          If WANTQ = .TRUE., LDQ >= N.
+*> \endverbatim
+*>
+*> \param[in,out] Z
+*> \verbatim
+*>          Z is COMPLEX*16 array, dimension (LDZ,N)
+*>          If WANTZ = .TRUE, on entry, the unitary matrix Z. On exit,
+*>          the updated matrix Z.
+*>          Not referenced if WANTZ = .FALSE..
+*> \endverbatim
+*>
+*> \param[in] LDZ
+*> \verbatim
+*>          LDZ is INTEGER
+*>          The leading dimension of the array Z. LDZ >= 1;
+*>          If WANTZ = .TRUE., LDZ >= N.
+*> \endverbatim
+*>
+*> \param[in] J1
+*> \verbatim
+*>          J1 is INTEGER
+*>          The index to the first block (A11, B11).
 *> \endverbatim
 *>
 *> \param[out] INFO
 *> \verbatim
 *>          INFO is INTEGER
-*>          = 0: successful exit
-*>          < 0: if INFO = -i, the i-th argument has an illegal value
+*>           =0:  Successful exit.
+*>           =1:  The transformed matrix pair (A, B) would be too far
+*>                from generalized Schur form; the problem is ill-
+*>                conditioned.
 *> \endverbatim
 *
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date September 2012
+*> \date December 2016
 *
-*> \ingroup complex16OTHERcomputational
+*> \ingroup complex16GEauxiliary
+*
+*> \par Further Details:
+*  =====================
+*>
+*>  In the current code both weak and strong stability tests are
+*>  performed. The user can omit the strong stability test by changing
+*>  the internal logical parameter WANDS to .FALSE.. See ref. [2] for
+*>  details.
+*
+*> \par Contributors:
+*  ==================
+*>
+*>     Bo Kagstrom and Peter Poromaa, Department of Computing Science,
+*>     Umea University, S-901 87 Umea, Sweden.
 *
+*> \par References:
+*  ================
+*>
+*>  [1] B. Kagstrom; A Direct Method for Reordering Eigenvalues in the
+*>      Generalized Real Schur Form of a Regular Matrix Pair (A, B), in
+*>      M.S. Moonen et al (eds), Linear Algebra for Large Scale and
+*>      Real-Time Applications, Kluwer Academic Publ. 1993, pp 195-218.
+*> \n
+*>  [2] B. Kagstrom and P. Poromaa; Computing Eigenspaces with Specified
+*>      Eigenvalues of a Regular Matrix Pair (A, B) and Condition
+*>      Estimation: Theory, Algorithms and Software, Report UMINF-94.04,
+*>      Department of Computing Science, Umea University, S-901 87 Umea,
+*>      Sweden, 1994. Also as LAPACK Working Note 87. To appear in
+*>      Numerical Algorithms, 1996.
+*>
 *  =====================================================================
-      SUBROUTINE ZUNG2L( M, N, K, A, LDA, TAU, WORK, INFO )
+      SUBROUTINE ZTGEX2( WANTQ, WANTZ, N, A, LDA, B, LDB, Q, LDQ, Z,
+     $                   LDZ, J1, INFO )
 *
-*  -- LAPACK computational routine (version 3.4.2) --
+*  -- LAPACK auxiliary routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     September 2012
+*     December 2016
 *
 *     .. Scalar Arguments ..
-      INTEGER            INFO, K, LDA, M, N
+      LOGICAL            WANTQ, WANTZ
+      INTEGER            INFO, J1, LDA, LDB, LDQ, LDZ, N
 *     ..
 *     .. Array Arguments ..
-      COMPLEX*16         A( LDA, * ), TAU( * ), WORK( * )
+      COMPLEX*16         A( LDA, * ), B( LDB, * ), Q( LDQ, * ),
+     $                   Z( LDZ, * )
 *     ..
 *
 *  =====================================================================
 *
 *     .. Parameters ..
-      COMPLEX*16         ONE, ZERO
-      PARAMETER          ( ONE = ( 1.0D+0, 0.0D+0 ),
-     $                   ZERO = ( 0.0D+0, 0.0D+0 ) )
+      COMPLEX*16         CZERO, CONE
+      PARAMETER          ( CZERO = ( 0.0D+0, 0.0D+0 ),
+     $                   CONE = ( 1.0D+0, 0.0D+0 ) )
+      DOUBLE PRECISION   TWENTY
+      PARAMETER          ( TWENTY = 2.0D+1 )
+      INTEGER            LDST
+      PARAMETER          ( LDST = 2 )
+      LOGICAL            WANDS
+      PARAMETER          ( WANDS = .TRUE. )
 *     ..
 *     .. Local Scalars ..
-      INTEGER            I, II, J, L
+      LOGICAL            DTRONG, WEAK
+      INTEGER            I, M
+      DOUBLE PRECISION   CQ, CZ, EPS, SA, SB, SCALE, SMLNUM, SS, SUM,
+     $                   THRESH, WS
+      COMPLEX*16         CDUM, F, G, SQ, SZ
+*     ..
+*     .. Local Arrays ..
+      COMPLEX*16         S( LDST, LDST ), T( LDST, LDST ), WORK( 8 )
+*     ..
+*     .. External Functions ..
+      DOUBLE PRECISION   DLAMCH
+      EXTERNAL           DLAMCH
 *     ..
 *     .. External Subroutines ..
-      EXTERNAL           XERBLA, ZLARF, ZSCAL
+      EXTERNAL           ZLACPY, ZLARTG, ZLASSQ, ZROT
 *     ..
 *     .. Intrinsic Functions ..
-      INTRINSIC          MAX
+      INTRINSIC          ABS, DBLE, DCONJG, MAX, SQRT
 *     ..
 *     .. Executable Statements ..
 *
-*     Test the input arguments
-*
       INFO = 0
-      IF( M.LT.0 ) THEN
-         INFO = -1
-      ELSE IF( N.LT.0 .OR. N.GT.M ) THEN
-         INFO = -2
-      ELSE IF( K.LT.0 .OR. K.GT.N ) THEN
-         INFO = -3
-      ELSE IF( LDA.LT.MAX( 1, M ) ) THEN
-         INFO = -5
-      END IF
-      IF( INFO.NE.0 ) THEN
-         CALL XERBLA( 'ZUNG2L', -INFO )
-         RETURN
-      END IF
 *
 *     Quick return if possible
 *
-      IF( N.LE.0 )
+      IF( N.LE.1 )
      $   RETURN
 *
-*     Initialise columns 1:n-k to columns of the unit matrix
+      M = LDST
+      WEAK = .FALSE.
+      DTRONG = .FALSE.
 *
-      DO 20 J = 1, N - K
-         DO 10 L = 1, M
-            A( L, J ) = ZERO
+*     Make a local copy of selected block in (A, B)
+*
+      CALL ZLACPY( 'Full', M, M, A( J1, J1 ), LDA, S, LDST )
+      CALL ZLACPY( 'Full', M, M, B( J1, J1 ), LDB, T, LDST )
+*
+*     Compute the threshold for testing the acceptance of swapping.
+*
+      EPS = DLAMCH( 'P' )
+      SMLNUM = DLAMCH( 'S' ) / EPS
+      SCALE = DBLE( CZERO )
+      SUM = DBLE( CONE )
+      CALL ZLACPY( 'Full', M, M, S, LDST, WORK, M )
+      CALL ZLACPY( 'Full', M, M, T, LDST, WORK( M*M+1 ), M )
+      CALL ZLASSQ( 2*M*M, WORK, 1, SCALE, SUM )
+      SA = SCALE*SQRT( SUM )
+*
+*     THRES has been changed from
+*        THRESH = MAX( TEN*EPS*SA, SMLNUM )
+*     to
+*        THRESH = MAX( TWENTY*EPS*SA, SMLNUM )
+*     on 04/01/10.
+*     "Bug" reported by Ondra Kamenik, confirmed by Julie Langou, fixed by
+*     Jim Demmel and Guillaume Revy. See forum post 1783.
+*
+      THRESH = MAX( TWENTY*EPS*SA, SMLNUM )
+*
+*     Compute unitary QL and RQ that swap 1-by-1 and 1-by-1 blocks
+*     using Givens rotations and perform the swap tentatively.
+*
+      F = S( 2, 2 )*T( 1, 1 ) - T( 2, 2 )*S( 1, 1 )
+      G = S( 2, 2 )*T( 1, 2 ) - T( 2, 2 )*S( 1, 2 )
+      SA = ABS( S( 2, 2 ) )
+      SB = ABS( T( 2, 2 ) )
+      CALL ZLARTG( G, F, CZ, SZ, CDUM )
+      SZ = -SZ
+      CALL ZROT( 2, S( 1, 1 ), 1, S( 1, 2 ), 1, CZ, DCONJG( SZ ) )
+      CALL ZROT( 2, T( 1, 1 ), 1, T( 1, 2 ), 1, CZ, DCONJG( SZ ) )
+      IF( SA.GE.SB ) THEN
+         CALL ZLARTG( S( 1, 1 ), S( 2, 1 ), CQ, SQ, CDUM )
+      ELSE
+         CALL ZLARTG( T( 1, 1 ), T( 2, 1 ), CQ, SQ, CDUM )
+      END IF
+      CALL ZROT( 2, S( 1, 1 ), LDST, S( 2, 1 ), LDST, CQ, SQ )
+      CALL ZROT( 2, T( 1, 1 ), LDST, T( 2, 1 ), LDST, CQ, SQ )
+*
+*     Weak stability test: |S21| + |T21| <= O(EPS F-norm((S, T)))
+*
+      WS = ABS( S( 2, 1 ) ) + ABS( T( 2, 1 ) )
+      WEAK = WS.LE.THRESH
+      IF( .NOT.WEAK )
+     $   GO TO 20
+*
+      IF( WANDS ) THEN
+*
+*        Strong stability test:
+*           F-norm((A-QL**H*S*QR, B-QL**H*T*QR)) <= O(EPS*F-norm((A, B)))
+*
+         CALL ZLACPY( 'Full', M, M, S, LDST, WORK, M )
+         CALL ZLACPY( 'Full', M, M, T, LDST, WORK( M*M+1 ), M )
+         CALL ZROT( 2, WORK, 1, WORK( 3 ), 1, CZ, -DCONJG( SZ ) )
+         CALL ZROT( 2, WORK( 5 ), 1, WORK( 7 ), 1, CZ, -DCONJG( SZ ) )
+         CALL ZROT( 2, WORK, 2, WORK( 2 ), 2, CQ, -SQ )
+         CALL ZROT( 2, WORK( 5 ), 2, WORK( 6 ), 2, CQ, -SQ )
+         DO 10 I = 1, 2
+            WORK( I ) = WORK( I ) - A( J1+I-1, J1 )
+            WORK( I+2 ) = WORK( I+2 ) - A( J1+I-1, J1+1 )
+            WORK( I+4 ) = WORK( I+4 ) - B( J1+I-1, J1 )
+            WORK( I+6 ) = WORK( I+6 ) - B( J1+I-1, J1+1 )
    10    CONTINUE
-         A( M-N+J, J ) = ONE
-   20 CONTINUE
+         SCALE = DBLE( CZERO )
+         SUM = DBLE( CONE )
+         CALL ZLASSQ( 2*M*M, WORK, 1, SCALE, SUM )
+         SS = SCALE*SQRT( SUM )
+         DTRONG = SS.LE.THRESH
+         IF( .NOT.DTRONG )
+     $      GO TO 20
+      END IF
 *
-      DO 40 I = 1, K
-         II = N - K + I
+*     If the swap is accepted ("weakly" and "strongly"), apply the
+*     equivalence transformations to the original matrix pair (A,B)
 *
-*        Apply H(i) to A(1:m-k+i,1:n-k+i) from the left
+      CALL ZROT( J1+1, A( 1, J1 ), 1, A( 1, J1+1 ), 1, CZ,
+     $           DCONJG( SZ ) )
+      CALL ZROT( J1+1, B( 1, J1 ), 1, B( 1, J1+1 ), 1, CZ,
+     $           DCONJG( SZ ) )
+      CALL ZROT( N-J1+1, A( J1, J1 ), LDA, A( J1+1, J1 ), LDA, CQ, SQ )
+      CALL ZROT( N-J1+1, B( J1, J1 ), LDB, B( J1+1, J1 ), LDB, CQ, SQ )
 *
-         A( M-N+II, II ) = ONE
-         CALL ZLARF( 'Left', M-N+II, II-1, A( 1, II ), 1, TAU( I ), A,
-     $               LDA, WORK )
-         CALL ZSCAL( M-N+II-1, -TAU( I ), A( 1, II ), 1 )
-         A( M-N+II, II ) = ONE - TAU( I )
+*     Set  N1 by N2 (2,1) blocks to 0
 *
-*        Set A(m-k+i+1:m,n-k+i) to zero
+      A( J1+1, J1 ) = CZERO
+      B( J1+1, J1 ) = CZERO
+*
+*     Accumulate transformations into Q and Z if requested.
+*
+      IF( WANTZ )
+     $   CALL ZROT( N, Z( 1, J1 ), 1, Z( 1, J1+1 ), 1, CZ,
+     $              DCONJG( SZ ) )
+      IF( WANTQ )
+     $   CALL ZROT( N, Q( 1, J1 ), 1, Q( 1, J1+1 ), 1, CQ,
+     $              DCONJG( SQ ) )
+*
+*     Exit with INFO = 0 if swap was successfully performed.
 *
-         DO 30 L = M - N + II + 1, M
-            A( L, II ) = ZERO
-   30    CONTINUE
-   40 CONTINUE
       RETURN
 *
-*     End of ZUNG2L
+*     Exit with INFO = 1 if swap was rejected.
+*
+   20 CONTINUE
+      INFO = 1
+      RETURN
+*
+*     End of ZTGEX2
 *
       END
-*> \brief \b ZUNG2R
+*> \brief \b ZTGEXC
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download ZUNG2R + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/zung2r.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/zung2r.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/zung2r.f"> 
+*> Download ZTGEXC + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/ztgexc.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/ztgexc.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/ztgexc.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
-*       SUBROUTINE ZUNG2R( M, N, K, A, LDA, TAU, WORK, INFO )
-* 
+*       SUBROUTINE ZTGEXC( WANTQ, WANTZ, N, A, LDA, B, LDB, Q, LDQ, Z,
+*                          LDZ, IFST, ILST, INFO )
+*
 *       .. Scalar Arguments ..
-*       INTEGER            INFO, K, LDA, M, N
+*       LOGICAL            WANTQ, WANTZ
+*       INTEGER            IFST, ILST, INFO, LDA, LDB, LDQ, LDZ, N
 *       ..
 *       .. Array Arguments ..
-*       COMPLEX*16         A( LDA, * ), TAU( * ), WORK( * )
+*       COMPLEX*16         A( LDA, * ), B( LDB, * ), Q( LDQ, * ),
+*      $                   Z( LDZ, * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
 *>
 *> \verbatim
 *>
-*> ZUNG2R generates an m by n complex matrix Q with orthonormal columns,
-*> which is defined as the first n columns of a product of k elementary
-*> reflectors of order m
+*> ZTGEXC reorders the generalized Schur decomposition of a complex
+*> matrix pair (A,B), using an unitary equivalence transformation
+*> (A, B) := Q * (A, B) * Z**H, so that the diagonal block of (A, B) with
+*> row index IFST is moved to row ILST.
 *>
-*>       Q  =  H(1) H(2) . . . H(k)
+*> (A, B) must be in generalized Schur canonical form, that is, A and
+*> B are both upper triangular.
 *>
-*> as returned by ZGEQRF.
+*> Optionally, the matrices Q and Z of generalized Schur vectors are
+*> updated.
+*>
+*>        Q(in) * A(in) * Z(in)**H = Q(out) * A(out) * Z(out)**H
+*>        Q(in) * B(in) * Z(in)**H = Q(out) * B(out) * Z(out)**H
 *> \endverbatim
 *
 *  Arguments:
 *  ==========
 *
-*> \param[in] M
+*> \param[in] WANTQ
 *> \verbatim
-*>          M is INTEGER
-*>          The number of rows of the matrix Q. M >= 0.
+*>          WANTQ is LOGICAL
+*>          .TRUE. : update the left transformation matrix Q;
+*>          .FALSE.: do not update Q.
 *> \endverbatim
 *>
-*> \param[in] N
+*> \param[in] WANTZ
 *> \verbatim
-*>          N is INTEGER
-*>          The number of columns of the matrix Q. M >= N >= 0.
+*>          WANTZ is LOGICAL
+*>          .TRUE. : update the right transformation matrix Z;
+*>          .FALSE.: do not update Z.
 *> \endverbatim
 *>
-*> \param[in] K
+*> \param[in] N
 *> \verbatim
-*>          K is INTEGER
-*>          The number of elementary reflectors whose product defines the
-*>          matrix Q. N >= K >= 0.
+*>          N is INTEGER
+*>          The order of the matrices A and B. N >= 0.
 *> \endverbatim
 *>
 *> \param[in,out] A
 *> \verbatim
 *>          A is COMPLEX*16 array, dimension (LDA,N)
-*>          On entry, the i-th column must contain the vector which
-*>          defines the elementary reflector H(i), for i = 1,2,...,k, as
-*>          returned by ZGEQRF in the first k columns of its array
-*>          argument A.
-*>          On exit, the m by n matrix Q.
+*>          On entry, the upper triangular matrix A in the pair (A, B).
+*>          On exit, the updated matrix A.
 *> \endverbatim
 *>
 *> \param[in] LDA
 *> \verbatim
 *>          LDA is INTEGER
-*>          The first dimension of the array A. LDA >= max(1,M).
+*>          The leading dimension of the array A. LDA >= max(1,N).
 *> \endverbatim
 *>
-*> \param[in] TAU
+*> \param[in,out] B
 *> \verbatim
-*>          TAU is COMPLEX*16 array, dimension (K)
-*>          TAU(i) must contain the scalar factor of the elementary
-*>          reflector H(i), as returned by ZGEQRF.
+*>          B is COMPLEX*16 array, dimension (LDB,N)
+*>          On entry, the upper triangular matrix B in the pair (A, B).
+*>          On exit, the updated matrix B.
 *> \endverbatim
 *>
-*> \param[out] WORK
+*> \param[in] LDB
 *> \verbatim
-*>          WORK is COMPLEX*16 array, dimension (N)
+*>          LDB is INTEGER
+*>          The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in,out] Q
+*> \verbatim
+*>          Q is COMPLEX*16 array, dimension (LDZ,N)
+*>          On entry, if WANTQ = .TRUE., the unitary matrix Q.
+*>          On exit, the updated matrix Q.
+*>          If WANTQ = .FALSE., Q is not referenced.
+*> \endverbatim
+*>
+*> \param[in] LDQ
+*> \verbatim
+*>          LDQ is INTEGER
+*>          The leading dimension of the array Q. LDQ >= 1;
+*>          If WANTQ = .TRUE., LDQ >= N.
+*> \endverbatim
+*>
+*> \param[in,out] Z
+*> \verbatim
+*>          Z is COMPLEX*16 array, dimension (LDZ,N)
+*>          On entry, if WANTZ = .TRUE., the unitary matrix Z.
+*>          On exit, the updated matrix Z.
+*>          If WANTZ = .FALSE., Z is not referenced.
+*> \endverbatim
+*>
+*> \param[in] LDZ
+*> \verbatim
+*>          LDZ is INTEGER
+*>          The leading dimension of the array Z. LDZ >= 1;
+*>          If WANTZ = .TRUE., LDZ >= N.
+*> \endverbatim
+*>
+*> \param[in] IFST
+*> \verbatim
+*>          IFST is INTEGER
+*> \endverbatim
+*>
+*> \param[in,out] ILST
+*> \verbatim
+*>          ILST is INTEGER
+*>          Specify the reordering of the diagonal blocks of (A, B).
+*>          The block with row index IFST is moved to row ILST, by a
+*>          sequence of swapping between adjacent blocks.
 *> \endverbatim
 *>
 *> \param[out] INFO
 *> \verbatim
 *>          INFO is INTEGER
-*>          = 0: successful exit
-*>          < 0: if INFO = -i, the i-th argument has an illegal value
+*>           =0:  Successful exit.
+*>           <0:  if INFO = -i, the i-th argument had an illegal value.
+*>           =1:  The transformed matrix pair (A, B) would be too far
+*>                from generalized Schur form; the problem is ill-
+*>                conditioned. (A, B) may have been partially reordered,
+*>                and ILST points to the first row of the current
+*>                position of the block being moved.
 *> \endverbatim
 *
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date November 2011
+*> \date December 2016
 *
-*> \ingroup complex16OTHERcomputational
+*> \ingroup complex16GEcomputational
+*
+*> \par Contributors:
+*  ==================
+*>
+*>     Bo Kagstrom and Peter Poromaa, Department of Computing Science,
+*>     Umea University, S-901 87 Umea, Sweden.
 *
+*> \par References:
+*  ================
+*>
+*>  [1] B. Kagstrom; A Direct Method for Reordering Eigenvalues in the
+*>      Generalized Real Schur Form of a Regular Matrix Pair (A, B), in
+*>      M.S. Moonen et al (eds), Linear Algebra for Large Scale and
+*>      Real-Time Applications, Kluwer Academic Publ. 1993, pp 195-218.
+*> \n
+*>  [2] B. Kagstrom and P. Poromaa; Computing Eigenspaces with Specified
+*>      Eigenvalues of a Regular Matrix Pair (A, B) and Condition
+*>      Estimation: Theory, Algorithms and Software, Report
+*>      UMINF - 94.04, Department of Computing Science, Umea University,
+*>      S-901 87 Umea, Sweden, 1994. Also as LAPACK Working Note 87.
+*>      To appear in Numerical Algorithms, 1996.
+*> \n
+*>  [3] B. Kagstrom and P. Poromaa, LAPACK-Style Algorithms and Software
+*>      for Solving the Generalized Sylvester Equation and Estimating the
+*>      Separation between Regular Matrix Pairs, Report UMINF - 93.23,
+*>      Department of Computing Science, Umea University, S-901 87 Umea,
+*>      Sweden, December 1993, Revised April 1994, Also as LAPACK working
+*>      Note 75. To appear in ACM Trans. on Math. Software, Vol 22, No 1,
+*>      1996.
+*>
 *  =====================================================================
-      SUBROUTINE ZUNG2R( M, N, K, A, LDA, TAU, WORK, INFO )
+      SUBROUTINE ZTGEXC( WANTQ, WANTZ, N, A, LDA, B, LDB, Q, LDQ, Z,
+     $                   LDZ, IFST, ILST, INFO )
 *
-*  -- LAPACK computational routine (version 3.4.0) --
+*  -- LAPACK computational routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     November 2011
+*     December 2016
 *
 *     .. Scalar Arguments ..
-      INTEGER            INFO, K, LDA, M, N
+      LOGICAL            WANTQ, WANTZ
+      INTEGER            IFST, ILST, INFO, LDA, LDB, LDQ, LDZ, N
 *     ..
 *     .. Array Arguments ..
-      COMPLEX*16         A( LDA, * ), TAU( * ), WORK( * )
+      COMPLEX*16         A( LDA, * ), B( LDB, * ), Q( LDQ, * ),
+     $                   Z( LDZ, * )
 *     ..
 *
 *  =====================================================================
 *
-*     .. Parameters ..
-      COMPLEX*16         ONE, ZERO
-      PARAMETER          ( ONE = ( 1.0D+0, 0.0D+0 ),
-     $                   ZERO = ( 0.0D+0, 0.0D+0 ) )
-*     ..
 *     .. Local Scalars ..
-      INTEGER            I, J, L
+      INTEGER            HERE
 *     ..
 *     .. External Subroutines ..
-      EXTERNAL           XERBLA, ZLARF, ZSCAL
+      EXTERNAL           XERBLA, ZTGEX2
 *     ..
 *     .. Intrinsic Functions ..
       INTRINSIC          MAX
 *     ..
 *     .. Executable Statements ..
 *
-*     Test the input arguments
-*
+*     Decode and test input arguments.
       INFO = 0
-      IF( M.LT.0 ) THEN
-         INFO = -1
-      ELSE IF( N.LT.0 .OR. N.GT.M ) THEN
-         INFO = -2
-      ELSE IF( K.LT.0 .OR. K.GT.N ) THEN
+      IF( N.LT.0 ) THEN
          INFO = -3
-      ELSE IF( LDA.LT.MAX( 1, M ) ) THEN
+      ELSE IF( LDA.LT.MAX( 1, N ) ) THEN
          INFO = -5
+      ELSE IF( LDB.LT.MAX( 1, N ) ) THEN
+         INFO = -7
+      ELSE IF( LDQ.LT.1 .OR. WANTQ .AND. ( LDQ.LT.MAX( 1, N ) ) ) THEN
+         INFO = -9
+      ELSE IF( LDZ.LT.1 .OR. WANTZ .AND. ( LDZ.LT.MAX( 1, N ) ) ) THEN
+         INFO = -11
+      ELSE IF( IFST.LT.1 .OR. IFST.GT.N ) THEN
+         INFO = -12
+      ELSE IF( ILST.LT.1 .OR. ILST.GT.N ) THEN
+         INFO = -13
       END IF
       IF( INFO.NE.0 ) THEN
-         CALL XERBLA( 'ZUNG2R', -INFO )
+         CALL XERBLA( 'ZTGEXC', -INFO )
          RETURN
       END IF
 *
 *     Quick return if possible
 *
-      IF( N.LE.0 )
+      IF( N.LE.1 )
+     $   RETURN
+      IF( IFST.EQ.ILST )
      $   RETURN
 *
-*     Initialise columns k+1:n to columns of the unit matrix
+      IF( IFST.LT.ILST ) THEN
 *
-      DO 20 J = K + 1, N
-         DO 10 L = 1, M
-            A( L, J ) = ZERO
-   10    CONTINUE
-         A( J, J ) = ONE
-   20 CONTINUE
+         HERE = IFST
 *
-      DO 40 I = K, 1, -1
+   10    CONTINUE
 *
-*        Apply H(i) to A(i:m,i:n) from the left
+*        Swap with next one below
 *
-         IF( I.LT.N ) THEN
-            A( I, I ) = ONE
-            CALL ZLARF( 'Left', M-I+1, N-I, A( I, I ), 1, TAU( I ),
-     $                  A( I, I+1 ), LDA, WORK )
+         CALL ZTGEX2( WANTQ, WANTZ, N, A, LDA, B, LDB, Q, LDQ, Z, LDZ,
+     $                HERE, INFO )
+         IF( INFO.NE.0 ) THEN
+            ILST = HERE
+            RETURN
          END IF
-         IF( I.LT.M )
-     $      CALL ZSCAL( M-I, -TAU( I ), A( I+1, I ), 1 )
-         A( I, I ) = ONE - TAU( I )
+         HERE = HERE + 1
+         IF( HERE.LT.ILST )
+     $      GO TO 10
+         HERE = HERE - 1
+      ELSE
+         HERE = IFST - 1
 *
-*        Set A(1:i-1,i) to zero
+   20    CONTINUE
 *
-         DO 30 L = 1, I - 1
-            A( L, I ) = ZERO
-   30    CONTINUE
-   40 CONTINUE
+*        Swap with next one above
+*
+         CALL ZTGEX2( WANTQ, WANTZ, N, A, LDA, B, LDB, Q, LDQ, Z, LDZ,
+     $                HERE, INFO )
+         IF( INFO.NE.0 ) THEN
+            ILST = HERE
+            RETURN
+         END IF
+         HERE = HERE - 1
+         IF( HERE.GE.ILST )
+     $      GO TO 20
+         HERE = HERE + 1
+      END IF
+      ILST = HERE
       RETURN
 *
-*     End of ZUNG2R
+*     End of ZTGEXC
 *
       END
-*> \brief \b ZUNGBR
+*> \brief \b ZTGSEN
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download ZUNGBR + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/zungbr.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/zungbr.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/zungbr.f"> 
+*> Download ZTGSEN + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/ztgsen.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/ztgsen.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/ztgsen.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
-*       SUBROUTINE ZUNGBR( VECT, M, N, K, A, LDA, TAU, WORK, LWORK, INFO )
-* 
+*       SUBROUTINE ZTGSEN( IJOB, WANTQ, WANTZ, SELECT, N, A, LDA, B, LDB,
+*                          ALPHA, BETA, Q, LDQ, Z, LDZ, M, PL, PR, DIF,
+*                          WORK, LWORK, IWORK, LIWORK, INFO )
+*
 *       .. Scalar Arguments ..
-*       CHARACTER          VECT
-*       INTEGER            INFO, K, LDA, LWORK, M, N
+*       LOGICAL            WANTQ, WANTZ
+*       INTEGER            IJOB, INFO, LDA, LDB, LDQ, LDZ, LIWORK, LWORK,
+*      $                   M, N
+*       DOUBLE PRECISION   PL, PR
 *       ..
 *       .. Array Arguments ..
-*       COMPLEX*16         A( LDA, * ), TAU( * ), WORK( * )
+*       LOGICAL            SELECT( * )
+*       INTEGER            IWORK( * )
+*       DOUBLE PRECISION   DIF( * )
+*       COMPLEX*16         A( LDA, * ), ALPHA( * ), B( LDB, * ),
+*      $                   BETA( * ), Q( LDQ, * ), WORK( * ), Z( LDZ, * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
 *>
 *> \verbatim
 *>
-*> ZUNGBR generates one of the complex unitary matrices Q or P**H
-*> determined by ZGEBRD when reducing a complex matrix A to bidiagonal
-*> form: A = Q * B * P**H.  Q and P**H are defined as products of
-*> elementary reflectors H(i) or G(i) respectively.
+*> ZTGSEN reorders the generalized Schur decomposition of a complex
+*> matrix pair (A, B) (in terms of an unitary equivalence trans-
+*> formation Q**H * (A, B) * Z), so that a selected cluster of eigenvalues
+*> appears in the leading diagonal blocks of the pair (A,B). The leading
+*> columns of Q and Z form unitary bases of the corresponding left and
+*> right eigenspaces (deflating subspaces). (A, B) must be in
+*> generalized Schur canonical form, that is, A and B are both upper
+*> triangular.
 *>
-*> If VECT = 'Q', A is assumed to have been an M-by-K matrix, and Q
-*> is of order M:
-*> if m >= k, Q = H(1) H(2) . . . H(k) and ZUNGBR returns the first n
-*> columns of Q, where m >= n >= k;
-*> if m < k, Q = H(1) H(2) . . . H(m-1) and ZUNGBR returns Q as an
-*> M-by-M matrix.
+*> ZTGSEN also computes the generalized eigenvalues
+*>
+*>          w(j)= ALPHA(j) / BETA(j)
+*>
+*> of the reordered matrix pair (A, B).
+*>
+*> Optionally, the routine computes estimates of reciprocal condition
+*> numbers for eigenvalues and eigenspaces. These are Difu[(A11,B11),
+*> (A22,B22)] and Difl[(A11,B11), (A22,B22)], i.e. the separation(s)
+*> between the matrix pairs (A11, B11) and (A22,B22) that correspond to
+*> the selected cluster and the eigenvalues outside the cluster, resp.,
+*> and norms of "projections" onto left and right eigenspaces w.r.t.
+*> the selected cluster in the (1,1)-block.
 *>
-*> If VECT = 'P', A is assumed to have been a K-by-N matrix, and P**H
-*> is of order N:
-*> if k < n, P**H = G(k) . . . G(2) G(1) and ZUNGBR returns the first m
-*> rows of P**H, where n >= m >= k;
-*> if k >= n, P**H = G(n-1) . . . G(2) G(1) and ZUNGBR returns P**H as
-*> an N-by-N matrix.
 *> \endverbatim
 *
 *  Arguments:
 *  ==========
 *
-*> \param[in] VECT
+*> \param[in] IJOB
 *> \verbatim
-*>          VECT is CHARACTER*1
-*>          Specifies whether the matrix Q or the matrix P**H is
-*>          required, as defined in the transformation applied by ZGEBRD:
-*>          = 'Q':  generate Q;
-*>          = 'P':  generate P**H.
+*>          IJOB is integer
+*>          Specifies whether condition numbers are required for the
+*>          cluster of eigenvalues (PL and PR) or the deflating subspaces
+*>          (Difu and Difl):
+*>           =0: Only reorder w.r.t. SELECT. No extras.
+*>           =1: Reciprocal of norms of "projections" onto left and right
+*>               eigenspaces w.r.t. the selected cluster (PL and PR).
+*>           =2: Upper bounds on Difu and Difl. F-norm-based estimate
+*>               (DIF(1:2)).
+*>           =3: Estimate of Difu and Difl. 1-norm-based estimate
+*>               (DIF(1:2)).
+*>               About 5 times as expensive as IJOB = 2.
+*>           =4: Compute PL, PR and DIF (i.e. 0, 1 and 2 above): Economic
+*>               version to get it all.
+*>           =5: Compute PL, PR and DIF (i.e. 0, 1 and 3 above)
 *> \endverbatim
 *>
-*> \param[in] M
+*> \param[in] WANTQ
 *> \verbatim
-*>          M is INTEGER
-*>          The number of rows of the matrix Q or P**H to be returned.
-*>          M >= 0.
+*>          WANTQ is LOGICAL
+*>          .TRUE. : update the left transformation matrix Q;
+*>          .FALSE.: do not update Q.
 *> \endverbatim
 *>
-*> \param[in] N
+*> \param[in] WANTZ
 *> \verbatim
-*>          N is INTEGER
-*>          The number of columns of the matrix Q or P**H to be returned.
-*>          N >= 0.
-*>          If VECT = 'Q', M >= N >= min(M,K);
-*>          if VECT = 'P', N >= M >= min(N,K).
+*>          WANTZ is LOGICAL
+*>          .TRUE. : update the right transformation matrix Z;
+*>          .FALSE.: do not update Z.
 *> \endverbatim
 *>
-*> \param[in] K
+*> \param[in] SELECT
 *> \verbatim
-*>          K is INTEGER
-*>          If VECT = 'Q', the number of columns in the original M-by-K
-*>          matrix reduced by ZGEBRD.
-*>          If VECT = 'P', the number of rows in the original K-by-N
-*>          matrix reduced by ZGEBRD.
-*>          K >= 0.
+*>          SELECT is LOGICAL array, dimension (N)
+*>          SELECT specifies the eigenvalues in the selected cluster. To
+*>          select an eigenvalue w(j), SELECT(j) must be set to
+*>          .TRUE..
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*>          N is INTEGER
+*>          The order of the matrices A and B. N >= 0.
 *> \endverbatim
 *>
 *> \param[in,out] A
 *> \verbatim
-*>          A is COMPLEX*16 array, dimension (LDA,N)
-*>          On entry, the vectors which define the elementary reflectors,
-*>          as returned by ZGEBRD.
-*>          On exit, the M-by-N matrix Q or P**H.
+*>          A is COMPLEX*16 array, dimension(LDA,N)
+*>          On entry, the upper triangular matrix A, in generalized
+*>          Schur canonical form.
+*>          On exit, A is overwritten by the reordered matrix A.
 *> \endverbatim
 *>
 *> \param[in] LDA
 *> \verbatim
 *>          LDA is INTEGER
-*>          The leading dimension of the array A. LDA >= M.
+*>          The leading dimension of the array A. LDA >= max(1,N).
 *> \endverbatim
 *>
-*> \param[in] TAU
+*> \param[in,out] B
 *> \verbatim
-*>          TAU is COMPLEX*16 array, dimension
-*>                                (min(M,K)) if VECT = 'Q'
-*>                                (min(N,K)) if VECT = 'P'
-*>          TAU(i) must contain the scalar factor of the elementary
-*>          reflector H(i) or G(i), which determines Q or P**H, as
-*>          returned by ZGEBRD in its array argument TAUQ or TAUP.
+*>          B is COMPLEX*16 array, dimension(LDB,N)
+*>          On entry, the upper triangular matrix B, in generalized
+*>          Schur canonical form.
+*>          On exit, B is overwritten by the reordered matrix B.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*>          LDB is INTEGER
+*>          The leading dimension of the array B. LDB >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] ALPHA
+*> \verbatim
+*>          ALPHA is COMPLEX*16 array, dimension (N)
+*> \endverbatim
+*>
+*> \param[out] BETA
+*> \verbatim
+*>          BETA is COMPLEX*16 array, dimension (N)
+*>
+*>          The diagonal elements of A and B, respectively,
+*>          when the pair (A,B) has been reduced to generalized Schur
+*>          form.  ALPHA(i)/BETA(i) i=1,...,N are the generalized
+*>          eigenvalues.
+*> \endverbatim
+*>
+*> \param[in,out] Q
+*> \verbatim
+*>          Q is COMPLEX*16 array, dimension (LDQ,N)
+*>          On entry, if WANTQ = .TRUE., Q is an N-by-N matrix.
+*>          On exit, Q has been postmultiplied by the left unitary
+*>          transformation matrix which reorder (A, B); The leading M
+*>          columns of Q form orthonormal bases for the specified pair of
+*>          left eigenspaces (deflating subspaces).
+*>          If WANTQ = .FALSE., Q is not referenced.
+*> \endverbatim
+*>
+*> \param[in] LDQ
+*> \verbatim
+*>          LDQ is INTEGER
+*>          The leading dimension of the array Q. LDQ >= 1.
+*>          If WANTQ = .TRUE., LDQ >= N.
+*> \endverbatim
+*>
+*> \param[in,out] Z
+*> \verbatim
+*>          Z is COMPLEX*16 array, dimension (LDZ,N)
+*>          On entry, if WANTZ = .TRUE., Z is an N-by-N matrix.
+*>          On exit, Z has been postmultiplied by the left unitary
+*>          transformation matrix which reorder (A, B); The leading M
+*>          columns of Z form orthonormal bases for the specified pair of
+*>          left eigenspaces (deflating subspaces).
+*>          If WANTZ = .FALSE., Z is not referenced.
+*> \endverbatim
+*>
+*> \param[in] LDZ
+*> \verbatim
+*>          LDZ is INTEGER
+*>          The leading dimension of the array Z. LDZ >= 1.
+*>          If WANTZ = .TRUE., LDZ >= N.
+*> \endverbatim
+*>
+*> \param[out] M
+*> \verbatim
+*>          M is INTEGER
+*>          The dimension of the specified pair of left and right
+*>          eigenspaces, (deflating subspaces) 0 <= M <= N.
+*> \endverbatim
+*>
+*> \param[out] PL
+*> \verbatim
+*>          PL is DOUBLE PRECISION
+*> \endverbatim
+*>
+*> \param[out] PR
+*> \verbatim
+*>          PR is DOUBLE PRECISION
+*>
+*>          If IJOB = 1, 4 or 5, PL, PR are lower bounds on the
+*>          reciprocal  of the norm of "projections" onto left and right
+*>          eigenspace with respect to the selected cluster.
+*>          0 < PL, PR <= 1.
+*>          If M = 0 or M = N, PL = PR  = 1.
+*>          If IJOB = 0, 2 or 3 PL, PR are not referenced.
+*> \endverbatim
+*>
+*> \param[out] DIF
+*> \verbatim
+*>          DIF is DOUBLE PRECISION array, dimension (2).
+*>          If IJOB >= 2, DIF(1:2) store the estimates of Difu and Difl.
+*>          If IJOB = 2 or 4, DIF(1:2) are F-norm-based upper bounds on
+*>          Difu and Difl. If IJOB = 3 or 5, DIF(1:2) are 1-norm-based
+*>          estimates of Difu and Difl, computed using reversed
+*>          communication with ZLACN2.
+*>          If M = 0 or N, DIF(1:2) = F-norm([A, B]).
+*>          If IJOB = 0 or 1, DIF is not referenced.
 *> \endverbatim
 *>
 *> \param[out] WORK
@@ -27273,9 +45318,9 @@
 *> \param[in] LWORK
 *> \verbatim
 *>          LWORK is INTEGER
-*>          The dimension of the array WORK. LWORK >= max(1,min(M,N)).
-*>          For optimum performance LWORK >= min(M,N)*NB, where NB
-*>          is the optimal blocksize.
+*>          The dimension of the array WORK. LWORK >=  1
+*>          If IJOB = 1, 2 or 4, LWORK >=  2*M*(N-M)
+*>          If IJOB = 3 or 5, LWORK >=  4*M*(N-M)
 *>
 *>          If LWORK = -1, then a workspace query is assumed; the routine
 *>          only calculates the optimal size of the WORK array, returns
@@ -27283,1342 +45328,2664 @@
 *>          message related to LWORK is issued by XERBLA.
 *> \endverbatim
 *>
+*> \param[out] IWORK
+*> \verbatim
+*>          IWORK is INTEGER array, dimension (MAX(1,LIWORK))
+*>          On exit, if INFO = 0, IWORK(1) returns the optimal LIWORK.
+*> \endverbatim
+*>
+*> \param[in] LIWORK
+*> \verbatim
+*>          LIWORK is INTEGER
+*>          The dimension of the array IWORK. LIWORK >= 1.
+*>          If IJOB = 1, 2 or 4, LIWORK >=  N+2;
+*>          If IJOB = 3 or 5, LIWORK >= MAX(N+2, 2*M*(N-M));
+*>
+*>          If LIWORK = -1, then a workspace query is assumed; the
+*>          routine only calculates the optimal size of the IWORK array,
+*>          returns this value as the first entry of the IWORK array, and
+*>          no error message related to LIWORK is issued by XERBLA.
+*> \endverbatim
+*>
 *> \param[out] INFO
 *> \verbatim
 *>          INFO is INTEGER
-*>          = 0:  successful exit
-*>          < 0:  if INFO = -i, the i-th argument had an illegal value
+*>            =0: Successful exit.
+*>            <0: If INFO = -i, the i-th argument had an illegal value.
+*>            =1: Reordering of (A, B) failed because the transformed
+*>                matrix pair (A, B) would be too far from generalized
+*>                Schur form; the problem is very ill-conditioned.
+*>                (A, B) may have been partially reordered.
+*>                If requested, 0 is returned in DIF(*), PL and PR.
 *> \endverbatim
 *
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date April 2012
+*> \date June 2016
+*
+*> \ingroup complex16OTHERcomputational
+*
+*> \par Further Details:
+*  =====================
+*>
+*> \verbatim
+*>
+*>  ZTGSEN first collects the selected eigenvalues by computing unitary
+*>  U and W that move them to the top left corner of (A, B). In other
+*>  words, the selected eigenvalues are the eigenvalues of (A11, B11) in
+*>
+*>              U**H*(A, B)*W = (A11 A12) (B11 B12) n1
+*>                              ( 0  A22),( 0  B22) n2
+*>                                n1  n2    n1  n2
+*>
+*>  where N = n1+n2 and U**H means the conjugate transpose of U. The first
+*>  n1 columns of U and W span the specified pair of left and right
+*>  eigenspaces (deflating subspaces) of (A, B).
+*>
+*>  If (A, B) has been obtained from the generalized real Schur
+*>  decomposition of a matrix pair (C, D) = Q*(A, B)*Z**H, then the
+*>  reordered generalized Schur form of (C, D) is given by
+*>
+*>           (C, D) = (Q*U)*(U**H *(A, B)*W)*(Z*W)**H,
+*>
+*>  and the first n1 columns of Q*U and Z*W span the corresponding
+*>  deflating subspaces of (C, D) (Q and Z store Q*U and Z*W, resp.).
+*>
+*>  Note that if the selected eigenvalue is sufficiently ill-conditioned,
+*>  then its value may differ significantly from its value before
+*>  reordering.
+*>
+*>  The reciprocal condition numbers of the left and right eigenspaces
+*>  spanned by the first n1 columns of U and W (or Q*U and Z*W) may
+*>  be returned in DIF(1:2), corresponding to Difu and Difl, resp.
+*>
+*>  The Difu and Difl are defined as:
+*>
+*>       Difu[(A11, B11), (A22, B22)] = sigma-min( Zu )
+*>  and
+*>       Difl[(A11, B11), (A22, B22)] = Difu[(A22, B22), (A11, B11)],
+*>
+*>  where sigma-min(Zu) is the smallest singular value of the
+*>  (2*n1*n2)-by-(2*n1*n2) matrix
+*>
+*>       Zu = [ kron(In2, A11)  -kron(A22**H, In1) ]
+*>            [ kron(In2, B11)  -kron(B22**H, In1) ].
+*>
+*>  Here, Inx is the identity matrix of size nx and A22**H is the
+*>  conjugate transpose of A22. kron(X, Y) is the Kronecker product between
+*>  the matrices X and Y.
+*>
+*>  When DIF(2) is small, small changes in (A, B) can cause large changes
+*>  in the deflating subspace. An approximate (asymptotic) bound on the
+*>  maximum angular error in the computed deflating subspaces is
+*>
+*>       EPS * norm((A, B)) / DIF(2),
+*>
+*>  where EPS is the machine precision.
+*>
+*>  The reciprocal norm of the projectors on the left and right
+*>  eigenspaces associated with (A11, B11) may be returned in PL and PR.
+*>  They are computed as follows. First we compute L and R so that
+*>  P*(A, B)*Q is block diagonal, where
+*>
+*>       P = ( I -L ) n1           Q = ( I R ) n1
+*>           ( 0  I ) n2    and        ( 0 I ) n2
+*>             n1 n2                    n1 n2
+*>
+*>  and (L, R) is the solution to the generalized Sylvester equation
+*>
+*>       A11*R - L*A22 = -A12
+*>       B11*R - L*B22 = -B12
+*>
+*>  Then PL = (F-norm(L)**2+1)**(-1/2) and PR = (F-norm(R)**2+1)**(-1/2).
+*>  An approximate (asymptotic) bound on the average absolute error of
+*>  the selected eigenvalues is
+*>
+*>       EPS * norm((A, B)) / PL.
+*>
+*>  There are also global error bounds which valid for perturbations up
+*>  to a certain restriction:  A lower bound (x) on the smallest
+*>  F-norm(E,F) for which an eigenvalue of (A11, B11) may move and
+*>  coalesce with an eigenvalue of (A22, B22) under perturbation (E,F),
+*>  (i.e. (A + E, B + F), is
+*>
+*>   x = min(Difu,Difl)/((1/(PL*PL)+1/(PR*PR))**(1/2)+2*max(1/PL,1/PR)).
+*>
+*>  An approximate bound on x can be computed from DIF(1:2), PL and PR.
+*>
+*>  If y = ( F-norm(E,F) / x) <= 1, the angles between the perturbed
+*>  (L', R') and unperturbed (L, R) left and right deflating subspaces
+*>  associated with the selected cluster in the (1,1)-blocks can be
+*>  bounded as
+*>
+*>   max-angle(L, L') <= arctan( y * PL / (1 - y * (1 - PL * PL)**(1/2))
+*>   max-angle(R, R') <= arctan( y * PR / (1 - y * (1 - PR * PR)**(1/2))
+*>
+*>  See LAPACK User's Guide section 4.11 or the following references
+*>  for more information.
+*>
+*>  Note that if the default method for computing the Frobenius-norm-
+*>  based estimate DIF is not wanted (see ZLATDF), then the parameter
+*>  IDIFJB (see below) should be changed from 3 to 4 (routine ZLATDF
+*>  (IJOB = 2 will be used)). See ZTGSYL for more details.
+*> \endverbatim
 *
-*> \ingroup complex16GBcomputational
+*> \par Contributors:
+*  ==================
+*>
+*>     Bo Kagstrom and Peter Poromaa, Department of Computing Science,
+*>     Umea University, S-901 87 Umea, Sweden.
 *
+*> \par References:
+*  ================
+*>
+*>  [1] B. Kagstrom; A Direct Method for Reordering Eigenvalues in the
+*>      Generalized Real Schur Form of a Regular Matrix Pair (A, B), in
+*>      M.S. Moonen et al (eds), Linear Algebra for Large Scale and
+*>      Real-Time Applications, Kluwer Academic Publ. 1993, pp 195-218.
+*> \n
+*>  [2] B. Kagstrom and P. Poromaa; Computing Eigenspaces with Specified
+*>      Eigenvalues of a Regular Matrix Pair (A, B) and Condition
+*>      Estimation: Theory, Algorithms and Software, Report
+*>      UMINF - 94.04, Department of Computing Science, Umea University,
+*>      S-901 87 Umea, Sweden, 1994. Also as LAPACK Working Note 87.
+*>      To appear in Numerical Algorithms, 1996.
+*> \n
+*>  [3] B. Kagstrom and P. Poromaa, LAPACK-Style Algorithms and Software
+*>      for Solving the Generalized Sylvester Equation and Estimating the
+*>      Separation between Regular Matrix Pairs, Report UMINF - 93.23,
+*>      Department of Computing Science, Umea University, S-901 87 Umea,
+*>      Sweden, December 1993, Revised April 1994, Also as LAPACK working
+*>      Note 75. To appear in ACM Trans. on Math. Software, Vol 22, No 1,
+*>      1996.
+*>
 *  =====================================================================
-      SUBROUTINE ZUNGBR( VECT, M, N, K, A, LDA, TAU, WORK, LWORK, INFO )
+      SUBROUTINE ZTGSEN( IJOB, WANTQ, WANTZ, SELECT, N, A, LDA, B, LDB,
+     $                   ALPHA, BETA, Q, LDQ, Z, LDZ, M, PL, PR, DIF,
+     $                   WORK, LWORK, IWORK, LIWORK, INFO )
 *
-*  -- LAPACK computational routine (version 3.4.1) --
+*  -- LAPACK computational routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     April 2012
+*     June 2016
 *
 *     .. Scalar Arguments ..
-      CHARACTER          VECT
-      INTEGER            INFO, K, LDA, LWORK, M, N
+      LOGICAL            WANTQ, WANTZ
+      INTEGER            IJOB, INFO, LDA, LDB, LDQ, LDZ, LIWORK, LWORK,
+     $                   M, N
+      DOUBLE PRECISION   PL, PR
 *     ..
 *     .. Array Arguments ..
-      COMPLEX*16         A( LDA, * ), TAU( * ), WORK( * )
+      LOGICAL            SELECT( * )
+      INTEGER            IWORK( * )
+      DOUBLE PRECISION   DIF( * )
+      COMPLEX*16         A( LDA, * ), ALPHA( * ), B( LDB, * ),
+     $                   BETA( * ), Q( LDQ, * ), WORK( * ), Z( LDZ, * )
 *     ..
 *
 *  =====================================================================
 *
 *     .. Parameters ..
-      COMPLEX*16         ZERO, ONE
-      PARAMETER          ( ZERO = ( 0.0D+0, 0.0D+0 ),
-     $                   ONE = ( 1.0D+0, 0.0D+0 ) )
+      INTEGER            IDIFJB
+      PARAMETER          ( IDIFJB = 3 )
+      DOUBLE PRECISION   ZERO, ONE
+      PARAMETER          ( ZERO = 0.0D+0, ONE = 1.0D+0 )
 *     ..
 *     .. Local Scalars ..
-      LOGICAL            LQUERY, WANTQ
-      INTEGER            I, IINFO, J, LWKOPT, MN
+      LOGICAL            LQUERY, SWAP, WANTD, WANTD1, WANTD2, WANTP
+      INTEGER            I, IERR, IJB, K, KASE, KS, LIWMIN, LWMIN, MN2,
+     $                   N1, N2
+      DOUBLE PRECISION   DSCALE, DSUM, RDSCAL, SAFMIN
+      COMPLEX*16         TEMP1, TEMP2
 *     ..
-*     .. External Functions ..
-      LOGICAL            LSAME
-      INTEGER            ILAENV
-      EXTERNAL           LSAME, ILAENV
+*     .. Local Arrays ..
+      INTEGER            ISAVE( 3 )
 *     ..
 *     .. External Subroutines ..
-      EXTERNAL           XERBLA, ZUNGLQ, ZUNGQR
+      EXTERNAL           XERBLA, ZLACN2, ZLACPY, ZLASSQ, ZSCAL, ZTGEXC,
+     $                   ZTGSYL
 *     ..
 *     .. Intrinsic Functions ..
-      INTRINSIC          MAX, MIN
+      INTRINSIC          ABS, DCMPLX, DCONJG, MAX, SQRT
+*     ..
+*     .. External Functions ..
+      DOUBLE PRECISION   DLAMCH
+      EXTERNAL           DLAMCH
 *     ..
 *     .. Executable Statements ..
 *
-*     Test the input arguments
+*     Decode and test the input parameters
 *
       INFO = 0
-      WANTQ = LSAME( VECT, 'Q' )
-      MN = MIN( M, N )
-      LQUERY = ( LWORK.EQ.-1 )
-      IF( .NOT.WANTQ .AND. .NOT.LSAME( VECT, 'P' ) ) THEN
+      LQUERY = ( LWORK.EQ.-1 .OR. LIWORK.EQ.-1 )
+*
+      IF( IJOB.LT.0 .OR. IJOB.GT.5 ) THEN
          INFO = -1
-      ELSE IF( M.LT.0 ) THEN
-         INFO = -2
-      ELSE IF( N.LT.0 .OR. ( WANTQ .AND. ( N.GT.M .OR. N.LT.MIN( M,
-     $         K ) ) ) .OR. ( .NOT.WANTQ .AND. ( M.GT.N .OR. M.LT.
-     $         MIN( N, K ) ) ) ) THEN
-         INFO = -3
-      ELSE IF( K.LT.0 ) THEN
-         INFO = -4
-      ELSE IF( LDA.LT.MAX( 1, M ) ) THEN
-         INFO = -6
-      ELSE IF( LWORK.LT.MAX( 1, MN ) .AND. .NOT.LQUERY ) THEN
+      ELSE IF( N.LT.0 ) THEN
+         INFO = -5
+      ELSE IF( LDA.LT.MAX( 1, N ) ) THEN
+         INFO = -7
+      ELSE IF( LDB.LT.MAX( 1, N ) ) THEN
          INFO = -9
+      ELSE IF( LDQ.LT.1 .OR. ( WANTQ .AND. LDQ.LT.N ) ) THEN
+         INFO = -13
+      ELSE IF( LDZ.LT.1 .OR. ( WANTZ .AND. LDZ.LT.N ) ) THEN
+         INFO = -15
       END IF
 *
-      IF( INFO.EQ.0 ) THEN
-         WORK( 1 ) = 1
-         IF( WANTQ ) THEN
-            IF( M.GE.K ) THEN
-               CALL ZUNGQR( M, N, K, A, LDA, TAU, WORK, -1, IINFO )
-            ELSE
-               IF( M.GT.1 ) THEN
-                  CALL ZUNGQR( M-1, M-1, M-1, A( 2, 2 ), LDA, TAU, WORK,
-     $                         -1, IINFO )
-               END IF
-            END IF
+      IF( INFO.NE.0 ) THEN
+         CALL XERBLA( 'ZTGSEN', -INFO )
+         RETURN
+      END IF
+*
+      IERR = 0
+*
+      WANTP = IJOB.EQ.1 .OR. IJOB.GE.4
+      WANTD1 = IJOB.EQ.2 .OR. IJOB.EQ.4
+      WANTD2 = IJOB.EQ.3 .OR. IJOB.EQ.5
+      WANTD = WANTD1 .OR. WANTD2
+*
+*     Set M to the dimension of the specified pair of deflating
+*     subspaces.
+*
+      M = 0
+      IF( .NOT.LQUERY .OR. IJOB.NE.0 ) THEN
+      DO 10 K = 1, N
+         ALPHA( K ) = A( K, K )
+         BETA( K ) = B( K, K )
+         IF( K.LT.N ) THEN
+            IF( SELECT( K ) )
+     $         M = M + 1
          ELSE
-            IF( K.LT.N ) THEN
-               CALL ZUNGLQ( M, N, K, A, LDA, TAU, WORK, -1, IINFO )
-            ELSE
-               IF( N.GT.1 ) THEN
-                  CALL ZUNGLQ( N-1, N-1, N-1, A( 2, 2 ), LDA, TAU, WORK,
-     $                         -1, IINFO )
-               END IF
-            END IF
+            IF( SELECT( N ) )
+     $         M = M + 1
          END IF
-         LWKOPT = WORK( 1 )
-         LWKOPT = MAX (LWKOPT, MN)
+   10 CONTINUE
+      END IF
+*
+      IF( IJOB.EQ.1 .OR. IJOB.EQ.2 .OR. IJOB.EQ.4 ) THEN
+         LWMIN = MAX( 1, 2*M*( N-M ) )
+         LIWMIN = MAX( 1, N+2 )
+      ELSE IF( IJOB.EQ.3 .OR. IJOB.EQ.5 ) THEN
+         LWMIN = MAX( 1, 4*M*( N-M ) )
+         LIWMIN = MAX( 1, 2*M*( N-M ), N+2 )
+      ELSE
+         LWMIN = 1
+         LIWMIN = 1
+      END IF
+*
+      WORK( 1 ) = LWMIN
+      IWORK( 1 ) = LIWMIN
+*
+      IF( LWORK.LT.LWMIN .AND. .NOT.LQUERY ) THEN
+         INFO = -21
+      ELSE IF( LIWORK.LT.LIWMIN .AND. .NOT.LQUERY ) THEN
+         INFO = -23
       END IF
 *
       IF( INFO.NE.0 ) THEN
-         CALL XERBLA( 'ZUNGBR', -INFO )
+         CALL XERBLA( 'ZTGSEN', -INFO )
          RETURN
       ELSE IF( LQUERY ) THEN
-         WORK( 1 ) = LWKOPT
          RETURN
       END IF
 *
-*     Quick return if possible
+*     Quick return if possible.
 *
-      IF( M.EQ.0 .OR. N.EQ.0 ) THEN
-         WORK( 1 ) = 1
-         RETURN
+      IF( M.EQ.N .OR. M.EQ.0 ) THEN
+         IF( WANTP ) THEN
+            PL = ONE
+            PR = ONE
+         END IF
+         IF( WANTD ) THEN
+            DSCALE = ZERO
+            DSUM = ONE
+            DO 20 I = 1, N
+               CALL ZLASSQ( N, A( 1, I ), 1, DSCALE, DSUM )
+               CALL ZLASSQ( N, B( 1, I ), 1, DSCALE, DSUM )
+   20       CONTINUE
+            DIF( 1 ) = DSCALE*SQRT( DSUM )
+            DIF( 2 ) = DIF( 1 )
+         END IF
+         GO TO 70
       END IF
 *
-      IF( WANTQ ) THEN
-*
-*        Form Q, determined by a call to ZGEBRD to reduce an m-by-k
-*        matrix
-*
-         IF( M.GE.K ) THEN
+*     Get machine constant
 *
-*           If m >= k, assume m >= n >= k
+      SAFMIN = DLAMCH( 'S' )
 *
-            CALL ZUNGQR( M, N, K, A, LDA, TAU, WORK, LWORK, IINFO )
+*     Collect the selected blocks at the top-left corner of (A, B).
 *
-         ELSE
+      KS = 0
+      DO 30 K = 1, N
+         SWAP = SELECT( K )
+         IF( SWAP ) THEN
+            KS = KS + 1
 *
-*           If m < k, assume m = n
+*           Swap the K-th block to position KS. Compute unitary Q
+*           and Z that will swap adjacent diagonal blocks in (A, B).
 *
-*           Shift the vectors which define the elementary reflectors one
-*           column to the right, and set the first row and column of Q
-*           to those of the unit matrix
+            IF( K.NE.KS )
+     $         CALL ZTGEXC( WANTQ, WANTZ, N, A, LDA, B, LDB, Q, LDQ, Z,
+     $                      LDZ, K, KS, IERR )
 *
-            DO 20 J = M, 2, -1
-               A( 1, J ) = ZERO
-               DO 10 I = J + 1, M
-                  A( I, J ) = A( I, J-1 )
-   10          CONTINUE
-   20       CONTINUE
-            A( 1, 1 ) = ONE
-            DO 30 I = 2, M
-               A( I, 1 ) = ZERO
-   30       CONTINUE
-            IF( M.GT.1 ) THEN
+            IF( IERR.GT.0 ) THEN
 *
-*              Form Q(2:m,2:m)
+*              Swap is rejected: exit.
 *
-               CALL ZUNGQR( M-1, M-1, M-1, A( 2, 2 ), LDA, TAU, WORK,
-     $                      LWORK, IINFO )
+               INFO = 1
+               IF( WANTP ) THEN
+                  PL = ZERO
+                  PR = ZERO
+               END IF
+               IF( WANTD ) THEN
+                  DIF( 1 ) = ZERO
+                  DIF( 2 ) = ZERO
+               END IF
+               GO TO 70
             END IF
          END IF
-      ELSE
+   30 CONTINUE
+      IF( WANTP ) THEN
+*
+*        Solve generalized Sylvester equation for R and L:
+*                   A11 * R - L * A22 = A12
+*                   B11 * R - L * B22 = B12
+*
+         N1 = M
+         N2 = N - M
+         I = N1 + 1
+         CALL ZLACPY( 'Full', N1, N2, A( 1, I ), LDA, WORK, N1 )
+         CALL ZLACPY( 'Full', N1, N2, B( 1, I ), LDB, WORK( N1*N2+1 ),
+     $                N1 )
+         IJB = 0
+         CALL ZTGSYL( 'N', IJB, N1, N2, A, LDA, A( I, I ), LDA, WORK,
+     $                N1, B, LDB, B( I, I ), LDB, WORK( N1*N2+1 ), N1,
+     $                DSCALE, DIF( 1 ), WORK( N1*N2*2+1 ),
+     $                LWORK-2*N1*N2, IWORK, IERR )
+*
+*        Estimate the reciprocal of norms of "projections" onto
+*        left and right eigenspaces
+*
+         RDSCAL = ZERO
+         DSUM = ONE
+         CALL ZLASSQ( N1*N2, WORK, 1, RDSCAL, DSUM )
+         PL = RDSCAL*SQRT( DSUM )
+         IF( PL.EQ.ZERO ) THEN
+            PL = ONE
+         ELSE
+            PL = DSCALE / ( SQRT( DSCALE*DSCALE / PL+PL )*SQRT( PL ) )
+         END IF
+         RDSCAL = ZERO
+         DSUM = ONE
+         CALL ZLASSQ( N1*N2, WORK( N1*N2+1 ), 1, RDSCAL, DSUM )
+         PR = RDSCAL*SQRT( DSUM )
+         IF( PR.EQ.ZERO ) THEN
+            PR = ONE
+         ELSE
+            PR = DSCALE / ( SQRT( DSCALE*DSCALE / PR+PR )*SQRT( PR ) )
+         END IF
+      END IF
+      IF( WANTD ) THEN
 *
-*        Form P**H, determined by a call to ZGEBRD to reduce a k-by-n
-*        matrix
+*        Compute estimates Difu and Difl.
 *
-         IF( K.LT.N ) THEN
+         IF( WANTD1 ) THEN
+            N1 = M
+            N2 = N - M
+            I = N1 + 1
+            IJB = IDIFJB
 *
-*           If k < n, assume k <= m <= n
+*           Frobenius norm-based Difu estimate.
 *
-            CALL ZUNGLQ( M, N, K, A, LDA, TAU, WORK, LWORK, IINFO )
+            CALL ZTGSYL( 'N', IJB, N1, N2, A, LDA, A( I, I ), LDA, WORK,
+     $                   N1, B, LDB, B( I, I ), LDB, WORK( N1*N2+1 ),
+     $                   N1, DSCALE, DIF( 1 ), WORK( N1*N2*2+1 ),
+     $                   LWORK-2*N1*N2, IWORK, IERR )
+*
+*           Frobenius norm-based Difl estimate.
 *
+            CALL ZTGSYL( 'N', IJB, N2, N1, A( I, I ), LDA, A, LDA, WORK,
+     $                   N2, B( I, I ), LDB, B, LDB, WORK( N1*N2+1 ),
+     $                   N2, DSCALE, DIF( 2 ), WORK( N1*N2*2+1 ),
+     $                   LWORK-2*N1*N2, IWORK, IERR )
          ELSE
 *
-*           If k >= n, assume m = n
+*           Compute 1-norm-based estimates of Difu and Difl using
+*           reversed communication with ZLACN2. In each step a
+*           generalized Sylvester equation or a transposed variant
+*           is solved.
 *
-*           Shift the vectors which define the elementary reflectors one
-*           row downward, and set the first row and column of P**H to
-*           those of the unit matrix
+            KASE = 0
+            N1 = M
+            N2 = N - M
+            I = N1 + 1
+            IJB = 0
+            MN2 = 2*N1*N2
+*
+*           1-norm-based estimate of Difu.
 *
-            A( 1, 1 ) = ONE
-            DO 40 I = 2, N
-               A( I, 1 ) = ZERO
    40       CONTINUE
-            DO 60 J = 2, N
-               DO 50 I = J - 1, 2, -1
-                  A( I, J ) = A( I-1, J )
-   50          CONTINUE
-               A( 1, J ) = ZERO
-   60       CONTINUE
-            IF( N.GT.1 ) THEN
+            CALL ZLACN2( MN2, WORK( MN2+1 ), WORK, DIF( 1 ), KASE,
+     $                   ISAVE )
+            IF( KASE.NE.0 ) THEN
+               IF( KASE.EQ.1 ) THEN
+*
+*                 Solve generalized Sylvester equation
+*
+                  CALL ZTGSYL( 'N', IJB, N1, N2, A, LDA, A( I, I ), LDA,
+     $                         WORK, N1, B, LDB, B( I, I ), LDB,
+     $                         WORK( N1*N2+1 ), N1, DSCALE, DIF( 1 ),
+     $                         WORK( N1*N2*2+1 ), LWORK-2*N1*N2, IWORK,
+     $                         IERR )
+               ELSE
 *
-*              Form P**H(2:n,2:n)
+*                 Solve the transposed variant.
 *
-               CALL ZUNGLQ( N-1, N-1, N-1, A( 2, 2 ), LDA, TAU, WORK,
-     $                      LWORK, IINFO )
+                  CALL ZTGSYL( 'C', IJB, N1, N2, A, LDA, A( I, I ), LDA,
+     $                         WORK, N1, B, LDB, B( I, I ), LDB,
+     $                         WORK( N1*N2+1 ), N1, DSCALE, DIF( 1 ),
+     $                         WORK( N1*N2*2+1 ), LWORK-2*N1*N2, IWORK,
+     $                         IERR )
+               END IF
+               GO TO 40
+            END IF
+            DIF( 1 ) = DSCALE / DIF( 1 )
+*
+*           1-norm-based estimate of Difl.
+*
+   50       CONTINUE
+            CALL ZLACN2( MN2, WORK( MN2+1 ), WORK, DIF( 2 ), KASE,
+     $                   ISAVE )
+            IF( KASE.NE.0 ) THEN
+               IF( KASE.EQ.1 ) THEN
+*
+*                 Solve generalized Sylvester equation
+*
+                  CALL ZTGSYL( 'N', IJB, N2, N1, A( I, I ), LDA, A, LDA,
+     $                         WORK, N2, B( I, I ), LDB, B, LDB,
+     $                         WORK( N1*N2+1 ), N2, DSCALE, DIF( 2 ),
+     $                         WORK( N1*N2*2+1 ), LWORK-2*N1*N2, IWORK,
+     $                         IERR )
+               ELSE
+*
+*                 Solve the transposed variant.
+*
+                  CALL ZTGSYL( 'C', IJB, N2, N1, A( I, I ), LDA, A, LDA,
+     $                         WORK, N2, B, LDB, B( I, I ), LDB,
+     $                         WORK( N1*N2+1 ), N2, DSCALE, DIF( 2 ),
+     $                         WORK( N1*N2*2+1 ), LWORK-2*N1*N2, IWORK,
+     $                         IERR )
+               END IF
+               GO TO 50
             END IF
+            DIF( 2 ) = DSCALE / DIF( 2 )
          END IF
       END IF
-      WORK( 1 ) = LWKOPT
+*
+*     If B(K,K) is complex, make it real and positive (normalization
+*     of the generalized Schur form) and Store the generalized
+*     eigenvalues of reordered pair (A, B)
+*
+      DO 60 K = 1, N
+         DSCALE = ABS( B( K, K ) )
+         IF( DSCALE.GT.SAFMIN ) THEN
+            TEMP1 = DCONJG( B( K, K ) / DSCALE )
+            TEMP2 = B( K, K ) / DSCALE
+            B( K, K ) = DSCALE
+            CALL ZSCAL( N-K, TEMP1, B( K, K+1 ), LDB )
+            CALL ZSCAL( N-K+1, TEMP1, A( K, K ), LDA )
+            IF( WANTQ )
+     $         CALL ZSCAL( N, TEMP2, Q( 1, K ), 1 )
+         ELSE
+            B( K, K ) = DCMPLX( ZERO, ZERO )
+         END IF
+*
+         ALPHA( K ) = A( K, K )
+         BETA( K ) = B( K, K )
+*
+   60 CONTINUE
+*
+   70 CONTINUE
+*
+      WORK( 1 ) = LWMIN
+      IWORK( 1 ) = LIWMIN
+*
       RETURN
 *
-*     End of ZUNGBR
+*     End of ZTGSEN
 *
       END
-*> \brief \b ZUNGHR
+*> \brief \b ZTGSY2 solves the generalized Sylvester equation (unblocked algorithm).
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download ZUNGHR + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/zunghr.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/zunghr.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/zunghr.f"> 
+*> Download ZTGSY2 + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/ztgsy2.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/ztgsy2.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/ztgsy2.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
-*       SUBROUTINE ZUNGHR( N, ILO, IHI, A, LDA, TAU, WORK, LWORK, INFO )
-* 
+*       SUBROUTINE ZTGSY2( TRANS, IJOB, M, N, A, LDA, B, LDB, C, LDC, D,
+*                          LDD, E, LDE, F, LDF, SCALE, RDSUM, RDSCAL,
+*                          INFO )
+*
 *       .. Scalar Arguments ..
-*       INTEGER            IHI, ILO, INFO, LDA, LWORK, N
+*       CHARACTER          TRANS
+*       INTEGER            IJOB, INFO, LDA, LDB, LDC, LDD, LDE, LDF, M, N
+*       DOUBLE PRECISION   RDSCAL, RDSUM, SCALE
 *       ..
 *       .. Array Arguments ..
-*       COMPLEX*16         A( LDA, * ), TAU( * ), WORK( * )
+*       COMPLEX*16         A( LDA, * ), B( LDB, * ), C( LDC, * ),
+*      $                   D( LDD, * ), E( LDE, * ), F( LDF, * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
 *>
 *> \verbatim
 *>
-*> ZUNGHR generates a complex unitary matrix Q which is defined as the
-*> product of IHI-ILO elementary reflectors of order N, as returned by
-*> ZGEHRD:
+*> ZTGSY2 solves the generalized Sylvester equation
 *>
-*> Q = H(ilo) H(ilo+1) . . . H(ihi-1).
+*>             A * R - L * B = scale * C               (1)
+*>             D * R - L * E = scale * F
+*>
+*> using Level 1 and 2 BLAS, where R and L are unknown M-by-N matrices,
+*> (A, D), (B, E) and (C, F) are given matrix pairs of size M-by-M,
+*> N-by-N and M-by-N, respectively. A, B, D and E are upper triangular
+*> (i.e., (A,D) and (B,E) in generalized Schur form).
+*>
+*> The solution (R, L) overwrites (C, F). 0 <= SCALE <= 1 is an output
+*> scaling factor chosen to avoid overflow.
+*>
+*> In matrix notation solving equation (1) corresponds to solve
+*> Zx = scale * b, where Z is defined as
+*>
+*>        Z = [ kron(In, A)  -kron(B**H, Im) ]             (2)
+*>            [ kron(In, D)  -kron(E**H, Im) ],
+*>
+*> Ik is the identity matrix of size k and X**H is the conjuguate transpose of X.
+*> kron(X, Y) is the Kronecker product between the matrices X and Y.
+*>
+*> If TRANS = 'C', y in the conjugate transposed system Z**H*y = scale*b
+*> is solved for, which is equivalent to solve for R and L in
+*>
+*>             A**H * R  + D**H * L   = scale * C           (3)
+*>             R  * B**H + L  * E**H  = scale * -F
+*>
+*> This case is used to compute an estimate of Dif[(A, D), (B, E)] =
+*> = sigma_min(Z) using reverse communicaton with ZLACON.
+*>
+*> ZTGSY2 also (IJOB >= 1) contributes to the computation in ZTGSYL
+*> of an upper bound on the separation between to matrix pairs. Then
+*> the input (A, D), (B, E) are sub-pencils of two matrix pairs in
+*> ZTGSYL.
 *> \endverbatim
 *
 *  Arguments:
 *  ==========
 *
-*> \param[in] N
+*> \param[in] TRANS
 *> \verbatim
-*>          N is INTEGER
-*>          The order of the matrix Q. N >= 0.
+*>          TRANS is CHARACTER*1
+*>          = 'N', solve the generalized Sylvester equation (1).
+*>          = 'T': solve the 'transposed' system (3).
 *> \endverbatim
 *>
-*> \param[in] ILO
+*> \param[in] IJOB
 *> \verbatim
-*>          ILO is INTEGER
+*>          IJOB is INTEGER
+*>          Specifies what kind of functionality to be performed.
+*>          =0: solve (1) only.
+*>          =1: A contribution from this subsystem to a Frobenius
+*>              norm-based estimate of the separation between two matrix
+*>              pairs is computed. (look ahead strategy is used).
+*>          =2: A contribution from this subsystem to a Frobenius
+*>              norm-based estimate of the separation between two matrix
+*>              pairs is computed. (DGECON on sub-systems is used.)
+*>          Not referenced if TRANS = 'T'.
 *> \endverbatim
 *>
-*> \param[in] IHI
+*> \param[in] M
 *> \verbatim
-*>          IHI is INTEGER
+*>          M is INTEGER
+*>          On entry, M specifies the order of A and D, and the row
+*>          dimension of C, F, R and L.
+*> \endverbatim
 *>
-*>          ILO and IHI must have the same values as in the previous call
-*>          of ZGEHRD. Q is equal to the unit matrix except in the
-*>          submatrix Q(ilo+1:ihi,ilo+1:ihi).
-*>          1 <= ILO <= IHI <= N, if N > 0; ILO=1 and IHI=0, if N=0.
+*> \param[in] N
+*> \verbatim
+*>          N is INTEGER
+*>          On entry, N specifies the order of B and E, and the column
+*>          dimension of C, F, R and L.
 *> \endverbatim
 *>
-*> \param[in,out] A
+*> \param[in] A
 *> \verbatim
-*>          A is COMPLEX*16 array, dimension (LDA,N)
-*>          On entry, the vectors which define the elementary reflectors,
-*>          as returned by ZGEHRD.
-*>          On exit, the N-by-N unitary matrix Q.
+*>          A is COMPLEX*16 array, dimension (LDA, M)
+*>          On entry, A contains an upper triangular matrix.
 *> \endverbatim
 *>
 *> \param[in] LDA
 *> \verbatim
 *>          LDA is INTEGER
-*>          The leading dimension of the array A. LDA >= max(1,N).
+*>          The leading dimension of the matrix A. LDA >= max(1, M).
 *> \endverbatim
 *>
-*> \param[in] TAU
+*> \param[in] B
 *> \verbatim
-*>          TAU is COMPLEX*16 array, dimension (N-1)
-*>          TAU(i) must contain the scalar factor of the elementary
-*>          reflector H(i), as returned by ZGEHRD.
+*>          B is COMPLEX*16 array, dimension (LDB, N)
+*>          On entry, B contains an upper triangular matrix.
 *> \endverbatim
 *>
-*> \param[out] WORK
+*> \param[in] LDB
 *> \verbatim
-*>          WORK is COMPLEX*16 array, dimension (MAX(1,LWORK))
-*>          On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+*>          LDB is INTEGER
+*>          The leading dimension of the matrix B. LDB >= max(1, N).
 *> \endverbatim
 *>
-*> \param[in] LWORK
+*> \param[in,out] C
 *> \verbatim
-*>          LWORK is INTEGER
-*>          The dimension of the array WORK. LWORK >= IHI-ILO.
-*>          For optimum performance LWORK >= (IHI-ILO)*NB, where NB is
-*>          the optimal blocksize.
+*>          C is COMPLEX*16 array, dimension (LDC, N)
+*>          On entry, C contains the right-hand-side of the first matrix
+*>          equation in (1).
+*>          On exit, if IJOB = 0, C has been overwritten by the solution
+*>          R.
+*> \endverbatim
 *>
-*>          If LWORK = -1, then a workspace query is assumed; the routine
-*>          only calculates the optimal size of the WORK array, returns
-*>          this value as the first entry of the WORK array, and no error
-*>          message related to LWORK is issued by XERBLA.
+*> \param[in] LDC
+*> \verbatim
+*>          LDC is INTEGER
+*>          The leading dimension of the matrix C. LDC >= max(1, M).
+*> \endverbatim
+*>
+*> \param[in] D
+*> \verbatim
+*>          D is COMPLEX*16 array, dimension (LDD, M)
+*>          On entry, D contains an upper triangular matrix.
+*> \endverbatim
+*>
+*> \param[in] LDD
+*> \verbatim
+*>          LDD is INTEGER
+*>          The leading dimension of the matrix D. LDD >= max(1, M).
+*> \endverbatim
+*>
+*> \param[in] E
+*> \verbatim
+*>          E is COMPLEX*16 array, dimension (LDE, N)
+*>          On entry, E contains an upper triangular matrix.
+*> \endverbatim
+*>
+*> \param[in] LDE
+*> \verbatim
+*>          LDE is INTEGER
+*>          The leading dimension of the matrix E. LDE >= max(1, N).
+*> \endverbatim
+*>
+*> \param[in,out] F
+*> \verbatim
+*>          F is COMPLEX*16 array, dimension (LDF, N)
+*>          On entry, F contains the right-hand-side of the second matrix
+*>          equation in (1).
+*>          On exit, if IJOB = 0, F has been overwritten by the solution
+*>          L.
+*> \endverbatim
+*>
+*> \param[in] LDF
+*> \verbatim
+*>          LDF is INTEGER
+*>          The leading dimension of the matrix F. LDF >= max(1, M).
+*> \endverbatim
+*>
+*> \param[out] SCALE
+*> \verbatim
+*>          SCALE is DOUBLE PRECISION
+*>          On exit, 0 <= SCALE <= 1. If 0 < SCALE < 1, the solutions
+*>          R and L (C and F on entry) will hold the solutions to a
+*>          slightly perturbed system but the input matrices A, B, D and
+*>          E have not been changed. If SCALE = 0, R and L will hold the
+*>          solutions to the homogeneous system with C = F = 0.
+*>          Normally, SCALE = 1.
+*> \endverbatim
+*>
+*> \param[in,out] RDSUM
+*> \verbatim
+*>          RDSUM is DOUBLE PRECISION
+*>          On entry, the sum of squares of computed contributions to
+*>          the Dif-estimate under computation by ZTGSYL, where the
+*>          scaling factor RDSCAL (see below) has been factored out.
+*>          On exit, the corresponding sum of squares updated with the
+*>          contributions from the current sub-system.
+*>          If TRANS = 'T' RDSUM is not touched.
+*>          NOTE: RDSUM only makes sense when ZTGSY2 is called by
+*>          ZTGSYL.
+*> \endverbatim
+*>
+*> \param[in,out] RDSCAL
+*> \verbatim
+*>          RDSCAL is DOUBLE PRECISION
+*>          On entry, scaling factor used to prevent overflow in RDSUM.
+*>          On exit, RDSCAL is updated w.r.t. the current contributions
+*>          in RDSUM.
+*>          If TRANS = 'T', RDSCAL is not touched.
+*>          NOTE: RDSCAL only makes sense when ZTGSY2 is called by
+*>          ZTGSYL.
 *> \endverbatim
 *>
 *> \param[out] INFO
 *> \verbatim
 *>          INFO is INTEGER
-*>          = 0:  successful exit
-*>          < 0:  if INFO = -i, the i-th argument had an illegal value
+*>          On exit, if INFO is set to
+*>            =0: Successful exit
+*>            <0: If INFO = -i, input argument number i is illegal.
+*>            >0: The matrix pairs (A, D) and (B, E) have common or very
+*>                close eigenvalues.
 *> \endverbatim
 *
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date November 2011
+*> \date December 2016
 *
-*> \ingroup complex16OTHERcomputational
+*> \ingroup complex16SYauxiliary
+*
+*> \par Contributors:
+*  ==================
+*>
+*>     Bo Kagstrom and Peter Poromaa, Department of Computing Science,
+*>     Umea University, S-901 87 Umea, Sweden.
 *
 *  =====================================================================
-      SUBROUTINE ZUNGHR( N, ILO, IHI, A, LDA, TAU, WORK, LWORK, INFO )
+      SUBROUTINE ZTGSY2( TRANS, IJOB, M, N, A, LDA, B, LDB, C, LDC, D,
+     $                   LDD, E, LDE, F, LDF, SCALE, RDSUM, RDSCAL,
+     $                   INFO )
 *
-*  -- LAPACK computational routine (version 3.4.0) --
+*  -- LAPACK auxiliary routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     November 2011
+*     December 2016
 *
 *     .. Scalar Arguments ..
-      INTEGER            IHI, ILO, INFO, LDA, LWORK, N
+      CHARACTER          TRANS
+      INTEGER            IJOB, INFO, LDA, LDB, LDC, LDD, LDE, LDF, M, N
+      DOUBLE PRECISION   RDSCAL, RDSUM, SCALE
 *     ..
 *     .. Array Arguments ..
-      COMPLEX*16         A( LDA, * ), TAU( * ), WORK( * )
+      COMPLEX*16         A( LDA, * ), B( LDB, * ), C( LDC, * ),
+     $                   D( LDD, * ), E( LDE, * ), F( LDF, * )
 *     ..
 *
 *  =====================================================================
 *
 *     .. Parameters ..
-      COMPLEX*16         ZERO, ONE
-      PARAMETER          ( ZERO = ( 0.0D+0, 0.0D+0 ),
-     $                   ONE = ( 1.0D+0, 0.0D+0 ) )
+      DOUBLE PRECISION   ZERO, ONE
+      INTEGER            LDZ
+      PARAMETER          ( ZERO = 0.0D+0, ONE = 1.0D+0, LDZ = 2 )
 *     ..
 *     .. Local Scalars ..
-      LOGICAL            LQUERY
-      INTEGER            I, IINFO, J, LWKOPT, NB, NH
+      LOGICAL            NOTRAN
+      INTEGER            I, IERR, J, K
+      DOUBLE PRECISION   SCALOC
+      COMPLEX*16         ALPHA
 *     ..
-*     .. External Subroutines ..
-      EXTERNAL           XERBLA, ZUNGQR
+*     .. Local Arrays ..
+      INTEGER            IPIV( LDZ ), JPIV( LDZ )
+      COMPLEX*16         RHS( LDZ ), Z( LDZ, LDZ )
 *     ..
 *     .. External Functions ..
-      INTEGER            ILAENV
-      EXTERNAL           ILAENV
+      LOGICAL            LSAME
+      EXTERNAL           LSAME
+*     ..
+*     .. External Subroutines ..
+      EXTERNAL           XERBLA, ZAXPY, ZGESC2, ZGETC2, ZLATDF, ZSCAL
 *     ..
 *     .. Intrinsic Functions ..
-      INTRINSIC          MAX, MIN
+      INTRINSIC          DCMPLX, DCONJG, MAX
 *     ..
 *     .. Executable Statements ..
 *
-*     Test the input arguments
+*     Decode and test input parameters
 *
       INFO = 0
-      NH = IHI - ILO
-      LQUERY = ( LWORK.EQ.-1 )
-      IF( N.LT.0 ) THEN
+      IERR = 0
+      NOTRAN = LSAME( TRANS, 'N' )
+      IF( .NOT.NOTRAN .AND. .NOT.LSAME( TRANS, 'C' ) ) THEN
          INFO = -1
-      ELSE IF( ILO.LT.1 .OR. ILO.GT.MAX( 1, N ) ) THEN
-         INFO = -2
-      ELSE IF( IHI.LT.MIN( ILO, N ) .OR. IHI.GT.N ) THEN
-         INFO = -3
-      ELSE IF( LDA.LT.MAX( 1, N ) ) THEN
-         INFO = -5
-      ELSE IF( LWORK.LT.MAX( 1, NH ) .AND. .NOT.LQUERY ) THEN
-         INFO = -8
+      ELSE IF( NOTRAN ) THEN
+         IF( ( IJOB.LT.0 ) .OR. ( IJOB.GT.2 ) ) THEN
+            INFO = -2
+         END IF
       END IF
-*
       IF( INFO.EQ.0 ) THEN
-         NB = ILAENV( 1, 'ZUNGQR', ' ', NH, NH, NH, -1 )
-         LWKOPT = MAX( 1, NH )*NB
-         WORK( 1 ) = LWKOPT
+         IF( M.LE.0 ) THEN
+            INFO = -3
+         ELSE IF( N.LE.0 ) THEN
+            INFO = -4
+         ELSE IF( LDA.LT.MAX( 1, M ) ) THEN
+            INFO = -6
+         ELSE IF( LDB.LT.MAX( 1, N ) ) THEN
+            INFO = -8
+         ELSE IF( LDC.LT.MAX( 1, M ) ) THEN
+            INFO = -10
+         ELSE IF( LDD.LT.MAX( 1, M ) ) THEN
+            INFO = -12
+         ELSE IF( LDE.LT.MAX( 1, N ) ) THEN
+            INFO = -14
+         ELSE IF( LDF.LT.MAX( 1, M ) ) THEN
+            INFO = -16
+         END IF
       END IF
-*
       IF( INFO.NE.0 ) THEN
-         CALL XERBLA( 'ZUNGHR', -INFO )
-         RETURN
-      ELSE IF( LQUERY ) THEN
+         CALL XERBLA( 'ZTGSY2', -INFO )
          RETURN
       END IF
 *
-*     Quick return if possible
+      IF( NOTRAN ) THEN
 *
-      IF( N.EQ.0 ) THEN
-         WORK( 1 ) = 1
-         RETURN
-      END IF
+*        Solve (I, J) - system
+*           A(I, I) * R(I, J) - L(I, J) * B(J, J) = C(I, J)
+*           D(I, I) * R(I, J) - L(I, J) * E(J, J) = F(I, J)
+*        for I = M, M - 1, ..., 1; J = 1, 2, ..., N
 *
-*     Shift the vectors which define the elementary reflectors one
-*     column to the right, and set the first ilo and the last n-ihi
-*     rows and columns to those of the unit matrix
+         SCALE = ONE
+         SCALOC = ONE
+         DO 30 J = 1, N
+            DO 20 I = M, 1, -1
 *
-      DO 40 J = IHI, ILO + 1, -1
-         DO 10 I = 1, J - 1
-            A( I, J ) = ZERO
-   10    CONTINUE
-         DO 20 I = J + 1, IHI
-            A( I, J ) = A( I, J-1 )
-   20    CONTINUE
-         DO 30 I = IHI + 1, N
-            A( I, J ) = ZERO
+*              Build 2 by 2 system
+*
+               Z( 1, 1 ) = A( I, I )
+               Z( 2, 1 ) = D( I, I )
+               Z( 1, 2 ) = -B( J, J )
+               Z( 2, 2 ) = -E( J, J )
+*
+*              Set up right hand side(s)
+*
+               RHS( 1 ) = C( I, J )
+               RHS( 2 ) = F( I, J )
+*
+*              Solve Z * x = RHS
+*
+               CALL ZGETC2( LDZ, Z, LDZ, IPIV, JPIV, IERR )
+               IF( IERR.GT.0 )
+     $            INFO = IERR
+               IF( IJOB.EQ.0 ) THEN
+                  CALL ZGESC2( LDZ, Z, LDZ, RHS, IPIV, JPIV, SCALOC )
+                  IF( SCALOC.NE.ONE ) THEN
+                     DO 10 K = 1, N
+                        CALL ZSCAL( M, DCMPLX( SCALOC, ZERO ),
+     $                              C( 1, K ), 1 )
+                        CALL ZSCAL( M, DCMPLX( SCALOC, ZERO ),
+     $                              F( 1, K ), 1 )
+   10                CONTINUE
+                     SCALE = SCALE*SCALOC
+                  END IF
+               ELSE
+                  CALL ZLATDF( IJOB, LDZ, Z, LDZ, RHS, RDSUM, RDSCAL,
+     $                         IPIV, JPIV )
+               END IF
+*
+*              Unpack solution vector(s)
+*
+               C( I, J ) = RHS( 1 )
+               F( I, J ) = RHS( 2 )
+*
+*              Substitute R(I, J) and L(I, J) into remaining equation.
+*
+               IF( I.GT.1 ) THEN
+                  ALPHA = -RHS( 1 )
+                  CALL ZAXPY( I-1, ALPHA, A( 1, I ), 1, C( 1, J ), 1 )
+                  CALL ZAXPY( I-1, ALPHA, D( 1, I ), 1, F( 1, J ), 1 )
+               END IF
+               IF( J.LT.N ) THEN
+                  CALL ZAXPY( N-J, RHS( 2 ), B( J, J+1 ), LDB,
+     $                        C( I, J+1 ), LDC )
+                  CALL ZAXPY( N-J, RHS( 2 ), E( J, J+1 ), LDE,
+     $                        F( I, J+1 ), LDF )
+               END IF
+*
+   20       CONTINUE
    30    CONTINUE
-   40 CONTINUE
-      DO 60 J = 1, ILO
-         DO 50 I = 1, N
-            A( I, J ) = ZERO
-   50    CONTINUE
-         A( J, J ) = ONE
-   60 CONTINUE
-      DO 80 J = IHI + 1, N
-         DO 70 I = 1, N
-            A( I, J ) = ZERO
-   70    CONTINUE
-         A( J, J ) = ONE
-   80 CONTINUE
+      ELSE
 *
-      IF( NH.GT.0 ) THEN
+*        Solve transposed (I, J) - system:
+*           A(I, I)**H * R(I, J) + D(I, I)**H * L(J, J) = C(I, J)
+*           R(I, I) * B(J, J) + L(I, J) * E(J, J)   = -F(I, J)
+*        for I = 1, 2, ..., M, J = N, N - 1, ..., 1
 *
-*        Generate Q(ilo+1:ihi,ilo+1:ihi)
+         SCALE = ONE
+         SCALOC = ONE
+         DO 80 I = 1, M
+            DO 70 J = N, 1, -1
 *
-         CALL ZUNGQR( NH, NH, NH, A( ILO+1, ILO+1 ), LDA, TAU( ILO ),
-     $                WORK, LWORK, IINFO )
+*              Build 2 by 2 system Z**H
+*
+               Z( 1, 1 ) = DCONJG( A( I, I ) )
+               Z( 2, 1 ) = -DCONJG( B( J, J ) )
+               Z( 1, 2 ) = DCONJG( D( I, I ) )
+               Z( 2, 2 ) = -DCONJG( E( J, J ) )
+*
+*
+*              Set up right hand side(s)
+*
+               RHS( 1 ) = C( I, J )
+               RHS( 2 ) = F( I, J )
+*
+*              Solve Z**H * x = RHS
+*
+               CALL ZGETC2( LDZ, Z, LDZ, IPIV, JPIV, IERR )
+               IF( IERR.GT.0 )
+     $            INFO = IERR
+               CALL ZGESC2( LDZ, Z, LDZ, RHS, IPIV, JPIV, SCALOC )
+               IF( SCALOC.NE.ONE ) THEN
+                  DO 40 K = 1, N
+                     CALL ZSCAL( M, DCMPLX( SCALOC, ZERO ), C( 1, K ),
+     $                           1 )
+                     CALL ZSCAL( M, DCMPLX( SCALOC, ZERO ), F( 1, K ),
+     $                           1 )
+   40             CONTINUE
+                  SCALE = SCALE*SCALOC
+               END IF
+*
+*              Unpack solution vector(s)
+*
+               C( I, J ) = RHS( 1 )
+               F( I, J ) = RHS( 2 )
+*
+*              Substitute R(I, J) and L(I, J) into remaining equation.
+*
+               DO 50 K = 1, J - 1
+                  F( I, K ) = F( I, K ) + RHS( 1 )*DCONJG( B( K, J ) ) +
+     $                        RHS( 2 )*DCONJG( E( K, J ) )
+   50          CONTINUE
+               DO 60 K = I + 1, M
+                  C( K, J ) = C( K, J ) - DCONJG( A( I, K ) )*RHS( 1 ) -
+     $                        DCONJG( D( I, K ) )*RHS( 2 )
+   60          CONTINUE
+*
+   70       CONTINUE
+   80    CONTINUE
       END IF
-      WORK( 1 ) = LWKOPT
       RETURN
 *
-*     End of ZUNGHR
+*     End of ZTGSY2
 *
       END
-*> \brief \b ZUNGL2 generates all or part of the unitary matrix Q from an LQ factorization determined by cgelqf (unblocked algorithm).
+*> \brief \b ZTGSYL
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download ZUNGL2 + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/zungl2.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/zungl2.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/zungl2.f"> 
+*> Download ZTGSYL + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/ztgsyl.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/ztgsyl.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/ztgsyl.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
-*       SUBROUTINE ZUNGL2( M, N, K, A, LDA, TAU, WORK, INFO )
-* 
+*       SUBROUTINE ZTGSYL( TRANS, IJOB, M, N, A, LDA, B, LDB, C, LDC, D,
+*                          LDD, E, LDE, F, LDF, SCALE, DIF, WORK, LWORK,
+*                          IWORK, INFO )
+*
 *       .. Scalar Arguments ..
-*       INTEGER            INFO, K, LDA, M, N
+*       CHARACTER          TRANS
+*       INTEGER            IJOB, INFO, LDA, LDB, LDC, LDD, LDE, LDF,
+*      $                   LWORK, M, N
+*       DOUBLE PRECISION   DIF, SCALE
 *       ..
 *       .. Array Arguments ..
-*       COMPLEX*16         A( LDA, * ), TAU( * ), WORK( * )
+*       INTEGER            IWORK( * )
+*       COMPLEX*16         A( LDA, * ), B( LDB, * ), C( LDC, * ),
+*      $                   D( LDD, * ), E( LDE, * ), F( LDF, * ),
+*      $                   WORK( * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
 *>
 *> \verbatim
 *>
-*> ZUNGL2 generates an m-by-n complex matrix Q with orthonormal rows,
-*> which is defined as the first m rows of a product of k elementary
-*> reflectors of order n
+*> ZTGSYL solves the generalized Sylvester equation:
 *>
-*>       Q  =  H(k)**H . . . H(2)**H H(1)**H
+*>             A * R - L * B = scale * C            (1)
+*>             D * R - L * E = scale * F
 *>
-*> as returned by ZGELQF.
+*> where R and L are unknown m-by-n matrices, (A, D), (B, E) and
+*> (C, F) are given matrix pairs of size m-by-m, n-by-n and m-by-n,
+*> respectively, with complex entries. A, B, D and E are upper
+*> triangular (i.e., (A,D) and (B,E) in generalized Schur form).
+*>
+*> The solution (R, L) overwrites (C, F). 0 <= SCALE <= 1
+*> is an output scaling factor chosen to avoid overflow.
+*>
+*> In matrix notation (1) is equivalent to solve Zx = scale*b, where Z
+*> is defined as
+*>
+*>        Z = [ kron(In, A)  -kron(B**H, Im) ]        (2)
+*>            [ kron(In, D)  -kron(E**H, Im) ],
+*>
+*> Here Ix is the identity matrix of size x and X**H is the conjugate
+*> transpose of X. Kron(X, Y) is the Kronecker product between the
+*> matrices X and Y.
+*>
+*> If TRANS = 'C', y in the conjugate transposed system Z**H *y = scale*b
+*> is solved for, which is equivalent to solve for R and L in
+*>
+*>             A**H * R + D**H * L = scale * C           (3)
+*>             R * B**H + L * E**H = scale * -F
+*>
+*> This case (TRANS = 'C') is used to compute an one-norm-based estimate
+*> of Dif[(A,D), (B,E)], the separation between the matrix pairs (A,D)
+*> and (B,E), using ZLACON.
+*>
+*> If IJOB >= 1, ZTGSYL computes a Frobenius norm-based estimate of
+*> Dif[(A,D),(B,E)]. That is, the reciprocal of a lower bound on the
+*> reciprocal of the smallest singular value of Z.
+*>
+*> This is a level-3 BLAS algorithm.
 *> \endverbatim
 *
 *  Arguments:
 *  ==========
 *
+*> \param[in] TRANS
+*> \verbatim
+*>          TRANS is CHARACTER*1
+*>          = 'N': solve the generalized sylvester equation (1).
+*>          = 'C': solve the "conjugate transposed" system (3).
+*> \endverbatim
+*>
+*> \param[in] IJOB
+*> \verbatim
+*>          IJOB is INTEGER
+*>          Specifies what kind of functionality to be performed.
+*>          =0: solve (1) only.
+*>          =1: The functionality of 0 and 3.
+*>          =2: The functionality of 0 and 4.
+*>          =3: Only an estimate of Dif[(A,D), (B,E)] is computed.
+*>              (look ahead strategy is used).
+*>          =4: Only an estimate of Dif[(A,D), (B,E)] is computed.
+*>              (ZGECON on sub-systems is used).
+*>          Not referenced if TRANS = 'C'.
+*> \endverbatim
+*>
 *> \param[in] M
 *> \verbatim
 *>          M is INTEGER
-*>          The number of rows of the matrix Q. M >= 0.
+*>          The order of the matrices A and D, and the row dimension of
+*>          the matrices C, F, R and L.
 *> \endverbatim
 *>
 *> \param[in] N
 *> \verbatim
-*>          N is INTEGER
-*>          The number of columns of the matrix Q. N >= M.
+*>          N is INTEGER
+*>          The order of the matrices B and E, and the column dimension
+*>          of the matrices C, F, R and L.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*>          A is COMPLEX*16 array, dimension (LDA, M)
+*>          The upper triangular matrix A.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*>          LDA is INTEGER
+*>          The leading dimension of the array A. LDA >= max(1, M).
+*> \endverbatim
+*>
+*> \param[in] B
+*> \verbatim
+*>          B is COMPLEX*16 array, dimension (LDB, N)
+*>          The upper triangular matrix B.
+*> \endverbatim
+*>
+*> \param[in] LDB
+*> \verbatim
+*>          LDB is INTEGER
+*>          The leading dimension of the array B. LDB >= max(1, N).
+*> \endverbatim
+*>
+*> \param[in,out] C
+*> \verbatim
+*>          C is COMPLEX*16 array, dimension (LDC, N)
+*>          On entry, C contains the right-hand-side of the first matrix
+*>          equation in (1) or (3).
+*>          On exit, if IJOB = 0, 1 or 2, C has been overwritten by
+*>          the solution R. If IJOB = 3 or 4 and TRANS = 'N', C holds R,
+*>          the solution achieved during the computation of the
+*>          Dif-estimate.
+*> \endverbatim
+*>
+*> \param[in] LDC
+*> \verbatim
+*>          LDC is INTEGER
+*>          The leading dimension of the array C. LDC >= max(1, M).
+*> \endverbatim
+*>
+*> \param[in] D
+*> \verbatim
+*>          D is COMPLEX*16 array, dimension (LDD, M)
+*>          The upper triangular matrix D.
+*> \endverbatim
+*>
+*> \param[in] LDD
+*> \verbatim
+*>          LDD is INTEGER
+*>          The leading dimension of the array D. LDD >= max(1, M).
+*> \endverbatim
+*>
+*> \param[in] E
+*> \verbatim
+*>          E is COMPLEX*16 array, dimension (LDE, N)
+*>          The upper triangular matrix E.
+*> \endverbatim
+*>
+*> \param[in] LDE
+*> \verbatim
+*>          LDE is INTEGER
+*>          The leading dimension of the array E. LDE >= max(1, N).
+*> \endverbatim
+*>
+*> \param[in,out] F
+*> \verbatim
+*>          F is COMPLEX*16 array, dimension (LDF, N)
+*>          On entry, F contains the right-hand-side of the second matrix
+*>          equation in (1) or (3).
+*>          On exit, if IJOB = 0, 1 or 2, F has been overwritten by
+*>          the solution L. If IJOB = 3 or 4 and TRANS = 'N', F holds L,
+*>          the solution achieved during the computation of the
+*>          Dif-estimate.
+*> \endverbatim
+*>
+*> \param[in] LDF
+*> \verbatim
+*>          LDF is INTEGER
+*>          The leading dimension of the array F. LDF >= max(1, M).
 *> \endverbatim
 *>
-*> \param[in] K
+*> \param[out] DIF
 *> \verbatim
-*>          K is INTEGER
-*>          The number of elementary reflectors whose product defines the
-*>          matrix Q. M >= K >= 0.
+*>          DIF is DOUBLE PRECISION
+*>          On exit DIF is the reciprocal of a lower bound of the
+*>          reciprocal of the Dif-function, i.e. DIF is an upper bound of
+*>          Dif[(A,D), (B,E)] = sigma-min(Z), where Z as in (2).
+*>          IF IJOB = 0 or TRANS = 'C', DIF is not referenced.
 *> \endverbatim
 *>
-*> \param[in,out] A
+*> \param[out] SCALE
 *> \verbatim
-*>          A is COMPLEX*16 array, dimension (LDA,N)
-*>          On entry, the i-th row must contain the vector which defines
-*>          the elementary reflector H(i), for i = 1,2,...,k, as returned
-*>          by ZGELQF in the first k rows of its array argument A.
-*>          On exit, the m by n matrix Q.
+*>          SCALE is DOUBLE PRECISION
+*>          On exit SCALE is the scaling factor in (1) or (3).
+*>          If 0 < SCALE < 1, C and F hold the solutions R and L, resp.,
+*>          to a slightly perturbed system but the input matrices A, B,
+*>          D and E have not been changed. If SCALE = 0, R and L will
+*>          hold the solutions to the homogenious system with C = F = 0.
 *> \endverbatim
 *>
-*> \param[in] LDA
+*> \param[out] WORK
 *> \verbatim
-*>          LDA is INTEGER
-*>          The first dimension of the array A. LDA >= max(1,M).
+*>          WORK is COMPLEX*16 array, dimension (MAX(1,LWORK))
+*>          On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
 *> \endverbatim
 *>
-*> \param[in] TAU
+*> \param[in] LWORK
 *> \verbatim
-*>          TAU is COMPLEX*16 array, dimension (K)
-*>          TAU(i) must contain the scalar factor of the elementary
-*>          reflector H(i), as returned by ZGELQF.
+*>          LWORK is INTEGER
+*>          The dimension of the array WORK. LWORK > = 1.
+*>          If IJOB = 1 or 2 and TRANS = 'N', LWORK >= max(1,2*M*N).
+*>
+*>          If LWORK = -1, then a workspace query is assumed; the routine
+*>          only calculates the optimal size of the WORK array, returns
+*>          this value as the first entry of the WORK array, and no error
+*>          message related to LWORK is issued by XERBLA.
 *> \endverbatim
 *>
-*> \param[out] WORK
+*> \param[out] IWORK
 *> \verbatim
-*>          WORK is COMPLEX*16 array, dimension (M)
+*>          IWORK is INTEGER array, dimension (M+N+2)
 *> \endverbatim
 *>
 *> \param[out] INFO
 *> \verbatim
 *>          INFO is INTEGER
-*>          = 0: successful exit
-*>          < 0: if INFO = -i, the i-th argument has an illegal value
+*>            =0: successful exit
+*>            <0: If INFO = -i, the i-th argument had an illegal value.
+*>            >0: (A, D) and (B, E) have common or very close
+*>                eigenvalues.
 *> \endverbatim
 *
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date September 2012
+*> \date December 2016
 *
-*> \ingroup complex16OTHERcomputational
+*> \ingroup complex16SYcomputational
+*
+*> \par Contributors:
+*  ==================
+*>
+*>     Bo Kagstrom and Peter Poromaa, Department of Computing Science,
+*>     Umea University, S-901 87 Umea, Sweden.
 *
+*> \par References:
+*  ================
+*>
+*>  [1] B. Kagstrom and P. Poromaa, LAPACK-Style Algorithms and Software
+*>      for Solving the Generalized Sylvester Equation and Estimating the
+*>      Separation between Regular Matrix Pairs, Report UMINF - 93.23,
+*>      Department of Computing Science, Umea University, S-901 87 Umea,
+*>      Sweden, December 1993, Revised April 1994, Also as LAPACK Working
+*>      Note 75.  To appear in ACM Trans. on Math. Software, Vol 22,
+*>      No 1, 1996.
+*> \n
+*>  [2] B. Kagstrom, A Perturbation Analysis of the Generalized Sylvester
+*>      Equation (AR - LB, DR - LE ) = (C, F), SIAM J. Matrix Anal.
+*>      Appl., 15(4):1045-1060, 1994.
+*> \n
+*>  [3] B. Kagstrom and L. Westin, Generalized Schur Methods with
+*>      Condition Estimators for Solving the Generalized Sylvester
+*>      Equation, IEEE Transactions on Automatic Control, Vol. 34, No. 7,
+*>      July 1989, pp 745-751.
+*>
 *  =====================================================================
-      SUBROUTINE ZUNGL2( M, N, K, A, LDA, TAU, WORK, INFO )
+      SUBROUTINE ZTGSYL( TRANS, IJOB, M, N, A, LDA, B, LDB, C, LDC, D,
+     $                   LDD, E, LDE, F, LDF, SCALE, DIF, WORK, LWORK,
+     $                   IWORK, INFO )
 *
-*  -- LAPACK computational routine (version 3.4.2) --
+*  -- LAPACK computational routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     September 2012
+*     December 2016
 *
 *     .. Scalar Arguments ..
-      INTEGER            INFO, K, LDA, M, N
+      CHARACTER          TRANS
+      INTEGER            IJOB, INFO, LDA, LDB, LDC, LDD, LDE, LDF,
+     $                   LWORK, M, N
+      DOUBLE PRECISION   DIF, SCALE
 *     ..
 *     .. Array Arguments ..
-      COMPLEX*16         A( LDA, * ), TAU( * ), WORK( * )
+      INTEGER            IWORK( * )
+      COMPLEX*16         A( LDA, * ), B( LDB, * ), C( LDC, * ),
+     $                   D( LDD, * ), E( LDE, * ), F( LDF, * ),
+     $                   WORK( * )
 *     ..
 *
 *  =====================================================================
+*  Replaced various illegal calls to CCOPY by calls to CLASET.
+*  Sven Hammarling, 1/5/02.
 *
 *     .. Parameters ..
-      COMPLEX*16         ONE, ZERO
-      PARAMETER          ( ONE = ( 1.0D+0, 0.0D+0 ),
-     $                   ZERO = ( 0.0D+0, 0.0D+0 ) )
+      DOUBLE PRECISION   ZERO, ONE
+      PARAMETER          ( ZERO = 0.0D+0, ONE = 1.0D+0 )
+      COMPLEX*16         CZERO
+      PARAMETER          ( CZERO = (0.0D+0, 0.0D+0) )
 *     ..
 *     .. Local Scalars ..
-      INTEGER            I, J, L
+      LOGICAL            LQUERY, NOTRAN
+      INTEGER            I, IE, IFUNC, IROUND, IS, ISOLVE, J, JE, JS, K,
+     $                   LINFO, LWMIN, MB, NB, P, PQ, Q
+      DOUBLE PRECISION   DSCALE, DSUM, SCALE2, SCALOC
+*     ..
+*     .. External Functions ..
+      LOGICAL            LSAME
+      INTEGER            ILAENV
+      EXTERNAL           LSAME, ILAENV
 *     ..
 *     .. External Subroutines ..
-      EXTERNAL           XERBLA, ZLACGV, ZLARF, ZSCAL
+      EXTERNAL           XERBLA, ZGEMM, ZLACPY, ZLASET, ZSCAL, ZTGSY2
 *     ..
 *     .. Intrinsic Functions ..
-      INTRINSIC          DCONJG, MAX
+      INTRINSIC          DBLE, DCMPLX, MAX, SQRT
 *     ..
 *     .. Executable Statements ..
 *
-*     Test the input arguments
+*     Decode and test input parameters
 *
       INFO = 0
-      IF( M.LT.0 ) THEN
+      NOTRAN = LSAME( TRANS, 'N' )
+      LQUERY = ( LWORK.EQ.-1 )
+*
+      IF( .NOT.NOTRAN .AND. .NOT.LSAME( TRANS, 'C' ) ) THEN
          INFO = -1
-      ELSE IF( N.LT.M ) THEN
-         INFO = -2
-      ELSE IF( K.LT.0 .OR. K.GT.M ) THEN
-         INFO = -3
-      ELSE IF( LDA.LT.MAX( 1, M ) ) THEN
-         INFO = -5
+      ELSE IF( NOTRAN ) THEN
+         IF( ( IJOB.LT.0 ) .OR. ( IJOB.GT.4 ) ) THEN
+            INFO = -2
+         END IF
+      END IF
+      IF( INFO.EQ.0 ) THEN
+         IF( M.LE.0 ) THEN
+            INFO = -3
+         ELSE IF( N.LE.0 ) THEN
+            INFO = -4
+         ELSE IF( LDA.LT.MAX( 1, M ) ) THEN
+            INFO = -6
+         ELSE IF( LDB.LT.MAX( 1, N ) ) THEN
+            INFO = -8
+         ELSE IF( LDC.LT.MAX( 1, M ) ) THEN
+            INFO = -10
+         ELSE IF( LDD.LT.MAX( 1, M ) ) THEN
+            INFO = -12
+         ELSE IF( LDE.LT.MAX( 1, N ) ) THEN
+            INFO = -14
+         ELSE IF( LDF.LT.MAX( 1, M ) ) THEN
+            INFO = -16
+         END IF
+      END IF
+*
+      IF( INFO.EQ.0 ) THEN
+         IF( NOTRAN ) THEN
+            IF( IJOB.EQ.1 .OR. IJOB.EQ.2 ) THEN
+               LWMIN = MAX( 1, 2*M*N )
+            ELSE
+               LWMIN = 1
+            END IF
+         ELSE
+            LWMIN = 1
+         END IF
+         WORK( 1 ) = LWMIN
+*
+         IF( LWORK.LT.LWMIN .AND. .NOT.LQUERY ) THEN
+            INFO = -20
+         END IF
       END IF
+*
       IF( INFO.NE.0 ) THEN
-         CALL XERBLA( 'ZUNGL2', -INFO )
+         CALL XERBLA( 'ZTGSYL', -INFO )
+         RETURN
+      ELSE IF( LQUERY ) THEN
          RETURN
       END IF
 *
 *     Quick return if possible
 *
-      IF( M.LE.0 )
-     $   RETURN
+      IF( M.EQ.0 .OR. N.EQ.0 ) THEN
+         SCALE = 1
+         IF( NOTRAN ) THEN
+            IF( IJOB.NE.0 ) THEN
+               DIF = 0
+            END IF
+         END IF
+         RETURN
+      END IF
 *
-      IF( K.LT.M ) THEN
+*     Determine  optimal block sizes MB and NB
 *
-*        Initialise rows k+1:m to rows of the unit matrix
+      MB = ILAENV( 2, 'ZTGSYL', TRANS, M, N, -1, -1 )
+      NB = ILAENV( 5, 'ZTGSYL', TRANS, M, N, -1, -1 )
 *
-         DO 20 J = 1, N
-            DO 10 L = K + 1, M
-               A( L, J ) = ZERO
-   10       CONTINUE
-            IF( J.GT.K .AND. J.LE.M )
-     $         A( J, J ) = ONE
-   20    CONTINUE
+      ISOLVE = 1
+      IFUNC = 0
+      IF( NOTRAN ) THEN
+         IF( IJOB.GE.3 ) THEN
+            IFUNC = IJOB - 2
+            CALL ZLASET( 'F', M, N, CZERO, CZERO, C, LDC )
+            CALL ZLASET( 'F', M, N, CZERO, CZERO, F, LDF )
+         ELSE IF( IJOB.GE.1 .AND. NOTRAN ) THEN
+            ISOLVE = 2
+         END IF
       END IF
 *
-      DO 40 I = K, 1, -1
+      IF( ( MB.LE.1 .AND. NB.LE.1 ) .OR. ( MB.GE.M .AND. NB.GE.N ) )
+     $     THEN
 *
-*        Apply H(i)**H to A(i:m,i:n) from the right
+*        Use unblocked Level 2 solver
 *
-         IF( I.LT.N ) THEN
-            CALL ZLACGV( N-I, A( I, I+1 ), LDA )
-            IF( I.LT.M ) THEN
-               A( I, I ) = ONE
-               CALL ZLARF( 'Right', M-I, N-I+1, A( I, I ), LDA,
-     $                     DCONJG( TAU( I ) ), A( I+1, I ), LDA, WORK )
+         DO 30 IROUND = 1, ISOLVE
+*
+            SCALE = ONE
+            DSCALE = ZERO
+            DSUM = ONE
+            PQ = M*N
+            CALL ZTGSY2( TRANS, IFUNC, M, N, A, LDA, B, LDB, C, LDC, D,
+     $                   LDD, E, LDE, F, LDF, SCALE, DSUM, DSCALE,
+     $                   INFO )
+            IF( DSCALE.NE.ZERO ) THEN
+               IF( IJOB.EQ.1 .OR. IJOB.EQ.3 ) THEN
+                  DIF = SQRT( DBLE( 2*M*N ) ) / ( DSCALE*SQRT( DSUM ) )
+               ELSE
+                  DIF = SQRT( DBLE( PQ ) ) / ( DSCALE*SQRT( DSUM ) )
+               END IF
             END IF
-            CALL ZSCAL( N-I, -TAU( I ), A( I, I+1 ), LDA )
-            CALL ZLACGV( N-I, A( I, I+1 ), LDA )
-         END IF
-         A( I, I ) = ONE - DCONJG( TAU( I ) )
+            IF( ISOLVE.EQ.2 .AND. IROUND.EQ.1 ) THEN
+               IF( NOTRAN ) THEN
+                  IFUNC = IJOB
+               END IF
+               SCALE2 = SCALE
+               CALL ZLACPY( 'F', M, N, C, LDC, WORK, M )
+               CALL ZLACPY( 'F', M, N, F, LDF, WORK( M*N+1 ), M )
+               CALL ZLASET( 'F', M, N, CZERO, CZERO, C, LDC )
+               CALL ZLASET( 'F', M, N, CZERO, CZERO, F, LDF )
+            ELSE IF( ISOLVE.EQ.2 .AND. IROUND.EQ.2 ) THEN
+               CALL ZLACPY( 'F', M, N, WORK, M, C, LDC )
+               CALL ZLACPY( 'F', M, N, WORK( M*N+1 ), M, F, LDF )
+               SCALE = SCALE2
+            END IF
+   30    CONTINUE
 *
-*        Set A(i,1:i-1) to zero
+         RETURN
 *
-         DO 30 L = 1, I - 1
-            A( I, L ) = ZERO
-   30    CONTINUE
+      END IF
+*
+*     Determine block structure of A
+*
+      P = 0
+      I = 1
    40 CONTINUE
+      IF( I.GT.M )
+     $   GO TO 50
+      P = P + 1
+      IWORK( P ) = I
+      I = I + MB
+      IF( I.GE.M )
+     $   GO TO 50
+      GO TO 40
+   50 CONTINUE
+      IWORK( P+1 ) = M + 1
+      IF( IWORK( P ).EQ.IWORK( P+1 ) )
+     $   P = P - 1
+*
+*     Determine block structure of B
+*
+      Q = P + 1
+      J = 1
+   60 CONTINUE
+      IF( J.GT.N )
+     $   GO TO 70
+*
+      Q = Q + 1
+      IWORK( Q ) = J
+      J = J + NB
+      IF( J.GE.N )
+     $   GO TO 70
+      GO TO 60
+*
+   70 CONTINUE
+      IWORK( Q+1 ) = N + 1
+      IF( IWORK( Q ).EQ.IWORK( Q+1 ) )
+     $   Q = Q - 1
+*
+      IF( NOTRAN ) THEN
+         DO 150 IROUND = 1, ISOLVE
+*
+*           Solve (I, J) - subsystem
+*               A(I, I) * R(I, J) - L(I, J) * B(J, J) = C(I, J)
+*               D(I, I) * R(I, J) - L(I, J) * E(J, J) = F(I, J)
+*           for I = P, P - 1, ..., 1; J = 1, 2, ..., Q
+*
+            PQ = 0
+            SCALE = ONE
+            DSCALE = ZERO
+            DSUM = ONE
+            DO 130 J = P + 2, Q
+               JS = IWORK( J )
+               JE = IWORK( J+1 ) - 1
+               NB = JE - JS + 1
+               DO 120 I = P, 1, -1
+                  IS = IWORK( I )
+                  IE = IWORK( I+1 ) - 1
+                  MB = IE - IS + 1
+                  CALL ZTGSY2( TRANS, IFUNC, MB, NB, A( IS, IS ), LDA,
+     $                         B( JS, JS ), LDB, C( IS, JS ), LDC,
+     $                         D( IS, IS ), LDD, E( JS, JS ), LDE,
+     $                         F( IS, JS ), LDF, SCALOC, DSUM, DSCALE,
+     $                         LINFO )
+                  IF( LINFO.GT.0 )
+     $               INFO = LINFO
+                  PQ = PQ + MB*NB
+                  IF( SCALOC.NE.ONE ) THEN
+                     DO 80 K = 1, JS - 1
+                        CALL ZSCAL( M, DCMPLX( SCALOC, ZERO ),
+     $                              C( 1, K ), 1 )
+                        CALL ZSCAL( M, DCMPLX( SCALOC, ZERO ),
+     $                              F( 1, K ), 1 )
+   80                CONTINUE
+                     DO 90 K = JS, JE
+                        CALL ZSCAL( IS-1, DCMPLX( SCALOC, ZERO ),
+     $                              C( 1, K ), 1 )
+                        CALL ZSCAL( IS-1, DCMPLX( SCALOC, ZERO ),
+     $                              F( 1, K ), 1 )
+   90                CONTINUE
+                     DO 100 K = JS, JE
+                        CALL ZSCAL( M-IE, DCMPLX( SCALOC, ZERO ),
+     $                              C( IE+1, K ), 1 )
+                        CALL ZSCAL( M-IE, DCMPLX( SCALOC, ZERO ),
+     $                              F( IE+1, K ), 1 )
+  100                CONTINUE
+                     DO 110 K = JE + 1, N
+                        CALL ZSCAL( M, DCMPLX( SCALOC, ZERO ),
+     $                              C( 1, K ), 1 )
+                        CALL ZSCAL( M, DCMPLX( SCALOC, ZERO ),
+     $                              F( 1, K ), 1 )
+  110                CONTINUE
+                     SCALE = SCALE*SCALOC
+                  END IF
+*
+*                 Substitute R(I,J) and L(I,J) into remaining equation.
+*
+                  IF( I.GT.1 ) THEN
+                     CALL ZGEMM( 'N', 'N', IS-1, NB, MB,
+     $                           DCMPLX( -ONE, ZERO ), A( 1, IS ), LDA,
+     $                           C( IS, JS ), LDC, DCMPLX( ONE, ZERO ),
+     $                           C( 1, JS ), LDC )
+                     CALL ZGEMM( 'N', 'N', IS-1, NB, MB,
+     $                           DCMPLX( -ONE, ZERO ), D( 1, IS ), LDD,
+     $                           C( IS, JS ), LDC, DCMPLX( ONE, ZERO ),
+     $                           F( 1, JS ), LDF )
+                  END IF
+                  IF( J.LT.Q ) THEN
+                     CALL ZGEMM( 'N', 'N', MB, N-JE, NB,
+     $                           DCMPLX( ONE, ZERO ), F( IS, JS ), LDF,
+     $                           B( JS, JE+1 ), LDB,
+     $                           DCMPLX( ONE, ZERO ), C( IS, JE+1 ),
+     $                           LDC )
+                     CALL ZGEMM( 'N', 'N', MB, N-JE, NB,
+     $                           DCMPLX( ONE, ZERO ), F( IS, JS ), LDF,
+     $                           E( JS, JE+1 ), LDE,
+     $                           DCMPLX( ONE, ZERO ), F( IS, JE+1 ),
+     $                           LDF )
+                  END IF
+  120          CONTINUE
+  130       CONTINUE
+            IF( DSCALE.NE.ZERO ) THEN
+               IF( IJOB.EQ.1 .OR. IJOB.EQ.3 ) THEN
+                  DIF = SQRT( DBLE( 2*M*N ) ) / ( DSCALE*SQRT( DSUM ) )
+               ELSE
+                  DIF = SQRT( DBLE( PQ ) ) / ( DSCALE*SQRT( DSUM ) )
+               END IF
+            END IF
+            IF( ISOLVE.EQ.2 .AND. IROUND.EQ.1 ) THEN
+               IF( NOTRAN ) THEN
+                  IFUNC = IJOB
+               END IF
+               SCALE2 = SCALE
+               CALL ZLACPY( 'F', M, N, C, LDC, WORK, M )
+               CALL ZLACPY( 'F', M, N, F, LDF, WORK( M*N+1 ), M )
+               CALL ZLASET( 'F', M, N, CZERO, CZERO, C, LDC )
+               CALL ZLASET( 'F', M, N, CZERO, CZERO, F, LDF )
+            ELSE IF( ISOLVE.EQ.2 .AND. IROUND.EQ.2 ) THEN
+               CALL ZLACPY( 'F', M, N, WORK, M, C, LDC )
+               CALL ZLACPY( 'F', M, N, WORK( M*N+1 ), M, F, LDF )
+               SCALE = SCALE2
+            END IF
+  150    CONTINUE
+      ELSE
+*
+*        Solve transposed (I, J)-subsystem
+*            A(I, I)**H * R(I, J) + D(I, I)**H * L(I, J) = C(I, J)
+*            R(I, J) * B(J, J)  + L(I, J) * E(J, J) = -F(I, J)
+*        for I = 1,2,..., P; J = Q, Q-1,..., 1
+*
+         SCALE = ONE
+         DO 210 I = 1, P
+            IS = IWORK( I )
+            IE = IWORK( I+1 ) - 1
+            MB = IE - IS + 1
+            DO 200 J = Q, P + 2, -1
+               JS = IWORK( J )
+               JE = IWORK( J+1 ) - 1
+               NB = JE - JS + 1
+               CALL ZTGSY2( TRANS, IFUNC, MB, NB, A( IS, IS ), LDA,
+     $                      B( JS, JS ), LDB, C( IS, JS ), LDC,
+     $                      D( IS, IS ), LDD, E( JS, JS ), LDE,
+     $                      F( IS, JS ), LDF, SCALOC, DSUM, DSCALE,
+     $                      LINFO )
+               IF( LINFO.GT.0 )
+     $            INFO = LINFO
+               IF( SCALOC.NE.ONE ) THEN
+                  DO 160 K = 1, JS - 1
+                     CALL ZSCAL( M, DCMPLX( SCALOC, ZERO ), C( 1, K ),
+     $                           1 )
+                     CALL ZSCAL( M, DCMPLX( SCALOC, ZERO ), F( 1, K ),
+     $                           1 )
+  160             CONTINUE
+                  DO 170 K = JS, JE
+                     CALL ZSCAL( IS-1, DCMPLX( SCALOC, ZERO ),
+     $                           C( 1, K ), 1 )
+                     CALL ZSCAL( IS-1, DCMPLX( SCALOC, ZERO ),
+     $                           F( 1, K ), 1 )
+  170             CONTINUE
+                  DO 180 K = JS, JE
+                     CALL ZSCAL( M-IE, DCMPLX( SCALOC, ZERO ),
+     $                           C( IE+1, K ), 1 )
+                     CALL ZSCAL( M-IE, DCMPLX( SCALOC, ZERO ),
+     $                           F( IE+1, K ), 1 )
+  180             CONTINUE
+                  DO 190 K = JE + 1, N
+                     CALL ZSCAL( M, DCMPLX( SCALOC, ZERO ), C( 1, K ),
+     $                           1 )
+                     CALL ZSCAL( M, DCMPLX( SCALOC, ZERO ), F( 1, K ),
+     $                           1 )
+  190             CONTINUE
+                  SCALE = SCALE*SCALOC
+               END IF
+*
+*              Substitute R(I,J) and L(I,J) into remaining equation.
+*
+               IF( J.GT.P+2 ) THEN
+                  CALL ZGEMM( 'N', 'C', MB, JS-1, NB,
+     $                        DCMPLX( ONE, ZERO ), C( IS, JS ), LDC,
+     $                        B( 1, JS ), LDB, DCMPLX( ONE, ZERO ),
+     $                        F( IS, 1 ), LDF )
+                  CALL ZGEMM( 'N', 'C', MB, JS-1, NB,
+     $                        DCMPLX( ONE, ZERO ), F( IS, JS ), LDF,
+     $                        E( 1, JS ), LDE, DCMPLX( ONE, ZERO ),
+     $                        F( IS, 1 ), LDF )
+               END IF
+               IF( I.LT.P ) THEN
+                  CALL ZGEMM( 'C', 'N', M-IE, NB, MB,
+     $                        DCMPLX( -ONE, ZERO ), A( IS, IE+1 ), LDA,
+     $                        C( IS, JS ), LDC, DCMPLX( ONE, ZERO ),
+     $                        C( IE+1, JS ), LDC )
+                  CALL ZGEMM( 'C', 'N', M-IE, NB, MB,
+     $                        DCMPLX( -ONE, ZERO ), D( IS, IE+1 ), LDD,
+     $                        F( IS, JS ), LDF, DCMPLX( ONE, ZERO ),
+     $                        C( IE+1, JS ), LDC )
+               END IF
+  200       CONTINUE
+  210    CONTINUE
+      END IF
+*
+      WORK( 1 ) = LWMIN
+*
       RETURN
 *
-*     End of ZUNGL2
+*     End of ZTGSYL
 *
       END
-*> \brief \b ZUNGLQ
+*> \brief \b ZTRCON
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download ZUNGLQ + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/zunglq.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/zunglq.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/zunglq.f"> 
+*> Download ZTRCON + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/ztrcon.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/ztrcon.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/ztrcon.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
-*       SUBROUTINE ZUNGLQ( M, N, K, A, LDA, TAU, WORK, LWORK, INFO )
-* 
+*       SUBROUTINE ZTRCON( NORM, UPLO, DIAG, N, A, LDA, RCOND, WORK,
+*                          RWORK, INFO )
+*
 *       .. Scalar Arguments ..
-*       INTEGER            INFO, K, LDA, LWORK, M, N
+*       CHARACTER          DIAG, NORM, UPLO
+*       INTEGER            INFO, LDA, N
+*       DOUBLE PRECISION   RCOND
 *       ..
 *       .. Array Arguments ..
-*       COMPLEX*16         A( LDA, * ), TAU( * ), WORK( * )
+*       DOUBLE PRECISION   RWORK( * )
+*       COMPLEX*16         A( LDA, * ), WORK( * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
 *>
 *> \verbatim
 *>
-*> ZUNGLQ generates an M-by-N complex matrix Q with orthonormal rows,
-*> which is defined as the first M rows of a product of K elementary
-*> reflectors of order N
-*>
-*>       Q  =  H(k)**H . . . H(2)**H H(1)**H
+*> ZTRCON estimates the reciprocal of the condition number of a
+*> triangular matrix A, in either the 1-norm or the infinity-norm.
 *>
-*> as returned by ZGELQF.
+*> The norm of A is computed and an estimate is obtained for
+*> norm(inv(A)), then the reciprocal of the condition number is
+*> computed as
+*>    RCOND = 1 / ( norm(A) * norm(inv(A)) ).
 *> \endverbatim
 *
 *  Arguments:
 *  ==========
 *
-*> \param[in] M
+*> \param[in] NORM
 *> \verbatim
-*>          M is INTEGER
-*>          The number of rows of the matrix Q. M >= 0.
+*>          NORM is CHARACTER*1
+*>          Specifies whether the 1-norm condition number or the
+*>          infinity-norm condition number is required:
+*>          = '1' or 'O':  1-norm;
+*>          = 'I':         Infinity-norm.
 *> \endverbatim
 *>
-*> \param[in] N
+*> \param[in] UPLO
 *> \verbatim
-*>          N is INTEGER
-*>          The number of columns of the matrix Q. N >= M.
+*>          UPLO is CHARACTER*1
+*>          = 'U':  A is upper triangular;
+*>          = 'L':  A is lower triangular.
 *> \endverbatim
 *>
-*> \param[in] K
+*> \param[in] DIAG
 *> \verbatim
-*>          K is INTEGER
-*>          The number of elementary reflectors whose product defines the
-*>          matrix Q. M >= K >= 0.
+*>          DIAG is CHARACTER*1
+*>          = 'N':  A is non-unit triangular;
+*>          = 'U':  A is unit triangular.
 *> \endverbatim
 *>
-*> \param[in,out] A
+*> \param[in] N
+*> \verbatim
+*>          N is INTEGER
+*>          The order of the matrix A.  N >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
 *> \verbatim
 *>          A is COMPLEX*16 array, dimension (LDA,N)
-*>          On entry, the i-th row must contain the vector which defines
-*>          the elementary reflector H(i), for i = 1,2,...,k, as returned
-*>          by ZGELQF in the first k rows of its array argument A.
-*>          On exit, the M-by-N matrix Q.
+*>          The triangular matrix A.  If UPLO = 'U', the leading N-by-N
+*>          upper triangular part of the array A contains the upper
+*>          triangular matrix, and the strictly lower triangular part of
+*>          A is not referenced.  If UPLO = 'L', the leading N-by-N lower
+*>          triangular part of the array A contains the lower triangular
+*>          matrix, and the strictly upper triangular part of A is not
+*>          referenced.  If DIAG = 'U', the diagonal elements of A are
+*>          also not referenced and are assumed to be 1.
 *> \endverbatim
 *>
 *> \param[in] LDA
 *> \verbatim
 *>          LDA is INTEGER
-*>          The first dimension of the array A. LDA >= max(1,M).
+*>          The leading dimension of the array A.  LDA >= max(1,N).
 *> \endverbatim
 *>
-*> \param[in] TAU
+*> \param[out] RCOND
 *> \verbatim
-*>          TAU is COMPLEX*16 array, dimension (K)
-*>          TAU(i) must contain the scalar factor of the elementary
-*>          reflector H(i), as returned by ZGELQF.
+*>          RCOND is DOUBLE PRECISION
+*>          The reciprocal of the condition number of the matrix A,
+*>          computed as RCOND = 1/(norm(A) * norm(inv(A))).
 *> \endverbatim
 *>
 *> \param[out] WORK
 *> \verbatim
-*>          WORK is COMPLEX*16 array, dimension (MAX(1,LWORK))
-*>          On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+*>          WORK is COMPLEX*16 array, dimension (2*N)
 *> \endverbatim
 *>
-*> \param[in] LWORK
+*> \param[out] RWORK
 *> \verbatim
-*>          LWORK is INTEGER
-*>          The dimension of the array WORK. LWORK >= max(1,M).
-*>          For optimum performance LWORK >= M*NB, where NB is
-*>          the optimal blocksize.
-*>
-*>          If LWORK = -1, then a workspace query is assumed; the routine
-*>          only calculates the optimal size of the WORK array, returns
-*>          this value as the first entry of the WORK array, and no error
-*>          message related to LWORK is issued by XERBLA.
+*>          RWORK is DOUBLE PRECISION array, dimension (N)
 *> \endverbatim
 *>
 *> \param[out] INFO
 *> \verbatim
 *>          INFO is INTEGER
-*>          = 0:  successful exit;
-*>          < 0:  if INFO = -i, the i-th argument has an illegal value
+*>          = 0:  successful exit
+*>          < 0:  if INFO = -i, the i-th argument had an illegal value
 *> \endverbatim
 *
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date November 2011
+*> \date December 2016
 *
 *> \ingroup complex16OTHERcomputational
 *
 *  =====================================================================
-      SUBROUTINE ZUNGLQ( M, N, K, A, LDA, TAU, WORK, LWORK, INFO )
+      SUBROUTINE ZTRCON( NORM, UPLO, DIAG, N, A, LDA, RCOND, WORK,
+     $                   RWORK, INFO )
 *
-*  -- LAPACK computational routine (version 3.4.0) --
+*  -- LAPACK computational routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     November 2011
+*     December 2016
 *
 *     .. Scalar Arguments ..
-      INTEGER            INFO, K, LDA, LWORK, M, N
+      CHARACTER          DIAG, NORM, UPLO
+      INTEGER            INFO, LDA, N
+      DOUBLE PRECISION   RCOND
 *     ..
 *     .. Array Arguments ..
-      COMPLEX*16         A( LDA, * ), TAU( * ), WORK( * )
+      DOUBLE PRECISION   RWORK( * )
+      COMPLEX*16         A( LDA, * ), WORK( * )
 *     ..
 *
 *  =====================================================================
 *
 *     .. Parameters ..
-      COMPLEX*16         ZERO
-      PARAMETER          ( ZERO = ( 0.0D+0, 0.0D+0 ) )
+      DOUBLE PRECISION   ONE, ZERO
+      PARAMETER          ( ONE = 1.0D+0, ZERO = 0.0D+0 )
 *     ..
 *     .. Local Scalars ..
-      LOGICAL            LQUERY
-      INTEGER            I, IB, IINFO, IWS, J, KI, KK, L, LDWORK,
-     $                   LWKOPT, NB, NBMIN, NX
+      LOGICAL            NOUNIT, ONENRM, UPPER
+      CHARACTER          NORMIN
+      INTEGER            IX, KASE, KASE1
+      DOUBLE PRECISION   AINVNM, ANORM, SCALE, SMLNUM, XNORM
+      COMPLEX*16         ZDUM
+*     ..
+*     .. Local Arrays ..
+      INTEGER            ISAVE( 3 )
+*     ..
+*     .. External Functions ..
+      LOGICAL            LSAME
+      INTEGER            IZAMAX
+      DOUBLE PRECISION   DLAMCH, ZLANTR
+      EXTERNAL           LSAME, IZAMAX, DLAMCH, ZLANTR
 *     ..
 *     .. External Subroutines ..
-      EXTERNAL           XERBLA, ZLARFB, ZLARFT, ZUNGL2
+      EXTERNAL           XERBLA, ZDRSCL, ZLACN2, ZLATRS
 *     ..
 *     .. Intrinsic Functions ..
-      INTRINSIC          MAX, MIN
+      INTRINSIC          ABS, DBLE, DIMAG, MAX
 *     ..
-*     .. External Functions ..
-      INTEGER            ILAENV
-      EXTERNAL           ILAENV
+*     .. Statement Functions ..
+      DOUBLE PRECISION   CABS1
+*     ..
+*     .. Statement Function definitions ..
+      CABS1( ZDUM ) = ABS( DBLE( ZDUM ) ) + ABS( DIMAG( ZDUM ) )
 *     ..
 *     .. Executable Statements ..
 *
-*     Test the input arguments
+*     Test the input parameters.
 *
       INFO = 0
-      NB = ILAENV( 1, 'ZUNGLQ', ' ', M, N, K, -1 )
-      LWKOPT = MAX( 1, M )*NB
-      WORK( 1 ) = LWKOPT
-      LQUERY = ( LWORK.EQ.-1 )
-      IF( M.LT.0 ) THEN
+      UPPER = LSAME( UPLO, 'U' )
+      ONENRM = NORM.EQ.'1' .OR. LSAME( NORM, 'O' )
+      NOUNIT = LSAME( DIAG, 'N' )
+*
+      IF( .NOT.ONENRM .AND. .NOT.LSAME( NORM, 'I' ) ) THEN
          INFO = -1
-      ELSE IF( N.LT.M ) THEN
+      ELSE IF( .NOT.UPPER .AND. .NOT.LSAME( UPLO, 'L' ) ) THEN
          INFO = -2
-      ELSE IF( K.LT.0 .OR. K.GT.M ) THEN
+      ELSE IF( .NOT.NOUNIT .AND. .NOT.LSAME( DIAG, 'U' ) ) THEN
          INFO = -3
-      ELSE IF( LDA.LT.MAX( 1, M ) ) THEN
-         INFO = -5
-      ELSE IF( LWORK.LT.MAX( 1, M ) .AND. .NOT.LQUERY ) THEN
-         INFO = -8
+      ELSE IF( N.LT.0 ) THEN
+         INFO = -4
+      ELSE IF( LDA.LT.MAX( 1, N ) ) THEN
+         INFO = -6
       END IF
       IF( INFO.NE.0 ) THEN
-         CALL XERBLA( 'ZUNGLQ', -INFO )
-         RETURN
-      ELSE IF( LQUERY ) THEN
+         CALL XERBLA( 'ZTRCON', -INFO )
          RETURN
       END IF
 *
 *     Quick return if possible
 *
-      IF( M.LE.0 ) THEN
-         WORK( 1 ) = 1
+      IF( N.EQ.0 ) THEN
+         RCOND = ONE
          RETURN
       END IF
 *
-      NBMIN = 2
-      NX = 0
-      IWS = M
-      IF( NB.GT.1 .AND. NB.LT.K ) THEN
+      RCOND = ZERO
+      SMLNUM = DLAMCH( 'Safe minimum' )*DBLE( MAX( 1, N ) )
 *
-*        Determine when to cross over from blocked to unblocked code.
+*     Compute the norm of the triangular matrix A.
 *
-         NX = MAX( 0, ILAENV( 3, 'ZUNGLQ', ' ', M, N, K, -1 ) )
-         IF( NX.LT.K ) THEN
+      ANORM = ZLANTR( NORM, UPLO, DIAG, N, N, A, LDA, RWORK )
 *
-*           Determine if workspace is large enough for blocked code.
+*     Continue only if ANORM > 0.
 *
-            LDWORK = M
-            IWS = LDWORK*NB
-            IF( LWORK.LT.IWS ) THEN
+      IF( ANORM.GT.ZERO ) THEN
 *
-*              Not enough workspace to use optimal NB:  reduce NB and
-*              determine the minimum value of NB.
+*        Estimate the norm of the inverse of A.
 *
-               NB = LWORK / LDWORK
-               NBMIN = MAX( 2, ILAENV( 2, 'ZUNGLQ', ' ', M, N, K, -1 ) )
-            END IF
+         AINVNM = ZERO
+         NORMIN = 'N'
+         IF( ONENRM ) THEN
+            KASE1 = 1
+         ELSE
+            KASE1 = 2
          END IF
-      END IF
-*
-      IF( NB.GE.NBMIN .AND. NB.LT.K .AND. NX.LT.K ) THEN
-*
-*        Use blocked code after the last block.
-*        The first kk rows are handled by the block method.
-*
-         KI = ( ( K-NX-1 ) / NB )*NB
-         KK = MIN( K, KI+NB )
-*
-*        Set A(kk+1:m,1:kk) to zero.
-*
-         DO 20 J = 1, KK
-            DO 10 I = KK + 1, M
-               A( I, J ) = ZERO
-   10       CONTINUE
-   20    CONTINUE
-      ELSE
-         KK = 0
-      END IF
-*
-*     Use unblocked code for the last or only block.
-*
-      IF( KK.LT.M )
-     $   CALL ZUNGL2( M-KK, N-KK, K-KK, A( KK+1, KK+1 ), LDA,
-     $                TAU( KK+1 ), WORK, IINFO )
-*
-      IF( KK.GT.0 ) THEN
-*
-*        Use blocked code
-*
-         DO 50 I = KI + 1, 1, -NB
-            IB = MIN( NB, K-I+1 )
-            IF( I+IB.LE.M ) THEN
+         KASE = 0
+   10    CONTINUE
+         CALL ZLACN2( N, WORK( N+1 ), WORK, AINVNM, KASE, ISAVE )
+         IF( KASE.NE.0 ) THEN
+            IF( KASE.EQ.KASE1 ) THEN
 *
-*              Form the triangular factor of the block reflector
-*              H = H(i) H(i+1) . . . H(i+ib-1)
+*              Multiply by inv(A).
 *
-               CALL ZLARFT( 'Forward', 'Rowwise', N-I+1, IB, A( I, I ),
-     $                      LDA, TAU( I ), WORK, LDWORK )
+               CALL ZLATRS( UPLO, 'No transpose', DIAG, NORMIN, N, A,
+     $                      LDA, WORK, SCALE, RWORK, INFO )
+            ELSE
 *
-*              Apply H**H to A(i+ib:m,i:n) from the right
+*              Multiply by inv(A**H).
 *
-               CALL ZLARFB( 'Right', 'Conjugate transpose', 'Forward',
-     $                      'Rowwise', M-I-IB+1, N-I+1, IB, A( I, I ),
-     $                      LDA, WORK, LDWORK, A( I+IB, I ), LDA,
-     $                      WORK( IB+1 ), LDWORK )
+               CALL ZLATRS( UPLO, 'Conjugate transpose', DIAG, NORMIN,
+     $                      N, A, LDA, WORK, SCALE, RWORK, INFO )
             END IF
+            NORMIN = 'Y'
 *
-*           Apply H**H to columns i:n of current block
+*           Multiply by 1/SCALE if doing so will not cause overflow.
 *
-            CALL ZUNGL2( IB, N-I+1, IB, A( I, I ), LDA, TAU( I ), WORK,
-     $                   IINFO )
+            IF( SCALE.NE.ONE ) THEN
+               IX = IZAMAX( N, WORK, 1 )
+               XNORM = CABS1( WORK( IX ) )
+               IF( SCALE.LT.XNORM*SMLNUM .OR. SCALE.EQ.ZERO )
+     $            GO TO 20
+               CALL ZDRSCL( N, SCALE, WORK, 1 )
+            END IF
+            GO TO 10
+         END IF
 *
-*           Set columns 1:i-1 of current block to zero
+*        Compute the estimate of the reciprocal condition number.
 *
-            DO 40 J = 1, I - 1
-               DO 30 L = I, I + IB - 1
-                  A( L, J ) = ZERO
-   30          CONTINUE
-   40       CONTINUE
-   50    CONTINUE
+         IF( AINVNM.NE.ZERO )
+     $      RCOND = ( ONE / ANORM ) / AINVNM
       END IF
 *
-      WORK( 1 ) = IWS
+   20 CONTINUE
       RETURN
 *
-*     End of ZUNGLQ
+*     End of ZTRCON
 *
       END
-*> \brief \b ZUNGQL
+*> \brief \b ZTREVC
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download ZUNGQL + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/zungql.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/zungql.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/zungql.f"> 
+*> Download ZTREVC + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/ztrevc.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/ztrevc.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/ztrevc.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
-*       SUBROUTINE ZUNGQL( M, N, K, A, LDA, TAU, WORK, LWORK, INFO )
-* 
+*       SUBROUTINE ZTREVC( SIDE, HOWMNY, SELECT, N, T, LDT, VL, LDVL, VR,
+*                          LDVR, MM, M, WORK, RWORK, INFO )
+*
 *       .. Scalar Arguments ..
-*       INTEGER            INFO, K, LDA, LWORK, M, N
+*       CHARACTER          HOWMNY, SIDE
+*       INTEGER            INFO, LDT, LDVL, LDVR, M, MM, N
 *       ..
 *       .. Array Arguments ..
-*       COMPLEX*16         A( LDA, * ), TAU( * ), WORK( * )
+*       LOGICAL            SELECT( * )
+*       DOUBLE PRECISION   RWORK( * )
+*       COMPLEX*16         T( LDT, * ), VL( LDVL, * ), VR( LDVR, * ),
+*      $                   WORK( * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
 *>
 *> \verbatim
 *>
-*> ZUNGQL generates an M-by-N complex matrix Q with orthonormal columns,
-*> which is defined as the last N columns of a product of K elementary
-*> reflectors of order M
+*> ZTREVC computes some or all of the right and/or left eigenvectors of
+*> a complex upper triangular matrix T.
+*> Matrices of this type are produced by the Schur factorization of
+*> a complex general matrix:  A = Q*T*Q**H, as computed by ZHSEQR.
+*>
+*> The right eigenvector x and the left eigenvector y of T corresponding
+*> to an eigenvalue w are defined by:
+*>
+*>              T*x = w*x,     (y**H)*T = w*(y**H)
 *>
-*>       Q  =  H(k) . . . H(2) H(1)
+*> where y**H denotes the conjugate transpose of the vector y.
+*> The eigenvalues are not input to this routine, but are read directly
+*> from the diagonal of T.
 *>
-*> as returned by ZGEQLF.
+*> This routine returns the matrices X and/or Y of right and left
+*> eigenvectors of T, or the products Q*X and/or Q*Y, where Q is an
+*> input matrix.  If Q is the unitary factor that reduces a matrix A to
+*> Schur form T, then Q*X and Q*Y are the matrices of right and left
+*> eigenvectors of A.
 *> \endverbatim
 *
 *  Arguments:
 *  ==========
 *
-*> \param[in] M
+*> \param[in] SIDE
 *> \verbatim
-*>          M is INTEGER
-*>          The number of rows of the matrix Q. M >= 0.
+*>          SIDE is CHARACTER*1
+*>          = 'R':  compute right eigenvectors only;
+*>          = 'L':  compute left eigenvectors only;
+*>          = 'B':  compute both right and left eigenvectors.
+*> \endverbatim
+*>
+*> \param[in] HOWMNY
+*> \verbatim
+*>          HOWMNY is CHARACTER*1
+*>          = 'A':  compute all right and/or left eigenvectors;
+*>          = 'B':  compute all right and/or left eigenvectors,
+*>                  backtransformed using the matrices supplied in
+*>                  VR and/or VL;
+*>          = 'S':  compute selected right and/or left eigenvectors,
+*>                  as indicated by the logical array SELECT.
+*> \endverbatim
+*>
+*> \param[in] SELECT
+*> \verbatim
+*>          SELECT is LOGICAL array, dimension (N)
+*>          If HOWMNY = 'S', SELECT specifies the eigenvectors to be
+*>          computed.
+*>          The eigenvector corresponding to the j-th eigenvalue is
+*>          computed if SELECT(j) = .TRUE..
+*>          Not referenced if HOWMNY = 'A' or 'B'.
 *> \endverbatim
 *>
 *> \param[in] N
 *> \verbatim
 *>          N is INTEGER
-*>          The number of columns of the matrix Q. M >= N >= 0.
+*>          The order of the matrix T. N >= 0.
 *> \endverbatim
 *>
-*> \param[in] K
+*> \param[in,out] T
 *> \verbatim
-*>          K is INTEGER
-*>          The number of elementary reflectors whose product defines the
-*>          matrix Q. N >= K >= 0.
+*>          T is COMPLEX*16 array, dimension (LDT,N)
+*>          The upper triangular matrix T.  T is modified, but restored
+*>          on exit.
 *> \endverbatim
 *>
-*> \param[in,out] A
+*> \param[in] LDT
 *> \verbatim
-*>          A is COMPLEX*16 array, dimension (LDA,N)
-*>          On entry, the (n-k+i)-th column must contain the vector which
-*>          defines the elementary reflector H(i), for i = 1,2,...,k, as
-*>          returned by ZGEQLF in the last k columns of its array
-*>          argument A.
-*>          On exit, the M-by-N matrix Q.
+*>          LDT is INTEGER
+*>          The leading dimension of the array T. LDT >= max(1,N).
 *> \endverbatim
 *>
-*> \param[in] LDA
+*> \param[in,out] VL
 *> \verbatim
-*>          LDA is INTEGER
-*>          The first dimension of the array A. LDA >= max(1,M).
+*>          VL is COMPLEX*16 array, dimension (LDVL,MM)
+*>          On entry, if SIDE = 'L' or 'B' and HOWMNY = 'B', VL must
+*>          contain an N-by-N matrix Q (usually the unitary matrix Q of
+*>          Schur vectors returned by ZHSEQR).
+*>          On exit, if SIDE = 'L' or 'B', VL contains:
+*>          if HOWMNY = 'A', the matrix Y of left eigenvectors of T;
+*>          if HOWMNY = 'B', the matrix Q*Y;
+*>          if HOWMNY = 'S', the left eigenvectors of T specified by
+*>                           SELECT, stored consecutively in the columns
+*>                           of VL, in the same order as their
+*>                           eigenvalues.
+*>          Not referenced if SIDE = 'R'.
 *> \endverbatim
 *>
-*> \param[in] TAU
+*> \param[in] LDVL
 *> \verbatim
-*>          TAU is COMPLEX*16 array, dimension (K)
-*>          TAU(i) must contain the scalar factor of the elementary
-*>          reflector H(i), as returned by ZGEQLF.
+*>          LDVL is INTEGER
+*>          The leading dimension of the array VL.  LDVL >= 1, and if
+*>          SIDE = 'L' or 'B', LDVL >= N.
 *> \endverbatim
 *>
-*> \param[out] WORK
+*> \param[in,out] VR
 *> \verbatim
-*>          WORK is COMPLEX*16 array, dimension (MAX(1,LWORK))
-*>          On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+*>          VR is COMPLEX*16 array, dimension (LDVR,MM)
+*>          On entry, if SIDE = 'R' or 'B' and HOWMNY = 'B', VR must
+*>          contain an N-by-N matrix Q (usually the unitary matrix Q of
+*>          Schur vectors returned by ZHSEQR).
+*>          On exit, if SIDE = 'R' or 'B', VR contains:
+*>          if HOWMNY = 'A', the matrix X of right eigenvectors of T;
+*>          if HOWMNY = 'B', the matrix Q*X;
+*>          if HOWMNY = 'S', the right eigenvectors of T specified by
+*>                           SELECT, stored consecutively in the columns
+*>                           of VR, in the same order as their
+*>                           eigenvalues.
+*>          Not referenced if SIDE = 'L'.
 *> \endverbatim
 *>
-*> \param[in] LWORK
+*> \param[in] LDVR
 *> \verbatim
-*>          LWORK is INTEGER
-*>          The dimension of the array WORK. LWORK >= max(1,N).
-*>          For optimum performance LWORK >= N*NB, where NB is the
-*>          optimal blocksize.
+*>          LDVR is INTEGER
+*>          The leading dimension of the array VR.  LDVR >= 1, and if
+*>          SIDE = 'R' or 'B'; LDVR >= N.
+*> \endverbatim
 *>
-*>          If LWORK = -1, then a workspace query is assumed; the routine
-*>          only calculates the optimal size of the WORK array, returns
-*>          this value as the first entry of the WORK array, and no error
-*>          message related to LWORK is issued by XERBLA.
+*> \param[in] MM
+*> \verbatim
+*>          MM is INTEGER
+*>          The number of columns in the arrays VL and/or VR. MM >= M.
+*> \endverbatim
+*>
+*> \param[out] M
+*> \verbatim
+*>          M is INTEGER
+*>          The number of columns in the arrays VL and/or VR actually
+*>          used to store the eigenvectors.  If HOWMNY = 'A' or 'B', M
+*>          is set to N.  Each selected eigenvector occupies one
+*>          column.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*>          WORK is COMPLEX*16 array, dimension (2*N)
+*> \endverbatim
+*>
+*> \param[out] RWORK
+*> \verbatim
+*>          RWORK is DOUBLE PRECISION array, dimension (N)
 *> \endverbatim
 *>
 *> \param[out] INFO
 *> \verbatim
 *>          INFO is INTEGER
 *>          = 0:  successful exit
-*>          < 0:  if INFO = -i, the i-th argument has an illegal value
+*>          < 0:  if INFO = -i, the i-th argument had an illegal value
 *> \endverbatim
 *
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date November 2011
+*> \date December 2016
 *
 *> \ingroup complex16OTHERcomputational
 *
+*> \par Further Details:
+*  =====================
+*>
+*> \verbatim
+*>
+*>  The algorithm used in this program is basically backward (forward)
+*>  substitution, with scaling to make the the code robust against
+*>  possible overflow.
+*>
+*>  Each eigenvector is normalized so that the element of largest
+*>  magnitude has magnitude 1; here the magnitude of a complex number
+*>  (x,y) is taken to be |x| + |y|.
+*> \endverbatim
+*>
 *  =====================================================================
-      SUBROUTINE ZUNGQL( M, N, K, A, LDA, TAU, WORK, LWORK, INFO )
+      SUBROUTINE ZTREVC( SIDE, HOWMNY, SELECT, N, T, LDT, VL, LDVL, VR,
+     $                   LDVR, MM, M, WORK, RWORK, INFO )
 *
-*  -- LAPACK computational routine (version 3.4.0) --
+*  -- LAPACK computational routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     November 2011
+*     December 2016
 *
 *     .. Scalar Arguments ..
-      INTEGER            INFO, K, LDA, LWORK, M, N
+      CHARACTER          HOWMNY, SIDE
+      INTEGER            INFO, LDT, LDVL, LDVR, M, MM, N
 *     ..
 *     .. Array Arguments ..
-      COMPLEX*16         A( LDA, * ), TAU( * ), WORK( * )
+      LOGICAL            SELECT( * )
+      DOUBLE PRECISION   RWORK( * )
+      COMPLEX*16         T( LDT, * ), VL( LDVL, * ), VR( LDVR, * ),
+     $                   WORK( * )
 *     ..
 *
 *  =====================================================================
 *
 *     .. Parameters ..
-      COMPLEX*16         ZERO
-      PARAMETER          ( ZERO = ( 0.0D+0, 0.0D+0 ) )
+      DOUBLE PRECISION   ZERO, ONE
+      PARAMETER          ( ZERO = 0.0D+0, ONE = 1.0D+0 )
+      COMPLEX*16         CMZERO, CMONE
+      PARAMETER          ( CMZERO = ( 0.0D+0, 0.0D+0 ),
+     $                   CMONE = ( 1.0D+0, 0.0D+0 ) )
 *     ..
 *     .. Local Scalars ..
-      LOGICAL            LQUERY
-      INTEGER            I, IB, IINFO, IWS, J, KK, L, LDWORK, LWKOPT,
-     $                   NB, NBMIN, NX
+      LOGICAL            ALLV, BOTHV, LEFTV, OVER, RIGHTV, SOMEV
+      INTEGER            I, II, IS, J, K, KI
+      DOUBLE PRECISION   OVFL, REMAX, SCALE, SMIN, SMLNUM, ULP, UNFL
+      COMPLEX*16         CDUM
+*     ..
+*     .. External Functions ..
+      LOGICAL            LSAME
+      INTEGER            IZAMAX
+      DOUBLE PRECISION   DLAMCH, DZASUM
+      EXTERNAL           LSAME, IZAMAX, DLAMCH, DZASUM
 *     ..
 *     .. External Subroutines ..
-      EXTERNAL           XERBLA, ZLARFB, ZLARFT, ZUNG2L
+      EXTERNAL           XERBLA, ZCOPY, ZDSCAL, ZGEMV, ZLATRS
 *     ..
 *     .. Intrinsic Functions ..
-      INTRINSIC          MAX, MIN
+      INTRINSIC          ABS, DBLE, DCMPLX, DCONJG, DIMAG, MAX
 *     ..
-*     .. External Functions ..
-      INTEGER            ILAENV
-      EXTERNAL           ILAENV
+*     .. Statement Functions ..
+      DOUBLE PRECISION   CABS1
+*     ..
+*     .. Statement Function definitions ..
+      CABS1( CDUM ) = ABS( DBLE( CDUM ) ) + ABS( DIMAG( CDUM ) )
 *     ..
 *     .. Executable Statements ..
 *
-*     Test the input arguments
+*     Decode and test the input parameters
 *
-      INFO = 0
-      LQUERY = ( LWORK.EQ.-1 )
-      IF( M.LT.0 ) THEN
-         INFO = -1
-      ELSE IF( N.LT.0 .OR. N.GT.M ) THEN
-         INFO = -2
-      ELSE IF( K.LT.0 .OR. K.GT.N ) THEN
-         INFO = -3
-      ELSE IF( LDA.LT.MAX( 1, M ) ) THEN
-         INFO = -5
-      END IF
+      BOTHV = LSAME( SIDE, 'B' )
+      RIGHTV = LSAME( SIDE, 'R' ) .OR. BOTHV
+      LEFTV = LSAME( SIDE, 'L' ) .OR. BOTHV
 *
-      IF( INFO.EQ.0 ) THEN
-         IF( N.EQ.0 ) THEN
-            LWKOPT = 1
-         ELSE
-            NB = ILAENV( 1, 'ZUNGQL', ' ', M, N, K, -1 )
-            LWKOPT = N*NB
-         END IF
-         WORK( 1 ) = LWKOPT
+      ALLV = LSAME( HOWMNY, 'A' )
+      OVER = LSAME( HOWMNY, 'B' )
+      SOMEV = LSAME( HOWMNY, 'S' )
 *
-         IF( LWORK.LT.MAX( 1, N ) .AND. .NOT.LQUERY ) THEN
-            INFO = -8
-         END IF
+*     Set M to the number of columns required to store the selected
+*     eigenvectors.
+*
+      IF( SOMEV ) THEN
+         M = 0
+         DO 10 J = 1, N
+            IF( SELECT( J ) )
+     $         M = M + 1
+   10    CONTINUE
+      ELSE
+         M = N
       END IF
 *
+      INFO = 0
+      IF( .NOT.RIGHTV .AND. .NOT.LEFTV ) THEN
+         INFO = -1
+      ELSE IF( .NOT.ALLV .AND. .NOT.OVER .AND. .NOT.SOMEV ) THEN
+         INFO = -2
+      ELSE IF( N.LT.0 ) THEN
+         INFO = -4
+      ELSE IF( LDT.LT.MAX( 1, N ) ) THEN
+         INFO = -6
+      ELSE IF( LDVL.LT.1 .OR. ( LEFTV .AND. LDVL.LT.N ) ) THEN
+         INFO = -8
+      ELSE IF( LDVR.LT.1 .OR. ( RIGHTV .AND. LDVR.LT.N ) ) THEN
+         INFO = -10
+      ELSE IF( MM.LT.M ) THEN
+         INFO = -11
+      END IF
       IF( INFO.NE.0 ) THEN
-         CALL XERBLA( 'ZUNGQL', -INFO )
-         RETURN
-      ELSE IF( LQUERY ) THEN
+         CALL XERBLA( 'ZTREVC', -INFO )
          RETURN
       END IF
 *
-*     Quick return if possible
+*     Quick return if possible.
 *
-      IF( N.LE.0 ) THEN
-         RETURN
-      END IF
+      IF( N.EQ.0 )
+     $   RETURN
 *
-      NBMIN = 2
-      NX = 0
-      IWS = N
-      IF( NB.GT.1 .AND. NB.LT.K ) THEN
+*     Set the constants to control overflow.
 *
-*        Determine when to cross over from blocked to unblocked code.
+      UNFL = DLAMCH( 'Safe minimum' )
+      OVFL = ONE / UNFL
+      CALL DLABAD( UNFL, OVFL )
+      ULP = DLAMCH( 'Precision' )
+      SMLNUM = UNFL*( N / ULP )
 *
-         NX = MAX( 0, ILAENV( 3, 'ZUNGQL', ' ', M, N, K, -1 ) )
-         IF( NX.LT.K ) THEN
+*     Store the diagonal elements of T in working array WORK.
 *
-*           Determine if workspace is large enough for blocked code.
+      DO 20 I = 1, N
+         WORK( I+N ) = T( I, I )
+   20 CONTINUE
 *
-            LDWORK = N
-            IWS = LDWORK*NB
-            IF( LWORK.LT.IWS ) THEN
+*     Compute 1-norm of each column of strictly upper triangular
+*     part of T to control overflow in triangular solver.
 *
-*              Not enough workspace to use optimal NB:  reduce NB and
-*              determine the minimum value of NB.
+      RWORK( 1 ) = ZERO
+      DO 30 J = 2, N
+         RWORK( J ) = DZASUM( J-1, T( 1, J ), 1 )
+   30 CONTINUE
 *
-               NB = LWORK / LDWORK
-               NBMIN = MAX( 2, ILAENV( 2, 'ZUNGQL', ' ', M, N, K, -1 ) )
+      IF( RIGHTV ) THEN
+*
+*        Compute right eigenvectors.
+*
+         IS = M
+         DO 80 KI = N, 1, -1
+*
+            IF( SOMEV ) THEN
+               IF( .NOT.SELECT( KI ) )
+     $            GO TO 80
             END IF
-         END IF
-      END IF
+            SMIN = MAX( ULP*( CABS1( T( KI, KI ) ) ), SMLNUM )
 *
-      IF( NB.GE.NBMIN .AND. NB.LT.K .AND. NX.LT.K ) THEN
+            WORK( 1 ) = CMONE
 *
-*        Use blocked code after the first block.
-*        The last kk columns are handled by the block method.
+*           Form right-hand side.
 *
-         KK = MIN( K, ( ( K-NX+NB-1 ) / NB )*NB )
+            DO 40 K = 1, KI - 1
+               WORK( K ) = -T( K, KI )
+   40       CONTINUE
 *
-*        Set A(m-kk+1:m,1:n-kk) to zero.
+*           Solve the triangular system:
+*              (T(1:KI-1,1:KI-1) - T(KI,KI))*X = SCALE*WORK.
 *
-         DO 20 J = 1, N - KK
-            DO 10 I = M - KK + 1, M
-               A( I, J ) = ZERO
-   10       CONTINUE
-   20    CONTINUE
-      ELSE
-         KK = 0
+            DO 50 K = 1, KI - 1
+               T( K, K ) = T( K, K ) - T( KI, KI )
+               IF( CABS1( T( K, K ) ).LT.SMIN )
+     $            T( K, K ) = SMIN
+   50       CONTINUE
+*
+            IF( KI.GT.1 ) THEN
+               CALL ZLATRS( 'Upper', 'No transpose', 'Non-unit', 'Y',
+     $                      KI-1, T, LDT, WORK( 1 ), SCALE, RWORK,
+     $                      INFO )
+               WORK( KI ) = SCALE
+            END IF
+*
+*           Copy the vector x or Q*x to VR and normalize.
+*
+            IF( .NOT.OVER ) THEN
+               CALL ZCOPY( KI, WORK( 1 ), 1, VR( 1, IS ), 1 )
+*
+               II = IZAMAX( KI, VR( 1, IS ), 1 )
+               REMAX = ONE / CABS1( VR( II, IS ) )
+               CALL ZDSCAL( KI, REMAX, VR( 1, IS ), 1 )
+*
+               DO 60 K = KI + 1, N
+                  VR( K, IS ) = CMZERO
+   60          CONTINUE
+            ELSE
+               IF( KI.GT.1 )
+     $            CALL ZGEMV( 'N', N, KI-1, CMONE, VR, LDVR, WORK( 1 ),
+     $                        1, DCMPLX( SCALE ), VR( 1, KI ), 1 )
+*
+               II = IZAMAX( N, VR( 1, KI ), 1 )
+               REMAX = ONE / CABS1( VR( II, KI ) )
+               CALL ZDSCAL( N, REMAX, VR( 1, KI ), 1 )
+            END IF
+*
+*           Set back the original diagonal elements of T.
+*
+            DO 70 K = 1, KI - 1
+               T( K, K ) = WORK( K+N )
+   70       CONTINUE
+*
+            IS = IS - 1
+   80    CONTINUE
       END IF
 *
-*     Use unblocked code for the first or only block.
+      IF( LEFTV ) THEN
 *
-      CALL ZUNG2L( M-KK, N-KK, K-KK, A, LDA, TAU, WORK, IINFO )
+*        Compute left eigenvectors.
 *
-      IF( KK.GT.0 ) THEN
+         IS = 1
+         DO 130 KI = 1, N
 *
-*        Use blocked code
+            IF( SOMEV ) THEN
+               IF( .NOT.SELECT( KI ) )
+     $            GO TO 130
+            END IF
+            SMIN = MAX( ULP*( CABS1( T( KI, KI ) ) ), SMLNUM )
 *
-         DO 50 I = K - KK + 1, K, NB
-            IB = MIN( NB, K-I+1 )
-            IF( N-K+I.GT.1 ) THEN
+            WORK( N ) = CMONE
 *
-*              Form the triangular factor of the block reflector
-*              H = H(i+ib-1) . . . H(i+1) H(i)
+*           Form right-hand side.
 *
-               CALL ZLARFT( 'Backward', 'Columnwise', M-K+I+IB-1, IB,
-     $                      A( 1, N-K+I ), LDA, TAU( I ), WORK, LDWORK )
+            DO 90 K = KI + 1, N
+               WORK( K ) = -DCONJG( T( KI, K ) )
+   90       CONTINUE
 *
-*              Apply H to A(1:m-k+i+ib-1,1:n-k+i-1) from the left
+*           Solve the triangular system:
+*              (T(KI+1:N,KI+1:N) - T(KI,KI))**H * X = SCALE*WORK.
 *
-               CALL ZLARFB( 'Left', 'No transpose', 'Backward',
-     $                      'Columnwise', M-K+I+IB-1, N-K+I-1, IB,
-     $                      A( 1, N-K+I ), LDA, WORK, LDWORK, A, LDA,
-     $                      WORK( IB+1 ), LDWORK )
+            DO 100 K = KI + 1, N
+               T( K, K ) = T( K, K ) - T( KI, KI )
+               IF( CABS1( T( K, K ) ).LT.SMIN )
+     $            T( K, K ) = SMIN
+  100       CONTINUE
+*
+            IF( KI.LT.N ) THEN
+               CALL ZLATRS( 'Upper', 'Conjugate transpose', 'Non-unit',
+     $                      'Y', N-KI, T( KI+1, KI+1 ), LDT,
+     $                      WORK( KI+1 ), SCALE, RWORK, INFO )
+               WORK( KI ) = SCALE
             END IF
 *
-*           Apply H to rows 1:m-k+i+ib-1 of current block
+*           Copy the vector x or Q*x to VL and normalize.
 *
-            CALL ZUNG2L( M-K+I+IB-1, IB, IB, A( 1, N-K+I ), LDA,
-     $                   TAU( I ), WORK, IINFO )
+            IF( .NOT.OVER ) THEN
+               CALL ZCOPY( N-KI+1, WORK( KI ), 1, VL( KI, IS ), 1 )
 *
-*           Set rows m-k+i+ib:m of current block to zero
+               II = IZAMAX( N-KI+1, VL( KI, IS ), 1 ) + KI - 1
+               REMAX = ONE / CABS1( VL( II, IS ) )
+               CALL ZDSCAL( N-KI+1, REMAX, VL( KI, IS ), 1 )
 *
-            DO 40 J = N - K + I, N - K + I + IB - 1
-               DO 30 L = M - K + I + IB, M
-                  A( L, J ) = ZERO
-   30          CONTINUE
-   40       CONTINUE
-   50    CONTINUE
+               DO 110 K = 1, KI - 1
+                  VL( K, IS ) = CMZERO
+  110          CONTINUE
+            ELSE
+               IF( KI.LT.N )
+     $            CALL ZGEMV( 'N', N, N-KI, CMONE, VL( 1, KI+1 ), LDVL,
+     $                        WORK( KI+1 ), 1, DCMPLX( SCALE ),
+     $                        VL( 1, KI ), 1 )
+*
+               II = IZAMAX( N, VL( 1, KI ), 1 )
+               REMAX = ONE / CABS1( VL( II, KI ) )
+               CALL ZDSCAL( N, REMAX, VL( 1, KI ), 1 )
+            END IF
+*
+*           Set back the original diagonal elements of T.
+*
+            DO 120 K = KI + 1, N
+               T( K, K ) = WORK( K+N )
+  120       CONTINUE
+*
+            IS = IS + 1
+  130    CONTINUE
       END IF
 *
-      WORK( 1 ) = IWS
       RETURN
 *
-*     End of ZUNGQL
+*     End of ZTREVC
 *
       END
-*> \brief \b ZUNGQR
+*> \brief \b ZTREVC3
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download ZUNGQR + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/zungqr.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/zungqr.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/zungqr.f"> 
+*> Download ZTREVC3 + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/ztrevc3.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/ztrevc3.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/ztrevc3.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
-*       SUBROUTINE ZUNGQR( M, N, K, A, LDA, TAU, WORK, LWORK, INFO )
-* 
+*       SUBROUTINE ZTREVC3( SIDE, HOWMNY, SELECT, N, T, LDT, VL, LDVL, VR,
+*      $                    LDVR, MM, M, WORK, LWORK, RWORK, LRWORK, INFO)
+*
 *       .. Scalar Arguments ..
-*       INTEGER            INFO, K, LDA, LWORK, M, N
+*       CHARACTER          HOWMNY, SIDE
+*       INTEGER            INFO, LDT, LDVL, LDVR, LWORK, M, MM, N
 *       ..
 *       .. Array Arguments ..
-*       COMPLEX*16         A( LDA, * ), TAU( * ), WORK( * )
+*       LOGICAL            SELECT( * )
+*       DOUBLE PRECISION   RWORK( * )
+*       COMPLEX*16         T( LDT, * ), VL( LDVL, * ), VR( LDVR, * ),
+*      $                   WORK( * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
 *>
 *> \verbatim
 *>
-*> ZUNGQR generates an M-by-N complex matrix Q with orthonormal columns,
-*> which is defined as the first N columns of a product of K elementary
-*> reflectors of order M
-*>
-*>       Q  =  H(1) H(2) . . . H(k)
+*> ZTREVC3 computes some or all of the right and/or left eigenvectors of
+*> a complex upper triangular matrix T.
+*> Matrices of this type are produced by the Schur factorization of
+*> a complex general matrix:  A = Q*T*Q**H, as computed by ZHSEQR.
+*>
+*> The right eigenvector x and the left eigenvector y of T corresponding
+*> to an eigenvalue w are defined by:
+*>
+*>              T*x = w*x,     (y**H)*T = w*(y**H)
+*>
+*> where y**H denotes the conjugate transpose of the vector y.
+*> The eigenvalues are not input to this routine, but are read directly
+*> from the diagonal of T.
+*>
+*> This routine returns the matrices X and/or Y of right and left
+*> eigenvectors of T, or the products Q*X and/or Q*Y, where Q is an
+*> input matrix. If Q is the unitary factor that reduces a matrix A to
+*> Schur form T, then Q*X and Q*Y are the matrices of right and left
+*> eigenvectors of A.
+*>
+*> This uses a Level 3 BLAS version of the back transformation.
+*> \endverbatim
+*
+*  Arguments:
+*  ==========
+*
+*> \param[in] SIDE
+*> \verbatim
+*>          SIDE is CHARACTER*1
+*>          = 'R':  compute right eigenvectors only;
+*>          = 'L':  compute left eigenvectors only;
+*>          = 'B':  compute both right and left eigenvectors.
+*> \endverbatim
+*>
+*> \param[in] HOWMNY
+*> \verbatim
+*>          HOWMNY is CHARACTER*1
+*>          = 'A':  compute all right and/or left eigenvectors;
+*>          = 'B':  compute all right and/or left eigenvectors,
+*>                  backtransformed using the matrices supplied in
+*>                  VR and/or VL;
+*>          = 'S':  compute selected right and/or left eigenvectors,
+*>                  as indicated by the logical array SELECT.
+*> \endverbatim
+*>
+*> \param[in] SELECT
+*> \verbatim
+*>          SELECT is LOGICAL array, dimension (N)
+*>          If HOWMNY = 'S', SELECT specifies the eigenvectors to be
+*>          computed.
+*>          The eigenvector corresponding to the j-th eigenvalue is
+*>          computed if SELECT(j) = .TRUE..
+*>          Not referenced if HOWMNY = 'A' or 'B'.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*>          N is INTEGER
+*>          The order of the matrix T. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] T
+*> \verbatim
+*>          T is COMPLEX*16 array, dimension (LDT,N)
+*>          The upper triangular matrix T.  T is modified, but restored
+*>          on exit.
+*> \endverbatim
 *>
-*> as returned by ZGEQRF.
+*> \param[in] LDT
+*> \verbatim
+*>          LDT is INTEGER
+*>          The leading dimension of the array T. LDT >= max(1,N).
 *> \endverbatim
-*
-*  Arguments:
-*  ==========
-*
-*> \param[in] M
+*>
+*> \param[in,out] VL
 *> \verbatim
-*>          M is INTEGER
-*>          The number of rows of the matrix Q. M >= 0.
+*>          VL is COMPLEX*16 array, dimension (LDVL,MM)
+*>          On entry, if SIDE = 'L' or 'B' and HOWMNY = 'B', VL must
+*>          contain an N-by-N matrix Q (usually the unitary matrix Q of
+*>          Schur vectors returned by ZHSEQR).
+*>          On exit, if SIDE = 'L' or 'B', VL contains:
+*>          if HOWMNY = 'A', the matrix Y of left eigenvectors of T;
+*>          if HOWMNY = 'B', the matrix Q*Y;
+*>          if HOWMNY = 'S', the left eigenvectors of T specified by
+*>                           SELECT, stored consecutively in the columns
+*>                           of VL, in the same order as their
+*>                           eigenvalues.
+*>          Not referenced if SIDE = 'R'.
 *> \endverbatim
 *>
-*> \param[in] N
+*> \param[in] LDVL
 *> \verbatim
-*>          N is INTEGER
-*>          The number of columns of the matrix Q. M >= N >= 0.
+*>          LDVL is INTEGER
+*>          The leading dimension of the array VL.
+*>          LDVL >= 1, and if SIDE = 'L' or 'B', LDVL >= N.
 *> \endverbatim
 *>
-*> \param[in] K
+*> \param[in,out] VR
 *> \verbatim
-*>          K is INTEGER
-*>          The number of elementary reflectors whose product defines the
-*>          matrix Q. N >= K >= 0.
+*>          VR is COMPLEX*16 array, dimension (LDVR,MM)
+*>          On entry, if SIDE = 'R' or 'B' and HOWMNY = 'B', VR must
+*>          contain an N-by-N matrix Q (usually the unitary matrix Q of
+*>          Schur vectors returned by ZHSEQR).
+*>          On exit, if SIDE = 'R' or 'B', VR contains:
+*>          if HOWMNY = 'A', the matrix X of right eigenvectors of T;
+*>          if HOWMNY = 'B', the matrix Q*X;
+*>          if HOWMNY = 'S', the right eigenvectors of T specified by
+*>                           SELECT, stored consecutively in the columns
+*>                           of VR, in the same order as their
+*>                           eigenvalues.
+*>          Not referenced if SIDE = 'L'.
 *> \endverbatim
 *>
-*> \param[in,out] A
+*> \param[in] LDVR
 *> \verbatim
-*>          A is COMPLEX*16 array, dimension (LDA,N)
-*>          On entry, the i-th column must contain the vector which
-*>          defines the elementary reflector H(i), for i = 1,2,...,k, as
-*>          returned by ZGEQRF in the first k columns of its array
-*>          argument A.
-*>          On exit, the M-by-N matrix Q.
+*>          LDVR is INTEGER
+*>          The leading dimension of the array VR.
+*>          LDVR >= 1, and if SIDE = 'R' or 'B', LDVR >= N.
 *> \endverbatim
 *>
-*> \param[in] LDA
+*> \param[in] MM
 *> \verbatim
-*>          LDA is INTEGER
-*>          The first dimension of the array A. LDA >= max(1,M).
+*>          MM is INTEGER
+*>          The number of columns in the arrays VL and/or VR. MM >= M.
 *> \endverbatim
 *>
-*> \param[in] TAU
+*> \param[out] M
 *> \verbatim
-*>          TAU is COMPLEX*16 array, dimension (K)
-*>          TAU(i) must contain the scalar factor of the elementary
-*>          reflector H(i), as returned by ZGEQRF.
+*>          M is INTEGER
+*>          The number of columns in the arrays VL and/or VR actually
+*>          used to store the eigenvectors.
+*>          If HOWMNY = 'A' or 'B', M is set to N.
+*>          Each selected eigenvector occupies one column.
 *> \endverbatim
 *>
 *> \param[out] WORK
 *> \verbatim
 *>          WORK is COMPLEX*16 array, dimension (MAX(1,LWORK))
-*>          On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
 *> \endverbatim
 *>
 *> \param[in] LWORK
 *> \verbatim
 *>          LWORK is INTEGER
-*>          The dimension of the array WORK. LWORK >= max(1,N).
-*>          For optimum performance LWORK >= N*NB, where NB is the
-*>          optimal blocksize.
+*>          The dimension of array WORK. LWORK >= max(1,2*N).
+*>          For optimum performance, LWORK >= N + 2*N*NB, where NB is
+*>          the optimal blocksize.
 *>
 *>          If LWORK = -1, then a workspace query is assumed; the routine
 *>          only calculates the optimal size of the WORK array, returns
@@ -28626,480 +47993,832 @@
 *>          message related to LWORK is issued by XERBLA.
 *> \endverbatim
 *>
+*> \param[out] RWORK
+*> \verbatim
+*>          RWORK is DOUBLE PRECISION array, dimension (LRWORK)
+*> \endverbatim
+*>
+*> \param[in] LRWORK
+*> \verbatim
+*>          LRWORK is INTEGER
+*>          The dimension of array RWORK. LRWORK >= max(1,N).
+*>
+*>          If LRWORK = -1, then a workspace query is assumed; the routine
+*>          only calculates the optimal size of the RWORK array, returns
+*>          this value as the first entry of the RWORK array, and no error
+*>          message related to LRWORK is issued by XERBLA.
+*> \endverbatim
+*>
 *> \param[out] INFO
 *> \verbatim
 *>          INFO is INTEGER
 *>          = 0:  successful exit
-*>          < 0:  if INFO = -i, the i-th argument has an illegal value
+*>          < 0:  if INFO = -i, the i-th argument had an illegal value
 *> \endverbatim
 *
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date November 2011
+*> \date December 2016
+*
+*  @precisions fortran z -> c
 *
 *> \ingroup complex16OTHERcomputational
 *
+*> \par Further Details:
+*  =====================
+*>
+*> \verbatim
+*>
+*>  The algorithm used in this program is basically backward (forward)
+*>  substitution, with scaling to make the the code robust against
+*>  possible overflow.
+*>
+*>  Each eigenvector is normalized so that the element of largest
+*>  magnitude has magnitude 1; here the magnitude of a complex number
+*>  (x,y) is taken to be |x| + |y|.
+*> \endverbatim
+*>
 *  =====================================================================
-      SUBROUTINE ZUNGQR( M, N, K, A, LDA, TAU, WORK, LWORK, INFO )
+      SUBROUTINE ZTREVC3( SIDE, HOWMNY, SELECT, N, T, LDT, VL, LDVL, VR,
+     $                    LDVR, MM, M, WORK, LWORK, RWORK, LRWORK, INFO)
+      IMPLICIT NONE
 *
-*  -- LAPACK computational routine (version 3.4.0) --
+*  -- LAPACK computational routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     November 2011
+*     December 2016
 *
 *     .. Scalar Arguments ..
-      INTEGER            INFO, K, LDA, LWORK, M, N
+      CHARACTER          HOWMNY, SIDE
+      INTEGER            INFO, LDT, LDVL, LDVR, LWORK, LRWORK, M, MM, N
 *     ..
 *     .. Array Arguments ..
-      COMPLEX*16         A( LDA, * ), TAU( * ), WORK( * )
+      LOGICAL            SELECT( * )
+      DOUBLE PRECISION   RWORK( * )
+      COMPLEX*16         T( LDT, * ), VL( LDVL, * ), VR( LDVR, * ),
+     $                   WORK( * )
 *     ..
 *
 *  =====================================================================
 *
 *     .. Parameters ..
-      COMPLEX*16         ZERO
-      PARAMETER          ( ZERO = ( 0.0D+0, 0.0D+0 ) )
+      DOUBLE PRECISION   ZERO, ONE
+      PARAMETER          ( ZERO = 0.0D+0, ONE = 1.0D+0 )
+      COMPLEX*16         CZERO, CONE
+      PARAMETER          ( CZERO = ( 0.0D+0, 0.0D+0 ),
+     $                     CONE  = ( 1.0D+0, 0.0D+0 ) )
+      INTEGER            NBMIN, NBMAX
+      PARAMETER          ( NBMIN = 8, NBMAX = 128 )
 *     ..
 *     .. Local Scalars ..
-      LOGICAL            LQUERY
-      INTEGER            I, IB, IINFO, IWS, J, KI, KK, L, LDWORK,
-     $                   LWKOPT, NB, NBMIN, NX
+      LOGICAL            ALLV, BOTHV, LEFTV, LQUERY, OVER, RIGHTV, SOMEV
+      INTEGER            I, II, IS, J, K, KI, IV, MAXWRK, NB
+      DOUBLE PRECISION   OVFL, REMAX, SCALE, SMIN, SMLNUM, ULP, UNFL
+      COMPLEX*16         CDUM
+*     ..
+*     .. External Functions ..
+      LOGICAL            LSAME
+      INTEGER            ILAENV, IZAMAX
+      DOUBLE PRECISION   DLAMCH, DZASUM
+      EXTERNAL           LSAME, ILAENV, IZAMAX, DLAMCH, DZASUM
 *     ..
 *     .. External Subroutines ..
-      EXTERNAL           XERBLA, ZLARFB, ZLARFT, ZUNG2R
+      EXTERNAL           XERBLA, ZCOPY, ZDSCAL, ZGEMV, ZLATRS
+     $                   ZGEMM, DLABAD, ZLASET
 *     ..
 *     .. Intrinsic Functions ..
-      INTRINSIC          MAX, MIN
+      INTRINSIC          ABS, DBLE, DCMPLX, CONJG, AIMAG, MAX
 *     ..
-*     .. External Functions ..
-      INTEGER            ILAENV
-      EXTERNAL           ILAENV
+*     .. Statement Functions ..
+      DOUBLE PRECISION   CABS1
+*     ..
+*     .. Statement Function definitions ..
+      CABS1( CDUM ) = ABS( DBLE( CDUM ) ) + ABS( AIMAG( CDUM ) )
 *     ..
 *     .. Executable Statements ..
 *
-*     Test the input arguments
+*     Decode and test the input parameters
+*
+      BOTHV  = LSAME( SIDE, 'B' )
+      RIGHTV = LSAME( SIDE, 'R' ) .OR. BOTHV
+      LEFTV  = LSAME( SIDE, 'L' ) .OR. BOTHV
+*
+      ALLV  = LSAME( HOWMNY, 'A' )
+      OVER  = LSAME( HOWMNY, 'B' )
+      SOMEV = LSAME( HOWMNY, 'S' )
+*
+*     Set M to the number of columns required to store the selected
+*     eigenvectors.
+*
+      IF( SOMEV ) THEN
+         M = 0
+         DO 10 J = 1, N
+            IF( SELECT( J ) )
+     $         M = M + 1
+   10    CONTINUE
+      ELSE
+         M = N
+      END IF
 *
       INFO = 0
-      NB = ILAENV( 1, 'ZUNGQR', ' ', M, N, K, -1 )
-      LWKOPT = MAX( 1, N )*NB
-      WORK( 1 ) = LWKOPT
-      LQUERY = ( LWORK.EQ.-1 )
-      IF( M.LT.0 ) THEN
+      NB = ILAENV( 1, 'ZTREVC', SIDE // HOWMNY, N, -1, -1, -1 )
+      MAXWRK = N + 2*N*NB
+      WORK(1) = MAXWRK
+      RWORK(1) = N
+      LQUERY = ( LWORK.EQ.-1 .OR. LRWORK.EQ.-1 )
+      IF( .NOT.RIGHTV .AND. .NOT.LEFTV ) THEN
          INFO = -1
-      ELSE IF( N.LT.0 .OR. N.GT.M ) THEN
+      ELSE IF( .NOT.ALLV .AND. .NOT.OVER .AND. .NOT.SOMEV ) THEN
          INFO = -2
-      ELSE IF( K.LT.0 .OR. K.GT.N ) THEN
-         INFO = -3
-      ELSE IF( LDA.LT.MAX( 1, M ) ) THEN
-         INFO = -5
-      ELSE IF( LWORK.LT.MAX( 1, N ) .AND. .NOT.LQUERY ) THEN
+      ELSE IF( N.LT.0 ) THEN
+         INFO = -4
+      ELSE IF( LDT.LT.MAX( 1, N ) ) THEN
+         INFO = -6
+      ELSE IF( LDVL.LT.1 .OR. ( LEFTV .AND. LDVL.LT.N ) ) THEN
          INFO = -8
+      ELSE IF( LDVR.LT.1 .OR. ( RIGHTV .AND. LDVR.LT.N ) ) THEN
+         INFO = -10
+      ELSE IF( MM.LT.M ) THEN
+         INFO = -11
+      ELSE IF( LWORK.LT.MAX( 1, 2*N ) .AND. .NOT.LQUERY ) THEN
+         INFO = -14
+      ELSE IF ( LRWORK.LT.MAX( 1, N ) .AND. .NOT.LQUERY ) THEN
+         INFO = -16
       END IF
       IF( INFO.NE.0 ) THEN
-         CALL XERBLA( 'ZUNGQR', -INFO )
+         CALL XERBLA( 'ZTREVC3', -INFO )
          RETURN
       ELSE IF( LQUERY ) THEN
          RETURN
       END IF
 *
-*     Quick return if possible
+*     Quick return if possible.
 *
-      IF( N.LE.0 ) THEN
-         WORK( 1 ) = 1
-         RETURN
+      IF( N.EQ.0 )
+     $   RETURN
+*
+*     Use blocked version of back-transformation if sufficient workspace.
+*     Zero-out the workspace to avoid potential NaN propagation.
+*
+      IF( OVER .AND. LWORK .GE. N + 2*N*NBMIN ) THEN
+         NB = (LWORK - N) / (2*N)
+         NB = MIN( NB, NBMAX )
+         CALL ZLASET( 'F', N, 1+2*NB, CZERO, CZERO, WORK, N )
+      ELSE
+         NB = 1
       END IF
 *
-      NBMIN = 2
-      NX = 0
-      IWS = N
-      IF( NB.GT.1 .AND. NB.LT.K ) THEN
+*     Set the constants to control overflow.
 *
-*        Determine when to cross over from blocked to unblocked code.
+      UNFL = DLAMCH( 'Safe minimum' )
+      OVFL = ONE / UNFL
+      CALL DLABAD( UNFL, OVFL )
+      ULP = DLAMCH( 'Precision' )
+      SMLNUM = UNFL*( N / ULP )
 *
-         NX = MAX( 0, ILAENV( 3, 'ZUNGQR', ' ', M, N, K, -1 ) )
-         IF( NX.LT.K ) THEN
+*     Store the diagonal elements of T in working array WORK.
 *
-*           Determine if workspace is large enough for blocked code.
+      DO 20 I = 1, N
+         WORK( I ) = T( I, I )
+   20 CONTINUE
 *
-            LDWORK = N
-            IWS = LDWORK*NB
-            IF( LWORK.LT.IWS ) THEN
+*     Compute 1-norm of each column of strictly upper triangular
+*     part of T to control overflow in triangular solver.
 *
-*              Not enough workspace to use optimal NB:  reduce NB and
-*              determine the minimum value of NB.
+      RWORK( 1 ) = ZERO
+      DO 30 J = 2, N
+         RWORK( J ) = DZASUM( J-1, T( 1, J ), 1 )
+   30 CONTINUE
 *
-               NB = LWORK / LDWORK
-               NBMIN = MAX( 2, ILAENV( 2, 'ZUNGQR', ' ', M, N, K, -1 ) )
+      IF( RIGHTV ) THEN
+*
+*        ============================================================
+*        Compute right eigenvectors.
+*
+*        IV is index of column in current block.
+*        Non-blocked version always uses IV=NB=1;
+*        blocked     version starts with IV=NB, goes down to 1.
+*        (Note the "0-th" column is used to store the original diagonal.)
+         IV = NB
+         IS = M
+         DO 80 KI = N, 1, -1
+            IF( SOMEV ) THEN
+               IF( .NOT.SELECT( KI ) )
+     $            GO TO 80
             END IF
-         END IF
-      END IF
+            SMIN = MAX( ULP*( CABS1( T( KI, KI ) ) ), SMLNUM )
 *
-      IF( NB.GE.NBMIN .AND. NB.LT.K .AND. NX.LT.K ) THEN
+*           --------------------------------------------------------
+*           Complex right eigenvector
 *
-*        Use blocked code after the last block.
-*        The first kk columns are handled by the block method.
+            WORK( KI + IV*N ) = CONE
 *
-         KI = ( ( K-NX-1 ) / NB )*NB
-         KK = MIN( K, KI+NB )
+*           Form right-hand side.
 *
-*        Set A(1:kk,kk+1:n) to zero.
+            DO 40 K = 1, KI - 1
+               WORK( K + IV*N ) = -T( K, KI )
+   40       CONTINUE
 *
-         DO 20 J = KK + 1, N
-            DO 10 I = 1, KK
-               A( I, J ) = ZERO
-   10       CONTINUE
-   20    CONTINUE
-      ELSE
-         KK = 0
+*           Solve upper triangular system:
+*           [ T(1:KI-1,1:KI-1) - T(KI,KI) ]*X = SCALE*WORK.
+*
+            DO 50 K = 1, KI - 1
+               T( K, K ) = T( K, K ) - T( KI, KI )
+               IF( CABS1( T( K, K ) ).LT.SMIN )
+     $            T( K, K ) = SMIN
+   50       CONTINUE
+*
+            IF( KI.GT.1 ) THEN
+               CALL ZLATRS( 'Upper', 'No transpose', 'Non-unit', 'Y',
+     $                      KI-1, T, LDT, WORK( 1 + IV*N ), SCALE,
+     $                      RWORK, INFO )
+               WORK( KI + IV*N ) = SCALE
+            END IF
+*
+*           Copy the vector x or Q*x to VR and normalize.
+*
+            IF( .NOT.OVER ) THEN
+*              ------------------------------
+*              no back-transform: copy x to VR and normalize.
+               CALL ZCOPY( KI, WORK( 1 + IV*N ), 1, VR( 1, IS ), 1 )
+*
+               II = IZAMAX( KI, VR( 1, IS ), 1 )
+               REMAX = ONE / CABS1( VR( II, IS ) )
+               CALL ZDSCAL( KI, REMAX, VR( 1, IS ), 1 )
+*
+               DO 60 K = KI + 1, N
+                  VR( K, IS ) = CZERO
+   60          CONTINUE
+*
+            ELSE IF( NB.EQ.1 ) THEN
+*              ------------------------------
+*              version 1: back-transform each vector with GEMV, Q*x.
+               IF( KI.GT.1 )
+     $            CALL ZGEMV( 'N', N, KI-1, CONE, VR, LDVR,
+     $                        WORK( 1 + IV*N ), 1, DCMPLX( SCALE ),
+     $                        VR( 1, KI ), 1 )
+*
+               II = IZAMAX( N, VR( 1, KI ), 1 )
+               REMAX = ONE / CABS1( VR( II, KI ) )
+               CALL ZDSCAL( N, REMAX, VR( 1, KI ), 1 )
+*
+            ELSE
+*              ------------------------------
+*              version 2: back-transform block of vectors with GEMM
+*              zero out below vector
+               DO K = KI + 1, N
+                  WORK( K + IV*N ) = CZERO
+               END DO
+*
+*              Columns IV:NB of work are valid vectors.
+*              When the number of vectors stored reaches NB,
+*              or if this was last vector, do the GEMM
+               IF( (IV.EQ.1) .OR. (KI.EQ.1) ) THEN
+                  CALL ZGEMM( 'N', 'N', N, NB-IV+1, KI+NB-IV, CONE,
+     $                        VR, LDVR,
+     $                        WORK( 1 + (IV)*N    ), N,
+     $                        CZERO,
+     $                        WORK( 1 + (NB+IV)*N ), N )
+*                 normalize vectors
+                  DO K = IV, NB
+                     II = IZAMAX( N, WORK( 1 + (NB+K)*N ), 1 )
+                     REMAX = ONE / CABS1( WORK( II + (NB+K)*N ) )
+                     CALL ZDSCAL( N, REMAX, WORK( 1 + (NB+K)*N ), 1 )
+                  END DO
+                  CALL ZLACPY( 'F', N, NB-IV+1,
+     $                         WORK( 1 + (NB+IV)*N ), N,
+     $                         VR( 1, KI ), LDVR )
+                  IV = NB
+               ELSE
+                  IV = IV - 1
+               END IF
+            END IF
+*
+*           Restore the original diagonal elements of T.
+*
+            DO 70 K = 1, KI - 1
+               T( K, K ) = WORK( K )
+   70       CONTINUE
+*
+            IS = IS - 1
+   80    CONTINUE
       END IF
 *
-*     Use unblocked code for the last or only block.
+      IF( LEFTV ) THEN
 *
-      IF( KK.LT.N )
-     $   CALL ZUNG2R( M-KK, N-KK, K-KK, A( KK+1, KK+1 ), LDA,
-     $                TAU( KK+1 ), WORK, IINFO )
+*        ============================================================
+*        Compute left eigenvectors.
 *
-      IF( KK.GT.0 ) THEN
+*        IV is index of column in current block.
+*        Non-blocked version always uses IV=1;
+*        blocked     version starts with IV=1, goes up to NB.
+*        (Note the "0-th" column is used to store the original diagonal.)
+         IV = 1
+         IS = 1
+         DO 130 KI = 1, N
 *
-*        Use blocked code
+            IF( SOMEV ) THEN
+               IF( .NOT.SELECT( KI ) )
+     $            GO TO 130
+            END IF
+            SMIN = MAX( ULP*( CABS1( T( KI, KI ) ) ), SMLNUM )
 *
-         DO 50 I = KI + 1, 1, -NB
-            IB = MIN( NB, K-I+1 )
-            IF( I+IB.LE.N ) THEN
+*           --------------------------------------------------------
+*           Complex left eigenvector
 *
-*              Form the triangular factor of the block reflector
-*              H = H(i) H(i+1) . . . H(i+ib-1)
+            WORK( KI + IV*N ) = CONE
 *
-               CALL ZLARFT( 'Forward', 'Columnwise', M-I+1, IB,
-     $                      A( I, I ), LDA, TAU( I ), WORK, LDWORK )
+*           Form right-hand side.
 *
-*              Apply H to A(i:m,i+ib:n) from the left
+            DO 90 K = KI + 1, N
+               WORK( K + IV*N ) = -CONJG( T( KI, K ) )
+   90       CONTINUE
 *
-               CALL ZLARFB( 'Left', 'No transpose', 'Forward',
-     $                      'Columnwise', M-I+1, N-I-IB+1, IB,
-     $                      A( I, I ), LDA, WORK, LDWORK, A( I, I+IB ),
-     $                      LDA, WORK( IB+1 ), LDWORK )
+*           Solve conjugate-transposed triangular system:
+*           [ T(KI+1:N,KI+1:N) - T(KI,KI) ]**H * X = SCALE*WORK.
+*
+            DO 100 K = KI + 1, N
+               T( K, K ) = T( K, K ) - T( KI, KI )
+               IF( CABS1( T( K, K ) ).LT.SMIN )
+     $            T( K, K ) = SMIN
+  100       CONTINUE
+*
+            IF( KI.LT.N ) THEN
+               CALL ZLATRS( 'Upper', 'Conjugate transpose', 'Non-unit',
+     $                      'Y', N-KI, T( KI+1, KI+1 ), LDT,
+     $                      WORK( KI+1 + IV*N ), SCALE, RWORK, INFO )
+               WORK( KI + IV*N ) = SCALE
             END IF
 *
-*           Apply H to rows i:m of current block
+*           Copy the vector x or Q*x to VL and normalize.
 *
-            CALL ZUNG2R( M-I+1, IB, IB, A( I, I ), LDA, TAU( I ), WORK,
-     $                   IINFO )
+            IF( .NOT.OVER ) THEN
+*              ------------------------------
+*              no back-transform: copy x to VL and normalize.
+               CALL ZCOPY( N-KI+1, WORK( KI + IV*N ), 1, VL(KI,IS), 1 )
 *
-*           Set rows 1:i-1 of current block to zero
+               II = IZAMAX( N-KI+1, VL( KI, IS ), 1 ) + KI - 1
+               REMAX = ONE / CABS1( VL( II, IS ) )
+               CALL ZDSCAL( N-KI+1, REMAX, VL( KI, IS ), 1 )
 *
-            DO 40 J = I, I + IB - 1
-               DO 30 L = 1, I - 1
-                  A( L, J ) = ZERO
-   30          CONTINUE
-   40       CONTINUE
-   50    CONTINUE
+               DO 110 K = 1, KI - 1
+                  VL( K, IS ) = CZERO
+  110          CONTINUE
+*
+            ELSE IF( NB.EQ.1 ) THEN
+*              ------------------------------
+*              version 1: back-transform each vector with GEMV, Q*x.
+               IF( KI.LT.N )
+     $            CALL ZGEMV( 'N', N, N-KI, CONE, VL( 1, KI+1 ), LDVL,
+     $                        WORK( KI+1 + IV*N ), 1, DCMPLX( SCALE ),
+     $                        VL( 1, KI ), 1 )
+*
+               II = IZAMAX( N, VL( 1, KI ), 1 )
+               REMAX = ONE / CABS1( VL( II, KI ) )
+               CALL ZDSCAL( N, REMAX, VL( 1, KI ), 1 )
+*
+            ELSE
+*              ------------------------------
+*              version 2: back-transform block of vectors with GEMM
+*              zero out above vector
+*              could go from KI-NV+1 to KI-1
+               DO K = 1, KI - 1
+                  WORK( K + IV*N ) = CZERO
+               END DO
+*
+*              Columns 1:IV of work are valid vectors.
+*              When the number of vectors stored reaches NB,
+*              or if this was last vector, do the GEMM
+               IF( (IV.EQ.NB) .OR. (KI.EQ.N) ) THEN
+                  CALL ZGEMM( 'N', 'N', N, IV, N-KI+IV, CONE,
+     $                        VL( 1, KI-IV+1 ), LDVL,
+     $                        WORK( KI-IV+1 + (1)*N ), N,
+     $                        CZERO,
+     $                        WORK( 1 + (NB+1)*N ), N )
+*                 normalize vectors
+                  DO K = 1, IV
+                     II = IZAMAX( N, WORK( 1 + (NB+K)*N ), 1 )
+                     REMAX = ONE / CABS1( WORK( II + (NB+K)*N ) )
+                     CALL ZDSCAL( N, REMAX, WORK( 1 + (NB+K)*N ), 1 )
+                  END DO
+                  CALL ZLACPY( 'F', N, IV,
+     $                         WORK( 1 + (NB+1)*N ), N,
+     $                         VL( 1, KI-IV+1 ), LDVL )
+                  IV = 1
+               ELSE
+                  IV = IV + 1
+               END IF
+            END IF
+*
+*           Restore the original diagonal elements of T.
+*
+            DO 120 K = KI + 1, N
+               T( K, K ) = WORK( K )
+  120       CONTINUE
+*
+            IS = IS + 1
+  130    CONTINUE
       END IF
 *
-      WORK( 1 ) = IWS
       RETURN
 *
-*     End of ZUNGQR
+*     End of ZTREVC3
 *
       END
-*> \brief \b ZUNGR2 generates all or part of the unitary matrix Q from an RQ factorization determined by cgerqf (unblocked algorithm).
+*> \brief \b ZTREXC
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download ZUNGR2 + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/zungr2.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/zungr2.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/zungr2.f"> 
+*> Download ZTREXC + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/ztrexc.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/ztrexc.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/ztrexc.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
-*       SUBROUTINE ZUNGR2( M, N, K, A, LDA, TAU, WORK, INFO )
-* 
+*       SUBROUTINE ZTREXC( COMPQ, N, T, LDT, Q, LDQ, IFST, ILST, INFO )
+*
 *       .. Scalar Arguments ..
-*       INTEGER            INFO, K, LDA, M, N
+*       CHARACTER          COMPQ
+*       INTEGER            IFST, ILST, INFO, LDQ, LDT, N
 *       ..
 *       .. Array Arguments ..
-*       COMPLEX*16         A( LDA, * ), TAU( * ), WORK( * )
+*       COMPLEX*16         Q( LDQ, * ), T( LDT, * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
 *>
 *> \verbatim
 *>
-*> ZUNGR2 generates an m by n complex matrix Q with orthonormal rows,
-*> which is defined as the last m rows of a product of k elementary
-*> reflectors of order n
-*>
-*>       Q  =  H(1)**H H(2)**H . . . H(k)**H
+*> ZTREXC reorders the Schur factorization of a complex matrix
+*> A = Q*T*Q**H, so that the diagonal element of T with row index IFST
+*> is moved to row ILST.
 *>
-*> as returned by ZGERQF.
+*> The Schur form T is reordered by a unitary similarity transformation
+*> Z**H*T*Z, and optionally the matrix Q of Schur vectors is updated by
+*> postmultplying it with Z.
 *> \endverbatim
 *
 *  Arguments:
 *  ==========
 *
-*> \param[in] M
+*> \param[in] COMPQ
 *> \verbatim
-*>          M is INTEGER
-*>          The number of rows of the matrix Q. M >= 0.
+*>          COMPQ is CHARACTER*1
+*>          = 'V':  update the matrix Q of Schur vectors;
+*>          = 'N':  do not update Q.
 *> \endverbatim
 *>
 *> \param[in] N
 *> \verbatim
 *>          N is INTEGER
-*>          The number of columns of the matrix Q. N >= M.
+*>          The order of the matrix T. N >= 0.
+*>          If N == 0 arguments ILST and IFST may be any value.
 *> \endverbatim
 *>
-*> \param[in] K
+*> \param[in,out] T
 *> \verbatim
-*>          K is INTEGER
-*>          The number of elementary reflectors whose product defines the
-*>          matrix Q. M >= K >= 0.
+*>          T is COMPLEX*16 array, dimension (LDT,N)
+*>          On entry, the upper triangular matrix T.
+*>          On exit, the reordered upper triangular matrix.
 *> \endverbatim
 *>
-*> \param[in,out] A
+*> \param[in] LDT
 *> \verbatim
-*>          A is COMPLEX*16 array, dimension (LDA,N)
-*>          On entry, the (m-k+i)-th row must contain the vector which
-*>          defines the elementary reflector H(i), for i = 1,2,...,k, as
-*>          returned by ZGERQF in the last k rows of its array argument
-*>          A.
-*>          On exit, the m-by-n matrix Q.
+*>          LDT is INTEGER
+*>          The leading dimension of the array T. LDT >= max(1,N).
 *> \endverbatim
 *>
-*> \param[in] LDA
+*> \param[in,out] Q
 *> \verbatim
-*>          LDA is INTEGER
-*>          The first dimension of the array A. LDA >= max(1,M).
+*>          Q is COMPLEX*16 array, dimension (LDQ,N)
+*>          On entry, if COMPQ = 'V', the matrix Q of Schur vectors.
+*>          On exit, if COMPQ = 'V', Q has been postmultiplied by the
+*>          unitary transformation matrix Z which reorders T.
+*>          If COMPQ = 'N', Q is not referenced.
 *> \endverbatim
 *>
-*> \param[in] TAU
+*> \param[in] LDQ
 *> \verbatim
-*>          TAU is COMPLEX*16 array, dimension (K)
-*>          TAU(i) must contain the scalar factor of the elementary
-*>          reflector H(i), as returned by ZGERQF.
+*>          LDQ is INTEGER
+*>          The leading dimension of the array Q.  LDQ >= 1, and if
+*>          COMPQ = 'V', LDQ >= max(1,N).
 *> \endverbatim
 *>
-*> \param[out] WORK
+*> \param[in] IFST
 *> \verbatim
-*>          WORK is COMPLEX*16 array, dimension (M)
+*>          IFST is INTEGER
+*> \endverbatim
+*>
+*> \param[in] ILST
+*> \verbatim
+*>          ILST is INTEGER
+*>
+*>          Specify the reordering of the diagonal elements of T:
+*>          The element with row index IFST is moved to row ILST by a
+*>          sequence of transpositions between adjacent elements.
+*>          1 <= IFST <= N; 1 <= ILST <= N.
 *> \endverbatim
 *>
 *> \param[out] INFO
 *> \verbatim
 *>          INFO is INTEGER
-*>          = 0: successful exit
-*>          < 0: if INFO = -i, the i-th argument has an illegal value
+*>          = 0:  successful exit
+*>          < 0:  if INFO = -i, the i-th argument had an illegal value
 *> \endverbatim
 *
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date September 2012
+*> \date December 2016
 *
 *> \ingroup complex16OTHERcomputational
 *
 *  =====================================================================
-      SUBROUTINE ZUNGR2( M, N, K, A, LDA, TAU, WORK, INFO )
+      SUBROUTINE ZTREXC( COMPQ, N, T, LDT, Q, LDQ, IFST, ILST, INFO )
 *
-*  -- LAPACK computational routine (version 3.4.2) --
+*  -- LAPACK computational routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     September 2012
+*     December 2016
 *
 *     .. Scalar Arguments ..
-      INTEGER            INFO, K, LDA, M, N
+      CHARACTER          COMPQ
+      INTEGER            IFST, ILST, INFO, LDQ, LDT, N
 *     ..
 *     .. Array Arguments ..
-      COMPLEX*16         A( LDA, * ), TAU( * ), WORK( * )
+      COMPLEX*16         Q( LDQ, * ), T( LDT, * )
 *     ..
 *
 *  =====================================================================
 *
-*     .. Parameters ..
-      COMPLEX*16         ONE, ZERO
-      PARAMETER          ( ONE = ( 1.0D+0, 0.0D+0 ),
-     $                   ZERO = ( 0.0D+0, 0.0D+0 ) )
-*     ..
 *     .. Local Scalars ..
-      INTEGER            I, II, J, L
+      LOGICAL            WANTQ
+      INTEGER            K, M1, M2, M3
+      DOUBLE PRECISION   CS
+      COMPLEX*16         SN, T11, T22, TEMP
+*     ..
+*     .. External Functions ..
+      LOGICAL            LSAME
+      EXTERNAL           LSAME
 *     ..
 *     .. External Subroutines ..
-      EXTERNAL           XERBLA, ZLACGV, ZLARF, ZSCAL
+      EXTERNAL           XERBLA, ZLARTG, ZROT
 *     ..
 *     .. Intrinsic Functions ..
       INTRINSIC          DCONJG, MAX
 *     ..
 *     .. Executable Statements ..
 *
-*     Test the input arguments
+*     Decode and test the input parameters.
 *
       INFO = 0
-      IF( M.LT.0 ) THEN
+      WANTQ = LSAME( COMPQ, 'V' )
+      IF( .NOT.LSAME( COMPQ, 'N' ) .AND. .NOT.WANTQ ) THEN
          INFO = -1
-      ELSE IF( N.LT.M ) THEN
+      ELSE IF( N.LT.0 ) THEN
          INFO = -2
-      ELSE IF( K.LT.0 .OR. K.GT.M ) THEN
-         INFO = -3
-      ELSE IF( LDA.LT.MAX( 1, M ) ) THEN
-         INFO = -5
+      ELSE IF( LDT.LT.MAX( 1, N ) ) THEN
+         INFO = -4
+      ELSE IF( LDQ.LT.1 .OR. ( WANTQ .AND. LDQ.LT.MAX( 1, N ) ) ) THEN
+         INFO = -6
+      ELSE IF(( IFST.LT.1 .OR. IFST.GT.N ).AND.( N.GT.0 )) THEN
+         INFO = -7
+      ELSE IF(( ILST.LT.1 .OR. ILST.GT.N ).AND.( N.GT.0 )) THEN
+         INFO = -8
       END IF
       IF( INFO.NE.0 ) THEN
-         CALL XERBLA( 'ZUNGR2', -INFO )
+         CALL XERBLA( 'ZTREXC', -INFO )
          RETURN
       END IF
 *
 *     Quick return if possible
 *
-      IF( M.LE.0 )
+      IF( N.LE.1 .OR. IFST.EQ.ILST )
      $   RETURN
 *
-      IF( K.LT.M ) THEN
+      IF( IFST.LT.ILST ) THEN
 *
-*        Initialise rows 1:m-k to rows of the unit matrix
+*        Move the IFST-th diagonal element forward down the diagonal.
 *
-         DO 20 J = 1, N
-            DO 10 L = 1, M - K
-               A( L, J ) = ZERO
-   10       CONTINUE
-            IF( J.GT.N-M .AND. J.LE.N-K )
-     $         A( M-N+J, J ) = ONE
-   20    CONTINUE
+         M1 = 0
+         M2 = -1
+         M3 = 1
+      ELSE
+*
+*        Move the IFST-th diagonal element backward up the diagonal.
+*
+         M1 = -1
+         M2 = 0
+         M3 = -1
       END IF
 *
-      DO 40 I = 1, K
-         II = M - K + I
+      DO 10 K = IFST + M1, ILST + M2, M3
 *
-*        Apply H(i)**H to A(1:m-k+i,1:n-k+i) from the right
+*        Interchange the k-th and (k+1)-th diagonal elements.
 *
-         CALL ZLACGV( N-M+II-1, A( II, 1 ), LDA )
-         A( II, N-M+II ) = ONE
-         CALL ZLARF( 'Right', II-1, N-M+II, A( II, 1 ), LDA,
-     $               DCONJG( TAU( I ) ), A, LDA, WORK )
-         CALL ZSCAL( N-M+II-1, -TAU( I ), A( II, 1 ), LDA )
-         CALL ZLACGV( N-M+II-1, A( II, 1 ), LDA )
-         A( II, N-M+II ) = ONE - DCONJG( TAU( I ) )
+         T11 = T( K, K )
+         T22 = T( K+1, K+1 )
 *
-*        Set A(m-k+i,n-k+i+1:n) to zero
+*        Determine the transformation to perform the interchange.
+*
+         CALL ZLARTG( T( K, K+1 ), T22-T11, CS, SN, TEMP )
+*
+*        Apply transformation to the matrix T.
+*
+         IF( K+2.LE.N )
+     $      CALL ZROT( N-K-1, T( K, K+2 ), LDT, T( K+1, K+2 ), LDT, CS,
+     $                 SN )
+         CALL ZROT( K-1, T( 1, K ), 1, T( 1, K+1 ), 1, CS,
+     $              DCONJG( SN ) )
+*
+         T( K, K ) = T22
+         T( K+1, K+1 ) = T11
+*
+         IF( WANTQ ) THEN
+*
+*           Accumulate transformation in the matrix Q.
+*
+            CALL ZROT( N, Q( 1, K ), 1, Q( 1, K+1 ), 1, CS,
+     $                 DCONJG( SN ) )
+         END IF
+*
+   10 CONTINUE
 *
-         DO 30 L = N - M + II + 1, N
-            A( II, L ) = ZERO
-   30    CONTINUE
-   40 CONTINUE
       RETURN
 *
-*     End of ZUNGR2
+*     End of ZTREXC
 *
       END
-*> \brief \b ZUNGRQ
+*> \brief \b ZTRSEN
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download ZUNGRQ + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/zungrq.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/zungrq.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/zungrq.f"> 
+*> Download ZTRSEN + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/ztrsen.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/ztrsen.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/ztrsen.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
-*       SUBROUTINE ZUNGRQ( M, N, K, A, LDA, TAU, WORK, LWORK, INFO )
-* 
+*       SUBROUTINE ZTRSEN( JOB, COMPQ, SELECT, N, T, LDT, Q, LDQ, W, M, S,
+*                          SEP, WORK, LWORK, INFO )
+*
 *       .. Scalar Arguments ..
-*       INTEGER            INFO, K, LDA, LWORK, M, N
+*       CHARACTER          COMPQ, JOB
+*       INTEGER            INFO, LDQ, LDT, LWORK, M, N
+*       DOUBLE PRECISION   S, SEP
 *       ..
 *       .. Array Arguments ..
-*       COMPLEX*16         A( LDA, * ), TAU( * ), WORK( * )
+*       LOGICAL            SELECT( * )
+*       COMPLEX*16         Q( LDQ, * ), T( LDT, * ), W( * ), WORK( * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
 *>
 *> \verbatim
 *>
-*> ZUNGRQ generates an M-by-N complex matrix Q with orthonormal rows,
-*> which is defined as the last M rows of a product of K elementary
-*> reflectors of order N
-*>
-*>       Q  =  H(1)**H H(2)**H . . . H(k)**H
+*> ZTRSEN reorders the Schur factorization of a complex matrix
+*> A = Q*T*Q**H, so that a selected cluster of eigenvalues appears in
+*> the leading positions on the diagonal of the upper triangular matrix
+*> T, and the leading columns of Q form an orthonormal basis of the
+*> corresponding right invariant subspace.
 *>
-*> as returned by ZGERQF.
+*> Optionally the routine computes the reciprocal condition numbers of
+*> the cluster of eigenvalues and/or the invariant subspace.
 *> \endverbatim
 *
 *  Arguments:
 *  ==========
 *
-*> \param[in] M
+*> \param[in] JOB
 *> \verbatim
-*>          M is INTEGER
-*>          The number of rows of the matrix Q. M >= 0.
+*>          JOB is CHARACTER*1
+*>          Specifies whether condition numbers are required for the
+*>          cluster of eigenvalues (S) or the invariant subspace (SEP):
+*>          = 'N': none;
+*>          = 'E': for eigenvalues only (S);
+*>          = 'V': for invariant subspace only (SEP);
+*>          = 'B': for both eigenvalues and invariant subspace (S and
+*>                 SEP).
+*> \endverbatim
+*>
+*> \param[in] COMPQ
+*> \verbatim
+*>          COMPQ is CHARACTER*1
+*>          = 'V': update the matrix Q of Schur vectors;
+*>          = 'N': do not update Q.
+*> \endverbatim
+*>
+*> \param[in] SELECT
+*> \verbatim
+*>          SELECT is LOGICAL array, dimension (N)
+*>          SELECT specifies the eigenvalues in the selected cluster. To
+*>          select the j-th eigenvalue, SELECT(j) must be set to .TRUE..
 *> \endverbatim
 *>
 *> \param[in] N
 *> \verbatim
 *>          N is INTEGER
-*>          The number of columns of the matrix Q. N >= M.
+*>          The order of the matrix T. N >= 0.
 *> \endverbatim
 *>
-*> \param[in] K
+*> \param[in,out] T
 *> \verbatim
-*>          K is INTEGER
-*>          The number of elementary reflectors whose product defines the
-*>          matrix Q. M >= K >= 0.
+*>          T is COMPLEX*16 array, dimension (LDT,N)
+*>          On entry, the upper triangular matrix T.
+*>          On exit, T is overwritten by the reordered matrix T, with the
+*>          selected eigenvalues as the leading diagonal elements.
 *> \endverbatim
 *>
-*> \param[in,out] A
+*> \param[in] LDT
 *> \verbatim
-*>          A is COMPLEX*16 array, dimension (LDA,N)
-*>          On entry, the (m-k+i)-th row must contain the vector which
-*>          defines the elementary reflector H(i), for i = 1,2,...,k, as
-*>          returned by ZGERQF in the last k rows of its array argument
-*>          A.
-*>          On exit, the M-by-N matrix Q.
+*>          LDT is INTEGER
+*>          The leading dimension of the array T. LDT >= max(1,N).
 *> \endverbatim
 *>
-*> \param[in] LDA
+*> \param[in,out] Q
 *> \verbatim
-*>          LDA is INTEGER
-*>          The first dimension of the array A. LDA >= max(1,M).
+*>          Q is COMPLEX*16 array, dimension (LDQ,N)
+*>          On entry, if COMPQ = 'V', the matrix Q of Schur vectors.
+*>          On exit, if COMPQ = 'V', Q has been postmultiplied by the
+*>          unitary transformation matrix which reorders T; the leading M
+*>          columns of Q form an orthonormal basis for the specified
+*>          invariant subspace.
+*>          If COMPQ = 'N', Q is not referenced.
 *> \endverbatim
 *>
-*> \param[in] TAU
+*> \param[in] LDQ
 *> \verbatim
-*>          TAU is COMPLEX*16 array, dimension (K)
-*>          TAU(i) must contain the scalar factor of the elementary
-*>          reflector H(i), as returned by ZGERQF.
+*>          LDQ is INTEGER
+*>          The leading dimension of the array Q.
+*>          LDQ >= 1; and if COMPQ = 'V', LDQ >= N.
+*> \endverbatim
+*>
+*> \param[out] W
+*> \verbatim
+*>          W is COMPLEX*16 array, dimension (N)
+*>          The reordered eigenvalues of T, in the same order as they
+*>          appear on the diagonal of T.
+*> \endverbatim
+*>
+*> \param[out] M
+*> \verbatim
+*>          M is INTEGER
+*>          The dimension of the specified invariant subspace.
+*>          0 <= M <= N.
+*> \endverbatim
+*>
+*> \param[out] S
+*> \verbatim
+*>          S is DOUBLE PRECISION
+*>          If JOB = 'E' or 'B', S is a lower bound on the reciprocal
+*>          condition number for the selected cluster of eigenvalues.
+*>          S cannot underestimate the true reciprocal condition number
+*>          by more than a factor of sqrt(N). If M = 0 or N, S = 1.
+*>          If JOB = 'N' or 'V', S is not referenced.
+*> \endverbatim
+*>
+*> \param[out] SEP
+*> \verbatim
+*>          SEP is DOUBLE PRECISION
+*>          If JOB = 'V' or 'B', SEP is the estimated reciprocal
+*>          condition number of the specified invariant subspace. If
+*>          M = 0 or N, SEP = norm(T).
+*>          If JOB = 'N' or 'E', SEP is not referenced.
 *> \endverbatim
 *>
 *> \param[out] WORK
@@ -29111,9 +48830,10 @@
 *> \param[in] LWORK
 *> \verbatim
 *>          LWORK is INTEGER
-*>          The dimension of the array WORK. LWORK >= max(1,M).
-*>          For optimum performance LWORK >= M*NB, where NB is the
-*>          optimal blocksize.
+*>          The dimension of the array WORK.
+*>          If JOB = 'N', LWORK >= 1;
+*>          if JOB = 'E', LWORK = max(1,M*(N-M));
+*>          if JOB = 'V' or 'B', LWORK >= max(1,2*M*(N-M)).
 *>
 *>          If LWORK = -1, then a workspace query is assumed; the routine
 *>          only calculates the optimal size of the WORK array, returns
@@ -29125,89 +48845,193 @@
 *> \verbatim
 *>          INFO is INTEGER
 *>          = 0:  successful exit
-*>          < 0:  if INFO = -i, the i-th argument has an illegal value
+*>          < 0:  if INFO = -i, the i-th argument had an illegal value
 *> \endverbatim
 *
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date November 2011
+*> \date December 2016
 *
 *> \ingroup complex16OTHERcomputational
 *
+*> \par Further Details:
+*  =====================
+*>
+*> \verbatim
+*>
+*>  ZTRSEN first collects the selected eigenvalues by computing a unitary
+*>  transformation Z to move them to the top left corner of T. In other
+*>  words, the selected eigenvalues are the eigenvalues of T11 in:
+*>
+*>          Z**H * T * Z = ( T11 T12 ) n1
+*>                         (  0  T22 ) n2
+*>                            n1  n2
+*>
+*>  where N = n1+n2. The first
+*>  n1 columns of Z span the specified invariant subspace of T.
+*>
+*>  If T has been obtained from the Schur factorization of a matrix
+*>  A = Q*T*Q**H, then the reordered Schur factorization of A is given by
+*>  A = (Q*Z)*(Z**H*T*Z)*(Q*Z)**H, and the first n1 columns of Q*Z span the
+*>  corresponding invariant subspace of A.
+*>
+*>  The reciprocal condition number of the average of the eigenvalues of
+*>  T11 may be returned in S. S lies between 0 (very badly conditioned)
+*>  and 1 (very well conditioned). It is computed as follows. First we
+*>  compute R so that
+*>
+*>                         P = ( I  R ) n1
+*>                             ( 0  0 ) n2
+*>                               n1 n2
+*>
+*>  is the projector on the invariant subspace associated with T11.
+*>  R is the solution of the Sylvester equation:
+*>
+*>                        T11*R - R*T22 = T12.
+*>
+*>  Let F-norm(M) denote the Frobenius-norm of M and 2-norm(M) denote
+*>  the two-norm of M. Then S is computed as the lower bound
+*>
+*>                      (1 + F-norm(R)**2)**(-1/2)
+*>
+*>  on the reciprocal of 2-norm(P), the true reciprocal condition number.
+*>  S cannot underestimate 1 / 2-norm(P) by more than a factor of
+*>  sqrt(N).
+*>
+*>  An approximate error bound for the computed average of the
+*>  eigenvalues of T11 is
+*>
+*>                         EPS * norm(T) / S
+*>
+*>  where EPS is the machine precision.
+*>
+*>  The reciprocal condition number of the right invariant subspace
+*>  spanned by the first n1 columns of Z (or of Q*Z) is returned in SEP.
+*>  SEP is defined as the separation of T11 and T22:
+*>
+*>                     sep( T11, T22 ) = sigma-min( C )
+*>
+*>  where sigma-min(C) is the smallest singular value of the
+*>  n1*n2-by-n1*n2 matrix
+*>
+*>     C  = kprod( I(n2), T11 ) - kprod( transpose(T22), I(n1) )
+*>
+*>  I(m) is an m by m identity matrix, and kprod denotes the Kronecker
+*>  product. We estimate sigma-min(C) by the reciprocal of an estimate of
+*>  the 1-norm of inverse(C). The true reciprocal 1-norm of inverse(C)
+*>  cannot differ from sigma-min(C) by more than a factor of sqrt(n1*n2).
+*>
+*>  When SEP is small, small changes in T can cause large changes in
+*>  the invariant subspace. An approximate bound on the maximum angular
+*>  error in the computed right invariant subspace is
+*>
+*>                      EPS * norm(T) / SEP
+*> \endverbatim
+*>
 *  =====================================================================
-      SUBROUTINE ZUNGRQ( M, N, K, A, LDA, TAU, WORK, LWORK, INFO )
+      SUBROUTINE ZTRSEN( JOB, COMPQ, SELECT, N, T, LDT, Q, LDQ, W, M, S,
+     $                   SEP, WORK, LWORK, INFO )
 *
-*  -- LAPACK computational routine (version 3.4.0) --
+*  -- LAPACK computational routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     November 2011
+*     December 2016
 *
 *     .. Scalar Arguments ..
-      INTEGER            INFO, K, LDA, LWORK, M, N
+      CHARACTER          COMPQ, JOB
+      INTEGER            INFO, LDQ, LDT, LWORK, M, N
+      DOUBLE PRECISION   S, SEP
 *     ..
 *     .. Array Arguments ..
-      COMPLEX*16         A( LDA, * ), TAU( * ), WORK( * )
+      LOGICAL            SELECT( * )
+      COMPLEX*16         Q( LDQ, * ), T( LDT, * ), W( * ), WORK( * )
 *     ..
 *
 *  =====================================================================
 *
 *     .. Parameters ..
-      COMPLEX*16         ZERO
-      PARAMETER          ( ZERO = ( 0.0D+0, 0.0D+0 ) )
+      DOUBLE PRECISION   ZERO, ONE
+      PARAMETER          ( ZERO = 0.0D+0, ONE = 1.0D+0 )
 *     ..
 *     .. Local Scalars ..
-      LOGICAL            LQUERY
-      INTEGER            I, IB, II, IINFO, IWS, J, KK, L, LDWORK,
-     $                   LWKOPT, NB, NBMIN, NX
+      LOGICAL            LQUERY, WANTBH, WANTQ, WANTS, WANTSP
+      INTEGER            IERR, K, KASE, KS, LWMIN, N1, N2, NN
+      DOUBLE PRECISION   EST, RNORM, SCALE
+*     ..
+*     .. Local Arrays ..
+      INTEGER            ISAVE( 3 )
+      DOUBLE PRECISION   RWORK( 1 )
+*     ..
+*     .. External Functions ..
+      LOGICAL            LSAME
+      DOUBLE PRECISION   ZLANGE
+      EXTERNAL           LSAME, ZLANGE
 *     ..
 *     .. External Subroutines ..
-      EXTERNAL           XERBLA, ZLARFB, ZLARFT, ZUNGR2
+      EXTERNAL           XERBLA, ZLACN2, ZLACPY, ZTREXC, ZTRSYL
 *     ..
 *     .. Intrinsic Functions ..
-      INTRINSIC          MAX, MIN
-*     ..
-*     .. External Functions ..
-      INTEGER            ILAENV
-      EXTERNAL           ILAENV
+      INTRINSIC          MAX, SQRT
 *     ..
 *     .. Executable Statements ..
 *
-*     Test the input arguments
+*     Decode and test the input parameters.
+*
+      WANTBH = LSAME( JOB, 'B' )
+      WANTS = LSAME( JOB, 'E' ) .OR. WANTBH
+      WANTSP = LSAME( JOB, 'V' ) .OR. WANTBH
+      WANTQ = LSAME( COMPQ, 'V' )
+*
+*     Set M to the number of selected eigenvalues.
+*
+      M = 0
+      DO 10 K = 1, N
+         IF( SELECT( K ) )
+     $      M = M + 1
+   10 CONTINUE
+*
+      N1 = M
+      N2 = N - M
+      NN = N1*N2
 *
       INFO = 0
       LQUERY = ( LWORK.EQ.-1 )
-      IF( M.LT.0 ) THEN
+*
+      IF( WANTSP ) THEN
+         LWMIN = MAX( 1, 2*NN )
+      ELSE IF( LSAME( JOB, 'N' ) ) THEN
+         LWMIN = 1
+      ELSE IF( LSAME( JOB, 'E' ) ) THEN
+         LWMIN = MAX( 1, NN )
+      END IF
+*
+      IF( .NOT.LSAME( JOB, 'N' ) .AND. .NOT.WANTS .AND. .NOT.WANTSP )
+     $     THEN
          INFO = -1
-      ELSE IF( N.LT.M ) THEN
+      ELSE IF( .NOT.LSAME( COMPQ, 'N' ) .AND. .NOT.WANTQ ) THEN
          INFO = -2
-      ELSE IF( K.LT.0 .OR. K.GT.M ) THEN
-         INFO = -3
-      ELSE IF( LDA.LT.MAX( 1, M ) ) THEN
-         INFO = -5
+      ELSE IF( N.LT.0 ) THEN
+         INFO = -4
+      ELSE IF( LDT.LT.MAX( 1, N ) ) THEN
+         INFO = -6
+      ELSE IF( LDQ.LT.1 .OR. ( WANTQ .AND. LDQ.LT.N ) ) THEN
+         INFO = -8
+      ELSE IF( LWORK.LT.LWMIN .AND. .NOT.LQUERY ) THEN
+         INFO = -14
       END IF
 *
       IF( INFO.EQ.0 ) THEN
-         IF( M.LE.0 ) THEN
-            LWKOPT = 1
-         ELSE
-            NB = ILAENV( 1, 'ZUNGRQ', ' ', M, N, K, -1 )
-            LWKOPT = M*NB
-         END IF
-         WORK( 1 ) = LWKOPT
-*
-         IF( LWORK.LT.MAX( 1, M ) .AND. .NOT.LQUERY ) THEN
-            INFO = -8
-         END IF
+         WORK( 1 ) = LWMIN
       END IF
 *
       IF( INFO.NE.0 ) THEN
-         CALL XERBLA( 'ZUNGRQ', -INFO )
+         CALL XERBLA( 'ZTRSEN', -INFO )
          RETURN
       ELSE IF( LQUERY ) THEN
          RETURN
@@ -29215,529 +49039,672 @@
 *
 *     Quick return if possible
 *
-      IF( M.LE.0 ) THEN
-         RETURN
+      IF( M.EQ.N .OR. M.EQ.0 ) THEN
+         IF( WANTS )
+     $      S = ONE
+         IF( WANTSP )
+     $      SEP = ZLANGE( '1', N, N, T, LDT, RWORK )
+         GO TO 40
       END IF
 *
-      NBMIN = 2
-      NX = 0
-      IWS = M
-      IF( NB.GT.1 .AND. NB.LT.K ) THEN
-*
-*        Determine when to cross over from blocked to unblocked code.
-*
-         NX = MAX( 0, ILAENV( 3, 'ZUNGRQ', ' ', M, N, K, -1 ) )
-         IF( NX.LT.K ) THEN
-*
-*           Determine if workspace is large enough for blocked code.
+*     Collect the selected eigenvalues at the top left corner of T.
 *
-            LDWORK = M
-            IWS = LDWORK*NB
-            IF( LWORK.LT.IWS ) THEN
+      KS = 0
+      DO 20 K = 1, N
+         IF( SELECT( K ) ) THEN
+            KS = KS + 1
 *
-*              Not enough workspace to use optimal NB:  reduce NB and
-*              determine the minimum value of NB.
+*           Swap the K-th eigenvalue to position KS.
 *
-               NB = LWORK / LDWORK
-               NBMIN = MAX( 2, ILAENV( 2, 'ZUNGRQ', ' ', M, N, K, -1 ) )
-            END IF
+            IF( K.NE.KS )
+     $         CALL ZTREXC( COMPQ, N, T, LDT, Q, LDQ, K, KS, IERR )
          END IF
-      END IF
-*
-      IF( NB.GE.NBMIN .AND. NB.LT.K .AND. NX.LT.K ) THEN
+   20 CONTINUE
 *
-*        Use blocked code after the first block.
-*        The last kk rows are handled by the block method.
+      IF( WANTS ) THEN
 *
-         KK = MIN( K, ( ( K-NX+NB-1 ) / NB )*NB )
+*        Solve the Sylvester equation for R:
 *
-*        Set A(1:m-kk,n-kk+1:n) to zero.
+*           T11*R - R*T22 = scale*T12
 *
-         DO 20 J = N - KK + 1, N
-            DO 10 I = 1, M - KK
-               A( I, J ) = ZERO
-   10       CONTINUE
-   20    CONTINUE
-      ELSE
-         KK = 0
-      END IF
+         CALL ZLACPY( 'F', N1, N2, T( 1, N1+1 ), LDT, WORK, N1 )
+         CALL ZTRSYL( 'N', 'N', -1, N1, N2, T, LDT, T( N1+1, N1+1 ),
+     $                LDT, WORK, N1, SCALE, IERR )
 *
-*     Use unblocked code for the first or only block.
+*        Estimate the reciprocal of the condition number of the cluster
+*        of eigenvalues.
 *
-      CALL ZUNGR2( M-KK, N-KK, K-KK, A, LDA, TAU, WORK, IINFO )
+         RNORM = ZLANGE( 'F', N1, N2, WORK, N1, RWORK )
+         IF( RNORM.EQ.ZERO ) THEN
+            S = ONE
+         ELSE
+            S = SCALE / ( SQRT( SCALE*SCALE / RNORM+RNORM )*
+     $          SQRT( RNORM ) )
+         END IF
+      END IF
 *
-      IF( KK.GT.0 ) THEN
+      IF( WANTSP ) THEN
 *
-*        Use blocked code
+*        Estimate sep(T11,T22).
 *
-         DO 50 I = K - KK + 1, K, NB
-            IB = MIN( NB, K-I+1 )
-            II = M - K + I
-            IF( II.GT.1 ) THEN
+         EST = ZERO
+         KASE = 0
+   30    CONTINUE
+         CALL ZLACN2( NN, WORK( NN+1 ), WORK, EST, KASE, ISAVE )
+         IF( KASE.NE.0 ) THEN
+            IF( KASE.EQ.1 ) THEN
 *
-*              Form the triangular factor of the block reflector
-*              H = H(i+ib-1) . . . H(i+1) H(i)
+*              Solve T11*R - R*T22 = scale*X.
 *
-               CALL ZLARFT( 'Backward', 'Rowwise', N-K+I+IB-1, IB,
-     $                      A( II, 1 ), LDA, TAU( I ), WORK, LDWORK )
+               CALL ZTRSYL( 'N', 'N', -1, N1, N2, T, LDT,
+     $                      T( N1+1, N1+1 ), LDT, WORK, N1, SCALE,
+     $                      IERR )
+            ELSE
 *
-*              Apply H**H to A(1:m-k+i-1,1:n-k+i+ib-1) from the right
+*              Solve T11**H*R - R*T22**H = scale*X.
 *
-               CALL ZLARFB( 'Right', 'Conjugate transpose', 'Backward',
-     $                      'Rowwise', II-1, N-K+I+IB-1, IB, A( II, 1 ),
-     $                      LDA, WORK, LDWORK, A, LDA, WORK( IB+1 ),
-     $                      LDWORK )
+               CALL ZTRSYL( 'C', 'C', -1, N1, N2, T, LDT,
+     $                      T( N1+1, N1+1 ), LDT, WORK, N1, SCALE,
+     $                      IERR )
             END IF
+            GO TO 30
+         END IF
 *
-*           Apply H**H to columns 1:n-k+i+ib-1 of current block
+         SEP = SCALE / EST
+      END IF
 *
-            CALL ZUNGR2( IB, N-K+I+IB-1, IB, A( II, 1 ), LDA, TAU( I ),
-     $                   WORK, IINFO )
+   40 CONTINUE
 *
-*           Set columns n-k+i+ib:n of current block to zero
+*     Copy reordered eigenvalues to W.
 *
-            DO 40 L = N - K + I + IB, N
-               DO 30 J = II, II + IB - 1
-                  A( J, L ) = ZERO
-   30          CONTINUE
-   40       CONTINUE
-   50    CONTINUE
-      END IF
+      DO 50 K = 1, N
+         W( K ) = T( K, K )
+   50 CONTINUE
+*
+      WORK( 1 ) = LWMIN
 *
-      WORK( 1 ) = IWS
       RETURN
 *
-*     End of ZUNGRQ
+*     End of ZTRSEN
 *
       END
-*> \brief \b ZUNGTR
+*> \brief \b ZTRSYL
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download ZUNGTR + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/zungtr.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/zungtr.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/zungtr.f"> 
+*> Download ZTRSYL + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/ztrsyl.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/ztrsyl.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/ztrsyl.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
-*       SUBROUTINE ZUNGTR( UPLO, N, A, LDA, TAU, WORK, LWORK, INFO )
-* 
+*       SUBROUTINE ZTRSYL( TRANA, TRANB, ISGN, M, N, A, LDA, B, LDB, C,
+*                          LDC, SCALE, INFO )
+*
 *       .. Scalar Arguments ..
-*       CHARACTER          UPLO
-*       INTEGER            INFO, LDA, LWORK, N
+*       CHARACTER          TRANA, TRANB
+*       INTEGER            INFO, ISGN, LDA, LDB, LDC, M, N
+*       DOUBLE PRECISION   SCALE
 *       ..
 *       .. Array Arguments ..
-*       COMPLEX*16         A( LDA, * ), TAU( * ), WORK( * )
+*       COMPLEX*16         A( LDA, * ), B( LDB, * ), C( LDC, * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
 *>
 *> \verbatim
 *>
-*> ZUNGTR generates a complex unitary matrix Q which is defined as the
-*> product of n-1 elementary reflectors of order N, as returned by
-*> ZHETRD:
+*> ZTRSYL solves the complex Sylvester matrix equation:
 *>
-*> if UPLO = 'U', Q = H(n-1) . . . H(2) H(1),
+*>    op(A)*X + X*op(B) = scale*C or
+*>    op(A)*X - X*op(B) = scale*C,
 *>
-*> if UPLO = 'L', Q = H(1) H(2) . . . H(n-1).
+*> where op(A) = A or A**H, and A and B are both upper triangular. A is
+*> M-by-M and B is N-by-N; the right hand side C and the solution X are
+*> M-by-N; and scale is an output scale factor, set <= 1 to avoid
+*> overflow in X.
 *> \endverbatim
 *
 *  Arguments:
 *  ==========
 *
-*> \param[in] UPLO
+*> \param[in] TRANA
 *> \verbatim
-*>          UPLO is CHARACTER*1
-*>          = 'U': Upper triangle of A contains elementary reflectors
-*>                 from ZHETRD;
-*>          = 'L': Lower triangle of A contains elementary reflectors
-*>                 from ZHETRD.
+*>          TRANA is CHARACTER*1
+*>          Specifies the option op(A):
+*>          = 'N': op(A) = A    (No transpose)
+*>          = 'C': op(A) = A**H (Conjugate transpose)
+*> \endverbatim
+*>
+*> \param[in] TRANB
+*> \verbatim
+*>          TRANB is CHARACTER*1
+*>          Specifies the option op(B):
+*>          = 'N': op(B) = B    (No transpose)
+*>          = 'C': op(B) = B**H (Conjugate transpose)
+*> \endverbatim
+*>
+*> \param[in] ISGN
+*> \verbatim
+*>          ISGN is INTEGER
+*>          Specifies the sign in the equation:
+*>          = +1: solve op(A)*X + X*op(B) = scale*C
+*>          = -1: solve op(A)*X - X*op(B) = scale*C
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*>          M is INTEGER
+*>          The order of the matrix A, and the number of rows in the
+*>          matrices X and C. M >= 0.
 *> \endverbatim
 *>
 *> \param[in] N
 *> \verbatim
 *>          N is INTEGER
-*>          The order of the matrix Q. N >= 0.
+*>          The order of the matrix B, and the number of columns in the
+*>          matrices X and C. N >= 0.
 *> \endverbatim
 *>
-*> \param[in,out] A
+*> \param[in] A
 *> \verbatim
-*>          A is COMPLEX*16 array, dimension (LDA,N)
-*>          On entry, the vectors which define the elementary reflectors,
-*>          as returned by ZHETRD.
-*>          On exit, the N-by-N unitary matrix Q.
+*>          A is COMPLEX*16 array, dimension (LDA,M)
+*>          The upper triangular matrix A.
 *> \endverbatim
 *>
 *> \param[in] LDA
 *> \verbatim
 *>          LDA is INTEGER
-*>          The leading dimension of the array A. LDA >= N.
+*>          The leading dimension of the array A. LDA >= max(1,M).
 *> \endverbatim
 *>
-*> \param[in] TAU
+*> \param[in] B
 *> \verbatim
-*>          TAU is COMPLEX*16 array, dimension (N-1)
-*>          TAU(i) must contain the scalar factor of the elementary
-*>          reflector H(i), as returned by ZHETRD.
+*>          B is COMPLEX*16 array, dimension (LDB,N)
+*>          The upper triangular matrix B.
 *> \endverbatim
 *>
-*> \param[out] WORK
+*> \param[in] LDB
 *> \verbatim
-*>          WORK is COMPLEX*16 array, dimension (MAX(1,LWORK))
-*>          On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+*>          LDB is INTEGER
+*>          The leading dimension of the array B. LDB >= max(1,N).
 *> \endverbatim
 *>
-*> \param[in] LWORK
+*> \param[in,out] C
 *> \verbatim
-*>          LWORK is INTEGER
-*>          The dimension of the array WORK. LWORK >= N-1.
-*>          For optimum performance LWORK >= (N-1)*NB, where NB is
-*>          the optimal blocksize.
+*>          C is COMPLEX*16 array, dimension (LDC,N)
+*>          On entry, the M-by-N right hand side matrix C.
+*>          On exit, C is overwritten by the solution matrix X.
+*> \endverbatim
 *>
-*>          If LWORK = -1, then a workspace query is assumed; the routine
-*>          only calculates the optimal size of the WORK array, returns
-*>          this value as the first entry of the WORK array, and no error
-*>          message related to LWORK is issued by XERBLA.
+*> \param[in] LDC
+*> \verbatim
+*>          LDC is INTEGER
+*>          The leading dimension of the array C. LDC >= max(1,M)
+*> \endverbatim
+*>
+*> \param[out] SCALE
+*> \verbatim
+*>          SCALE is DOUBLE PRECISION
+*>          The scale factor, scale, set <= 1 to avoid overflow in X.
 *> \endverbatim
 *>
 *> \param[out] INFO
 *> \verbatim
 *>          INFO is INTEGER
-*>          = 0:  successful exit
-*>          < 0:  if INFO = -i, the i-th argument had an illegal value
+*>          = 0: successful exit
+*>          < 0: if INFO = -i, the i-th argument had an illegal value
+*>          = 1: A and B have common or very close eigenvalues; perturbed
+*>               values were used to solve the equation (but the matrices
+*>               A and B are unchanged).
 *> \endverbatim
 *
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date November 2011
+*> \date December 2016
 *
-*> \ingroup complex16OTHERcomputational
+*> \ingroup complex16SYcomputational
 *
 *  =====================================================================
-      SUBROUTINE ZUNGTR( UPLO, N, A, LDA, TAU, WORK, LWORK, INFO )
+      SUBROUTINE ZTRSYL( TRANA, TRANB, ISGN, M, N, A, LDA, B, LDB, C,
+     $                   LDC, SCALE, INFO )
 *
-*  -- LAPACK computational routine (version 3.4.0) --
+*  -- LAPACK computational routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     November 2011
+*     December 2016
 *
 *     .. Scalar Arguments ..
-      CHARACTER          UPLO
-      INTEGER            INFO, LDA, LWORK, N
+      CHARACTER          TRANA, TRANB
+      INTEGER            INFO, ISGN, LDA, LDB, LDC, M, N
+      DOUBLE PRECISION   SCALE
 *     ..
 *     .. Array Arguments ..
-      COMPLEX*16         A( LDA, * ), TAU( * ), WORK( * )
+      COMPLEX*16         A( LDA, * ), B( LDB, * ), C( LDC, * )
 *     ..
 *
 *  =====================================================================
 *
 *     .. Parameters ..
-      COMPLEX*16         ZERO, ONE
-      PARAMETER          ( ZERO = ( 0.0D+0, 0.0D+0 ),
-     $                   ONE = ( 1.0D+0, 0.0D+0 ) )
+      DOUBLE PRECISION   ONE
+      PARAMETER          ( ONE = 1.0D+0 )
 *     ..
 *     .. Local Scalars ..
-      LOGICAL            LQUERY, UPPER
-      INTEGER            I, IINFO, J, LWKOPT, NB
+      LOGICAL            NOTRNA, NOTRNB
+      INTEGER            J, K, L
+      DOUBLE PRECISION   BIGNUM, DA11, DB, EPS, SCALOC, SGN, SMIN,
+     $                   SMLNUM
+      COMPLEX*16         A11, SUML, SUMR, VEC, X11
+*     ..
+*     .. Local Arrays ..
+      DOUBLE PRECISION   DUM( 1 )
 *     ..
 *     .. External Functions ..
       LOGICAL            LSAME
-      INTEGER            ILAENV
-      EXTERNAL           LSAME, ILAENV
+      DOUBLE PRECISION   DLAMCH, ZLANGE
+      COMPLEX*16         ZDOTC, ZDOTU, ZLADIV
+      EXTERNAL           LSAME, DLAMCH, ZLANGE, ZDOTC, ZDOTU, ZLADIV
 *     ..
 *     .. External Subroutines ..
-      EXTERNAL           XERBLA, ZUNGQL, ZUNGQR
+      EXTERNAL           DLABAD, XERBLA, ZDSCAL
 *     ..
 *     .. Intrinsic Functions ..
-      INTRINSIC          MAX
+      INTRINSIC          ABS, DBLE, DCMPLX, DCONJG, DIMAG, MAX, MIN
 *     ..
 *     .. Executable Statements ..
 *
-*     Test the input arguments
+*     Decode and Test input parameters
+*
+      NOTRNA = LSAME( TRANA, 'N' )
+      NOTRNB = LSAME( TRANB, 'N' )
 *
       INFO = 0
-      LQUERY = ( LWORK.EQ.-1 )
-      UPPER = LSAME( UPLO, 'U' )
-      IF( .NOT.UPPER .AND. .NOT.LSAME( UPLO, 'L' ) ) THEN
+      IF( .NOT.NOTRNA .AND. .NOT.LSAME( TRANA, 'C' ) ) THEN
          INFO = -1
-      ELSE IF( N.LT.0 ) THEN
+      ELSE IF( .NOT.NOTRNB .AND. .NOT.LSAME( TRANB, 'C' ) ) THEN
          INFO = -2
-      ELSE IF( LDA.LT.MAX( 1, N ) ) THEN
+      ELSE IF( ISGN.NE.1 .AND. ISGN.NE.-1 ) THEN
+         INFO = -3
+      ELSE IF( M.LT.0 ) THEN
          INFO = -4
-      ELSE IF( LWORK.LT.MAX( 1, N-1 ) .AND. .NOT.LQUERY ) THEN
+      ELSE IF( N.LT.0 ) THEN
+         INFO = -5
+      ELSE IF( LDA.LT.MAX( 1, M ) ) THEN
          INFO = -7
+      ELSE IF( LDB.LT.MAX( 1, N ) ) THEN
+         INFO = -9
+      ELSE IF( LDC.LT.MAX( 1, M ) ) THEN
+         INFO = -11
       END IF
-*
-      IF( INFO.EQ.0 ) THEN
-         IF( UPPER ) THEN
-            NB = ILAENV( 1, 'ZUNGQL', ' ', N-1, N-1, N-1, -1 )
-         ELSE
-            NB = ILAENV( 1, 'ZUNGQR', ' ', N-1, N-1, N-1, -1 )
-         END IF
-         LWKOPT = MAX( 1, N-1 )*NB
-         WORK( 1 ) = LWKOPT
-      END IF
-*
       IF( INFO.NE.0 ) THEN
-         CALL XERBLA( 'ZUNGTR', -INFO )
-         RETURN
-      ELSE IF( LQUERY ) THEN
+         CALL XERBLA( 'ZTRSYL', -INFO )
          RETURN
       END IF
 *
 *     Quick return if possible
 *
-      IF( N.EQ.0 ) THEN
-         WORK( 1 ) = 1
-         RETURN
-      END IF
+      SCALE = ONE
+      IF( M.EQ.0 .OR. N.EQ.0 )
+     $   RETURN
+*
+*     Set constants to control overflow
+*
+      EPS = DLAMCH( 'P' )
+      SMLNUM = DLAMCH( 'S' )
+      BIGNUM = ONE / SMLNUM
+      CALL DLABAD( SMLNUM, BIGNUM )
+      SMLNUM = SMLNUM*DBLE( M*N ) / EPS
+      BIGNUM = ONE / SMLNUM
+      SMIN = MAX( SMLNUM, EPS*ZLANGE( 'M', M, M, A, LDA, DUM ),
+     $       EPS*ZLANGE( 'M', N, N, B, LDB, DUM ) )
+      SGN = ISGN
+*
+      IF( NOTRNA .AND. NOTRNB ) THEN
+*
+*        Solve    A*X + ISGN*X*B = scale*C.
+*
+*        The (K,L)th block of X is determined starting from
+*        bottom-left corner column by column by
+*
+*            A(K,K)*X(K,L) + ISGN*X(K,L)*B(L,L) = C(K,L) - R(K,L)
+*
+*        Where
+*                    M                        L-1
+*          R(K,L) = SUM [A(K,I)*X(I,L)] +ISGN*SUM [X(K,J)*B(J,L)].
+*                  I=K+1                      J=1
+*
+         DO 30 L = 1, N
+            DO 20 K = M, 1, -1
+*
+               SUML = ZDOTU( M-K, A( K, MIN( K+1, M ) ), LDA,
+     $                C( MIN( K+1, M ), L ), 1 )
+               SUMR = ZDOTU( L-1, C( K, 1 ), LDC, B( 1, L ), 1 )
+               VEC = C( K, L ) - ( SUML+SGN*SUMR )
+*
+               SCALOC = ONE
+               A11 = A( K, K ) + SGN*B( L, L )
+               DA11 = ABS( DBLE( A11 ) ) + ABS( DIMAG( A11 ) )
+               IF( DA11.LE.SMIN ) THEN
+                  A11 = SMIN
+                  DA11 = SMIN
+                  INFO = 1
+               END IF
+               DB = ABS( DBLE( VEC ) ) + ABS( DIMAG( VEC ) )
+               IF( DA11.LT.ONE .AND. DB.GT.ONE ) THEN
+                  IF( DB.GT.BIGNUM*DA11 )
+     $               SCALOC = ONE / DB
+               END IF
+               X11 = ZLADIV( VEC*DCMPLX( SCALOC ), A11 )
+*
+               IF( SCALOC.NE.ONE ) THEN
+                  DO 10 J = 1, N
+                     CALL ZDSCAL( M, SCALOC, C( 1, J ), 1 )
+   10             CONTINUE
+                  SCALE = SCALE*SCALOC
+               END IF
+               C( K, L ) = X11
+*
+   20       CONTINUE
+   30    CONTINUE
+*
+      ELSE IF( .NOT.NOTRNA .AND. NOTRNB ) THEN
+*
+*        Solve    A**H *X + ISGN*X*B = scale*C.
+*
+*        The (K,L)th block of X is determined starting from
+*        upper-left corner column by column by
+*
+*            A**H(K,K)*X(K,L) + ISGN*X(K,L)*B(L,L) = C(K,L) - R(K,L)
+*
+*        Where
+*                   K-1                           L-1
+*          R(K,L) = SUM [A**H(I,K)*X(I,L)] + ISGN*SUM [X(K,J)*B(J,L)]
+*                   I=1                           J=1
+*
+         DO 60 L = 1, N
+            DO 50 K = 1, M
+*
+               SUML = ZDOTC( K-1, A( 1, K ), 1, C( 1, L ), 1 )
+               SUMR = ZDOTU( L-1, C( K, 1 ), LDC, B( 1, L ), 1 )
+               VEC = C( K, L ) - ( SUML+SGN*SUMR )
+*
+               SCALOC = ONE
+               A11 = DCONJG( A( K, K ) ) + SGN*B( L, L )
+               DA11 = ABS( DBLE( A11 ) ) + ABS( DIMAG( A11 ) )
+               IF( DA11.LE.SMIN ) THEN
+                  A11 = SMIN
+                  DA11 = SMIN
+                  INFO = 1
+               END IF
+               DB = ABS( DBLE( VEC ) ) + ABS( DIMAG( VEC ) )
+               IF( DA11.LT.ONE .AND. DB.GT.ONE ) THEN
+                  IF( DB.GT.BIGNUM*DA11 )
+     $               SCALOC = ONE / DB
+               END IF
+*
+               X11 = ZLADIV( VEC*DCMPLX( SCALOC ), A11 )
+*
+               IF( SCALOC.NE.ONE ) THEN
+                  DO 40 J = 1, N
+                     CALL ZDSCAL( M, SCALOC, C( 1, J ), 1 )
+   40             CONTINUE
+                  SCALE = SCALE*SCALOC
+               END IF
+               C( K, L ) = X11
+*
+   50       CONTINUE
+   60    CONTINUE
+*
+      ELSE IF( .NOT.NOTRNA .AND. .NOT.NOTRNB ) THEN
+*
+*        Solve    A**H*X + ISGN*X*B**H = C.
+*
+*        The (K,L)th block of X is determined starting from
+*        upper-right corner column by column by
+*
+*            A**H(K,K)*X(K,L) + ISGN*X(K,L)*B**H(L,L) = C(K,L) - R(K,L)
+*
+*        Where
+*                    K-1
+*           R(K,L) = SUM [A**H(I,K)*X(I,L)] +
+*                    I=1
+*                           N
+*                     ISGN*SUM [X(K,J)*B**H(L,J)].
+*                          J=L+1
+*
+         DO 90 L = N, 1, -1
+            DO 80 K = 1, M
+*
+               SUML = ZDOTC( K-1, A( 1, K ), 1, C( 1, L ), 1 )
+               SUMR = ZDOTC( N-L, C( K, MIN( L+1, N ) ), LDC,
+     $                B( L, MIN( L+1, N ) ), LDB )
+               VEC = C( K, L ) - ( SUML+SGN*DCONJG( SUMR ) )
+*
+               SCALOC = ONE
+               A11 = DCONJG( A( K, K )+SGN*B( L, L ) )
+               DA11 = ABS( DBLE( A11 ) ) + ABS( DIMAG( A11 ) )
+               IF( DA11.LE.SMIN ) THEN
+                  A11 = SMIN
+                  DA11 = SMIN
+                  INFO = 1
+               END IF
+               DB = ABS( DBLE( VEC ) ) + ABS( DIMAG( VEC ) )
+               IF( DA11.LT.ONE .AND. DB.GT.ONE ) THEN
+                  IF( DB.GT.BIGNUM*DA11 )
+     $               SCALOC = ONE / DB
+               END IF
+*
+               X11 = ZLADIV( VEC*DCMPLX( SCALOC ), A11 )
+*
+               IF( SCALOC.NE.ONE ) THEN
+                  DO 70 J = 1, N
+                     CALL ZDSCAL( M, SCALOC, C( 1, J ), 1 )
+   70             CONTINUE
+                  SCALE = SCALE*SCALOC
+               END IF
+               C( K, L ) = X11
+*
+   80       CONTINUE
+   90    CONTINUE
 *
-      IF( UPPER ) THEN
+      ELSE IF( NOTRNA .AND. .NOT.NOTRNB ) THEN
 *
-*        Q was determined by a call to ZHETRD with UPLO = 'U'
+*        Solve    A*X + ISGN*X*B**H = C.
 *
-*        Shift the vectors which define the elementary reflectors one
-*        column to the left, and set the last row and column of Q to
-*        those of the unit matrix
+*        The (K,L)th block of X is determined starting from
+*        bottom-left corner column by column by
 *
-         DO 20 J = 1, N - 1
-            DO 10 I = 1, J - 1
-               A( I, J ) = A( I, J+1 )
-   10       CONTINUE
-            A( N, J ) = ZERO
-   20    CONTINUE
-         DO 30 I = 1, N - 1
-            A( I, N ) = ZERO
-   30    CONTINUE
-         A( N, N ) = ONE
+*           A(K,K)*X(K,L) + ISGN*X(K,L)*B**H(L,L) = C(K,L) - R(K,L)
 *
-*        Generate Q(1:n-1,1:n-1)
+*        Where
+*                    M                          N
+*          R(K,L) = SUM [A(K,I)*X(I,L)] + ISGN*SUM [X(K,J)*B**H(L,J)]
+*                  I=K+1                      J=L+1
 *
-         CALL ZUNGQL( N-1, N-1, N-1, A, LDA, TAU, WORK, LWORK, IINFO )
+         DO 120 L = N, 1, -1
+            DO 110 K = M, 1, -1
 *
-      ELSE
+               SUML = ZDOTU( M-K, A( K, MIN( K+1, M ) ), LDA,
+     $                C( MIN( K+1, M ), L ), 1 )
+               SUMR = ZDOTC( N-L, C( K, MIN( L+1, N ) ), LDC,
+     $                B( L, MIN( L+1, N ) ), LDB )
+               VEC = C( K, L ) - ( SUML+SGN*DCONJG( SUMR ) )
 *
-*        Q was determined by a call to ZHETRD with UPLO = 'L'.
+               SCALOC = ONE
+               A11 = A( K, K ) + SGN*DCONJG( B( L, L ) )
+               DA11 = ABS( DBLE( A11 ) ) + ABS( DIMAG( A11 ) )
+               IF( DA11.LE.SMIN ) THEN
+                  A11 = SMIN
+                  DA11 = SMIN
+                  INFO = 1
+               END IF
+               DB = ABS( DBLE( VEC ) ) + ABS( DIMAG( VEC ) )
+               IF( DA11.LT.ONE .AND. DB.GT.ONE ) THEN
+                  IF( DB.GT.BIGNUM*DA11 )
+     $               SCALOC = ONE / DB
+               END IF
 *
-*        Shift the vectors which define the elementary reflectors one
-*        column to the right, and set the first row and column of Q to
-*        those of the unit matrix
+               X11 = ZLADIV( VEC*DCMPLX( SCALOC ), A11 )
 *
-         DO 50 J = N, 2, -1
-            A( 1, J ) = ZERO
-            DO 40 I = J + 1, N
-               A( I, J ) = A( I, J-1 )
-   40       CONTINUE
-   50    CONTINUE
-         A( 1, 1 ) = ONE
-         DO 60 I = 2, N
-            A( I, 1 ) = ZERO
-   60    CONTINUE
-         IF( N.GT.1 ) THEN
+               IF( SCALOC.NE.ONE ) THEN
+                  DO 100 J = 1, N
+                     CALL ZDSCAL( M, SCALOC, C( 1, J ), 1 )
+  100             CONTINUE
+                  SCALE = SCALE*SCALOC
+               END IF
+               C( K, L ) = X11
 *
-*           Generate Q(2:n,2:n)
+  110       CONTINUE
+  120    CONTINUE
 *
-            CALL ZUNGQR( N-1, N-1, N-1, A( 2, 2 ), LDA, TAU, WORK,
-     $                   LWORK, IINFO )
-         END IF
       END IF
-      WORK( 1 ) = LWKOPT
+*
       RETURN
 *
-*     End of ZUNGTR
+*     End of ZTRSYL
 *
       END
-*> \brief \b ZUNM2R multiplies a general matrix by the unitary matrix from a QR factorization determined by cgeqrf (unblocked algorithm).
+*> \brief \b ZTRTI2 computes the inverse of a triangular matrix (unblocked algorithm).
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download ZUNM2R + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/zunm2r.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/zunm2r.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/zunm2r.f"> 
+*> Download ZTRTI2 + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/ztrti2.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/ztrti2.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/ztrti2.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
-*       SUBROUTINE ZUNM2R( SIDE, TRANS, M, N, K, A, LDA, TAU, C, LDC,
-*                          WORK, INFO )
-* 
+*       SUBROUTINE ZTRTI2( UPLO, DIAG, N, A, LDA, INFO )
+*
 *       .. Scalar Arguments ..
-*       CHARACTER          SIDE, TRANS
-*       INTEGER            INFO, K, LDA, LDC, M, N
+*       CHARACTER          DIAG, UPLO
+*       INTEGER            INFO, LDA, N
 *       ..
 *       .. Array Arguments ..
-*       COMPLEX*16         A( LDA, * ), C( LDC, * ), TAU( * ), WORK( * )
+*       COMPLEX*16         A( LDA, * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
 *>
 *> \verbatim
 *>
-*> ZUNM2R overwrites the general complex m-by-n matrix C with
-*>
-*>       Q * C  if SIDE = 'L' and TRANS = 'N', or
-*>
-*>       Q**H* C  if SIDE = 'L' and TRANS = 'C', or
-*>
-*>       C * Q  if SIDE = 'R' and TRANS = 'N', or
-*>
-*>       C * Q**H if SIDE = 'R' and TRANS = 'C',
-*>
-*> where Q is a complex unitary matrix defined as the product of k
-*> elementary reflectors
-*>
-*>       Q = H(1) H(2) . . . H(k)
+*> ZTRTI2 computes the inverse of a complex upper or lower triangular
+*> matrix.
 *>
-*> as returned by ZGEQRF. Q is of order m if SIDE = 'L' and of order n
-*> if SIDE = 'R'.
+*> This is the Level 2 BLAS version of the algorithm.
 *> \endverbatim
 *
 *  Arguments:
 *  ==========
 *
-*> \param[in] SIDE
-*> \verbatim
-*>          SIDE is CHARACTER*1
-*>          = 'L': apply Q or Q**H from the Left
-*>          = 'R': apply Q or Q**H from the Right
-*> \endverbatim
-*>
-*> \param[in] TRANS
+*> \param[in] UPLO
 *> \verbatim
-*>          TRANS is CHARACTER*1
-*>          = 'N': apply Q  (No transpose)
-*>          = 'C': apply Q**H (Conjugate transpose)
+*>          UPLO is CHARACTER*1
+*>          Specifies whether the matrix A is upper or lower triangular.
+*>          = 'U':  Upper triangular
+*>          = 'L':  Lower triangular
 *> \endverbatim
 *>
-*> \param[in] M
+*> \param[in] DIAG
 *> \verbatim
-*>          M is INTEGER
-*>          The number of rows of the matrix C. M >= 0.
+*>          DIAG is CHARACTER*1
+*>          Specifies whether or not the matrix A is unit triangular.
+*>          = 'N':  Non-unit triangular
+*>          = 'U':  Unit triangular
 *> \endverbatim
 *>
 *> \param[in] N
 *> \verbatim
 *>          N is INTEGER
-*>          The number of columns of the matrix C. N >= 0.
+*>          The order of the matrix A.  N >= 0.
 *> \endverbatim
 *>
-*> \param[in] K
+*> \param[in,out] A
 *> \verbatim
-*>          K is INTEGER
-*>          The number of elementary reflectors whose product defines
-*>          the matrix Q.
-*>          If SIDE = 'L', M >= K >= 0;
-*>          if SIDE = 'R', N >= K >= 0.
-*> \endverbatim
+*>          A is COMPLEX*16 array, dimension (LDA,N)
+*>          On entry, the triangular matrix A.  If UPLO = 'U', the
+*>          leading n by n upper triangular part of the array A contains
+*>          the upper triangular matrix, and the strictly lower
+*>          triangular part of A is not referenced.  If UPLO = 'L', the
+*>          leading n by n lower triangular part of the array A contains
+*>          the lower triangular matrix, and the strictly upper
+*>          triangular part of A is not referenced.  If DIAG = 'U', the
+*>          diagonal elements of A are also not referenced and are
+*>          assumed to be 1.
 *>
-*> \param[in] A
-*> \verbatim
-*>          A is COMPLEX*16 array, dimension (LDA,K)
-*>          The i-th column must contain the vector which defines the
-*>          elementary reflector H(i), for i = 1,2,...,k, as returned by
-*>          ZGEQRF in the first k columns of its array argument A.
-*>          A is modified by the routine but restored on exit.
+*>          On exit, the (triangular) inverse of the original matrix, in
+*>          the same storage format.
 *> \endverbatim
 *>
 *> \param[in] LDA
 *> \verbatim
 *>          LDA is INTEGER
-*>          The leading dimension of the array A.
-*>          If SIDE = 'L', LDA >= max(1,M);
-*>          if SIDE = 'R', LDA >= max(1,N).
-*> \endverbatim
-*>
-*> \param[in] TAU
-*> \verbatim
-*>          TAU is COMPLEX*16 array, dimension (K)
-*>          TAU(i) must contain the scalar factor of the elementary
-*>          reflector H(i), as returned by ZGEQRF.
-*> \endverbatim
-*>
-*> \param[in,out] C
-*> \verbatim
-*>          C is COMPLEX*16 array, dimension (LDC,N)
-*>          On entry, the m-by-n matrix C.
-*>          On exit, C is overwritten by Q*C or Q**H*C or C*Q**H or C*Q.
-*> \endverbatim
-*>
-*> \param[in] LDC
-*> \verbatim
-*>          LDC is INTEGER
-*>          The leading dimension of the array C. LDC >= max(1,M).
-*> \endverbatim
-*>
-*> \param[out] WORK
-*> \verbatim
-*>          WORK is COMPLEX*16 array, dimension
-*>                                   (N) if SIDE = 'L',
-*>                                   (M) if SIDE = 'R'
+*>          The leading dimension of the array A.  LDA >= max(1,N).
 *> \endverbatim
 *>
 *> \param[out] INFO
 *> \verbatim
 *>          INFO is INTEGER
 *>          = 0: successful exit
-*>          < 0: if INFO = -i, the i-th argument had an illegal value
+*>          < 0: if INFO = -k, the k-th argument had an illegal value
 *> \endverbatim
 *
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date September 2012
+*> \date December 2016
 *
 *> \ingroup complex16OTHERcomputational
 *
 *  =====================================================================
-      SUBROUTINE ZUNM2R( SIDE, TRANS, M, N, K, A, LDA, TAU, C, LDC,
-     $                   WORK, INFO )
+      SUBROUTINE ZTRTI2( UPLO, DIAG, N, A, LDA, INFO )
 *
-*  -- LAPACK computational routine (version 3.4.2) --
+*  -- LAPACK computational routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     September 2012
+*     December 2016
 *
 *     .. Scalar Arguments ..
-      CHARACTER          SIDE, TRANS
-      INTEGER            INFO, K, LDA, LDC, M, N
+      CHARACTER          DIAG, UPLO
+      INTEGER            INFO, LDA, N
 *     ..
 *     .. Array Arguments ..
-      COMPLEX*16         A( LDA, * ), C( LDC, * ), TAU( * ), WORK( * )
+      COMPLEX*16         A( LDA, * )
 *     ..
 *
 *  =====================================================================
@@ -29747,328 +49714,220 @@
       PARAMETER          ( ONE = ( 1.0D+0, 0.0D+0 ) )
 *     ..
 *     .. Local Scalars ..
-      LOGICAL            LEFT, NOTRAN
-      INTEGER            I, I1, I2, I3, IC, JC, MI, NI, NQ
-      COMPLEX*16         AII, TAUI
+      LOGICAL            NOUNIT, UPPER
+      INTEGER            J
+      COMPLEX*16         AJJ
 *     ..
 *     .. External Functions ..
       LOGICAL            LSAME
       EXTERNAL           LSAME
 *     ..
 *     .. External Subroutines ..
-      EXTERNAL           XERBLA, ZLARF
+      EXTERNAL           XERBLA, ZSCAL, ZTRMV
 *     ..
 *     .. Intrinsic Functions ..
-      INTRINSIC          DCONJG, MAX
+      INTRINSIC          MAX
 *     ..
 *     .. Executable Statements ..
 *
-*     Test the input arguments
+*     Test the input parameters.
 *
       INFO = 0
-      LEFT = LSAME( SIDE, 'L' )
-      NOTRAN = LSAME( TRANS, 'N' )
-*
-*     NQ is the order of Q
-*
-      IF( LEFT ) THEN
-         NQ = M
-      ELSE
-         NQ = N
-      END IF
-      IF( .NOT.LEFT .AND. .NOT.LSAME( SIDE, 'R' ) ) THEN
+      UPPER = LSAME( UPLO, 'U' )
+      NOUNIT = LSAME( DIAG, 'N' )
+      IF( .NOT.UPPER .AND. .NOT.LSAME( UPLO, 'L' ) ) THEN
          INFO = -1
-      ELSE IF( .NOT.NOTRAN .AND. .NOT.LSAME( TRANS, 'C' ) ) THEN
+      ELSE IF( .NOT.NOUNIT .AND. .NOT.LSAME( DIAG, 'U' ) ) THEN
          INFO = -2
-      ELSE IF( M.LT.0 ) THEN
-         INFO = -3
       ELSE IF( N.LT.0 ) THEN
-         INFO = -4
-      ELSE IF( K.LT.0 .OR. K.GT.NQ ) THEN
+         INFO = -3
+      ELSE IF( LDA.LT.MAX( 1, N ) ) THEN
          INFO = -5
-      ELSE IF( LDA.LT.MAX( 1, NQ ) ) THEN
-         INFO = -7
-      ELSE IF( LDC.LT.MAX( 1, M ) ) THEN
-         INFO = -10
       END IF
       IF( INFO.NE.0 ) THEN
-         CALL XERBLA( 'ZUNM2R', -INFO )
+         CALL XERBLA( 'ZTRTI2', -INFO )
          RETURN
       END IF
 *
-*     Quick return if possible
-*
-      IF( M.EQ.0 .OR. N.EQ.0 .OR. K.EQ.0 )
-     $   RETURN
+      IF( UPPER ) THEN
 *
-      IF( ( LEFT .AND. .NOT.NOTRAN .OR. .NOT.LEFT .AND. NOTRAN ) ) THEN
-         I1 = 1
-         I2 = K
-         I3 = 1
-      ELSE
-         I1 = K
-         I2 = 1
-         I3 = -1
-      END IF
+*        Compute inverse of upper triangular matrix.
 *
-      IF( LEFT ) THEN
-         NI = N
-         JC = 1
-      ELSE
-         MI = M
-         IC = 1
-      END IF
+         DO 10 J = 1, N
+            IF( NOUNIT ) THEN
+               A( J, J ) = ONE / A( J, J )
+               AJJ = -A( J, J )
+            ELSE
+               AJJ = -ONE
+            END IF
 *
-      DO 10 I = I1, I2, I3
-         IF( LEFT ) THEN
+*           Compute elements 1:j-1 of j-th column.
 *
-*           H(i) or H(i)**H is applied to C(i:m,1:n)
+            CALL ZTRMV( 'Upper', 'No transpose', DIAG, J-1, A, LDA,
+     $                  A( 1, J ), 1 )
+            CALL ZSCAL( J-1, AJJ, A( 1, J ), 1 )
+   10    CONTINUE
+      ELSE
 *
-            MI = M - I + 1
-            IC = I
-         ELSE
+*        Compute inverse of lower triangular matrix.
 *
-*           H(i) or H(i)**H is applied to C(1:m,i:n)
+         DO 20 J = N, 1, -1
+            IF( NOUNIT ) THEN
+               A( J, J ) = ONE / A( J, J )
+               AJJ = -A( J, J )
+            ELSE
+               AJJ = -ONE
+            END IF
+            IF( J.LT.N ) THEN
 *
-            NI = N - I + 1
-            JC = I
-         END IF
+*              Compute elements j+1:n of j-th column.
 *
-*        Apply H(i) or H(i)**H
+               CALL ZTRMV( 'Lower', 'No transpose', DIAG, N-J,
+     $                     A( J+1, J+1 ), LDA, A( J+1, J ), 1 )
+               CALL ZSCAL( N-J, AJJ, A( J+1, J ), 1 )
+            END IF
+   20    CONTINUE
+      END IF
 *
-         IF( NOTRAN ) THEN
-            TAUI = TAU( I )
-         ELSE
-            TAUI = DCONJG( TAU( I ) )
-         END IF
-         AII = A( I, I )
-         A( I, I ) = ONE
-         CALL ZLARF( SIDE, MI, NI, A( I, I ), 1, TAUI, C( IC, JC ), LDC,
-     $               WORK )
-         A( I, I ) = AII
-   10 CONTINUE
       RETURN
 *
-*     End of ZUNM2R
+*     End of ZTRTI2
 *
       END
-*> \brief \b ZUNMBR
+*> \brief \b ZTRTRI
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download ZUNMBR + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/zunmbr.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/zunmbr.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/zunmbr.f"> 
+*> Download ZTRTRI + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/ztrtri.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/ztrtri.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/ztrtri.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
-*       SUBROUTINE ZUNMBR( VECT, SIDE, TRANS, M, N, K, A, LDA, TAU, C,
-*                          LDC, WORK, LWORK, INFO )
-* 
+*       SUBROUTINE ZTRTRI( UPLO, DIAG, N, A, LDA, INFO )
+*
 *       .. Scalar Arguments ..
-*       CHARACTER          SIDE, TRANS, VECT
-*       INTEGER            INFO, K, LDA, LDC, LWORK, M, N
+*       CHARACTER          DIAG, UPLO
+*       INTEGER            INFO, LDA, N
 *       ..
 *       .. Array Arguments ..
-*       COMPLEX*16         A( LDA, * ), C( LDC, * ), TAU( * ), WORK( * )
+*       COMPLEX*16         A( LDA, * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
 *>
 *> \verbatim
 *>
-*> If VECT = 'Q', ZUNMBR overwrites the general complex M-by-N matrix C
-*> with
-*>                 SIDE = 'L'     SIDE = 'R'
-*> TRANS = 'N':      Q * C          C * Q
-*> TRANS = 'C':      Q**H * C       C * Q**H
-*>
-*> If VECT = 'P', ZUNMBR overwrites the general complex M-by-N matrix C
-*> with
-*>                 SIDE = 'L'     SIDE = 'R'
-*> TRANS = 'N':      P * C          C * P
-*> TRANS = 'C':      P**H * C       C * P**H
-*>
-*> Here Q and P**H are the unitary matrices determined by ZGEBRD when
-*> reducing a complex matrix A to bidiagonal form: A = Q * B * P**H. Q
-*> and P**H are defined as products of elementary reflectors H(i) and
-*> G(i) respectively.
-*>
-*> Let nq = m if SIDE = 'L' and nq = n if SIDE = 'R'. Thus nq is the
-*> order of the unitary matrix Q or P**H that is applied.
-*>
-*> If VECT = 'Q', A is assumed to have been an NQ-by-K matrix:
-*> if nq >= k, Q = H(1) H(2) . . . H(k);
-*> if nq < k, Q = H(1) H(2) . . . H(nq-1).
+*> ZTRTRI computes the inverse of a complex upper or lower triangular
+*> matrix A.
 *>
-*> If VECT = 'P', A is assumed to have been a K-by-NQ matrix:
-*> if k < nq, P = G(1) G(2) . . . G(k);
-*> if k >= nq, P = G(1) G(2) . . . G(nq-1).
+*> This is the Level 3 BLAS version of the algorithm.
 *> \endverbatim
 *
 *  Arguments:
 *  ==========
 *
-*> \param[in] VECT
-*> \verbatim
-*>          VECT is CHARACTER*1
-*>          = 'Q': apply Q or Q**H;
-*>          = 'P': apply P or P**H.
-*> \endverbatim
-*>
-*> \param[in] SIDE
-*> \verbatim
-*>          SIDE is CHARACTER*1
-*>          = 'L': apply Q, Q**H, P or P**H from the Left;
-*>          = 'R': apply Q, Q**H, P or P**H from the Right.
-*> \endverbatim
-*>
-*> \param[in] TRANS
+*> \param[in] UPLO
 *> \verbatim
-*>          TRANS is CHARACTER*1
-*>          = 'N':  No transpose, apply Q or P;
-*>          = 'C':  Conjugate transpose, apply Q**H or P**H.
+*>          UPLO is CHARACTER*1
+*>          = 'U':  A is upper triangular;
+*>          = 'L':  A is lower triangular.
 *> \endverbatim
 *>
-*> \param[in] M
+*> \param[in] DIAG
 *> \verbatim
-*>          M is INTEGER
-*>          The number of rows of the matrix C. M >= 0.
+*>          DIAG is CHARACTER*1
+*>          = 'N':  A is non-unit triangular;
+*>          = 'U':  A is unit triangular.
 *> \endverbatim
 *>
 *> \param[in] N
 *> \verbatim
 *>          N is INTEGER
-*>          The number of columns of the matrix C. N >= 0.
-*> \endverbatim
-*>
-*> \param[in] K
-*> \verbatim
-*>          K is INTEGER
-*>          If VECT = 'Q', the number of columns in the original
-*>          matrix reduced by ZGEBRD.
-*>          If VECT = 'P', the number of rows in the original
-*>          matrix reduced by ZGEBRD.
-*>          K >= 0.
+*>          The order of the matrix A.  N >= 0.
 *> \endverbatim
 *>
-*> \param[in] A
+*> \param[in,out] A
 *> \verbatim
-*>          A is COMPLEX*16 array, dimension
-*>                                (LDA,min(nq,K)) if VECT = 'Q'
-*>                                (LDA,nq)        if VECT = 'P'
-*>          The vectors which define the elementary reflectors H(i) and
-*>          G(i), whose products determine the matrices Q and P, as
-*>          returned by ZGEBRD.
+*>          A is COMPLEX*16 array, dimension (LDA,N)
+*>          On entry, the triangular matrix A.  If UPLO = 'U', the
+*>          leading N-by-N upper triangular part of the array A contains
+*>          the upper triangular matrix, and the strictly lower
+*>          triangular part of A is not referenced.  If UPLO = 'L', the
+*>          leading N-by-N lower triangular part of the array A contains
+*>          the lower triangular matrix, and the strictly upper
+*>          triangular part of A is not referenced.  If DIAG = 'U', the
+*>          diagonal elements of A are also not referenced and are
+*>          assumed to be 1.
+*>          On exit, the (triangular) inverse of the original matrix, in
+*>          the same storage format.
 *> \endverbatim
 *>
 *> \param[in] LDA
 *> \verbatim
 *>          LDA is INTEGER
-*>          The leading dimension of the array A.
-*>          If VECT = 'Q', LDA >= max(1,nq);
-*>          if VECT = 'P', LDA >= max(1,min(nq,K)).
-*> \endverbatim
-*>
-*> \param[in] TAU
-*> \verbatim
-*>          TAU is COMPLEX*16 array, dimension (min(nq,K))
-*>          TAU(i) must contain the scalar factor of the elementary
-*>          reflector H(i) or G(i) which determines Q or P, as returned
-*>          by ZGEBRD in the array argument TAUQ or TAUP.
-*> \endverbatim
-*>
-*> \param[in,out] C
-*> \verbatim
-*>          C is COMPLEX*16 array, dimension (LDC,N)
-*>          On entry, the M-by-N matrix C.
-*>          On exit, C is overwritten by Q*C or Q**H*C or C*Q**H or C*Q
-*>          or P*C or P**H*C or C*P or C*P**H.
-*> \endverbatim
-*>
-*> \param[in] LDC
-*> \verbatim
-*>          LDC is INTEGER
-*>          The leading dimension of the array C. LDC >= max(1,M).
-*> \endverbatim
-*>
-*> \param[out] WORK
-*> \verbatim
-*>          WORK is COMPLEX*16 array, dimension (MAX(1,LWORK))
-*>          On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
-*> \endverbatim
-*>
-*> \param[in] LWORK
-*> \verbatim
-*>          LWORK is INTEGER
-*>          The dimension of the array WORK.
-*>          If SIDE = 'L', LWORK >= max(1,N);
-*>          if SIDE = 'R', LWORK >= max(1,M);
-*>          if N = 0 or M = 0, LWORK >= 1.
-*>          For optimum performance LWORK >= max(1,N*NB) if SIDE = 'L',
-*>          and LWORK >= max(1,M*NB) if SIDE = 'R', where NB is the
-*>          optimal blocksize. (NB = 0 if M = 0 or N = 0.)
-*>
-*>          If LWORK = -1, then a workspace query is assumed; the routine
-*>          only calculates the optimal size of the WORK array, returns
-*>          this value as the first entry of the WORK array, and no error
-*>          message related to LWORK is issued by XERBLA.
+*>          The leading dimension of the array A.  LDA >= max(1,N).
 *> \endverbatim
 *>
 *> \param[out] INFO
 *> \verbatim
 *>          INFO is INTEGER
-*>          = 0:  successful exit
-*>          < 0:  if INFO = -i, the i-th argument had an illegal value
+*>          = 0: successful exit
+*>          < 0: if INFO = -i, the i-th argument had an illegal value
+*>          > 0: if INFO = i, A(i,i) is exactly zero.  The triangular
+*>               matrix is singular and its inverse can not be computed.
 *> \endverbatim
 *
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date November 2011
+*> \date December 2016
 *
 *> \ingroup complex16OTHERcomputational
 *
 *  =====================================================================
-      SUBROUTINE ZUNMBR( VECT, SIDE, TRANS, M, N, K, A, LDA, TAU, C,
-     $                   LDC, WORK, LWORK, INFO )
+      SUBROUTINE ZTRTRI( UPLO, DIAG, N, A, LDA, INFO )
 *
-*  -- LAPACK computational routine (version 3.4.0) --
+*  -- LAPACK computational routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     November 2011
+*     December 2016
 *
 *     .. Scalar Arguments ..
-      CHARACTER          SIDE, TRANS, VECT
-      INTEGER            INFO, K, LDA, LDC, LWORK, M, N
+      CHARACTER          DIAG, UPLO
+      INTEGER            INFO, LDA, N
 *     ..
 *     .. Array Arguments ..
-      COMPLEX*16         A( LDA, * ), C( LDC, * ), TAU( * ), WORK( * )
+      COMPLEX*16         A( LDA, * )
 *     ..
 *
 *  =====================================================================
 *
+*     .. Parameters ..
+      COMPLEX*16         ONE, ZERO
+      PARAMETER          ( ONE = ( 1.0D+0, 0.0D+0 ),
+     $                   ZERO = ( 0.0D+0, 0.0D+0 ) )
+*     ..
 *     .. Local Scalars ..
-      LOGICAL            APPLYQ, LEFT, LQUERY, NOTRAN
-      CHARACTER          TRANST
-      INTEGER            I1, I2, IINFO, LWKOPT, MI, NB, NI, NQ, NW
+      LOGICAL            NOUNIT, UPPER
+      INTEGER            J, JB, NB, NN
 *     ..
 *     .. External Functions ..
       LOGICAL            LSAME
@@ -30076,1223 +49935,851 @@
       EXTERNAL           LSAME, ILAENV
 *     ..
 *     .. External Subroutines ..
-      EXTERNAL           XERBLA, ZUNMLQ, ZUNMQR
+      EXTERNAL           XERBLA, ZTRMM, ZTRSM, ZTRTI2
 *     ..
 *     .. Intrinsic Functions ..
       INTRINSIC          MAX, MIN
 *     ..
 *     .. Executable Statements ..
 *
-*     Test the input arguments
+*     Test the input parameters.
 *
       INFO = 0
-      APPLYQ = LSAME( VECT, 'Q' )
-      LEFT = LSAME( SIDE, 'L' )
-      NOTRAN = LSAME( TRANS, 'N' )
-      LQUERY = ( LWORK.EQ.-1 )
-*
-*     NQ is the order of Q or P and NW is the minimum dimension of WORK
-*
-      IF( LEFT ) THEN
-         NQ = M
-         NW = N
-      ELSE
-         NQ = N
-         NW = M
-      END IF
-      IF( M.EQ.0 .OR. N.EQ.0 ) THEN
-         NW = 0
-      END IF
-      IF( .NOT.APPLYQ .AND. .NOT.LSAME( VECT, 'P' ) ) THEN
+      UPPER = LSAME( UPLO, 'U' )
+      NOUNIT = LSAME( DIAG, 'N' )
+      IF( .NOT.UPPER .AND. .NOT.LSAME( UPLO, 'L' ) ) THEN
          INFO = -1
-      ELSE IF( .NOT.LEFT .AND. .NOT.LSAME( SIDE, 'R' ) ) THEN
+      ELSE IF( .NOT.NOUNIT .AND. .NOT.LSAME( DIAG, 'U' ) ) THEN
          INFO = -2
-      ELSE IF( .NOT.NOTRAN .AND. .NOT.LSAME( TRANS, 'C' ) ) THEN
-         INFO = -3
-      ELSE IF( M.LT.0 ) THEN
-         INFO = -4
       ELSE IF( N.LT.0 ) THEN
+         INFO = -3
+      ELSE IF( LDA.LT.MAX( 1, N ) ) THEN
          INFO = -5
-      ELSE IF( K.LT.0 ) THEN
-         INFO = -6
-      ELSE IF( ( APPLYQ .AND. LDA.LT.MAX( 1, NQ ) ) .OR.
-     $         ( .NOT.APPLYQ .AND. LDA.LT.MAX( 1, MIN( NQ, K ) ) ) )
-     $          THEN
-         INFO = -8
-      ELSE IF( LDC.LT.MAX( 1, M ) ) THEN
-         INFO = -11
-      ELSE IF( LWORK.LT.MAX( 1, NW ) .AND. .NOT.LQUERY ) THEN
-         INFO = -13
-      END IF
-*
-      IF( INFO.EQ.0 ) THEN
-         IF( NW.GT.0 ) THEN
-            IF( APPLYQ ) THEN
-               IF( LEFT ) THEN
-                  NB = ILAENV( 1, 'ZUNMQR', SIDE // TRANS, M-1, N, M-1,
-     $                 -1 )
-               ELSE
-                  NB = ILAENV( 1, 'ZUNMQR', SIDE // TRANS, M, N-1, N-1,
-     $                 -1 )
-               END IF
-            ELSE
-               IF( LEFT ) THEN
-                  NB = ILAENV( 1, 'ZUNMLQ', SIDE // TRANS, M-1, N, M-1,
-     $                 -1 )
-               ELSE
-                  NB = ILAENV( 1, 'ZUNMLQ', SIDE // TRANS, M, N-1, N-1,
-     $                 -1 )
-               END IF
-            END IF
-            LWKOPT = MAX( 1, NW*NB )
-         ELSE
-            LWKOPT = 1
-         END IF
-         WORK( 1 ) = LWKOPT
       END IF
-*
       IF( INFO.NE.0 ) THEN
-         CALL XERBLA( 'ZUNMBR', -INFO )
-         RETURN
-      ELSE IF( LQUERY ) THEN
+         CALL XERBLA( 'ZTRTRI', -INFO )
          RETURN
       END IF
 *
 *     Quick return if possible
 *
-      IF( M.EQ.0 .OR. N.EQ.0 )
+      IF( N.EQ.0 )
      $   RETURN
 *
-      IF( APPLYQ ) THEN
-*
-*        Apply Q
+*     Check for singularity if non-unit.
 *
-         IF( NQ.GE.K ) THEN
+      IF( NOUNIT ) THEN
+         DO 10 INFO = 1, N
+            IF( A( INFO, INFO ).EQ.ZERO )
+     $         RETURN
+   10    CONTINUE
+         INFO = 0
+      END IF
 *
-*           Q was determined by a call to ZGEBRD with nq >= k
+*     Determine the block size for this environment.
 *
-            CALL ZUNMQR( SIDE, TRANS, M, N, K, A, LDA, TAU, C, LDC,
-     $                   WORK, LWORK, IINFO )
-         ELSE IF( NQ.GT.1 ) THEN
+      NB = ILAENV( 1, 'ZTRTRI', UPLO // DIAG, N, -1, -1, -1 )
+      IF( NB.LE.1 .OR. NB.GE.N ) THEN
 *
-*           Q was determined by a call to ZGEBRD with nq < k
+*        Use unblocked code
 *
-            IF( LEFT ) THEN
-               MI = M - 1
-               NI = N
-               I1 = 2
-               I2 = 1
-            ELSE
-               MI = M
-               NI = N - 1
-               I1 = 1
-               I2 = 2
-            END IF
-            CALL ZUNMQR( SIDE, TRANS, MI, NI, NQ-1, A( 2, 1 ), LDA, TAU,
-     $                   C( I1, I2 ), LDC, WORK, LWORK, IINFO )
-         END IF
+         CALL ZTRTI2( UPLO, DIAG, N, A, LDA, INFO )
       ELSE
 *
-*        Apply P
+*        Use blocked code
+*
+         IF( UPPER ) THEN
+*
+*           Compute inverse of upper triangular matrix
 *
-         IF( NOTRAN ) THEN
-            TRANST = 'C'
+            DO 20 J = 1, N, NB
+               JB = MIN( NB, N-J+1 )
+*
+*              Compute rows 1:j-1 of current block column
+*
+               CALL ZTRMM( 'Left', 'Upper', 'No transpose', DIAG, J-1,
+     $                     JB, ONE, A, LDA, A( 1, J ), LDA )
+               CALL ZTRSM( 'Right', 'Upper', 'No transpose', DIAG, J-1,
+     $                     JB, -ONE, A( J, J ), LDA, A( 1, J ), LDA )
+*
+*              Compute inverse of current diagonal block
+*
+               CALL ZTRTI2( 'Upper', DIAG, JB, A( J, J ), LDA, INFO )
+   20       CONTINUE
          ELSE
-            TRANST = 'N'
-         END IF
-         IF( NQ.GT.K ) THEN
 *
-*           P was determined by a call to ZGEBRD with nq > k
+*           Compute inverse of lower triangular matrix
 *
-            CALL ZUNMLQ( SIDE, TRANST, M, N, K, A, LDA, TAU, C, LDC,
-     $                   WORK, LWORK, IINFO )
-         ELSE IF( NQ.GT.1 ) THEN
+            NN = ( ( N-1 ) / NB )*NB + 1
+            DO 30 J = NN, 1, -NB
+               JB = MIN( NB, N-J+1 )
+               IF( J+JB.LE.N ) THEN
 *
-*           P was determined by a call to ZGEBRD with nq <= k
+*                 Compute rows j+jb:n of current block column
 *
-            IF( LEFT ) THEN
-               MI = M - 1
-               NI = N
-               I1 = 2
-               I2 = 1
-            ELSE
-               MI = M
-               NI = N - 1
-               I1 = 1
-               I2 = 2
-            END IF
-            CALL ZUNMLQ( SIDE, TRANST, MI, NI, NQ-1, A( 1, 2 ), LDA,
-     $                   TAU, C( I1, I2 ), LDC, WORK, LWORK, IINFO )
+                  CALL ZTRMM( 'Left', 'Lower', 'No transpose', DIAG,
+     $                        N-J-JB+1, JB, ONE, A( J+JB, J+JB ), LDA,
+     $                        A( J+JB, J ), LDA )
+                  CALL ZTRSM( 'Right', 'Lower', 'No transpose', DIAG,
+     $                        N-J-JB+1, JB, -ONE, A( J, J ), LDA,
+     $                        A( J+JB, J ), LDA )
+               END IF
+*
+*              Compute inverse of current diagonal block
+*
+               CALL ZTRTI2( 'Lower', DIAG, JB, A( J, J ), LDA, INFO )
+   30       CONTINUE
          END IF
       END IF
-      WORK( 1 ) = LWKOPT
+*
       RETURN
 *
-*     End of ZUNMBR
+*     End of ZTRTRI
 *
       END
-*> \brief \b ZUNMHR
+*> \brief \b ZTRTRS
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download ZUNMHR + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/zunmhr.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/zunmhr.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/zunmhr.f"> 
+*> Download ZTRTRS + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/ztrtrs.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/ztrtrs.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/ztrtrs.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
-*       SUBROUTINE ZUNMHR( SIDE, TRANS, M, N, ILO, IHI, A, LDA, TAU, C,
-*                          LDC, WORK, LWORK, INFO )
-* 
+*       SUBROUTINE ZTRTRS( UPLO, TRANS, DIAG, N, NRHS, A, LDA, B, LDB,
+*                          INFO )
+*
 *       .. Scalar Arguments ..
-*       CHARACTER          SIDE, TRANS
-*       INTEGER            IHI, ILO, INFO, LDA, LDC, LWORK, M, N
+*       CHARACTER          DIAG, TRANS, UPLO
+*       INTEGER            INFO, LDA, LDB, N, NRHS
 *       ..
 *       .. Array Arguments ..
-*       COMPLEX*16         A( LDA, * ), C( LDC, * ), TAU( * ), WORK( * )
+*       COMPLEX*16         A( LDA, * ), B( LDB, * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
 *>
 *> \verbatim
 *>
-*> ZUNMHR overwrites the general complex M-by-N matrix C with
-*>
-*>                 SIDE = 'L'     SIDE = 'R'
-*> TRANS = 'N':      Q * C          C * Q
-*> TRANS = 'C':      Q**H * C       C * Q**H
+*> ZTRTRS solves a triangular system of the form
 *>
-*> where Q is a complex unitary matrix of order nq, with nq = m if
-*> SIDE = 'L' and nq = n if SIDE = 'R'. Q is defined as the product of
-*> IHI-ILO elementary reflectors, as returned by ZGEHRD:
+*>    A * X = B,  A**T * X = B,  or  A**H * X = B,
 *>
-*> Q = H(ilo) H(ilo+1) . . . H(ihi-1).
+*> where A is a triangular matrix of order N, and B is an N-by-NRHS
+*> matrix.  A check is made to verify that A is nonsingular.
 *> \endverbatim
 *
 *  Arguments:
 *  ==========
 *
-*> \param[in] SIDE
+*> \param[in] UPLO
 *> \verbatim
-*>          SIDE is CHARACTER*1
-*>          = 'L': apply Q or Q**H from the Left;
-*>          = 'R': apply Q or Q**H from the Right.
+*>          UPLO is CHARACTER*1
+*>          = 'U':  A is upper triangular;
+*>          = 'L':  A is lower triangular.
 *> \endverbatim
 *>
 *> \param[in] TRANS
 *> \verbatim
 *>          TRANS is CHARACTER*1
-*>          = 'N': apply Q  (No transpose)
-*>          = 'C': apply Q**H (Conjugate transpose)
+*>          Specifies the form of the system of equations:
+*>          = 'N':  A * X = B     (No transpose)
+*>          = 'T':  A**T * X = B  (Transpose)
+*>          = 'C':  A**H * X = B  (Conjugate transpose)
 *> \endverbatim
 *>
-*> \param[in] M
+*> \param[in] DIAG
 *> \verbatim
-*>          M is INTEGER
-*>          The number of rows of the matrix C. M >= 0.
+*>          DIAG is CHARACTER*1
+*>          = 'N':  A is non-unit triangular;
+*>          = 'U':  A is unit triangular.
 *> \endverbatim
 *>
 *> \param[in] N
 *> \verbatim
 *>          N is INTEGER
-*>          The number of columns of the matrix C. N >= 0.
-*> \endverbatim
-*>
-*> \param[in] ILO
-*> \verbatim
-*>          ILO is INTEGER
+*>          The order of the matrix A.  N >= 0.
 *> \endverbatim
 *>
-*> \param[in] IHI
+*> \param[in] NRHS
 *> \verbatim
-*>          IHI is INTEGER
-*>
-*>          ILO and IHI must have the same values as in the previous call
-*>          of ZGEHRD. Q is equal to the unit matrix except in the
-*>          submatrix Q(ilo+1:ihi,ilo+1:ihi).
-*>          If SIDE = 'L', then 1 <= ILO <= IHI <= M, if M > 0, and
-*>          ILO = 1 and IHI = 0, if M = 0;
-*>          if SIDE = 'R', then 1 <= ILO <= IHI <= N, if N > 0, and
-*>          ILO = 1 and IHI = 0, if N = 0.
+*>          NRHS is INTEGER
+*>          The number of right hand sides, i.e., the number of columns
+*>          of the matrix B.  NRHS >= 0.
 *> \endverbatim
 *>
 *> \param[in] A
 *> \verbatim
-*>          A is COMPLEX*16 array, dimension
-*>                               (LDA,M) if SIDE = 'L'
-*>                               (LDA,N) if SIDE = 'R'
-*>          The vectors which define the elementary reflectors, as
-*>          returned by ZGEHRD.
+*>          A is COMPLEX*16 array, dimension (LDA,N)
+*>          The triangular matrix A.  If UPLO = 'U', the leading N-by-N
+*>          upper triangular part of the array A contains the upper
+*>          triangular matrix, and the strictly lower triangular part of
+*>          A is not referenced.  If UPLO = 'L', the leading N-by-N lower
+*>          triangular part of the array A contains the lower triangular
+*>          matrix, and the strictly upper triangular part of A is not
+*>          referenced.  If DIAG = 'U', the diagonal elements of A are
+*>          also not referenced and are assumed to be 1.
 *> \endverbatim
 *>
 *> \param[in] LDA
 *> \verbatim
 *>          LDA is INTEGER
-*>          The leading dimension of the array A.
-*>          LDA >= max(1,M) if SIDE = 'L'; LDA >= max(1,N) if SIDE = 'R'.
-*> \endverbatim
-*>
-*> \param[in] TAU
-*> \verbatim
-*>          TAU is COMPLEX*16 array, dimension
-*>                               (M-1) if SIDE = 'L'
-*>                               (N-1) if SIDE = 'R'
-*>          TAU(i) must contain the scalar factor of the elementary
-*>          reflector H(i), as returned by ZGEHRD.
-*> \endverbatim
-*>
-*> \param[in,out] C
-*> \verbatim
-*>          C is COMPLEX*16 array, dimension (LDC,N)
-*>          On entry, the M-by-N matrix C.
-*>          On exit, C is overwritten by Q*C or Q**H*C or C*Q**H or C*Q.
-*> \endverbatim
-*>
-*> \param[in] LDC
-*> \verbatim
-*>          LDC is INTEGER
-*>          The leading dimension of the array C. LDC >= max(1,M).
+*>          The leading dimension of the array A.  LDA >= max(1,N).
 *> \endverbatim
 *>
-*> \param[out] WORK
+*> \param[in,out] B
 *> \verbatim
-*>          WORK is COMPLEX*16 array, dimension (MAX(1,LWORK))
-*>          On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+*>          B is COMPLEX*16 array, dimension (LDB,NRHS)
+*>          On entry, the right hand side matrix B.
+*>          On exit, if INFO = 0, the solution matrix X.
 *> \endverbatim
 *>
-*> \param[in] LWORK
+*> \param[in] LDB
 *> \verbatim
-*>          LWORK is INTEGER
-*>          The dimension of the array WORK.
-*>          If SIDE = 'L', LWORK >= max(1,N);
-*>          if SIDE = 'R', LWORK >= max(1,M).
-*>          For optimum performance LWORK >= N*NB if SIDE = 'L', and
-*>          LWORK >= M*NB if SIDE = 'R', where NB is the optimal
-*>          blocksize.
-*>
-*>          If LWORK = -1, then a workspace query is assumed; the routine
-*>          only calculates the optimal size of the WORK array, returns
-*>          this value as the first entry of the WORK array, and no error
-*>          message related to LWORK is issued by XERBLA.
+*>          LDB is INTEGER
+*>          The leading dimension of the array B.  LDB >= max(1,N).
 *> \endverbatim
 *>
 *> \param[out] INFO
 *> \verbatim
 *>          INFO is INTEGER
 *>          = 0:  successful exit
-*>          < 0:  if INFO = -i, the i-th argument had an illegal value
+*>          < 0: if INFO = -i, the i-th argument had an illegal value
+*>          > 0: if INFO = i, the i-th diagonal element of A is zero,
+*>               indicating that the matrix is singular and the solutions
+*>               X have not been computed.
 *> \endverbatim
 *
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date November 2011
+*> \date December 2016
 *
 *> \ingroup complex16OTHERcomputational
 *
 *  =====================================================================
-      SUBROUTINE ZUNMHR( SIDE, TRANS, M, N, ILO, IHI, A, LDA, TAU, C,
-     $                   LDC, WORK, LWORK, INFO )
+      SUBROUTINE ZTRTRS( UPLO, TRANS, DIAG, N, NRHS, A, LDA, B, LDB,
+     $                   INFO )
 *
-*  -- LAPACK computational routine (version 3.4.0) --
+*  -- LAPACK computational routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     November 2011
+*     December 2016
 *
 *     .. Scalar Arguments ..
-      CHARACTER          SIDE, TRANS
-      INTEGER            IHI, ILO, INFO, LDA, LDC, LWORK, M, N
+      CHARACTER          DIAG, TRANS, UPLO
+      INTEGER            INFO, LDA, LDB, N, NRHS
 *     ..
 *     .. Array Arguments ..
-      COMPLEX*16         A( LDA, * ), C( LDC, * ), TAU( * ), WORK( * )
+      COMPLEX*16         A( LDA, * ), B( LDB, * )
 *     ..
 *
 *  =====================================================================
 *
+*     .. Parameters ..
+      COMPLEX*16         ZERO, ONE
+      PARAMETER          ( ZERO = ( 0.0D+0, 0.0D+0 ),
+     $                   ONE = ( 1.0D+0, 0.0D+0 ) )
+*     ..
 *     .. Local Scalars ..
-      LOGICAL            LEFT, LQUERY
-      INTEGER            I1, I2, IINFO, LWKOPT, MI, NB, NH, NI, NQ, NW
+      LOGICAL            NOUNIT
 *     ..
 *     .. External Functions ..
       LOGICAL            LSAME
-      INTEGER            ILAENV
-      EXTERNAL           LSAME, ILAENV
+      EXTERNAL           LSAME
 *     ..
 *     .. External Subroutines ..
-      EXTERNAL           XERBLA, ZUNMQR
+      EXTERNAL           XERBLA, ZTRSM
 *     ..
 *     .. Intrinsic Functions ..
-      INTRINSIC          MAX, MIN
+      INTRINSIC          MAX
 *     ..
 *     .. Executable Statements ..
 *
-*     Test the input arguments
+*     Test the input parameters.
 *
       INFO = 0
-      NH = IHI - ILO
-      LEFT = LSAME( SIDE, 'L' )
-      LQUERY = ( LWORK.EQ.-1 )
-*
-*     NQ is the order of Q and NW is the minimum dimension of WORK
-*
-      IF( LEFT ) THEN
-         NQ = M
-         NW = N
-      ELSE
-         NQ = N
-         NW = M
-      END IF
-      IF( .NOT.LEFT .AND. .NOT.LSAME( SIDE, 'R' ) ) THEN
+      NOUNIT = LSAME( DIAG, 'N' )
+      IF( .NOT.LSAME( UPLO, 'U' ) .AND. .NOT.LSAME( UPLO, 'L' ) ) THEN
          INFO = -1
-      ELSE IF( .NOT.LSAME( TRANS, 'N' ) .AND. .NOT.LSAME( TRANS, 'C' ) )
-     $          THEN
+      ELSE IF( .NOT.LSAME( TRANS, 'N' ) .AND. .NOT.
+     $         LSAME( TRANS, 'T' ) .AND. .NOT.LSAME( TRANS, 'C' ) ) THEN
          INFO = -2
-      ELSE IF( M.LT.0 ) THEN
+      ELSE IF( .NOT.NOUNIT .AND. .NOT.LSAME( DIAG, 'U' ) ) THEN
          INFO = -3
       ELSE IF( N.LT.0 ) THEN
          INFO = -4
-      ELSE IF( ILO.LT.1 .OR. ILO.GT.MAX( 1, NQ ) ) THEN
+      ELSE IF( NRHS.LT.0 ) THEN
          INFO = -5
-      ELSE IF( IHI.LT.MIN( ILO, NQ ) .OR. IHI.GT.NQ ) THEN
-         INFO = -6
-      ELSE IF( LDA.LT.MAX( 1, NQ ) ) THEN
-         INFO = -8
-      ELSE IF( LDC.LT.MAX( 1, M ) ) THEN
-         INFO = -11
-      ELSE IF( LWORK.LT.MAX( 1, NW ) .AND. .NOT.LQUERY ) THEN
-         INFO = -13
-      END IF
-*
-      IF( INFO.EQ.0 ) THEN
-         IF( LEFT ) THEN
-            NB = ILAENV( 1, 'ZUNMQR', SIDE // TRANS, NH, N, NH, -1 )
-         ELSE
-            NB = ILAENV( 1, 'ZUNMQR', SIDE // TRANS, M, NH, NH, -1 )
-         END IF
-         LWKOPT = MAX( 1, NW )*NB
-         WORK( 1 ) = LWKOPT
+      ELSE IF( LDA.LT.MAX( 1, N ) ) THEN
+         INFO = -7
+      ELSE IF( LDB.LT.MAX( 1, N ) ) THEN
+         INFO = -9
       END IF
-*
       IF( INFO.NE.0 ) THEN
-         CALL XERBLA( 'ZUNMHR', -INFO )
-         RETURN
-      ELSE IF( LQUERY ) THEN
+         CALL XERBLA( 'ZTRTRS', -INFO )
          RETURN
       END IF
 *
 *     Quick return if possible
 *
-      IF( M.EQ.0 .OR. N.EQ.0 .OR. NH.EQ.0 ) THEN
-         WORK( 1 ) = 1
-         RETURN
-      END IF
+      IF( N.EQ.0 )
+     $   RETURN
 *
-      IF( LEFT ) THEN
-         MI = NH
-         NI = N
-         I1 = ILO + 1
-         I2 = 1
-      ELSE
-         MI = M
-         NI = NH
-         I1 = 1
-         I2 = ILO + 1
+*     Check for singularity.
+*
+      IF( NOUNIT ) THEN
+         DO 10 INFO = 1, N
+            IF( A( INFO, INFO ).EQ.ZERO )
+     $         RETURN
+   10    CONTINUE
       END IF
+      INFO = 0
 *
-      CALL ZUNMQR( SIDE, TRANS, MI, NI, NH, A( ILO+1, ILO ), LDA,
-     $             TAU( ILO ), C( I1, I2 ), LDC, WORK, LWORK, IINFO )
+*     Solve A * x = b,  A**T * x = b,  or  A**H * x = b.
+*
+      CALL ZTRSM( 'Left', UPLO, TRANS, DIAG, N, NRHS, ONE, A, LDA, B,
+     $            LDB )
 *
-      WORK( 1 ) = LWKOPT
       RETURN
 *
-*     End of ZUNMHR
+*     End of ZTRTRS
 *
       END
-*> \brief \b ZUNML2 multiplies a general matrix by the unitary matrix from a LQ factorization determined by cgelqf (unblocked algorithm).
+*> \brief \b ZUNG2L generates all or part of the unitary matrix Q from a QL factorization determined by cgeqlf (unblocked algorithm).
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download ZUNML2 + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/zunml2.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/zunml2.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/zunml2.f"> 
+*> Download ZUNG2L + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/zung2l.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/zung2l.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/zung2l.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
-*       SUBROUTINE ZUNML2( SIDE, TRANS, M, N, K, A, LDA, TAU, C, LDC,
-*                          WORK, INFO )
-* 
+*       SUBROUTINE ZUNG2L( M, N, K, A, LDA, TAU, WORK, INFO )
+*
 *       .. Scalar Arguments ..
-*       CHARACTER          SIDE, TRANS
-*       INTEGER            INFO, K, LDA, LDC, M, N
+*       INTEGER            INFO, K, LDA, M, N
 *       ..
 *       .. Array Arguments ..
-*       COMPLEX*16         A( LDA, * ), C( LDC, * ), TAU( * ), WORK( * )
+*       COMPLEX*16         A( LDA, * ), TAU( * ), WORK( * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
 *>
 *> \verbatim
 *>
-*> ZUNML2 overwrites the general complex m-by-n matrix C with
-*>
-*>       Q * C  if SIDE = 'L' and TRANS = 'N', or
-*>
-*>       Q**H* C  if SIDE = 'L' and TRANS = 'C', or
-*>
-*>       C * Q  if SIDE = 'R' and TRANS = 'N', or
-*>
-*>       C * Q**H if SIDE = 'R' and TRANS = 'C',
-*>
-*> where Q is a complex unitary matrix defined as the product of k
-*> elementary reflectors
+*> ZUNG2L generates an m by n complex matrix Q with orthonormal columns,
+*> which is defined as the last n columns of a product of k elementary
+*> reflectors of order m
 *>
-*>       Q = H(k)**H . . . H(2)**H H(1)**H
+*>       Q  =  H(k) . . . H(2) H(1)
 *>
-*> as returned by ZGELQF. Q is of order m if SIDE = 'L' and of order n
-*> if SIDE = 'R'.
+*> as returned by ZGEQLF.
 *> \endverbatim
 *
 *  Arguments:
 *  ==========
 *
-*> \param[in] SIDE
-*> \verbatim
-*>          SIDE is CHARACTER*1
-*>          = 'L': apply Q or Q**H from the Left
-*>          = 'R': apply Q or Q**H from the Right
-*> \endverbatim
-*>
-*> \param[in] TRANS
-*> \verbatim
-*>          TRANS is CHARACTER*1
-*>          = 'N': apply Q  (No transpose)
-*>          = 'C': apply Q**H (Conjugate transpose)
-*> \endverbatim
-*>
 *> \param[in] M
 *> \verbatim
 *>          M is INTEGER
-*>          The number of rows of the matrix C. M >= 0.
+*>          The number of rows of the matrix Q. M >= 0.
 *> \endverbatim
 *>
 *> \param[in] N
 *> \verbatim
 *>          N is INTEGER
-*>          The number of columns of the matrix C. N >= 0.
+*>          The number of columns of the matrix Q. M >= N >= 0.
 *> \endverbatim
 *>
 *> \param[in] K
 *> \verbatim
 *>          K is INTEGER
-*>          The number of elementary reflectors whose product defines
-*>          the matrix Q.
-*>          If SIDE = 'L', M >= K >= 0;
-*>          if SIDE = 'R', N >= K >= 0.
+*>          The number of elementary reflectors whose product defines the
+*>          matrix Q. N >= K >= 0.
 *> \endverbatim
 *>
-*> \param[in] A
+*> \param[in,out] A
 *> \verbatim
-*>          A is COMPLEX*16 array, dimension
-*>                               (LDA,M) if SIDE = 'L',
-*>                               (LDA,N) if SIDE = 'R'
-*>          The i-th row must contain the vector which defines the
-*>          elementary reflector H(i), for i = 1,2,...,k, as returned by
-*>          ZGELQF in the first k rows of its array argument A.
-*>          A is modified by the routine but restored on exit.
+*>          A is COMPLEX*16 array, dimension (LDA,N)
+*>          On entry, the (n-k+i)-th column must contain the vector which
+*>          defines the elementary reflector H(i), for i = 1,2,...,k, as
+*>          returned by ZGEQLF in the last k columns of its array
+*>          argument A.
+*>          On exit, the m-by-n matrix Q.
 *> \endverbatim
 *>
 *> \param[in] LDA
 *> \verbatim
 *>          LDA is INTEGER
-*>          The leading dimension of the array A. LDA >= max(1,K).
+*>          The first dimension of the array A. LDA >= max(1,M).
 *> \endverbatim
 *>
 *> \param[in] TAU
 *> \verbatim
 *>          TAU is COMPLEX*16 array, dimension (K)
 *>          TAU(i) must contain the scalar factor of the elementary
-*>          reflector H(i), as returned by ZGELQF.
-*> \endverbatim
-*>
-*> \param[in,out] C
-*> \verbatim
-*>          C is COMPLEX*16 array, dimension (LDC,N)
-*>          On entry, the m-by-n matrix C.
-*>          On exit, C is overwritten by Q*C or Q**H*C or C*Q**H or C*Q.
-*> \endverbatim
-*>
-*> \param[in] LDC
-*> \verbatim
-*>          LDC is INTEGER
-*>          The leading dimension of the array C. LDC >= max(1,M).
+*>          reflector H(i), as returned by ZGEQLF.
 *> \endverbatim
 *>
 *> \param[out] WORK
 *> \verbatim
-*>          WORK is COMPLEX*16 array, dimension
-*>                                   (N) if SIDE = 'L',
-*>                                   (M) if SIDE = 'R'
+*>          WORK is COMPLEX*16 array, dimension (N)
 *> \endverbatim
 *>
 *> \param[out] INFO
 *> \verbatim
 *>          INFO is INTEGER
 *>          = 0: successful exit
-*>          < 0: if INFO = -i, the i-th argument had an illegal value
+*>          < 0: if INFO = -i, the i-th argument has an illegal value
 *> \endverbatim
 *
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date September 2012
+*> \date December 2016
 *
 *> \ingroup complex16OTHERcomputational
 *
 *  =====================================================================
-      SUBROUTINE ZUNML2( SIDE, TRANS, M, N, K, A, LDA, TAU, C, LDC,
-     $                   WORK, INFO )
+      SUBROUTINE ZUNG2L( M, N, K, A, LDA, TAU, WORK, INFO )
 *
-*  -- LAPACK computational routine (version 3.4.2) --
+*  -- LAPACK computational routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     September 2012
+*     December 2016
 *
 *     .. Scalar Arguments ..
-      CHARACTER          SIDE, TRANS
-      INTEGER            INFO, K, LDA, LDC, M, N
+      INTEGER            INFO, K, LDA, M, N
 *     ..
 *     .. Array Arguments ..
-      COMPLEX*16         A( LDA, * ), C( LDC, * ), TAU( * ), WORK( * )
+      COMPLEX*16         A( LDA, * ), TAU( * ), WORK( * )
 *     ..
 *
 *  =====================================================================
 *
 *     .. Parameters ..
-      COMPLEX*16         ONE
-      PARAMETER          ( ONE = ( 1.0D+0, 0.0D+0 ) )
+      COMPLEX*16         ONE, ZERO
+      PARAMETER          ( ONE = ( 1.0D+0, 0.0D+0 ),
+     $                   ZERO = ( 0.0D+0, 0.0D+0 ) )
 *     ..
 *     .. Local Scalars ..
-      LOGICAL            LEFT, NOTRAN
-      INTEGER            I, I1, I2, I3, IC, JC, MI, NI, NQ
-      COMPLEX*16         AII, TAUI
-*     ..
-*     .. External Functions ..
-      LOGICAL            LSAME
-      EXTERNAL           LSAME
+      INTEGER            I, II, J, L
 *     ..
 *     .. External Subroutines ..
-      EXTERNAL           XERBLA, ZLACGV, ZLARF
+      EXTERNAL           XERBLA, ZLARF, ZSCAL
 *     ..
 *     .. Intrinsic Functions ..
-      INTRINSIC          DCONJG, MAX
+      INTRINSIC          MAX
 *     ..
 *     .. Executable Statements ..
 *
 *     Test the input arguments
 *
       INFO = 0
-      LEFT = LSAME( SIDE, 'L' )
-      NOTRAN = LSAME( TRANS, 'N' )
-*
-*     NQ is the order of Q
-*
-      IF( LEFT ) THEN
-         NQ = M
-      ELSE
-         NQ = N
-      END IF
-      IF( .NOT.LEFT .AND. .NOT.LSAME( SIDE, 'R' ) ) THEN
+      IF( M.LT.0 ) THEN
          INFO = -1
-      ELSE IF( .NOT.NOTRAN .AND. .NOT.LSAME( TRANS, 'C' ) ) THEN
+      ELSE IF( N.LT.0 .OR. N.GT.M ) THEN
          INFO = -2
-      ELSE IF( M.LT.0 ) THEN
+      ELSE IF( K.LT.0 .OR. K.GT.N ) THEN
          INFO = -3
-      ELSE IF( N.LT.0 ) THEN
-         INFO = -4
-      ELSE IF( K.LT.0 .OR. K.GT.NQ ) THEN
+      ELSE IF( LDA.LT.MAX( 1, M ) ) THEN
          INFO = -5
-      ELSE IF( LDA.LT.MAX( 1, K ) ) THEN
-         INFO = -7
-      ELSE IF( LDC.LT.MAX( 1, M ) ) THEN
-         INFO = -10
       END IF
       IF( INFO.NE.0 ) THEN
-         CALL XERBLA( 'ZUNML2', -INFO )
+         CALL XERBLA( 'ZUNG2L', -INFO )
          RETURN
       END IF
 *
 *     Quick return if possible
 *
-      IF( M.EQ.0 .OR. N.EQ.0 .OR. K.EQ.0 )
+      IF( N.LE.0 )
      $   RETURN
 *
-      IF( ( LEFT .AND. NOTRAN .OR. .NOT.LEFT .AND. .NOT.NOTRAN ) ) THEN
-         I1 = 1
-         I2 = K
-         I3 = 1
-      ELSE
-         I1 = K
-         I2 = 1
-         I3 = -1
-      END IF
-*
-      IF( LEFT ) THEN
-         NI = N
-         JC = 1
-      ELSE
-         MI = M
-         IC = 1
-      END IF
-*
-      DO 10 I = I1, I2, I3
-         IF( LEFT ) THEN
+*     Initialise columns 1:n-k to columns of the unit matrix
 *
-*           H(i) or H(i)**H is applied to C(i:m,1:n)
+      DO 20 J = 1, N - K
+         DO 10 L = 1, M
+            A( L, J ) = ZERO
+   10    CONTINUE
+         A( M-N+J, J ) = ONE
+   20 CONTINUE
 *
-            MI = M - I + 1
-            IC = I
-         ELSE
+      DO 40 I = 1, K
+         II = N - K + I
 *
-*           H(i) or H(i)**H is applied to C(1:m,i:n)
+*        Apply H(i) to A(1:m-k+i,1:n-k+i) from the left
 *
-            NI = N - I + 1
-            JC = I
-         END IF
+         A( M-N+II, II ) = ONE
+         CALL ZLARF( 'Left', M-N+II, II-1, A( 1, II ), 1, TAU( I ), A,
+     $               LDA, WORK )
+         CALL ZSCAL( M-N+II-1, -TAU( I ), A( 1, II ), 1 )
+         A( M-N+II, II ) = ONE - TAU( I )
 *
-*        Apply H(i) or H(i)**H
+*        Set A(m-k+i+1:m,n-k+i) to zero
 *
-         IF( NOTRAN ) THEN
-            TAUI = DCONJG( TAU( I ) )
-         ELSE
-            TAUI = TAU( I )
-         END IF
-         IF( I.LT.NQ )
-     $      CALL ZLACGV( NQ-I, A( I, I+1 ), LDA )
-         AII = A( I, I )
-         A( I, I ) = ONE
-         CALL ZLARF( SIDE, MI, NI, A( I, I ), LDA, TAUI, C( IC, JC ),
-     $               LDC, WORK )
-         A( I, I ) = AII
-         IF( I.LT.NQ )
-     $      CALL ZLACGV( NQ-I, A( I, I+1 ), LDA )
-   10 CONTINUE
+         DO 30 L = M - N + II + 1, M
+            A( L, II ) = ZERO
+   30    CONTINUE
+   40 CONTINUE
       RETURN
 *
-*     End of ZUNML2
+*     End of ZUNG2L
 *
       END
-*> \brief \b ZUNMLQ
+*> \brief \b ZUNG2R
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download ZUNMLQ + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/zunmlq.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/zunmlq.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/zunmlq.f"> 
+*> Download ZUNG2R + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/zung2r.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/zung2r.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/zung2r.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
-*       SUBROUTINE ZUNMLQ( SIDE, TRANS, M, N, K, A, LDA, TAU, C, LDC,
-*                          WORK, LWORK, INFO )
-* 
+*       SUBROUTINE ZUNG2R( M, N, K, A, LDA, TAU, WORK, INFO )
+*
 *       .. Scalar Arguments ..
-*       CHARACTER          SIDE, TRANS
-*       INTEGER            INFO, K, LDA, LDC, LWORK, M, N
+*       INTEGER            INFO, K, LDA, M, N
 *       ..
 *       .. Array Arguments ..
-*       COMPLEX*16         A( LDA, * ), C( LDC, * ), TAU( * ), WORK( * )
+*       COMPLEX*16         A( LDA, * ), TAU( * ), WORK( * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
 *>
 *> \verbatim
 *>
-*> ZUNMLQ overwrites the general complex M-by-N matrix C with
-*>
-*>                 SIDE = 'L'     SIDE = 'R'
-*> TRANS = 'N':      Q * C          C * Q
-*> TRANS = 'C':      Q**H * C       C * Q**H
-*>
-*> where Q is a complex unitary matrix defined as the product of k
-*> elementary reflectors
+*> ZUNG2R generates an m by n complex matrix Q with orthonormal columns,
+*> which is defined as the first n columns of a product of k elementary
+*> reflectors of order m
 *>
-*>       Q = H(k)**H . . . H(2)**H H(1)**H
+*>       Q  =  H(1) H(2) . . . H(k)
 *>
-*> as returned by ZGELQF. Q is of order M if SIDE = 'L' and of order N
-*> if SIDE = 'R'.
+*> as returned by ZGEQRF.
 *> \endverbatim
 *
 *  Arguments:
 *  ==========
 *
-*> \param[in] SIDE
-*> \verbatim
-*>          SIDE is CHARACTER*1
-*>          = 'L': apply Q or Q**H from the Left;
-*>          = 'R': apply Q or Q**H from the Right.
-*> \endverbatim
-*>
-*> \param[in] TRANS
-*> \verbatim
-*>          TRANS is CHARACTER*1
-*>          = 'N':  No transpose, apply Q;
-*>          = 'C':  Conjugate transpose, apply Q**H.
-*> \endverbatim
-*>
 *> \param[in] M
 *> \verbatim
 *>          M is INTEGER
-*>          The number of rows of the matrix C. M >= 0.
+*>          The number of rows of the matrix Q. M >= 0.
 *> \endverbatim
 *>
 *> \param[in] N
 *> \verbatim
 *>          N is INTEGER
-*>          The number of columns of the matrix C. N >= 0.
+*>          The number of columns of the matrix Q. M >= N >= 0.
 *> \endverbatim
 *>
 *> \param[in] K
 *> \verbatim
 *>          K is INTEGER
-*>          The number of elementary reflectors whose product defines
-*>          the matrix Q.
-*>          If SIDE = 'L', M >= K >= 0;
-*>          if SIDE = 'R', N >= K >= 0.
+*>          The number of elementary reflectors whose product defines the
+*>          matrix Q. N >= K >= 0.
 *> \endverbatim
 *>
-*> \param[in] A
+*> \param[in,out] A
 *> \verbatim
-*>          A is COMPLEX*16 array, dimension
-*>                               (LDA,M) if SIDE = 'L',
-*>                               (LDA,N) if SIDE = 'R'
-*>          The i-th row must contain the vector which defines the
-*>          elementary reflector H(i), for i = 1,2,...,k, as returned by
-*>          ZGELQF in the first k rows of its array argument A.
+*>          A is COMPLEX*16 array, dimension (LDA,N)
+*>          On entry, the i-th column must contain the vector which
+*>          defines the elementary reflector H(i), for i = 1,2,...,k, as
+*>          returned by ZGEQRF in the first k columns of its array
+*>          argument A.
+*>          On exit, the m by n matrix Q.
 *> \endverbatim
 *>
 *> \param[in] LDA
 *> \verbatim
 *>          LDA is INTEGER
-*>          The leading dimension of the array A. LDA >= max(1,K).
+*>          The first dimension of the array A. LDA >= max(1,M).
 *> \endverbatim
 *>
 *> \param[in] TAU
 *> \verbatim
 *>          TAU is COMPLEX*16 array, dimension (K)
 *>          TAU(i) must contain the scalar factor of the elementary
-*>          reflector H(i), as returned by ZGELQF.
-*> \endverbatim
-*>
-*> \param[in,out] C
-*> \verbatim
-*>          C is COMPLEX*16 array, dimension (LDC,N)
-*>          On entry, the M-by-N matrix C.
-*>          On exit, C is overwritten by Q*C or Q**H*C or C*Q**H or C*Q.
-*> \endverbatim
-*>
-*> \param[in] LDC
-*> \verbatim
-*>          LDC is INTEGER
-*>          The leading dimension of the array C. LDC >= max(1,M).
+*>          reflector H(i), as returned by ZGEQRF.
 *> \endverbatim
 *>
 *> \param[out] WORK
 *> \verbatim
-*>          WORK is COMPLEX*16 array, dimension (MAX(1,LWORK))
-*>          On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
-*> \endverbatim
-*>
-*> \param[in] LWORK
-*> \verbatim
-*>          LWORK is INTEGER
-*>          The dimension of the array WORK.
-*>          If SIDE = 'L', LWORK >= max(1,N);
-*>          if SIDE = 'R', LWORK >= max(1,M).
-*>          For optimum performance LWORK >= N*NB if SIDE 'L', and
-*>          LWORK >= M*NB if SIDE = 'R', where NB is the optimal
-*>          blocksize.
-*>
-*>          If LWORK = -1, then a workspace query is assumed; the routine
-*>          only calculates the optimal size of the WORK array, returns
-*>          this value as the first entry of the WORK array, and no error
-*>          message related to LWORK is issued by XERBLA.
+*>          WORK is COMPLEX*16 array, dimension (N)
 *> \endverbatim
 *>
 *> \param[out] INFO
 *> \verbatim
 *>          INFO is INTEGER
-*>          = 0:  successful exit
-*>          < 0:  if INFO = -i, the i-th argument had an illegal value
+*>          = 0: successful exit
+*>          < 0: if INFO = -i, the i-th argument has an illegal value
 *> \endverbatim
 *
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date November 2011
+*> \date December 2016
 *
 *> \ingroup complex16OTHERcomputational
 *
 *  =====================================================================
-      SUBROUTINE ZUNMLQ( SIDE, TRANS, M, N, K, A, LDA, TAU, C, LDC,
-     $                   WORK, LWORK, INFO )
+      SUBROUTINE ZUNG2R( M, N, K, A, LDA, TAU, WORK, INFO )
 *
-*  -- LAPACK computational routine (version 3.4.0) --
+*  -- LAPACK computational routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     November 2011
+*     December 2016
 *
 *     .. Scalar Arguments ..
-      CHARACTER          SIDE, TRANS
-      INTEGER            INFO, K, LDA, LDC, LWORK, M, N
+      INTEGER            INFO, K, LDA, M, N
 *     ..
 *     .. Array Arguments ..
-      COMPLEX*16         A( LDA, * ), C( LDC, * ), TAU( * ), WORK( * )
+      COMPLEX*16         A( LDA, * ), TAU( * ), WORK( * )
 *     ..
 *
 *  =====================================================================
 *
 *     .. Parameters ..
-      INTEGER            NBMAX, LDT
-      PARAMETER          ( NBMAX = 64, LDT = NBMAX+1 )
+      COMPLEX*16         ONE, ZERO
+      PARAMETER          ( ONE = ( 1.0D+0, 0.0D+0 ),
+     $                   ZERO = ( 0.0D+0, 0.0D+0 ) )
 *     ..
 *     .. Local Scalars ..
-      LOGICAL            LEFT, LQUERY, NOTRAN
-      CHARACTER          TRANST
-      INTEGER            I, I1, I2, I3, IB, IC, IINFO, IWS, JC, LDWORK,
-     $                   LWKOPT, MI, NB, NBMIN, NI, NQ, NW
-*     ..
-*     .. Local Arrays ..
-      COMPLEX*16         T( LDT, NBMAX )
-*     ..
-*     .. External Functions ..
-      LOGICAL            LSAME
-      INTEGER            ILAENV
-      EXTERNAL           LSAME, ILAENV
+      INTEGER            I, J, L
 *     ..
 *     .. External Subroutines ..
-      EXTERNAL           XERBLA, ZLARFB, ZLARFT, ZUNML2
+      EXTERNAL           XERBLA, ZLARF, ZSCAL
 *     ..
 *     .. Intrinsic Functions ..
-      INTRINSIC          MAX, MIN
+      INTRINSIC          MAX
 *     ..
 *     .. Executable Statements ..
 *
 *     Test the input arguments
 *
       INFO = 0
-      LEFT = LSAME( SIDE, 'L' )
-      NOTRAN = LSAME( TRANS, 'N' )
-      LQUERY = ( LWORK.EQ.-1 )
-*
-*     NQ is the order of Q and NW is the minimum dimension of WORK
-*
-      IF( LEFT ) THEN
-         NQ = M
-         NW = N
-      ELSE
-         NQ = N
-         NW = M
-      END IF
-      IF( .NOT.LEFT .AND. .NOT.LSAME( SIDE, 'R' ) ) THEN
+      IF( M.LT.0 ) THEN
          INFO = -1
-      ELSE IF( .NOT.NOTRAN .AND. .NOT.LSAME( TRANS, 'C' ) ) THEN
+      ELSE IF( N.LT.0 .OR. N.GT.M ) THEN
          INFO = -2
-      ELSE IF( M.LT.0 ) THEN
+      ELSE IF( K.LT.0 .OR. K.GT.N ) THEN
          INFO = -3
-      ELSE IF( N.LT.0 ) THEN
-         INFO = -4
-      ELSE IF( K.LT.0 .OR. K.GT.NQ ) THEN
+      ELSE IF( LDA.LT.MAX( 1, M ) ) THEN
          INFO = -5
-      ELSE IF( LDA.LT.MAX( 1, K ) ) THEN
-         INFO = -7
-      ELSE IF( LDC.LT.MAX( 1, M ) ) THEN
-         INFO = -10
-      ELSE IF( LWORK.LT.MAX( 1, NW ) .AND. .NOT.LQUERY ) THEN
-         INFO = -12
-      END IF
-*
-      IF( INFO.EQ.0 ) THEN
-*
-*        Determine the block size.  NB may be at most NBMAX, where NBMAX
-*        is used to define the local array T.
-*
-         NB = MIN( NBMAX, ILAENV( 1, 'ZUNMLQ', SIDE // TRANS, M, N, K,
-     $        -1 ) )
-         LWKOPT = MAX( 1, NW )*NB
-         WORK( 1 ) = LWKOPT
       END IF
-*
       IF( INFO.NE.0 ) THEN
-         CALL XERBLA( 'ZUNMLQ', -INFO )
-         RETURN
-      ELSE IF( LQUERY ) THEN
+         CALL XERBLA( 'ZUNG2R', -INFO )
          RETURN
       END IF
 *
 *     Quick return if possible
 *
-      IF( M.EQ.0 .OR. N.EQ.0 .OR. K.EQ.0 ) THEN
-         WORK( 1 ) = 1
-         RETURN
-      END IF
-*
-      NBMIN = 2
-      LDWORK = NW
-      IF( NB.GT.1 .AND. NB.LT.K ) THEN
-         IWS = NW*NB
-         IF( LWORK.LT.IWS ) THEN
-            NB = LWORK / LDWORK
-            NBMIN = MAX( 2, ILAENV( 2, 'ZUNMLQ', SIDE // TRANS, M, N, K,
-     $              -1 ) )
-         END IF
-      ELSE
-         IWS = NW
-      END IF
-*
-      IF( NB.LT.NBMIN .OR. NB.GE.K ) THEN
-*
-*        Use unblocked code
+      IF( N.LE.0 )
+     $   RETURN
 *
-         CALL ZUNML2( SIDE, TRANS, M, N, K, A, LDA, TAU, C, LDC, WORK,
-     $                IINFO )
-      ELSE
+*     Initialise columns k+1:n to columns of the unit matrix
 *
-*        Use blocked code
+      DO 20 J = K + 1, N
+         DO 10 L = 1, M
+            A( L, J ) = ZERO
+   10    CONTINUE
+         A( J, J ) = ONE
+   20 CONTINUE
 *
-         IF( ( LEFT .AND. NOTRAN ) .OR.
-     $       ( .NOT.LEFT .AND. .NOT.NOTRAN ) ) THEN
-            I1 = 1
-            I2 = K
-            I3 = NB
-         ELSE
-            I1 = ( ( K-1 ) / NB )*NB + 1
-            I2 = 1
-            I3 = -NB
-         END IF
+      DO 40 I = K, 1, -1
 *
-         IF( LEFT ) THEN
-            NI = N
-            JC = 1
-         ELSE
-            MI = M
-            IC = 1
-         END IF
+*        Apply H(i) to A(i:m,i:n) from the left
 *
-         IF( NOTRAN ) THEN
-            TRANST = 'C'
-         ELSE
-            TRANST = 'N'
+         IF( I.LT.N ) THEN
+            A( I, I ) = ONE
+            CALL ZLARF( 'Left', M-I+1, N-I, A( I, I ), 1, TAU( I ),
+     $                  A( I, I+1 ), LDA, WORK )
          END IF
+         IF( I.LT.M )
+     $      CALL ZSCAL( M-I, -TAU( I ), A( I+1, I ), 1 )
+         A( I, I ) = ONE - TAU( I )
 *
-         DO 10 I = I1, I2, I3
-            IB = MIN( NB, K-I+1 )
-*
-*           Form the triangular factor of the block reflector
-*           H = H(i) H(i+1) . . . H(i+ib-1)
-*
-            CALL ZLARFT( 'Forward', 'Rowwise', NQ-I+1, IB, A( I, I ),
-     $                   LDA, TAU( I ), T, LDT )
-            IF( LEFT ) THEN
-*
-*              H or H**H is applied to C(i:m,1:n)
-*
-               MI = M - I + 1
-               IC = I
-            ELSE
-*
-*              H or H**H is applied to C(1:m,i:n)
-*
-               NI = N - I + 1
-               JC = I
-            END IF
-*
-*           Apply H or H**H
+*        Set A(1:i-1,i) to zero
 *
-            CALL ZLARFB( SIDE, TRANST, 'Forward', 'Rowwise', MI, NI, IB,
-     $                   A( I, I ), LDA, T, LDT, C( IC, JC ), LDC, WORK,
-     $                   LDWORK )
-   10    CONTINUE
-      END IF
-      WORK( 1 ) = LWKOPT
+         DO 30 L = 1, I - 1
+            A( L, I ) = ZERO
+   30    CONTINUE
+   40 CONTINUE
       RETURN
 *
-*     End of ZUNMLQ
+*     End of ZUNG2R
 *
       END
-*> \brief \b ZUNMQR
+*> \brief \b ZUNGBR
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download ZUNMQR + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/zunmqr.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/zunmqr.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/zunmqr.f"> 
+*> Download ZUNGBR + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/zungbr.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/zungbr.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/zungbr.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
-*       SUBROUTINE ZUNMQR( SIDE, TRANS, M, N, K, A, LDA, TAU, C, LDC,
-*                          WORK, LWORK, INFO )
-* 
+*       SUBROUTINE ZUNGBR( VECT, M, N, K, A, LDA, TAU, WORK, LWORK, INFO )
+*
 *       .. Scalar Arguments ..
-*       CHARACTER          SIDE, TRANS
-*       INTEGER            INFO, K, LDA, LDC, LWORK, M, N
+*       CHARACTER          VECT
+*       INTEGER            INFO, K, LDA, LWORK, M, N
 *       ..
 *       .. Array Arguments ..
-*       COMPLEX*16         A( LDA, * ), C( LDC, * ), TAU( * ), WORK( * )
+*       COMPLEX*16         A( LDA, * ), TAU( * ), WORK( * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
 *>
 *> \verbatim
 *>
-*> ZUNMQR overwrites the general complex M-by-N matrix C with
-*>
-*>                 SIDE = 'L'     SIDE = 'R'
-*> TRANS = 'N':      Q * C          C * Q
-*> TRANS = 'C':      Q**H * C       C * Q**H
-*>
-*> where Q is a complex unitary matrix defined as the product of k
-*> elementary reflectors
+*> ZUNGBR generates one of the complex unitary matrices Q or P**H
+*> determined by ZGEBRD when reducing a complex matrix A to bidiagonal
+*> form: A = Q * B * P**H.  Q and P**H are defined as products of
+*> elementary reflectors H(i) or G(i) respectively.
 *>
-*>       Q = H(1) H(2) . . . H(k)
+*> If VECT = 'Q', A is assumed to have been an M-by-K matrix, and Q
+*> is of order M:
+*> if m >= k, Q = H(1) H(2) . . . H(k) and ZUNGBR returns the first n
+*> columns of Q, where m >= n >= k;
+*> if m < k, Q = H(1) H(2) . . . H(m-1) and ZUNGBR returns Q as an
+*> M-by-M matrix.
 *>
-*> as returned by ZGEQRF. Q is of order M if SIDE = 'L' and of order N
-*> if SIDE = 'R'.
+*> If VECT = 'P', A is assumed to have been a K-by-N matrix, and P**H
+*> is of order N:
+*> if k < n, P**H = G(k) . . . G(2) G(1) and ZUNGBR returns the first m
+*> rows of P**H, where n >= m >= k;
+*> if k >= n, P**H = G(n-1) . . . G(2) G(1) and ZUNGBR returns P**H as
+*> an N-by-N matrix.
 *> \endverbatim
 *
 *  Arguments:
 *  ==========
 *
-*> \param[in] SIDE
-*> \verbatim
-*>          SIDE is CHARACTER*1
-*>          = 'L': apply Q or Q**H from the Left;
-*>          = 'R': apply Q or Q**H from the Right.
-*> \endverbatim
-*>
-*> \param[in] TRANS
+*> \param[in] VECT
 *> \verbatim
-*>          TRANS is CHARACTER*1
-*>          = 'N':  No transpose, apply Q;
-*>          = 'C':  Conjugate transpose, apply Q**H.
+*>          VECT is CHARACTER*1
+*>          Specifies whether the matrix Q or the matrix P**H is
+*>          required, as defined in the transformation applied by ZGEBRD:
+*>          = 'Q':  generate Q;
+*>          = 'P':  generate P**H.
 *> \endverbatim
 *>
 *> \param[in] M
 *> \verbatim
 *>          M is INTEGER
-*>          The number of rows of the matrix C. M >= 0.
+*>          The number of rows of the matrix Q or P**H to be returned.
+*>          M >= 0.
 *> \endverbatim
 *>
 *> \param[in] N
 *> \verbatim
 *>          N is INTEGER
-*>          The number of columns of the matrix C. N >= 0.
+*>          The number of columns of the matrix Q or P**H to be returned.
+*>          N >= 0.
+*>          If VECT = 'Q', M >= N >= min(M,K);
+*>          if VECT = 'P', N >= M >= min(N,K).
 *> \endverbatim
 *>
 *> \param[in] K
 *> \verbatim
 *>          K is INTEGER
-*>          The number of elementary reflectors whose product defines
-*>          the matrix Q.
-*>          If SIDE = 'L', M >= K >= 0;
-*>          if SIDE = 'R', N >= K >= 0.
+*>          If VECT = 'Q', the number of columns in the original M-by-K
+*>          matrix reduced by ZGEBRD.
+*>          If VECT = 'P', the number of rows in the original K-by-N
+*>          matrix reduced by ZGEBRD.
+*>          K >= 0.
 *> \endverbatim
 *>
-*> \param[in] A
+*> \param[in,out] A
 *> \verbatim
-*>          A is COMPLEX*16 array, dimension (LDA,K)
-*>          The i-th column must contain the vector which defines the
-*>          elementary reflector H(i), for i = 1,2,...,k, as returned by
-*>          ZGEQRF in the first k columns of its array argument A.
+*>          A is COMPLEX*16 array, dimension (LDA,N)
+*>          On entry, the vectors which define the elementary reflectors,
+*>          as returned by ZGEBRD.
+*>          On exit, the M-by-N matrix Q or P**H.
 *> \endverbatim
 *>
 *> \param[in] LDA
 *> \verbatim
 *>          LDA is INTEGER
-*>          The leading dimension of the array A.
-*>          If SIDE = 'L', LDA >= max(1,M);
-*>          if SIDE = 'R', LDA >= max(1,N).
+*>          The leading dimension of the array A. LDA >= M.
 *> \endverbatim
 *>
 *> \param[in] TAU
 *> \verbatim
-*>          TAU is COMPLEX*16 array, dimension (K)
+*>          TAU is COMPLEX*16 array, dimension
+*>                                (min(M,K)) if VECT = 'Q'
+*>                                (min(N,K)) if VECT = 'P'
 *>          TAU(i) must contain the scalar factor of the elementary
-*>          reflector H(i), as returned by ZGEQRF.
-*> \endverbatim
-*>
-*> \param[in,out] C
-*> \verbatim
-*>          C is COMPLEX*16 array, dimension (LDC,N)
-*>          On entry, the M-by-N matrix C.
-*>          On exit, C is overwritten by Q*C or Q**H*C or C*Q**H or C*Q.
-*> \endverbatim
-*>
-*> \param[in] LDC
-*> \verbatim
-*>          LDC is INTEGER
-*>          The leading dimension of the array C. LDC >= max(1,M).
+*>          reflector H(i) or G(i), which determines Q or P**H, as
+*>          returned by ZGEBRD in its array argument TAUQ or TAUP.
 *> \endverbatim
 *>
 *> \param[out] WORK
@@ -31304,12 +50791,9 @@
 *> \param[in] LWORK
 *> \verbatim
 *>          LWORK is INTEGER
-*>          The dimension of the array WORK.
-*>          If SIDE = 'L', LWORK >= max(1,N);
-*>          if SIDE = 'R', LWORK >= max(1,M).
-*>          For optimum performance LWORK >= N*NB if SIDE = 'L', and
-*>          LWORK >= M*NB if SIDE = 'R', where NB is the optimal
-*>          blocksize.
+*>          The dimension of the array WORK. LWORK >= max(1,min(M,N)).
+*>          For optimum performance LWORK >= min(M,N)*NB, where NB
+*>          is the optimal blocksize.
 *>
 *>          If LWORK = -1, then a workspace query is assumed; the routine
 *>          only calculates the optimal size of the WORK array, returns
@@ -31327,53 +50811,48 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date November 2011
+*> \date April 2012
 *
-*> \ingroup complex16OTHERcomputational
+*> \ingroup complex16GBcomputational
 *
 *  =====================================================================
-      SUBROUTINE ZUNMQR( SIDE, TRANS, M, N, K, A, LDA, TAU, C, LDC,
-     $                   WORK, LWORK, INFO )
+      SUBROUTINE ZUNGBR( VECT, M, N, K, A, LDA, TAU, WORK, LWORK, INFO )
 *
-*  -- LAPACK computational routine (version 3.4.0) --
+*  -- LAPACK computational routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     November 2011
+*     April 2012
 *
 *     .. Scalar Arguments ..
-      CHARACTER          SIDE, TRANS
-      INTEGER            INFO, K, LDA, LDC, LWORK, M, N
+      CHARACTER          VECT
+      INTEGER            INFO, K, LDA, LWORK, M, N
 *     ..
 *     .. Array Arguments ..
-      COMPLEX*16         A( LDA, * ), C( LDC, * ), TAU( * ), WORK( * )
+      COMPLEX*16         A( LDA, * ), TAU( * ), WORK( * )
 *     ..
 *
 *  =====================================================================
 *
 *     .. Parameters ..
-      INTEGER            NBMAX, LDT
-      PARAMETER          ( NBMAX = 64, LDT = NBMAX+1 )
+      COMPLEX*16         ZERO, ONE
+      PARAMETER          ( ZERO = ( 0.0D+0, 0.0D+0 ),
+     $                   ONE = ( 1.0D+0, 0.0D+0 ) )
 *     ..
 *     .. Local Scalars ..
-      LOGICAL            LEFT, LQUERY, NOTRAN
-      INTEGER            I, I1, I2, I3, IB, IC, IINFO, IWS, JC, LDWORK,
-     $                   LWKOPT, MI, NB, NBMIN, NI, NQ, NW
-*     ..
-*     .. Local Arrays ..
-      COMPLEX*16         T( LDT, NBMAX )
+      LOGICAL            LQUERY, WANTQ
+      INTEGER            I, IINFO, J, LWKOPT, MN
 *     ..
 *     .. External Functions ..
       LOGICAL            LSAME
-      INTEGER            ILAENV
-      EXTERNAL           LSAME, ILAENV
+      EXTERNAL           LSAME
 *     ..
 *     .. External Subroutines ..
-      EXTERNAL           XERBLA, ZLARFB, ZLARFT, ZUNM2R
+      EXTERNAL           XERBLA, ZUNGLQ, ZUNGQR
 *     ..
 *     .. Intrinsic Functions ..
       INTRINSIC          MAX, MIN
@@ -31383,296 +50862,231 @@
 *     Test the input arguments
 *
       INFO = 0
-      LEFT = LSAME( SIDE, 'L' )
-      NOTRAN = LSAME( TRANS, 'N' )
+      WANTQ = LSAME( VECT, 'Q' )
+      MN = MIN( M, N )
       LQUERY = ( LWORK.EQ.-1 )
-*
-*     NQ is the order of Q and NW is the minimum dimension of WORK
-*
-      IF( LEFT ) THEN
-         NQ = M
-         NW = N
-      ELSE
-         NQ = N
-         NW = M
-      END IF
-      IF( .NOT.LEFT .AND. .NOT.LSAME( SIDE, 'R' ) ) THEN
+      IF( .NOT.WANTQ .AND. .NOT.LSAME( VECT, 'P' ) ) THEN
          INFO = -1
-      ELSE IF( .NOT.NOTRAN .AND. .NOT.LSAME( TRANS, 'C' ) ) THEN
-         INFO = -2
       ELSE IF( M.LT.0 ) THEN
+         INFO = -2
+      ELSE IF( N.LT.0 .OR. ( WANTQ .AND. ( N.GT.M .OR. N.LT.MIN( M,
+     $         K ) ) ) .OR. ( .NOT.WANTQ .AND. ( M.GT.N .OR. M.LT.
+     $         MIN( N, K ) ) ) ) THEN
          INFO = -3
-      ELSE IF( N.LT.0 ) THEN
+      ELSE IF( K.LT.0 ) THEN
          INFO = -4
-      ELSE IF( K.LT.0 .OR. K.GT.NQ ) THEN
-         INFO = -5
-      ELSE IF( LDA.LT.MAX( 1, NQ ) ) THEN
-         INFO = -7
-      ELSE IF( LDC.LT.MAX( 1, M ) ) THEN
-         INFO = -10
-      ELSE IF( LWORK.LT.MAX( 1, NW ) .AND. .NOT.LQUERY ) THEN
-         INFO = -12
+      ELSE IF( LDA.LT.MAX( 1, M ) ) THEN
+         INFO = -6
+      ELSE IF( LWORK.LT.MAX( 1, MN ) .AND. .NOT.LQUERY ) THEN
+         INFO = -9
       END IF
 *
       IF( INFO.EQ.0 ) THEN
-*
-*        Determine the block size.  NB may be at most NBMAX, where NBMAX
-*        is used to define the local array T.
-*
-         NB = MIN( NBMAX, ILAENV( 1, 'ZUNMQR', SIDE // TRANS, M, N, K,
-     $        -1 ) )
-         LWKOPT = MAX( 1, NW )*NB
-         WORK( 1 ) = LWKOPT
+         WORK( 1 ) = 1
+         IF( WANTQ ) THEN
+            IF( M.GE.K ) THEN
+               CALL ZUNGQR( M, N, K, A, LDA, TAU, WORK, -1, IINFO )
+            ELSE
+               IF( M.GT.1 ) THEN
+                  CALL ZUNGQR( M-1, M-1, M-1, A( 2, 2 ), LDA, TAU, WORK,
+     $                         -1, IINFO )
+               END IF
+            END IF
+         ELSE
+            IF( K.LT.N ) THEN
+               CALL ZUNGLQ( M, N, K, A, LDA, TAU, WORK, -1, IINFO )
+            ELSE
+               IF( N.GT.1 ) THEN
+                  CALL ZUNGLQ( N-1, N-1, N-1, A( 2, 2 ), LDA, TAU, WORK,
+     $                         -1, IINFO )
+               END IF
+            END IF
+         END IF
+         LWKOPT = WORK( 1 )
+         LWKOPT = MAX (LWKOPT, MN)
       END IF
 *
       IF( INFO.NE.0 ) THEN
-         CALL XERBLA( 'ZUNMQR', -INFO )
+         CALL XERBLA( 'ZUNGBR', -INFO )
          RETURN
       ELSE IF( LQUERY ) THEN
+         WORK( 1 ) = LWKOPT
          RETURN
       END IF
 *
 *     Quick return if possible
 *
-      IF( M.EQ.0 .OR. N.EQ.0 .OR. K.EQ.0 ) THEN
+      IF( M.EQ.0 .OR. N.EQ.0 ) THEN
          WORK( 1 ) = 1
          RETURN
       END IF
 *
-      NBMIN = 2
-      LDWORK = NW
-      IF( NB.GT.1 .AND. NB.LT.K ) THEN
-         IWS = NW*NB
-         IF( LWORK.LT.IWS ) THEN
-            NB = LWORK / LDWORK
-            NBMIN = MAX( 2, ILAENV( 2, 'ZUNMQR', SIDE // TRANS, M, N, K,
-     $              -1 ) )
-         END IF
-      ELSE
-         IWS = NW
-      END IF
+      IF( WANTQ ) THEN
 *
-      IF( NB.LT.NBMIN .OR. NB.GE.K ) THEN
+*        Form Q, determined by a call to ZGEBRD to reduce an m-by-k
+*        matrix
+*
+         IF( M.GE.K ) THEN
+*
+*           If m >= k, assume m >= n >= k
+*
+            CALL ZUNGQR( M, N, K, A, LDA, TAU, WORK, LWORK, IINFO )
+*
+         ELSE
+*
+*           If m < k, assume m = n
+*
+*           Shift the vectors which define the elementary reflectors one
+*           column to the right, and set the first row and column of Q
+*           to those of the unit matrix
+*
+            DO 20 J = M, 2, -1
+               A( 1, J ) = ZERO
+               DO 10 I = J + 1, M
+                  A( I, J ) = A( I, J-1 )
+   10          CONTINUE
+   20       CONTINUE
+            A( 1, 1 ) = ONE
+            DO 30 I = 2, M
+               A( I, 1 ) = ZERO
+   30       CONTINUE
+            IF( M.GT.1 ) THEN
 *
-*        Use unblocked code
+*              Form Q(2:m,2:m)
 *
-         CALL ZUNM2R( SIDE, TRANS, M, N, K, A, LDA, TAU, C, LDC, WORK,
-     $                IINFO )
+               CALL ZUNGQR( M-1, M-1, M-1, A( 2, 2 ), LDA, TAU, WORK,
+     $                      LWORK, IINFO )
+            END IF
+         END IF
       ELSE
 *
-*        Use blocked code
+*        Form P**H, determined by a call to ZGEBRD to reduce a k-by-n
+*        matrix
 *
-         IF( ( LEFT .AND. .NOT.NOTRAN ) .OR.
-     $       ( .NOT.LEFT .AND. NOTRAN ) ) THEN
-            I1 = 1
-            I2 = K
-            I3 = NB
-         ELSE
-            I1 = ( ( K-1 ) / NB )*NB + 1
-            I2 = 1
-            I3 = -NB
-         END IF
+         IF( K.LT.N ) THEN
 *
-         IF( LEFT ) THEN
-            NI = N
-            JC = 1
-         ELSE
-            MI = M
-            IC = 1
-         END IF
+*           If k < n, assume k <= m <= n
 *
-         DO 10 I = I1, I2, I3
-            IB = MIN( NB, K-I+1 )
+            CALL ZUNGLQ( M, N, K, A, LDA, TAU, WORK, LWORK, IINFO )
 *
-*           Form the triangular factor of the block reflector
-*           H = H(i) H(i+1) . . . H(i+ib-1)
+         ELSE
 *
-            CALL ZLARFT( 'Forward', 'Columnwise', NQ-I+1, IB, A( I, I ),
-     $                   LDA, TAU( I ), T, LDT )
-            IF( LEFT ) THEN
+*           If k >= n, assume m = n
 *
-*              H or H**H is applied to C(i:m,1:n)
+*           Shift the vectors which define the elementary reflectors one
+*           row downward, and set the first row and column of P**H to
+*           those of the unit matrix
 *
-               MI = M - I + 1
-               IC = I
-            ELSE
+            A( 1, 1 ) = ONE
+            DO 40 I = 2, N
+               A( I, 1 ) = ZERO
+   40       CONTINUE
+            DO 60 J = 2, N
+               DO 50 I = J - 1, 2, -1
+                  A( I, J ) = A( I-1, J )
+   50          CONTINUE
+               A( 1, J ) = ZERO
+   60       CONTINUE
+            IF( N.GT.1 ) THEN
 *
-*              H or H**H is applied to C(1:m,i:n)
+*              Form P**H(2:n,2:n)
 *
-               NI = N - I + 1
-               JC = I
+               CALL ZUNGLQ( N-1, N-1, N-1, A( 2, 2 ), LDA, TAU, WORK,
+     $                      LWORK, IINFO )
             END IF
-*
-*           Apply H or H**H
-*
-            CALL ZLARFB( SIDE, TRANS, 'Forward', 'Columnwise', MI, NI,
-     $                   IB, A( I, I ), LDA, T, LDT, C( IC, JC ), LDC,
-     $                   WORK, LDWORK )
-   10    CONTINUE
+         END IF
       END IF
       WORK( 1 ) = LWKOPT
       RETURN
 *
-*     End of ZUNMQR
+*     End of ZUNGBR
 *
       END
-*> \brief \b ZGESDD
+*> \brief \b ZUNGHR
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download ZGESDD + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/zgesdd.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/zgesdd.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/zgesdd.f"> 
+*> Download ZUNGHR + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/zunghr.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/zunghr.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/zunghr.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
-*       SUBROUTINE ZGESDD( JOBZ, M, N, A, LDA, S, U, LDU, VT, LDVT, WORK,
-*                          LWORK, RWORK, IWORK, INFO )
-* 
+*       SUBROUTINE ZUNGHR( N, ILO, IHI, A, LDA, TAU, WORK, LWORK, INFO )
+*
 *       .. Scalar Arguments ..
-*       CHARACTER          JOBZ
-*       INTEGER            INFO, LDA, LDU, LDVT, LWORK, M, N
+*       INTEGER            IHI, ILO, INFO, LDA, LWORK, N
 *       ..
 *       .. Array Arguments ..
-*       INTEGER            IWORK( * )
-*       DOUBLE PRECISION   RWORK( * ), S( * )
-*       COMPLEX*16         A( LDA, * ), U( LDU, * ), VT( LDVT, * ),
-*      $                   WORK( * )
+*       COMPLEX*16         A( LDA, * ), TAU( * ), WORK( * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
 *>
 *> \verbatim
 *>
-*> ZGESDD computes the singular value decomposition (SVD) of a complex
-*> M-by-N matrix A, optionally computing the left and/or right singular
-*> vectors, by using divide-and-conquer method. The SVD is written
-*>
-*>      A = U * SIGMA * conjugate-transpose(V)
-*>
-*> where SIGMA is an M-by-N matrix which is zero except for its
-*> min(m,n) diagonal elements, U is an M-by-M unitary matrix, and
-*> V is an N-by-N unitary matrix.  The diagonal elements of SIGMA
-*> are the singular values of A; they are real and non-negative, and
-*> are returned in descending order.  The first min(m,n) columns of
-*> U and V are the left and right singular vectors of A.
-*>
-*> Note that the routine returns VT = V**H, not V.
+*> ZUNGHR generates a complex unitary matrix Q which is defined as the
+*> product of IHI-ILO elementary reflectors of order N, as returned by
+*> ZGEHRD:
 *>
-*> The divide and conquer algorithm makes very mild assumptions about
-*> floating point arithmetic. It will work on machines with a guard
-*> digit in add/subtract, or on those binary machines without guard
-*> digits which subtract like the Cray X-MP, Cray Y-MP, Cray C-90, or
-*> Cray-2. It could conceivably fail on hexadecimal or decimal machines
-*> without guard digits, but we know of none.
+*> Q = H(ilo) H(ilo+1) . . . H(ihi-1).
 *> \endverbatim
 *
 *  Arguments:
 *  ==========
 *
-*> \param[in] JOBZ
+*> \param[in] N
 *> \verbatim
-*>          JOBZ is CHARACTER*1
-*>          Specifies options for computing all or part of the matrix U:
-*>          = 'A':  all M columns of U and all N rows of V**H are
-*>                  returned in the arrays U and VT;
-*>          = 'S':  the first min(M,N) columns of U and the first
-*>                  min(M,N) rows of V**H are returned in the arrays U
-*>                  and VT;
-*>          = 'O':  If M >= N, the first N columns of U are overwritten
-*>                  in the array A and all rows of V**H are returned in
-*>                  the array VT;
-*>                  otherwise, all columns of U are returned in the
-*>                  array U and the first M rows of V**H are overwritten
-*>                  in the array A;
-*>          = 'N':  no columns of U or rows of V**H are computed.
+*>          N is INTEGER
+*>          The order of the matrix Q. N >= 0.
 *> \endverbatim
 *>
-*> \param[in] M
+*> \param[in] ILO
 *> \verbatim
-*>          M is INTEGER
-*>          The number of rows of the input matrix A.  M >= 0.
+*>          ILO is INTEGER
 *> \endverbatim
 *>
-*> \param[in] N
+*> \param[in] IHI
 *> \verbatim
-*>          N is INTEGER
-*>          The number of columns of the input matrix A.  N >= 0.
+*>          IHI is INTEGER
+*>
+*>          ILO and IHI must have the same values as in the previous call
+*>          of ZGEHRD. Q is equal to the unit matrix except in the
+*>          submatrix Q(ilo+1:ihi,ilo+1:ihi).
+*>          1 <= ILO <= IHI <= N, if N > 0; ILO=1 and IHI=0, if N=0.
 *> \endverbatim
 *>
 *> \param[in,out] A
 *> \verbatim
 *>          A is COMPLEX*16 array, dimension (LDA,N)
-*>          On entry, the M-by-N matrix A.
-*>          On exit,
-*>          if JOBZ = 'O',  A is overwritten with the first N columns
-*>                          of U (the left singular vectors, stored
-*>                          columnwise) if M >= N;
-*>                          A is overwritten with the first M rows
-*>                          of V**H (the right singular vectors, stored
-*>                          rowwise) otherwise.
-*>          if JOBZ .ne. 'O', the contents of A are destroyed.
+*>          On entry, the vectors which define the elementary reflectors,
+*>          as returned by ZGEHRD.
+*>          On exit, the N-by-N unitary matrix Q.
 *> \endverbatim
 *>
 *> \param[in] LDA
 *> \verbatim
 *>          LDA is INTEGER
-*>          The leading dimension of the array A.  LDA >= max(1,M).
-*> \endverbatim
-*>
-*> \param[out] S
-*> \verbatim
-*>          S is DOUBLE PRECISION array, dimension (min(M,N))
-*>          The singular values of A, sorted so that S(i) >= S(i+1).
-*> \endverbatim
-*>
-*> \param[out] U
-*> \verbatim
-*>          U is COMPLEX*16 array, dimension (LDU,UCOL)
-*>          UCOL = M if JOBZ = 'A' or JOBZ = 'O' and M < N;
-*>          UCOL = min(M,N) if JOBZ = 'S'.
-*>          If JOBZ = 'A' or JOBZ = 'O' and M < N, U contains the M-by-M
-*>          unitary matrix U;
-*>          if JOBZ = 'S', U contains the first min(M,N) columns of U
-*>          (the left singular vectors, stored columnwise);
-*>          if JOBZ = 'O' and M >= N, or JOBZ = 'N', U is not referenced.
-*> \endverbatim
-*>
-*> \param[in] LDU
-*> \verbatim
-*>          LDU is INTEGER
-*>          The leading dimension of the array U.  LDU >= 1; if
-*>          JOBZ = 'S' or 'A' or JOBZ = 'O' and M < N, LDU >= M.
-*> \endverbatim
-*>
-*> \param[out] VT
-*> \verbatim
-*>          VT is COMPLEX*16 array, dimension (LDVT,N)
-*>          If JOBZ = 'A' or JOBZ = 'O' and M >= N, VT contains the
-*>          N-by-N unitary matrix V**H;
-*>          if JOBZ = 'S', VT contains the first min(M,N) rows of
-*>          V**H (the right singular vectors, stored rowwise);
-*>          if JOBZ = 'O' and M < N, or JOBZ = 'N', VT is not referenced.
+*>          The leading dimension of the array A. LDA >= max(1,N).
 *> \endverbatim
 *>
-*> \param[in] LDVT
+*> \param[in] TAU
 *> \verbatim
-*>          LDVT is INTEGER
-*>          The leading dimension of the array VT.  LDVT >= 1; if
-*>          JOBZ = 'A' or JOBZ = 'O' and M >= N, LDVT >= N;
-*>          if JOBZ = 'S', LDVT >= min(M,N).
+*>          TAU is COMPLEX*16 array, dimension (N-1)
+*>          TAU(i) must contain the scalar factor of the elementary
+*>          reflector H(i), as returned by ZGEHRD.
 *> \endverbatim
 *>
 *> \param[out] WORK
@@ -31684,2568 +51098,3070 @@
 *> \param[in] LWORK
 *> \verbatim
 *>          LWORK is INTEGER
-*>          The dimension of the array WORK. LWORK >= 1.
-*>          if JOBZ = 'N', LWORK >= 2*min(M,N)+max(M,N).
-*>          if JOBZ = 'O',
-*>                LWORK >= 2*min(M,N)*min(M,N)+2*min(M,N)+max(M,N).
-*>          if JOBZ = 'S' or 'A',
-*>                LWORK >= min(M,N)*min(M,N)+2*min(M,N)+max(M,N).
-*>          For good performance, LWORK should generally be larger.
-*>
-*>          If LWORK = -1, a workspace query is assumed.  The optimal
-*>          size for the WORK array is calculated and stored in WORK(1),
-*>          and no other work except argument checking is performed.
-*> \endverbatim
-*>
-*> \param[out] RWORK
-*> \verbatim
-*>          RWORK is DOUBLE PRECISION array, dimension (MAX(1,LRWORK))
-*>          If JOBZ = 'N', LRWORK >= 5*min(M,N).
-*>          Otherwise,
-*>          LRWORK >= min(M,N)*max(5*min(M,N)+7,2*max(M,N)+2*min(M,N)+1)
-*> \endverbatim
+*>          The dimension of the array WORK. LWORK >= IHI-ILO.
+*>          For optimum performance LWORK >= (IHI-ILO)*NB, where NB is
+*>          the optimal blocksize.
 *>
-*> \param[out] IWORK
-*> \verbatim
-*>          IWORK is INTEGER array, dimension (8*min(M,N))
+*>          If LWORK = -1, then a workspace query is assumed; the routine
+*>          only calculates the optimal size of the WORK array, returns
+*>          this value as the first entry of the WORK array, and no error
+*>          message related to LWORK is issued by XERBLA.
 *> \endverbatim
 *>
 *> \param[out] INFO
 *> \verbatim
 *>          INFO is INTEGER
-*>          = 0:  successful exit.
-*>          < 0:  if INFO = -i, the i-th argument had an illegal value.
-*>          > 0:  The updating process of DBDSDC did not converge.
+*>          = 0:  successful exit
+*>          < 0:  if INFO = -i, the i-th argument had an illegal value
 *> \endverbatim
 *
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date November 2011
+*> \date December 2016
 *
-*> \ingroup complex16GEsing
+*> \ingroup complex16OTHERcomputational
 *
-*> \par Contributors:
-*  ==================
-*>
-*>     Ming Gu and Huan Ren, Computer Science Division, University of
-*>     California at Berkeley, USA
-*>
 *  =====================================================================
-      SUBROUTINE ZGESDD( JOBZ, M, N, A, LDA, S, U, LDU, VT, LDVT, WORK,
-     $                   LWORK, RWORK, IWORK, INFO )
+      SUBROUTINE ZUNGHR( N, ILO, IHI, A, LDA, TAU, WORK, LWORK, INFO )
 *
-*  -- LAPACK driver routine (version 3.4.0) --
+*  -- LAPACK computational routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     November 2011
+*     December 2016
 *
 *     .. Scalar Arguments ..
-      CHARACTER          JOBZ
-      INTEGER            INFO, LDA, LDU, LDVT, LWORK, M, N
+      INTEGER            IHI, ILO, INFO, LDA, LWORK, N
 *     ..
 *     .. Array Arguments ..
-      INTEGER            IWORK( * )
-      DOUBLE PRECISION   RWORK( * ), S( * )
-      COMPLEX*16         A( LDA, * ), U( LDU, * ), VT( LDVT, * ),
-     $                   WORK( * )
+      COMPLEX*16         A( LDA, * ), TAU( * ), WORK( * )
 *     ..
 *
 *  =====================================================================
 *
 *     .. Parameters ..
-      INTEGER            LQUERV
-      PARAMETER          ( LQUERV = -1 )
-      COMPLEX*16         CZERO, CONE
-      PARAMETER          ( CZERO = ( 0.0D+0, 0.0D+0 ),
-     $                   CONE = ( 1.0D+0, 0.0D+0 ) )
-      DOUBLE PRECISION   ZERO, ONE
-      PARAMETER          ( ZERO = 0.0D+0, ONE = 1.0D+0 )
+      COMPLEX*16         ZERO, ONE
+      PARAMETER          ( ZERO = ( 0.0D+0, 0.0D+0 ),
+     $                   ONE = ( 1.0D+0, 0.0D+0 ) )
 *     ..
 *     .. Local Scalars ..
-      LOGICAL            WNTQA, WNTQAS, WNTQN, WNTQO, WNTQS
-      INTEGER            BLK, CHUNK, I, IE, IERR, IL, IR, IRU, IRVT,
-     $                   ISCL, ITAU, ITAUP, ITAUQ, IU, IVT, LDWKVT,
-     $                   LDWRKL, LDWRKR, LDWRKU, MAXWRK, MINMN, MINWRK,
-     $                   MNTHR1, MNTHR2, NRWORK, NWORK, WRKBL
-      DOUBLE PRECISION   ANRM, BIGNUM, EPS, SMLNUM
-*     ..
-*     .. Local Arrays ..
-      INTEGER            IDUM( 1 )
-      DOUBLE PRECISION   DUM( 1 )
+      LOGICAL            LQUERY
+      INTEGER            I, IINFO, J, LWKOPT, NB, NH
 *     ..
 *     .. External Subroutines ..
-      EXTERNAL           DBDSDC, DLASCL, XERBLA, ZGEBRD, ZGELQF, ZGEMM,
-     $                   ZGEQRF, ZLACP2, ZLACPY, ZLACRM, ZLARCM, ZLASCL,
-     $                   ZLASET, ZUNGBR, ZUNGLQ, ZUNGQR, ZUNMBR
+      EXTERNAL           XERBLA, ZUNGQR
 *     ..
 *     .. External Functions ..
-      LOGICAL            LSAME
       INTEGER            ILAENV
-      DOUBLE PRECISION   DLAMCH, ZLANGE
-      EXTERNAL           LSAME, ILAENV, DLAMCH, ZLANGE
+      EXTERNAL           ILAENV
 *     ..
 *     .. Intrinsic Functions ..
-      INTRINSIC          INT, MAX, MIN, SQRT
+      INTRINSIC          MAX, MIN
 *     ..
 *     .. Executable Statements ..
 *
 *     Test the input arguments
 *
       INFO = 0
-      MINMN = MIN( M, N )
-      MNTHR1 = INT( MINMN*17.0D0 / 9.0D0 )
-      MNTHR2 = INT( MINMN*5.0D0 / 3.0D0 )
-      WNTQA = LSAME( JOBZ, 'A' )
-      WNTQS = LSAME( JOBZ, 'S' )
-      WNTQAS = WNTQA .OR. WNTQS
-      WNTQO = LSAME( JOBZ, 'O' )
-      WNTQN = LSAME( JOBZ, 'N' )
-      MINWRK = 1
-      MAXWRK = 1
-*
-      IF( .NOT.( WNTQA .OR. WNTQS .OR. WNTQO .OR. WNTQN ) ) THEN
+      NH = IHI - ILO
+      LQUERY = ( LWORK.EQ.-1 )
+      IF( N.LT.0 ) THEN
          INFO = -1
-      ELSE IF( M.LT.0 ) THEN
+      ELSE IF( ILO.LT.1 .OR. ILO.GT.MAX( 1, N ) ) THEN
          INFO = -2
-      ELSE IF( N.LT.0 ) THEN
+      ELSE IF( IHI.LT.MIN( ILO, N ) .OR. IHI.GT.N ) THEN
          INFO = -3
-      ELSE IF( LDA.LT.MAX( 1, M ) ) THEN
+      ELSE IF( LDA.LT.MAX( 1, N ) ) THEN
          INFO = -5
-      ELSE IF( LDU.LT.1 .OR. ( WNTQAS .AND. LDU.LT.M ) .OR.
-     $         ( WNTQO .AND. M.LT.N .AND. LDU.LT.M ) ) THEN
+      ELSE IF( LWORK.LT.MAX( 1, NH ) .AND. .NOT.LQUERY ) THEN
          INFO = -8
-      ELSE IF( LDVT.LT.1 .OR. ( WNTQA .AND. LDVT.LT.N ) .OR.
-     $         ( WNTQS .AND. LDVT.LT.MINMN ) .OR.
-     $         ( WNTQO .AND. M.GE.N .AND. LDVT.LT.N ) ) THEN
-         INFO = -10
       END IF
 *
-*     Compute workspace
-*      (Note: Comments in the code beginning "Workspace:" describe the
-*       minimal amount of workspace needed at that point in the code,
-*       as well as the preferred amount for good performance.
-*       CWorkspace refers to complex workspace, and RWorkspace to
-*       real workspace. NB refers to the optimal block size for the
-*       immediately following subroutine, as returned by ILAENV.)
-*
-      IF( INFO.EQ.0 .AND. M.GT.0 .AND. N.GT.0 ) THEN
-         IF( M.GE.N ) THEN
-*
-*           There is no complex work space needed for bidiagonal SVD
-*           The real work space needed for bidiagonal SVD is BDSPAC
-*           for computing singular values and singular vectors; BDSPAN
-*           for computing singular values only.
-*           BDSPAC = 5*N*N + 7*N
-*           BDSPAN = MAX(7*N+4, 3*N+2+SMLSIZ*(SMLSIZ+8))
-*
-            IF( M.GE.MNTHR1 ) THEN
-               IF( WNTQN ) THEN
-*
-*                 Path 1 (M much larger than N, JOBZ='N')
-*
-                  MAXWRK = N + N*ILAENV( 1, 'ZGEQRF', ' ', M, N, -1,
-     $                     -1 )
-                  MAXWRK = MAX( MAXWRK, 2*N+2*N*
-     $                     ILAENV( 1, 'ZGEBRD', ' ', N, N, -1, -1 ) )
-                  MINWRK = 3*N
-               ELSE IF( WNTQO ) THEN
-*
-*                 Path 2 (M much larger than N, JOBZ='O')
-*
-                  WRKBL = N + N*ILAENV( 1, 'ZGEQRF', ' ', M, N, -1, -1 )
-                  WRKBL = MAX( WRKBL, N+N*ILAENV( 1, 'ZUNGQR', ' ', M,
-     $                    N, N, -1 ) )
-                  WRKBL = MAX( WRKBL, 2*N+2*N*
-     $                    ILAENV( 1, 'ZGEBRD', ' ', N, N, -1, -1 ) )
-                  WRKBL = MAX( WRKBL, 2*N+N*
-     $                    ILAENV( 1, 'ZUNMBR', 'QLN', N, N, N, -1 ) )
-                  WRKBL = MAX( WRKBL, 2*N+N*
-     $                    ILAENV( 1, 'ZUNMBR', 'PRC', N, N, N, -1 ) )
-                  MAXWRK = M*N + N*N + WRKBL
-                  MINWRK = 2*N*N + 3*N
-               ELSE IF( WNTQS ) THEN
-*
-*                 Path 3 (M much larger than N, JOBZ='S')
-*
-                  WRKBL = N + N*ILAENV( 1, 'ZGEQRF', ' ', M, N, -1, -1 )
-                  WRKBL = MAX( WRKBL, N+N*ILAENV( 1, 'ZUNGQR', ' ', M,
-     $                    N, N, -1 ) )
-                  WRKBL = MAX( WRKBL, 2*N+2*N*
-     $                    ILAENV( 1, 'ZGEBRD', ' ', N, N, -1, -1 ) )
-                  WRKBL = MAX( WRKBL, 2*N+N*
-     $                    ILAENV( 1, 'ZUNMBR', 'QLN', N, N, N, -1 ) )
-                  WRKBL = MAX( WRKBL, 2*N+N*
-     $                    ILAENV( 1, 'ZUNMBR', 'PRC', N, N, N, -1 ) )
-                  MAXWRK = N*N + WRKBL
-                  MINWRK = N*N + 3*N
-               ELSE IF( WNTQA ) THEN
-*
-*                 Path 4 (M much larger than N, JOBZ='A')
-*
-                  WRKBL = N + N*ILAENV( 1, 'ZGEQRF', ' ', M, N, -1, -1 )
-                  WRKBL = MAX( WRKBL, N+M*ILAENV( 1, 'ZUNGQR', ' ', M,
-     $                    M, N, -1 ) )
-                  WRKBL = MAX( WRKBL, 2*N+2*N*
-     $                    ILAENV( 1, 'ZGEBRD', ' ', N, N, -1, -1 ) )
-                  WRKBL = MAX( WRKBL, 2*N+N*
-     $                    ILAENV( 1, 'ZUNMBR', 'QLN', N, N, N, -1 ) )
-                  WRKBL = MAX( WRKBL, 2*N+N*
-     $                    ILAENV( 1, 'ZUNMBR', 'PRC', N, N, N, -1 ) )
-                  MAXWRK = N*N + WRKBL
-                  MINWRK = N*N + 2*N + M
-               END IF
-            ELSE IF( M.GE.MNTHR2 ) THEN
-*
-*              Path 5 (M much larger than N, but not as much as MNTHR1)
-*
-               MAXWRK = 2*N + ( M+N )*ILAENV( 1, 'ZGEBRD', ' ', M, N,
-     $                  -1, -1 )
-               MINWRK = 2*N + M
-               IF( WNTQO ) THEN
-                  MAXWRK = MAX( MAXWRK, 2*N+N*
-     $                     ILAENV( 1, 'ZUNGBR', 'P', N, N, N, -1 ) )
-                  MAXWRK = MAX( MAXWRK, 2*N+N*
-     $                     ILAENV( 1, 'ZUNGBR', 'Q', M, N, N, -1 ) )
-                  MAXWRK = MAXWRK + M*N
-                  MINWRK = MINWRK + N*N
-               ELSE IF( WNTQS ) THEN
-                  MAXWRK = MAX( MAXWRK, 2*N+N*
-     $                     ILAENV( 1, 'ZUNGBR', 'P', N, N, N, -1 ) )
-                  MAXWRK = MAX( MAXWRK, 2*N+N*
-     $                     ILAENV( 1, 'ZUNGBR', 'Q', M, N, N, -1 ) )
-               ELSE IF( WNTQA ) THEN
-                  MAXWRK = MAX( MAXWRK, 2*N+N*
-     $                     ILAENV( 1, 'ZUNGBR', 'P', N, N, N, -1 ) )
-                  MAXWRK = MAX( MAXWRK, 2*N+M*
-     $                     ILAENV( 1, 'ZUNGBR', 'Q', M, M, N, -1 ) )
-               END IF
-            ELSE
-*
-*              Path 6 (M at least N, but not much larger)
-*
-               MAXWRK = 2*N + ( M+N )*ILAENV( 1, 'ZGEBRD', ' ', M, N,
-     $                  -1, -1 )
-               MINWRK = 2*N + M
-               IF( WNTQO ) THEN
-                  MAXWRK = MAX( MAXWRK, 2*N+N*
-     $                     ILAENV( 1, 'ZUNMBR', 'PRC', N, N, N, -1 ) )
-                  MAXWRK = MAX( MAXWRK, 2*N+N*
-     $                     ILAENV( 1, 'ZUNMBR', 'QLN', M, N, N, -1 ) )
-                  MAXWRK = MAXWRK + M*N
-                  MINWRK = MINWRK + N*N
-               ELSE IF( WNTQS ) THEN
-                  MAXWRK = MAX( MAXWRK, 2*N+N*
-     $                     ILAENV( 1, 'ZUNMBR', 'PRC', N, N, N, -1 ) )
-                  MAXWRK = MAX( MAXWRK, 2*N+N*
-     $                     ILAENV( 1, 'ZUNMBR', 'QLN', M, N, N, -1 ) )
-               ELSE IF( WNTQA ) THEN
-                  MAXWRK = MAX( MAXWRK, 2*N+N*
-     $                     ILAENV( 1, 'ZUNGBR', 'PRC', N, N, N, -1 ) )
-                  MAXWRK = MAX( MAXWRK, 2*N+M*
-     $                     ILAENV( 1, 'ZUNGBR', 'QLN', M, M, N, -1 ) )
-               END IF
-            END IF
-         ELSE
-*
-*           There is no complex work space needed for bidiagonal SVD
-*           The real work space needed for bidiagonal SVD is BDSPAC
-*           for computing singular values and singular vectors; BDSPAN
-*           for computing singular values only.
-*           BDSPAC = 5*M*M + 7*M
-*           BDSPAN = MAX(7*M+4, 3*M+2+SMLSIZ*(SMLSIZ+8))
-*
-            IF( N.GE.MNTHR1 ) THEN
-               IF( WNTQN ) THEN
-*
-*                 Path 1t (N much larger than M, JOBZ='N')
-*
-                  MAXWRK = M + M*ILAENV( 1, 'ZGELQF', ' ', M, N, -1,
-     $                     -1 )
-                  MAXWRK = MAX( MAXWRK, 2*M+2*M*
-     $                     ILAENV( 1, 'ZGEBRD', ' ', M, M, -1, -1 ) )
-                  MINWRK = 3*M
-               ELSE IF( WNTQO ) THEN
-*
-*                 Path 2t (N much larger than M, JOBZ='O')
-*
-                  WRKBL = M + M*ILAENV( 1, 'ZGELQF', ' ', M, N, -1, -1 )
-                  WRKBL = MAX( WRKBL, M+M*ILAENV( 1, 'ZUNGLQ', ' ', M,
-     $                    N, M, -1 ) )
-                  WRKBL = MAX( WRKBL, 2*M+2*M*
-     $                    ILAENV( 1, 'ZGEBRD', ' ', M, M, -1, -1 ) )
-                  WRKBL = MAX( WRKBL, 2*M+M*
-     $                    ILAENV( 1, 'ZUNMBR', 'PRC', M, M, M, -1 ) )
-                  WRKBL = MAX( WRKBL, 2*M+M*
-     $                    ILAENV( 1, 'ZUNMBR', 'QLN', M, M, M, -1 ) )
-                  MAXWRK = M*N + M*M + WRKBL
-                  MINWRK = 2*M*M + 3*M
-               ELSE IF( WNTQS ) THEN
-*
-*                 Path 3t (N much larger than M, JOBZ='S')
-*
-                  WRKBL = M + M*ILAENV( 1, 'ZGELQF', ' ', M, N, -1, -1 )
-                  WRKBL = MAX( WRKBL, M+M*ILAENV( 1, 'ZUNGLQ', ' ', M,
-     $                    N, M, -1 ) )
-                  WRKBL = MAX( WRKBL, 2*M+2*M*
-     $                    ILAENV( 1, 'ZGEBRD', ' ', M, M, -1, -1 ) )
-                  WRKBL = MAX( WRKBL, 2*M+M*
-     $                    ILAENV( 1, 'ZUNMBR', 'PRC', M, M, M, -1 ) )
-                  WRKBL = MAX( WRKBL, 2*M+M*
-     $                    ILAENV( 1, 'ZUNMBR', 'QLN', M, M, M, -1 ) )
-                  MAXWRK = M*M + WRKBL
-                  MINWRK = M*M + 3*M
-               ELSE IF( WNTQA ) THEN
-*
-*                 Path 4t (N much larger than M, JOBZ='A')
-*
-                  WRKBL = M + M*ILAENV( 1, 'ZGELQF', ' ', M, N, -1, -1 )
-                  WRKBL = MAX( WRKBL, M+N*ILAENV( 1, 'ZUNGLQ', ' ', N,
-     $                    N, M, -1 ) )
-                  WRKBL = MAX( WRKBL, 2*M+2*M*
-     $                    ILAENV( 1, 'ZGEBRD', ' ', M, M, -1, -1 ) )
-                  WRKBL = MAX( WRKBL, 2*M+M*
-     $                    ILAENV( 1, 'ZUNMBR', 'PRC', M, M, M, -1 ) )
-                  WRKBL = MAX( WRKBL, 2*M+M*
-     $                    ILAENV( 1, 'ZUNMBR', 'QLN', M, M, M, -1 ) )
-                  MAXWRK = M*M + WRKBL
-                  MINWRK = M*M + 2*M + N
-               END IF
-            ELSE IF( N.GE.MNTHR2 ) THEN
-*
-*              Path 5t (N much larger than M, but not as much as MNTHR1)
-*
-               MAXWRK = 2*M + ( M+N )*ILAENV( 1, 'ZGEBRD', ' ', M, N,
-     $                  -1, -1 )
-               MINWRK = 2*M + N
-               IF( WNTQO ) THEN
-                  MAXWRK = MAX( MAXWRK, 2*M+M*
-     $                     ILAENV( 1, 'ZUNGBR', 'P', M, N, M, -1 ) )
-                  MAXWRK = MAX( MAXWRK, 2*M+M*
-     $                     ILAENV( 1, 'ZUNGBR', 'Q', M, M, N, -1 ) )
-                  MAXWRK = MAXWRK + M*N
-                  MINWRK = MINWRK + M*M
-               ELSE IF( WNTQS ) THEN
-                  MAXWRK = MAX( MAXWRK, 2*M+M*
-     $                     ILAENV( 1, 'ZUNGBR', 'P', M, N, M, -1 ) )
-                  MAXWRK = MAX( MAXWRK, 2*M+M*
-     $                     ILAENV( 1, 'ZUNGBR', 'Q', M, M, N, -1 ) )
-               ELSE IF( WNTQA ) THEN
-                  MAXWRK = MAX( MAXWRK, 2*M+N*
-     $                     ILAENV( 1, 'ZUNGBR', 'P', N, N, M, -1 ) )
-                  MAXWRK = MAX( MAXWRK, 2*M+M*
-     $                     ILAENV( 1, 'ZUNGBR', 'Q', M, M, N, -1 ) )
-               END IF
-            ELSE
-*
-*              Path 6t (N greater than M, but not much larger)
-*
-               MAXWRK = 2*M + ( M+N )*ILAENV( 1, 'ZGEBRD', ' ', M, N,
-     $                  -1, -1 )
-               MINWRK = 2*M + N
-               IF( WNTQO ) THEN
-                  MAXWRK = MAX( MAXWRK, 2*M+M*
-     $                     ILAENV( 1, 'ZUNMBR', 'PRC', M, N, M, -1 ) )
-                  MAXWRK = MAX( MAXWRK, 2*M+M*
-     $                     ILAENV( 1, 'ZUNMBR', 'QLN', M, M, N, -1 ) )
-                  MAXWRK = MAXWRK + M*N
-                  MINWRK = MINWRK + M*M
-               ELSE IF( WNTQS ) THEN
-                  MAXWRK = MAX( MAXWRK, 2*M+M*
-     $                     ILAENV( 1, 'ZUNGBR', 'PRC', M, N, M, -1 ) )
-                  MAXWRK = MAX( MAXWRK, 2*M+M*
-     $                     ILAENV( 1, 'ZUNGBR', 'QLN', M, M, N, -1 ) )
-               ELSE IF( WNTQA ) THEN
-                  MAXWRK = MAX( MAXWRK, 2*M+N*
-     $                     ILAENV( 1, 'ZUNGBR', 'PRC', N, N, M, -1 ) )
-                  MAXWRK = MAX( MAXWRK, 2*M+M*
-     $                     ILAENV( 1, 'ZUNGBR', 'QLN', M, M, N, -1 ) )
-               END IF
-            END IF
-         END IF
-         MAXWRK = MAX( MAXWRK, MINWRK )
-      END IF
       IF( INFO.EQ.0 ) THEN
-         WORK( 1 ) = MAXWRK
-         IF( LWORK.LT.MINWRK .AND. LWORK.NE.LQUERV )
-     $      INFO = -13
+         NB = ILAENV( 1, 'ZUNGQR', ' ', NH, NH, NH, -1 )
+         LWKOPT = MAX( 1, NH )*NB
+         WORK( 1 ) = LWKOPT
       END IF
 *
-*     Quick returns
-*
       IF( INFO.NE.0 ) THEN
-         CALL XERBLA( 'ZGESDD', -INFO )
+         CALL XERBLA( 'ZUNGHR', -INFO )
          RETURN
-      END IF
-      IF( LWORK.EQ.LQUERV )
-     $   RETURN
-      IF( M.EQ.0 .OR. N.EQ.0 ) THEN
+      ELSE IF( LQUERY ) THEN
          RETURN
       END IF
 *
-*     Get machine constants
-*
-      EPS = DLAMCH( 'P' )
-      SMLNUM = SQRT( DLAMCH( 'S' ) ) / EPS
-      BIGNUM = ONE / SMLNUM
-*
-*     Scale A if max element outside range [SMLNUM,BIGNUM]
+*     Quick return if possible
 *
-      ANRM = ZLANGE( 'M', M, N, A, LDA, DUM )
-      ISCL = 0
-      IF( ANRM.GT.ZERO .AND. ANRM.LT.SMLNUM ) THEN
-         ISCL = 1
-         CALL ZLASCL( 'G', 0, 0, ANRM, SMLNUM, M, N, A, LDA, IERR )
-      ELSE IF( ANRM.GT.BIGNUM ) THEN
-         ISCL = 1
-         CALL ZLASCL( 'G', 0, 0, ANRM, BIGNUM, M, N, A, LDA, IERR )
+      IF( N.EQ.0 ) THEN
+         WORK( 1 ) = 1
+         RETURN
       END IF
 *
-      IF( M.GE.N ) THEN
-*
-*        A has at least as many rows as columns. If A has sufficiently
-*        more rows than columns, first reduce using the QR
-*        decomposition (if sufficient workspace available)
-*
-         IF( M.GE.MNTHR1 ) THEN
-*
-            IF( WNTQN ) THEN
-*
-*              Path 1 (M much larger than N, JOBZ='N')
-*              No singular vectors to be computed
-*
-               ITAU = 1
-               NWORK = ITAU + N
-*
-*              Compute A=Q*R
-*              (CWorkspace: need 2*N, prefer N+N*NB)
-*              (RWorkspace: need 0)
-*
-               CALL ZGEQRF( M, N, A, LDA, WORK( ITAU ), WORK( NWORK ),
-     $                      LWORK-NWORK+1, IERR )
-*
-*              Zero out below R
-*
-               CALL ZLASET( 'L', N-1, N-1, CZERO, CZERO, A( 2, 1 ),
-     $                      LDA )
-               IE = 1
-               ITAUQ = 1
-               ITAUP = ITAUQ + N
-               NWORK = ITAUP + N
-*
-*              Bidiagonalize R in A
-*              (CWorkspace: need 3*N, prefer 2*N+2*N*NB)
-*              (RWorkspace: need N)
-*
-               CALL ZGEBRD( N, N, A, LDA, S, RWORK( IE ), WORK( ITAUQ ),
-     $                      WORK( ITAUP ), WORK( NWORK ), LWORK-NWORK+1,
-     $                      IERR )
-               NRWORK = IE + N
-*
-*              Perform bidiagonal SVD, compute singular values only
-*              (CWorkspace: 0)
-*              (RWorkspace: need BDSPAN)
-*
-               CALL DBDSDC( 'U', 'N', N, S, RWORK( IE ), DUM, 1, DUM, 1,
-     $                      DUM, IDUM, RWORK( NRWORK ), IWORK, INFO )
-*
-            ELSE IF( WNTQO ) THEN
-*
-*              Path 2 (M much larger than N, JOBZ='O')
-*              N left singular vectors to be overwritten on A and
-*              N right singular vectors to be computed in VT
-*
-               IU = 1
-*
-*              WORK(IU) is N by N
-*
-               LDWRKU = N
-               IR = IU + LDWRKU*N
-               IF( LWORK.GE.M*N+N*N+3*N ) THEN
-*
-*                 WORK(IR) is M by N
+*     Shift the vectors which define the elementary reflectors one
+*     column to the right, and set the first ilo and the last n-ihi
+*     rows and columns to those of the unit matrix
 *
-                  LDWRKR = M
-               ELSE
-                  LDWRKR = ( LWORK-N*N-3*N ) / N
-               END IF
-               ITAU = IR + LDWRKR*N
-               NWORK = ITAU + N
+      DO 40 J = IHI, ILO + 1, -1
+         DO 10 I = 1, J - 1
+            A( I, J ) = ZERO
+   10    CONTINUE
+         DO 20 I = J + 1, IHI
+            A( I, J ) = A( I, J-1 )
+   20    CONTINUE
+         DO 30 I = IHI + 1, N
+            A( I, J ) = ZERO
+   30    CONTINUE
+   40 CONTINUE
+      DO 60 J = 1, ILO
+         DO 50 I = 1, N
+            A( I, J ) = ZERO
+   50    CONTINUE
+         A( J, J ) = ONE
+   60 CONTINUE
+      DO 80 J = IHI + 1, N
+         DO 70 I = 1, N
+            A( I, J ) = ZERO
+   70    CONTINUE
+         A( J, J ) = ONE
+   80 CONTINUE
 *
-*              Compute A=Q*R
-*              (CWorkspace: need N*N+2*N, prefer M*N+N+N*NB)
-*              (RWorkspace: 0)
+      IF( NH.GT.0 ) THEN
 *
-               CALL ZGEQRF( M, N, A, LDA, WORK( ITAU ), WORK( NWORK ),
-     $                      LWORK-NWORK+1, IERR )
+*        Generate Q(ilo+1:ihi,ilo+1:ihi)
 *
-*              Copy R to WORK( IR ), zeroing out below it
+         CALL ZUNGQR( NH, NH, NH, A( ILO+1, ILO+1 ), LDA, TAU( ILO ),
+     $                WORK, LWORK, IINFO )
+      END IF
+      WORK( 1 ) = LWKOPT
+      RETURN
 *
-               CALL ZLACPY( 'U', N, N, A, LDA, WORK( IR ), LDWRKR )
-               CALL ZLASET( 'L', N-1, N-1, CZERO, CZERO, WORK( IR+1 ),
-     $                      LDWRKR )
+*     End of ZUNGHR
 *
-*              Generate Q in A
-*              (CWorkspace: need 2*N, prefer N+N*NB)
-*              (RWorkspace: 0)
+      END
+*> \brief \b ZUNGL2 generates all or part of the unitary matrix Q from an LQ factorization determined by cgelqf (unblocked algorithm).
 *
-               CALL ZUNGQR( M, N, N, A, LDA, WORK( ITAU ),
-     $                      WORK( NWORK ), LWORK-NWORK+1, IERR )
-               IE = 1
-               ITAUQ = ITAU
-               ITAUP = ITAUQ + N
-               NWORK = ITAUP + N
+*  =========== DOCUMENTATION ===========
 *
-*              Bidiagonalize R in WORK(IR)
-*              (CWorkspace: need N*N+3*N, prefer M*N+2*N+2*N*NB)
-*              (RWorkspace: need N)
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
-               CALL ZGEBRD( N, N, WORK( IR ), LDWRKR, S, RWORK( IE ),
-     $                      WORK( ITAUQ ), WORK( ITAUP ), WORK( NWORK ),
-     $                      LWORK-NWORK+1, IERR )
+*> \htmlonly
+*> Download ZUNGL2 + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/zungl2.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/zungl2.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/zungl2.f">
+*> [TXT]</a>
+*> \endhtmlonly
 *
-*              Perform bidiagonal SVD, computing left singular vectors
-*              of R in WORK(IRU) and computing right singular vectors
-*              of R in WORK(IRVT)
-*              (CWorkspace: need 0)
-*              (RWorkspace: need BDSPAC)
+*  Definition:
+*  ===========
 *
-               IRU = IE + N
-               IRVT = IRU + N*N
-               NRWORK = IRVT + N*N
-               CALL DBDSDC( 'U', 'I', N, S, RWORK( IE ), RWORK( IRU ),
-     $                      N, RWORK( IRVT ), N, DUM, IDUM,
-     $                      RWORK( NRWORK ), IWORK, INFO )
+*       SUBROUTINE ZUNGL2( M, N, K, A, LDA, TAU, WORK, INFO )
 *
-*              Copy real matrix RWORK(IRU) to complex matrix WORK(IU)
-*              Overwrite WORK(IU) by the left singular vectors of R
-*              (CWorkspace: need 2*N*N+3*N, prefer M*N+N*N+2*N+N*NB)
-*              (RWorkspace: 0)
+*       .. Scalar Arguments ..
+*       INTEGER            INFO, K, LDA, M, N
+*       ..
+*       .. Array Arguments ..
+*       COMPLEX*16         A( LDA, * ), TAU( * ), WORK( * )
+*       ..
 *
-               CALL ZLACP2( 'F', N, N, RWORK( IRU ), N, WORK( IU ),
-     $                      LDWRKU )
-               CALL ZUNMBR( 'Q', 'L', 'N', N, N, N, WORK( IR ), LDWRKR,
-     $                      WORK( ITAUQ ), WORK( IU ), LDWRKU,
-     $                      WORK( NWORK ), LWORK-NWORK+1, IERR )
 *
-*              Copy real matrix RWORK(IRVT) to complex matrix VT
-*              Overwrite VT by the right singular vectors of R
-*              (CWorkspace: need N*N+3*N, prefer M*N+2*N+N*NB)
-*              (RWorkspace: 0)
+*> \par Purpose:
+*  =============
+*>
+*> \verbatim
+*>
+*> ZUNGL2 generates an m-by-n complex matrix Q with orthonormal rows,
+*> which is defined as the first m rows of a product of k elementary
+*> reflectors of order n
+*>
+*>       Q  =  H(k)**H . . . H(2)**H H(1)**H
+*>
+*> as returned by ZGELQF.
+*> \endverbatim
 *
-               CALL ZLACP2( 'F', N, N, RWORK( IRVT ), N, VT, LDVT )
-               CALL ZUNMBR( 'P', 'R', 'C', N, N, N, WORK( IR ), LDWRKR,
-     $                      WORK( ITAUP ), VT, LDVT, WORK( NWORK ),
-     $                      LWORK-NWORK+1, IERR )
+*  Arguments:
+*  ==========
 *
-*              Multiply Q in A by left singular vectors of R in
-*              WORK(IU), storing result in WORK(IR) and copying to A
-*              (CWorkspace: need 2*N*N, prefer N*N+M*N)
-*              (RWorkspace: 0)
+*> \param[in] M
+*> \verbatim
+*>          M is INTEGER
+*>          The number of rows of the matrix Q. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*>          N is INTEGER
+*>          The number of columns of the matrix Q. N >= M.
+*> \endverbatim
+*>
+*> \param[in] K
+*> \verbatim
+*>          K is INTEGER
+*>          The number of elementary reflectors whose product defines the
+*>          matrix Q. M >= K >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*>          A is COMPLEX*16 array, dimension (LDA,N)
+*>          On entry, the i-th row must contain the vector which defines
+*>          the elementary reflector H(i), for i = 1,2,...,k, as returned
+*>          by ZGELQF in the first k rows of its array argument A.
+*>          On exit, the m by n matrix Q.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*>          LDA is INTEGER
+*>          The first dimension of the array A. LDA >= max(1,M).
+*> \endverbatim
+*>
+*> \param[in] TAU
+*> \verbatim
+*>          TAU is COMPLEX*16 array, dimension (K)
+*>          TAU(i) must contain the scalar factor of the elementary
+*>          reflector H(i), as returned by ZGELQF.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*>          WORK is COMPLEX*16 array, dimension (M)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*>          INFO is INTEGER
+*>          = 0: successful exit
+*>          < 0: if INFO = -i, the i-th argument has an illegal value
+*> \endverbatim
 *
-               DO 10 I = 1, M, LDWRKR
-                  CHUNK = MIN( M-I+1, LDWRKR )
-                  CALL ZGEMM( 'N', 'N', CHUNK, N, N, CONE, A( I, 1 ),
-     $                        LDA, WORK( IU ), LDWRKU, CZERO,
-     $                        WORK( IR ), LDWRKR )
-                  CALL ZLACPY( 'F', CHUNK, N, WORK( IR ), LDWRKR,
-     $                         A( I, 1 ), LDA )
-   10          CONTINUE
+*  Authors:
+*  ========
 *
-            ELSE IF( WNTQS ) THEN
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*              Path 3 (M much larger than N, JOBZ='S')
-*              N left singular vectors to be computed in U and
-*              N right singular vectors to be computed in VT
+*> \date December 2016
 *
-               IR = 1
+*> \ingroup complex16OTHERcomputational
 *
-*              WORK(IR) is N by N
+*  =====================================================================
+      SUBROUTINE ZUNGL2( M, N, K, A, LDA, TAU, WORK, INFO )
 *
-               LDWRKR = N
-               ITAU = IR + LDWRKR*N
-               NWORK = ITAU + N
+*  -- LAPACK computational routine (version 3.7.0) --
+*  -- LAPACK is a software package provided by Univ. of Tennessee,    --
+*  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+*     December 2016
 *
-*              Compute A=Q*R
-*              (CWorkspace: need N*N+2*N, prefer N*N+N+N*NB)
-*              (RWorkspace: 0)
+*     .. Scalar Arguments ..
+      INTEGER            INFO, K, LDA, M, N
+*     ..
+*     .. Array Arguments ..
+      COMPLEX*16         A( LDA, * ), TAU( * ), WORK( * )
+*     ..
 *
-               CALL ZGEQRF( M, N, A, LDA, WORK( ITAU ), WORK( NWORK ),
-     $                      LWORK-NWORK+1, IERR )
+*  =====================================================================
 *
-*              Copy R to WORK(IR), zeroing out below it
+*     .. Parameters ..
+      COMPLEX*16         ONE, ZERO
+      PARAMETER          ( ONE = ( 1.0D+0, 0.0D+0 ),
+     $                   ZERO = ( 0.0D+0, 0.0D+0 ) )
+*     ..
+*     .. Local Scalars ..
+      INTEGER            I, J, L
+*     ..
+*     .. External Subroutines ..
+      EXTERNAL           XERBLA, ZLACGV, ZLARF, ZSCAL
+*     ..
+*     .. Intrinsic Functions ..
+      INTRINSIC          DCONJG, MAX
+*     ..
+*     .. Executable Statements ..
 *
-               CALL ZLACPY( 'U', N, N, A, LDA, WORK( IR ), LDWRKR )
-               CALL ZLASET( 'L', N-1, N-1, CZERO, CZERO, WORK( IR+1 ),
-     $                      LDWRKR )
+*     Test the input arguments
 *
-*              Generate Q in A
-*              (CWorkspace: need 2*N, prefer N+N*NB)
-*              (RWorkspace: 0)
+      INFO = 0
+      IF( M.LT.0 ) THEN
+         INFO = -1
+      ELSE IF( N.LT.M ) THEN
+         INFO = -2
+      ELSE IF( K.LT.0 .OR. K.GT.M ) THEN
+         INFO = -3
+      ELSE IF( LDA.LT.MAX( 1, M ) ) THEN
+         INFO = -5
+      END IF
+      IF( INFO.NE.0 ) THEN
+         CALL XERBLA( 'ZUNGL2', -INFO )
+         RETURN
+      END IF
 *
-               CALL ZUNGQR( M, N, N, A, LDA, WORK( ITAU ),
-     $                      WORK( NWORK ), LWORK-NWORK+1, IERR )
-               IE = 1
-               ITAUQ = ITAU
-               ITAUP = ITAUQ + N
-               NWORK = ITAUP + N
+*     Quick return if possible
 *
-*              Bidiagonalize R in WORK(IR)
-*              (CWorkspace: need N*N+3*N, prefer N*N+2*N+2*N*NB)
-*              (RWorkspace: need N)
+      IF( M.LE.0 )
+     $   RETURN
 *
-               CALL ZGEBRD( N, N, WORK( IR ), LDWRKR, S, RWORK( IE ),
-     $                      WORK( ITAUQ ), WORK( ITAUP ), WORK( NWORK ),
-     $                      LWORK-NWORK+1, IERR )
+      IF( K.LT.M ) THEN
 *
-*              Perform bidiagonal SVD, computing left singular vectors
-*              of bidiagonal matrix in RWORK(IRU) and computing right
-*              singular vectors of bidiagonal matrix in RWORK(IRVT)
-*              (CWorkspace: need 0)
-*              (RWorkspace: need BDSPAC)
+*        Initialise rows k+1:m to rows of the unit matrix
 *
-               IRU = IE + N
-               IRVT = IRU + N*N
-               NRWORK = IRVT + N*N
-               CALL DBDSDC( 'U', 'I', N, S, RWORK( IE ), RWORK( IRU ),
-     $                      N, RWORK( IRVT ), N, DUM, IDUM,
-     $                      RWORK( NRWORK ), IWORK, INFO )
+         DO 20 J = 1, N
+            DO 10 L = K + 1, M
+               A( L, J ) = ZERO
+   10       CONTINUE
+            IF( J.GT.K .AND. J.LE.M )
+     $         A( J, J ) = ONE
+   20    CONTINUE
+      END IF
 *
-*              Copy real matrix RWORK(IRU) to complex matrix U
-*              Overwrite U by left singular vectors of R
-*              (CWorkspace: need N*N+3*N, prefer N*N+2*N+N*NB)
-*              (RWorkspace: 0)
+      DO 40 I = K, 1, -1
 *
-               CALL ZLACP2( 'F', N, N, RWORK( IRU ), N, U, LDU )
-               CALL ZUNMBR( 'Q', 'L', 'N', N, N, N, WORK( IR ), LDWRKR,
-     $                      WORK( ITAUQ ), U, LDU, WORK( NWORK ),
-     $                      LWORK-NWORK+1, IERR )
+*        Apply H(i)**H to A(i:m,i:n) from the right
 *
-*              Copy real matrix RWORK(IRVT) to complex matrix VT
-*              Overwrite VT by right singular vectors of R
-*              (CWorkspace: need N*N+3*N, prefer N*N+2*N+N*NB)
-*              (RWorkspace: 0)
+         IF( I.LT.N ) THEN
+            CALL ZLACGV( N-I, A( I, I+1 ), LDA )
+            IF( I.LT.M ) THEN
+               A( I, I ) = ONE
+               CALL ZLARF( 'Right', M-I, N-I+1, A( I, I ), LDA,
+     $                     DCONJG( TAU( I ) ), A( I+1, I ), LDA, WORK )
+            END IF
+            CALL ZSCAL( N-I, -TAU( I ), A( I, I+1 ), LDA )
+            CALL ZLACGV( N-I, A( I, I+1 ), LDA )
+         END IF
+         A( I, I ) = ONE - DCONJG( TAU( I ) )
 *
-               CALL ZLACP2( 'F', N, N, RWORK( IRVT ), N, VT, LDVT )
-               CALL ZUNMBR( 'P', 'R', 'C', N, N, N, WORK( IR ), LDWRKR,
-     $                      WORK( ITAUP ), VT, LDVT, WORK( NWORK ),
-     $                      LWORK-NWORK+1, IERR )
+*        Set A(i,1:i-1) to zero
 *
-*              Multiply Q in A by left singular vectors of R in
-*              WORK(IR), storing result in U
-*              (CWorkspace: need N*N)
-*              (RWorkspace: 0)
+         DO 30 L = 1, I - 1
+            A( I, L ) = ZERO
+   30    CONTINUE
+   40 CONTINUE
+      RETURN
 *
-               CALL ZLACPY( 'F', N, N, U, LDU, WORK( IR ), LDWRKR )
-               CALL ZGEMM( 'N', 'N', M, N, N, CONE, A, LDA, WORK( IR ),
-     $                     LDWRKR, CZERO, U, LDU )
+*     End of ZUNGL2
 *
-            ELSE IF( WNTQA ) THEN
+      END
+*> \brief \b ZUNGLQ
 *
-*              Path 4 (M much larger than N, JOBZ='A')
-*              M left singular vectors to be computed in U and
-*              N right singular vectors to be computed in VT
+*  =========== DOCUMENTATION ===========
 *
-               IU = 1
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
-*              WORK(IU) is N by N
+*> \htmlonly
+*> Download ZUNGLQ + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/zunglq.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/zunglq.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/zunglq.f">
+*> [TXT]</a>
+*> \endhtmlonly
 *
-               LDWRKU = N
-               ITAU = IU + LDWRKU*N
-               NWORK = ITAU + N
+*  Definition:
+*  ===========
 *
-*              Compute A=Q*R, copying result to U
-*              (CWorkspace: need 2*N, prefer N+N*NB)
-*              (RWorkspace: 0)
+*       SUBROUTINE ZUNGLQ( M, N, K, A, LDA, TAU, WORK, LWORK, INFO )
 *
-               CALL ZGEQRF( M, N, A, LDA, WORK( ITAU ), WORK( NWORK ),
-     $                      LWORK-NWORK+1, IERR )
-               CALL ZLACPY( 'L', M, N, A, LDA, U, LDU )
+*       .. Scalar Arguments ..
+*       INTEGER            INFO, K, LDA, LWORK, M, N
+*       ..
+*       .. Array Arguments ..
+*       COMPLEX*16         A( LDA, * ), TAU( * ), WORK( * )
+*       ..
 *
-*              Generate Q in U
-*              (CWorkspace: need N+M, prefer N+M*NB)
-*              (RWorkspace: 0)
 *
-               CALL ZUNGQR( M, M, N, U, LDU, WORK( ITAU ),
-     $                      WORK( NWORK ), LWORK-NWORK+1, IERR )
+*> \par Purpose:
+*  =============
+*>
+*> \verbatim
+*>
+*> ZUNGLQ generates an M-by-N complex matrix Q with orthonormal rows,
+*> which is defined as the first M rows of a product of K elementary
+*> reflectors of order N
+*>
+*>       Q  =  H(k)**H . . . H(2)**H H(1)**H
+*>
+*> as returned by ZGELQF.
+*> \endverbatim
 *
-*              Produce R in A, zeroing out below it
+*  Arguments:
+*  ==========
 *
-               CALL ZLASET( 'L', N-1, N-1, CZERO, CZERO, A( 2, 1 ),
-     $                      LDA )
-               IE = 1
-               ITAUQ = ITAU
-               ITAUP = ITAUQ + N
-               NWORK = ITAUP + N
+*> \param[in] M
+*> \verbatim
+*>          M is INTEGER
+*>          The number of rows of the matrix Q. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*>          N is INTEGER
+*>          The number of columns of the matrix Q. N >= M.
+*> \endverbatim
+*>
+*> \param[in] K
+*> \verbatim
+*>          K is INTEGER
+*>          The number of elementary reflectors whose product defines the
+*>          matrix Q. M >= K >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*>          A is COMPLEX*16 array, dimension (LDA,N)
+*>          On entry, the i-th row must contain the vector which defines
+*>          the elementary reflector H(i), for i = 1,2,...,k, as returned
+*>          by ZGELQF in the first k rows of its array argument A.
+*>          On exit, the M-by-N matrix Q.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*>          LDA is INTEGER
+*>          The first dimension of the array A. LDA >= max(1,M).
+*> \endverbatim
+*>
+*> \param[in] TAU
+*> \verbatim
+*>          TAU is COMPLEX*16 array, dimension (K)
+*>          TAU(i) must contain the scalar factor of the elementary
+*>          reflector H(i), as returned by ZGELQF.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*>          WORK is COMPLEX*16 array, dimension (MAX(1,LWORK))
+*>          On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*>          LWORK is INTEGER
+*>          The dimension of the array WORK. LWORK >= max(1,M).
+*>          For optimum performance LWORK >= M*NB, where NB is
+*>          the optimal blocksize.
+*>
+*>          If LWORK = -1, then a workspace query is assumed; the routine
+*>          only calculates the optimal size of the WORK array, returns
+*>          this value as the first entry of the WORK array, and no error
+*>          message related to LWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*>          INFO is INTEGER
+*>          = 0:  successful exit;
+*>          < 0:  if INFO = -i, the i-th argument has an illegal value
+*> \endverbatim
 *
-*              Bidiagonalize R in A
-*              (CWorkspace: need 3*N, prefer 2*N+2*N*NB)
-*              (RWorkspace: need N)
+*  Authors:
+*  ========
 *
-               CALL ZGEBRD( N, N, A, LDA, S, RWORK( IE ), WORK( ITAUQ ),
-     $                      WORK( ITAUP ), WORK( NWORK ), LWORK-NWORK+1,
-     $                      IERR )
-               IRU = IE + N
-               IRVT = IRU + N*N
-               NRWORK = IRVT + N*N
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*              Perform bidiagonal SVD, computing left singular vectors
-*              of bidiagonal matrix in RWORK(IRU) and computing right
-*              singular vectors of bidiagonal matrix in RWORK(IRVT)
-*              (CWorkspace: need 0)
-*              (RWorkspace: need BDSPAC)
+*> \date December 2016
 *
-               CALL DBDSDC( 'U', 'I', N, S, RWORK( IE ), RWORK( IRU ),
-     $                      N, RWORK( IRVT ), N, DUM, IDUM,
-     $                      RWORK( NRWORK ), IWORK, INFO )
+*> \ingroup complex16OTHERcomputational
 *
-*              Copy real matrix RWORK(IRU) to complex matrix WORK(IU)
-*              Overwrite WORK(IU) by left singular vectors of R
-*              (CWorkspace: need N*N+3*N, prefer N*N+2*N+N*NB)
-*              (RWorkspace: 0)
+*  =====================================================================
+      SUBROUTINE ZUNGLQ( M, N, K, A, LDA, TAU, WORK, LWORK, INFO )
 *
-               CALL ZLACP2( 'F', N, N, RWORK( IRU ), N, WORK( IU ),
-     $                      LDWRKU )
-               CALL ZUNMBR( 'Q', 'L', 'N', N, N, N, A, LDA,
-     $                      WORK( ITAUQ ), WORK( IU ), LDWRKU,
-     $                      WORK( NWORK ), LWORK-NWORK+1, IERR )
+*  -- LAPACK computational routine (version 3.7.0) --
+*  -- LAPACK is a software package provided by Univ. of Tennessee,    --
+*  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+*     December 2016
 *
-*              Copy real matrix RWORK(IRVT) to complex matrix VT
-*              Overwrite VT by right singular vectors of R
-*              (CWorkspace: need 3*N, prefer 2*N+N*NB)
-*              (RWorkspace: 0)
+*     .. Scalar Arguments ..
+      INTEGER            INFO, K, LDA, LWORK, M, N
+*     ..
+*     .. Array Arguments ..
+      COMPLEX*16         A( LDA, * ), TAU( * ), WORK( * )
+*     ..
 *
-               CALL ZLACP2( 'F', N, N, RWORK( IRVT ), N, VT, LDVT )
-               CALL ZUNMBR( 'P', 'R', 'C', N, N, N, A, LDA,
-     $                      WORK( ITAUP ), VT, LDVT, WORK( NWORK ),
-     $                      LWORK-NWORK+1, IERR )
+*  =====================================================================
 *
-*              Multiply Q in U by left singular vectors of R in
-*              WORK(IU), storing result in A
-*              (CWorkspace: need N*N)
-*              (RWorkspace: 0)
+*     .. Parameters ..
+      COMPLEX*16         ZERO
+      PARAMETER          ( ZERO = ( 0.0D+0, 0.0D+0 ) )
+*     ..
+*     .. Local Scalars ..
+      LOGICAL            LQUERY
+      INTEGER            I, IB, IINFO, IWS, J, KI, KK, L, LDWORK,
+     $                   LWKOPT, NB, NBMIN, NX
+*     ..
+*     .. External Subroutines ..
+      EXTERNAL           XERBLA, ZLARFB, ZLARFT, ZUNGL2
+*     ..
+*     .. Intrinsic Functions ..
+      INTRINSIC          MAX, MIN
+*     ..
+*     .. External Functions ..
+      INTEGER            ILAENV
+      EXTERNAL           ILAENV
+*     ..
+*     .. Executable Statements ..
 *
-               CALL ZGEMM( 'N', 'N', M, N, N, CONE, U, LDU, WORK( IU ),
-     $                     LDWRKU, CZERO, A, LDA )
+*     Test the input arguments
 *
-*              Copy left singular vectors of A from A to U
+      INFO = 0
+      NB = ILAENV( 1, 'ZUNGLQ', ' ', M, N, K, -1 )
+      LWKOPT = MAX( 1, M )*NB
+      WORK( 1 ) = LWKOPT
+      LQUERY = ( LWORK.EQ.-1 )
+      IF( M.LT.0 ) THEN
+         INFO = -1
+      ELSE IF( N.LT.M ) THEN
+         INFO = -2
+      ELSE IF( K.LT.0 .OR. K.GT.M ) THEN
+         INFO = -3
+      ELSE IF( LDA.LT.MAX( 1, M ) ) THEN
+         INFO = -5
+      ELSE IF( LWORK.LT.MAX( 1, M ) .AND. .NOT.LQUERY ) THEN
+         INFO = -8
+      END IF
+      IF( INFO.NE.0 ) THEN
+         CALL XERBLA( 'ZUNGLQ', -INFO )
+         RETURN
+      ELSE IF( LQUERY ) THEN
+         RETURN
+      END IF
 *
-               CALL ZLACPY( 'F', M, N, A, LDA, U, LDU )
+*     Quick return if possible
 *
-            END IF
+      IF( M.LE.0 ) THEN
+         WORK( 1 ) = 1
+         RETURN
+      END IF
 *
-         ELSE IF( M.GE.MNTHR2 ) THEN
+      NBMIN = 2
+      NX = 0
+      IWS = M
+      IF( NB.GT.1 .AND. NB.LT.K ) THEN
+*
+*        Determine when to cross over from blocked to unblocked code.
 *
-*           MNTHR2 <= M < MNTHR1
+         NX = MAX( 0, ILAENV( 3, 'ZUNGLQ', ' ', M, N, K, -1 ) )
+         IF( NX.LT.K ) THEN
 *
-*           Path 5 (M much larger than N, but not as much as MNTHR1)
-*           Reduce to bidiagonal form without QR decomposition, use
-*           ZUNGBR and matrix multiplication to compute singular vectors
+*           Determine if workspace is large enough for blocked code.
 *
-            IE = 1
-            NRWORK = IE + N
-            ITAUQ = 1
-            ITAUP = ITAUQ + N
-            NWORK = ITAUP + N
+            LDWORK = M
+            IWS = LDWORK*NB
+            IF( LWORK.LT.IWS ) THEN
 *
-*           Bidiagonalize A
-*           (CWorkspace: need 2*N+M, prefer 2*N+(M+N)*NB)
-*           (RWorkspace: need N)
+*              Not enough workspace to use optimal NB:  reduce NB and
+*              determine the minimum value of NB.
 *
-            CALL ZGEBRD( M, N, A, LDA, S, RWORK( IE ), WORK( ITAUQ ),
-     $                   WORK( ITAUP ), WORK( NWORK ), LWORK-NWORK+1,
-     $                   IERR )
-            IF( WNTQN ) THEN
+               NB = LWORK / LDWORK
+               NBMIN = MAX( 2, ILAENV( 2, 'ZUNGLQ', ' ', M, N, K, -1 ) )
+            END IF
+         END IF
+      END IF
 *
-*              Compute singular values only
-*              (Cworkspace: 0)
-*              (Rworkspace: need BDSPAN)
+      IF( NB.GE.NBMIN .AND. NB.LT.K .AND. NX.LT.K ) THEN
 *
-               CALL DBDSDC( 'U', 'N', N, S, RWORK( IE ), DUM, 1, DUM, 1,
-     $                      DUM, IDUM, RWORK( NRWORK ), IWORK, INFO )
-            ELSE IF( WNTQO ) THEN
-               IU = NWORK
-               IRU = NRWORK
-               IRVT = IRU + N*N
-               NRWORK = IRVT + N*N
+*        Use blocked code after the last block.
+*        The first kk rows are handled by the block method.
 *
-*              Copy A to VT, generate P**H
-*              (Cworkspace: need 2*N, prefer N+N*NB)
-*              (Rworkspace: 0)
+         KI = ( ( K-NX-1 ) / NB )*NB
+         KK = MIN( K, KI+NB )
 *
-               CALL ZLACPY( 'U', N, N, A, LDA, VT, LDVT )
-               CALL ZUNGBR( 'P', N, N, N, VT, LDVT, WORK( ITAUP ),
-     $                      WORK( NWORK ), LWORK-NWORK+1, IERR )
+*        Set A(kk+1:m,1:kk) to zero.
 *
-*              Generate Q in A
-*              (CWorkspace: need 2*N, prefer N+N*NB)
-*              (RWorkspace: 0)
+         DO 20 J = 1, KK
+            DO 10 I = KK + 1, M
+               A( I, J ) = ZERO
+   10       CONTINUE
+   20    CONTINUE
+      ELSE
+         KK = 0
+      END IF
 *
-               CALL ZUNGBR( 'Q', M, N, N, A, LDA, WORK( ITAUQ ),
-     $                      WORK( NWORK ), LWORK-NWORK+1, IERR )
+*     Use unblocked code for the last or only block.
 *
-               IF( LWORK.GE.M*N+3*N ) THEN
+      IF( KK.LT.M )
+     $   CALL ZUNGL2( M-KK, N-KK, K-KK, A( KK+1, KK+1 ), LDA,
+     $                TAU( KK+1 ), WORK, IINFO )
 *
-*                 WORK( IU ) is M by N
+      IF( KK.GT.0 ) THEN
 *
-                  LDWRKU = M
-               ELSE
+*        Use blocked code
 *
-*                 WORK(IU) is LDWRKU by N
+         DO 50 I = KI + 1, 1, -NB
+            IB = MIN( NB, K-I+1 )
+            IF( I+IB.LE.M ) THEN
 *
-                  LDWRKU = ( LWORK-3*N ) / N
-               END IF
-               NWORK = IU + LDWRKU*N
+*              Form the triangular factor of the block reflector
+*              H = H(i) H(i+1) . . . H(i+ib-1)
 *
-*              Perform bidiagonal SVD, computing left singular vectors
-*              of bidiagonal matrix in RWORK(IRU) and computing right
-*              singular vectors of bidiagonal matrix in RWORK(IRVT)
-*              (CWorkspace: need 0)
-*              (RWorkspace: need BDSPAC)
+               CALL ZLARFT( 'Forward', 'Rowwise', N-I+1, IB, A( I, I ),
+     $                      LDA, TAU( I ), WORK, LDWORK )
 *
-               CALL DBDSDC( 'U', 'I', N, S, RWORK( IE ), RWORK( IRU ),
-     $                      N, RWORK( IRVT ), N, DUM, IDUM,
-     $                      RWORK( NRWORK ), IWORK, INFO )
+*              Apply H**H to A(i+ib:m,i:n) from the right
 *
-*              Multiply real matrix RWORK(IRVT) by P**H in VT,
-*              storing the result in WORK(IU), copying to VT
-*              (Cworkspace: need 0)
-*              (Rworkspace: need 3*N*N)
+               CALL ZLARFB( 'Right', 'Conjugate transpose', 'Forward',
+     $                      'Rowwise', M-I-IB+1, N-I+1, IB, A( I, I ),
+     $                      LDA, WORK, LDWORK, A( I+IB, I ), LDA,
+     $                      WORK( IB+1 ), LDWORK )
+            END IF
 *
-               CALL ZLARCM( N, N, RWORK( IRVT ), N, VT, LDVT,
-     $                      WORK( IU ), LDWRKU, RWORK( NRWORK ) )
-               CALL ZLACPY( 'F', N, N, WORK( IU ), LDWRKU, VT, LDVT )
+*           Apply H**H to columns i:n of current block
 *
-*              Multiply Q in A by real matrix RWORK(IRU), storing the
-*              result in WORK(IU), copying to A
-*              (CWorkspace: need N*N, prefer M*N)
-*              (Rworkspace: need 3*N*N, prefer N*N+2*M*N)
+            CALL ZUNGL2( IB, N-I+1, IB, A( I, I ), LDA, TAU( I ), WORK,
+     $                   IINFO )
 *
-               NRWORK = IRVT
-               DO 20 I = 1, M, LDWRKU
-                  CHUNK = MIN( M-I+1, LDWRKU )
-                  CALL ZLACRM( CHUNK, N, A( I, 1 ), LDA, RWORK( IRU ),
-     $                         N, WORK( IU ), LDWRKU, RWORK( NRWORK ) )
-                  CALL ZLACPY( 'F', CHUNK, N, WORK( IU ), LDWRKU,
-     $                         A( I, 1 ), LDA )
-   20          CONTINUE
+*           Set columns 1:i-1 of current block to zero
 *
-            ELSE IF( WNTQS ) THEN
+            DO 40 J = 1, I - 1
+               DO 30 L = I, I + IB - 1
+                  A( L, J ) = ZERO
+   30          CONTINUE
+   40       CONTINUE
+   50    CONTINUE
+      END IF
 *
-*              Copy A to VT, generate P**H
-*              (Cworkspace: need 2*N, prefer N+N*NB)
-*              (Rworkspace: 0)
+      WORK( 1 ) = IWS
+      RETURN
 *
-               CALL ZLACPY( 'U', N, N, A, LDA, VT, LDVT )
-               CALL ZUNGBR( 'P', N, N, N, VT, LDVT, WORK( ITAUP ),
-     $                      WORK( NWORK ), LWORK-NWORK+1, IERR )
+*     End of ZUNGLQ
 *
-*              Copy A to U, generate Q
-*              (Cworkspace: need 2*N, prefer N+N*NB)
-*              (Rworkspace: 0)
+      END
+*> \brief \b ZUNGQL
 *
-               CALL ZLACPY( 'L', M, N, A, LDA, U, LDU )
-               CALL ZUNGBR( 'Q', M, N, N, U, LDU, WORK( ITAUQ ),
-     $                      WORK( NWORK ), LWORK-NWORK+1, IERR )
+*  =========== DOCUMENTATION ===========
 *
-*              Perform bidiagonal SVD, computing left singular vectors
-*              of bidiagonal matrix in RWORK(IRU) and computing right
-*              singular vectors of bidiagonal matrix in RWORK(IRVT)
-*              (CWorkspace: need 0)
-*              (RWorkspace: need BDSPAC)
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
-               IRU = NRWORK
-               IRVT = IRU + N*N
-               NRWORK = IRVT + N*N
-               CALL DBDSDC( 'U', 'I', N, S, RWORK( IE ), RWORK( IRU ),
-     $                      N, RWORK( IRVT ), N, DUM, IDUM,
-     $                      RWORK( NRWORK ), IWORK, INFO )
+*> \htmlonly
+*> Download ZUNGQL + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/zungql.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/zungql.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/zungql.f">
+*> [TXT]</a>
+*> \endhtmlonly
 *
-*              Multiply real matrix RWORK(IRVT) by P**H in VT,
-*              storing the result in A, copying to VT
-*              (Cworkspace: need 0)
-*              (Rworkspace: need 3*N*N)
+*  Definition:
+*  ===========
 *
-               CALL ZLARCM( N, N, RWORK( IRVT ), N, VT, LDVT, A, LDA,
-     $                      RWORK( NRWORK ) )
-               CALL ZLACPY( 'F', N, N, A, LDA, VT, LDVT )
+*       SUBROUTINE ZUNGQL( M, N, K, A, LDA, TAU, WORK, LWORK, INFO )
 *
-*              Multiply Q in U by real matrix RWORK(IRU), storing the
-*              result in A, copying to U
-*              (CWorkspace: need 0)
-*              (Rworkspace: need N*N+2*M*N)
+*       .. Scalar Arguments ..
+*       INTEGER            INFO, K, LDA, LWORK, M, N
+*       ..
+*       .. Array Arguments ..
+*       COMPLEX*16         A( LDA, * ), TAU( * ), WORK( * )
+*       ..
 *
-               NRWORK = IRVT
-               CALL ZLACRM( M, N, U, LDU, RWORK( IRU ), N, A, LDA,
-     $                      RWORK( NRWORK ) )
-               CALL ZLACPY( 'F', M, N, A, LDA, U, LDU )
-            ELSE
 *
-*              Copy A to VT, generate P**H
-*              (Cworkspace: need 2*N, prefer N+N*NB)
-*              (Rworkspace: 0)
+*> \par Purpose:
+*  =============
+*>
+*> \verbatim
+*>
+*> ZUNGQL generates an M-by-N complex matrix Q with orthonormal columns,
+*> which is defined as the last N columns of a product of K elementary
+*> reflectors of order M
+*>
+*>       Q  =  H(k) . . . H(2) H(1)
+*>
+*> as returned by ZGEQLF.
+*> \endverbatim
 *
-               CALL ZLACPY( 'U', N, N, A, LDA, VT, LDVT )
-               CALL ZUNGBR( 'P', N, N, N, VT, LDVT, WORK( ITAUP ),
-     $                      WORK( NWORK ), LWORK-NWORK+1, IERR )
+*  Arguments:
+*  ==========
 *
-*              Copy A to U, generate Q
-*              (Cworkspace: need 2*N, prefer N+N*NB)
-*              (Rworkspace: 0)
+*> \param[in] M
+*> \verbatim
+*>          M is INTEGER
+*>          The number of rows of the matrix Q. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*>          N is INTEGER
+*>          The number of columns of the matrix Q. M >= N >= 0.
+*> \endverbatim
+*>
+*> \param[in] K
+*> \verbatim
+*>          K is INTEGER
+*>          The number of elementary reflectors whose product defines the
+*>          matrix Q. N >= K >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*>          A is COMPLEX*16 array, dimension (LDA,N)
+*>          On entry, the (n-k+i)-th column must contain the vector which
+*>          defines the elementary reflector H(i), for i = 1,2,...,k, as
+*>          returned by ZGEQLF in the last k columns of its array
+*>          argument A.
+*>          On exit, the M-by-N matrix Q.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*>          LDA is INTEGER
+*>          The first dimension of the array A. LDA >= max(1,M).
+*> \endverbatim
+*>
+*> \param[in] TAU
+*> \verbatim
+*>          TAU is COMPLEX*16 array, dimension (K)
+*>          TAU(i) must contain the scalar factor of the elementary
+*>          reflector H(i), as returned by ZGEQLF.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*>          WORK is COMPLEX*16 array, dimension (MAX(1,LWORK))
+*>          On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*>          LWORK is INTEGER
+*>          The dimension of the array WORK. LWORK >= max(1,N).
+*>          For optimum performance LWORK >= N*NB, where NB is the
+*>          optimal blocksize.
+*>
+*>          If LWORK = -1, then a workspace query is assumed; the routine
+*>          only calculates the optimal size of the WORK array, returns
+*>          this value as the first entry of the WORK array, and no error
+*>          message related to LWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*>          INFO is INTEGER
+*>          = 0:  successful exit
+*>          < 0:  if INFO = -i, the i-th argument has an illegal value
+*> \endverbatim
 *
-               CALL ZLACPY( 'L', M, N, A, LDA, U, LDU )
-               CALL ZUNGBR( 'Q', M, M, N, U, LDU, WORK( ITAUQ ),
-     $                      WORK( NWORK ), LWORK-NWORK+1, IERR )
+*  Authors:
+*  ========
 *
-*              Perform bidiagonal SVD, computing left singular vectors
-*              of bidiagonal matrix in RWORK(IRU) and computing right
-*              singular vectors of bidiagonal matrix in RWORK(IRVT)
-*              (CWorkspace: need 0)
-*              (RWorkspace: need BDSPAC)
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-               IRU = NRWORK
-               IRVT = IRU + N*N
-               NRWORK = IRVT + N*N
-               CALL DBDSDC( 'U', 'I', N, S, RWORK( IE ), RWORK( IRU ),
-     $                      N, RWORK( IRVT ), N, DUM, IDUM,
-     $                      RWORK( NRWORK ), IWORK, INFO )
+*> \date December 2016
 *
-*              Multiply real matrix RWORK(IRVT) by P**H in VT,
-*              storing the result in A, copying to VT
-*              (Cworkspace: need 0)
-*              (Rworkspace: need 3*N*N)
+*> \ingroup complex16OTHERcomputational
 *
-               CALL ZLARCM( N, N, RWORK( IRVT ), N, VT, LDVT, A, LDA,
-     $                      RWORK( NRWORK ) )
-               CALL ZLACPY( 'F', N, N, A, LDA, VT, LDVT )
+*  =====================================================================
+      SUBROUTINE ZUNGQL( M, N, K, A, LDA, TAU, WORK, LWORK, INFO )
 *
-*              Multiply Q in U by real matrix RWORK(IRU), storing the
-*              result in A, copying to U
-*              (CWorkspace: 0)
-*              (Rworkspace: need 3*N*N)
+*  -- LAPACK computational routine (version 3.7.0) --
+*  -- LAPACK is a software package provided by Univ. of Tennessee,    --
+*  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+*     December 2016
 *
-               NRWORK = IRVT
-               CALL ZLACRM( M, N, U, LDU, RWORK( IRU ), N, A, LDA,
-     $                      RWORK( NRWORK ) )
-               CALL ZLACPY( 'F', M, N, A, LDA, U, LDU )
-            END IF
+*     .. Scalar Arguments ..
+      INTEGER            INFO, K, LDA, LWORK, M, N
+*     ..
+*     .. Array Arguments ..
+      COMPLEX*16         A( LDA, * ), TAU( * ), WORK( * )
+*     ..
 *
-         ELSE
+*  =====================================================================
 *
-*           M .LT. MNTHR2
+*     .. Parameters ..
+      COMPLEX*16         ZERO
+      PARAMETER          ( ZERO = ( 0.0D+0, 0.0D+0 ) )
+*     ..
+*     .. Local Scalars ..
+      LOGICAL            LQUERY
+      INTEGER            I, IB, IINFO, IWS, J, KK, L, LDWORK, LWKOPT,
+     $                   NB, NBMIN, NX
+*     ..
+*     .. External Subroutines ..
+      EXTERNAL           XERBLA, ZLARFB, ZLARFT, ZUNG2L
+*     ..
+*     .. Intrinsic Functions ..
+      INTRINSIC          MAX, MIN
+*     ..
+*     .. External Functions ..
+      INTEGER            ILAENV
+      EXTERNAL           ILAENV
+*     ..
+*     .. Executable Statements ..
 *
-*           Path 6 (M at least N, but not much larger)
-*           Reduce to bidiagonal form without QR decomposition
-*           Use ZUNMBR to compute singular vectors
+*     Test the input arguments
 *
-            IE = 1
-            NRWORK = IE + N
-            ITAUQ = 1
-            ITAUP = ITAUQ + N
-            NWORK = ITAUP + N
+      INFO = 0
+      LQUERY = ( LWORK.EQ.-1 )
+      IF( M.LT.0 ) THEN
+         INFO = -1
+      ELSE IF( N.LT.0 .OR. N.GT.M ) THEN
+         INFO = -2
+      ELSE IF( K.LT.0 .OR. K.GT.N ) THEN
+         INFO = -3
+      ELSE IF( LDA.LT.MAX( 1, M ) ) THEN
+         INFO = -5
+      END IF
 *
-*           Bidiagonalize A
-*           (CWorkspace: need 2*N+M, prefer 2*N+(M+N)*NB)
-*           (RWorkspace: need N)
+      IF( INFO.EQ.0 ) THEN
+         IF( N.EQ.0 ) THEN
+            LWKOPT = 1
+         ELSE
+            NB = ILAENV( 1, 'ZUNGQL', ' ', M, N, K, -1 )
+            LWKOPT = N*NB
+         END IF
+         WORK( 1 ) = LWKOPT
 *
-            CALL ZGEBRD( M, N, A, LDA, S, RWORK( IE ), WORK( ITAUQ ),
-     $                   WORK( ITAUP ), WORK( NWORK ), LWORK-NWORK+1,
-     $                   IERR )
-            IF( WNTQN ) THEN
+         IF( LWORK.LT.MAX( 1, N ) .AND. .NOT.LQUERY ) THEN
+            INFO = -8
+         END IF
+      END IF
 *
-*              Compute singular values only
-*              (Cworkspace: 0)
-*              (Rworkspace: need BDSPAN)
+      IF( INFO.NE.0 ) THEN
+         CALL XERBLA( 'ZUNGQL', -INFO )
+         RETURN
+      ELSE IF( LQUERY ) THEN
+         RETURN
+      END IF
 *
-               CALL DBDSDC( 'U', 'N', N, S, RWORK( IE ), DUM, 1, DUM, 1,
-     $                      DUM, IDUM, RWORK( NRWORK ), IWORK, INFO )
-            ELSE IF( WNTQO ) THEN
-               IU = NWORK
-               IRU = NRWORK
-               IRVT = IRU + N*N
-               NRWORK = IRVT + N*N
-               IF( LWORK.GE.M*N+3*N ) THEN
+*     Quick return if possible
 *
-*                 WORK( IU ) is M by N
+      IF( N.LE.0 ) THEN
+         RETURN
+      END IF
 *
-                  LDWRKU = M
-               ELSE
+      NBMIN = 2
+      NX = 0
+      IWS = N
+      IF( NB.GT.1 .AND. NB.LT.K ) THEN
 *
-*                 WORK( IU ) is LDWRKU by N
+*        Determine when to cross over from blocked to unblocked code.
 *
-                  LDWRKU = ( LWORK-3*N ) / N
-               END IF
-               NWORK = IU + LDWRKU*N
+         NX = MAX( 0, ILAENV( 3, 'ZUNGQL', ' ', M, N, K, -1 ) )
+         IF( NX.LT.K ) THEN
 *
-*              Perform bidiagonal SVD, computing left singular vectors
-*              of bidiagonal matrix in RWORK(IRU) and computing right
-*              singular vectors of bidiagonal matrix in RWORK(IRVT)
-*              (CWorkspace: need 0)
-*              (RWorkspace: need BDSPAC)
+*           Determine if workspace is large enough for blocked code.
 *
-               CALL DBDSDC( 'U', 'I', N, S, RWORK( IE ), RWORK( IRU ),
-     $                      N, RWORK( IRVT ), N, DUM, IDUM,
-     $                      RWORK( NRWORK ), IWORK, INFO )
+            LDWORK = N
+            IWS = LDWORK*NB
+            IF( LWORK.LT.IWS ) THEN
 *
-*              Copy real matrix RWORK(IRVT) to complex matrix VT
-*              Overwrite VT by right singular vectors of A
-*              (Cworkspace: need 2*N, prefer N+N*NB)
-*              (Rworkspace: need 0)
+*              Not enough workspace to use optimal NB:  reduce NB and
+*              determine the minimum value of NB.
 *
-               CALL ZLACP2( 'F', N, N, RWORK( IRVT ), N, VT, LDVT )
-               CALL ZUNMBR( 'P', 'R', 'C', N, N, N, A, LDA,
-     $                      WORK( ITAUP ), VT, LDVT, WORK( NWORK ),
-     $                      LWORK-NWORK+1, IERR )
+               NB = LWORK / LDWORK
+               NBMIN = MAX( 2, ILAENV( 2, 'ZUNGQL', ' ', M, N, K, -1 ) )
+            END IF
+         END IF
+      END IF
 *
-               IF( LWORK.GE.M*N+3*N ) THEN
+      IF( NB.GE.NBMIN .AND. NB.LT.K .AND. NX.LT.K ) THEN
 *
-*              Copy real matrix RWORK(IRU) to complex matrix WORK(IU)
-*              Overwrite WORK(IU) by left singular vectors of A, copying
-*              to A
-*              (Cworkspace: need M*N+2*N, prefer M*N+N+N*NB)
-*              (Rworkspace: need 0)
+*        Use blocked code after the first block.
+*        The last kk columns are handled by the block method.
 *
-                  CALL ZLASET( 'F', M, N, CZERO, CZERO, WORK( IU ),
-     $                         LDWRKU )
-                  CALL ZLACP2( 'F', N, N, RWORK( IRU ), N, WORK( IU ),
-     $                         LDWRKU )
-                  CALL ZUNMBR( 'Q', 'L', 'N', M, N, N, A, LDA,
-     $                         WORK( ITAUQ ), WORK( IU ), LDWRKU,
-     $                         WORK( NWORK ), LWORK-NWORK+1, IERR )
-                  CALL ZLACPY( 'F', M, N, WORK( IU ), LDWRKU, A, LDA )
-               ELSE
+         KK = MIN( K, ( ( K-NX+NB-1 ) / NB )*NB )
 *
-*                 Generate Q in A
-*                 (Cworkspace: need 2*N, prefer N+N*NB)
-*                 (Rworkspace: need 0)
+*        Set A(m-kk+1:m,1:n-kk) to zero.
 *
-                  CALL ZUNGBR( 'Q', M, N, N, A, LDA, WORK( ITAUQ ),
-     $                         WORK( NWORK ), LWORK-NWORK+1, IERR )
+         DO 20 J = 1, N - KK
+            DO 10 I = M - KK + 1, M
+               A( I, J ) = ZERO
+   10       CONTINUE
+   20    CONTINUE
+      ELSE
+         KK = 0
+      END IF
 *
-*                 Multiply Q in A by real matrix RWORK(IRU), storing the
-*                 result in WORK(IU), copying to A
-*                 (CWorkspace: need N*N, prefer M*N)
-*                 (Rworkspace: need 3*N*N, prefer N*N+2*M*N)
+*     Use unblocked code for the first or only block.
 *
-                  NRWORK = IRVT
-                  DO 30 I = 1, M, LDWRKU
-                     CHUNK = MIN( M-I+1, LDWRKU )
-                     CALL ZLACRM( CHUNK, N, A( I, 1 ), LDA,
-     $                            RWORK( IRU ), N, WORK( IU ), LDWRKU,
-     $                            RWORK( NRWORK ) )
-                     CALL ZLACPY( 'F', CHUNK, N, WORK( IU ), LDWRKU,
-     $                            A( I, 1 ), LDA )
-   30             CONTINUE
-               END IF
+      CALL ZUNG2L( M-KK, N-KK, K-KK, A, LDA, TAU, WORK, IINFO )
 *
-            ELSE IF( WNTQS ) THEN
+      IF( KK.GT.0 ) THEN
 *
-*              Perform bidiagonal SVD, computing left singular vectors
-*              of bidiagonal matrix in RWORK(IRU) and computing right
-*              singular vectors of bidiagonal matrix in RWORK(IRVT)
-*              (CWorkspace: need 0)
-*              (RWorkspace: need BDSPAC)
+*        Use blocked code
 *
-               IRU = NRWORK
-               IRVT = IRU + N*N
-               NRWORK = IRVT + N*N
-               CALL DBDSDC( 'U', 'I', N, S, RWORK( IE ), RWORK( IRU ),
-     $                      N, RWORK( IRVT ), N, DUM, IDUM,
-     $                      RWORK( NRWORK ), IWORK, INFO )
+         DO 50 I = K - KK + 1, K, NB
+            IB = MIN( NB, K-I+1 )
+            IF( N-K+I.GT.1 ) THEN
 *
-*              Copy real matrix RWORK(IRU) to complex matrix U
-*              Overwrite U by left singular vectors of A
-*              (CWorkspace: need 3*N, prefer 2*N+N*NB)
-*              (RWorkspace: 0)
+*              Form the triangular factor of the block reflector
+*              H = H(i+ib-1) . . . H(i+1) H(i)
 *
-               CALL ZLASET( 'F', M, N, CZERO, CZERO, U, LDU )
-               CALL ZLACP2( 'F', N, N, RWORK( IRU ), N, U, LDU )
-               CALL ZUNMBR( 'Q', 'L', 'N', M, N, N, A, LDA,
-     $                      WORK( ITAUQ ), U, LDU, WORK( NWORK ),
-     $                      LWORK-NWORK+1, IERR )
+               CALL ZLARFT( 'Backward', 'Columnwise', M-K+I+IB-1, IB,
+     $                      A( 1, N-K+I ), LDA, TAU( I ), WORK, LDWORK )
 *
-*              Copy real matrix RWORK(IRVT) to complex matrix VT
-*              Overwrite VT by right singular vectors of A
-*              (CWorkspace: need 3*N, prefer 2*N+N*NB)
-*              (RWorkspace: 0)
+*              Apply H to A(1:m-k+i+ib-1,1:n-k+i-1) from the left
 *
-               CALL ZLACP2( 'F', N, N, RWORK( IRVT ), N, VT, LDVT )
-               CALL ZUNMBR( 'P', 'R', 'C', N, N, N, A, LDA,
-     $                      WORK( ITAUP ), VT, LDVT, WORK( NWORK ),
-     $                      LWORK-NWORK+1, IERR )
-            ELSE
+               CALL ZLARFB( 'Left', 'No transpose', 'Backward',
+     $                      'Columnwise', M-K+I+IB-1, N-K+I-1, IB,
+     $                      A( 1, N-K+I ), LDA, WORK, LDWORK, A, LDA,
+     $                      WORK( IB+1 ), LDWORK )
+            END IF
 *
-*              Perform bidiagonal SVD, computing left singular vectors
-*              of bidiagonal matrix in RWORK(IRU) and computing right
-*              singular vectors of bidiagonal matrix in RWORK(IRVT)
-*              (CWorkspace: need 0)
-*              (RWorkspace: need BDSPAC)
+*           Apply H to rows 1:m-k+i+ib-1 of current block
 *
-               IRU = NRWORK
-               IRVT = IRU + N*N
-               NRWORK = IRVT + N*N
-               CALL DBDSDC( 'U', 'I', N, S, RWORK( IE ), RWORK( IRU ),
-     $                      N, RWORK( IRVT ), N, DUM, IDUM,
-     $                      RWORK( NRWORK ), IWORK, INFO )
+            CALL ZUNG2L( M-K+I+IB-1, IB, IB, A( 1, N-K+I ), LDA,
+     $                   TAU( I ), WORK, IINFO )
 *
-*              Set the right corner of U to identity matrix
+*           Set rows m-k+i+ib:m of current block to zero
 *
-               CALL ZLASET( 'F', M, M, CZERO, CZERO, U, LDU )
-               IF( M.GT.N ) THEN
-                  CALL ZLASET( 'F', M-N, M-N, CZERO, CONE,
-     $                         U( N+1, N+1 ), LDU )
-               END IF
+            DO 40 J = N - K + I, N - K + I + IB - 1
+               DO 30 L = M - K + I + IB, M
+                  A( L, J ) = ZERO
+   30          CONTINUE
+   40       CONTINUE
+   50    CONTINUE
+      END IF
 *
-*              Copy real matrix RWORK(IRU) to complex matrix U
-*              Overwrite U by left singular vectors of A
-*              (CWorkspace: need 2*N+M, prefer 2*N+M*NB)
-*              (RWorkspace: 0)
+      WORK( 1 ) = IWS
+      RETURN
 *
-               CALL ZLACP2( 'F', N, N, RWORK( IRU ), N, U, LDU )
-               CALL ZUNMBR( 'Q', 'L', 'N', M, M, N, A, LDA,
-     $                      WORK( ITAUQ ), U, LDU, WORK( NWORK ),
-     $                      LWORK-NWORK+1, IERR )
+*     End of ZUNGQL
 *
-*              Copy real matrix RWORK(IRVT) to complex matrix VT
-*              Overwrite VT by right singular vectors of A
-*              (CWorkspace: need 3*N, prefer 2*N+N*NB)
-*              (RWorkspace: 0)
+      END
+*> \brief \b ZUNGQR
 *
-               CALL ZLACP2( 'F', N, N, RWORK( IRVT ), N, VT, LDVT )
-               CALL ZUNMBR( 'P', 'R', 'C', N, N, N, A, LDA,
-     $                      WORK( ITAUP ), VT, LDVT, WORK( NWORK ),
-     $                      LWORK-NWORK+1, IERR )
-            END IF
+*  =========== DOCUMENTATION ===========
 *
-         END IF
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
-      ELSE
+*> \htmlonly
+*> Download ZUNGQR + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/zungqr.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/zungqr.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/zungqr.f">
+*> [TXT]</a>
+*> \endhtmlonly
 *
-*        A has more columns than rows. If A has sufficiently more
-*        columns than rows, first reduce using the LQ decomposition (if
-*        sufficient workspace available)
+*  Definition:
+*  ===========
 *
-         IF( N.GE.MNTHR1 ) THEN
+*       SUBROUTINE ZUNGQR( M, N, K, A, LDA, TAU, WORK, LWORK, INFO )
 *
-            IF( WNTQN ) THEN
+*       .. Scalar Arguments ..
+*       INTEGER            INFO, K, LDA, LWORK, M, N
+*       ..
+*       .. Array Arguments ..
+*       COMPLEX*16         A( LDA, * ), TAU( * ), WORK( * )
+*       ..
 *
-*              Path 1t (N much larger than M, JOBZ='N')
-*              No singular vectors to be computed
 *
-               ITAU = 1
-               NWORK = ITAU + M
+*> \par Purpose:
+*  =============
+*>
+*> \verbatim
+*>
+*> ZUNGQR generates an M-by-N complex matrix Q with orthonormal columns,
+*> which is defined as the first N columns of a product of K elementary
+*> reflectors of order M
+*>
+*>       Q  =  H(1) H(2) . . . H(k)
+*>
+*> as returned by ZGEQRF.
+*> \endverbatim
 *
-*              Compute A=L*Q
-*              (CWorkspace: need 2*M, prefer M+M*NB)
-*              (RWorkspace: 0)
+*  Arguments:
+*  ==========
 *
-               CALL ZGELQF( M, N, A, LDA, WORK( ITAU ), WORK( NWORK ),
-     $                      LWORK-NWORK+1, IERR )
+*> \param[in] M
+*> \verbatim
+*>          M is INTEGER
+*>          The number of rows of the matrix Q. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*>          N is INTEGER
+*>          The number of columns of the matrix Q. M >= N >= 0.
+*> \endverbatim
+*>
+*> \param[in] K
+*> \verbatim
+*>          K is INTEGER
+*>          The number of elementary reflectors whose product defines the
+*>          matrix Q. N >= K >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*>          A is COMPLEX*16 array, dimension (LDA,N)
+*>          On entry, the i-th column must contain the vector which
+*>          defines the elementary reflector H(i), for i = 1,2,...,k, as
+*>          returned by ZGEQRF in the first k columns of its array
+*>          argument A.
+*>          On exit, the M-by-N matrix Q.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*>          LDA is INTEGER
+*>          The first dimension of the array A. LDA >= max(1,M).
+*> \endverbatim
+*>
+*> \param[in] TAU
+*> \verbatim
+*>          TAU is COMPLEX*16 array, dimension (K)
+*>          TAU(i) must contain the scalar factor of the elementary
+*>          reflector H(i), as returned by ZGEQRF.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*>          WORK is COMPLEX*16 array, dimension (MAX(1,LWORK))
+*>          On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*>          LWORK is INTEGER
+*>          The dimension of the array WORK. LWORK >= max(1,N).
+*>          For optimum performance LWORK >= N*NB, where NB is the
+*>          optimal blocksize.
+*>
+*>          If LWORK = -1, then a workspace query is assumed; the routine
+*>          only calculates the optimal size of the WORK array, returns
+*>          this value as the first entry of the WORK array, and no error
+*>          message related to LWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*>          INFO is INTEGER
+*>          = 0:  successful exit
+*>          < 0:  if INFO = -i, the i-th argument has an illegal value
+*> \endverbatim
 *
-*              Zero out above L
+*  Authors:
+*  ========
 *
-               CALL ZLASET( 'U', M-1, M-1, CZERO, CZERO, A( 1, 2 ),
-     $                      LDA )
-               IE = 1
-               ITAUQ = 1
-               ITAUP = ITAUQ + M
-               NWORK = ITAUP + M
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*              Bidiagonalize L in A
-*              (CWorkspace: need 3*M, prefer 2*M+2*M*NB)
-*              (RWorkspace: need M)
+*> \date December 2016
 *
-               CALL ZGEBRD( M, M, A, LDA, S, RWORK( IE ), WORK( ITAUQ ),
-     $                      WORK( ITAUP ), WORK( NWORK ), LWORK-NWORK+1,
-     $                      IERR )
-               NRWORK = IE + M
+*> \ingroup complex16OTHERcomputational
 *
-*              Perform bidiagonal SVD, compute singular values only
-*              (CWorkspace: 0)
-*              (RWorkspace: need BDSPAN)
+*  =====================================================================
+      SUBROUTINE ZUNGQR( M, N, K, A, LDA, TAU, WORK, LWORK, INFO )
 *
-               CALL DBDSDC( 'U', 'N', M, S, RWORK( IE ), DUM, 1, DUM, 1,
-     $                      DUM, IDUM, RWORK( NRWORK ), IWORK, INFO )
+*  -- LAPACK computational routine (version 3.7.0) --
+*  -- LAPACK is a software package provided by Univ. of Tennessee,    --
+*  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+*     December 2016
 *
-            ELSE IF( WNTQO ) THEN
+*     .. Scalar Arguments ..
+      INTEGER            INFO, K, LDA, LWORK, M, N
+*     ..
+*     .. Array Arguments ..
+      COMPLEX*16         A( LDA, * ), TAU( * ), WORK( * )
+*     ..
 *
-*              Path 2t (N much larger than M, JOBZ='O')
-*              M right singular vectors to be overwritten on A and
-*              M left singular vectors to be computed in U
+*  =====================================================================
 *
-               IVT = 1
-               LDWKVT = M
+*     .. Parameters ..
+      COMPLEX*16         ZERO
+      PARAMETER          ( ZERO = ( 0.0D+0, 0.0D+0 ) )
+*     ..
+*     .. Local Scalars ..
+      LOGICAL            LQUERY
+      INTEGER            I, IB, IINFO, IWS, J, KI, KK, L, LDWORK,
+     $                   LWKOPT, NB, NBMIN, NX
+*     ..
+*     .. External Subroutines ..
+      EXTERNAL           XERBLA, ZLARFB, ZLARFT, ZUNG2R
+*     ..
+*     .. Intrinsic Functions ..
+      INTRINSIC          MAX, MIN
+*     ..
+*     .. External Functions ..
+      INTEGER            ILAENV
+      EXTERNAL           ILAENV
+*     ..
+*     .. Executable Statements ..
 *
-*              WORK(IVT) is M by M
+*     Test the input arguments
 *
-               IL = IVT + LDWKVT*M
-               IF( LWORK.GE.M*N+M*M+3*M ) THEN
+      INFO = 0
+      NB = ILAENV( 1, 'ZUNGQR', ' ', M, N, K, -1 )
+      LWKOPT = MAX( 1, N )*NB
+      WORK( 1 ) = LWKOPT
+      LQUERY = ( LWORK.EQ.-1 )
+      IF( M.LT.0 ) THEN
+         INFO = -1
+      ELSE IF( N.LT.0 .OR. N.GT.M ) THEN
+         INFO = -2
+      ELSE IF( K.LT.0 .OR. K.GT.N ) THEN
+         INFO = -3
+      ELSE IF( LDA.LT.MAX( 1, M ) ) THEN
+         INFO = -5
+      ELSE IF( LWORK.LT.MAX( 1, N ) .AND. .NOT.LQUERY ) THEN
+         INFO = -8
+      END IF
+      IF( INFO.NE.0 ) THEN
+         CALL XERBLA( 'ZUNGQR', -INFO )
+         RETURN
+      ELSE IF( LQUERY ) THEN
+         RETURN
+      END IF
 *
-*                 WORK(IL) M by N
+*     Quick return if possible
 *
-                  LDWRKL = M
-                  CHUNK = N
-               ELSE
+      IF( N.LE.0 ) THEN
+         WORK( 1 ) = 1
+         RETURN
+      END IF
 *
-*                 WORK(IL) is M by CHUNK
+      NBMIN = 2
+      NX = 0
+      IWS = N
+      IF( NB.GT.1 .AND. NB.LT.K ) THEN
 *
-                  LDWRKL = M
-                  CHUNK = ( LWORK-M*M-3*M ) / M
-               END IF
-               ITAU = IL + LDWRKL*CHUNK
-               NWORK = ITAU + M
+*        Determine when to cross over from blocked to unblocked code.
 *
-*              Compute A=L*Q
-*              (CWorkspace: need 2*M, prefer M+M*NB)
-*              (RWorkspace: 0)
+         NX = MAX( 0, ILAENV( 3, 'ZUNGQR', ' ', M, N, K, -1 ) )
+         IF( NX.LT.K ) THEN
 *
-               CALL ZGELQF( M, N, A, LDA, WORK( ITAU ), WORK( NWORK ),
-     $                      LWORK-NWORK+1, IERR )
+*           Determine if workspace is large enough for blocked code.
 *
-*              Copy L to WORK(IL), zeroing about above it
+            LDWORK = N
+            IWS = LDWORK*NB
+            IF( LWORK.LT.IWS ) THEN
 *
-               CALL ZLACPY( 'L', M, M, A, LDA, WORK( IL ), LDWRKL )
-               CALL ZLASET( 'U', M-1, M-1, CZERO, CZERO,
-     $                      WORK( IL+LDWRKL ), LDWRKL )
+*              Not enough workspace to use optimal NB:  reduce NB and
+*              determine the minimum value of NB.
 *
-*              Generate Q in A
-*              (CWorkspace: need M*M+2*M, prefer M*M+M+M*NB)
-*              (RWorkspace: 0)
+               NB = LWORK / LDWORK
+               NBMIN = MAX( 2, ILAENV( 2, 'ZUNGQR', ' ', M, N, K, -1 ) )
+            END IF
+         END IF
+      END IF
 *
-               CALL ZUNGLQ( M, N, M, A, LDA, WORK( ITAU ),
-     $                      WORK( NWORK ), LWORK-NWORK+1, IERR )
-               IE = 1
-               ITAUQ = ITAU
-               ITAUP = ITAUQ + M
-               NWORK = ITAUP + M
+      IF( NB.GE.NBMIN .AND. NB.LT.K .AND. NX.LT.K ) THEN
 *
-*              Bidiagonalize L in WORK(IL)
-*              (CWorkspace: need M*M+3*M, prefer M*M+2*M+2*M*NB)
-*              (RWorkspace: need M)
+*        Use blocked code after the last block.
+*        The first kk columns are handled by the block method.
 *
-               CALL ZGEBRD( M, M, WORK( IL ), LDWRKL, S, RWORK( IE ),
-     $                      WORK( ITAUQ ), WORK( ITAUP ), WORK( NWORK ),
-     $                      LWORK-NWORK+1, IERR )
+         KI = ( ( K-NX-1 ) / NB )*NB
+         KK = MIN( K, KI+NB )
 *
-*              Perform bidiagonal SVD, computing left singular vectors
-*              of bidiagonal matrix in RWORK(IRU) and computing right
-*              singular vectors of bidiagonal matrix in RWORK(IRVT)
-*              (CWorkspace: need 0)
-*              (RWorkspace: need BDSPAC)
+*        Set A(1:kk,kk+1:n) to zero.
 *
-               IRU = IE + M
-               IRVT = IRU + M*M
-               NRWORK = IRVT + M*M
-               CALL DBDSDC( 'U', 'I', M, S, RWORK( IE ), RWORK( IRU ),
-     $                      M, RWORK( IRVT ), M, DUM, IDUM,
-     $                      RWORK( NRWORK ), IWORK, INFO )
+         DO 20 J = KK + 1, N
+            DO 10 I = 1, KK
+               A( I, J ) = ZERO
+   10       CONTINUE
+   20    CONTINUE
+      ELSE
+         KK = 0
+      END IF
 *
-*              Copy real matrix RWORK(IRU) to complex matrix WORK(IU)
-*              Overwrite WORK(IU) by the left singular vectors of L
-*              (CWorkspace: need N*N+3*N, prefer M*N+2*N+N*NB)
-*              (RWorkspace: 0)
+*     Use unblocked code for the last or only block.
 *
-               CALL ZLACP2( 'F', M, M, RWORK( IRU ), M, U, LDU )
-               CALL ZUNMBR( 'Q', 'L', 'N', M, M, M, WORK( IL ), LDWRKL,
-     $                      WORK( ITAUQ ), U, LDU, WORK( NWORK ),
-     $                      LWORK-NWORK+1, IERR )
+      IF( KK.LT.N )
+     $   CALL ZUNG2R( M-KK, N-KK, K-KK, A( KK+1, KK+1 ), LDA,
+     $                TAU( KK+1 ), WORK, IINFO )
 *
-*              Copy real matrix RWORK(IRVT) to complex matrix WORK(IVT)
-*              Overwrite WORK(IVT) by the right singular vectors of L
-*              (CWorkspace: need N*N+3*N, prefer M*N+2*N+N*NB)
-*              (RWorkspace: 0)
+      IF( KK.GT.0 ) THEN
 *
-               CALL ZLACP2( 'F', M, M, RWORK( IRVT ), M, WORK( IVT ),
-     $                      LDWKVT )
-               CALL ZUNMBR( 'P', 'R', 'C', M, M, M, WORK( IL ), LDWRKL,
-     $                      WORK( ITAUP ), WORK( IVT ), LDWKVT,
-     $                      WORK( NWORK ), LWORK-NWORK+1, IERR )
+*        Use blocked code
 *
-*              Multiply right singular vectors of L in WORK(IL) by Q
-*              in A, storing result in WORK(IL) and copying to A
-*              (CWorkspace: need 2*M*M, prefer M*M+M*N))
-*              (RWorkspace: 0)
+         DO 50 I = KI + 1, 1, -NB
+            IB = MIN( NB, K-I+1 )
+            IF( I+IB.LE.N ) THEN
 *
-               DO 40 I = 1, N, CHUNK
-                  BLK = MIN( N-I+1, CHUNK )
-                  CALL ZGEMM( 'N', 'N', M, BLK, M, CONE, WORK( IVT ), M,
-     $                        A( 1, I ), LDA, CZERO, WORK( IL ),
-     $                        LDWRKL )
-                  CALL ZLACPY( 'F', M, BLK, WORK( IL ), LDWRKL,
-     $                         A( 1, I ), LDA )
-   40          CONTINUE
+*              Form the triangular factor of the block reflector
+*              H = H(i) H(i+1) . . . H(i+ib-1)
 *
-            ELSE IF( WNTQS ) THEN
+               CALL ZLARFT( 'Forward', 'Columnwise', M-I+1, IB,
+     $                      A( I, I ), LDA, TAU( I ), WORK, LDWORK )
 *
-*             Path 3t (N much larger than M, JOBZ='S')
-*             M right singular vectors to be computed in VT and
-*             M left singular vectors to be computed in U
+*              Apply H to A(i:m,i+ib:n) from the left
 *
-               IL = 1
+               CALL ZLARFB( 'Left', 'No transpose', 'Forward',
+     $                      'Columnwise', M-I+1, N-I-IB+1, IB,
+     $                      A( I, I ), LDA, WORK, LDWORK, A( I, I+IB ),
+     $                      LDA, WORK( IB+1 ), LDWORK )
+            END IF
 *
-*              WORK(IL) is M by M
+*           Apply H to rows i:m of current block
 *
-               LDWRKL = M
-               ITAU = IL + LDWRKL*M
-               NWORK = ITAU + M
+            CALL ZUNG2R( M-I+1, IB, IB, A( I, I ), LDA, TAU( I ), WORK,
+     $                   IINFO )
 *
-*              Compute A=L*Q
-*              (CWorkspace: need 2*M, prefer M+M*NB)
-*              (RWorkspace: 0)
+*           Set rows 1:i-1 of current block to zero
 *
-               CALL ZGELQF( M, N, A, LDA, WORK( ITAU ), WORK( NWORK ),
-     $                      LWORK-NWORK+1, IERR )
+            DO 40 J = I, I + IB - 1
+               DO 30 L = 1, I - 1
+                  A( L, J ) = ZERO
+   30          CONTINUE
+   40       CONTINUE
+   50    CONTINUE
+      END IF
 *
-*              Copy L to WORK(IL), zeroing out above it
+      WORK( 1 ) = IWS
+      RETURN
 *
-               CALL ZLACPY( 'L', M, M, A, LDA, WORK( IL ), LDWRKL )
-               CALL ZLASET( 'U', M-1, M-1, CZERO, CZERO,
-     $                      WORK( IL+LDWRKL ), LDWRKL )
+*     End of ZUNGQR
 *
-*              Generate Q in A
-*              (CWorkspace: need M*M+2*M, prefer M*M+M+M*NB)
-*              (RWorkspace: 0)
+      END
+*> \brief \b ZUNGR2 generates all or part of the unitary matrix Q from an RQ factorization determined by cgerqf (unblocked algorithm).
 *
-               CALL ZUNGLQ( M, N, M, A, LDA, WORK( ITAU ),
-     $                      WORK( NWORK ), LWORK-NWORK+1, IERR )
-               IE = 1
-               ITAUQ = ITAU
-               ITAUP = ITAUQ + M
-               NWORK = ITAUP + M
+*  =========== DOCUMENTATION ===========
 *
-*              Bidiagonalize L in WORK(IL)
-*              (CWorkspace: need M*M+3*M, prefer M*M+2*M+2*M*NB)
-*              (RWorkspace: need M)
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
-               CALL ZGEBRD( M, M, WORK( IL ), LDWRKL, S, RWORK( IE ),
-     $                      WORK( ITAUQ ), WORK( ITAUP ), WORK( NWORK ),
-     $                      LWORK-NWORK+1, IERR )
+*> \htmlonly
+*> Download ZUNGR2 + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/zungr2.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/zungr2.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/zungr2.f">
+*> [TXT]</a>
+*> \endhtmlonly
 *
-*              Perform bidiagonal SVD, computing left singular vectors
-*              of bidiagonal matrix in RWORK(IRU) and computing right
-*              singular vectors of bidiagonal matrix in RWORK(IRVT)
-*              (CWorkspace: need 0)
-*              (RWorkspace: need BDSPAC)
+*  Definition:
+*  ===========
 *
-               IRU = IE + M
-               IRVT = IRU + M*M
-               NRWORK = IRVT + M*M
-               CALL DBDSDC( 'U', 'I', M, S, RWORK( IE ), RWORK( IRU ),
-     $                      M, RWORK( IRVT ), M, DUM, IDUM,
-     $                      RWORK( NRWORK ), IWORK, INFO )
+*       SUBROUTINE ZUNGR2( M, N, K, A, LDA, TAU, WORK, INFO )
 *
-*              Copy real matrix RWORK(IRU) to complex matrix U
-*              Overwrite U by left singular vectors of L
-*              (CWorkspace: need M*M+3*M, prefer M*M+2*M+M*NB)
-*              (RWorkspace: 0)
+*       .. Scalar Arguments ..
+*       INTEGER            INFO, K, LDA, M, N
+*       ..
+*       .. Array Arguments ..
+*       COMPLEX*16         A( LDA, * ), TAU( * ), WORK( * )
+*       ..
 *
-               CALL ZLACP2( 'F', M, M, RWORK( IRU ), M, U, LDU )
-               CALL ZUNMBR( 'Q', 'L', 'N', M, M, M, WORK( IL ), LDWRKL,
-     $                      WORK( ITAUQ ), U, LDU, WORK( NWORK ),
-     $                      LWORK-NWORK+1, IERR )
 *
-*              Copy real matrix RWORK(IRVT) to complex matrix VT
-*              Overwrite VT by left singular vectors of L
-*              (CWorkspace: need M*M+3*M, prefer M*M+2*M+M*NB)
-*              (RWorkspace: 0)
+*> \par Purpose:
+*  =============
+*>
+*> \verbatim
+*>
+*> ZUNGR2 generates an m by n complex matrix Q with orthonormal rows,
+*> which is defined as the last m rows of a product of k elementary
+*> reflectors of order n
+*>
+*>       Q  =  H(1)**H H(2)**H . . . H(k)**H
+*>
+*> as returned by ZGERQF.
+*> \endverbatim
 *
-               CALL ZLACP2( 'F', M, M, RWORK( IRVT ), M, VT, LDVT )
-               CALL ZUNMBR( 'P', 'R', 'C', M, M, M, WORK( IL ), LDWRKL,
-     $                      WORK( ITAUP ), VT, LDVT, WORK( NWORK ),
-     $                      LWORK-NWORK+1, IERR )
+*  Arguments:
+*  ==========
 *
-*              Copy VT to WORK(IL), multiply right singular vectors of L
-*              in WORK(IL) by Q in A, storing result in VT
-*              (CWorkspace: need M*M)
-*              (RWorkspace: 0)
+*> \param[in] M
+*> \verbatim
+*>          M is INTEGER
+*>          The number of rows of the matrix Q. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*>          N is INTEGER
+*>          The number of columns of the matrix Q. N >= M.
+*> \endverbatim
+*>
+*> \param[in] K
+*> \verbatim
+*>          K is INTEGER
+*>          The number of elementary reflectors whose product defines the
+*>          matrix Q. M >= K >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*>          A is COMPLEX*16 array, dimension (LDA,N)
+*>          On entry, the (m-k+i)-th row must contain the vector which
+*>          defines the elementary reflector H(i), for i = 1,2,...,k, as
+*>          returned by ZGERQF in the last k rows of its array argument
+*>          A.
+*>          On exit, the m-by-n matrix Q.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*>          LDA is INTEGER
+*>          The first dimension of the array A. LDA >= max(1,M).
+*> \endverbatim
+*>
+*> \param[in] TAU
+*> \verbatim
+*>          TAU is COMPLEX*16 array, dimension (K)
+*>          TAU(i) must contain the scalar factor of the elementary
+*>          reflector H(i), as returned by ZGERQF.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*>          WORK is COMPLEX*16 array, dimension (M)
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*>          INFO is INTEGER
+*>          = 0: successful exit
+*>          < 0: if INFO = -i, the i-th argument has an illegal value
+*> \endverbatim
 *
-               CALL ZLACPY( 'F', M, M, VT, LDVT, WORK( IL ), LDWRKL )
-               CALL ZGEMM( 'N', 'N', M, N, M, CONE, WORK( IL ), LDWRKL,
-     $                     A, LDA, CZERO, VT, LDVT )
+*  Authors:
+*  ========
 *
-            ELSE IF( WNTQA ) THEN
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*              Path 9t (N much larger than M, JOBZ='A')
-*              N right singular vectors to be computed in VT and
-*              M left singular vectors to be computed in U
+*> \date December 2016
 *
-               IVT = 1
+*> \ingroup complex16OTHERcomputational
 *
-*              WORK(IVT) is M by M
+*  =====================================================================
+      SUBROUTINE ZUNGR2( M, N, K, A, LDA, TAU, WORK, INFO )
 *
-               LDWKVT = M
-               ITAU = IVT + LDWKVT*M
-               NWORK = ITAU + M
+*  -- LAPACK computational routine (version 3.7.0) --
+*  -- LAPACK is a software package provided by Univ. of Tennessee,    --
+*  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+*     December 2016
 *
-*              Compute A=L*Q, copying result to VT
-*              (CWorkspace: need 2*M, prefer M+M*NB)
-*              (RWorkspace: 0)
+*     .. Scalar Arguments ..
+      INTEGER            INFO, K, LDA, M, N
+*     ..
+*     .. Array Arguments ..
+      COMPLEX*16         A( LDA, * ), TAU( * ), WORK( * )
+*     ..
 *
-               CALL ZGELQF( M, N, A, LDA, WORK( ITAU ), WORK( NWORK ),
-     $                      LWORK-NWORK+1, IERR )
-               CALL ZLACPY( 'U', M, N, A, LDA, VT, LDVT )
+*  =====================================================================
 *
-*              Generate Q in VT
-*              (CWorkspace: need M+N, prefer M+N*NB)
-*              (RWorkspace: 0)
+*     .. Parameters ..
+      COMPLEX*16         ONE, ZERO
+      PARAMETER          ( ONE = ( 1.0D+0, 0.0D+0 ),
+     $                   ZERO = ( 0.0D+0, 0.0D+0 ) )
+*     ..
+*     .. Local Scalars ..
+      INTEGER            I, II, J, L
+*     ..
+*     .. External Subroutines ..
+      EXTERNAL           XERBLA, ZLACGV, ZLARF, ZSCAL
+*     ..
+*     .. Intrinsic Functions ..
+      INTRINSIC          DCONJG, MAX
+*     ..
+*     .. Executable Statements ..
 *
-               CALL ZUNGLQ( N, N, M, VT, LDVT, WORK( ITAU ),
-     $                      WORK( NWORK ), LWORK-NWORK+1, IERR )
+*     Test the input arguments
 *
-*              Produce L in A, zeroing out above it
+      INFO = 0
+      IF( M.LT.0 ) THEN
+         INFO = -1
+      ELSE IF( N.LT.M ) THEN
+         INFO = -2
+      ELSE IF( K.LT.0 .OR. K.GT.M ) THEN
+         INFO = -3
+      ELSE IF( LDA.LT.MAX( 1, M ) ) THEN
+         INFO = -5
+      END IF
+      IF( INFO.NE.0 ) THEN
+         CALL XERBLA( 'ZUNGR2', -INFO )
+         RETURN
+      END IF
 *
-               CALL ZLASET( 'U', M-1, M-1, CZERO, CZERO, A( 1, 2 ),
-     $                      LDA )
-               IE = 1
-               ITAUQ = ITAU
-               ITAUP = ITAUQ + M
-               NWORK = ITAUP + M
+*     Quick return if possible
 *
-*              Bidiagonalize L in A
-*              (CWorkspace: need M*M+3*M, prefer M*M+2*M+2*M*NB)
-*              (RWorkspace: need M)
+      IF( M.LE.0 )
+     $   RETURN
 *
-               CALL ZGEBRD( M, M, A, LDA, S, RWORK( IE ), WORK( ITAUQ ),
-     $                      WORK( ITAUP ), WORK( NWORK ), LWORK-NWORK+1,
-     $                      IERR )
+      IF( K.LT.M ) THEN
 *
-*              Perform bidiagonal SVD, computing left singular vectors
-*              of bidiagonal matrix in RWORK(IRU) and computing right
-*              singular vectors of bidiagonal matrix in RWORK(IRVT)
-*              (CWorkspace: need 0)
-*              (RWorkspace: need BDSPAC)
+*        Initialise rows 1:m-k to rows of the unit matrix
 *
-               IRU = IE + M
-               IRVT = IRU + M*M
-               NRWORK = IRVT + M*M
-               CALL DBDSDC( 'U', 'I', M, S, RWORK( IE ), RWORK( IRU ),
-     $                      M, RWORK( IRVT ), M, DUM, IDUM,
-     $                      RWORK( NRWORK ), IWORK, INFO )
+         DO 20 J = 1, N
+            DO 10 L = 1, M - K
+               A( L, J ) = ZERO
+   10       CONTINUE
+            IF( J.GT.N-M .AND. J.LE.N-K )
+     $         A( M-N+J, J ) = ONE
+   20    CONTINUE
+      END IF
 *
-*              Copy real matrix RWORK(IRU) to complex matrix U
-*              Overwrite U by left singular vectors of L
-*              (CWorkspace: need 3*M, prefer 2*M+M*NB)
-*              (RWorkspace: 0)
+      DO 40 I = 1, K
+         II = M - K + I
 *
-               CALL ZLACP2( 'F', M, M, RWORK( IRU ), M, U, LDU )
-               CALL ZUNMBR( 'Q', 'L', 'N', M, M, M, A, LDA,
-     $                      WORK( ITAUQ ), U, LDU, WORK( NWORK ),
-     $                      LWORK-NWORK+1, IERR )
+*        Apply H(i)**H to A(1:m-k+i,1:n-k+i) from the right
 *
-*              Copy real matrix RWORK(IRVT) to complex matrix WORK(IVT)
-*              Overwrite WORK(IVT) by right singular vectors of L
-*              (CWorkspace: need M*M+3*M, prefer M*M+2*M+M*NB)
-*              (RWorkspace: 0)
+         CALL ZLACGV( N-M+II-1, A( II, 1 ), LDA )
+         A( II, N-M+II ) = ONE
+         CALL ZLARF( 'Right', II-1, N-M+II, A( II, 1 ), LDA,
+     $               DCONJG( TAU( I ) ), A, LDA, WORK )
+         CALL ZSCAL( N-M+II-1, -TAU( I ), A( II, 1 ), LDA )
+         CALL ZLACGV( N-M+II-1, A( II, 1 ), LDA )
+         A( II, N-M+II ) = ONE - DCONJG( TAU( I ) )
 *
-               CALL ZLACP2( 'F', M, M, RWORK( IRVT ), M, WORK( IVT ),
-     $                      LDWKVT )
-               CALL ZUNMBR( 'P', 'R', 'C', M, M, M, A, LDA,
-     $                      WORK( ITAUP ), WORK( IVT ), LDWKVT,
-     $                      WORK( NWORK ), LWORK-NWORK+1, IERR )
+*        Set A(m-k+i,n-k+i+1:n) to zero
 *
-*              Multiply right singular vectors of L in WORK(IVT) by
-*              Q in VT, storing result in A
-*              (CWorkspace: need M*M)
-*              (RWorkspace: 0)
+         DO 30 L = N - M + II + 1, N
+            A( II, L ) = ZERO
+   30    CONTINUE
+   40 CONTINUE
+      RETURN
 *
-               CALL ZGEMM( 'N', 'N', M, N, M, CONE, WORK( IVT ), LDWKVT,
-     $                     VT, LDVT, CZERO, A, LDA )
+*     End of ZUNGR2
 *
-*              Copy right singular vectors of A from A to VT
+      END
+*> \brief \b ZUNGRQ
 *
-               CALL ZLACPY( 'F', M, N, A, LDA, VT, LDVT )
+*  =========== DOCUMENTATION ===========
 *
-            END IF
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
-         ELSE IF( N.GE.MNTHR2 ) THEN
+*> \htmlonly
+*> Download ZUNGRQ + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/zungrq.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/zungrq.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/zungrq.f">
+*> [TXT]</a>
+*> \endhtmlonly
 *
-*           MNTHR2 <= N < MNTHR1
+*  Definition:
+*  ===========
 *
-*           Path 5t (N much larger than M, but not as much as MNTHR1)
-*           Reduce to bidiagonal form without QR decomposition, use
-*           ZUNGBR and matrix multiplication to compute singular vectors
+*       SUBROUTINE ZUNGRQ( M, N, K, A, LDA, TAU, WORK, LWORK, INFO )
 *
+*       .. Scalar Arguments ..
+*       INTEGER            INFO, K, LDA, LWORK, M, N
+*       ..
+*       .. Array Arguments ..
+*       COMPLEX*16         A( LDA, * ), TAU( * ), WORK( * )
+*       ..
 *
-            IE = 1
-            NRWORK = IE + M
-            ITAUQ = 1
-            ITAUP = ITAUQ + M
-            NWORK = ITAUP + M
 *
-*           Bidiagonalize A
-*           (CWorkspace: need 2*M+N, prefer 2*M+(M+N)*NB)
-*           (RWorkspace: M)
+*> \par Purpose:
+*  =============
+*>
+*> \verbatim
+*>
+*> ZUNGRQ generates an M-by-N complex matrix Q with orthonormal rows,
+*> which is defined as the last M rows of a product of K elementary
+*> reflectors of order N
+*>
+*>       Q  =  H(1)**H H(2)**H . . . H(k)**H
+*>
+*> as returned by ZGERQF.
+*> \endverbatim
 *
-            CALL ZGEBRD( M, N, A, LDA, S, RWORK( IE ), WORK( ITAUQ ),
-     $                   WORK( ITAUP ), WORK( NWORK ), LWORK-NWORK+1,
-     $                   IERR )
+*  Arguments:
+*  ==========
 *
-            IF( WNTQN ) THEN
+*> \param[in] M
+*> \verbatim
+*>          M is INTEGER
+*>          The number of rows of the matrix Q. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*>          N is INTEGER
+*>          The number of columns of the matrix Q. N >= M.
+*> \endverbatim
+*>
+*> \param[in] K
+*> \verbatim
+*>          K is INTEGER
+*>          The number of elementary reflectors whose product defines the
+*>          matrix Q. M >= K >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*>          A is COMPLEX*16 array, dimension (LDA,N)
+*>          On entry, the (m-k+i)-th row must contain the vector which
+*>          defines the elementary reflector H(i), for i = 1,2,...,k, as
+*>          returned by ZGERQF in the last k rows of its array argument
+*>          A.
+*>          On exit, the M-by-N matrix Q.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*>          LDA is INTEGER
+*>          The first dimension of the array A. LDA >= max(1,M).
+*> \endverbatim
+*>
+*> \param[in] TAU
+*> \verbatim
+*>          TAU is COMPLEX*16 array, dimension (K)
+*>          TAU(i) must contain the scalar factor of the elementary
+*>          reflector H(i), as returned by ZGERQF.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*>          WORK is COMPLEX*16 array, dimension (MAX(1,LWORK))
+*>          On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*>          LWORK is INTEGER
+*>          The dimension of the array WORK. LWORK >= max(1,M).
+*>          For optimum performance LWORK >= M*NB, where NB is the
+*>          optimal blocksize.
+*>
+*>          If LWORK = -1, then a workspace query is assumed; the routine
+*>          only calculates the optimal size of the WORK array, returns
+*>          this value as the first entry of the WORK array, and no error
+*>          message related to LWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*>          INFO is INTEGER
+*>          = 0:  successful exit
+*>          < 0:  if INFO = -i, the i-th argument has an illegal value
+*> \endverbatim
 *
-*              Compute singular values only
-*              (Cworkspace: 0)
-*              (Rworkspace: need BDSPAN)
+*  Authors:
+*  ========
 *
-               CALL DBDSDC( 'L', 'N', M, S, RWORK( IE ), DUM, 1, DUM, 1,
-     $                      DUM, IDUM, RWORK( NRWORK ), IWORK, INFO )
-            ELSE IF( WNTQO ) THEN
-               IRVT = NRWORK
-               IRU = IRVT + M*M
-               NRWORK = IRU + M*M
-               IVT = NWORK
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*              Copy A to U, generate Q
-*              (Cworkspace: need 2*M, prefer M+M*NB)
-*              (Rworkspace: 0)
+*> \date December 2016
 *
-               CALL ZLACPY( 'L', M, M, A, LDA, U, LDU )
-               CALL ZUNGBR( 'Q', M, M, N, U, LDU, WORK( ITAUQ ),
-     $                      WORK( NWORK ), LWORK-NWORK+1, IERR )
+*> \ingroup complex16OTHERcomputational
 *
-*              Generate P**H in A
-*              (Cworkspace: need 2*M, prefer M+M*NB)
-*              (Rworkspace: 0)
+*  =====================================================================
+      SUBROUTINE ZUNGRQ( M, N, K, A, LDA, TAU, WORK, LWORK, INFO )
 *
-               CALL ZUNGBR( 'P', M, N, M, A, LDA, WORK( ITAUP ),
-     $                      WORK( NWORK ), LWORK-NWORK+1, IERR )
+*  -- LAPACK computational routine (version 3.7.0) --
+*  -- LAPACK is a software package provided by Univ. of Tennessee,    --
+*  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+*     December 2016
 *
-               LDWKVT = M
-               IF( LWORK.GE.M*N+3*M ) THEN
+*     .. Scalar Arguments ..
+      INTEGER            INFO, K, LDA, LWORK, M, N
+*     ..
+*     .. Array Arguments ..
+      COMPLEX*16         A( LDA, * ), TAU( * ), WORK( * )
+*     ..
 *
-*                 WORK( IVT ) is M by N
+*  =====================================================================
 *
-                  NWORK = IVT + LDWKVT*N
-                  CHUNK = N
-               ELSE
+*     .. Parameters ..
+      COMPLEX*16         ZERO
+      PARAMETER          ( ZERO = ( 0.0D+0, 0.0D+0 ) )
+*     ..
+*     .. Local Scalars ..
+      LOGICAL            LQUERY
+      INTEGER            I, IB, II, IINFO, IWS, J, KK, L, LDWORK,
+     $                   LWKOPT, NB, NBMIN, NX
+*     ..
+*     .. External Subroutines ..
+      EXTERNAL           XERBLA, ZLARFB, ZLARFT, ZUNGR2
+*     ..
+*     .. Intrinsic Functions ..
+      INTRINSIC          MAX, MIN
+*     ..
+*     .. External Functions ..
+      INTEGER            ILAENV
+      EXTERNAL           ILAENV
+*     ..
+*     .. Executable Statements ..
 *
-*                 WORK( IVT ) is M by CHUNK
+*     Test the input arguments
 *
-                  CHUNK = ( LWORK-3*M ) / M
-                  NWORK = IVT + LDWKVT*CHUNK
-               END IF
+      INFO = 0
+      LQUERY = ( LWORK.EQ.-1 )
+      IF( M.LT.0 ) THEN
+         INFO = -1
+      ELSE IF( N.LT.M ) THEN
+         INFO = -2
+      ELSE IF( K.LT.0 .OR. K.GT.M ) THEN
+         INFO = -3
+      ELSE IF( LDA.LT.MAX( 1, M ) ) THEN
+         INFO = -5
+      END IF
 *
-*              Perform bidiagonal SVD, computing left singular vectors
-*              of bidiagonal matrix in RWORK(IRU) and computing right
-*              singular vectors of bidiagonal matrix in RWORK(IRVT)
-*              (CWorkspace: need 0)
-*              (RWorkspace: need BDSPAC)
+      IF( INFO.EQ.0 ) THEN
+         IF( M.LE.0 ) THEN
+            LWKOPT = 1
+         ELSE
+            NB = ILAENV( 1, 'ZUNGRQ', ' ', M, N, K, -1 )
+            LWKOPT = M*NB
+         END IF
+         WORK( 1 ) = LWKOPT
 *
-               CALL DBDSDC( 'L', 'I', M, S, RWORK( IE ), RWORK( IRU ),
-     $                      M, RWORK( IRVT ), M, DUM, IDUM,
-     $                      RWORK( NRWORK ), IWORK, INFO )
+         IF( LWORK.LT.MAX( 1, M ) .AND. .NOT.LQUERY ) THEN
+            INFO = -8
+         END IF
+      END IF
 *
-*              Multiply Q in U by real matrix RWORK(IRVT)
-*              storing the result in WORK(IVT), copying to U
-*              (Cworkspace: need 0)
-*              (Rworkspace: need 2*M*M)
+      IF( INFO.NE.0 ) THEN
+         CALL XERBLA( 'ZUNGRQ', -INFO )
+         RETURN
+      ELSE IF( LQUERY ) THEN
+         RETURN
+      END IF
 *
-               CALL ZLACRM( M, M, U, LDU, RWORK( IRU ), M, WORK( IVT ),
-     $                      LDWKVT, RWORK( NRWORK ) )
-               CALL ZLACPY( 'F', M, M, WORK( IVT ), LDWKVT, U, LDU )
+*     Quick return if possible
 *
-*              Multiply RWORK(IRVT) by P**H in A, storing the
-*              result in WORK(IVT), copying to A
-*              (CWorkspace: need M*M, prefer M*N)
-*              (Rworkspace: need 2*M*M, prefer 2*M*N)
+      IF( M.LE.0 ) THEN
+         RETURN
+      END IF
 *
-               NRWORK = IRU
-               DO 50 I = 1, N, CHUNK
-                  BLK = MIN( N-I+1, CHUNK )
-                  CALL ZLARCM( M, BLK, RWORK( IRVT ), M, A( 1, I ), LDA,
-     $                         WORK( IVT ), LDWKVT, RWORK( NRWORK ) )
-                  CALL ZLACPY( 'F', M, BLK, WORK( IVT ), LDWKVT,
-     $                         A( 1, I ), LDA )
-   50          CONTINUE
-            ELSE IF( WNTQS ) THEN
+      NBMIN = 2
+      NX = 0
+      IWS = M
+      IF( NB.GT.1 .AND. NB.LT.K ) THEN
 *
-*              Copy A to U, generate Q
-*              (Cworkspace: need 2*M, prefer M+M*NB)
-*              (Rworkspace: 0)
+*        Determine when to cross over from blocked to unblocked code.
 *
-               CALL ZLACPY( 'L', M, M, A, LDA, U, LDU )
-               CALL ZUNGBR( 'Q', M, M, N, U, LDU, WORK( ITAUQ ),
-     $                      WORK( NWORK ), LWORK-NWORK+1, IERR )
+         NX = MAX( 0, ILAENV( 3, 'ZUNGRQ', ' ', M, N, K, -1 ) )
+         IF( NX.LT.K ) THEN
 *
-*              Copy A to VT, generate P**H
-*              (Cworkspace: need 2*M, prefer M+M*NB)
-*              (Rworkspace: 0)
+*           Determine if workspace is large enough for blocked code.
 *
-               CALL ZLACPY( 'U', M, N, A, LDA, VT, LDVT )
-               CALL ZUNGBR( 'P', M, N, M, VT, LDVT, WORK( ITAUP ),
-     $                      WORK( NWORK ), LWORK-NWORK+1, IERR )
+            LDWORK = M
+            IWS = LDWORK*NB
+            IF( LWORK.LT.IWS ) THEN
 *
-*              Perform bidiagonal SVD, computing left singular vectors
-*              of bidiagonal matrix in RWORK(IRU) and computing right
-*              singular vectors of bidiagonal matrix in RWORK(IRVT)
-*              (CWorkspace: need 0)
-*              (RWorkspace: need BDSPAC)
+*              Not enough workspace to use optimal NB:  reduce NB and
+*              determine the minimum value of NB.
 *
-               IRVT = NRWORK
-               IRU = IRVT + M*M
-               NRWORK = IRU + M*M
-               CALL DBDSDC( 'L', 'I', M, S, RWORK( IE ), RWORK( IRU ),
-     $                      M, RWORK( IRVT ), M, DUM, IDUM,
-     $                      RWORK( NRWORK ), IWORK, INFO )
+               NB = LWORK / LDWORK
+               NBMIN = MAX( 2, ILAENV( 2, 'ZUNGRQ', ' ', M, N, K, -1 ) )
+            END IF
+         END IF
+      END IF
 *
-*              Multiply Q in U by real matrix RWORK(IRU), storing the
-*              result in A, copying to U
-*              (CWorkspace: need 0)
-*              (Rworkspace: need 3*M*M)
+      IF( NB.GE.NBMIN .AND. NB.LT.K .AND. NX.LT.K ) THEN
 *
-               CALL ZLACRM( M, M, U, LDU, RWORK( IRU ), M, A, LDA,
-     $                      RWORK( NRWORK ) )
-               CALL ZLACPY( 'F', M, M, A, LDA, U, LDU )
+*        Use blocked code after the first block.
+*        The last kk rows are handled by the block method.
 *
-*              Multiply real matrix RWORK(IRVT) by P**H in VT,
-*              storing the result in A, copying to VT
-*              (Cworkspace: need 0)
-*              (Rworkspace: need M*M+2*M*N)
+         KK = MIN( K, ( ( K-NX+NB-1 ) / NB )*NB )
 *
-               NRWORK = IRU
-               CALL ZLARCM( M, N, RWORK( IRVT ), M, VT, LDVT, A, LDA,
-     $                      RWORK( NRWORK ) )
-               CALL ZLACPY( 'F', M, N, A, LDA, VT, LDVT )
-            ELSE
+*        Set A(1:m-kk,n-kk+1:n) to zero.
 *
-*              Copy A to U, generate Q
-*              (Cworkspace: need 2*M, prefer M+M*NB)
-*              (Rworkspace: 0)
+         DO 20 J = N - KK + 1, N
+            DO 10 I = 1, M - KK
+               A( I, J ) = ZERO
+   10       CONTINUE
+   20    CONTINUE
+      ELSE
+         KK = 0
+      END IF
 *
-               CALL ZLACPY( 'L', M, M, A, LDA, U, LDU )
-               CALL ZUNGBR( 'Q', M, M, N, U, LDU, WORK( ITAUQ ),
-     $                      WORK( NWORK ), LWORK-NWORK+1, IERR )
+*     Use unblocked code for the first or only block.
 *
-*              Copy A to VT, generate P**H
-*              (Cworkspace: need 2*M, prefer M+M*NB)
-*              (Rworkspace: 0)
+      CALL ZUNGR2( M-KK, N-KK, K-KK, A, LDA, TAU, WORK, IINFO )
 *
-               CALL ZLACPY( 'U', M, N, A, LDA, VT, LDVT )
-               CALL ZUNGBR( 'P', N, N, M, VT, LDVT, WORK( ITAUP ),
-     $                      WORK( NWORK ), LWORK-NWORK+1, IERR )
+      IF( KK.GT.0 ) THEN
 *
-*              Perform bidiagonal SVD, computing left singular vectors
-*              of bidiagonal matrix in RWORK(IRU) and computing right
-*              singular vectors of bidiagonal matrix in RWORK(IRVT)
-*              (CWorkspace: need 0)
-*              (RWorkspace: need BDSPAC)
+*        Use blocked code
 *
-               IRVT = NRWORK
-               IRU = IRVT + M*M
-               NRWORK = IRU + M*M
-               CALL DBDSDC( 'L', 'I', M, S, RWORK( IE ), RWORK( IRU ),
-     $                      M, RWORK( IRVT ), M, DUM, IDUM,
-     $                      RWORK( NRWORK ), IWORK, INFO )
+         DO 50 I = K - KK + 1, K, NB
+            IB = MIN( NB, K-I+1 )
+            II = M - K + I
+            IF( II.GT.1 ) THEN
 *
-*              Multiply Q in U by real matrix RWORK(IRU), storing the
-*              result in A, copying to U
-*              (CWorkspace: need 0)
-*              (Rworkspace: need 3*M*M)
+*              Form the triangular factor of the block reflector
+*              H = H(i+ib-1) . . . H(i+1) H(i)
 *
-               CALL ZLACRM( M, M, U, LDU, RWORK( IRU ), M, A, LDA,
-     $                      RWORK( NRWORK ) )
-               CALL ZLACPY( 'F', M, M, A, LDA, U, LDU )
+               CALL ZLARFT( 'Backward', 'Rowwise', N-K+I+IB-1, IB,
+     $                      A( II, 1 ), LDA, TAU( I ), WORK, LDWORK )
 *
-*              Multiply real matrix RWORK(IRVT) by P**H in VT,
-*              storing the result in A, copying to VT
-*              (Cworkspace: need 0)
-*              (Rworkspace: need M*M+2*M*N)
+*              Apply H**H to A(1:m-k+i-1,1:n-k+i+ib-1) from the right
 *
-               CALL ZLARCM( M, N, RWORK( IRVT ), M, VT, LDVT, A, LDA,
-     $                      RWORK( NRWORK ) )
-               CALL ZLACPY( 'F', M, N, A, LDA, VT, LDVT )
+               CALL ZLARFB( 'Right', 'Conjugate transpose', 'Backward',
+     $                      'Rowwise', II-1, N-K+I+IB-1, IB, A( II, 1 ),
+     $                      LDA, WORK, LDWORK, A, LDA, WORK( IB+1 ),
+     $                      LDWORK )
             END IF
 *
-         ELSE
-*
-*           N .LT. MNTHR2
+*           Apply H**H to columns 1:n-k+i+ib-1 of current block
 *
-*           Path 6t (N greater than M, but not much larger)
-*           Reduce to bidiagonal form without LQ decomposition
-*           Use ZUNMBR to compute singular vectors
+            CALL ZUNGR2( IB, N-K+I+IB-1, IB, A( II, 1 ), LDA, TAU( I ),
+     $                   WORK, IINFO )
 *
-            IE = 1
-            NRWORK = IE + M
-            ITAUQ = 1
-            ITAUP = ITAUQ + M
-            NWORK = ITAUP + M
+*           Set columns n-k+i+ib:n of current block to zero
 *
-*           Bidiagonalize A
-*           (CWorkspace: need 2*M+N, prefer 2*M+(M+N)*NB)
-*           (RWorkspace: M)
+            DO 40 L = N - K + I + IB, N
+               DO 30 J = II, II + IB - 1
+                  A( J, L ) = ZERO
+   30          CONTINUE
+   40       CONTINUE
+   50    CONTINUE
+      END IF
 *
-            CALL ZGEBRD( M, N, A, LDA, S, RWORK( IE ), WORK( ITAUQ ),
-     $                   WORK( ITAUP ), WORK( NWORK ), LWORK-NWORK+1,
-     $                   IERR )
-            IF( WNTQN ) THEN
+      WORK( 1 ) = IWS
+      RETURN
 *
-*              Compute singular values only
-*              (Cworkspace: 0)
-*              (Rworkspace: need BDSPAN)
+*     End of ZUNGRQ
 *
-               CALL DBDSDC( 'L', 'N', M, S, RWORK( IE ), DUM, 1, DUM, 1,
-     $                      DUM, IDUM, RWORK( NRWORK ), IWORK, INFO )
-            ELSE IF( WNTQO ) THEN
-               LDWKVT = M
-               IVT = NWORK
-               IF( LWORK.GE.M*N+3*M ) THEN
+      END
+*> \brief \b ZUNGTR
 *
-*                 WORK( IVT ) is M by N
+*  =========== DOCUMENTATION ===========
 *
-                  CALL ZLASET( 'F', M, N, CZERO, CZERO, WORK( IVT ),
-     $                         LDWKVT )
-                  NWORK = IVT + LDWKVT*N
-               ELSE
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
-*                 WORK( IVT ) is M by CHUNK
+*> \htmlonly
+*> Download ZUNGTR + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/zungtr.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/zungtr.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/zungtr.f">
+*> [TXT]</a>
+*> \endhtmlonly
 *
-                  CHUNK = ( LWORK-3*M ) / M
-                  NWORK = IVT + LDWKVT*CHUNK
-               END IF
+*  Definition:
+*  ===========
 *
-*              Perform bidiagonal SVD, computing left singular vectors
-*              of bidiagonal matrix in RWORK(IRU) and computing right
-*              singular vectors of bidiagonal matrix in RWORK(IRVT)
-*              (CWorkspace: need 0)
-*              (RWorkspace: need BDSPAC)
+*       SUBROUTINE ZUNGTR( UPLO, N, A, LDA, TAU, WORK, LWORK, INFO )
 *
-               IRVT = NRWORK
-               IRU = IRVT + M*M
-               NRWORK = IRU + M*M
-               CALL DBDSDC( 'L', 'I', M, S, RWORK( IE ), RWORK( IRU ),
-     $                      M, RWORK( IRVT ), M, DUM, IDUM,
-     $                      RWORK( NRWORK ), IWORK, INFO )
+*       .. Scalar Arguments ..
+*       CHARACTER          UPLO
+*       INTEGER            INFO, LDA, LWORK, N
+*       ..
+*       .. Array Arguments ..
+*       COMPLEX*16         A( LDA, * ), TAU( * ), WORK( * )
+*       ..
 *
-*              Copy real matrix RWORK(IRU) to complex matrix U
-*              Overwrite U by left singular vectors of A
-*              (Cworkspace: need 2*M, prefer M+M*NB)
-*              (Rworkspace: need 0)
 *
-               CALL ZLACP2( 'F', M, M, RWORK( IRU ), M, U, LDU )
-               CALL ZUNMBR( 'Q', 'L', 'N', M, M, N, A, LDA,
-     $                      WORK( ITAUQ ), U, LDU, WORK( NWORK ),
-     $                      LWORK-NWORK+1, IERR )
+*> \par Purpose:
+*  =============
+*>
+*> \verbatim
+*>
+*> ZUNGTR generates a complex unitary matrix Q which is defined as the
+*> product of n-1 elementary reflectors of order N, as returned by
+*> ZHETRD:
+*>
+*> if UPLO = 'U', Q = H(n-1) . . . H(2) H(1),
+*>
+*> if UPLO = 'L', Q = H(1) H(2) . . . H(n-1).
+*> \endverbatim
 *
-               IF( LWORK.GE.M*N+3*M ) THEN
+*  Arguments:
+*  ==========
 *
-*              Copy real matrix RWORK(IRVT) to complex matrix WORK(IVT)
-*              Overwrite WORK(IVT) by right singular vectors of A,
-*              copying to A
-*              (Cworkspace: need M*N+2*M, prefer M*N+M+M*NB)
-*              (Rworkspace: need 0)
+*> \param[in] UPLO
+*> \verbatim
+*>          UPLO is CHARACTER*1
+*>          = 'U': Upper triangle of A contains elementary reflectors
+*>                 from ZHETRD;
+*>          = 'L': Lower triangle of A contains elementary reflectors
+*>                 from ZHETRD.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*>          N is INTEGER
+*>          The order of the matrix Q. N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*>          A is COMPLEX*16 array, dimension (LDA,N)
+*>          On entry, the vectors which define the elementary reflectors,
+*>          as returned by ZHETRD.
+*>          On exit, the N-by-N unitary matrix Q.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*>          LDA is INTEGER
+*>          The leading dimension of the array A. LDA >= N.
+*> \endverbatim
+*>
+*> \param[in] TAU
+*> \verbatim
+*>          TAU is COMPLEX*16 array, dimension (N-1)
+*>          TAU(i) must contain the scalar factor of the elementary
+*>          reflector H(i), as returned by ZHETRD.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*>          WORK is COMPLEX*16 array, dimension (MAX(1,LWORK))
+*>          On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*>          LWORK is INTEGER
+*>          The dimension of the array WORK. LWORK >= N-1.
+*>          For optimum performance LWORK >= (N-1)*NB, where NB is
+*>          the optimal blocksize.
+*>
+*>          If LWORK = -1, then a workspace query is assumed; the routine
+*>          only calculates the optimal size of the WORK array, returns
+*>          this value as the first entry of the WORK array, and no error
+*>          message related to LWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*>          INFO is INTEGER
+*>          = 0:  successful exit
+*>          < 0:  if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
 *
-                  CALL ZLACP2( 'F', M, M, RWORK( IRVT ), M, WORK( IVT ),
-     $                         LDWKVT )
-                  CALL ZUNMBR( 'P', 'R', 'C', M, N, M, A, LDA,
-     $                         WORK( ITAUP ), WORK( IVT ), LDWKVT,
-     $                         WORK( NWORK ), LWORK-NWORK+1, IERR )
-                  CALL ZLACPY( 'F', M, N, WORK( IVT ), LDWKVT, A, LDA )
-               ELSE
+*  Authors:
+*  ========
 *
-*                 Generate P**H in A
-*                 (Cworkspace: need 2*M, prefer M+M*NB)
-*                 (Rworkspace: need 0)
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-                  CALL ZUNGBR( 'P', M, N, M, A, LDA, WORK( ITAUP ),
-     $                         WORK( NWORK ), LWORK-NWORK+1, IERR )
+*> \date December 2016
 *
-*                 Multiply Q in A by real matrix RWORK(IRU), storing the
-*                 result in WORK(IU), copying to A
-*                 (CWorkspace: need M*M, prefer M*N)
-*                 (Rworkspace: need 3*M*M, prefer M*M+2*M*N)
+*> \ingroup complex16OTHERcomputational
 *
-                  NRWORK = IRU
-                  DO 60 I = 1, N, CHUNK
-                     BLK = MIN( N-I+1, CHUNK )
-                     CALL ZLARCM( M, BLK, RWORK( IRVT ), M, A( 1, I ),
-     $                            LDA, WORK( IVT ), LDWKVT,
-     $                            RWORK( NRWORK ) )
-                     CALL ZLACPY( 'F', M, BLK, WORK( IVT ), LDWKVT,
-     $                            A( 1, I ), LDA )
-   60             CONTINUE
-               END IF
-            ELSE IF( WNTQS ) THEN
+*  =====================================================================
+      SUBROUTINE ZUNGTR( UPLO, N, A, LDA, TAU, WORK, LWORK, INFO )
 *
-*              Perform bidiagonal SVD, computing left singular vectors
-*              of bidiagonal matrix in RWORK(IRU) and computing right
-*              singular vectors of bidiagonal matrix in RWORK(IRVT)
-*              (CWorkspace: need 0)
-*              (RWorkspace: need BDSPAC)
+*  -- LAPACK computational routine (version 3.7.0) --
+*  -- LAPACK is a software package provided by Univ. of Tennessee,    --
+*  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+*     December 2016
 *
-               IRVT = NRWORK
-               IRU = IRVT + M*M
-               NRWORK = IRU + M*M
-               CALL DBDSDC( 'L', 'I', M, S, RWORK( IE ), RWORK( IRU ),
-     $                      M, RWORK( IRVT ), M, DUM, IDUM,
-     $                      RWORK( NRWORK ), IWORK, INFO )
+*     .. Scalar Arguments ..
+      CHARACTER          UPLO
+      INTEGER            INFO, LDA, LWORK, N
+*     ..
+*     .. Array Arguments ..
+      COMPLEX*16         A( LDA, * ), TAU( * ), WORK( * )
+*     ..
 *
-*              Copy real matrix RWORK(IRU) to complex matrix U
-*              Overwrite U by left singular vectors of A
-*              (CWorkspace: need 3*M, prefer 2*M+M*NB)
-*              (RWorkspace: M*M)
+*  =====================================================================
 *
-               CALL ZLACP2( 'F', M, M, RWORK( IRU ), M, U, LDU )
-               CALL ZUNMBR( 'Q', 'L', 'N', M, M, N, A, LDA,
-     $                      WORK( ITAUQ ), U, LDU, WORK( NWORK ),
-     $                      LWORK-NWORK+1, IERR )
+*     .. Parameters ..
+      COMPLEX*16         ZERO, ONE
+      PARAMETER          ( ZERO = ( 0.0D+0, 0.0D+0 ),
+     $                   ONE = ( 1.0D+0, 0.0D+0 ) )
+*     ..
+*     .. Local Scalars ..
+      LOGICAL            LQUERY, UPPER
+      INTEGER            I, IINFO, J, LWKOPT, NB
+*     ..
+*     .. External Functions ..
+      LOGICAL            LSAME
+      INTEGER            ILAENV
+      EXTERNAL           LSAME, ILAENV
+*     ..
+*     .. External Subroutines ..
+      EXTERNAL           XERBLA, ZUNGQL, ZUNGQR
+*     ..
+*     .. Intrinsic Functions ..
+      INTRINSIC          MAX
+*     ..
+*     .. Executable Statements ..
 *
-*              Copy real matrix RWORK(IRVT) to complex matrix VT
-*              Overwrite VT by right singular vectors of A
-*              (CWorkspace: need 3*M, prefer 2*M+M*NB)
-*              (RWorkspace: M*M)
+*     Test the input arguments
 *
-               CALL ZLASET( 'F', M, N, CZERO, CZERO, VT, LDVT )
-               CALL ZLACP2( 'F', M, M, RWORK( IRVT ), M, VT, LDVT )
-               CALL ZUNMBR( 'P', 'R', 'C', M, N, M, A, LDA,
-     $                      WORK( ITAUP ), VT, LDVT, WORK( NWORK ),
-     $                      LWORK-NWORK+1, IERR )
-            ELSE
+      INFO = 0
+      LQUERY = ( LWORK.EQ.-1 )
+      UPPER = LSAME( UPLO, 'U' )
+      IF( .NOT.UPPER .AND. .NOT.LSAME( UPLO, 'L' ) ) THEN
+         INFO = -1
+      ELSE IF( N.LT.0 ) THEN
+         INFO = -2
+      ELSE IF( LDA.LT.MAX( 1, N ) ) THEN
+         INFO = -4
+      ELSE IF( LWORK.LT.MAX( 1, N-1 ) .AND. .NOT.LQUERY ) THEN
+         INFO = -7
+      END IF
 *
-*              Perform bidiagonal SVD, computing left singular vectors
-*              of bidiagonal matrix in RWORK(IRU) and computing right
-*              singular vectors of bidiagonal matrix in RWORK(IRVT)
-*              (CWorkspace: need 0)
-*              (RWorkspace: need BDSPAC)
+      IF( INFO.EQ.0 ) THEN
+         IF( UPPER ) THEN
+            NB = ILAENV( 1, 'ZUNGQL', ' ', N-1, N-1, N-1, -1 )
+         ELSE
+            NB = ILAENV( 1, 'ZUNGQR', ' ', N-1, N-1, N-1, -1 )
+         END IF
+         LWKOPT = MAX( 1, N-1 )*NB
+         WORK( 1 ) = LWKOPT
+      END IF
 *
-               IRVT = NRWORK
-               IRU = IRVT + M*M
-               NRWORK = IRU + M*M
+      IF( INFO.NE.0 ) THEN
+         CALL XERBLA( 'ZUNGTR', -INFO )
+         RETURN
+      ELSE IF( LQUERY ) THEN
+         RETURN
+      END IF
 *
-               CALL DBDSDC( 'L', 'I', M, S, RWORK( IE ), RWORK( IRU ),
-     $                      M, RWORK( IRVT ), M, DUM, IDUM,
-     $                      RWORK( NRWORK ), IWORK, INFO )
+*     Quick return if possible
 *
-*              Copy real matrix RWORK(IRU) to complex matrix U
-*              Overwrite U by left singular vectors of A
-*              (CWorkspace: need 3*M, prefer 2*M+M*NB)
-*              (RWorkspace: M*M)
+      IF( N.EQ.0 ) THEN
+         WORK( 1 ) = 1
+         RETURN
+      END IF
 *
-               CALL ZLACP2( 'F', M, M, RWORK( IRU ), M, U, LDU )
-               CALL ZUNMBR( 'Q', 'L', 'N', M, M, N, A, LDA,
-     $                      WORK( ITAUQ ), U, LDU, WORK( NWORK ),
-     $                      LWORK-NWORK+1, IERR )
+      IF( UPPER ) THEN
 *
-*              Set all of VT to identity matrix
+*        Q was determined by a call to ZHETRD with UPLO = 'U'
 *
-               CALL ZLASET( 'F', N, N, CZERO, CONE, VT, LDVT )
+*        Shift the vectors which define the elementary reflectors one
+*        column to the left, and set the last row and column of Q to
+*        those of the unit matrix
 *
-*              Copy real matrix RWORK(IRVT) to complex matrix VT
-*              Overwrite VT by right singular vectors of A
-*              (CWorkspace: need 2*M+N, prefer 2*M+N*NB)
-*              (RWorkspace: M*M)
+         DO 20 J = 1, N - 1
+            DO 10 I = 1, J - 1
+               A( I, J ) = A( I, J+1 )
+   10       CONTINUE
+            A( N, J ) = ZERO
+   20    CONTINUE
+         DO 30 I = 1, N - 1
+            A( I, N ) = ZERO
+   30    CONTINUE
+         A( N, N ) = ONE
 *
-               CALL ZLACP2( 'F', M, M, RWORK( IRVT ), M, VT, LDVT )
-               CALL ZUNMBR( 'P', 'R', 'C', N, N, M, A, LDA,
-     $                      WORK( ITAUP ), VT, LDVT, WORK( NWORK ),
-     $                      LWORK-NWORK+1, IERR )
-            END IF
+*        Generate Q(1:n-1,1:n-1)
 *
-         END IF
+         CALL ZUNGQL( N-1, N-1, N-1, A, LDA, TAU, WORK, LWORK, IINFO )
 *
-      END IF
+      ELSE
 *
-*     Undo scaling if necessary
+*        Q was determined by a call to ZHETRD with UPLO = 'L'.
 *
-      IF( ISCL.EQ.1 ) THEN
-         IF( ANRM.GT.BIGNUM )
-     $      CALL DLASCL( 'G', 0, 0, BIGNUM, ANRM, MINMN, 1, S, MINMN,
-     $                   IERR )
-         IF( INFO.NE.0 .AND. ANRM.GT.BIGNUM )
-     $      CALL DLASCL( 'G', 0, 0, BIGNUM, ANRM, MINMN-1, 1,
-     $                   RWORK( IE ), MINMN, IERR )
-         IF( ANRM.LT.SMLNUM )
-     $      CALL DLASCL( 'G', 0, 0, SMLNUM, ANRM, MINMN, 1, S, MINMN,
-     $                   IERR )
-         IF( INFO.NE.0 .AND. ANRM.LT.SMLNUM )
-     $      CALL DLASCL( 'G', 0, 0, SMLNUM, ANRM, MINMN-1, 1,
-     $                   RWORK( IE ), MINMN, IERR )
-      END IF
+*        Shift the vectors which define the elementary reflectors one
+*        column to the right, and set the first row and column of Q to
+*        those of the unit matrix
 *
-*     Return optimal workspace in WORK(1)
+         DO 50 J = N, 2, -1
+            A( 1, J ) = ZERO
+            DO 40 I = J + 1, N
+               A( I, J ) = A( I, J-1 )
+   40       CONTINUE
+   50    CONTINUE
+         A( 1, 1 ) = ONE
+         DO 60 I = 2, N
+            A( I, 1 ) = ZERO
+   60    CONTINUE
+         IF( N.GT.1 ) THEN
 *
-      WORK( 1 ) = MAXWRK
+*           Generate Q(2:n,2:n)
 *
+            CALL ZUNGQR( N-1, N-1, N-1, A( 2, 2 ), LDA, TAU, WORK,
+     $                   LWORK, IINFO )
+         END IF
+      END IF
+      WORK( 1 ) = LWKOPT
       RETURN
 *
-*     End of ZGESDD
+*     End of ZUNGTR
 *
       END
-*> \brief \b ZLACP2 copies all or part of a real two-dimensional array to a complex array.
+*> \brief \b ZUNM2L multiplies a general matrix by the unitary matrix from a QL factorization determined by cgeqlf (unblocked algorithm).
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download ZLACP2 + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/zlacp2.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/zlacp2.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/zlacp2.f"> 
+*> Download ZUNM2L + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/zunm2l.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/zunm2l.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/zunm2l.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
-*       SUBROUTINE ZLACP2( UPLO, M, N, A, LDA, B, LDB )
-* 
+*       SUBROUTINE ZUNM2L( SIDE, TRANS, M, N, K, A, LDA, TAU, C, LDC,
+*                          WORK, INFO )
+*
 *       .. Scalar Arguments ..
-*       CHARACTER          UPLO
-*       INTEGER            LDA, LDB, M, N
+*       CHARACTER          SIDE, TRANS
+*       INTEGER            INFO, K, LDA, LDC, M, N
 *       ..
 *       .. Array Arguments ..
-*       DOUBLE PRECISION   A( LDA, * )
-*       COMPLEX*16         B( LDB, * )
+*       COMPLEX*16         A( LDA, * ), C( LDC, * ), TAU( * ), WORK( * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
 *>
 *> \verbatim
 *>
-*> ZLACP2 copies all or part of a real two-dimensional matrix A to a
-*> complex matrix B.
+*> ZUNM2L overwrites the general complex m-by-n matrix C with
+*>
+*>       Q * C  if SIDE = 'L' and TRANS = 'N', or
+*>
+*>       Q**H* C  if SIDE = 'L' and TRANS = 'C', or
+*>
+*>       C * Q  if SIDE = 'R' and TRANS = 'N', or
+*>
+*>       C * Q**H if SIDE = 'R' and TRANS = 'C',
+*>
+*> where Q is a complex unitary matrix defined as the product of k
+*> elementary reflectors
+*>
+*>       Q = H(k) . . . H(2) H(1)
+*>
+*> as returned by ZGEQLF. Q is of order m if SIDE = 'L' and of order n
+*> if SIDE = 'R'.
 *> \endverbatim
 *
 *  Arguments:
 *  ==========
 *
-*> \param[in] UPLO
+*> \param[in] SIDE
 *> \verbatim
-*>          UPLO is CHARACTER*1
-*>          Specifies the part of the matrix A to be copied to B.
-*>          = 'U':      Upper triangular part
-*>          = 'L':      Lower triangular part
-*>          Otherwise:  All of the matrix A
+*>          SIDE is CHARACTER*1
+*>          = 'L': apply Q or Q**H from the Left
+*>          = 'R': apply Q or Q**H from the Right
+*> \endverbatim
+*>
+*> \param[in] TRANS
+*> \verbatim
+*>          TRANS is CHARACTER*1
+*>          = 'N': apply Q  (No transpose)
+*>          = 'C': apply Q**H (Conjugate transpose)
 *> \endverbatim
 *>
 *> \param[in] M
 *> \verbatim
 *>          M is INTEGER
-*>          The number of rows of the matrix A.  M >= 0.
+*>          The number of rows of the matrix C. M >= 0.
 *> \endverbatim
 *>
 *> \param[in] N
 *> \verbatim
 *>          N is INTEGER
-*>          The number of columns of the matrix A.  N >= 0.
+*>          The number of columns of the matrix C. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] K
+*> \verbatim
+*>          K is INTEGER
+*>          The number of elementary reflectors whose product defines
+*>          the matrix Q.
+*>          If SIDE = 'L', M >= K >= 0;
+*>          if SIDE = 'R', N >= K >= 0.
 *> \endverbatim
 *>
 *> \param[in] A
 *> \verbatim
-*>          A is DOUBLE PRECISION array, dimension (LDA,N)
-*>          The m by n matrix A.  If UPLO = 'U', only the upper trapezium
-*>          is accessed; if UPLO = 'L', only the lower trapezium is
-*>          accessed.
+*>          A is COMPLEX*16 array, dimension (LDA,K)
+*>          The i-th column must contain the vector which defines the
+*>          elementary reflector H(i), for i = 1,2,...,k, as returned by
+*>          ZGEQLF in the last k columns of its array argument A.
+*>          A is modified by the routine but restored on exit.
 *> \endverbatim
 *>
 *> \param[in] LDA
 *> \verbatim
 *>          LDA is INTEGER
-*>          The leading dimension of the array A.  LDA >= max(1,M).
+*>          The leading dimension of the array A.
+*>          If SIDE = 'L', LDA >= max(1,M);
+*>          if SIDE = 'R', LDA >= max(1,N).
 *> \endverbatim
 *>
-*> \param[out] B
+*> \param[in] TAU
 *> \verbatim
-*>          B is COMPLEX*16 array, dimension (LDB,N)
-*>          On exit, B = A in the locations specified by UPLO.
+*>          TAU is COMPLEX*16 array, dimension (K)
+*>          TAU(i) must contain the scalar factor of the elementary
+*>          reflector H(i), as returned by ZGEQLF.
 *> \endverbatim
 *>
-*> \param[in] LDB
+*> \param[in,out] C
 *> \verbatim
-*>          LDB is INTEGER
-*>          The leading dimension of the array B.  LDB >= max(1,M).
+*>          C is COMPLEX*16 array, dimension (LDC,N)
+*>          On entry, the m-by-n matrix C.
+*>          On exit, C is overwritten by Q*C or Q**H*C or C*Q**H or C*Q.
+*> \endverbatim
+*>
+*> \param[in] LDC
+*> \verbatim
+*>          LDC is INTEGER
+*>          The leading dimension of the array C. LDC >= max(1,M).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*>          WORK is COMPLEX*16 array, dimension
+*>                                   (N) if SIDE = 'L',
+*>                                   (M) if SIDE = 'R'
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*>          INFO is INTEGER
+*>          = 0: successful exit
+*>          < 0: if INFO = -i, the i-th argument had an illegal value
 *> \endverbatim
 *
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date September 2012
+*> \date December 2016
 *
-*> \ingroup complex16OTHERauxiliary
+*> \ingroup complex16OTHERcomputational
 *
 *  =====================================================================
-      SUBROUTINE ZLACP2( UPLO, M, N, A, LDA, B, LDB )
+      SUBROUTINE ZUNM2L( SIDE, TRANS, M, N, K, A, LDA, TAU, C, LDC,
+     $                   WORK, INFO )
 *
-*  -- LAPACK auxiliary routine (version 3.4.2) --
+*  -- LAPACK computational routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     September 2012
+*     December 2016
 *
 *     .. Scalar Arguments ..
-      CHARACTER          UPLO
-      INTEGER            LDA, LDB, M, N
+      CHARACTER          SIDE, TRANS
+      INTEGER            INFO, K, LDA, LDC, M, N
 *     ..
 *     .. Array Arguments ..
-      DOUBLE PRECISION   A( LDA, * )
-      COMPLEX*16         B( LDB, * )
+      COMPLEX*16         A( LDA, * ), C( LDC, * ), TAU( * ), WORK( * )
 *     ..
 *
 *  =====================================================================
 *
+*     .. Parameters ..
+      COMPLEX*16         ONE
+      PARAMETER          ( ONE = ( 1.0D+0, 0.0D+0 ) )
+*     ..
 *     .. Local Scalars ..
-      INTEGER            I, J
+      LOGICAL            LEFT, NOTRAN
+      INTEGER            I, I1, I2, I3, MI, NI, NQ
+      COMPLEX*16         AII, TAUI
 *     ..
 *     .. External Functions ..
       LOGICAL            LSAME
       EXTERNAL           LSAME
 *     ..
+*     .. External Subroutines ..
+      EXTERNAL           XERBLA, ZLARF
+*     ..
 *     .. Intrinsic Functions ..
-      INTRINSIC          MIN
+      INTRINSIC          DCONJG, MAX
 *     ..
 *     .. Executable Statements ..
 *
-      IF( LSAME( UPLO, 'U' ) ) THEN
-         DO 20 J = 1, N
-            DO 10 I = 1, MIN( J, M )
-               B( I, J ) = A( I, J )
-   10       CONTINUE
-   20    CONTINUE
+*     Test the input arguments
 *
-      ELSE IF( LSAME( UPLO, 'L' ) ) THEN
-         DO 40 J = 1, N
-            DO 30 I = J, M
-               B( I, J ) = A( I, J )
-   30       CONTINUE
-   40    CONTINUE
+      INFO = 0
+      LEFT = LSAME( SIDE, 'L' )
+      NOTRAN = LSAME( TRANS, 'N' )
+*
+*     NQ is the order of Q
 *
+      IF( LEFT ) THEN
+         NQ = M
       ELSE
-         DO 60 J = 1, N
-            DO 50 I = 1, M
-               B( I, J ) = A( I, J )
-   50       CONTINUE
-   60    CONTINUE
+         NQ = N
+      END IF
+      IF( .NOT.LEFT .AND. .NOT.LSAME( SIDE, 'R' ) ) THEN
+         INFO = -1
+      ELSE IF( .NOT.NOTRAN .AND. .NOT.LSAME( TRANS, 'C' ) ) THEN
+         INFO = -2
+      ELSE IF( M.LT.0 ) THEN
+         INFO = -3
+      ELSE IF( N.LT.0 ) THEN
+         INFO = -4
+      ELSE IF( K.LT.0 .OR. K.GT.NQ ) THEN
+         INFO = -5
+      ELSE IF( LDA.LT.MAX( 1, NQ ) ) THEN
+         INFO = -7
+      ELSE IF( LDC.LT.MAX( 1, M ) ) THEN
+         INFO = -10
+      END IF
+      IF( INFO.NE.0 ) THEN
+         CALL XERBLA( 'ZUNM2L', -INFO )
+         RETURN
+      END IF
+*
+*     Quick return if possible
+*
+      IF( M.EQ.0 .OR. N.EQ.0 .OR. K.EQ.0 )
+     $   RETURN
+*
+      IF( ( LEFT .AND. NOTRAN .OR. .NOT.LEFT .AND. .NOT.NOTRAN ) ) THEN
+         I1 = 1
+         I2 = K
+         I3 = 1
+      ELSE
+         I1 = K
+         I2 = 1
+         I3 = -1
       END IF
 *
+      IF( LEFT ) THEN
+         NI = N
+      ELSE
+         MI = M
+      END IF
+*
+      DO 10 I = I1, I2, I3
+         IF( LEFT ) THEN
+*
+*           H(i) or H(i)**H is applied to C(1:m-k+i,1:n)
+*
+            MI = M - K + I
+         ELSE
+*
+*           H(i) or H(i)**H is applied to C(1:m,1:n-k+i)
+*
+            NI = N - K + I
+         END IF
+*
+*        Apply H(i) or H(i)**H
+*
+         IF( NOTRAN ) THEN
+            TAUI = TAU( I )
+         ELSE
+            TAUI = DCONJG( TAU( I ) )
+         END IF
+         AII = A( NQ-K+I, I )
+         A( NQ-K+I, I ) = ONE
+         CALL ZLARF( SIDE, MI, NI, A( 1, I ), 1, TAUI, C, LDC, WORK )
+         A( NQ-K+I, I ) = AII
+   10 CONTINUE
       RETURN
 *
-*     End of ZLACP2
+*     End of ZUNM2L
 *
       END
-*> \brief \b ZLACRM multiplies a complex matrix by a square real matrix.
+*> \brief \b ZUNM2R multiplies a general matrix by the unitary matrix from a QR factorization determined by cgeqrf (unblocked algorithm).
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download ZLACRM + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/zlacrm.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/zlacrm.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/zlacrm.f"> 
+*> Download ZUNM2R + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/zunm2r.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/zunm2r.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/zunm2r.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
-*       SUBROUTINE ZLACRM( M, N, A, LDA, B, LDB, C, LDC, RWORK )
-* 
+*       SUBROUTINE ZUNM2R( SIDE, TRANS, M, N, K, A, LDA, TAU, C, LDC,
+*                          WORK, INFO )
+*
 *       .. Scalar Arguments ..
-*       INTEGER            LDA, LDB, LDC, M, N
+*       CHARACTER          SIDE, TRANS
+*       INTEGER            INFO, K, LDA, LDC, M, N
 *       ..
 *       .. Array Arguments ..
-*       DOUBLE PRECISION   B( LDB, * ), RWORK( * )
-*       COMPLEX*16         A( LDA, * ), C( LDC, * )
+*       COMPLEX*16         A( LDA, * ), C( LDC, * ), TAU( * ), WORK( * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
 *>
 *> \verbatim
 *>
-*> ZLACRM performs a very simple matrix-matrix multiplication:
-*>          C := A * B,
-*> where A is M by N and complex; B is N by N and real;
-*> C is M by N and complex.
+*> ZUNM2R overwrites the general complex m-by-n matrix C with
+*>
+*>       Q * C  if SIDE = 'L' and TRANS = 'N', or
+*>
+*>       Q**H* C  if SIDE = 'L' and TRANS = 'C', or
+*>
+*>       C * Q  if SIDE = 'R' and TRANS = 'N', or
+*>
+*>       C * Q**H if SIDE = 'R' and TRANS = 'C',
+*>
+*> where Q is a complex unitary matrix defined as the product of k
+*> elementary reflectors
+*>
+*>       Q = H(1) H(2) . . . H(k)
+*>
+*> as returned by ZGEQRF. Q is of order m if SIDE = 'L' and of order n
+*> if SIDE = 'R'.
 *> \endverbatim
 *
 *  Arguments:
 *  ==========
 *
+*> \param[in] SIDE
+*> \verbatim
+*>          SIDE is CHARACTER*1
+*>          = 'L': apply Q or Q**H from the Left
+*>          = 'R': apply Q or Q**H from the Right
+*> \endverbatim
+*>
+*> \param[in] TRANS
+*> \verbatim
+*>          TRANS is CHARACTER*1
+*>          = 'N': apply Q  (No transpose)
+*>          = 'C': apply Q**H (Conjugate transpose)
+*> \endverbatim
+*>
 *> \param[in] M
 *> \verbatim
 *>          M is INTEGER
-*>          The number of rows of the matrix A and of the matrix C.
-*>          M >= 0.
+*>          The number of rows of the matrix C. M >= 0.
 *> \endverbatim
 *>
 *> \param[in] N
 *> \verbatim
 *>          N is INTEGER
-*>          The number of columns and rows of the matrix B and
-*>          the number of columns of the matrix C.
-*>          N >= 0.
+*>          The number of columns of the matrix C. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] K
+*> \verbatim
+*>          K is INTEGER
+*>          The number of elementary reflectors whose product defines
+*>          the matrix Q.
+*>          If SIDE = 'L', M >= K >= 0;
+*>          if SIDE = 'R', N >= K >= 0.
 *> \endverbatim
 *>
 *> \param[in] A
 *> \verbatim
-*>          A is COMPLEX*16 array, dimension (LDA, N)
-*>          A contains the M by N matrix A.
+*>          A is COMPLEX*16 array, dimension (LDA,K)
+*>          The i-th column must contain the vector which defines the
+*>          elementary reflector H(i), for i = 1,2,...,k, as returned by
+*>          ZGEQRF in the first k columns of its array argument A.
+*>          A is modified by the routine but restored on exit.
 *> \endverbatim
 *>
 *> \param[in] LDA
 *> \verbatim
 *>          LDA is INTEGER
-*>          The leading dimension of the array A. LDA >=max(1,M).
+*>          The leading dimension of the array A.
+*>          If SIDE = 'L', LDA >= max(1,M);
+*>          if SIDE = 'R', LDA >= max(1,N).
 *> \endverbatim
 *>
-*> \param[in] B
+*> \param[in] TAU
 *> \verbatim
-*>          B is DOUBLE PRECISION array, dimension (LDB, N)
-*>          B contains the N by N matrix B.
+*>          TAU is COMPLEX*16 array, dimension (K)
+*>          TAU(i) must contain the scalar factor of the elementary
+*>          reflector H(i), as returned by ZGEQRF.
 *> \endverbatim
 *>
-*> \param[in] LDB
+*> \param[in,out] C
 *> \verbatim
-*>          LDB is INTEGER
-*>          The leading dimension of the array B. LDB >=max(1,N).
+*>          C is COMPLEX*16 array, dimension (LDC,N)
+*>          On entry, the m-by-n matrix C.
+*>          On exit, C is overwritten by Q*C or Q**H*C or C*Q**H or C*Q.
 *> \endverbatim
 *>
-*> \param[in] C
+*> \param[in] LDC
 *> \verbatim
-*>          C is COMPLEX*16 array, dimension (LDC, N)
-*>          C contains the M by N matrix C.
+*>          LDC is INTEGER
+*>          The leading dimension of the array C. LDC >= max(1,M).
 *> \endverbatim
 *>
-*> \param[in] LDC
+*> \param[out] WORK
 *> \verbatim
-*>          LDC is INTEGER
-*>          The leading dimension of the array C. LDC >=max(1,N).
+*>          WORK is COMPLEX*16 array, dimension
+*>                                   (N) if SIDE = 'L',
+*>                                   (M) if SIDE = 'R'
 *> \endverbatim
 *>
-*> \param[out] RWORK
+*> \param[out] INFO
 *> \verbatim
-*>          RWORK is DOUBLE PRECISION array, dimension (2*M*N)
+*>          INFO is INTEGER
+*>          = 0: successful exit
+*>          < 0: if INFO = -i, the i-th argument had an illegal value
 *> \endverbatim
 *
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date September 2012
+*> \date December 2016
 *
-*> \ingroup complex16OTHERauxiliary
+*> \ingroup complex16OTHERcomputational
 *
 *  =====================================================================
-      SUBROUTINE ZLACRM( M, N, A, LDA, B, LDB, C, LDC, RWORK )
+      SUBROUTINE ZUNM2R( SIDE, TRANS, M, N, K, A, LDA, TAU, C, LDC,
+     $                   WORK, INFO )
 *
-*  -- LAPACK auxiliary routine (version 3.4.2) --
+*  -- LAPACK computational routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     September 2012
+*     December 2016
 *
 *     .. Scalar Arguments ..
-      INTEGER            LDA, LDB, LDC, M, N
+      CHARACTER          SIDE, TRANS
+      INTEGER            INFO, K, LDA, LDC, M, N
 *     ..
 *     .. Array Arguments ..
-      DOUBLE PRECISION   B( LDB, * ), RWORK( * )
-      COMPLEX*16         A( LDA, * ), C( LDC, * )
+      COMPLEX*16         A( LDA, * ), C( LDC, * ), TAU( * ), WORK( * )
 *     ..
 *
 *  =====================================================================
 *
 *     .. Parameters ..
-      DOUBLE PRECISION   ONE, ZERO
-      PARAMETER          ( ONE = 1.0D0, ZERO = 0.0D0 )
+      COMPLEX*16         ONE
+      PARAMETER          ( ONE = ( 1.0D+0, 0.0D+0 ) )
 *     ..
 *     .. Local Scalars ..
-      INTEGER            I, J, L
+      LOGICAL            LEFT, NOTRAN
+      INTEGER            I, I1, I2, I3, IC, JC, MI, NI, NQ
+      COMPLEX*16         AII, TAUI
 *     ..
-*     .. Intrinsic Functions ..
-      INTRINSIC          DBLE, DCMPLX, DIMAG
+*     .. External Functions ..
+      LOGICAL            LSAME
+      EXTERNAL           LSAME
 *     ..
 *     .. External Subroutines ..
-      EXTERNAL           DGEMM
+      EXTERNAL           XERBLA, ZLARF
+*     ..
+*     .. Intrinsic Functions ..
+      INTRINSIC          DCONJG, MAX
 *     ..
 *     .. Executable Statements ..
 *
-*     Quick return if possible.
+*     Test the input arguments
 *
-      IF( ( M.EQ.0 ) .OR. ( N.EQ.0 ) )
+      INFO = 0
+      LEFT = LSAME( SIDE, 'L' )
+      NOTRAN = LSAME( TRANS, 'N' )
+*
+*     NQ is the order of Q
+*
+      IF( LEFT ) THEN
+         NQ = M
+      ELSE
+         NQ = N
+      END IF
+      IF( .NOT.LEFT .AND. .NOT.LSAME( SIDE, 'R' ) ) THEN
+         INFO = -1
+      ELSE IF( .NOT.NOTRAN .AND. .NOT.LSAME( TRANS, 'C' ) ) THEN
+         INFO = -2
+      ELSE IF( M.LT.0 ) THEN
+         INFO = -3
+      ELSE IF( N.LT.0 ) THEN
+         INFO = -4
+      ELSE IF( K.LT.0 .OR. K.GT.NQ ) THEN
+         INFO = -5
+      ELSE IF( LDA.LT.MAX( 1, NQ ) ) THEN
+         INFO = -7
+      ELSE IF( LDC.LT.MAX( 1, M ) ) THEN
+         INFO = -10
+      END IF
+      IF( INFO.NE.0 ) THEN
+         CALL XERBLA( 'ZUNM2R', -INFO )
+         RETURN
+      END IF
+*
+*     Quick return if possible
+*
+      IF( M.EQ.0 .OR. N.EQ.0 .OR. K.EQ.0 )
      $   RETURN
 *
-      DO 20 J = 1, N
-         DO 10 I = 1, M
-            RWORK( ( J-1 )*M+I ) = DBLE( A( I, J ) )
-   10    CONTINUE
-   20 CONTINUE
+      IF( ( LEFT .AND. .NOT.NOTRAN .OR. .NOT.LEFT .AND. NOTRAN ) ) THEN
+         I1 = 1
+         I2 = K
+         I3 = 1
+      ELSE
+         I1 = K
+         I2 = 1
+         I3 = -1
+      END IF
 *
-      L = M*N + 1
-      CALL DGEMM( 'N', 'N', M, N, N, ONE, RWORK, M, B, LDB, ZERO,
-     $            RWORK( L ), M )
-      DO 40 J = 1, N
-         DO 30 I = 1, M
-            C( I, J ) = RWORK( L+( J-1 )*M+I-1 )
-   30    CONTINUE
-   40 CONTINUE
+      IF( LEFT ) THEN
+         NI = N
+         JC = 1
+      ELSE
+         MI = M
+         IC = 1
+      END IF
 *
-      DO 60 J = 1, N
-         DO 50 I = 1, M
-            RWORK( ( J-1 )*M+I ) = DIMAG( A( I, J ) )
-   50    CONTINUE
-   60 CONTINUE
-      CALL DGEMM( 'N', 'N', M, N, N, ONE, RWORK, M, B, LDB, ZERO,
-     $            RWORK( L ), M )
-      DO 80 J = 1, N
-         DO 70 I = 1, M
-            C( I, J ) = DCMPLX( DBLE( C( I, J ) ),
-     $                  RWORK( L+( J-1 )*M+I-1 ) )
-   70    CONTINUE
-   80 CONTINUE
+      DO 10 I = I1, I2, I3
+         IF( LEFT ) THEN
+*
+*           H(i) or H(i)**H is applied to C(i:m,1:n)
+*
+            MI = M - I + 1
+            IC = I
+         ELSE
+*
+*           H(i) or H(i)**H is applied to C(1:m,i:n)
+*
+            NI = N - I + 1
+            JC = I
+         END IF
+*
+*        Apply H(i) or H(i)**H
 *
+         IF( NOTRAN ) THEN
+            TAUI = TAU( I )
+         ELSE
+            TAUI = DCONJG( TAU( I ) )
+         END IF
+         AII = A( I, I )
+         A( I, I ) = ONE
+         CALL ZLARF( SIDE, MI, NI, A( I, I ), 1, TAUI, C( IC, JC ), LDC,
+     $               WORK )
+         A( I, I ) = AII
+   10 CONTINUE
       RETURN
 *
-*     End of ZLACRM
+*     End of ZUNM2R
 *
       END
-*> \brief \b ZLARCM copies all or part of a real two-dimensional array to a complex array.
+*> \brief \b ZUNMBR
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download ZLARCM + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/zlarcm.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/zlarcm.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/zlarcm.f"> 
+*> Download ZUNMBR + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/zunmbr.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/zunmbr.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/zunmbr.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
-*       SUBROUTINE ZLARCM( M, N, A, LDA, B, LDB, C, LDC, RWORK )
-* 
+*       SUBROUTINE ZUNMBR( VECT, SIDE, TRANS, M, N, K, A, LDA, TAU, C,
+*                          LDC, WORK, LWORK, INFO )
+*
 *       .. Scalar Arguments ..
-*       INTEGER            LDA, LDB, LDC, M, N
+*       CHARACTER          SIDE, TRANS, VECT
+*       INTEGER            INFO, K, LDA, LDC, LWORK, M, N
 *       ..
 *       .. Array Arguments ..
-*       DOUBLE PRECISION   A( LDA, * ), RWORK( * )
-*       COMPLEX*16         B( LDB, * ), C( LDC, * )
+*       COMPLEX*16         A( LDA, * ), C( LDC, * ), TAU( * ), WORK( * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
 *>
 *> \verbatim
 *>
-*> ZLARCM performs a very simple matrix-matrix multiplication:
-*>          C := A * B,
-*> where A is M by M and real; B is M by N and complex;
-*> C is M by N and complex.
+*> If VECT = 'Q', ZUNMBR overwrites the general complex M-by-N matrix C
+*> with
+*>                 SIDE = 'L'     SIDE = 'R'
+*> TRANS = 'N':      Q * C          C * Q
+*> TRANS = 'C':      Q**H * C       C * Q**H
+*>
+*> If VECT = 'P', ZUNMBR overwrites the general complex M-by-N matrix C
+*> with
+*>                 SIDE = 'L'     SIDE = 'R'
+*> TRANS = 'N':      P * C          C * P
+*> TRANS = 'C':      P**H * C       C * P**H
+*>
+*> Here Q and P**H are the unitary matrices determined by ZGEBRD when
+*> reducing a complex matrix A to bidiagonal form: A = Q * B * P**H. Q
+*> and P**H are defined as products of elementary reflectors H(i) and
+*> G(i) respectively.
+*>
+*> Let nq = m if SIDE = 'L' and nq = n if SIDE = 'R'. Thus nq is the
+*> order of the unitary matrix Q or P**H that is applied.
+*>
+*> If VECT = 'Q', A is assumed to have been an NQ-by-K matrix:
+*> if nq >= k, Q = H(1) H(2) . . . H(k);
+*> if nq < k, Q = H(1) H(2) . . . H(nq-1).
+*>
+*> If VECT = 'P', A is assumed to have been a K-by-NQ matrix:
+*> if k < nq, P = G(1) G(2) . . . G(k);
+*> if k >= nq, P = G(1) G(2) . . . G(nq-1).
 *> \endverbatim
 *
 *  Arguments:
 *  ==========
 *
+*> \param[in] VECT
+*> \verbatim
+*>          VECT is CHARACTER*1
+*>          = 'Q': apply Q or Q**H;
+*>          = 'P': apply P or P**H.
+*> \endverbatim
+*>
+*> \param[in] SIDE
+*> \verbatim
+*>          SIDE is CHARACTER*1
+*>          = 'L': apply Q, Q**H, P or P**H from the Left;
+*>          = 'R': apply Q, Q**H, P or P**H from the Right.
+*> \endverbatim
+*>
+*> \param[in] TRANS
+*> \verbatim
+*>          TRANS is CHARACTER*1
+*>          = 'N':  No transpose, apply Q or P;
+*>          = 'C':  Conjugate transpose, apply Q**H or P**H.
+*> \endverbatim
+*>
 *> \param[in] M
 *> \verbatim
 *>          M is INTEGER
-*>          The number of rows of the matrix A and of the matrix C.
-*>          M >= 0.
+*>          The number of rows of the matrix C. M >= 0.
 *> \endverbatim
 *>
 *> \param[in] N
 *> \verbatim
 *>          N is INTEGER
-*>          The number of columns and rows of the matrix B and
-*>          the number of columns of the matrix C.
-*>          N >= 0.
+*>          The number of columns of the matrix C. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] K
+*> \verbatim
+*>          K is INTEGER
+*>          If VECT = 'Q', the number of columns in the original
+*>          matrix reduced by ZGEBRD.
+*>          If VECT = 'P', the number of rows in the original
+*>          matrix reduced by ZGEBRD.
+*>          K >= 0.
 *> \endverbatim
 *>
 *> \param[in] A
 *> \verbatim
-*>          A is DOUBLE PRECISION array, dimension (LDA, M)
-*>          A contains the M by M matrix A.
+*>          A is COMPLEX*16 array, dimension
+*>                                (LDA,min(nq,K)) if VECT = 'Q'
+*>                                (LDA,nq)        if VECT = 'P'
+*>          The vectors which define the elementary reflectors H(i) and
+*>          G(i), whose products determine the matrices Q and P, as
+*>          returned by ZGEBRD.
 *> \endverbatim
 *>
 *> \param[in] LDA
 *> \verbatim
 *>          LDA is INTEGER
-*>          The leading dimension of the array A. LDA >=max(1,M).
+*>          The leading dimension of the array A.
+*>          If VECT = 'Q', LDA >= max(1,nq);
+*>          if VECT = 'P', LDA >= max(1,min(nq,K)).
 *> \endverbatim
 *>
-*> \param[in] B
+*> \param[in] TAU
 *> \verbatim
-*>          B is DOUBLE PRECISION array, dimension (LDB, N)
-*>          B contains the M by N matrix B.
+*>          TAU is COMPLEX*16 array, dimension (min(nq,K))
+*>          TAU(i) must contain the scalar factor of the elementary
+*>          reflector H(i) or G(i) which determines Q or P, as returned
+*>          by ZGEBRD in the array argument TAUQ or TAUP.
 *> \endverbatim
 *>
-*> \param[in] LDB
+*> \param[in,out] C
 *> \verbatim
-*>          LDB is INTEGER
-*>          The leading dimension of the array B. LDB >=max(1,M).
+*>          C is COMPLEX*16 array, dimension (LDC,N)
+*>          On entry, the M-by-N matrix C.
+*>          On exit, C is overwritten by Q*C or Q**H*C or C*Q**H or C*Q
+*>          or P*C or P**H*C or C*P or C*P**H.
 *> \endverbatim
 *>
-*> \param[in] C
+*> \param[in] LDC
 *> \verbatim
-*>          C is COMPLEX*16 array, dimension (LDC, N)
-*>          C contains the M by N matrix C.
+*>          LDC is INTEGER
+*>          The leading dimension of the array C. LDC >= max(1,M).
 *> \endverbatim
 *>
-*> \param[in] LDC
+*> \param[out] WORK
 *> \verbatim
-*>          LDC is INTEGER
-*>          The leading dimension of the array C. LDC >=max(1,M).
+*>          WORK is COMPLEX*16 array, dimension (MAX(1,LWORK))
+*>          On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
 *> \endverbatim
 *>
-*> \param[out] RWORK
+*> \param[in] LWORK
 *> \verbatim
-*>          RWORK is DOUBLE PRECISION array, dimension (2*M*N)
+*>          LWORK is INTEGER
+*>          The dimension of the array WORK.
+*>          If SIDE = 'L', LWORK >= max(1,N);
+*>          if SIDE = 'R', LWORK >= max(1,M);
+*>          if N = 0 or M = 0, LWORK >= 1.
+*>          For optimum performance LWORK >= max(1,N*NB) if SIDE = 'L',
+*>          and LWORK >= max(1,M*NB) if SIDE = 'R', where NB is the
+*>          optimal blocksize. (NB = 0 if M = 0 or N = 0.)
+*>
+*>          If LWORK = -1, then a workspace query is assumed; the routine
+*>          only calculates the optimal size of the WORK array, returns
+*>          this value as the first entry of the WORK array, and no error
+*>          message related to LWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*>          INFO is INTEGER
+*>          = 0:  successful exit
+*>          < 0:  if INFO = -i, the i-th argument had an illegal value
 *> \endverbatim
 *
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date September 2012
+*> \date December 2016
 *
-*> \ingroup complex16OTHERauxiliary
+*> \ingroup complex16OTHERcomputational
 *
 *  =====================================================================
-      SUBROUTINE ZLARCM( M, N, A, LDA, B, LDB, C, LDC, RWORK )
+      SUBROUTINE ZUNMBR( VECT, SIDE, TRANS, M, N, K, A, LDA, TAU, C,
+     $                   LDC, WORK, LWORK, INFO )
 *
-*  -- LAPACK auxiliary routine (version 3.4.2) --
+*  -- LAPACK computational routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     September 2012
+*     December 2016
 *
 *     .. Scalar Arguments ..
-      INTEGER            LDA, LDB, LDC, M, N
+      CHARACTER          SIDE, TRANS, VECT
+      INTEGER            INFO, K, LDA, LDC, LWORK, M, N
 *     ..
 *     .. Array Arguments ..
-      DOUBLE PRECISION   A( LDA, * ), RWORK( * )
-      COMPLEX*16         B( LDB, * ), C( LDC, * )
+      COMPLEX*16         A( LDA, * ), C( LDC, * ), TAU( * ), WORK( * )
 *     ..
 *
 *  =====================================================================
 *
-*     .. Parameters ..
-      DOUBLE PRECISION   ONE, ZERO
-      PARAMETER          ( ONE = 1.0D0, ZERO = 0.0D0 )
-*     ..
 *     .. Local Scalars ..
-      INTEGER            I, J, L
+      LOGICAL            APPLYQ, LEFT, LQUERY, NOTRAN
+      CHARACTER          TRANST
+      INTEGER            I1, I2, IINFO, LWKOPT, MI, NB, NI, NQ, NW
 *     ..
-*     .. Intrinsic Functions ..
-      INTRINSIC          DBLE, DCMPLX, DIMAG
+*     .. External Functions ..
+      LOGICAL            LSAME
+      INTEGER            ILAENV
+      EXTERNAL           LSAME, ILAENV
 *     ..
 *     .. External Subroutines ..
-      EXTERNAL           DGEMM
+      EXTERNAL           XERBLA, ZUNMLQ, ZUNMQR
+*     ..
+*     .. Intrinsic Functions ..
+      INTRINSIC          MAX, MIN
 *     ..
 *     .. Executable Statements ..
 *
-*     Quick return if possible.
+*     Test the input arguments
+*
+      INFO = 0
+      APPLYQ = LSAME( VECT, 'Q' )
+      LEFT = LSAME( SIDE, 'L' )
+      NOTRAN = LSAME( TRANS, 'N' )
+      LQUERY = ( LWORK.EQ.-1 )
+*
+*     NQ is the order of Q or P and NW is the minimum dimension of WORK
+*
+      IF( LEFT ) THEN
+         NQ = M
+         NW = N
+      ELSE
+         NQ = N
+         NW = M
+      END IF
+      IF( M.EQ.0 .OR. N.EQ.0 ) THEN
+         NW = 0
+      END IF
+      IF( .NOT.APPLYQ .AND. .NOT.LSAME( VECT, 'P' ) ) THEN
+         INFO = -1
+      ELSE IF( .NOT.LEFT .AND. .NOT.LSAME( SIDE, 'R' ) ) THEN
+         INFO = -2
+      ELSE IF( .NOT.NOTRAN .AND. .NOT.LSAME( TRANS, 'C' ) ) THEN
+         INFO = -3
+      ELSE IF( M.LT.0 ) THEN
+         INFO = -4
+      ELSE IF( N.LT.0 ) THEN
+         INFO = -5
+      ELSE IF( K.LT.0 ) THEN
+         INFO = -6
+      ELSE IF( ( APPLYQ .AND. LDA.LT.MAX( 1, NQ ) ) .OR.
+     $         ( .NOT.APPLYQ .AND. LDA.LT.MAX( 1, MIN( NQ, K ) ) ) )
+     $          THEN
+         INFO = -8
+      ELSE IF( LDC.LT.MAX( 1, M ) ) THEN
+         INFO = -11
+      ELSE IF( LWORK.LT.MAX( 1, NW ) .AND. .NOT.LQUERY ) THEN
+         INFO = -13
+      END IF
+*
+      IF( INFO.EQ.0 ) THEN
+         IF( NW.GT.0 ) THEN
+            IF( APPLYQ ) THEN
+               IF( LEFT ) THEN
+                  NB = ILAENV( 1, 'ZUNMQR', SIDE // TRANS, M-1, N, M-1,
+     $                 -1 )
+               ELSE
+                  NB = ILAENV( 1, 'ZUNMQR', SIDE // TRANS, M, N-1, N-1,
+     $                 -1 )
+               END IF
+            ELSE
+               IF( LEFT ) THEN
+                  NB = ILAENV( 1, 'ZUNMLQ', SIDE // TRANS, M-1, N, M-1,
+     $                 -1 )
+               ELSE
+                  NB = ILAENV( 1, 'ZUNMLQ', SIDE // TRANS, M, N-1, N-1,
+     $                 -1 )
+               END IF
+            END IF
+            LWKOPT = MAX( 1, NW*NB )
+         ELSE
+            LWKOPT = 1
+         END IF
+         WORK( 1 ) = LWKOPT
+      END IF
+*
+      IF( INFO.NE.0 ) THEN
+         CALL XERBLA( 'ZUNMBR', -INFO )
+         RETURN
+      ELSE IF( LQUERY ) THEN
+         RETURN
+      END IF
+*
+*     Quick return if possible
+*
+      IF( M.EQ.0 .OR. N.EQ.0 )
+     $   RETURN
+*
+      IF( APPLYQ ) THEN
+*
+*        Apply Q
+*
+         IF( NQ.GE.K ) THEN
+*
+*           Q was determined by a call to ZGEBRD with nq >= k
+*
+            CALL ZUNMQR( SIDE, TRANS, M, N, K, A, LDA, TAU, C, LDC,
+     $                   WORK, LWORK, IINFO )
+         ELSE IF( NQ.GT.1 ) THEN
+*
+*           Q was determined by a call to ZGEBRD with nq < k
+*
+            IF( LEFT ) THEN
+               MI = M - 1
+               NI = N
+               I1 = 2
+               I2 = 1
+            ELSE
+               MI = M
+               NI = N - 1
+               I1 = 1
+               I2 = 2
+            END IF
+            CALL ZUNMQR( SIDE, TRANS, MI, NI, NQ-1, A( 2, 1 ), LDA, TAU,
+     $                   C( I1, I2 ), LDC, WORK, LWORK, IINFO )
+         END IF
+      ELSE
+*
+*        Apply P
 *
-      IF( ( M.EQ.0 ) .OR. ( N.EQ.0 ) )
-     $   RETURN
+         IF( NOTRAN ) THEN
+            TRANST = 'C'
+         ELSE
+            TRANST = 'N'
+         END IF
+         IF( NQ.GT.K ) THEN
 *
-      DO 20 J = 1, N
-         DO 10 I = 1, M
-            RWORK( ( J-1 )*M+I ) = DBLE( B( I, J ) )
-   10    CONTINUE
-   20 CONTINUE
+*           P was determined by a call to ZGEBRD with nq > k
 *
-      L = M*N + 1
-      CALL DGEMM( 'N', 'N', M, N, M, ONE, A, LDA, RWORK, M, ZERO,
-     $            RWORK( L ), M )
-      DO 40 J = 1, N
-         DO 30 I = 1, M
-            C( I, J ) = RWORK( L+( J-1 )*M+I-1 )
-   30    CONTINUE
-   40 CONTINUE
+            CALL ZUNMLQ( SIDE, TRANST, M, N, K, A, LDA, TAU, C, LDC,
+     $                   WORK, LWORK, IINFO )
+         ELSE IF( NQ.GT.1 ) THEN
 *
-      DO 60 J = 1, N
-         DO 50 I = 1, M
-            RWORK( ( J-1 )*M+I ) = DIMAG( B( I, J ) )
-   50    CONTINUE
-   60 CONTINUE
-      CALL DGEMM( 'N', 'N', M, N, M, ONE, A, LDA, RWORK, M, ZERO,
-     $            RWORK( L ), M )
-      DO 80 J = 1, N
-         DO 70 I = 1, M
-            C( I, J ) = DCMPLX( DBLE( C( I, J ) ),
-     $                  RWORK( L+( J-1 )*M+I-1 ) )
-   70    CONTINUE
-   80 CONTINUE
+*           P was determined by a call to ZGEBRD with nq <= k
 *
+            IF( LEFT ) THEN
+               MI = M - 1
+               NI = N
+               I1 = 2
+               I2 = 1
+            ELSE
+               MI = M
+               NI = N - 1
+               I1 = 1
+               I2 = 2
+            END IF
+            CALL ZUNMLQ( SIDE, TRANST, MI, NI, NQ-1, A( 1, 2 ), LDA,
+     $                   TAU, C( I1, I2 ), LDC, WORK, LWORK, IINFO )
+         END IF
+      END IF
+      WORK( 1 ) = LWKOPT
       RETURN
 *
-*     End of ZLARCM
+*     End of ZUNMBR
 *
       END
-*> \brief <b> ZGELSD computes the minimum-norm solution to a linear least squares problem for GE matrices</b>
+*> \brief \b ZUNMHR
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download ZGELSD + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/zgelsd.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/zgelsd.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/zgelsd.f"> 
+*> Download ZUNMHR + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/zunmhr.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/zunmhr.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/zunmhr.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
-*       SUBROUTINE ZGELSD( M, N, NRHS, A, LDA, B, LDB, S, RCOND, RANK,
-*                          WORK, LWORK, RWORK, IWORK, INFO )
-* 
+*       SUBROUTINE ZUNMHR( SIDE, TRANS, M, N, ILO, IHI, A, LDA, TAU, C,
+*                          LDC, WORK, LWORK, INFO )
+*
 *       .. Scalar Arguments ..
-*       INTEGER            INFO, LDA, LDB, LWORK, M, N, NRHS, RANK
-*       DOUBLE PRECISION   RCOND
+*       CHARACTER          SIDE, TRANS
+*       INTEGER            IHI, ILO, INFO, LDA, LDC, LWORK, M, N
 *       ..
 *       .. Array Arguments ..
-*       INTEGER            IWORK( * )
-*       DOUBLE PRECISION   RWORK( * ), S( * )
-*       COMPLEX*16         A( LDA, * ), B( LDB, * ), WORK( * )
+*       COMPLEX*16         A( LDA, * ), C( LDC, * ), TAU( * ), WORK( * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
 *>
 *> \verbatim
 *>
-*> ZGELSD computes the minimum-norm solution to a real linear least
-*> squares problem:
-*>     minimize 2-norm(| b - A*x |)
-*> using the singular value decomposition (SVD) of A. A is an M-by-N
-*> matrix which may be rank-deficient.
-*>
-*> Several right hand side vectors b and solution vectors x can be
-*> handled in a single call; they are stored as the columns of the
-*> M-by-NRHS right hand side matrix B and the N-by-NRHS solution
-*> matrix X.
+*> ZUNMHR overwrites the general complex M-by-N matrix C with
 *>
-*> The problem is solved in three steps:
-*> (1) Reduce the coefficient matrix A to bidiagonal form with
-*>     Householder tranformations, reducing the original problem
-*>     into a "bidiagonal least squares problem" (BLS)
-*> (2) Solve the BLS using a divide and conquer approach.
-*> (3) Apply back all the Householder tranformations to solve
-*>     the original least squares problem.
+*>                 SIDE = 'L'     SIDE = 'R'
+*> TRANS = 'N':      Q * C          C * Q
+*> TRANS = 'C':      Q**H * C       C * Q**H
 *>
-*> The effective rank of A is determined by treating as zero those
-*> singular values which are less than RCOND times the largest singular
-*> value.
+*> where Q is a complex unitary matrix of order nq, with nq = m if
+*> SIDE = 'L' and nq = n if SIDE = 'R'. Q is defined as the product of
+*> IHI-ILO elementary reflectors, as returned by ZGEHRD:
 *>
-*> The divide and conquer algorithm makes very mild assumptions about
-*> floating point arithmetic. It will work on machines with a guard
-*> digit in add/subtract, or on those binary machines without guard
-*> digits which subtract like the Cray X-MP, Cray Y-MP, Cray C-90, or
-*> Cray-2. It could conceivably fail on hexadecimal or decimal machines
-*> without guard digits, but we know of none.
+*> Q = H(ilo) H(ilo+1) . . . H(ihi-1).
 *> \endverbatim
 *
 *  Arguments:
 *  ==========
 *
+*> \param[in] SIDE
+*> \verbatim
+*>          SIDE is CHARACTER*1
+*>          = 'L': apply Q or Q**H from the Left;
+*>          = 'R': apply Q or Q**H from the Right.
+*> \endverbatim
+*>
+*> \param[in] TRANS
+*> \verbatim
+*>          TRANS is CHARACTER*1
+*>          = 'N': apply Q  (No transpose)
+*>          = 'C': apply Q**H (Conjugate transpose)
+*> \endverbatim
+*>
 *> \param[in] M
 *> \verbatim
 *>          M is INTEGER
-*>          The number of rows of the matrix A. M >= 0.
+*>          The number of rows of the matrix C. M >= 0.
 *> \endverbatim
 *>
 *> \param[in] N
 *> \verbatim
 *>          N is INTEGER
-*>          The number of columns of the matrix A. N >= 0.
+*>          The number of columns of the matrix C. N >= 0.
 *> \endverbatim
 *>
-*> \param[in] NRHS
+*> \param[in] ILO
 *> \verbatim
-*>          NRHS is INTEGER
-*>          The number of right hand sides, i.e., the number of columns
-*>          of the matrices B and X. NRHS >= 0.
+*>          ILO is INTEGER
 *> \endverbatim
 *>
-*> \param[in] A
+*> \param[in] IHI
 *> \verbatim
-*>          A is COMPLEX*16 array, dimension (LDA,N)
-*>          On entry, the M-by-N matrix A.
-*>          On exit, A has been destroyed.
-*> \endverbatim
+*>          IHI is INTEGER
 *>
-*> \param[in] LDA
-*> \verbatim
-*>          LDA is INTEGER
-*>          The leading dimension of the array A. LDA >= max(1,M).
+*>          ILO and IHI must have the same values as in the previous call
+*>          of ZGEHRD. Q is equal to the unit matrix except in the
+*>          submatrix Q(ilo+1:ihi,ilo+1:ihi).
+*>          If SIDE = 'L', then 1 <= ILO <= IHI <= M, if M > 0, and
+*>          ILO = 1 and IHI = 0, if M = 0;
+*>          if SIDE = 'R', then 1 <= ILO <= IHI <= N, if N > 0, and
+*>          ILO = 1 and IHI = 0, if N = 0.
 *> \endverbatim
 *>
-*> \param[in,out] B
+*> \param[in] A
 *> \verbatim
-*>          B is COMPLEX*16 array, dimension (LDB,NRHS)
-*>          On entry, the M-by-NRHS right hand side matrix B.
-*>          On exit, B is overwritten by the N-by-NRHS solution matrix X.
-*>          If m >= n and RANK = n, the residual sum-of-squares for
-*>          the solution in the i-th column is given by the sum of
-*>          squares of the modulus of elements n+1:m in that column.
+*>          A is COMPLEX*16 array, dimension
+*>                               (LDA,M) if SIDE = 'L'
+*>                               (LDA,N) if SIDE = 'R'
+*>          The vectors which define the elementary reflectors, as
+*>          returned by ZGEHRD.
 *> \endverbatim
 *>
-*> \param[in] LDB
+*> \param[in] LDA
 *> \verbatim
-*>          LDB is INTEGER
-*>          The leading dimension of the array B.  LDB >= max(1,M,N).
+*>          LDA is INTEGER
+*>          The leading dimension of the array A.
+*>          LDA >= max(1,M) if SIDE = 'L'; LDA >= max(1,N) if SIDE = 'R'.
 *> \endverbatim
 *>
-*> \param[out] S
+*> \param[in] TAU
 *> \verbatim
-*>          S is DOUBLE PRECISION array, dimension (min(M,N))
-*>          The singular values of A in decreasing order.
-*>          The condition number of A in the 2-norm = S(1)/S(min(m,n)).
+*>          TAU is COMPLEX*16 array, dimension
+*>                               (M-1) if SIDE = 'L'
+*>                               (N-1) if SIDE = 'R'
+*>          TAU(i) must contain the scalar factor of the elementary
+*>          reflector H(i), as returned by ZGEHRD.
 *> \endverbatim
 *>
-*> \param[in] RCOND
+*> \param[in,out] C
 *> \verbatim
-*>          RCOND is DOUBLE PRECISION
-*>          RCOND is used to determine the effective rank of A.
-*>          Singular values S(i) <= RCOND*S(1) are treated as zero.
-*>          If RCOND < 0, machine precision is used instead.
+*>          C is COMPLEX*16 array, dimension (LDC,N)
+*>          On entry, the M-by-N matrix C.
+*>          On exit, C is overwritten by Q*C or Q**H*C or C*Q**H or C*Q.
 *> \endverbatim
 *>
-*> \param[out] RANK
+*> \param[in] LDC
 *> \verbatim
-*>          RANK is INTEGER
-*>          The effective rank of A, i.e., the number of singular values
-*>          which are greater than RCOND*S(1).
+*>          LDC is INTEGER
+*>          The leading dimension of the array C. LDC >= max(1,M).
 *> \endverbatim
 *>
 *> \param[out] WORK
@@ -34257,2405 +54173,1779 @@
 *> \param[in] LWORK
 *> \verbatim
 *>          LWORK is INTEGER
-*>          The dimension of the array WORK. LWORK must be at least 1.
-*>          The exact minimum amount of workspace needed depends on M,
-*>          N and NRHS. As long as LWORK is at least
-*>              2*N + N*NRHS
-*>          if M is greater than or equal to N or
-*>              2*M + M*NRHS
-*>          if M is less than N, the code will execute correctly.
-*>          For good performance, LWORK should generally be larger.
+*>          The dimension of the array WORK.
+*>          If SIDE = 'L', LWORK >= max(1,N);
+*>          if SIDE = 'R', LWORK >= max(1,M).
+*>          For optimum performance LWORK >= N*NB if SIDE = 'L', and
+*>          LWORK >= M*NB if SIDE = 'R', where NB is the optimal
+*>          blocksize.
 *>
 *>          If LWORK = -1, then a workspace query is assumed; the routine
-*>          only calculates the optimal size of the array WORK and the
-*>          minimum sizes of the arrays RWORK and IWORK, and returns
-*>          these values as the first entries of the WORK, RWORK and
-*>          IWORK arrays, and no error message related to LWORK is issued
-*>          by XERBLA.
-*> \endverbatim
-*>
-*> \param[out] RWORK
-*> \verbatim
-*>          RWORK is DOUBLE PRECISION array, dimension (MAX(1,LRWORK))
-*>          LRWORK >=
-*>             10*N + 2*N*SMLSIZ + 8*N*NLVL + 3*SMLSIZ*NRHS +
-*>             MAX( (SMLSIZ+1)**2, N*(1+NRHS) + 2*NRHS )
-*>          if M is greater than or equal to N or
-*>             10*M + 2*M*SMLSIZ + 8*M*NLVL + 3*SMLSIZ*NRHS +
-*>             MAX( (SMLSIZ+1)**2, N*(1+NRHS) + 2*NRHS )
-*>          if M is less than N, the code will execute correctly.
-*>          SMLSIZ is returned by ILAENV and is equal to the maximum
-*>          size of the subproblems at the bottom of the computation
-*>          tree (usually about 25), and
-*>             NLVL = MAX( 0, INT( LOG_2( MIN( M,N )/(SMLSIZ+1) ) ) + 1 )
-*>          On exit, if INFO = 0, RWORK(1) returns the minimum LRWORK.
-*> \endverbatim
-*>
-*> \param[out] IWORK
-*> \verbatim
-*>          IWORK is INTEGER array, dimension (MAX(1,LIWORK))
-*>          LIWORK >= max(1, 3*MINMN*NLVL + 11*MINMN),
-*>          where MINMN = MIN( M,N ).
-*>          On exit, if INFO = 0, IWORK(1) returns the minimum LIWORK.
+*>          only calculates the optimal size of the WORK array, returns
+*>          this value as the first entry of the WORK array, and no error
+*>          message related to LWORK is issued by XERBLA.
 *> \endverbatim
 *>
 *> \param[out] INFO
 *> \verbatim
 *>          INFO is INTEGER
-*>          = 0: successful exit
-*>          < 0: if INFO = -i, the i-th argument had an illegal value.
-*>          > 0:  the algorithm for computing the SVD failed to converge;
-*>                if INFO = i, i off-diagonal elements of an intermediate
-*>                bidiagonal form did not converge to zero.
+*>          = 0:  successful exit
+*>          < 0:  if INFO = -i, the i-th argument had an illegal value
 *> \endverbatim
 *
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
-*
-*> \date November 2011
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \ingroup complex16GEsolve
+*> \date December 2016
 *
-*> \par Contributors:
-*  ==================
-*>
-*>     Ming Gu and Ren-Cang Li, Computer Science Division, University of
-*>       California at Berkeley, USA \n
-*>     Osni Marques, LBNL/NERSC, USA \n
+*> \ingroup complex16OTHERcomputational
 *
 *  =====================================================================
-      SUBROUTINE ZGELSD( M, N, NRHS, A, LDA, B, LDB, S, RCOND, RANK,
-     $                   WORK, LWORK, RWORK, IWORK, INFO )
+      SUBROUTINE ZUNMHR( SIDE, TRANS, M, N, ILO, IHI, A, LDA, TAU, C,
+     $                   LDC, WORK, LWORK, INFO )
 *
-*  -- LAPACK driver routine (version 3.4.0) --
+*  -- LAPACK computational routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     November 2011
+*     December 2016
 *
 *     .. Scalar Arguments ..
-      INTEGER            INFO, LDA, LDB, LWORK, M, N, NRHS, RANK
-      DOUBLE PRECISION   RCOND
+      CHARACTER          SIDE, TRANS
+      INTEGER            IHI, ILO, INFO, LDA, LDC, LWORK, M, N
 *     ..
 *     .. Array Arguments ..
-      INTEGER            IWORK( * )
-      DOUBLE PRECISION   RWORK( * ), S( * )
-      COMPLEX*16         A( LDA, * ), B( LDB, * ), WORK( * )
+      COMPLEX*16         A( LDA, * ), C( LDC, * ), TAU( * ), WORK( * )
 *     ..
 *
 *  =====================================================================
 *
-*     .. Parameters ..
-      DOUBLE PRECISION   ZERO, ONE, TWO
-      PARAMETER          ( ZERO = 0.0D+0, ONE = 1.0D+0, TWO = 2.0D+0 )
-      COMPLEX*16         CZERO
-      PARAMETER          ( CZERO = ( 0.0D+0, 0.0D+0 ) )
-*     ..
 *     .. Local Scalars ..
-      LOGICAL            LQUERY
-      INTEGER            IASCL, IBSCL, IE, IL, ITAU, ITAUP, ITAUQ,
-     $                   LDWORK, LIWORK, LRWORK, MAXMN, MAXWRK, MINMN,
-     $                   MINWRK, MM, MNTHR, NLVL, NRWORK, NWORK, SMLSIZ
-      DOUBLE PRECISION   ANRM, BIGNUM, BNRM, EPS, SFMIN, SMLNUM
-*     ..
-*     .. External Subroutines ..
-      EXTERNAL           DLABAD, DLASCL, DLASET, XERBLA, ZGEBRD, ZGELQF,
-     $                   ZGEQRF, ZLACPY, ZLALSD, ZLASCL, ZLASET, ZUNMBR,
-     $                   ZUNMLQ, ZUNMQR
+      LOGICAL            LEFT, LQUERY
+      INTEGER            I1, I2, IINFO, LWKOPT, MI, NB, NH, NI, NQ, NW
 *     ..
 *     .. External Functions ..
+      LOGICAL            LSAME
       INTEGER            ILAENV
-      DOUBLE PRECISION   DLAMCH, ZLANGE
-      EXTERNAL           ILAENV, DLAMCH, ZLANGE
+      EXTERNAL           LSAME, ILAENV
+*     ..
+*     .. External Subroutines ..
+      EXTERNAL           XERBLA, ZUNMQR
 *     ..
 *     .. Intrinsic Functions ..
-      INTRINSIC          INT, LOG, MAX, MIN, DBLE
+      INTRINSIC          MAX, MIN
 *     ..
 *     .. Executable Statements ..
 *
-*     Test the input arguments.
+*     Test the input arguments
 *
       INFO = 0
-      MINMN = MIN( M, N )
-      MAXMN = MAX( M, N )
+      NH = IHI - ILO
+      LEFT = LSAME( SIDE, 'L' )
       LQUERY = ( LWORK.EQ.-1 )
-      IF( M.LT.0 ) THEN
-         INFO = -1
-      ELSE IF( N.LT.0 ) THEN
-         INFO = -2
-      ELSE IF( NRHS.LT.0 ) THEN
-         INFO = -3
-      ELSE IF( LDA.LT.MAX( 1, M ) ) THEN
-         INFO = -5
-      ELSE IF( LDB.LT.MAX( 1, MAXMN ) ) THEN
-         INFO = -7
-      END IF
-*
-*     Compute workspace.
-*     (Note: Comments in the code beginning "Workspace:" describe the
-*     minimal amount of workspace needed at that point in the code,
-*     as well as the preferred amount for good performance.
-*     NB refers to the optimal block size for the immediately
-*     following subroutine, as returned by ILAENV.)
-*
-      IF( INFO.EQ.0 ) THEN
-         MINWRK = 1
-         MAXWRK = 1
-         LIWORK = 1
-         LRWORK = 1
-         IF( MINMN.GT.0 ) THEN
-            SMLSIZ = ILAENV( 9, 'ZGELSD', ' ', 0, 0, 0, 0 )
-            MNTHR = ILAENV( 6, 'ZGELSD', ' ', M, N, NRHS, -1 )
-            NLVL = MAX( INT( LOG( DBLE( MINMN ) / DBLE( SMLSIZ + 1 ) ) /
-     $                  LOG( TWO ) ) + 1, 0 )
-            LIWORK = 3*MINMN*NLVL + 11*MINMN
-            MM = M
-            IF( M.GE.N .AND. M.GE.MNTHR ) THEN
-*
-*              Path 1a - overdetermined, with many more rows than
-*                        columns.
-*
-               MM = N
-               MAXWRK = MAX( MAXWRK, N*ILAENV( 1, 'ZGEQRF', ' ', M, N,
-     $                       -1, -1 ) )
-               MAXWRK = MAX( MAXWRK, NRHS*ILAENV( 1, 'ZUNMQR', 'LC', M,
-     $                       NRHS, N, -1 ) )
-            END IF
-            IF( M.GE.N ) THEN
-*
-*              Path 1 - overdetermined or exactly determined.
-*
-               LRWORK = 10*N + 2*N*SMLSIZ + 8*N*NLVL + 3*SMLSIZ*NRHS +
-     $                  MAX( (SMLSIZ+1)**2, N*(1+NRHS) + 2*NRHS )
-               MAXWRK = MAX( MAXWRK, 2*N + ( MM + N )*ILAENV( 1,
-     $                       'ZGEBRD', ' ', MM, N, -1, -1 ) )
-               MAXWRK = MAX( MAXWRK, 2*N + NRHS*ILAENV( 1, 'ZUNMBR',
-     $                       'QLC', MM, NRHS, N, -1 ) )
-               MAXWRK = MAX( MAXWRK, 2*N + ( N - 1 )*ILAENV( 1,
-     $                       'ZUNMBR', 'PLN', N, NRHS, N, -1 ) )
-               MAXWRK = MAX( MAXWRK, 2*N + N*NRHS )
-               MINWRK = MAX( 2*N + MM, 2*N + N*NRHS )
-            END IF
-            IF( N.GT.M ) THEN
-               LRWORK = 10*M + 2*M*SMLSIZ + 8*M*NLVL + 3*SMLSIZ*NRHS +
-     $                  MAX( (SMLSIZ+1)**2, N*(1+NRHS) + 2*NRHS )
-               IF( N.GE.MNTHR ) THEN
-*
-*                 Path 2a - underdetermined, with many more columns
-*                           than rows.
-*
-                  MAXWRK = M + M*ILAENV( 1, 'ZGELQF', ' ', M, N, -1,
-     $                     -1 )
-                  MAXWRK = MAX( MAXWRK, M*M + 4*M + 2*M*ILAENV( 1,
-     $                          'ZGEBRD', ' ', M, M, -1, -1 ) )
-                  MAXWRK = MAX( MAXWRK, M*M + 4*M + NRHS*ILAENV( 1,
-     $                          'ZUNMBR', 'QLC', M, NRHS, M, -1 ) )
-                  MAXWRK = MAX( MAXWRK, M*M + 4*M + ( M - 1 )*ILAENV( 1,
-     $                          'ZUNMLQ', 'LC', N, NRHS, M, -1 ) )
-                  IF( NRHS.GT.1 ) THEN
-                     MAXWRK = MAX( MAXWRK, M*M + M + M*NRHS )
-                  ELSE
-                     MAXWRK = MAX( MAXWRK, M*M + 2*M )
-                  END IF
-                  MAXWRK = MAX( MAXWRK, M*M + 4*M + M*NRHS )
-!     XXX: Ensure the Path 2a case below is triggered.  The workspace
-!     calculation should use queries for all routines eventually.
-                  MAXWRK = MAX( MAXWRK,
-     $                 4*M+M*M+MAX( M, 2*M-4, NRHS, N-3*M ) )
-               ELSE
-*
-*                 Path 2 - underdetermined.
-*
-                  MAXWRK = 2*M + ( N + M )*ILAENV( 1, 'ZGEBRD', ' ', M,
-     $                     N, -1, -1 )
-                  MAXWRK = MAX( MAXWRK, 2*M + NRHS*ILAENV( 1, 'ZUNMBR',
-     $                          'QLC', M, NRHS, M, -1 ) )
-                  MAXWRK = MAX( MAXWRK, 2*M + M*ILAENV( 1, 'ZUNMBR',
-     $                          'PLN', N, NRHS, M, -1 ) )
-                  MAXWRK = MAX( MAXWRK, 2*M + M*NRHS )
-               END IF
-               MINWRK = MAX( 2*M + N, 2*M + M*NRHS )
-            END IF
-         END IF
-         MINWRK = MIN( MINWRK, MAXWRK )
-         WORK( 1 ) = MAXWRK
-         IWORK( 1 ) = LIWORK
-         RWORK( 1 ) = LRWORK
-*
-         IF( LWORK.LT.MINWRK .AND. .NOT.LQUERY ) THEN
-            INFO = -12
-         END IF
-      END IF
-*
-      IF( INFO.NE.0 ) THEN
-         CALL XERBLA( 'ZGELSD', -INFO )
-         RETURN
-      ELSE IF( LQUERY ) THEN
-         RETURN
-      END IF
-*
-*     Quick return if possible.
-*
-      IF( M.EQ.0 .OR. N.EQ.0 ) THEN
-         RANK = 0
-         RETURN
-      END IF
-*
-*     Get machine parameters.
-*
-      EPS = DLAMCH( 'P' )
-      SFMIN = DLAMCH( 'S' )
-      SMLNUM = SFMIN / EPS
-      BIGNUM = ONE / SMLNUM
-      CALL DLABAD( SMLNUM, BIGNUM )
-*
-*     Scale A if max entry outside range [SMLNUM,BIGNUM].
-*
-      ANRM = ZLANGE( 'M', M, N, A, LDA, RWORK )
-      IASCL = 0
-      IF( ANRM.GT.ZERO .AND. ANRM.LT.SMLNUM ) THEN
-*
-*        Scale matrix norm up to SMLNUM
-*
-         CALL ZLASCL( 'G', 0, 0, ANRM, SMLNUM, M, N, A, LDA, INFO )
-         IASCL = 1
-      ELSE IF( ANRM.GT.BIGNUM ) THEN
 *
-*        Scale matrix norm down to BIGNUM.
-*
-         CALL ZLASCL( 'G', 0, 0, ANRM, BIGNUM, M, N, A, LDA, INFO )
-         IASCL = 2
-      ELSE IF( ANRM.EQ.ZERO ) THEN
-*
-*        Matrix all zero. Return zero solution.
-*
-         CALL ZLASET( 'F', MAX( M, N ), NRHS, CZERO, CZERO, B, LDB )
-         CALL DLASET( 'F', MINMN, 1, ZERO, ZERO, S, 1 )
-         RANK = 0
-         GO TO 10
-      END IF
-*
-*     Scale B if max entry outside range [SMLNUM,BIGNUM].
-*
-      BNRM = ZLANGE( 'M', M, NRHS, B, LDB, RWORK )
-      IBSCL = 0
-      IF( BNRM.GT.ZERO .AND. BNRM.LT.SMLNUM ) THEN
-*
-*        Scale matrix norm up to SMLNUM.
-*
-         CALL ZLASCL( 'G', 0, 0, BNRM, SMLNUM, M, NRHS, B, LDB, INFO )
-         IBSCL = 1
-      ELSE IF( BNRM.GT.BIGNUM ) THEN
-*
-*        Scale matrix norm down to BIGNUM.
+*     NQ is the order of Q and NW is the minimum dimension of WORK
 *
-         CALL ZLASCL( 'G', 0, 0, BNRM, BIGNUM, M, NRHS, B, LDB, INFO )
-         IBSCL = 2
+      IF( LEFT ) THEN
+         NQ = M
+         NW = N
+      ELSE
+         NQ = N
+         NW = M
+      END IF
+      IF( .NOT.LEFT .AND. .NOT.LSAME( SIDE, 'R' ) ) THEN
+         INFO = -1
+      ELSE IF( .NOT.LSAME( TRANS, 'N' ) .AND. .NOT.LSAME( TRANS, 'C' ) )
+     $          THEN
+         INFO = -2
+      ELSE IF( M.LT.0 ) THEN
+         INFO = -3
+      ELSE IF( N.LT.0 ) THEN
+         INFO = -4
+      ELSE IF( ILO.LT.1 .OR. ILO.GT.MAX( 1, NQ ) ) THEN
+         INFO = -5
+      ELSE IF( IHI.LT.MIN( ILO, NQ ) .OR. IHI.GT.NQ ) THEN
+         INFO = -6
+      ELSE IF( LDA.LT.MAX( 1, NQ ) ) THEN
+         INFO = -8
+      ELSE IF( LDC.LT.MAX( 1, M ) ) THEN
+         INFO = -11
+      ELSE IF( LWORK.LT.MAX( 1, NW ) .AND. .NOT.LQUERY ) THEN
+         INFO = -13
       END IF
 *
-*     If M < N make sure B(M+1:N,:) = 0
-*
-      IF( M.LT.N )
-     $   CALL ZLASET( 'F', N-M, NRHS, CZERO, CZERO, B( M+1, 1 ), LDB )
-*
-*     Overdetermined case.
-*
-      IF( M.GE.N ) THEN
-*
-*        Path 1 - overdetermined or exactly determined.
-*
-         MM = M
-         IF( M.GE.MNTHR ) THEN
-*
-*           Path 1a - overdetermined, with many more rows than columns
-*
-            MM = N
-            ITAU = 1
-            NWORK = ITAU + N
-*
-*           Compute A=Q*R.
-*           (RWorkspace: need N)
-*           (CWorkspace: need N, prefer N*NB)
+      IF( INFO.EQ.0 ) THEN
+         IF( LEFT ) THEN
+            NB = ILAENV( 1, 'ZUNMQR', SIDE // TRANS, NH, N, NH, -1 )
+         ELSE
+            NB = ILAENV( 1, 'ZUNMQR', SIDE // TRANS, M, NH, NH, -1 )
+         END IF
+         LWKOPT = MAX( 1, NW )*NB
+         WORK( 1 ) = LWKOPT
+      END IF
 *
-            CALL ZGEQRF( M, N, A, LDA, WORK( ITAU ), WORK( NWORK ),
-     $                   LWORK-NWORK+1, INFO )
+      IF( INFO.NE.0 ) THEN
+         CALL XERBLA( 'ZUNMHR', -INFO )
+         RETURN
+      ELSE IF( LQUERY ) THEN
+         RETURN
+      END IF
 *
-*           Multiply B by transpose(Q).
-*           (RWorkspace: need N)
-*           (CWorkspace: need NRHS, prefer NRHS*NB)
+*     Quick return if possible
 *
-            CALL ZUNMQR( 'L', 'C', M, NRHS, N, A, LDA, WORK( ITAU ), B,
-     $                   LDB, WORK( NWORK ), LWORK-NWORK+1, INFO )
+      IF( M.EQ.0 .OR. N.EQ.0 .OR. NH.EQ.0 ) THEN
+         WORK( 1 ) = 1
+         RETURN
+      END IF
 *
-*           Zero out below R.
+      IF( LEFT ) THEN
+         MI = NH
+         NI = N
+         I1 = ILO + 1
+         I2 = 1
+      ELSE
+         MI = M
+         NI = NH
+         I1 = 1
+         I2 = ILO + 1
+      END IF
 *
-            IF( N.GT.1 ) THEN
-               CALL ZLASET( 'L', N-1, N-1, CZERO, CZERO, A( 2, 1 ),
-     $                      LDA )
-            END IF
-         END IF
+      CALL ZUNMQR( SIDE, TRANS, MI, NI, NH, A( ILO+1, ILO ), LDA,
+     $             TAU( ILO ), C( I1, I2 ), LDC, WORK, LWORK, IINFO )
 *
-         ITAUQ = 1
-         ITAUP = ITAUQ + N
-         NWORK = ITAUP + N
-         IE = 1
-         NRWORK = IE + N
+      WORK( 1 ) = LWKOPT
+      RETURN
 *
-*        Bidiagonalize R in A.
-*        (RWorkspace: need N)
-*        (CWorkspace: need 2*N+MM, prefer 2*N+(MM+N)*NB)
+*     End of ZUNMHR
 *
-         CALL ZGEBRD( MM, N, A, LDA, S, RWORK( IE ), WORK( ITAUQ ),
-     $                WORK( ITAUP ), WORK( NWORK ), LWORK-NWORK+1,
-     $                INFO )
+      END
+*> \brief \b ZUNML2 multiplies a general matrix by the unitary matrix from a LQ factorization determined by cgelqf (unblocked algorithm).
 *
-*        Multiply B by transpose of left bidiagonalizing vectors of R.
-*        (CWorkspace: need 2*N+NRHS, prefer 2*N+NRHS*NB)
+*  =========== DOCUMENTATION ===========
 *
-         CALL ZUNMBR( 'Q', 'L', 'C', MM, NRHS, N, A, LDA, WORK( ITAUQ ),
-     $                B, LDB, WORK( NWORK ), LWORK-NWORK+1, INFO )
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
-*        Solve the bidiagonal least squares problem.
+*> \htmlonly
+*> Download ZUNML2 + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/zunml2.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/zunml2.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/zunml2.f">
+*> [TXT]</a>
+*> \endhtmlonly
 *
-         CALL ZLALSD( 'U', SMLSIZ, N, NRHS, S, RWORK( IE ), B, LDB,
-     $                RCOND, RANK, WORK( NWORK ), RWORK( NRWORK ),
-     $                IWORK, INFO )
-         IF( INFO.NE.0 ) THEN
-            GO TO 10
-         END IF
+*  Definition:
+*  ===========
 *
-*        Multiply B by right bidiagonalizing vectors of R.
+*       SUBROUTINE ZUNML2( SIDE, TRANS, M, N, K, A, LDA, TAU, C, LDC,
+*                          WORK, INFO )
 *
-         CALL ZUNMBR( 'P', 'L', 'N', N, NRHS, N, A, LDA, WORK( ITAUP ),
-     $                B, LDB, WORK( NWORK ), LWORK-NWORK+1, INFO )
+*       .. Scalar Arguments ..
+*       CHARACTER          SIDE, TRANS
+*       INTEGER            INFO, K, LDA, LDC, M, N
+*       ..
+*       .. Array Arguments ..
+*       COMPLEX*16         A( LDA, * ), C( LDC, * ), TAU( * ), WORK( * )
+*       ..
 *
-      ELSE IF( N.GE.MNTHR .AND. LWORK.GE.4*M+M*M+
-     $         MAX( M, 2*M-4, NRHS, N-3*M ) ) THEN
 *
-*        Path 2a - underdetermined, with many more columns than rows
-*        and sufficient workspace for an efficient algorithm.
+*> \par Purpose:
+*  =============
+*>
+*> \verbatim
+*>
+*> ZUNML2 overwrites the general complex m-by-n matrix C with
+*>
+*>       Q * C  if SIDE = 'L' and TRANS = 'N', or
+*>
+*>       Q**H* C  if SIDE = 'L' and TRANS = 'C', or
+*>
+*>       C * Q  if SIDE = 'R' and TRANS = 'N', or
+*>
+*>       C * Q**H if SIDE = 'R' and TRANS = 'C',
+*>
+*> where Q is a complex unitary matrix defined as the product of k
+*> elementary reflectors
+*>
+*>       Q = H(k)**H . . . H(2)**H H(1)**H
+*>
+*> as returned by ZGELQF. Q is of order m if SIDE = 'L' and of order n
+*> if SIDE = 'R'.
+*> \endverbatim
 *
-         LDWORK = M
-         IF( LWORK.GE.MAX( 4*M+M*LDA+MAX( M, 2*M-4, NRHS, N-3*M ),
-     $       M*LDA+M+M*NRHS ) )LDWORK = LDA
-         ITAU = 1
-         NWORK = M + 1
+*  Arguments:
+*  ==========
 *
-*        Compute A=L*Q.
-*        (CWorkspace: need 2*M, prefer M+M*NB)
+*> \param[in] SIDE
+*> \verbatim
+*>          SIDE is CHARACTER*1
+*>          = 'L': apply Q or Q**H from the Left
+*>          = 'R': apply Q or Q**H from the Right
+*> \endverbatim
+*>
+*> \param[in] TRANS
+*> \verbatim
+*>          TRANS is CHARACTER*1
+*>          = 'N': apply Q  (No transpose)
+*>          = 'C': apply Q**H (Conjugate transpose)
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*>          M is INTEGER
+*>          The number of rows of the matrix C. M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*>          N is INTEGER
+*>          The number of columns of the matrix C. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] K
+*> \verbatim
+*>          K is INTEGER
+*>          The number of elementary reflectors whose product defines
+*>          the matrix Q.
+*>          If SIDE = 'L', M >= K >= 0;
+*>          if SIDE = 'R', N >= K >= 0.
+*> \endverbatim
+*>
+*> \param[in] A
+*> \verbatim
+*>          A is COMPLEX*16 array, dimension
+*>                               (LDA,M) if SIDE = 'L',
+*>                               (LDA,N) if SIDE = 'R'
+*>          The i-th row must contain the vector which defines the
+*>          elementary reflector H(i), for i = 1,2,...,k, as returned by
+*>          ZGELQF in the first k rows of its array argument A.
+*>          A is modified by the routine but restored on exit.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*>          LDA is INTEGER
+*>          The leading dimension of the array A. LDA >= max(1,K).
+*> \endverbatim
+*>
+*> \param[in] TAU
+*> \verbatim
+*>          TAU is COMPLEX*16 array, dimension (K)
+*>          TAU(i) must contain the scalar factor of the elementary
+*>          reflector H(i), as returned by ZGELQF.
+*> \endverbatim
+*>
+*> \param[in,out] C
+*> \verbatim
+*>          C is COMPLEX*16 array, dimension (LDC,N)
+*>          On entry, the m-by-n matrix C.
+*>          On exit, C is overwritten by Q*C or Q**H*C or C*Q**H or C*Q.
+*> \endverbatim
+*>
+*> \param[in] LDC
+*> \verbatim
+*>          LDC is INTEGER
+*>          The leading dimension of the array C. LDC >= max(1,M).
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*>          WORK is COMPLEX*16 array, dimension
+*>                                   (N) if SIDE = 'L',
+*>                                   (M) if SIDE = 'R'
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*>          INFO is INTEGER
+*>          = 0: successful exit
+*>          < 0: if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
 *
-         CALL ZGELQF( M, N, A, LDA, WORK( ITAU ), WORK( NWORK ),
-     $                LWORK-NWORK+1, INFO )
-         IL = NWORK
+*  Authors:
+*  ========
 *
-*        Copy L to WORK(IL), zeroing out above its diagonal.
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-         CALL ZLACPY( 'L', M, M, A, LDA, WORK( IL ), LDWORK )
-         CALL ZLASET( 'U', M-1, M-1, CZERO, CZERO, WORK( IL+LDWORK ),
-     $                LDWORK )
-         ITAUQ = IL + LDWORK*M
-         ITAUP = ITAUQ + M
-         NWORK = ITAUP + M
-         IE = 1
-         NRWORK = IE + M
+*> \date December 2016
 *
-*        Bidiagonalize L in WORK(IL).
-*        (RWorkspace: need M)
-*        (CWorkspace: need M*M+4*M, prefer M*M+4*M+2*M*NB)
+*> \ingroup complex16OTHERcomputational
 *
-         CALL ZGEBRD( M, M, WORK( IL ), LDWORK, S, RWORK( IE ),
-     $                WORK( ITAUQ ), WORK( ITAUP ), WORK( NWORK ),
-     $                LWORK-NWORK+1, INFO )
+*  =====================================================================
+      SUBROUTINE ZUNML2( SIDE, TRANS, M, N, K, A, LDA, TAU, C, LDC,
+     $                   WORK, INFO )
 *
-*        Multiply B by transpose of left bidiagonalizing vectors of L.
-*        (CWorkspace: need M*M+4*M+NRHS, prefer M*M+4*M+NRHS*NB)
+*  -- LAPACK computational routine (version 3.7.0) --
+*  -- LAPACK is a software package provided by Univ. of Tennessee,    --
+*  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+*     December 2016
 *
-         CALL ZUNMBR( 'Q', 'L', 'C', M, NRHS, M, WORK( IL ), LDWORK,
-     $                WORK( ITAUQ ), B, LDB, WORK( NWORK ),
-     $                LWORK-NWORK+1, INFO )
+*     .. Scalar Arguments ..
+      CHARACTER          SIDE, TRANS
+      INTEGER            INFO, K, LDA, LDC, M, N
+*     ..
+*     .. Array Arguments ..
+      COMPLEX*16         A( LDA, * ), C( LDC, * ), TAU( * ), WORK( * )
+*     ..
 *
-*        Solve the bidiagonal least squares problem.
+*  =====================================================================
 *
-         CALL ZLALSD( 'U', SMLSIZ, M, NRHS, S, RWORK( IE ), B, LDB,
-     $                RCOND, RANK, WORK( NWORK ), RWORK( NRWORK ),
-     $                IWORK, INFO )
-         IF( INFO.NE.0 ) THEN
-            GO TO 10
-         END IF
+*     .. Parameters ..
+      COMPLEX*16         ONE
+      PARAMETER          ( ONE = ( 1.0D+0, 0.0D+0 ) )
+*     ..
+*     .. Local Scalars ..
+      LOGICAL            LEFT, NOTRAN
+      INTEGER            I, I1, I2, I3, IC, JC, MI, NI, NQ
+      COMPLEX*16         AII, TAUI
+*     ..
+*     .. External Functions ..
+      LOGICAL            LSAME
+      EXTERNAL           LSAME
+*     ..
+*     .. External Subroutines ..
+      EXTERNAL           XERBLA, ZLACGV, ZLARF
+*     ..
+*     .. Intrinsic Functions ..
+      INTRINSIC          DCONJG, MAX
+*     ..
+*     .. Executable Statements ..
 *
-*        Multiply B by right bidiagonalizing vectors of L.
+*     Test the input arguments
 *
-         CALL ZUNMBR( 'P', 'L', 'N', M, NRHS, M, WORK( IL ), LDWORK,
-     $                WORK( ITAUP ), B, LDB, WORK( NWORK ),
-     $                LWORK-NWORK+1, INFO )
+      INFO = 0
+      LEFT = LSAME( SIDE, 'L' )
+      NOTRAN = LSAME( TRANS, 'N' )
 *
-*        Zero out below first M rows of B.
+*     NQ is the order of Q
 *
-         CALL ZLASET( 'F', N-M, NRHS, CZERO, CZERO, B( M+1, 1 ), LDB )
-         NWORK = ITAU + M
+      IF( LEFT ) THEN
+         NQ = M
+      ELSE
+         NQ = N
+      END IF
+      IF( .NOT.LEFT .AND. .NOT.LSAME( SIDE, 'R' ) ) THEN
+         INFO = -1
+      ELSE IF( .NOT.NOTRAN .AND. .NOT.LSAME( TRANS, 'C' ) ) THEN
+         INFO = -2
+      ELSE IF( M.LT.0 ) THEN
+         INFO = -3
+      ELSE IF( N.LT.0 ) THEN
+         INFO = -4
+      ELSE IF( K.LT.0 .OR. K.GT.NQ ) THEN
+         INFO = -5
+      ELSE IF( LDA.LT.MAX( 1, K ) ) THEN
+         INFO = -7
+      ELSE IF( LDC.LT.MAX( 1, M ) ) THEN
+         INFO = -10
+      END IF
+      IF( INFO.NE.0 ) THEN
+         CALL XERBLA( 'ZUNML2', -INFO )
+         RETURN
+      END IF
 *
-*        Multiply transpose(Q) by B.
-*        (CWorkspace: need NRHS, prefer NRHS*NB)
+*     Quick return if possible
 *
-         CALL ZUNMLQ( 'L', 'C', N, NRHS, M, A, LDA, WORK( ITAU ), B,
-     $                LDB, WORK( NWORK ), LWORK-NWORK+1, INFO )
+      IF( M.EQ.0 .OR. N.EQ.0 .OR. K.EQ.0 )
+     $   RETURN
 *
+      IF( ( LEFT .AND. NOTRAN .OR. .NOT.LEFT .AND. .NOT.NOTRAN ) ) THEN
+         I1 = 1
+         I2 = K
+         I3 = 1
       ELSE
+         I1 = K
+         I2 = 1
+         I3 = -1
+      END IF
 *
-*        Path 2 - remaining underdetermined cases.
-*
-         ITAUQ = 1
-         ITAUP = ITAUQ + M
-         NWORK = ITAUP + M
-         IE = 1
-         NRWORK = IE + M
-*
-*        Bidiagonalize A.
-*        (RWorkspace: need M)
-*        (CWorkspace: need 2*M+N, prefer 2*M+(M+N)*NB)
+      IF( LEFT ) THEN
+         NI = N
+         JC = 1
+      ELSE
+         MI = M
+         IC = 1
+      END IF
 *
-         CALL ZGEBRD( M, N, A, LDA, S, RWORK( IE ), WORK( ITAUQ ),
-     $                WORK( ITAUP ), WORK( NWORK ), LWORK-NWORK+1,
-     $                INFO )
+      DO 10 I = I1, I2, I3
+         IF( LEFT ) THEN
 *
-*        Multiply B by transpose of left bidiagonalizing vectors.
-*        (CWorkspace: need 2*M+NRHS, prefer 2*M+NRHS*NB)
+*           H(i) or H(i)**H is applied to C(i:m,1:n)
 *
-         CALL ZUNMBR( 'Q', 'L', 'C', M, NRHS, N, A, LDA, WORK( ITAUQ ),
-     $                B, LDB, WORK( NWORK ), LWORK-NWORK+1, INFO )
+            MI = M - I + 1
+            IC = I
+         ELSE
 *
-*        Solve the bidiagonal least squares problem.
+*           H(i) or H(i)**H is applied to C(1:m,i:n)
 *
-         CALL ZLALSD( 'L', SMLSIZ, M, NRHS, S, RWORK( IE ), B, LDB,
-     $                RCOND, RANK, WORK( NWORK ), RWORK( NRWORK ),
-     $                IWORK, INFO )
-         IF( INFO.NE.0 ) THEN
-            GO TO 10
+            NI = N - I + 1
+            JC = I
          END IF
 *
-*        Multiply B by right bidiagonalizing vectors of A.
-*
-         CALL ZUNMBR( 'P', 'L', 'N', N, NRHS, M, A, LDA, WORK( ITAUP ),
-     $                B, LDB, WORK( NWORK ), LWORK-NWORK+1, INFO )
-*
-      END IF
-*
-*     Undo scaling.
-*
-      IF( IASCL.EQ.1 ) THEN
-         CALL ZLASCL( 'G', 0, 0, ANRM, SMLNUM, N, NRHS, B, LDB, INFO )
-         CALL DLASCL( 'G', 0, 0, SMLNUM, ANRM, MINMN, 1, S, MINMN,
-     $                INFO )
-      ELSE IF( IASCL.EQ.2 ) THEN
-         CALL ZLASCL( 'G', 0, 0, ANRM, BIGNUM, N, NRHS, B, LDB, INFO )
-         CALL DLASCL( 'G', 0, 0, BIGNUM, ANRM, MINMN, 1, S, MINMN,
-     $                INFO )
-      END IF
-      IF( IBSCL.EQ.1 ) THEN
-         CALL ZLASCL( 'G', 0, 0, SMLNUM, BNRM, N, NRHS, B, LDB, INFO )
-      ELSE IF( IBSCL.EQ.2 ) THEN
-         CALL ZLASCL( 'G', 0, 0, BIGNUM, BNRM, N, NRHS, B, LDB, INFO )
-      END IF
+*        Apply H(i) or H(i)**H
 *
+         IF( NOTRAN ) THEN
+            TAUI = DCONJG( TAU( I ) )
+         ELSE
+            TAUI = TAU( I )
+         END IF
+         IF( I.LT.NQ )
+     $      CALL ZLACGV( NQ-I, A( I, I+1 ), LDA )
+         AII = A( I, I )
+         A( I, I ) = ONE
+         CALL ZLARF( SIDE, MI, NI, A( I, I ), LDA, TAUI, C( IC, JC ),
+     $               LDC, WORK )
+         A( I, I ) = AII
+         IF( I.LT.NQ )
+     $      CALL ZLACGV( NQ-I, A( I, I+1 ), LDA )
    10 CONTINUE
-      WORK( 1 ) = MAXWRK
-      IWORK( 1 ) = LIWORK
-      RWORK( 1 ) = LRWORK
       RETURN
 *
-*     End of ZGELSD
+*     End of ZUNML2
 *
       END
-*> \brief \b ZLALSD uses the singular value decomposition of A to solve the least squares problem.
+*> \brief \b ZUNMLQ
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download ZLALSD + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/zlalsd.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/zlalsd.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/zlalsd.f"> 
+*> Download ZUNMLQ + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/zunmlq.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/zunmlq.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/zunmlq.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
-*       SUBROUTINE ZLALSD( UPLO, SMLSIZ, N, NRHS, D, E, B, LDB, RCOND,
-*                          RANK, WORK, RWORK, IWORK, INFO )
-* 
+*       SUBROUTINE ZUNMLQ( SIDE, TRANS, M, N, K, A, LDA, TAU, C, LDC,
+*                          WORK, LWORK, INFO )
+*
 *       .. Scalar Arguments ..
-*       CHARACTER          UPLO
-*       INTEGER            INFO, LDB, N, NRHS, RANK, SMLSIZ
-*       DOUBLE PRECISION   RCOND
+*       CHARACTER          SIDE, TRANS
+*       INTEGER            INFO, K, LDA, LDC, LWORK, M, N
 *       ..
 *       .. Array Arguments ..
-*       INTEGER            IWORK( * )
-*       DOUBLE PRECISION   D( * ), E( * ), RWORK( * )
-*       COMPLEX*16         B( LDB, * ), WORK( * )
+*       COMPLEX*16         A( LDA, * ), C( LDC, * ), TAU( * ), WORK( * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
 *>
 *> \verbatim
 *>
-*> ZLALSD uses the singular value decomposition of A to solve the least
-*> squares problem of finding X to minimize the Euclidean norm of each
-*> column of A*X-B, where A is N-by-N upper bidiagonal, and X and B
-*> are N-by-NRHS. The solution X overwrites B.
+*> ZUNMLQ overwrites the general complex M-by-N matrix C with
 *>
-*> The singular values of A smaller than RCOND times the largest
-*> singular value are treated as zero in solving the least squares
-*> problem; in this case a minimum norm solution is returned.
-*> The actual singular values are returned in D in ascending order.
+*>                 SIDE = 'L'     SIDE = 'R'
+*> TRANS = 'N':      Q * C          C * Q
+*> TRANS = 'C':      Q**H * C       C * Q**H
 *>
-*> This code makes very mild assumptions about floating point
-*> arithmetic. It will work on machines with a guard digit in
-*> add/subtract, or on those binary machines without guard digits
-*> which subtract like the Cray XMP, Cray YMP, Cray C 90, or Cray 2.
-*> It could conceivably fail on hexadecimal or decimal machines
-*> without guard digits, but we know of none.
+*> where Q is a complex unitary matrix defined as the product of k
+*> elementary reflectors
+*>
+*>       Q = H(k)**H . . . H(2)**H H(1)**H
+*>
+*> as returned by ZGELQF. Q is of order M if SIDE = 'L' and of order N
+*> if SIDE = 'R'.
 *> \endverbatim
 *
 *  Arguments:
 *  ==========
 *
-*> \param[in] UPLO
+*> \param[in] SIDE
 *> \verbatim
-*>          UPLO is CHARACTER*1
-*>         = 'U': D and E define an upper bidiagonal matrix.
-*>         = 'L': D and E define a  lower bidiagonal matrix.
+*>          SIDE is CHARACTER*1
+*>          = 'L': apply Q or Q**H from the Left;
+*>          = 'R': apply Q or Q**H from the Right.
 *> \endverbatim
 *>
-*> \param[in] SMLSIZ
+*> \param[in] TRANS
 *> \verbatim
-*>          SMLSIZ is INTEGER
-*>         The maximum size of the subproblems at the bottom of the
-*>         computation tree.
+*>          TRANS is CHARACTER*1
+*>          = 'N':  No transpose, apply Q;
+*>          = 'C':  Conjugate transpose, apply Q**H.
 *> \endverbatim
 *>
-*> \param[in] N
+*> \param[in] M
 *> \verbatim
-*>          N is INTEGER
-*>         The dimension of the  bidiagonal matrix.  N >= 0.
+*>          M is INTEGER
+*>          The number of rows of the matrix C. M >= 0.
 *> \endverbatim
 *>
-*> \param[in] NRHS
+*> \param[in] N
 *> \verbatim
-*>          NRHS is INTEGER
-*>         The number of columns of B. NRHS must be at least 1.
+*>          N is INTEGER
+*>          The number of columns of the matrix C. N >= 0.
 *> \endverbatim
 *>
-*> \param[in,out] D
+*> \param[in] K
 *> \verbatim
-*>          D is DOUBLE PRECISION array, dimension (N)
-*>         On entry D contains the main diagonal of the bidiagonal
-*>         matrix. On exit, if INFO = 0, D contains its singular values.
+*>          K is INTEGER
+*>          The number of elementary reflectors whose product defines
+*>          the matrix Q.
+*>          If SIDE = 'L', M >= K >= 0;
+*>          if SIDE = 'R', N >= K >= 0.
 *> \endverbatim
 *>
-*> \param[in,out] E
+*> \param[in] A
 *> \verbatim
-*>          E is DOUBLE PRECISION array, dimension (N-1)
-*>         Contains the super-diagonal entries of the bidiagonal matrix.
-*>         On exit, E has been destroyed.
+*>          A is COMPLEX*16 array, dimension
+*>                               (LDA,M) if SIDE = 'L',
+*>                               (LDA,N) if SIDE = 'R'
+*>          The i-th row must contain the vector which defines the
+*>          elementary reflector H(i), for i = 1,2,...,k, as returned by
+*>          ZGELQF in the first k rows of its array argument A.
 *> \endverbatim
 *>
-*> \param[in,out] B
+*> \param[in] LDA
 *> \verbatim
-*>          B is COMPLEX*16 array, dimension (LDB,NRHS)
-*>         On input, B contains the right hand sides of the least
-*>         squares problem. On output, B contains the solution X.
+*>          LDA is INTEGER
+*>          The leading dimension of the array A. LDA >= max(1,K).
 *> \endverbatim
 *>
-*> \param[in] LDB
+*> \param[in] TAU
 *> \verbatim
-*>          LDB is INTEGER
-*>         The leading dimension of B in the calling subprogram.
-*>         LDB must be at least max(1,N).
+*>          TAU is COMPLEX*16 array, dimension (K)
+*>          TAU(i) must contain the scalar factor of the elementary
+*>          reflector H(i), as returned by ZGELQF.
 *> \endverbatim
 *>
-*> \param[in] RCOND
+*> \param[in,out] C
 *> \verbatim
-*>          RCOND is DOUBLE PRECISION
-*>         The singular values of A less than or equal to RCOND times
-*>         the largest singular value are treated as zero in solving
-*>         the least squares problem. If RCOND is negative,
-*>         machine precision is used instead.
-*>         For example, if diag(S)*X=B were the least squares problem,
-*>         where diag(S) is a diagonal matrix of singular values, the
-*>         solution would be X(i) = B(i) / S(i) if S(i) is greater than
-*>         RCOND*max(S), and X(i) = 0 if S(i) is less than or equal to
-*>         RCOND*max(S).
+*>          C is COMPLEX*16 array, dimension (LDC,N)
+*>          On entry, the M-by-N matrix C.
+*>          On exit, C is overwritten by Q*C or Q**H*C or C*Q**H or C*Q.
 *> \endverbatim
 *>
-*> \param[out] RANK
+*> \param[in] LDC
 *> \verbatim
-*>          RANK is INTEGER
-*>         The number of singular values of A greater than RCOND times
-*>         the largest singular value.
+*>          LDC is INTEGER
+*>          The leading dimension of the array C. LDC >= max(1,M).
 *> \endverbatim
 *>
 *> \param[out] WORK
 *> \verbatim
-*>          WORK is COMPLEX*16 array, dimension at least
-*>         (N * NRHS).
+*>          WORK is COMPLEX*16 array, dimension (MAX(1,LWORK))
+*>          On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
 *> \endverbatim
 *>
-*> \param[out] RWORK
+*> \param[in] LWORK
 *> \verbatim
-*>          RWORK is DOUBLE PRECISION array, dimension at least
-*>         (9*N + 2*N*SMLSIZ + 8*N*NLVL + 3*SMLSIZ*NRHS +
-*>         MAX( (SMLSIZ+1)**2, N*(1+NRHS) + 2*NRHS ),
-*>         where
-*>         NLVL = MAX( 0, INT( LOG_2( MIN( M,N )/(SMLSIZ+1) ) ) + 1 )
-*> \endverbatim
+*>          LWORK is INTEGER
+*>          The dimension of the array WORK.
+*>          If SIDE = 'L', LWORK >= max(1,N);
+*>          if SIDE = 'R', LWORK >= max(1,M).
+*>          For good performance, LWORK should generally be larger.
 *>
-*> \param[out] IWORK
-*> \verbatim
-*>          IWORK is INTEGER array, dimension at least
-*>         (3*N*NLVL + 11*N).
+*>          If LWORK = -1, then a workspace query is assumed; the routine
+*>          only calculates the optimal size of the WORK array, returns
+*>          this value as the first entry of the WORK array, and no error
+*>          message related to LWORK is issued by XERBLA.
 *> \endverbatim
 *>
 *> \param[out] INFO
 *> \verbatim
 *>          INFO is INTEGER
-*>         = 0:  successful exit.
-*>         < 0:  if INFO = -i, the i-th argument had an illegal value.
-*>         > 0:  The algorithm failed to compute a singular value while
-*>               working on the submatrix lying in rows and columns
-*>               INFO/(N+1) through MOD(INFO,N+1).
+*>          = 0:  successful exit
+*>          < 0:  if INFO = -i, the i-th argument had an illegal value
 *> \endverbatim
 *
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date September 2012
+*> \date December 2016
 *
 *> \ingroup complex16OTHERcomputational
 *
-*> \par Contributors:
-*  ==================
-*>
-*>     Ming Gu and Ren-Cang Li, Computer Science Division, University of
-*>       California at Berkeley, USA \n
-*>     Osni Marques, LBNL/NERSC, USA \n
-*
 *  =====================================================================
-      SUBROUTINE ZLALSD( UPLO, SMLSIZ, N, NRHS, D, E, B, LDB, RCOND,
-     $                   RANK, WORK, RWORK, IWORK, INFO )
+      SUBROUTINE ZUNMLQ( SIDE, TRANS, M, N, K, A, LDA, TAU, C, LDC,
+     $                   WORK, LWORK, INFO )
 *
-*  -- LAPACK computational routine (version 3.4.2) --
+*  -- LAPACK computational routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     September 2012
+*     December 2016
 *
 *     .. Scalar Arguments ..
-      CHARACTER          UPLO
-      INTEGER            INFO, LDB, N, NRHS, RANK, SMLSIZ
-      DOUBLE PRECISION   RCOND
+      CHARACTER          SIDE, TRANS
+      INTEGER            INFO, K, LDA, LDC, LWORK, M, N
 *     ..
 *     .. Array Arguments ..
-      INTEGER            IWORK( * )
-      DOUBLE PRECISION   D( * ), E( * ), RWORK( * )
-      COMPLEX*16         B( LDB, * ), WORK( * )
+      COMPLEX*16         A( LDA, * ), C( LDC, * ), TAU( * ), WORK( * )
 *     ..
 *
 *  =====================================================================
 *
 *     .. Parameters ..
-      DOUBLE PRECISION   ZERO, ONE, TWO
-      PARAMETER          ( ZERO = 0.0D0, ONE = 1.0D0, TWO = 2.0D0 )
-      COMPLEX*16         CZERO
-      PARAMETER          ( CZERO = ( 0.0D0, 0.0D0 ) )
+      INTEGER            NBMAX, LDT, TSIZE
+      PARAMETER          ( NBMAX = 64, LDT = NBMAX+1,
+     $                     TSIZE = LDT*NBMAX )
 *     ..
 *     .. Local Scalars ..
-      INTEGER            BX, BXST, C, DIFL, DIFR, GIVCOL, GIVNUM,
-     $                   GIVPTR, I, ICMPQ1, ICMPQ2, IRWB, IRWIB, IRWRB,
-     $                   IRWU, IRWVT, IRWWRK, IWK, J, JCOL, JIMAG,
-     $                   JREAL, JROW, K, NLVL, NM1, NRWORK, NSIZE, NSUB,
-     $                   PERM, POLES, S, SIZEI, SMLSZP, SQRE, ST, ST1,
-     $                   U, VT, Z
-      DOUBLE PRECISION   CS, EPS, ORGNRM, RCND, R, SN, TOL
+      LOGICAL            LEFT, LQUERY, NOTRAN
+      CHARACTER          TRANST
+      INTEGER            I, I1, I2, I3, IB, IC, IINFO, IWT, JC, LDWORK,
+     $                   LWKOPT, MI, NB, NBMIN, NI, NQ, NW
 *     ..
 *     .. External Functions ..
-      INTEGER            IDAMAX
-      DOUBLE PRECISION   DLAMCH, DLANST
-      EXTERNAL           IDAMAX, DLAMCH, DLANST
+      LOGICAL            LSAME
+      INTEGER            ILAENV
+      EXTERNAL           LSAME, ILAENV
 *     ..
 *     .. External Subroutines ..
-      EXTERNAL           DGEMM, DLARTG, DLASCL, DLASDA, DLASDQ, DLASET,
-     $                   DLASRT, XERBLA, ZCOPY, ZDROT, ZLACPY, ZLALSA,
-     $                   ZLASCL, ZLASET
+      EXTERNAL           XERBLA, ZLARFB, ZLARFT, ZUNML2
 *     ..
 *     .. Intrinsic Functions ..
-      INTRINSIC          ABS, DBLE, DCMPLX, DIMAG, INT, LOG, SIGN
+      INTRINSIC          MAX, MIN
 *     ..
 *     .. Executable Statements ..
 *
-*     Test the input parameters.
+*     Test the input arguments
 *
       INFO = 0
+      LEFT = LSAME( SIDE, 'L' )
+      NOTRAN = LSAME( TRANS, 'N' )
+      LQUERY = ( LWORK.EQ.-1 )
 *
-      IF( N.LT.0 ) THEN
+*     NQ is the order of Q and NW is the minimum dimension of WORK
+*
+      IF( LEFT ) THEN
+         NQ = M
+         NW = N
+      ELSE
+         NQ = N
+         NW = M
+      END IF
+      IF( .NOT.LEFT .AND. .NOT.LSAME( SIDE, 'R' ) ) THEN
+         INFO = -1
+      ELSE IF( .NOT.NOTRAN .AND. .NOT.LSAME( TRANS, 'C' ) ) THEN
+         INFO = -2
+      ELSE IF( M.LT.0 ) THEN
          INFO = -3
-      ELSE IF( NRHS.LT.1 ) THEN
+      ELSE IF( N.LT.0 ) THEN
          INFO = -4
-      ELSE IF( ( LDB.LT.1 ) .OR. ( LDB.LT.N ) ) THEN
-         INFO = -8
-      END IF
-      IF( INFO.NE.0 ) THEN
-         CALL XERBLA( 'ZLALSD', -INFO )
-         RETURN
+      ELSE IF( K.LT.0 .OR. K.GT.NQ ) THEN
+         INFO = -5
+      ELSE IF( LDA.LT.MAX( 1, K ) ) THEN
+         INFO = -7
+      ELSE IF( LDC.LT.MAX( 1, M ) ) THEN
+         INFO = -10
+      ELSE IF( LWORK.LT.MAX( 1, NW ) .AND. .NOT.LQUERY ) THEN
+         INFO = -12
       END IF
 *
-      EPS = DLAMCH( 'Epsilon' )
+      IF( INFO.EQ.0 ) THEN
 *
-*     Set up the tolerance.
+*        Compute the workspace requirements
 *
-      IF( ( RCOND.LE.ZERO ) .OR. ( RCOND.GE.ONE ) ) THEN
-         RCND = EPS
-      ELSE
-         RCND = RCOND
+         NB = MIN( NBMAX, ILAENV( 1, 'ZUNMLQ', SIDE // TRANS, M, N, K,
+     $        -1 ) )
+         LWKOPT = MAX( 1, NW )*NB + TSIZE
+         WORK( 1 ) = LWKOPT
       END IF
 *
-      RANK = 0
-*
-*     Quick return if possible.
-*
-      IF( N.EQ.0 ) THEN
+      IF( INFO.NE.0 ) THEN
+         CALL XERBLA( 'ZUNMLQ', -INFO )
          RETURN
-      ELSE IF( N.EQ.1 ) THEN
-         IF( D( 1 ).EQ.ZERO ) THEN
-            CALL ZLASET( 'A', 1, NRHS, CZERO, CZERO, B, LDB )
-         ELSE
-            RANK = 1
-            CALL ZLASCL( 'G', 0, 0, D( 1 ), ONE, 1, NRHS, B, LDB, INFO )
-            D( 1 ) = ABS( D( 1 ) )
-         END IF
+      ELSE IF( LQUERY ) THEN
          RETURN
       END IF
 *
-*     Rotate the matrix if it is lower bidiagonal.
-*
-      IF( UPLO.EQ.'L' ) THEN
-         DO 10 I = 1, N - 1
-            CALL DLARTG( D( I ), E( I ), CS, SN, R )
-            D( I ) = R
-            E( I ) = SN*D( I+1 )
-            D( I+1 ) = CS*D( I+1 )
-            IF( NRHS.EQ.1 ) THEN
-               CALL ZDROT( 1, B( I, 1 ), 1, B( I+1, 1 ), 1, CS, SN )
-            ELSE
-               RWORK( I*2-1 ) = CS
-               RWORK( I*2 ) = SN
-            END IF
-   10    CONTINUE
-         IF( NRHS.GT.1 ) THEN
-            DO 30 I = 1, NRHS
-               DO 20 J = 1, N - 1
-                  CS = RWORK( J*2-1 )
-                  SN = RWORK( J*2 )
-                  CALL ZDROT( 1, B( J, I ), 1, B( J+1, I ), 1, CS, SN )
-   20          CONTINUE
-   30       CONTINUE
-         END IF
-      END IF
-*
-*     Scale.
+*     Quick return if possible
 *
-      NM1 = N - 1
-      ORGNRM = DLANST( 'M', N, D, E )
-      IF( ORGNRM.EQ.ZERO ) THEN
-         CALL ZLASET( 'A', N, NRHS, CZERO, CZERO, B, LDB )
+      IF( M.EQ.0 .OR. N.EQ.0 .OR. K.EQ.0 ) THEN
+         WORK( 1 ) = 1
          RETURN
       END IF
 *
-      CALL DLASCL( 'G', 0, 0, ORGNRM, ONE, N, 1, D, N, INFO )
-      CALL DLASCL( 'G', 0, 0, ORGNRM, ONE, NM1, 1, E, NM1, INFO )
-*
-*     If N is smaller than the minimum divide size SMLSIZ, then solve
-*     the problem with another solver.
-*
-      IF( N.LE.SMLSIZ ) THEN
-         IRWU = 1
-         IRWVT = IRWU + N*N
-         IRWWRK = IRWVT + N*N
-         IRWRB = IRWWRK
-         IRWIB = IRWRB + N*NRHS
-         IRWB = IRWIB + N*NRHS
-         CALL DLASET( 'A', N, N, ZERO, ONE, RWORK( IRWU ), N )
-         CALL DLASET( 'A', N, N, ZERO, ONE, RWORK( IRWVT ), N )
-         CALL DLASDQ( 'U', 0, N, N, N, 0, D, E, RWORK( IRWVT ), N,
-     $                RWORK( IRWU ), N, RWORK( IRWWRK ), 1,
-     $                RWORK( IRWWRK ), INFO )
-         IF( INFO.NE.0 ) THEN
-            RETURN
+      NBMIN = 2
+      LDWORK = NW
+      IF( NB.GT.1 .AND. NB.LT.K ) THEN
+         IF( LWORK.LT.NW*NB+TSIZE ) THEN
+            NB = (LWORK-TSIZE) / LDWORK
+            NBMIN = MAX( 2, ILAENV( 2, 'ZUNMLQ', SIDE // TRANS, M, N, K,
+     $              -1 ) )
          END IF
-*
-*        In the real version, B is passed to DLASDQ and multiplied
-*        internally by Q**H. Here B is complex and that product is
-*        computed below in two steps (real and imaginary parts).
-*
-         J = IRWB - 1
-         DO 50 JCOL = 1, NRHS
-            DO 40 JROW = 1, N
-               J = J + 1
-               RWORK( J ) = DBLE( B( JROW, JCOL ) )
-   40       CONTINUE
-   50    CONTINUE
-         CALL DGEMM( 'T', 'N', N, NRHS, N, ONE, RWORK( IRWU ), N,
-     $               RWORK( IRWB ), N, ZERO, RWORK( IRWRB ), N )
-         J = IRWB - 1
-         DO 70 JCOL = 1, NRHS
-            DO 60 JROW = 1, N
-               J = J + 1
-               RWORK( J ) = DIMAG( B( JROW, JCOL ) )
-   60       CONTINUE
-   70    CONTINUE
-         CALL DGEMM( 'T', 'N', N, NRHS, N, ONE, RWORK( IRWU ), N,
-     $               RWORK( IRWB ), N, ZERO, RWORK( IRWIB ), N )
-         JREAL = IRWRB - 1
-         JIMAG = IRWIB - 1
-         DO 90 JCOL = 1, NRHS
-            DO 80 JROW = 1, N
-               JREAL = JREAL + 1
-               JIMAG = JIMAG + 1
-               B( JROW, JCOL ) = DCMPLX( RWORK( JREAL ),
-     $                           RWORK( JIMAG ) )
-   80       CONTINUE
-   90    CONTINUE
-*
-         TOL = RCND*ABS( D( IDAMAX( N, D, 1 ) ) )
-         DO 100 I = 1, N
-            IF( D( I ).LE.TOL ) THEN
-               CALL ZLASET( 'A', 1, NRHS, CZERO, CZERO, B( I, 1 ), LDB )
-            ELSE
-               CALL ZLASCL( 'G', 0, 0, D( I ), ONE, 1, NRHS, B( I, 1 ),
-     $                      LDB, INFO )
-               RANK = RANK + 1
-            END IF
-  100    CONTINUE
-*
-*        Since B is complex, the following call to DGEMM is performed
-*        in two steps (real and imaginary parts). That is for V * B
-*        (in the real version of the code V**H is stored in WORK).
-*
-*        CALL DGEMM( 'T', 'N', N, NRHS, N, ONE, WORK, N, B, LDB, ZERO,
-*    $               WORK( NWORK ), N )
-*
-         J = IRWB - 1
-         DO 120 JCOL = 1, NRHS
-            DO 110 JROW = 1, N
-               J = J + 1
-               RWORK( J ) = DBLE( B( JROW, JCOL ) )
-  110       CONTINUE
-  120    CONTINUE
-         CALL DGEMM( 'T', 'N', N, NRHS, N, ONE, RWORK( IRWVT ), N,
-     $               RWORK( IRWB ), N, ZERO, RWORK( IRWRB ), N )
-         J = IRWB - 1
-         DO 140 JCOL = 1, NRHS
-            DO 130 JROW = 1, N
-               J = J + 1
-               RWORK( J ) = DIMAG( B( JROW, JCOL ) )
-  130       CONTINUE
-  140    CONTINUE
-         CALL DGEMM( 'T', 'N', N, NRHS, N, ONE, RWORK( IRWVT ), N,
-     $               RWORK( IRWB ), N, ZERO, RWORK( IRWIB ), N )
-         JREAL = IRWRB - 1
-         JIMAG = IRWIB - 1
-         DO 160 JCOL = 1, NRHS
-            DO 150 JROW = 1, N
-               JREAL = JREAL + 1
-               JIMAG = JIMAG + 1
-               B( JROW, JCOL ) = DCMPLX( RWORK( JREAL ),
-     $                           RWORK( JIMAG ) )
-  150       CONTINUE
-  160    CONTINUE
-*
-*        Unscale.
-*
-         CALL DLASCL( 'G', 0, 0, ONE, ORGNRM, N, 1, D, N, INFO )
-         CALL DLASRT( 'D', N, D, INFO )
-         CALL ZLASCL( 'G', 0, 0, ORGNRM, ONE, N, NRHS, B, LDB, INFO )
-*
-         RETURN
       END IF
 *
-*     Book-keeping and setting up some constants.
-*
-      NLVL = INT( LOG( DBLE( N ) / DBLE( SMLSIZ+1 ) ) / LOG( TWO ) ) + 1
-*
-      SMLSZP = SMLSIZ + 1
-*
-      U = 1
-      VT = 1 + SMLSIZ*N
-      DIFL = VT + SMLSZP*N
-      DIFR = DIFL + NLVL*N
-      Z = DIFR + NLVL*N*2
-      C = Z + NLVL*N
-      S = C + N
-      POLES = S + N
-      GIVNUM = POLES + 2*NLVL*N
-      NRWORK = GIVNUM + 2*NLVL*N
-      BX = 1
-*
-      IRWRB = NRWORK
-      IRWIB = IRWRB + SMLSIZ*NRHS
-      IRWB = IRWIB + SMLSIZ*NRHS
-*
-      SIZEI = 1 + N
-      K = SIZEI + N
-      GIVPTR = K + N
-      PERM = GIVPTR + N
-      GIVCOL = PERM + NLVL*N
-      IWK = GIVCOL + NLVL*N*2
-*
-      ST = 1
-      SQRE = 0
-      ICMPQ1 = 1
-      ICMPQ2 = 0
-      NSUB = 0
-*
-      DO 170 I = 1, N
-         IF( ABS( D( I ) ).LT.EPS ) THEN
-            D( I ) = SIGN( EPS, D( I ) )
-         END IF
-  170 CONTINUE
-*
-      DO 240 I = 1, NM1
-         IF( ( ABS( E( I ) ).LT.EPS ) .OR. ( I.EQ.NM1 ) ) THEN
-            NSUB = NSUB + 1
-            IWORK( NSUB ) = ST
-*
-*           Subproblem found. First determine its size and then
-*           apply divide and conquer on it.
-*
-            IF( I.LT.NM1 ) THEN
-*
-*              A subproblem with E(I) small for I < NM1.
-*
-               NSIZE = I - ST + 1
-               IWORK( SIZEI+NSUB-1 ) = NSIZE
-            ELSE IF( ABS( E( I ) ).GE.EPS ) THEN
-*
-*              A subproblem with E(NM1) not too small but I = NM1.
-*
-               NSIZE = N - ST + 1
-               IWORK( SIZEI+NSUB-1 ) = NSIZE
-            ELSE
-*
-*              A subproblem with E(NM1) small. This implies an
-*              1-by-1 subproblem at D(N), which is not solved
-*              explicitly.
-*
-               NSIZE = I - ST + 1
-               IWORK( SIZEI+NSUB-1 ) = NSIZE
-               NSUB = NSUB + 1
-               IWORK( NSUB ) = N
-               IWORK( SIZEI+NSUB-1 ) = 1
-               CALL ZCOPY( NRHS, B( N, 1 ), LDB, WORK( BX+NM1 ), N )
-            END IF
-            ST1 = ST - 1
-            IF( NSIZE.EQ.1 ) THEN
-*
-*              This is a 1-by-1 subproblem and is not solved
-*              explicitly.
-*
-               CALL ZCOPY( NRHS, B( ST, 1 ), LDB, WORK( BX+ST1 ), N )
-            ELSE IF( NSIZE.LE.SMLSIZ ) THEN
-*
-*              This is a small subproblem and is solved by DLASDQ.
-*
-               CALL DLASET( 'A', NSIZE, NSIZE, ZERO, ONE,
-     $                      RWORK( VT+ST1 ), N )
-               CALL DLASET( 'A', NSIZE, NSIZE, ZERO, ONE,
-     $                      RWORK( U+ST1 ), N )
-               CALL DLASDQ( 'U', 0, NSIZE, NSIZE, NSIZE, 0, D( ST ),
-     $                      E( ST ), RWORK( VT+ST1 ), N, RWORK( U+ST1 ),
-     $                      N, RWORK( NRWORK ), 1, RWORK( NRWORK ),
-     $                      INFO )
-               IF( INFO.NE.0 ) THEN
-                  RETURN
-               END IF
-*
-*              In the real version, B is passed to DLASDQ and multiplied
-*              internally by Q**H. Here B is complex and that product is
-*              computed below in two steps (real and imaginary parts).
+      IF( NB.LT.NBMIN .OR. NB.GE.K ) THEN
 *
-               J = IRWB - 1
-               DO 190 JCOL = 1, NRHS
-                  DO 180 JROW = ST, ST + NSIZE - 1
-                     J = J + 1
-                     RWORK( J ) = DBLE( B( JROW, JCOL ) )
-  180             CONTINUE
-  190          CONTINUE
-               CALL DGEMM( 'T', 'N', NSIZE, NRHS, NSIZE, ONE,
-     $                     RWORK( U+ST1 ), N, RWORK( IRWB ), NSIZE,
-     $                     ZERO, RWORK( IRWRB ), NSIZE )
-               J = IRWB - 1
-               DO 210 JCOL = 1, NRHS
-                  DO 200 JROW = ST, ST + NSIZE - 1
-                     J = J + 1
-                     RWORK( J ) = DIMAG( B( JROW, JCOL ) )
-  200             CONTINUE
-  210          CONTINUE
-               CALL DGEMM( 'T', 'N', NSIZE, NRHS, NSIZE, ONE,
-     $                     RWORK( U+ST1 ), N, RWORK( IRWB ), NSIZE,
-     $                     ZERO, RWORK( IRWIB ), NSIZE )
-               JREAL = IRWRB - 1
-               JIMAG = IRWIB - 1
-               DO 230 JCOL = 1, NRHS
-                  DO 220 JROW = ST, ST + NSIZE - 1
-                     JREAL = JREAL + 1
-                     JIMAG = JIMAG + 1
-                     B( JROW, JCOL ) = DCMPLX( RWORK( JREAL ),
-     $                                 RWORK( JIMAG ) )
-  220             CONTINUE
-  230          CONTINUE
+*        Use unblocked code
 *
-               CALL ZLACPY( 'A', NSIZE, NRHS, B( ST, 1 ), LDB,
-     $                      WORK( BX+ST1 ), N )
-            ELSE
+         CALL ZUNML2( SIDE, TRANS, M, N, K, A, LDA, TAU, C, LDC, WORK,
+     $                IINFO )
+      ELSE
 *
-*              A large problem. Solve it using divide and conquer.
+*        Use blocked code
 *
-               CALL DLASDA( ICMPQ1, SMLSIZ, NSIZE, SQRE, D( ST ),
-     $                      E( ST ), RWORK( U+ST1 ), N, RWORK( VT+ST1 ),
-     $                      IWORK( K+ST1 ), RWORK( DIFL+ST1 ),
-     $                      RWORK( DIFR+ST1 ), RWORK( Z+ST1 ),
-     $                      RWORK( POLES+ST1 ), IWORK( GIVPTR+ST1 ),
-     $                      IWORK( GIVCOL+ST1 ), N, IWORK( PERM+ST1 ),
-     $                      RWORK( GIVNUM+ST1 ), RWORK( C+ST1 ),
-     $                      RWORK( S+ST1 ), RWORK( NRWORK ),
-     $                      IWORK( IWK ), INFO )
-               IF( INFO.NE.0 ) THEN
-                  RETURN
-               END IF
-               BXST = BX + ST1
-               CALL ZLALSA( ICMPQ2, SMLSIZ, NSIZE, NRHS, B( ST, 1 ),
-     $                      LDB, WORK( BXST ), N, RWORK( U+ST1 ), N,
-     $                      RWORK( VT+ST1 ), IWORK( K+ST1 ),
-     $                      RWORK( DIFL+ST1 ), RWORK( DIFR+ST1 ),
-     $                      RWORK( Z+ST1 ), RWORK( POLES+ST1 ),
-     $                      IWORK( GIVPTR+ST1 ), IWORK( GIVCOL+ST1 ), N,
-     $                      IWORK( PERM+ST1 ), RWORK( GIVNUM+ST1 ),
-     $                      RWORK( C+ST1 ), RWORK( S+ST1 ),
-     $                      RWORK( NRWORK ), IWORK( IWK ), INFO )
-               IF( INFO.NE.0 ) THEN
-                  RETURN
-               END IF
-            END IF
-            ST = I + 1
+         IWT = 1 + NW*NB
+         IF( ( LEFT .AND. NOTRAN ) .OR.
+     $       ( .NOT.LEFT .AND. .NOT.NOTRAN ) ) THEN
+            I1 = 1
+            I2 = K
+            I3 = NB
+         ELSE
+            I1 = ( ( K-1 ) / NB )*NB + 1
+            I2 = 1
+            I3 = -NB
          END IF
-  240 CONTINUE
-*
-*     Apply the singular values and treat the tiny ones as zero.
-*
-      TOL = RCND*ABS( D( IDAMAX( N, D, 1 ) ) )
-*
-      DO 250 I = 1, N
 *
-*        Some of the elements in D can be negative because 1-by-1
-*        subproblems were not solved explicitly.
+         IF( LEFT ) THEN
+            NI = N
+            JC = 1
+         ELSE
+            MI = M
+            IC = 1
+         END IF
 *
-         IF( ABS( D( I ) ).LE.TOL ) THEN
-            CALL ZLASET( 'A', 1, NRHS, CZERO, CZERO, WORK( BX+I-1 ), N )
+         IF( NOTRAN ) THEN
+            TRANST = 'C'
          ELSE
-            RANK = RANK + 1
-            CALL ZLASCL( 'G', 0, 0, D( I ), ONE, 1, NRHS,
-     $                   WORK( BX+I-1 ), N, INFO )
+            TRANST = 'N'
          END IF
-         D( I ) = ABS( D( I ) )
-  250 CONTINUE
 *
-*     Now apply back the right singular vectors.
+         DO 10 I = I1, I2, I3
+            IB = MIN( NB, K-I+1 )
 *
-      ICMPQ2 = 1
-      DO 320 I = 1, NSUB
-         ST = IWORK( I )
-         ST1 = ST - 1
-         NSIZE = IWORK( SIZEI+I-1 )
-         BXST = BX + ST1
-         IF( NSIZE.EQ.1 ) THEN
-            CALL ZCOPY( NRHS, WORK( BXST ), N, B( ST, 1 ), LDB )
-         ELSE IF( NSIZE.LE.SMLSIZ ) THEN
+*           Form the triangular factor of the block reflector
+*           H = H(i) H(i+1) . . . H(i+ib-1)
 *
-*           Since B and BX are complex, the following call to DGEMM
-*           is performed in two steps (real and imaginary parts).
+            CALL ZLARFT( 'Forward', 'Rowwise', NQ-I+1, IB, A( I, I ),
+     $                   LDA, TAU( I ), WORK( IWT ), LDT )
+            IF( LEFT ) THEN
 *
-*           CALL DGEMM( 'T', 'N', NSIZE, NRHS, NSIZE, ONE,
-*    $                  RWORK( VT+ST1 ), N, RWORK( BXST ), N, ZERO,
-*    $                  B( ST, 1 ), LDB )
+*              H or H**H is applied to C(i:m,1:n)
 *
-            J = BXST - N - 1
-            JREAL = IRWB - 1
-            DO 270 JCOL = 1, NRHS
-               J = J + N
-               DO 260 JROW = 1, NSIZE
-                  JREAL = JREAL + 1
-                  RWORK( JREAL ) = DBLE( WORK( J+JROW ) )
-  260          CONTINUE
-  270       CONTINUE
-            CALL DGEMM( 'T', 'N', NSIZE, NRHS, NSIZE, ONE,
-     $                  RWORK( VT+ST1 ), N, RWORK( IRWB ), NSIZE, ZERO,
-     $                  RWORK( IRWRB ), NSIZE )
-            J = BXST - N - 1
-            JIMAG = IRWB - 1
-            DO 290 JCOL = 1, NRHS
-               J = J + N
-               DO 280 JROW = 1, NSIZE
-                  JIMAG = JIMAG + 1
-                  RWORK( JIMAG ) = DIMAG( WORK( J+JROW ) )
-  280          CONTINUE
-  290       CONTINUE
-            CALL DGEMM( 'T', 'N', NSIZE, NRHS, NSIZE, ONE,
-     $                  RWORK( VT+ST1 ), N, RWORK( IRWB ), NSIZE, ZERO,
-     $                  RWORK( IRWIB ), NSIZE )
-            JREAL = IRWRB - 1
-            JIMAG = IRWIB - 1
-            DO 310 JCOL = 1, NRHS
-               DO 300 JROW = ST, ST + NSIZE - 1
-                  JREAL = JREAL + 1
-                  JIMAG = JIMAG + 1
-                  B( JROW, JCOL ) = DCMPLX( RWORK( JREAL ),
-     $                              RWORK( JIMAG ) )
-  300          CONTINUE
-  310       CONTINUE
-         ELSE
-            CALL ZLALSA( ICMPQ2, SMLSIZ, NSIZE, NRHS, WORK( BXST ), N,
-     $                   B( ST, 1 ), LDB, RWORK( U+ST1 ), N,
-     $                   RWORK( VT+ST1 ), IWORK( K+ST1 ),
-     $                   RWORK( DIFL+ST1 ), RWORK( DIFR+ST1 ),
-     $                   RWORK( Z+ST1 ), RWORK( POLES+ST1 ),
-     $                   IWORK( GIVPTR+ST1 ), IWORK( GIVCOL+ST1 ), N,
-     $                   IWORK( PERM+ST1 ), RWORK( GIVNUM+ST1 ),
-     $                   RWORK( C+ST1 ), RWORK( S+ST1 ),
-     $                   RWORK( NRWORK ), IWORK( IWK ), INFO )
-            IF( INFO.NE.0 ) THEN
-               RETURN
-            END IF
-         END IF
-  320 CONTINUE
+               MI = M - I + 1
+               IC = I
+            ELSE
 *
-*     Unscale and sort the singular values.
+*              H or H**H is applied to C(1:m,i:n)
 *
-      CALL DLASCL( 'G', 0, 0, ONE, ORGNRM, N, 1, D, N, INFO )
-      CALL DLASRT( 'D', N, D, INFO )
-      CALL ZLASCL( 'G', 0, 0, ORGNRM, ONE, N, NRHS, B, LDB, INFO )
+               NI = N - I + 1
+               JC = I
+            END IF
+*
+*           Apply H or H**H
 *
+            CALL ZLARFB( SIDE, TRANST, 'Forward', 'Rowwise', MI, NI, IB,
+     $                   A( I, I ), LDA, WORK( IWT ), LDT,
+     $                   C( IC, JC ), LDC, WORK, LDWORK )
+   10    CONTINUE
+      END IF
+      WORK( 1 ) = LWKOPT
       RETURN
 *
-*     End of ZLALSD
+*     End of ZUNMLQ
 *
       END
-*> \brief \b ZLALSA computes the SVD of the coefficient matrix in compact form. Used by sgelsd.
+*> \brief \b ZUNMQL
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download ZLALSA + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/zlalsa.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/zlalsa.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/zlalsa.f"> 
+*> Download ZUNMQL + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/zunmql.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/zunmql.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/zunmql.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
-*       SUBROUTINE ZLALSA( ICOMPQ, SMLSIZ, N, NRHS, B, LDB, BX, LDBX, U,
-*                          LDU, VT, K, DIFL, DIFR, Z, POLES, GIVPTR,
-*                          GIVCOL, LDGCOL, PERM, GIVNUM, C, S, RWORK,
-*                          IWORK, INFO )
-* 
+*       SUBROUTINE ZUNMQL( SIDE, TRANS, M, N, K, A, LDA, TAU, C, LDC,
+*                          WORK, LWORK, INFO )
+*
 *       .. Scalar Arguments ..
-*       INTEGER            ICOMPQ, INFO, LDB, LDBX, LDGCOL, LDU, N, NRHS,
-*      $                   SMLSIZ
+*       CHARACTER          SIDE, TRANS
+*       INTEGER            INFO, K, LDA, LDC, LWORK, M, N
 *       ..
 *       .. Array Arguments ..
-*       INTEGER            GIVCOL( LDGCOL, * ), GIVPTR( * ), IWORK( * ),
-*      $                   K( * ), PERM( LDGCOL, * )
-*       DOUBLE PRECISION   C( * ), DIFL( LDU, * ), DIFR( LDU, * ),
-*      $                   GIVNUM( LDU, * ), POLES( LDU, * ), RWORK( * ),
-*      $                   S( * ), U( LDU, * ), VT( LDU, * ), Z( LDU, * )
-*       COMPLEX*16         B( LDB, * ), BX( LDBX, * )
+*       COMPLEX*16         A( LDA, * ), C( LDC, * ), TAU( * ), WORK( * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
 *>
 *> \verbatim
 *>
-*> ZLALSA is an itermediate step in solving the least squares problem
-*> by computing the SVD of the coefficient matrix in compact form (The
-*> singular vectors are computed as products of simple orthorgonal
-*> matrices.).
+*> ZUNMQL overwrites the general complex M-by-N matrix C with
 *>
-*> If ICOMPQ = 0, ZLALSA applies the inverse of the left singular vector
-*> matrix of an upper bidiagonal matrix to the right hand side; and if
-*> ICOMPQ = 1, ZLALSA applies the right singular vector matrix to the
-*> right hand side. The singular vector matrices were generated in
-*> compact form by ZLALSA.
+*>                 SIDE = 'L'     SIDE = 'R'
+*> TRANS = 'N':      Q * C          C * Q
+*> TRANS = 'C':      Q**H * C       C * Q**H
+*>
+*> where Q is a complex unitary matrix defined as the product of k
+*> elementary reflectors
+*>
+*>       Q = H(k) . . . H(2) H(1)
+*>
+*> as returned by ZGEQLF. Q is of order M if SIDE = 'L' and of order N
+*> if SIDE = 'R'.
 *> \endverbatim
 *
 *  Arguments:
 *  ==========
 *
-*> \param[in] ICOMPQ
+*> \param[in] SIDE
 *> \verbatim
-*>          ICOMPQ is INTEGER
-*>         Specifies whether the left or the right singular vector
-*>         matrix is involved.
-*>         = 0: Left singular vector matrix
-*>         = 1: Right singular vector matrix
+*>          SIDE is CHARACTER*1
+*>          = 'L': apply Q or Q**H from the Left;
+*>          = 'R': apply Q or Q**H from the Right.
 *> \endverbatim
 *>
-*> \param[in] SMLSIZ
+*> \param[in] TRANS
 *> \verbatim
-*>          SMLSIZ is INTEGER
-*>         The maximum size of the subproblems at the bottom of the
-*>         computation tree.
+*>          TRANS is CHARACTER*1
+*>          = 'N':  No transpose, apply Q;
+*>          = 'C':  Transpose, apply Q**H.
+*> \endverbatim
+*>
+*> \param[in] M
+*> \verbatim
+*>          M is INTEGER
+*>          The number of rows of the matrix C. M >= 0.
 *> \endverbatim
 *>
 *> \param[in] N
 *> \verbatim
 *>          N is INTEGER
-*>         The row and column dimensions of the upper bidiagonal matrix.
+*>          The number of columns of the matrix C. N >= 0.
 *> \endverbatim
 *>
-*> \param[in] NRHS
+*> \param[in] K
 *> \verbatim
-*>          NRHS is INTEGER
-*>         The number of columns of B and BX. NRHS must be at least 1.
+*>          K is INTEGER
+*>          The number of elementary reflectors whose product defines
+*>          the matrix Q.
+*>          If SIDE = 'L', M >= K >= 0;
+*>          if SIDE = 'R', N >= K >= 0.
 *> \endverbatim
 *>
-*> \param[in,out] B
+*> \param[in] A
 *> \verbatim
-*>          B is COMPLEX*16 array, dimension ( LDB, NRHS )
-*>         On input, B contains the right hand sides of the least
-*>         squares problem in rows 1 through M.
-*>         On output, B contains the solution X in rows 1 through N.
+*>          A is COMPLEX*16 array, dimension (LDA,K)
+*>          The i-th column must contain the vector which defines the
+*>          elementary reflector H(i), for i = 1,2,...,k, as returned by
+*>          ZGEQLF in the last k columns of its array argument A.
 *> \endverbatim
 *>
-*> \param[in] LDB
+*> \param[in] LDA
 *> \verbatim
-*>          LDB is INTEGER
-*>         The leading dimension of B in the calling subprogram.
-*>         LDB must be at least max(1,MAX( M, N ) ).
+*>          LDA is INTEGER
+*>          The leading dimension of the array A.
+*>          If SIDE = 'L', LDA >= max(1,M);
+*>          if SIDE = 'R', LDA >= max(1,N).
 *> \endverbatim
 *>
-*> \param[out] BX
+*> \param[in] TAU
 *> \verbatim
-*>          BX is COMPLEX*16 array, dimension ( LDBX, NRHS )
-*>         On exit, the result of applying the left or right singular
-*>         vector matrix to B.
+*>          TAU is COMPLEX*16 array, dimension (K)
+*>          TAU(i) must contain the scalar factor of the elementary
+*>          reflector H(i), as returned by ZGEQLF.
 *> \endverbatim
 *>
-*> \param[in] LDBX
+*> \param[in,out] C
 *> \verbatim
-*>          LDBX is INTEGER
-*>         The leading dimension of BX.
+*>          C is COMPLEX*16 array, dimension (LDC,N)
+*>          On entry, the M-by-N matrix C.
+*>          On exit, C is overwritten by Q*C or Q**H*C or C*Q**H or C*Q.
 *> \endverbatim
 *>
-*> \param[in] U
+*> \param[in] LDC
 *> \verbatim
-*>          U is DOUBLE PRECISION array, dimension ( LDU, SMLSIZ ).
-*>         On entry, U contains the left singular vector matrices of all
-*>         subproblems at the bottom level.
+*>          LDC is INTEGER
+*>          The leading dimension of the array C. LDC >= max(1,M).
 *> \endverbatim
 *>
-*> \param[in] LDU
+*> \param[out] WORK
 *> \verbatim
-*>          LDU is INTEGER, LDU = > N.
-*>         The leading dimension of arrays U, VT, DIFL, DIFR,
-*>         POLES, GIVNUM, and Z.
+*>          WORK is COMPLEX*16 array, dimension (MAX(1,LWORK))
+*>          On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
 *> \endverbatim
 *>
-*> \param[in] VT
+*> \param[in] LWORK
 *> \verbatim
-*>          VT is DOUBLE PRECISION array, dimension ( LDU, SMLSIZ+1 ).
-*>         On entry, VT**H contains the right singular vector matrices of
-*>         all subproblems at the bottom level.
+*>          LWORK is INTEGER
+*>          The dimension of the array WORK.
+*>          If SIDE = 'L', LWORK >= max(1,N);
+*>          if SIDE = 'R', LWORK >= max(1,M).
+*>          For good performance, LWORK should genreally be larger.
+*>
+*>          If LWORK = -1, then a workspace query is assumed; the routine
+*>          only calculates the optimal size of the WORK array, returns
+*>          this value as the first entry of the WORK array, and no error
+*>          message related to LWORK is issued by XERBLA.
 *> \endverbatim
 *>
-*> \param[in] K
+*> \param[out] INFO
 *> \verbatim
-*>          K is INTEGER array, dimension ( N ).
+*>          INFO is INTEGER
+*>          = 0:  successful exit
+*>          < 0:  if INFO = -i, the i-th argument had an illegal value
 *> \endverbatim
+*
+*  Authors:
+*  ========
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date December 2016
+*
+*> \ingroup complex16OTHERcomputational
+*
+*  =====================================================================
+      SUBROUTINE ZUNMQL( SIDE, TRANS, M, N, K, A, LDA, TAU, C, LDC,
+     $                   WORK, LWORK, INFO )
+*
+*  -- LAPACK computational routine (version 3.7.0) --
+*  -- LAPACK is a software package provided by Univ. of Tennessee,    --
+*  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+*     December 2016
+*
+*     .. Scalar Arguments ..
+      CHARACTER          SIDE, TRANS
+      INTEGER            INFO, K, LDA, LDC, LWORK, M, N
+*     ..
+*     .. Array Arguments ..
+      COMPLEX*16         A( LDA, * ), C( LDC, * ), TAU( * ), WORK( * )
+*     ..
+*
+*  =====================================================================
+*
+*     .. Parameters ..
+      INTEGER            NBMAX, LDT, TSIZE
+      PARAMETER          ( NBMAX = 64, LDT = NBMAX+1,
+     $                     TSIZE = LDT*NBMAX )
+*     ..
+*     .. Local Scalars ..
+      LOGICAL            LEFT, LQUERY, NOTRAN
+      INTEGER            I, I1, I2, I3, IB, IINFO, IWT, LDWORK, LWKOPT,
+     $                   MI, NB, NBMIN, NI, NQ, NW
+*     ..
+*     .. External Functions ..
+      LOGICAL            LSAME
+      INTEGER            ILAENV
+      EXTERNAL           LSAME, ILAENV
+*     ..
+*     .. External Subroutines ..
+      EXTERNAL           XERBLA, ZLARFB, ZLARFT, ZUNM2L
+*     ..
+*     .. Intrinsic Functions ..
+      INTRINSIC          MAX, MIN
+*     ..
+*     .. Executable Statements ..
+*
+*     Test the input arguments
+*
+      INFO = 0
+      LEFT = LSAME( SIDE, 'L' )
+      NOTRAN = LSAME( TRANS, 'N' )
+      LQUERY = ( LWORK.EQ.-1 )
+*
+*     NQ is the order of Q and NW is the minimum dimension of WORK
+*
+      IF( LEFT ) THEN
+         NQ = M
+         NW = MAX( 1, N )
+      ELSE
+         NQ = N
+         NW = MAX( 1, M )
+      END IF
+      IF( .NOT.LEFT .AND. .NOT.LSAME( SIDE, 'R' ) ) THEN
+         INFO = -1
+      ELSE IF( .NOT.NOTRAN .AND. .NOT.LSAME( TRANS, 'C' ) ) THEN
+         INFO = -2
+      ELSE IF( M.LT.0 ) THEN
+         INFO = -3
+      ELSE IF( N.LT.0 ) THEN
+         INFO = -4
+      ELSE IF( K.LT.0 .OR. K.GT.NQ ) THEN
+         INFO = -5
+      ELSE IF( LDA.LT.MAX( 1, NQ ) ) THEN
+         INFO = -7
+      ELSE IF( LDC.LT.MAX( 1, M ) ) THEN
+         INFO = -10
+      ELSE IF( LWORK.LT.NW .AND. .NOT.LQUERY ) THEN
+         INFO = -12
+      END IF
+*
+      IF( INFO.EQ.0 ) THEN
+*
+*        Compute the workspace requirements
+*
+         IF( M.EQ.0 .OR. N.EQ.0 ) THEN
+            LWKOPT = 1
+         ELSE
+            NB = MIN( NBMAX, ILAENV( 1, 'ZUNMQL', SIDE // TRANS, M, N,
+     $                               K, -1 ) )
+            LWKOPT = NW*NB + TSIZE
+         END IF
+         WORK( 1 ) = LWKOPT
+      END IF
+*
+      IF( INFO.NE.0 ) THEN
+         CALL XERBLA( 'ZUNMQL', -INFO )
+         RETURN
+      ELSE IF( LQUERY ) THEN
+         RETURN
+      END IF
+*
+*     Quick return if possible
+*
+      IF( M.EQ.0 .OR. N.EQ.0 ) THEN
+         RETURN
+      END IF
+*
+      NBMIN = 2
+      LDWORK = NW
+      IF( NB.GT.1 .AND. NB.LT.K ) THEN
+         IF( LWORK.LT.NW*NB+TSIZE ) THEN
+            NB = (LWORK-TSIZE) / LDWORK
+            NBMIN = MAX( 2, ILAENV( 2, 'ZUNMQL', SIDE // TRANS, M, N, K,
+     $              -1 ) )
+         END IF
+      END IF
+*
+      IF( NB.LT.NBMIN .OR. NB.GE.K ) THEN
+*
+*        Use unblocked code
+*
+         CALL ZUNM2L( SIDE, TRANS, M, N, K, A, LDA, TAU, C, LDC, WORK,
+     $                IINFO )
+      ELSE
+*
+*        Use blocked code
+*
+         IWT = 1 + NW*NB
+         IF( ( LEFT .AND. NOTRAN ) .OR.
+     $       ( .NOT.LEFT .AND. .NOT.NOTRAN ) ) THEN
+            I1 = 1
+            I2 = K
+            I3 = NB
+         ELSE
+            I1 = ( ( K-1 ) / NB )*NB + 1
+            I2 = 1
+            I3 = -NB
+         END IF
+*
+         IF( LEFT ) THEN
+            NI = N
+         ELSE
+            MI = M
+         END IF
+*
+         DO 10 I = I1, I2, I3
+            IB = MIN( NB, K-I+1 )
+*
+*           Form the triangular factor of the block reflector
+*           H = H(i+ib-1) . . . H(i+1) H(i)
+*
+            CALL ZLARFT( 'Backward', 'Columnwise', NQ-K+I+IB-1, IB,
+     $                   A( 1, I ), LDA, TAU( I ), WORK( IWT ), LDT )
+            IF( LEFT ) THEN
+*
+*              H or H**H is applied to C(1:m-k+i+ib-1,1:n)
+*
+               MI = M - K + I + IB - 1
+            ELSE
+*
+*              H or H**H is applied to C(1:m,1:n-k+i+ib-1)
+*
+               NI = N - K + I + IB - 1
+            END IF
+*
+*           Apply H or H**H
+*
+            CALL ZLARFB( SIDE, TRANS, 'Backward', 'Columnwise', MI, NI,
+     $                   IB, A( 1, I ), LDA, WORK( IWT ), LDT, C, LDC,
+     $                   WORK, LDWORK )
+   10    CONTINUE
+      END IF
+      WORK( 1 ) = LWKOPT
+      RETURN
+*
+*     End of ZUNMQL
+*
+      END
+*> \brief \b ZUNMQR
+*
+*  =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
+*
+*> \htmlonly
+*> Download ZUNMQR + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/zunmqr.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/zunmqr.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/zunmqr.f">
+*> [TXT]</a>
+*> \endhtmlonly
+*
+*  Definition:
+*  ===========
+*
+*       SUBROUTINE ZUNMQR( SIDE, TRANS, M, N, K, A, LDA, TAU, C, LDC,
+*                          WORK, LWORK, INFO )
+*
+*       .. Scalar Arguments ..
+*       CHARACTER          SIDE, TRANS
+*       INTEGER            INFO, K, LDA, LDC, LWORK, M, N
+*       ..
+*       .. Array Arguments ..
+*       COMPLEX*16         A( LDA, * ), C( LDC, * ), TAU( * ), WORK( * )
+*       ..
+*
+*
+*> \par Purpose:
+*  =============
 *>
-*> \param[in] DIFL
 *> \verbatim
-*>          DIFL is DOUBLE PRECISION array, dimension ( LDU, NLVL ).
-*>         where NLVL = INT(log_2 (N/(SMLSIZ+1))) + 1.
+*>
+*> ZUNMQR overwrites the general complex M-by-N matrix C with
+*>
+*>                 SIDE = 'L'     SIDE = 'R'
+*> TRANS = 'N':      Q * C          C * Q
+*> TRANS = 'C':      Q**H * C       C * Q**H
+*>
+*> where Q is a complex unitary matrix defined as the product of k
+*> elementary reflectors
+*>
+*>       Q = H(1) H(2) . . . H(k)
+*>
+*> as returned by ZGEQRF. Q is of order M if SIDE = 'L' and of order N
+*> if SIDE = 'R'.
+*> \endverbatim
+*
+*  Arguments:
+*  ==========
+*
+*> \param[in] SIDE
+*> \verbatim
+*>          SIDE is CHARACTER*1
+*>          = 'L': apply Q or Q**H from the Left;
+*>          = 'R': apply Q or Q**H from the Right.
 *> \endverbatim
 *>
-*> \param[in] DIFR
+*> \param[in] TRANS
 *> \verbatim
-*>          DIFR is DOUBLE PRECISION array, dimension ( LDU, 2 * NLVL ).
-*>         On entry, DIFL(*, I) and DIFR(*, 2 * I -1) record
-*>         distances between singular values on the I-th level and
-*>         singular values on the (I -1)-th level, and DIFR(*, 2 * I)
-*>         record the normalizing factors of the right singular vectors
-*>         matrices of subproblems on I-th level.
+*>          TRANS is CHARACTER*1
+*>          = 'N':  No transpose, apply Q;
+*>          = 'C':  Conjugate transpose, apply Q**H.
 *> \endverbatim
 *>
-*> \param[in] Z
+*> \param[in] M
 *> \verbatim
-*>          Z is DOUBLE PRECISION array, dimension ( LDU, NLVL ).
-*>         On entry, Z(1, I) contains the components of the deflation-
-*>         adjusted updating row vector for subproblems on the I-th
-*>         level.
+*>          M is INTEGER
+*>          The number of rows of the matrix C. M >= 0.
 *> \endverbatim
 *>
-*> \param[in] POLES
+*> \param[in] N
 *> \verbatim
-*>          POLES is DOUBLE PRECISION array, dimension ( LDU, 2 * NLVL ).
-*>         On entry, POLES(*, 2 * I -1: 2 * I) contains the new and old
-*>         singular values involved in the secular equations on the I-th
-*>         level.
+*>          N is INTEGER
+*>          The number of columns of the matrix C. N >= 0.
 *> \endverbatim
 *>
-*> \param[in] GIVPTR
+*> \param[in] K
 *> \verbatim
-*>          GIVPTR is INTEGER array, dimension ( N ).
-*>         On entry, GIVPTR( I ) records the number of Givens
-*>         rotations performed on the I-th problem on the computation
-*>         tree.
+*>          K is INTEGER
+*>          The number of elementary reflectors whose product defines
+*>          the matrix Q.
+*>          If SIDE = 'L', M >= K >= 0;
+*>          if SIDE = 'R', N >= K >= 0.
 *> \endverbatim
 *>
-*> \param[in] GIVCOL
+*> \param[in] A
 *> \verbatim
-*>          GIVCOL is INTEGER array, dimension ( LDGCOL, 2 * NLVL ).
-*>         On entry, for each I, GIVCOL(*, 2 * I - 1: 2 * I) records the
-*>         locations of Givens rotations performed on the I-th level on
-*>         the computation tree.
+*>          A is COMPLEX*16 array, dimension (LDA,K)
+*>          The i-th column must contain the vector which defines the
+*>          elementary reflector H(i), for i = 1,2,...,k, as returned by
+*>          ZGEQRF in the first k columns of its array argument A.
 *> \endverbatim
 *>
-*> \param[in] LDGCOL
+*> \param[in] LDA
 *> \verbatim
-*>          LDGCOL is INTEGER, LDGCOL = > N.
-*>         The leading dimension of arrays GIVCOL and PERM.
+*>          LDA is INTEGER
+*>          The leading dimension of the array A.
+*>          If SIDE = 'L', LDA >= max(1,M);
+*>          if SIDE = 'R', LDA >= max(1,N).
 *> \endverbatim
 *>
-*> \param[in] PERM
+*> \param[in] TAU
 *> \verbatim
-*>          PERM is INTEGER array, dimension ( LDGCOL, NLVL ).
-*>         On entry, PERM(*, I) records permutations done on the I-th
-*>         level of the computation tree.
+*>          TAU is COMPLEX*16 array, dimension (K)
+*>          TAU(i) must contain the scalar factor of the elementary
+*>          reflector H(i), as returned by ZGEQRF.
 *> \endverbatim
 *>
-*> \param[in] GIVNUM
+*> \param[in,out] C
 *> \verbatim
-*>          GIVNUM is DOUBLE PRECISION array, dimension ( LDU, 2 * NLVL ).
-*>         On entry, GIVNUM(*, 2 *I -1 : 2 * I) records the C- and S-
-*>         values of Givens rotations performed on the I-th level on the
-*>         computation tree.
+*>          C is COMPLEX*16 array, dimension (LDC,N)
+*>          On entry, the M-by-N matrix C.
+*>          On exit, C is overwritten by Q*C or Q**H*C or C*Q**H or C*Q.
 *> \endverbatim
 *>
-*> \param[in] C
+*> \param[in] LDC
 *> \verbatim
-*>          C is DOUBLE PRECISION array, dimension ( N ).
-*>         On entry, if the I-th subproblem is not square,
-*>         C( I ) contains the C-value of a Givens rotation related to
-*>         the right null space of the I-th subproblem.
+*>          LDC is INTEGER
+*>          The leading dimension of the array C. LDC >= max(1,M).
 *> \endverbatim
 *>
-*> \param[in] S
+*> \param[out] WORK
 *> \verbatim
-*>          S is DOUBLE PRECISION array, dimension ( N ).
-*>         On entry, if the I-th subproblem is not square,
-*>         S( I ) contains the S-value of a Givens rotation related to
-*>         the right null space of the I-th subproblem.
+*>          WORK is COMPLEX*16 array, dimension (MAX(1,LWORK))
+*>          On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
 *> \endverbatim
 *>
-*> \param[out] RWORK
+*> \param[in] LWORK
 *> \verbatim
-*>          RWORK is DOUBLE PRECISION array, dimension at least
-*>         MAX( (SMLSZ+1)*NRHS*3, N*(1+NRHS) + 2*NRHS ).
-*> \endverbatim
+*>          LWORK is INTEGER
+*>          The dimension of the array WORK.
+*>          If SIDE = 'L', LWORK >= max(1,N);
+*>          if SIDE = 'R', LWORK >= max(1,M).
+*>          For good performance, LWORK should generally be larger.
 *>
-*> \param[out] IWORK
-*> \verbatim
-*>          IWORK is INTEGER array.
-*>         The dimension must be at least 3 * N
+*>          If LWORK = -1, then a workspace query is assumed; the routine
+*>          only calculates the optimal size of the WORK array, returns
+*>          this value as the first entry of the WORK array, and no error
+*>          message related to LWORK is issued by XERBLA.
 *> \endverbatim
 *>
 *> \param[out] INFO
 *> \verbatim
 *>          INFO is INTEGER
-*>          = 0:  successful exit.
-*>          < 0:  if INFO = -i, the i-th argument had an illegal value.
+*>          = 0:  successful exit
+*>          < 0:  if INFO = -i, the i-th argument had an illegal value
 *> \endverbatim
 *
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date September 2012
+*> \date December 2016
 *
 *> \ingroup complex16OTHERcomputational
 *
-*> \par Contributors:
-*  ==================
-*>
-*>     Ming Gu and Ren-Cang Li, Computer Science Division, University of
-*>       California at Berkeley, USA \n
-*>     Osni Marques, LBNL/NERSC, USA \n
-*
 *  =====================================================================
-      SUBROUTINE ZLALSA( ICOMPQ, SMLSIZ, N, NRHS, B, LDB, BX, LDBX, U,
-     $                   LDU, VT, K, DIFL, DIFR, Z, POLES, GIVPTR,
-     $                   GIVCOL, LDGCOL, PERM, GIVNUM, C, S, RWORK,
-     $                   IWORK, INFO )
+      SUBROUTINE ZUNMQR( SIDE, TRANS, M, N, K, A, LDA, TAU, C, LDC,
+     $                   WORK, LWORK, INFO )
 *
-*  -- LAPACK computational routine (version 3.4.2) --
+*  -- LAPACK computational routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     September 2012
+*     December 2016
 *
 *     .. Scalar Arguments ..
-      INTEGER            ICOMPQ, INFO, LDB, LDBX, LDGCOL, LDU, N, NRHS,
-     $                   SMLSIZ
+      CHARACTER          SIDE, TRANS
+      INTEGER            INFO, K, LDA, LDC, LWORK, M, N
 *     ..
 *     .. Array Arguments ..
-      INTEGER            GIVCOL( LDGCOL, * ), GIVPTR( * ), IWORK( * ),
-     $                   K( * ), PERM( LDGCOL, * )
-      DOUBLE PRECISION   C( * ), DIFL( LDU, * ), DIFR( LDU, * ),
-     $                   GIVNUM( LDU, * ), POLES( LDU, * ), RWORK( * ),
-     $                   S( * ), U( LDU, * ), VT( LDU, * ), Z( LDU, * )
-      COMPLEX*16         B( LDB, * ), BX( LDBX, * )
+      COMPLEX*16         A( LDA, * ), C( LDC, * ), TAU( * ), WORK( * )
 *     ..
 *
 *  =====================================================================
 *
 *     .. Parameters ..
-      DOUBLE PRECISION   ZERO, ONE
-      PARAMETER          ( ZERO = 0.0D0, ONE = 1.0D0 )
+      INTEGER            NBMAX, LDT, TSIZE
+      PARAMETER          ( NBMAX = 64, LDT = NBMAX+1,
+     $                     TSIZE = LDT*NBMAX )
 *     ..
 *     .. Local Scalars ..
-      INTEGER            I, I1, IC, IM1, INODE, J, JCOL, JIMAG, JREAL,
-     $                   JROW, LF, LL, LVL, LVL2, ND, NDB1, NDIML,
-     $                   NDIMR, NL, NLF, NLP1, NLVL, NR, NRF, NRP1, SQRE
+      LOGICAL            LEFT, LQUERY, NOTRAN
+      INTEGER            I, I1, I2, I3, IB, IC, IINFO, IWT, JC, LDWORK,
+     $                   LWKOPT, MI, NB, NBMIN, NI, NQ, NW
+*     ..
+*     .. External Functions ..
+      LOGICAL            LSAME
+      INTEGER            ILAENV
+      EXTERNAL           LSAME, ILAENV
 *     ..
 *     .. External Subroutines ..
-      EXTERNAL           DGEMM, DLASDT, XERBLA, ZCOPY, ZLALS0
+      EXTERNAL           XERBLA, ZLARFB, ZLARFT, ZUNM2R
 *     ..
 *     .. Intrinsic Functions ..
-      INTRINSIC          DBLE, DCMPLX, DIMAG
+      INTRINSIC          MAX, MIN
 *     ..
 *     .. Executable Statements ..
 *
-*     Test the input parameters.
+*     Test the input arguments
 *
       INFO = 0
+      LEFT = LSAME( SIDE, 'L' )
+      NOTRAN = LSAME( TRANS, 'N' )
+      LQUERY = ( LWORK.EQ.-1 )
 *
-      IF( ( ICOMPQ.LT.0 ) .OR. ( ICOMPQ.GT.1 ) ) THEN
+*     NQ is the order of Q and NW is the minimum dimension of WORK
+*
+      IF( LEFT ) THEN
+         NQ = M
+         NW = N
+      ELSE
+         NQ = N
+         NW = M
+      END IF
+      IF( .NOT.LEFT .AND. .NOT.LSAME( SIDE, 'R' ) ) THEN
          INFO = -1
-      ELSE IF( SMLSIZ.LT.3 ) THEN
+      ELSE IF( .NOT.NOTRAN .AND. .NOT.LSAME( TRANS, 'C' ) ) THEN
          INFO = -2
-      ELSE IF( N.LT.SMLSIZ ) THEN
+      ELSE IF( M.LT.0 ) THEN
          INFO = -3
-      ELSE IF( NRHS.LT.1 ) THEN
+      ELSE IF( N.LT.0 ) THEN
          INFO = -4
-      ELSE IF( LDB.LT.N ) THEN
-         INFO = -6
-      ELSE IF( LDBX.LT.N ) THEN
-         INFO = -8
-      ELSE IF( LDU.LT.N ) THEN
+      ELSE IF( K.LT.0 .OR. K.GT.NQ ) THEN
+         INFO = -5
+      ELSE IF( LDA.LT.MAX( 1, NQ ) ) THEN
+         INFO = -7
+      ELSE IF( LDC.LT.MAX( 1, M ) ) THEN
          INFO = -10
-      ELSE IF( LDGCOL.LT.N ) THEN
-         INFO = -19
-      END IF
-      IF( INFO.NE.0 ) THEN
-         CALL XERBLA( 'ZLALSA', -INFO )
-         RETURN
+      ELSE IF( LWORK.LT.MAX( 1, NW ) .AND. .NOT.LQUERY ) THEN
+         INFO = -12
       END IF
 *
-*     Book-keeping and  setting up the computation tree.
-*
-      INODE = 1
-      NDIML = INODE + N
-      NDIMR = NDIML + N
-*
-      CALL DLASDT( N, NLVL, ND, IWORK( INODE ), IWORK( NDIML ),
-     $             IWORK( NDIMR ), SMLSIZ )
+      IF( INFO.EQ.0 ) THEN
 *
-*     The following code applies back the left singular vector factors.
-*     For applying back the right singular vector factors, go to 170.
+*        Compute the workspace requirements
 *
-      IF( ICOMPQ.EQ.1 ) THEN
-         GO TO 170
+         NB = MIN( NBMAX, ILAENV( 1, 'ZUNMQR', SIDE // TRANS, M, N, K,
+     $        -1 ) )
+         LWKOPT = MAX( 1, NW )*NB + TSIZE
+         WORK( 1 ) = LWKOPT
       END IF
 *
-*     The nodes on the bottom level of the tree were solved
-*     by DLASDQ. The corresponding left and right singular vector
-*     matrices are in explicit form. First apply back the left
-*     singular vector matrices.
-*
-      NDB1 = ( ND+1 ) / 2
-      DO 130 I = NDB1, ND
-*
-*        IC : center row of each node
-*        NL : number of rows of left  subproblem
-*        NR : number of rows of right subproblem
-*        NLF: starting row of the left   subproblem
-*        NRF: starting row of the right  subproblem
-*
-         I1 = I - 1
-         IC = IWORK( INODE+I1 )
-         NL = IWORK( NDIML+I1 )
-         NR = IWORK( NDIMR+I1 )
-         NLF = IC - NL
-         NRF = IC + 1
-*
-*        Since B and BX are complex, the following call to DGEMM
-*        is performed in two steps (real and imaginary parts).
-*
-*        CALL DGEMM( 'T', 'N', NL, NRHS, NL, ONE, U( NLF, 1 ), LDU,
-*     $               B( NLF, 1 ), LDB, ZERO, BX( NLF, 1 ), LDBX )
-*
-         J = NL*NRHS*2
-         DO 20 JCOL = 1, NRHS
-            DO 10 JROW = NLF, NLF + NL - 1
-               J = J + 1
-               RWORK( J ) = DBLE( B( JROW, JCOL ) )
-   10       CONTINUE
-   20    CONTINUE
-         CALL DGEMM( 'T', 'N', NL, NRHS, NL, ONE, U( NLF, 1 ), LDU,
-     $               RWORK( 1+NL*NRHS*2 ), NL, ZERO, RWORK( 1 ), NL )
-         J = NL*NRHS*2
-         DO 40 JCOL = 1, NRHS
-            DO 30 JROW = NLF, NLF + NL - 1
-               J = J + 1
-               RWORK( J ) = DIMAG( B( JROW, JCOL ) )
-   30       CONTINUE
-   40    CONTINUE
-         CALL DGEMM( 'T', 'N', NL, NRHS, NL, ONE, U( NLF, 1 ), LDU,
-     $               RWORK( 1+NL*NRHS*2 ), NL, ZERO, RWORK( 1+NL*NRHS ),
-     $               NL )
-         JREAL = 0
-         JIMAG = NL*NRHS
-         DO 60 JCOL = 1, NRHS
-            DO 50 JROW = NLF, NLF + NL - 1
-               JREAL = JREAL + 1
-               JIMAG = JIMAG + 1
-               BX( JROW, JCOL ) = DCMPLX( RWORK( JREAL ),
-     $                            RWORK( JIMAG ) )
-   50       CONTINUE
-   60    CONTINUE
-*
-*        Since B and BX are complex, the following call to DGEMM
-*        is performed in two steps (real and imaginary parts).
-*
-*        CALL DGEMM( 'T', 'N', NR, NRHS, NR, ONE, U( NRF, 1 ), LDU,
-*    $               B( NRF, 1 ), LDB, ZERO, BX( NRF, 1 ), LDBX )
-*
-         J = NR*NRHS*2
-         DO 80 JCOL = 1, NRHS
-            DO 70 JROW = NRF, NRF + NR - 1
-               J = J + 1
-               RWORK( J ) = DBLE( B( JROW, JCOL ) )
-   70       CONTINUE
-   80    CONTINUE
-         CALL DGEMM( 'T', 'N', NR, NRHS, NR, ONE, U( NRF, 1 ), LDU,
-     $               RWORK( 1+NR*NRHS*2 ), NR, ZERO, RWORK( 1 ), NR )
-         J = NR*NRHS*2
-         DO 100 JCOL = 1, NRHS
-            DO 90 JROW = NRF, NRF + NR - 1
-               J = J + 1
-               RWORK( J ) = DIMAG( B( JROW, JCOL ) )
-   90       CONTINUE
-  100    CONTINUE
-         CALL DGEMM( 'T', 'N', NR, NRHS, NR, ONE, U( NRF, 1 ), LDU,
-     $               RWORK( 1+NR*NRHS*2 ), NR, ZERO, RWORK( 1+NR*NRHS ),
-     $               NR )
-         JREAL = 0
-         JIMAG = NR*NRHS
-         DO 120 JCOL = 1, NRHS
-            DO 110 JROW = NRF, NRF + NR - 1
-               JREAL = JREAL + 1
-               JIMAG = JIMAG + 1
-               BX( JROW, JCOL ) = DCMPLX( RWORK( JREAL ),
-     $                            RWORK( JIMAG ) )
-  110       CONTINUE
-  120    CONTINUE
-*
-  130 CONTINUE
-*
-*     Next copy the rows of B that correspond to unchanged rows
-*     in the bidiagonal matrix to BX.
-*
-      DO 140 I = 1, ND
-         IC = IWORK( INODE+I-1 )
-         CALL ZCOPY( NRHS, B( IC, 1 ), LDB, BX( IC, 1 ), LDBX )
-  140 CONTINUE
-*
-*     Finally go through the left singular vector matrices of all
-*     the other subproblems bottom-up on the tree.
-*
-      J = 2**NLVL
-      SQRE = 0
+      IF( INFO.NE.0 ) THEN
+         CALL XERBLA( 'ZUNMQR', -INFO )
+         RETURN
+      ELSE IF( LQUERY ) THEN
+         RETURN
+      END IF
 *
-      DO 160 LVL = NLVL, 1, -1
-         LVL2 = 2*LVL - 1
+*     Quick return if possible
 *
-*        find the first node LF and last node LL on
-*        the current level LVL
+      IF( M.EQ.0 .OR. N.EQ.0 .OR. K.EQ.0 ) THEN
+         WORK( 1 ) = 1
+         RETURN
+      END IF
 *
-         IF( LVL.EQ.1 ) THEN
-            LF = 1
-            LL = 1
-         ELSE
-            LF = 2**( LVL-1 )
-            LL = 2*LF - 1
+      NBMIN = 2
+      LDWORK = NW
+      IF( NB.GT.1 .AND. NB.LT.K ) THEN
+         IF( LWORK.LT.NW*NB+TSIZE ) THEN
+            NB = (LWORK-TSIZE) / LDWORK
+            NBMIN = MAX( 2, ILAENV( 2, 'ZUNMQR', SIDE // TRANS, M, N, K,
+     $              -1 ) )
          END IF
-         DO 150 I = LF, LL
-            IM1 = I - 1
-            IC = IWORK( INODE+IM1 )
-            NL = IWORK( NDIML+IM1 )
-            NR = IWORK( NDIMR+IM1 )
-            NLF = IC - NL
-            NRF = IC + 1
-            J = J - 1
-            CALL ZLALS0( ICOMPQ, NL, NR, SQRE, NRHS, BX( NLF, 1 ), LDBX,
-     $                   B( NLF, 1 ), LDB, PERM( NLF, LVL ),
-     $                   GIVPTR( J ), GIVCOL( NLF, LVL2 ), LDGCOL,
-     $                   GIVNUM( NLF, LVL2 ), LDU, POLES( NLF, LVL2 ),
-     $                   DIFL( NLF, LVL ), DIFR( NLF, LVL2 ),
-     $                   Z( NLF, LVL ), K( J ), C( J ), S( J ), RWORK,
-     $                   INFO )
-  150    CONTINUE
-  160 CONTINUE
-      GO TO 330
-*
-*     ICOMPQ = 1: applying back the right singular vector factors.
+      END IF
 *
-  170 CONTINUE
+      IF( NB.LT.NBMIN .OR. NB.GE.K ) THEN
 *
-*     First now go through the right singular vector matrices of all
-*     the tree nodes top-down.
+*        Use unblocked code
 *
-      J = 0
-      DO 190 LVL = 1, NLVL
-         LVL2 = 2*LVL - 1
+         CALL ZUNM2R( SIDE, TRANS, M, N, K, A, LDA, TAU, C, LDC, WORK,
+     $                IINFO )
+      ELSE
 *
-*        Find the first node LF and last node LL on
-*        the current level LVL.
+*        Use blocked code
 *
-         IF( LVL.EQ.1 ) THEN
-            LF = 1
-            LL = 1
+         IWT = 1 + NW*NB
+         IF( ( LEFT .AND. .NOT.NOTRAN ) .OR.
+     $       ( .NOT.LEFT .AND. NOTRAN ) ) THEN
+            I1 = 1
+            I2 = K
+            I3 = NB
          ELSE
-            LF = 2**( LVL-1 )
-            LL = 2*LF - 1
+            I1 = ( ( K-1 ) / NB )*NB + 1
+            I2 = 1
+            I3 = -NB
          END IF
-         DO 180 I = LL, LF, -1
-            IM1 = I - 1
-            IC = IWORK( INODE+IM1 )
-            NL = IWORK( NDIML+IM1 )
-            NR = IWORK( NDIMR+IM1 )
-            NLF = IC - NL
-            NRF = IC + 1
-            IF( I.EQ.LL ) THEN
-               SQRE = 0
-            ELSE
-               SQRE = 1
-            END IF
-            J = J + 1
-            CALL ZLALS0( ICOMPQ, NL, NR, SQRE, NRHS, B( NLF, 1 ), LDB,
-     $                   BX( NLF, 1 ), LDBX, PERM( NLF, LVL ),
-     $                   GIVPTR( J ), GIVCOL( NLF, LVL2 ), LDGCOL,
-     $                   GIVNUM( NLF, LVL2 ), LDU, POLES( NLF, LVL2 ),
-     $                   DIFL( NLF, LVL ), DIFR( NLF, LVL2 ),
-     $                   Z( NLF, LVL ), K( J ), C( J ), S( J ), RWORK,
-     $                   INFO )
-  180    CONTINUE
-  190 CONTINUE
-*
-*     The nodes on the bottom level of the tree were solved
-*     by DLASDQ. The corresponding right singular vector
-*     matrices are in explicit form. Apply them back.
 *
-      NDB1 = ( ND+1 ) / 2
-      DO 320 I = NDB1, ND
-         I1 = I - 1
-         IC = IWORK( INODE+I1 )
-         NL = IWORK( NDIML+I1 )
-         NR = IWORK( NDIMR+I1 )
-         NLP1 = NL + 1
-         IF( I.EQ.ND ) THEN
-            NRP1 = NR
+         IF( LEFT ) THEN
+            NI = N
+            JC = 1
          ELSE
-            NRP1 = NR + 1
+            MI = M
+            IC = 1
          END IF
-         NLF = IC - NL
-         NRF = IC + 1
 *
-*        Since B and BX are complex, the following call to DGEMM is
-*        performed in two steps (real and imaginary parts).
+         DO 10 I = I1, I2, I3
+            IB = MIN( NB, K-I+1 )
 *
-*        CALL DGEMM( 'T', 'N', NLP1, NRHS, NLP1, ONE, VT( NLF, 1 ), LDU,
-*    $               B( NLF, 1 ), LDB, ZERO, BX( NLF, 1 ), LDBX )
+*           Form the triangular factor of the block reflector
+*           H = H(i) H(i+1) . . . H(i+ib-1)
 *
-         J = NLP1*NRHS*2
-         DO 210 JCOL = 1, NRHS
-            DO 200 JROW = NLF, NLF + NLP1 - 1
-               J = J + 1
-               RWORK( J ) = DBLE( B( JROW, JCOL ) )
-  200       CONTINUE
-  210    CONTINUE
-         CALL DGEMM( 'T', 'N', NLP1, NRHS, NLP1, ONE, VT( NLF, 1 ), LDU,
-     $               RWORK( 1+NLP1*NRHS*2 ), NLP1, ZERO, RWORK( 1 ),
-     $               NLP1 )
-         J = NLP1*NRHS*2
-         DO 230 JCOL = 1, NRHS
-            DO 220 JROW = NLF, NLF + NLP1 - 1
-               J = J + 1
-               RWORK( J ) = DIMAG( B( JROW, JCOL ) )
-  220       CONTINUE
-  230    CONTINUE
-         CALL DGEMM( 'T', 'N', NLP1, NRHS, NLP1, ONE, VT( NLF, 1 ), LDU,
-     $               RWORK( 1+NLP1*NRHS*2 ), NLP1, ZERO,
-     $               RWORK( 1+NLP1*NRHS ), NLP1 )
-         JREAL = 0
-         JIMAG = NLP1*NRHS
-         DO 250 JCOL = 1, NRHS
-            DO 240 JROW = NLF, NLF + NLP1 - 1
-               JREAL = JREAL + 1
-               JIMAG = JIMAG + 1
-               BX( JROW, JCOL ) = DCMPLX( RWORK( JREAL ),
-     $                            RWORK( JIMAG ) )
-  240       CONTINUE
-  250    CONTINUE
+            CALL ZLARFT( 'Forward', 'Columnwise', NQ-I+1, IB, A( I, I ),
+     $                   LDA, TAU( I ), WORK( IWT ), LDT )
+            IF( LEFT ) THEN
 *
-*        Since B and BX are complex, the following call to DGEMM is
-*        performed in two steps (real and imaginary parts).
+*              H or H**H is applied to C(i:m,1:n)
 *
-*        CALL DGEMM( 'T', 'N', NRP1, NRHS, NRP1, ONE, VT( NRF, 1 ), LDU,
-*    $               B( NRF, 1 ), LDB, ZERO, BX( NRF, 1 ), LDBX )
+               MI = M - I + 1
+               IC = I
+            ELSE
 *
-         J = NRP1*NRHS*2
-         DO 270 JCOL = 1, NRHS
-            DO 260 JROW = NRF, NRF + NRP1 - 1
-               J = J + 1
-               RWORK( J ) = DBLE( B( JROW, JCOL ) )
-  260       CONTINUE
-  270    CONTINUE
-         CALL DGEMM( 'T', 'N', NRP1, NRHS, NRP1, ONE, VT( NRF, 1 ), LDU,
-     $               RWORK( 1+NRP1*NRHS*2 ), NRP1, ZERO, RWORK( 1 ),
-     $               NRP1 )
-         J = NRP1*NRHS*2
-         DO 290 JCOL = 1, NRHS
-            DO 280 JROW = NRF, NRF + NRP1 - 1
-               J = J + 1
-               RWORK( J ) = DIMAG( B( JROW, JCOL ) )
-  280       CONTINUE
-  290    CONTINUE
-         CALL DGEMM( 'T', 'N', NRP1, NRHS, NRP1, ONE, VT( NRF, 1 ), LDU,
-     $               RWORK( 1+NRP1*NRHS*2 ), NRP1, ZERO,
-     $               RWORK( 1+NRP1*NRHS ), NRP1 )
-         JREAL = 0
-         JIMAG = NRP1*NRHS
-         DO 310 JCOL = 1, NRHS
-            DO 300 JROW = NRF, NRF + NRP1 - 1
-               JREAL = JREAL + 1
-               JIMAG = JIMAG + 1
-               BX( JROW, JCOL ) = DCMPLX( RWORK( JREAL ),
-     $                            RWORK( JIMAG ) )
-  300       CONTINUE
-  310    CONTINUE
+*              H or H**H is applied to C(1:m,i:n)
 *
-  320 CONTINUE
+               NI = N - I + 1
+               JC = I
+            END IF
 *
-  330 CONTINUE
+*           Apply H or H**H
 *
+            CALL ZLARFB( SIDE, TRANS, 'Forward', 'Columnwise', MI, NI,
+     $                   IB, A( I, I ), LDA, WORK( IWT ), LDT,
+     $                   C( IC, JC ), LDC, WORK, LDWORK )
+   10    CONTINUE
+      END IF
+      WORK( 1 ) = LWKOPT
       RETURN
 *
-*     End of ZLALSA
+*     End of ZUNMQR
 *
       END
-*> \brief \b ZLALS0 applies back multiplying factors in solving the least squares problem using divide and conquer SVD approach. Used by sgelsd.
+*> \brief \b ZUNMTR
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download ZLALS0 + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/zlals0.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/zlals0.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/zlals0.f"> 
+*> Download ZUNMTR + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/zunmtr.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/zunmtr.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/zunmtr.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
-*       SUBROUTINE ZLALS0( ICOMPQ, NL, NR, SQRE, NRHS, B, LDB, BX, LDBX,
-*                          PERM, GIVPTR, GIVCOL, LDGCOL, GIVNUM, LDGNUM,
-*                          POLES, DIFL, DIFR, Z, K, C, S, RWORK, INFO )
-* 
-*       .. Scalar Arguments ..
-*       INTEGER            GIVPTR, ICOMPQ, INFO, K, LDB, LDBX, LDGCOL,
-*      $                   LDGNUM, NL, NR, NRHS, SQRE
-*       DOUBLE PRECISION   C, S
-*       ..
-*       .. Array Arguments ..
-*       INTEGER            GIVCOL( LDGCOL, * ), PERM( * )
-*       DOUBLE PRECISION   DIFL( * ), DIFR( LDGNUM, * ),
-*      $                   GIVNUM( LDGNUM, * ), POLES( LDGNUM, * ),
-*      $                   RWORK( * ), Z( * )
-*       COMPLEX*16         B( LDB, * ), BX( LDBX, * )
-*       ..
-*  
-*
-*> \par Purpose:
-*  =============
-*>
-*> \verbatim
-*>
-*> ZLALS0 applies back the multiplying factors of either the left or the
-*> right singular vector matrix of a diagonal matrix appended by a row
-*> to the right hand side matrix B in solving the least squares problem
-*> using the divide-and-conquer SVD approach.
-*>
-*> For the left singular vector matrix, three types of orthogonal
-*> matrices are involved:
-*>
-*> (1L) Givens rotations: the number of such rotations is GIVPTR; the
-*>      pairs of columns/rows they were applied to are stored in GIVCOL;
-*>      and the C- and S-values of these rotations are stored in GIVNUM.
-*>
-*> (2L) Permutation. The (NL+1)-st row of B is to be moved to the first
-*>      row, and for J=2:N, PERM(J)-th row of B is to be moved to the
-*>      J-th row.
-*>
-*> (3L) The left singular vector matrix of the remaining matrix.
-*>
-*> For the right singular vector matrix, four types of orthogonal
-*> matrices are involved:
-*>
-*> (1R) The right singular vector matrix of the remaining matrix.
-*>
-*> (2R) If SQRE = 1, one extra Givens rotation to generate the right
-*>      null space.
-*>
-*> (3R) The inverse transformation of (2L).
-*>
-*> (4R) The inverse transformation of (1L).
-*> \endverbatim
-*
-*  Arguments:
-*  ==========
+*       SUBROUTINE ZUNMTR( SIDE, UPLO, TRANS, M, N, A, LDA, TAU, C, LDC,
+*                          WORK, LWORK, INFO )
 *
-*> \param[in] ICOMPQ
-*> \verbatim
-*>          ICOMPQ is INTEGER
-*>         Specifies whether singular vectors are to be computed in
-*>         factored form:
-*>         = 0: Left singular vector matrix.
-*>         = 1: Right singular vector matrix.
-*> \endverbatim
-*>
-*> \param[in] NL
-*> \verbatim
-*>          NL is INTEGER
-*>         The row dimension of the upper block. NL >= 1.
-*> \endverbatim
-*>
-*> \param[in] NR
-*> \verbatim
-*>          NR is INTEGER
-*>         The row dimension of the lower block. NR >= 1.
-*> \endverbatim
-*>
-*> \param[in] SQRE
-*> \verbatim
-*>          SQRE is INTEGER
-*>         = 0: the lower block is an NR-by-NR square matrix.
-*>         = 1: the lower block is an NR-by-(NR+1) rectangular matrix.
-*>
-*>         The bidiagonal matrix has row dimension N = NL + NR + 1,
-*>         and column dimension M = N + SQRE.
-*> \endverbatim
+*       .. Scalar Arguments ..
+*       CHARACTER          SIDE, TRANS, UPLO
+*       INTEGER            INFO, LDA, LDC, LWORK, M, N
+*       ..
+*       .. Array Arguments ..
+*       COMPLEX*16         A( LDA, * ), C( LDC, * ), TAU( * ), WORK( * )
+*       ..
+*
+*
+*> \par Purpose:
+*  =============
 *>
-*> \param[in] NRHS
 *> \verbatim
-*>          NRHS is INTEGER
-*>         The number of columns of B and BX. NRHS must be at least 1.
-*> \endverbatim
 *>
-*> \param[in,out] B
-*> \verbatim
-*>          B is COMPLEX*16 array, dimension ( LDB, NRHS )
-*>         On input, B contains the right hand sides of the least
-*>         squares problem in rows 1 through M. On output, B contains
-*>         the solution X in rows 1 through N.
-*> \endverbatim
+*> ZUNMTR overwrites the general complex M-by-N matrix C with
 *>
-*> \param[in] LDB
-*> \verbatim
-*>          LDB is INTEGER
-*>         The leading dimension of B. LDB must be at least
-*>         max(1,MAX( M, N ) ).
-*> \endverbatim
+*>                 SIDE = 'L'     SIDE = 'R'
+*> TRANS = 'N':      Q * C          C * Q
+*> TRANS = 'C':      Q**H * C       C * Q**H
 *>
-*> \param[out] BX
-*> \verbatim
-*>          BX is COMPLEX*16 array, dimension ( LDBX, NRHS )
-*> \endverbatim
+*> where Q is a complex unitary matrix of order nq, with nq = m if
+*> SIDE = 'L' and nq = n if SIDE = 'R'. Q is defined as the product of
+*> nq-1 elementary reflectors, as returned by ZHETRD:
 *>
-*> \param[in] LDBX
-*> \verbatim
-*>          LDBX is INTEGER
-*>         The leading dimension of BX.
-*> \endverbatim
+*> if UPLO = 'U', Q = H(nq-1) . . . H(2) H(1);
 *>
-*> \param[in] PERM
-*> \verbatim
-*>          PERM is INTEGER array, dimension ( N )
-*>         The permutations (from deflation and sorting) applied
-*>         to the two blocks.
+*> if UPLO = 'L', Q = H(1) H(2) . . . H(nq-1).
 *> \endverbatim
-*>
-*> \param[in] GIVPTR
+*
+*  Arguments:
+*  ==========
+*
+*> \param[in] SIDE
 *> \verbatim
-*>          GIVPTR is INTEGER
-*>         The number of Givens rotations which took place in this
-*>         subproblem.
+*>          SIDE is CHARACTER*1
+*>          = 'L': apply Q or Q**H from the Left;
+*>          = 'R': apply Q or Q**H from the Right.
 *> \endverbatim
 *>
-*> \param[in] GIVCOL
+*> \param[in] UPLO
 *> \verbatim
-*>          GIVCOL is INTEGER array, dimension ( LDGCOL, 2 )
-*>         Each pair of numbers indicates a pair of rows/columns
-*>         involved in a Givens rotation.
+*>          UPLO is CHARACTER*1
+*>          = 'U': Upper triangle of A contains elementary reflectors
+*>                 from ZHETRD;
+*>          = 'L': Lower triangle of A contains elementary reflectors
+*>                 from ZHETRD.
 *> \endverbatim
 *>
-*> \param[in] LDGCOL
+*> \param[in] TRANS
 *> \verbatim
-*>          LDGCOL is INTEGER
-*>         The leading dimension of GIVCOL, must be at least N.
+*>          TRANS is CHARACTER*1
+*>          = 'N':  No transpose, apply Q;
+*>          = 'C':  Conjugate transpose, apply Q**H.
 *> \endverbatim
 *>
-*> \param[in] GIVNUM
+*> \param[in] M
 *> \verbatim
-*>          GIVNUM is DOUBLE PRECISION array, dimension ( LDGNUM, 2 )
-*>         Each number indicates the C or S value used in the
-*>         corresponding Givens rotation.
+*>          M is INTEGER
+*>          The number of rows of the matrix C. M >= 0.
 *> \endverbatim
 *>
-*> \param[in] LDGNUM
+*> \param[in] N
 *> \verbatim
-*>          LDGNUM is INTEGER
-*>         The leading dimension of arrays DIFR, POLES and
-*>         GIVNUM, must be at least K.
+*>          N is INTEGER
+*>          The number of columns of the matrix C. N >= 0.
 *> \endverbatim
 *>
-*> \param[in] POLES
+*> \param[in] A
 *> \verbatim
-*>          POLES is DOUBLE PRECISION array, dimension ( LDGNUM, 2 )
-*>         On entry, POLES(1:K, 1) contains the new singular
-*>         values obtained from solving the secular equation, and
-*>         POLES(1:K, 2) is an array containing the poles in the secular
-*>         equation.
+*>          A is COMPLEX*16 array, dimension
+*>                               (LDA,M) if SIDE = 'L'
+*>                               (LDA,N) if SIDE = 'R'
+*>          The vectors which define the elementary reflectors, as
+*>          returned by ZHETRD.
 *> \endverbatim
 *>
-*> \param[in] DIFL
+*> \param[in] LDA
 *> \verbatim
-*>          DIFL is DOUBLE PRECISION array, dimension ( K ).
-*>         On entry, DIFL(I) is the distance between I-th updated
-*>         (undeflated) singular value and the I-th (undeflated) old
-*>         singular value.
+*>          LDA is INTEGER
+*>          The leading dimension of the array A.
+*>          LDA >= max(1,M) if SIDE = 'L'; LDA >= max(1,N) if SIDE = 'R'.
 *> \endverbatim
 *>
-*> \param[in] DIFR
+*> \param[in] TAU
 *> \verbatim
-*>          DIFR is DOUBLE PRECISION array, dimension ( LDGNUM, 2 ).
-*>         On entry, DIFR(I, 1) contains the distances between I-th
-*>         updated (undeflated) singular value and the I+1-th
-*>         (undeflated) old singular value. And DIFR(I, 2) is the
-*>         normalizing factor for the I-th right singular vector.
+*>          TAU is COMPLEX*16 array, dimension
+*>                               (M-1) if SIDE = 'L'
+*>                               (N-1) if SIDE = 'R'
+*>          TAU(i) must contain the scalar factor of the elementary
+*>          reflector H(i), as returned by ZHETRD.
 *> \endverbatim
 *>
-*> \param[in] Z
+*> \param[in,out] C
 *> \verbatim
-*>          Z is DOUBLE PRECISION array, dimension ( K )
-*>         Contain the components of the deflation-adjusted updating row
-*>         vector.
+*>          C is COMPLEX*16 array, dimension (LDC,N)
+*>          On entry, the M-by-N matrix C.
+*>          On exit, C is overwritten by Q*C or Q**H*C or C*Q**H or C*Q.
 *> \endverbatim
 *>
-*> \param[in] K
+*> \param[in] LDC
 *> \verbatim
-*>          K is INTEGER
-*>         Contains the dimension of the non-deflated matrix,
-*>         This is the order of the related secular equation. 1 <= K <=N.
+*>          LDC is INTEGER
+*>          The leading dimension of the array C. LDC >= max(1,M).
 *> \endverbatim
 *>
-*> \param[in] C
+*> \param[out] WORK
 *> \verbatim
-*>          C is DOUBLE PRECISION
-*>         C contains garbage if SQRE =0 and the C-value of a Givens
-*>         rotation related to the right null space if SQRE = 1.
+*>          WORK is COMPLEX*16 array, dimension (MAX(1,LWORK))
+*>          On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
 *> \endverbatim
 *>
-*> \param[in] S
+*> \param[in] LWORK
 *> \verbatim
-*>          S is DOUBLE PRECISION
-*>         S contains garbage if SQRE =0 and the S-value of a Givens
-*>         rotation related to the right null space if SQRE = 1.
-*> \endverbatim
+*>          LWORK is INTEGER
+*>          The dimension of the array WORK.
+*>          If SIDE = 'L', LWORK >= max(1,N);
+*>          if SIDE = 'R', LWORK >= max(1,M).
+*>          For optimum performance LWORK >= N*NB if SIDE = 'L', and
+*>          LWORK >=M*NB if SIDE = 'R', where NB is the optimal
+*>          blocksize.
 *>
-*> \param[out] RWORK
-*> \verbatim
-*>          RWORK is DOUBLE PRECISION array, dimension
-*>         ( K*(1+NRHS) + 2*NRHS )
+*>          If LWORK = -1, then a workspace query is assumed; the routine
+*>          only calculates the optimal size of the WORK array, returns
+*>          this value as the first entry of the WORK array, and no error
+*>          message related to LWORK is issued by XERBLA.
 *> \endverbatim
 *>
 *> \param[out] INFO
 *> \verbatim
 *>          INFO is INTEGER
-*>          = 0:  successful exit.
-*>          < 0:  if INFO = -i, the i-th argument had an illegal value.
+*>          = 0:  successful exit
+*>          < 0:  if INFO = -i, the i-th argument had an illegal value
 *> \endverbatim
 *
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date September 2012
+*> \date December 2016
 *
 *> \ingroup complex16OTHERcomputational
 *
-*> \par Contributors:
-*  ==================
-*>
-*>     Ming Gu and Ren-Cang Li, Computer Science Division, University of
-*>       California at Berkeley, USA \n
-*>     Osni Marques, LBNL/NERSC, USA \n
-*
 *  =====================================================================
-      SUBROUTINE ZLALS0( ICOMPQ, NL, NR, SQRE, NRHS, B, LDB, BX, LDBX,
-     $                   PERM, GIVPTR, GIVCOL, LDGCOL, GIVNUM, LDGNUM,
-     $                   POLES, DIFL, DIFR, Z, K, C, S, RWORK, INFO )
+      SUBROUTINE ZUNMTR( SIDE, UPLO, TRANS, M, N, A, LDA, TAU, C, LDC,
+     $                   WORK, LWORK, INFO )
 *
-*  -- LAPACK computational routine (version 3.4.2) --
+*  -- LAPACK computational routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     September 2012
+*     December 2016
 *
 *     .. Scalar Arguments ..
-      INTEGER            GIVPTR, ICOMPQ, INFO, K, LDB, LDBX, LDGCOL,
-     $                   LDGNUM, NL, NR, NRHS, SQRE
-      DOUBLE PRECISION   C, S
+      CHARACTER          SIDE, TRANS, UPLO
+      INTEGER            INFO, LDA, LDC, LWORK, M, N
 *     ..
 *     .. Array Arguments ..
-      INTEGER            GIVCOL( LDGCOL, * ), PERM( * )
-      DOUBLE PRECISION   DIFL( * ), DIFR( LDGNUM, * ),
-     $                   GIVNUM( LDGNUM, * ), POLES( LDGNUM, * ),
-     $                   RWORK( * ), Z( * )
-      COMPLEX*16         B( LDB, * ), BX( LDBX, * )
+      COMPLEX*16         A( LDA, * ), C( LDC, * ), TAU( * ), WORK( * )
 *     ..
 *
 *  =====================================================================
 *
-*     .. Parameters ..
-      DOUBLE PRECISION   ONE, ZERO, NEGONE
-      PARAMETER          ( ONE = 1.0D0, ZERO = 0.0D0, NEGONE = -1.0D0 )
-*     ..
 *     .. Local Scalars ..
-      INTEGER            I, J, JCOL, JROW, M, N, NLP1
-      DOUBLE PRECISION   DIFLJ, DIFRJ, DJ, DSIGJ, DSIGJP, TEMP
-*     ..
-*     .. External Subroutines ..
-      EXTERNAL           DGEMV, XERBLA, ZCOPY, ZDROT, ZDSCAL, ZLACPY,
-     $                   ZLASCL
+      LOGICAL            LEFT, LQUERY, UPPER
+      INTEGER            I1, I2, IINFO, LWKOPT, MI, NB, NI, NQ, NW
 *     ..
 *     .. External Functions ..
-      DOUBLE PRECISION   DLAMC3, DNRM2
-      EXTERNAL           DLAMC3, DNRM2
+      LOGICAL            LSAME
+      INTEGER            ILAENV
+      EXTERNAL           LSAME, ILAENV
+*     ..
+*     .. External Subroutines ..
+      EXTERNAL           XERBLA, ZUNMQL, ZUNMQR
 *     ..
 *     .. Intrinsic Functions ..
-      INTRINSIC          DBLE, DCMPLX, DIMAG, MAX
+      INTRINSIC          MAX
 *     ..
 *     .. Executable Statements ..
 *
-*     Test the input parameters.
+*     Test the input arguments
 *
       INFO = 0
+      LEFT = LSAME( SIDE, 'L' )
+      UPPER = LSAME( UPLO, 'U' )
+      LQUERY = ( LWORK.EQ.-1 )
 *
-      IF( ( ICOMPQ.LT.0 ) .OR. ( ICOMPQ.GT.1 ) ) THEN
+*     NQ is the order of Q and NW is the minimum dimension of WORK
+*
+      IF( LEFT ) THEN
+         NQ = M
+         NW = N
+      ELSE
+         NQ = N
+         NW = M
+      END IF
+      IF( .NOT.LEFT .AND. .NOT.LSAME( SIDE, 'R' ) ) THEN
          INFO = -1
-      ELSE IF( NL.LT.1 ) THEN
+      ELSE IF( .NOT.UPPER .AND. .NOT.LSAME( UPLO, 'L' ) ) THEN
          INFO = -2
-      ELSE IF( NR.LT.1 ) THEN
+      ELSE IF( .NOT.LSAME( TRANS, 'N' ) .AND. .NOT.LSAME( TRANS, 'C' ) )
+     $          THEN
          INFO = -3
-      ELSE IF( ( SQRE.LT.0 ) .OR. ( SQRE.GT.1 ) ) THEN
+      ELSE IF( M.LT.0 ) THEN
          INFO = -4
-      END IF
-*
-      N = NL + NR + 1
-*
-      IF( NRHS.LT.1 ) THEN
+      ELSE IF( N.LT.0 ) THEN
          INFO = -5
-      ELSE IF( LDB.LT.N ) THEN
+      ELSE IF( LDA.LT.MAX( 1, NQ ) ) THEN
          INFO = -7
-      ELSE IF( LDBX.LT.N ) THEN
-         INFO = -9
-      ELSE IF( GIVPTR.LT.0 ) THEN
-         INFO = -11
-      ELSE IF( LDGCOL.LT.N ) THEN
-         INFO = -13
-      ELSE IF( LDGNUM.LT.N ) THEN
-         INFO = -15
-      ELSE IF( K.LT.1 ) THEN
-         INFO = -20
-      END IF
-      IF( INFO.NE.0 ) THEN
-         CALL XERBLA( 'ZLALS0', -INFO )
-         RETURN
+      ELSE IF( LDC.LT.MAX( 1, M ) ) THEN
+         INFO = -10
+      ELSE IF( LWORK.LT.MAX( 1, NW ) .AND. .NOT.LQUERY ) THEN
+         INFO = -12
       END IF
 *
-      M = N + SQRE
-      NLP1 = NL + 1
-*
-      IF( ICOMPQ.EQ.0 ) THEN
-*
-*        Apply back orthogonal transformations from the left.
-*
-*        Step (1L): apply back the Givens rotations performed.
-*
-         DO 10 I = 1, GIVPTR
-            CALL ZDROT( NRHS, B( GIVCOL( I, 2 ), 1 ), LDB,
-     $                  B( GIVCOL( I, 1 ), 1 ), LDB, GIVNUM( I, 2 ),
-     $                  GIVNUM( I, 1 ) )
-   10    CONTINUE
-*
-*        Step (2L): permute rows of B.
-*
-         CALL ZCOPY( NRHS, B( NLP1, 1 ), LDB, BX( 1, 1 ), LDBX )
-         DO 20 I = 2, N
-            CALL ZCOPY( NRHS, B( PERM( I ), 1 ), LDB, BX( I, 1 ), LDBX )
-   20    CONTINUE
-*
-*        Step (3L): apply the inverse of the left singular vector
-*        matrix to BX.
-*
-         IF( K.EQ.1 ) THEN
-            CALL ZCOPY( NRHS, BX, LDBX, B, LDB )
-            IF( Z( 1 ).LT.ZERO ) THEN
-               CALL ZDSCAL( NRHS, NEGONE, B, LDB )
+      IF( INFO.EQ.0 ) THEN
+         IF( UPPER ) THEN
+            IF( LEFT ) THEN
+               NB = ILAENV( 1, 'ZUNMQL', SIDE // TRANS, M-1, N, M-1,
+     $              -1 )
+            ELSE
+               NB = ILAENV( 1, 'ZUNMQL', SIDE // TRANS, M, N-1, N-1,
+     $              -1 )
             END IF
          ELSE
-            DO 100 J = 1, K
-               DIFLJ = DIFL( J )
-               DJ = POLES( J, 1 )
-               DSIGJ = -POLES( J, 2 )
-               IF( J.LT.K ) THEN
-                  DIFRJ = -DIFR( J, 1 )
-                  DSIGJP = -POLES( J+1, 2 )
-               END IF
-               IF( ( Z( J ).EQ.ZERO ) .OR. ( POLES( J, 2 ).EQ.ZERO ) )
-     $              THEN
-                  RWORK( J ) = ZERO
-               ELSE
-                  RWORK( J ) = -POLES( J, 2 )*Z( J ) / DIFLJ /
-     $                         ( POLES( J, 2 )+DJ )
-               END IF
-               DO 30 I = 1, J - 1
-                  IF( ( Z( I ).EQ.ZERO ) .OR.
-     $                ( POLES( I, 2 ).EQ.ZERO ) ) THEN
-                     RWORK( I ) = ZERO
-                  ELSE
-                     RWORK( I ) = POLES( I, 2 )*Z( I ) /
-     $                            ( DLAMC3( POLES( I, 2 ), DSIGJ )-
-     $                            DIFLJ ) / ( POLES( I, 2 )+DJ )
-                  END IF
-   30          CONTINUE
-               DO 40 I = J + 1, K
-                  IF( ( Z( I ).EQ.ZERO ) .OR.
-     $                ( POLES( I, 2 ).EQ.ZERO ) ) THEN
-                     RWORK( I ) = ZERO
-                  ELSE
-                     RWORK( I ) = POLES( I, 2 )*Z( I ) /
-     $                            ( DLAMC3( POLES( I, 2 ), DSIGJP )+
-     $                            DIFRJ ) / ( POLES( I, 2 )+DJ )
-                  END IF
-   40          CONTINUE
-               RWORK( 1 ) = NEGONE
-               TEMP = DNRM2( K, RWORK, 1 )
-*
-*              Since B and BX are complex, the following call to DGEMV
-*              is performed in two steps (real and imaginary parts).
-*
-*              CALL DGEMV( 'T', K, NRHS, ONE, BX, LDBX, WORK, 1, ZERO,
-*    $                     B( J, 1 ), LDB )
-*
-               I = K + NRHS*2
-               DO 60 JCOL = 1, NRHS
-                  DO 50 JROW = 1, K
-                     I = I + 1
-                     RWORK( I ) = DBLE( BX( JROW, JCOL ) )
-   50             CONTINUE
-   60          CONTINUE
-               CALL DGEMV( 'T', K, NRHS, ONE, RWORK( 1+K+NRHS*2 ), K,
-     $                     RWORK( 1 ), 1, ZERO, RWORK( 1+K ), 1 )
-               I = K + NRHS*2
-               DO 80 JCOL = 1, NRHS
-                  DO 70 JROW = 1, K
-                     I = I + 1
-                     RWORK( I ) = DIMAG( BX( JROW, JCOL ) )
-   70             CONTINUE
-   80          CONTINUE
-               CALL DGEMV( 'T', K, NRHS, ONE, RWORK( 1+K+NRHS*2 ), K,
-     $                     RWORK( 1 ), 1, ZERO, RWORK( 1+K+NRHS ), 1 )
-               DO 90 JCOL = 1, NRHS
-                  B( J, JCOL ) = DCMPLX( RWORK( JCOL+K ),
-     $                           RWORK( JCOL+K+NRHS ) )
-   90          CONTINUE
-               CALL ZLASCL( 'G', 0, 0, TEMP, ONE, 1, NRHS, B( J, 1 ),
-     $                      LDB, INFO )
-  100       CONTINUE
+            IF( LEFT ) THEN
+               NB = ILAENV( 1, 'ZUNMQR', SIDE // TRANS, M-1, N, M-1,
+     $              -1 )
+            ELSE
+               NB = ILAENV( 1, 'ZUNMQR', SIDE // TRANS, M, N-1, N-1,
+     $              -1 )
+            END IF
          END IF
+         LWKOPT = MAX( 1, NW )*NB
+         WORK( 1 ) = LWKOPT
+      END IF
 *
-*        Move the deflated rows of BX to B also.
-*
-         IF( K.LT.MAX( M, N ) )
-     $      CALL ZLACPY( 'A', N-K, NRHS, BX( K+1, 1 ), LDBX,
-     $                   B( K+1, 1 ), LDB )
-      ELSE
-*
-*        Apply back the right orthogonal transformations.
-*
-*        Step (1R): apply back the new right singular vector matrix
-*        to B.
+      IF( INFO.NE.0 ) THEN
+         CALL XERBLA( 'ZUNMTR', -INFO )
+         RETURN
+      ELSE IF( LQUERY ) THEN
+         RETURN
+      END IF
 *
-         IF( K.EQ.1 ) THEN
-            CALL ZCOPY( NRHS, B, LDB, BX, LDBX )
-         ELSE
-            DO 180 J = 1, K
-               DSIGJ = POLES( J, 2 )
-               IF( Z( J ).EQ.ZERO ) THEN
-                  RWORK( J ) = ZERO
-               ELSE
-                  RWORK( J ) = -Z( J ) / DIFL( J ) /
-     $                         ( DSIGJ+POLES( J, 1 ) ) / DIFR( J, 2 )
-               END IF
-               DO 110 I = 1, J - 1
-                  IF( Z( J ).EQ.ZERO ) THEN
-                     RWORK( I ) = ZERO
-                  ELSE
-                     RWORK( I ) = Z( J ) / ( DLAMC3( DSIGJ, -POLES( I+1,
-     $                            2 ) )-DIFR( I, 1 ) ) /
-     $                            ( DSIGJ+POLES( I, 1 ) ) / DIFR( I, 2 )
-                  END IF
-  110          CONTINUE
-               DO 120 I = J + 1, K
-                  IF( Z( J ).EQ.ZERO ) THEN
-                     RWORK( I ) = ZERO
-                  ELSE
-                     RWORK( I ) = Z( J ) / ( DLAMC3( DSIGJ, -POLES( I,
-     $                            2 ) )-DIFL( I ) ) /
-     $                            ( DSIGJ+POLES( I, 1 ) ) / DIFR( I, 2 )
-                  END IF
-  120          CONTINUE
+*     Quick return if possible
 *
-*              Since B and BX are complex, the following call to DGEMV
-*              is performed in two steps (real and imaginary parts).
+      IF( M.EQ.0 .OR. N.EQ.0 .OR. NQ.EQ.1 ) THEN
+         WORK( 1 ) = 1
+         RETURN
+      END IF
 *
-*              CALL DGEMV( 'T', K, NRHS, ONE, B, LDB, WORK, 1, ZERO,
-*    $                     BX( J, 1 ), LDBX )
+      IF( LEFT ) THEN
+         MI = M - 1
+         NI = N
+      ELSE
+         MI = M
+         NI = N - 1
+      END IF
 *
-               I = K + NRHS*2
-               DO 140 JCOL = 1, NRHS
-                  DO 130 JROW = 1, K
-                     I = I + 1
-                     RWORK( I ) = DBLE( B( JROW, JCOL ) )
-  130             CONTINUE
-  140          CONTINUE
-               CALL DGEMV( 'T', K, NRHS, ONE, RWORK( 1+K+NRHS*2 ), K,
-     $                     RWORK( 1 ), 1, ZERO, RWORK( 1+K ), 1 )
-               I = K + NRHS*2
-               DO 160 JCOL = 1, NRHS
-                  DO 150 JROW = 1, K
-                     I = I + 1
-                     RWORK( I ) = DIMAG( B( JROW, JCOL ) )
-  150             CONTINUE
-  160          CONTINUE
-               CALL DGEMV( 'T', K, NRHS, ONE, RWORK( 1+K+NRHS*2 ), K,
-     $                     RWORK( 1 ), 1, ZERO, RWORK( 1+K+NRHS ), 1 )
-               DO 170 JCOL = 1, NRHS
-                  BX( J, JCOL ) = DCMPLX( RWORK( JCOL+K ),
-     $                            RWORK( JCOL+K+NRHS ) )
-  170          CONTINUE
-  180       CONTINUE
-         END IF
+      IF( UPPER ) THEN
 *
-*        Step (2R): if SQRE = 1, apply back the rotation that is
-*        related to the right null space of the subproblem.
+*        Q was determined by a call to ZHETRD with UPLO = 'U'
 *
-         IF( SQRE.EQ.1 ) THEN
-            CALL ZCOPY( NRHS, B( M, 1 ), LDB, BX( M, 1 ), LDBX )
-            CALL ZDROT( NRHS, BX( 1, 1 ), LDBX, BX( M, 1 ), LDBX, C, S )
-         END IF
-         IF( K.LT.MAX( M, N ) )
-     $      CALL ZLACPY( 'A', N-K, NRHS, B( K+1, 1 ), LDB, BX( K+1, 1 ),
-     $                   LDBX )
+         CALL ZUNMQL( SIDE, TRANS, MI, NI, NQ-1, A( 1, 2 ), LDA, TAU, C,
+     $                LDC, WORK, LWORK, IINFO )
+      ELSE
 *
-*        Step (3R): permute rows of B.
+*        Q was determined by a call to ZHETRD with UPLO = 'L'
 *
-         CALL ZCOPY( NRHS, BX( 1, 1 ), LDBX, B( NLP1, 1 ), LDB )
-         IF( SQRE.EQ.1 ) THEN
-            CALL ZCOPY( NRHS, BX( M, 1 ), LDBX, B( M, 1 ), LDB )
+         IF( LEFT ) THEN
+            I1 = 2
+            I2 = 1
+         ELSE
+            I1 = 1
+            I2 = 2
          END IF
-         DO 190 I = 2, N
-            CALL ZCOPY( NRHS, BX( I, 1 ), LDBX, B( PERM( I ), 1 ), LDB )
-  190    CONTINUE
-*
-*        Step (4R): apply back the Givens rotations performed.
-*
-         DO 200 I = GIVPTR, 1, -1
-            CALL ZDROT( NRHS, B( GIVCOL( I, 2 ), 1 ), LDB,
-     $                  B( GIVCOL( I, 1 ), 1 ), LDB, GIVNUM( I, 2 ),
-     $                  -GIVNUM( I, 1 ) )
-  200    CONTINUE
+         CALL ZUNMQR( SIDE, TRANS, MI, NI, NQ-1, A( 2, 1 ), LDA, TAU,
+     $                C( I1, I2 ), LDC, WORK, LWORK, IINFO )
       END IF
-*
+      WORK( 1 ) = LWKOPT
       RETURN
 *
-*     End of ZLALS0
+*     End of ZUNMTR
 *
       END
diff --git a/src/modules/lapack/dlamch.f b/src/modules/lapack/dlamch.f
index 844683e..dfb461b 100644
--- a/src/modules/lapack/dlamch.f
+++ b/src/modules/lapack/dlamch.f
@@ -2,14 +2,14 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *  Definition:
 *  ===========
 *
 *      DOUBLE PRECISION FUNCTION DLAMCH( CMACH )
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -51,22 +51,22 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date November 2011
+*> \date December 2016
 *
 *> \ingroup auxOTHERauxiliary
 *
 *  =====================================================================
       DOUBLE PRECISION FUNCTION DLAMCH( CMACH )
 *
-*  -- LAPACK auxiliary routine (version 3.4.0) --
+*  -- LAPACK auxiliary routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     November 2011
+*     December 2016
 *
 *     .. Scalar Arguments ..
       CHARACTER*1        CMACH
@@ -151,7 +151,7 @@
 *> might hold one of these in a register.
 *> \endverbatim
 *> \author LAPACK is a software package provided by Univ. of Tennessee, Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..
-*> \date November 2011
+*> \date December 2016
 *> \ingroup auxOTHERauxiliary
 *>
 *> \param[in] A
@@ -167,7 +167,7 @@
 *>
       DOUBLE PRECISION FUNCTION DLAMC3( A, B )
 *
-*  -- LAPACK auxiliary routine (version 3.4.0) --
+*  -- LAPACK auxiliary routine (version 3.7.0) --
 *     Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
 *     November 2010
 *
diff --git a/src/modules/lapack/dlapack.f b/src/modules/lapack/dlapack.f
index 6fc40cf..39c165b 100644
--- a/src/modules/lapack/dlapack.f
+++ b/src/modules/lapack/dlapack.f
@@ -2,18 +2,18 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DBBCSD + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dbbcsd.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dbbcsd.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dbbcsd.f"> 
+*> Download DBBCSD + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dbbcsd.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dbbcsd.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dbbcsd.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
@@ -22,7 +22,7 @@
 *                          THETA, PHI, U1, LDU1, U2, LDU2, V1T, LDV1T,
 *                          V2T, LDV2T, B11D, B11E, B12D, B12E, B21D, B21E,
 *                          B22D, B22E, WORK, LWORK, INFO )
-* 
+*
 *       .. Scalar Arguments ..
 *       CHARACTER          JOBU1, JOBU2, JOBV1T, JOBV2T, TRANS
 *       INTEGER            INFO, LDU1, LDU2, LDV1T, LDV2T, LWORK, M, P, Q
@@ -34,7 +34,7 @@
 *       DOUBLE PRECISION   U1( LDU1, * ), U2( LDU2, * ), V1T( LDV1T, * ),
 *      $                   V2T( LDV2T, * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -149,7 +149,7 @@
 *> \param[in,out] U1
 *> \verbatim
 *>          U1 is DOUBLE PRECISION array, dimension (LDU1,P)
-*>          On entry, an LDU1-by-P matrix. On exit, U1 is postmultiplied
+*>          On entry, a P-by-P matrix. On exit, U1 is postmultiplied
 *>          by the left singular vector matrix common to [ B11 ; 0 ] and
 *>          [ B12 0 0 ; 0 -I 0 0 ].
 *> \endverbatim
@@ -157,13 +157,13 @@
 *> \param[in] LDU1
 *> \verbatim
 *>          LDU1 is INTEGER
-*>          The leading dimension of the array U1.
+*>          The leading dimension of the array U1, LDU1 >= MAX(1,P).
 *> \endverbatim
 *>
 *> \param[in,out] U2
 *> \verbatim
 *>          U2 is DOUBLE PRECISION array, dimension (LDU2,M-P)
-*>          On entry, an LDU2-by-(M-P) matrix. On exit, U2 is
+*>          On entry, an (M-P)-by-(M-P) matrix. On exit, U2 is
 *>          postmultiplied by the left singular vector matrix common to
 *>          [ B21 ; 0 ] and [ B22 0 0 ; 0 0 I ].
 *> \endverbatim
@@ -171,13 +171,13 @@
 *> \param[in] LDU2
 *> \verbatim
 *>          LDU2 is INTEGER
-*>          The leading dimension of the array U2.
+*>          The leading dimension of the array U2, LDU2 >= MAX(1,M-P).
 *> \endverbatim
 *>
 *> \param[in,out] V1T
 *> \verbatim
 *>          V1T is DOUBLE PRECISION array, dimension (LDV1T,Q)
-*>          On entry, a LDV1T-by-Q matrix. On exit, V1T is premultiplied
+*>          On entry, a Q-by-Q matrix. On exit, V1T is premultiplied
 *>          by the transpose of the right singular vector
 *>          matrix common to [ B11 ; 0 ] and [ B21 ; 0 ].
 *> \endverbatim
@@ -185,13 +185,13 @@
 *> \param[in] LDV1T
 *> \verbatim
 *>          LDV1T is INTEGER
-*>          The leading dimension of the array V1T.
+*>          The leading dimension of the array V1T, LDV1T >= MAX(1,Q).
 *> \endverbatim
 *>
 *> \param[in,out] V2T
 *> \verbatim
 *>          V2T is DOUBLE PRECISION array, dimenison (LDV2T,M-Q)
-*>          On entry, a LDV2T-by-(M-Q) matrix. On exit, V2T is
+*>          On entry, an (M-Q)-by-(M-Q) matrix. On exit, V2T is
 *>          premultiplied by the transpose of the right
 *>          singular vector matrix common to [ B12 0 0 ; 0 -I 0 ] and
 *>          [ B22 0 0 ; 0 0 I ].
@@ -200,7 +200,7 @@
 *> \param[in] LDV2T
 *> \verbatim
 *>          LDV2T is INTEGER
-*>          The leading dimension of the array V2T.
+*>          The leading dimension of the array V2T, LDV2T >= MAX(1,M-Q).
 *> \endverbatim
 *>
 *> \param[out] B11D
@@ -240,8 +240,8 @@
 *> \param[out] B21D
 *> \verbatim
 *>          B21D is DOUBLE PRECISION  array, dimension (Q)
-*>          When CBBCSD converges, B21D contains the negative sines of
-*>          THETA(1), ..., THETA(Q). If CBBCSD fails to converge, then
+*>          When DBBCSD converges, B21D contains the negative sines of
+*>          THETA(1), ..., THETA(Q). If DBBCSD fails to converge, then
 *>          B21D contains the diagonal of the partially reduced bottom-left
 *>          block.
 *> \endverbatim
@@ -249,7 +249,7 @@
 *> \param[out] B21E
 *> \verbatim
 *>          B21E is DOUBLE PRECISION  array, dimension (Q-1)
-*>          When CBBCSD converges, B21E contains zeros. If CBBCSD fails
+*>          When DBBCSD converges, B21E contains zeros. If DBBCSD fails
 *>          to converge, then B21E contains the subdiagonal of the
 *>          partially reduced bottom-left block.
 *> \endverbatim
@@ -257,8 +257,8 @@
 *> \param[out] B22D
 *> \verbatim
 *>          B22D is DOUBLE PRECISION  array, dimension (Q)
-*>          When CBBCSD converges, B22D contains the negative sines of
-*>          THETA(1), ..., THETA(Q). If CBBCSD fails to converge, then
+*>          When DBBCSD converges, B22D contains the negative sines of
+*>          THETA(1), ..., THETA(Q). If DBBCSD fails to converge, then
 *>          B22D contains the diagonal of the partially reduced bottom-right
 *>          block.
 *> \endverbatim
@@ -266,7 +266,7 @@
 *> \param[out] B22E
 *> \verbatim
 *>          B22E is DOUBLE PRECISION  array, dimension (Q-1)
-*>          When CBBCSD converges, B22E contains zeros. If CBBCSD fails
+*>          When DBBCSD converges, B22E contains zeros. If DBBCSD fails
 *>          to converge, then B22E contains the subdiagonal of the
 *>          partially reduced bottom-right block.
 *> \endverbatim
@@ -317,12 +317,12 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date November 2013
+*> \date June 2016
 *
 *> \ingroup doubleOTHERcomputational
 *
@@ -332,10 +332,10 @@
      $                   V2T, LDV2T, B11D, B11E, B12D, B12E, B21D, B21E,
      $                   B22D, B22E, WORK, LWORK, INFO )
 *
-*  -- LAPACK computational routine (version 3.5.0) --
+*  -- LAPACK computational routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     November 2013
+*     June 2016
 *
 *     .. Scalar Arguments ..
       CHARACTER          JOBU1, JOBU2, JOBV1T, JOBV2T, TRANS
@@ -1082,25 +1082,25 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DBDSDC + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dbdsdc.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dbdsdc.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dbdsdc.f"> 
+*> Download DBDSDC + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dbdsdc.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dbdsdc.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dbdsdc.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       SUBROUTINE DBDSDC( UPLO, COMPQ, N, D, E, U, LDU, VT, LDVT, Q, IQ,
 *                          WORK, IWORK, INFO )
-* 
+*
 *       .. Scalar Arguments ..
 *       CHARACTER          COMPQ, UPLO
 *       INTEGER            INFO, LDU, LDVT, N
@@ -1110,7 +1110,7 @@
 *       DOUBLE PRECISION   D( * ), E( * ), Q( * ), U( LDU, * ),
 *      $                   VT( LDVT, * ), WORK( * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -1266,12 +1266,12 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date November 2011
+*> \date June 2016
 *
 *> \ingroup auxOTHERcomputational
 *
@@ -1285,10 +1285,10 @@
       SUBROUTINE DBDSDC( UPLO, COMPQ, N, D, E, U, LDU, VT, LDVT, Q, IQ,
      $                   WORK, IWORK, INFO )
 *
-*  -- LAPACK computational routine (version 3.4.0) --
+*  -- LAPACK computational routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     November 2011
+*     June 2016
 *
 *     .. Scalar Arguments ..
       CHARACTER          COMPQ, UPLO
@@ -1391,7 +1391,7 @@
       WSTART = 1
       QSTART = 3
       IF( ICOMPQ.EQ.1 ) THEN
-         CALL DCOPY( N, D, 1, Q( 1 ), 1 )
+         CALL DCOPY( N,   D, 1, Q( 1 ),   1 )
          CALL DCOPY( N-1, E, 1, Q( N+1 ), 1 )
       END IF
       IF( IUPLO.EQ.2 ) THEN
@@ -1415,8 +1415,11 @@
 *     If ICOMPQ = 0, use DLASDQ to compute the singular values.
 *
       IF( ICOMPQ.EQ.0 ) THEN
+*        Ignore WSTART, instead using WORK( 1 ), since the two vectors
+*        for CS and -SN above are added only if ICOMPQ == 2,
+*        and adding them exceeds documented WORK size of 4*n.
          CALL DLASDQ( 'U', 0, N, 0, 0, 0, D, E, VT, LDVT, U, LDU, U,
-     $                LDU, WORK( WSTART ), INFO )
+     $                LDU, WORK( 1 ), INFO )
          GO TO 40
       END IF
 *
@@ -1492,24 +1495,24 @@
       DO 30 I = 1, NM1
          IF( ( ABS( E( I ) ).LT.EPS ) .OR. ( I.EQ.NM1 ) ) THEN
 *
-*        Subproblem found. First determine its size and then
-*        apply divide and conquer on it.
+*           Subproblem found. First determine its size and then
+*           apply divide and conquer on it.
 *
             IF( I.LT.NM1 ) THEN
 *
-*        A subproblem with E(I) small for I < NM1.
+*              A subproblem with E(I) small for I < NM1.
 *
                NSIZE = I - START + 1
             ELSE IF( ABS( E( I ) ).GE.EPS ) THEN
 *
-*        A subproblem with E(NM1) not too small but I = NM1.
+*              A subproblem with E(NM1) not too small but I = NM1.
 *
                NSIZE = N - START + 1
             ELSE
 *
-*        A subproblem with E(NM1) small. This implies an
-*        1-by-1 subproblem at D(N). Solve this 1-by-1 problem
-*        first.
+*              A subproblem with E(NM1) small. This implies an
+*              1-by-1 subproblem at D(N). Solve this 1-by-1 problem
+*              first.
 *
                NSIZE = I - START + 1
                IF( ICOMPQ.EQ.2 ) THEN
@@ -1603,25 +1606,25 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DBDSQR + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dbdsqr.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dbdsqr.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dbdsqr.f"> 
+*> Download DBDSQR + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dbdsqr.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dbdsqr.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dbdsqr.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       SUBROUTINE DBDSQR( UPLO, N, NCVT, NRU, NCC, D, E, VT, LDVT, U,
 *                          LDU, C, LDC, WORK, INFO )
-* 
+*
 *       .. Scalar Arguments ..
 *       CHARACTER          UPLO
 *       INTEGER            INFO, LDC, LDU, LDVT, N, NCC, NCVT, NRU
@@ -1630,7 +1633,7 @@
 *       DOUBLE PRECISION   C( LDC, * ), D( * ), E( * ), U( LDU, * ),
 *      $                   VT( LDVT, * ), WORK( * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -1641,9 +1644,9 @@
 *> left singular vectors from the singular value decomposition (SVD) of
 *> a real N-by-N (upper or lower) bidiagonal matrix B using the implicit
 *> zero-shift QR algorithm.  The SVD of B has the form
-*> 
+*>
 *>    B = Q * S * P**T
-*> 
+*>
 *> where S is the diagonal matrix of singular values, Q is an orthogonal
 *> matrix of left singular vectors, and P is an orthogonal matrix of
 *> right singular vectors.  If left singular vectors are requested, this
@@ -1714,7 +1717,7 @@
 *> \verbatim
 *>          E is DOUBLE PRECISION array, dimension (N-1)
 *>          On entry, the N-1 offdiagonal elements of the bidiagonal
-*>          matrix B. 
+*>          matrix B.
 *>          On exit, if INFO = 0, E is destroyed; if INFO > 0, D and E
 *>          will contain the diagonal and superdiagonal elements of a
 *>          bidiagonal matrix orthogonally equivalent to the one given
@@ -1780,7 +1783,7 @@
 *>                = 1, a split was marked by a positive value in E
 *>                = 2, current block of Z not diagonalized after 30*N
 *>                     iterations (in inner while loop)
-*>                = 3, termination criterion of outer while loop not met 
+*>                = 3, termination criterion of outer while loop not met
 *>                     (program created more than N unreduced blocks)
 *>             else NCVT = NRU = NCC = 0,
 *>                   the algorithm did not converge; D and E contain the
@@ -1818,12 +1821,12 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date November 2011
+*> \date December 2016
 *
 *> \ingroup auxOTHERcomputational
 *
@@ -1831,10 +1834,10 @@
       SUBROUTINE DBDSQR( UPLO, N, NCVT, NRU, NCC, D, E, VT, LDVT, U,
      $                   LDU, C, LDC, WORK, INFO )
 *
-*  -- LAPACK computational routine (version 3.4.0) --
+*  -- LAPACK computational routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     November 2011
+*     December 2016
 *
 *     .. Scalar Arguments ..
       CHARACTER          UPLO
@@ -1930,7 +1933,7 @@
          CALL DLASQ1( N, D, E, WORK, INFO )
 *
 *     If INFO equals 2, dqds didn't finish, try to finish
-*         
+*
          IF( INFO .NE. 2 ) RETURN
          INFO = 0
       END IF
@@ -2453,24 +2456,24 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DDISNA + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/ddisna.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/ddisna.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/ddisna.f"> 
+*> Download DDISNA + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/ddisna.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/ddisna.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/ddisna.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       SUBROUTINE DDISNA( JOB, M, N, D, SEP, INFO )
-* 
+*
 *       .. Scalar Arguments ..
 *       CHARACTER          JOB
 *       INTEGER            INFO, M, N
@@ -2478,7 +2481,7 @@
 *       .. Array Arguments ..
 *       DOUBLE PRECISION   D( * ), SEP( * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -2556,22 +2559,22 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date November 2011
+*> \date December 2016
 *
 *> \ingroup auxOTHERcomputational
 *
 *  =====================================================================
       SUBROUTINE DDISNA( JOB, M, N, D, SEP, INFO )
 *
-*  -- LAPACK computational routine (version 3.4.0) --
+*  -- LAPACK computational routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     November 2011
+*     December 2016
 *
 *     .. Scalar Arguments ..
       CHARACTER          JOB
@@ -2698,25 +2701,25 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DGBBRD + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dgbbrd.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dgbbrd.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dgbbrd.f"> 
+*> Download DGBBRD + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dgbbrd.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dgbbrd.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dgbbrd.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       SUBROUTINE DGBBRD( VECT, M, N, NCC, KL, KU, AB, LDAB, D, E, Q,
 *                          LDQ, PT, LDPT, C, LDC, WORK, INFO )
-* 
+*
 *       .. Scalar Arguments ..
 *       CHARACTER          VECT
 *       INTEGER            INFO, KL, KU, LDAB, LDC, LDPT, LDQ, M, N, NCC
@@ -2725,7 +2728,7 @@
 *       DOUBLE PRECISION   AB( LDAB, * ), C( LDC, * ), D( * ), E( * ),
 *      $                   PT( LDPT, * ), Q( LDQ, * ), WORK( * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -2870,12 +2873,12 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date November 2011
+*> \date December 2016
 *
 *> \ingroup doubleGBcomputational
 *
@@ -2883,10 +2886,10 @@
       SUBROUTINE DGBBRD( VECT, M, N, NCC, KL, KU, AB, LDAB, D, E, Q,
      $                   LDQ, PT, LDPT, C, LDC, WORK, INFO )
 *
-*  -- LAPACK computational routine (version 3.4.0) --
+*  -- LAPACK computational routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     November 2011
+*     December 2016
 *
 *     .. Scalar Arguments ..
       CHARACTER          VECT
@@ -3245,25 +3248,25 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DGBCON + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dgbcon.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dgbcon.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dgbcon.f"> 
+*> Download DGBCON + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dgbcon.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dgbcon.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dgbcon.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       SUBROUTINE DGBCON( NORM, N, KL, KU, AB, LDAB, IPIV, ANORM, RCOND,
 *                          WORK, IWORK, INFO )
-* 
+*
 *       .. Scalar Arguments ..
 *       CHARACTER          NORM
 *       INTEGER            INFO, KL, KU, LDAB, N
@@ -3273,7 +3276,7 @@
 *       INTEGER            IPIV( * ), IWORK( * )
 *       DOUBLE PRECISION   AB( LDAB, * ), WORK( * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -3376,12 +3379,12 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date November 2011
+*> \date December 2016
 *
 *> \ingroup doubleGBcomputational
 *
@@ -3389,10 +3392,10 @@
       SUBROUTINE DGBCON( NORM, N, KL, KU, AB, LDAB, IPIV, ANORM, RCOND,
      $                   WORK, IWORK, INFO )
 *
-*  -- LAPACK computational routine (version 3.4.0) --
+*  -- LAPACK computational routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     November 2011
+*     December 2016
 *
 *     .. Scalar Arguments ..
       CHARACTER          NORM
@@ -3556,25 +3559,25 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DGBEQU + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dgbequ.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dgbequ.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dgbequ.f"> 
+*> Download DGBEQU + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dgbequ.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dgbequ.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dgbequ.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       SUBROUTINE DGBEQU( M, N, KL, KU, AB, LDAB, R, C, ROWCND, COLCND,
 *                          AMAX, INFO )
-* 
+*
 *       .. Scalar Arguments ..
 *       INTEGER            INFO, KL, KU, LDAB, M, N
 *       DOUBLE PRECISION   AMAX, COLCND, ROWCND
@@ -3582,7 +3585,7 @@
 *       .. Array Arguments ..
 *       DOUBLE PRECISION   AB( LDAB, * ), C( * ), R( * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -3694,12 +3697,12 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date November 2011
+*> \date December 2016
 *
 *> \ingroup doubleGBcomputational
 *
@@ -3707,10 +3710,10 @@
       SUBROUTINE DGBEQU( M, N, KL, KU, AB, LDAB, R, C, ROWCND, COLCND,
      $                   AMAX, INFO )
 *
-*  -- LAPACK computational routine (version 3.4.0) --
+*  -- LAPACK computational routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     November 2011
+*     December 2016
 *
 *     .. Scalar Arguments ..
       INTEGER            INFO, KL, KU, LDAB, M, N
@@ -3880,25 +3883,25 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DGBEQUB + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dgbequb.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dgbequb.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dgbequb.f"> 
+*> Download DGBEQUB + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dgbequb.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dgbequb.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dgbequb.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       SUBROUTINE DGBEQUB( M, N, KL, KU, AB, LDAB, R, C, ROWCND, COLCND,
 *                           AMAX, INFO )
-* 
+*
 *       .. Scalar Arguments ..
 *       INTEGER            INFO, KL, KU, LDAB, M, N
 *       DOUBLE PRECISION   AMAX, COLCND, ROWCND
@@ -3906,7 +3909,7 @@
 *       .. Array Arguments ..
 *       DOUBLE PRECISION   AB( LDAB, * ), C( * ), R( * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -3926,9 +3929,9 @@
 *> number of A but works well in practice.
 *>
 *> This routine differs from DGEEQU by restricting the scaling factors
-*> to a power of the radix.  Baring over- and underflow, scaling by
+*> to a power of the radix.  Barring over- and underflow, scaling by
 *> these factors introduces no additional rounding errors.  However, the
-*> scaled entries' magnitured are no longer approximately 1 but lie
+*> scaled entries' magnitudes are no longer approximately 1 but lie
 *> between sqrt(radix) and 1/sqrt(radix).
 *> \endverbatim
 *
@@ -4025,12 +4028,12 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date November 2011
+*> \date December 2016
 *
 *> \ingroup doubleGBcomputational
 *
@@ -4038,10 +4041,10 @@
       SUBROUTINE DGBEQUB( M, N, KL, KU, AB, LDAB, R, C, ROWCND, COLCND,
      $                    AMAX, INFO )
 *
-*  -- LAPACK computational routine (version 3.4.0) --
+*  -- LAPACK computational routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     November 2011
+*     December 2016
 *
 *     .. Scalar Arguments ..
       INTEGER            INFO, KL, KU, LDAB, M, N
@@ -4220,18 +4223,18 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DGBRFS + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dgbrfs.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dgbrfs.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dgbrfs.f"> 
+*> Download DGBRFS + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dgbrfs.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dgbrfs.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dgbrfs.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
@@ -4239,7 +4242,7 @@
 *       SUBROUTINE DGBRFS( TRANS, N, KL, KU, NRHS, AB, LDAB, AFB, LDAFB,
 *                          IPIV, B, LDB, X, LDX, FERR, BERR, WORK, IWORK,
 *                          INFO )
-* 
+*
 *       .. Scalar Arguments ..
 *       CHARACTER          TRANS
 *       INTEGER            INFO, KL, KU, LDAB, LDAFB, LDB, LDX, N, NRHS
@@ -4249,7 +4252,7 @@
 *       DOUBLE PRECISION   AB( LDAB, * ), AFB( LDAFB, * ), B( LDB, * ),
 *      $                   BERR( * ), FERR( * ), WORK( * ), X( LDX, * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -4409,12 +4412,12 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date November 2011
+*> \date December 2016
 *
 *> \ingroup doubleGBcomputational
 *
@@ -4423,10 +4426,10 @@
      $                   IPIV, B, LDB, X, LDX, FERR, BERR, WORK, IWORK,
      $                   INFO )
 *
-*  -- LAPACK computational routine (version 3.4.0) --
+*  -- LAPACK computational routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     November 2011
+*     December 2016
 *
 *     .. Scalar Arguments ..
       CHARACTER          TRANS
@@ -4684,24 +4687,24 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DGBSV + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dgbsv.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dgbsv.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dgbsv.f"> 
+*> Download DGBSV + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dgbsv.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dgbsv.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dgbsv.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       SUBROUTINE DGBSV( N, KL, KU, NRHS, AB, LDAB, IPIV, B, LDB, INFO )
-* 
+*
 *       .. Scalar Arguments ..
 *       INTEGER            INFO, KL, KU, LDAB, LDB, N, NRHS
 *       ..
@@ -4709,7 +4712,7 @@
 *       INTEGER            IPIV( * )
 *       DOUBLE PRECISION   AB( LDAB, * ), B( LDB, * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -4810,12 +4813,12 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date November 2011
+*> \date December 2016
 *
 *> \ingroup doubleGBsolve
 *
@@ -4844,10 +4847,10 @@
 *  =====================================================================
       SUBROUTINE DGBSV( N, KL, KU, NRHS, AB, LDAB, IPIV, B, LDB, INFO )
 *
-*  -- LAPACK driver routine (version 3.4.0) --
+*  -- LAPACK driver routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     November 2011
+*     December 2016
 *
 *     .. Scalar Arguments ..
       INTEGER            INFO, KL, KU, LDAB, LDB, N, NRHS
@@ -4907,18 +4910,18 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DGBSVX + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dgbsvx.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dgbsvx.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dgbsvx.f"> 
+*> Download DGBSVX + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dgbsvx.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dgbsvx.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dgbsvx.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
@@ -4926,7 +4929,7 @@
 *       SUBROUTINE DGBSVX( FACT, TRANS, N, KL, KU, NRHS, AB, LDAB, AFB,
 *                          LDAFB, IPIV, EQUED, R, C, B, LDB, X, LDX,
 *                          RCOND, FERR, BERR, WORK, IWORK, INFO )
-* 
+*
 *       .. Scalar Arguments ..
 *       CHARACTER          EQUED, FACT, TRANS
 *       INTEGER            INFO, KL, KU, LDAB, LDAFB, LDB, LDX, N, NRHS
@@ -4938,7 +4941,7 @@
 *      $                   BERR( * ), C( * ), FERR( * ), R( * ),
 *      $                   WORK( * ), X( LDX, * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -5260,10 +5263,10 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
 *> \date April 2012
 *
@@ -5274,7 +5277,7 @@
      $                   LDAFB, IPIV, EQUED, R, C, B, LDB, X, LDX,
      $                   RCOND, FERR, BERR, WORK, IWORK, INFO )
 *
-*  -- LAPACK driver routine (version 3.4.1) --
+*  -- LAPACK driver routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
 *     April 2012
@@ -5549,24 +5552,24 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DGBTF2 + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dgbtf2.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dgbtf2.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dgbtf2.f"> 
+*> Download DGBTF2 + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dgbtf2.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dgbtf2.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dgbtf2.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       SUBROUTINE DGBTF2( M, N, KL, KU, AB, LDAB, IPIV, INFO )
-* 
+*
 *       .. Scalar Arguments ..
 *       INTEGER            INFO, KL, KU, LDAB, M, N
 *       ..
@@ -5574,7 +5577,7 @@
 *       INTEGER            IPIV( * )
 *       DOUBLE PRECISION   AB( LDAB, * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -5657,12 +5660,12 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date September 2012
+*> \date December 2016
 *
 *> \ingroup doubleGBcomputational
 *
@@ -5692,10 +5695,10 @@
 *  =====================================================================
       SUBROUTINE DGBTF2( M, N, KL, KU, AB, LDAB, IPIV, INFO )
 *
-*  -- LAPACK computational routine (version 3.4.2) --
+*  -- LAPACK computational routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     September 2012
+*     December 2016
 *
 *     .. Scalar Arguments ..
       INTEGER            INFO, KL, KU, LDAB, M, N
@@ -5826,24 +5829,24 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DGBTRF + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dgbtrf.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dgbtrf.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dgbtrf.f"> 
+*> Download DGBTRF + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dgbtrf.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dgbtrf.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dgbtrf.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       SUBROUTINE DGBTRF( M, N, KL, KU, AB, LDAB, IPIV, INFO )
-* 
+*
 *       .. Scalar Arguments ..
 *       INTEGER            INFO, KL, KU, LDAB, M, N
 *       ..
@@ -5851,7 +5854,7 @@
 *       INTEGER            IPIV( * )
 *       DOUBLE PRECISION   AB( LDAB, * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -5934,12 +5937,12 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date November 2011
+*> \date December 2016
 *
 *> \ingroup doubleGBcomputational
 *
@@ -5968,10 +5971,10 @@
 *  =====================================================================
       SUBROUTINE DGBTRF( M, N, KL, KU, AB, LDAB, IPIV, INFO )
 *
-*  -- LAPACK computational routine (version 3.4.0) --
+*  -- LAPACK computational routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     November 2011
+*     December 2016
 *
 *     .. Scalar Arguments ..
       INTEGER            INFO, KL, KU, LDAB, M, N
@@ -6342,25 +6345,25 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DGBTRS + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dgbtrs.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dgbtrs.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dgbtrs.f"> 
+*> Download DGBTRS + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dgbtrs.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dgbtrs.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dgbtrs.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       SUBROUTINE DGBTRS( TRANS, N, KL, KU, NRHS, AB, LDAB, IPIV, B, LDB,
 *                          INFO )
-* 
+*
 *       .. Scalar Arguments ..
 *       CHARACTER          TRANS
 *       INTEGER            INFO, KL, KU, LDAB, LDB, N, NRHS
@@ -6369,7 +6372,7 @@
 *       INTEGER            IPIV( * )
 *       DOUBLE PRECISION   AB( LDAB, * ), B( LDB, * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -6465,12 +6468,12 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date November 2011
+*> \date December 2016
 *
 *> \ingroup doubleGBcomputational
 *
@@ -6478,10 +6481,10 @@
       SUBROUTINE DGBTRS( TRANS, N, KL, KU, NRHS, AB, LDAB, IPIV, B, LDB,
      $                   INFO )
 *
-*  -- LAPACK computational routine (version 3.4.0) --
+*  -- LAPACK computational routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     November 2011
+*     December 2016
 *
 *     .. Scalar Arguments ..
       CHARACTER          TRANS
@@ -6611,25 +6614,25 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DGEBAK + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dgebak.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dgebak.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dgebak.f"> 
+*> Download DGEBAK + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dgebak.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dgebak.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dgebak.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       SUBROUTINE DGEBAK( JOB, SIDE, N, ILO, IHI, SCALE, M, V, LDV,
 *                          INFO )
-* 
+*
 *       .. Scalar Arguments ..
 *       CHARACTER          JOB, SIDE
 *       INTEGER            IHI, ILO, INFO, LDV, M, N
@@ -6637,7 +6640,7 @@
 *       .. Array Arguments ..
 *       DOUBLE PRECISION   SCALE( * ), V( LDV, * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -6726,12 +6729,12 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date November 2011
+*> \date December 2016
 *
 *> \ingroup doubleGEcomputational
 *
@@ -6739,10 +6742,10 @@
       SUBROUTINE DGEBAK( JOB, SIDE, N, ILO, IHI, SCALE, M, V, LDV,
      $                   INFO )
 *
-*  -- LAPACK computational routine (version 3.4.0) --
+*  -- LAPACK computational routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     November 2011
+*     December 2016
 *
 *     .. Scalar Arguments ..
       CHARACTER          JOB, SIDE
@@ -6879,24 +6882,24 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DGEBAL + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dgebal.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dgebal.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dgebal.f"> 
+*> Download DGEBAL + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dgebal.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dgebal.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dgebal.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       SUBROUTINE DGEBAL( JOB, N, A, LDA, ILO, IHI, SCALE, INFO )
-* 
+*
 *       .. Scalar Arguments ..
 *       CHARACTER          JOB
 *       INTEGER            IHI, ILO, INFO, LDA, N
@@ -6904,7 +6907,7 @@
 *       .. Array Arguments ..
 *       DOUBLE PRECISION   A( LDA, * ), SCALE( * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -6993,12 +6996,12 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date November 2013
+*> \date December 2016
 *
 *> \ingroup doubleGEcomputational
 *
@@ -7037,10 +7040,10 @@
 *  =====================================================================
       SUBROUTINE DGEBAL( JOB, N, A, LDA, ILO, IHI, SCALE, INFO )
 *
-*  -- LAPACK computational routine (version 3.5.0) --
+*  -- LAPACK computational routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     November 2013
+*     December 2016
 *
 *     .. Scalar Arguments ..
       CHARACTER          JOB
@@ -7078,8 +7081,6 @@
 *     .. Intrinsic Functions ..
       INTRINSIC          ABS, MAX, MIN
 *     ..
-*     .. Executable Statements ..
-*
 *     Test the input parameters
 *
       INFO = 0
@@ -7279,24 +7280,24 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DGEBD2 + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dgebd2.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dgebd2.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dgebd2.f"> 
+*> Download DGEBD2 + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dgebd2.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dgebd2.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dgebd2.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       SUBROUTINE DGEBD2( M, N, A, LDA, D, E, TAUQ, TAUP, WORK, INFO )
-* 
+*
 *       .. Scalar Arguments ..
 *       INTEGER            INFO, LDA, M, N
 *       ..
@@ -7304,7 +7305,7 @@
 *       DOUBLE PRECISION   A( LDA, * ), D( * ), E( * ), TAUP( * ),
 *      $                   TAUQ( * ), WORK( * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -7404,12 +7405,12 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date September 2012
+*> \date December 2016
 *
 *> \ingroup doubleGEcomputational
 *
@@ -7466,10 +7467,10 @@
 *  =====================================================================
       SUBROUTINE DGEBD2( M, N, A, LDA, D, E, TAUQ, TAUP, WORK, INFO )
 *
-*  -- LAPACK computational routine (version 3.4.2) --
+*  -- LAPACK computational routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     September 2012
+*     December 2016
 *
 *     .. Scalar Arguments ..
       INTEGER            INFO, LDA, M, N
@@ -7599,25 +7600,25 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DGEBRD + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dgebrd.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dgebrd.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dgebrd.f"> 
+*> Download DGEBRD + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dgebrd.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dgebrd.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dgebrd.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       SUBROUTINE DGEBRD( M, N, A, LDA, D, E, TAUQ, TAUP, WORK, LWORK,
 *                          INFO )
-* 
+*
 *       .. Scalar Arguments ..
 *       INTEGER            INFO, LDA, LWORK, M, N
 *       ..
@@ -7625,7 +7626,7 @@
 *       DOUBLE PRECISION   A( LDA, * ), D( * ), E( * ), TAUP( * ),
 *      $                   TAUQ( * ), WORK( * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -7739,12 +7740,12 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date November 2011
+*> \date December 2016
 *
 *> \ingroup doubleGEcomputational
 *
@@ -7802,10 +7803,10 @@
       SUBROUTINE DGEBRD( M, N, A, LDA, D, E, TAUQ, TAUP, WORK, LWORK,
      $                   INFO )
 *
-*  -- LAPACK computational routine (version 3.4.0) --
+*  -- LAPACK computational routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     November 2011
+*     December 2016
 *
 *     .. Scalar Arguments ..
       INTEGER            INFO, LDA, LWORK, M, N
@@ -7952,25 +7953,25 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DGECON + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dgecon.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dgecon.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dgecon.f"> 
+*> Download DGECON + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dgecon.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dgecon.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dgecon.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       SUBROUTINE DGECON( NORM, N, A, LDA, ANORM, RCOND, WORK, IWORK,
 *                          INFO )
-* 
+*
 *       .. Scalar Arguments ..
 *       CHARACTER          NORM
 *       INTEGER            INFO, LDA, N
@@ -7980,7 +7981,7 @@
 *       INTEGER            IWORK( * )
 *       DOUBLE PRECISION   A( LDA, * ), WORK( * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -8061,12 +8062,12 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date November 2011
+*> \date December 2016
 *
 *> \ingroup doubleGEcomputational
 *
@@ -8074,10 +8075,10 @@
       SUBROUTINE DGECON( NORM, N, A, LDA, ANORM, RCOND, WORK, IWORK,
      $                   INFO )
 *
-*  -- LAPACK computational routine (version 3.4.0) --
+*  -- LAPACK computational routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     November 2011
+*     December 2016
 *
 *     .. Scalar Arguments ..
       CHARACTER          NORM
@@ -8213,25 +8214,25 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DGEEQU + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dgeequ.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dgeequ.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dgeequ.f"> 
+*> Download DGEEQU + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dgeequ.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dgeequ.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dgeequ.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       SUBROUTINE DGEEQU( M, N, A, LDA, R, C, ROWCND, COLCND, AMAX,
 *                          INFO )
-* 
+*
 *       .. Scalar Arguments ..
 *       INTEGER            INFO, LDA, M, N
 *       DOUBLE PRECISION   AMAX, COLCND, ROWCND
@@ -8239,7 +8240,7 @@
 *       .. Array Arguments ..
 *       DOUBLE PRECISION   A( LDA, * ), C( * ), R( * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -8337,12 +8338,12 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date November 2011
+*> \date December 2016
 *
 *> \ingroup doubleGEcomputational
 *
@@ -8350,10 +8351,10 @@
       SUBROUTINE DGEEQU( M, N, A, LDA, R, C, ROWCND, COLCND, AMAX,
      $                   INFO )
 *
-*  -- LAPACK computational routine (version 3.4.0) --
+*  -- LAPACK computational routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     November 2011
+*     December 2016
 *
 *     .. Scalar Arguments ..
       INTEGER            INFO, LDA, M, N
@@ -8517,25 +8518,25 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DGEEQUB + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dgeequb.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dgeequb.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dgeequb.f"> 
+*> Download DGEEQUB + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dgeequb.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dgeequb.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dgeequb.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       SUBROUTINE DGEEQUB( M, N, A, LDA, R, C, ROWCND, COLCND, AMAX,
 *                           INFO )
-* 
+*
 *       .. Scalar Arguments ..
 *       INTEGER            INFO, LDA, M, N
 *       DOUBLE PRECISION   AMAX, COLCND, ROWCND
@@ -8543,7 +8544,7 @@
 *       .. Array Arguments ..
 *       DOUBLE PRECISION   A( LDA, * ), C( * ), R( * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -8563,9 +8564,9 @@
 *> number of A but works well in practice.
 *>
 *> This routine differs from DGEEQU by restricting the scaling factors
-*> to a power of the radix.  Baring over- and underflow, scaling by
+*> to a power of the radix.  Barring over- and underflow, scaling by
 *> these factors introduces no additional rounding errors.  However, the
-*> scaled entries' magnitured are no longer approximately 1 but lie
+*> scaled entries' magnitudes are no longer approximately 1 but lie
 *> between sqrt(radix) and 1/sqrt(radix).
 *> \endverbatim
 *
@@ -8648,12 +8649,12 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date November 2011
+*> \date December 2016
 *
 *> \ingroup doubleGEcomputational
 *
@@ -8661,10 +8662,10 @@
       SUBROUTINE DGEEQUB( M, N, A, LDA, R, C, ROWCND, COLCND, AMAX,
      $                    INFO )
 *
-*  -- LAPACK computational routine (version 3.4.0) --
+*  -- LAPACK computational routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     November 2011
+*     December 2016
 *
 *     .. Scalar Arguments ..
       INTEGER            INFO, LDA, M, N
@@ -8838,25 +8839,25 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DGEES + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dgees.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dgees.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dgees.f"> 
+*> Download DGEES + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dgees.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dgees.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dgees.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       SUBROUTINE DGEES( JOBVS, SORT, SELECT, N, A, LDA, SDIM, WR, WI,
 *                         VS, LDVS, WORK, LWORK, BWORK, INFO )
-* 
+*
 *       .. Scalar Arguments ..
 *       CHARACTER          JOBVS, SORT
 *       INTEGER            INFO, LDA, LDVS, LWORK, N, SDIM
@@ -8870,7 +8871,7 @@
 *       LOGICAL            SELECT
 *       EXTERNAL           SELECT
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -9039,12 +9040,12 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date November 2011
+*> \date December 2016
 *
 *> \ingroup doubleGEeigen
 *
@@ -9052,10 +9053,10 @@
       SUBROUTINE DGEES( JOBVS, SORT, SELECT, N, A, LDA, SDIM, WR, WI,
      $                  VS, LDVS, WORK, LWORK, BWORK, INFO )
 *
-*  -- LAPACK driver routine (version 3.4.0) --
+*  -- LAPACK driver routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     November 2011
+*     December 2016
 *
 *     .. Scalar Arguments ..
       CHARACTER          JOBVS, SORT
@@ -9373,18 +9374,18 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DGEESX + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dgeesx.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dgeesx.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dgeesx.f"> 
+*> Download DGEESX + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dgeesx.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dgeesx.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dgeesx.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
@@ -9392,7 +9393,7 @@
 *       SUBROUTINE DGEESX( JOBVS, SORT, SELECT, SENSE, N, A, LDA, SDIM,
 *                          WR, WI, VS, LDVS, RCONDE, RCONDV, WORK, LWORK,
 *                          IWORK, LIWORK, BWORK, INFO )
-* 
+*
 *       .. Scalar Arguments ..
 *       CHARACTER          JOBVS, SENSE, SORT
 *       INTEGER            INFO, LDA, LDVS, LIWORK, LWORK, N, SDIM
@@ -9408,7 +9409,7 @@
 *       LOGICAL            SELECT
 *       EXTERNAL           SELECT
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -9461,7 +9462,7 @@
 *>
 *> \param[in] SELECT
 *> \verbatim
-*>          SELECT is procedure) LOGICAL FUNCTION of two DOUBLE PRECISION arguments
+*>          SELECT is a LOGICAL FUNCTION of two DOUBLE PRECISION arguments
 *>          SELECT must be declared EXTERNAL in the calling subroutine.
 *>          If SORT = 'S', SELECT is used to select eigenvalues to sort
 *>          to the top left of the Schur form.
@@ -9638,12 +9639,12 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date November 2011
+*> \date June 2016
 *
 *> \ingroup doubleGEeigen
 *
@@ -9652,10 +9653,10 @@
      $                   WR, WI, VS, LDVS, RCONDE, RCONDV, WORK, LWORK,
      $                   IWORK, LIWORK, BWORK, INFO )
 *
-*  -- LAPACK driver routine (version 3.4.0) --
+*  -- LAPACK driver routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     November 2011
+*     June 2016
 *
 *     .. Scalar Arguments ..
       CHARACTER          JOBVS, SENSE, SORT
@@ -10022,25 +10023,25 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DGEEV + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dgeev.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dgeev.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dgeev.f"> 
+*> Download DGEEV + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dgeev.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dgeev.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dgeev.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       SUBROUTINE DGEEV( JOBVL, JOBVR, N, A, LDA, WR, WI, VL, LDVL, VR,
 *                         LDVR, WORK, LWORK, INFO )
-* 
+*
 *       .. Scalar Arguments ..
 *       CHARACTER          JOBVL, JOBVR
 *       INTEGER            INFO, LDA, LDVL, LDVR, LWORK, N
@@ -10049,7 +10050,7 @@
 *       DOUBLE PRECISION   A( LDA, * ), VL( LDVL, * ), VR( LDVR, * ),
 *      $                   WI( * ), WORK( * ), WR( * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -10196,23 +10197,26 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date June 2016
 *
-*> \date September 2012
+*  @precisions fortran d -> s
 *
 *> \ingroup doubleGEeigen
 *
 *  =====================================================================
       SUBROUTINE DGEEV( JOBVL, JOBVR, N, A, LDA, WR, WI, VL, LDVL, VR,
      $                  LDVR, WORK, LWORK, INFO )
+      implicit none
 *
-*  -- LAPACK driver routine (version 3.4.2) --
+*  -- LAPACK driver routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     September 2012
+*     June 2016
 *
 *     .. Scalar Arguments ..
       CHARACTER          JOBVL, JOBVR
@@ -10233,7 +10237,7 @@
       LOGICAL            LQUERY, SCALEA, WANTVL, WANTVR
       CHARACTER          SIDE
       INTEGER            HSWORK, I, IBAL, IERR, IHI, ILO, ITAU, IWRK, K,
-     $                   MAXWRK, MINWRK, NOUT
+     $                   LWORK_TREVC, MAXWRK, MINWRK, NOUT
       DOUBLE PRECISION   ANRM, BIGNUM, CS, CSCALE, EPS, R, SCL, SMLNUM,
      $                   SN
 *     ..
@@ -10243,7 +10247,7 @@
 *     ..
 *     .. External Subroutines ..
       EXTERNAL           DGEBAK, DGEBAL, DGEHRD, DHSEQR, DLABAD, DLACPY,
-     $                   DLARTG, DLASCL, DORGHR, DROT, DSCAL, DTREVC,
+     $                   DLARTG, DLASCL, DORGHR, DROT, DSCAL, DTREVC3,
      $                   XERBLA
 *     ..
 *     .. External Functions ..
@@ -10299,24 +10303,34 @@
                MAXWRK = MAX( MAXWRK, 2*N + ( N - 1 )*ILAENV( 1,
      $                       'DORGHR', ' ', N, 1, N, -1 ) )
                CALL DHSEQR( 'S', 'V', N, 1, N, A, LDA, WR, WI, VL, LDVL,
-     $                WORK, -1, INFO )
-               HSWORK = WORK( 1 )
+     $                      WORK, -1, INFO )
+               HSWORK = INT( WORK(1) )
                MAXWRK = MAX( MAXWRK, N + 1, N + HSWORK )
+               CALL DTREVC3( 'L', 'B', SELECT, N, A, LDA,
+     $                       VL, LDVL, VR, LDVR, N, NOUT,
+     $                       WORK, -1, IERR )
+               LWORK_TREVC = INT( WORK(1) )
+               MAXWRK = MAX( MAXWRK, N + LWORK_TREVC )
                MAXWRK = MAX( MAXWRK, 4*N )
             ELSE IF( WANTVR ) THEN
                MINWRK = 4*N
                MAXWRK = MAX( MAXWRK, 2*N + ( N - 1 )*ILAENV( 1,
      $                       'DORGHR', ' ', N, 1, N, -1 ) )
                CALL DHSEQR( 'S', 'V', N, 1, N, A, LDA, WR, WI, VR, LDVR,
-     $                WORK, -1, INFO )
-               HSWORK = WORK( 1 )
+     $                      WORK, -1, INFO )
+               HSWORK = INT( WORK(1) )
                MAXWRK = MAX( MAXWRK, N + 1, N + HSWORK )
+               CALL DTREVC3( 'R', 'B', SELECT, N, A, LDA,
+     $                       VL, LDVL, VR, LDVR, N, NOUT,
+     $                       WORK, -1, IERR )
+               LWORK_TREVC = INT( WORK(1) )
+               MAXWRK = MAX( MAXWRK, N + LWORK_TREVC )
                MAXWRK = MAX( MAXWRK, 4*N )
-            ELSE 
+            ELSE
                MINWRK = 3*N
                CALL DHSEQR( 'E', 'N', N, 1, N, A, LDA, WR, WI, VR, LDVR,
-     $                WORK, -1, INFO )
-               HSWORK = WORK( 1 )
+     $                      WORK, -1, INFO )
+               HSWORK = INT( WORK(1) )
                MAXWRK = MAX( MAXWRK, N + 1, N + HSWORK )
             END IF
             MAXWRK = MAX( MAXWRK, MINWRK )
@@ -10438,18 +10452,18 @@
      $                WORK( IWRK ), LWORK-IWRK+1, INFO )
       END IF
 *
-*     If INFO > 0 from DHSEQR, then quit
+*     If INFO .NE. 0 from DHSEQR, then quit
 *
-      IF( INFO.GT.0 )
+      IF( INFO.NE.0 )
      $   GO TO 50
 *
       IF( WANTVL .OR. WANTVR ) THEN
 *
 *        Compute left and/or right eigenvectors
-*        (Workspace: need 4*N)
+*        (Workspace: need 4*N, prefer N + N + 2*N*NB)
 *
-         CALL DTREVC( SIDE, 'B', SELECT, N, A, LDA, VL, LDVL, VR, LDVR,
-     $                N, NOUT, WORK( IWRK ), IERR )
+         CALL DTREVC3( SIDE, 'B', SELECT, N, A, LDA, VL, LDVL, VR, LDVR,
+     $                 N, NOUT, WORK( IWRK ), LWORK-IWRK+1, IERR )
       END IF
 *
       IF( WANTVL ) THEN
@@ -10538,18 +10552,18 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DGEEVX + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dgeevx.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dgeevx.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dgeevx.f"> 
+*> Download DGEEVX + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dgeevx.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dgeevx.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dgeevx.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
@@ -10557,7 +10571,7 @@
 *       SUBROUTINE DGEEVX( BALANC, JOBVL, JOBVR, SENSE, N, A, LDA, WR, WI,
 *                          VL, LDVL, VR, LDVR, ILO, IHI, SCALE, ABNRM,
 *                          RCONDE, RCONDV, WORK, LWORK, IWORK, INFO )
-* 
+*
 *       .. Scalar Arguments ..
 *       CHARACTER          BALANC, JOBVL, JOBVR, SENSE
 *       INTEGER            IHI, ILO, INFO, LDA, LDVL, LDVR, LWORK, N
@@ -10569,7 +10583,7 @@
 *      $                   SCALE( * ), VL( LDVL, * ), VR( LDVR, * ),
 *      $                   WI( * ), WORK( * ), WR( * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -10825,12 +10839,14 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date June 2016
 *
-*> \date September 2012
+*  @precisions fortran d -> s
 *
 *> \ingroup doubleGEeigen
 *
@@ -10838,11 +10854,12 @@
       SUBROUTINE DGEEVX( BALANC, JOBVL, JOBVR, SENSE, N, A, LDA, WR, WI,
      $                   VL, LDVL, VR, LDVR, ILO, IHI, SCALE, ABNRM,
      $                   RCONDE, RCONDV, WORK, LWORK, IWORK, INFO )
+      implicit none
 *
-*  -- LAPACK driver routine (version 3.4.2) --
+*  -- LAPACK driver routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     September 2012
+*     June 2016
 *
 *     .. Scalar Arguments ..
       CHARACTER          BALANC, JOBVL, JOBVR, SENSE
@@ -10866,8 +10883,8 @@
       LOGICAL            LQUERY, SCALEA, WANTVL, WANTVR, WNTSNB, WNTSNE,
      $                   WNTSNN, WNTSNV
       CHARACTER          JOB, SIDE
-      INTEGER            HSWORK, I, ICOND, IERR, ITAU, IWRK, K, MAXWRK,
-     $                   MINWRK, NOUT
+      INTEGER            HSWORK, I, ICOND, IERR, ITAU, IWRK, K,
+     $                   LWORK_TREVC, MAXWRK, MINWRK, NOUT
       DOUBLE PRECISION   ANRM, BIGNUM, CS, CSCALE, EPS, R, SCL, SMLNUM,
      $                   SN
 *     ..
@@ -10877,7 +10894,7 @@
 *     ..
 *     .. External Subroutines ..
       EXTERNAL           DGEBAK, DGEBAL, DGEHRD, DHSEQR, DLABAD, DLACPY,
-     $                   DLARTG, DLASCL, DORGHR, DROT, DSCAL, DTREVC,
+     $                   DLARTG, DLASCL, DORGHR, DROT, DSCAL, DTREVC3,
      $                   DTRSNA, XERBLA
 *     ..
 *     .. External Functions ..
@@ -10902,8 +10919,8 @@
       WNTSNE = LSAME( SENSE, 'E' )
       WNTSNV = LSAME( SENSE, 'V' )
       WNTSNB = LSAME( SENSE, 'B' )
-      IF( .NOT.( LSAME( BALANC, 'N' ) .OR. LSAME( BALANC,
-     $    'S' ) .OR. LSAME( BALANC, 'P' ) .OR. LSAME( BALANC, 'B' ) ) )
+      IF( .NOT.( LSAME( BALANC, 'N' ) .OR. LSAME( BALANC, 'S' )
+     $      .OR. LSAME( BALANC, 'P' ) .OR. LSAME( BALANC, 'B' ) ) )
      $     THEN
          INFO = -1
       ELSE IF( ( .NOT.WANTVL ) .AND. ( .NOT.LSAME( JOBVL, 'N' ) ) ) THEN
@@ -10942,9 +10959,19 @@
             MAXWRK = N + N*ILAENV( 1, 'DGEHRD', ' ', N, 1, N, 0 )
 *
             IF( WANTVL ) THEN
+               CALL DTREVC3( 'L', 'B', SELECT, N, A, LDA,
+     $                       VL, LDVL, VR, LDVR,
+     $                       N, NOUT, WORK, -1, IERR )
+               LWORK_TREVC = INT( WORK(1) )
+               MAXWRK = MAX( MAXWRK, N + LWORK_TREVC )
                CALL DHSEQR( 'S', 'V', N, 1, N, A, LDA, WR, WI, VL, LDVL,
      $                WORK, -1, INFO )
             ELSE IF( WANTVR ) THEN
+               CALL DTREVC3( 'R', 'B', SELECT, N, A, LDA,
+     $                       VL, LDVL, VR, LDVR,
+     $                       N, NOUT, WORK, -1, IERR )
+               LWORK_TREVC = INT( WORK(1) )
+               MAXWRK = MAX( MAXWRK, N + LWORK_TREVC )
                CALL DHSEQR( 'S', 'V', N, 1, N, A, LDA, WR, WI, VR, LDVR,
      $                WORK, -1, INFO )
             ELSE
@@ -10956,7 +10983,7 @@
      $                LDVR, WORK, -1, INFO )
                END IF
             END IF
-            HSWORK = WORK( 1 )
+            HSWORK = INT( WORK(1) )
 *
             IF( ( .NOT.WANTVL ) .AND. ( .NOT.WANTVR ) ) THEN
                MINWRK = 2*N
@@ -11108,18 +11135,18 @@
      $                WORK( IWRK ), LWORK-IWRK+1, INFO )
       END IF
 *
-*     If INFO > 0 from DHSEQR, then quit
+*     If INFO .NE. 0 from DHSEQR, then quit
 *
-      IF( INFO.GT.0 )
+      IF( INFO.NE.0 )
      $   GO TO 50
 *
       IF( WANTVL .OR. WANTVR ) THEN
 *
 *        Compute left and/or right eigenvectors
-*        (Workspace: need 3*N)
+*        (Workspace: need 3*N, prefer N + 2*N*NB)
 *
-         CALL DTREVC( SIDE, 'B', SELECT, N, A, LDA, VL, LDVL, VR, LDVR,
-     $                N, NOUT, WORK( IWRK ), IERR )
+         CALL DTREVC3( SIDE, 'B', SELECT, N, A, LDA, VL, LDVL, VR, LDVR,
+     $                 N, NOUT, WORK( IWRK ), LWORK-IWRK+1, IERR )
       END IF
 *
 *     Compute condition numbers if desired
@@ -11219,18 +11246,18 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DGEGS + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dgegs.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dgegs.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dgegs.f"> 
+*> Download DGEGS + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dgegs.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dgegs.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dgegs.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
@@ -11238,7 +11265,7 @@
 *       SUBROUTINE DGEGS( JOBVSL, JOBVSR, N, A, LDA, B, LDB, ALPHAR,
 *                         ALPHAI, BETA, VSL, LDVSL, VSR, LDVSR, WORK,
 *                         LWORK, INFO )
-* 
+*
 *       .. Scalar Arguments ..
 *       CHARACTER          JOBVSL, JOBVSR
 *       INTEGER            INFO, LDA, LDB, LDVSL, LDVSR, LWORK, N
@@ -11248,7 +11275,7 @@
 *      $                   B( LDB, * ), BETA( * ), VSL( LDVSL, * ),
 *      $                   VSR( LDVSR, * ), WORK( * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -11430,12 +11457,12 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date November 2011
+*> \date December 2016
 *
 *> \ingroup doubleGEeigen
 *
@@ -11444,10 +11471,10 @@
      $                  ALPHAI, BETA, VSL, LDVSL, VSR, LDVSR, WORK,
      $                  LWORK, INFO )
 *
-*  -- LAPACK driver routine (version 3.4.0) --
+*  -- LAPACK driver routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     November 2011
+*     December 2016
 *
 *     .. Scalar Arguments ..
       CHARACTER          JOBVSL, JOBVSR
@@ -11760,25 +11787,25 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DGEGV + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dgegv.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dgegv.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dgegv.f"> 
+*> Download DGEGV + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dgegv.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dgegv.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dgegv.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       SUBROUTINE DGEGV( JOBVL, JOBVR, N, A, LDA, B, LDB, ALPHAR, ALPHAI,
 *                         BETA, VL, LDVL, VR, LDVR, WORK, LWORK, INFO )
-* 
+*
 *       .. Scalar Arguments ..
 *       CHARACTER          JOBVL, JOBVR
 *       INTEGER            INFO, LDA, LDB, LDVL, LDVR, LWORK, N
@@ -11788,7 +11815,7 @@
 *      $                   B( LDB, * ), BETA( * ), VL( LDVL, * ),
 *      $                   VR( LDVR, * ), WORK( * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -11909,7 +11936,7 @@
 *> \verbatim
 *>          BETA is DOUBLE PRECISION array, dimension (N)
 *>          The scalars beta that define the eigenvalues of GNEP.
-*>          
+*>
 *>          Together, the quantities alpha = (ALPHAR(j),ALPHAI(j)) and
 *>          beta = BETA(j) represent the j-th eigenvalue of the matrix
 *>          pair (A,B), in one of the forms lambda = alpha/beta or
@@ -12018,12 +12045,12 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date November 2011
+*> \date December 2016
 *
 *> \ingroup doubleGEeigen
 *
@@ -12064,10 +12091,10 @@
       SUBROUTINE DGEGV( JOBVL, JOBVR, N, A, LDA, B, LDB, ALPHAR, ALPHAI,
      $                  BETA, VL, LDVL, VR, LDVR, WORK, LWORK, INFO )
 *
-*  -- LAPACK driver routine (version 3.4.0) --
+*  -- LAPACK driver routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     November 2011
+*     December 2016
 *
 *     .. Scalar Arguments ..
       CHARACTER          JOBVL, JOBVR
@@ -12529,31 +12556,31 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DGEHD2 + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dgehd2.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dgehd2.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dgehd2.f"> 
+*> Download DGEHD2 + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dgehd2.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dgehd2.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dgehd2.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       SUBROUTINE DGEHD2( N, ILO, IHI, A, LDA, TAU, WORK, INFO )
-* 
+*
 *       .. Scalar Arguments ..
 *       INTEGER            IHI, ILO, INFO, LDA, N
 *       ..
 *       .. Array Arguments ..
 *       DOUBLE PRECISION   A( LDA, * ), TAU( * ), WORK( * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -12628,12 +12655,12 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date September 2012
+*> \date December 2016
 *
 *> \ingroup doubleGEcomputational
 *
@@ -12676,10 +12703,10 @@
 *  =====================================================================
       SUBROUTINE DGEHD2( N, ILO, IHI, A, LDA, TAU, WORK, INFO )
 *
-*  -- LAPACK computational routine (version 3.4.2) --
+*  -- LAPACK computational routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     September 2012
+*     December 2016
 *
 *     .. Scalar Arguments ..
       INTEGER            IHI, ILO, INFO, LDA, N
@@ -12754,31 +12781,31 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DGEHRD + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dgehrd.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dgehrd.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dgehrd.f"> 
+*> Download DGEHRD + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dgehrd.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dgehrd.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dgehrd.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       SUBROUTINE DGEHRD( N, ILO, IHI, A, LDA, TAU, WORK, LWORK, INFO )
-* 
+*
 *       .. Scalar Arguments ..
 *       INTEGER            IHI, ILO, INFO, LDA, LWORK, N
 *       ..
 *       .. Array Arguments ..
 *       DOUBLE PRECISION  A( LDA, * ), TAU( * ), WORK( * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -12849,8 +12876,7 @@
 *> \verbatim
 *>          LWORK is INTEGER
 *>          The length of the array WORK.  LWORK >= max(1,N).
-*>          For optimum performance LWORK >= N*NB, where NB is the
-*>          optimal blocksize.
+*>          For good performance, LWORK should generally be larger.
 *>
 *>          If LWORK = -1, then a workspace query is assumed; the routine
 *>          only calculates the optimal size of the WORK array, returns
@@ -12868,12 +12894,12 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date November 2011
+*> \date December 2016
 *
 *> \ingroup doubleGEcomputational
 *
@@ -12920,10 +12946,10 @@
 *  =====================================================================
       SUBROUTINE DGEHRD( N, ILO, IHI, A, LDA, TAU, WORK, LWORK, INFO )
 *
-*  -- LAPACK computational routine (version 3.4.0) --
+*  -- LAPACK computational routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     November 2011
+*     December 2016
 *
 *     .. Scalar Arguments ..
       INTEGER            IHI, ILO, INFO, LDA, LWORK, N
@@ -12935,21 +12961,19 @@
 *  =====================================================================
 *
 *     .. Parameters ..
-      INTEGER            NBMAX, LDT
-      PARAMETER          ( NBMAX = 64, LDT = NBMAX+1 )
+      INTEGER            NBMAX, LDT, TSIZE
+      PARAMETER          ( NBMAX = 64, LDT = NBMAX+1,
+     $                     TSIZE = LDT*NBMAX )
       DOUBLE PRECISION  ZERO, ONE
-      PARAMETER          ( ZERO = 0.0D+0, 
+      PARAMETER          ( ZERO = 0.0D+0,
      $                     ONE = 1.0D+0 )
 *     ..
 *     .. Local Scalars ..
       LOGICAL            LQUERY
-      INTEGER            I, IB, IINFO, IWS, J, LDWORK, LWKOPT, NB,
+      INTEGER            I, IB, IINFO, IWT, J, LDWORK, LWKOPT, NB,
      $                   NBMIN, NH, NX
       DOUBLE PRECISION  EI
 *     ..
-*     .. Local Arrays ..
-      DOUBLE PRECISION  T( LDT, NBMAX )
-*     ..
 *     .. External Subroutines ..
       EXTERNAL           DAXPY, DGEHD2, DGEMM, DLAHR2, DLARFB, DTRMM,
      $                   XERBLA
@@ -12966,9 +12990,6 @@
 *     Test the input parameters
 *
       INFO = 0
-      NB = MIN( NBMAX, ILAENV( 1, 'DGEHRD', ' ', N, ILO, IHI, -1 ) )
-      LWKOPT = N*NB
-      WORK( 1 ) = LWKOPT
       LQUERY = ( LWORK.EQ.-1 )
       IF( N.LT.0 ) THEN
          INFO = -1
@@ -12981,6 +13002,16 @@
       ELSE IF( LWORK.LT.MAX( 1, N ) .AND. .NOT.LQUERY ) THEN
          INFO = -8
       END IF
+*
+      IF( INFO.EQ.0 ) THEN
+*
+*        Compute the workspace requirements
+*
+         NB = MIN( NBMAX, ILAENV( 1, 'DGEHRD', ' ', N, ILO, IHI, -1 ) )
+         LWKOPT = N*NB + TSIZE
+         WORK( 1 ) = LWKOPT
+      END IF
+*
       IF( INFO.NE.0 ) THEN
          CALL XERBLA( 'DGEHRD', -INFO )
          RETURN
@@ -13009,7 +13040,6 @@
 *
       NB = MIN( NBMAX, ILAENV( 1, 'DGEHRD', ' ', N, ILO, IHI, -1 ) )
       NBMIN = 2
-      IWS = 1
       IF( NB.GT.1 .AND. NB.LT.NH ) THEN
 *
 *        Determine when to cross over from blocked to unblocked code
@@ -13020,8 +13050,7 @@
 *
 *           Determine if workspace is large enough for blocked code
 *
-            IWS = N*NB
-            IF( LWORK.LT.IWS ) THEN
+            IF( LWORK.LT.N*NB+TSIZE ) THEN
 *
 *              Not enough workspace to use optimal NB:  determine the
 *              minimum value of NB, and reduce NB or force use of
@@ -13029,8 +13058,8 @@
 *
                NBMIN = MAX( 2, ILAENV( 2, 'DGEHRD', ' ', N, ILO, IHI,
      $                 -1 ) )
-               IF( LWORK.GE.N*NBMIN ) THEN
-                  NB = LWORK / N
+               IF( LWORK.GE.(N*NBMIN + TSIZE) ) THEN
+                  NB = (LWORK-TSIZE) / N
                ELSE
                   NB = 1
                END IF
@@ -13049,6 +13078,7 @@
 *
 *        Use blocked code
 *
+         IWT = 1 + N*NB
          DO 40 I = ILO, IHI - 1 - NX, NB
             IB = MIN( NB, IHI-I )
 *
@@ -13056,8 +13086,8 @@
 *           matrices V and T of the block reflector H = I - V*T*V**T
 *           which performs the reduction, and also the matrix Y = A*V*T
 *
-            CALL DLAHR2( IHI, I, IB, A( 1, I ), LDA, TAU( I ), T, LDT,
-     $                   WORK, LDWORK )
+            CALL DLAHR2( IHI, I, IB, A( 1, I ), LDA, TAU( I ),
+     $                   WORK( IWT ), LDT, WORK, LDWORK )
 *
 *           Apply the block reflector H to A(1:ihi,i+ib:ihi) from the
 *           right, computing  A := A - Y * V**T. V(i+ib,ib-1) must be set
@@ -13065,7 +13095,7 @@
 *
             EI = A( I+IB, I+IB-1 )
             A( I+IB, I+IB-1 ) = ONE
-            CALL DGEMM( 'No transpose', 'Transpose', 
+            CALL DGEMM( 'No transpose', 'Transpose',
      $                  IHI, IHI-I-IB+1,
      $                  IB, -ONE, WORK, LDWORK, A( I+IB, I ), LDA, ONE,
      $                  A( 1, I+IB ), LDA )
@@ -13087,15 +13117,16 @@
 *
             CALL DLARFB( 'Left', 'Transpose', 'Forward',
      $                   'Columnwise',
-     $                   IHI-I, N-I-IB+1, IB, A( I+1, I ), LDA, T, LDT,
-     $                   A( I+1, I+IB ), LDA, WORK, LDWORK )
+     $                   IHI-I, N-I-IB+1, IB, A( I+1, I ), LDA,
+     $                   WORK( IWT ), LDT, A( I+1, I+IB ), LDA,
+     $                   WORK, LDWORK )
    40    CONTINUE
       END IF
 *
 *     Use unblocked code to reduce the rest of the matrix
 *
       CALL DGEHD2( N, I, IHI, A, LDA, TAU, WORK, IINFO )
-      WORK( 1 ) = IWS
+      WORK( 1 ) = LWKOPT
 *
       RETURN
 *
@@ -13106,18 +13137,18 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DGEJSV + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dgejsv.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dgejsv.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dgejsv.f"> 
+*> Download DGEJSV + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dgejsv.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dgejsv.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dgejsv.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
@@ -13125,7 +13156,7 @@
 *       SUBROUTINE DGEJSV( JOBA, JOBU, JOBV, JOBR, JOBT, JOBP,
 *                          M, N, A, LDA, SVA, U, LDU, V, LDV,
 *                          WORK, LWORK, IWORK, INFO )
-* 
+*
 *       .. Scalar Arguments ..
 *       IMPLICIT    NONE
 *       INTEGER     INFO, LDA, LDU, LDV, LWORK, M, N
@@ -13136,7 +13167,7 @@
 *       INTEGER     IWORK( * )
 *       CHARACTER*1 JOBA, JOBP, JOBR, JOBT, JOBU, JOBV
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -13155,6 +13186,8 @@
 *> the right singular vectors of [A], respectively. The matrices [U] and [V]
 *> are computed and stored in the arrays U and V, respectively. The diagonal
 *> of [SIGMA] is computed and stored in the array SVA.
+*> DGEJSV can sometimes compute tiny singular values and their singular vectors much
+*> more accurately than other SVD routines, see below under Further Details.
 *> \endverbatim
 *
 *  Arguments:
@@ -13189,7 +13222,7 @@
 *>             rows, then using this condition number gives too pessimistic
 *>             error bound.
 *>       = 'A': Small singular values are the noise and the matrix is treated
-*>             as numerically rank defficient. The error in the computed
+*>             as numerically rank deficient. The error in the computed
 *>             singular values is bounded by f(m,n)*epsilon*||A||.
 *>             The computed SVD A = U * S * V^t restores A up to
 *>             f(m,n)*epsilon*||A||.
@@ -13339,7 +13372,7 @@
 *>                         copied back to the V array. This 'W' option is just
 *>                         a reminder to the caller that in this case U is
 *>                         reserved as workspace of length N*N.
-*>          If JOBU = 'N'  U is not referenced.
+*>          If JOBU = 'N'  U is not referenced, unless JOBT='T'.
 *> \endverbatim
 *>
 *> \param[in] LDU
@@ -13361,7 +13394,7 @@
 *>                         copied back to the U array. This 'W' option is just
 *>                         a reminder to the caller that in this case V is
 *>                         reserved as workspace of length N*N.
-*>          If JOBV = 'N'  V is not referenced.
+*>          If JOBV = 'N'  V is not referenced, unless JOBT='T'.
 *> \endverbatim
 *>
 *> \param[in] LDV
@@ -13374,7 +13407,7 @@
 *> \param[out] WORK
 *> \verbatim
 *>          WORK is DOUBLE PRECISION array, dimension at least LWORK.
-*>          On exit, if N.GT.0 .AND. M.GT.0 (else not referenced), 
+*>          On exit, if N.GT.0 .AND. M.GT.0 (else not referenced),
 *>          WORK(1) = SCALE = WORK(2) / WORK(1) is the scaling factor such
 *>                    that SCALE*SVA(1:N) are the computed singular values
 *>                    of A. (See the description of SVA().)
@@ -13421,24 +13454,24 @@
 *>               ->> For optimal performance (blocked code) the optimal value
 *>               is LWORK >= max(2*M+N,3*N+(N+1)*NB,7). Here NB is the optimal
 *>               block size for DGEQP3 and DGEQRF.
-*>               In general, optimal LWORK is computed as 
-*>               LWORK >= max(2*M+N,N+LWORK(DGEQP3),N+LWORK(DGEQRF), 7).        
+*>               In general, optimal LWORK is computed as
+*>               LWORK >= max(2*M+N,N+LWORK(DGEQP3),N+LWORK(DGEQRF), 7).
 *>            -> .. an estimate of the scaled condition number of A is
 *>               required (JOBA='E', 'G'). In this case, LWORK is the maximum
 *>               of the above and N*N+4*N, i.e. LWORK >= max(2*M+N,N*N+4*N,7).
-*>               ->> For optimal performance (blocked code) the optimal value 
+*>               ->> For optimal performance (blocked code) the optimal value
 *>               is LWORK >= max(2*M+N,3*N+(N+1)*NB, N*N+4*N, 7).
 *>               In general, the optimal length LWORK is computed as
-*>               LWORK >= max(2*M+N,N+LWORK(DGEQP3),N+LWORK(DGEQRF), 
+*>               LWORK >= max(2*M+N,N+LWORK(DGEQP3),N+LWORK(DGEQRF),
 *>                                                     N+N*N+LWORK(DPOCON),7).
 *>
 *>          If SIGMA and the right singular vectors are needed (JOBV.EQ.'V'),
 *>            -> the minimal requirement is LWORK >= max(2*M+N,4*N+1,7).
 *>            -> For optimal performance, LWORK >= max(2*M+N,3*N+(N+1)*NB,7),
-*>               where NB is the optimal block size for DGEQP3, DGEQRF, DGELQ,
+*>               where NB is the optimal block size for DGEQP3, DGEQRF, DGELQF,
 *>               DORMLQ. In general, the optimal length LWORK is computed as
-*>               LWORK >= max(2*M+N,N+LWORK(DGEQP3), N+LWORK(DPOCON), 
-*>                       N+LWORK(DGELQ), 2*N+LWORK(DGEQRF), N+LWORK(DORMLQ)).
+*>               LWORK >= max(2*M+N,N+LWORK(DGEQP3), N+LWORK(DPOCON),
+*>                       N+LWORK(DGELQF), 2*N+LWORK(DGEQRF), N+LWORK(DORMLQ)).
 *>
 *>          If SIGMA and the left singular vectors are needed
 *>            -> the minimal requirement is LWORK >= max(2*M+N,4*N+1,7).
@@ -13448,14 +13481,14 @@
 *>               where NB is the optimal block size for DGEQP3, DGEQRF, DORMQR.
 *>               In general, the optimal length LWORK is computed as
 *>               LWORK >= max(2*M+N,N+LWORK(DGEQP3),N+LWORK(DPOCON),
-*>                        2*N+LWORK(DGEQRF), N+LWORK(DORMQR)). 
-*>               Here LWORK(DORMQR) equals N*NB (for JOBU.EQ.'U') or 
+*>                        2*N+LWORK(DGEQRF), N+LWORK(DORMQR)).
+*>               Here LWORK(DORMQR) equals N*NB (for JOBU.EQ.'U') or
 *>               M*NB (for JOBU.EQ.'F').
-*>               
-*>          If the full SVD is needed: (JOBU.EQ.'U' or JOBU.EQ.'F') and 
-*>            -> if JOBV.EQ.'V'  
-*>               the minimal requirement is LWORK >= max(2*M+N,6*N+2*N*N). 
-*>            -> if JOBV.EQ.'J' the minimal requirement is 
+*>
+*>          If the full SVD is needed: (JOBU.EQ.'U' or JOBU.EQ.'F') and
+*>            -> if JOBV.EQ.'V'
+*>               the minimal requirement is LWORK >= max(2*M+N,6*N+2*N*N).
+*>            -> if JOBV.EQ.'J' the minimal requirement is
 *>               LWORK >= max(2*M+N, 4*N+N*N,2*N+N*N+6).
 *>            -> For optimal performance, LWORK should be additionally
 *>               larger than N+M*NB, where NB is the optimal block size
@@ -13480,7 +13513,7 @@
 *> \verbatim
 *>          INFO is INTEGER
 *>           < 0  : if INFO = -i, then the i-th argument had an illegal value.
-*>           = 0 :  successfull exit;
+*>           = 0 :  successful exit;
 *>           > 0 :  DGEJSV  did not converge in the maximal allowed number
 *>                  of sweeps. The computed values may be inaccurate.
 *> \endverbatim
@@ -13488,12 +13521,12 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date September 2012
+*> \date June 2016
 *
 *> \ingroup doubleGEsing
 *
@@ -13530,8 +13563,8 @@
 *>     The rank revealing QR factorization (in this code: DGEQP3) should be
 *>  implemented as in [3]. We have a new version of DGEQP3 under development
 *>  that is more robust than the current one in LAPACK, with a cleaner cut in
-*>  rank defficient cases. It will be available in the SIGMA library [4].
-*>  If M is much larger than N, it is obvious that the inital QRF with
+*>  rank deficient cases. It will be available in the SIGMA library [4].
+*>  If M is much larger than N, it is obvious that the initial QRF with
 *>  column pivoting can be preprocessed by the QRF without pivoting. That
 *>  well known trick is not used in DGEJSV because in some cases heavy row
 *>  weighting can be treated with complete pivoting. The overhead in cases
@@ -13578,10 +13611,10 @@
      $                   M, N, A, LDA, SVA, U, LDU, V, LDV,
      $                   WORK, LWORK, IWORK, INFO )
 *
-*  -- LAPACK computational routine (version 3.4.2) --
+*  -- LAPACK computational routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     September 2012
+*     June 2016
 *
 *     .. Scalar Arguments ..
       IMPLICIT    NONE
@@ -13610,8 +13643,7 @@
      $        NOSCAL, ROWPIV, RSVEC,  TRANSP
 *     ..
 *     .. Intrinsic Functions ..
-      INTRINSIC DABS,  DLOG, DMAX1, DMIN1, DBLE,
-     $          MAX0, MIN0, IDNINT,  DSIGN,  DSQRT
+      INTRINSIC DABS, DLOG, MAX, MIN, DBLE, IDNINT, DSIGN, DSQRT
 *     ..
 *     .. External Functions ..
       DOUBLE PRECISION  DLAMCH, DNRM2
@@ -13665,19 +13697,19 @@
       ELSE IF ( LSVEC .AND. ( LDU .LT. M ) ) THEN
          INFO = - 13
       ELSE IF ( RSVEC .AND. ( LDV .LT. N ) ) THEN
-         INFO = - 14
+         INFO = - 15
       ELSE IF ( (.NOT.(LSVEC .OR. RSVEC .OR. ERREST).AND.
-     &                           (LWORK .LT. MAX0(7,4*N+1,2*M+N))) .OR.
+     &                           (LWORK .LT. MAX(7,4*N+1,2*M+N))) .OR.
      & (.NOT.(LSVEC .OR. RSVEC) .AND. ERREST .AND.
-     &                         (LWORK .LT. MAX0(7,4*N+N*N,2*M+N))) .OR.
-     & (LSVEC .AND. (.NOT.RSVEC) .AND. (LWORK .LT. MAX0(7,2*M+N,4*N+1)))
+     &                         (LWORK .LT. MAX(7,4*N+N*N,2*M+N))) .OR.
+     & (LSVEC .AND. (.NOT.RSVEC) .AND. (LWORK .LT. MAX(7,2*M+N,4*N+1)))
      & .OR.
-     & (RSVEC .AND. (.NOT.LSVEC) .AND. (LWORK .LT. MAX0(7,2*M+N,4*N+1)))
+     & (RSVEC .AND. (.NOT.LSVEC) .AND. (LWORK .LT. MAX(7,2*M+N,4*N+1)))
      & .OR.
-     & (LSVEC .AND. RSVEC .AND. (.NOT.JRACC) .AND. 
-     &                          (LWORK.LT.MAX0(2*M+N,6*N+2*N*N)))
+     & (LSVEC .AND. RSVEC .AND. (.NOT.JRACC) .AND.
+     &                          (LWORK.LT.MAX(2*M+N,6*N+2*N*N)))
      & .OR. (LSVEC .AND. RSVEC .AND. JRACC .AND.
-     &                          LWORK.LT.MAX0(2*M+N,4*N+N*N,2*N+N*N+6)))
+     &                          LWORK.LT.MAX(2*M+N,4*N+N*N,2*N+N*N+6)))
      &   THEN
          INFO = - 17
       ELSE
@@ -13693,7 +13725,11 @@
 *
 *     Quick return for void matrix (Y3K safe)
 * #:)
-      IF ( ( M .EQ. 0 ) .OR. ( N .EQ. 0 ) ) RETURN
+      IF ( ( M .EQ. 0 ) .OR. ( N .EQ. 0 ) ) THEN
+         IWORK(1:3) = 0
+         WORK(1:7) = 0
+         RETURN
+      ENDIF
 *
 *     Determine whether the matrix U should be M x N or M x M
 *
@@ -13748,8 +13784,8 @@
       AAPP = ZERO
       AAQQ = BIG
       DO 4781 p = 1, N
-         AAPP = DMAX1( AAPP, SVA(p) )
-         IF ( SVA(p) .NE. ZERO ) AAQQ = DMIN1( AAQQ, SVA(p) )
+         AAPP = MAX( AAPP, SVA(p) )
+         IF ( SVA(p) .NE. ZERO ) AAQQ = MIN( AAQQ, SVA(p) )
  4781 CONTINUE
 *
 *     Quick return for zero M x N matrix
@@ -13819,6 +13855,7 @@
             IWORK(1) = 0
             IWORK(2) = 0
          END IF
+         IWORK(3) = 0
          IF ( ERREST ) WORK(3) = ONE
          IF ( LSVEC .AND. RSVEC ) THEN
             WORK(4) = ONE
@@ -13853,14 +13890,14 @@
 *              in one pass through the vector
                WORK(M+N+p)  = XSC * SCALEM
                WORK(N+p)    = XSC * (SCALEM*DSQRT(TEMP1))
-               AATMAX = DMAX1( AATMAX, WORK(N+p) )
-               IF (WORK(N+p) .NE. ZERO) AATMIN = DMIN1(AATMIN,WORK(N+p))
+               AATMAX = MAX( AATMAX, WORK(N+p) )
+               IF (WORK(N+p) .NE. ZERO) AATMIN = MIN(AATMIN,WORK(N+p))
  1950       CONTINUE
          ELSE
             DO 1904 p = 1, M
                WORK(M+N+p) = SCALEM*DABS( A(p,IDAMAX(N,A(p,1),LDA)) )
-               AATMAX = DMAX1( AATMAX, WORK(M+N+p) )
-               AATMIN = DMIN1( AATMIN, WORK(M+N+p) )
+               AATMAX = MAX( AATMAX, WORK(M+N+p) )
+               AATMIN = MIN( AATMIN, WORK(M+N+p) )
  1904       CONTINUE
          END IF
 *
@@ -14065,7 +14102,7 @@
       ELSE IF ( L2RANK ) THEN
 *        .. similarly as above, only slightly more gentle (less agressive).
 *        Sudden drop on the diagonal of R1 is used as the criterion for
-*        close-to-rank-defficient.
+*        close-to-rank-deficient.
          TEMP1 = DSQRT(SFMIN)
          DO 3401 p = 2, N
             IF ( ( DABS(A(p,p)) .LT. (EPSLN*DABS(A(p-1,p-1))) ) .OR.
@@ -14098,7 +14135,7 @@
          MAXPRJ = ONE
          DO 3051 p = 2, N
             TEMP1  = DABS(A(p,p)) / SVA(IWORK(p))
-            MAXPRJ = DMIN1( MAXPRJ, TEMP1 )
+            MAXPRJ = MIN( MAXPRJ, TEMP1 )
  3051    CONTINUE
          IF ( MAXPRJ**2 .GE. ONE - DBLE(N)*EPSLN ) ALMORT = .TRUE.
       END IF
@@ -14156,7 +14193,7 @@
 *         Singular Values only
 *
 *         .. transpose A(1:NR,1:N)
-         DO 1946 p = 1, MIN0( N-1, NR )
+         DO 1946 p = 1, MIN( N-1, NR )
             CALL DCOPY( N-p, A(p,p+1), LDA, A(p+1,p), 1 )
  1946    CONTINUE
 *
@@ -14412,7 +14449,7 @@
                   XSC = DSQRT(SMALL)/EPSLN
                   DO 3959 p = 2, NR
                      DO 3958 q = 1, p - 1
-                        TEMP1 = XSC * DMIN1(DABS(V(p,p)),DABS(V(q,q)))
+                        TEMP1 = XSC * MIN(DABS(V(p,p)),DABS(V(q,q)))
                         IF ( DABS(V(q,p)) .LE. TEMP1 )
      $                     V(q,p) = DSIGN( TEMP1, V(q,p) )
  3958                CONTINUE
@@ -14451,7 +14488,7 @@
                   XSC = DSQRT(SMALL)
                   DO 3969 p = 2, NR
                      DO 3968 q = 1, p - 1
-                        TEMP1 = XSC * DMIN1(DABS(V(p,p)),DABS(V(q,q)))
+                        TEMP1 = XSC * MIN(DABS(V(p,p)),DABS(V(q,q)))
                         IF ( DABS(V(q,p)) .LE. TEMP1 )
      $                     V(q,p) = DSIGN( TEMP1, V(q,p) )
  3968                CONTINUE
@@ -14464,7 +14501,7 @@
                   XSC = DSQRT(SMALL)
                   DO 8970 p = 2, NR
                      DO 8971 q = 1, p - 1
-                        TEMP1 = XSC * DMIN1(DABS(V(p,p)),DABS(V(q,q)))
+                        TEMP1 = XSC * MIN(DABS(V(p,p)),DABS(V(q,q)))
                         V(p,q) = - DSIGN( TEMP1, V(q,p) )
  8971                CONTINUE
  8970             CONTINUE
@@ -14775,7 +14812,7 @@
             XSC = DSQRT(SMALL/EPSLN)
             DO 9970 q = 2, NR
                DO 9971 p = 1, q - 1
-                  TEMP1 = XSC * DMIN1(DABS(U(p,p)),DABS(U(q,q)))
+                  TEMP1 = XSC * MIN(DABS(U(p,p)),DABS(U(q,q)))
                   U(p,q) = - DSIGN( TEMP1, U(q,p) )
  9971          CONTINUE
  9970       CONTINUE
@@ -14883,31 +14920,31 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DGELQ2 + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dgelq2.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dgelq2.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dgelq2.f"> 
+*> Download DGELQ2 + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dgelq2.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dgelq2.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dgelq2.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       SUBROUTINE DGELQ2( M, N, A, LDA, TAU, WORK, INFO )
-* 
+*
 *       .. Scalar Arguments ..
 *       INTEGER            INFO, LDA, M, N
 *       ..
 *       .. Array Arguments ..
 *       DOUBLE PRECISION   A( LDA, * ), TAU( * ), WORK( * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -14972,12 +15009,12 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date September 2012
+*> \date December 2016
 *
 *> \ingroup doubleGEcomputational
 *
@@ -15002,10 +15039,10 @@
 *  =====================================================================
       SUBROUTINE DGELQ2( M, N, A, LDA, TAU, WORK, INFO )
 *
-*  -- LAPACK computational routine (version 3.4.2) --
+*  -- LAPACK computational routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     September 2012
+*     December 2016
 *
 *     .. Scalar Arguments ..
       INTEGER            INFO, LDA, M, N
@@ -15075,31 +15112,31 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DGELQF + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dgelqf.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dgelqf.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dgelqf.f"> 
+*> Download DGELQF + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dgelqf.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dgelqf.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dgelqf.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       SUBROUTINE DGELQF( M, N, A, LDA, TAU, WORK, LWORK, INFO )
-* 
+*
 *       .. Scalar Arguments ..
 *       INTEGER            INFO, LDA, LWORK, M, N
 *       ..
 *       .. Array Arguments ..
 *       DOUBLE PRECISION   A( LDA, * ), TAU( * ), WORK( * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -15178,12 +15215,12 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date November 2011
+*> \date December 2016
 *
 *> \ingroup doubleGEcomputational
 *
@@ -15208,10 +15245,10 @@
 *  =====================================================================
       SUBROUTINE DGELQF( M, N, A, LDA, TAU, WORK, LWORK, INFO )
 *
-*  -- LAPACK computational routine (version 3.4.0) --
+*  -- LAPACK computational routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     November 2011
+*     December 2016
 *
 *     .. Scalar Arguments ..
       INTEGER            INFO, LDA, LWORK, M, N
@@ -15344,25 +15381,25 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DGELS + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dgels.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dgels.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dgels.f"> 
+*> Download DGELS + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dgels.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dgels.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dgels.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       SUBROUTINE DGELS( TRANS, M, N, NRHS, A, LDA, B, LDB, WORK, LWORK,
 *                         INFO )
-* 
+*
 *       .. Scalar Arguments ..
 *       CHARACTER          TRANS
 *       INTEGER            INFO, LDA, LDB, LWORK, M, N, NRHS
@@ -15370,7 +15407,7 @@
 *       .. Array Arguments ..
 *       DOUBLE PRECISION   A( LDA, * ), B( LDB, * ), WORK( * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -15391,7 +15428,7 @@
 *>    an underdetermined system A * X = B.
 *>
 *> 3. If TRANS = 'T' and m >= n:  find the minimum norm solution of
-*>    an undetermined system A**T * X = B.
+*>    an underdetermined system A**T * X = B.
 *>
 *> 4. If TRANS = 'T' and m < n:  find the least squares solution of
 *>    an overdetermined system, i.e., solve the least squares problem
@@ -15512,12 +15549,12 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date November 2011
+*> \date December 2016
 *
 *> \ingroup doubleGEsolve
 *
@@ -15525,10 +15562,10 @@
       SUBROUTINE DGELS( TRANS, M, N, NRHS, A, LDA, B, LDB, WORK, LWORK,
      $                  INFO )
 *
-*  -- LAPACK driver routine (version 3.4.0) --
+*  -- LAPACK driver routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     November 2011
+*     December 2016
 *
 *     .. Scalar Arguments ..
       CHARACTER          TRANS
@@ -15721,7 +15758,7 @@
 *
          ELSE
 *
-*           Overdetermined system of equations A**T * X = B
+*           Underdetermined system of equations A**T * X = B
 *
 *           B(1:N,1:NRHS) := inv(R**T) * B(1:N,1:NRHS)
 *
@@ -15848,25 +15885,25 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DGELSD + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dgelsd.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dgelsd.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dgelsd.f"> 
+*> Download DGELSD + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dgelsd.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dgelsd.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dgelsd.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       SUBROUTINE DGELSD( M, N, NRHS, A, LDA, B, LDB, S, RCOND, RANK,
 *                          WORK, LWORK, IWORK, INFO )
-* 
+*
 *       .. Scalar Arguments ..
 *       INTEGER            INFO, LDA, LDB, LWORK, M, N, NRHS, RANK
 *       DOUBLE PRECISION   RCOND
@@ -15875,7 +15912,7 @@
 *       INTEGER            IWORK( * )
 *       DOUBLE PRECISION   A( LDA, * ), B( LDB, * ), S( * ), WORK( * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -15898,7 +15935,7 @@
 *>     Householder transformations, reducing the original problem
 *>     into a "bidiagonal least squares problem" (BLS)
 *> (2) Solve the BLS using a divide and conquer approach.
-*> (3) Apply back all the Householder tranformations to solve
+*> (3) Apply back all the Householder transformations to solve
 *>     the original least squares problem.
 *>
 *> The effective rank of A is determined by treating as zero those
@@ -16035,12 +16072,12 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date November 2011
+*> \date December 2016
 *
 *> \ingroup doubleGEsolve
 *
@@ -16055,10 +16092,10 @@
       SUBROUTINE DGELSD( M, N, NRHS, A, LDA, B, LDB, S, RCOND, RANK,
      $                   WORK, LWORK, IWORK, INFO )
 *
-*  -- LAPACK driver routine (version 3.4.0) --
+*  -- LAPACK driver routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     November 2011
+*     December 2016
 *
 *     .. Scalar Arguments ..
       INTEGER            INFO, LDA, LDB, LWORK, M, N, NRHS, RANK
@@ -16477,25 +16514,25 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DGELSS + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dgelss.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dgelss.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dgelss.f"> 
+*> Download DGELSS + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dgelss.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dgelss.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dgelss.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       SUBROUTINE DGELSS( M, N, NRHS, A, LDA, B, LDB, S, RCOND, RANK,
 *                          WORK, LWORK, INFO )
-* 
+*
 *       .. Scalar Arguments ..
 *       INTEGER            INFO, LDA, LDB, LWORK, M, N, NRHS, RANK
 *       DOUBLE PRECISION   RCOND
@@ -16503,7 +16540,7 @@
 *       .. Array Arguments ..
 *       DOUBLE PRECISION   A( LDA, * ), B( LDB, * ), S( * ), WORK( * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -16634,12 +16671,12 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date November 2011
+*> \date December 2016
 *
 *> \ingroup doubleGEsolve
 *
@@ -16647,10 +16684,10 @@
       SUBROUTINE DGELSS( M, N, NRHS, A, LDA, B, LDB, S, RCOND, RANK,
      $                   WORK, LWORK, INFO )
 *
-*  -- LAPACK driver routine (version 3.4.0) --
+*  -- LAPACK driver routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     November 2011
+*     December 2016
 *
 *     .. Scalar Arguments ..
       INTEGER            INFO, LDA, LDB, LWORK, M, N, NRHS, RANK
@@ -16760,7 +16797,7 @@
                CALL DORGBR( 'P', N, N, N, A, LDA, DUM(1),
      $                   DUM(1), -1, INFO )
                LWORK_DORGBR=DUM(1)
-*              Compute total workspace needed 
+*              Compute total workspace needed
                MAXWRK = MAX( MAXWRK, 3*N + LWORK_DGEBRD )
                MAXWRK = MAX( MAXWRK, 3*N + LWORK_DORMBR )
                MAXWRK = MAX( MAXWRK, 3*N + LWORK_DORGBR )
@@ -16789,7 +16826,7 @@
      $                      DUM(1), DUM(1), -1, INFO )
                   LWORK_DGEBRD=DUM(1)
 *                 Compute space needed for DORMBR
-                  CALL DORMBR( 'Q', 'L', 'T', M, NRHS, N, A, LDA, 
+                  CALL DORMBR( 'Q', 'L', 'T', M, NRHS, N, A, LDA,
      $                DUM(1), B, LDB, DUM(1), -1, INFO )
                   LWORK_DORMBR=DUM(1)
 *                 Compute space needed for DORGBR
@@ -16800,7 +16837,7 @@
                   CALL DORMLQ( 'L', 'T', N, NRHS, M, A, LDA, DUM(1),
      $                 B, LDB, DUM(1), -1, INFO )
                   LWORK_DORMLQ=DUM(1)
-*                 Compute total workspace needed 
+*                 Compute total workspace needed
                   MAXWRK = M + LWORK_DGELQF
                   MAXWRK = MAX( MAXWRK, M*M + 4*M + LWORK_DGEBRD )
                   MAXWRK = MAX( MAXWRK, M*M + 4*M + LWORK_DORMBR )
@@ -16821,7 +16858,7 @@
      $                      DUM(1), DUM(1), -1, INFO )
                   LWORK_DGEBRD=DUM(1)
 *                 Compute space needed for DORMBR
-                  CALL DORMBR( 'Q', 'L', 'T', M, NRHS, M, A, LDA, 
+                  CALL DORMBR( 'Q', 'L', 'T', M, NRHS, M, A, LDA,
      $                DUM(1), B, LDB, DUM(1), -1, INFO )
                   LWORK_DORMBR=DUM(1)
 *                 Compute space needed for DORGBR
@@ -17224,25 +17261,25 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DGELSX + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dgelsx.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dgelsx.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dgelsx.f"> 
+*> Download DGELSX + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dgelsx.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dgelsx.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dgelsx.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       SUBROUTINE DGELSX( M, N, NRHS, A, LDA, B, LDB, JPVT, RCOND, RANK,
 *                          WORK, INFO )
-* 
+*
 *       .. Scalar Arguments ..
 *       INTEGER            INFO, LDA, LDB, M, N, NRHS, RANK
 *       DOUBLE PRECISION   RCOND
@@ -17251,7 +17288,7 @@
 *       INTEGER            JPVT( * )
 *       DOUBLE PRECISION   A( LDA, * ), B( LDB, * ), WORK( * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -17387,12 +17424,12 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date November 2011
+*> \date December 2016
 *
 *> \ingroup doubleGEsolve
 *
@@ -17400,10 +17437,10 @@
       SUBROUTINE DGELSX( M, N, NRHS, A, LDA, B, LDB, JPVT, RCOND, RANK,
      $                   WORK, INFO )
 *
-*  -- LAPACK driver routine (version 3.4.0) --
+*  -- LAPACK driver routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     November 2011
+*     December 2016
 *
 *     .. Scalar Arguments ..
       INTEGER            INFO, LDA, LDB, M, N, NRHS, RANK
@@ -17659,25 +17696,25 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DGELSY + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dgelsy.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dgelsy.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dgelsy.f"> 
+*> Download DGELSY + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dgelsy.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dgelsy.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dgelsy.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       SUBROUTINE DGELSY( M, N, NRHS, A, LDA, B, LDB, JPVT, RCOND, RANK,
 *                          WORK, LWORK, INFO )
-* 
+*
 *       .. Scalar Arguments ..
 *       INTEGER            INFO, LDA, LDB, LWORK, M, N, NRHS, RANK
 *       DOUBLE PRECISION   RCOND
@@ -17686,7 +17723,7 @@
 *       INTEGER            JPVT( * )
 *       DOUBLE PRECISION   A( LDA, * ), B( LDB, * ), WORK( * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -17841,19 +17878,19 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date November 2011
+*> \date December 2016
 *
 *> \ingroup doubleGEsolve
 *
 *> \par Contributors:
 *  ==================
 *>
-*>    A. Petitet, Computer Science Dept., Univ. of Tenn., Knoxville, USA \n 
+*>    A. Petitet, Computer Science Dept., Univ. of Tenn., Knoxville, USA \n
 *>    E. Quintana-Orti, Depto. de Informatica, Universidad Jaime I, Spain \n
 *>    G. Quintana-Orti, Depto. de Informatica, Universidad Jaime I, Spain \n
 *>
@@ -17861,10 +17898,10 @@
       SUBROUTINE DGELSY( M, N, NRHS, A, LDA, B, LDB, JPVT, RCOND, RANK,
      $                   WORK, LWORK, INFO )
 *
-*  -- LAPACK driver routine (version 3.4.0) --
+*  -- LAPACK driver routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     November 2011
+*     December 2016
 *
 *     .. Scalar Arguments ..
       INTEGER            INFO, LDA, LDB, LWORK, M, N, NRHS, RANK
@@ -18138,25 +18175,25 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DGEMQRT + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dgemqrt.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dgemqrt.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dgemqrt.f"> 
+*> Download DGEMQRT + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dgemqrt.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dgemqrt.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dgemqrt.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
-*       SUBROUTINE DGEMQRT( SIDE, TRANS, M, N, K, NB, V, LDV, T, LDT, 
+*       SUBROUTINE DGEMQRT( SIDE, TRANS, M, N, K, NB, V, LDV, T, LDT,
 *                          C, LDC, WORK, INFO )
-* 
+*
 *       .. Scalar Arguments ..
 *       CHARACTER SIDE, TRANS
 *       INTEGER   INFO, K, LDV, LDC, M, N, NB, LDT
@@ -18164,7 +18201,7 @@
 *       .. Array Arguments ..
 *       DOUBLE PRECISION V( LDV, * ), C( LDC, * ), T( LDT, * ), WORK( * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -18182,7 +18219,7 @@
 *>
 *>       Q = H(1) H(2) . . . H(K) = I - V T V**T
 *>
-*> generated using the compact WY representation as returned by DGEQRT. 
+*> generated using the compact WY representation as returned by DGEQRT.
 *>
 *> Q is of order M if SIDE = 'L' and of order N  if SIDE = 'R'.
 *> \endverbatim
@@ -18291,23 +18328,23 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date November 2013
+*> \date December 2016
 *
 *> \ingroup doubleGEcomputational
 *
 *  =====================================================================
-      SUBROUTINE DGEMQRT( SIDE, TRANS, M, N, K, NB, V, LDV, T, LDT, 
+      SUBROUTINE DGEMQRT( SIDE, TRANS, M, N, K, NB, V, LDV, T, LDT,
      $                   C, LDC, WORK, INFO )
 *
-*  -- LAPACK computational routine (version 3.5.0) --
+*  -- LAPACK computational routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     November 2013
+*     December 2016
 *
 *     .. Scalar Arguments ..
       CHARACTER SIDE, TRANS
@@ -18343,7 +18380,7 @@
       RIGHT  = LSAME( SIDE,  'R' )
       TRAN   = LSAME( TRANS, 'T' )
       NOTRAN = LSAME( TRANS, 'N' )
-*      
+*
       IF( LEFT ) THEN
          LDWORK = MAX( 1, N )
          Q = M
@@ -18384,17 +18421,17 @@
 *
          DO I = 1, K, NB
             IB = MIN( NB, K-I+1 )
-            CALL DLARFB( 'L', 'T', 'F', 'C', M-I+1, N, IB, 
-     $                   V( I, I ), LDV, T( 1, I ), LDT, 
+            CALL DLARFB( 'L', 'T', 'F', 'C', M-I+1, N, IB,
+     $                   V( I, I ), LDV, T( 1, I ), LDT,
      $                   C( I, 1 ), LDC, WORK, LDWORK )
          END DO
-*         
+*
       ELSE IF( RIGHT .AND. NOTRAN ) THEN
 *
          DO I = 1, K, NB
             IB = MIN( NB, K-I+1 )
-            CALL DLARFB( 'R', 'N', 'F', 'C', M, N-I+1, IB, 
-     $                   V( I, I ), LDV, T( 1, I ), LDT, 
+            CALL DLARFB( 'R', 'N', 'F', 'C', M, N-I+1, IB,
+     $                   V( I, I ), LDV, T( 1, I ), LDT,
      $                   C( 1, I ), LDC, WORK, LDWORK )
          END DO
 *
@@ -18402,9 +18439,9 @@
 *
          KF = ((K-1)/NB)*NB+1
          DO I = KF, 1, -NB
-            IB = MIN( NB, K-I+1 )         
-            CALL DLARFB( 'L', 'N', 'F', 'C', M-I+1, N, IB, 
-     $                   V( I, I ), LDV, T( 1, I ), LDT, 
+            IB = MIN( NB, K-I+1 )
+            CALL DLARFB( 'L', 'N', 'F', 'C', M-I+1, N, IB,
+     $                   V( I, I ), LDV, T( 1, I ), LDT,
      $                   C( I, 1 ), LDC, WORK, LDWORK )
          END DO
 *
@@ -18412,9 +18449,9 @@
 *
          KF = ((K-1)/NB)*NB+1
          DO I = KF, 1, -NB
-            IB = MIN( NB, K-I+1 )         
-            CALL DLARFB( 'R', 'T', 'F', 'C', M, N-I+1, IB, 
-     $                   V( I, I ), LDV, T( 1, I ), LDT, 
+            IB = MIN( NB, K-I+1 )
+            CALL DLARFB( 'R', 'T', 'F', 'C', M, N-I+1, IB,
+     $                   V( I, I ), LDV, T( 1, I ), LDT,
      $                   C( 1, I ), LDC, WORK, LDWORK )
          END DO
 *
@@ -18429,31 +18466,31 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DGEQL2 + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dgeql2.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dgeql2.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dgeql2.f"> 
+*> Download DGEQL2 + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dgeql2.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dgeql2.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dgeql2.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       SUBROUTINE DGEQL2( M, N, A, LDA, TAU, WORK, INFO )
-* 
+*
 *       .. Scalar Arguments ..
 *       INTEGER            INFO, LDA, M, N
 *       ..
 *       .. Array Arguments ..
 *       DOUBLE PRECISION   A( LDA, * ), TAU( * ), WORK( * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -18520,12 +18557,12 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date September 2012
+*> \date December 2016
 *
 *> \ingroup doubleGEcomputational
 *
@@ -18550,10 +18587,10 @@
 *  =====================================================================
       SUBROUTINE DGEQL2( M, N, A, LDA, TAU, WORK, INFO )
 *
-*  -- LAPACK computational routine (version 3.4.2) --
+*  -- LAPACK computational routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     September 2012
+*     December 2016
 *
 *     .. Scalar Arguments ..
       INTEGER            INFO, LDA, M, N
@@ -18622,31 +18659,31 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DGEQLF + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dgeqlf.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dgeqlf.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dgeqlf.f"> 
+*> Download DGEQLF + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dgeqlf.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dgeqlf.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dgeqlf.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       SUBROUTINE DGEQLF( M, N, A, LDA, TAU, WORK, LWORK, INFO )
-* 
+*
 *       .. Scalar Arguments ..
 *       INTEGER            INFO, LDA, LWORK, M, N
 *       ..
 *       .. Array Arguments ..
 *       DOUBLE PRECISION   A( LDA, * ), TAU( * ), WORK( * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -18728,12 +18765,12 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date November 2011
+*> \date December 2016
 *
 *> \ingroup doubleGEcomputational
 *
@@ -18758,10 +18795,10 @@
 *  =====================================================================
       SUBROUTINE DGEQLF( M, N, A, LDA, TAU, WORK, LWORK, INFO )
 *
-*  -- LAPACK computational routine (version 3.4.0) --
+*  -- LAPACK computational routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     November 2011
+*     December 2016
 *
 *     .. Scalar Arguments ..
       INTEGER            INFO, LDA, LWORK, M, N
@@ -18909,24 +18946,24 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DGEQP3 + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dgeqp3.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dgeqp3.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dgeqp3.f"> 
+*> Download DGEQP3 + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dgeqp3.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dgeqp3.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dgeqp3.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       SUBROUTINE DGEQP3( M, N, A, LDA, JPVT, TAU, WORK, LWORK, INFO )
-* 
+*
 *       .. Scalar Arguments ..
 *       INTEGER            INFO, LDA, LWORK, M, N
 *       ..
@@ -18934,7 +18971,7 @@
 *       INTEGER            JPVT( * )
 *       DOUBLE PRECISION   A( LDA, * ), TAU( * ), WORK( * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -19022,12 +19059,12 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date September 2012
+*> \date December 2016
 *
 *> \ingroup doubleGEcomputational
 *
@@ -19058,10 +19095,10 @@
 *  =====================================================================
       SUBROUTINE DGEQP3( M, N, A, LDA, JPVT, TAU, WORK, LWORK, INFO )
 *
-*  -- LAPACK computational routine (version 3.4.2) --
+*  -- LAPACK computational routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     September 2012
+*     December 2016
 *
 *     .. Scalar Arguments ..
       INTEGER            INFO, LDA, LWORK, M, N
@@ -19132,12 +19169,6 @@
          RETURN
       END IF
 *
-*     Quick return if possible.
-*
-      IF( MINMN.EQ.0 ) THEN
-         RETURN
-      END IF
-*
 *     Move initial columns up front.
 *
       NFXD = 1
@@ -19276,24 +19307,24 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DGEQPF + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dgeqpf.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dgeqpf.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dgeqpf.f"> 
+*> Download DGEQPF + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dgeqpf.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dgeqpf.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dgeqpf.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       SUBROUTINE DGEQPF( M, N, A, LDA, JPVT, TAU, WORK, INFO )
-* 
+*
 *       .. Scalar Arguments ..
 *       INTEGER            INFO, LDA, M, N
 *       ..
@@ -19301,7 +19332,7 @@
 *       INTEGER            JPVT( * )
 *       DOUBLE PRECISION   A( LDA, * ), TAU( * ), WORK( * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -19377,12 +19408,12 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date November 2011
+*> \date December 2016
 *
 *> \ingroup doubleGEcomputational
 *
@@ -19416,10 +19447,10 @@
 *  =====================================================================
       SUBROUTINE DGEQPF( M, N, A, LDA, JPVT, TAU, WORK, INFO )
 *
-*  -- LAPACK computational routine (version 3.4.0) --
+*  -- LAPACK computational routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     November 2011
+*     December 2016
 *
 *     .. Scalar Arguments ..
       INTEGER            INFO, LDA, M, N
@@ -19553,11 +19584,11 @@
 *
 *                 NOTE: The following 4 lines follow from the analysis in
 *                 Lapack Working Note 176.
-*                 
+*
                   TEMP = ABS( A( I, J ) ) / WORK( J )
                   TEMP = MAX( ZERO, ( ONE+TEMP )*( ONE-TEMP ) )
                   TEMP2 = TEMP*( WORK( J ) / WORK( N+J ) )**2
-                  IF( TEMP2 .LE. TOL3Z ) THEN 
+                  IF( TEMP2 .LE. TOL3Z ) THEN
                      IF( M-I.GT.0 ) THEN
                         WORK( J ) = DNRM2( M-I, A( I+1, J ), 1 )
                         WORK( N+J ) = WORK( J )
@@ -19582,31 +19613,31 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DGEQR2 + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dgeqr2.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dgeqr2.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dgeqr2.f"> 
+*> Download DGEQR2 + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dgeqr2.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dgeqr2.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dgeqr2.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       SUBROUTINE DGEQR2( M, N, A, LDA, TAU, WORK, INFO )
-* 
+*
 *       .. Scalar Arguments ..
 *       INTEGER            INFO, LDA, M, N
 *       ..
 *       .. Array Arguments ..
 *       DOUBLE PRECISION   A( LDA, * ), TAU( * ), WORK( * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -19671,12 +19702,12 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date September 2012
+*> \date December 2016
 *
 *> \ingroup doubleGEcomputational
 *
@@ -19701,10 +19732,10 @@
 *  =====================================================================
       SUBROUTINE DGEQR2( M, N, A, LDA, TAU, WORK, INFO )
 *
-*  -- LAPACK computational routine (version 3.4.2) --
+*  -- LAPACK computational routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     September 2012
+*     December 2016
 *
 *     .. Scalar Arguments ..
       INTEGER            INFO, LDA, M, N
@@ -19774,39 +19805,39 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DGEQR2P + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dgeqr2p.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dgeqr2p.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dgeqr2p.f"> 
+*> Download DGEQR2P + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dgeqr2p.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dgeqr2p.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dgeqr2p.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       SUBROUTINE DGEQR2P( M, N, A, LDA, TAU, WORK, INFO )
-* 
+*
 *       .. Scalar Arguments ..
 *       INTEGER            INFO, LDA, M, N
 *       ..
 *       .. Array Arguments ..
 *       DOUBLE PRECISION   A( LDA, * ), TAU( * ), WORK( * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
 *>
 *> \verbatim
 *>
-*> DGEQR2 computes a QR factorization of a real m by n matrix A:
-*> A = Q * R.
+*> DGEQR2P computes a QR factorization of a real m by n matrix A:
+*> A = Q * R. The diagonal entries of R are nonnegative.
 *> \endverbatim
 *
 *  Arguments:
@@ -19830,7 +19861,8 @@
 *>          On entry, the m by n matrix A.
 *>          On exit, the elements on and above the diagonal of the array
 *>          contain the min(m,n) by n upper trapezoidal matrix R (R is
-*>          upper triangular if m >= n); the elements below the diagonal,
+*>          upper triangular if m >= n). The diagonal entries of R are
+*>          nonnegative; the elements below the diagonal,
 *>          with the array TAU, represent the orthogonal matrix Q as a
 *>          product of elementary reflectors (see Further Details).
 *> \endverbatim
@@ -19863,12 +19895,12 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date September 2012
+*> \date December 2016
 *
 *> \ingroup doubleGEcomputational
 *
@@ -19888,15 +19920,17 @@
 *>  where tau is a real scalar, and v is a real vector with
 *>  v(1:i-1) = 0 and v(i) = 1; v(i+1:m) is stored on exit in A(i+1:m,i),
 *>  and tau in TAU(i).
+*>
+*> See Lapack Working Note 203 for details
 *> \endverbatim
 *>
 *  =====================================================================
       SUBROUTINE DGEQR2P( M, N, A, LDA, TAU, WORK, INFO )
 *
-*  -- LAPACK computational routine (version 3.4.2) --
+*  -- LAPACK computational routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     September 2012
+*     December 2016
 *
 *     .. Scalar Arguments ..
       INTEGER            INFO, LDA, M, N
@@ -19966,31 +20000,31 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DGEQRF + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dgeqrf.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dgeqrf.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dgeqrf.f"> 
+*> Download DGEQRF + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dgeqrf.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dgeqrf.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dgeqrf.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       SUBROUTINE DGEQRF( M, N, A, LDA, TAU, WORK, LWORK, INFO )
-* 
+*
 *       .. Scalar Arguments ..
 *       INTEGER            INFO, LDA, LWORK, M, N
 *       ..
 *       .. Array Arguments ..
 *       DOUBLE PRECISION   A( LDA, * ), TAU( * ), WORK( * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -20070,12 +20104,12 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date November 2011
+*> \date December 2016
 *
 *> \ingroup doubleGEcomputational
 *
@@ -20100,10 +20134,10 @@
 *  =====================================================================
       SUBROUTINE DGEQRF( M, N, A, LDA, TAU, WORK, LWORK, INFO )
 *
-*  -- LAPACK computational routine (version 3.4.0) --
+*  -- LAPACK computational routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     November 2011
+*     December 2016
 *
 *     .. Scalar Arguments ..
       INTEGER            INFO, LDA, LWORK, M, N
@@ -20236,31 +20270,31 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DGEQRFP + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dgeqrfp.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dgeqrfp.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dgeqrfp.f"> 
+*> Download DGEQRFP + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dgeqrfp.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dgeqrfp.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dgeqrfp.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       SUBROUTINE DGEQRFP( M, N, A, LDA, TAU, WORK, LWORK, INFO )
-* 
+*
 *       .. Scalar Arguments ..
 *       INTEGER            INFO, LDA, LWORK, M, N
 *       ..
 *       .. Array Arguments ..
 *       DOUBLE PRECISION   A( LDA, * ), TAU( * ), WORK( * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -20268,7 +20302,7 @@
 *> \verbatim
 *>
 *> DGEQRFP computes a QR factorization of a real M-by-N matrix A:
-*> A = Q * R.
+*> A = Q * R. The diagonal entries of R are nonnegative.
 *> \endverbatim
 *
 *  Arguments:
@@ -20292,7 +20326,8 @@
 *>          On entry, the M-by-N matrix A.
 *>          On exit, the elements on and above the diagonal of the array
 *>          contain the min(M,N)-by-N upper trapezoidal matrix R (R is
-*>          upper triangular if m >= n); the elements below the diagonal,
+*>          upper triangular if m >= n). The diagonal entries of R
+*>          are nonnegative; the elements below the diagonal,
 *>          with the array TAU, represent the orthogonal matrix Q as a
 *>          product of min(m,n) elementary reflectors (see Further
 *>          Details).
@@ -20340,12 +20375,12 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date November 2011
+*> \date December 2016
 *
 *> \ingroup doubleGEcomputational
 *
@@ -20365,15 +20400,17 @@
 *>  where tau is a real scalar, and v is a real vector with
 *>  v(1:i-1) = 0 and v(i) = 1; v(i+1:m) is stored on exit in A(i+1:m,i),
 *>  and tau in TAU(i).
+*>
+*> See Lapack Working Note 203 for details
 *> \endverbatim
 *>
 *  =====================================================================
       SUBROUTINE DGEQRFP( M, N, A, LDA, TAU, WORK, LWORK, INFO )
 *
-*  -- LAPACK computational routine (version 3.4.0) --
+*  -- LAPACK computational routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     November 2011
+*     December 2016
 *
 *     .. Scalar Arguments ..
       INTEGER            INFO, LDA, LWORK, M, N
@@ -20506,31 +20543,31 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DGEQRT + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dgeqrt.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dgeqrt.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dgeqrt.f"> 
+*> Download DGEQRT + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dgeqrt.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dgeqrt.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dgeqrt.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       SUBROUTINE DGEQRT( M, N, NB, A, LDA, T, LDT, WORK, INFO )
-* 
+*
 *       .. Scalar Arguments ..
 *       INTEGER INFO, LDA, LDT, M, N, NB
 *       ..
 *       .. Array Arguments ..
 *       DOUBLE PRECISION A( LDA, * ), T( LDT, * ), WORK( * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -20538,7 +20575,7 @@
 *> \verbatim
 *>
 *> DGEQRT computes a blocked QR factorization of a real M-by-N matrix A
-*> using the compact WY representation of Q.  
+*> using the compact WY representation of Q.
 *> \endverbatim
 *
 *  Arguments:
@@ -20607,12 +20644,12 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date November 2013
+*> \date December 2016
 *
 *> \ingroup doubleGEcomputational
 *
@@ -20634,9 +20671,9 @@
 *>  in the matrix A.  The 1's along the diagonal of V are not stored in A.
 *>
 *>  Let K=MIN(M,N).  The number of blocks is B = ceiling(K/NB), where each
-*>  block is of order NB except for the last block, which is of order 
+*>  block is of order NB except for the last block, which is of order
 *>  IB = K - (B-1)*NB.  For each of the B blocks, a upper triangular block
-*>  reflector factor is computed: T1, T2, ..., TB.  The NB-by-NB (and IB-by-IB 
+*>  reflector factor is computed: T1, T2, ..., TB.  The NB-by-NB (and IB-by-IB
 *>  for the last block) T's are stored in the NB-by-N matrix T as
 *>
 *>               T = (T1 T2 ... TB).
@@ -20645,10 +20682,10 @@
 *  =====================================================================
       SUBROUTINE DGEQRT( M, N, NB, A, LDA, T, LDT, WORK, INFO )
 *
-*  -- LAPACK computational routine (version 3.5.0) --
+*  -- LAPACK computational routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     November 2013
+*     December 2016
 *
 *     .. Scalar Arguments ..
       INTEGER INFO, LDA, LDT, M, N, NB
@@ -20698,7 +20735,7 @@
 *
       DO I = 1, K,  NB
          IB = MIN( K-I+1, NB )
-*     
+*
 *     Compute the QR factorization of the current block A(I:M,I:I+IB-1)
 *
          IF( USE_RECURSIVE_QR ) THEN
@@ -20711,12 +20748,12 @@
 *     Update by applying H**T to A(I:M,I+IB:N) from the left
 *
             CALL DLARFB( 'L', 'T', 'F', 'C', M-I+1, N-I-IB+1, IB,
-     $                   A( I, I ), LDA, T( 1, I ), LDT, 
+     $                   A( I, I ), LDA, T( 1, I ), LDT,
      $                   A( I, I+IB ), LDA, WORK , N-I-IB+1 )
          END IF
       END DO
       RETURN
-*     
+*
 *     End of DGEQRT
 *
       END
@@ -20724,39 +20761,39 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DGEQRT2 + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dgeqrt2.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dgeqrt2.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dgeqrt2.f"> 
+*> Download DGEQRT2 + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dgeqrt2.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dgeqrt2.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dgeqrt2.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       SUBROUTINE DGEQRT2( M, N, A, LDA, T, LDT, INFO )
-* 
+*
 *       .. Scalar Arguments ..
 *       INTEGER   INFO, LDA, LDT, M, N
 *       ..
 *       .. Array Arguments ..
 *       DOUBLE PRECISION   A( LDA, * ), T( LDT, * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
 *>
 *> \verbatim
 *>
-*> DGEQRT2 computes a QR factorization of a real M-by-N matrix A, 
-*> using the compact WY representation of Q. 
+*> DGEQRT2 computes a QR factorization of a real M-by-N matrix A,
+*> using the compact WY representation of Q.
 *> \endverbatim
 *
 *  Arguments:
@@ -20814,12 +20851,12 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date September 2012
+*> \date December 2016
 *
 *> \ingroup doubleGEcomputational
 *
@@ -20849,10 +20886,10 @@
 *  =====================================================================
       SUBROUTINE DGEQRT2( M, N, A, LDA, T, LDT, INFO )
 *
-*  -- LAPACK computational routine (version 3.4.2) --
+*  -- LAPACK computational routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     September 2012
+*     December 2016
 *
 *     .. Scalar Arguments ..
       INTEGER   INFO, LDA, LDT, M, N
@@ -20892,7 +20929,7 @@
          CALL XERBLA( 'DGEQRT2', -INFO )
          RETURN
       END IF
-*      
+*
       K = MIN( M, N )
 *
       DO I = 1, K
@@ -20910,13 +20947,13 @@
 *
 *           W(1:N-I) := A(I:M,I+1:N)^H * A(I:M,I) [W = T(:,N)]
 *
-            CALL DGEMV( 'T',M-I+1, N-I, ONE, A( I, I+1 ), LDA, 
+            CALL DGEMV( 'T',M-I+1, N-I, ONE, A( I, I+1 ), LDA,
      $                  A( I, I ), 1, ZERO, T( 1, N ), 1 )
 *
 *           A(I:M,I+1:N) = A(I:m,I+1:N) + alpha*A(I:M,I)*W(1:N-1)^H
 *
             ALPHA = -(T( I, 1 ))
-            CALL DGER( M-I+1, N-I, ALPHA, A( I, I ), 1, 
+            CALL DGER( M-I+1, N-I, ALPHA, A( I, I ), 1,
      $           T( 1, N ), 1, A( I, I+1 ), LDA )
             A( I, I ) = AII
          END IF
@@ -20929,7 +20966,7 @@
 *        T(1:I-1,I) := alpha * A(I:M,1:I-1)**T * A(I:M,I)
 *
          ALPHA = -T( I, 1 )
-         CALL DGEMV( 'T', M-I+1, I-1, ALPHA, A( I, 1 ), LDA, 
+         CALL DGEMV( 'T', M-I+1, I-1, ALPHA, A( I, 1 ), LDA,
      $               A( I, I ), 1, ZERO, T( 1, I ), 1 )
          A( I, I ) = AII
 *
@@ -20942,7 +20979,7 @@
             T( I, I ) = T( I, 1 )
             T( I, 1) = ZERO
       END DO
-   
+
 *
 *     End of DGEQRT2
 *
@@ -20951,41 +20988,41 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DGEQRT3 + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dgeqrt3.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dgeqrt3.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dgeqrt3.f"> 
+*> Download DGEQRT3 + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dgeqrt3.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dgeqrt3.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dgeqrt3.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       RECURSIVE SUBROUTINE DGEQRT3( M, N, A, LDA, T, LDT, INFO )
-* 
+*
 *       .. Scalar Arguments ..
 *       INTEGER   INFO, LDA, M, N, LDT
 *       ..
 *       .. Array Arguments ..
 *       DOUBLE PRECISION   A( LDA, * ), T( LDT, * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
 *>
 *> \verbatim
 *>
-*> DGEQRT3 recursively computes a QR factorization of a real M-by-N 
-*> matrix A, using the compact WY representation of Q. 
+*> DGEQRT3 recursively computes a QR factorization of a real M-by-N
+*> matrix A, using the compact WY representation of Q.
 *>
-*> Based on the algorithm of Elmroth and Gustavson, 
+*> Based on the algorithm of Elmroth and Gustavson,
 *> IBM J. Res. Develop. Vol 44 No. 4 July 2000.
 *> \endverbatim
 *
@@ -21044,12 +21081,12 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date September 2012
+*> \date June 2016
 *
 *> \ingroup doubleGEcomputational
 *
@@ -21081,10 +21118,10 @@
 *  =====================================================================
       RECURSIVE SUBROUTINE DGEQRT3( M, N, A, LDA, T, LDT, INFO )
 *
-*  -- LAPACK computational routine (version 3.4.2) --
+*  -- LAPACK computational routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     September 2012
+*     June 2016
 *
 *     .. Scalar Arguments ..
       INTEGER   INFO, LDA, M, N, LDT
@@ -21126,9 +21163,8 @@
 *
 *        Compute Householder transform when N=1
 *
-*  R change to stop gfortran warning
          CALL DLARFG( M, A(1,1), A( MIN( 2, M ), 1 ), 1, T(1,1) )
-*         
+*
       ELSE
 *
 *        Otherwise, split A into blocks...
@@ -21149,7 +21185,7 @@
                T( I, J+N1 ) = A( I, J+N1 )
             END DO
          END DO
-         CALL DTRMM( 'L', 'L', 'T', 'U', N1, N2, ONE, 
+         CALL DTRMM( 'L', 'L', 'T', 'U', N1, N2, ONE,
      &               A, LDA, T( 1, J1 ), LDT )
 *
          CALL DGEMM( 'T', 'N', N1, N2, M-N1, ONE, A( J1, 1 ), LDA,
@@ -21158,7 +21194,7 @@
          CALL DTRMM( 'L', 'U', 'T', 'N', N1, N2, ONE,
      &               T, LDT, T( 1, J1 ), LDT )
 *
-         CALL DGEMM( 'N', 'N', M-N1, N2, N1, -ONE, A( J1, 1 ), LDA, 
+         CALL DGEMM( 'N', 'N', M-N1, N2, N1, -ONE, A( J1, 1 ), LDA,
      &               T( 1, J1 ), LDT, ONE, A( J1, J1 ), LDA )
 *
          CALL DTRMM( 'L', 'L', 'N', 'U', N1, N2, ONE,
@@ -21172,7 +21208,7 @@
 *
 *        Compute A(J1:M,J1:N) <- (Y2,R2,T2) where Q2 = I - Y2 T2 Y2^H
 *
-         CALL DGEQRT3( M-N1, N2, A( J1, J1 ), LDA, 
+         CALL DGEQRT3( M-N1, N2, A( J1, J1 ), LDA,
      &                T( J1, J1 ), LDT, IINFO )
 *
 *        Compute T3 = T(1:N1,J1:N) = -T1 Y1^H Y2 T2
@@ -21186,13 +21222,13 @@
          CALL DTRMM( 'R', 'L', 'N', 'U', N1, N2, ONE,
      &               A( J1, J1 ), LDA, T( 1, J1 ), LDT )
 *
-         CALL DGEMM( 'T', 'N', N1, N2, M-N, ONE, A( I1, 1 ), LDA, 
+         CALL DGEMM( 'T', 'N', N1, N2, M-N, ONE, A( I1, 1 ), LDA,
      &               A( I1, J1 ), LDA, ONE, T( 1, J1 ), LDT )
 *
-         CALL DTRMM( 'L', 'U', 'N', 'N', N1, N2, -ONE, T, LDT, 
+         CALL DTRMM( 'L', 'U', 'N', 'N', N1, N2, -ONE, T, LDT,
      &               T( 1, J1 ), LDT )
 *
-         CALL DTRMM( 'R', 'U', 'N', 'N', N1, N2, ONE, 
+         CALL DTRMM( 'R', 'U', 'N', 'N', N1, N2, ONE,
      &               T( J1, J1 ), LDT, T( 1, J1 ), LDT )
 *
 *        Y = (Y1,Y2); R = [ R1  A(1:N1,J1:N) ];  T = [T1 T3]
@@ -21209,25 +21245,25 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DGERFS + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dgerfs.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dgerfs.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dgerfs.f"> 
+*> Download DGERFS + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dgerfs.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dgerfs.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dgerfs.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       SUBROUTINE DGERFS( TRANS, N, NRHS, A, LDA, AF, LDAF, IPIV, B, LDB,
 *                          X, LDX, FERR, BERR, WORK, IWORK, INFO )
-* 
+*
 *       .. Scalar Arguments ..
 *       CHARACTER          TRANS
 *       INTEGER            INFO, LDA, LDAF, LDB, LDX, N, NRHS
@@ -21237,7 +21273,7 @@
 *       DOUBLE PRECISION   A( LDA, * ), AF( LDAF, * ), B( LDB, * ),
 *      $                   BERR( * ), FERR( * ), WORK( * ), X( LDX, * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -21379,12 +21415,12 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date November 2011
+*> \date December 2016
 *
 *> \ingroup doubleGEcomputational
 *
@@ -21392,10 +21428,10 @@
       SUBROUTINE DGERFS( TRANS, N, NRHS, A, LDA, AF, LDAF, IPIV, B, LDB,
      $                   X, LDX, FERR, BERR, WORK, IWORK, INFO )
 *
-*  -- LAPACK computational routine (version 3.4.0) --
+*  -- LAPACK computational routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     November 2011
+*     December 2016
 *
 *     .. Scalar Arguments ..
       CHARACTER          TRANS
@@ -21647,31 +21683,31 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DGERQ2 + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dgerq2.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dgerq2.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dgerq2.f"> 
+*> Download DGERQ2 + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dgerq2.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dgerq2.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dgerq2.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       SUBROUTINE DGERQ2( M, N, A, LDA, TAU, WORK, INFO )
-* 
+*
 *       .. Scalar Arguments ..
 *       INTEGER            INFO, LDA, M, N
 *       ..
 *       .. Array Arguments ..
 *       DOUBLE PRECISION   A( LDA, * ), TAU( * ), WORK( * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -21738,12 +21774,12 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date September 2012
+*> \date December 2016
 *
 *> \ingroup doubleGEcomputational
 *
@@ -21768,10 +21804,10 @@
 *  =====================================================================
       SUBROUTINE DGERQ2( M, N, A, LDA, TAU, WORK, INFO )
 *
-*  -- LAPACK computational routine (version 3.4.2) --
+*  -- LAPACK computational routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     September 2012
+*     December 2016
 *
 *     .. Scalar Arguments ..
       INTEGER            INFO, LDA, M, N
@@ -21840,31 +21876,31 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DGERQF + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dgerqf.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dgerqf.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dgerqf.f"> 
+*> Download DGERQF + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dgerqf.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dgerqf.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dgerqf.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       SUBROUTINE DGERQF( M, N, A, LDA, TAU, WORK, LWORK, INFO )
-* 
+*
 *       .. Scalar Arguments ..
 *       INTEGER            INFO, LDA, LWORK, M, N
 *       ..
 *       .. Array Arguments ..
 *       DOUBLE PRECISION   A( LDA, * ), TAU( * ), WORK( * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -21946,12 +21982,12 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date November 2011
+*> \date December 2016
 *
 *> \ingroup doubleGEcomputational
 *
@@ -21976,10 +22012,10 @@
 *  =====================================================================
       SUBROUTINE DGERQF( M, N, A, LDA, TAU, WORK, LWORK, INFO )
 *
-*  -- LAPACK computational routine (version 3.4.0) --
+*  -- LAPACK computational routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     November 2011
+*     December 2016
 *
 *     .. Scalar Arguments ..
       INTEGER            INFO, LDA, LWORK, M, N
@@ -22127,24 +22163,24 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DGESC2 + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dgesc2.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dgesc2.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dgesc2.f"> 
+*> Download DGESC2 + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dgesc2.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dgesc2.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dgesc2.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       SUBROUTINE DGESC2( N, A, LDA, RHS, IPIV, JPIV, SCALE )
-* 
+*
 *       .. Scalar Arguments ..
 *       INTEGER            LDA, N
 *       DOUBLE PRECISION   SCALE
@@ -22153,7 +22189,7 @@
 *       INTEGER            IPIV( * ), JPIV( * )
 *       DOUBLE PRECISION   A( LDA, * ), RHS( * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -22221,12 +22257,12 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date September 2012
+*> \date December 2016
 *
 *> \ingroup doubleGEauxiliary
 *
@@ -22239,10 +22275,10 @@
 *  =====================================================================
       SUBROUTINE DGESC2( N, A, LDA, RHS, IPIV, JPIV, SCALE )
 *
-*  -- LAPACK auxiliary routine (version 3.4.2) --
+*  -- LAPACK auxiliary routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     September 2012
+*     December 2016
 *
 *     .. Scalar Arguments ..
       INTEGER            LDA, N
@@ -22328,25 +22364,25 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DGESDD + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dgesdd.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dgesdd.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dgesdd.f"> 
+*> Download DGESDD + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dgesdd.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dgesdd.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dgesdd.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
-*       SUBROUTINE DGESDD( JOBZ, M, N, A, LDA, S, U, LDU, VT, LDVT, WORK,
-*                          LWORK, IWORK, INFO )
-* 
+*       SUBROUTINE DGESDD( JOBZ, M, N, A, LDA, S, U, LDU, VT, LDVT,
+*                          WORK, LWORK, IWORK, INFO )
+*
 *       .. Scalar Arguments ..
 *       CHARACTER          JOBZ
 *       INTEGER            INFO, LDA, LDU, LDVT, LWORK, M, N
@@ -22356,7 +22392,7 @@
 *       DOUBLE PRECISION   A( LDA, * ), S( * ), U( LDU, * ),
 *      $                   VT( LDVT, * ), WORK( * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -22480,8 +22516,8 @@
 *> \param[in] LDVT
 *> \verbatim
 *>          LDVT is INTEGER
-*>          The leading dimension of the array VT.  LDVT >= 1; if
-*>          JOBZ = 'A' or JOBZ = 'O' and M >= N, LDVT >= N;
+*>          The leading dimension of the array VT.  LDVT >= 1;
+*>          if JOBZ = 'A' or JOBZ = 'O' and M >= N, LDVT >= N;
 *>          if JOBZ = 'S', LDVT >= min(M,N).
 *> \endverbatim
 *>
@@ -22495,16 +22531,18 @@
 *> \verbatim
 *>          LWORK is INTEGER
 *>          The dimension of the array WORK. LWORK >= 1.
-*>          If JOBZ = 'N',
-*>            LWORK >= 3*min(M,N) + max(max(M,N),7*min(M,N)).
-*>          If JOBZ = 'O',
-*>            LWORK >= 3*min(M,N) + 
-*>                     max(max(M,N),5*min(M,N)*min(M,N)+4*min(M,N)).
-*>          If JOBZ = 'S' or 'A'
-*>            LWORK >= min(M,N)*(6+4*min(M,N))+max(M,N)
-*>          For good performance, LWORK should generally be larger.
-*>          If LWORK = -1 but other input arguments are legal, WORK(1)
-*>          returns the optimal LWORK.
+*>          If LWORK = -1, a workspace query is assumed.  The optimal
+*>          size for the WORK array is calculated and stored in WORK(1),
+*>          and no other work except argument checking is performed.
+*>
+*>          Let mx = max(M,N) and mn = min(M,N).
+*>          If JOBZ = 'N', LWORK >= 3*mn + max( mx, 7*mn ).
+*>          If JOBZ = 'O', LWORK >= 3*mn + max( mx, 5*mn*mn + 4*mn ).
+*>          If JOBZ = 'S', LWORK >= 4*mn*mn + 7*mn.
+*>          If JOBZ = 'A', LWORK >= 4*mn*mn + 6*mn + mx.
+*>          These are not tight minimums in all cases; see comments inside code.
+*>          For good performance, LWORK should generally be larger;
+*>          a query is recommended.
 *> \endverbatim
 *>
 *> \param[out] IWORK
@@ -22523,12 +22561,12 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date November 2013
+*> \date June 2016
 *
 *> \ingroup doubleGEsing
 *
@@ -22539,13 +22577,14 @@
 *>     California at Berkeley, USA
 *>
 *  =====================================================================
-      SUBROUTINE DGESDD( JOBZ, M, N, A, LDA, S, U, LDU, VT, LDVT, WORK,
-     $                   LWORK, IWORK, INFO )
+      SUBROUTINE DGESDD( JOBZ, M, N, A, LDA, S, U, LDU, VT, LDVT,
+     $                   WORK, LWORK, IWORK, INFO )
+      implicit none
 *
-*  -- LAPACK driver routine (version 3.5.0) --
+*  -- LAPACK driver routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     November 2013
+*     June 2016
 *
 *     .. Scalar Arguments ..
       CHARACTER          JOBZ
@@ -22569,6 +22608,15 @@
      $                   IR, ISCL, ITAU, ITAUP, ITAUQ, IU, IVT, LDWKVT,
      $                   LDWRKL, LDWRKR, LDWRKU, MAXWRK, MINMN, MINWRK,
      $                   MNTHR, NWORK, WRKBL
+      INTEGER            LWORK_DGEBRD_MN, LWORK_DGEBRD_MM,
+     $                   LWORK_DGEBRD_NN, LWORK_DGELQF_MN,
+     $                   LWORK_DGEQRF_MN,
+     $                   LWORK_DORGBR_P_MM, LWORK_DORGBR_Q_NN,
+     $                   LWORK_DORGLQ_MN, LWORK_DORGLQ_NN,
+     $                   LWORK_DORGQR_MM, LWORK_DORGQR_MN,
+     $                   LWORK_DORMBR_PRT_MM, LWORK_DORMBR_QLN_MM,
+     $                   LWORK_DORMBR_PRT_MN, LWORK_DORMBR_QLN_MN,
+     $                   LWORK_DORMBR_PRT_NN, LWORK_DORMBR_QLN_NN
       DOUBLE PRECISION   ANRM, BIGNUM, EPS, SMLNUM
 *     ..
 *     .. Local Arrays ..
@@ -22582,9 +22630,8 @@
 *     ..
 *     .. External Functions ..
       LOGICAL            LSAME
-      INTEGER            ILAENV
       DOUBLE PRECISION   DLAMCH, DLANGE
-      EXTERNAL           DLAMCH, DLANGE, ILAENV, LSAME
+      EXTERNAL           DLAMCH, DLANGE, LSAME
 *     ..
 *     .. Intrinsic Functions ..
       INTRINSIC          INT, MAX, MIN, SQRT
@@ -22593,13 +22640,13 @@
 *
 *     Test the input arguments
 *
-      INFO = 0
-      MINMN = MIN( M, N )
-      WNTQA = LSAME( JOBZ, 'A' )
-      WNTQS = LSAME( JOBZ, 'S' )
+      INFO   = 0
+      MINMN  = MIN( M, N )
+      WNTQA  = LSAME( JOBZ, 'A' )
+      WNTQS  = LSAME( JOBZ, 'S' )
       WNTQAS = WNTQA .OR. WNTQS
-      WNTQO = LSAME( JOBZ, 'O' )
-      WNTQN = LSAME( JOBZ, 'N' )
+      WNTQO  = LSAME( JOBZ, 'O' )
+      WNTQN  = LSAME( JOBZ, 'N' )
       LQUERY = ( LWORK.EQ.-1 )
 *
       IF( .NOT.( WNTQA .OR. WNTQS .OR. WNTQO .OR. WNTQN ) ) THEN
@@ -22620,115 +22667,140 @@
       END IF
 *
 *     Compute workspace
-*      (Note: Comments in the code beginning "Workspace:" describe the
-*       minimal amount of workspace needed at that point in the code,
+*       Note: Comments in the code beginning "Workspace:" describe the
+*       minimal amount of workspace allocated at that point in the code,
 *       as well as the preferred amount for good performance.
 *       NB refers to the optimal block size for the immediately
-*       following subroutine, as returned by ILAENV.)
+*       following subroutine, as returned by ILAENV.
 *
       IF( INFO.EQ.0 ) THEN
          MINWRK = 1
          MAXWRK = 1
+         BDSPAC = 0
+         MNTHR  = INT( MINMN*11.0D0 / 6.0D0 )
          IF( M.GE.N .AND. MINMN.GT.0 ) THEN
 *
 *           Compute space needed for DBDSDC
 *
-            MNTHR = INT( MINMN*11.0D0 / 6.0D0 )
             IF( WNTQN ) THEN
+*              dbdsdc needs only 4*N (or 6*N for uplo=L for LAPACK <= 3.6)
+*              keep 7*N for backwards compatability.
                BDSPAC = 7*N
             ELSE
                BDSPAC = 3*N*N + 4*N
             END IF
+*
+*           Compute space preferred for each routine
+            CALL DGEBRD( M, N, DUM(1), M, DUM(1), DUM(1), DUM(1),
+     $                   DUM(1), DUM(1), -1, IERR )
+            LWORK_DGEBRD_MN = INT( DUM(1) )
+*
+            CALL DGEBRD( N, N, DUM(1), N, DUM(1), DUM(1), DUM(1),
+     $                   DUM(1), DUM(1), -1, IERR )
+            LWORK_DGEBRD_NN = INT( DUM(1) )
+*
+            CALL DGEQRF( M, N, DUM(1), M, DUM(1), DUM(1), -1, IERR )
+            LWORK_DGEQRF_MN = INT( DUM(1) )
+*
+            CALL DORGBR( 'Q', N, N, N, DUM(1), N, DUM(1), DUM(1), -1,
+     $                   IERR )
+            LWORK_DORGBR_Q_NN = INT( DUM(1) )
+*
+            CALL DORGQR( M, M, N, DUM(1), M, DUM(1), DUM(1), -1, IERR )
+            LWORK_DORGQR_MM = INT( DUM(1) )
+*
+            CALL DORGQR( M, N, N, DUM(1), M, DUM(1), DUM(1), -1, IERR )
+            LWORK_DORGQR_MN = INT( DUM(1) )
+*
+            CALL DORMBR( 'P', 'R', 'T', N, N, N, DUM(1), N,
+     $                   DUM(1), DUM(1), N, DUM(1), -1, IERR )
+            LWORK_DORMBR_PRT_NN = INT( DUM(1) )
+*
+            CALL DORMBR( 'Q', 'L', 'N', N, N, N, DUM(1), N,
+     $                   DUM(1), DUM(1), N, DUM(1), -1, IERR )
+            LWORK_DORMBR_QLN_NN = INT( DUM(1) )
+*
+            CALL DORMBR( 'Q', 'L', 'N', M, N, N, DUM(1), M,
+     $                   DUM(1), DUM(1), M, DUM(1), -1, IERR )
+            LWORK_DORMBR_QLN_MN = INT( DUM(1) )
+*
+            CALL DORMBR( 'Q', 'L', 'N', M, M, N, DUM(1), M,
+     $                   DUM(1), DUM(1), M, DUM(1), -1, IERR )
+            LWORK_DORMBR_QLN_MM = INT( DUM(1) )
+*
             IF( M.GE.MNTHR ) THEN
                IF( WNTQN ) THEN
 *
-*                 Path 1 (M much larger than N, JOBZ='N')
+*                 Path 1 (M >> N, JOBZ='N')
 *
-                  WRKBL = N + N*ILAENV( 1, 'DGEQRF', ' ', M, N, -1,
-     $                    -1 )
-                  WRKBL = MAX( WRKBL, 3*N+2*N*
-     $                    ILAENV( 1, 'DGEBRD', ' ', N, N, -1, -1 ) )
-                  MAXWRK = MAX( WRKBL, BDSPAC+N )
+                  WRKBL = N + LWORK_DGEQRF_MN
+                  WRKBL = MAX( WRKBL, 3*N + LWORK_DGEBRD_NN )
+                  MAXWRK = MAX( WRKBL, BDSPAC + N )
                   MINWRK = BDSPAC + N
                ELSE IF( WNTQO ) THEN
 *
-*                 Path 2 (M much larger than N, JOBZ='O')
-*
-                  WRKBL = N + N*ILAENV( 1, 'DGEQRF', ' ', M, N, -1, -1 )
-                  WRKBL = MAX( WRKBL, N+N*ILAENV( 1, 'DORGQR', ' ', M,
-     $                    N, N, -1 ) )
-                  WRKBL = MAX( WRKBL, 3*N+2*N*
-     $                    ILAENV( 1, 'DGEBRD', ' ', N, N, -1, -1 ) )
-                  WRKBL = MAX( WRKBL, 3*N+N*
-     $                    ILAENV( 1, 'DORMBR', 'QLN', N, N, N, -1 ) )
-                  WRKBL = MAX( WRKBL, 3*N+N*
-     $                    ILAENV( 1, 'DORMBR', 'PRT', N, N, N, -1 ) )
-                  WRKBL = MAX( WRKBL, BDSPAC+3*N )
+*                 Path 2 (M >> N, JOBZ='O')
+*
+                  WRKBL = N + LWORK_DGEQRF_MN
+                  WRKBL = MAX( WRKBL,   N + LWORK_DORGQR_MN )
+                  WRKBL = MAX( WRKBL, 3*N + LWORK_DGEBRD_NN )
+                  WRKBL = MAX( WRKBL, 3*N + LWORK_DORMBR_QLN_NN )
+                  WRKBL = MAX( WRKBL, 3*N + LWORK_DORMBR_PRT_NN )
+                  WRKBL = MAX( WRKBL, 3*N + BDSPAC )
                   MAXWRK = WRKBL + 2*N*N
                   MINWRK = BDSPAC + 2*N*N + 3*N
                ELSE IF( WNTQS ) THEN
 *
-*                 Path 3 (M much larger than N, JOBZ='S')
-*
-                  WRKBL = N + N*ILAENV( 1, 'DGEQRF', ' ', M, N, -1, -1 )
-                  WRKBL = MAX( WRKBL, N+N*ILAENV( 1, 'DORGQR', ' ', M,
-     $                    N, N, -1 ) )
-                  WRKBL = MAX( WRKBL, 3*N+2*N*
-     $                    ILAENV( 1, 'DGEBRD', ' ', N, N, -1, -1 ) )
-                  WRKBL = MAX( WRKBL, 3*N+N*
-     $                    ILAENV( 1, 'DORMBR', 'QLN', N, N, N, -1 ) )
-                  WRKBL = MAX( WRKBL, 3*N+N*
-     $                    ILAENV( 1, 'DORMBR', 'PRT', N, N, N, -1 ) )
-                  WRKBL = MAX( WRKBL, BDSPAC+3*N )
+*                 Path 3 (M >> N, JOBZ='S')
+*
+                  WRKBL = N + LWORK_DGEQRF_MN
+                  WRKBL = MAX( WRKBL,   N + LWORK_DORGQR_MN )
+                  WRKBL = MAX( WRKBL, 3*N + LWORK_DGEBRD_NN )
+                  WRKBL = MAX( WRKBL, 3*N + LWORK_DORMBR_QLN_NN )
+                  WRKBL = MAX( WRKBL, 3*N + LWORK_DORMBR_PRT_NN )
+                  WRKBL = MAX( WRKBL, 3*N + BDSPAC )
                   MAXWRK = WRKBL + N*N
                   MINWRK = BDSPAC + N*N + 3*N
                ELSE IF( WNTQA ) THEN
 *
-*                 Path 4 (M much larger than N, JOBZ='A')
-*
-                  WRKBL = N + N*ILAENV( 1, 'DGEQRF', ' ', M, N, -1, -1 )
-                  WRKBL = MAX( WRKBL, N+M*ILAENV( 1, 'DORGQR', ' ', M,
-     $                    M, N, -1 ) )
-                  WRKBL = MAX( WRKBL, 3*N+2*N*
-     $                    ILAENV( 1, 'DGEBRD', ' ', N, N, -1, -1 ) )
-                  WRKBL = MAX( WRKBL, 3*N+N*
-     $                    ILAENV( 1, 'DORMBR', 'QLN', N, N, N, -1 ) )
-                  WRKBL = MAX( WRKBL, 3*N+N*
-     $                    ILAENV( 1, 'DORMBR', 'PRT', N, N, N, -1 ) )
-                  WRKBL = MAX( WRKBL, BDSPAC+3*N )
+*                 Path 4 (M >> N, JOBZ='A')
+*
+                  WRKBL = N + LWORK_DGEQRF_MN
+                  WRKBL = MAX( WRKBL,   N + LWORK_DORGQR_MM )
+                  WRKBL = MAX( WRKBL, 3*N + LWORK_DGEBRD_NN )
+                  WRKBL = MAX( WRKBL, 3*N + LWORK_DORMBR_QLN_NN )
+                  WRKBL = MAX( WRKBL, 3*N + LWORK_DORMBR_PRT_NN )
+                  WRKBL = MAX( WRKBL, 3*N + BDSPAC )
                   MAXWRK = WRKBL + N*N
-                  MINWRK = BDSPAC + N*N + 2*N + M
+                  MINWRK = N*N + MAX( 3*N + BDSPAC, N + M )
                END IF
             ELSE
 *
-*              Path 5 (M at least N, but not much larger)
+*              Path 5 (M >= N, but not much larger)
 *
-               WRKBL = 3*N + ( M+N )*ILAENV( 1, 'DGEBRD', ' ', M, N, -1,
-     $                 -1 )
+               WRKBL = 3*N + LWORK_DGEBRD_MN
                IF( WNTQN ) THEN
-                  MAXWRK = MAX( WRKBL, BDSPAC+3*N )
+*                 Path 5n (M >= N, jobz='N')
+                  MAXWRK = MAX( WRKBL, 3*N + BDSPAC )
                   MINWRK = 3*N + MAX( M, BDSPAC )
                ELSE IF( WNTQO ) THEN
-                  WRKBL = MAX( WRKBL, 3*N+N*
-     $                    ILAENV( 1, 'DORMBR', 'QLN', M, N, N, -1 ) )
-                  WRKBL = MAX( WRKBL, 3*N+N*
-     $                    ILAENV( 1, 'DORMBR', 'PRT', N, N, N, -1 ) )
-                  WRKBL = MAX( WRKBL, BDSPAC+3*N )
+*                 Path 5o (M >= N, jobz='O')
+                  WRKBL = MAX( WRKBL, 3*N + LWORK_DORMBR_PRT_NN )
+                  WRKBL = MAX( WRKBL, 3*N + LWORK_DORMBR_QLN_MN )
+                  WRKBL = MAX( WRKBL, 3*N + BDSPAC )
                   MAXWRK = WRKBL + M*N
-                  MINWRK = 3*N + MAX( M, N*N+BDSPAC )
+                  MINWRK = 3*N + MAX( M, N*N + BDSPAC )
                ELSE IF( WNTQS ) THEN
-                  WRKBL = MAX( WRKBL, 3*N+N*
-     $                    ILAENV( 1, 'DORMBR', 'QLN', M, N, N, -1 ) )
-                  WRKBL = MAX( WRKBL, 3*N+N*
-     $                    ILAENV( 1, 'DORMBR', 'PRT', N, N, N, -1 ) )
-                  MAXWRK = MAX( WRKBL, BDSPAC+3*N )
+*                 Path 5s (M >= N, jobz='S')
+                  WRKBL = MAX( WRKBL, 3*N + LWORK_DORMBR_QLN_MN )
+                  WRKBL = MAX( WRKBL, 3*N + LWORK_DORMBR_PRT_NN )
+                  MAXWRK = MAX( WRKBL, 3*N + BDSPAC )
                   MINWRK = 3*N + MAX( M, BDSPAC )
                ELSE IF( WNTQA ) THEN
-                  WRKBL = MAX( WRKBL, 3*N+M*
-     $                    ILAENV( 1, 'DORMBR', 'QLN', M, M, N, -1 ) )
-                  WRKBL = MAX( WRKBL, 3*N+N*
-     $                    ILAENV( 1, 'DORMBR', 'PRT', N, N, N, -1 ) )
-                  MAXWRK = MAX( MAXWRK, BDSPAC+3*N )
+*                 Path 5a (M >= N, jobz='A')
+                  WRKBL = MAX( WRKBL, 3*N + LWORK_DORMBR_QLN_MM )
+                  WRKBL = MAX( WRKBL, 3*N + LWORK_DORMBR_PRT_NN )
+                  MAXWRK = MAX( WRKBL, 3*N + BDSPAC )
                   MINWRK = 3*N + MAX( M, BDSPAC )
                END IF
             END IF
@@ -22736,106 +22808,129 @@
 *
 *           Compute space needed for DBDSDC
 *
-            MNTHR = INT( MINMN*11.0D0 / 6.0D0 )
             IF( WNTQN ) THEN
+*              dbdsdc needs only 4*N (or 6*N for uplo=L for LAPACK <= 3.6)
+*              keep 7*N for backwards compatability.
                BDSPAC = 7*M
             ELSE
                BDSPAC = 3*M*M + 4*M
             END IF
+*
+*           Compute space preferred for each routine
+            CALL DGEBRD( M, N, DUM(1), M, DUM(1), DUM(1), DUM(1),
+     $                   DUM(1), DUM(1), -1, IERR )
+            LWORK_DGEBRD_MN = INT( DUM(1) )
+*
+            CALL DGEBRD( M, M, A, M, S, DUM(1), DUM(1),
+     $                   DUM(1), DUM(1), -1, IERR )
+            LWORK_DGEBRD_MM = INT( DUM(1) )
+*
+            CALL DGELQF( M, N, A, M, DUM(1), DUM(1), -1, IERR )
+            LWORK_DGELQF_MN = INT( DUM(1) )
+*
+            CALL DORGLQ( N, N, M, DUM(1), N, DUM(1), DUM(1), -1, IERR )
+            LWORK_DORGLQ_NN = INT( DUM(1) )
+*
+            CALL DORGLQ( M, N, M, A, M, DUM(1), DUM(1), -1, IERR )
+            LWORK_DORGLQ_MN = INT( DUM(1) )
+*
+            CALL DORGBR( 'P', M, M, M, A, N, DUM(1), DUM(1), -1, IERR )
+            LWORK_DORGBR_P_MM = INT( DUM(1) )
+*
+            CALL DORMBR( 'P', 'R', 'T', M, M, M, DUM(1), M,
+     $                   DUM(1), DUM(1), M, DUM(1), -1, IERR )
+            LWORK_DORMBR_PRT_MM = INT( DUM(1) )
+*
+            CALL DORMBR( 'P', 'R', 'T', M, N, M, DUM(1), M,
+     $                   DUM(1), DUM(1), M, DUM(1), -1, IERR )
+            LWORK_DORMBR_PRT_MN = INT( DUM(1) )
+*
+            CALL DORMBR( 'P', 'R', 'T', N, N, M, DUM(1), N,
+     $                   DUM(1), DUM(1), N, DUM(1), -1, IERR )
+            LWORK_DORMBR_PRT_NN = INT( DUM(1) )
+*
+            CALL DORMBR( 'Q', 'L', 'N', M, M, M, DUM(1), M,
+     $                   DUM(1), DUM(1), M, DUM(1), -1, IERR )
+            LWORK_DORMBR_QLN_MM = INT( DUM(1) )
+*
             IF( N.GE.MNTHR ) THEN
                IF( WNTQN ) THEN
 *
-*                 Path 1t (N much larger than M, JOBZ='N')
+*                 Path 1t (N >> M, JOBZ='N')
 *
-                  WRKBL = M + M*ILAENV( 1, 'DGELQF', ' ', M, N, -1,
-     $                    -1 )
-                  WRKBL = MAX( WRKBL, 3*M+2*M*
-     $                    ILAENV( 1, 'DGEBRD', ' ', M, M, -1, -1 ) )
-                  MAXWRK = MAX( WRKBL, BDSPAC+M )
+                  WRKBL = M + LWORK_DGELQF_MN
+                  WRKBL = MAX( WRKBL, 3*M + LWORK_DGEBRD_MM )
+                  MAXWRK = MAX( WRKBL, BDSPAC + M )
                   MINWRK = BDSPAC + M
                ELSE IF( WNTQO ) THEN
 *
-*                 Path 2t (N much larger than M, JOBZ='O')
-*
-                  WRKBL = M + M*ILAENV( 1, 'DGELQF', ' ', M, N, -1, -1 )
-                  WRKBL = MAX( WRKBL, M+M*ILAENV( 1, 'DORGLQ', ' ', M,
-     $                    N, M, -1 ) )
-                  WRKBL = MAX( WRKBL, 3*M+2*M*
-     $                    ILAENV( 1, 'DGEBRD', ' ', M, M, -1, -1 ) )
-                  WRKBL = MAX( WRKBL, 3*M+M*
-     $                    ILAENV( 1, 'DORMBR', 'QLN', M, M, M, -1 ) )
-                  WRKBL = MAX( WRKBL, 3*M+M*
-     $                    ILAENV( 1, 'DORMBR', 'PRT', M, M, M, -1 ) )
-                  WRKBL = MAX( WRKBL, BDSPAC+3*M )
+*                 Path 2t (N >> M, JOBZ='O')
+*
+                  WRKBL = M + LWORK_DGELQF_MN
+                  WRKBL = MAX( WRKBL,   M + LWORK_DORGLQ_MN )
+                  WRKBL = MAX( WRKBL, 3*M + LWORK_DGEBRD_MM )
+                  WRKBL = MAX( WRKBL, 3*M + LWORK_DORMBR_QLN_MM )
+                  WRKBL = MAX( WRKBL, 3*M + LWORK_DORMBR_PRT_MM )
+                  WRKBL = MAX( WRKBL, 3*M + BDSPAC )
                   MAXWRK = WRKBL + 2*M*M
                   MINWRK = BDSPAC + 2*M*M + 3*M
                ELSE IF( WNTQS ) THEN
 *
-*                 Path 3t (N much larger than M, JOBZ='S')
-*
-                  WRKBL = M + M*ILAENV( 1, 'DGELQF', ' ', M, N, -1, -1 )
-                  WRKBL = MAX( WRKBL, M+M*ILAENV( 1, 'DORGLQ', ' ', M,
-     $                    N, M, -1 ) )
-                  WRKBL = MAX( WRKBL, 3*M+2*M*
-     $                    ILAENV( 1, 'DGEBRD', ' ', M, M, -1, -1 ) )
-                  WRKBL = MAX( WRKBL, 3*M+M*
-     $                    ILAENV( 1, 'DORMBR', 'QLN', M, M, M, -1 ) )
-                  WRKBL = MAX( WRKBL, 3*M+M*
-     $                    ILAENV( 1, 'DORMBR', 'PRT', M, M, M, -1 ) )
-                  WRKBL = MAX( WRKBL, BDSPAC+3*M )
+*                 Path 3t (N >> M, JOBZ='S')
+*
+                  WRKBL = M + LWORK_DGELQF_MN
+                  WRKBL = MAX( WRKBL,   M + LWORK_DORGLQ_MN )
+                  WRKBL = MAX( WRKBL, 3*M + LWORK_DGEBRD_MM )
+                  WRKBL = MAX( WRKBL, 3*M + LWORK_DORMBR_QLN_MM )
+                  WRKBL = MAX( WRKBL, 3*M + LWORK_DORMBR_PRT_MM )
+                  WRKBL = MAX( WRKBL, 3*M + BDSPAC )
                   MAXWRK = WRKBL + M*M
                   MINWRK = BDSPAC + M*M + 3*M
                ELSE IF( WNTQA ) THEN
 *
-*                 Path 4t (N much larger than M, JOBZ='A')
-*
-                  WRKBL = M + M*ILAENV( 1, 'DGELQF', ' ', M, N, -1, -1 )
-                  WRKBL = MAX( WRKBL, M+N*ILAENV( 1, 'DORGLQ', ' ', N,
-     $                    N, M, -1 ) )
-                  WRKBL = MAX( WRKBL, 3*M+2*M*
-     $                    ILAENV( 1, 'DGEBRD', ' ', M, M, -1, -1 ) )
-                  WRKBL = MAX( WRKBL, 3*M+M*
-     $                    ILAENV( 1, 'DORMBR', 'QLN', M, M, M, -1 ) )
-                  WRKBL = MAX( WRKBL, 3*M+M*
-     $                    ILAENV( 1, 'DORMBR', 'PRT', M, M, M, -1 ) )
-                  WRKBL = MAX( WRKBL, BDSPAC+3*M )
+*                 Path 4t (N >> M, JOBZ='A')
+*
+                  WRKBL = M + LWORK_DGELQF_MN
+                  WRKBL = MAX( WRKBL,   M + LWORK_DORGLQ_NN )
+                  WRKBL = MAX( WRKBL, 3*M + LWORK_DGEBRD_MM )
+                  WRKBL = MAX( WRKBL, 3*M + LWORK_DORMBR_QLN_MM )
+                  WRKBL = MAX( WRKBL, 3*M + LWORK_DORMBR_PRT_MM )
+                  WRKBL = MAX( WRKBL, 3*M + BDSPAC )
                   MAXWRK = WRKBL + M*M
-                  MINWRK = BDSPAC + M*M + 3*M
+                  MINWRK = M*M + MAX( 3*M + BDSPAC, M + N )
                END IF
             ELSE
 *
-*              Path 5t (N greater than M, but not much larger)
+*              Path 5t (N > M, but not much larger)
 *
-               WRKBL = 3*M + ( M+N )*ILAENV( 1, 'DGEBRD', ' ', M, N, -1,
-     $                 -1 )
+               WRKBL = 3*M + LWORK_DGEBRD_MN
                IF( WNTQN ) THEN
-                  MAXWRK = MAX( WRKBL, BDSPAC+3*M )
+*                 Path 5tn (N > M, jobz='N')
+                  MAXWRK = MAX( WRKBL, 3*M + BDSPAC )
                   MINWRK = 3*M + MAX( N, BDSPAC )
                ELSE IF( WNTQO ) THEN
-                  WRKBL = MAX( WRKBL, 3*M+M*
-     $                    ILAENV( 1, 'DORMBR', 'QLN', M, M, N, -1 ) )
-                  WRKBL = MAX( WRKBL, 3*M+M*
-     $                    ILAENV( 1, 'DORMBR', 'PRT', M, N, M, -1 ) )
-                  WRKBL = MAX( WRKBL, BDSPAC+3*M )
+*                 Path 5to (N > M, jobz='O')
+                  WRKBL = MAX( WRKBL, 3*M + LWORK_DORMBR_QLN_MM )
+                  WRKBL = MAX( WRKBL, 3*M + LWORK_DORMBR_PRT_MN )
+                  WRKBL = MAX( WRKBL, 3*M + BDSPAC )
                   MAXWRK = WRKBL + M*N
-                  MINWRK = 3*M + MAX( N, M*M+BDSPAC )
+                  MINWRK = 3*M + MAX( N, M*M + BDSPAC )
                ELSE IF( WNTQS ) THEN
-                  WRKBL = MAX( WRKBL, 3*M+M*
-     $                    ILAENV( 1, 'DORMBR', 'QLN', M, M, N, -1 ) )
-                  WRKBL = MAX( WRKBL, 3*M+M*
-     $                    ILAENV( 1, 'DORMBR', 'PRT', M, N, M, -1 ) )
-                  MAXWRK = MAX( WRKBL, BDSPAC+3*M )
+*                 Path 5ts (N > M, jobz='S')
+                  WRKBL = MAX( WRKBL, 3*M + LWORK_DORMBR_QLN_MM )
+                  WRKBL = MAX( WRKBL, 3*M + LWORK_DORMBR_PRT_MN )
+                  MAXWRK = MAX( WRKBL, 3*M + BDSPAC )
                   MINWRK = 3*M + MAX( N, BDSPAC )
                ELSE IF( WNTQA ) THEN
-                  WRKBL = MAX( WRKBL, 3*M+M*
-     $                    ILAENV( 1, 'DORMBR', 'QLN', M, M, N, -1 ) )
-                  WRKBL = MAX( WRKBL, 3*M+M*
-     $                    ILAENV( 1, 'DORMBR', 'PRT', N, N, M, -1 ) )
-                  MAXWRK = MAX( WRKBL, BDSPAC+3*M )
+*                 Path 5ta (N > M, jobz='A')
+                  WRKBL = MAX( WRKBL, 3*M + LWORK_DORMBR_QLN_MM )
+                  WRKBL = MAX( WRKBL, 3*M + LWORK_DORMBR_PRT_NN )
+                  MAXWRK = MAX( WRKBL, 3*M + BDSPAC )
                   MINWRK = 3*M + MAX( N, BDSPAC )
                END IF
             END IF
          END IF
+
          MAXWRK = MAX( MAXWRK, MINWRK )
          WORK( 1 ) = MAXWRK
 *
@@ -22885,17 +22980,18 @@
 *
             IF( WNTQN ) THEN
 *
-*              Path 1 (M much larger than N, JOBZ='N')
+*              Path 1 (M >> N, JOBZ='N')
 *              No singular vectors to be computed
 *
                ITAU = 1
                NWORK = ITAU + N
 *
 *              Compute A=Q*R
-*              (Workspace: need 2*N, prefer N+N*NB)
+*              Workspace: need   N [tau] + N    [work]
+*              Workspace: prefer N [tau] + N*NB [work]
 *
                CALL DGEQRF( M, N, A, LDA, WORK( ITAU ), WORK( NWORK ),
-     $                      LWORK-NWORK+1, IERR )
+     $                      LWORK - NWORK + 1, IERR )
 *
 *              Zero out below R
 *
@@ -22906,7 +23002,8 @@
                NWORK = ITAUP + N
 *
 *              Bidiagonalize R in A
-*              (Workspace: need 4*N, prefer 3*N+2*N*NB)
+*              Workspace: need   3*N [e, tauq, taup] + N      [work]
+*              Workspace: prefer 3*N [e, tauq, taup] + 2*N*NB [work]
 *
                CALL DGEBRD( N, N, A, LDA, S, WORK( IE ), WORK( ITAUQ ),
      $                      WORK( ITAUP ), WORK( NWORK ), LWORK-NWORK+1,
@@ -22914,14 +23011,14 @@
                NWORK = IE + N
 *
 *              Perform bidiagonal SVD, computing singular values only
-*              (Workspace: need N+BDSPAC)
+*              Workspace: need   N [e] + BDSPAC
 *
                CALL DBDSDC( 'U', 'N', N, S, WORK( IE ), DUM, 1, DUM, 1,
      $                      DUM, IDUM, WORK( NWORK ), IWORK, INFO )
 *
             ELSE IF( WNTQO ) THEN
 *
-*              Path 2 (M much larger than N, JOBZ = 'O')
+*              Path 2 (M >> N, JOBZ = 'O')
 *              N left singular vectors to be overwritten on A and
 *              N right singular vectors to be computed in VT
 *
@@ -22929,42 +23026,45 @@
 *
 *              WORK(IR) is LDWRKR by N
 *
-               IF( LWORK.GE.LDA*N+N*N+3*N+BDSPAC ) THEN
+               IF( LWORK .GE. LDA*N + N*N + 3*N + BDSPAC ) THEN
                   LDWRKR = LDA
                ELSE
-                  LDWRKR = ( LWORK-N*N-3*N-BDSPAC ) / N
+                  LDWRKR = ( LWORK - N*N - 3*N - BDSPAC ) / N
                END IF
                ITAU = IR + LDWRKR*N
                NWORK = ITAU + N
 *
 *              Compute A=Q*R
-*              (Workspace: need N*N+2*N, prefer N*N+N+N*NB)
+*              Workspace: need   N*N [R] + N [tau] + N    [work]
+*              Workspace: prefer N*N [R] + N [tau] + N*NB [work]
 *
                CALL DGEQRF( M, N, A, LDA, WORK( ITAU ), WORK( NWORK ),
-     $                      LWORK-NWORK+1, IERR )
+     $                      LWORK - NWORK + 1, IERR )
 *
 *              Copy R to WORK(IR), zeroing out below it
 *
                CALL DLACPY( 'U', N, N, A, LDA, WORK( IR ), LDWRKR )
-               CALL DLASET( 'L', N-1, N-1, ZERO, ZERO, WORK( IR+1 ),
+               CALL DLASET( 'L', N - 1, N - 1, ZERO, ZERO, WORK(IR+1),
      $                      LDWRKR )
 *
 *              Generate Q in A
-*              (Workspace: need N*N+2*N, prefer N*N+N+N*NB)
+*              Workspace: need   N*N [R] + N [tau] + N    [work]
+*              Workspace: prefer N*N [R] + N [tau] + N*NB [work]
 *
                CALL DORGQR( M, N, N, A, LDA, WORK( ITAU ),
-     $                      WORK( NWORK ), LWORK-NWORK+1, IERR )
+     $                      WORK( NWORK ), LWORK - NWORK + 1, IERR )
                IE = ITAU
                ITAUQ = IE + N
                ITAUP = ITAUQ + N
                NWORK = ITAUP + N
 *
-*              Bidiagonalize R in VT, copying result to WORK(IR)
-*              (Workspace: need N*N+4*N, prefer N*N+3*N+2*N*NB)
+*              Bidiagonalize R in WORK(IR)
+*              Workspace: need   N*N [R] + 3*N [e, tauq, taup] + N      [work]
+*              Workspace: prefer N*N [R] + 3*N [e, tauq, taup] + 2*N*NB [work]
 *
                CALL DGEBRD( N, N, WORK( IR ), LDWRKR, S, WORK( IE ),
      $                      WORK( ITAUQ ), WORK( ITAUP ), WORK( NWORK ),
-     $                      LWORK-NWORK+1, IERR )
+     $                      LWORK - NWORK + 1, IERR )
 *
 *              WORK(IU) is N by N
 *
@@ -22974,7 +23074,7 @@
 *              Perform bidiagonal SVD, computing left singular vectors
 *              of bidiagonal matrix in WORK(IU) and computing right
 *              singular vectors of bidiagonal matrix in VT
-*              (Workspace: need N+N*N+BDSPAC)
+*              Workspace: need   N*N [R] + 3*N [e, tauq, taup] + N*N [U] + BDSPAC
 *
                CALL DBDSDC( 'U', 'I', N, S, WORK( IE ), WORK( IU ), N,
      $                      VT, LDVT, DUM, IDUM, WORK( NWORK ), IWORK,
@@ -22982,21 +23082,23 @@
 *
 *              Overwrite WORK(IU) by left singular vectors of R
 *              and VT by right singular vectors of R
-*              (Workspace: need 2*N*N+3*N, prefer 2*N*N+2*N+N*NB)
+*              Workspace: need   N*N [R] + 3*N [e, tauq, taup] + N*N [U] + N    [work]
+*              Workspace: prefer N*N [R] + 3*N [e, tauq, taup] + N*N [U] + N*NB [work]
 *
                CALL DORMBR( 'Q', 'L', 'N', N, N, N, WORK( IR ), LDWRKR,
      $                      WORK( ITAUQ ), WORK( IU ), N, WORK( NWORK ),
-     $                      LWORK-NWORK+1, IERR )
+     $                      LWORK - NWORK + 1, IERR )
                CALL DORMBR( 'P', 'R', 'T', N, N, N, WORK( IR ), LDWRKR,
      $                      WORK( ITAUP ), VT, LDVT, WORK( NWORK ),
-     $                      LWORK-NWORK+1, IERR )
+     $                      LWORK - NWORK + 1, IERR )
 *
 *              Multiply Q in A by left singular vectors of R in
 *              WORK(IU), storing result in WORK(IR) and copying to A
-*              (Workspace: need 2*N*N, prefer N*N+M*N)
+*              Workspace: need   N*N [R] + 3*N [e, tauq, taup] + N*N [U]
+*              Workspace: prefer M*N [R] + 3*N [e, tauq, taup] + N*N [U]
 *
                DO 10 I = 1, M, LDWRKR
-                  CHUNK = MIN( M-I+1, LDWRKR )
+                  CHUNK = MIN( M - I + 1, LDWRKR )
                   CALL DGEMM( 'N', 'N', CHUNK, N, N, ONE, A( I, 1 ),
      $                        LDA, WORK( IU ), N, ZERO, WORK( IR ),
      $                        LDWRKR )
@@ -23006,7 +23108,7 @@
 *
             ELSE IF( WNTQS ) THEN
 *
-*              Path 3 (M much larger than N, JOBZ='S')
+*              Path 3 (M >> N, JOBZ='S')
 *              N left singular vectors to be computed in U and
 *              N right singular vectors to be computed in VT
 *
@@ -23019,38 +23121,41 @@
                NWORK = ITAU + N
 *
 *              Compute A=Q*R
-*              (Workspace: need N*N+2*N, prefer N*N+N+N*NB)
+*              Workspace: need   N*N [R] + N [tau] + N    [work]
+*              Workspace: prefer N*N [R] + N [tau] + N*NB [work]
 *
                CALL DGEQRF( M, N, A, LDA, WORK( ITAU ), WORK( NWORK ),
-     $                      LWORK-NWORK+1, IERR )
+     $                      LWORK - NWORK + 1, IERR )
 *
 *              Copy R to WORK(IR), zeroing out below it
 *
                CALL DLACPY( 'U', N, N, A, LDA, WORK( IR ), LDWRKR )
-               CALL DLASET( 'L', N-1, N-1, ZERO, ZERO, WORK( IR+1 ),
+               CALL DLASET( 'L', N - 1, N - 1, ZERO, ZERO, WORK(IR+1),
      $                      LDWRKR )
 *
 *              Generate Q in A
-*              (Workspace: need N*N+2*N, prefer N*N+N+N*NB)
+*              Workspace: need   N*N [R] + N [tau] + N    [work]
+*              Workspace: prefer N*N [R] + N [tau] + N*NB [work]
 *
                CALL DORGQR( M, N, N, A, LDA, WORK( ITAU ),
-     $                      WORK( NWORK ), LWORK-NWORK+1, IERR )
+     $                      WORK( NWORK ), LWORK - NWORK + 1, IERR )
                IE = ITAU
                ITAUQ = IE + N
                ITAUP = ITAUQ + N
                NWORK = ITAUP + N
 *
 *              Bidiagonalize R in WORK(IR)
-*              (Workspace: need N*N+4*N, prefer N*N+3*N+2*N*NB)
+*              Workspace: need   N*N [R] + 3*N [e, tauq, taup] + N      [work]
+*              Workspace: prefer N*N [R] + 3*N [e, tauq, taup] + 2*N*NB [work]
 *
                CALL DGEBRD( N, N, WORK( IR ), LDWRKR, S, WORK( IE ),
      $                      WORK( ITAUQ ), WORK( ITAUP ), WORK( NWORK ),
-     $                      LWORK-NWORK+1, IERR )
+     $                      LWORK - NWORK + 1, IERR )
 *
 *              Perform bidiagonal SVD, computing left singular vectors
 *              of bidiagoal matrix in U and computing right singular
 *              vectors of bidiagonal matrix in VT
-*              (Workspace: need N+BDSPAC)
+*              Workspace: need   N*N [R] + 3*N [e, tauq, taup] + BDSPAC
 *
                CALL DBDSDC( 'U', 'I', N, S, WORK( IE ), U, LDU, VT,
      $                      LDVT, DUM, IDUM, WORK( NWORK ), IWORK,
@@ -23058,19 +23163,20 @@
 *
 *              Overwrite U by left singular vectors of R and VT
 *              by right singular vectors of R
-*              (Workspace: need N*N+3*N, prefer N*N+2*N+N*NB)
+*              Workspace: need   N*N [R] + 3*N [e, tauq, taup] + N    [work]
+*              Workspace: prefer N*N [R] + 3*N [e, tauq, taup] + N*NB [work]
 *
                CALL DORMBR( 'Q', 'L', 'N', N, N, N, WORK( IR ), LDWRKR,
      $                      WORK( ITAUQ ), U, LDU, WORK( NWORK ),
-     $                      LWORK-NWORK+1, IERR )
+     $                      LWORK - NWORK + 1, IERR )
 *
                CALL DORMBR( 'P', 'R', 'T', N, N, N, WORK( IR ), LDWRKR,
      $                      WORK( ITAUP ), VT, LDVT, WORK( NWORK ),
-     $                      LWORK-NWORK+1, IERR )
+     $                      LWORK - NWORK + 1, IERR )
 *
 *              Multiply Q in A by left singular vectors of R in
 *              WORK(IR), storing result in U
-*              (Workspace: need N*N)
+*              Workspace: need   N*N [R]
 *
                CALL DLACPY( 'F', N, N, U, LDU, WORK( IR ), LDWRKR )
                CALL DGEMM( 'N', 'N', M, N, N, ONE, A, LDA, WORK( IR ),
@@ -23078,7 +23184,7 @@
 *
             ELSE IF( WNTQA ) THEN
 *
-*              Path 4 (M much larger than N, JOBZ='A')
+*              Path 4 (M >> N, JOBZ='A')
 *              M left singular vectors to be computed in U and
 *              N right singular vectors to be computed in VT
 *
@@ -23091,16 +23197,18 @@
                NWORK = ITAU + N
 *
 *              Compute A=Q*R, copying result to U
-*              (Workspace: need N*N+N+M, prefer N*N+N+M*NB)
+*              Workspace: need   N*N [U] + N [tau] + N    [work]
+*              Workspace: prefer N*N [U] + N [tau] + N*NB [work]
 *
                CALL DGEQRF( M, N, A, LDA, WORK( ITAU ), WORK( NWORK ),
-     $                      LWORK-NWORK+1, IERR )
+     $                      LWORK - NWORK + 1, IERR )
                CALL DLACPY( 'L', M, N, A, LDA, U, LDU )
 *
 *              Generate Q in U
-*              (Workspace: need N*N+N+M, prefer N*N+N+M*NB)
+*              Workspace: need   N*N [U] + N [tau] + M    [work]
+*              Workspace: prefer N*N [U] + N [tau] + M*NB [work]
                CALL DORGQR( M, M, N, U, LDU, WORK( ITAU ),
-     $                      WORK( NWORK ), LWORK-NWORK+1, IERR )
+     $                      WORK( NWORK ), LWORK - NWORK + 1, IERR )
 *
 *              Produce R in A, zeroing out other entries
 *
@@ -23111,7 +23219,8 @@
                NWORK = ITAUP + N
 *
 *              Bidiagonalize R in A
-*              (Workspace: need N*N+4*N, prefer N*N+3*N+2*N*NB)
+*              Workspace: need   N*N [U] + 3*N [e, tauq, taup] + N      [work]
+*              Workspace: prefer N*N [U] + 3*N [e, tauq, taup] + 2*N*NB [work]
 *
                CALL DGEBRD( N, N, A, LDA, S, WORK( IE ), WORK( ITAUQ ),
      $                      WORK( ITAUP ), WORK( NWORK ), LWORK-NWORK+1,
@@ -23120,7 +23229,7 @@
 *              Perform bidiagonal SVD, computing left singular vectors
 *              of bidiagonal matrix in WORK(IU) and computing right
 *              singular vectors of bidiagonal matrix in VT
-*              (Workspace: need N+N*N+BDSPAC)
+*              Workspace: need   N*N [U] + 3*N [e, tauq, taup] + BDSPAC
 *
                CALL DBDSDC( 'U', 'I', N, S, WORK( IE ), WORK( IU ), N,
      $                      VT, LDVT, DUM, IDUM, WORK( NWORK ), IWORK,
@@ -23128,18 +23237,19 @@
 *
 *              Overwrite WORK(IU) by left singular vectors of R and VT
 *              by right singular vectors of R
-*              (Workspace: need N*N+3*N, prefer N*N+2*N+N*NB)
+*              Workspace: need   N*N [U] + 3*N [e, tauq, taup] + N    [work]
+*              Workspace: prefer N*N [U] + 3*N [e, tauq, taup] + N*NB [work]
 *
                CALL DORMBR( 'Q', 'L', 'N', N, N, N, A, LDA,
      $                      WORK( ITAUQ ), WORK( IU ), LDWRKU,
-     $                      WORK( NWORK ), LWORK-NWORK+1, IERR )
+     $                      WORK( NWORK ), LWORK - NWORK + 1, IERR )
                CALL DORMBR( 'P', 'R', 'T', N, N, N, A, LDA,
      $                      WORK( ITAUP ), VT, LDVT, WORK( NWORK ),
-     $                      LWORK-NWORK+1, IERR )
+     $                      LWORK - NWORK + 1, IERR )
 *
 *              Multiply Q in U by left singular vectors of R in
 *              WORK(IU), storing result in A
-*              (Workspace: need N*N)
+*              Workspace: need   N*N [U]
 *
                CALL DGEMM( 'N', 'N', M, N, N, ONE, U, LDU, WORK( IU ),
      $                     LDWRKU, ZERO, A, LDA )
@@ -23154,7 +23264,7 @@
 *
 *           M .LT. MNTHR
 *
-*           Path 5 (M at least N, but not much larger)
+*           Path 5 (M >= N, but not much larger)
 *           Reduce to bidiagonal form without QR decomposition
 *
             IE = 1
@@ -23163,21 +23273,24 @@
             NWORK = ITAUP + N
 *
 *           Bidiagonalize A
-*           (Workspace: need 3*N+M, prefer 3*N+(M+N)*NB)
+*           Workspace: need   3*N [e, tauq, taup] + M        [work]
+*           Workspace: prefer 3*N [e, tauq, taup] + (M+N)*NB [work]
 *
             CALL DGEBRD( M, N, A, LDA, S, WORK( IE ), WORK( ITAUQ ),
      $                   WORK( ITAUP ), WORK( NWORK ), LWORK-NWORK+1,
      $                   IERR )
             IF( WNTQN ) THEN
 *
+*              Path 5n (M >= N, JOBZ='N')
 *              Perform bidiagonal SVD, only computing singular values
-*              (Workspace: need N+BDSPAC)
+*              Workspace: need   3*N [e, tauq, taup] + BDSPAC
 *
                CALL DBDSDC( 'U', 'N', N, S, WORK( IE ), DUM, 1, DUM, 1,
      $                      DUM, IDUM, WORK( NWORK ), IWORK, INFO )
             ELSE IF( WNTQO ) THEN
+*              Path 5o (M >= N, JOBZ='O')
                IU = NWORK
-               IF( LWORK.GE.M*N+3*N+BDSPAC ) THEN
+               IF( LWORK .GE. M*N + 3*N + BDSPAC ) THEN
 *
 *                 WORK( IU ) is M by N
 *
@@ -23185,6 +23298,8 @@
                   NWORK = IU + LDWRKU*N
                   CALL DLASET( 'F', M, N, ZERO, ZERO, WORK( IU ),
      $                         LDWRKU )
+*                 IR is unused; silence compile warnings
+                  IR = -1
                ELSE
 *
 *                 WORK( IU ) is N by N
@@ -23195,53 +23310,59 @@
 *                 WORK(IR) is LDWRKR by N
 *
                   IR = NWORK
-                  LDWRKR = ( LWORK-N*N-3*N ) / N
+                  LDWRKR = ( LWORK - N*N - 3*N ) / N
                END IF
                NWORK = IU + LDWRKU*N
 *
 *              Perform bidiagonal SVD, computing left singular vectors
 *              of bidiagonal matrix in WORK(IU) and computing right
 *              singular vectors of bidiagonal matrix in VT
-*              (Workspace: need N+N*N+BDSPAC)
+*              Workspace: need   3*N [e, tauq, taup] + N*N [U] + BDSPAC
 *
                CALL DBDSDC( 'U', 'I', N, S, WORK( IE ), WORK( IU ),
      $                      LDWRKU, VT, LDVT, DUM, IDUM, WORK( NWORK ),
      $                      IWORK, INFO )
 *
 *              Overwrite VT by right singular vectors of A
-*              (Workspace: need N*N+2*N, prefer N*N+N+N*NB)
+*              Workspace: need   3*N [e, tauq, taup] + N*N [U] + N    [work]
+*              Workspace: prefer 3*N [e, tauq, taup] + N*N [U] + N*NB [work]
 *
                CALL DORMBR( 'P', 'R', 'T', N, N, N, A, LDA,
      $                      WORK( ITAUP ), VT, LDVT, WORK( NWORK ),
-     $                      LWORK-NWORK+1, IERR )
+     $                      LWORK - NWORK + 1, IERR )
 *
-               IF( LWORK.GE.M*N+3*N+BDSPAC ) THEN
+               IF( LWORK .GE. M*N + 3*N + BDSPAC ) THEN
 *
+*                 Path 5o-fast
 *                 Overwrite WORK(IU) by left singular vectors of A
-*                 (Workspace: need N*N+2*N, prefer N*N+N+N*NB)
+*                 Workspace: need   3*N [e, tauq, taup] + M*N [U] + N    [work]
+*                 Workspace: prefer 3*N [e, tauq, taup] + M*N [U] + N*NB [work]
 *
                   CALL DORMBR( 'Q', 'L', 'N', M, N, N, A, LDA,
      $                         WORK( ITAUQ ), WORK( IU ), LDWRKU,
-     $                         WORK( NWORK ), LWORK-NWORK+1, IERR )
+     $                         WORK( NWORK ), LWORK - NWORK + 1, IERR )
 *
 *                 Copy left singular vectors of A from WORK(IU) to A
 *
                   CALL DLACPY( 'F', M, N, WORK( IU ), LDWRKU, A, LDA )
                ELSE
 *
+*                 Path 5o-slow
 *                 Generate Q in A
-*                 (Workspace: need N*N+2*N, prefer N*N+N+N*NB)
+*                 Workspace: need   3*N [e, tauq, taup] + N*N [U] + N    [work]
+*                 Workspace: prefer 3*N [e, tauq, taup] + N*N [U] + N*NB [work]
 *
                   CALL DORGBR( 'Q', M, N, N, A, LDA, WORK( ITAUQ ),
-     $                         WORK( NWORK ), LWORK-NWORK+1, IERR )
+     $                         WORK( NWORK ), LWORK - NWORK + 1, IERR )
 *
 *                 Multiply Q in A by left singular vectors of
 *                 bidiagonal matrix in WORK(IU), storing result in
 *                 WORK(IR) and copying to A
-*                 (Workspace: need 2*N*N, prefer N*N+M*N)
+*                 Workspace: need   3*N [e, tauq, taup] + N*N [U] + NB*N [R]
+*                 Workspace: prefer 3*N [e, tauq, taup] + N*N [U] + M*N  [R]
 *
                   DO 20 I = 1, M, LDWRKR
-                     CHUNK = MIN( M-I+1, LDWRKR )
+                     CHUNK = MIN( M - I + 1, LDWRKR )
                      CALL DGEMM( 'N', 'N', CHUNK, N, N, ONE, A( I, 1 ),
      $                           LDA, WORK( IU ), LDWRKU, ZERO,
      $                           WORK( IR ), LDWRKR )
@@ -23252,10 +23373,11 @@
 *
             ELSE IF( WNTQS ) THEN
 *
+*              Path 5s (M >= N, JOBZ='S')
 *              Perform bidiagonal SVD, computing left singular vectors
 *              of bidiagonal matrix in U and computing right singular
 *              vectors of bidiagonal matrix in VT
-*              (Workspace: need N+BDSPAC)
+*              Workspace: need   3*N [e, tauq, taup] + BDSPAC
 *
                CALL DLASET( 'F', M, N, ZERO, ZERO, U, LDU )
                CALL DBDSDC( 'U', 'I', N, S, WORK( IE ), U, LDU, VT,
@@ -23264,20 +23386,22 @@
 *
 *              Overwrite U by left singular vectors of A and VT
 *              by right singular vectors of A
-*              (Workspace: need 3*N, prefer 2*N+N*NB)
+*              Workspace: need   3*N [e, tauq, taup] + N    [work]
+*              Workspace: prefer 3*N [e, tauq, taup] + N*NB [work]
 *
                CALL DORMBR( 'Q', 'L', 'N', M, N, N, A, LDA,
      $                      WORK( ITAUQ ), U, LDU, WORK( NWORK ),
-     $                      LWORK-NWORK+1, IERR )
+     $                      LWORK - NWORK + 1, IERR )
                CALL DORMBR( 'P', 'R', 'T', N, N, N, A, LDA,
      $                      WORK( ITAUP ), VT, LDVT, WORK( NWORK ),
-     $                      LWORK-NWORK+1, IERR )
+     $                      LWORK - NWORK + 1, IERR )
             ELSE IF( WNTQA ) THEN
 *
+*              Path 5a (M >= N, JOBZ='A')
 *              Perform bidiagonal SVD, computing left singular vectors
 *              of bidiagonal matrix in U and computing right singular
 *              vectors of bidiagonal matrix in VT
-*              (Workspace: need N+BDSPAC)
+*              Workspace: need   3*N [e, tauq, taup] + BDSPAC
 *
                CALL DLASET( 'F', M, M, ZERO, ZERO, U, LDU )
                CALL DBDSDC( 'U', 'I', N, S, WORK( IE ), U, LDU, VT,
@@ -23287,20 +23411,21 @@
 *              Set the right corner of U to identity matrix
 *
                IF( M.GT.N ) THEN
-                  CALL DLASET( 'F', M-N, M-N, ZERO, ONE, U( N+1, N+1 ),
+                  CALL DLASET( 'F', M - N, M - N, ZERO, ONE, U(N+1,N+1),
      $                         LDU )
                END IF
 *
 *              Overwrite U by left singular vectors of A and VT
 *              by right singular vectors of A
-*              (Workspace: need N*N+2*N+M, prefer N*N+2*N+M*NB)
+*              Workspace: need   3*N [e, tauq, taup] + M    [work]
+*              Workspace: prefer 3*N [e, tauq, taup] + M*NB [work]
 *
                CALL DORMBR( 'Q', 'L', 'N', M, M, N, A, LDA,
      $                      WORK( ITAUQ ), U, LDU, WORK( NWORK ),
-     $                      LWORK-NWORK+1, IERR )
+     $                      LWORK - NWORK + 1, IERR )
                CALL DORMBR( 'P', 'R', 'T', N, N, M, A, LDA,
      $                      WORK( ITAUP ), VT, LDVT, WORK( NWORK ),
-     $                      LWORK-NWORK+1, IERR )
+     $                      LWORK - NWORK + 1, IERR )
             END IF
 *
          END IF
@@ -23315,17 +23440,18 @@
 *
             IF( WNTQN ) THEN
 *
-*              Path 1t (N much larger than M, JOBZ='N')
+*              Path 1t (N >> M, JOBZ='N')
 *              No singular vectors to be computed
 *
                ITAU = 1
                NWORK = ITAU + M
 *
 *              Compute A=L*Q
-*              (Workspace: need 2*M, prefer M+M*NB)
+*              Workspace: need   M [tau] + M [work]
+*              Workspace: prefer M [tau] + M*NB [work]
 *
                CALL DGELQF( M, N, A, LDA, WORK( ITAU ), WORK( NWORK ),
-     $                      LWORK-NWORK+1, IERR )
+     $                      LWORK - NWORK + 1, IERR )
 *
 *              Zero out above L
 *
@@ -23336,7 +23462,8 @@
                NWORK = ITAUP + M
 *
 *              Bidiagonalize L in A
-*              (Workspace: need 4*M, prefer 3*M+2*M*NB)
+*              Workspace: need   3*M [e, tauq, taup] + M      [work]
+*              Workspace: prefer 3*M [e, tauq, taup] + 2*M*NB [work]
 *
                CALL DGEBRD( M, M, A, LDA, S, WORK( IE ), WORK( ITAUQ ),
      $                      WORK( ITAUP ), WORK( NWORK ), LWORK-NWORK+1,
@@ -23344,68 +23471,69 @@
                NWORK = IE + M
 *
 *              Perform bidiagonal SVD, computing singular values only
-*              (Workspace: need M+BDSPAC)
+*              Workspace: need   M [e] + BDSPAC
 *
                CALL DBDSDC( 'U', 'N', M, S, WORK( IE ), DUM, 1, DUM, 1,
      $                      DUM, IDUM, WORK( NWORK ), IWORK, INFO )
 *
             ELSE IF( WNTQO ) THEN
 *
-*              Path 2t (N much larger than M, JOBZ='O')
+*              Path 2t (N >> M, JOBZ='O')
 *              M right singular vectors to be overwritten on A and
 *              M left singular vectors to be computed in U
 *
                IVT = 1
 *
-*              IVT is M by M
+*              WORK(IVT) is M by M
+*              WORK(IL)  is M by M; it is later resized to M by chunk for gemm
 *
                IL = IVT + M*M
-               IF( LWORK.GE.M*N+M*M+3*M+BDSPAC ) THEN
-*
-*                 WORK(IL) is M by N
-*
+               IF( LWORK .GE. M*N + M*M + 3*M + BDSPAC ) THEN
                   LDWRKL = M
                   CHUNK = N
                ELSE
                   LDWRKL = M
-                  CHUNK = ( LWORK-M*M ) / M
+                  CHUNK = ( LWORK - M*M ) / M
                END IF
                ITAU = IL + LDWRKL*M
                NWORK = ITAU + M
 *
 *              Compute A=L*Q
-*              (Workspace: need M*M+2*M, prefer M*M+M+M*NB)
+*              Workspace: need   M*M [VT] + M*M [L] + M [tau] + M    [work]
+*              Workspace: prefer M*M [VT] + M*M [L] + M [tau] + M*NB [work]
 *
                CALL DGELQF( M, N, A, LDA, WORK( ITAU ), WORK( NWORK ),
-     $                      LWORK-NWORK+1, IERR )
+     $                      LWORK - NWORK + 1, IERR )
 *
 *              Copy L to WORK(IL), zeroing about above it
 *
                CALL DLACPY( 'L', M, M, A, LDA, WORK( IL ), LDWRKL )
-               CALL DLASET( 'U', M-1, M-1, ZERO, ZERO,
-     $                      WORK( IL+LDWRKL ), LDWRKL )
+               CALL DLASET( 'U', M - 1, M - 1, ZERO, ZERO,
+     $                      WORK( IL + LDWRKL ), LDWRKL )
 *
 *              Generate Q in A
-*              (Workspace: need M*M+2*M, prefer M*M+M+M*NB)
+*              Workspace: need   M*M [VT] + M*M [L] + M [tau] + M    [work]
+*              Workspace: prefer M*M [VT] + M*M [L] + M [tau] + M*NB [work]
 *
                CALL DORGLQ( M, N, M, A, LDA, WORK( ITAU ),
-     $                      WORK( NWORK ), LWORK-NWORK+1, IERR )
+     $                      WORK( NWORK ), LWORK - NWORK + 1, IERR )
                IE = ITAU
                ITAUQ = IE + M
                ITAUP = ITAUQ + M
                NWORK = ITAUP + M
 *
 *              Bidiagonalize L in WORK(IL)
-*              (Workspace: need M*M+4*M, prefer M*M+3*M+2*M*NB)
+*              Workspace: need   M*M [VT] + M*M [L] + 3*M [e, tauq, taup] + M      [work]
+*              Workspace: prefer M*M [VT] + M*M [L] + 3*M [e, tauq, taup] + 2*M*NB [work]
 *
                CALL DGEBRD( M, M, WORK( IL ), LDWRKL, S, WORK( IE ),
      $                      WORK( ITAUQ ), WORK( ITAUP ), WORK( NWORK ),
-     $                      LWORK-NWORK+1, IERR )
+     $                      LWORK - NWORK + 1, IERR )
 *
 *              Perform bidiagonal SVD, computing left singular vectors
 *              of bidiagonal matrix in U, and computing right singular
 *              vectors of bidiagonal matrix in WORK(IVT)
-*              (Workspace: need M+M*M+BDSPAC)
+*              Workspace: need   M*M [VT] + M*M [L] + 3*M [e, tauq, taup] + BDSPAC
 *
                CALL DBDSDC( 'U', 'I', M, S, WORK( IE ), U, LDU,
      $                      WORK( IVT ), M, DUM, IDUM, WORK( NWORK ),
@@ -23413,21 +23541,24 @@
 *
 *              Overwrite U by left singular vectors of L and WORK(IVT)
 *              by right singular vectors of L
-*              (Workspace: need 2*M*M+3*M, prefer 2*M*M+2*M+M*NB)
+*              Workspace: need   M*M [VT] + M*M [L] + 3*M [e, tauq, taup] + M    [work]
+*              Workspace: prefer M*M [VT] + M*M [L] + 3*M [e, tauq, taup] + M*NB [work]
 *
                CALL DORMBR( 'Q', 'L', 'N', M, M, M, WORK( IL ), LDWRKL,
      $                      WORK( ITAUQ ), U, LDU, WORK( NWORK ),
-     $                      LWORK-NWORK+1, IERR )
+     $                      LWORK - NWORK + 1, IERR )
                CALL DORMBR( 'P', 'R', 'T', M, M, M, WORK( IL ), LDWRKL,
      $                      WORK( ITAUP ), WORK( IVT ), M,
-     $                      WORK( NWORK ), LWORK-NWORK+1, IERR )
+     $                      WORK( NWORK ), LWORK - NWORK + 1, IERR )
 *
 *              Multiply right singular vectors of L in WORK(IVT) by Q
 *              in A, storing result in WORK(IL) and copying to A
-*              (Workspace: need 2*M*M, prefer M*M+M*N)
+*              Workspace: need   M*M [VT] + M*M [L]
+*              Workspace: prefer M*M [VT] + M*N [L]
+*              At this point, L is resized as M by chunk.
 *
                DO 30 I = 1, N, CHUNK
-                  BLK = MIN( N-I+1, CHUNK )
+                  BLK = MIN( N - I + 1, CHUNK )
                   CALL DGEMM( 'N', 'N', M, BLK, M, ONE, WORK( IVT ), M,
      $                        A( 1, I ), LDA, ZERO, WORK( IL ), LDWRKL )
                   CALL DLACPY( 'F', M, BLK, WORK( IL ), LDWRKL,
@@ -23436,7 +23567,7 @@
 *
             ELSE IF( WNTQS ) THEN
 *
-*              Path 3t (N much larger than M, JOBZ='S')
+*              Path 3t (N >> M, JOBZ='S')
 *              M right singular vectors to be computed in VT and
 *              M left singular vectors to be computed in U
 *
@@ -23449,38 +23580,41 @@
                NWORK = ITAU + M
 *
 *              Compute A=L*Q
-*              (Workspace: need M*M+2*M, prefer M*M+M+M*NB)
+*              Workspace: need   M*M [L] + M [tau] + M    [work]
+*              Workspace: prefer M*M [L] + M [tau] + M*NB [work]
 *
                CALL DGELQF( M, N, A, LDA, WORK( ITAU ), WORK( NWORK ),
-     $                      LWORK-NWORK+1, IERR )
+     $                      LWORK - NWORK + 1, IERR )
 *
 *              Copy L to WORK(IL), zeroing out above it
 *
                CALL DLACPY( 'L', M, M, A, LDA, WORK( IL ), LDWRKL )
-               CALL DLASET( 'U', M-1, M-1, ZERO, ZERO,
-     $                      WORK( IL+LDWRKL ), LDWRKL )
+               CALL DLASET( 'U', M - 1, M - 1, ZERO, ZERO,
+     $                      WORK( IL + LDWRKL ), LDWRKL )
 *
 *              Generate Q in A
-*              (Workspace: need M*M+2*M, prefer M*M+M+M*NB)
+*              Workspace: need   M*M [L] + M [tau] + M    [work]
+*              Workspace: prefer M*M [L] + M [tau] + M*NB [work]
 *
                CALL DORGLQ( M, N, M, A, LDA, WORK( ITAU ),
-     $                      WORK( NWORK ), LWORK-NWORK+1, IERR )
+     $                      WORK( NWORK ), LWORK - NWORK + 1, IERR )
                IE = ITAU
                ITAUQ = IE + M
                ITAUP = ITAUQ + M
                NWORK = ITAUP + M
 *
-*              Bidiagonalize L in WORK(IU), copying result to U
-*              (Workspace: need M*M+4*M, prefer M*M+3*M+2*M*NB)
+*              Bidiagonalize L in WORK(IU).
+*              Workspace: need   M*M [L] + 3*M [e, tauq, taup] + M      [work]
+*              Workspace: prefer M*M [L] + 3*M [e, tauq, taup] + 2*M*NB [work]
 *
                CALL DGEBRD( M, M, WORK( IL ), LDWRKL, S, WORK( IE ),
      $                      WORK( ITAUQ ), WORK( ITAUP ), WORK( NWORK ),
-     $                      LWORK-NWORK+1, IERR )
+     $                      LWORK - NWORK + 1, IERR )
 *
 *              Perform bidiagonal SVD, computing left singular vectors
 *              of bidiagonal matrix in U and computing right singular
 *              vectors of bidiagonal matrix in VT
-*              (Workspace: need M+BDSPAC)
+*              Workspace: need   M*M [L] + 3*M [e, tauq, taup] + BDSPAC
 *
                CALL DBDSDC( 'U', 'I', M, S, WORK( IE ), U, LDU, VT,
      $                      LDVT, DUM, IDUM, WORK( NWORK ), IWORK,
@@ -23488,18 +23622,19 @@
 *
 *              Overwrite U by left singular vectors of L and VT
 *              by right singular vectors of L
-*              (Workspace: need M*M+3*M, prefer M*M+2*M+M*NB)
+*              Workspace: need   M*M [L] + 3*M [e, tauq, taup] + M    [work]
+*              Workspace: prefer M*M [L] + 3*M [e, tauq, taup] + M*NB [work]
 *
                CALL DORMBR( 'Q', 'L', 'N', M, M, M, WORK( IL ), LDWRKL,
      $                      WORK( ITAUQ ), U, LDU, WORK( NWORK ),
-     $                      LWORK-NWORK+1, IERR )
+     $                      LWORK - NWORK + 1, IERR )
                CALL DORMBR( 'P', 'R', 'T', M, M, M, WORK( IL ), LDWRKL,
      $                      WORK( ITAUP ), VT, LDVT, WORK( NWORK ),
-     $                      LWORK-NWORK+1, IERR )
+     $                      LWORK - NWORK + 1, IERR )
 *
 *              Multiply right singular vectors of L in WORK(IL) by
 *              Q in A, storing result in VT
-*              (Workspace: need M*M)
+*              Workspace: need   M*M [L]
 *
                CALL DLACPY( 'F', M, M, VT, LDVT, WORK( IL ), LDWRKL )
                CALL DGEMM( 'N', 'N', M, N, M, ONE, WORK( IL ), LDWRKL,
@@ -23507,7 +23642,7 @@
 *
             ELSE IF( WNTQA ) THEN
 *
-*              Path 4t (N much larger than M, JOBZ='A')
+*              Path 4t (N >> M, JOBZ='A')
 *              N right singular vectors to be computed in VT and
 *              M left singular vectors to be computed in U
 *
@@ -23520,17 +23655,19 @@
                NWORK = ITAU + M
 *
 *              Compute A=L*Q, copying result to VT
-*              (Workspace: need M*M+2*M, prefer M*M+M+M*NB)
+*              Workspace: need   M*M [VT] + M [tau] + M    [work]
+*              Workspace: prefer M*M [VT] + M [tau] + M*NB [work]
 *
                CALL DGELQF( M, N, A, LDA, WORK( ITAU ), WORK( NWORK ),
-     $                      LWORK-NWORK+1, IERR )
+     $                      LWORK - NWORK + 1, IERR )
                CALL DLACPY( 'U', M, N, A, LDA, VT, LDVT )
 *
 *              Generate Q in VT
-*              (Workspace: need M*M+2*M, prefer M*M+M+M*NB)
+*              Workspace: need   M*M [VT] + M [tau] + N    [work]
+*              Workspace: prefer M*M [VT] + M [tau] + N*NB [work]
 *
                CALL DORGLQ( N, N, M, VT, LDVT, WORK( ITAU ),
-     $                      WORK( NWORK ), LWORK-NWORK+1, IERR )
+     $                      WORK( NWORK ), LWORK - NWORK + 1, IERR )
 *
 *              Produce L in A, zeroing out other entries
 *
@@ -23541,7 +23678,8 @@
                NWORK = ITAUP + M
 *
 *              Bidiagonalize L in A
-*              (Workspace: need M*M+4*M, prefer M*M+3*M+2*M*NB)
+*              Workspace: need   M*M [VT] + 3*M [e, tauq, taup] + M      [work]
+*              Workspace: prefer M*M [VT] + 3*M [e, tauq, taup] + 2*M*NB [work]
 *
                CALL DGEBRD( M, M, A, LDA, S, WORK( IE ), WORK( ITAUQ ),
      $                      WORK( ITAUP ), WORK( NWORK ), LWORK-NWORK+1,
@@ -23550,7 +23688,7 @@
 *              Perform bidiagonal SVD, computing left singular vectors
 *              of bidiagonal matrix in U and computing right singular
 *              vectors of bidiagonal matrix in WORK(IVT)
-*              (Workspace: need M+M*M+BDSPAC)
+*              Workspace: need   M*M [VT] + 3*M [e, tauq, taup] + BDSPAC
 *
                CALL DBDSDC( 'U', 'I', M, S, WORK( IE ), U, LDU,
      $                      WORK( IVT ), LDWKVT, DUM, IDUM,
@@ -23558,18 +23696,19 @@
 *
 *              Overwrite U by left singular vectors of L and WORK(IVT)
 *              by right singular vectors of L
-*              (Workspace: need M*M+3*M, prefer M*M+2*M+M*NB)
+*              Workspace: need   M*M [VT] + 3*M [e, tauq, taup]+ M    [work]
+*              Workspace: prefer M*M [VT] + 3*M [e, tauq, taup]+ M*NB [work]
 *
                CALL DORMBR( 'Q', 'L', 'N', M, M, M, A, LDA,
      $                      WORK( ITAUQ ), U, LDU, WORK( NWORK ),
-     $                      LWORK-NWORK+1, IERR )
+     $                      LWORK - NWORK + 1, IERR )
                CALL DORMBR( 'P', 'R', 'T', M, M, M, A, LDA,
      $                      WORK( ITAUP ), WORK( IVT ), LDWKVT,
-     $                      WORK( NWORK ), LWORK-NWORK+1, IERR )
+     $                      WORK( NWORK ), LWORK - NWORK + 1, IERR )
 *
 *              Multiply right singular vectors of L in WORK(IVT) by
 *              Q in VT, storing result in A
-*              (Workspace: need M*M)
+*              Workspace: need   M*M [VT]
 *
                CALL DGEMM( 'N', 'N', M, N, M, ONE, WORK( IVT ), LDWKVT,
      $                     VT, LDVT, ZERO, A, LDA )
@@ -23584,7 +23723,7 @@
 *
 *           N .LT. MNTHR
 *
-*           Path 5t (N greater than M, but not much larger)
+*           Path 5t (N > M, but not much larger)
 *           Reduce to bidiagonal form without LQ decomposition
 *
             IE = 1
@@ -23593,28 +23732,33 @@
             NWORK = ITAUP + M
 *
 *           Bidiagonalize A
-*           (Workspace: need 3*M+N, prefer 3*M+(M+N)*NB)
+*           Workspace: need   3*M [e, tauq, taup] + N        [work]
+*           Workspace: prefer 3*M [e, tauq, taup] + (M+N)*NB [work]
 *
             CALL DGEBRD( M, N, A, LDA, S, WORK( IE ), WORK( ITAUQ ),
      $                   WORK( ITAUP ), WORK( NWORK ), LWORK-NWORK+1,
      $                   IERR )
             IF( WNTQN ) THEN
 *
+*              Path 5tn (N > M, JOBZ='N')
 *              Perform bidiagonal SVD, only computing singular values
-*              (Workspace: need M+BDSPAC)
+*              Workspace: need   3*M [e, tauq, taup] + BDSPAC
 *
                CALL DBDSDC( 'L', 'N', M, S, WORK( IE ), DUM, 1, DUM, 1,
      $                      DUM, IDUM, WORK( NWORK ), IWORK, INFO )
             ELSE IF( WNTQO ) THEN
+*              Path 5to (N > M, JOBZ='O')
                LDWKVT = M
                IVT = NWORK
-               IF( LWORK.GE.M*N+3*M+BDSPAC ) THEN
+               IF( LWORK .GE. M*N + 3*M + BDSPAC ) THEN
 *
 *                 WORK( IVT ) is M by N
 *
                   CALL DLASET( 'F', M, N, ZERO, ZERO, WORK( IVT ),
      $                         LDWKVT )
                   NWORK = IVT + LDWKVT*N
+*                 IL is unused; silence compile warnings
+                  IL = -1
                ELSE
 *
 *                 WORK( IVT ) is M by M
@@ -23624,52 +23768,58 @@
 *
 *                 WORK(IL) is M by CHUNK
 *
-                  CHUNK = ( LWORK-M*M-3*M ) / M
+                  CHUNK = ( LWORK - M*M - 3*M ) / M
                END IF
 *
 *              Perform bidiagonal SVD, computing left singular vectors
 *              of bidiagonal matrix in U and computing right singular
 *              vectors of bidiagonal matrix in WORK(IVT)
-*              (Workspace: need M*M+BDSPAC)
+*              Workspace: need   3*M [e, tauq, taup] + M*M [VT] + BDSPAC
 *
                CALL DBDSDC( 'L', 'I', M, S, WORK( IE ), U, LDU,
      $                      WORK( IVT ), LDWKVT, DUM, IDUM,
      $                      WORK( NWORK ), IWORK, INFO )
 *
 *              Overwrite U by left singular vectors of A
-*              (Workspace: need M*M+2*M, prefer M*M+M+M*NB)
+*              Workspace: need   3*M [e, tauq, taup] + M*M [VT] + M    [work]
+*              Workspace: prefer 3*M [e, tauq, taup] + M*M [VT] + M*NB [work]
 *
                CALL DORMBR( 'Q', 'L', 'N', M, M, N, A, LDA,
      $                      WORK( ITAUQ ), U, LDU, WORK( NWORK ),
-     $                      LWORK-NWORK+1, IERR )
+     $                      LWORK - NWORK + 1, IERR )
 *
-               IF( LWORK.GE.M*N+3*M+BDSPAC ) THEN
+               IF( LWORK .GE. M*N + 3*M + BDSPAC ) THEN
 *
+*                 Path 5to-fast
 *                 Overwrite WORK(IVT) by left singular vectors of A
-*                 (Workspace: need M*M+2*M, prefer M*M+M+M*NB)
+*                 Workspace: need   3*M [e, tauq, taup] + M*N [VT] + M    [work]
+*                 Workspace: prefer 3*M [e, tauq, taup] + M*N [VT] + M*NB [work]
 *
                   CALL DORMBR( 'P', 'R', 'T', M, N, M, A, LDA,
      $                         WORK( ITAUP ), WORK( IVT ), LDWKVT,
-     $                         WORK( NWORK ), LWORK-NWORK+1, IERR )
+     $                         WORK( NWORK ), LWORK - NWORK + 1, IERR )
 *
 *                 Copy right singular vectors of A from WORK(IVT) to A
 *
                   CALL DLACPY( 'F', M, N, WORK( IVT ), LDWKVT, A, LDA )
                ELSE
 *
+*                 Path 5to-slow
 *                 Generate P**T in A
-*                 (Workspace: need M*M+2*M, prefer M*M+M+M*NB)
+*                 Workspace: need   3*M [e, tauq, taup] + M*M [VT] + M    [work]
+*                 Workspace: prefer 3*M [e, tauq, taup] + M*M [VT] + M*NB [work]
 *
                   CALL DORGBR( 'P', M, N, M, A, LDA, WORK( ITAUP ),
-     $                         WORK( NWORK ), LWORK-NWORK+1, IERR )
+     $                         WORK( NWORK ), LWORK - NWORK + 1, IERR )
 *
 *                 Multiply Q in A by right singular vectors of
 *                 bidiagonal matrix in WORK(IVT), storing result in
 *                 WORK(IL) and copying to A
-*                 (Workspace: need 2*M*M, prefer M*M+M*N)
+*                 Workspace: need   3*M [e, tauq, taup] + M*M [VT] + M*NB [L]
+*                 Workspace: prefer 3*M [e, tauq, taup] + M*M [VT] + M*N  [L]
 *
                   DO 40 I = 1, N, CHUNK
-                     BLK = MIN( N-I+1, CHUNK )
+                     BLK = MIN( N - I + 1, CHUNK )
                      CALL DGEMM( 'N', 'N', M, BLK, M, ONE, WORK( IVT ),
      $                           LDWKVT, A( 1, I ), LDA, ZERO,
      $                           WORK( IL ), M )
@@ -23679,10 +23829,11 @@
                END IF
             ELSE IF( WNTQS ) THEN
 *
+*              Path 5ts (N > M, JOBZ='S')
 *              Perform bidiagonal SVD, computing left singular vectors
 *              of bidiagonal matrix in U and computing right singular
 *              vectors of bidiagonal matrix in VT
-*              (Workspace: need M+BDSPAC)
+*              Workspace: need   3*M [e, tauq, taup] + BDSPAC
 *
                CALL DLASET( 'F', M, N, ZERO, ZERO, VT, LDVT )
                CALL DBDSDC( 'L', 'I', M, S, WORK( IE ), U, LDU, VT,
@@ -23691,20 +23842,22 @@
 *
 *              Overwrite U by left singular vectors of A and VT
 *              by right singular vectors of A
-*              (Workspace: need 3*M, prefer 2*M+M*NB)
+*              Workspace: need   3*M [e, tauq, taup] + M    [work]
+*              Workspace: prefer 3*M [e, tauq, taup] + M*NB [work]
 *
                CALL DORMBR( 'Q', 'L', 'N', M, M, N, A, LDA,
      $                      WORK( ITAUQ ), U, LDU, WORK( NWORK ),
-     $                      LWORK-NWORK+1, IERR )
+     $                      LWORK - NWORK + 1, IERR )
                CALL DORMBR( 'P', 'R', 'T', M, N, M, A, LDA,
      $                      WORK( ITAUP ), VT, LDVT, WORK( NWORK ),
-     $                      LWORK-NWORK+1, IERR )
+     $                      LWORK - NWORK + 1, IERR )
             ELSE IF( WNTQA ) THEN
 *
+*              Path 5ta (N > M, JOBZ='A')
 *              Perform bidiagonal SVD, computing left singular vectors
 *              of bidiagonal matrix in U and computing right singular
 *              vectors of bidiagonal matrix in VT
-*              (Workspace: need M+BDSPAC)
+*              Workspace: need   3*M [e, tauq, taup] + BDSPAC
 *
                CALL DLASET( 'F', N, N, ZERO, ZERO, VT, LDVT )
                CALL DBDSDC( 'L', 'I', M, S, WORK( IE ), U, LDU, VT,
@@ -23714,20 +23867,21 @@
 *              Set the right corner of VT to identity matrix
 *
                IF( N.GT.M ) THEN
-                  CALL DLASET( 'F', N-M, N-M, ZERO, ONE, VT( M+1, M+1 ),
+                  CALL DLASET( 'F', N-M, N-M, ZERO, ONE, VT(M+1,M+1),
      $                         LDVT )
                END IF
 *
 *              Overwrite U by left singular vectors of A and VT
 *              by right singular vectors of A
-*              (Workspace: need 2*M+N, prefer 2*M+N*NB)
+*              Workspace: need   3*M [e, tauq, taup] + N    [work]
+*              Workspace: prefer 3*M [e, tauq, taup] + N*NB [work]
 *
                CALL DORMBR( 'Q', 'L', 'N', M, M, N, A, LDA,
      $                      WORK( ITAUQ ), U, LDU, WORK( NWORK ),
-     $                      LWORK-NWORK+1, IERR )
+     $                      LWORK - NWORK + 1, IERR )
                CALL DORMBR( 'P', 'R', 'T', N, N, M, A, LDA,
      $                      WORK( ITAUP ), VT, LDVT, WORK( NWORK ),
-     $                      LWORK-NWORK+1, IERR )
+     $                      LWORK - NWORK + 1, IERR )
             END IF
 *
          END IF
@@ -23758,16 +23912,16 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DGESV + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dgesv.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dgesv.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dgesv.f"> 
+*> Download DGESV + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dgesv.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dgesv.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dgesv.f">
 *> [TXT]</a>
 *> \endhtmlonly
 *
@@ -23775,7 +23929,7 @@
 *  ===========
 *
 *       SUBROUTINE DGESV( N, NRHS, A, LDA, IPIV, B, LDB, INFO )
-* 
+*
 *       .. Scalar Arguments ..
 *       INTEGER            INFO, LDA, LDB, N, NRHS
 *       ..
@@ -23783,7 +23937,7 @@
 *       INTEGER            IPIV( * )
 *       DOUBLE PRECISION   A( LDA, * ), B( LDB, * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -23866,22 +24020,22 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date November 2011
+*> \date December 2016
 *
 *> \ingroup doubleGEsolve
 *
 *  =====================================================================
       SUBROUTINE DGESV( N, NRHS, A, LDA, IPIV, B, LDB, INFO )
 *
-*  -- LAPACK driver routine (version 3.4.0) --
+*  -- LAPACK driver routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     November 2011
+*     December 2016
 *
 *     .. Scalar Arguments ..
       INTEGER            INFO, LDA, LDB, N, NRHS
@@ -23937,25 +24091,25 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DGESVD + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dgesvd.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dgesvd.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dgesvd.f"> 
+*> Download DGESVD + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dgesvd.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dgesvd.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dgesvd.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       SUBROUTINE DGESVD( JOBU, JOBVT, M, N, A, LDA, S, U, LDU, VT, LDVT,
 *                          WORK, LWORK, INFO )
-* 
+*
 *       .. Scalar Arguments ..
 *       CHARACTER          JOBU, JOBVT
 *       INTEGER            INFO, LDA, LDU, LDVT, LWORK, M, N
@@ -23964,7 +24118,7 @@
 *       DOUBLE PRECISION   A( LDA, * ), S( * ), U( LDU, * ),
 *      $                   VT( LDVT, * ), WORK( * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -24108,9 +24262,9 @@
 *>          LWORK is INTEGER
 *>          The dimension of the array WORK.
 *>          LWORK >= MAX(1,5*MIN(M,N)) for the paths (see comments inside code):
-*>             - PATH 1  (M much larger than N, JOBU='N') 
+*>             - PATH 1  (M much larger than N, JOBU='N')
 *>             - PATH 1t (N much larger than M, JOBVT='N')
-*>          LWORK >= MAX(1,3*MIN(M,N)+MAX(M,N),5*MIN(M,N)) for the other paths
+*>          LWORK >= MAX(1,3*MIN(M,N) + MAX(M,N),5*MIN(M,N)) for the other paths
 *>          For good performance, LWORK should generally be larger.
 *>
 *>          If LWORK = -1, then a workspace query is assumed; the routine
@@ -24133,10 +24287,10 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
 *> \date April 2012
 *
@@ -24146,7 +24300,7 @@
       SUBROUTINE DGESVD( JOBU, JOBVT, M, N, A, LDA, S, U, LDU,
      $                   VT, LDVT, WORK, LWORK, INFO )
 *
-*  -- LAPACK driver routine (version 3.4.1) --
+*  -- LAPACK driver routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
 *     April 2012
@@ -24249,24 +24403,24 @@
             BDSPAC = 5*N
 *           Compute space needed for DGEQRF
             CALL DGEQRF( M, N, A, LDA, DUM(1), DUM(1), -1, IERR )
-            LWORK_DGEQRF=DUM(1)
+            LWORK_DGEQRF = INT( DUM(1) )
 *           Compute space needed for DORGQR
             CALL DORGQR( M, N, N, A, LDA, DUM(1), DUM(1), -1, IERR )
-            LWORK_DORGQR_N=DUM(1)
+            LWORK_DORGQR_N = INT( DUM(1) )
             CALL DORGQR( M, M, N, A, LDA, DUM(1), DUM(1), -1, IERR )
-            LWORK_DORGQR_M=DUM(1)
+            LWORK_DORGQR_M = INT( DUM(1) )
 *           Compute space needed for DGEBRD
             CALL DGEBRD( N, N, A, LDA, S, DUM(1), DUM(1),
      $                   DUM(1), DUM(1), -1, IERR )
-            LWORK_DGEBRD=DUM(1)
+            LWORK_DGEBRD = INT( DUM(1) )
 *           Compute space needed for DORGBR P
             CALL DORGBR( 'P', N, N, N, A, LDA, DUM(1),
      $                   DUM(1), -1, IERR )
-            LWORK_DORGBR_P=DUM(1)
+            LWORK_DORGBR_P = INT( DUM(1) )
 *           Compute space needed for DORGBR Q
             CALL DORGBR( 'Q', N, N, N, A, LDA, DUM(1),
      $                   DUM(1), -1, IERR )
-            LWORK_DORGBR_Q=DUM(1)
+            LWORK_DORGBR_Q = INT( DUM(1) )
 *
             IF( M.GE.MNTHR ) THEN
                IF( WNTUN ) THEN
@@ -24274,9 +24428,9 @@
 *                 Path 1 (M much larger than N, JOBU='N')
 *
                   MAXWRK = N + LWORK_DGEQRF
-                  MAXWRK = MAX( MAXWRK, 3*N+LWORK_DGEBRD )
+                  MAXWRK = MAX( MAXWRK, 3*N + LWORK_DGEBRD )
                   IF( WNTVO .OR. WNTVAS )
-     $               MAXWRK = MAX( MAXWRK, 3*N+LWORK_DORGBR_P )
+     $               MAXWRK = MAX( MAXWRK, 3*N + LWORK_DORGBR_P )
                   MAXWRK = MAX( MAXWRK, BDSPAC )
                   MINWRK = MAX( 4*N, BDSPAC )
                ELSE IF( WNTUO .AND. WNTVN ) THEN
@@ -24284,97 +24438,97 @@
 *                 Path 2 (M much larger than N, JOBU='O', JOBVT='N')
 *
                   WRKBL = N + LWORK_DGEQRF
-                  WRKBL = MAX( WRKBL, N+LWORK_DORGQR_N )
-                  WRKBL = MAX( WRKBL, 3*N+LWORK_DGEBRD )
-                  WRKBL = MAX( WRKBL, 3*N+LWORK_DORGBR_Q )
+                  WRKBL = MAX( WRKBL, N + LWORK_DORGQR_N )
+                  WRKBL = MAX( WRKBL, 3*N + LWORK_DGEBRD )
+                  WRKBL = MAX( WRKBL, 3*N + LWORK_DORGBR_Q )
                   WRKBL = MAX( WRKBL, BDSPAC )
-                  MAXWRK = MAX( N*N+WRKBL, N*N+M*N+N )
-                  MINWRK = MAX( 3*N+M, BDSPAC )
+                  MAXWRK = MAX( N*N + WRKBL, N*N + M*N + N )
+                  MINWRK = MAX( 3*N + M, BDSPAC )
                ELSE IF( WNTUO .AND. WNTVAS ) THEN
 *
 *                 Path 3 (M much larger than N, JOBU='O', JOBVT='S' or
 *                 'A')
 *
                   WRKBL = N + LWORK_DGEQRF
-                  WRKBL = MAX( WRKBL, N+LWORK_DORGQR_N )
-                  WRKBL = MAX( WRKBL, 3*N+LWORK_DGEBRD )
-                  WRKBL = MAX( WRKBL, 3*N+LWORK_DORGBR_Q )
-                  WRKBL = MAX( WRKBL, 3*N+LWORK_DORGBR_P )
+                  WRKBL = MAX( WRKBL, N + LWORK_DORGQR_N )
+                  WRKBL = MAX( WRKBL, 3*N + LWORK_DGEBRD )
+                  WRKBL = MAX( WRKBL, 3*N + LWORK_DORGBR_Q )
+                  WRKBL = MAX( WRKBL, 3*N + LWORK_DORGBR_P )
                   WRKBL = MAX( WRKBL, BDSPAC )
-                  MAXWRK = MAX( N*N+WRKBL, N*N+M*N+N )
-                  MINWRK = MAX( 3*N+M, BDSPAC )
+                  MAXWRK = MAX( N*N + WRKBL, N*N + M*N + N )
+                  MINWRK = MAX( 3*N + M, BDSPAC )
                ELSE IF( WNTUS .AND. WNTVN ) THEN
 *
 *                 Path 4 (M much larger than N, JOBU='S', JOBVT='N')
 *
                   WRKBL = N + LWORK_DGEQRF
-                  WRKBL = MAX( WRKBL, N+LWORK_DORGQR_N )
-                  WRKBL = MAX( WRKBL, 3*N+LWORK_DGEBRD )
-                  WRKBL = MAX( WRKBL, 3*N+LWORK_DORGBR_Q )
+                  WRKBL = MAX( WRKBL, N + LWORK_DORGQR_N )
+                  WRKBL = MAX( WRKBL, 3*N + LWORK_DGEBRD )
+                  WRKBL = MAX( WRKBL, 3*N + LWORK_DORGBR_Q )
                   WRKBL = MAX( WRKBL, BDSPAC )
                   MAXWRK = N*N + WRKBL
-                  MINWRK = MAX( 3*N+M, BDSPAC )
+                  MINWRK = MAX( 3*N + M, BDSPAC )
                ELSE IF( WNTUS .AND. WNTVO ) THEN
 *
 *                 Path 5 (M much larger than N, JOBU='S', JOBVT='O')
 *
                   WRKBL = N + LWORK_DGEQRF
-                  WRKBL = MAX( WRKBL, N+LWORK_DORGQR_N )
-                  WRKBL = MAX( WRKBL, 3*N+LWORK_DGEBRD )
-                  WRKBL = MAX( WRKBL, 3*N+LWORK_DORGBR_Q )
-                  WRKBL = MAX( WRKBL, 3*N+LWORK_DORGBR_P )
+                  WRKBL = MAX( WRKBL, N + LWORK_DORGQR_N )
+                  WRKBL = MAX( WRKBL, 3*N + LWORK_DGEBRD )
+                  WRKBL = MAX( WRKBL, 3*N + LWORK_DORGBR_Q )
+                  WRKBL = MAX( WRKBL, 3*N + LWORK_DORGBR_P )
                   WRKBL = MAX( WRKBL, BDSPAC )
                   MAXWRK = 2*N*N + WRKBL
-                  MINWRK = MAX( 3*N+M, BDSPAC )
+                  MINWRK = MAX( 3*N + M, BDSPAC )
                ELSE IF( WNTUS .AND. WNTVAS ) THEN
 *
 *                 Path 6 (M much larger than N, JOBU='S', JOBVT='S' or
 *                 'A')
 *
                   WRKBL = N + LWORK_DGEQRF
-                  WRKBL = MAX( WRKBL, N+LWORK_DORGQR_N )
-                  WRKBL = MAX( WRKBL, 3*N+LWORK_DGEBRD )
-                  WRKBL = MAX( WRKBL, 3*N+LWORK_DORGBR_Q )
-                  WRKBL = MAX( WRKBL, 3*N+LWORK_DORGBR_P )
+                  WRKBL = MAX( WRKBL, N + LWORK_DORGQR_N )
+                  WRKBL = MAX( WRKBL, 3*N + LWORK_DGEBRD )
+                  WRKBL = MAX( WRKBL, 3*N + LWORK_DORGBR_Q )
+                  WRKBL = MAX( WRKBL, 3*N + LWORK_DORGBR_P )
                   WRKBL = MAX( WRKBL, BDSPAC )
                   MAXWRK = N*N + WRKBL
-                  MINWRK = MAX( 3*N+M, BDSPAC )
+                  MINWRK = MAX( 3*N + M, BDSPAC )
                ELSE IF( WNTUA .AND. WNTVN ) THEN
 *
 *                 Path 7 (M much larger than N, JOBU='A', JOBVT='N')
 *
                   WRKBL = N + LWORK_DGEQRF
-                  WRKBL = MAX( WRKBL, N+LWORK_DORGQR_M )
-                  WRKBL = MAX( WRKBL, 3*N+LWORK_DGEBRD )
-                  WRKBL = MAX( WRKBL, 3*N+LWORK_DORGBR_Q )
+                  WRKBL = MAX( WRKBL, N + LWORK_DORGQR_M )
+                  WRKBL = MAX( WRKBL, 3*N + LWORK_DGEBRD )
+                  WRKBL = MAX( WRKBL, 3*N + LWORK_DORGBR_Q )
                   WRKBL = MAX( WRKBL, BDSPAC )
                   MAXWRK = N*N + WRKBL
-                  MINWRK = MAX( 3*N+M, BDSPAC )
+                  MINWRK = MAX( 3*N + M, BDSPAC )
                ELSE IF( WNTUA .AND. WNTVO ) THEN
 *
 *                 Path 8 (M much larger than N, JOBU='A', JOBVT='O')
 *
                   WRKBL = N + LWORK_DGEQRF
-                  WRKBL = MAX( WRKBL, N+LWORK_DORGQR_M )
-                  WRKBL = MAX( WRKBL, 3*N+LWORK_DGEBRD )
-                  WRKBL = MAX( WRKBL, 3*N+LWORK_DORGBR_Q )
-                  WRKBL = MAX( WRKBL, 3*N+LWORK_DORGBR_P )
+                  WRKBL = MAX( WRKBL, N + LWORK_DORGQR_M )
+                  WRKBL = MAX( WRKBL, 3*N + LWORK_DGEBRD )
+                  WRKBL = MAX( WRKBL, 3*N + LWORK_DORGBR_Q )
+                  WRKBL = MAX( WRKBL, 3*N + LWORK_DORGBR_P )
                   WRKBL = MAX( WRKBL, BDSPAC )
                   MAXWRK = 2*N*N + WRKBL
-                  MINWRK = MAX( 3*N+M, BDSPAC )
+                  MINWRK = MAX( 3*N + M, BDSPAC )
                ELSE IF( WNTUA .AND. WNTVAS ) THEN
 *
 *                 Path 9 (M much larger than N, JOBU='A', JOBVT='S' or
 *                 'A')
 *
                   WRKBL = N + LWORK_DGEQRF
-                  WRKBL = MAX( WRKBL, N+LWORK_DORGQR_M )
-                  WRKBL = MAX( WRKBL, 3*N+LWORK_DGEBRD )
-                  WRKBL = MAX( WRKBL, 3*N+LWORK_DORGBR_Q )
-                  WRKBL = MAX( WRKBL, 3*N+LWORK_DORGBR_P )
+                  WRKBL = MAX( WRKBL, N + LWORK_DORGQR_M )
+                  WRKBL = MAX( WRKBL, 3*N + LWORK_DGEBRD )
+                  WRKBL = MAX( WRKBL, 3*N + LWORK_DORGBR_Q )
+                  WRKBL = MAX( WRKBL, 3*N + LWORK_DORGBR_P )
                   WRKBL = MAX( WRKBL, BDSPAC )
                   MAXWRK = N*N + WRKBL
-                  MINWRK = MAX( 3*N+M, BDSPAC )
+                  MINWRK = MAX( 3*N + M, BDSPAC )
                END IF
             ELSE
 *
@@ -24382,25 +24536,25 @@
 *
                CALL DGEBRD( M, N, A, LDA, S, DUM(1), DUM(1),
      $                   DUM(1), DUM(1), -1, IERR )
-               LWORK_DGEBRD=DUM(1)
+               LWORK_DGEBRD = INT( DUM(1) )
                MAXWRK = 3*N + LWORK_DGEBRD
                IF( WNTUS .OR. WNTUO ) THEN
                   CALL DORGBR( 'Q', M, N, N, A, LDA, DUM(1),
      $                   DUM(1), -1, IERR )
-                  LWORK_DORGBR_Q=DUM(1)
-                  MAXWRK = MAX( MAXWRK, 3*N+LWORK_DORGBR_Q )
+                  LWORK_DORGBR_Q = INT( DUM(1) )
+                  MAXWRK = MAX( MAXWRK, 3*N + LWORK_DORGBR_Q )
                END IF
                IF( WNTUA ) THEN
                   CALL DORGBR( 'Q', M, M, N, A, LDA, DUM(1),
      $                   DUM(1), -1, IERR )
-                  LWORK_DORGBR_Q=DUM(1)
-                  MAXWRK = MAX( MAXWRK, 3*N+LWORK_DORGBR_Q )
+                  LWORK_DORGBR_Q = INT( DUM(1) )
+                  MAXWRK = MAX( MAXWRK, 3*N + LWORK_DORGBR_Q )
                END IF
                IF( .NOT.WNTVN ) THEN
-                 MAXWRK = MAX( MAXWRK, 3*N+LWORK_DORGBR_P )
+                 MAXWRK = MAX( MAXWRK, 3*N + LWORK_DORGBR_P )
                END IF
                MAXWRK = MAX( MAXWRK, BDSPAC )
-               MINWRK = MAX( 3*N+M, BDSPAC )
+               MINWRK = MAX( 3*N + M, BDSPAC )
             END IF
          ELSE IF( MINMN.GT.0 ) THEN
 *
@@ -24410,33 +24564,33 @@
             BDSPAC = 5*M
 *           Compute space needed for DGELQF
             CALL DGELQF( M, N, A, LDA, DUM(1), DUM(1), -1, IERR )
-            LWORK_DGELQF=DUM(1)
+            LWORK_DGELQF = INT( DUM(1) )
 *           Compute space needed for DORGLQ
             CALL DORGLQ( N, N, M, DUM(1), N, DUM(1), DUM(1), -1, IERR )
-            LWORK_DORGLQ_N=DUM(1)
+            LWORK_DORGLQ_N = INT( DUM(1) )
             CALL DORGLQ( M, N, M, A, LDA, DUM(1), DUM(1), -1, IERR )
-            LWORK_DORGLQ_M=DUM(1)
+            LWORK_DORGLQ_M = INT( DUM(1) )
 *           Compute space needed for DGEBRD
             CALL DGEBRD( M, M, A, LDA, S, DUM(1), DUM(1),
      $                   DUM(1), DUM(1), -1, IERR )
-            LWORK_DGEBRD=DUM(1)
+            LWORK_DGEBRD = INT( DUM(1) )
 *            Compute space needed for DORGBR P
             CALL DORGBR( 'P', M, M, M, A, N, DUM(1),
      $                   DUM(1), -1, IERR )
-            LWORK_DORGBR_P=DUM(1)
+            LWORK_DORGBR_P = INT( DUM(1) )
 *           Compute space needed for DORGBR Q
             CALL DORGBR( 'Q', M, M, M, A, N, DUM(1),
      $                   DUM(1), -1, IERR )
-            LWORK_DORGBR_Q=DUM(1)
+            LWORK_DORGBR_Q = INT( DUM(1) )
             IF( N.GE.MNTHR ) THEN
                IF( WNTVN ) THEN
 *
 *                 Path 1t(N much larger than M, JOBVT='N')
 *
                   MAXWRK = M + LWORK_DGELQF
-                  MAXWRK = MAX( MAXWRK, 3*M+LWORK_DGEBRD )
+                  MAXWRK = MAX( MAXWRK, 3*M + LWORK_DGEBRD )
                   IF( WNTUO .OR. WNTUAS )
-     $               MAXWRK = MAX( MAXWRK, 3*M+LWORK_DORGBR_Q )
+     $               MAXWRK = MAX( MAXWRK, 3*M + LWORK_DORGBR_Q )
                   MAXWRK = MAX( MAXWRK, BDSPAC )
                   MINWRK = MAX( 4*M, BDSPAC )
                ELSE IF( WNTVO .AND. WNTUN ) THEN
@@ -24444,97 +24598,97 @@
 *                 Path 2t(N much larger than M, JOBU='N', JOBVT='O')
 *
                   WRKBL = M + LWORK_DGELQF
-                  WRKBL = MAX( WRKBL, M+LWORK_DORGLQ_M )
-                  WRKBL = MAX( WRKBL, 3*M+LWORK_DGEBRD )
-                  WRKBL = MAX( WRKBL, 3*M+LWORK_DORGBR_P )
+                  WRKBL = MAX( WRKBL, M + LWORK_DORGLQ_M )
+                  WRKBL = MAX( WRKBL, 3*M + LWORK_DGEBRD )
+                  WRKBL = MAX( WRKBL, 3*M + LWORK_DORGBR_P )
                   WRKBL = MAX( WRKBL, BDSPAC )
-                  MAXWRK = MAX( M*M+WRKBL, M*M+M*N+M )
-                  MINWRK = MAX( 3*M+N, BDSPAC )
+                  MAXWRK = MAX( M*M + WRKBL, M*M + M*N + M )
+                  MINWRK = MAX( 3*M + N, BDSPAC )
                ELSE IF( WNTVO .AND. WNTUAS ) THEN
 *
 *                 Path 3t(N much larger than M, JOBU='S' or 'A',
 *                 JOBVT='O')
 *
                   WRKBL = M + LWORK_DGELQF
-                  WRKBL = MAX( WRKBL, M+LWORK_DORGLQ_M )
-                  WRKBL = MAX( WRKBL, 3*M+LWORK_DGEBRD )
-                  WRKBL = MAX( WRKBL, 3*M+LWORK_DORGBR_P )
-                  WRKBL = MAX( WRKBL, 3*M+LWORK_DORGBR_Q )
+                  WRKBL = MAX( WRKBL, M + LWORK_DORGLQ_M )
+                  WRKBL = MAX( WRKBL, 3*M + LWORK_DGEBRD )
+                  WRKBL = MAX( WRKBL, 3*M + LWORK_DORGBR_P )
+                  WRKBL = MAX( WRKBL, 3*M + LWORK_DORGBR_Q )
                   WRKBL = MAX( WRKBL, BDSPAC )
-                  MAXWRK = MAX( M*M+WRKBL, M*M+M*N+M )
-                  MINWRK = MAX( 3*M+N, BDSPAC )
+                  MAXWRK = MAX( M*M + WRKBL, M*M + M*N + M )
+                  MINWRK = MAX( 3*M + N, BDSPAC )
                ELSE IF( WNTVS .AND. WNTUN ) THEN
 *
 *                 Path 4t(N much larger than M, JOBU='N', JOBVT='S')
 *
                   WRKBL = M + LWORK_DGELQF
-                  WRKBL = MAX( WRKBL, M+LWORK_DORGLQ_M )
-                  WRKBL = MAX( WRKBL, 3*M+LWORK_DGEBRD )
-                  WRKBL = MAX( WRKBL, 3*M+LWORK_DORGBR_P )
+                  WRKBL = MAX( WRKBL, M + LWORK_DORGLQ_M )
+                  WRKBL = MAX( WRKBL, 3*M + LWORK_DGEBRD )
+                  WRKBL = MAX( WRKBL, 3*M + LWORK_DORGBR_P )
                   WRKBL = MAX( WRKBL, BDSPAC )
                   MAXWRK = M*M + WRKBL
-                  MINWRK = MAX( 3*M+N, BDSPAC )
+                  MINWRK = MAX( 3*M + N, BDSPAC )
                ELSE IF( WNTVS .AND. WNTUO ) THEN
 *
 *                 Path 5t(N much larger than M, JOBU='O', JOBVT='S')
 *
                   WRKBL = M + LWORK_DGELQF
-                  WRKBL = MAX( WRKBL, M+LWORK_DORGLQ_M )
-                  WRKBL = MAX( WRKBL, 3*M+LWORK_DGEBRD )
-                  WRKBL = MAX( WRKBL, 3*M+LWORK_DORGBR_P )
-                  WRKBL = MAX( WRKBL, 3*M+LWORK_DORGBR_Q )
+                  WRKBL = MAX( WRKBL, M + LWORK_DORGLQ_M )
+                  WRKBL = MAX( WRKBL, 3*M + LWORK_DGEBRD )
+                  WRKBL = MAX( WRKBL, 3*M + LWORK_DORGBR_P )
+                  WRKBL = MAX( WRKBL, 3*M + LWORK_DORGBR_Q )
                   WRKBL = MAX( WRKBL, BDSPAC )
                   MAXWRK = 2*M*M + WRKBL
-                  MINWRK = MAX( 3*M+N, BDSPAC )
+                  MINWRK = MAX( 3*M + N, BDSPAC )
                ELSE IF( WNTVS .AND. WNTUAS ) THEN
 *
 *                 Path 6t(N much larger than M, JOBU='S' or 'A',
 *                 JOBVT='S')
 *
                   WRKBL = M + LWORK_DGELQF
-                  WRKBL = MAX( WRKBL, M+LWORK_DORGLQ_M )
-                  WRKBL = MAX( WRKBL, 3*M+LWORK_DGEBRD )
-                  WRKBL = MAX( WRKBL, 3*M+LWORK_DORGBR_P )
-                  WRKBL = MAX( WRKBL, 3*M+LWORK_DORGBR_Q )
+                  WRKBL = MAX( WRKBL, M + LWORK_DORGLQ_M )
+                  WRKBL = MAX( WRKBL, 3*M + LWORK_DGEBRD )
+                  WRKBL = MAX( WRKBL, 3*M + LWORK_DORGBR_P )
+                  WRKBL = MAX( WRKBL, 3*M + LWORK_DORGBR_Q )
                   WRKBL = MAX( WRKBL, BDSPAC )
                   MAXWRK = M*M + WRKBL
-                  MINWRK = MAX( 3*M+N, BDSPAC )
+                  MINWRK = MAX( 3*M + N, BDSPAC )
                ELSE IF( WNTVA .AND. WNTUN ) THEN
 *
 *                 Path 7t(N much larger than M, JOBU='N', JOBVT='A')
 *
                   WRKBL = M + LWORK_DGELQF
-                  WRKBL = MAX( WRKBL, M+LWORK_DORGLQ_N )
-                  WRKBL = MAX( WRKBL, 3*M+LWORK_DGEBRD )
-                  WRKBL = MAX( WRKBL, 3*M+LWORK_DORGBR_P )
+                  WRKBL = MAX( WRKBL, M + LWORK_DORGLQ_N )
+                  WRKBL = MAX( WRKBL, 3*M + LWORK_DGEBRD )
+                  WRKBL = MAX( WRKBL, 3*M + LWORK_DORGBR_P )
                   WRKBL = MAX( WRKBL, BDSPAC )
                   MAXWRK = M*M + WRKBL
-                  MINWRK = MAX( 3*M+N, BDSPAC )
+                  MINWRK = MAX( 3*M + N, BDSPAC )
                ELSE IF( WNTVA .AND. WNTUO ) THEN
 *
 *                 Path 8t(N much larger than M, JOBU='O', JOBVT='A')
 *
                   WRKBL = M + LWORK_DGELQF
-                  WRKBL = MAX( WRKBL, M+LWORK_DORGLQ_N )
-                  WRKBL = MAX( WRKBL, 3*M+LWORK_DGEBRD )
-                  WRKBL = MAX( WRKBL, 3*M+LWORK_DORGBR_P )
-                  WRKBL = MAX( WRKBL, 3*M+LWORK_DORGBR_Q )
+                  WRKBL = MAX( WRKBL, M + LWORK_DORGLQ_N )
+                  WRKBL = MAX( WRKBL, 3*M + LWORK_DGEBRD )
+                  WRKBL = MAX( WRKBL, 3*M + LWORK_DORGBR_P )
+                  WRKBL = MAX( WRKBL, 3*M + LWORK_DORGBR_Q )
                   WRKBL = MAX( WRKBL, BDSPAC )
                   MAXWRK = 2*M*M + WRKBL
-                  MINWRK = MAX( 3*M+N, BDSPAC )
+                  MINWRK = MAX( 3*M + N, BDSPAC )
                ELSE IF( WNTVA .AND. WNTUAS ) THEN
 *
 *                 Path 9t(N much larger than M, JOBU='S' or 'A',
 *                 JOBVT='A')
 *
                   WRKBL = M + LWORK_DGELQF
-                  WRKBL = MAX( WRKBL, M+LWORK_DORGLQ_N )
-                  WRKBL = MAX( WRKBL, 3*M+LWORK_DGEBRD )
-                  WRKBL = MAX( WRKBL, 3*M+LWORK_DORGBR_P )
-                  WRKBL = MAX( WRKBL, 3*M+LWORK_DORGBR_Q )
+                  WRKBL = MAX( WRKBL, M + LWORK_DORGLQ_N )
+                  WRKBL = MAX( WRKBL, 3*M + LWORK_DGEBRD )
+                  WRKBL = MAX( WRKBL, 3*M + LWORK_DORGBR_P )
+                  WRKBL = MAX( WRKBL, 3*M + LWORK_DORGBR_Q )
                   WRKBL = MAX( WRKBL, BDSPAC )
                   MAXWRK = M*M + WRKBL
-                  MINWRK = MAX( 3*M+N, BDSPAC )
+                  MINWRK = MAX( 3*M + N, BDSPAC )
                END IF
             ELSE
 *
@@ -24542,26 +24696,26 @@
 *
                CALL DGEBRD( M, N, A, LDA, S, DUM(1), DUM(1),
      $                   DUM(1), DUM(1), -1, IERR )
-               LWORK_DGEBRD=DUM(1)
+               LWORK_DGEBRD = INT( DUM(1) )
                MAXWRK = 3*M + LWORK_DGEBRD
                IF( WNTVS .OR. WNTVO ) THEN
 *                Compute space needed for DORGBR P
                  CALL DORGBR( 'P', M, N, M, A, N, DUM(1),
      $                   DUM(1), -1, IERR )
-                 LWORK_DORGBR_P=DUM(1)
-                 MAXWRK = MAX( MAXWRK, 3*M+LWORK_DORGBR_P )
+                 LWORK_DORGBR_P = INT( DUM(1) )
+                 MAXWRK = MAX( MAXWRK, 3*M + LWORK_DORGBR_P )
                END IF
                IF( WNTVA ) THEN
                  CALL DORGBR( 'P', N, N, M, A, N, DUM(1),
      $                   DUM(1), -1, IERR )
-                 LWORK_DORGBR_P=DUM(1)
-                 MAXWRK = MAX( MAXWRK, 3*M+LWORK_DORGBR_P )
+                 LWORK_DORGBR_P = INT( DUM(1) )
+                 MAXWRK = MAX( MAXWRK, 3*M + LWORK_DORGBR_P )
                END IF
                IF( .NOT.WNTUN ) THEN
-                  MAXWRK = MAX( MAXWRK, 3*M+LWORK_DORGBR_Q )
+                  MAXWRK = MAX( MAXWRK, 3*M + LWORK_DORGBR_Q )
                END IF
                MAXWRK = MAX( MAXWRK, BDSPAC )
-               MINWRK = MAX( 3*M+N, BDSPAC )
+               MINWRK = MAX( 3*M + N, BDSPAC )
             END IF
          END IF
          MAXWRK = MAX( MAXWRK, MINWRK )
@@ -24620,21 +24774,24 @@
                IWORK = ITAU + N
 *
 *              Compute A=Q*R
-*              (Workspace: need 2*N, prefer N+N*NB)
+*              (Workspace: need 2*N, prefer N + N*NB)
 *
                CALL DGEQRF( M, N, A, LDA, WORK( ITAU ), WORK( IWORK ),
      $                      LWORK-IWORK+1, IERR )
 *
 *              Zero out below R
 *
-               CALL DLASET( 'L', N-1, N-1, ZERO, ZERO, A( 2, 1 ), LDA )
+               IF( N .GT. 1 ) THEN
+                  CALL DLASET( 'L', N-1, N-1, ZERO, ZERO, A( 2, 1 ),
+     $                         LDA )
+               END IF
                IE = 1
                ITAUQ = IE + N
                ITAUP = ITAUQ + N
                IWORK = ITAUP + N
 *
 *              Bidiagonalize R in A
-*              (Workspace: need 4*N, prefer 3*N+2*N*NB)
+*              (Workspace: need 4*N, prefer 3*N + 2*N*NB)
 *
                CALL DGEBRD( N, N, A, LDA, S, WORK( IE ), WORK( ITAUQ ),
      $                      WORK( ITAUP ), WORK( IWORK ), LWORK-IWORK+1,
@@ -24643,7 +24800,7 @@
                IF( WNTVO .OR. WNTVAS ) THEN
 *
 *                 If right singular vectors desired, generate P'.
-*                 (Workspace: need 4*N-1, prefer 3*N+(N-1)*NB)
+*                 (Workspace: need 4*N-1, prefer 3*N + (N-1)*NB)
 *
                   CALL DORGBR( 'P', N, N, N, A, LDA, WORK( ITAUP ),
      $                         WORK( IWORK ), LWORK-IWORK+1, IERR )
@@ -24674,13 +24831,13 @@
 *                 Sufficient workspace for a fast algorithm
 *
                   IR = 1
-                  IF( LWORK.GE.MAX( WRKBL, LDA*N+N )+LDA*N ) THEN
+                  IF( LWORK.GE.MAX( WRKBL, LDA*N + N ) + LDA*N ) THEN
 *
 *                    WORK(IU) is LDA by N, WORK(IR) is LDA by N
 *
                      LDWRKU = LDA
                      LDWRKR = LDA
-                  ELSE IF( LWORK.GE.MAX( WRKBL, LDA*N+N )+N*N ) THEN
+                  ELSE IF( LWORK.GE.MAX( WRKBL, LDA*N + N ) + N*N ) THEN
 *
 *                    WORK(IU) is LDA by N, WORK(IR) is N by N
 *
@@ -24697,7 +24854,7 @@
                   IWORK = ITAU + N
 *
 *                 Compute A=Q*R
-*                 (Workspace: need N*N+2*N, prefer N*N+N+N*NB)
+*                 (Workspace: need N*N + 2*N, prefer N*N + N + N*NB)
 *
                   CALL DGEQRF( M, N, A, LDA, WORK( ITAU ),
      $                         WORK( IWORK ), LWORK-IWORK+1, IERR )
@@ -24709,7 +24866,7 @@
      $                         LDWRKR )
 *
 *                 Generate Q in A
-*                 (Workspace: need N*N+2*N, prefer N*N+N+N*NB)
+*                 (Workspace: need N*N + 2*N, prefer N*N + N + N*NB)
 *
                   CALL DORGQR( M, N, N, A, LDA, WORK( ITAU ),
      $                         WORK( IWORK ), LWORK-IWORK+1, IERR )
@@ -24719,14 +24876,14 @@
                   IWORK = ITAUP + N
 *
 *                 Bidiagonalize R in WORK(IR)
-*                 (Workspace: need N*N+4*N, prefer N*N+3*N+2*N*NB)
+*                 (Workspace: need N*N + 4*N, prefer N*N + 3*N + 2*N*NB)
 *
                   CALL DGEBRD( N, N, WORK( IR ), LDWRKR, S, WORK( IE ),
      $                         WORK( ITAUQ ), WORK( ITAUP ),
      $                         WORK( IWORK ), LWORK-IWORK+1, IERR )
 *
 *                 Generate left vectors bidiagonalizing R
-*                 (Workspace: need N*N+4*N, prefer N*N+3*N+N*NB)
+*                 (Workspace: need N*N + 4*N, prefer N*N + 3*N + N*NB)
 *
                   CALL DORGBR( 'Q', N, N, N, WORK( IR ), LDWRKR,
      $                         WORK( ITAUQ ), WORK( IWORK ),
@@ -24735,7 +24892,7 @@
 *
 *                 Perform bidiagonal QR iteration, computing left
 *                 singular vectors of R in WORK(IR)
-*                 (Workspace: need N*N+BDSPAC)
+*                 (Workspace: need N*N + BDSPAC)
 *
                   CALL DBDSQR( 'U', N, 0, N, 0, S, WORK( IE ), DUM, 1,
      $                         WORK( IR ), LDWRKR, DUM, 1,
@@ -24744,7 +24901,7 @@
 *
 *                 Multiply Q in A by left singular vectors of R in
 *                 WORK(IR), storing result in WORK(IU) and copying to A
-*                 (Workspace: need N*N+2*N, prefer N*N+M*N+N)
+*                 (Workspace: need N*N + 2*N, prefer N*N + M*N + N)
 *
                   DO 10 I = 1, M, LDWRKU
                      CHUNK = MIN( M-I+1, LDWRKU )
@@ -24765,14 +24922,14 @@
                   IWORK = ITAUP + N
 *
 *                 Bidiagonalize A
-*                 (Workspace: need 3*N+M, prefer 3*N+(M+N)*NB)
+*                 (Workspace: need 3*N + M, prefer 3*N + (M + N)*NB)
 *
                   CALL DGEBRD( M, N, A, LDA, S, WORK( IE ),
      $                         WORK( ITAUQ ), WORK( ITAUP ),
      $                         WORK( IWORK ), LWORK-IWORK+1, IERR )
 *
 *                 Generate left vectors bidiagonalizing A
-*                 (Workspace: need 4*N, prefer 3*N+N*NB)
+*                 (Workspace: need 4*N, prefer 3*N + N*NB)
 *
                   CALL DORGBR( 'Q', M, N, N, A, LDA, WORK( ITAUQ ),
      $                         WORK( IWORK ), LWORK-IWORK+1, IERR )
@@ -24798,13 +24955,13 @@
 *                 Sufficient workspace for a fast algorithm
 *
                   IR = 1
-                  IF( LWORK.GE.MAX( WRKBL, LDA*N+N )+LDA*N ) THEN
+                  IF( LWORK.GE.MAX( WRKBL, LDA*N + N ) + LDA*N ) THEN
 *
 *                    WORK(IU) is LDA by N and WORK(IR) is LDA by N
 *
                      LDWRKU = LDA
                      LDWRKR = LDA
-                  ELSE IF( LWORK.GE.MAX( WRKBL, LDA*N+N )+N*N ) THEN
+                  ELSE IF( LWORK.GE.MAX( WRKBL, LDA*N + N ) + N*N ) THEN
 *
 *                    WORK(IU) is LDA by N and WORK(IR) is N by N
 *
@@ -24821,7 +24978,7 @@
                   IWORK = ITAU + N
 *
 *                 Compute A=Q*R
-*                 (Workspace: need N*N+2*N, prefer N*N+N+N*NB)
+*                 (Workspace: need N*N + 2*N, prefer N*N + N + N*NB)
 *
                   CALL DGEQRF( M, N, A, LDA, WORK( ITAU ),
      $                         WORK( IWORK ), LWORK-IWORK+1, IERR )
@@ -24834,7 +24991,7 @@
      $                            VT( 2, 1 ), LDVT )
 *
 *                 Generate Q in A
-*                 (Workspace: need N*N+2*N, prefer N*N+N+N*NB)
+*                 (Workspace: need N*N + 2*N, prefer N*N + N + N*NB)
 *
                   CALL DORGQR( M, N, N, A, LDA, WORK( ITAU ),
      $                         WORK( IWORK ), LWORK-IWORK+1, IERR )
@@ -24844,7 +25001,7 @@
                   IWORK = ITAUP + N
 *
 *                 Bidiagonalize R in VT, copying result to WORK(IR)
-*                 (Workspace: need N*N+4*N, prefer N*N+3*N+2*N*NB)
+*                 (Workspace: need N*N + 4*N, prefer N*N + 3*N + 2*N*NB)
 *
                   CALL DGEBRD( N, N, VT, LDVT, S, WORK( IE ),
      $                         WORK( ITAUQ ), WORK( ITAUP ),
@@ -24852,14 +25009,14 @@
                   CALL DLACPY( 'L', N, N, VT, LDVT, WORK( IR ), LDWRKR )
 *
 *                 Generate left vectors bidiagonalizing R in WORK(IR)
-*                 (Workspace: need N*N+4*N, prefer N*N+3*N+N*NB)
+*                 (Workspace: need N*N + 4*N, prefer N*N + 3*N + N*NB)
 *
                   CALL DORGBR( 'Q', N, N, N, WORK( IR ), LDWRKR,
      $                         WORK( ITAUQ ), WORK( IWORK ),
      $                         LWORK-IWORK+1, IERR )
 *
 *                 Generate right vectors bidiagonalizing R in VT
-*                 (Workspace: need N*N+4*N-1, prefer N*N+3*N+(N-1)*NB)
+*                 (Workspace: need N*N + 4*N-1, prefer N*N + 3*N + (N-1)*NB)
 *
                   CALL DORGBR( 'P', N, N, N, VT, LDVT, WORK( ITAUP ),
      $                         WORK( IWORK ), LWORK-IWORK+1, IERR )
@@ -24868,7 +25025,7 @@
 *                 Perform bidiagonal QR iteration, computing left
 *                 singular vectors of R in WORK(IR) and computing right
 *                 singular vectors of R in VT
-*                 (Workspace: need N*N+BDSPAC)
+*                 (Workspace: need N*N + BDSPAC)
 *
                   CALL DBDSQR( 'U', N, N, N, 0, S, WORK( IE ), VT, LDVT,
      $                         WORK( IR ), LDWRKR, DUM, 1,
@@ -24877,7 +25034,7 @@
 *
 *                 Multiply Q in A by left singular vectors of R in
 *                 WORK(IR), storing result in WORK(IU) and copying to A
-*                 (Workspace: need N*N+2*N, prefer N*N+M*N+N)
+*                 (Workspace: need N*N + 2*N, prefer N*N + M*N + N)
 *
                   DO 20 I = 1, M, LDWRKU
                      CHUNK = MIN( M-I+1, LDWRKU )
@@ -24896,7 +25053,7 @@
                   IWORK = ITAU + N
 *
 *                 Compute A=Q*R
-*                 (Workspace: need 2*N, prefer N+N*NB)
+*                 (Workspace: need 2*N, prefer N + N*NB)
 *
                   CALL DGEQRF( M, N, A, LDA, WORK( ITAU ),
      $                         WORK( IWORK ), LWORK-IWORK+1, IERR )
@@ -24909,7 +25066,7 @@
      $                            VT( 2, 1 ), LDVT )
 *
 *                 Generate Q in A
-*                 (Workspace: need 2*N, prefer N+N*NB)
+*                 (Workspace: need 2*N, prefer N + N*NB)
 *
                   CALL DORGQR( M, N, N, A, LDA, WORK( ITAU ),
      $                         WORK( IWORK ), LWORK-IWORK+1, IERR )
@@ -24919,21 +25076,21 @@
                   IWORK = ITAUP + N
 *
 *                 Bidiagonalize R in VT
-*                 (Workspace: need 4*N, prefer 3*N+2*N*NB)
+*                 (Workspace: need 4*N, prefer 3*N + 2*N*NB)
 *
                   CALL DGEBRD( N, N, VT, LDVT, S, WORK( IE ),
      $                         WORK( ITAUQ ), WORK( ITAUP ),
      $                         WORK( IWORK ), LWORK-IWORK+1, IERR )
 *
 *                 Multiply Q in A by left vectors bidiagonalizing R
-*                 (Workspace: need 3*N+M, prefer 3*N+M*NB)
+*                 (Workspace: need 3*N + M, prefer 3*N + M*NB)
 *
                   CALL DORMBR( 'Q', 'R', 'N', M, N, N, VT, LDVT,
      $                         WORK( ITAUQ ), A, LDA, WORK( IWORK ),
      $                         LWORK-IWORK+1, IERR )
 *
 *                 Generate right vectors bidiagonalizing R in VT
-*                 (Workspace: need 4*N-1, prefer 3*N+(N-1)*NB)
+*                 (Workspace: need 4*N-1, prefer 3*N + (N-1)*NB)
 *
                   CALL DORGBR( 'P', N, N, N, VT, LDVT, WORK( ITAUP ),
      $                         WORK( IWORK ), LWORK-IWORK+1, IERR )
@@ -24977,7 +25134,7 @@
                      IWORK = ITAU + N
 *
 *                    Compute A=Q*R
-*                    (Workspace: need N*N+2*N, prefer N*N+N+N*NB)
+*                    (Workspace: need N*N + 2*N, prefer N*N + N + N*NB)
 *
                      CALL DGEQRF( M, N, A, LDA, WORK( ITAU ),
      $                            WORK( IWORK ), LWORK-IWORK+1, IERR )
@@ -24990,7 +25147,7 @@
      $                            WORK( IR+1 ), LDWRKR )
 *
 *                    Generate Q in A
-*                    (Workspace: need N*N+2*N, prefer N*N+N+N*NB)
+*                    (Workspace: need N*N + 2*N, prefer N*N + N + N*NB)
 *
                      CALL DORGQR( M, N, N, A, LDA, WORK( ITAU ),
      $                            WORK( IWORK ), LWORK-IWORK+1, IERR )
@@ -25000,7 +25157,7 @@
                      IWORK = ITAUP + N
 *
 *                    Bidiagonalize R in WORK(IR)
-*                    (Workspace: need N*N+4*N, prefer N*N+3*N+2*N*NB)
+*                    (Workspace: need N*N + 4*N, prefer N*N + 3*N + 2*N*NB)
 *
                      CALL DGEBRD( N, N, WORK( IR ), LDWRKR, S,
      $                            WORK( IE ), WORK( ITAUQ ),
@@ -25008,7 +25165,7 @@
      $                            LWORK-IWORK+1, IERR )
 *
 *                    Generate left vectors bidiagonalizing R in WORK(IR)
-*                    (Workspace: need N*N+4*N, prefer N*N+3*N+N*NB)
+*                    (Workspace: need N*N + 4*N, prefer N*N + 3*N + N*NB)
 *
                      CALL DORGBR( 'Q', N, N, N, WORK( IR ), LDWRKR,
      $                            WORK( ITAUQ ), WORK( IWORK ),
@@ -25017,7 +25174,7 @@
 *
 *                    Perform bidiagonal QR iteration, computing left
 *                    singular vectors of R in WORK(IR)
-*                    (Workspace: need N*N+BDSPAC)
+*                    (Workspace: need N*N + BDSPAC)
 *
                      CALL DBDSQR( 'U', N, 0, N, 0, S, WORK( IE ), DUM,
      $                            1, WORK( IR ), LDWRKR, DUM, 1,
@@ -25038,14 +25195,14 @@
                      IWORK = ITAU + N
 *
 *                    Compute A=Q*R, copying result to U
-*                    (Workspace: need 2*N, prefer N+N*NB)
+*                    (Workspace: need 2*N, prefer N + N*NB)
 *
                      CALL DGEQRF( M, N, A, LDA, WORK( ITAU ),
      $                            WORK( IWORK ), LWORK-IWORK+1, IERR )
                      CALL DLACPY( 'L', M, N, A, LDA, U, LDU )
 *
 *                    Generate Q in U
-*                    (Workspace: need 2*N, prefer N+N*NB)
+*                    (Workspace: need 2*N, prefer N + N*NB)
 *
                      CALL DORGQR( M, N, N, U, LDU, WORK( ITAU ),
      $                            WORK( IWORK ), LWORK-IWORK+1, IERR )
@@ -25056,18 +25213,20 @@
 *
 *                    Zero out below R in A
 *
-                     CALL DLASET( 'L', N-1, N-1, ZERO, ZERO, A( 2, 1 ),
-     $                            LDA )
+                     IF( N .GT. 1 ) THEN
+                        CALL DLASET( 'L', N-1, N-1, ZERO, ZERO,
+     $                               A( 2, 1 ), LDA )
+                     END IF
 *
 *                    Bidiagonalize R in A
-*                    (Workspace: need 4*N, prefer 3*N+2*N*NB)
+*                    (Workspace: need 4*N, prefer 3*N + 2*N*NB)
 *
                      CALL DGEBRD( N, N, A, LDA, S, WORK( IE ),
      $                            WORK( ITAUQ ), WORK( ITAUP ),
      $                            WORK( IWORK ), LWORK-IWORK+1, IERR )
 *
 *                    Multiply Q in U by left vectors bidiagonalizing R
-*                    (Workspace: need 3*N+M, prefer 3*N+M*NB)
+*                    (Workspace: need 3*N + M, prefer 3*N + M*NB)
 *
                      CALL DORMBR( 'Q', 'R', 'N', M, N, N, A, LDA,
      $                            WORK( ITAUQ ), U, LDU, WORK( IWORK ),
@@ -25102,7 +25261,7 @@
                         LDWRKU = LDA
                         IR = IU + LDWRKU*N
                         LDWRKR = LDA
-                     ELSE IF( LWORK.GE.WRKBL+( LDA+N )*N ) THEN
+                     ELSE IF( LWORK.GE.WRKBL+( LDA + N )*N ) THEN
 *
 *                       WORK(IU) is LDA by N and WORK(IR) is N by N
 *
@@ -25121,7 +25280,7 @@
                      IWORK = ITAU + N
 *
 *                    Compute A=Q*R
-*                    (Workspace: need 2*N*N+2*N, prefer 2*N*N+N+N*NB)
+*                    (Workspace: need 2*N*N + 2*N, prefer 2*N*N + N + N*NB)
 *
                      CALL DGEQRF( M, N, A, LDA, WORK( ITAU ),
      $                            WORK( IWORK ), LWORK-IWORK+1, IERR )
@@ -25134,7 +25293,7 @@
      $                            WORK( IU+1 ), LDWRKU )
 *
 *                    Generate Q in A
-*                    (Workspace: need 2*N*N+2*N, prefer 2*N*N+N+N*NB)
+*                    (Workspace: need 2*N*N + 2*N, prefer 2*N*N + N + N*NB)
 *
                      CALL DORGQR( M, N, N, A, LDA, WORK( ITAU ),
      $                            WORK( IWORK ), LWORK-IWORK+1, IERR )
@@ -25145,7 +25304,7 @@
 *
 *                    Bidiagonalize R in WORK(IU), copying result to
 *                    WORK(IR)
-*                    (Workspace: need 2*N*N+4*N,
+*                    (Workspace: need 2*N*N + 4*N,
 *                                prefer 2*N*N+3*N+2*N*NB)
 *
                      CALL DGEBRD( N, N, WORK( IU ), LDWRKU, S,
@@ -25156,14 +25315,14 @@
      $                            WORK( IR ), LDWRKR )
 *
 *                    Generate left bidiagonalizing vectors in WORK(IU)
-*                    (Workspace: need 2*N*N+4*N, prefer 2*N*N+3*N+N*NB)
+*                    (Workspace: need 2*N*N + 4*N, prefer 2*N*N + 3*N + N*NB)
 *
                      CALL DORGBR( 'Q', N, N, N, WORK( IU ), LDWRKU,
      $                            WORK( ITAUQ ), WORK( IWORK ),
      $                            LWORK-IWORK+1, IERR )
 *
 *                    Generate right bidiagonalizing vectors in WORK(IR)
-*                    (Workspace: need 2*N*N+4*N-1,
+*                    (Workspace: need 2*N*N + 4*N-1,
 *                                prefer 2*N*N+3*N+(N-1)*NB)
 *
                      CALL DORGBR( 'P', N, N, N, WORK( IR ), LDWRKR,
@@ -25174,7 +25333,7 @@
 *                    Perform bidiagonal QR iteration, computing left
 *                    singular vectors of R in WORK(IU) and computing
 *                    right singular vectors of R in WORK(IR)
-*                    (Workspace: need 2*N*N+BDSPAC)
+*                    (Workspace: need 2*N*N + BDSPAC)
 *
                      CALL DBDSQR( 'U', N, N, N, 0, S, WORK( IE ),
      $                            WORK( IR ), LDWRKR, WORK( IU ),
@@ -25201,14 +25360,14 @@
                      IWORK = ITAU + N
 *
 *                    Compute A=Q*R, copying result to U
-*                    (Workspace: need 2*N, prefer N+N*NB)
+*                    (Workspace: need 2*N, prefer N + N*NB)
 *
                      CALL DGEQRF( M, N, A, LDA, WORK( ITAU ),
      $                            WORK( IWORK ), LWORK-IWORK+1, IERR )
                      CALL DLACPY( 'L', M, N, A, LDA, U, LDU )
 *
 *                    Generate Q in U
-*                    (Workspace: need 2*N, prefer N+N*NB)
+*                    (Workspace: need 2*N, prefer N + N*NB)
 *
                      CALL DORGQR( M, N, N, U, LDU, WORK( ITAU ),
      $                            WORK( IWORK ), LWORK-IWORK+1, IERR )
@@ -25219,25 +25378,27 @@
 *
 *                    Zero out below R in A
 *
-                     CALL DLASET( 'L', N-1, N-1, ZERO, ZERO, A( 2, 1 ),
-     $                            LDA )
+                     IF( N .GT. 1 ) THEN
+                        CALL DLASET( 'L', N-1, N-1, ZERO, ZERO,
+     $                               A( 2, 1 ), LDA )
+                     END IF
 *
 *                    Bidiagonalize R in A
-*                    (Workspace: need 4*N, prefer 3*N+2*N*NB)
+*                    (Workspace: need 4*N, prefer 3*N + 2*N*NB)
 *
                      CALL DGEBRD( N, N, A, LDA, S, WORK( IE ),
      $                            WORK( ITAUQ ), WORK( ITAUP ),
      $                            WORK( IWORK ), LWORK-IWORK+1, IERR )
 *
 *                    Multiply Q in U by left vectors bidiagonalizing R
-*                    (Workspace: need 3*N+M, prefer 3*N+M*NB)
+*                    (Workspace: need 3*N + M, prefer 3*N + M*NB)
 *
                      CALL DORMBR( 'Q', 'R', 'N', M, N, N, A, LDA,
      $                            WORK( ITAUQ ), U, LDU, WORK( IWORK ),
      $                            LWORK-IWORK+1, IERR )
 *
 *                    Generate right vectors bidiagonalizing R in A
-*                    (Workspace: need 4*N-1, prefer 3*N+(N-1)*NB)
+*                    (Workspace: need 4*N-1, prefer 3*N + (N-1)*NB)
 *
                      CALL DORGBR( 'P', N, N, N, A, LDA, WORK( ITAUP ),
      $                            WORK( IWORK ), LWORK-IWORK+1, IERR )
@@ -25281,7 +25442,7 @@
                      IWORK = ITAU + N
 *
 *                    Compute A=Q*R
-*                    (Workspace: need N*N+2*N, prefer N*N+N+N*NB)
+*                    (Workspace: need N*N + 2*N, prefer N*N + N + N*NB)
 *
                      CALL DGEQRF( M, N, A, LDA, WORK( ITAU ),
      $                            WORK( IWORK ), LWORK-IWORK+1, IERR )
@@ -25294,7 +25455,7 @@
      $                            WORK( IU+1 ), LDWRKU )
 *
 *                    Generate Q in A
-*                    (Workspace: need N*N+2*N, prefer N*N+N+N*NB)
+*                    (Workspace: need N*N + 2*N, prefer N*N + N + N*NB)
 *
                      CALL DORGQR( M, N, N, A, LDA, WORK( ITAU ),
      $                            WORK( IWORK ), LWORK-IWORK+1, IERR )
@@ -25304,7 +25465,7 @@
                      IWORK = ITAUP + N
 *
 *                    Bidiagonalize R in WORK(IU), copying result to VT
-*                    (Workspace: need N*N+4*N, prefer N*N+3*N+2*N*NB)
+*                    (Workspace: need N*N + 4*N, prefer N*N + 3*N + 2*N*NB)
 *
                      CALL DGEBRD( N, N, WORK( IU ), LDWRKU, S,
      $                            WORK( IE ), WORK( ITAUQ ),
@@ -25314,14 +25475,14 @@
      $                            LDVT )
 *
 *                    Generate left bidiagonalizing vectors in WORK(IU)
-*                    (Workspace: need N*N+4*N, prefer N*N+3*N+N*NB)
+*                    (Workspace: need N*N + 4*N, prefer N*N + 3*N + N*NB)
 *
                      CALL DORGBR( 'Q', N, N, N, WORK( IU ), LDWRKU,
      $                            WORK( ITAUQ ), WORK( IWORK ),
      $                            LWORK-IWORK+1, IERR )
 *
 *                    Generate right bidiagonalizing vectors in VT
-*                    (Workspace: need N*N+4*N-1,
+*                    (Workspace: need N*N + 4*N-1,
 *                                prefer N*N+3*N+(N-1)*NB)
 *
                      CALL DORGBR( 'P', N, N, N, VT, LDVT, WORK( ITAUP ),
@@ -25331,7 +25492,7 @@
 *                    Perform bidiagonal QR iteration, computing left
 *                    singular vectors of R in WORK(IU) and computing
 *                    right singular vectors of R in VT
-*                    (Workspace: need N*N+BDSPAC)
+*                    (Workspace: need N*N + BDSPAC)
 *
                      CALL DBDSQR( 'U', N, N, N, 0, S, WORK( IE ), VT,
      $                            LDVT, WORK( IU ), LDWRKU, DUM, 1,
@@ -25352,14 +25513,14 @@
                      IWORK = ITAU + N
 *
 *                    Compute A=Q*R, copying result to U
-*                    (Workspace: need 2*N, prefer N+N*NB)
+*                    (Workspace: need 2*N, prefer N + N*NB)
 *
                      CALL DGEQRF( M, N, A, LDA, WORK( ITAU ),
      $                            WORK( IWORK ), LWORK-IWORK+1, IERR )
                      CALL DLACPY( 'L', M, N, A, LDA, U, LDU )
 *
 *                    Generate Q in U
-*                    (Workspace: need 2*N, prefer N+N*NB)
+*                    (Workspace: need 2*N, prefer N + N*NB)
 *
                      CALL DORGQR( M, N, N, U, LDU, WORK( ITAU ),
      $                            WORK( IWORK ), LWORK-IWORK+1, IERR )
@@ -25376,7 +25537,7 @@
                      IWORK = ITAUP + N
 *
 *                    Bidiagonalize R in VT
-*                    (Workspace: need 4*N, prefer 3*N+2*N*NB)
+*                    (Workspace: need 4*N, prefer 3*N + 2*N*NB)
 *
                      CALL DGEBRD( N, N, VT, LDVT, S, WORK( IE ),
      $                            WORK( ITAUQ ), WORK( ITAUP ),
@@ -25384,14 +25545,14 @@
 *
 *                    Multiply Q in U by left bidiagonalizing vectors
 *                    in VT
-*                    (Workspace: need 3*N+M, prefer 3*N+M*NB)
+*                    (Workspace: need 3*N + M, prefer 3*N + M*NB)
 *
                      CALL DORMBR( 'Q', 'R', 'N', M, N, N, VT, LDVT,
      $                            WORK( ITAUQ ), U, LDU, WORK( IWORK ),
      $                            LWORK-IWORK+1, IERR )
 *
 *                    Generate right bidiagonalizing vectors in VT
-*                    (Workspace: need 4*N-1, prefer 3*N+(N-1)*NB)
+*                    (Workspace: need 4*N-1, prefer 3*N + (N-1)*NB)
 *
                      CALL DORGBR( 'P', N, N, N, VT, LDVT, WORK( ITAUP ),
      $                            WORK( IWORK ), LWORK-IWORK+1, IERR )
@@ -25438,7 +25599,7 @@
                      IWORK = ITAU + N
 *
 *                    Compute A=Q*R, copying result to U
-*                    (Workspace: need N*N+2*N, prefer N*N+N+N*NB)
+*                    (Workspace: need N*N + 2*N, prefer N*N + N + N*NB)
 *
                      CALL DGEQRF( M, N, A, LDA, WORK( ITAU ),
      $                            WORK( IWORK ), LWORK-IWORK+1, IERR )
@@ -25452,7 +25613,7 @@
      $                            WORK( IR+1 ), LDWRKR )
 *
 *                    Generate Q in U
-*                    (Workspace: need N*N+N+M, prefer N*N+N+M*NB)
+*                    (Workspace: need N*N + N + M, prefer N*N + N + M*NB)
 *
                      CALL DORGQR( M, M, N, U, LDU, WORK( ITAU ),
      $                            WORK( IWORK ), LWORK-IWORK+1, IERR )
@@ -25462,7 +25623,7 @@
                      IWORK = ITAUP + N
 *
 *                    Bidiagonalize R in WORK(IR)
-*                    (Workspace: need N*N+4*N, prefer N*N+3*N+2*N*NB)
+*                    (Workspace: need N*N + 4*N, prefer N*N + 3*N + 2*N*NB)
 *
                      CALL DGEBRD( N, N, WORK( IR ), LDWRKR, S,
      $                            WORK( IE ), WORK( ITAUQ ),
@@ -25470,7 +25631,7 @@
      $                            LWORK-IWORK+1, IERR )
 *
 *                    Generate left bidiagonalizing vectors in WORK(IR)
-*                    (Workspace: need N*N+4*N, prefer N*N+3*N+N*NB)
+*                    (Workspace: need N*N + 4*N, prefer N*N + 3*N + N*NB)
 *
                      CALL DORGBR( 'Q', N, N, N, WORK( IR ), LDWRKR,
      $                            WORK( ITAUQ ), WORK( IWORK ),
@@ -25479,7 +25640,7 @@
 *
 *                    Perform bidiagonal QR iteration, computing left
 *                    singular vectors of R in WORK(IR)
-*                    (Workspace: need N*N+BDSPAC)
+*                    (Workspace: need N*N + BDSPAC)
 *
                      CALL DBDSQR( 'U', N, 0, N, 0, S, WORK( IE ), DUM,
      $                            1, WORK( IR ), LDWRKR, DUM, 1,
@@ -25504,14 +25665,14 @@
                      IWORK = ITAU + N
 *
 *                    Compute A=Q*R, copying result to U
-*                    (Workspace: need 2*N, prefer N+N*NB)
+*                    (Workspace: need 2*N, prefer N + N*NB)
 *
                      CALL DGEQRF( M, N, A, LDA, WORK( ITAU ),
      $                            WORK( IWORK ), LWORK-IWORK+1, IERR )
                      CALL DLACPY( 'L', M, N, A, LDA, U, LDU )
 *
 *                    Generate Q in U
-*                    (Workspace: need N+M, prefer N+M*NB)
+*                    (Workspace: need N + M, prefer N + M*NB)
 *
                      CALL DORGQR( M, M, N, U, LDU, WORK( ITAU ),
      $                            WORK( IWORK ), LWORK-IWORK+1, IERR )
@@ -25522,11 +25683,13 @@
 *
 *                    Zero out below R in A
 *
-                     CALL DLASET( 'L', N-1, N-1, ZERO, ZERO, A( 2, 1 ),
-     $                            LDA )
+                     IF( N .GT. 1 ) THEN
+                        CALL DLASET( 'L', N-1, N-1, ZERO, ZERO,
+     $                                A( 2, 1 ), LDA )
+                     END IF
 *
 *                    Bidiagonalize R in A
-*                    (Workspace: need 4*N, prefer 3*N+2*N*NB)
+*                    (Workspace: need 4*N, prefer 3*N + 2*N*NB)
 *
                      CALL DGEBRD( N, N, A, LDA, S, WORK( IE ),
      $                            WORK( ITAUQ ), WORK( ITAUP ),
@@ -25534,7 +25697,7 @@
 *
 *                    Multiply Q in U by left bidiagonalizing vectors
 *                    in A
-*                    (Workspace: need 3*N+M, prefer 3*N+M*NB)
+*                    (Workspace: need 3*N + M, prefer 3*N + M*NB)
 *
                      CALL DORMBR( 'Q', 'R', 'N', M, N, N, A, LDA,
      $                            WORK( ITAUQ ), U, LDU, WORK( IWORK ),
@@ -25569,7 +25732,7 @@
                         LDWRKU = LDA
                         IR = IU + LDWRKU*N
                         LDWRKR = LDA
-                     ELSE IF( LWORK.GE.WRKBL+( LDA+N )*N ) THEN
+                     ELSE IF( LWORK.GE.WRKBL+( LDA + N )*N ) THEN
 *
 *                       WORK(IU) is LDA by N and WORK(IR) is N by N
 *
@@ -25588,14 +25751,14 @@
                      IWORK = ITAU + N
 *
 *                    Compute A=Q*R, copying result to U
-*                    (Workspace: need 2*N*N+2*N, prefer 2*N*N+N+N*NB)
+*                    (Workspace: need 2*N*N + 2*N, prefer 2*N*N + N + N*NB)
 *
                      CALL DGEQRF( M, N, A, LDA, WORK( ITAU ),
      $                            WORK( IWORK ), LWORK-IWORK+1, IERR )
                      CALL DLACPY( 'L', M, N, A, LDA, U, LDU )
 *
 *                    Generate Q in U
-*                    (Workspace: need 2*N*N+N+M, prefer 2*N*N+N+M*NB)
+*                    (Workspace: need 2*N*N + N + M, prefer 2*N*N + N + M*NB)
 *
                      CALL DORGQR( M, M, N, U, LDU, WORK( ITAU ),
      $                            WORK( IWORK ), LWORK-IWORK+1, IERR )
@@ -25613,7 +25776,7 @@
 *
 *                    Bidiagonalize R in WORK(IU), copying result to
 *                    WORK(IR)
-*                    (Workspace: need 2*N*N+4*N,
+*                    (Workspace: need 2*N*N + 4*N,
 *                                prefer 2*N*N+3*N+2*N*NB)
 *
                      CALL DGEBRD( N, N, WORK( IU ), LDWRKU, S,
@@ -25624,14 +25787,14 @@
      $                            WORK( IR ), LDWRKR )
 *
 *                    Generate left bidiagonalizing vectors in WORK(IU)
-*                    (Workspace: need 2*N*N+4*N, prefer 2*N*N+3*N+N*NB)
+*                    (Workspace: need 2*N*N + 4*N, prefer 2*N*N + 3*N + N*NB)
 *
                      CALL DORGBR( 'Q', N, N, N, WORK( IU ), LDWRKU,
      $                            WORK( ITAUQ ), WORK( IWORK ),
      $                            LWORK-IWORK+1, IERR )
 *
 *                    Generate right bidiagonalizing vectors in WORK(IR)
-*                    (Workspace: need 2*N*N+4*N-1,
+*                    (Workspace: need 2*N*N + 4*N-1,
 *                                prefer 2*N*N+3*N+(N-1)*NB)
 *
                      CALL DORGBR( 'P', N, N, N, WORK( IR ), LDWRKR,
@@ -25642,7 +25805,7 @@
 *                    Perform bidiagonal QR iteration, computing left
 *                    singular vectors of R in WORK(IU) and computing
 *                    right singular vectors of R in WORK(IR)
-*                    (Workspace: need 2*N*N+BDSPAC)
+*                    (Workspace: need 2*N*N + BDSPAC)
 *
                      CALL DBDSQR( 'U', N, N, N, 0, S, WORK( IE ),
      $                            WORK( IR ), LDWRKR, WORK( IU ),
@@ -25672,14 +25835,14 @@
                      IWORK = ITAU + N
 *
 *                    Compute A=Q*R, copying result to U
-*                    (Workspace: need 2*N, prefer N+N*NB)
+*                    (Workspace: need 2*N, prefer N + N*NB)
 *
                      CALL DGEQRF( M, N, A, LDA, WORK( ITAU ),
      $                            WORK( IWORK ), LWORK-IWORK+1, IERR )
                      CALL DLACPY( 'L', M, N, A, LDA, U, LDU )
 *
 *                    Generate Q in U
-*                    (Workspace: need N+M, prefer N+M*NB)
+*                    (Workspace: need N + M, prefer N + M*NB)
 *
                      CALL DORGQR( M, M, N, U, LDU, WORK( ITAU ),
      $                            WORK( IWORK ), LWORK-IWORK+1, IERR )
@@ -25690,11 +25853,13 @@
 *
 *                    Zero out below R in A
 *
-                     CALL DLASET( 'L', N-1, N-1, ZERO, ZERO, A( 2, 1 ),
-     $                            LDA )
+                     IF( N .GT. 1 ) THEN
+                        CALL DLASET( 'L', N-1, N-1, ZERO, ZERO,
+     $                                A( 2, 1 ), LDA )
+                     END IF
 *
 *                    Bidiagonalize R in A
-*                    (Workspace: need 4*N, prefer 3*N+2*N*NB)
+*                    (Workspace: need 4*N, prefer 3*N + 2*N*NB)
 *
                      CALL DGEBRD( N, N, A, LDA, S, WORK( IE ),
      $                            WORK( ITAUQ ), WORK( ITAUP ),
@@ -25702,14 +25867,14 @@
 *
 *                    Multiply Q in U by left bidiagonalizing vectors
 *                    in A
-*                    (Workspace: need 3*N+M, prefer 3*N+M*NB)
+*                    (Workspace: need 3*N + M, prefer 3*N + M*NB)
 *
                      CALL DORMBR( 'Q', 'R', 'N', M, N, N, A, LDA,
      $                            WORK( ITAUQ ), U, LDU, WORK( IWORK ),
      $                            LWORK-IWORK+1, IERR )
 *
 *                    Generate right bidiagonalizing vectors in A
-*                    (Workspace: need 4*N-1, prefer 3*N+(N-1)*NB)
+*                    (Workspace: need 4*N-1, prefer 3*N + (N-1)*NB)
 *
                      CALL DORGBR( 'P', N, N, N, A, LDA, WORK( ITAUP ),
      $                            WORK( IWORK ), LWORK-IWORK+1, IERR )
@@ -25753,14 +25918,14 @@
                      IWORK = ITAU + N
 *
 *                    Compute A=Q*R, copying result to U
-*                    (Workspace: need N*N+2*N, prefer N*N+N+N*NB)
+*                    (Workspace: need N*N + 2*N, prefer N*N + N + N*NB)
 *
                      CALL DGEQRF( M, N, A, LDA, WORK( ITAU ),
      $                            WORK( IWORK ), LWORK-IWORK+1, IERR )
                      CALL DLACPY( 'L', M, N, A, LDA, U, LDU )
 *
 *                    Generate Q in U
-*                    (Workspace: need N*N+N+M, prefer N*N+N+M*NB)
+*                    (Workspace: need N*N + N + M, prefer N*N + N + M*NB)
 *
                      CALL DORGQR( M, M, N, U, LDU, WORK( ITAU ),
      $                            WORK( IWORK ), LWORK-IWORK+1, IERR )
@@ -25777,7 +25942,7 @@
                      IWORK = ITAUP + N
 *
 *                    Bidiagonalize R in WORK(IU), copying result to VT
-*                    (Workspace: need N*N+4*N, prefer N*N+3*N+2*N*NB)
+*                    (Workspace: need N*N + 4*N, prefer N*N + 3*N + 2*N*NB)
 *
                      CALL DGEBRD( N, N, WORK( IU ), LDWRKU, S,
      $                            WORK( IE ), WORK( ITAUQ ),
@@ -25787,14 +25952,14 @@
      $                            LDVT )
 *
 *                    Generate left bidiagonalizing vectors in WORK(IU)
-*                    (Workspace: need N*N+4*N, prefer N*N+3*N+N*NB)
+*                    (Workspace: need N*N + 4*N, prefer N*N + 3*N + N*NB)
 *
                      CALL DORGBR( 'Q', N, N, N, WORK( IU ), LDWRKU,
      $                            WORK( ITAUQ ), WORK( IWORK ),
      $                            LWORK-IWORK+1, IERR )
 *
 *                    Generate right bidiagonalizing vectors in VT
-*                    (Workspace: need N*N+4*N-1,
+*                    (Workspace: need N*N + 4*N-1,
 *                                prefer N*N+3*N+(N-1)*NB)
 *
                      CALL DORGBR( 'P', N, N, N, VT, LDVT, WORK( ITAUP ),
@@ -25804,7 +25969,7 @@
 *                    Perform bidiagonal QR iteration, computing left
 *                    singular vectors of R in WORK(IU) and computing
 *                    right singular vectors of R in VT
-*                    (Workspace: need N*N+BDSPAC)
+*                    (Workspace: need N*N + BDSPAC)
 *
                      CALL DBDSQR( 'U', N, N, N, 0, S, WORK( IE ), VT,
      $                            LDVT, WORK( IU ), LDWRKU, DUM, 1,
@@ -25829,14 +25994,14 @@
                      IWORK = ITAU + N
 *
 *                    Compute A=Q*R, copying result to U
-*                    (Workspace: need 2*N, prefer N+N*NB)
+*                    (Workspace: need 2*N, prefer N + N*NB)
 *
                      CALL DGEQRF( M, N, A, LDA, WORK( ITAU ),
      $                            WORK( IWORK ), LWORK-IWORK+1, IERR )
                      CALL DLACPY( 'L', M, N, A, LDA, U, LDU )
 *
 *                    Generate Q in U
-*                    (Workspace: need N+M, prefer N+M*NB)
+*                    (Workspace: need N + M, prefer N + M*NB)
 *
                      CALL DORGQR( M, M, N, U, LDU, WORK( ITAU ),
      $                            WORK( IWORK ), LWORK-IWORK+1, IERR )
@@ -25853,7 +26018,7 @@
                      IWORK = ITAUP + N
 *
 *                    Bidiagonalize R in VT
-*                    (Workspace: need 4*N, prefer 3*N+2*N*NB)
+*                    (Workspace: need 4*N, prefer 3*N + 2*N*NB)
 *
                      CALL DGEBRD( N, N, VT, LDVT, S, WORK( IE ),
      $                            WORK( ITAUQ ), WORK( ITAUP ),
@@ -25861,14 +26026,14 @@
 *
 *                    Multiply Q in U by left bidiagonalizing vectors
 *                    in VT
-*                    (Workspace: need 3*N+M, prefer 3*N+M*NB)
+*                    (Workspace: need 3*N + M, prefer 3*N + M*NB)
 *
                      CALL DORMBR( 'Q', 'R', 'N', M, N, N, VT, LDVT,
      $                            WORK( ITAUQ ), U, LDU, WORK( IWORK ),
      $                            LWORK-IWORK+1, IERR )
 *
 *                    Generate right bidiagonalizing vectors in VT
-*                    (Workspace: need 4*N-1, prefer 3*N+(N-1)*NB)
+*                    (Workspace: need 4*N-1, prefer 3*N + (N-1)*NB)
 *
                      CALL DORGBR( 'P', N, N, N, VT, LDVT, WORK( ITAUP ),
      $                            WORK( IWORK ), LWORK-IWORK+1, IERR )
@@ -25902,7 +26067,7 @@
             IWORK = ITAUP + N
 *
 *           Bidiagonalize A
-*           (Workspace: need 3*N+M, prefer 3*N+(M+N)*NB)
+*           (Workspace: need 3*N + M, prefer 3*N + (M + N)*NB)
 *
             CALL DGEBRD( M, N, A, LDA, S, WORK( IE ), WORK( ITAUQ ),
      $                   WORK( ITAUP ), WORK( IWORK ), LWORK-IWORK+1,
@@ -25911,7 +26076,7 @@
 *
 *              If left singular vectors desired in U, copy result to U
 *              and generate left bidiagonalizing vectors in U
-*              (Workspace: need 3*N+NCU, prefer 3*N+NCU*NB)
+*              (Workspace: need 3*N + NCU, prefer 3*N + NCU*NB)
 *
                CALL DLACPY( 'L', M, N, A, LDA, U, LDU )
                IF( WNTUS )
@@ -25925,7 +26090,7 @@
 *
 *              If right singular vectors desired in VT, copy result to
 *              VT and generate right bidiagonalizing vectors in VT
-*              (Workspace: need 4*N-1, prefer 3*N+(N-1)*NB)
+*              (Workspace: need 4*N-1, prefer 3*N + (N-1)*NB)
 *
                CALL DLACPY( 'U', N, N, A, LDA, VT, LDVT )
                CALL DORGBR( 'P', N, N, N, VT, LDVT, WORK( ITAUP ),
@@ -25935,7 +26100,7 @@
 *
 *              If left singular vectors desired in A, generate left
 *              bidiagonalizing vectors in A
-*              (Workspace: need 4*N, prefer 3*N+N*NB)
+*              (Workspace: need 4*N, prefer 3*N + N*NB)
 *
                CALL DORGBR( 'Q', M, N, N, A, LDA, WORK( ITAUQ ),
      $                      WORK( IWORK ), LWORK-IWORK+1, IERR )
@@ -25944,7 +26109,7 @@
 *
 *              If right singular vectors desired in A, generate right
 *              bidiagonalizing vectors in A
-*              (Workspace: need 4*N-1, prefer 3*N+(N-1)*NB)
+*              (Workspace: need 4*N-1, prefer 3*N + (N-1)*NB)
 *
                CALL DORGBR( 'P', N, N, N, A, LDA, WORK( ITAUP ),
      $                      WORK( IWORK ), LWORK-IWORK+1, IERR )
@@ -26006,7 +26171,7 @@
                IWORK = ITAU + M
 *
 *              Compute A=L*Q
-*              (Workspace: need 2*M, prefer M+M*NB)
+*              (Workspace: need 2*M, prefer M + M*NB)
 *
                CALL DGELQF( M, N, A, LDA, WORK( ITAU ), WORK( IWORK ),
      $                      LWORK-IWORK+1, IERR )
@@ -26020,7 +26185,7 @@
                IWORK = ITAUP + M
 *
 *              Bidiagonalize L in A
-*              (Workspace: need 4*M, prefer 3*M+2*M*NB)
+*              (Workspace: need 4*M, prefer 3*M + 2*M*NB)
 *
                CALL DGEBRD( M, M, A, LDA, S, WORK( IE ), WORK( ITAUQ ),
      $                      WORK( ITAUP ), WORK( IWORK ), LWORK-IWORK+1,
@@ -26028,7 +26193,7 @@
                IF( WNTUO .OR. WNTUAS ) THEN
 *
 *                 If left singular vectors desired, generate Q
-*                 (Workspace: need 4*M, prefer 3*M+M*NB)
+*                 (Workspace: need 4*M, prefer 3*M + M*NB)
 *
                   CALL DORGBR( 'Q', M, M, M, A, LDA, WORK( ITAUQ ),
      $                         WORK( IWORK ), LWORK-IWORK+1, IERR )
@@ -26061,14 +26226,14 @@
 *                 Sufficient workspace for a fast algorithm
 *
                   IR = 1
-                  IF( LWORK.GE.MAX( WRKBL, LDA*N+M )+LDA*M ) THEN
+                  IF( LWORK.GE.MAX( WRKBL, LDA*N + M ) + LDA*M ) THEN
 *
 *                    WORK(IU) is LDA by N and WORK(IR) is LDA by M
 *
                      LDWRKU = LDA
                      CHUNK = N
                      LDWRKR = LDA
-                  ELSE IF( LWORK.GE.MAX( WRKBL, LDA*N+M )+M*M ) THEN
+                  ELSE IF( LWORK.GE.MAX( WRKBL, LDA*N + M ) + M*M ) THEN
 *
 *                    WORK(IU) is LDA by N and WORK(IR) is M by M
 *
@@ -26087,7 +26252,7 @@
                   IWORK = ITAU + M
 *
 *                 Compute A=L*Q
-*                 (Workspace: need M*M+2*M, prefer M*M+M+M*NB)
+*                 (Workspace: need M*M + 2*M, prefer M*M + M + M*NB)
 *
                   CALL DGELQF( M, N, A, LDA, WORK( ITAU ),
      $                         WORK( IWORK ), LWORK-IWORK+1, IERR )
@@ -26099,7 +26264,7 @@
      $                         WORK( IR+LDWRKR ), LDWRKR )
 *
 *                 Generate Q in A
-*                 (Workspace: need M*M+2*M, prefer M*M+M+M*NB)
+*                 (Workspace: need M*M + 2*M, prefer M*M + M + M*NB)
 *
                   CALL DORGLQ( M, N, M, A, LDA, WORK( ITAU ),
      $                         WORK( IWORK ), LWORK-IWORK+1, IERR )
@@ -26109,14 +26274,14 @@
                   IWORK = ITAUP + M
 *
 *                 Bidiagonalize L in WORK(IR)
-*                 (Workspace: need M*M+4*M, prefer M*M+3*M+2*M*NB)
+*                 (Workspace: need M*M + 4*M, prefer M*M + 3*M + 2*M*NB)
 *
                   CALL DGEBRD( M, M, WORK( IR ), LDWRKR, S, WORK( IE ),
      $                         WORK( ITAUQ ), WORK( ITAUP ),
      $                         WORK( IWORK ), LWORK-IWORK+1, IERR )
 *
 *                 Generate right vectors bidiagonalizing L
-*                 (Workspace: need M*M+4*M-1, prefer M*M+3*M+(M-1)*NB)
+*                 (Workspace: need M*M + 4*M-1, prefer M*M + 3*M + (M-1)*NB)
 *
                   CALL DORGBR( 'P', M, M, M, WORK( IR ), LDWRKR,
      $                         WORK( ITAUP ), WORK( IWORK ),
@@ -26125,7 +26290,7 @@
 *
 *                 Perform bidiagonal QR iteration, computing right
 *                 singular vectors of L in WORK(IR)
-*                 (Workspace: need M*M+BDSPAC)
+*                 (Workspace: need M*M + BDSPAC)
 *
                   CALL DBDSQR( 'U', M, M, 0, 0, S, WORK( IE ),
      $                         WORK( IR ), LDWRKR, DUM, 1, DUM, 1,
@@ -26134,7 +26299,7 @@
 *
 *                 Multiply right singular vectors of L in WORK(IR) by Q
 *                 in A, storing result in WORK(IU) and copying to A
-*                 (Workspace: need M*M+2*M, prefer M*M+M*N+M)
+*                 (Workspace: need M*M + 2*M, prefer M*M + M*N + M)
 *
                   DO 30 I = 1, N, CHUNK
                      BLK = MIN( N-I+1, CHUNK )
@@ -26155,14 +26320,14 @@
                   IWORK = ITAUP + M
 *
 *                 Bidiagonalize A
-*                 (Workspace: need 3*M+N, prefer 3*M+(M+N)*NB)
+*                 (Workspace: need 3*M + N, prefer 3*M + (M + N)*NB)
 *
                   CALL DGEBRD( M, N, A, LDA, S, WORK( IE ),
      $                         WORK( ITAUQ ), WORK( ITAUP ),
      $                         WORK( IWORK ), LWORK-IWORK+1, IERR )
 *
 *                 Generate right vectors bidiagonalizing A
-*                 (Workspace: need 4*M, prefer 3*M+M*NB)
+*                 (Workspace: need 4*M, prefer 3*M + M*NB)
 *
                   CALL DORGBR( 'P', M, N, M, A, LDA, WORK( ITAUP ),
      $                         WORK( IWORK ), LWORK-IWORK+1, IERR )
@@ -26188,14 +26353,14 @@
 *                 Sufficient workspace for a fast algorithm
 *
                   IR = 1
-                  IF( LWORK.GE.MAX( WRKBL, LDA*N+M )+LDA*M ) THEN
+                  IF( LWORK.GE.MAX( WRKBL, LDA*N + M ) + LDA*M ) THEN
 *
 *                    WORK(IU) is LDA by N and WORK(IR) is LDA by M
 *
                      LDWRKU = LDA
                      CHUNK = N
                      LDWRKR = LDA
-                  ELSE IF( LWORK.GE.MAX( WRKBL, LDA*N+M )+M*M ) THEN
+                  ELSE IF( LWORK.GE.MAX( WRKBL, LDA*N + M ) + M*M ) THEN
 *
 *                    WORK(IU) is LDA by N and WORK(IR) is M by M
 *
@@ -26214,7 +26379,7 @@
                   IWORK = ITAU + M
 *
 *                 Compute A=L*Q
-*                 (Workspace: need M*M+2*M, prefer M*M+M+M*NB)
+*                 (Workspace: need M*M + 2*M, prefer M*M + M + M*NB)
 *
                   CALL DGELQF( M, N, A, LDA, WORK( ITAU ),
      $                         WORK( IWORK ), LWORK-IWORK+1, IERR )
@@ -26226,7 +26391,7 @@
      $                         LDU )
 *
 *                 Generate Q in A
-*                 (Workspace: need M*M+2*M, prefer M*M+M+M*NB)
+*                 (Workspace: need M*M + 2*M, prefer M*M + M + M*NB)
 *
                   CALL DORGLQ( M, N, M, A, LDA, WORK( ITAU ),
      $                         WORK( IWORK ), LWORK-IWORK+1, IERR )
@@ -26236,7 +26401,7 @@
                   IWORK = ITAUP + M
 *
 *                 Bidiagonalize L in U, copying result to WORK(IR)
-*                 (Workspace: need M*M+4*M, prefer M*M+3*M+2*M*NB)
+*                 (Workspace: need M*M + 4*M, prefer M*M + 3*M + 2*M*NB)
 *
                   CALL DGEBRD( M, M, U, LDU, S, WORK( IE ),
      $                         WORK( ITAUQ ), WORK( ITAUP ),
@@ -26244,14 +26409,14 @@
                   CALL DLACPY( 'U', M, M, U, LDU, WORK( IR ), LDWRKR )
 *
 *                 Generate right vectors bidiagonalizing L in WORK(IR)
-*                 (Workspace: need M*M+4*M-1, prefer M*M+3*M+(M-1)*NB)
+*                 (Workspace: need M*M + 4*M-1, prefer M*M + 3*M + (M-1)*NB)
 *
                   CALL DORGBR( 'P', M, M, M, WORK( IR ), LDWRKR,
      $                         WORK( ITAUP ), WORK( IWORK ),
      $                         LWORK-IWORK+1, IERR )
 *
 *                 Generate left vectors bidiagonalizing L in U
-*                 (Workspace: need M*M+4*M, prefer M*M+3*M+M*NB)
+*                 (Workspace: need M*M + 4*M, prefer M*M + 3*M + M*NB)
 *
                   CALL DORGBR( 'Q', M, M, M, U, LDU, WORK( ITAUQ ),
      $                         WORK( IWORK ), LWORK-IWORK+1, IERR )
@@ -26260,7 +26425,7 @@
 *                 Perform bidiagonal QR iteration, computing left
 *                 singular vectors of L in U, and computing right
 *                 singular vectors of L in WORK(IR)
-*                 (Workspace: need M*M+BDSPAC)
+*                 (Workspace: need M*M + BDSPAC)
 *
                   CALL DBDSQR( 'U', M, M, M, 0, S, WORK( IE ),
      $                         WORK( IR ), LDWRKR, U, LDU, DUM, 1,
@@ -26269,7 +26434,7 @@
 *
 *                 Multiply right singular vectors of L in WORK(IR) by Q
 *                 in A, storing result in WORK(IU) and copying to A
-*                 (Workspace: need M*M+2*M, prefer M*M+M*N+M))
+*                 (Workspace: need M*M + 2*M, prefer M*M + M*N + M))
 *
                   DO 40 I = 1, N, CHUNK
                      BLK = MIN( N-I+1, CHUNK )
@@ -26288,7 +26453,7 @@
                   IWORK = ITAU + M
 *
 *                 Compute A=L*Q
-*                 (Workspace: need 2*M, prefer M+M*NB)
+*                 (Workspace: need 2*M, prefer M + M*NB)
 *
                   CALL DGELQF( M, N, A, LDA, WORK( ITAU ),
      $                         WORK( IWORK ), LWORK-IWORK+1, IERR )
@@ -26300,7 +26465,7 @@
      $                         LDU )
 *
 *                 Generate Q in A
-*                 (Workspace: need 2*M, prefer M+M*NB)
+*                 (Workspace: need 2*M, prefer M + M*NB)
 *
                   CALL DORGLQ( M, N, M, A, LDA, WORK( ITAU ),
      $                         WORK( IWORK ), LWORK-IWORK+1, IERR )
@@ -26310,21 +26475,21 @@
                   IWORK = ITAUP + M
 *
 *                 Bidiagonalize L in U
-*                 (Workspace: need 4*M, prefer 3*M+2*M*NB)
+*                 (Workspace: need 4*M, prefer 3*M + 2*M*NB)
 *
                   CALL DGEBRD( M, M, U, LDU, S, WORK( IE ),
      $                         WORK( ITAUQ ), WORK( ITAUP ),
      $                         WORK( IWORK ), LWORK-IWORK+1, IERR )
 *
 *                 Multiply right vectors bidiagonalizing L by Q in A
-*                 (Workspace: need 3*M+N, prefer 3*M+N*NB)
+*                 (Workspace: need 3*M + N, prefer 3*M + N*NB)
 *
                   CALL DORMBR( 'P', 'L', 'T', M, N, M, U, LDU,
      $                         WORK( ITAUP ), A, LDA, WORK( IWORK ),
      $                         LWORK-IWORK+1, IERR )
 *
 *                 Generate left vectors bidiagonalizing L in U
-*                 (Workspace: need 4*M, prefer 3*M+M*NB)
+*                 (Workspace: need 4*M, prefer 3*M + M*NB)
 *
                   CALL DORGBR( 'Q', M, M, M, U, LDU, WORK( ITAUQ ),
      $                         WORK( IWORK ), LWORK-IWORK+1, IERR )
@@ -26368,7 +26533,7 @@
                      IWORK = ITAU + M
 *
 *                    Compute A=L*Q
-*                    (Workspace: need M*M+2*M, prefer M*M+M+M*NB)
+*                    (Workspace: need M*M + 2*M, prefer M*M + M + M*NB)
 *
                      CALL DGELQF( M, N, A, LDA, WORK( ITAU ),
      $                            WORK( IWORK ), LWORK-IWORK+1, IERR )
@@ -26381,7 +26546,7 @@
      $                            WORK( IR+LDWRKR ), LDWRKR )
 *
 *                    Generate Q in A
-*                    (Workspace: need M*M+2*M, prefer M*M+M+M*NB)
+*                    (Workspace: need M*M + 2*M, prefer M*M + M + M*NB)
 *
                      CALL DORGLQ( M, N, M, A, LDA, WORK( ITAU ),
      $                            WORK( IWORK ), LWORK-IWORK+1, IERR )
@@ -26391,7 +26556,7 @@
                      IWORK = ITAUP + M
 *
 *                    Bidiagonalize L in WORK(IR)
-*                    (Workspace: need M*M+4*M, prefer M*M+3*M+2*M*NB)
+*                    (Workspace: need M*M + 4*M, prefer M*M + 3*M + 2*M*NB)
 *
                      CALL DGEBRD( M, M, WORK( IR ), LDWRKR, S,
      $                            WORK( IE ), WORK( ITAUQ ),
@@ -26400,7 +26565,7 @@
 *
 *                    Generate right vectors bidiagonalizing L in
 *                    WORK(IR)
-*                    (Workspace: need M*M+4*M, prefer M*M+3*M+(M-1)*NB)
+*                    (Workspace: need M*M + 4*M, prefer M*M + 3*M + (M-1)*NB)
 *
                      CALL DORGBR( 'P', M, M, M, WORK( IR ), LDWRKR,
      $                            WORK( ITAUP ), WORK( IWORK ),
@@ -26409,7 +26574,7 @@
 *
 *                    Perform bidiagonal QR iteration, computing right
 *                    singular vectors of L in WORK(IR)
-*                    (Workspace: need M*M+BDSPAC)
+*                    (Workspace: need M*M + BDSPAC)
 *
                      CALL DBDSQR( 'U', M, M, 0, 0, S, WORK( IE ),
      $                            WORK( IR ), LDWRKR, DUM, 1, DUM, 1,
@@ -26430,7 +26595,7 @@
                      IWORK = ITAU + M
 *
 *                    Compute A=L*Q
-*                    (Workspace: need 2*M, prefer M+M*NB)
+*                    (Workspace: need 2*M, prefer M + M*NB)
 *
                      CALL DGELQF( M, N, A, LDA, WORK( ITAU ),
      $                            WORK( IWORK ), LWORK-IWORK+1, IERR )
@@ -26440,7 +26605,7 @@
                      CALL DLACPY( 'U', M, N, A, LDA, VT, LDVT )
 *
 *                    Generate Q in VT
-*                    (Workspace: need 2*M, prefer M+M*NB)
+*                    (Workspace: need 2*M, prefer M + M*NB)
 *
                      CALL DORGLQ( M, N, M, VT, LDVT, WORK( ITAU ),
      $                            WORK( IWORK ), LWORK-IWORK+1, IERR )
@@ -26455,14 +26620,14 @@
      $                            LDA )
 *
 *                    Bidiagonalize L in A
-*                    (Workspace: need 4*M, prefer 3*M+2*M*NB)
+*                    (Workspace: need 4*M, prefer 3*M + 2*M*NB)
 *
                      CALL DGEBRD( M, M, A, LDA, S, WORK( IE ),
      $                            WORK( ITAUQ ), WORK( ITAUP ),
      $                            WORK( IWORK ), LWORK-IWORK+1, IERR )
 *
 *                    Multiply right vectors bidiagonalizing L by Q in VT
-*                    (Workspace: need 3*M+N, prefer 3*M+N*NB)
+*                    (Workspace: need 3*M + N, prefer 3*M + N*NB)
 *
                      CALL DORMBR( 'P', 'L', 'T', M, N, M, A, LDA,
      $                            WORK( ITAUP ), VT, LDVT,
@@ -26497,7 +26662,7 @@
                         LDWRKU = LDA
                         IR = IU + LDWRKU*M
                         LDWRKR = LDA
-                     ELSE IF( LWORK.GE.WRKBL+( LDA+M )*M ) THEN
+                     ELSE IF( LWORK.GE.WRKBL+( LDA + M )*M ) THEN
 *
 *                       WORK(IU) is LDA by M and WORK(IR) is M by M
 *
@@ -26516,7 +26681,7 @@
                      IWORK = ITAU + M
 *
 *                    Compute A=L*Q
-*                    (Workspace: need 2*M*M+2*M, prefer 2*M*M+M+M*NB)
+*                    (Workspace: need 2*M*M + 2*M, prefer 2*M*M + M + M*NB)
 *
                      CALL DGELQF( M, N, A, LDA, WORK( ITAU ),
      $                            WORK( IWORK ), LWORK-IWORK+1, IERR )
@@ -26529,7 +26694,7 @@
      $                            WORK( IU+LDWRKU ), LDWRKU )
 *
 *                    Generate Q in A
-*                    (Workspace: need 2*M*M+2*M, prefer 2*M*M+M+M*NB)
+*                    (Workspace: need 2*M*M + 2*M, prefer 2*M*M + M + M*NB)
 *
                      CALL DORGLQ( M, N, M, A, LDA, WORK( ITAU ),
      $                            WORK( IWORK ), LWORK-IWORK+1, IERR )
@@ -26540,7 +26705,7 @@
 *
 *                    Bidiagonalize L in WORK(IU), copying result to
 *                    WORK(IR)
-*                    (Workspace: need 2*M*M+4*M,
+*                    (Workspace: need 2*M*M + 4*M,
 *                                prefer 2*M*M+3*M+2*M*NB)
 *
                      CALL DGEBRD( M, M, WORK( IU ), LDWRKU, S,
@@ -26551,7 +26716,7 @@
      $                            WORK( IR ), LDWRKR )
 *
 *                    Generate right bidiagonalizing vectors in WORK(IU)
-*                    (Workspace: need 2*M*M+4*M-1,
+*                    (Workspace: need 2*M*M + 4*M-1,
 *                                prefer 2*M*M+3*M+(M-1)*NB)
 *
                      CALL DORGBR( 'P', M, M, M, WORK( IU ), LDWRKU,
@@ -26559,7 +26724,7 @@
      $                            LWORK-IWORK+1, IERR )
 *
 *                    Generate left bidiagonalizing vectors in WORK(IR)
-*                    (Workspace: need 2*M*M+4*M, prefer 2*M*M+3*M+M*NB)
+*                    (Workspace: need 2*M*M + 4*M, prefer 2*M*M + 3*M + M*NB)
 *
                      CALL DORGBR( 'Q', M, M, M, WORK( IR ), LDWRKR,
      $                            WORK( ITAUQ ), WORK( IWORK ),
@@ -26569,7 +26734,7 @@
 *                    Perform bidiagonal QR iteration, computing left
 *                    singular vectors of L in WORK(IR) and computing
 *                    right singular vectors of L in WORK(IU)
-*                    (Workspace: need 2*M*M+BDSPAC)
+*                    (Workspace: need 2*M*M + BDSPAC)
 *
                      CALL DBDSQR( 'U', M, M, M, 0, S, WORK( IE ),
      $                            WORK( IU ), LDWRKU, WORK( IR ),
@@ -26596,14 +26761,14 @@
                      IWORK = ITAU + M
 *
 *                    Compute A=L*Q, copying result to VT
-*                    (Workspace: need 2*M, prefer M+M*NB)
+*                    (Workspace: need 2*M, prefer M + M*NB)
 *
                      CALL DGELQF( M, N, A, LDA, WORK( ITAU ),
      $                            WORK( IWORK ), LWORK-IWORK+1, IERR )
                      CALL DLACPY( 'U', M, N, A, LDA, VT, LDVT )
 *
 *                    Generate Q in VT
-*                    (Workspace: need 2*M, prefer M+M*NB)
+*                    (Workspace: need 2*M, prefer M + M*NB)
 *
                      CALL DORGLQ( M, N, M, VT, LDVT, WORK( ITAU ),
      $                            WORK( IWORK ), LWORK-IWORK+1, IERR )
@@ -26618,21 +26783,21 @@
      $                            LDA )
 *
 *                    Bidiagonalize L in A
-*                    (Workspace: need 4*M, prefer 3*M+2*M*NB)
+*                    (Workspace: need 4*M, prefer 3*M + 2*M*NB)
 *
                      CALL DGEBRD( M, M, A, LDA, S, WORK( IE ),
      $                            WORK( ITAUQ ), WORK( ITAUP ),
      $                            WORK( IWORK ), LWORK-IWORK+1, IERR )
 *
 *                    Multiply right vectors bidiagonalizing L by Q in VT
-*                    (Workspace: need 3*M+N, prefer 3*M+N*NB)
+*                    (Workspace: need 3*M + N, prefer 3*M + N*NB)
 *
                      CALL DORMBR( 'P', 'L', 'T', M, N, M, A, LDA,
      $                            WORK( ITAUP ), VT, LDVT,
      $                            WORK( IWORK ), LWORK-IWORK+1, IERR )
 *
 *                    Generate left bidiagonalizing vectors of L in A
-*                    (Workspace: need 4*M, prefer 3*M+M*NB)
+*                    (Workspace: need 4*M, prefer 3*M + M*NB)
 *
                      CALL DORGBR( 'Q', M, M, M, A, LDA, WORK( ITAUQ ),
      $                            WORK( IWORK ), LWORK-IWORK+1, IERR )
@@ -26676,7 +26841,7 @@
                      IWORK = ITAU + M
 *
 *                    Compute A=L*Q
-*                    (Workspace: need M*M+2*M, prefer M*M+M+M*NB)
+*                    (Workspace: need M*M + 2*M, prefer M*M + M + M*NB)
 *
                      CALL DGELQF( M, N, A, LDA, WORK( ITAU ),
      $                            WORK( IWORK ), LWORK-IWORK+1, IERR )
@@ -26689,7 +26854,7 @@
      $                            WORK( IU+LDWRKU ), LDWRKU )
 *
 *                    Generate Q in A
-*                    (Workspace: need M*M+2*M, prefer M*M+M+M*NB)
+*                    (Workspace: need M*M + 2*M, prefer M*M + M + M*NB)
 *
                      CALL DORGLQ( M, N, M, A, LDA, WORK( ITAU ),
      $                            WORK( IWORK ), LWORK-IWORK+1, IERR )
@@ -26699,7 +26864,7 @@
                      IWORK = ITAUP + M
 *
 *                    Bidiagonalize L in WORK(IU), copying result to U
-*                    (Workspace: need M*M+4*M, prefer M*M+3*M+2*M*NB)
+*                    (Workspace: need M*M + 4*M, prefer M*M + 3*M + 2*M*NB)
 *
                      CALL DGEBRD( M, M, WORK( IU ), LDWRKU, S,
      $                            WORK( IE ), WORK( ITAUQ ),
@@ -26709,7 +26874,7 @@
      $                            LDU )
 *
 *                    Generate right bidiagonalizing vectors in WORK(IU)
-*                    (Workspace: need M*M+4*M-1,
+*                    (Workspace: need M*M + 4*M-1,
 *                                prefer M*M+3*M+(M-1)*NB)
 *
                      CALL DORGBR( 'P', M, M, M, WORK( IU ), LDWRKU,
@@ -26717,7 +26882,7 @@
      $                            LWORK-IWORK+1, IERR )
 *
 *                    Generate left bidiagonalizing vectors in U
-*                    (Workspace: need M*M+4*M, prefer M*M+3*M+M*NB)
+*                    (Workspace: need M*M + 4*M, prefer M*M + 3*M + M*NB)
 *
                      CALL DORGBR( 'Q', M, M, M, U, LDU, WORK( ITAUQ ),
      $                            WORK( IWORK ), LWORK-IWORK+1, IERR )
@@ -26726,7 +26891,7 @@
 *                    Perform bidiagonal QR iteration, computing left
 *                    singular vectors of L in U and computing right
 *                    singular vectors of L in WORK(IU)
-*                    (Workspace: need M*M+BDSPAC)
+*                    (Workspace: need M*M + BDSPAC)
 *
                      CALL DBDSQR( 'U', M, M, M, 0, S, WORK( IE ),
      $                            WORK( IU ), LDWRKU, U, LDU, DUM, 1,
@@ -26747,14 +26912,14 @@
                      IWORK = ITAU + M
 *
 *                    Compute A=L*Q, copying result to VT
-*                    (Workspace: need 2*M, prefer M+M*NB)
+*                    (Workspace: need 2*M, prefer M + M*NB)
 *
                      CALL DGELQF( M, N, A, LDA, WORK( ITAU ),
      $                            WORK( IWORK ), LWORK-IWORK+1, IERR )
                      CALL DLACPY( 'U', M, N, A, LDA, VT, LDVT )
 *
 *                    Generate Q in VT
-*                    (Workspace: need 2*M, prefer M+M*NB)
+*                    (Workspace: need 2*M, prefer M + M*NB)
 *
                      CALL DORGLQ( M, N, M, VT, LDVT, WORK( ITAU ),
      $                            WORK( IWORK ), LWORK-IWORK+1, IERR )
@@ -26770,7 +26935,7 @@
                      IWORK = ITAUP + M
 *
 *                    Bidiagonalize L in U
-*                    (Workspace: need 4*M, prefer 3*M+2*M*NB)
+*                    (Workspace: need 4*M, prefer 3*M + 2*M*NB)
 *
                      CALL DGEBRD( M, M, U, LDU, S, WORK( IE ),
      $                            WORK( ITAUQ ), WORK( ITAUP ),
@@ -26778,14 +26943,14 @@
 *
 *                    Multiply right bidiagonalizing vectors in U by Q
 *                    in VT
-*                    (Workspace: need 3*M+N, prefer 3*M+N*NB)
+*                    (Workspace: need 3*M + N, prefer 3*M + N*NB)
 *
                      CALL DORMBR( 'P', 'L', 'T', M, N, M, U, LDU,
      $                            WORK( ITAUP ), VT, LDVT,
      $                            WORK( IWORK ), LWORK-IWORK+1, IERR )
 *
 *                    Generate left bidiagonalizing vectors in U
-*                    (Workspace: need 4*M, prefer 3*M+M*NB)
+*                    (Workspace: need 4*M, prefer 3*M + M*NB)
 *
                      CALL DORGBR( 'Q', M, M, M, U, LDU, WORK( ITAUQ ),
      $                            WORK( IWORK ), LWORK-IWORK+1, IERR )
@@ -26812,7 +26977,7 @@
 *                 N right singular vectors to be computed in VT and
 *                 no left singular vectors to be computed
 *
-                  IF( LWORK.GE.M*M+MAX( N+M, 4*M, BDSPAC ) ) THEN
+                  IF( LWORK.GE.M*M+MAX( N + M, 4*M, BDSPAC ) ) THEN
 *
 *                    Sufficient workspace for a fast algorithm
 *
@@ -26832,7 +26997,7 @@
                      IWORK = ITAU + M
 *
 *                    Compute A=L*Q, copying result to VT
-*                    (Workspace: need M*M+2*M, prefer M*M+M+M*NB)
+*                    (Workspace: need M*M + 2*M, prefer M*M + M + M*NB)
 *
                      CALL DGELQF( M, N, A, LDA, WORK( ITAU ),
      $                            WORK( IWORK ), LWORK-IWORK+1, IERR )
@@ -26846,7 +27011,7 @@
      $                            WORK( IR+LDWRKR ), LDWRKR )
 *
 *                    Generate Q in VT
-*                    (Workspace: need M*M+M+N, prefer M*M+M+N*NB)
+*                    (Workspace: need M*M + M + N, prefer M*M + M + N*NB)
 *
                      CALL DORGLQ( N, N, M, VT, LDVT, WORK( ITAU ),
      $                            WORK( IWORK ), LWORK-IWORK+1, IERR )
@@ -26856,7 +27021,7 @@
                      IWORK = ITAUP + M
 *
 *                    Bidiagonalize L in WORK(IR)
-*                    (Workspace: need M*M+4*M, prefer M*M+3*M+2*M*NB)
+*                    (Workspace: need M*M + 4*M, prefer M*M + 3*M + 2*M*NB)
 *
                      CALL DGEBRD( M, M, WORK( IR ), LDWRKR, S,
      $                            WORK( IE ), WORK( ITAUQ ),
@@ -26864,7 +27029,7 @@
      $                            LWORK-IWORK+1, IERR )
 *
 *                    Generate right bidiagonalizing vectors in WORK(IR)
-*                    (Workspace: need M*M+4*M-1,
+*                    (Workspace: need M*M + 4*M-1,
 *                                prefer M*M+3*M+(M-1)*NB)
 *
                      CALL DORGBR( 'P', M, M, M, WORK( IR ), LDWRKR,
@@ -26874,7 +27039,7 @@
 *
 *                    Perform bidiagonal QR iteration, computing right
 *                    singular vectors of L in WORK(IR)
-*                    (Workspace: need M*M+BDSPAC)
+*                    (Workspace: need M*M + BDSPAC)
 *
                      CALL DBDSQR( 'U', M, M, 0, 0, S, WORK( IE ),
      $                            WORK( IR ), LDWRKR, DUM, 1, DUM, 1,
@@ -26899,14 +27064,14 @@
                      IWORK = ITAU + M
 *
 *                    Compute A=L*Q, copying result to VT
-*                    (Workspace: need 2*M, prefer M+M*NB)
+*                    (Workspace: need 2*M, prefer M + M*NB)
 *
                      CALL DGELQF( M, N, A, LDA, WORK( ITAU ),
      $                            WORK( IWORK ), LWORK-IWORK+1, IERR )
                      CALL DLACPY( 'U', M, N, A, LDA, VT, LDVT )
 *
 *                    Generate Q in VT
-*                    (Workspace: need M+N, prefer M+N*NB)
+*                    (Workspace: need M + N, prefer M + N*NB)
 *
                      CALL DORGLQ( N, N, M, VT, LDVT, WORK( ITAU ),
      $                            WORK( IWORK ), LWORK-IWORK+1, IERR )
@@ -26921,7 +27086,7 @@
      $                            LDA )
 *
 *                    Bidiagonalize L in A
-*                    (Workspace: need 4*M, prefer 3*M+2*M*NB)
+*                    (Workspace: need 4*M, prefer 3*M + 2*M*NB)
 *
                      CALL DGEBRD( M, M, A, LDA, S, WORK( IE ),
      $                            WORK( ITAUQ ), WORK( ITAUP ),
@@ -26929,7 +27094,7 @@
 *
 *                    Multiply right bidiagonalizing vectors in A by Q
 *                    in VT
-*                    (Workspace: need 3*M+N, prefer 3*M+N*NB)
+*                    (Workspace: need 3*M + N, prefer 3*M + N*NB)
 *
                      CALL DORMBR( 'P', 'L', 'T', M, N, M, A, LDA,
      $                            WORK( ITAUP ), VT, LDVT,
@@ -26952,7 +27117,7 @@
 *                 N right singular vectors to be computed in VT and
 *                 M left singular vectors to be overwritten on A
 *
-                  IF( LWORK.GE.2*M*M+MAX( N+M, 4*M, BDSPAC ) ) THEN
+                  IF( LWORK.GE.2*M*M+MAX( N + M, 4*M, BDSPAC ) ) THEN
 *
 *                    Sufficient workspace for a fast algorithm
 *
@@ -26964,7 +27129,7 @@
                         LDWRKU = LDA
                         IR = IU + LDWRKU*M
                         LDWRKR = LDA
-                     ELSE IF( LWORK.GE.WRKBL+( LDA+M )*M ) THEN
+                     ELSE IF( LWORK.GE.WRKBL+( LDA + M )*M ) THEN
 *
 *                       WORK(IU) is LDA by M and WORK(IR) is M by M
 *
@@ -26983,14 +27148,14 @@
                      IWORK = ITAU + M
 *
 *                    Compute A=L*Q, copying result to VT
-*                    (Workspace: need 2*M*M+2*M, prefer 2*M*M+M+M*NB)
+*                    (Workspace: need 2*M*M + 2*M, prefer 2*M*M + M + M*NB)
 *
                      CALL DGELQF( M, N, A, LDA, WORK( ITAU ),
      $                            WORK( IWORK ), LWORK-IWORK+1, IERR )
                      CALL DLACPY( 'U', M, N, A, LDA, VT, LDVT )
 *
 *                    Generate Q in VT
-*                    (Workspace: need 2*M*M+M+N, prefer 2*M*M+M+N*NB)
+*                    (Workspace: need 2*M*M + M + N, prefer 2*M*M + M + N*NB)
 *
                      CALL DORGLQ( N, N, M, VT, LDVT, WORK( ITAU ),
      $                            WORK( IWORK ), LWORK-IWORK+1, IERR )
@@ -27008,7 +27173,7 @@
 *
 *                    Bidiagonalize L in WORK(IU), copying result to
 *                    WORK(IR)
-*                    (Workspace: need 2*M*M+4*M,
+*                    (Workspace: need 2*M*M + 4*M,
 *                                prefer 2*M*M+3*M+2*M*NB)
 *
                      CALL DGEBRD( M, M, WORK( IU ), LDWRKU, S,
@@ -27019,7 +27184,7 @@
      $                            WORK( IR ), LDWRKR )
 *
 *                    Generate right bidiagonalizing vectors in WORK(IU)
-*                    (Workspace: need 2*M*M+4*M-1,
+*                    (Workspace: need 2*M*M + 4*M-1,
 *                                prefer 2*M*M+3*M+(M-1)*NB)
 *
                      CALL DORGBR( 'P', M, M, M, WORK( IU ), LDWRKU,
@@ -27027,7 +27192,7 @@
      $                            LWORK-IWORK+1, IERR )
 *
 *                    Generate left bidiagonalizing vectors in WORK(IR)
-*                    (Workspace: need 2*M*M+4*M, prefer 2*M*M+3*M+M*NB)
+*                    (Workspace: need 2*M*M + 4*M, prefer 2*M*M + 3*M + M*NB)
 *
                      CALL DORGBR( 'Q', M, M, M, WORK( IR ), LDWRKR,
      $                            WORK( ITAUQ ), WORK( IWORK ),
@@ -27037,7 +27202,7 @@
 *                    Perform bidiagonal QR iteration, computing left
 *                    singular vectors of L in WORK(IR) and computing
 *                    right singular vectors of L in WORK(IU)
-*                    (Workspace: need 2*M*M+BDSPAC)
+*                    (Workspace: need 2*M*M + BDSPAC)
 *
                      CALL DBDSQR( 'U', M, M, M, 0, S, WORK( IE ),
      $                            WORK( IU ), LDWRKU, WORK( IR ),
@@ -27067,14 +27232,14 @@
                      IWORK = ITAU + M
 *
 *                    Compute A=L*Q, copying result to VT
-*                    (Workspace: need 2*M, prefer M+M*NB)
+*                    (Workspace: need 2*M, prefer M + M*NB)
 *
                      CALL DGELQF( M, N, A, LDA, WORK( ITAU ),
      $                            WORK( IWORK ), LWORK-IWORK+1, IERR )
                      CALL DLACPY( 'U', M, N, A, LDA, VT, LDVT )
 *
 *                    Generate Q in VT
-*                    (Workspace: need M+N, prefer M+N*NB)
+*                    (Workspace: need M + N, prefer M + N*NB)
 *
                      CALL DORGLQ( N, N, M, VT, LDVT, WORK( ITAU ),
      $                            WORK( IWORK ), LWORK-IWORK+1, IERR )
@@ -27089,7 +27254,7 @@
      $                            LDA )
 *
 *                    Bidiagonalize L in A
-*                    (Workspace: need 4*M, prefer 3*M+2*M*NB)
+*                    (Workspace: need 4*M, prefer 3*M + 2*M*NB)
 *
                      CALL DGEBRD( M, M, A, LDA, S, WORK( IE ),
      $                            WORK( ITAUQ ), WORK( ITAUP ),
@@ -27097,14 +27262,14 @@
 *
 *                    Multiply right bidiagonalizing vectors in A by Q
 *                    in VT
-*                    (Workspace: need 3*M+N, prefer 3*M+N*NB)
+*                    (Workspace: need 3*M + N, prefer 3*M + N*NB)
 *
                      CALL DORMBR( 'P', 'L', 'T', M, N, M, A, LDA,
      $                            WORK( ITAUP ), VT, LDVT,
      $                            WORK( IWORK ), LWORK-IWORK+1, IERR )
 *
 *                    Generate left bidiagonalizing vectors in A
-*                    (Workspace: need 4*M, prefer 3*M+M*NB)
+*                    (Workspace: need 4*M, prefer 3*M + M*NB)
 *
                      CALL DORGBR( 'Q', M, M, M, A, LDA, WORK( ITAUQ ),
      $                            WORK( IWORK ), LWORK-IWORK+1, IERR )
@@ -27128,7 +27293,7 @@
 *                 N right singular vectors to be computed in VT and
 *                 M left singular vectors to be computed in U
 *
-                  IF( LWORK.GE.M*M+MAX( N+M, 4*M, BDSPAC ) ) THEN
+                  IF( LWORK.GE.M*M+MAX( N + M, 4*M, BDSPAC ) ) THEN
 *
 *                    Sufficient workspace for a fast algorithm
 *
@@ -27148,14 +27313,14 @@
                      IWORK = ITAU + M
 *
 *                    Compute A=L*Q, copying result to VT
-*                    (Workspace: need M*M+2*M, prefer M*M+M+M*NB)
+*                    (Workspace: need M*M + 2*M, prefer M*M + M + M*NB)
 *
                      CALL DGELQF( M, N, A, LDA, WORK( ITAU ),
      $                            WORK( IWORK ), LWORK-IWORK+1, IERR )
                      CALL DLACPY( 'U', M, N, A, LDA, VT, LDVT )
 *
 *                    Generate Q in VT
-*                    (Workspace: need M*M+M+N, prefer M*M+M+N*NB)
+*                    (Workspace: need M*M + M + N, prefer M*M + M + N*NB)
 *
                      CALL DORGLQ( N, N, M, VT, LDVT, WORK( ITAU ),
      $                            WORK( IWORK ), LWORK-IWORK+1, IERR )
@@ -27172,7 +27337,7 @@
                      IWORK = ITAUP + M
 *
 *                    Bidiagonalize L in WORK(IU), copying result to U
-*                    (Workspace: need M*M+4*M, prefer M*M+3*M+2*M*NB)
+*                    (Workspace: need M*M + 4*M, prefer M*M + 3*M + 2*M*NB)
 *
                      CALL DGEBRD( M, M, WORK( IU ), LDWRKU, S,
      $                            WORK( IE ), WORK( ITAUQ ),
@@ -27182,14 +27347,14 @@
      $                            LDU )
 *
 *                    Generate right bidiagonalizing vectors in WORK(IU)
-*                    (Workspace: need M*M+4*M, prefer M*M+3*M+(M-1)*NB)
+*                    (Workspace: need M*M + 4*M, prefer M*M + 3*M + (M-1)*NB)
 *
                      CALL DORGBR( 'P', M, M, M, WORK( IU ), LDWRKU,
      $                            WORK( ITAUP ), WORK( IWORK ),
      $                            LWORK-IWORK+1, IERR )
 *
 *                    Generate left bidiagonalizing vectors in U
-*                    (Workspace: need M*M+4*M, prefer M*M+3*M+M*NB)
+*                    (Workspace: need M*M + 4*M, prefer M*M + 3*M + M*NB)
 *
                      CALL DORGBR( 'Q', M, M, M, U, LDU, WORK( ITAUQ ),
      $                            WORK( IWORK ), LWORK-IWORK+1, IERR )
@@ -27198,7 +27363,7 @@
 *                    Perform bidiagonal QR iteration, computing left
 *                    singular vectors of L in U and computing right
 *                    singular vectors of L in WORK(IU)
-*                    (Workspace: need M*M+BDSPAC)
+*                    (Workspace: need M*M + BDSPAC)
 *
                      CALL DBDSQR( 'U', M, M, M, 0, S, WORK( IE ),
      $                            WORK( IU ), LDWRKU, U, LDU, DUM, 1,
@@ -27223,14 +27388,14 @@
                      IWORK = ITAU + M
 *
 *                    Compute A=L*Q, copying result to VT
-*                    (Workspace: need 2*M, prefer M+M*NB)
+*                    (Workspace: need 2*M, prefer M + M*NB)
 *
                      CALL DGELQF( M, N, A, LDA, WORK( ITAU ),
      $                            WORK( IWORK ), LWORK-IWORK+1, IERR )
                      CALL DLACPY( 'U', M, N, A, LDA, VT, LDVT )
 *
 *                    Generate Q in VT
-*                    (Workspace: need M+N, prefer M+N*NB)
+*                    (Workspace: need M + N, prefer M + N*NB)
 *
                      CALL DORGLQ( N, N, M, VT, LDVT, WORK( ITAU ),
      $                            WORK( IWORK ), LWORK-IWORK+1, IERR )
@@ -27246,7 +27411,7 @@
                      IWORK = ITAUP + M
 *
 *                    Bidiagonalize L in U
-*                    (Workspace: need 4*M, prefer 3*M+2*M*NB)
+*                    (Workspace: need 4*M, prefer 3*M + 2*M*NB)
 *
                      CALL DGEBRD( M, M, U, LDU, S, WORK( IE ),
      $                            WORK( ITAUQ ), WORK( ITAUP ),
@@ -27254,14 +27419,14 @@
 *
 *                    Multiply right bidiagonalizing vectors in U by Q
 *                    in VT
-*                    (Workspace: need 3*M+N, prefer 3*M+N*NB)
+*                    (Workspace: need 3*M + N, prefer 3*M + N*NB)
 *
                      CALL DORMBR( 'P', 'L', 'T', M, N, M, U, LDU,
      $                            WORK( ITAUP ), VT, LDVT,
      $                            WORK( IWORK ), LWORK-IWORK+1, IERR )
 *
 *                    Generate left bidiagonalizing vectors in U
-*                    (Workspace: need 4*M, prefer 3*M+M*NB)
+*                    (Workspace: need 4*M, prefer 3*M + M*NB)
 *
                      CALL DORGBR( 'Q', M, M, M, U, LDU, WORK( ITAUQ ),
      $                            WORK( IWORK ), LWORK-IWORK+1, IERR )
@@ -27295,7 +27460,7 @@
             IWORK = ITAUP + M
 *
 *           Bidiagonalize A
-*           (Workspace: need 3*M+N, prefer 3*M+(M+N)*NB)
+*           (Workspace: need 3*M + N, prefer 3*M + (M + N)*NB)
 *
             CALL DGEBRD( M, N, A, LDA, S, WORK( IE ), WORK( ITAUQ ),
      $                   WORK( ITAUP ), WORK( IWORK ), LWORK-IWORK+1,
@@ -27304,7 +27469,7 @@
 *
 *              If left singular vectors desired in U, copy result to U
 *              and generate left bidiagonalizing vectors in U
-*              (Workspace: need 4*M-1, prefer 3*M+(M-1)*NB)
+*              (Workspace: need 4*M-1, prefer 3*M + (M-1)*NB)
 *
                CALL DLACPY( 'L', M, M, A, LDA, U, LDU )
                CALL DORGBR( 'Q', M, M, N, U, LDU, WORK( ITAUQ ),
@@ -27314,7 +27479,7 @@
 *
 *              If right singular vectors desired in VT, copy result to
 *              VT and generate right bidiagonalizing vectors in VT
-*              (Workspace: need 3*M+NRVT, prefer 3*M+NRVT*NB)
+*              (Workspace: need 3*M + NRVT, prefer 3*M + NRVT*NB)
 *
                CALL DLACPY( 'U', M, N, A, LDA, VT, LDVT )
                IF( WNTVA )
@@ -27328,7 +27493,7 @@
 *
 *              If left singular vectors desired in A, generate left
 *              bidiagonalizing vectors in A
-*              (Workspace: need 4*M-1, prefer 3*M+(M-1)*NB)
+*              (Workspace: need 4*M-1, prefer 3*M + (M-1)*NB)
 *
                CALL DORGBR( 'Q', M, M, N, A, LDA, WORK( ITAUQ ),
      $                      WORK( IWORK ), LWORK-IWORK+1, IERR )
@@ -27337,7 +27502,7 @@
 *
 *              If right singular vectors desired in A, generate right
 *              bidiagonalizing vectors in A
-*              (Workspace: need 4*M, prefer 3*M+M*NB)
+*              (Workspace: need 4*M, prefer 3*M + M*NB)
 *
                CALL DORGBR( 'P', M, N, M, A, LDA, WORK( ITAUP ),
      $                      WORK( IWORK ), LWORK-IWORK+1, IERR )
@@ -27430,25 +27595,25 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DGESVJ + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dgesvj.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dgesvj.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dgesvj.f"> 
+*> Download DGESVJ + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dgesvj.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dgesvj.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dgesvj.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       SUBROUTINE DGESVJ( JOBA, JOBU, JOBV, M, N, A, LDA, SVA, MV, V,
 *                          LDV, WORK, LWORK, INFO )
-* 
+*
 *       .. Scalar Arguments ..
 *       INTEGER            INFO, LDA, LDV, LWORK, M, MV, N
 *       CHARACTER*1        JOBA, JOBU, JOBV
@@ -27457,7 +27622,7 @@
 *       DOUBLE PRECISION   A( LDA, * ), SVA( N ), V( LDV, * ),
 *      $                   WORK( LWORK )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -27473,6 +27638,8 @@
 *> matrix, and V is an N-by-N orthogonal matrix. The diagonal elements
 *> of SIGMA are the singular values of A. The columns of U and V are the
 *> left and the right singular vectors of A, respectively.
+*> DGESVJ can sometimes compute tiny singular values and their singular vectors much
+*> more accurately than other SVD routines, see below under Further Details.
 *> \endverbatim
 *
 *  Arguments:
@@ -27529,7 +27696,7 @@
 *> \param[in] M
 *> \verbatim
 *>          M is INTEGER
-*>          The number of rows of the input matrix A. 1/DLAMCH('E') > M >= 0.  
+*>          The number of rows of the input matrix A. 1/DLAMCH('E') > M >= 0.
 *> \endverbatim
 *>
 *> \param[in] N
@@ -27634,7 +27801,7 @@
 *>
 *> \param[in,out] WORK
 *> \verbatim
-*>          WORK is DOUBLE PRECISION array, dimension max(4,M+N).
+*>          WORK is DOUBLE PRECISION array, dimension MAX(6,M+N).
 *>          On entry :
 *>          If JOBU .EQ. 'C' :
 *>          WORK(1) = CTOL, where CTOL defines the threshold for convergence.
@@ -27681,12 +27848,12 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date September 2012
+*> \date December 2016
 *
 *> \ingroup doubleGEcomputational
 *
@@ -27763,10 +27930,10 @@
       SUBROUTINE DGESVJ( JOBA, JOBU, JOBV, M, N, A, LDA, SVA, MV, V,
      $                   LDV, WORK, LWORK, INFO )
 *
-*  -- LAPACK computational routine (version 3.4.2) --
+*  -- LAPACK computational routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     September 2012
+*     December 2016
 *
 *     .. Scalar Arguments ..
       INTEGER            INFO, LDA, LDV, LWORK, M, MV, N
@@ -27802,7 +27969,7 @@
       DOUBLE PRECISION   FASTR( 5 )
 *     ..
 *     .. Intrinsic Functions ..
-      INTRINSIC          DABS, DMAX1, DMIN1, DBLE, MIN0, DSIGN, DSQRT
+      INTRINSIC          DABS, MAX, MIN, DBLE, DSIGN, DSQRT
 *     ..
 *     .. External Functions ..
 *     ..
@@ -27856,7 +28023,7 @@
          INFO = -11
       ELSE IF( UCTOL .AND. ( WORK( 1 ).LE.ONE ) ) THEN
          INFO = -12
-      ELSE IF( LWORK.LT.MAX0( M+N, 6 ) ) THEN
+      ELSE IF( LWORK.LT.MAX( M+N, 6 ) ) THEN
          INFO = -13
       ELSE
          INFO = 0
@@ -28022,8 +28189,8 @@
       AAPP = ZERO
       AAQQ = BIG
       DO 4781 p = 1, N
-         IF( SVA( p ).NE.ZERO )AAQQ = DMIN1( AAQQ, SVA( p ) )
-         AAPP = DMAX1( AAPP, SVA( p ) )
+         IF( SVA( p ).NE.ZERO )AAQQ = MIN( AAQQ, SVA( p ) )
+         AAPP = MAX( AAPP, SVA( p ) )
  4781 CONTINUE
 *
 * #:) Quick return for zero matrix
@@ -28064,19 +28231,19 @@
       TEMP1 = DSQRT( BIG / DBLE( N ) )
       IF( ( AAPP.LE.SN ) .OR. ( AAQQ.GE.TEMP1 ) .OR.
      $    ( ( SN.LE.AAQQ ) .AND. ( AAPP.LE.TEMP1 ) ) ) THEN
-         TEMP1 = DMIN1( BIG, TEMP1 / AAPP )
+         TEMP1 = MIN( BIG, TEMP1 / AAPP )
 *         AAQQ  = AAQQ*TEMP1
 *         AAPP  = AAPP*TEMP1
       ELSE IF( ( AAQQ.LE.SN ) .AND. ( AAPP.LE.TEMP1 ) ) THEN
-         TEMP1 = DMIN1( SN / AAQQ, BIG / ( AAPP*DSQRT( DBLE( N ) ) ) )
+         TEMP1 = MIN( SN / AAQQ, BIG / ( AAPP*DSQRT( DBLE( N ) ) ) )
 *         AAQQ  = AAQQ*TEMP1
 *         AAPP  = AAPP*TEMP1
       ELSE IF( ( AAQQ.GE.SN ) .AND. ( AAPP.GE.TEMP1 ) ) THEN
-         TEMP1 = DMAX1( SN / AAQQ, TEMP1 / AAPP )
+         TEMP1 = MAX( SN / AAQQ, TEMP1 / AAPP )
 *         AAQQ  = AAQQ*TEMP1
 *         AAPP  = AAPP*TEMP1
       ELSE IF( ( AAQQ.LE.SN ) .AND. ( AAPP.GE.TEMP1 ) ) THEN
-         TEMP1 = DMIN1( SN / AAQQ, BIG / ( DSQRT( DBLE( N ) )*AAPP ) )
+         TEMP1 = MIN( SN / AAQQ, BIG / ( DSQRT( DBLE( N ) )*AAPP ) )
 *         AAQQ  = AAQQ*TEMP1
 *         AAPP  = AAPP*TEMP1
       ELSE
@@ -28117,7 +28284,7 @@
 *     The boundaries are determined dynamically, based on the number of
 *     pivots above a threshold.
 *
-      KBL = MIN0( 8, N )
+      KBL = MIN( 8, N )
 *[TP] KBL is a tuning parameter that defines the tile size in the
 *     tiling of the p-q loops of pivot pairs. In general, an optimal
 *     value of KBL depends on the matrix dimensions and on the
@@ -28129,7 +28296,7 @@
       BLSKIP = KBL**2
 *[TP] BLKSKIP is a tuning parameter that depends on SWBAND and KBL.
 *
-      ROWSKIP = MIN0( 5, KBL )
+      ROWSKIP = MIN( 5, KBL )
 *[TP] ROWSKIP is a tuning parameter.
 *
       LKAHEAD = 1
@@ -28140,7 +28307,7 @@
 *     invokes cubic convergence. Big part of this cycle is done inside
 *     canonical subspaces of dimensions less than M.
 *
-      IF( ( LOWER .OR. UPPER ) .AND. ( N.GT.MAX0( 64, 4*KBL ) ) ) THEN
+      IF( ( LOWER .OR. UPPER ) .AND. ( N.GT.MAX( 64, 4*KBL ) ) ) THEN
 *[TP] The number of partition levels and the actual partition are
 *     tuning parameters.
          N4 = N / 4
@@ -28238,11 +28405,11 @@
 *
             igl = ( ibr-1 )*KBL + 1
 *
-            DO 1002 ir1 = 0, MIN0( LKAHEAD, NBL-ibr )
+            DO 1002 ir1 = 0, MIN( LKAHEAD, NBL-ibr )
 *
                igl = igl + ir1*KBL
 *
-               DO 2001 p = igl, MIN0( igl+KBL-1, N-1 )
+               DO 2001 p = igl, MIN( igl+KBL-1, N-1 )
 *
 *     .. de Rijk's pivoting
 *
@@ -28291,7 +28458,7 @@
 *
                      PSKIPPED = 0
 *
-                     DO 2002 q = p + 1, MIN0( igl+KBL-1, N )
+                     DO 2002 q = p + 1, MIN( igl+KBL-1, N )
 *
                         AAQQ = SVA( q )
 *
@@ -28330,7 +28497,7 @@
                               END IF
                            END IF
 *
-                           MXAAPQ = DMAX1( MXAAPQ, DABS( AAPQ ) )
+                           MXAAPQ = MAX( MXAAPQ, DABS( AAPQ ) )
 *
 *        TO rotate or NOT to rotate, THAT is the question ...
 *
@@ -28363,11 +28530,11 @@
      $                                              V( 1, p ), 1,
      $                                              V( 1, q ), 1,
      $                                              FASTR )
-                                    SVA( q ) = AAQQ*DSQRT( DMAX1( ZERO,
+                                    SVA( q ) = AAQQ*DSQRT( MAX( ZERO,
      $                                         ONE+T*APOAQ*AAPQ ) )
-                                    AAPP = AAPP*DSQRT( DMAX1( ZERO,
+                                    AAPP = AAPP*DSQRT( MAX( ZERO,
      $                                     ONE-T*AQOAP*AAPQ ) )
-                                    MXSINJ = DMAX1( MXSINJ, DABS( T ) )
+                                    MXSINJ = MAX( MXSINJ, DABS( T ) )
 *
                                  ELSE
 *
@@ -28379,10 +28546,10 @@
                                     CS = DSQRT( ONE / ( ONE+T*T ) )
                                     SN = T*CS
 *
-                                    MXSINJ = DMAX1( MXSINJ, DABS( SN ) )
-                                    SVA( q ) = AAQQ*DSQRT( DMAX1( ZERO,
+                                    MXSINJ = MAX( MXSINJ, DABS( SN ) )
+                                    SVA( q ) = AAQQ*DSQRT( MAX( ZERO,
      $                                         ONE+T*APOAQ*AAPQ ) )
-                                    AAPP = AAPP*DSQRT( DMAX1( ZERO,
+                                    AAPP = AAPP*DSQRT( MAX( ZERO,
      $                                     ONE-T*AQOAP*AAPQ ) )
 *
                                     APOAQ = WORK( p ) / WORK( q )
@@ -28496,9 +28663,9 @@
      $                                       A( 1, q ), 1 )
                                  CALL DLASCL( 'G', 0, 0, ONE, AAQQ, M,
      $                                        1, A( 1, q ), LDA, IERR )
-                                 SVA( q ) = AAQQ*DSQRT( DMAX1( ZERO,
+                                 SVA( q ) = AAQQ*DSQRT( MAX( ZERO,
      $                                      ONE-AAPQ*AAPQ ) )
-                                 MXSINJ = DMAX1( MXSINJ, SFMIN )
+                                 MXSINJ = MAX( MXSINJ, SFMIN )
                               END IF
 *           END IF ROTOK THEN ... ELSE
 *
@@ -28564,7 +28731,7 @@
                   ELSE
                      SVA( p ) = AAPP
                      IF( ( ir1.EQ.0 ) .AND. ( AAPP.EQ.ZERO ) )
-     $                   NOTROT = NOTROT + MIN0( igl+KBL-1, N ) - p
+     $                   NOTROT = NOTROT + MIN( igl+KBL-1, N ) - p
                   END IF
 *
  2001          CONTINUE
@@ -28584,14 +28751,14 @@
 *        doing the block at ( ibr, jbc )
 *
                IJBLSK = 0
-               DO 2100 p = igl, MIN0( igl+KBL-1, N )
+               DO 2100 p = igl, MIN( igl+KBL-1, N )
 *
                   AAPP = SVA( p )
                   IF( AAPP.GT.ZERO ) THEN
 *
                      PSKIPPED = 0
 *
-                     DO 2200 q = jgl, MIN0( jgl+KBL-1, N )
+                     DO 2200 q = jgl, MIN( jgl+KBL-1, N )
 *
                         AAQQ = SVA( q )
                         IF( AAQQ.GT.ZERO ) THEN
@@ -28641,7 +28808,7 @@
                               END IF
                            END IF
 *
-                           MXAAPQ = DMAX1( MXAAPQ, DABS( AAPQ ) )
+                           MXAAPQ = MAX( MXAAPQ, DABS( AAPQ ) )
 *
 *        TO rotate or NOT to rotate, THAT is the question ...
 *
@@ -28669,11 +28836,11 @@
      $                                              V( 1, p ), 1,
      $                                              V( 1, q ), 1,
      $                                              FASTR )
-                                    SVA( q ) = AAQQ*DSQRT( DMAX1( ZERO,
+                                    SVA( q ) = AAQQ*DSQRT( MAX( ZERO,
      $                                         ONE+T*APOAQ*AAPQ ) )
-                                    AAPP = AAPP*DSQRT( DMAX1( ZERO,
+                                    AAPP = AAPP*DSQRT( MAX( ZERO,
      $                                     ONE-T*AQOAP*AAPQ ) )
-                                    MXSINJ = DMAX1( MXSINJ, DABS( T ) )
+                                    MXSINJ = MAX( MXSINJ, DABS( T ) )
                                  ELSE
 *
 *                 .. choose correct signum for THETA and rotate
@@ -28684,10 +28851,10 @@
      $                                  DSQRT( ONE+THETA*THETA ) )
                                     CS = DSQRT( ONE / ( ONE+T*T ) )
                                     SN = T*CS
-                                    MXSINJ = DMAX1( MXSINJ, DABS( SN ) )
-                                    SVA( q ) = AAQQ*DSQRT( DMAX1( ZERO,
+                                    MXSINJ = MAX( MXSINJ, DABS( SN ) )
+                                    SVA( q ) = AAQQ*DSQRT( MAX( ZERO,
      $                                         ONE+T*APOAQ*AAPQ ) )
-                                    AAPP = AAPP*DSQRT( DMAX1( ZERO, 
+                                    AAPP = AAPP*DSQRT( MAX( ZERO,
      $                                     ONE-T*AQOAP*AAPQ ) )
 *
                                     APOAQ = WORK( p ) / WORK( q )
@@ -28804,9 +28971,9 @@
                                     CALL DLASCL( 'G', 0, 0, ONE, AAQQ,
      $                                           M, 1, A( 1, q ), LDA,
      $                                           IERR )
-                                    SVA( q ) = AAQQ*DSQRT( DMAX1( ZERO,
+                                    SVA( q ) = AAQQ*DSQRT( MAX( ZERO,
      $                                         ONE-AAPQ*AAPQ ) )
-                                    MXSINJ = DMAX1( MXSINJ, SFMIN )
+                                    MXSINJ = MAX( MXSINJ, SFMIN )
                                  ELSE
                                     CALL DCOPY( M, A( 1, q ), 1,
      $                                          WORK( N+1 ), 1 )
@@ -28822,9 +28989,9 @@
                                     CALL DLASCL( 'G', 0, 0, ONE, AAPP,
      $                                           M, 1, A( 1, p ), LDA,
      $                                           IERR )
-                                    SVA( p ) = AAPP*DSQRT( DMAX1( ZERO,
+                                    SVA( p ) = AAPP*DSQRT( MAX( ZERO,
      $                                         ONE-AAPQ*AAPQ ) )
-                                    MXSINJ = DMAX1( MXSINJ, SFMIN )
+                                    MXSINJ = MAX( MXSINJ, SFMIN )
                                  END IF
                               END IF
 *           END IF ROTOK THEN ... ELSE
@@ -28894,7 +29061,7 @@
                   ELSE
 *
                      IF( AAPP.EQ.ZERO )NOTROT = NOTROT +
-     $                   MIN0( jgl+KBL-1, N ) - jgl + 1
+     $                   MIN( jgl+KBL-1, N ) - jgl + 1
                      IF( AAPP.LT.ZERO )NOTROT = 0
 *
                   END IF
@@ -28905,7 +29072,7 @@
 *     end of the jbc-loop
  2011       CONTINUE
 *2011 bailed out of the jbc-loop
-            DO 2012 p = igl, MIN0( igl+KBL-1, N )
+            DO 2012 p = igl, MIN( igl+KBL-1, N )
                SVA( p ) = DABS( SVA( p ) )
  2012       CONTINUE
 ***
@@ -29043,18 +29210,18 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DGESVX + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dgesvx.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dgesvx.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dgesvx.f"> 
+*> Download DGESVX + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dgesvx.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dgesvx.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dgesvx.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
@@ -29062,7 +29229,7 @@
 *       SUBROUTINE DGESVX( FACT, TRANS, N, NRHS, A, LDA, AF, LDAF, IPIV,
 *                          EQUED, R, C, B, LDB, X, LDX, RCOND, FERR, BERR,
 *                          WORK, IWORK, INFO )
-* 
+*
 *       .. Scalar Arguments ..
 *       CHARACTER          EQUED, FACT, TRANS
 *       INTEGER            INFO, LDA, LDAF, LDB, LDX, N, NRHS
@@ -29074,7 +29241,7 @@
 *      $                   BERR( * ), C( * ), FERR( * ), R( * ),
 *      $                   WORK( * ), X( LDX, * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -29376,10 +29543,10 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
 *> \date April 2012
 *
@@ -29390,7 +29557,7 @@
      $                   EQUED, R, C, B, LDB, X, LDX, RCOND, FERR, BERR,
      $                   WORK, IWORK, INFO )
 *
-*  -- LAPACK driver routine (version 3.4.1) --
+*  -- LAPACK driver routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
 *     April 2012
@@ -29645,24 +29812,24 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DGETC2 + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dgetc2.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dgetc2.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dgetc2.f"> 
+*> Download DGETC2 + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dgetc2.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dgetc2.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dgetc2.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       SUBROUTINE DGETC2( N, A, LDA, IPIV, JPIV, INFO )
-* 
+*
 *       .. Scalar Arguments ..
 *       INTEGER            INFO, LDA, N
 *       ..
@@ -29670,7 +29837,7 @@
 *       INTEGER            IPIV( * ), JPIV( * )
 *       DOUBLE PRECISION   A( LDA, * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -29736,12 +29903,12 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date November 2013
+*> \date June 2016
 *
 *> \ingroup doubleGEauxiliary
 *
@@ -29754,10 +29921,10 @@
 *  =====================================================================
       SUBROUTINE DGETC2( N, A, LDA, IPIV, JPIV, INFO )
 *
-*  -- LAPACK auxiliary routine (version 3.5.0) --
+*  -- LAPACK auxiliary routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     November 2013
+*     June 2016
 *
 *     .. Scalar Arguments ..
       INTEGER            INFO, LDA, N
@@ -29789,14 +29956,32 @@
 *     ..
 *     .. Executable Statements ..
 *
+      INFO = 0
+*
+*     Quick return if possible
+*
+      IF( N.EQ.0 )
+     $   RETURN
+*
 *     Set constants to control overflow
 *
-      INFO = 0
       EPS = DLAMCH( 'P' )
       SMLNUM = DLAMCH( 'S' ) / EPS
       BIGNUM = ONE / SMLNUM
       CALL DLABAD( SMLNUM, BIGNUM )
 *
+*     Handle the case N=1 by itself
+*
+      IF( N.EQ.1 ) THEN
+         IPIV( 1 ) = 1
+         JPIV( 1 ) = 1
+         IF( ABS( A( 1, 1 ) ).LT.SMLNUM ) THEN
+            INFO = 1
+            A( 1, 1 ) = SMLNUM
+         END IF
+         RETURN
+      END IF
+*
 *     Factorize A using complete pivoting.
 *     Set pivots less than SMIN to SMIN.
 *
@@ -29861,24 +30046,24 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DGETF2 + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dgetf2.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dgetf2.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dgetf2.f"> 
+*> Download DGETF2 + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dgetf2.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dgetf2.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dgetf2.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       SUBROUTINE DGETF2( M, N, A, LDA, IPIV, INFO )
-* 
+*
 *       .. Scalar Arguments ..
 *       INTEGER            INFO, LDA, M, N
 *       ..
@@ -29886,7 +30071,7 @@
 *       INTEGER            IPIV( * )
 *       DOUBLE PRECISION   A( LDA, * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -29955,22 +30140,22 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date September 2012
+*> \date December 2016
 *
 *> \ingroup doubleGEcomputational
 *
 *  =====================================================================
       SUBROUTINE DGETF2( M, N, A, LDA, IPIV, INFO )
 *
-*  -- LAPACK computational routine (version 3.4.2) --
+*  -- LAPACK computational routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     September 2012
+*     December 2016
 *
 *     .. Scalar Arguments ..
       INTEGER            INFO, LDA, M, N
@@ -29987,11 +30172,11 @@
       PARAMETER          ( ONE = 1.0D+0, ZERO = 0.0D+0 )
 *     ..
 *     .. Local Scalars ..
-      DOUBLE PRECISION   SFMIN 
+      DOUBLE PRECISION   SFMIN
       INTEGER            I, J, JP
 *     ..
 *     .. External Functions ..
-      DOUBLE PRECISION   DLAMCH      
+      DOUBLE PRECISION   DLAMCH
       INTEGER            IDAMAX
       EXTERNAL           DLAMCH, IDAMAX
 *     ..
@@ -30023,9 +30208,9 @@
       IF( M.EQ.0 .OR. N.EQ.0 )
      $   RETURN
 *
-*     Compute machine safe minimum 
-* 
-      SFMIN = DLAMCH('S')  
+*     Compute machine safe minimum
+*
+      SFMIN = DLAMCH('S')
 *
       DO 10 J = 1, MIN( M, N )
 *
@@ -30042,15 +30227,15 @@
 *
 *           Compute elements J+1:M of J-th column.
 *
-            IF( J.LT.M ) THEN 
-               IF( ABS(A( J, J )) .GE. SFMIN ) THEN 
-                  CALL DSCAL( M-J, ONE / A( J, J ), A( J+1, J ), 1 ) 
-               ELSE 
-                 DO 20 I = 1, M-J 
-                    A( J+I, J ) = A( J+I, J ) / A( J, J ) 
-   20            CONTINUE 
-               END IF 
-            END IF 
+            IF( J.LT.M ) THEN
+               IF( ABS(A( J, J )) .GE. SFMIN ) THEN
+                  CALL DSCAL( M-J, ONE / A( J, J ), A( J+1, J ), 1 )
+               ELSE
+                 DO 20 I = 1, M-J
+                    A( J+I, J ) = A( J+I, J ) / A( J, J )
+   20            CONTINUE
+               END IF
+            END IF
 *
          ELSE IF( INFO.EQ.0 ) THEN
 *
@@ -30074,24 +30259,24 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DGETRF + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dgetrf.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dgetrf.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dgetrf.f"> 
+*> Download DGETRF + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dgetrf.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dgetrf.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dgetrf.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       SUBROUTINE DGETRF( M, N, A, LDA, IPIV, INFO )
-* 
+*
 *       .. Scalar Arguments ..
 *       INTEGER            INFO, LDA, M, N
 *       ..
@@ -30099,7 +30284,7 @@
 *       INTEGER            IPIV( * )
 *       DOUBLE PRECISION   A( LDA, * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -30168,22 +30353,22 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date November 2011
+*> \date December 2016
 *
 *> \ingroup doubleGEcomputational
 *
 *  =====================================================================
       SUBROUTINE DGETRF( M, N, A, LDA, IPIV, INFO )
 *
-*  -- LAPACK computational routine (version 3.4.0) --
+*  -- LAPACK computational routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     November 2011
+*     December 2016
 *
 *     .. Scalar Arguments ..
       INTEGER            INFO, LDA, M, N
@@ -30203,7 +30388,7 @@
       INTEGER            I, IINFO, J, JB, NB
 *     ..
 *     .. External Subroutines ..
-      EXTERNAL           DGEMM, DGETF2, DLASWP, DTRSM, XERBLA
+      EXTERNAL           DGEMM, DGETRF2, DLASWP, DTRSM, XERBLA
 *     ..
 *     .. External Functions ..
       INTEGER            ILAENV
@@ -30241,7 +30426,7 @@
 *
 *        Use unblocked code.
 *
-         CALL DGETF2( M, N, A, LDA, IPIV, INFO )
+         CALL DGETRF2( M, N, A, LDA, IPIV, INFO )
       ELSE
 *
 *        Use blocked code.
@@ -30252,7 +30437,7 @@
 *           Factor diagonal and subdiagonal blocks and test for exact
 *           singularity.
 *
-            CALL DGETF2( M-J+1, JB, A( J, J ), LDA, IPIV( J ), IINFO )
+            CALL DGETRF2( M-J+1, JB, A( J, J ), LDA, IPIV( J ), IINFO )
 *
 *           Adjust INFO and the pivot indices.
 *
@@ -30295,28 +30480,300 @@
 *     End of DGETRF
 *
       END
+*> \brief \b DGETRF2
+*
+*  =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
+*
+*  Definition:
+*  ===========
+*
+*       RECURSIVE SUBROUTINE DGETRF2( M, N, A, LDA, IPIV, INFO )
+*
+*       .. Scalar Arguments ..
+*       INTEGER            INFO, LDA, M, N
+*       ..
+*       .. Array Arguments ..
+*       INTEGER            IPIV( * )
+*       DOUBLE PRECISION   A( LDA, * )
+*       ..
+*
+*
+*> \par Purpose:
+*  =============
+*>
+*> \verbatim
+*>
+*> DGETRF2 computes an LU factorization of a general M-by-N matrix A
+*> using partial pivoting with row interchanges.
+*>
+*> The factorization has the form
+*>    A = P * L * U
+*> where P is a permutation matrix, L is lower triangular with unit
+*> diagonal elements (lower trapezoidal if m > n), and U is upper
+*> triangular (upper trapezoidal if m < n).
+*>
+*> This is the recursive version of the algorithm. It divides
+*> the matrix into four submatrices:
+*>
+*>        [  A11 | A12  ]  where A11 is n1 by n1 and A22 is n2 by n2
+*>    A = [ -----|----- ]  with n1 = min(m,n)/2
+*>        [  A21 | A22  ]       n2 = n-n1
+*>
+*>                                       [ A11 ]
+*> The subroutine calls itself to factor [ --- ],
+*>                                       [ A12 ]
+*>                 [ A12 ]
+*> do the swaps on [ --- ], solve A12, update A22,
+*>                 [ A22 ]
+*>
+*> then calls itself to factor A22 and do the swaps on A21.
+*>
+*> \endverbatim
+*
+*  Arguments:
+*  ==========
+*
+*> \param[in] M
+*> \verbatim
+*>          M is INTEGER
+*>          The number of rows of the matrix A.  M >= 0.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*>          N is INTEGER
+*>          The number of columns of the matrix A.  N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*>          A is DOUBLE PRECISION array, dimension (LDA,N)
+*>          On entry, the M-by-N matrix to be factored.
+*>          On exit, the factors L and U from the factorization
+*>          A = P*L*U; the unit diagonal elements of L are not stored.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*>          LDA is INTEGER
+*>          The leading dimension of the array A.  LDA >= max(1,M).
+*> \endverbatim
+*>
+*> \param[out] IPIV
+*> \verbatim
+*>          IPIV is INTEGER array, dimension (min(M,N))
+*>          The pivot indices; for 1 <= i <= min(M,N), row i of the
+*>          matrix was interchanged with row IPIV(i).
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*>          INFO is INTEGER
+*>          = 0:  successful exit
+*>          < 0:  if INFO = -i, the i-th argument had an illegal value
+*>          > 0:  if INFO = i, U(i,i) is exactly zero. The factorization
+*>                has been completed, but the factor U is exactly
+*>                singular, and division by zero will occur if it is used
+*>                to solve a system of equations.
+*> \endverbatim
+*
+*  Authors:
+*  ========
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date June 2016
+*
+*> \ingroup doubleGEcomputational
+*
+*  =====================================================================
+      RECURSIVE SUBROUTINE DGETRF2( M, N, A, LDA, IPIV, INFO )
+*
+*  -- LAPACK computational routine (version 3.7.0) --
+*  -- LAPACK is a software package provided by Univ. of Tennessee,    --
+*  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+*     June 2016
+*
+*     .. Scalar Arguments ..
+      INTEGER            INFO, LDA, M, N
+*     ..
+*     .. Array Arguments ..
+      INTEGER            IPIV( * )
+      DOUBLE PRECISION   A( LDA, * )
+*     ..
+*
+*  =====================================================================
+*
+*     .. Parameters ..
+      DOUBLE PRECISION   ONE, ZERO
+      PARAMETER          ( ONE = 1.0D+0, ZERO = 0.0D+0 )
+*     ..
+*     .. Local Scalars ..
+      DOUBLE PRECISION   SFMIN, TEMP
+      INTEGER            I, IINFO, N1, N2
+*     ..
+*     .. External Functions ..
+      DOUBLE PRECISION   DLAMCH
+      INTEGER            IDAMAX
+      EXTERNAL           DLAMCH, IDAMAX
+*     ..
+*     .. External Subroutines ..
+      EXTERNAL           DGEMM, DSCAL, DLASWP, DTRSM, XERBLA
+*     ..
+*     .. Intrinsic Functions ..
+      INTRINSIC          MAX, MIN
+*     ..
+*     .. Executable Statements ..
+*
+*     Test the input parameters
+*
+      INFO = 0
+      IF( M.LT.0 ) THEN
+         INFO = -1
+      ELSE IF( N.LT.0 ) THEN
+         INFO = -2
+      ELSE IF( LDA.LT.MAX( 1, M ) ) THEN
+         INFO = -4
+      END IF
+      IF( INFO.NE.0 ) THEN
+         CALL XERBLA( 'DGETRF2', -INFO )
+         RETURN
+      END IF
+*
+*     Quick return if possible
+*
+      IF( M.EQ.0 .OR. N.EQ.0 )
+     $   RETURN
+
+      IF ( M.EQ.1 ) THEN
+*
+*        Use unblocked code for one row case
+*        Just need to handle IPIV and INFO
+*
+         IPIV( 1 ) = 1
+         IF ( A(1,1).EQ.ZERO )
+     $      INFO = 1
+*
+      ELSE IF( N.EQ.1 ) THEN
+*
+*        Use unblocked code for one column case
+*
+*
+*        Compute machine safe minimum
+*
+         SFMIN = DLAMCH('S')
+*
+*        Find pivot and test for singularity
+*
+         I = IDAMAX( M, A( 1, 1 ), 1 )
+         IPIV( 1 ) = I
+         IF( A( I, 1 ).NE.ZERO ) THEN
+*
+*           Apply the interchange
+*
+            IF( I.NE.1 ) THEN
+               TEMP = A( 1, 1 )
+               A( 1, 1 ) = A( I, 1 )
+               A( I, 1 ) = TEMP
+            END IF
+*
+*           Compute elements 2:M of the column
+*
+            IF( ABS(A( 1, 1 )) .GE. SFMIN ) THEN
+               CALL DSCAL( M-1, ONE / A( 1, 1 ), A( 2, 1 ), 1 )
+            ELSE
+               DO 10 I = 1, M-1
+                  A( 1+I, 1 ) = A( 1+I, 1 ) / A( 1, 1 )
+   10          CONTINUE
+            END IF
+*
+         ELSE
+            INFO = 1
+         END IF
+*
+      ELSE
+*
+*        Use recursive code
+*
+         N1 = MIN( M, N ) / 2
+         N2 = N-N1
+*
+*               [ A11 ]
+*        Factor [ --- ]
+*               [ A21 ]
+*
+         CALL DGETRF2( M, N1, A, LDA, IPIV, IINFO )
+
+         IF ( INFO.EQ.0 .AND. IINFO.GT.0 )
+     $      INFO = IINFO
+*
+*                              [ A12 ]
+*        Apply interchanges to [ --- ]
+*                              [ A22 ]
+*
+         CALL DLASWP( N2, A( 1, N1+1 ), LDA, 1, N1, IPIV, 1 )
+*
+*        Solve A12
+*
+         CALL DTRSM( 'L', 'L', 'N', 'U', N1, N2, ONE, A, LDA,
+     $               A( 1, N1+1 ), LDA )
+*
+*        Update A22
+*
+         CALL DGEMM( 'N', 'N', M-N1, N2, N1, -ONE, A( N1+1, 1 ), LDA,
+     $               A( 1, N1+1 ), LDA, ONE, A( N1+1, N1+1 ), LDA )
+*
+*        Factor A22
+*
+         CALL DGETRF2( M-N1, N2, A( N1+1, N1+1 ), LDA, IPIV( N1+1 ),
+     $                 IINFO )
+*
+*        Adjust INFO and the pivot indices
+*
+         IF ( INFO.EQ.0 .AND. IINFO.GT.0 )
+     $      INFO = IINFO + N1
+         DO 20 I = N1+1, MIN( M, N )
+            IPIV( I ) = IPIV( I ) + N1
+   20    CONTINUE
+*
+*        Apply interchanges to A21
+*
+         CALL DLASWP( N1, A( 1, 1 ), LDA, N1+1, MIN( M, N), IPIV, 1 )
+*
+      END IF
+      RETURN
+*
+*     End of DGETRF2
+*
+      END
 *> \brief \b DGETRI
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DGETRI + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dgetri.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dgetri.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dgetri.f"> 
+*> Download DGETRI + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dgetri.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dgetri.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dgetri.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       SUBROUTINE DGETRI( N, A, LDA, IPIV, WORK, LWORK, INFO )
-* 
+*
 *       .. Scalar Arguments ..
 *       INTEGER            INFO, LDA, LWORK, N
 *       ..
@@ -30324,7 +30781,7 @@
 *       INTEGER            IPIV( * )
 *       DOUBLE PRECISION   A( LDA, * ), WORK( * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -30399,22 +30856,22 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date November 2011
+*> \date December 2016
 *
 *> \ingroup doubleGEcomputational
 *
 *  =====================================================================
       SUBROUTINE DGETRI( N, A, LDA, IPIV, WORK, LWORK, INFO )
 *
-*  -- LAPACK computational routine (version 3.4.0) --
+*  -- LAPACK computational routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     November 2011
+*     December 2016
 *
 *     .. Scalar Arguments ..
       INTEGER            INFO, LDA, LWORK, N
@@ -30560,24 +31017,24 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DGETRS + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dgetrs.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dgetrs.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dgetrs.f"> 
+*> Download DGETRS + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dgetrs.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dgetrs.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dgetrs.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       SUBROUTINE DGETRS( TRANS, N, NRHS, A, LDA, IPIV, B, LDB, INFO )
-* 
+*
 *       .. Scalar Arguments ..
 *       CHARACTER          TRANS
 *       INTEGER            INFO, LDA, LDB, N, NRHS
@@ -30586,7 +31043,7 @@
 *       INTEGER            IPIV( * )
 *       DOUBLE PRECISION   A( LDA, * ), B( LDB, * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -30667,22 +31124,22 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date November 2011
+*> \date December 2016
 *
 *> \ingroup doubleGEcomputational
 *
 *  =====================================================================
       SUBROUTINE DGETRS( TRANS, N, NRHS, A, LDA, IPIV, B, LDB, INFO )
 *
-*  -- LAPACK computational routine (version 3.4.0) --
+*  -- LAPACK computational routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     November 2011
+*     December 2016
 *
 *     .. Scalar Arguments ..
       CHARACTER          TRANS
@@ -30785,25 +31242,25 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DGGBAK + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dggbak.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dggbak.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dggbak.f"> 
+*> Download DGGBAK + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dggbak.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dggbak.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dggbak.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       SUBROUTINE DGGBAK( JOB, SIDE, N, ILO, IHI, LSCALE, RSCALE, M, V,
 *                          LDV, INFO )
-* 
+*
 *       .. Scalar Arguments ..
 *       CHARACTER          JOB, SIDE
 *       INTEGER            IHI, ILO, INFO, LDV, M, N
@@ -30811,7 +31268,7 @@
 *       .. Array Arguments ..
 *       DOUBLE PRECISION   LSCALE( * ), RSCALE( * ), V( LDV, * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -30908,12 +31365,12 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date November 2011
+*> \date December 2016
 *
 *> \ingroup doubleGBcomputational
 *
@@ -30930,10 +31387,10 @@
       SUBROUTINE DGGBAK( JOB, SIDE, N, ILO, IHI, LSCALE, RSCALE, M, V,
      $                   LDV, INFO )
 *
-*  -- LAPACK computational routine (version 3.4.0) --
+*  -- LAPACK computational routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     November 2011
+*     December 2016
 *
 *     .. Scalar Arguments ..
       CHARACTER          JOB, SIDE
@@ -30957,7 +31414,7 @@
       EXTERNAL           DSCAL, DSWAP, XERBLA
 *     ..
 *     .. Intrinsic Functions ..
-      INTRINSIC          MAX
+      INTRINSIC          MAX, INT
 *     ..
 *     .. Executable Statements ..
 *
@@ -31038,7 +31495,7 @@
      $         GO TO 50
 *
             DO 40 I = ILO - 1, 1, -1
-               K = RSCALE( I )
+               K = INT(RSCALE( I ))
                IF( K.EQ.I )
      $            GO TO 40
                CALL DSWAP( M, V( I, 1 ), LDV, V( K, 1 ), LDV )
@@ -31048,7 +31505,7 @@
             IF( IHI.EQ.N )
      $         GO TO 70
             DO 60 I = IHI + 1, N
-               K = RSCALE( I )
+               K = INT(RSCALE( I ))
                IF( K.EQ.I )
      $            GO TO 60
                CALL DSWAP( M, V( I, 1 ), LDV, V( K, 1 ), LDV )
@@ -31062,7 +31519,7 @@
             IF( ILO.EQ.1 )
      $         GO TO 90
             DO 80 I = ILO - 1, 1, -1
-               K = LSCALE( I )
+               K = INT(LSCALE( I ))
                IF( K.EQ.I )
      $            GO TO 80
                CALL DSWAP( M, V( I, 1 ), LDV, V( K, 1 ), LDV )
@@ -31072,7 +31529,7 @@
             IF( IHI.EQ.N )
      $         GO TO 110
             DO 100 I = IHI + 1, N
-               K = LSCALE( I )
+               K = INT(LSCALE( I ))
                IF( K.EQ.I )
      $            GO TO 100
                CALL DSWAP( M, V( I, 1 ), LDV, V( K, 1 ), LDV )
@@ -31091,25 +31548,25 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DGGBAL + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dggbal.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dggbal.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dggbal.f"> 
+*> Download DGGBAL + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dggbal.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dggbal.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dggbal.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       SUBROUTINE DGGBAL( JOB, N, A, LDA, B, LDB, ILO, IHI, LSCALE,
 *                          RSCALE, WORK, INFO )
-* 
+*
 *       .. Scalar Arguments ..
 *       CHARACTER          JOB
 *       INTEGER            IHI, ILO, INFO, LDA, LDB, N
@@ -31118,7 +31575,7 @@
 *       DOUBLE PRECISION   A( LDA, * ), B( LDB, * ), LSCALE( * ),
 *      $                   RSCALE( * ), WORK( * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -31244,12 +31701,12 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date November 2011
+*> \date December 2016
 *
 *> \ingroup doubleGBcomputational
 *
@@ -31266,10 +31723,10 @@
       SUBROUTINE DGGBAL( JOB, N, A, LDA, B, LDB, ILO, IHI, LSCALE,
      $                   RSCALE, WORK, INFO )
 *
-*  -- LAPACK computational routine (version 3.4.0) --
+*  -- LAPACK computational routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     November 2011
+*     December 2016
 *
 *     .. Scalar Arguments ..
       CHARACTER          JOB
@@ -31614,7 +32071,7 @@
          IRAB = IDAMAX( N-ILO+1, B( I, ILO ), LDB )
          RAB = MAX( RAB, ABS( B( I, IRAB+ILO-1 ) ) )
          LRAB = INT( LOG10( RAB+SFMIN ) / BASL+ONE )
-         IR = LSCALE( I ) + SIGN( HALF, LSCALE( I ) )
+         IR = INT(LSCALE( I ) + SIGN( HALF, LSCALE( I ) ))
          IR = MIN( MAX( IR, LSFMIN ), LSFMAX, LSFMAX-LRAB )
          LSCALE( I ) = SCLFAC**IR
          ICAB = IDAMAX( IHI, A( 1, I ), 1 )
@@ -31622,7 +32079,7 @@
          ICAB = IDAMAX( IHI, B( 1, I ), 1 )
          CAB = MAX( CAB, ABS( B( ICAB, I ) ) )
          LCAB = INT( LOG10( CAB+SFMIN ) / BASL+ONE )
-         JC = RSCALE( I ) + SIGN( HALF, RSCALE( I ) )
+         JC = INT(RSCALE( I ) + SIGN( HALF, RSCALE( I ) ))
          JC = MIN( MAX( JC, LSFMIN ), LSFMAX, LSFMAX-LCAB )
          RSCALE( I ) = SCLFAC**JC
   360 CONTINUE
@@ -31650,18 +32107,18 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DGGES + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dgges.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dgges.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dgges.f"> 
+*> Download DGGES + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dgges.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dgges.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dgges.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
@@ -31669,7 +32126,7 @@
 *       SUBROUTINE DGGES( JOBVSL, JOBVSR, SORT, SELCTG, N, A, LDA, B, LDB,
 *                         SDIM, ALPHAR, ALPHAI, BETA, VSL, LDVSL, VSR,
 *                         LDVSR, WORK, LWORK, BWORK, INFO )
-* 
+*
 *       .. Scalar Arguments ..
 *       CHARACTER          JOBVSL, JOBVSR, SORT
 *       INTEGER            INFO, LDA, LDB, LDVSL, LDVSR, LWORK, N, SDIM
@@ -31684,7 +32141,7 @@
 *       LOGICAL            SELCTG
 *       EXTERNAL           SELCTG
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -31918,12 +32375,12 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date November 2011
+*> \date December 2016
 *
 *> \ingroup doubleGEeigen
 *
@@ -31932,10 +32389,10 @@
      $                  SDIM, ALPHAR, ALPHAI, BETA, VSL, LDVSL, VSR,
      $                  LDVSR, WORK, LWORK, BWORK, INFO )
 *
-*  -- LAPACK driver routine (version 3.4.0) --
+*  -- LAPACK driver routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     November 2011
+*     December 2016
 *
 *     .. Scalar Arguments ..
       CHARACTER          JOBVSL, JOBVSR, SORT
@@ -32332,18 +32789,18 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DGGESX + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dggesx.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dggesx.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dggesx.f"> 
+*> Download DGGESX + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dggesx.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dggesx.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dggesx.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
@@ -32352,7 +32809,7 @@
 *                          B, LDB, SDIM, ALPHAR, ALPHAI, BETA, VSL, LDVSL,
 *                          VSR, LDVSR, RCONDE, RCONDV, WORK, LWORK, IWORK,
 *                          LIWORK, BWORK, INFO )
-* 
+*
 *       .. Scalar Arguments ..
 *       CHARACTER          JOBVSL, JOBVSR, SENSE, SORT
 *       INTEGER            INFO, LDA, LDB, LDVSL, LDVSR, LIWORK, LWORK, N,
@@ -32370,7 +32827,7 @@
 *       LOGICAL            SELCTG
 *       EXTERNAL           SELCTG
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -32662,12 +33119,12 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date November 2011
+*> \date December 2016
 *
 *> \ingroup doubleGEeigen
 *
@@ -32695,10 +33152,10 @@
      $                   VSR, LDVSR, RCONDE, RCONDV, WORK, LWORK, IWORK,
      $                   LIWORK, BWORK, INFO )
 *
-*  -- LAPACK driver routine (version 3.4.0) --
+*  -- LAPACK driver routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     November 2011
+*     December 2016
 *
 *     .. Scalar Arguments ..
       CHARACTER          JOBVSL, JOBVSR, SENSE, SORT
@@ -33152,25 +33609,25 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DGGEV + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dggev.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dggev.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dggev.f"> 
+*> Download DGGEV + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dggev.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dggev.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dggev.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       SUBROUTINE DGGEV( JOBVL, JOBVR, N, A, LDA, B, LDB, ALPHAR, ALPHAI,
 *                         BETA, VL, LDVL, VR, LDVR, WORK, LWORK, INFO )
-* 
+*
 *       .. Scalar Arguments ..
 *       CHARACTER          JOBVL, JOBVR
 *       INTEGER            INFO, LDA, LDB, LDVL, LDVR, LWORK, N
@@ -33180,7 +33637,7 @@
 *      $                   B( LDB, * ), BETA( * ), VL( LDVL, * ),
 *      $                   VR( LDVR, * ), WORK( * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -33363,10 +33820,10 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
 *> \date April 2012
 *
@@ -33376,7 +33833,7 @@
       SUBROUTINE DGGEV( JOBVL, JOBVR, N, A, LDA, B, LDB, ALPHAR, ALPHAI,
      $                  BETA, VL, LDVL, VR, LDVR, WORK, LWORK, INFO )
 *
-*  -- LAPACK driver routine (version 3.4.1) --
+*  -- LAPACK driver routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
 *     April 2012
@@ -33744,18 +34201,18 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DGGEVX + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dggevx.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dggevx.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dggevx.f"> 
+*> Download DGGEVX + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dggevx.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dggevx.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dggevx.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
@@ -33764,7 +34221,7 @@
 *                          ALPHAR, ALPHAI, BETA, VL, LDVL, VR, LDVR, ILO,
 *                          IHI, LSCALE, RSCALE, ABNRM, BBNRM, RCONDE,
 *                          RCONDV, WORK, LWORK, IWORK, BWORK, INFO )
-* 
+*
 *       .. Scalar Arguments ..
 *       CHARACTER          BALANC, JOBVL, JOBVR, SENSE
 *       INTEGER            IHI, ILO, INFO, LDA, LDB, LDVL, LDVR, LWORK, N
@@ -33778,7 +34235,7 @@
 *      $                   RCONDE( * ), RCONDV( * ), RSCALE( * ),
 *      $                   VL( LDVL, * ), VR( LDVR, * ), WORK( * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -34089,10 +34546,10 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
 *> \date April 2012
 *
@@ -34133,7 +34590,7 @@
      $                   IHI, LSCALE, RSCALE, ABNRM, BBNRM, RCONDE,
      $                   RCONDV, WORK, LWORK, IWORK, BWORK, INFO )
 *
-*  -- LAPACK driver routine (version 3.4.1) --
+*  -- LAPACK driver routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
 *     April 2012
@@ -34174,7 +34631,7 @@
 *     .. External Subroutines ..
       EXTERNAL           DGEQRF, DGGBAK, DGGBAL, DGGHRD, DHGEQZ, DLABAD,
      $                   DLACPY, DLASCL, DLASET, DORGQR, DORMQR, DTGEVC,
-     $                   DTGSNA, XERBLA 
+     $                   DTGSNA, XERBLA
 *     ..
 *     .. External Functions ..
       LOGICAL            LSAME
@@ -34608,29 +35065,29 @@
 *     End of DGGEVX
 *
       END
-*> \brief <b> DGGEVX computes the eigenvalues and, optionally, the left and/or right eigenvectors for GE matrices</b>
+*> \brief \b DGGGLM
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DGGGLM + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dggglm.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dggglm.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dggglm.f"> 
+*> Download DGGGLM + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dggglm.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dggglm.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dggglm.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       SUBROUTINE DGGGLM( N, M, P, A, LDA, B, LDB, D, X, Y, WORK, LWORK,
 *                          INFO )
-* 
+*
 *       .. Scalar Arguments ..
 *       INTEGER            INFO, LDA, LDB, LWORK, M, N, P
 *       ..
@@ -34638,7 +35095,7 @@
 *       DOUBLE PRECISION   A( LDA, * ), B( LDB, * ), D( * ), WORK( * ),
 *      $                   X( * ), Y( * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -34782,12 +35239,12 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date November 2011
+*> \date December 2016
 *
 *> \ingroup doubleOTHEReigen
 *
@@ -34795,10 +35252,10 @@
       SUBROUTINE DGGGLM( N, M, P, A, LDA, B, LDB, D, X, Y, WORK, LWORK,
      $                   INFO )
 *
-*  -- LAPACK driver routine (version 3.4.0) --
+*  -- LAPACK driver routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     November 2011
+*     December 2016
 *
 *     .. Scalar Arguments ..
       INTEGER            INFO, LDA, LDB, LWORK, M, N, P
@@ -34960,25 +35417,25 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DGGHRD + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dgghrd.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dgghrd.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dgghrd.f"> 
+*> Download DGGHRD + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dgghrd.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dgghrd.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dgghrd.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       SUBROUTINE DGGHRD( COMPQ, COMPZ, N, ILO, IHI, A, LDA, B, LDB, Q,
 *                          LDQ, Z, LDZ, INFO )
-* 
+*
 *       .. Scalar Arguments ..
 *       CHARACTER          COMPQ, COMPZ
 *       INTEGER            IHI, ILO, INFO, LDA, LDB, LDQ, LDZ, N
@@ -34987,7 +35444,7 @@
 *       DOUBLE PRECISION   A( LDA, * ), B( LDB, * ), Q( LDQ, * ),
 *      $                   Z( LDZ, * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -35142,12 +35599,12 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date November 2011
+*> \date December 2016
 *
 *> \ingroup doubleOTHERcomputational
 *
@@ -35165,10 +35622,10 @@
       SUBROUTINE DGGHRD( COMPQ, COMPZ, N, ILO, IHI, A, LDA, B, LDB, Q,
      $                   LDQ, Z, LDZ, INFO )
 *
-*  -- LAPACK computational routine (version 3.4.0) --
+*  -- LAPACK computational routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     November 2011
+*     December 2016
 *
 *     .. Scalar Arguments ..
       CHARACTER          COMPQ, COMPZ
@@ -35321,25 +35778,25 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DGGLSE + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dgglse.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dgglse.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dgglse.f"> 
+*> Download DGGLSE + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dgglse.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dgglse.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dgglse.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       SUBROUTINE DGGLSE( M, N, P, A, LDA, B, LDB, C, D, X, WORK, LWORK,
 *                          INFO )
-* 
+*
 *       .. Scalar Arguments ..
 *       INTEGER            INFO, LDA, LDB, LWORK, M, N, P
 *       ..
@@ -35347,7 +35804,7 @@
 *       DOUBLE PRECISION   A( LDA, * ), B( LDB, * ), C( * ), D( * ),
 *      $                   WORK( * ), X( * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -35486,12 +35943,12 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date November 2011
+*> \date December 2016
 *
 *> \ingroup doubleOTHERsolve
 *
@@ -35499,10 +35956,10 @@
       SUBROUTINE DGGLSE( M, N, P, A, LDA, B, LDB, C, D, X, WORK, LWORK,
      $                   INFO )
 *
-*  -- LAPACK driver routine (version 3.4.0) --
+*  -- LAPACK driver routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     November 2011
+*     December 2016
 *
 *     .. Scalar Arguments ..
       INTEGER            INFO, LDA, LDB, LWORK, M, N, P
@@ -35675,25 +36132,25 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DGGQRF + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dggqrf.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dggqrf.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dggqrf.f"> 
+*> Download DGGQRF + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dggqrf.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dggqrf.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dggqrf.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       SUBROUTINE DGGQRF( N, M, P, A, LDA, TAUA, B, LDB, TAUB, WORK,
 *                          LWORK, INFO )
-* 
+*
 *       .. Scalar Arguments ..
 *       INTEGER            INFO, LDA, LDB, LWORK, M, N, P
 *       ..
@@ -35701,7 +36158,7 @@
 *       DOUBLE PRECISION   A( LDA, * ), B( LDB, * ), TAUA( * ), TAUB( * ),
 *      $                   WORK( * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -35841,12 +36298,12 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date November 2011
+*> \date December 2016
 *
 *> \ingroup doubleOTHERcomputational
 *
@@ -35888,10 +36345,10 @@
       SUBROUTINE DGGQRF( N, M, P, A, LDA, TAUA, B, LDB, TAUB, WORK,
      $                   LWORK, INFO )
 *
-*  -- LAPACK computational routine (version 3.4.0) --
+*  -- LAPACK computational routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     November 2011
+*     December 2016
 *
 *     .. Scalar Arguments ..
       INTEGER            INFO, LDA, LDB, LWORK, M, N, P
@@ -35974,25 +36431,25 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DGGRQF + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dggrqf.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dggrqf.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dggrqf.f"> 
+*> Download DGGRQF + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dggrqf.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dggrqf.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dggrqf.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       SUBROUTINE DGGRQF( M, P, N, A, LDA, TAUA, B, LDB, TAUB, WORK,
 *                          LWORK, INFO )
-* 
+*
 *       .. Scalar Arguments ..
 *       INTEGER            INFO, LDA, LDB, LWORK, M, N, P
 *       ..
@@ -36000,7 +36457,7 @@
 *       DOUBLE PRECISION   A( LDA, * ), B( LDB, * ), TAUA( * ), TAUB( * ),
 *      $                   WORK( * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -36139,12 +36596,12 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date November 2011
+*> \date December 2016
 *
 *> \ingroup doubleOTHERcomputational
 *
@@ -36186,10 +36643,10 @@
       SUBROUTINE DGGRQF( M, P, N, A, LDA, TAUA, B, LDB, TAUB, WORK,
      $                   LWORK, INFO )
 *
-*  -- LAPACK computational routine (version 3.4.0) --
+*  -- LAPACK computational routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     November 2011
+*     December 2016
 *
 *     .. Scalar Arguments ..
       INTEGER            INFO, LDA, LDB, LWORK, M, N, P
@@ -36273,18 +36730,18 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DGGSVD + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dggsvd.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dggsvd.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dggsvd.f"> 
+*> Download DGGSVD + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dggsvd.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dggsvd.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dggsvd.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
@@ -36292,7 +36749,7 @@
 *       SUBROUTINE DGGSVD( JOBU, JOBV, JOBQ, M, N, P, K, L, A, LDA, B,
 *                          LDB, ALPHA, BETA, U, LDU, V, LDV, Q, LDQ, WORK,
 *                          IWORK, INFO )
-* 
+*
 *       .. Scalar Arguments ..
 *       CHARACTER          JOBQ, JOBU, JOBV
 *       INTEGER            INFO, K, L, LDA, LDB, LDQ, LDU, LDV, M, N, P
@@ -36303,13 +36760,15 @@
 *      $                   BETA( * ), Q( LDQ, * ), U( LDU, * ),
 *      $                   V( LDV, * ), WORK( * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
 *>
 *> \verbatim
 *>
+*> This routine is deprecated and has been replaced by routine DGGSVD3.
+*>
 *> DGGSVD computes the generalized singular value decomposition (GSVD)
 *> of an M-by-N real matrix A and P-by-N real matrix B:
 *>
@@ -36583,12 +37042,12 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date November 2011
+*> \date December 2016
 *
 *> \ingroup doubleOTHERsing
 *
@@ -36603,10 +37062,10 @@
      $                   LDB, ALPHA, BETA, U, LDU, V, LDV, Q, LDQ, WORK,
      $                   IWORK, INFO )
 *
-*  -- LAPACK driver routine (version 3.4.0) --
+*  -- LAPACK driver routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     November 2011
+*     December 2016
 *
 *     .. Scalar Arguments ..
       CHARACTER          JOBQ, JOBU, JOBV
@@ -36735,18 +37194,18 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DGGSVP + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dggsvp.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dggsvp.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dggsvp.f"> 
+*> Download DGGSVP + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dggsvp.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dggsvp.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dggsvp.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
@@ -36754,7 +37213,7 @@
 *       SUBROUTINE DGGSVP( JOBU, JOBV, JOBQ, M, P, N, A, LDA, B, LDB,
 *                          TOLA, TOLB, K, L, U, LDU, V, LDV, Q, LDQ,
 *                          IWORK, TAU, WORK, INFO )
-* 
+*
 *       .. Scalar Arguments ..
 *       CHARACTER          JOBQ, JOBU, JOBV
 *       INTEGER            INFO, K, L, LDA, LDB, LDQ, LDU, LDV, M, N, P
@@ -36765,13 +37224,15 @@
 *       DOUBLE PRECISION   A( LDA, * ), B( LDB, * ), Q( LDQ, * ),
 *      $                   TAU( * ), U( LDU, * ), V( LDV, * ), WORK( * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
 *>
 *> \verbatim
 *>
+*> This routine is deprecated and has been replaced by routine DGGSVP3.
+*>
 *> DGGSVP computes orthogonal matrices U, V and Q such that
 *>
 *>                    N-K-L  K    L
@@ -36790,7 +37251,7 @@
 *> where the K-by-K matrix A12 and L-by-L matrix B13 are nonsingular
 *> upper triangular; A23 is L-by-L upper triangular if M-K-L >= 0,
 *> otherwise A23 is (M-K)-by-L upper trapezoidal.  K+L = the effective
-*> numerical rank of the (M+P)-by-N matrix (A**T,B**T)**T. 
+*> numerical rank of the (M+P)-by-N matrix (A**T,B**T)**T.
 *>
 *> This decomposition is the preprocessing step for computing the
 *> Generalized Singular Value Decomposition (GSVD), see subroutine
@@ -36966,12 +37427,12 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date November 2011
+*> \date December 2016
 *
 *> \ingroup doubleOTHERcomputational
 *
@@ -36987,10 +37448,10 @@
      $                   TOLA, TOLB, K, L, U, LDU, V, LDV, Q, LDQ,
      $                   IWORK, TAU, WORK, INFO )
 *
-*  -- LAPACK computational routine (version 3.4.0) --
+*  -- LAPACK computational routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     November 2011
+*     December 2016
 *
 *     .. Scalar Arguments ..
       CHARACTER          JOBQ, JOBU, JOBV
@@ -37251,29 +37712,29 @@
 *     End of DGGSVP
 *
       END
-*> \brief \b DGSVJ0 pre-processor for the routine sgesvj.
+*> \brief \b DGSVJ0 pre-processor for the routine dgesvj.
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DGSVJ0 + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dgsvj0.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dgsvj0.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dgsvj0.f"> 
+*> Download DGSVJ0 + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dgsvj0.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dgsvj0.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dgsvj0.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       SUBROUTINE DGSVJ0( JOBV, M, N, A, LDA, D, SVA, MV, V, LDV, EPS,
 *                          SFMIN, TOL, NSWEEP, WORK, LWORK, INFO )
-* 
+*
 *       .. Scalar Arguments ..
 *       INTEGER            INFO, LDA, LDV, LWORK, M, MV, N, NSWEEP
 *       DOUBLE PRECISION   EPS, SFMIN, TOL
@@ -37283,7 +37744,7 @@
 *       DOUBLE PRECISION   A( LDA, * ), SVA( N ), D( N ), V( LDV, * ),
 *      $                   WORK( LWORK )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -37441,12 +37902,12 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date September 2012
+*> \date December 2016
 *
 *> \ingroup doubleOTHERcomputational
 *
@@ -37471,10 +37932,10 @@
       SUBROUTINE DGSVJ0( JOBV, M, N, A, LDA, D, SVA, MV, V, LDV, EPS,
      $                   SFMIN, TOL, NSWEEP, WORK, LWORK, INFO )
 *
-*  -- LAPACK computational routine (version 3.4.2) --
+*  -- LAPACK computational routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     September 2012
+*     December 2016
 *
 *     .. Scalar Arguments ..
       INTEGER            INFO, LDA, LDV, LWORK, M, MV, N, NSWEEP
@@ -37506,7 +37967,7 @@
       DOUBLE PRECISION   FASTR( 5 )
 *     ..
 *     .. Intrinsic Functions ..
-      INTRINSIC          DABS, DMAX1, DBLE, MIN0, DSIGN, DSQRT
+      INTRINSIC          DABS, MAX, DBLE, MIN, DSIGN, DSQRT
 *     ..
 *     .. External Functions ..
       DOUBLE PRECISION   DDOT, DNRM2
@@ -37533,7 +37994,7 @@
          INFO = -5
       ELSE IF( ( RSVEC.OR.APPLV ) .AND. ( MV.LT.0 ) ) THEN
          INFO = -8
-      ELSE IF( ( RSVEC.AND.( LDV.LT.N ) ).OR. 
+      ELSE IF( ( RSVEC.AND.( LDV.LT.N ) ).OR.
      $         ( APPLV.AND.( LDV.LT.MV ) ) ) THEN
          INFO = -10
       ELSE IF( TOL.LE.EPS ) THEN
@@ -37582,7 +38043,7 @@
 *     Jacobi SVD algorithm SGESVJ. For sweeps i=1:SWBAND the procedure
 *     ......
 
-      KBL = MIN0( 8, N )
+      KBL = MIN( 8, N )
 *[TP] KBL is a tuning parameter that defines the tile size in the
 *     tiling of the p-q loops of pivot pairs. In general, an optimal
 *     value of KBL depends on the matrix dimensions and on the
@@ -37594,7 +38055,7 @@
       BLSKIP = ( KBL**2 ) + 1
 *[TP] BLKSKIP is a tuning parameter that depends on SWBAND and KBL.
 
-      ROWSKIP = MIN0( 5, KBL )
+      ROWSKIP = MIN( 5, KBL )
 *[TP] ROWSKIP is a tuning parameter.
 
       LKAHEAD = 1
@@ -37616,11 +38077,11 @@
 
             igl = ( ibr-1 )*KBL + 1
 *
-            DO 1002 ir1 = 0, MIN0( LKAHEAD, NBL-ibr )
+            DO 1002 ir1 = 0, MIN( LKAHEAD, NBL-ibr )
 *
                igl = igl + ir1*KBL
 *
-               DO 2001 p = igl, MIN0( igl+KBL-1, N-1 )
+               DO 2001 p = igl, MIN( igl+KBL-1, N-1 )
 
 *     .. de Rijk's pivoting
                   q = IDAMAX( N-p+1, SVA( p ), 1 ) + p - 1
@@ -37669,7 +38130,7 @@
 *
                      PSKIPPED = 0
 *
-                     DO 2002 q = p + 1, MIN0( igl+KBL-1, N )
+                     DO 2002 q = p + 1, MIN( igl+KBL-1, N )
 *
                         AAQQ = SVA( q )
 
@@ -37704,7 +38165,7 @@
                               END IF
                            END IF
 *
-                           MXAAPQ = DMAX1( MXAAPQ, DABS( AAPQ ) )
+                           MXAAPQ = MAX( MXAAPQ, DABS( AAPQ ) )
 *
 *        TO rotate or NOT to rotate, THAT is the question ...
 *
@@ -37736,11 +38197,11 @@
      $                                              V( 1, p ), 1,
      $                                              V( 1, q ), 1,
      $                                              FASTR )
-                                    SVA( q ) = AAQQ*DSQRT( DMAX1( ZERO,
+                                    SVA( q ) = AAQQ*DSQRT( MAX( ZERO,
      $                                         ONE+T*APOAQ*AAPQ ) )
-                                    AAPP = AAPP*DSQRT( DMAX1( ZERO, 
+                                    AAPP = AAPP*DSQRT( MAX( ZERO,
      $                                     ONE-T*AQOAP*AAPQ ) )
-                                    MXSINJ = DMAX1( MXSINJ, DABS( T ) )
+                                    MXSINJ = MAX( MXSINJ, DABS( T ) )
 *
                                  ELSE
 *
@@ -37752,10 +38213,10 @@
                                     CS = DSQRT( ONE / ( ONE+T*T ) )
                                     SN = T*CS
 *
-                                    MXSINJ = DMAX1( MXSINJ, DABS( SN ) )
-                                    SVA( q ) = AAQQ*DSQRT( DMAX1( ZERO,
+                                    MXSINJ = MAX( MXSINJ, DABS( SN ) )
+                                    SVA( q ) = AAQQ*DSQRT( MAX( ZERO,
      $                                         ONE+T*APOAQ*AAPQ ) )
-                                    AAPP = AAPP*DSQRT( DMAX1( ZERO,
+                                    AAPP = AAPP*DSQRT( MAX( ZERO,
      $                                     ONE-T*AQOAP*AAPQ ) )
 *
                                     APOAQ = D( p ) / D( q )
@@ -37866,9 +38327,9 @@
      $                                       A( 1, q ), 1 )
                                  CALL DLASCL( 'G', 0, 0, ONE, AAQQ, M,
      $                                        1, A( 1, q ), LDA, IERR )
-                                 SVA( q ) = AAQQ*DSQRT( DMAX1( ZERO,
+                                 SVA( q ) = AAQQ*DSQRT( MAX( ZERO,
      $                                      ONE-AAPQ*AAPQ ) )
-                                 MXSINJ = DMAX1( MXSINJ, SFMIN )
+                                 MXSINJ = MAX( MXSINJ, SFMIN )
                               END IF
 *           END IF ROTOK THEN ... ELSE
 *
@@ -37932,7 +38393,7 @@
                   ELSE
                      SVA( p ) = AAPP
                      IF( ( ir1.EQ.0 ) .AND. ( AAPP.EQ.ZERO ) )
-     $                   NOTROT = NOTROT + MIN0( igl+KBL-1, N ) - p
+     $                   NOTROT = NOTROT + MIN( igl+KBL-1, N ) - p
                   END IF
 *
  2001          CONTINUE
@@ -37953,7 +38414,7 @@
 *        doing the block at ( ibr, jbc )
 *
                IJBLSK = 0
-               DO 2100 p = igl, MIN0( igl+KBL-1, N )
+               DO 2100 p = igl, MIN( igl+KBL-1, N )
 *
                   AAPP = SVA( p )
 *
@@ -37961,7 +38422,7 @@
 *
                      PSKIPPED = 0
 *
-                     DO 2200 q = jgl, MIN0( jgl+KBL-1, N )
+                     DO 2200 q = jgl, MIN( jgl+KBL-1, N )
 *
                         AAQQ = SVA( q )
 *
@@ -38008,7 +38469,7 @@
                               END IF
                            END IF
 *
-                           MXAAPQ = DMAX1( MXAAPQ, DABS( AAPQ ) )
+                           MXAAPQ = MAX( MXAAPQ, DABS( AAPQ ) )
 *
 *        TO rotate or NOT to rotate, THAT is the question ...
 *
@@ -38035,11 +38496,11 @@
      $                                              V( 1, p ), 1,
      $                                              V( 1, q ), 1,
      $                                              FASTR )
-                                    SVA( q ) = AAQQ*DSQRT( DMAX1( ZERO,
+                                    SVA( q ) = AAQQ*DSQRT( MAX( ZERO,
      $                                         ONE+T*APOAQ*AAPQ ) )
-                                    AAPP = AAPP*DSQRT( DMAX1( ZERO,
+                                    AAPP = AAPP*DSQRT( MAX( ZERO,
      $                                     ONE-T*AQOAP*AAPQ ) )
-                                    MXSINJ = DMAX1( MXSINJ, DABS( T ) )
+                                    MXSINJ = MAX( MXSINJ, DABS( T ) )
                                  ELSE
 *
 *                 .. choose correct signum for THETA and rotate
@@ -38050,10 +38511,10 @@
      $                                  DSQRT( ONE+THETA*THETA ) )
                                     CS = DSQRT( ONE / ( ONE+T*T ) )
                                     SN = T*CS
-                                    MXSINJ = DMAX1( MXSINJ, DABS( SN ) )
-                                    SVA( q ) = AAQQ*DSQRT( DMAX1( ZERO,
+                                    MXSINJ = MAX( MXSINJ, DABS( SN ) )
+                                    SVA( q ) = AAQQ*DSQRT( MAX( ZERO,
      $                                         ONE+T*APOAQ*AAPQ ) )
-                                    AAPP = AAPP*DSQRT( DMAX1( ZERO, 
+                                    AAPP = AAPP*DSQRT( MAX( ZERO,
      $                                     ONE-T*AQOAP*AAPQ ) )
 *
                                     APOAQ = D( p ) / D( q )
@@ -38168,9 +38629,9 @@
                                     CALL DLASCL( 'G', 0, 0, ONE, AAQQ,
      $                                           M, 1, A( 1, q ), LDA,
      $                                           IERR )
-                                    SVA( q ) = AAQQ*DSQRT( DMAX1( ZERO,
+                                    SVA( q ) = AAQQ*DSQRT( MAX( ZERO,
      $                                         ONE-AAPQ*AAPQ ) )
-                                    MXSINJ = DMAX1( MXSINJ, SFMIN )
+                                    MXSINJ = MAX( MXSINJ, SFMIN )
                                  ELSE
                                     CALL DCOPY( M, A( 1, q ), 1, WORK,
      $                                          1 )
@@ -38185,9 +38646,9 @@
                                     CALL DLASCL( 'G', 0, 0, ONE, AAPP,
      $                                           M, 1, A( 1, p ), LDA,
      $                                           IERR )
-                                    SVA( p ) = AAPP*DSQRT( DMAX1( ZERO,
+                                    SVA( p ) = AAPP*DSQRT( MAX( ZERO,
      $                                         ONE-AAPQ*AAPQ ) )
-                                    MXSINJ = DMAX1( MXSINJ, SFMIN )
+                                    MXSINJ = MAX( MXSINJ, SFMIN )
                                  END IF
                               END IF
 *           END IF ROTOK THEN ... ELSE
@@ -38255,7 +38716,7 @@
 *
                   ELSE
                      IF( AAPP.EQ.ZERO )NOTROT = NOTROT +
-     $                   MIN0( jgl+KBL-1, N ) - jgl + 1
+     $                   MIN( jgl+KBL-1, N ) - jgl + 1
                      IF( AAPP.LT.ZERO )NOTROT = 0
                   END IF
 
@@ -38265,7 +38726,7 @@
 *     end of the jbc-loop
  2011       CONTINUE
 *2011 bailed out of the jbc-loop
-            DO 2012 p = igl, MIN0( igl+KBL-1, N )
+            DO 2012 p = igl, MIN( igl+KBL-1, N )
                SVA( p ) = DABS( SVA( p ) )
  2012       CONTINUE
 *
@@ -38329,29 +38790,29 @@
 *     .. END OF DGSVJ0
 *     ..
       END
-*> \brief \b DGSVJ1 pre-processor for the routine sgesvj, applies Jacobi rotations targeting only particular pivots.
+*> \brief \b DGSVJ1 pre-processor for the routine dgesvj, applies Jacobi rotations targeting only particular pivots.
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DGSVJ1 + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dgsvj1.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dgsvj1.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dgsvj1.f"> 
+*> Download DGSVJ1 + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dgsvj1.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dgsvj1.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dgsvj1.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       SUBROUTINE DGSVJ1( JOBV, M, N, N1, A, LDA, D, SVA, MV, V, LDV,
 *                          EPS, SFMIN, TOL, NSWEEP, WORK, LWORK, INFO )
-* 
+*
 *       .. Scalar Arguments ..
 *       DOUBLE PRECISION   EPS, SFMIN, TOL
 *       INTEGER            INFO, LDA, LDV, LWORK, M, MV, N, N1, NSWEEP
@@ -38361,15 +38822,15 @@
 *       DOUBLE PRECISION   A( LDA, * ), D( N ), SVA( N ), V( LDV, * ),
 *      $                   WORK( LWORK )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
 *>
 *> \verbatim
 *>
-*> DGSVJ1 is called from SGESVJ as a pre-processor and that is its main
-*> purpose. It applies Jacobi rotations in the same way as SGESVJ does, but
+*> DGSVJ1 is called from DGESVJ as a pre-processor and that is its main
+*> purpose. It applies Jacobi rotations in the same way as DGESVJ does, but
 *> it targets only particular pivots and it does not check convergence
 *> (stopping criterion). Few tunning parameters (marked by [TP]) are
 *> available for the implementer.
@@ -38549,12 +39010,12 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date September 2012
+*> \date June 2016
 *
 *> \ingroup doubleOTHERcomputational
 *
@@ -38567,10 +39028,10 @@
       SUBROUTINE DGSVJ1( JOBV, M, N, N1, A, LDA, D, SVA, MV, V, LDV,
      $                   EPS, SFMIN, TOL, NSWEEP, WORK, LWORK, INFO )
 *
-*  -- LAPACK computational routine (version 3.4.2) --
+*  -- LAPACK computational routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     September 2012
+*     June 2016
 *
 *     .. Scalar Arguments ..
       DOUBLE PRECISION   EPS, SFMIN, TOL
@@ -38602,7 +39063,7 @@
       DOUBLE PRECISION   FASTR( 5 )
 *     ..
 *     .. Intrinsic Functions ..
-      INTRINSIC          DABS, DMAX1, DBLE, MIN0, DSIGN, DSQRT
+      INTRINSIC          DABS, MAX, DBLE, MIN, DSIGN, DSQRT
 *     ..
 *     .. External Functions ..
       DOUBLE PRECISION   DDOT, DNRM2
@@ -38631,7 +39092,7 @@
          INFO = -6
       ELSE IF( ( RSVEC.OR.APPLV ) .AND. ( MV.LT.0 ) ) THEN
          INFO = -9
-      ELSE IF( ( RSVEC.AND.( LDV.LT.N ) ).OR. 
+      ELSE IF( ( RSVEC.AND.( LDV.LT.N ) ).OR.
      $         ( APPLV.AND.( LDV.LT.MV ) )  ) THEN
          INFO = -11
       ELSE IF( TOL.LE.EPS ) THEN
@@ -38676,7 +39137,7 @@
 *
 *     .. Row-cyclic pivot strategy with de Rijk's pivoting ..
 *
-      KBL = MIN0( 8, N )
+      KBL = MIN( 8, N )
       NBLR = N1 / KBL
       IF( ( NBLR*KBL ).NE.N1 )NBLR = NBLR + 1
 
@@ -38687,7 +39148,7 @@
       BLSKIP = ( KBL**2 ) + 1
 *[TP] BLKSKIP is a tuning parameter that depends on SWBAND and KBL.
 
-      ROWSKIP = MIN0( 5, KBL )
+      ROWSKIP = MIN( 5, KBL )
 *[TP] ROWSKIP is a tuning parameter.
       SWBAND = 0
 *[TP] SWBAND is a tuning parameter. It is meaningful and effective
@@ -38730,7 +39191,7 @@
 *        doing the block at ( ibr, jbc )
 
                IJBLSK = 0
-               DO 2100 p = igl, MIN0( igl+KBL-1, N1 )
+               DO 2100 p = igl, MIN( igl+KBL-1, N1 )
 
                   AAPP = SVA( p )
 
@@ -38738,7 +39199,7 @@
 
                      PSKIPPED = 0
 
-                     DO 2200 q = jgl, MIN0( jgl+KBL-1, N )
+                     DO 2200 q = jgl, MIN( jgl+KBL-1, N )
 *
                         AAQQ = SVA( q )
 
@@ -38785,7 +39246,7 @@
                               END IF
                            END IF
 
-                           MXAAPQ = DMAX1( MXAAPQ, DABS( AAPQ ) )
+                           MXAAPQ = MAX( MXAAPQ, DABS( AAPQ ) )
 
 *        TO rotate or NOT to rotate, THAT is the question ...
 *
@@ -38812,11 +39273,11 @@
      $                                              V( 1, p ), 1,
      $                                              V( 1, q ), 1,
      $                                              FASTR )
-                                    SVA( q ) = AAQQ*DSQRT( DMAX1( ZERO,
+                                    SVA( q ) = AAQQ*DSQRT( MAX( ZERO,
      $                                         ONE+T*APOAQ*AAPQ ) )
-                                    AAPP = AAPP*DSQRT( DMAX1( ZERO,
+                                    AAPP = AAPP*DSQRT( MAX( ZERO,
      $                                     ONE-T*AQOAP*AAPQ ) )
-                                    MXSINJ = DMAX1( MXSINJ, DABS( T ) )
+                                    MXSINJ = MAX( MXSINJ, DABS( T ) )
                                  ELSE
 *
 *                 .. choose correct signum for THETA and rotate
@@ -38827,10 +39288,10 @@
      $                                  DSQRT( ONE+THETA*THETA ) )
                                     CS = DSQRT( ONE / ( ONE+T*T ) )
                                     SN = T*CS
-                                    MXSINJ = DMAX1( MXSINJ, DABS( SN ) )
-                                    SVA( q ) = AAQQ*DSQRT( DMAX1( ZERO,
+                                    MXSINJ = MAX( MXSINJ, DABS( SN ) )
+                                    SVA( q ) = AAQQ*DSQRT( MAX( ZERO,
      $                                         ONE+T*APOAQ*AAPQ ) )
-                                    AAPP = AAPP*DSQRT( DMAX1( ZERO, 
+                                    AAPP = AAPP*DSQRT( MAX( ZERO,
      $                                    ONE-T*AQOAP*AAPQ ) )
 
                                     APOAQ = D( p ) / D( q )
@@ -38945,9 +39406,9 @@
                                     CALL DLASCL( 'G', 0, 0, ONE, AAQQ,
      $                                           M, 1, A( 1, q ), LDA,
      $                                           IERR )
-                                    SVA( q ) = AAQQ*DSQRT( DMAX1( ZERO,
+                                    SVA( q ) = AAQQ*DSQRT( MAX( ZERO,
      $                                         ONE-AAPQ*AAPQ ) )
-                                    MXSINJ = DMAX1( MXSINJ, SFMIN )
+                                    MXSINJ = MAX( MXSINJ, SFMIN )
                                  ELSE
                                     CALL DCOPY( M, A( 1, q ), 1, WORK,
      $                                          1 )
@@ -38962,9 +39423,9 @@
                                     CALL DLASCL( 'G', 0, 0, ONE, AAPP,
      $                                           M, 1, A( 1, p ), LDA,
      $                                           IERR )
-                                    SVA( p ) = AAPP*DSQRT( DMAX1( ZERO,
+                                    SVA( p ) = AAPP*DSQRT( MAX( ZERO,
      $                                         ONE-AAPQ*AAPQ ) )
-                                    MXSINJ = DMAX1( MXSINJ, SFMIN )
+                                    MXSINJ = MAX( MXSINJ, SFMIN )
                                  END IF
                               END IF
 *           END IF ROTOK THEN ... ELSE
@@ -39035,7 +39496,7 @@
 *
                   ELSE
                      IF( AAPP.EQ.ZERO )NOTROT = NOTROT +
-     $                   MIN0( jgl+KBL-1, N ) - jgl + 1
+     $                   MIN( jgl+KBL-1, N ) - jgl + 1
                      IF( AAPP.LT.ZERO )NOTROT = 0
 ***      IF ( NOTROT .GE. EMPTSW )  GO TO 2011
                   END IF
@@ -39046,7 +39507,7 @@
 *     end of the jbc-loop
  2011       CONTINUE
 *2011 bailed out of the jbc-loop
-            DO 2012 p = igl, MIN0( igl+KBL-1, N )
+            DO 2012 p = igl, MIN( igl+KBL-1, N )
                SVA( p ) = DABS( SVA( p ) )
  2012       CONTINUE
 ***   IF ( NOTROT .GE. EMPTSW ) GO TO 1994
@@ -39116,25 +39577,25 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DGTCON + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dgtcon.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dgtcon.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dgtcon.f"> 
+*> Download DGTCON + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dgtcon.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dgtcon.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dgtcon.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       SUBROUTINE DGTCON( NORM, N, DL, D, DU, DU2, IPIV, ANORM, RCOND,
 *                          WORK, IWORK, INFO )
-* 
+*
 *       .. Scalar Arguments ..
 *       CHARACTER          NORM
 *       INTEGER            INFO, N
@@ -39144,7 +39605,7 @@
 *       INTEGER            IPIV( * ), IWORK( * )
 *       DOUBLE PRECISION   D( * ), DL( * ), DU( * ), DU2( * ), WORK( * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -39247,12 +39708,12 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date September 2012
+*> \date December 2016
 *
 *> \ingroup doubleGTcomputational
 *
@@ -39260,10 +39721,10 @@
       SUBROUTINE DGTCON( NORM, N, DL, D, DU, DU2, IPIV, ANORM, RCOND,
      $                   WORK, IWORK, INFO )
 *
-*  -- LAPACK computational routine (version 3.4.2) --
+*  -- LAPACK computational routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     September 2012
+*     December 2016
 *
 *     .. Scalar Arguments ..
       CHARACTER          NORM
@@ -39371,18 +39832,18 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DGTRFS + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dgtrfs.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dgtrfs.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dgtrfs.f"> 
+*> Download DGTRFS + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dgtrfs.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dgtrfs.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dgtrfs.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
@@ -39390,7 +39851,7 @@
 *       SUBROUTINE DGTRFS( TRANS, N, NRHS, DL, D, DU, DLF, DF, DUF, DU2,
 *                          IPIV, B, LDB, X, LDX, FERR, BERR, WORK, IWORK,
 *                          INFO )
-* 
+*
 *       .. Scalar Arguments ..
 *       CHARACTER          TRANS
 *       INTEGER            INFO, LDB, LDX, N, NRHS
@@ -39401,7 +39862,7 @@
 *      $                   DL( * ), DLF( * ), DU( * ), DU2( * ), DUF( * ),
 *      $                   FERR( * ), WORK( * ), X( LDX, * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -39564,12 +40025,12 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date September 2012
+*> \date December 2016
 *
 *> \ingroup doubleGTcomputational
 *
@@ -39578,10 +40039,10 @@
      $                   IPIV, B, LDB, X, LDX, FERR, BERR, WORK, IWORK,
      $                   INFO )
 *
-*  -- LAPACK computational routine (version 3.4.2) --
+*  -- LAPACK computational routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     September 2012
+*     December 2016
 *
 *     .. Scalar Arguments ..
       CHARACTER          TRANS
@@ -39841,35 +40302,35 @@
 *     End of DGTRFS
 *
       END
-*> \brief <b> DGTSV computes the solution to system of linear equations A * X = B for GT matrices <b>
+*> \brief <b> DGTSV computes the solution to system of linear equations A * X = B for GT matrices </b>
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DGTSV + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dgtsv.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dgtsv.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dgtsv.f"> 
+*> Download DGTSV + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dgtsv.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dgtsv.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dgtsv.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       SUBROUTINE DGTSV( N, NRHS, DL, D, DU, B, LDB, INFO )
-* 
+*
 *       .. Scalar Arguments ..
 *       INTEGER            INFO, LDB, N, NRHS
 *       ..
 *       .. Array Arguments ..
 *       DOUBLE PRECISION   B( LDB, * ), D( * ), DL( * ), DU( * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -39958,22 +40419,22 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date September 2012
+*> \date December 2016
 *
 *> \ingroup doubleGTsolve
 *
 *  =====================================================================
       SUBROUTINE DGTSV( N, NRHS, DL, D, DU, B, LDB, INFO )
 *
-*  -- LAPACK driver routine (version 3.4.2) --
+*  -- LAPACK driver routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     September 2012
+*     December 2016
 *
 *     .. Scalar Arguments ..
       INTEGER            INFO, LDB, N, NRHS
@@ -40174,22 +40635,22 @@
 *     End of DGTSV
 *
       END
-*> \brief <b> DGTSVX computes the solution to system of linear equations A * X = B for GT matrices <b>
+*> \brief <b> DGTSVX computes the solution to system of linear equations A * X = B for GT matrices </b>
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DGTSVX + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dgtsvx.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dgtsvx.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dgtsvx.f"> 
+*> Download DGTSVX + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dgtsvx.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dgtsvx.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dgtsvx.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
@@ -40197,7 +40658,7 @@
 *       SUBROUTINE DGTSVX( FACT, TRANS, N, NRHS, DL, D, DU, DLF, DF, DUF,
 *                          DU2, IPIV, B, LDB, X, LDX, RCOND, FERR, BERR,
 *                          WORK, IWORK, INFO )
-* 
+*
 *       .. Scalar Arguments ..
 *       CHARACTER          FACT, TRANS
 *       INTEGER            INFO, LDB, LDX, N, NRHS
@@ -40209,7 +40670,7 @@
 *      $                   DL( * ), DLF( * ), DU( * ), DU2( * ), DUF( * ),
 *      $                   FERR( * ), WORK( * ), X( LDX, * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -40455,12 +40916,12 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date September 2012
+*> \date December 2016
 *
 *> \ingroup doubleGTsolve
 *
@@ -40469,10 +40930,10 @@
      $                   DU2, IPIV, B, LDB, X, LDX, RCOND, FERR, BERR,
      $                   WORK, IWORK, INFO )
 *
-*  -- LAPACK driver routine (version 3.4.2) --
+*  -- LAPACK driver routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     September 2012
+*     December 2016
 *
 *     .. Scalar Arguments ..
       CHARACTER          FACT, TRANS
@@ -40592,24 +41053,24 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DGTTRF + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dgttrf.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dgttrf.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dgttrf.f"> 
+*> Download DGTTRF + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dgttrf.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dgttrf.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dgttrf.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       SUBROUTINE DGTTRF( N, DL, D, DU, DU2, IPIV, INFO )
-* 
+*
 *       .. Scalar Arguments ..
 *       INTEGER            INFO, N
 *       ..
@@ -40617,7 +41078,7 @@
 *       INTEGER            IPIV( * )
 *       DOUBLE PRECISION   D( * ), DL( * ), DU( * ), DU2( * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -40702,22 +41163,22 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date September 2012
+*> \date December 2016
 *
 *> \ingroup doubleGTcomputational
 *
 *  =====================================================================
       SUBROUTINE DGTTRF( N, DL, D, DU, DU2, IPIV, INFO )
 *
-*  -- LAPACK computational routine (version 3.4.2) --
+*  -- LAPACK computational routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     September 2012
+*     December 2016
 *
 *     .. Scalar Arguments ..
       INTEGER            INFO, N
@@ -40829,25 +41290,25 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DGTTRS + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dgttrs.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dgttrs.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dgttrs.f"> 
+*> Download DGTTRS + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dgttrs.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dgttrs.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dgttrs.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       SUBROUTINE DGTTRS( TRANS, N, NRHS, DL, D, DU, DU2, IPIV, B, LDB,
 *                          INFO )
-* 
+*
 *       .. Scalar Arguments ..
 *       CHARACTER          TRANS
 *       INTEGER            INFO, LDB, N, NRHS
@@ -40856,7 +41317,7 @@
 *       INTEGER            IPIV( * )
 *       DOUBLE PRECISION   B( LDB, * ), D( * ), DL( * ), DU( * ), DU2( * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -40952,12 +41413,12 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date September 2012
+*> \date December 2016
 *
 *> \ingroup doubleGTcomputational
 *
@@ -40965,10 +41426,10 @@
       SUBROUTINE DGTTRS( TRANS, N, NRHS, DL, D, DU, DU2, IPIV, B, LDB,
      $                   INFO )
 *
-*  -- LAPACK computational routine (version 3.4.2) --
+*  -- LAPACK computational routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     September 2012
+*     December 2016
 *
 *     .. Scalar Arguments ..
       CHARACTER          TRANS
@@ -41052,24 +41513,24 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DGTTS2 + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dgtts2.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dgtts2.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dgtts2.f"> 
+*> Download DGTTS2 + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dgtts2.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dgtts2.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dgtts2.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       SUBROUTINE DGTTS2( ITRANS, N, NRHS, DL, D, DU, DU2, IPIV, B, LDB )
-* 
+*
 *       .. Scalar Arguments ..
 *       INTEGER            ITRANS, LDB, N, NRHS
 *       ..
@@ -41077,7 +41538,7 @@
 *       INTEGER            IPIV( * )
 *       DOUBLE PRECISION   B( LDB, * ), D( * ), DL( * ), DU( * ), DU2( * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -41166,22 +41627,22 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date September 2012
+*> \date December 2016
 *
 *> \ingroup doubleGTcomputational
 *
 *  =====================================================================
       SUBROUTINE DGTTS2( ITRANS, N, NRHS, DL, D, DU, DU2, IPIV, B, LDB )
 *
-*  -- LAPACK computational routine (version 3.4.2) --
+*  -- LAPACK computational routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     September 2012
+*     December 2016
 *
 *     .. Scalar Arguments ..
       INTEGER            ITRANS, LDB, N, NRHS
@@ -41326,18 +41787,18 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DHGEQZ + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dhgeqz.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dhgeqz.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dhgeqz.f"> 
+*> Download DHGEQZ + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dhgeqz.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dhgeqz.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dhgeqz.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
@@ -41345,7 +41806,7 @@
 *       SUBROUTINE DHGEQZ( JOB, COMPQ, COMPZ, N, ILO, IHI, H, LDH, T, LDT,
 *                          ALPHAR, ALPHAI, BETA, Q, LDQ, Z, LDZ, WORK,
 *                          LWORK, INFO )
-* 
+*
 *       .. Scalar Arguments ..
 *       CHARACTER          COMPQ, COMPZ, JOB
 *       INTEGER            IHI, ILO, INFO, LDH, LDQ, LDT, LDZ, LWORK, N
@@ -41355,7 +41816,7 @@
 *      $                   H( LDH, * ), Q( LDQ, * ), T( LDT, * ),
 *      $                   WORK( * ), Z( LDZ, * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -41374,9 +41835,9 @@
 *>
 *> If JOB='S', then the Hessenberg-triangular pair (H,T) is
 *> also reduced to generalized Schur form,
-*> 
+*>
 *>    H = Q*S*Z**T,  T = Q*P*Z**T,
-*> 
+*>
 *> where Q and Z are orthogonal matrices, P is an upper triangular
 *> matrix, and S is a quasi-triangular matrix with 1-by-1 and 2-by-2
 *> diagonal blocks.
@@ -41399,7 +41860,7 @@
 *> generalized Schur factorization of (A,B):
 *>
 *>    A = (Q1*Q)*S*(Z1*Z)**T,  B = (Q1*Q)*P*(Z1*Z)**T.
-*> 
+*>
 *> To avoid overflow, eigenvalues of the matrix pair (H,T) (equivalently,
 *> of (A,B)) are computed as a pair of values (alpha,beta), where alpha is
 *> complex and beta real.
@@ -41410,7 +41871,7 @@
 *> alternate form of the GNEP
 *>    mu*A*y = B*y.
 *> Real eigenvalues can be read directly from the generalized Schur
-*> form: 
+*> form:
 *>   alpha = S(i,i), beta = P(i,i).
 *>
 *> Ref: C.B. Moler & G.W. Stewart, "An Algorithm for Generalized Matrix
@@ -41425,7 +41886,7 @@
 *> \verbatim
 *>          JOB is CHARACTER*1
 *>          = 'E': Compute eigenvalues only;
-*>          = 'S': Compute eigenvalues and the Schur form. 
+*>          = 'S': Compute eigenvalues and the Schur form.
 *> \endverbatim
 *>
 *> \param[in] COMPQ
@@ -41535,12 +41996,12 @@
 *> \param[in,out] Q
 *> \verbatim
 *>          Q is DOUBLE PRECISION array, dimension (LDQ, N)
-*>          On entry, if COMPZ = 'V', the orthogonal matrix Q1 used in
+*>          On entry, if COMPQ = 'V', the orthogonal matrix Q1 used in
 *>          the reduction of (A,B) to generalized Hessenberg form.
-*>          On exit, if COMPZ = 'I', the orthogonal matrix of left Schur
-*>          vectors of (H,T), and if COMPZ = 'V', the orthogonal matrix
+*>          On exit, if COMPQ = 'I', the orthogonal matrix of left Schur
+*>          vectors of (H,T), and if COMPQ = 'V', the orthogonal matrix
 *>          of left Schur vectors of (A,B).
-*>          Not referenced if COMPZ = 'N'.
+*>          Not referenced if COMPQ = 'N'.
 *> \endverbatim
 *>
 *> \param[in] LDQ
@@ -41601,12 +42062,12 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date November 2013
+*> \date June 2016
 *
 *> \ingroup doubleGEcomputational
 *
@@ -41628,10 +42089,10 @@
      $                   ALPHAR, ALPHAI, BETA, Q, LDQ, Z, LDZ, WORK,
      $                   LWORK, INFO )
 *
-*  -- LAPACK computational routine (version 3.5.0) --
+*  -- LAPACK computational routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     November 2013
+*     June 2016
 *
 *     .. Scalar Arguments ..
       CHARACTER          COMPQ, COMPZ, JOB
@@ -42084,7 +42545,7 @@
      $                  S2, WR, WR2, WI )
 *
             IF ( ABS( (WR/S1)*T( ILAST, ILAST ) - H( ILAST, ILAST ) )
-     $         .GT. ABS( (WR2/S2)*T( ILAST, ILAST ) 
+     $         .GT. ABS( (WR2/S2)*T( ILAST, ILAST )
      $         - H( ILAST, ILAST ) ) ) THEN
                TEMP = WR
                WR = WR2
@@ -42693,18 +43154,18 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DHSEIN + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dhsein.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dhsein.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dhsein.f"> 
+*> Download DHSEIN + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dhsein.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dhsein.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dhsein.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
@@ -42712,7 +43173,7 @@
 *       SUBROUTINE DHSEIN( SIDE, EIGSRC, INITV, SELECT, N, H, LDH, WR, WI,
 *                          VL, LDVL, VR, LDVR, MM, M, WORK, IFAILL,
 *                          IFAILR, INFO )
-* 
+*
 *       .. Scalar Arguments ..
 *       CHARACTER          EIGSRC, INITV, SIDE
 *       INTEGER            INFO, LDH, LDVL, LDVR, M, MM, N
@@ -42723,7 +43184,7 @@
 *       DOUBLE PRECISION   H( LDH, * ), VL( LDVL, * ), VR( LDVR, * ),
 *      $                   WI( * ), WORK( * ), WR( * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -42930,12 +43391,12 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date November 2013
+*> \date December 2016
 *
 *> \ingroup doubleOTHERcomputational
 *
@@ -42954,10 +43415,10 @@
      $                   VL, LDVL, VR, LDVR, MM, M, WORK, IFAILL,
      $                   IFAILR, INFO )
 *
-*  -- LAPACK computational routine (version 3.5.0) --
+*  -- LAPACK computational routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     November 2013
+*     December 2016
 *
 *     .. Scalar Arguments ..
       CHARACTER          EIGSRC, INITV, SIDE
@@ -43223,25 +43684,25 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DHSEQR + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dhseqr.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dhseqr.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dhseqr.f"> 
+*> Download DHSEQR + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dhseqr.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dhseqr.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dhseqr.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       SUBROUTINE DHSEQR( JOB, COMPZ, N, ILO, IHI, H, LDH, WR, WI, Z,
 *                          LDZ, WORK, LWORK, INFO )
-* 
+*
 *       .. Scalar Arguments ..
 *       INTEGER            IHI, ILO, INFO, LDH, LDZ, LWORK, N
 *       CHARACTER          COMPZ, JOB
@@ -43250,7 +43711,7 @@
 *       DOUBLE PRECISION   H( LDH, * ), WI( * ), WORK( * ), WR( * ),
 *      $                   Z( LDZ, * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -43449,12 +43910,12 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date November 2011
+*> \date December 2016
 *
 *> \ingroup doubleOTHERcomputational
 *
@@ -43537,10 +43998,10 @@
       SUBROUTINE DHSEQR( JOB, COMPZ, N, ILO, IHI, H, LDH, WR, WI, Z,
      $                   LDZ, WORK, LWORK, INFO )
 *
-*  -- LAPACK computational routine (version 3.4.0) --
+*  -- LAPACK computational routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     November 2011
+*     December 2016
 *
 *     .. Scalar Arguments ..
       INTEGER            IHI, ILO, INFO, LDH, LDZ, LWORK, N
@@ -43739,28 +44200,28 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DISNAN + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/disnan.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/disnan.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/disnan.f"> 
+*> Download DISNAN + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/disnan.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/disnan.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/disnan.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       LOGICAL FUNCTION DISNAN( DIN )
-* 
+*
 *       .. Scalar Arguments ..
 *       DOUBLE PRECISION   DIN
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -43784,22 +44245,22 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date September 2012
+*> \date December 2016
 *
-*> \ingroup auxOTHERauxiliary
+*> \ingroup OTHERauxiliary
 *
 *  =====================================================================
       LOGICAL FUNCTION DISNAN( DIN )
 *
-*  -- LAPACK auxiliary routine (version 3.4.2) --
+*  -- LAPACK auxiliary routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     September 2012
+*     December 2016
 *
 *     .. Scalar Arguments ..
       DOUBLE PRECISION   DIN
@@ -43819,28 +44280,28 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DLABAD + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dlabad.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dlabad.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dlabad.f"> 
+*> Download DLABAD + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dlabad.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dlabad.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dlabad.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       SUBROUTINE DLABAD( SMALL, LARGE )
-* 
+*
 *       .. Scalar Arguments ..
 *       DOUBLE PRECISION   LARGE, SMALL
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -43879,22 +44340,22 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date November 2011
+*> \date December 2016
 *
-*> \ingroup auxOTHERauxiliary
+*> \ingroup OTHERauxiliary
 *
 *  =====================================================================
       SUBROUTINE DLABAD( SMALL, LARGE )
 *
-*  -- LAPACK auxiliary routine (version 3.4.0) --
+*  -- LAPACK auxiliary routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     November 2011
+*     December 2016
 *
 *     .. Scalar Arguments ..
       DOUBLE PRECISION   LARGE, SMALL
@@ -43924,25 +44385,25 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DLABRD + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dlabrd.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dlabrd.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dlabrd.f"> 
+*> Download DLABRD + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dlabrd.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dlabrd.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dlabrd.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       SUBROUTINE DLABRD( M, N, NB, A, LDA, D, E, TAUQ, TAUP, X, LDX, Y,
 *                          LDY )
-* 
+*
 *       .. Scalar Arguments ..
 *       INTEGER            LDA, LDX, LDY, M, N, NB
 *       ..
@@ -43950,7 +44411,7 @@
 *       DOUBLE PRECISION   A( LDA, * ), D( * ), E( * ), TAUP( * ),
 *      $                   TAUQ( * ), X( LDX, * ), Y( LDY, * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -44073,12 +44534,12 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date September 2012
+*> \date December 2016
 *
 *> \ingroup doubleOTHERauxiliary
 *
@@ -44132,10 +44593,10 @@
       SUBROUTINE DLABRD( M, N, NB, A, LDA, D, E, TAUQ, TAUP, X, LDX, Y,
      $                   LDY )
 *
-*  -- LAPACK auxiliary routine (version 3.4.2) --
+*  -- LAPACK auxiliary routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     September 2012
+*     December 2016
 *
 *     .. Scalar Arguments ..
       INTEGER            LDA, LDX, LDY, M, N, NB
@@ -44305,24 +44766,24 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DLACN2 + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dlacn2.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dlacn2.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dlacn2.f"> 
+*> Download DLACN2 + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dlacn2.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dlacn2.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dlacn2.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       SUBROUTINE DLACN2( N, V, X, ISGN, EST, KASE, ISAVE )
-* 
+*
 *       .. Scalar Arguments ..
 *       INTEGER            KASE, N
 *       DOUBLE PRECISION   EST
@@ -44331,7 +44792,7 @@
 *       INTEGER            ISGN( * ), ISAVE( 3 )
 *       DOUBLE PRECISION   V( * ), X( * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -44378,7 +44839,7 @@
 *>          EST is DOUBLE PRECISION
 *>         On entry with KASE = 1 or 2 and ISAVE(1) = 3, EST should be
 *>         unchanged from the previous call to DLACN2.
-*>         On exit, EST is an estimate (a lower bound) for norm(A). 
+*>         On exit, EST is an estimate (a lower bound) for norm(A).
 *> \endverbatim
 *>
 *> \param[in,out] KASE
@@ -44399,12 +44860,12 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date September 2012
+*> \date December 2016
 *
 *> \ingroup doubleOTHERauxiliary
 *
@@ -44439,10 +44900,10 @@
 *  =====================================================================
       SUBROUTINE DLACN2( N, V, X, ISGN, EST, KASE, ISAVE )
 *
-*  -- LAPACK auxiliary routine (version 3.4.2) --
+*  -- LAPACK auxiliary routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     September 2012
+*     December 2016
 *
 *     .. Scalar Arguments ..
       INTEGER            KASE, N
@@ -44599,24 +45060,24 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DLACON + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dlacon.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dlacon.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dlacon.f"> 
+*> Download DLACON + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dlacon.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dlacon.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dlacon.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       SUBROUTINE DLACON( N, V, X, ISGN, EST, KASE )
-* 
+*
 *       .. Scalar Arguments ..
 *       INTEGER            KASE, N
 *       DOUBLE PRECISION   EST
@@ -44625,7 +45086,7 @@
 *       INTEGER            ISGN( * )
 *       DOUBLE PRECISION   V( * ), X( * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -44672,7 +45133,7 @@
 *>          EST is DOUBLE PRECISION
 *>         On entry with KASE = 1 or 2 and JUMP = 3, EST should be
 *>         unchanged from the previous call to DLACON.
-*>         On exit, EST is an estimate (a lower bound) for norm(A). 
+*>         On exit, EST is an estimate (a lower bound) for norm(A).
 *> \endverbatim
 *>
 *> \param[in,out] KASE
@@ -44687,12 +45148,12 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date September 2012
+*> \date December 2016
 *
 *> \ingroup doubleOTHERauxiliary
 *
@@ -44712,10 +45173,10 @@
 *  =====================================================================
       SUBROUTINE DLACON( N, V, X, ISGN, EST, KASE )
 *
-*  -- LAPACK auxiliary routine (version 3.4.2) --
+*  -- LAPACK auxiliary routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     September 2012
+*     December 2016
 *
 *     .. Scalar Arguments ..
       INTEGER            KASE, N
@@ -44874,24 +45335,24 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DLACPY + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dlacpy.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dlacpy.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dlacpy.f"> 
+*> Download DLACPY + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dlacpy.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dlacpy.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dlacpy.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       SUBROUTINE DLACPY( UPLO, M, N, A, LDA, B, LDB )
-* 
+*
 *       .. Scalar Arguments ..
 *       CHARACTER          UPLO
 *       INTEGER            LDA, LDB, M, N
@@ -44899,7 +45360,7 @@
 *       .. Array Arguments ..
 *       DOUBLE PRECISION   A( LDA, * ), B( LDB, * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -44963,22 +45424,22 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date September 2012
+*> \date December 2016
 *
-*> \ingroup auxOTHERauxiliary
+*> \ingroup OTHERauxiliary
 *
 *  =====================================================================
       SUBROUTINE DLACPY( UPLO, M, N, A, LDA, B, LDB )
 *
-*  -- LAPACK auxiliary routine (version 3.4.2) --
+*  -- LAPACK auxiliary routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     September 2012
+*     December 2016
 *
 *     .. Scalar Arguments ..
       CHARACTER          UPLO
@@ -45030,28 +45491,28 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DLADIV + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dladiv.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dladiv.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dladiv.f"> 
+*> Download DLADIV + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dladiv.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dladiv.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dladiv.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       SUBROUTINE DLADIV( A, B, C, D, P, Q )
-* 
+*
 *       .. Scalar Arguments ..
 *       DOUBLE PRECISION   A, B, C, D, P, Q
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -45107,19 +45568,19 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
 *> \date January 2013
 *
-*> \ingroup auxOTHERauxiliary
+*> \ingroup doubleOTHERauxiliary
 *
 *  =====================================================================
       SUBROUTINE DLADIV( A, B, C, D, P, Q )
 *
-*  -- LAPACK auxiliary routine (version 3.5.0) --
+*  -- LAPACK auxiliary routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
 *     January 2013
@@ -45160,12 +45621,12 @@
       AB = MAX( ABS(A), ABS(B) )
       CD = MAX( ABS(C), ABS(D) )
       S = 1.0D0
-      
+
       OV = DLAMCH( 'Overflow threshold' )
       UN = DLAMCH( 'Safe minimum' )
       EPS = DLAMCH( 'Epsilon' )
       BE = BS / (EPS*EPS)
-      
+
       IF( AB >= HALF*OV ) THEN
          AA = HALF * AA
          BB = HALF * BB
@@ -45201,11 +45662,12 @@
 *
       END
 
-      
+*> \ingroup doubleOTHERauxiliary
+
 
       SUBROUTINE DLADIV1( A, B, C, D, P, Q )
 *
-*  -- LAPACK auxiliary routine (version 3.5.0) --
+*  -- LAPACK auxiliary routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
 *     January 2013
@@ -45241,9 +45703,11 @@
 *
       END
 
+*> \ingroup doubleOTHERauxiliary
+
       DOUBLE PRECISION FUNCTION DLADIV2( A, B, C, D, R, T )
 *
-*  -- LAPACK auxiliary routine (version 3.5.0) --
+*  -- LAPACK auxiliary routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
 *     January 2013
@@ -45265,7 +45729,7 @@
 *
       IF( R.NE.ZERO ) THEN
          BR = B * R
-         if( BR.NE.ZERO ) THEN
+         IF( BR.NE.ZERO ) THEN
             DLADIV2 = (A + BR) * T
          ELSE
             DLADIV2 = A * T + (B * T) * R
@@ -45283,28 +45747,28 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DLAE2 + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dlae2.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dlae2.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dlae2.f"> 
+*> Download DLAE2 + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dlae2.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dlae2.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dlae2.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       SUBROUTINE DLAE2( A, B, C, RT1, RT2 )
-* 
+*
 *       .. Scalar Arguments ..
 *       DOUBLE PRECISION   A, B, C, RT1, RT2
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -45354,14 +45818,14 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date September 2012
+*> \date December 2016
 *
-*> \ingroup auxOTHERauxiliary
+*> \ingroup OTHERauxiliary
 *
 *> \par Further Details:
 *  =====================
@@ -45383,10 +45847,10 @@
 *  =====================================================================
       SUBROUTINE DLAE2( A, B, C, RT1, RT2 )
 *
-*  -- LAPACK auxiliary routine (version 3.4.2) --
+*  -- LAPACK auxiliary routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     September 2012
+*     December 2016
 *
 *     .. Scalar Arguments ..
       DOUBLE PRECISION   A, B, C, RT1, RT2
@@ -45468,18 +45932,18 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DLAEBZ + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dlaebz.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dlaebz.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dlaebz.f"> 
+*> Download DLAEBZ + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dlaebz.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dlaebz.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dlaebz.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
@@ -45487,7 +45951,7 @@
 *       SUBROUTINE DLAEBZ( IJOB, NITMAX, N, MMAX, MINP, NBMIN, ABSTOL,
 *                          RELTOL, PIVMIN, D, E, E2, NVAL, AB, C, MOUT,
 *                          NAB, WORK, IWORK, INFO )
-* 
+*
 *       .. Scalar Arguments ..
 *       INTEGER            IJOB, INFO, MINP, MMAX, MOUT, N, NBMIN, NITMAX
 *       DOUBLE PRECISION   ABSTOL, PIVMIN, RELTOL
@@ -45497,7 +45961,7 @@
 *       DOUBLE PRECISION   AB( MMAX, * ), C( * ), D( * ), E( * ), E2( * ),
 *      $                   WORK( * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -45734,14 +46198,14 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date September 2012
+*> \date December 2016
 *
-*> \ingroup auxOTHERauxiliary
+*> \ingroup OTHERauxiliary
 *
 *> \par Further Details:
 *  =====================
@@ -45785,10 +46249,10 @@
      $                   RELTOL, PIVMIN, D, E, E2, NVAL, AB, C, MOUT,
      $                   NAB, WORK, IWORK, INFO )
 *
-*  -- LAPACK auxiliary routine (version 3.4.2) --
+*  -- LAPACK auxiliary routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     September 2012
+*     December 2016
 *
 *     .. Scalar Arguments ..
       INTEGER            IJOB, INFO, MINP, MMAX, MOUT, N, NBMIN, NITMAX
@@ -46117,25 +46581,25 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DLAED0 + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dlaed0.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dlaed0.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dlaed0.f"> 
+*> Download DLAED0 + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dlaed0.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dlaed0.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dlaed0.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       SUBROUTINE DLAED0( ICOMPQ, QSIZ, N, D, E, Q, LDQ, QSTORE, LDQS,
 *                          WORK, IWORK, INFO )
-* 
+*
 *       .. Scalar Arguments ..
 *       INTEGER            ICOMPQ, INFO, LDQ, LDQS, N, QSIZ
 *       ..
@@ -46144,7 +46608,7 @@
 *       DOUBLE PRECISION   D( * ), E( * ), Q( LDQ, * ), QSTORE( LDQS, * ),
 *      $                   WORK( * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -46268,12 +46732,12 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date September 2012
+*> \date December 2016
 *
 *> \ingroup auxOTHERcomputational
 *
@@ -46287,10 +46751,10 @@
       SUBROUTINE DLAED0( ICOMPQ, QSIZ, N, D, E, Q, LDQ, QSTORE, LDQS,
      $                   WORK, IWORK, INFO )
 *
-*  -- LAPACK computational routine (version 3.4.2) --
+*  -- LAPACK computational routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     September 2012
+*     December 2016
 *
 *     .. Scalar Arguments ..
       INTEGER            ICOMPQ, INFO, LDQ, LDQS, N, QSIZ
@@ -46551,25 +47015,25 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DLAED1 + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dlaed1.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dlaed1.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dlaed1.f"> 
+*> Download DLAED1 + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dlaed1.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dlaed1.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dlaed1.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       SUBROUTINE DLAED1( N, D, Q, LDQ, INDXQ, RHO, CUTPNT, WORK, IWORK,
 *                          INFO )
-* 
+*
 *       .. Scalar Arguments ..
 *       INTEGER            CUTPNT, INFO, LDQ, N
 *       DOUBLE PRECISION   RHO
@@ -46578,7 +47042,7 @@
 *       INTEGER            INDXQ( * ), IWORK( * )
 *       DOUBLE PRECISION   D( * ), Q( LDQ, * ), WORK( * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -46603,7 +47067,7 @@
 *>
 *>       The first stage consists of deflating the size of the problem
 *>       when there are multiple eigenvalues or if there is a zero in
-*>       the Z vector.  For each such occurence the dimension of the
+*>       the Z vector.  For each such occurrence the dimension of the
 *>       secular equation problem is reduced by one.  This stage is
 *>       performed by the routine DLAED2.
 *>
@@ -46692,12 +47156,12 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date September 2012
+*> \date June 2016
 *
 *> \ingroup auxOTHERcomputational
 *
@@ -46712,10 +47176,10 @@
       SUBROUTINE DLAED1( N, D, Q, LDQ, INDXQ, RHO, CUTPNT, WORK, IWORK,
      $                   INFO )
 *
-*  -- LAPACK computational routine (version 3.4.2) --
+*  -- LAPACK computational routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     September 2012
+*     June 2016
 *
 *     .. Scalar Arguments ..
       INTEGER            CUTPNT, INFO, LDQ, N
@@ -46825,25 +47289,25 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DLAED2 + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dlaed2.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dlaed2.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dlaed2.f"> 
+*> Download DLAED2 + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dlaed2.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dlaed2.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dlaed2.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       SUBROUTINE DLAED2( K, N, N1, D, Q, LDQ, INDXQ, RHO, Z, DLAMDA, W,
 *                          Q2, INDX, INDXC, INDXP, COLTYP, INFO )
-* 
+*
 *       .. Scalar Arguments ..
 *       INTEGER            INFO, K, LDQ, N, N1
 *       DOUBLE PRECISION   RHO
@@ -46854,7 +47318,7 @@
 *       DOUBLE PRECISION   D( * ), DLAMDA( * ), Q( LDQ, * ), Q2( * ),
 *      $                   W( * ), Z( * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -47015,12 +47479,12 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date September 2012
+*> \date December 2016
 *
 *> \ingroup auxOTHERcomputational
 *
@@ -47035,10 +47499,10 @@
       SUBROUTINE DLAED2( K, N, N1, D, Q, LDQ, INDXQ, RHO, Z, DLAMDA, W,
      $                   Q2, INDX, INDXC, INDXP, COLTYP, INFO )
 *
-*  -- LAPACK computational routine (version 3.4.2) --
+*  -- LAPACK computational routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     September 2012
+*     December 2016
 *
 *     .. Scalar Arguments ..
       INTEGER            INFO, K, LDQ, N, N1
@@ -47343,10 +47807,10 @@
 *     into the last N - K slots of D and Q respectively.
 *
       IF( K.LT.N ) THEN
-         CALL DLACPY( 'A', N, CTOT( 4 ), Q2( IQ1 ), N, 
+         CALL DLACPY( 'A', N, CTOT( 4 ), Q2( IQ1 ), N,
      $                Q( 1, K+1 ), LDQ )
          CALL DCOPY( N-K, Z( K+1 ), 1, D( K+1 ), 1 )
-      END IF         
+      END IF
 *
 *     Copy CTOT into COLTYP for referencing in DLAED3.
 *
@@ -47364,25 +47828,25 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DLAED3 + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dlaed3.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dlaed3.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dlaed3.f"> 
+*> Download DLAED3 + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dlaed3.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dlaed3.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dlaed3.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       SUBROUTINE DLAED3( K, N, N1, D, Q, LDQ, RHO, DLAMDA, Q2, INDX,
 *                          CTOT, W, S, INFO )
-* 
+*
 *       .. Scalar Arguments ..
 *       INTEGER            INFO, K, LDQ, N, N1
 *       DOUBLE PRECISION   RHO
@@ -47392,7 +47856,7 @@
 *       DOUBLE PRECISION   D( * ), DLAMDA( * ), Q( LDQ, * ), Q2( * ),
 *      $                   S( * ), W( * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -47527,12 +47991,12 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date September 2012
+*> \date December 2016
 *
 *> \ingroup auxOTHERcomputational
 *
@@ -47547,10 +48011,10 @@
       SUBROUTINE DLAED3( K, N, N1, D, Q, LDQ, RHO, DLAMDA, Q2, INDX,
      $                   CTOT, W, S, INFO )
 *
-*  -- LAPACK computational routine (version 3.4.2) --
+*  -- LAPACK computational routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     September 2012
+*     December 2016
 *
 *     .. Scalar Arguments ..
       INTEGER            INFO, K, LDQ, N, N1
@@ -47717,24 +48181,24 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DLAED4 + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dlaed4.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dlaed4.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dlaed4.f"> 
+*> Download DLAED4 + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dlaed4.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dlaed4.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dlaed4.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       SUBROUTINE DLAED4( N, I, D, Z, DELTA, RHO, DLAM, INFO )
-* 
+*
 *       .. Scalar Arguments ..
 *       INTEGER            I, INFO, N
 *       DOUBLE PRECISION   DLAM, RHO
@@ -47742,7 +48206,7 @@
 *       .. Array Arguments ..
 *       DOUBLE PRECISION   D( * ), DELTA( * ), Z( * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -47842,12 +48306,12 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date September 2012
+*> \date December 2016
 *
 *> \ingroup auxOTHERcomputational
 *
@@ -47860,10 +48324,10 @@
 *  =====================================================================
       SUBROUTINE DLAED4( N, I, D, Z, DELTA, RHO, DLAM, INFO )
 *
-*  -- LAPACK computational routine (version 3.4.2) --
+*  -- LAPACK computational routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     September 2012
+*     December 2016
 *
 *     .. Scalar Arguments ..
       INTEGER            I, INFO, N
@@ -48634,24 +49098,24 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DLAED5 + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dlaed5.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dlaed5.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dlaed5.f"> 
+*> Download DLAED5 + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dlaed5.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dlaed5.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dlaed5.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       SUBROUTINE DLAED5( I, D, Z, DELTA, RHO, DLAM )
-* 
+*
 *       .. Scalar Arguments ..
 *       INTEGER            I
 *       DOUBLE PRECISION   DLAM, RHO
@@ -48659,7 +49123,7 @@
 *       .. Array Arguments ..
 *       DOUBLE PRECISION   D( 2 ), DELTA( 2 ), Z( 2 )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -48722,12 +49186,12 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date September 2012
+*> \date December 2016
 *
 *> \ingroup auxOTHERcomputational
 *
@@ -48740,10 +49204,10 @@
 *  =====================================================================
       SUBROUTINE DLAED5( I, D, Z, DELTA, RHO, DLAM )
 *
-*  -- LAPACK computational routine (version 3.4.2) --
+*  -- LAPACK computational routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     September 2012
+*     December 2016
 *
 *     .. Scalar Arguments ..
       INTEGER            I
@@ -48823,24 +49287,24 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DLAED6 + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dlaed6.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dlaed6.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dlaed6.f"> 
+*> Download DLAED6 + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dlaed6.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dlaed6.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dlaed6.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       SUBROUTINE DLAED6( KNITER, ORGATI, RHO, D, Z, FINIT, TAU, INFO )
-* 
+*
 *       .. Scalar Arguments ..
 *       LOGICAL            ORGATI
 *       INTEGER            INFO, KNITER
@@ -48849,7 +49313,7 @@
 *       .. Array Arguments ..
 *       DOUBLE PRECISION   D( 3 ), Z( 3 )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -48931,12 +49395,12 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date September 2012
+*> \date December 2016
 *
 *> \ingroup auxOTHERcomputational
 *
@@ -48961,10 +49425,10 @@
 *  =====================================================================
       SUBROUTINE DLAED6( KNITER, ORGATI, RHO, D, Z, FINIT, TAU, INFO )
 *
-*  -- LAPACK computational routine (version 3.4.2) --
+*  -- LAPACK computational routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     September 2012
+*     December 2016
 *
 *     .. Scalar Arguments ..
       LOGICAL            ORGATI
@@ -48996,7 +49460,7 @@
       INTEGER            I, ITER, NITER
       DOUBLE PRECISION   A, B, BASE, C, DDF, DF, EPS, ERRETM, ETA, F,
      $                   FC, SCLFAC, SCLINV, SMALL1, SMALL2, SMINV1,
-     $                   SMINV2, TEMP, TEMP1, TEMP2, TEMP3, TEMP4, 
+     $                   SMINV2, TEMP, TEMP1, TEMP2, TEMP3, TEMP4,
      $                   LBD, UBD
 *     ..
 *     .. Intrinsic Functions ..
@@ -49016,7 +49480,7 @@
       IF( FINIT .LT. ZERO )THEN
          LBD = ZERO
       ELSE
-         UBD = ZERO 
+         UBD = ZERO
       END IF
 *
       NITER = 1
@@ -49184,7 +49648,7 @@
 *
          TAU = TAU + ETA
          IF( TAU .LT. LBD .OR. TAU .GT. UBD )
-     $      TAU = ( LBD + UBD )/TWO 
+     $      TAU = ( LBD + UBD )/TWO
 *
          FC = ZERO
          ERRETM = ZERO
@@ -49202,13 +49666,14 @@
                DF = DF + TEMP2
                DDF = DDF + TEMP3
             ELSE
-              GO TO 60
+               GO TO 60
             END IF
    40    CONTINUE
          F = FINIT + TAU*FC
          ERRETM = EIGHT*( ABS( FINIT )+ABS( TAU )*ERRETM ) +
      $            ABS( TAU )*DF
-         IF( ABS( F ).LE.EPS*ERRETM )
+         IF( ( ABS( F ).LE.FOUR*EPS*ERRETM ) .OR.
+     $      ( (UBD-LBD).LE.FOUR*EPS*ABS(TAU) )  )
      $      GO TO 60
          IF( F .LE. ZERO )THEN
             LBD = TAU
@@ -49232,18 +49697,18 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DLAED7 + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dlaed7.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dlaed7.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dlaed7.f"> 
+*> Download DLAED7 + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dlaed7.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dlaed7.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dlaed7.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
@@ -49252,7 +49717,7 @@
 *                          LDQ, INDXQ, RHO, CUTPNT, QSTORE, QPTR, PRMPTR,
 *                          PERM, GIVPTR, GIVCOL, GIVNUM, WORK, IWORK,
 *                          INFO )
-* 
+*
 *       .. Scalar Arguments ..
 *       INTEGER            CURLVL, CURPBM, CUTPNT, ICOMPQ, INFO, LDQ, N,
 *      $                   QSIZ, TLVLS
@@ -49264,7 +49729,7 @@
 *       DOUBLE PRECISION   D( * ), GIVNUM( 2, * ), Q( LDQ, * ),
 *      $                   QSTORE( * ), WORK( * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -49289,7 +49754,7 @@
 *>
 *>       The first stage consists of deflating the size of the problem
 *>       when there are multiple eigenvalues or if there is a zero in
-*>       the Z vector.  For each such occurence the dimension of the
+*>       the Z vector.  For each such occurrence the dimension of the
 *>       secular equation problem is reduced by one.  This stage is
 *>       performed by the routine DLAED8.
 *>
@@ -49469,12 +49934,12 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date September 2012
+*> \date June 2016
 *
 *> \ingroup auxOTHERcomputational
 *
@@ -49490,10 +49955,10 @@
      $                   PERM, GIVPTR, GIVCOL, GIVNUM, WORK, IWORK,
      $                   INFO )
 *
-*  -- LAPACK computational routine (version 3.4.2) --
+*  -- LAPACK computational routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     September 2012
+*     June 2016
 *
 *     .. Scalar Arguments ..
       INTEGER            CURLVL, CURPBM, CUTPNT, ICOMPQ, INFO, LDQ, N,
@@ -49534,7 +49999,7 @@
       ELSE IF( N.LT.0 ) THEN
          INFO = -2
       ELSE IF( ICOMPQ.EQ.1 .AND. QSIZ.LT.N ) THEN
-         INFO = -4
+         INFO = -3
       ELSE IF( LDQ.LT.MAX( 1, N ) ) THEN
          INFO = -9
       ELSE IF( MIN( 1, N ).GT.CUTPNT .OR. N.LT.CUTPNT ) THEN
@@ -49639,18 +50104,18 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DLAED8 + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dlaed8.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dlaed8.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dlaed8.f"> 
+*> Download DLAED8 + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dlaed8.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dlaed8.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dlaed8.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
@@ -49658,7 +50123,7 @@
 *       SUBROUTINE DLAED8( ICOMPQ, K, N, QSIZ, D, Q, LDQ, INDXQ, RHO,
 *                          CUTPNT, Z, DLAMDA, Q2, LDQ2, W, PERM, GIVPTR,
 *                          GIVCOL, GIVNUM, INDXP, INDX, INFO )
-* 
+*
 *       .. Scalar Arguments ..
 *       INTEGER            CUTPNT, GIVPTR, ICOMPQ, INFO, K, LDQ, LDQ2, N,
 *      $                   QSIZ
@@ -49670,7 +50135,7 @@
 *       DOUBLE PRECISION   D( * ), DLAMDA( * ), GIVNUM( 2, * ),
 *      $                   Q( LDQ, * ), Q2( LDQ2, * ), W( * ), Z( * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -49860,12 +50325,12 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date September 2012
+*> \date December 2016
 *
 *> \ingroup auxOTHERcomputational
 *
@@ -49880,10 +50345,10 @@
      $                   CUTPNT, Z, DLAMDA, Q2, LDQ2, W, PERM, GIVPTR,
      $                   GIVCOL, GIVNUM, INDXP, INDX, INFO )
 *
-*  -- LAPACK computational routine (version 3.4.2) --
+*  -- LAPACK computational routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     September 2012
+*     December 2016
 *
 *     .. Scalar Arguments ..
       INTEGER            CUTPNT, GIVPTR, ICOMPQ, INFO, K, LDQ, LDQ2, N,
@@ -49945,8 +50410,8 @@
       END IF
 *
 *     Need to initialize GIVPTR to O here in case of quick exit
-*     to prevent an unspecified code behavior (usually sigfault) 
-*     when IWORK array on entry to *stedc is not zeroed 
+*     to prevent an unspecified code behavior (usually sigfault)
+*     when IWORK array on entry to *stedc is not zeroed
 *     (or at least some IWORK entries which used in *laed7 for GIVPTR).
 *
       GIVPTR = 0
@@ -50163,25 +50628,25 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DLAED9 + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dlaed9.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dlaed9.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dlaed9.f"> 
+*> Download DLAED9 + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dlaed9.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dlaed9.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dlaed9.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       SUBROUTINE DLAED9( K, KSTART, KSTOP, N, D, Q, LDQ, RHO, DLAMDA, W,
 *                          S, LDS, INFO )
-* 
+*
 *       .. Scalar Arguments ..
 *       INTEGER            INFO, K, KSTART, KSTOP, LDQ, LDS, N
 *       DOUBLE PRECISION   RHO
@@ -50190,7 +50655,7 @@
 *       DOUBLE PRECISION   D( * ), DLAMDA( * ), Q( LDQ, * ), S( LDS, * ),
 *      $                   W( * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -50298,12 +50763,12 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date September 2012
+*> \date December 2016
 *
 *> \ingroup auxOTHERcomputational
 *
@@ -50317,10 +50782,10 @@
       SUBROUTINE DLAED9( K, KSTART, KSTOP, N, D, Q, LDQ, RHO, DLAMDA, W,
      $                   S, LDS, INFO )
 *
-*  -- LAPACK computational routine (version 3.4.2) --
+*  -- LAPACK computational routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     September 2012
+*     December 2016
 *
 *     .. Scalar Arguments ..
       INTEGER            INFO, K, KSTART, KSTOP, LDQ, LDS, N
@@ -50457,25 +50922,25 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DLAEDA + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dlaeda.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dlaeda.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dlaeda.f"> 
+*> Download DLAEDA + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dlaeda.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dlaeda.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dlaeda.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       SUBROUTINE DLAEDA( N, TLVLS, CURLVL, CURPBM, PRMPTR, PERM, GIVPTR,
 *                          GIVCOL, GIVNUM, Q, QPTR, Z, ZTEMP, INFO )
-* 
+*
 *       .. Scalar Arguments ..
 *       INTEGER            CURLVL, CURPBM, INFO, N, TLVLS
 *       ..
@@ -50484,7 +50949,7 @@
 *      $                   PRMPTR( * ), QPTR( * )
 *       DOUBLE PRECISION   GIVNUM( 2, * ), Q( * ), Z( * ), ZTEMP( * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -50602,12 +51067,12 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date September 2012
+*> \date December 2016
 *
 *> \ingroup auxOTHERcomputational
 *
@@ -50621,10 +51086,10 @@
       SUBROUTINE DLAEDA( N, TLVLS, CURLVL, CURPBM, PRMPTR, PERM, GIVPTR,
      $                   GIVCOL, GIVNUM, Q, QPTR, Z, ZTEMP, INFO )
 *
-*  -- LAPACK computational routine (version 3.4.2) --
+*  -- LAPACK computational routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     September 2012
+*     December 2016
 *
 *     .. Scalar Arguments ..
       INTEGER            CURLVL, CURPBM, INFO, N, TLVLS
@@ -50765,25 +51230,25 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DLAEIN + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dlaein.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dlaein.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dlaein.f"> 
+*> Download DLAEIN + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dlaein.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dlaein.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dlaein.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       SUBROUTINE DLAEIN( RIGHTV, NOINIT, N, H, LDH, WR, WI, VR, VI, B,
 *                          LDB, WORK, EPS3, SMLNUM, BIGNUM, INFO )
-* 
+*
 *       .. Scalar Arguments ..
 *       LOGICAL            NOINIT, RIGHTV
 *       INTEGER            INFO, LDB, LDH, N
@@ -50793,7 +51258,7 @@
 *       DOUBLE PRECISION   B( LDB, * ), H( LDH, * ), VI( * ), VR( * ),
 *      $                   WORK( * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -50922,12 +51387,12 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date September 2012
+*> \date December 2016
 *
 *> \ingroup doubleOTHERauxiliary
 *
@@ -50935,10 +51400,10 @@
       SUBROUTINE DLAEIN( RIGHTV, NOINIT, N, H, LDH, WR, WI, VR, VI, B,
      $                   LDB, WORK, EPS3, SMLNUM, BIGNUM, INFO )
 *
-*  -- LAPACK auxiliary routine (version 3.4.2) --
+*  -- LAPACK auxiliary routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     September 2012
+*     December 2016
 *
 *     .. Scalar Arguments ..
       LOGICAL            NOINIT, RIGHTV
@@ -51397,28 +51862,28 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DLAEV2 + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dlaev2.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dlaev2.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dlaev2.f"> 
+*> Download DLAEV2 + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dlaev2.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dlaev2.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dlaev2.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       SUBROUTINE DLAEV2( A, B, C, RT1, RT2, CS1, SN1 )
-* 
+*
 *       .. Scalar Arguments ..
 *       DOUBLE PRECISION   A, B, C, CS1, RT1, RT2, SN1
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -51484,14 +51949,14 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date September 2012
+*> \date December 2016
 *
-*> \ingroup auxOTHERauxiliary
+*> \ingroup OTHERauxiliary
 *
 *> \par Further Details:
 *  =====================
@@ -51515,10 +51980,10 @@
 *  =====================================================================
       SUBROUTINE DLAEV2( A, B, C, RT1, RT2, CS1, SN1 )
 *
-*  -- LAPACK auxiliary routine (version 3.4.2) --
+*  -- LAPACK auxiliary routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     September 2012
+*     December 2016
 *
 *     .. Scalar Arguments ..
       DOUBLE PRECISION   A, B, C, CS1, RT1, RT2, SN1
@@ -51635,25 +52100,25 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DLAEXC + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dlaexc.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dlaexc.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dlaexc.f"> 
+*> Download DLAEXC + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dlaexc.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dlaexc.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dlaexc.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       SUBROUTINE DLAEXC( WANTQ, N, T, LDT, Q, LDQ, J1, N1, N2, WORK,
 *                          INFO )
-* 
+*
 *       .. Scalar Arguments ..
 *       LOGICAL            WANTQ
 *       INTEGER            INFO, J1, LDQ, LDT, N, N1, N2
@@ -51661,7 +52126,7 @@
 *       .. Array Arguments ..
 *       DOUBLE PRECISION   Q( LDQ, * ), T( LDT, * ), WORK( * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -51758,12 +52223,12 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date September 2012
+*> \date December 2016
 *
 *> \ingroup doubleOTHERauxiliary
 *
@@ -51771,10 +52236,10 @@
       SUBROUTINE DLAEXC( WANTQ, N, T, LDT, Q, LDQ, J1, N1, N2, WORK,
      $                   INFO )
 *
-*  -- LAPACK auxiliary routine (version 3.4.2) --
+*  -- LAPACK auxiliary routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     September 2012
+*     December 2016
 *
 *     .. Scalar Arguments ..
       LOGICAL            WANTQ
@@ -52071,25 +52536,25 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DLAG2 + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dlag2.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dlag2.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dlag2.f"> 
+*> Download DLAG2 + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dlag2.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dlag2.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dlag2.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       SUBROUTINE DLAG2( A, LDA, B, LDB, SAFMIN, SCALE1, SCALE2, WR1,
 *                         WR2, WI )
-* 
+*
 *       .. Scalar Arguments ..
 *       INTEGER            LDA, LDB
 *       DOUBLE PRECISION   SAFMIN, SCALE1, SCALE2, WI, WR1, WR2
@@ -52097,7 +52562,7 @@
 *       .. Array Arguments ..
 *       DOUBLE PRECISION   A( LDA, * ), B( LDB, * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -52168,7 +52633,7 @@
 *>          will always be positive.  If the eigenvalues are real, then
 *>          the first (real) eigenvalue is  WR1 / SCALE1 , but this may
 *>          overflow or underflow, and in fact, SCALE1 may be zero or
-*>          less than the underflow threshhold if the exact eigenvalue
+*>          less than the underflow threshold if the exact eigenvalue
 *>          is sufficiently large.
 *> \endverbatim
 *>
@@ -52181,7 +52646,7 @@
 *>          eigenvalues are real, then the second (real) eigenvalue is
 *>          WR2 / SCALE2 , but this may overflow or underflow, and in
 *>          fact, SCALE2 may be zero or less than the underflow
-*>          threshhold if the exact eigenvalue is sufficiently large.
+*>          threshold if the exact eigenvalue is sufficiently large.
 *> \endverbatim
 *>
 *> \param[out] WR1
@@ -52212,12 +52677,12 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date September 2012
+*> \date June 2016
 *
 *> \ingroup doubleOTHERauxiliary
 *
@@ -52225,10 +52690,10 @@
       SUBROUTINE DLAG2( A, LDA, B, LDB, SAFMIN, SCALE1, SCALE2, WR1,
      $                  WR2, WI )
 *
-*  -- LAPACK auxiliary routine (version 3.4.2) --
+*  -- LAPACK auxiliary routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     September 2012
+*     June 2016
 *
 *     .. Scalar Arguments ..
       INTEGER            LDA, LDB
@@ -52335,8 +52800,8 @@
 *     Note: the test of R in the following IF is to cover the case when
 *           DISCR is small and negative and is flushed to zero during
 *           the calculation of R.  On machines which have a consistent
-*           flush-to-zero threshhold and handle numbers above that
-*           threshhold correctly, it would not be necessary.
+*           flush-to-zero threshold and handle numbers above that
+*           threshold correctly, it would not be necessary.
 *
       IF( DISCR.GE.ZERO .OR. R.EQ.ZERO ) THEN
          SUM = PP + SIGN( R, PP )
@@ -52450,31 +52915,31 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DLAGS2 + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dlags2.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dlags2.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dlags2.f"> 
+*> Download DLAGS2 + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dlags2.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dlags2.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dlags2.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       SUBROUTINE DLAGS2( UPPER, A1, A2, A3, B1, B2, B3, CSU, SNU, CSV,
 *                          SNV, CSQ, SNQ )
-* 
+*
 *       .. Scalar Arguments ..
 *       LOGICAL            UPPER
 *       DOUBLE PRECISION   A1, A2, A3, B1, B2, B3, CSQ, CSU, CSV, SNQ,
 *      $                   SNU, SNV
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -52587,12 +53052,12 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date September 2012
+*> \date December 2016
 *
 *> \ingroup doubleOTHERauxiliary
 *
@@ -52600,10 +53065,10 @@
       SUBROUTINE DLAGS2( UPPER, A1, A2, A3, B1, B2, B3, CSU, SNU, CSV,
      $                   SNV, CSQ, SNQ )
 *
-*  -- LAPACK auxiliary routine (version 3.4.2) --
+*  -- LAPACK auxiliary routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     September 2012
+*     December 2016
 *
 *     .. Scalar Arguments ..
       LOGICAL            UPPER
@@ -52812,24 +53277,24 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DLAGTF + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dlagtf.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dlagtf.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dlagtf.f"> 
+*> Download DLAGTF + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dlagtf.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dlagtf.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dlagtf.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       SUBROUTINE DLAGTF( N, A, LAMBDA, B, C, TOL, D, IN, INFO )
-* 
+*
 *       .. Scalar Arguments ..
 *       INTEGER            INFO, N
 *       DOUBLE PRECISION   LAMBDA, TOL
@@ -52838,7 +53303,7 @@
 *       INTEGER            IN( * )
 *       DOUBLE PRECISION   A( * ), B( * ), C( * ), D( * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -52954,22 +53419,22 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date September 2012
+*> \date December 2016
 *
 *> \ingroup auxOTHERcomputational
 *
 *  =====================================================================
       SUBROUTINE DLAGTF( N, A, LAMBDA, B, C, TOL, D, IN, INFO )
 *
-*  -- LAPACK computational routine (version 3.4.2) --
+*  -- LAPACK computational routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     September 2012
+*     December 2016
 *
 *     .. Scalar Arguments ..
       INTEGER            INFO, N
@@ -53078,25 +53543,25 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DLAGTM + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dlagtm.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dlagtm.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dlagtm.f"> 
+*> Download DLAGTM + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dlagtm.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dlagtm.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dlagtm.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       SUBROUTINE DLAGTM( TRANS, N, NRHS, ALPHA, DL, D, DU, X, LDX, BETA,
 *                          B, LDB )
-* 
+*
 *       .. Scalar Arguments ..
 *       CHARACTER          TRANS
 *       INTEGER            LDB, LDX, N, NRHS
@@ -53106,7 +53571,7 @@
 *       DOUBLE PRECISION   B( LDB, * ), D( * ), DL( * ), DU( * ),
 *      $                   X( LDX, * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -53208,12 +53673,12 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date September 2012
+*> \date December 2016
 *
 *> \ingroup doubleOTHERauxiliary
 *
@@ -53221,10 +53686,10 @@
       SUBROUTINE DLAGTM( TRANS, N, NRHS, ALPHA, DL, D, DU, X, LDX, BETA,
      $                   B, LDB )
 *
-*  -- LAPACK auxiliary routine (version 3.4.2) --
+*  -- LAPACK auxiliary routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     September 2012
+*     December 2016
 *
 *     .. Scalar Arguments ..
       CHARACTER          TRANS
@@ -53356,24 +53821,24 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DLAGTS + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dlagts.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dlagts.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dlagts.f"> 
+*> Download DLAGTS + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dlagts.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dlagts.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dlagts.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       SUBROUTINE DLAGTS( JOB, N, A, B, C, D, IN, Y, TOL, INFO )
-* 
+*
 *       .. Scalar Arguments ..
 *       INTEGER            INFO, JOB, N
 *       DOUBLE PRECISION   TOL
@@ -53382,7 +53847,7 @@
 *       INTEGER            IN( * )
 *       DOUBLE PRECISION   A( * ), B( * ), C( * ), D( * ), Y( * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -53503,22 +53968,22 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date September 2012
+*> \date December 2016
 *
-*> \ingroup auxOTHERauxiliary
+*> \ingroup OTHERauxiliary
 *
 *  =====================================================================
       SUBROUTINE DLAGTS( JOB, N, A, B, C, D, IN, Y, TOL, INFO )
 *
-*  -- LAPACK auxiliary routine (version 3.4.2) --
+*  -- LAPACK auxiliary routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     September 2012
+*     December 2016
 *
 *     .. Scalar Arguments ..
       INTEGER            INFO, JOB, N
@@ -53739,25 +54204,25 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DLAGV2 + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dlagv2.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dlagv2.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dlagv2.f"> 
+*> Download DLAGV2 + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dlagv2.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dlagv2.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dlagv2.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       SUBROUTINE DLAGV2( A, LDA, B, LDB, ALPHAR, ALPHAI, BETA, CSL, SNL,
 *                          CSR, SNR )
-* 
+*
 *       .. Scalar Arguments ..
 *       INTEGER            LDA, LDB
 *       DOUBLE PRECISION   CSL, CSR, SNL, SNR
@@ -53766,7 +54231,7 @@
 *       DOUBLE PRECISION   A( LDA, * ), ALPHAI( 2 ), ALPHAR( 2 ),
 *      $                   B( LDB, * ), BETA( 2 )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -53876,12 +54341,12 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date September 2012
+*> \date December 2016
 *
 *> \ingroup doubleOTHERauxiliary
 *
@@ -53894,10 +54359,10 @@
       SUBROUTINE DLAGV2( A, LDA, B, LDB, ALPHAR, ALPHAI, BETA, CSL, SNL,
      $                   CSR, SNR )
 *
-*  -- LAPACK auxiliary routine (version 3.4.2) --
+*  -- LAPACK auxiliary routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     September 2012
+*     December 2016
 *
 *     .. Scalar Arguments ..
       INTEGER            LDA, LDB
@@ -54113,25 +54578,25 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DLAHQR + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dlahqr.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dlahqr.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dlahqr.f"> 
+*> Download DLAHQR + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dlahqr.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dlahqr.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dlahqr.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       SUBROUTINE DLAHQR( WANTT, WANTZ, N, ILO, IHI, H, LDH, WR, WI,
 *                          ILOZ, IHIZ, Z, LDZ, INFO )
-* 
+*
 *       .. Scalar Arguments ..
 *       INTEGER            IHI, IHIZ, ILO, ILOZ, INFO, LDH, LDZ, N
 *       LOGICAL            WANTT, WANTZ
@@ -54139,7 +54604,7 @@
 *       .. Array Arguments ..
 *       DOUBLE PRECISION   H( LDH, * ), WI( * ), WR( * ), Z( LDZ, * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -54289,12 +54754,12 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date September 2012
+*> \date December 2016
 *
 *> \ingroup doubleOTHERauxiliary
 *
@@ -54318,10 +54783,10 @@
       SUBROUTINE DLAHQR( WANTT, WANTZ, N, ILO, IHI, H, LDH, WR, WI,
      $                   ILOZ, IHIZ, Z, LDZ, INFO )
 *
-*  -- LAPACK auxiliary routine (version 3.4.2) --
+*  -- LAPACK auxiliary routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     September 2012
+*     December 2016
 *
 *     .. Scalar Arguments ..
       INTEGER            IHI, IHIZ, ILO, ILOZ, INFO, LDH, LDZ, N
@@ -54334,8 +54799,6 @@
 *  =========================================================
 *
 *     .. Parameters ..
-      INTEGER            ITMAX
-      PARAMETER          ( ITMAX = 30 )
       DOUBLE PRECISION   ZERO, ONE, TWO
       PARAMETER          ( ZERO = 0.0d0, ONE = 1.0d0, TWO = 2.0d0 )
       DOUBLE PRECISION   DAT1, DAT2
@@ -54346,7 +54809,7 @@
      $                   H22, RT1I, RT1R, RT2I, RT2R, RTDISC, S, SAFMAX,
      $                   SAFMIN, SMLNUM, SN, SUM, T1, T2, T3, TR, TST,
      $                   ULP, V2, V3
-      INTEGER            I, I1, I2, ITS, J, K, L, M, NH, NR, NZ
+      INTEGER            I, I1, I2, ITS, ITMAX, J, K, L, M, NH, NR, NZ
 *     ..
 *     .. Local Arrays ..
       DOUBLE PRECISION   V( 3 )
@@ -54403,6 +54866,10 @@
          I2 = N
       END IF
 *
+*     ITMAX is the total number of QR iterations allowed.
+*
+      ITMAX = 30 * MAX( 10, NH )
+*
 *     The main loop begins here. I is the loop index and decreases from
 *     IHI to ILO in steps of 1 or 2. Each iteration of the loop works
 *     with the active submatrix in rows and columns L to I.
@@ -54724,24 +55191,24 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DLAHR2 + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dlahr2.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dlahr2.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dlahr2.f"> 
+*> Download DLAHR2 + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dlahr2.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dlahr2.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dlahr2.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       SUBROUTINE DLAHR2( N, K, NB, A, LDA, TAU, T, LDT, Y, LDY )
-* 
+*
 *       .. Scalar Arguments ..
 *       INTEGER            K, LDA, LDT, LDY, N, NB
 *       ..
@@ -54749,7 +55216,7 @@
 *       DOUBLE PRECISION  A( LDA, * ), T( LDT, NB ), TAU( NB ),
 *      $                   Y( LDY, NB )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -54840,12 +55307,12 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date September 2012
+*> \date December 2016
 *
 *> \ingroup doubleOTHERauxiliary
 *
@@ -54903,10 +55370,10 @@
 *  =====================================================================
       SUBROUTINE DLAHR2( N, K, NB, A, LDA, TAU, T, LDT, Y, LDY )
 *
-*  -- LAPACK auxiliary routine (version 3.4.2) --
+*  -- LAPACK auxiliary routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     September 2012
+*     December 2016
 *
 *     .. Scalar Arguments ..
       INTEGER            K, LDA, LDT, LDY, N, NB
@@ -54920,7 +55387,7 @@
 *
 *     .. Parameters ..
       DOUBLE PRECISION  ZERO, ONE
-      PARAMETER          ( ZERO = 0.0D+0, 
+      PARAMETER          ( ZERO = 0.0D+0,
      $                     ONE = 1.0D+0 )
 *     ..
 *     .. Local Scalars ..
@@ -54962,31 +55429,31 @@
 *           w := V1**T * b1
 *
             CALL DCOPY( I-1, A( K+1, I ), 1, T( 1, NB ), 1 )
-            CALL DTRMV( 'Lower', 'Transpose', 'UNIT', 
+            CALL DTRMV( 'Lower', 'Transpose', 'UNIT',
      $                  I-1, A( K+1, 1 ),
      $                  LDA, T( 1, NB ), 1 )
 *
 *           w := w + V2**T * b2
 *
-            CALL DGEMV( 'Transpose', N-K-I+1, I-1, 
+            CALL DGEMV( 'Transpose', N-K-I+1, I-1,
      $                  ONE, A( K+I, 1 ),
      $                  LDA, A( K+I, I ), 1, ONE, T( 1, NB ), 1 )
 *
 *           w := T**T * w
 *
-            CALL DTRMV( 'Upper', 'Transpose', 'NON-UNIT', 
+            CALL DTRMV( 'Upper', 'Transpose', 'NON-UNIT',
      $                  I-1, T, LDT,
      $                  T( 1, NB ), 1 )
 *
 *           b2 := b2 - V2*w
 *
-            CALL DGEMV( 'NO TRANSPOSE', N-K-I+1, I-1, -ONE, 
+            CALL DGEMV( 'NO TRANSPOSE', N-K-I+1, I-1, -ONE,
      $                  A( K+I, 1 ),
      $                  LDA, T( 1, NB ), 1, ONE, A( K+I, I ), 1 )
 *
 *           b1 := b1 - V1*w
 *
-            CALL DTRMV( 'Lower', 'NO TRANSPOSE', 
+            CALL DTRMV( 'Lower', 'NO TRANSPOSE',
      $                  'UNIT', I-1,
      $                  A( K+1, 1 ), LDA, T( 1, NB ), 1 )
             CALL DAXPY( I-1, -ONE, T( 1, NB ), 1, A( K+1, I ), 1 )
@@ -55004,13 +55471,13 @@
 *
 *        Compute  Y(K+1:N,I)
 *
-         CALL DGEMV( 'NO TRANSPOSE', N-K, N-K-I+1, 
+         CALL DGEMV( 'NO TRANSPOSE', N-K, N-K-I+1,
      $               ONE, A( K+1, I+1 ),
      $               LDA, A( K+I, I ), 1, ZERO, Y( K+1, I ), 1 )
-         CALL DGEMV( 'Transpose', N-K-I+1, I-1, 
+         CALL DGEMV( 'Transpose', N-K-I+1, I-1,
      $               ONE, A( K+I, 1 ), LDA,
      $               A( K+I, I ), 1, ZERO, T( 1, I ), 1 )
-         CALL DGEMV( 'NO TRANSPOSE', N-K, I-1, -ONE, 
+         CALL DGEMV( 'NO TRANSPOSE', N-K, I-1, -ONE,
      $               Y( K+1, 1 ), LDY,
      $               T( 1, I ), 1, ONE, Y( K+1, I ), 1 )
          CALL DSCAL( N-K, TAU( I ), Y( K+1, I ), 1 )
@@ -55018,7 +55485,7 @@
 *        Compute T(1:I,I)
 *
          CALL DSCAL( I-1, -TAU( I ), T( 1, I ), 1 )
-         CALL DTRMV( 'Upper', 'No Transpose', 'NON-UNIT', 
+         CALL DTRMV( 'Upper', 'No Transpose', 'NON-UNIT',
      $               I-1, T, LDT,
      $               T( 1, I ), 1 )
          T( I, I ) = TAU( I )
@@ -55029,15 +55496,15 @@
 *     Compute Y(1:K,1:NB)
 *
       CALL DLACPY( 'ALL', K, NB, A( 1, 2 ), LDA, Y, LDY )
-      CALL DTRMM( 'RIGHT', 'Lower', 'NO TRANSPOSE', 
+      CALL DTRMM( 'RIGHT', 'Lower', 'NO TRANSPOSE',
      $            'UNIT', K, NB,
      $            ONE, A( K+1, 1 ), LDA, Y, LDY )
       IF( N.GT.K+NB )
-     $   CALL DGEMM( 'NO TRANSPOSE', 'NO TRANSPOSE', K, 
+     $   CALL DGEMM( 'NO TRANSPOSE', 'NO TRANSPOSE', K,
      $               NB, N-K-NB, ONE,
      $               A( 1, 2+NB ), LDA, A( K+1+NB, 1 ), LDA, ONE, Y,
      $               LDY )
-      CALL DTRMM( 'RIGHT', 'Upper', 'NO TRANSPOSE', 
+      CALL DTRMM( 'RIGHT', 'Upper', 'NO TRANSPOSE',
      $            'NON-UNIT', K, NB,
      $            ONE, T, LDT, Y, LDY )
 *
@@ -55050,24 +55517,24 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DLAHRD + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dlahrd.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dlahrd.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dlahrd.f"> 
+*> Download DLAHRD + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dlahrd.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dlahrd.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dlahrd.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       SUBROUTINE DLAHRD( N, K, NB, A, LDA, TAU, T, LDT, Y, LDY )
-* 
+*
 *       .. Scalar Arguments ..
 *       INTEGER            K, LDA, LDT, LDY, N, NB
 *       ..
@@ -55075,22 +55542,20 @@
 *       DOUBLE PRECISION   A( LDA, * ), T( LDT, NB ), TAU( NB ),
 *      $                   Y( LDY, NB )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
 *>
 *> \verbatim
 *>
+*> This routine is deprecated and has been replaced by routine DLAHR2.
+*>
 *> DLAHRD reduces the first NB columns of a real general n-by-(n-k+1)
 *> matrix A so that elements below the k-th subdiagonal are zero. The
 *> reduction is performed by an orthogonal similarity transformation
 *> Q**T * A * Q. The routine returns the matrices V and T which determine
 *> Q as a block reflector I - V*T*V**T, and also the matrix Y = A * V * T.
-*>
-*> This is an OBSOLETE auxiliary routine. 
-*> This routine will be 'deprecated' in a  future release.
-*> Please use the new routine DLAHR2 instead.
 *> \endverbatim
 *
 *  Arguments:
@@ -55167,12 +55632,12 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date September 2012
+*> \date December 2016
 *
 *> \ingroup doubleOTHERauxiliary
 *
@@ -55217,10 +55682,10 @@
 *  =====================================================================
       SUBROUTINE DLAHRD( N, K, NB, A, LDA, TAU, T, LDT, Y, LDY )
 *
-*  -- LAPACK auxiliary routine (version 3.4.2) --
+*  -- LAPACK auxiliary routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     September 2012
+*     December 2016
 *
 *     .. Scalar Arguments ..
       INTEGER            K, LDA, LDT, LDY, N, NB
@@ -55338,24 +55803,24 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DLAIC1 + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dlaic1.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dlaic1.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dlaic1.f"> 
+*> Download DLAIC1 + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dlaic1.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dlaic1.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dlaic1.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       SUBROUTINE DLAIC1( JOB, J, X, SEST, W, GAMMA, SESTPR, S, C )
-* 
+*
 *       .. Scalar Arguments ..
 *       INTEGER            J, JOB
 *       DOUBLE PRECISION   C, GAMMA, S, SEST, SESTPR
@@ -55363,7 +55828,7 @@
 *       .. Array Arguments ..
 *       DOUBLE PRECISION   W( J ), X( J )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -55458,22 +55923,22 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date September 2012
+*> \date December 2016
 *
 *> \ingroup doubleOTHERauxiliary
 *
 *  =====================================================================
       SUBROUTINE DLAIC1( JOB, J, X, SEST, W, GAMMA, SESTPR, S, C )
 *
-*  -- LAPACK auxiliary routine (version 3.4.2) --
+*  -- LAPACK auxiliary routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     September 2012
+*     December 2016
 *
 *     .. Scalar Arguments ..
       INTEGER            J, JOB
@@ -55705,28 +56170,28 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DLAISNAN + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dlaisnan.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dlaisnan.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dlaisnan.f"> 
+*> Download DLAISNAN + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dlaisnan.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dlaisnan.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dlaisnan.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       LOGICAL FUNCTION DLAISNAN( DIN1, DIN2 )
-* 
+*
 *       .. Scalar Arguments ..
 *       DOUBLE PRECISION   DIN1, DIN2
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -55765,22 +56230,22 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date September 2012
+*> \date December 2016
 *
-*> \ingroup auxOTHERauxiliary
+*> \ingroup OTHERauxiliary
 *
 *  =====================================================================
       LOGICAL FUNCTION DLAISNAN( DIN1, DIN2 )
 *
-*  -- LAPACK auxiliary routine (version 3.4.2) --
+*  -- LAPACK auxiliary routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     September 2012
+*     December 2016
 *
 *     .. Scalar Arguments ..
       DOUBLE PRECISION   DIN1, DIN2
@@ -55796,25 +56261,25 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DLALN2 + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dlaln2.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dlaln2.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dlaln2.f"> 
+*> Download DLALN2 + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dlaln2.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dlaln2.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dlaln2.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       SUBROUTINE DLALN2( LTRANS, NA, NW, SMIN, CA, A, LDA, D1, D2, B,
 *                          LDB, WR, WI, X, LDX, SCALE, XNORM, INFO )
-* 
+*
 *       .. Scalar Arguments ..
 *       LOGICAL            LTRANS
 *       INTEGER            INFO, LDA, LDB, LDX, NA, NW
@@ -55823,7 +56288,7 @@
 *       .. Array Arguments ..
 *       DOUBLE PRECISION   A( LDA, * ), B( LDB, * ), X( LDX, * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -55921,7 +56386,7 @@
 *> \param[in] D2
 *> \verbatim
 *>          D2 is DOUBLE PRECISION
-*>          The 2,2 element in the diagonal matrix D.  Not used if NW=1.
+*>          The 2,2 element in the diagonal matrix D.  Not used if NA=1.
 *> \endverbatim
 *>
 *> \param[in] B
@@ -55999,12 +56464,12 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date September 2012
+*> \date December 2016
 *
 *> \ingroup doubleOTHERauxiliary
 *
@@ -56012,10 +56477,10 @@
       SUBROUTINE DLALN2( LTRANS, NA, NW, SMIN, CA, A, LDA, D1, D2, B,
      $                   LDB, WR, WI, X, LDX, SCALE, XNORM, INFO )
 *
-*  -- LAPACK auxiliary routine (version 3.4.2) --
+*  -- LAPACK auxiliary routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     September 2012
+*     December 2016
 *
 *     .. Scalar Arguments ..
       LOGICAL            LTRANS
@@ -56407,18 +56872,18 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DLALS0 + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dlals0.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dlals0.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dlals0.f"> 
+*> Download DLALS0 + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dlals0.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dlals0.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dlals0.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
@@ -56426,7 +56891,7 @@
 *       SUBROUTINE DLALS0( ICOMPQ, NL, NR, SQRE, NRHS, B, LDB, BX, LDBX,
 *                          PERM, GIVPTR, GIVCOL, LDGCOL, GIVNUM, LDGNUM,
 *                          POLES, DIFL, DIFR, Z, K, C, S, WORK, INFO )
-* 
+*
 *       .. Scalar Arguments ..
 *       INTEGER            GIVPTR, ICOMPQ, INFO, K, LDB, LDBX, LDGCOL,
 *      $                   LDGNUM, NL, NR, NRHS, SQRE
@@ -56438,7 +56903,7 @@
 *      $                   DIFR( LDGNUM, * ), GIVNUM( LDGNUM, * ),
 *      $                   POLES( LDGNUM, * ), WORK( * ), Z( * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -56652,12 +57117,12 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date September 2012
+*> \date December 2016
 *
 *> \ingroup doubleOTHERcomputational
 *
@@ -56673,10 +57138,10 @@
      $                   PERM, GIVPTR, GIVCOL, LDGCOL, GIVNUM, LDGNUM,
      $                   POLES, DIFL, DIFR, Z, K, C, S, WORK, INFO )
 *
-*  -- LAPACK computational routine (version 3.4.2) --
+*  -- LAPACK computational routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     September 2012
+*     December 2016
 *
 *     .. Scalar Arguments ..
       INTEGER            GIVPTR, ICOMPQ, INFO, K, LDB, LDBX, LDGCOL,
@@ -56716,6 +57181,7 @@
 *     Test the input parameters.
 *
       INFO = 0
+      N = NL + NR + 1
 *
       IF( ( ICOMPQ.LT.0 ) .OR. ( ICOMPQ.GT.1 ) ) THEN
          INFO = -1
@@ -56725,11 +57191,7 @@
          INFO = -3
       ELSE IF( ( SQRE.LT.0 ) .OR. ( SQRE.GT.1 ) ) THEN
          INFO = -4
-      END IF
-*
-      N = NL + NR + 1
-*
-      IF( NRHS.LT.1 ) THEN
+      ELSE IF( NRHS.LT.1 ) THEN
          INFO = -5
       ELSE IF( LDB.LT.N ) THEN
          INFO = -7
@@ -56909,18 +57371,18 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DLALSA + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dlalsa.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dlalsa.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dlalsa.f"> 
+*> Download DLALSA + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dlalsa.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dlalsa.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dlalsa.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
@@ -56929,7 +57391,7 @@
 *                          LDU, VT, K, DIFL, DIFR, Z, POLES, GIVPTR,
 *                          GIVCOL, LDGCOL, PERM, GIVNUM, C, S, WORK,
 *                          IWORK, INFO )
-* 
+*
 *       .. Scalar Arguments ..
 *       INTEGER            ICOMPQ, INFO, LDB, LDBX, LDGCOL, LDU, N, NRHS,
 *      $                   SMLSIZ
@@ -56943,7 +57405,7 @@
 *      $                   U( LDU, * ), VT( LDU, * ), WORK( * ),
 *      $                   Z( LDU, * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -57154,12 +57616,12 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date September 2012
+*> \date December 2016
 *
 *> \ingroup doubleOTHERcomputational
 *
@@ -57176,10 +57638,10 @@
      $                   GIVCOL, LDGCOL, PERM, GIVNUM, C, S, WORK,
      $                   IWORK, INFO )
 *
-*  -- LAPACK computational routine (version 3.4.2) --
+*  -- LAPACK computational routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     September 2012
+*     December 2016
 *
 *     .. Scalar Arguments ..
       INTEGER            ICOMPQ, INFO, LDB, LDBX, LDGCOL, LDU, N, NRHS,
@@ -57404,25 +57866,25 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DLALSD + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dlalsd.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dlalsd.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dlalsd.f"> 
+*> Download DLALSD + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dlalsd.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dlalsd.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dlalsd.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       SUBROUTINE DLALSD( UPLO, SMLSIZ, N, NRHS, D, E, B, LDB, RCOND,
 *                          RANK, WORK, IWORK, INFO )
-* 
+*
 *       .. Scalar Arguments ..
 *       CHARACTER          UPLO
 *       INTEGER            INFO, LDB, N, NRHS, RANK, SMLSIZ
@@ -57432,7 +57894,7 @@
 *       INTEGER            IWORK( * )
 *       DOUBLE PRECISION   B( LDB, * ), D( * ), E( * ), WORK( * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -57561,12 +58023,12 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date September 2012
+*> \date December 2016
 *
 *> \ingroup doubleOTHERcomputational
 *
@@ -57581,10 +58043,10 @@
       SUBROUTINE DLALSD( UPLO, SMLSIZ, N, NRHS, D, E, B, LDB, RCOND,
      $                   RANK, WORK, IWORK, INFO )
 *
-*  -- LAPACK computational routine (version 3.4.2) --
+*  -- LAPACK computational routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     September 2012
+*     December 2016
 *
 *     .. Scalar Arguments ..
       CHARACTER          UPLO
@@ -57927,24 +58389,24 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DLAMRG + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dlamrg.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dlamrg.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dlamrg.f"> 
+*> Download DLAMRG + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dlamrg.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dlamrg.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dlamrg.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       SUBROUTINE DLAMRG( N1, N2, A, DTRD1, DTRD2, INDEX )
-* 
+*
 *       .. Scalar Arguments ..
 *       INTEGER            DTRD1, DTRD2, N1, N2
 *       ..
@@ -57952,7 +58414,7 @@
 *       INTEGER            INDEX( * )
 *       DOUBLE PRECISION   A( * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -57975,7 +58437,7 @@
 *> \param[in] N2
 *> \verbatim
 *>          N2 is INTEGER
-*>         These arguements contain the respective lengths of the two
+*>         These arguments contain the respective lengths of the two
 *>         sorted lists to be merged.
 *> \endverbatim
 *>
@@ -58012,22 +58474,22 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date September 2012
+*> \date June 2016
 *
 *> \ingroup auxOTHERcomputational
 *
 *  =====================================================================
       SUBROUTINE DLAMRG( N1, N2, A, DTRD1, DTRD2, INDEX )
 *
-*  -- LAPACK computational routine (version 3.4.2) --
+*  -- LAPACK computational routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     September 2012
+*     June 2016
 *
 *     .. Scalar Arguments ..
       INTEGER            DTRD1, DTRD2, N1, N2
@@ -58098,24 +58560,24 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DLANEG + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dlaneg.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dlaneg.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dlaneg.f"> 
+*> Download DLANEG + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dlaneg.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dlaneg.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dlaneg.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       INTEGER FUNCTION DLANEG( N, D, LLD, SIGMA, PIVMIN, R )
-* 
+*
 *       .. Scalar Arguments ..
 *       INTEGER            N, R
 *       DOUBLE PRECISION   PIVMIN, SIGMA
@@ -58123,7 +58585,7 @@
 *       .. Array Arguments ..
 *       DOUBLE PRECISION   D( * ), LLD( * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -58195,14 +58657,14 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date September 2012
+*> \date December 2016
 *
-*> \ingroup auxOTHERauxiliary
+*> \ingroup OTHERauxiliary
 *
 *> \par Contributors:
 *  ==================
@@ -58214,10 +58676,10 @@
 *  =====================================================================
       INTEGER FUNCTION DLANEG( N, D, LLD, SIGMA, PIVMIN, R )
 *
-*  -- LAPACK auxiliary routine (version 3.4.2) --
+*  -- LAPACK auxiliary routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     September 2012
+*     December 2016
 *
 *     .. Scalar Arguments ..
       INTEGER            N, R
@@ -58325,25 +58787,25 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DLANGB + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dlangb.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dlangb.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dlangb.f"> 
+*> Download DLANGB + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dlangb.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dlangb.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dlangb.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       DOUBLE PRECISION FUNCTION DLANGB( NORM, N, KL, KU, AB, LDAB,
 *                        WORK )
-* 
+*
 *       .. Scalar Arguments ..
 *       CHARACTER          NORM
 *       INTEGER            KL, KU, LDAB, N
@@ -58351,7 +58813,7 @@
 *       .. Array Arguments ..
 *       DOUBLE PRECISION   AB( LDAB, * ), WORK( * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -58434,12 +58896,12 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date September 2012
+*> \date December 2016
 *
 *> \ingroup doubleGBauxiliary
 *
@@ -58447,10 +58909,10 @@
       DOUBLE PRECISION FUNCTION DLANGB( NORM, N, KL, KU, AB, LDAB,
      $                 WORK )
 *
-*  -- LAPACK auxiliary routine (version 3.4.2) --
+*  -- LAPACK auxiliary routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     September 2012
+*     December 2016
 *
 *     .. Scalar Arguments ..
       CHARACTER          NORM
@@ -58550,24 +59012,24 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DLANGE + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dlange.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dlange.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dlange.f"> 
+*> Download DLANGE + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dlange.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dlange.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dlange.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       DOUBLE PRECISION FUNCTION DLANGE( NORM, M, N, A, LDA, WORK )
-* 
+*
 *       .. Scalar Arguments ..
 *       CHARACTER          NORM
 *       INTEGER            LDA, M, N
@@ -58575,7 +59037,7 @@
 *       .. Array Arguments ..
 *       DOUBLE PRECISION   A( LDA, * ), WORK( * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -58650,22 +59112,22 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date September 2012
+*> \date December 2016
 *
 *> \ingroup doubleGEauxiliary
 *
 *  =====================================================================
       DOUBLE PRECISION FUNCTION DLANGE( NORM, M, N, A, LDA, WORK )
 *
-*  -- LAPACK auxiliary routine (version 3.4.2) --
+*  -- LAPACK auxiliary routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     September 2012
+*     December 2016
 *
 *     .. Scalar Arguments ..
       CHARACTER          NORM
@@ -58761,24 +59223,24 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DLANGT + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dlangt.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dlangt.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dlangt.f"> 
+*> Download DLANGT + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dlangt.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dlangt.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dlangt.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       DOUBLE PRECISION FUNCTION DLANGT( NORM, N, DL, D, DU )
-* 
+*
 *       .. Scalar Arguments ..
 *       CHARACTER          NORM
 *       INTEGER            N
@@ -58786,7 +59248,7 @@
 *       .. Array Arguments ..
 *       DOUBLE PRECISION   D( * ), DL( * ), DU( * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -58853,22 +59315,22 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date September 2012
+*> \date December 2016
 *
 *> \ingroup doubleOTHERauxiliary
 *
 *  =====================================================================
       DOUBLE PRECISION FUNCTION DLANGT( NORM, N, DL, D, DU )
 *
-*  -- LAPACK auxiliary routine (version 3.4.2) --
+*  -- LAPACK auxiliary routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     September 2012
+*     December 2016
 *
 *     .. Scalar Arguments ..
       CHARACTER          NORM
@@ -58908,11 +59370,11 @@
 *
          ANORM = ABS( D( N ) )
          DO 10 I = 1, N - 1
-            IF( ANORM.LT.ABS( DL( I ) ) .OR. DISNAN( ABS( DL( I ) ) ) ) 
+            IF( ANORM.LT.ABS( DL( I ) ) .OR. DISNAN( ABS( DL( I ) ) ) )
      $           ANORM = ABS(DL(I))
-            IF( ANORM.LT.ABS( D( I ) ) .OR. DISNAN( ABS( D( I ) ) ) ) 
+            IF( ANORM.LT.ABS( D( I ) ) .OR. DISNAN( ABS( D( I ) ) ) )
      $           ANORM = ABS(D(I))
-            IF( ANORM.LT.ABS( DU( I ) ) .OR. DISNAN (ABS( DU( I ) ) ) ) 
+            IF( ANORM.LT.ABS( DU( I ) ) .OR. DISNAN (ABS( DU( I ) ) ) )
      $           ANORM = ABS(DU(I))
    10    CONTINUE
       ELSE IF( LSAME( NORM, 'O' ) .OR. NORM.EQ.'1' ) THEN
@@ -58923,7 +59385,7 @@
             ANORM = ABS( D( 1 ) )
          ELSE
             ANORM = ABS( D( 1 ) )+ABS( DL( 1 ) )
-            TEMP = ABS( D( N ) )+ABS( DU( N-1 ) ) 
+            TEMP = ABS( D( N ) )+ABS( DU( N-1 ) )
             IF( ANORM .LT. TEMP .OR. DISNAN( TEMP ) ) ANORM = TEMP
             DO 20 I = 2, N - 1
                TEMP = ABS( D( I ) )+ABS( DL( I ) )+ABS( DU( I-1 ) )
@@ -58969,24 +59431,24 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DLANHS + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dlanhs.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dlanhs.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dlanhs.f"> 
+*> Download DLANHS + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dlanhs.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dlanhs.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dlanhs.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       DOUBLE PRECISION FUNCTION DLANHS( NORM, N, A, LDA, WORK )
-* 
+*
 *       .. Scalar Arguments ..
 *       CHARACTER          NORM
 *       INTEGER            LDA, N
@@ -58994,7 +59456,7 @@
 *       .. Array Arguments ..
 *       DOUBLE PRECISION   A( LDA, * ), WORK( * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -59063,22 +59525,22 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date September 2012
+*> \date December 2016
 *
 *> \ingroup doubleOTHERauxiliary
 *
 *  =====================================================================
       DOUBLE PRECISION FUNCTION DLANHS( NORM, N, A, LDA, WORK )
 *
-*  -- LAPACK auxiliary routine (version 3.4.2) --
+*  -- LAPACK auxiliary routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     September 2012
+*     December 2016
 *
 *     .. Scalar Arguments ..
       CHARACTER          NORM
@@ -59174,25 +59636,25 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DLANSB + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dlansb.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dlansb.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dlansb.f"> 
+*> Download DLANSB + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dlansb.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dlansb.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dlansb.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       DOUBLE PRECISION FUNCTION DLANSB( NORM, UPLO, N, K, AB, LDAB,
 *                        WORK )
-* 
+*
 *       .. Scalar Arguments ..
 *       CHARACTER          NORM, UPLO
 *       INTEGER            K, LDAB, N
@@ -59200,7 +59662,7 @@
 *       .. Array Arguments ..
 *       DOUBLE PRECISION   AB( LDAB, * ), WORK( * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -59288,12 +59750,12 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date September 2012
+*> \date December 2016
 *
 *> \ingroup doubleOTHERauxiliary
 *
@@ -59301,10 +59763,10 @@
       DOUBLE PRECISION FUNCTION DLANSB( NORM, UPLO, N, K, AB, LDAB,
      $                 WORK )
 *
-*  -- LAPACK auxiliary routine (version 3.4.2) --
+*  -- LAPACK auxiliary routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     September 2012
+*     December 2016
 *
 *     .. Scalar Arguments ..
       CHARACTER          NORM, UPLO
@@ -59432,24 +59894,24 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DLANSF + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dlansf.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dlansf.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dlansf.f"> 
+*> Download DLANSF + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dlansf.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dlansf.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dlansf.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       DOUBLE PRECISION FUNCTION DLANSF( NORM, TRANSR, UPLO, N, A, WORK )
-* 
+*
 *       .. Scalar Arguments ..
 *       CHARACTER          NORM, TRANSR, UPLO
 *       INTEGER            N
@@ -59457,7 +59919,7 @@
 *       .. Array Arguments ..
 *       DOUBLE PRECISION   A( 0: * ), WORK( 0: * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -59540,12 +60002,12 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date September 2012
+*> \date December 2016
 *
 *> \ingroup doubleOTHERcomputational
 *
@@ -59639,10 +60101,10 @@
 *  =====================================================================
       DOUBLE PRECISION FUNCTION DLANSF( NORM, TRANSR, UPLO, N, A, WORK )
 *
-*  -- LAPACK computational routine (version 3.4.2) --
+*  -- LAPACK computational routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     September 2012
+*     December 2016
 *
 *     .. Scalar Arguments ..
       CHARACTER          NORM, TRANSR, UPLO
@@ -59729,7 +60191,7 @@
                DO J = 0, K - 1
                   DO I = 0, N - 1
                      TEMP = ABS( A( I+J*LDA ) )
-                     IF( VALUE .LT. TEMP .OR. DISNAN( TEMP ) ) 
+                     IF( VALUE .LT. TEMP .OR. DISNAN( TEMP ) )
      $                    VALUE = TEMP
                   END DO
                END DO
@@ -59738,7 +60200,7 @@
                DO J = 0, N - 1
                   DO I = 0, K - 1
                      TEMP = ABS( A( I+J*LDA ) )
-                     IF( VALUE .LT. TEMP .OR. DISNAN( TEMP ) ) 
+                     IF( VALUE .LT. TEMP .OR. DISNAN( TEMP ) )
      $                    VALUE = TEMP
                   END DO
                END DO
@@ -59750,7 +60212,7 @@
                DO J = 0, K - 1
                   DO I = 0, N
                      TEMP = ABS( A( I+J*LDA ) )
-                     IF( VALUE .LT. TEMP .OR. DISNAN( TEMP ) ) 
+                     IF( VALUE .LT. TEMP .OR. DISNAN( TEMP ) )
      $                    VALUE = TEMP
                   END DO
                END DO
@@ -59759,7 +60221,7 @@
                DO J = 0, N
                   DO I = 0, K - 1
                      TEMP = ABS( A( I+J*LDA ) )
-                     IF( VALUE .LT. TEMP .OR. DISNAN( TEMP ) ) 
+                     IF( VALUE .LT. TEMP .OR. DISNAN( TEMP ) )
      $                    VALUE = TEMP
                   END DO
                END DO
@@ -59809,7 +60271,7 @@
                   VALUE = WORK( 0 )
                   DO I = 1, N-1
                      TEMP = WORK( I )
-                     IF( VALUE .LT. TEMP .OR. DISNAN( TEMP ) ) 
+                     IF( VALUE .LT. TEMP .OR. DISNAN( TEMP ) )
      $                    VALUE = TEMP
                   END DO
                ELSE
@@ -59851,7 +60313,7 @@
                   VALUE = WORK( 0 )
                   DO I = 1, N-1
                      TEMP = WORK( I )
-                     IF( VALUE .LT. TEMP .OR. DISNAN( TEMP ) ) 
+                     IF( VALUE .LT. TEMP .OR. DISNAN( TEMP ) )
      $                    VALUE = TEMP
                   END DO
                END IF
@@ -59889,7 +60351,7 @@
                   VALUE = WORK( 0 )
                   DO I = 1, N-1
                      TEMP = WORK( I )
-                     IF( VALUE .LT. TEMP .OR. DISNAN( TEMP ) ) 
+                     IF( VALUE .LT. TEMP .OR. DISNAN( TEMP ) )
      $                    VALUE = TEMP
                   END DO
                ELSE
@@ -59927,7 +60389,7 @@
                   VALUE = WORK( 0 )
                   DO I = 1, N-1
                      TEMP = WORK( I )
-                     IF( VALUE .LT. TEMP .OR. DISNAN( TEMP ) ) 
+                     IF( VALUE .LT. TEMP .OR. DISNAN( TEMP ) )
      $                    VALUE = TEMP
                   END DO
                END IF
@@ -59993,7 +60455,7 @@
                   VALUE = WORK( 0 )
                   DO I = 1, N-1
                      TEMP = WORK( I )
-                     IF( VALUE .LT. TEMP .OR. DISNAN( TEMP ) ) 
+                     IF( VALUE .LT. TEMP .OR. DISNAN( TEMP ) )
      $                    VALUE = TEMP
                   END DO
                ELSE
@@ -60058,7 +60520,7 @@
                   VALUE = WORK( 0 )
                   DO I = 1, N-1
                      TEMP = WORK( I )
-                     IF( VALUE .LT. TEMP .OR. DISNAN( TEMP ) ) 
+                     IF( VALUE .LT. TEMP .OR. DISNAN( TEMP ) )
      $                    VALUE = TEMP
                   END DO
                END IF
@@ -60131,7 +60593,7 @@
                   VALUE = WORK( 0 )
                   DO I = 1, N-1
                      TEMP = WORK( I )
-                     IF( VALUE .LT. TEMP .OR. DISNAN( TEMP ) ) 
+                     IF( VALUE .LT. TEMP .OR. DISNAN( TEMP ) )
      $                    VALUE = TEMP
                   END DO
                ELSE
@@ -60204,7 +60666,7 @@
                   VALUE = WORK( 0 )
                   DO I = 1, N-1
                      TEMP = WORK( I )
-                     IF( VALUE .LT. TEMP .OR. DISNAN( TEMP ) ) 
+                     IF( VALUE .LT. TEMP .OR. DISNAN( TEMP ) )
      $                    VALUE = TEMP
                   END DO
                END IF
@@ -60395,24 +60857,24 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DLANSP + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dlansp.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dlansp.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dlansp.f"> 
+*> Download DLANSP + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dlansp.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dlansp.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dlansp.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       DOUBLE PRECISION FUNCTION DLANSP( NORM, UPLO, N, AP, WORK )
-* 
+*
 *       .. Scalar Arguments ..
 *       CHARACTER          NORM, UPLO
 *       INTEGER            N
@@ -60420,7 +60882,7 @@
 *       .. Array Arguments ..
 *       DOUBLE PRECISION   AP( * ), WORK( * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -60495,22 +60957,22 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date September 2012
+*> \date December 2016
 *
 *> \ingroup doubleOTHERauxiliary
 *
 *  =====================================================================
       DOUBLE PRECISION FUNCTION DLANSP( NORM, UPLO, N, AP, WORK )
 *
-*  -- LAPACK auxiliary routine (version 3.4.2) --
+*  -- LAPACK auxiliary routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     September 2012
+*     December 2016
 *
 *     .. Scalar Arguments ..
       CHARACTER          NORM, UPLO
@@ -60656,24 +61118,24 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DLANST + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dlanst.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dlanst.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dlanst.f"> 
+*> Download DLANST + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dlanst.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dlanst.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dlanst.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       DOUBLE PRECISION FUNCTION DLANST( NORM, N, D, E )
-* 
+*
 *       .. Scalar Arguments ..
 *       CHARACTER          NORM
 *       INTEGER            N
@@ -60681,7 +61143,7 @@
 *       .. Array Arguments ..
 *       DOUBLE PRECISION   D( * ), E( * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -60742,22 +61204,22 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date September 2012
+*> \date December 2016
 *
-*> \ingroup auxOTHERauxiliary
+*> \ingroup OTHERauxiliary
 *
 *  =====================================================================
       DOUBLE PRECISION FUNCTION DLANST( NORM, N, D, E )
 *
-*  -- LAPACK auxiliary routine (version 3.4.2) --
+*  -- LAPACK auxiliary routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     September 2012
+*     December 2016
 *
 *     .. Scalar Arguments ..
       CHARACTER          NORM
@@ -60842,24 +61304,24 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DLANSY + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dlansy.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dlansy.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dlansy.f"> 
+*> Download DLANSY + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dlansy.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dlansy.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dlansy.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       DOUBLE PRECISION FUNCTION DLANSY( NORM, UPLO, N, A, LDA, WORK )
-* 
+*
 *       .. Scalar Arguments ..
 *       CHARACTER          NORM, UPLO
 *       INTEGER            LDA, N
@@ -60867,7 +61329,7 @@
 *       .. Array Arguments ..
 *       DOUBLE PRECISION   A( LDA, * ), WORK( * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -60950,22 +61412,22 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date September 2012
+*> \date December 2016
 *
 *> \ingroup doubleSYauxiliary
 *
 *  =====================================================================
       DOUBLE PRECISION FUNCTION DLANSY( NORM, UPLO, N, A, LDA, WORK )
 *
-*  -- LAPACK auxiliary routine (version 3.4.2) --
+*  -- LAPACK auxiliary routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     September 2012
+*     December 2016
 *
 *     .. Scalar Arguments ..
       CHARACTER          NORM, UPLO
@@ -61083,25 +61545,25 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DLANTB + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dlantb.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dlantb.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dlantb.f"> 
+*> Download DLANTB + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dlantb.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dlantb.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dlantb.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       DOUBLE PRECISION FUNCTION DLANTB( NORM, UPLO, DIAG, N, K, AB,
 *                        LDAB, WORK )
-* 
+*
 *       .. Scalar Arguments ..
 *       CHARACTER          DIAG, NORM, UPLO
 *       INTEGER            K, LDAB, N
@@ -61109,7 +61571,7 @@
 *       .. Array Arguments ..
 *       DOUBLE PRECISION   AB( LDAB, * ), WORK( * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -61208,12 +61670,12 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date September 2012
+*> \date December 2016
 *
 *> \ingroup doubleOTHERauxiliary
 *
@@ -61221,10 +61683,10 @@
       DOUBLE PRECISION FUNCTION DLANTB( NORM, UPLO, DIAG, N, K, AB,
      $                 LDAB, WORK )
 *
-*  -- LAPACK auxiliary routine (version 3.4.2) --
+*  -- LAPACK auxiliary routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     September 2012
+*     December 2016
 *
 *     .. Scalar Arguments ..
       CHARACTER          DIAG, NORM, UPLO
@@ -61444,24 +61906,24 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DLANTP + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dlantp.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dlantp.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dlantp.f"> 
+*> Download DLANTP + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dlantp.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dlantp.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dlantp.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       DOUBLE PRECISION FUNCTION DLANTP( NORM, UPLO, DIAG, N, AP, WORK )
-* 
+*
 *       .. Scalar Arguments ..
 *       CHARACTER          DIAG, NORM, UPLO
 *       INTEGER            N
@@ -61469,7 +61931,7 @@
 *       .. Array Arguments ..
 *       DOUBLE PRECISION   AP( * ), WORK( * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -61554,22 +62016,22 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date September 2012
+*> \date December 2016
 *
 *> \ingroup doubleOTHERauxiliary
 *
 *  =====================================================================
       DOUBLE PRECISION FUNCTION DLANTP( NORM, UPLO, DIAG, N, AP, WORK )
 *
-*  -- LAPACK auxiliary routine (version 3.4.2) --
+*  -- LAPACK auxiliary routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     September 2012
+*     December 2016
 *
 *     .. Scalar Arguments ..
       CHARACTER          DIAG, NORM, UPLO
@@ -61799,25 +62261,25 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DLANTR + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dlantr.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dlantr.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dlantr.f"> 
+*> Download DLANTR + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dlantr.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dlantr.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dlantr.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       DOUBLE PRECISION FUNCTION DLANTR( NORM, UPLO, DIAG, M, N, A, LDA,
 *                        WORK )
-* 
+*
 *       .. Scalar Arguments ..
 *       CHARACTER          DIAG, NORM, UPLO
 *       INTEGER            LDA, M, N
@@ -61825,7 +62287,7 @@
 *       .. Array Arguments ..
 *       DOUBLE PRECISION   A( LDA, * ), WORK( * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -61925,12 +62387,12 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date September 2012
+*> \date December 2016
 *
 *> \ingroup doubleOTHERauxiliary
 *
@@ -61938,10 +62400,10 @@
       DOUBLE PRECISION FUNCTION DLANTR( NORM, UPLO, DIAG, M, N, A, LDA,
      $                 WORK )
 *
-*  -- LAPACK auxiliary routine (version 3.4.2) --
+*  -- LAPACK auxiliary routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     September 2012
+*     December 2016
 *
 *     .. Scalar Arguments ..
       CHARACTER          DIAG, NORM, UPLO
@@ -62152,28 +62614,28 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DLANV2 + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dlanv2.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dlanv2.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dlanv2.f"> 
+*> Download DLANV2 + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dlanv2.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dlanv2.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dlanv2.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       SUBROUTINE DLANV2( A, B, C, D, RT1R, RT1I, RT2R, RT2I, CS, SN )
-* 
+*
 *       .. Scalar Arguments ..
 *       DOUBLE PRECISION   A, B, C, CS, D, RT1I, RT1R, RT2I, RT2R, SN
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -62254,12 +62716,12 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date September 2012
+*> \date December 2016
 *
 *> \ingroup doubleOTHERauxiliary
 *
@@ -62277,10 +62739,10 @@
 *  =====================================================================
       SUBROUTINE DLANV2( A, B, C, D, RT1R, RT1I, RT2R, RT2I, CS, SN )
 *
-*  -- LAPACK auxiliary routine (version 3.4.2) --
+*  -- LAPACK auxiliary routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     September 2012
+*     December 2016
 *
 *     .. Scalar Arguments ..
       DOUBLE PRECISION   A, B, C, CS, D, RT1I, RT1R, RT2I, RT2R, SN
@@ -62441,24 +62903,24 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DLAPLL + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dlapll.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dlapll.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dlapll.f"> 
+*> Download DLAPLL + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dlapll.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dlapll.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dlapll.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       SUBROUTINE DLAPLL( N, X, INCX, Y, INCY, SSMIN )
-* 
+*
 *       .. Scalar Arguments ..
 *       INTEGER            INCX, INCY, N
 *       DOUBLE PRECISION   SSMIN
@@ -62466,7 +62928,7 @@
 *       .. Array Arguments ..
 *       DOUBLE PRECISION   X( * ), Y( * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -62529,22 +62991,22 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date September 2012
+*> \date December 2016
 *
 *> \ingroup doubleOTHERauxiliary
 *
 *  =====================================================================
       SUBROUTINE DLAPLL( N, X, INCX, Y, INCY, SSMIN )
 *
-*  -- LAPACK auxiliary routine (version 3.4.2) --
+*  -- LAPACK auxiliary routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     September 2012
+*     December 2016
 *
 *     .. Scalar Arguments ..
       INTEGER            INCX, INCY, N
@@ -62606,24 +63068,24 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DLAPMR + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dlapmr.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dlapmr.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dlapmr.f"> 
+*> Download DLAPMR + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dlapmr.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dlapmr.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dlapmr.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       SUBROUTINE DLAPMR( FORWRD, M, N, X, LDX, K )
-* 
+*
 *       .. Scalar Arguments ..
 *       LOGICAL            FORWRD
 *       INTEGER            LDX, M, N
@@ -62632,7 +63094,7 @@
 *       INTEGER            K( * )
 *       DOUBLE PRECISION   X( LDX, * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -62696,22 +63158,22 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date September 2012
+*> \date December 2016
 *
 *> \ingroup doubleOTHERauxiliary
 *
 *  =====================================================================
       SUBROUTINE DLAPMR( FORWRD, M, N, X, LDX, K )
 *
-*  -- LAPACK auxiliary routine (version 3.4.2) --
+*  -- LAPACK auxiliary routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     September 2012
+*     December 2016
 *
 *     .. Scalar Arguments ..
       LOGICAL            FORWRD
@@ -62810,24 +63272,24 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DLAPMT + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dlapmt.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dlapmt.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dlapmt.f"> 
+*> Download DLAPMT + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dlapmt.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dlapmt.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dlapmt.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       SUBROUTINE DLAPMT( FORWRD, M, N, X, LDX, K )
-* 
+*
 *       .. Scalar Arguments ..
 *       LOGICAL            FORWRD
 *       INTEGER            LDX, M, N
@@ -62836,7 +63298,7 @@
 *       INTEGER            K( * )
 *       DOUBLE PRECISION   X( LDX, * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -62900,22 +63362,22 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date September 2012
+*> \date December 2016
 *
 *> \ingroup doubleOTHERauxiliary
 *
 *  =====================================================================
       SUBROUTINE DLAPMT( FORWRD, M, N, X, LDX, K )
 *
-*  -- LAPACK auxiliary routine (version 3.4.2) --
+*  -- LAPACK auxiliary routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     September 2012
+*     December 2016
 *
 *     .. Scalar Arguments ..
       LOGICAL            FORWRD
@@ -63013,28 +63475,28 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DLAPY2 + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dlapy2.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dlapy2.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dlapy2.f"> 
+*> Download DLAPY2 + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dlapy2.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dlapy2.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dlapy2.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       DOUBLE PRECISION FUNCTION DLAPY2( X, Y )
-* 
+*
 *       .. Scalar Arguments ..
 *       DOUBLE PRECISION   X, Y
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -63062,22 +63524,22 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date September 2012
+*> \date December 2016
 *
-*> \ingroup auxOTHERauxiliary
+*> \ingroup OTHERauxiliary
 *
 *  =====================================================================
       DOUBLE PRECISION FUNCTION DLAPY2( X, Y )
 *
-*  -- LAPACK auxiliary routine (version 3.4.2) --
+*  -- LAPACK auxiliary routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     September 2012
+*     December 2016
 *
 *     .. Scalar Arguments ..
       DOUBLE PRECISION   X, Y
@@ -63117,28 +63579,28 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DLAPY3 + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dlapy3.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dlapy3.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dlapy3.f"> 
+*> Download DLAPY3 + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dlapy3.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dlapy3.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dlapy3.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       DOUBLE PRECISION FUNCTION DLAPY3( X, Y, Z )
-* 
+*
 *       .. Scalar Arguments ..
 *       DOUBLE PRECISION   X, Y, Z
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -63171,22 +63633,22 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date September 2012
+*> \date December 2016
 *
-*> \ingroup auxOTHERauxiliary
+*> \ingroup OTHERauxiliary
 *
 *  =====================================================================
       DOUBLE PRECISION FUNCTION DLAPY3( X, Y, Z )
 *
-*  -- LAPACK auxiliary routine (version 3.4.2) --
+*  -- LAPACK auxiliary routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     September 2012
+*     December 2016
 *
 *     .. Scalar Arguments ..
       DOUBLE PRECISION   X, Y, Z
@@ -63228,25 +63690,25 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DLAQGB + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dlaqgb.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dlaqgb.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dlaqgb.f"> 
+*> Download DLAQGB + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dlaqgb.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dlaqgb.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dlaqgb.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       SUBROUTINE DLAQGB( M, N, KL, KU, AB, LDAB, R, C, ROWCND, COLCND,
 *                          AMAX, EQUED )
-* 
+*
 *       .. Scalar Arguments ..
 *       CHARACTER          EQUED
 *       INTEGER            KL, KU, LDAB, M, N
@@ -63255,7 +63717,7 @@
 *       .. Array Arguments ..
 *       DOUBLE PRECISION   AB( LDAB, * ), C( * ), R( * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -63372,12 +63834,12 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date September 2012
+*> \date December 2016
 *
 *> \ingroup doubleGBauxiliary
 *
@@ -63385,10 +63847,10 @@
       SUBROUTINE DLAQGB( M, N, KL, KU, AB, LDAB, R, C, ROWCND, COLCND,
      $                   AMAX, EQUED )
 *
-*  -- LAPACK auxiliary routine (version 3.4.2) --
+*  -- LAPACK auxiliary routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     September 2012
+*     December 2016
 *
 *     .. Scalar Arguments ..
       CHARACTER          EQUED
@@ -63484,25 +63946,25 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DLAQGE + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dlaqge.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dlaqge.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dlaqge.f"> 
+*> Download DLAQGE + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dlaqge.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dlaqge.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dlaqge.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       SUBROUTINE DLAQGE( M, N, A, LDA, R, C, ROWCND, COLCND, AMAX,
 *                          EQUED )
-* 
+*
 *       .. Scalar Arguments ..
 *       CHARACTER          EQUED
 *       INTEGER            LDA, M, N
@@ -63511,7 +63973,7 @@
 *       .. Array Arguments ..
 *       DOUBLE PRECISION   A( LDA, * ), C( * ), R( * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -63611,12 +64073,12 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date September 2012
+*> \date December 2016
 *
 *> \ingroup doubleGEauxiliary
 *
@@ -63624,10 +64086,10 @@
       SUBROUTINE DLAQGE( M, N, A, LDA, R, C, ROWCND, COLCND, AMAX,
      $                   EQUED )
 *
-*  -- LAPACK auxiliary routine (version 3.4.2) --
+*  -- LAPACK auxiliary routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     September 2012
+*     December 2016
 *
 *     .. Scalar Arguments ..
       CHARACTER          EQUED
@@ -63720,25 +64182,25 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DLAQP2 + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dlaqp2.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dlaqp2.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dlaqp2.f"> 
+*> Download DLAQP2 + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dlaqp2.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dlaqp2.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dlaqp2.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       SUBROUTINE DLAQP2( M, N, OFFSET, A, LDA, JPVT, TAU, VN1, VN2,
 *                          WORK )
-* 
+*
 *       .. Scalar Arguments ..
 *       INTEGER            LDA, M, N, OFFSET
 *       ..
@@ -63747,7 +64209,7 @@
 *       DOUBLE PRECISION   A( LDA, * ), TAU( * ), VN1( * ), VN2( * ),
 *      $                   WORK( * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -63785,7 +64247,7 @@
 *> \verbatim
 *>          A is DOUBLE PRECISION array, dimension (LDA,N)
 *>          On entry, the M-by-N matrix A.
-*>          On exit, the upper triangle of block A(OFFSET+1:M,1:N) is 
+*>          On exit, the upper triangle of block A(OFFSET+1:M,1:N) is
 *>          the triangular factor obtained; the elements in block
 *>          A(OFFSET+1:M,1:N) below the diagonal, together with the
 *>          array TAU, represent the orthogonal matrix Q as a product of
@@ -63835,12 +64297,12 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date November 2013
+*> \date December 2016
 *
 *> \ingroup doubleOTHERauxiliary
 *
@@ -63860,17 +64322,17 @@
 *> LAPACK Working Note 176
 *
 *> \htmlonly
-*> <a href="http://www.netlib.org/lapack/lawnspdf/lawn176.pdf">[PDF]</a> 
-*> \endhtmlonly 
+*> <a href="http://www.netlib.org/lapack/lawnspdf/lawn176.pdf">[PDF]</a>
+*> \endhtmlonly
 *
 *  =====================================================================
       SUBROUTINE DLAQP2( M, N, OFFSET, A, LDA, JPVT, TAU, VN1, VN2,
      $                   WORK )
 *
-*  -- LAPACK auxiliary routine (version 3.5.0) --
+*  -- LAPACK auxiliary routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     November 2013
+*     December 2016
 *
 *     .. Scalar Arguments ..
       INTEGER            LDA, M, N, OFFSET
@@ -63982,25 +64444,25 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DLAQPS + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dlaqps.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dlaqps.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dlaqps.f"> 
+*> Download DLAQPS + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dlaqps.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dlaqps.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dlaqps.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       SUBROUTINE DLAQPS( M, N, OFFSET, NB, KB, A, LDA, JPVT, TAU, VN1,
 *                          VN2, AUXV, F, LDF )
-* 
+*
 *       .. Scalar Arguments ..
 *       INTEGER            KB, LDA, LDF, M, N, NB, OFFSET
 *       ..
@@ -64009,7 +64471,7 @@
 *       DOUBLE PRECISION   A( LDA, * ), AUXV( * ), F( LDF, * ), TAU( * ),
 *      $                   VN1( * ), VN2( * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -64125,12 +64587,12 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date September 2012
+*> \date December 2016
 *
 *> \ingroup doubleOTHERauxiliary
 *
@@ -64150,17 +64612,17 @@
 *> LAPACK Working Note 176
 *
 *> \htmlonly
-*> <a href="http://www.netlib.org/lapack/lawnspdf/lawn176.pdf">[PDF]</a> 
-*> \endhtmlonly 
+*> <a href="http://www.netlib.org/lapack/lawnspdf/lawn176.pdf">[PDF]</a>
+*> \endhtmlonly
 *
 *  =====================================================================
       SUBROUTINE DLAQPS( M, N, OFFSET, NB, KB, A, LDA, JPVT, TAU, VN1,
      $                   VN2, AUXV, F, LDF )
 *
-*  -- LAPACK auxiliary routine (version 3.4.2) --
+*  -- LAPACK auxiliary routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     September 2012
+*     December 2016
 *
 *     .. Scalar Arguments ..
       INTEGER            KB, LDA, LDF, M, N, NB, OFFSET
@@ -64322,9 +64784,9 @@
          ITEMP = NINT( VN2( LSTICC ) )
          VN1( LSTICC ) = DNRM2( M-RK, A( RK+1, LSTICC ), 1 )
 *
-*        NOTE: The computation of VN1( LSTICC ) relies on the fact that 
+*        NOTE: The computation of VN1( LSTICC ) relies on the fact that
 *        SNRM2 does not fail on vectors with norm below the value of
-*        SQRT(DLAMCH('S')) 
+*        SQRT(DLAMCH('S'))
 *
          VN2( LSTICC ) = VN1( LSTICC )
          LSTICC = ITEMP
@@ -64340,25 +64802,25 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DLAQR0 + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dlaqr0.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dlaqr0.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dlaqr0.f"> 
+*> Download DLAQR0 + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dlaqr0.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dlaqr0.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dlaqr0.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       SUBROUTINE DLAQR0( WANTT, WANTZ, N, ILO, IHI, H, LDH, WR, WI,
 *                          ILOZ, IHIZ, Z, LDZ, WORK, LWORK, INFO )
-* 
+*
 *       .. Scalar Arguments ..
 *       INTEGER            IHI, IHIZ, ILO, ILOZ, INFO, LDH, LDZ, LWORK, N
 *       LOGICAL            WANTT, WANTZ
@@ -64367,7 +64829,7 @@
 *       DOUBLE PRECISION   H( LDH, * ), WI( * ), WORK( * ), WR( * ),
 *      $                   Z( LDZ, * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -64581,12 +65043,12 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date September 2012
+*> \date December 2016
 *
 *> \ingroup doubleOTHERauxiliary
 *
@@ -64594,10 +65056,10 @@
       SUBROUTINE DLAQR0( WANTT, WANTZ, N, ILO, IHI, H, LDH, WR, WI,
      $                   ILOZ, IHIZ, Z, LDZ, WORK, LWORK, INFO )
 *
-*  -- LAPACK auxiliary routine (version 3.4.2) --
+*  -- LAPACK auxiliary routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     September 2012
+*     December 2016
 *
 *     .. Scalar Arguments ..
       INTEGER            IHI, IHIZ, ILO, ILOZ, INFO, LDH, LDZ, LWORK, N
@@ -65080,24 +65542,24 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DLAQR1 + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dlaqr1.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dlaqr1.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dlaqr1.f"> 
+*> Download DLAQR1 + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dlaqr1.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dlaqr1.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dlaqr1.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       SUBROUTINE DLAQR1( N, H, LDH, SR1, SI1, SR2, SI2, V )
-* 
+*
 *       .. Scalar Arguments ..
 *       DOUBLE PRECISION   SI1, SI2, SR1, SR2
 *       INTEGER            LDH, N
@@ -65105,7 +65567,7 @@
 *       .. Array Arguments ..
 *       DOUBLE PRECISION   H( LDH, * ), V( * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -65181,12 +65643,12 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date September 2012
+*> \date December 2016
 *
 *> \ingroup doubleOTHERauxiliary
 *
@@ -65199,10 +65661,10 @@
 *  =====================================================================
       SUBROUTINE DLAQR1( N, H, LDH, SR1, SI1, SR2, SI2, V )
 *
-*  -- LAPACK auxiliary routine (version 3.4.2) --
+*  -- LAPACK auxiliary routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     September 2012
+*     December 2016
 *
 *     .. Scalar Arguments ..
       DOUBLE PRECISION   SI1, SI2, SR1, SR2
@@ -65259,18 +65721,18 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DLAQR2 + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dlaqr2.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dlaqr2.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dlaqr2.f"> 
+*> Download DLAQR2 + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dlaqr2.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dlaqr2.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dlaqr2.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
@@ -65278,7 +65740,7 @@
 *       SUBROUTINE DLAQR2( WANTT, WANTZ, N, KTOP, KBOT, NW, H, LDH, ILOZ,
 *                          IHIZ, Z, LDZ, NS, ND, SR, SI, V, LDV, NH, T,
 *                          LDT, NV, WV, LDWV, WORK, LWORK )
-* 
+*
 *       .. Scalar Arguments ..
 *       INTEGER            IHIZ, ILOZ, KBOT, KTOP, LDH, LDT, LDV, LDWV,
 *      $                   LDZ, LWORK, N, ND, NH, NS, NV, NW
@@ -65289,7 +65751,7 @@
 *      $                   V( LDV, * ), WORK( * ), WV( LDWV, * ),
 *      $                   Z( LDZ, * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -65398,7 +65860,7 @@
 *>          Z is DOUBLE PRECISION array, dimension (LDZ,N)
 *>          IF WANTZ is .TRUE., then on output, the orthogonal
 *>          similarity transformation mentioned above has been
-*>          accumulated into Z(ILOZ:IHIZ,ILO:IHI) from the right.
+*>          accumulated into Z(ILOZ:IHIZ,ILOZ:IHIZ) from the right.
 *>          If WANTZ is .FALSE., then Z is unreferenced.
 *> \endverbatim
 *>
@@ -65515,12 +65977,12 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date September 2012
+*> \date December 2016
 *
 *> \ingroup doubleOTHERauxiliary
 *
@@ -65535,10 +65997,10 @@
      $                   IHIZ, Z, LDZ, NS, ND, SR, SI, V, LDV, NH, T,
      $                   LDT, NV, WV, LDWV, WORK, LWORK )
 *
-*  -- LAPACK auxiliary routine (version 3.4.2) --
+*  -- LAPACK auxiliary routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     September 2012
+*     December 2016
 *
 *     .. Scalar Arguments ..
       INTEGER            IHIZ, ILOZ, KBOT, KTOP, LDH, LDT, LDV, LDWV,
@@ -65943,18 +66405,18 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DLAQR3 + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dlaqr3.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dlaqr3.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dlaqr3.f"> 
+*> Download DLAQR3 + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dlaqr3.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dlaqr3.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dlaqr3.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
@@ -65962,7 +66424,7 @@
 *       SUBROUTINE DLAQR3( WANTT, WANTZ, N, KTOP, KBOT, NW, H, LDH, ILOZ,
 *                          IHIZ, Z, LDZ, NS, ND, SR, SI, V, LDV, NH, T,
 *                          LDT, NV, WV, LDWV, WORK, LWORK )
-* 
+*
 *       .. Scalar Arguments ..
 *       INTEGER            IHIZ, ILOZ, KBOT, KTOP, LDH, LDT, LDV, LDWV,
 *      $                   LDZ, LWORK, N, ND, NH, NS, NV, NW
@@ -65973,7 +66435,7 @@
 *      $                   V( LDV, * ), WORK( * ), WV( LDWV, * ),
 *      $                   Z( LDZ, * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -66079,7 +66541,7 @@
 *>          Z is DOUBLE PRECISION array, dimension (LDZ,N)
 *>          IF WANTZ is .TRUE., then on output, the orthogonal
 *>          similarity transformation mentioned above has been
-*>          accumulated into Z(ILOZ:IHIZ,ILO:IHI) from the right.
+*>          accumulated into Z(ILOZ:IHIZ,ILOZ:IHIZ) from the right.
 *>          If WANTZ is .FALSE., then Z is unreferenced.
 *> \endverbatim
 *>
@@ -66196,12 +66658,12 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date September 2012
+*> \date June 2016
 *
 *> \ingroup doubleOTHERauxiliary
 *
@@ -66216,10 +66678,10 @@
      $                   IHIZ, Z, LDZ, NS, ND, SR, SI, V, LDV, NH, T,
      $                   LDT, NV, WV, LDWV, WORK, LWORK )
 *
-*  -- LAPACK auxiliary routine (version 3.4.2) --
+*  -- LAPACK auxiliary routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     September 2012
+*     June 2016
 *
 *     .. Scalar Arguments ..
       INTEGER            IHIZ, ILOZ, KBOT, KTOP, LDH, LDT, LDV, LDWV,
@@ -66638,25 +67100,25 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DLAQR4 + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dlaqr4.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dlaqr4.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dlaqr4.f"> 
+*> Download DLAQR4 + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dlaqr4.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dlaqr4.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dlaqr4.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       SUBROUTINE DLAQR4( WANTT, WANTZ, N, ILO, IHI, H, LDH, WR, WI,
 *                          ILOZ, IHIZ, Z, LDZ, WORK, LWORK, INFO )
-* 
+*
 *       .. Scalar Arguments ..
 *       INTEGER            IHI, IHIZ, ILO, ILOZ, INFO, LDH, LDZ, LWORK, N
 *       LOGICAL            WANTT, WANTZ
@@ -66665,7 +67127,7 @@
 *       DOUBLE PRECISION   H( LDH, * ), WI( * ), WORK( * ), WR( * ),
 *      $                   Z( LDZ, * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -66868,12 +67330,12 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date September 2012
+*> \date December 2016
 *
 *> \ingroup doubleOTHERauxiliary
 *
@@ -66899,10 +67361,10 @@
       SUBROUTINE DLAQR4( WANTT, WANTZ, N, ILO, IHI, H, LDH, WR, WI,
      $                   ILOZ, IHIZ, Z, LDZ, WORK, LWORK, INFO )
 *
-*  -- LAPACK auxiliary routine (version 3.4.2) --
+*  -- LAPACK auxiliary routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     September 2012
+*     December 2016
 *
 *     .. Scalar Arguments ..
       INTEGER            IHI, IHIZ, ILO, ILOZ, INFO, LDH, LDZ, LWORK, N
@@ -67377,18 +67839,18 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DLAQR5 + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dlaqr5.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dlaqr5.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dlaqr5.f"> 
+*> Download DLAQR5 + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dlaqr5.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dlaqr5.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dlaqr5.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
@@ -67396,7 +67858,7 @@
 *       SUBROUTINE DLAQR5( WANTT, WANTZ, KACC22, N, KTOP, KBOT, NSHFTS,
 *                          SR, SI, H, LDH, ILOZ, IHIZ, Z, LDZ, V, LDV, U,
 *                          LDU, NV, WV, LDWV, NH, WH, LDWH )
-* 
+*
 *       .. Scalar Arguments ..
 *       INTEGER            IHIZ, ILOZ, KACC22, KBOT, KTOP, LDH, LDU, LDV,
 *      $                   LDWH, LDWV, LDZ, N, NH, NSHFTS, NV
@@ -67407,7 +67869,7 @@
 *      $                   V( LDV, * ), WH( LDWH, * ), WV( LDWV, * ),
 *      $                   Z( LDZ, * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -67525,10 +67987,10 @@
 *>
 *> \param[in,out] Z
 *> \verbatim
-*>          Z is DOUBLE PRECISION array of size (LDZ,IHI)
+*>          Z is DOUBLE PRECISION array of size (LDZ,IHIZ)
 *>             If WANTZ = .TRUE., then the QR Sweep orthogonal
 *>             similarity transformation is accumulated into
-*>             Z(ILOZ:IHIZ,ILO:IHI) from the right.
+*>             Z(ILOZ:IHIZ,ILOZ:IHIZ) from the right.
 *>             If WANTZ = .FALSE., then Z is unreferenced.
 *> \endverbatim
 *>
@@ -67606,12 +68068,12 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date September 2012
+*> \date June 2016
 *
 *> \ingroup doubleOTHERauxiliary
 *
@@ -67634,10 +68096,10 @@
      $                   SR, SI, H, LDH, ILOZ, IHIZ, Z, LDZ, V, LDV, U,
      $                   LDU, NV, WV, LDWV, NH, WH, LDWH )
 *
-*  -- LAPACK auxiliary routine (version 3.4.2) --
+*  -- LAPACK auxiliary routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     September 2012
+*     June 2016
 *
 *     .. Scalar Arguments ..
       INTEGER            IHIZ, ILOZ, KACC22, KBOT, KTOP, LDH, LDU, LDV,
@@ -68298,24 +68760,24 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DLAQSB + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dlaqsb.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dlaqsb.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dlaqsb.f"> 
+*> Download DLAQSB + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dlaqsb.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dlaqsb.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dlaqsb.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       SUBROUTINE DLAQSB( UPLO, N, KD, AB, LDAB, S, SCOND, AMAX, EQUED )
-* 
+*
 *       .. Scalar Arguments ..
 *       CHARACTER          EQUED, UPLO
 *       INTEGER            KD, LDAB, N
@@ -68324,7 +68786,7 @@
 *       .. Array Arguments ..
 *       DOUBLE PRECISION   AB( LDAB, * ), S( * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -68424,22 +68886,22 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date September 2012
+*> \date December 2016
 *
 *> \ingroup doubleOTHERauxiliary
 *
 *  =====================================================================
       SUBROUTINE DLAQSB( UPLO, N, KD, AB, LDAB, S, SCOND, AMAX, EQUED )
 *
-*  -- LAPACK auxiliary routine (version 3.4.2) --
+*  -- LAPACK auxiliary routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     September 2012
+*     December 2016
 *
 *     .. Scalar Arguments ..
       CHARACTER          EQUED, UPLO
@@ -68524,24 +68986,24 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DLAQSP + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dlaqsp.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dlaqsp.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dlaqsp.f"> 
+*> Download DLAQSP + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dlaqsp.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dlaqsp.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dlaqsp.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       SUBROUTINE DLAQSP( UPLO, N, AP, S, SCOND, AMAX, EQUED )
-* 
+*
 *       .. Scalar Arguments ..
 *       CHARACTER          EQUED, UPLO
 *       INTEGER            N
@@ -68550,7 +69012,7 @@
 *       .. Array Arguments ..
 *       DOUBLE PRECISION   AP( * ), S( * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -68635,22 +69097,22 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date September 2012
+*> \date December 2016
 *
 *> \ingroup doubleOTHERauxiliary
 *
 *  =====================================================================
       SUBROUTINE DLAQSP( UPLO, N, AP, S, SCOND, AMAX, EQUED )
 *
-*  -- LAPACK auxiliary routine (version 3.4.2) --
+*  -- LAPACK auxiliary routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     September 2012
+*     December 2016
 *
 *     .. Scalar Arguments ..
       CHARACTER          EQUED, UPLO
@@ -68736,24 +69198,24 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DLAQSY + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dlaqsy.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dlaqsy.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dlaqsy.f"> 
+*> Download DLAQSY + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dlaqsy.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dlaqsy.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dlaqsy.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       SUBROUTINE DLAQSY( UPLO, N, A, LDA, S, SCOND, AMAX, EQUED )
-* 
+*
 *       .. Scalar Arguments ..
 *       CHARACTER          EQUED, UPLO
 *       INTEGER            LDA, N
@@ -68762,7 +69224,7 @@
 *       .. Array Arguments ..
 *       DOUBLE PRECISION   A( LDA, * ), S( * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -68855,22 +69317,22 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date September 2012
+*> \date December 2016
 *
 *> \ingroup doubleSYauxiliary
 *
 *  =====================================================================
       SUBROUTINE DLAQSY( UPLO, N, A, LDA, S, SCOND, AMAX, EQUED )
 *
-*  -- LAPACK auxiliary routine (version 3.4.2) --
+*  -- LAPACK auxiliary routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     September 2012
+*     December 2016
 *
 *     .. Scalar Arguments ..
       CHARACTER          EQUED, UPLO
@@ -68952,25 +69414,25 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DLAQTR + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dlaqtr.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dlaqtr.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dlaqtr.f"> 
+*> Download DLAQTR + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dlaqtr.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dlaqtr.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dlaqtr.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       SUBROUTINE DLAQTR( LTRAN, LREAL, N, T, LDT, B, W, SCALE, X, WORK,
 *                          INFO )
-* 
+*
 *       .. Scalar Arguments ..
 *       LOGICAL            LREAL, LTRAN
 *       INTEGER            INFO, LDT, N
@@ -68979,7 +69441,7 @@
 *       .. Array Arguments ..
 *       DOUBLE PRECISION   B( * ), T( LDT, * ), WORK( * ), X( * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -69102,12 +69564,12 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date September 2012
+*> \date December 2016
 *
 *> \ingroup doubleOTHERauxiliary
 *
@@ -69115,10 +69577,10 @@
       SUBROUTINE DLAQTR( LTRAN, LREAL, N, T, LDT, B, W, SCALE, X, WORK,
      $                   INFO )
 *
-*  -- LAPACK auxiliary routine (version 3.4.2) --
+*  -- LAPACK auxiliary routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     September 2012
+*     December 2016
 *
 *     .. Scalar Arguments ..
       LOGICAL            LREAL, LTRAN
@@ -69700,18 +70162,18 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DLAR1V + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dlar1v.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dlar1v.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dlar1v.f"> 
+*> Download DLAR1V + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dlar1v.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dlar1v.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dlar1v.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
@@ -69719,7 +70181,7 @@
 *       SUBROUTINE DLAR1V( N, B1, BN, LAMBDA, D, L, LD, LLD,
 *                  PIVMIN, GAPTOL, Z, WANTNC, NEGCNT, ZTZ, MINGMA,
 *                  R, ISUPPZ, NRMINV, RESID, RQCORR, WORK )
-* 
+*
 *       .. Scalar Arguments ..
 *       LOGICAL            WANTNC
 *       INTEGER   B1, BN, N, NEGCNT, R
@@ -69732,7 +70194,7 @@
 *      $                  WORK( * )
 *       DOUBLE PRECISION Z( * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -69905,12 +70367,12 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date September 2012
+*> \date December 2016
 *
 *> \ingroup doubleOTHERauxiliary
 *
@@ -69928,10 +70390,10 @@
      $           PIVMIN, GAPTOL, Z, WANTNC, NEGCNT, ZTZ, MINGMA,
      $           R, ISUPPZ, NRMINV, RESID, RQCORR, WORK )
 *
-*  -- LAPACK auxiliary routine (version 3.4.2) --
+*  -- LAPACK auxiliary routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     September 2012
+*     December 2016
 *
 *     .. Scalar Arguments ..
       LOGICAL            WANTNC
@@ -70186,31 +70648,31 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DLAR2V + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dlar2v.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dlar2v.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dlar2v.f"> 
+*> Download DLAR2V + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dlar2v.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dlar2v.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dlar2v.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       SUBROUTINE DLAR2V( N, X, Y, Z, INCX, C, S, INCC )
-* 
+*
 *       .. Scalar Arguments ..
 *       INTEGER            INCC, INCX, N
 *       ..
 *       .. Array Arguments ..
 *       DOUBLE PRECISION   C( * ), S( * ), X( * ), Y( * ), Z( * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -70282,22 +70744,22 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date September 2012
+*> \date December 2016
 *
 *> \ingroup doubleOTHERauxiliary
 *
 *  =====================================================================
       SUBROUTINE DLAR2V( N, X, Y, Z, INCX, C, S, INCC )
 *
-*  -- LAPACK auxiliary routine (version 3.4.2) --
+*  -- LAPACK auxiliary routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     September 2012
+*     December 2016
 *
 *     .. Scalar Arguments ..
       INTEGER            INCC, INCX, N
@@ -70343,24 +70805,24 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DLARF + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dlarf.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dlarf.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dlarf.f"> 
+*> Download DLARF + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dlarf.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dlarf.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dlarf.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       SUBROUTINE DLARF( SIDE, M, N, V, INCV, TAU, C, LDC, WORK )
-* 
+*
 *       .. Scalar Arguments ..
 *       CHARACTER          SIDE
 *       INTEGER            INCV, LDC, M, N
@@ -70369,7 +70831,7 @@
 *       .. Array Arguments ..
 *       DOUBLE PRECISION   C( LDC, * ), V( * ), WORK( * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -70453,22 +70915,22 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date September 2012
+*> \date December 2016
 *
 *> \ingroup doubleOTHERauxiliary
 *
 *  =====================================================================
       SUBROUTINE DLARF( SIDE, M, N, V, INCV, TAU, C, LDC, WORK )
 *
-*  -- LAPACK auxiliary routine (version 3.4.2) --
+*  -- LAPACK auxiliary routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     September 2012
+*     December 2016
 *
 *     .. Scalar Arguments ..
       CHARACTER          SIDE
@@ -70570,25 +71032,25 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DLARFB + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dlarfb.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dlarfb.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dlarfb.f"> 
+*> Download DLARFB + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dlarfb.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dlarfb.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dlarfb.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       SUBROUTINE DLARFB( SIDE, TRANS, DIRECT, STOREV, M, N, K, V, LDV,
 *                          T, LDT, C, LDC, WORK, LDWORK )
-* 
+*
 *       .. Scalar Arguments ..
 *       CHARACTER          DIRECT, SIDE, STOREV, TRANS
 *       INTEGER            K, LDC, LDT, LDV, LDWORK, M, N
@@ -70597,7 +71059,7 @@
 *       DOUBLE PRECISION   C( LDC, * ), T( LDT, * ), V( LDV, * ),
 *      $                   WORK( LDWORK, * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -70722,10 +71184,10 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
 *> \date June 2013
 *
@@ -70763,7 +71225,7 @@
       SUBROUTINE DLARFB( SIDE, TRANS, DIRECT, STOREV, M, N, K, V, LDV,
      $                   T, LDT, C, LDC, WORK, LDWORK )
 *
-*  -- LAPACK auxiliary routine (version 3.5.0) --
+*  -- LAPACK auxiliary routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
 *     June 2013
@@ -71280,24 +71742,24 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DLARFG + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dlarfg.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dlarfg.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dlarfg.f"> 
+*> Download DLARFG + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dlarfg.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dlarfg.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dlarfg.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       SUBROUTINE DLARFG( N, ALPHA, X, INCX, TAU )
-* 
+*
 *       .. Scalar Arguments ..
 *       INTEGER            INCX, N
 *       DOUBLE PRECISION   ALPHA, TAU
@@ -71305,7 +71767,7 @@
 *       .. Array Arguments ..
 *       DOUBLE PRECISION   X( * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -71372,22 +71834,22 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date September 2012
+*> \date December 2016
 *
 *> \ingroup doubleOTHERauxiliary
 *
 *  =====================================================================
       SUBROUTINE DLARFG( N, ALPHA, X, INCX, TAU )
 *
-*  -- LAPACK auxiliary routine (version 3.4.2) --
+*  -- LAPACK auxiliary routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     September 2012
+*     December 2016
 *
 *     .. Scalar Arguments ..
       INTEGER            INCX, N
@@ -71472,28 +71934,28 @@
 *     End of DLARFG
 *
       END
-*> \brief \b DLARFGP generates an elementary reflector (Householder matrix) with non-negatibe beta.
+*> \brief \b DLARFGP generates an elementary reflector (Householder matrix) with non-negative beta.
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DLARFGP + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dlarfgp.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dlarfgp.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dlarfgp.f"> 
+*> Download DLARFGP + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dlarfgp.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dlarfgp.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dlarfgp.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       SUBROUTINE DLARFGP( N, ALPHA, X, INCX, TAU )
-* 
+*
 *       .. Scalar Arguments ..
 *       INTEGER            INCX, N
 *       DOUBLE PRECISION   ALPHA, TAU
@@ -71501,7 +71963,7 @@
 *       .. Array Arguments ..
 *       DOUBLE PRECISION   X( * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -71566,22 +72028,22 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date September 2012
+*> \date December 2016
 *
 *> \ingroup doubleOTHERauxiliary
 *
 *  =====================================================================
       SUBROUTINE DLARFGP( N, ALPHA, X, INCX, TAU )
 *
-*  -- LAPACK auxiliary routine (version 3.4.2) --
+*  -- LAPACK auxiliary routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     September 2012
+*     December 2016
 *
 *     .. Scalar Arguments ..
       INTEGER            INCX, N
@@ -71677,7 +72139,7 @@
          IF ( ABS(TAU).LE.SMLNUM ) THEN
 *
 *           In the case where the computed TAU ends up being a denormalized number,
-*           it loses relative accuracy. This is a BIG problem. Solution: flush TAU 
+*           it loses relative accuracy. This is a BIG problem. Solution: flush TAU
 *           to ZERO. This explains the next IF statement.
 *
 *           (Bug report provided by Pat Quillen from MathWorks on Jul 29, 2009.)
@@ -71693,7 +72155,7 @@
                BETA = -SAVEALPHA
             END IF
 *
-         ELSE 
+         ELSE
 *
 *           This is the general case.
 *
@@ -71718,24 +72180,24 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DLARFT + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dlarft.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dlarft.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dlarft.f"> 
+*> Download DLARFT + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dlarft.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dlarft.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dlarft.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       SUBROUTINE DLARFT( DIRECT, STOREV, N, K, V, LDV, TAU, T, LDT )
-* 
+*
 *       .. Scalar Arguments ..
 *       CHARACTER          DIRECT, STOREV
 *       INTEGER            K, LDT, LDV, N
@@ -71743,7 +72205,7 @@
 *       .. Array Arguments ..
 *       DOUBLE PRECISION   T( LDT, * ), TAU( * ), V( LDV, * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -71841,12 +72303,12 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date September 2012
+*> \date December 2016
 *
 *> \ingroup doubleOTHERauxiliary
 *
@@ -71879,10 +72341,10 @@
 *  =====================================================================
       SUBROUTINE DLARFT( DIRECT, STOREV, N, K, V, LDV, TAU, T, LDT )
 *
-*  -- LAPACK auxiliary routine (version 3.4.2) --
+*  -- LAPACK auxiliary routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     September 2012
+*     December 2016
 *
 *     .. Scalar Arguments ..
       CHARACTER          DIRECT, STOREV
@@ -71937,13 +72399,13 @@
                   END DO
                   DO J = 1, I-1
                      T( J, I ) = -TAU( I ) * V( I , J )
-                  END DO   
+                  END DO
                   J = MIN( LASTV, PREVLASTV )
 *
 *                 T(1:i-1,i) := - tau(i) * V(i:j,1:i-1)**T * V(i:j,i)
 *
-                  CALL DGEMV( 'Transpose', J-I, I-1, -TAU( I ), 
-     $                        V( I+1, 1 ), LDV, V( I+1, I ), 1, ONE, 
+                  CALL DGEMV( 'Transpose', J-I, I-1, -TAU( I ),
+     $                        V( I+1, 1 ), LDV, V( I+1, I ), 1, ONE,
      $                        T( 1, I ), 1 )
                ELSE
 *                 Skip any trailing zeros.
@@ -71952,7 +72414,7 @@
                   END DO
                   DO J = 1, I-1
                      T( J, I ) = -TAU( I ) * V( J , I )
-                  END DO   
+                  END DO
                   J = MIN( LASTV, PREVLASTV )
 *
 *                 T(1:i-1,i) := - tau(i) * V(1:i-1,i:j) * V(i,i:j)**T
@@ -71996,7 +72458,7 @@
                      END DO
                      DO J = I+1, K
                         T( J, I ) = -TAU( I ) * V( N-K+I , J )
-                     END DO   
+                     END DO
                      J = MAX( LASTV, PREVLASTV )
 *
 *                    T(i+1:k,i) = -tau(i) * V(j:n-k+i,i+1:k)**T * V(j:n-k+i,i)
@@ -72011,7 +72473,7 @@
                      END DO
                      DO J = I+1, K
                         T( J, I ) = -TAU( I ) * V( J, N-K+I )
-                     END DO   
+                     END DO
                      J = MAX( LASTV, PREVLASTV )
 *
 *                    T(i+1:k,i) = -tau(i) * V(i+1:k,j:n-k+i) * V(i,j:n-k+i)**T
@@ -72044,24 +72506,24 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DLARFX + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dlarfx.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dlarfx.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dlarfx.f"> 
+*> Download DLARFX + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dlarfx.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dlarfx.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dlarfx.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       SUBROUTINE DLARFX( SIDE, M, N, V, TAU, C, LDC, WORK )
-* 
+*
 *       .. Scalar Arguments ..
 *       CHARACTER          SIDE
 *       INTEGER            LDC, M, N
@@ -72070,7 +72532,7 @@
 *       .. Array Arguments ..
 *       DOUBLE PRECISION   C( LDC, * ), V( * ), WORK( * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -72150,22 +72612,22 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date September 2012
+*> \date December 2016
 *
 *> \ingroup doubleOTHERauxiliary
 *
 *  =====================================================================
       SUBROUTINE DLARFX( SIDE, M, N, V, TAU, C, LDC, WORK )
 *
-*  -- LAPACK auxiliary routine (version 3.4.2) --
+*  -- LAPACK auxiliary routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     September 2012
+*     December 2016
 *
 *     .. Scalar Arguments ..
       CHARACTER          SIDE
@@ -72741,31 +73203,31 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DLARGV + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dlargv.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dlargv.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dlargv.f"> 
+*> Download DLARGV + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dlargv.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dlargv.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dlargv.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       SUBROUTINE DLARGV( N, X, INCX, Y, INCY, C, INCC )
-* 
+*
 *       .. Scalar Arguments ..
 *       INTEGER            INCC, INCX, INCY, N
 *       ..
 *       .. Array Arguments ..
 *       DOUBLE PRECISION   C( * ), X( * ), Y( * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -72831,22 +73293,22 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date September 2012
+*> \date December 2016
 *
 *> \ingroup doubleOTHERauxiliary
 *
 *  =====================================================================
       SUBROUTINE DLARGV( N, X, INCX, Y, INCY, C, INCC )
 *
-*  -- LAPACK auxiliary routine (version 3.4.2) --
+*  -- LAPACK auxiliary routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     September 2012
+*     December 2016
 *
 *     .. Scalar Arguments ..
       INTEGER            INCC, INCX, INCY, N
@@ -72908,24 +73370,24 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DLARNV + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dlarnv.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dlarnv.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dlarnv.f"> 
+*> Download DLARNV + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dlarnv.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dlarnv.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dlarnv.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       SUBROUTINE DLARNV( IDIST, ISEED, N, X )
-* 
+*
 *       .. Scalar Arguments ..
 *       INTEGER            IDIST, N
 *       ..
@@ -72933,7 +73395,7 @@
 *       INTEGER            ISEED( 4 )
 *       DOUBLE PRECISION   X( * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -72980,14 +73442,14 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date September 2012
+*> \date December 2016
 *
-*> \ingroup auxOTHERauxiliary
+*> \ingroup OTHERauxiliary
 *
 *> \par Further Details:
 *  =====================
@@ -73003,10 +73465,10 @@
 *  =====================================================================
       SUBROUTINE DLARNV( IDIST, ISEED, N, X )
 *
-*  -- LAPACK auxiliary routine (version 3.4.2) --
+*  -- LAPACK auxiliary routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     September 2012
+*     December 2016
 *
 *     .. Scalar Arguments ..
       INTEGER            IDIST, N
@@ -73086,25 +73548,25 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DLARRA + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dlarra.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dlarra.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dlarra.f"> 
+*> Download DLARRA + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dlarra.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dlarra.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dlarra.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       SUBROUTINE DLARRA( N, D, E, E2, SPLTOL, TNRM,
 *                           NSPLIT, ISPLIT, INFO )
-* 
+*
 *       .. Scalar Arguments ..
 *       INTEGER            INFO, N, NSPLIT
 *       DOUBLE PRECISION    SPLTOL, TNRM
@@ -73113,7 +73575,7 @@
 *       INTEGER            ISPLIT( * )
 *       DOUBLE PRECISION   D( * ), E( * ), E2( * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -73198,14 +73660,14 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date September 2012
+*> \date December 2016
 *
-*> \ingroup auxOTHERauxiliary
+*> \ingroup OTHERauxiliary
 *
 *> \par Contributors:
 *  ==================
@@ -73220,10 +73682,10 @@
       SUBROUTINE DLARRA( N, D, E, E2, SPLTOL, TNRM,
      $                    NSPLIT, ISPLIT, INFO )
 *
-*  -- LAPACK auxiliary routine (version 3.4.2) --
+*  -- LAPACK auxiliary routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     September 2012
+*     December 2016
 *
 *     .. Scalar Arguments ..
       INTEGER            INFO, N, NSPLIT
@@ -73290,18 +73752,18 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DLARRB + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dlarrb.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dlarrb.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dlarrb.f"> 
+*> Download DLARRB + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dlarrb.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dlarrb.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dlarrb.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
@@ -73309,7 +73771,7 @@
 *       SUBROUTINE DLARRB( N, D, LLD, IFIRST, ILAST, RTOL1,
 *                          RTOL2, OFFSET, W, WGAP, WERR, WORK, IWORK,
 *                          PIVMIN, SPDIAM, TWIST, INFO )
-* 
+*
 *       .. Scalar Arguments ..
 *       INTEGER            IFIRST, ILAST, INFO, N, OFFSET, TWIST
 *       DOUBLE PRECISION   PIVMIN, RTOL1, RTOL2, SPDIAM
@@ -73319,7 +73781,7 @@
 *       DOUBLE PRECISION   D( * ), LLD( * ), W( * ),
 *      $                   WERR( * ), WGAP( * ), WORK( * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -73461,14 +73923,14 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date September 2012
+*> \date December 2016
 *
-*> \ingroup auxOTHERauxiliary
+*> \ingroup OTHERauxiliary
 *
 *> \par Contributors:
 *  ==================
@@ -73484,10 +73946,10 @@
      $                   RTOL2, OFFSET, W, WGAP, WERR, WORK, IWORK,
      $                   PIVMIN, SPDIAM, TWIST, INFO )
 *
-*  -- LAPACK auxiliary routine (version 3.4.2) --
+*  -- LAPACK auxiliary routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     September 2012
+*     December 2016
 *
 *     .. Scalar Arguments ..
       INTEGER            IFIRST, ILAST, INFO, N, OFFSET, TWIST
@@ -73691,25 +74153,25 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DLARRC + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dlarrc.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dlarrc.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dlarrc.f"> 
+*> Download DLARRC + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dlarrc.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dlarrc.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dlarrc.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       SUBROUTINE DLARRC( JOBT, N, VL, VU, D, E, PIVMIN,
 *                                   EIGCNT, LCNT, RCNT, INFO )
-* 
+*
 *       .. Scalar Arguments ..
 *       CHARACTER          JOBT
 *       INTEGER            EIGCNT, INFO, LCNT, N, RCNT
@@ -73718,7 +74180,7 @@
 *       .. Array Arguments ..
 *       DOUBLE PRECISION   D( * ), E( * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -73749,12 +74211,13 @@
 *> \param[in] VL
 *> \verbatim
 *>          VL is DOUBLE PRECISION
+*>          The lower bound for the eigenvalues.
 *> \endverbatim
 *>
 *> \param[in] VU
 *> \verbatim
 *>          VU is DOUBLE PRECISION
-*>          The lower and upper bounds for the eigenvalues.
+*>          The upper bound for the eigenvalues.
 *> \endverbatim
 *>
 *> \param[in] D
@@ -73803,14 +74266,14 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date September 2012
+*> \date June 2016
 *
-*> \ingroup auxOTHERauxiliary
+*> \ingroup OTHERauxiliary
 *
 *> \par Contributors:
 *  ==================
@@ -73825,10 +74288,10 @@
       SUBROUTINE DLARRC( JOBT, N, VL, VU, D, E, PIVMIN,
      $                            EIGCNT, LCNT, RCNT, INFO )
 *
-*  -- LAPACK auxiliary routine (version 3.4.2) --
+*  -- LAPACK auxiliary routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     September 2012
+*     June 2016
 *
 *     .. Scalar Arguments ..
       CHARACTER          JOBT
@@ -73934,18 +74397,18 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DLARRD + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dlarrd.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dlarrd.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dlarrd.f"> 
+*> Download DLARRD + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dlarrd.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dlarrd.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dlarrd.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
@@ -73954,7 +74417,7 @@
 *                           RELTOL, D, E, E2, PIVMIN, NSPLIT, ISPLIT,
 *                           M, W, WERR, WL, WU, IBLOCK, INDEXW,
 *                           WORK, IWORK, INFO )
-* 
+*
 *       .. Scalar Arguments ..
 *       CHARACTER          ORDER, RANGE
 *       INTEGER            IL, INFO, IU, M, N, NSPLIT
@@ -73966,7 +74429,7 @@
 *       DOUBLE PRECISION   D( * ), E( * ), E2( * ),
 *      $                   GERS( * ), W( * ), WERR( * ), WORK( * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -74024,12 +74487,16 @@
 *> \param[in] VL
 *> \verbatim
 *>          VL is DOUBLE PRECISION
+*>          If RANGE='V', the lower bound of the interval to
+*>          be searched for eigenvalues.  Eigenvalues less than or equal
+*>          to VL, or greater than VU, will not be returned.  VL < VU.
+*>          Not referenced if RANGE = 'A' or 'I'.
 *> \endverbatim
 *>
 *> \param[in] VU
 *> \verbatim
 *>          VU is DOUBLE PRECISION
-*>          If RANGE='V', the lower and upper bounds of the interval to
+*>          If RANGE='V', the upper bound of the interval to
 *>          be searched for eigenvalues.  Eigenvalues less than or equal
 *>          to VL, or greater than VU, will not be returned.  VL < VU.
 *>          Not referenced if RANGE = 'A' or 'I'.
@@ -74038,13 +74505,17 @@
 *> \param[in] IL
 *> \verbatim
 *>          IL is INTEGER
+*>          If RANGE='I', the index of the
+*>          smallest eigenvalue to be returned.
+*>          1 <= IL <= IU <= N, if N > 0; IL = 1 and IU = 0 if N = 0.
+*>          Not referenced if RANGE = 'A' or 'V'.
 *> \endverbatim
 *>
 *> \param[in] IU
 *> \verbatim
 *>          IU is INTEGER
-*>          If RANGE='I', the indices (in ascending order) of the
-*>          smallest and largest eigenvalues to be returned.
+*>          If RANGE='I', the index of the
+*>          largest eigenvalue to be returned.
 *>          1 <= IL <= IU <= N, if N > 0; IL = 1 and IU = 0 if N = 0.
 *>          Not referenced if RANGE = 'A' or 'V'.
 *> \endverbatim
@@ -74238,14 +74709,14 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date September 2012
+*> \date June 2016
 *
-*> \ingroup auxOTHERauxiliary
+*> \ingroup OTHERauxiliary
 *
 *  =====================================================================
       SUBROUTINE DLARRD( RANGE, ORDER, N, VL, VU, IL, IU, GERS,
@@ -74253,10 +74724,10 @@
      $                    M, W, WERR, WL, WU, IBLOCK, INDEXW,
      $                    WORK, IWORK, INFO )
 *
-*  -- LAPACK auxiliary routine (version 3.4.2) --
+*  -- LAPACK auxiliary routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     September 2012
+*     June 2016
 *
 *     .. Scalar Arguments ..
       CHARACTER          ORDER, RANGE
@@ -74789,18 +75260,18 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DLARRE + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dlarre.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dlarre.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dlarre.f"> 
+*> Download DLARRE + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dlarre.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dlarre.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dlarre.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
@@ -74809,7 +75280,7 @@
 *                           RTOL1, RTOL2, SPLTOL, NSPLIT, ISPLIT, M,
 *                           W, WERR, WGAP, IBLOCK, INDEXW, GERS, PIVMIN,
 *                           WORK, IWORK, INFO )
-* 
+*
 *       .. Scalar Arguments ..
 *       CHARACTER          RANGE
 *       INTEGER            IL, INFO, IU, M, N, NSPLIT
@@ -74821,7 +75292,7 @@
 *       DOUBLE PRECISION   D( * ), E( * ), E2( * ), GERS( * ),
 *      $                   W( * ),WERR( * ), WGAP( * ), WORK( * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -74865,12 +75336,17 @@
 *> \param[in,out] VL
 *> \verbatim
 *>          VL is DOUBLE PRECISION
+*>          If RANGE='V', the lower bound for the eigenvalues.
+*>          Eigenvalues less than or equal to VL, or greater than VU,
+*>          will not be returned.  VL < VU.
+*>          If RANGE='I' or ='A', DLARRE computes bounds on the desired
+*>          part of the spectrum.
 *> \endverbatim
 *>
 *> \param[in,out] VU
 *> \verbatim
 *>          VU is DOUBLE PRECISION
-*>          If RANGE='V', the lower and upper bounds for the eigenvalues.
+*>          If RANGE='V', the upper bound for the eigenvalues.
 *>          Eigenvalues less than or equal to VL, or greater than VU,
 *>          will not be returned.  VL < VU.
 *>          If RANGE='I' or ='A', DLARRE computes bounds on the desired
@@ -74880,13 +75356,16 @@
 *> \param[in] IL
 *> \verbatim
 *>          IL is INTEGER
+*>          If RANGE='I', the index of the
+*>          smallest eigenvalue to be returned.
+*>          1 <= IL <= IU <= N.
 *> \endverbatim
 *>
 *> \param[in] IU
 *> \verbatim
 *>          IU is INTEGER
-*>          If RANGE='I', the indices (in ascending order) of the
-*>          smallest and largest eigenvalues to be returned.
+*>          If RANGE='I', the index of the
+*>          largest eigenvalue to be returned.
 *>          1 <= IL <= IU <= N.
 *> \endverbatim
 *>
@@ -75031,7 +75510,7 @@
 *> \verbatim
 *>          INFO is INTEGER
 *>          = 0:  successful exit
-*>          > 0:  A problem occured in DLARRE.
+*>          > 0:  A problem occurred in DLARRE.
 *>          < 0:  One of the called subroutines signaled an internal problem.
 *>                Needs inspection of the corresponding parameter IINFO
 *>                for further information.
@@ -75050,14 +75529,14 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date September 2012
+*> \date June 2016
 *
-*> \ingroup auxOTHERauxiliary
+*> \ingroup OTHERauxiliary
 *
 *> \par Further Details:
 *  =====================
@@ -75084,10 +75563,10 @@
      $                    W, WERR, WGAP, IBLOCK, INDEXW, GERS, PIVMIN,
      $                    WORK, IWORK, INFO )
 *
-*  -- LAPACK auxiliary routine (version 3.4.2) --
+*  -- LAPACK auxiliary routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     September 2012
+*     June 2016
 *
 *     .. Scalar Arguments ..
       CHARACTER          RANGE
@@ -75680,18 +76159,18 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DLARRF + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dlarrf.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dlarrf.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dlarrf.f"> 
+*> Download DLARRF + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dlarrf.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dlarrf.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dlarrf.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
@@ -75700,7 +76179,7 @@
 *                          W, WGAP, WERR,
 *                          SPDIAM, CLGAPL, CLGAPR, PIVMIN, SIGMA,
 *                          DPLUS, LPLUS, WORK, INFO )
-* 
+*
 *       .. Scalar Arguments ..
 *       INTEGER            CLSTRT, CLEND, INFO, N
 *       DOUBLE PRECISION   CLGAPL, CLGAPR, PIVMIN, SIGMA, SPDIAM
@@ -75709,7 +76188,7 @@
 *       DOUBLE PRECISION   D( * ), DPLUS( * ), L( * ), LD( * ),
 *      $          LPLUS( * ), W( * ), WGAP( * ), WERR( * ), WORK( * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -75729,7 +76208,7 @@
 *> \param[in] N
 *> \verbatim
 *>          N is INTEGER
-*>          The order of the matrix (subblock, if the matrix splitted).
+*>          The order of the matrix (subblock, if the matrix split).
 *> \endverbatim
 *>
 *> \param[in] D
@@ -75847,14 +76326,14 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date September 2012
+*> \date June 2016
 *
-*> \ingroup auxOTHERauxiliary
+*> \ingroup OTHERauxiliary
 *
 *> \par Contributors:
 *  ==================
@@ -75871,10 +76350,10 @@
      $                   SPDIAM, CLGAPL, CLGAPR, PIVMIN, SIGMA,
      $                   DPLUS, LPLUS, WORK, INFO )
 *
-*  -- LAPACK auxiliary routine (version 3.4.2) --
+*  -- LAPACK auxiliary routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     September 2012
+*     June 2016
 *
 *     .. Scalar Arguments ..
       INTEGER            CLSTRT, CLEND, INFO, N
@@ -75935,7 +76414,8 @@
 
 *     Decide whether the code should accept the best among all
 *     representations despite large element growth or signal INFO=1
-      NOFAIL = .TRUE.
+*     Setting NOFAIL to .FALSE. for quick fix for bug 113
+      NOFAIL = .FALSE.
 *
 
 *     Compute the average gap length of the cluster
@@ -76167,18 +76647,18 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DLARRJ + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dlarrj.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dlarrj.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dlarrj.f"> 
+*> Download DLARRJ + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dlarrj.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dlarrj.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dlarrj.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
@@ -76186,7 +76666,7 @@
 *       SUBROUTINE DLARRJ( N, D, E2, IFIRST, ILAST,
 *                          RTOL, OFFSET, W, WERR, WORK, IWORK,
 *                          PIVMIN, SPDIAM, INFO )
-* 
+*
 *       .. Scalar Arguments ..
 *       INTEGER            IFIRST, ILAST, INFO, N, OFFSET
 *       DOUBLE PRECISION   PIVMIN, RTOL, SPDIAM
@@ -76196,7 +76676,7 @@
 *       DOUBLE PRECISION   D( * ), E2( * ), W( * ),
 *      $                   WERR( * ), WORK( * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -76310,14 +76790,14 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date September 2012
+*> \date December 2016
 *
-*> \ingroup auxOTHERauxiliary
+*> \ingroup OTHERauxiliary
 *
 *> \par Contributors:
 *  ==================
@@ -76333,10 +76813,10 @@
      $                   RTOL, OFFSET, W, WERR, WORK, IWORK,
      $                   PIVMIN, SPDIAM, INFO )
 *
-*  -- LAPACK auxiliary routine (version 3.4.2) --
+*  -- LAPACK auxiliary routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     September 2012
+*     December 2016
 *
 *     .. Scalar Arguments ..
       INTEGER            IFIRST, ILAST, INFO, N, OFFSET
@@ -76540,25 +77020,25 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DLARRK + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dlarrk.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dlarrk.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dlarrk.f"> 
+*> Download DLARRK + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dlarrk.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dlarrk.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dlarrk.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       SUBROUTINE DLARRK( N, IW, GL, GU,
 *                           D, E2, PIVMIN, RELTOL, W, WERR, INFO)
-* 
+*
 *       .. Scalar Arguments ..
 *       INTEGER   INFO, IW, N
 *       DOUBLE PRECISION    PIVMIN, RELTOL, GL, GU, W, WERR
@@ -76566,7 +77046,7 @@
 *       .. Array Arguments ..
 *       DOUBLE PRECISION   D( * ), E2( * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -76670,23 +77150,23 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date September 2012
+*> \date December 2016
 *
-*> \ingroup auxOTHERauxiliary
+*> \ingroup OTHERauxiliary
 *
 *  =====================================================================
       SUBROUTINE DLARRK( N, IW, GL, GU,
      $                    D, E2, PIVMIN, RELTOL, W, WERR, INFO)
 *
-*  -- LAPACK auxiliary routine (version 3.4.2) --
+*  -- LAPACK auxiliary routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     September 2012
+*     December 2016
 *
 *     .. Scalar Arguments ..
       INTEGER   INFO, IW, N
@@ -76789,32 +77269,32 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DLARRR + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dlarrr.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dlarrr.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dlarrr.f"> 
+*> Download DLARRR + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dlarrr.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dlarrr.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dlarrr.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       SUBROUTINE DLARRR( N, D, E, INFO )
-* 
+*
 *       .. Scalar Arguments ..
 *       INTEGER            N, INFO
 *       ..
 *       .. Array Arguments ..
 *       DOUBLE PRECISION   D( * ), E( * )
 *       ..
-*  
-*  
+*
+*
 *
 *> \par Purpose:
 *  =============
@@ -76860,14 +77340,14 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date September 2012
+*> \date December 2016
 *
-*> \ingroup auxOTHERauxiliary
+*> \ingroup OTHERauxiliary
 *
 *> \par Contributors:
 *  ==================
@@ -76881,10 +77361,10 @@
 *  =====================================================================
       SUBROUTINE DLARRR( N, D, E, INFO )
 *
-*  -- LAPACK auxiliary routine (version 3.4.2) --
+*  -- LAPACK auxiliary routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     September 2012
+*     December 2016
 *
 *     .. Scalar Arguments ..
       INTEGER            N, INFO
@@ -76993,18 +77473,18 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DLARRV + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dlarrv.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dlarrv.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dlarrv.f"> 
+*> Download DLARRV + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dlarrv.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dlarrv.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dlarrv.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
@@ -77014,7 +77494,7 @@
 *                          RTOL1, RTOL2, W, WERR, WGAP,
 *                          IBLOCK, INDEXW, GERS, Z, LDZ, ISUPPZ,
 *                          WORK, IWORK, INFO )
-* 
+*
 *       .. Scalar Arguments ..
 *       INTEGER            DOL, DOU, INFO, LDZ, M, N
 *       DOUBLE PRECISION   MINRGP, PIVMIN, RTOL1, RTOL2, VL, VU
@@ -77026,7 +77506,7 @@
 *      $                   WGAP( * ), WORK( * )
 *       DOUBLE PRECISION  Z( LDZ, * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -77050,12 +77530,15 @@
 *> \param[in] VL
 *> \verbatim
 *>          VL is DOUBLE PRECISION
+*>          Lower bound of the interval that contains the desired
+*>          eigenvalues. VL < VU. Needed to compute gaps on the left or right
+*>          end of the extremal eigenvalues in the desired RANGE.
 *> \endverbatim
 *>
 *> \param[in] VU
 *> \verbatim
 *>          VU is DOUBLE PRECISION
-*>          Lower and upper bounds of the interval that contains the desired
+*>          Upper bound of the interval that contains the desired
 *>          eigenvalues. VL < VU. Needed to compute gaps on the left or right
 *>          end of the extremal eigenvalues in the desired RANGE.
 *> \endverbatim
@@ -77072,7 +77555,7 @@
 *>          L is DOUBLE PRECISION array, dimension (N)
 *>          On entry, the (N-1) subdiagonal elements of the unit
 *>          bidiagonal matrix L are in elements 1 to N-1 of L
-*>          (if the matrix is not splitted.) At the end of each block
+*>          (if the matrix is not split.) At the end of each block
 *>          is stored the corresponding shift as given by DLARRE.
 *>          On exit, L is overwritten.
 *> \endverbatim
@@ -77227,7 +77710,7 @@
 *>          INFO is INTEGER
 *>          = 0:  successful exit
 *>
-*>          > 0:  A problem occured in DLARRV.
+*>          > 0:  A problem occurred in DLARRV.
 *>          < 0:  One of the called subroutines signaled an internal problem.
 *>                Needs inspection of the corresponding parameter IINFO
 *>                for further information.
@@ -77249,12 +77732,12 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date September 2012
+*> \date June 2016
 *
 *> \ingroup doubleOTHERauxiliary
 *
@@ -77274,10 +77757,10 @@
      $                   IBLOCK, INDEXW, GERS, Z, LDZ, ISUPPZ,
      $                   WORK, IWORK, INFO )
 *
-*  -- LAPACK auxiliary routine (version 3.4.2) --
+*  -- LAPACK auxiliary routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     September 2012
+*     June 2016
 *
 *     .. Scalar Arguments ..
       INTEGER            DOL, DOU, INFO, LDZ, M, N
@@ -77331,6 +77814,7 @@
 *     .. Executable Statements ..
 *     ..
 
+      INFO = 0
 *     The first N entries of WORK are reserved for the eigenvalues
       INDLD = N+1
       INDLLD= 2*N+1
@@ -78021,31 +78505,31 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DLARSCL2 + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dlarscl2.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dlarscl2.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dlarscl2.f"> 
+*> Download DLARSCL2 + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dlarscl2.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dlarscl2.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dlarscl2.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       SUBROUTINE DLARSCL2 ( M, N, D, X, LDX )
-* 
+*
 *       .. Scalar Arguments ..
 *       INTEGER            M, N, LDX
 *       ..
 *       .. Array Arguments ..
 *       DOUBLE PRECISION   D( * ), X( LDX, * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -78072,7 +78556,7 @@
 *> \param[in] N
 *> \verbatim
 *>          N is INTEGER
-*>     The number of columns of D and X. N >= 0.
+*>     The number of columns of X. N >= 0.
 *> \endverbatim
 *>
 *> \param[in] D
@@ -78091,28 +78575,28 @@
 *> \param[in] LDX
 *> \verbatim
 *>          LDX is INTEGER
-*>     The leading dimension of the vector X. LDX >= 0.
+*>     The leading dimension of the vector X. LDX >= M.
 *> \endverbatim
 *
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date September 2012
+*> \date June 2016
 *
 *> \ingroup doubleOTHERcomputational
 *
 *  =====================================================================
       SUBROUTINE DLARSCL2 ( M, N, D, X, LDX )
 *
-*  -- LAPACK computational routine (version 3.4.2) --
+*  -- LAPACK computational routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     September 2012
+*     June 2016
 *
 *     .. Scalar Arguments ..
       INTEGER            M, N, LDX
@@ -78140,28 +78624,28 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DLARTG + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dlartg.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dlartg.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dlartg.f"> 
+*> Download DLARTG + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dlartg.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dlartg.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dlartg.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       SUBROUTINE DLARTG( F, G, CS, SN, R )
-* 
+*
 *       .. Scalar Arguments ..
 *       DOUBLE PRECISION   CS, F, G, R, SN
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -78223,22 +78707,22 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date September 2012
+*> \date December 2016
 *
-*> \ingroup auxOTHERauxiliary
+*> \ingroup OTHERauxiliary
 *
 *  =====================================================================
       SUBROUTINE DLARTG( F, G, CS, SN, R )
 *
-*  -- LAPACK auxiliary routine (version 3.4.2) --
+*  -- LAPACK auxiliary routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     September 2012
+*     December 2016
 *
 *     .. Scalar Arguments ..
       DOUBLE PRECISION   CS, F, G, R, SN
@@ -78344,28 +78828,28 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DLARTGP + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dlartgp.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dlartgp.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dlartgp.f"> 
+*> Download DLARTGP + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dlartgp.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dlartgp.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dlartgp.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       SUBROUTINE DLARTGP( F, G, CS, SN, R )
-* 
+*
 *       .. Scalar Arguments ..
 *       DOUBLE PRECISION   CS, F, G, R, SN
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -78425,22 +78909,22 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date September 2012
+*> \date December 2016
 *
-*> \ingroup auxOTHERauxiliary
+*> \ingroup OTHERauxiliary
 *
 *  =====================================================================
       SUBROUTINE DLARTGP( F, G, CS, SN, R )
 *
-*  -- LAPACK auxiliary routine (version 3.4.2) --
+*  -- LAPACK auxiliary routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     September 2012
+*     December 2016
 *
 *     .. Scalar Arguments ..
       DOUBLE PRECISION   CS, F, G, R, SN
@@ -78546,28 +79030,28 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DLARTGS + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dlartgs.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dlartgs.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dlartgs.f"> 
+*> Download DLARTGS + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dlartgs.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dlartgs.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dlartgs.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       SUBROUTINE DLARTGS( X, Y, SIGMA, CS, SN )
-* 
+*
 *       .. Scalar Arguments ..
 *       DOUBLE PRECISION        CS, SIGMA, SN, X, Y
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -78622,22 +79106,22 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date September 2012
+*> \date December 2016
 *
 *> \ingroup auxOTHERcomputational
 *
 *  =====================================================================
       SUBROUTINE DLARTGS( X, Y, SIGMA, CS, SN )
 *
-*  -- LAPACK computational routine (version 3.4.2) --
+*  -- LAPACK computational routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     September 2012
+*     December 2016
 *
 *     .. Scalar Arguments ..
       DOUBLE PRECISION        CS, SIGMA, SN, X, Y
@@ -78704,31 +79188,31 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DLARTV + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dlartv.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dlartv.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dlartv.f"> 
+*> Download DLARTV + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dlartv.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dlartv.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dlartv.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       SUBROUTINE DLARTV( N, X, INCX, Y, INCY, C, S, INCC )
-* 
+*
 *       .. Scalar Arguments ..
 *       INTEGER            INCC, INCX, INCY, N
 *       ..
 *       .. Array Arguments ..
 *       DOUBLE PRECISION   C( * ), S( * ), X( * ), Y( * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -78798,22 +79282,22 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date September 2012
+*> \date December 2016
 *
 *> \ingroup doubleOTHERauxiliary
 *
 *  =====================================================================
       SUBROUTINE DLARTV( N, X, INCX, Y, INCY, C, S, INCC )
 *
-*  -- LAPACK auxiliary routine (version 3.4.2) --
+*  -- LAPACK auxiliary routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     September 2012
+*     December 2016
 *
 *     .. Scalar Arguments ..
       INTEGER            INCC, INCX, INCY, N
@@ -78851,24 +79335,24 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DLARUV + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dlaruv.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dlaruv.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dlaruv.f"> 
+*> Download DLARUV + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dlaruv.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dlaruv.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dlaruv.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       SUBROUTINE DLARUV( ISEED, N, X )
-* 
+*
 *       .. Scalar Arguments ..
 *       INTEGER            N
 *       ..
@@ -78876,7 +79360,7 @@
 *       INTEGER            ISEED( 4 )
 *       DOUBLE PRECISION   X( N )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -78916,14 +79400,14 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date September 2012
+*> \date December 2016
 *
-*> \ingroup auxOTHERauxiliary
+*> \ingroup OTHERauxiliary
 *
 *> \par Further Details:
 *  =====================
@@ -78944,10 +79428,10 @@
 *  =====================================================================
       SUBROUTINE DLARUV( ISEED, N, X )
 *
-*  -- LAPACK auxiliary routine (version 3.4.2) --
+*  -- LAPACK auxiliary routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     September 2012
+*     December 2016
 *
 *     .. Scalar Arguments ..
       INTEGER            N
@@ -79241,7 +79725,7 @@
       I4 = ISEED( 4 )
 *
       DO 10 I = 1, MIN( N, LV )
-*	  
+*
   20     CONTINUE
 *
 *        Multiply the seed by i-th power of the multiplier modulo 2**48
@@ -79268,11 +79752,11 @@
 *           If a real number has n bits of precision, and the first
 *           n bits of the 48-bit integer above happen to be all 1 (which
 *           will occur about once every 2**n calls), then X( I ) will
-*           be rounded to exactly 1.0. 
+*           be rounded to exactly 1.0.
 *           Since X( I ) is not supposed to return exactly 0.0 or 1.0,
 *           the statistically correct thing to do in this situation is
 *           simply to iterate again.
-*           N.B. the case X( I ) = 0.0 should not be possible.	
+*           N.B. the case X( I ) = 0.0 should not be possible.
             I1 = I1 + 2
             I2 = I2 + 2
             I3 = I3 + 2
@@ -79297,24 +79781,24 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DLARZ + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dlarz.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dlarz.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dlarz.f"> 
+*> Download DLARZ + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dlarz.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dlarz.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dlarz.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       SUBROUTINE DLARZ( SIDE, M, N, L, V, INCV, TAU, C, LDC, WORK )
-* 
+*
 *       .. Scalar Arguments ..
 *       CHARACTER          SIDE
 *       INTEGER            INCV, L, LDC, M, N
@@ -79323,7 +79807,7 @@
 *       .. Array Arguments ..
 *       DOUBLE PRECISION   C( LDC, * ), V( * ), WORK( * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -79417,12 +79901,12 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date September 2012
+*> \date December 2016
 *
 *> \ingroup doubleOTHERcomputational
 *
@@ -79440,10 +79924,10 @@
 *  =====================================================================
       SUBROUTINE DLARZ( SIDE, M, N, L, V, INCV, TAU, C, LDC, WORK )
 *
-*  -- LAPACK computational routine (version 3.4.2) --
+*  -- LAPACK computational routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     September 2012
+*     December 2016
 *
 *     .. Scalar Arguments ..
       CHARACTER          SIDE
@@ -79533,25 +80017,25 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DLARZB + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dlarzb.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dlarzb.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dlarzb.f"> 
+*> Download DLARZB + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dlarzb.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dlarzb.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dlarzb.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       SUBROUTINE DLARZB( SIDE, TRANS, DIRECT, STOREV, M, N, K, L, V,
 *                          LDV, T, LDT, C, LDC, WORK, LDWORK )
-* 
+*
 *       .. Scalar Arguments ..
 *       CHARACTER          DIRECT, SIDE, STOREV, TRANS
 *       INTEGER            K, L, LDC, LDT, LDV, LDWORK, M, N
@@ -79560,7 +80044,7 @@
 *       DOUBLE PRECISION   C( LDC, * ), T( LDT, * ), V( LDV, * ),
 *      $                   WORK( LDWORK, * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -79690,12 +80174,12 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date September 2012
+*> \date December 2016
 *
 *> \ingroup doubleOTHERcomputational
 *
@@ -79714,10 +80198,10 @@
       SUBROUTINE DLARZB( SIDE, TRANS, DIRECT, STOREV, M, N, K, L, V,
      $                   LDV, T, LDT, C, LDC, WORK, LDWORK )
 *
-*  -- LAPACK computational routine (version 3.4.2) --
+*  -- LAPACK computational routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     September 2012
+*     December 2016
 *
 *     .. Scalar Arguments ..
       CHARACTER          DIRECT, SIDE, STOREV, TRANS
@@ -79856,24 +80340,24 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DLARZT + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dlarzt.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dlarzt.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dlarzt.f"> 
+*> Download DLARZT + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dlarzt.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dlarzt.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dlarzt.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       SUBROUTINE DLARZT( DIRECT, STOREV, N, K, V, LDV, TAU, T, LDT )
-* 
+*
 *       .. Scalar Arguments ..
 *       CHARACTER          DIRECT, STOREV
 *       INTEGER            K, LDT, LDV, N
@@ -79881,7 +80365,7 @@
 *       .. Array Arguments ..
 *       DOUBLE PRECISION   T( LDT, * ), TAU( * ), V( LDV, * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -79982,12 +80466,12 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date September 2012
+*> \date December 2016
 *
 *> \ingroup doubleOTHERcomputational
 *
@@ -80039,10 +80523,10 @@
 *  =====================================================================
       SUBROUTINE DLARZT( DIRECT, STOREV, N, K, V, LDV, TAU, T, LDT )
 *
-*  -- LAPACK computational routine (version 3.4.2) --
+*  -- LAPACK computational routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     September 2012
+*     December 2016
 *
 *     .. Scalar Arguments ..
       CHARACTER          DIRECT, STOREV
@@ -80120,28 +80604,28 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DLAS2 + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dlas2.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dlas2.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dlas2.f"> 
+*> Download DLAS2 + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dlas2.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dlas2.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dlas2.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       SUBROUTINE DLAS2( F, G, H, SSMIN, SSMAX )
-* 
+*
 *       .. Scalar Arguments ..
 *       DOUBLE PRECISION   F, G, H, SSMAX, SSMIN
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -80191,14 +80675,14 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date September 2012
+*> \date December 2016
 *
-*> \ingroup auxOTHERauxiliary
+*> \ingroup OTHERauxiliary
 *
 *> \par Further Details:
 *  =====================
@@ -80225,10 +80709,10 @@
 *  =====================================================================
       SUBROUTINE DLAS2( F, G, H, SSMIN, SSMAX )
 *
-*  -- LAPACK auxiliary routine (version 3.4.2) --
+*  -- LAPACK auxiliary routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     September 2012
+*     December 2016
 *
 *     .. Scalar Arguments ..
       DOUBLE PRECISION   F, G, H, SSMAX, SSMIN
@@ -80303,24 +80787,24 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DLASCL + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dlascl.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dlascl.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dlascl.f"> 
+*> Download DLASCL + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dlascl.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dlascl.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dlascl.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       SUBROUTINE DLASCL( TYPE, KL, KU, CFROM, CTO, M, N, A, LDA, INFO )
-* 
+*
 *       .. Scalar Arguments ..
 *       CHARACTER          TYPE
 *       INTEGER            INFO, KL, KU, LDA, M, N
@@ -80329,7 +80813,7 @@
 *       .. Array Arguments ..
 *       DOUBLE PRECISION   A( LDA, * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -80415,7 +80899,11 @@
 *> \param[in] LDA
 *> \verbatim
 *>          LDA is INTEGER
-*>          The leading dimension of the array A.  LDA >= max(1,M).
+*>          The leading dimension of the array A.
+*>          If TYPE = 'G', 'L', 'U', 'H', LDA >= max(1,M);
+*>             TYPE = 'B', LDA >= KL+1;
+*>             TYPE = 'Q', LDA >= KU+1;
+*>             TYPE = 'Z', LDA >= 2*KL+KU+1.
 *> \endverbatim
 *>
 *> \param[out] INFO
@@ -80428,22 +80916,22 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date September 2012
+*> \date June 2016
 *
-*> \ingroup auxOTHERauxiliary
+*> \ingroup OTHERauxiliary
 *
 *  =====================================================================
       SUBROUTINE DLASCL( TYPE, KL, KU, CFROM, CTO, M, N, A, LDA, INFO )
 *
-*  -- LAPACK auxiliary routine (version 3.4.2) --
+*  -- LAPACK auxiliary routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     September 2012
+*     June 2016
 *
 *     .. Scalar Arguments ..
       CHARACTER          TYPE
@@ -80667,31 +81155,31 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DLASCL2 + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dlascl2.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dlascl2.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dlascl2.f"> 
+*> Download DLASCL2 + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dlascl2.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dlascl2.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dlascl2.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       SUBROUTINE DLASCL2 ( M, N, D, X, LDX )
-* 
+*
 *       .. Scalar Arguments ..
 *       INTEGER            M, N, LDX
 *       ..
 *       .. Array Arguments ..
 *       DOUBLE PRECISION   D( * ), X( LDX, * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -80718,7 +81206,7 @@
 *> \param[in] N
 *> \verbatim
 *>          N is INTEGER
-*>     The number of columns of D and X. N >= 0.
+*>     The number of columns of X. N >= 0.
 *> \endverbatim
 *>
 *> \param[in] D
@@ -80737,28 +81225,28 @@
 *> \param[in] LDX
 *> \verbatim
 *>          LDX is INTEGER
-*>     The leading dimension of the vector X. LDX >= 0.
+*>     The leading dimension of the vector X. LDX >= M.
 *> \endverbatim
 *
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date September 2012
+*> \date June 2016
 *
 *> \ingroup doubleOTHERcomputational
 *
 *  =====================================================================
       SUBROUTINE DLASCL2 ( M, N, D, X, LDX )
 *
-*  -- LAPACK computational routine (version 3.4.2) --
+*  -- LAPACK computational routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     September 2012
+*     June 2016
 *
 *     .. Scalar Arguments ..
       INTEGER            M, N, LDX
@@ -80786,25 +81274,25 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DLASD0 + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dlasd0.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dlasd0.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dlasd0.f"> 
+*> Download DLASD0 + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dlasd0.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dlasd0.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dlasd0.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       SUBROUTINE DLASD0( N, SQRE, D, E, U, LDU, VT, LDVT, SMLSIZ, IWORK,
 *                          WORK, INFO )
-* 
+*
 *       .. Scalar Arguments ..
 *       INTEGER            INFO, LDU, LDVT, N, SMLSIZ, SQRE
 *       ..
@@ -80813,7 +81301,7 @@
 *       DOUBLE PRECISION   D( * ), E( * ), U( LDU, * ), VT( LDVT, * ),
 *      $                   WORK( * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -80856,7 +81344,7 @@
 *>         On exit D, if INFO = 0, contains its singular values.
 *> \endverbatim
 *>
-*> \param[in] E
+*> \param[in,out] E
 *> \verbatim
 *>          E is DOUBLE PRECISION array, dimension (M-1)
 *>         Contains the subdiagonal entries of the bidiagonal matrix.
@@ -80917,14 +81405,14 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date September 2012
+*> \date December 2016
 *
-*> \ingroup auxOTHERauxiliary
+*> \ingroup OTHERauxiliary
 *
 *> \par Contributors:
 *  ==================
@@ -80936,10 +81424,10 @@
       SUBROUTINE DLASD0( N, SQRE, D, E, U, LDU, VT, LDVT, SMLSIZ, IWORK,
      $                   WORK, INFO )
 *
-*  -- LAPACK auxiliary routine (version 3.4.2) --
+*  -- LAPACK auxiliary routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     September 2012
+*     December 2016
 *
 *     .. Scalar Arguments ..
       INTEGER            INFO, LDU, LDVT, N, SMLSIZ, SQRE
@@ -81086,6 +81574,9 @@
             CALL DLASD1( NL, NR, SQREI, D( NLF ), ALPHA, BETA,
      $                   U( NLF, NLF ), LDU, VT( NLF, NLF ), LDVT,
      $                   IWORK( IDXQC ), IWORK( IWK ), WORK, INFO )
+*
+*        Report the possible convergence failure.
+*
             IF( INFO.NE.0 ) THEN
                RETURN
             END IF
@@ -81101,25 +81592,25 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DLASD1 + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dlasd1.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dlasd1.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dlasd1.f"> 
+*> Download DLASD1 + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dlasd1.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dlasd1.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dlasd1.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       SUBROUTINE DLASD1( NL, NR, SQRE, D, ALPHA, BETA, U, LDU, VT, LDVT,
 *                          IDXQ, IWORK, WORK, INFO )
-* 
+*
 *       .. Scalar Arguments ..
 *       INTEGER            INFO, LDU, LDVT, NL, NR, SQRE
 *       DOUBLE PRECISION   ALPHA, BETA
@@ -81128,7 +81619,7 @@
 *       INTEGER            IDXQ( * ), IWORK( * )
 *       DOUBLE PRECISION   D( * ), U( LDU, * ), VT( LDVT, * ), WORK( * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -81159,7 +81650,7 @@
 *>
 *>    The first stage consists of deflating the size of the problem
 *>    when there are multiple singular values or when there are zeros in
-*>    the Z vector.  For each such occurence the dimension of the
+*>    the Z vector.  For each such occurrence the dimension of the
 *>    secular equation problem is reduced by one.  This stage is
 *>    performed by the routine DLASD2.
 *>
@@ -81255,7 +81746,7 @@
 *>         The leading dimension of the array VT.  LDVT >= max( 1, M ).
 *> \endverbatim
 *>
-*> \param[out] IDXQ
+*> \param[in,out] IDXQ
 *> \verbatim
 *>          IDXQ is INTEGER array, dimension(N)
 *>         This contains the permutation which will reintegrate the
@@ -81284,14 +81775,14 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date September 2012
+*> \date June 2016
 *
-*> \ingroup auxOTHERauxiliary
+*> \ingroup OTHERauxiliary
 *
 *> \par Contributors:
 *  ==================
@@ -81303,10 +81794,10 @@
       SUBROUTINE DLASD1( NL, NR, SQRE, D, ALPHA, BETA, U, LDU, VT, LDVT,
      $                   IDXQ, IWORK, WORK, INFO )
 *
-*  -- LAPACK auxiliary routine (version 3.4.2) --
+*  -- LAPACK auxiliary routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     September 2012
+*     June 2016
 *
 *     .. Scalar Arguments ..
       INTEGER            INFO, LDU, LDVT, NL, NR, SQRE
@@ -81401,6 +81892,9 @@
      $             U, LDU, WORK( IU2 ), LDU2, VT, LDVT, WORK( IVT2 ),
      $             LDVT2, IWORK( IDXC ), IWORK( COLTYP ), WORK( IZ ),
      $             INFO )
+*
+*     Report the convergence failure.
+*
       IF( INFO.NE.0 ) THEN
          RETURN
       END IF
@@ -81424,18 +81918,18 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DLASD2 + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dlasd2.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dlasd2.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dlasd2.f"> 
+*> Download DLASD2 + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dlasd2.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dlasd2.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dlasd2.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
@@ -81443,7 +81937,7 @@
 *       SUBROUTINE DLASD2( NL, NR, SQRE, K, D, Z, ALPHA, BETA, U, LDU, VT,
 *                          LDVT, DSIGMA, U2, LDU2, VT2, LDVT2, IDXP, IDX,
 *                          IDXC, IDXQ, COLTYP, INFO )
-* 
+*
 *       .. Scalar Arguments ..
 *       INTEGER            INFO, K, LDU, LDU2, LDVT, LDVT2, NL, NR, SQRE
 *       DOUBLE PRECISION   ALPHA, BETA
@@ -81455,7 +81949,7 @@
 *      $                   U2( LDU2, * ), VT( LDVT, * ), VT2( LDVT2, * ),
 *      $                   Z( * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -81671,14 +82165,14 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date September 2012
+*> \date December 2016
 *
-*> \ingroup auxOTHERauxiliary
+*> \ingroup OTHERauxiliary
 *
 *> \par Contributors:
 *  ==================
@@ -81691,10 +82185,10 @@
      $                   LDVT, DSIGMA, U2, LDU2, VT2, LDVT2, IDXP, IDX,
      $                   IDXC, IDXQ, COLTYP, INFO )
 *
-*  -- LAPACK auxiliary routine (version 3.4.2) --
+*  -- LAPACK auxiliary routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     September 2012
+*     December 2016
 *
 *     .. Scalar Arguments ..
       INTEGER            INFO, K, LDU, LDU2, LDVT, LDVT2, NL, NR, SQRE
@@ -82058,18 +82552,18 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DLASD3 + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dlasd3.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dlasd3.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dlasd3.f"> 
+*> Download DLASD3 + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dlasd3.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dlasd3.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dlasd3.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
@@ -82077,7 +82571,7 @@
 *       SUBROUTINE DLASD3( NL, NR, SQRE, K, D, Q, LDQ, DSIGMA, U, LDU, U2,
 *                          LDU2, VT, LDVT, VT2, LDVT2, IDXC, CTOT, Z,
 *                          INFO )
-* 
+*
 *       .. Scalar Arguments ..
 *       INTEGER            INFO, K, LDQ, LDU, LDU2, LDVT, LDVT2, NL, NR,
 *      $                   SQRE
@@ -82088,7 +82582,7 @@
 *      $                   U2( LDU2, * ), VT( LDVT, * ), VT2( LDVT2, * ),
 *      $                   Z( * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -82261,14 +82755,14 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date September 2012
+*> \date December 2016
 *
-*> \ingroup auxOTHERauxiliary
+*> \ingroup OTHERauxiliary
 *
 *> \par Contributors:
 *  ==================
@@ -82281,10 +82775,10 @@
      $                   LDU2, VT, LDVT, VT2, LDVT2, IDXC, CTOT, Z,
      $                   INFO )
 *
-*  -- LAPACK auxiliary routine (version 3.4.2) --
+*  -- LAPACK auxiliary routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     September 2012
+*     December 2016
 *
 *     .. Scalar Arguments ..
       INTEGER            INFO, K, LDQ, LDU, LDU2, LDVT, LDVT2, NL, NR,
@@ -82407,7 +82901,7 @@
          CALL DLASD4( K, J, DSIGMA, Z, U( 1, J ), RHO, D( J ),
      $                VT( 1, J ), INFO )
 *
-*        If the zero finder fails, the computation is terminated.
+*        If the zero finder fails, report the convergence failure.
 *
          IF( INFO.NE.0 ) THEN
             RETURN
@@ -82666,9 +83160,9 @@
 *> \author Univ. of Colorado Denver
 *> \author NAG Ltd.
 *
-*> \date November 2013
+*> \date December 2016
 *
-*> \ingroup auxOTHERauxiliary
+*> \ingroup OTHERauxiliary
 *
 *> \par Contributors:
 *  ==================
@@ -82679,10 +83173,10 @@
 *  =====================================================================
       SUBROUTINE DLASD4( N, I, D, Z, DELTA, RHO, SIGMA, WORK, INFO )
 *
-*  -- LAPACK auxiliary routine (version 3.5.0) --
+*  -- LAPACK auxiliary routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     November 2013
+*     December 2016
 *
 *     .. Scalar Arguments ..
       INTEGER            I, INFO, N
@@ -82857,7 +83351,7 @@
          TEMP = Z( N ) / ( DELTA( N )*WORK( N ) )
          PHI = Z( N )*TEMP
          DPHI = TEMP*TEMP
-         ERRETM = EIGHT*( -PHI-PSI ) + ERRETM - PHI + RHOINV  
+         ERRETM = EIGHT*( -PHI-PSI ) + ERRETM - PHI + RHOINV
 *    $          + ABS( TAU2 )*( DPSI+DPHI )
 *
          W = RHOINV + PHI + PSI
@@ -82926,7 +83420,7 @@
          TEMP = Z( N ) / TAU2
          PHI = Z( N )*TEMP
          DPHI = TEMP*TEMP
-         ERRETM = EIGHT*( -PHI-PSI ) + ERRETM - PHI + RHOINV  
+         ERRETM = EIGHT*( -PHI-PSI ) + ERRETM - PHI + RHOINV
 *    $          + ABS( TAU2 )*( DPSI+DPHI )
 *
          W = RHOINV + PHI + PSI
@@ -82996,7 +83490,7 @@
             TEMP = Z( N ) / TAU2
             PHI = Z( N )*TEMP
             DPHI = TEMP*TEMP
-            ERRETM = EIGHT*( -PHI-PSI ) + ERRETM - PHI + RHOINV  
+            ERRETM = EIGHT*( -PHI-PSI ) + ERRETM - PHI + RHOINV
 *    $             + ABS( TAU2 )*( DPSI+DPHI )
 *
             W = RHOINV + PHI + PSI
@@ -83148,8 +83642,8 @@
          DW = DPSI + DPHI + TEMP*TEMP
          TEMP = Z( II )*TEMP
          W = W + TEMP
-         ERRETM = EIGHT*( PHI-PSI ) + ERRETM + TWO*RHOINV 
-     $          + THREE*ABS( TEMP ) 
+         ERRETM = EIGHT*( PHI-PSI ) + ERRETM + TWO*RHOINV
+     $          + THREE*ABS( TEMP )
 *    $          + ABS( TAU2 )*DW
 *
 *        Test for convergence
@@ -83229,7 +83723,7 @@
 *
             IF( INFO.NE.0 ) THEN
 *
-*              If INFO is not 0, i.e., DLAED6 failed, switch back 
+*              If INFO is not 0, i.e., DLAED6 failed, switch back
 *              to 2 pole interpolation.
 *
                SWTCH3 = .FALSE.
@@ -83329,8 +83823,8 @@
          DW = DPSI + DPHI + TEMP*TEMP
          TEMP = Z( II )*TEMP
          W = RHOINV + PHI + PSI + TEMP
-         ERRETM = EIGHT*( PHI-PSI ) + ERRETM + TWO*RHOINV 
-     $          + THREE*ABS( TEMP ) 
+         ERRETM = EIGHT*( PHI-PSI ) + ERRETM + TWO*RHOINV
+     $          + THREE*ABS( TEMP )
 *    $          + ABS( TAU2 )*DW
 *
          SWTCH = .FALSE.
@@ -83448,7 +83942,7 @@
 *
                IF( INFO.NE.0 ) THEN
 *
-*                 If INFO is not 0, i.e., DLAED6 failed, switch 
+*                 If INFO is not 0, i.e., DLAED6 failed, switch
 *                 back to two pole interpolation
 *
                   SWTCH3 = .FALSE.
@@ -83564,8 +84058,8 @@
             DW = DPSI + DPHI + TEMP*TEMP
             TEMP = Z( II )*TEMP
             W = RHOINV + PHI + PSI + TEMP
-            ERRETM = EIGHT*( PHI-PSI ) + ERRETM + TWO*RHOINV 
-     $             + THREE*ABS( TEMP ) 
+            ERRETM = EIGHT*( PHI-PSI ) + ERRETM + TWO*RHOINV
+     $             + THREE*ABS( TEMP )
 *    $             + ABS( TAU2 )*DW
 *
             IF( W*PREW.GT.ZERO .AND. ABS( W ).GT.ABS( PREW ) / TEN )
@@ -83589,24 +84083,24 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DLASD5 + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dlasd5.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dlasd5.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dlasd5.f"> 
+*> Download DLASD5 + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dlasd5.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dlasd5.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dlasd5.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       SUBROUTINE DLASD5( I, D, Z, DELTA, RHO, DSIGMA, WORK )
-* 
+*
 *       .. Scalar Arguments ..
 *       INTEGER            I
 *       DOUBLE PRECISION   DSIGMA, RHO
@@ -83614,7 +84108,7 @@
 *       .. Array Arguments ..
 *       DOUBLE PRECISION   D( 2 ), DELTA( 2 ), WORK( 2 ), Z( 2 )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -83685,14 +84179,14 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date September 2012
+*> \date December 2016
 *
-*> \ingroup auxOTHERauxiliary
+*> \ingroup OTHERauxiliary
 *
 *> \par Contributors:
 *  ==================
@@ -83703,10 +84197,10 @@
 *  =====================================================================
       SUBROUTINE DLASD5( I, D, Z, DELTA, RHO, DSIGMA, WORK )
 *
-*  -- LAPACK auxiliary routine (version 3.4.2) --
+*  -- LAPACK auxiliary routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     September 2012
+*     December 2016
 *
 *     .. Scalar Arguments ..
       INTEGER            I
@@ -83820,18 +84314,18 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DLASD6 + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dlasd6.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dlasd6.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dlasd6.f"> 
+*> Download DLASD6 + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dlasd6.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dlasd6.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dlasd6.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
@@ -83840,7 +84334,7 @@
 *                          IDXQ, PERM, GIVPTR, GIVCOL, LDGCOL, GIVNUM,
 *                          LDGNUM, POLES, DIFL, DIFR, Z, K, C, S, WORK,
 *                          IWORK, INFO )
-* 
+*
 *       .. Scalar Arguments ..
 *       INTEGER            GIVPTR, ICOMPQ, INFO, K, LDGCOL, LDGNUM, NL,
 *      $                   NR, SQRE
@@ -83853,7 +84347,7 @@
 *      $                   GIVNUM( LDGNUM, * ), POLES( LDGNUM, * ),
 *      $                   VF( * ), VL( * ), WORK( * ), Z( * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -83892,7 +84386,7 @@
 *>
 *>       The first stage consists of deflating the size of the problem
 *>       when there are multiple singular values or if there is a zero
-*>       in the Z vector. For each such occurence the dimension of the
+*>       in the Z vector. For each such occurrence the dimension of the
 *>       secular equation problem is reduced by one. This stage is
 *>       performed by the routine DLASD7.
 *>
@@ -83982,7 +84476,7 @@
 *>         row.
 *> \endverbatim
 *>
-*> \param[out] IDXQ
+*> \param[in,out] IDXQ
 *> \verbatim
 *>          IDXQ is INTEGER array, dimension ( N )
 *>         This contains the permutation which will reintegrate the
@@ -84050,14 +84544,13 @@
 *> \param[out] DIFR
 *> \verbatim
 *>          DIFR is DOUBLE PRECISION array,
-*>                  dimension ( LDGNUM, 2 ) if ICOMPQ = 1 and
-*>                  dimension ( N ) if ICOMPQ = 0.
-*>         On exit, DIFR(I, 1) is the distance between I-th updated
-*>         (undeflated) singular value and the I+1-th (undeflated) old
-*>         singular value.
+*>                   dimension ( LDDIFR, 2 ) if ICOMPQ = 1 and
+*>                   dimension ( K ) if ICOMPQ = 0.
+*>          On exit, DIFR(I,1) = D(I) - DSIGMA(I+1), DIFR(K,1) is not
+*>          defined and will not be referenced.
 *>
-*>         If ICOMPQ = 1, DIFR(1:K,2) is an array containing the
-*>         normalizing factors for the right singular vector matrix.
+*>          If ICOMPQ = 1, DIFR(1:K,2) is an array containing the
+*>          normalizing factors for the right singular vector matrix.
 *>
 *>         See DLASD8 for details on DIFL and DIFR.
 *> \endverbatim
@@ -84111,14 +84604,14 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date September 2012
+*> \date June 2016
 *
-*> \ingroup auxOTHERauxiliary
+*> \ingroup OTHERauxiliary
 *
 *> \par Contributors:
 *  ==================
@@ -84132,10 +84625,10 @@
      $                   LDGNUM, POLES, DIFL, DIFR, Z, K, C, S, WORK,
      $                   IWORK, INFO )
 *
-*  -- LAPACK auxiliary routine (version 3.4.2) --
+*  -- LAPACK auxiliary routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     September 2012
+*     June 2016
 *
 *     .. Scalar Arguments ..
       INTEGER            GIVPTR, ICOMPQ, INFO, K, LDGCOL, LDGNUM, NL,
@@ -84232,10 +84725,9 @@
       CALL DLASD8( ICOMPQ, K, D, Z, VF, VL, DIFL, DIFR, LDGNUM,
      $             WORK( ISIGMA ), WORK( IW ), INFO )
 *
-*     Handle error returned
+*     Report the possible convergence failure.
 *
       IF( INFO.NE.0 ) THEN
-         CALL XERBLA( 'DLASD8', -INFO )
          RETURN
       END IF
 *
@@ -84265,18 +84757,18 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DLASD7 + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dlasd7.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dlasd7.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dlasd7.f"> 
+*> Download DLASD7 + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dlasd7.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dlasd7.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dlasd7.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
@@ -84285,7 +84777,7 @@
 *                          VLW, ALPHA, BETA, DSIGMA, IDX, IDXP, IDXQ,
 *                          PERM, GIVPTR, GIVCOL, LDGCOL, GIVNUM, LDGNUM,
 *                          C, S, INFO )
-* 
+*
 *       .. Scalar Arguments ..
 *       INTEGER            GIVPTR, ICOMPQ, INFO, K, LDGCOL, LDGNUM, NL,
 *      $                   NR, SQRE
@@ -84298,7 +84790,7 @@
 *      $                   VF( * ), VFW( * ), VL( * ), VLW( * ), Z( * ),
 *      $                   ZW( * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -84522,14 +85014,14 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date September 2012
+*> \date December 2016
 *
-*> \ingroup auxOTHERauxiliary
+*> \ingroup OTHERauxiliary
 *
 *> \par Contributors:
 *  ==================
@@ -84543,10 +85035,10 @@
      $                   PERM, GIVPTR, GIVCOL, LDGCOL, GIVNUM, LDGNUM,
      $                   C, S, INFO )
 *
-*  -- LAPACK auxiliary routine (version 3.4.2) --
+*  -- LAPACK auxiliary routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     September 2012
+*     December 2016
 *
 *     .. Scalar Arguments ..
       INTEGER            GIVPTR, ICOMPQ, INFO, K, LDGCOL, LDGNUM, NL,
@@ -84845,25 +85337,25 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DLASD8 + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dlasd8.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dlasd8.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dlasd8.f"> 
+*> Download DLASD8 + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dlasd8.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dlasd8.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dlasd8.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       SUBROUTINE DLASD8( ICOMPQ, K, D, Z, VF, VL, DIFL, DIFR, LDDIFR,
 *                          DSIGMA, WORK, INFO )
-* 
+*
 *       .. Scalar Arguments ..
 *       INTEGER            ICOMPQ, INFO, K, LDDIFR
 *       ..
@@ -84872,7 +85364,7 @@
 *      $                   DSIGMA( * ), VF( * ), VL( * ), WORK( * ),
 *      $                   Z( * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -84990,14 +85482,14 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date September 2012
+*> \date December 2016
 *
-*> \ingroup auxOTHERauxiliary
+*> \ingroup OTHERauxiliary
 *
 *> \par Contributors:
 *  ==================
@@ -85009,10 +85501,10 @@
       SUBROUTINE DLASD8( ICOMPQ, K, D, Z, VF, VL, DIFL, DIFR, LDDIFR,
      $                   DSIGMA, WORK, INFO )
 *
-*  -- LAPACK auxiliary routine (version 3.4.2) --
+*  -- LAPACK auxiliary routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     September 2012
+*     December 2016
 *
 *     .. Scalar Arguments ..
       INTEGER            ICOMPQ, INFO, K, LDDIFR
@@ -85119,10 +85611,9 @@
          CALL DLASD4( K, J, DSIGMA, Z, WORK( IWK1 ), RHO, D( J ),
      $                WORK( IWK2 ), INFO )
 *
-*        If the root finder fails, the computation is terminated.
+*        If the root finder fails, report the convergence failure.
 *
          IF( INFO.NE.0 ) THEN
-            CALL XERBLA( 'DLASD4', -INFO )
             RETURN
          END IF
          WORK( IWK3I+J ) = WORK( IWK3I+J )*WORK( J )*WORK( IWK2I+J )
@@ -85188,18 +85679,18 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DLASDA + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dlasda.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dlasda.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dlasda.f"> 
+*> Download DLASDA + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dlasda.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dlasda.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dlasda.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
@@ -85207,7 +85698,7 @@
 *       SUBROUTINE DLASDA( ICOMPQ, SMLSIZ, N, SQRE, D, E, U, LDU, VT, K,
 *                          DIFL, DIFR, Z, POLES, GIVPTR, GIVCOL, LDGCOL,
 *                          PERM, GIVNUM, C, S, WORK, IWORK, INFO )
-* 
+*
 *       .. Scalar Arguments ..
 *       INTEGER            ICOMPQ, INFO, LDGCOL, LDU, N, SMLSIZ, SQRE
 *       ..
@@ -85219,7 +85710,7 @@
 *      $                   S( * ), U( LDU, * ), VT( LDU, * ), WORK( * ),
 *      $                   Z( LDU, * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -85440,14 +85931,14 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date September 2012
+*> \date December 2016
 *
-*> \ingroup auxOTHERauxiliary
+*> \ingroup OTHERauxiliary
 *
 *> \par Contributors:
 *  ==================
@@ -85460,10 +85951,10 @@
      $                   DIFL, DIFR, Z, POLES, GIVPTR, GIVCOL, LDGCOL,
      $                   PERM, GIVNUM, C, S, WORK, IWORK, INFO )
 *
-*  -- LAPACK auxiliary routine (version 3.4.2) --
+*  -- LAPACK auxiliary routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     September 2012
+*     December 2016
 *
 *     .. Scalar Arguments ..
       INTEGER            ICOMPQ, INFO, LDGCOL, LDU, N, SMLSIZ, SQRE
@@ -85703,25 +86194,25 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DLASDQ + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dlasdq.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dlasdq.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dlasdq.f"> 
+*> Download DLASDQ + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dlasdq.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dlasdq.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dlasdq.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       SUBROUTINE DLASDQ( UPLO, SQRE, N, NCVT, NRU, NCC, D, E, VT, LDVT,
 *                          U, LDU, C, LDC, WORK, INFO )
-* 
+*
 *       .. Scalar Arguments ..
 *       CHARACTER          UPLO
 *       INTEGER            INFO, LDC, LDU, LDVT, N, NCC, NCVT, NRU, SQRE
@@ -85730,7 +86221,7 @@
 *       DOUBLE PRECISION   C( LDC, * ), D( * ), E( * ), U( LDU, * ),
 *      $                   VT( LDVT, * ), WORK( * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -85760,7 +86251,7 @@
 *> \verbatim
 *>          UPLO is CHARACTER*1
 *>        On entry, UPLO specifies whether the input bidiagonal matrix
-*>        is upper or lower bidiagonal, and wether it is square are
+*>        is upper or lower bidiagonal, and whether it is square are
 *>        not.
 *>           UPLO = 'U' or 'u'   B is upper bidiagonal.
 *>           UPLO = 'L' or 'l'   B is lower bidiagonal.
@@ -85893,14 +86384,14 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date September 2012
+*> \date June 2016
 *
-*> \ingroup auxOTHERauxiliary
+*> \ingroup OTHERauxiliary
 *
 *> \par Contributors:
 *  ==================
@@ -85912,10 +86403,10 @@
       SUBROUTINE DLASDQ( UPLO, SQRE, N, NCVT, NRU, NCC, D, E, VT, LDVT,
      $                   U, LDU, C, LDC, WORK, INFO )
 *
-*  -- LAPACK auxiliary routine (version 3.4.2) --
+*  -- LAPACK auxiliary routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     September 2012
+*     June 2016
 *
 *     .. Scalar Arguments ..
       CHARACTER          UPLO
@@ -86116,31 +86607,31 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DLASDT + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dlasdt.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dlasdt.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dlasdt.f"> 
+*> Download DLASDT + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dlasdt.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dlasdt.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dlasdt.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       SUBROUTINE DLASDT( N, LVL, ND, INODE, NDIML, NDIMR, MSUB )
-* 
+*
 *       .. Scalar Arguments ..
 *       INTEGER            LVL, MSUB, N, ND
 *       ..
 *       .. Array Arguments ..
 *       INTEGER            INODE( * ), NDIML( * ), NDIMR( * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -86201,14 +86692,14 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date September 2012
+*> \date December 2016
 *
-*> \ingroup auxOTHERauxiliary
+*> \ingroup OTHERauxiliary
 *
 *> \par Contributors:
 *  ==================
@@ -86219,10 +86710,10 @@
 *  =====================================================================
       SUBROUTINE DLASDT( N, LVL, ND, INODE, NDIML, NDIMR, MSUB )
 *
-*  -- LAPACK auxiliary routine (version 3.4.2) --
+*  -- LAPACK auxiliary routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     September 2012
+*     December 2016
 *
 *     .. Scalar Arguments ..
       INTEGER            LVL, MSUB, N, ND
@@ -86288,24 +86779,24 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DLASET + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dlaset.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dlaset.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dlaset.f"> 
+*> Download DLASET + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dlaset.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dlaset.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dlaset.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       SUBROUTINE DLASET( UPLO, M, N, ALPHA, BETA, A, LDA )
-* 
+*
 *       .. Scalar Arguments ..
 *       CHARACTER          UPLO
 *       INTEGER            LDA, M, N
@@ -86314,7 +86805,7 @@
 *       .. Array Arguments ..
 *       DOUBLE PRECISION   A( LDA, * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -86363,7 +86854,7 @@
 *>          The constant to which the diagonal elements are to be set.
 *> \endverbatim
 *>
-*> \param[in,out] A
+*> \param[out] A
 *> \verbatim
 *>          A is DOUBLE PRECISION array, dimension (LDA,N)
 *>          On exit, the leading m-by-n submatrix of A is set as follows:
@@ -86384,22 +86875,22 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date September 2012
+*> \date December 2016
 *
-*> \ingroup auxOTHERauxiliary
+*> \ingroup OTHERauxiliary
 *
 *  =====================================================================
       SUBROUTINE DLASET( UPLO, M, N, ALPHA, BETA, A, LDA )
 *
-*  -- LAPACK auxiliary routine (version 3.4.2) --
+*  -- LAPACK auxiliary routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     September 2012
+*     December 2016
 *
 *     .. Scalar Arguments ..
       CHARACTER          UPLO
@@ -86472,31 +86963,31 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DLASQ1 + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dlasq1.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dlasq1.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dlasq1.f"> 
+*> Download DLASQ1 + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dlasq1.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dlasq1.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dlasq1.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       SUBROUTINE DLASQ1( N, D, E, WORK, INFO )
-* 
+*
 *       .. Scalar Arguments ..
 *       INTEGER            INFO, N
 *       ..
 *       .. Array Arguments ..
 *       DOUBLE PRECISION   D( * ), E( * ), WORK( * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -86559,29 +87050,29 @@
 *>                  represent a matrix with the same singular values
 *>                  which the calling subroutine could use to finish the
 *>                  computation, or even feed back into DLASQ1
-*>             = 3, termination criterion of outer while loop not met 
+*>             = 3, termination criterion of outer while loop not met
 *>                  (program created more than N unreduced blocks)
 *> \endverbatim
 *
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date September 2012
+*> \date December 2016
 *
 *> \ingroup auxOTHERcomputational
 *
 *  =====================================================================
       SUBROUTINE DLASQ1( N, D, E, WORK, INFO )
 *
-*  -- LAPACK computational routine (version 3.4.2) --
+*  -- LAPACK computational routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     September 2012
+*     December 2016
 *
 *     .. Scalar Arguments ..
       INTEGER            INFO, N
@@ -86614,7 +87105,7 @@
 *
       INFO = 0
       IF( N.LT.0 ) THEN
-         INFO = -2
+         INFO = -1
          CALL XERBLA( 'DLASQ1', -INFO )
          RETURN
       ELSE IF( N.EQ.0 ) THEN
@@ -86659,7 +87150,7 @@
       CALL DCOPY( N-1, E, 1, WORK( 2 ), 2 )
       CALL DLASCL( 'G', 0, 0, SIGMX, SCALE, 2*N-1, 1, WORK, 2*N-1,
      $             IINFO )
-*         
+*
 *     Compute the q's and e's.
 *
       DO 30 I = 1, 2*N - 1
@@ -86696,38 +87187,38 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DLASQ2 + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dlasq2.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dlasq2.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dlasq2.f"> 
+*> Download DLASQ2 + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dlasq2.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dlasq2.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dlasq2.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       SUBROUTINE DLASQ2( N, Z, INFO )
-* 
+*
 *       .. Scalar Arguments ..
 *       INTEGER            INFO, N
 *       ..
 *       .. Array Arguments ..
 *       DOUBLE PRECISION   Z( * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
 *>
 *> \verbatim
 *>
-*> DLASQ2 computes all the eigenvalues of the symmetric positive 
+*> DLASQ2 computes all the eigenvalues of the symmetric positive
 *> definite tridiagonal matrix associated with the qd array Z to high
 *> relative accuracy are computed to high relative accuracy, in the
 *> absence of denormalization, underflow and overflow.
@@ -86777,19 +87268,19 @@
 *>              = 2, current block of Z not diagonalized after 100*N
 *>                   iterations (in inner while loop).  On exit Z holds
 *>                   a qd array with the same eigenvalues as the given Z.
-*>              = 3, termination criterion of outer while loop not met 
+*>              = 3, termination criterion of outer while loop not met
 *>                   (program created more than N unreduced blocks)
 *> \endverbatim
 *
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date September 2012
+*> \date December 2016
 *
 *> \ingroup auxOTHERcomputational
 *
@@ -86806,10 +87297,10 @@
 *  =====================================================================
       SUBROUTINE DLASQ2( N, Z, INFO )
 *
-*  -- LAPACK computational routine (version 3.4.2) --
+*  -- LAPACK computational routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     September 2012
+*     December 2016
 *
 *     .. Scalar Arguments ..
       INTEGER            INFO, N
@@ -86830,7 +87321,7 @@
 *     .. Local Scalars ..
       LOGICAL            IEEE
       INTEGER            I0, I1, I4, IINFO, IPN4, ITER, IWHILA, IWHILB,
-     $                   K, KMIN, N0, N1, NBIG, NDIV, NFAIL, PP, SPLT, 
+     $                   K, KMIN, N0, N1, NBIG, NDIV, NFAIL, PP, SPLT,
      $                   TTYPE
       DOUBLE PRECISION   D, DEE, DEEMIN, DESIG, DMIN, DMIN1, DMIN2, DN,
      $                   DN1, DN2, E, EMAX, EMIN, EPS, G, OLDEMN, QMAX,
@@ -86849,7 +87340,7 @@
       INTRINSIC          ABS, DBLE, MAX, MIN, SQRT
 *     ..
 *     .. Executable Statements ..
-*      
+*
 *     Test the input arguments.
 *     (in case DLASQ2 is not called by DLASQ1)
 *
@@ -86889,7 +87380,7 @@
          END IF
          Z( 5 ) = Z( 1 ) + Z( 2 ) + Z( 3 )
          IF( Z( 2 ).GT.Z( 3 )*TOL2 ) THEN
-            T = HALF*( ( Z( 1 )-Z( 3 ) )+Z( 2 ) ) 
+            T = HALF*( ( Z( 1 )-Z( 3 ) )+Z( 2 ) )
             S = Z( 3 )*( Z( 2 ) / T )
             IF( S.LE.T ) THEN
                S = Z( 3 )*( Z( 2 ) / ( T*( ONE+SQRT( ONE+S / T ) ) ) )
@@ -86958,19 +87449,19 @@
          Z( 2*N-1 ) = ZERO
          RETURN
       END IF
-*         
+*
 *     Check whether the machine is IEEE conformable.
-*         
+*
       IEEE = ILAENV( 10, 'DLASQ2', 'N', 1, 2, 3, 4 ).EQ.1 .AND.
-     $       ILAENV( 11, 'DLASQ2', 'N', 1, 2, 3, 4 ).EQ.1      
-*         
+     $       ILAENV( 11, 'DLASQ2', 'N', 1, 2, 3, 4 ).EQ.1
+*
 *     Rearrange data for locality: Z=(q1,qq1,e1,ee1,q2,qq2,e2,ee2,...).
 *
       DO 30 K = 2*N, 2, -2
-         Z( 2*K ) = ZERO 
-         Z( 2*K-1 ) = Z( K ) 
-         Z( 2*K-2 ) = ZERO 
-         Z( 2*K-3 ) = Z( K-1 ) 
+         Z( 2*K ) = ZERO
+         Z( 2*K-1 ) = Z( K )
+         Z( 2*K-2 ) = ZERO
+         Z( 2*K-3 ) = Z( K-1 )
    30 CONTINUE
 *
       I0 = 1
@@ -87027,7 +87518,7 @@
                D = Z( I4+1 )*( D / Z( I4-2*PP-2 ) )
             END IF
             EMIN = MIN( EMIN, Z( I4-2*PP ) )
-   60    CONTINUE 
+   60    CONTINUE
          Z( 4*N0-PP-2 ) = D
 *
 *        Now find qmax.
@@ -87058,14 +87549,14 @@
       NDIV = 2*( N0-I0 )
 *
       DO 160 IWHILA = 1, N + 1
-         IF( N0.LT.1 ) 
+         IF( N0.LT.1 )
      $      GO TO 170
 *
-*        While array unfinished do 
+*        While array unfinished do
 *
 *        E(N0) holds the value of SIGMA when submatrix in I0:N0
 *        splits from the rest of the array, but is negated.
-*      
+*
          DESIG = ZERO
          IF( N0.EQ.N ) THEN
             SIGMA = ZERO
@@ -87080,7 +87571,7 @@
 *        Find last unreduced submatrix's top index I0, find QMAX and
 *        EMIN. Find Gershgorin-type bound if Q's much greater than E's.
 *
-         EMAX = ZERO 
+         EMAX = ZERO
          IF( N0.GT.I0 ) THEN
             EMIN = ABS( Z( 4*N0-5 ) )
          ELSE
@@ -87098,7 +87589,7 @@
             QMAX = MAX( QMAX, Z( I4-7 )+Z( I4-5 ) )
             EMIN = MIN( EMIN, Z( I4-5 ) )
    90    CONTINUE
-         I4 = 4 
+         I4 = 4
 *
   100    CONTINUE
          I0 = I4 / 4
@@ -87115,7 +87606,7 @@
                   KMIN = ( I4+3 )/4
                END IF
   110       CONTINUE
-            IF( (KMIN-I0)*2.LT.N0-KMIN .AND. 
+            IF( (KMIN-I0)*2.LT.N0-KMIN .AND.
      $         DEEMIN.LE.HALF*Z(4*N0-3) ) THEN
                IPN4 = 4*( I0+N0 )
                PP = 2
@@ -87140,15 +87631,15 @@
 *
          DMIN = -MAX( ZERO, QMIN-TWO*SQRT( QMIN )*SQRT( EMAX ) )
 *
-*        Now I0:N0 is unreduced. 
+*        Now I0:N0 is unreduced.
 *        PP = 0 for ping, PP = 1 for pong.
 *        PP = 2 indicates that flipping was applied to the Z array and
-*               and that the tests for deflation upon entry in DLASQ3 
+*               and that the tests for deflation upon entry in DLASQ3
 *               should not be performed.
 *
          NBIG = 100*( N0-I0+1 )
          DO 140 IWHILB = 1, NBIG
-            IF( I0.GT.N0 ) 
+            IF( I0.GT.N0 )
      $         GO TO 150
 *
 *           While submatrix unfinished take a good dqds step.
@@ -87191,8 +87682,8 @@
   140    CONTINUE
 *
          INFO = 2
-*       
-*        Maximum number of iterations exceeded, restore the shift 
+*
+*        Maximum number of iterations exceeded, restore the shift
 *        SIGMA and place the new d's and e's in a qd array.
 *        This might need to be done for several blocks
 *
@@ -87243,16 +87734,16 @@
       INFO = 3
       RETURN
 *
-*     end IWHILA   
+*     end IWHILA
 *
   170 CONTINUE
-*      
+*
 *     Move q's to the front.
-*      
+*
       DO 180 K = 2, N
          Z( K ) = Z( 4*K-3 )
   180 CONTINUE
-*      
+*
 *     Sort and compute sum of eigenvalues.
 *
       CALL DLASRT( 'D', N, Z, IINFO )
@@ -87264,7 +87755,7 @@
 *
 *     Store trace, sum(eigenvalues) and information on performance.
 *
-      Z( 2*N+1 ) = TRACE 
+      Z( 2*N+1 ) = TRACE
       Z( 2*N+2 ) = E
       Z( 2*N+3 ) = DBLE( ITER )
       Z( 2*N+4 ) = DBLE( NDIV ) / DBLE( N**2 )
@@ -87278,18 +87769,18 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DLASQ3 + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dlasq3.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dlasq3.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dlasq3.f"> 
+*> Download DLASQ3 + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dlasq3.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dlasq3.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dlasq3.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
@@ -87297,7 +87788,7 @@
 *       SUBROUTINE DLASQ3( I0, N0, Z, PP, DMIN, SIGMA, DESIG, QMAX, NFAIL,
 *                          ITER, NDIV, IEEE, TTYPE, DMIN1, DMIN2, DN, DN1,
 *                          DN2, G, TAU )
-* 
+*
 *       .. Scalar Arguments ..
 *       LOGICAL            IEEE
 *       INTEGER            I0, ITER, N0, NDIV, NFAIL, PP
@@ -87307,7 +87798,7 @@
 *       .. Array Arguments ..
 *       DOUBLE PRECISION   Z( * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -87334,9 +87825,9 @@
 *>         Last index.
 *> \endverbatim
 *>
-*> \param[in] Z
+*> \param[in,out] Z
 *> \verbatim
-*>          Z is DOUBLE PRECISION array, dimension ( 4*N )
+*>          Z is DOUBLE PRECISION array, dimension ( 4*N0 )
 *>         Z holds the qd array.
 *> \endverbatim
 *>
@@ -87344,8 +87835,8 @@
 *> \verbatim
 *>          PP is INTEGER
 *>         PP=0 for ping, PP=1 for pong.
-*>         PP=2 indicates that flipping was applied to the Z array   
-*>         and that the initial tests for deflation should not be 
+*>         PP=2 indicates that flipping was applied to the Z array
+*>         and that the initial tests for deflation should not be
 *>         performed.
 *> \endverbatim
 *>
@@ -87373,22 +87864,22 @@
 *>         Maximum value of q.
 *> \endverbatim
 *>
-*> \param[out] NFAIL
+*> \param[in,out] NFAIL
 *> \verbatim
 *>          NFAIL is INTEGER
-*>         Number of times shift was too big.
+*>         Increment NFAIL by 1 each time the shift was too big.
 *> \endverbatim
 *>
-*> \param[out] ITER
+*> \param[in,out] ITER
 *> \verbatim
 *>          ITER is INTEGER
-*>         Number of iterations.
+*>         Increment ITER by 1 for each iteration.
 *> \endverbatim
 *>
-*> \param[out] NDIV
+*> \param[in,out] NDIV
 *> \verbatim
 *>          NDIV is INTEGER
-*>         Number of divisions.
+*>         Increment NDIV by 1 for each division.
 *> \endverbatim
 *>
 *> \param[in] IEEE
@@ -87444,12 +87935,12 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date September 2012
+*> \date June 2016
 *
 *> \ingroup auxOTHERcomputational
 *
@@ -87458,10 +87949,10 @@
      $                   ITER, NDIV, IEEE, TTYPE, DMIN1, DMIN2, DN, DN1,
      $                   DN2, G, TAU )
 *
-*  -- LAPACK computational routine (version 3.4.2) --
+*  -- LAPACK computational routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     September 2012
+*     June 2016
 *
 *     .. Scalar Arguments ..
       LOGICAL            IEEE
@@ -87562,7 +88053,7 @@
       GO TO 10
 *
    50 CONTINUE
-      IF( PP.EQ.2 ) 
+      IF( PP.EQ.2 )
      $   PP = 0
 *
 *     Reverse the qd-array, if warranted.
@@ -87621,7 +88112,7 @@
 *
          GO TO 90
 *
-      ELSE IF( DMIN.LT.ZERO .AND. DMIN1.GT.ZERO .AND. 
+      ELSE IF( DMIN.LT.ZERO .AND. DMIN1.GT.ZERO .AND.
      $         Z( 4*( N0-1 )-PP ).LT.TOL*( SIGMA+DN1 ) .AND.
      $         ABS( DN ).LT.TOL*SIGMA ) THEN
 *
@@ -87665,7 +88156,7 @@
             GO TO 70
          END IF
       ELSE
-*            
+*
 *        Possible underflow. Play it safe.
 *
          GO TO 80
@@ -87699,25 +88190,25 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DLASQ4 + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dlasq4.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dlasq4.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dlasq4.f"> 
+*> Download DLASQ4 + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dlasq4.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dlasq4.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dlasq4.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       SUBROUTINE DLASQ4( I0, N0, Z, PP, N0IN, DMIN, DMIN1, DMIN2, DN,
 *                          DN1, DN2, TAU, TTYPE, G )
-* 
+*
 *       .. Scalar Arguments ..
 *       INTEGER            I0, N0, N0IN, PP, TTYPE
 *       DOUBLE PRECISION   DMIN, DMIN1, DMIN2, DN, DN1, DN2, G, TAU
@@ -87725,7 +88216,7 @@
 *       .. Array Arguments ..
 *       DOUBLE PRECISION   Z( * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -87753,7 +88244,7 @@
 *>
 *> \param[in] Z
 *> \verbatim
-*>          Z is DOUBLE PRECISION array, dimension ( 4*N )
+*>          Z is DOUBLE PRECISION array, dimension ( 4*N0 )
 *>        Z holds the qd array.
 *> \endverbatim
 *>
@@ -87819,7 +88310,7 @@
 *>
 *> \param[in,out] G
 *> \verbatim
-*>          G is REAL
+*>          G is DOUBLE PRECISION
 *>        G is passed as an argument in order to save its value between
 *>        calls to DLASQ4.
 *> \endverbatim
@@ -87827,12 +88318,12 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date September 2012
+*> \date June 2016
 *
 *> \ingroup auxOTHERcomputational
 *
@@ -87848,10 +88339,10 @@
       SUBROUTINE DLASQ4( I0, N0, Z, PP, N0IN, DMIN, DMIN1, DMIN2, DN,
      $                   DN1, DN2, TAU, TTYPE, G )
 *
-*  -- LAPACK computational routine (version 3.4.2) --
+*  -- LAPACK computational routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     September 2012
+*     June 2016
 *
 *     .. Scalar Arguments ..
       INTEGER            I0, N0, N0IN, PP, TTYPE
@@ -87889,7 +88380,7 @@
          TTYPE = -1
          RETURN
       END IF
-*       
+*
       NN = 4*N0 + PP
       IF( N0IN.EQ.N0 ) THEN
 *
@@ -87959,7 +88450,7 @@
      $               RETURN
                   B2 = B2*( Z( I4 ) / Z( I4-2 ) )
                   A2 = A2 + B2
-                  IF( HUNDRD*MAX( B2, B1 ).LT.A2 .OR. CNST1.LT.A2 ) 
+                  IF( HUNDRD*MAX( B2, B1 ).LT.A2 .OR. CNST1.LT.A2 )
      $               GO TO 20
    10          CONTINUE
    20          CONTINUE
@@ -88000,7 +88491,7 @@
      $               RETURN
                   B2 = B2*( Z( I4 ) / Z( I4-2 ) )
                   A2 = A2 + B2
-                  IF( HUNDRD*MAX( B2, B1 ).LT.A2 .OR. CNST1.LT.A2 ) 
+                  IF( HUNDRD*MAX( B2, B1 ).LT.A2 .OR. CNST1.LT.A2 )
      $               GO TO 40
    30          CONTINUE
    40          CONTINUE
@@ -88028,7 +88519,7 @@
 *
 *        One eigenvalue just deflated. Use DMIN1, DN1 for DMIN and DN.
 *
-         IF( DMIN1.EQ.DN1 .AND. DMIN2.EQ.DN2 ) THEN 
+         IF( DMIN1.EQ.DN1 .AND. DMIN2.EQ.DN2 ) THEN
 *
 *           Cases 7 and 8.
 *
@@ -88046,7 +88537,7 @@
      $            RETURN
                B1 = B1*( Z( I4 ) / Z( I4-2 ) )
                B2 = B2 + B1
-               IF( HUNDRD*MAX( B1, A2 ).LT.B2 ) 
+               IF( HUNDRD*MAX( B1, A2 ).LT.B2 )
      $            GO TO 60
    50       CONTINUE
    60       CONTINUE
@@ -88055,7 +88546,7 @@
             GAP2 = HALF*DMIN2 - A2
             IF( GAP2.GT.ZERO .AND. GAP2.GT.B2*A2 ) THEN
                S = MAX( S, A2*( ONE-CNST2*A2*( B2 / GAP2 )*B2 ) )
-            ELSE 
+            ELSE
                S = MAX( S, A2*( ONE-CNST2*B2 ) )
                TTYPE = -8
             END IF
@@ -88075,7 +88566,7 @@
 *
 *        Cases 10 and 11.
 *
-         IF( DMIN2.EQ.DN2 .AND. TWO*Z( NN-5 ).LT.Z( NN-7 ) ) THEN 
+         IF( DMIN2.EQ.DN2 .AND. TWO*Z( NN-5 ).LT.Z( NN-7 ) ) THEN
             TTYPE = -10
             S = THIRD*DMIN2
             IF( Z( NN-5 ).GT.Z( NN-7 ) )
@@ -88099,7 +88590,7 @@
      $             SQRT( Z( NN-11 ) )*SQRT( Z( NN-9 ) ) - A2
             IF( GAP2.GT.ZERO .AND. GAP2.GT.B2*A2 ) THEN
                S = MAX( S, A2*( ONE-CNST2*A2*( B2 / GAP2 )*B2 ) )
-            ELSE 
+            ELSE
                S = MAX( S, A2*( ONE-CNST2*B2 ) )
             END IF
          ELSE
@@ -88110,7 +88601,7 @@
 *
 *        Case 12, more than two eigenvalues deflated. No information.
 *
-         S = ZERO 
+         S = ZERO
          TTYPE = -12
       END IF
 *
@@ -88124,25 +88615,25 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DLASQ5 + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dlasq5.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dlasq5.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dlasq5.f"> 
+*> Download DLASQ5 + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dlasq5.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dlasq5.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dlasq5.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       SUBROUTINE DLASQ5( I0, N0, Z, PP, TAU, SIGMA, DMIN, DMIN1, DMIN2, DN,
 *                          DNM1, DNM2, IEEE, EPS )
-* 
+*
 *       .. Scalar Arguments ..
 *       LOGICAL            IEEE
 *       INTEGER            I0, N0, PP
@@ -88151,7 +88642,7 @@
 *       .. Array Arguments ..
 *       DOUBLE PRECISION   Z( * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -88253,12 +88744,12 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date September 2012
+*> \date December 2016
 *
 *> \ingroup auxOTHERcomputational
 *
@@ -88266,10 +88757,10 @@
       SUBROUTINE DLASQ5( I0, N0, Z, PP, TAU, SIGMA, DMIN, DMIN1, DMIN2,
      $                   DN, DNM1, DNM2, IEEE, EPS )
 *
-*  -- LAPACK computational routine (version 3.4.2) --
+*  -- LAPACK computational routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     September 2012
+*     December 2016
 *
 *     .. Scalar Arguments ..
       LOGICAL            IEEE
@@ -88303,7 +88794,7 @@
       IF( TAU.LT.DTHRESH*HALF ) TAU = ZERO
       IF( TAU.NE.ZERO ) THEN
       J4 = 4*I0 + PP - 3
-      EMIN = Z( J4+4 ) 
+      EMIN = Z( J4+4 )
       D = Z( J4 ) - TAU
       DMIN = D
       DMIN1 = -Z( J4 )
@@ -88314,7 +88805,7 @@
 *
          IF( PP.EQ.0 ) THEN
             DO 10 J4 = 4*I0, 4*( N0-3 ), 4
-               Z( J4-2 ) = D + Z( J4-1 ) 
+               Z( J4-2 ) = D + Z( J4-1 )
                TEMP = Z( J4+1 ) / Z( J4-2 )
                D = D*TEMP - TAU
                DMIN = MIN( DMIN, D )
@@ -88323,7 +88814,7 @@
    10       CONTINUE
          ELSE
             DO 20 J4 = 4*I0, 4*( N0-3 ), 4
-               Z( J4-3 ) = D + Z( J4 ) 
+               Z( J4-3 ) = D + Z( J4 )
                TEMP = Z( J4+2 ) / Z( J4-3 )
                D = D*TEMP - TAU
                DMIN = MIN( DMIN, D )
@@ -88332,7 +88823,7 @@
    20       CONTINUE
          END IF
 *
-*        Unroll last two steps. 
+*        Unroll last two steps.
 *
          DNM2 = D
          DMIN2 = DMIN
@@ -88357,10 +88848,10 @@
 *
          IF( PP.EQ.0 ) THEN
             DO 30 J4 = 4*I0, 4*( N0-3 ), 4
-               Z( J4-2 ) = D + Z( J4-1 ) 
+               Z( J4-2 ) = D + Z( J4-1 )
                IF( D.LT.ZERO ) THEN
                   RETURN
-               ELSE 
+               ELSE
                   Z( J4 ) = Z( J4+1 )*( Z( J4-1 ) / Z( J4-2 ) )
                   D = Z( J4+1 )*( D / Z( J4-2 ) ) - TAU
                END IF
@@ -88369,10 +88860,10 @@
    30       CONTINUE
          ELSE
             DO 40 J4 = 4*I0, 4*( N0-3 ), 4
-               Z( J4-3 ) = D + Z( J4 ) 
+               Z( J4-3 ) = D + Z( J4 )
                IF( D.LT.ZERO ) THEN
                   RETURN
-               ELSE 
+               ELSE
                   Z( J4-1 ) = Z( J4+2 )*( Z( J4 ) / Z( J4-3 ) )
                   D = Z( J4+2 )*( D / Z( J4-3 ) ) - TAU
                END IF
@@ -88381,7 +88872,7 @@
    40       CONTINUE
          END IF
 *
-*        Unroll last two steps. 
+*        Unroll last two steps.
 *
          DNM2 = D
          DMIN2 = DMIN
@@ -88412,17 +88903,17 @@
       ELSE
 *     This is the version that sets d's to zero if they are small enough
          J4 = 4*I0 + PP - 3
-         EMIN = Z( J4+4 ) 
+         EMIN = Z( J4+4 )
          D = Z( J4 ) - TAU
          DMIN = D
          DMIN1 = -Z( J4 )
          IF( IEEE ) THEN
-*     
+*
 *     Code for IEEE arithmetic.
-*     
+*
             IF( PP.EQ.0 ) THEN
                DO 50 J4 = 4*I0, 4*( N0-3 ), 4
-                  Z( J4-2 ) = D + Z( J4-1 ) 
+                  Z( J4-2 ) = D + Z( J4-1 )
                   TEMP = Z( J4+1 ) / Z( J4-2 )
                   D = D*TEMP - TAU
                   IF( D.LT.DTHRESH ) D = ZERO
@@ -88432,7 +88923,7 @@
  50            CONTINUE
             ELSE
                DO 60 J4 = 4*I0, 4*( N0-3 ), 4
-                  Z( J4-3 ) = D + Z( J4 ) 
+                  Z( J4-3 ) = D + Z( J4 )
                   TEMP = Z( J4+2 ) / Z( J4-3 )
                   D = D*TEMP - TAU
                   IF( D.LT.DTHRESH ) D = ZERO
@@ -88441,9 +88932,9 @@
                   EMIN = MIN( Z( J4-1 ), EMIN )
  60            CONTINUE
             END IF
-*     
-*     Unroll last two steps. 
-*     
+*
+*     Unroll last two steps.
+*
             DNM2 = D
             DMIN2 = DMIN
             J4 = 4*( N0-2 ) - PP
@@ -88452,7 +88943,7 @@
             Z( J4 ) = Z( J4P2+2 )*( Z( J4P2 ) / Z( J4-2 ) )
             DNM1 = Z( J4P2+2 )*( DNM2 / Z( J4-2 ) ) - TAU
             DMIN = MIN( DMIN, DNM1 )
-*     
+*
             DMIN1 = DMIN
             J4 = J4 + 4
             J4P2 = J4 + 2*PP - 1
@@ -88460,17 +88951,17 @@
             Z( J4 ) = Z( J4P2+2 )*( Z( J4P2 ) / Z( J4-2 ) )
             DN = Z( J4P2+2 )*( DNM1 / Z( J4-2 ) ) - TAU
             DMIN = MIN( DMIN, DN )
-*     
+*
          ELSE
-*     
+*
 *     Code for non IEEE arithmetic.
-*     
+*
             IF( PP.EQ.0 ) THEN
                DO 70 J4 = 4*I0, 4*( N0-3 ), 4
-                  Z( J4-2 ) = D + Z( J4-1 ) 
+                  Z( J4-2 ) = D + Z( J4-1 )
                   IF( D.LT.ZERO ) THEN
                      RETURN
-                  ELSE 
+                  ELSE
                      Z( J4 ) = Z( J4+1 )*( Z( J4-1 ) / Z( J4-2 ) )
                      D = Z( J4+1 )*( D / Z( J4-2 ) ) - TAU
                   END IF
@@ -88480,10 +88971,10 @@
  70            CONTINUE
             ELSE
                DO 80 J4 = 4*I0, 4*( N0-3 ), 4
-                  Z( J4-3 ) = D + Z( J4 ) 
+                  Z( J4-3 ) = D + Z( J4 )
                   IF( D.LT.ZERO ) THEN
                      RETURN
-                  ELSE 
+                  ELSE
                      Z( J4-1 ) = Z( J4+2 )*( Z( J4 ) / Z( J4-3 ) )
                      D = Z( J4+2 )*( D / Z( J4-3 ) ) - TAU
                   END IF
@@ -88492,9 +88983,9 @@
                   EMIN = MIN( EMIN, Z( J4-1 ) )
  80            CONTINUE
             END IF
-*     
-*     Unroll last two steps. 
-*     
+*
+*     Unroll last two steps.
+*
             DNM2 = D
             DMIN2 = DMIN
             J4 = 4*( N0-2 ) - PP
@@ -88507,7 +88998,7 @@
                DNM1 = Z( J4P2+2 )*( DNM2 / Z( J4-2 ) ) - TAU
             END IF
             DMIN = MIN( DMIN, DNM1 )
-*     
+*
             DMIN1 = DMIN
             J4 = J4 + 4
             J4P2 = J4 + 2*PP - 1
@@ -88519,10 +89010,10 @@
                DN = Z( J4P2+2 )*( DNM1 / Z( J4-2 ) ) - TAU
             END IF
             DMIN = MIN( DMIN, DN )
-*     
+*
          END IF
       END IF
-*     
+*
       Z( J4+2 ) = DN
       Z( 4*N0-PP ) = EMIN
       RETURN
@@ -88534,25 +89025,25 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DLASQ6 + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dlasq6.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dlasq6.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dlasq6.f"> 
+*> Download DLASQ6 + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dlasq6.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dlasq6.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dlasq6.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       SUBROUTINE DLASQ6( I0, N0, Z, PP, DMIN, DMIN1, DMIN2, DN,
 *                          DNM1, DNM2 )
-* 
+*
 *       .. Scalar Arguments ..
 *       INTEGER            I0, N0, PP
 *       DOUBLE PRECISION   DMIN, DMIN1, DMIN2, DN, DNM1, DNM2
@@ -88560,7 +89051,7 @@
 *       .. Array Arguments ..
 *       DOUBLE PRECISION   Z( * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -88638,12 +89129,12 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date September 2012
+*> \date December 2016
 *
 *> \ingroup auxOTHERcomputational
 *
@@ -88651,10 +89142,10 @@
       SUBROUTINE DLASQ6( I0, N0, Z, PP, DMIN, DMIN1, DMIN2, DN,
      $                   DNM1, DNM2 )
 *
-*  -- LAPACK computational routine (version 3.4.2) --
+*  -- LAPACK computational routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     September 2012
+*     December 2016
 *
 *     .. Scalar Arguments ..
       INTEGER            I0, N0, PP
@@ -88688,13 +89179,13 @@
 *
       SAFMIN = DLAMCH( 'Safe minimum' )
       J4 = 4*I0 + PP - 3
-      EMIN = Z( J4+4 ) 
+      EMIN = Z( J4+4 )
       D = Z( J4 )
       DMIN = D
 *
       IF( PP.EQ.0 ) THEN
          DO 10 J4 = 4*I0, 4*( N0-3 ), 4
-            Z( J4-2 ) = D + Z( J4-1 ) 
+            Z( J4-2 ) = D + Z( J4-1 )
             IF( Z( J4-2 ).EQ.ZERO ) THEN
                Z( J4 ) = ZERO
                D = Z( J4+1 )
@@ -88705,7 +89196,7 @@
                TEMP = Z( J4+1 ) / Z( J4-2 )
                Z( J4 ) = Z( J4-1 )*TEMP
                D = D*TEMP
-            ELSE 
+            ELSE
                Z( J4 ) = Z( J4+1 )*( Z( J4-1 ) / Z( J4-2 ) )
                D = Z( J4+1 )*( D / Z( J4-2 ) )
             END IF
@@ -88714,7 +89205,7 @@
    10    CONTINUE
       ELSE
          DO 20 J4 = 4*I0, 4*( N0-3 ), 4
-            Z( J4-3 ) = D + Z( J4 ) 
+            Z( J4-3 ) = D + Z( J4 )
             IF( Z( J4-3 ).EQ.ZERO ) THEN
                Z( J4-1 ) = ZERO
                D = Z( J4+2 )
@@ -88725,7 +89216,7 @@
                TEMP = Z( J4+2 ) / Z( J4-3 )
                Z( J4-1 ) = Z( J4 )*TEMP
                D = D*TEMP
-            ELSE 
+            ELSE
                Z( J4-1 ) = Z( J4+2 )*( Z( J4 ) / Z( J4-3 ) )
                D = Z( J4+2 )*( D / Z( J4-3 ) )
             END IF
@@ -88734,7 +89225,7 @@
    20    CONTINUE
       END IF
 *
-*     Unroll last two steps. 
+*     Unroll last two steps.
 *
       DNM2 = D
       DMIN2 = DMIN
@@ -88788,24 +89279,24 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DLASR + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dlasr.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dlasr.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dlasr.f"> 
+*> Download DLASR + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dlasr.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dlasr.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dlasr.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       SUBROUTINE DLASR( SIDE, PIVOT, DIRECT, M, N, C, S, A, LDA )
-* 
+*
 *       .. Scalar Arguments ..
 *       CHARACTER          DIRECT, PIVOT, SIDE
 *       INTEGER            LDA, M, N
@@ -88813,7 +89304,7 @@
 *       .. Array Arguments ..
 *       DOUBLE PRECISION   A( LDA, * ), C( * ), S( * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -88822,35 +89313,35 @@
 *>
 *> DLASR applies a sequence of plane rotations to a real matrix A,
 *> from either the left or the right.
-*> 
+*>
 *> When SIDE = 'L', the transformation takes the form
-*> 
+*>
 *>    A := P*A
-*> 
+*>
 *> and when SIDE = 'R', the transformation takes the form
-*> 
+*>
 *>    A := A*P**T
-*> 
+*>
 *> where P is an orthogonal matrix consisting of a sequence of z plane
 *> rotations, with z = M when SIDE = 'L' and z = N when SIDE = 'R',
 *> and P**T is the transpose of P.
-*> 
+*>
 *> When DIRECT = 'F' (Forward sequence), then
-*> 
+*>
 *>    P = P(z-1) * ... * P(2) * P(1)
-*> 
+*>
 *> and when DIRECT = 'B' (Backward sequence), then
-*> 
+*>
 *>    P = P(1) * P(2) * ... * P(z-1)
-*> 
+*>
 *> where P(k) is a plane rotation matrix defined by the 2-by-2 rotation
-*> 
+*>
 *>    R(k) = (  c(k)  s(k) )
 *>         = ( -s(k)  c(k) ).
-*> 
+*>
 *> When PIVOT = 'V' (Variable pivot), the rotation is performed
 *> for the plane (k,k+1), i.e., P(k) has the form
-*> 
+*>
 *>    P(k) = (  1                                            )
 *>           (       ...                                     )
 *>           (              1                                )
@@ -88859,13 +89350,13 @@
 *>           (                                1              )
 *>           (                                     ...       )
 *>           (                                            1  )
-*> 
+*>
 *> where R(k) appears as a rank-2 modification to the identity matrix in
 *> rows and columns k and k+1.
-*> 
+*>
 *> When PIVOT = 'T' (Top pivot), the rotation is performed for the
 *> plane (1,k+1), so P(k) has the form
-*> 
+*>
 *>    P(k) = (  c(k)                    s(k)                 )
 *>           (         1                                     )
 *>           (              ...                              )
@@ -88874,12 +89365,12 @@
 *>           (                                 1             )
 *>           (                                      ...      )
 *>           (                                             1 )
-*> 
+*>
 *> where R(k) appears in rows and columns 1 and k+1.
-*> 
+*>
 *> Similarly, when PIVOT = 'B' (Bottom pivot), the rotation is
 *> performed for the plane (k,z), giving P(k) the form
-*> 
+*>
 *>    P(k) = ( 1                                             )
 *>           (      ...                                      )
 *>           (             1                                 )
@@ -88888,7 +89379,7 @@
 *>           (                              ...              )
 *>           (                                     1         )
 *>           (                 -s(k)                    c(k) )
-*> 
+*>
 *> where R(k) appears in rows and columns k and z.  The rotations are
 *> performed without ever forming P(k) explicitly.
 *> \endverbatim
@@ -88973,22 +89464,22 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date September 2012
+*> \date December 2016
 *
-*> \ingroup auxOTHERauxiliary
+*> \ingroup OTHERauxiliary
 *
 *  =====================================================================
       SUBROUTINE DLASR( SIDE, PIVOT, DIRECT, M, N, C, S, A, LDA )
 *
-*  -- LAPACK auxiliary routine (version 3.4.2) --
+*  -- LAPACK auxiliary routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     September 2012
+*     December 2016
 *
 *     .. Scalar Arguments ..
       CHARACTER          DIRECT, PIVOT, SIDE
@@ -89224,24 +89715,24 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DLASRT + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dlasrt.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dlasrt.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dlasrt.f"> 
+*> Download DLASRT + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dlasrt.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dlasrt.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dlasrt.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       SUBROUTINE DLASRT( ID, N, D, INFO )
-* 
+*
 *       .. Scalar Arguments ..
 *       CHARACTER          ID
 *       INTEGER            INFO, N
@@ -89249,7 +89740,7 @@
 *       .. Array Arguments ..
 *       DOUBLE PRECISION   D( * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -89298,22 +89789,22 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date September 2012
+*> \date June 2016
 *
 *> \ingroup auxOTHERcomputational
 *
 *  =====================================================================
       SUBROUTINE DLASRT( ID, N, D, INFO )
 *
-*  -- LAPACK computational routine (version 3.4.2) --
+*  -- LAPACK computational routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     September 2012
+*     June 2016
 *
 *     .. Scalar Arguments ..
       CHARACTER          ID
@@ -89345,7 +89836,7 @@
 *     ..
 *     .. Executable Statements ..
 *
-*     Test the input paramters.
+*     Test the input parameters.
 *
       INFO = 0
       DIR = -1
@@ -89527,24 +90018,24 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DLASSQ + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dlassq.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dlassq.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dlassq.f"> 
+*> Download DLASSQ + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dlassq.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dlassq.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dlassq.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       SUBROUTINE DLASSQ( N, X, INCX, SCALE, SUMSQ )
-* 
+*
 *       .. Scalar Arguments ..
 *       INTEGER            INCX, N
 *       DOUBLE PRECISION   SCALE, SUMSQ
@@ -89552,7 +90043,7 @@
 *       .. Array Arguments ..
 *       DOUBLE PRECISION   X( * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -89616,22 +90107,22 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date September 2012
+*> \date December 2016
 *
-*> \ingroup auxOTHERauxiliary
+*> \ingroup OTHERauxiliary
 *
 *  =====================================================================
       SUBROUTINE DLASSQ( N, X, INCX, SCALE, SUMSQ )
 *
-*  -- LAPACK auxiliary routine (version 3.4.2) --
+*  -- LAPACK auxiliary routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     September 2012
+*     December 2016
 *
 *     .. Scalar Arguments ..
       INTEGER            INCX, N
@@ -89682,28 +90173,28 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DLASV2 + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dlasv2.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dlasv2.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dlasv2.f"> 
+*> Download DLASV2 + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dlasv2.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dlasv2.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dlasv2.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       SUBROUTINE DLASV2( F, G, H, SSMIN, SSMAX, SNR, CSR, SNL, CSL )
-* 
+*
 *       .. Scalar Arguments ..
 *       DOUBLE PRECISION   CSL, CSR, F, G, H, SNL, SNR, SSMAX, SSMIN
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -89782,14 +90273,14 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date September 2012
+*> \date December 2016
 *
-*> \ingroup auxOTHERauxiliary
+*> \ingroup OTHERauxiliary
 *
 *> \par Further Details:
 *  =====================
@@ -89818,10 +90309,10 @@
 *  =====================================================================
       SUBROUTINE DLASV2( F, G, H, SSMIN, SSMAX, SNR, CSR, SNL, CSL )
 *
-*  -- LAPACK auxiliary routine (version 3.4.2) --
+*  -- LAPACK auxiliary routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     September 2012
+*     December 2016
 *
 *     .. Scalar Arguments ..
       DOUBLE PRECISION   CSL, CSR, F, G, H, SNL, SNR, SSMAX, SSMIN
@@ -90007,24 +90498,24 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DLASWP + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dlaswp.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dlaswp.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dlaswp.f"> 
+*> Download DLASWP + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dlaswp.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dlaswp.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dlaswp.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       SUBROUTINE DLASWP( N, A, LDA, K1, K2, IPIV, INCX )
-* 
+*
 *       .. Scalar Arguments ..
 *       INTEGER            INCX, K1, K2, LDA, N
 *       ..
@@ -90032,7 +90523,7 @@
 *       INTEGER            IPIV( * )
 *       DOUBLE PRECISION   A( LDA, * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -90076,15 +90567,15 @@
 *> \param[in] K2
 *> \verbatim
 *>          K2 is INTEGER
-*>          The last element of IPIV for which a row interchange will
-*>          be done.
+*>          (K2-K1+1) is the number of elements of IPIV for which a row
+*>          interchange will be done.
 *> \endverbatim
 *>
 *> \param[in] IPIV
 *> \verbatim
-*>          IPIV is INTEGER array, dimension (K2*abs(INCX))
-*>          The vector of pivot indices.  Only the elements in positions
-*>          K1 through K2 of IPIV are accessed.
+*>          IPIV is INTEGER array, dimension (K1+(K2-K1)*abs(INCX))
+*>          The vector of pivot indices. Only the elements in positions
+*>          K1 through K1+(K2-K1)*INCX of IPIV are accessed.
 *>          IPIV(K) = L implies rows K and L are to be interchanged.
 *> \endverbatim
 *>
@@ -90098,12 +90589,12 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date September 2012
+*> \date December 2016
 *
 *> \ingroup doubleOTHERauxiliary
 *
@@ -90119,10 +90610,10 @@
 *  =====================================================================
       SUBROUTINE DLASWP( N, A, LDA, K1, K2, IPIV, INCX )
 *
-*  -- LAPACK auxiliary routine (version 3.4.2) --
+*  -- LAPACK auxiliary routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     September 2012
+*     December 2016
 *
 *     .. Scalar Arguments ..
       INTEGER            INCX, K1, K2, LDA, N
@@ -90148,7 +90639,7 @@
          I2 = K2
          INC = 1
       ELSE IF( INCX.LT.0 ) THEN
-         IX0 = 1 + ( 1-K2 )*INCX
+         IX0 = K1 + ( K1-K2 )*INCX
          I1 = K2
          I2 = K1
          INC = -1
@@ -90198,25 +90689,25 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DLASY2 + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dlasy2.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dlasy2.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dlasy2.f"> 
+*> Download DLASY2 + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dlasy2.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dlasy2.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dlasy2.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       SUBROUTINE DLASY2( LTRANL, LTRANR, ISGN, N1, N2, TL, LDTL, TR,
 *                          LDTR, B, LDB, SCALE, X, LDX, XNORM, INFO )
-* 
+*
 *       .. Scalar Arguments ..
 *       LOGICAL            LTRANL, LTRANR
 *       INTEGER            INFO, ISGN, LDB, LDTL, LDTR, LDX, N1, N2
@@ -90226,7 +90717,7 @@
 *       DOUBLE PRECISION   B( LDB, * ), TL( LDTL, * ), TR( LDTR, * ),
 *      $                   X( LDX, * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -90357,12 +90848,12 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date September 2012
+*> \date June 2016
 *
 *> \ingroup doubleSYauxiliary
 *
@@ -90370,10 +90861,10 @@
       SUBROUTINE DLASY2( LTRANL, LTRANR, ISGN, N1, N2, TL, LDTL, TR,
      $                   LDTR, B, LDB, SCALE, X, LDX, XNORM, INFO )
 *
-*  -- LAPACK auxiliary routine (version 3.4.2) --
+*  -- LAPACK auxiliary routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     September 2012
+*     June 2016
 *
 *     .. Scalar Arguments ..
       LOGICAL            LTRANL, LTRANR
@@ -90634,8 +91125,10 @@
    80       CONTINUE
    90    CONTINUE
   100 CONTINUE
-      IF( ABS( T16( 4, 4 ) ).LT.SMIN )
-     $   T16( 4, 4 ) = SMIN
+      IF( ABS( T16( 4, 4 ) ).LT.SMIN ) THEN
+         INFO = 1
+         T16( 4, 4 ) = SMIN
+      END IF
       SCALE = ONE
       IF( ( EIGHT*SMLNUM )*ABS( BTMP( 1 ) ).GT.ABS( T16( 1, 1 ) ) .OR.
      $    ( EIGHT*SMLNUM )*ABS( BTMP( 2 ) ).GT.ABS( T16( 2, 2 ) ) .OR.
@@ -91500,25 +91993,25 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DLATBS + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dlatbs.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dlatbs.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dlatbs.f"> 
+*> Download DLATBS + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dlatbs.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dlatbs.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dlatbs.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       SUBROUTINE DLATBS( UPLO, TRANS, DIAG, NORMIN, N, KD, AB, LDAB, X,
 *                          SCALE, CNORM, INFO )
-* 
+*
 *       .. Scalar Arguments ..
 *       CHARACTER          DIAG, NORMIN, TRANS, UPLO
 *       INTEGER            INFO, KD, LDAB, N
@@ -91527,7 +92020,7 @@
 *       .. Array Arguments ..
 *       DOUBLE PRECISION   AB( LDAB, * ), CNORM( * ), X( * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -91655,12 +92148,12 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date September 2012
+*> \date December 2016
 *
 *> \ingroup doubleOTHERauxiliary
 *
@@ -91740,10 +92233,10 @@
       SUBROUTINE DLATBS( UPLO, TRANS, DIAG, NORMIN, N, KD, AB, LDAB, X,
      $                   SCALE, CNORM, INFO )
 *
-*  -- LAPACK auxiliary routine (version 3.4.2) --
+*  -- LAPACK auxiliary routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     September 2012
+*     December 2016
 *
 *     .. Scalar Arguments ..
       CHARACTER          DIAG, NORMIN, TRANS, UPLO
@@ -92312,25 +92805,25 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DLATDF + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dlatdf.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dlatdf.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dlatdf.f"> 
+*> Download DLATDF + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dlatdf.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dlatdf.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dlatdf.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       SUBROUTINE DLATDF( IJOB, N, Z, LDZ, RHS, RDSUM, RDSCAL, IPIV,
 *                          JPIV )
-* 
+*
 *       .. Scalar Arguments ..
 *       INTEGER            IJOB, LDZ, N
 *       DOUBLE PRECISION   RDSCAL, RDSUM
@@ -92339,7 +92832,7 @@
 *       INTEGER            IPIV( * ), JPIV( * )
 *       DOUBLE PRECISION   RHS( * ), Z( LDZ, * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -92368,7 +92861,7 @@
 *>              Zx = +-e - f with the sign giving the greater value
 *>              of 2-norm(x). About 5 times as expensive as Default.
 *>          IJOB .ne. 2: Local look ahead strategy where all entries of
-*>              the r.h.s. b is choosen as either +1 or -1 (Default).
+*>              the r.h.s. b is chosen as either +1 or -1 (Default).
 *> \endverbatim
 *>
 *> \param[in] N
@@ -92438,12 +92931,12 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date September 2012
+*> \date June 2016
 *
 *> \ingroup doubleOTHERauxiliary
 *
@@ -92481,10 +92974,10 @@
       SUBROUTINE DLATDF( IJOB, N, Z, LDZ, RHS, RDSUM, RDSCAL, IPIV,
      $                   JPIV )
 *
-*  -- LAPACK auxiliary routine (version 3.4.2) --
+*  -- LAPACK auxiliary routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     September 2012
+*     June 2016
 *
 *     .. Scalar Arguments ..
       INTEGER            IJOB, LDZ, N
@@ -92635,25 +93128,25 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DLATPS + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dlatps.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dlatps.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dlatps.f"> 
+*> Download DLATPS + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dlatps.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dlatps.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dlatps.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       SUBROUTINE DLATPS( UPLO, TRANS, DIAG, NORMIN, N, AP, X, SCALE,
 *                          CNORM, INFO )
-* 
+*
 *       .. Scalar Arguments ..
 *       CHARACTER          DIAG, NORMIN, TRANS, UPLO
 *       INTEGER            INFO, N
@@ -92662,7 +93155,7 @@
 *       .. Array Arguments ..
 *       DOUBLE PRECISION   AP( * ), CNORM( * ), X( * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -92777,12 +93270,12 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date September 2012
+*> \date December 2016
 *
 *> \ingroup doubleOTHERauxiliary
 *
@@ -92862,10 +93355,10 @@
       SUBROUTINE DLATPS( UPLO, TRANS, DIAG, NORMIN, N, AP, X, SCALE,
      $                   CNORM, INFO )
 *
-*  -- LAPACK auxiliary routine (version 3.4.2) --
+*  -- LAPACK auxiliary routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     September 2012
+*     December 2016
 *
 *     .. Scalar Arguments ..
       CHARACTER          DIAG, NORMIN, TRANS, UPLO
@@ -93430,24 +93923,24 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DLATRD + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dlatrd.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dlatrd.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dlatrd.f"> 
+*> Download DLATRD + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dlatrd.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dlatrd.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dlatrd.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       SUBROUTINE DLATRD( UPLO, N, NB, A, LDA, E, TAU, W, LDW )
-* 
+*
 *       .. Scalar Arguments ..
 *       CHARACTER          UPLO
 *       INTEGER            LDA, LDW, N, NB
@@ -93455,7 +93948,7 @@
 *       .. Array Arguments ..
 *       DOUBLE PRECISION   A( LDA, * ), E( * ), TAU( * ), W( LDW, * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -93562,12 +94055,12 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date September 2012
+*> \date December 2016
 *
 *> \ingroup doubleOTHERauxiliary
 *
@@ -93626,10 +94119,10 @@
 *  =====================================================================
       SUBROUTINE DLATRD( UPLO, N, NB, A, LDA, E, TAU, W, LDW )
 *
-*  -- LAPACK auxiliary routine (version 3.4.2) --
+*  -- LAPACK auxiliary routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     September 2012
+*     December 2016
 *
 *     .. Scalar Arguments ..
       CHARACTER          UPLO
@@ -93766,25 +94259,25 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DLATRS + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dlatrs.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dlatrs.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dlatrs.f"> 
+*> Download DLATRS + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dlatrs.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dlatrs.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dlatrs.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       SUBROUTINE DLATRS( UPLO, TRANS, DIAG, NORMIN, N, A, LDA, X, SCALE,
 *                          CNORM, INFO )
-* 
+*
 *       .. Scalar Arguments ..
 *       CHARACTER          DIAG, NORMIN, TRANS, UPLO
 *       INTEGER            INFO, LDA, N
@@ -93793,7 +94286,7 @@
 *       .. Array Arguments ..
 *       DOUBLE PRECISION   A( LDA, * ), CNORM( * ), X( * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -93917,12 +94410,12 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date September 2012
+*> \date December 2016
 *
 *> \ingroup doubleOTHERauxiliary
 *
@@ -94002,10 +94495,10 @@
       SUBROUTINE DLATRS( UPLO, TRANS, DIAG, NORMIN, N, A, LDA, X, SCALE,
      $                   CNORM, INFO )
 *
-*  -- LAPACK auxiliary routine (version 3.4.2) --
+*  -- LAPACK auxiliary routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     September 2012
+*     December 2016
 *
 *     .. Scalar Arguments ..
       CHARACTER          DIAG, NORMIN, TRANS, UPLO
@@ -94553,31 +95046,31 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DLATRZ + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dlatrz.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dlatrz.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dlatrz.f"> 
+*> Download DLATRZ + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dlatrz.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dlatrz.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dlatrz.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       SUBROUTINE DLATRZ( M, N, L, A, LDA, TAU, WORK )
-* 
+*
 *       .. Scalar Arguments ..
 *       INTEGER            L, LDA, M, N
 *       ..
 *       .. Array Arguments ..
 *       DOUBLE PRECISION   A( LDA, * ), TAU( * ), WORK( * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -94643,12 +95136,12 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date September 2012
+*> \date December 2016
 *
 *> \ingroup doubleOTHERcomputational
 *
@@ -94691,10 +95184,10 @@
 *  =====================================================================
       SUBROUTINE DLATRZ( M, N, L, A, LDA, TAU, WORK )
 *
-*  -- LAPACK computational routine (version 3.4.2) --
+*  -- LAPACK computational routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     September 2012
+*     December 2016
 *
 *     .. Scalar Arguments ..
       INTEGER            L, LDA, M, N
@@ -94753,24 +95246,24 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DLATZM + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dlatzm.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dlatzm.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dlatzm.f"> 
+*> Download DLATZM + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dlatzm.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dlatzm.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dlatzm.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       SUBROUTINE DLATZM( SIDE, M, N, V, INCV, TAU, C1, C2, LDC, WORK )
-* 
+*
 *       .. Scalar Arguments ..
 *       CHARACTER          SIDE
 *       INTEGER            INCV, LDC, M, N
@@ -94779,7 +95272,7 @@
 *       .. Array Arguments ..
 *       DOUBLE PRECISION   C1( LDC, * ), C2( LDC, * ), V( * ), WORK( * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -94890,22 +95383,22 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date November 2011
+*> \date December 2016
 *
 *> \ingroup doubleOTHERcomputational
 *
 *  =====================================================================
       SUBROUTINE DLATZM( SIDE, M, N, V, INCV, TAU, C1, C2, LDC, WORK )
 *
-*  -- LAPACK computational routine (version 3.4.0) --
+*  -- LAPACK computational routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     November 2011
+*     December 2016
 *
 *     .. Scalar Arguments ..
       CHARACTER          SIDE
@@ -94974,24 +95467,24 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DLAUU2 + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dlauu2.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dlauu2.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dlauu2.f"> 
+*> Download DLAUU2 + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dlauu2.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dlauu2.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dlauu2.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       SUBROUTINE DLAUU2( UPLO, N, A, LDA, INFO )
-* 
+*
 *       .. Scalar Arguments ..
 *       CHARACTER          UPLO
 *       INTEGER            INFO, LDA, N
@@ -94999,7 +95492,7 @@
 *       .. Array Arguments ..
 *       DOUBLE PRECISION   A( LDA, * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -95062,22 +95555,22 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date September 2012
+*> \date December 2016
 *
 *> \ingroup doubleOTHERauxiliary
 *
 *  =====================================================================
       SUBROUTINE DLAUU2( UPLO, N, A, LDA, INFO )
 *
-*  -- LAPACK auxiliary routine (version 3.4.2) --
+*  -- LAPACK auxiliary routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     September 2012
+*     December 2016
 *
 *     .. Scalar Arguments ..
       CHARACTER          UPLO
@@ -95172,24 +95665,24 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DLAUUM + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dlauum.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dlauum.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dlauum.f"> 
+*> Download DLAUUM + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dlauum.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dlauum.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dlauum.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       SUBROUTINE DLAUUM( UPLO, N, A, LDA, INFO )
-* 
+*
 *       .. Scalar Arguments ..
 *       CHARACTER          UPLO
 *       INTEGER            INFO, LDA, N
@@ -95197,7 +95690,7 @@
 *       .. Array Arguments ..
 *       DOUBLE PRECISION   A( LDA, * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -95260,22 +95753,22 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date September 2012
+*> \date December 2016
 *
 *> \ingroup doubleOTHERauxiliary
 *
 *  =====================================================================
       SUBROUTINE DLAUUM( UPLO, N, A, LDA, INFO )
 *
-*  -- LAPACK auxiliary routine (version 3.4.2) --
+*  -- LAPACK auxiliary routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     September 2012
+*     December 2016
 *
 *     .. Scalar Arguments ..
       CHARACTER          UPLO
@@ -95390,24 +95883,24 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DOPGTR + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dopgtr.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dopgtr.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dopgtr.f"> 
+*> Download DOPGTR + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dopgtr.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dopgtr.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dopgtr.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       SUBROUTINE DOPGTR( UPLO, N, AP, TAU, Q, LDQ, WORK, INFO )
-* 
+*
 *       .. Scalar Arguments ..
 *       CHARACTER          UPLO
 *       INTEGER            INFO, LDQ, N
@@ -95415,7 +95908,7 @@
 *       .. Array Arguments ..
 *       DOUBLE PRECISION   AP( * ), Q( LDQ, * ), TAU( * ), WORK( * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -95490,22 +95983,22 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date November 2011
+*> \date December 2016
 *
 *> \ingroup doubleOTHERcomputational
 *
 *  =====================================================================
       SUBROUTINE DOPGTR( UPLO, N, AP, TAU, Q, LDQ, WORK, INFO )
 *
-*  -- LAPACK computational routine (version 3.4.0) --
+*  -- LAPACK computational routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     November 2011
+*     December 2016
 *
 *     .. Scalar Arguments ..
       CHARACTER          UPLO
@@ -95622,25 +96115,25 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DOPMTR + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dopmtr.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dopmtr.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dopmtr.f"> 
+*> Download DOPMTR + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dopmtr.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dopmtr.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dopmtr.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       SUBROUTINE DOPMTR( SIDE, UPLO, TRANS, M, N, AP, TAU, C, LDC, WORK,
 *                          INFO )
-* 
+*
 *       .. Scalar Arguments ..
 *       CHARACTER          SIDE, TRANS, UPLO
 *       INTEGER            INFO, LDC, M, N
@@ -95648,7 +96141,7 @@
 *       .. Array Arguments ..
 *       DOUBLE PRECISION   AP( * ), C( LDC, * ), TAU( * ), WORK( * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -95757,12 +96250,12 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date November 2011
+*> \date December 2016
 *
 *> \ingroup doubleOTHERcomputational
 *
@@ -95770,10 +96263,10 @@
       SUBROUTINE DOPMTR( SIDE, UPLO, TRANS, M, N, AP, TAU, C, LDC, WORK,
      $                   INFO )
 *
-*  -- LAPACK computational routine (version 3.4.0) --
+*  -- LAPACK computational routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     November 2011
+*     December 2016
 *
 *     .. Scalar Arguments ..
       CHARACTER          SIDE, TRANS, UPLO
@@ -95961,18 +96454,18 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DORBDB + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dorbdb.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dorbdb.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dorbdb.f"> 
+*> Download DORBDB + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dorbdb.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dorbdb.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dorbdb.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
@@ -95980,7 +96473,7 @@
 *       SUBROUTINE DORBDB( TRANS, SIGNS, M, P, Q, X11, LDX11, X12, LDX12,
 *                          X21, LDX21, X22, LDX22, THETA, PHI, TAUP1,
 *                          TAUP2, TAUQ1, TAUQ2, WORK, LWORK, INFO )
-* 
+*
 *       .. Scalar Arguments ..
 *       CHARACTER          SIGNS, TRANS
 *       INTEGER            INFO, LDX11, LDX12, LDX21, LDX22, LWORK, M, P,
@@ -95992,7 +96485,7 @@
 *      $                   WORK( * ), X11( LDX11, * ), X12( LDX12, * ),
 *      $                   X21( LDX21, * ), X22( LDX22, * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -96209,12 +96702,12 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date November 2013
+*> \date December 2016
 *
 *> \ingroup doubleOTHERcomputational
 *
@@ -96246,10 +96739,10 @@
      $                   X21, LDX21, X22, LDX22, THETA, PHI, TAUP1,
      $                   TAUP2, TAUQ1, TAUQ2, WORK, LWORK, INFO )
 *
-*  -- LAPACK computational routine (version 3.5.0) --
+*  -- LAPACK computational routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     November 2013
+*     December 2016
 *
 *     .. Scalar Arguments ..
       CHARACTER          SIGNS, TRANS
@@ -96352,7 +96845,7 @@
 *
       IF( COLMAJOR ) THEN
 *
-*        Reduce columns 1, ..., Q of X11, X12, X21, and X22 
+*        Reduce columns 1, ..., Q of X11, X12, X21, and X22
 *
          DO I = 1, Q
 *
@@ -96471,7 +96964,7 @@
             END IF
             X12(I,I) = ONE
 *
-            IF ( P. GT. I ) THEN
+            IF ( P .GT. I ) THEN
                CALL DLARF( 'R', P-I, M-Q-I+1, X12(I,I), LDX12, TAUQ2(I),
      $                     X12(I+1,I), LDX12, WORK )
             END IF
@@ -96577,12 +97070,12 @@
                X11(I+1,I) = ONE
             END IF
             IF ( M-Q .GT. I ) THEN
-               CALL DLARFGP( M-Q-I+1, X12(I,I), X12(I+1,I), 1, 
+               CALL DLARFGP( M-Q-I+1, X12(I,I), X12(I+1,I), 1,
      $                       TAUQ2(I) )
             ELSE
-               CALL DLARFGP( M-Q-I+1, X12(I,I), X12(I,I), 1, 
+               CALL DLARFGP( M-Q-I+1, X12(I,I), X12(I,I), 1,
      $                       TAUQ2(I) )
-            END IF               
+            END IF
             X12(I,I) = ONE
 *
             IF( I .LT. Q ) THEN
@@ -96608,7 +97101,7 @@
             CALL DLARFGP( M-Q-I+1, X12(I,I), X12(I+1,I), 1, TAUQ2(I) )
             X12(I,I) = ONE
 *
-            IF ( P .GT. I ) THEN 
+            IF ( P .GT. I ) THEN
                CALL DLARF( 'L', M-Q-I+1, P-I, X12(I,I), 1, TAUQ2(I),
      $                  X12(I,I+1), LDX12, WORK )
             END IF
@@ -96648,18 +97141,18 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DORCSD + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dorcsd.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dorcsd.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dorcsd.f"> 
+*> Download DORCSD + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dorcsd.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dorcsd.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dorcsd.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
@@ -96669,7 +97162,7 @@
 *                                    LDX12, X21, LDX21, X22, LDX22, THETA,
 *                                    U1, LDU1, U2, LDU2, V1T, LDV1T, V2T,
 *                                    LDV2T, WORK, LWORK, IWORK, INFO )
-* 
+*
 *       .. Scalar Arguments ..
 *       CHARACTER          JOBU1, JOBU2, JOBV1T, JOBV2T, SIGNS, TRANS
 *       INTEGER            INFO, LDU1, LDU2, LDV1T, LDV2T, LDX11, LDX12,
@@ -96683,7 +97176,7 @@
 *      $                   X12( LDX12, * ), X21( LDX21, * ), X22( LDX22,
 *      $                   * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -96930,12 +97423,12 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date November 2013
+*> \date December 2016
 *
 *> \ingroup doubleOTHERcomputational
 *
@@ -96946,10 +97439,10 @@
      $                             U1, LDU1, U2, LDU2, V1T, LDV1T, V2T,
      $                             LDV2T, WORK, LWORK, IWORK, INFO )
 *
-*  -- LAPACK computational routine (version 3.5.0) --
+*  -- LAPACK computational routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     November 2013
+*     December 2016
 *
 *     .. Scalar Arguments ..
       CHARACTER          JOBU1, JOBU2, JOBV1T, JOBV2T, SIGNS, TRANS
@@ -96986,7 +97479,7 @@
      $                   WANTV1T, WANTV2T
 *     ..
 *     .. External Subroutines ..
-      EXTERNAL           DBBCSD, DLACPY, DLAPMR, DLAPMT, DLASCL, DLASET,
+      EXTERNAL           DBBCSD, DLACPY, DLAPMR, DLAPMT,
      $                   DORBDB, DORGLQ, DORGQR, XERBLA
 *     ..
 *     .. External Functions ..
@@ -97110,7 +97603,7 @@
          IB22D = IB21E + MAX( 1, Q - 1 )
          IB22E = IB22D + MAX( 1, Q )
          IBBCSD = IB22E + MAX( 1, Q - 1 )
-         CALL DBBCSD( JOBU1, JOBU2, JOBV1T, JOBV2T, TRANS, M, P, Q, 
+         CALL DBBCSD( JOBU1, JOBU2, JOBV1T, JOBV2T, TRANS, M, P, Q,
      $                THETA, THETA, U1, LDU1, U2, LDU2, V1T, LDV1T, V2T,
      $                LDV2T, U1, U1, U1, U1, U1, U1, U1, U1, WORK, -1,
      $                CHILDINFO )
@@ -97225,7 +97718,7 @@
 *     Permute rows and columns to place identity submatrices in top-
 *     left corner of (1,1)-block and/or bottom-right corner of (1,2)-
 *     block and/or bottom-right corner of (2,1)-block and/or top-left
-*     corner of (2,2)-block 
+*     corner of (2,2)-block
 *
       IF( Q .GT. 0 .AND. WANTU2 ) THEN
          DO I = 1, Q
@@ -97264,31 +97757,31 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DORG2L + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dorg2l.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dorg2l.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dorg2l.f"> 
+*> Download DORG2L + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dorg2l.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dorg2l.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dorg2l.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       SUBROUTINE DORG2L( M, N, K, A, LDA, TAU, WORK, INFO )
-* 
+*
 *       .. Scalar Arguments ..
 *       INTEGER            INFO, K, LDA, M, N
 *       ..
 *       .. Array Arguments ..
 *       DOUBLE PRECISION   A( LDA, * ), TAU( * ), WORK( * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -97364,22 +97857,22 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date September 2012
+*> \date December 2016
 *
 *> \ingroup doubleOTHERcomputational
 *
 *  =====================================================================
       SUBROUTINE DORG2L( M, N, K, A, LDA, TAU, WORK, INFO )
 *
-*  -- LAPACK computational routine (version 3.4.2) --
+*  -- LAPACK computational routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     September 2012
+*     December 2016
 *
 *     .. Scalar Arguments ..
       INTEGER            INFO, K, LDA, M, N
@@ -97462,31 +97955,31 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DORG2R + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dorg2r.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dorg2r.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dorg2r.f"> 
+*> Download DORG2R + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dorg2r.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dorg2r.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dorg2r.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       SUBROUTINE DORG2R( M, N, K, A, LDA, TAU, WORK, INFO )
-* 
+*
 *       .. Scalar Arguments ..
 *       INTEGER            INFO, K, LDA, M, N
 *       ..
 *       .. Array Arguments ..
 *       DOUBLE PRECISION   A( LDA, * ), TAU( * ), WORK( * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -97562,22 +98055,22 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date September 2012
+*> \date December 2016
 *
 *> \ingroup doubleOTHERcomputational
 *
 *  =====================================================================
       SUBROUTINE DORG2R( M, N, K, A, LDA, TAU, WORK, INFO )
 *
-*  -- LAPACK computational routine (version 3.4.2) --
+*  -- LAPACK computational routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     September 2012
+*     December 2016
 *
 *     .. Scalar Arguments ..
       INTEGER            INFO, K, LDA, M, N
@@ -97662,24 +98155,24 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DORGBR + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dorgbr.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dorgbr.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dorgbr.f"> 
+*> Download DORGBR + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dorgbr.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dorgbr.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dorgbr.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       SUBROUTINE DORGBR( VECT, M, N, K, A, LDA, TAU, WORK, LWORK, INFO )
-* 
+*
 *       .. Scalar Arguments ..
 *       CHARACTER          VECT
 *       INTEGER            INFO, K, LDA, LWORK, M, N
@@ -97687,7 +98180,7 @@
 *       .. Array Arguments ..
 *       DOUBLE PRECISION   A( LDA, * ), TAU( * ), WORK( * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -97805,10 +98298,10 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
 *> \date April 2012
 *
@@ -97817,7 +98310,7 @@
 *  =====================================================================
       SUBROUTINE DORGBR( VECT, M, N, K, A, LDA, TAU, WORK, LWORK, INFO )
 *
-*  -- LAPACK computational routine (version 3.4.1) --
+*  -- LAPACK computational routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
 *     April 2012
@@ -97842,8 +98335,7 @@
 *     ..
 *     .. External Functions ..
       LOGICAL            LSAME
-      INTEGER            ILAENV
-      EXTERNAL           LSAME, ILAENV
+      EXTERNAL           LSAME
 *     ..
 *     .. External Subroutines ..
       EXTERNAL           DORGLQ, DORGQR, XERBLA
@@ -98000,31 +98492,31 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DORGHR + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dorghr.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dorghr.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dorghr.f"> 
+*> Download DORGHR + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dorghr.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dorghr.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dorghr.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       SUBROUTINE DORGHR( N, ILO, IHI, A, LDA, TAU, WORK, LWORK, INFO )
-* 
+*
 *       .. Scalar Arguments ..
 *       INTEGER            IHI, ILO, INFO, LDA, LWORK, N
 *       ..
 *       .. Array Arguments ..
 *       DOUBLE PRECISION   A( LDA, * ), TAU( * ), WORK( * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -98112,22 +98604,22 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date November 2011
+*> \date December 2016
 *
 *> \ingroup doubleOTHERcomputational
 *
 *  =====================================================================
       SUBROUTINE DORGHR( N, ILO, IHI, A, LDA, TAU, WORK, LWORK, INFO )
 *
-*  -- LAPACK computational routine (version 3.4.0) --
+*  -- LAPACK computational routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     November 2011
+*     December 2016
 *
 *     .. Scalar Arguments ..
       INTEGER            IHI, ILO, INFO, LDA, LWORK, N
@@ -98240,31 +98732,31 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DORGL2 + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dorgl2.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dorgl2.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dorgl2.f"> 
+*> Download DORGL2 + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dorgl2.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dorgl2.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dorgl2.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       SUBROUTINE DORGL2( M, N, K, A, LDA, TAU, WORK, INFO )
-* 
+*
 *       .. Scalar Arguments ..
 *       INTEGER            INFO, K, LDA, M, N
 *       ..
 *       .. Array Arguments ..
 *       DOUBLE PRECISION   A( LDA, * ), TAU( * ), WORK( * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -98339,22 +98831,22 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date November 2011
+*> \date December 2016
 *
 *> \ingroup doubleOTHERcomputational
 *
 *  =====================================================================
       SUBROUTINE DORGL2( M, N, K, A, LDA, TAU, WORK, INFO )
 *
-*  -- LAPACK computational routine (version 3.4.0) --
+*  -- LAPACK computational routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     November 2011
+*     December 2016
 *
 *     .. Scalar Arguments ..
       INTEGER            INFO, K, LDA, M, N
@@ -98444,31 +98936,31 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DORGLQ + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dorglq.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dorglq.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dorglq.f"> 
+*> Download DORGLQ + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dorglq.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dorglq.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dorglq.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       SUBROUTINE DORGLQ( M, N, K, A, LDA, TAU, WORK, LWORK, INFO )
-* 
+*
 *       .. Scalar Arguments ..
 *       INTEGER            INFO, K, LDA, LWORK, M, N
 *       ..
 *       .. Array Arguments ..
 *       DOUBLE PRECISION   A( LDA, * ), TAU( * ), WORK( * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -98557,22 +99049,22 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date November 2011
+*> \date December 2016
 *
 *> \ingroup doubleOTHERcomputational
 *
 *  =====================================================================
       SUBROUTINE DORGLQ( M, N, K, A, LDA, TAU, WORK, LWORK, INFO )
 *
-*  -- LAPACK computational routine (version 3.4.0) --
+*  -- LAPACK computational routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     November 2011
+*     December 2016
 *
 *     .. Scalar Arguments ..
       INTEGER            INFO, K, LDA, LWORK, M, N
@@ -98733,31 +99225,31 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DORGQL + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dorgql.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dorgql.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dorgql.f"> 
+*> Download DORGQL + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dorgql.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dorgql.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dorgql.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       SUBROUTINE DORGQL( M, N, K, A, LDA, TAU, WORK, LWORK, INFO )
-* 
+*
 *       .. Scalar Arguments ..
 *       INTEGER            INFO, K, LDA, LWORK, M, N
 *       ..
 *       .. Array Arguments ..
 *       DOUBLE PRECISION   A( LDA, * ), TAU( * ), WORK( * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -98847,22 +99339,22 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date November 2011
+*> \date December 2016
 *
 *> \ingroup doubleOTHERcomputational
 *
 *  =====================================================================
       SUBROUTINE DORGQL( M, N, K, A, LDA, TAU, WORK, LWORK, INFO )
 *
-*  -- LAPACK computational routine (version 3.4.0) --
+*  -- LAPACK computational routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     November 2011
+*     December 2016
 *
 *     .. Scalar Arguments ..
       INTEGER            INFO, K, LDA, LWORK, M, N
@@ -99029,31 +99521,31 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DORGQR + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dorgqr.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dorgqr.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dorgqr.f"> 
+*> Download DORGQR + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dorgqr.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dorgqr.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dorgqr.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       SUBROUTINE DORGQR( M, N, K, A, LDA, TAU, WORK, LWORK, INFO )
-* 
+*
 *       .. Scalar Arguments ..
 *       INTEGER            INFO, K, LDA, LWORK, M, N
 *       ..
 *       .. Array Arguments ..
 *       DOUBLE PRECISION   A( LDA, * ), TAU( * ), WORK( * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -99143,22 +99635,22 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date November 2011
+*> \date December 2016
 *
 *> \ingroup doubleOTHERcomputational
 *
 *  =====================================================================
       SUBROUTINE DORGQR( M, N, K, A, LDA, TAU, WORK, LWORK, INFO )
 *
-*  -- LAPACK computational routine (version 3.4.0) --
+*  -- LAPACK computational routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     November 2011
+*     December 2016
 *
 *     .. Scalar Arguments ..
       INTEGER            INFO, K, LDA, LWORK, M, N
@@ -99319,31 +99811,31 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DORGR2 + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dorgr2.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dorgr2.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dorgr2.f"> 
+*> Download DORGR2 + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dorgr2.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dorgr2.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dorgr2.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       SUBROUTINE DORGR2( M, N, K, A, LDA, TAU, WORK, INFO )
-* 
+*
 *       .. Scalar Arguments ..
 *       INTEGER            INFO, K, LDA, M, N
 *       ..
 *       .. Array Arguments ..
 *       DOUBLE PRECISION   A( LDA, * ), TAU( * ), WORK( * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -99419,22 +99911,22 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date September 2012
+*> \date December 2016
 *
 *> \ingroup doubleOTHERcomputational
 *
 *  =====================================================================
       SUBROUTINE DORGR2( M, N, K, A, LDA, TAU, WORK, INFO )
 *
-*  -- LAPACK computational routine (version 3.4.2) --
+*  -- LAPACK computational routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     September 2012
+*     December 2016
 *
 *     .. Scalar Arguments ..
       INTEGER            INFO, K, LDA, M, N
@@ -99521,31 +100013,31 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DORGRQ + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dorgrq.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dorgrq.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dorgrq.f"> 
+*> Download DORGRQ + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dorgrq.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dorgrq.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dorgrq.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       SUBROUTINE DORGRQ( M, N, K, A, LDA, TAU, WORK, LWORK, INFO )
-* 
+*
 *       .. Scalar Arguments ..
 *       INTEGER            INFO, K, LDA, LWORK, M, N
 *       ..
 *       .. Array Arguments ..
 *       DOUBLE PRECISION   A( LDA, * ), TAU( * ), WORK( * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -99635,22 +100127,22 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date November 2011
+*> \date December 2016
 *
 *> \ingroup doubleOTHERcomputational
 *
 *  =====================================================================
       SUBROUTINE DORGRQ( M, N, K, A, LDA, TAU, WORK, LWORK, INFO )
 *
-*  -- LAPACK computational routine (version 3.4.0) --
+*  -- LAPACK computational routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     November 2011
+*     December 2016
 *
 *     .. Scalar Arguments ..
       INTEGER            INFO, K, LDA, LWORK, M, N
@@ -99817,24 +100309,24 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DORGTR + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dorgtr.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dorgtr.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dorgtr.f"> 
+*> Download DORGTR + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dorgtr.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dorgtr.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dorgtr.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       SUBROUTINE DORGTR( UPLO, N, A, LDA, TAU, WORK, LWORK, INFO )
-* 
+*
 *       .. Scalar Arguments ..
 *       CHARACTER          UPLO
 *       INTEGER            INFO, LDA, LWORK, N
@@ -99842,7 +100334,7 @@
 *       .. Array Arguments ..
 *       DOUBLE PRECISION   A( LDA, * ), TAU( * ), WORK( * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -99926,22 +100418,22 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date November 2011
+*> \date December 2016
 *
 *> \ingroup doubleOTHERcomputational
 *
 *  =====================================================================
       SUBROUTINE DORGTR( UPLO, N, A, LDA, TAU, WORK, LWORK, INFO )
 *
-*  -- LAPACK computational routine (version 3.4.0) --
+*  -- LAPACK computational routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     November 2011
+*     December 2016
 *
 *     .. Scalar Arguments ..
       CHARACTER          UPLO
@@ -100072,25 +100564,25 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DORM2L + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dorm2l.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dorm2l.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dorm2l.f"> 
+*> Download DORM2L + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dorm2l.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dorm2l.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dorm2l.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       SUBROUTINE DORM2L( SIDE, TRANS, M, N, K, A, LDA, TAU, C, LDC,
 *                          WORK, INFO )
-* 
+*
 *       .. Scalar Arguments ..
 *       CHARACTER          SIDE, TRANS
 *       INTEGER            INFO, K, LDA, LDC, M, N
@@ -100098,7 +100590,7 @@
 *       .. Array Arguments ..
 *       DOUBLE PRECISION   A( LDA, * ), C( LDC, * ), TAU( * ), WORK( * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -100216,12 +100708,12 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date September 2012
+*> \date December 2016
 *
 *> \ingroup doubleOTHERcomputational
 *
@@ -100229,10 +100721,10 @@
       SUBROUTINE DORM2L( SIDE, TRANS, M, N, K, A, LDA, TAU, C, LDC,
      $                   WORK, INFO )
 *
-*  -- LAPACK computational routine (version 3.4.2) --
+*  -- LAPACK computational routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     September 2012
+*     December 2016
 *
 *     .. Scalar Arguments ..
       CHARACTER          SIDE, TRANS
@@ -100350,25 +100842,25 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DORM2R + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dorm2r.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dorm2r.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dorm2r.f"> 
+*> Download DORM2R + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dorm2r.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dorm2r.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dorm2r.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       SUBROUTINE DORM2R( SIDE, TRANS, M, N, K, A, LDA, TAU, C, LDC,
 *                          WORK, INFO )
-* 
+*
 *       .. Scalar Arguments ..
 *       CHARACTER          SIDE, TRANS
 *       INTEGER            INFO, K, LDA, LDC, M, N
@@ -100376,7 +100868,7 @@
 *       .. Array Arguments ..
 *       DOUBLE PRECISION   A( LDA, * ), C( LDC, * ), TAU( * ), WORK( * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -100494,12 +100986,12 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date September 2012
+*> \date December 2016
 *
 *> \ingroup doubleOTHERcomputational
 *
@@ -100507,10 +100999,10 @@
       SUBROUTINE DORM2R( SIDE, TRANS, M, N, K, A, LDA, TAU, C, LDC,
      $                   WORK, INFO )
 *
-*  -- LAPACK computational routine (version 3.4.2) --
+*  -- LAPACK computational routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     September 2012
+*     December 2016
 *
 *     .. Scalar Arguments ..
       CHARACTER          SIDE, TRANS
@@ -100632,25 +101124,25 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DORMBR + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dormbr.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dormbr.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dormbr.f"> 
+*> Download DORMBR + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dormbr.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dormbr.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dormbr.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       SUBROUTINE DORMBR( VECT, SIDE, TRANS, M, N, K, A, LDA, TAU, C,
 *                          LDC, WORK, LWORK, INFO )
-* 
+*
 *       .. Scalar Arguments ..
 *       CHARACTER          SIDE, TRANS, VECT
 *       INTEGER            INFO, K, LDA, LDC, LWORK, M, N
@@ -100658,7 +101150,7 @@
 *       .. Array Arguments ..
 *       DOUBLE PRECISION   A( LDA, * ), C( LDC, * ), TAU( * ), WORK( * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -100812,12 +101304,12 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date November 2011
+*> \date December 2016
 *
 *> \ingroup doubleOTHERcomputational
 *
@@ -100825,10 +101317,10 @@
       SUBROUTINE DORMBR( VECT, SIDE, TRANS, M, N, K, A, LDA, TAU, C,
      $                   LDC, WORK, LWORK, INFO )
 *
-*  -- LAPACK computational routine (version 3.4.0) --
+*  -- LAPACK computational routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     November 2011
+*     December 2016
 *
 *     .. Scalar Arguments ..
       CHARACTER          SIDE, TRANS, VECT
@@ -101004,25 +101496,25 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DORMHR + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dormhr.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dormhr.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dormhr.f"> 
+*> Download DORMHR + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dormhr.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dormhr.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dormhr.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       SUBROUTINE DORMHR( SIDE, TRANS, M, N, ILO, IHI, A, LDA, TAU, C,
 *                          LDC, WORK, LWORK, INFO )
-* 
+*
 *       .. Scalar Arguments ..
 *       CHARACTER          SIDE, TRANS
 *       INTEGER            IHI, ILO, INFO, LDA, LDC, LWORK, M, N
@@ -101030,7 +101522,7 @@
 *       .. Array Arguments ..
 *       DOUBLE PRECISION   A( LDA, * ), C( LDC, * ), TAU( * ), WORK( * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -101167,12 +101659,12 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date November 2011
+*> \date December 2016
 *
 *> \ingroup doubleOTHERcomputational
 *
@@ -101180,10 +101672,10 @@
       SUBROUTINE DORMHR( SIDE, TRANS, M, N, ILO, IHI, A, LDA, TAU, C,
      $                   LDC, WORK, LWORK, INFO )
 *
-*  -- LAPACK computational routine (version 3.4.0) --
+*  -- LAPACK computational routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     November 2011
+*     December 2016
 *
 *     .. Scalar Arguments ..
       CHARACTER          SIDE, TRANS
@@ -101298,25 +101790,25 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DORML2 + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dorml2.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dorml2.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dorml2.f"> 
+*> Download DORML2 + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dorml2.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dorml2.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dorml2.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       SUBROUTINE DORML2( SIDE, TRANS, M, N, K, A, LDA, TAU, C, LDC,
 *                          WORK, INFO )
-* 
+*
 *       .. Scalar Arguments ..
 *       CHARACTER          SIDE, TRANS
 *       INTEGER            INFO, K, LDA, LDC, M, N
@@ -101324,7 +101816,7 @@
 *       .. Array Arguments ..
 *       DOUBLE PRECISION   A( LDA, * ), C( LDC, * ), TAU( * ), WORK( * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -101442,12 +101934,12 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date September 2012
+*> \date December 2016
 *
 *> \ingroup doubleOTHERcomputational
 *
@@ -101455,10 +101947,10 @@
       SUBROUTINE DORML2( SIDE, TRANS, M, N, K, A, LDA, TAU, C, LDC,
      $                   WORK, INFO )
 *
-*  -- LAPACK computational routine (version 3.4.2) --
+*  -- LAPACK computational routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     September 2012
+*     December 2016
 *
 *     .. Scalar Arguments ..
       CHARACTER          SIDE, TRANS
@@ -101580,25 +102072,25 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DORMLQ + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dormlq.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dormlq.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dormlq.f"> 
+*> Download DORMLQ + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dormlq.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dormlq.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dormlq.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       SUBROUTINE DORMLQ( SIDE, TRANS, M, N, K, A, LDA, TAU, C, LDC,
 *                          WORK, LWORK, INFO )
-* 
+*
 *       .. Scalar Arguments ..
 *       CHARACTER          SIDE, TRANS
 *       INTEGER            INFO, K, LDA, LDC, LWORK, M, N
@@ -101606,7 +102098,7 @@
 *       .. Array Arguments ..
 *       DOUBLE PRECISION   A( LDA, * ), C( LDC, * ), TAU( * ), WORK( * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -101714,9 +102206,7 @@
 *>          The dimension of the array WORK.
 *>          If SIDE = 'L', LWORK >= max(1,N);
 *>          if SIDE = 'R', LWORK >= max(1,M).
-*>          For optimum performance LWORK >= N*NB if SIDE = 'L', and
-*>          LWORK >= M*NB if SIDE = 'R', where NB is the optimal
-*>          blocksize.
+*>          For good performance, LWORK should generally be larger.
 *>
 *>          If LWORK = -1, then a workspace query is assumed; the routine
 *>          only calculates the optimal size of the WORK array, returns
@@ -101734,12 +102224,12 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date November 2011
+*> \date December 2016
 *
 *> \ingroup doubleOTHERcomputational
 *
@@ -101747,10 +102237,10 @@
       SUBROUTINE DORMLQ( SIDE, TRANS, M, N, K, A, LDA, TAU, C, LDC,
      $                   WORK, LWORK, INFO )
 *
-*  -- LAPACK computational routine (version 3.4.0) --
+*  -- LAPACK computational routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     November 2011
+*     December 2016
 *
 *     .. Scalar Arguments ..
       CHARACTER          SIDE, TRANS
@@ -101763,18 +102253,16 @@
 *  =====================================================================
 *
 *     .. Parameters ..
-      INTEGER            NBMAX, LDT
-      PARAMETER          ( NBMAX = 64, LDT = NBMAX+1 )
+      INTEGER            NBMAX, LDT, TSIZE
+      PARAMETER          ( NBMAX = 64, LDT = NBMAX+1,
+     $                     TSIZE = LDT*NBMAX )
 *     ..
 *     .. Local Scalars ..
       LOGICAL            LEFT, LQUERY, NOTRAN
       CHARACTER          TRANST
-      INTEGER            I, I1, I2, I3, IB, IC, IINFO, IWS, JC, LDWORK,
+      INTEGER            I, I1, I2, I3, IB, IC, IINFO, IWT, JC, LDWORK,
      $                   LWKOPT, MI, NB, NBMIN, NI, NQ, NW
 *     ..
-*     .. Local Arrays ..
-      DOUBLE PRECISION   T( LDT, NBMAX )
-*     ..
 *     .. External Functions ..
       LOGICAL            LSAME
       INTEGER            ILAENV
@@ -101824,12 +102312,11 @@
 *
       IF( INFO.EQ.0 ) THEN
 *
-*        Determine the block size.  NB may be at most NBMAX, where NBMAX
-*        is used to define the local array T.
+*        Compute the workspace requirements
 *
          NB = MIN( NBMAX, ILAENV( 1, 'DORMLQ', SIDE // TRANS, M, N, K,
      $        -1 ) )
-         LWKOPT = MAX( 1, NW )*NB
+         LWKOPT = MAX( 1, NW )*NB + TSIZE
          WORK( 1 ) = LWKOPT
       END IF
 *
@@ -101850,14 +102337,11 @@
       NBMIN = 2
       LDWORK = NW
       IF( NB.GT.1 .AND. NB.LT.K ) THEN
-         IWS = NW*NB
-         IF( LWORK.LT.IWS ) THEN
-            NB = LWORK / LDWORK
+         IF( LWORK.LT.NW*NB+TSIZE ) THEN
+            NB = (LWORK-TSIZE) / LDWORK
             NBMIN = MAX( 2, ILAENV( 2, 'DORMLQ', SIDE // TRANS, M, N, K,
      $              -1 ) )
          END IF
-      ELSE
-         IWS = NW
       END IF
 *
       IF( NB.LT.NBMIN .OR. NB.GE.K ) THEN
@@ -101870,6 +102354,7 @@
 *
 *        Use blocked code
 *
+         IWT = 1 + NW*NB
          IF( ( LEFT .AND. NOTRAN ) .OR.
      $       ( .NOT.LEFT .AND. .NOT.NOTRAN ) ) THEN
             I1 = 1
@@ -101902,7 +102387,7 @@
 *           H = H(i) H(i+1) . . . H(i+ib-1)
 *
             CALL DLARFT( 'Forward', 'Rowwise', NQ-I+1, IB, A( I, I ),
-     $                   LDA, TAU( I ), T, LDT )
+     $                   LDA, TAU( I ), WORK( IWT ), LDT )
             IF( LEFT ) THEN
 *
 *              H or H**T is applied to C(i:m,1:n)
@@ -101920,8 +102405,8 @@
 *           Apply H or H**T
 *
             CALL DLARFB( SIDE, TRANST, 'Forward', 'Rowwise', MI, NI, IB,
-     $                   A( I, I ), LDA, T, LDT, C( IC, JC ), LDC, WORK,
-     $                   LDWORK )
+     $                   A( I, I ), LDA, WORK( IWT ), LDT,
+     $                   C( IC, JC ), LDC, WORK, LDWORK )
    10    CONTINUE
       END IF
       WORK( 1 ) = LWKOPT
@@ -101934,25 +102419,25 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DORMQL + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dormql.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dormql.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dormql.f"> 
+*> Download DORMQL + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dormql.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dormql.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dormql.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       SUBROUTINE DORMQL( SIDE, TRANS, M, N, K, A, LDA, TAU, C, LDC,
 *                          WORK, LWORK, INFO )
-* 
+*
 *       .. Scalar Arguments ..
 *       CHARACTER          SIDE, TRANS
 *       INTEGER            INFO, K, LDA, LDC, LWORK, M, N
@@ -101960,7 +102445,7 @@
 *       .. Array Arguments ..
 *       DOUBLE PRECISION   A( LDA, * ), C( LDC, * ), TAU( * ), WORK( * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -102068,9 +102553,7 @@
 *>          The dimension of the array WORK.
 *>          If SIDE = 'L', LWORK >= max(1,N);
 *>          if SIDE = 'R', LWORK >= max(1,M).
-*>          For optimum performance LWORK >= N*NB if SIDE = 'L', and
-*>          LWORK >= M*NB if SIDE = 'R', where NB is the optimal
-*>          blocksize.
+*>          For good performance, LWORK should generally be larger.
 *>
 *>          If LWORK = -1, then a workspace query is assumed; the routine
 *>          only calculates the optimal size of the WORK array, returns
@@ -102088,12 +102571,12 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date November 2011
+*> \date December 2016
 *
 *> \ingroup doubleOTHERcomputational
 *
@@ -102101,10 +102584,10 @@
       SUBROUTINE DORMQL( SIDE, TRANS, M, N, K, A, LDA, TAU, C, LDC,
      $                   WORK, LWORK, INFO )
 *
-*  -- LAPACK computational routine (version 3.4.0) --
+*  -- LAPACK computational routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     November 2011
+*     December 2016
 *
 *     .. Scalar Arguments ..
       CHARACTER          SIDE, TRANS
@@ -102117,17 +102600,15 @@
 *  =====================================================================
 *
 *     .. Parameters ..
-      INTEGER            NBMAX, LDT
-      PARAMETER          ( NBMAX = 64, LDT = NBMAX+1 )
+      INTEGER            NBMAX, LDT, TSIZE
+      PARAMETER          ( NBMAX = 64, LDT = NBMAX+1,
+     $                     TSIZE = LDT*NBMAX )
 *     ..
 *     .. Local Scalars ..
       LOGICAL            LEFT, LQUERY, NOTRAN
-      INTEGER            I, I1, I2, I3, IB, IINFO, IWS, LDWORK, LWKOPT,
+      INTEGER            I, I1, I2, I3, IB, IINFO, IWT, LDWORK, LWKOPT,
      $                   MI, NB, NBMIN, NI, NQ, NW
 *     ..
-*     .. Local Arrays ..
-      DOUBLE PRECISION   T( LDT, NBMAX )
-*     ..
 *     .. External Functions ..
       LOGICAL            LSAME
       INTEGER            ILAENV
@@ -102171,25 +102652,22 @@
          INFO = -7
       ELSE IF( LDC.LT.MAX( 1, M ) ) THEN
          INFO = -10
+      ELSE IF( LWORK.LT.NW .AND. .NOT.LQUERY ) THEN
+         INFO = -12
       END IF
 *
       IF( INFO.EQ.0 ) THEN
+*
+*        Compute the workspace requirements
+*
          IF( M.EQ.0 .OR. N.EQ.0 ) THEN
             LWKOPT = 1
          ELSE
-*
-*           Determine the block size.  NB may be at most NBMAX, where
-*           NBMAX is used to define the local array T.
-*
             NB = MIN( NBMAX, ILAENV( 1, 'DORMQL', SIDE // TRANS, M, N,
      $                               K, -1 ) )
-            LWKOPT = NW*NB
+            LWKOPT = NW*NB + TSIZE
          END IF
          WORK( 1 ) = LWKOPT
-*
-         IF( LWORK.LT.NW .AND. .NOT.LQUERY ) THEN
-            INFO = -12
-         END IF
       END IF
 *
       IF( INFO.NE.0 ) THEN
@@ -102208,14 +102686,11 @@
       NBMIN = 2
       LDWORK = NW
       IF( NB.GT.1 .AND. NB.LT.K ) THEN
-         IWS = NW*NB
-         IF( LWORK.LT.IWS ) THEN
-            NB = LWORK / LDWORK
+         IF( LWORK.LT.NW*NB+TSIZE ) THEN
+            NB = (LWORK-TSIZE) / LDWORK
             NBMIN = MAX( 2, ILAENV( 2, 'DORMQL', SIDE // TRANS, M, N, K,
      $              -1 ) )
          END IF
-      ELSE
-         IWS = NW
       END IF
 *
       IF( NB.LT.NBMIN .OR. NB.GE.K ) THEN
@@ -102228,6 +102703,7 @@
 *
 *        Use blocked code
 *
+         IWT = 1 + NW*NB
          IF( ( LEFT .AND. NOTRAN ) .OR.
      $       ( .NOT.LEFT .AND. .NOT.NOTRAN ) ) THEN
             I1 = 1
@@ -102252,7 +102728,7 @@
 *           H = H(i+ib-1) . . . H(i+1) H(i)
 *
             CALL DLARFT( 'Backward', 'Columnwise', NQ-K+I+IB-1, IB,
-     $                   A( 1, I ), LDA, TAU( I ), T, LDT )
+     $                   A( 1, I ), LDA, TAU( I ), WORK( IWT ), LDT )
             IF( LEFT ) THEN
 *
 *              H or H**T is applied to C(1:m-k+i+ib-1,1:n)
@@ -102268,8 +102744,8 @@
 *           Apply H or H**T
 *
             CALL DLARFB( SIDE, TRANS, 'Backward', 'Columnwise', MI, NI,
-     $                   IB, A( 1, I ), LDA, T, LDT, C, LDC, WORK,
-     $                   LDWORK )
+     $                   IB, A( 1, I ), LDA, WORK( IWT ), LDT, C, LDC,
+     $                   WORK, LDWORK )
    10    CONTINUE
       END IF
       WORK( 1 ) = LWKOPT
@@ -102282,25 +102758,25 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DORMQR + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dormqr.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dormqr.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dormqr.f"> 
+*> Download DORMQR + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dormqr.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dormqr.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dormqr.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       SUBROUTINE DORMQR( SIDE, TRANS, M, N, K, A, LDA, TAU, C, LDC,
 *                          WORK, LWORK, INFO )
-* 
+*
 *       .. Scalar Arguments ..
 *       CHARACTER          SIDE, TRANS
 *       INTEGER            INFO, K, LDA, LDC, LWORK, M, N
@@ -102308,7 +102784,7 @@
 *       .. Array Arguments ..
 *       DOUBLE PRECISION   A( LDA, * ), C( LDC, * ), TAU( * ), WORK( * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -102416,9 +102892,7 @@
 *>          The dimension of the array WORK.
 *>          If SIDE = 'L', LWORK >= max(1,N);
 *>          if SIDE = 'R', LWORK >= max(1,M).
-*>          For optimum performance LWORK >= N*NB if SIDE = 'L', and
-*>          LWORK >= M*NB if SIDE = 'R', where NB is the optimal
-*>          blocksize.
+*>          For good performance, LWORK should generally be larger.
 *>
 *>          If LWORK = -1, then a workspace query is assumed; the routine
 *>          only calculates the optimal size of the WORK array, returns
@@ -102436,12 +102910,12 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date November 2011
+*> \date December 2016
 *
 *> \ingroup doubleOTHERcomputational
 *
@@ -102449,10 +102923,10 @@
       SUBROUTINE DORMQR( SIDE, TRANS, M, N, K, A, LDA, TAU, C, LDC,
      $                   WORK, LWORK, INFO )
 *
-*  -- LAPACK computational routine (version 3.4.0) --
+*  -- LAPACK computational routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     November 2011
+*     December 2016
 *
 *     .. Scalar Arguments ..
       CHARACTER          SIDE, TRANS
@@ -102465,17 +102939,15 @@
 *  =====================================================================
 *
 *     .. Parameters ..
-      INTEGER            NBMAX, LDT
-      PARAMETER          ( NBMAX = 64, LDT = NBMAX+1 )
+      INTEGER            NBMAX, LDT, TSIZE
+      PARAMETER          ( NBMAX = 64, LDT = NBMAX+1,
+     $                     TSIZE = LDT*NBMAX )
 *     ..
 *     .. Local Scalars ..
       LOGICAL            LEFT, LQUERY, NOTRAN
-      INTEGER            I, I1, I2, I3, IB, IC, IINFO, IWS, JC, LDWORK,
+      INTEGER            I, I1, I2, I3, IB, IC, IINFO, IWT, JC, LDWORK,
      $                   LWKOPT, MI, NB, NBMIN, NI, NQ, NW
 *     ..
-*     .. Local Arrays ..
-      DOUBLE PRECISION   T( LDT, NBMAX )
-*     ..
 *     .. External Functions ..
       LOGICAL            LSAME
       INTEGER            ILAENV
@@ -102525,12 +102997,11 @@
 *
       IF( INFO.EQ.0 ) THEN
 *
-*        Determine the block size.  NB may be at most NBMAX, where NBMAX
-*        is used to define the local array T.
+*        Compute the workspace requirements
 *
          NB = MIN( NBMAX, ILAENV( 1, 'DORMQR', SIDE // TRANS, M, N, K,
      $        -1 ) )
-         LWKOPT = MAX( 1, NW )*NB
+         LWKOPT = MAX( 1, NW )*NB + TSIZE
          WORK( 1 ) = LWKOPT
       END IF
 *
@@ -102551,14 +103022,11 @@
       NBMIN = 2
       LDWORK = NW
       IF( NB.GT.1 .AND. NB.LT.K ) THEN
-         IWS = NW*NB
-         IF( LWORK.LT.IWS ) THEN
-            NB = LWORK / LDWORK
+         IF( LWORK.LT.NW*NB+TSIZE ) THEN
+            NB = (LWORK-TSIZE) / LDWORK
             NBMIN = MAX( 2, ILAENV( 2, 'DORMQR', SIDE // TRANS, M, N, K,
      $              -1 ) )
          END IF
-      ELSE
-         IWS = NW
       END IF
 *
       IF( NB.LT.NBMIN .OR. NB.GE.K ) THEN
@@ -102571,6 +103039,7 @@
 *
 *        Use blocked code
 *
+         IWT = 1 + NW*NB
          IF( ( LEFT .AND. .NOT.NOTRAN ) .OR.
      $       ( .NOT.LEFT .AND. NOTRAN ) ) THEN
             I1 = 1
@@ -102597,7 +103066,7 @@
 *           H = H(i) H(i+1) . . . H(i+ib-1)
 *
             CALL DLARFT( 'Forward', 'Columnwise', NQ-I+1, IB, A( I, I ),
-     $                   LDA, TAU( I ), T, LDT )
+     $                   LDA, TAU( I ), WORK( IWT ), LDT )
             IF( LEFT ) THEN
 *
 *              H or H**T is applied to C(i:m,1:n)
@@ -102615,8 +103084,8 @@
 *           Apply H or H**T
 *
             CALL DLARFB( SIDE, TRANS, 'Forward', 'Columnwise', MI, NI,
-     $                   IB, A( I, I ), LDA, T, LDT, C( IC, JC ), LDC,
-     $                   WORK, LDWORK )
+     $                   IB, A( I, I ), LDA, WORK( IWT ), LDT,
+     $                   C( IC, JC ), LDC, WORK, LDWORK )
    10    CONTINUE
       END IF
       WORK( 1 ) = LWKOPT
@@ -102629,25 +103098,25 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DORMR2 + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dormr2.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dormr2.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dormr2.f"> 
+*> Download DORMR2 + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dormr2.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dormr2.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dormr2.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       SUBROUTINE DORMR2( SIDE, TRANS, M, N, K, A, LDA, TAU, C, LDC,
 *                          WORK, INFO )
-* 
+*
 *       .. Scalar Arguments ..
 *       CHARACTER          SIDE, TRANS
 *       INTEGER            INFO, K, LDA, LDC, M, N
@@ -102655,7 +103124,7 @@
 *       .. Array Arguments ..
 *       DOUBLE PRECISION   A( LDA, * ), C( LDC, * ), TAU( * ), WORK( * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -102773,12 +103242,12 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date September 2012
+*> \date December 2016
 *
 *> \ingroup doubleOTHERcomputational
 *
@@ -102786,10 +103255,10 @@
       SUBROUTINE DORMR2( SIDE, TRANS, M, N, K, A, LDA, TAU, C, LDC,
      $                   WORK, INFO )
 *
-*  -- LAPACK computational routine (version 3.4.2) --
+*  -- LAPACK computational routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     September 2012
+*     December 2016
 *
 *     .. Scalar Arguments ..
       CHARACTER          SIDE, TRANS
@@ -102907,25 +103376,25 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DORMR3 + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dormr3.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dormr3.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dormr3.f"> 
+*> Download DORMR3 + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dormr3.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dormr3.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dormr3.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       SUBROUTINE DORMR3( SIDE, TRANS, M, N, K, L, A, LDA, TAU, C, LDC,
 *                          WORK, INFO )
-* 
+*
 *       .. Scalar Arguments ..
 *       CHARACTER          SIDE, TRANS
 *       INTEGER            INFO, K, L, LDA, LDC, M, N
@@ -102933,7 +103402,7 @@
 *       .. Array Arguments ..
 *       DOUBLE PRECISION   A( LDA, * ), C( LDC, * ), TAU( * ), WORK( * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -103059,12 +103528,12 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date September 2012
+*> \date December 2016
 *
 *> \ingroup doubleOTHERcomputational
 *
@@ -103083,10 +103552,10 @@
       SUBROUTINE DORMR3( SIDE, TRANS, M, N, K, L, A, LDA, TAU, C, LDC,
      $                   WORK, INFO )
 *
-*  -- LAPACK computational routine (version 3.4.2) --
+*  -- LAPACK computational routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     September 2012
+*     December 2016
 *
 *     .. Scalar Arguments ..
       CHARACTER          SIDE, TRANS
@@ -103206,25 +103675,25 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DORMRQ + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dormrq.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dormrq.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dormrq.f"> 
+*> Download DORMRQ + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dormrq.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dormrq.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dormrq.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       SUBROUTINE DORMRQ( SIDE, TRANS, M, N, K, A, LDA, TAU, C, LDC,
 *                          WORK, LWORK, INFO )
-* 
+*
 *       .. Scalar Arguments ..
 *       CHARACTER          SIDE, TRANS
 *       INTEGER            INFO, K, LDA, LDC, LWORK, M, N
@@ -103232,7 +103701,7 @@
 *       .. Array Arguments ..
 *       DOUBLE PRECISION   A( LDA, * ), C( LDC, * ), TAU( * ), WORK( * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -103340,9 +103809,7 @@
 *>          The dimension of the array WORK.
 *>          If SIDE = 'L', LWORK >= max(1,N);
 *>          if SIDE = 'R', LWORK >= max(1,M).
-*>          For optimum performance LWORK >= N*NB if SIDE = 'L', and
-*>          LWORK >= M*NB if SIDE = 'R', where NB is the optimal
-*>          blocksize.
+*>          For good performance, LWORK should generally be larger.
 *>
 *>          If LWORK = -1, then a workspace query is assumed; the routine
 *>          only calculates the optimal size of the WORK array, returns
@@ -103360,12 +103827,12 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date November 2011
+*> \date December 2016
 *
 *> \ingroup doubleOTHERcomputational
 *
@@ -103373,10 +103840,10 @@
       SUBROUTINE DORMRQ( SIDE, TRANS, M, N, K, A, LDA, TAU, C, LDC,
      $                   WORK, LWORK, INFO )
 *
-*  -- LAPACK computational routine (version 3.4.0) --
+*  -- LAPACK computational routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     November 2011
+*     December 2016
 *
 *     .. Scalar Arguments ..
       CHARACTER          SIDE, TRANS
@@ -103389,18 +103856,16 @@
 *  =====================================================================
 *
 *     .. Parameters ..
-      INTEGER            NBMAX, LDT
-      PARAMETER          ( NBMAX = 64, LDT = NBMAX+1 )
+      INTEGER            NBMAX, LDT, TSIZE
+      PARAMETER          ( NBMAX = 64, LDT = NBMAX+1,
+     $                     TSIZE = LDT*NBMAX )
 *     ..
 *     .. Local Scalars ..
       LOGICAL            LEFT, LQUERY, NOTRAN
       CHARACTER          TRANST
-      INTEGER            I, I1, I2, I3, IB, IINFO, IWS, LDWORK, LWKOPT,
+      INTEGER            I, I1, I2, I3, IB, IINFO, IWT, LDWORK, LWKOPT,
      $                   MI, NB, NBMIN, NI, NQ, NW
 *     ..
-*     .. Local Arrays ..
-      DOUBLE PRECISION   T( LDT, NBMAX )
-*     ..
 *     .. External Functions ..
       LOGICAL            LSAME
       INTEGER            ILAENV
@@ -103444,25 +103909,22 @@
          INFO = -7
       ELSE IF( LDC.LT.MAX( 1, M ) ) THEN
          INFO = -10
+      ELSE IF( LWORK.LT.NW .AND. .NOT.LQUERY ) THEN
+         INFO = -12
       END IF
 *
       IF( INFO.EQ.0 ) THEN
+*
+*        Compute the workspace requirements
+*
          IF( M.EQ.0 .OR. N.EQ.0 ) THEN
             LWKOPT = 1
          ELSE
-*
-*           Determine the block size.  NB may be at most NBMAX, where
-*           NBMAX is used to define the local array T.
-*
             NB = MIN( NBMAX, ILAENV( 1, 'DORMRQ', SIDE // TRANS, M, N,
      $                               K, -1 ) )
-            LWKOPT = NW*NB
+            LWKOPT = NW*NB + TSIZE
          END IF
          WORK( 1 ) = LWKOPT
-*
-         IF( LWORK.LT.NW .AND. .NOT.LQUERY ) THEN
-            INFO = -12
-         END IF
       END IF
 *
       IF( INFO.NE.0 ) THEN
@@ -103481,14 +103943,11 @@
       NBMIN = 2
       LDWORK = NW
       IF( NB.GT.1 .AND. NB.LT.K ) THEN
-         IWS = NW*NB
-         IF( LWORK.LT.IWS ) THEN
-            NB = LWORK / LDWORK
+         IF( LWORK.LT.NW*NB+TSIZE ) THEN
+            NB = (LWORK-TSIZE) / LDWORK
             NBMIN = MAX( 2, ILAENV( 2, 'DORMRQ', SIDE // TRANS, M, N, K,
      $              -1 ) )
          END IF
-      ELSE
-         IWS = NW
       END IF
 *
       IF( NB.LT.NBMIN .OR. NB.GE.K ) THEN
@@ -103501,6 +103960,7 @@
 *
 *        Use blocked code
 *
+         IWT = 1 + NW*NB
          IF( ( LEFT .AND. .NOT.NOTRAN ) .OR.
      $       ( .NOT.LEFT .AND. NOTRAN ) ) THEN
             I1 = 1
@@ -103531,7 +103991,7 @@
 *           H = H(i+ib-1) . . . H(i+1) H(i)
 *
             CALL DLARFT( 'Backward', 'Rowwise', NQ-K+I+IB-1, IB,
-     $                   A( I, 1 ), LDA, TAU( I ), T, LDT )
+     $                   A( I, 1 ), LDA, TAU( I ), WORK( IWT ), LDT )
             IF( LEFT ) THEN
 *
 *              H or H**T is applied to C(1:m-k+i+ib-1,1:n)
@@ -103547,8 +104007,8 @@
 *           Apply H or H**T
 *
             CALL DLARFB( SIDE, TRANST, 'Backward', 'Rowwise', MI, NI,
-     $                   IB, A( I, 1 ), LDA, T, LDT, C, LDC, WORK,
-     $                   LDWORK )
+     $                   IB, A( I, 1 ), LDA, WORK( IWT ), LDT, C, LDC,
+     $                   WORK, LDWORK )
    10    CONTINUE
       END IF
       WORK( 1 ) = LWKOPT
@@ -103561,25 +104021,25 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DORMRZ + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dormrz.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dormrz.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dormrz.f"> 
+*> Download DORMRZ + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dormrz.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dormrz.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dormrz.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       SUBROUTINE DORMRZ( SIDE, TRANS, M, N, K, L, A, LDA, TAU, C, LDC,
 *                          WORK, LWORK, INFO )
-* 
+*
 *       .. Scalar Arguments ..
 *       CHARACTER          SIDE, TRANS
 *       INTEGER            INFO, K, L, LDA, LDC, LWORK, M, N
@@ -103587,7 +104047,7 @@
 *       .. Array Arguments ..
 *       DOUBLE PRECISION   A( LDA, * ), C( LDC, * ), TAU( * ), WORK( * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -103704,9 +104164,7 @@
 *>          The dimension of the array WORK.
 *>          If SIDE = 'L', LWORK >= max(1,N);
 *>          if SIDE = 'R', LWORK >= max(1,M).
-*>          For optimum performance LWORK >= N*NB if SIDE = 'L', and
-*>          LWORK >= M*NB if SIDE = 'R', where NB is the optimal
-*>          blocksize.
+*>          For good performance, LWORK should generally be larger.
 *>
 *>          If LWORK = -1, then a workspace query is assumed; the routine
 *>          only calculates the optimal size of the WORK array, returns
@@ -103724,12 +104182,12 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date November 2011
+*> \date December 2016
 *
 *> \ingroup doubleOTHERcomputational
 *
@@ -103748,10 +104206,10 @@
       SUBROUTINE DORMRZ( SIDE, TRANS, M, N, K, L, A, LDA, TAU, C, LDC,
      $                   WORK, LWORK, INFO )
 *
-*  -- LAPACK computational routine (version 3.4.0) --
+*  -- LAPACK computational routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     November 2011
+*     December 2016
 *
 *     .. Scalar Arguments ..
       CHARACTER          SIDE, TRANS
@@ -103764,18 +104222,16 @@
 *  =====================================================================
 *
 *     .. Parameters ..
-      INTEGER            NBMAX, LDT
-      PARAMETER          ( NBMAX = 64, LDT = NBMAX+1 )
+      INTEGER            NBMAX, LDT, TSIZE
+      PARAMETER          ( NBMAX = 64, LDT = NBMAX+1,
+     $                     TSIZE = LDT*NBMAX )
 *     ..
 *     .. Local Scalars ..
       LOGICAL            LEFT, LQUERY, NOTRAN
       CHARACTER          TRANST
-      INTEGER            I, I1, I2, I3, IB, IC, IINFO, IWS, JA, JC,
+      INTEGER            I, I1, I2, I3, IB, IC, IINFO, IWT, JA, JC,
      $                   LDWORK, LWKOPT, MI, NB, NBMIN, NI, NQ, NW
 *     ..
-*     .. Local Arrays ..
-      DOUBLE PRECISION   T( LDT, NBMAX )
-*     ..
 *     .. External Functions ..
       LOGICAL            LSAME
       INTEGER            ILAENV
@@ -103822,25 +104278,22 @@
          INFO = -8
       ELSE IF( LDC.LT.MAX( 1, M ) ) THEN
          INFO = -11
+      ELSE IF( LWORK.LT.MAX( 1, NW ) .AND. .NOT.LQUERY ) THEN
+         INFO = -13
       END IF
 *
       IF( INFO.EQ.0 ) THEN
+*
+*        Compute the workspace requirements
+*
          IF( M.EQ.0 .OR. N.EQ.0 ) THEN
             LWKOPT = 1
          ELSE
-*
-*           Determine the block size.  NB may be at most NBMAX, where
-*           NBMAX is used to define the local array T.
-*
             NB = MIN( NBMAX, ILAENV( 1, 'DORMRQ', SIDE // TRANS, M, N,
      $                               K, -1 ) )
-            LWKOPT = NW*NB
+            LWKOPT = NW*NB + TSIZE
          END IF
          WORK( 1 ) = LWKOPT
-*
-         IF( LWORK.LT.MAX( 1, NW ) .AND. .NOT.LQUERY ) THEN
-            INFO = -13
-         END IF
       END IF
 *
       IF( INFO.NE.0 ) THEN
@@ -103860,14 +104313,11 @@
       NBMIN = 2
       LDWORK = NW
       IF( NB.GT.1 .AND. NB.LT.K ) THEN
-         IWS = NW*NB
-         IF( LWORK.LT.IWS ) THEN
-            NB = LWORK / LDWORK
+         IF( LWORK.LT.NW*NB+TSIZE ) THEN
+            NB = (LWORK-TSIZE) / LDWORK
             NBMIN = MAX( 2, ILAENV( 2, 'DORMRQ', SIDE // TRANS, M, N, K,
      $              -1 ) )
          END IF
-      ELSE
-         IWS = NW
       END IF
 *
       IF( NB.LT.NBMIN .OR. NB.GE.K ) THEN
@@ -103880,6 +104330,7 @@
 *
 *        Use blocked code
 *
+         IWT = 1 + NW*NB
          IF( ( LEFT .AND. .NOT.NOTRAN ) .OR.
      $       ( .NOT.LEFT .AND. NOTRAN ) ) THEN
             I1 = 1
@@ -103914,7 +104365,7 @@
 *           H = H(i+ib-1) . . . H(i+1) H(i)
 *
             CALL DLARZT( 'Backward', 'Rowwise', L, IB, A( I, JA ), LDA,
-     $                   TAU( I ), T, LDT )
+     $                   TAU( I ), WORK( IWT ), LDT )
 *
             IF( LEFT ) THEN
 *
@@ -103933,8 +104384,8 @@
 *           Apply H or H**T
 *
             CALL DLARZB( SIDE, TRANST, 'Backward', 'Rowwise', MI, NI,
-     $                   IB, L, A( I, JA ), LDA, T, LDT, C( IC, JC ),
-     $                   LDC, WORK, LDWORK )
+     $                   IB, L, A( I, JA ), LDA, WORK( IWT ), LDT,
+     $                   C( IC, JC ), LDC, WORK, LDWORK )
    10    CONTINUE
 *
       END IF
@@ -103950,25 +104401,25 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DORMTR + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dormtr.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dormtr.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dormtr.f"> 
+*> Download DORMTR + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dormtr.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dormtr.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dormtr.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       SUBROUTINE DORMTR( SIDE, UPLO, TRANS, M, N, A, LDA, TAU, C, LDC,
 *                          WORK, LWORK, INFO )
-* 
+*
 *       .. Scalar Arguments ..
 *       CHARACTER          SIDE, TRANS, UPLO
 *       INTEGER            INFO, LDA, LDC, LWORK, M, N
@@ -103976,7 +104427,7 @@
 *       .. Array Arguments ..
 *       DOUBLE PRECISION   A( LDA, * ), C( LDC, * ), TAU( * ), WORK( * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -104106,12 +104557,12 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date November 2011
+*> \date December 2016
 *
 *> \ingroup doubleOTHERcomputational
 *
@@ -104119,10 +104570,10 @@
       SUBROUTINE DORMTR( SIDE, UPLO, TRANS, M, N, A, LDA, TAU, C, LDC,
      $                   WORK, LWORK, INFO )
 *
-*  -- LAPACK computational routine (version 3.4.0) --
+*  -- LAPACK computational routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     November 2011
+*     December 2016
 *
 *     .. Scalar Arguments ..
       CHARACTER          SIDE, TRANS, UPLO
@@ -104260,25 +104711,25 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DPBCON + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dpbcon.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dpbcon.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dpbcon.f"> 
+*> Download DPBCON + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dpbcon.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dpbcon.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dpbcon.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       SUBROUTINE DPBCON( UPLO, N, KD, AB, LDAB, ANORM, RCOND, WORK,
 *                          IWORK, INFO )
-* 
+*
 *       .. Scalar Arguments ..
 *       CHARACTER          UPLO
 *       INTEGER            INFO, KD, LDAB, N
@@ -104288,7 +104739,7 @@
 *       INTEGER            IWORK( * )
 *       DOUBLE PRECISION   AB( LDAB, * ), WORK( * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -104377,12 +104828,12 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date November 2011
+*> \date December 2016
 *
 *> \ingroup doubleOTHERcomputational
 *
@@ -104390,10 +104841,10 @@
       SUBROUTINE DPBCON( UPLO, N, KD, AB, LDAB, ANORM, RCOND, WORK,
      $                   IWORK, INFO )
 *
-*  -- LAPACK computational routine (version 3.4.0) --
+*  -- LAPACK computational routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     November 2011
+*     December 2016
 *
 *     .. Scalar Arguments ..
       CHARACTER          UPLO
@@ -104531,24 +104982,24 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DPBEQU + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dpbequ.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dpbequ.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dpbequ.f"> 
+*> Download DPBEQU + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dpbequ.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dpbequ.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dpbequ.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       SUBROUTINE DPBEQU( UPLO, N, KD, AB, LDAB, S, SCOND, AMAX, INFO )
-* 
+*
 *       .. Scalar Arguments ..
 *       CHARACTER          UPLO
 *       INTEGER            INFO, KD, LDAB, N
@@ -104557,7 +105008,7 @@
 *       .. Array Arguments ..
 *       DOUBLE PRECISION   AB( LDAB, * ), S( * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -104646,22 +105097,22 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date November 2011
+*> \date December 2016
 *
 *> \ingroup doubleOTHERcomputational
 *
 *  =====================================================================
       SUBROUTINE DPBEQU( UPLO, N, KD, AB, LDAB, S, SCOND, AMAX, INFO )
 *
-*  -- LAPACK computational routine (version 3.4.0) --
+*  -- LAPACK computational routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     November 2011
+*     December 2016
 *
 *     .. Scalar Arguments ..
       CHARACTER          UPLO
@@ -104773,25 +105224,25 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DPBRFS + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dpbrfs.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dpbrfs.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dpbrfs.f"> 
+*> Download DPBRFS + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dpbrfs.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dpbrfs.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dpbrfs.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       SUBROUTINE DPBRFS( UPLO, N, KD, NRHS, AB, LDAB, AFB, LDAFB, B,
 *                          LDB, X, LDX, FERR, BERR, WORK, IWORK, INFO )
-* 
+*
 *       .. Scalar Arguments ..
 *       CHARACTER          UPLO
 *       INTEGER            INFO, KD, LDAB, LDAFB, LDB, LDX, N, NRHS
@@ -104801,7 +105252,7 @@
 *       DOUBLE PRECISION   AB( LDAB, * ), AFB( LDAFB, * ), B( LDB, * ),
 *      $                   BERR( * ), FERR( * ), WORK( * ), X( LDX, * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -104947,12 +105398,12 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date November 2011
+*> \date December 2016
 *
 *> \ingroup doubleOTHERcomputational
 *
@@ -104960,10 +105411,10 @@
       SUBROUTINE DPBRFS( UPLO, N, KD, NRHS, AB, LDAB, AFB, LDAFB, B,
      $                   LDB, X, LDX, FERR, BERR, WORK, IWORK, INFO )
 *
-*  -- LAPACK computational routine (version 3.4.0) --
+*  -- LAPACK computational routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     November 2011
+*     December 2016
 *
 *     .. Scalar Arguments ..
       CHARACTER          UPLO
@@ -105216,24 +105667,24 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DPBSTF + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dpbstf.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dpbstf.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dpbstf.f"> 
+*> Download DPBSTF + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dpbstf.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dpbstf.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dpbstf.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       SUBROUTINE DPBSTF( UPLO, N, KD, AB, LDAB, INFO )
-* 
+*
 *       .. Scalar Arguments ..
 *       CHARACTER          UPLO
 *       INTEGER            INFO, KD, LDAB, N
@@ -105241,7 +105692,7 @@
 *       .. Array Arguments ..
 *       DOUBLE PRECISION   AB( LDAB, * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -105319,12 +105770,12 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date November 2011
+*> \date December 2016
 *
 *> \ingroup doubleOTHERcomputational
 *
@@ -105366,10 +105817,10 @@
 *  =====================================================================
       SUBROUTINE DPBSTF( UPLO, N, KD, AB, LDAB, INFO )
 *
-*  -- LAPACK computational routine (version 3.4.0) --
+*  -- LAPACK computational routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     November 2011
+*     December 2016
 *
 *     .. Scalar Arguments ..
       CHARACTER          UPLO
@@ -105535,24 +105986,24 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DPBSV + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dpbsv.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dpbsv.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dpbsv.f"> 
+*> Download DPBSV + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dpbsv.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dpbsv.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dpbsv.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       SUBROUTINE DPBSV( UPLO, N, KD, NRHS, AB, LDAB, B, LDB, INFO )
-* 
+*
 *       .. Scalar Arguments ..
 *       CHARACTER          UPLO
 *       INTEGER            INFO, KD, LDAB, LDB, N, NRHS
@@ -105560,7 +106011,7 @@
 *       .. Array Arguments ..
 *       DOUBLE PRECISION   AB( LDAB, * ), B( LDB, * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -105660,12 +106111,12 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date November 2011
+*> \date December 2016
 *
 *> \ingroup doubleOTHERsolve
 *
@@ -105697,10 +106148,10 @@
 *  =====================================================================
       SUBROUTINE DPBSV( UPLO, N, KD, NRHS, AB, LDAB, B, LDB, INFO )
 *
-*  -- LAPACK driver routine (version 3.4.0) --
+*  -- LAPACK driver routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     November 2011
+*     December 2016
 *
 *     .. Scalar Arguments ..
       CHARACTER          UPLO
@@ -105764,18 +106215,18 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DPBSVX + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dpbsvx.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dpbsvx.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dpbsvx.f"> 
+*> Download DPBSVX + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dpbsvx.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dpbsvx.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dpbsvx.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
@@ -105783,7 +106234,7 @@
 *       SUBROUTINE DPBSVX( FACT, UPLO, N, KD, NRHS, AB, LDAB, AFB, LDAFB,
 *                          EQUED, S, B, LDB, X, LDX, RCOND, FERR, BERR,
 *                          WORK, IWORK, INFO )
-* 
+*
 *       .. Scalar Arguments ..
 *       CHARACTER          EQUED, FACT, UPLO
 *       INTEGER            INFO, KD, LDAB, LDAFB, LDB, LDX, N, NRHS
@@ -105795,7 +106246,7 @@
 *      $                   BERR( * ), FERR( * ), S( * ), WORK( * ),
 *      $                   X( LDX, * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -106059,10 +106510,10 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
 *> \date April 2012
 *
@@ -106105,7 +106556,7 @@
      $                   EQUED, S, B, LDB, X, LDX, RCOND, FERR, BERR,
      $                   WORK, IWORK, INFO )
 *
-*  -- LAPACK driver routine (version 3.4.1) --
+*  -- LAPACK driver routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
 *     April 2012
@@ -106309,24 +106760,24 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DPBTF2 + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dpbtf2.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dpbtf2.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dpbtf2.f"> 
+*> Download DPBTF2 + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dpbtf2.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dpbtf2.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dpbtf2.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       SUBROUTINE DPBTF2( UPLO, N, KD, AB, LDAB, INFO )
-* 
+*
 *       .. Scalar Arguments ..
 *       CHARACTER          UPLO
 *       INTEGER            INFO, KD, LDAB, N
@@ -106334,7 +106785,7 @@
 *       .. Array Arguments ..
 *       DOUBLE PRECISION   AB( LDAB, * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -106412,12 +106863,12 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date September 2012
+*> \date December 2016
 *
 *> \ingroup doubleOTHERcomputational
 *
@@ -106449,10 +106900,10 @@
 *  =====================================================================
       SUBROUTINE DPBTF2( UPLO, N, KD, AB, LDAB, INFO )
 *
-*  -- LAPACK computational routine (version 3.4.2) --
+*  -- LAPACK computational routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     September 2012
+*     December 2016
 *
 *     .. Scalar Arguments ..
       CHARACTER          UPLO
@@ -106572,24 +107023,24 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DPBTRF + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dpbtrf.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dpbtrf.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dpbtrf.f"> 
+*> Download DPBTRF + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dpbtrf.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dpbtrf.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dpbtrf.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       SUBROUTINE DPBTRF( UPLO, N, KD, AB, LDAB, INFO )
-* 
+*
 *       .. Scalar Arguments ..
 *       CHARACTER          UPLO
 *       INTEGER            INFO, KD, LDAB, N
@@ -106597,7 +107048,7 @@
 *       .. Array Arguments ..
 *       DOUBLE PRECISION   AB( LDAB, * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -106670,12 +107121,12 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date November 2011
+*> \date December 2016
 *
 *> \ingroup doubleOTHERcomputational
 *
@@ -106712,10 +107163,10 @@
 *  =====================================================================
       SUBROUTINE DPBTRF( UPLO, N, KD, AB, LDAB, INFO )
 *
-*  -- LAPACK computational routine (version 3.4.0) --
+*  -- LAPACK computational routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     November 2011
+*     December 2016
 *
 *     .. Scalar Arguments ..
       CHARACTER          UPLO
@@ -107007,24 +107458,24 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DPBTRS + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dpbtrs.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dpbtrs.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dpbtrs.f"> 
+*> Download DPBTRS + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dpbtrs.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dpbtrs.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dpbtrs.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       SUBROUTINE DPBTRS( UPLO, N, KD, NRHS, AB, LDAB, B, LDB, INFO )
-* 
+*
 *       .. Scalar Arguments ..
 *       CHARACTER          UPLO
 *       INTEGER            INFO, KD, LDAB, LDB, N, NRHS
@@ -107032,7 +107483,7 @@
 *       .. Array Arguments ..
 *       DOUBLE PRECISION   AB( LDAB, * ), B( LDB, * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -107114,22 +107565,22 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date November 2011
+*> \date December 2016
 *
 *> \ingroup doubleOTHERcomputational
 *
 *  =====================================================================
       SUBROUTINE DPBTRS( UPLO, N, KD, NRHS, AB, LDAB, B, LDB, INFO )
 *
-*  -- LAPACK computational routine (version 3.4.0) --
+*  -- LAPACK computational routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     November 2011
+*     December 2016
 *
 *     .. Scalar Arguments ..
       CHARACTER          UPLO
@@ -107227,31 +107678,31 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DPFTRF + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dpftrf.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dpftrf.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dpftrf.f"> 
+*> Download DPFTRF + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dpftrf.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dpftrf.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dpftrf.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       SUBROUTINE DPFTRF( TRANSR, UPLO, N, A, INFO )
-* 
+*
 *       .. Scalar Arguments ..
 *       CHARACTER          TRANSR, UPLO
 *       INTEGER            N, INFO
 *       ..
 *       .. Array Arguments ..
 *       DOUBLE PRECISION   A( 0: * )
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -107324,12 +107775,12 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date November 2011
+*> \date December 2016
 *
 *> \ingroup doubleOTHERcomputational
 *
@@ -107423,10 +107874,10 @@
 *  =====================================================================
       SUBROUTINE DPFTRF( TRANSR, UPLO, N, A, INFO )
 *
-*  -- LAPACK computational routine (version 3.4.0) --
+*  -- LAPACK computational routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     November 2011
+*     December 2016
 *
 *     .. Scalar Arguments ..
       CHARACTER          TRANSR, UPLO
@@ -107684,31 +108135,31 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DPFTRI + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dpftri.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dpftri.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dpftri.f"> 
+*> Download DPFTRI + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dpftri.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dpftri.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dpftri.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       SUBROUTINE DPFTRI( TRANSR, UPLO, N, A, INFO )
-* 
+*
 *       .. Scalar Arguments ..
 *       CHARACTER          TRANSR, UPLO
 *       INTEGER            INFO, N
 *       .. Array Arguments ..
 *       DOUBLE PRECISION         A( 0: * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -107774,12 +108225,12 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date November 2011
+*> \date December 2016
 *
 *> \ingroup doubleOTHERcomputational
 *
@@ -107873,10 +108324,10 @@
 *  =====================================================================
       SUBROUTINE DPFTRI( TRANSR, UPLO, N, A, INFO )
 *
-*  -- LAPACK computational routine (version 3.4.0) --
+*  -- LAPACK computational routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     November 2011
+*     December 2016
 *
 *     .. Scalar Arguments ..
       CHARACTER          TRANSR, UPLO
@@ -108107,24 +108558,24 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DPFTRS + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dpftrs.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dpftrs.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dpftrs.f"> 
+*> Download DPFTRS + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dpftrs.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dpftrs.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dpftrs.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       SUBROUTINE DPFTRS( TRANSR, UPLO, N, NRHS, A, B, LDB, INFO )
-* 
+*
 *       .. Scalar Arguments ..
 *       CHARACTER          TRANSR, UPLO
 *       INTEGER            INFO, LDB, N, NRHS
@@ -108132,7 +108583,7 @@
 *       .. Array Arguments ..
 *       DOUBLE PRECISION   A( 0: * ), B( LDB, * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -108205,12 +108656,12 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date November 2011
+*> \date December 2016
 *
 *> \ingroup doubleOTHERcomputational
 *
@@ -108304,10 +108755,10 @@
 *  =====================================================================
       SUBROUTINE DPFTRS( TRANSR, UPLO, N, NRHS, A, B, LDB, INFO )
 *
-*  -- LAPACK computational routine (version 3.4.0) --
+*  -- LAPACK computational routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     November 2011
+*     December 2016
 *
 *     .. Scalar Arguments ..
       CHARACTER          TRANSR, UPLO
@@ -108387,25 +108838,25 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DPOCON + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dpocon.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dpocon.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dpocon.f"> 
+*> Download DPOCON + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dpocon.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dpocon.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dpocon.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       SUBROUTINE DPOCON( UPLO, N, A, LDA, ANORM, RCOND, WORK, IWORK,
 *                          INFO )
-* 
+*
 *       .. Scalar Arguments ..
 *       CHARACTER          UPLO
 *       INTEGER            INFO, LDA, N
@@ -108415,7 +108866,7 @@
 *       INTEGER            IWORK( * )
 *       DOUBLE PRECISION   A( LDA, * ), WORK( * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -108493,12 +108944,12 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date November 2011
+*> \date December 2016
 *
 *> \ingroup doublePOcomputational
 *
@@ -108506,10 +108957,10 @@
       SUBROUTINE DPOCON( UPLO, N, A, LDA, ANORM, RCOND, WORK, IWORK,
      $                   INFO )
 *
-*  -- LAPACK computational routine (version 3.4.0) --
+*  -- LAPACK computational routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     November 2011
+*     December 2016
 *
 *     .. Scalar Arguments ..
       CHARACTER          UPLO
@@ -108640,24 +109091,24 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DPOEQU + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dpoequ.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dpoequ.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dpoequ.f"> 
+*> Download DPOEQU + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dpoequ.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dpoequ.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dpoequ.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       SUBROUTINE DPOEQU( N, A, LDA, S, SCOND, AMAX, INFO )
-* 
+*
 *       .. Scalar Arguments ..
 *       INTEGER            INFO, LDA, N
 *       DOUBLE PRECISION   AMAX, SCOND
@@ -108665,7 +109116,7 @@
 *       .. Array Arguments ..
 *       DOUBLE PRECISION   A( LDA, * ), S( * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -108738,22 +109189,22 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date November 2011
+*> \date December 2016
 *
 *> \ingroup doublePOcomputational
 *
 *  =====================================================================
       SUBROUTINE DPOEQU( N, A, LDA, S, SCOND, AMAX, INFO )
 *
-*  -- LAPACK computational routine (version 3.4.0) --
+*  -- LAPACK computational routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     November 2011
+*     December 2016
 *
 *     .. Scalar Arguments ..
       INTEGER            INFO, LDA, N
@@ -108845,24 +109296,24 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DPOEQUB + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dpoequb.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dpoequb.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dpoequb.f"> 
+*> Download DPOEQUB + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dpoequb.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dpoequb.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dpoequb.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       SUBROUTINE DPOEQUB( N, A, LDA, S, SCOND, AMAX, INFO )
-* 
+*
 *       .. Scalar Arguments ..
 *       INTEGER            INFO, LDA, N
 *       DOUBLE PRECISION   AMAX, SCOND
@@ -108870,14 +109321,14 @@
 *       .. Array Arguments ..
 *       DOUBLE PRECISION   A( LDA, * ), S( * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
 *>
 *> \verbatim
 *>
-*> DPOEQU computes row and column scalings intended to equilibrate a
+*> DPOEQUB computes row and column scalings intended to equilibrate a
 *> symmetric positive definite matrix A and reduce its condition number
 *> (with respect to the two-norm).  S contains the scale factors,
 *> S(i) = 1/sqrt(A(i,i)), chosen so that the scaled matrix B with
@@ -108885,6 +109336,12 @@
 *> choice of S puts the condition number of B within a factor N of the
 *> smallest possible condition number over all possible diagonal
 *> scalings.
+*>
+*> This routine differs from DPOEQU by restricting the scaling factors
+*> to a power of the radix.  Barring over- and underflow, scaling by
+*> these factors introduces no additional rounding errors.  However, the
+*> scaled diagonal entries are no longer approximately 1 but lie
+*> between sqrt(radix) and 1/sqrt(radix).
 *> \endverbatim
 *
 *  Arguments:
@@ -108943,22 +109400,22 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date November 2011
+*> \date December 2016
 *
 *> \ingroup doublePOcomputational
 *
 *  =====================================================================
       SUBROUTINE DPOEQUB( N, A, LDA, S, SCOND, AMAX, INFO )
 *
-*  -- LAPACK computational routine (version 3.4.0) --
+*  -- LAPACK computational routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     November 2011
+*     December 2016
 *
 *     .. Scalar Arguments ..
       INTEGER            INFO, LDA, N
@@ -109060,25 +109517,25 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DPORFS + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dporfs.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dporfs.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dporfs.f"> 
+*> Download DPORFS + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dporfs.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dporfs.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dporfs.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       SUBROUTINE DPORFS( UPLO, N, NRHS, A, LDA, AF, LDAF, B, LDB, X,
 *                          LDX, FERR, BERR, WORK, IWORK, INFO )
-* 
+*
 *       .. Scalar Arguments ..
 *       CHARACTER          UPLO
 *       INTEGER            INFO, LDA, LDAF, LDB, LDX, N, NRHS
@@ -109088,7 +109545,7 @@
 *       DOUBLE PRECISION   A( LDA, * ), AF( LDAF, * ), B( LDB, * ),
 *      $                   BERR( * ), FERR( * ), WORK( * ), X( LDX, * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -109228,12 +109685,12 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date November 2011
+*> \date December 2016
 *
 *> \ingroup doublePOcomputational
 *
@@ -109241,10 +109698,10 @@
       SUBROUTINE DPORFS( UPLO, N, NRHS, A, LDA, AF, LDAF, B, LDB, X,
      $                   LDX, FERR, BERR, WORK, IWORK, INFO )
 *
-*  -- LAPACK computational routine (version 3.4.0) --
+*  -- LAPACK computational routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     November 2011
+*     December 2016
 *
 *     .. Scalar Arguments ..
       CHARACTER          UPLO
@@ -109490,24 +109947,24 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DPOSV + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dposv.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dposv.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dposv.f"> 
+*> Download DPOSV + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dposv.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dposv.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dposv.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       SUBROUTINE DPOSV( UPLO, N, NRHS, A, LDA, B, LDB, INFO )
-* 
+*
 *       .. Scalar Arguments ..
 *       CHARACTER          UPLO
 *       INTEGER            INFO, LDA, LDB, N, NRHS
@@ -109515,7 +109972,7 @@
 *       .. Array Arguments ..
 *       DOUBLE PRECISION   A( LDA, * ), B( LDB, * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -109606,22 +110063,22 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date November 2011
+*> \date December 2016
 *
 *> \ingroup doublePOsolve
 *
 *  =====================================================================
       SUBROUTINE DPOSV( UPLO, N, NRHS, A, LDA, B, LDB, INFO )
 *
-*  -- LAPACK driver routine (version 3.4.0) --
+*  -- LAPACK driver routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     November 2011
+*     December 2016
 *
 *     .. Scalar Arguments ..
       CHARACTER          UPLO
@@ -109683,18 +110140,18 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DPOSVX + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dposvx.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dposvx.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dposvx.f"> 
+*> Download DPOSVX + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dposvx.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dposvx.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dposvx.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
@@ -109702,7 +110159,7 @@
 *       SUBROUTINE DPOSVX( FACT, UPLO, N, NRHS, A, LDA, AF, LDAF, EQUED,
 *                          S, B, LDB, X, LDX, RCOND, FERR, BERR, WORK,
 *                          IWORK, INFO )
-* 
+*
 *       .. Scalar Arguments ..
 *       CHARACTER          EQUED, FACT, UPLO
 *       INTEGER            INFO, LDA, LDAF, LDB, LDX, N, NRHS
@@ -109714,7 +110171,7 @@
 *      $                   BERR( * ), FERR( * ), S( * ), WORK( * ),
 *      $                   X( LDX, * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -109974,10 +110431,10 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
 *> \date April 2012
 *
@@ -109988,7 +110445,7 @@
      $                   S, B, LDB, X, LDX, RCOND, FERR, BERR, WORK,
      $                   IWORK, INFO )
 *
-*  -- LAPACK driver routine (version 3.4.1) --
+*  -- LAPACK driver routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
 *     April 2012
@@ -110177,24 +110634,24 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DPOTF2 + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dpotf2.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dpotf2.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dpotf2.f"> 
+*> Download DPOTF2 + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dpotf2.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dpotf2.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dpotf2.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       SUBROUTINE DPOTF2( UPLO, N, A, LDA, INFO )
-* 
+*
 *       .. Scalar Arguments ..
 *       CHARACTER          UPLO
 *       INTEGER            INFO, LDA, N
@@ -110202,7 +110659,7 @@
 *       .. Array Arguments ..
 *       DOUBLE PRECISION   A( LDA, * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -110272,22 +110729,22 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date September 2012
+*> \date December 2016
 *
 *> \ingroup doublePOcomputational
 *
 *  =====================================================================
       SUBROUTINE DPOTF2( UPLO, N, A, LDA, INFO )
 *
-*  -- LAPACK computational routine (version 3.4.2) --
+*  -- LAPACK computational routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     September 2012
+*     December 2016
 *
 *     .. Scalar Arguments ..
       CHARACTER          UPLO
@@ -110407,24 +110864,24 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DPOTRF + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dpotrf.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dpotrf.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dpotrf.f"> 
+*> Download DPOTRF + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dpotrf.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dpotrf.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dpotrf.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       SUBROUTINE DPOTRF( UPLO, N, A, LDA, INFO )
-* 
+*
 *       .. Scalar Arguments ..
 *       CHARACTER          UPLO
 *       INTEGER            INFO, LDA, N
@@ -110432,7 +110889,7 @@
 *       .. Array Arguments ..
 *       DOUBLE PRECISION   A( LDA, * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -110500,22 +110957,22 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date November 2011
+*> \date December 2016
 *
 *> \ingroup doublePOcomputational
 *
 *  =====================================================================
       SUBROUTINE DPOTRF( UPLO, N, A, LDA, INFO )
 *
-*  -- LAPACK computational routine (version 3.4.0) --
+*  -- LAPACK computational routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     November 2011
+*     December 2016
 *
 *     .. Scalar Arguments ..
       CHARACTER          UPLO
@@ -110541,7 +110998,7 @@
       EXTERNAL           LSAME, ILAENV
 *     ..
 *     .. External Subroutines ..
-      EXTERNAL           DGEMM, DPOTF2, DSYRK, DTRSM, XERBLA
+      EXTERNAL           DGEMM, DPOTRF2, DSYRK, DTRSM, XERBLA
 *     ..
 *     .. Intrinsic Functions ..
       INTRINSIC          MAX, MIN
@@ -110576,7 +111033,7 @@
 *
 *        Use unblocked code.
 *
-         CALL DPOTF2( UPLO, N, A, LDA, INFO )
+         CALL DPOTRF2( UPLO, N, A, LDA, INFO )
       ELSE
 *
 *        Use blocked code.
@@ -110593,7 +111050,7 @@
                JB = MIN( NB, N-J+1 )
                CALL DSYRK( 'Upper', 'Transpose', JB, J-1, -ONE,
      $                     A( 1, J ), LDA, ONE, A( J, J ), LDA )
-               CALL DPOTF2( 'Upper', JB, A( J, J ), LDA, INFO )
+               CALL DPOTRF2( 'Upper', JB, A( J, J ), LDA, INFO )
                IF( INFO.NE.0 )
      $            GO TO 30
                IF( J+JB.LE.N ) THEN
@@ -110621,7 +111078,7 @@
                JB = MIN( NB, N-J+1 )
                CALL DSYRK( 'Lower', 'No transpose', JB, J-1, -ONE,
      $                     A( J, 1 ), LDA, ONE, A( J, J ), LDA )
-               CALL DPOTF2( 'Lower', JB, A( J, J ), LDA, INFO )
+               CALL DPOTRF2( 'Lower', JB, A( J, J ), LDA, INFO )
                IF( INFO.NE.0 )
      $            GO TO 30
                IF( J+JB.LE.N ) THEN
@@ -110649,28 +111106,265 @@
 *     End of DPOTRF
 *
       END
+*> \brief \b DPOTRF2
+*
+*  =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
+*
+*  Definition:
+*  ===========
+*
+*       RECURSIVE SUBROUTINE DPOTRF2( UPLO, N, A, LDA, INFO )
+*
+*       .. Scalar Arguments ..
+*       CHARACTER          UPLO
+*       INTEGER            INFO, LDA, N
+*       ..
+*       .. Array Arguments ..
+*       REAL               A( LDA, * )
+*       ..
+*
+*
+*> \par Purpose:
+*  =============
+*>
+*> \verbatim
+*>
+*> DPOTRF2 computes the Cholesky factorization of a real symmetric
+*> positive definite matrix A using the recursive algorithm.
+*>
+*> The factorization has the form
+*>    A = U**T * U,  if UPLO = 'U', or
+*>    A = L  * L**T,  if UPLO = 'L',
+*> where U is an upper triangular matrix and L is lower triangular.
+*>
+*> This is the recursive version of the algorithm. It divides
+*> the matrix into four submatrices:
+*>
+*>        [  A11 | A12  ]  where A11 is n1 by n1 and A22 is n2 by n2
+*>    A = [ -----|----- ]  with n1 = n/2
+*>        [  A21 | A22  ]       n2 = n-n1
+*>
+*> The subroutine calls itself to factor A11. Update and scale A21
+*> or A12, update A22 then calls itself to factor A22.
+*>
+*> \endverbatim
+*
+*  Arguments:
+*  ==========
+*
+*> \param[in] UPLO
+*> \verbatim
+*>          UPLO is CHARACTER*1
+*>          = 'U':  Upper triangle of A is stored;
+*>          = 'L':  Lower triangle of A is stored.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*>          N is INTEGER
+*>          The order of the matrix A.  N >= 0.
+*> \endverbatim
+*>
+*> \param[in,out] A
+*> \verbatim
+*>          A is DOUBLE PRECISION array, dimension (LDA,N)
+*>          On entry, the symmetric matrix A.  If UPLO = 'U', the leading
+*>          N-by-N upper triangular part of A contains the upper
+*>          triangular part of the matrix A, and the strictly lower
+*>          triangular part of A is not referenced.  If UPLO = 'L', the
+*>          leading N-by-N lower triangular part of A contains the lower
+*>          triangular part of the matrix A, and the strictly upper
+*>          triangular part of A is not referenced.
+*>
+*>          On exit, if INFO = 0, the factor U or L from the Cholesky
+*>          factorization A = U**T*U or A = L*L**T.
+*> \endverbatim
+*>
+*> \param[in] LDA
+*> \verbatim
+*>          LDA is INTEGER
+*>          The leading dimension of the array A.  LDA >= max(1,N).
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*>          INFO is INTEGER
+*>          = 0:  successful exit
+*>          < 0:  if INFO = -i, the i-th argument had an illegal value
+*>          > 0:  if INFO = i, the leading minor of order i is not
+*>                positive definite, and the factorization could not be
+*>                completed.
+*> \endverbatim
+*
+*  Authors:
+*  ========
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date December 2016
+*
+*> \ingroup doublePOcomputational
+*
+*  =====================================================================
+      RECURSIVE SUBROUTINE DPOTRF2( UPLO, N, A, LDA, INFO )
+*
+*  -- LAPACK computational routine (version 3.7.0) --
+*  -- LAPACK is a software package provided by Univ. of Tennessee,    --
+*  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+*     December 2016
+*
+*     .. Scalar Arguments ..
+      CHARACTER          UPLO
+      INTEGER            INFO, LDA, N
+*     ..
+*     .. Array Arguments ..
+      DOUBLE PRECISION   A( LDA, * )
+*     ..
+*
+*  =====================================================================
+*
+*     .. Parameters ..
+      DOUBLE PRECISION   ONE, ZERO
+      PARAMETER          ( ONE = 1.0D+0, ZERO = 0.0D+0 )
+*     ..
+*     .. Local Scalars ..
+      LOGICAL            UPPER
+      INTEGER            N1, N2, IINFO
+*     ..
+*     .. External Functions ..
+      LOGICAL            LSAME, DISNAN
+      EXTERNAL           LSAME, DISNAN
+*     ..
+*     .. External Subroutines ..
+      EXTERNAL           DSYRK, DTRSM, XERBLA
+*     ..
+*     .. Intrinsic Functions ..
+      INTRINSIC          MAX, SQRT
+*     ..
+*     .. Executable Statements ..
+*
+*     Test the input parameters
+*
+      INFO = 0
+      UPPER = LSAME( UPLO, 'U' )
+      IF( .NOT.UPPER .AND. .NOT.LSAME( UPLO, 'L' ) ) THEN
+         INFO = -1
+      ELSE IF( N.LT.0 ) THEN
+         INFO = -2
+      ELSE IF( LDA.LT.MAX( 1, N ) ) THEN
+         INFO = -4
+      END IF
+      IF( INFO.NE.0 ) THEN
+         CALL XERBLA( 'DPOTRF2', -INFO )
+         RETURN
+      END IF
+*
+*     Quick return if possible
+*
+      IF( N.EQ.0 )
+     $   RETURN
+*
+*     N=1 case
+*
+      IF( N.EQ.1 ) THEN
+*
+*        Test for non-positive-definiteness
+*
+         IF( A( 1, 1 ).LE.ZERO.OR.DISNAN( A( 1, 1 ) ) ) THEN
+            INFO = 1
+            RETURN
+         END IF
+*
+*        Factor
+*
+         A( 1, 1 ) = SQRT( A( 1, 1 ) )
+*
+*     Use recursive code
+*
+      ELSE
+         N1 = N/2
+         N2 = N-N1
+*
+*        Factor A11
+*
+         CALL DPOTRF2( UPLO, N1, A( 1, 1 ), LDA, IINFO )
+         IF ( IINFO.NE.0 ) THEN
+            INFO = IINFO
+            RETURN
+         END IF
+*
+*        Compute the Cholesky factorization A = U**T*U
+*
+         IF( UPPER ) THEN
+*
+*           Update and scale A12
+*
+            CALL DTRSM( 'L', 'U', 'T', 'N', N1, N2, ONE,
+     $                  A( 1, 1 ), LDA, A( 1, N1+1 ), LDA )
+*
+*           Update and factor A22
+*
+            CALL DSYRK( UPLO, 'T', N2, N1, -ONE, A( 1, N1+1 ), LDA,
+     $                  ONE, A( N1+1, N1+1 ), LDA )
+            CALL DPOTRF2( UPLO, N2, A( N1+1, N1+1 ), LDA, IINFO )
+            IF ( IINFO.NE.0 ) THEN
+               INFO = IINFO + N1
+               RETURN
+            END IF
+*
+*        Compute the Cholesky factorization A = L*L**T
+*
+         ELSE
+*
+*           Update and scale A21
+*
+            CALL DTRSM( 'R', 'L', 'T', 'N', N2, N1, ONE,
+     $                  A( 1, 1 ), LDA, A( N1+1, 1 ), LDA )
+*
+*           Update and factor A22
+*
+            CALL DSYRK( UPLO, 'N', N2, N1, -ONE, A( N1+1, 1 ), LDA,
+     $                  ONE, A( N1+1, N1+1 ), LDA )
+            CALL DPOTRF2( UPLO, N2, A( N1+1, N1+1 ), LDA, IINFO )
+            IF ( IINFO.NE.0 ) THEN
+               INFO = IINFO + N1
+               RETURN
+            END IF
+         END IF
+      END IF
+      RETURN
+*
+*     End of DPOTRF2
+*
+      END
 *> \brief \b DPOTRI
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DPOTRI + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dpotri.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dpotri.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dpotri.f"> 
+*> Download DPOTRI + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dpotri.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dpotri.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dpotri.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       SUBROUTINE DPOTRI( UPLO, N, A, LDA, INFO )
-* 
+*
 *       .. Scalar Arguments ..
 *       CHARACTER          UPLO
 *       INTEGER            INFO, LDA, N
@@ -110678,7 +111372,7 @@
 *       .. Array Arguments ..
 *       DOUBLE PRECISION   A( LDA, * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -110734,22 +111428,22 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date November 2011
+*> \date December 2016
 *
 *> \ingroup doublePOcomputational
 *
 *  =====================================================================
       SUBROUTINE DPOTRI( UPLO, N, A, LDA, INFO )
 *
-*  -- LAPACK computational routine (version 3.4.0) --
+*  -- LAPACK computational routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     November 2011
+*     December 2016
 *
 *     .. Scalar Arguments ..
       CHARACTER          UPLO
@@ -110812,24 +111506,24 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DPOTRS + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dpotrs.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dpotrs.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dpotrs.f"> 
+*> Download DPOTRS + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dpotrs.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dpotrs.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dpotrs.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       SUBROUTINE DPOTRS( UPLO, N, NRHS, A, LDA, B, LDB, INFO )
-* 
+*
 *       .. Scalar Arguments ..
 *       CHARACTER          UPLO
 *       INTEGER            INFO, LDA, LDB, N, NRHS
@@ -110837,7 +111531,7 @@
 *       .. Array Arguments ..
 *       DOUBLE PRECISION   A( LDA, * ), B( LDB, * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -110908,22 +111602,22 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date November 2011
+*> \date December 2016
 *
 *> \ingroup doublePOcomputational
 *
 *  =====================================================================
       SUBROUTINE DPOTRS( UPLO, N, NRHS, A, LDA, B, LDB, INFO )
 *
-*  -- LAPACK computational routine (version 3.4.0) --
+*  -- LAPACK computational routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     November 2011
+*     December 2016
 *
 *     .. Scalar Arguments ..
       CHARACTER          UPLO
@@ -111016,24 +111710,24 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DPPCON + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dppcon.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dppcon.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dppcon.f"> 
+*> Download DPPCON + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dppcon.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dppcon.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dppcon.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       SUBROUTINE DPPCON( UPLO, N, AP, ANORM, RCOND, WORK, IWORK, INFO )
-* 
+*
 *       .. Scalar Arguments ..
 *       CHARACTER          UPLO
 *       INTEGER            INFO, N
@@ -111043,7 +111737,7 @@
 *       INTEGER            IWORK( * )
 *       DOUBLE PRECISION   AP( * ), WORK( * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -111120,22 +111814,22 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date November 2011
+*> \date December 2016
 *
 *> \ingroup doubleOTHERcomputational
 *
 *  =====================================================================
       SUBROUTINE DPPCON( UPLO, N, AP, ANORM, RCOND, WORK, IWORK, INFO )
 *
-*  -- LAPACK computational routine (version 3.4.0) --
+*  -- LAPACK computational routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     November 2011
+*     December 2016
 *
 *     .. Scalar Arguments ..
       CHARACTER          UPLO
@@ -111264,24 +111958,24 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DPPEQU + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dppequ.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dppequ.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dppequ.f"> 
+*> Download DPPEQU + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dppequ.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dppequ.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dppequ.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       SUBROUTINE DPPEQU( UPLO, N, AP, S, SCOND, AMAX, INFO )
-* 
+*
 *       .. Scalar Arguments ..
 *       CHARACTER          UPLO
 *       INTEGER            INFO, N
@@ -111290,7 +111984,7 @@
 *       .. Array Arguments ..
 *       DOUBLE PRECISION   AP( * ), S( * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -111366,22 +112060,22 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date November 2011
+*> \date December 2016
 *
 *> \ingroup doubleOTHERcomputational
 *
 *  =====================================================================
       SUBROUTINE DPPEQU( UPLO, N, AP, S, SCOND, AMAX, INFO )
 *
-*  -- LAPACK computational routine (version 3.4.0) --
+*  -- LAPACK computational routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     November 2011
+*     December 2016
 *
 *     .. Scalar Arguments ..
       CHARACTER          UPLO
@@ -111502,25 +112196,25 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DPPRFS + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dpprfs.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dpprfs.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dpprfs.f"> 
+*> Download DPPRFS + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dpprfs.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dpprfs.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dpprfs.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       SUBROUTINE DPPRFS( UPLO, N, NRHS, AP, AFP, B, LDB, X, LDX, FERR,
 *                          BERR, WORK, IWORK, INFO )
-* 
+*
 *       .. Scalar Arguments ..
 *       CHARACTER          UPLO
 *       INTEGER            INFO, LDB, LDX, N, NRHS
@@ -111530,7 +112224,7 @@
 *       DOUBLE PRECISION   AFP( * ), AP( * ), B( LDB, * ), BERR( * ),
 *      $                   FERR( * ), WORK( * ), X( LDX, * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -111658,12 +112352,12 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date November 2011
+*> \date December 2016
 *
 *> \ingroup doubleOTHERcomputational
 *
@@ -111671,10 +112365,10 @@
       SUBROUTINE DPPRFS( UPLO, N, NRHS, AP, AFP, B, LDB, X, LDX, FERR,
      $                   BERR, WORK, IWORK, INFO )
 *
-*  -- LAPACK computational routine (version 3.4.0) --
+*  -- LAPACK computational routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     November 2011
+*     December 2016
 *
 *     .. Scalar Arguments ..
       CHARACTER          UPLO
@@ -111923,24 +112617,24 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DPPSV + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dppsv.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dppsv.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dppsv.f"> 
+*> Download DPPSV + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dppsv.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dppsv.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dppsv.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       SUBROUTINE DPPSV( UPLO, N, NRHS, AP, B, LDB, INFO )
-* 
+*
 *       .. Scalar Arguments ..
 *       CHARACTER          UPLO
 *       INTEGER            INFO, LDB, N, NRHS
@@ -111948,7 +112642,7 @@
 *       .. Array Arguments ..
 *       DOUBLE PRECISION   AP( * ), B( LDB, * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -112033,12 +112727,12 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date November 2011
+*> \date December 2016
 *
 *> \ingroup doubleOTHERsolve
 *
@@ -112065,10 +112759,10 @@
 *  =====================================================================
       SUBROUTINE DPPSV( UPLO, N, NRHS, AP, B, LDB, INFO )
 *
-*  -- LAPACK driver routine (version 3.4.0) --
+*  -- LAPACK driver routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     November 2011
+*     December 2016
 *
 *     .. Scalar Arguments ..
       CHARACTER          UPLO
@@ -112128,25 +112822,25 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DPPSVX + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dppsvx.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dppsvx.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dppsvx.f"> 
+*> Download DPPSVX + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dppsvx.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dppsvx.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dppsvx.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       SUBROUTINE DPPSVX( FACT, UPLO, N, NRHS, AP, AFP, EQUED, S, B, LDB,
 *                          X, LDX, RCOND, FERR, BERR, WORK, IWORK, INFO )
-* 
+*
 *       .. Scalar Arguments ..
 *       CHARACTER          EQUED, FACT, UPLO
 *       INTEGER            INFO, LDB, LDX, N, NRHS
@@ -112157,7 +112851,7 @@
 *       DOUBLE PRECISION   AFP( * ), AP( * ), B( LDB, * ), BERR( * ),
 *      $                   FERR( * ), S( * ), WORK( * ), X( LDX, * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -112405,10 +113099,10 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
 *> \date April 2012
 *
@@ -112438,7 +113132,7 @@
       SUBROUTINE DPPSVX( FACT, UPLO, N, NRHS, AP, AFP, EQUED, S, B, LDB,
      $                   X, LDX, RCOND, FERR, BERR, WORK, IWORK, INFO )
 *
-*  -- LAPACK driver routine (version 3.4.1) --
+*  -- LAPACK driver routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
 *     April 2012
@@ -112622,24 +113316,24 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DPPTRF + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dpptrf.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dpptrf.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dpptrf.f"> 
+*> Download DPPTRF + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dpptrf.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dpptrf.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dpptrf.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       SUBROUTINE DPPTRF( UPLO, N, AP, INFO )
-* 
+*
 *       .. Scalar Arguments ..
 *       CHARACTER          UPLO
 *       INTEGER            INFO, N
@@ -112647,7 +113341,7 @@
 *       .. Array Arguments ..
 *       DOUBLE PRECISION   AP( * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -112707,12 +113401,12 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date November 2011
+*> \date December 2016
 *
 *> \ingroup doubleOTHERcomputational
 *
@@ -112739,10 +113433,10 @@
 *  =====================================================================
       SUBROUTINE DPPTRF( UPLO, N, AP, INFO )
 *
-*  -- LAPACK computational routine (version 3.4.0) --
+*  -- LAPACK computational routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     November 2011
+*     December 2016
 *
 *     .. Scalar Arguments ..
       CHARACTER          UPLO
@@ -112862,24 +113556,24 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DPPTRI + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dpptri.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dpptri.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dpptri.f"> 
+*> Download DPPTRI + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dpptri.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dpptri.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dpptri.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       SUBROUTINE DPPTRI( UPLO, N, AP, INFO )
-* 
+*
 *       .. Scalar Arguments ..
 *       CHARACTER          UPLO
 *       INTEGER            INFO, N
@@ -112887,7 +113581,7 @@
 *       .. Array Arguments ..
 *       DOUBLE PRECISION   AP( * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -112941,22 +113635,22 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date November 2011
+*> \date December 2016
 *
 *> \ingroup doubleOTHERcomputational
 *
 *  =====================================================================
       SUBROUTINE DPPTRI( UPLO, N, AP, INFO )
 *
-*  -- LAPACK computational routine (version 3.4.0) --
+*  -- LAPACK computational routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     November 2011
+*     December 2016
 *
 *     .. Scalar Arguments ..
       CHARACTER          UPLO
@@ -113050,24 +113744,24 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DPPTRS + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dpptrs.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dpptrs.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dpptrs.f"> 
+*> Download DPPTRS + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dpptrs.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dpptrs.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dpptrs.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       SUBROUTINE DPPTRS( UPLO, N, NRHS, AP, B, LDB, INFO )
-* 
+*
 *       .. Scalar Arguments ..
 *       CHARACTER          UPLO
 *       INTEGER            INFO, LDB, N, NRHS
@@ -113075,7 +113769,7 @@
 *       .. Array Arguments ..
 *       DOUBLE PRECISION   AP( * ), B( LDB, * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -113144,22 +113838,22 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date November 2011
+*> \date December 2016
 *
 *> \ingroup doubleOTHERcomputational
 *
 *  =====================================================================
       SUBROUTINE DPPTRS( UPLO, N, NRHS, AP, B, LDB, INFO )
 *
-*  -- LAPACK computational routine (version 3.4.0) --
+*  -- LAPACK computational routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     November 2011
+*     December 2016
 *
 *     .. Scalar Arguments ..
       CHARACTER          UPLO
@@ -113249,28 +113943,28 @@
 *     End of DPPTRS
 *
       END
-*> \brief \b DPSTF2 computes the Cholesky factorization with complete pivoting of a real symmetric or complex Hermitian positive semi-definite matrix.
+*> \brief \b DPSTF2 computes the Cholesky factorization with complete pivoting of a real symmetric positive semidefinite matrix.
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DPSTF2 + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dpstf2.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dpstf2.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dpstf2.f"> 
+*> Download DPSTF2 + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dpstf2.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dpstf2.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dpstf2.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       SUBROUTINE DPSTF2( UPLO, N, A, LDA, PIV, RANK, TOL, WORK, INFO )
-* 
+*
 *       .. Scalar Arguments ..
 *       DOUBLE PRECISION   TOL
 *       INTEGER            INFO, LDA, N, RANK
@@ -113280,7 +113974,7 @@
 *       DOUBLE PRECISION   A( LDA, * ), WORK( 2*N )
 *       INTEGER            PIV( N )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -113372,29 +114066,30 @@
 *>          < 0: If INFO = -K, the K-th argument had an illegal value,
 *>          = 0: algorithm completed successfully, and
 *>          > 0: the matrix A is either rank deficient with computed rank
-*>               as returned in RANK, or is indefinite.  See Section 7 of
-*>               LAPACK Working Note #161 for further information.
+*>               as returned in RANK, or is not positive semidefinite. See
+*>               Section 7 of LAPACK Working Note #161 for further
+*>               information.
 *> \endverbatim
 *
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date September 2012
+*> \date December 2016
 *
 *> \ingroup doubleOTHERcomputational
 *
 *  =====================================================================
       SUBROUTINE DPSTF2( UPLO, N, A, LDA, PIV, RANK, TOL, WORK, INFO )
 *
-*  -- LAPACK computational routine (version 3.4.2) --
+*  -- LAPACK computational routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     September 2012
+*     December 2016
 *
 *     .. Scalar Arguments ..
       DOUBLE PRECISION   TOL
@@ -113467,7 +114162,7 @@
             AJJ = A( PVT, PVT )
          END IF
       END DO
-      IF( AJJ.EQ.ZERO.OR.DISNAN( AJJ ) ) THEN
+      IF( AJJ.LE.ZERO.OR.DISNAN( AJJ ) ) THEN
          RANK = 0
          INFO = 1
          GO TO 170
@@ -113634,28 +114329,29 @@
 *     End of DPSTF2
 *
       END
-*> \brief \b DPSTRF
+*> \brief \b DPSTRF computes the Cholesky factorization with complete pivoting of a real symmetric positive semidefinite matrix.
+*
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DPSTRF + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dpstrf.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dpstrf.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dpstrf.f"> 
+*> Download DPSTRF + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dpstrf.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dpstrf.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dpstrf.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       SUBROUTINE DPSTRF( UPLO, N, A, LDA, PIV, RANK, TOL, WORK, INFO )
-* 
+*
 *       .. Scalar Arguments ..
 *       DOUBLE PRECISION   TOL
 *       INTEGER            INFO, LDA, N, RANK
@@ -113665,7 +114361,7 @@
 *       DOUBLE PRECISION   A( LDA, * ), WORK( 2*N )
 *       INTEGER            PIV( N )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -113757,29 +114453,30 @@
 *>          < 0: If INFO = -K, the K-th argument had an illegal value,
 *>          = 0: algorithm completed successfully, and
 *>          > 0: the matrix A is either rank deficient with computed rank
-*>               as returned in RANK, or is indefinite.  See Section 7 of
-*>               LAPACK Working Note #161 for further information.
+*>               as returned in RANK, or is not positive semidefinite. See
+*>               Section 7 of LAPACK Working Note #161 for further
+*>               information.
 *> \endverbatim
 *
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date November 2011
+*> \date December 2016
 *
 *> \ingroup doubleOTHERcomputational
 *
 *  =====================================================================
       SUBROUTINE DPSTRF( UPLO, N, A, LDA, PIV, RANK, TOL, WORK, INFO )
 *
-*  -- LAPACK computational routine (version 3.4.0) --
+*  -- LAPACK computational routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     November 2011
+*     December 2016
 *
 *     .. Scalar Arguments ..
       DOUBLE PRECISION   TOL
@@ -113866,7 +114563,7 @@
                AJJ = A( PVT, PVT )
             END IF
          END DO
-         IF( AJJ.EQ.ZERO.OR.DISNAN( AJJ ) ) THEN
+         IF( AJJ.LE.ZERO.OR.DISNAN( AJJ ) ) THEN
             RANK = 0
             INFO = 1
             GO TO 200
@@ -114081,24 +114778,24 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DPTCON + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dptcon.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dptcon.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dptcon.f"> 
+*> Download DPTCON + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dptcon.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dptcon.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dptcon.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       SUBROUTINE DPTCON( N, D, E, ANORM, RCOND, WORK, INFO )
-* 
+*
 *       .. Scalar Arguments ..
 *       INTEGER            INFO, N
 *       DOUBLE PRECISION   ANORM, RCOND
@@ -114106,7 +114803,7 @@
 *       .. Array Arguments ..
 *       DOUBLE PRECISION   D( * ), E( * ), WORK( * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -114175,12 +114872,12 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date September 2012
+*> \date December 2016
 *
 *> \ingroup doublePTcomputational
 *
@@ -114197,10 +114894,10 @@
 *  =====================================================================
       SUBROUTINE DPTCON( N, D, E, ANORM, RCOND, WORK, INFO )
 *
-*  -- LAPACK computational routine (version 3.4.2) --
+*  -- LAPACK computational routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     September 2012
+*     December 2016
 *
 *     .. Scalar Arguments ..
       INTEGER            INFO, N
@@ -114302,24 +114999,24 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DPTEQR + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dpteqr.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dpteqr.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dpteqr.f"> 
+*> Download DPTEQR + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dpteqr.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dpteqr.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dpteqr.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       SUBROUTINE DPTEQR( COMPZ, N, D, E, Z, LDZ, WORK, INFO )
-* 
+*
 *       .. Scalar Arguments ..
 *       CHARACTER          COMPZ
 *       INTEGER            INFO, LDZ, N
@@ -114327,7 +115024,7 @@
 *       .. Array Arguments ..
 *       DOUBLE PRECISION   D( * ), E( * ), WORK( * ), Z( LDZ, * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -114433,22 +115130,22 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date September 2012
+*> \date December 2016
 *
 *> \ingroup doublePTcomputational
 *
 *  =====================================================================
       SUBROUTINE DPTEQR( COMPZ, N, D, E, Z, LDZ, WORK, INFO )
 *
-*  -- LAPACK computational routine (version 3.4.2) --
+*  -- LAPACK computational routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     September 2012
+*     December 2016
 *
 *     .. Scalar Arguments ..
       CHARACTER          COMPZ
@@ -114563,25 +115260,25 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DPTRFS + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dptrfs.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dptrfs.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dptrfs.f"> 
+*> Download DPTRFS + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dptrfs.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dptrfs.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dptrfs.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       SUBROUTINE DPTRFS( N, NRHS, D, E, DF, EF, B, LDB, X, LDX, FERR,
 *                          BERR, WORK, INFO )
-* 
+*
 *       .. Scalar Arguments ..
 *       INTEGER            INFO, LDB, LDX, N, NRHS
 *       ..
@@ -114590,7 +115287,7 @@
 *      $                   E( * ), EF( * ), FERR( * ), WORK( * ),
 *      $                   X( LDX, * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -114711,12 +115408,12 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date September 2012
+*> \date December 2016
 *
 *> \ingroup doublePTcomputational
 *
@@ -114724,10 +115421,10 @@
       SUBROUTINE DPTRFS( N, NRHS, D, E, DF, EF, B, LDB, X, LDX, FERR,
      $                   BERR, WORK, INFO )
 *
-*  -- LAPACK computational routine (version 3.4.2) --
+*  -- LAPACK computational routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     September 2012
+*     December 2016
 *
 *     .. Scalar Arguments ..
       INTEGER            INFO, LDB, LDX, N, NRHS
@@ -114958,31 +115655,31 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DPTSV + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dptsv.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dptsv.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dptsv.f"> 
+*> Download DPTSV + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dptsv.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dptsv.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dptsv.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       SUBROUTINE DPTSV( N, NRHS, D, E, B, LDB, INFO )
-* 
+*
 *       .. Scalar Arguments ..
 *       INTEGER            INFO, LDB, N, NRHS
 *       ..
 *       .. Array Arguments ..
 *       DOUBLE PRECISION   B( LDB, * ), D( * ), E( * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -115058,22 +115755,22 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date September 2012
+*> \date December 2016
 *
 *> \ingroup doublePTsolve
 *
 *  =====================================================================
       SUBROUTINE DPTSV( N, NRHS, D, E, B, LDB, INFO )
 *
-*  -- LAPACK driver routine (version 3.4.2) --
+*  -- LAPACK driver routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     September 2012
+*     December 2016
 *
 *     .. Scalar Arguments ..
       INTEGER            INFO, LDB, N, NRHS
@@ -115125,25 +115822,25 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DPTSVX + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dptsvx.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dptsvx.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dptsvx.f"> 
+*> Download DPTSVX + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dptsvx.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dptsvx.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dptsvx.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       SUBROUTINE DPTSVX( FACT, N, NRHS, D, E, DF, EF, B, LDB, X, LDX,
 *                          RCOND, FERR, BERR, WORK, INFO )
-* 
+*
 *       .. Scalar Arguments ..
 *       CHARACTER          FACT
 *       INTEGER            INFO, LDB, LDX, N, NRHS
@@ -115154,7 +115851,7 @@
 *      $                   E( * ), EF( * ), FERR( * ), WORK( * ),
 *      $                   X( LDX, * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -115338,12 +116035,12 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date September 2012
+*> \date December 2016
 *
 *> \ingroup doublePTsolve
 *
@@ -115351,10 +116048,10 @@
       SUBROUTINE DPTSVX( FACT, N, NRHS, D, E, DF, EF, B, LDB, X, LDX,
      $                   RCOND, FERR, BERR, WORK, INFO )
 *
-*  -- LAPACK driver routine (version 3.4.2) --
+*  -- LAPACK driver routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     September 2012
+*     December 2016
 *
 *     .. Scalar Arguments ..
       CHARACTER          FACT
@@ -115461,31 +116158,31 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DPTTRF + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dpttrf.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dpttrf.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dpttrf.f"> 
+*> Download DPTTRF + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dpttrf.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dpttrf.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dpttrf.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       SUBROUTINE DPTTRF( N, D, E, INFO )
-* 
+*
 *       .. Scalar Arguments ..
 *       INTEGER            INFO, N
 *       ..
 *       .. Array Arguments ..
 *       DOUBLE PRECISION   D( * ), E( * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -115538,22 +116235,22 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date September 2012
+*> \date December 2016
 *
 *> \ingroup doublePTcomputational
 *
 *  =====================================================================
       SUBROUTINE DPTTRF( N, D, E, INFO )
 *
-*  -- LAPACK computational routine (version 3.4.2) --
+*  -- LAPACK computational routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     September 2012
+*     December 2016
 *
 *     .. Scalar Arguments ..
       INTEGER            INFO, N
@@ -115672,31 +116369,31 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DPTTRS + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dpttrs.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dpttrs.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dpttrs.f"> 
+*> Download DPTTRS + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dpttrs.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dpttrs.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dpttrs.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       SUBROUTINE DPTTRS( N, NRHS, D, E, B, LDB, INFO )
-* 
+*
 *       .. Scalar Arguments ..
 *       INTEGER            INFO, LDB, N, NRHS
 *       ..
 *       .. Array Arguments ..
 *       DOUBLE PRECISION   B( LDB, * ), D( * ), E( * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -115767,22 +116464,22 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date September 2012
+*> \date December 2016
 *
 *> \ingroup doublePTcomputational
 *
 *  =====================================================================
       SUBROUTINE DPTTRS( N, NRHS, D, E, B, LDB, INFO )
 *
-*  -- LAPACK computational routine (version 3.4.2) --
+*  -- LAPACK computational routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     September 2012
+*     December 2016
 *
 *     .. Scalar Arguments ..
       INTEGER            INFO, LDB, N, NRHS
@@ -115854,31 +116551,31 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DPTTS2 + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dptts2.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dptts2.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dptts2.f"> 
+*> Download DPTTS2 + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dptts2.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dptts2.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dptts2.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       SUBROUTINE DPTTS2( N, NRHS, D, E, B, LDB )
-* 
+*
 *       .. Scalar Arguments ..
 *       INTEGER            LDB, N, NRHS
 *       ..
 *       .. Array Arguments ..
 *       DOUBLE PRECISION   B( LDB, * ), D( * ), E( * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -115942,22 +116639,22 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date September 2012
+*> \date December 2016
 *
 *> \ingroup doublePTcomputational
 *
 *  =====================================================================
       SUBROUTINE DPTTS2( N, NRHS, D, E, B, LDB )
 *
-*  -- LAPACK computational routine (version 3.4.2) --
+*  -- LAPACK computational routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     September 2012
+*     December 2016
 *
 *     .. Scalar Arguments ..
       INTEGER            LDB, N, NRHS
@@ -116012,24 +116709,24 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DRSCL + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/drscl.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/drscl.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/drscl.f"> 
+*> Download DRSCL + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/drscl.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/drscl.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/drscl.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       SUBROUTINE DRSCL( N, SA, SX, INCX )
-* 
+*
 *       .. Scalar Arguments ..
 *       INTEGER            INCX, N
 *       DOUBLE PRECISION   SA
@@ -116037,7 +116734,7 @@
 *       .. Array Arguments ..
 *       DOUBLE PRECISION   SX( * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -116082,22 +116779,22 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date September 2012
+*> \date December 2016
 *
 *> \ingroup doubleOTHERauxiliary
 *
 *  =====================================================================
       SUBROUTINE DRSCL( N, SA, SX, INCX )
 *
-*  -- LAPACK auxiliary routine (version 3.4.2) --
+*  -- LAPACK auxiliary routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     September 2012
+*     December 2016
 *
 *     .. Scalar Arguments ..
       INTEGER            INCX, N
@@ -116186,25 +116883,25 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DSBEV + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dsbev.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dsbev.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dsbev.f"> 
+*> Download DSBEV + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dsbev.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dsbev.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dsbev.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       SUBROUTINE DSBEV( JOBZ, UPLO, N, KD, AB, LDAB, W, Z, LDZ, WORK,
 *                         INFO )
-* 
+*
 *       .. Scalar Arguments ..
 *       CHARACTER          JOBZ, UPLO
 *       INTEGER            INFO, KD, LDAB, LDZ, N
@@ -116212,7 +116909,7 @@
 *       .. Array Arguments ..
 *       DOUBLE PRECISION   AB( LDAB, * ), W( * ), WORK( * ), Z( LDZ, * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -116317,12 +117014,12 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date November 2011
+*> \date December 2016
 *
 *> \ingroup doubleOTHEReigen
 *
@@ -116330,10 +117027,10 @@
       SUBROUTINE DSBEV( JOBZ, UPLO, N, KD, AB, LDAB, W, Z, LDZ, WORK,
      $                  INFO )
 *
-*  -- LAPACK driver routine (version 3.4.0) --
+*  -- LAPACK driver routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     November 2011
+*     December 2016
 *
 *     .. Scalar Arguments ..
       CHARACTER          JOBZ, UPLO
@@ -116473,25 +117170,25 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DSBEVD + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dsbevd.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dsbevd.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dsbevd.f"> 
+*> Download DSBEVD + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dsbevd.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dsbevd.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dsbevd.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       SUBROUTINE DSBEVD( JOBZ, UPLO, N, KD, AB, LDAB, W, Z, LDZ, WORK,
 *                          LWORK, IWORK, LIWORK, INFO )
-* 
+*
 *       .. Scalar Arguments ..
 *       CHARACTER          JOBZ, UPLO
 *       INTEGER            INFO, KD, LDAB, LDZ, LIWORK, LWORK, N
@@ -116500,7 +117197,7 @@
 *       INTEGER            IWORK( * )
 *       DOUBLE PRECISION   AB( LDAB, * ), W( * ), WORK( * ), Z( LDZ, * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -116651,12 +117348,12 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date November 2011
+*> \date December 2016
 *
 *> \ingroup doubleOTHEReigen
 *
@@ -116664,10 +117361,10 @@
       SUBROUTINE DSBEVD( JOBZ, UPLO, N, KD, AB, LDAB, W, Z, LDZ, WORK,
      $                   LWORK, IWORK, LIWORK, INFO )
 *
-*  -- LAPACK driver routine (version 3.4.0) --
+*  -- LAPACK driver routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     November 2011
+*     December 2016
 *
 *     .. Scalar Arguments ..
       CHARACTER          JOBZ, UPLO
@@ -116833,18 +117530,18 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DSBEVX + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dsbevx.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dsbevx.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dsbevx.f"> 
+*> Download DSBEVX + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dsbevx.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dsbevx.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dsbevx.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
@@ -116852,7 +117549,7 @@
 *       SUBROUTINE DSBEVX( JOBZ, RANGE, UPLO, N, KD, AB, LDAB, Q, LDQ, VL,
 *                          VU, IL, IU, ABSTOL, M, W, Z, LDZ, WORK, IWORK,
 *                          IFAIL, INFO )
-* 
+*
 *       .. Scalar Arguments ..
 *       CHARACTER          JOBZ, RANGE, UPLO
 *       INTEGER            IL, INFO, IU, KD, LDAB, LDQ, LDZ, M, N
@@ -116863,7 +117560,7 @@
 *       DOUBLE PRECISION   AB( LDAB, * ), Q( LDQ, * ), W( * ), WORK( * ),
 *      $                   Z( LDZ, * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -116957,12 +117654,15 @@
 *> \param[in] VL
 *> \verbatim
 *>          VL is DOUBLE PRECISION
+*>          If RANGE='V', the lower bound of the interval to
+*>          be searched for eigenvalues. VL < VU.
+*>          Not referenced if RANGE = 'A' or 'I'.
 *> \endverbatim
 *>
 *> \param[in] VU
 *> \verbatim
 *>          VU is DOUBLE PRECISION
-*>          If RANGE='V', the lower and upper bounds of the interval to
+*>          If RANGE='V', the upper bound of the interval to
 *>          be searched for eigenvalues. VL < VU.
 *>          Not referenced if RANGE = 'A' or 'I'.
 *> \endverbatim
@@ -116970,13 +117670,17 @@
 *> \param[in] IL
 *> \verbatim
 *>          IL is INTEGER
+*>          If RANGE='I', the index of the
+*>          smallest eigenvalue to be returned.
+*>          1 <= IL <= IU <= N, if N > 0; IL = 1 and IU = 0 if N = 0.
+*>          Not referenced if RANGE = 'A' or 'V'.
 *> \endverbatim
 *>
 *> \param[in] IU
 *> \verbatim
 *>          IU is INTEGER
-*>          If RANGE='I', the indices (in ascending order) of the
-*>          smallest and largest eigenvalues to be returned.
+*>          If RANGE='I', the index of the
+*>          largest eigenvalue to be returned.
 *>          1 <= IL <= IU <= N, if N > 0; IL = 1 and IU = 0 if N = 0.
 *>          Not referenced if RANGE = 'A' or 'V'.
 *> \endverbatim
@@ -117075,12 +117779,12 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date November 2011
+*> \date June 2016
 *
 *> \ingroup doubleOTHEReigen
 *
@@ -117089,10 +117793,10 @@
      $                   VU, IL, IU, ABSTOL, M, W, Z, LDZ, WORK, IWORK,
      $                   IFAIL, INFO )
 *
-*  -- LAPACK driver routine (version 3.4.0) --
+*  -- LAPACK driver routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     November 2011
+*     June 2016
 *
 *     .. Scalar Arguments ..
       CHARACTER          JOBZ, RANGE, UPLO
@@ -117369,25 +118073,25 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DSBGST + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dsbgst.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dsbgst.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dsbgst.f"> 
+*> Download DSBGST + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dsbgst.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dsbgst.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dsbgst.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       SUBROUTINE DSBGST( VECT, UPLO, N, KA, KB, AB, LDAB, BB, LDBB, X,
 *                          LDX, WORK, INFO )
-* 
+*
 *       .. Scalar Arguments ..
 *       CHARACTER          UPLO, VECT
 *       INTEGER            INFO, KA, KB, LDAB, LDBB, LDX, N
@@ -117396,7 +118100,7 @@
 *       DOUBLE PRECISION   AB( LDAB, * ), BB( LDBB, * ), WORK( * ),
 *      $                   X( LDX, * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -117513,12 +118217,12 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date November 2011
+*> \date December 2016
 *
 *> \ingroup doubleOTHERcomputational
 *
@@ -117526,10 +118230,10 @@
       SUBROUTINE DSBGST( VECT, UPLO, N, KA, KB, AB, LDAB, BB, LDBB, X,
      $                   LDX, WORK, INFO )
 *
-*  -- LAPACK computational routine (version 3.4.0) --
+*  -- LAPACK computational routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     November 2011
+*     December 2016
 *
 *     .. Scalar Arguments ..
       CHARACTER          UPLO, VECT
@@ -118799,29 +119503,29 @@
 *     End of DSBGST
 *
       END
-*> \brief \b DSBGST
+*> \brief \b DSBGV
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DSBGV + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dsbgv.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dsbgv.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dsbgv.f"> 
+*> Download DSBGV + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dsbgv.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dsbgv.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dsbgv.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       SUBROUTINE DSBGV( JOBZ, UPLO, N, KA, KB, AB, LDAB, BB, LDBB, W, Z,
 *                         LDZ, WORK, INFO )
-* 
+*
 *       .. Scalar Arguments ..
 *       CHARACTER          JOBZ, UPLO
 *       INTEGER            INFO, KA, KB, LDAB, LDBB, LDZ, N
@@ -118830,7 +119534,7 @@
 *       DOUBLE PRECISION   AB( LDAB, * ), BB( LDBB, * ), W( * ),
 *      $                   WORK( * ), Z( LDZ, * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -118965,12 +119669,12 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date November 2011
+*> \date December 2016
 *
 *> \ingroup doubleOTHEReigen
 *
@@ -118978,10 +119682,10 @@
       SUBROUTINE DSBGV( JOBZ, UPLO, N, KA, KB, AB, LDAB, BB, LDBB, W, Z,
      $                  LDZ, WORK, INFO )
 *
-*  -- LAPACK driver routine (version 3.4.0) --
+*  -- LAPACK driver routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     November 2011
+*     December 2016
 *
 *     .. Scalar Arguments ..
       CHARACTER          JOBZ, UPLO
@@ -119079,29 +119783,29 @@
 *     End of DSBGV
 *
       END
-*> \brief \b DSBGST
+*> \brief \b DSBGVD
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DSBGVD + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dsbgvd.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dsbgvd.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dsbgvd.f"> 
+*> Download DSBGVD + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dsbgvd.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dsbgvd.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dsbgvd.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       SUBROUTINE DSBGVD( JOBZ, UPLO, N, KA, KB, AB, LDAB, BB, LDBB, W,
 *                          Z, LDZ, WORK, LWORK, IWORK, LIWORK, INFO )
-* 
+*
 *       .. Scalar Arguments ..
 *       CHARACTER          JOBZ, UPLO
 *       INTEGER            INFO, KA, KB, LDAB, LDBB, LDZ, LIWORK, LWORK, N
@@ -119111,7 +119815,7 @@
 *       DOUBLE PRECISION   AB( LDAB, * ), BB( LDBB, * ), W( * ),
 *      $                   WORK( * ), Z( LDZ, * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -119242,7 +119946,7 @@
 *>          LWORK is INTEGER
 *>          The dimension of the array WORK.
 *>          If N <= 1,               LWORK >= 1.
-*>          If JOBZ = 'N' and N > 1, LWORK >= 3*N.
+*>          If JOBZ = 'N' and N > 1, LWORK >= 2*N.
 *>          If JOBZ = 'V' and N > 1, LWORK >= 1 + 5*N + 2*N**2.
 *>
 *>          If LWORK = -1, then a workspace query is assumed; the routine
@@ -119290,12 +119994,12 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date November 2011
+*> \date June 2016
 *
 *> \ingroup doubleOTHEReigen
 *
@@ -119308,10 +120012,10 @@
       SUBROUTINE DSBGVD( JOBZ, UPLO, N, KA, KB, AB, LDAB, BB, LDBB, W,
      $                   Z, LDZ, WORK, LWORK, IWORK, LIWORK, INFO )
 *
-*  -- LAPACK driver routine (version 3.4.0) --
+*  -- LAPACK driver routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     November 2011
+*     June 2016
 *
 *     .. Scalar Arguments ..
       CHARACTER          JOBZ, UPLO
@@ -119419,7 +120123,7 @@
       INDWK2 = INDWRK + N*N
       LLWRK2 = LWORK - INDWK2 + 1
       CALL DSBGST( JOBZ, UPLO, N, KA, KB, AB, LDAB, BB, LDBB, Z, LDZ,
-     $             WORK( INDWRK ), IINFO )
+     $             WORK, IINFO )
 *
 *     Reduce to tridiagonal form.
 *
@@ -119451,22 +120155,22 @@
 *     End of DSBGVD
 *
       END
-*> \brief \b DSBGST
+*> \brief \b DSBGVX
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DSBGVX + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dsbgvx.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dsbgvx.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dsbgvx.f"> 
+*> Download DSBGVX + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dsbgvx.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dsbgvx.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dsbgvx.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
@@ -119474,7 +120178,7 @@
 *       SUBROUTINE DSBGVX( JOBZ, RANGE, UPLO, N, KA, KB, AB, LDAB, BB,
 *                          LDBB, Q, LDQ, VL, VU, IL, IU, ABSTOL, M, W, Z,
 *                          LDZ, WORK, IWORK, IFAIL, INFO )
-* 
+*
 *       .. Scalar Arguments ..
 *       CHARACTER          JOBZ, RANGE, UPLO
 *       INTEGER            IL, INFO, IU, KA, KB, LDAB, LDBB, LDQ, LDZ, M,
@@ -119486,7 +120190,7 @@
 *       DOUBLE PRECISION   AB( LDAB, * ), BB( LDBB, * ), Q( LDQ, * ),
 *      $                   W( * ), WORK( * ), Z( LDZ, * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -119605,13 +120309,17 @@
 *> \param[in] VL
 *> \verbatim
 *>          VL is DOUBLE PRECISION
+*>
+*>          If RANGE='V', the lower bound of the interval to
+*>          be searched for eigenvalues. VL < VU.
+*>          Not referenced if RANGE = 'A' or 'I'.
 *> \endverbatim
 *>
 *> \param[in] VU
 *> \verbatim
 *>          VU is DOUBLE PRECISION
 *>
-*>          If RANGE='V', the lower and upper bounds of the interval to
+*>          If RANGE='V', the upper bound of the interval to
 *>          be searched for eigenvalues. VL < VU.
 *>          Not referenced if RANGE = 'A' or 'I'.
 *> \endverbatim
@@ -119619,14 +120327,19 @@
 *> \param[in] IL
 *> \verbatim
 *>          IL is INTEGER
+*>
+*>          If RANGE='I', the index of the
+*>          smallest eigenvalue to be returned.
+*>          1 <= IL <= IU <= N, if N > 0; IL = 1 and IU = 0 if N = 0.
+*>          Not referenced if RANGE = 'A' or 'V'.
 *> \endverbatim
 *>
 *> \param[in] IU
 *> \verbatim
 *>          IU is INTEGER
 *>
-*>          If RANGE='I', the indices (in ascending order) of the
-*>          smallest and largest eigenvalues to be returned.
+*>          If RANGE='I', the index of the
+*>          largest eigenvalue to be returned.
 *>          1 <= IL <= IU <= N, if N > 0; IL = 1 and IU = 0 if N = 0.
 *>          Not referenced if RANGE = 'A' or 'V'.
 *> \endverbatim
@@ -119719,12 +120432,12 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date November 2011
+*> \date June 2016
 *
 *> \ingroup doubleOTHEReigen
 *
@@ -119738,10 +120451,10 @@
      $                   LDBB, Q, LDQ, VL, VU, IL, IU, ABSTOL, M, W, Z,
      $                   LDZ, WORK, IWORK, IFAIL, INFO )
 *
-*  -- LAPACK driver routine (version 3.4.0) --
+*  -- LAPACK driver routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     November 2011
+*     June 2016
 *
 *     .. Scalar Arguments ..
       CHARACTER          JOBZ, RANGE, UPLO
@@ -119968,25 +120681,25 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DSBTRD + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dsbtrd.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dsbtrd.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dsbtrd.f"> 
+*> Download DSBTRD + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dsbtrd.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dsbtrd.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dsbtrd.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       SUBROUTINE DSBTRD( VECT, UPLO, N, KD, AB, LDAB, D, E, Q, LDQ,
 *                          WORK, INFO )
-* 
+*
 *       .. Scalar Arguments ..
 *       CHARACTER          UPLO, VECT
 *       INTEGER            INFO, KD, LDAB, LDQ, N
@@ -119995,7 +120708,7 @@
 *       DOUBLE PRECISION   AB( LDAB, * ), D( * ), E( * ), Q( LDQ, * ),
 *      $                   WORK( * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -120108,12 +120821,12 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date November 2011
+*> \date December 2016
 *
 *> \ingroup doubleOTHERcomputational
 *
@@ -120129,10 +120842,10 @@
       SUBROUTINE DSBTRD( VECT, UPLO, N, KD, AB, LDAB, D, E, Q, LDQ,
      $                   WORK, INFO )
 *
-*  -- LAPACK computational routine (version 3.4.0) --
+*  -- LAPACK computational routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     November 2011
+*     December 2016
 *
 *     .. Scalar Arguments ..
       CHARACTER          UPLO, VECT
@@ -120609,25 +121322,25 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DSFRK + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dsfrk.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dsfrk.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dsfrk.f"> 
+*> Download DSFRK + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dsfrk.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dsfrk.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dsfrk.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       SUBROUTINE DSFRK( TRANSR, UPLO, TRANS, N, K, ALPHA, A, LDA, BETA,
 *                         C )
-* 
+*
 *       .. Scalar Arguments ..
 *       DOUBLE PRECISION   ALPHA, BETA
 *       INTEGER            K, LDA, N
@@ -120636,7 +121349,7 @@
 *       .. Array Arguments ..
 *       DOUBLE PRECISION   A( LDA, * ), C( * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -120760,12 +121473,12 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date September 2012
+*> \date December 2016
 *
 *> \ingroup doubleOTHERcomputational
 *
@@ -120773,10 +121486,10 @@
       SUBROUTINE DSFRK( TRANSR, UPLO, TRANS, N, K, ALPHA, A, LDA, BETA,
      $                  C )
 *
-*  -- LAPACK computational routine (version 3.4.2) --
+*  -- LAPACK computational routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     September 2012
+*     December 2016
 *
 *     .. Scalar Arguments ..
       DOUBLE PRECISION   ALPHA, BETA
@@ -121153,25 +121866,25 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DSPCON + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dspcon.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dspcon.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dspcon.f"> 
+*> Download DSPCON + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dspcon.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dspcon.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dspcon.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       SUBROUTINE DSPCON( UPLO, N, AP, IPIV, ANORM, RCOND, WORK, IWORK,
 *                          INFO )
-* 
+*
 *       .. Scalar Arguments ..
 *       CHARACTER          UPLO
 *       INTEGER            INFO, N
@@ -121181,7 +121894,7 @@
 *       INTEGER            IPIV( * ), IWORK( * )
 *       DOUBLE PRECISION   AP( * ), WORK( * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -121263,12 +121976,12 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date November 2011
+*> \date December 2016
 *
 *> \ingroup doubleOTHERcomputational
 *
@@ -121276,10 +121989,10 @@
       SUBROUTINE DSPCON( UPLO, N, AP, IPIV, ANORM, RCOND, WORK, IWORK,
      $                   INFO )
 *
-*  -- LAPACK computational routine (version 3.4.0) --
+*  -- LAPACK computational routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     November 2011
+*     December 2016
 *
 *     .. Scalar Arguments ..
       CHARACTER          UPLO
@@ -121391,24 +122104,24 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DSPEV + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dspev.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dspev.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dspev.f"> 
+*> Download DSPEV + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dspev.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dspev.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dspev.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       SUBROUTINE DSPEV( JOBZ, UPLO, N, AP, W, Z, LDZ, WORK, INFO )
-* 
+*
 *       .. Scalar Arguments ..
 *       CHARACTER          JOBZ, UPLO
 *       INTEGER            INFO, LDZ, N
@@ -121416,7 +122129,7 @@
 *       .. Array Arguments ..
 *       DOUBLE PRECISION   AP( * ), W( * ), WORK( * ), Z( LDZ, * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -121507,22 +122220,22 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date November 2011
+*> \date December 2016
 *
 *> \ingroup doubleOTHEReigen
 *
 *  =====================================================================
       SUBROUTINE DSPEV( JOBZ, UPLO, N, AP, W, Z, LDZ, WORK, INFO )
 *
-*  -- LAPACK driver routine (version 3.4.0) --
+*  -- LAPACK driver routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     November 2011
+*     December 2016
 *
 *     .. Scalar Arguments ..
       CHARACTER          JOBZ, UPLO
@@ -121653,25 +122366,25 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DSPEVD + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dspevd.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dspevd.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dspevd.f"> 
+*> Download DSPEVD + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dspevd.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dspevd.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dspevd.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       SUBROUTINE DSPEVD( JOBZ, UPLO, N, AP, W, Z, LDZ, WORK, LWORK,
 *                          IWORK, LIWORK, INFO )
-* 
+*
 *       .. Scalar Arguments ..
 *       CHARACTER          JOBZ, UPLO
 *       INTEGER            INFO, LDZ, LIWORK, LWORK, N
@@ -121680,7 +122393,7 @@
 *       INTEGER            IWORK( * )
 *       DOUBLE PRECISION   AP( * ), W( * ), WORK( * ), Z( LDZ, * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -121817,12 +122530,12 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date November 2011
+*> \date December 2016
 *
 *> \ingroup doubleOTHEReigen
 *
@@ -121830,10 +122543,10 @@
       SUBROUTINE DSPEVD( JOBZ, UPLO, N, AP, W, Z, LDZ, WORK, LWORK,
      $                   IWORK, LIWORK, INFO )
 *
-*  -- LAPACK driver routine (version 3.4.0) --
+*  -- LAPACK driver routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     November 2011
+*     December 2016
 *
 *     .. Scalar Arguments ..
       CHARACTER          JOBZ, UPLO
@@ -121991,18 +122704,18 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DSPEVX + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dspevx.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dspevx.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dspevx.f"> 
+*> Download DSPEVX + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dspevx.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dspevx.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dspevx.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
@@ -122010,7 +122723,7 @@
 *       SUBROUTINE DSPEVX( JOBZ, RANGE, UPLO, N, AP, VL, VU, IL, IU,
 *                          ABSTOL, M, W, Z, LDZ, WORK, IWORK, IFAIL,
 *                          INFO )
-* 
+*
 *       .. Scalar Arguments ..
 *       CHARACTER          JOBZ, RANGE, UPLO
 *       INTEGER            IL, INFO, IU, LDZ, M, N
@@ -122020,7 +122733,7 @@
 *       INTEGER            IFAIL( * ), IWORK( * )
 *       DOUBLE PRECISION   AP( * ), W( * ), WORK( * ), Z( LDZ, * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -122085,12 +122798,15 @@
 *> \param[in] VL
 *> \verbatim
 *>          VL is DOUBLE PRECISION
+*>          If RANGE='V', the lower bound of the interval to
+*>          be searched for eigenvalues. VL < VU.
+*>          Not referenced if RANGE = 'A' or 'I'.
 *> \endverbatim
 *>
 *> \param[in] VU
 *> \verbatim
 *>          VU is DOUBLE PRECISION
-*>          If RANGE='V', the lower and upper bounds of the interval to
+*>          If RANGE='V', the upper bound of the interval to
 *>          be searched for eigenvalues. VL < VU.
 *>          Not referenced if RANGE = 'A' or 'I'.
 *> \endverbatim
@@ -122098,13 +122814,17 @@
 *> \param[in] IL
 *> \verbatim
 *>          IL is INTEGER
+*>          If RANGE='I', the index of the
+*>          smallest eigenvalue to be returned.
+*>          1 <= IL <= IU <= N, if N > 0; IL = 1 and IU = 0 if N = 0.
+*>          Not referenced if RANGE = 'A' or 'V'.
 *> \endverbatim
 *>
 *> \param[in] IU
 *> \verbatim
 *>          IU is INTEGER
-*>          If RANGE='I', the indices (in ascending order) of the
-*>          smallest and largest eigenvalues to be returned.
+*>          If RANGE='I', the index of the
+*>          largest eigenvalue to be returned.
 *>          1 <= IL <= IU <= N, if N > 0; IL = 1 and IU = 0 if N = 0.
 *>          Not referenced if RANGE = 'A' or 'V'.
 *> \endverbatim
@@ -122202,12 +122922,12 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date November 2011
+*> \date June 2016
 *
 *> \ingroup doubleOTHEReigen
 *
@@ -122216,10 +122936,10 @@
      $                   ABSTOL, M, W, Z, LDZ, WORK, IWORK, IFAIL,
      $                   INFO )
 *
-*  -- LAPACK driver routine (version 3.4.0) --
+*  -- LAPACK driver routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     November 2011
+*     June 2016
 *
 *     .. Scalar Arguments ..
       CHARACTER          JOBZ, RANGE, UPLO
@@ -122480,24 +123200,24 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DSPGST + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dspgst.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dspgst.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dspgst.f"> 
+*> Download DSPGST + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dspgst.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dspgst.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dspgst.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       SUBROUTINE DSPGST( ITYPE, UPLO, N, AP, BP, INFO )
-* 
+*
 *       .. Scalar Arguments ..
 *       CHARACTER          UPLO
 *       INTEGER            INFO, ITYPE, N
@@ -122505,7 +123225,7 @@
 *       .. Array Arguments ..
 *       DOUBLE PRECISION   AP( * ), BP( * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -122579,22 +123299,22 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date November 2011
+*> \date December 2016
 *
 *> \ingroup doubleOTHERcomputational
 *
 *  =====================================================================
       SUBROUTINE DSPGST( ITYPE, UPLO, N, AP, BP, INFO )
 *
-*  -- LAPACK computational routine (version 3.4.0) --
+*  -- LAPACK computational routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     November 2011
+*     December 2016
 *
 *     .. Scalar Arguments ..
       CHARACTER          UPLO
@@ -122750,29 +123470,29 @@
 *     End of DSPGST
 *
       END
-*> \brief \b DSPGST
+*> \brief \b DSPGV
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DSPGV + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dspgv.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dspgv.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dspgv.f"> 
+*> Download DSPGV + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dspgv.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dspgv.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dspgv.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       SUBROUTINE DSPGV( ITYPE, JOBZ, UPLO, N, AP, BP, W, Z, LDZ, WORK,
 *                         INFO )
-* 
+*
 *       .. Scalar Arguments ..
 *       CHARACTER          JOBZ, UPLO
 *       INTEGER            INFO, ITYPE, LDZ, N
@@ -122781,7 +123501,7 @@
 *       DOUBLE PRECISION   AP( * ), BP( * ), W( * ), WORK( * ),
 *      $                   Z( LDZ, * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -122900,12 +123620,12 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date November 2011
+*> \date December 2016
 *
 *> \ingroup doubleOTHEReigen
 *
@@ -122913,10 +123633,10 @@
       SUBROUTINE DSPGV( ITYPE, JOBZ, UPLO, N, AP, BP, W, Z, LDZ, WORK,
      $                  INFO )
 *
-*  -- LAPACK driver routine (version 3.4.0) --
+*  -- LAPACK driver routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     November 2011
+*     December 2016
 *
 *     .. Scalar Arguments ..
       CHARACTER          JOBZ, UPLO
@@ -123028,29 +123748,29 @@
 *     End of DSPGV
 *
       END
-*> \brief \b DSPGST
+*> \brief \b DSPGVD
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DSPGVD + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dspgvd.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dspgvd.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dspgvd.f"> 
+*> Download DSPGVD + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dspgvd.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dspgvd.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dspgvd.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       SUBROUTINE DSPGVD( ITYPE, JOBZ, UPLO, N, AP, BP, W, Z, LDZ, WORK,
 *                          LWORK, IWORK, LIWORK, INFO )
-* 
+*
 *       .. Scalar Arguments ..
 *       CHARACTER          JOBZ, UPLO
 *       INTEGER            INFO, ITYPE, LDZ, LIWORK, LWORK, N
@@ -123060,7 +123780,7 @@
 *       DOUBLE PRECISION   AP( * ), BP( * ), W( * ), WORK( * ),
 *      $                   Z( LDZ, * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -123222,12 +123942,12 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date November 2011
+*> \date December 2016
 *
 *> \ingroup doubleOTHEReigen
 *
@@ -123240,10 +123960,10 @@
       SUBROUTINE DSPGVD( ITYPE, JOBZ, UPLO, N, AP, BP, W, Z, LDZ, WORK,
      $                   LWORK, IWORK, LIWORK, INFO )
 *
-*  -- LAPACK driver routine (version 3.4.0) --
+*  -- LAPACK driver routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     November 2011
+*     December 2016
 *
 *     .. Scalar Arguments ..
       CHARACTER          JOBZ, UPLO
@@ -123392,22 +124112,22 @@
 *     End of DSPGVD
 *
       END
-*> \brief \b DSPGST
+*> \brief \b DSPGVX
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DSPGVX + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dspgvx.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dspgvx.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dspgvx.f"> 
+*> Download DSPGVX + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dspgvx.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dspgvx.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dspgvx.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
@@ -123415,7 +124135,7 @@
 *       SUBROUTINE DSPGVX( ITYPE, JOBZ, RANGE, UPLO, N, AP, BP, VL, VU,
 *                          IL, IU, ABSTOL, M, W, Z, LDZ, WORK, IWORK,
 *                          IFAIL, INFO )
-* 
+*
 *       .. Scalar Arguments ..
 *       CHARACTER          JOBZ, RANGE, UPLO
 *       INTEGER            IL, INFO, ITYPE, IU, LDZ, M, N
@@ -123426,7 +124146,7 @@
 *       DOUBLE PRECISION   AP( * ), BP( * ), W( * ), WORK( * ),
 *      $                   Z( LDZ, * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -123512,13 +124232,17 @@
 *> \param[in] VL
 *> \verbatim
 *>          VL is DOUBLE PRECISION
+*>
+*>          If RANGE='V', the lower bound of the interval to
+*>          be searched for eigenvalues. VL < VU.
+*>          Not referenced if RANGE = 'A' or 'I'.
 *> \endverbatim
 *>
 *> \param[in] VU
 *> \verbatim
 *>          VU is DOUBLE PRECISION
 *>
-*>          If RANGE='V', the lower and upper bounds of the interval to
+*>          If RANGE='V', the upper bound of the interval to
 *>          be searched for eigenvalues. VL < VU.
 *>          Not referenced if RANGE = 'A' or 'I'.
 *> \endverbatim
@@ -123526,14 +124250,19 @@
 *> \param[in] IL
 *> \verbatim
 *>          IL is INTEGER
+*>
+*>          If RANGE='I', the index of the
+*>          smallest eigenvalue to be returned.
+*>          1 <= IL <= IU <= N, if N > 0; IL = 1 and IU = 0 if N = 0.
+*>          Not referenced if RANGE = 'A' or 'V'.
 *> \endverbatim
 *>
 *> \param[in] IU
 *> \verbatim
 *>          IU is INTEGER
 *>
-*>          If RANGE='I', the indices (in ascending order) of the
-*>          smallest and largest eigenvalues to be returned.
+*>          If RANGE='I', the index of the
+*>          largest eigenvalue to be returned.
 *>          1 <= IL <= IU <= N, if N > 0; IL = 1 and IU = 0 if N = 0.
 *>          Not referenced if RANGE = 'A' or 'V'.
 *> \endverbatim
@@ -123638,12 +124367,12 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date November 2011
+*> \date June 2016
 *
 *> \ingroup doubleOTHEReigen
 *
@@ -123657,10 +124386,10 @@
      $                   IL, IU, ABSTOL, M, W, Z, LDZ, WORK, IWORK,
      $                   IFAIL, INFO )
 *
-*  -- LAPACK driver routine (version 3.4.0) --
+*  -- LAPACK driver routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     November 2011
+*     June 2016
 *
 *     .. Scalar Arguments ..
       CHARACTER          JOBZ, RANGE, UPLO
@@ -123804,25 +124533,25 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DSPRFS + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dsprfs.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dsprfs.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dsprfs.f"> 
+*> Download DSPRFS + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dsprfs.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dsprfs.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dsprfs.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       SUBROUTINE DSPRFS( UPLO, N, NRHS, AP, AFP, IPIV, B, LDB, X, LDX,
 *                          FERR, BERR, WORK, IWORK, INFO )
-* 
+*
 *       .. Scalar Arguments ..
 *       CHARACTER          UPLO
 *       INTEGER            INFO, LDB, LDX, N, NRHS
@@ -123832,7 +124561,7 @@
 *       DOUBLE PRECISION   AFP( * ), AP( * ), B( LDB, * ), BERR( * ),
 *      $                   FERR( * ), WORK( * ), X( LDX, * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -123968,12 +124697,12 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date November 2011
+*> \date December 2016
 *
 *> \ingroup doubleOTHERcomputational
 *
@@ -123981,10 +124710,10 @@
       SUBROUTINE DSPRFS( UPLO, N, NRHS, AP, AFP, IPIV, B, LDB, X, LDX,
      $                   FERR, BERR, WORK, IWORK, INFO )
 *
-*  -- LAPACK computational routine (version 3.4.0) --
+*  -- LAPACK computational routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     November 2011
+*     December 2016
 *
 *     .. Scalar Arguments ..
       CHARACTER          UPLO
@@ -124235,24 +124964,24 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DSPSV + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dspsv.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dspsv.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dspsv.f"> 
+*> Download DSPSV + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dspsv.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dspsv.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dspsv.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       SUBROUTINE DSPSV( UPLO, N, NRHS, AP, IPIV, B, LDB, INFO )
-* 
+*
 *       .. Scalar Arguments ..
 *       CHARACTER          UPLO
 *       INTEGER            INFO, LDB, N, NRHS
@@ -124261,7 +124990,7 @@
 *       INTEGER            IPIV( * )
 *       DOUBLE PRECISION   AP( * ), B( LDB, * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -124363,12 +125092,12 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date November 2011
+*> \date December 2016
 *
 *> \ingroup doubleOTHERsolve
 *
@@ -124395,10 +125124,10 @@
 *  =====================================================================
       SUBROUTINE DSPSV( UPLO, N, NRHS, AP, IPIV, B, LDB, INFO )
 *
-*  -- LAPACK driver routine (version 3.4.0) --
+*  -- LAPACK driver routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     November 2011
+*     December 2016
 *
 *     .. Scalar Arguments ..
       CHARACTER          UPLO
@@ -124459,25 +125188,25 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DSPSVX + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dspsvx.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dspsvx.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dspsvx.f"> 
+*> Download DSPSVX + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dspsvx.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dspsvx.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dspsvx.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       SUBROUTINE DSPSVX( FACT, UPLO, N, NRHS, AP, AFP, IPIV, B, LDB, X,
 *                          LDX, RCOND, FERR, BERR, WORK, IWORK, INFO )
-* 
+*
 *       .. Scalar Arguments ..
 *       CHARACTER          FACT, UPLO
 *       INTEGER            INFO, LDB, LDX, N, NRHS
@@ -124488,7 +125217,7 @@
 *       DOUBLE PRECISION   AFP( * ), AP( * ), B( LDB, * ), BERR( * ),
 *      $                   FERR( * ), WORK( * ), X( LDX, * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -124701,10 +125430,10 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
 *> \date April 2012
 *
@@ -124734,7 +125463,7 @@
       SUBROUTINE DSPSVX( FACT, UPLO, N, NRHS, AP, AFP, IPIV, B, LDB, X,
      $                   LDX, RCOND, FERR, BERR, WORK, IWORK, INFO )
 *
-*  -- LAPACK driver routine (version 3.4.1) --
+*  -- LAPACK driver routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
 *     April 2012
@@ -124845,24 +125574,24 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DSPTRD + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dsptrd.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dsptrd.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dsptrd.f"> 
+*> Download DSPTRD + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dsptrd.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dsptrd.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dsptrd.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       SUBROUTINE DSPTRD( UPLO, N, AP, D, E, TAU, INFO )
-* 
+*
 *       .. Scalar Arguments ..
 *       CHARACTER          UPLO
 *       INTEGER            INFO, N
@@ -124870,7 +125599,7 @@
 *       .. Array Arguments ..
 *       DOUBLE PRECISION   AP( * ), D( * ), E( * ), TAU( * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -124949,12 +125678,12 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date November 2011
+*> \date December 2016
 *
 *> \ingroup doubleOTHERcomputational
 *
@@ -124993,10 +125722,10 @@
 *  =====================================================================
       SUBROUTINE DSPTRD( UPLO, N, AP, D, E, TAU, INFO )
 *
-*  -- LAPACK computational routine (version 3.4.0) --
+*  -- LAPACK computational routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     November 2011
+*     December 2016
 *
 *     .. Scalar Arguments ..
       CHARACTER          UPLO
@@ -125145,24 +125874,24 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DSPTRF + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dsptrf.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dsptrf.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dsptrf.f"> 
+*> Download DSPTRF + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dsptrf.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dsptrf.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dsptrf.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       SUBROUTINE DSPTRF( UPLO, N, AP, IPIV, INFO )
-* 
+*
 *       .. Scalar Arguments ..
 *       CHARACTER          UPLO
 *       INTEGER            INFO, N
@@ -125171,7 +125900,7 @@
 *       INTEGER            IPIV( * )
 *       DOUBLE PRECISION   AP( * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -125245,12 +125974,12 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date November 2011
+*> \date December 2016
 *
 *> \ingroup doubleOTHERcomputational
 *
@@ -125302,10 +126031,10 @@
 *  =====================================================================
       SUBROUTINE DSPTRF( UPLO, N, AP, IPIV, INFO )
 *
-*  -- LAPACK computational routine (version 3.4.0) --
+*  -- LAPACK computational routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     November 2011
+*     December 2016
 *
 *     .. Scalar Arguments ..
       CHARACTER          UPLO
@@ -125761,24 +126490,24 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DSPTRI + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dsptri.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dsptri.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dsptri.f"> 
+*> Download DSPTRI + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dsptri.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dsptri.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dsptri.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       SUBROUTINE DSPTRI( UPLO, N, AP, IPIV, WORK, INFO )
-* 
+*
 *       .. Scalar Arguments ..
 *       CHARACTER          UPLO
 *       INTEGER            INFO, N
@@ -125787,7 +126516,7 @@
 *       INTEGER            IPIV( * )
 *       DOUBLE PRECISION   AP( * ), WORK( * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -125856,22 +126585,22 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date November 2011
+*> \date December 2016
 *
 *> \ingroup doubleOTHERcomputational
 *
 *  =====================================================================
       SUBROUTINE DSPTRI( UPLO, N, AP, IPIV, WORK, INFO )
 *
-*  -- LAPACK computational routine (version 3.4.0) --
+*  -- LAPACK computational routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     November 2011
+*     December 2016
 *
 *     .. Scalar Arguments ..
       CHARACTER          UPLO
@@ -126162,24 +126891,24 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DSPTRS + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dsptrs.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dsptrs.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dsptrs.f"> 
+*> Download DSPTRS + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dsptrs.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dsptrs.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dsptrs.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       SUBROUTINE DSPTRS( UPLO, N, NRHS, AP, IPIV, B, LDB, INFO )
-* 
+*
 *       .. Scalar Arguments ..
 *       CHARACTER          UPLO
 *       INTEGER            INFO, LDB, N, NRHS
@@ -126188,7 +126917,7 @@
 *       INTEGER            IPIV( * )
 *       DOUBLE PRECISION   AP( * ), B( LDB, * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -126263,22 +126992,22 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date November 2011
+*> \date December 2016
 *
 *> \ingroup doubleOTHERcomputational
 *
 *  =====================================================================
       SUBROUTINE DSPTRS( UPLO, N, NRHS, AP, IPIV, B, LDB, INFO )
 *
-*  -- LAPACK computational routine (version 3.4.0) --
+*  -- LAPACK computational routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     November 2011
+*     December 2016
 *
 *     .. Scalar Arguments ..
       CHARACTER          UPLO
@@ -126612,18 +127341,18 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DSTEBZ + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dstebz.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dstebz.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dstebz.f"> 
+*> Download DSTEBZ + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dstebz.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dstebz.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dstebz.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
@@ -126631,7 +127360,7 @@
 *       SUBROUTINE DSTEBZ( RANGE, ORDER, N, VL, VU, IL, IU, ABSTOL, D, E,
 *                          M, NSPLIT, W, IBLOCK, ISPLIT, WORK, IWORK,
 *                          INFO )
-* 
+*
 *       .. Scalar Arguments ..
 *       CHARACTER          ORDER, RANGE
 *       INTEGER            IL, INFO, IU, M, N, NSPLIT
@@ -126641,7 +127370,7 @@
 *       INTEGER            IBLOCK( * ), ISPLIT( * ), IWORK( * )
 *       DOUBLE PRECISION   D( * ), E( * ), W( * ), WORK( * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -126697,13 +127426,18 @@
 *> \param[in] VL
 *> \verbatim
 *>          VL is DOUBLE PRECISION
+*>
+*>          If RANGE='V', the lower bound of the interval to
+*>          be searched for eigenvalues.  Eigenvalues less than or equal
+*>          to VL, or greater than VU, will not be returned.  VL < VU.
+*>          Not referenced if RANGE = 'A' or 'I'.
 *> \endverbatim
 *>
 *> \param[in] VU
 *> \verbatim
 *>          VU is DOUBLE PRECISION
 *>
-*>          If RANGE='V', the lower and upper bounds of the interval to
+*>          If RANGE='V', the upper bound of the interval to
 *>          be searched for eigenvalues.  Eigenvalues less than or equal
 *>          to VL, or greater than VU, will not be returned.  VL < VU.
 *>          Not referenced if RANGE = 'A' or 'I'.
@@ -126712,14 +127446,19 @@
 *> \param[in] IL
 *> \verbatim
 *>          IL is INTEGER
+*>
+*>          If RANGE='I', the index of the
+*>          smallest eigenvalue to be returned.
+*>          1 <= IL <= IU <= N, if N > 0; IL = 1 and IU = 0 if N = 0.
+*>          Not referenced if RANGE = 'A' or 'V'.
 *> \endverbatim
 *>
 *> \param[in] IU
 *> \verbatim
 *>          IU is INTEGER
 *>
-*>          If RANGE='I', the indices (in ascending order) of the
-*>          smallest and largest eigenvalues to be returned.
+*>          If RANGE='I', the index of the
+*>          largest eigenvalue to be returned.
 *>          1 <= IL <= IU <= N, if N > 0; IL = 1 and IU = 0 if N = 0.
 *>          Not referenced if RANGE = 'A' or 'V'.
 *> \endverbatim
@@ -126859,12 +127598,12 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date November 2011
+*> \date June 2016
 *
 *> \ingroup auxOTHERcomputational
 *
@@ -126873,10 +127612,10 @@
      $                   M, NSPLIT, W, IBLOCK, ISPLIT, WORK, IWORK,
      $                   INFO )
 *
-*  -- LAPACK computational routine (version 3.4.0) --
+*  -- LAPACK computational routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     November 2011
+*     June 2016
 *
 *     .. Scalar Arguments ..
       CHARACTER          ORDER, RANGE
@@ -127369,29 +128108,29 @@
 *     End of DSTEBZ
 *
       END
-*> \brief \b DSTEBZ
+*> \brief \b DSTEDC
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DSTEDC + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dstedc.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dstedc.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dstedc.f"> 
+*> Download DSTEDC + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dstedc.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dstedc.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dstedc.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       SUBROUTINE DSTEDC( COMPZ, N, D, E, Z, LDZ, WORK, LWORK, IWORK,
 *                          LIWORK, INFO )
-* 
+*
 *       .. Scalar Arguments ..
 *       CHARACTER          COMPZ
 *       INTEGER            INFO, LDZ, LIWORK, LWORK, N
@@ -127400,7 +128139,7 @@
 *       INTEGER            IWORK( * )
 *       DOUBLE PRECISION   D( * ), E( * ), WORK( * ), Z( LDZ, * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -127540,12 +128279,12 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date November 2011
+*> \date December 2016
 *
 *> \ingroup auxOTHERcomputational
 *
@@ -127560,10 +128299,10 @@
       SUBROUTINE DSTEDC( COMPZ, N, D, E, Z, LDZ, WORK, LWORK, IWORK,
      $                   LIWORK, INFO )
 *
-*  -- LAPACK computational routine (version 3.4.0) --
+*  -- LAPACK computational routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     November 2011
+*     December 2016
 *
 *     .. Scalar Arguments ..
       CHARACTER          COMPZ
@@ -127814,38 +128553,32 @@
 *
 *        endwhile
 *
-*        If the problem split any number of times, then the eigenvalues
-*        will not be properly ordered.  Here we permute the eigenvalues
-*        (and the associated eigenvectors) into ascending order.
+         IF( ICOMPZ.EQ.0 ) THEN
 *
-         IF( M.NE.N ) THEN
-            IF( ICOMPZ.EQ.0 ) THEN
+*          Use Quick Sort
 *
-*              Use Quick Sort
+           CALL DLASRT( 'I', N, D, INFO )
 *
-               CALL DLASRT( 'I', N, D, INFO )
-*
-            ELSE
+         ELSE
 *
-*              Use Selection Sort to minimize swaps of eigenvectors
+*          Use Selection Sort to minimize swaps of eigenvectors
 *
-               DO 40 II = 2, N
-                  I = II - 1
-                  K = I
-                  P = D( I )
-                  DO 30 J = II, N
-                     IF( D( J ).LT.P ) THEN
-                        K = J
-                        P = D( J )
-                     END IF
-   30             CONTINUE
-                  IF( K.NE.I ) THEN
-                     D( K ) = D( I )
-                     D( I ) = P
-                     CALL DSWAP( N, Z( 1, I ), 1, Z( 1, K ), 1 )
-                  END IF
-   40          CONTINUE
-            END IF
+           DO 40 II = 2, N
+              I = II - 1
+              K = I
+              P = D( I )
+              DO 30 J = II, N
+                 IF( D( J ).LT.P ) THEN
+                    K = J
+                    P = D( J )
+                 END IF
+   30         CONTINUE
+              IF( K.NE.I ) THEN
+                 D( K ) = D( I )
+                 D( I ) = P
+                 CALL DSWAP( N, Z( 1, I ), 1, Z( 1, K ), 1 )
+              END IF
+   40      CONTINUE
          END IF
       END IF
 *
@@ -127862,18 +128595,18 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DSTEGR + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dstegr.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dstegr.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dstegr.f"> 
+*> Download DSTEGR + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dstegr.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dstegr.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dstegr.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
@@ -127881,7 +128614,7 @@
 *       SUBROUTINE DSTEGR( JOBZ, RANGE, N, D, E, VL, VU, IL, IU,
 *                  ABSTOL, M, W, Z, LDZ, ISUPPZ, WORK, LWORK, IWORK,
 *                  LIWORK, INFO )
-* 
+*
 *       .. Scalar Arguments ..
 *       CHARACTER          JOBZ, RANGE
 *       INTEGER            IL, INFO, IU, LDZ, LIWORK, LWORK, M, N
@@ -127892,7 +128625,7 @@
 *       DOUBLE PRECISION   D( * ), E( * ), W( * ), WORK( * )
 *       DOUBLE PRECISION   Z( LDZ, * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -127908,7 +128641,7 @@
 *> either an interval (VL,VU] or a range of indices IL:IU for the desired
 *> eigenvalues.
 *>
-*> DSTEGR is a compatability wrapper around the improved DSTEMR routine.
+*> DSTEGR is a compatibility wrapper around the improved DSTEMR routine.
 *> See DSTEMR for further details.
 *>
 *> One important change is that the ABSTOL parameter no longer provides any
@@ -127965,13 +128698,17 @@
 *> \param[in] VL
 *> \verbatim
 *>          VL is DOUBLE PRECISION
+*>
+*>          If RANGE='V', the lower bound of the interval to
+*>          be searched for eigenvalues. VL < VU.
+*>          Not referenced if RANGE = 'A' or 'I'.
 *> \endverbatim
 *>
 *> \param[in] VU
 *> \verbatim
 *>          VU is DOUBLE PRECISION
 *>
-*>          If RANGE='V', the lower and upper bounds of the interval to
+*>          If RANGE='V', the upper bound of the interval to
 *>          be searched for eigenvalues. VL < VU.
 *>          Not referenced if RANGE = 'A' or 'I'.
 *> \endverbatim
@@ -127979,14 +128716,19 @@
 *> \param[in] IL
 *> \verbatim
 *>          IL is INTEGER
+*>
+*>          If RANGE='I', the index of the
+*>          smallest eigenvalue to be returned.
+*>          1 <= IL <= IU <= N, if N > 0.
+*>          Not referenced if RANGE = 'A' or 'V'.
 *> \endverbatim
 *>
 *> \param[in] IU
 *> \verbatim
 *>          IU is INTEGER
 *>
-*>          If RANGE='I', the indices (in ascending order) of the
-*>          smallest and largest eigenvalues to be returned.
+*>          If RANGE='I', the index of the
+*>          largest eigenvalue to be returned.
 *>          1 <= IL <= IU <= N, if N > 0.
 *>          Not referenced if RANGE = 'A' or 'V'.
 *> \endverbatim
@@ -128095,12 +128837,12 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date November 2011
+*> \date June 2016
 *
 *> \ingroup doubleOTHERcomputational
 *
@@ -128116,10 +128858,10 @@
      $           ABSTOL, M, W, Z, LDZ, ISUPPZ, WORK, LWORK, IWORK,
      $           LIWORK, INFO )
 *
-*  -- LAPACK computational routine (version 3.4.0) --
+*  -- LAPACK computational routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     November 2011
+*     June 2016
 *
 *     .. Scalar Arguments ..
       CHARACTER          JOBZ, RANGE
@@ -128155,25 +128897,25 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DSTEIN + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dstein.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dstein.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dstein.f"> 
+*> Download DSTEIN + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dstein.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dstein.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dstein.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       SUBROUTINE DSTEIN( N, D, E, M, W, IBLOCK, ISPLIT, Z, LDZ, WORK,
 *                          IWORK, IFAIL, INFO )
-* 
+*
 *       .. Scalar Arguments ..
 *       INTEGER            INFO, LDZ, M, N
 *       ..
@@ -128182,7 +128924,7 @@
 *      $                   IWORK( * )
 *       DOUBLE PRECISION   D( * ), E( * ), W( * ), WORK( * ), Z( LDZ, * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -128314,12 +129056,12 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date November 2011
+*> \date December 2016
 *
 *> \ingroup doubleOTHERcomputational
 *
@@ -128327,10 +129069,10 @@
       SUBROUTINE DSTEIN( N, D, E, M, W, IBLOCK, ISPLIT, Z, LDZ, WORK,
      $                   IWORK, IFAIL, INFO )
 *
-*  -- LAPACK computational routine (version 3.4.0) --
+*  -- LAPACK computational routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     November 2011
+*     December 2016
 *
 *     .. Scalar Arguments ..
       INTEGER            INFO, LDZ, M, N
@@ -128362,8 +129104,8 @@
 *     ..
 *     .. External Functions ..
       INTEGER            IDAMAX
-      DOUBLE PRECISION   DASUM, DDOT, DLAMCH, DNRM2
-      EXTERNAL           IDAMAX, DASUM, DDOT, DLAMCH, DNRM2
+      DOUBLE PRECISION   DDOT, DLAMCH, DNRM2
+      EXTERNAL           IDAMAX, DDOT, DLAMCH, DNRM2
 *     ..
 *     .. External Subroutines ..
       EXTERNAL           DAXPY, DCOPY, DLAGTF, DLAGTS, DLARNV, DSCAL,
@@ -128450,7 +129192,7 @@
          BLKSIZ = BN - B1 + 1
          IF( BLKSIZ.EQ.1 )
      $      GO TO 60
-         GPIND = B1
+         GPIND = J1
 *
 *        Compute reorthogonalization criterion and stopping criterion.
 *
@@ -128523,9 +129265,10 @@
 *
 *           Normalize and scale the righthand side vector Pb.
 *
+            JMAX = IDAMAX( BLKSIZ, WORK( INDRV1+1 ), 1 )
             SCL = BLKSIZ*ONENRM*MAX( EPS,
      $            ABS( WORK( INDRV4+BLKSIZ ) ) ) /
-     $            DASUM( BLKSIZ, WORK( INDRV1+1 ), 1 )
+     $            ABS( WORK( INDRV1+JMAX ) )
             CALL DSCAL( BLKSIZ, SCL, WORK( INDRV1+1 ), 1 )
 *
 *           Solve the system LU = Pb.
@@ -128607,18 +129350,18 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DSTEMR + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dstemr.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dstemr.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dstemr.f"> 
+*> Download DSTEMR + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dstemr.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dstemr.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dstemr.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
@@ -128626,7 +129369,7 @@
 *       SUBROUTINE DSTEMR( JOBZ, RANGE, N, D, E, VL, VU, IL, IU,
 *                          M, W, Z, LDZ, NZC, ISUPPZ, TRYRAC, WORK, LWORK,
 *                          IWORK, LIWORK, INFO )
-* 
+*
 *       .. Scalar Arguments ..
 *       CHARACTER          JOBZ, RANGE
 *       LOGICAL            TRYRAC
@@ -128638,7 +129381,7 @@
 *       DOUBLE PRECISION   D( * ), E( * ), W( * ), WORK( * )
 *       DOUBLE PRECISION   Z( LDZ, * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -128741,13 +129484,17 @@
 *> \param[in] VL
 *> \verbatim
 *>          VL is DOUBLE PRECISION
+*>
+*>          If RANGE='V', the lower bound of the interval to
+*>          be searched for eigenvalues. VL < VU.
+*>          Not referenced if RANGE = 'A' or 'I'.
 *> \endverbatim
 *>
 *> \param[in] VU
 *> \verbatim
 *>          VU is DOUBLE PRECISION
 *>
-*>          If RANGE='V', the lower and upper bounds of the interval to
+*>          If RANGE='V', the upper bound of the interval to
 *>          be searched for eigenvalues. VL < VU.
 *>          Not referenced if RANGE = 'A' or 'I'.
 *> \endverbatim
@@ -128755,14 +129502,19 @@
 *> \param[in] IL
 *> \verbatim
 *>          IL is INTEGER
+*>
+*>          If RANGE='I', the index of the
+*>          smallest eigenvalue to be returned.
+*>          1 <= IL <= IU <= N, if N > 0.
+*>          Not referenced if RANGE = 'A' or 'V'.
 *> \endverbatim
 *>
 *> \param[in] IU
 *> \verbatim
 *>          IU is INTEGER
 *>
-*>          If RANGE='I', the indices (in ascending order) of the
-*>          smallest and largest eigenvalues to be returned.
+*>          If RANGE='I', the index of the
+*>          largest eigenvalue to be returned.
 *>          1 <= IL <= IU <= N, if N > 0.
 *>          Not referenced if RANGE = 'A' or 'V'.
 *> \endverbatim
@@ -128894,12 +129646,12 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date November 2013
+*> \date June 2016
 *
 *> \ingroup doubleOTHERcomputational
 *
@@ -128917,10 +129669,10 @@
      $                   M, W, Z, LDZ, NZC, ISUPPZ, TRYRAC, WORK, LWORK,
      $                   IWORK, LIWORK, INFO )
 *
-*  -- LAPACK computational routine (version 3.5.0) --
+*  -- LAPACK computational routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     November 2013
+*     June 2016
 *
 *     .. Scalar Arguments ..
       CHARACTER          JOBZ, RANGE
@@ -129322,9 +130074,9 @@
          IF( SCALE.NE.ONE ) THEN
             CALL DSCAL( M, ONE / SCALE, W, 1 )
          END IF
-  
+
       END IF
-    
+
 *
 *     If eigenvalues are not in increasing order, then sort them,
 *     possibly along with eigenvectors.
@@ -129375,24 +130127,24 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DSTEQR + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dsteqr.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dsteqr.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dsteqr.f"> 
+*> Download DSTEQR + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dsteqr.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dsteqr.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dsteqr.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       SUBROUTINE DSTEQR( COMPZ, N, D, E, Z, LDZ, WORK, INFO )
-* 
+*
 *       .. Scalar Arguments ..
 *       CHARACTER          COMPZ
 *       INTEGER            INFO, LDZ, N
@@ -129400,7 +130152,7 @@
 *       .. Array Arguments ..
 *       DOUBLE PRECISION   D( * ), E( * ), WORK( * ), Z( LDZ, * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -129492,22 +130244,22 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date November 2011
+*> \date December 2016
 *
 *> \ingroup auxOTHERcomputational
 *
 *  =====================================================================
       SUBROUTINE DSTEQR( COMPZ, N, D, E, Z, LDZ, WORK, INFO )
 *
-*  -- LAPACK computational routine (version 3.4.0) --
+*  -- LAPACK computational routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     November 2011
+*     December 2016
 *
 *     .. Scalar Arguments ..
       CHARACTER          COMPZ
@@ -129947,31 +130699,31 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DSTERF + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dsterf.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dsterf.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dsterf.f"> 
+*> Download DSTERF + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dsterf.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dsterf.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dsterf.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       SUBROUTINE DSTERF( N, D, E, INFO )
-* 
+*
 *       .. Scalar Arguments ..
 *       INTEGER            INFO, N
 *       ..
 *       .. Array Arguments ..
 *       DOUBLE PRECISION   D( * ), E( * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -130019,22 +130771,22 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date November 2011
+*> \date December 2016
 *
 *> \ingroup auxOTHERcomputational
 *
 *  =====================================================================
       SUBROUTINE DSTERF( N, D, E, INFO )
 *
-*  -- LAPACK computational routine (version 3.4.0) --
+*  -- LAPACK computational routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     November 2011
+*     December 2016
 *
 *     .. Scalar Arguments ..
       INTEGER            INFO, N
@@ -130135,7 +130887,7 @@
       ANORM = DLANST( 'M', LEND-L+1, D( L ), E( L ) )
       ISCALE = 0
       IF( ANORM.EQ.ZERO )
-     $   GO TO 10      
+     $   GO TO 10
       IF( (ANORM.GT.SSFMAX) ) THEN
          ISCALE = 1
          CALL DLASCL( 'G', 0, 0, ANORM, SSFMAX, LEND-L+1, 1, D( L ), N,
@@ -130373,24 +131125,24 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DSTEV + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dstev.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dstev.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dstev.f"> 
+*> Download DSTEV + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dstev.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dstev.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dstev.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       SUBROUTINE DSTEV( JOBZ, N, D, E, Z, LDZ, WORK, INFO )
-* 
+*
 *       .. Scalar Arguments ..
 *       CHARACTER          JOBZ
 *       INTEGER            INFO, LDZ, N
@@ -130398,7 +131150,7 @@
 *       .. Array Arguments ..
 *       DOUBLE PRECISION   D( * ), E( * ), WORK( * ), Z( LDZ, * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -130475,22 +131227,22 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date November 2011
+*> \date December 2016
 *
 *> \ingroup doubleOTHEReigen
 *
 *  =====================================================================
       SUBROUTINE DSTEV( JOBZ, N, D, E, Z, LDZ, WORK, INFO )
 *
-*  -- LAPACK driver routine (version 3.4.0) --
+*  -- LAPACK driver routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     November 2011
+*     December 2016
 *
 *     .. Scalar Arguments ..
       CHARACTER          JOBZ
@@ -130608,25 +131360,25 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DSTEVD + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dstevd.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dstevd.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dstevd.f"> 
+*> Download DSTEVD + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dstevd.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dstevd.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dstevd.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       SUBROUTINE DSTEVD( JOBZ, N, D, E, Z, LDZ, WORK, LWORK, IWORK,
 *                          LIWORK, INFO )
-* 
+*
 *       .. Scalar Arguments ..
 *       CHARACTER          JOBZ
 *       INTEGER            INFO, LDZ, LIWORK, LWORK, N
@@ -130635,7 +131387,7 @@
 *       INTEGER            IWORK( * )
 *       DOUBLE PRECISION   D( * ), E( * ), WORK( * ), Z( LDZ, * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -130756,12 +131508,12 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date November 2011
+*> \date December 2016
 *
 *> \ingroup doubleOTHEReigen
 *
@@ -130769,10 +131521,10 @@
       SUBROUTINE DSTEVD( JOBZ, N, D, E, Z, LDZ, WORK, LWORK, IWORK,
      $                   LIWORK, INFO )
 *
-*  -- LAPACK driver routine (version 3.4.0) --
+*  -- LAPACK driver routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     November 2011
+*     December 2016
 *
 *     .. Scalar Arguments ..
       CHARACTER          JOBZ
@@ -130910,18 +131662,18 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DSTEVR + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dstevr.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dstevr.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dstevr.f"> 
+*> Download DSTEVR + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dstevr.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dstevr.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dstevr.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
@@ -130929,7 +131681,7 @@
 *       SUBROUTINE DSTEVR( JOBZ, RANGE, N, D, E, VL, VU, IL, IU, ABSTOL,
 *                          M, W, Z, LDZ, ISUPPZ, WORK, LWORK, IWORK,
 *                          LIWORK, INFO )
-* 
+*
 *       .. Scalar Arguments ..
 *       CHARACTER          JOBZ, RANGE
 *       INTEGER            IL, INFO, IU, LDZ, LIWORK, LWORK, M, N
@@ -130939,7 +131691,7 @@
 *       INTEGER            ISUPPZ( * ), IWORK( * )
 *       DOUBLE PRECISION   D( * ), E( * ), W( * ), WORK( * ), Z( LDZ, * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -131036,12 +131788,15 @@
 *> \param[in] VL
 *> \verbatim
 *>          VL is DOUBLE PRECISION
+*>          If RANGE='V', the lower bound of the interval to
+*>          be searched for eigenvalues. VL < VU.
+*>          Not referenced if RANGE = 'A' or 'I'.
 *> \endverbatim
 *>
 *> \param[in] VU
 *> \verbatim
 *>          VU is DOUBLE PRECISION
-*>          If RANGE='V', the lower and upper bounds of the interval to
+*>          If RANGE='V', the upper bound of the interval to
 *>          be searched for eigenvalues. VL < VU.
 *>          Not referenced if RANGE = 'A' or 'I'.
 *> \endverbatim
@@ -131049,13 +131804,17 @@
 *> \param[in] IL
 *> \verbatim
 *>          IL is INTEGER
+*>          If RANGE='I', the index of the
+*>          smallest eigenvalue to be returned.
+*>          1 <= IL <= IU <= N, if N > 0; IL = 1 and IU = 0 if N = 0.
+*>          Not referenced if RANGE = 'A' or 'V'.
 *> \endverbatim
 *>
 *> \param[in] IU
 *> \verbatim
 *>          IU is INTEGER
-*>          If RANGE='I', the indices (in ascending order) of the
-*>          smallest and largest eigenvalues to be returned.
+*>          If RANGE='I', the index of the
+*>          largest eigenvalue to be returned.
 *>          1 <= IL <= IU <= N, if N > 0; IL = 1 and IU = 0 if N = 0.
 *>          Not referenced if RANGE = 'A' or 'V'.
 *> \endverbatim
@@ -131183,12 +131942,12 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date November 2011
+*> \date June 2016
 *
 *> \ingroup doubleOTHEReigen
 *
@@ -131205,10 +131964,10 @@
      $                   M, W, Z, LDZ, ISUPPZ, WORK, LWORK, IWORK,
      $                   LIWORK, INFO )
 *
-*  -- LAPACK driver routine (version 3.4.0) --
+*  -- LAPACK driver routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     November 2011
+*     June 2016
 *
 *     .. Scalar Arguments ..
       CHARACTER          JOBZ, RANGE
@@ -131343,8 +132102,10 @@
 *     Scale matrix to allowable range, if necessary.
 *
       ISCALE = 0
-      VLL = VL
-      VUU = VU
+      IF( VALEIG ) THEN
+         VLL = VL
+         VUU = VU
+      END IF
 *
       TNRM = DLANST( 'M', N, D, E )
       IF( TNRM.GT.ZERO .AND. TNRM.LT.RMIN ) THEN
@@ -131485,25 +132246,25 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DSTEVX + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dstevx.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dstevx.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dstevx.f"> 
+*> Download DSTEVX + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dstevx.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dstevx.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dstevx.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       SUBROUTINE DSTEVX( JOBZ, RANGE, N, D, E, VL, VU, IL, IU, ABSTOL,
 *                          M, W, Z, LDZ, WORK, IWORK, IFAIL, INFO )
-* 
+*
 *       .. Scalar Arguments ..
 *       CHARACTER          JOBZ, RANGE
 *       INTEGER            IL, INFO, IU, LDZ, M, N
@@ -131513,7 +132274,7 @@
 *       INTEGER            IFAIL( * ), IWORK( * )
 *       DOUBLE PRECISION   D( * ), E( * ), W( * ), WORK( * ), Z( LDZ, * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -131572,12 +132333,15 @@
 *> \param[in] VL
 *> \verbatim
 *>          VL is DOUBLE PRECISION
+*>          If RANGE='V', the lower bound of the interval to
+*>          be searched for eigenvalues. VL < VU.
+*>          Not referenced if RANGE = 'A' or 'I'.
 *> \endverbatim
 *>
 *> \param[in] VU
 *> \verbatim
 *>          VU is DOUBLE PRECISION
-*>          If RANGE='V', the lower and upper bounds of the interval to
+*>          If RANGE='V', the upper bound of the interval to
 *>          be searched for eigenvalues. VL < VU.
 *>          Not referenced if RANGE = 'A' or 'I'.
 *> \endverbatim
@@ -131585,13 +132349,17 @@
 *> \param[in] IL
 *> \verbatim
 *>          IL is INTEGER
+*>          If RANGE='I', the index of the
+*>          smallest eigenvalue to be returned.
+*>          1 <= IL <= IU <= N, if N > 0; IL = 1 and IU = 0 if N = 0.
+*>          Not referenced if RANGE = 'A' or 'V'.
 *> \endverbatim
 *>
 *> \param[in] IU
 *> \verbatim
 *>          IU is INTEGER
-*>          If RANGE='I', the indices (in ascending order) of the
-*>          smallest and largest eigenvalues to be returned.
+*>          If RANGE='I', the index of the
+*>          largest eigenvalue to be returned.
 *>          1 <= IL <= IU <= N, if N > 0; IL = 1 and IU = 0 if N = 0.
 *>          Not referenced if RANGE = 'A' or 'V'.
 *> \endverbatim
@@ -131690,12 +132458,12 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date November 2011
+*> \date June 2016
 *
 *> \ingroup doubleOTHEReigen
 *
@@ -131703,10 +132471,10 @@
       SUBROUTINE DSTEVX( JOBZ, RANGE, N, D, E, VL, VU, IL, IU, ABSTOL,
      $                   M, W, Z, LDZ, WORK, IWORK, IFAIL, INFO )
 *
-*  -- LAPACK driver routine (version 3.4.0) --
+*  -- LAPACK driver routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     November 2011
+*     June 2016
 *
 *     .. Scalar Arguments ..
       CHARACTER          JOBZ, RANGE
@@ -131942,25 +132710,25 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DSYCON + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dsycon.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dsycon.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dsycon.f"> 
+*> Download DSYCON + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dsycon.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dsycon.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dsycon.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       SUBROUTINE DSYCON( UPLO, N, A, LDA, IPIV, ANORM, RCOND, WORK,
 *                          IWORK, INFO )
-* 
+*
 *       .. Scalar Arguments ..
 *       CHARACTER          UPLO
 *       INTEGER            INFO, LDA, N
@@ -131970,7 +132738,7 @@
 *       INTEGER            IPIV( * ), IWORK( * )
 *       DOUBLE PRECISION   A( LDA, * ), WORK( * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -132057,12 +132825,12 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date November 2011
+*> \date December 2016
 *
 *> \ingroup doubleSYcomputational
 *
@@ -132070,10 +132838,10 @@
       SUBROUTINE DSYCON( UPLO, N, A, LDA, IPIV, ANORM, RCOND, WORK,
      $                   IWORK, INFO )
 *
-*  -- LAPACK computational routine (version 3.4.0) --
+*  -- LAPACK computational routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     November 2011
+*     December 2016
 *
 *     .. Scalar Arguments ..
       CHARACTER          UPLO
@@ -132186,33 +132954,33 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DSYCONV + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dsyconv.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dsyconv.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dsyconv.f"> 
+*> Download DSYCONV + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dsyconv.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dsyconv.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dsyconv.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
-*       SUBROUTINE DSYCONV( UPLO, WAY, N, A, LDA, IPIV, WORK, INFO )
-* 
+*       SUBROUTINE DSYCONV( UPLO, WAY, N, A, LDA, IPIV, E, INFO )
+*
 *       .. Scalar Arguments ..
 *       CHARACTER          UPLO, WAY
 *       INTEGER            INFO, LDA, N
 *       ..
 *       .. Array Arguments ..
 *       INTEGER            IPIV( * )
-*       DOUBLE PRECISION   A( LDA, * ), WORK( * )
+*       DOUBLE PRECISION   A( LDA, * ), E( * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -132220,7 +132988,7 @@
 *> \verbatim
 *>
 *> DSYCONV convert A given by TRF into L and D and vice-versa.
-*> Get Non-diag elements of D (returned in workspace) and 
+*> Get Non-diag elements of D (returned in workspace) and
 *> apply or reverse permutation done in TRF.
 *> \endverbatim
 *
@@ -132239,7 +133007,7 @@
 *> \param[in] WAY
 *> \verbatim
 *>          WAY is CHARACTER*1
-*>          = 'C': Convert 
+*>          = 'C': Convert
 *>          = 'R': Revert
 *> \endverbatim
 *>
@@ -132249,7 +133017,7 @@
 *>          The order of the matrix A.  N >= 0.
 *> \endverbatim
 *>
-*> \param[in] A
+*> \param[in,out] A
 *> \verbatim
 *>          A is DOUBLE PRECISION array, dimension (LDA,N)
 *>          The block diagonal matrix D and the multipliers used to
@@ -132269,9 +133037,11 @@
 *>          as determined by DSYTRF.
 *> \endverbatim
 *>
-*> \param[out] WORK
+*> \param[out] E
 *> \verbatim
-*>          WORK is DOUBLE PRECISION array, dimension (N)
+*>          E is DOUBLE PRECISION array, dimension (N)
+*>          E stores the supdiagonal/subdiagonal of the symmetric 1-by-1
+*>          or 2-by-2 block diagonal matrix D in LDLT.
 *> \endverbatim
 *>
 *> \param[out] INFO
@@ -132284,22 +133054,22 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date November 2011
+*> \date December 2016
 *
 *> \ingroup doubleSYcomputational
 *
 *  =====================================================================
-      SUBROUTINE DSYCONV( UPLO, WAY, N, A, LDA, IPIV, WORK, INFO )
+      SUBROUTINE DSYCONV( UPLO, WAY, N, A, LDA, IPIV, E, INFO )
 *
-*  -- LAPACK computational routine (version 3.4.0) --
+*  -- LAPACK computational routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     November 2011
+*     December 2016
 *
 *     .. Scalar Arguments ..
       CHARACTER          UPLO, WAY
@@ -132307,7 +133077,7 @@
 *     ..
 *     .. Array Arguments ..
       INTEGER            IPIV( * )
-      DOUBLE PRECISION   A( LDA, * ), WORK( * )
+      DOUBLE PRECISION   A( LDA, * ), E( * )
 *     ..
 *
 *  =====================================================================
@@ -132362,20 +133132,21 @@
 *
          IF ( CONVERT ) THEN
             I=N
-            WORK(1)=ZERO
+            E(1)=ZERO
             DO WHILE ( I .GT. 1 )
                IF( IPIV(I) .LT. 0 ) THEN
-                  WORK(I)=A(I-1,I)
+                  E(I)=A(I-1,I)
+                  E(I-1)=ZERO
                   A(I-1,I)=ZERO
                   I=I-1
                ELSE
-                  WORK(I)=ZERO
+                  E(I)=ZERO
                ENDIF
                I=I-1
             END DO
 *
 *        Convert PERMUTATIONS
-*  
+*
          I=N
          DO WHILE ( I .GE. 1 )
             IF( IPIV(I) .GT. 0) THEN
@@ -132407,7 +133178,7 @@
 *
 *
 *        Revert PERMUTATIONS
-*  
+*
             I=1
             DO WHILE ( I .LE. N )
                IF( IPIV(I) .GT. 0 ) THEN
@@ -132438,7 +133209,7 @@
             I=N
             DO WHILE ( I .GT. 1 )
                IF( IPIV(I) .LT. 0 ) THEN
-                  A(I-1,I)=WORK(I)
+                  A(I-1,I)=E(I)
                   I=I-1
                ENDIF
                I=I-1
@@ -132456,14 +133227,15 @@
 *        Convert VALUE
 *
             I=1
-            WORK(N)=ZERO
+            E(N)=ZERO
             DO WHILE ( I .LE. N )
                IF( I.LT.N .AND. IPIV(I) .LT. 0 ) THEN
-                  WORK(I)=A(I+1,I)
+                  E(I)=A(I+1,I)
+                  E(I+1)=ZERO
                   A(I+1,I)=ZERO
                   I=I+1
                ELSE
-                  WORK(I)=ZERO
+                  E(I)=ZERO
                ENDIF
                I=I+1
             END DO
@@ -132530,8 +133302,8 @@
 *
             I=1
             DO WHILE ( I .LE. N-1 )
-               IF( IPIV(I) .LT. ZERO ) THEN
-                  A(I+1,I)=WORK(I)
+               IF( IPIV(I) .LT. 0 ) THEN
+                  A(I+1,I)=E(I)
                   I=I+1
                ENDIF
                I=I+1
@@ -132548,24 +133320,24 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DSYEQUB + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dsyequb.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dsyequb.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dsyequb.f"> 
+*> Download DSYEQUB + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dsyequb.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dsyequb.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dsyequb.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       SUBROUTINE DSYEQUB( UPLO, N, A, LDA, S, SCOND, AMAX, WORK, INFO )
-* 
+*
 *       .. Scalar Arguments ..
 *       INTEGER            INFO, LDA, N
 *       DOUBLE PRECISION   AMAX, SCOND
@@ -132574,7 +133346,7 @@
 *       .. Array Arguments ..
 *       DOUBLE PRECISION   A( LDA, * ), S( * ), WORK( * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -132582,12 +133354,11 @@
 *> \verbatim
 *>
 *> DSYEQUB computes row and column scalings intended to equilibrate a
-*> symmetric matrix A and reduce its condition number
-*> (with respect to the two-norm).  S contains the scale factors,
-*> S(i) = 1/sqrt(A(i,i)), chosen so that the scaled matrix B with
-*> elements B(i,j) = S(i)*A(i,j)*S(j) has ones on the diagonal.  This
-*> choice of S puts the condition number of B within a factor N of the
-*> smallest possible condition number over all possible diagonal
+*> symmetric matrix A (with respect to the Euclidean norm) and reduce
+*> its condition number. The scale factors S are computed by the BIN
+*> algorithm (see references) so that the scaled matrix B with elements
+*> B(i,j) = S(i)*A(i,j)*S(j) has a condition number within a factor N of
+*> the smallest possible condition number over all possible diagonal
 *> scalings.
 *> \endverbatim
 *
@@ -132597,30 +133368,27 @@
 *> \param[in] UPLO
 *> \verbatim
 *>          UPLO is CHARACTER*1
-*>          Specifies whether the details of the factorization are stored
-*>          as an upper or lower triangular matrix.
-*>          = 'U':  Upper triangular, form is A = U*D*U**T;
-*>          = 'L':  Lower triangular, form is A = L*D*L**T.
+*>          = 'U':  Upper triangle of A is stored;
+*>          = 'L':  Lower triangle of A is stored.
 *> \endverbatim
 *>
 *> \param[in] N
 *> \verbatim
 *>          N is INTEGER
-*>          The order of the matrix A.  N >= 0.
+*>          The order of the matrix A. N >= 0.
 *> \endverbatim
 *>
 *> \param[in] A
 *> \verbatim
 *>          A is DOUBLE PRECISION array, dimension (LDA,N)
-*>          The N-by-N symmetric matrix whose scaling
-*>          factors are to be computed.  Only the diagonal elements of A
-*>          are referenced.
+*>          The N-by-N symmetric matrix whose scaling factors are to be
+*>          computed.
 *> \endverbatim
 *>
 *> \param[in] LDA
 *> \verbatim
 *>          LDA is INTEGER
-*>          The leading dimension of the array A.  LDA >= max(1,N).
+*>          The leading dimension of the array A. LDA >= max(1,N).
 *> \endverbatim
 *>
 *> \param[out] S
@@ -132633,21 +133401,21 @@
 *> \verbatim
 *>          SCOND is DOUBLE PRECISION
 *>          If INFO = 0, S contains the ratio of the smallest S(i) to
-*>          the largest S(i).  If SCOND >= 0.1 and AMAX is neither too
+*>          the largest S(i). If SCOND >= 0.1 and AMAX is neither too
 *>          large nor too small, it is not worth scaling by S.
 *> \endverbatim
 *>
 *> \param[out] AMAX
 *> \verbatim
 *>          AMAX is DOUBLE PRECISION
-*>          Absolute value of largest matrix element.  If AMAX is very
-*>          close to overflow or very close to underflow, the matrix
-*>          should be scaled.
+*>          Largest absolute value of any matrix element. If AMAX is
+*>          very close to overflow or very close to underflow, the
+*>          matrix should be scaled.
 *> \endverbatim
 *>
 *> \param[out] WORK
 *> \verbatim
-*>          WORK is DOUBLE PRECISION array, dimension (3*N)
+*>          WORK is DOUBLE PRECISION array, dimension (2*N)
 *> \endverbatim
 *>
 *> \param[out] INFO
@@ -132661,12 +133429,12 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date November 2011
+*> \date December 2016
 *
 *> \ingroup doubleSYcomputational
 *
@@ -132676,15 +133444,15 @@
 *>  Livne, O.E. and Golub, G.H., "Scaling by Binormalization", \n
 *>  Numerical Algorithms, vol. 35, no. 1, pp. 97-120, January 2004. \n
 *>  DOI 10.1023/B:NUMA.0000016606.32820.69 \n
-*>  Tech report version: http://ruready.utah.edu/archive/papers/bin.pdf
+*>  Tech report version: http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.3.1679
 *>
 *  =====================================================================
       SUBROUTINE DSYEQUB( UPLO, N, A, LDA, S, SCOND, AMAX, WORK, INFO )
 *
-*  -- LAPACK computational routine (version 3.4.0) --
+*  -- LAPACK computational routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     November 2011
+*     December 2016
 *
 *     .. Scalar Arguments ..
       INTEGER            INFO, LDA, N
@@ -132699,7 +133467,7 @@
 *
 *     .. Parameters ..
       DOUBLE PRECISION   ONE, ZERO
-      PARAMETER          ( ONE = 1.0D+0, ZERO = 0.0D+0 )
+      PARAMETER          ( ONE = 1.0D0, ZERO = 0.0D0 )
       INTEGER            MAX_ITER
       PARAMETER          ( MAX_ITER = 100 )
 *     ..
@@ -132722,19 +133490,19 @@
 *     ..
 *     .. Executable Statements ..
 *
-*     Test input parameters.
+*     Test the input parameters.
 *
       INFO = 0
       IF ( .NOT. ( LSAME( UPLO, 'U' ) .OR. LSAME( UPLO, 'L' ) ) ) THEN
-        INFO = -1
+         INFO = -1
       ELSE IF ( N .LT. 0 ) THEN
-        INFO = -2
+         INFO = -2
       ELSE IF ( LDA .LT. MAX( 1, N ) ) THEN
-        INFO = -4
+         INFO = -4
       END IF
       IF ( INFO .NE. 0 ) THEN
-        CALL XERBLA( 'DSYEQUB', -INFO )
-        RETURN
+         CALL XERBLA( 'DSYEQUB', -INFO )
+         RETURN
       END IF
 
       UP = LSAME( UPLO, 'U' )
@@ -132743,12 +133511,12 @@
 *     Quick return if possible.
 *
       IF ( N .EQ. 0 ) THEN
-        SCOND = ONE
-        RETURN
+         SCOND = ONE
+         RETURN
       END IF
 
       DO I = 1, N
-        S( I ) = ZERO
+         S( I ) = ZERO
       END DO
 
       AMAX = ZERO
@@ -132757,7 +133525,7 @@
             DO I = 1, J-1
                S( I ) = MAX( S( I ), ABS( A( I, J ) ) )
                S( J ) = MAX( S( J ), ABS( A( I, J ) ) )
-               AMAX = MAX( AMAX, ABS( A(I, J) ) )
+               AMAX = MAX( AMAX, ABS( A( I, J ) ) )
             END DO
             S( J ) = MAX( S( J ), ABS( A( J, J ) ) )
             AMAX = MAX( AMAX, ABS( A( J, J ) ) )
@@ -132774,99 +133542,95 @@
          END DO
       END IF
       DO J = 1, N
-         S( J ) = 1.0D+0 / S( J )
+         S( J ) = 1.0D0 / S( J )
       END DO
 
-      TOL = ONE / SQRT(2.0D0 * N)
+      TOL = ONE / SQRT( 2.0D0 * N )
 
       DO ITER = 1, MAX_ITER
-         SCALE = 0.0D+0
-         SUMSQ = 0.0D+0
-*       BETA = |A|S
-        DO I = 1, N
-           WORK(I) = ZERO
-        END DO
-        IF ( UP ) THEN
-           DO J = 1, N
-              DO I = 1, J-1
-                 T = ABS( A( I, J ) )
-                 WORK( I ) = WORK( I ) + ABS( A( I, J ) ) * S( J )
-                 WORK( J ) = WORK( J ) + ABS( A( I, J ) ) * S( I )
-              END DO
-              WORK( J ) = WORK( J ) + ABS( A( J, J ) ) * S( J )
-           END DO
-        ELSE
-           DO J = 1, N
-              WORK( J ) = WORK( J ) + ABS( A( J, J ) ) * S( J )
-              DO I = J+1, N
-                 T = ABS( A( I, J ) )
-                 WORK( I ) = WORK( I ) + ABS( A( I, J ) ) * S( J )
-                 WORK( J ) = WORK( J ) + ABS( A( I, J ) ) * S( I )
-              END DO
-           END DO
-        END IF
-
-*       avg = s^T beta / n
-        AVG = 0.0D+0
-        DO I = 1, N
-          AVG = AVG + S( I )*WORK( I )
-        END DO
-        AVG = AVG / N
-
-        STD = 0.0D+0
-        DO I = 2*N+1, 3*N
-           WORK( I ) = S( I-2*N ) * WORK( I-2*N ) - AVG
-        END DO
-        CALL DLASSQ( N, WORK( 2*N+1 ), 1, SCALE, SUMSQ )
-        STD = SCALE * SQRT( SUMSQ / N )
+         SCALE = 0.0D0
+         SUMSQ = 0.0D0
+*        beta = |A|s
+         DO I = 1, N
+            WORK( I ) = ZERO
+         END DO
+         IF ( UP ) THEN
+            DO J = 1, N
+               DO I = 1, J-1
+                  WORK( I ) = WORK( I ) + ABS( A( I, J ) ) * S( J )
+                  WORK( J ) = WORK( J ) + ABS( A( I, J ) ) * S( I )
+               END DO
+               WORK( J ) = WORK( J ) + ABS( A( J, J ) ) * S( J )
+            END DO
+         ELSE
+            DO J = 1, N
+               WORK( J ) = WORK( J ) + ABS( A( J, J ) ) * S( J )
+               DO I = J+1, N
+                  WORK( I ) = WORK( I ) + ABS( A( I, J ) ) * S( J )
+                  WORK( J ) = WORK( J ) + ABS( A( I, J ) ) * S( I )
+               END DO
+            END DO
+         END IF
 
-        IF ( STD .LT. TOL * AVG ) GOTO 999
+*        avg = s^T beta / n
+         AVG = 0.0D0
+         DO I = 1, N
+            AVG = AVG + S( I )*WORK( I )
+         END DO
+         AVG = AVG / N
 
-        DO I = 1, N
-          T = ABS( A( I, I ) )
-          SI = S( I )
-          C2 = ( N-1 ) * T
-          C1 = ( N-2 ) * ( WORK( I ) - T*SI )
-          C0 = -(T*SI)*SI + 2*WORK( I )*SI - N*AVG
-          D = C1*C1 - 4*C0*C2
+         STD = 0.0D0
+         DO I = N+1, 2*N
+            WORK( I ) = S( I-N ) * WORK( I-N ) - AVG
+         END DO
+         CALL DLASSQ( N, WORK( N+1 ), 1, SCALE, SUMSQ )
+         STD = SCALE * SQRT( SUMSQ / N )
 
-          IF ( D .LE. 0 ) THEN
-            INFO = -1
-            RETURN
-          END IF
-          SI = -2*C0 / ( C1 + SQRT( D ) )
+         IF ( STD .LT. TOL * AVG ) GOTO 999
 
-          D = SI - S( I )
-          U = ZERO
-          IF ( UP ) THEN
-            DO J = 1, I
-              T = ABS( A( J, I ) )
-              U = U + S( J )*T
-              WORK( J ) = WORK( J ) + D*T
-            END DO
-            DO J = I+1,N
-              T = ABS( A( I, J ) )
-              U = U + S( J )*T
-              WORK( J ) = WORK( J ) + D*T
-            END DO
-          ELSE
-            DO J = 1, I
-              T = ABS( A( I, J ) )
-              U = U + S( J )*T
-              WORK( J ) = WORK( J ) + D*T
-            END DO
-            DO J = I+1,N
-              T = ABS( A( J, I ) )
-              U = U + S( J )*T
-              WORK( J ) = WORK( J ) + D*T
-            END DO
-          END IF
+         DO I = 1, N
+            T = ABS( A( I, I ) )
+            SI = S( I )
+            C2 = ( N-1 ) * T
+            C1 = ( N-2 ) * ( WORK( I ) - T*SI )
+            C0 = -(T*SI)*SI + 2*WORK( I )*SI - N*AVG
+            D = C1*C1 - 4*C0*C2
 
-          AVG = AVG + ( U + WORK( I ) ) * D / N
-          S( I ) = SI
+            IF ( D .LE. 0 ) THEN
+               INFO = -1
+               RETURN
+            END IF
+            SI = -2*C0 / ( C1 + SQRT( D ) )
 
-        END DO
+            D = SI - S( I )
+            U = ZERO
+            IF ( UP ) THEN
+               DO J = 1, I
+                  T = ABS( A( J, I ) )
+                  U = U + S( J )*T
+                  WORK( J ) = WORK( J ) + D*T
+               END DO
+               DO J = I+1,N
+                  T = ABS( A( I, J ) )
+                  U = U + S( J )*T
+                  WORK( J ) = WORK( J ) + D*T
+               END DO
+            ELSE
+               DO J = 1, I
+                  T = ABS( A( I, J ) )
+                  U = U + S( J )*T
+                  WORK( J ) = WORK( J ) + D*T
+               END DO
+               DO J = I+1,N
+                  T = ABS( A( J, I ) )
+                  U = U + S( J )*T
+                  WORK( J ) = WORK( J ) + D*T
+               END DO
+            END IF
 
+            AVG = AVG + ( U + WORK( I ) ) * D / N
+            S( I ) = SI
+         END DO
       END DO
 
  999  CONTINUE
@@ -132875,13 +133639,13 @@
       BIGNUM = ONE / SMLNUM
       SMIN = BIGNUM
       SMAX = ZERO
-      T = ONE / SQRT(AVG)
+      T = ONE / SQRT( AVG )
       BASE = DLAMCH( 'B' )
       U = ONE / LOG( BASE )
       DO I = 1, N
-        S( I ) = BASE ** INT( U * LOG( S( I ) * T ) )
-        SMIN = MIN( SMIN, S( I ) )
-        SMAX = MAX( SMAX, S( I ) )
+         S( I ) = BASE ** INT( U * LOG( S( I ) * T ) )
+         SMIN = MIN( SMIN, S( I ) )
+         SMAX = MAX( SMAX, S( I ) )
       END DO
       SCOND = MAX( SMIN, SMLNUM ) / MIN( SMAX, BIGNUM )
 *
@@ -132890,24 +133654,24 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DSYEV + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dsyev.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dsyev.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dsyev.f"> 
+*> Download DSYEV + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dsyev.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dsyev.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dsyev.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       SUBROUTINE DSYEV( JOBZ, UPLO, N, A, LDA, W, WORK, LWORK, INFO )
-* 
+*
 *       .. Scalar Arguments ..
 *       CHARACTER          JOBZ, UPLO
 *       INTEGER            INFO, LDA, LWORK, N
@@ -132915,7 +133679,7 @@
 *       .. Array Arguments ..
 *       DOUBLE PRECISION   A( LDA, * ), W( * ), WORK( * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -133008,22 +133772,22 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date November 2011
+*> \date December 2016
 *
 *> \ingroup doubleSYeigen
 *
 *  =====================================================================
       SUBROUTINE DSYEV( JOBZ, UPLO, N, A, LDA, W, WORK, LWORK, INFO )
 *
-*  -- LAPACK driver routine (version 3.4.0) --
+*  -- LAPACK driver routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     November 2011
+*     December 2016
 *
 *     .. Scalar Arguments ..
       CHARACTER          JOBZ, UPLO
@@ -133176,25 +133940,25 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DSYEVD + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dsyevd.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dsyevd.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dsyevd.f"> 
+*> Download DSYEVD + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dsyevd.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dsyevd.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dsyevd.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       SUBROUTINE DSYEVD( JOBZ, UPLO, N, A, LDA, W, WORK, LWORK, IWORK,
 *                          LIWORK, INFO )
-* 
+*
 *       .. Scalar Arguments ..
 *       CHARACTER          JOBZ, UPLO
 *       INTEGER            INFO, LDA, LIWORK, LWORK, N
@@ -133203,7 +133967,7 @@
 *       INTEGER            IWORK( * )
 *       DOUBLE PRECISION   A( LDA, * ), W( * ), WORK( * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -133336,12 +134100,12 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date September 2012
+*> \date December 2016
 *
 *> \ingroup doubleSYeigen
 *
@@ -133359,10 +134123,10 @@
       SUBROUTINE DSYEVD( JOBZ, UPLO, N, A, LDA, W, WORK, LWORK, IWORK,
      $                   LIWORK, INFO )
 *
-*  -- LAPACK driver routine (version 3.4.2) --
+*  -- LAPACK driver routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     September 2012
+*     December 2016
 *
 *     .. Scalar Arguments ..
       CHARACTER          JOBZ, UPLO
@@ -133533,18 +134297,18 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DSYEVR + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dsyevr.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dsyevr.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dsyevr.f"> 
+*> Download DSYEVR + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dsyevr.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dsyevr.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dsyevr.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
@@ -133552,7 +134316,7 @@
 *       SUBROUTINE DSYEVR( JOBZ, RANGE, UPLO, N, A, LDA, VL, VU, IL, IU,
 *                          ABSTOL, M, W, Z, LDZ, ISUPPZ, WORK, LWORK,
 *                          IWORK, LIWORK, INFO )
-* 
+*
 *       .. Scalar Arguments ..
 *       CHARACTER          JOBZ, RANGE, UPLO
 *       INTEGER            IL, INFO, IU, LDA, LDZ, LIWORK, LWORK, M, N
@@ -133562,7 +134326,7 @@
 *       INTEGER            ISUPPZ( * ), IWORK( * )
 *       DOUBLE PRECISION   A( LDA, * ), W( * ), WORK( * ), Z( LDZ, * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -133684,12 +134448,15 @@
 *> \param[in] VL
 *> \verbatim
 *>          VL is DOUBLE PRECISION
+*>          If RANGE='V', the lower bound of the interval to
+*>          be searched for eigenvalues. VL < VU.
+*>          Not referenced if RANGE = 'A' or 'I'.
 *> \endverbatim
 *>
 *> \param[in] VU
 *> \verbatim
 *>          VU is DOUBLE PRECISION
-*>          If RANGE='V', the lower and upper bounds of the interval to
+*>          If RANGE='V', the upper bound of the interval to
 *>          be searched for eigenvalues. VL < VU.
 *>          Not referenced if RANGE = 'A' or 'I'.
 *> \endverbatim
@@ -133697,13 +134464,17 @@
 *> \param[in] IL
 *> \verbatim
 *>          IL is INTEGER
+*>          If RANGE='I', the index of the
+*>          smallest eigenvalue to be returned.
+*>          1 <= IL <= IU <= N, if N > 0; IL = 1 and IU = 0 if N = 0.
+*>          Not referenced if RANGE = 'A' or 'V'.
 *> \endverbatim
 *>
 *> \param[in] IU
 *> \verbatim
 *>          IU is INTEGER
-*>          If RANGE='I', the indices (in ascending order) of the
-*>          smallest and largest eigenvalues to be returned.
+*>          If RANGE='I', the index of the
+*>          largest eigenvalue to be returned.
 *>          1 <= IL <= IU <= N, if N > 0; IL = 1 and IU = 0 if N = 0.
 *>          Not referenced if RANGE = 'A' or 'V'.
 *> \endverbatim
@@ -133780,7 +134551,9 @@
 *>          The support of the eigenvectors in Z, i.e., the indices
 *>          indicating the nonzero elements in Z. The i-th eigenvector
 *>          is nonzero only in elements ISUPPZ( 2*i-1 ) through
-*>          ISUPPZ( 2*i ).
+*>          ISUPPZ( 2*i ). This is an output of DSTEMR (tridiagonal
+*>          matrix). The support of the eigenvectors of A is typically
+*>          1:N because of the orthogonal transformations applied by DORMTR.
 *>          Implemented only for RANGE = 'A' or 'I' and IU - IL = N - 1
 *> \endverbatim
 *>
@@ -133832,12 +134605,12 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date September 2012
+*> \date June 2016
 *
 *> \ingroup doubleSYeigen
 *
@@ -133856,10 +134629,10 @@
      $                   ABSTOL, M, W, Z, LDZ, ISUPPZ, WORK, LWORK,
      $                   IWORK, LIWORK, INFO )
 *
-*  -- LAPACK driver routine (version 3.4.2) --
+*  -- LAPACK driver routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     September 2012
+*     June 2016
 *
 *     .. Scalar Arguments ..
       CHARACTER          JOBZ, RANGE, UPLO
@@ -134104,7 +134877,7 @@
 *
 *
 *        Apply orthogonal matrix used in reduction to tridiagonal
-*        form to eigenvectors returned by DSTEIN.
+*        form to eigenvectors returned by DSTEMR.
 *
             IF( WANTZ .AND. INFO.EQ.0 ) THEN
                INDWKN = INDE
@@ -134205,18 +134978,18 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DSYEVX + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dsyevx.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dsyevx.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dsyevx.f"> 
+*> Download DSYEVX + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dsyevx.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dsyevx.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dsyevx.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
@@ -134224,7 +134997,7 @@
 *       SUBROUTINE DSYEVX( JOBZ, RANGE, UPLO, N, A, LDA, VL, VU, IL, IU,
 *                          ABSTOL, M, W, Z, LDZ, WORK, LWORK, IWORK,
 *                          IFAIL, INFO )
-* 
+*
 *       .. Scalar Arguments ..
 *       CHARACTER          JOBZ, RANGE, UPLO
 *       INTEGER            IL, INFO, IU, LDA, LDZ, LWORK, M, N
@@ -134234,7 +135007,7 @@
 *       INTEGER            IFAIL( * ), IWORK( * )
 *       DOUBLE PRECISION   A( LDA, * ), W( * ), WORK( * ), Z( LDZ, * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -134301,12 +135074,15 @@
 *> \param[in] VL
 *> \verbatim
 *>          VL is DOUBLE PRECISION
+*>          If RANGE='V', the lower bound of the interval to
+*>          be searched for eigenvalues. VL < VU.
+*>          Not referenced if RANGE = 'A' or 'I'.
 *> \endverbatim
 *>
 *> \param[in] VU
 *> \verbatim
 *>          VU is DOUBLE PRECISION
-*>          If RANGE='V', the lower and upper bounds of the interval to
+*>          If RANGE='V', the upper bound of the interval to
 *>          be searched for eigenvalues. VL < VU.
 *>          Not referenced if RANGE = 'A' or 'I'.
 *> \endverbatim
@@ -134314,13 +135090,17 @@
 *> \param[in] IL
 *> \verbatim
 *>          IL is INTEGER
+*>          If RANGE='I', the index of the
+*>          smallest eigenvalue to be returned.
+*>          1 <= IL <= IU <= N, if N > 0; IL = 1 and IU = 0 if N = 0.
+*>          Not referenced if RANGE = 'A' or 'V'.
 *> \endverbatim
 *>
 *> \param[in] IU
 *> \verbatim
 *>          IU is INTEGER
-*>          If RANGE='I', the indices (in ascending order) of the
-*>          smallest and largest eigenvalues to be returned.
+*>          If RANGE='I', the index of the
+*>          largest eigenvalue to be returned.
 *>          1 <= IL <= IU <= N, if N > 0; IL = 1 and IU = 0 if N = 0.
 *>          Not referenced if RANGE = 'A' or 'V'.
 *> \endverbatim
@@ -134435,12 +135215,12 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date November 2011
+*> \date June 2016
 *
 *> \ingroup doubleSYeigen
 *
@@ -134449,10 +135229,10 @@
      $                   ABSTOL, M, W, Z, LDZ, WORK, LWORK, IWORK,
      $                   IFAIL, INFO )
 *
-*  -- LAPACK driver routine (version 3.4.0) --
+*  -- LAPACK driver routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     November 2011
+*     June 2016
 *
 *     .. Scalar Arguments ..
       CHARACTER          JOBZ, RANGE, UPLO
@@ -134752,24 +135532,24 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DSYGS2 + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dsygs2.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dsygs2.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dsygs2.f"> 
+*> Download DSYGS2 + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dsygs2.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dsygs2.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dsygs2.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       SUBROUTINE DSYGS2( ITYPE, UPLO, N, A, LDA, B, LDB, INFO )
-* 
+*
 *       .. Scalar Arguments ..
 *       CHARACTER          UPLO
 *       INTEGER            INFO, ITYPE, LDA, LDB, N
@@ -134777,7 +135557,7 @@
 *       .. Array Arguments ..
 *       DOUBLE PRECISION   A( LDA, * ), B( LDB, * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -134865,22 +135645,22 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date September 2012
+*> \date December 2016
 *
 *> \ingroup doubleSYcomputational
 *
 *  =====================================================================
       SUBROUTINE DSYGS2( ITYPE, UPLO, N, A, LDA, B, LDB, INFO )
 *
-*  -- LAPACK computational routine (version 3.4.2) --
+*  -- LAPACK computational routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     September 2012
+*     December 2016
 *
 *     .. Scalar Arguments ..
       CHARACTER          UPLO
@@ -135035,24 +135815,24 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DSYGST + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dsygst.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dsygst.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dsygst.f"> 
+*> Download DSYGST + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dsygst.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dsygst.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dsygst.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       SUBROUTINE DSYGST( ITYPE, UPLO, N, A, LDA, B, LDB, INFO )
-* 
+*
 *       .. Scalar Arguments ..
 *       CHARACTER          UPLO
 *       INTEGER            INFO, ITYPE, LDA, LDB, N
@@ -135060,7 +135840,7 @@
 *       .. Array Arguments ..
 *       DOUBLE PRECISION   A( LDA, * ), B( LDB, * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -135148,22 +135928,22 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date November 2011
+*> \date December 2016
 *
 *> \ingroup doubleSYcomputational
 *
 *  =====================================================================
       SUBROUTINE DSYGST( ITYPE, UPLO, N, A, LDA, B, LDB, INFO )
 *
-*  -- LAPACK computational routine (version 3.4.0) --
+*  -- LAPACK computational routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     November 2011
+*     December 2016
 *
 *     .. Scalar Arguments ..
       CHARACTER          UPLO
@@ -135352,29 +136132,29 @@
 *     End of DSYGST
 *
       END
-*> \brief \b DSYGST
+*> \brief \b DSYGV
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DSYGV + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dsygv.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dsygv.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dsygv.f"> 
+*> Download DSYGV + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dsygv.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dsygv.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dsygv.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       SUBROUTINE DSYGV( ITYPE, JOBZ, UPLO, N, A, LDA, B, LDB, W, WORK,
 *                         LWORK, INFO )
-* 
+*
 *       .. Scalar Arguments ..
 *       CHARACTER          JOBZ, UPLO
 *       INTEGER            INFO, ITYPE, LDA, LDB, LWORK, N
@@ -135382,7 +136162,7 @@
 *       .. Array Arguments ..
 *       DOUBLE PRECISION   A( LDA, * ), B( LDB, * ), W( * ), WORK( * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -135516,12 +136296,12 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date November 2011
+*> \date December 2016
 *
 *> \ingroup doubleSYeigen
 *
@@ -135529,10 +136309,10 @@
       SUBROUTINE DSYGV( ITYPE, JOBZ, UPLO, N, A, LDA, B, LDB, W, WORK,
      $                  LWORK, INFO )
 *
-*  -- LAPACK driver routine (version 3.4.0) --
+*  -- LAPACK driver routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     November 2011
+*     December 2016
 *
 *     .. Scalar Arguments ..
       CHARACTER          JOBZ, UPLO
@@ -135666,29 +136446,29 @@
 *     End of DSYGV
 *
       END
-*> \brief \b DSYGST
+*> \brief \b DSYGVD
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DSYGVD + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dsygvd.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dsygvd.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dsygvd.f"> 
+*> Download DSYGVD + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dsygvd.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dsygvd.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dsygvd.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       SUBROUTINE DSYGVD( ITYPE, JOBZ, UPLO, N, A, LDA, B, LDB, W, WORK,
 *                          LWORK, IWORK, LIWORK, INFO )
-* 
+*
 *       .. Scalar Arguments ..
 *       CHARACTER          JOBZ, UPLO
 *       INTEGER            INFO, ITYPE, LDA, LDB, LIWORK, LWORK, N
@@ -135697,7 +136477,7 @@
 *       INTEGER            IWORK( * )
 *       DOUBLE PRECISION   A( LDA, * ), B( LDB, * ), W( * ), WORK( * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -135866,12 +136646,12 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date November 2011
+*> \date December 2016
 *
 *> \ingroup doubleSYeigen
 *
@@ -135895,10 +136675,10 @@
       SUBROUTINE DSYGVD( ITYPE, JOBZ, UPLO, N, A, LDA, B, LDB, W, WORK,
      $                   LWORK, IWORK, LIWORK, INFO )
 *
-*  -- LAPACK driver routine (version 3.4.0) --
+*  -- LAPACK driver routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     November 2011
+*     December 2016
 *
 *     .. Scalar Arguments ..
       CHARACTER          JOBZ, UPLO
@@ -136046,22 +136826,22 @@
 *     End of DSYGVD
 *
       END
-*> \brief \b DSYGST
+*> \brief \b DSYGVX
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DSYGVX + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dsygvx.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dsygvx.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dsygvx.f"> 
+*> Download DSYGVX + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dsygvx.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dsygvx.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dsygvx.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
@@ -136069,7 +136849,7 @@
 *       SUBROUTINE DSYGVX( ITYPE, JOBZ, RANGE, UPLO, N, A, LDA, B, LDB,
 *                          VL, VU, IL, IU, ABSTOL, M, W, Z, LDZ, WORK,
 *                          LWORK, IWORK, IFAIL, INFO )
-* 
+*
 *       .. Scalar Arguments ..
 *       CHARACTER          JOBZ, RANGE, UPLO
 *       INTEGER            IL, INFO, ITYPE, IU, LDA, LDB, LDZ, LWORK, M, N
@@ -136080,7 +136860,7 @@
 *       DOUBLE PRECISION   A( LDA, * ), B( LDB, * ), W( * ), WORK( * ),
 *      $                   Z( LDZ, * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -136179,12 +136959,15 @@
 *> \param[in] VL
 *> \verbatim
 *>          VL is DOUBLE PRECISION
+*>          If RANGE='V', the lower bound of the interval to
+*>          be searched for eigenvalues. VL < VU.
+*>          Not referenced if RANGE = 'A' or 'I'.
 *> \endverbatim
 *>
 *> \param[in] VU
 *> \verbatim
 *>          VU is DOUBLE PRECISION
-*>          If RANGE='V', the lower and upper bounds of the interval to
+*>          If RANGE='V', the upper bound of the interval to
 *>          be searched for eigenvalues. VL < VU.
 *>          Not referenced if RANGE = 'A' or 'I'.
 *> \endverbatim
@@ -136192,13 +136975,17 @@
 *> \param[in] IL
 *> \verbatim
 *>          IL is INTEGER
+*>          If RANGE='I', the index of the
+*>          smallest eigenvalue to be returned.
+*>          1 <= IL <= IU <= N, if N > 0; IL = 1 and IU = 0 if N = 0.
+*>          Not referenced if RANGE = 'A' or 'V'.
 *> \endverbatim
 *>
 *> \param[in] IU
 *> \verbatim
 *>          IU is INTEGER
-*>          If RANGE='I', the indices (in ascending order) of the
-*>          smallest and largest eigenvalues to be returned.
+*>          If RANGE='I', the index of the
+*>          largest eigenvalue to be returned.
 *>          1 <= IL <= IU <= N, if N > 0; IL = 1 and IU = 0 if N = 0.
 *>          Not referenced if RANGE = 'A' or 'V'.
 *> \endverbatim
@@ -136319,12 +137106,12 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date November 2011
+*> \date June 2016
 *
 *> \ingroup doubleSYeigen
 *
@@ -136338,10 +137125,10 @@
      $                   VL, VU, IL, IU, ABSTOL, M, W, Z, LDZ, WORK,
      $                   LWORK, IWORK, IFAIL, INFO )
 *
-*  -- LAPACK driver routine (version 3.4.0) --
+*  -- LAPACK driver routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     November 2011
+*     June 2016
 *
 *     .. Scalar Arguments ..
       CHARACTER          JOBZ, RANGE, UPLO
@@ -136508,25 +137295,25 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DSYRFS + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dsyrfs.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dsyrfs.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dsyrfs.f"> 
+*> Download DSYRFS + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dsyrfs.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dsyrfs.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dsyrfs.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       SUBROUTINE DSYRFS( UPLO, N, NRHS, A, LDA, AF, LDAF, IPIV, B, LDB,
 *                          X, LDX, FERR, BERR, WORK, IWORK, INFO )
-* 
+*
 *       .. Scalar Arguments ..
 *       CHARACTER          UPLO
 *       INTEGER            INFO, LDA, LDAF, LDB, LDX, N, NRHS
@@ -136536,7 +137323,7 @@
 *       DOUBLE PRECISION   A( LDA, * ), AF( LDAF, * ), B( LDB, * ),
 *      $                   BERR( * ), FERR( * ), WORK( * ), X( LDX, * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -136684,12 +137471,12 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date November 2011
+*> \date December 2016
 *
 *> \ingroup doubleSYcomputational
 *
@@ -136697,10 +137484,10 @@
       SUBROUTINE DSYRFS( UPLO, N, NRHS, A, LDA, AF, LDAF, IPIV, B, LDB,
      $                   X, LDX, FERR, BERR, WORK, IWORK, INFO )
 *
-*  -- LAPACK computational routine (version 3.4.0) --
+*  -- LAPACK computational routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     November 2011
+*     December 2016
 *
 *     .. Scalar Arguments ..
       CHARACTER          UPLO
@@ -136949,25 +137736,25 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DSYSV + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dsysv.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dsysv.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dsysv.f"> 
+*> Download DSYSV + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dsysv.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dsysv.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dsysv.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       SUBROUTINE DSYSV( UPLO, N, NRHS, A, LDA, IPIV, B, LDB, WORK,
 *                         LWORK, INFO )
-* 
+*
 *       .. Scalar Arguments ..
 *       CHARACTER          UPLO
 *       INTEGER            INFO, LDA, LDB, LWORK, N, NRHS
@@ -136976,7 +137763,7 @@
 *       INTEGER            IPIV( * )
 *       DOUBLE PRECISION   A( LDA, * ), B( LDB, * ), WORK( * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -137105,12 +137892,12 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date November 2011
+*> \date December 2016
 *
 *> \ingroup doubleSYsolve
 *
@@ -137118,10 +137905,10 @@
       SUBROUTINE DSYSV( UPLO, N, NRHS, A, LDA, IPIV, B, LDB, WORK,
      $                  LWORK, INFO )
 *
-*  -- LAPACK driver routine (version 3.4.0) --
+*  -- LAPACK driver routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     November 2011
+*     December 2016
 *
 *     .. Scalar Arguments ..
       CHARACTER          UPLO
@@ -137219,18 +138006,18 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DSYSVX + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dsysvx.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dsysvx.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dsysvx.f"> 
+*> Download DSYSVX + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dsysvx.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dsysvx.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dsysvx.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
@@ -137238,7 +138025,7 @@
 *       SUBROUTINE DSYSVX( FACT, UPLO, N, NRHS, A, LDA, AF, LDAF, IPIV, B,
 *                          LDB, X, LDX, RCOND, FERR, BERR, WORK, LWORK,
 *                          IWORK, INFO )
-* 
+*
 *       .. Scalar Arguments ..
 *       CHARACTER          FACT, UPLO
 *       INTEGER            INFO, LDA, LDAF, LDB, LDX, LWORK, N, NRHS
@@ -137249,7 +138036,7 @@
 *       DOUBLE PRECISION   A( LDA, * ), AF( LDAF, * ), B( LDB, * ),
 *      $                   BERR( * ), FERR( * ), WORK( * ), X( LDX, * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -137487,10 +138274,10 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
 *> \date April 2012
 *
@@ -137501,7 +138288,7 @@
      $                   LDB, X, LDX, RCOND, FERR, BERR, WORK, LWORK,
      $                   IWORK, INFO )
 *
-*  -- LAPACK driver routine (version 3.4.1) --
+*  -- LAPACK driver routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
 *     April 2012
@@ -137635,31 +138422,31 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DSYSWAPR + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dsyswapr.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dsyswapr.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dsyswapr.f"> 
+*> Download DSYSWAPR + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dsyswapr.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dsyswapr.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dsyswapr.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       SUBROUTINE DSYSWAPR( UPLO, N, A, LDA, I1, I2)
-* 
+*
 *       .. Scalar Arguments ..
 *       CHARACTER        UPLO
 *       INTEGER          I1, I2, LDA, N
 *       ..
 *       .. Array Arguments ..
 *       DOUBLE PRECISION A( LDA, N )
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -137723,22 +138510,22 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date September 2012
+*> \date December 2016
 *
 *> \ingroup doubleSYauxiliary
 *
 *  =====================================================================
       SUBROUTINE DSYSWAPR( UPLO, N, A, LDA, I1, I2)
 *
-*  -- LAPACK auxiliary routine (version 3.4.2) --
+*  -- LAPACK auxiliary routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     September 2012
+*     December 2016
 *
 *     .. Scalar Arguments ..
       CHARACTER        UPLO
@@ -137769,12 +138556,12 @@
 *
 *         UPPER
 *         first swap
-*          - swap column I1 and I2 from I1 to I1-1 
+*          - swap column I1 and I2 from I1 to I1-1
          CALL DSWAP( I1-1, A(1,I1), 1, A(1,I2), 1 )
 *
 *          second swap :
 *          - swap A(I1,I1) and A(I2,I2)
-*          - swap row I1 from I1+1 to I2-1 with col I2 from I1+1 to I2-1     
+*          - swap row I1 from I1+1 to I2-1 with col I2 from I1+1 to I2-1
          TMP=A(I1,I1)
          A(I1,I1)=A(I2,I2)
          A(I2,I2)=TMP
@@ -137797,12 +138584,12 @@
 *
 *         LOWER
 *         first swap
-*          - swap row I1 and I2 from I1 to I1-1 
+*          - swap row I1 and I2 from I1 to I1-1
          CALL DSWAP( I1-1, A(I1,1), LDA, A(I2,1), LDA )
 *
 *         second swap :
 *          - swap A(I1,I1) and A(I2,I2)
-*          - swap col I1 from I1+1 to I2-1 with row I2 from I1+1 to I2-1     
+*          - swap col I1 from I1+1 to I2-1 with row I2 from I1+1 to I2-1
           TMP=A(I1,I1)
           A(I1,I1)=A(I2,I2)
           A(I2,I2)=TMP
@@ -137828,24 +138615,24 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DSYTD2 + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dsytd2.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dsytd2.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dsytd2.f"> 
+*> Download DSYTD2 + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dsytd2.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dsytd2.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dsytd2.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       SUBROUTINE DSYTD2( UPLO, N, A, LDA, D, E, TAU, INFO )
-* 
+*
 *       .. Scalar Arguments ..
 *       CHARACTER          UPLO
 *       INTEGER            INFO, LDA, N
@@ -137853,7 +138640,7 @@
 *       .. Array Arguments ..
 *       DOUBLE PRECISION   A( LDA, * ), D( * ), E( * ), TAU( * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -137941,12 +138728,12 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date September 2012
+*> \date December 2016
 *
 *> \ingroup doubleSYcomputational
 *
@@ -137999,10 +138786,10 @@
 *  =====================================================================
       SUBROUTINE DSYTD2( UPLO, N, A, LDA, D, E, TAU, INFO )
 *
-*  -- LAPACK computational routine (version 3.4.2) --
+*  -- LAPACK computational routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     September 2012
+*     December 2016
 *
 *     .. Scalar Arguments ..
       CHARACTER          UPLO
@@ -138151,24 +138938,24 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DSYTF2 + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dsytf2.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dsytf2.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dsytf2.f"> 
+*> Download DSYTF2 + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dsytf2.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dsytf2.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dsytf2.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       SUBROUTINE DSYTF2( UPLO, N, A, LDA, IPIV, INFO )
-* 
+*
 *       .. Scalar Arguments ..
 *       CHARACTER          UPLO
 *       INTEGER            INFO, LDA, N
@@ -138177,7 +138964,7 @@
 *       INTEGER            IPIV( * )
 *       DOUBLE PRECISION   A( LDA, * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -138271,12 +139058,12 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date November 2013
+*> \date December 2016
 *
 *> \ingroup doubleSYcomputational
 *
@@ -138343,10 +139130,10 @@
 *  =====================================================================
       SUBROUTINE DSYTF2( UPLO, N, A, LDA, IPIV, INFO )
 *
-*  -- LAPACK computational routine (version 3.5.0) --
+*  -- LAPACK computational routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     November 2013
+*     December 2016
 *
 *     .. Scalar Arguments ..
       CHARACTER          UPLO
@@ -138761,24 +139548,24 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DSYTRD + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dsytrd.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dsytrd.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dsytrd.f"> 
+*> Download DSYTRD + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dsytrd.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dsytrd.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dsytrd.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       SUBROUTINE DSYTRD( UPLO, N, A, LDA, D, E, TAU, WORK, LWORK, INFO )
-* 
+*
 *       .. Scalar Arguments ..
 *       CHARACTER          UPLO
 *       INTEGER            INFO, LDA, LWORK, N
@@ -138787,7 +139574,7 @@
 *       DOUBLE PRECISION   A( LDA, * ), D( * ), E( * ), TAU( * ),
 *      $                   WORK( * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -138893,12 +139680,12 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date November 2011
+*> \date December 2016
 *
 *> \ingroup doubleSYcomputational
 *
@@ -138951,10 +139738,10 @@
 *  =====================================================================
       SUBROUTINE DSYTRD( UPLO, N, A, LDA, D, E, TAU, WORK, LWORK, INFO )
 *
-*  -- LAPACK computational routine (version 3.4.0) --
+*  -- LAPACK computational routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     November 2011
+*     December 2016
 *
 *     .. Scalar Arguments ..
       CHARACTER          UPLO
@@ -139137,24 +139924,24 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DSYTRF + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dsytrf.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dsytrf.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dsytrf.f"> 
+*> Download DSYTRF + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dsytrf.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dsytrf.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dsytrf.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       SUBROUTINE DSYTRF( UPLO, N, A, LDA, IPIV, WORK, LWORK, INFO )
-* 
+*
 *       .. Scalar Arguments ..
 *       CHARACTER          UPLO
 *       INTEGER            INFO, LDA, LWORK, N
@@ -139163,7 +139950,7 @@
 *       INTEGER            IPIV( * )
 *       DOUBLE PRECISION   A( LDA, * ), WORK( * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -139265,12 +140052,12 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date November 2011
+*> \date December 2016
 *
 *> \ingroup doubleSYcomputational
 *
@@ -139317,10 +140104,10 @@
 *  =====================================================================
       SUBROUTINE DSYTRF( UPLO, N, A, LDA, IPIV, WORK, LWORK, INFO )
 *
-*  -- LAPACK computational routine (version 3.4.0) --
+*  -- LAPACK computational routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     November 2011
+*     December 2016
 *
 *     .. Scalar Arguments ..
       CHARACTER          UPLO
@@ -139500,24 +140287,24 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DSYTRI + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dsytri.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dsytri.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dsytri.f"> 
+*> Download DSYTRI + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dsytri.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dsytri.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dsytri.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       SUBROUTINE DSYTRI( UPLO, N, A, LDA, IPIV, WORK, INFO )
-* 
+*
 *       .. Scalar Arguments ..
 *       CHARACTER          UPLO
 *       INTEGER            INFO, LDA, N
@@ -139526,7 +140313,7 @@
 *       INTEGER            IPIV( * )
 *       DOUBLE PRECISION   A( LDA, * ), WORK( * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -139600,22 +140387,22 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date November 2011
+*> \date December 2016
 *
 *> \ingroup doubleSYcomputational
 *
 *  =====================================================================
       SUBROUTINE DSYTRI( UPLO, N, A, LDA, IPIV, WORK, INFO )
 *
-*  -- LAPACK computational routine (version 3.4.0) --
+*  -- LAPACK computational routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     November 2011
+*     December 2016
 *
 *     .. Scalar Arguments ..
       CHARACTER          UPLO
@@ -139882,24 +140669,24 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DSYTRI2 + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dsytri2.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dsytri2.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dsytri2.f"> 
+*> Download DSYTRI2 + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dsytri2.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dsytri2.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dsytri2.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       SUBROUTINE DSYTRI2( UPLO, N, A, LDA, IPIV, WORK, LWORK, INFO )
-* 
+*
 *       .. Scalar Arguments ..
 *       CHARACTER          UPLO
 *       INTEGER            INFO, LDA, LWORK, N
@@ -139908,7 +140695,7 @@
 *       INTEGER            IPIV( * )
 *       DOUBLE PRECISION   A( LDA, * ), WORK( * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -139995,22 +140782,22 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date September 2012
+*> \date December 2016
 *
 *> \ingroup doubleSYcomputational
 *
 *  =====================================================================
       SUBROUTINE DSYTRI2( UPLO, N, A, LDA, IPIV, WORK, LWORK, INFO )
 *
-*  -- LAPACK computational routine (version 3.4.2) --
+*  -- LAPACK computational routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     September 2012
+*     December 2016
 *
 *     .. Scalar Arguments ..
       CHARACTER          UPLO
@@ -140033,7 +140820,7 @@
       EXTERNAL           LSAME, ILAENV
 *     ..
 *     .. External Subroutines ..
-      EXTERNAL           DSYTRI2X
+      EXTERNAL           DSYTRI, DSYTRI2X
 *     ..
 *     .. Executable Statements ..
 *
@@ -140072,7 +140859,7 @@
       END IF
       IF( N.EQ.0 )
      $   RETURN
-      
+
       IF( NBMAX .GE. N ) THEN
          CALL DSYTRI( UPLO, N, A, LDA, IPIV, WORK, INFO )
       ELSE
@@ -140087,24 +140874,24 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DSYTRI2X + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dsytri2x.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dsytri2x.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dsytri2x.f"> 
+*> Download DSYTRI2X + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dsytri2x.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dsytri2x.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dsytri2x.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       SUBROUTINE DSYTRI2X( UPLO, N, A, LDA, IPIV, WORK, NB, INFO )
-* 
+*
 *       .. Scalar Arguments ..
 *       CHARACTER          UPLO
 *       INTEGER            INFO, LDA, N, NB
@@ -140113,7 +140900,7 @@
 *       INTEGER            IPIV( * )
 *       DOUBLE PRECISION   A( LDA, * ), WORK( N+NB+1,* )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -140193,22 +140980,22 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date November 2011
+*> \date December 2016
 *
 *> \ingroup doubleSYcomputational
 *
 *  =====================================================================
       SUBROUTINE DSYTRI2X( UPLO, N, A, LDA, IPIV, WORK, NB, INFO )
 *
-*  -- LAPACK computational routine (version 3.4.0) --
+*  -- LAPACK computational routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     November 2011
+*     December 2016
 *
 *     .. Scalar Arguments ..
       CHARACTER          UPLO
@@ -140297,7 +141084,7 @@
       INFO = 0
 *
 *  Splitting Workspace
-*     U01 is a block (N,NB+1) 
+*     U01 is a block (N,NB+1)
 *     The first element of U01 is in WORK(1,1)
 *     U11 is a block (NB+1,NB+1)
 *     The first element of U11 is in WORK(N+1,1)
@@ -140313,7 +141100,7 @@
         CALL DTRTRI( UPLO, 'U', N, A, LDA, INFO )
 *
 *       inv(D) and inv(D)*inv(U)
-* 
+*
         K=1
         DO WHILE ( K .LE. N )
          IF( IPIV( K ).GT.0 ) THEN
@@ -140330,8 +141117,8 @@
              D = T*( AK*AKP1-ONE )
              WORK(K,INVD) = AKP1 / D
              WORK(K+1,INVD+1) = AK / D
-             WORK(K,INVD+1) = -AKKP1 / D  
-             WORK(K+1,INVD) = -AKKP1 / D  
+             WORK(K,INVD+1) = -AKKP1 / D
+             WORK(K+1,INVD) = -AKKP1 / D
             K=K+2
          END IF
         END DO
@@ -140347,7 +141134,7 @@
               NNB=CUT
            ELSE
               COUNT = 0
-*             count negative elements, 
+*             count negative elements,
               DO I=CUT+1-NNB,CUT
                   IF (IPIV(I) .LT. 0) COUNT=COUNT+1
               END DO
@@ -140357,7 +141144,7 @@
 
            CUT=CUT-NNB
 *
-*          U01 Block 
+*          U01 Block
 *
            DO I=1,CUT
              DO J=1,NNB
@@ -140420,7 +141207,7 @@
                 I=I+2
              END IF
            END DO
-*    
+*
 *       U11**T*invD1*U11->U11
 *
         CALL DTRMM('L','U','T','U',NNB, NNB,
@@ -140430,13 +141217,13 @@
             DO J=I,NNB
               A(CUT+I,CUT+J)=WORK(U11+I,J)
             END DO
-         END DO         
+         END DO
 *
 *          U01**T*invD*U01->A(CUT+I,CUT+J)
 *
          CALL DGEMM('T','N',NNB,NNB,CUT,ONE,A(1,CUT+1),LDA,
      $              WORK,N+NB+1, ZERO, WORK(U11+1,1), N+NB+1)
-        
+
 *
 *        U11 =  U11**T*invD1*U11 + U01**T*invD*U01
 *
@@ -140465,7 +141252,7 @@
        END DO
 *
 *        Apply PERMUTATIONS P and P**T: P * inv(U**T)*inv(D)*inv(U) *P**T
-*  
+*
             I=1
             DO WHILE ( I .LE. N )
                IF( IPIV(I) .GT. 0 ) THEN
@@ -140475,9 +141262,9 @@
                ELSE
                  IP=-IPIV(I)
                  I=I+1
-                 IF ( (I-1) .LT. IP) 
+                 IF ( (I-1) .LT. IP)
      $                  CALL DSYSWAPR( UPLO, N, A, LDA, I-1 ,IP )
-                 IF ( (I-1) .GT. IP) 
+                 IF ( (I-1) .GT. IP)
      $                  CALL DSYSWAPR( UPLO, N, A, LDA, IP ,I-1 )
               ENDIF
                I=I+1
@@ -140491,7 +141278,7 @@
          CALL DTRTRI( UPLO, 'U', N, A, LDA, INFO )
 *
 *       inv(D) and inv(D)*inv(U)
-* 
+*
         K=N
         DO WHILE ( K .GE. 1 )
          IF( IPIV( K ).GT.0 ) THEN
@@ -140508,8 +141295,8 @@
              D = T*( AK*AKP1-ONE )
              WORK(K-1,INVD) = AKP1 / D
              WORK(K,INVD) = AK / D
-             WORK(K,INVD+1) = -AKKP1 / D  
-             WORK(K-1,INVD+1) = -AKKP1 / D  
+             WORK(K,INVD+1) = -AKKP1 / D
+             WORK(K-1,INVD+1) = -AKKP1 / D
             K=K-2
          END IF
         END DO
@@ -140525,7 +141312,7 @@
               NNB=N-CUT
            ELSE
               COUNT = 0
-*             count negative elements, 
+*             count negative elements,
               DO I=CUT+1,CUT+NNB
                   IF (IPIV(I) .LT. 0) COUNT=COUNT+1
               END DO
@@ -140592,7 +141379,7 @@
                 I=I-2
              END IF
            END DO
-*    
+*
 *       L11**T*invD1*L11->L11
 *
         CALL DTRMM('L',UPLO,'T','U',NNB, NNB,
@@ -140611,7 +141398,7 @@
 *
          CALL DGEMM('T','N',NNB,NNB,N-NNB-CUT,ONE,A(CUT+NNB+1,CUT+1)
      $             ,LDA,WORK,N+NB+1, ZERO, WORK(U11+1,1), N+NB+1)
-       
+
 *
 *        L11 =  L11**T*invD1*L11 + U01**T*invD*U01
 *
@@ -140651,7 +141438,7 @@
        END DO
 *
 *        Apply PERMUTATIONS P and P**T: P * inv(U**T)*inv(D)*inv(U) *P**T
-* 
+*
             I=N
             DO WHILE ( I .GE. 1 )
                IF( IPIV(I) .GT. 0 ) THEN
@@ -140678,24 +141465,24 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DSYTRS + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dsytrs.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dsytrs.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dsytrs.f"> 
+*> Download DSYTRS + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dsytrs.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dsytrs.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dsytrs.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       SUBROUTINE DSYTRS( UPLO, N, NRHS, A, LDA, IPIV, B, LDB, INFO )
-* 
+*
 *       .. Scalar Arguments ..
 *       CHARACTER          UPLO
 *       INTEGER            INFO, LDA, LDB, N, NRHS
@@ -140704,7 +141491,7 @@
 *       INTEGER            IPIV( * )
 *       DOUBLE PRECISION   A( LDA, * ), B( LDB, * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -140784,22 +141571,22 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date November 2011
+*> \date December 2016
 *
 *> \ingroup doubleSYcomputational
 *
 *  =====================================================================
       SUBROUTINE DSYTRS( UPLO, N, NRHS, A, LDA, IPIV, B, LDB, INFO )
 *
-*  -- LAPACK computational routine (version 3.4.0) --
+*  -- LAPACK computational routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     November 2011
+*     December 2016
 *
 *     .. Scalar Arguments ..
       CHARACTER          UPLO
@@ -141123,25 +141910,25 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DSYTRS2 + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dsytrs2.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dsytrs2.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dsytrs2.f"> 
+*> Download DSYTRS2 + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dsytrs2.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dsytrs2.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dsytrs2.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
-*       SUBROUTINE DSYTRS2( UPLO, N, NRHS, A, LDA, IPIV, B, LDB, 
+*       SUBROUTINE DSYTRS2( UPLO, N, NRHS, A, LDA, IPIV, B, LDB,
 *                           WORK, INFO )
-* 
+*
 *       .. Scalar Arguments ..
 *       CHARACTER          UPLO
 *       INTEGER            INFO, LDA, LDB, N, NRHS
@@ -141150,7 +141937,7 @@
 *       INTEGER            IPIV( * )
 *       DOUBLE PRECISION   A( LDA, * ), B( LDB, * ), WORK( * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -141187,11 +141974,16 @@
 *>          of the matrix B.  NRHS >= 0.
 *> \endverbatim
 *>
-*> \param[in] A
+*> \param[in,out] A
 *> \verbatim
 *>          A is DOUBLE PRECISION array, dimension (LDA,N)
 *>          The block diagonal matrix D and the multipliers used to
 *>          obtain the factor U or L as computed by DSYTRF.
+*>          Note that A is input / output. This might be counter-intuitive,
+*>          and one may think that A is input only. A is input / output. This
+*>          is because, at the start of the subroutine, we permute A in a
+*>          "better" form and then we permute A back to its original form at
+*>          the end.
 *> \endverbatim
 *>
 *> \param[in] LDA
@@ -141222,7 +142014,7 @@
 *>
 *> \param[out] WORK
 *> \verbatim
-*>          WORK is REAL array, dimension (N)
+*>          WORK is DOUBLE PRECISION array, dimension (N)
 *> \endverbatim
 *>
 *> \param[out] INFO
@@ -141235,23 +142027,23 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date November 2011
+*> \date June 2016
 *
 *> \ingroup doubleSYcomputational
 *
 *  =====================================================================
-      SUBROUTINE DSYTRS2( UPLO, N, NRHS, A, LDA, IPIV, B, LDB, 
+      SUBROUTINE DSYTRS2( UPLO, N, NRHS, A, LDA, IPIV, B, LDB,
      $                    WORK, INFO )
 *
-*  -- LAPACK computational routine (version 3.4.0) --
+*  -- LAPACK computational routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     November 2011
+*     June 2016
 *
 *     .. Scalar Arguments ..
       CHARACTER          UPLO
@@ -141316,7 +142108,7 @@
 *
 *        Solve A*X = B, where A = U*D*U**T.
 *
-*       P**T * B  
+*       P**T * B
         K=N
         DO WHILE ( K .GE. 1 )
          IF( IPIV( K ).GT.0 ) THEN
@@ -141341,7 +142133,7 @@
         CALL DTRSM('L','U','N','U',N,NRHS,ONE,A,LDA,B,LDB)
 *
 *  Compute D \ B -> B   [ D \ (U \P**T * B) ]
-*       
+*
          I=N
          DO WHILE ( I .GE. 1 )
             IF( IPIV(I) .GT. 0 ) THEN
@@ -141393,7 +142185,7 @@
 *
 *        Solve A*X = B, where A = L*D*L**T.
 *
-*       P**T * B  
+*       P**T * B
         K=1
         DO WHILE ( K .LE. N )
          IF( IPIV( K ).GT.0 ) THEN
@@ -141418,7 +142210,7 @@
         CALL DTRSM('L','L','N','U',N,NRHS,ONE,A,LDA,B,LDB)
 *
 *  Compute D \ B -> B   [ D \ (L \P**T * B) ]
-*       
+*
          I=1
          DO WHILE ( I .LE. N )
             IF( IPIV(I) .GT. 0 ) THEN
@@ -141440,7 +142232,7 @@
          END DO
 *
 *  Compute (L**T \ B) -> B   [ L**T \ (D \ (L \P**T * B) ) ]
-* 
+*
         CALL DTRSM('L','L','T','U',N,NRHS,ONE,A,LDA,B,LDB)
 *
 *       P * B  [ P * (L**T \ (D \ (L \P**T * B) )) ]
@@ -141479,25 +142271,25 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DTBCON + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dtbcon.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dtbcon.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dtbcon.f"> 
+*> Download DTBCON + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dtbcon.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dtbcon.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dtbcon.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       SUBROUTINE DTBCON( NORM, UPLO, DIAG, N, KD, AB, LDAB, RCOND, WORK,
 *                          IWORK, INFO )
-* 
+*
 *       .. Scalar Arguments ..
 *       CHARACTER          DIAG, NORM, UPLO
 *       INTEGER            INFO, KD, LDAB, N
@@ -141507,7 +142299,7 @@
 *       INTEGER            IWORK( * )
 *       DOUBLE PRECISION   AB( LDAB, * ), WORK( * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -141607,12 +142399,12 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date November 2011
+*> \date December 2016
 *
 *> \ingroup doubleOTHERcomputational
 *
@@ -141620,10 +142412,10 @@
       SUBROUTINE DTBCON( NORM, UPLO, DIAG, N, KD, AB, LDAB, RCOND, WORK,
      $                   IWORK, INFO )
 *
-*  -- LAPACK computational routine (version 3.4.0) --
+*  -- LAPACK computational routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     November 2011
+*     December 2016
 *
 *     .. Scalar Arguments ..
       CHARACTER          DIAG, NORM, UPLO
@@ -141763,25 +142555,25 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DTBRFS + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dtbrfs.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dtbrfs.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dtbrfs.f"> 
+*> Download DTBRFS + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dtbrfs.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dtbrfs.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dtbrfs.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       SUBROUTINE DTBRFS( UPLO, TRANS, DIAG, N, KD, NRHS, AB, LDAB, B,
 *                          LDB, X, LDX, FERR, BERR, WORK, IWORK, INFO )
-* 
+*
 *       .. Scalar Arguments ..
 *       CHARACTER          DIAG, TRANS, UPLO
 *       INTEGER            INFO, KD, LDAB, LDB, LDX, N, NRHS
@@ -141791,7 +142583,7 @@
 *       DOUBLE PRECISION   AB( LDAB, * ), B( LDB, * ), BERR( * ),
 *      $                   FERR( * ), WORK( * ), X( LDX, * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -141936,12 +142728,12 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date November 2011
+*> \date December 2016
 *
 *> \ingroup doubleOTHERcomputational
 *
@@ -141949,10 +142741,10 @@
       SUBROUTINE DTBRFS( UPLO, TRANS, DIAG, N, KD, NRHS, AB, LDAB, B,
      $                   LDB, X, LDX, FERR, BERR, WORK, IWORK, INFO )
 *
-*  -- LAPACK computational routine (version 3.4.0) --
+*  -- LAPACK computational routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     November 2011
+*     December 2016
 *
 *     .. Scalar Arguments ..
       CHARACTER          DIAG, TRANS, UPLO
@@ -142248,25 +143040,25 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DTBTRS + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dtbtrs.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dtbtrs.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dtbtrs.f"> 
+*> Download DTBTRS + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dtbtrs.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dtbtrs.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dtbtrs.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       SUBROUTINE DTBTRS( UPLO, TRANS, DIAG, N, KD, NRHS, AB, LDAB, B,
 *                          LDB, INFO )
-* 
+*
 *       .. Scalar Arguments ..
 *       CHARACTER          DIAG, TRANS, UPLO
 *       INTEGER            INFO, KD, LDAB, LDB, N, NRHS
@@ -142274,7 +143066,7 @@
 *       .. Array Arguments ..
 *       DOUBLE PRECISION   AB( LDAB, * ), B( LDB, * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -142379,12 +143171,12 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date November 2011
+*> \date December 2016
 *
 *> \ingroup doubleOTHERcomputational
 *
@@ -142392,10 +143184,10 @@
       SUBROUTINE DTBTRS( UPLO, TRANS, DIAG, N, KD, NRHS, AB, LDAB, B,
      $                   LDB, INFO )
 *
-*  -- LAPACK computational routine (version 3.4.0) --
+*  -- LAPACK computational routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     November 2011
+*     December 2016
 *
 *     .. Scalar Arguments ..
       CHARACTER          DIAG, TRANS, UPLO
@@ -142492,25 +143284,25 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DTFSM + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dtfsm.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dtfsm.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dtfsm.f"> 
+*> Download DTFSM + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dtfsm.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dtfsm.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dtfsm.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       SUBROUTINE DTFSM( TRANSR, SIDE, UPLO, TRANS, DIAG, M, N, ALPHA, A,
 *                         B, LDB )
-* 
+*
 *       .. Scalar Arguments ..
 *       CHARACTER          TRANSR, DIAG, SIDE, TRANS, UPLO
 *       INTEGER            LDB, M, N
@@ -142519,7 +143311,7 @@
 *       .. Array Arguments ..
 *       DOUBLE PRECISION   A( 0: * ), B( 0: LDB-1, 0: * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -142667,12 +143459,12 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date September 2012
+*> \date December 2016
 *
 *> \ingroup doubleOTHERcomputational
 *
@@ -142767,10 +143559,10 @@
       SUBROUTINE DTFSM( TRANSR, SIDE, UPLO, TRANS, DIAG, M, N, ALPHA, A,
      $                  B, LDB )
 *
-*  -- LAPACK computational routine (version 3.4.2) --
+*  -- LAPACK computational routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     September 2012
+*     December 2016
 *
 *     .. Scalar Arguments ..
       CHARACTER          TRANSR, DIAG, SIDE, TRANS, UPLO
@@ -143498,24 +144290,24 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DTFTRI + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dtftri.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dtftri.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dtftri.f"> 
+*> Download DTFTRI + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dtftri.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dtftri.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dtftri.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       SUBROUTINE DTFTRI( TRANSR, UPLO, DIAG, N, A, INFO )
-* 
+*
 *       .. Scalar Arguments ..
 *       CHARACTER          TRANSR, UPLO, DIAG
 *       INTEGER            INFO, N
@@ -143523,7 +144315,7 @@
 *       .. Array Arguments ..
 *       DOUBLE PRECISION   A( 0: * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -143598,12 +144390,12 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date November 2011
+*> \date December 2016
 *
 *> \ingroup doubleOTHERcomputational
 *
@@ -143697,10 +144489,10 @@
 *  =====================================================================
       SUBROUTINE DTFTRI( TRANSR, UPLO, DIAG, N, A, INFO )
 *
-*  -- LAPACK computational routine (version 3.4.0) --
+*  -- LAPACK computational routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     November 2011
+*     December 2016
 *
 *     .. Scalar Arguments ..
       CHARACTER          TRANSR, UPLO, DIAG
@@ -143970,24 +144762,24 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DTFTTP + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dtfttp.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dtfttp.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dtfttp.f"> 
+*> Download DTFTTP + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dtfttp.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dtfttp.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dtfttp.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       SUBROUTINE DTFTTP( TRANSR, UPLO, N, ARF, AP, INFO )
-* 
+*
 *       .. Scalar Arguments ..
 *       CHARACTER          TRANSR, UPLO
 *       INTEGER            INFO, N
@@ -143995,7 +144787,7 @@
 *       .. Array Arguments ..
 *       DOUBLE PRECISION   AP( 0: * ), ARF( 0: * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -144056,12 +144848,12 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date September 2012
+*> \date December 2016
 *
 *> \ingroup doubleOTHERcomputational
 *
@@ -144155,10 +144947,10 @@
 *  =====================================================================
       SUBROUTINE DTFTTP( TRANSR, UPLO, N, ARF, AP, INFO )
 *
-*  -- LAPACK computational routine (version 3.4.2) --
+*  -- LAPACK computational routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     September 2012
+*     December 2016
 *
 *     .. Scalar Arguments ..
       CHARACTER          TRANSR, UPLO
@@ -144487,24 +145279,24 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DTFTTR + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dtfttr.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dtfttr.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dtfttr.f"> 
+*> Download DTFTTR + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dtfttr.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dtfttr.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dtfttr.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       SUBROUTINE DTFTTR( TRANSR, UPLO, N, ARF, A, LDA, INFO )
-* 
+*
 *       .. Scalar Arguments ..
 *       CHARACTER          TRANSR, UPLO
 *       INTEGER            INFO, N, LDA
@@ -144512,7 +145304,7 @@
 *       .. Array Arguments ..
 *       DOUBLE PRECISION   A( 0: LDA-1, 0: * ), ARF( 0: * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -144582,12 +145374,12 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date September 2012
+*> \date December 2016
 *
 *> \ingroup doubleOTHERcomputational
 *
@@ -144681,10 +145473,10 @@
 *  =====================================================================
       SUBROUTINE DTFTTR( TRANSR, UPLO, N, ARF, A, LDA, INFO )
 *
-*  -- LAPACK computational routine (version 3.4.2) --
+*  -- LAPACK computational routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     September 2012
+*     December 2016
 *
 *     .. Scalar Arguments ..
       CHARACTER          TRANSR, UPLO
@@ -144982,25 +145774,25 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DTGEVC + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dtgevc.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dtgevc.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dtgevc.f"> 
+*> Download DTGEVC + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dtgevc.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dtgevc.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dtgevc.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       SUBROUTINE DTGEVC( SIDE, HOWMNY, SELECT, N, S, LDS, P, LDP, VL,
 *                          LDVL, VR, LDVR, MM, M, WORK, INFO )
-* 
+*
 *       .. Scalar Arguments ..
 *       CHARACTER          HOWMNY, SIDE
 *       INTEGER            INFO, LDP, LDS, LDVL, LDVR, M, MM, N
@@ -145010,8 +145802,8 @@
 *       DOUBLE PRECISION   P( LDP, * ), S( LDS, * ), VL( LDVL, * ),
 *      $                   VR( LDVR, * ), WORK( * )
 *       ..
-*  
-*  
+*
+*
 *
 *> \par Purpose:
 *  =============
@@ -145029,20 +145821,20 @@
 *>
 *> The right eigenvector x and the left eigenvector y of (S,P)
 *> corresponding to an eigenvalue w are defined by:
-*> 
+*>
 *>    S*x = w*P*x,  (y**H)*S = w*(y**H)*P,
-*> 
+*>
 *> where y**H denotes the conjugate tranpose of y.
 *> The eigenvalues are not input to this routine, but are computed
 *> directly from the diagonal blocks of S and P.
-*> 
+*>
 *> This routine returns the matrices X and/or Y of right and left
 *> eigenvectors of (S,P), or the products Z*X and/or Q*Y,
 *> where Z and Q are input matrices.
 *> If Q and Z are the orthogonal factors from the generalized Schur
 *> factorization of a matrix pair (A,B), then Z*X and Q*Y
 *> are the matrices of right and left eigenvectors of (A,B).
-*> 
+*>
 *> \endverbatim
 *
 *  Arguments:
@@ -145159,7 +145951,7 @@
 *>          A complex eigenvector corresponding to a complex eigenvalue
 *>          is stored in two consecutive columns, the first holding the
 *>          real part and the second the imaginary part.
-*>          
+*>
 *>          Not referenced if SIDE = 'L'.
 *> \endverbatim
 *>
@@ -145203,12 +145995,12 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date November 2011
+*> \date December 2016
 *
 *> \ingroup doubleGEcomputational
 *
@@ -145275,10 +146067,10 @@
       SUBROUTINE DTGEVC( SIDE, HOWMNY, SELECT, N, S, LDS, P, LDP, VL,
      $                   LDVL, VR, LDVR, MM, M, WORK, INFO )
 *
-*  -- LAPACK computational routine (version 3.4.0) --
+*  -- LAPACK computational routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     November 2011
+*     December 2016
 *
 *     .. Scalar Arguments ..
       CHARACTER          HOWMNY, SIDE
@@ -146193,25 +146985,25 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DTGEX2 + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dtgex2.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dtgex2.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dtgex2.f"> 
+*> Download DTGEX2 + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dtgex2.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dtgex2.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dtgex2.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       SUBROUTINE DTGEX2( WANTQ, WANTZ, N, A, LDA, B, LDB, Q, LDQ, Z,
 *                          LDZ, J1, N1, N2, WORK, LWORK, INFO )
-* 
+*
 *       .. Scalar Arguments ..
 *       LOGICAL            WANTQ, WANTZ
 *       INTEGER            INFO, J1, LDA, LDB, LDQ, LDZ, LWORK, N, N1, N2
@@ -146220,7 +147012,7 @@
 *       DOUBLE PRECISION   A( LDA, * ), B( LDB, * ), Q( LDQ, * ),
 *      $                   WORK( * ), Z( LDZ, * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -146367,12 +147159,12 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date September 2012
+*> \date December 2016
 *
 *> \ingroup doubleGEauxiliary
 *
@@ -146412,10 +147204,10 @@
       SUBROUTINE DTGEX2( WANTQ, WANTZ, N, A, LDA, B, LDB, Q, LDQ, Z,
      $                   LDZ, J1, N1, N2, WORK, LWORK, INFO )
 *
-*  -- LAPACK auxiliary routine (version 3.4.2) --
+*  -- LAPACK auxiliary routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     September 2012
+*     December 2016
 *
 *     .. Scalar Arguments ..
       LOGICAL            WANTQ, WANTZ
@@ -146505,7 +147297,7 @@
       CALL DLASSQ( M*M, WORK, 1, DSCALE, DSUM )
       DNORM = DSCALE*SQRT( DSUM )
 *
-*     THRES has been changed from 
+*     THRES has been changed from
 *        THRESH = MAX( TEN*EPS*SA, SMLNUM )
 *     to
 *        THRESH = MAX( TWENTY*EPS*SA, SMLNUM )
@@ -146786,9 +147578,7 @@
 *
 *        Standardize existing 2-by-2 blocks.
 *
-         DO 50 I = 1, M*M
-            WORK(I) = ZERO
-   50    CONTINUE
+         CALL DLASET( 'Full', M, M, ZERO, ZERO, WORK, M )
          WORK( 1 ) = ONE
          T( 1, 1 ) = ONE
          IDUM = LWORK - M*M - 2
@@ -146859,7 +147649,7 @@
      $                  A( J1, I ), LDA, ZERO, WORK, M )
             CALL DLACPY( 'Full', M, N-I+1, WORK, M, A( J1, I ), LDA )
             CALL DGEMM( 'T', 'N', M, N-I+1, M, ONE, LI, LDST,
-     $                  B( J1, I ), LDA, ZERO, WORK, M )
+     $                  B( J1, I ), LDB, ZERO, WORK, M )
             CALL DLACPY( 'Full', M, N-I+1, WORK, M, B( J1, I ), LDB )
          END IF
          I = J1 - 1
@@ -146892,25 +147682,25 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DTGEXC + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dtgexc.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dtgexc.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dtgexc.f"> 
+*> Download DTGEXC + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dtgexc.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dtgexc.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dtgexc.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       SUBROUTINE DTGEXC( WANTQ, WANTZ, N, A, LDA, B, LDB, Q, LDQ, Z,
 *                          LDZ, IFST, ILST, WORK, LWORK, INFO )
-* 
+*
 *       .. Scalar Arguments ..
 *       LOGICAL            WANTQ, WANTZ
 *       INTEGER            IFST, ILST, INFO, LDA, LDB, LDQ, LDZ, LWORK, N
@@ -146919,7 +147709,7 @@
 *       DOUBLE PRECISION   A( LDA, * ), B( LDB, * ), Q( LDQ, * ),
 *      $                   WORK( * ), Z( LDZ, * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -147080,12 +147870,12 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date November 2011
+*> \date December 2016
 *
 *> \ingroup doubleGEcomputational
 *
@@ -147110,10 +147900,10 @@
       SUBROUTINE DTGEXC( WANTQ, WANTZ, N, A, LDA, B, LDB, Q, LDQ, Z,
      $                   LDZ, IFST, ILST, WORK, LWORK, INFO )
 *
-*  -- LAPACK computational routine (version 3.4.0) --
+*  -- LAPACK computational routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     November 2011
+*     December 2016
 *
 *     .. Scalar Arguments ..
       LOGICAL            WANTQ, WANTZ
@@ -147436,18 +148226,18 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DTGSEN + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dtgsen.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dtgsen.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dtgsen.f"> 
+*> Download DTGSEN + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dtgsen.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dtgsen.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dtgsen.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
@@ -147455,7 +148245,7 @@
 *       SUBROUTINE DTGSEN( IJOB, WANTQ, WANTZ, SELECT, N, A, LDA, B, LDB,
 *                          ALPHAR, ALPHAI, BETA, Q, LDQ, Z, LDZ, M, PL,
 *                          PR, DIF, WORK, LWORK, IWORK, LIWORK, INFO )
-* 
+*
 *       .. Scalar Arguments ..
 *       LOGICAL            WANTQ, WANTZ
 *       INTEGER            IJOB, INFO, LDA, LDB, LDQ, LDZ, LIWORK, LWORK,
@@ -147469,7 +148259,7 @@
 *      $                   B( LDB, * ), BETA( * ), DIF( * ), Q( LDQ, * ),
 *      $                   WORK( * ), Z( LDZ, * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -147683,7 +148473,7 @@
 *> \param[out] WORK
 *> \verbatim
 *>          WORK is DOUBLE PRECISION array,
-*>          dimension (MAX(1,LWORK)) 
+*>          dimension (MAX(1,LWORK))
 *>          On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
 *> \endverbatim
 *>
@@ -147734,12 +148524,12 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date November 2011
+*> \date June 2016
 *
 *> \ingroup doubleOTHERcomputational
 *
@@ -147886,10 +148676,10 @@
      $                   ALPHAR, ALPHAI, BETA, Q, LDQ, Z, LDZ, M, PL,
      $                   PR, DIF, WORK, LWORK, IWORK, LIWORK, INFO )
 *
-*  -- LAPACK computational routine (version 3.4.0) --
+*  -- LAPACK computational routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     November 2011
+*     June 2016
 *
 *     .. Scalar Arguments ..
       LOGICAL            WANTQ, WANTZ
@@ -147976,6 +148766,7 @@
 *
       M = 0
       PAIR = .FALSE.
+      IF( .NOT.LQUERY .OR. IJOB.NE.0 ) THEN
       DO 10 K = 1, N
          IF( PAIR ) THEN
             PAIR = .FALSE.
@@ -147995,6 +148786,7 @@
             END IF
          END IF
    10 CONTINUE
+      END IF
 *
       IF( IJOB.EQ.1 .OR. IJOB.EQ.2 .OR. IJOB.EQ.4 ) THEN
          LWMIN = MAX( 1, 4*N+16, 2*M*( N-M ) )
@@ -148300,18 +149092,18 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DTGSJA + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dtgsja.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dtgsja.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dtgsja.f"> 
+*> Download DTGSJA + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dtgsja.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dtgsja.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dtgsja.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
@@ -148319,7 +149111,7 @@
 *       SUBROUTINE DTGSJA( JOBU, JOBV, JOBQ, M, P, N, K, L, A, LDA, B,
 *                          LDB, TOLA, TOLB, ALPHA, BETA, U, LDU, V, LDV,
 *                          Q, LDQ, WORK, NCYCLE, INFO )
-* 
+*
 *       .. Scalar Arguments ..
 *       CHARACTER          JOBQ, JOBU, JOBV
 *       INTEGER            INFO, K, L, LDA, LDB, LDQ, LDU, LDV, M, N,
@@ -148331,7 +149123,7 @@
 *      $                   BETA( * ), Q( LDQ, * ), U( LDU, * ),
 *      $                   V( LDV, * ), WORK( * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -148643,12 +149435,12 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date November 2011
+*> \date December 2016
 *
 *> \ingroup doubleOTHERcomputational
 *
@@ -148676,10 +149468,10 @@
      $                   LDB, TOLA, TOLB, ALPHA, BETA, U, LDU, V, LDV,
      $                   Q, LDQ, WORK, NCYCLE, INFO )
 *
-*  -- LAPACK computational routine (version 3.4.0) --
+*  -- LAPACK computational routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     November 2011
+*     December 2016
 *
 *     .. Scalar Arguments ..
       CHARACTER          JOBQ, JOBU, JOBV
@@ -148955,18 +149747,18 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DTGSNA + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dtgsna.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dtgsna.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dtgsna.f"> 
+*> Download DTGSNA + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dtgsna.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dtgsna.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dtgsna.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
@@ -148974,7 +149766,7 @@
 *       SUBROUTINE DTGSNA( JOB, HOWMNY, SELECT, N, A, LDA, B, LDB, VL,
 *                          LDVL, VR, LDVR, S, DIF, MM, M, WORK, LWORK,
 *                          IWORK, INFO )
-* 
+*
 *       .. Scalar Arguments ..
 *       CHARACTER          HOWMNY, JOB
 *       INTEGER            INFO, LDA, LDB, LDVL, LDVR, LWORK, M, MM, N
@@ -148985,7 +149777,7 @@
 *       DOUBLE PRECISION   A( LDA, * ), B( LDB, * ), DIF( * ), S( * ),
 *      $                   VL( LDVL, * ), VR( LDVR, * ), WORK( * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -149178,12 +149970,12 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date November 2011
+*> \date December 2016
 *
 *> \ingroup doubleOTHERcomputational
 *
@@ -149334,10 +150126,10 @@
      $                   LDVL, VR, LDVR, S, DIF, MM, M, WORK, LWORK,
      $                   IWORK, INFO )
 *
-*  -- LAPACK computational routine (version 3.4.0) --
+*  -- LAPACK computational routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     November 2011
+*     December 2016
 *
 *     .. Scalar Arguments ..
       CHARACTER          HOWMNY, JOB
@@ -149655,18 +150447,18 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DTGSY2 + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dtgsy2.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dtgsy2.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dtgsy2.f"> 
+*> Download DTGSY2 + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dtgsy2.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dtgsy2.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dtgsy2.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
@@ -149674,7 +150466,7 @@
 *       SUBROUTINE DTGSY2( TRANS, IJOB, M, N, A, LDA, B, LDB, C, LDC, D,
 *                          LDD, E, LDE, F, LDF, SCALE, RDSUM, RDSCAL,
 *                          IWORK, PQ, INFO )
-* 
+*
 *       .. Scalar Arguments ..
 *       CHARACTER          TRANS
 *       INTEGER            IJOB, INFO, LDA, LDB, LDC, LDD, LDE, LDF, M, N,
@@ -149686,7 +150478,7 @@
 *       DOUBLE PRECISION   A( LDA, * ), B( LDB, * ), C( LDC, * ),
 *      $                   D( LDD, * ), E( LDE, * ), F( LDF, * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -149907,12 +150699,12 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date September 2012
+*> \date December 2016
 *
 *> \ingroup doubleSYauxiliary
 *
@@ -149927,10 +150719,10 @@
      $                   LDD, E, LDE, F, LDF, SCALE, RDSUM, RDSCAL,
      $                   IWORK, PQ, INFO )
 *
-*  -- LAPACK auxiliary routine (version 3.4.2) --
+*  -- LAPACK auxiliary routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     September 2012
+*     December 2016
 *
 *     .. Scalar Arguments ..
       CHARACTER          TRANS
@@ -149995,7 +150787,7 @@
          ELSE IF( N.LE.0 ) THEN
             INFO = -4
          ELSE IF( LDA.LT.MAX( 1, M ) ) THEN
-            INFO = -5
+            INFO = -6
          ELSE IF( LDB.LT.MAX( 1, N ) ) THEN
             INFO = -8
          ELSE IF( LDC.LT.MAX( 1, M ) ) THEN
@@ -150730,18 +151522,18 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DTGSYL + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dtgsyl.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dtgsyl.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dtgsyl.f"> 
+*> Download DTGSYL + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dtgsyl.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dtgsyl.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dtgsyl.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
@@ -150749,7 +151541,7 @@
 *       SUBROUTINE DTGSYL( TRANS, IJOB, M, N, A, LDA, B, LDB, C, LDC, D,
 *                          LDD, E, LDE, F, LDF, SCALE, DIF, WORK, LWORK,
 *                          IWORK, INFO )
-* 
+*
 *       .. Scalar Arguments ..
 *       CHARACTER          TRANS
 *       INTEGER            IJOB, INFO, LDA, LDB, LDC, LDD, LDE, LDF,
@@ -150762,7 +151554,7 @@
 *      $                   D( LDD, * ), E( LDE, * ), F( LDF, * ),
 *      $                   WORK( * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -150984,12 +151776,12 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date November 2011
+*> \date December 2016
 *
 *> \ingroup doubleSYcomputational
 *
@@ -151027,10 +151819,10 @@
      $                   LDD, E, LDE, F, LDF, SCALE, DIF, WORK, LWORK,
      $                   IWORK, INFO )
 *
-*  -- LAPACK computational routine (version 3.4.0) --
+*  -- LAPACK computational routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     November 2011
+*     December 2016
 *
 *     .. Scalar Arguments ..
       CHARACTER          TRANS
@@ -151412,25 +152204,25 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DTPCON + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dtpcon.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dtpcon.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dtpcon.f"> 
+*> Download DTPCON + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dtpcon.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dtpcon.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dtpcon.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       SUBROUTINE DTPCON( NORM, UPLO, DIAG, N, AP, RCOND, WORK, IWORK,
 *                          INFO )
-* 
+*
 *       .. Scalar Arguments ..
 *       CHARACTER          DIAG, NORM, UPLO
 *       INTEGER            INFO, N
@@ -151440,7 +152232,7 @@
 *       INTEGER            IWORK( * )
 *       DOUBLE PRECISION   AP( * ), WORK( * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -151527,12 +152319,12 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date November 2011
+*> \date December 2016
 *
 *> \ingroup doubleOTHERcomputational
 *
@@ -151540,10 +152332,10 @@
       SUBROUTINE DTPCON( NORM, UPLO, DIAG, N, AP, RCOND, WORK, IWORK,
      $                   INFO )
 *
-*  -- LAPACK computational routine (version 3.4.0) --
+*  -- LAPACK computational routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     November 2011
+*     December 2016
 *
 *     .. Scalar Arguments ..
       CHARACTER          DIAG, NORM, UPLO
@@ -151679,41 +152471,41 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DTPMQRT + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dtpmqrt.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dtpmqrt.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dtpmqrt.f"> 
+*> Download DTPMQRT + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dtpmqrt.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dtpmqrt.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dtpmqrt.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       SUBROUTINE DTPMQRT( SIDE, TRANS, M, N, K, L, NB, V, LDV, T, LDT,
 *                           A, LDA, B, LDB, WORK, INFO )
-* 
+*
 *       .. Scalar Arguments ..
 *       CHARACTER SIDE, TRANS
 *       INTEGER   INFO, K, LDV, LDA, LDB, M, N, L, NB, LDT
 *       ..
 *       .. Array Arguments ..
-*       DOUBLE PRECISION   V( LDV, * ), A( LDA, * ), B( LDB, * ), 
+*       DOUBLE PRECISION   V( LDV, * ), A( LDA, * ), B( LDB, * ),
 *      $                   T( LDT, * ), WORK( * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
 *>
 *> \verbatim
 *>
-*> DTPMQRT applies a real orthogonal matrix Q obtained from a 
+*> DTPMQRT applies a real orthogonal matrix Q obtained from a
 *> "triangular-pentagonal" real block reflector H to a general
 *> real matrix C, which consists of two blocks A and B.
 *> \endverbatim
@@ -151732,7 +152524,7 @@
 *> \verbatim
 *>          TRANS is CHARACTER*1
 *>          = 'N':  No transpose, apply Q;
-*>          = 'C':  Transpose, apply Q**T.
+*>          = 'T':  Transpose, apply Q**T.
 *> \endverbatim
 *>
 *> \param[in] M
@@ -151746,7 +152538,7 @@
 *>          N is INTEGER
 *>          The number of columns of the matrix B. N >= 0.
 *> \endverbatim
-*> 
+*>
 *> \param[in] K
 *> \verbatim
 *>          K is INTEGER
@@ -151757,7 +152549,7 @@
 *> \param[in] L
 *> \verbatim
 *>          L is INTEGER
-*>          The order of the trapezoidal part of V.  
+*>          The order of the trapezoidal part of V.
 *>          K >= L >= 0.  See Further Details.
 *> \endverbatim
 *>
@@ -151801,19 +152593,19 @@
 *> \param[in,out] A
 *> \verbatim
 *>          A is DOUBLE PRECISION array, dimension
-*>          (LDA,N) if SIDE = 'L' or 
+*>          (LDA,N) if SIDE = 'L' or
 *>          (LDA,K) if SIDE = 'R'
 *>          On entry, the K-by-N or M-by-K matrix A.
-*>          On exit, A is overwritten by the corresponding block of 
+*>          On exit, A is overwritten by the corresponding block of
 *>          Q*C or Q**T*C or C*Q or C*Q**T.  See Further Details.
 *> \endverbatim
 *>
 *> \param[in] LDA
 *> \verbatim
 *>          LDA is INTEGER
-*>          The leading dimension of the array A. 
+*>          The leading dimension of the array A.
 *>          If SIDE = 'L', LDC >= max(1,K);
-*>          If SIDE = 'R', LDC >= max(1,M). 
+*>          If SIDE = 'R', LDC >= max(1,M).
 *> \endverbatim
 *>
 *> \param[in,out] B
@@ -151827,7 +152619,7 @@
 *> \param[in] LDB
 *> \verbatim
 *>          LDB is INTEGER
-*>          The leading dimension of the array B. 
+*>          The leading dimension of the array B.
 *>          LDB >= max(1,M).
 *> \endverbatim
 *>
@@ -151847,12 +152639,12 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date November 2013
+*> \date December 2016
 *
 *> \ingroup doubleOTHERcomputational
 *
@@ -151862,20 +152654,20 @@
 *> \verbatim
 *>
 *>  The columns of the pentagonal matrix V contain the elementary reflectors
-*>  H(1), H(2), ..., H(K); V is composed of a rectangular block V1 and a 
+*>  H(1), H(2), ..., H(K); V is composed of a rectangular block V1 and a
 *>  trapezoidal block V2:
 *>
 *>        V = [V1]
 *>            [V2].
 *>
-*>  The size of the trapezoidal block V2 is determined by the parameter L, 
+*>  The size of the trapezoidal block V2 is determined by the parameter L,
 *>  where 0 <= L <= K; V2 is upper trapezoidal, consisting of the first L
 *>  rows of a K-by-K upper triangular matrix.  If L=K, V2 is upper triangular;
 *>  if L=0, there is no trapezoidal block, hence V = V1 is rectangular.
 *>
-*>  If SIDE = 'L':  C = [A]  where A is K-by-N,  B is M-by-N and V is M-by-K. 
-*>                      [B]   
-*>  
+*>  If SIDE = 'L':  C = [A]  where A is K-by-N,  B is M-by-N and V is M-by-K.
+*>                      [B]
+*>
 *>  If SIDE = 'R':  C = [A B]  where A is M-by-K, B is M-by-N and V is N-by-K.
 *>
 *>  The real orthogonal matrix Q is formed from V and T.
@@ -151893,17 +152685,17 @@
       SUBROUTINE DTPMQRT( SIDE, TRANS, M, N, K, L, NB, V, LDV, T, LDT,
      $                    A, LDA, B, LDB, WORK, INFO )
 *
-*  -- LAPACK computational routine (version 3.5.0) --
+*  -- LAPACK computational routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     November 2013
+*     December 2016
 *
 *     .. Scalar Arguments ..
       CHARACTER SIDE, TRANS
       INTEGER   INFO, K, LDV, LDA, LDB, M, N, L, NB, LDT
 *     ..
 *     .. Array Arguments ..
-      DOUBLE PRECISION   V( LDV, * ), A( LDA, * ), B( LDB, * ), 
+      DOUBLE PRECISION   V( LDV, * ), A( LDA, * ), B( LDB, * ),
      $                   T( LDT, * ), WORK( * )
 *     ..
 *
@@ -151919,7 +152711,7 @@
       EXTERNAL           LSAME
 *     ..
 *     .. External Subroutines ..
-      EXTERNAL           XERBLA, DLARFB
+      EXTERNAL           XERBLA
 *     ..
 *     .. Intrinsic Functions ..
       INTRINSIC          MAX, MIN
@@ -151933,7 +152725,7 @@
       RIGHT  = LSAME( SIDE,  'R' )
       TRAN   = LSAME( TRANS, 'T' )
       NOTRAN = LSAME( TRANS, 'N' )
-*      
+*
       IF ( LEFT ) THEN
          LDVQ = MAX( 1, M )
          LDAQ = MAX( 1, K )
@@ -151952,7 +152744,7 @@
       ELSE IF( K.LT.0 ) THEN
          INFO = -5
       ELSE IF( L.LT.0 .OR. L.GT.K ) THEN
-         INFO = -6         
+         INFO = -6
       ELSE IF( NB.LT.1 .OR. (NB.GT.K .AND. K.GT.0) ) THEN
          INFO = -7
       ELSE IF( LDV.LT.LDVQ ) THEN
@@ -151984,11 +152776,11 @@
             ELSE
                LB = MB-M+L-I+1
             END IF
-            CALL DTPRFB( 'L', 'T', 'F', 'C', MB, N, IB, LB, 
-     $                   V( 1, I ), LDV, T( 1, I ), LDT, 
+            CALL DTPRFB( 'L', 'T', 'F', 'C', MB, N, IB, LB,
+     $                   V( 1, I ), LDV, T( 1, I ), LDT,
      $                   A( I, 1 ), LDA, B, LDB, WORK, IB )
          END DO
-*         
+*
       ELSE IF( RIGHT .AND. NOTRAN ) THEN
 *
          DO I = 1, K, NB
@@ -151999,8 +152791,8 @@
             ELSE
                LB = MB-N+L-I+1
             END IF
-            CALL DTPRFB( 'R', 'N', 'F', 'C', M, MB, IB, LB, 
-     $                   V( 1, I ), LDV, T( 1, I ), LDT, 
+            CALL DTPRFB( 'R', 'N', 'F', 'C', M, MB, IB, LB,
+     $                   V( 1, I ), LDV, T( 1, I ), LDT,
      $                   A( 1, I ), LDA, B, LDB, WORK, M )
          END DO
 *
@@ -152008,15 +152800,15 @@
 *
          KF = ((K-1)/NB)*NB+1
          DO I = KF, 1, -NB
-            IB = MIN( NB, K-I+1 )  
+            IB = MIN( NB, K-I+1 )
             MB = MIN( M-L+I+IB-1, M )
             IF( I.GE.L ) THEN
                LB = 0
             ELSE
                LB = MB-M+L-I+1
-            END IF                   
+            END IF
             CALL DTPRFB( 'L', 'N', 'F', 'C', MB, N, IB, LB,
-     $                   V( 1, I ), LDV, T( 1, I ), LDT, 
+     $                   V( 1, I ), LDV, T( 1, I ), LDT,
      $                   A( I, 1 ), LDA, B, LDB, WORK, IB )
          END DO
 *
@@ -152024,7 +152816,7 @@
 *
          KF = ((K-1)/NB)*NB+1
          DO I = KF, 1, -NB
-            IB = MIN( NB, K-I+1 )         
+            IB = MIN( NB, K-I+1 )
             MB = MIN( N-L+I+IB-1, N )
             IF( I.GE.L ) THEN
                LB = 0
@@ -152032,7 +152824,7 @@
                LB = MB-N+L-I+1
             END IF
             CALL DTPRFB( 'R', 'T', 'F', 'C', M, MB, IB, LB,
-     $                   V( 1, I ), LDV, T( 1, I ), LDT, 
+     $                   V( 1, I ), LDV, T( 1, I ), LDT,
      $                   A( 1, I ), LDA, B, LDB, WORK, M )
          END DO
 *
@@ -152047,41 +152839,41 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DTPQRT + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dtpqrt.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dtpqrt.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dtpqrt.f"> 
+*> Download DTPQRT + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dtpqrt.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dtpqrt.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dtpqrt.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       SUBROUTINE DTPQRT( M, N, L, NB, A, LDA, B, LDB, T, LDT, WORK,
 *                          INFO )
-* 
+*
 *       .. Scalar Arguments ..
 *       INTEGER INFO, LDA, LDB, LDT, N, M, L, NB
 *       ..
 *       .. Array Arguments ..
 *       DOUBLE PRECISION A( LDA, * ), B( LDB, * ), T( LDT, * ), WORK( * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
 *>
 *> \verbatim
 *>
-*> DTPQRT computes a blocked QR factorization of a real 
-*> "triangular-pentagonal" matrix C, which is composed of a 
-*> triangular block A and pentagonal block B, using the compact 
+*> DTPQRT computes a blocked QR factorization of a real
+*> "triangular-pentagonal" matrix C, which is composed of a
+*> triangular block A and pentagonal block B, using the compact
 *> WY representation for Q.
 *> \endverbatim
 *
@@ -152091,7 +152883,7 @@
 *> \param[in] M
 *> \verbatim
 *>          M is INTEGER
-*>          The number of rows of the matrix B.  
+*>          The number of rows of the matrix B.
 *>          M >= 0.
 *> \endverbatim
 *>
@@ -152133,7 +152925,7 @@
 *> \param[in,out] B
 *> \verbatim
 *>          B is DOUBLE PRECISION array, dimension (LDB,N)
-*>          On entry, the pentagonal M-by-N matrix B.  The first M-L rows 
+*>          On entry, the pentagonal M-by-N matrix B.  The first M-L rows
 *>          are rectangular, and the last L rows are upper trapezoidal.
 *>          On exit, B contains the pentagonal matrix V.  See Further Details.
 *> \endverbatim
@@ -152150,7 +152942,7 @@
 *>          The upper triangular block reflectors stored in compact form
 *>          as a sequence of upper triangular blocks.  See Further Details.
 *> \endverbatim
-*>          
+*>
 *> \param[in] LDT
 *> \verbatim
 *>          LDT is INTEGER
@@ -152172,12 +152964,12 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date November 2013
+*> \date December 2016
 *
 *> \ingroup doubleOTHERcomputational
 *
@@ -152186,10 +152978,10 @@
 *>
 *> \verbatim
 *>
-*>  The input matrix C is a (N+M)-by-N matrix  
+*>  The input matrix C is a (N+M)-by-N matrix
 *>
 *>               C = [ A ]
-*>                   [ B ]        
+*>                   [ B ]
 *>
 *>  where A is an upper triangular N-by-N matrix, and B is M-by-N pentagonal
 *>  matrix consisting of a (M-L)-by-N rectangular matrix B1 on top of a L-by-N
@@ -152199,8 +152991,8 @@
 *>                   [ B2 ]  <-     L-by-N upper trapezoidal.
 *>
 *>  The upper trapezoidal matrix B2 consists of the first L rows of a
-*>  N-by-N upper triangular matrix, where 0 <= L <= MIN(M,N).  If L=0, 
-*>  B is rectangular M-by-N; if M=L=N, B is upper triangular.  
+*>  N-by-N upper triangular matrix, where 0 <= L <= MIN(M,N).  If L=0,
+*>  B is rectangular M-by-N; if M=L=N, B is upper triangular.
 *>
 *>  The matrix W stores the elementary reflectors H(i) in the i-th column
 *>  below the diagonal (of A) in the (N+M)-by-N input matrix C
@@ -152214,17 +153006,17 @@
 *>                   [ V ]  <- M-by-N, same form as B.
 *>
 *>  Thus, all of information needed for W is contained on exit in B, which
-*>  we call V above.  Note that V has the same form as B; that is, 
+*>  we call V above.  Note that V has the same form as B; that is,
 *>
 *>               V = [ V1 ] <- (M-L)-by-N rectangular
 *>                   [ V2 ] <-     L-by-N upper trapezoidal.
 *>
-*>  The columns of V represent the vectors which define the H(i)'s.  
+*>  The columns of V represent the vectors which define the H(i)'s.
 *>
 *>  The number of blocks is B = ceiling(N/NB), where each
-*>  block is of order NB except for the last block, which is of order 
+*>  block is of order NB except for the last block, which is of order
 *>  IB = N - (B-1)*NB.  For each of the B blocks, a upper triangular block
-*>  reflector factor is computed: T1, T2, ..., TB.  The NB-by-NB (and IB-by-IB 
+*>  reflector factor is computed: T1, T2, ..., TB.  The NB-by-NB (and IB-by-IB
 *>  for the last block) T's are stored in the NB-by-N matrix T as
 *>
 *>               T = [T1 T2 ... TB].
@@ -152234,10 +153026,10 @@
       SUBROUTINE DTPQRT( M, N, L, NB, A, LDA, B, LDB, T, LDT, WORK,
      $                   INFO )
 *
-*  -- LAPACK computational routine (version 3.5.0) --
+*  -- LAPACK computational routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     November 2013
+*     December 2016
 *
 *     .. Scalar Arguments ..
       INTEGER INFO, LDA, LDB, LDT, N, M, L, NB
@@ -152285,7 +153077,7 @@
       IF( M.EQ.0 .OR. N.EQ.0 ) RETURN
 *
       DO I = 1, N, NB
-*     
+*
 *     Compute the QR factorization of the current block
 *
          IB = MIN( N-I+1, NB )
@@ -152296,20 +153088,20 @@
             LB = MB-M+L-I+1
          END IF
 *
-         CALL DTPQRT2( MB, IB, LB, A(I,I), LDA, B( 1, I ), LDB, 
+         CALL DTPQRT2( MB, IB, LB, A(I,I), LDA, B( 1, I ), LDB,
      $                 T(1, I ), LDT, IINFO )
 *
 *     Update by applying H**T to B(:,I+IB:N) from the left
 *
          IF( I+IB.LE.N ) THEN
             CALL DTPRFB( 'L', 'T', 'F', 'C', MB, N-I-IB+1, IB, LB,
-     $                    B( 1, I ), LDB, T( 1, I ), LDT, 
-     $                    A( I, I+IB ), LDA, B( 1, I+IB ), LDB, 
+     $                    B( 1, I ), LDB, T( 1, I ), LDT,
+     $                    A( I, I+IB ), LDA, B( 1, I+IB ), LDB,
      $                    WORK, IB )
          END IF
       END DO
       RETURN
-*     
+*
 *     End of DTPQRT
 *
       END
@@ -152317,31 +153109,31 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DTPQRT2 + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dtpqrt2.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dtpqrt2.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dtpqrt2.f"> 
+*> Download DTPQRT2 + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dtpqrt2.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dtpqrt2.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dtpqrt2.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       SUBROUTINE DTPQRT2( M, N, L, A, LDA, B, LDB, T, LDT, INFO )
-* 
+*
 *       .. Scalar Arguments ..
 *       INTEGER   INFO, LDA, LDB, LDT, N, M, L
 *       ..
 *       .. Array Arguments ..
 *       DOUBLE PRECISION   A( LDA, * ), B( LDB, * ), T( LDT, * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -152349,7 +153141,7 @@
 *> \verbatim
 *>
 *> DTPQRT2 computes a QR factorization of a real "triangular-pentagonal"
-*> matrix C, which is composed of a triangular block A and pentagonal block B, 
+*> matrix C, which is composed of a triangular block A and pentagonal block B,
 *> using the compact WY representation for Q.
 *> \endverbatim
 *
@@ -152359,7 +153151,7 @@
 *> \param[in] M
 *> \verbatim
 *>          M is INTEGER
-*>          The total number of rows of the matrix B.  
+*>          The total number of rows of the matrix B.
 *>          M >= 0.
 *> \endverbatim
 *>
@@ -152374,7 +153166,7 @@
 *> \param[in] L
 *> \verbatim
 *>          L is INTEGER
-*>          The number of rows of the upper trapezoidal part of B.  
+*>          The number of rows of the upper trapezoidal part of B.
 *>          MIN(M,N) >= L >= 0.  See Further Details.
 *> \endverbatim
 *>
@@ -152395,7 +153187,7 @@
 *> \param[in,out] B
 *> \verbatim
 *>          B is DOUBLE PRECISION array, dimension (LDB,N)
-*>          On entry, the pentagonal M-by-N matrix B.  The first M-L rows 
+*>          On entry, the pentagonal M-by-N matrix B.  The first M-L rows
 *>          are rectangular, and the last L rows are upper trapezoidal.
 *>          On exit, B contains the pentagonal matrix V.  See Further Details.
 *> \endverbatim
@@ -152429,12 +153221,12 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date September 2012
+*> \date December 2016
 *
 *> \ingroup doubleOTHERcomputational
 *
@@ -152443,10 +153235,10 @@
 *>
 *> \verbatim
 *>
-*>  The input matrix C is a (N+M)-by-N matrix  
+*>  The input matrix C is a (N+M)-by-N matrix
 *>
 *>               C = [ A ]
-*>                   [ B ]        
+*>                   [ B ]
 *>
 *>  where A is an upper triangular N-by-N matrix, and B is M-by-N pentagonal
 *>  matrix consisting of a (M-L)-by-N rectangular matrix B1 on top of a L-by-N
@@ -152456,8 +153248,8 @@
 *>                   [ B2 ]  <-     L-by-N upper trapezoidal.
 *>
 *>  The upper trapezoidal matrix B2 consists of the first L rows of a
-*>  N-by-N upper triangular matrix, where 0 <= L <= MIN(M,N).  If L=0, 
-*>  B is rectangular M-by-N; if M=L=N, B is upper triangular.  
+*>  N-by-N upper triangular matrix, where 0 <= L <= MIN(M,N).  If L=0,
+*>  B is rectangular M-by-N; if M=L=N, B is upper triangular.
 *>
 *>  The matrix W stores the elementary reflectors H(i) in the i-th column
 *>  below the diagonal (of A) in the (N+M)-by-N input matrix C
@@ -152471,12 +153263,12 @@
 *>                   [ V ]  <- M-by-N, same form as B.
 *>
 *>  Thus, all of information needed for W is contained on exit in B, which
-*>  we call V above.  Note that V has the same form as B; that is, 
+*>  we call V above.  Note that V has the same form as B; that is,
 *>
 *>               V = [ V1 ] <- (M-L)-by-N rectangular
 *>                   [ V2 ] <-     L-by-N upper trapezoidal.
 *>
-*>  The columns of V represent the vectors which define the H(i)'s.  
+*>  The columns of V represent the vectors which define the H(i)'s.
 *>  The (M+N)-by-(M+N) block reflector H is then given by
 *>
 *>               H = I - W * T * W**T
@@ -152488,10 +153280,10 @@
 *  =====================================================================
       SUBROUTINE DTPQRT2( M, N, L, A, LDA, B, LDB, T, LDT, INFO )
 *
-*  -- LAPACK computational routine (version 3.4.2) --
+*  -- LAPACK computational routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     September 2012
+*     December 2016
 *
 *     .. Scalar Arguments ..
       INTEGER   INFO, LDA, LDB, LDT, N, M, L
@@ -152542,7 +153334,7 @@
 *     Quick return if possible
 *
       IF( N.EQ.0 .OR. M.EQ.0 ) RETURN
-*      
+*
       DO I = 1, N
 *
 *        Generate elementary reflector H(I) to annihilate B(:,I)
@@ -152556,16 +153348,16 @@
             DO J = 1, N-I
                T( J, N ) = (A( I, I+J ))
             END DO
-            CALL DGEMV( 'T', P, N-I, ONE, B( 1, I+1 ), LDB, 
+            CALL DGEMV( 'T', P, N-I, ONE, B( 1, I+1 ), LDB,
      $                  B( 1, I ), 1, ONE, T( 1, N ), 1 )
 *
 *           C(I:M,I+1:N) = C(I:m,I+1:N) + alpha*C(I:M,I)*W(1:N-1)^H
 *
-            ALPHA = -(T( I, 1 ))            
+            ALPHA = -(T( I, 1 ))
             DO J = 1, N-I
                A( I, I+J ) = A( I, I+J ) + ALPHA*(T( J, N ))
             END DO
-            CALL DGER( P, N-I, ALPHA, B( 1, I ), 1, 
+            CALL DGER( P, N-I, ALPHA, B( 1, I ), 1,
      $           T( 1, N ), 1, B( 1, I+1 ), LDB )
          END IF
       END DO
@@ -152593,13 +153385,13 @@
 *
 *        Rectangular part of B2
 *
-         CALL DGEMV( 'T', L, I-1-P, ALPHA, B( MP, NP ), LDB, 
+         CALL DGEMV( 'T', L, I-1-P, ALPHA, B( MP, NP ), LDB,
      $               B( MP, I ), 1, ZERO, T( NP, I ), 1 )
 *
 *        B1
 *
-         CALL DGEMV( 'T', M-L, I-1, ALPHA, B, LDB, B( 1, I ), 1, 
-     $               ONE, T( 1, I ), 1 )         
+         CALL DGEMV( 'T', M-L, I-1, ALPHA, B, LDB, B( 1, I ), 1,
+     $               ONE, T( 1, I ), 1 )
 *
 *        T(1:I-1,I) := T(1:I-1,1:I-1) * T(1:I-1,I)
 *
@@ -152610,7 +153402,7 @@
          T( I, I ) = T( I, 1 )
          T( I, 1 ) = ZERO
       END DO
-   
+
 *
 *     End of DTPQRT2
 *
@@ -152619,44 +153411,44 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DTPRFB + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dtprfb.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dtprfb.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dtprfb.f"> 
+*> Download DTPRFB + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dtprfb.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dtprfb.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dtprfb.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
-*       SUBROUTINE DTPRFB( SIDE, TRANS, DIRECT, STOREV, M, N, K, L, 
+*       SUBROUTINE DTPRFB( SIDE, TRANS, DIRECT, STOREV, M, N, K, L,
 *                          V, LDV, T, LDT, A, LDA, B, LDB, WORK, LDWORK )
-* 
+*
 *       .. Scalar Arguments ..
 *       CHARACTER DIRECT, SIDE, STOREV, TRANS
 *       INTEGER   K, L, LDA, LDB, LDT, LDV, LDWORK, M, N
 *       ..
 *       .. Array Arguments ..
-*       DOUBLE PRECISION   A( LDA, * ), B( LDB, * ), T( LDT, * ), 
+*       DOUBLE PRECISION   A( LDA, * ), B( LDB, * ), T( LDT, * ),
 *      $          V( LDV, * ), WORK( LDWORK, * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
 *>
 *> \verbatim
 *>
-*> DTPRFB applies a real "triangular-pentagonal" block reflector H or its 
-*> transpose H**T to a real matrix C, which is composed of two 
+*> DTPRFB applies a real "triangular-pentagonal" block reflector H or its
+*> transpose H**T to a real matrix C, which is composed of two
 *> blocks A and B, either from the left or right.
-*> 
+*>
 *> \endverbatim
 *
 *  Arguments:
@@ -152697,14 +153489,14 @@
 *> \param[in] M
 *> \verbatim
 *>          M is INTEGER
-*>          The number of rows of the matrix B.  
+*>          The number of rows of the matrix B.
 *>          M >= 0.
 *> \endverbatim
 *>
 *> \param[in] N
 *> \verbatim
 *>          N is INTEGER
-*>          The number of columns of the matrix B.  
+*>          The number of columns of the matrix B.
 *>          N >= 0.
 *> \endverbatim
 *>
@@ -152712,14 +153504,14 @@
 *> \verbatim
 *>          K is INTEGER
 *>          The order of the matrix T, i.e. the number of elementary
-*>          reflectors whose product defines the block reflector.  
+*>          reflectors whose product defines the block reflector.
 *>          K >= 0.
 *> \endverbatim
 *>
 *> \param[in] L
 *> \verbatim
 *>          L is INTEGER
-*>          The order of the trapezoidal part of V.  
+*>          The order of the trapezoidal part of V.
 *>          K >= L >= 0.  See Further Details.
 *> \endverbatim
 *>
@@ -152746,13 +153538,13 @@
 *> \verbatim
 *>          T is DOUBLE PRECISION array, dimension (LDT,K)
 *>          The triangular K-by-K matrix T in the representation of the
-*>          block reflector.  
+*>          block reflector.
 *> \endverbatim
 *>
 *> \param[in] LDT
 *> \verbatim
 *>          LDT is INTEGER
-*>          The leading dimension of the array T. 
+*>          The leading dimension of the array T.
 *>          LDT >= K.
 *> \endverbatim
 *>
@@ -152761,16 +153553,16 @@
 *>          A is DOUBLE PRECISION array, dimension
 *>          (LDA,N) if SIDE = 'L' or (LDA,K) if SIDE = 'R'
 *>          On entry, the K-by-N or M-by-K matrix A.
-*>          On exit, A is overwritten by the corresponding block of 
-*>          H*C or H**T*C or C*H or C*H**T.  See Futher Details.
+*>          On exit, A is overwritten by the corresponding block of
+*>          H*C or H**T*C or C*H or C*H**T.  See Further Details.
 *> \endverbatim
 *>
 *> \param[in] LDA
 *> \verbatim
 *>          LDA is INTEGER
-*>          The leading dimension of the array A. 
+*>          The leading dimension of the array A.
 *>          If SIDE = 'L', LDC >= max(1,K);
-*>          If SIDE = 'R', LDC >= max(1,M). 
+*>          If SIDE = 'R', LDC >= max(1,M).
 *> \endverbatim
 *>
 *> \param[in,out] B
@@ -152784,7 +153576,7 @@
 *> \param[in] LDB
 *> \verbatim
 *>          LDB is INTEGER
-*>          The leading dimension of the array B. 
+*>          The leading dimension of the array B.
 *>          LDB >= max(1,M).
 *> \endverbatim
 *>
@@ -152799,19 +153591,19 @@
 *> \verbatim
 *>          LDWORK is INTEGER
 *>          The leading dimension of the array WORK.
-*>          If SIDE = 'L', LDWORK >= K; 
+*>          If SIDE = 'L', LDWORK >= K;
 *>          if SIDE = 'R', LDWORK >= M.
 *> \endverbatim
 *
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date September 2012
+*> \date December 2016
 *
 *> \ingroup doubleOTHERauxiliary
 *
@@ -152821,21 +153613,21 @@
 *> \verbatim
 *>
 *>  The matrix C is a composite matrix formed from blocks A and B.
-*>  The block B is of size M-by-N; if SIDE = 'R', A is of size M-by-K, 
+*>  The block B is of size M-by-N; if SIDE = 'R', A is of size M-by-K,
 *>  and if SIDE = 'L', A is of size K-by-N.
 *>
 *>  If SIDE = 'R' and DIRECT = 'F', C = [A B].
 *>
-*>  If SIDE = 'L' and DIRECT = 'F', C = [A] 
+*>  If SIDE = 'L' and DIRECT = 'F', C = [A]
 *>                                      [B].
 *>
 *>  If SIDE = 'R' and DIRECT = 'B', C = [B A].
 *>
 *>  If SIDE = 'L' and DIRECT = 'B', C = [B]
-*>                                      [A]. 
+*>                                      [A].
 *>
-*>  The pentagonal matrix V is composed of a rectangular block V1 and a 
-*>  trapezoidal block V2.  The size of the trapezoidal block is determined by 
+*>  The pentagonal matrix V is composed of a rectangular block V1 and a
+*>  trapezoidal block V2.  The size of the trapezoidal block is determined by
 *>  the parameter L, where 0<=L<=K.  If L=K, the V2 block of V is triangular;
 *>  if L=0, there is no trapezoidal block, thus V = V1 is rectangular.
 *>
@@ -152852,7 +153644,7 @@
 *>     - V2 is lower trapezoidal (last L rows of K-by-K lower triangular)
 *>
 *>  If DIRECT = 'B' and STOREV = 'R':  V = [V2 V1]
-*>    
+*>
 *>     - V2 is upper trapezoidal (last L columns of K-by-K upper triangular)
 *>
 *>  If STOREV = 'C' and SIDE = 'L', V is M-by-K with V2 L-by-K.
@@ -152865,20 +153657,20 @@
 *> \endverbatim
 *>
 *  =====================================================================
-      SUBROUTINE DTPRFB( SIDE, TRANS, DIRECT, STOREV, M, N, K, L, 
+      SUBROUTINE DTPRFB( SIDE, TRANS, DIRECT, STOREV, M, N, K, L,
      $                   V, LDV, T, LDT, A, LDA, B, LDB, WORK, LDWORK )
 *
-*  -- LAPACK auxiliary routine (version 3.4.2) --
+*  -- LAPACK auxiliary routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     September 2012
+*     December 2016
 *
 *     .. Scalar Arguments ..
       CHARACTER DIRECT, SIDE, STOREV, TRANS
       INTEGER   K, L, LDA, LDB, LDT, LDV, LDWORK, M, N
 *     ..
 *     .. Array Arguments ..
-      DOUBLE PRECISION   A( LDA, * ), B( LDB, * ), T( LDT, * ), 
+      DOUBLE PRECISION   A( LDA, * ), B( LDB, * ), T( LDT, * ),
      $          V( LDV, * ), WORK( LDWORK, * )
 *     ..
 *
@@ -152939,7 +153731,7 @@
       END IF
 *
 * ---------------------------------------------------------------------------
-*      
+*
       IF( COLUMN .AND. FORWARD .AND. LEFT  ) THEN
 *
 * ---------------------------------------------------------------------------
@@ -152953,34 +153745,34 @@
 *        H = I - W T W**T          or  H**T = I - W T**T W**T
 *
 *        A = A -   T (A + V**T B)  or  A = A -   T**T (A + V**T B)
-*        B = B - V T (A + V**T B)  or  B = B - V T**T (A + V**T B) 
+*        B = B - V T (A + V**T B)  or  B = B - V T**T (A + V**T B)
 *
 * ---------------------------------------------------------------------------
 *
          MP = MIN( M-L+1, M )
          KP = MIN( L+1, K )
-*         
+*
          DO J = 1, N
             DO I = 1, L
                WORK( I, J ) = B( M-L+I, J )
             END DO
          END DO
          CALL DTRMM( 'L', 'U', 'T', 'N', L, N, ONE, V( MP, 1 ), LDV,
-     $               WORK, LDWORK )         
-         CALL DGEMM( 'T', 'N', L, N, M-L, ONE, V, LDV, B, LDB, 
+     $               WORK, LDWORK )
+         CALL DGEMM( 'T', 'N', L, N, M-L, ONE, V, LDV, B, LDB,
      $               ONE, WORK, LDWORK )
-         CALL DGEMM( 'T', 'N', K-L, N, M, ONE, V( 1, KP ), LDV, 
+         CALL DGEMM( 'T', 'N', K-L, N, M, ONE, V( 1, KP ), LDV,
      $               B, LDB, ZERO, WORK( KP, 1 ), LDWORK )
-*     
+*
          DO J = 1, N
             DO I = 1, K
                WORK( I, J ) = WORK( I, J ) + A( I, J )
             END DO
          END DO
 *
-         CALL DTRMM( 'L', 'U', TRANS, 'N', K, N, ONE, T, LDT, 
+         CALL DTRMM( 'L', 'U', TRANS, 'N', K, N, ONE, T, LDT,
      $               WORK, LDWORK )
-*     
+*
          DO J = 1, N
             DO I = 1, K
                A( I, J ) = A( I, J ) - WORK( I, J )
@@ -152990,7 +153782,7 @@
          CALL DGEMM( 'N', 'N', M-L, N, K, -ONE, V, LDV, WORK, LDWORK,
      $               ONE, B, LDB )
          CALL DGEMM( 'N', 'N', L, N, K-L, -ONE, V( MP, KP ), LDV,
-     $               WORK( KP, 1 ), LDWORK, ONE, B( MP, 1 ),  LDB )    
+     $               WORK( KP, 1 ), LDWORK, ONE, B( MP, 1 ),  LDB )
          CALL DTRMM( 'L', 'U', 'N', 'N', L, N, ONE, V( MP, 1 ), LDV,
      $               WORK, LDWORK )
          DO J = 1, N
@@ -153000,7 +153792,7 @@
          END DO
 *
 * ---------------------------------------------------------------------------
-*      
+*
       ELSE IF( COLUMN .AND. FORWARD .AND. RIGHT ) THEN
 *
 * ---------------------------------------------------------------------------
@@ -153019,7 +153811,7 @@
 *
          NP = MIN( N-L+1, N )
          KP = MIN( L+1, K )
-*         
+*
          DO J = 1, L
             DO I = 1, M
                WORK( I, J ) = B( I, N-L+J )
@@ -153027,20 +153819,20 @@
          END DO
          CALL DTRMM( 'R', 'U', 'N', 'N', M, L, ONE, V( NP, 1 ), LDV,
      $               WORK, LDWORK )
-         CALL DGEMM( 'N', 'N', M, L, N-L, ONE, B, LDB, 
+         CALL DGEMM( 'N', 'N', M, L, N-L, ONE, B, LDB,
      $               V, LDV, ONE, WORK, LDWORK )
-         CALL DGEMM( 'N', 'N', M, K-L, N, ONE, B, LDB, 
+         CALL DGEMM( 'N', 'N', M, K-L, N, ONE, B, LDB,
      $               V( 1, KP ), LDV, ZERO, WORK( 1, KP ), LDWORK )
-*     
+*
          DO J = 1, K
             DO I = 1, M
                WORK( I, J ) = WORK( I, J ) + A( I, J )
             END DO
          END DO
 *
-         CALL DTRMM( 'R', 'U', TRANS, 'N', M, K, ONE, T, LDT, 
+         CALL DTRMM( 'R', 'U', TRANS, 'N', M, K, ONE, T, LDT,
      $               WORK, LDWORK )
-*     
+*
          DO J = 1, K
             DO I = 1, M
                A( I, J ) = A( I, J ) - WORK( I, J )
@@ -153060,7 +153852,7 @@
          END DO
 *
 * ---------------------------------------------------------------------------
-*      
+*
       ELSE IF( COLUMN .AND. BACKWARD .AND. LEFT ) THEN
 *
 * ---------------------------------------------------------------------------
@@ -153074,7 +153866,7 @@
 *        H = I - W T W**T          or  H**T = I - W T**T W**T
 *
 *        A = A -   T (A + V**T B)  or  A = A -   T**T (A + V**T B)
-*        B = B - V T (A + V**T B)  or  B = B - V T**T (A + V**T B) 
+*        B = B - V T (A + V**T B)  or  B = B - V T**T (A + V**T B)
 *
 * ---------------------------------------------------------------------------
 *
@@ -153089,10 +153881,10 @@
 *
          CALL DTRMM( 'L', 'L', 'T', 'N', L, N, ONE, V( 1, KP ), LDV,
      $               WORK( KP, 1 ), LDWORK )
-         CALL DGEMM( 'T', 'N', L, N, M-L, ONE, V( MP, KP ), LDV, 
+         CALL DGEMM( 'T', 'N', L, N, M-L, ONE, V( MP, KP ), LDV,
      $               B( MP, 1 ), LDB, ONE, WORK( KP, 1 ), LDWORK )
          CALL DGEMM( 'T', 'N', K-L, N, M, ONE, V, LDV,
-     $               B, LDB, ZERO, WORK, LDWORK )         
+     $               B, LDB, ZERO, WORK, LDWORK )
 *
          DO J = 1, N
             DO I = 1, K
@@ -153100,16 +153892,16 @@
             END DO
          END DO
 *
-         CALL DTRMM( 'L', 'L', TRANS, 'N', K, N, ONE, T, LDT, 
+         CALL DTRMM( 'L', 'L', TRANS, 'N', K, N, ONE, T, LDT,
      $               WORK, LDWORK )
-*     
+*
          DO J = 1, N
             DO I = 1, K
                A( I, J ) = A( I, J ) - WORK( I, J )
             END DO
          END DO
 *
-         CALL DGEMM( 'N', 'N', M-L, N, K, -ONE, V( MP, 1 ), LDV, 
+         CALL DGEMM( 'N', 'N', M-L, N, K, -ONE, V( MP, 1 ), LDV,
      $               WORK, LDWORK, ONE, B( MP, 1 ), LDB )
          CALL DGEMM( 'N', 'N', L, N, K-L, -ONE, V, LDV,
      $               WORK, LDWORK, ONE, B,  LDB )
@@ -153122,7 +153914,7 @@
          END DO
 *
 * ---------------------------------------------------------------------------
-*      
+*
       ELSE IF( COLUMN .AND. BACKWARD .AND. RIGHT ) THEN
 *
 * ---------------------------------------------------------------------------
@@ -153141,7 +153933,7 @@
 *
          NP = MIN( L+1, N )
          KP = MIN( K-L+1, K )
-*         
+*
          DO J = 1, L
             DO I = 1, M
                WORK( I, K-L+J ) = B( I, J )
@@ -153149,20 +153941,20 @@
          END DO
          CALL DTRMM( 'R', 'L', 'N', 'N', M, L, ONE, V( 1, KP ), LDV,
      $               WORK( 1, KP ), LDWORK )
-         CALL DGEMM( 'N', 'N', M, L, N-L, ONE, B( 1, NP ), LDB, 
+         CALL DGEMM( 'N', 'N', M, L, N-L, ONE, B( 1, NP ), LDB,
      $               V( NP, KP ), LDV, ONE, WORK( 1, KP ), LDWORK )
-         CALL DGEMM( 'N', 'N', M, K-L, N, ONE, B, LDB, 
+         CALL DGEMM( 'N', 'N', M, K-L, N, ONE, B, LDB,
      $               V, LDV, ZERO, WORK, LDWORK )
-*     
+*
          DO J = 1, K
             DO I = 1, M
                WORK( I, J ) = WORK( I, J ) + A( I, J )
             END DO
          END DO
 *
-         CALL DTRMM( 'R', 'L', TRANS, 'N', M, K, ONE, T, LDT, 
+         CALL DTRMM( 'R', 'L', TRANS, 'N', M, K, ONE, T, LDT,
      $               WORK, LDWORK )
-*     
+*
          DO J = 1, K
             DO I = 1, M
                A( I, J ) = A( I, J ) - WORK( I, J )
@@ -153182,7 +153974,7 @@
          END DO
 *
 * ---------------------------------------------------------------------------
-*      
+*
       ELSE IF( ROW .AND. FORWARD .AND. LEFT ) THEN
 *
 * ---------------------------------------------------------------------------
@@ -153195,7 +153987,7 @@
 *        H = I - W**T T W          or  H**T = I - W**T T**T W
 *
 *        A = A -     T (A + V B)  or  A = A -     T**T (A + V B)
-*        B = B - V**T T (A + V B)  or  B = B - V**T T**T (A + V B) 
+*        B = B - V**T T (A + V B)  or  B = B - V**T T**T (A + V B)
 *
 * ---------------------------------------------------------------------------
 *
@@ -153206,12 +153998,12 @@
             DO I = 1, L
                WORK( I, J ) = B( M-L+I, J )
             END DO
-         END DO 
+         END DO
          CALL DTRMM( 'L', 'L', 'N', 'N', L, N, ONE, V( 1, MP ), LDV,
      $               WORK, LDB )
-         CALL DGEMM( 'N', 'N', L, N, M-L, ONE, V, LDV,B, LDB, 
+         CALL DGEMM( 'N', 'N', L, N, M-L, ONE, V, LDV,B, LDB,
      $               ONE, WORK, LDWORK )
-         CALL DGEMM( 'N', 'N', K-L, N, M, ONE, V( KP, 1 ), LDV, 
+         CALL DGEMM( 'N', 'N', K-L, N, M, ONE, V( KP, 1 ), LDV,
      $               B, LDB, ZERO, WORK( KP, 1 ), LDWORK )
 *
          DO J = 1, N
@@ -153220,7 +154012,7 @@
             END DO
          END DO
 *
-         CALL DTRMM( 'L', 'U', TRANS, 'N', K, N, ONE, T, LDT, 
+         CALL DTRMM( 'L', 'U', TRANS, 'N', K, N, ONE, T, LDT,
      $               WORK, LDWORK )
 *
          DO J = 1, N
@@ -153231,7 +154023,7 @@
 *
          CALL DGEMM( 'T', 'N', M-L, N, K, -ONE, V, LDV, WORK, LDWORK,
      $               ONE, B, LDB )
-         CALL DGEMM( 'T', 'N', L, N, K-L, -ONE, V( KP, MP ), LDV, 
+         CALL DGEMM( 'T', 'N', L, N, K-L, -ONE, V( KP, MP ), LDV,
      $               WORK( KP, 1 ), LDWORK, ONE, B( MP, 1 ), LDB )
          CALL DTRMM( 'L', 'L', 'T', 'N', L, N, ONE, V( 1, MP ), LDV,
      $               WORK, LDWORK )
@@ -153242,7 +154034,7 @@
          END DO
 *
 * ---------------------------------------------------------------------------
-*      
+*
       ELSE IF( ROW .AND. FORWARD .AND. RIGHT ) THEN
 *
 * ---------------------------------------------------------------------------
@@ -153270,7 +154062,7 @@
      $               WORK, LDWORK )
          CALL DGEMM( 'N', 'T', M, L, N-L, ONE, B, LDB, V, LDV,
      $               ONE, WORK, LDWORK )
-         CALL DGEMM( 'N', 'T', M, K-L, N, ONE, B, LDB, 
+         CALL DGEMM( 'N', 'T', M, K-L, N, ONE, B, LDB,
      $               V( KP, 1 ), LDV, ZERO, WORK( 1, KP ), LDWORK )
 *
          DO J = 1, K
@@ -153279,7 +154071,7 @@
             END DO
          END DO
 *
-         CALL DTRMM( 'R', 'U', TRANS, 'N', M, K, ONE, T, LDT, 
+         CALL DTRMM( 'R', 'U', TRANS, 'N', M, K, ONE, T, LDT,
      $               WORK, LDWORK )
 *
          DO J = 1, K
@@ -153288,10 +154080,10 @@
             END DO
          END DO
 *
-         CALL DGEMM( 'N', 'N', M, N-L, K, -ONE, WORK, LDWORK, 
+         CALL DGEMM( 'N', 'N', M, N-L, K, -ONE, WORK, LDWORK,
      $               V, LDV, ONE, B, LDB )
          CALL DGEMM( 'N', 'N', M, L, K-L, -ONE, WORK( 1, KP ), LDWORK,
-     $               V( KP, NP ), LDV, ONE, B( 1, NP ), LDB )   
+     $               V( KP, NP ), LDV, ONE, B( 1, NP ), LDB )
          CALL DTRMM( 'R', 'L', 'N', 'N', M, L, ONE, V( 1, NP ), LDV,
      $               WORK, LDWORK )
          DO J = 1, L
@@ -153301,7 +154093,7 @@
          END DO
 *
 * ---------------------------------------------------------------------------
-*      
+*
       ELSE IF( ROW .AND. BACKWARD .AND. LEFT ) THEN
 *
 * ---------------------------------------------------------------------------
@@ -153314,7 +154106,7 @@
 *        H = I - W**T T W          or  H**T = I - W**T T**T W
 *
 *        A = A -     T (A + V B)  or  A = A -     T**T (A + V B)
-*        B = B - V**T T (A + V B)  or  B = B - V**T T**T (A + V B) 
+*        B = B - V**T T (A + V B)  or  B = B - V**T T**T (A + V B)
 *
 * ---------------------------------------------------------------------------
 *
@@ -153350,10 +154142,10 @@
 *
          CALL DGEMM( 'T', 'N', M-L, N, K, -ONE, V( 1, MP ), LDV,
      $               WORK, LDWORK, ONE, B( MP, 1 ), LDB )
-         CALL DGEMM( 'T', 'N', L, N, K-L, -ONE, V, LDV, 
+         CALL DGEMM( 'T', 'N', L, N, K-L, -ONE, V, LDV,
      $               WORK, LDWORK, ONE, B, LDB )
          CALL DTRMM( 'L', 'U', 'T', 'N', L, N, ONE, V( KP, 1 ), LDV,
-     $               WORK( KP, 1 ), LDWORK )     
+     $               WORK( KP, 1 ), LDWORK )
          DO J = 1, N
             DO I = 1, L
                B( I, J ) = B( I, J ) - WORK( K-L+I, J )
@@ -153361,7 +154153,7 @@
          END DO
 *
 * ---------------------------------------------------------------------------
-*      
+*
       ELSE IF( ROW .AND. BACKWARD .AND. RIGHT ) THEN
 *
 * ---------------------------------------------------------------------------
@@ -153390,7 +154182,7 @@
          CALL DGEMM( 'N', 'T', M, L, N-L, ONE, B( 1, NP ), LDB,
      $               V( KP, NP ), LDV, ONE, WORK( 1, KP ), LDWORK )
          CALL DGEMM( 'N', 'T', M, K-L, N, ONE, B, LDB, V, LDV,
-     $               ZERO, WORK, LDWORK )                     
+     $               ZERO, WORK, LDWORK )
 *
          DO J = 1, K
             DO I = 1, M
@@ -153398,7 +154190,7 @@
             END DO
          END DO
 *
-         CALL DTRMM( 'R', 'L', TRANS, 'N', M, K, ONE, T, LDT,         
+         CALL DTRMM( 'R', 'L', TRANS, 'N', M, K, ONE, T, LDT,
      $               WORK, LDWORK )
 *
          DO J = 1, K
@@ -153407,9 +154199,9 @@
             END DO
          END DO
 *
-         CALL DGEMM( 'N', 'N', M, N-L, K, -ONE, WORK, LDWORK, 
+         CALL DGEMM( 'N', 'N', M, N-L, K, -ONE, WORK, LDWORK,
      $               V( 1, NP ), LDV, ONE, B( 1, NP ), LDB )
-         CALL DGEMM( 'N', 'N', M, L, K-L , -ONE, WORK, LDWORK,    
+         CALL DGEMM( 'N', 'N', M, L, K-L , -ONE, WORK, LDWORK,
      $               V, LDV, ONE, B, LDB )
          CALL DTRMM( 'R', 'U', 'N', 'N', M, L, ONE, V( KP, 1 ), LDV,
      $               WORK( 1, KP ), LDWORK )
@@ -153430,25 +154222,25 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DTPRFS + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dtprfs.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dtprfs.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dtprfs.f"> 
+*> Download DTPRFS + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dtprfs.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dtprfs.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dtprfs.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       SUBROUTINE DTPRFS( UPLO, TRANS, DIAG, N, NRHS, AP, B, LDB, X, LDX,
 *                          FERR, BERR, WORK, IWORK, INFO )
-* 
+*
 *       .. Scalar Arguments ..
 *       CHARACTER          DIAG, TRANS, UPLO
 *       INTEGER            INFO, LDB, LDX, N, NRHS
@@ -153458,7 +154250,7 @@
 *       DOUBLE PRECISION   AP( * ), B( LDB, * ), BERR( * ), FERR( * ),
 *      $                   WORK( * ), X( LDX, * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -153590,12 +154382,12 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date November 2011
+*> \date December 2016
 *
 *> \ingroup doubleOTHERcomputational
 *
@@ -153603,10 +154395,10 @@
       SUBROUTINE DTPRFS( UPLO, TRANS, DIAG, N, NRHS, AP, B, LDB, X, LDX,
      $                   FERR, BERR, WORK, IWORK, INFO )
 *
-*  -- LAPACK computational routine (version 3.4.0) --
+*  -- LAPACK computational routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     November 2011
+*     December 2016
 *
 *     .. Scalar Arguments ..
       CHARACTER          DIAG, TRANS, UPLO
@@ -153903,24 +154695,24 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DTPTRI + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dtptri.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dtptri.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dtptri.f"> 
+*> Download DTPTRI + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dtptri.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dtptri.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dtptri.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       SUBROUTINE DTPTRI( UPLO, DIAG, N, AP, INFO )
-* 
+*
 *       .. Scalar Arguments ..
 *       CHARACTER          DIAG, UPLO
 *       INTEGER            INFO, N
@@ -153928,7 +154720,7 @@
 *       .. Array Arguments ..
 *       DOUBLE PRECISION   AP( * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -153987,12 +154779,12 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date November 2011
+*> \date December 2016
 *
 *> \ingroup doubleOTHERcomputational
 *
@@ -154018,10 +154810,10 @@
 *  =====================================================================
       SUBROUTINE DTPTRI( UPLO, DIAG, N, AP, INFO )
 *
-*  -- LAPACK computational routine (version 3.4.0) --
+*  -- LAPACK computational routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     November 2011
+*     December 2016
 *
 *     .. Scalar Arguments ..
       CHARACTER          DIAG, UPLO
@@ -154144,24 +154936,24 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DTPTRS + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dtptrs.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dtptrs.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dtptrs.f"> 
+*> Download DTPTRS + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dtptrs.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dtptrs.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dtptrs.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       SUBROUTINE DTPTRS( UPLO, TRANS, DIAG, N, NRHS, AP, B, LDB, INFO )
-* 
+*
 *       .. Scalar Arguments ..
 *       CHARACTER          DIAG, TRANS, UPLO
 *       INTEGER            INFO, LDB, N, NRHS
@@ -154169,7 +154961,7 @@
 *       .. Array Arguments ..
 *       DOUBLE PRECISION   AP( * ), B( LDB, * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -154260,22 +155052,22 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date November 2011
+*> \date December 2016
 *
 *> \ingroup doubleOTHERcomputational
 *
 *  =====================================================================
       SUBROUTINE DTPTRS( UPLO, TRANS, DIAG, N, NRHS, AP, B, LDB, INFO )
 *
-*  -- LAPACK computational routine (version 3.4.0) --
+*  -- LAPACK computational routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     November 2011
+*     December 2016
 *
 *     .. Scalar Arguments ..
       CHARACTER          DIAG, TRANS, UPLO
@@ -154372,31 +155164,31 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DTPTTF + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dtpttf.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dtpttf.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dtpttf.f"> 
+*> Download DTPTTF + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dtpttf.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dtpttf.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dtpttf.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       SUBROUTINE DTPTTF( TRANSR, UPLO, N, AP, ARF, INFO )
-* 
+*
 *       .. Scalar Arguments ..
 *       CHARACTER          TRANSR, UPLO
 *       INTEGER            INFO, N
 *       ..
 *       .. Array Arguments ..
 *       DOUBLE PRECISION   AP( 0: * ), ARF( 0: * )
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -154457,12 +155249,12 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date September 2012
+*> \date December 2016
 *
 *> \ingroup doubleOTHERcomputational
 *
@@ -154556,10 +155348,10 @@
 *  =====================================================================
       SUBROUTINE DTPTTF( TRANSR, UPLO, N, AP, ARF, INFO )
 *
-*  -- LAPACK computational routine (version 3.4.2) --
+*  -- LAPACK computational routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     September 2012
+*     December 2016
 *
 *     .. Scalar Arguments ..
       CHARACTER          TRANSR, UPLO
@@ -154874,24 +155666,24 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DTPTTR + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dtpttr.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dtpttr.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dtpttr.f"> 
+*> Download DTPTTR + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dtpttr.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dtpttr.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dtpttr.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       SUBROUTINE DTPTTR( UPLO, N, AP, A, LDA, INFO )
-* 
+*
 *       .. Scalar Arguments ..
 *       CHARACTER          UPLO
 *       INTEGER            INFO, N, LDA
@@ -154899,7 +155691,7 @@
 *       .. Array Arguments ..
 *       DOUBLE PRECISION   A( LDA, * ), AP( * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -154964,22 +155756,22 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date September 2012
+*> \date December 2016
 *
 *> \ingroup doubleOTHERcomputational
 *
 *  =====================================================================
       SUBROUTINE DTPTTR( UPLO, N, AP, A, LDA, INFO )
 *
-*  -- LAPACK computational routine (version 3.4.2) --
+*  -- LAPACK computational routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     September 2012
+*     December 2016
 *
 *     .. Scalar Arguments ..
       CHARACTER          UPLO
@@ -155050,25 +155842,25 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DTRCON + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dtrcon.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dtrcon.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dtrcon.f"> 
+*> Download DTRCON + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dtrcon.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dtrcon.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dtrcon.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       SUBROUTINE DTRCON( NORM, UPLO, DIAG, N, A, LDA, RCOND, WORK,
 *                          IWORK, INFO )
-* 
+*
 *       .. Scalar Arguments ..
 *       CHARACTER          DIAG, NORM, UPLO
 *       INTEGER            INFO, LDA, N
@@ -155078,7 +155870,7 @@
 *       INTEGER            IWORK( * )
 *       DOUBLE PRECISION   A( LDA, * ), WORK( * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -155172,12 +155964,12 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date November 2011
+*> \date December 2016
 *
 *> \ingroup doubleOTHERcomputational
 *
@@ -155185,10 +155977,10 @@
       SUBROUTINE DTRCON( NORM, UPLO, DIAG, N, A, LDA, RCOND, WORK,
      $                   IWORK, INFO )
 *
-*  -- LAPACK computational routine (version 3.4.0) --
+*  -- LAPACK computational routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     November 2011
+*     December 2016
 *
 *     .. Scalar Arguments ..
       CHARACTER          DIAG, NORM, UPLO
@@ -155326,25 +156118,25 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DTREVC + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dtrevc.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dtrevc.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dtrevc.f"> 
+*> Download DTREVC + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dtrevc.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dtrevc.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dtrevc.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       SUBROUTINE DTREVC( SIDE, HOWMNY, SELECT, N, T, LDT, VL, LDVL, VR,
 *                          LDVR, MM, M, WORK, INFO )
-* 
+*
 *       .. Scalar Arguments ..
 *       CHARACTER          HOWMNY, SIDE
 *       INTEGER            INFO, LDT, LDVL, LDVR, M, MM, N
@@ -155354,7 +156146,7 @@
 *       DOUBLE PRECISION   T( LDT, * ), VL( LDVL, * ), VR( LDVR, * ),
 *      $                   WORK( * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -155365,16 +156157,16 @@
 *> a real upper quasi-triangular matrix T.
 *> Matrices of this type are produced by the Schur factorization of
 *> a real general matrix:  A = Q*T*Q**T, as computed by DHSEQR.
-*> 
+*>
 *> The right eigenvector x and the left eigenvector y of T corresponding
 *> to an eigenvalue w are defined by:
-*> 
-*>    T*x = w*x,     (y**T)*T = w*(y**T)
-*> 
-*> where y**T denotes the transpose of y.
+*>
+*>    T*x = w*x,     (y**H)*T = w*(y**H)
+*>
+*> where y**H denotes the conjugate transpose of y.
 *> The eigenvalues are not input to this routine, but are read directly
 *> from the diagonal blocks of T.
-*> 
+*>
 *> This routine returns the matrices X and/or Y of right and left
 *> eigenvectors of T, or the products Q*X and/or Q*Y, where Q is an
 *> input matrix.  If Q is the orthogonal factor that reduces a matrix
@@ -155519,12 +156311,12 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date November 2011
+*> \date December 2016
 *
 *> \ingroup doubleOTHERcomputational
 *
@@ -155546,10 +156338,10 @@
       SUBROUTINE DTREVC( SIDE, HOWMNY, SELECT, N, T, LDT, VL, LDVL, VR,
      $                   LDVR, MM, M, WORK, INFO )
 *
-*  -- LAPACK computational routine (version 3.4.0) --
+*  -- LAPACK computational routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     November 2011
+*     December 2016
 *
 *     .. Scalar Arguments ..
       CHARACTER          HOWMNY, SIDE
@@ -155685,35 +156477,1170 @@
 *
 *     Index IP is used to specify the real or complex eigenvalue:
 *       IP = 0, real eigenvalue,
-*            1, first of conjugate complex pair: (wr,wi)
+*            1, first of conjugate complex pair: (wr,wi)
+*           -1, second of conjugate complex pair: (wr,wi)
+*
+      N2 = 2*N
+*
+      IF( RIGHTV ) THEN
+*
+*        Compute right eigenvectors.
+*
+         IP = 0
+         IS = M
+         DO 140 KI = N, 1, -1
+*
+            IF( IP.EQ.1 )
+     $         GO TO 130
+            IF( KI.EQ.1 )
+     $         GO TO 40
+            IF( T( KI, KI-1 ).EQ.ZERO )
+     $         GO TO 40
+            IP = -1
+*
+   40       CONTINUE
+            IF( SOMEV ) THEN
+               IF( IP.EQ.0 ) THEN
+                  IF( .NOT.SELECT( KI ) )
+     $               GO TO 130
+               ELSE
+                  IF( .NOT.SELECT( KI-1 ) )
+     $               GO TO 130
+               END IF
+            END IF
+*
+*           Compute the KI-th eigenvalue (WR,WI).
+*
+            WR = T( KI, KI )
+            WI = ZERO
+            IF( IP.NE.0 )
+     $         WI = SQRT( ABS( T( KI, KI-1 ) ) )*
+     $              SQRT( ABS( T( KI-1, KI ) ) )
+            SMIN = MAX( ULP*( ABS( WR )+ABS( WI ) ), SMLNUM )
+*
+            IF( IP.EQ.0 ) THEN
+*
+*              Real right eigenvector
+*
+               WORK( KI+N ) = ONE
+*
+*              Form right-hand side
+*
+               DO 50 K = 1, KI - 1
+                  WORK( K+N ) = -T( K, KI )
+   50          CONTINUE
+*
+*              Solve the upper quasi-triangular system:
+*                 (T(1:KI-1,1:KI-1) - WR)*X = SCALE*WORK.
+*
+               JNXT = KI - 1
+               DO 60 J = KI - 1, 1, -1
+                  IF( J.GT.JNXT )
+     $               GO TO 60
+                  J1 = J
+                  J2 = J
+                  JNXT = J - 1
+                  IF( J.GT.1 ) THEN
+                     IF( T( J, J-1 ).NE.ZERO ) THEN
+                        J1 = J - 1
+                        JNXT = J - 2
+                     END IF
+                  END IF
+*
+                  IF( J1.EQ.J2 ) THEN
+*
+*                    1-by-1 diagonal block
+*
+                     CALL DLALN2( .FALSE., 1, 1, SMIN, ONE, T( J, J ),
+     $                            LDT, ONE, ONE, WORK( J+N ), N, WR,
+     $                            ZERO, X, 2, SCALE, XNORM, IERR )
+*
+*                    Scale X(1,1) to avoid overflow when updating
+*                    the right-hand side.
+*
+                     IF( XNORM.GT.ONE ) THEN
+                        IF( WORK( J ).GT.BIGNUM / XNORM ) THEN
+                           X( 1, 1 ) = X( 1, 1 ) / XNORM
+                           SCALE = SCALE / XNORM
+                        END IF
+                     END IF
+*
+*                    Scale if necessary
+*
+                     IF( SCALE.NE.ONE )
+     $                  CALL DSCAL( KI, SCALE, WORK( 1+N ), 1 )
+                     WORK( J+N ) = X( 1, 1 )
+*
+*                    Update right-hand side
+*
+                     CALL DAXPY( J-1, -X( 1, 1 ), T( 1, J ), 1,
+     $                           WORK( 1+N ), 1 )
+*
+                  ELSE
+*
+*                    2-by-2 diagonal block
+*
+                     CALL DLALN2( .FALSE., 2, 1, SMIN, ONE,
+     $                            T( J-1, J-1 ), LDT, ONE, ONE,
+     $                            WORK( J-1+N ), N, WR, ZERO, X, 2,
+     $                            SCALE, XNORM, IERR )
+*
+*                    Scale X(1,1) and X(2,1) to avoid overflow when
+*                    updating the right-hand side.
+*
+                     IF( XNORM.GT.ONE ) THEN
+                        BETA = MAX( WORK( J-1 ), WORK( J ) )
+                        IF( BETA.GT.BIGNUM / XNORM ) THEN
+                           X( 1, 1 ) = X( 1, 1 ) / XNORM
+                           X( 2, 1 ) = X( 2, 1 ) / XNORM
+                           SCALE = SCALE / XNORM
+                        END IF
+                     END IF
+*
+*                    Scale if necessary
+*
+                     IF( SCALE.NE.ONE )
+     $                  CALL DSCAL( KI, SCALE, WORK( 1+N ), 1 )
+                     WORK( J-1+N ) = X( 1, 1 )
+                     WORK( J+N ) = X( 2, 1 )
+*
+*                    Update right-hand side
+*
+                     CALL DAXPY( J-2, -X( 1, 1 ), T( 1, J-1 ), 1,
+     $                           WORK( 1+N ), 1 )
+                     CALL DAXPY( J-2, -X( 2, 1 ), T( 1, J ), 1,
+     $                           WORK( 1+N ), 1 )
+                  END IF
+   60          CONTINUE
+*
+*              Copy the vector x or Q*x to VR and normalize.
+*
+               IF( .NOT.OVER ) THEN
+                  CALL DCOPY( KI, WORK( 1+N ), 1, VR( 1, IS ), 1 )
+*
+                  II = IDAMAX( KI, VR( 1, IS ), 1 )
+                  REMAX = ONE / ABS( VR( II, IS ) )
+                  CALL DSCAL( KI, REMAX, VR( 1, IS ), 1 )
+*
+                  DO 70 K = KI + 1, N
+                     VR( K, IS ) = ZERO
+   70             CONTINUE
+               ELSE
+                  IF( KI.GT.1 )
+     $               CALL DGEMV( 'N', N, KI-1, ONE, VR, LDVR,
+     $                           WORK( 1+N ), 1, WORK( KI+N ),
+     $                           VR( 1, KI ), 1 )
+*
+                  II = IDAMAX( N, VR( 1, KI ), 1 )
+                  REMAX = ONE / ABS( VR( II, KI ) )
+                  CALL DSCAL( N, REMAX, VR( 1, KI ), 1 )
+               END IF
+*
+            ELSE
+*
+*              Complex right eigenvector.
+*
+*              Initial solve
+*                [ (T(KI-1,KI-1) T(KI-1,KI) ) - (WR + I* WI)]*X = 0.
+*                [ (T(KI,KI-1)   T(KI,KI)   )               ]
+*
+               IF( ABS( T( KI-1, KI ) ).GE.ABS( T( KI, KI-1 ) ) ) THEN
+                  WORK( KI-1+N ) = ONE
+                  WORK( KI+N2 ) = WI / T( KI-1, KI )
+               ELSE
+                  WORK( KI-1+N ) = -WI / T( KI, KI-1 )
+                  WORK( KI+N2 ) = ONE
+               END IF
+               WORK( KI+N ) = ZERO
+               WORK( KI-1+N2 ) = ZERO
+*
+*              Form right-hand side
+*
+               DO 80 K = 1, KI - 2
+                  WORK( K+N ) = -WORK( KI-1+N )*T( K, KI-1 )
+                  WORK( K+N2 ) = -WORK( KI+N2 )*T( K, KI )
+   80          CONTINUE
+*
+*              Solve upper quasi-triangular system:
+*              (T(1:KI-2,1:KI-2) - (WR+i*WI))*X = SCALE*(WORK+i*WORK2)
+*
+               JNXT = KI - 2
+               DO 90 J = KI - 2, 1, -1
+                  IF( J.GT.JNXT )
+     $               GO TO 90
+                  J1 = J
+                  J2 = J
+                  JNXT = J - 1
+                  IF( J.GT.1 ) THEN
+                     IF( T( J, J-1 ).NE.ZERO ) THEN
+                        J1 = J - 1
+                        JNXT = J - 2
+                     END IF
+                  END IF
+*
+                  IF( J1.EQ.J2 ) THEN
+*
+*                    1-by-1 diagonal block
+*
+                     CALL DLALN2( .FALSE., 1, 2, SMIN, ONE, T( J, J ),
+     $                            LDT, ONE, ONE, WORK( J+N ), N, WR, WI,
+     $                            X, 2, SCALE, XNORM, IERR )
+*
+*                    Scale X(1,1) and X(1,2) to avoid overflow when
+*                    updating the right-hand side.
+*
+                     IF( XNORM.GT.ONE ) THEN
+                        IF( WORK( J ).GT.BIGNUM / XNORM ) THEN
+                           X( 1, 1 ) = X( 1, 1 ) / XNORM
+                           X( 1, 2 ) = X( 1, 2 ) / XNORM
+                           SCALE = SCALE / XNORM
+                        END IF
+                     END IF
+*
+*                    Scale if necessary
+*
+                     IF( SCALE.NE.ONE ) THEN
+                        CALL DSCAL( KI, SCALE, WORK( 1+N ), 1 )
+                        CALL DSCAL( KI, SCALE, WORK( 1+N2 ), 1 )
+                     END IF
+                     WORK( J+N ) = X( 1, 1 )
+                     WORK( J+N2 ) = X( 1, 2 )
+*
+*                    Update the right-hand side
+*
+                     CALL DAXPY( J-1, -X( 1, 1 ), T( 1, J ), 1,
+     $                           WORK( 1+N ), 1 )
+                     CALL DAXPY( J-1, -X( 1, 2 ), T( 1, J ), 1,
+     $                           WORK( 1+N2 ), 1 )
+*
+                  ELSE
+*
+*                    2-by-2 diagonal block
+*
+                     CALL DLALN2( .FALSE., 2, 2, SMIN, ONE,
+     $                            T( J-1, J-1 ), LDT, ONE, ONE,
+     $                            WORK( J-1+N ), N, WR, WI, X, 2, SCALE,
+     $                            XNORM, IERR )
+*
+*                    Scale X to avoid overflow when updating
+*                    the right-hand side.
+*
+                     IF( XNORM.GT.ONE ) THEN
+                        BETA = MAX( WORK( J-1 ), WORK( J ) )
+                        IF( BETA.GT.BIGNUM / XNORM ) THEN
+                           REC = ONE / XNORM
+                           X( 1, 1 ) = X( 1, 1 )*REC
+                           X( 1, 2 ) = X( 1, 2 )*REC
+                           X( 2, 1 ) = X( 2, 1 )*REC
+                           X( 2, 2 ) = X( 2, 2 )*REC
+                           SCALE = SCALE*REC
+                        END IF
+                     END IF
+*
+*                    Scale if necessary
+*
+                     IF( SCALE.NE.ONE ) THEN
+                        CALL DSCAL( KI, SCALE, WORK( 1+N ), 1 )
+                        CALL DSCAL( KI, SCALE, WORK( 1+N2 ), 1 )
+                     END IF
+                     WORK( J-1+N ) = X( 1, 1 )
+                     WORK( J+N ) = X( 2, 1 )
+                     WORK( J-1+N2 ) = X( 1, 2 )
+                     WORK( J+N2 ) = X( 2, 2 )
+*
+*                    Update the right-hand side
+*
+                     CALL DAXPY( J-2, -X( 1, 1 ), T( 1, J-1 ), 1,
+     $                           WORK( 1+N ), 1 )
+                     CALL DAXPY( J-2, -X( 2, 1 ), T( 1, J ), 1,
+     $                           WORK( 1+N ), 1 )
+                     CALL DAXPY( J-2, -X( 1, 2 ), T( 1, J-1 ), 1,
+     $                           WORK( 1+N2 ), 1 )
+                     CALL DAXPY( J-2, -X( 2, 2 ), T( 1, J ), 1,
+     $                           WORK( 1+N2 ), 1 )
+                  END IF
+   90          CONTINUE
+*
+*              Copy the vector x or Q*x to VR and normalize.
+*
+               IF( .NOT.OVER ) THEN
+                  CALL DCOPY( KI, WORK( 1+N ), 1, VR( 1, IS-1 ), 1 )
+                  CALL DCOPY( KI, WORK( 1+N2 ), 1, VR( 1, IS ), 1 )
+*
+                  EMAX = ZERO
+                  DO 100 K = 1, KI
+                     EMAX = MAX( EMAX, ABS( VR( K, IS-1 ) )+
+     $                      ABS( VR( K, IS ) ) )
+  100             CONTINUE
+*
+                  REMAX = ONE / EMAX
+                  CALL DSCAL( KI, REMAX, VR( 1, IS-1 ), 1 )
+                  CALL DSCAL( KI, REMAX, VR( 1, IS ), 1 )
+*
+                  DO 110 K = KI + 1, N
+                     VR( K, IS-1 ) = ZERO
+                     VR( K, IS ) = ZERO
+  110             CONTINUE
+*
+               ELSE
+*
+                  IF( KI.GT.2 ) THEN
+                     CALL DGEMV( 'N', N, KI-2, ONE, VR, LDVR,
+     $                           WORK( 1+N ), 1, WORK( KI-1+N ),
+     $                           VR( 1, KI-1 ), 1 )
+                     CALL DGEMV( 'N', N, KI-2, ONE, VR, LDVR,
+     $                           WORK( 1+N2 ), 1, WORK( KI+N2 ),
+     $                           VR( 1, KI ), 1 )
+                  ELSE
+                     CALL DSCAL( N, WORK( KI-1+N ), VR( 1, KI-1 ), 1 )
+                     CALL DSCAL( N, WORK( KI+N2 ), VR( 1, KI ), 1 )
+                  END IF
+*
+                  EMAX = ZERO
+                  DO 120 K = 1, N
+                     EMAX = MAX( EMAX, ABS( VR( K, KI-1 ) )+
+     $                      ABS( VR( K, KI ) ) )
+  120             CONTINUE
+                  REMAX = ONE / EMAX
+                  CALL DSCAL( N, REMAX, VR( 1, KI-1 ), 1 )
+                  CALL DSCAL( N, REMAX, VR( 1, KI ), 1 )
+               END IF
+            END IF
+*
+            IS = IS - 1
+            IF( IP.NE.0 )
+     $         IS = IS - 1
+  130       CONTINUE
+            IF( IP.EQ.1 )
+     $         IP = 0
+            IF( IP.EQ.-1 )
+     $         IP = 1
+  140    CONTINUE
+      END IF
+*
+      IF( LEFTV ) THEN
+*
+*        Compute left eigenvectors.
+*
+         IP = 0
+         IS = 1
+         DO 260 KI = 1, N
+*
+            IF( IP.EQ.-1 )
+     $         GO TO 250
+            IF( KI.EQ.N )
+     $         GO TO 150
+            IF( T( KI+1, KI ).EQ.ZERO )
+     $         GO TO 150
+            IP = 1
+*
+  150       CONTINUE
+            IF( SOMEV ) THEN
+               IF( .NOT.SELECT( KI ) )
+     $            GO TO 250
+            END IF
+*
+*           Compute the KI-th eigenvalue (WR,WI).
+*
+            WR = T( KI, KI )
+            WI = ZERO
+            IF( IP.NE.0 )
+     $         WI = SQRT( ABS( T( KI, KI+1 ) ) )*
+     $              SQRT( ABS( T( KI+1, KI ) ) )
+            SMIN = MAX( ULP*( ABS( WR )+ABS( WI ) ), SMLNUM )
+*
+            IF( IP.EQ.0 ) THEN
+*
+*              Real left eigenvector.
+*
+               WORK( KI+N ) = ONE
+*
+*              Form right-hand side
+*
+               DO 160 K = KI + 1, N
+                  WORK( K+N ) = -T( KI, K )
+  160          CONTINUE
+*
+*              Solve the quasi-triangular system:
+*                 (T(KI+1:N,KI+1:N) - WR)**T*X = SCALE*WORK
+*
+               VMAX = ONE
+               VCRIT = BIGNUM
+*
+               JNXT = KI + 1
+               DO 170 J = KI + 1, N
+                  IF( J.LT.JNXT )
+     $               GO TO 170
+                  J1 = J
+                  J2 = J
+                  JNXT = J + 1
+                  IF( J.LT.N ) THEN
+                     IF( T( J+1, J ).NE.ZERO ) THEN
+                        J2 = J + 1
+                        JNXT = J + 2
+                     END IF
+                  END IF
+*
+                  IF( J1.EQ.J2 ) THEN
+*
+*                    1-by-1 diagonal block
+*
+*                    Scale if necessary to avoid overflow when forming
+*                    the right-hand side.
+*
+                     IF( WORK( J ).GT.VCRIT ) THEN
+                        REC = ONE / VMAX
+                        CALL DSCAL( N-KI+1, REC, WORK( KI+N ), 1 )
+                        VMAX = ONE
+                        VCRIT = BIGNUM
+                     END IF
+*
+                     WORK( J+N ) = WORK( J+N ) -
+     $                             DDOT( J-KI-1, T( KI+1, J ), 1,
+     $                             WORK( KI+1+N ), 1 )
+*
+*                    Solve (T(J,J)-WR)**T*X = WORK
+*
+                     CALL DLALN2( .FALSE., 1, 1, SMIN, ONE, T( J, J ),
+     $                            LDT, ONE, ONE, WORK( J+N ), N, WR,
+     $                            ZERO, X, 2, SCALE, XNORM, IERR )
+*
+*                    Scale if necessary
+*
+                     IF( SCALE.NE.ONE )
+     $                  CALL DSCAL( N-KI+1, SCALE, WORK( KI+N ), 1 )
+                     WORK( J+N ) = X( 1, 1 )
+                     VMAX = MAX( ABS( WORK( J+N ) ), VMAX )
+                     VCRIT = BIGNUM / VMAX
+*
+                  ELSE
+*
+*                    2-by-2 diagonal block
+*
+*                    Scale if necessary to avoid overflow when forming
+*                    the right-hand side.
+*
+                     BETA = MAX( WORK( J ), WORK( J+1 ) )
+                     IF( BETA.GT.VCRIT ) THEN
+                        REC = ONE / VMAX
+                        CALL DSCAL( N-KI+1, REC, WORK( KI+N ), 1 )
+                        VMAX = ONE
+                        VCRIT = BIGNUM
+                     END IF
+*
+                     WORK( J+N ) = WORK( J+N ) -
+     $                             DDOT( J-KI-1, T( KI+1, J ), 1,
+     $                             WORK( KI+1+N ), 1 )
+*
+                     WORK( J+1+N ) = WORK( J+1+N ) -
+     $                               DDOT( J-KI-1, T( KI+1, J+1 ), 1,
+     $                               WORK( KI+1+N ), 1 )
+*
+*                    Solve
+*                      [T(J,J)-WR   T(J,J+1)     ]**T * X = SCALE*( WORK1 )
+*                      [T(J+1,J)    T(J+1,J+1)-WR]                ( WORK2 )
+*
+                     CALL DLALN2( .TRUE., 2, 1, SMIN, ONE, T( J, J ),
+     $                            LDT, ONE, ONE, WORK( J+N ), N, WR,
+     $                            ZERO, X, 2, SCALE, XNORM, IERR )
+*
+*                    Scale if necessary
+*
+                     IF( SCALE.NE.ONE )
+     $                  CALL DSCAL( N-KI+1, SCALE, WORK( KI+N ), 1 )
+                     WORK( J+N ) = X( 1, 1 )
+                     WORK( J+1+N ) = X( 2, 1 )
+*
+                     VMAX = MAX( ABS( WORK( J+N ) ),
+     $                      ABS( WORK( J+1+N ) ), VMAX )
+                     VCRIT = BIGNUM / VMAX
+*
+                  END IF
+  170          CONTINUE
+*
+*              Copy the vector x or Q*x to VL and normalize.
+*
+               IF( .NOT.OVER ) THEN
+                  CALL DCOPY( N-KI+1, WORK( KI+N ), 1, VL( KI, IS ), 1 )
+*
+                  II = IDAMAX( N-KI+1, VL( KI, IS ), 1 ) + KI - 1
+                  REMAX = ONE / ABS( VL( II, IS ) )
+                  CALL DSCAL( N-KI+1, REMAX, VL( KI, IS ), 1 )
+*
+                  DO 180 K = 1, KI - 1
+                     VL( K, IS ) = ZERO
+  180             CONTINUE
+*
+               ELSE
+*
+                  IF( KI.LT.N )
+     $               CALL DGEMV( 'N', N, N-KI, ONE, VL( 1, KI+1 ), LDVL,
+     $                           WORK( KI+1+N ), 1, WORK( KI+N ),
+     $                           VL( 1, KI ), 1 )
+*
+                  II = IDAMAX( N, VL( 1, KI ), 1 )
+                  REMAX = ONE / ABS( VL( II, KI ) )
+                  CALL DSCAL( N, REMAX, VL( 1, KI ), 1 )
+*
+               END IF
+*
+            ELSE
+*
+*              Complex left eigenvector.
+*
+*               Initial solve:
+*                 ((T(KI,KI)    T(KI,KI+1) )**T - (WR - I* WI))*X = 0.
+*                 ((T(KI+1,KI) T(KI+1,KI+1))                )
+*
+               IF( ABS( T( KI, KI+1 ) ).GE.ABS( T( KI+1, KI ) ) ) THEN
+                  WORK( KI+N ) = WI / T( KI, KI+1 )
+                  WORK( KI+1+N2 ) = ONE
+               ELSE
+                  WORK( KI+N ) = ONE
+                  WORK( KI+1+N2 ) = -WI / T( KI+1, KI )
+               END IF
+               WORK( KI+1+N ) = ZERO
+               WORK( KI+N2 ) = ZERO
+*
+*              Form right-hand side
+*
+               DO 190 K = KI + 2, N
+                  WORK( K+N ) = -WORK( KI+N )*T( KI, K )
+                  WORK( K+N2 ) = -WORK( KI+1+N2 )*T( KI+1, K )
+  190          CONTINUE
+*
+*              Solve complex quasi-triangular system:
+*              ( T(KI+2,N:KI+2,N) - (WR-i*WI) )*X = WORK1+i*WORK2
+*
+               VMAX = ONE
+               VCRIT = BIGNUM
+*
+               JNXT = KI + 2
+               DO 200 J = KI + 2, N
+                  IF( J.LT.JNXT )
+     $               GO TO 200
+                  J1 = J
+                  J2 = J
+                  JNXT = J + 1
+                  IF( J.LT.N ) THEN
+                     IF( T( J+1, J ).NE.ZERO ) THEN
+                        J2 = J + 1
+                        JNXT = J + 2
+                     END IF
+                  END IF
+*
+                  IF( J1.EQ.J2 ) THEN
+*
+*                    1-by-1 diagonal block
+*
+*                    Scale if necessary to avoid overflow when
+*                    forming the right-hand side elements.
+*
+                     IF( WORK( J ).GT.VCRIT ) THEN
+                        REC = ONE / VMAX
+                        CALL DSCAL( N-KI+1, REC, WORK( KI+N ), 1 )
+                        CALL DSCAL( N-KI+1, REC, WORK( KI+N2 ), 1 )
+                        VMAX = ONE
+                        VCRIT = BIGNUM
+                     END IF
+*
+                     WORK( J+N ) = WORK( J+N ) -
+     $                             DDOT( J-KI-2, T( KI+2, J ), 1,
+     $                             WORK( KI+2+N ), 1 )
+                     WORK( J+N2 ) = WORK( J+N2 ) -
+     $                              DDOT( J-KI-2, T( KI+2, J ), 1,
+     $                              WORK( KI+2+N2 ), 1 )
+*
+*                    Solve (T(J,J)-(WR-i*WI))*(X11+i*X12)= WK+I*WK2
+*
+                     CALL DLALN2( .FALSE., 1, 2, SMIN, ONE, T( J, J ),
+     $                            LDT, ONE, ONE, WORK( J+N ), N, WR,
+     $                            -WI, X, 2, SCALE, XNORM, IERR )
+*
+*                    Scale if necessary
+*
+                     IF( SCALE.NE.ONE ) THEN
+                        CALL DSCAL( N-KI+1, SCALE, WORK( KI+N ), 1 )
+                        CALL DSCAL( N-KI+1, SCALE, WORK( KI+N2 ), 1 )
+                     END IF
+                     WORK( J+N ) = X( 1, 1 )
+                     WORK( J+N2 ) = X( 1, 2 )
+                     VMAX = MAX( ABS( WORK( J+N ) ),
+     $                      ABS( WORK( J+N2 ) ), VMAX )
+                     VCRIT = BIGNUM / VMAX
+*
+                  ELSE
+*
+*                    2-by-2 diagonal block
+*
+*                    Scale if necessary to avoid overflow when forming
+*                    the right-hand side elements.
+*
+                     BETA = MAX( WORK( J ), WORK( J+1 ) )
+                     IF( BETA.GT.VCRIT ) THEN
+                        REC = ONE / VMAX
+                        CALL DSCAL( N-KI+1, REC, WORK( KI+N ), 1 )
+                        CALL DSCAL( N-KI+1, REC, WORK( KI+N2 ), 1 )
+                        VMAX = ONE
+                        VCRIT = BIGNUM
+                     END IF
+*
+                     WORK( J+N ) = WORK( J+N ) -
+     $                             DDOT( J-KI-2, T( KI+2, J ), 1,
+     $                             WORK( KI+2+N ), 1 )
+*
+                     WORK( J+N2 ) = WORK( J+N2 ) -
+     $                              DDOT( J-KI-2, T( KI+2, J ), 1,
+     $                              WORK( KI+2+N2 ), 1 )
+*
+                     WORK( J+1+N ) = WORK( J+1+N ) -
+     $                               DDOT( J-KI-2, T( KI+2, J+1 ), 1,
+     $                               WORK( KI+2+N ), 1 )
+*
+                     WORK( J+1+N2 ) = WORK( J+1+N2 ) -
+     $                                DDOT( J-KI-2, T( KI+2, J+1 ), 1,
+     $                                WORK( KI+2+N2 ), 1 )
+*
+*                    Solve 2-by-2 complex linear equation
+*                      ([T(j,j)   T(j,j+1)  ]**T-(wr-i*wi)*I)*X = SCALE*B
+*                      ([T(j+1,j) T(j+1,j+1)]               )
+*
+                     CALL DLALN2( .TRUE., 2, 2, SMIN, ONE, T( J, J ),
+     $                            LDT, ONE, ONE, WORK( J+N ), N, WR,
+     $                            -WI, X, 2, SCALE, XNORM, IERR )
+*
+*                    Scale if necessary
+*
+                     IF( SCALE.NE.ONE ) THEN
+                        CALL DSCAL( N-KI+1, SCALE, WORK( KI+N ), 1 )
+                        CALL DSCAL( N-KI+1, SCALE, WORK( KI+N2 ), 1 )
+                     END IF
+                     WORK( J+N ) = X( 1, 1 )
+                     WORK( J+N2 ) = X( 1, 2 )
+                     WORK( J+1+N ) = X( 2, 1 )
+                     WORK( J+1+N2 ) = X( 2, 2 )
+                     VMAX = MAX( ABS( X( 1, 1 ) ), ABS( X( 1, 2 ) ),
+     $                      ABS( X( 2, 1 ) ), ABS( X( 2, 2 ) ), VMAX )
+                     VCRIT = BIGNUM / VMAX
+*
+                  END IF
+  200          CONTINUE
+*
+*              Copy the vector x or Q*x to VL and normalize.
+*
+               IF( .NOT.OVER ) THEN
+                  CALL DCOPY( N-KI+1, WORK( KI+N ), 1, VL( KI, IS ), 1 )
+                  CALL DCOPY( N-KI+1, WORK( KI+N2 ), 1, VL( KI, IS+1 ),
+     $                        1 )
+*
+                  EMAX = ZERO
+                  DO 220 K = KI, N
+                     EMAX = MAX( EMAX, ABS( VL( K, IS ) )+
+     $                      ABS( VL( K, IS+1 ) ) )
+  220             CONTINUE
+                  REMAX = ONE / EMAX
+                  CALL DSCAL( N-KI+1, REMAX, VL( KI, IS ), 1 )
+                  CALL DSCAL( N-KI+1, REMAX, VL( KI, IS+1 ), 1 )
+*
+                  DO 230 K = 1, KI - 1
+                     VL( K, IS ) = ZERO
+                     VL( K, IS+1 ) = ZERO
+  230             CONTINUE
+               ELSE
+                  IF( KI.LT.N-1 ) THEN
+                     CALL DGEMV( 'N', N, N-KI-1, ONE, VL( 1, KI+2 ),
+     $                           LDVL, WORK( KI+2+N ), 1, WORK( KI+N ),
+     $                           VL( 1, KI ), 1 )
+                     CALL DGEMV( 'N', N, N-KI-1, ONE, VL( 1, KI+2 ),
+     $                           LDVL, WORK( KI+2+N2 ), 1,
+     $                           WORK( KI+1+N2 ), VL( 1, KI+1 ), 1 )
+                  ELSE
+                     CALL DSCAL( N, WORK( KI+N ), VL( 1, KI ), 1 )
+                     CALL DSCAL( N, WORK( KI+1+N2 ), VL( 1, KI+1 ), 1 )
+                  END IF
+*
+                  EMAX = ZERO
+                  DO 240 K = 1, N
+                     EMAX = MAX( EMAX, ABS( VL( K, KI ) )+
+     $                      ABS( VL( K, KI+1 ) ) )
+  240             CONTINUE
+                  REMAX = ONE / EMAX
+                  CALL DSCAL( N, REMAX, VL( 1, KI ), 1 )
+                  CALL DSCAL( N, REMAX, VL( 1, KI+1 ), 1 )
+*
+               END IF
+*
+            END IF
+*
+            IS = IS + 1
+            IF( IP.NE.0 )
+     $         IS = IS + 1
+  250       CONTINUE
+            IF( IP.EQ.-1 )
+     $         IP = 0
+            IF( IP.EQ.1 )
+     $         IP = -1
+*
+  260    CONTINUE
+*
+      END IF
+*
+      RETURN
+*
+*     End of DTREVC
+*
+      END
+*> \brief \b DTREVC3
+*
+*  =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
+*
+*> \htmlonly
+*> Download DTREVC3 + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dtrevc3.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dtrevc3.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dtrevc3.f">
+*> [TXT]</a>
+*> \endhtmlonly
+*
+*  Definition:
+*  ===========
+*
+*       SUBROUTINE DTREVC3( SIDE, HOWMNY, SELECT, N, T, LDT, VL, LDVL,
+*                           VR, LDVR, MM, M, WORK, LWORK, INFO )
+*
+*       .. Scalar Arguments ..
+*       CHARACTER          HOWMNY, SIDE
+*       INTEGER            INFO, LDT, LDVL, LDVR, LWORK, M, MM, N
+*       ..
+*       .. Array Arguments ..
+*       LOGICAL            SELECT( * )
+*       DOUBLE PRECISION   T( LDT, * ), VL( LDVL, * ), VR( LDVR, * ),
+*      $                   WORK( * )
+*       ..
+*
+*
+*> \par Purpose:
+*  =============
+*>
+*> \verbatim
+*>
+*> DTREVC3 computes some or all of the right and/or left eigenvectors of
+*> a real upper quasi-triangular matrix T.
+*> Matrices of this type are produced by the Schur factorization of
+*> a real general matrix:  A = Q*T*Q**T, as computed by DHSEQR.
+*>
+*> The right eigenvector x and the left eigenvector y of T corresponding
+*> to an eigenvalue w are defined by:
+*>
+*>    T*x = w*x,     (y**H)*T = w*(y**H)
+*>
+*> where y**H denotes the conjugate transpose of y.
+*> The eigenvalues are not input to this routine, but are read directly
+*> from the diagonal blocks of T.
+*>
+*> This routine returns the matrices X and/or Y of right and left
+*> eigenvectors of T, or the products Q*X and/or Q*Y, where Q is an
+*> input matrix. If Q is the orthogonal factor that reduces a matrix
+*> A to Schur form T, then Q*X and Q*Y are the matrices of right and
+*> left eigenvectors of A.
+*>
+*> This uses a Level 3 BLAS version of the back transformation.
+*> \endverbatim
+*
+*  Arguments:
+*  ==========
+*
+*> \param[in] SIDE
+*> \verbatim
+*>          SIDE is CHARACTER*1
+*>          = 'R':  compute right eigenvectors only;
+*>          = 'L':  compute left eigenvectors only;
+*>          = 'B':  compute both right and left eigenvectors.
+*> \endverbatim
+*>
+*> \param[in] HOWMNY
+*> \verbatim
+*>          HOWMNY is CHARACTER*1
+*>          = 'A':  compute all right and/or left eigenvectors;
+*>          = 'B':  compute all right and/or left eigenvectors,
+*>                  backtransformed by the matrices in VR and/or VL;
+*>          = 'S':  compute selected right and/or left eigenvectors,
+*>                  as indicated by the logical array SELECT.
+*> \endverbatim
+*>
+*> \param[in,out] SELECT
+*> \verbatim
+*>          SELECT is LOGICAL array, dimension (N)
+*>          If HOWMNY = 'S', SELECT specifies the eigenvectors to be
+*>          computed.
+*>          If w(j) is a real eigenvalue, the corresponding real
+*>          eigenvector is computed if SELECT(j) is .TRUE..
+*>          If w(j) and w(j+1) are the real and imaginary parts of a
+*>          complex eigenvalue, the corresponding complex eigenvector is
+*>          computed if either SELECT(j) or SELECT(j+1) is .TRUE., and
+*>          on exit SELECT(j) is set to .TRUE. and SELECT(j+1) is set to
+*>          .FALSE..
+*>          Not referenced if HOWMNY = 'A' or 'B'.
+*> \endverbatim
+*>
+*> \param[in] N
+*> \verbatim
+*>          N is INTEGER
+*>          The order of the matrix T. N >= 0.
+*> \endverbatim
+*>
+*> \param[in] T
+*> \verbatim
+*>          T is DOUBLE PRECISION array, dimension (LDT,N)
+*>          The upper quasi-triangular matrix T in Schur canonical form.
+*> \endverbatim
+*>
+*> \param[in] LDT
+*> \verbatim
+*>          LDT is INTEGER
+*>          The leading dimension of the array T. LDT >= max(1,N).
+*> \endverbatim
+*>
+*> \param[in,out] VL
+*> \verbatim
+*>          VL is DOUBLE PRECISION array, dimension (LDVL,MM)
+*>          On entry, if SIDE = 'L' or 'B' and HOWMNY = 'B', VL must
+*>          contain an N-by-N matrix Q (usually the orthogonal matrix Q
+*>          of Schur vectors returned by DHSEQR).
+*>          On exit, if SIDE = 'L' or 'B', VL contains:
+*>          if HOWMNY = 'A', the matrix Y of left eigenvectors of T;
+*>          if HOWMNY = 'B', the matrix Q*Y;
+*>          if HOWMNY = 'S', the left eigenvectors of T specified by
+*>                           SELECT, stored consecutively in the columns
+*>                           of VL, in the same order as their
+*>                           eigenvalues.
+*>          A complex eigenvector corresponding to a complex eigenvalue
+*>          is stored in two consecutive columns, the first holding the
+*>          real part, and the second the imaginary part.
+*>          Not referenced if SIDE = 'R'.
+*> \endverbatim
+*>
+*> \param[in] LDVL
+*> \verbatim
+*>          LDVL is INTEGER
+*>          The leading dimension of the array VL.
+*>          LDVL >= 1, and if SIDE = 'L' or 'B', LDVL >= N.
+*> \endverbatim
+*>
+*> \param[in,out] VR
+*> \verbatim
+*>          VR is DOUBLE PRECISION array, dimension (LDVR,MM)
+*>          On entry, if SIDE = 'R' or 'B' and HOWMNY = 'B', VR must
+*>          contain an N-by-N matrix Q (usually the orthogonal matrix Q
+*>          of Schur vectors returned by DHSEQR).
+*>          On exit, if SIDE = 'R' or 'B', VR contains:
+*>          if HOWMNY = 'A', the matrix X of right eigenvectors of T;
+*>          if HOWMNY = 'B', the matrix Q*X;
+*>          if HOWMNY = 'S', the right eigenvectors of T specified by
+*>                           SELECT, stored consecutively in the columns
+*>                           of VR, in the same order as their
+*>                           eigenvalues.
+*>          A complex eigenvector corresponding to a complex eigenvalue
+*>          is stored in two consecutive columns, the first holding the
+*>          real part and the second the imaginary part.
+*>          Not referenced if SIDE = 'L'.
+*> \endverbatim
+*>
+*> \param[in] LDVR
+*> \verbatim
+*>          LDVR is INTEGER
+*>          The leading dimension of the array VR.
+*>          LDVR >= 1, and if SIDE = 'R' or 'B', LDVR >= N.
+*> \endverbatim
+*>
+*> \param[in] MM
+*> \verbatim
+*>          MM is INTEGER
+*>          The number of columns in the arrays VL and/or VR. MM >= M.
+*> \endverbatim
+*>
+*> \param[out] M
+*> \verbatim
+*>          M is INTEGER
+*>          The number of columns in the arrays VL and/or VR actually
+*>          used to store the eigenvectors.
+*>          If HOWMNY = 'A' or 'B', M is set to N.
+*>          Each selected real eigenvector occupies one column and each
+*>          selected complex eigenvector occupies two columns.
+*> \endverbatim
+*>
+*> \param[out] WORK
+*> \verbatim
+*>          WORK is DOUBLE PRECISION array, dimension (MAX(1,LWORK))
+*> \endverbatim
+*>
+*> \param[in] LWORK
+*> \verbatim
+*>          LWORK is INTEGER
+*>          The dimension of array WORK. LWORK >= max(1,3*N).
+*>          For optimum performance, LWORK >= N + 2*N*NB, where NB is
+*>          the optimal blocksize.
+*>
+*>          If LWORK = -1, then a workspace query is assumed; the routine
+*>          only calculates the optimal size of the WORK array, returns
+*>          this value as the first entry of the WORK array, and no error
+*>          message related to LWORK is issued by XERBLA.
+*> \endverbatim
+*>
+*> \param[out] INFO
+*> \verbatim
+*>          INFO is INTEGER
+*>          = 0:  successful exit
+*>          < 0:  if INFO = -i, the i-th argument had an illegal value
+*> \endverbatim
+*
+*  Authors:
+*  ========
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date December 2016
+*
+*  @precisions fortran d -> s
+*
+*> \ingroup doubleOTHERcomputational
+*
+*> \par Further Details:
+*  =====================
+*>
+*> \verbatim
+*>
+*>  The algorithm used in this program is basically backward (forward)
+*>  substitution, with scaling to make the the code robust against
+*>  possible overflow.
+*>
+*>  Each eigenvector is normalized so that the element of largest
+*>  magnitude has magnitude 1; here the magnitude of a complex number
+*>  (x,y) is taken to be |x| + |y|.
+*> \endverbatim
+*>
+*  =====================================================================
+      SUBROUTINE DTREVC3( SIDE, HOWMNY, SELECT, N, T, LDT, VL, LDVL,
+     $                    VR, LDVR, MM, M, WORK, LWORK, INFO )
+      IMPLICIT NONE
+*
+*  -- LAPACK computational routine (version 3.7.0) --
+*  -- LAPACK is a software package provided by Univ. of Tennessee,    --
+*  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+*     December 2016
+*
+*     .. Scalar Arguments ..
+      CHARACTER          HOWMNY, SIDE
+      INTEGER            INFO, LDT, LDVL, LDVR, LWORK, M, MM, N
+*     ..
+*     .. Array Arguments ..
+      LOGICAL            SELECT( * )
+      DOUBLE PRECISION   T( LDT, * ), VL( LDVL, * ), VR( LDVR, * ),
+     $                   WORK( * )
+*     ..
+*
+*  =====================================================================
+*
+*     .. Parameters ..
+      DOUBLE PRECISION   ZERO, ONE
+      PARAMETER          ( ZERO = 0.0D+0, ONE = 1.0D+0 )
+      INTEGER            NBMIN, NBMAX
+      PARAMETER          ( NBMIN = 8, NBMAX = 128 )
+*     ..
+*     .. Local Scalars ..
+      LOGICAL            ALLV, BOTHV, LEFTV, LQUERY, OVER, PAIR,
+     $                   RIGHTV, SOMEV
+      INTEGER            I, IERR, II, IP, IS, J, J1, J2, JNXT, K, KI,
+     $                   IV, MAXWRK, NB, KI2
+      DOUBLE PRECISION   BETA, BIGNUM, EMAX, OVFL, REC, REMAX, SCALE,
+     $                   SMIN, SMLNUM, ULP, UNFL, VCRIT, VMAX, WI, WR,
+     $                   XNORM
+*     ..
+*     .. External Functions ..
+      LOGICAL            LSAME
+      INTEGER            IDAMAX, ILAENV
+      DOUBLE PRECISION   DDOT, DLAMCH
+      EXTERNAL           LSAME, IDAMAX, ILAENV, DDOT, DLAMCH
+*     ..
+*     .. External Subroutines ..
+      EXTERNAL           DAXPY, DCOPY, DGEMV, DLALN2, DSCAL, XERBLA,
+     $                   DGEMM, DLASET, DLABAD
+*     ..
+*     .. Intrinsic Functions ..
+      INTRINSIC          ABS, MAX, SQRT
+*     ..
+*     .. Local Arrays ..
+      DOUBLE PRECISION   X( 2, 2 )
+      INTEGER            ISCOMPLEX( NBMAX )
+*     ..
+*     .. Executable Statements ..
+*
+*     Decode and test the input parameters
+*
+      BOTHV  = LSAME( SIDE, 'B' )
+      RIGHTV = LSAME( SIDE, 'R' ) .OR. BOTHV
+      LEFTV  = LSAME( SIDE, 'L' ) .OR. BOTHV
+*
+      ALLV  = LSAME( HOWMNY, 'A' )
+      OVER  = LSAME( HOWMNY, 'B' )
+      SOMEV = LSAME( HOWMNY, 'S' )
+*
+      INFO = 0
+      NB = ILAENV( 1, 'DTREVC', SIDE // HOWMNY, N, -1, -1, -1 )
+      MAXWRK = N + 2*N*NB
+      WORK(1) = MAXWRK
+      LQUERY = ( LWORK.EQ.-1 )
+      IF( .NOT.RIGHTV .AND. .NOT.LEFTV ) THEN
+         INFO = -1
+      ELSE IF( .NOT.ALLV .AND. .NOT.OVER .AND. .NOT.SOMEV ) THEN
+         INFO = -2
+      ELSE IF( N.LT.0 ) THEN
+         INFO = -4
+      ELSE IF( LDT.LT.MAX( 1, N ) ) THEN
+         INFO = -6
+      ELSE IF( LDVL.LT.1 .OR. ( LEFTV .AND. LDVL.LT.N ) ) THEN
+         INFO = -8
+      ELSE IF( LDVR.LT.1 .OR. ( RIGHTV .AND. LDVR.LT.N ) ) THEN
+         INFO = -10
+      ELSE IF( LWORK.LT.MAX( 1, 3*N ) .AND. .NOT.LQUERY ) THEN
+         INFO = -14
+      ELSE
+*
+*        Set M to the number of columns required to store the selected
+*        eigenvectors, standardize the array SELECT if necessary, and
+*        test MM.
+*
+         IF( SOMEV ) THEN
+            M = 0
+            PAIR = .FALSE.
+            DO 10 J = 1, N
+               IF( PAIR ) THEN
+                  PAIR = .FALSE.
+                  SELECT( J ) = .FALSE.
+               ELSE
+                  IF( J.LT.N ) THEN
+                     IF( T( J+1, J ).EQ.ZERO ) THEN
+                        IF( SELECT( J ) )
+     $                     M = M + 1
+                     ELSE
+                        PAIR = .TRUE.
+                        IF( SELECT( J ) .OR. SELECT( J+1 ) ) THEN
+                           SELECT( J ) = .TRUE.
+                           M = M + 2
+                        END IF
+                     END IF
+                  ELSE
+                     IF( SELECT( N ) )
+     $                  M = M + 1
+                  END IF
+               END IF
+   10       CONTINUE
+         ELSE
+            M = N
+         END IF
+*
+         IF( MM.LT.M ) THEN
+            INFO = -11
+         END IF
+      END IF
+      IF( INFO.NE.0 ) THEN
+         CALL XERBLA( 'DTREVC3', -INFO )
+         RETURN
+      ELSE IF( LQUERY ) THEN
+         RETURN
+      END IF
+*
+*     Quick return if possible.
+*
+      IF( N.EQ.0 )
+     $   RETURN
+*
+*     Use blocked version of back-transformation if sufficient workspace.
+*     Zero-out the workspace to avoid potential NaN propagation.
+*
+      IF( OVER .AND. LWORK .GE. N + 2*N*NBMIN ) THEN
+         NB = (LWORK - N) / (2*N)
+         NB = MIN( NB, NBMAX )
+         CALL DLASET( 'F', N, 1+2*NB, ZERO, ZERO, WORK, N )
+      ELSE
+         NB = 1
+      END IF
+*
+*     Set the constants to control overflow.
+*
+      UNFL = DLAMCH( 'Safe minimum' )
+      OVFL = ONE / UNFL
+      CALL DLABAD( UNFL, OVFL )
+      ULP = DLAMCH( 'Precision' )
+      SMLNUM = UNFL*( N / ULP )
+      BIGNUM = ( ONE-ULP ) / SMLNUM
+*
+*     Compute 1-norm of each column of strictly upper triangular
+*     part of T to control overflow in triangular solver.
+*
+      WORK( 1 ) = ZERO
+      DO 30 J = 2, N
+         WORK( J ) = ZERO
+         DO 20 I = 1, J - 1
+            WORK( J ) = WORK( J ) + ABS( T( I, J ) )
+   20    CONTINUE
+   30 CONTINUE
+*
+*     Index IP is used to specify the real or complex eigenvalue:
+*       IP = 0, real eigenvalue,
+*            1, first  of conjugate complex pair: (wr,wi)
 *           -1, second of conjugate complex pair: (wr,wi)
-*
-      N2 = 2*N
+*       ISCOMPLEX array stores IP for each column in current block.
 *
       IF( RIGHTV ) THEN
 *
+*        ============================================================
 *        Compute right eigenvectors.
 *
+*        IV is index of column in current block.
+*        For complex right vector, uses IV-1 for real part and IV for complex part.
+*        Non-blocked version always uses IV=2;
+*        blocked     version starts with IV=NB, goes down to 1 or 2.
+*        (Note the "0-th" column is used for 1-norms computed above.)
+         IV = 2
+         IF( NB.GT.2 ) THEN
+            IV = NB
+         END IF
+
          IP = 0
          IS = M
          DO 140 KI = N, 1, -1
-*
-            IF( IP.EQ.1 )
-     $         GO TO 130
-            IF( KI.EQ.1 )
-     $         GO TO 40
-            IF( T( KI, KI-1 ).EQ.ZERO )
-     $         GO TO 40
-            IP = -1
-*
-   40       CONTINUE
+            IF( IP.EQ.-1 ) THEN
+*              previous iteration (ki+1) was second of conjugate pair,
+*              so this ki is first of conjugate pair; skip to end of loop
+               IP = 1
+               GO TO 140
+            ELSE IF( KI.EQ.1 ) THEN
+*              last column, so this ki must be real eigenvalue
+               IP = 0
+            ELSE IF( T( KI, KI-1 ).EQ.ZERO ) THEN
+*              zero on sub-diagonal, so this ki is real eigenvalue
+               IP = 0
+            ELSE
+*              non-zero on sub-diagonal, so this ki is second of conjugate pair
+               IP = -1
+            END IF
+
             IF( SOMEV ) THEN
                IF( IP.EQ.0 ) THEN
                   IF( .NOT.SELECT( KI ) )
-     $               GO TO 130
+     $               GO TO 140
                ELSE
                   IF( .NOT.SELECT( KI-1 ) )
-     $               GO TO 130
+     $               GO TO 140
                END IF
             END IF
 *
@@ -155728,18 +157655,19 @@
 *
             IF( IP.EQ.0 ) THEN
 *
+*              --------------------------------------------------------
 *              Real right eigenvector
 *
-               WORK( KI+N ) = ONE
+               WORK( KI + IV*N ) = ONE
 *
-*              Form right-hand side
+*              Form right-hand side.
 *
                DO 50 K = 1, KI - 1
-                  WORK( K+N ) = -T( K, KI )
+                  WORK( K + IV*N ) = -T( K, KI )
    50          CONTINUE
 *
-*              Solve the upper quasi-triangular system:
-*                 (T(1:KI-1,1:KI-1) - WR)*X = SCALE*WORK.
+*              Solve upper quasi-triangular system:
+*              [ T(1:KI-1,1:KI-1) - WR ]*X = SCALE*WORK.
 *
                JNXT = KI - 1
                DO 60 J = KI - 1, 1, -1
@@ -155750,7 +157678,7 @@
                   JNXT = J - 1
                   IF( J.GT.1 ) THEN
                      IF( T( J, J-1 ).NE.ZERO ) THEN
-                        J1 = J - 1
+                        J1   = J - 1
                         JNXT = J - 2
                      END IF
                   END IF
@@ -155760,7 +157688,7 @@
 *                    1-by-1 diagonal block
 *
                      CALL DLALN2( .FALSE., 1, 1, SMIN, ONE, T( J, J ),
-     $                            LDT, ONE, ONE, WORK( J+N ), N, WR,
+     $                            LDT, ONE, ONE, WORK( J+IV*N ), N, WR,
      $                            ZERO, X, 2, SCALE, XNORM, IERR )
 *
 *                    Scale X(1,1) to avoid overflow when updating
@@ -155776,13 +157704,13 @@
 *                    Scale if necessary
 *
                      IF( SCALE.NE.ONE )
-     $                  CALL DSCAL( KI, SCALE, WORK( 1+N ), 1 )
-                     WORK( J+N ) = X( 1, 1 )
+     $                  CALL DSCAL( KI, SCALE, WORK( 1+IV*N ), 1 )
+                     WORK( J+IV*N ) = X( 1, 1 )
 *
 *                    Update right-hand side
 *
                      CALL DAXPY( J-1, -X( 1, 1 ), T( 1, J ), 1,
-     $                           WORK( 1+N ), 1 )
+     $                           WORK( 1+IV*N ), 1 )
 *
                   ELSE
 *
@@ -155790,7 +157718,7 @@
 *
                      CALL DLALN2( .FALSE., 2, 1, SMIN, ONE,
      $                            T( J-1, J-1 ), LDT, ONE, ONE,
-     $                            WORK( J-1+N ), N, WR, ZERO, X, 2,
+     $                            WORK( J-1+IV*N ), N, WR, ZERO, X, 2,
      $                            SCALE, XNORM, IERR )
 *
 *                    Scale X(1,1) and X(2,1) to avoid overflow when
@@ -155808,23 +157736,25 @@
 *                    Scale if necessary
 *
                      IF( SCALE.NE.ONE )
-     $                  CALL DSCAL( KI, SCALE, WORK( 1+N ), 1 )
-                     WORK( J-1+N ) = X( 1, 1 )
-                     WORK( J+N ) = X( 2, 1 )
+     $                  CALL DSCAL( KI, SCALE, WORK( 1+IV*N ), 1 )
+                     WORK( J-1+IV*N ) = X( 1, 1 )
+                     WORK( J  +IV*N ) = X( 2, 1 )
 *
 *                    Update right-hand side
 *
                      CALL DAXPY( J-2, -X( 1, 1 ), T( 1, J-1 ), 1,
-     $                           WORK( 1+N ), 1 )
+     $                           WORK( 1+IV*N ), 1 )
                      CALL DAXPY( J-2, -X( 2, 1 ), T( 1, J ), 1,
-     $                           WORK( 1+N ), 1 )
+     $                           WORK( 1+IV*N ), 1 )
                   END IF
    60          CONTINUE
 *
 *              Copy the vector x or Q*x to VR and normalize.
 *
                IF( .NOT.OVER ) THEN
-                  CALL DCOPY( KI, WORK( 1+N ), 1, VR( 1, IS ), 1 )
+*                 ------------------------------
+*                 no back-transform: copy x to VR and normalize.
+                  CALL DCOPY( KI, WORK( 1 + IV*N ), 1, VR( 1, IS ), 1 )
 *
                   II = IDAMAX( KI, VR( 1, IS ), 1 )
                   REMAX = ONE / ABS( VR( II, IS ) )
@@ -155833,44 +157763,57 @@
                   DO 70 K = KI + 1, N
                      VR( K, IS ) = ZERO
    70             CONTINUE
-               ELSE
+*
+               ELSE IF( NB.EQ.1 ) THEN
+*                 ------------------------------
+*                 version 1: back-transform each vector with GEMV, Q*x.
                   IF( KI.GT.1 )
      $               CALL DGEMV( 'N', N, KI-1, ONE, VR, LDVR,
-     $                           WORK( 1+N ), 1, WORK( KI+N ),
+     $                           WORK( 1 + IV*N ), 1, WORK( KI + IV*N ),
      $                           VR( 1, KI ), 1 )
 *
                   II = IDAMAX( N, VR( 1, KI ), 1 )
                   REMAX = ONE / ABS( VR( II, KI ) )
                   CALL DSCAL( N, REMAX, VR( 1, KI ), 1 )
-               END IF
 *
+               ELSE
+*                 ------------------------------
+*                 version 2: back-transform block of vectors with GEMM
+*                 zero out below vector
+                  DO K = KI + 1, N
+                     WORK( K + IV*N ) = ZERO
+                  END DO
+                  ISCOMPLEX( IV ) = IP
+*                 back-transform and normalization is done below
+               END IF
             ELSE
 *
+*              --------------------------------------------------------
 *              Complex right eigenvector.
 *
 *              Initial solve
-*                [ (T(KI-1,KI-1) T(KI-1,KI) ) - (WR + I* WI)]*X = 0.
-*                [ (T(KI,KI-1)   T(KI,KI)   )               ]
+*              [ ( T(KI-1,KI-1) T(KI-1,KI) ) - (WR + I*WI) ]*X = 0.
+*              [ ( T(KI,  KI-1) T(KI,  KI) )               ]
 *
                IF( ABS( T( KI-1, KI ) ).GE.ABS( T( KI, KI-1 ) ) ) THEN
-                  WORK( KI-1+N ) = ONE
-                  WORK( KI+N2 ) = WI / T( KI-1, KI )
+                  WORK( KI-1 + (IV-1)*N ) = ONE
+                  WORK( KI   + (IV  )*N ) = WI / T( KI-1, KI )
                ELSE
-                  WORK( KI-1+N ) = -WI / T( KI, KI-1 )
-                  WORK( KI+N2 ) = ONE
+                  WORK( KI-1 + (IV-1)*N ) = -WI / T( KI, KI-1 )
+                  WORK( KI   + (IV  )*N ) = ONE
                END IF
-               WORK( KI+N ) = ZERO
-               WORK( KI-1+N2 ) = ZERO
+               WORK( KI   + (IV-1)*N ) = ZERO
+               WORK( KI-1 + (IV  )*N ) = ZERO
 *
-*              Form right-hand side
+*              Form right-hand side.
 *
                DO 80 K = 1, KI - 2
-                  WORK( K+N ) = -WORK( KI-1+N )*T( K, KI-1 )
-                  WORK( K+N2 ) = -WORK( KI+N2 )*T( K, KI )
+                  WORK( K+(IV-1)*N ) = -WORK( KI-1+(IV-1)*N )*T(K,KI-1)
+                  WORK( K+(IV  )*N ) = -WORK( KI  +(IV  )*N )*T(K,KI  )
    80          CONTINUE
 *
 *              Solve upper quasi-triangular system:
-*              (T(1:KI-2,1:KI-2) - (WR+i*WI))*X = SCALE*(WORK+i*WORK2)
+*              [ T(1:KI-2,1:KI-2) - (WR+i*WI) ]*X = SCALE*(WORK+i*WORK2)
 *
                JNXT = KI - 2
                DO 90 J = KI - 2, 1, -1
@@ -155881,7 +157824,7 @@
                   JNXT = J - 1
                   IF( J.GT.1 ) THEN
                      IF( T( J, J-1 ).NE.ZERO ) THEN
-                        J1 = J - 1
+                        J1   = J - 1
                         JNXT = J - 2
                      END IF
                   END IF
@@ -155891,8 +157834,8 @@
 *                    1-by-1 diagonal block
 *
                      CALL DLALN2( .FALSE., 1, 2, SMIN, ONE, T( J, J ),
-     $                            LDT, ONE, ONE, WORK( J+N ), N, WR, WI,
-     $                            X, 2, SCALE, XNORM, IERR )
+     $                            LDT, ONE, ONE, WORK( J+(IV-1)*N ), N,
+     $                            WR, WI, X, 2, SCALE, XNORM, IERR )
 *
 *                    Scale X(1,1) and X(1,2) to avoid overflow when
 *                    updating the right-hand side.
@@ -155908,18 +157851,18 @@
 *                    Scale if necessary
 *
                      IF( SCALE.NE.ONE ) THEN
-                        CALL DSCAL( KI, SCALE, WORK( 1+N ), 1 )
-                        CALL DSCAL( KI, SCALE, WORK( 1+N2 ), 1 )
+                        CALL DSCAL( KI, SCALE, WORK( 1+(IV-1)*N ), 1 )
+                        CALL DSCAL( KI, SCALE, WORK( 1+(IV  )*N ), 1 )
                      END IF
-                     WORK( J+N ) = X( 1, 1 )
-                     WORK( J+N2 ) = X( 1, 2 )
+                     WORK( J+(IV-1)*N ) = X( 1, 1 )
+                     WORK( J+(IV  )*N ) = X( 1, 2 )
 *
 *                    Update the right-hand side
 *
                      CALL DAXPY( J-1, -X( 1, 1 ), T( 1, J ), 1,
-     $                           WORK( 1+N ), 1 )
+     $                           WORK( 1+(IV-1)*N ), 1 )
                      CALL DAXPY( J-1, -X( 1, 2 ), T( 1, J ), 1,
-     $                           WORK( 1+N2 ), 1 )
+     $                           WORK( 1+(IV  )*N ), 1 )
 *
                   ELSE
 *
@@ -155927,8 +157870,8 @@
 *
                      CALL DLALN2( .FALSE., 2, 2, SMIN, ONE,
      $                            T( J-1, J-1 ), LDT, ONE, ONE,
-     $                            WORK( J-1+N ), N, WR, WI, X, 2, SCALE,
-     $                            XNORM, IERR )
+     $                            WORK( J-1+(IV-1)*N ), N, WR, WI, X, 2,
+     $                            SCALE, XNORM, IERR )
 *
 *                    Scale X to avoid overflow when updating
 *                    the right-hand side.
@@ -155948,104 +157891,176 @@
 *                    Scale if necessary
 *
                      IF( SCALE.NE.ONE ) THEN
-                        CALL DSCAL( KI, SCALE, WORK( 1+N ), 1 )
-                        CALL DSCAL( KI, SCALE, WORK( 1+N2 ), 1 )
+                        CALL DSCAL( KI, SCALE, WORK( 1+(IV-1)*N ), 1 )
+                        CALL DSCAL( KI, SCALE, WORK( 1+(IV  )*N ), 1 )
                      END IF
-                     WORK( J-1+N ) = X( 1, 1 )
-                     WORK( J+N ) = X( 2, 1 )
-                     WORK( J-1+N2 ) = X( 1, 2 )
-                     WORK( J+N2 ) = X( 2, 2 )
+                     WORK( J-1+(IV-1)*N ) = X( 1, 1 )
+                     WORK( J  +(IV-1)*N ) = X( 2, 1 )
+                     WORK( J-1+(IV  )*N ) = X( 1, 2 )
+                     WORK( J  +(IV  )*N ) = X( 2, 2 )
 *
 *                    Update the right-hand side
 *
                      CALL DAXPY( J-2, -X( 1, 1 ), T( 1, J-1 ), 1,
-     $                           WORK( 1+N ), 1 )
+     $                           WORK( 1+(IV-1)*N   ), 1 )
                      CALL DAXPY( J-2, -X( 2, 1 ), T( 1, J ), 1,
-     $                           WORK( 1+N ), 1 )
+     $                           WORK( 1+(IV-1)*N   ), 1 )
                      CALL DAXPY( J-2, -X( 1, 2 ), T( 1, J-1 ), 1,
-     $                           WORK( 1+N2 ), 1 )
+     $                           WORK( 1+(IV  )*N ), 1 )
                      CALL DAXPY( J-2, -X( 2, 2 ), T( 1, J ), 1,
-     $                           WORK( 1+N2 ), 1 )
+     $                           WORK( 1+(IV  )*N ), 1 )
                   END IF
    90          CONTINUE
 *
 *              Copy the vector x or Q*x to VR and normalize.
 *
                IF( .NOT.OVER ) THEN
-                  CALL DCOPY( KI, WORK( 1+N ), 1, VR( 1, IS-1 ), 1 )
-                  CALL DCOPY( KI, WORK( 1+N2 ), 1, VR( 1, IS ), 1 )
+*                 ------------------------------
+*                 no back-transform: copy x to VR and normalize.
+                  CALL DCOPY( KI, WORK( 1+(IV-1)*N ), 1, VR(1,IS-1), 1 )
+                  CALL DCOPY( KI, WORK( 1+(IV  )*N ), 1, VR(1,IS  ), 1 )
 *
                   EMAX = ZERO
                   DO 100 K = 1, KI
                      EMAX = MAX( EMAX, ABS( VR( K, IS-1 ) )+
-     $                      ABS( VR( K, IS ) ) )
+     $                                 ABS( VR( K, IS   ) ) )
   100             CONTINUE
-*
                   REMAX = ONE / EMAX
                   CALL DSCAL( KI, REMAX, VR( 1, IS-1 ), 1 )
-                  CALL DSCAL( KI, REMAX, VR( 1, IS ), 1 )
+                  CALL DSCAL( KI, REMAX, VR( 1, IS   ), 1 )
 *
                   DO 110 K = KI + 1, N
                      VR( K, IS-1 ) = ZERO
-                     VR( K, IS ) = ZERO
+                     VR( K, IS   ) = ZERO
   110             CONTINUE
 *
-               ELSE
-*
+               ELSE IF( NB.EQ.1 ) THEN
+*                 ------------------------------
+*                 version 1: back-transform each vector with GEMV, Q*x.
                   IF( KI.GT.2 ) THEN
                      CALL DGEMV( 'N', N, KI-2, ONE, VR, LDVR,
-     $                           WORK( 1+N ), 1, WORK( KI-1+N ),
-     $                           VR( 1, KI-1 ), 1 )
+     $                           WORK( 1    + (IV-1)*N ), 1,
+     $                           WORK( KI-1 + (IV-1)*N ), VR(1,KI-1), 1)
                      CALL DGEMV( 'N', N, KI-2, ONE, VR, LDVR,
-     $                           WORK( 1+N2 ), 1, WORK( KI+N2 ),
-     $                           VR( 1, KI ), 1 )
+     $                           WORK( 1  + (IV)*N ), 1,
+     $                           WORK( KI + (IV)*N ), VR( 1, KI ), 1 )
                   ELSE
-                     CALL DSCAL( N, WORK( KI-1+N ), VR( 1, KI-1 ), 1 )
-                     CALL DSCAL( N, WORK( KI+N2 ), VR( 1, KI ), 1 )
+                     CALL DSCAL( N, WORK(KI-1+(IV-1)*N), VR(1,KI-1), 1)
+                     CALL DSCAL( N, WORK(KI  +(IV  )*N), VR(1,KI  ), 1)
                   END IF
 *
                   EMAX = ZERO
                   DO 120 K = 1, N
                      EMAX = MAX( EMAX, ABS( VR( K, KI-1 ) )+
-     $                      ABS( VR( K, KI ) ) )
+     $                                 ABS( VR( K, KI   ) ) )
   120             CONTINUE
                   REMAX = ONE / EMAX
                   CALL DSCAL( N, REMAX, VR( 1, KI-1 ), 1 )
-                  CALL DSCAL( N, REMAX, VR( 1, KI ), 1 )
+                  CALL DSCAL( N, REMAX, VR( 1, KI   ), 1 )
+*
+               ELSE
+*                 ------------------------------
+*                 version 2: back-transform block of vectors with GEMM
+*                 zero out below vector
+                  DO K = KI + 1, N
+                     WORK( K + (IV-1)*N ) = ZERO
+                     WORK( K + (IV  )*N ) = ZERO
+                  END DO
+                  ISCOMPLEX( IV-1 ) = -IP
+                  ISCOMPLEX( IV   ) =  IP
+                  IV = IV - 1
+*                 back-transform and normalization is done below
                END IF
             END IF
+
+            IF( NB.GT.1 ) THEN
+*              --------------------------------------------------------
+*              Blocked version of back-transform
+*              For complex case, KI2 includes both vectors (KI-1 and KI)
+               IF( IP.EQ.0 ) THEN
+                  KI2 = KI
+               ELSE
+                  KI2 = KI - 1
+               END IF
+
+*              Columns IV:NB of work are valid vectors.
+*              When the number of vectors stored reaches NB-1 or NB,
+*              or if this was last vector, do the GEMM
+               IF( (IV.LE.2) .OR. (KI2.EQ.1) ) THEN
+                  CALL DGEMM( 'N', 'N', N, NB-IV+1, KI2+NB-IV, ONE,
+     $                        VR, LDVR,
+     $                        WORK( 1 + (IV)*N    ), N,
+     $                        ZERO,
+     $                        WORK( 1 + (NB+IV)*N ), N )
+*                 normalize vectors
+                  DO K = IV, NB
+                     IF( ISCOMPLEX(K).EQ.0 ) THEN
+*                       real eigenvector
+                        II = IDAMAX( N, WORK( 1 + (NB+K)*N ), 1 )
+                        REMAX = ONE / ABS( WORK( II + (NB+K)*N ) )
+                     ELSE IF( ISCOMPLEX(K).EQ.1 ) THEN
+*                       first eigenvector of conjugate pair
+                        EMAX = ZERO
+                        DO II = 1, N
+                           EMAX = MAX( EMAX,
+     $                                 ABS( WORK( II + (NB+K  )*N ) )+
+     $                                 ABS( WORK( II + (NB+K+1)*N ) ) )
+                        END DO
+                        REMAX = ONE / EMAX
+*                    else if ISCOMPLEX(K).EQ.-1
+*                       second eigenvector of conjugate pair
+*                       reuse same REMAX as previous K
+                     END IF
+                     CALL DSCAL( N, REMAX, WORK( 1 + (NB+K)*N ), 1 )
+                  END DO
+                  CALL DLACPY( 'F', N, NB-IV+1,
+     $                         WORK( 1 + (NB+IV)*N ), N,
+     $                         VR( 1, KI2 ), LDVR )
+                  IV = NB
+               ELSE
+                  IV = IV - 1
+               END IF
+            END IF ! blocked back-transform
 *
             IS = IS - 1
             IF( IP.NE.0 )
      $         IS = IS - 1
-  130       CONTINUE
-            IF( IP.EQ.1 )
-     $         IP = 0
-            IF( IP.EQ.-1 )
-     $         IP = 1
   140    CONTINUE
       END IF
-*
+
       IF( LEFTV ) THEN
 *
+*        ============================================================
 *        Compute left eigenvectors.
 *
+*        IV is index of column in current block.
+*        For complex left vector, uses IV for real part and IV+1 for complex part.
+*        Non-blocked version always uses IV=1;
+*        blocked     version starts with IV=1, goes up to NB-1 or NB.
+*        (Note the "0-th" column is used for 1-norms computed above.)
+         IV = 1
          IP = 0
          IS = 1
          DO 260 KI = 1, N
+            IF( IP.EQ.1 ) THEN
+*              previous iteration (ki-1) was first of conjugate pair,
+*              so this ki is second of conjugate pair; skip to end of loop
+               IP = -1
+               GO TO 260
+            ELSE IF( KI.EQ.N ) THEN
+*              last column, so this ki must be real eigenvalue
+               IP = 0
+            ELSE IF( T( KI+1, KI ).EQ.ZERO ) THEN
+*              zero on sub-diagonal, so this ki is real eigenvalue
+               IP = 0
+            ELSE
+*              non-zero on sub-diagonal, so this ki is first of conjugate pair
+               IP = 1
+            END IF
 *
-            IF( IP.EQ.-1 )
-     $         GO TO 250
-            IF( KI.EQ.N )
-     $         GO TO 150
-            IF( T( KI+1, KI ).EQ.ZERO )
-     $         GO TO 150
-            IP = 1
-*
-  150       CONTINUE
             IF( SOMEV ) THEN
                IF( .NOT.SELECT( KI ) )
-     $            GO TO 250
+     $            GO TO 260
             END IF
 *
 *           Compute the KI-th eigenvalue (WR,WI).
@@ -156059,18 +158074,19 @@
 *
             IF( IP.EQ.0 ) THEN
 *
-*              Real left eigenvector.
+*              --------------------------------------------------------
+*              Real left eigenvector
 *
-               WORK( KI+N ) = ONE
+               WORK( KI + IV*N ) = ONE
 *
-*              Form right-hand side
+*              Form right-hand side.
 *
                DO 160 K = KI + 1, N
-                  WORK( K+N ) = -T( KI, K )
+                  WORK( K + IV*N ) = -T( KI, K )
   160          CONTINUE
 *
-*              Solve the quasi-triangular system:
-*                 (T(KI+1:N,KI+1:N) - WR)**T*X = SCALE*WORK
+*              Solve transposed quasi-triangular system:
+*              [ T(KI+1:N,KI+1:N) - WR ]**T * X = SCALE*WORK
 *
                VMAX = ONE
                VCRIT = BIGNUM
@@ -156098,27 +158114,27 @@
 *
                      IF( WORK( J ).GT.VCRIT ) THEN
                         REC = ONE / VMAX
-                        CALL DSCAL( N-KI+1, REC, WORK( KI+N ), 1 )
+                        CALL DSCAL( N-KI+1, REC, WORK( KI+IV*N ), 1 )
                         VMAX = ONE
                         VCRIT = BIGNUM
                      END IF
 *
-                     WORK( J+N ) = WORK( J+N ) -
-     $                             DDOT( J-KI-1, T( KI+1, J ), 1,
-     $                             WORK( KI+1+N ), 1 )
+                     WORK( J+IV*N ) = WORK( J+IV*N ) -
+     $                                DDOT( J-KI-1, T( KI+1, J ), 1,
+     $                                      WORK( KI+1+IV*N ), 1 )
 *
-*                    Solve (T(J,J)-WR)**T*X = WORK
+*                    Solve [ T(J,J) - WR ]**T * X = WORK
 *
                      CALL DLALN2( .FALSE., 1, 1, SMIN, ONE, T( J, J ),
-     $                            LDT, ONE, ONE, WORK( J+N ), N, WR,
+     $                            LDT, ONE, ONE, WORK( J+IV*N ), N, WR,
      $                            ZERO, X, 2, SCALE, XNORM, IERR )
 *
 *                    Scale if necessary
 *
                      IF( SCALE.NE.ONE )
-     $                  CALL DSCAL( N-KI+1, SCALE, WORK( KI+N ), 1 )
-                     WORK( J+N ) = X( 1, 1 )
-                     VMAX = MAX( ABS( WORK( J+N ) ), VMAX )
+     $                  CALL DSCAL( N-KI+1, SCALE, WORK( KI+IV*N ), 1 )
+                     WORK( J+IV*N ) = X( 1, 1 )
+                     VMAX = MAX( ABS( WORK( J+IV*N ) ), VMAX )
                      VCRIT = BIGNUM / VMAX
 *
                   ELSE
@@ -156131,36 +158147,36 @@
                      BETA = MAX( WORK( J ), WORK( J+1 ) )
                      IF( BETA.GT.VCRIT ) THEN
                         REC = ONE / VMAX
-                        CALL DSCAL( N-KI+1, REC, WORK( KI+N ), 1 )
+                        CALL DSCAL( N-KI+1, REC, WORK( KI+IV*N ), 1 )
                         VMAX = ONE
                         VCRIT = BIGNUM
                      END IF
 *
-                     WORK( J+N ) = WORK( J+N ) -
-     $                             DDOT( J-KI-1, T( KI+1, J ), 1,
-     $                             WORK( KI+1+N ), 1 )
+                     WORK( J+IV*N ) = WORK( J+IV*N ) -
+     $                                DDOT( J-KI-1, T( KI+1, J ), 1,
+     $                                      WORK( KI+1+IV*N ), 1 )
 *
-                     WORK( J+1+N ) = WORK( J+1+N ) -
-     $                               DDOT( J-KI-1, T( KI+1, J+1 ), 1,
-     $                               WORK( KI+1+N ), 1 )
+                     WORK( J+1+IV*N ) = WORK( J+1+IV*N ) -
+     $                                  DDOT( J-KI-1, T( KI+1, J+1 ), 1,
+     $                                        WORK( KI+1+IV*N ), 1 )
 *
 *                    Solve
-*                      [T(J,J)-WR   T(J,J+1)     ]**T * X = SCALE*( WORK1 )
-*                      [T(J+1,J)    T(J+1,J+1)-WR]                ( WORK2 )
+*                    [ T(J,J)-WR   T(J,J+1)      ]**T * X = SCALE*( WORK1 )
+*                    [ T(J+1,J)    T(J+1,J+1)-WR ]                ( WORK2 )
 *
                      CALL DLALN2( .TRUE., 2, 1, SMIN, ONE, T( J, J ),
-     $                            LDT, ONE, ONE, WORK( J+N ), N, WR,
+     $                            LDT, ONE, ONE, WORK( J+IV*N ), N, WR,
      $                            ZERO, X, 2, SCALE, XNORM, IERR )
 *
 *                    Scale if necessary
 *
                      IF( SCALE.NE.ONE )
-     $                  CALL DSCAL( N-KI+1, SCALE, WORK( KI+N ), 1 )
-                     WORK( J+N ) = X( 1, 1 )
-                     WORK( J+1+N ) = X( 2, 1 )
+     $                  CALL DSCAL( N-KI+1, SCALE, WORK( KI+IV*N ), 1 )
+                     WORK( J  +IV*N ) = X( 1, 1 )
+                     WORK( J+1+IV*N ) = X( 2, 1 )
 *
-                     VMAX = MAX( ABS( WORK( J+N ) ),
-     $                      ABS( WORK( J+1+N ) ), VMAX )
+                     VMAX = MAX( ABS( WORK( J  +IV*N ) ),
+     $                           ABS( WORK( J+1+IV*N ) ), VMAX )
                      VCRIT = BIGNUM / VMAX
 *
                   END IF
@@ -156169,7 +158185,10 @@
 *              Copy the vector x or Q*x to VL and normalize.
 *
                IF( .NOT.OVER ) THEN
-                  CALL DCOPY( N-KI+1, WORK( KI+N ), 1, VL( KI, IS ), 1 )
+*                 ------------------------------
+*                 no back-transform: copy x to VL and normalize.
+                  CALL DCOPY( N-KI+1, WORK( KI + IV*N ), 1,
+     $                                VL( KI, IS ), 1 )
 *
                   II = IDAMAX( N-KI+1, VL( KI, IS ), 1 ) + KI - 1
                   REMAX = ONE / ABS( VL( II, IS ) )
@@ -156179,46 +158198,58 @@
                      VL( K, IS ) = ZERO
   180             CONTINUE
 *
-               ELSE
-*
+               ELSE IF( NB.EQ.1 ) THEN
+*                 ------------------------------
+*                 version 1: back-transform each vector with GEMV, Q*x.
                   IF( KI.LT.N )
-     $               CALL DGEMV( 'N', N, N-KI, ONE, VL( 1, KI+1 ), LDVL,
-     $                           WORK( KI+1+N ), 1, WORK( KI+N ),
-     $                           VL( 1, KI ), 1 )
+     $               CALL DGEMV( 'N', N, N-KI, ONE,
+     $                           VL( 1, KI+1 ), LDVL,
+     $                           WORK( KI+1 + IV*N ), 1,
+     $                           WORK( KI   + IV*N ), VL( 1, KI ), 1 )
 *
                   II = IDAMAX( N, VL( 1, KI ), 1 )
                   REMAX = ONE / ABS( VL( II, KI ) )
                   CALL DSCAL( N, REMAX, VL( 1, KI ), 1 )
 *
+               ELSE
+*                 ------------------------------
+*                 version 2: back-transform block of vectors with GEMM
+*                 zero out above vector
+*                 could go from KI-NV+1 to KI-1
+                  DO K = 1, KI - 1
+                     WORK( K + IV*N ) = ZERO
+                  END DO
+                  ISCOMPLEX( IV ) = IP
+*                 back-transform and normalization is done below
                END IF
-*
             ELSE
 *
+*              --------------------------------------------------------
 *              Complex left eigenvector.
 *
-*               Initial solve:
-*                 ((T(KI,KI)    T(KI,KI+1) )**T - (WR - I* WI))*X = 0.
-*                 ((T(KI+1,KI) T(KI+1,KI+1))                )
+*              Initial solve:
+*              [ ( T(KI,KI)    T(KI,KI+1)  )**T - (WR - I* WI) ]*X = 0.
+*              [ ( T(KI+1,KI) T(KI+1,KI+1) )                   ]
 *
                IF( ABS( T( KI, KI+1 ) ).GE.ABS( T( KI+1, KI ) ) ) THEN
-                  WORK( KI+N ) = WI / T( KI, KI+1 )
-                  WORK( KI+1+N2 ) = ONE
+                  WORK( KI   + (IV  )*N ) = WI / T( KI, KI+1 )
+                  WORK( KI+1 + (IV+1)*N ) = ONE
                ELSE
-                  WORK( KI+N ) = ONE
-                  WORK( KI+1+N2 ) = -WI / T( KI+1, KI )
+                  WORK( KI   + (IV  )*N ) = ONE
+                  WORK( KI+1 + (IV+1)*N ) = -WI / T( KI+1, KI )
                END IF
-               WORK( KI+1+N ) = ZERO
-               WORK( KI+N2 ) = ZERO
+               WORK( KI+1 + (IV  )*N ) = ZERO
+               WORK( KI   + (IV+1)*N ) = ZERO
 *
-*              Form right-hand side
+*              Form right-hand side.
 *
                DO 190 K = KI + 2, N
-                  WORK( K+N ) = -WORK( KI+N )*T( KI, K )
-                  WORK( K+N2 ) = -WORK( KI+1+N2 )*T( KI+1, K )
+                  WORK( K+(IV  )*N ) = -WORK( KI  +(IV  )*N )*T(KI,  K)
+                  WORK( K+(IV+1)*N ) = -WORK( KI+1+(IV+1)*N )*T(KI+1,K)
   190          CONTINUE
 *
-*              Solve complex quasi-triangular system:
-*              ( T(KI+2,N:KI+2,N) - (WR-i*WI) )*X = WORK1+i*WORK2
+*              Solve transposed quasi-triangular system:
+*              [ T(KI+2:N,KI+2:N)**T - (WR-i*WI) ]*X = WORK1+i*WORK2
 *
                VMAX = ONE
                VCRIT = BIGNUM
@@ -156246,35 +158277,35 @@
 *
                      IF( WORK( J ).GT.VCRIT ) THEN
                         REC = ONE / VMAX
-                        CALL DSCAL( N-KI+1, REC, WORK( KI+N ), 1 )
-                        CALL DSCAL( N-KI+1, REC, WORK( KI+N2 ), 1 )
+                        CALL DSCAL( N-KI+1, REC, WORK(KI+(IV  )*N), 1 )
+                        CALL DSCAL( N-KI+1, REC, WORK(KI+(IV+1)*N), 1 )
                         VMAX = ONE
                         VCRIT = BIGNUM
                      END IF
 *
-                     WORK( J+N ) = WORK( J+N ) -
-     $                             DDOT( J-KI-2, T( KI+2, J ), 1,
-     $                             WORK( KI+2+N ), 1 )
-                     WORK( J+N2 ) = WORK( J+N2 ) -
-     $                              DDOT( J-KI-2, T( KI+2, J ), 1,
-     $                              WORK( KI+2+N2 ), 1 )
+                     WORK( J+(IV  )*N ) = WORK( J+(IV)*N ) -
+     $                                  DDOT( J-KI-2, T( KI+2, J ), 1,
+     $                                        WORK( KI+2+(IV)*N ), 1 )
+                     WORK( J+(IV+1)*N ) = WORK( J+(IV+1)*N ) -
+     $                                  DDOT( J-KI-2, T( KI+2, J ), 1,
+     $                                        WORK( KI+2+(IV+1)*N ), 1 )
 *
-*                    Solve (T(J,J)-(WR-i*WI))*(X11+i*X12)= WK+I*WK2
+*                    Solve [ T(J,J)-(WR-i*WI) ]*(X11+i*X12)= WK+I*WK2
 *
                      CALL DLALN2( .FALSE., 1, 2, SMIN, ONE, T( J, J ),
-     $                            LDT, ONE, ONE, WORK( J+N ), N, WR,
+     $                            LDT, ONE, ONE, WORK( J+IV*N ), N, WR,
      $                            -WI, X, 2, SCALE, XNORM, IERR )
 *
 *                    Scale if necessary
 *
                      IF( SCALE.NE.ONE ) THEN
-                        CALL DSCAL( N-KI+1, SCALE, WORK( KI+N ), 1 )
-                        CALL DSCAL( N-KI+1, SCALE, WORK( KI+N2 ), 1 )
+                        CALL DSCAL( N-KI+1, SCALE, WORK(KI+(IV  )*N), 1)
+                        CALL DSCAL( N-KI+1, SCALE, WORK(KI+(IV+1)*N), 1)
                      END IF
-                     WORK( J+N ) = X( 1, 1 )
-                     WORK( J+N2 ) = X( 1, 2 )
-                     VMAX = MAX( ABS( WORK( J+N ) ),
-     $                      ABS( WORK( J+N2 ) ), VMAX )
+                     WORK( J+(IV  )*N ) = X( 1, 1 )
+                     WORK( J+(IV+1)*N ) = X( 1, 2 )
+                     VMAX = MAX( ABS( WORK( J+(IV  )*N ) ),
+     $                           ABS( WORK( J+(IV+1)*N ) ), VMAX )
                      VCRIT = BIGNUM / VMAX
 *
                   ELSE
@@ -156287,48 +158318,49 @@
                      BETA = MAX( WORK( J ), WORK( J+1 ) )
                      IF( BETA.GT.VCRIT ) THEN
                         REC = ONE / VMAX
-                        CALL DSCAL( N-KI+1, REC, WORK( KI+N ), 1 )
-                        CALL DSCAL( N-KI+1, REC, WORK( KI+N2 ), 1 )
+                        CALL DSCAL( N-KI+1, REC, WORK(KI+(IV  )*N), 1 )
+                        CALL DSCAL( N-KI+1, REC, WORK(KI+(IV+1)*N), 1 )
                         VMAX = ONE
                         VCRIT = BIGNUM
                      END IF
 *
-                     WORK( J+N ) = WORK( J+N ) -
-     $                             DDOT( J-KI-2, T( KI+2, J ), 1,
-     $                             WORK( KI+2+N ), 1 )
+                     WORK( J  +(IV  )*N ) = WORK( J+(IV)*N ) -
+     $                                DDOT( J-KI-2, T( KI+2, J ), 1,
+     $                                      WORK( KI+2+(IV)*N ), 1 )
 *
-                     WORK( J+N2 ) = WORK( J+N2 ) -
-     $                              DDOT( J-KI-2, T( KI+2, J ), 1,
-     $                              WORK( KI+2+N2 ), 1 )
+                     WORK( J  +(IV+1)*N ) = WORK( J+(IV+1)*N ) -
+     $                                DDOT( J-KI-2, T( KI+2, J ), 1,
+     $                                      WORK( KI+2+(IV+1)*N ), 1 )
 *
-                     WORK( J+1+N ) = WORK( J+1+N ) -
-     $                               DDOT( J-KI-2, T( KI+2, J+1 ), 1,
-     $                               WORK( KI+2+N ), 1 )
+                     WORK( J+1+(IV  )*N ) = WORK( J+1+(IV)*N ) -
+     $                                DDOT( J-KI-2, T( KI+2, J+1 ), 1,
+     $                                      WORK( KI+2+(IV)*N ), 1 )
 *
-                     WORK( J+1+N2 ) = WORK( J+1+N2 ) -
+                     WORK( J+1+(IV+1)*N ) = WORK( J+1+(IV+1)*N ) -
      $                                DDOT( J-KI-2, T( KI+2, J+1 ), 1,
-     $                                WORK( KI+2+N2 ), 1 )
+     $                                      WORK( KI+2+(IV+1)*N ), 1 )
 *
 *                    Solve 2-by-2 complex linear equation
-*                      ([T(j,j)   T(j,j+1)  ]**T-(wr-i*wi)*I)*X = SCALE*B
-*                      ([T(j+1,j) T(j+1,j+1)]               )
+*                    [ (T(j,j)   T(j,j+1)  )**T - (wr-i*wi)*I ]*X = SCALE*B
+*                    [ (T(j+1,j) T(j+1,j+1))                  ]
 *
                      CALL DLALN2( .TRUE., 2, 2, SMIN, ONE, T( J, J ),
-     $                            LDT, ONE, ONE, WORK( J+N ), N, WR,
+     $                            LDT, ONE, ONE, WORK( J+IV*N ), N, WR,
      $                            -WI, X, 2, SCALE, XNORM, IERR )
 *
 *                    Scale if necessary
 *
                      IF( SCALE.NE.ONE ) THEN
-                        CALL DSCAL( N-KI+1, SCALE, WORK( KI+N ), 1 )
-                        CALL DSCAL( N-KI+1, SCALE, WORK( KI+N2 ), 1 )
+                        CALL DSCAL( N-KI+1, SCALE, WORK(KI+(IV  )*N), 1)
+                        CALL DSCAL( N-KI+1, SCALE, WORK(KI+(IV+1)*N), 1)
                      END IF
-                     WORK( J+N ) = X( 1, 1 )
-                     WORK( J+N2 ) = X( 1, 2 )
-                     WORK( J+1+N ) = X( 2, 1 )
-                     WORK( J+1+N2 ) = X( 2, 2 )
+                     WORK( J  +(IV  )*N ) = X( 1, 1 )
+                     WORK( J  +(IV+1)*N ) = X( 1, 2 )
+                     WORK( J+1+(IV  )*N ) = X( 2, 1 )
+                     WORK( J+1+(IV+1)*N ) = X( 2, 2 )
                      VMAX = MAX( ABS( X( 1, 1 ) ), ABS( X( 1, 2 ) ),
-     $                      ABS( X( 2, 1 ) ), ABS( X( 2, 2 ) ), VMAX )
+     $                           ABS( X( 2, 1 ) ), ABS( X( 2, 2 ) ),
+     $                           VMAX )
                      VCRIT = BIGNUM / VMAX
 *
                   END IF
@@ -156337,90 +158369,154 @@
 *              Copy the vector x or Q*x to VL and normalize.
 *
                IF( .NOT.OVER ) THEN
-                  CALL DCOPY( N-KI+1, WORK( KI+N ), 1, VL( KI, IS ), 1 )
-                  CALL DCOPY( N-KI+1, WORK( KI+N2 ), 1, VL( KI, IS+1 ),
-     $                        1 )
+*                 ------------------------------
+*                 no back-transform: copy x to VL and normalize.
+                  CALL DCOPY( N-KI+1, WORK( KI + (IV  )*N ), 1,
+     $                        VL( KI, IS   ), 1 )
+                  CALL DCOPY( N-KI+1, WORK( KI + (IV+1)*N ), 1,
+     $                        VL( KI, IS+1 ), 1 )
 *
                   EMAX = ZERO
                   DO 220 K = KI, N
-                     EMAX = MAX( EMAX, ABS( VL( K, IS ) )+
-     $                      ABS( VL( K, IS+1 ) ) )
+                     EMAX = MAX( EMAX, ABS( VL( K, IS   ) )+
+     $                                 ABS( VL( K, IS+1 ) ) )
   220             CONTINUE
                   REMAX = ONE / EMAX
-                  CALL DSCAL( N-KI+1, REMAX, VL( KI, IS ), 1 )
+                  CALL DSCAL( N-KI+1, REMAX, VL( KI, IS   ), 1 )
                   CALL DSCAL( N-KI+1, REMAX, VL( KI, IS+1 ), 1 )
 *
                   DO 230 K = 1, KI - 1
-                     VL( K, IS ) = ZERO
+                     VL( K, IS   ) = ZERO
                      VL( K, IS+1 ) = ZERO
   230             CONTINUE
-               ELSE
+*
+               ELSE IF( NB.EQ.1 ) THEN
+*                 ------------------------------
+*                 version 1: back-transform each vector with GEMV, Q*x.
                   IF( KI.LT.N-1 ) THEN
-                     CALL DGEMV( 'N', N, N-KI-1, ONE, VL( 1, KI+2 ),
-     $                           LDVL, WORK( KI+2+N ), 1, WORK( KI+N ),
+                     CALL DGEMV( 'N', N, N-KI-1, ONE,
+     $                           VL( 1, KI+2 ), LDVL,
+     $                           WORK( KI+2 + (IV)*N ), 1,
+     $                           WORK( KI   + (IV)*N ),
      $                           VL( 1, KI ), 1 )
-                     CALL DGEMV( 'N', N, N-KI-1, ONE, VL( 1, KI+2 ),
-     $                           LDVL, WORK( KI+2+N2 ), 1,
-     $                           WORK( KI+1+N2 ), VL( 1, KI+1 ), 1 )
+                     CALL DGEMV( 'N', N, N-KI-1, ONE,
+     $                           VL( 1, KI+2 ), LDVL,
+     $                           WORK( KI+2 + (IV+1)*N ), 1,
+     $                           WORK( KI+1 + (IV+1)*N ),
+     $                           VL( 1, KI+1 ), 1 )
                   ELSE
-                     CALL DSCAL( N, WORK( KI+N ), VL( 1, KI ), 1 )
-                     CALL DSCAL( N, WORK( KI+1+N2 ), VL( 1, KI+1 ), 1 )
+                     CALL DSCAL( N, WORK(KI+  (IV  )*N), VL(1, KI  ), 1)
+                     CALL DSCAL( N, WORK(KI+1+(IV+1)*N), VL(1, KI+1), 1)
                   END IF
 *
                   EMAX = ZERO
                   DO 240 K = 1, N
-                     EMAX = MAX( EMAX, ABS( VL( K, KI ) )+
-     $                      ABS( VL( K, KI+1 ) ) )
+                     EMAX = MAX( EMAX, ABS( VL( K, KI   ) )+
+     $                                 ABS( VL( K, KI+1 ) ) )
   240             CONTINUE
                   REMAX = ONE / EMAX
-                  CALL DSCAL( N, REMAX, VL( 1, KI ), 1 )
+                  CALL DSCAL( N, REMAX, VL( 1, KI   ), 1 )
                   CALL DSCAL( N, REMAX, VL( 1, KI+1 ), 1 )
 *
+               ELSE
+*                 ------------------------------
+*                 version 2: back-transform block of vectors with GEMM
+*                 zero out above vector
+*                 could go from KI-NV+1 to KI-1
+                  DO K = 1, KI - 1
+                     WORK( K + (IV  )*N ) = ZERO
+                     WORK( K + (IV+1)*N ) = ZERO
+                  END DO
+                  ISCOMPLEX( IV   ) =  IP
+                  ISCOMPLEX( IV+1 ) = -IP
+                  IV = IV + 1
+*                 back-transform and normalization is done below
                END IF
-*
             END IF
+
+            IF( NB.GT.1 ) THEN
+*              --------------------------------------------------------
+*              Blocked version of back-transform
+*              For complex case, KI2 includes both vectors (KI and KI+1)
+               IF( IP.EQ.0 ) THEN
+                  KI2 = KI
+               ELSE
+                  KI2 = KI + 1
+               END IF
+
+*              Columns 1:IV of work are valid vectors.
+*              When the number of vectors stored reaches NB-1 or NB,
+*              or if this was last vector, do the GEMM
+               IF( (IV.GE.NB-1) .OR. (KI2.EQ.N) ) THEN
+                  CALL DGEMM( 'N', 'N', N, IV, N-KI2+IV, ONE,
+     $                        VL( 1, KI2-IV+1 ), LDVL,
+     $                        WORK( KI2-IV+1 + (1)*N ), N,
+     $                        ZERO,
+     $                        WORK( 1 + (NB+1)*N ), N )
+*                 normalize vectors
+                  DO K = 1, IV
+                     IF( ISCOMPLEX(K).EQ.0) THEN
+*                       real eigenvector
+                        II = IDAMAX( N, WORK( 1 + (NB+K)*N ), 1 )
+                        REMAX = ONE / ABS( WORK( II + (NB+K)*N ) )
+                     ELSE IF( ISCOMPLEX(K).EQ.1) THEN
+*                       first eigenvector of conjugate pair
+                        EMAX = ZERO
+                        DO II = 1, N
+                           EMAX = MAX( EMAX,
+     $                                 ABS( WORK( II + (NB+K  )*N ) )+
+     $                                 ABS( WORK( II + (NB+K+1)*N ) ) )
+                        END DO
+                        REMAX = ONE / EMAX
+*                    else if ISCOMPLEX(K).EQ.-1
+*                       second eigenvector of conjugate pair
+*                       reuse same REMAX as previous K
+                     END IF
+                     CALL DSCAL( N, REMAX, WORK( 1 + (NB+K)*N ), 1 )
+                  END DO
+                  CALL DLACPY( 'F', N, IV,
+     $                         WORK( 1 + (NB+1)*N ), N,
+     $                         VL( 1, KI2-IV+1 ), LDVL )
+                  IV = 1
+               ELSE
+                  IV = IV + 1
+               END IF
+            END IF ! blocked back-transform
 *
             IS = IS + 1
             IF( IP.NE.0 )
      $         IS = IS + 1
-  250       CONTINUE
-            IF( IP.EQ.-1 )
-     $         IP = 0
-            IF( IP.EQ.1 )
-     $         IP = -1
-*
   260    CONTINUE
-*
       END IF
 *
       RETURN
 *
-*     End of DTREVC
+*     End of DTREVC3
 *
       END
 *> \brief \b DTREXC
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DTREXC + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dtrexc.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dtrexc.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dtrexc.f"> 
+*> Download DTREXC + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dtrexc.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dtrexc.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dtrexc.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       SUBROUTINE DTREXC( COMPQ, N, T, LDT, Q, LDQ, IFST, ILST, WORK,
 *                          INFO )
-* 
+*
 *       .. Scalar Arguments ..
 *       CHARACTER          COMPQ
 *       INTEGER            IFST, ILST, INFO, LDQ, LDT, N
@@ -156428,7 +158524,7 @@
 *       .. Array Arguments ..
 *       DOUBLE PRECISION   Q( LDQ, * ), T( LDT, * ), WORK( * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -156463,6 +158559,7 @@
 *> \verbatim
 *>          N is INTEGER
 *>          The order of the matrix T. N >= 0.
+*>          If N == 0 arguments ILST and IFST may be any value.
 *> \endverbatim
 *>
 *> \param[in,out] T
@@ -156492,7 +158589,8 @@
 *> \param[in] LDQ
 *> \verbatim
 *>          LDQ is INTEGER
-*>          The leading dimension of the array Q.  LDQ >= max(1,N).
+*>          The leading dimension of the array Q.  LDQ >= 1, and if
+*>          COMPQ = 'V', LDQ >= max(1,N).
 *> \endverbatim
 *>
 *> \param[in,out] IFST
@@ -156533,12 +158631,12 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date November 2011
+*> \date December 2016
 *
 *> \ingroup doubleOTHERcomputational
 *
@@ -156546,10 +158644,10 @@
       SUBROUTINE DTREXC( COMPQ, N, T, LDT, Q, LDQ, IFST, ILST, WORK,
      $                   INFO )
 *
-*  -- LAPACK computational routine (version 3.4.0) --
+*  -- LAPACK computational routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     November 2011
+*     December 2016
 *
 *     .. Scalar Arguments ..
       CHARACTER          COMPQ
@@ -156593,9 +158691,9 @@
          INFO = -4
       ELSE IF( LDQ.LT.1 .OR. ( WANTQ .AND. LDQ.LT.MAX( 1, N ) ) ) THEN
          INFO = -6
-      ELSE IF( IFST.LT.1 .OR. IFST.GT.N ) THEN
+      ELSE IF(( IFST.LT.1 .OR. IFST.GT.N ).AND.( N.GT.0 )) THEN
          INFO = -7
-      ELSE IF( ILST.LT.1 .OR. ILST.GT.N ) THEN
+      ELSE IF(( ILST.LT.1 .OR. ILST.GT.N ).AND.( N.GT.0 )) THEN
          INFO = -8
       END IF
       IF( INFO.NE.0 ) THEN
@@ -156828,25 +158926,25 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DTRRFS + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dtrrfs.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dtrrfs.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dtrrfs.f"> 
+*> Download DTRRFS + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dtrrfs.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dtrrfs.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dtrrfs.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       SUBROUTINE DTRRFS( UPLO, TRANS, DIAG, N, NRHS, A, LDA, B, LDB, X,
 *                          LDX, FERR, BERR, WORK, IWORK, INFO )
-* 
+*
 *       .. Scalar Arguments ..
 *       CHARACTER          DIAG, TRANS, UPLO
 *       INTEGER            INFO, LDA, LDB, LDX, N, NRHS
@@ -156856,7 +158954,7 @@
 *       DOUBLE PRECISION   A( LDA, * ), B( LDB, * ), BERR( * ), FERR( * ),
 *      $                   WORK( * ), X( LDX, * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -156995,12 +159093,12 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date November 2011
+*> \date December 2016
 *
 *> \ingroup doubleOTHERcomputational
 *
@@ -157008,10 +159106,10 @@
       SUBROUTINE DTRRFS( UPLO, TRANS, DIAG, N, NRHS, A, LDA, B, LDB, X,
      $                   LDX, FERR, BERR, WORK, IWORK, INFO )
 *
-*  -- LAPACK computational routine (version 3.4.0) --
+*  -- LAPACK computational routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     November 2011
+*     December 2016
 *
 *     .. Scalar Arguments ..
       CHARACTER          DIAG, TRANS, UPLO
@@ -157300,25 +159398,25 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DTRSEN + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dtrsen.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dtrsen.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dtrsen.f"> 
+*> Download DTRSEN + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dtrsen.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dtrsen.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dtrsen.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       SUBROUTINE DTRSEN( JOB, COMPQ, SELECT, N, T, LDT, Q, LDQ, WR, WI,
 *                          M, S, SEP, WORK, LWORK, IWORK, LIWORK, INFO )
-* 
+*
 *       .. Scalar Arguments ..
 *       CHARACTER          COMPQ, JOB
 *       INTEGER            INFO, LDQ, LDT, LIWORK, LWORK, M, N
@@ -157330,7 +159428,7 @@
 *       DOUBLE PRECISION   Q( LDQ, * ), T( LDT, * ), WI( * ), WORK( * ),
 *      $                   WR( * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -157523,10 +159621,10 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
 *> \date April 2012
 *
@@ -157611,7 +159709,7 @@
       SUBROUTINE DTRSEN( JOB, COMPQ, SELECT, N, T, LDT, Q, LDQ, WR, WI,
      $                   M, S, SEP, WORK, LWORK, IWORK, LIWORK, INFO )
 *
-*  -- LAPACK computational routine (version 3.4.1) --
+*  -- LAPACK computational routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
 *     April 2012
@@ -157870,18 +159968,18 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DTRSNA + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dtrsna.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dtrsna.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dtrsna.f"> 
+*> Download DTRSNA + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dtrsna.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dtrsna.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dtrsna.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
@@ -157889,7 +159987,7 @@
 *       SUBROUTINE DTRSNA( JOB, HOWMNY, SELECT, N, T, LDT, VL, LDVL, VR,
 *                          LDVR, S, SEP, MM, M, WORK, LDWORK, IWORK,
 *                          INFO )
-* 
+*
 *       .. Scalar Arguments ..
 *       CHARACTER          HOWMNY, JOB
 *       INTEGER            INFO, LDT, LDVL, LDVR, LDWORK, M, MM, N
@@ -157900,7 +159998,7 @@
 *       DOUBLE PRECISION   S( * ), SEP( * ), T( LDT, * ), VL( LDVL, * ),
 *      $                   VR( LDVR, * ), WORK( LDWORK, * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -158076,12 +160174,12 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date November 2011
+*> \date December 2016
 *
 *> \ingroup doubleOTHERcomputational
 *
@@ -158133,10 +160231,10 @@
      $                   LDVR, S, SEP, MM, M, WORK, LDWORK, IWORK,
      $                   INFO )
 *
-*  -- LAPACK computational routine (version 3.4.0) --
+*  -- LAPACK computational routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     November 2011
+*     December 2016
 *
 *     .. Scalar Arguments ..
       CHARACTER          HOWMNY, JOB
@@ -158473,25 +160571,25 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DTRSYL + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dtrsyl.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dtrsyl.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dtrsyl.f"> 
+*> Download DTRSYL + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dtrsyl.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dtrsyl.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dtrsyl.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       SUBROUTINE DTRSYL( TRANA, TRANB, ISGN, M, N, A, LDA, B, LDB, C,
 *                          LDC, SCALE, INFO )
-* 
+*
 *       .. Scalar Arguments ..
 *       CHARACTER          TRANA, TRANB
 *       INTEGER            INFO, ISGN, LDA, LDB, LDC, M, N
@@ -158500,7 +160598,7 @@
 *       .. Array Arguments ..
 *       DOUBLE PRECISION   A( LDA, * ), B( LDB, * ), C( LDC, * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -158622,12 +160720,12 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date November 2011
+*> \date December 2016
 *
 *> \ingroup doubleSYcomputational
 *
@@ -158635,10 +160733,10 @@
       SUBROUTINE DTRSYL( TRANA, TRANB, ISGN, M, N, A, LDA, B, LDB, C,
      $                   LDC, SCALE, INFO )
 *
-*  -- LAPACK computational routine (version 3.4.0) --
+*  -- LAPACK computational routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     November 2011
+*     December 2016
 *
 *     .. Scalar Arguments ..
       CHARACTER          TRANA, TRANB
@@ -159475,24 +161573,24 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DTRTI2 + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dtrti2.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dtrti2.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dtrti2.f"> 
+*> Download DTRTI2 + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dtrti2.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dtrti2.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dtrti2.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       SUBROUTINE DTRTI2( UPLO, DIAG, N, A, LDA, INFO )
-* 
+*
 *       .. Scalar Arguments ..
 *       CHARACTER          DIAG, UPLO
 *       INTEGER            INFO, LDA, N
@@ -159500,7 +161598,7 @@
 *       .. Array Arguments ..
 *       DOUBLE PRECISION   A( LDA, * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -159571,22 +161669,22 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date September 2012
+*> \date December 2016
 *
 *> \ingroup doubleOTHERcomputational
 *
 *  =====================================================================
       SUBROUTINE DTRTI2( UPLO, DIAG, N, A, LDA, INFO )
 *
-*  -- LAPACK computational routine (version 3.4.2) --
+*  -- LAPACK computational routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     September 2012
+*     December 2016
 *
 *     .. Scalar Arguments ..
       CHARACTER          DIAG, UPLO
@@ -159687,24 +161785,24 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DTRTRI + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dtrtri.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dtrtri.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dtrtri.f"> 
+*> Download DTRTRI + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dtrtri.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dtrtri.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dtrtri.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       SUBROUTINE DTRTRI( UPLO, DIAG, N, A, LDA, INFO )
-* 
+*
 *       .. Scalar Arguments ..
 *       CHARACTER          DIAG, UPLO
 *       INTEGER            INFO, LDA, N
@@ -159712,7 +161810,7 @@
 *       .. Array Arguments ..
 *       DOUBLE PRECISION   A( LDA, * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -159782,22 +161880,22 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date November 2011
+*> \date December 2016
 *
 *> \ingroup doubleOTHERcomputational
 *
 *  =====================================================================
       SUBROUTINE DTRTRI( UPLO, DIAG, N, A, LDA, INFO )
 *
-*  -- LAPACK computational routine (version 3.4.0) --
+*  -- LAPACK computational routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     November 2011
+*     December 2016
 *
 *     .. Scalar Arguments ..
       CHARACTER          DIAG, UPLO
@@ -159929,25 +162027,25 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DTRTRS + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dtrtrs.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dtrtrs.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dtrtrs.f"> 
+*> Download DTRTRS + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dtrtrs.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dtrtrs.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dtrtrs.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       SUBROUTINE DTRTRS( UPLO, TRANS, DIAG, N, NRHS, A, LDA, B, LDB,
 *                          INFO )
-* 
+*
 *       .. Scalar Arguments ..
 *       CHARACTER          DIAG, TRANS, UPLO
 *       INTEGER            INFO, LDA, LDB, N, NRHS
@@ -159955,7 +162053,7 @@
 *       .. Array Arguments ..
 *       DOUBLE PRECISION   A( LDA, * ), B( LDB, * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -160054,12 +162152,12 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date November 2011
+*> \date December 2016
 *
 *> \ingroup doubleOTHERcomputational
 *
@@ -160067,10 +162165,10 @@
       SUBROUTINE DTRTRS( UPLO, TRANS, DIAG, N, NRHS, A, LDA, B, LDB,
      $                   INFO )
 *
-*  -- LAPACK computational routine (version 3.4.0) --
+*  -- LAPACK computational routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     November 2011
+*     December 2016
 *
 *     .. Scalar Arguments ..
       CHARACTER          DIAG, TRANS, UPLO
@@ -160155,24 +162253,24 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DTRTTF + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dtrttf.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dtrttf.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dtrttf.f"> 
+*> Download DTRTTF + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dtrttf.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dtrttf.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dtrttf.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       SUBROUTINE DTRTTF( TRANSR, UPLO, N, A, LDA, ARF, INFO )
-* 
+*
 *       .. Scalar Arguments ..
 *       CHARACTER          TRANSR, UPLO
 *       INTEGER            INFO, N, LDA
@@ -160180,7 +162278,7 @@
 *       .. Array Arguments ..
 *       DOUBLE PRECISION   A( 0: LDA-1, 0: * ), ARF( 0: * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -160248,12 +162346,12 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date September 2012
+*> \date December 2016
 *
 *> \ingroup doubleOTHERcomputational
 *
@@ -160347,10 +162445,10 @@
 *  =====================================================================
       SUBROUTINE DTRTTF( TRANSR, UPLO, N, A, LDA, ARF, INFO )
 *
-*  -- LAPACK computational routine (version 3.4.2) --
+*  -- LAPACK computational routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     September 2012
+*     December 2016
 *
 *     .. Scalar Arguments ..
       CHARACTER          TRANSR, UPLO
@@ -160647,24 +162745,24 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DTRTTP + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dtrttp.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dtrttp.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dtrttp.f"> 
+*> Download DTRTTP + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dtrttp.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dtrttp.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dtrttp.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       SUBROUTINE DTRTTP( UPLO, N, A, LDA, AP, INFO )
-* 
+*
 *       .. Scalar Arguments ..
 *       CHARACTER          UPLO
 *       INTEGER            INFO, N, LDA
@@ -160672,7 +162770,7 @@
 *       .. Array Arguments ..
 *       DOUBLE PRECISION   A( LDA, * ), AP( * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -160737,22 +162835,22 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date September 2012
+*> \date December 2016
 *
 *> \ingroup doubleOTHERcomputational
 *
 *  =====================================================================
       SUBROUTINE DTRTTP( UPLO, N, A, LDA, AP, INFO )
 *
-*  -- LAPACK computational routine (version 3.4.2) --
+*  -- LAPACK computational routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     September 2012
+*     December 2016
 *
 *     .. Scalar Arguments ..
       CHARACTER          UPLO
@@ -160823,31 +162921,31 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DTZRQF + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dtzrqf.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dtzrqf.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dtzrqf.f"> 
+*> Download DTZRQF + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dtzrqf.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dtzrqf.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dtzrqf.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       SUBROUTINE DTZRQF( M, N, A, LDA, TAU, INFO )
-* 
+*
 *       .. Scalar Arguments ..
 *       INTEGER            INFO, LDA, M, N
 *       ..
 *       .. Array Arguments ..
 *       DOUBLE PRECISION   A( LDA, * ), TAU( * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -160915,12 +163013,12 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date November 2011
+*> \date December 2016
 *
 *> \ingroup doubleOTHERcomputational
 *
@@ -160959,10 +163057,10 @@
 *  =====================================================================
       SUBROUTINE DTZRQF( M, N, A, LDA, TAU, INFO )
 *
-*  -- LAPACK computational routine (version 3.4.0) --
+*  -- LAPACK computational routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     November 2011
+*     December 2016
 *
 *     .. Scalar Arguments ..
       INTEGER            INFO, LDA, M, N
@@ -161055,31 +163153,31 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download DTZRZF + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dtzrzf.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dtzrzf.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dtzrzf.f"> 
+*> Download DTZRZF + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dtzrzf.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dtzrzf.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dtzrzf.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       SUBROUTINE DTZRZF( M, N, A, LDA, TAU, WORK, LWORK, INFO )
-* 
+*
 *       .. Scalar Arguments ..
 *       INTEGER            INFO, LDA, LWORK, M, N
 *       ..
 *       .. Array Arguments ..
 *       DOUBLE PRECISION   A( LDA, * ), TAU( * ), WORK( * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -161164,10 +163262,10 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
 *> \date April 2012
 *
@@ -161195,7 +163293,7 @@
 *>
 *>     V = ( I   A(:,M+1:N) )
 *>
-*>  I is the M-by-M identity matrix, A(:,M+1:N) 
+*>  I is the M-by-M identity matrix, A(:,M+1:N)
 *>  is the output stored in A on exit from DTZRZF,
 *>  and tau(k) is the kth element of the array TAU.
 *>
@@ -161204,7 +163302,7 @@
 *  =====================================================================
       SUBROUTINE DTZRZF( M, N, A, LDA, TAU, WORK, LWORK, INFO )
 *
-*  -- LAPACK computational routine (version 3.4.1) --
+*  -- LAPACK computational routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
 *     April 2012
@@ -161368,29 +163466,29 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download IEEECK + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/ieeeck.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/ieeeck.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/ieeeck.f"> 
+*> Download IEEECK + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/ieeeck.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/ieeeck.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/ieeeck.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       INTEGER          FUNCTION IEEECK( ISPEC, ZERO, ONE )
-* 
+*
 *       .. Scalar Arguments ..
 *       INTEGER            ISPEC
 *       REAL               ONE, ZERO
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -161436,22 +163534,22 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date November 2011
+*> \date December 2016
 *
-*> \ingroup auxOTHERauxiliary
+*> \ingroup OTHERauxiliary
 *
 *  =====================================================================
       INTEGER          FUNCTION IEEECK( ISPEC, ZERO, ONE )
 *
-*  -- LAPACK auxiliary routine (version 3.4.0) --
+*  -- LAPACK auxiliary routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     November 2011
+*     December 2016
 *
 *     .. Scalar Arguments ..
       INTEGER            ISPEC
@@ -161571,31 +163669,31 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download ILADLC + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/iladlc.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/iladlc.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/iladlc.f"> 
+*> Download ILADLC + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/iladlc.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/iladlc.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/iladlc.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       INTEGER FUNCTION ILADLC( M, N, A, LDA )
-* 
+*
 *       .. Scalar Arguments ..
 *       INTEGER            M, N, LDA
 *       ..
 *       .. Array Arguments ..
 *       DOUBLE PRECISION   A( LDA, * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -161635,22 +163733,22 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date September 2012
+*> \date December 2016
 *
-*> \ingroup auxOTHERauxiliary
+*> \ingroup OTHERauxiliary
 *
 *  =====================================================================
       INTEGER FUNCTION ILADLC( M, N, A, LDA )
 *
-*  -- LAPACK auxiliary routine (version 3.4.2) --
+*  -- LAPACK auxiliary routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     September 2012
+*     December 2016
 *
 *     .. Scalar Arguments ..
       INTEGER            M, N, LDA
@@ -161689,31 +163787,31 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download ILADLR + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/iladlr.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/iladlr.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/iladlr.f"> 
+*> Download ILADLR + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/iladlr.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/iladlr.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/iladlr.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       INTEGER FUNCTION ILADLR( M, N, A, LDA )
-* 
+*
 *       .. Scalar Arguments ..
 *       INTEGER            M, N, LDA
 *       ..
 *       .. Array Arguments ..
 *       DOUBLE PRECISION   A( LDA, * )
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -161753,22 +163851,22 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date September 2012
+*> \date December 2016
 *
-*> \ingroup auxOTHERauxiliary
+*> \ingroup OTHERauxiliary
 *
 *  =====================================================================
       INTEGER FUNCTION ILADLR( M, N, A, LDA )
 *
-*  -- LAPACK auxiliary routine (version 3.4.2) --
+*  -- LAPACK auxiliary routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     September 2012
+*     December 2016
 *
 *     .. Scalar Arguments ..
       INTEGER            M, N, LDA
@@ -161810,29 +163908,29 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download ILAENV + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/ilaenv.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/ilaenv.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/ilaenv.f"> 
+*> Download ILAENV + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/ilaenv.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/ilaenv.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/ilaenv.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       INTEGER FUNCTION ILAENV( ISPEC, NAME, OPTS, N1, N2, N3, N4 )
-* 
+*
 *       .. Scalar Arguments ..
 *       CHARACTER*( * )    NAME, OPTS
 *       INTEGER            ISPEC, N1, N2, N3, N4
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -161890,7 +163988,7 @@
 *>          =10: ieee NaN arithmetic can be trusted not to trap
 *>          =11: infinity arithmetic can be trusted not to trap
 *>          12 <= ISPEC <= 16:
-*>               xHSEQR or one of its subroutines,
+*>               xHSEQR or related subroutines,
 *>               see IPARMQ for detailed explanation
 *> \endverbatim
 *>
@@ -161935,14 +164033,14 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date November 2011
+*> \date December 2016
 *
-*> \ingroup auxOTHERauxiliary
+*> \ingroup OTHERauxiliary
 *
 *> \par Further Details:
 *  =====================
@@ -161970,10 +164068,10 @@
 *  =====================================================================
       INTEGER FUNCTION ILAENV( ISPEC, NAME, OPTS, N1, N2, N3, N4 )
 *
-*  -- LAPACK auxiliary routine (version 3.4.0) --
+*  -- LAPACK auxiliary routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     November 2011
+*     December 2016
 *
 *     .. Scalar Arguments ..
       CHARACTER*( * )    NAME, OPTS
@@ -161991,13 +164089,14 @@
       INTRINSIC          CHAR, ICHAR, INT, MIN, REAL
 *     ..
 *     .. External Functions ..
-      INTEGER            IEEECK, IPARMQ
-      EXTERNAL           IEEECK, IPARMQ
+      INTEGER            IEEECK, IPARMQ, IPARAM2STAGE
+      EXTERNAL           IEEECK, IPARMQ, IPARAM2STAGE
 *     ..
 *     .. Executable Statements ..
 *
       GO TO ( 10, 10, 10, 80, 90, 100, 110, 120,
-     $        130, 140, 150, 160, 160, 160, 160, 160 )ISPEC
+     $        130, 140, 150, 160, 160, 160, 160, 160,
+     $        170, 170, 170, 170, 170 )ISPEC
 *
 *     Invalid value for ISPEC
 *
@@ -162091,6 +164190,52 @@
             ELSE
                NB = 32
             END IF
+         ELSE IF( C3.EQ.'QR ') THEN
+            IF( N3 .EQ. 1) THEN
+               IF( SNAME ) THEN
+*     M*N
+                  IF ((N1*N2.LE.131072).OR.(N1.LE.8192)) THEN
+                     NB = N1
+                  ELSE
+                     NB = 32768/N2
+                  END IF
+               ELSE
+                  IF ((N1*N2.LE.131072).OR.(N1.LE.8192)) THEN
+                     NB = N1
+                  ELSE
+                     NB = 32768/N2
+                  END IF
+               END IF
+            ELSE
+               IF( SNAME ) THEN
+                  NB = 1
+               ELSE
+                  NB = 1
+               END IF
+            END IF
+         ELSE IF( C3.EQ.'LQ ') THEN
+            IF( N3 .EQ. 2) THEN
+               IF( SNAME ) THEN
+*     M*N
+                  IF ((N1*N2.LE.131072).OR.(N1.LE.8192)) THEN
+                     NB = N1
+                  ELSE
+                     NB = 32768/N2
+                  END IF
+               ELSE
+                  IF ((N1*N2.LE.131072).OR.(N1.LE.8192)) THEN
+                     NB = N1
+                  ELSE
+                     NB = 32768/N2
+                  END IF
+               END IF
+            ELSE
+               IF( SNAME ) THEN
+                  NB = 1
+               ELSE
+                  NB = 1
+               END IF
+            END IF
          ELSE IF( C3.EQ.'HRD' ) THEN
             IF( SNAME ) THEN
                NB = 32
@@ -162205,6 +164350,12 @@
             ELSE
                NB = 64
             END IF
+         ELSE IF ( C3.EQ.'EVC' ) THEN
+            IF( SNAME ) THEN
+               NB = 64
+            ELSE
+               NB = 64
+            END IF
          END IF
       ELSE IF( C2.EQ.'LA' ) THEN
          IF( C3.EQ.'UUM' ) THEN
@@ -162218,6 +164369,15 @@
          IF( C3.EQ.'EBZ' ) THEN
             NB = 1
          END IF
+      ELSE IF( C2.EQ.'GG' ) THEN
+         NB = 32
+         IF( C3.EQ.'HD3' ) THEN
+            IF( SNAME ) THEN
+               NB = 32
+            ELSE
+               NB = 32
+            END IF
+         END IF
       END IF
       ILAENV = NB
       RETURN
@@ -162296,6 +164456,11 @@
                NBMIN = 2
             END IF
          END IF
+      ELSE IF( C2.EQ.'GG' ) THEN
+         NBMIN = 2
+         IF( C3.EQ.'HD3' ) THEN
+            NBMIN = 2
+         END IF
       END IF
       ILAENV = NBMIN
       RETURN
@@ -162350,6 +164515,11 @@
                NX = 128
             END IF
          END IF
+      ELSE IF( C2.EQ.'GG' ) THEN
+         NX = 128
+         IF( C3.EQ.'HD3' ) THEN
+            NX = 128
+         END IF
       END IF
       ILAENV = NX
       RETURN
@@ -162422,11 +164592,18 @@
 *
   160 CONTINUE
 *
-*     12 <= ISPEC <= 16: xHSEQR or one of its subroutines. 
+*     12 <= ISPEC <= 16: xHSEQR or related subroutines.
 *
       ILAENV = IPARMQ( ISPEC, NAME, OPTS, N1, N2, N3, N4 )
       RETURN
 *
+  170 CONTINUE
+*
+*     17 <= ISPEC <= 21: 2stage eigenvalues and SVD or related subroutines.
+*
+      ILAENV = IPARAM2STAGE( ISPEC, NAME, OPTS, N1, N2, N3, N4 )
+      RETURN
+*
 *     End of ILAENV
 *
       END
@@ -162434,28 +164611,28 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download ILAPREC + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/ilaprec.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/ilaprec.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/ilaprec.f"> 
+*> Download ILAPREC + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/ilaprec.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/ilaprec.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/ilaprec.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       INTEGER FUNCTION ILAPREC( PREC )
-* 
+*
 *       .. Scalar Arguments ..
 *       CHARACTER          PREC
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -162478,22 +164655,22 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date November 2011
+*> \date December 2016
 *
 *> \ingroup auxOTHERcomputational
 *
 *  =====================================================================
       INTEGER FUNCTION ILAPREC( PREC )
 *
-*  -- LAPACK computational routine (version 3.4.0) --
+*  -- LAPACK computational routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     November 2011
+*     December 2016
 *
 *     .. Scalar Arguments ..
       CHARACTER          PREC
@@ -162532,28 +164709,28 @@
 *
 *  =========== DOCUMENTATION ===========
 *
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
 *
 *> \htmlonly
-*> Download ILATRANS + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/ilatrans.f"> 
-*> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/ilatrans.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/ilatrans.f"> 
+*> Download ILATRANS + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/ilatrans.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/ilatrans.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/ilatrans.f">
 *> [TXT]</a>
-*> \endhtmlonly 
+*> \endhtmlonly
 *
 *  Definition:
 *  ===========
 *
 *       INTEGER FUNCTION ILATRANS( TRANS )
-* 
+*
 *       .. Scalar Arguments ..
 *       CHARACTER          TRANS
 *       ..
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -162576,22 +164753,22 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date November 2011
+*> \date December 2016
 *
 *> \ingroup auxOTHERcomputational
 *
 *  =====================================================================
       INTEGER FUNCTION ILATRANS( TRANS )
 *
-*  -- LAPACK computational routine (version 3.4.0) --
+*  -- LAPACK computational routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     November 2011
+*     December 2016
 *
 *     .. Scalar Arguments ..
       CHARACTER          TRANS
@@ -162623,7 +164800,86 @@
 *     End of ILATRANS
 *
       END
-*> \brief \b IPARMQ
+*> \brief \b ILAVER returns the LAPACK version.
+**
+*  =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
+*
+*  Definition:
+*  ===========
+*
+*     SUBROUTINE ILAVER( VERS_MAJOR, VERS_MINOR, VERS_PATCH )
+*
+*     INTEGER VERS_MAJOR, VERS_MINOR, VERS_PATCH
+*
+*
+*> \par Purpose:
+*  =============
+*>
+*> \verbatim
+*>
+*>  This subroutine returns the LAPACK version.
+*> \endverbatim
+*
+*  Arguments:
+*  ==========
+*
+*>  \param[out] VERS_MAJOR
+*>  \verbatim
+*>      return the lapack major version
+*>  \endverbatim
+*>
+*>  \param[out] VERS_MINOR
+*>  \verbatim
+*>      return the lapack minor version from the major version
+*>  \endverbatim
+*>
+*>  \param[out] VERS_PATCH
+*>  \verbatim
+*>      return the lapack patch version from the minor version
+*>  \endverbatim
+*
+*  Authors:
+*  ========
+*
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
+*
+*> \date December 2016
+*
+*> \ingroup OTHERauxiliary
+*
+*  =====================================================================
+      SUBROUTINE ILAVER( VERS_MAJOR, VERS_MINOR, VERS_PATCH )
+*
+*  -- LAPACK computational routine (version 3.7.0) --
+*  -- LAPACK is a software package provided by Univ. of Tennessee,    --
+*  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+*     June 2016
+*
+*  =====================================================================
+*
+      INTEGER VERS_MAJOR, VERS_MINOR, VERS_PATCH
+*  =====================================================================
+      VERS_MAJOR = 3
+      VERS_MINOR = 7
+      VERS_PATCH = 0
+*  =====================================================================
+*
+      RETURN
+      END
+# 1 "SRC/iparam2stage.F"
+# 1 "<built-in>" 1
+# 1 "<built-in>" 3
+# 329 "<built-in>" 3
+# 1 "<command line>" 1
+# 1 "<built-in>" 2
+# 1 "SRC/iparam2stage.F" 2
+*> \brief \b IPARAM2STAGE
 *
 *  =========== DOCUMENTATION ===========
 *
@@ -162631,24 +164887,411 @@
 *            http://www.netlib.org/lapack/explore-html/ 
 *
 *> \htmlonly
-*> Download IPARMQ + dependencies 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/iparmq.f"> 
+*> Download IPARAM2STAGE + dependencies 
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/iparam2stage.F"> 
 *> [TGZ]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/iparmq.f"> 
-*> [ZIP]</a> 
-*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/iparmq.f"> 
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/iparam2stage.F"> 
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/iparam2stage.F"> 
 *> [TXT]</a>
 *> \endhtmlonly 
 *
 *  Definition:
 *  ===========
 *
+*       INTEGER FUNCTION IPARAM2STAGE( ISPEC, NAME, OPTS, 
+*                                    NI, NBI, IBI, NXI )
+*       #if defined(_OPENMP)
+*           use omp_lib
+*       #endif
+*       IMPLICIT NONE
+*
+*       .. Scalar Arguments ..
+*       CHARACTER*( * )    NAME, OPTS
+*       INTEGER            ISPEC, NI, NBI, IBI, NXI
+*
+*> \par Purpose:
+*  =============
+*>
+*> \verbatim
+*>
+*>      This program sets problem and machine dependent parameters
+*>      useful for xHETRD_2STAGE, xHETRD_H at 2HB, xHETRD_HB2ST,
+*>      xGEBRD_2STAGE, xGEBRD_GE2GB, xGEBRD_GB2BD 
+*>      and related subroutines for eigenvalue problems. 
+*>      It is called whenever ILAENV is called with 17 <= ISPEC <= 21
+*> \endverbatim
+*
+*  Arguments:
+*  ==========
+*
+*> \param[in] ISPEC
+*> \verbatim
+*>          ISPEC is integer scalar
+*>              ISPEC specifies which tunable parameter IPARAM2STAGE should
+*>              return.
+*>
+*>              ISPEC=17: the optimal blocksize nb for the reduction to
+*                         BAND
+*>
+*>              ISPEC=18: the optimal blocksize ib for the eigenvectors
+*>                        singular vectors update routine
+*>
+*>              ISPEC=19: The length of the array that store the Housholder 
+*>                        representation for the second stage 
+*>                        Band to Tridiagonal or Bidiagonal
+*>
+*>              ISPEC=20: The workspace needed for the routine in input.
+*>
+*>              ISPEC=21: For future release.
+*> \endverbatim
+*>
+*> \param[in] NAME
+*> \verbatim
+*>          NAME is character string
+*>               Name of the calling subroutine
+*> \endverbatim
+*>
+*> \param[in] OPTS
+*> \verbatim
+*>          OPTS is CHARACTER*(*)
+*>          The character options to the subroutine NAME, concatenated
+*>          into a single character string.  For example, UPLO = 'U',
+*>          TRANS = 'T', and DIAG = 'N' for a triangular routine would
+*>          be specified as OPTS = 'UTN'.
+*> \endverbatim
+*>
+*> \param[in] NI
+*> \verbatim
+*>          NI is INTEGER which is the size of the matrix
+*> \endverbatim
+*>
+*> \param[in] NBI
+*> \verbatim
+*>          NBI is INTEGER which is the used in the reduciton, 
+*           (e.g., the size of the band), needed to compute workspace
+*           and LHOUS2.
+*> \endverbatim
+*>
+*> \param[in] IBI
+*> \verbatim
+*>          IBI is INTEGER which represent the IB of the reduciton,
+*           needed to compute workspace and LHOUS2.
+*> \endverbatim
+*>
+*> \param[in] NXI
+*> \verbatim
+*>          NXI is INTEGER needed in the future release.
+*> \endverbatim
+*
+*  Authors:
+*  ========
+*
+*> \author Univ. of Tennessee 
+*> \author Univ. of California Berkeley 
+*> \author Univ. of Colorado Denver 
+*> \author NAG Ltd. 
+*
+*> \date June 2016
+*
+*> \ingroup auxOTHERauxiliary
+*
+*> \par Further Details:
+*  =====================
+*>
+*> \verbatim
+*>
+*>  Implemented by Azzam Haidar.
+*>
+*>  All detail are available on technical report, SC11, SC13 papers.
+*>
+*>  Azzam Haidar, Hatem Ltaief, and Jack Dongarra.
+*>  Parallel reduction to condensed forms for symmetric eigenvalue problems
+*>  using aggregated fine-grained and memory-aware kernels. In Proceedings
+*>  of 2011 International Conference for High Performance Computing,
+*>  Networking, Storage and Analysis (SC '11), New York, NY, USA,
+*>  Article 8 , 11 pages.
+*>  http://doi.acm.org/10.1145/2063384.2063394
+*>
+*>  A. Haidar, J. Kurzak, P. Luszczek, 2013.
+*>  An improved parallel singular value algorithm and its implementation 
+*>  for multicore hardware, In Proceedings of 2013 International Conference
+*>  for High Performance Computing, Networking, Storage and Analysis (SC '13).
+*>  Denver, Colorado, USA, 2013.
+*>  Article 90, 12 pages.
+*>  http://doi.acm.org/10.1145/2503210.2503292
+*>
+*>  A. Haidar, R. Solca, S. Tomov, T. Schulthess and J. Dongarra.
+*>  A novel hybrid CPU-GPU generalized eigensolver for electronic structure 
+*>  calculations based on fine-grained memory aware tasks.
+*>  International Journal of High Performance Computing Applications.
+*>  Volume 28 Issue 2, Pages 196-209, May 2014.
+*>  http://hpc.sagepub.com/content/28/2/196 
+*>
+*> \endverbatim
+*>
+*  =====================================================================
+      INTEGER FUNCTION IPARAM2STAGE( ISPEC, NAME, OPTS, 
+     $                              NI, NBI, IBI, NXI )
+
+
+
+      IMPLICIT NONE
+*
+*  -- LAPACK auxiliary routine (version 3.7.0) --
+*  -- LAPACK is a software package provided by Univ. of Tennessee,    --
+*  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
+*     June 2016
+*
+*     .. Scalar Arguments ..
+      CHARACTER*( * )    NAME, OPTS
+      INTEGER            ISPEC, NI, NBI, IBI, NXI
+*
+*  ================================================================
+*     ..
+*     .. Local Scalars ..
+      INTEGER            I, IC, IZ, KD, IB, LHOUS, LWORK, NTHREADS,
+     $                   FACTOPTNB, QROPTNB, LQOPTNB
+      LOGICAL            RPREC, CPREC
+      CHARACTER          PREC*1, ALGO*3, STAG*5, SUBNAM*12, VECT*3
+*     ..
+*     .. Intrinsic Functions ..
+      INTRINSIC          CHAR, ICHAR, MAX
+*     ..
+*     .. External Functions ..
+      INTEGER            ILAENV
+      EXTERNAL           ILAENV
+*     ..
+*     .. Executable Statements ..
+*
+*     Invalid value for ISPEC
+*
+      IF( (ISPEC.LT.17).OR.(ISPEC.GT.21) ) THEN
+          IPARAM2STAGE = -1
+          RETURN
+      ENDIF
+*
+*     Get the number of threads
+*      
+      NTHREADS = 1
+
+
+
+
+
+*      WRITE(*,*) 'IPARAM VOICI NTHREADS ISPEC ',NTHREADS, ISPEC
+*
+      IF( ISPEC .NE. 19 ) THEN
+*
+*        Convert NAME to upper case if the first character is lower case.
+*
+         IPARAM2STAGE = -1
+         SUBNAM = NAME
+         IC = ICHAR( SUBNAM( 1: 1 ) )
+         IZ = ICHAR( 'Z' )
+         IF( IZ.EQ.90 .OR. IZ.EQ.122 ) THEN
+*
+*           ASCII character set
+*
+            IF( IC.GE.97 .AND. IC.LE.122 ) THEN
+               SUBNAM( 1: 1 ) = CHAR( IC-32 )
+               DO 100 I = 2, 12
+                  IC = ICHAR( SUBNAM( I: I ) )
+                  IF( IC.GE.97 .AND. IC.LE.122 )
+     $               SUBNAM( I: I ) = CHAR( IC-32 )
+  100          CONTINUE
+            END IF
+*
+         ELSE IF( IZ.EQ.233 .OR. IZ.EQ.169 ) THEN
+*
+*           EBCDIC character set
+*
+            IF( ( IC.GE.129 .AND. IC.LE.137 ) .OR.
+     $          ( IC.GE.145 .AND. IC.LE.153 ) .OR.
+     $          ( IC.GE.162 .AND. IC.LE.169 ) ) THEN
+               SUBNAM( 1: 1 ) = CHAR( IC+64 )
+               DO 110 I = 2, 12
+                  IC = ICHAR( SUBNAM( I: I ) )
+                  IF( ( IC.GE.129 .AND. IC.LE.137 ) .OR.
+     $                ( IC.GE.145 .AND. IC.LE.153 ) .OR.
+     $                ( IC.GE.162 .AND. IC.LE.169 ) )SUBNAM( I:
+     $                I ) = CHAR( IC+64 )
+  110          CONTINUE
+            END IF
+*
+         ELSE IF( IZ.EQ.218 .OR. IZ.EQ.250 ) THEN
+*
+*           Prime machines:  ASCII+128
+*
+            IF( IC.GE.225 .AND. IC.LE.250 ) THEN
+               SUBNAM( 1: 1 ) = CHAR( IC-32 )
+               DO 120 I = 2, 12
+                 IC = ICHAR( SUBNAM( I: I ) )
+                 IF( IC.GE.225 .AND. IC.LE.250 )
+     $             SUBNAM( I: I ) = CHAR( IC-32 )
+  120          CONTINUE
+            END IF
+         END IF
+*
+         PREC  = SUBNAM( 1: 1 )
+         ALGO  = SUBNAM( 4: 6 )
+         STAG  = SUBNAM( 8:12 )
+         RPREC = PREC.EQ.'S' .OR. PREC.EQ.'D'
+         CPREC = PREC.EQ.'C' .OR. PREC.EQ.'Z'
+*
+*        Invalid value for PRECISION
+*      
+         IF( .NOT.( RPREC .OR. CPREC ) ) THEN
+             IPARAM2STAGE = -1
+             RETURN
+         ENDIF
+      ENDIF
+*      WRITE(*,*),'RPREC,CPREC ',RPREC,CPREC,
+*     $           '   ALGO ',ALGO,'    STAGE ',STAG
+*      
+*
+      IF (( ISPEC .EQ. 17 ) .OR. ( ISPEC .EQ. 18 )) THEN 
+*
+*     ISPEC = 17, 18:  block size KD, IB
+*     Could be also dependent from N but for now it
+*     depend only on sequential or parallel
+*
+         IF( NTHREADS.GT.4 ) THEN
+            IF( CPREC ) THEN
+               KD = 128
+               IB = 32
+            ELSE
+               KD = 160
+               IB = 40
+            ENDIF
+         ELSE IF( NTHREADS.GT.1 ) THEN
+            IF( CPREC ) THEN
+               KD = 64
+               IB = 32
+            ELSE
+               KD = 64
+               IB = 32
+            ENDIF
+         ELSE
+            IF( CPREC ) THEN
+               KD = 16
+               IB = 16
+            ELSE
+               KD = 32
+               IB = 16
+            ENDIF
+         ENDIF
+         IF( ISPEC.EQ.17 ) IPARAM2STAGE = KD
+         IF( ISPEC.EQ.18 ) IPARAM2STAGE = IB
+*
+      ELSE IF ( ISPEC .EQ. 19 ) THEN
+*
+*     ISPEC = 19:  
+*     LHOUS length of the Houselholder representation
+*     matrix (V,T) of the second stage. should be >= 1.
+*
+*     Will add the VECT OPTION HERE next release
+         VECT  = OPTS(1:1)
+         IF( VECT.EQ.'N' ) THEN
+            LHOUS = MAX( 1, 4*NI )
+         ELSE
+*           This is not correct, it need to call the ALGO and the stage2
+            LHOUS = MAX( 1, 4*NI ) + IBI
+         ENDIF
+         IF( LHOUS.GE.0 ) THEN
+            IPARAM2STAGE = LHOUS
+         ELSE
+            IPARAM2STAGE = -1
+         ENDIF
+*
+      ELSE IF ( ISPEC .EQ. 20 ) THEN
+*
+*     ISPEC = 20: (21 for future use)  
+*     LWORK length of the workspace for 
+*     either or both stages for TRD and BRD. should be >= 1.
+*     TRD:
+*     TRD_stage 1: = LT + LW + LS1 + LS2
+*                  = LDT*KD + N*KD + N*MAX(KD,FACTOPTNB) + LDS2*KD 
+*                    where LDT=LDS2=KD
+*                  = N*KD + N*max(KD,FACTOPTNB) + 2*KD*KD
+*     TRD_stage 2: = (2NB+1)*N + KD*NTHREADS
+*     TRD_both   : = max(stage1,stage2) + AB ( AB=(KD+1)*N )
+*                  = N*KD + N*max(KD+1,FACTOPTNB) 
+*                    + max(2*KD*KD, KD*NTHREADS) 
+*                    + (KD+1)*N
+         LWORK        = -1
+         SUBNAM(1:1)  = PREC
+         SUBNAM(2:6)  = 'GEQRF'
+         QROPTNB      = ILAENV( 1, SUBNAM, ' ', NI, NBI, -1, -1 )
+         SUBNAM(2:6)  = 'GELQF'
+         LQOPTNB      = ILAENV( 1, SUBNAM, ' ', NBI, NI, -1, -1 )
+*        Could be QR or LQ for TRD and the max for BRD
+         FACTOPTNB    = MAX(QROPTNB, LQOPTNB)
+         IF( ALGO.EQ.'TRD' ) THEN
+            IF( STAG.EQ.'2STAG' ) THEN
+               LWORK = NI*NBI + NI*MAX(NBI+1,FACTOPTNB) 
+     $              + MAX(2*NBI*NBI, NBI*NTHREADS) 
+     $              + (NBI+1)*NI
+            ELSE IF( (STAG.EQ.'HE2HB').OR.(STAG.EQ.'SY2SB') ) THEN
+               LWORK = NI*NBI + NI*MAX(NBI,FACTOPTNB) + 2*NBI*NBI
+            ELSE IF( (STAG.EQ.'HB2ST').OR.(STAG.EQ.'SB2ST') ) THEN
+               LWORK = (2*NBI+1)*NI + NBI*NTHREADS
+            ENDIF
+         ELSE IF( ALGO.EQ.'BRD' ) THEN
+            IF( STAG.EQ.'2STAG' ) THEN
+               LWORK = 2*NI*NBI + NI*MAX(NBI+1,FACTOPTNB) 
+     $              + MAX(2*NBI*NBI, NBI*NTHREADS) 
+     $              + (NBI+1)*NI
+            ELSE IF( STAG.EQ.'GE2GB' ) THEN
+               LWORK = NI*NBI + NI*MAX(NBI,FACTOPTNB) + 2*NBI*NBI
+            ELSE IF( STAG.EQ.'GB2BD' ) THEN
+               LWORK = (3*NBI+1)*NI + NBI*NTHREADS
+            ENDIF
+         ENDIF
+         LWORK = MAX ( 1, LWORK )
+
+         IF( LWORK.GT.0 ) THEN
+            IPARAM2STAGE = LWORK
+         ELSE
+            IPARAM2STAGE = -1
+         ENDIF
+*
+      ELSE IF ( ISPEC .EQ. 21 ) THEN
+*
+*     ISPEC = 21 for future use 
+         IPARAM2STAGE = NXI
+      ENDIF
+*
+*     ==== End of IPARAM2STAGE ====
+*
+      END
+
+*> \brief \b IPARMQ
+*
+*  =========== DOCUMENTATION ===========
+*
+* Online html documentation available at
+*            http://www.netlib.org/lapack/explore-html/
+*
+*> \htmlonly
+*> Download IPARMQ + dependencies
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/iparmq.f">
+*> [TGZ]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/iparmq.f">
+*> [ZIP]</a>
+*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/iparmq.f">
+*> [TXT]</a>
+*> \endhtmlonly
+*
+*  Definition:
+*  ===========
+*
 *       INTEGER FUNCTION IPARMQ( ISPEC, NAME, OPTS, N, ILO, IHI, LWORK )
-* 
+*
 *       .. Scalar Arguments ..
 *       INTEGER            IHI, ILO, ISPEC, LWORK, N
 *       CHARACTER          NAME*( * ), OPTS*( * )
-*  
+*
 *
 *> \par Purpose:
 *  =============
@@ -162656,8 +165299,9 @@
 *> \verbatim
 *>
 *>      This program sets problem and machine dependent parameters
-*>      useful for xHSEQR and its subroutines. It is called whenever 
-*>      ILAENV is called with 12 <= ISPEC <= 16
+*>      useful for xHSEQR and related subroutines for eigenvalue
+*>      problems. It is called whenever
+*>      IPARMQ is called with 12 <= ISPEC <= 16
 *> \endverbatim
 *
 *  Arguments:
@@ -162700,19 +165344,26 @@
 *>
 *>              ISPEC=16: (IACC22) IPARMQ is set to 0, 1 or 2 with the
 *>                        following meanings.
-*>                        0:  During the multi-shift QR sweep,
-*>                            xLAQR5 does not accumulate reflections and
-*>                            does not use matrix-matrix multiply to
-*>                            update the far-from-diagonal matrix
-*>                            entries.
-*>                        1:  During the multi-shift QR sweep,
-*>                            xLAQR5 and/or xLAQRaccumulates reflections and uses
-*>                            matrix-matrix multiply to update the
+*>                        0:  During the multi-shift QR/QZ sweep,
+*>                            blocked eigenvalue reordering, blocked
+*>                            Hessenberg-triangular reduction,
+*>                            reflections and/or rotations are not
+*>                            accumulated when updating the
 *>                            far-from-diagonal matrix entries.
-*>                        2:  During the multi-shift QR sweep.
-*>                            xLAQR5 accumulates reflections and takes
-*>                            advantage of 2-by-2 block structure during
-*>                            matrix-matrix multiplies.
+*>                        1:  During the multi-shift QR/QZ sweep,
+*>                            blocked eigenvalue reordering, blocked
+*>                            Hessenberg-triangular reduction,
+*>                            reflections and/or rotations are
+*>                            accumulated, and matrix-matrix
+*>                            multiplication is used to update the
+*>                            far-from-diagonal matrix entries.
+*>                        2:  During the multi-shift QR/QZ sweep,
+*>                            blocked eigenvalue reordering, blocked
+*>                            Hessenberg-triangular reduction,
+*>                            reflections and/or rotations are
+*>                            accumulated, and 2-by-2 block structure
+*>                            is exploited during matrix-matrix
+*>                            multiplies.
 *>                        (If xTRMM is slower than xGEMM, then
 *>                        IPARMQ(ISPEC=16)=1 may be more efficient than
 *>                        IPARMQ(ISPEC=16)=2 despite the greater level of
@@ -162759,14 +165410,14 @@
 *  Authors:
 *  ========
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
 *
-*> \date November 2011
+*> \date December 2016
 *
-*> \ingroup auxOTHERauxiliary
+*> \ingroup OTHERauxiliary
 *
 *> \par Further Details:
 *  =====================
@@ -162839,10 +165490,10 @@
 *  =====================================================================
       INTEGER FUNCTION IPARMQ( ISPEC, NAME, OPTS, N, ILO, IHI, LWORK )
 *
-*  -- LAPACK auxiliary routine (version 3.4.0) --
+*  -- LAPACK auxiliary routine (version 3.7.0) --
 *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
 *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     November 2011
+*     December 2016
 *
 *     .. Scalar Arguments ..
       INTEGER            IHI, ILO, ISPEC, LWORK, N
@@ -162861,6 +165512,8 @@
 *     ..
 *     .. Local Scalars ..
       INTEGER            NH, NS
+      INTEGER            I, IC, IZ
+      CHARACTER          SUBNAM*6
 *     ..
 *     .. Intrinsic Functions ..
       INTRINSIC          LOG, MAX, MOD, NINT, REAL
@@ -162930,84 +165583,81 @@
 *        .     by making this choice dependent also upon the
 *        .     NH=IHI-ILO+1.
 *
-         IPARMQ = 0
-         IF( NS.GE.KACMIN )
-     $      IPARMQ = 1
-         IF( NS.GE.K22MIN )
-     $      IPARMQ = 2
 *
-      ELSE
-*        ===== invalid value of ispec =====
-         IPARMQ = -1
-*
-      END IF
-*
-*     ==== End of IPARMQ ====
-*
-      END
-*> \brief \b ILAVER returns the LAPACK version.
-**
-*  =========== DOCUMENTATION ===========
-*
-* Online html documentation available at 
-*            http://www.netlib.org/lapack/explore-html/ 
-*
-*  Definition:
-*  ===========
-*
-*     SUBROUTINE ILAVER( VERS_MAJOR, VERS_MINOR, VERS_PATCH )
-*
-*     INTEGER VERS_MAJOR, VERS_MINOR, VERS_PATCH
-*  
+*        Convert NAME to upper case if the first character is lower case.
 *
-*> \par Purpose:
-*  =============
-*>
-*> \verbatim
-*>
-*>  This subroutine returns the LAPACK version.
-*> \endverbatim
+         IPARMQ = 0
+         SUBNAM = NAME
+         IC = ICHAR( SUBNAM( 1: 1 ) )
+         IZ = ICHAR( 'Z' )
+         IF( IZ.EQ.90 .OR. IZ.EQ.122 ) THEN
+*
+*           ASCII character set
+*
+            IF( IC.GE.97 .AND. IC.LE.122 ) THEN
+               SUBNAM( 1: 1 ) = CHAR( IC-32 )
+               DO I = 2, 6
+                  IC = ICHAR( SUBNAM( I: I ) )
+                  IF( IC.GE.97 .AND. IC.LE.122 )
+     $               SUBNAM( I: I ) = CHAR( IC-32 )
+               END DO
+            END IF
 *
-*  Arguments:
-*  ==========
+         ELSE IF( IZ.EQ.233 .OR. IZ.EQ.169 ) THEN
 *
-*>  \param[out] VERS_MAJOR
-*>      return the lapack major version
-*>
-*>  \param[out] VERS_MINOR
-*>      return the lapack minor version from the major version
-*>
-*>  \param[out] VERS_PATCH
-*>      return the lapack patch version from the minor version
+*           EBCDIC character set
 *
-*  Authors:
-*  ========
+            IF( ( IC.GE.129 .AND. IC.LE.137 ) .OR.
+     $          ( IC.GE.145 .AND. IC.LE.153 ) .OR.
+     $          ( IC.GE.162 .AND. IC.LE.169 ) ) THEN
+               SUBNAM( 1: 1 ) = CHAR( IC+64 )
+               DO I = 2, 6
+                  IC = ICHAR( SUBNAM( I: I ) )
+                  IF( ( IC.GE.129 .AND. IC.LE.137 ) .OR.
+     $                ( IC.GE.145 .AND. IC.LE.153 ) .OR.
+     $                ( IC.GE.162 .AND. IC.LE.169 ) )SUBNAM( I:
+     $                I ) = CHAR( IC+64 )
+               END DO
+            END IF
 *
-*> \author Univ. of Tennessee 
-*> \author Univ. of California Berkeley 
-*> \author Univ. of Colorado Denver 
-*> \author NAG Ltd. 
+         ELSE IF( IZ.EQ.218 .OR. IZ.EQ.250 ) THEN
 *
-*> \date September 2012
+*           Prime machines:  ASCII+128
 *
-*> \ingroup auxOTHERauxiliary
+            IF( IC.GE.225 .AND. IC.LE.250 ) THEN
+               SUBNAM( 1: 1 ) = CHAR( IC-32 )
+               DO I = 2, 6
+                  IC = ICHAR( SUBNAM( I: I ) )
+                  IF( IC.GE.225 .AND. IC.LE.250 )
+     $               SUBNAM( I: I ) = CHAR( IC-32 )
+               END DO
+            END IF
+         END IF
 *
-*  =====================================================================
-      SUBROUTINE ILAVER( VERS_MAJOR, VERS_MINOR, VERS_PATCH )
+         IF( SUBNAM( 2:6 ).EQ.'GGHRD' .OR.
+     $       SUBNAM( 2:6 ).EQ.'GGHD3' ) THEN
+            IPARMQ = 1
+            IF( NH.GE.K22MIN )
+     $         IPARMQ = 2
+         ELSE IF ( SUBNAM( 4:6 ).EQ.'EXC' ) THEN
+            IF( NH.GE.KACMIN )
+     $         IPARMQ = 1
+            IF( NH.GE.K22MIN )
+     $         IPARMQ = 2
+         ELSE IF ( SUBNAM( 2:6 ).EQ.'HSEQR' .OR.
+     $             SUBNAM( 2:5 ).EQ.'LAQR' ) THEN
+            IF( NS.GE.KACMIN )
+     $         IPARMQ = 1
+            IF( NS.GE.K22MIN )
+     $         IPARMQ = 2
+         END IF
 *
-*  -- LAPACK computational routine (version 3.5.0) --
-*  -- LAPACK is a software package provided by Univ. of Tennessee,    --
-*  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-*     November 2013
+      ELSE
+*        ===== invalid value of ispec =====
+         IPARMQ = -1
 *
-*  =====================================================================
+      END IF
 *
-      INTEGER VERS_MAJOR, VERS_MINOR, VERS_PATCH
-*  =====================================================================
-      VERS_MAJOR = 3
-      VERS_MINOR = 5
-      VERS_PATCH = 0
-*  =====================================================================
+*     ==== End of IPARMQ ====
 *
-      RETURN
       END
diff --git a/src/modules/lapack/dllversion.rc b/src/modules/lapack/dllversion.rc
index 71e6cc4..dcc8212 100644
--- a/src/modules/lapack/dllversion.rc
+++ b/src/modules/lapack/dllversion.rc
@@ -16,7 +16,7 @@ BEGIN
             VALUE "FileVersion", R_MAJOR "." R_MINOR " " R_STATUS " (" R_YEAR "-" R_MONTH "-" R_DAY ")\0"
             VALUE "LegalCopyright", "R Core Team 1995-" R_YEAR "\0"
             VALUE "R Version", R_MAJOR "." R_MINOR " " R_STATUS " (" R_YEAR "-" R_MONTH "-" R_DAY ")\0"
-            VALUE "Project info", "http://www.r-project.org\0"
+            VALUE "Project info", "https://www.r-project.org\0"
         END
     END
     BLOCK "VarFileInfo"
diff --git a/src/modules/lapack/init_win.c b/src/modules/lapack/init_win.c
index 4ebc4a1..1f46163 100644
--- a/src/modules/lapack/init_win.c
+++ b/src/modules/lapack/init_win.c
@@ -14,7 +14,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  */
 
 #ifdef HAVE_CONFIG_H
diff --git a/src/modules/lapack/vecLibg95c.c b/src/modules/lapack/vecLibg95c.c
index ffc18e4..37789c5 100644
--- a/src/modules/lapack/vecLibg95c.c
+++ b/src/modules/lapack/vecLibg95c.c
@@ -3,7 +3,7 @@
 #endif
 
 #include <AvailabilityMacros.h> /* for MAC_OS_X_VERSION_10_* -- present on 10.2+ (according to Apple) */
-/* Since OS X 10.8 vecLib requires Accelerate to be included first (which in turn includes vecLib) */
+/* Since macOS 10.8 vecLib requires Accelerate to be included first (which in turn includes vecLib) */
 #if defined MAC_OS_X_VERSION_10_8 && MAC_OS_X_VERSION_MIN_REQUIRED >= 1040
 #include <Accelerate/Accelerate.h>
 #else
diff --git a/src/modules/vfonts/Makefile.in b/src/modules/vfonts/Makefile.in
deleted file mode 100644
index 4e2843a..0000000
--- a/src/modules/vfonts/Makefile.in
+++ /dev/null
@@ -1,81 +0,0 @@
-#
-# ${R_HOME}/src/modules/vfonts/Makefile
-
-VPATH = @srcdir@
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
-
-top_builddir = ../../..
-subdir = src/modules/vfonts
-R_HOME = $(top_builddir)
-
-include $(top_builddir)/Makeconf
-
-SOURCES = g_alab_her.c g_cntrlify.c g_fontdb.c g_her_glyph.c
-DEPENDS = $(SOURCES:.c=.d)
-OBJECTS = $(SOURCES:.c=.o)
-HEADERS = g_cntrlify.h g_control.h g_extern.h g_her_metr.h g_jis.h
-
-distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
-DISTFILES = \
-	Makefile.in Makefile.win $(SOURCES) $(HEADERS) \
-	dllversion.rc
-
-vfonts_la = vfonts$(SHLIB_EXT)
-## AIX needs LIBM
-vfonts_la_LIBADD = $(LIBR1) $(LIBM) @DYLIB_UNDEFINED_ALLOWED_FALSE@ $(LIBINTL)
-
-ALL_CFLAGS = $(ALL_CFLAGS_LO)
-
-all: R
-
-Makefile: $(srcdir)/Makefile.in \
-  $(top_builddir)/config.status \
-  $(SOURCES)
-	@cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
-
-Makedeps: Makefile $(DEPENDS)
-	@cat $(DEPENDS) >> Makefile
-	@touch $@
-
-R: Makedeps
-	@$(MAKE) $(vfonts_la)
-
-$(vfonts_la): $(OBJECTS)
-	$(SHLIB_LINK) -o $@ $(OBJECTS) $(vfonts_la_LIBADD)
-## <FIXME>
-## Not sure if we want to do this ...
-	@$(MAKE) rhome="$(abs_top_builddir)" install
-## </FIXME>
-
-install: installdirs
-	@$(SHELL) $(top_srcdir)/tools/copy-if-change $(vfonts_la) "$(DESTDIR)$(Rexecmodulesdir)/$(vfonts_la)"
-installdirs:
-	@$(MKINSTALLDIRS) "$(DESTDIR)$(Rexecmodulesdir)"
-install-strip: installdirs
-	@$(SHELL) $(top_srcdir)/tools/copy-if-change $(vfonts_la) "$(DESTDIR)$(Rexecmodulesdir)/$(vfonts_la)"
-	@if test -n "$(STRIP_LIBS)"; then \
-	  $(STRIP_LIBS) "$(DESTDIR)$(Rexecmodulesdir)/$(vfonts_la)" ;\
-	fi
-uninstall:
-	@rm -f "$(Rexecmodulesdir)/vfonts$(SHLIB_EXT)"
-
-mostlyclean: clean
-clean:
-	@-rm -rf .libs _libs
-	@-rm -f Makedeps *.d *.o *.a *.lo *.la *$(SHLIB_EXT)
-distclean: clean
-	@-rm -f Makefile
-maintainer-clean: distclean
-
-TAGS info dvi check:
-
-distdir: $(DISTFILES)
-	@for f in $(DISTFILES); do \
-	  test -f $(distdir)/$${f} \
-	    || ln $(srcdir)/$${f} $(distdir)/$${f} 2>/dev/null \
-	    || cp -p $(srcdir)/$${f} $(distdir)/$${f}; \
-	done
-
-## Automagically generated dependencies:
-
diff --git a/src/modules/vfonts/Makefile.win b/src/modules/vfonts/Makefile.win
deleted file mode 100644
index 6a8a70e..0000000
--- a/src/modules/vfonts/Makefile.win
+++ /dev/null
@@ -1,30 +0,0 @@
-#-*- Makefile -*-
-include ../../gnuwin32/MkRules
-
-MODULE=vfonts
-all: makeMakedeps ../../../modules$(R_ARCH)/$(MODULE).dll
-
-CSOURCES=g_alab_her.c g_cntrlify.c g_fontdb.c g_her_glyph.c
-
-CPPFLAGS=-I../../include -DHAVE_CONFIG_H
-OBJS=$(CSOURCES:.c=.o) dllversion.o
-
-../../../modules$(R_ARCH)/$(MODULE).dll: $(OBJS)
-	@$(MKDIR) -p ../../../modules$(R_ARCH)
-	@$(ECHO) "EXPORTS" > vfonts.def
-	@$(ECHO) " R_init_vfonts" >> vfonts.def
-	$(DLL) -shared  -o $@ $^ vfonts.def -L../../../$(IMPDIR) -lR
-	@$(RM) vfonts.def
-
-clean:
-	@$(RM) Makedeps *.d *.o $(MODULE).def $(MODULE).dll
-
-# Dependencies
-dllversion.o: ../../include/Rversion.h
-DEPS=$(CSOURCES:.c=.d)
-
-makeMakedeps: $(DEPS)
-	@$(RM) Makedeps
-	@cat $(DEPS) >> Makedeps
-
--include Makedeps
diff --git a/src/modules/vfonts/dllversion.rc b/src/modules/vfonts/dllversion.rc
deleted file mode 100644
index f0ebe2b..0000000
--- a/src/modules/vfonts/dllversion.rc
+++ /dev/null
@@ -1,26 +0,0 @@
-#include <windows.h>
-#include "../../include/Rversion.h"
-
-VS_VERSION_INFO VERSIONINFO
-FILEVERSION R_FILEVERSION
-PRODUCTVERSION 3,0,0,0
-FILEFLAGSMASK 0x3L
-FILEOS VOS__WINDOWS32
-FILETYPE VFT_DLL
-BEGIN
-    BLOCK "StringFileInfo"
-    BEGIN
-        BLOCK "040904E4"
-        BEGIN
-            VALUE "FileDescription", "DLL for vfonts module\0"
-            VALUE "FileVersion", R_MAJOR "." R_MINOR " " R_STATUS " (" R_YEAR "-" R_MONTH "-" R_DAY ")\0"
-            VALUE "LegalCopyright", "R Core Team 1995-" R_YEAR "\0"
-            VALUE "R Version", R_MAJOR "." R_MINOR " " R_STATUS " (" R_YEAR "-" R_MONTH "-" R_DAY ")\0"
-            VALUE "Project info", "http://www.r-project.org\0"
-        END
-    END
-    BLOCK "VarFileInfo"
-    BEGIN
-        VALUE "Translation", 0x409, 1252
-    END
-END
diff --git a/src/modules/vfonts/g_alab_her.c b/src/modules/vfonts/g_alab_her.c
deleted file mode 100644
index 7e4b75c..0000000
--- a/src/modules/vfonts/g_alab_her.c
+++ /dev/null
@@ -1,980 +0,0 @@
-/* PAUL MURRELL
-   This is from the GNU plotutils libplot-2.3 distribution
-   Several modifications have been made to use the R graphics engine
-   for output.
-   All references to HAVE_PROTOS removed
-   All references to "plotter" replaced with references to "GEDevDesc"
-*/
-
-/* This file contains the internal method _falabel_hershey(), which plots a
-   label using Hershey fonts.  Each character in a Hershey font is a
-   sequence of pen motions, so this function simply calls fmoverel() and
-   fcontrel() to `stroke' each character in the argument string.
-
-   The width of the string in user units is returned.  The internal method
-   _flabelwidth_hershey() is similar, but does not actually plot the label.
-*/
-
-/* PAUL MURRELL
-   sys-defines.h not used
-*/
-/* #include "sys-defines.h" */
-
-/* PAUL MURRELL
-   extern.h renamed g_extern.h
-*/
-#include "g_extern.h"
-#include "g_control.h"
-#include "g_her_metr.h"
-#include <Rmodules/Rvfonts.h>
-
-/* Shearing factor for oblique fonts, new_x = x + SHEAR * y  */
-
-#define SHEAR (2.0/7.0)
-
-/* Relative size of subscripts/superscripts (i.e. `indexical' size) */
-
-#define SCRIPTSIZE (0.6)
-
-/* Positioning of subscripts/superscripts */
-
-#define SUBSCRIPT_DX 0.0
-#define SUBSCRIPT_DY (-0.25)
-#define SUPERSCRIPT_DX 0.0
-#define SUPERSCRIPT_DY 0.4
-
-/* Positioning of accents (in Hershey units).  UP_SHIFT is amount by which
-   accents are raised when placed over upper-case letters.  RIGHT_SHIFT is
-   applied as well, if the upper-case letter is italic. */
-
-#define ACCENT_UP_SHIFT 7.0
-#define ACCENT_RIGHT_SHIFT 2.0
-
-/* Relative size of small Japanese Kana */
-#define SMALL_KANA_SIZE 0.725
-
-/* Hershey glyph arrays */
-
-#define OCCIDENTAL 0
-#define ORIENTAL 1
-
-/* Location of first Kana in the occidental glyph arrays.  (Kana, unlike
-   Kanji, are placed in the occidental array, at the very end.) */
-#define BEGINNING_OF_KANA 4195
-
-/* PAUL MURRELL
-   Structure to contain vfont current position
-*/
-typedef struct {
-    double currX;
-    double currY;
-    double angle;
-} vfontContext;
-
-/* forward references */
-static bool _composite_char (unsigned char *composite,
-			     unsigned char *character,
-			     unsigned char *accent);
-static void _draw_stroke (vfontContext *vc, const pGEcontext gc,
-			  pGEDevDesc dd,
-			  bool pendown, double deltax, double deltay);
-static double _label_width_hershey (const pGEcontext gc, pGEDevDesc dd,
-				    const unsigned short *label);
-static void _draw_hershey_string (vfontContext *vc, const pGEcontext gc,
-				  pGEDevDesc dd,
-				  const unsigned short *string);
-
-/* _draw_hershey_stroke() draws a stroke, taking into account the
-   transformation from Hershey units to user units, and also the current
-   transformation matrix (as set by the user).  _draw_stroke is similar,
-   but takes arguments in user units. */
-/* PAUL MURRELL
-   _draw_stroke now takes arguments in INCHES;  it needs to work in
-   an absolute coordinate system because it does the rotation
-*/
-
-static
-void _draw_hershey_stroke (vfontContext *vc, const pGEcontext gc, pGEDevDesc dd,
-			   bool pendown, double deltax, double deltay)
-{
-    _draw_stroke(vc, gc, dd, pendown,
-		 fromDeviceWidth(HERSHEY_X_UNITS_TO_USER_UNITS (deltax),
-				 GE_INCHES, dd),
-		 fromDeviceHeight(HERSHEY_Y_UNITS_TO_USER_UNITS (deltay),
-				  GE_INCHES, dd));
-}
-
-static void moverel(double dx, double dy, vfontContext *vc) {
-    vc->currX += dx;
-    vc->currY += dy;
-}
-
-static void linerel(double dx, double dy,
-		    vfontContext *vc, const pGEcontext gc,
-		    pGEDevDesc dd) {
-    GELine(toDeviceX(vc->currX, GE_INCHES, dd),
-	   toDeviceY(vc->currY, GE_INCHES, dd),
-	   toDeviceX(vc->currX+dx, GE_INCHES, dd),
-	   toDeviceY(vc->currY+dy, GE_INCHES, dd),
-	   gc, dd);
-    vc->currX += dx;
-    vc->currY += dy;
-}
-
-/* e.g. for some Windows headers */
-#ifndef M_PI
-#define M_PI		3.141592653589793238462643383279502884197169399375
-#endif
-
-static void _draw_stroke (vfontContext *vc, const pGEcontext gc, pGEDevDesc dd,
-			  bool pendown, double deltax, double deltay)
-{
-  double dx, dy;
-  double theta;
-
-  theta = M_PI * vc->angle / 180.0;
-
-  dx = cos(theta) * deltax - sin(theta) * deltay;
-  dy = sin(theta) * deltax + cos(theta) * deltay;
-
-  if (pendown)
-      linerel(dx, dy, vc, gc, dd);
-  else
-      moverel(dx, dy, vc);
-}
-
-/* PAUL MURRELL
-   Renamed from _g_flabelwidth_hershey to GVStrWidth
-   ... and added unit argument
-   ... and rearranged order of arguments
-*/
-
-/* this is the version of the flabelwidth() method that is specific to the
-   case when the current Plotter font is a Hershey font; called in
-   g_flabelwidth () */
-static double R_VF_VStrWidth (const char *s,
-			      const pGEcontext gc, pGEDevDesc dd)
-{
-  double label_width;
-  unsigned short *codestring;
-
-  /* PAUL MURRELL
-     _controlify using R_alloc instead of xmalloc so need to do
-     vmaxget() ... vmaxset() instead of free()
-  */
-
-  const void *vmax = vmaxget();
-
-  /* convert string to a codestring, including annotations */
-  codestring = _controlify (dd, (const unsigned char *) s,
-			    gc->fontfamily[3] - 1, gc->fontface);
-
-  label_width = _label_width_hershey (gc, dd, codestring);
-
-  vmaxset(vmax);
-  /*  free (codestring); */
-
-  return label_width;
-}
-
-/* PAUL MURRELL
-   Added _label_height_hershey and GVStrHeight function
-*/
-
-static double _label_height_hershey (const pGEcontext gc,
-				     pGEDevDesc dd,
-				     const unsigned short *label)
-{
-    return( HERSHEY_Y_UNITS_TO_USER_UNITS(HERSHEY_LARGE_CAPHEIGHT) );
-}
-
-static double R_VF_VStrHeight (const char *s, const pGEcontext gc, pGEDevDesc dd)
-{
-  double label_height;
-  unsigned short *codestring;
-
-  const void *vmax = vmaxget();
-
-  /* convert string to a codestring, including annotations */
-  codestring = _controlify (dd, (const unsigned char *) s,
-			    gc->fontfamily[3] - 1, gc->fontface);
-
-  label_height = _label_height_hershey (gc, dd, codestring);
-
-  vmaxset(vmax);
-
-  return label_height;
-}
-
-/* PAUL MURRELL
-   This guy is the entry point to the GNU code
-   Renamed from _g_falabel_hershey to GVText
-   Reordered arguments
-   Added x, y, rotation, and font specification arguments
-   Re-typed x/y_justify from int to double
-   Re-typed s from "unsigned char *" to char *
-   Changed return value from double to void
-*/
-
-/* this is the version of the falabel() method that is specific
-   to the case when the current Plotter font is a Hershey font */
-static void R_VF_VText (double x, double y, const char *s,
-			double x_justify, double y_justify, double rotation,
-			const pGEcontext gc,
-			pGEDevDesc dd)
-{
-  unsigned short *codestring;
-  double label_width, label_height;
-  double x_offset, y_offset;
-/*  double x_displacement; */
-
-  /* PAUL MURRELL
-     _controlify using R_alloc instead of xmalloc so need to do
-     vmaxget() ... vmaxset() instead of free()
-  */
-  const void *vmax = vmaxget();
-
-  /* PAUL MURRELL
-     initialise the local currX and currY
-     work in INCHES because that is what moverel and linerel work in
-  */
-  vfontContext vc;
-  vc.currX = fromDeviceX(x, GE_INCHES, dd);
-  vc.currY = fromDeviceY(y, GE_INCHES, dd);
-  vc.angle = rotation;
-
-  /* PAUL MURRELL
-   * Override gc settings for lty and lwd
-   */
-  gc->lty = LTY_SOLID;
-  gc->lwd = HERSHEY_LINE_WIDTH_TO_LWD (HERSHEY_STROKE_WIDTH);
-  gc->lend = GE_ROUND_CAP;
-  gc->ljoin = GE_ROUND_JOIN;
-
-  /* convert string to a codestring, including annotations */
-  codestring = _controlify (dd, (const unsigned char *)s,
-			    gc->fontfamily[3] - 1, gc->fontface);
-
-
-  /* PAUL MURRELL
-     Justification changed from char (e.g., 'l', 'c', 'r') to
-     double (e.g., 0, .5, 1)
-     Also added handling of NaN x_justify and y_justify
-     ... and replaced HERSHEY_Y_UNITS_TO_USER_UNITS(HERSHEY_HEIGHT)
-     with HERSHEY_Y_UNITS_TO_USER_UNITS(HERSHEY_LARGE_CAPHEIGHT)
-     ... and replaced ((double)HERSHEY_ASCENT / (double)HERSHEY_HEIGHT)
-     with 1.0
-  */
-
-  /* dimensions of the string, in user units */
-  label_width = _label_width_hershey (gc, dd, codestring);
-  label_height = _label_height_hershey(gc, dd, codestring);
-
-  if (!R_FINITE(x_justify))
-      x_justify = 0.5;
-  if (!R_FINITE(y_justify))
-      y_justify = 0.5;
-
-  x_offset = 0 - x_justify;
-  /* x_displacement = 1 - 2 * x_justify; */
-
-  y_offset = 0 - y_justify * 1.0;
-
-  /* save relevant drawing attributes, and restore them later */
-
-  {
-/*
-    char *old_line_mode, *old_cap_mode, *old_join_mode;
-    int old_fill_type;
-    double oldposx, oldposy;
-    bool old_dash_array_in_effect;
-
-    old_line_mode = (char *)_plot_xmalloc (strlen (_plotter->drawstate->line_mode) + 1);
-    old_cap_mode = (char *)_plot_xmalloc (strlen (_plotter->drawstate->cap_mode) + 1);
-    old_join_mode = (char *)_plot_xmalloc (strlen (_plotter->drawstate->join_mode) + 1);
-    oldposx = (_plotter->drawstate->pos).x;
-    oldposy = (_plotter->drawstate->pos).y;
-
-    strcpy (old_line_mode, _plotter->drawstate->line_mode);
-    strcpy (old_cap_mode, _plotter->drawstate->cap_mode);
-    strcpy (old_join_mode, _plotter->drawstate->join_mode);
-    old_fill_type = _plotter->drawstate->fill_type;
-    old_dash_array_in_effect = _plotter->drawstate->dash_array_in_effect;
-*/
-    /* Our choices for rendering: solid lines, rounded capitals and joins,
-       a line width equal to slightly more than 1 Hershey unit, and
-       transparent filling. */
-/*
-    _plotter->linemod (R___(_plotter) "solid");
-    _plotter->capmod (R___(_plotter) "round");
-    _plotter->joinmod (R___(_plotter) "round");
-    _plotter->filltype (R___(_plotter) 0);
-*/
-
-    /* move to take horizontal and vertical justification into account;
-       arguments here are in user units */
-      /* PAUL MURRELL
-	 arguments now in INCHES because _draw_stroke does rotation
-	 so it needs to use absolute coordinates
-      */
-      _draw_stroke (&vc, gc, dd,
-		    false,
-		    fromDeviceWidth(x_offset * label_width, GE_INCHES, dd),
-		    fromDeviceHeight(y_offset * label_height, GE_INCHES, dd));
-    /* call stroker on the sequence of strokes obtained from each char (the
-       stroker may manipulate the line width) */
-      /* _draw_hershey_stroke (dd, true, 0, HERSHEY_EM);     */
-      _draw_hershey_string (&vc, gc, dd, codestring);
-
-    /* Restore original values of relevant drawing attributes, free
-       storage.  endpath() will be invoked in here automatically, flushing
-       the created polyline object comprising the stroked text. */
-/*
-    _plotter->linemod (R___(_plotter) old_line_mode);
-    _plotter->capmod (R___(_plotter) old_cap_mode);
-    _plotter->joinmod (R___(_plotter) old_join_mode);
-    _plotter->filltype (R___(_plotter) old_fill_type);
-    _plotter->drawstate->dash_array_in_effect = old_dash_array_in_effect;
-
-    free (old_line_mode);
-    free (old_cap_mode);
-    free (old_join_mode);
-*/
-    /* return to original position */
-      /*    _plotter->fmove (R___(_plotter) oldposx, oldposy); */
-  }
-
-  /* amount by which to shift after printing label (user units) */
-/*
-  postdx = x_displacement * label_width;
-  theta = M_PI * rotation / 180.0;
-  dx = cos (theta) * postdx
-    - sin (theta) * 0;
-  dy = sin (theta) * postdx
-    + cos (theta) * 0;
-
-  moverel(dx, dy);
-*/
-
-  vmaxset(vmax);
-  /*  free (codestring); */
-
-  /* PAUL MURRELL
-     No return value
-  */
-  /* return label_width;		 user units */
-}
-
-/* In addition to scaling the character sizes and the `width', we perform
-   the following (dx, dy):
-
-   enter subscript	(dx, dy) = (-1/9, -1/2) * width
-   exit subscript	(dx, dy) = (+1/6, +1/2) * width
-
-   enter superscript	(dx, dy) = (-1/9, +1/2) * width
-   exit superscript	(dx, dy) = (+1/6, -1/2) * width
-
-   For clarity here, `width' refers to the width _before_ it is
-   multiplied by a factor 2/3.
-
-   [N.B. In Bob Beach's original UGS character stroke generator,
-   the +1/6's here were +2/9 instead.  Better?] */
-
-/* _label_width_hershey() computes the width (total delta x) of a
-   controlified character string to be rendered in a vector font, in user
-   units */
-static double _label_width_hershey (const pGEcontext gc, pGEDevDesc dd,
-				    const unsigned short *label)
-{
-  const unsigned short *ptr = label;
-  unsigned short c;
-  double charsize = 1.0;	/* relative char size, 1.0 means full size */
-  double saved_charsize = 1.0;
-  double width = 0.0;		/* label width */
-  double saved_width = 0.0;
-
-  /* loop through unsigned shorts in label */
-  while ((c = (*ptr)) != (unsigned short)'\0')
-    {
-      int glyphnum;		/* glyph in Hershey array */
-      const unsigned char *glyph;
-
-      if (c & RAW_HERSHEY_GLYPH)
-	/* glyph was spec'd via an escape, not as a char in a font */
-	{
-	  glyphnum = c & GLYPH_SPEC;
-	  glyph = (const unsigned char *)(_occidental_hershey_glyphs[glyphnum]);
-
-	  if (*glyph != '\0')	/* nonempty glyph */
-	    /* 1st two chars are bounds */
-	    width += charsize * ((int)glyph[1] - (int)glyph[0]);
-	}
-      else if (c & RAW_ORIENTAL_HERSHEY_GLYPH)
-	/* glyph was spec'd via an escape, not as a char in a font */
-	{
-	  glyphnum = c & GLYPH_SPEC;
-	  glyph = (const unsigned char *)_oriental_hershey_glyphs[glyphnum];
-
-	  if (*glyph != '\0')	/* nonempty glyph */
-	    /* 1st two chars are bounds */
-	    width += charsize * ((int)glyph[1] - (int)glyph[0]);
-	}
-      else if (c & CONTROL_CODE)	/* parse control code */
-	{
-	  switch (c & ~CONTROL_CODE)
-	    {
-	    case C_BEGIN_SUBSCRIPT:
-	    case C_BEGIN_SUPERSCRIPT :
-	      charsize *= SCRIPTSIZE;
-	      break;
-
-	    case C_END_SUBSCRIPT:
-	    case C_END_SUPERSCRIPT:
-	      charsize /= SCRIPTSIZE;
-	      break;
-
-	    case C_PUSH_LOCATION:
-	      saved_width = width;
-	      saved_charsize = charsize;
-	      break;
-
-	    case C_POP_LOCATION:
-	      width = saved_width;
-	      charsize = saved_charsize;
-	      break;
-
-	    case C_RIGHT_ONE_EM:
-	      width += charsize * HERSHEY_EM;
-	      break;
-
-	    case C_RIGHT_HALF_EM:
-	      width += charsize * HERSHEY_EM / 2.0;
-	      break;
-
-	    case C_RIGHT_QUARTER_EM:
-	      width += charsize * HERSHEY_EM / 4.0;
-	      break;
-
-	    case C_RIGHT_SIXTH_EM:
-	      width += charsize * HERSHEY_EM / 6.0;
-	      break;
-
-	    case C_RIGHT_EIGHTH_EM:
-	      width += charsize * HERSHEY_EM / 8.0;
-	      break;
-
-	    case C_RIGHT_TWELFTH_EM:
-	      width += charsize * HERSHEY_EM / 12.0;
-	      break;
-
-	    case C_LEFT_ONE_EM:
-	      width -= charsize * HERSHEY_EM;
-	      break;
-
-	    case C_LEFT_HALF_EM:
-	      width -= charsize * HERSHEY_EM / 2.0;
-	      break;
-
-	    case C_LEFT_QUARTER_EM:
-	      width -= charsize * HERSHEY_EM / 4.0;
-	      break;
-
-	    case C_LEFT_SIXTH_EM:
-	      width -= charsize * HERSHEY_EM / 6.0;
-	      break;
-
-	    case C_LEFT_EIGHTH_EM:
-	      width -= charsize * HERSHEY_EM / 8.0;
-	      break;
-
-	    case C_LEFT_TWELFTH_EM:
-	      width -= charsize * HERSHEY_EM / 12.0;
-	      break;
-
-	      /* unrecognized control code */
-	    default:
-	      break;
-	    }
-	}
-      else			/* yow, an actual character */
-	{
-	  int raw_fontnum;
-
-	  /* compute index of font, in table in g_fontdb.c */
-	  raw_fontnum = (c >> FONT_SHIFT) & ONE_BYTE;
-
-	  c &= ~FONT_SPEC;	/* extract character proper */
-	  glyphnum = (_hershey_font_info[raw_fontnum].chars)[c];
-
-	  /* could be a pseudo glyph number, e.g. an indication that
-	     character is composite */
-	  if (glyphnum == ACC0 || glyphnum == ACC1 || glyphnum == ACC2)
-	    {
-		unsigned char composite, character = '\0' /* -Wall */, accent;
-
-	      /* if so, use 1st element of composite character */
-	      composite = (unsigned char)c;
-	      if (_composite_char (&composite, &character, &accent))
-		glyphnum = (_hershey_font_info[raw_fontnum].chars)[character];
-	      else
-		glyphnum = UNDE; /* hope this won't happen */
-	    }
-
-	  /* could also be a glyph number displaced by KS, to indicate
-	     that this is a small kana */
-	  if (glyphnum & KS)
-	    glyphnum -= KS;
-
-	  glyph = (const unsigned char *)(_occidental_hershey_glyphs[glyphnum]);
-	  if (*glyph != '\0')	/* nonempty glyph */
-	    /* 1st two chars are bounds */
-	    width += charsize * ((int)glyph[1] - (int)glyph[0]);
-	}
-
-      ptr++;			/* bump pointer in string */
-    }
-
-  return HERSHEY_X_UNITS_TO_USER_UNITS (width);
-}
-
-/* _draw_hershey_penup_stroke() draws a penup stroke, along a vector
-   specified in Hershey units.  Size scaling and obliquing (true/false) are
-   specified.  This is used for repositioning during rendering of
-   composite (accented) characters. */
-static
-void _draw_hershey_penup_stroke(vfontContext *vc, const pGEcontext gc,
-				pGEDevDesc dd,
-				double dx, double dy,
-				double charsize, bool oblique)
-{
-  double shear;
-
-  shear = oblique ? (SHEAR) : 0.0;
-  _draw_hershey_stroke (vc, gc, dd,
-			false,	/* pen up */
-			charsize * (dx + shear * dy),
-			charsize * dy);
-}
-
-/* _draw_hershey_glyph() invokes move() and cont() to draw a raw Hershey
-   glyph, specified by index in the occidental or oriental glyph arrays.
-   Size scaling and obliquing (true/false) are specified. */
-static
-void _draw_hershey_glyph (vfontContext *vc, const pGEcontext gc, pGEDevDesc dd,
-			  int glyphnum,
-			  double charsize, int type, bool oblique)
-{
-  double xcurr, ycurr;
-  double xfinal, yfinal;
-  bool pendown = false;
-  const unsigned char *glyph;
-  double dx, dy;
-  double shear;
-
-  shear = oblique ? (SHEAR) : 0.0;
-  switch (type)
-    {
-    case OCCIDENTAL:
-    default:
-      glyph = (const unsigned char *)(_occidental_hershey_glyphs[glyphnum]);
-      break;
-    case ORIENTAL:
-      glyph = (const unsigned char *)(_oriental_hershey_glyphs[glyphnum]);
-      break;
-    }
-
-  if (*glyph != '\0')	/* nonempty glyph */
-    {
-      xcurr = charsize * (double)glyph[0];
-      xfinal = charsize * (double)glyph[1];
-      ycurr = yfinal = 0.0;
-      glyph += 2;
-      while (*glyph)
-	{
-	  int xnewint;
-
-	  xnewint = (int)glyph[0];
-
-	  if (xnewint == (int)' ')
-	    pendown = false;
-	  else
-	    {
-	      double xnew, ynew;
-
-	      xnew = (double)charsize * xnewint;
-	      ynew = (double)charsize
-		* ((int)'R'
-		   - ((int)glyph[1] + (double)HERSHEY_BASELINE));
-	      dx = xnew - xcurr;
-	      dy = ynew - ycurr;
-	      _draw_hershey_stroke (vc, gc, dd,
-				    pendown, dx + shear * dy, dy);
-	      xcurr = xnew, ycurr = ynew;
-	      pendown = true;
-	    }
-
-	  glyph +=2;	/* on to next pair */
-	}
-
-      /* final penup stroke, to end where we should */
-      dx = xfinal - xcurr;
-      dy = yfinal - ycurr;
-      _draw_hershey_stroke (vc, gc, dd, false, dx + shear * dy, dy);
-    }
-}
-
-/* _draw_hershey_string() strokes a string beginning at present location,
-   which is taken to be on the string's baseline.  Besides invoking move()
-   and cont(), it invokes linewidth(). */
-static
-void _draw_hershey_string (vfontContext *vc, const pGEcontext gc, pGEDevDesc dd,
-			   const unsigned short *string)
-{
-  unsigned short c;
-  const unsigned short *ptr = string;
-  double charsize = 1.0;
-  int line_width_type = 0;	/* 0,1,2 = unset,occidental,oriental */
-
-  while ((c = (*ptr++)) != '\0')
-    {
-      /* Check for the four possibilities: (1) a Hershey glyph specified by
-	 glyph number, (2) an oriental Hershey glyph specified by glyph
-	 number, (3) a control code, and (4) an ordinary font character,
-	 which will be mapped to a Hershey glyph by one of the tables in
-	 g_fontdb.c. */
-
-      if (c & RAW_HERSHEY_GLYPH)
-	{
-	  if (line_width_type != 1)
-	    {
-	      gc->lwd = HERSHEY_LINE_WIDTH_TO_LWD (HERSHEY_STROKE_WIDTH);
-	      line_width_type = 1;
-	    }
-	  _draw_hershey_glyph (vc, gc, dd,
-			       c & GLYPH_SPEC, charsize, OCCIDENTAL, false);
-	}
-
-      else if (c & RAW_ORIENTAL_HERSHEY_GLYPH)
-	{
-	  if (line_width_type != 2)
-	    {
-	      gc->lwd = HERSHEY_LINE_WIDTH_TO_LWD (HERSHEY_STROKE_WIDTH);
-	      line_width_type = 2;
-	    }
-	  _draw_hershey_glyph (vc, gc, dd,
-			       c & GLYPH_SPEC, charsize, ORIENTAL, false);
-	}
-
-      else if (c & CONTROL_CODE)
-	switch (c & ~CONTROL_CODE) /* parse control codes */
-	  {
-	  case C_BEGIN_SUPERSCRIPT :
-	    _draw_hershey_stroke (vc, gc, dd,
-				  false,
-				  SUPERSCRIPT_DX * charsize * HERSHEY_EM,
-				  SUPERSCRIPT_DY * charsize * HERSHEY_EM);
-	    charsize *= SCRIPTSIZE;
-	    break;
-
-	  case C_END_SUPERSCRIPT:
-	    charsize /= SCRIPTSIZE;
-	    _draw_hershey_stroke (vc, gc, dd,
-				  false,
-				  - SUPERSCRIPT_DX * charsize * HERSHEY_EM,
-				  - SUPERSCRIPT_DY * charsize * HERSHEY_EM);
-	    break;
-
-	  case C_BEGIN_SUBSCRIPT:
-	    _draw_hershey_stroke (vc, gc, dd,
-				  false,
-				  SUBSCRIPT_DX * charsize * HERSHEY_EM,
-				  SUBSCRIPT_DY * charsize * HERSHEY_EM);
-	    charsize *= SCRIPTSIZE;
-	    break;
-
-	  case C_END_SUBSCRIPT:
-	    charsize /= SCRIPTSIZE;
-	    _draw_hershey_stroke (vc, gc, dd,
-				  false,
-				  - SUBSCRIPT_DX * charsize * HERSHEY_EM,
-				  - SUBSCRIPT_DY * charsize * HERSHEY_EM);
-	    break;
-
-	  case C_PUSH_LOCATION:
-	      /* saved_charsize = charsize;
-		 saved_position_x = _plotter->drawstate->pos.x;
-		 saved_position_y = _plotter->drawstate->pos.y; */
-	    break;
-
-	  case C_POP_LOCATION:
-	      /* charsize = saved_charsize;
-		 _plotter->fmove (R___(_plotter)
-		 saved_position_x, saved_position_y); */
-	    break;
-
-	  case C_RIGHT_ONE_EM:
-	    _draw_hershey_stroke (vc, gc, dd,
-				  false, charsize * HERSHEY_EM, 0.0);
-	    break;
-
-	  case C_RIGHT_HALF_EM:
-	    _draw_hershey_stroke (vc, gc, dd,
-				  false, charsize * HERSHEY_EM / 2.0, 0.0);
-	    break;
-
-	  case C_RIGHT_QUARTER_EM:
-	    _draw_hershey_stroke (vc, gc, dd,
-				  false, charsize * HERSHEY_EM / 4.0, 0.0);
-	    break;
-
-	  case C_RIGHT_SIXTH_EM:
-	    _draw_hershey_stroke (vc, gc, dd,
-				  false, charsize * HERSHEY_EM / 6.0, 0.0);
-	    break;
-
-	  case C_RIGHT_EIGHTH_EM:
-	    _draw_hershey_stroke (vc, gc, dd,
-				  false, charsize * HERSHEY_EM / 8.0, 0.0);
-	    break;
-
-	  case C_LEFT_ONE_EM:
-	    _draw_hershey_stroke (vc, gc, dd,
-				  false, - charsize * HERSHEY_EM, 0.0);
-	    break;
-
-	  case C_LEFT_HALF_EM:
-	    _draw_hershey_stroke (vc, gc, dd,
-				  false, - charsize * HERSHEY_EM / 2.0, 0.0);
-	    break;
-
-	  case C_LEFT_QUARTER_EM:
-	    _draw_hershey_stroke (vc, gc, dd,
-				  false, - charsize * HERSHEY_EM / 4.0, 0.0);
-	    break;
-
-	  case C_LEFT_SIXTH_EM:
-	    _draw_hershey_stroke (vc, gc, dd,
-				  false, - charsize * HERSHEY_EM / 6.0, 0.0);
-	    break;
-
-	  case C_LEFT_EIGHTH_EM:
-	    _draw_hershey_stroke (vc, gc, dd,
-				  false, - charsize * HERSHEY_EM / 8.0, 0.0);
-	    break;
-
-	    /* unrecognized control code, punt */
-	  default:
-	    break;
-	  }
-
-      else
-	/* yow, an actual font character!  Several possibilities: could be
-	   a composite (accented) character, could be a small Kana, or
-	   could be a garden-variety character. */
-	{
-	  int raw_fontnum;
-	  int glyphnum;		/* glyph in Hershey array */
-	  int char_glyphnum, accent_glyphnum; /* for composite chars */
-	  int char_width, accent_width; /* for composite chars */
-	  const unsigned char *char_glyph, *accent_glyph;
-	  unsigned char composite, character = '\0', accent = '\0' /* -Wall */;
-	  bool oblique, small_kana = false;
-
-	  /* compute index of font, in font table in g_fontdb.c */
-	  raw_fontnum = (c >> FONT_SHIFT) & ONE_BYTE;
-	  /* shear font?  (for HersheySans-Oblique, etc.) */
-	  oblique = _hershey_font_info[raw_fontnum].obliquing;
-
-	  c &= ~FONT_SPEC;	/* extract character proper */
-	  glyphnum = (_hershey_font_info[raw_fontnum].chars)[c];
-
-	  if (glyphnum & KS) /* a small kana? */
-	    {
-	      glyphnum -= KS;
-	      small_kana = true;
-	    }
-
-	  switch (glyphnum)
-	    {
-	      /* special case: this is a composite (accented) character;
-		 search font table in g_fontdb.c for it */
-	    case ACC0:
-	    case ACC1:
-	    case ACC2:
-	      composite = (unsigned char)c;
-	      if (_composite_char (&composite, &character, &accent))
-		{
-		  char_glyphnum =
-		    (_hershey_font_info[raw_fontnum].chars)[character];
-		  accent_glyphnum =
-		    (_hershey_font_info[raw_fontnum].chars)[accent];
-		}
-	      else
-		{		/* hope this won't happen */
-		  char_glyphnum = UNDE;
-		  accent_glyphnum = 0;
-		}
-	      char_glyph =
-		(const unsigned char *)_occidental_hershey_glyphs[char_glyphnum];
-	      accent_glyph =
-		(const unsigned char *)_occidental_hershey_glyphs[accent_glyphnum];
-
-	      if (*char_glyph != '\0') /* nonempty glyph */
-		/* 1st two chars are bounds, in Hershey units */
-		char_width = (int)char_glyph[1] - (int)char_glyph[0];
-	      else
-		char_width = 0;
-
-	      if (*accent_glyph != '\0') /* nonempty glyph */
-		/* 1st two chars are bounds, in Hershey units */
-		accent_width = (int)accent_glyph[1] - (int)accent_glyph[0];
-	      else
-		accent_width = 0;
-
-	      /* draw the character */
-	      if (line_width_type != 1)
-	      {
-		  gc->lwd = HERSHEY_LINE_WIDTH_TO_LWD (HERSHEY_STROKE_WIDTH);
-		  line_width_type = 1;
-		}
-	      _draw_hershey_glyph (vc, gc, dd,
-				   char_glyphnum, charsize,
-				   OCCIDENTAL, oblique);
-	      /* back up to draw accent */
-	      _draw_hershey_penup_stroke (vc, gc, dd,
-					  -0.5 * (double)char_width
-					  -0.5 * (double)accent_width,
-					  0.0, charsize, oblique);
-
-	      /* repositioning for uppercase and uppercase italic */
-	      if (glyphnum == ACC1)
-		_draw_hershey_penup_stroke (vc, gc, dd,
-					    0.0,
-					    (double)(ACCENT_UP_SHIFT),
-					    charsize, oblique);
-	      else if (glyphnum == ACC2)
-		_draw_hershey_penup_stroke (vc, gc, dd,
-					    (double)(ACCENT_RIGHT_SHIFT),
-					    (double)(ACCENT_UP_SHIFT),
-					    charsize, oblique);
-
-	      /* draw the accent */
-	      _draw_hershey_glyph (vc, gc, dd,
-				   accent_glyphnum, charsize,
-				   OCCIDENTAL, oblique);
-
-	      /* undo special repositioning if any */
-	      if (glyphnum == ACC1)
-		_draw_hershey_penup_stroke (vc, gc, dd,
-					    0.0,
-					    -(double)(ACCENT_UP_SHIFT),
-					    charsize, oblique);
-	      else if (glyphnum == ACC2)
-		_draw_hershey_penup_stroke (vc, gc, dd,
-					    -(double)(ACCENT_RIGHT_SHIFT),
-					    -(double)(ACCENT_UP_SHIFT),
-					    charsize, oblique);
-
-	      /* move forward, to end composite char where we should */
-	      _draw_hershey_penup_stroke (vc, gc, dd,
-					  0.5 * (double)char_width
-					  -0.5 * (double)accent_width,
-					  0.0, charsize, oblique);
-	      break;
-
-	      /* not a composite (accented) character; just an ordinary
-		 glyph from occidental+Kana array (could be a Kana, in
-		 particular, could be a small Kana) */
-	    default:
-	      if (small_kana)
-		{
-		  int kana_width;
-		  const unsigned char *kana_glyph;
-		  double shift = 0.5 * (1.0 - (SMALL_KANA_SIZE));
-
-		  kana_glyph =
-		    (const unsigned char *)_occidental_hershey_glyphs[glyphnum];
-		  kana_width = (int)kana_glyph[1] - (int)kana_glyph[0];
-
-		  /* draw small Kana, preceded and followed by a penup
-		     stroke in order to traverse the full width of an
-		     ordinary Kana */
-		  _draw_hershey_penup_stroke (vc, gc, dd,
-					      shift * (double)kana_width,
-					      0.0, charsize, oblique);
-		  if (line_width_type != 2)
-		    {
-			gc->lwd = HERSHEY_LINE_WIDTH_TO_LWD (HERSHEY_STROKE_WIDTH);
-		      line_width_type = 2;
-		    }
-		  _draw_hershey_glyph (vc, gc, dd,
-				       glyphnum,
-				       (SMALL_KANA_SIZE) * charsize,
-				       OCCIDENTAL, oblique);
-		  _draw_hershey_penup_stroke (vc, gc, dd,
-					      shift * (double)kana_width,
-					      0.0, charsize, oblique);
-		}
-	      else
-		/* whew! just an ordinary glyph from the occidental array
-		   (could be a Kana however, since they're confusingly
-		   placed in that array, at the end) */
-		{
-		  if (glyphnum >= BEGINNING_OF_KANA)
-		    {
-		      if (line_width_type != 2)
-			{
-			gc->lwd = HERSHEY_LINE_WIDTH_TO_LWD (HERSHEY_ORIENTAL_STROKE_WIDTH);
-			  line_width_type = 2;
-			}
-		    }
-		  else
-		      if (line_width_type != 1)
-			{
-			gc->lwd = HERSHEY_LINE_WIDTH_TO_LWD (HERSHEY_STROKE_WIDTH);
-			  line_width_type = 1;
-			}
-		_draw_hershey_glyph (vc, gc, dd,
-				     glyphnum, charsize,
-				     OCCIDENTAL, oblique);
-		}
-	      break;
-	    } /* end of case statement that switches based on glyphnum */
-
-	} /* end of font character case */
-
-    } /* end of loop through unsigned shorts in the codestring */
-
-  return;
-}
-
-/* retrieve the two elements of a composite character from the table in
-   g_fontdb.c */
-static bool _composite_char (unsigned char *composite,
-			     unsigned char *character,
-			     unsigned char *accent)
-{
-  const struct plHersheyAccentedCharInfoStruct *compchar = _hershey_accented_char_info;
-  bool found = false;
-  unsigned char given = *composite;
-
-  while (compchar->composite)
-    {
-      if (compchar->composite == given)
-	{
-	  found = true;
-	  /* return char and accent via pointers */
-	  *character = compchar->character;
-	  *accent = compchar->accent;
-	}
-      compchar++;
-    }
-
-  return found;
-}
-
-#include <R_ext/Rdynload.h>
-void R_init_vfonts(DllInfo *dll)
-{
-    R_GE_setVFontRoutines(R_VF_VStrWidth, R_VF_VStrHeight, R_VF_VText);
-}
diff --git a/src/modules/vfonts/g_cntrlify.c b/src/modules/vfonts/g_cntrlify.c
deleted file mode 100644
index 6cdf34e..0000000
--- a/src/modules/vfonts/g_cntrlify.c
+++ /dev/null
@@ -1,714 +0,0 @@
-/* PAUL MURRELL
-   This is from the GNU plotutils libplot-2.3 distribution
-   All references to HAVE_PROTOS removed
-   All references to "plotter" replaced with references to "GEDevDesc"
-*/
-
-/* <UTF8-FIXME> This assumes single-byte encoding */
-
-/* _controlify() converts a "label" (i.e. a character string), which may
-   contain troff-like escape sequences, into a string of unsigned shorts.
-   The possible troff-like escape sequences are listed in g_cntrlify.h.
-
-   This conversion is to facilitate rendering.  _controlify() is called by
-   alabel(), and the converted label is rendered by _alabel_standard(),
-   _alabel_stroke(), or _alabel_device(), depending on what sort of font is
-   currently selected.  See g_alabel.c (_controlify() is called by
-   labelwidth() too).
-
-   If the currently selected font is a font with ISO-Latin-1 encoding, the
-   valid escape sequences include escape sequences for the non-ASCII
-   ISO-Latin-1 characters.  Also allowed are such escape sequences as \f0,
-   \f1, \f2, \f3, \f4, etc., which switch among the various fonts in the
-   current typeface:
-
-	\f1	Switch to font #1, basic
-	\f2	Switch to font #2, italic
-	\f3	Switch to font #3, bold
-	\f4	Switch to font #4, bold italic
-	\f0	Switch to font #0, symbol (including Greek characters)
-
-   \fP switches to the previously used font (there is a depth-1 stack,
-   i.e. only one previous font is remembered, as in troff).
-
-   All typefaces include at least two fonts: fonts #0 and #1.  Some may
-   include more than the above five.  Each unsigned short in the converted
-   string is really an annotated character: the low byte is the character,
-   and the high byte is the font number.
-
-   Besides font annotations, the controlified string may include control
-   codes (unsigned shorts with particular bit patterns in their high
-   bytes), which are produced by the escape sequences:
-
-	\sp  start superscript
-	\ep  end superscript
-
-	\sb  start subscript
-	\eb  end subscript
-
-	\mk  mark location
-	\rt  return to mark
-	     [useful e.g. for underlining, and filling square roots]
-
-    There are also control codes for horizontal shifts.  \r1, \r2, \r4,
-    \r6, \r8, \r^ will produce control codes that will shift right by 1 em,
-    1/2 em, 1/4 em, 1/6 em, 1/8 em, 1/12 em, respectively.  \l1, \l2, \l4,
-    \l6, \l8, \l^ are similar.
-
-    The string of unsigned shorts, which is returned, is allocated with
-    malloc and may be freed later. */
-
-/* PAUL MURRELL
-   sys-defines.h not used
-*/
-/* #include "sys-defines.h" */
-
-/* PAUL MURRELL
-   extern.h renamed g_extern.h
-*/
-#include "g_extern.h"
-#include "g_control.h"
-#include "g_cntrlify.h"
-#include "g_jis.h"
-
-/* these two array lengths must agree with values in file g_her_glyph.c */
-#define NUM_OCCIDENTAL_HERSHEY_GLYPHS 4400
-#define NUM_ORIENTAL_HERSHEY_GLYPHS 5500
-
-/* PAUL MURRELL
-   Added typeface and fontindex arguments
-*/
-
-attribute_hidden
-unsigned short * _controlify (pGEDevDesc dd, const unsigned char *src,
-			      int typeface, int fontindex)
-{
-  unsigned short *dest;
-  unsigned char c, d;
-  unsigned char esc[3];
-  int j = 0;
-  int raw_fontnum, raw_symbol_fontnum;
-  unsigned short fontword, symbol_fontword;
-
-  /* note: string length can grow by a factor of 6, because a single
-     printable character can be mapped to a sequence of unsigned shorts, of
-     length up to 6 (see comment below) */
-  /* PAUL MURRELL
-     replace _plot_xmalloc with R_alloc
-  */
-  dest = (unsigned short *) R_alloc (6 * strlen ((char *)src) + 1,
-				     sizeof(unsigned short));
-
-  /* PAUL MURRELL
-     only for Hershey fonts so removed switch ...
-  */
-      raw_fontnum = _hershey_typeface_info[typeface].fonts[fontindex];
-      raw_symbol_fontnum = _hershey_typeface_info[typeface].fonts[0];
-  /* Of the following two words, `fontword' is updated whenever an escape
-     sequence like \f0, \f1, \f2 etc. is seen, since raw_fontnum is itself
-     updated.  But `symbol_fontword' is fixed */
-  fontword = ((unsigned short)raw_fontnum) << FONT_SHIFT;
-  symbol_fontword = ((unsigned short)raw_symbol_fontnum) << FONT_SHIFT;
-
-  while (*src != (unsigned char)'\0')
-    {
-      /* If EUC, check first for high bit and process two-byte characters
-	 separately.  This approach is awkward (we duplicate a lot of code
-	 here, which appears elsewhere below). */
-
-      if ((raw_fontnum == HERSHEY_EUC)
-	  && (*src & 0x80) && (*(src + 1) & 0x80))
-	{
-	  unsigned char jis_row = *src & ~(0x80);
-	  unsigned char jis_col = *(src + 1) & ~(0x80);
-
-	  if (GOOD_JIS_INDEX(jis_row, jis_col))
-	    {
-	      int jis_glyphindex = 256 * jis_row + jis_col;
-
-	      if (jis_glyphindex >= BEGINNING_OF_KANJI)
-		/* in Kanji range, so check if we have it */
-		{
-#ifndef NO_KANJI
-		  const struct kanjipair *kanji = _builtin_kanji_glyphs;
-		  bool matched = false;
-
-		  while (kanji->jis != 0)
-		    {
-		      if (jis_glyphindex == kanji->jis)
-			{
-			  matched = true;
-			  break;
-			}
-		      kanji++;
-		    }
-		  if (matched)
-		    {
-		      dest[j++] = RAW_ORIENTAL_HERSHEY_GLYPH | (kanji->nelson);
-		      src += 2;
-		      continue;	/* back to top of while loop */
-		    }
-		  else		/* a Kanji we don't have */
-		    {
-		      /* render as standard `undefined character' glyph */
-		      dest[j++] = RAW_HERSHEY_GLYPH | UNDE;
-		      src += 2;
-		      continue;	/* back to top of while loop */
-		    }
-#endif /* not NO_KANJI */
-		}
-	      else
-		/* not in Kanji range, so look for it in char table */
-		{
-		  const struct jis_entry *char_mapping = _builtin_jis_chars;
-		  bool matched = false;
-
-		  while (char_mapping->jis != 0)
-		    {
-		      if (jis_glyphindex == char_mapping->jis)
-			{
-			  matched = true;
-			  break;
-			}
-		      char_mapping++;
-		    }
-		  if (matched)
-		    /* the entry in the character table maps the JIS
-		       character to a character (in 0..255 range) in
-		       one of the fonts in the master table in g_fontdb.c */
-		    {
-		      int fontnum = char_mapping->font;
-		      unsigned short charnum = char_mapping->charnum;
-
-		      if (charnum & RAW_HERSHEY_GLYPH)
-			/* a raw Hershey glyph, not in any font */
-			dest[j++] = RAW_HERSHEY_GLYPH | charnum;
-		      else
-			/* a character in one of the fonts in g_fontdb.c */
-			dest[j++] = (((unsigned short)fontnum) << FONT_SHIFT) | charnum;
-		      src += 2;
-		      continue; /* back to top of while loop */
-		    }
-		  else	/* a character we don't have */
-		    {
-		      /* render as standard `undefined character' glyph */
-		      dest[j++] = RAW_HERSHEY_GLYPH | UNDE;
-		      src += 2;
-		      continue;	/* back to top of while loop */
-		    }
-		}
-	    }
-	  else
-	    /* JIS index is OOB */
-	    {
-	      src += 2;
-	      continue;		/* back to top of while loop */
-	    }
-	}
-
-      /* if current font is Hershey, first try to match each ligature
-	 pattern (no ligatures supported in non-Hershey fonts) */
-      if (1) /* _plotter->drawstate->font_type == F_HERSHEY) */
-	{
-	  int i;
-	  bool matched = false;
-
-	  for (i = 0; i < NUM_LIGATURES; i++)
-	    if ((_ligature_tbl[i].font == raw_fontnum)
-		&& (strncmp ((char *)src, _ligature_tbl[i].from,
-			     strlen (_ligature_tbl[i].from)) == 0))
-	      {
-		matched = true;
-		break;
-	      }
-
-	  if (matched)
-	    {
-	      dest[j++] = fontword | (unsigned short)_ligature_tbl[i].byte;
-	      src += strlen (_ligature_tbl[i].from);
-	      continue;		/* back to top of while loop */
-	    }
-	}
-
-      c = *(src++);		/* no ligature, so get single new char */
-      if (c != (unsigned char)'\\') /* ordinary char, may pass through */
-	{
-	  /* if current font is an ISO-Latin-1 Hershey font ... */
-	    if (1 /* _plotter->drawstate->font_type == F_HERSHEY */
-	      && _hershey_font_info[raw_fontnum].iso8859_1)
-	    {
-	      int i;
-	      bool matched = false;
-
-	      /* check if this is a `raised' ISO-Latin-1 character */
-	      for (i = 0; i < NUM_RAISED_CHARS; i++)
-		if (c == _raised_char_tbl[i].from)
-		  {
-		    matched = true;
-		    break;
-		  }
-	      if (matched)	/* it's a raised character */
-		{
-		  /* map to string of unsigned shorts, length 3 or 6:
-		     `begin superscript' control code, [`mark'
-		     control code,] replacement char, [`return'
-		     control code, underline,] `end superscript' */
-		  dest[j++] =
-		    (unsigned short) (CONTROL_CODE | C_BEGIN_SUPERSCRIPT);
-		  if (_raised_char_tbl[i].underscored) /* also underline */
-		    {
-		      dest[j++] =
-			(unsigned short) (CONTROL_CODE | C_PUSH_LOCATION);
-		      dest[j++] =
-			fontword | (unsigned short)_raised_char_tbl[i].to;
-		      dest[j++] =
-			(unsigned short) (CONTROL_CODE | C_POP_LOCATION);
-		      /* select appropriate HersheySymbol font */
-		      dest[j++] =
-			symbol_fontword | (unsigned short)VECTOR_SYMBOL_FONT_UNDERSCORE;
-		    }
-		  else	/* just print raised char, no underline */
-		    dest[j++] =
-		      fontword | (unsigned short)_raised_char_tbl[i].to;
-
-		  dest[j++] =
-		    (unsigned short) (CONTROL_CODE | C_END_SUPERSCRIPT);
-
-		  continue; /* back to top of while loop */
-		}
-
-	      /* since current font is an ISO-Latin-1 Hershey font, also
-		 check if this char should be deligatured */
-	      for (i = 0; i < NUM_DELIGATURED_CHARS; i++)
-		if (c == _deligature_char_tbl[i].from)
-		  {
-		    matched = true;
-		    break;
-		  }
-	      if (matched)
-		{
-		  if (_deligature_char_tbl[i].except_font != raw_fontnum)
-		    {
-		      dest[j++] = fontword
-			| (unsigned short)_deligature_char_tbl[i].to[0];
-		      dest[j++] = fontword
-			| (unsigned short)_deligature_char_tbl[i].to[1];
-		      continue;	/* back to top of while loop */
-		    }
-		}
-	    }
-
-	  /* didn't do anything special, so just pass the character thru */
-	  dest[j++] = fontword | (unsigned short)c;
-	  continue;		/* back to top of while loop */
-	}
-      else			/* character is a backslash */
-	{
-	  int i;
-
-	  c = *(src++);		/* grab next character */
-	  if (c == (unsigned char)'\0')	/* ASCII NUL ? */
-	    {
-	      dest[j++] = fontword | (unsigned short)'\\';
-	      break;		/* string terminated with a backslash */
-	    }
-
-	  if (c == (unsigned char)'\\')
-	    {
-	      dest[j++] = fontword | (unsigned short)'\\';
-	      dest[j++] = fontword | (unsigned short)'\\';
-	      continue;		/* saw \\, leave as is */
-	    }
-
-	  d = *(src++);
-	  if (d == (unsigned char)'\0')
-	    {
-	      dest[j++] = fontword | (unsigned short)'\\';
-	      dest[j++] = fontword | (unsigned short)c;
-	      break;		/* string terminated with \c */
-	    }
-
-	  esc[0] = c;
-	  esc[1] = d;
-	  esc[2] = (unsigned char)'\0';	/* have an escape sequence */
-
-	  /* is this an escape seq. (e.g. \#H0001) for a raw Hershey glyph? */
-	  if (1 /* _plotter->drawstate->font_type == F_HERSHEY */
-	      && esc[0] == '#' && esc[1] == 'H'
-	      && src[0] >= '0' && src[0] <= '9'
-	      && src[1] >= '0' && src[1] <= '9'
-	      && src[2] >= '0' && src[2] <= '9'
-	      && src[3] >= '0' && src[3] <= '9')
-	    {
-	      int glyphindex;
-
-	      glyphindex = (src[3] - '0') + 10 * (src[2] - '0')
-		+ 100 * (src[1] - '0') + 1000 * (src[0] - '0');
-	      if (glyphindex < NUM_OCCIDENTAL_HERSHEY_GLYPHS)
-		{
-		  dest[j++] = RAW_HERSHEY_GLYPH | glyphindex;
-		  src += 4;
-		  continue;	/* back to top of while loop */
-		}
-	    }
-
-#ifndef NO_KANJI
-	  /* is this an escape seq. (e.g. \#N0001) for a raw Japanese
-	     Hershey glyph (Kanji), as numbered in Nelson's dictionary? */
-	  if (1 /* _plotter->drawstate->font_type == F_HERSHEY */
-	      && esc[0] == '#' && esc[1] == 'N'
-	      && src[0] >= '0' && src[0] <= '9'
-	      && src[1] >= '0' && src[1] <= '9'
-	      && src[2] >= '0' && src[2] <= '9'
-	      && src[3] >= '0' && src[3] <= '9')
-	    {
-	      int glyphindex;
-
-	      glyphindex = (src[3] - '0') + 10 * (src[2] - '0')
-		+ 100 * (src[1] - '0') + 1000 * (src[0] - '0');
-	      if (glyphindex < NUM_ORIENTAL_HERSHEY_GLYPHS)
-		{
-		  dest[j++] = RAW_ORIENTAL_HERSHEY_GLYPH | glyphindex;
-		  src += 4;
-		  continue;	/* back to top of while loop */
-		}
-	    }
-#endif /* not NO_KANJI */
-
-	  /* is this an escape seq. (e.g. \#J0001) for a raw Japanese
-	     Hershey glyph (JIS numbering, in hex)? */
-	  if (1 /* _plotter->drawstate->font_type == F_HERSHEY */
-	      && esc[0] == '#' && esc[1] == 'J'
-	      && ((src[0] >= '0' && src[0] <= '9')
-		  || (src[0] >= 'a' && src[0] <= 'f')
-		  || (src[0] >= 'A' && src[0] <= 'F'))
-	      && ((src[1] >= '0' && src[1] <= '9')
-		  || (src[1] >= 'a' && src[1] <= 'f')
-		  || (src[1] >= 'A' && src[1] <= 'F'))
-	      && ((src[2] >= '0' && src[2] <= '9')
-		  || (src[2] >= 'a' && src[2] <= 'f')
-		  || (src[2] >= 'A' && src[2] <= 'F'))
-	      && ((src[3] >= '0' && src[3] <= '9')
-		  || (src[3] >= 'a' && src[3] <= 'f')
-		  || (src[3] >= 'A' && src[3] <= 'F')))
-	    {
-	      int jis_glyphindex;
-	      int i, hexnum[4];
-	      int jis_row, jis_col;
-
-	      for (i = 0; i < 4; i++)
-		if (src[i] >= 'a' && src[i] <= 'f')
-		  hexnum[i] = 10 + src[i] - 'a';
-		else if (src[i] >= 'A' && src[i] <= 'F')
-		  hexnum[i] = 10 + src[i] - 'A';
-		else /* a decimal digit */
-		  hexnum[i] = src[i] - '0';
-
-	      jis_glyphindex = (hexnum[3] + 16 * hexnum[2]
-				+ 256 * hexnum[1] + 4096 * hexnum[0]);
-	      jis_row = hexnum[1] + 16 * hexnum[0];
-	      jis_col = hexnum[3] + 16 * hexnum[2];
-
-	      if (GOOD_JIS_INDEX(jis_row, jis_col))
-		{
-		  if (jis_glyphindex >= BEGINNING_OF_KANJI)
-		    /* in Kanji range, so check if we have it */
-		    {
-#ifndef NO_KANJI
-		      const struct kanjipair *kanji = _builtin_kanji_glyphs;
-		      bool matched = false;
-
-		      while (kanji->jis != 0)
-			{
-			  if (jis_glyphindex == kanji->jis)
-			    {
-			      matched = true;
-			      break;
-			    }
-			  kanji++;
-			}
-		      if (matched)
-			{
-			  dest[j++] = RAW_ORIENTAL_HERSHEY_GLYPH | (kanji->nelson);
-			  src += 4;
-			  continue;	/* back to top of while loop */
-			}
-		      else		/* a Kanji we don't have */
-			{
-			  /* render as standard `undefined character' glyph */
-			  dest[j++] = RAW_HERSHEY_GLYPH | UNDE;
-			  src += 4;
-			  continue;	/* back to top of while loop */
-			}
-#endif /* not NO_KANJI */
-		    }
-		  else
-		    /* not in Kanji range, so look for it in char table */
-		    {
-		      const struct jis_entry *char_mapping = _builtin_jis_chars;
-		      bool matched = false;
-
-		      while (char_mapping->jis != 0)
-			{
-			  if (jis_glyphindex == char_mapping->jis)
-			    {
-			      matched = true;
-			      break;
-			    }
-			  char_mapping++;
-			}
-		      if (matched)
-			/* the entry in the character table maps the JIS
-			   character to a character (in 0..255 range) in
-			   one of the fonts in the master table in g_fontdb.c*/
-			{
-			  int fontnum = char_mapping->font;
-			  unsigned short charnum = char_mapping->charnum;
-
-			  if (charnum & RAW_HERSHEY_GLYPH)
-			    /* a raw Hershey glyph, not in any font */
-			    dest[j++] = RAW_HERSHEY_GLYPH | charnum;
-			  else
-			    /* a character in one of the fonts in g_fontdb.c */
-			    dest[j++] = (((unsigned short)fontnum) << FONT_SHIFT) | charnum;
-			  src += 4;
-			  continue; /* back to top of while loop */
-			}
-		      else	/* a character we don't have */
-			{
-			  /* render as standard `undefined character' glyph */
-			  dest[j++] = RAW_HERSHEY_GLYPH | UNDE;
-			  src += 4;
-			  continue;	/* back to top of while loop */
-			}
-		    }
-		}
-	    }
-
-	  {
-	    bool matched = false;
-
-	    /* is this an escape seq. for a control code? */
-	    for (i = 0; i < NUM_CONTROLS; i++)
-	      if (strcmp ((char *)esc, _control_tbl[i]) == 0)
-		{
-		  matched = true;
-		  break;
-		}
-	    if (matched)		/* it's a control code */
-	      {
-		dest[j++] = CONTROL_CODE | i;
-		continue;	/* back to top of while loop */
-	      }
-	  }
-
-	  /* if current font is an ISO-Latin-1 Hershey font, is this an
-	     escape sequence for an 8-bit (non-ASCII) char, which due to
-	     nonexistence should be deligatured? */
-	  if (1 /* _plotter->drawstate->font_type == F_HERSHEY */
-	      && _hershey_font_info[raw_fontnum].iso8859_1)
-	    {
-	      int i;
-	      bool matched = false;
-
-	      for (i = 0; i < NUM_DELIGATURED_ESCAPES; i++)
-		if (strcmp ((char *)esc, _deligature_escape_tbl[i].from) == 0)
-		  {
-		    matched = true;
-		    break;
-		  }
-	      if (matched)
-		{
-		  if (_deligature_escape_tbl[i].except_font != raw_fontnum)
-		    {
-		      dest[j++] = fontword
-			| (unsigned short)_deligature_escape_tbl[i].to[0];
-		      dest[j++] = fontword
-			| (unsigned short)_deligature_escape_tbl[i].to[1];
-
-		      continue;	/* back to top of while loop */
-		    }
-		}
-	    }
-
-	  /* if the current font is an ISO-Latin-1 font (no matter whether
-	     font is a a Hershey font, a PS or PCL/Stick font, or a
-	     device-specific font for which we have no table entry), is
-	     this an escape seq. for an 8-bit (non-ASCII) ISO8859-1 char?  */
-
-	  /* PAUL MURRELL
-	     Only concerned with Hershey fonts
-	  */
-/*
-	  if ((_plotter->drawstate->font_type == F_POSTSCRIPT
-	       && _ps_font_info[raw_fontnum].iso8859_1)
-	      || (_plotter->drawstate->font_type == F_HERSHEY
-		  && _hershey_font_info[raw_fontnum].iso8859_1)
-	      || (_plotter->drawstate->font_type == F_PCL
-		  && _pcl_font_info[raw_fontnum].iso8859_1)
-	      || (_plotter->drawstate->font_type == F_STICK
-		  && _stick_font_info[raw_fontnum].iso8859_1)
-	      || (_plotter->drawstate->font_type == F_OTHER
-		  && _plotter->drawstate->font_is_iso8859_1
-		  && raw_fontnum == 1))
-*/
-	  if (1 /* _plotter->drawstate->font_type == F_HERSHEY */
-	      && _hershey_font_info[raw_fontnum].iso8859_1)
-	    {
-	      bool matched = false;
-
-	      for (i = 0; i < NUM_ISO_ESCAPES; i++)
-		if (strcmp ((char *)esc, _iso_escape_tbl[i].string) == 0)
-		  {
-		    matched = true;
-		    break;
-		  }
-	      if (matched)	/* it's an 8-bit ISO8859-1 character */
-		{
-		  /* certain such characters are drawn in the Hershey fonts
-		     as superscripts */
-		    if (1) /* _plotter->drawstate->font_type == F_HERSHEY) */
-		    {
-		      int k;
-		      bool matched2 = false;
-
-		      /* check if this is a `raised' ISO-Latin-1 character */
-		      for (k = 0; k < NUM_RAISED_CHARS; k++)
-			if (_iso_escape_tbl[i].byte == _raised_char_tbl[k].from)
-			  {
-			    matched2 = true;
-			    break;
-			  }
-		      if (matched2)	/* it's a raised character */
-			{
-			  /* map to string of unsigned shorts, length 3 or 6:
-			     `begin superscript' control code, [`mark'
-			     control code,] replacement char, [`return'
-			     control code, underline,] `end superscript' */
-			  dest[j++] =
-			    (unsigned short) (CONTROL_CODE | C_BEGIN_SUPERSCRIPT);
-			  if (_raised_char_tbl[k].underscored) /* also underline */
-			    {
-			      dest[j++] =
-				(unsigned short) (CONTROL_CODE | C_PUSH_LOCATION);
-			      dest[j++] =
-				fontword | (unsigned short)_raised_char_tbl[k].to;
-			      dest[j++] =
-				(unsigned short) (CONTROL_CODE | C_POP_LOCATION);
-			      /* select appropriate HersheySymbol font */
-			      dest[j++] =
-				symbol_fontword | (unsigned short)VECTOR_SYMBOL_FONT_UNDERSCORE;
-			    }
-			  else	/* just print raised char, no underline */
-			    {
-			      dest[j++] =
-				fontword | (unsigned short)_raised_char_tbl[k].to;
-			    }
-
-			  dest[j++] =
-			    (unsigned short) (CONTROL_CODE | C_END_SUPERSCRIPT);
-
-			  continue; /* back to top of while loop */
-			}
-		    }
-
-		  /* won't draw this char as a superscript; just pass thru */
-		  dest[j++] = fontword | (unsigned short)(_iso_escape_tbl[i].byte);
-		  continue;	/* back to top of while loop */
-		}
-	    }
-
-	  /* is this an escape seq. for a `special' (non-ISO, non-Symbol)
-	     Hershey glyph?  Such glyphs include astronomical signs, and
-	     `final s'. */
-	  if (1) /* _plotter->drawstate->font_type == F_HERSHEY) */
-	    {
-	      bool matched = false;
-
-	      for (i = 0; i < NUM_SPECIAL_ESCAPES; i++)
-		if (strcmp ((char *)esc, _special_escape_tbl[i].string) == 0)
-		  {
-		    matched = true;
-		    break;
-		  }
-	      if (matched)	/* it's a special character */
-		{
-		  /* "\s-" is special; yields character in current font */
-		  if (_special_escape_tbl[i].byte == FINAL_LOWERCASE_S)
-		  dest[j++] =
-		    fontword | (unsigned short)(_special_escape_tbl[i].byte);
-		  else
-		  /* we select symbol font of typeface, in which we've
-		     stored all other special characters */
-		    dest[j++] = symbol_fontword | (unsigned short)(_special_escape_tbl[i].byte);
-		  continue;	/* back to top of while loop */
-		}
-	    }
-
-	  {
-	    bool matched = false;
-
-	    /* Irrespective of font type, is this an escape seq. for a char
-	       in the font's corresponding symbol font? */
-	    for (i = 0; i < NUM_SYMBOL_ESCAPES; i++)
-	      if (strcmp (_symbol_escape_tbl[i].string, "NO_ABBREV") != 0
-		  && strcmp ((char *)esc, _symbol_escape_tbl[i].string) == 0)
-		{
-		  matched = true;
-		  break;
-		}
-	    if (matched)	/* it's a character in the symbol font */
-	      {
-		/* select symbol font by OR'ing in the symbol fontword */
-		dest[j++] = symbol_fontword | (unsigned short)(_symbol_escape_tbl[i].byte);
-		continue;	/* back to top of while loop */
-	      }
-	  }
-
-	  /* Gross kludge.  In the non-Hershey fonts we handle the "\rn"
-	     control sequence in a painful way.  For a PS font we map it
-	     into (1) a left shift, (2) the `radicalex' character in the PS
-	     Symbol font, and (3) a right shift.  Shift distances are taken
-	     from the bbox of the radicalex char, and are slightly larger
-	     than 0.5 em.  For a PCL font it's similar, but the shifts are
-	     much smaller.  The reason it's different for PCL is that the
-	     PCL radicalex character is different from the PS radicalex
-	     character: the overbar is not displaced.  Possibly someone at
-	     HP made a mistake while reimplementing the Adobe Symbol font
-	     for PCL 5?
-
-	     We don't implement \rn for Stick fonts, because they have
-	     no associated symbol font. */
-
-	  /* couldn't match; unknown escape seq., so pass through unchanged */
-	  dest[j++] = fontword | (unsigned short)'\\';
-	  dest[j++] = fontword | (unsigned short)c;
-	  dest[j++] = fontword | (unsigned short)d;
-	}
-    }
-
-  dest[j] = (unsigned short)'\0';   /* terminate string */
-
-  return dest;
-}
-
-#ifdef UNUSED
-int
-#ifdef _HAVE_PROTOS
-_codestring_len (const unsigned short *codestring)
-#else
-_codestring_len (codestring)
-     const unsigned short *codestring;
-#endif
-{
-  int i = 0;
-
-  while (*codestring)
-    {
-      i++;
-      codestring++;
-    }
-
-  return i;
-}
-#endif
diff --git a/src/nmath/Makefile.in b/src/nmath/Makefile.in
index 9bd6dd5..2ccc888 100644
--- a/src/nmath/Makefile.in
+++ b/src/nmath/Makefile.in
@@ -50,7 +50,7 @@ SOURCES = \
 ## </NOTE>
 DEPENDS = $(SOURCES:.c=.d)
 OBJECTS = $(SOURCES:.c=.o)
-HEADERS = bessel.h dpq.h nmath.h
+HEADERS = bessel.h dpq.h nmath.h nmath2.h
 
 distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
 DISTFILES = Makefile.in Makefile.win $(SOURCES) $(HEADERS)
@@ -72,8 +72,8 @@ R: Makedeps
 	@$(MAKE) libnmath.a
 
 libnmath.a: $(OBJECTS)
-	rm -rf $@
-	$(AR) cr $@ $(OBJECTS)
+	@rm -rf $@
+	$(AR) -cr $@ $(OBJECTS)
 	$(RANLIB) $@
 
 mostlyclean: clean
diff --git a/src/nmath/Makefile.win b/src/nmath/Makefile.win
index 446a209..491cb81 100644
--- a/src/nmath/Makefile.win
+++ b/src/nmath/Makefile.win
@@ -4,8 +4,8 @@ include ../gnuwin32/MkRules
 all: makeMakedeps libnmath.a
 
 ## there are headers and include files in this directory
-CPPFLAGS=-I. -I../include -DHAVE_CONFIG_H -DR_DLL_BUILD
-CSOURCES= \
+CPPFLAGS = -I. -I../include -DHAVE_CONFIG_H -DR_DLL_BUILD
+CSOURCES = \
 	mlutils.c \
 	d1mach.c i1mach.c \
 	fmax2.c fmin2.c fprec.c fround.c ftrunc.c \
@@ -40,12 +40,12 @@ CSOURCES= \
 	ptukey.c qtukey.c \
 	toms708.c wilcox.c \
 	signrank.c
-OBJS=$(CSOURCES:.c=.o)
+OBJS = $(CSOURCES:.c=.o)
 
 libnmath.a: $(OBJS)
 
 # Dependencies
-DEPS=$(CSOURCES:.c=.d)
+DEPS = $(CSOURCES:.c=.d)
 
 makeMakedeps: $(DEPS)
 	@$(RM) Makedeps
diff --git a/src/nmath/bd0.c b/src/nmath/bd0.c
index e955a93..38e8078 100644
--- a/src/nmath/bd0.c
+++ b/src/nmath/bd0.c
@@ -4,7 +4,7 @@
  *	October 23, 2000.
  *
  *  Merge in to R:
- *	Copyright (C) 2000, The R Core Team
+ *	Copyright (C) 2000-2014 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
@@ -18,7 +18,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  *
  *
  *  DESCRIPTION
diff --git a/src/nmath/bessel.h b/src/nmath/bessel.h
index f67512b..a5b0c80 100644
--- a/src/nmath/bessel.h
+++ b/src/nmath/bessel.h
@@ -14,7 +14,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  */
 
 /* Constants und Documentation that apply to several of the
diff --git a/src/nmath/bessel_i.c b/src/nmath/bessel_i.c
index 001223d..75e4e15 100644
--- a/src/nmath/bessel_i.c
+++ b/src/nmath/bessel_i.c
@@ -14,7 +14,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  */
 
 /*  DESCRIPTION --> see below */
@@ -74,7 +74,7 @@ double bessel_i(double x, double alpha, double expo)
     I_bessel(&x, &alpha, &nb, &ize, bi, &ncalc);
     if(ncalc != nb) {/* error input */
 	if(ncalc < 0)
-	    MATHLIB_WARNING4(_("bessel_i(%g): ncalc (=%ld) != nb (=%ld); alpha=%g. Arg. out of range?\n"),
+	    MATHLIB_WARNING4(_("bessel_i(%g): ncalc (=%d) != nb (=%d); alpha=%g. Arg. out of range?\n"),
 			     x, ncalc, nb, alpha);
 	else
 	    MATHLIB_WARNING2(_("bessel_i(%g,nu=%g): precision lost in result\n"),
@@ -119,7 +119,7 @@ double bessel_i_ex(double x, double alpha, double expo, double *bi)
     I_bessel(&x, &alpha, &nb, &ize, bi, &ncalc);
     if(ncalc != nb) {/* error input */
 	if(ncalc < 0)
-	    MATHLIB_WARNING4(_("bessel_i(%g): ncalc (=%ld) != nb (=%ld); alpha=%g. Arg. out of range?\n"),
+	    MATHLIB_WARNING4(_("bessel_i(%g): ncalc (=%d) != nb (=%d); alpha=%g. Arg. out of range?\n"),
 			     x, ncalc, nb, alpha);
 	else
 	    MATHLIB_WARNING2(_("bessel_i(%g,nu=%g): precision lost in result\n"),
diff --git a/src/nmath/bessel_j.c b/src/nmath/bessel_j.c
index 6d56bb7..c61ce27 100644
--- a/src/nmath/bessel_j.c
+++ b/src/nmath/bessel_j.c
@@ -1,6 +1,6 @@
 /*
  *  Mathlib : A C Library of Special Functions
- *  Copyright (C) 1998-2014 Ross Ihaka and the R Core team.
+ *  Copyright (C) 1998-2015 Ross Ihaka and 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
@@ -14,7 +14,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  */
 
 /*  DESCRIPTION --> see below */
@@ -36,6 +36,7 @@
 static void J_bessel(double *x, double *alpha, int *nb,
 		     double *b, int *ncalc);
 
+// unused now from R
 double bessel_j(double x, double alpha)
 {
     int nb, ncalc;
@@ -56,12 +57,16 @@ double bessel_j(double x, double alpha)
     if (alpha < 0) {
 	/* Using Abramowitz & Stegun  9.1.2
 	 * this may not be quite optimal (CPU and accuracy wise) */
-	return(bessel_j(x, -alpha) * cospi(alpha) +
-	       ((alpha == na) ? 0 :
-	       bessel_y(x, -alpha) * sinpi(alpha)));
+	return(((alpha - na == 0.5) ? 0 : bessel_j(x, -alpha) * cospi(alpha)) +
+	       ((alpha      == na ) ? 0 : bessel_y(x, -alpha) * sinpi(alpha)));
+    }
+    else if (alpha > 1e7) {
+	MATHLIB_WARNING(_("besselJ(x, nu): nu=%g too large for bessel_j() algorithm"),
+			alpha);
+	return ML_NAN;
     }
     nb = 1 + (int)na; /* nb-1 <= alpha < nb */
-    alpha -= (double)(nb-1);
+    alpha -= (double)(nb-1); // ==> alpha' in [0, 1)
 #ifdef MATHLIB_STANDALONE
     bj = (double *) calloc(nb, sizeof(double));
     if (!bj) MATHLIB_ERROR("%s", _("bessel_j allocation error"));
@@ -72,7 +77,7 @@ double bessel_j(double x, double alpha)
     J_bessel(&x, &alpha, &nb, bj, &ncalc);
     if(ncalc != nb) {/* error input */
       if(ncalc < 0)
-	MATHLIB_WARNING4(_("bessel_j(%g): ncalc (=%ld) != nb (=%ld); alpha=%g. Arg. out of range?\n"),
+	MATHLIB_WARNING4(_("bessel_j(%g): ncalc (=%d) != nb (=%d); alpha=%g. Arg. out of range?\n"),
 			 x, ncalc, nb, alpha);
       else
 	MATHLIB_WARNING2(_("bessel_j(%g,nu=%g): precision lost in result\n"),
@@ -87,8 +92,8 @@ double bessel_j(double x, double alpha)
     return x;
 }
 
-/* modified version of bessel_j that accepts a work array instead of
-   allocating one. */
+/* Called from R: modified version of bessel_j(), accepting a work array
+ * instead of allocating one. */
 double bessel_j_ex(double x, double alpha, double *bj)
 {
     int nb, ncalc;
@@ -106,16 +111,20 @@ double bessel_j_ex(double x, double alpha, double *bj)
     if (alpha < 0) {
 	/* Using Abramowitz & Stegun  9.1.2
 	 * this may not be quite optimal (CPU and accuracy wise) */
-	return(bessel_j_ex(x, -alpha, bj) * cospi(alpha) +
-	       ((alpha == na) ? 0 :
-		bessel_y_ex(x, -alpha, bj) * sinpi(alpha)));
+	return(((alpha - na == 0.5) ? 0 : bessel_j_ex(x, -alpha, bj) * cospi(alpha)) +
+	       ((alpha      == na ) ? 0 : bessel_y_ex(x, -alpha, bj) * sinpi(alpha)));
+    }
+    else if (alpha > 1e7) {
+	MATHLIB_WARNING(_("besselJ(x, nu): nu=%g too large for bessel_j() algorithm"),
+			alpha);
+	return ML_NAN;
     }
     nb = 1 + (int)na; /* nb-1 <= alpha < nb */
-    alpha -= (double)(nb-1);
+    alpha -= (double)(nb-1); // ==> alpha' in [0, 1)
     J_bessel(&x, &alpha, &nb, bj, &ncalc);
     if(ncalc != nb) {/* error input */
       if(ncalc < 0)
-	MATHLIB_WARNING4(_("bessel_j(%g): ncalc (=%ld) != nb (=%ld); alpha=%g. Arg. out of range?\n"),
+	MATHLIB_WARNING4(_("bessel_j(%g): ncalc (=%d) != nb (=%d); alpha=%g. Arg. out of range?\n"),
 			 x, ncalc, nb, alpha);
       else
 	MATHLIB_WARNING2(_("bessel_j(%g,nu=%g): precision lost in result\n"),
diff --git a/src/nmath/bessel_k.c b/src/nmath/bessel_k.c
index b9a9ef2..234ab74 100644
--- a/src/nmath/bessel_k.c
+++ b/src/nmath/bessel_k.c
@@ -15,7 +15,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  */
 
 /*  DESCRIPTION --> see below */
@@ -68,7 +68,7 @@ double bessel_k(double x, double alpha, double expo)
     K_bessel(&x, &alpha, &nb, &ize, bk, &ncalc);
     if(ncalc != nb) {/* error input */
       if(ncalc < 0)
-	MATHLIB_WARNING4(_("bessel_k(%g): ncalc (=%ld) != nb (=%ld); alpha=%g. Arg. out of range?\n"),
+	MATHLIB_WARNING4(_("bessel_k(%g): ncalc (=%d) != nb (=%d); alpha=%g. Arg. out of range?\n"),
 			 x, ncalc, nb, alpha);
       else
 	MATHLIB_WARNING2(_("bessel_k(%g,nu=%g): precision lost in result\n"),
@@ -105,7 +105,7 @@ double bessel_k_ex(double x, double alpha, double expo, double *bk)
     K_bessel(&x, &alpha, &nb, &ize, bk, &ncalc);
     if(ncalc != nb) {/* error input */
       if(ncalc < 0)
-	MATHLIB_WARNING4(_("bessel_k(%g): ncalc (=%ld) != nb (=%ld); alpha=%g. Arg. out of range?\n"),
+	MATHLIB_WARNING4(_("bessel_k(%g): ncalc (=%d) != nb (=%d); alpha=%g. Arg. out of range?\n"),
 			 x, ncalc, nb, alpha);
       else
 	MATHLIB_WARNING2(_("bessel_k(%g,nu=%g): precision lost in result\n"),
diff --git a/src/nmath/bessel_y.c b/src/nmath/bessel_y.c
index eef9155..1dcd21f 100644
--- a/src/nmath/bessel_y.c
+++ b/src/nmath/bessel_y.c
@@ -1,6 +1,6 @@
 /*
  *  Mathlib : A C Library of Special Functions
- *  Copyright (C) 1998-2014 Ross Ihaka and the R Core team.
+ *  Copyright (C) 1998-2015 Ross Ihaka and 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
@@ -14,7 +14,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  */
 
 /*  DESCRIPTION --> see below */
@@ -35,6 +35,7 @@
 static void Y_bessel(double *x, double *alpha, int *nb,
 		     double *by, int *ncalc);
 
+// unused now from R
 double bessel_y(double x, double alpha)
 {
     int nb, ncalc;
@@ -55,9 +56,13 @@ double bessel_y(double x, double alpha)
     if (alpha < 0) {
 	/* Using Abramowitz & Stegun  9.1.2
 	 * this may not be quite optimal (CPU and accuracy wise) */
-	return(bessel_y(x, -alpha) * cospi(alpha) -
-	       ((alpha == na) ? 0 :
-		bessel_j(x, -alpha) * sinpi(alpha)));
+	return(((alpha - na == 0.5) ? 0 : bessel_y(x, -alpha) * cospi(alpha)) -
+	       ((alpha      == na ) ? 0 : bessel_j(x, -alpha) * sinpi(alpha)));
+    }
+    else if (alpha > 1e7) {
+	MATHLIB_WARNING(_("besselY(x, nu): nu=%g too large for bessel_y() algorithm"),
+			alpha);
+	return ML_NAN;
     }
     nb = 1+ (int)na;/* nb-1 <= alpha < nb */
     alpha -= (double)(nb-1);
@@ -79,7 +84,7 @@ double bessel_y(double x, double alpha)
 	    return ML_POSINF;
 	}
 	else if(ncalc < -1)
-	    MATHLIB_WARNING4(_("bessel_y(%g): ncalc (=%ld) != nb (=%ld); alpha=%g. Arg. out of range?\n"),
+	    MATHLIB_WARNING4(_("bessel_y(%g): ncalc (=%d) != nb (=%d); alpha=%g. Arg. out of range?\n"),
 			     x, ncalc, nb, alpha);
 	else /* ncalc >= 0 */
 	    MATHLIB_WARNING2(_("bessel_y(%g,nu=%g): precision lost in result\n"),
@@ -94,8 +99,8 @@ double bessel_y(double x, double alpha)
     return x;
 }
 
-/* modified version of bessel_y that accepts a work array instead of
-   allocating one. */
+/* Called from R: modified version of bessel_y(), accepting a work array
+ * instead of allocating one. */
 double bessel_y_ex(double x, double alpha, double *by)
 {
     int nb, ncalc;
@@ -113,9 +118,13 @@ double bessel_y_ex(double x, double alpha, double *by)
     if (alpha < 0) {
 	/* Using Abramowitz & Stegun  9.1.2
 	 * this may not be quite optimal (CPU and accuracy wise) */
-	return(bessel_y_ex(x, -alpha, by) * cospi(alpha) -
-	       ((alpha == na) ? 0 :
-		bessel_j_ex(x, -alpha, by) * sinpi(alpha)));
+	return(((alpha - na == 0.5) ? 0 : bessel_y_ex(x, -alpha, by) * cospi(alpha)) -
+	       ((alpha      == na ) ? 0 : bessel_j_ex(x, -alpha, by) * sinpi(alpha)));
+    }
+    else if (alpha > 1e7) {
+	MATHLIB_WARNING(_("besselY(x, nu): nu=%g too large for bessel_y() algorithm"),
+			alpha);
+	return ML_NAN;
     }
     nb = 1+ (int)na;/* nb-1 <= alpha < nb */
     alpha -= (double)(nb-1);
@@ -124,7 +133,7 @@ double bessel_y_ex(double x, double alpha, double *by)
 	if(ncalc == -1)
 	    return ML_POSINF;
 	else if(ncalc < -1)
-	    MATHLIB_WARNING4(_("bessel_y(%g): ncalc (=%ld) != nb (=%ld); alpha=%g. Arg. out of range?\n"),
+	    MATHLIB_WARNING4(_("bessel_y(%g): ncalc (=%d) != nb (=%d); alpha=%g. Arg. out of range?\n"),
 			     x, ncalc, nb, alpha);
 	else /* ncalc >= 0 */
 	    MATHLIB_WARNING2(_("bessel_y(%g,nu=%g): precision lost in result\n"),
diff --git a/src/nmath/beta.c b/src/nmath/beta.c
index ce21ef0..dc1e7f6 100644
--- a/src/nmath/beta.c
+++ b/src/nmath/beta.c
@@ -1,7 +1,7 @@
 /*
  *  Mathlib : A C Library of Special Functions
  *  Copyright (C) 1998 Ross Ihaka
- *  Copyright (C) 2000-2012 The R Core Team
+ *  Copyright (C) 2000-2014 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
@@ -15,7 +15,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  *
  *  SYNOPSIS
  *
@@ -74,17 +74,20 @@ double beta(double a, double b)
 //	return gammafn(a) * gammafn(b) / gammafn(a+b);
 	/* All the terms are positive, and all can be large for large
 	   or small arguments.  They are never much less than one.
-	   gammafn(x) can still overflow for x ~ 1e-308, 
-	   but the result would too. 
+	   gammafn(x) can still overflow for x ~ 1e-308,
+	   but the result would too.
 	*/
 	return (1 / gammafn(a+b)) * gammafn(a) * gammafn(b);
     } else {
 	double val = lbeta(a, b);
+// underflow to 0 is not harmful per se;  exp(-999) also gives no warning
+#ifndef IEEE_754
 	if (val < lnsml) {
 	    /* a and/or b so big that beta underflows */
 	    ML_ERROR(ME_UNDERFLOW, "beta");
 	    /* return ML_UNDERFLOW; pointless giving incorrect value */
 	}
+#endif
 	return exp(val);
     }
 }
diff --git a/src/nmath/chebyshev.c b/src/nmath/chebyshev.c
index 8e85f1c..63a1ba1 100644
--- a/src/nmath/chebyshev.c
+++ b/src/nmath/chebyshev.c
@@ -14,7 +14,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  *
  *  SYNOPSIS
  *
diff --git a/src/nmath/choose.c b/src/nmath/choose.c
index 18fdf3e..ad48ca3 100644
--- a/src/nmath/choose.c
+++ b/src/nmath/choose.c
@@ -15,7 +15,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  *
  *  SYNOPSIS
  *
diff --git a/src/nmath/cospi.c b/src/nmath/cospi.c
index ba1bfc1..4d74c1c 100644
--- a/src/nmath/cospi.c
+++ b/src/nmath/cospi.c
@@ -1,6 +1,6 @@
 /*
  *  Mathlib : A C Library of Special Functions
- *  Copyright (C) 2013-2014 The R Core Team
+ *  Copyright (C) 2013-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
@@ -17,9 +17,16 @@
 
 /* HAVE_COSPI etc will not be defined in standalone-use: the
    intention is to make the versions here available in that case.
+
+   The __cospi etc variants are from macOS (and perhaps other BSD-based systems).
 */
 
-#ifndef HAVE_COSPI
+#ifdef HAVE_COSPI
+#elif defined HAVE___COSPI
+double cospi(double x) {
+    return __cospi(x);
+}
+#else
 // cos(pi * x)  -- exact when x = k/2  for all integer k
 double cospi(double x) {
 #ifdef IEEE_754
@@ -37,7 +44,12 @@ double cospi(double x) {
 }
 #endif
 
-#ifndef HAVE_SINPI
+#ifdef HAVE_SINPI
+#elif defined HAVE___SINPI
+double sinpi(double x) {
+    return __sinpi(x);
+}
+#else
 // sin(pi * x)  -- exact when x = k/2  for all integer k
 double sinpi(double x) {
 #ifdef IEEE_754
@@ -57,11 +69,11 @@ double sinpi(double x) {
 #endif
 
 // tan(pi * x)  -- exact when x = k/2  for all integer k
-#ifndef HAVE_TANPI
-double tanpi(double x)
-#else
+#if defined(HAVE_TANPI) || defined(HAVE___TANPI)
 // for use in arithmetic.c, half-values documented to give NaN
 double Rtanpi(double x)
+#else
+double tanpi(double x)
 #endif
 {
 #ifdef IEEE_754
@@ -74,3 +86,9 @@ double Rtanpi(double x)
     if(x <= -0.5) x++; else if(x > 0.5) x--;
     return (x == 0.) ? 0. : ((x == 0.5) ? ML_NAN : tan(M_PI * x));
 }
+
+#if !defined(HAVE_TANPI) && defined(HAVE___TANPI)
+double tanpi(double x) {
+    return __tanpi(x);
+}
+#endif
diff --git a/src/nmath/d1mach.c b/src/nmath/d1mach.c
index 9231f88..5d31bca 100644
--- a/src/nmath/d1mach.c
+++ b/src/nmath/d1mach.c
@@ -1,7 +1,7 @@
 /*
  *  Mathlib - A Mathematical Function Library
  *  Copyright (C) 1998  Ross Ihaka
- *  Copyright (C) 2000-7 The R Core Team
+ *  Copyright (C) 2000-2014 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
@@ -15,7 +15,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  */
 
 /* NaNs propagated correctly */
diff --git a/src/nmath/dbeta.c b/src/nmath/dbeta.c
index 2c9821d..3c5bbdd 100644
--- a/src/nmath/dbeta.c
+++ b/src/nmath/dbeta.c
@@ -6,7 +6,7 @@
  *  Merge in to R:
  *	Copyright (C) 2000, The R Core Team
  *  Changes to case a, b < 2, use logs to avoid underflow
- *	Copyright (C) 2006-2013 The R Core Team
+ *	Copyright (C) 2006-2014 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
@@ -20,7 +20,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  *
  *
  *  DESCRIPTION
@@ -53,16 +53,16 @@ double dbeta(double x, double a, double b, int give_log)
     // limit cases for (a,b), leading to point masses
     if(a == 0 || b == 0 || !R_FINITE(a) || !R_FINITE(b)) {
 	if(a == 0 && b == 0) { // point mass 1/2 at each of {0,1} :
-	    if (x == 0 || x == 1) return(ML_POSINF); /* else */ return(R_D__0);
+	    if (x == 0 || x == 1) return(ML_POSINF); else return(R_D__0);
 	}
 	if (a == 0 || a/b == 0) { // point mass 1 at 0
-	    if (x == 0) return(ML_POSINF); /* else */ return(R_D__0);
+	    if (x == 0) return(ML_POSINF); else return(R_D__0);
 	}
 	if (b == 0 || b/a == 0) { // point mass 1 at 1
-	    if (x == 1) return(ML_POSINF); /* else */ return(R_D__0);
+	    if (x == 1) return(ML_POSINF); else return(R_D__0);
 	}
 	// else, remaining case:  a = b = Inf : point mass 1 at 1/2
-	if (x == 0.5) return(ML_POSINF); /* else */ return(R_D__0);
+	if (x == 0.5) return(ML_POSINF); else return(R_D__0);
     }
 
     if (x == 0) {
diff --git a/src/nmath/dbinom.c b/src/nmath/dbinom.c
index 4f57e50..f734bde 100644
--- a/src/nmath/dbinom.c
+++ b/src/nmath/dbinom.c
@@ -4,7 +4,7 @@
  *   October 23, 2000.
  *
  *  Merge in to R and further tweaks :
- *	Copyright (C) 2000-2014 The R Core Team
+ *	Copyright (C) 2000-2015 The R Core Team
  *	Copyright (C) 2008 The R Foundation
  *
  *  This program is free software; you can redistribute it and/or modify
@@ -19,7 +19,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  *
  *
  * DESCRIPTION
@@ -41,8 +41,7 @@
 #include "nmath.h"
 #include "dpq.h"
 
-double attribute_hidden
-dbinom_raw(double x, double n, double p, double q, int give_log)
+double dbinom_raw(double x, double n, double p, double q, int give_log)
 {
     double lf, lc;
 
diff --git a/src/nmath/dcauchy.c b/src/nmath/dcauchy.c
index 061ab9f..d1249b5 100644
--- a/src/nmath/dcauchy.c
+++ b/src/nmath/dcauchy.c
@@ -15,7 +15,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  *
  *  DESCRIPTION
  *
diff --git a/src/nmath/dchisq.c b/src/nmath/dchisq.c
index 91677de..040e7c8 100644
--- a/src/nmath/dchisq.c
+++ b/src/nmath/dchisq.c
@@ -15,7 +15,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  *
  *  DESCRIPTION
  *
diff --git a/src/nmath/dexp.c b/src/nmath/dexp.c
index 42959c1..de0b0f8 100644
--- a/src/nmath/dexp.c
+++ b/src/nmath/dexp.c
@@ -15,7 +15,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  *
  *  DESCRIPTION
  *
diff --git a/src/nmath/df.c b/src/nmath/df.c
index d1f4733..b466567 100644
--- a/src/nmath/df.c
+++ b/src/nmath/df.c
@@ -18,7 +18,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  *
  *
  *  DESCRIPTION
@@ -47,8 +47,7 @@ double df(double x, double m, double n, int give_log)
     if (x < 0.)  return(R_D__0);
     if (x == 0.) return(m > 2 ? R_D__0 : (m == 2 ? R_D__1 : ML_POSINF));
     if (!R_FINITE(m) && !R_FINITE(n)) { /* both +Inf */
-	if(x == 1.) return ML_POSINF;
-	/* else */  return R_D__0;
+	if(x == 1.) return ML_POSINF; else return R_D__0;
     }
     if (!R_FINITE(n)) /* must be +Inf by now */
 	return(dgamma(x, m/2, 2./m, give_log));
diff --git a/src/nmath/dgamma.c b/src/nmath/dgamma.c
index 112de7b..4ee2e83 100644
--- a/src/nmath/dgamma.c
+++ b/src/nmath/dgamma.c
@@ -19,7 +19,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  *
  *
  * DESCRIPTION
diff --git a/src/nmath/dgeom.c b/src/nmath/dgeom.c
index 8b18208..574a966 100644
--- a/src/nmath/dgeom.c
+++ b/src/nmath/dgeom.c
@@ -18,7 +18,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  *
  *
  *  DESCRIPTION
diff --git a/src/nmath/dhyper.c b/src/nmath/dhyper.c
index 9864243..65dc218 100644
--- a/src/nmath/dhyper.c
+++ b/src/nmath/dhyper.c
@@ -18,7 +18,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  *
  *
  * DESCRIPTION
diff --git a/src/nmath/dlnorm.c b/src/nmath/dlnorm.c
index 05b956c..818e8dd 100644
--- a/src/nmath/dlnorm.c
+++ b/src/nmath/dlnorm.c
@@ -15,7 +15,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  *
  *  DESCRIPTION
  *
diff --git a/src/nmath/dlogis.c b/src/nmath/dlogis.c
index 86afb19..2aca57a 100644
--- a/src/nmath/dlogis.c
+++ b/src/nmath/dlogis.c
@@ -15,7 +15,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  */
 
 #include "nmath.h"
diff --git a/src/nmath/dnbeta.c b/src/nmath/dnbeta.c
index ea9da27..12a9218 100644
--- a/src/nmath/dnbeta.c
+++ b/src/nmath/dnbeta.c
@@ -15,7 +15,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  *
  *  SYNOPSIS
  *
@@ -57,8 +57,8 @@ double dnbeta(double x, double a, double b, double ncp, int give_log)
     const static double eps = 1.e-15;
 
     int kMax;
-    double k, ncp2, dx2, d, D, term;
-    LDOUBLE sum, p_k, q;
+    double k, ncp2, dx2, d, D;
+    LDOUBLE sum, term, p_k, q;
 
 #ifdef IEEE_754
     if (ISNAN(x) || ISNAN(a) || ISNAN(b) || ISNAN(ncp))
diff --git a/src/nmath/dnbinom.c b/src/nmath/dnbinom.c
index 0906430..4f06584 100644
--- a/src/nmath/dnbinom.c
+++ b/src/nmath/dnbinom.c
@@ -6,7 +6,7 @@
  *    dnbinom_mu(): Martin Maechler, June 2008
  *
  *  Merge in to R:
- *	Copyright (C) 2000--2014, The R Core Team
+ *	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
@@ -20,7 +20,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  *
  *
  * DESCRIPTION
@@ -50,6 +50,7 @@ double dnbinom(double x, double size, double prob, int give_log)
     /* limiting case as size approaches zero is point mass at zero */
     if (x == 0 && size==0) return R_D__1;
     x = R_forceint(x);
+    if(!R_FINITE(size)) size = DBL_MAX;
 
     ans = dbinom_raw(size, x+size, prob, 1-prob, give_log);
     p = ((double)size)/(size+x);
@@ -60,7 +61,6 @@ double dnbinom_mu(double x, double size, double mu, int give_log)
 {
     /* originally, just set  prob :=  size / (size + mu)  and called dbinom_raw(),
      * but that suffers from cancellation when   mu << size  */
-    double ans, p;
 
 #ifdef IEEE_754
     if (ISNAN(x) || ISNAN(size) || ISNAN(mu))
@@ -75,21 +75,23 @@ double dnbinom_mu(double x, double size, double mu, int give_log)
      * even if mu is kept constant. limit distribution does not
      * have mean mu, though.
      */
-    if (x == 0 && size==0) return R_D__1;
-
+    if (x == 0 && size == 0) return R_D__1;
     x = R_forceint(x);
+    if(!R_FINITE(size)) // limit case: Poisson
+	return(dpois_raw(x, mu, give_log));
+
     if(x == 0)/* be accurate, both for n << mu, and n >> mu :*/
 	return R_D_exp(size * (size < mu ? log(size/(size+mu)) : log1p(- mu/(size+mu))));
     if(x < 1e-10 * size) { /* don't use dbinom_raw() but MM's formula: */
 	/* FIXME --- 1e-8 shows problem; rather use algdiv() from ./toms708.c */
-	p = (size < mu ? log(size/(1 + size/mu)) : log(mu / (1 + mu/size)));
+	double p = (size < mu ? log(size/(1 + size/mu)) : log(mu / (1 + mu/size)));
 	return R_D_exp(x * p - mu - lgamma(x+1) +
 		       log1p(x*(x-1)/(2*size)));
+    } else {
+	/* no unnecessary cancellation inside dbinom_raw, when
+	 * x_ = size and n_ = x+size are so close that n_ - x_ loses accuracy */
+	double p = ((double)size)/(size+x),
+	    ans = dbinom_raw(size, x+size, size/(size+mu), mu/(size+mu), give_log);
+	return((give_log) ? log(p) + ans : p * ans);
     }
-    /* else: no unnecessary cancellation inside dbinom_raw, when
-     * x_ = size and n_ = x+size are so close that n_ - x_ loses accuracy
-     */
-    ans = dbinom_raw(size, x+size, size/(size+mu), mu/(size+mu), give_log);
-    p = ((double)size)/(size+x);
-    return((give_log) ? log(p) + ans : p * ans);
 }
diff --git a/src/nmath/dnchisq.c b/src/nmath/dnchisq.c
index 5e3ebf0..e4530fb 100644
--- a/src/nmath/dnchisq.c
+++ b/src/nmath/dnchisq.c
@@ -1,8 +1,8 @@
 /*
  *  Mathlib : A C Library of Special Functions
  *  Copyright (C) 1998 Ross Ihaka
- *  Copyright (C) 2000-12 The R Core Team
- *  Copyright (C) 2004-8 The R Foundation
+ *  Copyright (C) 2000-15 The R Core Team
+ *  Copyright (C) 2004-15 The R Foundation
  *
  *  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
@@ -16,7 +16,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  *
  *  DESCRIPTION
  *
@@ -38,16 +38,15 @@ double dnchisq(double x, double df, double ncp, int give_log)
     if (ISNAN(x) || ISNAN(df) || ISNAN(ncp))
 	return x + df + ncp;
 #endif
-    if (ncp < 0 || df <= 0) ML_ERR_return_NAN;
 
-    if (!R_FINITE(df) || !R_FINITE(ncp))
-	ML_ERR_return_NAN;
+    if (!R_FINITE(df) || !R_FINITE(ncp) || ncp < 0 || df < 0)
+    	ML_ERR_return_NAN;
 
     if(x < 0) return R_D__0;
     if(x == 0 && df < 2.)
 	return ML_POSINF;
     if(ncp == 0)
-	return dchisq(x, df, give_log);
+	return (df > 0) ? dchisq(x, df, give_log) : R_D__0;
     if(x == ML_POSINF) return R_D__0;
 
     ncp2 = 0.5 * ncp;
@@ -89,7 +88,7 @@ double dnchisq(double x, double df, double ncp, int give_log)
     } while (q >= 1 || term * q > (1-q)*eps || term > 1e-10*sum);
     /* lower tail */
     term = mid; df = dfmid; i = imax;
-    while (i) {
+    while (i != 0) {
 	df -= 2;
 	q = i * df / x2;
 	i--;
diff --git a/src/nmath/dnf.c b/src/nmath/dnf.c
index 0bff53d..756d806 100644
--- a/src/nmath/dnf.c
+++ b/src/nmath/dnf.c
@@ -18,7 +18,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  *
  *
  *  DESCRIPTION
@@ -55,8 +55,7 @@ double dnf(double x, double df1, double df2, double ncp, int give_log)
      */
     if (!R_FINITE(df1) && !R_FINITE(df2)) { /* both +Inf */
 	/* PR: not sure about this (taken from  ncp==0)  -- FIXME ? */
-	if(x == 1.) return ML_POSINF;
-	/* else */  return R_D__0;
+	if(x == 1.) return ML_POSINF; else return R_D__0;
     }
     if (!R_FINITE(df2)) /* i.e.  = +Inf */
 	return df1* dnchisq(x*df1, df1, ncp, give_log);
diff --git a/src/nmath/dnorm.c b/src/nmath/dnorm.c
index 1472959..63f3629 100644
--- a/src/nmath/dnorm.c
+++ b/src/nmath/dnorm.c
@@ -16,7 +16,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  *
  *  SYNOPSIS
  *
@@ -51,7 +51,7 @@ double dnorm4(double x, double mu, double sigma, int give_log)
     x = fabs (x);
     if (x >= 2 * sqrt(DBL_MAX)) return R_D__0;
     if (give_log)
-        return -(M_LN_SQRT_2PI + 0.5 * x * x + log(sigma));
+	return -(M_LN_SQRT_2PI + 0.5 * x * x + log(sigma));
     //  M_1_SQRT_2PI = 1 / sqrt(2 * pi)
 #ifdef MATHLIB_FAST_dnorm
     // and for R <= 3.0.x and R-devel upto 2014-01-01:
diff --git a/src/nmath/dnt.c b/src/nmath/dnt.c
index 8b08c07..82de3cf 100644
--- a/src/nmath/dnt.c
+++ b/src/nmath/dnt.c
@@ -4,7 +4,7 @@
  *    July 15, 2003.
  *
  *  Merge in to R:
- *	Copyright (C) 2003 The R Foundation
+ *	Copyright (C) 2003-2015 The R Foundation
  *
  *  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
@@ -18,7 +18,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  *
  *
  *  NOTE
@@ -32,13 +32,14 @@
  *
  * DESCRIPTION
  *
- *    The non-central t density is
+ *    From Johnson, Kotz and Balakrishnan (1995) [2nd ed.; formula (31.15), p.516],
+ *    the non-central t density is
+ *
+ *      f(x, df, ncp) =
+ *
+ *        exp(-.5*ncp^2) * gamma((df+1)/2) / (sqrt(pi*df)* gamma(df/2)) * (df/(df+x^2))^((df+1)/2) *
+ *          sum_{j=0}^Inf  gamma((df+j+1)/2)/(factorial(j)* gamma((df+1)/2)) * (x*ncp*sqrt(2)/sqrt(df+x^2))^ j
  *
- *	   f(x, df, ncp) =
- *		df^(df/2) * exp(-.5*ncp^2) /
- *		(sqrt(pi)*gamma(df/2)*(df+x^2)^((df+1)/2)) *
- *		sum_{k=0}^Inf  gamma((df + k + df)/2)*ncp^k /
- *				prod(1:k)*(2*x^2/(df+x^2))^(k/2)
  *
  *    The functional relationship
  *
@@ -54,6 +55,8 @@
  *
  *    All calculations are done on log-scale to increase stability.
  *
+ * FIXME: pnt() is known to be inaccurate in the (very) left tail and for ncp > 38
+ *       ==> use a direct log-space summation formula in that case
  */
 
 #include "nmath.h"
diff --git a/src/nmath/dpois.c b/src/nmath/dpois.c
index ce751cf..c79aeda 100644
--- a/src/nmath/dpois.c
+++ b/src/nmath/dpois.c
@@ -4,11 +4,11 @@
  *    October 23, 2000.
  *
  *  Merge in to R:
- *	Copyright (C) 2000-2014 The R Core Team
+ *	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
- *  the Free Software Foundation; either version 2 of the License, or
+ *  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,
@@ -18,7 +18,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  *
  *
  * DESCRIPTION
@@ -35,16 +35,22 @@
 #include "nmath.h"
 #include "dpq.h"
 
-double attribute_hidden dpois_raw(double x, double lambda, int give_log)
+// called also from dgamma.c, pgamma.c, dnbeta.c, dnbinom.c, dnchisq.c :
+double dpois_raw(double x, double lambda, int give_log)
 {
     /*       x >= 0 ; integer for dpois(), but not e.g. for pgamma()!
         lambda >= 0
     */
     if (lambda == 0) return( (x == 0) ? R_D__1 : R_D__0 );
-    if (!R_FINITE(lambda)) return R_D__0;
+    if (!R_FINITE(lambda)) return R_D__0; // including for the case where  x = lambda = +Inf
     if (x < 0) return( R_D__0 );
     if (x <= lambda * DBL_MIN) return(R_D_exp(-lambda) );
-    if (lambda < x * DBL_MIN) return(R_D_exp(-lambda + x*log(lambda) -lgammafn(x+1)));
+    if (lambda < x * DBL_MIN) {
+	if (!R_FINITE(x)) // lambda < x = +Inf
+	    return R_D__0;
+	// else
+	return(R_D_exp(-lambda + x*log(lambda) -lgammafn(x+1)));
+    }
     return(R_D_fexp( M_2PI*x, -stirlerr(x)-bd0(x,lambda) ));
 }
 
diff --git a/src/nmath/dpq.h b/src/nmath/dpq.h
index 6aa0e9e..d5c45ce 100644
--- a/src/nmath/dpq.h
+++ b/src/nmath/dpq.h
@@ -1,6 +1,6 @@
 /*
  *  R : A Computer Language for Statistical Data Analysis
- *  Copyright (C) 2000--2014 The  R Core Team
+ *  Copyright (C) 2000--2015 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
@@ -14,7 +14,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  */
 	/* Utilities for `dpq' handling (density/probability/quantile) */
 
@@ -99,7 +99,7 @@
 	    return lower_tail ? _RIGHT_ : _LEFT_;	\
     }
 
-#define R_P_bounds_01(x, x_min, x_max) 	\
+#define R_P_bounds_01(x, x_min, x_max)	\
     if(x <= x_min) return R_DT_0;		\
     if(x >= x_max) return R_DT_1
 /* is typically not quite optimal for (-Inf,Inf) where
@@ -119,8 +119,8 @@
 #define R_D_negInonint(x) (x < 0. || R_nonint(x))
 
 // for discrete d<distr>(x, ...) :
-#define R_D_nonint_check(x) 				\
+#define R_D_nonint_check(x)				\
    if(R_nonint(x)) {					\
-	MATHLIB_WARNING("non-integer x = %f", x);	\
+       MATHLIB_WARNING(_("non-integer x = %f"), x);	\
 	return R_D__0;					\
    }
diff --git a/src/nmath/dt.c b/src/nmath/dt.c
index b3bf1da..ebde51b 100644
--- a/src/nmath/dt.c
+++ b/src/nmath/dt.c
@@ -4,7 +4,7 @@
  *    October 23, 2000.
  *
  *  Merge in to R:
- *	Copyright (C) 2000-2013 The R Core Team
+ *	Copyright (C) 2000-2015 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
@@ -18,7 +18,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  *
  *
  * DESCRIPTION
@@ -47,8 +47,9 @@ double dt(double x, double n, int give_log)
     if(!R_FINITE(n))
 	return dnorm(x, 0., 1., give_log);
 
-    double u, ax, t = -bd0(n/2.,(n+1)/2.) + stirlerr((n+1)/2.) - stirlerr(n/2.),
+    double u, t = -bd0(n/2.,(n+1)/2.) + stirlerr((n+1)/2.) - stirlerr(n/2.),
 	x2n = x*x/n, // in  [0, Inf]
+	ax = 0., // <- -Wpedantic
 	l_x2n; // := log(sqrt(1 + x2n)) = log(1 + x2n)/2
     Rboolean lrg_x2n =  (x2n > 1./DBL_EPSILON);
     if (lrg_x2n) { // large x^2/n :
diff --git a/src/nmath/dunif.c b/src/nmath/dunif.c
index 454f628..ce7231a 100644
--- a/src/nmath/dunif.c
+++ b/src/nmath/dunif.c
@@ -15,7 +15,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  *
  *  DESCRIPTION
  *
diff --git a/src/nmath/dweibull.c b/src/nmath/dweibull.c
index af12bd4..3fa08c1 100644
--- a/src/nmath/dweibull.c
+++ b/src/nmath/dweibull.c
@@ -15,7 +15,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  *
  *  DESCRIPTION
  *
diff --git a/src/nmath/expm1.c b/src/nmath/expm1.c
index 9cf2c43..d7f9175 100644
--- a/src/nmath/expm1.c
+++ b/src/nmath/expm1.c
@@ -14,7 +14,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  *
  *  SYNOPSIS
  *
@@ -31,10 +31,11 @@
  *
  *  NOTES
  *
- *	As log1p(), this is a standard function in some C libraries,
+ *	As log1p(), this is a C99 standard function
  *	particularly GNU and BSD (but is neither ISO/ANSI C nor POSIX).
  *
- *  We supply a substitute for the case when there is no system one.
+ *  We supply a substitute for the case when there is no system one
+ *  (which should not be the case any more).
  */
 
 #ifdef HAVE_CONFIG_H
diff --git a/src/nmath/fmax2.c b/src/nmath/fmax2.c
index c4b61ee..bbe0dd8 100644
--- a/src/nmath/fmax2.c
+++ b/src/nmath/fmax2.c
@@ -14,7 +14,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  */
 
 #include "nmath.h"
diff --git a/src/nmath/fmin2.c b/src/nmath/fmin2.c
index bc67f09..11cd790 100644
--- a/src/nmath/fmin2.c
+++ b/src/nmath/fmin2.c
@@ -14,7 +14,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  */
 
 #include "nmath.h"
diff --git a/src/nmath/fprec.c b/src/nmath/fprec.c
index 63a793f..fd71be4 100644
--- a/src/nmath/fprec.c
+++ b/src/nmath/fprec.c
@@ -15,7 +15,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  *
  *  SYNOPSIS
  *
@@ -46,7 +46,7 @@
 # define R_rint rint
 #else
 # define R_rint private_rint
-extern double private_rint(double x);
+# include "nmath2.h" // for private_rint
 #endif
 
 /* Improvements by Martin Maechler, May 1997;
diff --git a/src/nmath/fround.c b/src/nmath/fround.c
index df14e4a..f4f0e54 100644
--- a/src/nmath/fround.c
+++ b/src/nmath/fround.c
@@ -15,7 +15,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  *
  *  SYNOPSIS
  *
@@ -28,7 +28,7 @@
  *
  */
 
-#include <config.h> /* needed for HAVE_*, IEEE_754 */
+#include <config.h> /* needed for HAVE_* */
 #include "nmath.h"
 
 
@@ -39,7 +39,7 @@
 # define R_rint rint
 #else
 # define R_rint private_rint
-extern double private_rint(double x);
+# include "nmath2.h" // for private_rint
 
 /* also used potentially in fprec.c and main/format.c */
 double attribute_hidden private_rint(double x)
diff --git a/src/nmath/fsign.c b/src/nmath/fsign.c
index f2fcd6d..286afbc 100644
--- a/src/nmath/fsign.c
+++ b/src/nmath/fsign.c
@@ -14,7 +14,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  *
  *  SYNOPSIS
  *
diff --git a/src/nmath/ftrunc.c b/src/nmath/ftrunc.c
index 89b6c2e..87c7218 100644
--- a/src/nmath/ftrunc.c
+++ b/src/nmath/ftrunc.c
@@ -15,7 +15,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  *
  *  SYNOPSIS
  *
diff --git a/src/nmath/gamma.c b/src/nmath/gamma.c
index 63bcb65..cbf6ad5 100644
--- a/src/nmath/gamma.c
+++ b/src/nmath/gamma.c
@@ -16,7 +16,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  *
  *  SYNOPSIS
  *
diff --git a/src/nmath/gammalims.c b/src/nmath/gammalims.c
index 9aff1cb..7ae994f 100644
--- a/src/nmath/gammalims.c
+++ b/src/nmath/gammalims.c
@@ -15,7 +15,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  *
  *  SYNOPSIS
  *
diff --git a/src/nmath/i1mach.c b/src/nmath/i1mach.c
index e36fc93..5cad06c 100644
--- a/src/nmath/i1mach.c
+++ b/src/nmath/i1mach.c
@@ -15,7 +15,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  */
 
 #include "nmath.h"
diff --git a/src/nmath/imax2.c b/src/nmath/imax2.c
index f039459..f7886ef 100644
--- a/src/nmath/imax2.c
+++ b/src/nmath/imax2.c
@@ -14,7 +14,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  *
  *  SYNOPSIS
  *
diff --git a/src/nmath/imin2.c b/src/nmath/imin2.c
index a8b4296..500bc57 100644
--- a/src/nmath/imin2.c
+++ b/src/nmath/imin2.c
@@ -14,7 +14,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  *
  *  SYNOPSIS
  *
diff --git a/src/nmath/lbeta.c b/src/nmath/lbeta.c
index f88df85..7fec6ef 100644
--- a/src/nmath/lbeta.c
+++ b/src/nmath/lbeta.c
@@ -16,7 +16,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  *
  *  SYNOPSIS
  *
@@ -69,9 +69,10 @@ double lbeta(double a, double b)
 	return lgammafn(p) + corr + p - p * log(p + q)
 		+ (q - 0.5) * log1p(-p / (p + q));
     }
-    else
+    else {
 	/* p and q are small: p <= q < 10. */
 	/* R change for very small args */
 	if (p < 1e-306) return lgamma(p) + (lgamma(q) - lgamma(p+q));
-	return log(gammafn(p) * (gammafn(q) / gammafn(p + q)));
+	else return log(gammafn(p) * (gammafn(q) / gammafn(p + q)));
+    }
 }
diff --git a/src/nmath/lgamma.c b/src/nmath/lgamma.c
index 1ff9eed..7f53449 100644
--- a/src/nmath/lgamma.c
+++ b/src/nmath/lgamma.c
@@ -15,7 +15,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  *
  *  SYNOPSIS
  *
diff --git a/src/nmath/lgammacor.c b/src/nmath/lgammacor.c
index 3e28ac8..3861512 100644
--- a/src/nmath/lgammacor.c
+++ b/src/nmath/lgammacor.c
@@ -15,7 +15,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  *
  *  SYNOPSIS
  *
diff --git a/src/nmath/log1p.c b/src/nmath/log1p.c
index 94de6ff..02dd3ee 100644
--- a/src/nmath/log1p.c
+++ b/src/nmath/log1p.c
@@ -15,7 +15,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  *
  *  SYNOPSIS
  *
diff --git a/src/nmath/mlutils.c b/src/nmath/mlutils.c
index a3d2b72..0151dd7 100644
--- a/src/nmath/mlutils.c
+++ b/src/nmath/mlutils.c
@@ -14,7 +14,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  */
 
 #ifdef HAVE_CONFIG_H
diff --git a/src/nmath/nmath.h b/src/nmath/nmath.h
index 01860df..759b361 100644
--- a/src/nmath/nmath.h
+++ b/src/nmath/nmath.h
@@ -1,6 +1,6 @@
 /*
  *  Mathlib : A C Library of Special Functions
- *  Copyright (C) 1998-2013  The R Core Team
+ *  Copyright (C) 1998-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
@@ -14,7 +14,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  */
 
 /* Private header file for use during compilation of Mathlib */
@@ -32,6 +32,11 @@
 #  define LDOUBLE double
 #endif
 
+/* To ensure atanpi, cospi,  sinpi, tanpi are defined */
+# ifndef __STDC_WANT_IEC_60559_FUNCS_EXT__
+#  define __STDC_WANT_IEC_60559_FUNCS_EXT__ 1
+# endif
+
 #include <math.h>
 #include <float.h> /* DBL_MIN etc */
 
@@ -104,7 +109,15 @@ void R_CheckUserInterrupt(void);
 #define MATHLIB_WARNING5(fmt,x,x2,x3,x4,x5) printf(fmt,x,x2,x3,x4,x5)
 
 #define ISNAN(x) (isnan(x)!=0)
-#define R_FINITE(x)    R_finite(x)
+// Arith.h defines it
+#ifndef R_FINITE
+#ifdef HAVE_WORKING_ISFINITE
+/* isfinite is defined in <math.h> according to C99 */
+# define R_FINITE(x)    isfinite(x)
+#else
+# define R_FINITE(x)    R_finite(x)
+#endif
+#endif
 int R_finite(double);
 
 #define ML_POSINF	(1.0 / 0.0)
@@ -179,6 +192,11 @@ int R_finite(double);
 #define lfastchoose	Rf_lfastchoose
 #define lgammacor	Rf_lgammacor
 #define stirlerr       	Rf_stirlerr
+#define pnchisq_raw   	Rf_pnchisq_raw
+#define pgamma_raw   	Rf_pgamma_raw
+#define pnbeta_raw   	Rf_pnbeta_raw
+#define pnbeta2       	Rf_pnbeta2
+#define bratio       	Rf_bratio
 
 	/* Chebyshev Series */
 
@@ -195,9 +213,7 @@ double	attribute_hidden lfastchoose(double, double);
 
 double  attribute_hidden bd0(double, double);
 
-double	attribute_hidden dbinom_raw(double, double, double, double, int);
-double	attribute_hidden dpois_raw (double, double, int);
-double  attribute_hidden pnchisq_raw(double, double, double, double, double, 
+double  attribute_hidden pnchisq_raw(double, double, double, double, double,
 				     int, Rboolean, Rboolean);
 double  attribute_hidden pgamma_raw(double, double, int, int);
 double	attribute_hidden pbeta_raw(double, double, double, int, int);
diff --git a/src/nmath/nmath2.h b/src/nmath/nmath2.h
new file mode 100644
index 0000000..fac60b7
--- /dev/null
+++ b/src/nmath/nmath2.h
@@ -0,0 +1,30 @@
+/*
+ *  Mathlib : A C Library of Special Functions
+ *  Copyright (C) 1998-2014  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
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, a copy is available at
+ *  https://www.R-project.org/Licenses/
+ */
+
+/* Private header file for use during compilation of R */
+#ifndef MATHLIB_PRIVATE2_H
+#define MATHLIB_PRIVATE2_H
+
+
+double private_rint(double x);
+extern N01type N01_kind;
+extern double BM_norm_keep;
+
+
+#endif /* MATHLIB_PRIVATE2_H */
diff --git a/src/nmath/pbeta.c b/src/nmath/pbeta.c
index d55310c..57e2cb3 100644
--- a/src/nmath/pbeta.c
+++ b/src/nmath/pbeta.c
@@ -14,7 +14,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  *
  *  SYNOPSIS
  *
@@ -50,10 +50,7 @@ double pbeta_raw(double x, double a, double b, int lower_tail, int log_p)
 	if (b == 0 || b/a == 0) // point mass 1 at 1 ==> P(X <= x) = 0, all x < 1
 	    return R_DT_0;
 	// else, remaining case:  a = b = Inf : point mass 1 at 1/2
-	if (x < 0.5)
-	    return R_DT_0;
-	// else,  x >= 0.5 :
-	    return R_DT_1;
+	if (x < 0.5) return R_DT_0; else return R_DT_1;
     }
     // Now:  0 < a < Inf;  0 < b < Inf
 
@@ -62,8 +59,8 @@ double pbeta_raw(double x, double a, double b, int lower_tail, int log_p)
     //====
     bratio(a, b, x, x1, &w, &wc, &ierr, log_p); /* -> ./toms708.c */
     //====
-    /* ierr = 8 is about inaccuracy in extreme cases */
-    if(ierr && (ierr != 8 || log_p) )
+    // ierr in {10,14} <==> bgrat() error code ierr-10 in 1:4; for 1 and 4, warned *there*
+    if(ierr && ierr != 11 && ierr != 14)
 	MATHLIB_WARNING4(_("pbeta_raw(%g, a=%g, b=%g, ..) -> bratio() gave error code %d"),
 			x, a,b, ierr);
     return lower_tail ? w : wc;
diff --git a/src/nmath/pbinom.c b/src/nmath/pbinom.c
index 9d29875..92a01d4 100644
--- a/src/nmath/pbinom.c
+++ b/src/nmath/pbinom.c
@@ -1,8 +1,8 @@
 /*
  *  Mathlib : A C Library of Special Functions
  *  Copyright (C) 1998 Ross Ihaka
- *  Copyright (C) 2000-2014  The R Core Team
- *  Copyright (C) 2004       The R Foundation
+ *  Copyright (C) 2000-2015  The R Core Team
+ *  Copyright (C) 2004-2015  The R Foundation
  *
  *  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
@@ -16,7 +16,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  *
  *  DESCRIPTION
  *
@@ -34,7 +34,7 @@ double pbinom(double x, double n, double p, int lower_tail, int log_p)
 
 #endif
     if(R_nonint(n)) {
-	MATHLIB_WARNING("non-integer n = %f", n);
+	MATHLIB_WARNING(_("non-integer n = %f"), n);
 	ML_ERR_return_NAN;
     }
     n = R_forceint(n);
diff --git a/src/nmath/pcauchy.c b/src/nmath/pcauchy.c
index 39d303f..d29c2d9 100644
--- a/src/nmath/pcauchy.c
+++ b/src/nmath/pcauchy.c
@@ -16,7 +16,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  *
  *  DESCRIPTION
  *
diff --git a/src/nmath/pchisq.c b/src/nmath/pchisq.c
index 885dee9..c04051e 100644
--- a/src/nmath/pchisq.c
+++ b/src/nmath/pchisq.c
@@ -15,7 +15,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  *
  *  DESCRIPTION
  *
diff --git a/src/nmath/pexp.c b/src/nmath/pexp.c
index 06dc307..8b2e78a 100644
--- a/src/nmath/pexp.c
+++ b/src/nmath/pexp.c
@@ -1,7 +1,7 @@
 /*
  *  Mathlib : A C Library of Special Functions
  *  Copyright (C) 1998 Ross Ihaka
- *  Copyright (C) 2000-2002 The R Core Team
+ *  Copyright (C) 2000-2015 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
@@ -15,7 +15,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  *
  *  DESCRIPTION
  *
@@ -38,11 +38,7 @@ double pexp(double x, double scale, int lower_tail, int log_p)
 	return R_DT_0;
     /* same as weibull( shape = 1): */
     x = -(x / scale);
-    if (lower_tail)
-	return (log_p
-		/* log(1 - exp(x))  for x < 0 : */
-		? (x > -M_LN2 ? log(-expm1(x)) : log1p(-exp(x)))
-		: -expm1(x));
-    /* else:  !lower_tail */
-    return R_D_exp(x);
+    return lower_tail
+	? (log_p ? R_Log1_Exp(x) : -expm1(x))
+	: R_D_exp(x);
 }
diff --git a/src/nmath/pf.c b/src/nmath/pf.c
index 1a54cbd..50de98a 100644
--- a/src/nmath/pf.c
+++ b/src/nmath/pf.c
@@ -15,7 +15,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  *
  *  DESCRIPTION
  *
diff --git a/src/nmath/pgamma.c b/src/nmath/pgamma.c
index 9639bfc..8e53895 100644
--- a/src/nmath/pgamma.c
+++ b/src/nmath/pgamma.c
@@ -2,7 +2,7 @@
  *  Mathlib : A C Library of Special Functions
  *  Copyright (C) 2005-6 Morten Welinder <terra at gnome.org>
  *  Copyright (C) 2005-10 The R Foundation
- *  Copyright (C) 2006-10 The R Core Team
+ *  Copyright (C) 2006-2015 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
@@ -16,7 +16,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  *
  *  SYNOPSIS
  *
@@ -30,6 +30,7 @@
  *
  *	double logspace_add (double logx, double logy)
  *	double logspace_sub (double logx, double logy)
+ *	double logspace_sum (double* logx, int n)
  *
  *
  *  DESCRIPTION
@@ -51,8 +52,8 @@
 #include "nmath.h"
 #include "dpq.h"
 /*----------- DEBUGGING -------------
- *	make CFLAGS='-DDEBUG_p -g -I/usr/local/include -I../include'
- * (cd ~/R/D/r-devel/Linux-inst/src/nmath; gcc -std=gnu99 -I. -I../../src/include -I../../../R/src/include -I/usr/local/include -DDEBUG_p -g -O2 -c ../../../R/src/nmath/pgamma.c -o pgamma.o)
+ * make CFLAGS='-DDEBUG_p -g'
+ * (cd `R-devel RHOME`/src/nmath; gcc -I. -I../../src/include -I../../../R/src/include  -DHAVE_CONFIG_H -fopenmp -DDEBUG_p -g -c ../../../R/src/nmath/pgamma.c -o pgamma.o)
  */
 
 /* Scalefactor:= (2^32)^8 = 2^256 = 1.157921e+77 */
@@ -242,9 +243,43 @@ double logspace_sub (double logx, double logy)
     return logx + R_Log1_Exp(logy - logx);
 }
 
+/*
+ * Compute the log of a sum from logs of terms, i.e.,
+ *
+ *     log (sum_i  exp (logx[i]) ) =
+ *     log (e^M * sum_i  e^(logx[i] - M) ) =
+ *     M + log( sum_i  e^(logx[i] - M)
+ *
+ * without causing overflows or throwing much accuracy.
+ */
+#ifdef HAVE_LONG_DOUBLE
+# define EXP expl
+# define LOG logl
+#else
+# define EXP exp
+# define LOG log
+#endif
+double logspace_sum (const double* logx, int n)
+{
+    if(n == 0) return ML_NEGINF; // = log( sum(<empty>) )
+    if(n == 1) return logx[0];
+    if(n == 2) return logspace_add(logx[0], logx[1]);
+    // else (n >= 3) :
+    int i;
+    // Mx := max_i log(x_i)
+    double Mx = logx[0];
+    for(i = 1; i < n; i++) if(Mx < logx[i]) Mx = logx[i];
+    LDOUBLE s = (LDOUBLE) 0.;
+    for(i = 0; i < n; i++) s += EXP(logx[i] - Mx);
+    return Mx + (double) LOG(s);
+}
 
-/* dpois_wrap (x_P_1,  lambda, g_log) ==
- *   dpois (x_P_1 - 1, lambda, g_log) :=  exp(-L)  L^k / gamma(k+1) ,  k := x_P_1 - 1
+
+
+/* dpois_wrap (x__1, lambda) := dpois(x__1 - 1, lambda);  where
+ * dpois(k, L) := exp(-L) L^k / gamma(k+1)  {the usual Poisson probabilities}
+ *
+ * and  dpois*(.., give_log = TRUE) :=  log( dpois*(..) )
 */
 static double
 dpois_wrap (double x_plus_1, double lambda, int give_log)
@@ -408,7 +443,7 @@ pd_lower_cf (double y, double d)
 
 	if (b2 != 0) {
 	    f = a2 / b2;
- 	    /* convergence check: relative; "absolute" for very small f : */
+	    /* convergence check: relative; "absolute" for very small f : */
 	    if (fabs (f - of) <= DBL_EPSILON * fmax2(f0, fabs(f))) {
 #ifdef DEBUG_p
 		REprintf(" %g iter.\n", i);
diff --git a/src/nmath/pgeom.c b/src/nmath/pgeom.c
index bde7833..94fa80b 100644
--- a/src/nmath/pgeom.c
+++ b/src/nmath/pgeom.c
@@ -16,7 +16,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  *
  *  DESCRIPTION
  *
diff --git a/src/nmath/phyper.c b/src/nmath/phyper.c
index 05123ea..41489ce 100644
--- a/src/nmath/phyper.c
+++ b/src/nmath/phyper.c
@@ -17,7 +17,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  *
  *  DESCRIPTION
  *
diff --git a/src/nmath/plnorm.c b/src/nmath/plnorm.c
index 1b423dd..eec1666 100644
--- a/src/nmath/plnorm.c
+++ b/src/nmath/plnorm.c
@@ -15,7 +15,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  *
  *  DESCRIPTION
  *
diff --git a/src/nmath/plogis.c b/src/nmath/plogis.c
index 41d15ed..8112401 100644
--- a/src/nmath/plogis.c
+++ b/src/nmath/plogis.c
@@ -15,7 +15,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  */
 #include "nmath.h"
 #include "dpq.h"
@@ -25,7 +25,7 @@
    curve(log1p(exp(x)) - x,       33.1, 33.5, n=2^10)
    curve(x+exp(-x) - log1p(exp(x)), 15, 25,   n=2^11)
 */
-double log1pexp(double x) {
+double Rf_log1pexp(double x) {
     if(x <= 18.) return log1p(exp(x));
     if(x > 33.3) return x;
     // else: 18.0 < x <= 33.3 :
@@ -47,7 +47,7 @@ double plogis(double x, double location, double scale,
 
     if(log_p) {
 	// log(1 / (1 + exp( +- x ))) = -log(1 + exp( +- x))
-	return -log1pexp(lower_tail ? -x : x);
+	return -Rf_log1pexp(lower_tail ? -x : x);
     } else {
 	return 1 / (1 + exp(lower_tail ? -x : x));
     }
diff --git a/src/nmath/pnbinom.c b/src/nmath/pnbinom.c
index a05059f..e097fe2 100644
--- a/src/nmath/pnbinom.c
+++ b/src/nmath/pnbinom.c
@@ -1,7 +1,7 @@
 /*
  *  Mathlib : A C Library of Special Functions
  *  Copyright (C) 1998 Ross Ihaka
- *  Copyright (C) 2000-2013 The R Core Team
+ *  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
@@ -15,7 +15,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  *
  *  DESCRIPTION
  *
@@ -39,8 +39,8 @@ double pnbinom(double x, double size, double prob, int lower_tail, int log_p)
     if (size < 0 || prob <= 0 || prob > 1)	ML_ERR_return_NAN;
 
     /* limiting case: point mass at zero */
-    if (size == 0) 
-        return (x >= 0) ? R_DT_1 : R_DT_0; 
+    if (size == 0)
+        return (x >= 0) ? R_DT_1 : R_DT_0;
 
     if (x < 0) return R_DT_0;
     if (!R_FINITE(x)) return R_DT_1;
@@ -53,16 +53,19 @@ double pnbinom_mu(double x, double size, double mu, int lower_tail, int log_p)
 #ifdef IEEE_754
     if (ISNAN(x) || ISNAN(size) || ISNAN(mu))
 	return x + size + mu;
-    if(!R_FINITE(size) || !R_FINITE(mu))	ML_ERR_return_NAN;
+    if(!R_FINITE(mu))	ML_ERR_return_NAN;
 #endif
     if (size < 0 || mu < 0)	ML_ERR_return_NAN;
 
     /* limiting case: point mass at zero */
-    if (size == 0) 
-        return (x >= 0) ? R_DT_1 : R_DT_0; 
+    if (size == 0)
+        return (x >= 0) ? R_DT_1 : R_DT_0;
 
     if (x < 0) return R_DT_0;
     if (!R_FINITE(x)) return R_DT_1;
+    if (!R_FINITE(size)) // limit case: Poisson
+	return(ppois(x, mu, lower_tail, log_p));
+
     x = floor(x + 1e-7);
     /* return
      * pbeta(pr, size, x + 1, lower_tail, log_p);  pr = size/(size + mu), 1-pr = mu/(size+mu)
diff --git a/src/nmath/pnchisq.c b/src/nmath/pnchisq.c
index 86d9ffb..6dfb49f 100644
--- a/src/nmath/pnchisq.c
+++ b/src/nmath/pnchisq.c
@@ -11,8 +11,8 @@
  *    distribution function. Appl.Statist., 41, 478-482.
 
  *  Other parts
- *  Copyright (C) 2000-2014  The R Core Team
- *  Copyright (C) 2003-2014  The R Foundation
+ *  Copyright (C) 2000-2015  The R Core Team
+ *  Copyright (C) 2003-2015  The R Foundation
  */
 
 
@@ -23,7 +23,7 @@
 /*----------- DEBUGGING -------------
  *
  *	make CFLAGS='-DDEBUG_pnch ....'
-(cd ~/R/D/r-devel/debian-64-inst/src/nmath; gcc -I. -I../../src/include -I../../../R/src/include -I/usr/local/include -DHAVE_CONFIG_H -DDEBUG_pnch -fopenmp -g -pedantic -Wall --std=gnu99 -DDEBUG_q -Wcast-align -Wclobbered  -c ../../../R/src/nmath/pnchisq.c -o pnchisq.o )
+(cd `R-devel RHOME`/src/nmath; gcc -I. -I../../src/include -I../../../R/src/include -I/usr/local/include -DHAVE_CONFIG_H -fopenmp -g -O0 -pedantic -Wall --std=gnu99 -DDEBUG_pnch -DDEBUG_q -Wcast-align -Wclobbered  -c ../../../R/src/nmath/pnchisq.c -o pnchisq.o )
 
  * -- Feb.6, 2000 (R pre0.99); M.Maechler:  still have
  * bad precision & non-convergence in some cases (x ~= f, both LARGE)
@@ -90,12 +90,14 @@ pnchisq_raw(double x, double f, double theta /* = ncp */,
     LDOUBLE ans, u, v, t, lt, lu =-1;
 
     if (x <= 0.) {
-	if(x == 0. && f == 0.)
-	    return lower_tail ? exp(-0.5*theta) : -expm1(-0.5*theta);
+	if(x == 0. && f == 0.) {
+#define _L  (-0.5 * theta) // = -lambda
+	    return lower_tail ? R_D_exp(_L) : (log_p ? R_Log1_Exp(_L) : -expm1(_L));
+	}
 	/* x < 0  or {x==0, f > 0} */
-	return lower_tail ? 0. : 1.;
+	return R_DT_0;
     }
-    if(!R_FINITE(x))	return lower_tail ? 1. : 0.;
+    if(!R_FINITE(x))	return R_DT_1;
 
     /* This is principally for use from qnchisq */
 #ifndef MATHLIB_STANDALONE
@@ -103,7 +105,7 @@ pnchisq_raw(double x, double f, double theta /* = ncp */,
 #endif
 
     if(theta < 80) { /* use 110 for Inf, as ppois(110, 80/2, lower.tail=FALSE) is 2e-20 */
-	LDOUBLE sum, sum2, lambda = 0.5 * theta, pr, ans;
+	LDOUBLE ans;
 	int i;
 	// Have  pgamma(x,s) < x^s / Gamma(s+1) (< and ~= for small x)
 	// ==> pchisq(x, f) = pgamma(x, f/2, 2) = pgamma(x/2, f/2)
@@ -115,10 +117,11 @@ pnchisq_raw(double x, double f, double theta /* = ncp */,
 	   log(x) < M_LN2 + 2/f*(lgamma(f/2. + 1) + _dbl_min_exp)) {
 	    // all  pchisq(x, f+2*i, lower_tail, FALSE), i=0,...,110 would underflow to 0.
 	    // ==> work in log scale
+	    double lambda = 0.5 * theta;
+	    double sum, sum2, pr = -lambda;
 	    sum = sum2 = ML_NEGINF;
-	    pr = -lambda;
 	    /* we need to renormalize here: the result could be very close to 1 */
-	    for(i = 0; i < 110;  pr += LOG(lambda) - LOG(++i)) {
+	    for(i = 0; i < 110;  pr += log(lambda) - log(++i)) {
 		sum2 = logspace_add(sum2, pr);
 		sum = logspace_add(sum, pr + pchisq(x, f+2*i, lower_tail, TRUE));
 		if (sum2 >= -1e-15) /*<=> EXP(sum2) >= 1-1e-15 */ break;
@@ -131,8 +134,8 @@ pnchisq_raw(double x, double f, double theta /* = ncp */,
 	    return (double) (log_p ? ans : EXP(ans));
 	}
 	else {
-	    sum = sum2 = 0;
-	    pr = EXP(-lambda); // does this need a feature test?
+	    LDOUBLE lambda = 0.5 * theta;
+	    LDOUBLE sum = 0, sum2 = 0, pr = EXP(-lambda); // does this need a feature test?
 	    /* we need to renormalize here: the result could be very close to 1 */
 	    for(i = 0; i < 110;  pr *= lambda/++i) {
 		// pr == exp(-lambda) lambda^i / i!  ==  dpois(i, lambda)
@@ -295,5 +298,6 @@ pnchisq_raw(double x, double f, double theta /* = ncp */,
 #ifdef DEBUG_pnch
     REprintf("\n == L_End: n=%d; term= %g; bound=%g\n",n,term,bound);
 #endif
-    return (double) R_DT_val(ans);
+    double dans = (double) ans;
+    return R_DT_val(dans);
 }
diff --git a/src/nmath/pnf.c b/src/nmath/pnf.c
index ea5ba66..8638716 100644
--- a/src/nmath/pnf.c
+++ b/src/nmath/pnf.c
@@ -15,7 +15,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  *
  *  DESCRIPTION
  *
diff --git a/src/nmath/pnorm.c b/src/nmath/pnorm.c
index a2cf16f..8ececc7 100644
--- a/src/nmath/pnorm.c
+++ b/src/nmath/pnorm.c
@@ -16,7 +16,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  *
  *  SYNOPSIS
  *
diff --git a/src/nmath/pnt.c b/src/nmath/pnt.c
index 5ea5471..e0d3f85 100644
--- a/src/nmath/pnt.c
+++ b/src/nmath/pnt.c
@@ -1,6 +1,6 @@
 /*
  *  Mathlib : A C Library of Special Functions
- *  Copyright (C) 1998-2012 The R Core Team
+ *  Copyright (C) 1998-2015 The R Core Team
  *  based on AS243 (C) 1989 Royal Statistical Society
  *
  *  This program is free software; you can redistribute it and/or modify
@@ -15,7 +15,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  */
 
 /*  Algorithm AS 243  Lenth,R.V. (1989). Appl. Statist., Vol.38, 185-189.
@@ -46,7 +46,8 @@
  *	make CFLAGS='-DDEBUG_pnt -g'
 
  * -- Feb.3, 1999; M.Maechler:
-	- For 't > ncp > 20' (or so)	the result is completely WRONG!
+	- For 't > ncp > 20' (or so)	the result is completely WRONG!  <== no longer true
+	- but for ncp > 100
  */
 
 double pnt(double t, double df, double ncp, int lower_tail, int log_p)
@@ -81,7 +82,7 @@ double pnt(double t, double df, double ncp, int lower_tail, int log_p)
 	/* Approx. from	 Abramowitz & Stegun 26.7.10 (p.949) */
 	s = 1./(4.*df);
 
-	return pnorm((double)(tt*(1. - s)), del, 
+	return pnorm((double)(tt*(1. - s)), del,
 		     sqrt((double) (1. + tt*tt*2.*s)),
 		     lower_tail != negdel, log_p);
     }
@@ -109,21 +110,21 @@ double pnt(double t, double df, double ncp, int lower_tail, int log_p)
 	    return R_DT_0;
 	}
 #ifdef DEBUG_pnt
-        REprintf("it  1e5*(godd,   geven)|          p           q           s"
-               /* 1.3 1..4..7.9 1..4..7.9|1..4..7.901 1..4..7.901 1..4..7.901 */
-                 "        pnt(*)     errbd\n");
-               /* 1..4..7..0..34 1..4..7.9*/
+	REprintf("it  1e5*(godd,   geven)|          p           q           s"
+	       /* 1.3 1..4..7.9 1..4..7.9|1..4..7.901 1..4..7.901 1..4..7.901 */
+		 "        pnt(*)     errbd\n");
+	       /* 1..4..7..0..34 1..4..7.9*/
 #endif
 	q = M_SQRT_2dPI * p * del;
 	s = .5 - p;
-        /* s = 0.5 - p = 0.5*(1 - exp(-.5 L)) =  -0.5*expm1(-.5 L)) */
-        if(s < 1e-7)
-            s = -0.5 * expm1(-0.5 * lambda);
+	/* s = 0.5 - p = 0.5*(1 - exp(-.5 L)) =  -0.5*expm1(-.5 L)) */
+	if(s < 1e-7)
+	    s = -0.5 * expm1(-0.5 * lambda);
 	a = .5;
 	b = .5 * df;
 	/* rxb = (1 - x) ^ b   [ ~= 1 - b*x for tiny x --> see 'xeven' below]
 	 *       where '(1 - x)' =: rxb {accurately!} above */
-        rxb = pow(rxb, b);
+	rxb = pow(rxb, b);
 	albeta = M_LN_SQRT_PI + lgammafn(b) - lgammafn(.5 + b);
 	xodd = pbeta(x, a, b, /*lower*/TRUE, /*log_p*/FALSE);
 	godd = 2. * rxb * exp(a * log(x) - albeta);
diff --git a/src/nmath/polygamma.c b/src/nmath/polygamma.c
index 5cfc9e9..f082b92 100644
--- a/src/nmath/polygamma.c
+++ b/src/nmath/polygamma.c
@@ -1,7 +1,7 @@
 /*
  *  Mathlib : A C Library of Special Functions
  *  Copyright (C) 1998 Ross Ihaka
- *  Copyright (C) 2000-2014 The R Core Team
+ *  Copyright (C) 2000-2015 The R Core Team
  *  Copyright (C) 2004-2009 The R Foundation
  *
  *  This program is free software; you can redistribute it and/or modify
@@ -16,7 +16,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  *
  *  SYNOPSIS
  *
@@ -120,8 +120,8 @@
  *
  *  AUTHOR
  *
- *    Amos, D. E.  	(Fortran)
- *    Ross Ihaka   	(C Translation)
+ *    Amos, D. E.	(Fortran)
+ *    Ross Ihaka	(C Translation)
  *    Martin Maechler   (x < 0, and psigamma())
  *
  *  REFERENCES
@@ -145,7 +145,7 @@
 
 #define n_max (100)
 
-/* From R, currently only used for kode = 1, m = 1, n in {0,1,2,3} : */
+/* From R, currently only used for kode = 1, m = 1 : */
 void dpsifn(double x, int n, int kode, int m, double *ans, int *nz, int *ierr)
 {
     const static double bvalues[] = {	/* Bernoulli Numbers */
@@ -481,7 +481,7 @@ void dpsifn(double x, int n, int kode, int m, double *ans, int *nz, int *ierr)
     }
 #else
 # define ML_TREAT_psigam(_IERR_)	\
-    if(_IERR_ != 0) 			\
+    if(_IERR_ != 0)			\
 	return ML_NAN
 #endif
 
diff --git a/src/nmath/ppois.c b/src/nmath/ppois.c
index c96689f..21e49fb 100644
--- a/src/nmath/ppois.c
+++ b/src/nmath/ppois.c
@@ -15,7 +15,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  *
  *  DESCRIPTION
  *
diff --git a/src/nmath/pt.c b/src/nmath/pt.c
index f5a6d96..1b7ecfc 100644
--- a/src/nmath/pt.c
+++ b/src/nmath/pt.c
@@ -15,7 +15,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  */
 
 #include "nmath.h"
@@ -60,7 +60,7 @@ double pt(double x, double n, int lower_tail, int log_p)
 	*/
 	double lval;
 	lval = -0.5*n*(2*log(fabs(x)) - log(n))
-	        - lbeta(0.5*n, 0.5) - log(0.5*n);
+		- lbeta(0.5*n, 0.5) - log(0.5*n);
 	val = log_p ? lval : exp(lval);
     } else {
 	val = (n > x * x)
diff --git a/src/nmath/ptukey.c b/src/nmath/ptukey.c
index c629ac8..8d414ba 100644
--- a/src/nmath/ptukey.c
+++ b/src/nmath/ptukey.c
@@ -15,7 +15,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  *
  *  SYNOPSIS
  *
diff --git a/src/nmath/punif.c b/src/nmath/punif.c
index 8de6a56..5247b9b 100644
--- a/src/nmath/punif.c
+++ b/src/nmath/punif.c
@@ -15,7 +15,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  *
  *  DESCRIPTION
  *
diff --git a/src/nmath/pweibull.c b/src/nmath/pweibull.c
index 67067d8..04bd274 100644
--- a/src/nmath/pweibull.c
+++ b/src/nmath/pweibull.c
@@ -1,7 +1,7 @@
 /*
  *  Mathlib : A C Library of Special Functions
  *  Copyright (C) 1998 Ross Ihaka
- *  Copyright (C) 2000-2002 The R Core Team
+ *  Copyright (C) 2000-2015 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
@@ -15,7 +15,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  *
  *  DESCRIPTION
  *
@@ -36,10 +36,7 @@ double pweibull(double x, double shape, double scale, int lower_tail, int log_p)
     if (x <= 0)
 	return R_DT_0;
     x = -pow(x / scale, shape);
-    if (lower_tail)
-	return (log_p
-		/* log(1 - exp(x))  for x < 0 : */
-		? R_Log1_Exp(x) : -expm1(x));
-    /* else:  !lower_tail */
-    return R_D_exp(x);
+    return lower_tail
+	? (log_p ? R_Log1_Exp(x) : -expm1(x))
+	: R_D_exp(x);
 }
diff --git a/src/nmath/qbeta.c b/src/nmath/qbeta.c
index d06aa53..ae4cdfb 100644
--- a/src/nmath/qbeta.c
+++ b/src/nmath/qbeta.c
@@ -1,7 +1,7 @@
 /*
  *  R : A Computer Language for Statistical Data Analysis
+ *  Copyright (C) 1998--2017  The R Core Team
  *  Copyright (C) 1995, 1996  Robert Gentleman and Ross Ihaka
- *  Copyright (C) 1998--2014  The R Core Team
  *  based on code (C) 1979 and later Royal Statistical Society
  *
  *  This program is free software; you can redistribute it and/or modify
@@ -16,7 +16,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  *
 
  * Reference:
@@ -28,218 +28,573 @@
  */
 
 
+#include <R_ext/Arith.h>
 #include "nmath.h"
 #include "dpq.h"
 
 #ifdef DEBUG_qbeta
-/* for REprintf */
-# include <R_ext/Print.h>
+# define R_ifDEBUG_printf(...) REprintf(__VA_ARGS__)
+#else
+# define R_ifDEBUG_printf(...)
+#endif
+
+#define USE_LOG_X_CUTOFF -5.
+//                       --- based on some testing; had = -10
+
+#define n_NEWTON_FREE 4
+//                   --- based on some testing; had = 10
+
+#define MLOGICAL_NA -1
+// an "NA_LOGICAL" substitute for Mathlib {only used here, for now}
+
+//attribute_hidden
+static void
+qbeta_raw(double alpha, double p, double q, int lower_tail, int log_p,
+	  int swap_01, double log_q_cut, int n_N, double* qb);
+
+double qbeta(double alpha, double p, double q, int lower_tail, int log_p)
+{
+
+    /* test for admissibility of parameters */
+#ifdef IEEE_754
+    if (ISNAN(p) || ISNAN(q) || ISNAN(alpha))
+	return p + q + alpha;
+#endif
+    if(p < 0. || q < 0.) ML_ERR_return_NAN;
+    // allowing p==0 and q==0  <==> treat as one- or two-point mass
+
+    double qbet[2];// = { qbeta(), 1 - qbeta() }
+    qbeta_raw(alpha, p, q, lower_tail, log_p,
+	      MLOGICAL_NA, USE_LOG_X_CUTOFF, n_NEWTON_FREE, qbet);
+    return qbet[0];
+}
+
+static const double
+#ifdef IEEE_754
+// CARE: assumes subnormal numbers, i.e., no underflow at DBL_MIN:
+    DBL_very_MIN  = DBL_MIN / 4.,
+    DBL_log_v_MIN = M_LN2*(DBL_MIN_EXP - 2),
+// Too extreme: inaccuracy in pbeta(); e.g for  qbeta(0.95, 1e-9, 20):
+// -> in pbeta() --> bgrat(..... b*z == 0 underflow, hence inaccurate pbeta()
+    /* DBL_very_MIN  = 0x0.0000001p-1022, // = 2^-1050 = 2^(-1022 - 28) */
+    /* DBL_log_v_MIN = -1050. * M_LN2, // = log(DBL_very_MIN) */
+// the most extreme -- not ok, as pbeta() then behaves strangely,
+// e.g., for  qbeta(0.95, 1e-8, 20):
+    /* DBL_very_MIN  = 0x0.0000000000001p-1022, // = 2^-1074 = 2^(-1022 -52) */
+    /* DBL_log_v_MIN = -1074. * M_LN2, // = log(DBL_very_MIN) */
+
+    DBL_1__eps    = 0x1.fffffffffffffp-1; // = 1 - 2^-53
+#else // untested :
+    DBL_1__eps    = 1 - DBL_EPSILON;     // or rather (1 - DBL_EPSILON/2) (??)
 #endif
 
-/* set the exponent of accu to -2r-2 for r digits of accuracy */
+/* set the exponent of acu to -2r-2 for r digits of accuracy */
 /*---- NEW ---- -- still fails for p = 1e11, q=.5*/
 
 #define fpu 3e-308
 /* acu_min:  Minimal value for accuracy 'acu' which will depend on (a,p);
 	     acu_min >= fpu ! */
 #define acu_min 1e-300
-#define lower fpu
-#define upper 1-2.22e-16
+#define p_lo fpu
+#define p_hi 1-2.22e-16
 
 #define const1 2.30753
 #define const2 0.27061
 #define const3 0.99229
 #define const4 0.04481
 
-
-double qbeta(double alpha, double p, double q, int lower_tail, int log_p)
+// Returns both qbeta() and its "mirror" 1-qbeta(). Useful notably when qbeta() ~= 1
+attribute_hidden void
+qbeta_raw(double alpha, double p, double q, int lower_tail, int log_p,
+	  int swap_01, // {TRUE, NA, FALSE}: if NA, algorithm decides swap_tail
+	  double log_q_cut, /* if == Inf: return log(qbeta(..));
+			       otherwise, if finite: the bound for
+			       switching to log(x)-scale; see use_log_x */
+	  int n_N,  // number of "unconstrained" Newton steps before switching to constrained
+	  double *qb) // = qb[0:1] = { qbeta(), 1 - qbeta() }
 {
-    int swap_tail, i_pb, i_inn;
-    Rboolean warned = FALSE;
-    double a, la, adj, logbeta, g, h, pp, p_, prev, qq, r, s, t, tx, w, y, wprev;
-    double acu;
-    volatile double xinbta;
+    Rboolean
+	swap_choose = (swap_01 == MLOGICAL_NA),
+	swap_tail,
+	log_, give_log_q = (log_q_cut == ML_POSINF),
+	use_log_x = give_log_q, // or u < log_q_cut  below
+	warned = FALSE, add_N_step = TRUE;
+    int i_pb, i_inn;
+    double a, la, logbeta, g, h, pp, p_, qq, r, s, t, w, y = -1.;
+    volatile double u, xinbta;
 
-    /* test for admissibility of parameters */
+    // Assuming p >= 0, q >= 0  here ...
 
-#ifdef IEEE_754
-    if (ISNAN(p) || ISNAN(q) || ISNAN(alpha))
-	return p + q + alpha;
-#endif
-    if(p < 0. || q < 0.) ML_ERR_return_NAN;
+    // Deal with boundary cases here:
+    if(alpha == R_DT_0) {
+#define return_q_0						\
+	if(give_log_q) { qb[0] = ML_NEGINF; qb[1] = 0; }	\
+	else {           qb[0] = 0;         qb[1] = 1; }	\
+	return
 
-    R_Q_P01_boundaries(alpha, 0, 1);
+	return_q_0;
+    }
+    if(alpha == R_DT_1) {
+#define return_q_1						\
+	if(give_log_q) { qb[0] = 0; qb[1] = ML_NEGINF; }	\
+	else {           qb[0] = 1; qb[1] = 0;         }	\
+	return
 
-    p_ = R_DT_qIv(alpha);/* lower_tail prob (in any case) */
-    // Conceptually,  0 < p_ < 1  (but can be 0 or 1 because of cancellation!)
+	return_q_1;
+    }
+
+    // check alpha {*before* transformation which may all accuracy}:
+    if((log_p && alpha > 0) ||
+       (!log_p && (alpha < 0 || alpha > 1))) { // alpha is outside
+	R_ifDEBUG_printf("qbeta(alpha=%g, %g, %g, .., log_p=%d): %s%s\n",
+			 alpha, p,q, log_p, "alpha not in ",
+			 log_p ? "[-Inf, 0]" : "[0,1]");
+	// ML_ERR_return_NAN :
+	ML_ERROR(ME_DOMAIN, "");
+	qb[0] = qb[1] = ML_NAN; return;
+    }
 
     //  p==0, q==0, p = Inf, q = Inf  <==> treat as one- or two-point mass
     if(p == 0 || q == 0 || !R_FINITE(p) || !R_FINITE(q)) {
-	// We know 0 < p_ < 1 : pbeta() is constant and trivial in {0, 1/2, 1}
-#ifdef DEBUG_qbeta
-	REprintf(
+	// We know 0 < T(alpha) < 1 : pbeta() is constant and trivial in {0, 1/2, 1}
+	R_ifDEBUG_printf(
 	    "qbeta(%g, %g, %g, lower_t=%d, log_p=%d): (p,q)-boundary: trivial\n",
 	    alpha, p,q, lower_tail, log_p);
-#endif
 	if(p == 0 && q == 0) { // point mass 1/2 at each of {0,1} :
-	    if(alpha < R_D_half) return 0.;
-	    if(alpha > R_D_half) return 1.;
+	    if(alpha < R_D_half) { return_q_0; }
+	    if(alpha > R_D_half) { return_q_1; }
 	    // else:  alpha == "1/2"
-	    return 0.5;
+#define return_q_half					\
+	    if(give_log_q) qb[0] = qb[1] = -M_LN2;	\
+	    else	   qb[0] = qb[1] = 0.5;		\
+	    return
+
+	    return_q_half;
 	} else if (p == 0 || p/q == 0) { // point mass 1 at 0 - "flipped around"
-	    return 0.;
+	    return_q_0;
 	} else if (q == 0 || q/p == 0) { // point mass 1 at 0 - "flipped around"
-	    return 1;
+	    return_q_1;
 	}
 	// else:  p = q = Inf : point mass 1 at 1/2
-	return 0.5;
+	return_q_half;
     }
 
-
-    if(log_p && (p_ == 0. || p_ == 1.))
-	return p_; /* better than NaN or infinite loop;
-		      FIXME: suboptimal, since -Inf < alpha ! */
-
     /* initialize */
+    p_ = R_DT_qIv(alpha);/* lower_tail prob (in any case) */
+    // Conceptually,  0 < p_ < 1  (but can be 0 or 1 because of cancellation!)
     logbeta = lbeta(p, q);
 
-    /* change tail if necessary;  afterwards   0 < a <= 1/2	 */
-    if (p_ <= 0.5) {
-	a = p_;	pp = p; qq = q; swap_tail = 0;
-	la = lower_tail ? R_D_log(alpha) : R_D_LExp(alpha);
-    } else { /* change tail, swap  p <-> q :*/
+    swap_tail = (swap_choose) ? (p_ > 0.5) : swap_01;
+    // change tail; default (swap_01 = NA): afterwards 0 < a <= 1/2
+    if(swap_tail) { /* change tail, swap  p <-> q :*/
 	a = R_DT_CIv(alpha); // = 1 - p_ < 1/2
 	/* la := log(a), but without numerical cancellation: */
-	la = lower_tail ? R_D_LExp(alpha) : R_D_log(alpha);
-	pp = q; qq = p; swap_tail = 1;
+	la = R_DT_Clog(alpha);
+	pp = q; qq = p;
+    }
+    else {
+	a = p_;
+	la = R_DT_log(alpha);
+	pp = p; qq = q;
     }
 
-#ifdef DEBUG_qbeta
-    REprintf("qbeta(%g, %g, %g, lower_t=%d, log_p=%d):%s\n"
-	     "  swap_tail=%d, la=%g: ",
-	     alpha, p,q, lower_tail, log_p,
-	     (log_p && (p_ == 0. || p_ == 1.)) ? (p_==0.?" p_=0":" p_=1") : "",
-	     swap_tail, la);
-#endif
     /* calculate the initial approximation */
 
-    /* y := {fast approximation of} qnorm(1 - a) :*/
+    /* Desired accuracy for Newton iterations (below) should depend on  (a,p)
+     * This is from Remark .. on AS 109, adapted.
+     * However, it's not clear if this is "optimal" for IEEE double prec.
+
+     * acu = fmax2(acu_min, pow(10., -25. - 5./(pp * pp) - 1./(a * a)));
+
+     * NEW: 'acu' accuracy NOT for squared adjustment, but simple;
+     * ---- i.e.,  "new acu" = sqrt(old acu)
+     */
+    double acu = fmax2(acu_min, pow(10., -13. - 2.5/(pp * pp) - 0.5/(a * a)));
+    // try to catch  "extreme left tail" early
+    double tx, u0 = (la + log(pp) + logbeta) / pp; // = log(x_0)
+    static const double
+	log_eps_c = M_LN2 * (1. - DBL_MANT_DIG);// = log(DBL_EPSILON) = -36.04..
+    r = pp*(1.-qq)/(pp+1.);
+
+    t = 0.2;
+    // FIXME: Factor 0.2 is a bit arbitrary;  '1' is clearly much too much.
+
+    R_ifDEBUG_printf(
+	"qbeta(%g, %g, %g, lower_t=%d, log_p=%d):%s\n"
+	"  swap_tail=%d, la=%#8g, u0=%#8g (bnd: %g (%g)) ",
+	alpha, p,q, lower_tail, log_p,
+	(log_p && (p_ == 0. || p_ == 1.)) ? (p_==0.?" p_=0":" p_=1") : "",
+	swap_tail, la, u0,
+	(t*log_eps_c - log(fabs(pp*(1.-qq)*(2.-qq)/(2.*(pp+2.)))))/2.,
+	 t*log_eps_c - log(fabs(r))
+	);
+
+    if(M_LN2 * DBL_MIN_EXP < u0 && // cannot allow exp(u0) = 0 ==> exp(u1) = exp(u0) = 0
+       u0 < -0.01 && // (must: u0 < 0, but too close to 0 <==> x = exp(u0) = 0.99..)
+       // qq <= 2 && // <--- "arbitrary"
+       // u0 <  t*log_eps_c - log(fabs(r)) &&
+       u0 < (t*log_eps_c - log(fabs(pp*(1.-qq)*(2.-qq)/(2.*(pp+2.)))))/2.)
+    {
+// TODO: maybe jump here from below, when initial u "fails" ?
+// L_tail_u:
+	// MM's one-step correction (cheaper than 1 Newton!)
+	r = r*exp(u0);// = r*x0
+	if(r > -1.) {
+	    u = u0 - log1p(r)/pp;
+	    R_ifDEBUG_printf("u1-u0=%9.3g --> choosing u = u1\n", u-u0);
+	} else {
+	    u = u0;
+	    R_ifDEBUG_printf("cannot cheaply improve u0\n");
+	}
+	tx = xinbta = exp(u);
+	use_log_x = TRUE; // or (u < log_q_cut)  ??
+	goto L_Newton;
+    }
+
+    // y := y_\alpha in AS 64 := Hastings(1955) approximation of qnorm(1 - a) :
     r = sqrt(-2 * la);
     y = r - (const1 + const2 * r) / (1. + (const3 + const4 * r) * r);
+
     if (pp > 1 && qq > 1) { // use  Carter(1947), see AS 109, remark '5.'
 	r = (y * y - 3.) / 6.;
 	s = 1. / (pp + pp - 1.);
 	t = 1. / (qq + qq - 1.);
 	h = 2. / (s + t);
 	w = y * sqrt(h + r) / h - (t - s) * (r + 5. / 6. - 2. / (3. * h));
-#ifdef DEBUG_qbeta
-	REprintf("p,q > 1 => w=%g", w);
-#endif
-	xinbta = pp / (pp + qq * exp(w + w));
-    } else {
-	r = qq + qq;
-	t = 1. / (9. * qq);
-	t = r * R_pow_di(1. - t + y * sqrt(t), 3);
-#ifdef DEBUG_qbeta
-	REprintf("min(p,q) <= 1: t=%g", t);
-#endif
-	if (t <= 0.) {
-#ifdef DEBUG_qbeta
-	    REprintf(" t <= 0: log1p(-a)=%.15g\n", log1p(-a));
-#endif
-	    xinbta = 1. - exp((log1p(-a)+ log(qq) + logbeta) / qq);
+	R_ifDEBUG_printf("p,q > 1 => w=%g", w);
+	if(w > 300) { // exp(w+w) is huge or overflows
+	    t = w+w + log(qq) - log(pp); // = argument of log1pexp(.)
+	    u = // log(xinbta) = - log1p(qq/pp * exp(w+w)) = -log(1 + exp(t))
+		(t <= 18) ? -log1p(exp(t)) : -t - exp(-t);
+	    xinbta = exp(u);
 	} else {
-	    t = (4. * pp + r - 2.) / t;
-#ifdef DEBUG_qbeta
-	    REprintf(" t >= 0:  new t = %g ( > 1 ?)\n", t);
-#endif
-	    if (t <= 1.)
-		xinbta = exp((log(a * pp) + logbeta) / pp);
+	    xinbta = pp / (pp + qq * exp(w + w));
+	    u = // log(xinbta)
+		- log1p(qq/pp * exp(w+w));
+	}
+    } else { // use the original AS 64 proposal, Scheffé-Tukey (1944) and Wilson-Hilferty
+	r = qq + qq;
+	/* A slightly more stable version of  t := \chi^2_{alpha} of AS 64
+	 * t = 1. / (9. * qq); t = r * R_pow_di(1. - t + y * sqrt(t), 3);  */
+	t = 1. / (3. * sqrt(qq));
+	t = r * R_pow_di(1. + t*(-t + y), 3);// = \chi^2_{alpha} of AS 64
+	s = 4. * pp + r - 2.;// 4p + 2q - 2 = numerator of new t = (...) / chi^2
+	R_ifDEBUG_printf("min(p,q) <= 1: t=%g", t);
+	if (t == 0 || (t < 0. && s >= t)) { // cannot use chisq approx
+	    // x0 = 1 - { (1-a)*q*B(p,q) } ^{1/q}    {AS 65}
+	    // xinbta = 1. - exp((log(1-a)+ log(qq) + logbeta) / qq);
+	    double l1ma;/* := log(1-a), directly from alpha (as 'la' above):
+			 * FIXME: not worth it? log1p(-a) always the same ?? */
+	    if(swap_tail)
+		l1ma = R_DT_log(alpha);
 	    else
+		l1ma = R_DT_Clog(alpha);
+	    R_ifDEBUG_printf(" t <= 0 : log1p(-a)=%.15g, better l1ma=%.15g\n", log1p(-a), l1ma);
+	    double xx = (l1ma + log(qq) + logbeta) / qq;
+	    if(xx <= 0.) {
+		xinbta = -expm1(xx);
+		u = R_Log1_Exp (xx);// =  log(xinbta) = log(1 - exp(...A...))
+	    } else { // xx > 0 ==> 1 - e^xx < 0 .. is nonsense
+		R_ifDEBUG_printf(" xx=%g > 0: xinbta:= 1-e^xx < 0\n", xx);
+		xinbta = 0; u = ML_NEGINF; /// FIXME can do better?
+	    }
+	} else {
+	    t = s / t;
+	    R_ifDEBUG_printf(" t > 0 or s < t < 0:  new t = %g ( > 1 ?)\n", t);
+	    if (t <= 1.) { // cannot use chisq, either
+		u = (la + log(pp) + logbeta) / pp;
+		xinbta = exp(u);
+	    } else { // (1+x0)/(1-x0) = t,  solved for x0 :
 		xinbta = 1. - 2. / (t + 1.);
+		u = log1p(-2. / (t + 1.));
+	    }
 	}
     }
 
-    /* Desired accuracy for Newton iterations (below) should depend on  (a,p)
-     * This is from Remark .. on AS 109, adapted.
-     * However, it's not clear if this is "optimal" for IEEE double prec.
+    // Problem: If initial u is completely wrong, we make a wrong decision here
+    if(swap_choose &&
+       (( swap_tail && u >= -exp(  log_q_cut)) || // ==> "swap back"
+	(!swap_tail && u >= -exp(4*log_q_cut) && pp / qq < 1000.) // ==> "swap now"
+	   )) {
+	// "revert swap" -- and use_log_x
+	swap_tail = !swap_tail;
+	R_ifDEBUG_printf(" u = %g (e^u = xinbta = %.16g) ==> ", u, xinbta);
+	if(swap_tail) { // "swap now" (much less easily)
+	    a = R_DT_CIv(alpha); // needed ?
+	    la = R_DT_Clog(alpha);
+	    pp = q; qq = p;
+	}
+	else { // swap back :
+	    a = p_;
+	    la = R_DT_log(alpha);
+	    pp = p; qq = q;
+	}
+	R_ifDEBUG_printf("\"%s\"; la = %g\n",
+			 (swap_tail ? "swap now" : "swap back"), la);
+	// we could redo computations above, but this should be stable
+	u = R_Log1_Exp(u);
+	xinbta = exp(u);
 
-     * acu = fmax2(acu_min, pow(10., -25. - 5./(pp * pp) - 1./(a * a)));
+/* Careful: "swap now"  should not fail if
+   1) the above initial xinbta is "completely wrong"
+   2) The correction step can go outside (u_n > 0 ==>  e^u > 1 is illegal)
+   e.g., for  qbeta(0.2066, 0.143891, 0.05)
+*/
+    } else R_ifDEBUG_printf("\n");
 
-     * NEW: 'acu' accuracy NOT for squared adjustment, but simple;
-     * ---- i.e.,  "new acu" = sqrt(old acu)
-    */
-    acu = fmax2(acu_min, pow(10.0, -13.0 - 2.5/(pp * pp) - 0.5/(a * a)));
+    if(!use_log_x)
+	use_log_x = (u < log_q_cut);// <==> xinbta = e^u < exp(log_q_cut)
+    Rboolean
+	bad_u = !R_FINITE(u),
+	bad_init = bad_u || xinbta > p_hi;
 
-#ifdef DEBUG_qbeta
-    REprintf(" -> xinbta = %.16g (Newton acu=%g)\n", xinbta, acu);
-#endif
+    R_ifDEBUG_printf(" -> u = %g, e^u = xinbta = %.16g, (Newton acu=%g%s%s%s)\n",
+		     u, xinbta, acu, (bad_u ? ", ** bad u **" : ""),
+		     ((bad_init && !bad_u) ? ", ** bad_init **" : ""),
+		     (use_log_x ? ", on u = LOG(x) SCALE" : ""));
+
+    double u_n = 1.; // -Wall
+    tx = xinbta; // keeping "original initial x" (for now)
+
+    if(bad_u || u < log_q_cut) {
+	/* e.g.
+	   qbeta(0.21, .001, 0.05)
+	   try "left border" quickly, i.e.,
+	   try at smallest positive number: */
+	w = pbeta_raw(DBL_very_MIN, pp, qq, TRUE, log_p);
+	if(w > (log_p ? la : a)) {
+	    R_ifDEBUG_printf(
+		" quantile is left of %g; \"convergence\"\n", DBL_very_MIN);
+	    if(log_p || fabs(w - a) < fabs(0 - a)) { // DBL_very_MIN is better than 0
+		tx   = DBL_very_MIN;
+		u_n  = DBL_log_v_MIN;// = log(DBL_very_MIN)
+	    } else {
+		tx   = 0.;
+		u_n  = ML_NEGINF;
+	    }
+	    use_log_x = log_p; add_N_step = FALSE; goto L_return;
+	}
+	else {
+	    R_ifDEBUG_printf(" pbeta(%g, *) = %g <= %g (= %s) --> continuing\n",
+			     DBL_log_v_MIN, w, (log_p ? la : a), (log_p ? "la" : "a"));
+	    if(u  < DBL_log_v_MIN) {
+		u = DBL_log_v_MIN;// = log(DBL_very_MIN)
+		xinbta = DBL_very_MIN;
+	    }
+	}
+    }
 
-    /* solve for x by a modified newton-raphson method, */
-    /* using the function pbeta_raw */
 
+    /* Sometimes the approximation is negative (and == 0 is also not "ok") */
+    if (bad_init && !(use_log_x && tx > 0)) {
+	if(u == ML_NEGINF) {
+	    R_ifDEBUG_printf("  u = -Inf;");
+	    u = M_LN2 * DBL_MIN_EXP;
+	    xinbta = DBL_MIN;
+	} else {
+	    R_ifDEBUG_printf(" bad_init: u=%g, xinbta=%g;", u,xinbta);
+	    xinbta = (xinbta > 1.1) // i.e. "way off"
+		? 0.5 // otherwise, keep the respective boundary:
+		: ((xinbta < p_lo) ? exp(u) : p_hi);
+	    if(bad_u)
+		u = log(xinbta);
+	    // otherwise: not changing "potentially better" u than the above
+	}
+	R_ifDEBUG_printf(" -> (partly)new u=%g, xinbta=%g\n", u,xinbta);
+    }
+
+L_Newton:
+    /* --------------------------------------------------------------------
+
+     * Solve for x by a modified Newton-Raphson method, using pbeta_raw()
+     */
     r = 1 - pp;
     t = 1 - qq;
-    wprev = 0.;
-    adj = 1;
-    /* Sometimes the approximation is negative! */
-    if (xinbta < lower)
-	xinbta = 0.5;
-    else if (xinbta > upper)
-	xinbta = 0.5;
-
-    tx = prev = 0.;	/* keep -Wall happy */
-    for (i_pb=0; i_pb < 1000; i_pb++) {
-	y = pbeta_raw(xinbta, pp, qq, /*lower_tail = */ TRUE, FALSE);
+    double wprev = 0., prev = 1., adj = 1.; // -Wall
+
+    if(use_log_x) { // find  log(xinbta) -- work in  u := log(x) scale
+	// if(bad_init && tx > 0) xinbta = tx;// may have been better
+
+	for (i_pb=0; i_pb < 1000; i_pb++) {
+	    // using log_p == TRUE  unconditionally here
+	    /* FIXME: if exp(u) = xinbta underflows to 0,
+	     *  want different formula pbeta_log(u, ..) */
+	    y = pbeta_raw(xinbta, pp, qq, /*lower_tail = */ TRUE, TRUE);
+
+	    /* w := Newton step size for   L(u) = log F(e^u)  =!= 0;   u := log(x)
+	     *   =  (L(.) - la) / L'(.);  L'(u)= (F'(e^u) * e^u ) / F(e^u)
+	     *   =  (L(.) - la)*F(.) / {F'(e^u) * e^u } =
+	     *   =  (L(.) - la) * e^L(.) * e^{-log F'(e^u) - u}
+	     *   =  ( y   - la) * e^{ y - u -log F'(e^u)}
+	     and  -log F'(x)= -log f(x) = - -logbeta + (1-p) log(x) + (1-q) log(1-x)
+	                                = logbeta + (1-p) u + (1-q) log(1-e^u)
+	    */
+	    w = (y == ML_NEGINF) // y = -Inf  well possible: we are on log scale!
+		? 0. : (y - la) * exp(y - u + logbeta + r * u + t * R_Log1_Exp(u));
+	    if(!R_FINITE(w))
+		break;
+	    if (i_pb >= n_N && w * wprev <= 0.)
+		prev = fmax2(fabs(adj),fpu);
+	    R_ifDEBUG_printf(
+		"N(i=%2d): u=%#20.16g, pb(e^u)=%#15.9g, w=%#15.9g, %s prev=%g,",
+		i_pb, u, y, w,
+		(i_pb >= n_N && w * wprev <= 0.) ? "new" : "old", prev);
+	    g = 1;
+	    for (i_inn=0; i_inn < 1000; i_inn++) {
+		adj = g * w;
+		// safe guard (here, from the very beginning)
+		if (fabs(adj) < prev) {
+		    u_n = u - adj; // u_{n+1} = u_n - g*w
+		    if (u_n <= 0.) { // <==> 0 <  xinbta := e^u  <= 1
+			if (prev <= acu || fabs(w) <= acu) {
+		 	    R_ifDEBUG_printf(
+				" it{in}=%d, -adj=%g, %s <= acu  ==> convergence\n",
+				i_inn, -adj, (prev <= acu) ? "prev" : "|w|");
+			    goto L_converged;
+			}
+			// if (u_n != ML_NEGINF && u_n != 1)
+			break;
+		    }
+		}
+		g /= 3;
+	    }
+	    // (cancellation in (u_n -u) => may differ from adj:
+	    double D = fmin2(fabs(adj), fabs(u_n - u));
+	    /* R_ifDEBUG_printf(" delta(u)=%g\n", u_n - u); */
+	    R_ifDEBUG_printf(" it{in}=%d, delta(u)=%9.3g, D/|.|=%.3g\n",
+			     i_inn, u_n - u, D/fabs(u_n + u));
+	    if (D <= 4e-16 * fabs(u_n + u))
+		goto L_converged;
+	    u = u_n;
+	    xinbta = exp(u);
+	    wprev = w;
+	} // for(i )
+
+    } else { // "normal scale" Newton
+
+	for (i_pb=0; i_pb < 1000; i_pb++) {
+	    y = pbeta_raw(xinbta, pp, qq, /*lower_tail = */ TRUE, log_p);
+	    // delta{y} :   d_y = y - (log_p ? la : a);
 #ifdef IEEE_754
-	if(!R_FINITE(y))
+	    if(!R_FINITE(y) && !(log_p && y == ML_NEGINF))// y = -Inf  is ok if(log_p)
 #else
 	    if (errno)
 #endif
-		ML_ERR_return_NAN;
+		{ // ML_ERR_return_NAN :
+		    ML_ERROR(ME_DOMAIN, "");
+		    qb[0] = qb[1] = ML_NAN; return;
+		}
 
-	w = (y - a) *
-	    exp(logbeta + r * log(xinbta) + t * log1p(-xinbta));
-	if (w * wprev <= 0.)
-	    prev = fmax2(fabs(adj),fpu);
-	g = 1;
-#ifdef DEBUG_qbeta
-	REprintf("N(i=%d): x0=%.15g, pb(x0)=%.15g, w=%.15g, prev=%g,", i_pb, xinbta, y, w, prev);
-#endif
-	for (i_inn=0; i_inn < 1000;i_inn++) {
-	    adj = g * w;
-	    if (fabs(adj) < prev) {
-		tx = xinbta - adj; // x_{n+1} = x_n - g*w
-		if (0. <= tx && tx <= 1.) {
-		    if (prev <= acu || fabs(w) <= acu) {
-#ifdef DEBUG_qbeta
-			REprintf(" it{in}=%d, delta(x)=%g, %s <= acu  ==> convergence\n",
-				 i_inn, -adj, (prev <= acu) ? "prev" : "|w|");
-#endif
-			goto L_converged;
+
+	    /* w := Newton step size  (F(.) - a) / F'(.)  or,
+	     * --   log: (lF - la) / (F' / F) = exp(lF) * (lF - la) / F'
+	     */
+	    w = log_p
+		? (y - la) * exp(y + logbeta + r * log(xinbta) + t * log1p(-xinbta))
+		: (y - a)  * exp(    logbeta + r * log(xinbta) + t * log1p(-xinbta));
+	    if (i_pb >= n_N && w * wprev <= 0.)
+		prev = fmax2(fabs(adj),fpu);
+	    R_ifDEBUG_printf(
+		"N(i=%2d): x0=%#17.15g, pb(x0)=%#15.9g, w=%#15.9g, %s prev=%g,",
+		i_pb, xinbta, y, w,
+		(i_pb >= n_N && w * wprev <= 0.) ? "new" : "old", prev);
+	    g = 1;
+	    for (i_inn=0; i_inn < 1000;i_inn++) {
+		adj = g * w;
+		// take full Newton steps at the beginning; only then safe guard:
+		if (i_pb < n_N || fabs(adj) < prev) {
+		    tx = xinbta - adj; // x_{n+1} = x_n - g*w
+		    if (0. <= tx && tx <= 1.) {
+			if (prev <= acu || fabs(w) <= acu) {
+			    R_ifDEBUG_printf(" it{in}=%d, delta(x)=%g, %s <= acu  ==> convergence\n",
+					     i_inn, -adj, (prev <= acu) ? "prev" : "|w|");
+			    goto L_converged;
+			}
+			if (tx != 0. && tx != 1)
+			    break;
 		    }
-		    if (tx != 0. && tx != 1)
-			break;
 		}
+		g /= 3;
 	    }
-	    g /= 3;
-	}
-#ifdef DEBUG_qbeta
-	REprintf(" it{in}=%d, delta(x)=%g\n", i_inn, -adj);
-#endif
-	if (fabs(tx - xinbta) <= 1e-15 * xinbta) // "<=" for xinbta == 0
-	    goto L_converged;
-	xinbta = tx;
-	wprev = w;
-    }
+	    R_ifDEBUG_printf(" it{in}=%d, delta(x)=%g\n", i_inn, tx - xinbta);
+	    if (fabs(tx - xinbta) <= 4e-16 * (tx + xinbta)) // "<=" : (.) == 0
+		goto L_converged;
+	    xinbta = tx;
+	    if(tx == 0) // "we have lost"
+		break;
+	    wprev = w;
+	} // for( i_pb ..)
+
+    } // end{else : normal scale Newton}
+
     /*-- NOT converged: Iteration count --*/
     warned = TRUE;
     ML_ERROR(ME_PRECISION, "qbeta");
 
 L_converged:
-#ifdef DEBUG_qbeta
-    REprintf(" %s: Final delta(y) = %g\n",
-	     warned ? "_NO_ convergence" : "converged", y - a);
-#endif
-    return swap_tail ? 1 - xinbta : xinbta;
+    log_ = log_p || use_log_x; // only for printing
+    R_ifDEBUG_printf(" %s: Final delta(y) = %g%s\n",
+		     warned ? "_NO_ convergence" : "converged",
+		     y - (log_ ? la : a), (log_ ? " (log_)" : ""));
+    if((log_ && y == ML_NEGINF) || (!log_ && y == 0)) {
+	// stuck at left, try if smallest positive number is "better"
+	w = pbeta_raw(DBL_very_MIN, pp, qq, TRUE, log_);
+	if(log_ || fabs(w - a) <= fabs(y - a)) {
+	    tx  = DBL_very_MIN;
+	    u_n = DBL_log_v_MIN;// = log(DBL_very_MIN)
+	}
+	add_N_step = FALSE; // not trying to do better anymore
+    }
+    else if(!warned && (log_ ? fabs(y - la) > 3 : fabs(y - a) > 1e-4)) {
+	if(!(log_ && y == ML_NEGINF &&
+	     // e.g. qbeta(-1e-10, .2, .03, log=TRUE) cannot get accurate ==> do NOT warn
+	     pbeta_raw(DBL_1__eps, // = 1 - eps
+		       pp, qq, TRUE, TRUE) > la + 2))
+	    MATHLIB_WARNING2( // low accuracy for more platform independent output:
+		"qbeta(a, *) =: x0 with |pbeta(x0,*%s) - alpha| = %.5g is not accurate",
+		(log_ ? ", log_" : ""), fabs(y - (log_ ? la : a)));
+    }
+L_return:
+    if(give_log_q) { // ==> use_log_x , too
+	if(!use_log_x) // (see if claim above is true)
+	    MATHLIB_WARNING(
+		"qbeta() L_return, u_n=%g;  give_log_q=TRUE but use_log_x=FALSE -- please report!",
+		u_n);
+	double r = R_Log1_Exp(u_n);
+	if(swap_tail) {
+	    qb[0] = r;	 qb[1] = u_n;
+	} else {
+	    qb[0] = u_n; qb[1] = r;
+	}
+    } else {
+	if(use_log_x) {
+	    if(add_N_step) {
+		/* add one last Newton step on original x scale, e.g., for
+		   qbeta(2^-98, 0.125, 2^-96) */
+		xinbta = exp(u_n);
+		y = pbeta_raw(xinbta, pp, qq, /*lower_tail = */ TRUE, log_p);
+		w = log_p
+		    ? (y - la) * exp(y + logbeta + r * log(xinbta) + t * log1p(-xinbta))
+		    : (y - a)  * exp(    logbeta + r * log(xinbta) + t * log1p(-xinbta));
+		tx = xinbta - w;
+		R_ifDEBUG_printf(" Final Newton correction(non-log scale):\n"
+								   //   \n  xinbta=%.16g
+				 "  xinbta=%.16g, y=%g, w=-Delta(x)=%g. \n=> new x=%.16g\n",
+		    xinbta, y, w, tx);
+	    } else {
+		if(swap_tail) {
+		    qb[0] = -expm1(u_n); qb[1] =  exp  (u_n);
+		} else {
+		    qb[0] =  exp  (u_n); qb[1] = -expm1(u_n);
+		}
+		return;
+	    }
+	}
+	if(swap_tail) {
+	    qb[0] = 1 - tx; qb[1] = tx;
+	} else {
+	    qb[0] = tx;	qb[1] = 1 - tx;
+	}
+    }
+    return;
 }
diff --git a/src/nmath/qbinom.c b/src/nmath/qbinom.c
index 54e91ab..da283bd 100644
--- a/src/nmath/qbinom.c
+++ b/src/nmath/qbinom.c
@@ -16,7 +16,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  *
  *  DESCRIPTION
  *
diff --git a/src/nmath/qcauchy.c b/src/nmath/qcauchy.c
index 34f8122..83bf093 100644
--- a/src/nmath/qcauchy.c
+++ b/src/nmath/qcauchy.c
@@ -17,7 +17,8 @@
  *  GNU General Public License for more details.
  *
  *  You should have received a copy of the GNU General Public License
- *  http://www.gnu.org/copyleft/gpl.html.
+ *  along with this program; if not, a copy is available at
+ *  https://www.R-project.org/Licenses/
  *
  *  DESCRIPTION
  *
diff --git a/src/nmath/qchisq.c b/src/nmath/qchisq.c
index abf48bd..91dba2a 100644
--- a/src/nmath/qchisq.c
+++ b/src/nmath/qchisq.c
@@ -15,7 +15,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  *
  *  DESCRIPTION
  *
diff --git a/src/nmath/qexp.c b/src/nmath/qexp.c
index 62b0dab..e2874b9 100644
--- a/src/nmath/qexp.c
+++ b/src/nmath/qexp.c
@@ -15,7 +15,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  *
  *  DESCRIPTION
  *
diff --git a/src/nmath/qf.c b/src/nmath/qf.c
index ab56e87..bb71a42 100644
--- a/src/nmath/qf.c
+++ b/src/nmath/qf.c
@@ -1,7 +1,7 @@
 /*
  *  Mathlib : A C Library of Special Functions
  *  Copyright (C) 1998 Ross Ihaka
- *  Copyright (C) 2000-8 The R Core Team
+ *  Copyright (C) 2000-2015 The R Core Team
  *  Copyright (C) 2005 The R Foundation
  *
  *  This program is free software; you can redistribute it and/or modify
@@ -16,7 +16,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  *
  *  DESCRIPTION
  *
@@ -43,13 +43,14 @@ double qf(double p, double df1, double df2, int lower_tail, int log_p)
     if (df1 <= df2 && df2 > 4e5) {
 	if(!R_FINITE(df1)) /* df1 == df2 == Inf : */
 	    return 1.;
- 	/* else */
+	/* else */
 	return qchisq(p, df1, lower_tail, log_p) / df1;
     }
     if (df1 > 4e5) { /* and so  df2 < df1 */
 	return df2 / qchisq(p, df2, !lower_tail, log_p);
     }
 
+    // FIXME: (1/qb - 1) = (1 - qb)/qb; if we know qb ~= 1, should use other tail
     p = (1. / qbeta(p, df2/2, df1/2, !lower_tail, log_p) - 1.) * (df2 / df1);
     return ML_VALID(p) ? p : ML_NAN;
 }
diff --git a/src/nmath/qgamma.c b/src/nmath/qgamma.c
index ae29475..ad359e6 100644
--- a/src/nmath/qgamma.c
+++ b/src/nmath/qgamma.c
@@ -1,8 +1,8 @@
 /*
  *  Mathlib : A C Library of Special Functions
  *  Copyright (C) 1998 Ross Ihaka
- *  Copyright (C) 2000--2011 The R Core Team
- *  Copyright (C) 2004--2009 The R Foundation
+ *  Copyright (C) 2000--2015 The R Core Team
+ *  Copyright (C) 2004--2015 The R Foundation
  *  based on AS 91 (C) 1979 Royal Statistical Society
  *
  *  This program is free software; you can redistribute it and/or modify
@@ -17,7 +17,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  *
  *  DESCRIPTION
  *
@@ -150,7 +150,8 @@ double qgamma(double p, double alpha, double scale, int lower_tail, int log_p)
     if (alpha < 1e-10) {
     /* Warning seems unnecessary now: */
 #ifdef _DO_WARN_qgamma_
-	MATHLIB_WARNING("value of shape (%g) is extremely small: results may be unreliable", alpha);
+	MATHLIB_WARNING(_("value of shape (%g) is extremely small: results may be unreliable"),
+			alpha);
 #endif
 	max_it_Newton = 7;/* may still be increased below */
     }
@@ -242,7 +243,7 @@ END:
    *
    * Improved (MM): - only if rel.Err > EPS_N (= 1e-15);
    *		    - also for lower_tail = FALSE	 or log_p = TRUE
-   * 		    - optionally *iterate* Newton
+   *		    - optionally *iterate* Newton
    */
     x = 0.5*scale*ch;
     if(max_it_Newton) {
diff --git a/src/nmath/qgeom.c b/src/nmath/qgeom.c
index c617e38..7f89226 100644
--- a/src/nmath/qgeom.c
+++ b/src/nmath/qgeom.c
@@ -1,8 +1,8 @@
 /*
  *  Mathlib : A C Library of Special Functions
  *  Copyright (C) 1998 	     Ross Ihaka
- *  Copyright (C) 2000-12    The R Core Team
- *  Copyright (C) 2004--2005 The R Foundation
+ *  Copyright (C) 2000--2016 The R Core Team
+ *  Copyright (C) 2004--2016 The R Foundation
  *
  *  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
@@ -16,7 +16,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  *
  *  DESCRIPTION
  *
@@ -28,16 +28,16 @@
 
 double qgeom(double p, double prob, int lower_tail, int log_p)
 {
-    if (prob <= 0 || prob > 1) ML_ERR_return_NAN;
-
-    R_Q_P01_boundaries(p, 0, ML_POSINF);
-
 #ifdef IEEE_754
     if (ISNAN(p) || ISNAN(prob))
 	return p + prob;
 #endif
+    if (prob <= 0 || prob > 1) ML_ERR_return_NAN;
 
+    R_Q_P01_check(p);
     if (prob == 1) return(0);
+    R_Q_P01_boundaries(p, 0, ML_POSINF);
+
 /* add a fuzz to ensure left continuity, but value must be >= 0 */
     return fmax2(0, ceil(R_DT_Clog(p) / log1p(- prob) - 1 - 1e-12));
 }
diff --git a/src/nmath/qhyper.c b/src/nmath/qhyper.c
index 0cc5590..69cd67e 100644
--- a/src/nmath/qhyper.c
+++ b/src/nmath/qhyper.c
@@ -15,7 +15,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  *
  *  DESCRIPTION
  *
diff --git a/src/nmath/qlnorm.c b/src/nmath/qlnorm.c
index c18ce9f..ea30520 100644
--- a/src/nmath/qlnorm.c
+++ b/src/nmath/qlnorm.c
@@ -16,7 +16,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  *
  *  DESCRIPTION
  *
diff --git a/src/nmath/qlogis.c b/src/nmath/qlogis.c
index 91cf62a..5f35a73 100644
--- a/src/nmath/qlogis.c
+++ b/src/nmath/qlogis.c
@@ -16,7 +16,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  */
 
 #include "nmath.h"
diff --git a/src/nmath/qnbeta.c b/src/nmath/qnbeta.c
index 22834ab..578e14c 100644
--- a/src/nmath/qnbeta.c
+++ b/src/nmath/qnbeta.c
@@ -14,7 +14,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  */
 
 #include "nmath.h"
diff --git a/src/nmath/qnbinom.c b/src/nmath/qnbinom.c
index 945669d..f3dd3b5 100644
--- a/src/nmath/qnbinom.c
+++ b/src/nmath/qnbinom.c
@@ -1,8 +1,8 @@
 /*
  *  Mathlib : A C Library of Special Functions
  *  Copyright (C) 1998 Ross Ihaka
- *  Copyright (C) 2000-2014 The R Core Team
- *  Copyright (C) 2005 The R Foundation
+ *  Copyright (C) 2000-2016 The R Core Team
+ *  Copyright (C) 2005-2016 The R Foundation
  *
  *  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
@@ -16,7 +16,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  *
  *  SYNOPSIS
  *
@@ -47,8 +47,7 @@
 static double
 do_search(double y, double *z, double p, double n, double pr, double incr)
 {
-    if(*z >= p) {
-			/* search to the left */
+    if(*z >= p) {	/* search to the left */
 	for(;;) {
 	    if(y == 0 ||
 	       (*z = pnbinom(y - incr, n, pr, /*l._t.*/TRUE, /*log_p*/FALSE)) < p)
@@ -57,7 +56,6 @@ do_search(double y, double *z, double p, double n, double pr, double incr)
 	}
     }
     else {		/* search to the right */
-
 	for(;;) {
 	    y = y + incr;
 	    if((*z = pnbinom(y, n, pr, /*l._t.*/TRUE, /*log_p*/FALSE)) >= p)
@@ -82,7 +80,7 @@ double qnbinom(double p, double size, double prob, int lower_tail, int log_p)
     if (prob == 0 && size == 0) return 0;
 
     if (prob <= 0 || prob > 1 || size < 0) ML_ERR_return_NAN;
- 
+
     if (prob == 1 || size == 0) return 0;
 
     R_Q_P01_boundaries(p, 0, ML_POSINF);
@@ -128,6 +126,8 @@ double qnbinom(double p, double size, double prob, int lower_tail, int log_p)
 
 double qnbinom_mu(double p, double size, double mu, int lower_tail, int log_p)
 {
+    if (size == ML_POSINF) // limit case: Poisson
+	return(qpois(p, mu, lower_tail, log_p));
 /* FIXME!  Implement properly!! (not losing accuracy for very large size (prob ~= 1)*/
     return qnbinom(p, size, /* prob = */ size/(size+mu), lower_tail, log_p);
 }
diff --git a/src/nmath/qnchisq.c b/src/nmath/qnchisq.c
index 2709cfc..0a7dad2 100644
--- a/src/nmath/qnchisq.c
+++ b/src/nmath/qnchisq.c
@@ -16,7 +16,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  */
 
 #include "nmath.h"
@@ -46,6 +46,9 @@ double qnchisq(double p, double df, double ncp, int lower_tail, int log_p)
 
     R_Q_P01_boundaries(p, 0, ML_POSINF);
 
+    pp = R_D_qIv(p);
+    if(pp > 1 - DBL_EPSILON) return lower_tail ? ML_POSINF : 0.0;
+
     /* Invert pnchisq(.) :
      * 1. finding an upper and lower bound */
     {
@@ -59,18 +62,18 @@ double qnchisq(double p, double df, double ncp, int lower_tail, int log_p)
 	if(ux < 0) ux = 1;
 	ux0 = ux;
     }
-    p = R_D_qIv(p);
 
     if(!lower_tail && ncp >= 80) {
-	/* pnchisq is only for lower.tail = TRUE */
-	if(p < 1e-10) ML_ERROR(ME_PRECISION, "qnchisq");
-	p = 1. - p;
+	/* in this case, pnchisq() works via lower_tail = TRUE */
+	if(pp < 1e-10) ML_ERROR(ME_PRECISION, "qnchisq");
+	p = /* R_DT_qIv(p)*/ log_p ? -expm1(p) : (0.5 - (p) + 0.5);
 	lower_tail = TRUE;
+    } else {
+	p = pp;
     }
 
+    pp = fmin2(1 - DBL_EPSILON, p * (1 + Eps));
     if(lower_tail) {
-	if(p > 1 - DBL_EPSILON) return ML_POSINF;
-	pp = fmin2(1 - DBL_EPSILON, p * (1 + Eps));
         for(; ux < DBL_MAX &&
 		pnchisq_raw(ux, df, ncp, Eps, rEps, 10000, TRUE, FALSE) < pp;
 	    ux *= 2);
@@ -81,8 +84,6 @@ double qnchisq(double p, double df, double ncp, int lower_tail, int log_p)
 	    lx *= 0.5);
     }
     else {
-	if(p > 1 - DBL_EPSILON) return 0.0;
-	pp = fmin2(1 - DBL_EPSILON, p * (1 + Eps));
         for(; ux < DBL_MAX &&
 		pnchisq_raw(ux, df, ncp, Eps, rEps, 10000, FALSE, FALSE) > pp;
 	    ux *= 2);
diff --git a/src/nmath/qnf.c b/src/nmath/qnf.c
index 26fc21c..7ac1d02 100644
--- a/src/nmath/qnf.c
+++ b/src/nmath/qnf.c
@@ -14,7 +14,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  */
 
 #include "nmath.h"
diff --git a/src/nmath/qnorm.c b/src/nmath/qnorm.c
index 390766d..f919868 100644
--- a/src/nmath/qnorm.c
+++ b/src/nmath/qnorm.c
@@ -17,7 +17,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  *
  *  SYNOPSIS
  *
diff --git a/src/nmath/qnt.c b/src/nmath/qnt.c
index fb3f0d8..81c240d 100644
--- a/src/nmath/qnt.c
+++ b/src/nmath/qnt.c
@@ -1,6 +1,6 @@
 /*
  *  R : A Computer Language for Statistical Data Analysis
- *  Copyright (C) 2006-2013 The R Core Team
+ *  Copyright (C) 2006-2015 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
@@ -14,7 +14,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  */
 
 #include "nmath.h"
@@ -31,8 +31,6 @@ double qnt(double p, double df, double ncp, int lower_tail, int log_p)
     if (ISNAN(p) || ISNAN(df) || ISNAN(ncp))
 	return p + df + ncp;
 #endif
-    if (!R_FINITE(df)) ML_ERR_return_NAN;
-
     /* Was
      * df = floor(df + 0.5);
      * if (df < 1 || ncp < 0) ML_ERR_return_NAN;
@@ -43,6 +41,9 @@ double qnt(double p, double df, double ncp, int lower_tail, int log_p)
 
     R_Q_P01_boundaries(p, ML_NEGINF, ML_POSINF);
 
+    if (!R_FINITE(df)) // df = Inf ==> limit N(ncp,1)
+	return qnorm(p, ncp, 1., lower_tail, log_p);
+
     p = R_DT_qIv(p);
 
     /* Invert pnt(.) :
diff --git a/src/nmath/qpois.c b/src/nmath/qpois.c
index a1a89b6..16eeef0 100644
--- a/src/nmath/qpois.c
+++ b/src/nmath/qpois.c
@@ -1,7 +1,7 @@
 /*
  *  Mathlib : A C Library of Special Functions
  *  Copyright (C) 1998 Ross Ihaka
- *  Copyright (C) 2000-2014 The R Core Team
+ *  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
@@ -15,7 +15,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  *
  *  DESCRIPTION
  *
@@ -65,9 +65,10 @@ double qpois(double p, double lambda, int lower_tail, int log_p)
     if(!R_FINITE(lambda))
 	ML_ERR_return_NAN;
     if(lambda < 0) ML_ERR_return_NAN;
+    R_Q_P01_check(p);
     if(lambda == 0) return 0;
-
-    R_Q_P01_boundaries(p, 0, ML_POSINF);
+    if(p == R_DT_0) return 0;
+    if(p == R_DT_1) return ML_POSINF;
 
     mu = lambda;
     sigma = sqrt(lambda);
diff --git a/src/nmath/qt.c b/src/nmath/qt.c
index 67d06f4..9893ab1 100644
--- a/src/nmath/qt.c
+++ b/src/nmath/qt.c
@@ -16,7 +16,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  *
  *  DESCRIPTION
  *
diff --git a/src/nmath/qtukey.c b/src/nmath/qtukey.c
index b486da8..5da39ad 100644
--- a/src/nmath/qtukey.c
+++ b/src/nmath/qtukey.c
@@ -16,7 +16,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  *
  *  SYNOPSIS
  *
diff --git a/src/nmath/qunif.c b/src/nmath/qunif.c
index 0c49736..0d26cdb 100644
--- a/src/nmath/qunif.c
+++ b/src/nmath/qunif.c
@@ -15,7 +15,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  *
  *  DESCRIPTION
  *
diff --git a/src/nmath/qweibull.c b/src/nmath/qweibull.c
index 4590f1e..cb93359 100644
--- a/src/nmath/qweibull.c
+++ b/src/nmath/qweibull.c
@@ -16,7 +16,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  *
  *  DESCRIPTION
  *
diff --git a/src/nmath/rbeta.c b/src/nmath/rbeta.c
index 32bb946..a55242d 100644
--- a/src/nmath/rbeta.c
+++ b/src/nmath/rbeta.c
@@ -1,8 +1,8 @@
 /*
  *  R : A Computer Language for Statistical Data Analysis
  *  Copyright (C) 1995, 1996  Robert Gentleman and Ross Ihaka
- *  Copyright (C) 2000--2010 The R Core Team
- *  Copyright (C) 2000, 2010 The R Foundation
+ *  Copyright (C) 2000--2016 The R Core Team
+ *  Copyright (C) 2001--2016 The R Foundation
  *
  *  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
@@ -16,7 +16,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  */
 
 /* Reference:
@@ -32,7 +32,7 @@
 
 double rbeta(double aa, double bb)
 {
-    if (aa < 0. || bb < 0.)
+    if (ISNAN(aa) || ISNAN(bb) || aa < 0. || bb < 0.)
 	ML_ERR_return_NAN;
     if (!R_FINITE(aa) && !R_FINITE(bb)) // a = b = Inf : all mass at 1/2
 	return 0.5;
diff --git a/src/nmath/rbinom.c b/src/nmath/rbinom.c
index d7a84e3..8faeefa 100644
--- a/src/nmath/rbinom.c
+++ b/src/nmath/rbinom.c
@@ -16,7 +16,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  *
  *  SYNOPSIS
  *
diff --git a/src/nmath/rcauchy.c b/src/nmath/rcauchy.c
index de32e32..c52d30e 100644
--- a/src/nmath/rcauchy.c
+++ b/src/nmath/rcauchy.c
@@ -15,7 +15,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  *
  *  SYNOPSIS
  *
diff --git a/src/nmath/rchisq.c b/src/nmath/rchisq.c
index c4f517b..f1fcdfb 100644
--- a/src/nmath/rchisq.c
+++ b/src/nmath/rchisq.c
@@ -15,7 +15,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  *
  *  SYNOPSIS
  *
diff --git a/src/nmath/rexp.c b/src/nmath/rexp.c
index 3302053..7f900b2 100644
--- a/src/nmath/rexp.c
+++ b/src/nmath/rexp.c
@@ -15,7 +15,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  *
  *  SYNOPSIS
  *
diff --git a/src/nmath/rf.c b/src/nmath/rf.c
index 60b0556..b26234c 100644
--- a/src/nmath/rf.c
+++ b/src/nmath/rf.c
@@ -15,7 +15,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  *
  *  SYNOPSIS
  *
diff --git a/src/nmath/rgamma.c b/src/nmath/rgamma.c
index 8815a20..8412ab4 100644
--- a/src/nmath/rgamma.c
+++ b/src/nmath/rgamma.c
@@ -1,7 +1,7 @@
 /*
  *  Mathlib : A C Library of Special Functions
  *  Copyright (C) 1998 Ross Ihaka
- *  Copyright (C) 2000--2008 The R Core Team
+ *  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
@@ -15,7 +15,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  *
  *  SYNOPSIS
  *
@@ -43,8 +43,9 @@
  *	  poisson and binomial distributions.
  *	  Computing, 12, 223-246.
  *
- *    Input: a = parameter (mean) of the standard gamma distribution.
- *    Output: a variate from the gamma(a)-distribution
+ *  Input : a     = 'shape' = alpha,
+ *          scale = 'scale' = 1/rate of the gamma distribution w/ mean E[.] = a * scale
+ *  Output: a variate from the gamma(a, scale)-distribution
  */
 
 #include "nmath.h"
@@ -85,14 +86,15 @@ double rgamma(double a, double scale)
 
     double e, p, q, r, t, u, v, w, x, ret_val;
 
-    if (!R_FINITE(a) || !R_FINITE(scale) || a < 0.0 || scale <= 0.0) {
-	if(scale == 0.) return 0.;
+    if (ISNAN(a) || ISNAN(scale))
+	ML_ERR_return_NAN;
+    if (a <= 0.0 || scale <= 0.0) {
+	if(scale == 0. || a == 0.) return 0.;
 	ML_ERR_return_NAN;
     }
+    if(!R_FINITE(a) || !R_FINITE(scale)) return ML_POSINF;
 
     if (a < 1.) { /* GS algorithm for parameters a < 1 */
-	if(a == 0)
-	    return 0.;
 	e = 1.0 + exp_m1 * a;
 	repeat {
 	    p = e * unif_rand();
diff --git a/src/nmath/rgeom.c b/src/nmath/rgeom.c
index d0cf2e5..c99e49b 100644
--- a/src/nmath/rgeom.c
+++ b/src/nmath/rgeom.c
@@ -15,7 +15,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  *
  *  SYNOPSIS
  *
@@ -30,13 +30,14 @@
  *
  *    We generate lambda as exponential with scale parameter
  *    p / (1 - p).  Return a Poisson deviate with mean lambda.
+ *    See Example 1.5 in Devroye (1986), Chapter 10, pages 488f.
  *
  *  REFERENCE
  *
  *    Devroye, L. (1986).
  *    Non-Uniform Random Variate Generation.
  *    New York: Springer-Verlag.
- *    Page 480.
+ *    Pages 488f.
  */
 
 #include "nmath.h"
diff --git a/src/nmath/rhyper.c b/src/nmath/rhyper.c
index 95908fb..3bf8f6f 100644
--- a/src/nmath/rhyper.c
+++ b/src/nmath/rhyper.c
@@ -1,8 +1,8 @@
 /*
  *  Mathlib : A C Library of Special Functions
  *  Copyright (C) 1998 Ross Ihaka
- *  Copyright (C) 2000-2014 The R Core Team
- *  Copyright (C) 2005	The R Foundation
+ *  Copyright (C) 2000-2015 The R Core Team
+ *  Copyright (C) 2005-2015 The R Foundation
  *
  *  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
@@ -16,7 +16,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  *
  *  SYNOPSIS
  *
@@ -43,16 +43,14 @@
 
 #include "nmath.h"
 #include "dpq.h"
+#include <limits.h>
 
-/* afc(i) :=  ln( i! )	[logarithm of the factorial i.
- *	   If (i > 7), use Stirling's approximation, otherwise use table lookup.
-*/
-
+// afc(i) :=  ln( i! )	[logarithm of the factorial i]
 static double afc(int i)
 {
-    const static double al[9] =
+    // If (i > 7), use Stirling's approximation, otherwise use table lookup.
+    const static double al[8] =
     {
-	0.0,
 	0.0,/*ln(0!)=ln(1)*/
 	0.0,/*ln(1!)=ln(1)*/
 	0.69314718055994530941723212145817,/*ln(2) */
@@ -61,66 +59,73 @@ static double afc(int i)
 	4.78749174278204599424770093452324,
 	6.57925121201010099506017829290394,
 	8.52516136106541430016553103634712
-	/*, 10.60460290274525022841722740072165*/
+	/* 10.60460290274525022841722740072165, approx. value below =
+	   10.6046028788027; rel.error = 2.26 10^{-9}
+
+	  FIXME: Use constants and if(n > ..) decisions from ./stirlerr.c
+	  -----  will be even *faster* for n > 500 (or so)
+	*/
     };
-    double di, value;
 
     if (i < 0) {
-      MATHLIB_WARNING(("rhyper.c: afc(i), i=%d < 0 -- SHOULD NOT HAPPEN!\n"),
-		      i);
-      return -1;/* unreached (Wall) */
-    } else if (i <= 7) {
-	value = al[i + 1];
-    } else {
-	di = i;
-	value = (di + 0.5) * log(di) - di + 0.08333333333333 / di
-	    - 0.00277777777777 / di / di / di + 0.9189385332;
+	MATHLIB_WARNING(("rhyper.c: afc(i), i=%d < 0 -- SHOULD NOT HAPPEN!\n"), i);
+	return -1; // unreached
     }
-    return value;
+    if (i <= 7)
+	return al[i];
+    // else i >= 8 :
+    double di = i, i2 = di*di;
+    return (di + 0.5) * log(di) - di + M_LN_SQRT_2PI +
+	(0.0833333333333333 - 0.00277777777777778 / i2) / di;
 }
 
+//     rhyper(NR, NB, n) -- NR 'red', NB 'blue', n drawn, how many are 'red'
 double rhyper(double nn1in, double nn2in, double kkin)
 {
-    const static double con = 57.56462733;
-    const static double deltal = 0.0078;
-    const static double deltau = 0.0034;
-    const static double scale = 1e25;
-
     /* extern double afc(int); */
 
     int nn1, nn2, kk;
-    int i, ix;
-    Rboolean reject, setup1, setup2;
-
-    double e, f, g, p, r, t, u, v, y;
-    double de, dg, dr, ds, dt, gl, gu, nk, nm, ub;
-    double xk, xm, xn, y1, ym, yn, yk, alv;
-
-    /* These should become `thread_local globals' : */
-    static int ks = -1;
-    static int n1s = -1, n2s = -1;
+    int ix; // return value (coerced to double at the very end)
+    Rboolean setup1, setup2;
 
-    static int k, m;
-    static int minjx, maxjx, n1, n2;
-
-    static double a, d, s, w;
-    static double tn, xl, xr, kl, kr, lamdl, lamdr, p1, p2, p3;
+    /* These should become 'thread_local globals' : */
+    static int ks = -1, n1s = -1, n2s = -1;
+    static int m, minjx, maxjx;
+    static int k, n1, n2; // <- not allowing larger integer par
+    static double tn;
 
+    // II :
+    static double w;
+    // III:
+    static double a, d, s, xl, xr, kl, kr, lamdl, lamdr, p1, p2, p3;
 
     /* check parameter validity */
 
     if(!R_FINITE(nn1in) || !R_FINITE(nn2in) || !R_FINITE(kkin))
 	ML_ERR_return_NAN;
 
-    nn1 = (int) R_forceint(nn1in);
-    nn2 = (int) R_forceint(nn2in);
-    kk	= (int) R_forceint(kkin);
+    nn1in = R_forceint(nn1in);
+    nn2in = R_forceint(nn2in);
+    kkin  = R_forceint(kkin);
 
-    if (nn1 < 0 || nn2 < 0 || kk < 0 || kk > nn1 + nn2)
+    if (nn1in < 0 || nn2in < 0 || kkin < 0 || kkin > nn1in + nn2in)
 	ML_ERR_return_NAN;
+    if (nn1in >= INT_MAX || nn2in >= INT_MAX || kkin >= INT_MAX) {
+	/* large n -- evade integer overflow (and inappropriate algorithms)
+	   -------- */
+        // FIXME: Much faster to give rbinom() approx when appropriate; -> see Kuensch(1989)
+	// Johnson, Kotz,.. p.258 (top) mention the *four* different binomial approximations
+	if(kkin == 1.) { // Bernoulli
+	    return rbinom(kkin, nn1in / (nn1in + nn2in));
+	}
+	// Slow, but safe: return  F^{-1}(U)  where F(.) = phyper(.) and  U ~ U[0,1]
+	return qhyper(unif_rand(), nn1in, nn2in, kkin, FALSE, FALSE);
+    }
+    nn1 = (int)nn1in;
+    nn2 = (int)nn2in;
+    kk  = (int)kkin;
 
     /* if new parameter values, initialize */
-    reject = TRUE;
     if (nn1 != n1s || nn2 != n2s) {
 	setup1 = TRUE;	setup2 = TRUE;
     } else if (kk != ks) {
@@ -149,55 +154,62 @@ double rhyper(double nn1in, double nn2in, double kkin)
 	}
     }
     if (setup1 || setup2) {
-	m = (int) ((k + 1.0) * (n1 + 1.0) / (tn + 2.0));
+	m = (int) ((k + 1.) * (n1 + 1.) / (tn + 2.));
 	minjx = imax2(0, k - n2);
 	maxjx = imin2(n1, k);
+#ifdef DEBUG_rhyper
+	REprintf("rhyper(nn1=%d, nn2=%d, kk=%d), setup: floor(mean)= m=%d, jx in (%d..%d)\n",
+		 nn1, nn2, kk, m, minjx, maxjx);
+#endif
     }
     /* generate random variate --- Three basic cases */
 
     if (minjx == maxjx) { /* I: degenerate distribution ---------------- */
+#ifdef DEBUG_rhyper
+	REprintf("rhyper(), branch I (degenerate)\n");
+#endif
 	ix = maxjx;
-	/* return ix;
-	   No, need to unmangle <TSL>*/
-	/* return appropriate variate */
+	goto L_finis; // return appropriate variate
 
-	if (kk + kk >= tn) {
-	  if (nn1 > nn2) {
-	    ix = kk - nn2 + ix;
-	  } else {
-	    ix = nn1 - ix;
-	  }
-	} else {
-	  if (nn1 > nn2)
-	    ix = kk - ix;
-	}
-	return ix;
-
-    } else if (m - minjx < 10) { /* II: inverse transformation ---------- */
+    } else if (m - minjx < 10) { // II: (Scaled) algorithm HIN (inverse transformation) ----
+	const static double scale = 1e25; // scaling factor against (early) underflow
+	const static double con = 57.5646273248511421;
+					  // 25*log(10) = log(scale) { <==> exp(con) == scale }
 	if (setup1 || setup2) {
+	    double lw; // log(w);  w = exp(lw) * scale = exp(lw + log(scale)) = exp(lw + con)
 	    if (k < n2) {
-		w = exp(con + afc(n2) + afc(n1 + n2 - k)
-			- afc(n2 - k) - afc(n1 + n2));
+		lw = afc(n2) + afc(n1 + n2 - k) - afc(n2 - k) - afc(n1 + n2);
 	    } else {
-		w = exp(con + afc(n1) + afc(k)
-			- afc(k - n2) - afc(n1 + n2));
+		lw = afc(n1) + afc(     k     ) - afc(k - n2) - afc(n1 + n2);
 	    }
+	    w = exp(lw + con);
 	}
+	double p, u;
+#ifdef DEBUG_rhyper
+	REprintf("rhyper(), branch II; w = %g > 0\n", w);
+#endif
       L10:
 	p = w;
 	ix = minjx;
 	u = unif_rand() * scale;
-      L20:
-	if (u > p) {
+#ifdef DEBUG_rhyper
+	REprintf("  _new_ u = %g\n", u);
+#endif
+	while (u > p) {
 	    u -= p;
-	    p *= (n1 - ix) * (k - ix);
+	    p *= ((double) n1 - ix) * (k - ix);
 	    ix++;
 	    p = p / ix / (n2 - k + ix);
+#ifdef DEBUG_rhyper
+	    REprintf("       ix=%3d, u=%11g, p=%20.14g (u-p=%g)\n", ix, u, p, u-p);
+#endif
 	    if (ix > maxjx)
 		goto L10;
-	    goto L20;
+	    // FIXME  if(p == 0.)  we also "have lost"  => goto L10
 	}
-    } else { /* III : h2pe --------------------------------------------- */
+    } else { /* III : H2PE Algorithm --------------------------------------- */
+
+	double u,v;
 
 	if (setup1 || setup2) {
 	    s = sqrt((tn - k) * k * n1 * n2 / (tn - 1) / tn / tn);
@@ -222,9 +234,24 @@ double rhyper(double nn1in, double nn2in, double kkin)
 	    p2 = p1 + kl / lamdl;
 	    p3 = p2 + kr / lamdr;
 	}
+#ifdef DEBUG_rhyper
+	REprintf("rhyper(), branch III {accept/reject}: (xl,xr)= (%g,%g); (lamdl,lamdr)= (%g,%g)\n",
+		 xl, xr, lamdl,lamdr);
+	REprintf("-------- p123= c(%g,%g,%g)\n", p1,p2, p3);
+#endif
+	int n_uv = 0;
       L30:
 	u = unif_rand() * p3;
 	v = unif_rand();
+	n_uv++;
+	if(n_uv >= 10000) {
+	    REprintf("rhyper() branch III: giving up after %d rejections", n_uv);
+	    ML_ERR_return_NAN;
+        }
+#ifdef DEBUG_rhyper
+	REprintf(" ... L30: new (u=%g, v ~ U[0,1])[%d]\n", u, n_uv);
+#endif
+
 	if (u < p1) {		/* rectangular region */
 	    ix = (int) (xl + u);
 	} else if (u <= p2) {	/* left tail */
@@ -240,6 +267,7 @@ double rhyper(double nn1in, double nn2in, double kkin)
 	}
 
 	/* acceptance/rejection test */
+	Rboolean reject = TRUE;
 
 	if (m < 100 || ix <= 50) {
 	    /* explicit evaluation */
@@ -248,7 +276,8 @@ double rhyper(double nn1in, double nn2in, double kkin)
 	       in the (m > ix) case, but the definition of the
 	       recurrence relation on p134 shows that the +1 is
 	       needed. */
-	    f = 1.0;
+	    int i;
+	    double f = 1.0;
 	    if (m < ix) {
 		for (i = m + 1; i <= ix; i++)
 		    f = f * (n1 - i + 1) * (k - i + 1) / (n2 - k + i) / i;
@@ -260,6 +289,17 @@ double rhyper(double nn1in, double nn2in, double kkin)
 		reject = FALSE;
 	    }
 	} else {
+
+	    const static double deltal = 0.0078;
+	    const static double deltau = 0.0034;
+
+	    double e, g, r, t, y;
+	    double de, dg, dr, ds, dt, gl, gu, nk, nm, ub;
+	    double xk, xm, xn, y1, ym, yn, yk, alv;
+
+#ifdef DEBUG_rhyper
+	    REprintf(" ... accept/reject 'large' case v=%g\n", v);
+#endif
 	    /* squeeze using upper and lower bounds */
 	    y = ix;
 	    y1 = y + 1.0;
@@ -319,11 +359,13 @@ double rhyper(double nn1in, double nn2in, double kkin)
 		    }
 		}
 	    }
-	}
+	} // else
 	if (reject)
 	    goto L30;
     }
 
+
+L_finis:
     /* return appropriate variate */
 
     if (kk + kk >= tn) {
diff --git a/src/nmath/rlnorm.c b/src/nmath/rlnorm.c
index 80f9a8d..f67628c 100644
--- a/src/nmath/rlnorm.c
+++ b/src/nmath/rlnorm.c
@@ -15,7 +15,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  *
  *  SYNOPSIS
  *
diff --git a/src/nmath/rlogis.c b/src/nmath/rlogis.c
index 1d72656..d951891 100644
--- a/src/nmath/rlogis.c
+++ b/src/nmath/rlogis.c
@@ -15,7 +15,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  */
 
 #include "nmath.h"
diff --git a/src/nmath/rmultinom.c b/src/nmath/rmultinom.c
index c215593..8cf7b53 100644
--- a/src/nmath/rmultinom.c
+++ b/src/nmath/rmultinom.c
@@ -14,7 +14,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  *
  *
  *  SYNOPSIS
@@ -83,7 +83,7 @@ void rmultinom(int n, double* prob, int K, int* rN)
     /* Generate the first K-1 obs. via binomials */
 
     for(k = 0; k < K-1; k++) { /* (p_tot, n) are for "remaining binomial" */
-	if(prob[k]) {
+	if(prob[k] != 0.) {
 	    pp = (double)(prob[k] / p_tot);
 	    /* printf("[%d] %.17f\n", k+1, pp); */
 	    rN[k] = ((pp < 1.) ? (int) rbinom((double) n,  pp) :
diff --git a/src/nmath/rnbinom.c b/src/nmath/rnbinom.c
index 7d01284..c421d84 100644
--- a/src/nmath/rnbinom.c
+++ b/src/nmath/rnbinom.c
@@ -1,7 +1,7 @@
 /*
  *  Mathlib : A C Library of Special Functions
  *  Copyright (C) 1998 Ross Ihaka
- *  Copyright (C) 2000--2006  The R Core Team
+ *  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
@@ -15,7 +15,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  *
  *  SYNOPSIS
  *
@@ -34,7 +34,7 @@
  *
  *    Devroye, L. (1986).
  *    Non-Uniform Random Variate Generation.
- *    New York:Springer-Verlag. Page 480.
+ *    New York:Springer-Verlag.  Pages 488 and 543.
  *
  *  METHOD
  *
@@ -46,15 +46,17 @@
 
 double rnbinom(double size, double prob)
 {
-    if(!R_FINITE(size) || !R_FINITE(prob) || size <= 0 || prob <= 0 || prob > 1)
+    if(!R_FINITE(prob) || ISNAN(size) || size <= 0 || prob <= 0 || prob > 1)
 	/* prob = 1 is ok, PR#1218 */
 	ML_ERR_return_NAN;
+    if(!R_FINITE(size)) size = DBL_MAX / 2.; // '/2' to prevent rgamma() returning Inf
     return (prob == 1) ? 0 : rpois(rgamma(size, (1 - prob) / prob));
 }
 
 double rnbinom_mu(double size, double mu)
 {
-    if(!R_FINITE(size) || !R_FINITE(mu) || size <= 0 || mu < 0)
+    if(!R_FINITE(mu) || ISNAN(size) || size <= 0 || mu < 0)
 	ML_ERR_return_NAN;
+    if(!R_FINITE(size)) size = DBL_MAX / 2.;
     return (mu == 0) ? 0 : rpois(rgamma(size, mu / size));
 }
diff --git a/src/nmath/rnchisq.c b/src/nmath/rnchisq.c
index 07c8c2a..cc3b87d 100644
--- a/src/nmath/rnchisq.c
+++ b/src/nmath/rnchisq.c
@@ -1,6 +1,6 @@
 /*
  *  Mathlib : A C Library of Special Functions
- *  Copyright (C) 2003 The R Foundation
+ *  Copyright (C) 2003--2015 The R Foundation
  *
  *  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
@@ -14,7 +14,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  *
  *  SYNOPSIS
  *
@@ -62,8 +62,7 @@ double rnchisq(double df, double lambda)
 	ML_ERR_return_NAN;
 
     if(lambda == 0.) {
-	if (df == 0.) ML_ERR_return_NAN;
-	return rgamma(df / 2., 2.);
+	return (df == 0.) ? 0. : rgamma(df / 2., 2.);
     }
     else {
 	double r = rpois( lambda / 2.);
diff --git a/src/nmath/rnorm.c b/src/nmath/rnorm.c
index f2a15d8..a0a56e7 100644
--- a/src/nmath/rnorm.c
+++ b/src/nmath/rnorm.c
@@ -15,7 +15,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  *
  *  SYNOPSIS
  *
diff --git a/src/nmath/rpois.c b/src/nmath/rpois.c
index e5ae7d6..71b05d8 100644
--- a/src/nmath/rpois.c
+++ b/src/nmath/rpois.c
@@ -15,7 +15,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  *
  *  SYNOPSIS
  *
diff --git a/src/nmath/rt.c b/src/nmath/rt.c
index 7957c38..8df7dc6 100644
--- a/src/nmath/rt.c
+++ b/src/nmath/rt.c
@@ -15,7 +15,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  *
  *  DESCRIPTION
  *
diff --git a/src/nmath/runif.c b/src/nmath/runif.c
index 1e9194f..455da92 100644
--- a/src/nmath/runif.c
+++ b/src/nmath/runif.c
@@ -15,7 +15,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  *
  *  DESCRIPTION
  *
diff --git a/src/nmath/rweibull.c b/src/nmath/rweibull.c
index 120e7cb..51b1e6a 100644
--- a/src/nmath/rweibull.c
+++ b/src/nmath/rweibull.c
@@ -15,7 +15,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  *
  *  DESCRIPTION
  *
diff --git a/src/nmath/sexp.c b/src/nmath/sexp.c
index 58b849f..450d7da 100644
--- a/src/nmath/sexp.c
+++ b/src/nmath/sexp.c
@@ -15,7 +15,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  *
  *  SYNOPSIS
  *
diff --git a/src/nmath/sign.c b/src/nmath/sign.c
index 2bbdcce..c30596a 100644
--- a/src/nmath/sign.c
+++ b/src/nmath/sign.c
@@ -14,7 +14,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  *
  *  SYNOPSIS
  *
diff --git a/src/nmath/signrank.c b/src/nmath/signrank.c
index eff11fe..4080067 100644
--- a/src/nmath/signrank.c
+++ b/src/nmath/signrank.c
@@ -14,7 +14,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  *
  *  SYNOPSIS
  *
diff --git a/src/nmath/snorm.c b/src/nmath/snorm.c
index a280ffe..73d17e5 100644
--- a/src/nmath/snorm.c
+++ b/src/nmath/snorm.c
@@ -15,7 +15,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  *
  *  SYNOPSIS
  *
diff --git a/src/nmath/standalone/Makefile.in b/src/nmath/standalone/Makefile.in
index 1402ff0..55f4749 100644
--- a/src/nmath/standalone/Makefile.in
+++ b/src/nmath/standalone/Makefile.in
@@ -59,7 +59,7 @@ libRmath_a_OBJECTS = $(OBJECTS)
 ## <FIXME>
 ## Change to 'libRmath.la' when using libtool for shlibs.
 ## Remove when using automake ...
-libRmath_la = libRmath$(DYLIB_EXT)
+libRmath_la = libRmath$(R_DYLIB_EXT)
 ## </FIXME>
 Rexeclibdir_LTLIBRARIES = $(libRmath_la)
 libRmath_la_SOURCES = $(SOURCES)
@@ -121,7 +121,8 @@ Makedeps: Makefile Copy ../../include/Rconfig.h
 	@touch $@
 
 libRmath.a: $(libRmath_a_OBJECTS)
-	$(AR) cr $@ $(libRmath_a_OBJECTS)
+	@rm -rf $@
+	$(AR) -cr $@ $(libRmath_a_OBJECTS)
 	$(RANLIB) $@
 
 ## under peculiar circumstances, $(LIBM) here helps.
diff --git a/src/nmath/standalone/Makefile.win b/src/nmath/standalone/Makefile.win
index f66e186..e224628 100644
--- a/src/nmath/standalone/Makefile.win
+++ b/src/nmath/standalone/Makefile.win
@@ -1,12 +1,12 @@
 #-*- Makefile -*-
 include ../../gnuwin32/MkRules
 
-CFLAGS=-O3 -Wall -pedantic $(EOPTS)
+CFLAGS = -O3 -Wall -pedantic $(EOPTS)
 ifdef DEBUG
- CFLAGS+=$(G_FLAG)
- DLLFLAGS=
+ CFLAGS += $(G_FLAG)
+ DLLFLAGS =
 else
- DLLFLAGS=-s
+ DLLFLAGS = -s
 endif
 
 .PHONY: cpy test
@@ -61,7 +61,7 @@ distclean: clean
 	@$(RM) *.a Rmath.dll test*.exe check.log
 
 DEFS = -DHAVE_CONFIG_H -DMATHLIB_STANDALONE
-CPPFLAGS=-I.. -I../../include $(DEFS)
+CPPFLAGS = -I.. -I../../include $(DEFS)
 
 SOURCES_NMATH = \
 	mlutils.c \
diff --git a/src/nmath/standalone/sunif.c b/src/nmath/standalone/sunif.c
index ef1dd95..862b306 100644
--- a/src/nmath/standalone/sunif.c
+++ b/src/nmath/standalone/sunif.c
@@ -14,7 +14,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  *
  */
 
diff --git a/src/nmath/standalone/test.c b/src/nmath/standalone/test.c
index 054c099..6be5c6f 100644
--- a/src/nmath/standalone/test.c
+++ b/src/nmath/standalone/test.c
@@ -14,7 +14,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  *
  */
 
diff --git a/src/nmath/stirlerr.c b/src/nmath/stirlerr.c
index 3380dda..1beb3dc 100644
--- a/src/nmath/stirlerr.c
+++ b/src/nmath/stirlerr.c
@@ -18,7 +18,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  *
  *
  *  DESCRIPTION
diff --git a/src/nmath/toms708.c b/src/nmath/toms708.c
index f19e5ea..3b01f4f 100644
--- a/src/nmath/toms708.c
+++ b/src/nmath/toms708.c
@@ -12,12 +12,10 @@
 #undef max
 #define max(a,b) ((a > b)?a:b)
 
-#include "nmath.h"
+#include "nmath.h" /* includes config.h, math.h */
 #include "dpq.h"
 /* after config.h to avoid warning on Solaris */
 #include <limits.h>
-/* <math.h> is included by above, with suitable defines in glibc systems
-   to make log1p and expm1 declared */
 
 /**----------- DEBUGGING -------------
  *
@@ -26,7 +24,6 @@
  (cd `R-devel-pbeta-dbg RHOME`/src/nmath ; gcc -I. -I../../src/include -I../../../R/src/include  -DHAVE_CONFIG_H -fopenmp -g -pedantic -Wall --std=gnu99 -DDEBUG_q -DDEBUG_bratio -Wcast-align -Wclobbered  -c ../../../R/src/nmath/toms708.c -o toms708.o; cd ../..; make R)
 */
 #ifdef DEBUG_bratio
-# include <R_ext/Print.h>
 # define R_ifDEBUG_printf(...) REprintf(__VA_ARGS__)
 #else
 # define R_ifDEBUG_printf(...)
@@ -65,7 +62,7 @@ static double gsumln(double, double);
 
 /*      ALGORITHM 708, COLLECTED ALGORITHMS FROM ACM.
  *      This work published in  Transactions On Mathematical Software,
- *      vol. 18, no. 3, September 1992, pp. 360-373z.
+ *      vol. 18, no. 3, September 1992, pp. 360-373.
  */
 
 /* Changes by R Core Team :
@@ -101,7 +98,14 @@ bratio(double a, double b, double x, double y, double *w, double *w1,
  *	  ierr = 5  if x + y != 1
  *	  ierr = 6  if x = a = 0
  *	  ierr = 7  if y = b = 0
- *	  ierr = 8  "error" in bgrat()
+ *	  ierr = 8	(not used currently)
+ *	  ierr = 9  NaN in a, b, x, or y
+ *	  ierr = 10     (not used currently)
+ *	  ierr = 11  bgrat() error code 1 [+ warning in bgrat()]
+ *	  ierr = 12  bgrat() error code 2   (no warning here)
+ *	  ierr = 13  bgrat() error code 3   (no warning here)
+ *	  ierr = 14  bgrat() error code 4 [+ WARNING in bgrat()]
+
 
  * --------------------
  *     Written by Alfred H. Morris, Jr.
@@ -112,34 +116,40 @@ bratio(double a, double b, double x, double y, double *w, double *w1,
 
     Rboolean do_swap;
     int n, ierr1 = 0;
-    double z, a0, b0, x0, y0, eps, lambda;
+    double z, a0, b0, x0, y0, lambda;
 
 /*  eps is a machine dependent constant: the smallest
- *      floating point number for which   1.0 + eps > 1.0 */
-    eps = 2.0 * Rf_d1mach(3); /* == DBL_EPSILON (in R, Rmath) */
+ *      floating point number for which   1. + eps > 1.
+ * NOTE: for almost all purposes it is replaced by 1e-15 (~= 4.5 times larger) below */
+    double eps = 2. * Rf_d1mach(3); /* == DBL_EPSILON (in R, Rmath) */
 
 /* ----------------------------------------------------------------------- */
     *w  = R_D__0;
     *w1 = R_D__0;
 
-    if (a < 0.0 || b < 0.0)   { *ierr = 1; return; }
-    if (a == 0.0 && b == 0.0) { *ierr = 2; return; }
-    if (x < 0.0 || x > 1.0)   {	*ierr = 3; return; }
-    if (y < 0.0 || y > 1.0)   { *ierr = 4; return; }
+#ifdef IEEE_754
+    // safeguard, preventing infinite loops further down
+    if (ISNAN(x) || ISNAN(y) ||
+	ISNAN(a) || ISNAN(b)) { *ierr = 9; return; }
+#endif
+    if (a < 0. || b < 0.)   { *ierr = 1; return; }
+    if (a == 0. && b == 0.) { *ierr = 2; return; }
+    if (x < 0. || x > 1.)   { *ierr = 3; return; }
+    if (y < 0. || y > 1.)   { *ierr = 4; return; }
 
     /* check that  'y == 1 - x' : */
     z = x + y - 0.5 - 0.5;
 
-    if (fabs(z) > eps * 3.0) { *ierr = 5; return; }
+    if (fabs(z) > eps * 3.) { *ierr = 5; return; }
 
     R_ifDEBUG_printf("bratio(a=%g, b=%g, x=%9g, y=%9g, .., log_p=%d): ",
 		     a,b,x,y, log_p);
     *ierr = 0;
-    if (x == 0.0) goto L200;
-    if (y == 0.0) goto L210;
+    if (x == 0.) goto L200;
+    if (y == 0.) goto L210;
 
-    if (a == 0.0) goto L211;
-    if (b == 0.0) goto L201;
+    if (a == 0.) goto L211;
+    if (b == 0.) goto L201;
 
     eps = max(eps, 1e-15);
     Rboolean a_lt_b = (a < b);
@@ -190,22 +200,22 @@ bratio(double a, double b, double x, double y, double *w, double *w1,
 	    goto L_end;
 	}
 
-	if (a0 < min(eps, eps * b0) && b0 * x0 <= 1.0) { /* L90: */
+	if (a0 < min(eps, eps * b0) && b0 * x0 <= 1.) { /* L90: */
 	    *w1 = apser(a0, b0, x0, eps);
 	    R_ifDEBUG_printf("  a0 small -> w1 := apser(*) = %.15g\n", *w1);
 	    goto L_end_from_w1;
 	}
 
 	Rboolean did_bup = FALSE;
-	if (max(a0,b0) > 1.0) { /* L20:  min(a,b) <= 1 < max(a,b)  */
+	if (max(a0,b0) > 1.) { /* L20:  min(a,b) <= 1 < max(a,b)  */
 	    R_ifDEBUG_printf("\n L20:  min(a,b) <= 1 < max(a,b); ");
-	    if (b0 <= 1.0) goto L_w_bpser;
+	    if (b0 <= 1.) goto L_w_bpser;
 
 	    if (x0 >= 0.29) /* was 0.3, PR#13786 */	goto L_w1_bpser;
 
 	    if (x0 < 0.1 && pow(x0*b0, a0) <= 0.7)	goto L_w_bpser;
 
-	    if (b0 > 15.0) {
+	    if (b0 > 15.) {
 		*w1 = 0.;
 		goto L131;
 	    }
@@ -228,7 +238,7 @@ bratio(double a, double b, double x, double y, double *w, double *w1,
 	REprintf(" ==> new w1=%.15g", *w1);
 	if(ierr1) REprintf(" ERROR(code=%d)\n", ierr1) ; else REprintf("\n");
 #endif
-	if(*w1 == 0 || (0 < *w1 && *w1 < 1e-310)) { // w1=0 or very close:
+	if(*w1 == 0 || (0 < *w1 && *w1 < DBL_MIN)) { // w1=0 or very close:
 	    // "almost surely" from underflow, try more: [2013-03-04]
 // FIXME: it is even better to do this in bgrat *directly* at least for the case
 //  !did_bup, i.e., where *w1 = (0 or -Inf) on entry
@@ -238,7 +248,7 @@ bratio(double a, double b, double x, double y, double *w, double *w1,
 	    }
 	    else *w1 = ML_NEGINF; // = 0 on log-scale
 	    bgrat(b0, a0, y0, x0, w1, 15*eps, &ierr1, TRUE);
-	    if(ierr1) *ierr = 8;
+	    if(ierr1) *ierr = 10 + ierr1;
 #ifdef DEBUG_bratio
 	    REprintf(" ==> new log(w1)=%.15g", *w1);
 	    if(ierr1) REprintf(" Error(code=%d)\n", ierr1) ; else REprintf("\n");
@@ -246,7 +256,7 @@ bratio(double a, double b, double x, double y, double *w, double *w1,
 	    goto L_end_from_w1_log;
 	}
 	// else
-	if(ierr1) *ierr = 8;
+	if(ierr1) *ierr = 10 + ierr1;
 	if(*w1 < 0)
 	    MATHLIB_WARNING4("bratio(a=%g, b=%g, x=%g): bgrat() -> w1 = %g",
 			     a,b,x, *w1);
@@ -254,12 +264,12 @@ bratio(double a, double b, double x, double y, double *w, double *w1,
     }
     else { /* L30: -------------------- both  a, b > 1  {a0 > 1  &  b0 > 1} ---*/
 
-	if (a > b)
-	    lambda = (a + b) * y - b;
-	else
-	    lambda = a - (a + b) * x;
-
-	do_swap = (lambda < 0.0);
+	/* lambda := a y - b x  =  (a + b)y  =  a - (a+b)x    {using x + y == 1},
+	 * ------ using the numerically best version : */
+	lambda = R_FINITE(a+b)
+	    ? ((a > b) ? (a + b) * y - b : a - (a + b) * x)
+	    : a*y - b*x;
+	do_swap = (lambda < 0.);
 	if (do_swap) {
 	    lambda = -lambda;
 	    SET_0_swap;
@@ -270,20 +280,20 @@ bratio(double a, double b, double x, double y, double *w, double *w1,
 	R_ifDEBUG_printf("  L30:  both  a, b > 1; |lambda| = %#g, do_swap = %d\n",
 			 lambda, do_swap);
 
-	if (b0 < 40.0) {
+	if (b0 < 40.) {
 	    R_ifDEBUG_printf("  b0 < 40;");
 	    if (b0 * x0 <= 0.7
-		|| (log_p && lambda > 650.)) /* << added 2010-03-18 */
+		|| (log_p && lambda > 650.)) // << added 2010-03; svn r51327
 		goto L_w_bpser;
 	    else
 		goto L140;
 	}
 	else if (a0 > b0) { /* ----  a0 > b0 >= 40  ---- */
 	    R_ifDEBUG_printf("  a0 > b0 >= 40;");
-	    if (b0 <= 100.0 || lambda > b0 * 0.03)
+	    if (b0 <= 100. || lambda > b0 * 0.03)
 		goto L_bfrac;
 
-	} else if (a0 <= 100.0) {
+	} else if (a0 <= 100.) {
 	    R_ifDEBUG_printf("  a0 <= 100; a0 <= b0 >= 40;");
 	    goto L_bfrac;
 	}
@@ -293,7 +303,7 @@ bratio(double a, double b, double x, double y, double *w, double *w1,
 	}
 
 	/* else if none of the above    L180: */
-	*w = basym(a0, b0, lambda, eps * 100.0, log_p);
+	*w = basym(a0, b0, lambda, eps * 100., log_p);
 	*w1 = log_p ? R_Log1_Exp(*w) : 0.5 - *w + 0.5;
 	R_ifDEBUG_printf("  b0 >= a0 > 100; lambda <= a0 * 0.03: *w:= basym(*) =%.15g\n",
 			 *w);
@@ -316,7 +326,7 @@ L_w1_bpser:  // was L110
     goto L_end;
 
 L_bfrac:
-    *w = bfrac(a0, b0, x0, y0, lambda, eps * 15.0, log_p);
+    *w = bfrac(a0, b0, x0, y0, lambda, eps * 15., log_p);
     *w1 = log_p ? R_Log1_Exp(*w) : 0.5 - *w + 0.5;
     R_ifDEBUG_printf(" L_bfrac: *w := bfrac(*) = %g\n", *w);
     goto L_end;
@@ -331,12 +341,13 @@ L140:
 
     *w = bup(b0, a0, y0, x0, n, eps, FALSE);
 
-    R_ifDEBUG_printf(" L140: *w := bup(b0=%g,..) = %.15g; ", b0, *w);
     if(*w < DBL_MIN && log_p) { /* do not believe it; try bpser() : */
+	R_ifDEBUG_printf(" L140: bup(b0=%g,..)=%.15g < DBL_MIN - not used; ", b0, *w);
 	/*revert: */ b0 += n;
 	/* which is only valid if b0 <= 1 || b0*x0 <= 0.7 */
 	goto L_w_bpser;
     }
+    R_ifDEBUG_printf(" L140: *w := bup(b0=%g,..) = %.15g; ", b0, *w);
     if (x0 <= 0.7) {
 	/* log_p :  TODO:  w = bup(.) + bpser(.)  -- not so easy to use log-scale */
 	*w += bpser(a0, b0, x0, eps, /* log_p = */ FALSE);
@@ -344,7 +355,7 @@ L140:
 	goto L_end_from_w;
     }
     /* L150: */
-    if (a0 <= 15.0) {
+    if (a0 <= 15.) {
 	n = 20;
 	*w += bup(a0, b0, x0, y0, n, eps, FALSE);
 	R_ifDEBUG_printf("\n a0 <= 15: *w := *w + bup(*) = %.15g;", *w);
@@ -352,7 +363,7 @@ L140:
     }
     R_ifDEBUG_printf(" bgrat(*, w=%.15g) ", *w);
     bgrat(a0, b0, x0, y0, w, 15*eps, &ierr1, FALSE);
-    if(ierr1) *ierr = 8;
+    if(ierr1) *ierr = 10 + ierr1;
 #ifdef DEBUG_bratio
     REprintf("==> new w=%.15g", *w);
     if(ierr1) REprintf(" Error(code=%d)\n", ierr1) ; else REprintf("\n");
@@ -363,12 +374,12 @@ L140:
 /* TERMINATION OF THE PROCEDURE */
 
 L200:
-    if (a == 0.0) { *ierr = 6;    return; }
+    if (a == 0.) { *ierr = 6;    return; }
     // else:
 L201: *w  = R_D__0; *w1 = R_D__1; return;
 
 L210:
-    if (b == 0.0) { *ierr = 7;    return; }
+    if (b == 0.) { *ierr = 7;    return; }
     // else:
 L211: *w  = R_D__1; *w1 = R_D__0; return;
 
@@ -431,7 +442,7 @@ double fpser(double a, double b, double x, double eps, int log_p)
     } else if (a > eps * 0.001) {
 	t = a * log(x);
 	if (t < exparg(1)) { /* exp(t) would underflow */
-	    return 0.0;
+	    return 0.;
 	}
 	ans = exp(t);
     } else
@@ -445,11 +456,11 @@ double fpser(double a, double b, double x, double eps, int log_p)
 	ans *= b / a;
 
     tol = eps / a;
-    an = a + 1.0;
+    an = a + 1.;
     t = x;
     s = t / an;
     do {
-	an += 1.0;
+	an += 1.;
 	t = x * t;
 	c = t / an;
 	s += c;
@@ -458,7 +469,7 @@ double fpser(double a, double b, double x, double eps, int log_p)
     if (log_p)
 	ans += log1p(a * s);
     else
-	ans *= a * s + 1.0;
+	ans *= a * s + 1.;
     return ans;
 } /* fpser */
 
@@ -478,14 +489,14 @@ static double apser(double a, double b, double x, double eps)
     t = x - bx;
     if (b * eps <= 0.02)
 	c = log(x) + psi(b) + g + t;
-    else
+    else // b > 2e13 : psi(b) ~= log(b)
 	c = log(bx) + g + t;
 
-    tol = eps * 5.0 * fabs(c);
+    tol = eps * 5. * fabs(c);
     j = 1.;
     s = 0.;
     do {
-	j += 1.0;
+	j += 1.;
 	t *= x - bx / j;
 	aj = t / j;
 	s += aj;
@@ -499,10 +510,11 @@ static double bpser(double a, double b, double x, double eps, int log_p)
 /* -----------------------------------------------------------------------
  * Power SERies expansion for evaluating I_x(a,b) when
  *	       b <= 1 or b*x <= 0.7.   eps is the tolerance used.
+ * NB: if log_p is TRUE, also use it if   (b < 40  & lambda > 650)
  * ----------------------------------------------------------------------- */
 
     int i, m;
-    double ans, c, n, t, u, w, z, a0, b0, apb, tol, sum;
+    double ans, c, t, u, z, a0, b0, apb;
 
     if (x == 0.) {
 	return R_D__0;
@@ -511,16 +523,16 @@ static double bpser(double a, double b, double x, double eps, int log_p)
 /*	      compute the factor  x^a/(a*Beta(a,b)) */
 /* ----------------------------------------------------------------------- */
     a0 = min(a,b);
-    if (a0 >= 1.0) { /*		 ------	 1 <= a0 <= b0  ------ */
+    if (a0 >= 1.) { /*		 ------	 1 <= a0 <= b0  ------ */
 	z = a * log(x) - betaln(a, b);
 	ans = log_p ? z - log(a) : exp(z) / a;
     }
     else {
 	b0 = max(a,b);
 
-	if (b0 < 8.0) {
+	if (b0 < 8.) {
 
-	    if (b0 <= 1.0) { /*	 ------	 a0 < 1	 and  b0 <= 1  ------ */
+	    if (b0 <= 1.) { /*	 ------	 a0 < 1	 and  b0 <= 1  ------ */
 
 		if(log_p) {
 		    ans = a * log(x);
@@ -530,13 +542,13 @@ static double bpser(double a, double b, double x, double eps, int log_p)
 			return ans;
 		}
 		apb = a + b;
-		if (apb > 1.0) {
+		if (apb > 1.) {
 		    u = a + b - 1.;
-		    z = (gam1(u) + 1.0) / apb;
+		    z = (gam1(u) + 1.) / apb;
 		} else {
-		    z = gam1(apb) + 1.0;
+		    z = gam1(apb) + 1.;
 		}
-		c = (gam1(a) + 1.0) * (gam1(b) + 1.0) / z;
+		c = (gam1(a) + 1.) * (gam1(b) + 1.) / z;
 
 		if(log_p) /* FIXME ? -- improve quite a bit for c ~= 1 */
 		    ans += log(c * (b / apb));
@@ -546,30 +558,30 @@ static double bpser(double a, double b, double x, double eps, int log_p)
 	    } else { /* 	------	a0 < 1 < b0 < 8	 ------ */
 
 		u = gamln1(a0);
-		m = (int)(b0 - 1.0);
+		m = (int)(b0 - 1.);
 		if (m >= 1) {
-		    c = 1.0;
+		    c = 1.;
 		    for (i = 1; i <= m; ++i) {
-			b0 += -1.0;
+			b0 += -1.;
 			c *= b0 / (a0 + b0);
 		    }
 		    u += log(c);
 		}
 
 		z = a * log(x) - u;
-		b0 += -1.0; // => b0 in (0, 7)
+		b0 += -1.; // => b0 in (0, 7)
 		apb = a0 + b0;
-		if (apb > 1.0) {
+		if (apb > 1.) {
 		    u = a0 + b0 - 1.;
-		    t = (gam1(u) + 1.0) / apb;
+		    t = (gam1(u) + 1.) / apb;
 		} else {
-		    t = gam1(apb) + 1.0;
+		    t = gam1(apb) + 1.;
 		}
 
 		if(log_p) /* FIXME? potential for improving log(t) */
 		    ans = z + log(a0 / a) + log1p(gam1(b0)) - log(t);
 		else
-		    ans = exp(z) * (a0 / a) * (gam1(b0) + 1.0) / t;
+		    ans = exp(z) * (a0 / a) * (gam1(b0) + 1.) / t;
 	    }
 
 	} else { /* 		------  a0 < 1 < 8 <= b0  ------ */
@@ -592,12 +604,11 @@ static double bpser(double a, double b, double x, double eps, int log_p)
 /* ----------------------------------------------------------------------- */
 /*		       COMPUTE THE SERIES */
 /* ----------------------------------------------------------------------- */
-    sum = 0.;
-    n = 0.;
+    double tol = eps / a,
+	n = 0.,
+	sum = 0., w;
     c = 1.;
-    tol = eps / a;
-
-    do {
+    do { // sum is alternating as long as n < b (<==> 1 - b/n < 0)
 	n += 1.;
 	c *= (0.5 - b / n + 0.5) * x;
 	w = c / (a + n);
@@ -606,7 +617,7 @@ static double bpser(double a, double b, double x, double eps, int log_p)
     if(fabs(w) > tol) { // the series did not converge (in time)
 	// warn only when the result seems to matter:
 	if(( log_p && !(a*sum > -1. && fabs(log1p(a * sum)) < eps*fabs(ans))) ||
-	   (!log_p && fabs(a*sum + 1) != 1.))
+	   (!log_p && fabs(a*sum + 1.) != 1.))
 	    MATHLIB_WARNING5(
 		" bpser(a=%g, b=%g, x=%g,...) did not converge (n=1e7, |w|/tol=%g > 1; A=%g)",
 		a,b,x, fabs(w)/tol, ans);
@@ -615,10 +626,18 @@ static double bpser(double a, double b, double x, double eps, int log_p)
 		     n, fabs(w), (fabs(w) > tol) ? ">!!>" : "<=",
 		     tol, a*sum);
     if(log_p) {
-	if (a*sum > -1.0) ans += log1p(a * sum);
-	else ans = ML_NEGINF;
-    } else
-	ans *= a * sum + 1.0;
+	if (a*sum > -1.) ans += log1p(a * sum);
+	else {
+	    if(ans > ML_NEGINF)
+		MATHLIB_WARNING3(
+		    "pbeta(*, log.p=TRUE) -> bpser(a=%g, b=%g, x=%g,...) underflow to -Inf",
+		    a,b,x);
+	    ans = ML_NEGINF;
+	}
+    } else if (a*sum > -1.)
+	ans *= (a * sum + 1.);
+    else // underflow to
+	ans = 0.;
     return ans;
 } /* bpser */
 
@@ -630,28 +649,24 @@ static double bup(double a, double b, double x, double y, int n, double eps,
 /*     EPS IS THE TOLERANCE USED. */
 /* ----------------------------------------------------------------------- */
 
-    /* System generated locals */
     double ret_val;
-
-    /* Local variables */
     int i, k, mu;
-    double d, l, r, t;
+    double d, l;
 
 // Obtain the scaling factor exp(-mu) and exp(mu)*(x^a * y^b / beta(a,b))/a
 
     double apb = a + b,
-	ap1 = a + 1.0;
+	ap1 = a + 1.;
     if (n > 1 && a >= 1. && apb >= ap1 * 1.1) {
 	mu = (int)fabs(exparg(1));
 	k = (int) exparg(0);
 	if (mu > k)
 	    mu = k;
-	t = (double) mu;
-	d = exp(-t);
+ 	d = exp(-(double) mu);
     }
     else {
 	mu = 0;
-	d = 1.0;
+	d = 1.;
     }
 
     /* L10: */
@@ -668,42 +683,31 @@ static double bup(double a, double b, double x, double y, int n, double eps,
 /*          LET K BE THE INDEX OF THE MAXIMUM TERM */
 
     k = 0;
-    if (b <= 1.0) {
-	goto L40;
-    }
-    if (y > 1e-4) {
-	r = (b - 1.0) * x / y - a;
-	if (r < 1.0) {
-	    goto L40;
-	}
-	k = nm1;
-	t = (double) nm1;
-	if (r < t) {
-	    k = (int) r;
+    if (b > 1.) {
+	if (y > 1e-4) {
+	    double r = (b - 1.) * x / y - a;
+	    if (r >= 1.)
+		k = (r < nm1) ? (int) r : nm1;
+	} else
+	    k = nm1;
+
+//          ADD THE INCREASING TERMS OF THE SERIES - if k > 0
+/* L30: */
+	for (i = 0; i < k; ++i) {
+	    l = (double) i;
+	    d *= (apb + l) / (ap1 + l) * x;
+	    w += d;
 	}
-    } else {
-	k = nm1;
     }
 
-/*          ADD THE INCREASING TERMS OF THE SERIES */
+// L40:     ADD THE REMAINING TERMS OF THE SERIES
 
-/* L30: */
-    for (i = 1; i <= k; ++i) {
-	l = (double) (i - 1);
-	d = (apb + l) / (ap1 + l) * x * d;
+    for (i = k; i < nm1; ++i) {
+	l = (double) i;
+	d *= (apb + l) / (ap1 + l) * x;
 	w += d;
-	/* L31: */
-    }
-    if (k != nm1) {
-	/*          ADD THE REMAINING TERMS OF THE SERIES */
-    L40:
-	for (i = k+1; i <= nm1; ++i) {
-	    l = (double) (i - 1);
-	    d = (apb + l) / (ap1 + l) * x * d;
-	    w += d;
-	    if (d <= eps * w) /* relativ convergence (eps) */
-		break;
-	}
+	if (d <= eps * w) /* relativ convergence (eps) */
+	    break;
     }
 
     // L50: TERMINATE THE PROCEDURE
@@ -724,63 +728,79 @@ static double bfrac(double a, double b, double x, double y, double lambda,
    -----------------------------------------------------------------------*/
 
     double c, e, n, p, r, s, t, w, c0, c1, r0, an, bn, yp1, anp1, bnp1,
-	beta, alpha;
-
-    double brc = brcomp(a, b, x, y, log_p);
-
-    if (!log_p && brc == 0.) /* already underflowed to 0 */
+	beta, alpha, brc;
+
+    if(!R_FINITE(lambda)) return ML_NAN;// TODO: can return 0 or 1 (?)
+    R_ifDEBUG_printf(" bfrac(a=%g, b=%g, x=%g, y=%g, lambda=%g, eps=%g, log_p=%d):",
+		     a,b,x,y, lambda, eps, log_p);
+    brc = brcomp(a, b, x, y, log_p);
+    if(ISNAN(brc)) { // e.g. from   L <- 1e308; pnbinom(L, L, mu = 5)
+	R_ifDEBUG_printf(" --> brcomp(a,b,x,y) = NaN\n");
+	ML_ERR_return_NAN; // TODO: could we know better?
+    }
+    if (!log_p && brc == 0.) {
+	R_ifDEBUG_printf(" --> brcomp(a,b,x,y) underflowed to 0.\n");
 	return 0.;
+    }
+#ifdef DEBUG_bratio
+    else
+	REprintf("\n");
+#endif
 
-    c = lambda + 1.0;
+    c = lambda + 1.;
     c0 = b / a;
-    c1 = 1.0 / a + 1.0;
-    yp1 = y + 1.0;
-
-    n = 0.0;
-    p = 1.0;
-    s = a + 1.0;
-    an = 0.0;
-    bn = 1.0;
-    anp1 = 1.0;
+    c1 = 1. / a + 1.;
+    yp1 = y + 1.;
+
+    n = 0.;
+    p = 1.;
+    s = a + 1.;
+    an = 0.;
+    bn = 1.;
+    anp1 = 1.;
     bnp1 = c / c1;
     r = c1 / c;
 
 /*        CONTINUED FRACTION CALCULATION */
 
     do {
-	n += 1.0;
+	n += 1.;
 	t = n / a;
 	w = n * (b - n) * x;
 	e = a / s;
 	alpha = p * (p + c0) * e * e * (w * x);
-	e = (t + 1.0) / (c1 + t + t);
+	e = (t + 1.) / (c1 + t + t);
 	beta = n + w / s + e * (c + n * yp1);
-	p = t + 1.0;
-	s += 2.0;
+	p = t + 1.;
+	s += 2.;
 
 	/* update an, bn, anp1, and bnp1 */
 
-	t = alpha * an + beta * anp1;
-	an = anp1;
-	anp1 = t;
-	t = alpha * bn + beta * bnp1;
-	bn = bnp1;
-	bnp1 = t;
+	t = alpha * an + beta * anp1;	an = anp1;	anp1 = t;
+	t = alpha * bn + beta * bnp1;	bn = bnp1;	bnp1 = t;
 
 	r0 = r;
 	r = anp1 / bnp1;
-	if (fabs(r - r0) <= eps * r) {
+#ifdef _not_normally_DEBUG_bfrac
+	R_ifDEBUG_printf(" n=%5.0f, a_{n,n+1}= (%12g,%12g),  b_{n,n+1} = (%12g,%12g) => r0,r = (%14g,%14g)\n",
+			 n, an,anp1, bn,bnp1, r0, r);
+#endif
+	if (fabs(r - r0) <= eps * r)
 	    break;
-	}
 
 	/* rescale an, bn, anp1, and bnp1 */
 
 	an /= bnp1;
 	bn /= bnp1;
 	anp1 = r;
-	bnp1 = 1.0;
-    } while (1);
-
+	bnp1 = 1.;
+    } while (n < 10000);// arbitrary; had '1' --> infinite loop for  lambda = Inf
+    R_ifDEBUG_printf("  in bfrac(): n=%.0f terms cont.frac.; brc=%g, r=%g\n",
+		     n, brc, r);
+    if(n >= 10000 && fabs(r - r0) > eps * r)
+	MATHLIB_WARNING5(
+	    " bfrac(a=%g, b=%g, x=%g, y=%g, lambda=%g) did *not* converge (in 10000 steps)\n",
+	    a,b,x,y, lambda);
     return (log_p ? brc + log(r) : brc * r);
 } /* bfrac */
 
@@ -795,11 +815,11 @@ static double brcomp(double a, double b, double x, double y, int log_p)
     int i, n;
     double c, e, u, v, z, a0, b0, apb;
 
-    if (x == 0.0 || y == 0.0) {
+    if (x == 0. || y == 0.) {
 	return R_D__0;
     }
     a0 = min(a, b);
-    if (a0 < 8.0) {
+    if (a0 < 8.) {
 	double lnx, lny;
 	if (x <= .375) {
 	    lnx = log(x);
@@ -826,61 +846,61 @@ static double brcomp(double a, double b, double x, double y, int log_p)
 /* ----------------------------------------------------------------------- */
 
 	b0 = max(a, b);
-	if (b0 >= 8.0) { /* L80: */
+	if (b0 >= 8.) { /* L80: */
 	    u = gamln1(a0) + algdiv(a0, b0);
 
 	    return (log_p ? log(a0) + (z - u)  : a0 * exp(z - u));
 	}
 	/* else : */
 
-	if (b0 <= 1.0) { /*		algorithm for max(a,b) = b0 <= 1 */
+	if (b0 <= 1.) { /*		algorithm for max(a,b) = b0 <= 1 */
 
 	    double e_z = R_D_exp(z);
 
-	    if (!log_p && e_z == 0.0) /* exp() underflow */
+	    if (!log_p && e_z == 0.) /* exp() underflow */
 		return 0.;
 
 	    apb = a + b;
-	    if (apb > 1.0) {
+	    if (apb > 1.) {
 		u = a + b - 1.;
-		z = (gam1(u) + 1.0) / apb;
+		z = (gam1(u) + 1.) / apb;
 	    } else {
-		z = gam1(apb) + 1.0;
+		z = gam1(apb) + 1.;
 	    }
 
-	    c = (gam1(a) + 1.0) * (gam1(b) + 1.0) / z;
+	    c = (gam1(a) + 1.) * (gam1(b) + 1.) / z;
 	    /* FIXME? log(a0*c)= log(a0)+ log(c) and that is improvable */
 	    return (log_p
 		    ? e_z + log(a0 * c) - log1p(a0/b0)
-		    : e_z * (a0 * c) / (a0 / b0 + 1.0));
+		    : e_z * (a0 * c) / (a0 / b0 + 1.));
 	}
 
 	/* else : 		  ALGORITHM FOR 1 < b0 < 8 */
 
 	u = gamln1(a0);
-	n = (int)(b0 - 1.0);
+	n = (int)(b0 - 1.);
 	if (n >= 1) {
-	    c = 1.0;
+	    c = 1.;
 	    for (i = 1; i <= n; ++i) {
-		b0 += -1.0;
+		b0 += -1.;
 		c *= b0 / (a0 + b0);
 	    }
 	    u = log(c) + u;
 	}
 	z -= u;
-	b0 += -1.0;
+	b0 += -1.;
 	apb = a0 + b0;
 	double t;
-	if (apb > 1.0) {
+	if (apb > 1.) {
 	    u = a0 + b0 - 1.;
-	    t = (gam1(u) + 1.0) / apb;
+	    t = (gam1(u) + 1.) / apb;
 	} else {
-	    t = gam1(apb) + 1.0;
+	    t = gam1(apb) + 1.;
 	}
 
 	return (log_p
 		? log(a0) + z + log1p(gam1(b0))  - log(t)
-		: a0 * exp(z) * (gam1(b0) + 1.0) / t);
+		: a0 * exp(z) * (gam1(b0) + 1.) / t);
 
     } else {
 /* ----------------------------------------------------------------------- */
@@ -889,13 +909,13 @@ static double brcomp(double a, double b, double x, double y, int log_p)
 	double h, x0, y0, lambda;
 	if (a <= b) {
 	    h = a / b;
-	    x0 = h / (h + 1.0);
-	    y0 = 1.0 / (h + 1.0);
+	    x0 = h / (h + 1.);
+	    y0 = 1. / (h + 1.);
 	    lambda = a - (a + b) * x;
 	} else {
 	    h = b / a;
-	    x0 = 1.0 / (h + 1.0);
-	    y0 = h / (h + 1.0);
+	    x0 = 1. / (h + 1.);
+	    y0 = h / (h + 1.);
 	    lambda = (a + b) * y - b;
 	}
 
@@ -934,7 +954,7 @@ static double brcmp1(int mu, double a, double b, double x, double y, int give_lo
     double c, t, u, v, z, a0, b0, apb;
 
     a0 = min(a,b);
-    if (a0 < 8.0) {
+    if (a0 < 8.) {
 	double lnx, lny;
 	if (x <= .375) {
 	    lnx = log(x);
@@ -950,7 +970,7 @@ static double brcmp1(int mu, double a, double b, double x, double y, int give_lo
 
 	// L20:
 	z = a * lnx + b * lny;
-	if (a0 >= 1.0) {
+	if (a0 >= 1.) {
 	    z -= betaln(a, b);
 	    return esum(mu, z, give_log);
 	}
@@ -960,7 +980,7 @@ static double brcmp1(int mu, double a, double b, double x, double y, int give_lo
 	/* ----------------------------------------------------------------------- */
 	// L30:
 	b0 = max(a,b);
-	if (b0 >= 8.0) {
+	if (b0 >= 8.) {
 	/* L80:                  ALGORITHM FOR b0 >= 8 */
 	    u = gamln1(a0) + algdiv(a0, b0);
 	    R_ifDEBUG_printf(" brcmp1(mu,a,b,*): a0 < 1, b0 >= 8;  z=%.15g\n", z);
@@ -968,37 +988,37 @@ static double brcmp1(int mu, double a, double b, double x, double y, int give_lo
 		? log(a0) + esum(mu, z - u, TRUE)
 		:     a0  * esum(mu, z - u, FALSE);
 
-	} else if (b0 <= 1.0) {
+	} else if (b0 <= 1.) {
 	    //                   a0 < 1, b0 <= 1
 	    double ans = esum(mu, z, give_log);
 	    if (ans == (give_log ? ML_NEGINF : 0.))
 		return ans;
 
 	    apb = a + b;
-	    if (apb > 1.0) {
+	    if (apb > 1.) {
 		// L40:
 		u = a + b - 1.;
-		z = (gam1(u) + 1.0) / apb;
+		z = (gam1(u) + 1.) / apb;
 	    } else {
-		z = gam1(apb) + 1.0;
+		z = gam1(apb) + 1.;
 	    }
 	    // L50:
 	    c = give_log
 		? log1p(gam1(a)) + log1p(gam1(b)) - log(z)
-		: (gam1(a) + 1.0) * (gam1(b) + 1.0) / z;
+		: (gam1(a) + 1.) * (gam1(b) + 1.) / z;
 	    R_ifDEBUG_printf(" brcmp1(mu,a,b,*): a0 < 1, b0 <= 1;  c=%.15g\n", c);
 	    return give_log
 		? ans + log(a0) + c - log1p(a0 / b0)
-		: ans * (a0 * c) / (a0 / b0 + 1.0);
+		: ans * (a0 * c) / (a0 / b0 + 1.);
 	}
 	// else:               algorithm for	a0 < 1 < b0 < 8
 	// L60:
 	u = gamln1(a0);
-	int n = (int)(b0 - 1.0);
+	int n = (int)(b0 - 1.);
 	if (n >= 1) {
-	    c = 1.0;
+	    c = 1.;
 	    for (int i = 1; i <= n; ++i) {
-		b0 += -1.0;
+		b0 += -1.;
 		c *= b0 / (a0 + b0);
 		/* L61: */
 	    }
@@ -1006,19 +1026,19 @@ static double brcmp1(int mu, double a, double b, double x, double y, int give_lo
 	}
 	// L70:
 	z -= u;
-	b0 += -1.0;
+	b0 += -1.;
 	apb = a0 + b0;
 	if (apb > 1.) {
 	    // L71:
-	    t = (gam1(apb - 1.) + 1.0) / apb;
+	    t = (gam1(apb - 1.) + 1.) / apb;
 	} else {
-	    t = gam1(apb) + 1.0;
+	    t = gam1(apb) + 1.;
 	}
 	R_ifDEBUG_printf(" brcmp1(mu,a,b,*): a0 < 1 < b0 < 8;  t=%.15g\n", t);
 	// L72:
 	return give_log
 	    ? log(a0)+ esum(mu, z, TRUE) + log1p(gam1(b0)) - log(t) // TODO? log(t) = log1p(..)
-	    :     a0 * esum(mu, z, FALSE) * (gam1(b0) + 1.0) / t;
+	    :     a0 * esum(mu, z, FALSE) * (gam1(b0) + 1.) / t;
 
     } else {
 
@@ -1030,13 +1050,13 @@ static double brcmp1(int mu, double a, double b, double x, double y, int give_lo
 	if (a > b) {
 	    // L101:
 	    h = b / a;
-	    x0 = 1.0 / (h + 1.0);// => lx0 := log(x0) = 0 - log1p(h)
-	    y0 = h / (h + 1.0);
+	    x0 = 1. / (h + 1.);// => lx0 := log(x0) = 0 - log1p(h)
+	    y0 = h / (h + 1.);
 	    lambda = (a + b) * y - b;
 	} else {
 	    h = a / b;
-	    x0 = h / (h + 1.0);  // => lx0 := log(x0) = - log1p(1/h)
-	    y0 = 1.0 / (h + 1.0);
+	    x0 = h / (h + 1.);  // => lx0 := log(x0) = - log1p(1/h)
+	    y0 = 1. / (h + 1.);
 	    lambda = a - (a + b) * x;
 	}
 	double lx0 = -log1p(b/a); // in both cases
@@ -1093,19 +1113,19 @@ static void bgrat(double a, double b, double x, double y, double *w,
 	lnx = (y > 0.375) ? log(x) : alnrel(-y),
 	z = -nu * lnx; // z =: u in (9.1) of D.&M.(1992)
 
-    if (b * z == 0.0) { // should not happen, but does, e.g.,
+    if (b * z == 0.) { // should not happen, but does, e.g.,
 	// for  pbeta(1e-320, 1e-5, 0.5)  i.e., _subnormal_ x,
 	// Warning ... bgrat(a=20.5, b=1e-05, x=1, y=9.99989e-321): ..
-	MATHLIB_WARNING4(
-	    "bgrat(a=%g, b=%g, x=%g, y=%g): b*z == 0 underflow, hence inaccurate pbeta()",
-	    a,b,x,y);
+	MATHLIB_WARNING5(
+	    "bgrat(a=%g, b=%g, x=%g, y=%g): z=%g, b*z == 0 underflow, hence inaccurate pbeta()",
+	    a,b,x,y, z);
 	/* L_Error:    THE EXPANSION CANNOT BE COMPUTED */
 	 *ierr = 1; return;
     }
 
 /*                 COMPUTATION OF THE EXPANSION */
     double
-	/* r1 = b * (gam1(b) + 1.0) * exp(b * log(z)),// = b/gamma(b+1) z^b = z^b / gamma(b)
+	/* r1 = b * (gam1(b) + 1.) * exp(b * log(z)),// = b/gamma(b+1) z^b = z^b / gamma(b)
 	 * set r := exp(-z) * z^b / gamma(b) ;
 	 *          gam1(b) = 1/gamma(b+1) - 1 , b in [-1/2, 3/2] */
 	// exp(a*lnx) underflows for large (a * lnx); e.g. large a ==> using log_r := log(r):
@@ -1140,16 +1160,16 @@ static void bgrat(double a, double b, double x, double y, double *w,
 	t2 = lnx * 0.25 * lnx,
 	j = q_r,
 	sum = j,
-	t = 1.0, cn = 1.0, n2 = 0.;
+	t = 1., cn = 1., n2 = 0.;
     for (int n = 1; n <= n_terms_bgrat; ++n) {
 	double bp2n = b + n2;
-	j = (bp2n * (bp2n + 1.0) * j + (z + bp2n + 1.0) * t) * v;
+	j = (bp2n * (bp2n + 1.) * j + (z + bp2n + 1.) * t) * v;
 	n2 += 2.;
 	t *= t2;
 	cn /= n2 * (n2 + 1.);
 	int nm1 = n - 1;
 	c[nm1] = cn;
-	double s = 0.0;
+	double s = 0.;
 	if (n > 1) {
 	    double coef = b - n;
 	    for (int i = 1; i <= nm1; ++i) {
@@ -1160,20 +1180,23 @@ static void bgrat(double a, double b, double x, double y, double *w,
 	d[nm1] = bm1 * cn + s / n;
 	double dj = d[nm1] * j;
 	sum += dj;
-	if (sum <= 0.0) {
+	if (sum <= 0.) {
 	    R_ifDEBUG_printf(" bgrat(*): sum_n(..) <= 0; should not happen (n=%d)\n", n);
 	    /* L_Error:    THE EXPANSION CANNOT BE COMPUTED */ *ierr = 3; return;
 	}
 	if (fabs(dj) <= eps * (sum + l)) {
+	    *ierr = 0;
 	    break;
-	} else if(n == n_terms_bgrat) // never? ; please notify R-core if seen:
+	} else if(n == n_terms_bgrat) { // never? ; please notify R-core if seen:
+	    *ierr = 4;
 	    MATHLIB_WARNING5(
-		"bgrat(a=%g, b=%g, x=%g,..): did *not* converge; dj=%g, rel.err=%g\n",
+	"bgrat(a=%g, b=%g, x=%g) *no* convergence: NOTIFY R-core!\n dj=%g, rel.err=%g\n",
 		a,b,x, dj, fabs(dj) /(sum + l));
-    }
+	}
+    } // for(n .. n_terms..)
 
 /*                    ADD THE RESULTS TO W */
-    *ierr = 0;
+
     if(log_w) // *w is in log space already:
 	*w = logspace_add(*w, log_u + log(sum));
     else
@@ -1195,7 +1218,7 @@ static double grat_r(double a, double x, double log_r, double eps)
  *     It is assumed that a <= 1.  eps is the tolerance to be used.
  * ----------------------------------------------------------------------- */
 
-    if (a * x == 0.0) { /* L130: */
+    if (a * x == 0.) { /* L130: */
 	if (x <= a) {
 	    /* L100: */ return exp(-log_r);
 	} else {
@@ -1222,8 +1245,8 @@ static double grat_r(double a, double x, double log_r, double eps)
 
 	double an = 3.,
 	    c = x,
-	    sum = x / (a + 3.0),
-	    tol = eps * 0.1 / (a + 1.0), t;
+	    sum = x / (a + 3.),
+	    tol = eps * 0.1 / (a + 1.), t;
 	do {
 	    an += 1.;
 	    c *= -(x / an);
@@ -1236,13 +1259,13 @@ static double grat_r(double a, double x, double log_r, double eps)
 	double j = a * x * ((sum/6. - 0.5/(a + 2.)) * x + 1./(a + 1.)),
 	    z = a * log(x),
 	    h = gam1(a),
-	    g = h + 1.0;
+	    g = h + 1.;
 
 	if ((x >= 0.25 && (a < x / 2.59)) || (z > -0.13394)) {
 	    // L40:
 	    double l = rexpm1(z),
 		q = ((l + 0.5 + 0.5) * j - l) * g - h;
-	    if (q <= 0.0) {
+	    if (q <= 0.) {
 		R_ifDEBUG_printf(" => q_r= 0.\n");
 		/* L110:*/ return 0.;
 	    } else {
@@ -1259,10 +1282,10 @@ static double grat_r(double a, double x, double log_r, double eps)
     } else {
 	/* L50: ----  (x >= 1.1)  ---- Continued Fraction Expansion */
 
-	double a2n_1 = 1.0,
-	    a2n = 1.0,
+	double a2n_1 = 1.,
+	    a2n = 1.,
 	    b2n_1 = x,
-	    b2n = x + (1.0 - a),
+	    b2n = x + (1. - a),
 	    c = 1., am0, an0;
 
 	do {
@@ -1311,7 +1334,7 @@ static double basym(double a, double b, double lambda, double eps, int log_p)
 	t = -f;
     else {
 	t = exp(-f);
-	if (t == 0.0) {
+	if (t == 0.) {
 	    return 0; /* once underflow, always underflow .. */
 	}
     }
@@ -1322,14 +1345,14 @@ static double basym(double a, double b, double lambda, double eps, int log_p)
 
     if (a < b) {
 	h = a / b;
-	r0 = 1.0 / (h + 1.0);
+	r0 = 1. / (h + 1.);
 	r1 = (b - a) / b;
-	w0 = 1.0 / sqrt(a * (h + 1.0));
+	w0 = 1. / sqrt(a * (h + 1.));
     } else {
 	h = b / a;
-	r0 = 1.0 / (h + 1.0);
+	r0 = 1. / (h + 1.);
 	r1 = (b - a) / a;
-	w0 = 1.0 / sqrt(b * (h + 1.0));
+	w0 = 1. / sqrt(b * (h + 1.));
     }
 
     a0[0] = r1 * .66666666666666663;
@@ -1339,40 +1362,40 @@ static double basym(double a, double b, double lambda, double eps, int log_p)
 	j1 = e1,
 	sum = j0 + d[0] * w0 * j1;
 
-    double s = 1.0,
+    double s = 1.,
 	h2 = h * h,
-	hn = 1.0,
+	hn = 1.,
 	w = w0,
 	znm1 = z,
 	zn = z2;
     for (int n = 2; n <= num_IT; n += 2) {
 	hn *= h2;
-	a0[n - 1] = r0 * 2.0 * (h * hn + 1.0) / (n + 2.0);
+	a0[n - 1] = r0 * 2. * (h * hn + 1.) / (n + 2.);
 	int np1 = n + 1;
 	s += hn;
-	a0[np1 - 1] = r1 * 2.0 * s / (n + 3.0);
+	a0[np1 - 1] = r1 * 2. * s / (n + 3.);
 
 	for (int i = n; i <= np1; ++i) {
-	    double r = (i + 1.0) * -0.5;
+	    double r = (i + 1.) * -0.5;
 	    b0[0] = r * a0[0];
 	    for (int m = 2; m <= i; ++m) {
-		double bsum = 0.0;
+		double bsum = 0.;
 		for (int j = 1; j <= m-1; ++j) {
 		    int mmj = m - j;
 		    bsum += (j * r - mmj) * a0[j - 1] * b0[mmj - 1];
 		}
 		b0[m - 1] = r * a0[m - 1] + bsum / m;
 	    }
-	    c[i - 1] = b0[i - 1] / (i + 1.0);
+	    c[i - 1] = b0[i - 1] / (i + 1.);
 
-	    double dsum = 0.0;
+	    double dsum = 0.;
 	    for (int j = 1; j <= i-1; ++j) {
 		dsum += d[i - j - 1] * c[j - 1];
 	    }
 	    d[i - 1] = -(dsum + c[i - 1]);
 	}
 
-	j0 = e1 * znm1 + (n - 1.0) * j0;
+	j0 = e1 * znm1 + (n - 1.) * j0;
 	j1 = e1 * zn + n * j1;
 	znm1 = z2 * znm1;
 	zn = z2 * zn;
@@ -1398,16 +1421,16 @@ static double basym(double a, double b, double lambda, double eps, int log_p)
 
 static double exparg(int l)
 {
-/* -------------------------------------------------------------------- */
-/*     IF L = 0 THEN  EXPARG(L) = THE LARGEST POSITIVE W FOR WHICH
- *     EXP(W) CAN BE COMPUTED.  ==>  exparg(0) = 709.7827  nowadays. */
+/* --------------------------------------------------------------------
+ *     If l = 0 then  exparg(l) = The largest positive W for which
+ *     exp(W) can be computed. With 0.99999 fuzz  ==> exparg(0) =   709.7756  nowadays
 
-/*     IF L IS NONZERO THEN  EXPARG(L) = THE LARGEST NEGATIVE W FOR
- *     WHICH THE COMPUTED VALUE OF EXP(W) IS NONZERO.
- *       ==> exparg(1) = -708.3964   nowadays. */
+ *     if l = 1 (nonzero) then  exparg(l) = the largest negative W for
+ *     which the computed value of exp(W) is nonzero.
+ *     With 0.99999 fuzz			  ==> exparg(1) =  -709.0825  nowadays
 
-/*     Note... only an approximate value for exparg(L) is needed. */
-/* -------------------------------------------------------------------- */
+ *     Note... only an approximate value for exparg(L) is needed.
+ * -------------------------------------------------------------------- */
 
     static double const lnb = .69314718055995;
     int m = (l == 0) ? Rf_i1mach(16) : Rf_i1mach(15) - 1;
@@ -1426,15 +1449,15 @@ static double esum(int mu, double x, int give_log)
 
     // else :
     double w;
-    if (x > 0.0) { /* L10: */
+    if (x > 0.) { /* L10: */
 	if (mu > 0)  return exp((double) mu) * exp(x);
 	w = mu + x;
-	if (w < 0.0) return exp((double) mu) * exp(x);
+	if (w < 0.) return exp((double) mu) * exp(x);
     }
     else { /* x <= 0 */
 	if (mu < 0)  return exp((double) mu) * exp(x);
 	w = mu + x;
-	if (w > 0.0) return exp((double) mu) * exp(x);
+	if (w > 0.) return exp((double) mu) * exp(x);
     }
     return exp(w);
 
@@ -1454,13 +1477,13 @@ double rexpm1(double x)
     static double q4 = 5.95130811860248e-4;
 
     if (fabs(x) <= 0.15) {
-	return x * (((p2 * x + p1) * x + 1.0) /
-		    ((((q4 * x + q3) * x + q2) * x + q1) * x + 1.0));
+	return x * (((p2 * x + p1) * x + 1.) /
+		    ((((q4 * x + q3) * x + q2) * x + q1) * x + 1.));
     }
     else { /* |x| > 0.15 : */
 	double w = exp(x);
-	if (x > 0.0)
-	    return w * (0.5 - 1.0 / w + 0.5);
+	if (x > 0.)
+	    return w * (0.5 - 1. / w + 0.5);
 	else
 	    return w - 0.5 - 0.5;
     }
@@ -1484,11 +1507,11 @@ static double alnrel(double a)
 	q2 = .747811014037616,
 	q3 = -.0845104217945565;
     double
-	t = a / (a + 2.0),
+	t = a / (a + 2.),
 	t2 = t * t,
 	w = (((p3 * t2 + p2) * t2 + p1) * t2 + 1.) /
 	(((q3 * t2 + q2) * t2 + q1) * t2 + 1.);
-    return t * 2.0 * w;
+    return t * 2. * w;
 
 } /* alnrel */
 
@@ -1507,7 +1530,6 @@ static double rlog1(double x)
     static double q2 = .354508718369557;
 
     double h, r, t, w, w1;
-
     if (x < -0.39 || x > 0.57) { /* direct evaluation */
 	w = x + 0.5 + 0.5;
 	return x - log(w);
@@ -1520,19 +1542,19 @@ static double rlog1(double x)
     }
     else if (x > 0.18) { /* L20: */
 	h = x * .75 - .25;
-	w1 = b + h / 3.0;
+	w1 = b + h / 3.;
     }
     else { /*		Argument Reduction */
 	h = x;
-	w1 = 0.0;
+	w1 = 0.;
     }
 
 /* L30:              	Series Expansion */
 
-    r = h / (h + 2.0);
+    r = h / (h + 2.);
     t = r * r;
-    w = ((p2 * t + p1) * t + p0) / ((q2 * t + q1) * t + 1.0);
-    return t * 2.0 * (1.0 / (1.0 - r) - r * w) + w1;
+    w = ((p2 * t + p1) * t + p0) / ((q2 * t + q1) * t + 1.);
+    return t * 2. * (1. / (1. - r) - r * w) + w1;
 
 } /* rlog1 */
 
@@ -1560,51 +1582,43 @@ static double erf__(double x)
     static double s[4] = { 94.153775055546,187.11481179959,
 	    99.0191814623914,18.0124575948747 };
 
-    /* System generated locals */
-    double ret_val;
-
     /* Local variables */
     double t, x2, ax, bot, top;
 
     ax = fabs(x);
     if (ax <= 0.5) {
 	t = x * x;
-	top = (((a[0] * t + a[1]) * t + a[2]) * t + a[3]) * t + a[4] + 1.0;
-	bot = ((b[0] * t + b[1]) * t + b[2]) * t + 1.0;
+	top = (((a[0] * t + a[1]) * t + a[2]) * t + a[3]) * t + a[4] + 1.;
+	bot = ((b[0] * t + b[1]) * t + b[2]) * t + 1.;
 
 	return x * (top / bot);
     }
-    /* else: ax > 0.5 */
 
-    if (ax <= 4.) { /*  ax in (0.5, 4] */
+    // else:  |x| > 0.5
 
+    if (ax <= 4.) { //  |x| in (0.5, 4]
 	top = ((((((p[0] * ax + p[1]) * ax + p[2]) * ax + p[3]) * ax + p[4]) * ax
 		+ p[5]) * ax + p[6]) * ax + p[7];
 	bot = ((((((q[0] * ax + q[1]) * ax + q[2]) * ax + q[3]) * ax + q[4]) * ax
 		+ q[5]) * ax + q[6]) * ax + q[7];
-	ret_val = 0.5 - exp(-x * x) * top / bot + 0.5;
-	if (x < 0.0) {
-	    ret_val = -ret_val;
-	}
-	return ret_val;
+	double R = 0.5 - exp(-x * x) * top / bot + 0.5;
+	return (x < 0) ? -R : R;
     }
 
-    /* else: ax > 4 */
+    // else:  |x| > 4
 
     if (ax >= 5.8) {
 	return x > 0 ? 1 : -1;
     }
+
+    // else:  4 < |x| < 5.8
     x2 = x * x;
-    t = 1.0 / x2;
+    t = 1. / x2;
     top = (((r[0] * t + r[1]) * t + r[2]) * t + r[3]) * t + r[4];
-    bot = (((s[0] * t + s[1]) * t + s[2]) * t + s[3]) * t + 1.0;
+    bot = (((s[0] * t + s[1]) * t + s[2]) * t + s[3]) * t + 1.;
     t = (c - top / (x2 * bot)) / ax;
-    ret_val = 0.5 - exp(-x2) * t + 0.5;
-    if (x < 0.0) {
-	ret_val = -ret_val;
-    }
-    return ret_val;
-
+    double R = 0.5 - exp(-x2) * t + 0.5;
+    return (x < 0) ? -R : R;
 } /* erf */
 
 static double erfc1(int ind, double x)
@@ -1641,8 +1655,8 @@ static double erfc1(int ind, double x)
     //				|X| <= 0.5 */
     if (ax <= 0.5) {
 	double t = x * x,
-	    top = (((a[0] * t + a[1]) * t + a[2]) * t + a[3]) * t + a[4] + 1.0,
-	    bot = ((b[0] * t + b[1]) * t + b[2]) * t + 1.0;
+	    top = (((a[0] * t + a[1]) * t + a[2]) * t + a[3]) * t + a[4] + 1.,
+	    bot = ((b[0] * t + b[1]) * t + b[2]) * t + 1.;
 	ret_val = 0.5 - x * (top / bot) + 0.5;
 	if (ind != 0) {
 	    ret_val = exp(t) * ret_val;
@@ -1650,7 +1664,7 @@ static double erfc1(int ind, double x)
 	return ret_val;
     }
     // else (L10:):		0.5 < |X| <= 4
-    if (ax <= 4.0) {
+    if (ax <= 4.) {
 	top = ((((((p[0] * ax + p[1]) * ax + p[2]) * ax + p[3]) * ax + p[4]) * ax
 		+ p[5]) * ax + p[6]) * ax + p[7];
 	bot = ((((((q[0] * ax + q[1]) * ax + q[2]) * ax + q[3]) * ax + q[4]) * ax
@@ -1661,37 +1675,37 @@ static double erfc1(int ind, double x)
 	// L20:
 	if (x <= -5.6) {
 	    // L50:            	LIMIT VALUE FOR "LARGE" NEGATIVE X
-	    ret_val = 2.0;
+	    ret_val = 2.;
 	    if (ind != 0) {
-		ret_val = exp(x * x) * 2.0;
+		ret_val = exp(x * x) * 2.;
 	    }
 	    return ret_val;
 	}
-	if (ind == 0 && (x > 100.0 || x * x > -exparg(1))) {
+	if (ind == 0 && (x > 100. || x * x > -exparg(1))) {
 	    // LIMIT VALUE FOR LARGE POSITIVE X   WHEN IND = 0
 	    // L60:
-	    return 0.0;
+	    return 0.;
 	}
 
 	// L30:
 	t = 1. / (x * x);
 	top = (((r[0] * t + r[1]) * t + r[2]) * t + r[3]) * t + r[4];
-	bot = (((s[0] * t + s[1]) * t + s[2]) * t + s[3]) * t + 1.0;
+	bot = (((s[0] * t + s[1]) * t + s[2]) * t + s[3]) * t + 1.;
 	ret_val = (c - t * top / bot) / ax;
     }
 
     // L40:                 FINAL ASSEMBLY
     if (ind != 0) {
-	if (x < 0.0)
-	    ret_val = exp(x * x) * 2.0 - ret_val;
+	if (x < 0.)
+	    ret_val = exp(x * x) * 2. - ret_val;
     } else {
 	// L41:  ind == 0 :
 	w = x * x;
 	t = w;
 	e = w - t;
 	ret_val = (0.5 - e + 0.5) * exp(-t) * ret_val;
-	if (x < 0.0)
-	    ret_val = 2.0 - ret_val;
+	if (x < 0.)
+	    ret_val = 2. - ret_val;
     }
     return ret_val;
 
@@ -1708,9 +1722,9 @@ static double gam1(double a)
     t = a;
     d = a - 0.5;
     // t := if(a > 1/2)  a-1  else  a
-    if (d > 0.0)
+    if (d > 0.)
 	t = d - 0.5;
-    if (t < 0.0) { /* L30: */
+    if (t < 0.) { /* L30: */
 	static double
 	    r[9] = { -.422784335098468,-.771330383816272,
 		     -.244757765222226,.118378989872749,9.30357293360349e-4,
@@ -1721,10 +1735,10 @@ static double gam1(double a)
 
 	top = (((((((r[8] * t + r[7]) * t + r[6]) * t + r[5]) * t + r[4]
 		     ) * t + r[3]) * t + r[2]) * t + r[1]) * t + r[0];
-	bot = (s2 * t + s1) * t + 1.0;
+	bot = (s2 * t + s1) * t + 1.;
 	w = top / bot;
 	R_ifDEBUG_printf("  gam1(a = %.15g): t < 0: w=%.15g\n", a, w);
-	if (d > 0.0)
+	if (d > 0.)
 	    return t * w / a;
 	else
 	    return a * (w + 0.5 + 0.5);
@@ -1742,11 +1756,11 @@ static double gam1(double a)
 
 	top = (((((p[6] * t + p[5]) * t + p[4]) * t + p[3]) * t + p[2]
 		   ) * t + p[1]) * t + p[0];
-	bot = (((q[4] * t + q[3]) * t + q[2]) * t + q[1]) * t + 1.0;
+	bot = (((q[4] * t + q[3]) * t + q[2]) * t + q[1]) * t + 1.;
 	w = top / bot;
 	R_ifDEBUG_printf("  gam1(a = %.15g): t > 0: (is a < 1.5 ?)  w=%.15g\n",
 			 a, w);
-	if (d > 0.0) /* L21: */
+	if (d > 0.) /* L21: */
 	    return t / a * (w - 0.5 - 0.5);
 	else
 	    return a * w;
@@ -1792,7 +1806,7 @@ static double gamln1(double a)
 	static double s5 = 1.16165475989616e-4;
 	double x = a - 0.5 - 0.5;
 	w = (((((r5 * x + r4) * x + r3) * x + r2) * x + r1) * x + r0) /
-	    (((((s5 * x + s4) * x + s3) * x + s2) * x + s1) * x + 1.0);
+	    (((((s5 * x + s4) * x + s3) * x + s2) * x + s1) * x + 1.);
 	return x * w;
     }
 } /* gamln1 */
@@ -1824,7 +1838,7 @@ static double psi(double x)
 
 /* --------------------------------------------------------------------- */
 /*     COEFFICIENTS FOR RATIONAL APPROXIMATION OF */
-/*     PSI(X) / (X - X0),  0.5 <= X <= 3.0 */
+/*     PSI(X) / (X - X0),  0.5 <= X <= 3. */
     static double p1[7] = { .0089538502298197,4.77762828042627,
 	    142.441585084029,1186.45200713425,3633.51846806499,
 	    4138.10161269013,1305.60269827897 };
@@ -1836,7 +1850,7 @@ static double psi(double x)
 
 /* --------------------------------------------------------------------- */
 /*     COEFFICIENTS FOR RATIONAL APPROXIMATION OF */
-/*     PSI(X) - LN(X) + 1 / (2*X),  X > 3.0 */
+/*     PSI(X) - LN(X) + 1 / (2*X),  X > 3. */
 
     static double p2[4] = { -2.12940445131011,-7.01677227766759,
 	    -4.48616543918019,-.648157123766197 };
@@ -1870,7 +1884,7 @@ static double psi(double x)
 /*                 MAY BE REPRESENTED BY 1/X. */
     xsmall = 1e-9;
 /* --------------------------------------------------------------------- */
-    aug = 0.0;
+    aug = 0.;
     if (x < 0.5) {
 /* --------------------------------------------------------------------- */
 /*     X < 0.5,  USE REFLECTION FORMULA */
@@ -1878,14 +1892,14 @@ static double psi(double x)
 /* --------------------------------------------------------------------- */
 	if (fabs(x) <= xsmall) {
 
-	    if (x == 0.0) {
+	    if (x == 0.) {
 		goto L_err;
 	    }
 /* --------------------------------------------------------------------- */
 /*     0 < |X| <= XSMALL.  USE 1/X AS A SUBSTITUTE */
 /*     FOR  PI*COTAN(PI*X) */
 /* --------------------------------------------------------------------- */
-	    aug = -1.0 / x;
+	    aug = -1. / x;
 	} else { /* |x| > xsmall */
 /* --------------------------------------------------------------------- */
 /*     REDUCTION OF ARGUMENT FOR COTAN */
@@ -1893,7 +1907,7 @@ static double psi(double x)
 	    /* L100: */
 	    w = -x;
 	    sgn = piov4;
-	    if (w <= 0.0) {
+	    if (w <= 0.) {
 		w = -w;
 		sgn = -sgn;
 	    }
@@ -1905,16 +1919,16 @@ static double psi(double x)
 	    }
 	    nq = (int) w;
 	    w -= (double) nq;
-	    nq = (int) (w * 4.0);
-	    w = (w - (double) nq * 0.25) * 4.0;
+	    nq = (int) (w * 4.);
+	    w = (w - (double) nq * 0.25) * 4.;
 /* --------------------------------------------------------------------- */
-/*     W IS NOW RELATED TO THE FRACTIONAL PART OF  4.0 * X. */
+/*     W IS NOW RELATED TO THE FRACTIONAL PART OF  4. * X. */
 /*     ADJUST ARGUMENT TO CORRESPOND TO VALUES IN FIRST */
 /*     QUADRANT AND DETERMINE SIGN */
 /* --------------------------------------------------------------------- */
 	    n = nq / 2;
 	    if (n + n != nq) {
-		w = 1.0 - w;
+		w = 1. - w;
 	    }
 	    z = piov4 * w;
 	    m = n / 2;
@@ -1931,27 +1945,27 @@ static double psi(double x)
 /* --------------------------------------------------------------------- */
 /*     CHECK FOR SINGULARITY */
 /* --------------------------------------------------------------------- */
-		if (z == 0.0) {
+		if (z == 0.) {
 		    goto L_err;
 		}
 /* --------------------------------------------------------------------- */
 /*     USE COS/SIN AS A SUBSTITUTE FOR COTAN, AND */
 /*     SIN/COS AS A SUBSTITUTE FOR TAN */
 /* --------------------------------------------------------------------- */
-		aug = sgn * (cos(z) / sin(z) * 4.0);
+		aug = sgn * (cos(z) / sin(z) * 4.);
 
 	    } else { /* L140: */
-		aug = sgn * (sin(z) / cos(z) * 4.0);
+		aug = sgn * (sin(z) / cos(z) * 4.);
 	    }
 	}
 
-	x = 1.0 - x;
+	x = 1. - x;
 
     }
     /* L200: */
-    if (x <= 3.0) {
+    if (x <= 3.) {
 /* --------------------------------------------------------------------- */
-/*     0.5 <= X <= 3.0 */
+/*     0.5 <= X <= 3. */
 /* --------------------------------------------------------------------- */
 	den = x;
 	upper = p1[0] * x;
@@ -1971,9 +1985,9 @@ static double psi(double x)
 /* --------------------------------------------------------------------- */
     if (x < xmax1) {
 /* --------------------------------------------------------------------- */
-/*     3.0 < X < XMAX1 */
+/*     3. < X < XMAX1 */
 /* --------------------------------------------------------------------- */
-	w = 1.0 / (x * x);
+	w = 1. / (x * x);
 	den = w;
 	upper = p2[0] * w;
 
@@ -2005,12 +2019,12 @@ static double betaln(double a0, double b0)
 	a = min(a0 ,b0),
 	b = max(a0, b0);
 
-    if (a < 8.0) {
-	if (a < 1.0) {
+    if (a < 8.) {
+	if (a < 1.) {
 /* ----------------------------------------------------------------------- */
 //                    		A < 1
 /* ----------------------------------------------------------------------- */
-	    if (b < 8.0)
+	    if (b < 8.)
 		return gamln(a) + (gamln(b) - gamln(a+b));
 	    else
 		return gamln(a) + algdiv(a, b);
@@ -2020,14 +2034,14 @@ static double betaln(double a0, double b0)
 //				1 <= A < 8
 /* ----------------------------------------------------------------------- */
 	double w;
-	if (a < 2.0) {
-	    if (b <= 2.0) {
+	if (a < 2.) {
+	    if (b <= 2.) {
 		return gamln(a) + gamln(b) - gsumln(a, b);
 	    }
 	    /* else */
 
-	    w = 0.0;
-	    if (b < 8.0) {
+	    if (b < 8.) {
+		w = 0.;
 		goto L40;
 	    }
 	    return gamln(a) + algdiv(a, b);
@@ -2035,35 +2049,35 @@ static double betaln(double a0, double b0)
 	// else L30:    REDUCTION OF A WHEN B <= 1000
 
 	if (b <= 1e3) {
-	    int n = (int)(a - 1.0);
-	    w = 1.0;
+	    int n = (int)(a - 1.);
+	    w = 1.;
 	    for (int i = 1; i <= n; ++i) {
-		a += -1.0;
+		a += -1.;
 		double h = a / b;
-		w *= h / (h + 1.0);
+		w *= h / (h + 1.);
 	    }
 	    w = log(w);
 
-	    if (b >= 8.0)
+	    if (b >= 8.)
 		return w + gamln(a) + algdiv(a, b);
 
 	    // else
 	L40:
-	    // 		reduction of B when  B < 8
-	    n = (int)(b - 1.0);
-	    double z = 1.0;
+	    // 	1 < A <= B < 8 :  reduction of B
+	    n = (int)(b - 1.);
+	    double z = 1.;
 	    for (int i = 1; i <= n; ++i) {
-		b += -1.0;
+		b += -1.;
 		z *= b / (a + b);
 	    }
 	    return w + log(z) + (gamln(a) + (gamln(b) - gsumln(a, b)));
 	}
 	else { // L50:	reduction of A when  B > 1000
-	    int n = (int)(a - 1.0);
-	    w = 1.0;
+	    int n = (int)(a - 1.);
+	    w = 1.;
 	    for (int i = 1; i <= n; ++i) {
-		a += -1.0;
-		w *= a / (a / b + 1.0);
+		a += -1.;
+		w *= a / (a / b + 1.);
 	    }
 	    return log(w) - n * log(b) + (gamln(a) + algdiv(a, b));
 	}
@@ -2076,7 +2090,7 @@ static double betaln(double a0, double b0)
 	double
 	    w = bcorr(a, b),
 	    h = a / b,
-	    u = -(a - 0.5) * log(h / (h + 1.0)),
+	    u = -(a - 0.5) * log(h / (h + 1.)),
 	    v = b * alnrel(h);
 	if (u > v)
 	    return log(b) * -0.5 + e + w - v - u;
@@ -2096,13 +2110,13 @@ static double gsumln(double a, double b)
     double x = a + b - 2.;/* in [0, 2] */
 
     if (x <= 0.25)
-	return gamln1(x + 1.0);
+	return gamln1(x + 1.);
 
     /* else */
     if (x <= 1.25)
 	return gamln1(x) + alnrel(x);
     /* else x > 1.25 : */
-    return gamln1(x - 1.0) + log(x * (x + 1.0));
+    return gamln1(x - 1.) + log(x * (x + 1.));
 
 } /* gsumln */
 
@@ -2134,22 +2148,22 @@ static double bcorr(double a0, double b0)
     b = max(a0, b0);
 
     h = a / b;
-    c = h / (h + 1.0);
-    x = 1.0 / (h + 1.0);
+    c = h / (h + 1.);
+    x = 1. / (h + 1.);
     x2 = x * x;
 
 /*                SET SN = (1 - X^N)/(1 - X) */
 
-    s3 = x + x2 + 1.0;
-    s5 = x + x2 * s3 + 1.0;
-    s7 = x + x2 * s5 + 1.0;
-    s9 = x + x2 * s7 + 1.0;
-    s11 = x + x2 * s9 + 1.0;
+    s3 = x + x2 + 1.;
+    s5 = x + x2 * s3 + 1.;
+    s7 = x + x2 * s5 + 1.;
+    s9 = x + x2 * s7 + 1.;
+    s11 = x + x2 * s9 + 1.;
 
 /*                SET W = DEL(B) - DEL(A + B) */
 
 /* Computing 2nd power */
-    r1 = 1.0 / b;
+    r1 = 1. / b;
     t = r1 * r1;
     w = ((((c5 * s11 * t + c4 * s9) * t + c3 * s7) * t + c2 * s5) * t + c1 *
 	    s3) * t + c0;
@@ -2158,7 +2172,7 @@ static double bcorr(double a0, double b0)
 /*                   COMPUTE  DEL(A) + W */
 
 /* Computing 2nd power */
-    r1 = 1.0 / a;
+    r1 = 1. / a;
     t = r1 * r1;
     ret_val = (((((c5 * t + c4) * t + c3) * t + c2) * t + c1) * t + c0) / a +
 	    w;
@@ -2192,25 +2206,25 @@ static double algdiv(double a, double b)
 /* ------------------------ */
     if (a > b) {
 	h = b / a;
-	c = 1.0 / (h + 1.0);
-	x = h / (h + 1.0);
+	c = 1. / (h + 1.);
+	x = h / (h + 1.);
 	d = a + (b - 0.5);
     }
     else {
 	h = a / b;
-	c = h / (h + 1.0);
-	x = 1.0 / (h + 1.0);
+	c = h / (h + 1.);
+	x = 1. / (h + 1.);
 	d = b + (a - 0.5);
     }
 
 /* Set s<n> = (1 - x^n)/(1 - x) : */
 
     x2 = x * x;
-    s3 = x + x2 + 1.0;
-    s5 = x + x2 * s3 + 1.0;
-    s7 = x + x2 * s5 + 1.0;
-    s9 = x + x2 * s7 + 1.0;
-    s11 = x + x2 * s9 + 1.0;
+    s3 = x + x2 + 1.;
+    s5 = x + x2 * s3 + 1.;
+    s7 = x + x2 * s5 + 1.;
+    s9 = x + x2 * s7 + 1.;
+    s11 = x + x2 * s9 + 1.;
 
 /* w := Del(b) - Del(a + b) */
 
@@ -2222,7 +2236,7 @@ static double algdiv(double a, double b)
 /*                    COMBINE THE RESULTS */
 
     u = d * alnrel(a / b);
-    v = a * (log(b) - 1.0);
+    v = a * (log(b) - 1.);
     if (u > v)
 	return w - v - u;
     else
@@ -2253,12 +2267,12 @@ static double gamln(double a)
     else if (a <= 2.25)
 	return gamln1(a - 0.5 - 0.5);
 
-    else if (a < 10.0) {
+    else if (a < 10.) {
 	int i, n = (int)(a - 1.25);
 	double t = a;
-	double w = 1.0;
+	double w = 1.;
 	for (i = 1; i <= n; ++i) {
-	    t += -1.0;
+	    t += -1.;
 	    w *= t;
 	}
 	return gamln1(t - 1.) + log(w);
@@ -2266,6 +2280,6 @@ static double gamln(double a)
     else { /* a >= 10 */
 	double t = 1. / (a * a);
 	double w = (((((c5 * t + c4) * t + c3) * t + c2) * t + c1) * t + c0) / a;
-	return d + w + (a - 0.5) * (log(a) - 1.0);
+	return d + w + (a - 0.5) * (log(a) - 1.);
     }
 } /* gamln */
diff --git a/src/nmath/wilcox.c b/src/nmath/wilcox.c
index ac76b97..1951ed6 100644
--- a/src/nmath/wilcox.c
+++ b/src/nmath/wilcox.c
@@ -14,7 +14,7 @@
 
   You should have received a copy of the GNU General Public License
   along with this program; if not, a copy is available at
-  http://www.r-project.org/Licenses/
+  https://www.R-project.org/Licenses/
 
   SYNOPSIS
 
diff --git a/src/scripts/BATCH b/src/scripts/BATCH
index 8af17ab..f13a3d5 100644
--- a/src/scripts/BATCH
+++ b/src/scripts/BATCH
@@ -1,7 +1,7 @@
 #
 # ${R_HOME}/bin/BATCH
 
-revision='$Rev: 59036 $'
+revision='$Rev: 71736 $'
 version=`set - ${revision}; echo ${2}`
 version="R batch front end: ${R_VERSION} (r${version})
 
@@ -29,7 +29,7 @@ as '--' was not encountered, and are passed on to the R process, which
 by default is started with '$opts'.
 See also help('BATCH') inside R.
 
-Report bugs at bugs.r-project.org ."
+Report bugs at <https://bugs.R-project.org>."
 
 while test -n "${1}"; do
   case ${1} in
diff --git a/src/scripts/COMPILE b/src/scripts/COMPILE
index c50d3a5..6ce9059 100644
--- a/src/scripts/COMPILE
+++ b/src/scripts/COMPILE
@@ -3,7 +3,7 @@
 
 # @configure_input@
 
-revision='$Rev: 63539 $'
+revision='$Rev: 71736 $'
 version=`set - ${revision}; echo ${2}`
 version="R compilation front end: ${R_VERSION} (r${version})
 
@@ -28,7 +28,7 @@ Options:
 Other options of the form '-DMACRO' or 'VAR=VALUE' are passed on to the
 compilation.
 
-Report bugs at bugs.r-project.org ."
+Report bugs at <https://bugs.R-project.org>."
 
 makefiles="-f \"${R_HOME}/etc${R_ARCH}/Makeconf\""
 if test -r "${HOME}/.R/Makevars-${R_PLATFORM}"; then
diff --git a/src/scripts/LINK b/src/scripts/LINK
index fa27e43..213ede9 100644
--- a/src/scripts/LINK
+++ b/src/scripts/LINK
@@ -1,7 +1,7 @@
 ##
 ## ${R_HOME}/bin/LINK
 
-revision='$Rev: 63539 $'
+revision='$Rev: 71736 $'
 version=`set - ${revision}; echo ${2}`
 version="R linker front end: ${R_VERSION} (r${version})
 
@@ -23,7 +23,7 @@ Currently only is useful when creating executables, using the C or C++
 compiler for linking.  If FORTRAN code is to be linked, it needs to be
 manually ensured that the linker flags for the FORTRAN are included.
 
-Report bugs at bugs.r-project.org ."
+Report bugs at <https://bugs.R-project.org>."
 
 args=
 while test -n "${1}"; do
diff --git a/src/scripts/R.sh.in b/src/scripts/R.sh.in
index 731a704..674d5e0 100644
--- a/src/scripts/R.sh.in
+++ b/src/scripts/R.sh.in
@@ -6,7 +6,7 @@ if test "${R_HOME_DIR}" = "@prefix@/@LIBnn@/R"; then
    case "@R_OS@" in
    linux*)
      run_arch=`uname -m`
-     case "$run_arch" in 
+     case "$run_arch" in
         x86_64|mips64|ppc64|powerpc64|sparc64|s390x)
           libnn=lib64
           libnn_fallback=lib
@@ -56,7 +56,7 @@ Options:
   -h, --help            Print short help message and exit
   --version             Print version info and exit
   --encoding=ENC        Specify encoding to be used for stdin
-  --encoding ENC        
+  --encoding ENC
   RHOME			Print path to R home directory and exit
   --save                Do save workspace at the end of the session
   --no-save             Don't save it
@@ -71,6 +71,8 @@ Options:
 			--no-init-file and --no-environ
   --no-readline         Don't use readline for command-line editing
   --max-ppsize=N        Set max size of protect stack to N
+  --min-nsize=N         Set min number of fixed size obj's (\"cons cells\") to N
+  --min-vsize=N         Set vector heap minimum to N bytes; '4M' = 4 MegaB
   -q, --quiet           Don't print startup message
   --silent              Same as --quiet
   --slave               Make R run as quietly as possible
@@ -113,7 +115,7 @@ the usage of 'command'.
 Options --arch, --no-environ, --no-init-file, --no-site-file and --vanilla
 can be placed between R and CMD, to apply to R processes run by 'command'
 
-Report bugs at bugs.r-project.org "
+Report bugs at <https://bugs.R-project.org>."
 
 ## some systems have a more portable sed, e.g. /usr/xpg4/bin/sed on Solaris,
 ## so make sure that is used.
@@ -138,9 +140,9 @@ while test -n "${1}"; do
       shift;
       export R_ARCH
       . "${R_HOME}/etc${R_ARCH}/ldpaths"
-      exec sh "${R_HOME}/bin/Rcmd" @OSF_SH_BUG@ ;;
+      exec sh "${R_HOME}/bin/Rcmd" "${@}" ;;
     -g|--gui)
-      if test -n "`echo ${2} | ${SED} 's/^-.*//'`"; then      
+      if test -n "`echo ${2} | ${SED} 's/^-.*//'`"; then
 	gui="${2}"
         args="${args} ${1} ${2}"
 	shift
@@ -153,7 +155,7 @@ while test -n "${1}"; do
       args="${args} ${1}"
       ;;
     -d|--debugger)
-      if test -n "`echo ${2} | ${SED} 's/^-.*//'`"; then      
+      if test -n "`echo ${2} | ${SED} 's/^-.*//'`"; then
 	debugger="${2}"; shift
       else
 	error "option '${1}' requires an argument"
@@ -188,7 +190,7 @@ while test -n "${1}"; do
       fi
       ;;
     -e)
-      if test -n "`echo ${2} | ${SED} 's/^-.*//'`"; then      
+      if test -n "`echo ${2} | ${SED} 's/^-.*//'`"; then
 	a=`echo "${2}" | ${SED} -e 's/ /~+~/g'`; shift
       else
 	error "option '${1}' requires a non-empty argument"
@@ -196,7 +198,7 @@ while test -n "${1}"; do
       args="${args} -e $a"
       ;;
     -f)
-      if test -n "`echo ${2} | ${SED} 's/^-.*//'`"; then      
+      if test -n "`echo ${2} | ${SED} 's/^-.*//'`"; then
 	a=`echo "${2}" | ${SED} -e 's/ /~+~/g'`; shift
       else
 	error "option '${1}' requires a filename argument"
@@ -256,7 +258,7 @@ fi
 
 ## Startup
 if test -z "${debugger}"; then
-  exec "${R_binary}" @R_BATCHSAVE@ ${args} @OSF_SH_BUG@
+  exec "${R_binary}" @R_BATCHSAVE@ ${args} "${@}"
 else
   ## Ideally, we would like the debugger to start R with additional
   ## ('inferior') arguments, but not all debuggers can do this.  We know
@@ -283,7 +285,7 @@ else
     echo ""
     exec ${debugger} ${debugger_args} "${R_binary}"
   else
-    exec ${debugger} ${debugger_args} "${R_binary}" ${args} @OSF_SH_BUG@
+    exec ${debugger} ${debugger_args} "${R_binary}" ${args} "${@}"
   fi
 fi
 
diff --git a/src/scripts/Rcmd.in b/src/scripts/Rcmd.in
index b1bed95..76d78d5 100644
--- a/src/scripts/Rcmd.in
+++ b/src/scripts/Rcmd.in
@@ -59,7 +59,7 @@ case "${1}" in
 esac
 shift
 
-exec "${cmd}" ${extra} @OSF_SH_BUG@
+exec "${cmd}" ${extra} "${@}"
 
 ### Local Variables: ***
 ### mode: sh ***
diff --git a/src/scripts/Rd2pdf b/src/scripts/Rd2pdf
index 403f12b..8517593 100644
--- a/src/scripts/Rd2pdf
+++ b/src/scripts/Rd2pdf
@@ -8,5 +8,5 @@ while test -n "${1}"; do
 done
 
 echo 'tools:::..Rd2pdf()' \
-| R_DEFAULT_PACKAGES= LC_ALL=C "${R_HOME}/bin/R" \
+| R_DEFAULT_PACKAGES= LC_COLLATE=C "${R_HOME}/bin/R" \
 --vanilla --slave --args ${args}
diff --git a/src/scripts/config b/src/scripts/config
index f00cd2e..9c02bb8 100644
--- a/src/scripts/config
+++ b/src/scripts/config
@@ -5,7 +5,7 @@
 ## Usage:
 ##   R CMD config [options] [VAR]
 
-## Copyright (C) 2002-2013 The R Core Team
+## Copyright (C) 2002-2017 The R Core Team
 ##
 ## This document is free software; you can redistribute it and/or modify
 ## it under the terms of the GNU General Public License as published by
@@ -18,13 +18,13 @@
 ## General Public License for more details.
 ##
 ## A copy of the GNU General Public License is available at
-## http://www.r-project.org/Licenses/
+## https://www.R-project.org/Licenses/
 
-revision='$Revision: 65647 $'
+revision='$Revision: 72376 $'
 version=`set - ${revision}; echo ${2}`
 version="R configuration information retrieval script: ${R_VERSION} (r${version})
 
-Copyright (C) 2002-2013 The R Core Team.
+Copyright (C) 2002-2015 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."
 
@@ -41,28 +41,46 @@ Options:
 			a C/C++ file using R as a library
       --ldflags         print linker flags needed for linking a front-end
                         against the R library
-      --no-user-files  ignore customization files under ~/.R
-      --no-site-files  ignore site customization files under R_HOME/etc
+      --no-user-files   ignore customization files under ~/.R
+      --no-site-files   ignore site customization files under R_HOME/etc
+      --all             print names and values of all variables below
 
 Variables:
   BLAS_LIBS     flags needed for linking against external BLAS libraries
   CC            C compiler command
   CFLAGS        C compiler flags
-  CPICFLAGS     special flags for compiling C code to be turned into a
+  CPICFLAGS     special flags for compiling C code to be included in a
 		shared library
   CPP           C preprocessor
   CPPFLAGS      C/C++ preprocessor flags, e.g. -I<dir> if you have
 		headers in a nonstandard directory <dir>
-  CXX           C++ compiler command for C++98 code
+  CXX           default compiler command for C++ code
   CXXCPP        C++ preprocessor
-  CXXFLAGS      C++ compiler flags
-  CXXPICFLAGS   special flags for compiling C++ code to be turned into a
+  CXXFLAGS      compiler flags for CXX
+  CXXPICFLAGS   special flags for compiling C++ code to be included in a
 		shared library
-  CXX1X         C++ compiler command for C++11 code
-  CXX1XSTD      flag used to enable C++11 support
-  CXX1XFLAGS    C++11 compiler flags
-  CXX1XXPICFLAGS
-                special flags for compiling C++11 code to be turned into
+  CXX98         compiler command for C++98 code
+  CXX98CPP      C++98 preprocessor
+  CXX98FLAGS    compiler flags for CXX98
+  CXX98PICFLAGS special flags for compiling C++98 code to be included in a
+		shared library
+  CXX11         compiler command for C++11 code
+  CXX11STD      flag used with CXX11 to enable C++11 support
+  CXX11FLAGS    further compiler flags for CXX11
+  CXX11PICFLAGS
+                special flags for compiling C++11 code to be included in
+                a shared library
+  CXX14         compiler command for C++14 code
+  CXX14STD      flag used with CXX14 to enable C++14 support
+  CXX14FLAGS    further compiler flags for CXX14
+  CXX14PICFLAGS
+                special flags for compiling C++14 code to be included in
+                a shared library
+  CXX17         compiler command for C++17 code
+  CXX17STD      flag used with CXX17 to enable C++17 support
+  CXX17FLAGS    further compiler flags for CXX17
+  CXX17PICFLAGS
+                special flags for compiling C++17 code to be included in
                 a shared library
   DYLIB_EXT	file extension (including '.') for dynamic libraries
   DYLIB_LD      command for linking dynamic libraries which contain
@@ -95,9 +113,9 @@ Variables:
   SAFE_FFLAGS   Safe (as conformant as possible) Fortran 77 compiler flags
   SHLIB_CFLAGS  additional CFLAGS used when building shared objects
   SHLIB_CXXLD   command for linking shared objects which contain
-		object files from a C++ compiler
+		object files from a C++ compiler (and CXX98 CXX11 CXX14 CXX17)
   SHLIB_CXXLDFLAGS
-		special flags used by SHLIB_CXXLD
+		special flags used by SHLIB_CXXLD (and CXX98 CXX11 CXX14 CXX17)
   SHLIB_EXT	file extension (including '.') for shared objects
   SHLIB_FFLAGS  additional FFLAGS used when building shared objects
   SHLIB_LD      command for linking shared objects which contain
@@ -109,8 +127,17 @@ Variables:
   TCLTK_CPPFLAGS
 		flags needed for finding the tcl.h and tk.h headers
   TCLTK_LIBS    flags needed for linking against the Tcl and Tk libraries
+"
 
-Report bugs at bugs.r-project.org ."
+if test "${R_OSTYPE}" = "windows"; then
+  usage="${usage}
+Windows only:
+  COMPILED_BY   name and version of compiler used to build R"
+fi
+
+usage="${usage}
+  
+Report bugs at <https://bugs.R-project.org>."
 
 ## <NOTE>
 ## The variables are basically the precious configure variables (with
@@ -151,6 +178,7 @@ LIBR=`eval $query VAR=LIBR`
 STATIC_LIBR=`eval $query VAR=STATIC_LIBR`
 MAIN_LDFLAGS=`eval $query VAR=MAIN_LDFLAGS`
 LIBS=`eval $query VAR=LIBS`
+LDFLAGS=`eval $query VAR=LDFLAGS`
 
 
 if test -n "${R_ARCH}"; then
@@ -162,6 +190,7 @@ fi
 var=
 personal="yes"
 site="yes"
+all="no"
 while test -n "${1}"; do
   case "${1}" in
     -h|--help)
@@ -199,6 +228,9 @@ while test -n "${1}"; do
     --no-site-files)
       site="no"
       ;;
+    --all)
+      all="yes"
+      ;;
     *)
       if test -z "${var}"; then
 	var="${1}"
@@ -211,46 +243,58 @@ while test -n "${1}"; do
   shift
 done
 
+## quotes added in R 3.3.2
 if test "${site}" = "yes"; then
 : ${R_MAKEVARS_SITE="${R_HOME}/etc${R_ARCH}/Makevars.site"}
   if test -f "${R_MAKEVARS_SITE}"; then
-    makefiles="${makefiles} -f ${R_MAKEVARS_SITE}"
+    makefiles="${makefiles} -f \"${R_MAKEVARS_SITE}\""
   fi
 fi
 if test "${personal}" = "yes"; then
   if test "${R_OSTYPE}" = "windows"; then
-    if test -n "${R_MAKEVARS_USER}"; then
-      makefiles="${makefiles} -f ${R_MAKEVARS_USER}"
+    if test -f "${R_MAKEVARS_USER}"; then
+      makefiles="${makefiles} -f \"${R_MAKEVARS_USER}\""
     elif test ${R_ARCH} = "/x64" -a -f "${HOME}/.R/Makevars.win64"; then
-      makefiles="${makefiles} -f ${HOME}/.R/Makevars.win64"
+      makefiles="${makefiles} -f \"${HOME}\"/.R/Makevars.win64"
     elif test -f "${HOME}/.R/Makevars.win"; then
-      makefiles="${makefiles} -f ${HOME}/.R/Makevars.win"
+      makefiles="${makefiles} -f \"${HOME}\"/.R/Makevars.win"
     elif test -f "${HOME}/.R/Makevars"; then
-      makefiles="${makefiles} -f ${HOME}/.R/Makevars"
+      makefiles="${makefiles} -f \"${HOME}\"/.R/Makevars"
     fi
   else
     . ${R_HOME}/etc${R_ARCH}/Renviron
-    if test -n "${R_MAKEVARS_USER}"; then
-      makefiles="${makefiles} -f ${R_MAKEVARS_USER}"
+    if test -f "${R_MAKEVARS_USER}"; then
+      makefiles="${makefiles} -f \"${R_MAKEVARS_USER}\""
     elif test -f "${HOME}/.R/Makevars-${R_PLATFORM}"; then
-      makefiles="${makefiles} -f ${HOME}/.R/Makevars-${R_PLATFORM}"
+      makefiles="${makefiles} -f \"${HOME}\"/.R/Makevars-${R_PLATFORM}"
     elif test -f "${HOME}/.R/Makevars"; then
-      makefiles="${makefiles} -f ${HOME}/.R/Makevars"
+      makefiles="${makefiles} -f \"${HOME}\"/.R/Makevars"
     fi
   fi
 fi
 query="${MAKE} -s ${makefiles} print R_HOME=${R_HOME}"
 
 ok_c_vars="CC CFLAGS CPICFLAGS CPP CPPFLAGS"
-ok_cxx_vars="CXX CXXCPP CXXFLAGS CXXPICFLAGS CXX1X CXX1XSTD CXX1XFLAGS CXX1XPICFLAGS"
+ok_cxx_vars="CXX CXXCPP CXXFLAGS CXXPICFLAGS CXX11 CXX11STD CXX11FLAGS CXX11PICFLAGS CXX14 CXX14STD CXX14FLAGS CXX14PICFLAGS CXX98 CXX98STD CXX98FLAGS CXX98PICFLAGS CXX17 CXX17STD CXX17FLAGS CXX17PICFLAGS CXX1X CXX1XSTD CXX1XFLAGS CXX1XPICFLAGS"
 ok_dylib_vars="DYLIB_EXT DYLIB_LD DYLIB_LDFLAGS"
 ok_objc_vars="OBJC OBJCFLAGS"
 ok_java_vars="JAVA JAVAC JAVAH JAR JAVA_HOME JAVA_LIBS JAVA_CPPFLAGS"
 ok_f77_vars="F77 FFLAGS FPICFLAGS FLIBS SAFE_FFLAGS FC FCFLAGS FCPICFLAGS"
 ok_ld_vars="LDFLAGS"
-ok_shlib_vars="SHLIB_CFLAGS SHLIB_CXXLD SHLIB_CXXLDFLAGS SHLIB_EXT SHLIB_FFLAGS SHLIB_LD SHLIB_LDFLAGS SHLIB_FCLD SHLIB_FCLDFLAGS"
+ok_shlib_vars="SHLIB_CFLAGS SHLIB_CXXLD SHLIB_CXXLDFLAGS SHLIB_CXX98LD SHLIB_CXX98LDFLAGS SHLIB_CXX11LD SHLIB_CXX11LDFLAGS SHLIB_CXX14LD SHLIB_CXX14LDFLAGS SHLIB_CXX17LD SHLIB_CXX17LDFLAGS SHLIB_EXT SHLIB_FFLAGS SHLIB_LD SHLIB_LDFLAGS SHLIB_FCLD SHLIB_FCLDFLAGS SHLIB_CXX1XLD SHLIB_CXX1XLDFLAGS"
 ok_tcltk_vars="TCLTK_CPPFLAGS TCLTK_LIBS"
-ok_other_vars="BLAS_LIBS LAPACK_LIBS MAKE LIBnn LOCAL_SOFT"
+ok_other_vars="BLAS_LIBS LAPACK_LIBS MAKE LIBnn LOCAL_SOFT COMPILED_BY"
+
+if test "${all}" = "yes"; then
+  query="${MAKE} -s ${makefiles} print-name-and-value R_HOME=${R_HOME}"
+  for v in ${ok_c_vars} ${ok_cxx_vars} ${ok_dylib_vars} ${ok_f77_vars} \
+	   ${ok_objc_vars} ${ok_java_vars} \
+	   ${ok_ld_vars} ${ok_shlib_vars} ${ok_tcltk_vars} \
+	   ${ok_other_vars}; do
+    eval "${query} VAR=${v}"
+  done
+  exit 0
+fi
 
 ## Can we do this elegantly using case?
 
diff --git a/src/scripts/f77_f2c.in b/src/scripts/f77_f2c.in
index aeaa807..b131cfe 100644
--- a/src/scripts/f77_f2c.in
+++ b/src/scripts/f77_f2c.in
@@ -19,9 +19,9 @@
 ## General Public License for more details.
 ##
 ## A copy of the GNU General Public License is available at
-## http://www.r-project.org/Licenses/
+## https://www.R-project.org/Licenses/
 
-revision='$Rev: 65645 $'
+revision='$Rev: 71736 $'
 version=`set - ${revision}; echo ${2}`
 version="R front-end script to f2c: ${R_VERSION} (r${version})
 
@@ -40,7 +40,7 @@ Options:
   -o FILE               place the output into FILE
   --verbose             display the programs invoked
 
-Report bugs at bugs.r-project.org ."
+Report bugs at <https://bugs.R-project.org>."
 
 ## Possible user overrides
 : ${F2C='f2c'}
diff --git a/src/scripts/javareconf.in b/src/scripts/javareconf.in
index 822d05d..b5b5aff 100644
--- a/src/scripts/javareconf.in
+++ b/src/scripts/javareconf.in
@@ -9,11 +9,11 @@ fi
 DYLIB_EXT=`${R_HOME}/bin/R CMD config DYLIB_EXT`
 tools_classpath=${R_SHARE_DIR}/java
 
-revision='$Rev: 65645 $'
+revision='$Rev: 71736 $'
 version=`set - ${revision}; echo ${2}`
 version="R Java configurator: ${R_VERSION} (r${version})
 
-Copyright (C) 2002-2013 The R Core Team.
+Copyright (C) 2002-2015 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."
 
@@ -52,7 +52,7 @@ javareconf cannot detect automatically:
   JAVA_LIBS      libraries (as linker flags) necessary to compile
                  JNI programs
 
-Report bugs at bugs.r-project.org ."
+Report bugs at <https://bugs.R-project.org>."
 
 
 dry_run=no
@@ -199,13 +199,13 @@ hostos=`uname 2>/dev/null`
 if test "${hostos}" = "Darwin"; then
      pref=`echo "${JAVA_HOME}" | grep "/Home$"`
      if test "${pref}" = "${JAVA_HOME}"; then 
-       echo "System Java on OS X"
+       echo "System Java on macOS"
        JAVA_CPPFLAGS="-I/System/Library/Frameworks/JavaVM.framework/Headers"
        JAVA_LIBS="-framework JavaVM"
        JAVA_LD_LIBRARY_PATH=
 	has_libjvm=unknown
     else
-       echo "Non-system Java on OS X"
+       echo "Non-system Java on macOS"
     fi
 fi
 ## we now look for a path to put in R_LD_LIBRARY_PATH which will
@@ -327,7 +327,7 @@ wd=${PWD}
 cd "${tempdir}"
 
 echo
-echo "trying to compile and link a JNI progam "
+echo "trying to compile and link a JNI program "
 echo "detected JNI cpp flags    : ${JAVA_CPPFLAGS}"
 echo "detected JNI linker flags : ${JAVA_LIBS}"
 
@@ -348,7 +348,8 @@ PKG_LIBS = ${JAVA_LIBS1}
 _ACEOF
 
 ## in case e.g. -k was passed in the environment
-export MAKEFLAGS=
+MAKEFLAGS=
+export MAKEFLAGS
 ${R_HOME}/bin/R CMD SHLIB conftest.c
 ac_status=$?
 
diff --git a/src/unix/Makefile.in b/src/unix/Makefile.in
index e77ad01..f84c4b2 100644
--- a/src/unix/Makefile.in
+++ b/src/unix/Makefile.in
@@ -16,6 +16,9 @@ STATIC_LIBR_PC = @WANT_R_STATIC_TRUE@ $(BLAS_LIBS) $(FLIBS) @R_XTRA_LIBS@ $(LIBI
 
 ALL_CPPFLAGS = $(R_XTRA_CPPFLAGS) $(X_CFLAGS) $(CPPFLAGS) $(DEFS)
 
+## Rscript should not be linked to OpenMP
+ALL_CFLAGS0 = $(R_XTRA_CFLAGS) $(MAIN_CFLAGS) $(CFLAGS)
+
 SOURCES_C_BASE = Rembedded.c dynload.c system.c sys-unix.c sys-std.c X11.c
 SOURCES = $(SOURCES_C_BASE)
 DEPENDS = $(SOURCES:.c=.d)
@@ -50,8 +53,8 @@ R: Makedeps
 	(cd ../include; $(MAKE) $(@F))
 
 libunix.a: $(OBJECTS)
-	rm -rf $@
-	$(AR) cr $@ $(OBJECTS)
+	@rm -rf $@
+	$(AR) -cr $@ $(OBJECTS)
 	$(RANLIB) $@
 
 mostlyclean: clean
@@ -64,7 +67,7 @@ maintainer-clean: distclean
 
 ## we need to build at install time to capture the correct 'rhome'
 install-Rscript:
-	$(CC) $(ALL_CPPFLAGS) $(ALL_CFLAGS) $(LDFLAGS) -DR_HOME='"$(rhome)"' \
+	$(CC) $(ALL_CPPFLAGS) $(ALL_CFLAGS0) $(LDFLAGS) -DR_HOME='"$(rhome)"' \
 	  -o Rscript $(srcdir)/Rscript.c
 	@$(MKINSTALLDIRS) "$(DESTDIR)$(Rexecbindir)"
 	@$(INSTALL_PROGRAM) Rscript "$(DESTDIR)$(Rexecbindir)/Rscript"
diff --git a/src/unix/Rembedded.c b/src/unix/Rembedded.c
index 25506ec..4fa114a 100644
--- a/src/unix/Rembedded.c
+++ b/src/unix/Rembedded.c
@@ -15,7 +15,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  */
 
 /* <UTF8> char here is handled as a whole string */
diff --git a/src/unix/Rscript.c b/src/unix/Rscript.c
index e0f9d01..83234ae 100644
--- a/src/unix/Rscript.c
+++ b/src/unix/Rscript.c
@@ -1,6 +1,6 @@
 /*
  *  R : A Computer Language for Statistical Data Analysis
- *  Copyright (C) 2006-2013  The R Core Team
+ *  Copyright (C) 2006-2014  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
@@ -14,7 +14,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  */
 
 /* This is intended to be used in scripts like
@@ -162,10 +162,10 @@ int main(int argc, char *argv[])
 	}
 	if(strcmp(argv[1], "--version") == 0) {
 	    if(strlen(R_STATUS) == 0)
-		fprintf(stderr, "R scripting front-end version %s.%s (%s-%s-%s)\n", 
+		fprintf(stderr, "R scripting front-end version %s.%s (%s-%s-%s)\n",
 			R_MAJOR, R_MINOR, R_YEAR, R_MONTH, R_DAY);
-	    else 
-		fprintf(stderr, "R scripting front-end version %s.%s %s (%s-%s-%s r%d)\n", 
+	    else
+		fprintf(stderr, "R scripting front-end version %s.%s %s (%s-%s-%s r%d)\n",
 			R_MAJOR, R_MINOR, R_STATUS, R_YEAR, R_MONTH, R_DAY,
 			R_SVN_REVISION);
 	    exit(0);
@@ -254,7 +254,7 @@ int main(int argc, char *argv[])
 #endif
     if(verbose) {
 	fprintf(stderr, "running\n  '%s", cmd);
-	for(i = 1; i < ac-1; i++) fprintf(stderr, " %s", av[i]);
+	for(i = 1; i < ac; i++) fprintf(stderr, " %s", av[i]);
 	fprintf(stderr, "'\n\n");
     }
 #ifndef _WIN32
diff --git a/src/unix/Runix.h b/src/unix/Runix.h
index fd0bd35..51165ab 100644
--- a/src/unix/Runix.h
+++ b/src/unix/Runix.h
@@ -14,7 +14,7 @@ void Rstd_ResetConsole(void);
 void Rstd_FlushConsole(void);
 void Rstd_ClearerrConsole(void);
 void Rstd_Busy(int which);
-void Rstd_CleanUp(SA_TYPE saveact, int status, int runLast);
+void NORET Rstd_CleanUp(SA_TYPE saveact, int status, int runLast);
 int  Rstd_ShowFiles(int nfile, const char **file, const char **headers,
 		    const char *wtitle, Rboolean del, const char *pager);
 int  Rstd_ChooseFile(int _new, char *buf, int len);
diff --git a/src/unix/X11.c b/src/unix/X11.c
index 33994ea..5a8c00c 100644
--- a/src/unix/X11.c
+++ b/src/unix/X11.c
@@ -14,7 +14,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  */
 
 #ifdef HAVE_CONFIG_H
@@ -114,6 +114,24 @@ Rboolean attribute_hidden R_ReadClipboard(Rclpconn clpcon, char *type)
 	return FALSE;
     }
 }
+
+SEXP do_bmVersion(void)
+{
+   SEXP ans = PROTECT(allocVector(STRSXP, 3)),
+	nms = PROTECT(allocVector(STRSXP, 3));
+    setAttrib(ans, R_NamesSymbol, nms);
+    SET_STRING_ELT(nms, 0, mkChar("libpng"));
+    SET_STRING_ELT(nms, 1, mkChar("jpeg"));
+    SET_STRING_ELT(nms, 2, mkChar("libtiff"));
+    R_X11_Init();
+    if(initialized > 0) {
+	SET_STRING_ELT(ans, 0, mkChar((*ptr->R_pngVersion)()));
+	SET_STRING_ELT(ans, 1, mkChar((*ptr->R_jpegVersion)()));
+	SET_STRING_ELT(ans, 2, mkChar((*ptr->R_tiffVersion)()));
+    }
+    UNPROTECT(2);
+    return ans;
+}
 #else /* No HAVE_X11 */
 
 Rboolean attribute_hidden R_access_X11(void)
@@ -144,4 +162,16 @@ Rboolean attribute_hidden R_ReadClipboard(Rclpconn con, char *type)
     error(_("X11 is not available"));
     return FALSE;
 }
+
+SEXP do_bmVersion(void)
+{
+    SEXP ans = PROTECT(allocVector(STRSXP, 3)),
+	nms = PROTECT(allocVector(STRSXP, 3));
+    setAttrib(ans, R_NamesSymbol, nms);
+    SET_STRING_ELT(nms, 0, mkChar("libpng"));
+    SET_STRING_ELT(nms, 1, mkChar("jpeg"));
+    SET_STRING_ELT(nms, 2, mkChar("libtiff"));
+    UNPROTECT(2);
+    return ans;
+}
 #endif
diff --git a/src/unix/dynload.c b/src/unix/dynload.c
index 07d25a0..ca71cb8 100644
--- a/src/unix/dynload.c
+++ b/src/unix/dynload.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-2001 The R Core Team
+ *  Copyright (C) 1997-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
@@ -15,7 +15,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  */
 
 /* <UTF8> char here is handled as a whole string */
@@ -167,17 +167,13 @@ static int computeDLOpenFlag(int asLocal, int now)
 
     if(asLocal != 0) {
 #ifndef RTLD_LOCAL
-# ifndef __CYGWIN__
 	DL_WARN(0);
-# endif
 #else
 	openFlag = RTLD_LOCAL;
 #endif
     } else {
 #ifndef RTLD_GLOBAL
-# ifndef __CYGWIN__
 	DL_WARN(1);
-# endif
 #else
 	openFlag = RTLD_GLOBAL;
 #endif
@@ -185,17 +181,13 @@ static int computeDLOpenFlag(int asLocal, int now)
 
     if(now != 0) {
 #ifndef RTLD_NOW
-# ifndef __CYGWIN__
 	DL_WARN(2);
-# endif
 #else
 	openFlag |= RTLD_NOW;
 #endif
     } else {
 #ifndef RTLD_LAZY
-# ifndef __CYGWIN__
 	DL_WARN(3);
-# endif
 #else
 	openFlag |= RTLD_LAZY;
 #endif
@@ -209,6 +201,11 @@ static int computeDLOpenFlag(int asLocal, int now)
   This is the system/OS-specific version for resolving a
   symbol in a shared object.  A cast would not be legal C.
  */
+/*
+  We are not interested in NULL symbols in the shared object.
+  If we were, this would need to use dlerror() before and after
+  dlsym, and check the second value is NULL.
+ */
 typedef union {void *p; DL_FUNC fn;} fn_ptr;
 static DL_FUNC R_local_dlsym(DllInfo *info, char const *name)
 {
diff --git a/src/unix/hpdlfcn.c b/src/unix/hpdlfcn.c
index 28ef103..2bbdc3b 100644
--- a/src/unix/hpdlfcn.c
+++ b/src/unix/hpdlfcn.c
@@ -15,7 +15,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  */
 
 #ifdef HAVE_CONFIG_H
diff --git a/src/unix/sys-std.c b/src/unix/sys-std.c
index 813c07f..3129470 100644
--- a/src/unix/sys-std.c
+++ b/src/unix/sys-std.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--2013  The R Core Team
+ *  Copyright (C) 1997--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
@@ -15,7 +15,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  */
 
 /* <UTF8> char here is mainly handled as a whole string.
@@ -28,6 +28,8 @@
 
 /* See system.txt for a description of functions */
 
+/* select() is essential here, but configure has required it */
+
 #ifdef HAVE_CONFIG_H
 # include <config.h>
 #endif
@@ -47,18 +49,15 @@
 #include <R_ext/Riconv.h>
 #include <R_ext/Print.h> // for REprintf
 
+#define __SYSTEM__
+/* includes <sys/select.h> and <sys/time.h> */
+#include <R_ext/eventloop.h>
+#undef __SYSTEM__
+
 #ifdef HAVE_UNISTD_H
 # include <unistd.h>		/* for unlink */
 #endif
 
-#ifdef HAVE_SYS_TIME_H
-# include <sys/time.h>		/* for struct timeval */
-#endif
-
-#ifdef HAVE_SYS_SELECT_H
-# include <sys/select.h>	/* for select, according to recent POSIX */
-#endif
-
 extern SA_TYPE SaveAction;
 extern Rboolean UsingReadline;
 extern FILE* ifp; /* from system.c */
@@ -89,10 +88,6 @@ void attribute_hidden Rstd_Suicide(const char *s)
 	 * considerably more complex.
 	 */
 
-#define __SYSTEM__
-#include <R_ext/eventloop.h>
-#undef __SYSTEM__
-
 /*
   The following provides a version of select() that catches interrupts
   and handles them using the supplied interrupt handler or the default
@@ -108,7 +103,7 @@ static RETSIGTYPE (*oldSigintHandler)(int) = SIG_DFL;
 
 typedef void (*sel_intr_handler_t)(void);
 
-static RETSIGTYPE handleSelectInterrupt(int dummy)
+static RETSIGTYPE NORET handleSelectInterrupt(int dummy)
 {
     signal(SIGINT, oldSigintHandler);
     SIGLONGJMP(seljmpbuf, 1);
@@ -123,7 +118,8 @@ int R_SelectEx(int  n,  fd_set  *readfds,  fd_set  *writefds,
 	   non-interruptable? LT */
 	return select(n, readfds, writefds, exceptfds, timeout);
     else {
-	volatile sel_intr_handler_t myintr = intr != NULL ? intr : onintr;
+	volatile sel_intr_handler_t myintr = intr != NULL ?
+	    intr : onintrNoResume;
 	volatile int old_interrupts_suspended = R_interrupts_suspended;
 	if (SIGSETJMP(seljmpbuf, 1)) {
 	    myintr();
@@ -379,7 +375,7 @@ void R_runHandlers(InputHandler *handlers, fd_set *readMask)
 	R_PolledEvents();
     } else
 	while(tmp) {
-	    /* Do this way as the handler function might call 
+	    /* Do this way as the handler function might call
 	       removeInputHandlers */
 	    next = tmp->next;
 	    if(FD_ISSET(tmp->fileDescriptor, readMask)
@@ -417,21 +413,54 @@ getSelectedHandler(InputHandler *handlers, fd_set *readMask)
 }
 
 
-
 #ifdef HAVE_LIBREADLINE
+/* As from R 3.4.0, this implies we have the headers too.
+   We use entry points
+
+   rl_callback_handler_install
+   rl_callback_handler_remove
+   rl_callback_read_char
+   rl_readline_name
+
+   , if HAVE_RL_COMPLETION_MATCHES (>= 4.2)
+
+   rl_attempted_completion_function
+   rl_attempted_completion_over
+   rl_basic_word_break_characters
+   rl_completer_word_break_characters
+   rl_completion_append_character
+   rl_completion_matches
+   rl_line_buffer
+
+   and others conditionally:
+
+   rl_cleanup_after_signal (>= 4.0)
+   rl_done
+   rl_end
+   rl_free_line_state (>= 4.0)
+   rl_line_buffer
+   rl_mark
+   rl_point
+   rl_readline_state (>= 4.2)
+   rl_resize_terminal (>= 4.0)
+   rl_sort_completion_matches (>= 6.0)
+ */
 
-# ifdef HAVE_READLINE_READLINE_H
-#  include <readline/readline.h>
-/* For compatibility with pre-readline4.2 systems: */
-#  if !defined (_RL_FUNCTION_TYPEDEF)
-typedef void rl_vcpfunc_t (char *);
-#  endif /* _RL_FUNCTION_TYPEDEF */
-# else
+# include <readline/readline.h>
+
+/* For compatibility with pre-readline-4.2 systems, 
+   also missing in Apple's emulation via the NetBSD editline library.*/
+# if !defined (_RL_FUNCTION_TYPEDEF)
 typedef void rl_vcpfunc_t (char *);
-extern void rl_callback_handler_install(const char *, rl_vcpfunc_t *);
-extern void rl_callback_handler_remove(void);
-extern void rl_callback_read_char(void);
-extern char *tilde_expand (const char *);
+# endif /* _RL_FUNCTION_TYPEDEF */
+
+# if defined(RL_READLINE_VERSION) && RL_READLINE_VERSION >= 0x0603
+/* readline 6.3's rl_callback_handler_install() no longer installs
+   signal handlers, so as from that version we need an explicit
+   one. (PR#16604)  (This could have been controlled in earlier versions
+   by setting rl_catch_sigwinch.)
+ */
+#  define NEED_INT_HANDLER
 # endif
 
 attribute_hidden
@@ -509,6 +538,15 @@ static struct {
   rl_vcpfunc_t *fun[MAX_READLINE_NESTING];
 } ReadlineStack = {-1, MAX_READLINE_NESTING - 1};
 
+#ifdef NEED_INT_HANDLER
+static volatile Rboolean caught_sigwinch = FALSE;
+
+static RETSIGTYPE
+R_readline_sigwinch_handler(int sig)
+{
+    caught_sigwinch = TRUE;
+}
+#endif
 
 /*
   Registers the specified routine and prompt with readline
@@ -523,11 +561,49 @@ pushReadline(const char *prompt, rl_vcpfunc_t f)
      ReadlineStack.fun[++ReadlineStack.current] = f;
 
    rl_callback_handler_install(prompt, f);
+
+#ifdef NEED_INT_HANDLER
+   signal(SIGWINCH, R_readline_sigwinch_handler);
+#endif
+
    /* flush stdout in case readline wrote the prompt, but didn't flush
-      stdout to make it visible. (needed for Apple's rl in OS X 10.4-pre) */
+      stdout to make it visible. (needed for Apple's readline emulation). */
    fflush(stdout);
 }
 
+#if defined(RL_READLINE_VERSION) && RL_READLINE_VERSION >= 0x0600
+/*
+  Fix for PR#16603, for readline >= 6.0.
+
+  The readline interface is somewhat messy. readline contains the
+  function rl_free_line_state(), which its internal SIGINT handler
+  calls. However, it only cancels keyboard macros and certain other
+  things: it does not clear the line. Also, as of readline 6.3, its
+  SIGINT handler is no longer triggered during our select() loop since
+  rl_callback_handler_install() no longer installs signal handlers.
+  So we have to catch the signal and do all the work ourselves to get
+  Bash-like behavior on Ctrl-C.
+ */
+static void resetReadline(void)
+{
+    rl_free_line_state();
+/* This might be helpful/needed in future, but we cannot tell until
+   readline 7.0 is released.  Only info so far:
+   https://lists.gnu.org/archive/html/bug-readline/2016-02/msg00000.html
+#ifdef HAVE_RL_CALLBACK_SIGCLEANUP
+    rl_callback_sigcleanup();
+#endif
+*/
+    rl_cleanup_after_signal();
+    RL_UNSETSTATE(RL_STATE_ISEARCH | RL_STATE_NSEARCH | RL_STATE_VIMOTION |
+		  RL_STATE_NUMERICARG | RL_STATE_MULTIKEY);
+    /* The following two lines should be equivalent, but doing both
+       won't hurt. */
+    rl_line_buffer[rl_point = rl_end = rl_mark = 0] = 0;
+    rl_done = 1;
+}
+#endif
+
 /*
   Unregister the current readline handler and pop it from R's readline
   stack, followed by re-registering the previous one.
@@ -535,6 +611,9 @@ pushReadline(const char *prompt, rl_vcpfunc_t f)
 static void popReadline(void)
 {
   if(ReadlineStack.current > -1) {
+#if defined(RL_READLINE_VERSION) && RL_READLINE_VERSION >= 0x0600
+     resetReadline();
+#endif
      rl_callback_handler_remove();
      ReadlineStack.fun[ReadlineStack.current--] = NULL;
      if(ReadlineStack.current > -1 && ReadlineStack.fun[ReadlineStack.current])
@@ -595,7 +674,7 @@ static void
 handleInterrupt(void)
 {
     popReadline();
-    onintr();
+    onintrNoResume();
 }
 
 #ifdef HAVE_RL_COMPLETION_MATCHES
@@ -683,9 +762,8 @@ static void initialize_rlcompletion(void)
     /* Tell the completer that we want a crack first. */
     rl_attempted_completion_function = R_custom_completion;
 
-    /* Disable sorting of possible completions; only readline >= 6 */
-#if RL_READLINE_VERSION >= 0x0600
-    /* if (rl_readline_version >= 0x0600) */
+// This was added in readline 6.0
+#ifdef HAVE_RL_SORT_COMPLETION_MATCHES
     rl_sort_completion_matches = 0;
 #endif
 
@@ -793,7 +871,10 @@ static char *R_completion_generator(const char *text, int state)
 	ncomp = length(completions);
 	if (ncomp > 0) {
 	    compstrings = (char **) malloc(ncomp * sizeof(char*));
-	    if (!compstrings)  return (char *)NULL;
+	    if (!compstrings) {
+		UNPROTECT(4);
+		return (char *)NULL;
+	    }
 	    for (i = 0; i < ncomp; i++)
 		compstrings[i] = strdup(translateChar(STRING_ELT(completions, i)));
 	}
@@ -822,7 +903,7 @@ void set_rl_word_breaks(const char *str)
 static void
 handleInterrupt(void)
 {
-    onintr();
+    onintrNoResume();
 }
 #endif /* HAVE_LIBREADLINE */
 
@@ -873,7 +954,7 @@ Rstd_ReadConsole(const char *prompt, unsigned char *buf, int len,
 /* according to system.txt, should be terminated in \n, so check this
    at eof and error */
 	if ((err || feof(ifp ? ifp : stdin))
-	    && (ll == 0 || buf[ll - 1] != '\n') && ll < len) {
+	    && (ll == 0 || buf[ll - 1] != '\n') && ll < (size_t)len) {
 	    buf[ll++] = '\n'; buf[ll] = '\0';
 	}
 	if (!R_Slave) {
@@ -918,6 +999,16 @@ Rstd_ReadConsole(const char *prompt, unsigned char *buf, int len,
 	    if (Rg_wait_usec > 0 && (wt < 0 || wt > Rg_wait_usec))
 		wt = Rg_wait_usec;
 	    what = R_checkActivityEx(wt, 0, handleInterrupt);
+#ifdef NEED_INT_HANDLER
+            if (UsingReadline && caught_sigwinch) {
+		caught_sigwinch = FALSE;
+		// introduced in readline 4.0: only used for >= 6.3
+#ifdef HAVE_RL_RESIZE_TERMINAL
+		rl_resize_terminal();
+#endif
+            }
+#endif
+
 	    /* This is slightly clumsy. We have advertised the
 	     * convention that R_wait_usec == 0 means "wait forever",
 	     * but we also need to enable R_checkActivity to return
@@ -1033,7 +1124,7 @@ void R_CleanTempDir(void)
 }
 
 
-void attribute_hidden Rstd_CleanUp(SA_TYPE saveact, int status, int runLast)
+void attribute_hidden NORET Rstd_CleanUp(SA_TYPE saveact, int status, int runLast)
 {
     if(saveact == SA_DEFAULT) /* The normal case apart from R_Suicide */
 	saveact = SaveAction;
@@ -1072,18 +1163,16 @@ void attribute_hidden Rstd_CleanUp(SA_TYPE saveact, int status, int runLast)
     case SA_SAVE:
 	if(runLast) R_dot_Last();
 	if(R_DirtyImage) R_SaveGlobalEnv();
-#ifdef HAVE_LIBREADLINE
-# ifdef HAVE_READLINE_HISTORY_H
+#if defined(HAVE_LIBREADLINE) && defined(HAVE_READLINE_HISTORY_H)
 	if(R_Interactive && UsingReadline) {
 	    int err;
 	    R_setupHistory(); /* re-read the history size and filename */
 	    stifle_history(R_HistorySize);
 	    err = write_history(R_HistoryFile);
-	    if(err) warning(_("problem in saving the history file '%s'"), 
+	    if(err) warning(_("problem in saving the history file '%s'"),
 			    R_HistoryFile);
 	}
-# endif /* HAVE_READLINE_HISTORY_H */
-#endif /* HAVE_LIBREADLINE */
+#endif
 	break;
     case SA_NOSAVE:
 	if(runLast) R_dot_Last();
@@ -1098,7 +1187,10 @@ void attribute_hidden Rstd_CleanUp(SA_TYPE saveact, int status, int runLast)
     R_CleanTempDir();
     if(saveact != SA_SUICIDE && R_CollectWarnings)
 	PrintWarnings();	/* from device close and (if run) .Last */
-    if(ifp) fclose(ifp);        /* input file from -f or --file= */
+    if(ifp) {
+	fclose(ifp);    /* input file from -f or --file= */
+	ifp = NULL; 	/* To avoid trying to close it again */
+    }
     fpu_setup(FALSE);
 
     exit(status);
@@ -1197,13 +1289,11 @@ void attribute_hidden Rstd_ShowMessage(const char *s)
 
 void attribute_hidden Rstd_read_history(const char *s)
 {
-#ifdef HAVE_LIBREADLINE
-# ifdef HAVE_READLINE_HISTORY_H
+#if defined(HAVE_LIBREADLINE) && defined(HAVE_READLINE_HISTORY_H)
     if(R_Interactive && UsingReadline) {
 	read_history(s);
     }
-# endif /* HAVE_READLINE_HISTORY_H */
-#endif /* HAVE_LIBREADLINE */
+#endif
 }
 
 void attribute_hidden Rstd_loadhistory(SEXP call, SEXP op, SEXP args, SEXP env)
@@ -1279,30 +1369,19 @@ void attribute_hidden Rstd_addhistory(SEXP call, SEXP op, SEXP args, SEXP env)
 
 #define R_MIN(a, b) ((a) < (b) ? (a) : (b))
 
-double currentTime(void); /* from datetime.c */
-SEXP attribute_hidden do_syssleep(SEXP call, SEXP op, SEXP args, SEXP rho)
+void Rsleep(double timeint)
 {
-    int Timeout;
-    double tm, timeint, start, elapsed;
-
-    checkArity(op, args);
-    timeint = asReal(CAR(args));
-    if (ISNAN(timeint) || timeint < 0)
-	errorcall(call, _("invalid '%s' value"), "time");
-    tm = timeint * 1e6;
-
-    start = currentTime();
+    double tm = timeint * 1e6, start = currentTime(), elapsed;
     for (;;) {
 	fd_set *what;
 	tm = R_MIN(tm, 2e9); /* avoid integer overflow */
-	
+
 	int wt = -1;
 	if (R_wait_usec > 0) wt = R_wait_usec;
 	if (Rg_wait_usec > 0 && (wt < 0 || wt > Rg_wait_usec))
 	    wt = Rg_wait_usec;
-	Timeout = (int) (wt > 0 ? R_MIN(tm, wt) : tm);
+	int Timeout = (int) (wt > 0 ? R_MIN(tm, wt) : tm);
 	what = R_checkActivity(Timeout, 1);
-
 	/* For polling, elapsed time limit ... */
 	R_CheckUserInterrupt();
 	/* Time up? */
@@ -1318,6 +1397,4 @@ SEXP attribute_hidden do_syssleep(SEXP call, SEXP op, SEXP args, SEXP rho)
 
 	tm = 1e6*(timeint - elapsed);
     }
-
-    return R_NilValue;
 }
diff --git a/src/unix/sys-unix.c b/src/unix/sys-unix.c
index cffc6e2..6f9f4af 100644
--- a/src/unix/sys-unix.c
+++ b/src/unix/sys-unix.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--2011  The R Core Team
+ *  Copyright (C) 1997--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
@@ -15,7 +15,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  */
 
 /* <UTF8>
@@ -48,15 +48,13 @@
 #endif
 
 #if defined(HAVE_SYS_RESOURCE_H) && defined(HAVE_GETRUSAGE)
-/* on MacOS X it seems sys/resource.h needs sys/time.h first */
+/* on macOS it seems sys/resource.h needs sys/time.h first */
 # include <sys/time.h>
 # include <sys/resource.h>
 #endif
 
 #include <errno.h>
 
-extern Rboolean LoadInitFile;
-
 /*
  *  4) INITIALIZATION AND TERMINATION ACTIONS
  */
@@ -161,6 +159,7 @@ const char *R_ExpandFileName(const char *s)
 
 SEXP attribute_hidden do_machine(SEXP call, SEXP op, SEXP args, SEXP env)
 {
+    checkArity(op, args);
     return mkString("Unix");
 }
 
@@ -170,8 +169,6 @@ SEXP attribute_hidden do_machine(SEXP call, SEXP op, SEXP args, SEXP env)
 
 static double clk_tck, StartTime;
 
-extern double currentTime(void); /* from datetime.c */
-
 void R_setStartTime(void)
 {
 #ifdef HAVE_SYSCONF
@@ -254,7 +251,13 @@ SEXP attribute_hidden do_system(SEXP call, SEXP op, SEXP args, SEXP rho)
 	error(_("'intern' must be logical and not NA"));
     if (intern) { /* intern = TRUE */
 	FILE *fp;
-	char *x = "r", buf[INTERN_BUFSIZE];
+	char *x = "r",
+#ifdef HAVE_GETLINE
+	    *buf = NULL;
+	size_t buf_len = 0;
+#else
+	    buf[INTERN_BUFSIZE];
+#endif
 	const char *cmd;
 	int i, j, res;
 	SEXP tchar, rval;
@@ -265,16 +268,26 @@ SEXP attribute_hidden do_system(SEXP call, SEXP op, SEXP args, SEXP rho)
 	if(!(fp = R_popen(cmd, x)))
 	    error(_("cannot popen '%s', probable reason '%s'"),
 		  cmd, strerror(errno));
+#ifdef HAVE_GETLINE
+        size_t read;
+        for(i = 0; (read = getline(&buf, &buf_len, fp)) != (size_t)-1; i++) {
+	    if (buf[read - 1] == '\n')
+#else
 	for (i = 0; fgets(buf, INTERN_BUFSIZE, fp); i++) {
 	    size_t read = strlen(buf);
 	    if(read >= INTERN_BUFSIZE - 1)
 		warning(_("line %d may be truncated in call to system(, intern = TRUE)"), i + 1);
 	    if (read > 0 && buf[read-1] == '\n')
+#endif
 		buf[read - 1] = '\0'; /* chop final CR */
 	    tchar = mkChar(buf);
 	    UNPROTECT(1);
 	    PROTECT(tlist = CONS(tchar, tlist));
 	}
+#ifdef HAVE_GETLINE
+        if (buf != NULL)
+          free(buf);
+#endif
 	res = pclose(fp);
 #ifdef HAVE_SYS_WAIT_H
 	if (WIFEXITED(res)) res = WEXITSTATUS(res);
@@ -290,16 +303,16 @@ SEXP attribute_hidden do_system(SEXP call, SEXP op, SEXP args, SEXP rho)
 		error(_("error in running command"));
 	} else if (res) {
 	    if (errno)
-		warningcall(R_NilValue, 
-			    _("running command '%s' had status %d and error message '%s'"), 
-			    cmd, res, 
+		warningcall(R_NilValue,
+			    _("running command '%s' had status %d and error message '%s'"),
+			    cmd, res,
 			    strerror(errno));
-	    else 
-		warningcall(R_NilValue, 
-			    _("running command '%s' had status %d"), 
+	    else
+		warningcall(R_NilValue,
+			    _("running command '%s' had status %d"),
 			    cmd, res);
 	}
-	
+
 	rval = PROTECT(allocVector(STRSXP, i));
 	for (j = (i - 1); j >= 0; j--) {
 	    SET_STRING_ELT(rval, j, CAR(tlist));
@@ -450,12 +463,6 @@ void R_ProcessEvents(void)
 # endif
 #endif
 
-#ifdef linux
-# ifdef HAVE_FPU_CONTROL_H
-#  include <fpu_control.h>
-# endif
-#endif
-
 /* patch from Ei-ji Nakama for Intel compilers on ix86.
    From http://www.nakama.ne.jp/memo/ia32_linux/R-2.1.1.iccftzdaz.patch.txt.
    Since updated to include x86_64.
@@ -473,9 +480,6 @@ void fpu_setup(Rboolean start)
     fpsetmask(0);
 #endif
 
-#ifdef NEED___SETFPUCW
-    __setfpucw(_FPU_IEEE);
-#endif
 #if (defined(__i386) || defined(__x86_64)) && defined(__INTEL_COMPILER) && __INTEL_COMPILER > 800
     _MM_SET_FLUSH_ZERO_MODE(_MM_FLUSH_ZERO_OFF);
     _MM_SET_DENORMALS_ZERO_MODE(_MM_DENORMALS_ZERO_OFF);
@@ -484,9 +488,5 @@ void fpu_setup(Rboolean start)
 #ifdef __FreeBSD__
     fpsetmask(~0);
 #endif
-
-#ifdef NEED___SETFPUCW
-    __setfpucw(_FPU_DEFAULT);
-#endif
     }
 }
diff --git a/src/unix/system.c b/src/unix/system.c
index 3c6149a..7aed630 100644
--- a/src/unix/system.c
+++ b/src/unix/system.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--2013  The R Core Team
+ *  Copyright (C) 1997--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
@@ -15,7 +15,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, a copy is available at
- *  http://www.r-project.org/Licenses/
+ *  https://www.R-project.org/Licenses/
  */
 
 /* <UTF8> char here is handled as a whole string */
@@ -126,7 +126,10 @@ void R_setupHistory()
 }
 
 #if defined(HAVE_SYS_RESOURCE_H) && defined(HAVE_GETRLIMIT)
-/* on MacOS X it seems sys/resource.h needs sys/time.h first */
+/*
+  Needed by AIX and formerly by macOS (but not by POSIX).
+  http://www.ibm.com/support/knowledgecenter/ssw_aix_61/com.ibm.aix.basetrf1/getrlimit_64.htm
+ */
 # ifdef HAVE_SYS_TIME_H
 #  include <sys/time.h>
 # endif
@@ -143,14 +146,24 @@ extern void * __libc_stack_end;
 
 int R_running_as_main_program = 0;
 
-extern void BindDomain(char *R_Home);
-
-/* In src/main/main.c, to avoid inlining */
+/* In ../main/main.c, to avoid inlining */
 extern uintptr_t dummy_ii(void);
 
 /* Protection against embedded misuse, PR#15420 */
 static int num_initialized = 0;
 
+static char* unescape_arg(char *p, char* avp) {
+    /* Undo the escaping done in the front end */
+    char *q;
+    for(q = avp; *q; q++) {
+	if(*q == '~' && *(q+1) == '+' && *(q+2) == '~') {
+	    q += 2;
+	    *p++ = ' ';
+	} else *p++ = *q;
+    }
+    return p;
+}
+
 int Rf_initialize_R(int ac, char **av)
 {
     int i, ioff = 1, j;
@@ -168,20 +181,40 @@ int Rf_initialize_R(int ac, char **av)
 
 #if defined(HAVE_SYS_RESOURCE_H) && defined(HAVE_GETRLIMIT)
 {
+    /* getrlimit is POSIX:
+       http://pubs.opengroup.org/onlinepubs/9699919799/functions/getrlimit.html
+    */
     struct rlimit rlim;
 
     {
 	uintptr_t ii = dummy_ii();
 	/* 1 is downwards */
-	
+
 	R_CStackDir = ((uintptr_t)&i > ii) ? 1 : -1;
     }
 
     if(getrlimit(RLIMIT_STACK, &rlim) == 0) {
-	unsigned long lim1, lim2;
-	lim1 = (unsigned long) rlim.rlim_cur;
-	lim2 = (unsigned long) rlim.rlim_max; /* Usually unlimited */
-	R_CStackLimit = lim1 < lim2 ? lim1 : lim2;
+	/* 'unlimited' is represented by RLIM_INFINITY, which is a
+	   very large (but maybe not the largest) representable value.
+
+	   The standard allows the values RLIM_SAVED_CUR and
+	   RLIB_SAVED_MAX, apparently used on 32-bit AIX.  
+	   (http://www.ibm.com/support/knowledgecenter/ssw_aix_61/com.ibm.aix.basetrf1/getrlimit_64.htm)
+
+	   These may or may not be different from RLIM_INFINITY (they
+	   are the same on Linux and macOS but not Solaris where they
+	   are larger).  We will assume that unrepresentable limits
+	   are very large.
+
+	   This is cautious: it is extremely unlikely that the soft
+	   limit is either unlimited or unrepresentable.
+	*/
+	rlim_t lim = rlim.rlim_cur;
+#if defined(RLIM_SAVED_CUR) && defined(RLIM_SAVED_MAX)
+	if (lim == RLIM_SAVED_CUR || lim == RLIM_SAVED_MAX) 
+	    lim = RLIM_INFINITY;
+#endif
+	if (lim != RLIM_INFINITY) R_CStackLimit = (uintptr_t) lim;
     }
 #if defined(HAVE_LIBC_STACK_END)
     R_CStackStart = (uintptr_t) __libc_stack_end;
@@ -201,7 +234,7 @@ int Rf_initialize_R(int ac, char **av)
 	R_CStackStart = (uintptr_t) &i + (6000 * R_CStackDir);
     }
 #endif
-    if(R_CStackStart == -1) R_CStackLimit = -1; /* never set */
+    if(R_CStackStart == (uintptr_t)(-1)) R_CStackLimit = (uintptr_t)(-1); /* never set */
 
     /* printf("stack limit %ld, start %lx dir %d \n", R_CStackLimit,
 	      R_CStackStart, R_CStackDir); */
@@ -306,57 +339,32 @@ int Rf_initialize_R(int ac, char **av)
 		UsingReadline = FALSE;
 	    } else if(!strcmp(*av, "-f")) {
 		ac--; av++;
-		Rp->R_Interactive = FALSE;
-		if(strcmp(*av, "-")) {
-		    /* Undo the escaping done in the front end */
-		    char path[PATH_MAX], *p = path, *q;
-		    for(q = *av; *q; q++) {
-			if(*q == '~' && *(q+1) == '+' && *(q+2) == '~') {
-			    q += 2;
-			    *p++ = ' ';
-			} else *p++ = *q;
-		    }
-		    *p = '\0';
-		    ifp = R_fopen(path, "r");
-		    if(!ifp) {
-			snprintf(msg, 1024,
-				 _("cannot open file '%s': %s"),
-				 path, strerror(errno));
-			R_Suicide(msg);
-		    }
+#define R_INIT_TREAT_F(_AV_)						\
+		Rp->R_Interactive = FALSE;				\
+		if(strcmp(_AV_, "-")) {					\
+		    char path[PATH_MAX], *p = path;			\
+		    p = unescape_arg(p, _AV_);				\
+		    *p = '\0';						\
+		    ifp = R_fopen(path, "r");				\
+		    if(!ifp) {						\
+			snprintf(msg, 1024,				\
+				 _("cannot open file '%s': %s"),	\
+				 path, strerror(errno));		\
+			R_Suicide(msg);					\
+		    }							\
 		}
+		R_INIT_TREAT_F(*av);
+
 	    } else if(!strncmp(*av, "--file=", 7)) {
-		Rp->R_Interactive = FALSE;
-		if(strcmp((*av)+7, "-")) {
-		    /* Undo the escaping done in the front end */
-		    char path[PATH_MAX], *p = path, *q;
-		    for(q = (*av)+7; *q; q++) {
-			if(*q == '~' && *(q+1) == '+' && *(q+2) == '~') {
-			    q += 2;
-			    *p++ = ' ';
-			} else *p++ = *q;
-		    }
-		    *p = '\0';
-		    ifp = R_fopen(path, "r");
-		    if(!ifp) {
-			snprintf(msg, 1024,
-				 _("cannot open file '%s': %s"),
-				 path, strerror(errno));
-			R_Suicide(msg);
-		    }
-		}
+
+		R_INIT_TREAT_F((*av)+7);
+
 	    } else if(!strcmp(*av, "-e")) {
 		ac--; av++;
 		Rp->R_Interactive = FALSE;
 		if(strlen(cmdlines) + strlen(*av) + 2 <= 10000) {
-		    char *p = cmdlines+strlen(cmdlines), *q;
-		    /* Undo the escaping done in the front end */
-		    for(q = *av; *q; q++) {
-			if(*q == '~' && *(q+1) == '+' && *(q+2) == '~') {
-			    q += 2;
-			    *p++ = ' ';
-			} else *p++ = *q;
-		    }
+		    char *p = cmdlines+strlen(cmdlines);
+		    p = unescape_arg(p, *av);
 		    *p++ = '\n'; *p = '\0';
 		} else {
 		    snprintf(msg, 1024, _("WARNING: '-e %s' omitted as input is too long\n"), *av);
@@ -421,8 +429,8 @@ int Rf_initialize_R(int ac, char **av)
 	ptr_R_WriteConsole = NULL;
     } else {
 #endif
-    R_Outputfile = stdout;
-    R_Consolefile = stderr;
+	R_Outputfile = stdout;
+	R_Consolefile = stderr;
 #ifdef HAVE_AQUA
     }
 #endif
@@ -481,3 +489,31 @@ int R_EditFiles(int nfile, const char **file, const char **title,
     }
     return 1;
 }
+
+/* Returns the limit on the number of open files. On error or when no
+   limit is known, returns a negative number. */
+int R_GetFDLimit() {
+
+#if defined(HAVE_SYS_RESOURCE_H) && defined(HAVE_GETRLIMIT)
+    struct rlimit rlim;
+    /* Historically this was RLIMIT_OFILE on BSD, but we require the
+       POSIX version.
+
+       Most often RLIM_INFINITY >= INT_MAX, but not on some 32-bit
+       systems.  On all current systems the limit will be at most a
+       few thousand.
+
+       Note that 'unlimited' here probably does not mean it:
+       e.g. there is a kernel limit of OPEN_MAX on macOS.
+    */
+    if (getrlimit(RLIMIT_NOFILE, &rlim) == 0) {
+	rlim_t lim = rlim.rlim_cur;
+#if defined(RLIM_SAVED_CUR) && defined(RLIM_SAVED_MAX)
+	if (lim == RLIM_SAVED_CUR || lim == RLIM_SAVED_MAX) 
+	    lim = RLIM_INFINITY;
+#endif
+	return (int)((lim > INT_MAX) ? INT_MAX : lim);
+    }
+#endif
+    return -1;
+}
diff --git a/tests/CRANtools.R b/tests/CRANtools.R
new file mode 100644
index 0000000..9fc2ef3
--- /dev/null
+++ b/tests/CRANtools.R
@@ -0,0 +1,21 @@
+### This needs a full local CRAN mirror or Internet access
+
+.ptime <- proc.time()
+
+## look up CRAN mirror in the same way the functions do.
+mirror <- tools:::CRAN_baseurl_for_web_area()
+message("Using CRAN mirror ",  sQuote(mirror))
+
+## Sanity check
+options(warn = 1)
+foo <- tryCatch(readLines(paste0(mirror, "/web/packages")),
+                error = function(e) {
+                    message(conditionMessage(e))
+                    cat("Time elapsed: ", proc.time() - .ptime,"\n")
+                    ## q("no")
+                })
+
+library(tools)
+example("CRAN_package_db", run.donttest = TRUE)
+
+cat("Time elapsed: ", proc.time() - .ptime,"\n")
diff --git a/tests/Embedding/index.html b/tests/Embedding/index.html
index 66a5fb6..e1fa8ca 100644
--- a/tests/Embedding/index.html
+++ b/tests/Embedding/index.html
@@ -16,7 +16,7 @@ installation. This is only relevant if one has configured R with the
 <p>
 
 More information can be found at the 
-<a href="http://developer.r-project.org/embedded.html">R Developer's site</a>
+<a href="https://developer.r-project.org/embedded.html">R Developers' site</a>
 
 <h3>Test Applications</h3>
 <dl>
@@ -70,21 +70,25 @@ More information can be found at the
        including the some of the Omegahat packages:
 <ul>
   <li> As a procedural language within <a href="http://www.postgresql.org">Postsgres</a>.
-       See <a href="http://www.omegahat.org/DBMS/Postgres/R/RPostgres.pdf">R in Postgres</a>
-  <li> <a href="http://www.omegahat.org/RSJava">SJava</a>
-  <li> <a href="http://www.omegahat.org/SNetscape">SNetscape</a>
-  <li> <a href="http://www.omegahat.org/SXalan">SXalan</a>
-  <li> <a href="http://www.omegahat.org/SXalan">SXalan</a>
-  <li> <a href="http://www.omegahat.org/RSPython">RSPython</a>
-  <li> <a href="http://www.omegahat.org/RSPerl">RSPerl</a>      
+       See <a href="http://www.omegahat.net/DBMS/Postgres/R/RPostgres.pdf">R in Postgres</a>
+  <li> <a href="http://www.omegahat.net/RSJava">SJava</a>
+  <li> <a href="http://www.omegahat.net/SNetscape">SNetscape</a>
+  <li> <a href="http://www.omegahat.net/SXalan">SXalan</a>
+  <li> <a href="http://www.omegahat.net/SXalan">SXalan</a>
+  <li> <a href="http://www.omegahat.net/RSPython">RSPython</a>
+  <li> <a href="http://www.omegahat.net/RSPerl">RSPerl</a>      
 </ul>
- These can be used as example code for embedding R within other applications.
+ These can be used as example code for embedding R within other
+ applications.
 </dl>
 
 <hr>
 <address></address>
+<!---
 <a href="http://cm.bell-labs.com/stat/duncan">Duncan Temple Lang</a>
-<a href=mailto:duncan at research.bell-labs.com><duncan at research.bell-labs.com></a></address>
+<a href=mailto:duncan at research.bell-labs.com><duncan at research.bell-labs.com></a>
+-->
+</address>
 <!-- hhmts start -->
 Last modified: Sat Jan 12 2008
 <!-- hhmts end -->
diff --git a/tests/Examples/Makefile.in b/tests/Examples/Makefile.in
index aa9c964..e4ce04c 100644
--- a/tests/Examples/Makefile.in
+++ b/tests/Examples/Makefile.in
@@ -18,6 +18,9 @@ INSTFILES = \
 DISTFILES = Makefile.in  Makefile.win $(INSTFILES)
 
 ## R_LIBS_SITE has to be non-empty or it is ignored
+## Note that this does not set LC_COLLATE.  The collation of examples
+## is done in C order in massageExamples(), but we want to test the
+## orderings users use.
 R_EXE = LANGUAGE=en LC_TIME=C R_LIBS= R_LIBS_USER= R_LIBS_SITE='nothing' \
   $(top_builddir)/bin/R --slave --vanilla
 
@@ -28,9 +31,10 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 
 test-Examples: test-Examples-Base
 
+TEST_DONTTEST = FALSE
 ## Who does make check but not make? -- maybe better to check what was made.
 test-Examples-Base: Makefile
-	@$(ECHO) "tools::testInstalledPackages(scope='base', types='examples', srcdir=\"$(srcdir)\")" | $(R_EXE)
+	@$(ECHO) "tools::testInstalledPackages(scope='base', types='examples', srcdir=\"$(srcdir)\", commentDonttest=!$(TEST_DONTTEST))" | $(R_EXE)
 
 
 ## <NOTE>
@@ -45,7 +49,7 @@ test-Examples-Recommended: test-Examples-Base
 
 mostlyclean: clean
 clean:
-	- at rm -f *.R *.Rout *.Rd* *.pdf *.tex *.dat* data foo* ex*.gz Makedeps
+	- at rm -f *.R *.R-cnt *.Rout *.Rd* *.pdf *.tex *.dat* data foo* ex*.gz Makedeps
 distclean: clean
 	- at rm -f *.R*prev .RData sink-examp.txt Makefile
 maintainer-clean: distclean
diff --git a/tests/Examples/Makefile.win b/tests/Examples/Makefile.win
index 9379c6f..6b83e2a 100644
--- a/tests/Examples/Makefile.win
+++ b/tests/Examples/Makefile.win
@@ -13,14 +13,20 @@ INSTFILES = \
 
 ECHO = echo
 
-R_EXE = $(R_HOME)/$(BINDIR)/Rterm --slave --vanilla LANGUAGE=en LC_TIME=C
+## R_LIBS_SITE has to be non-empty or it is ignored
+## Note that this does not set LC_COLLATE.  The collation of examples
+## is done in C order in massageExamples(), but we want to test the
+## orderings users use.
+R_EXE = $(R_HOME)/$(BINDIR)/Rterm --slave --vanilla \
+  LANGUAGE=en LC_TIME=C R_LIBS= R_LIBS_USER= R_LIBS_SITE=nothing
 
 all: test-Examples-Base
 
 test-Examples: test-Examples-Base
 
+TEST_DONTTEST = FALSE
 test-Examples-Base:
-	@$(ECHO) "tools::testInstalledPackages(scope='base', types='examples')" | $(R_EXE)
+	@$(ECHO) "tools::testInstalledPackages(scope='base', types='examples', commentDonttest=!$(TEST_DONTTEST))" | $(R_EXE)
 
 
 ## nlme suggests 'Hmisc'
@@ -30,7 +36,7 @@ test-Examples-Recommended: test-Examples-Base
 
 mostlyclean: clean
 clean:
-	- at rm -f *.R *.Rout *.Rd* *.pdf *.tex *.dat* data foo* ex*.gz
+	- at rm -f *.R *.R-cnt *.Rout *.Rd* *.pdf *.tex *.dat* data foo* ex*.gz
 distclean: clean
 	- at rm -f *.R*bak *.R*bakk *.R*prev .RData sink-examp.txt
 
diff --git a/tests/Examples/datasets-Ex.Rout.save b/tests/Examples/datasets-Ex.Rout.save
index 6c8a5aa..8631796 100644
--- a/tests/Examples/datasets-Ex.Rout.save
+++ b/tests/Examples/datasets-Ex.Rout.save
@@ -1,7 +1,7 @@
 
-R version 3.1.2 RC (2014-10-29 r66897) -- "Pumpkin Helmet"
-Copyright (C) 2014 The R Foundation for Statistical Computing
-Platform: x86_64-unknown-linux-gnu (64-bit)
+R version 3.4.0 RC (2017-04-18 r72543) -- "You Stupid Darkness"
+Copyright (C) 2017 The R Foundation for Statistical Computing
+Platform: x86_64-pc-linux-gnu (64-bit)
 
 R is free software and comes with ABSOLUTELY NO WARRANTY.
 You are welcome to redistribute it under certain conditions.
@@ -81,7 +81,7 @@ Type 'q()' to quit R.
 > ## Don't show: 
 > options(show.nls.convergence=FALSE)
 > old <- options(digits = 5)
-> ## End Don't show
+> ## End(Don't show)
 > require(stats)
 > # simplest form of fitting a first-order model to these data
 > fm1 <- nls(demand ~ A*(1-exp(-exp(lrc)*Time)), data = BOD,
@@ -120,7 +120,7 @@ Residual standard error: 2.55 on 4 degrees of freedom
 
 > ## Don't show: 
 > options(old)
-> ## End Don't show
+> ## End(Don't show)
 > 
 > 
 > 
@@ -154,7 +154,7 @@ Residual standard error: 2.55 on 4 degrees of freedom
 > require(stats); require(graphics)
 > ## Don't show: 
 > options(show.nls.convergence=FALSE)
-> ## End Don't show
+> ## End(Don't show)
 > coplot(density ~ conc | Run, data = DNase,
 +        show.given = FALSE, type = "b")
 > coplot(density ~ log(conc) | Run, data = DNase,
@@ -1064,7 +1064,7 @@ Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’
 > require(stats); require(graphics)
 > ## Don't show: 
 > options(show.nls.convergence=FALSE)
-> ## End Don't show
+> ## End(Don't show)
 > plot(rate ~ conc, data = Puromycin, las = 1,
 +      xlab = "Substrate concentration (ppm)",
 +      ylab = "Reaction velocity (counts/min/min)",
@@ -1134,7 +1134,7 @@ Residual standard error: 9.773 on 9 degrees of freedom
 > require(stats); require(graphics)
 > ## Don't show: 
 > options(show.nls.convergence=FALSE)
-> ## End Don't show
+> ## End(Don't show)
 > coplot(conc ~ Time | Subject, data = Theoph, show.given = FALSE)
 > Theoph.4 <- subset(Theoph, Subject == 4)
 > fm1 <- nls(conc ~ SSfol(Dose, Time, lKe, lKa, lCl),
@@ -1358,9 +1358,32 @@ sigma^2 estimated as 0.001476:  log likelihood = 349.73,  aic = -685.46
 > 
 > ### ** Examples
 > 
+> summary(USArrests)
+     Murder          Assault         UrbanPop          Rape      
+ Min.   : 0.800   Min.   : 45.0   Min.   :32.00   Min.   : 7.30  
+ 1st Qu.: 4.075   1st Qu.:109.0   1st Qu.:54.50   1st Qu.:15.07  
+ Median : 7.250   Median :159.0   Median :66.00   Median :20.10  
+ Mean   : 7.788   Mean   :170.8   Mean   :65.54   Mean   :21.23  
+ 3rd Qu.:11.250   3rd Qu.:249.0   3rd Qu.:77.75   3rd Qu.:26.18  
+ Max.   :17.400   Max.   :337.0   Max.   :91.00   Max.   :46.00  
+> 
 > require(graphics)
 > pairs(USArrests, panel = panel.smooth, main = "USArrests data")
 > 
+> ## Difference between 'USArrests' and its correction
+> USArrests["Maryland", "UrbanPop"] # 67 -- the transcription error
+[1] 67
+> UA.C <- USArrests
+> UA.C["Maryland", "UrbanPop"] <- 76.6
+> 
+> ## also +/- 0.5 to restore the original  <n>.5  percentages
+> s5u <- c("Colorado", "Florida", "Mississippi", "Wyoming")
+> s5d <- c("Nebraska", "Pennsylvania")
+> UA.C[s5u, "UrbanPop"] <- UA.C[s5u, "UrbanPop"] + 0.5
+> UA.C[s5d, "UrbanPop"] <- UA.C[s5d, "UrbanPop"] - 0.5
+> 
+> ## ==> UA.C  is now a *C*orrected version of  USArrests
+> 
 > 
 > 
 > cleanEx()
@@ -2651,7 +2674,6 @@ Model 2: Speed ~ Run + Expt
 > ### ** Examples
 > 
 > 
-> base::options(contrasts = c(unordered = "contr.treatment",ordered = "contr.poly"))
 > cleanEx()
 > nameEx("occupationalStatus")
 > ### * occupationalStatus
@@ -2748,6 +2770,13 @@ Warning: not plotting observations with leverage one:
 > dotchart(precip[order(precip)], main = "precip data")
 > title(sub = "Average annual precipitation (in.)")
 > 
+> ## Old ("wrong") version of dataset (just name change):
+> precip.O <- local({
++    p <- precip; names(p)[names(p) == "Cincinnati"] <- "Cincinati" ; p })
+> stopifnot(all(precip == precip.O),
++ 	  match("Cincinnati", names(precip)) == 46,
++ 	  identical(names(precip)[-46], names(precip.O)[-46]))
+> 
 > 
 > 
 > cleanEx()
@@ -3417,7 +3446,7 @@ Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’
 > require(stats); require(graphics)
 > ## Don't show: 
 > options(show.nls.convergence=FALSE)
-> ## End Don't show
+> ## End(Don't show)
 > coplot(uptake ~ conc | Plant, data = CO2, show.given = FALSE, type = "b")
 > ## fit the data for the first plant
 > fm1 <- nls(uptake ~ SSasymp(conc, Asym, lrc, c0),
@@ -3459,7 +3488,7 @@ c0   -5.14
 > ###
 > options(digits = 7L)
 > base::cat("Time elapsed: ", proc.time() - base::get("ptime", pos = 'CheckExEnv'),"\n")
-Time elapsed:  1.455 0.021 1.48 0 0 
+Time elapsed:  1.393 0.034 1.431 0 0 
 > grDevices::dev.off()
 null device 
           1 
diff --git a/tests/Examples/grDevices-Ex.Rout.save b/tests/Examples/grDevices-Ex.Rout.save
index d276745..d3f9513 100644
--- a/tests/Examples/grDevices-Ex.Rout.save
+++ b/tests/Examples/grDevices-Ex.Rout.save
@@ -1,7 +1,7 @@
 
-R version 3.1.2 RC (2014-10-29 r66897) -- "Pumpkin Helmet"
-Copyright (C) 2014 The R Foundation for Statistical Computing
-Platform: x86_64-unknown-linux-gnu (64-bit)
+R version 3.4.0 RC (2017-04-18 r72543) -- "You Stupid Darkness"
+Copyright (C) 2017 The R Foundation for Statistical Computing
+Platform: x86_64-pc-linux-gnu (64-bit)
 
 R is free software and comes with ABSOLUTELY NO WARRANTY.
 You are welcome to redistribute it under certain conditions.
@@ -236,7 +236,7 @@ $allowed
 > ### Name: as.raster
 > ### Title: Create a Raster Object
 > ### Aliases: is.raster as.raster as.raster.logical as.raster.numeric
-> ###   as.raster.character as.raster.matrix as.raster.array
+> ###   as.raster.raw as.raster.character as.raster.matrix as.raster.array
 > ### Keywords: dplot
 > 
 > ### ** Examples
@@ -266,7 +266,7 @@ $allowed
 [3,] "#999999"
 [4,] "#CCCCCC"
 [5,] "#FFFFFF"
-> #   locigal vectors are black and white ...
+> #   logical vectors are black and white ...
 > as.raster(1:10 %% 2 == 0)
       [,1]     
  [1,] "#000000"
@@ -287,7 +287,7 @@ $allowed
      [,8]      [,9]      [,10]    
 [1,] "#FFFFFF" "#000000" "#FFFFFF"
 > 
-> # Matrix can also be logical or numeric ...
+> # Matrix can also be logical or numeric (or raw) ...
 > as.raster(matrix(c(TRUE, FALSE), nrow = 3, ncol = 2))
      [,1]      [,2]     
 [1,] "#FFFFFF" "#000000"
@@ -353,7 +353,7 @@ $allowed
 +           identical(r[3:5], colors()[3:5]))
 > r[2:4] <- "black"
 > stopifnot(identical(r[1:4, 1], as.raster(c("white", rep("black", 3)))))
-> ## End Don't show
+> ## End(Don't show)
 > 
 > 
 > 
@@ -534,7 +534,7 @@ $out
 15  4.50  =    11.50  =   
 16  4.75  4.50 12.25 12.50
 17  5.00  =    13.00  =   
-> ## End Don't show
+> ## End(Don't show)
 > 
 > 
 > 
@@ -2015,8 +2015,8 @@ character(0)
 > 
 > ### ** Examples
 > 
-> # This currently only works on the Windows
-> # and X11(type = "Xlib") screen devices...
+> # This currently only works on the Windows, X11(type = "Xlib"), and
+> # X11(type = "cairo") screen devices...
 > ## Not run: 
 > ##D savepar <- par(ask = FALSE)
 > ##D dragplot <- function(..., xlim = NULL, ylim = NULL, xaxs = "r", yaxs = "r") {
@@ -2079,6 +2079,21 @@ character(0)
 > 
 > 
 > cleanEx()
+> nameEx("grSoftVersion")
+> ### * grSoftVersion
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: grSoftVersion
+> ### Title: Report Versions of Graphics Software
+> ### Aliases: grSoftVersion
+> 
+> ### ** Examples
+> 
+> 
+> 
+> 
+> cleanEx()
 > nameEx("gray")
 > ### * gray
 > 
@@ -2514,7 +2529,6 @@ Sturges   Scott      FD
 > 
 > 
 > 
-> graphics::par(get("par.postscript", pos = 'CheckExEnv'))
 > cleanEx()
 > nameEx("pdf.options")
 > ### * pdf.options
@@ -3212,66 +3226,68 @@ attr(,"class")
 > 
 > ### ** Examples
 > 
+> pretty(as.Date("2000-03-01")) # R 1.0.0 came in a leap year
+[1] "2000-02-28" "2000-02-29" "2000-03-01" "2000-03-02" "2000-03-03"
+[6] "2000-03-04"
 > 
-> steps <-
-+     list("10 secs", "1 min", "5 mins", "30 mins", "6 hours", "12 hours",
-+          "1 DSTday", "2 weeks", "1 month", "6 months", "1 year",
-+          "10 years", "50 years", "1000 years")
-> 
-> names(steps) <- paste("span =", unlist(steps))
-> 
+> ## time ranges in diverse scales:% also in ../../../../tests/reg-tests-1c.R
+> require(stats)
+> steps <- setNames(,
++     c("10 secs", "1 min", "5 mins", "30 mins", "6 hours", "12 hours",
++       "1 DSTday", "2 weeks", "1 month", "6 months", "1 year",
++       "10 years", "50 years", "1000 years"))
 > x <- as.POSIXct("2002-02-02 02:02")
 > lapply(steps,
 +        function(s) {
 +            at <- pretty(seq(x, by = s, length = 2), n = 5)
 +            attr(at, "labels")
 +        })
-$`span = 10 secs`
+$`10 secs`
 [1] "00" "02" "04" "06" "08" "10"
 
-$`span = 1 min`
+$`1 min`
 [1] "00" "10" "20" "30" "40" "50" "00"
 
-$`span = 5 mins`
+$`5 mins`
 [1] "02:02" "02:03" "02:04" "02:05" "02:06" "02:07"
 
-$`span = 30 mins`
-[1] "02:05" "02:10" "02:15" "02:20" "02:25" "02:30"
+$`30 mins`
+[1] "02:00" "02:10" "02:20" "02:30" "02:40"
 
-$`span = 6 hours`
-[1] "03:00" "04:00" "05:00" "06:00" "07:00" "08:00"
+$`6 hours`
+[1] "02:00" "03:00" "04:00" "05:00" "06:00" "07:00" "08:00" "09:00"
 
-$`span = 12 hours`
-[1] "03:00" "06:00" "09:00" "12:00"
+$`12 hours`
+[1] "00:00" "03:00" "06:00" "09:00" "12:00" "15:00"
 
-$`span = 1 DSTday`
-[1] "Feb 02 06:00" "Feb 02 12:00" "Feb 02 18:00" "Feb 03 00:00"
+$`1 DSTday`
+[1] "Feb 02 00:00" "Feb 02 06:00" "Feb 02 12:00" "Feb 02 18:00" "Feb 03 00:00"
+[6] "Feb 03 06:00"
 
-$`span = 2 weeks`
-[1] "Feb 04" "Feb 06" "Feb 08" "Feb 10" "Feb 12" "Feb 14" "Feb 16"
+$`2 weeks`
+[1] "Jan 28" "Feb 04" "Feb 11" "Feb 18"
 
-$`span = 1 month`
-[1] "Feb 04" "Feb 11" "Feb 18" "Feb 25"
+$`1 month`
+[1] "Jan 28" "Feb 04" "Feb 11" "Feb 18" "Feb 25" "Mar 04"
 
-$`span = 6 months`
-[1] "Mar" "Apr" "May" "Jun" "Jul" "Aug"
+$`6 months`
+[1] "Feb" "Mar" "Apr" "May" "Jun" "Jul" "Aug" "Sep"
 
-$`span = 1 year`
-[1] "Apr" "Jul" "Oct" "Jan"
+$`1 year`
+[1] "Jan" "Apr" "Jul" "Oct" "Jan" "Apr"
 
-$`span = 10 years`
-[1] "2004" "2006" "2008" "2010" "2012"
+$`10 years`
+[1] "2002" "2004" "2006" "2008" "2010" "2012" "2014"
 
-$`span = 50 years`
-[1] "2010" "2020" "2030" "2040" "2050"
+$`50 years`
+[1] "2000" "2010" "2020" "2030" "2040" "2050" "2060"
 
-$`span = 1000 years`
-[1] "2200" "2400" "2600" "2800" "3000"
+$`1000 years`
+[1] "2000" "2200" "2400" "2600" "2800" "3000" "3200"
 
 > 
 > 
 > 
-> 
 > cleanEx()
 > nameEx("ps.options")
 > ### * ps.options
@@ -3432,7 +3448,7 @@ v    1 1.0000000 1.0000000  1.0 1.0000000 1.0000000
 > 
 > ## Don't show: 
 > set.seed(151)
-> ## End Don't show
+> ## End(Don't show)
 > (rgb3 <- floor(256 * matrix(stats::runif(3*12), 3, 12)))
      [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [,12]
 [1,]  122  137  116  244   20  153  191  250  134   117    27   202
@@ -3534,7 +3550,8 @@ v 0.98039216 0.7647059 0.4588235 0.8549020 0.9960784
 > 
 > ### ** Examples
 > 
-> xy.coords(stats::fft(c(1:9)), NULL)
+> ff <- stats::fft(1:9)
+> xy.coords(ff)
 $x
 [1] 45.0 -4.5 -4.5 -4.5 -4.5 -4.5 -4.5 -4.5 -4.5
 
@@ -3548,11 +3565,35 @@ $xlab
 $ylab
 [1] "Im()"
 
-> 
+> xy.coords(ff, xlab = "fft") # labels "Re(fft)",  "Im(fft)"
+$x
+[1] 45.0 -4.5 -4.5 -4.5 -4.5 -4.5 -4.5 -4.5 -4.5
+
+$y
+[1]   0.0000000  12.3636484   5.3628912   2.5980762   0.7934714  -0.7934714
+[7]  -2.5980762  -5.3628912 -12.3636484
+
+$xlab
+[1] "Re(fft)"
+
+$ylab
+[1] "Im(fft)"
+
+> ## Don't show: 
+> stopifnot(identical(xy.coords(ff, xlab = "fft"),
++                     xy.coords(ff, ylab = "fft")))
+> xy.labs <- function(...) xy.coords(...)[c("xlab","ylab")]
+> stopifnot(identical(xy.labs(ff, xlab = "fft", setLab = FALSE),
++                     list(xlab = "fft", ylab = "fft")),
++           identical(xy.labs(ff, ylab = "fft", setLab = FALSE),
++                     list(xlab = NULL, ylab = "fft")),
++           identical(xy.labs(ff, xlab = "Re(fft)", ylab = "Im(fft)", setLab = FALSE),
++                     list(xlab = "Re(fft)", ylab = "Im(fft)")))
+> ## End(Don't show)
 > with(cars, xy.coords(dist ~ speed, NULL)$xlab ) # = "speed"
 [1] "speed"
 > 
-> xy.coords(1:3, 1:2, recycle = TRUE)
+> xy.coords(1:3, 1:2, recycle = TRUE) # otherwise error "lengths differ"
 $x
 [1] 1 2 3
 
@@ -3565,8 +3606,8 @@ NULL
 $ylab
 NULL
 
-> xy.coords(-2:10, NULL, log = "y")
-Warning in xy.coords(-2:10, NULL, log = "y") :
+> xy.coords(-2:10, log = "y")
+Warning in xy.coords(-2:10, log = "y") :
   3 y values <= 0 omitted from logarithmic plot
 $x
  [1]  1  2  3  4  5  6  7  8  9 10 11 12 13
@@ -3580,7 +3621,7 @@ $xlab
 $ylab
 NULL
 
-> ##> warning: 3 y values <= 0 omitted ..
+> ##> xlab: "Index"  \\  warning: 3 y values <= 0 omitted ..
 > 
 > 
 > 
@@ -3623,7 +3664,7 @@ $number
 > ## Discretized uncorrelated Gaussian:
 > ## Don't show: 
 > set.seed(1)
-> ## End Don't show
+> ## End(Don't show)
 > require(stats)
 > xy <- data.frame(x = round(sort(rnorm(100))), y = rnorm(100))
 > xyTable(xy, digits = 1)
@@ -3750,7 +3791,7 @@ $zlab
 > ###
 > options(digits = 7L)
 > base::cat("Time elapsed: ", proc.time() - base::get("ptime", pos = 'CheckExEnv'),"\n")
-Time elapsed:  8.097 0.155 8.277 0 0 
+Time elapsed:  7.762 0.119 7.9 0 0 
 > grDevices::dev.off()
 null device 
           1 
diff --git a/tests/Examples/graphics-Ex.Rout.save b/tests/Examples/graphics-Ex.Rout.save
index bfc5cf8..85f2150 100644
--- a/tests/Examples/graphics-Ex.Rout.save
+++ b/tests/Examples/graphics-Ex.Rout.save
@@ -1,7 +1,7 @@
 
-R version 3.1.2 RC (2014-10-29 r66897) -- "Pumpkin Helmet"
-Copyright (C) 2014 The R Foundation for Statistical Computing
-Platform: x86_64-unknown-linux-gnu (64-bit)
+R version 3.4.0 RC (2017-04-18 r72543) -- "You Stupid Darkness"
+Copyright (C) 2017 The R Foundation for Statistical Computing
+Platform: x86_64-pc-linux-gnu (64-bit)
 
 R is free software and comes with ABSOLUTELY NO WARRANTY.
 You are welcome to redistribute it under certain conditions.
@@ -392,14 +392,14 @@ Warning in bxp(list(stats = c(7, 11, 14, 18.5, 23, 7, 12, 16.5, 18, 21,  :
 > ## boxplot on a matrix:
 > mat <- cbind(Uni05 = (1:100)/21, Norm = rnorm(100),
 +              `5T` = rt(100, df = 5), Gam2 = rgamma(100, shape = 2))
-> boxplot(as.data.frame(mat),
-+         main = "boxplot(as.data.frame(mat), main = ...)")
+> boxplot(mat) # directly, calling boxplot.matrix()
+> 
+> ## boxplot on a data frame:
+> df. <- as.data.frame(mat)
 > par(las = 1) # all axis labels horizontal
-> boxplot(as.data.frame(mat), main = "boxplot(*, horizontal = TRUE)",
-+         horizontal = TRUE)
+> boxplot(df., main = "boxplot(*, horizontal = TRUE)", horizontal = TRUE)
 > 
 > ## Using 'at = ' and adding boxplots -- example idea by Roger Bivand :
-> 
 > boxplot(len ~ dose, data = ToothGrowth,
 +         boxwex = 0.25, at = 1:3 - 0.2,
 +         subset = supp == "VC", col = "yellow",
@@ -413,6 +413,13 @@ Warning in bxp(list(stats = c(7, 11, 14, 18.5, 23, 7, 12, 16.5, 18, 21,  :
 > legend(2, 9, c("Ascorbic acid", "Orange juice"),
 +        fill = c("yellow", "orange"))
 > 
+> ## With less effort (slightly different) using factor *interaction*:
+> boxplot(len ~ dose:supp, data = ToothGrowth,
++         boxwex = 0.5, col = c("orange", "yellow"),
++         main = "Guinea Pigs' Tooth Growth",
++         xlab = "Vitamin C dose mg", ylab = "tooth length",
++         sep = ":", lex.order = TRUE, ylim = c(0, 35), yaxs = "i")
+> 
 > ## more examples in  help(bxp)
 > 
 > 
@@ -936,7 +943,8 @@ Female Yes                89  17 202 131  94  24
 > 
 > hist(.leap.seconds, "years", freq = TRUE)
 > hist(.leap.seconds,
-+      seq(ISOdate(1970, 1, 1), ISOdate(2015, 1, 1), "5 years"))
++      seq(ISOdate(1970, 1, 1), ISOdate(2020, 1, 1), "5 years"))
+> rug(.leap.seconds, lwd=2)
 > 
 > ## 100 random dates in a 10-week period
 > random.dates <- as.Date("2001/1/1") + 70*stats::runif(100)
@@ -1012,7 +1020,7 @@ Warning in plot.histogram(r, freq = freq1, col = col, border = border, angle = a
 > x <- rchisq(100, df = 4)
 > ## Don't show: 
 > op <- par(mfrow = 2:1, mgp = c(1.5, 0.6, 0), mar = .1 + c(3,3:1))
-> ## End Don't show
+> ## End(Don't show)
 > ## Comparing data with a model distribution should be done with qqplot()!
 > qqplot(x, qchisq(ppoints(x), df = 4)); abline(0, 1, col = 2, lty = 2)
 > 
@@ -1021,7 +1029,7 @@ Warning in plot.histogram(r, freq = freq1, col = col, border = border, angle = a
 > curve(dchisq(x, df = 4), col = 2, lty = 2, lwd = 2, add = TRUE)
 > ## Don't show: 
 > par(op)
-> ## End Don't show
+> ## End(Don't show)
 > 
 > 
 > 
@@ -1753,6 +1761,11 @@ armed.forces
 > pie(rep(1, n), labels = "", col = rainbow(n), border = NA,
 +     main = "pie(*, labels=\"\", col=rainbow(n), border=NA,..")
 > 
+> ## Another case showing pie() is rather fun than science:
+> ## (original by FinalBackwardsGlance on http://imgur.com/gallery/wWrpU4X)
+> pie(c(Sky = 78, "Sunny side of pyramid" = 17, "Shady side of pyramid" = 5),
++     init.angle = 315, col = c("deepskyblue", "yellow", "yellow3"), border = FALSE)
+> 
 > 
 > 
 > cleanEx()
@@ -1768,7 +1781,7 @@ armed.forces
 > 
 > ### ** Examples
 > 
-> require(stats)
+> require(stats) # for lowess, rpois, rnorm
 > plot(cars)
 > lines(lowess(cars))
 > 
@@ -1845,7 +1858,7 @@ armed.forces
 > lx <- seq(1, 5, length = 41)
 > yl <- expression(e^{-frac(1,2) * {log[10](x)}^2})
 > y <- exp(-.5*lx^2)
-> op <- par(mfrow = c(2,1), mar = par("mar")+c(0,1,0,0))
+> op <- par(mfrow = c(2,1), mar = par("mar")-c(1,0,2,0), mgp = c(2, .7, 0))
 > plot(10^lx, y, log = "xy", type = "l", col = "purple",
 +      main = "Log-Log plot", ylab = yl, xlab = "x")
 > plot(10^lx, y, log = "xy", type = "o", pch = ".", col = "forestgreen",
@@ -1853,8 +1866,9 @@ armed.forces
 +      axes = FALSE, frame.plot = TRUE)
 > my.at <- 10^(1:5)
 > axis(1, at = my.at, labels = formatC(my.at, format = "fg"))
-> at.y <- 10^(-5:-1)
-> axis(2, at = at.y, labels = formatC(at.y, format = "fg"), col.axis = "red")
+> e.y <- -5:-1 ; at.y <- 10^e.y
+> axis(2, at = at.y, col.axis = "red", las = 1,
++      labels = as.expression(lapply(e.y, function(E) bquote(10^.(E)))))
 > par(op)
 > 
 > 
@@ -1959,6 +1973,41 @@ Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’
 > 
 > graphics::par(get("par.postscript", pos = 'CheckExEnv'))
 > cleanEx()
+> nameEx("plot.raster")
+> ### * plot.raster
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: plot.raster
+> ### Title: Plotting Raster Images
+> ### Aliases: plot.raster
+> ### Keywords: hplot
+> 
+> ### ** Examples
+> 
+> require(grDevices)
+> r <- as.raster(c(0.5, 1, 0.5))
+> plot(r)
+> # additional arguments to rasterImage()
+> plot(r, interpolate=FALSE)
+> # distort
+> plot(r, asp=NA)
+> # fill page
+> op <- par(mar=rep(0, 4))
+> plot(r, asp=NA)
+> par(op)
+> # normal annotations work
+> plot(r, asp=NA)
+> box()
+> title(main="This is my raster")
+> # add to existing plot
+> plot(1)
+> plot(r, add=TRUE)
+> 
+> 
+> 
+> graphics::par(get("par.postscript", pos = 'CheckExEnv'))
+> cleanEx()
 > nameEx("plot.table")
 > ### * plot.table
 > 
@@ -2026,7 +2075,7 @@ N
 > points.default # to see how it calls "plot.xy(xy.coords(x, y), ...)"
 function (x, y = NULL, type = "p", ...) 
 plot.xy(xy.coords(x, y), type = type, ...)
-<bytecode: 0x2ac1528>
+<bytecode: 0x23fc1e8>
 <environment: namespace:graphics>
 > 
 > 
@@ -2428,7 +2477,6 @@ Warning in matrix(0:1, ncol = 5, nrow = 3) :
 > ### ** Examples
 > 
 > 
-> graphics::par(get("par.postscript", pos = 'CheckExEnv'))
 > cleanEx()
 > nameEx("spineplot")
 > ### * spineplot
@@ -2762,7 +2810,7 @@ $`11.33`
 > 
 > ### ** Examples
 > 
-> require(stats)
+> require(stats) # for rnorm
 > require(grDevices)
 > 
 > ## 'number' is computed automatically:
@@ -2897,7 +2945,7 @@ function (xy = 1, warn.log = TRUE)
     u <- par("usr")
     xy * c(u[2L] - u[1L], u[4L] - u[3L])/par("pin")
 }
-<bytecode: 0x36ce590>
+<bytecode: 0x286c148>
 <environment: namespace:graphics>
 > 
 > ## plot labels offset 0.12 inches to the right
@@ -2977,7 +3025,7 @@ function (xy = 1, warn.log = TRUE)
 > ###
 > options(digits = 7L)
 > base::cat("Time elapsed: ", proc.time() - base::get("ptime", pos = 'CheckExEnv'),"\n")
-Time elapsed:  1.975 0.04 2.02 0 0 
+Time elapsed:  1.972 0.03 2.007 0 0 
 > grDevices::dev.off()
 null device 
           1 
diff --git a/tests/Examples/grid-Ex.Rout.save b/tests/Examples/grid-Ex.Rout.save
index 9708e8a..66bf292 100644
--- a/tests/Examples/grid-Ex.Rout.save
+++ b/tests/Examples/grid-Ex.Rout.save
@@ -1,7 +1,7 @@
 
-R version 3.1.2 RC (2014-10-29 r66897) -- "Pumpkin Helmet"
-Copyright (C) 2014 The R Foundation for Statistical Computing
-Platform: x86_64-unknown-linux-gnu (64-bit)
+R version 3.4.0 RC (2017-04-18 r72543) -- "You Stupid Darkness"
+Copyright (C) 2017 The R Foundation for Statistical Computing
+Platform: x86_64-pc-linux-gnu (64-bit)
 
 R is free software and comes with ABSOLUTELY NO WARRANTY.
 You are welcome to redistribute it under certain conditions.
@@ -1720,6 +1720,11 @@ List of 6
 > 
 > showViewport(viewport(width=.5, height=.5, name="vp"))
 > 
+> grid.newpage()
+> pushViewport(viewport(width=.5, height=.5, name="vp"))
+> upViewport()
+> showViewport(vpPath("vp"))
+> 
 > showViewport(vpStack(viewport(width=.5, height=.5, name="vp1"),
 +                      viewport(width=.5, height=.5, name="vp2")),
 +              newpage=TRUE)
@@ -1756,6 +1761,12 @@ List of 6
 +        unit(1, "strwidth", "hi there"))
 [1] 0.5npc          2inches+0.25npc 2inches+0.5npc  2inches+0.75npc
 [5] 1strwidth      
+> x <- unit(1:5, "npc")
+> x[2:4]
+[1] 2npc 3npc 4npc
+> x[2:4] <- unit(1, "mm")
+> x
+[1] 1npc 1mm  1mm  1mm  5npc
 > 
 > 
 > 
@@ -2058,7 +2069,7 @@ vp1::vp2
 > ###
 > options(digits = 7L)
 > base::cat("Time elapsed: ", proc.time() - base::get("ptime", pos = 'CheckExEnv'),"\n")
-Time elapsed:  1.28 0.01 1.294 0 0 
+Time elapsed:  1.189 0.008 1.2 0 0 
 > grDevices::dev.off()
 null device 
           1 
diff --git a/tests/Examples/splines-Ex.Rout.save b/tests/Examples/splines-Ex.Rout.save
index 7135fe9..3137a7d 100644
--- a/tests/Examples/splines-Ex.Rout.save
+++ b/tests/Examples/splines-Ex.Rout.save
@@ -1,7 +1,7 @@
 
-R version 3.1.2 RC (2014-10-29 r66897) -- "Pumpkin Helmet"
-Copyright (C) 2014 The R Foundation for Statistical Computing
-Platform: x86_64-unknown-linux-gnu (64-bit)
+R version 3.4.0 RC (2017-04-18 r72543) -- "You Stupid Darkness"
+Copyright (C) 2017 The R Foundation for Statistical Computing
+Platform: x86_64-pc-linux-gnu (64-bit)
 
 R is free software and comes with ABSOLUTELY NO WARRANTY.
 You are welcome to redistribute it under certain conditions.
@@ -158,7 +158,7 @@ Warning in bs(height, degree = 3L, knots = c(62.6666666666667, 67.3333333333333
 +           identical(bs(x, df = 4), bs(x, df = 4, knots = NULL)), # not true till 2.15.2
 +           !is.null(kk <- attr(bs(x), "knots")), # not true till 1.5.1
 +           length(kk) == 0)
-> ## End Don't show
+> ## End(Don't show)
 > 
 > 
 > cleanEx()
@@ -270,7 +270,7 @@ list(weight, ns(height, knots = c(60.8, 63.6, 66.4, 69.2), Boundary.knots = c(58
 +           identical(ns(x, df = 2), ns(x, df = 2, knots = NULL)), # not true till 2.15.2
 +           !is.null(kk <- attr(ns(x), "knots")), # not true till 1.5.1
 +           length(kk) == 0)
-> ## End Don't show
+> ## End(Don't show)
 > 
 > 
 > 
@@ -478,6 +478,12 @@ attr(,"class")
 [2,] 0.0000000 0.1666667 0.6666667 0.1666667 0.0000000 0.0000000
 [3,] 0.0000000 0.0000000 0.1666667 0.6666667 0.1666667 0.0000000
 [4,] 0.0000000 0.0000000 0.0000000 0.1666667 0.6666667 0.1666667
+> splineDesign(knots = 1:10, x = 4:7, deriv = 1)
+     [,1] [,2] [,3] [,4] [,5] [,6]
+[1,] -0.5  0.0  0.5  0.0  0.0  0.0
+[2,]  0.0 -0.5  0.0  0.5  0.0  0.0
+[3,]  0.0  0.0 -0.5  0.0  0.5  0.0
+[4,]  0.0  0.0  0.0 -0.5  0.0  0.5
 > ## visualize band structure
 > 
 > knots <- c(1,1.8,3:5,6.5,7,8.1,9.2,10)  # 10 => 10-4 = 6 Basis splines
@@ -576,7 +582,7 @@ attr(,"class")
 > ###
 > options(digits = 7L)
 > base::cat("Time elapsed: ", proc.time() - base::get("ptime", pos = 'CheckExEnv'),"\n")
-Time elapsed:  0.116 0.002 0.119 0 0 
+Time elapsed:  0.154 0.006 0.161 0 0 
 > grDevices::dev.off()
 null device 
           1 
diff --git a/tests/Examples/stats-Ex.Rout.save b/tests/Examples/stats-Ex.Rout.save
index cbd4adb..6859008 100644
--- a/tests/Examples/stats-Ex.Rout.save
+++ b/tests/Examples/stats-Ex.Rout.save
@@ -1,7 +1,7 @@
 
-R version 3.1.2 RC (2014-10-29 r66897) -- "Pumpkin Helmet"
-Copyright (C) 2014 The R Foundation for Statistical Computing
-Platform: x86_64-unknown-linux-gnu (64-bit)
+R version 3.4.0 RC (2017-04-18 r72543) -- "You Stupid Darkness"
+Copyright (C) 2017 The R Foundation for Statistical Computing
+Platform: x86_64-pc-linux-gnu (64-bit)
 
 R is free software and comes with ABSOLUTELY NO WARRANTY.
 You are welcome to redistribute it under certain conditions.
@@ -76,10 +76,16 @@ lm2  6 336.3417
 0.085937500 0.048828125 0.027343750 0.015136719 0.008300781 
 > 
 > ## Example from Brockwell & Davis (1991, pp.92-4)
-> ## answer 2^(-n) * (32/3 + 8 * n) /(32/3)
-> n <- 1:10; 2^(-n) * (32/3 + 8 * n) /(32/3)
- [1] 0.875000000 0.625000000 0.406250000 0.250000000 0.148437500 0.085937500
- [7] 0.048828125 0.027343750 0.015136719 0.008300781
+> ## answer: 2^(-n) * (32/3 + 8 * n) /(32/3)
+> n <- 1:10
+> a.n <- 2^(-n) * (32/3 + 8 * n) /(32/3)
+> (A.n <- ARMAacf(c(1.0, -0.25), 1.0, lag.max = 10))
+          0           1           2           3           4           5 
+1.000000000 0.875000000 0.625000000 0.406250000 0.250000000 0.148437500 
+          6           7           8           9          10 
+0.085937500 0.048828125 0.027343750 0.015136719 0.008300781 
+> stopifnot(all.equal(unname(A.n), c(1, a.n)))
+> 
 > ARMAacf(c(1.0, -0.25), 1.0, lag.max = 10, pacf = TRUE)
  [1]  0.8750000 -0.6000000  0.3750000 -0.2727273  0.2142857 -0.1764706
  [7]  0.1500000 -0.1304348  0.1153846 -0.1034483
@@ -285,7 +291,6 @@ lm2  6 336.3417
 > 
 > 
 > 
-> graphics::par(get("par.postscript", pos = 'CheckExEnv'))
 > cleanEx()
 > nameEx("Exponential")
 > ### * Exponential
@@ -402,7 +407,7 @@ lm2  6 336.3417
 > 
 > ## Don't show: 
 > od <- options(digits = 5)
-> ## End Don't show
+> ## End(Don't show)
 > require(graphics)
 > 
 > ## Seasonal Holt-Winters
@@ -475,7 +480,7 @@ s12   0.92099
 > lines(fitted(m2)[,1], col = 3)
 > ## Don't show: 
 > options(od)
-> ## End Don't show
+> ## End(Don't show)
 > 
 > 
 > 
@@ -876,6 +881,11 @@ c    3    2    1    0    2    1    0    1    0     0
 > plot(x, pbinom(x, 100, 0.01), type = "s", ylab = "F(x)",
 +      main = "Binomial(100, 0.01) CDF")
 > 
+> ## The (limit) case  lambda = 0 :
+> stopifnot(identical(dpois(0,0), 1),
++ 	  identical(ppois(0,0), 1),
++ 	  identical(qpois(1,0), 0))
+> 
 > 
 > 
 > graphics::par(get("par.postscript", pos = 'CheckExEnv'))
@@ -958,7 +968,7 @@ cond     deg0NA deg4NA deg8NA deg0NP deg4NP deg8NP
 > 
 > ## Don't show: 
 > options(show.nls.convergence=FALSE)
-> ## End Don't show
+> ## End(Don't show)
 > Lob.329 <- Loblolly[ Loblolly$Seed == "329", ]
 > SSasymp( Lob.329$age, 100, -8.5, -3.2 )  # response only
 [1]  3.988924 11.505611 27.822517 41.130854 51.985354 60.838463
@@ -1027,7 +1037,7 @@ Residual standard error: 0.7493 on 3 degrees of freedom
 >   arrows(0.2, 3.5, 0, 3.5, length = 0.08, angle = 25)
 >   arrows(0.8, 3.5, 1, 3.5, length = 0.08, angle = 25)
 >   text(0.5, 3.5, expression(t[0.5]), adj = c(0.5, 0.5))
-> ## End Don't show
+> ## End(Don't show)
 > 
 > 
 > 
@@ -1110,7 +1120,7 @@ Residual standard error: 1.663 on 4 degrees of freedom
 >   arrows(0.7, 2.65, 0.5, 2.65, length = 0.08, angle = 25)
 >   arrows(1.3, 2.65, 1.5, 2.65, length = 0.08, angle = 25)
 >   text(1.0, 2.65, expression(t[0.5]), adj = c(0.5, 0.5))
-> ## End Don't show
+> ## End(Don't show)
 > 
 > 
 > 
@@ -1149,7 +1159,7 @@ Residual standard error: 1.663 on 4 degrees of freedom
 >   arrows(0.2, 3.0, 0, 3.0, length = 0.08, angle = 25)
 >   arrows(0.8, 3.0, 1, 3.0, length = 0.08, angle = 25)
 >   text(0.5, 3.0, expression(t[0.5]), adj = c(0.5, 0.5))
-> ## End Don't show
+> ## End(Don't show)
 > 
 > 
 > 
@@ -1378,7 +1388,7 @@ Residual standard error: 2.351 on 8 degrees of freedom
 >   arrows(2.3, 2.7, 2.0, 2.7, length = 0.08, angle = 25)
 >   arrows(2.7, 2.7, 3.0, 2.7, length = 0.08, angle = 25)
 >   text(2.5, 2.7, expression(phi[4]), adj = c(0.5, 0.5))
-> ## End Don't show
+> ## End(Don't show)
 > 
 > 
 > 
@@ -1484,7 +1494,7 @@ Residual standard error: 0.02684 on 13 degrees of freedom
 >   arrows(2.3, 3.8, 2.0, 3.8, length = 0.08, angle = 25)
 >   arrows(2.7, 3.8, 3.0, 3.8, length = 0.08, angle = 25)
 >   text(2.5, 3.8, expression(phi[3]), adj = c(0.5, 0.5))
-> ## End Don't show
+> ## End(Don't show)
 > 
 > 
 > graphics::par(get("par.postscript", pos = 'CheckExEnv'))
@@ -1577,7 +1587,7 @@ Residual standard error: 10.93 on 10 degrees of freedom
 >   text(-0.8, 2.5, expression(phi[1]), adj = c(0.5, 0.5))
 >   segments(1, 0, 1, 2.7, lty = 2, lwd = 0.75)
 >   text(1, 2.7, expression(phi[2]), adj = c(0.5, 0))
-> ## End Don't show
+> ## End(Don't show)
 > 
 > 
 > 
@@ -1665,7 +1675,7 @@ Residual standard error: 2.061 on 7 degrees of freedom
 +        27, 29, 31, 33, 35, 36, 38, 39, 39, 40)
 > stopifnot(round(dsignrank(0:56, n = 10)* 2^10) == c(p, rev(p), 0),
 +           qsignrank((1:16)/ 16, n = 4) == c(0:2, rep(3:7, each = 2), 8:10))
-> ## End Don't show
+> ## End(Don't show)
 > 
 > 
 > 
@@ -2031,7 +2041,7 @@ ar(3) 0.6000000 0.3000 -0.2
 > 
 > ## Don't show: 
 > od <- options(digits = 5)
-> ## End Don't show
+> ## End(Don't show)
 > require(graphics); require(utils)
 > ## following example(swiss)
 > lm1 <- lm(Fertility ~ ., data = swiss)
@@ -2083,7 +2093,7 @@ Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’
 7         3       1     25
 8         3       2     13
 9         3       3     12
-> ## End Don't show
+> ## End(Don't show)
 > drop1(glm.D93, test = "Chisq")
 Single term deletions
 
@@ -2116,7 +2126,7 @@ counts ~ outcome + treatment
 outcome:treatment  4     0.00 59.6      5.17     0.27
 > ## Don't show: 
 > options(od)
-> ## End Don't show
+> ## End(Don't show)
 > 
 > 
 > 
@@ -2217,7 +2227,7 @@ Aye   Buzz Hum Sum
 
 > ## Don't show: 
 > stopifnot(is.table(addmargins(A)))
-> ## End Don't show
+> ## End(Don't show)
 > ftable(A)
          Sea Black Dead Red White
 Aye Bee                          
@@ -2522,7 +2532,6 @@ Frequency = 1
 > ### ** Examples
 > 
 > 
-> base::options(contrasts = c(unordered = "contr.treatment",ordered = "contr.poly"))
 > cleanEx()
 > nameEx("anova.glm")
 > ### * anova.glm
@@ -2550,7 +2559,7 @@ Frequency = 1
 7         3       1     25
 8         3       2     13
 9         3       3     12
-> ## End Don't show
+> ## End(Don't show)
 > anova(glm.D93)
 Analysis of Deviance Table
 
@@ -3542,6 +3551,8 @@ Coefficients:
 s.e.  0.0555     4.6434
 
 sigma^2 estimated as 85.47:  log likelihood = -416.89,  aic = 839.78
+> nobs(fit1)
+[1] 114
 > tsdiag(fit1)
 > (fit3 <- arima(presidents, c(3, 0, 0)))  # smaller AIC
 
@@ -3555,6 +3566,20 @@ s.e.  0.0936  0.1140   0.0946     4.2845
 
 sigma^2 estimated as 81.12:  log likelihood = -414.08,  aic = 838.16
 > tsdiag(fit3)
+> BIC(fit1, fit3)
+     df      BIC
+fit1  3 847.9931
+fit3  5 851.8449
+> ## compare a whole set of models; BIC() would choose the smallest
+> AIC(fit1, arima(presidents, c(2,0,0)),
++           arima(presidents, c(2,0,1)), # <- chosen (barely) by AIC
++     fit3, arima(presidents, c(3,0,1)))
+                              df      AIC
+fit1                           3 839.7845
+arima(presidents, c(2, 0, 0))  4 840.0458
+arima(presidents, c(2, 0, 1))  5 838.1272
+fit3                           5 838.1639
+arima(presidents, c(3, 0, 1))  6 838.8124
 > 
 > ## An example of ARIMA forecasting:
 > predict(fit3, 3)
@@ -3757,7 +3782,6 @@ sigma^2 estimated as 0.4566:  log likelihood = -101.2,  aic = 212.4
 > 
 > 
 > 
-> graphics::par(get("par.postscript", pos = 'CheckExEnv'))
 > cleanEx()
 > nameEx("asOneSidedFormula")
 > ### * asOneSidedFormula
@@ -3773,7 +3797,7 @@ sigma^2 estimated as 0.4566:  log likelihood = -101.2,  aic = 212.4
 > 
 > asOneSidedFormula("age")
 ~age
-<environment: 0x2a66148>
+<environment: 0x2bac7c8>
 > asOneSidedFormula(~ age)
 ~age
 > 
@@ -3881,14 +3905,14 @@ Warning in bw.bcv(x) : minimum occurred at one end of the range
 	Bartlett test of homogeneity of variances
 
 data:  InsectSprays$count and InsectSprays$spray
-Bartlett's K-squared = 25.9598, df = 5, p-value = 9.085e-05
+Bartlett's K-squared = 25.96, df = 5, p-value = 9.085e-05
 
 > bartlett.test(count ~ spray, data = InsectSprays)
 
 	Bartlett test of homogeneity of variances
 
 data:  count by spray
-Bartlett's K-squared = 25.9598, df = 5, p-value = 9.085e-05
+Bartlett's K-squared = 25.96, df = 5, p-value = 9.085e-05
 
 > 
 > 
@@ -4030,14 +4054,14 @@ probability of success
 	Box-Pierce test
 
 data:  x
-X-squared = 0.0013, df = 1, p-value = 0.9709
+X-squared = 0.0013332, df = 1, p-value = 0.9709
 
 > Box.test (x, lag = 1, type = "Ljung")
 
 	Box-Ljung test
 
 data:  x
-X-squared = 0.0014, df = 1, p-value = 0.9704
+X-squared = 0.0013736, df = 1, p-value = 0.9704
 
 > 
 > 
@@ -4133,35 +4157,35 @@ I(x^3) -0.73        0.93 -0.99
 > 
 > ## From Agresti(2007) p.39
 > M <- as.table(rbind(c(762, 327, 468), c(484, 239, 477)))
-> dimnames(M) <- list(gender = c("M","F"),
+> dimnames(M) <- list(gender = c("F", "M"),
 +                     party = c("Democrat","Independent", "Republican"))
 > (Xsq <- chisq.test(M))  # Prints test summary
 
 	Pearson's Chi-squared test
 
 data:  M
-X-squared = 30.0701, df = 2, p-value = 2.954e-07
+X-squared = 30.07, df = 2, p-value = 2.954e-07
 
 > Xsq$observed   # observed counts (same as M)
       party
 gender Democrat Independent Republican
-     M      762         327        468
-     F      484         239        477
+     F      762         327        468
+     M      484         239        477
 > Xsq$expected   # expected counts under the null
       party
 gender Democrat Independent Republican
-     M 703.6714    319.6453   533.6834
-     F 542.3286    246.3547   411.3166
+     F 703.6714    319.6453   533.6834
+     M 542.3286    246.3547   411.3166
 > Xsq$residuals  # Pearson residuals
       party
 gender   Democrat Independent Republican
-     M  2.1988558   0.4113702 -2.8432397
-     F -2.5046695  -0.4685829  3.2386734
+     F  2.1988558   0.4113702 -2.8432397
+     M -2.5046695  -0.4685829  3.2386734
 > Xsq$stdres     # standardized residuals
       party
 gender   Democrat Independent Republican
-     M  4.5020535   0.6994517 -5.3159455
-     F -4.5020535  -0.6994517  5.3159455
+     F  4.5020535   0.6994517 -5.3159455
+     M -4.5020535  -0.6994517  5.3159455
 > 
 > 
 > ## Effect of simulating p-values
@@ -4462,7 +4486,7 @@ factor> of <- ordered(ff)
 factor> stopifnot(identical(range(of, rev(of)), of[3:2]),
 factor+ 	  identical(max(of), of[2]))
 
-factor> ## End Don't show
+factor> ## End(Don't show)
 factor> 
 factor> ## suppose you want "NA" as a level, and to allow missing values.
 factor> (x <- factor(c(1, 2, NA), exclude = NULL))
@@ -4480,6 +4504,28 @@ factor> is.na(x)
 
 factor> # [1] FALSE  TRUE FALSE
 factor> 
+factor> ## More rational, since R 3.4.0 :
+factor> factor(c(1:2, NA), exclude =  "" ) # keeps <NA> , as
+[1] 1    2    <NA>
+Levels: 1 2 <NA>
+
+factor> factor(c(1:2, NA), exclude = NULL) # always did
+[1] 1    2    <NA>
+Levels: 1 2 <NA>
+
+factor> ## exclude = <character>
+factor> z # ordered levels 'A < B < C'
+[1] C B A
+Levels: A < B < C
+
+factor> factor(z, exclude = "C") # does exclude
+[1] <NA> B    A   
+Levels: A < B
+
+factor> factor(z, exclude = "B") # ditto
+[1] C    <NA> A   
+Levels: A < C
+
 factor> ## Using addNA()
 factor> Month <- airquality$Month
 
@@ -4736,7 +4782,7 @@ function (V)
     r[cbind(1L:p, 1L:p)] <- 1
     r
 }
-<bytecode: 0x4cb6bd8>
+<bytecode: 0x51eee20>
 <environment: namespace:stats>
 > stopifnot(all.equal(Cl, cov2cor(cov(longley))),
 +           all.equal(cor(longley, method = "kendall"),
@@ -4806,16 +4852,16 @@ attr(,"legend")
 > ## "pairwise" is closer componentwise,
 > summary(abs(c(1 - Rp/R.)))
    Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
-0.00000 0.00000 0.04481 0.09573 0.15210 0.53940 
+0.00000 0.00000 0.04481 0.09573 0.15214 0.53941 
 > summary(abs(c(1 - Rc/R.)))
    Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
-0.00000 0.02020 0.08482 0.50670 0.16190 7.08500 
+0.00000 0.02021 0.08482 0.50675 0.16192 7.08509 
 > 
 > ## but "complete" is closer in Eigen space:
 > EV <- function(m) eigen(m, only.values=TRUE)$values
 > summary(abs(1 - EV(Rp)/EV(R.)) / abs(1 - EV(Rc)/EV(R.)))
    Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
- 0.8942  1.1460  1.2450  1.3730  1.3720  2.3270 
+ 0.8942  1.1464  1.2452  1.3732  1.3722  2.3265 
 > 
 > 
 > 
@@ -6096,6 +6142,12 @@ attr(,"gradient")
 [6,]  1 0.3535534 0.2756976
 [7,]  1 0.2973018 0.2704720
 > 
+> ## First derivative
+> 
+> D(expression(x^2), "x")
+2 * x
+> stopifnot(D(as.name("x"), "x") == 1)
+> 
 > ## Higher derivatives
 > deriv3(y ~ b0 + b1 * 2^(-x/th), c("b0", "b1", "th"),
 +      c("b0", "b1", "th", "x") )
@@ -6138,6 +6190,32 @@ function (b0, b1, th, x)
 > ##D     2) * (2 * x) + sin(x^2) * (2 * x) * 2)
 > ## End(Not run)
 > 
+> ## New (R 3.4.0, 2017):
+> D(quote(log1p(x^2)), "x") ## log1p(x) = log(1 + x)
+2 * x/(1 + x^2)
+> stopifnot(identical(
++        D(quote(log1p(x^2)), "x"),
++        D(quote(log(1+x^2)), "x")))
+> D(quote(expm1(x^2)), "x") ## expm1(x) = exp(x) - 1
+exp(x^2) * (2 * x)
+> stopifnot(identical(
++        D(quote(expm1(x^2)), "x") -> Dex1,
++        D(quote(exp(x^2)-1), "x")),
++        identical(Dex1, quote(exp(x^2) * (2 * x))))
+> 
+> D(quote(sinpi(x^2)), "x") ## sinpi(x) = sin(pi*x)
+cospi(x^2) * (pi * (2 * x))
+> D(quote(cospi(x^2)), "x") ## cospi(x) = cos(pi*x)
+-(sinpi(x^2) * (pi * (2 * x)))
+> D(quote(tanpi(x^2)), "x") ## tanpi(x) = tan(pi*x)
+pi * (2 * x)/cospi(x^2)^2
+> 
+> stopifnot(identical(D(quote(log2 (x^2)), "x"),
++                     quote(2 * x/(x^2 * log(2)))),
++           identical(D(quote(log10(x^2)), "x"),
++                     quote(2 * x/(x^2 * log(10)))))
+> 
+> 
 > 
 > 
 > cleanEx()
@@ -6403,7 +6481,7 @@ Call: ecdf(x)
 > summary(Fn)
 Empirical CDF:	  12 unique values with summary
    Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
--0.8356 -0.3857  0.3597  0.2686  0.6164  1.5950 
+-0.8356 -0.3857  0.3597  0.2686  0.6164  1.5953 
 > ##--> see below for graphics
 > knots(Fn)  # the unique data values {12 of them if there were no ties}
  [1] -0.8356286 -0.8204684 -0.6264538 -0.3053884  0.1836433  0.3295078
@@ -6431,7 +6509,7 @@ and	9 plateau levels (y) with summary
  0.0000  0.1667  0.5000  0.4630  0.6667  1.0000 
 > 
 > ## Advanced: What's inside the function closure?
-> print(ls.Fn12 <- ls(environment(Fn12)))
+> ls(environment(Fn12))
 [1] "f"      "method" "nobs"   "x"      "y"      "yleft"  "yright"
 > ##[1] "f"  "method"  "n"  "x"  "y"  "yleft"  "yright"
 > utils::ls.str(environment(Fn12))
@@ -6453,7 +6531,7 @@ yright :  num 1
 > summary(F10)
 Empirical CDF:	  10 unique values with summary
     Min.  1st Qu.   Median     Mean  3rd Qu.     Max. 
--1.47100 -0.14250 -0.05497  0.04667  0.41040  1.35900 
+-1.47075 -0.14254 -0.05497  0.04667  0.41037  1.35868 
 > 
 > plot(F10)
 > plot(F10, verticals = TRUE, do.points = FALSE)
@@ -6818,7 +6896,7 @@ List of 11
  $ dev.resids:function (y, mu, wt)  
  $ aic       :function (y, n, mu, wt, dev)  
  $ mu.eta    :function (eta)  
- $ initialize:  expression({     n <- rep.int(1, nobs)     if (is.null(etastart) && is.null(start) && is.null(mustart) && ((family$link ==          "inverse" && any(y == 0)) || (family$link == "log" && any(y <=          0))))          stop("cannot find valid starting values: please specify some")     mustart <- y })
+ $ initialize:  expression({  n <- rep.int(1, nobs)  if (is.null(etastart) && is.null(start) && is.null(mustart) && ((family$link| __truncated__
  $ validmu   :function (mu)  
  $ valideta  :function (eta)  
  - attr(*, "class")= chr "family"
@@ -6839,7 +6917,7 @@ List of 12
  $ dev.resids:function (y, mu, wt)  
  $ aic       :function (y, n, mu, wt, dev)  
  $ mu.eta    :function (eta)  
- $ initialize:  expression({     if (any(y <= 0))          stop("non-positive values not allowed for the 'gamma' family")     n <- rep.int(1, nobs)     mustart <- y })
+ $ initialize:  expression({  if (any(y <= 0))  stop("non-positive values not allowed for the 'gamma' family")  n <- rep.int(1, n| __truncated__
  $ validmu   :function (mu)  
  $ valideta  :function (eta)  
  $ simulate  :function (object, nsim)  
@@ -6946,7 +7024,7 @@ Residual Deviance: 135.8 	AIC: NA
 > flush(stderr()); flush(stdout())
 > 
 > ### Name: fft
-> ### Title: Fast Discrete Fourier Transform
+> ### Title: Fast Discrete Fourier Transform (FFT)
 > ### Aliases: fft mvfft
 > ### Keywords: math dplot
 > 
@@ -6958,6 +7036,18 @@ Residual Deviance: 135.8 	AIC: NA
 > fft(fft(x), inverse = TRUE)/length(x)
 [1] 1+0i 2+0i 3+0i 4+0i
 > 
+> ## Slow Discrete Fourier Transform (DFT) - e.g., for checking the formula
+> fft0 <- function(z, inverse=FALSE) {
++   n <- length(z)
++   if(n == 0) return(z)
++   k <- 0:(n-1)
++   ff <- (if(inverse) 1 else -1) * 2*pi * 1i * k/n
++   vapply(1:n, function(h) sum(z * exp(ff*(h-1))), complex(1))
++ }
+> 
+> relD <- function(x,y) 2* abs(x - y) / abs(x + y)
+> n <- 2^8
+> z <- complex(n, rnorm(n), rnorm(n))
 > 
 > 
 > cleanEx()
@@ -7190,14 +7280,14 @@ alternative hypothesis: two.sided
 	Fligner-Killeen test of homogeneity of variances
 
 data:  InsectSprays$count and InsectSprays$spray
-Fligner-Killeen:med chi-squared = 14.4828, df = 5, p-value = 0.01282
+Fligner-Killeen:med chi-squared = 14.483, df = 5, p-value = 0.01282
 
 > fligner.test(count ~ spray, data = InsectSprays)
 
 	Fligner-Killeen test of homogeneity of variances
 
 data:  count by spray
-Fligner-Killeen:med chi-squared = 14.4828, df = 5, p-value = 0.01282
+Fligner-Killeen:med chi-squared = 14.483, df = 5, p-value = 0.01282
 
 > ## Compare this to bartlett.test()
 > 
@@ -7248,7 +7338,7 @@ attr(,".Environment")
 > environment(as.formula("y ~ x"))
 <environment: R_GlobalEnv>
 > environment(as.formula("y ~ x", env = new.env()))
-<environment: 0x490d0a8>
+<environment: 0x4ddebe8>
 > 
 > 
 > ## Create a formula for a model with a large number of variables:
@@ -7331,7 +7421,7 @@ circumference ~ A/(1 + exp((B - age)/C))
 	Friedman rank sum test
 
 data:  RoundingTimes
-Friedman chi-squared = 11.1429, df = 2, p-value = 0.003805
+Friedman chi-squared = 11.143, df = 2, p-value = 0.003805
 
 > ## => strong evidence against the null that the methods are equivalent
 > ##    with respect to speed
@@ -7353,14 +7443,14 @@ Friedman chi-squared = 11.1429, df = 2, p-value = 0.003805
 	Friedman rank sum test
 
 data:  wb$x, wb$w and wb$t
-Friedman chi-squared = 0.3333, df = 1, p-value = 0.5637
+Friedman chi-squared = 0.33333, df = 1, p-value = 0.5637
 
 > friedman.test(x ~ w | t, data = wb)
 
 	Friedman rank sum test
 
 data:  x and w and t
-Friedman chi-squared = 0.3333, df = 1, p-value = 0.5637
+Friedman chi-squared = 0.33333, df = 1, p-value = 0.5637
 
 > 
 > 
@@ -7474,7 +7564,7 @@ Crew   885
 +   dim(f10) == c(1,4),
 +   dim(f01) == c(4,1),
 +   dim(f00) == c(1,1))
-> ## End Don't show
+> ## End(Don't show)
 > ## Start with a data frame.
 > x <- ftable(mtcars[c("cyl", "vs", "am", "gear")])
 > x
@@ -7778,6 +7868,22 @@ Number of Fisher Scoring iterations: 3
 > plot(hc1, labels = FALSE, hang = -1, main = "Re-start from 10 clusters")
 > par(opar)
 > 
+> ### Example 2: Straight-line distances among 10 US cities
+> ##  Compare the results of algorithms "ward.D" and "ward.D2"
+> 
+> data(UScitiesD)
+> 
+> mds2 <- -cmdscale(UScitiesD)
+> plot(mds2, type="n", axes=FALSE, ann=FALSE)
+> text(mds2, labels=rownames(mds2), xpd = NA)
+> 
+> hcity.D  <- hclust(UScitiesD, "ward.D") # "wrong"
+> hcity.D2 <- hclust(UScitiesD, "ward.D2")
+> opar <- par(mfrow = c(1, 2))
+> plot(hcity.D,  hang=-1)
+> plot(hcity.D2, hang=-1)
+> par(opar)
+> 
 > 
 > 
 > graphics::par(get("par.postscript", pos = 'CheckExEnv'))
@@ -7819,7 +7925,7 @@ List of 4
 > heatmap(x, Rowv = NA, col = cm.colors(256), scale = "column",
 +         ColSideColors = cc, margins = c(5,10),
 +         xlab = "xlab", ylab =  "ylab")  # no main
-> ## End Don't show
+> ## End(Don't show)
 > ## "no nothing"
 > heatmap(x, Rowv = NA, Colv = NA, scale = "column",
 +         main = "heatmap(*, NA, NA) ~= image(t(x))")
@@ -7966,6 +8072,128 @@ FAMI   -3   87   84   84   96   94   94   94   98   99   99  100
 > 
 > ### ** Examples
 > 
+> require(graphics)
+> 
+> ## Analysis of the life-cycle savings data
+> ## given in Belsley, Kuh and Welsch.
+> lm.SR <- lm(sr ~ pop15 + pop75 + dpi + ddpi, data = LifeCycleSavings)
+> 
+> inflm.SR <- influence.measures(lm.SR)
+> which(apply(inflm.SR$is.inf, 1, any))
+        Chile United States        Zambia         Libya 
+            7            44            46            49 
+> # which observations 'are' influential
+> summary(inflm.SR) # only these
+Potentially influential observations of
+	 lm(formula = sr ~ pop15 + pop75 + dpi + ddpi, data = LifeCycleSavings) :
+
+              dfb.1_ dfb.pp15 dfb.pp75 dfb.dpi dfb.ddpi dffit   cov.r   cook.d
+Chile         -0.20   0.13     0.22    -0.02    0.12    -0.46    0.65_*  0.04 
+United States  0.07  -0.07     0.04    -0.23   -0.03    -0.25    1.66_*  0.01 
+Zambia         0.16  -0.08    -0.34     0.09    0.23     0.75    0.51_*  0.10 
+Libya          0.55  -0.48    -0.38    -0.02   -1.02_*  -1.16_*  2.09_*  0.27 
+              hat    
+Chile          0.04  
+United States  0.33_*
+Zambia         0.06  
+Libya          0.53_*
+> plot(rstudent(lm.SR) ~ hatvalues(lm.SR)) # recommended by some
+> plot(lm.SR, which = 5) # an enhanced version of that via plot(<lm>)
+> 
+> ## The 'infl' argument is not needed, but avoids recomputation:
+> rs <- rstandard(lm.SR)
+> iflSR <- influence(lm.SR)
+> identical(rs, rstandard(lm.SR, infl = iflSR))
+[1] TRUE
+> ## to "see" the larger values:
+> 1000 * round(dfbetas(lm.SR, infl = iflSR), 3)
+               (Intercept) pop15 pop75  dpi  ddpi
+Australia               12   -10   -27   45     0
+Austria                -10     6    41  -37    -8
+Belgium                -64    51   121  -35    -7
+Bolivia                  6   -13   -23   32    41
+Brazil                  90   -62  -179  120    68
+Canada                   5    -7    10  -35    -3
+Chile                 -199   133   220  -20   120
+China                   21    -6   -83   52   111
+Colombia                39   -52   -25    2     9
+Costa Rica            -234   284   142   56   -33
+Denmark                -41    21    47  152    49
+Ecuador                 72   -95   -61   20    48
+Finland               -113   111   117  -44   -17
+France                -166   147   219  -29    24
+Germany                 -8     8     8   -7     0
+Greece                -148   164    29  157   -60
+Guatamala               16   -55     6    6    97
+Honduras                -2    10   -10    8    -2
+Iceland                248  -274  -233 -126   185
+India                   21   -16   -14  -14   -19
+Ireland               -310   296   482 -257   -93
+Italy                   66   -71     3  -70   -29
+Japan                  640  -656  -674  146   389
+Korea                 -169   135   219    5  -169
+Luxembourg             -68    69    44  -28    49
+Malta                   37   -49     8  -87   153
+Norway                   2     0    -6  -16    -1
+Netherlands             14   -17   -12    4    23
+New Zealand            -60    65    94  -26   -65
+Nicaragua              -12    18    10   -5   -10
+Panama                  28   -53    14  -35    -8
+Paraguay              -232   164   158  144   270
+Peru                   -72   147    91  -86  -287
+Philippines           -157   227   157 -111  -171
+Portugal               -21    26    -4   40   -28
+South Africa            22   -20    -7  -20   -16
+South Rhodesia         144  -135   -92  -70   -58
+Spain                  -30    31     4   35     5
+Sweden                 101   -82   -62 -255   -13
+Switzerland             43   -46   -44   91   -19
+Turkey                 -11   -12    26    2    25
+Tunisia                 74  -105   -77   44   103
+United Kingdom          47   -36  -171  126   100
+United States           69   -73    37 -233   -33
+Venezuela              -51   101   -34  114  -124
+Zambia                 164   -79  -339   94   228
+Jamaica                110  -100   -57   -7  -295
+Uruguay               -134   129    30  131   100
+Libya                  551  -483  -380  -19 -1024
+Malaysia                37   -61    32  -50   -72
+> cat("PRESS :"); (PRESS <- sum( rstandard(lm.SR, type = "predictive")^2 ))
+PRESS :[1] 798.939
+> stopifnot(all.equal(PRESS, sum( (residuals(lm.SR) / (1 - iflSR$hat))^2)))
+> 
+> ## Show that "PRE-residuals"  ==  L.O.O. Crossvalidation (CV) errors:
+> X <- model.matrix(lm.SR)
+> y <- model.response(model.frame(lm.SR))
+> ## Leave-one-out CV least-squares prediction errors (relatively fast)
+> rCV <- vapply(seq_len(nrow(X)), function(i)
++               y[i] - X[i,] %*% .lm.fit(X[-i,], y[-i])$coef,
++               numeric(1))
+> ## are the same as the *faster* rstandard(*, "pred") :
+> stopifnot(all.equal(rCV, unname(rstandard(lm.SR, type = "predictive"))))
+> 
+> 
+> ## Huber's data [Atkinson 1985]
+> xh <- c(-4:0, 10)
+> yh <- c(2.48, .73, -.04, -1.44, -1.32, 0)
+> lmH <- lm(yh ~ xh)
+> im <- influence.measures(lmH)
+> plot(xh,yh, main = "Huber's data: L.S. line and influential obs.")
+> abline(lmH); points(xh[im$is.inf], yh[im$is.inf], pch = 20, col = 2)
+> 
+> ## Irwin's data [Williams 1987]
+> xi <- 1:5
+> yi <- c(0,2,14,19,30)    # number of mice responding to dose xi
+> mi <- rep(40, 5)         # number of mice exposed
+> glmI <- glm(cbind(yi, mi -yi) ~ xi, family = binomial)
+> signif(cooks.distance(glmI), 3)   # ~= Ci in Table 3, p.184
+     1      2      3      4      5 
+0.2520 0.2610 1.2900 0.0845 0.3640 
+> imI <- influence.measures(glmI)
+> stopifnot(all.equal(imI$infmat[,"cook.d"],
++           cooks.distance(glmI)))
+> 
+> 
 > 
 > cleanEx()
 > nameEx("integrate")
@@ -8021,6 +8249,15 @@ Error in integrate(f, 0, 1) :
 0 with absolute error < 0
 > integrate(dnorm, 0, Inf)   ## works
 0.5 with absolute error < 4.7e-05
+> ## Don't show: 
+> tools::assertError(
++ ## End(Don't show)
++ integrate(dnorm, 0:1, 20) #-> error!
++ ## "silently" gave  integrate(dnorm, 0, 20)  in earlier versions of R
++ ## Don't show: 
++  , verbose=TRUE)
+Asserted error: 'lower' must be of length one
+> ## End(Don't show)
 > 
 > 
 > 
@@ -8378,7 +8615,7 @@ Available components:
 	Kruskal-Wallis rank sum test
 
 data:  list(x, y, z)
-Kruskal-Wallis chi-squared = 0.7714, df = 2, p-value = 0.68
+Kruskal-Wallis chi-squared = 0.77143, df = 2, p-value = 0.68
 
 > ## Equivalently,
 > x <- c(x, y, z)
@@ -8391,7 +8628,7 @@ Kruskal-Wallis chi-squared = 0.7714, df = 2, p-value = 0.68
 	Kruskal-Wallis rank sum test
 
 data:  x and g
-Kruskal-Wallis chi-squared = 0.7714, df = 2, p-value = 0.68
+Kruskal-Wallis chi-squared = 0.77143, df = 2, p-value = 0.68
 
 > 
 > ## Formula interface.
@@ -8402,7 +8639,7 @@ Kruskal-Wallis chi-squared = 0.7714, df = 2, p-value = 0.68
 	Kruskal-Wallis rank sum test
 
 data:  Ozone by Month
-Kruskal-Wallis chi-squared = 29.2666, df = 4, p-value = 6.901e-06
+Kruskal-Wallis chi-squared = 29.267, df = 4, p-value = 6.901e-06
 
 > 
 > 
@@ -8439,7 +8676,7 @@ alternative hypothesis: two-sided
 	One-sample Kolmogorov-Smirnov test
 
 data:  x + 2
-D = 0.4096, p-value = 4.227e-08
+D = 0.40962, p-value = 4.227e-08
 alternative hypothesis: two-sided
 
 > ks.test(x+2, "pgamma", 3, 2, exact = FALSE)
@@ -8447,7 +8684,7 @@ alternative hypothesis: two-sided
 	One-sample Kolmogorov-Smirnov test
 
 data:  x + 2
-D = 0.4096, p-value = 1.033e-07
+D = 0.40962, p-value = 1.033e-07
 alternative hypothesis: two-sided
 
 > ks.test(x+2, "pgamma", 3, 2, alternative = "gr")
@@ -8455,7 +8692,7 @@ alternative hypothesis: two-sided
 	One-sample Kolmogorov-Smirnov test
 
 data:  x + 2
-D^+ = 0.04, p-value = 0.8302
+D^+ = 0.039998, p-value = 0.8302
 alternative hypothesis: the CDF of x lies above the null hypothesis
 
 > 
@@ -8631,7 +8868,7 @@ Coefficients:
 > ## model frame :
 > stopifnot(identical(lm(weight ~ group, method = "model.frame"),
 +                     model.frame(lm.D9)))
-> ## End Don't show
+> ## End(Don't show)
 > ### less simple examples in "See Also" above
 > 
 > 
@@ -8716,7 +8953,7 @@ List of 4
 > 
 > ## Don't show: 
 > utils::example("lm", echo = FALSE)
-> ## End Don't show
+> ## End(Don't show)
 > ##-- Continuing the  lm(.) example:
 > coef(lm.D90) # the bare coefficients
 groupCtl groupTrt 
@@ -8797,7 +9034,7 @@ List of 8
 >   id <- function(x, y) all.equal(x, y, tolerance = 1e-15, scale = 1)
 >   stopifnot(id(unname(lm.$coef), lm..$coef),
 + 	    id(unname(lmw$coef), lm.w$coef))
-> ## End Don't show
+> ## End(Don't show)
 > 
 > 
 > 
@@ -9008,7 +9245,7 @@ $margin[[3]]
 > 
 > ## Don't show: 
 > utils::example("lm", echo = FALSE)
-> ## End Don't show
+> ## End(Don't show)
 > ##-- Using the same data as the lm(.) example:
 > lsD9 <- lsfit(x = unclass(gl(2, 10)), y = weight)
 > ls.print(lsD9)
@@ -9246,8 +9483,6 @@ Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’
 > 
 > 
 > 
-> 
-> 
 > base::options(contrasts = c(unordered = "contr.treatment",ordered = "contr.poly"))
 > cleanEx()
 > nameEx("mantelhaen.test")
@@ -9428,7 +9663,7 @@ Male   <5000                          1   1   2   1
 	Cochran-Mantel-Haenszel test
 
 data:  Satisfaction
-Cochran-Mantel-Haenszel M^2 = 10.2001, df = 9, p-value = 0.3345
+Cochran-Mantel-Haenszel M^2 = 10.2, df = 9, p-value = 0.3345
 
 > ## See Table 7.12 in Agresti (2002), p. 297.
 > 
@@ -9509,7 +9744,7 @@ cond     deg0NA deg4NA deg8NA deg0NP deg4NP deg8NP
 
 
 data:  SSD matrix from lm(formula = reacttime ~ 1)
-W = 0.0311, p-value = 0.04765
+W = 0.031084, p-value = 0.04765
 
 > 
 > ### tests using intra-subject 3x2 design
@@ -9523,7 +9758,7 @@ W = 0.0311, p-value = 0.04765
 
 
 data:  SSD matrix from lm(formula = reacttime ~ 1)
-W = 0.8938, p-value = 0.6381
+W = 0.89378, p-value = 0.6381
 
 > mauchly.test(mlmfit, M = ~ deg + noise, X = ~ noise, idata = idata)
 
@@ -9536,7 +9771,7 @@ W = 0.8938, p-value = 0.6381
 
 
 data:  SSD matrix from lm(formula = reacttime ~ 1)
-W = 0.9601, p-value = 0.8497
+W = 0.96011, p-value = 0.8497
 
 > 
 > 
@@ -9573,7 +9808,7 @@ W = 0.9601, p-value = 0.8497
 	McNemar's Chi-squared test with continuity correction
 
 data:  Performance
-McNemar's chi-squared = 16.8178, df = 1, p-value = 4.115e-05
+McNemar's chi-squared = 16.818, df = 1, p-value = 4.115e-05
 
 > ## => significant change (in fact, drop) in approval ratings
 > 
@@ -9606,7 +9841,7 @@ McNemar's chi-squared = 16.8178, df = 1, p-value = 4.115e-05
 > flush(stderr()); flush(stdout())
 > 
 > ### Name: medpolish
-> ### Title: Median Polish of a Matrix
+> ### Title: Median Polish (Robust Twoway Decomposition) of a Matrix
 > ### Aliases: medpolish
 > ### Keywords: robust
 > 
@@ -9854,7 +10089,7 @@ NA        0    3    0
  $ log(Volume): num  2.33 2.33 2.32 2.8 2.93 ...
  $ log(Height): num  4.25 4.17 4.14 4.28 4.39 ...
  $ log(Girth) : num  2.12 2.15 2.17 2.35 2.37 ...
- - attr(*, "terms")=Classes 'terms', 'formula' length 3 log(Volume) ~ log(Height) + log(Girth)
+ - attr(*, "terms")=Classes 'terms', 'formula'  language log(Volume) ~ log(Height) + log(Girth)
   .. ..- attr(*, "variables")= language list(log(Volume), log(Height), log(Girth))
   .. ..- attr(*, "factors")= int [1:3, 1:2] 0 1 0 0 0 1
   .. .. ..- attr(*, "dimnames")=List of 2
@@ -9971,7 +10206,6 @@ b4                    3  0  0  0  0  3
 > ### ** Examples
 > 
 > 
-> base::options(contrasts = c(unordered = "contr.treatment",ordered = "contr.poly"))
 > cleanEx()
 > nameEx("monthplot")
 > ### * monthplot
@@ -10319,7 +10553,7 @@ $iterations
 > 
 > ## Don't show: 
 > od <- options(digits=5)
-> ## End Don't show
+> ## End(Don't show)
 > require(graphics)
 > 
 > DNase1 <- subset(DNase, Run == 1)
@@ -10525,7 +10759,7 @@ Consider specifying 'start' or using a selfStart model
 > 
 > ## Don't show: 
 > options(od)
-> ## End Don't show
+> ## End(Don't show)
 > 
 > 
 > 
@@ -10576,7 +10810,7 @@ $warnOnly
 > 
 > ## Don't show: 
 > od <- options(digits = 4)
-> ## End Don't show
+> ## End(Don't show)
 > myenv <- new.env()
 > assign("mean", 0., envir = myenv)
 > assign("sd", 1., envir = myenv)
@@ -10621,7 +10855,7 @@ attr(,"gradient")
 [31,] -0.004432 -0.01330
 > ## Don't show: 
 > options(od)
-> ## End Don't show
+> ## End(Don't show)
 > 
 > 
 > 
@@ -11380,7 +11614,7 @@ Warning in xy.coords(x, y, xlabel, ylabel, log) :
 > for(i in 1:5) assign(paste("long.var.name", i, sep = "."), runif(10))
 > plot(lm(long.var.name.1 ~
 +         long.var.name.2 + long.var.name.3 + long.var.name.4 + long.var.name.5))
-> ## End Don't show
+> ## End(Don't show)
 > 
 > 
 > 
@@ -11400,16 +11634,14 @@ Warning in xy.coords(x, y, xlabel, ylabel, log) :
 > 
 > require(graphics)
 > 
-> with(rock, {
-+ area1 <- area/10000; peri1 <- peri/10000
-+ par(mfrow = c(3,2)) # maybe: , pty = "s")
-+ rock.ppr <- ppr(log(perm) ~ area1 + peri1 + shape,
-+                 data = rock, nterms = 2, max.terms = 5)
-+ plot(rock.ppr, main = "ppr(log(perm)~ ., nterms=2, max.terms=5)")
-+ plot(update(rock.ppr, bass = 5), main = "update(..., bass = 5)")
-+ plot(update(rock.ppr, sm.method = "gcv", gcvpen = 2),
+> rock1 <- within(rock, { area1 <- area/10000; peri1 <- peri/10000 })
+> 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)")
+> plot(update(rock.ppr, bass = 5), main = "update(..., bass = 5)")
+> plot(update(rock.ppr, sm.method = "gcv", gcvpen = 2),
 +      main = "update(..., sm.method=\"gcv\", gcvpen=2)")
-+ })
 > 
 > 
 > 
@@ -11565,7 +11797,7 @@ event rate
 	Comparison of Poisson rates
 
 data:  c(11, 6 + 8 + 7) time base: c(800, 1083 + 1050 + 878)
-count1 = 11, expected count1 = 6.717, p-value = 0.07967
+count1 = 11, expected count1 = 6.7174, p-value = 0.07967
 alternative hypothesis: true rate ratio is not equal to 1
 95 percent confidence interval:
  0.8584264 4.2772659
@@ -11602,8 +11834,6 @@ rate ratio
  [8,]  0.275 -0.087 -0.378
  [9,]  0.385  0.174 -0.151
 [10,]  0.495  0.522  0.453
-attr(,"degree")
-[1] 1 2 3
 attr(,"coefs")
 attr(,"coefs")$alpha
 [1] 5.5 5.5 5.5
@@ -11611,6 +11841,8 @@ attr(,"coefs")$alpha
 attr(,"coefs")$norm2
 [1]    1.0   10.0   82.5  528.0 3088.8
 
+attr(,"degree")
+[1] 1 2 3
 attr(,"class")
 [1] "poly"   "matrix"
 > predict(z, seq(2, 4, 0.5))
@@ -11620,17 +11852,6 @@ attr(,"class")
 [3,] -0.275 -0.0870 0.378
 [4,] -0.220 -0.1850 0.383
 [5,] -0.165 -0.2611 0.335
-attr(,"degree")
-[1] 1 2 3
-attr(,"coefs")
-attr(,"coefs")$alpha
-[1] 5.5 5.5 5.5
-
-attr(,"coefs")$norm2
-[1]    1.0   10.0   82.5  528.0 3088.8
-
-attr(,"class")
-[1] "poly"   "matrix"
 > zapsmall(poly(seq(4, 6, 0.5), 3, coefs = attr(z, "coefs")))
           1      2      3
 [1,] -0.165 -0.261  0.335
@@ -11638,8 +11859,6 @@ attr(,"class")
 [3,] -0.055 -0.348  0.130
 [4,]  0.000 -0.359  0.000
 [5,]  0.055 -0.348 -0.130
-attr(,"degree")
-[1] 1 2 3
 attr(,"coefs")
 attr(,"coefs")$alpha
 [1] 5.5 5.5 5.5
@@ -11647,18 +11866,13 @@ attr(,"coefs")$alpha
 attr(,"coefs")$norm2
 [1]    1.0   10.0   82.5  528.0 3088.8
 
+attr(,"degree")
+[1] 1 2 3
 attr(,"class")
 [1] "poly"   "matrix"
 > 
-> zapsmall(polym(1:4, c(1, 4:6), degree = 3)) # or just poly()
-        1.0  2.0    3.0    0.1   1.1    2.1    0.2    1.2    0.3
-[1,] -0.671  0.5 -0.224 -0.802 0.538 -0.401  0.323 -0.217 -0.053
-[2,] -0.224 -0.5  0.671  0.000 0.000  0.000 -0.688  0.154  0.526
-[3,]  0.224 -0.5 -0.671  0.267 0.060 -0.134 -0.239 -0.053 -0.788
-[4,]  0.671  0.5  0.224  0.535 0.359  0.267  0.604  0.405  0.315
-attr(,"degree")
-[1] 1 2 3 1 2 3 2 3 3
-> zapsmall(poly(cbind(1:4, c(1, 4:6)), degree = 3))
+>  zm <- zapsmall(polym (    1:4, c(1, 4:6),  degree = 3)) # or just poly():
+> (z1 <- zapsmall(poly(cbind(1:4, c(1, 4:6)), degree = 3)))
         1.0  2.0    3.0    0.1   1.1    2.1    0.2    1.2    0.3
 [1,] -0.671  0.5 -0.224 -0.802 0.538 -0.401  0.323 -0.217 -0.053
 [2,] -0.224 -0.5  0.671  0.000 0.000  0.000 -0.688  0.154  0.526
@@ -11666,6 +11880,27 @@ attr(,"degree")
 [4,]  0.671  0.5  0.224  0.535 0.359  0.267  0.604  0.405  0.315
 attr(,"degree")
 [1] 1 2 3 1 2 3 2 3 3
+attr(,"coefs")
+attr(,"coefs")[[1]]
+attr(,"coefs")[[1]]$alpha
+[1] 2.5 2.5 2.5
+
+attr(,"coefs")[[1]]$norm2
+[1] 1.0 4.0 5.0 4.0 1.8
+
+
+attr(,"coefs")[[2]]
+attr(,"coefs")[[2]]$alpha
+[1] 4.00 2.71 4.47
+
+attr(,"coefs")[[2]]$norm2
+[1]  1.00  4.00 14.00 25.86  9.94
+
+
+attr(,"class")
+[1] "poly"   "matrix"
+> ## they are the same :
+> stopifnot(all.equal(zm, z1, tol = 1e-15))
 > options(od)
 > 
 > 
@@ -11713,14 +11948,14 @@ attr(,"class")
 $linkfun
 function (mu) 
 mu^lambda
-<bytecode: 0x4b45d80>
-<environment: 0x4b234d8>
+<bytecode: 0x4152cb8>
+<environment: 0x414b208>
 
 $linkinv
 function (eta) 
 pmax(eta^(1/lambda), .Machine$double.eps)
-<bytecode: 0x4b45c68>
-<environment: 0x4b234d8>
+<bytecode: 0x4152e08>
+<environment: 0x414b208>
 
 > 
 > 
@@ -11803,7 +12038,7 @@ NOTE: n is number in each group
 > 
 > ### ** Examples
 > 
->  power.prop.test(n = 50, p1 = .50, p2 = .75)
+> power.prop.test(n = 50, p1 = .50, p2 = .75)      ## => power = 0.740
 
      Two-sample comparison of proportions power calculation 
 
@@ -11816,7 +12051,7 @@ NOTE: n is number in each group
 
 NOTE: n is number in *each* group
 
->  power.prop.test(p1 = .50, p2 = .75, power = .90)
+> power.prop.test(p1 = .50, p2 = .75, power = .90) ## =>     n = 76.7
 
      Two-sample comparison of proportions power calculation 
 
@@ -11829,7 +12064,7 @@ NOTE: n is number in *each* group
 
 NOTE: n is number in *each* group
 
->  power.prop.test(n = 50, p1 = .5, power = .90)
+> power.prop.test(n = 50, p1 = .5, power = .90)    ## =>    p2 = 0.8026
 
      Two-sample comparison of proportions power calculation 
 
@@ -11842,6 +12077,34 @@ NOTE: n is number in *each* group
 
 NOTE: n is number in *each* group
 
+> power.prop.test(n = 50, p1 = .5, p2 = 0.9, power = .90, sig.level=NULL)
+
+     Two-sample comparison of proportions power calculation 
+
+              n = 50
+             p1 = 0.5
+             p2 = 0.9
+      sig.level = 0.001318068
+          power = 0.9
+    alternative = two.sided
+
+NOTE: n is number in *each* group
+
+>                                                  ## => sig.l = 0.00131
+> power.prop.test(p1 = .5, p2 = 0.501, sig.level=.001, power=0.90)
+
+     Two-sample comparison of proportions power calculation 
+
+              n = 10451937
+             p1 = 0.5
+             p2 = 0.501
+      sig.level = 0.001
+          power = 0.9
+    alternative = two.sided
+
+NOTE: n is number in *each* group
+
+>                                                  ## => n = 10451937
 > 
 > 
 > 
@@ -11919,7 +12182,7 @@ NOTE: n is number in *each* group
 	Phillips-Perron Unit Root Test
 
 data:  x
-Dickey-Fuller = -33.0567, Truncation lag parameter = 7, p-value = 0.01
+Dickey-Fuller = -33.057, Truncation lag parameter = 7, p-value = 0.01
 
 > y <- cumsum(x) # has unit root
 > PP.test(y)
@@ -11953,8 +12216,38 @@ Dickey-Fuller = -2.6899, Truncation lag parameter = 7, p-value = 0.2863
 > ppoints(10, a = 1/2)
  [1] 0.05 0.15 0.25 0.35 0.45 0.55 0.65 0.75 0.85 0.95
 > 
+> ## Visualize including the fractions :
+> require(graphics)## Don't show: 
+> lNs <- loadedNamespaces()
+> ## End(Don't show)
+> p.ppoints <- function(n, ..., add = FALSE, col = par("col")) {
++   pn <- ppoints(n, ...)
++   if(add)
++       points(pn, pn, col = col)
++   else {
++       tit <- match.call(); tit[[1]] <- quote(ppoints)
++       plot(pn,pn, main = deparse(tit), col=col,
++            xlim = 0:1, ylim = 0:1, xaxs = "i", yaxs = "i")
++       abline(0, 1, col = adjustcolor(1, 1/4), lty = 3)
++   }
++   if(!add && requireNamespace("MASS", quietly = TRUE))
++     text(pn, pn, as.character(MASS::fractions(pn)),
++          adj = c(0,0)-1/4, cex = 3/4, xpd = NA, col=col)
++   abline(h = pn, v = pn, col = adjustcolor(col, 1/2), lty = 2, lwd = 1/2)
++ }
+> 
+> p.ppoints(4)
+> p.ppoints(10)
+> p.ppoints(10, a = 1/2)
+> p.ppoints(21)
+> p.ppoints(8) ; p.ppoints(8, a = 1/2, add=TRUE, col="tomato")
+> ## Don't show: 
+> if(!any("MASS" == lNs)) unloadNamespace("MASS")
+> ## End(Don't show)
+> 
 > 
 > 
+> graphics::par(get("par.postscript", pos = 'CheckExEnv'))
 > cleanEx()
 > nameEx("ppr")
 > ### * ppr
@@ -12000,19 +12293,19 @@ Goodness of fit:
  2 terms  3 terms  4 terms  5 terms 
 8.737806 5.289517 4.745799 4.490378 
 
-Projection direction vectors:
+Projection direction vectors ('alpha'):
       term 1      term 2     
 area1  0.34357179  0.37071027
 peri1 -0.93781471 -0.61923542
 shape  0.04961846  0.69218595
 
-Coefficients of ridge terms:
+Coefficients of ridge terms ('beta'):
    term 1    term 2 
 1.6079271 0.5460971 
 > # .....  (same as above)
 > # .....
 > #
-> # Projection direction vectors:
+> # Projection direction vectors ('alpha'):
 > #       term 1      term 2
 > # area1  0.34357179  0.37071027
 > # peri1 -0.93781471 -0.61923542
@@ -12096,6 +12389,38 @@ Coefficients of ridge terms:
 > 
 > ### ** Examples
 > 
+> C <- chol(S <- toeplitz(.9 ^ (0:31))) # Cov.matrix and its root
+> all.equal(S, crossprod(C))
+[1] TRUE
+> set.seed(17)
+> X <- matrix(rnorm(32000), 1000, 32)
+> Z <- X %*% C  ## ==>  cov(Z) ~=  C'C = S
+> all.equal(cov(Z), S, tol = 0.08)
+[1] TRUE
+> pZ <- prcomp(Z, tol = 0.1)
+> summary(pZ) # only ~14 PCs (out of 32)
+Importance of first k=14 (out of 32) components:
+                          PC1    PC2    PC3     PC4     PC5     PC6     PC7
+Standard deviation     3.6415 2.7178 1.8447 1.39430 1.10207 0.90922 0.76951
+Proportion of Variance 0.4173 0.2324 0.1071 0.06118 0.03822 0.02602 0.01864
+Cumulative Proportion  0.4173 0.6498 0.7569 0.81806 0.85628 0.88230 0.90094
+                           PC8     PC9    PC10    PC11    PC12    PC13   PC14
+Standard deviation     0.67490 0.60833 0.51638 0.49048 0.44452 0.40326 0.3904
+Proportion of Variance 0.01433 0.01165 0.00839 0.00757 0.00622 0.00512 0.0048
+Cumulative Proportion  0.91527 0.92692 0.93531 0.94288 0.94910 0.95422 0.9590
+> ## or choose only 3 PCs more directly:
+> pz3 <- prcomp(Z, rank. = 3)
+> summary(pz3) # same numbers as the first 3 above
+Importance of first k=3 (out of 32) components:
+                          PC1    PC2    PC3
+Standard deviation     3.6415 2.7178 1.8447
+Proportion of Variance 0.4173 0.2324 0.1071
+Cumulative Proportion  0.4173 0.6498 0.7569
+> stopifnot(ncol(pZ$rotation) == 14, ncol(pz3$rotation) == 3,
++           all.equal(pz3$sdev, pZ$sdev, tol = 1e-15)) # exactly equal typically
+> 
+> 
+> 
 > 
 > cleanEx()
 > nameEx("predict.HoltWinters")
@@ -12133,11 +12458,13 @@ Coefficients of ridge terms:
 > 
 > ## Don't show: 
 > old <- Sys.setlocale("LC_COLLATE", "C")
-> ## End Don't show
+> ## End(Don't show)
 > require(utils)
 > 
 > ## All the "predict" methods found
 > ## NB most of the methods in the standard packages are hidden.
+> ## Output will depend on what namespaces are (or have been) loaded.
+> ## IGNORE_RDIFF_BEGIN
 > for(fn in methods("predict"))
 +    try({
 +        f <- eval(substitute(getAnywhere(fn)$objs[[1]], list(fn = fn)))
@@ -12159,10 +12486,26 @@ predict.bs :
 	 function (object, newx, ...)  NULL 
 predict.glm :
 	 function (object, newdata = NULL, type = c("link", "response",      "terms"), se.fit = FALSE, dispersion = NULL, terms = NULL,      na.action = na.pass, ...)  NULL 
+Warning: namespace ‘MASS’ is not available and has been replaced
+by .GlobalEnv when processing object ‘’
+predict.glmmPQL :
+	 function (object, newdata = NULL, type = c("link", "response"),      level = Q, na.action = na.pass, ...)  NULL 
+Warning: namespace ‘MASS’ is not available and has been replaced
+by .GlobalEnv when processing object ‘’
+predict.lda :
+	 function (object, newdata, prior = object$prior, dimen, method = c("plug-in",      "predictive", "debiased"), ...)  NULL 
 predict.lm :
 	 function (object, newdata, se.fit = FALSE, scale = NULL, df = Inf,      interval = c("none", "confidence", "prediction"), level = 0.95,      type = c("response", "terms"), terms = NULL, na.action = na.pass,      pred.var = res.var/weights, weights = 1, ...)  NULL 
 predict.loess :
 	 function (object, newdata = NULL, se = FALSE, na.action = na.pass,      ...)  NULL 
+Warning: namespace ‘MASS’ is not available and has been replaced
+by .GlobalEnv when processing object ‘’
+predict.lqs :
+	 function (object, newdata, na.action = na.pass, ...)  NULL 
+Warning: namespace ‘MASS’ is not available and has been replaced
+by .GlobalEnv when processing object ‘’
+predict.mca :
+	 function (object, newdata, type = c("row", "factor"), ...)  NULL 
 predict.mlm :
 	 function (object, newdata, se.fit = FALSE, na.action = na.pass,      ...)  NULL 
 predict.nbSpline :
@@ -12175,6 +12518,10 @@ predict.ns :
 	 function (object, newx, ...)  NULL 
 predict.pbSpline :
 	 function (object, x, nseg = 50, deriv = 0, ...)  NULL 
+Warning: namespace ‘MASS’ is not available and has been replaced
+by .GlobalEnv when processing object ‘’
+predict.polr :
+	 function (object, newdata, type = c("class", "probs"), ...)  NULL 
 predict.poly :
 	 function (object, newdata, ...)  NULL 
 predict.polySpline :
@@ -12187,13 +12534,22 @@ predict.prcomp :
 	 function (object, newdata, ...)  NULL 
 predict.princomp :
 	 function (object, newdata, ...)  NULL 
+Warning: namespace ‘MASS’ is not available and has been replaced
+by .GlobalEnv when processing object ‘’
+predict.qda :
+	 function (object, newdata, prior = object$prior, method = c("plug-in",      "predictive", "debiased", "looCV"), ...)  NULL 
+Warning: namespace ‘MASS’ is not available and has been replaced
+by .GlobalEnv when processing object ‘’
+predict.rlm :
+	 function (object, newdata = NULL, scale = NULL, ...)  NULL 
 predict.smooth.spline :
 	 function (object, x, deriv = 0, ...)  NULL 
 predict.smooth.spline.fit :
 	 function (object, x, deriv = 0, ...)  NULL 
+> ## IGNORE_RDIFF_END
 > ## Don't show: 
 > old <- Sys.setlocale("LC_COLLATE", old)
-> ## End Don't show
+> ## End(Don't show)
 > 
 > 
 > 
@@ -12591,7 +12947,7 @@ $df
 > 
 > ## Don't show: 
 > od <- options(digits = 5)
-> ## End Don't show
+> ## End(Don't show)
 > require(graphics)
 > 
 > fm <- nls(demand ~ SSasympOrig(Time, A, lrc), data = BOD)
@@ -12607,7 +12963,7 @@ $df
 > par(opar)
 > ## Don't show: 
 > options(od)
-> ## End Don't show
+> ## End(Don't show)
 > 
 > 
 > 
@@ -12647,6 +13003,9 @@ $yin
  [9] 50.50000 33.33333 36.00000 40.66667 64.50000 50.00000 50.40000 66.00000
 [17] 54.00000 93.75000 85.00000
 
+$tol
+[1] 7e-06
+
 $data
 $data$x
  [1]  4  4  7  7  8  9 10 10 10 11 11 12 12 12 12 13 13 13 13 14 14 14 14 15 15
@@ -12658,9 +13017,11 @@ $data$y
 [39]  32  48  52  56  64  66  54  70  92  93 120  85
 
 $data$w
- [1] 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
-[39] 1 1 1 1 1 1 1 1 1 1 1 1
+[1] 1
+
 
+$no.weights
+[1] TRUE
 
 $lev
  [1] 0.8934338 0.4379689 0.1842314 0.1529048 0.3641292 0.2022506 0.3399561
@@ -12682,12 +13043,18 @@ $df
 $spar
 [1] 0.4873957
 
+$ratio
+[1] 6.575971e-05
+
 $lambda
 [1] 0.0008526606
 
 $iparms
-icrit ispar  iter 
-    3     0    13 
+ icrit  ispar   iter        errorI 
+     3      0     13      0     NA 
+
+$auxM
+NULL
 
 $fit
 $knot
@@ -12718,7 +13085,7 @@ smooth.spline(x = speed, y = dist, df = 6.4)
 
 attr(,"class")
 [1] "smooth.spline"
-> ## End Don't show
+> ## End(Don't show)
 > 
 > ## "Proof" that the derivatives are okay, by comparing with approximation
 > diff.quot <- function(x, y) {
@@ -12744,7 +13111,7 @@ attr(,"class")
 +   lines(pp <- predict(cars.spl, xx, deriv = d), col = "red")
 + ## Don't show: 
 +   print(pp)
-+ ## End Don't show
++ ## End(Don't show)
 +   points(kn, pp$y[i.kn], pch = 3, col = "dark red")
 +   abline(h = 0, lty = 3, col = "gray")
 + }
@@ -12969,6 +13336,61 @@ Standard deviations:
 > 
 > 
 > cleanEx()
+> nameEx("print.power.htest")
+> ### * print.power.htest
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: print.power.htest
+> ### Title: Print Methods for Hypothesis Tests and Power Calculation Objects
+> ### Aliases: print.htest print.power.htest
+> ### Keywords: htest
+> 
+> ### ** Examples
+> 
+> (ptt <- power.t.test(n = 20, delta = 1))
+
+     Two-sample t test power calculation 
+
+              n = 20
+          delta = 1
+             sd = 1
+      sig.level = 0.05
+          power = 0.8689528
+    alternative = two.sided
+
+NOTE: n is number in *each* group
+
+> print(ptt, digits =  4) # using less digits than default
+
+     Two-sample t test power calculation 
+
+              n = 20
+          delta = 1
+             sd = 1
+      sig.level = 0.05
+          power = 0.869
+    alternative = two.sided
+
+NOTE: n is number in *each* group
+
+> print(ptt, digits = 12) # using more  "       "     "
+
+     Two-sample t test power calculation 
+
+              n = 20
+          delta = 1
+             sd = 1
+      sig.level = 0.05
+          power = 0.868952801692
+    alternative = two.sided
+
+NOTE: n is number in *each* group
+
+> 
+> 
+> 
+> cleanEx()
 > nameEx("print.ts")
 > ### * print.ts
 > 
@@ -13061,7 +13483,7 @@ Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’
 > 
 > ## Don't show: 
 > od <- options(digits = 4)
-> ## End Don't show
+> ## End(Don't show)
 > # obtain the fitted object
 > fm1 <- nls(demand ~ SSasympOrig(Time, A, lrc), data = BOD)
 > # get the profile for the fitted model: default level is too extreme
@@ -13100,7 +13522,7 @@ Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’
 > # see also example(plot.profile.nls)
 > ## Don't show: 
 > options(od)
-> ## End Don't show
+> ## End(Don't show)
 > 
 > 
 > 
@@ -13430,7 +13852,7 @@ sample estimates:
 	correction
 
 data:  smokers out of patients
-X-squared = 12.6004, df = 3, p-value = 0.005585
+X-squared = 12.6, df = 3, p-value = 0.005585
 alternative hypothesis: two.sided
 sample estimates:
    prop 1    prop 2    prop 3    prop 4 
@@ -13460,7 +13882,7 @@ sample estimates:
 	correction
 
 data:  smokers out of patients
-X-squared = 12.6004, df = 3, p-value = 0.005585
+X-squared = 12.6, df = 3, p-value = 0.005585
 alternative hypothesis: two.sided
 sample estimates:
    prop 1    prop 2    prop 3    prop 4 
@@ -13480,7 +13902,7 @@ X-squared = 8.2249, df = 1, p-value = 0.004132
 
 data:  smokers out of patients ,
  using scores: 0 0 0 1
-X-squared = 12.1731, df = 1, p-value = 0.0004848
+X-squared = 12.173, df = 1, p-value = 0.0004848
 
 > 
 > 
@@ -13587,21 +14009,43 @@ Quade F = 3.8293, num df = 4, denom df = 24, p-value = 0.01519
 -0.03472603          NA 
 > 
 > ### Compare different types
+> quantAll <- function(x, prob, ...)
++   t(vapply(1:9, function(typ) quantile(x, prob=prob, type = typ, ...), quantile(x, prob, type=1)))
 > p <- c(0.1, 0.5, 1, 2, 5, 10, 50)/100
-> res <- matrix(as.numeric(NA), 9, 7)
-> for(type in 1:9) res[type, ] <- y <- quantile(x,  p, type = type)
-> dimnames(res) <- list(1:9, names(y))
-> round(res, 3)
-    0.1%   0.5%     1%     2%     5%    10%    50%
-1 -2.997 -2.592 -2.424 -2.245 -1.727 -1.339 -0.035
-2 -2.997 -2.592 -2.424 -2.245 -1.727 -1.339 -0.035
-3 -3.008 -2.596 -2.433 -2.265 -1.733 -1.344 -0.036
-4 -3.008 -2.596 -2.433 -2.264 -1.733 -1.344 -0.035
-5 -3.002 -2.594 -2.428 -2.255 -1.730 -1.341 -0.035
-6 -3.008 -2.596 -2.432 -2.264 -1.733 -1.343 -0.035
-7 -2.997 -2.592 -2.424 -2.245 -1.727 -1.339 -0.035
-8 -3.004 -2.595 -2.430 -2.258 -1.731 -1.342 -0.035
-9 -3.004 -2.595 -2.429 -2.257 -1.730 -1.341 -0.035
+> signif(quantAll(x, p), 4)
+        0.1%   0.5%     1%     2%     5%    10%      50%
+ [1,] -2.997 -2.592 -2.424 -2.245 -1.727 -1.339 -0.03473
+ [2,] -2.997 -2.592 -2.424 -2.245 -1.727 -1.339 -0.03473
+ [3,] -3.008 -2.596 -2.433 -2.265 -1.733 -1.344 -0.03592
+ [4,] -3.008 -2.596 -2.433 -2.264 -1.733 -1.344 -0.03532
+ [5,] -3.002 -2.594 -2.428 -2.255 -1.730 -1.341 -0.03473
+ [6,] -3.008 -2.596 -2.432 -2.264 -1.733 -1.343 -0.03473
+ [7,] -2.997 -2.592 -2.424 -2.245 -1.727 -1.339 -0.03473
+ [8,] -3.004 -2.595 -2.430 -2.258 -1.731 -1.342 -0.03473
+ [9,] -3.004 -2.595 -2.429 -2.257 -1.730 -1.341 -0.03473
+> ## for complex numbers:
+> z <- complex(re=x, im = -10*x)
+> signif(quantAll(z, p), 4)
+              0.1%         0.5%           1%           2%           5%
+ [1,] -3.00+29.97i -2.59+25.92i -2.42+24.24i -2.25+22.45i -1.73+17.27i
+ [2,] -3.00+29.97i -2.59+25.92i -2.42+24.24i -2.25+22.45i -1.73+17.27i
+ [3,] -3.01+30.08i -2.60+25.96i -2.43+24.33i -2.26+22.65i -1.73+17.33i
+ [4,] -3.01+30.08i -2.60+25.96i -2.43+24.33i -2.26+22.64i -1.73+17.33i
+ [5,] -3.00+30.02i -2.59+25.94i -2.43+24.28i -2.25+22.55i -1.73+17.30i
+ [6,] -3.01+30.08i -2.60+25.96i -2.43+24.32i -2.26+22.64i -1.73+17.33i
+ [7,] -3.00+29.97i -2.59+25.92i -2.42+24.24i -2.25+22.45i -1.73+17.27i
+ [8,] -3.00+30.04i -2.59+25.95i -2.43+24.30i -2.26+22.58i -1.73+17.31i
+ [9,] -3.00+30.04i -2.59+25.95i -2.43+24.29i -2.26+22.57i -1.73+17.30i
+               10%             50%
+ [1,] -1.34+13.39i -0.0347+0.3473i
+ [2,] -1.34+13.39i -0.0347+0.3473i
+ [3,] -1.34+13.44i -0.0359+0.3592i
+ [4,] -1.34+13.44i -0.0353+0.3532i
+ [5,] -1.34+13.41i -0.0347+0.3473i
+ [6,] -1.34+13.43i -0.0347+0.3473i
+ [7,] -1.34+13.39i -0.0347+0.3473i
+ [8,] -1.34+13.42i -0.0347+0.3473i
+ [9,] -1.34+13.41i -0.0347+0.3473i
 > 
 > 
 > 
@@ -13787,7 +14231,7 @@ Female 1st             0     4     1   140
 [1,]           6           5           6       5
 [2,]          33          33          33      33
 >  options(op)
-> ## End Don't show
+> ## End(Don't show)
 > 
 > 
 > 
@@ -14842,12 +15286,79 @@ W = 0.9956, p-value = 0.9876
 	Shapiro-Wilk normality test
 
 data:  runif(100, min = 2, max = 4)
-W = 0.9309, p-value = 5.616e-05
+W = 0.93092, p-value = 5.616e-05
 
 > 
 > 
 > 
 > cleanEx()
+> nameEx("sigma")
+> ### * sigma
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: sigma
+> ### Title: Extract Residual Standard Deviation 'Sigma'
+> ### Aliases: sigma sigma.default sigma.mlm
+> ### Keywords: models
+> 
+> ### ** Examples
+> 
+> ## -- lm() ------------------------------
+> lm1 <- lm(Fertility ~ . , data = swiss)
+> sigma(lm1) # ~= 7.165  = "Residual standard error"  printed from summary(lm1)
+[1] 7.165369
+> stopifnot(all.equal(sigma(lm1), summary(lm1)$sigma, tol=1e-15))
+> 
+> ## -- nls() -----------------------------
+> DNase1 <- subset(DNase, Run == 1)
+> fm.DN1 <- nls(density ~ SSlogis(log(conc), Asym, xmid, scal), DNase1)
+> sigma(fm.DN1) # ~= 0.01919  as from summary(..)
+[1] 0.01919449
+> stopifnot(all.equal(sigma(fm.DN1), summary(fm.DN1)$sigma, tol=1e-15))
+> 
+> ## -- glm() -----------------------------
+> ## -- a) Binomial -- Example from MASS
+> ldose <- rep(0:5, 2)
+> numdead <- c(1, 4, 9, 13, 18, 20, 0, 2, 6, 10, 12, 16)
+> sex <- factor(rep(c("M", "F"), c(6, 6)))
+> SF <- cbind(numdead, numalive = 20-numdead)
+> sigma(budworm.lg <- glm(SF ~ sex*ldose, family = binomial))
+[1] 0.7900734
+> 
+> ## -- b) Poisson -- from ?glm :
+> ## Dobson (1990) Page 93: Randomized Controlled Trial :
+> counts <- c(18,17,15,20,10,20,25,13,12)
+> outcome <- gl(3,1,9)
+> treatment <- gl(3,3)
+> sigma(glm.D93 <- glm(counts ~ outcome + treatment, family = poisson()))
+[1] 1.13238
+> ## (currently) *differs* from
+> summary(glm.D93)$dispersion # == 1
+[1] 1
+> ## and the *Quasi*poisson's dispersion
+> sigma(glm.qD93 <- update(glm.D93, family = quasipoisson()))
+[1] 1.13238
+> sigma (glm.qD93)^2 # 1.282285 is close, but not the same
+[1] 1.282285
+> summary(glm.qD93)$dispersion # == 1.2933
+[1] 1.2933
+> 
+> ## -- Multivariate lm() "mlm" -----------
+> utils::example("SSD", echo=FALSE)
+> sigma(mlmfit) # is the same as {but more efficient than}
+   deg0NA    deg4NA    deg8NA    deg0NP    deg4NP    deg8NP 
+ 56.92100  86.02325  78.99367  88.54377 109.54451 116.79041 
+> sqrt(diag(estVar(mlmfit)))
+   deg0NA    deg4NA    deg8NA    deg0NP    deg4NP    deg8NP 
+ 56.92100  86.02325  78.99367  88.54377 109.54451 116.79041 
+> ## Don't show: 
+> stopifnot(all.equal(sigma(mlmfit), sqrt(diag(estVar(mlmfit)))))
+> ## End(Don't show)
+> 
+> 
+> 
+> cleanEx()
 > nameEx("simulate")
 > ### * simulate
 > 
@@ -14995,48 +15506,50 @@ S Tukey smoother resulting from  smooth(x = x3R, kind = "S")
 > ### ** Examples
 > 
 > require(graphics)
-> 
-> attach(cars)
-> plot(speed, dist, main = "data(cars)  &  smoothing splines")
-> cars.spl <- smooth.spline(speed, dist)
-> (cars.spl)
+> plot(dist ~ speed, data = cars, main = "data(cars)  &  smoothing splines")
+> cars.spl <- with(cars, smooth.spline(speed, dist))
+> cars.spl
 Call:
 smooth.spline(x = speed, y = dist)
 
 Smoothing Parameter  spar= 0.7801305  lambda= 0.1112206 (11 iterations)
 Equivalent Degrees of Freedom (Df): 2.635278
-Penalized Criterion: 4187.776
+Penalized Criterion (RSS): 4187.776
 GCV: 244.1044
 > ## This example has duplicate points, so avoid cv = TRUE
 > ## Don't show: 
->   stopifnot(cars.spl $ w == table(speed)) # weights = multiplicities
+>   stopifnot(cars.spl $ w == table(cars$speed)) # weights = multiplicities
 >   utils::str(cars.spl, digits = 5, vec.len = 6)
-List of 15
- $ x       : num [1:19] 4 7 8 9 10 11 12 13 14 15 16 17 18 19 20 ...
- $ y       : num [1:19] 1.6578 11.6829 15.0644 18.4823 21.9471 25.4656 29.0505 32.7076 ...
- $ w       : num [1:19] 2 2 1 1 3 2 4 4 4 3 2 3 4 3 5 ...
- $ yin     : num [1:19] 6 13 16 10 26 22.5 21.5 35 ...
- $ data    :List of 3
+List of 19
+ $ x         : num [1:19] 4 7 8 9 10 11 12 13 14 15 16 17 18 19 20 ...
+ $ y         : num [1:19] 1.6578 11.6829 15.0644 18.4823 21.9471 25.4656 29.0505 32.7076 ...
+ $ w         : num [1:19] 2 2 1 1 3 2 4 4 4 3 2 3 4 3 5 ...
+ $ yin       : num [1:19] 6 13 16 10 26 22.5 21.5 35 ...
+ $ tol       : num 7e-06
+ $ data      :List of 3
   ..$ x: num [1:50] 4 4 7 7 8 9 10 10 10 11 11 12 12 12 12 ...
   ..$ y: num [1:50] 2 10 4 22 16 10 18 26 34 17 28 14 20 24 28 ...
-  ..$ w: num [1:50] 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ...
- $ lev     : num [1:19] 0.399342 0.179105 0.069771 0.055561 0.136721 0.077539 0.137252 0.126354 ...
- $ cv.crit : num 244.1
- $ pen.crit: num 4187.8
- $ crit    : num 244.1
- $ df      : num 2.6353
- $ spar    : num 0.78013
- $ lambda  : num 0.11122
- $ iparms  : Named int [1:3] 1 0 11
-  ..- attr(*, "names")= chr [1:3] "icrit" "ispar" "iter"
- $ fit     :List of 5
+  ..$ w: num 1
+ $ no.weights: logi TRUE
+ $ lev       : num [1:19] 0.399342 0.179105 0.069771 0.055561 0.136721 0.077539 0.137252 0.126354 ...
+ $ cv.crit   : num 244.1
+ $ pen.crit  : num 4187.8
+ $ crit      : num 244.1
+ $ df        : num 2.6353
+ $ spar      : num 0.78013
+ $ ratio     : num 6.576e-05
+ $ lambda    : num 0.11122
+ $ iparms    : Named int [1:5] 1 0 11 0 NA
+  ..- attr(*, "names")= chr [1:5] "icrit" "ispar" "iter" "" "errorI"
+ $ auxM      : NULL
+ $ fit       :List of 5
   ..$ knot : num [1:25] 0 0 0 0 0.14286 0.19048 0.2381 0.28571 ...
   ..$ nk   : int 21
   ..$ min  : num 4
   ..$ range: num 21
   ..$ coef : num [1:21] 1.6578 4.9869 9.4256 15.0584 18.4743 21.9384 25.4544 29.0377 ...
   ..- attr(*, "class")= chr "smooth.spline.fit"
- $ call    : language smooth.spline(x = speed, y = dist)
+ $ call      : language smooth.spline(x = speed, y = dist)
  - attr(*, "class")= chr "smooth.spline"
 >   cars.spl$fit
 $knot
@@ -15061,13 +15574,13 @@ $coef
 
 attr(,"class")
 [1] "smooth.spline.fit"
-> ## End Don't show
+> ## End(Don't show)
 > lines(cars.spl, col = "blue")
-> lines(smooth.spline(speed, dist, df = 10), lty = 2, col = "red")
+> ss10 <- smooth.spline(cars[,"speed"], cars[,"dist"], df = 10)
+> lines(ss10, lty = 2, col = "red")
 > legend(5,120,c(paste("default [C.V.] => df =",round(cars.spl$df,1)),
 +                "s( * , df = 10)"), col = c("blue","red"), lty = 1:2,
 +        bg = 'bisque')
-> detach()
 > 
 > 
 > ## Residual (Tukey Anscombe) plot:
@@ -15095,13 +15608,13 @@ attr(,"class")
 > ##-- artificial example
 > y18 <- c(1:3, 5, 4, 7:3, 2*(2:5), rep(10, 4))
 > xx  <- seq(1, length(y18), len = 201)
-> (s2  <- smooth.spline(y18)) # GCV
+> (s2   <- smooth.spline(y18)) # GCV
 Call:
 smooth.spline(x = y18)
 
 Smoothing Parameter  spar= 0.3928105  lambda= 9.672776e-05 (13 iterations)
 Equivalent Degrees of Freedom (Df): 8.494168
-Penalized Criterion: 3.59204
+Penalized Criterion (RSS): 3.59204
 GCV: 0.7155391
 > (s02  <- smooth.spline(y18, spar = 0.2))
 Call:
@@ -15109,7 +15622,7 @@ smooth.spline(x = y18, spar = 0.2)
 
 Smoothing Parameter  spar= 0.2  lambda= 3.911187e-06
 Equivalent Degrees of Freedom (Df): 15.259
-Penalized Criterion: 0.4973656
+Penalized Criterion (RSS): 0.4973656
 GCV: 1.191602
 > (s02. <- smooth.spline(y18, spar = 0.2, cv = NA))
 Call:
@@ -15117,15 +15630,27 @@ smooth.spline(x = y18, spar = 0.2, cv = NA)
 
 Smoothing Parameter  spar= 0.2  lambda= 3.911187e-06
 Equivalent Degrees of Freedom (Df): NA
-Penalized Criterion: 0.4973656
+Penalized Criterion (RSS): 0.4973656
 > plot(y18, main = deparse(s2$call), col.main = 2)
 > lines(s2, col = "gray"); lines(predict(s2, xx), col = 2)
 > lines(predict(s02, xx), col = 3); mtext(deparse(s02$call), col = 3)
 > 
+> ## Specifying 'lambda' instead of usual spar :
+> (s2. <- smooth.spline(y18, lambda = s2$lambda, tol = s2$tol))
+Call:
+smooth.spline(x = y18, lambda = s2$lambda, tol = s2$tol)
+
+Smoothing Parameter  spar= NA  lambda= 9.672776e-05
+Equivalent Degrees of Freedom (Df): 8.494168
+Penalized Criterion (RSS): 3.59204
+GCV: 0.7155391
+> 
 > ## Don't show: 
-> stopifnot(all.equal(predict(s02, xx),
-+ 		    predict(s02., xx), tolerance = 1e-15))
-> ## End Don't show
+> nD <- c("spar", "ratio", "iparms", "call"); nn <- setdiff(names(s2), nD)
+> stopifnot(all.equal(s2[nn], s2.[nn], tol = 7e-7), # seen 6.86e-8
++           all.equal(predict(s02 , xx),
++ 		    predict(s02., xx), tol = 1e-15))
+> ## End(Don't show)
 > 
 > 
 > cleanEx()
@@ -15435,7 +15960,7 @@ Warning in spline(x, y, n = 201, method = "periodic") :
 7         3       1     25
 8         3       2     13
 9         3       3     12
-> ## End Don't show
+> ## End(Don't show)
 > print(ag <- anova(glm.D93))
 Analysis of Deviance Table
 
@@ -15478,7 +16003,7 @@ treatment  2   0.0000         4     5.1291
 > flush(stderr()); flush(stdout())
 > 
 > ### Name: stepfun
-> ### Title: Step Function Class
+> ### Title: Step Functions - Creation and Class
 > ### Aliases: stepfun is.stepfun as.stepfun print.stepfun summary.stepfun
 > ###   knots
 > ### Keywords: dplot
@@ -15510,8 +16035,8 @@ Step function with continuity 'f'= 0.2 ,  3 knots at
 > unclass(sfun0)
 function (v) 
 .approxfun(x, y, v, method, yleft, yright, f)
-<bytecode: 0x1a2b948>
-<environment: 0x517d1a8>
+<bytecode: 0x434c8a8>
+<environment: 0x56d3f98>
 attr(,"call")
 stepfun(1:3, y0, f = 0)
 > ls(envir = environment(sfun0))
@@ -15548,7 +16073,7 @@ f.f1c  1.0 1.00    1 2.00  2.0 2.00    2 4.00  4.0  4.00     4  3.00   3.0
 > require(graphics)
 > 
 > plot(stl(nottem, "per"))
-> plot(stl(nottem, s.window = 4, t.window = 50, t.jump = 1))
+> plot(stl(nottem, s.window = 7, t.window = 50, t.jump = 1))
 > 
 > plot(stllc <- stl(log(co2), s.window = 21))
 > summary(stllc)
@@ -15599,8 +16124,8 @@ f.f1c  1.0 1.00    1 2.00  2.0 2.00    2 4.00  4.0  4.00     4  3.00   3.0
    %  85.6         16.5      11.3         100.0 
 
  Weights:
-     Min.   1st Qu.    Median      Mean   3rd Qu.      Max. 
-0.0000000 0.5594126 0.9451991 0.7312186 0.9853375 1.0000000 
+   Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
+ 0.0000  0.5594  0.9452  0.7312  0.9853  1.0000 
 
  Other components: List of 5
  $ win  : Named num [1:3] 721 19 13
@@ -15728,7 +16253,7 @@ N:P          4  399.3    99.8
 > 
 > ## Don't show: 
 > utils::example("lm", echo = FALSE)
-> ## End Don't show
+> ## End(Don't show)
 > ##-- Continuing the  lm(.) example:
 > coef(lm.D90)  # the bare coefficients
 groupCtl groupTrt 
@@ -16268,23 +16793,10 @@ Loading required package: splines
 > termplot(model, partial.resid = TRUE, smooth = panel.smooth, span.smth = 1/4)
 > if(!had.splines && rs) detach("package:splines")
 > 
-> if (require(MASS)) {
-+     hills.lm <- lm(log(time) ~ log(climb)+log(dist), data=hills)
-+     termplot(hills.lm, partial.resid = TRUE, smooth = panel.smooth,
-+              terms = "log(dist)", main = "Original")
-+     termplot(hills.lm, transform.x = TRUE, partial.resid = TRUE,
-+ 	     terms = "log(dist)", main = "Transformed",
-+ 	     smooth=panel.smooth)
-+ }
-Loading required package: MASS
-> 
 > 
 > 
 > graphics::par(get("par.postscript", pos = 'CheckExEnv'))
 > cleanEx()
-
-detaching ‘package:MASS’
-
 > nameEx("terms.object")
 > ### * terms.object
 > 
@@ -16926,22 +17438,22 @@ assertCondition: caught “error”
 > curve(sinc, -6,18); abline(h=0,v=0, lty=3, col=adjustcolor("gray", 0.8))
 > ## Don't show: 
 > tools::assertWarning(
-+ ## End Don't show
++ ## End(Don't show)
 + uniroot(sinc, c(0,5), extendInt="yes", maxiter=4) #-> "just" a warning
 + ## Don't show: 
 +  , verbose=TRUE)
 Asserted warning: _NOT_ converged in 4 iterations
-> ## End Don't show
+> ## End(Don't show)
 > 
 > ## now with  check.conv=TRUE, must signal a convergence error :
 > ## Don't show: 
 > tools::assertError(
-+ ## End Don't show
++ ## End(Don't show)
 + uniroot(sinc, c(0,5), extendInt="yes", maxiter=4, check.conv=TRUE)
 + ## Don't show: 
 +  , verbose=TRUE)
 Asserted error: _NOT_ converged in 4 iterations
-> ## End Don't show
+> ## End(Don't show)
 > 
 > ### Weibull cumulative hazard (example origin, Ravi Varadhan):
 > cumhaz <- function(t, a, b) b * (t/b)^a
@@ -16967,12 +17479,12 @@ Asserted error: _NOT_ converged in 4 iterations
 > ## An error if 'extendInt' assumes "wrong zero-crossing direction":
 > ## Don't show: 
 > tools::assertError(
-+ ## End Don't show
++ ## End(Don't show)
 + uniroot(froot, u= 0.99, a=a, b=b, interval= c(0.1, 10), extendInt="down")
 + ## Don't show: 
 +  , verbose=TRUE)
 Asserted error: no sign change found in 1000 iterations
-> ## End Don't show
+> ## End(Don't show)
 > 
 > 
 > 
@@ -17061,6 +17573,8 @@ lm(formula = weight ~ group - 1)
 y ~ x + x2
 > update(y ~ x, log(.) ~ . ) #> log(y) ~ x
 log(y) ~ x
+> update(. ~ u+v, res  ~ . ) #> res ~ u + v
+res ~ u + v
 > 
 > 
 > 
@@ -17206,7 +17720,7 @@ $rotmat
 > ## following on from example(lm)
 > ## Don't show: 
 > utils::example("lm", echo = FALSE)
-> ## End Don't show
+> ## End(Don't show)
 > all.equal(weighted.residuals(lm.D9),
 +           residuals(lm.D9))
 [1] TRUE
@@ -17685,8 +18199,55 @@ Number of factors: 3
 Test for independence of all factors:
 	Chisq = 2000.3, df = 16, p-value = 0
 > 
+> ## with NA's
+> DN <- DF; DN[cbind(6:9, c(1:2,4,1))] <- NA; DN
+      Admit Gender Dept Freq
+1  Admitted   Male    A  512
+2  Rejected   Male    A  313
+3  Admitted Female    A   89
+4  Rejected Female    A   19
+5  Admitted   Male    B  353
+6      <NA>   Male    B  207
+7  Admitted   <NA>    B   17
+8  Rejected Female    B   NA
+9      <NA>   Male    C  120
+10 Rejected   Male    C  205
+11 Admitted Female    C  202
+12 Rejected Female    C  391
+13 Admitted   Male    D  138
+14 Rejected   Male    D  279
+15 Admitted Female    D  131
+16 Rejected Female    D  244
+17 Admitted   Male    E   53
+18 Rejected   Male    E  138
+19 Admitted Female    E   94
+20 Rejected Female    E  299
+21 Admitted   Male    F   22
+22 Rejected   Male    F  351
+23 Admitted Female    F   24
+24 Rejected Female    F  317
+> tools::assertError(# 'na.fail' should fail :
++      xtabs(Freq ~ Gender + Admit, DN, na.action=na.fail))
+> xtabs(Freq ~ Gender + Admit, DN)
+        Admit
+Gender   Admitted Rejected
+  Male       1078     1286
+  Female      540     1270
+> xtabs(Freq ~ Gender + Admit, DN, na.action = na.pass)
+        Admit
+Gender   Admitted Rejected
+  Male       1078     1286
+  Female      540         
+> ## The Female:Rejected combination has NA 'Freq' (and NA prints 'invisibly' as "")
+> xtabs(Freq ~ Gender + Admit, DN, addNA = TRUE) # ==> count NAs
+        Admit
+Gender   Admitted Rejected <NA>
+  Male       1078     1286  327
+  Female      540             0
+  <NA>         17        0    0
+> 
 > ## Create a nice display for the warp break data.
-> warpbreaks$replicate <- rep(1:9, len = 54)
+> warpbreaks$replicate <- rep_len(1:9, 54)
 > ftable(xtabs(breaks ~ wool + tension + replicate, data = warpbreaks))
              replicate  1  2  3  4  5  6  7  8  9
 wool tension                                     
@@ -17799,7 +18360,7 @@ Number of Fisher Scoring iterations: 6
 > ###
 > options(digits = 7L)
 > base::cat("Time elapsed: ", proc.time() - base::get("ptime", pos = 'CheckExEnv'),"\n")
-Time elapsed:  5.017 0.132 5.174 0 0 
+Time elapsed:  5.008 0.098 5.123 0 0 
 > grDevices::dev.off()
 null device 
           1 
diff --git a/tests/Examples/stats4-Ex.Rout.save b/tests/Examples/stats4-Ex.Rout.save
index 8703f73..8dad99a 100644
--- a/tests/Examples/stats4-Ex.Rout.save
+++ b/tests/Examples/stats4-Ex.Rout.save
@@ -1,7 +1,7 @@
 
-R version 3.1.2 RC (2014-10-29 r66897) -- "Pumpkin Helmet"
-Copyright (C) 2014 The R Foundation for Statistical Computing
-Platform: x86_64-unknown-linux-gnu (64-bit)
+R version 3.4.0 RC (2017-04-18 r72543) -- "You Stupid Darkness"
+Copyright (C) 2017 The R Foundation for Statistical Computing
+Platform: x86_64-pc-linux-gnu (64-bit)
 
 R is free software and comes with ABSOLUTELY NO WARRANTY.
 You are welcome to redistribute it under certain conditions.
@@ -184,7 +184,7 @@ Coefficients:
 > ###
 > options(digits = 7L)
 > base::cat("Time elapsed: ", proc.time() - base::get("ptime", pos = 'CheckExEnv'),"\n")
-Time elapsed:  0.367 0.002 0.37 0 0 
+Time elapsed:  0.415 0 0.416 0 0 
 > grDevices::dev.off()
 null device 
           1 
diff --git a/tests/Examples/tools-Ex.Rout.save b/tests/Examples/tools-Ex.Rout.save
index ed11aa4..459d7fc 100644
--- a/tests/Examples/tools-Ex.Rout.save
+++ b/tests/Examples/tools-Ex.Rout.save
@@ -1,7 +1,7 @@
 
-R version 3.1.2 RC (2014-10-29 r66897) -- "Pumpkin Helmet"
-Copyright (C) 2014 The R Foundation for Statistical Computing
-Platform: x86_64-unknown-linux-gnu (64-bit)
+R version 3.4.0 RC (2017-04-18 r72543) -- "You Stupid Darkness"
+Copyright (C) 2017 The R Foundation for Statistical Computing
+Platform: x86_64-pc-linux-gnu (64-bit)
 
 R is free software and comes with ABSOLUTELY NO WARRANTY.
 You are welcome to redistribute it under certain conditions.
@@ -24,6 +24,20 @@ Type 'q()' to quit R.
 > 
 > base::assign(".oldSearch", base::search(), pos = 'CheckExEnv')
 > cleanEx()
+> nameEx("CRANtools")
+> ### * CRANtools
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: CRANtools
+> ### Title: CRAN Package Repository Tools
+> ### Aliases: CRAN_package_db CRAN_check_results CRAN_check_details
+> ###   CRAN_memtest_notes summarize_CRAN_check_status
+> 
+> ### ** Examples
+> 
+> 
+> cleanEx()
 > nameEx("HTMLheader")
 > ### * HTMLheader
 > 
@@ -37,17 +51,18 @@ Type 'q()' to quit R.
 > ### ** Examples
 > 
 > cat(HTMLheader("This is a sample header"), sep="\n")
-<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-<html><head><title>R: This is a sample header</title>
-<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
-<link rel="stylesheet" type="text/css" href="/doc/html/R.css">
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head><title>R: This is a sample header</title>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+<link rel="stylesheet" type="text/css" href="/doc/html/R.css" />
 </head><body>
 <h1> This is a sample header
-<img class="toplogo" src="/doc/html/logo.jpg" alt="[R logo]">
+<img class="toplogo" src="/doc/html/Rlogo.svg" alt="[R logo]" />
 </h1>
-<hr>
-<div align="center">
-<a href="/doc/html/index.html"><img src="/doc/html/up.jpg" alt="[Top]" width="30" height="30" border="0"></a>
+<hr/>
+<div style="text-align: center;">
+<a href="/doc/html/index.html"><img class="arrow" src="/doc/html/up.jpg" alt="[Top]" /></a>
 </div>
 > 
 > 
@@ -166,7 +181,7 @@ Error in assertWarning(ff()) :
 > 
 > ## Don't show: 
 > options(useFancyQuotes = FALSE)
-> ## End Don't show
+> ## End(Don't show)
 > refs <-
 + c(bibentry(bibtype = "manual",
 +     title = "R: A Language and Environment for Statistical Computing",
@@ -174,7 +189,7 @@ Error in assertWarning(ff()) :
 +     organization = "R Foundation for Statistical Computing",
 +     address = "Vienna, Austria",
 +     year = 2013,
-+     url = "http://www.R-project.org"),
++     url = "https://www.R-project.org"),
 +   bibentry(bibtype = "article",
 +     author = c(person(c("George", "E.", "P."), "Box"),
 +                person(c("David",  "R."),      "Cox")),
@@ -187,11 +202,11 @@ Error in assertWarning(ff()) :
 > bibstyle("unsorted", sortKeys = function(refs) seq_along(refs),
 +     fmtPrefix = function(paper) paste0("[", paper$.index, "]"),
 +        .init = TRUE)
-<environment: 0x30221d0>
+<environment: 0x3620938>
 > print(refs, .bibstyle = "unsorted")
 [1] R Core Team (2013). _R: A Language and Environment for Statistical
 Computing_. R Foundation for Statistical Computing, Vienna, Austria.
-<URL: http://www.R-project.org>.
+<URL: https://www.R-project.org>.
 
 [2] Box GEP and Cox DR (1964). "An Analysis of Transformations."
 _Journal of the Royal Statistical Society, Series B_, *26*, pp.
@@ -427,6 +442,43 @@ _Journal of the Royal Statistical Society, Series B_, *26*, pp.
 > 
 > 
 > cleanEx()
+> nameEx("check_packages_in_dir")
+> ### * check_packages_in_dir
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: check_packages_in_dir
+> ### Title: Check Source Packages and Their Reverse Dependencies
+> ### Aliases: check_packages_in_dir summarize_check_packages_in_dir_depends
+> ###   summarize_check_packages_in_dir_results
+> ###   summarize_check_packages_in_dir_timings check_packages_in_dir_changes
+> ###   check_packages_in_dir_details
+> ### Keywords: utilities
+> 
+> ### ** Examples
+> 
+> ## Not run: 
+> ##D ## Check packages in dir without reverse dependencies:
+> ##D check_packages_in_dir(dir)
+> ##D ## Check packages in dir and their reverse dependencies using the
+> ##D ## defaults (all repositories in getOption("repos"), all "strong"
+> ##D ## reverse dependencies, no recursive reverse dependencies):
+> ##D check_packages_in_dir(dir, reverse = list())
+> ##D ## Check packages in dir with their reverse dependencies from CRAN,
+> ##D ## using all strong reverse dependencies and reverse suggests:
+> ##D check_packages_in_dir(dir,
+> ##D                       reverse = list(repos = getOption("repos")["CRAN"],
+> ##D                                      which = "most"))                   
+> ##D ## Check packages in dir with their reverse dependencies from CRAN,
+> ##D ## using '--as-cran' for the former but not the latter:
+> ##D check_packages_in_dir(dir,
+> ##D                       check_args = c("--as-cran", ""),
+> ##D                       reverse = list(repos = getOption("repos")["CRAN"]))
+> ## End(Not run)
+> 
+> 
+> 
+> cleanEx()
 > nameEx("delimMatch")
 > ### * delimMatch
 > 
@@ -464,12 +516,6 @@ attr(,"match.length")
 > 
 > ### ** Examples
 > 
-> ## there are few dependencies in a vanilla R installation:
-> ## lattice may not be installed
-> dependsOnPkgs("lattice")
-[1] "Matrix" "nlme"   "mgcv"  
-> 
-> 
 > 
 > cleanEx()
 > nameEx("encoded")
@@ -560,48 +606,30 @@ attr(,"match.length")
 > 
 > 
 > cleanEx()
-> nameEx("getDepList")
-> ### * getDepList
+> nameEx("getVignetteInfo")
+> ### * getVignetteInfo
 > 
 > flush(stderr()); flush(stdout())
 > 
-> ### Name: getDepList
-> ### Title: Functions to Retrieve Dependency Information
-> ### Aliases: getDepList pkgDepends
-> ### Keywords: utilities
+> ### Name: getVignetteInfo
+> ### Title: Get information on installed vignettes.
+> ### Aliases: getVignetteInfo
+> ### Keywords: utilities documentation
 > 
 > ### ** Examples
 > 
-> pkgDepends("tools", local = FALSE)
-$Depends
-character(0)
-
-$Installed
-character(0)
-
-$Found
-list()
-
-$NotFound
-character(0)
-
-$R
-character(0)
-
-attr(,"class")
-[1] "DependsList" "list"       
 > 
 > 
 > 
 > cleanEx()
-> nameEx("getVignetteInfo")
-> ### * getVignetteInfo
+> nameEx("loadRdMacros")
+> ### * loadRdMacros
 > 
 > flush(stderr()); flush(stdout())
 > 
-> ### Name: getVignetteInfo
-> ### Title: Get information on installed vignettes.
-> ### Aliases: getVignetteInfo
+> ### Name: loadRdMacros
+> ### Title: Load user-defined Rd help system macros.
+> ### Aliases: loadRdMacros loadPkgRdMacros
 > ### Keywords: utilities documentation
 > 
 > ### ** Examples
@@ -610,25 +638,24 @@ attr(,"class")
 > 
 > 
 > cleanEx()
-> nameEx("installFoundDepends")
-> ### * installFoundDepends
+> nameEx("makevars")
+> ### * makevars
 > 
 > flush(stderr()); flush(stdout())
 > 
-> ### Name: installFoundDepends
-> ### Title: A function to install unresolved dependencies
-> ### Aliases: installFoundDepends
+> ### Name: makevars
+> ### Title: User and Site Compilation Variables
+> ### Aliases: makevars_user makevars_site
 > ### Keywords: utilities
 > 
 > ### ** Examples
-> 
-> ## Set up a temporary directory to install packages to
-> tmp <- tempfile()
-> dir.create(tmp)
-> 
-> pDL <- pkgDepends("tools", local = FALSE)
-> installFoundDepends(pDL$Found, destdir = tmp)
-NULL
+> ## Don't show: 
+> checkMV <- function(r)
++   stopifnot(is.character(r),
++             length(r) == 0 || (length(r) == 1 && file.exists(r)))
+> checkMV(makevars_user())
+> checkMV(makevars_site())
+> ## End(Don't show)
 > 
 > 
 > 
@@ -663,16 +690,52 @@ NULL
 > 
 > ### ** Examples
 > 
+> 
+> 
+> 
+> cleanEx()
+> nameEx("package_native_routine_registration_skeleton")
+> ### * package_native_routine_registration_skeleton
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: package_native_routine_registration_skeleton
+> ### Title: Write Skeleton for Adding Native Routine Registration to a
+> ###   Package
+> ### Aliases: package_native_routine_registration_skeleton
+> 
+> ### ** Examples
 > ## Not run: 
-> ##D pdb <- available.packages()
-> ##D deps <- package_dependencies(packages = "MASS", pdb,
-> ##D                     which = c("Depends", "Imports", "LinkingTo", "Suggests"),
-> ##D                     recursive = TRUE, reverse = TRUE)
-> ##D length(deps$MASS)
+> ##D ## with a completed splines/DESCRIPTION file,
+> ##D tools::package_native_routine_registration_skeleton('splines',,,FALSE)
+> ##D ## produces
+> ##D #include <R.h>
+> ##D #include <Rinternals.h>
+> ##D #include <stdlib.h> // for NULL
+> ##D #include <R_ext/Rdynload.h>
+> ##D 
+> ##D /* FIXME: 
+> ##D    Check these declarations against the C/Fortran source code.
+> ##D */
+> ##D 
+> ##D /* .Call calls */
+> ##D extern SEXP spline_basis(SEXP, SEXP, SEXP, SEXP);
+> ##D extern SEXP spline_value(SEXP, SEXP, SEXP, SEXP, SEXP);
+> ##D 
+> ##D static const R_CallMethodDef CallEntries[] = {
+> ##D     {"spline_basis", (DL_FUNC) &spline_basis, 4},
+> ##D     {"spline_value", (DL_FUNC) &spline_value, 5},
+> ##D     {NULL, NULL, 0}
+> ##D };
+> ##D 
+> ##D void R_init_splines(DllInfo *dll)
+> ##D {
+> ##D     R_registerRoutines(dll, NULL, CallEntries, NULL, NULL);
+> ##D     R_useDynamicSymbols(dll, FALSE);
+> ##D }
 > ## End(Not run)
 > 
 > 
-> 
 > cleanEx()
 > nameEx("parseLatex")
 > ### * parseLatex
@@ -777,52 +840,53 @@ function (x, ...)
 > ### ** Examples
 > 
 > cat(toHTML(demo(package = "base")), sep = "\n")
-<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-<html><head><title>R: R</title>
-<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
-<link rel="stylesheet" type="text/css" href="/doc/html/R.css">
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head><title>R: R</title>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+<link rel="stylesheet" type="text/css" href="/doc/html/R.css" />
 </head><body>
 <h1> R
-<img class="toplogo" src="/doc/html/logo.jpg" alt="[R logo]">
+<img class="toplogo" src="/doc/html/Rlogo.svg" alt="[R logo]" />
 </h1>
-<hr>
-<div align="center">
-<a href="/doc/html/index.html"><img src="/doc/html/up.jpg" alt="[Top]" width="30" height="30" border="0"></a>
+<hr/>
+<div style="text-align: center;">
+<a href="/doc/html/index.html"><img class="arrow" src="/doc/html/up.jpg" alt="[Top]" /></a>
 </div>
 <h2>Demos in package ‘base’</h2>
 <table cols="2" width="100%">
 <tr>
- <td align="left" valign="top" width="10%">
+ <td style="text-align: left; vertical-align: top; width: 10%;">
 error.catching
  </td>
- <td align="left" valign="top" width="90%">
+ <td style="text-align: left; vertical-align: top; width: 90%;">
 More examples on catching and handling errors
  </td>
 </tr>
 
 <tr>
- <td align="left" valign="top" width="10%">
+ <td style="text-align: left; vertical-align: top; width: 10%;">
 is.things
  </td>
- <td align="left" valign="top" width="90%">
+ <td style="text-align: left; vertical-align: top; width: 90%;">
 Explore some properties of R objects and is.FOO() functions. Not for newbies!
  </td>
 </tr>
 
 <tr>
- <td align="left" valign="top" width="10%">
+ <td style="text-align: left; vertical-align: top; width: 10%;">
 recursion
  </td>
- <td align="left" valign="top" width="90%">
+ <td style="text-align: left; vertical-align: top; width: 90%;">
 Using recursion for adaptive integration
  </td>
 </tr>
 
 <tr>
- <td align="left" valign="top" width="10%">
+ <td style="text-align: left; vertical-align: top; width: 10%;">
 scoping
  </td>
- <td align="left" valign="top" width="90%">
+ <td style="text-align: left; vertical-align: top; width: 90%;">
 An illustration of lexical scoping.
  </td>
 </tr>
@@ -864,28 +928,6 @@ An illustration of lexical scoping.
 > 
 > ### ** Examples
 > 
-> ## This may not be installed
-> gridEx <- system.file("doc", "grid.Rnw", package = "grid")
-> vignetteDepends(gridEx)
-$Depends
-[1] "lattice"
-
-$Installed
-[1] "lattice"
-
-$Found
-list()
-
-$NotFound
-character(0)
-
-$R
-[1] "R (>= 2.15.1)"
-
-attr(,"class")
-[1] "DependsList" "list"       
-> 
-> 
 > 
 > cleanEx()
 > nameEx("vignetteEngine")
@@ -955,7 +997,7 @@ List of 6
 > ###
 > options(digits = 7L)
 > base::cat("Time elapsed: ", proc.time() - base::get("ptime", pos = 'CheckExEnv'),"\n")
-Time elapsed:  0.204 0.004 0.208 0 0 
+Time elapsed:  0.26 0.004 0.264 0 0 
 > grDevices::dev.off()
 null device 
           1 
diff --git a/tests/Makefile.common b/tests/Makefile.common
index e2924b8..ccd4068 100644
--- a/tests/Makefile.common
+++ b/tests/Makefile.common
@@ -2,6 +2,7 @@
 #
 # ${R_HOME}/tests/Makefile.common
 
+## If you add test scripts here, review  ../src/library/tools/R/testing.R
 
 test-src-gct = \
 	eval-etc.R \
@@ -11,7 +12,6 @@ test-src-gct = \
 	lm-tests.R \
 	ok-errors.R \
 	method-dispatch.R \
-	array-subset.R \
 	any-all.R
 test-src-strict-1 = \
 	$(test-src-gct) \
@@ -36,19 +36,25 @@ test-src = $(test-src-strict) $(test-src-sloppy)
 test-src-dt = datetime2.R
 test-src-demo = demos.R demos2.R
 test-src-internet = internet.R
+test-src-internet2 = internet2.R libcurl.R
+test-src-CRANtools = CRANtools.R
 test-src-isas = isas-tests.R
 test-src-primitive = primitives.R
 test-src-random = p-r-random-tests.R
-test-src-regexp = utf8-regex.R
+test-src-regexp = utf8-regex.R PCRE.R
 test-src-segfault = no-segfault.R
 
-test-src-reg-1 = reg-tests-1a.R reg-tests-1b.R reg-tests-1c.R reg-tests-2.R \
-  reg-examples1.R reg-examples2.R reg-packages.R \
-  reg-IO.R reg-IO2.R reg-plot.R reg-S4.R reg-BLAS.R
-## overridden by Makefile.win
+test-src-reg-1 = array-subset.R \
+  reg-tests-1a.R reg-tests-1b.R reg-tests-1c.R reg-tests-1d.R reg-tests-2.R \
+  reg-examples1.R reg-examples2.R reg-packages.R p-qbeta-strict-tst.R \
+  r-strict-tst.R \
+  reg-IO.R reg-IO2.R reg-plot.R reg-S4-examples.R reg-BLAS.R
+## added to in Makefile.win
 test-src-reg-1e =
 test-src-reg = $(test-src-reg-1) $(test-src-reg-1e)
-test-src-reg3 = reg-tests-3.R reg-examples3.R reg-plot-latin1.R
+## overridden in Makefile if recommended packages are not installed.
+## reg-S4 has to be a sloppy test, as output differs if Matrix is absent.
+test-src-reg3 = reg-tests-3.R reg-examples3.R reg-plot-latin1.R reg-S4.R 
 
 test-out-strict = $(test-src-strict:.R=.Rout)
 test-out-sloppy = $(test-src-sloppy:.R=.Rout)
@@ -56,9 +62,11 @@ test-out-sloppy = $(test-src-sloppy:.R=.Rout)
 test-out-gct = $(test-src-gct:.R=.Rout-gct)
 test-out-valgct = $(test-src-gct:.R=.Rout-valgct)
 
+test-out-CRANtools = $(test-src-CRANtools:.R=.Rout)
 test-out-dt = $(test-src-dt:.R=.Rout)
 test-out-demo = $(test-src-demo:.R=.Rout)
 test-out-internet = $(test-src-internet:.R=.Rout)
+test-out-internet2 = $(test-src-internet2:.R=.Rout)
 test-out-isas = $(test-src-isas:.R=.Rout)
 test-out-primitive = $(test-src-primitive:.R=.Rout)
 test-out-random = $(test-src-random:.R=.Rout)
@@ -71,8 +79,9 @@ test-out-segfault = $(test-src-segfault:.R=.Rout)
 test-out = $(test-src:.R=.Rout) $(test-out-demo) $(test-out-gct) \
 	$(test-out-internet) \
 	$(test-out-random) $(test-out-reg) $(test-out-reg3) \
-	$(test-out-segfault) $(test-out-isas) \
-	$(test-out-primitive) utf8-regex.Rout
+	$(test-out-segfault) $(test-out-isas) $(test-out-internet2) \
+	$(test-out-CRANtools) $(test-out-primitive) $(test-out-dt) \
+	utf8-regex.Rout PCRE.Rout
 
 .SUFFIXES:
 .SUFFIXES: .R .Rin .Rout .Rout-gct .Rout-valgct .trin .tsin .log
@@ -149,14 +158,18 @@ R-valgrind = $(R) --debugger="valgrind --tool=memcheck"
 	  cat $< $(srcdir)/gct-foot.R) | $(R-valgrind) > $@ 2>&1
 	grep "==[0-9]*==" $@
 
+## The definitions for Internet are in Makefile.{in,win}.
+## (That's historical: they are currently the same.)
 all-basic-tests = Examples Specific Reg Internet
 test-all-basics:
 	@for name in $(all-basic-tests); do \
 	  $(MK) test-$${name} || exit 1; \
 	done
 
+## if you change this, also edit Makefile.install
+## The definitions for Standalone are in Makefile.{in,win}.
 all-devel-tests = DateTime Docs IsAs Random Demo Primitive Regexp \
-    Segfault Standalone Packages
+    Internet2 CRANtools Segfault Standalone Packages
 test-all-devel:
 	@for name in $(all-devel-tests); do \
 	  $(MK) test-$${name} || exit 1; \
@@ -183,12 +196,13 @@ test-Packages:
 	  $(MK) test-Packages1; \
 	fi
 
+## R_PKGS_BASE is from ../share/make/vars.mk
 test-Packages1:
 	@for p in $(R_PKGS_BASE); do \
 	  $(ECHO) "checking package '$${p}'"; \
 	  _R_CHECK_FF_CALLS_=registration \
-	  $(top_builddir)/bin/R CMD check --install=skip \
-	    --no-build-vignettes \
+	  _R_CHECK_CODE_USAGE_WITH_ONLY_BASE_ATTACHED_=true \
+	  $(top_builddir)/bin/R CMD check --install=skip --no-build-vignettes \
 	    $(top_srcdir)/src/library/$${p} || $(ECHO); \
 	done
 
@@ -206,7 +220,8 @@ stamp-Packages: $(PKG_OBJECTS)
 	@$(ECHO) "begin checking package '`basename $@ .log`'"
 	@rm -f $@
 	@_R_CHECK_FF_CALLS_=registration \
-	$(top_builddir)/bin/R CMD check --install=skip --no-build-vignettes \
+	  _R_CHECK_CODE_USAGE_WITH_ONLY_BASE_ATTACHED_=true \
+	  $(top_builddir)/bin/R CMD check --install=skip --no-build-vignettes \
 	  $(top_srcdir)/src/library/`basename $@ .log` > $@ 2>&1
 	@cat $@
 
@@ -237,6 +252,15 @@ test-IsAs:
 	@$(ECHO) "running tests of consistency of as/is.*"
 	@$(MK) $(test-out-isas) RVAL_IF_DIFF=1
 
+test-Internet2:
+	@$(ECHO) "running more Internet and socket tests"
+	@$(MK) $(test-out-internet2) RVAL_IF_DIFF=0
+
+test-CRANtools:
+	@$(ECHO) "running tests of CRAN tools"
+	@$(ECHO) "  (can be slow unless mirror is local)"
+	@$(MK) $(test-out-CRANtools) RVAL_IF_DIFF=0
+
 test-Primitive:
 	@$(ECHO) "running tests of primitives"
 	@$(MK) $(test-out-primitive) RVAL_IF_DIFF=0
@@ -257,6 +281,7 @@ test-Reg:
 test-Regexp:
 	@$(ECHO) "running regexp regression tests"
 	@$(R2) < $(srcdir)/utf8-regex.R > utf8-regex.Rout 2>&1 || (mv utf8-regex.Rout utf8-regex.Rout.fail && exit 1)
+	@$(R2) < $(srcdir)/PCRE.R > PCRE.Rout 2>&1 || (mv PCRE.Rout PCRE.Rout.fail && exit 1)
 
 test-Segfault:
 	@$(ECHO) "running tests to possibly trigger segfaults"
@@ -434,13 +459,13 @@ INSTFILES = README \
 	$(test-src-auto:.R=.Rin) isas-tests.Rout.save \
 	$(test-src-dt) datetime2.Rout.save \
 	$(test-src-demo) demos.Rout.save \
-	$(test-src-internet) internet.Rout.save \
+	$(test-src-internet) $(test-src-internet2) internet.Rout.save \
 	$(test-src-primitive) \
 	$(test-src-random) p-r-random-tests.Rout.save \
 	$(test-src-reg) $(test-src-reg3) \
 	  reg-S4.Rout.save \
-	  reg-IO.Rout.save reg-IO2.Rout.save reg-plot.Rout.save \
+	  reg-IO.Rout.save reg-IO2.Rout.save \
 	  reg-plot.pdf.save reg-tests-2.Rout.save reg-tests-3.Rout.save \
 	  reg-examples3.Rout.save reg-plot-latin1.pdf.save \
-	  encodings.R utf8-regex.R \
+	  encodings.R utf8-regex.R PCRE.R CRANtools.R \
 	  nanbug.rda WinUnicode.dat arima.rda EmbeddedNuls.csv
diff --git a/tests/Makefile.in b/tests/Makefile.in
index 89b719b..d259822 100644
--- a/tests/Makefile.in
+++ b/tests/Makefile.in
@@ -10,14 +10,16 @@ subdir = tests
 
 all check: test-all-basics
 check-devel: check test-all-devel
-check-all: check-devel test-Packages-Recommended
-check-recommended: test-Packages-Recommended
+check-all: check-devel check-recommended
+ at USE_RECOMMENDED_PACKAGES_TRUE@check-recommended: test-Packages-Recommended
+ at USE_RECOMMENDED_PACKAGES_FALSE@check-recommended:
+ at USE_RECOMMENDED_PACKAGES_FALSE@	@$(ECHO) "Recommended packages are not installed so cannot be tested"
 
 
 include $(top_builddir)/Makeconf
 include $(srcdir)/Makefile.common
 
- at USE_RECOMMENDED_PACKAGES_FALSE@test-src-reg3 = reg-plot-latin1.R
+ at USE_RECOMMENDED_PACKAGES_FALSE@test-src-reg3 = reg-plot-latin1.R reg-S4.R
 
 
 distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
@@ -51,6 +53,7 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 test-system2: $(srcdir)/test-system2.c
 	@$(MAIN_LD) -o $@ $(srcdir)/test-system2.c
 
+## Not run by any other target
 test-System: test-system2
 	-@$(MAKE) test-system.Rout
 
@@ -59,8 +62,7 @@ test-System: test-system2
 ## These depend on an internet connection, and the sites being up.
 ## So allow this to fail: it may be slow doing so.
 test-Internet:
-	@$(ECHO) "running tests of Internet and socket functions"
-	@$(ECHO) "  expect some differences"
+	@$(ECHO) "running tests of Internet functions"
 	-@$(MAKE) $(test-out-internet) RVAL_IF_DIFF=0
 ## </NOTE>
 
@@ -83,7 +85,8 @@ clean:
 	  reg-examples-*.pdf testCID.* \
 	  reg-plot-latin1.ps reg-plot.ps \
 	  reg-plot-latin1.pdf reg-plot.pdf reg-tests-*.pdf \
-	  R-exts.* R-intro.R R-intro.Rout
+	  R-exts.* R-intro.R no-segfault.R R-intro.Rout \
+	  p-qbeta-strict-tst.pdf
 	- at rm -f FALSE* PACKAGES* .R .tex mirrors.html ./-package.Rd ex.gz
 	- at rm -f testit.txt testit.html testit.tex testit-Ex.R
 	- at rm -f ver20.txt ver20.html ver20.tex ver20-Ex.R
@@ -91,6 +94,7 @@ clean:
 	- at rm -f *.tar.gz
 	- at rm -f keepsource.tex test-system2 test-system.Rout
 	- at rm -f *.log *.tsin *.trin
+	- at rm -f df0.Rd l0.Rd m0.Rd 'integer(0)-package.Rd'
 
 distclean: clean
 	- at for d in $(SUBDIRS); do \
@@ -98,6 +102,8 @@ distclean: clean
 	done
 	- at rm -f Makefile $(test-out) $(test-src-auto) .RData
 	- at rm -rf *.Rcheck RecPackages
+	- at rm -f *.fail
+
 maintainer-clean: distclean
 
 R install install-strip uninstall TAGS info dvi:
diff --git a/tests/Makefile.install b/tests/Makefile.install
index 0be37f6..48ee0f4 100644
--- a/tests/Makefile.install
+++ b/tests/Makefile.install
@@ -20,21 +20,26 @@ R = LANGUAGE=en LC_ALL=C SRCDIR=$(srcdir) R_DEFAULT_PACKAGES= $(top_builddir)/bi
 R2 = R_DEFAULT_PACKAGES= $(top_builddir)/bin/R --vanilla
 R3 = $(top_builddir)/bin/R CMD check
 RDIFF = $(top_builddir)/bin/R CMD Rdiff
-RDCONV = $(top_builddir)/bin/R CMD Rdconv
+RDCONV = LC_CTYPE=C $(top_builddir)/bin/R CMD Rdconv
 MK = $(MAKE)
 
 all-basic-tests = BasePackages Specific Reg Internet
-## not Docs Standalone
-all-devel-tests = IsAs Random Demo Primitive Regexp Segfault
+## Keep in line with Makefile.common.
+## not Docs Standalone Packages
+all-devel-tests = DateTime IsAs Random Demo Primitive Regexp Internet2 CRANtools Segfault
 
 
 ## <NOTE>
 ## These depend on an internet connection, and the sites being up.
 ## So allow this to fail: it may be slow doing so.
 test-Internet:
-	@$(ECHO) "running tests of Internet and socket functions"
+	@$(ECHO) "running tests of Internet functions"
 	@$(ECHO) "  expect some differences"
 	-@$(MAKE) $(test-out-internet) RVAL_IF_DIFF=0
+
+test-Internet2:
+	@$(ECHO) "running more Internet and socket tests"
+	-@$(MK) $(test-out-internet2) RVAL_IF_DIFF=0
 ## </NOTE>
 
 test-BasePackages:
diff --git a/tests/Makefile.win b/tests/Makefile.win
index 202fc0a..4fc40c8 100644
--- a/tests/Makefile.win
+++ b/tests/Makefile.win
@@ -39,25 +39,18 @@ all check test-all-basics test-all-devel: Makefile.win Makefile.common
 
 test-system2.exe: test-system2.c
 
+## Not run by any other target
 test-System: test-system2.exe
 	@$(MK) test-system.Rout
 
-
-internet.Rout2:
-	-@$(R) --internet2 < internet.R > internet.Rout2 2>&1 || \
-	  echo " testing --internet2 failed"
-
 ## <NOTE>
 ## These depend on an internet connection, and the sites being up.
 ## So allow this to fail: it may be slow doing so.
 test-Internet:
-	@$(RM) -f internet.Rout internet.Rout2
-	@$(ECHO) "running tests of Internet and socket functions"
-	@$(ECHO) "  expect some differences"
-	-@$(MK) $(test-out-internet) RVAL_IF_DIFF=0 || \
-	  $(ECHO) " testing standard internet connectivity failed"
-	@$(MK) internet.Rout2 RVAL_IF_DIFF=0
-	- at diff internet.Rout internet.Rout2
+	@$(RM) -f internet.Rout
+	@$(ECHO) "running tests of Internet functions"
+	-@$(MK) $(test-out-internet) RVAL_IF_DIFF=0
+## </NOTE>
 
 test-Standalone:
 	@echo "testing building standalone Rmath"
@@ -65,12 +58,13 @@ test-Standalone:
 
 
 clean:
-	@rm -f *.Rout *.Rout.fail internet.Rout2 \
+	@rm -f *.Rout *.Rout.fail \
 	  Rplot* Rprof.out Rprofmem.out \
 	  reg-examples-*.pdf  testCID.* \
 	  reg-plot-latin1.ps reg-plot.ps \
 	  reg-plot-latin1.pdf reg-plot.pdf reg-tests-*.pdf \
-	  R-exts.* R-intro.R 
+	  R-exts.* R-intro.R no-segfault.R R-intro.Rout \
+	  p-qbeta-strict-tst.pdf
 	@rm -f R-exts_res.rc Makedeps
 	@rm -f FALSE* PACKAGES* .R .tex mirrors.html ./-package.Rd ex.gz
 	@rm -f testit.txt testit.html testit.tex testit-Ex.R
@@ -81,11 +75,12 @@ clean:
 	@$(MK) -C Examples $@
 	@$(MK) -C Embedding $@
 	- at rm -f *.log *.tsin *.trin
+	- at rm -f df0.Rd l0.Rd m0.Rd 'integer(0)-package.Rd'
 
 distclean: clean
 	@$(MK) -C Examples $@
 	@rm -rf *.Rcheck RecPackages
-
+	- at rm -f *.fail
 
 install-tests:
 	@for f in $(INSTFILES); do \
diff --git a/tests/PCRE.R b/tests/PCRE.R
new file mode 100644
index 0000000..9dcdebd
--- /dev/null
+++ b/tests/PCRE.R
@@ -0,0 +1,82 @@
+.ptime <- proc.time()
+
+### tests of recursion in PCRE matching
+### Based on PR16757
+
+## This is expected to throw a warning at some point if PCRE uses a stack,
+## depending on the system and stack size.
+## Typical stack 8-10M, some people use 40M.
+
+pcre_config()["stack"]
+
+op <- options(warn = 1)
+for (n in c(seq(5000L, 10000L, 1000L), 20000L, 50000L, 100000L)) {
+    print(n)
+    x <- paste0(rep("a", n), collapse="")
+    print(grepl("(a|b)+", x, perl = TRUE))
+}
+options(op)
+
+
+### tests of PCRE's JIT.
+if(!pcre_config()["JIT"]) {
+    message("These tests are pointless without JIT support")
+    q("no")
+}
+
+
+## Test from example(grep)
+
+txt2 <- c("The", "licenses", "for", "most", "software", "are",
+          "designed", "to", "take", "away", "your", "freedom",
+          "to", "share", "and", "change", "it.",
+          "", "By", "contrast,", "the", "GNU", "General", "Public", "License",
+          "is", "intended", "to", "guarantee", "your", "freedom", "to",
+          "share", "and", "change", "free", "software", "--",
+          "to", "make", "sure", "the", "software", "is",
+          "free", "for", "all", "its", "users")
+grep("[gu]", txt2, perl = TRUE)
+
+st <- function(expr) sum(system.time(expr)[1:2])
+
+## here JIT is slightly slower
+options(PCRE_study = FALSE)
+st(for(i in 1:1e4) grep("[gu]", txt2, perl = TRUE))
+options(PCRE_study = TRUE, PCRE_use_JIT = FALSE)
+st(for(i in 1:1e4) grep("[gu]", txt2, perl = TRUE))
+options(PCRE_study = TRUE, PCRE_use_JIT = TRUE)
+st(for(i in 1:1e4) grep("[gu]", txt2, perl = TRUE))
+
+
+## and for more inputs, study starts to pay off
+txt3 <- rep(txt2, 10)
+options(PCRE_study = FALSE)
+st(for(i in 1:1e3) grep("[gu]", txt3, perl = TRUE))
+options(PCRE_study = TRUE, PCRE_use_JIT = FALSE)
+st(for(i in 1:1e3) grep("[gu]", txt3, perl = TRUE))
+options(PCRE_study = TRUE, PCRE_use_JIT = TRUE)
+st(for(i in 1:1e3) grep("[gu]", txt3, perl = TRUE))
+
+
+## An example where JIT really pays off (e.g. 10x)
+pat <- "([^[:alpha:]]|a|b)+"
+long_string <- paste0(rep("a", 1023), collapse="")
+N <- 10
+options(PCRE_study = FALSE, PCRE_use_JIT = FALSE)
+st(for(i in 1:1e3) grep(pat, rep(long_string, N), perl = TRUE))
+options(PCRE_study = TRUE, PCRE_use_JIT = FALSE)
+st(for(i in 1:1e3) grep(pat, rep(long_string, N), perl = TRUE))
+options(PCRE_study = TRUE, PCRE_use_JIT = TRUE)
+st(for(i in 1:1e3) grep(pat, rep(long_string, N), perl = TRUE))
+
+
+## This needs to test 50 strings to see much gain from study
+txt <- rep("a test of capitalizing", 50)
+options(PCRE_study = FALSE, PCRE_use_JIT = FALSE)
+st(for(i in 1:1e4) gsub("(\\w)(\\w*)", "\\U\\1\\L\\2", txt, perl = TRUE))
+options(PCRE_study = TRUE, PCRE_use_JIT = FALSE)
+st(for(i in 1:1e4) gsub("(\\w)(\\w*)", "\\U\\1\\L\\2", txt, perl = TRUE))
+options(PCRE_study = TRUE, PCRE_use_JIT = TRUE)
+st(for(i in 1:1e4) gsub("(\\w)(\\w*)", "\\U\\1\\L\\2", txt, perl = TRUE))
+
+cat("Time elapsed: ", proc.time() - .ptime,"\n")
diff --git a/tests/Pkgs/exNSS4/DESCRIPTION b/tests/Pkgs/exNSS4/DESCRIPTION
index 7d57472..78ad6fb 100644
--- a/tests/Pkgs/exNSS4/DESCRIPTION
+++ b/tests/Pkgs/exNSS4/DESCRIPTION
@@ -1,12 +1,12 @@
 Package: exNSS4
-Title: Example with NameSpace and S4 Methods and Classes
+Title: Example with S4 Methods and Classes
 Type: Package
 Depends: methods
-Version: 1.0
-Date: 2008-07-28
+Version: 1.1
+Date: 2015-08-02
 Author: Anonymous R-core
 Maintainer: R Core <R-core at almost.r-project.org>
-Description: Example package with a namespace and S4 methods and classes;
+Description: Example package with S4 methods and classes;
  used for regression testing the correct working of tools::codoc(), undoc()
  etc, but also S4 in connection with other packages.
 License: GPL (>= 2)
diff --git a/tests/Pkgs/exNSS4/NAMESPACE b/tests/Pkgs/exNSS4/NAMESPACE
index 9a2baa3..b11c27e 100644
--- a/tests/Pkgs/exNSS4/NAMESPACE
+++ b/tests/Pkgs/exNSS4/NAMESPACE
@@ -13,3 +13,7 @@ exportMethods(
  ## for other generics:
  plot, show
 )
+
+## The "Matrix-like"
+exportClasses("atomicVector", "array_or_vector")
+
diff --git a/tests/Pkgs/exNSS4/R/nss4.R b/tests/Pkgs/exNSS4/R/nss4.R
index 3a5e151..b63081b 100644
--- a/tests/Pkgs/exNSS4/R/nss4.R
+++ b/tests/Pkgs/exNSS4/R/nss4.R
@@ -39,3 +39,16 @@ setMethod("myGenf",  "pubClass", function(x, y) 2*x)
 assertError(setMethod("pubGenf", "pubClass", function(x, ...) { 10*x } ))
 ## and this is ok
 setMethod("pubGenf", c(x="pubClass"), function(x, y) { 10*x } )
+
+
+### "Same" class as in Matrix (but different 'Extends'!)  {as in Rmpfr}
+
+## "atomic vectors" (-> ?is.atomic ) -- exactly as in "Matrix":
+## ---------------
+setClassUnion("atomicVector", ## "double" is not needed, and not liked by some
+	      members = c("logical", "integer", "numeric",
+			  "complex", "raw", "character"))
+
+setClassUnion("array_or_vector",
+	      members = c("array", "matrix", "atomicVector"))
+
diff --git a/tests/Pkgs/pkgA b/tests/Pkgs/pkgA
new file mode 120000
index 0000000..1b213e8
--- /dev/null
+++ b/tests/Pkgs/pkgA
@@ -0,0 +1 @@
+xDir/pkg
\ No newline at end of file
diff --git a/tests/Pkgs/pkgA/DESCRIPTION b/tests/Pkgs/pkgA/DESCRIPTION
deleted file mode 100644
index cfb147f..0000000
--- a/tests/Pkgs/pkgA/DESCRIPTION
+++ /dev/null
@@ -1,13 +0,0 @@
-Package: pkgA
-Title: Simple Package with NameSpace and S4 Methods and Classes
-Type: Package
-Depends: methods
-Imports: Matrix
-Version: 1.1
-Date: 2010-05-04
-Author: Yohan Chalabi and R-core
-Maintainer: R Core <R-core at almost.r-project.org>
-Description: Example package with a namespace, and S4 method for "plot".
- used for regression testing the correct working of tools::codoc(), undoc()
- etc, but also S4 in connection with other packages.
-License: GPL (>= 2)
diff --git a/tests/Pkgs/pkgA/NAMESPACE b/tests/Pkgs/pkgA/NAMESPACE
deleted file mode 100644
index 21dab45..0000000
--- a/tests/Pkgs/pkgA/NAMESPACE
+++ /dev/null
@@ -1,12 +0,0 @@
-import(methods)
-
-import(graphics)
-## instead of just
-## importFrom("graphics", plot) # because we want to define methods on it
-## *Still* do not want warning from this
-
-## as "mgcv": this loads Matrix, but does not attach it  ==> Matrix methods "semi-visible"
-importFrom(Matrix, t,mean,colMeans,colSums)
-
-exportClasses("classA")
-exportMethods("plot")
diff --git a/tests/Pkgs/pkgA/R/pkgA.R b/tests/Pkgs/pkgA/R/pkgA.R
deleted file mode 100644
index 28bcede..0000000
--- a/tests/Pkgs/pkgA/R/pkgA.R
+++ /dev/null
@@ -1,5 +0,0 @@
-setClass("classA", contains = "matrix")
-
-## just so we can export it --
-## *and* ensure it is "attached to graphics::plot generic" :
-setMethod("plot", "classA", function(x, y, ...) NULL)
diff --git a/tests/Pkgs/pkgB/DESCRIPTION b/tests/Pkgs/pkgB/DESCRIPTION
index 28080c2..5bcf1bc 100644
--- a/tests/Pkgs/pkgB/DESCRIPTION
+++ b/tests/Pkgs/pkgB/DESCRIPTION
@@ -1,7 +1,6 @@
 Package: pkgB
 Title: Simple Package with NameSpace and S4 Methods and Classes
 Type: Package
-noDepends_we_have_Imports:
 Imports: methods, graphics, pkgA
 Version: 1.0
 Date: 2009-08-17
diff --git a/tests/Pkgs/xDir/pkg/DESCRIPTION b/tests/Pkgs/xDir/pkg/DESCRIPTION
new file mode 100644
index 0000000..86dc2cd
--- /dev/null
+++ b/tests/Pkgs/xDir/pkg/DESCRIPTION
@@ -0,0 +1,14 @@
+Package: pkgA
+Title: Simple Package with NameSpace and S4 Methods and Classes
+Version: 1.2
+Date: 2015-10-10
+Type: Package
+Depends: R (>= 2.14.0), R (>= r56550), methods
+Imports: Matrix (>= 1.2-0), Matrix (<= 99.9-9)
+LazyData: true
+Author: Yohan Chalabi and R-core
+Maintainer: R Core <R-core at almost.r-project.org>
+Description: Example package with a namespace, and S4 method for "plot".
+ used for regression testing the correct working of tools::codoc(), undoc()
+ etc, but also S4 in connection with other packages.
+License: GPL (>= 2)
diff --git a/tests/Pkgs/xDir/pkg/NAMESPACE b/tests/Pkgs/xDir/pkg/NAMESPACE
new file mode 100644
index 0000000..ef70b0c
--- /dev/null
+++ b/tests/Pkgs/xDir/pkg/NAMESPACE
@@ -0,0 +1,16 @@
+import(methods)
+
+import(graphics)
+## instead of just
+## importFrom("graphics", plot) # because we want to define methods on it
+## *Still* do not want warning from this
+
+## as "mgcv": this loads Matrix, but does not attach it  ==> Matrix methods "semi-visible"
+importFrom(Matrix, t,mean,colMeans,colSums)
+
+exportClasses("classA")
+exportMethods("plot")
+
+export(nil)
+
+export(search)# --> "conflict message"
diff --git a/tests/Pkgs/xDir/pkg/R/pkgA.R b/tests/Pkgs/xDir/pkg/R/pkgA.R
new file mode 100644
index 0000000..7153111
--- /dev/null
+++ b/tests/Pkgs/xDir/pkg/R/pkgA.R
@@ -0,0 +1,10 @@
+setClass("classA", contains = "matrix")
+
+## just so we can export it --
+## *and* ensure it is "attached to graphics::plot generic" :
+setMethod("plot", "classA", function(x, y, ...) NULL)
+
+nil <- NULL # see if we can use '::' on it
+
+## Export, so we get a *conflict* message on attaching:
+search <- function(...) base::search(...)
diff --git a/tests/Pkgs/xDir/pkg/data/nil.R b/tests/Pkgs/xDir/pkg/data/nil.R
new file mode 100644
index 0000000..190cd51
--- /dev/null
+++ b/tests/Pkgs/xDir/pkg/data/nil.R
@@ -0,0 +1 @@
+nilData <- NULL
diff --git a/tests/Pkgs/xDir/pkg/man/f.Rd b/tests/Pkgs/xDir/pkg/man/f.Rd
new file mode 100644
index 0000000..5411bf4
--- /dev/null
+++ b/tests/Pkgs/xDir/pkg/man/f.Rd
@@ -0,0 +1,25 @@
+\name{f}
+\alias{f}
+\title{Function f -- a Test}
+\description{ An Rd test only. }
+\usage{
+f(a)
+}
+\arguments{
+  \item{a}{a number.}
+}
+\value{a number.}
+
+\examples{
+PKG <- "stats4"
+pd <- packageDescription(PKG)
+cat(sprintf("\%s -- built: \%s\n\%*s -- file: \%s\n",
+            PKG, pd$Built, nchar(PKG), "", attr(pd, "file")))
+## Now, with a typo - forgetting to escape some of the percent signs :
+##  -- 2012-03-12 -- error message is +- ok now:
+##> 2013-02-x : the new parse_Rd() now chokes on this (with a "good"
+##> -------     error message)  already during package *build* --> cannot keep it here!
+##> cat(sprintf("\%s -- built: %s\n%*s -- file: %s\n",
+##>             PKG, pd$Built, nchar(PKG), "", attr(pd, "file")))
+}
+
diff --git a/tests/R-intro.Rout.save b/tests/R-intro.Rout.save
index 304f349..9561abc 100644
--- a/tests/R-intro.Rout.save
+++ b/tests/R-intro.Rout.save
@@ -1,7 +1,7 @@
 
-R version 3.1.2 RC (2014-10-29 r66897) -- "Pumpkin Helmet"
-Copyright (C) 2014 The R Foundation for Statistical Computing
-Platform: x86_64-unknown-linux-gnu (64-bit)
+R version 3.4.0 RC (2017-04-18 r72543) -- "You Stupid Darkness"
+Copyright (C) 2017 The R Foundation for Statistical Computing
+Platform: x86_64-pc-linux-gnu (64-bit)
 
 R is free software and comes with ABSOLUTELY NO WARRANTY.
 You are welcome to redistribute it under certain conditions.
@@ -198,9 +198,9 @@ Levels: act nsw nt qld sa tas vic wa
    act    nsw     nt    qld     sa    tas    vic     wa 
 44.500 57.333 55.500 53.600 55.000 60.500 56.000 52.250 
 > 
-> stderr <- function(x) sqrt(var(x)/length(x))
+> stdError <- function(x) sqrt(var(x)/length(x))
 > 
-> incster <- tapply(incomes, statef, stderr)
+> incster <- tapply(incomes, statef, stdError)
 > incster
    act    nsw     nt    qld     sa    tas    vic     wa 
 1.5000 4.3102 4.5000 4.1061 2.7386 0.5000 5.2440 2.6575 
@@ -295,8 +295,7 @@ blocks 1 2 3 4 5 6
 > 
 > d <- outer(0:9, 0:9)
 > fr <- table(outer(d, d, "-"))
-> plot(as.numeric(names(fr)), fr, type="h",
-+      xlab="Determinant", ylab="Frequency")
+> plot(fr, xlab="Determinant", ylab="Frequency")
 > 
 > ##
 > 
@@ -547,7 +546,7 @@ incomef   act nsw nt qld sa tas vic wa
 	Shapiro-Wilk normality test
 
 data:  long
-W = 0.9793, p-value = 0.01052
+W = 0.979, p-value = 0.011
 
 > 
 > ks.test(long, "pnorm", mean = mean(long), sd = sqrt(var(long)))
@@ -555,7 +554,7 @@ W = 0.9793, p-value = 0.01052
 	One-sample Kolmogorov-Smirnov test
 
 data:  long
-D = 0.0661, p-value = 0.4284
+D = 0.0661, p-value = 0.43
 alternative hypothesis: two-sided
 
 Warning message:
@@ -584,7 +583,7 @@ In ks.test(long, "pnorm", mean = mean(long), sd = sqrt(var(long))) :
 	Welch Two Sample t-test
 
 data:  A and B
-t = 3.2499, df = 12.027, p-value = 0.006939
+t = 3.25, df = 12, p-value = 0.0069
 alternative hypothesis: true difference in means is not equal to 0
 95 percent confidence interval:
  0.013855 0.070183
@@ -598,7 +597,7 @@ mean of x mean of y
 	F test to compare two variances
 
 data:  A and B
-F = 0.5837, num df = 12, denom df = 7, p-value = 0.3938
+F = 0.584, num df = 12, denom df = 7, p-value = 0.39
 alternative hypothesis: true ratio of variances is not equal to 1
 95 percent confidence interval:
  0.12511 2.10527
@@ -612,7 +611,7 @@ ratio of variances
 	Two Sample t-test
 
 data:  A and B
-t = 3.4722, df = 19, p-value = 0.002551
+t = 3.47, df = 19, p-value = 0.0026
 alternative hypothesis: true difference in means is not equal to 0
 95 percent confidence interval:
  0.016691 0.067348
@@ -626,7 +625,7 @@ mean of x mean of y
 	Wilcoxon rank sum test with continuity correction
 
 data:  A and B
-W = 89, p-value = 0.007497
+W = 89, p-value = 0.0075
 alternative hypothesis: true location shift is not equal to 0
 
 Warning message:
diff --git a/tests/README b/tests/README
index bd06f3c..1fadb9f 100644
--- a/tests/README
+++ b/tests/README
@@ -21,13 +21,21 @@ Note that for complete testing you will need a number of other
 packages installed and available, so if you have a CRAN installation,
 set R_LIBS (perhaps in ~/.R/check.Renviron) to include it before
 running these tests.  For example, some of the tests on 'nlme' depend
-on 'Hmisc', and there are a number of cross references from help page
+on 'Hmisc', and there are a number of cross references from help pages
 to CRAN packages.
 
 If a check fails there will almost always be a .Rout.fail file with
 the problematic output, so looking at the tail of that file should
 help pinpoint the problem.
 
+The \dontest sections of the examples can be run by
+
+     make check TEST_DONTTEST=TRUE
+
+(but expect some differences from the reference ouput).  This requires
+functional Tcl/Tk, e.g. for X11-based versions DISPLAY must be set to
+a usable X server.
+
 
 	---------- Historical Information -----------
 
@@ -57,10 +65,13 @@ runs regression tests, that is tests that ensure that things which have been
 changed (perhaps as a result of bug reports) stay fixed.
 
 	make test-Internet
+	make test-Internet2
 
 runs tests which need access to the Internet and/or sockets and so may
-not run on every machine.  You will see some differences in the output,
-but no test should fail if you do have sockets and Internet access.
+not run on every machine.  You will see some differences in the
+output, but no test should fail if you do have sockets and Internet
+access.  test-Internet2 is part of 'make check-devel' and checks less
+commonly-used options.
 
 
 Further tests are run by the target `make check-devel', including
@@ -87,6 +98,12 @@ runs a test abusing all the functions in the base packages via
 no-segfault.R, and that can be quite slow (a minute or more).
 
 
+A target not run by anything else is
+
+	make test-System
+
+which checks options in system[2]() calls.
+
 
 A rarely-used target is
 
diff --git a/tests/any-all.Rout.save b/tests/any-all.Rout.save
index bded597..4bb1513 100644
--- a/tests/any-all.Rout.save
+++ b/tests/any-all.Rout.save
@@ -1,7 +1,7 @@
 
-R version 3.1.2 RC (2014-10-29 r66897) -- "Pumpkin Helmet"
-Copyright (C) 2014 The R Foundation for Statistical Computing
-Platform: x86_64-unknown-linux-gnu (64-bit)
+R version 3.4.0 RC (2017-04-18 r72543) -- "You Stupid Darkness"
+Copyright (C) 2017 The R Foundation for Statistical Computing
+Platform: x86_64-pc-linux-gnu (64-bit)
 
 R is free software and comes with ABSOLUTELY NO WARRANTY.
 You are welcome to redistribute it under certain conditions.
diff --git a/tests/arith-true.Rout.save b/tests/arith-true.Rout.save
index 3332e06..7382700 100644
--- a/tests/arith-true.Rout.save
+++ b/tests/arith-true.Rout.save
@@ -1,7 +1,7 @@
 
-R version 3.1.2 RC (2014-10-29 r66897) -- "Pumpkin Helmet"
-Copyright (C) 2014 The R Foundation for Statistical Computing
-Platform: x86_64-unknown-linux-gnu (64-bit)
+R version 3.4.0 RC (2017-04-18 r72543) -- "You Stupid Darkness"
+Copyright (C) 2017 The R Foundation for Statistical Computing
+Platform: x86_64-pc-linux-gnu (64-bit)
 
 R is free software and comes with ABSOLUTELY NO WARRANTY.
 You are welcome to redistribute it under certain conditions.
@@ -323,5 +323,5 @@ Warning messages:
 > 
 > ## Last Line:
 > cat('Time elapsed: ', proc.time() - .proctime00,'\n')
-Time elapsed:  0.247 0.001 0.248 0 0 
+Time elapsed:  0.219 0.002 0.222 0 0 
 > 
diff --git a/tests/arith.Rout.save b/tests/arith.Rout.save
index 6d377ff..dac45d7 100644
--- a/tests/arith.Rout.save
+++ b/tests/arith.Rout.save
@@ -1,7 +1,7 @@
 
-R version 3.1.2 RC (2014-10-29 r66897) -- "Pumpkin Helmet"
-Copyright (C) 2014 The R Foundation for Statistical Computing
-Platform: x86_64-unknown-linux-gnu (64-bit)
+R version 3.4.0 RC (2017-04-18 r72543) -- "You Stupid Darkness"
+Copyright (C) 2017 The R Foundation for Statistical Computing
+Platform: x86_64-pc-linux-gnu (64-bit)
 
 R is free software and comes with ABSOLUTELY NO WARRANTY.
 You are welcome to redistribute it under certain conditions.
diff --git a/tests/array-subset.Rout.save b/tests/array-subset.Rout.save
deleted file mode 100644
index 709033b..0000000
--- a/tests/array-subset.Rout.save
+++ /dev/null
@@ -1,104 +0,0 @@
-
-R version 3.1.2 RC (2014-10-29 r66897) -- "Pumpkin Helmet"
-Copyright (C) 2014 The R Foundation for Statistical Computing
-Platform: x86_64-unknown-linux-gnu (64-bit)
-
-R is free software and comes with ABSOLUTELY NO WARRANTY.
-You are welcome to redistribute it under certain conditions.
-Type 'license()' or 'licence()' for distribution details.
-
-R is a collaborative project with many contributors.
-Type 'contributors()' for more information and
-'citation()' on how to cite R or R packages in publications.
-
-Type 'demo()' for some demos, 'help()' for on-line help, or
-'help.start()' for an HTML browser interface to help.
-Type 'q()' to quit R.
-
-> ## array subsetting tests
-> ##
-> ## Tests should be written to raise an error on test failure
-> ##
-> 
-> ## Test for subsetting of an array using a matrix with ncol == length(dim(x))
-> 
-> ## first matrix case
-> m <- matrix(1:25, ncol=5, dimnames = list(letters[1:5], LETTERS[1:5]))
-> 
-> si <- matrix(c(1, 1, 2, 3, 3, 4), ncol = 2, byrow = TRUE)
-> ss <- matrix(c("a", "A", "b", "C", "c", "D"), ncol = 2, byrow = TRUE)
-> 
-> stopifnot(identical(m[si], m[ss]))
-> stopifnot(identical(c(1L, 12L, 18L), m[ss]))
-> 
-> ## test behavior of NA entries in subset matrix.
-> ## NA in character matrix should propagate and should not
-> ## match an NA in a dimname.
-> 
-> ## An NA in either column propagates to result
-> ssna <- ss; ssna[2, 2] <- NA
-> stopifnot(identical(c(1L, NA, 18L), m[ssna]))
-> ssna <- ss; ssna[2, 1] <- NA
-> stopifnot(identical(c(1L, NA, 18L), m[ssna]))
-> 
-> ## An NA in row/column names is not matched
-> mnadim <- m
-> tmp <- rownames(mnadim)
-> tmp[5] <- NA
-> rownames(mnadim) <- tmp
-> stopifnot(identical(c(1L, NA, 18L), m[ssna]))
-> 
-> ## Unmatched subscripts raise an error
-> ssnm <- ss
-> ssnm[2, 2] <- "NOMATCH"
-> stopifnot(inherits(try(m[ssnm], silent=TRUE), "try-error"))
-> 
-> ## "" does not match and so raises an error
-> mnadim <- m
-> tmp <- rownames(mnadim)
-> tmp[5] <- ""
-> rownames(mnadim) <- tmp
-> ssnm <- ss
-> ssnm[2, 2] <- ""
-> stopifnot(inherits(try(mnadim[ssnm], silent=TRUE), "try-error"))
-> 
-> 
-> ## test assignment
-> m3 <- m2 <- m
-> m2[si] <- c(100L, 200L, 300L)
-> m3[ss] <- c(100L, 200L, 300L)
-> stopifnot(identical(m2, m3))
-> 
-> ## now an array case
-> a <- array(1:75, dim = c(5, 5, 3),
-+            dimnames = list(letters[1:5], LETTERS[1:5], letters[24:26]))
-> 
-> si <- matrix(c(1, 1, 1,
-+                2, 3, 1,
-+                3, 4, 1,
-+                5, 1, 3),
-+              ncol = 3, byrow = TRUE)
-> 
-> ss <- matrix(c("a", "A", "x",
-+                "b", "C", "x",
-+                "c", "D", "x",
-+                "e", "A", "z"),
-+              ncol = 3, byrow = TRUE)
-> 
-> stopifnot(identical(a[si], a[ss]))
-> stopifnot(identical(c(1L, 12L, 18L, 55L), a[ss]))
-> 
-> a2 <- a1 <- a
-> a1[si] <- c(100L, 1200L, 1800L, 5500L)
-> a2[ss] <- c(100L, 1200L, 1800L, 5500L)
-> stopifnot(identical(a1, a2))
-> 
-> ## it is an error to subset if some dimnames are missing NOTE: this
-> ## gives a subscript out of bounds error, might want something more
-> ## informative?
-> a3 <- a
-> dn <- dimnames(a3)
-> dn[2] <- list(NULL)
-> dimnames(a3) <- dn
-> stopifnot(inherits(try(a3[ss], silent=TRUE), "try-error"))
-> 
diff --git a/tests/complex.R b/tests/complex.R
index 6473b2e..42a5dc0 100644
--- a/tests/complex.R
+++ b/tests/complex.R
@@ -122,8 +122,38 @@ asinh(z)
 acosh(z)
 atan(z)
 ## According to C99, should have continuity from the side given if there
-## are not signed zeros
-## Both glibc 2.12 and Mac OS X 10.6 use continuity from above in the first set
+## are not signed zeros.
+## Both glibc 2.12 and macOS 10.6 used continuity from above in the first set
 ## but they seem to assume signed zeros.
 ## Windows gave incorrect (NaN) values on the cuts.
 
+stopifnot(identical(tanh(356+0i), 1+0i))
+## Used to be NaN+0i on Windows
+
+## Not a regression test, but rather one of the good cases:
+(cNaN <- as.complex("NaN"))
+stopifnot(identical(cNaN, complex(re = NaN)), is.nan(Re(cNaN)), Im(cNaN) == 0)
+dput(cNaN) ## (real = NaN, imaginary = 0)
+## Partly new behavior:
+(c0NaN  <- complex(real=0, im=NaN))
+(cNaNaN <- complex(re=NaN, im=NaN))
+stopifnot(identical(cNaN, as.complex(NaN)),
+          identical(vapply(c(cNaN, c0NaN, cNaNaN), format, ""),
+                    c("NaN+0i", "0+NaNi", "NaN+NaNi")),
+          identical(cNaN, NaN + 0i),
+          identical(cNaN, Conj(cNaN)),
+          identical(cNaN, cNaN+cNaN),
+
+          identical(cNaNaN, 1i * NaN),
+          identical(cNaNaN, complex(modulus= NaN)),
+          identical(cNaNaN, complex(argument= NaN)),
+          identical(cNaNaN, complex(arg=NaN, mod=NaN)),
+
+          identical(c0NaN, c0NaN+c0NaN), # !
+          ## Platform dependent, not TRUE e.g. on F21 gcc 4.9.2:
+          ## identical(NA_complex_, NaN + NA_complex_ ) ,
+          ## Probably TRUE, but by a standard ??
+          ## identical(cNaNaN, 2 * c0NaN), # C-library arithmetic
+          ## identical(cNaNaN, 2 * cNaN),  # C-library arithmetic
+          ## identical(cNaNaN, NA_complex_ * Inf),
+          TRUE)
diff --git a/tests/complex.Rout.save b/tests/complex.Rout.save
index 6c3f46f..d423814 100644
--- a/tests/complex.Rout.save
+++ b/tests/complex.Rout.save
@@ -1,7 +1,7 @@
 
-R version 3.1.2 RC (2014-10-29 r66897) -- "Pumpkin Helmet"
-Copyright (C) 2014 The R Foundation for Statistical Computing
-Platform: x86_64-unknown-linux-gnu (64-bit)
+R version 3.4.0 RC (2017-04-18 r72543) -- "You Stupid Darkness"
+Copyright (C) 2017 The R Foundation for Statistical Computing
+Platform: x86_64-pc-linux-gnu (64-bit)
 
 R is free software and comes with ABSOLUTELY NO WARRANTY.
 You are welcome to redistribute it under certain conditions.
@@ -255,9 +255,43 @@ n= 30 : 465+0i -15+142.7155i -15+70.56945i -15+46.16525i -15+33.69055i -15+25.98
 > atan(z)
 [1]  1.5708+0.5493i  1.5708+0.5493i -1.5708-0.5493i -1.5708-0.5493i
 > ## According to C99, should have continuity from the side given if there
-> ## are not signed zeros
-> ## Both glibc 2.12 and Mac OS X 10.6 use continuity from above in the first set
+> ## are not signed zeros.
+> ## Both glibc 2.12 and macOS 10.6 used continuity from above in the first set
 > ## but they seem to assume signed zeros.
 > ## Windows gave incorrect (NaN) values on the cuts.
 > 
+> stopifnot(identical(tanh(356+0i), 1+0i))
+> ## Used to be NaN+0i on Windows
+> 
+> ## Not a regression test, but rather one of the good cases:
+> (cNaN <- as.complex("NaN"))
+[1] NaN+0i
+> stopifnot(identical(cNaN, complex(re = NaN)), is.nan(Re(cNaN)), Im(cNaN) == 0)
+> dput(cNaN) ## (real = NaN, imaginary = 0)
+complex(real=NaN, imaginary=0)
+> ## Partly new behavior:
+> (c0NaN  <- complex(real=0, im=NaN))
+[1] 0+NaNi
+> (cNaNaN <- complex(re=NaN, im=NaN))
+[1] NaN+NaNi
+> stopifnot(identical(cNaN, as.complex(NaN)),
++           identical(vapply(c(cNaN, c0NaN, cNaNaN), format, ""),
++                     c("NaN+0i", "0+NaNi", "NaN+NaNi")),
++           identical(cNaN, NaN + 0i),
++           identical(cNaN, Conj(cNaN)),
++           identical(cNaN, cNaN+cNaN),
++ 
++           identical(cNaNaN, 1i * NaN),
++           identical(cNaNaN, complex(modulus= NaN)),
++           identical(cNaNaN, complex(argument= NaN)),
++           identical(cNaNaN, complex(arg=NaN, mod=NaN)),
++ 
++           identical(c0NaN, c0NaN+c0NaN), # !
++           ## Platform dependent, not TRUE e.g. on F21 gcc 4.9.2:
++           ## identical(NA_complex_, NaN + NA_complex_ ) ,
++           ## Probably TRUE, but by a standard ??
++           ## identical(cNaNaN, 2 * c0NaN), # C-library arithmetic
++           ## identical(cNaNaN, 2 * cNaN),  # C-library arithmetic
++           ## identical(cNaNaN, NA_complex_ * Inf),
++           TRUE)
 > 
diff --git a/tests/d-p-q-r-tests.R b/tests/d-p-q-r-tests.R
index 295cd27..ace834b 100644
--- a/tests/d-p-q-r-tests.R
+++ b/tests/d-p-q-r-tests.R
@@ -9,14 +9,18 @@
 F <- FALSE
 T <- TRUE
 
+options(warn = 2)
+##      ======== No warnings, unless explicitly asserted via
+assertWarning <- tools::assertWarning
+
+as.nan <- function(x) { x[is.na(x) & !is.nan(x)] <- NaN ; x }
 ###-- these are identical in ./arith-true.R ["fixme": use source(..)]
 opt.conformance <- 0
 Meps <- .Machine $ double.eps
 xMax <- .Machine $ double.xmax
 options(rErr.eps = 1e-30)
-rErr <- function(approx, true, eps = .Options$rErr.eps)
+rErr <- function(approx, true, eps = getOption("rErr.eps", 1e-30))
 {
-    if(is.null(eps)) { eps <- 1e-30; options(rErr.eps = eps) }
     ifelse(Mod(true) >= eps,
 	   1 - approx / true, # relative error
 	   true - approx)     # absolute error (e.g. when true=0)
@@ -26,7 +30,8 @@ All.eq <- function(x,y) {
     all.equal.numeric(x,y, tolerance = 64*.Machine$double.eps,
                       scale = max(0, mean(abs(x), na.rm=TRUE)))
 }
-if(!interactive()) set.seed(123)
+if(!interactive())
+    set.seed(123)
 
 ## The prefixes of ALL the PDQ & R functions
 PDQRinteg <- c("binom", "geom", "hyper", "nbinom", "pois","signrank","wilcox")
@@ -44,79 +49,62 @@ PQonly <- c("tukey")
 ## Abramowitz & Stegun, p.945-6;  26.5.24  AND	26.5.28 :
 n0 <- 50; n1 <- 16; n2 <- 20; n3 <- 8
 for(n in rbinom(n1, size = 2*n0, p = .4)) {
-    cat("n=",n,": ")
     for(p in c(0,1,rbeta(n2, 2,4))) {
-	cat(".")
-	for(k in rbinom(n3, size = n,  prob = runif(1))) {
+	for(k in rbinom(n3, size = n,  prob = runif(1)))
 	    ## For X ~ Bin(n,p), compute 1 - P[X > k] = P[X <= k] in three ways:
-	    tst1 <- all.equal(	     pbinom(0:k, size = n, prob = p),
-			      cumsum(dbinom(0:k, size = n, prob = p)))
-	    tst <- all.equal(if(k==n || p==0) 1 else
-			     pf((k+1)/(n-k)*(1-p)/p, df1=2*(n-k), df2=2*(k+1)),
-			     sum(dbinom(0:k, size = n, prob = p)))
-	    if(!isTRUE(tst1) || !isTRUE(tst)) {
-		cat("n=", n,"; p =",format(p),".  k =",k)
-		if(!isTRUE(tst1)) cat("; tst1=",tst1)
-		if(!isTRUE(tst )) cat("; tst=", tst)
-		cat("\n")
-	    }
-	}
+	    stopifnot(all.equal(       pbinom(0:k, size = n, prob = p),
+				cumsum(dbinom(0:k, size = n, prob = p))),
+		      all.equal(if(k==n || p==0) 1 else
+				pf((k+1)/(n-k)*(1-p)/p, df1=2*(n-k), df2=2*(k+1)),
+				sum(dbinom(0:k, size = n, prob = p))))
     }
-    cat("\n")
 }
 
 ##__ 2. Geometric __
-for(pr in seq(1e-10,1,len=15)) { # p=0 is not a distribution
-    print(All.eq((dg <- dgeom(0:10, pr)),
-		 pr * (1-pr)^(0:10)))
-    print(All.eq(cumsum(dg), pgeom(0:10, pr)))
-}
+for(pr in seq(1e-10,1,len=15)) # p=0 is not a distribution
+    stopifnot(All.eq((dg <- dgeom(0:10, pr)),
+		     pr * (1-pr)^(0:10)),
+	      All.eq(cumsum(dg), pgeom(0:10, pr)))
+
 
 ##__ 3. Hypergeometric __
 
 m <- 10; n <- 7
 for(k in 2:m) {
     x <- 0:(k+1)
-    print(All.eq(phyper(x, m, n, k), cumsum(dhyper(x, m, n, k))))
+    stopifnot(All.eq(phyper(x, m, n, k), cumsum(dhyper(x, m, n, k))))
 }
 
 ##__ 4. Negative Binomial __
 
 ## PR #842
 for(size in seq(0.8,2, by=.1))
-    print(all.equal(cumsum(dnbinom(0:7, size, .5)),
-			   pnbinom(0:7, size, .5)))
-All.eq(pnbinom(c(1,3), .9, .5), c(0.777035760338812, 0.946945347071519))
+    stopifnot(all.equal(cumsum(dnbinom(0:7, size, .5)),
+			       pnbinom(0:7, size, .5)))
+stopifnot(All.eq(pnbinom(c(1,3), .9, .5),
+		 c(0.777035760338812, 0.946945347071519)))
 
 ##__ 5. Poisson __
 
-all(dpois(0:5,0)	   == c(1, rep(0,5)))
-all(dpois(0:5,0, log=TRUE) == c(0, rep(-Inf, 5)))
+stopifnot(dpois(0:5,0)		 == c(1, rep(0,5)),
+	  dpois(0:5,0, log=TRUE) == c(0, rep(-Inf, 5)))
 
 ## Cumulative Poisson '==' Cumulative Chi^2 :
 ## Abramowitz & Stegun, p.941 :	 26.4.21 (26.4.2)
 n1 <- 20; n2 <- 16
 for(lambda in rexp(n1))
-    for(k in rpois(n2, lambda)) {
-	tst <- all.equal(1 - pchisq(2*lambda, 2*(1+ 0:k)),
-			 pp <- cumsum(dpois(0:k, lambda=lambda)),
-                         tolerance = 100*Meps)
-	if(!isTRUE(tst))
-	    cat("lambda=", format(lambda),".  k =",k, " --> tst=", tst,"\n")
-	tst2 <- all.equal(pp, ppois(0:k, lambda=lambda), tolerance = 100*Meps)
-	if(!isTRUE(tst2))
-	    cat("lambda=", format(lambda),".  k =",k, " --> tst2=", tst2,"\n")
-	tst3 <- all.equal(1 - pp, ppois(0:k, lambda=lambda, lower.tail = FALSE))
-	if(!isTRUE(tst3))
-	    cat("lambda=", format(lambda),".  k =",k, " --> tst3=", tst3,"\n")
-    }
+    for(k in rpois(n2, lambda))
+	stopifnot(all.equal(1 - pchisq(2*lambda, 2*(1+ 0:k)),
+			    pp <- cumsum(dpois(0:k, lambda=lambda)),
+			    tolerance = 100*Meps),
+		  all.equal(pp, ppois(0:k, lambda=lambda), tolerance = 100*Meps),
+		  all.equal(1 - pp, ppois(0:k, lambda=lambda, lower.tail = FALSE)))
 
 
 ##__ 6. SignRank __
 for(n in rpois(32, lam=8)) {
     x <- -1:(n + 4)
-    if(!isTRUE(eq <- All.eq(psignrank(x, n), cumsum(dsignrank(x, n)))))
-        print(eq)
+    stopifnot(All.eq(psignrank(x, n), cumsum(dsignrank(x, n))))
 }
 
 ##__ 7. Wilcoxon (symmetry & cumulative) __
@@ -127,10 +115,9 @@ for(n in rpois(5, lam=6))
 	fx <- dwilcox(x, n, m)
 	Fx <- pwilcox(x, n, m)
 	is.sym <- is.sym & all(fx == dwilcox(x, m, n))
-	if(!isTRUE(eq <- All.eq(Fx, cumsum(fx))))
-            print(eq)
+	stopifnot(All.eq(Fx, cumsum(fx)))
     }
-is.sym
+stopifnot(is.sym)
 
 
 ###-------- Continuous Distributions ----------
@@ -139,23 +126,20 @@ is.sym
 x <- round(rgamma(100, shape = 2),2)
 for(sh in round(rlnorm(30),2)) {
     Ga <- gamma(sh)
-    for(sig in round(rlnorm(30),2)) {
-	tst <- all.equal((d1 <- dgamma(	 x,   shape = sh, scale = sig)),
-			 (d2 <- dgamma(x/sig, shape = sh, scale = 1) / sig),
-			 tolerance = 1e-14)## __ad interim__ was 1e-15
-	if(!isTRUE(tst))
-	    cat("ERROR: dgamma() doesn't scale:",tst,"\n",
-		"  x =", formatC(x),"\n	 shape,scale=",formatC(c(sh, sig)),"\n")
-	tst <- All.eq(d1, (d3 <- 1/(Ga * sig^sh) * x^(sh-1) * exp(-x/sig)))
-	if(!isTRUE(tst))
-	    cat("NOT Equal:",tst,"\n x =", formatC(x),
-		"\n  shape,scale=",formatC(c(sh, sig)),"\n")
-    }
+    for(sig in round(rlnorm(30),2))
+	stopifnot(all.equal((d1 <- dgamma(	 x,   shape = sh, scale = sig)),
+                            (d2 <- dgamma(x/sig, shape = sh, scale = 1) / sig),
+                            tolerance = 1e-14)## __ad interim__ was 1e-15
+                  ,
+                  All.eq(d1, (d3 <- 1/(Ga * sig^sh) * x^(sh-1) * exp(-x/sig)))
+                  )
 }
-pgamma(1,Inf,scale=Inf) == 0
+
+stopifnot(pgamma(1,Inf,scale=Inf) == 0)
 ## Also pgamma(Inf,Inf) == 1 for which NaN was slightly more appropriate
-all(is.nan(c(pgamma(Inf,  1,scale=Inf),
-             pgamma(Inf,Inf,scale=Inf))))
+assertWarning(stopifnot(
+    is.nan(c(pgamma(Inf,  1,scale=Inf),
+             pgamma(Inf,Inf,scale=Inf)))))
 scLrg <- c(2,100, 1e300*c(.1, 1,10,100), 1e307, xMax, Inf)
 stopifnot(pgamma(Inf, 1, scale=xMax) == 1,
           pgamma(xMax,1, scale=Inf) == 0,
@@ -167,78 +151,89 @@ stopifnot(pgamma(Inf, 1, scale=xMax) == 1,
           )
 
 p <- 7e-4; df <- 0.9
+stopifnot(
 abs(1-c(pchisq(qchisq(p, df),df)/p, # was 2.31e-8 for R <= 1.8.1
         pchisq(qchisq(1-p, df,lower=FALSE),df,lower=FALSE)/(1-p),# was 1.618e-11
         pchisq(qchisq(log(p), df,log=TRUE),df, log=TRUE)/log(p), # was 3.181e-9
         pchisq(qchisq(log1p(-p),df,log=T,lower=F),df, log=T,lower=F)/log1p(-p)
         )# 32b-i386: (2.2e-16, 0,0, 3.3e-16); Opteron: (2.2e-16, 0,0, 2.2e-15)
     ) < 1e-14
+)
 
 ##-- non central Chi^2 :
 xB <- c(2000,1e6,1e50,Inf)
 for(df in c(0.1, 1, 10))
     for(ncp in c(0, 1, 10, 100)) stopifnot(pchisq(xB, df=df, ncp=ncp) == 1)
-all.equal(qchisq(0.025,31,ncp=1,lower.tail=FALSE),# inf.loop PR#875
-          49.7766246561514, tolerance = 1e-11)
+stopifnot(all.equal(qchisq(0.025,31,ncp=1,lower.tail=FALSE),# inf.loop PR#875
+                    49.7766246561514, tolerance = 1e-11))
 for(df in c(0.1, 0.5, 1.5, 4.7, 10, 20,50,100)) {
-    cat("df =", formatC(df, wid=3))
     xx <- c(10^-(5:1), .9, 1.2, df + c(3,7,20,30,35,38))
     pp <- pchisq(xx, df=df, ncp = 1) #print(pp)
     dtol <- 1e-12 *(if(2 < df && df <= 50) 64 else if(df > 50) 20000 else 501)
-    print(all.equal(xx, qchisq(pp, df=df, ncp=1), tolerance = dtol))# TRUE
-    ##or print(mapply(rErr, xx, qchisq(pp, df=df,ncp=1)), digits = 3)
+    stopifnot(all.equal(xx, qchisq(pp, df=df, ncp=1), tolerance = dtol))
 }
 
 ## p ~= 1 (<==> 1-p ~= 0) -- gave infinite loop in R <= 1.8.1 -- PR#6421
-options(warn=-1) # ignore warnings from R's version of log1p
 psml <- 2^-(10:54)
 q0 <- qchisq(psml,    df=1.2, ncp=10, lower.tail=FALSE)
 q1 <- qchisq(1-psml, df=1.2, ncp=10) # inaccurate in the tail
 p0 <- pchisq(q0, df=1.2, ncp=10, lower.tail=FALSE)
 p1 <- pchisq(q1, df=1.2, ncp=10, lower.tail=FALSE)
 iO <- 1:30
-all.equal(q0[iO], q1[iO], tolerance = 1e-5)
-all.equal(p0[iO], psml[iO])
-options(warn=0)
+stopifnot(all.equal(q0[iO], q1[iO], tolerance = 1e-5),# 9.86e-8
+          all.equal(p0[iO], psml[iO])) # 1.07e-13
 
 ##--- Beta (need more):
 
 ## big a & b (PR #643)
-summary(a <- rlnorm(20, 5.5))
-summary(b <- rlnorm(20, 6.5))
+stopifnot(is.finite(a <- rlnorm(20, 5.5)), a > 0,
+          is.finite(b <- rlnorm(20, 6.5)), b > 0)
 pab <- expand.grid(seq(0,1,by=.1), a, b)
 p <- pab[,1]; a <- pab[,2]; b <- pab[,3]
-all.equal(dbeta(p,a,b), exp(pab <- dbeta(p,a,b, log = TRUE)), tolerance = 1e-11)
-sample(pab, 50)
+stopifnot(all.equal(dbeta(p,a,b),
+                    exp(pab <- dbeta(p,a,b, log = TRUE)), tolerance = 1e-11))
+sp <- sample(pab, 50)
+if(!interactive())
+stopifnot(which(isI <- sp == -Inf) ==
+              c(3, 11, 15, 20, 22, 23, 30, 39, 42, 43, 46, 47, 49),
+          all.equal(range(sp[!isI]), c(-2906.123981, 2.197270387))
+          )
 
 
 ##--- Normal (& Lognormal) :
 
-qnorm(0) == -Inf && qnorm(-Inf, log = TRUE) == -Inf
-qnorm(1) ==  Inf && qnorm(0, log = TRUE) == Inf
+stopifnot(
+    qnorm(0) == -Inf, qnorm(-Inf, log = TRUE) == -Inf,
+    qnorm(1) ==  Inf, qnorm( 0,   log = TRUE) ==  Inf)
 
-is.nan(qnorm(1.1)) &&
-is.nan(qnorm(-.1)) # + warn
+assertWarning(stopifnot(
+    is.nan(qnorm(1.1)),
+    is.nan(qnorm(-.1))))
 
 x <- c(-Inf, -1e100, 1:6, 1e200, Inf)
-rbind(d.s0 =dnorm(x,3,s=0),   p.s0 = pnorm(x,3,s=0),
-      d.sI =dnorm(x,3,s=Inf), p.sI = pnorm(x,3,s=Inf))
+stopifnot(
+    dnorm(x,3,s=0) == c(0,0,0,0, Inf, 0,0,0,0,0),
+    pnorm(x,3,s=0) == c(0,0,0,0,  1 , 1,1,1,1,1),
+    dnorm(x,3,s=Inf) == 0,
+    pnorm(x,3,s=Inf) == c(0, rep(0.5, 8), 1))
 
 ## 3 Test data from Wichura (1988) :
-all.equal(qnorm(c( 0.25,  .001,	 1e-20)),
-	  c(-0.6744897501960817, -3.090232306167814, -9.262340089798408),
-	  tolerance = 1e-15)
-# extreme tail -- available on log scale only:
-all.equal(qnorm(-1e5, log = TRUE), -447.1974945)
+stopifnot(
+    all.equal(qnorm(c( 0.25,  .001, 1e-20)),
+	      c(-0.6744897501960817, -3.090232306167814, -9.262340089798408),
+	      tolerance = 1e-15)
+  , ## extreme tail -- available on log scale only:
+    all.equal(qnorm(-1e5, log = TRUE), -447.1974945)
+)
 
 z <- rnorm(1000); all.equal(pnorm(z),  1 - pnorm(-z), tolerance = 1e-15)
 z <- c(-Inf,Inf,NA,NaN, rt(1000, df=2))
 z.ok <- z > -37.5 | !is.finite(z)
-for(df in 1:10) if(!isTRUE(all.equal(pt(z, df), 1 - pt(-z,df), tolerance = 1e-15)))
-    cat("ERROR -- df = ", df, "\n")
-All.eq(pz <- pnorm(z), 1 - pnorm(z, lower=FALSE))
-All.eq(pz,		 pnorm(-z, lower=FALSE))
-All.eq(log(pz[z.ok]),  pnorm(z[z.ok], log=TRUE))
+for(df in 1:10) stopifnot(all.equal(pt(z, df), 1 - pt(-z,df), tolerance = 1e-15))
+
+stopifnot(All.eq(pz <- pnorm(z), 1 - pnorm(z, lower=FALSE)),
+          All.eq(pz,		    pnorm(-z, lower=FALSE)),
+          All.eq(log(pz[z.ok]), pnorm(z[z.ok], log=TRUE)))
 y <- seq(-70,0, by = 10)
 cbind(y, "log(pnorm(y))"= log(pnorm(y)), "pnorm(y, log=T)"= pnorm(y, log=TRUE))
 y <- c(1:15, seq(20,40, by=5))
@@ -252,7 +247,7 @@ for(L in c(FALSE,TRUE))
 			pnorm(+y, log= L, lower=FALSE)))
 
 ## Log norm
-All.eq(pz, plnorm(exp(z)))
+stopifnot(All.eq(pz, plnorm(exp(z))))
 

 
 ###==========  p <-> q	Inversion consistency =====================
@@ -345,7 +340,7 @@ All.eq(Rnorm,	  qnorm	   (Pnorm, mean = -1, sd = 3))
 All.eq(Rpois,	  qpois	   (Ppois, lambda = 12))
 All.eq(Rsignrank, qsignrank(Psignrank, n = 47))
 All.eq(Rt,	  qt	   (Pt,	 df = 11))
-all.equal(Rt2,	  qt	   (Pt2, df = 1.01), tolerance = 1e-2)
+All.eq(Rt2,	  qt	   (Pt2, df = 1.01))
 All.eq(Runif,	  qunif	   (Punif, min = .2, max = 2))
 All.eq(Rweibull,  qweibull (Pweibull, shape = 3, scale = 2))
 All.eq(Rwilcox,	  qwilcox  (Pwilcox, m = 13, n = 17))
@@ -367,7 +362,7 @@ All.eq(Rnorm,	  qnorm	   (1- Pnorm, mean = -1, sd = 3,lower=F))
 All.eq(Rpois,	  qpois	   (1- Ppois, lambda = 12, lower=F))
 All.eq(Rsignrank, qsignrank(1- Psignrank, n = 47, lower=F))
 All.eq(Rt,	  qt	   (1- Pt,  df = 11,   lower=F))
-all.equal(Rt2,	  qt	   (1- Pt2, df = 1.01, lower=F), tolerance = 1e-2)
+All.eq(Rt2,	  qt	   (1- Pt2, df = 1.01, lower=F))
 All.eq(Runif,	  qunif	   (1- Punif, min = .2, max = 2, lower=F))
 All.eq(Rweibull,  qweibull (1- Pweibull, shape = 3, scale = 2, lower=F))
 All.eq(Rwilcox,	  qwilcox  (1- Pwilcox, m = 13, n = 17, lower=F))
@@ -376,7 +371,7 @@ All.eq(Rwilcox,	  qwilcox  (1- Pwilcox, m = 13, n = 17, lower=F))
 All.eq(Rbeta,	  qbeta	   (log(Pbeta), shape1 = .8, shape2 = 2, log=TRUE))
 All.eq(Rbinom,	  qbinom   (log(Pbinom), size = 55, prob = pi/16, log=TRUE))
 All.eq(Rcauchy,	  qcauchy  (log(Pcauchy), location = 12, scale = 2, log=TRUE))
-all.equal(Rchisq,    qchisq   (log(Pchisq), df = 3, log=TRUE),tolerance =1e-14)
+All.eq(Rchisq,    qchisq   (log(Pchisq), df = 3, log=TRUE))
 All.eq(Rexp,	  qexp	   (log(Pexp), rate = 2, log=TRUE))
 All.eq(Rf,	  qf	   (log(Pf), df1= 12, df2= 6, log=TRUE))
 All.eq(Rgamma,	  qgamma   (log(Pgamma), shape = 2, scale = 5, log=TRUE))
@@ -389,7 +384,7 @@ All.eq(Rnorm,	  qnorm	   (log(Pnorm), mean = -1, sd = 3, log=TRUE))
 All.eq(Rpois,	  qpois	   (log(Ppois), lambda = 12, log=TRUE))
 All.eq(Rsignrank, qsignrank(log(Psignrank), n = 47, log=TRUE))
 All.eq(Rt,	  qt	   (log(Pt), df = 11, log=TRUE))
-all.equal(Rt2,	  qt	   (log(Pt2), df = 1.01, log=TRUE), tolerance = 1e-2)
+All.eq(Rt2,	  qt	   (log(Pt2), df = 1.01, log=TRUE))
 All.eq(Runif,	  qunif	   (log(Punif), min = .2, max = 2, log=TRUE))
 All.eq(Rweibull,  qweibull (log(Pweibull), shape = 3, scale = 2, log=TRUE))
 All.eq(Rwilcox,	  qwilcox  (log(Pwilcox), m = 13, n = 17, log=TRUE))
@@ -412,7 +407,7 @@ All.eq(Rnorm,	  qnorm	   (log1p(-Pnorm), mean = -1, sd = 3, lower=F, log=T))
 All.eq(Rpois,	  qpois	   (log1p(-Ppois), lambda = 12, lower=F, log=T))
 All.eq(Rsignrank, qsignrank(log1p(-Psignrank), n = 47, lower=F, log=T))
 All.eq(Rt,	  qt	   (log1p(-Pt ), df = 11,   lower=F, log=T))
-all.equal(Rt2,	  qt	   (log1p(-Pt2), df = 1.01, lower=F, log=T), tolerance = 1e-2)
+All.eq(Rt2,	  qt	   (log1p(-Pt2), df = 1.01, lower=F, log=T))
 All.eq(Runif,	  qunif	   (log1p(-Punif), min = .2, max = 2, lower=F, log=T))
 All.eq(Rweibull,  qweibull (log1p(-Pweibull), shape = 3, scale = 2, lower=F, log=T))
 All.eq(Rwilcox,	  qwilcox  (log1p(-Pwilcox), m = 13, n = 17, lower=F, log=T))
@@ -448,7 +443,7 @@ All.eq(1, pcauchy(-1e20)           /  3.18309886183791e-21)
 All.eq(1, pcauchy(+1e15, log=TRUE) / -3.18309886183791e-16)## PR#6756
 x <- 10^(ex <- c(1,2,5*(1:5),50,100,200,300,Inf))
 for(a in x[ex > 10]) ## improve pt() : cbind(x,t= pt(-x, df=1), C=pcauchy(-x))
-    print(all.equal(pt(-a, df=1), pcauchy(-a), tolerance = 1e-15))
+    stopifnot(all.equal(pt(-a, df=1), pcauchy(-a), tolerance = 1e-15))
 ## for PR#7902:
 ex <- -c(rev(1/x), ex)
 All.eq(-x, qcauchy(pcauchy(-x)))
@@ -569,9 +564,10 @@ stopifnot(df(0, 1, f2) == Inf,
           df(0, 3, f2) == 0)
 ## only the last one was ok in R 2.2.1 and earlier
 
-x0 <- -2 * 10^-c(22,10,7,5)
-stopifnot(pbinom(x0, size = 3, prob = 0.1) == 0,
-          dbinom(x0, 3, 0.1) == 0) # d*() warns about non-integer
+x0 <- -2 * 10^-c(22,10,7,5) # ==> d*() warns about non-integer:
+assertWarning(fx0 <- dbinom(x0, size = 3, prob = 0.1))
+stopifnot(fx0 == 0,  pbinom(x0, size = 3, prob = 0.1) == 0)
+
 ## very small negatives were rounded to 0 in R 2.2.1 and earlier
 
 ## dbeta(*, ncp):
@@ -611,7 +607,6 @@ stopifnot(abs(1 - p / pt(qtp, df=1)) < 1e-14)
 stopifnot(all.equal(qt(-740, df=2, log=TRUE), -exp(370)/sqrt(2)))
 ## P ~ 1 (=> p ~ 0.5):
 p.5 <- 0.5 + 2^(-5*(5:8))
-p.5 - 0.5
 stopifnot(all.equal(qt(p.5, df = 2),
 		    c(8.429369702179e-08, 2.634178031931e-09,
 		      8.231806349784e-11, 2.572439484308e-12)))
@@ -623,9 +618,9 @@ qtp <- qt(-(20:850), df=1.2, log=TRUE, lower=FALSE)
 stopifnot(abs(5/6 - quantile(diff(log(qtp)), pr=c(0,0.995))) < 1e-11)
 
 ## close to df=1 (where Taylor steps are important!):
-all.equal(-20, pt(qt(-20, df=1.02, log=TRUE),
-                          df=1.02, log=TRUE), tolerance = 1e-12)
-stopifnot(diff(lq <- log(qt(-2^-(10:600), df=1.1, log=TRUE))) > 0.6)
+stopifnot(all.equal(-20, pt(qt(-20, df=1.02, log=TRUE),
+                          df=1.02, log=TRUE), tolerance = 1e-12),
+          diff(lq <- log(qt(-2^-(10:600), df=1.1, log=TRUE))) > 0.6)
 lq1 <- log(qt(-2^-(20:600), df=1, log=TRUE))
 lq2 <- log(qt(-2^-(20:600), df=2, log=TRUE))
 stopifnot(mean(abs(diff(lq1) - log(2)      )) < 1e-8,
@@ -639,17 +634,23 @@ stopifnot(all.equal(lp, -pt(qt(exp(-lp), 1.2), 1.2, log=TRUE), tolerance = 4e-16
 x <- c(.01, .10, .25, .40, .55, .71, .98)
 pbval <- c(-0.04605755624088, -0.3182809860569, -0.7503593555585,
            -1.241555830932, -1.851527837938, -2.76044482378, -8.149862739881)
-all.equal(pbeta(x, 0.8, 2, lower=FALSE, log=TRUE), pbval)
-all.equal(pbeta(1-x, 2, 0.8, log=TRUE), pbval)
+stopifnot(all.equal(pbeta(x, 0.8, 2, lower=FALSE, log=TRUE), pbval),
+          all.equal(pbeta(1-x, 2, 0.8, log=TRUE), pbval))
 qq <- 2^(0:1022)
 df.set <- c(0.1, 0.2, 0.5, 1, 1.2, 2.2, 5, 10, 20, 50, 100, 500)
 for(nu in df.set) {
     pqq <- pt(-qq, df = nu, log=TRUE)
     stopifnot(is.finite(pqq))
 }
-##
-All.eq(pt(2^-30, df=10),
-       0.50000000036238542)# = .5+ integrate(dt, 0,2^-30, df=10, rel.tol=1e-20)
+## PR#14230 -- more extreme beta cases {should no longer rely on denormalized}
+x <- (256:512)/1024
+P <- pbeta(x, 3, 2200, lower.tail=FALSE, log.p=TRUE)
+stopifnot(is.finite(P), P < -600,
+	  -.001 < (D3P <- diff(P, diff = 3)), D3P < 0, diff(D3P) < 0)
+## all but the first 43 where -Inf in R <= 2.9.1
+stopifnot(All.eq(pt(2^-30, df=10),
+                 0.50000000036238542))
+## = .5+ integrate(dt, 0,2^-30, df=10, rel.tol=1e-20)
 
 ## rbinom(*, size) gave NaN for large size up to R <= 2.6.1
 M <- .Machine$integer.max
@@ -665,8 +666,8 @@ stopifnot(qf(1/4, Inf, Inf) == 1,
 	  abs(x - qf(pf(x, f1,f2, log.p=TRUE), f1,f2, log.p=TRUE)) < 1e-4)
 
 ## qbeta(*, log.p) for "border" case:
-stopifnot(is.finite(qbeta(-1e10, 50,40, log.p=TRUE)),
-          is.finite(qbeta(-1e10,  2, 3, lower=FALSE, log.p=TRUE)))
+stopifnot(is.finite(q0 <- qbeta(-1e10, 50,40, log.p=TRUE)),
+          1 ==            qbeta(-1e10,  2, 3, log.p=TRUE, lower=FALSE))
 ## infinite loop or NaN in R <= 2.7.0
 
 ## phyper(x, 0,0,0), notably for huge x
@@ -818,6 +819,16 @@ stopifnot(all.equal(px[1], -746.0986886924, tol=1e-12),
           -4.2e-8 < d2., d2. < -4.18e-8)
 ## were way off in R <= 3.1.0
 
+c0 <- system.time(p0 <- pbeta(  .9999, 1e30, 1.001, log=TRUE))
+cB <- max(.001, c0[[1]])# base time
+c1 <- system.time(p1 <- pbeta(1- 1e-9, 1e30, 1.001, log=TRUE))
+c2 <- system.time(p2 <- pbeta(1-1e-12, 1e30, 1.001, log=TRUE))
+stopifnot(all.equal(p0, -1.000050003333e26, tol=1e-10),
+          all.equal(p1, -1e21, tol = 1e-6),
+          all.equal(p2, -9.9997788e17),
+          c(c1[[1]], c2[[1]]) < 1000*cB)
+## (almost?) infinite loop in R <= 3.1.0
+
 
 ## pbinom(), dbinom(), dhyper(),.. : R allows "almost integer" n
 for (FUN in c(function(n) dbinom(1,n,0.5), function(n) pbinom(1,n,0.5),
@@ -828,5 +839,202 @@ for (FUN in c(function(n) dbinom(1,n,0.5), function(n) pbinom(1,n,0.5),
             stop("NA for M=",M, "; 10ex=",paste((2:20)[is.na(P)], collapse=", "))}))
 ## check was too tight for large n in R <= 3.1.0 (PR#15734)
 
+## [dpqr]beta(*, a,b) where a and/or b are Inf
+stopifnot(pbeta(.1, Inf, 40) == 0,
+          pbeta(.5, 40, Inf) == 1,
+          pbeta(.4, Inf,Inf) == 0,
+          pbeta(.5, Inf,Inf) == 1,
+          ## gave infinite loop (or NaN) in R <= 3.1.0
+          qbeta(.9, Inf, 100) == 1, # Inf.loop
+          qbeta(.1, Inf, Inf) == 1/2)# NaN + Warning
+## range check (in "close" cases):
+assertWarning(qN <- qbeta(2^-(10^(1:3)), 2,3, log.p=TRUE))
+assertWarning(qn <- qbeta(c(-.1, -1e-300, 1.25), 2,3))
+stopifnot(is.nan(qN), is.nan(qn))
+
+## lognormal boundary case sdlog = 0:
+p <- (0:8)/8; x <- 2^(-10:10)
+stopifnot(all.equal(qlnorm(p, meanlog=1:2, sdlog=0),
+		    qlnorm(p, meanlog=1:2, sdlog=1e-200)),
+	  dlnorm(x, sdlog=0) == ifelse(x == 1, Inf, 0))
+
+## qbeta(*, a,b) when  a,b << 1 : can easily fail
+qbeta(2^-28, 0.125, 2^-26) # 1000 Newton it + warning
+a <- 1/8; b <- 2^-(4:200); alpha <- b/4
+qq <- qbeta(alpha, a,b)# gave warnings intermediately
+pp <- pbeta(qq, a,b)
+stopifnot(pp > 0, diff(pp) < 0, ## pbeta(qbeta(alpha,*),*) == alpha:
+          abs(1 - pp/alpha) < 4e-15)# seeing 2.2e-16
+
+## orig. qbeta() using *many* Newton steps; case where we "know the truth"
+a <- 25; b <- 6; x <- 2^-c(3:15, 100, 200, 250, 300+100*(0:7))
+pb <- c(## via Rmpfr's roundMpfr(pbetaI(x, a,b, log.p=TRUE, precBits = 2048), 64) :
+    -40.7588797271766572448, -57.7574063441183625303, -74.9287878018119846216,
+    -92.1806244636893542185, -109.471318248524419364, -126.781111923947395655,
+    -144.100375042814531426, -161.424352961544612370, -178.750683324909148353,
+    -196.078188674895169383, -213.406281209657976525, -230.734667259724367416,
+    -248.063200048177428608, -1721.00081201679567511, -3453.86876341665894863,
+    -4320.30273911659058550, -5186.73671481652222237, -6919.60466621638549567,
+    -8652.47261761624876897, -10385.3405690161120427, -12118.2085204159753165,
+    -13851.0764718158385902, -15583.9444232157018631, -17316.8123746155651368)
+stopifnot(all.equal(pb, pbeta(x,a,b, log.p=TRUE), tol=8e-16))# seeing {1.5|1.6|2.0}e-16
+qp <- qbeta(pb, a,b, log.p=TRUE)
+## x == qbeta(pbeta(x, *), *) :
+stopifnot(qp > 0, all.equal(x, qp, tol= 1e-15))# seeing {2.4|3.3}e-16
+
+## qbeta(), PR#15755
+a1 <- 0.0672788; b1 <- 226390
+p <- 0.6948886
+qp <- qbeta(p, a1,b1)
+stopifnot(qp < 2e-8, # was '1' (with a warning) in R <= 3.1.0
+          All.eq(p, pbeta(qp, a1,b1)))
+## less extreme example, same phenomenon:
+a <- 43779; b <- 0.06728
+stopifnot(All.eq(0.695, pbeta(qbeta(0.695, b,a), b,a)))
+x <- -exp(seq(0, 14, by=2^-9))
+ct <- system.time(qx <- qbeta(x, a,b, log.p=TRUE))[[1]]
+pqx <- pbeta(qx, a,b, log=TRUE)
+stopifnot(all.equal(x, pqx, tol= 2e-15)) # seeing {3.51|3.54}e-16
+## note that qx[x > -exp(2)] is too close to 1 to get full accuracy:
+## i2 <- x > -exp(2); all.equal(x[i2], pqx[i2], tol= 0)#-> 5.849e-12
+if(ct > 0.5) { cat("system.time:\n"); print(ct) }# lynne(2013): 0.048
+## was Inf, and much slower, for R <= 3.1.0
+x3 <- -(15450:15700)/2^11
+pq3 <- pbeta(qbeta(x3, a,b, log.p=TRUE), a,b, log=TRUE)
+stopifnot(mean(abs(pq3-x3)) < 4e-12,# 1.46e-12
+          max (abs(pq3-x3)) < 8e-12)# 2.95e-12
+##
+.a <- .2; .b <- .03; lp <- -(10^-(1:323))
+qq <- qbeta(lp, .a,.b, log=TRUE) # warnings in R <= 3.1.0
+assertWarning(qN <- qbeta(.5, 2,3, log.p=TRUE))
+assertWarning(qn <- qbeta(c(-.1, 1.25), 2,3))
+stopifnot(1-qq < 1e-15, is.nan(qN), is.nan(qn))# typically qq == 1  exactly
+## failed in intermediate versions
+##
+a <- 2^-8; b <- 2^(200:500)
+pq <- pbeta(qbeta(1/8, a, b), a, b)
+stopifnot(abs(pq - 1/8) < 1/8)
+## whereas  qbeta() would underflow to 0 "too early", for R <= 3.1.0
+#
+## very extreme tails on both sides
+x <- c(1e-300, 1e-12, 1e-5, 0.1, 0.21, 0.3)
+stopifnot(0 == qbeta(x, 2^-12, 2^-10))## gave warnings
+a <- 10^-(8:323)
+qb <- qbeta(0.95, a, 20)
+## had warnings and wrong value +1; also NaN
+ct2 <- system.time(q2 <- qbeta(0.95, a,a))[1]
+stopifnot(is.finite(qb), qb < 1e-300, q2 == 1)
+if(ct2 > 0.020) { cat("system.time:\n"); print(ct2) }
+## had warnings and was much slower for R <= 3.1.0
+
+## qt(p, df= Inf, ncp)  <==> qnorm(p, m=ncp)
+p <- (0:32)/32
+stopifnot(all.equal(qt(p, df=Inf, ncp=5), qnorm(p, m=5)))
+## qt(*, df=Inf, .)  gave NaN in  R <= 3.2.1
+
+## rhyper(*, <large>);  PR#16489
+ct3 <- system.time(N <- rhyper(100, 8000, 1e9-8000, 1e6))[1]
+table(N)
+summary(N)
+stopifnot(abs(mean(N) - 8) < 1.5)
+if(ct3 > 0.02) { cat("system.time:\n"); print(ct3) }
+## N were all 0 and took very long for R <= 3.2.1
+set.seed(17)
+stopifnot(rhyper(1, 3024, 27466, 251) == 25,
+          rhyper(1,  329,  3059, 225) == 22)
+## failed for a day after a "thinko" in the above bug fix.
+
+## *chisq(*, df=0, ncp=0) == Point mass at 0
+stopifnot(rchisq(32,        df=0, ncp=0) == 0,
+          dchisq((0:16)/16, df=0, ncp=0) == c(Inf, rep(0, 16)))
+## gave all NaN's  for R <= 3.2.2
+
+## pchisq(*, df=0, ncp > 0, log.p=TRUE) :
+th <- 10*c(1:9,10^c(1:3,7))
+pp <- pchisq(0, df = 0, ncp=th, log.p=TRUE)
+stopifnot(all.equal(pp, -th/2, tol=1e-15))
+## underflowed at about th ~= 60  in R <= 3.2.2
+
+## pnbinom (-> C's bratio())
+op <- options(warn = 1)# -- NaN's giving warnings
+L <- 1e308; p <- suppressWarnings(pnbinom(L, L, mu = 5)) # NaN or 1 (for 64 / 32 bit)
+is.nan(p) || p == 1
+## gave infinite loop on some 64b platforms in R <= 3.2.3
+
+## [dpqr]nbinom(*, mu, size=Inf) -- PR#16727
+L <- 1e308; mu <- 5; pp <- (0:16)/16
+x <- c(0:3, 1e10, 1e100, L, Inf)
+(d <- dnbinom(x,  mu = mu, size = Inf)) # gave NaN (for 0 and L)
+(p <- pnbinom(x,  mu = mu, size = Inf)) # gave all NaN
+(q <- qnbinom(pp, mu = mu, size = Inf)) # gave all NaN
+set.seed(1); NI <- rnbinom(32, mu = mu, size = Inf)# gave all NaN
+set.seed(1); N2 <- rnbinom(32, mu = mu, size = L  )
+stopifnot(all.equal(d, dpois(x, mu)),
+	  all.equal(p, ppois(x, mu)),
+	  q == qpois(pp, mu),
+	  identical(NI, N2))
+options(op)
+## size = Inf -- mostly gave NaN  in R <= 3.2.3
+
+## qpois(p, *) for invalid 'p' should give NaN -- PR#16972
+stopifnot(is.nan(suppressWarnings(c(qpois(c(-2,3, NaN), 3), qpois(1, 3, log.p=TRUE),
+                                    qpois(.5, 0, log.p=TRUE), qpois(c(-1,pi), 0)))))
+## those in the 2nd line gave 0 in R <= 3.3.1
+## Similar but different for qgeom():
+stopifnot(qgeom((0:8)/8, prob=1) == 0, ## p=1 gave Inf in R <= 3.3.1
+          is.nan(suppressWarnings(qgeom(c(-1/4, 1.1), prob=1))))
+
+## all our RNG  r<dist>() functions:
+##' catch all: value and warnings or error <-- demo(error.catching) :
+tryCatch.W.E <- function(expr) {
+    W <- NULL
+    w.handler <- function(w){ # warning handler
+	W <<- w
+	invokeRestart("muffleWarning")
+    }
+    list(value = withCallingHandlers(tryCatch(expr, error = function(e) e),
+				     warning = w.handler),
+	 warning = W)
+}
+.stat.ns <- asNamespace("stats")
+Ns <- 4
+for(dist in PDQR) {
+    fn <- paste0("r",dist)
+    cat(sprintf("%-9s(%d, ..): ", fn, Ns))
+    F <- get(fn, envir = .stat.ns)
+    nArg <- length(fms <- formals(F))
+    if(dist %in% c("nbinom", "gamma")) ## cannot specify *both* 'prob' & 'mu' / 'rate' & 'scale'
+        nArg <- nArg - 1
+    nA1 <- nArg - 1 # those beside the first (= 'n' mostly)
+    expected <- rep(if(dist %in% PDQRinteg) NA_integer_ else NaN, Ns)
+    for(ia in seq_len(nA1)) {
+        aa <- rep(list(1), nA1)
+        aa[[ia]] <- NA
+        cat(ia,"")
+        R <- tryCatch.W.E( do.call(F, c(Ns, aa)) )
+        if(!inherits(R$warning, "simpleWarning")) cat(" .. did *NOT* give a warning! ")
+	if(!(identical(R$value, expected))) { ## allow NA/NaN mismatch in these cases for now:
+	    if(!(dist %in% c("beta","f","t") && all(is.na(R$value))))
+		cat(" .. not giving expected NA/NaN's ")
+        }
+    }
+    cat(" [Ok]\n")
+}
+
+
+## qbeta() in very asymmetric cases
+sh2 <- 2^seq(9,16, by=1/16)
+qbet <- qbeta(1e-10, 1.5, shape2=sh2, lower.tail=FALSE)
+plot(sh2, 1- pbeta(qbet, 1.5, sh2, lower.tail=FALSE) * 1e10, log="x")
+dqb <- diff(qbet); d2qb <- diff(dqb); d3qb <- diff(d2qb)
+stopifnot(all.equal(qbet[[1]], 0.047206901483498, tol=1e-12),
+	  max(abs(1- pbeta(qbet, 1.5, sh2, lower.tail=FALSE) * 1e10)) < 1e-12,# Lx 64b: 2.4e-13
+	  0 > dqb, dqb > -0.002,
+	  0 < d2qb, d2qb < 0.00427,
+	  -3.2e-8 > d3qb, d3qb > -3.1e-6,
+	  diff(d3qb) > 1e-9)
+## had discontinuity (from wrong jump out of Newton) in R <= 3.3.2
+
+
 
 cat("Time elapsed: ", proc.time() - .ptime,"\n")
diff --git a/tests/d-p-q-r-tests.Rout.save b/tests/d-p-q-r-tests.Rout.save
index 7900e4e..3a2ddc2 100644
--- a/tests/d-p-q-r-tests.Rout.save
+++ b/tests/d-p-q-r-tests.Rout.save
@@ -1,7 +1,7 @@
 
-R version 3.1.2 RC (2014-10-29 r66897) -- "Pumpkin Helmet"
-Copyright (C) 2014 The R Foundation for Statistical Computing
-Platform: x86_64-unknown-linux-gnu (64-bit)
+R version 3.4.0 RC (2017-04-18 r72543) -- "You Stupid Darkness"
+Copyright (C) 2017 The R Foundation for Statistical Computing
+Platform: x86_64-pc-linux-gnu (64-bit)
 
 R is free software and comes with ABSOLUTELY NO WARRANTY.
 You are welcome to redistribute it under certain conditions.
@@ -26,14 +26,18 @@ Type 'q()' to quit R.
 > F <- FALSE
 > T <- TRUE
 > 
+> options(warn = 2)
+> ##      ======== No warnings, unless explicitly asserted via
+> assertWarning <- tools::assertWarning
+> 
+> as.nan <- function(x) { x[is.na(x) & !is.nan(x)] <- NaN ; x }
 > ###-- these are identical in ./arith-true.R ["fixme": use source(..)]
 > opt.conformance <- 0
 > Meps <- .Machine $ double.eps
 > xMax <- .Machine $ double.xmax
 > options(rErr.eps = 1e-30)
-> rErr <- function(approx, true, eps = .Options$rErr.eps)
+> rErr <- function(approx, true, eps = getOption("rErr.eps", 1e-30))
 + {
-+     if(is.null(eps)) { eps <- 1e-30; options(rErr.eps = eps) }
 +     ifelse(Mod(true) >= eps,
 + 	   1 - approx / true, # relative error
 + 	   true - approx)     # absolute error (e.g. when true=0)
@@ -43,7 +47,8 @@ Type 'q()' to quit R.
 +     all.equal.numeric(x,y, tolerance = 64*.Machine$double.eps,
 +                       scale = max(0, mean(abs(x), na.rm=TRUE)))
 + }
-> if(!interactive()) set.seed(123)
+> if(!interactive())
++     set.seed(123)
 > 
 > ## The prefixes of ALL the PDQ & R functions
 > PDQRinteg <- c("binom", "geom", "hyper", "nbinom", "pois","signrank","wilcox")
@@ -61,150 +66,62 @@ Type 'q()' to quit R.
 > ## Abramowitz & Stegun, p.945-6;  26.5.24  AND	26.5.28 :
 > n0 <- 50; n1 <- 16; n2 <- 20; n3 <- 8
 > for(n in rbinom(n1, size = 2*n0, p = .4)) {
-+     cat("n=",n,": ")
 +     for(p in c(0,1,rbeta(n2, 2,4))) {
-+ 	cat(".")
-+ 	for(k in rbinom(n3, size = n,  prob = runif(1))) {
++ 	for(k in rbinom(n3, size = n,  prob = runif(1)))
 + 	    ## For X ~ Bin(n,p), compute 1 - P[X > k] = P[X <= k] in three ways:
-+ 	    tst1 <- all.equal(	     pbinom(0:k, size = n, prob = p),
-+ 			      cumsum(dbinom(0:k, size = n, prob = p)))
-+ 	    tst <- all.equal(if(k==n || p==0) 1 else
-+ 			     pf((k+1)/(n-k)*(1-p)/p, df1=2*(n-k), df2=2*(k+1)),
-+ 			     sum(dbinom(0:k, size = n, prob = p)))
-+ 	    if(!isTRUE(tst1) || !isTRUE(tst)) {
-+ 		cat("n=", n,"; p =",format(p),".  k =",k)
-+ 		if(!isTRUE(tst1)) cat("; tst1=",tst1)
-+ 		if(!isTRUE(tst )) cat("; tst=", tst)
-+ 		cat("\n")
-+ 	    }
-+ 	}
++ 	    stopifnot(all.equal(       pbinom(0:k, size = n, prob = p),
++ 				cumsum(dbinom(0:k, size = n, prob = p))),
++ 		      all.equal(if(k==n || p==0) 1 else
++ 				pf((k+1)/(n-k)*(1-p)/p, df1=2*(n-k), df2=2*(k+1)),
++ 				sum(dbinom(0:k, size = n, prob = p))))
 +     }
-+     cat("\n")
 + }
-n= 39 : ......................
-n= 50 : ......................
-n= 35 : ......................
-n= 44 : ......................
-n= 39 : ......................
-n= 44 : ......................
-n= 37 : ......................
-n= 45 : ......................
-n= 44 : ......................
-n= 40 : ......................
-n= 33 : ......................
-n= 42 : ......................
-n= 41 : ......................
-n= 38 : ......................
-n= 38 : ......................
-n= 47 : ......................
 > 
 > ##__ 2. Geometric __
-> for(pr in seq(1e-10,1,len=15)) { # p=0 is not a distribution
-+     print(All.eq((dg <- dgeom(0:10, pr)),
-+ 		 pr * (1-pr)^(0:10)))
-+     print(All.eq(cumsum(dg), pgeom(0:10, pr)))
-+ }
-[1] TRUE
-[1] TRUE
-[1] TRUE
-[1] TRUE
-[1] TRUE
-[1] TRUE
-[1] TRUE
-[1] TRUE
-[1] TRUE
-[1] TRUE
-[1] TRUE
-[1] TRUE
-[1] TRUE
-[1] TRUE
-[1] TRUE
-[1] TRUE
-[1] TRUE
-[1] TRUE
-[1] TRUE
-[1] TRUE
-[1] TRUE
-[1] TRUE
-[1] TRUE
-[1] TRUE
-[1] TRUE
-[1] TRUE
-[1] TRUE
-[1] TRUE
-[1] TRUE
-[1] TRUE
+> for(pr in seq(1e-10,1,len=15)) # p=0 is not a distribution
++     stopifnot(All.eq((dg <- dgeom(0:10, pr)),
++ 		     pr * (1-pr)^(0:10)),
++ 	      All.eq(cumsum(dg), pgeom(0:10, pr)))
+> 
 > 
 > ##__ 3. Hypergeometric __
 > 
 > m <- 10; n <- 7
 > for(k in 2:m) {
 +     x <- 0:(k+1)
-+     print(All.eq(phyper(x, m, n, k), cumsum(dhyper(x, m, n, k))))
++     stopifnot(All.eq(phyper(x, m, n, k), cumsum(dhyper(x, m, n, k))))
 + }
-[1] TRUE
-[1] TRUE
-[1] TRUE
-[1] TRUE
-[1] TRUE
-[1] TRUE
-[1] TRUE
-[1] TRUE
-[1] TRUE
 > 
 > ##__ 4. Negative Binomial __
 > 
 > ## PR #842
 > for(size in seq(0.8,2, by=.1))
-+     print(all.equal(cumsum(dnbinom(0:7, size, .5)),
-+ 			   pnbinom(0:7, size, .5)))
-[1] TRUE
-[1] TRUE
-[1] TRUE
-[1] TRUE
-[1] TRUE
-[1] TRUE
-[1] TRUE
-[1] TRUE
-[1] TRUE
-[1] TRUE
-[1] TRUE
-[1] TRUE
-[1] TRUE
-> All.eq(pnbinom(c(1,3), .9, .5), c(0.777035760338812, 0.946945347071519))
-[1] TRUE
++     stopifnot(all.equal(cumsum(dnbinom(0:7, size, .5)),
++ 			       pnbinom(0:7, size, .5)))
+> stopifnot(All.eq(pnbinom(c(1,3), .9, .5),
++ 		 c(0.777035760338812, 0.946945347071519)))
 > 
 > ##__ 5. Poisson __
 > 
-> all(dpois(0:5,0)	   == c(1, rep(0,5)))
-[1] TRUE
-> all(dpois(0:5,0, log=TRUE) == c(0, rep(-Inf, 5)))
-[1] TRUE
+> stopifnot(dpois(0:5,0)		 == c(1, rep(0,5)),
++ 	  dpois(0:5,0, log=TRUE) == c(0, rep(-Inf, 5)))
 > 
 > ## Cumulative Poisson '==' Cumulative Chi^2 :
 > ## Abramowitz & Stegun, p.941 :	 26.4.21 (26.4.2)
 > n1 <- 20; n2 <- 16
 > for(lambda in rexp(n1))
-+     for(k in rpois(n2, lambda)) {
-+ 	tst <- all.equal(1 - pchisq(2*lambda, 2*(1+ 0:k)),
-+ 			 pp <- cumsum(dpois(0:k, lambda=lambda)),
-+                          tolerance = 100*Meps)
-+ 	if(!isTRUE(tst))
-+ 	    cat("lambda=", format(lambda),".  k =",k, " --> tst=", tst,"\n")
-+ 	tst2 <- all.equal(pp, ppois(0:k, lambda=lambda), tolerance = 100*Meps)
-+ 	if(!isTRUE(tst2))
-+ 	    cat("lambda=", format(lambda),".  k =",k, " --> tst2=", tst2,"\n")
-+ 	tst3 <- all.equal(1 - pp, ppois(0:k, lambda=lambda, lower.tail = FALSE))
-+ 	if(!isTRUE(tst3))
-+ 	    cat("lambda=", format(lambda),".  k =",k, " --> tst3=", tst3,"\n")
-+     }
++     for(k in rpois(n2, lambda))
++ 	stopifnot(all.equal(1 - pchisq(2*lambda, 2*(1+ 0:k)),
++ 			    pp <- cumsum(dpois(0:k, lambda=lambda)),
++ 			    tolerance = 100*Meps),
++ 		  all.equal(pp, ppois(0:k, lambda=lambda), tolerance = 100*Meps),
++ 		  all.equal(1 - pp, ppois(0:k, lambda=lambda, lower.tail = FALSE)))
 > 
 > 
 > ##__ 6. SignRank __
 > for(n in rpois(32, lam=8)) {
 +     x <- -1:(n + 4)
-+     if(!isTRUE(eq <- All.eq(psignrank(x, n), cumsum(dsignrank(x, n)))))
-+         print(eq)
++     stopifnot(All.eq(psignrank(x, n), cumsum(dsignrank(x, n))))
 + }
 > 
 > ##__ 7. Wilcoxon (symmetry & cumulative) __
@@ -215,11 +132,9 @@ n= 47 : ......................
 + 	fx <- dwilcox(x, n, m)
 + 	Fx <- pwilcox(x, n, m)
 + 	is.sym <- is.sym & all(fx == dwilcox(x, m, n))
-+ 	if(!isTRUE(eq <- All.eq(Fx, cumsum(fx))))
-+             print(eq)
++ 	stopifnot(All.eq(Fx, cumsum(fx)))
 +     }
-> is.sym
-[1] TRUE
+> stopifnot(is.sym)
 > 
 > 
 > ###-------- Continuous Distributions ----------
@@ -228,28 +143,20 @@ n= 47 : ......................
 > x <- round(rgamma(100, shape = 2),2)
 > for(sh in round(rlnorm(30),2)) {
 +     Ga <- gamma(sh)
-+     for(sig in round(rlnorm(30),2)) {
-+ 	tst <- all.equal((d1 <- dgamma(	 x,   shape = sh, scale = sig)),
-+ 			 (d2 <- dgamma(x/sig, shape = sh, scale = 1) / sig),
-+ 			 tolerance = 1e-14)## __ad interim__ was 1e-15
-+ 	if(!isTRUE(tst))
-+ 	    cat("ERROR: dgamma() doesn't scale:",tst,"\n",
-+ 		"  x =", formatC(x),"\n	 shape,scale=",formatC(c(sh, sig)),"\n")
-+ 	tst <- All.eq(d1, (d3 <- 1/(Ga * sig^sh) * x^(sh-1) * exp(-x/sig)))
-+ 	if(!isTRUE(tst))
-+ 	    cat("NOT Equal:",tst,"\n x =", formatC(x),
-+ 		"\n  shape,scale=",formatC(c(sh, sig)),"\n")
-+     }
++     for(sig in round(rlnorm(30),2))
++ 	stopifnot(all.equal((d1 <- dgamma(	 x,   shape = sh, scale = sig)),
++                             (d2 <- dgamma(x/sig, shape = sh, scale = 1) / sig),
++                             tolerance = 1e-14)## __ad interim__ was 1e-15
++                   ,
++                   All.eq(d1, (d3 <- 1/(Ga * sig^sh) * x^(sh-1) * exp(-x/sig)))
++                   )
 + }
-> pgamma(1,Inf,scale=Inf) == 0
-[1] TRUE
+> 
+> stopifnot(pgamma(1,Inf,scale=Inf) == 0)
 > ## Also pgamma(Inf,Inf) == 1 for which NaN was slightly more appropriate
-> all(is.nan(c(pgamma(Inf,  1,scale=Inf),
-+              pgamma(Inf,Inf,scale=Inf))))
-[1] TRUE
-Warning messages:
-1: In pgamma(Inf, 1, scale = Inf) : NaNs produced
-2: In pgamma(Inf, Inf, scale = Inf) : NaNs produced
+> assertWarning(stopifnot(
++     is.nan(c(pgamma(Inf,  1,scale=Inf),
++              pgamma(Inf,Inf,scale=Inf)))))
 > scLrg <- c(2,100, 1e300*c(.1, 1,10,100), 1e307, xMax, Inf)
 > stopifnot(pgamma(Inf, 1, scale=xMax) == 1,
 +           pgamma(xMax,1, scale=Inf) == 0,
@@ -261,122 +168,90 @@ Warning messages:
 +           )
 > 
 > p <- 7e-4; df <- 0.9
-> abs(1-c(pchisq(qchisq(p, df),df)/p, # was 2.31e-8 for R <= 1.8.1
+> stopifnot(
++ abs(1-c(pchisq(qchisq(p, df),df)/p, # was 2.31e-8 for R <= 1.8.1
 +         pchisq(qchisq(1-p, df,lower=FALSE),df,lower=FALSE)/(1-p),# was 1.618e-11
 +         pchisq(qchisq(log(p), df,log=TRUE),df, log=TRUE)/log(p), # was 3.181e-9
 +         pchisq(qchisq(log1p(-p),df,log=T,lower=F),df, log=T,lower=F)/log1p(-p)
 +         )# 32b-i386: (2.2e-16, 0,0, 3.3e-16); Opteron: (2.2e-16, 0,0, 2.2e-15)
 +     ) < 1e-14
-[1] TRUE TRUE TRUE TRUE
++ )
 > 
 > ##-- non central Chi^2 :
 > xB <- c(2000,1e6,1e50,Inf)
 > for(df in c(0.1, 1, 10))
 +     for(ncp in c(0, 1, 10, 100)) stopifnot(pchisq(xB, df=df, ncp=ncp) == 1)
-> all.equal(qchisq(0.025,31,ncp=1,lower.tail=FALSE),# inf.loop PR#875
-+           49.7766246561514, tolerance = 1e-11)
-[1] TRUE
+> stopifnot(all.equal(qchisq(0.025,31,ncp=1,lower.tail=FALSE),# inf.loop PR#875
++                     49.7766246561514, tolerance = 1e-11))
 > for(df in c(0.1, 0.5, 1.5, 4.7, 10, 20,50,100)) {
-+     cat("df =", formatC(df, wid=3))
 +     xx <- c(10^-(5:1), .9, 1.2, df + c(3,7,20,30,35,38))
 +     pp <- pchisq(xx, df=df, ncp = 1) #print(pp)
 +     dtol <- 1e-12 *(if(2 < df && df <= 50) 64 else if(df > 50) 20000 else 501)
-+     print(all.equal(xx, qchisq(pp, df=df, ncp=1), tolerance = dtol))# TRUE
-+     ##or print(mapply(rErr, xx, qchisq(pp, df=df,ncp=1)), digits = 3)
++     stopifnot(all.equal(xx, qchisq(pp, df=df, ncp=1), tolerance = dtol))
 + }
-df = 0.1[1] TRUE
-df = 0.5[1] TRUE
-df = 1.5[1] TRUE
-df = 4.7[1] TRUE
-df =  10[1] TRUE
-df =  20[1] TRUE
-df =  50[1] TRUE
-df = 100[1] TRUE
 > 
 > ## p ~= 1 (<==> 1-p ~= 0) -- gave infinite loop in R <= 1.8.1 -- PR#6421
-> options(warn=-1) # ignore warnings from R's version of log1p
 > psml <- 2^-(10:54)
 > q0 <- qchisq(psml,    df=1.2, ncp=10, lower.tail=FALSE)
 > q1 <- qchisq(1-psml, df=1.2, ncp=10) # inaccurate in the tail
 > p0 <- pchisq(q0, df=1.2, ncp=10, lower.tail=FALSE)
 > p1 <- pchisq(q1, df=1.2, ncp=10, lower.tail=FALSE)
 > iO <- 1:30
-> all.equal(q0[iO], q1[iO], tolerance = 1e-5)
-[1] TRUE
-> all.equal(p0[iO], psml[iO])
-[1] TRUE
-> options(warn=0)
+> stopifnot(all.equal(q0[iO], q1[iO], tolerance = 1e-5),# 9.86e-8
++           all.equal(p0[iO], psml[iO])) # 1.07e-13
 > 
 > ##--- Beta (need more):
 > 
 > ## big a & b (PR #643)
-> summary(a <- rlnorm(20, 5.5))
-   Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
-  54.74  180.10  279.40  530.70  785.00 2842.00 
-> summary(b <- rlnorm(20, 6.5))
-   Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
-  139.7   459.5   749.9  1113.0  1479.0  5387.0 
+> stopifnot(is.finite(a <- rlnorm(20, 5.5)), a > 0,
++           is.finite(b <- rlnorm(20, 6.5)), b > 0)
 > pab <- expand.grid(seq(0,1,by=.1), a, b)
 > p <- pab[,1]; a <- pab[,2]; b <- pab[,3]
-> all.equal(dbeta(p,a,b), exp(pab <- dbeta(p,a,b, log = TRUE)), tolerance = 1e-11)
-[1] TRUE
-> sample(pab, 50)
- [1]     0.5684734   -15.3812126          -Inf  -647.0316608 -1776.0647576
- [6]  -123.1916325  -740.1238787  -808.4127354  -290.7239227  -407.6274849
-[11]          -Inf  -869.0911667   -79.1746272  -627.5238085          -Inf
-[16] -1510.0939127   -20.4159620  -131.6241954  -702.3419988          -Inf
-[21]     2.1972704          -Inf          -Inf  -495.6416130    -6.9542025
-[26]   -27.0548912  -708.4810716  -164.8837570  -413.8854518          -Inf
-[31]  -305.9834725   -20.0267958   -17.7687346  -158.4013464   -32.5114184
-[36] -2906.1239814   -65.6720075   -20.6466431          -Inf   -66.1286480
-[41]  -336.1188692          -Inf          -Inf  -142.1023940   -19.7794842
-[46]          -Inf          -Inf   -12.0769413          -Inf  -124.4908467
+> stopifnot(all.equal(dbeta(p,a,b),
++                     exp(pab <- dbeta(p,a,b, log = TRUE)), tolerance = 1e-11))
+> sp <- sample(pab, 50)
+> if(!interactive())
++ stopifnot(which(isI <- sp == -Inf) ==
++               c(3, 11, 15, 20, 22, 23, 30, 39, 42, 43, 46, 47, 49),
++           all.equal(range(sp[!isI]), c(-2906.123981, 2.197270387))
++           )
 > 
 > 
 > ##--- Normal (& Lognormal) :
 > 
-> qnorm(0) == -Inf && qnorm(-Inf, log = TRUE) == -Inf
-[1] TRUE
-> qnorm(1) ==  Inf && qnorm(0, log = TRUE) == Inf
-[1] TRUE
+> stopifnot(
++     qnorm(0) == -Inf, qnorm(-Inf, log = TRUE) == -Inf,
++     qnorm(1) ==  Inf, qnorm( 0,   log = TRUE) ==  Inf)
 > 
-> is.nan(qnorm(1.1)) &&
-+ is.nan(qnorm(-.1)) # + warn
-[1] TRUE
-Warning messages:
-1: In qnorm(1.1) : NaNs produced
-2: In qnorm(-0.1) : NaNs produced
+> assertWarning(stopifnot(
++     is.nan(qnorm(1.1)),
++     is.nan(qnorm(-.1))))
 > 
 > x <- c(-Inf, -1e100, 1:6, 1e200, Inf)
-> rbind(d.s0 =dnorm(x,3,s=0),   p.s0 = pnorm(x,3,s=0),
-+       d.sI =dnorm(x,3,s=Inf), p.sI = pnorm(x,3,s=Inf))
-     [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10]
-d.s0    0  0.0  0.0  0.0  Inf  0.0  0.0  0.0  0.0     0
-p.s0    0  0.0  0.0  0.0  1.0  1.0  1.0  1.0  1.0     1
-d.sI    0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0     0
-p.sI    0  0.5  0.5  0.5  0.5  0.5  0.5  0.5  0.5     1
+> stopifnot(
++     dnorm(x,3,s=0) == c(0,0,0,0, Inf, 0,0,0,0,0),
++     pnorm(x,3,s=0) == c(0,0,0,0,  1 , 1,1,1,1,1),
++     dnorm(x,3,s=Inf) == 0,
++     pnorm(x,3,s=Inf) == c(0, rep(0.5, 8), 1))
 > 
 > ## 3 Test data from Wichura (1988) :
-> all.equal(qnorm(c( 0.25,  .001,	 1e-20)),
-+ 	  c(-0.6744897501960817, -3.090232306167814, -9.262340089798408),
-+ 	  tolerance = 1e-15)
-[1] TRUE
-> # extreme tail -- available on log scale only:
-> all.equal(qnorm(-1e5, log = TRUE), -447.1974945)
-[1] TRUE
+> stopifnot(
++     all.equal(qnorm(c( 0.25,  .001, 1e-20)),
++ 	      c(-0.6744897501960817, -3.090232306167814, -9.262340089798408),
++ 	      tolerance = 1e-15)
++   , ## extreme tail -- available on log scale only:
++     all.equal(qnorm(-1e5, log = TRUE), -447.1974945)
++ )
 > 
 > z <- rnorm(1000); all.equal(pnorm(z),  1 - pnorm(-z), tolerance = 1e-15)
 [1] TRUE
 > z <- c(-Inf,Inf,NA,NaN, rt(1000, df=2))
 > z.ok <- z > -37.5 | !is.finite(z)
-> for(df in 1:10) if(!isTRUE(all.equal(pt(z, df), 1 - pt(-z,df), tolerance = 1e-15)))
-+     cat("ERROR -- df = ", df, "\n")
-> All.eq(pz <- pnorm(z), 1 - pnorm(z, lower=FALSE))
-[1] TRUE
-> All.eq(pz,		 pnorm(-z, lower=FALSE))
-[1] TRUE
-> All.eq(log(pz[z.ok]),  pnorm(z[z.ok], log=TRUE))
-[1] TRUE
+> for(df in 1:10) stopifnot(all.equal(pt(z, df), 1 - pt(-z,df), tolerance = 1e-15))
+> 
+> stopifnot(All.eq(pz <- pnorm(z), 1 - pnorm(z, lower=FALSE)),
++           All.eq(pz,		    pnorm(-z, lower=FALSE)),
++           All.eq(log(pz[z.ok]), pnorm(z[z.ok], log=TRUE)))
 > y <- seq(-70,0, by = 10)
 > cbind(y, "log(pnorm(y))"= log(pnorm(y)), "pnorm(y, log=T)"= pnorm(y, log=TRUE))
        y log(pnorm(y)) pnorm(y, log=T)
@@ -420,8 +295,7 @@ p.sI    0  0.5  0.5  0.5  0.5  0.5  0.5  0.5  0.5     1
 + 			pnorm(+y, log= L, lower=FALSE)))
 > 
 > ## Log norm
-> All.eq(pz, plnorm(exp(z)))
-[1] TRUE
+> stopifnot(All.eq(pz, plnorm(exp(z))))
 > 

 > 
 > ###==========  p <-> q	Inversion consistency =====================
@@ -735,7 +609,7 @@ p.sI    0  0.5  0.5  0.5  0.5  0.5  0.5  0.5  0.5     1
 [1] TRUE
 > All.eq(Rt,	  qt	   (Pt,	 df = 11))
 [1] TRUE
-> all.equal(Rt2,	  qt	   (Pt2, df = 1.01), tolerance = 1e-2)
+> All.eq(Rt2,	  qt	   (Pt2, df = 1.01))
 [1] TRUE
 > All.eq(Runif,	  qunif	   (Punif, min = .2, max = 2))
 [1] TRUE
@@ -777,7 +651,7 @@ p.sI    0  0.5  0.5  0.5  0.5  0.5  0.5  0.5  0.5     1
 [1] TRUE
 > All.eq(Rt,	  qt	   (1- Pt,  df = 11,   lower=F))
 [1] TRUE
-> all.equal(Rt2,	  qt	   (1- Pt2, df = 1.01, lower=F), tolerance = 1e-2)
+> All.eq(Rt2,	  qt	   (1- Pt2, df = 1.01, lower=F))
 [1] TRUE
 > All.eq(Runif,	  qunif	   (1- Punif, min = .2, max = 2, lower=F))
 [1] TRUE
@@ -793,7 +667,7 @@ p.sI    0  0.5  0.5  0.5  0.5  0.5  0.5  0.5  0.5     1
 [1] TRUE
 > All.eq(Rcauchy,	  qcauchy  (log(Pcauchy), location = 12, scale = 2, log=TRUE))
 [1] TRUE
-> all.equal(Rchisq,    qchisq   (log(Pchisq), df = 3, log=TRUE),tolerance =1e-14)
+> All.eq(Rchisq,    qchisq   (log(Pchisq), df = 3, log=TRUE))
 [1] TRUE
 > All.eq(Rexp,	  qexp	   (log(Pexp), rate = 2, log=TRUE))
 [1] TRUE
@@ -819,7 +693,7 @@ p.sI    0  0.5  0.5  0.5  0.5  0.5  0.5  0.5  0.5     1
 [1] TRUE
 > All.eq(Rt,	  qt	   (log(Pt), df = 11, log=TRUE))
 [1] TRUE
-> all.equal(Rt2,	  qt	   (log(Pt2), df = 1.01, log=TRUE), tolerance = 1e-2)
+> All.eq(Rt2,	  qt	   (log(Pt2), df = 1.01, log=TRUE))
 [1] TRUE
 > All.eq(Runif,	  qunif	   (log(Punif), min = .2, max = 2, log=TRUE))
 [1] TRUE
@@ -862,7 +736,7 @@ p.sI    0  0.5  0.5  0.5  0.5  0.5  0.5  0.5  0.5     1
 [1] TRUE
 > All.eq(Rt,	  qt	   (log1p(-Pt ), df = 11,   lower=F, log=T))
 [1] TRUE
-> all.equal(Rt2,	  qt	   (log1p(-Pt2), df = 1.01, lower=F, log=T), tolerance = 1e-2)
+> All.eq(Rt2,	  qt	   (log1p(-Pt2), df = 1.01, lower=F, log=T))
 [1] TRUE
 > All.eq(Runif,	  qunif	   (log1p(-Punif), min = .2, max = 2, lower=F, log=T))
 [1] TRUE
@@ -926,15 +800,7 @@ p.sI    0  0.5  0.5  0.5  0.5  0.5  0.5  0.5  0.5     1
 [1] TRUE
 > x <- 10^(ex <- c(1,2,5*(1:5),50,100,200,300,Inf))
 > for(a in x[ex > 10]) ## improve pt() : cbind(x,t= pt(-x, df=1), C=pcauchy(-x))
-+     print(all.equal(pt(-a, df=1), pcauchy(-a), tolerance = 1e-15))
-[1] TRUE
-[1] TRUE
-[1] TRUE
-[1] TRUE
-[1] TRUE
-[1] TRUE
-[1] TRUE
-[1] TRUE
++     stopifnot(all.equal(pt(-a, df=1), pcauchy(-a), tolerance = 1e-15))
 > ## for PR#7902:
 > ex <- -c(rev(1/x), ex)
 > All.eq(-x, qcauchy(pcauchy(-x)))
@@ -1096,12 +962,10 @@ p.sI    0  0.5  0.5  0.5  0.5  0.5  0.5  0.5  0.5     1
 +           df(0, 3, f2) == 0)
 > ## only the last one was ok in R 2.2.1 and earlier
 > 
-> x0 <- -2 * 10^-c(22,10,7,5)
-> stopifnot(pbinom(x0, size = 3, prob = 0.1) == 0,
-+           dbinom(x0, 3, 0.1) == 0) # d*() warns about non-integer
-Warning messages:
-1: In dbinom(x0, 3, 0.1) : non-integer x = -0.000000
-2: In dbinom(x0, 3, 0.1) : non-integer x = -0.000020
+> x0 <- -2 * 10^-c(22,10,7,5) # ==> d*() warns about non-integer:
+> assertWarning(fx0 <- dbinom(x0, size = 3, prob = 0.1))
+> stopifnot(fx0 == 0,  pbinom(x0, size = 3, prob = 0.1) == 0)
+> 
 > ## very small negatives were rounded to 0 in R 2.2.1 and earlier
 > 
 > ## dbeta(*, ncp):
@@ -1141,8 +1005,6 @@ Warning messages:
 > stopifnot(all.equal(qt(-740, df=2, log=TRUE), -exp(370)/sqrt(2)))
 > ## P ~ 1 (=> p ~ 0.5):
 > p.5 <- 0.5 + 2^(-5*(5:8))
-> p.5 - 0.5
-[1] 2.980232e-08 9.313226e-10 2.910383e-11 9.094947e-13
 > stopifnot(all.equal(qt(p.5, df = 2),
 + 		    c(8.429369702179e-08, 2.634178031931e-09,
 + 		      8.231806349784e-11, 2.572439484308e-12)))
@@ -1154,10 +1016,9 @@ Warning messages:
 > stopifnot(abs(5/6 - quantile(diff(log(qtp)), pr=c(0,0.995))) < 1e-11)
 > 
 > ## close to df=1 (where Taylor steps are important!):
-> all.equal(-20, pt(qt(-20, df=1.02, log=TRUE),
-+                           df=1.02, log=TRUE), tolerance = 1e-12)
-[1] TRUE
-> stopifnot(diff(lq <- log(qt(-2^-(10:600), df=1.1, log=TRUE))) > 0.6)
+> stopifnot(all.equal(-20, pt(qt(-20, df=1.02, log=TRUE),
++                           df=1.02, log=TRUE), tolerance = 1e-12),
++           diff(lq <- log(qt(-2^-(10:600), df=1.1, log=TRUE))) > 0.6)
 > lq1 <- log(qt(-2^-(20:600), df=1, log=TRUE))
 > lq2 <- log(qt(-2^-(20:600), df=2, log=TRUE))
 > stopifnot(mean(abs(diff(lq1) - log(2)      )) < 1e-8,
@@ -1171,20 +1032,23 @@ Warning messages:
 > x <- c(.01, .10, .25, .40, .55, .71, .98)
 > pbval <- c(-0.04605755624088, -0.3182809860569, -0.7503593555585,
 +            -1.241555830932, -1.851527837938, -2.76044482378, -8.149862739881)
-> all.equal(pbeta(x, 0.8, 2, lower=FALSE, log=TRUE), pbval)
-[1] TRUE
-> all.equal(pbeta(1-x, 2, 0.8, log=TRUE), pbval)
-[1] TRUE
+> stopifnot(all.equal(pbeta(x, 0.8, 2, lower=FALSE, log=TRUE), pbval),
++           all.equal(pbeta(1-x, 2, 0.8, log=TRUE), pbval))
 > qq <- 2^(0:1022)
 > df.set <- c(0.1, 0.2, 0.5, 1, 1.2, 2.2, 5, 10, 20, 50, 100, 500)
 > for(nu in df.set) {
 +     pqq <- pt(-qq, df = nu, log=TRUE)
 +     stopifnot(is.finite(pqq))
 + }
-> ##
-> All.eq(pt(2^-30, df=10),
-+        0.50000000036238542)# = .5+ integrate(dt, 0,2^-30, df=10, rel.tol=1e-20)
-[1] TRUE
+> ## PR#14230 -- more extreme beta cases {should no longer rely on denormalized}
+> x <- (256:512)/1024
+> P <- pbeta(x, 3, 2200, lower.tail=FALSE, log.p=TRUE)
+> stopifnot(is.finite(P), P < -600,
++ 	  -.001 < (D3P <- diff(P, diff = 3)), D3P < 0, diff(D3P) < 0)
+> ## all but the first 43 where -Inf in R <= 2.9.1
+> stopifnot(All.eq(pt(2^-30, df=10),
++                  0.50000000036238542))
+> ## = .5+ integrate(dt, 0,2^-30, df=10, rel.tol=1e-20)
 > 
 > ## rbinom(*, size) gave NaN for large size up to R <= 2.6.1
 > M <- .Machine$integer.max
@@ -1200,8 +1064,8 @@ Warning messages:
 + 	  abs(x - qf(pf(x, f1,f2, log.p=TRUE), f1,f2, log.p=TRUE)) < 1e-4)
 > 
 > ## qbeta(*, log.p) for "border" case:
-> stopifnot(is.finite(qbeta(-1e10, 50,40, log.p=TRUE)),
-+           is.finite(qbeta(-1e10,  2, 3, lower=FALSE, log.p=TRUE)))
+> stopifnot(is.finite(q0 <- qbeta(-1e10, 50,40, log.p=TRUE)),
++           1 ==            qbeta(-1e10,  2, 3, log.p=TRUE, lower=FALSE))
 > ## infinite loop or NaN in R <= 2.7.0
 > 
 > ## phyper(x, 0,0,0), notably for huge x
@@ -1353,6 +1217,16 @@ Warning messages:
 +           -4.2e-8 < d2., d2. < -4.18e-8)
 > ## were way off in R <= 3.1.0
 > 
+> c0 <- system.time(p0 <- pbeta(  .9999, 1e30, 1.001, log=TRUE))
+> cB <- max(.001, c0[[1]])# base time
+> c1 <- system.time(p1 <- pbeta(1- 1e-9, 1e30, 1.001, log=TRUE))
+> c2 <- system.time(p2 <- pbeta(1-1e-12, 1e30, 1.001, log=TRUE))
+> stopifnot(all.equal(p0, -1.000050003333e26, tol=1e-10),
++           all.equal(p1, -1e21, tol = 1e-6),
++           all.equal(p2, -9.9997788e17),
++           c(c1[[1]], c2[[1]]) < 1000*cB)
+> ## (almost?) infinite loop in R <= 3.1.0
+> 
 > 
 > ## pbinom(), dbinom(), dhyper(),.. : R allows "almost integer" n
 > for (FUN in c(function(n) dbinom(1,n,0.5), function(n) pbinom(1,n,0.5),
@@ -1363,7 +1237,235 @@ Warning messages:
 +             stop("NA for M=",M, "; 10ex=",paste((2:20)[is.na(P)], collapse=", "))}))
 > ## check was too tight for large n in R <= 3.1.0 (PR#15734)
 > 
+> ## [dpqr]beta(*, a,b) where a and/or b are Inf
+> stopifnot(pbeta(.1, Inf, 40) == 0,
++           pbeta(.5, 40, Inf) == 1,
++           pbeta(.4, Inf,Inf) == 0,
++           pbeta(.5, Inf,Inf) == 1,
++           ## gave infinite loop (or NaN) in R <= 3.1.0
++           qbeta(.9, Inf, 100) == 1, # Inf.loop
++           qbeta(.1, Inf, Inf) == 1/2)# NaN + Warning
+> ## range check (in "close" cases):
+> assertWarning(qN <- qbeta(2^-(10^(1:3)), 2,3, log.p=TRUE))
+> assertWarning(qn <- qbeta(c(-.1, -1e-300, 1.25), 2,3))
+> stopifnot(is.nan(qN), is.nan(qn))
+> 
+> ## lognormal boundary case sdlog = 0:
+> p <- (0:8)/8; x <- 2^(-10:10)
+> stopifnot(all.equal(qlnorm(p, meanlog=1:2, sdlog=0),
++ 		    qlnorm(p, meanlog=1:2, sdlog=1e-200)),
++ 	  dlnorm(x, sdlog=0) == ifelse(x == 1, Inf, 0))
+> 
+> ## qbeta(*, a,b) when  a,b << 1 : can easily fail
+> qbeta(2^-28, 0.125, 2^-26) # 1000 Newton it + warning
+[1] 9.094955e-13
+> a <- 1/8; b <- 2^-(4:200); alpha <- b/4
+> qq <- qbeta(alpha, a,b)# gave warnings intermediately
+> pp <- pbeta(qq, a,b)
+> stopifnot(pp > 0, diff(pp) < 0, ## pbeta(qbeta(alpha,*),*) == alpha:
++           abs(1 - pp/alpha) < 4e-15)# seeing 2.2e-16
+> 
+> ## orig. qbeta() using *many* Newton steps; case where we "know the truth"
+> a <- 25; b <- 6; x <- 2^-c(3:15, 100, 200, 250, 300+100*(0:7))
+> pb <- c(## via Rmpfr's roundMpfr(pbetaI(x, a,b, log.p=TRUE, precBits = 2048), 64) :
++     -40.7588797271766572448, -57.7574063441183625303, -74.9287878018119846216,
++     -92.1806244636893542185, -109.471318248524419364, -126.781111923947395655,
++     -144.100375042814531426, -161.424352961544612370, -178.750683324909148353,
++     -196.078188674895169383, -213.406281209657976525, -230.734667259724367416,
++     -248.063200048177428608, -1721.00081201679567511, -3453.86876341665894863,
++     -4320.30273911659058550, -5186.73671481652222237, -6919.60466621638549567,
++     -8652.47261761624876897, -10385.3405690161120427, -12118.2085204159753165,
++     -13851.0764718158385902, -15583.9444232157018631, -17316.8123746155651368)
+> stopifnot(all.equal(pb, pbeta(x,a,b, log.p=TRUE), tol=8e-16))# seeing {1.5|1.6|2.0}e-16
+> qp <- qbeta(pb, a,b, log.p=TRUE)
+> ## x == qbeta(pbeta(x, *), *) :
+> stopifnot(qp > 0, all.equal(x, qp, tol= 1e-15))# seeing {2.4|3.3}e-16
+> 
+> ## qbeta(), PR#15755
+> a1 <- 0.0672788; b1 <- 226390
+> p <- 0.6948886
+> qp <- qbeta(p, a1,b1)
+> stopifnot(qp < 2e-8, # was '1' (with a warning) in R <= 3.1.0
++           All.eq(p, pbeta(qp, a1,b1)))
+> ## less extreme example, same phenomenon:
+> a <- 43779; b <- 0.06728
+> stopifnot(All.eq(0.695, pbeta(qbeta(0.695, b,a), b,a)))
+> x <- -exp(seq(0, 14, by=2^-9))
+> ct <- system.time(qx <- qbeta(x, a,b, log.p=TRUE))[[1]]
+> pqx <- pbeta(qx, a,b, log=TRUE)
+> stopifnot(all.equal(x, pqx, tol= 2e-15)) # seeing {3.51|3.54}e-16
+> ## note that qx[x > -exp(2)] is too close to 1 to get full accuracy:
+> ## i2 <- x > -exp(2); all.equal(x[i2], pqx[i2], tol= 0)#-> 5.849e-12
+> if(ct > 0.5) { cat("system.time:\n"); print(ct) }# lynne(2013): 0.048
+> ## was Inf, and much slower, for R <= 3.1.0
+> x3 <- -(15450:15700)/2^11
+> pq3 <- pbeta(qbeta(x3, a,b, log.p=TRUE), a,b, log=TRUE)
+> stopifnot(mean(abs(pq3-x3)) < 4e-12,# 1.46e-12
++           max (abs(pq3-x3)) < 8e-12)# 2.95e-12
+> ##
+> .a <- .2; .b <- .03; lp <- -(10^-(1:323))
+> qq <- qbeta(lp, .a,.b, log=TRUE) # warnings in R <= 3.1.0
+> assertWarning(qN <- qbeta(.5, 2,3, log.p=TRUE))
+> assertWarning(qn <- qbeta(c(-.1, 1.25), 2,3))
+> stopifnot(1-qq < 1e-15, is.nan(qN), is.nan(qn))# typically qq == 1  exactly
+> ## failed in intermediate versions
+> ##
+> a <- 2^-8; b <- 2^(200:500)
+> pq <- pbeta(qbeta(1/8, a, b), a, b)
+> stopifnot(abs(pq - 1/8) < 1/8)
+> ## whereas  qbeta() would underflow to 0 "too early", for R <= 3.1.0
+> #
+> ## very extreme tails on both sides
+> x <- c(1e-300, 1e-12, 1e-5, 0.1, 0.21, 0.3)
+> stopifnot(0 == qbeta(x, 2^-12, 2^-10))## gave warnings
+> a <- 10^-(8:323)
+> qb <- qbeta(0.95, a, 20)
+> ## had warnings and wrong value +1; also NaN
+> ct2 <- system.time(q2 <- qbeta(0.95, a,a))[1]
+> stopifnot(is.finite(qb), qb < 1e-300, q2 == 1)
+> if(ct2 > 0.020) { cat("system.time:\n"); print(ct2) }
+> ## had warnings and was much slower for R <= 3.1.0
+> 
+> ## qt(p, df= Inf, ncp)  <==> qnorm(p, m=ncp)
+> p <- (0:32)/32
+> stopifnot(all.equal(qt(p, df=Inf, ncp=5), qnorm(p, m=5)))
+> ## qt(*, df=Inf, .)  gave NaN in  R <= 3.2.1
+> 
+> ## rhyper(*, <large>);  PR#16489
+> ct3 <- system.time(N <- rhyper(100, 8000, 1e9-8000, 1e6))[1]
+> table(N)
+N
+ 1  2  3  4  5  6  7  8  9 10 11 12 13 14 
+ 1  1  2  5  8 14 16 17  8 13  5  5  3  2 
+> summary(N)
+   Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
+   1.00    6.00    8.00    7.85   10.00   14.00 
+> stopifnot(abs(mean(N) - 8) < 1.5)
+> if(ct3 > 0.02) { cat("system.time:\n"); print(ct3) }
+> ## N were all 0 and took very long for R <= 3.2.1
+> set.seed(17)
+> stopifnot(rhyper(1, 3024, 27466, 251) == 25,
++           rhyper(1,  329,  3059, 225) == 22)
+> ## failed for a day after a "thinko" in the above bug fix.
+> 
+> ## *chisq(*, df=0, ncp=0) == Point mass at 0
+> stopifnot(rchisq(32,        df=0, ncp=0) == 0,
++           dchisq((0:16)/16, df=0, ncp=0) == c(Inf, rep(0, 16)))
+> ## gave all NaN's  for R <= 3.2.2
+> 
+> ## pchisq(*, df=0, ncp > 0, log.p=TRUE) :
+> th <- 10*c(1:9,10^c(1:3,7))
+> pp <- pchisq(0, df = 0, ncp=th, log.p=TRUE)
+> stopifnot(all.equal(pp, -th/2, tol=1e-15))
+> ## underflowed at about th ~= 60  in R <= 3.2.2
+> 
+> ## pnbinom (-> C's bratio())
+> op <- options(warn = 1)# -- NaN's giving warnings
+> L <- 1e308; p <- suppressWarnings(pnbinom(L, L, mu = 5)) # NaN or 1 (for 64 / 32 bit)
+> is.nan(p) || p == 1
+[1] TRUE
+> ## gave infinite loop on some 64b platforms in R <= 3.2.3
+> 
+> ## [dpqr]nbinom(*, mu, size=Inf) -- PR#16727
+> L <- 1e308; mu <- 5; pp <- (0:16)/16
+> x <- c(0:3, 1e10, 1e100, L, Inf)
+> (d <- dnbinom(x,  mu = mu, size = Inf)) # gave NaN (for 0 and L)
+[1] 0.006737947 0.033689735 0.084224337 0.140373896 0.000000000 0.000000000
+[7] 0.000000000 0.000000000
+> (p <- pnbinom(x,  mu = mu, size = Inf)) # gave all NaN
+[1] 0.006737947 0.040427682 0.124652019 0.265025915 1.000000000 1.000000000
+[7] 1.000000000 1.000000000
+> (q <- qnbinom(pp, mu = mu, size = Inf)) # gave all NaN
+ [1]   0   2   3   3   3   4   4   4   5   5   6   6   6   7   8   9 Inf
+> set.seed(1); NI <- rnbinom(32, mu = mu, size = Inf)# gave all NaN
+> set.seed(1); N2 <- rnbinom(32, mu = mu, size = L  )
+> stopifnot(all.equal(d, dpois(x, mu)),
++ 	  all.equal(p, ppois(x, mu)),
++ 	  q == qpois(pp, mu),
++ 	  identical(NI, N2))
+> options(op)
+> ## size = Inf -- mostly gave NaN  in R <= 3.2.3
+> 
+> ## qpois(p, *) for invalid 'p' should give NaN -- PR#16972
+> stopifnot(is.nan(suppressWarnings(c(qpois(c(-2,3, NaN), 3), qpois(1, 3, log.p=TRUE),
++                                     qpois(.5, 0, log.p=TRUE), qpois(c(-1,pi), 0)))))
+> ## those in the 2nd line gave 0 in R <= 3.3.1
+> ## Similar but different for qgeom():
+> stopifnot(qgeom((0:8)/8, prob=1) == 0, ## p=1 gave Inf in R <= 3.3.1
++           is.nan(suppressWarnings(qgeom(c(-1/4, 1.1), prob=1))))
+> 
+> ## all our RNG  r<dist>() functions:
+> ##' catch all: value and warnings or error <-- demo(error.catching) :
+> tryCatch.W.E <- function(expr) {
++     W <- NULL
++     w.handler <- function(w){ # warning handler
++ 	W <<- w
++ 	invokeRestart("muffleWarning")
++     }
++     list(value = withCallingHandlers(tryCatch(expr, error = function(e) e),
++ 				     warning = w.handler),
++ 	 warning = W)
++ }
+> .stat.ns <- asNamespace("stats")
+> Ns <- 4
+> for(dist in PDQR) {
++     fn <- paste0("r",dist)
++     cat(sprintf("%-9s(%d, ..): ", fn, Ns))
++     F <- get(fn, envir = .stat.ns)
++     nArg <- length(fms <- formals(F))
++     if(dist %in% c("nbinom", "gamma")) ## cannot specify *both* 'prob' & 'mu' / 'rate' & 'scale'
++         nArg <- nArg - 1
++     nA1 <- nArg - 1 # those beside the first (= 'n' mostly)
++     expected <- rep(if(dist %in% PDQRinteg) NA_integer_ else NaN, Ns)
++     for(ia in seq_len(nA1)) {
++         aa <- rep(list(1), nA1)
++         aa[[ia]] <- NA
++         cat(ia,"")
++         R <- tryCatch.W.E( do.call(F, c(Ns, aa)) )
++         if(!inherits(R$warning, "simpleWarning")) cat(" .. did *NOT* give a warning! ")
++ 	if(!(identical(R$value, expected))) { ## allow NA/NaN mismatch in these cases for now:
++ 	    if(!(dist %in% c("beta","f","t") && all(is.na(R$value))))
++ 		cat(" .. not giving expected NA/NaN's ")
++         }
++     }
++     cat(" [Ok]\n")
++ }
+rbinom   (4, ..): 1 2  [Ok]
+rgeom    (4, ..): 1  [Ok]
+rhyper   (4, ..): 1 2 3  [Ok]
+rnbinom  (4, ..): 1 2  [Ok]
+rpois    (4, ..): 1  [Ok]
+rsignrank(4, ..): 1  [Ok]
+rwilcox  (4, ..): 1 2  [Ok]
+rbeta    (4, ..): 1 2 3  [Ok]
+rcauchy  (4, ..): 1 2  [Ok]
+rchisq   (4, ..): 1 2  [Ok]
+rexp     (4, ..): 1  [Ok]
+rf       (4, ..): 1 2 3  [Ok]
+rgamma   (4, ..): 1 2  [Ok]
+rlnorm   (4, ..): 1 2  [Ok]
+rlogis   (4, ..): 1 2  [Ok]
+rnorm    (4, ..): 1 2  [Ok]
+rt       (4, ..): 1 2  [Ok]
+runif    (4, ..): 1 2  [Ok]
+rweibull (4, ..): 1 2  [Ok]
+> 
+> 
+> ## qbeta() in very asymmetric cases
+> sh2 <- 2^seq(9,16, by=1/16)
+> qbet <- qbeta(1e-10, 1.5, shape2=sh2, lower.tail=FALSE)
+> plot(sh2, 1- pbeta(qbet, 1.5, sh2, lower.tail=FALSE) * 1e10, log="x")
+> dqb <- diff(qbet); d2qb <- diff(dqb); d3qb <- diff(d2qb)
+> stopifnot(all.equal(qbet[[1]], 0.047206901483498, tol=1e-12),
++ 	  max(abs(1- pbeta(qbet, 1.5, sh2, lower.tail=FALSE) * 1e10)) < 1e-12,# Lx 64b: 2.4e-13
++ 	  0 > dqb, dqb > -0.002,
++ 	  0 < d2qb, d2qb < 0.00427,
++ 	  -3.2e-8 > d3qb, d3qb > -3.1e-6,
++ 	  diff(d3qb) > 1e-9)
+> ## had discontinuity (from wrong jump out of Newton) in R <= 3.3.2
+> 
+> 
 > 
 > cat("Time elapsed: ", proc.time() - .ptime,"\n")
-Time elapsed:  0.776 0.009 0.788 0 0 
+Time elapsed:  1.31 0.01 1.323 0 0 
 > 
diff --git a/tests/datasets.Rout.save b/tests/datasets.Rout.save
index 0036f08..d7bc9b2 100644
--- a/tests/datasets.Rout.save
+++ b/tests/datasets.Rout.save
@@ -1,7 +1,7 @@
 
-R version 3.1.2 RC (2014-10-29 r66897) -- "Pumpkin Helmet"
-Copyright (C) 2014 The R Foundation for Statistical Computing
-Platform: x86_64-unknown-linux-gnu (64-bit)
+R version 3.4.0 RC (2017-04-18 r72543) -- "You Stupid Darkness"
+Copyright (C) 2017 The R Foundation for Statistical Computing
+Platform: x86_64-pc-linux-gnu (64-bit)
 
 R is free software and comes with ABSOLUTELY NO WARRANTY.
 You are welcome to redistribute it under certain conditions.
@@ -47,9 +47,9 @@ Classes 'nfnGroupedData', 'nfGroupedData', 'groupedData' and 'data.frame':	84 ob
  $ Treatment: Factor w/ 2 levels "nonchilled","chilled": 1 1 1 1 1 1 1 1 1 1 ...
  $ conc     : num  95 175 250 350 500 675 1000 95 175 250 ...
  $ uptake   : num  16 30.4 34.8 37.2 35.3 39.2 39.7 13.6 27.3 37.1 ...
- - attr(*, "formula")=Class 'formula' length 3 uptake ~ conc | Plant
+ - attr(*, "formula")=Class 'formula'  language uptake ~ conc | Plant
   .. ..- attr(*, ".Environment")=<environment: R_EmptyEnv> 
- - attr(*, "outer")=Class 'formula' length 2 ~Treatment * Type
+ - attr(*, "outer")=Class 'formula'  language ~Treatment * Type
   .. ..- attr(*, ".Environment")=<environment: R_EmptyEnv> 
  - attr(*, "labels")=List of 2
   ..$ x: chr "Ambient carbon dioxide concentration"
@@ -64,9 +64,9 @@ Classes 'nfnGroupedData', 'nfGroupedData', 'groupedData' and 'data.frame':	578 o
  $ Time  : num  0 2 4 6 8 10 12 14 16 18 ...
  $ Chick : Ord.factor w/ 50 levels "18"<"16"<"15"<..: 15 15 15 15 15 15 15 15 15 15 ...
  $ Diet  : Factor w/ 4 levels "1","2","3","4": 1 1 1 1 1 1 1 1 1 1 ...
- - attr(*, "formula")=Class 'formula' length 3 weight ~ Time | Chick
+ - attr(*, "formula")=Class 'formula'  language weight ~ Time | Chick
   .. ..- attr(*, ".Environment")=<environment: R_EmptyEnv> 
- - attr(*, "outer")=Class 'formula' length 2 ~Diet
+ - attr(*, "outer")=Class 'formula'  language ~Diet
   .. ..- attr(*, ".Environment")=<environment: R_EmptyEnv> 
  - attr(*, "labels")=List of 2
   ..$ x: chr "Time"
@@ -80,7 +80,7 @@ Classes 'nfnGroupedData', 'nfGroupedData', 'groupedData' and 'data.frame':	176 o
  $ Run    : Ord.factor w/ 11 levels "10"<"11"<"9"<..: 4 4 4 4 4 4 4 4 4 4 ...
  $ conc   : num  0.0488 0.0488 0.1953 0.1953 0.3906 ...
  $ density: num  0.017 0.018 0.121 0.124 0.206 0.215 0.377 0.374 0.614 0.609 ...
- - attr(*, "formula")=Class 'formula' length 3 density ~ conc | Run
+ - attr(*, "formula")=Class 'formula'  language density ~ conc | Run
   .. ..- attr(*, ".Environment")=<environment: R_EmptyEnv> 
  - attr(*, "labels")=List of 2
   ..$ x: chr "DNase concentration"
@@ -89,12 +89,10 @@ Classes 'nfnGroupedData', 'nfGroupedData', 'groupedData' and 'data.frame':	176 o
   ..$ x: chr "(ng/ml)"
 
 ** structure of dataset EuStockMarkets
- mts [1:1860, 1:4] 1629 1614 1607 1621 1618 ...
+ Time-Series [1:1860, 1:4] from 1991 to 1999: 1629 1614 1607 1621 1618 ...
  - attr(*, "dimnames")=List of 2
   ..$ : NULL
   ..$ : chr [1:4] "DAX" "SMI" "CAC" "FTSE"
- - attr(*, "tsp")= num [1:3] 1991 1999 260
- - attr(*, "class")= chr [1:3] "mts" "ts" "matrix"
 
 ** structure of dataset Formaldehyde
 'data.frame':	6 obs. of  2 variables:
@@ -131,7 +129,7 @@ Classes 'nfnGroupedData', 'nfGroupedData', 'groupedData' and 'data.frame':	66 ob
  $ Subject: Ord.factor w/ 6 levels "1"<"4"<"2"<"5"<..: 1 1 1 1 1 1 1 1 1 1 ...
  $ time   : num  0.25 0.5 0.75 1 1.25 2 3 4 5 6 ...
  $ conc   : num  1.5 0.94 0.78 0.48 0.37 0.19 0.12 0.11 0.08 0.07 ...
- - attr(*, "formula")=Class 'formula' length 3 conc ~ time | Subject
+ - attr(*, "formula")=Class 'formula'  language conc ~ time | Subject
   .. ..- attr(*, ".Environment")=<environment: R_EmptyEnv> 
  - attr(*, "labels")=List of 2
   ..$ x: chr "Time since drug administration"
@@ -164,7 +162,7 @@ Classes 'nfnGroupedData', 'nfGroupedData', 'groupedData' and 'data.frame':	84 ob
  $ height: num  4.51 10.89 28.72 41.74 52.7 ...
  $ age   : num  3 5 10 15 20 25 3 5 10 15 ...
  $ Seed  : Ord.factor w/ 14 levels "329"<"327"<"325"<..: 10 10 10 10 10 10 13 13 13 13 ...
- - attr(*, "formula")=Class 'formula' length 3 height ~ age | Seed
+ - attr(*, "formula")=Class 'formula'  language height ~ age | Seed
   .. ..- attr(*, ".Environment")=<environment: R_EmptyEnv> 
  - attr(*, "labels")=List of 2
   ..$ x: chr "Age of tree"
@@ -181,7 +179,7 @@ Classes 'nfnGroupedData', 'nfGroupedData', 'groupedData' and 'data.frame':	35 ob
  $ Tree         : Ord.factor w/ 5 levels "3"<"1"<"5"<"2"<..: 2 2 2 2 2 2 2 4 4 4 ...
  $ age          : num  118 484 664 1004 1231 ...
  $ circumference: num  30 58 87 115 120 142 145 33 69 111 ...
- - attr(*, "formula")=Class 'formula' length 3 circumference ~ age | Tree
+ - attr(*, "formula")=Class 'formula'  language circumference ~ age | Tree
   .. ..- attr(*, ".Environment")=<environment: R_EmptyEnv> 
  - attr(*, "labels")=List of 2
   ..$ x: chr "Time since December 31, 1968"
@@ -210,12 +208,10 @@ Classes 'nfnGroupedData', 'nfGroupedData', 'groupedData' and 'data.frame':	35 ob
  - attr(*, "reference")= chr "A1.3, p. 269"
 
 ** structure of dataset Seatbelts
- mts [1:192, 1:8] 107 97 102 87 119 106 110 106 107 134 ...
+ Time-Series [1:192, 1:8] from 1969 to 1985: 107 97 102 87 119 106 110 106 107 134 ...
  - attr(*, "dimnames")=List of 2
   ..$ : NULL
   ..$ : chr [1:8] "DriversKilled" "drivers" "front" "rear" ...
- - attr(*, "tsp")= num [1:3] 1969 1985 12
- - attr(*, "class")= chr [1:2] "mts" "ts"
 
 ** structure of dataset Theoph
 Classes 'nfnGroupedData', 'nfGroupedData', 'groupedData' and 'data.frame':	132 obs. of  5 variables:
@@ -224,7 +220,7 @@ Classes 'nfnGroupedData', 'nfGroupedData', 'groupedData' and 'data.frame':	132 o
  $ Dose   : num  4.02 4.02 4.02 4.02 4.02 4.02 4.02 4.02 4.02 4.02 ...
  $ Time   : num  0 0.25 0.57 1.12 2.02 ...
  $ conc   : num  0.74 2.84 6.57 10.5 9.66 8.58 8.36 7.47 6.89 5.94 ...
- - attr(*, "formula")=Class 'formula' length 3 conc ~ Time | Subject
+ - attr(*, "formula")=Class 'formula'  language conc ~ Time | Subject
   .. ..- attr(*, ".Environment")=<environment: R_EmptyEnv> 
  - attr(*, "labels")=List of 2
   ..$ x: chr "Time since drug administration"
@@ -291,6 +287,14 @@ Classes 'nfnGroupedData', 'nfGroupedData', 'groupedData' and 'data.frame':	132 o
   ..$ : chr [1:5] "Food and Tobacco" "Household Operation" "Medical and Health" "Personal Care" ...
   ..$ : chr [1:5] "1940" "1945" "1950" "1955" ...
 
+** structure of dataset UScitiesD
+Class 'dist'  atomic [1:45] 587 1212 701 1936 604 748 2139 2182 543 920 ...
+  ..- attr(*, "Labels")= chr [1:10] "Atlanta" "Chicago" "Denver" "Houston" ...
+  ..- attr(*, "Size")= int 10
+  ..- attr(*, "call")= language as.dist.default(m = t(cities.mat))
+  ..- attr(*, "Diag")= logi FALSE
+  ..- attr(*, "Upper")= logi FALSE
+
 ** structure of dataset VADeaths
  num [1:5, 1:4] 11.7 18.1 26.9 41 66 8.7 11.7 20.3 30.9 54.3 ...
  - attr(*, "dimnames")=List of 2
@@ -594,7 +598,7 @@ Class 'dist'  atomic [1:210] 3313 2963 3175 3339 2762 ...
  $ stack.loss: num  42 37 37 28 18 18 19 20 15 14 ...
 
 ** structure of dataset state.abb
- chr [1:50] "AL" "AK" "AZ" "AR" "CA" "CO" "CT" "DE" "FL" ...
+ chr [1:50] "AL" "AK" "AZ" "AR" "CA" "CO" "CT" "DE" "FL" "GA" "HI" "ID" ...
 
 ** structure of dataset state.area
  num [1:50] 51609 589757 113909 53104 158693 ...
@@ -608,7 +612,7 @@ List of 2
  Factor w/ 9 levels "New England",..: 4 9 8 5 9 8 1 3 3 3 ...
 
 ** structure of dataset state.name
- chr [1:50] "Alabama" "Alaska" "Arizona" "Arkansas" "California" ...
+ chr [1:50] "Alabama" "Alaska" "Arizona" "Arkansas" "California" "Colorado" ...
 
 ** structure of dataset state.region
  Factor w/ 4 levels "Northeast","South",..: 2 4 4 2 4 4 1 2 2 2 ...
diff --git a/tests/datetime.R b/tests/datetime.R
index b5b2b90..61d4c9d 100644
--- a/tests/datetime.R
+++ b/tests/datetime.R
@@ -1,7 +1,7 @@
 #### Test 64-bit date-time functions.
 
 ## R's internal fixes are used on 32-bit platforms.
-## OS X gets these wrong: see HAVE_WORKING_64BIT_MKTIME
+## macOS gets these wrong: see HAVE_WORKING_64BIT_MKTIME
 
 Sys.setenv(TZ = "UTC")
 (z <- as.POSIXct("1848-01-01 12:00"))
diff --git a/tests/datetime.Rout.save b/tests/datetime.Rout.save
index 7613594..3e33bf0 100644
--- a/tests/datetime.Rout.save
+++ b/tests/datetime.Rout.save
@@ -1,7 +1,7 @@
 
-R version 3.1.2 RC (2014-10-29 r66897) -- "Pumpkin Helmet"
-Copyright (C) 2014 The R Foundation for Statistical Computing
-Platform: x86_64-unknown-linux-gnu (64-bit)
+R version 3.4.0 RC (2017-04-18 r72543) -- "You Stupid Darkness"
+Copyright (C) 2017 The R Foundation for Statistical Computing
+Platform: x86_64-pc-linux-gnu (64-bit)
 
 R is free software and comes with ABSOLUTELY NO WARRANTY.
 You are welcome to redistribute it under certain conditions.
@@ -18,7 +18,7 @@ Type 'q()' to quit R.
 > #### Test 64-bit date-time functions.
 > 
 > ## R's internal fixes are used on 32-bit platforms.
-> ## OS X gets these wrong: see HAVE_WORKING_64BIT_MKTIME
+> ## macOS gets these wrong: see HAVE_WORKING_64BIT_MKTIME
 > 
 > Sys.setenv(TZ = "UTC")
 > (z <- as.POSIXct("1848-01-01 12:00"))
diff --git a/tests/datetime2.Rout.save b/tests/datetime2.Rout.save
index b592b89..210b26b 100644
--- a/tests/datetime2.Rout.save
+++ b/tests/datetime2.Rout.save
@@ -1,7 +1,7 @@
 
-R version 3.1.2 RC (2014-10-29 r66897) -- "Pumpkin Helmet"
-Copyright (C) 2014 The R Foundation for Statistical Computing
-Platform: x86_64-unknown-linux-gnu (64-bit)
+R version 3.4.0 RC (2017-04-18 r72543) -- "You Stupid Darkness"
+Copyright (C) 2017 The R Foundation for Statistical Computing
+Platform: x86_64-pc-linux-gnu (64-bit)
 
 R is free software and comes with ABSOLUTELY NO WARRANTY.
 You are welcome to redistribute it under certain conditions.
diff --git a/tests/demos.Rout.save b/tests/demos.Rout.save
index 4296bad..da51a4f 100644
--- a/tests/demos.Rout.save
+++ b/tests/demos.Rout.save
@@ -1,7 +1,7 @@
 
-R version 3.1.2 RC (2014-10-29 r66897) -- "Pumpkin Helmet"
-Copyright (C) 2014 The R Foundation for Statistical Computing
-Platform: x86_64-unknown-linux-gnu (64-bit)
+R version 3.4.0 RC (2017-04-18 r72543) -- "You Stupid Darkness"
+Copyright (C) 2017 The R Foundation for Statistical Computing
+Platform: x86_64-pc-linux-gnu (64-bit)
 
 R is free software and comes with ABSOLUTELY NO WARRANTY.
 You are welcome to redistribute it under certain conditions.
@@ -115,9 +115,9 @@ List of 2
 +     "\n\t starting with 'is.' :\t  ",
 +     sum(grepl("^is\\.", ls.base[base.is.f])), "\n", sep = "")
 
-Number of base objects:		1281
-Number of functions in base:	1239
-	 starting with 'is.' :	  49
+Number of base objects:		1324
+Number of functions in base:	1282
+	 starting with 'is.' :	  50
 
 > ## 0.14  : 31
 > ## 0.50  : 33
@@ -1510,5 +1510,5 @@ sm     3    3    3    3    4    4    4    4    2     2     2
 > par(op)
 > 
 > cat("Time elapsed: ", proc.time() - .ptime, "\n")
-Time elapsed:  1.038 0.027 1.068 0 0 
+Time elapsed:  1.087 0.017 1.106 0 0 
 > 
diff --git a/tests/eval-etc.R b/tests/eval-etc.R
index bddfd4b..fbf6e2f 100644
--- a/tests/eval-etc.R
+++ b/tests/eval-etc.R
@@ -116,3 +116,35 @@ callme()
 callme(mm="B")
 mycaller <- function(x = 1, callme = pi) { callme(x) }
 mycaller()## wrongly gave `mm = NULL'  now = "Abc"
+
+
+## Garbage collection  protection problem:
+if(FALSE) ## only here to be run as part of  'make test-Gct'
+    gctorture() # <- for manual testing
+x <- c("a", NA, "b")
+fx <- factor(x, exclude="")
+ST <- if(interactive()) system.time else invisible
+ST(r <- replicate(20, capture.output(print(fx))))
+table(ok. <- r[2,] == "Levels: a b <NA>") # want all TRUE
+stopifnot(ok.) # in case of failure, see
+r[2,] ## the '<NA>' levels part would be wrong occasionally
+
+
+## withAutoprint() : must *not* evaluate twice *and* do it in calling environment:
+CO <- utils::capture.output
+stopifnot(
+    identical(
+	## ensure it is only evaluated _once_ :
+	CO(withAutoprint({ x <- 1:2; cat("x=",x,"\n") }))[1],
+	paste0(getOption("prompt"), "x <- 1:2"))
+   ,
+    ## need "enough" deparseCtrl for this:
+    grepl("1L, NA_integer_", CO(withAutoprint(x <- c(1L, NA_integer_, NA))))
+   ,
+    identical(CO(r1 <- withAutoprint({ formals(withAutoprint); body(withAutoprint) })),
+	      CO(r2 <- source(expr = list(quote(formals(withAutoprint)),
+					  quote(body(withAutoprint)) ),
+			      echo=TRUE))),
+    identical(r1,r2)
+)
+## partly failed in R 3.4.0 alpha
diff --git a/tests/eval-etc.Rout.save b/tests/eval-etc.Rout.save
index 435a939..047e687 100644
--- a/tests/eval-etc.Rout.save
+++ b/tests/eval-etc.Rout.save
@@ -1,7 +1,7 @@
 
-R version 3.1.2 RC (2014-10-29 r66897) -- "Pumpkin Helmet"
-Copyright (C) 2014 The R Foundation for Statistical Computing
-Platform: x86_64-unknown-linux-gnu (64-bit)
+R version 3.4.0 RC (2017-04-18 r72543) -- "You Stupid Darkness"
+Copyright (C) 2017 The R Foundation for Statistical Computing
+Platform: x86_64-pc-linux-gnu (64-bit)
 
 R is free software and comes with ABSOLUTELY NO WARRANTY.
 You are welcome to redistribute it under certain conditions.
@@ -171,3 +171,43 @@ mm =  chr "Bde"
 > mycaller()## wrongly gave `mm = NULL'  now = "Abc"
 mm =  chr "Abc"
 > 
+> 
+> ## Garbage collection  protection problem:
+> if(FALSE) ## only here to be run as part of  'make test-Gct'
++     gctorture() # <- for manual testing
+> x <- c("a", NA, "b")
+> fx <- factor(x, exclude="")
+> ST <- if(interactive()) system.time else invisible
+> ST(r <- replicate(20, capture.output(print(fx))))
+> table(ok. <- r[2,] == "Levels: a b <NA>") # want all TRUE
+
+TRUE 
+  20 
+> stopifnot(ok.) # in case of failure, see
+> r[2,] ## the '<NA>' levels part would be wrong occasionally
+ [1] "Levels: a b <NA>" "Levels: a b <NA>" "Levels: a b <NA>" "Levels: a b <NA>"
+ [5] "Levels: a b <NA>" "Levels: a b <NA>" "Levels: a b <NA>" "Levels: a b <NA>"
+ [9] "Levels: a b <NA>" "Levels: a b <NA>" "Levels: a b <NA>" "Levels: a b <NA>"
+[13] "Levels: a b <NA>" "Levels: a b <NA>" "Levels: a b <NA>" "Levels: a b <NA>"
+[17] "Levels: a b <NA>" "Levels: a b <NA>" "Levels: a b <NA>" "Levels: a b <NA>"
+> 
+> 
+> ## withAutoprint() : must *not* evaluate twice *and* do it in calling environment:
+> CO <- utils::capture.output
+> stopifnot(
++     identical(
++ 	## ensure it is only evaluated _once_ :
++ 	CO(withAutoprint({ x <- 1:2; cat("x=",x,"\n") }))[1],
++ 	paste0(getOption("prompt"), "x <- 1:2"))
++    ,
++     ## need "enough" deparseCtrl for this:
++     grepl("1L, NA_integer_", CO(withAutoprint(x <- c(1L, NA_integer_, NA))))
++    ,
++     identical(CO(r1 <- withAutoprint({ formals(withAutoprint); body(withAutoprint) })),
++ 	      CO(r2 <- source(expr = list(quote(formals(withAutoprint)),
++ 					  quote(body(withAutoprint)) ),
++ 			      echo=TRUE))),
++     identical(r1,r2)
++ )
+> ## partly failed in R 3.4.0 alpha
+> 
diff --git a/tests/iec60559.Rout.save b/tests/iec60559.Rout.save
index 59644f7..796edcf 100644
--- a/tests/iec60559.Rout.save
+++ b/tests/iec60559.Rout.save
@@ -1,7 +1,7 @@
 
-R version 3.1.2 RC (2014-10-29 r66897) -- "Pumpkin Helmet"
-Copyright (C) 2014 The R Foundation for Statistical Computing
-Platform: x86_64-unknown-linux-gnu (64-bit)
+R version 3.4.0 RC (2017-04-18 r72543) -- "You Stupid Darkness"
+Copyright (C) 2017 The R Foundation for Statistical Computing
+Platform: x86_64-pc-linux-gnu (64-bit)
 
 R is free software and comes with ABSOLUTELY NO WARRANTY.
 You are welcome to redistribute it under certain conditions.
diff --git a/tests/internet.R b/tests/internet.R
index b96460c..ceba220 100644
--- a/tests/internet.R
+++ b/tests/internet.R
@@ -1,87 +1,21 @@
-## These are tests that require socket and internet functionality, and
-## a working Internet connection.
-## We attempt to test for those.
-
-if(!capabilities()["http/ftp"]) {
-    warning("no internet capabilities")
-    q()
-}
+## These are tests that require a working Internet connection.
+## We attempt to test for that.
 
 if(.Platform$OS.type == "unix" &&
    is.null(nsl("cran.r-project.org"))) q()
 
-# test do_download.
-nrow(available.packages(contrib.url("http://cran.r-project.org")))
+# test do_download (and "record" #{packages}):
+ap <- available.packages(contrib.url("http://cran.r-project.org"))
+## IGNORE_RDIFF_BEGIN
+nrow(ap)
+## IGNORE_RDIFF_END
 
 # test url connections on http
 zz <- url("http://cran.r-project.org/")
 readLines(zz)
 close(zz)
 
-## check graceful failure:
-try(zz <- url("http://foo.bar", "r"))
-
 # and via read.table, test http and ftp.
 
 read.table("http://www.stats.ox.ac.uk/pub/datasets/csb/ch11b.dat")
 read.table("ftp://ftp.stats.ox.ac.uk/pub/datasets/csb/ch11b.dat")
-
-## everything from here on is directly over sockets
-if(!capabilities("sockets")) stop("no socket capabilities")
-
-# do the same thing via sockets (cut-down httpclient)
-httpget <- function (url, port = 80)
-{
-    urlel <- strsplit(url, "/")[[1]]
-    if (urlel[1] != "http:") stop("Not an http:// URL")
-    host <- urlel[3]
-    rurl <- paste(c("", urlel[-(1:3)]), collapse = "/")
-    a <- make.socket(host, port = port)
-    on.exit(close.socket(a))
-    headreq <- paste("HEAD", rurl, "HTTP/1.0\r\nConnection: Keep-Alive\r\nAccept: text/plain\r\n\r\n")
-    write.socket(a, headreq)
-    head <- read.socket(a, maxlen = 8000)
-    b <- strsplit(head, "\n")[[1]]
-    if (length(grep("200 OK", b[1])) == 0) stop(b[1])
-    len <- as.numeric(strsplit(grep("Content-Length", b, value = TRUE),
-                               ":")[[1]][2])
-    getreq <- paste("GET", rurl, "HTTP/1.0\r\nConnection: Keep-Alive\r\nAccept: text/plain\r\n\r\n")
-    write.socket(a, getreq)
-    junk <- read.socket(a, maxlen = nchar(head))
-    data <- ""
-    b <- strsplit(c(head, junk), "\n")
-    nn <- length(b[[1]])
-    if (length(b[[2]]) > nn)
-        data <- paste(b[[2]][-(1:nn)], collapse = "\n")
-    while (nchar(data) < len) {
-        data <- paste(data, read.socket(a, maxlen = len - nchar(data)),
-                      sep = "")
-    }
-    strsplit(data, "\n")[[1]]
-}
-
-if(nzchar(Sys.getenv("http_proxy")) || nzchar(Sys.getenv("HTTP_PROXY"))) {
-    cat("http proxy is set, so skip test of http over sockets\n")
-} else {
-    httpget("http://www.stats.ox.ac.uk/pub/datasets/csb/ch11b.dat")
-}
-
-finger <- function(user, host = "localhost", port = 79, print = TRUE)
-{
-    if (!is.character(user))
-        stop("user name must be a string")
-    user <- paste(user,"\r\n")
-    socket <- make.socket(host, port)
-    on.exit(close.socket(socket))
-    write.socket(socket, user)
-    output <- character(0)
-    repeat{
-        ss <- read.socket(socket)
-        if (ss == "") break
-        output <- paste(output, ss)
-    }
-    close.socket(socket)
-    if (print) cat(output)
-    invisible(output)
-}
-try(finger("root"))  ## only works if your site provides a finger daemon
diff --git a/tests/internet.Rout.save b/tests/internet.Rout.save
index 23c7bd6..505cd83 100644
--- a/tests/internet.Rout.save
+++ b/tests/internet.Rout.save
@@ -1,7 +1,7 @@
 
-R version 3.1.2 RC (2014-10-29 r66897) -- "Pumpkin Helmet"
-Copyright (C) 2014 The R Foundation for Statistical Computing
-Platform: x86_64-unknown-linux-gnu (64-bit)
+R version 3.4.0 RC (2017-04-18 r72543) -- "You Stupid Darkness"
+Copyright (C) 2017 The R Foundation for Statistical Computing
+Platform: x86_64-pc-linux-gnu (64-bit)
 
 R is free software and comes with ABSOLUTELY NO WARRANTY.
 You are welcome to redistribute it under certain conditions.
@@ -15,21 +15,18 @@ Type 'demo()' for some demos, 'help()' for on-line help, or
 'help.start()' for an HTML browser interface to help.
 Type 'q()' to quit R.
 
-> ## These are tests that require socket and internet functionality, and
-> ## a working Internet connection.
-> ## We attempt to test for those.
-> 
-> if(!capabilities()["http/ftp"]) {
-+     warning("no internet capabilities")
-+     q()
-+ }
+> ## These are tests that require a working Internet connection.
+> ## We attempt to test for that.
 > 
 > if(.Platform$OS.type == "unix" &&
 +    is.null(nsl("cran.r-project.org"))) q()
 > 
-> # test do_download.
-> nrow(available.packages(contrib.url("http://cran.r-project.org")))
-[1] 5993
+> # test do_download (and "record" #{packages}):
+> ap <- available.packages(contrib.url("http://cran.r-project.org"))
+> ## IGNORE_RDIFF_BEGIN
+> nrow(ap)
+[1] 10455
+> ## IGNORE_RDIFF_END
 > 
 > # test url connections on http
 > zz <- url("http://cran.r-project.org/")
@@ -44,7 +41,7 @@ Type 'q()' to quit R.
  [8] "<link rel=\"stylesheet\" type=\"text/css\" href=\"R.css\">"                                               
  [9] "</head>"                                                                                                  
 [10] ""                                                                                                         
-[11] "<FRAMESET cols=\"1*, 4*\" border=0>"                                                                      
+[11] "<FRAMESET cols=\"1*, 4*\" style=\"border: none;\">"                                                       
 [12] "<FRAMESET rows=\"120, 1*\">"                                                                              
 [13] "<FRAME src=\"logo.html\" name=\"logo\" frameborder=0>"                                                    
 [14] "<FRAME src=\"navbar.html\" name=\"contents\" frameborder=0>"                                              
@@ -59,12 +56,6 @@ Type 'q()' to quit R.
 [23] "</FRAMESET>"                                                                                              
 > close(zz)
 > 
-> ## check graceful failure:
-> try(zz <- url("http://foo.bar", "r"))
-Error in url("http://foo.bar", "r") : cannot open the connection
-In addition: Warning message:
-In url("http://foo.bar", "r") : unable to connect to 'foo.bar' on port 80.
-> 
 > # and via read.table, test http and ftp.
 > 
 > read.table("http://www.stats.ox.ac.uk/pub/datasets/csb/ch11b.dat")
@@ -272,99 +263,3 @@ In url("http://foo.bar", "r") : unable to connect to 'foo.bar' on port 80.
 99   99 308  150 38.04  1
 100 100 308  200 38.07  1
 > 
-> ## everything from here on is directly over sockets
-> if(!capabilities("sockets")) stop("no socket capabilities")
-> 
-> # do the same thing via sockets (cut-down httpclient)
-> httpget <- function (url, port = 80)
-+ {
-+     urlel <- strsplit(url, "/")[[1]]
-+     if (urlel[1] != "http:") stop("Not an http:// URL")
-+     host <- urlel[3]
-+     rurl <- paste(c("", urlel[-(1:3)]), collapse = "/")
-+     a <- make.socket(host, port = port)
-+     on.exit(close.socket(a))
-+     headreq <- paste("HEAD", rurl, "HTTP/1.0\r\nConnection: Keep-Alive\r\nAccept: text/plain\r\n\r\n")
-+     write.socket(a, headreq)
-+     head <- read.socket(a, maxlen = 8000)
-+     b <- strsplit(head, "\n")[[1]]
-+     if (length(grep("200 OK", b[1])) == 0) stop(b[1])
-+     len <- as.numeric(strsplit(grep("Content-Length", b, value = TRUE),
-+                                ":")[[1]][2])
-+     getreq <- paste("GET", rurl, "HTTP/1.0\r\nConnection: Keep-Alive\r\nAccept: text/plain\r\n\r\n")
-+     write.socket(a, getreq)
-+     junk <- read.socket(a, maxlen = nchar(head))
-+     data <- ""
-+     b <- strsplit(c(head, junk), "\n")
-+     nn <- length(b[[1]])
-+     if (length(b[[2]]) > nn)
-+         data <- paste(b[[2]][-(1:nn)], collapse = "\n")
-+     while (nchar(data) < len) {
-+         data <- paste(data, read.socket(a, maxlen = len - nchar(data)),
-+                       sep = "")
-+     }
-+     strsplit(data, "\n")[[1]]
-+ }
-> 
-> if(nzchar(Sys.getenv("http_proxy")) || nzchar(Sys.getenv("HTTP_PROXY"))) {
-+     cat("http proxy is set, so skip test of http over sockets\n")
-+ } else {
-+     httpget("http://www.stats.ox.ac.uk/pub/datasets/csb/ch11b.dat")
-+ }
-  [1] "001 307 0930 36.58 0"  "002 307 0940 36.73 0"  "003 307 0950 36.93 0" 
-  [4] "004 307 1000 37.15 0"  "005 307 1010 37.23 0"  "006 307 1020 37.24 0" 
-  [7] "007 307 1030 37.24 0"  "008 307 1040 36.90 0"  "009 307 1050 36.95 0" 
- [10] "010 307 1100 36.89 0"  "011 307 1110 36.95 0"  "012 307 1120 37.00 0" 
- [13] "013 307 1130 36.90 0"  "014 307 1140 36.99 0"  "015 307 1150 36.99 0" 
- [16] "016 307 1200 37.01 0"  "017 307 1210 37.04 0"  "018 307 1220 37.04 0" 
- [19] "019 307 1230 37.14 0"  "020 307 1240 37.07 0"  "021 307 1250 36.98 0" 
- [22] "022 307 1300 37.01 0"  "023 307 1310 36.97 0"  "024 307 1320 36.97 0" 
- [25] "025 307 1330 37.12 0"  "026 307 1340 37.13 0"  "027 307 1350 37.14 0" 
- [28] "028 307 1400 37.15 0"  "029 307 1410 37.17 0"  "030 307 1420 37.12 0" 
- [31] "031 307 1430 37.12 0"  "032 307 1440 37.17 0"  "033 307 1450 37.28 0" 
- [34] "034 307 1500 37.28 0"  "035 307 1510 37.44 0"  "036 307 1520 37.51 0" 
- [37] "037 307 1530 37.64 0"  "038 307 1540 37.51 0"  "039 307 1550 37.98 1" 
- [40] "040 307 1600 38.02 1"  "041 307 1610 38.00 1 " "042 307 1620 38.24 1 "
- [43] "043 307 1630 38.10 1"  "044 307 1640 38.24 1"  "045 307 1650 38.11 1" 
- [46] "046 307 1700 38.02 1"  "047 307 1710 38.11 1"  "048 307 1720 38.01 1" 
- [49] "049 307 1730 37.91 1"  "050 307 1740 37.96 1"  "051 307 1750 38.03 1" 
- [52] "052 307 1800 38.17 1"  "053 307 1810 38.19 1"  "054 307 1820 38.18 1" 
- [55] "055 307 1830 38.15 1"  "056 307 1840 38.04 1"  "057 307 1850 37.96 1" 
- [58] "058 307 1900 37.84 1"  "059 307 1910 37.83 1"  "060 307 1920 37.84 1" 
- [61] "061 307 1930 37.74 1"  "062 307 1940 37.76 1"  "063 307 1950 37.76 1" 
- [64] "064 307 2000 37.64 1"  "065 307 2010 37.63 1"  "066 307 2020 38.06 1" 
- [67] "067 307 2030 38.19 1"  "068 307 2040 38.35 1"  "069 307 2050 38.25 1" 
- [70] "070 307 2100 37.86 1"  "071 307 2110 37.95 1"  "072 307 2120 37.95 1" 
- [73] "073 307 2130 37.76 1"  "074 307 2140 37.60 1"  "075 307 2150 37.89 1" 
- [76] "076 307 2200 37.86 1"  "077 307 2210 37.71 1"  "078 307 2220 37.78 1" 
- [79] "079 307 2230 37.82 1"  "080 307 2240 37.76 1"  "081 307 2250 37.81 1" 
- [82] "082 307 2300 37.84 1"  "083 307 2310 38.01 1"  "084 307 2320 38.10 1" 
- [85] "085 307 2330 38.15 1"  "086 307 2340 37.92 1"  "087 307 2350 37.64 1" 
- [88] "088 308 0000 37.70 1"  "089 308 0010 37.46 1"  "090 308 0020 37.41 1" 
- [91] "091 308 0030 37.46 1"  "092 308 0040 37.56 1"  "093 308 0050 37.55 1" 
- [94] "094 308 0100 37.75 1"  "095 308 0110 37.76 1"  "096 308 0120 37.73 1" 
- [97] "097 308 0130 37.77 1"  "098 308 0140 38.01 1"  "099 308 0150 38.04 1" 
-[100] "100 308 0200 38.07 1" 
-> 
-> finger <- function(user, host = "localhost", port = 79, print = TRUE)
-+ {
-+     if (!is.character(user))
-+         stop("user name must be a string")
-+     user <- paste(user,"\r\n")
-+     socket <- make.socket(host, port)
-+     on.exit(close.socket(socket))
-+     write.socket(socket, user)
-+     output <- character(0)
-+     repeat{
-+         ss <- read.socket(socket)
-+         if (ss == "") break
-+         output <- paste(output, ss)
-+     }
-+     close.socket(socket)
-+     if (print) cat(output)
-+     invisible(output)
-+ }
-> try(finger("root"))  ## only works if your site provides a finger daemon
-socket error: Connection refused
-Error in make.socket(host, port) : socket not established
-> 
diff --git a/tests/internet2.R b/tests/internet2.R
new file mode 100644
index 0000000..a83ad1e
--- /dev/null
+++ b/tests/internet2.R
@@ -0,0 +1,55 @@
+## These are tests that require socket and internet functionality, and
+## a working Internet connection.
+## We attempt to test for those.
+
+if(.Platform$OS.type == "unix" &&
+   is.null(nsl("cran.r-project.org"))) q()
+
+
+## check graceful failure:
+try(url("http://foo.bar", "r"))
+
+if(.Platform$OS.type == "windows")
+    try(url("http://foo.bar", "r", method = "wininet"))
+
+## everything from here on is directly over sockets
+if(!capabilities("sockets")) stop("no socket capabilities")
+
+# do the same thing via sockets (cut-down httpclient)
+httpget <- function (url, port = 80)
+{
+    urlel <- strsplit(url, "/")[[1]]
+    if (urlel[1] != "http:") stop("Not an http:// URL")
+    host <- urlel[3]
+    rurl <- paste(c("", urlel[-(1:3)]), collapse = "/")
+    a <- make.socket(host, port = port)
+    on.exit(close.socket(a))
+    headreq <- paste("HEAD", rurl, "HTTP/1.0\r\nConnection: Keep-Alive\r\nAccept: text/plain\r\n\r\n")
+    write.socket(a, headreq)
+    head <- read.socket(a, maxlen = 8000)
+    b <- strsplit(head, "\n")[[1]]
+    if (length(grep("200 OK", b[1])) == 0) stop(b[1])
+    len <- as.numeric(strsplit(grep("Content-Length", b, value = TRUE),
+                               ":")[[1]][2])
+    getreq <- paste("GET", rurl, "HTTP/1.0\r\nConnection: Keep-Alive\r\nAccept: text/plain\r\n\r\n")
+    write.socket(a, getreq)
+    junk <- read.socket(a, maxlen = nchar(head))
+    data <- ""
+    b <- strsplit(c(head, junk), "\n")
+    nn <- length(b[[1]])
+    if (length(b[[2]]) > nn)
+        data <- paste(b[[2]][-(1:nn)], collapse = "\n")
+    while (nchar(data) < len) {
+        data <- paste(data, read.socket(a, maxlen = len - nchar(data)),
+                      sep = "")
+    }
+    strsplit(data, "\n")[[1]]
+}
+
+if(nzchar(Sys.getenv("http_proxy")) || nzchar(Sys.getenv("HTTP_PROXY"))) {
+    cat("http proxy is set, so skip test of http over sockets\n")
+} else {
+    f <- httpget("http://www.stats.ox.ac.uk/pub/datasets/csb/ch11b.dat")
+    str(f)
+    stopifnot(length(f) == 100L)
+}
diff --git a/tests/isas-tests.Rout.save b/tests/isas-tests.Rout.save
index 8753057..4631473 100644
--- a/tests/isas-tests.Rout.save
+++ b/tests/isas-tests.Rout.save
@@ -1,7 +1,7 @@
 
-R version 3.1.2 RC (2014-10-29 r66897) -- "Pumpkin Helmet"
-Copyright (C) 2014 The R Foundation for Statistical Computing
-Platform: x86_64-unknown-linux-gnu (64-bit)
+R version 3.4.0 RC (2017-04-18 r72543) -- "You Stupid Darkness"
+Copyright (C) 2017 The R Foundation for Statistical Computing
+Platform: x86_64-pc-linux-gnu (64-bit)
 
 R is free software and comes with ABSOLUTELY NO WARRANTY.
 You are welcome to redistribute it under certain conditions.
@@ -94,6 +94,7 @@ Type 'q()' to quit R.
 > if(!inherits(res, 'try-error')) report(is.symbol(res))
 > res <- try(as.table( x ), silent = TRUE)
 > if(!inherits(res, 'try-error')) report(is.table(res))
+[1] TRUE
 > res <- try(as.vector( x ), silent = TRUE)
 > if(!inherits(res, 'try-error')) report(is.vector(res))
 [1] TRUE
@@ -220,6 +221,7 @@ IS: [1] TRUE
 > if(!inherits(res, 'try-error'))
 +    report({if(is.table(x)) { cat('IS: ');all.equal(x, res, tolerance=0)
 +    } else   !isall.equal(x, res)})
+[1] TRUE
 > res <- try(as.vector( x ), silent = TRUE)
 > if(!inherits(res, 'try-error'))
 +    report({if(is.vector(x)) { cat('IS: ');all.equal(x, res, tolerance=0)
@@ -318,6 +320,7 @@ IS: [1] TRUE
 >   if(!inherits(f, 'try-error')) report(identical(f, as.symbol( f )))
 > f <- try(as.table( x ), silent = TRUE)
 >   if(!inherits(f, 'try-error')) report(identical(f, as.table( f )))
+[1] TRUE
 > f <- try(as.vector( x ), silent = TRUE)
 >   if(!inherits(f, 'try-error')) report(identical(f, as.vector( f )))
 [1] TRUE
@@ -1327,7 +1330,7 @@ IS: [1] TRUE
 > res <- try(as.numeric_version( x ), silent = TRUE)
 Warning message:
 In lapply(strsplit(x[ok], "[.-]"), as.integer) :
-  inaccurate integer conversion in coercion
+  NAs introduced by coercion to integer range
 > if(!inherits(res, 'try-error')) report(is.numeric_version(res))
 [1] TRUE
 > res <- try(as.ordered( x ), silent = TRUE)
@@ -1336,7 +1339,7 @@ In lapply(strsplit(x[ok], "[.-]"), as.integer) :
 > res <- try(as.package_version( x ), silent = TRUE)
 Warning message:
 In lapply(strsplit(x[ok], "[.-]"), as.integer) :
-  inaccurate integer conversion in coercion
+  NAs introduced by coercion to integer range
 > if(!inherits(res, 'try-error')) report(is.package_version(res))
 [1] TRUE
 > res <- try(as.pairlist( x ), silent = TRUE)
@@ -1448,7 +1451,7 @@ IS: [1] TRUE
 > res <- try(as.numeric_version( x ), silent = TRUE)
 Warning message:
 In lapply(strsplit(x[ok], "[.-]"), as.integer) :
-  inaccurate integer conversion in coercion
+  NAs introduced by coercion to integer range
 > if(!inherits(res, 'try-error'))
 +    report({if(is.numeric_version(x)) { cat('IS: ');all.equal(x, res, tolerance=0)
 +    } else   !isall.equal(x, res)})
@@ -1461,7 +1464,7 @@ In lapply(strsplit(x[ok], "[.-]"), as.integer) :
 > res <- try(as.package_version( x ), silent = TRUE)
 Warning message:
 In lapply(strsplit(x[ok], "[.-]"), as.integer) :
-  inaccurate integer conversion in coercion
+  NAs introduced by coercion to integer range
 > if(!inherits(res, 'try-error'))
 +    report({if(is.package_version(x)) { cat('IS: ');all.equal(x, res, tolerance=0)
 +    } else   !isall.equal(x, res)})
@@ -1566,7 +1569,7 @@ IS: [1] TRUE
 > f <- try(as.numeric_version( x ), silent = TRUE)
 Warning message:
 In lapply(strsplit(x[ok], "[.-]"), as.integer) :
-  inaccurate integer conversion in coercion
+  NAs introduced by coercion to integer range
 >   if(!inherits(f, 'try-error')) report(identical(f, as.numeric_version( f )))
 [1] TRUE
 > f <- try(as.octmode( x ), silent = TRUE)
@@ -1577,7 +1580,7 @@ In lapply(strsplit(x[ok], "[.-]"), as.integer) :
 > f <- try(as.package_version( x ), silent = TRUE)
 Warning message:
 In lapply(strsplit(x[ok], "[.-]"), as.integer) :
-  inaccurate integer conversion in coercion
+  NAs introduced by coercion to integer range
 >   if(!inherits(f, 'try-error')) report(identical(f, as.package_version( f )))
 [1] TRUE
 > f <- try(as.pairlist( x ), silent = TRUE)
@@ -2565,6 +2568,6 @@ In as.dist.default(x) : non-square matrix
 > f <- try(as.ts( x ), silent = TRUE)
 >   if(!inherits(f, 'try-error')) report(identical(f, as.ts( f )))
 > cat('Time elapsed: ', proc.time() - .proctime00,'\n')
-Time elapsed:  0.145 0.009 0.155 0 0 
+Time elapsed:  0.169 0.013 0.182 0 0 
 > 
 > 
diff --git a/tests/lapack.Rout.save b/tests/lapack.Rout.save
index 343b82d..34fa354 100644
--- a/tests/lapack.Rout.save
+++ b/tests/lapack.Rout.save
@@ -1,7 +1,7 @@
 
-R version 3.1.2 RC (2014-10-29 r66897) -- "Pumpkin Helmet"
-Copyright (C) 2014 The R Foundation for Statistical Computing
-Platform: x86_64-unknown-linux-gnu (64-bit)
+R version 3.4.0 RC (2017-04-18 r72543) -- "You Stupid Darkness"
+Copyright (C) 2017 The R Foundation for Statistical Computing
+Platform: x86_64-pc-linux-gnu (64-bit)
 
 R is free software and comes with ABSOLUTELY NO WARRANTY.
 You are welcome to redistribute it under certain conditions.
@@ -262,6 +262,7 @@ attr(,"class")
 [1] 0.02466
 > 
 > eigen(A)
+eigen() decomposition
 $values
 [1] 29.660+0.000i -4.631+0.000i  4.556+0.000i -2.292+3.117i -2.292-3.117i
 
diff --git a/tests/libcurl.R b/tests/libcurl.R
new file mode 100644
index 0000000..48dcce4
--- /dev/null
+++ b/tests/libcurl.R
@@ -0,0 +1,109 @@
+## These are tests that require libcurl functionality and a working
+## Internet connection.
+
+## As from R 3.4.0 method = "libcurl" is the default on a Unix-alike
+## so this is in small part duplication -- but not on Windows.
+
+if(!capabilities()["libcurl"]) {
+    warning("no libcurl support")
+    q()
+}
+
+if(.Platform$OS.type == "unix" &&
+   is.null(nsl("cran.r-project.org"))) q()
+
+example(curlGetHeaders, run.donttest = TRUE)
+
+tf <- tempfile()
+download.file("http://cran.r-project.org/", tf,  method = "libcurl")
+file.size(tf)
+unlink(tf)
+
+tf <- tempfile()
+download.file("ftp://ftp.stats.ox.ac.uk/pub/datasets/csb/ch11b.dat",
+              tf,  method = "libcurl")
+file.size(tf) # 2102
+unlink(tf)
+
+
+## test url connections on http
+str(readLines(zz <- url("http://cran.r-project.org/", method = "libcurl")))
+zz
+stopifnot(identical(summary(zz)$class, "url-libcurl"))
+close(zz)
+
+## https URL
+head(readLines(zz <- url("https://httpbin.org", method = "libcurl"),
+               warn = FALSE))
+close(zz)
+
+## redirection (to a https:// URL)
+head(readLines(zz <- url("http://bugs.r-project.org", method = "libcurl"),
+               warn = FALSE))
+close(zz)
+
+
+## check graceful failure: warnings leading to error
+## testUnknownUrlError <- tryCatch(suppressWarnings({
+##     zz <- url("http://foo.bar", "r", method = "libcurl")
+## }), error=function(e) {
+##     conditionMessage(e) == "cannot open connection"
+## })
+## close(zz)
+## stopifnot(testUnknownUrlError)
+
+## tf <- tempfile()
+## testDownloadFileError <- tryCatch(suppressWarnings({
+##     download.file("http://foo.bar", tf, method="libcurl")
+## }), error=function(e) {
+##     conditionMessage(e) == "cannot download all files"
+## })
+## stopifnot(testDownloadFileError, !file.exists(tf))
+
+tf <- tempfile()
+testDownloadFile404 <- tryCatch(suppressWarnings({
+    download.file("http://httpbin.org/status/404", tf, method="libcurl")
+}), error=function(e) {
+    conditionMessage(e) == "cannot open URL 'http://httpbin.org/status/404'"
+})
+stopifnot(testDownloadFile404, !file.exists(tf))
+
+## check specific warnings
+## testUnknownUrl <- tryCatch({
+##     zz <- url("http://foo.bar", "r", method = "libcurl")
+## }, warning=function(e) {
+##     grepl("Couldn't resolve host name", conditionMessage(e))
+## })
+## close(zz)
+## stopifnot(testUnknownUrl)
+
+test404.1 <- tryCatch({
+    open(zz <- url("http://httpbin.org/status/404", method="libcurl"))
+}, warning=function(w) {
+    grepl("404 Not Found", conditionMessage(w))
+})
+close(zz)
+stopifnot(test404.1)
+
+##  via read.table (which closes the connection)
+tail(read.table(url("http://www.stats.ox.ac.uk/pub/datasets/csb/ch11b.dat",
+                    method = "libcurl")))
+tail(read.table(url("ftp://ftp.stats.ox.ac.uk/pub/datasets/csb/ch11b.dat",
+                    method = "libcurl")))
+
+## check option works
+options(url.method = "libcurl")
+zz <- url("http://www.stats.ox.ac.uk/pub/datasets/csb/ch11b.dat")
+stopifnot(identical(summary(zz)$class, "url-libcurl"))
+close(zz)
+head(readLines("https://httpbin.org", warn = FALSE))
+
+test404.2 <- tryCatch({
+    open(zz <- url("http://httpbin.org/status/404"))
+}, warning = function(w) {
+    grepl("404 Not Found", conditionMessage(w))
+})
+close(zz)
+stopifnot(test404.2)
+
+showConnections(all = TRUE)
diff --git a/tests/lm-tests.Rout.save b/tests/lm-tests.Rout.save
index e6187bf..573cd25 100644
--- a/tests/lm-tests.Rout.save
+++ b/tests/lm-tests.Rout.save
@@ -1,7 +1,7 @@
 
-R version 3.1.2 RC (2014-10-29 r66897) -- "Pumpkin Helmet"
-Copyright (C) 2014 The R Foundation for Statistical Computing
-Platform: x86_64-unknown-linux-gnu (64-bit)
+R version 3.4.0 RC (2017-04-18 r72543) -- "You Stupid Darkness"
+Copyright (C) 2017 The R Foundation for Statistical Computing
+Platform: x86_64-pc-linux-gnu (64-bit)
 
 R is free software and comes with ABSOLUTELY NO WARRANTY.
 You are welcome to redistribute it under certain conditions.
diff --git a/tests/method-dispatch.Rout.save b/tests/method-dispatch.Rout.save
index 783e1ae..b49a0df 100644
--- a/tests/method-dispatch.Rout.save
+++ b/tests/method-dispatch.Rout.save
@@ -1,7 +1,7 @@
 
-R version 3.1.2 RC (2014-10-29 r66897) -- "Pumpkin Helmet"
-Copyright (C) 2014 The R Foundation for Statistical Computing
-Platform: x86_64-unknown-linux-gnu (64-bit)
+R version 3.4.0 RC (2017-04-18 r72543) -- "You Stupid Darkness"
+Copyright (C) 2017 The R Foundation for Statistical Computing
+Platform: x86_64-pc-linux-gnu (64-bit)
 
 R is free software and comes with ABSOLUTELY NO WARRANTY.
 You are welcome to redistribute it under certain conditions.
diff --git a/tests/no-segfault.Rin b/tests/no-segfault.Rin
index b1cc396..67bdf31 100644
--- a/tests/no-segfault.Rin
+++ b/tests/no-segfault.Rin
@@ -62,15 +62,25 @@ stop.list[["base"]] <-
     } else {
 	c(inet.list, socket.fun, edit.int, misc.int, misc.2)
     }
+
+## S4 group generics should not be called directly
+## and doing so sometimes leads to infinite recursion
+s4.group.generics <- c("Arith", "Compare", "Ops", "Logic", "Math", "Math2", "Summary", "Complex")
+
 ## warning: browseAll will tend to read all the script and/or loop forever
-stop.list[["methods"]] <- c("browseAll", "recover")
+stop.list[["methods"]] <- c("browseAll", "recover", s4.group.generics)
 stop.list[["tools"]] <- c("write_PACKAGES", # problems with Packages/PACKAGES
                           "testInstalledBasic",
                           "testInstalledPackages", # runs whole suite
                           "readNEWS",              # slow, pure R code
                           "findHTMLlinks", "pskill",
                           "texi2dvi", "texi2pdf",  # hang on Windows
-                          "getVignetteInfo"        # very slow on large installation
+                          "getVignetteInfo",       # very slow on large installation
+                          "CRAN_package_db",       # slow, pure R code
+                          "CRAN_check_results",
+                          "CRAN_check_details",
+                          "CRAN_memtest_notes",
+                          "summarize_CRAN_check_status"
                           )
 stop.list[["grDevices"]] <- dev.int
 stop.list[["utils"]] <- c("Rprof", "aspell", # hangs on Windows
@@ -84,11 +94,7 @@ if(.Platform$OS.type == "windows") cat('options(pager = "console")\n')
 cat('options(error=expression(NULL))',
     "# don't stop on error in batch\n##~~~~~~~~~~~~~~\n")
 
-cat(".proctime00 <- proc.time()\n",
-    "c0 <- character(0)\n",
-    "l0 <- logical(0)\n",
-    "m0 <- matrix(1,0,0)\n",
-    "df0 <- as.data.frame(c0)\n", sep="")
+cat(".proctime00 <- proc.time()\n")
 
 for (pkg in core.pkgs) {
   cat("### Package ", pkg, "\n",
@@ -106,6 +112,12 @@ for (pkg in core.pkgs) {
       if(!(nm %in% stop.list[[pkg]]) &&
 	 is.function(f <- get(nm, pos = pkgname))) {
 	  cat("\n## ", nm, " :\n")
+
+	  cat("c0 <- character(0)\n",
+	      "l0 <- logical(0)\n",
+	      "m0 <- matrix(1,0,0)\n",
+	      "df0 <- as.data.frame(c0)\n", sep="")
+
 	  cat("f <- get(\"",nm,"\", pos = '", pkgname, "')\n", sep="")
 	  cat("f()\nf(NULL)\nf(,NULL)\nf(NULL,NULL)\n",
 	      "f(list())\nf(l0)\nf(c0)\nf(m0)\nf(df0)\nf(FALSE)\n",
diff --git a/tests/ok-errors.R b/tests/ok-errors.R
index 1184ae5..b6a58f9 100644
--- a/tests/ok-errors.R
+++ b/tests/ok-errors.R
@@ -15,6 +15,10 @@ vector("list", 2^30+2)
 }
 
 ## bad infinite recursion / on.exit / ... interactions
+##   catch the error to permit different error messages emitted
+##   (handling of infinite recursion is different in the AST interpreter
+##   and the byte-code interpreter)
+
 bar <- function() 1+1
 foo <- function() { on.exit(bar()); foo() }
-foo() # now simple "infinite recursion"
+tryCatch(foo(), error=function(x) TRUE) # now simple "infinite recursion"
diff --git a/tests/ok-errors.Rout.save b/tests/ok-errors.Rout.save
index 6651751..1d016e8 100644
--- a/tests/ok-errors.Rout.save
+++ b/tests/ok-errors.Rout.save
@@ -1,7 +1,7 @@
 
-R version 3.1.2 RC (2014-10-29 r66897) -- "Pumpkin Helmet"
-Copyright (C) 2014 The R Foundation for Statistical Computing
-Platform: x86_64-unknown-linux-gnu (64-bit)
+R version 3.4.0 RC (2017-04-18 r72543) -- "You Stupid Darkness"
+Copyright (C) 2017 The R Foundation for Statistical Computing
+Platform: x86_64-pc-linux-gnu (64-bit)
 
 R is free software and comes with ABSOLUTELY NO WARRANTY.
 You are welcome to redistribute it under certain conditions.
@@ -33,8 +33,12 @@ Error: test of `options(error=expression(NULL))'
 + }
 > 
 > ## bad infinite recursion / on.exit / ... interactions
+> ##   catch the error to permit different error messages emitted
+> ##   (handling of infinite recursion is different in the AST interpreter
+> ##   and the byte-code interpreter)
+> 
 > bar <- function() 1+1
 > foo <- function() { on.exit(bar()); foo() }
-> foo() # now simple "infinite recursion"
-Error: evaluation nested too deeply: infinite recursion / options(expressions=)?
+> tryCatch(foo(), error=function(x) TRUE) # now simple "infinite recursion"
+[1] TRUE
 > 
diff --git a/tests/p-qbeta-strict-tst.R b/tests/p-qbeta-strict-tst.R
new file mode 100644
index 0000000..fe9b27c
--- /dev/null
+++ b/tests/p-qbeta-strict-tst.R
@@ -0,0 +1,411 @@
+options(warn = 2)# warnings are errors here
+pdf("p-qbeta-strict-tst.pdf")
+
+a <- 25; b <- 6
+x <- 2^-(300:200)
+if(interactive() && require(Rmpfr)) {
+    pbi <- pbetaI(x, a,b, log.p=TRUE, precBits = 2048)
+    ## plus experiments, to see that 2048 bits are way enough ...
+    dput(format(roundMpfr(pbi, 64))) ##
+} ## plus manual editing, removing all  ' " ' :
+
+lpb <- c(
+-5186.73671481652222237, -5169.40803530252358966, -5152.07935578852495651,
+-5134.75067627452632379, -5117.42199676052769108, -5100.09331724652905837,
+-5082.76463773253042566, -5065.43595821853179295, -5048.10727870453316024,
+-5030.77859919053452753, -5013.44991967653589482, -4996.12124016253726211,
+-4978.79256064853862940, -4961.46388113453999669, -4944.13520162054136398,
+-4926.80652210654273127, -4909.47784259254409855, -4892.14916307854546584,
+-4874.82048356454683313, -4857.49180405054820042, -4840.16312453654956727,
+-4822.83444502255093456, -4805.50576550855230185, -4788.17708599455366913,
+-4770.84840648055503642, -4753.51972696655640371, -4736.19104745255777100,
+-4718.86236793855913829, -4701.53368842456050558, -4684.20500891056187287,
+-4666.87632939656324016, -4649.54764988256460745, -4632.21897036856597474,
+-4614.89029085456734203, -4597.56161134056870932, -4580.23293182657007661,
+-4562.90425231257144389, -4545.57557279857281118, -4528.24689328457417803,
+-4510.91821377057554532, -4493.58953425657691261, -4476.26085474257827990,
+-4458.93217522857964719, -4441.60349571458101448, -4424.27481620058238176,
+-4406.94613668658374905, -4389.61745717258511634, -4372.28877765858648363,
+-4354.96009814458785092, -4337.63141863058921821, -4320.30273911659058550,
+-4302.97405960259195279, -4285.64538008859332008, -4268.31670057459468737,
+-4250.98802106059605466, -4233.65934154659742195, -4216.33066203259878879,
+-4199.00198251860015608, -4181.67330300460152337, -4164.34462349060289066,
+-4147.01594397660425795, -4129.68726446260562524, -4112.35858494860699253,
+-4095.02990543460835982, -4077.70122592060972710, -4060.37254640661109439,
+-4043.04386689261246168, -4025.71518737861382897, -4008.38650786461519626,
+-3991.05782835061656333, -3973.72914883661793062, -3956.40046932261929791,
+-3939.07178980862066520, -3921.74311029462203249, -3904.41443078062339977,
+-3887.08575126662476706, -3869.75707175262613435, -3852.42839223862750164,
+-3835.09971272462886871, -3817.77103321063023600, -3800.44235369663160329,
+-3783.11367418263297058, -3765.78499466863433787, -3748.45631515463570516,
+-3731.12763564063707245, -3713.79895612663843973, -3696.47027661263980702,
+-3679.14159709864117409, -3661.81291758464254138, -3644.48423807064390867,
+-3627.15555855664527596, -3609.82687904264664325, -3592.49819952864801054,
+-3575.16952001464937783, -3557.84084050065074512, -3540.51216098665211240,
+-3523.18348147265347947, -3505.85480195865484676, -3488.52612244465621405,
+-3471.19744293065758134, -3453.86876341665894863)
+stopifnot( all.equal(lpb, pbeta(x,a,b,log.=TRUE), tol=2e-16) )# pbeta() check
+
+
+qpb <- qbeta(lpb, a,b, log.p=TRUE)
+stopifnot(qpb > 0)# ok R >= 3.2.0, not in R 3.1.x
+## ideally   x == qbeta(pbeta(x, *), *) :
+all.equal(x, qpb, tol=0)# now: 4.986e-15 (was 5.238e-15)
+relE <- 1 - qpb/x
+mean(abs(relE))    # 1.145508e-14 (was 1.3182e-14)
+stopifnot(mean(abs(relE)) < 4e-14,
+          max (abs(relE)) < 1e-13)
+
+## a less extreme set -- but which uses *many* Newton iterations in qbeta()
+a <- 25; b <- 6
+x1 <- 2^-((20:120)/8)
+if(interactive() && require(Rmpfr)) {
+    pbi <- pbetaI(x, a,b, log.p=TRUE, precBits = 2048)
+    ## plus experiments, to see that 2048 bits are way enough ...
+    dput(format(roundMpfr(pbi, 64))) ##
+} ## plus manual editing, removing all  ' " ' :
+
+lp1 <- c(
+-32.3854423368776834953, -34.4673775119354555037, -36.5575116684945878344,
+-38.6549408996236989744, -40.7588797271766572448, -42.8686422494639326058,
+-44.9836268805878782655, -47.1033038887113481505, -49.2272051373989160267,
+-51.3549155771523890938, -53.4860661393789178081, -55.6203277631858045461,
+-57.7574063441183625303, -59.8970384385116822318, -62.0389875912418167943,
+-64.1830411810069771730, -66.3290076977781794185, -68.4767143831449023872,
+-70.6260051769883206996, -72.7767389240201063513, -74.9287878018119846216,
+-77.0820359384527194757, -79.2363781932417950496, -81.3917190781217361681,
+-83.5479718010642398301, -85.7050574155147660699, -87.8629040623880331051,
+-90.0214462930893329073, -92.1806244636893542185, -94.3403841917643962364,
+-96.5006758685776125997, -98.6614542202591991785, -100.822677912475871277,
+-102.984309193787888156, -105.146313573496065365, -107.308659530298884925,
+-109.471318248524419364, -111.634263379085354198, -113.797470822637087941,
+-115.960918532706589869, -118.124586336810151355, -120.288455773796669625,
+-122.452509945844263323, -124.616733383705931573, -126.781111923947395655,
+-128.945632597050500942, -131.110283525370608940, -133.275053830038264766,
+-135.439933545985967511, -137.604913544361364852, -139.769985461659902712,
+-141.935141634974191005, -144.100375042814531426, -146.265679251006534833,
+-148.431048363217896496, -150.596476975707801879, -152.761960135929819787,
+-154.927493304652777115, -157.093072321294422056, -159.258693372190260479,
+-161.424352961544612370, -163.590047884833502595, -165.755775204449382204,
+-167.921532227396093043, -170.087316484859319879, -172.253125713493005638,
+-174.418957838276008993, -176.584810956806029708, -178.750683324909148353,
+-180.916573343453874659, -183.082479546268141732, -185.248400589066309921,
+-187.414335239301226746, -189.580282366863611607, -191.746240935557583460,
+-193.912209995287317457, -196.078188674895169383, -198.244176175596733075,
+-200.410171764962911981, -202.576174771403232380, -204.742184579108529904,
+-206.908200623414650632, -209.074222386551973982, -211.240249393748649162,
+-213.406281209657976525, -215.572317435082926512, -217.738357703973061677,
+-219.904401680671135980, -222.070449057388595873, -224.236499551890932400,
+-226.402552905375368947, -228.568608880524961821, -230.734667259724367416,
+-232.900727843423843350, -235.066790448639183389, -237.232854907576249937,
+-239.398921066369763294, -241.564988783926857030, -243.731057930866643141,
+-245.897128388547890981, -248.063200048177428608)
+stopifnot( all.equal(lp1, pbeta(x1,a,b,log.=TRUE), tol=2e-16) )# pbeta() check
+
+qp1 <- qbeta(lp1, a,b, log.p=TRUE)
+stopifnot(qp1 > 0)
+## ideally   x == qbeta(pbeta(x, *), *) :
+all.equal(x1, qp1, tol=0)# now: 2.99e-16 , but
+relE <- 1 - qp1/x1
+mean(abs(relE))	   # 5.463177e-16 was 6.089738e-16
+stopifnot(mean(abs(relE)) < 3e-15,
+	  max (abs(relE)) < 1e-14)
+
+## log.p=FALSE: --- here (with DEBUG), see number of Newton steps
+
+p1 <- exp(lp1)
+qp1. <- qbeta(p1, a,b)
+## --> many cases that need "too many" Newton steps (on x0 scale: rather use log(x)-scale!)
+
+relE. <- 1 - qp1./x1
+mean(abs(relE.))    # 4.078146e-16
+ max(abs(relE.))    # 1.332268e-15
+all.equal(qp1, qp1., tol=0) # 3.083e-16
+stopifnot(all.equal(qp1, qp1., tol=8*.Machine$double.eps),
+	  mean(abs(relE.)) < 2e-15,
+	  max (abs(relE.)) < 7e-15 )
+
+
+a <- 43779; b <- 0.06728; x <- -exp(901/256)
+(qx <- qbeta(x , a,b, log=TRUE)) ## (157 iterations in log_x scale); fast in orig.scale
+## 0.9993614
+(pq <- pbeta(qx, a,b, log=TRUE)) ## = -33.7686
+1 - pq/x # rel.err ~  8.88e-16 "perfect"
+stopifnot(abs(1 - pq/x) < 1e-15)
+## but it uses probably the wrong swap_tail decision...
+curve(pbeta(exp(x), a,b, log=TRUE), -1e-3, -1e-7,   n=1025) # "the same" as
+par(new=TRUE)
+curve(pbeta(  x,    a,b, log=TRUE), 0.999, 1-1e-7, col=2, ylab="", xaxt="n"); axis(3)
+abline(v = qx, h = x, col="light blue", lty = 2)
+
+## as is this one -- the mirror image:
+(x. <- log1p(-exp(x))) #  -2.160156e-15
+(q. <- qbeta(x., b,a, log=TRUE, lower.tail=FALSE))# very quick convergence: u0 is perfect
+## 1.425625e-223
+(p. <- pbeta(q., b,a, log=TRUE, lower.tail=FALSE))
+stopifnot(all.equal(p., x., tol = 1e-15))
+
+## very different picture at the *other tail*:
+(q2 <- qbeta(x., b,a, log=TRUE)) ## 0.0006386087
+stopifnot(all.equal(pbeta(q2, b,a, log=TRUE), x., tol= 1e-13)) # Lx 64b: 2.37e-15
+
+curve(pbeta(x, b,a, log=TRUE), 1e-30, .5, n=1025, log="x")
+# Flip vertically and use log scale ==> "close" to  -x. = 2.160156e-15
+curve(-pbeta(x, b,a, log=TRUE), 1e-8, .005, n=1025, log="xy")
+abline(v = q2, h = -x., lty=3, col=2)
+
+### more extreme (a,b) [still computable with Rmpfr pbetaI():]
+a <- 800; b <- 2
+x <- 2^-c(10*(100:4), 37, 2*(17:14), 27:2, (8:1)/8)
+curve(pbeta(x,a,b, log=TRUE), n=1025, log="x", 1e-200, .1); mtext(R.version.string)
+axis(1, at=0.1); abline(h=0, lty=2)
+
+if(interactive() && require(Rmpfr)) {
+    pbi <- pbetaI(x, a,b, log.p=TRUE, precBits = 2048)
+    ## plus experiments, to see that 2048 bits are way enough ...
+    dput(format(roundMpfr(pbi, 64))) ##
+    stopifnot( all.equal(pbi, pbeta(x,a,b,log.=TRUE), tol=2e-16) )
+} ## plus manual editing, removing all  ' " ' :
+
+lp2 <- c(-554511.058587009179178, -548965.881142529616682, -543420.703698050054243,
+-537875.526253570491747, -532330.348809090929251, -526785.171364611366812,
+-521239.993920131804316, -515694.816475652241849, -510149.639031172679381,
+-504604.461586693116885, -499059.284142213554418, -493514.106697733991950,
+-487968.929253254429483, -482423.751808774866987, -476878.574364295304520,
+-471333.396919815742052, -465788.219475336179556, -460243.042030856617089,
+-454697.864586377054621, -449152.687141897492154, -443607.509697417929658,
+-438062.332252938367191, -432517.154808458804723, -426971.977363979242256,
+-421426.799919499679760, -415881.622475020117292, -410336.445030540554825,
+-404791.267586060992329, -399246.090141581429862, -393700.912697101867394,
+-388155.735252622304927, -382610.557808142742431, -377065.380363663179963,
+-371520.202919183617496, -365975.025474704055000, -360429.848030224492533,
+-354884.670585744930065, -349339.493141265367598, -343794.315696785805102,
+-338249.138252306242634, -332703.960807826680167, -327158.783363347117700,
+-321613.605918867555204, -316068.428474387992736, -310523.251029908430269,
+-304978.073585428867773, -299432.896140949305305, -293887.718696469742838,
+-288342.541251990180371, -282797.363807510617875, -277252.186363031055407,
+-271707.008918551492940, -266161.831474071930444, -260616.654029592367976,
+-255071.476585112805509, -249526.299140633243027, -243981.121696153680560,
+-238435.944251674118078, -232890.766807194555611, -227345.589362714993129,
+-221800.411918235430647, -216255.234473755868180, -210710.057029276305698,
+-205164.879584796743231, -199619.702140317180749, -194074.524695837618282,
+-188529.347251358055800, -182984.169806878493333, -177438.992362398930851,
+-171893.814917919368369, -166348.637473439805902, -160803.460028960243420,
+-155258.282584480680953, -149713.105140001118471, -144167.927695521556004,
+-138622.750251041993522, -133077.572806562431055, -127532.395362082868573,
+-121987.217917603306098, -116442.040473123743624, -110896.863028644181149,
+-105351.685584164618675, -99806.5081396850562001, -94261.3306952054937184,
+-88716.1532507259312439, -83170.9758062463687693, -77625.7983617668062948,
+-72080.6209172872438202, -66535.4434728076813457, -60990.2660283281188711,
+-55445.0885838485563930, -49899.9111393689939185, -44354.7336948894314439,
+-38809.5562504098689693, -33264.3788059303064912, -27719.2013614507440185,
+-22174.0239169711824498, -20510.4706836273200672, -18846.9174502835021912,
+-17737.8819613877641022, -16628.8464724925492266, -15519.8109835994272112,
+-14965.2932391551916034, -14410.7754947146766344, -13856.2577502816029460,
+-13301.7400058634118150, -12747.2222614749858050, -12192.7045171460900432,
+-11638.1867729362548083, -11083.6690289645407566, -10529.1512854690695820,
+-9974.63354292608620089, -9420.11580228808657456, -8865.59806546008711603,
+-8311.08033625221863883, -7756.56262228513473200, -7202.04493880171055809,
+-6647.52731629396961299, -6093.00981577106128650, -5538.49255935177176768,
+-4983.97579167624661567, -4429.46000364007375882, -3874.94618353590282056,
+-3320.43633428133439223, -2765.93456971959801893, -2211.44957214006085544,
+-1657.00072545683415248, -1102.63689396137728749, -548.523783020649678355,
+-479.303685612597087790, -410.103507771019607286, -340.930746845646155091,
+-271.797948987745926763, -202.728589967468744076, -133.775198381652975971,
+-65.1041210297877634069)
+stopifnot( all.equal(lp2, pbeta(x,a,b,log.=TRUE), tol=2e-16) )# pbeta() check
+
+qp2 <- qbeta(lp2, a,b, log.p=TRUE)# 7 precision warnings in R <= 3.1.0
+pq2 <- pbeta(qp2, a,b, log.p=TRUE)
+stopifnot(qp2 > 0, is.finite(pq2))
+## ideally   x == qbeta(pbeta(x, *), *) :
+all.equal(    x,      qp2,  tol=0)#  2.075e-16  was 1.956845e-08, but .. *misleading* a bit
+all.equal(log(x), log(qp2), tol=0)#  1.676e-16  was 1.0755 !!
+plot(qp2 ~ lp2, log='y', type='b', sub=R.version.string); V <- -5e4; abline(v = V, lty=3)
+plot(qp2 ~ lp2, log='y', type='b', sub=R.version.string, subset = lp2 > V)
+## ideally  lp2 == pbeta(qbeta(lp2, *), *) :
+all.equal(lp2, pq2, tol=0)# 1.26e-16;  was 1.07...
+plot(lp2, pq2, type='b', sub=R.version.string)
+plot(pq2 ~ lp2, type='b', sub=R.version.string, subset = log2(x) >= -80)
+axis(3, at=lp2, labels=log2(x), col="blue3")
+
+relE <- 1 - qp2/x
+rel2 <- 1 - pq2/lp2
+mean(abs(relE))	   # 1.53e-14   was 0.9913043 (R 3.1.0), then 0.8521738
+mean(abs(rel2))	   #  ~ 3e-17 (!); was 0.9913043 (R 3.1.0), then 0.8521738
+stopifnot(mean(abs(relE)) < 7e-14,
+	  max (abs(relE)) < 6e-13,
+          mean(abs(rel2)) < 4e-16,
+          max (abs(rel2)) < 8e-16)
+
+
+### even more extreme (a,b) [still computable with Rmpfr pbetaI():]
+a <- 2^12; b <- 2
+x <- 2^-c(10*(100:2), 17, 2*(7:4), 7:1, .5, .25)
+curve(pbeta(x,a,b, log=TRUE), n=1025, log="x", 1e-300, .1);mtext(R.version.string)
+
+if(interactive() && require(Rmpfr)) {
+    pbi <- pbetaI(x, a,b, log.p=TRUE, precBits = 2048)
+    ## plus experiments, to see that 2048 bits are way enough ...
+    dput(format(roundMpfr(pbi, 64))) ##
+    stopifnot( all.equal(pbi, pbeta(x,a,b,log.=TRUE), tol=2e-16) )
+} ## plus manual editing, removing all  ' " ' :
+
+lp3 <- c(-2839122.53356325844061, -2810731.22504752308055, -2782339.91653178772071,
+-2753948.60801605236088, -2725557.29950031700105, -2697165.99098458164121,
+-2668774.68246884628115, -2640383.37395311092132, -2611992.06543737556149,
+-2583600.75692164020165, -2555209.44840590484182, -2526818.13989016948199,
+-2498426.83137443412193, -2470035.52285869876209, -2441644.21434296340226,
+-2413252.90582722804243, -2384861.59731149268259, -2356470.28879575732276,
+-2328078.98028002196270, -2299687.67176428660287, -2271296.36324855124303,
+-2242905.05473281588320, -2214513.74621708052337, -2186122.43770134516330,
+-2157731.12918560980347, -2129339.82066987444364, -2100948.51215413908380,
+-2072557.20363840372386, -2044165.89512266836402, -2015774.58660693300419,
+-1987383.27809119764424, -1958991.96957546228441, -1930600.66105972692458,
+-1902209.35254399156463, -1873818.04402825620480, -1845426.73551252084496,
+-1817035.42699678548502, -1788644.11848105012518, -1760252.80996531476535,
+-1731861.50144957940540, -1703470.19293384404557, -1675078.88441810868562,
+-1646687.57590237332579, -1618296.26738663796596, -1589904.95887090260601,
+-1561513.65035516724618, -1533122.34183943188634, -1504731.03332369652639,
+-1476339.72480796116656, -1447948.41629222580673, -1419557.10777649044678,
+-1391165.79926075508695, -1362774.49074501972711, -1334383.18222928436717,
+-1305991.87371354900733, -1277600.56519781364750, -1249209.25668207828755,
+-1220817.94816634292772, -1192426.63965060756777, -1164035.33113487220794,
+-1135644.02261913684811, -1107252.71410340148816, -1078861.40558766612833,
+-1050470.09707193076849, -1022078.78855619540860, -993687.480040460048713,
+-965296.171524724688823, -936904.863008989328989, -908513.554493253969099,
+-880122.245977518609209, -851730.937461783249319, -823339.628946047889485,
+-794948.320430312529595, -766557.011914577169705, -738165.703398841809872,
+-709774.394883106449981, -681383.086367371090091, -652991.777851635730201,
+-624600.469335900370368, -596209.160820165010477, -567817.852304429650587,
+-539426.543788694290754, -511035.235272958930864, -482643.926757223570974,
+-454252.618241488211112, -425861.309725752851222, -397470.001210017491360,
+-369078.692694282131498, -340687.384178546771608, -312296.075662811411746,
+-283904.767147076051856, -255513.458631340691994, -227122.150115605332118,
+-198730.841599869972242, -170339.533084134612366, -141948.224568399252504,
+-113556.916052663893531, -85165.6075369294638477, -56774.2990221466148739,
+-48256.9064741001263457, -39739.5139727740774909, -34061.2524527157125043,
+-28382.9914822588674710, -22704.7327152528820928, -19865.6057919927700013,
+-17026.4828436463425554, -14187.3679884148968711, -11348.2699182657980446,
+-8509.20804096757424162, -5670.23129358494148988, -2831.50574442529708752,
+-1412.47477359632328309, -703.301613239304818981)
+stopifnot( all.equal(lp3, pbeta(x,a,b,log.=TRUE), tol=2e-16) )# pbeta() check
+
+qp3 <- qbeta(lp3, a,b, log.p=TRUE)
+pq3 <- pbeta(qp3, a,b, log.p=TRUE)
+stopifnot(qp3 > 0, is.finite(pq3))
+## ideally   x == qbeta(pbeta(x, *), *) :
+all.equal(    x,      qp3,  tol=0)# 1.599e-16
+all.equal(log(x), log(qp3), tol=0)# 1.405e-16
+## ideally  lp3 == pbeta(qbeta(lp3, *), *) :
+all.equal(lp3, pq3, tol=0)# 1.07... then TRUE!
+
+plot(pq3 ~ lp3, type='b', sub=R.version.string, subset = log2(x) >= -50)
+axis(3, at=lp3, labels=log2(x), col="blue2", col.axis="blue2")
+
+relE <- 1 - qp3/x
+rel2 <- 1 - pq3/lp3
+mean(abs(relE))# 1.518e-14 \\ 3.584e-14 for --disable-long-double
+mean(abs(rel2))# 0  !!
+
+stopifnot(mean(abs(rel2)) < 3e-15,
+	  mean(abs(relE)) < 8e-14,
+	  max (abs(relE)) < 4e-13)# 5.251e-14 \\ 2.140e-13 w/o long-double
+
+### pbeta()  warnings  /// close to underflow situation ----
+options(warn = 1)# warnings allowed, happen immediately
+
+## b = 1 ==> pbeta(x,a,1)  =  x^a  (mathematically, not quite numerically)
+
+x <- 1e-311*2^(-2:5)
+
+a <- 9.9999e-16
+##==> all work via  apser():
+all.equal(x^a, pbeta(x, a, 1), tol=0)               # 1.11e-16 -- perfect
+all.equal(a*log(x), pbeta(x, a, 1, log=TRUE), tol=0)# 3.5765e-14 -- less perfect
+
+## only very slightly larger a:
+a <- 1e-15
+all.equal(x^a, pbeta(x, a, 1), tol=0)# warnings !   # 7.12208e-13
+## this gives *TWO* warnings per pbeta() !! --- no longer [pbeta / toms708.c fixed]
+all.equal(a*log(x), pbeta(x, a, 1, log=TRUE), tol=0)# 0.853 ... catastrophic!
+
+## pbeta(*, log.p=TRUE)  now underflows to -Inf too often
+##                       If it does it *should* give a warning, at least!
+try.pb <- function(x, a,b, log.p=TRUE)
+    tryCatch(pbeta(x, a,b, log.p=log.p), error=identity, warning=identity)
+check.pb <- function(pb, true)
+    stopifnot((inherits(pb, "warning") && grepl("\\bInf\\b", pb$message)) ||
+              isTRUE(all.equal(print(pb), true, tol = 2e-7))) # << print(.) : see value
+
+## True values via  require(Rmpfr); asNumeric(pbetaI(326/512, 1900, 38, log=TRUE))
+##
+## Those with*out* a '#' mark all did  *not* underflow in R 2.9.1, nor R 2.10.1,
+## but did give NaN in 2.11.x (x >= 0)  and -Inf later === *regression* _FIXME_
+## i.e., the fix for PR#14230 pbeta(x, 3, 2200, lower.tail=FALSE, log.p=TRUE),
+## svn diff -c51327 (2010-03-19) was *not* helpful in these cases
+##
+check.pb(try.pb(437/512, 4711, 19), true = -664.8560)# did work in R <= 2.10.1 (see above)
+check.pb(try.pb(442/512, 4998, 19), true = -653.6326)
+check.pb(try.pb(430/512, 4208, 20), true = -649.9831)
+check.pb(try.pb(428/512, 4348, 20), true = -693.6123)
+check.pb(try.pb(429/512, 4348, 20), true = -683.6925)
+check.pb(try.pb(421/512, 4012, 21), true = -695.9839)
+check.pb(try.pb(422/512, 4012, 21), true = -686.6862)
+check.pb(try.pb(423/512, 4012, 21), true = -677.4135)
+check.pb(try.pb(441/512, 4969, 20), true = -656.8775)
+check.pb(try.pb(442/512, 4969, 20), true = -645.8918)
+check.pb(try.pb(443/512, 4969, 20), true = -634.9354)
+
+check.pb(try.pb(407/512, 3455, 22), true = -700.4242)
+check.pb(try.pb(435/512, 4996, 23), true = -716.9553)
+check.pb(try.pb(397/512, 3000, 24), true = -664.8547)
+check.pb(try.pb(397/512, 3070, 24), true = -682.1341)
+check.pb(try.pb(393/512, 3070, 24), true = -712.4377)
+check.pb(try.pb(412/512, 3530, 24), true = -668.2493)
+
+check.pb(try.pb(400/512, 3085, 25), true = -659.8754)
+check.pb(try.pb(409/512, 3352, 25), true = -651.2284)
+check.pb(try.pb(400/512, 3352, 25), true = -723.8049)
+check.pb(try.pb(415/512, 3541, 25), true = -642.2389)
+check.pb(try.pb(430/512, 4291, 25), true = -646.8498)
+
+check.pb(try.pb(377/512, 2551, 26), true = -675.8778)
+check.pb(try.pb(370/512, 2551, 26), true = -722.4272)
+check.pb(try.pb(412/512, 3505, 26), true = -656.3025)
+
+check.pb(try.pb(370/512, 2499, 27), true = -702.7537)
+check.pb(try.pb(367/512, 2499, 27), true = -722.5556)
+
+check.pb(try.pb(363/512, 2318, 28), true = -685.6969)
+check.pb(try.pb(360/512, 2399, 28), true = -732.005)
+
+check.pb(try.pb(348/512, 2158, 29), true = -717.8487)
+check.pb(try.pb(367/512, 2397, 29), true = -683.2321)
+check.pb(try.pb(380/512, 2661, 29), true = -678.227)
+
+check.pb(try.pb(362/512, 2292, 30), true = -676.8534)
+check.pb(try.pb(369/512, 2495, 30), true = -698.3849)
+
+check.pb(try.pb(326/512, 1900, 38), true = -714.7700)
+## all those check.pb() above *did* work in R <= 2.10.1 ----
+
+## all those below have always underflowed (or worse) -- now give *warning* at least:
+check.pb(try.pb(412/512, 4996, 23), true = -982.6083)#
+check.pb(try.pb(400/512, 4291, 25), true = -949.7046)#
+
+check.pb(try.pb(370/512, 3700, 28), true = -1079.069)#
+check.pb(try.pb(401/512, 3700, 28), true = -788.0158)#
+check.pb(try.pb(351/512, 4777, 28), true = -1670.472)#
+
+check.pb(try.pb(365/512, 3699, 29), true = -1124.502)#
+check.pb(try.pb(341/512, 2146, 30), true = -752.5865)#
+
+check.pb(try.pb(289/512, 1900, 38), true = -936.9607)#
+check.pb(try.pb(290/512, 1900, 38), true = -930.5637)#
+check.pb(try.pb(293/512, 1900, 38), true = -911.5123)#
+check.pb(try.pb(295/512, 1900, 38), true = -898.9261)#
+check.pb(try.pb(296/512, 1900, 38), true = -892.6670)#
+check.pb(try.pb(302/512, 1900, 38), true = -855.5796)#
+check.pb(try.pb(305/512, 1900, 38), true = -837.3302)#
+check.pb(try.pb(308/512, 1900, 38), true = -819.2725)#
diff --git a/tests/p-r-random-tests.Rout.save b/tests/p-r-random-tests.Rout.save
index ed7cb36..6533153 100644
--- a/tests/p-r-random-tests.Rout.save
+++ b/tests/p-r-random-tests.Rout.save
@@ -1,7 +1,7 @@
 
-R version 3.1.2 RC (2014-10-29 r66897) -- "Pumpkin Helmet"
-Copyright (C) 2014 The R Foundation for Statistical Computing
-Platform: x86_64-unknown-linux-gnu (64-bit)
+R version 3.4.0 RC (2017-04-18 r72543) -- "You Stupid Darkness"
+Copyright (C) 2017 The R Foundation for Statistical Computing
+Platform: x86_64-pc-linux-gnu (64-bit)
 
 R is free software and comes with ABSOLUTELY NO WARRANTY.
 You are welcome to redistribute it under certain conditions.
@@ -278,6 +278,6 @@ f(df1 = 10, df2 = 2, ncp = 3) PASSED
 > 
 > 
 > cat('Time elapsed: ', proc.time() - .proctime00,'\n')
-Time elapsed:  1.281 0.002 1.286 0 0 
+Time elapsed:  1.305 0.004 1.312 0 0 
 > 
 > 
diff --git a/tests/primitives.R b/tests/primitives.R
index 0628f13..bc9505f 100644
--- a/tests/primitives.R
+++ b/tests/primitives.R
@@ -47,24 +47,17 @@ for(f in ls(.ArgsEnv, all.names=TRUE))
 }
 
 
-## check that all primitives are accounted for in .[Generic]ArgsEnv.
-## and nothing else
-ff <- ls("package:base", all.names=TRUE)
-ff <- ff[sapply(ff, function(x) is.primitive(get(x, "package:base")))]
-## NB: there is a another version of this list in tools::undoc()
-lang_elements <-
-    c('$', '$<-', '&&', '(', ':', '<-', '<<-', '=', '@', '@<-',
-      '[', '[<-', '[[', '[[<-', 'break', 'for', 'function', 'if', 'next',
-      'repeat', 'return', 'while', '{', '||', '~')
+## check that all primitives are accounted for in .[Generic]ArgsEnv,
+## apart from the language elements:
+ff <- as.list(baseenv(), all.names=TRUE)
+ff <- names(ff)[vapply(ff, is.primitive, logical(1L))]
 
-known <- c(ls(.GenericArgsEnv, all.names=TRUE),
-           ls(.ArgsEnv, all.names=TRUE),
-           lang_elements)
+known <- c(names(.GenericArgsEnv), names(.ArgsEnv), tools::langElts)
 stopifnot(ff %in% known, known %in% ff)
 
 
 ## check which are not considered as possibles for S4 generic
-ff4 <- names(methods:::.BasicFunsList)
+ff4 <- names(meth.FList <- methods:::.BasicFunsList)
 # as.double is the same as as.numeric
 S4generic <- ff %in% c(ff4, "as.double")
 notS4 <- ff[!S4generic]
@@ -74,8 +67,7 @@ if(length(notS4))
 stopifnot(S4generic)
 
 # functions which are listed but not primitive
-extraS4 <- c('all', 'any', 'max', 'min', 'prod', 'range',
-             'round', 'signif', 'sum')
+extraS4 <- c('unlist', 'as.vector')
 ff4[!ff4 %in% c(ff, extraS4)]
 stopifnot(ff4 %in% c(ff, extraS4))
 
@@ -83,7 +75,7 @@ stopifnot(ff4 %in% c(ff, extraS4))
 ## primitives which are not internally generic cannot have S4 methods
 ## unless specifically arranged (e.g. %*%)
 nongen_prims <- ff[!ff %in% ls(.GenericArgsEnv, all.names=TRUE)]
-ff3 <- names(methods:::.BasicFunsList)[sapply(methods:::.BasicFunsList, function(x) is.logical(x) && !x)]
+ff3 <- ff4[vapply(meth.FList, function(x) is.logical(x) && !x, NA, USE.NAMES=FALSE)]
 ex <- nongen_prims[!nongen_prims %in% c("$", "$<-", "[", "[[" ,"[[<-", "[<-", "%*%", ff3)]
 if(length(ex))
     cat("non-generic primitives not excluded in methods:::.BasicFunsList:",
@@ -94,10 +86,10 @@ stopifnot(length(ex) == 0)
 require(methods)
 setClass("foo", representation(x="numeric", y="numeric"))
 xx <- new("foo",  x=1, y=2)
-S4gen <- names(methods:::.BasicFunsList)[sapply(methods:::.BasicFunsList, function(x) is.function(x))]
+S4gen <- ff4[vapply(meth.FList, is.function, NA, USE.NAMES=FALSE)]
 for(f in S4gen) {
     g <- get(f)
-    if(is.primitive(g)) g <- getGeneric(f) # should error on non-Generics.
+    if(!is(g, "genericFunction")) g <- getGeneric(f) # error on non-Generics.
     ff <- args(g)
     body(ff) <- "testit"
     nm <- names(formals(ff))
@@ -117,7 +109,7 @@ except <- c("call", "switch", ".C", ".Fortran", ".Call", ".External",
             ".External2", ".Call.graphics", ".External.graphics",
             ".subset", ".subset2", ".primTrace", ".primUntrace",
             "lazyLoadDBfetch", ".Internal", ".Primitive", "^", "|",
-            "%*%", "rep", "seq.int",
+            "%*%", "rep", "seq.int", "forceAndCall",
             ## these may not be enabled
             "tracemem", "retracemem", "untracemem")
 
@@ -126,7 +118,7 @@ for(f in ls(.GenericArgsEnv, all.names=TRUE)[-(1:15)])
     if (f %in% except) next
     g <- get(f, envir = .GenericArgsEnv)
     an <- names(formals(args(g)))
-    if(length(an) >0 && an[1] == "...") next
+    if(length(an) > 0 && an[1] == "...") next
     an <- an[an != "..."]
     a <- rep(list(NULL), length(an))
     names(a) <- c("zZ", an[-1])
@@ -141,7 +133,7 @@ for(f in ls(.ArgsEnv, all.names=TRUE))
     if (f %in% except) next
     g <- get(f, envir = .ArgsEnv)
     an <- names(formals(args(g)))
-    if(length(an) >0 && an[1] == "...") next
+    if(length(an) > 0 && an[1] == "...") next
     an <- an[an != "..."]
     if(length(an)) {
         a <- rep(list(NULL), length(an))
diff --git a/tests/print-tests.Rout.save b/tests/print-tests.Rout.save
index 7f170ae..bf2ff33 100644
--- a/tests/print-tests.Rout.save
+++ b/tests/print-tests.Rout.save
@@ -1,7 +1,7 @@
 
-R version 3.1.2 RC (2014-10-29 r66897) -- "Pumpkin Helmet"
-Copyright (C) 2014 The R Foundation for Statistical Computing
-Platform: x86_64-unknown-linux-gnu (64-bit)
+R version 3.4.0 RC (2017-04-18 r72543) -- "You Stupid Darkness"
+Copyright (C) 2017 The R Foundation for Statistical Computing
+Platform: x86_64-pc-linux-gnu (64-bit)
 
 R is free software and comes with ABSOLUTELY NO WARRANTY.
 You are welcome to redistribute it under certain conditions.
@@ -550,7 +550,7 @@ b 1.2+11i 2.4+23.141593i
 > 
 > e1 <- tryCatch(options(max.print=Inf), error=function(e)e)
 Warning message:
-In options(max.print = Inf) : NAs introduced by coercion
+In options(max.print = Inf) : NAs introduced by coercion to integer range
 > e2 <- tryCatch(options(max.print= 0),  error=function(e)e)
 > stopifnot(inherits(e1, "error"))
 > 
diff --git a/tests/r-strict-tst.R b/tests/r-strict-tst.R
new file mode 100644
index 0000000..06e3539
--- /dev/null
+++ b/tests/r-strict-tst.R
@@ -0,0 +1,57 @@
+#### Strict "regression" (no output comparison) tests
+#### or  [R]andom number generating functions
+
+options(warn = 2)# warnings are errors here
+
+## For integer valued comparisons
+all.eq0 <- function(x,y, ...) all.equal(x,y, tolerance = 0, ...)
+
+###------- Discrete Distributions ----------------
+
+set.seed(17)
+stopifnot(
+    all.eq0(rhyper(100, 3024, 27466, 251),
+	    c(25, 24, 21, 31, 25, 33, 28, 28, 27, 37, 26, 31, 27, 22, 21,
+	      33, 22, 32, 27, 28, 29, 22, 20, 20, 21, 18, 23, 21, 26, 22, 28,
+	      24, 25, 16, 38, 26, 35, 24, 28, 26, 21, 15, 19, 24, 26, 21, 28,
+	      21, 27, 27, 24, 31, 22, 18, 27, 24, 28, 22, 25, 19, 29, 31, 27,
+	      24, 26, 26, 24, 23, 20, 23, 23, 26, 22, 36, 29, 32, 23, 25, 20,
+	      12, 36, 29, 28, 23, 24, 26, 29, 25, 28, 18, 18, 27, 24, 18, 22,
+	      32, 31, 23, 26, 23))
+   ,
+    all.eq0(rhyper(100,  329, 3059, 225),
+	    c(21, 21, 17, 21, 15, 25, 24, 15, 27, 21, 18, 22, 29, 17, 18,
+	      19, 32, 23, 23, 22, 20, 20, 15, 23, 19, 25, 25, 18, 17, 17, 19,
+	      28, 17, 20, 21, 21, 20, 17, 25, 21, 21, 15, 25, 25, 15, 21, 26,
+	      14, 21, 23, 21, 14, 15, 24, 23, 21, 20, 20, 20, 24, 16, 21, 25,
+	      30, 17, 19, 22, 19, 22, 23, 19, 20, 18, 15, 21, 12, 24, 20, 14,
+	      20, 25, 22, 19, 23, 14, 19, 15, 23, 23, 15, 23, 26, 32, 23, 25,
+	      19, 23, 18, 24, 25))
+    ,
+    ## using  branch II  in ../src/nmath/rhyper.c :
+    print(ct3 <- system.time(N <- rhyper(100, 8000, 1e9-8000, 1e6))[1]) < 0.02
+    ,
+    all.eq0(N, c(11, 9, 7, 4, 8, 6, 10, 5, 9, 8, 10, 5, 8, 8, 4, 10, 9, 8, 7,
+		 9, 11, 5, 7, 9, 8, 8, 5, 5, 10, 7, 8, 5, 4, 11, 9, 7, 8, 6, 7,
+		 9, 14, 9, 8, 8, 8, 4, 12, 9, 8, 11, 10, 12, 9, 13, 13, 8, 8,
+		 10, 9, 4, 7, 9, 11, 2, 5, 8, 7, 8, 11, 8, 6, 8, 6, 3, 4, 12,
+		 8, 10, 9, 6, 3, 6, 7, 10, 7, 4, 5, 8, 10, 8, 7, 11, 8, 12, 4,
+		 9, 5, 9, 7, 11))
+)
+
+
+N <- 1e10; m <- 1e5; n <- N-m; k <- 1e6
+n /.Machine$integer.max ## 4.66
+p <- m/N; q <- 1 - p
+cat(sprintf(
+   "N = n+m = %g, m = Np = %g; k = %g ==> (p,f) = (m,k)/N = (%g, %g)\n k*p*q = %.4g > 1: %s\n",
+    N, m, k, m/N, k/N, k*p*q, k*p*q > 1))
+set.seed(11)
+rH <- rhyper(20, m=m, n=n, k=k) # now via qhyper() - may change!
+stopifnot( is.finite(rH), 3 <= rH, rH <= 24) # allow slack for change
+## gave all NA_integer_ in R < 3.3.0
+
+
+stopifnot(identical(rgamma(1, Inf), Inf),
+	  identical(rgamma(1, 0, 0), 0))
+## gave NaN in R <= 3.3.0
diff --git a/tests/reg-BLAS.R b/tests/reg-BLAS.R
index 4e89b1b..d84edad 100644
--- a/tests/reg-BLAS.R
+++ b/tests/reg-BLAS.R
@@ -1,3 +1,4 @@
+
 ## PR#4582 %*% with NAs
 stopifnot(is.na(NA %*% 0), is.na(0 %*% NA))
 ## depended on the BLAS in use.
@@ -12,3 +13,123 @@ stopifnot(identical(z, x %*% t(y)))
 stopifnot(is.nan(log(0) %*% 0))
 ## depended on the BLAS in use: some (including the reference BLAS)
 ## had z[1,3] == 0 and log(0) %*% 0 as as.matrix(0).
+
+## matrix products
+for(mopt in c("default","internal","default.simd")) {
+
+  # matprod="blas" is excluded because some tests fail due to issues
+  # in NaN/Inf propagation even in Rblas
+  options(matprod=mopt)
+
+  m <- matrix(c(1,2,3,4), ncol=2)
+  v <- c(11,12)
+  rv <- v; dim(rv) <- c(1,2)
+  cv <- v; dim(cv) <- c(2,1)
+
+  Cm <- m+0*1i;  # cast to complex keeping dimensions
+  Cv <- v+0*1i;
+  Ccv <- cv+0*1i;
+  Crv <- rv+0*1i;
+
+  cprod <- function(rres, cres, expected) {
+    stopifnot(identical(rres, expected))
+    stopifnot(identical(Re(cres), expected))
+  }
+
+  cprod(m %*% m, Cm %*% Cm, matrix(c(7,10,15,22), 2, 2) )
+  cprod(m %*% cv, Cm %*% Ccv, matrix(c(47,70), 2, 1) )
+  cprod(m %*% v, Cm %*% Cv, matrix(c(47,70), 2, 1) )
+  cprod(rv %*% m, Crv %*% Cm, matrix(c(35,81), 1, 2) )
+  cprod(v %*% m, Cv %*% Cm, matrix(c(35,81), 1, 2) )
+  cprod(rv %*% cv, Crv %*% Ccv, matrix(265,1,1) )
+  cprod(cv %*% rv, Ccv %*% Crv, matrix(c(121,132,132,144), 2, 2) )
+  cprod(v %*% v, Cv %*% Cv, matrix(265,1,1) )
+
+  cprod(crossprod(m, m), crossprod(Cm, Cm), matrix(c(5,11,11,25), 2, 2) )
+  cprod(crossprod(m), crossprod(Cm), matrix(c(5,11,11,25), 2, 2) )
+  cprod(crossprod(m, cv), crossprod(Cm, Ccv), matrix(c(35,81), 2, 1) )
+  cprod(crossprod(m, v), crossprod(Cm, Cv), matrix(c(35,81), 2, 1) )
+  cprod(crossprod(cv, m), crossprod(Ccv, Cm), matrix(c(35,81), 1, 2) )
+  cprod(crossprod(v, m), crossprod(Cv, Cm), matrix(c(35,81), 1, 2) )
+  cprod(crossprod(cv, cv), crossprod(Ccv, Ccv), matrix(265,1,1) )
+  cprod(crossprod(v, v), crossprod(Cv, Cv), matrix(265,1,1) )
+  cprod(crossprod(rv, rv), crossprod(Crv, Crv), matrix(c(121,132,132,144), 2, 2) )
+
+  cprod(tcrossprod(m, m), tcrossprod(Cm, Cm), matrix(c(10,14,14,20), 2, 2) )
+  cprod(tcrossprod(m), tcrossprod(Cm), matrix(c(10,14,14,20), 2, 2) )
+  cprod(tcrossprod(m, rv), tcrossprod(Cm, Crv), matrix(c(47,70), 2, 1) )
+  cprod(tcrossprod(rv, m), tcrossprod(Crv, Cm), matrix(c(47,70), 1, 2) )
+  cprod(tcrossprod(v, m), tcrossprod(Cv, Cm), matrix(c(47,70), 1, 2) )
+  cprod(tcrossprod(rv, rv), tcrossprod(Crv, Crv), matrix(265,1,1) )
+  cprod(tcrossprod(cv, cv), tcrossprod(Ccv, Ccv), matrix(c(121,132,132,144), 2, 2) )
+  cprod(tcrossprod(v, v), tcrossprod(Cv, Cv), matrix(c(121,132,132,144), 2, 2) )
+
+  ## non-square matrix, with Inf
+
+  m1 <- matrix(c(1,2,Inf,4,5,6), ncol=2)
+  m2 <- matrix(c(1,2,3,4), ncol=2)
+
+  v <- c(11,12)
+  rv <- v; dim(rv) <- c(1,2)
+  cv <- v; dim(cv) <- c(2,1)
+
+  v1 <- c(11,12,13)
+  rv1 <- v1; dim(rv1) <- c(1,3)
+  cv1 <- v1; dim(cv1) <- c(3,1)
+
+  Cm1 <- m1+0*1i
+  Cm2 <- m2+0*1i
+  Cv <- v+0*1i
+  Crv <- rv+0*1i
+  Ccv <- cv+0*1i
+  Cv1 <- v1+0*1i
+  Crv1 <- rv1+0*1i
+  Ccv1 <- cv1+0*1i
+
+  cprod(m1 %*% m2, Cm1 %*% Cm2, matrix(c(9,12,Inf,19,26,Inf), 3, 2) )
+  cprod(m1 %*% cv, Cm1 %*% Ccv, matrix(c(59,82,Inf), 3, 1) )
+
+    # the following 7 lines fail with Rblas and matprod = "blas"
+  cprod(rv1 %*% m1, Crv1 %*% Cm1, matrix(c(Inf,182), 1, 2) )
+
+  cprod(crossprod(m1, m1), crossprod(Cm1, Cm1), matrix(c(Inf,Inf,Inf,77), 2, 2) )
+  cprod(crossprod(m1, cv1), crossprod(Cm1, Ccv1), matrix(c(Inf,182), 2, 1) )
+  cprod(crossprod(cv1, m1), crossprod(Ccv1, Cm1), matrix(c(Inf,182), 1, 2) )
+
+  cprod(tcrossprod(m1, m1), tcrossprod(Cm1, Cm1), matrix(c(17,22,Inf,22,29,Inf,Inf,Inf,Inf), 3,3) )
+  cprod(tcrossprod(m2, m1), tcrossprod(Cm2, Cm1), matrix(c(13,18,17,24,Inf,Inf), 2, 3) )
+  cprod(tcrossprod(rv, m1), tcrossprod(Crv, Cm1), matrix(c(59,82,Inf), 1, 3) )
+    # the previous 7 lines fail with Rblas and matprod = "blas"
+
+  cprod(tcrossprod(m1, rv), tcrossprod(Cm1, Crv), matrix(c(59,82,Inf), 3, 1) )
+
+  ## complex
+
+  m1 <- matrix(c(1+1i,2+2i,3+3i,4+4i,5+5i,6+6i), ncol=2)
+  m2 <- matrix(c(1+1i,2+2i,3+3i,4+4i), ncol=2)
+
+  stopifnot(identical(m1 %*% m2, matrix(c(18i,24i,30i,38i,52i,66i), 3, 2) ))
+  stopifnot(identical(crossprod(m1, m1), t(m1) %*% m1))
+  stopifnot(identical(tcrossprod(m1, m1), m1 %*% t(m1)))
+}
+
+## check that propagation of NaN/Inf values in multiplication of complex
+## numbers is the same as in multiplication of complex matrices
+
+for(mopt in c("default","internal","default.simd")) {
+  # matprod="blas" is excluded because some tests fail due to issues
+  # in NaN/Inf propagation even in Rblas
+  options(matprod=mopt)
+
+  vals <- c(0, 1, NaN, Inf)
+  for(ar in vals)
+  for(ai in vals)
+  for(br in vals)
+  for(bi in vals) {
+    a = ar + 1i * ai
+    b = br + 1i * bi
+    stopifnot(identical(a * b, as.complex(a %*% b)))
+    stopifnot(identical(a * b, as.complex(crossprod(a,b))))
+    stopifnot(identical(a * b, as.complex(tcrossprod(a,b))))
+  }
+}
diff --git a/tests/reg-IO.Rout.save b/tests/reg-IO.Rout.save
index 5a7d0e9..8c1e6ca 100644
--- a/tests/reg-IO.Rout.save
+++ b/tests/reg-IO.Rout.save
@@ -1,7 +1,7 @@
 
-R version 3.1.2 RC (2014-10-29 r66897) -- "Pumpkin Helmet"
-Copyright (C) 2014 The R Foundation for Statistical Computing
-Platform: x86_64-unknown-linux-gnu (64-bit)
+R version 3.4.0 RC (2017-04-18 r72543) -- "You Stupid Darkness"
+Copyright (C) 2017 The R Foundation for Statistical Computing
+Platform: x86_64-pc-linux-gnu (64-bit)
 
 R is free software and comes with ABSOLUTELY NO WARRANTY.
 You are welcome to redistribute it under certain conditions.
diff --git a/tests/reg-IO2.Rout.save b/tests/reg-IO2.Rout.save
index 12737c1..9b065e2 100644
--- a/tests/reg-IO2.Rout.save
+++ b/tests/reg-IO2.Rout.save
@@ -1,7 +1,7 @@
 
-R version 3.1.2 RC (2014-10-29 r66897) -- "Pumpkin Helmet"
-Copyright (C) 2014 The R Foundation for Statistical Computing
-Platform: x86_64-unknown-linux-gnu (64-bit)
+R version 3.4.0 RC (2017-04-18 r72543) -- "You Stupid Darkness"
+Copyright (C) 2017 The R Foundation for Statistical Computing
+Platform: x86_64-pc-linux-gnu (64-bit)
 
 R is free software and comes with ABSOLUTELY NO WARRANTY.
 You are welcome to redistribute it under certain conditions.
@@ -64,7 +64,7 @@ Error in read.table("foo1") : no lines available in input
 > 
 > # wrong col.names
 > try(read.table("foo3", header=TRUE, col.names=letters[1:4]))
-Error in scan(file, what, nmax, sep, dec, quote, skip, nlines, na.strings,  : 
+Error in scan(file = file, what = what, sep = sep, quote = quote, dec = dec,  : 
   line 1 did not have 4 elements
 In addition: Warning message:
 In read.table("foo3", header = TRUE, col.names = letters[1:4]) :
diff --git a/tests/reg-S4-examples.R b/tests/reg-S4-examples.R
new file mode 100644
index 0000000..a52a11f
--- /dev/null
+++ b/tests/reg-S4-examples.R
@@ -0,0 +1,357 @@
+## examples for a simple class with two numeric slots.
+## (Run example(setMethod) to see the class and function definitions)
+
+  setClass("track", slots = c(x="numeric", y = "numeric"))
+
+  cumdist <- function(x, y) c(0., cumsum(sqrt(diff(x)^2 + diff(y)^2)))
+  setClass("trackMultiCurve", slots = c(x="numeric", y="matrix", smooth="matrix"),
+          prototype = list(x=numeric(), y=matrix(0,0,0), smooth= matrix(0,0,0)))
+
+require(graphics)
+
+
+## methods for plotting track objects
+##
+## First, with only one object as argument, plot the two slots
+##  y must be included in the signature, it would default to "ANY"
+setMethod("plot", signature(x="track", y="missing"),
+  function(x,  y, ...) plot(x at x, x at y, ...)
+)
+
+## plot numeric data on either axis against a track object
+## (reducing the track object to the cumulative distance along the track)
+## Using a short form for the signature, which matches like formal arguments
+setMethod("plot", c("track", "numeric"),
+ function(x, y, ...) plot(cumdist(x at x, x at y), y,  xlab = "Distance",...)
+)
+
+## and similarly for the other axis
+setMethod("plot", c("numeric", "track"),
+ function(x, y, ...) plot(x, cumdist(y at x, y at y),  ylab = "Distance",...)
+)
+
+t1 <- new("track", x=1:20, y=(1:20)^2)
+plot(t1)
+plot(qnorm(ppoints(20)), t1)
+
+## Now a class that inherits from "track", with a vector for data at
+## the points
+  setClass("trackData", contains = c("numeric", "track"))
+
+
+tc1 <- new("trackData", t1, rnorm(20))
+
+
+## a method for plotting the object
+## This method has an extra argument, allowed because ... is an
+## argument to the generic function.
+setMethod("plot", c("trackData", "missing"),
+function(x, y, maxRadius = max(par("cin")), ...) {
+  plot(x at x, x at y, type = "n", ...)
+  symbols(x at x, x at y, circles = abs(x), inches = maxRadius)
+  }
+)
+plot(tc1)
+
+## Without other methods for "trackData", methods for "track"
+## will be selected by inheritance
+
+plot(qnorm(ppoints(20)), tc1)
+
+## defining methods for primitive functions.
+## Although "[" and "length" are not ordinary functions
+## methods can be defined for them.
+setMethod("[", "track",
+  function(x, i, j, ..., drop) {
+    x at x <- x at x[i]; x at y <- x at y[i]
+    x
+  })
+plot(t1[1:15])
+
+setMethod("length", "track", function(x)length(x at y))
+length(t1)
+
+
+setMethod("summary", "missing", function() "<No Object>")
+
+stopifnot(identical(summary(), "<No Object>"))
+
+removeMethods("summary")
+
+## for the primitives
+## inherited methods
+
+length(tc1)
+tc1[-1]
+
+## make sure old-style methods still work.
+t11 <- t1[1:15]
+identical(t1 at y[1:15], t11 at y)
+
+## S3 methods, with nextMethod
+form <- y ~ x
+form[1]
+
+## S3 arithmetic methods
+ISOdate(1990, 12, 1)- ISOdate(1980, 12, 1)
+
+## group methods
+
+setMethod("Arith", c("track", "numeric"), function(e1, e2){e1 at y <-
+  callGeneric(e1 at y , e2); e1})
+
+t1  - 100.
+t1/2
+
+## check it hasn't screwed up S3 methods
+ISOdate(1990, 12, 1)- ISOdate(1980, 12, 1)
+
+## test the .Generic mechanism
+
+setMethod("Compare", signature("track", "track"),
+  function(e1,e2) {
+  switch(.Generic,
+   "==" = e1 at y == e2 at y,
+  NA)
+ })
+
+#stopifnot(all(t1==t1))
+#stopifnot(identical(t1<t1, NA))
+
+
+## A test of nested calls to "[" with matrix-style arguments
+## applied to data.frames (S3 methods)
+
+setMethod("[", c("trackMultiCurve", "numeric", "numeric"), function(x, i, j, ..., drop) {
+### FIXME:  a better version has only 1st arg in signature
+### and uses callNextMethod, when this works with primitives.
+    x at y <- x at y[i, j, drop=FALSE]
+    x at x <- x at x[i]
+    x
+})
+
+
+"testFunc" <-
+function(cur) {
+    sorted <- cur[order(cur[,1]),]
+    sorted[ !is.na(sorted[,1]), ]
+}
+
+Nrow <- 1000 # at one time, values this large triggered a bug in gc/protect
+## the loop here was a trigger for the bug
+Niter <- 10
+for(i in 1:Niter)  {
+    yy <- matrix(stats::rnorm(10*Nrow), 10, Nrow)
+    tDF <- as.data.frame(yy)
+    testFunc(tDF)
+}
+
+
+tMC <- new("trackMultiCurve", x=seq_len(Nrow), y = yy)
+## not enough functions have methods for this class to use testFunc
+
+stopifnot(identical(tMC[1:10, 1:10]@y, yy[1:10, 1:10]))
+
+
+## verify we can remove methods and generic
+
+removeMethods("-")
+removeMethod("length", "track")
+removeMethods("Arith")
+removeMethods("Compare")
+
+## repeat the test one more time on the primitives
+
+length(ISOdate(1990, 12, 1)- ISOdate(1980, 12, 1))
+
+removeMethods("length")
+
+## methods for %*%, which isn't done by the same C code as other ops
+
+setClass("foo", slots = c(m="matrix"))
+m1 <- matrix(1:12,3,4)
+f1 = new("foo", m=m1)
+f2 = new("foo", m=t(m1))
+
+setMethod("%*%", c("foo", "foo"),
+          function(x,y) callGeneric(x at m, y at m))
+
+stopifnot(identical(f1%*%f2, m1%*% t(m1)))
+
+removeMethods("%*%")
+removeMethods("plot")
+
+if(FALSE) ## Hold until removeMethods revised:
+  stopifnot(existsFunction("plot", FALSE) && !isGeneric("plot", 1))
+
+## methods for plotData
+plotData <- function(x, y, ...) plot(x, y, ...)
+
+setGeneric("plotData")
+
+setMethod("plotData", signature(x="track", y="missing"),
+          function(x,  y, ...) plot(slot(x, "x"), slot(x, "y"), ...))
+
+## and now remove the whole generic
+removeGeneric("plotData")
+
+stopifnot(!exists("plotData", 1))
+
+##  Tests of method inheritance & multiple dispatch
+setClass("A0", slots = c(a0 = "numeric"))
+setClass("A1", contains = "A0", slots = c(a1 = "character"))
+
+setClass("B0", slots = c(b0 = "numeric"))
+setClass("B1", "B0") # (meaning 'contains = *')
+setClass("B2", contains = "B1", slots = c(b2 = "logical"))
+
+setClass("AB0", contains = c("A1", "B2"), slots = c(ab0 = "matrix"))
+
+f1 <- function(x,  y)"ANY"
+
+setGeneric("f1")
+
+setMethod("f1", c("A0", "B1"), function(x, y)"A0 B1")
+setMethod("f1", c("B1", "A0"), function(x, y)"B1 A0")
+
+a0 <- new("A0")
+a1 <- new("A1")
+b0 <- new("B0")
+b1 <- new("B1")
+b2 <- new("B2")
+
+deparseText <- function(expr)
+    paste(deparse(expr), collapse = " ")
+
+mustEqual <- function(e1, e2){
+    if(!identical(e1, e2))
+        stop(paste("!identical(", deparseText(substitute(e1)),
+                   ", ", deparseText(substitute(e2)), ")", sep=""))
+}
+
+mustEqual(f1(a0, b0), "ANY")
+mustEqual(f1(a1,b0), "ANY")
+mustEqual(f1(a1,b1), "A0 B1")
+mustEqual(f1(b1,a1), "B1 A0")
+mustEqual(f1(b1,b1), "ANY")
+
+## remove classes:  order matters so as not to undefine earlier classes
+for(.cl in c("AB0", "A1", "A0", "B2", "B1", "B0"))
+    removeClass(.cl)
+
+removeGeneric("f1")
+
+## test of nonstandard generic definition
+
+setGeneric("doubleAnything", function(x) {
+  methodValue <- standardGeneric("doubleAnything")
+  c(methodValue, methodValue)
+})
+
+setMethod("doubleAnything", "ANY", function(x)x)
+
+setMethod("doubleAnything", "character",
+          function(x) paste("<",x,">",sep=""))
+
+mustEqual(doubleAnything(1:10), c(1:10, 1:10))
+mustEqual(doubleAnything("junk"), rep("<junk>",2))
+
+removeGeneric("doubleAnything")
+
+### From setOldClass.Rd
+## Examples of S3 classes with guaranteed attributes
+## an S3 class "stamped" with a vector and  a "date" attribute
+## Here is a generator function and an S3 print method.
+## NOTE:  it's essential that the generator checks the attribute classes
+stamped <- function(x, date = Sys.time()) {
+    if(!inherits(date, "POSIXt"))
+      stop("bad date argument")
+    if(!is.vector(x))
+      stop("x must be a vector")
+    attr(x, "date") <- date
+    class(x) <- "stamped"
+    x
+}
+
+print.stamped <- function(x, ...) {
+    print(as.vector(x))
+    cat("Date: ",  format(attr(x,"date")), "\n")
+}
+
+## Now, an S4 class with the same structure:
+setClass("stamped4", contains = "vector", slots = c(date = "POSIXt"))
+
+## We can use the S4 class to register "stamped", with its attributes:
+setOldClass("stamped", S4Class = "stamped4")
+selectMethod("show", "stamped")
+## and then remove "stamped4" to clean up
+removeClass("stamped4")
+
+set.seed(113)
+someLetters <- stamped(sample(letters, 10),
+                       ISOdatetime(2008, 10, 15, 12, 0, 0))
+
+st <- new("stamped", someLetters)
+st
+# show() method prints the object's class, then calls the S3 print method.
+
+stopifnot(identical(S3Part(st, TRUE), someLetters))
+
+# creating the S4 object directly from its data part and slots
+new("stamped", 1:10, date = ISOdatetime(1976, 5, 5, 15, 10, 0))
+
+
+  removeClass("stamped")
+  rm(someLetters, st)
+
+### from S3Part.Rd
+
+## extending S3 class "lm", "xlm" directly
+## and "ylm" indirectly
+xlm <- setClass("xlm", slots = c(eps = "numeric"), contains = "lm")
+ylm <- setClass("ylm", slots = c(header = "character"), contains = "xlm")
+
+ctl <- c(4.17,5.58,5.18,6.11,4.50,4.61,5.17,4.53,5.33,5.14)
+trt <- c(4.81,4.17,4.41,3.59,5.87,3.83,6.03,4.89,4.32,4.69)
+group <- gl(2,10,20, labels=c("Ctl","Trt"))
+weight <- c(ctl, trt)
+lm.D9 <- lm(weight ~ group)
+
+## lm.D9 is as computed in the example for stats::lm
+y1 <-ylm(lm.D9, header = "test", eps = .1)
+xx <- xlm(lm.D9, eps =.1)
+y2 <- ylm(xx, header = "test")
+stopifnot(inherits(y2, "lm"))
+stopifnot(identical(y1, y2))
+stopifnot(identical(S3Part(y1, strict = TRUE), lm.D9))
+
+## note the these classes can insert an S3 subclass of "lm" as the S3 part:
+myData <- data.frame(time = 1:10, y = (1:10)^.5)
+myLm <- lm(cbind(y, y^3)  ~ time, myData) # S3 class: c("mlm", "lm")
+ym1 <- new("ylm", myLm, header = "Example", eps = 0.)
+
+##similar classes to "xlm" and "ylm", but extending S3 class c("mlm", "lm")
+setClass("xmm", slots = c(eps = "numeric"), contains = "mlm")
+setClass("ymm", slots = c(header="character"), contains = "xmm")
+
+ym2 <- new("ymm", myLm, header = "Example2", eps = .001)
+
+# but for class "ymm", an S3 part of class "lm" is an error:
+try(new("ymm", lm.D9, header = "Example2", eps = .001))
+tools::assertError(
+    new("ymm", lm.D9, header = "Example2", eps = .001))
+
+setClass("dataFrameD", slots = c(date = "Date"),
+         contains = "data.frame")
+myDD <- new("dataFrameD", myData, date = Sys.Date())
+
+## S3Part() applied to classes with a data part (.Data slot)
+
+setClass("NumX", contains="numeric", slots = c(id="character"))
+nn <- new("NumX", 1:10, id="test")
+stopifnot(identical(1:10, S3Part(nn, strict = TRUE)))
+
+m1 <- cbind(group, weight)
+setClass("MatX", contains = "matrix", slots = c(date = "Date"))
+mx1 <- new("MatX", m1, date = Sys.Date())
+stopifnot(identical(m1, S3Part(mx1, strict = TRUE)))
diff --git a/tests/reg-S4.R b/tests/reg-S4.R
index 3bf6479..3b37e53 100644
--- a/tests/reg-S4.R
+++ b/tests/reg-S4.R
@@ -4,6 +4,18 @@ require(methods)
 assertError <- tools::assertError # "import"
 ##too fragile: showMethods(where = "package:methods")
 
+## When this test comes too late, it fails too early in R <= 3.2.2
+require(stats4)
+detach("package:methods")
+require("methods")
+cc <- methods::getClassDef("standardGeneric")
+cc ## (auto) print failed here, in R <= 3.2.2
+stopifnot(.isMethodsDispatchOn()) ## was FALSE in R <= 3.2.2
+
+
+## Needs cached primitive generic for '$'
+new("envRefClass")# failed in R <= 3.2.0
+
 ##-- S4 classes with S3 slots [moved from ./reg-tests-1.R]
 setClass("test1", representation(date="POSIXct"))
 x <- new("test1", date=as.POSIXct("2003-10-09"))
@@ -188,11 +200,10 @@ assertError(TRUE & b)
 
 
 ## methods' hidden cbind() / rbind:
-cBind <- methods:::cbind
 setClass("myMat", representation(x = "numeric"))
 setMethod("cbind2", signature(x = "myMat", y = "missing"), function(x,y) x)
 m <- new("myMat", x = c(1, pi))
-stopifnot(identical(m, cBind(m)))
+stopifnot(identical(m, methods:::cbind(m)), identical(m, cbind(m)))
 
 
 ## explicit print or show on a basic class with an S4 bit
@@ -316,10 +327,7 @@ selectMethod("!", "foo")
 xx <- new("foo", FALSE)
 !xx
 
-## This failed for about one day -- as.vector(x, mode) :
-setMethod("as.vector", signature(x = "foo", mode = "missing"),
-          function(x) unclass(x))
-## whereas this fails in R versions earlier than 2.6.0:
+## This fails in R versions earlier than 2.6.0:
 setMethod("as.vector", "foo", function(x) unclass(x))
 stopifnot(removeClass("foo"))
 
@@ -391,12 +399,31 @@ stopifnot(unlist(lapply(ggm, function(g) !is.null(getGeneric(g, where = em)))),
 	  ## all above worked in 2.7.0, however:
 	  isGeneric("show",  where=e4),
 	  hasMethods("show", where=e4), hasMethods("show", where=em),
-	  ## isGeneric("dim", where=as.environment("package:Matrix"))
 	  identical(as.character(gg4), #gg4 has packages attr.; tools::: doesn't
 		    tools:::get_S4_generics_with_methods(e4))
 	  )
 ## the last failed in R 2.7.0 : was not showing  "show"
-## TODO: use "Matrix" checks once that is >= 1.0
+
+if(require("Matrix")) {
+    D5. <- Diagonal(x = 5:1)
+    D5N <- D5.; D5N[5,5] <- NA
+    stopifnot(isGeneric("dim", where=as.environment("package:Matrix")),
+	      identical(D5., pmin(D5.)),
+	      identical(D5., pmax(D5.)),
+	      identical(D5., pmax(D5., -1)),
+	      identical(D5., pmin(D5., 7)),
+	      inherits((D5.3 <- pmin(D5.+2, 3)), "Matrix"),
+	      identical(as.matrix(pmin(D5.+2 , 3)),
+			pmin(as.matrix(D5.+2), 3)),
+	      identical(pmin(1, D5.), pmin(1, as.matrix(D5.))),
+	      identical(D5N, pmax(D5N, -1)),
+	      identical(D5N, pmin(D5N, 5)),
+	      identical(unname(as.matrix(pmin(D5N+1, 3))),
+			       pmin(as.matrix(D5N)+1, 3)),
+	      ##
+	      TRUE)
+}
+
 
 ## containing "array" ("matrix", "ts", ..)
 t. <- ts(1:10, frequency = 4, start = c(1959, 2))
@@ -503,7 +530,7 @@ x <- new("numWithId", 1:3, id = "An Example")
 xtfrm(x) # works as the base representation is numeric
 setMethod('xtfrm', 'numWithId', function(x) x at .Data)
 xtfrm(x)
-stopifnot(identical(xtfrm(x), 1:3))
+stopifnot(identical(xtfrm(x), 1:3))# "integer" is "numeric"
 ## new in 2.11.0
 
 ## [-dispatch using callNextMethod()
@@ -596,6 +623,7 @@ a <- new("A", aa=aa)
 setMethod(length, "A", function(x) length(x at aa))
 setMethod(`[[`,   "A", function(x, i, j, ...) x at aa[[i]])
 setMethod(`[`,    "A", function(x, i, j, ...) new("A", aa = x at aa[i]))
+setMethod("is.na","A", function(x) is.na(x at aa))
 stopifnot(length(a) == 6, identical(a[[5]], aa[[5]]),
           identical(a, rev(rev(a))), # using '['
 	  identical(mapply(`*`, aa, rep(1:3, 2)),
@@ -603,12 +631,7 @@ stopifnot(length(a) == 6, identical(a[[5]], aa[[5]]),
 ## Up to R 2.15.2, internally 'a' is treated as if it was of length 1
 ## because internal dispatch did not work for length().
 
-## is.unsorted() for formal classes - and R > 3.0.0 :
-## Fails, unfortunately (from C, base::.gtn() is called w/o dispatch)
-## setMethod("anyNA", "A", function(x) anyNA(x at aa))
-## setMethod(".gtn", "A", function(x,strictly) .gtn(x at aa, strictly))
-## but this now works (thanks to DispatchOrEval() ):
-setMethod("is.unsorted", "A", function(x, na.rm=FALSE, strictly=FALSE)
+setMethod("is.unsorted", "A", function(x, na.rm, strictly)
     is.unsorted(x at aa, na.rm=na.rm, strictly=strictly))
 
 stopifnot(!is.unsorted(a), # 11:16 *is* sorted
@@ -668,3 +691,217 @@ setOldClass(c("foo", "numeric"))
 n <- structure(1, class=c("foo", "numeric"))
 try(?f(n))
 ## different failures in R < 3.1.0.
+
+
+## identical() did not look at S4 bit:
+a <- 1:5
+b <- setClass("B", "integer")(a)
+stopifnot(is.character(all.equal(a, b)))
+attributes(a) <- attributes(b)
+if(!isS4(a)) { # still (unfortunately)
+    message("'a' is not S4 yet")
+    if(identical(a,b)) stop("identical() not looking at S4 bit")
+    ## set S4 bit manually:
+    a <- asS4(a)
+}
+stopifnot(identical(a, b), isS4(a))
+## failed in R <= 3.1.1
+
+
+### cbind(), rbind() now work both via rbind2(), cbind2() and rbind.
+##__ 1) __
+setClass("A", representation(a = "matrix"))
+setMethod("initialize", signature(.Object = "A"),
+    function(.Object, y) {
+      .Object at a <- y
+      .Object
+    })
+setMethod("rbind2", signature(x = "A", y = "matrix"),
+    function(x, y, ...) {
+      cat("rbind2(<A>, <matrix>) : ")
+      x at a <- rbind(x at a, y)
+      cat(" x at a done\n")
+      x
+    })
+setMethod("dim", "A", function(x) dim(x at a))
+mat1 <- matrix(1:9, nrow = 3)
+obj1 <- new("A", 10*mat1)
+om1 <- rbind(obj1, mat1)## now does work {it does need a working "dim" method!}
+stopifnot(identical(om1, rbind2(obj1, mat1)))
+rm(obj1,om1); removeClass("A")
+##
+##
+###__ 2) --- Matrix --- via cbind2(), rbind2()
+## this has its output checked strictly, so test depending on Matrix
+## has been moved to reg-tests-3.R
+##
+###__ 3) --- package 'its' like
+setClass("its",representation("matrix", dates="POSIXt"))
+m <- outer(1:3, setNames(1:5,LETTERS[1:5]))
+im <- new("its", m, dates=as.POSIXct(Sys.Date()))
+stopifnot(identical(m, im at .Data))
+ii  <- rbind(im, im-1)
+i.i <- cbind(im, im-7)
+stopifnot(identical(m, rbind(im)),
+          identical(m, cbind(im)),
+          identical(ii , rbind(m, m-1)),
+          identical(i.i, cbind(m, m-7)))
+rm(im, ii, i.i)
+removeClass("its")
+##
+##
+###__ 4) --- pkg 'mondate' like --
+setClass("mondate",
+         slots = c(timeunits = "character"), contains = "numeric")
+three <- 3
+m1 <- new("mondate", 1:4, timeunits = "hrs")
+m2 <- new("mondate", 7:8, timeunits = "min")
+stopifnot(identical(colnames(cbind(m1+1, deparse.level=2)), "m1 + 1"),
+          is.null  (colnames(cbind(m1+1, deparse.level=0))),
+          is.null  (colnames(cbind(m1+1, deparse.level=1))),
+          identical(colnames(cbind(m1)), "m1"),
+          colnames(cbind(m1  , M2 = 2, deparse.level=0)) == c(""  , "M2"),
+          colnames(cbind(m1  , M2 = 2))                  == c("m1", "M2"),
+          colnames(cbind(m1  , M2 = 2, deparse.level=2)) == c("m1", "M2"),
+          colnames(cbind(m1+1, M2 = 2, deparse.level=2)) == c("m1 + 1", "M2"),
+          colnames(cbind(m1+1, M2 = 2, deparse.level=1)) == c("",       "M2"))
+cbind(m1, three, m2)
+cbind(m1, three, m2,   deparse.level = 0) # none
+cbind(m1, three, m2+3, deparse.level = 1) # "m1" "three"
+cbind(m1, three, m2+3, deparse.level = 2) -> m3
+m3 #    ....  and "m2 + 3"
+stopifnot(identical(t(m3), rbind(m1, three, m2+3, deparse.level = 2)),
+          identical(cbind(m1, m2) -> m12,
+                    cbind(m1=m1 at .Data, m2=m2 at .Data)),
+          identical(rbind(m1, m2), t(m12)),
+          identical(cbind(m1, m2, T=T, deparse.level=0),
+                    cbind(m1 at .Data, m2 at .Data, T=T) -> mm),
+          identical(colnames(mm), c("", "", "T")),
+          identical(cbind(m1, m2, deparse.level=0),
+                    cbind(m1 at .Data, m2 at .Data)))
+##
+## Cleanup all class definitions etc -- seems necessary for the following "re"-definitions:
+invisible(lapply(getClasses(globalenv()), removeClass))
+nn <- names(globalenv())
+rm(list = c("nn", nn))
+
+## Using "data.frame" in a slot -- all have worked for long:
+setClass("A", representation(slot1="numeric", slot2="logical"))
+setClass("D1", contains="A", representation(design="data.frame"))
+setClass("D2", contains="D1")
+validObject(a <- new("A", slot1=77, slot2=TRUE))
+validObject(D. <- new("D2", a, design = data.frame(x = 1)))
+## using "formula" in a slot -- from Hervé Pages :
+setClass("B", contains="A", representation(design="formula"))
+setClass("C", contains="B")
+##
+a <- new("A", slot1=77, slot2=TRUE)
+validObject(C1 <- new("C", a, design = x ~ y))# failed for R <= 3.2.0
+C2 <- new("C", slot1=a at slot1, slot2=a at slot2, design=x ~ y)
+stopifnot(identical(C1, C2),
+	  identical(formula(), formula(NULL)),
+	  length(N <- new("formula")) == 0, inherits(N, "formula"),
+	  length(N <- new("table")  ) == 0, is.table(N),
+	  validObject(N <- new("summary.table")),
+	  length(N <- new("ordered")) == 0, is.ordered(N))
+## formula() and new("formula"), new("..") also failed  in R <= 3.2.0
+
+require("stats4")# -> "mle" class
+validObject(sig <- new("signature", obj = "mle"))
+stopifnot(c("package", "names") %in% slotNames(sig))
+str(sig) # failed, too
+
+cl4 <- getClasses("package:stats4")
+stopifnot(identical(getClasses(which(search() == "package:stats4")), cl4),
+	  c("mle", "profile.mle", "summary.mle") %in% cl4)
+## failed after an optimization patch
+
+detach("package:methods", force=TRUE)
+C1 at slot1 <- pi
+stopifnot(identical(C1 at slot1, pi))
+stopifnot(require("methods"))
+## Slot assignment failed in R <= 3.2.2, C code calling checkAtAssignment()
+
+## Error in argument evaluation of S4 generic - PR#16111
+f <- function() {
+    signal <- FALSE
+    withCallingHandlers({ g(sqrt(-1)) }, warning = function(w) {
+        signal <<- TRUE
+        invokeRestart("muffleWarning")
+    })
+    signal
+}
+g <- function(x) x
+op <- options(warn = 2)# warnings give errors
+stopifnot(isTRUE( f() ))
+setGeneric("g")
+stopifnot(isTRUE( f() ))
+options(op)
+## the second  f()  gave a warning and FALSE in  R versions  2.12.0 <= . <= 3.2.3
+
+
+stopifnot(
+    identical(formals(getGeneric("as.vector")), formals(base::as.vector)),
+    identical(formals(getGeneric("unlist")),    formals(base::unlist)))
+## failed for a while in R-devel (3.3.0)
+
+setClass("myInteger", contains=c("integer", "VIRTUAL"))
+setClass("mySubInteger", contains="myInteger")
+new("mySubInteger", 1L)
+## caused infinite recursion in R 3.3.0
+
+detach("package:methods", force=TRUE)
+methods::setClass("test1", methods::representation(date="POSIXct"))
+methods::setClass("test2", contains="test1")
+test <- function(x) UseMethod('test', x)
+test.test1 <- function(x) 'Hi'
+test(methods::new("test2", date=as.POSIXct("2003-10-09")))
+stopifnot(require("methods"))
+## S3 dispatch to superclass methods failed on S4 objects when
+## methods package was not attached
+
+
+## Tests for class fetching and conflict resolution
+setClass("htest1", slots=c(a="numeric",b="data.frame"), package="package1")
+setClass("htest2", slots=c(a="logical"), package="package2")
+class.list = list(
+    package1=getClassDef("htest1", where=class_env1),
+    package2=getClassDef("htest2", where=class_env2)
+)
+
+firstclass  <- methods:::.resolveClassList(class.list,.GlobalEnv,
+                                           package="package1")
+secondclass <- methods:::.resolveClassList(class.list,.GlobalEnv,
+                                           package="package2")
+alsofirstclass <- methods:::.resolveClassList(class.list,.GlobalEnv,
+                                              package="package3")
+stopifnot(!identical(firstclass, secondclass))
+stopifnot(identical(firstclass, class.list[[1]]))
+stopifnot(identical(secondclass, class.list[[2]]))
+stopifnot(identical(alsofirstclass, class.list[[1]]))
+
+## implicit coercion of S4 object to vector via as.vector() in sub-assignment
+setClass("A", representation(stuff="numeric"))
+as.vector.A <- function (x, mode="any") x at stuff
+v <- c(3.5, 0.1)
+a <- new("A", stuff=v)
+x <- y <- numeric(10)
+x[3:4] <- a
+y[3:4] <- v
+stopifnot(identical(x, y))
+
+## callNextMethod() was broken when augmenting args of primitive generics
+foo <- setClass("foo")
+bar <- setClass("bar", contains = "foo")
+
+setMethod("[", "foo",  function(x, i, j, ..., flag = FALSE, drop = FALSE) {
+    flag
+})
+
+setMethod("[", "bar", function(x, i, j, ..., flag = FALSE, drop = FALSE) {
+    callNextMethod()
+})
+
+BAR <- new("bar")
+stopifnot(identical(BAR[1L], FALSE))
+stopifnot(identical(BAR[1L, , flag=TRUE], TRUE))
diff --git a/tests/reg-S4.Rout.save b/tests/reg-S4.Rout.save
index 33df4b6..7b3cd12 100644
--- a/tests/reg-S4.Rout.save
+++ b/tests/reg-S4.Rout.save
@@ -1,7 +1,7 @@
 
-R version 3.1.2 RC (2014-10-29 r66897) -- "Pumpkin Helmet"
-Copyright (C) 2014 The R Foundation for Statistical Computing
-Platform: x86_64-unknown-linux-gnu (64-bit)
+R version 3.4.0 RC (2017-04-18 r72543) -- "You Stupid Darkness"
+Copyright (C) 2017 The R Foundation for Statistical Computing
+Platform: x86_64-pc-linux-gnu (64-bit)
 
 R is free software and comes with ABSOLUTELY NO WARRANTY.
 You are welcome to redistribute it under certain conditions.
@@ -21,6 +21,39 @@ Type 'q()' to quit R.
 > assertError <- tools::assertError # "import"
 > ##too fragile: showMethods(where = "package:methods")
 > 
+> ## When this test comes too late, it fails too early in R <= 3.2.2
+> require(stats4)
+Loading required package: stats4
+> detach("package:methods")
+> require("methods")
+Loading required package: methods
+> cc <- methods::getClassDef("standardGeneric")
+> cc ## (auto) print failed here, in R <= 3.2.2
+Class "standardGeneric" [package "methods"]
+
+Slots:
+                                                                  
+Name:           .Data        generic        package          group
+Class:       function      character      character           list
+                                                                  
+Name:      valueClass      signature        default       skeleton
+Class:      character      character optionalMethod           call
+
+Extends: 
+Class "genericFunction", directly
+Class "function", by class "genericFunction", distance 2
+Class "OptionalFunction", by class "function", distance 3
+Class "PossibleMethod", by class "function", distance 3
+Class "optionalMethod", by class "genericFunction", distance 4
+
+Known Subclasses: "standardGenericWithTrace"
+> stopifnot(.isMethodsDispatchOn()) ## was FALSE in R <= 3.2.2
+> 
+> 
+> ## Needs cached primitive generic for '$'
+> new("envRefClass")# failed in R <= 3.2.0
+Reference class object of class "envRefClass"
+> 
 > ##-- S4 classes with S3 slots [moved from ./reg-tests-1.R]
 > setClass("test1", representation(date="POSIXct"))
 > x <- new("test1", date=as.POSIXct("2003-10-09"))
@@ -122,7 +155,6 @@ show method
 > ## show(foo)
 > 
 > setMethod("print", "bar", function(x, ...){cat("S4 print method\n")})
-Creating a generic function for 'print' from package 'base' in the global environment
 [1] "print"
 > foo
 show method
@@ -279,12 +311,11 @@ Note: method with signature 'brob#ANY' chosen for function '&',
 > 
 > 
 > ## methods' hidden cbind() / rbind:
-> cBind <- methods:::cbind
 > setClass("myMat", representation(x = "numeric"))
 > setMethod("cbind2", signature(x = "myMat", y = "missing"), function(x,y) x)
 [1] "cbind2"
 > m <- new("myMat", x = c(1, pi))
-> stopifnot(identical(m, cBind(m)))
+> stopifnot(identical(m, methods:::cbind(m)), identical(m, cbind(m)))
 > 
 > 
 > ## explicit print or show on a basic class with an S4 bit
@@ -524,12 +555,7 @@ defined "foo"
 An object of class "foo"
 [1] NA
 > 
-> ## This failed for about one day -- as.vector(x, mode) :
-> setMethod("as.vector", signature(x = "foo", mode = "missing"),
-+           function(x) unclass(x))
-Creating a generic function for 'as.vector' from package 'base' in the global environment
-[1] "as.vector"
-> ## whereas this fails in R versions earlier than 2.6.0:
+> ## This fails in R versions earlier than 2.6.0:
 > setMethod("as.vector", "foo", function(x) unclass(x))
 [1] "as.vector"
 > stopifnot(removeClass("foo"))
@@ -614,12 +640,36 @@ Creating a generic function for 'as.vector' from package 'base' in the global en
 + 	  ## all above worked in 2.7.0, however:
 + 	  isGeneric("show",  where=e4),
 + 	  hasMethods("show", where=e4), hasMethods("show", where=em),
-+ 	  ## isGeneric("dim", where=as.environment("package:Matrix"))
 + 	  identical(as.character(gg4), #gg4 has packages attr.; tools::: doesn't
 + 		    tools:::get_S4_generics_with_methods(e4))
 + 	  )
 > ## the last failed in R 2.7.0 : was not showing  "show"
-> ## TODO: use "Matrix" checks once that is >= 1.0
+> 
+> if(require("Matrix")) {
++     D5. <- Diagonal(x = 5:1)
++     D5N <- D5.; D5N[5,5] <- NA
++     stopifnot(isGeneric("dim", where=as.environment("package:Matrix")),
++ 	      identical(D5., pmin(D5.)),
++ 	      identical(D5., pmax(D5.)),
++ 	      identical(D5., pmax(D5., -1)),
++ 	      identical(D5., pmin(D5., 7)),
++ 	      inherits((D5.3 <- pmin(D5.+2, 3)), "Matrix"),
++ 	      identical(as.matrix(pmin(D5.+2 , 3)),
++ 			pmin(as.matrix(D5.+2), 3)),
++ 	      identical(pmin(1, D5.), pmin(1, as.matrix(D5.))),
++ 	      identical(D5N, pmax(D5N, -1)),
++ 	      identical(D5N, pmin(D5N, 5)),
++ 	      identical(unname(as.matrix(pmin(D5N+1, 3))),
++ 			       pmin(as.matrix(D5N)+1, 3)),
++ 	      ##
++ 	      TRUE)
++ }
+Loading required package: Matrix
+Note: method with signature 'numeric#dMatrix' chosen for function '>',
+ target signature 'numeric#ddiMatrix'.
+ "ANY#ddiMatrix" would also be valid
+<sparse>[ <logic> ] : .M.sub.i.logical() maybe inefficient
+> 
 > 
 > ## containing "array" ("matrix", "ts", ..)
 > t. <- ts(1:10, frequency = 4, start = c(1959, 2))
@@ -744,7 +794,7 @@ attr(,"id")
 [1] "xtfrm"
 > xtfrm(x)
 [1] 1 2 3
-> stopifnot(identical(xtfrm(x), 1:3))
+> stopifnot(identical(xtfrm(x), 1:3))# "integer" is "numeric"
 > ## new in 2.11.0
 > 
 > ## [-dispatch using callNextMethod()
@@ -859,6 +909,8 @@ Creating a new generic function for 'qqplot' in the global environment
 [1] "[["
 > setMethod(`[`,    "A", function(x, i, j, ...) new("A", aa = x at aa[i]))
 [1] "["
+> setMethod("is.na","A", function(x) is.na(x at aa))
+[1] "is.na"
 > stopifnot(length(a) == 6, identical(a[[5]], aa[[5]]),
 +           identical(a, rev(rev(a))), # using '['
 + 	  identical(mapply(`*`, aa, rep(1:3, 2)),
@@ -866,12 +918,7 @@ Creating a new generic function for 'qqplot' in the global environment
 > ## Up to R 2.15.2, internally 'a' is treated as if it was of length 1
 > ## because internal dispatch did not work for length().
 > 
-> ## is.unsorted() for formal classes - and R > 3.0.0 :
-> ## Fails, unfortunately (from C, base::.gtn() is called w/o dispatch)
-> ## setMethod("anyNA", "A", function(x) anyNA(x at aa))
-> ## setMethod(".gtn", "A", function(x,strictly) .gtn(x at aa, strictly))
-> ## but this now works (thanks to DispatchOrEval() ):
-> setMethod("is.unsorted", "A", function(x, na.rm=FALSE, strictly=FALSE)
+> setMethod("is.unsorted", "A", function(x, na.rm, strictly)
 +     is.unsorted(x at aa, na.rm=na.rm, strictly=strictly))
 Creating a generic function for 'is.unsorted' from package 'base' in the global environment
 [1] "is.unsorted"
@@ -962,3 +1009,265 @@ Error in .helpForCall(topicExpr, parent.frame()) :
   no documentation for function 'f' and signature 'x = "numeric"'
 > ## different failures in R < 3.1.0.
 > 
+> 
+> ## identical() did not look at S4 bit:
+> a <- 1:5
+> b <- setClass("B", "integer")(a)
+> stopifnot(is.character(all.equal(a, b)))
+> attributes(a) <- attributes(b)
+> if(!isS4(a)) { # still (unfortunately)
++     message("'a' is not S4 yet")
++     if(identical(a,b)) stop("identical() not looking at S4 bit")
++     ## set S4 bit manually:
++     a <- asS4(a)
++ }
+'a' is not S4 yet
+> stopifnot(identical(a, b), isS4(a))
+> ## failed in R <= 3.1.1
+> 
+> 
+> ### cbind(), rbind() now work both via rbind2(), cbind2() and rbind.
+> ##__ 1) __
+> setClass("A", representation(a = "matrix"))
+> setMethod("initialize", signature(.Object = "A"),
++     function(.Object, y) {
++       .Object at a <- y
++       .Object
++     })
+[1] "initialize"
+> setMethod("rbind2", signature(x = "A", y = "matrix"),
++     function(x, y, ...) {
++       cat("rbind2(<A>, <matrix>) : ")
++       x at a <- rbind(x at a, y)
++       cat(" x at a done\n")
++       x
++     })
+[1] "rbind2"
+> setMethod("dim", "A", function(x) dim(x at a))
+[1] "dim"
+> mat1 <- matrix(1:9, nrow = 3)
+> obj1 <- new("A", 10*mat1)
+> om1 <- rbind(obj1, mat1)## now does work {it does need a working "dim" method!}
+rbind2(<A>, <matrix>) :  x at a done
+> stopifnot(identical(om1, rbind2(obj1, mat1)))
+rbind2(<A>, <matrix>) :  x at a done
+> rm(obj1,om1); removeClass("A")
+[1] TRUE
+> ##
+> ##
+> ###__ 2) --- Matrix --- via cbind2(), rbind2()
+> ## this has its output checked strictly, so test depending on Matrix
+> ## has been moved to reg-tests-3.R
+> ##
+> ###__ 3) --- package 'its' like
+> setClass("its",representation("matrix", dates="POSIXt"))
+> m <- outer(1:3, setNames(1:5,LETTERS[1:5]))
+> im <- new("its", m, dates=as.POSIXct(Sys.Date()))
+> stopifnot(identical(m, im at .Data))
+> ii  <- rbind(im, im-1)
+> i.i <- cbind(im, im-7)
+> stopifnot(identical(m, rbind(im)),
++           identical(m, cbind(im)),
++           identical(ii , rbind(m, m-1)),
++           identical(i.i, cbind(m, m-7)))
+> rm(im, ii, i.i)
+> removeClass("its")
+[1] TRUE
+> ##
+> ##
+> ###__ 4) --- pkg 'mondate' like --
+> setClass("mondate",
++          slots = c(timeunits = "character"), contains = "numeric")
+> three <- 3
+> m1 <- new("mondate", 1:4, timeunits = "hrs")
+> m2 <- new("mondate", 7:8, timeunits = "min")
+> stopifnot(identical(colnames(cbind(m1+1, deparse.level=2)), "m1 + 1"),
++           is.null  (colnames(cbind(m1+1, deparse.level=0))),
++           is.null  (colnames(cbind(m1+1, deparse.level=1))),
++           identical(colnames(cbind(m1)), "m1"),
++           colnames(cbind(m1  , M2 = 2, deparse.level=0)) == c(""  , "M2"),
++           colnames(cbind(m1  , M2 = 2))                  == c("m1", "M2"),
++           colnames(cbind(m1  , M2 = 2, deparse.level=2)) == c("m1", "M2"),
++           colnames(cbind(m1+1, M2 = 2, deparse.level=2)) == c("m1 + 1", "M2"),
++           colnames(cbind(m1+1, M2 = 2, deparse.level=1)) == c("",       "M2"))
+> cbind(m1, three, m2)
+     m1 three m2
+[1,]  1     3  7
+[2,]  2     3  8
+[3,]  3     3  7
+[4,]  4     3  8
+> cbind(m1, three, m2,   deparse.level = 0) # none
+     [,1] [,2] [,3]
+[1,]    1    3    7
+[2,]    2    3    8
+[3,]    3    3    7
+[4,]    4    3    8
+> cbind(m1, three, m2+3, deparse.level = 1) # "m1" "three"
+     m1 three   
+[1,]  1     3 10
+[2,]  2     3 11
+[3,]  3     3 10
+[4,]  4     3 11
+> cbind(m1, three, m2+3, deparse.level = 2) -> m3
+> m3 #    ....  and "m2 + 3"
+     m1 three m2 + 3
+[1,]  1     3     10
+[2,]  2     3     11
+[3,]  3     3     10
+[4,]  4     3     11
+> stopifnot(identical(t(m3), rbind(m1, three, m2+3, deparse.level = 2)),
++           identical(cbind(m1, m2) -> m12,
++                     cbind(m1=m1 at .Data, m2=m2 at .Data)),
++           identical(rbind(m1, m2), t(m12)),
++           identical(cbind(m1, m2, T=T, deparse.level=0),
++                     cbind(m1 at .Data, m2 at .Data, T=T) -> mm),
++           identical(colnames(mm), c("", "", "T")),
++           identical(cbind(m1, m2, deparse.level=0),
++                     cbind(m1 at .Data, m2 at .Data)))
+> ##
+> ## Cleanup all class definitions etc -- seems necessary for the following "re"-definitions:
+> invisible(lapply(getClasses(globalenv()), removeClass))
+> nn <- names(globalenv())
+> rm(list = c("nn", nn))
+> 
+> ## Using "data.frame" in a slot -- all have worked for long:
+> setClass("A", representation(slot1="numeric", slot2="logical"))
+> setClass("D1", contains="A", representation(design="data.frame"))
+> setClass("D2", contains="D1")
+> validObject(a <- new("A", slot1=77, slot2=TRUE))
+[1] TRUE
+> validObject(D. <- new("D2", a, design = data.frame(x = 1)))
+[1] TRUE
+> ## using "formula" in a slot -- from Hervé Pages :
+> setClass("B", contains="A", representation(design="formula"))
+> setClass("C", contains="B")
+> ##
+> a <- new("A", slot1=77, slot2=TRUE)
+> validObject(C1 <- new("C", a, design = x ~ y))# failed for R <= 3.2.0
+[1] TRUE
+> C2 <- new("C", slot1=a at slot1, slot2=a at slot2, design=x ~ y)
+> stopifnot(identical(C1, C2),
++ 	  identical(formula(), formula(NULL)),
++ 	  length(N <- new("formula")) == 0, inherits(N, "formula"),
++ 	  length(N <- new("table")  ) == 0, is.table(N),
++ 	  validObject(N <- new("summary.table")),
++ 	  length(N <- new("ordered")) == 0, is.ordered(N))
+> ## formula() and new("formula"), new("..") also failed  in R <= 3.2.0
+> 
+> require("stats4")# -> "mle" class
+> validObject(sig <- new("signature", obj = "mle"))
+[1] TRUE
+> stopifnot(c("package", "names") %in% slotNames(sig))
+> str(sig) # failed, too
+Formal class 'signature' [package "methods"] with 3 slots
+  ..@ .Data  : chr "mle"
+  ..@ names  : chr "obj"
+  ..@ package: chr ""
+> 
+> cl4 <- getClasses("package:stats4")
+> stopifnot(identical(getClasses(which(search() == "package:stats4")), cl4),
++ 	  c("mle", "profile.mle", "summary.mle") %in% cl4)
+> ## failed after an optimization patch
+> 
+> detach("package:methods", force=TRUE)
+> C1 at slot1 <- pi
+> stopifnot(identical(C1 at slot1, pi))
+> stopifnot(require("methods"))
+Loading required package: methods
+> ## Slot assignment failed in R <= 3.2.2, C code calling checkAtAssignment()
+> 
+> ## Error in argument evaluation of S4 generic - PR#16111
+> f <- function() {
++     signal <- FALSE
++     withCallingHandlers({ g(sqrt(-1)) }, warning = function(w) {
++         signal <<- TRUE
++         invokeRestart("muffleWarning")
++     })
++     signal
++ }
+> g <- function(x) x
+> op <- options(warn = 2)# warnings give errors
+> stopifnot(isTRUE( f() ))
+> setGeneric("g")
+[1] "g"
+> stopifnot(isTRUE( f() ))
+> options(op)
+> ## the second  f()  gave a warning and FALSE in  R versions  2.12.0 <= . <= 3.2.3
+> 
+> 
+> stopifnot(
++     identical(formals(getGeneric("as.vector")), formals(base::as.vector)),
++     identical(formals(getGeneric("unlist")),    formals(base::unlist)))
+> ## failed for a while in R-devel (3.3.0)
+> 
+> setClass("myInteger", contains=c("integer", "VIRTUAL"))
+> setClass("mySubInteger", contains="myInteger")
+> new("mySubInteger", 1L)
+An object of class "mySubInteger"
+[1] 1
+attr(,"class")
+[1] "myInteger"
+> ## caused infinite recursion in R 3.3.0
+> 
+> detach("package:methods", force=TRUE)
+> methods::setClass("test1", methods::representation(date="POSIXct"))
+> methods::setClass("test2", contains="test1")
+> test <- function(x) UseMethod('test', x)
+> test.test1 <- function(x) 'Hi'
+> test(methods::new("test2", date=as.POSIXct("2003-10-09")))
+[1] "Hi"
+> stopifnot(require("methods"))
+Loading required package: methods
+> ## S3 dispatch to superclass methods failed on S4 objects when
+> ## methods package was not attached
+> 
+> 
+> ## Tests for class fetching and conflict resolution
+> setClass("htest1", slots=c(a="numeric",b="data.frame"), package="package1")
+> setClass("htest2", slots=c(a="logical"), package="package2")
+> class.list = list(
++     package1=getClassDef("htest1", where=class_env1),
++     package2=getClassDef("htest2", where=class_env2)
++ )
+> 
+> firstclass  <- methods:::.resolveClassList(class.list,.GlobalEnv,
++                                            package="package1")
+> secondclass <- methods:::.resolveClassList(class.list,.GlobalEnv,
++                                            package="package2")
+> alsofirstclass <- methods:::.resolveClassList(class.list,.GlobalEnv,
++                                               package="package3")
+Found more than one class "htest1" in cache; using the first, from namespace 'package1'
+Also defined by 'package2'
+> stopifnot(!identical(firstclass, secondclass))
+> stopifnot(identical(firstclass, class.list[[1]]))
+> stopifnot(identical(secondclass, class.list[[2]]))
+> stopifnot(identical(alsofirstclass, class.list[[1]]))
+> 
+> ## implicit coercion of S4 object to vector via as.vector() in sub-assignment
+> setClass("A", representation(stuff="numeric"))
+> as.vector.A <- function (x, mode="any") x at stuff
+> v <- c(3.5, 0.1)
+> a <- new("A", stuff=v)
+> x <- y <- numeric(10)
+> x[3:4] <- a
+> y[3:4] <- v
+> stopifnot(identical(x, y))
+> 
+> ## callNextMethod() was broken when augmenting args of primitive generics
+> foo <- setClass("foo")
+> bar <- setClass("bar", contains = "foo")
+> 
+> setMethod("[", "foo",  function(x, i, j, ..., flag = FALSE, drop = FALSE) {
++     flag
++ })
+[1] "["
+> 
+> setMethod("[", "bar", function(x, i, j, ..., flag = FALSE, drop = FALSE) {
++     callNextMethod()
++ })
+[1] "["
+> 
+> BAR <- new("bar")
+> stopifnot(identical(BAR[1L], FALSE))
+> stopifnot(identical(BAR[1L, , flag=TRUE], TRUE))
+> 
diff --git a/tests/reg-examples1.R b/tests/reg-examples1.R
index ec1efed..b135b9a 100644
--- a/tests/reg-examples1.R
+++ b/tests/reg-examples1.R
@@ -7,29 +7,29 @@ pdf("reg-examples-1.pdf", encoding = "ISOLatin1.enc")
 
 
 ## base
-example(Cstack_info)
-example(DateTimeClasses)
-example(Dates)
-example(Ops.Date)
-example(Random)
-example(Sys.getpid)
-example(Sys.sleep)
-example(Sys.time)
-example(as.POSIXlt)
-example(difftime)
-example(format.Date)
-example(Reduce) # funprog.Rd
-example(gc)
-example(memory.profile)
+example(Cstack_info, run.donttest = TRUE)
+example(DateTimeClasses, run.donttest = TRUE)
+example(Dates, run.donttest = TRUE)
+example(Ops.Date, run.donttest = TRUE)
+example(Random, run.donttest = TRUE)
+example(Sys.getpid, run.donttest = TRUE)
+example(Sys.sleep, run.donttest = TRUE)
+example(Sys.time, run.donttest = TRUE)
+example(as.POSIXlt, run.donttest = TRUE)
+example(difftime, run.donttest = TRUE)
+example(format.Date, run.donttest = TRUE)
+example(Reduce, run.donttest = TRUE) # funprog.Rd
+example(gc, run.donttest = TRUE)
+example(memory.profile, run.donttest = TRUE)
 paste("Today is", date()) # from paste.Rd
 trunc(Sys.time(), "day") # from round.POSIXt.Rd
-example(srcref)
-example(strptime)
-example(sys.parent)
-example(system.time)
-example(tempfile)
-example(weekdays)
-library(help="splines")
+example(srcref, run.donttest = TRUE)
+example(strptime, run.donttest = TRUE)
+example(sys.parent, run.donttest = TRUE)
+example(system.time, run.donttest = TRUE)
+example(tempfile, run.donttest = TRUE)
+example(weekdays, run.donttest = TRUE)
+library(help = "splines")
 
 ## for example(NA)
 if(require("microbenchmark")) {
@@ -43,27 +43,30 @@ if(require("microbenchmark")) {
 }
 
 ## utils
-example(news)
-example(sessionInfo)
+example(news, run.donttest = TRUE)
+example(sessionInfo, run.donttest = TRUE)
 
 ## datasets
-example(JohnsonJohnson)
-example(ability.cov)
-example(npk)
+example(JohnsonJohnson, run.donttest = TRUE)
+example(ability.cov, run.donttest = TRUE)
+example(npk, run.donttest = TRUE)
 
 ## grDevices
+example(grSoftVersion, run.donttest = TRUE)
 if(.Platform$OS.type == "windows") {
-    example(windowsFonts)
+    example(windowsFonts, run.donttest = TRUE)
 } else {
-    example(X11Fonts)
-    example(quartzFonts)
+    example(X11Fonts, run.donttest = TRUE)
+    example(quartzFonts, run.donttest = TRUE)
 }
 
 library(tools)
-example(Rdutils)
-example(fileutils)
+example(Rdutils, run.donttest = TRUE)
+example(fileutils, run.donttest = TRUE)
+example(makevars_user, run.donttest = TRUE)
 ## results are location- and OS-specific
-example(parseLatex) # charset-specific
+example(parseLatex, run.donttest = TRUE) # charset-specific
+example(loadRdMacros, run.donttest = TRUE) # collation-specific
 
 ## part of example(buildVignettes) at one time
 gVigns <- pkgVignettes("grid")
@@ -82,4 +85,6 @@ if(nzchar(vind)) { # so vignettes have been installed
     stopifnot("grid" %in% gVigns$names, inherits(gVigns, "pkgVignettes"))
 }
 
+## This might leave collation changed, so do not put other things after it.
+example(icuSetCollate, run.donttest = TRUE)
 proc.time()
diff --git a/tests/reg-examples2.R b/tests/reg-examples2.R
index 9b01488..0e17c82 100644
--- a/tests/reg-examples2.R
+++ b/tests/reg-examples2.R
@@ -1,5 +1,9 @@
 ## For examples skipped in testing because they are 'random'
 
+## some should still be skipped when  --with-recommended-packages=no :
+## (This is not really right as could be installed elsewhere.)
+base.and.rec <- .packages(all.available = TRUE, lib = .Library)
+
 set.seed(1)
 if(.Platform$OS.type == "windows") options(pager = "console")
 
@@ -7,27 +11,28 @@ pdf("reg-examples-2.pdf", encoding = "ISOLatin1.enc")
 
 
 ## stats
-example(SSasympOrig)
-example(SSlogis)
-example(constrOptim)
-example(cancor)
-example(aov)
+example(SSasympOrig, run.donttest = TRUE)
+example(SSlogis, run.donttest = TRUE)
+example(constrOptim, run.donttest = TRUE)
+example(cancor, run.donttest = TRUE)
+example(aov, run.donttest = TRUE)
 # signs for promax rotation are arbitrary
-example(factanal)
-example(family)
-example(glm)
-example(glm.control)
+example(factanal, run.donttest = TRUE)
+example(family, run.donttest = TRUE)
+example(fft, run.donttest = TRUE)
+example(glm, run.donttest = ("MASS" %in% base.and.rec))
+example(glm.control, run.donttest = TRUE)
 # from extractAIC
 extractAIC(glm.D93)
-example(influence.measures)
-example(lm)
-example(ls.diag)
-example(model.tables)
-example(nlminb)
-example(optim)
-example(prcomp)
-example(step)
-example(summary.manova)
-example(uniroot)
+example(influence.measures, run.donttest = TRUE)
+example(lm, run.donttest = TRUE)
+example(ls.diag, run.donttest = TRUE)
+example(model.tables, run.donttest = TRUE)
+example(nlminb, run.donttest = TRUE)
+example(optim, run.donttest = TRUE)
+example(prcomp, run.donttest = TRUE)
+example(step, run.donttest = TRUE)
+example(summary.manova, run.donttest = TRUE)
+example(uniroot, run.donttest = TRUE)
 
 proc.time()
diff --git a/tests/reg-examples3.R b/tests/reg-examples3.R
index 7179f12..0fcaeb7 100644
--- a/tests/reg-examples3.R
+++ b/tests/reg-examples3.R
@@ -10,7 +10,7 @@ pdf("reg-examples-3.pdf", encoding = "ISOLatin1.enc")
 if(require("survival")) {
   model3 <- clogit(case ~ spontaneous+induced+strata(stratum), data = infert)
   print(summary(model3))
-  detach("package:survival")  # survival (conflicts)
+  detach("package:survival", unload = TRUE)  # survival (conflicts)
 }
 
 
@@ -99,7 +99,7 @@ anorex.1 <- glm(Postwt ~ Prewt + Treat + offset(Prewt),
 summary(anorex.1)
 
 # logLik.Rd
-{utils::data(Orthodont, package = "nlme")
+utils::data(Orthodont, package = "nlme")
 fm1 <- lm(distance ~ Sex * age, Orthodont)
 logLik(fm1)
 logLik(fm1, REML = TRUE)
@@ -141,6 +141,15 @@ options(od)
 ## Robust:
 (pc.rob <- princomp(stackloss, covmat = MASS::cov.rob(stackloss)))
 
+# termplot.R
+library(MASS)
+hills.lm <- lm(log(time) ~ log(climb)+log(dist), data = hills)
+termplot(hills.lm, partial.resid = TRUE, smooth = panel.smooth,
+        terms = "log(dist)", main = "Original")
+termplot(hills.lm, transform.x = TRUE,
+         partial.resid = TRUE, smooth = panel.smooth,
+	 terms = "log(dist)", main = "Transformed")
+
 # xtabs.Rd
 if(require("Matrix")) {
  ## similar to "nlme"s  'ergoStool' :
@@ -150,21 +159,13 @@ if(require("Matrix")) {
  set.seed(15) # a subset of cases:
  print(xtabs(~ Type + Subj, data = d.ergo[sample(36, 10), ], sparse = TRUE))
 
- ## Hypothetical two level setup:
+ ## Hypothetical two-level setup:
  inner <- factor(sample(letters[1:25], 100, replace = TRUE))
  inout <- factor(sample(LETTERS[1:5], 25, replace = TRUE))
  fr <- data.frame(inner = inner, outer = inout[as.integer(inner)])
  print(xtabs(~ inner + outer, fr, sparse = TRUE))
 }
 
-
-## From tools
-
-## This may not be installed
-gridEx <- system.file("doc", "grid.Rnw", package = "grid")
-vignetteDepends(gridEx)
-
-
 ## From utils
 example(packageDescription)
 
@@ -173,3 +174,15 @@ example(packageDescription)
 library(splines)
 Matrix::drop0(zapsmall(6*splineDesign(knots = 1:40, x = 4:37, sparse = TRUE)))
 
+
+## From tools
+
+library(tools)
+## there are few dependencies in a vanilla R installation:
+## lattice may not be installed
+## Avoid possibly large list from R_HOME/site-library, which --vanilla includes.
+dependsOnPkgs("lattice", lib.loc = .Library)
+
+## This may not be installed
+gridEx <- system.file("doc", "grid.Rnw", package = "grid")
+vignetteDepends(gridEx)
diff --git a/tests/reg-examples3.Rout.save b/tests/reg-examples3.Rout.save
index 05d73f2..481313f 100644
--- a/tests/reg-examples3.Rout.save
+++ b/tests/reg-examples3.Rout.save
@@ -1,7 +1,7 @@
 
-R version 3.1.2 RC (2014-10-29 r66897) -- "Pumpkin Helmet"
-Copyright (C) 2014 The R Foundation for Statistical Computing
-Platform: x86_64-unknown-linux-gnu (64-bit)
+R version 3.4.0 RC (2017-04-18 r72543) -- "You Stupid Darkness"
+Copyright (C) 2017 The R Foundation for Statistical Computing
+Platform: x86_64-pc-linux-gnu (64-bit)
 
 R is free software and comes with ABSOLUTELY NO WARRANTY.
 You are welcome to redistribute it under certain conditions.
@@ -28,10 +28,9 @@ Loading required package: MASS
 > if(require("survival")) {
 +   model3 <- clogit(case ~ spontaneous+induced+strata(stratum), data = infert)
 +   print(summary(model3))
-+   detach("package:survival")  # survival (conflicts)
++   detach("package:survival", unload = TRUE)  # survival (conflicts)
 + }
 Loading required package: survival
-Loading required package: splines
 Call:
 coxph(formula = Surv(rep(1, 248L), case) ~ spontaneous + induced + 
     strata(stratum), data = infert, method = "exact")
@@ -181,7 +180,7 @@ factor> of <- ordered(ff)
 factor> stopifnot(identical(range(of, rev(of)), of[3:2]),
 factor+ 	  identical(max(of), of[2]))
 
-factor> ## End Don't show
+factor> ## End(Don't show)
 factor> 
 factor> ## suppose you want "NA" as a level, and to allow missing values.
 factor> (x <- factor(c(1, 2, NA), exclude = NULL))
@@ -199,6 +198,28 @@ factor> is.na(x)
 
 factor> # [1] FALSE  TRUE FALSE
 factor> 
+factor> ## More rational, since R 3.4.0 :
+factor> factor(c(1:2, NA), exclude =  "" ) # keeps <NA> , as
+[1] 1    2    <NA>
+Levels: 1 2 <NA>
+
+factor> factor(c(1:2, NA), exclude = NULL) # always did
+[1] 1    2    <NA>
+Levels: 1 2 <NA>
+
+factor> ## exclude = <character>
+factor> z # ordered levels 'A < B < C'
+[1] C B A
+Levels: A < B < C
+
+factor> factor(z, exclude = "C") # does exclude
+[1] <NA> B    A   
+Levels: A < B
+
+factor> factor(z, exclude = "B") # ditto
+[1] C    <NA> A   
+Levels: A < C
+
 factor> ## Using addNA()
 factor> Month <- airquality$Month
 
@@ -273,50 +294,146 @@ Number of Fisher Scoring iterations: 2
 
 > 
 > # logLik.Rd
-> {utils::data(Orthodont, package = "nlme")
-+ fm1 <- lm(distance ~ Sex * age, Orthodont)
-+ logLik(fm1)
-+ logLik(fm1, REML = TRUE)
-+ 
-+ # nls.Rd
-+ od <- options(digits=5)
-+ ## The muscle dataset in MASS is from an experiment on muscle
-+ ## contraction on 21 animals.  The observed variables are Strip
-+ ## (identifier of muscle), Conc (Cacl concentration) and Length
-+ ## (resulting length of muscle section).
-+ utils::data(muscle, package = "MASS")
-+ 
-+ ## The non linear model considered is
-+ ##       Length = alpha + beta*exp(-Conc/theta) + error
-+ ## where theta is constant but alpha and beta may vary with Strip.
-+ 
-+ with(muscle, table(Strip)) # 2, 3 or 4 obs per strip
-+ 
-+ ## We first use the plinear algorithm to fit an overall model,
-+ ## ignoring that alpha and beta might vary with Strip.
-+ 
-+ musc.1 <- nls(Length ~ cbind(1, exp(-Conc/th)), muscle,
+> utils::data(Orthodont, package = "nlme")
+> fm1 <- lm(distance ~ Sex * age, Orthodont)
+> logLik(fm1)
+'log Lik.' -239.1209 (df=5)
+> logLik(fm1, REML = TRUE)
+'log Lik.' -241.7796 (df=5)
+> 
+> # nls.Rd
+> od <- options(digits=5)
+> ## The muscle dataset in MASS is from an experiment on muscle
+> ## contraction on 21 animals.  The observed variables are Strip
+> ## (identifier of muscle), Conc (Cacl concentration) and Length
+> ## (resulting length of muscle section).
+> utils::data(muscle, package = "MASS")
+> 
+> ## The non linear model considered is
+> ##       Length = alpha + beta*exp(-Conc/theta) + error
+> ## where theta is constant but alpha and beta may vary with Strip.
+> 
+> with(muscle, table(Strip)) # 2, 3 or 4 obs per strip
+Strip
+S01 S02 S03 S04 S05 S06 S07 S08 S09 S10 S11 S12 S13 S14 S15 S16 S17 S18 S19 S20 
+  4   4   4   3   3   3   2   2   2   2   3   2   2   2   2   4   4   3   3   3 
+S21 
+  3 
+> 
+> ## We first use the plinear algorithm to fit an overall model,
+> ## ignoring that alpha and beta might vary with Strip.
+> 
+> musc.1 <- nls(Length ~ cbind(1, exp(-Conc/th)), muscle,
 +               start = list(th = 1), algorithm = "plinear")
-+ summary(musc.1)
-+ 
-+ ## Then we use nls' indexing feature for parameters in non-linear
-+ ## models to use the conventional algorithm to fit a model in which
-+ ## alpha and beta vary with Strip.  The starting values are provided
-+ ## by the previously fitted model.
-+ ## Note that with indexed parameters, the starting values must be
-+ ## given in a list (with names):
-+ b <- coef(musc.1)
-+ musc.2 <- nls(Length ~ a[Strip] + b[Strip]*exp(-Conc/th), muscle,
+> summary(musc.1)
+
+Formula: Length ~ cbind(1, exp(-Conc/th))
+
+Parameters:
+      Estimate Std. Error t value Pr(>|t|)    
+th       0.608      0.115    5.31  1.9e-06 ***
+.lin1   28.963      1.230   23.55  < 2e-16 ***
+.lin2  -34.227      3.793   -9.02  1.4e-12 ***
+---
+Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
+
+Residual standard error: 4.67 on 57 degrees of freedom
+
+Number of iterations to convergence: 5 
+Achieved convergence tolerance: 9.32e-07
+
+> 
+> ## Then we use nls' indexing feature for parameters in non-linear
+> ## models to use the conventional algorithm to fit a model in which
+> ## alpha and beta vary with Strip.  The starting values are provided
+> ## by the previously fitted model.
+> ## Note that with indexed parameters, the starting values must be
+> ## given in a list (with names):
+> b <- coef(musc.1)
+> musc.2 <- nls(Length ~ a[Strip] + b[Strip]*exp(-Conc/th), muscle,
 +               start = list(a = rep(b[2], 21), b = rep(b[3], 21), th = b[1]))
-+ summary(musc.2)
-+ options(od)
-+ 
-+ # princomp.Rd
-+ ## Robust:
-+ (pc.rob <- princomp(stackloss, covmat = MASS::cov.rob(stackloss)))
-+ 
-+ # xtabs.Rd
-+ if(require("Matrix")) {
+> summary(musc.2)
+
+Formula: Length ~ a[Strip] + b[Strip] * exp(-Conc/th)
+
+Parameters:
+    Estimate Std. Error t value Pr(>|t|)    
+a1    23.454      0.796   29.46  5.0e-16 ***
+a2    28.302      0.793   35.70  < 2e-16 ***
+a3    30.801      1.716   17.95  1.7e-12 ***
+a4    25.921      3.016    8.60  1.4e-07 ***
+a5    23.201      2.891    8.02  3.5e-07 ***
+a6    20.120      2.435    8.26  2.3e-07 ***
+a7    33.595      1.682   19.98  3.0e-13 ***
+a8    39.053      3.753   10.41  8.6e-09 ***
+a9    32.137      3.318    9.69  2.5e-08 ***
+a10   40.005      3.336   11.99  1.0e-09 ***
+a11   36.190      3.109   11.64  1.6e-09 ***
+a12   36.911      1.839   20.07  2.8e-13 ***
+a13   30.635      1.700   18.02  1.6e-12 ***
+a14   34.312      3.495    9.82  2.0e-08 ***
+a15   38.395      3.375   11.38  2.3e-09 ***
+a16   31.226      0.886   35.26  < 2e-16 ***
+a17   31.230      0.821   38.02  < 2e-16 ***
+a18   19.998      1.011   19.78  3.6e-13 ***
+a19   37.095      1.071   34.65  < 2e-16 ***
+a20   32.594      1.121   29.07  6.2e-16 ***
+a21   30.376      1.057   28.74  7.5e-16 ***
+b1   -27.300      6.873   -3.97  0.00099 ***
+b2   -26.270      6.754   -3.89  0.00118 ** 
+b3   -30.901      2.270  -13.61  1.4e-10 ***
+b4   -32.238      3.810   -8.46  1.7e-07 ***
+b5   -29.941      3.773   -7.94  4.1e-07 ***
+b6   -20.622      3.647   -5.65  2.9e-05 ***
+b7   -19.625      8.085   -2.43  0.02661 *  
+b8   -45.780      4.113  -11.13  3.2e-09 ***
+b9   -31.345      6.352   -4.93  0.00013 ***
+b10  -38.599      3.955   -9.76  2.2e-08 ***
+b11  -33.921      3.839   -8.84  9.2e-08 ***
+b12  -38.268      8.992   -4.26  0.00053 ***
+b13  -22.568      8.194   -2.75  0.01355 *  
+b14  -36.167      6.358   -5.69  2.7e-05 ***
+b15  -32.952      6.354   -5.19  7.4e-05 ***
+b16  -47.207      9.540   -4.95  0.00012 ***
+b17  -33.875      7.688   -4.41  0.00039 ***
+b18  -15.896      6.222   -2.55  0.02051 *  
+b19  -28.969      7.235   -4.00  0.00092 ***
+b20  -36.917      8.033   -4.60  0.00026 ***
+b21  -26.508      7.012   -3.78  0.00149 ** 
+th     0.797      0.127    6.30  8.0e-06 ***
+---
+Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
+
+Residual standard error: 1.11 on 17 degrees of freedom
+
+Number of iterations to convergence: 8 
+Achieved convergence tolerance: 2.17e-06
+
+> options(od)
+> 
+> # princomp.Rd
+> ## Robust:
+> (pc.rob <- princomp(stackloss, covmat = MASS::cov.rob(stackloss)))
+Call:
+princomp(x = stackloss, covmat = MASS::cov.rob(stackloss))
+
+Standard deviations:
+   Comp.1    Comp.2    Comp.3    Comp.4 
+7.8322873 4.0077676 1.9114016 0.7624211 
+
+ 4  variables and  21 observations.
+> 
+> # termplot.R
+> library(MASS)
+> hills.lm <- lm(log(time) ~ log(climb)+log(dist), data = hills)
+> termplot(hills.lm, partial.resid = TRUE, smooth = panel.smooth,
++         terms = "log(dist)", main = "Original")
+> termplot(hills.lm, transform.x = TRUE,
++          partial.resid = TRUE, smooth = panel.smooth,
++ 	 terms = "log(dist)", main = "Transformed")
+> 
+> # xtabs.Rd
+> if(require("Matrix")) {
 +  ## similar to "nlme"s  'ergoStool' :
 +  d.ergo <- data.frame(Type = paste0("T", rep(1:4, 9*4)),
 +                       Subj = gl(9, 4, 36*4))
@@ -324,27 +441,147 @@ Number of Fisher Scoring iterations: 2
 +  set.seed(15) # a subset of cases:
 +  print(xtabs(~ Type + Subj, data = d.ergo[sample(36, 10), ], sparse = TRUE))
 + 
-+  ## Hypothetical two level setup:
++  ## Hypothetical two-level setup:
 +  inner <- factor(sample(letters[1:25], 100, replace = TRUE))
 +  inout <- factor(sample(LETTERS[1:5], 25, replace = TRUE))
 +  fr <- data.frame(inner = inner, outer = inout[as.integer(inner)])
 +  print(xtabs(~ inner + outer, fr, sparse = TRUE))
 + }
-+ 
-+ 
-+ ## From tools
-+ 
-+ ## This may not be installed
-+ gridEx <- system.file("doc", "grid.Rnw", package = "grid")
-+ vignetteDepends(gridEx)
-+ 
-+ 
-+ ## From utils
-+ example(packageDescription)
-+ 
-+ 
-+ ## From splines
-+ library(splines)
-+ Matrix::drop0(zapsmall(6*splineDesign(knots = 1:40, x = 4:37, sparse = TRUE)))
-+ 
-+ 
+Loading required package: Matrix
+    Subj
+Type 1 2 3 4 5 6 7 8 9
+  T1 4 4 4 4 4 4 4 4 4
+  T2 4 4 4 4 4 4 4 4 4
+  T3 4 4 4 4 4 4 4 4 4
+  T4 4 4 4 4 4 4 4 4 4
+4 x 9 sparse Matrix of class "dgCMatrix"
+    Subj
+Type 1 2 3 4 5 6 7 8 9
+  T1 . 1 . 1 . 1 . 1 .
+  T2 1 . . . . . 1 . 1
+  T3 . . . . 1 . . . .
+  T4 1 . . . . . 1 . .
+25 x 5 sparse Matrix of class "dgCMatrix"
+     outer
+inner A B C D E
+    a 2 . . . .
+    b . . 1 . .
+    c . 6 . . .
+    d . . . 5 .
+    e . . . 3 .
+    f 1 . . . .
+    g . 9 . . .
+    h . . 3 . .
+    i . . . . 5
+    j . . . 1 .
+    k 3 . . . .
+    l . 2 . . .
+    m 6 . . . .
+    n . . 1 . .
+    o 2 . . . .
+    p . . 2 . .
+    q . 5 . . .
+    r . . . . 6
+    s . . 4 . .
+    t . . . 7 .
+    u . 4 . . .
+    v . . . 7 .
+    w . . . 7 .
+    x . . . . 6
+    y . . . . 2
+> 
+> ## From utils
+> example(packageDescription)
+
+pckgDs> ## No test: 
+pckgDs> ##D packageDescription("stats")
+pckgDs> ##D packageDescription("stats", fields = c("Package", "Version"))
+pckgDs> ##D 
+pckgDs> ##D packageDescription("stats", fields = "Version")
+pckgDs> ##D packageDescription("stats", fields = "Version", drop = FALSE)
+pckgDs> ##D 
+pckgDs> ##D if(packageVersion("MASS") < "7.3.29")
+pckgDs> ##D   message("you need to update 'MASS'")
+pckgDs> ## End(No test)
+pckgDs> 
+pckgDs> 
+> 
+> 
+> ## From splines
+> library(splines)
+> Matrix::drop0(zapsmall(6*splineDesign(knots = 1:40, x = 4:37, sparse = TRUE)))
+34 x 36 sparse Matrix of class "dgCMatrix"
+                                                                             
+ [1,] 1 4 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
+ [2,] . 1 4 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
+ [3,] . . 1 4 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
+ [4,] . . . 1 4 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
+ [5,] . . . . 1 4 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
+ [6,] . . . . . 1 4 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . .
+ [7,] . . . . . . 1 4 1 . . . . . . . . . . . . . . . . . . . . . . . . . . .
+ [8,] . . . . . . . 1 4 1 . . . . . . . . . . . . . . . . . . . . . . . . . .
+ [9,] . . . . . . . . 1 4 1 . . . . . . . . . . . . . . . . . . . . . . . . .
+[10,] . . . . . . . . . 1 4 1 . . . . . . . . . . . . . . . . . . . . . . . .
+[11,] . . . . . . . . . . 1 4 1 . . . . . . . . . . . . . . . . . . . . . . .
+[12,] . . . . . . . . . . . 1 4 1 . . . . . . . . . . . . . . . . . . . . . .
+[13,] . . . . . . . . . . . . 1 4 1 . . . . . . . . . . . . . . . . . . . . .
+[14,] . . . . . . . . . . . . . 1 4 1 . . . . . . . . . . . . . . . . . . . .
+[15,] . . . . . . . . . . . . . . 1 4 1 . . . . . . . . . . . . . . . . . . .
+[16,] . . . . . . . . . . . . . . . 1 4 1 . . . . . . . . . . . . . . . . . .
+[17,] . . . . . . . . . . . . . . . . 1 4 1 . . . . . . . . . . . . . . . . .
+[18,] . . . . . . . . . . . . . . . . . 1 4 1 . . . . . . . . . . . . . . . .
+[19,] . . . . . . . . . . . . . . . . . . 1 4 1 . . . . . . . . . . . . . . .
+[20,] . . . . . . . . . . . . . . . . . . . 1 4 1 . . . . . . . . . . . . . .
+[21,] . . . . . . . . . . . . . . . . . . . . 1 4 1 . . . . . . . . . . . . .
+[22,] . . . . . . . . . . . . . . . . . . . . . 1 4 1 . . . . . . . . . . . .
+[23,] . . . . . . . . . . . . . . . . . . . . . . 1 4 1 . . . . . . . . . . .
+[24,] . . . . . . . . . . . . . . . . . . . . . . . 1 4 1 . . . . . . . . . .
+[25,] . . . . . . . . . . . . . . . . . . . . . . . . 1 4 1 . . . . . . . . .
+[26,] . . . . . . . . . . . . . . . . . . . . . . . . . 1 4 1 . . . . . . . .
+[27,] . . . . . . . . . . . . . . . . . . . . . . . . . . 1 4 1 . . . . . . .
+[28,] . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 4 1 . . . . . .
+[29,] . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 4 1 . . . . .
+[30,] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 4 1 . . . .
+[31,] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 4 1 . . .
+[32,] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 4 1 . .
+[33,] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 4 1 .
+[34,] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 4 1
+> 
+> 
+> ## From tools
+> 
+> library(tools)
+> ## there are few dependencies in a vanilla R installation:
+> ## lattice may not be installed
+> ## Avoid possibly large list from R_HOME/site-library, which --vanilla includes.
+> dependsOnPkgs("lattice", lib.loc = .Library)
+[1] "Matrix"   "nlme"     "mgcv"     "survival"
+> 
+> ## This may not be installed
+> gridEx <- system.file("doc", "grid.Rnw", package = "grid")
+> vignetteDepends(gridEx)
+$Depends
+[1] "lattice"
+
+$Installed
+[1] "lattice"
+
+$Found
+list()
+
+$NotFound
+character(0)
+
+$R
+[1] "R (>= 3.0.0)"
+
+attr(,"class")
+[1] "DependsList"
+Warning messages:
+1: 'getDepList' is deprecated.
+Use 'dependsOnPkgs() or package_dependencies()' instead.
+See help("Deprecated") 
+2: 'package.dependencies' is deprecated.
+Use 'package_dependencies' instead.
+See help("Deprecated") 
+> 
diff --git a/tests/reg-packages.R b/tests/reg-packages.R
index d4a0b61..73f65c6 100644
--- a/tests/reg-packages.R
+++ b/tests/reg-packages.R
@@ -1,5 +1,5 @@
 ## PR 1271  detach("package:base") crashes R.
-try(detach("package:base"))
+tools::assertError(detach("package:base"))
 
 
 ## invalid 'lib.loc'
@@ -34,8 +34,6 @@ stopifnot(1 == grep("setClass",
 ## failed for several reasons in R < 2.7.0
 ##
 ## Part 2: -- build, install, load and "inspect" the package:
-dir.exists <- function(x)
-    is.character(x) && file.exists(x) && file.info(path.expand(x))$isdir
 build.pkg <- function(dir) {
     stopifnot(dir.exists(dir))
     patt <- paste(basename(dir), ".*tar\\.gz$", sep="_")
@@ -57,39 +55,6 @@ sm <- findMethods(show, where= as.environment("package:myTst"))
 stopifnot(names(sm at names) == "foo")
 unlink("myTst_*")
 
-## More building & installing packages
-## NB: tests were added here for 2.11.0.
-## NB^2: do not do this in the R sources!
-## and this testdir is not installed.
-pkgSrcPath <- file.path(Sys.getenv("SRCDIR"), "Pkgs")
-if(file_test("-d", pkgSrcPath)) {
-    ## could use file.copy(recursive = TRUE)
-    system(paste('cp -R', shQuote(pkgSrcPath), shQuote(tempdir())))
-    pkgPath <- file.path(tempdir(), "Pkgs")
-    ## pkgB tests an empty R directory
-    dir.create(file.path(pkgPath, "pkgB", "R"), recursive = TRUE,
-               showWarnings = FALSE)
-    p.lis <- if("Matrix" %in% row.names(installed.packages()))
-        c("pkgA", "pkgB", "exNSS4")
-    else "exNSS4"
-    for(p. in p.lis) {
-        cat("building package", p., "...\n")
-        r <- build.pkg(file.path(pkgPath, p.))
-        cat("installing package", p., "using file", r, "...\n")
-        ## we could install the tar file ... (see build.pkg()'s definition)
-        install.packages(r, lib = "myLib", repos=NULL, type = "source")
-        stopifnot(require(p.,lib = "myLib", character.only=TRUE))
-        detach(pos = match(p., sub("^package:","", search())))
-    }
-    ## TODO: not just print, but check the "list":
-    res <- installed.packages(lib.loc = "myLib", priority = "NA")
-    print(res)
-    unlink("myLib", recursive = TRUE)
-    unlink(file.path(pkgPath), recursive = TRUE)
-}
-unlink("myTst", recursive=TRUE)
-
-
 ## getPackageName()  for "package:foo":
 require('methods')
 library(tools)
@@ -98,4 +63,117 @@ detach("package:tools", unload=TRUE)
 options(oo)
 ## gave warning (-> Error) about creating package name
 
+## --- keep this at end --- so we do not need a large if(.) { .. }
+## More building & installing packages
+## NB: tests were added here for 2.11.0.
+## NB^2: do not do this in the R sources (but in a build != src directory!)
+## and this testdir is not installed.
+if(interactive() && Sys.getenv("USER") == "maechler")
+    Sys.setenv(SRCDIR = normalizePath("~/R/D/r-devel/R/tests"))
+(pkgSrcPath <- file.path(Sys.getenv("SRCDIR"), "Pkgs"))# e.g., -> "../../R/tests/Pkgs"
+if(!file_test("-d", pkgSrcPath) && !interactive()) {
+    unlink("myTst", recursive=TRUE)
+    print(proc.time())
+    q("no")
+}
+## else w/o clause:
+
+do.cleanup <- !nzchar(Sys.getenv("R_TESTS_NO_CLEAN"))
+has.symlink <- (.Platform$OS.type != "windows")
+## Installing "on to" a package existing as symlink in the lib.loc
+## -- used to fail with misleading error message (#PR 16725):
+if(has.symlink && dir.create("myLib_2") &&
+   file.rename("myLib/myTst", "myLib_2/myTst") &&
+   file.symlink("../myLib_2/myTst", "myLib/myTst"))
+    install.packages("myTst", lib = "myLib", repos=NULL, type = "source")
+## In R <= 3.3.2 gave error with *misleading* error message:
+## ERROR: ‘myTst’ is not a legal package name
+
+
+## file.copy(pkgSrcPath, tempdir(), recursive = TRUE) - not ok: replaces symlink by copy
+system(paste('cp -R', shQuote(pkgSrcPath), shQuote(tempdir())))
+pkgPath <- file.path(tempdir(), "Pkgs")
+## pkgB tests an empty R directory
+dir.create(file.path(pkgPath, "pkgB", "R"), recursive = TRUE,
+	   showWarnings = FALSE)
+p.lis <- if("Matrix" %in% row.names(installed.packages(.Library)))
+	     c("pkgA", "pkgB", "exNSS4") else "exNSS4"
+pkgApath <- file.path(pkgPath, "pkgA")
+if("pkgA" %in% p.lis && !dir.exists(d <- pkgApath)) {
+    cat("symlink 'pkgA' does not exist as directory ",d,"; copying it\n", sep='')
+    file.copy(file.path(pkgPath, "xDir", "pkg"), to = d, recursive=TRUE)
+    ## if even the copy failed (NB: pkgB depends on pkgA)
+    if(!dir.exists(d)) p.lis <- p.lis[!(p.lis %in% c("pkgA", "pkgB"))]
+}
+for(p. in p.lis) {
+    cat("building package", p., "...\n")
+    r <- build.pkg(file.path(pkgPath, p.))
+    cat("installing package", p., "using file", r, "...\n")
+    ## we could install the tar file ... (see build.pkg()'s definition)
+    install.packages(r, lib = "myLib", repos=NULL, type = "source")
+    stopifnot(require(p.,lib = "myLib", character.only=TRUE))
+    detach(pos = match(p., sub("^package:","", search())))
+}
+(res <- installed.packages(lib.loc = "myLib", priority = "NA"))
+stopifnot(identical(res[,"Package"], setNames(,sort(c(p.lis, "myTst")))),
+	  res[,"LibPath"] == "myLib")
+### Specific Tests on our "special" packages: ------------------------------
+
+## These used to fail because of the sym.link in pkgA
+if("pkgA" %in% p.lis && dir.exists(pkgApath)) {
+    cat("undoc(pkgA):\n"); print(uA <- tools::undoc(dir = pkgApath))
+    cat("codoc(pkgA):\n"); print(cA <- tools::codoc(dir = pkgApath))
+    stopifnot(identical(uA$`code objects`, c("nil", "search")),
+              identical(uA$`data sets`,    "nilData"))
+}
+
+## - Check conflict message.
+## - Find objects which are NULL via "::" -- not to be expected often
+##   we have one in our pkgA, but only if Matrix is present.
+if(dir.exists(file.path("myLib", "pkgA"))) {
+  msgs <- capture.output(require(pkgA, lib="myLib"), type = "message")
+  writeLines(msgs)
+  stopifnot(length(msgs) > 2,
+            length(grep("The following object is masked.*package:base", msgs)) > 0,
+            length(grep("\\bsearch\\b", msgs)) > 0)
+  data(package = "pkgA") # -> nilData
+  stopifnot(is.null( pkgA::  nil),
+	    is.null( pkgA::: nil),
+	    is.null( pkgA::  nilData)) # <-
+  ## R-devel (pre 3.2.0) wrongly errored for NULL lazy data
+  ## ::: does not apply to data sets:
+  tools::assertError(is.null(pkgA:::nilData))
+}
+
+## tests here should *NOT* assume recommended packages,
+## let alone where they are installed
+if(dir.exists(file.path("myLib", "exNSS4")) &&
+   dir.exists(file.path(.Library, "Matrix"))) {
+    for(ns in c(rev(p.lis), "Matrix")) unloadNamespace(ns)
+    ## Both exNSS4 and Matrix define "atomicVector" *the same*,
+    ## but  'exNSS4'  has it extended - and hence *both* are registered in cache -> "conflicts"
+    requireNamespace("exNSS4", lib= "myLib")
+    ## Found in cache, since there is only one definition.
+    ## Might confuse users.
+    stopifnot(isVirtualClass(getClass("atomicVector")))
+    requireNamespace("Matrix", lib= .Library)
+    ## Throws an error, because there is ambiguity in the cache,
+    ## and the dynamic search will not find anything, since the packages
+    ## are not attached.
+    tools::assertCondition(
+        acl <- getClass("atomicVector")
+        )
+    ## Once Matrix is attached, we find a unique definition.
+    library(Matrix)
+    stopifnot(isVirtualClass(getClass("atomicVector")))
+}
+
+## clean up
+rmL <- c("myLib", if(has.symlink) "myLib_2", "myTst", file.path(pkgPath))
+if(do.cleanup) {
+    for(nm in rmL) unlink(nm, recursive = TRUE)
+} else {
+    cat("Not cleaning, i.e., keeping ", paste(rmL, collapse=", "), "\n")
+}
+
 proc.time()
diff --git a/tests/reg-plot.R b/tests/reg-plot.R
index 4d55746..e567e3c 100644
--- a/tests/reg-plot.R
+++ b/tests/reg-plot.R
@@ -9,7 +9,11 @@ options(warn = 1) # print as they occur
 
 plot(0) # this should remain constant
 str(par(c("usr","xaxp","yaxp")))
-
+stopifnot(all.equal(
+    par(c("usr","xaxp","yaxp"))
+   ,
+    list(usr = c(0.568, 1.432, -1.08, 1.08),
+         xaxp = c(0.6, 1.4, 4), yaxp = c(-1, 1, 4))))
 
 
 ### Test for centring of chars.  All the chars which are plotted should
@@ -149,3 +153,8 @@ hc <- hclust(dst <- dist(c(1:2, 5)), method="ave")
 plot(hc, cex = 2, axes=FALSE, ann=FALSE)
 ## cex was not used in 3.0.[01]
 
+## axis.Date() and axis.POSIXct() with reversed 'xlim'
+toD <- as.Date("2016-08-19"); dates <- c(toD - 10, toD)
+plot(dates, 1:2, xlim = rev(dates),
+     ann=FALSE, yaxt="n", frame.plot=FALSE)
+## failed to label the dates in R <= 3.3.1
diff --git a/tests/reg-plot.Rout.save b/tests/reg-plot.Rout.save
deleted file mode 100644
index 690d0bd..0000000
--- a/tests/reg-plot.Rout.save
+++ /dev/null
@@ -1,182 +0,0 @@
-
-R version 3.1.2 RC (2014-10-29 r66897) -- "Pumpkin Helmet"
-Copyright (C) 2014 The R Foundation for Statistical Computing
-Platform: x86_64-unknown-linux-gnu (64-bit)
-
-R is free software and comes with ABSOLUTELY NO WARRANTY.
-You are welcome to redistribute it under certain conditions.
-Type 'license()' or 'licence()' for distribution details.
-
-R is a collaborative project with many contributors.
-Type 'contributors()' for more information and
-'citation()' on how to cite R or R packages in publications.
-
-Type 'demo()' for some demos, 'help()' for on-line help, or
-'help.start()' for an HTML browser interface to help.
-Type 'q()' to quit R.
-
-> #### Regression tests for GRAPHICS & PLOTS
-> 
-> pdf("reg-plot.pdf", paper="a4r", encoding ="ISOLatin1.enc", compress = FALSE)
-> 
-> ## since we supply the font metrics, the results depend only on
-> ## the encoding used: Windows is different from Unix by default.
-> 
-> options(warn = 1) # print as they occur
-> 
-> plot(0) # this should remain constant
-> str(par(c("usr","xaxp","yaxp")))
-List of 3
- $ usr : num [1:4] 0.568 1.432 -1.08 1.08
- $ xaxp: num [1:3] 0.6 1.4 4
- $ yaxp: num [1:3] -1 1 4
-> 
-> 
-> 
-> ### Test for centring of chars.  All the chars which are plotted should
-> ### be centred, and there should be no warnings about
-> ### font metrics unknown for character `?'
-> 
-> par(pty="s")
-> plot(c(-1,16), c(-1,16), type="n", xlab="", ylab="", xaxs="i", yaxs="i")
-> title("Centred chars in default char set (ISO Latin1)")
-> grid(17, 17, lty=1)
-> known <- c(32:126, 160:255)
-> 
-> for(i in known) {
-+     x <- i %% 16
-+     y <- i %/% 16
-+     points(x, y, pch=-i)
-+ }
-> 
-> par(pty="m")
-> 
-> ## PR 816 (label sizes in dotchart)
-> 
-> ### Prior to 1.2.2, the label sizes were unaffected by cex.
-> 
-> dotchart(VADeaths, main = "Death Rates in Virginia - 1940", cex = 0.5)
-> dotchart(VADeaths, main = "Death Rates in Virginia - 1940", cex = 1.5)
-> 
-> ## killed by 0 prior to 1.4.0 and in 1.4.1:
-> t1 <- ts(0:100)
-> ## only warnings about values <= 0
-> plot(t1, log = "y")
-Warning in xy.coords(x, NULL, log = log) :
-  1 y value <= 0 omitted from logarithmic plot
-> plot(cbind(t1, 10*t1, t1 - 4), log="y", plot.type = "single")
-Warning in xy.coords(x = matrix(rep.int(tx, k), ncol = k), y = x, log = log) :
-  7 y values <= 0 omitted from logarithmic plot
-> stopifnot(par("usr")[4] > 3) # log10: ylim[2] = 1000
-> 
-> 
-> ## This one needs to be looked at.
-> ## lty = "blank" killed the fill colour too.
-> plot(1:10, type="n")
-> polygon(c(1, 3, 3, 1), c(1, 1, 3, 3), col="yellow", border="red", lty="blank")
-> rect(6, 6, 10, 10,  col="blue", border="red", lty="blank")
-> ## in 1.5.0 all omit the fill colours.
-> with(trees, symbols(Height, Volume, circles=Girth/24, inches=FALSE,
-+                     lty="blank", bg="blue"))
-> ## in 1.5.0 ignored the lty.
-> 
-> ## axis() and par(mgp < 0) {keep this example S+ compatible!}:
-> lt <- if(is.R()) "31" else 2
-> x <- seq(-2,3, len=1001)
-> op <- par(tck= +0.02, mgp = -c(3,2,0))
-> plot(x, x^2 - 1.2, xaxt = "n", xlab="", type ='l', col = 2,
-+      main = "mgp < 0: all ticks and labels inside `frame'")
-> x <- -2:3
-> lines(x, x^2 - 1.2, type ="h", col = 3, lwd=3)
-> axis(1, pos = 0, at=-1:1, lty = lt, col=4)## col & lty work only from R 1.6
-> par(op)
-> axis(1, pos = 0, at=c(-2,2,3), lty = lt, col=4)
-> mtext(side=1,"note the x-ticks on the other side of the bars")
-> 
-> ## plot.table(): explicit xlab and ylab for non-1D
-> plot(UCBAdmissions)# default x- and y-lab
-> plot(UCBAdmissions, xlab = "x label", ylab = "YY")# wrong in 1.5.1
-> ##   axis suppression
-> plot(tt <- table(c(rep(0,7), rep(1,4), rep(5, 3))), axes = FALSE)
-> plot(tt, xaxt = "n")
-> ## wrong till (incl.) 1.6.x
-> 
-> ## legend with call
-> lo <- legend(2,2, substitute(hat(theta) == that, list(that= pi)))
-> stopifnot(length(lo$text$x) == 1)
-> ## length() was 3 till 1.7.x
-> 
-> plot(ecdf(c(1:4,8,12)), ylab = "ECDF", main=NULL)
-> ## ylab didn't work till 1.8.0
-> 
-> plot(1:10, pch = NA) # gave error till 1.9.0
-> points(1:3, pch=c("o",NA,"x"))# used "N"
-> try(points(4, pch=c(NA,FALSE)))# still give an error
-Error in plot.xy(xy.coords(x, y), type = type, ...) : 
-  only NA allowed in logical plotting symbol
-> 
-> ## 'lwd' should transfer to plot symbols
-> legend(1,10, c("A","bcd"), lwd = 2:3, pch= 21:22, pt.bg="skyblue",
-+        col = 2:3, bg = "thistle")
-> ## (gave an error for 2 days in "2.0.0 unstable")
-> 
-> x <- 2^seq(1,1001, length=20)
-> plot(x, x^0.9, type="l", log="xy")
-> ## gave error 'Infinite axis extents [GEPretty(1.87013e-12,inf,5)]' for R 2.0.1
-> 
-> plot(as.Date("2001/1/1") + 12*(1:9), 1:9)
-> ## used bad 'xlab/ylab' in some versions of R 2.2.0(unstable)
-> 
-> ## dotchart() restoring par()
-> Opar <- par(no.readonly=TRUE) ; dotchart(1:4, cex= 0.7)
-> Npar <- par(no.readonly=TRUE)
-> ii <- c(37, 50:51, 58:59, 63)
-> stopifnot(identical(names(Opar)[ii],
-+                     c("mai","pin","plt","usr","xaxp","yaxp")),
-+           identical(Opar[-ii], Npar[-ii]))
-> ## did not correctly restore par("mar") up to (incl) R 2.4.0
-> 
-> ## plot.function()     [n=11, ... : since we store and diff PS file !]
-> plot(cos,       xlim=c(-5,5), n=11, axes=FALSE); abline(v=0)
-> ## did *not* plot for negative x up to R 2.5.1
-> plot(sin, -2,3, xlim=c(-5,5), n=11, axes=FALSE, xlab="")# plot from -2
-> axis(1, at=c(-2,3), tcl=-1); axis(1, at=c(-5,5))
-> ## (from,to) & xlim  should work simultaneously
-> 
-> plot(cos, -7,7, n=11, axes=FALSE)
-> ## gave wrong ylab in R 2.6.0
-> plot(cos, -7,7, ylab = "Cosine  cos(x)", n=11, axes=FALSE)
-> ## partial matching of 'ylab'; mapping  [0,1] (not [-7.7]):
-> ## margins chosen to avoid rouding error showing to 2dp.
-> op <- par(mar=c(5,4.123,4,2)+0.1)
-> plot(gamma, yla = expression(Gamma(x)), n=11, yaxt="n")
-Warning in x(x) : NaNs produced
-> par(op)
-> 
-> ## plot.ts(x, y) could get the labels wrong in R <= 2.6.0:
-> x <- ts(1:5);x1 <- lag(x, 2); plot(x1, x, axes=FALSE)
-> 
-> # adding a curve in log scale :
-> curve(5*exp(-x), 0.1, 100, n = 3, log="x", ylab="", axes=FALSE)
-> curve(5*exp(-x), add=TRUE, n = 3, col=2,lwd=3)
-> ## should fully overplot; wrong default xlim in 2.6.1
-> ## (and *slightly* wrong up to 2.6.0)
-> 
-> ## Axis() calls via plot()  {[xy]axt to keep *.ps small}
-> x <- as.Date("2008-04-22 09:45") + (i <- c(0,4))
-> plot(x,    xaxt="n")# not ok in 2.6.2, nor 2.7.0
-> plot(x, i, yaxt="n")# ok in 2.6.2  and 2.7.0
-> plot(i, x, xaxt="n")# ok in 2.6.2 and not in 2.7.0
-> 
-> ## table methods should be bypassed:
-> dotchart(table(infert$education))
-Warning in dotchart(table(infert$education)) :
-  'x' is neither a vector nor a matrix: using as.numeric(x)
-> ## failed in 2.12.[12]
-> 
-> ## cex as "..."  in "high level" function
-> hc <- hclust(dst <- dist(c(1:2, 5)), method="ave")
-> plot(hc, cex = 2, axes=FALSE, ann=FALSE)
-> ## cex was not used in 3.0.[01]
-> 
-> 
diff --git a/tests/reg-plot.pdf.save b/tests/reg-plot.pdf.save
index 3732ce0..d8e95fa 100644
--- a/tests/reg-plot.pdf.save
+++ b/tests/reg-plot.pdf.save
@@ -2,10 +2,10 @@
 %���ρ�\r
 1 0 obj
 <<
-/CreationDate (D:20130601183129)
-/ModDate (D:20130601183129)
+/CreationDate (D:20160819103414)
+/ModDate (D:20160819103414)
 /Title (R Graphics Output)
-/Producer (R 3.1.0)
+/Producer (R 3.4.0)
 /Creator (R)
 >>
 endobj
@@ -5203,13 +5203,78 @@ endobj
 96 0 obj
 499
 endobj
+97 0 obj
+<< /Type /Page /Parent 3 0 R /Contents 98 0 R /Resources 4 0 R >>
+endobj
+98 0 obj
+<<
+/Length 99 0 R
+>>
+stream
+1 J 1 j q
+Q q 227.98 119.08 414.72 371.52 re W n
+Q q 227.98 119.08 414.72 371.52 re W n
+/sRGB CS
+0.000 0.000 0.000 SCN
+0.75 w
+[] 0 d
+1 J
+1 j
+10.00 M
+BT
+/F1 1 Tf 1 Tr 7.48 0 0 7.48 624.38 130.24 Tm (l) Tj 0 Tr
+ET
+BT
+/F1 1 Tf 1 Tr 7.48 0 0 7.48 240.38 474.24 Tm (l) Tj 0 Tr
+ET
+Q q 168.94 45.64 504.00 504.00 re W n
+/sRGB CS
+0.000 0.000 0.000 SCN
+0.75 w
+[] 0 d
+1 J
+1 j
+10.00 M
+627.34 119.08 m 243.34 119.08 l S
+627.34 119.08 m 627.34 111.88 l S
+550.54 119.08 m 550.54 111.88 l S
+473.74 119.08 m 473.74 111.88 l S
+396.94 119.08 m 396.94 111.88 l S
+320.14 119.08 m 320.14 111.88 l S
+243.34 119.08 m 243.34 111.88 l S
+BT
+/sRGB cs
+0.000 0.000 0.000 scn
+/F2 1 Tf 12.00 0.00 0.00 12.00 224.51 93.16 Tm [(A) 30 (ug 19)] TJ
+ET
+BT
+/F2 1 Tf 12.00 0.00 0.00 12.00 301.31 93.16 Tm [(A) 30 (ug 17)] TJ
+ET
+BT
+/F2 1 Tf 12.00 0.00 0.00 12.00 378.11 93.16 Tm [(A) 30 (ug 15)] TJ
+ET
+BT
+/F2 1 Tf 12.00 0.00 0.00 12.00 454.91 93.16 Tm [(A) 30 (ug 13)] TJ
+ET
+BT
+/F2 1 Tf 12.00 0.00 0.00 12.00 531.71 93.16 Tm [(A) 30 (ug 11)] TJ
+ET
+BT
+/F2 1 Tf 12.00 0.00 0.00 12.00 608.51 93.16 Tm [(A) 30 (ug 09)] TJ
+ET
+Q
+endstream
+endobj
+99 0 obj
+1083
+endobj
 3 0 obj
-<< /Type /Pages /Kids [ 7 0 R 10 0 R 13 0 R 16 0 R 19 0 R 22 0 R 25 0 R 28 0 R 31 0 R 34 0 R 37 0 R 40 0 R 43 0 R 46 0 R 49 0 R 52 0 R 55 0 R 58 0 R 61 0 R 64 0 R 67 0 R 70 0 R 73 0 R 76 0 R 79 0 R 82 0 R 85 0 R 88 0 R 91 0 R 94 0 R ] /Count 30 /MediaBox [0 0 841 595] >>
+<< /Type /Pages /Kids [ 7 0 R 10 0 R 13 0 R 16 0 R 19 0 R 22 0 R 25 0 R 28 0 R 31 0 R 34 0 R 37 0 R 40 0 R 43 0 R 46 0 R 49 0 R 52 0 R 55 0 R 58 0 R 61 0 R 64 0 R 67 0 R 70 0 R 73 0 R 76 0 R 79 0 R 82 0 R 85 0 R 88 0 R 91 0 R 94 0 R 97 0 R ] /Count 31 /MediaBox [0 0 841 595] >>
 endobj
 4 0 obj
 <<
 /ProcSet [/PDF /Text]
-/Font << /F1 98 0 R /F2 99 0 R /F3 100 0 R /F6 101 0 R >>
+/Font << /F1 101 0 R /F2 102 0 R /F3 103 0 R /F6 104 0 R >>
 /ExtGState << >>
 /ColorSpace << /sRGB 5 0 R >>
 >>
@@ -5419,7 +5484,7 @@ f9 c7 fa 57 fa e7 fb 77 fc 07 fc 98 fd 29 fd ba
 fe 4b fe dc ff 6d ff ff >
 endstream
 endobj
-97 0 obj
+100 0 obj
 <<
 /Type /Encoding /BaseEncoding /WinAnsiEncoding
 /Differences [ 45/minus 96/quoteleft
@@ -5427,30 +5492,30 @@ endobj
 /dieresis /.notdef /ring /cedilla /.notdef /hungarumlaut /ogonek /caron /space]
 >>
 endobj
-98 0 obj
+101 0 obj
 << /Type /Font /Subtype /Type1 /Name /F1 /BaseFont /ZapfDingbats >>
 endobj
-99 0 obj
+102 0 obj
 << /Type /Font /Subtype /Type1 /Name /F2 /BaseFont /Helvetica
-/Encoding 97 0 R >>
+/Encoding 100 0 R >>
 endobj
-100 0 obj
+103 0 obj
 << /Type /Font /Subtype /Type1 /Name /F3 /BaseFont /Helvetica-Bold
-/Encoding 97 0 R >>
+/Encoding 100 0 R >>
 endobj
-101 0 obj
+104 0 obj
 << /Type /Font /Subtype /Type1 /Name /F6 /BaseFont /Symbol
 >>
 endobj
 xref
-0 102
+0 105
 0000000000 65535 f 
 0000000021 00000 n 
 0000000163 00000 n 
-0000095082 00000 n 
-0000095369 00000 n 
-0000095517 00000 n 
-0000095550 00000 n 
+0000096322 00000 n 
+0000096616 00000 n 
+0000096766 00000 n 
+0000096799 00000 n 
 0000000212 00000 n 
 0000000292 00000 n 
 0000001974 00000 n 
@@ -5541,13 +5606,16 @@ xref
 0000094427 00000 n 
 0000094509 00000 n 
 0000095062 00000 n 
-0000105086 00000 n 
-0000105344 00000 n 
-0000105428 00000 n 
-0000105526 00000 n 
-0000105630 00000 n 
+0000095082 00000 n 
+0000095164 00000 n 
+0000096301 00000 n 
+0000106335 00000 n 
+0000106594 00000 n 
+0000106679 00000 n 
+0000106779 00000 n 
+0000106884 00000 n 
 trailer
-<< /Size 102 /Info 1 0 R /Root 2 0 R >>
+<< /Size 105 /Info 1 0 R /Root 2 0 R >>
 startxref
-105709
+106963
 %%EOF
diff --git a/tests/reg-tests-1a.R b/tests/reg-tests-1a.R
index d234dd9..0a886b2 100644
--- a/tests/reg-tests-1a.R
+++ b/tests/reg-tests-1a.R
@@ -226,8 +226,9 @@ stopifnot(all.equal(cov(X,X,method="spearman",use="complete"),
                     cov(X1,X1,method="spearman",use="complete")))
 
 ## DateTimeClasses
-(dls <- .leap.seconds[-1] - .leap.seconds[-22])
+(dls <- .leap.seconds[-1] - .leap.seconds[-length(.leap.seconds)])
 table(dls)
+stopifnot(sum(dls == 365) >= 11)
 ## end of moved from DateTimeClasses.Rd
 
 
@@ -1917,7 +1918,7 @@ stopifnot(is.na(z[1]))
 ## gave (randomly) 1 or 3 in 1.6.1
 
 
-## PR#2469: read.table on MacOS CR-terminated files.
+## PR#2469: read.table on Mac OS CR-terminated files.
 tmp <- tempfile()
 x <- c("aaa", "bbb", "ccc")
 cat(x, sep="\r", file=tmp)
@@ -2241,8 +2242,9 @@ a9 <- strsplit(a, "NA", perl = TRUE)
 stopifnot(identical(a9, list("", na ,c("BA",""))))
 a10 <- strsplit(a, na)
 stopifnot(identical(a10, as.list(a)))
-## but nchar doesn't fit this pattern
-stopifnot(all(!is.na(nchar(a))))
+## nchar() differs a bit
+stopifnot(identical(is.na(a), is.na(nchar(a))),
+          all(!is.na(nchar(a, type = "width"))))
 ## NA and "NA" were not distinguished in 1.7.x
 
 
@@ -2334,7 +2336,7 @@ x[, num] <- list()
 ## .Random.seed was searched for with inherits=TRUE
 rm(.Random.seed)
 attach(list(.Random.seed=c(0:4)))
-runif(1)
+x <- runif(1)
 detach(2)
 (new <- RNGkind())
 stopifnot(identical(new, c("Mersenne-Twister", "Inversion")))
@@ -2416,6 +2418,7 @@ Quine <- structure(list(Eth = structure(c(1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
     .Names = c("Eth", "Sex", "Age", "Slow or fast", "Days"),
     class = "data.frame", row.names = 1:46)
 step(aov(log(Days+2.5) ~ .^4, data=Quine))
+set.seed(11)
 DF <- data.frame(y=rnorm(21), `x 1`=-10:10., check.names = FALSE)
 lm(y ~ ., data = DF)
 (fm <- lm(y ~ `x 1` + I(`x 1`^2), data = DF))
@@ -2467,22 +2470,6 @@ update(pc.cr, ~ . + Rape)
 ## end of moved from princomp.Rd
 
 
-## smooth.spline.Rd
-y18 <- c(1:3,5,4,7:3,2*(2:5),rep(10,4))
-xx  <- seq(1,length(y18), len=201)
-s2. <- smooth.spline(y18, cv=TRUE,con=list(trace=TRUE, tol=1e-6,low= -3,maxit=20))
-s2. ## Intel-Linux: Df ~= (even! > ) 18 : interpolating -- much smaller PRESS
-## {others, e.g., may end quite differently!}
-lines(predict(s2., xx), col = 4)
-mtext(deparse(s2.$call,200), side= 1, line= -1, cex= 0.8, col= 4)
-
-sdf8 <- smooth.spline(y18, df = 8, con=list(trace=TRUE))
-sdf8 ; sdf8$df - 8
-
-try(smooth.spline(y18, spar = 50)) #>> error : spar 'way too large'
-## end of moved from smooth.spline.Rd
-
-
 ## arima{0}
 (fit <- arima(lh, c(1,0,0)))
 tsdiag(fit)
@@ -2929,7 +2916,7 @@ try(options(list('digits', 'width')))# give an error
 
 
 ## PR#7100 seg faulted or path too long error on ././././././. ...
-list.files('.', all.files = TRUE, recursive = TRUE)
+length( list.files('.', all.files = TRUE, recursive = TRUE) )
 
 
 ## PR#7116 segfaulted on A, later versions segfaulted on B or gave different
@@ -3025,6 +3012,26 @@ stopifnot(identical(names(cumsum(x)), nm),
           identical(names(cumprod(x)), nm))
 ## 1.9.x dropped names
 
+## cumsum etc preserve NAs
+# double
+x <- c(1, NA,  3)
+r <- c(1, NA, NA)
+stopifnot(identical(cumsum(x), r))
+stopifnot(identical(cumprod(x), r))
+stopifnot(identical(cummin(x), r))
+stopifnot(identical(cummax(x), r))
+# complex
+x <- c(1+1i, NA, 3)
+r <- c(1+1i, NA, NA)
+stopifnot(identical(cumsum(x), r))
+stopifnot(identical(cumprod(x), r))
+# integer
+x <- c(1L, NA, 3L)
+r <- c(1L, NA, NA)
+stopifnot(identical(cumsum(x), r))
+stopifnot(identical(cumprod(x), c(1, NA, NA))) # returns double
+stopifnot(identical(cummin(x), r))
+stopifnot(identical(cummax(x), r))
 
 ## complex superassignments
 e <- c(a=1, b=2)
@@ -3619,7 +3626,7 @@ load("x.Rda")
 x
 stopifnot(identical(x, y))
 unlink("x.Rda")
-## 00 00 00 00 00 in 2.1.0 on MacOS X
+## 00 00 00 00 00 in 2.1.0 on OS X (now macOS)
 ## fixed for 2.1.1, but test added only in 2.2.x
 
 
@@ -3819,9 +3826,10 @@ aggregate(as.ts(c(1,2,3,4,5,6,7,8,9,10)),1/5,mean)
 
 
 ## prcomp(tol=1e-6)
+set.seed(16)
 x <- matrix(runif(30),ncol=10)
 s <- prcomp(x, tol=1e-6)
-stopifnot(length(s$sdev) == ncol(s$rotation))
+stopifnot(length(s$sdev) == 3, ncol(s$rotation) == 2)
 summary(s)
 ## last failed in 2.2.0
 
diff --git a/tests/reg-tests-1b.R b/tests/reg-tests-1b.R
index c69bbaf..59fb161 100644
--- a/tests/reg-tests-1b.R
+++ b/tests/reg-tests-1b.R
@@ -147,7 +147,7 @@ stopifnot(p > 0.001)
 Dates <- seq(as.Date("2005/01/01"), as.Date("2009/01/01"), "day")
 months <- format(Dates, format = "%m")
 years <- format(Dates, format = "%Y")
-mn <- as.vector(unlist(sapply(split(months, years), table)))
+mn <- unlist(lapply(unname(split(months, years)), table), use.names=FALSE)
 ty <- as.vector(table(years))
 # Test hist.Date() for months
 stopifnot(identical(hist(Dates, "month", plot = FALSE)$counts, mn))
@@ -231,6 +231,7 @@ op <- options(warn=2)
 m <- c(-Inf,Inf)
 stopifnot(rnorm(2, mean = m) == m,
           rexp (2, Inf) == 0)
+set.seed(11)
 rt(1, Inf)
 R <- list(try(rnorm(2, numeric())),
           try(rexp (2, numeric())),
@@ -243,6 +244,7 @@ stopifnot(sapply(R, function(ch) sub(".* : ", '', ch) ==
 
 
 ## predict.loess with transformed variables
+set.seed(11)
 y <- 1:100 + rnorm(100)
 od <- data.frame(x=1:100, z=1:100 + rnorm(100, 10))
 nd <- data.frame(x=1:100, z=11:110)
@@ -321,7 +323,7 @@ stopifnot(identical(unclass(z), c('z', 'y', 'x', 'w')))
 ## repeated third and later args in R < 2.7.1.
 
 ## PD found that f==f contains NA when f has NA levels (but no missing value)
-f1 <- factor(c(1, 2, NA), exclude = "")
+f1 <- factor(c(1, 2, NA), levels = 1:2)
 f2 <- factor(c(1, 2, NA), exclude = NULL)
 stopifnot(identical(f1, factor(c(1,2,NA))),
           nlevels(f1) == 2, nlevels(f2) == 3,
@@ -717,11 +719,11 @@ stopifnot(length(lf <- levels(fi)) == 3, lf[1] == "a.b.c",
 ## interaction() failed to produce unique levels before 2.9.1
 
 levs <- c("A","A")
-## warnings for now {errors in the future}
+## warnings since 2009; errors since R 3.4.0 (R-devel, June 2016):
 local({
-    assertWarning(gl(2,3, labels = levs))
-    assertWarning(factor(levs, levels=levs))
-    assertWarning(factor(1:2,	 labels=levs))
+    assertError(gl(2,3, labels = levs))
+    assertError(factor(levs, levels=levs))
+    assertError(factor(1:2,  labels=levs))
     })
 ## failed in R < 2.10.0
 L <- c("no", "yes")
@@ -880,7 +882,7 @@ m1 <- methods(na.omit) ## should give (no warning):
 setClass("bla")
 setMethod("na.omit", "bla", function(object, ...) "na.omit(<bla>)")
 (m2 <- methods(na.omit)) ## should give (no warning):
-stopifnot(identical(m1, m2))
+stopifnot(identical(m1, .S3methods("na.omit")))
 options(op)
 ## gave two warnings, when an S3 generic had turned into an S4 one
 
@@ -1815,9 +1817,9 @@ stopifnot(all.equal(hc$height[5:11],
                       3.21380039, 2.9653438476, 6.1418258), tolerance = 1e-9))
 ## Also ensure that hclust() remains fast:
 set.seed(1); nn <- 2000
-tm0 <- system.time(dst <- as.dist(matrix(runif(n = nn^2, min = 0, max = 1), nn, nn)))
+tm0 <- system.time(dst <- as.dist(matrix(runif(n = nn^2, min = 0, max = 1)^1.1, nn, nn)))
 (tm <- system.time(hc <- hclust(dst, method="average")))
-stopifnot(tm[1] < tm0[1])
+stopifnot(tm[1] <= tm0[1])
 ## was slow  from R 1.9.0 up to R 2.15.0
 
 
@@ -2095,14 +2097,7 @@ assertError( aperm(a, "A"))
 stopifnot(identical(NA_character_, enc2utf8(NA_character_)))
 ## gave "NA" instead of NA_character_
 
-## as.hexmode(x), as.octmode(x)  when x is double
-x <- c(NA, 1)
-stopifnot(identical(x == x,
-		    as.hexmode(x) == as.octmode(x)))
-p <- c(1, pi)
-assertError(as.hexmode(p))
-assertError(as.octmode(p))
-## where all "wrong" in R <= 3.1.1
-
+## End of regression tests for R < 3.0.0
+## -------------------------------------
 
 proc.time()
diff --git a/tests/reg-tests-1c.R b/tests/reg-tests-1c.R
index bf22fd1..c3d42dd 100644
--- a/tests/reg-tests-1c.R
+++ b/tests/reg-tests-1c.R
@@ -1,6 +1,7 @@
-## Regression tests for R >= 3.0.0
+## Regression tests for R 3.[0-3].*
 
 pdf("reg-tests-1c.pdf", encoding = "ISOLatin1.enc")
+.pt <- proc.time()
 
 ## mapply with classed objects with length method
 ## was not documented to work in 2.x.y
@@ -17,7 +18,7 @@ stopifnot(z == c(101, 204, 309, 104, 210, 318))
 ## https://stat.ethz.ch/pipermail/r-devel/2013-January/065700.html
 x <- 1:6
 y <- split(x, 1:2)
-class(x) <- "A"
+class(x) <- "ABC" ## class(x) <- "A" creates an invalid object
 yy <- split(x, 1:2)
 stopifnot(identical(y, yy))
 ## were different in R < 3.0.0
@@ -52,6 +53,7 @@ stopifnot(!is.unsorted(NA))
 
 ## str(.) for large factors should be fast:
 u <- as.character(runif(1e5))
+dummy <- str(u); dummy <- str(u); # force compilation of str
 t1 <- max(0.001, system.time(str(u))[[1]]) # get a baseline > 0
 uf <- factor(u)
 (t2 <- system.time(str(uf))[[1]]) / t1 # typically around 1--2
@@ -68,7 +70,7 @@ ftable(m)
 ## Artificial example [was "infinite loop" on x86_64; PR#15364]
 rr <- c(rep(-0.4, 5), rep(-0.4- 1.11e-16, 14), -.5)
 r. <- signif(rr, 12)
-try ( k3 <- kmeans(rr, 3, trace=2) ) ## Warning: Quick-Transfer.. steps exceed
+k3 <- kmeans(rr, 3, trace=2) ## Warning: Quick-Transfer.. steps exceed
 try ( k. <- kmeans(r., 3) ) # after rounding, have only two distinct points
       k. <- kmeans(r., 2)   # fine
 
@@ -181,7 +183,7 @@ dbeta(0.1, 9,  9.9e307)
 dbeta(0.1, 9.9e307, 10)
 ## first two hung in R <= 3.0.2
 
-## PR#15465
+## PR#15465 (0-extent matrix / data frame)
 provideDimnames(matrix(nrow = 0, ncol = 1))
 provideDimnames(table(character()))
 as.data.frame(table(character()))
@@ -339,6 +341,7 @@ badstructure(20, "children")
 d <- as.dendrogram(hclust(dist(sin(1:7))))
 (dl <- d[[c(2,1,2)]]) # single-leaf dendrogram
 stopifnot(inherits(dl, "dendrogram"), is.leaf(dl),
+	  identical(attributes(reorder(dl, 1:7)), c(attributes(dl), value = 5L)),
 	  identical(order.dendrogram(dl), as.vector(dl)),
 	  identical(d, as.dendrogram(d)))
 ## as.dendrogram() was hidden;  order.*() failed for leaf
@@ -349,6 +352,59 @@ hw <- hclust(dist(sqrt(1:5)), method=c(M = "ward"))
 ## failed for 2 days in R-devel/-alpha
 
 
+## PR#15758
+my_env <- new.env(); my_env$one <- 1L
+save(one, file = tempfile(), envir = my_env)
+## failed in R < 3.1.1.
+
+
+## Conversion to numeric in boundary case
+ch <- "0x1.ffa0000000001p-1"
+rr <- type.convert(ch, numerals = "allow.loss")
+rX <- type.convert(ch, numerals = "no.loss")
+stopifnot(is.numeric(rr), identical(rr, rX),
+          all.equal(rr, 0.999267578125),
+	  all.equal(type.convert(ch,	      numerals = "warn"),
+		    type.convert("0x1.ffap-1",numerals = "warn"), tol = 5e-15))
+## type.convert(ch) was not numeric in R 3.1.0
+##
+ch <- "1234567890123456789"
+rr <- type.convert(ch, numerals = "allow.loss")
+rX <- type.convert(ch, numerals = "no.loss")
+rx <- type.convert(ch, numerals = "no.loss", as.is = TRUE)
+tools::assertWarning(r. <- type.convert(ch, numerals = "warn.loss"))
+stopifnot(is.numeric(rr), identical(rr, r.), all.equal(rr, 1.234567890e18),
+	  is.factor(rX),  identical(rx, ch))
+
+
+## PR#15764: integer overflow could happen without a warning or giving NA
+tools::assertWarning(ii <- 1980000020L + 222000000L)
+stopifnot(is.na(ii))
+tools::assertWarning(ii <- (-1980000020L) + (-222000000L))
+stopifnot(is.na(ii))
+tools::assertWarning(ii <- (-1980000020L) - 222000000L)
+stopifnot(is.na(ii))
+tools::assertWarning(ii <- 1980000020L - (-222000000L))
+stopifnot(is.na(ii))
+## first two failed for some version of clang in R < 3.1.1
+
+
+## PR#15735: formulae with exactly 32 variables
+myFormula <- as.formula(paste(c("y ~ x0", paste0("x", 1:30)), collapse = "+"))
+ans <- update(myFormula, . ~ . - w1)
+stopifnot(identical(ans, myFormula))
+
+updateArgument <-
+    as.formula(paste(c(". ~ . ", paste0("w", 1:30)), collapse = " - "))
+ans2 <- update(myFormula, updateArgument)
+stopifnot(identical(ans2, myFormula))
+
+
+## PR#15753
+0x110p-5L # (+ warning)
+stopifnot(.Last.value == 8.5)
+## was 272 with a garbled message in R 3.0.0 - 3.1.0.
+
 
 ## numericDeriv failed to duplicate variables in
 ## the expression before modifying them.  PR#15849
@@ -368,6 +424,24 @@ stopifnot(identical(pp[1,], c("0", " ", ".", " ")),
 ## all 4 prettyNum() would error out
 
 
+## checking all.equal() with externalptr
+library(methods) # getClass()'s versionKey is an e.ptr
+cA <- getClass("ANY")
+stopifnot(all.equal(cA, cA),
+          is.character(all.equal(cA, getClass("S4"))))
+# both all.equal() failed in R <= 3.1.1
+
+
+## as.hexmode(x), as.octmode(x)  when x is double
+x <- c(NA, 1)
+stopifnot(identical(x == x,
+		    as.hexmode(x) == as.octmode(x)))
+p <- c(1, pi)
+tools::assertError(as.hexmode(p))
+tools::assertError(as.octmode(p))
+## where all "wrong" in R <= 3.1.1
+
+
 ## PR#15935
 y <- 1:3
 drop1(lm(y ~ 1))
@@ -388,11 +462,14 @@ stopifnot(identical(options(list()), options(NULL)))
 
 
 ## merge.dendrogram(), PR#15648
-mkDend <- function(n, lab, rGen = function(n) 1+round(16*abs(rnorm(n)))) {
+mkDend <- function(n, lab, method = "complete",
+                   ## gives *ties* often:
+		   rGen = function(n) 1+round(16*abs(rnorm(n)))) {
     stopifnot(is.numeric(n), length(n) == 1, n >= 1, is.character(lab))
     a <- matrix(rGen(n*n), n, n)
     colnames(a) <- rownames(a) <- paste0(lab, 1:n)
-    as.dendrogram(hclust(as.dist(a + t(a))))
+    .HC. <<- hclust(as.dist(a + t(a)), method=method)
+    as.dendrogram(.HC.)
 }
 set.seed(7)
 da <- mkDend(4, "A")
@@ -402,7 +479,1104 @@ hcab <- as.hclust(d.ab)
 stopifnot(hcab$order == c(2, 4, 1, 3, 7, 5, 6),
 	  hcab$labels == c(paste0("A", 1:4), paste0("B", 1:3)))
 ## was wrong in R <= 3.1.1
+set.seed(1) ; h1 <- as.hclust(mkDend(5, "S", method="single")); hc1 <- .HC.
+set.seed(5) ; h5 <- as.hclust(mkDend(5, "S", method="single")); hc5 <- .HC.
+set.seed(42); h3 <- as.hclust(mkDend(5, "A", method="single")); hc3 <- .HC.
+## all failed (differently!) because of ties in R <= 3.2.3
+stopifnot(all.equal(h1[1:4], hc1[1:4], tol = 1e-12),
+	  all.equal(h5[1:4], hc5[1:4], tol = 1e-12),
+	  all.equal(h3[1:4], hc3[1:4], tol = 1e-12))
+
+
+## bw.SJ() and similar with NA,Inf values, PR#16024
+try(bw.SJ (c(NA,2,3)))
+try(bw.bcv(c(-Inf,2,3)))
+try(bw.ucv(c(1,NaN,3,4)))
+## seg.faulted  in  3.0.0 <= R <= 3.1.1
+
+
+## as.dendrogram() with wrong input
+x <- rbind(c( -6, -9), c(  0, 13),
+	   c(-15,  6), c(-14,  0), c(12,-10))
+dx <- dist(x,"manhattan")
+hx <- hclust(dx)
+hx$merge <- matrix(c(-3, 1, -2, 3,
+                     -4, -5, 2, 3), 4,2)
+tools::assertError(as.dendrogram(hx))
+## 8 member dendrogram and memory explosion for larger examples in R <= 3.1.2
+
+
+## abs with named args failed, PR#16047
+abs(x=1i)
+## Complained that the arg should be named z
+
+
+## Big exponents overflowed, PR#15976
+x <- 0E4933
+y <- 0x0p100000
+stopifnot(x == 0, y == 0)
+##
+
+
+## drop.terms() dropped some attributes, PR#16029
+test <- model.frame(Employed ~ Year + poly(GNP,3) + Population, data=longley)
+mterm <- terms(test)
+mterm2 <- drop.terms(mterm, 3)
+predvars <- attr(mterm2, "predvars")
+dataClasses <- attr(mterm2, "dataClasses")
+factors <- attr(mterm2, "factors")
+stopifnot(is.language(predvars), length(predvars) == length(dataClasses)+1,
+          all(names(dataClasses) == rownames(factors)))
+## Previously dropped predvars and dataClasses
+
+
+## prompt() did not escape percent signs properly
+fn <- function(fmt = "%s") {}
+f <- tempfile(fileext = ".Rd")
+prompt(fn, filename = f)
+rd <- tools::parse_Rd(f)
+## Gave syntax errors because the percent sign in Usage
+## was taken as the start of a comment.
+
+
+## power.t.test() failure for very large n (etc): PR#15792
+(ptt <- power.t.test(delta = 1e-4, sd = .35, power = .8))
+(ppt <- power.prop.test(p1 = .5, p2 = .501, sig.level=.001, power=0.90, tol=1e-8))
+stopifnot(all.equal(ptt$n, 192297000, tol = 1e-5),
+          all.equal(ppt$n,  10451937, tol = 1e-7))
+## call to uniroot() did not allow n > 1e7
+
+
+## save(*, ascii=TRUE):  PR#16137
+x0 <- x <- c(1, NA, NaN)
+save(x, file=(sf <- tempfile()), ascii = TRUE)
+load(sf)
+stopifnot(identical(x0, x))
+## x had 'NA' instead of 'NaN'
+
+
+## PR#16205
+stopifnot(length(glob2rx(character())) == 0L)
+## was "^$" in R < 3.1.3
+
+
+### Bugs fixed in R 3.2.0
+
+## Bugs reported by Radford Neal
+x <- pairlist(list(1, 2))
+x[[c(1, 2)]] <- NULL   # wrongly gave an error, referring to misuse
+                       # of the internal SET_VECTOR_ELT procedure
+stopifnot(identical(x, pairlist(list(1))))
+
+a <- pairlist(10, 20, 30, 40, 50, 60)
+dim(a) <- c(2, 3)
+dimnames(a) <- list(c("a", "b"), c("x", "y", "z"))
+# print(a)              # doesn't print names, not fixed
+a[["a", "x"]] <- 0
+stopifnot(a[["a", "x"]] == 0)
+## First gave a spurious error, second caused a seg.fault
+
+
+## Radford (R-devel, June 24, 2014); M.Maechler
+m <- matrix(1:2, 1,2); v <- 1:3
+stopifnot(identical(crossprod(2, v), t(2) %*% v),
+	  identical(crossprod(m, v), t(m) %*% v),
+	  identical(5 %*% v, 5 %*% t(v)),
+          identical(tcrossprod(m, 1:2), m %*% 1:2) )
+## gave error "non-conformable arguments" in R <= 3.2.0
+proc.time() - .pt; .pt <- proc.time()
+
+
+## list <--> environment
+L0 <- list()
+stopifnot(identical(L0, as.list(as.environment(L0))))
+## as.env..() did not work, and as.list(..) gave non-NULL names in R 3.1.x
+
 
+### all.equal() refClass()es check moved to methods package
 
 
-proc.time()
+## missing() did not propagate through '...', PR#15707
+check <- function(x,y,z) c(missing(x), missing(y), missing(z))
+check1 <- function(...) check(...)
+check2 <- function(...) check1(...)
+stopifnot(identical(check2(one, , three), c(FALSE, TRUE, FALSE)))
+## missing() was unable to handle recursive promises
+
+
+### envRefClass check moved to methods package
+
+
+## takes too long with JIT enabled:
+.jit.lev <- compiler::enableJIT(0)
+Sys.getenv("_R_CHECK_LENGTH_1_CONDITION_") -> oldV
+Sys.setenv("_R_CHECK_LENGTH_1_CONDITION_" = "false") # only *warn*
+## while did not protect its argument, which caused an error
+## under gctorture, PR#15990
+gctorture()
+suppressWarnings(while(c(FALSE, TRUE)) 1)
+gctorture(FALSE)
+## gave an error because the test got released when the warning was generated.
+compiler::enableJIT(.jit.lev)# revert
+Sys.setenv("_R_CHECK_LENGTH_1_CONDITION_" = oldV)
+
+
+## hist(x, breaks =) with too large bins, PR#15988
+set.seed(5); x <- runif(99)
+Hist <- function(x, b) hist(x, breaks = b, plot = FALSE)$counts
+for(k in 1:5) {
+    b0 <- seq_len(k-1)/k
+    H.ok <- Hist(x, c(-10, b0, 10))
+    for(In in c(1000, 1e9, Inf))
+	stopifnot(identical(Hist(x, c(-In, b0, In)), H.ok),
+		  identical(Hist(x, c( 0,  b0, In)), H.ok))
+}
+## "wrong" results for k in {2,3,4} in R 3.1.x
+
+
+## eigen(*, symmetric = <default>) with asymmetric dimnames,  PR#16151
+m <- matrix(c(83,41), 5, 4,
+	    dimnames=list(paste0("R",1:5), paste0("C",1:4)))[-5,] + 3*diag(4)
+stopifnot( all.equal(eigen(m, only.values=TRUE) $ values,
+		     c(251, 87, 3, 3), tol=1e-14) )
+## failed, using symmetric=FALSE and complex because of the asymmetric dimnames()
+
+
+## match.call() re-matching '...'
+test <- function(x, ...) test2(x, 2, ...)
+test2 <- function(x, ...) match.call(test2, sys.call())
+stopifnot(identical(test(1, 3), quote(test2(x=x, 2, 3))))
+## wrongly gave test2(x=x, 2, 2, 3) in R <= 3.1.2
+
+
+## callGeneric not forwarding dots in call (PR#16141)
+setGeneric("foo", function(x, ...) standardGeneric("foo"))
+setMethod("foo", "character",
+          function(x, capitalize = FALSE) if (capitalize) toupper(x) else x)
+setMethod("foo", "factor",
+          function(x, capitalize = FALSE) { x <- as.character(x);  callGeneric() })
+toto1 <- function(x, ...) foo(x, ...)
+stopifnot(identical(toto1(factor("a"), capitalize = TRUE), "A"))
+## wrongly did not capitalize in R <= 3.1.2
+
+
+## Accessing non existing objects must be an error
+tools::assertError(base :: foobar)
+tools::assertError(base :::foobar)
+tools::assertError(stats:::foobar)
+tools::assertError(stats:: foobar)
+## lazy data only via '::', not ':::' :
+stopifnot(    nrow(datasets:: swiss) == 47)
+tools::assertError(datasets:::swiss)
+## The ::: versions gave NULL in certain development versions of R
+stopifnot(identical(stats4::show -> s4s,
+		    get("show", asNamespace("stats4") -> ns4)),
+	  s4s at package == "methods",
+	  is.null(ns4[["show"]]) # not directly in stats4 ns
+	  )
+## stats4::show was NULL for 4 hours in R-devel
+
+
+## mode<- did too much evaluation (PR#16215)
+x <- y <- quote(-2^2)
+x <- as.list(x)
+mode(y) <- "list"
+stopifnot(identical(x, y))
+## y ended up containing -4, not -2^2
+
+
+## besselJ()/besselY() with too large order
+besselJ(1, 2^64) ## NaN with a warning
+besselY(1, c(2^(60:70), Inf))
+## seg.faulted in R <= 3.1.2
+
+
+## besselJ()/besselY() with  nu = k + 1/2; k in {-1,-2,..}
+besselJ(1, -1750.5) ## Inf, with only one warning...
+stopifnot(is.finite(besselY(1, .5 - (1500 + 0:10))))
+## last gave NaNs; both: more warnings in R <= 3.1.x
+
+
+## BIC() for arima(), also with NA's
+lho <- lh; lho[c(3,7,13,17)] <- NA
+alh300 <- arima(lh,  order = c(3,0,0))
+alh311 <- arima(lh,  order = c(3,1,1))
+ao300  <- arima(lho, order = c(3,0,0))
+ao301  <- arima(lho, order = c(3,0,1))
+## AIC/BIC for *different* data rarely makes sense ... want warning:
+tools::assertWarning(AA <- AIC(alh300,alh311, ao300,ao301))
+tools::assertWarning(BB <- BIC(alh300,alh311, ao300,ao301))
+fmLst <- list(alh300,alh311, ao300,ao301)
+## nobs() did not "work" in R < 3.2.0:
+stopifnot(sapply(fmLst, nobs) == c(48,47, 44,44))
+lls <- lapply(fmLst, logLik)
+str(lapply(lls, unclass))# -> 'df' and 'nobs'
+## 'manual BIC' via generalized AIC:
+stopifnot(all.equal(BB[,"BIC"],
+                    sapply(fmLst, function(fm) AIC(fm, k = log(nobs(fm))))))
+## BIC() was NA unnecessarily in  R < 3.2.0; nobs() was not available eiher
+
+
+## as.integer() close and beyond maximal integer
+MI <- .Machine$integer.max
+stopifnot(identical( MI, as.integer( MI + 0.99)),
+	  identical(-MI, as.integer(-MI - 0.99)),
+	  is.na(as.integer(as.character( 100*MI))),
+	  is.na(as.integer(as.character(-100*MI))))
+## The two cases with positive numbers  failed in R <= 3.2.0
+
+
+## Ensure that sort() works with a numeric vector "which is an object":
+stopifnot(is.object(y <- freeny$y))
+stopifnot(diff(sort(y)) > 0)
+## order() and hence sort() failed here badly for a while around 2015-04-16
+
+
+## NAs in data frame names:
+dn <- list(c("r1", NA), c("V", NA))
+d11 <- as.data.frame(matrix(c(1, 1, 1, 1), ncol = 2, dimnames = dn))
+stopifnot(identical(names(d11), dn[[2]]),
+          identical(row.names(d11), dn[[1]]))
+## as.data.frame() failed in R-devel for a couple of hours ..
+## note that format(d11) does fail currently, and hence print(), too
+
+
+## Ensure  R -e ..  works on Unix
+if(.Platform$OS.type == "unix" &&
+   file.exists(Rc <- file.path(R.home("bin"), "R")) &&
+   file.access(Rc, mode = 1) == 0) { # 1: executable
+    cmd <- paste(Rc, "-q --vanilla -e 1:3")
+    ans <- system(cmd, intern=TRUE)
+    stopifnot(length(ans) >= 3,
+	      identical(ans[1:2], c("> 1:3",
+				    "[1] 1 2 3")))
+}
+## (failed for < 1 hr, in R-devel only)
+proc.time() - .pt; .pt <- proc.time()
+
+
+## Parsing large exponents of floating point numbers, PR#16358
+set.seed(12)
+lrg <- sprintf("%.0f", round(exp(10*(2+abs(rnorm(2^10))))))
+head(huge <- paste0("1e", lrg))
+    micro <- paste0("1e-", lrg)
+stopifnot(as.numeric(huge) == Inf,
+          as.numeric(micro) == 0)
+## Both failed in R <= 3.2.0
+
+
+## vcov() failed on manova() results, PR#16380
+tear <- c(6.5, 6.2, 5.8, 6.5, 6.5, 6.9, 7.2, 6.9, 6.1, 6.3, 6.7, 6.6, 7.2, 7.1, 6.8, 7.1, 7.0, 7.2, 7.5, 7.6)
+gloss <- c(9.5, 9.9, 9.6, 9.6, 9.2, 9.1, 10.0, 9.9, 9.5, 9.4, 9.1, 9.3, 8.3, 8.4, 8.5, 9.2, 8.8, 9.7, 10.1, 9.2)
+opacity <- c(4.4, 6.4, 3.0, 4.1, 0.8, 5.7, 2.0, 3.9, 1.9, 5.7, 2.8, 4.1, 3.8,1.6, 3.4, 8.4, 5.2, 6.9, 2.7, 1.9)
+Y <- cbind(tear, gloss, opacity)
+rate <- factor(gl(2,10), labels = c("Low", "High"))
+fit <- manova(Y ~ rate)
+vcov(fit)
+## Gave error because coef.aov() turned matrix of coefficients into a vector
+
+
+## Unary / Binary uses of logic operations, PR#16385
+tools::assertError(`&`(FALSE))
+tools::assertError(`|`(TRUE))
+## Did not give errors in R <= 3.2.0
+E <- tryCatch(`!`(), error = function(e)e)
+stopifnot(grepl("0 arguments .*\\<1", conditionMessage(E)))
+## Gave wrong error message in R <= 3.2.0
+stopifnot(identical(!matrix(TRUE), matrix(FALSE)),
+	  identical(!matrix(FALSE), matrix(TRUE)))
+## was wrong for while in R 3.2.0 patched
+
+
+## cummax(<integer>)
+iNA <- NA_integer_
+x <- c(iNA, 1L)
+stopifnot(identical(cummin(x), c(iNA, iNA)),
+          identical(cummax(x), c(iNA, iNA)))
+## an initial NA was not propagated in R <= 3.2.0
+
+
+## summaryRprof failed for very short profile, PR#16395
+profile <- tempfile()
+writeLines(c(
+'memory profiling: sample.interval=20000',
+':145341:345360:13726384:0:"stdout"',
+':208272:345360:19600000:0:"stdout"'), profile)
+summaryRprof(filename = profile, memory = "both")
+unlink(profile)
+## failed when a matrix was downgraded to a vector
+
+
+## option(OutDec = *)  -- now gives a warning when  not 1 character
+op <- options(OutDec = ".", digits = 7, # <- default
+              warn = 2)# <- (unexpected) warnings become errors
+stopifnot(identical("3.141593", fpi <- format(pi)))
+options(OutDec = ",")
+stopifnot(identical("3,141593", cpi <- format(pi)))
+## warnings, but it "works" (for now):
+tools::assertWarning(options(OutDec = ".1."))
+stopifnot(identical("3.1.141593", format(pi)))
+tools::assertWarning(options(OutDec = ""))
+tools::assertWarning(stopifnot(identical("3141593", format(pi))))
+options(op)# back to sanity
+## No warnings in R versions <= 3.2.1
+
+
+## format(*, decimal.mark=".")  when   OutDec != "."  (PR#16411)
+op <- options(OutDec = ",")
+stopifnot(identical(fpi, format(pi, decimal.mark=".")))
+options(op)
+## failed in R <= 3.2.1
+
+
+## model.frame() removed ts attributes on original data (PR#16436)
+orig <- class(EuStockMarkets)
+mf <- model.frame(EuStockMarkets ~ 1, na.action=na.fail)
+stopifnot(identical(orig, class(EuStockMarkets)))
+## ts class lost in R <= 3.2.1
+
+
+##
+foo <- as.expression(1:3)
+matrix(foo, 3, 3) # always worked
+matrix(foo, 3, 3, byrow = TRUE)
+## failed in R <= 3.1.2
+
+
+## labels.dendrogram(), dendrapply(), etc -- see comment #15 of PR#15215 :
+(D <- as.dendrogram(hclust(dist(cbind(setNames(c(0,1,4), LETTERS[1:3]))))))
+stopifnot(
+    identical(labels(D), c("C", "A", "B")),
+    ## has been used in "CRAN package space"
+    identical(suppressWarnings(dendrapply(D, labels)),
+              list("C", list("A", "B"), "C")))
+## dendrapply(D, labels) failed in R-devel for a day or two
+
+
+## poly() / polym() predict()ion
+library(datasets)
+alm <- lm(stack.loss ~ poly(Air.Flow, Water.Temp, degree=3), stackloss)
+f20 <- fitted(alm)[1:20] # "correct" prediction values [1:20]
+stopifnot(all.equal(unname(f20[1:4]), c(39.7703378, 39.7703378, 35.8251359, 21.5661761)),
+	  all.equal(f20, predict(alm, stackloss) [1:20] , tolerance = 1e-14),
+	  all.equal(f20, predict(alm, stackloss[1:20, ]), tolerance = 1e-14))
+## the second prediction went off in  R <= 3.2.1
+
+
+## PR#16478
+kkk <- c("a\tb", "3.14\tx")
+z1 <- read.table(textConnection(kkk), sep = "\t", header = TRUE,
+                 colClasses = c("numeric", "character"))
+z2 <- read.table(textConnection(kkk), sep = "\t", header = TRUE,
+                 colClasses = c(b = "character", a = "numeric"))
+stopifnot(identical(z1, z2))
+z3 <- read.table(textConnection(kkk), sep = "\t", header = TRUE,
+                 colClasses = c(b = "character"))
+stopifnot(identical(z1, z3))
+z4 <- read.table(textConnection(kkk), sep = "\t", header = TRUE,
+                 colClasses = c(c = "integer", b = "character", a = "numeric"))
+stopifnot(identical(z1, z4))
+## z2 and z4 used positional matching (and failed) in R < 3.3.0.
+
+
+## PR#16484
+z <- regexpr("(.)", NA_character_, perl = TRUE)
+stopifnot(is.na(attr(z, "capture.start")), is.na(attr(z, "capture.length")))
+## Result was random integers in R <= 3.2.2.
+
+
+## PR#14861
+if(.Platform$OS.type == "unix") { # no 'ls /'  on Windows
+    con <- pipe("ls /", open = "rt")
+    data <- readLines(con)
+    z <- close(con)
+    print(z)
+    stopifnot(identical(z, 0L))
+}
+## was NULL in R <= 3.2.2
+
+
+## Sam Steingold:  compiler::enableJIT(3) not working in ~/.Rprofile anymore
+stopifnot(identical(topenv(baseenv()),
+                    baseenv()))
+## accidentally globalenv in R 3.2.[12] only
+
+
+## widths of unknown Unicode characters
+stopifnot(nchar("\u200b", "w") == 0)
+## was -1 in R 3.2.2
+
+
+## abbreviate dropped names in some cases
+x <- c("AA", "AB", "AA", "CBA") # also test handling of duplicates
+for(m in 2:0) {
+    print(y <- abbreviate(x, m))
+    stopifnot(identical(names(y), x))
+}
+## dropped for 0 in R <= 3.2.2
+
+
+## match(<NA>, <NA>)
+stopifnot(
+    isTRUE(NA          %in% c(NA, TRUE)),
+    isTRUE(NA_integer_ %in% c(TRUE, NA)),
+    isTRUE(NA_real_    %in% c(NA, FALSE)),# !
+    isTRUE(!(NaN       %in% c(NA, FALSE))),
+    isTRUE(NA          %in% c(3L, NA)),
+    isTRUE(NA_integer_ %in% c(NA, 3L)),
+    isTRUE(NA_real_    %in% c(3L, NA)),# !
+    isTRUE(!(NaN       %in% c(3L, NA))),
+    isTRUE(NA          %in% c(2., NA)),# !
+    isTRUE(NA_integer_ %in% c(NA, 2.)),# !
+    isTRUE(NA_real_    %in% c(2., NA)),# !
+    isTRUE(!(NaN       %in% c(2., NA))))
+## the "!" gave FALSE in R-devel (around 20.Sep.2015)
+
+
+## oversight in  within.data.frame()  [R-help, Sep 20 2015 14:23 -04]
+df <- data.frame(.id = 1:3 %% 3 == 2, a = 1:3)
+d2 <- within(df, {d = a + 2})
+stopifnot(identical(names(d2), c(".id", "a", "d")))
+## lost the '.id' column in R <= 3.2.2
+proc.time() - .pt; .pt <- proc.time()
+
+## system() truncating and splitting long lines of output, PR#16544
+## only works when platform has getline() in stdio.h, and Solaris does not.
+known.POSIX_2008 <- .Platform$OS.type == "unix" &&
+     (Sys.info()[["sysname"]] != "SunOS")
+## ^^^ explicitly exclude *non*-working platforms above
+if(known.POSIX_2008) {
+    cat("testing system(\"echo\", <large>) : "); op <- options(warn = 2)# no warnings allowed
+    cn <- paste(1:2222, collapse=" ")
+    rs <- system(paste("echo", cn), intern=TRUE)
+    stopifnot(identical(rs, cn))
+    cat("[Ok]\n"); options(op)
+}
+
+
+## tail.matrix()
+B <- 100001; op <- options(max.print = B + 99)
+mat.l <- list(m0  = matrix(, 0,2),
+              m0n = matrix(, 0,2, dimnames = list(NULL, paste0("c",1:2))),
+              m2  = matrix(1:2,   2,1),
+              m2n = matrix(1:2,   2,3, dimnames = list(NULL, paste0("c",1:3))),
+              m9n = matrix(1:9,   9,1, dimnames = list(paste0("r",1:9),"CC")),
+              m12 = matrix(1:12, 12,1),
+              mBB = matrix(1:B, B, 1))
+## tail() used to fail for 0-rows matrices m0*
+n.s <- -3:3
+hl <- lapply(mat.l, function(M) lapply(n.s, function(n) head(M, n)))
+tl <- lapply(mat.l, function(M) lapply(n.s, function(n) tail(M, n)))
+## Check dimensions of resulting matrices --------------
+## ncol:
+Mnc <- do.call(rbind, rep(list(vapply(mat.l, ncol, 1L)), length(n.s)))
+stopifnot(identical(Mnc, sapply(hl, function(L) vapply(L, ncol, 1L))),
+          identical(Mnc, sapply(tl, function(L) vapply(L, ncol, 1L))))
+## nrow:
+fNR <- function(L) vapply(L, nrow, 1L)
+tR <- sapply(tl, fNR)
+stopifnot(identical(tR, sapply(hl, fNR)), # head() & tail  both
+          tR[match(0, n.s),] == 0, ## tail(*,0) has always 0 rows
+          identical(tR, outer(n.s, fNR(mat.l), function(x,y)
+              ifelse(x < 0, pmax(0L, y+x), pmin(y,x)))))
+for(j in c("m0", "m0n")) { ## 0-row matrices: tail() and head() look like identity
+    co <- capture.output(mat.l[[j]])
+    stopifnot(vapply(hl[[j]], function(.) identical(co, capture.output(.)), NA),
+              vapply(tl[[j]], function(.) identical(co, capture.output(.)), NA))
+}
+
+CO1 <- function(.) capture.output(.)[-1] # drop the printed column names
+## checking tail(.) rownames formatting
+nP <- n.s > 0
+for(nm in c("m9n", "m12", "mBB")) { ## rownames: rather [100000,] than [1e5,]
+    tf <- file(); capture.output(mat.l[[nm]], file=tf)
+    co <- readLines(tf); close(tf)
+    stopifnot(identical(# tail(.) of full output == output of tail(.) :
+        lapply(n.s[nP], function(n) tail(co, n)),
+        lapply(tl[[nm]][nP], CO1)))
+}
+
+identCO <- function(x,y, ...) identical(capture.output(x), capture.output(y), ...)
+headI <- function(M, n) M[head(seq_len(nrow(M)), n), , drop=FALSE]
+tailI <- function(M, n) M[tail(seq_len(nrow(M)), n), , drop=FALSE]
+for(mat in mat.l) {
+    ## do not capture.output for  tail(<large>, <small negative>)
+    n.set <- if(nrow(mat) < 999) -3:3 else 0:3
+    stopifnot(
+        vapply(n.set, function(n) identCO (head(mat, n), headI(mat, n)), NA),
+        vapply(n.set, function(n) identCO (tail (mat, n, addrownums=FALSE),
+                                           tailI(mat, n)), NA),
+        vapply(n.set, function(n) all.equal(tail(mat, n), tailI(mat, n),
+                                            check.attributes=FALSE), NA))
+}
+options(op)
+## end{tail.matrix check} ------------------
+
+## format.data.frame() & as.data.frame.list() - PR#16580
+myL <- list(x=1:20, y=rnorm(20), stringsAsFactors = gl(4,5))
+names(myL)[1:2] <- lapply(1:2, function(i)
+    paste(sample(letters, 300, replace=TRUE), collapse=""))
+nD  <- names(myD  <- as.data.frame(myL))
+nD2 <- names(myD2 <- as.data.frame(myL, cut.names = 280))
+nD3 <- names(myD3 <- as.data.frame(myL, cut.names = TRUE))
+stopifnot(nchar(nD) == c(300,300,16), is.data.frame(myD),  dim(myD)  == c(20,3),
+	  nchar(nD2)== c(278,278,16), is.data.frame(myD2), dim(myD2) == c(20,3),
+	  nchar(nD3)== c(254,254,16), is.data.frame(myD3), dim(myD3) == c(20,3),
+	  identical(nD[3], "stringsAsFactors"),
+	  identical(nD[3], nD2[3]), identical(nD[3], nD3[3]))
+
+names(myD)[1:2] <- c("Variable.1", "")# 2nd col.name is "empty"
+## A data frame with a column that is an empty data frame:
+d20 <- structure(list(type = c("F", "G"), properties = data.frame(i=1:2)[,-1]),
+                 class = "data.frame", row.names = c(NA, -2L))
+stopifnot(is.data.frame(d20), dim(d20) == c(2,2),
+	  identical(colnames(d20), c("type", "properties")),
+	  identical(capture.output(d20), c("  type", "1    F", "2    G")))
+## format(d20) failed in intermediate R versions
+stopifnot(identical(names(myD), names(format(head(myD)))),
+	  identical(names(myD), c("Variable.1", "", "stringsAsFactors")),
+	  identical(rbind.data.frame(2:1, 1:2), ## was wrong for some days
+		    data.frame(c.2L..1L. = c(2L, 1L), X1.2 = 1:2)))
+## format.data.frame() did not show "stringsAsFactors" in R <= 3.2.2
+## Follow up: the new as.data.frame.list() must be careful with 'AsIs' columns:
+desc <- structure( c("a", NA, "z"), .Names = c("A", NA, "Z"))
+tools::assertError( data.frame(desc = desc, stringsAsFactors = FALSE) )
+## however
+dd <- data.frame(desc = structure(desc, class="AsIs"),
+                 row.names = c("A","M","Z"), stringsAsFactors = FALSE)
+## is "legal" (because "AsIs" can be 'almost anything')
+dd ## <- did not format nor print correctly in R-devel early Nov.2015
+fdesc <- structure(c("a", "NA", "z"), .Names=names(desc), class="AsIs")
+stopifnot(identical(format(dd),
+                    data.frame(desc = fdesc, row.names = c("A", "M", "Z"))),
+          identical(capture.output(dd),
+                    c("  desc", "A    a",
+		      "M <NA>", "Z    z")),
+	  identical(dd, data.frame(list(dd))))# lost row.names for a while
+
+
+## var(x) and hence sd(x)  with factor x, PR#16564
+tools::assertError(cov(1:6, f <- gl(2,3)))# was ok already
+tools::assertWarning(var(f))
+tools::assertWarning( sd(f))
+## var() "worked" in R <= 3.2.2  using the underlying integer codes
+proc.time() - .pt; .pt <- proc.time()
+
+
+## loess(*, .. weights) - PR#16587
+d.loess <-
+    do.call(expand.grid,
+            c(formals(loess.control)[1:3],
+              list(iterations = c(1, 10),
+                   KEEP.OUT.ATTRS = FALSE, stringsAsFactors = FALSE)))
+d.loess $ iterTrace <- (d.loess$ iterations > 1)
+## apply(d.loes, 1L, ...) would coerce everything to atomic, i.e, "character":
+loess.c.list <- lapply(1:nrow(d.loess), function(i)
+    do.call(loess.control, as.list(d.loess[i,])))
+set.seed(123)
+for(n in 1:6) { if(n %% 10 == 0) cat(n,"\n")
+    wt <- runif(nrow(cars))
+    for(ctrl in loess.c.list) {
+        cars.wt <- loess(dist ~ speed, data = cars, weights = wt,
+                         family = if(ctrl$iterations > 1) "symmetric" else "gaussian",
+                         control = ctrl)
+        cPr  <- predict(cars.wt)
+        cPrN <- predict(cars.wt, newdata=cars)
+        stopifnot(all.equal(cPr, cPrN, check.attributes = FALSE, tol=1e-14))
+    }
+}
+## gave (typically slightly) wrong predictions in R <= 3.2.2
+
+
+## aperm() for named dim()s:
+na <- list(A=LETTERS[1:2], B=letters[1:3], C=LETTERS[21:25], D=letters[11:17])
+da <- lengths(na)
+A <- array(1:210, dim=da, dimnames=na)
+aA <- aperm(A)
+a2 <- aperm(A, (pp <- c(3:1,4)))
+stopifnot(identical(     dim(aA), rev(da)),# including names(.)
+	  identical(dimnames(aA), rev(na)),
+	  identical(     dim(a2), da[pp]), # including names(.)
+	  identical(dimnames(a2), na[pp]))
+## dim(aperm(..)) did lose names() in R <= 3.2.2
+
+
+## poly() / predict(poly()) with NAs -- PR#16597
+fm <- lm(y ~ poly(x, 3), data=data.frame(x=1:7, y=sin(1:7)))
+x <- c(1,NA,3:7)
+stopifnot(all.equal(c(predict(fm, newdata=list(x = 1:3)), `4`=NA),
+		      predict(fm, newdata=list(x=c(1:3,NA))), tol=1e-15),
+	  all.equal(unclass(poly(x, degree=2, raw=TRUE)),
+		    cbind(x, x^2), check.attributes=FALSE))
+## both gave error about NA in R <= 3.2.2
+
+
+## data(package = *) on some platforms
+dd <- data(package="datasets")[["results"]]
+if(anyDuplicated(dd[,"Item"])) stop("data(package=*) has duplications")
+## sometimes returned the data sets *twice* in R <= 3.2.2
+
+
+## prettyNum(*, big.mark, decimal.mark)
+b.m <- c(".", ",", "'", "")
+d.m <- c(".", ",", ".,", "..")
+pa <- expand.grid(big.mark = b.m, decimal.mark = d.m,
+                  x = c(1005.24, 100.22, 1000000.33), scientific=FALSE, digits=9,
+                  stringsAsFactors=FALSE, KEEP.OUT.ATTRS=FALSE)
+r <- vapply(1:nrow(pa), function(i) do.call(prettyNum, pa[i,]), "")# with 6x2 warnings
+r
+b.m[b.m == ""] <- "0"
+## big.mark: only >= 1000; *and* because particular chosen numbers:
+r.2 <- substr(r[pa[,"x"] > 1000], 2, 2)
+## compute location of decimal point (which maybe more than one char)
+nd <- nchar(dm.s <- rep(d.m, each=length(b.m)))
+nr <- nchar(r) - 3 + (nd == 1)
+nr2 <- nr + (nd > 1)
+stopifnot(identical(r.2,               rep_len(b.m, length(r.2))),
+          identical(substr(r, nr,nr2), rep_len(dm.s, length(r))))
+## several cases (1, 5, 9, 10,..) were wrong in R 3.2.2
+
+
+## kmeans with just one center -- PR#16623
+set.seed(23)
+x <- rbind(matrix(rnorm(100,           sd = 0.3), ncol = 2),
+           matrix(rnorm(100, mean = 1, sd = 0.3), ncol = 2))
+k1 <- kmeans(x, 1)
+k2 <- kmeans(x, centers = k1$centers)
+stopifnot(all.equal(k1, k2), k1$cluster == 1)
+## the kmeans(*, centers=.) called failed in R <= 3.2.3
+
+
+## invalid dimnames for array()
+tools::assertError(array(1, 2:3, dimnames="foo"))
+## were silently disregarded in R <= 3.2.3
+
+
+## addmargins() - dimnames with (by default) "Sum"
+m <- rbind(1, 2:3)
+m2 <- addmargins(m, 2)
+am <- addmargins(m)
+stopifnot(
+    identical(dimnames(m2), list(NULL, c("", "", "Sum"))),
+    identical(am[,"Sum"], setNames(c(2, 5, 7), c("", "", "Sum"))))
+## the dimnames array() bug above hid the addmargins() not adding "Sum"
+
+
+## dim( x[,] ) -- should keep names(dim(.)) --
+## ---  ----
+##_ 1 D _
+A1 <- array(1:6, (d <- c(nam=6L)))
+stopifnot(identical(dim(A1), d),
+          identical(dim(A1), dim(A1[])))
+##_ 2 D _
+A2 <- A[1,2,,]
+stopifnot(identical(names(dim(A2)), c("C", "D")),
+          identical(dim(A2), dim(A)[-(1:2)]),
+          identical(dim(A2[ ]), dim(A2)),
+          identical(dim(A2[,]), dim(A2)),
+          identical(dim(A2[1, , drop=FALSE]), c(C = 1L, D = 7L)),
+          identical(dim(A2[, 1, drop=FALSE]), c(C = 5L, D = 1L)))
+##_ higher D_
+A3 <- A[1, ,,]
+stopifnot(
+    identical(dim(A ), dim(A [,,,])),# was already wrong: [,,,] losing names(dim(.))
+    identical(dim(A[,-1,-1,-1]), dim(A) - c(0:1,1L,1L)),
+    identical(dim(A3), dim(A)[-1]),
+    identical(dim(A3), dim(A3[,, ])),
+    identical(dim(A3[,1,]), c(B = 3L, D = 7L)))
+## all subsetting of arrays lost names(dim(.)) in R < 3.3.0
+
+
+## NextMethod() dispatch for  `$`  and  `$<-`
+`$.foo` <- function(x, fun) paste("foo:", NextMethod())
+x <- list(a = 1, b = 2)
+class(x) <- "foo"
+stopifnot(identical(x$b, "foo: 2"))  # 'x$b' failed prior to R 3.3.0
+
+`$<-.foo` <- function(x, value, fun) {
+    attr(x, "modified") <- "yes"
+    NextMethod()
+}
+x$y <- 10 ## failed prior to R 3.3.0
+stopifnot(identical(attr(x, "modified"), "yes"))
+
+
+## illegal 'row.names' for as.data.frame():  -- for now just a warning --
+tools::assertWarning(
+    d3 <- as.data.frame(1:3, row.names = letters[1:2])
+)
+stopifnot(dim(d3) == c(3,1)) ## was (2, 1) in R <= 3.2.3
+## 'row.names' were not checked and produced a "corrupted" data frame in R <= 3.2.3
+
+
+## rbind.data.frame()'s  smart row names construction
+mk1 <- function(x) data.frame(x=x)
+d4 <- rbind(mk1(1:4)[3:4,,drop=FALSE], mk1(1:2))
+stopifnot(identical(dimnames(d4),
+                    list(c("3", "4", "1", "2"), "x")),
+## the rownames were       "3"  "4"  "31" "41"  in R <= 3.3.0
+          identical(attr(rbind(mk1(5:8), 7, mk1(6:3)), "row.names"), 1:9)
+          )
+
+## sort on integer() should drop NAs by default
+stopifnot(identical(1L, sort(c(NA, 1L))))
+## and other data types for method="radix"
+stopifnot(identical("a", sort(c(NA, "a"), method="radix")))
+stopifnot(identical(character(0L), sort(c(NA, NA_character_), method="radix")))
+stopifnot(identical(1, sort(c(NA, 1), method="radix")))
+
+
+## dummy.coef(.) in the case of "non-trivial terms" -- PR#16665
+op <- options(contrasts = c("contr.treatment", "contr.poly"))
+fm1 <- lm(Fertility ~ cut(Agriculture, breaks=4) + Infant.Mortality, data=swiss)
+(dc1 <- dummy.coef(fm1)) ## failed in R <= 3.3.0
+## (R-help, Alexandra Kuznetsova, 24 Oct 2013):
+set.seed(56)
+group <- gl(2, 10, 20, labels = c("Ctl","Trt"))
+weight <- c(rnorm(10, 4), rnorm(10, 5))
+x <- rnorm(20)
+lm9 <- lm(weight ~ group + x + I(x^2))
+dc9 <- dummy.coef(lm9)
+## failed in R <= 3.3.0
+stopifnot( # depends on contrasts:
+    all.equal(unname(coef(fm1)), unlist(dc1, use.names=FALSE)[-2], tol= 1e-14),
+    all.equal(unname(coef(lm9)), unlist(dc9, use.names=FALSE)[-2], tol= 1e-14))
+## a 'use.na=TRUE' example
+dd <- data.frame(x1 = rep(letters[1:2], each=3),
+                 x2 = rep(LETTERS[1:3], 2),
+                 y = rnorm(6))
+dd[6,2] <- "B" # => no (b,C) combination => that coef should be NA
+fm3 <- lm(y ~ x1*x2, dd)
+(d3F <- dummy.coef(fm3, use.na=FALSE))
+(d3T <- dummy.coef(fm3, use.na=TRUE))
+stopifnot(all.equal(d3F[-4], d3T[-4]),
+	  all.equal(d3F[[4]][-6], d3T[[4]][-6]),
+	  all.equal(drop(d3T$`x1:x2`),
+		    c("a:A"= 0, "b:A"= 0, "a:B"= 0,
+		      "b:B"= 0.4204843786, "a:C"=0, "b:C"=NA)))
+## in R <= 3.2.3, d3T$`x1:x2` was *all* NA
+##
+## dummy.coef() for "manova"
+## artificial data inspired by the  summary.manova  example
+rate <- gl(2,10, labels=c("Lo", "Hi"))
+additive <- gl(4, 1, length = 20, labels = paste("d", 1:4, sep="."))
+additive <- C(additive, "contr.sum")# => less trivial dummy.coef
+X <- model.matrix(~ rate*additive)
+E <- matrix(round(rnorm(20*3), 2), 20,3) %*% cbind(1, c(.5,-1,.5), -1:1)
+bet <- outer(1:8, c(tear = 2, gloss = 5, opacity = 20))
+Y <- X %*% bet + E
+
+fit <- manova(Y ~ rate * additive)
+## For consistency checking, one of the univariate models:
+flm <- lm(Y[,"tear"] ~ rate * additive)
+dclm <- lapply(dummy.coef(flm), drop); names(dclm[[1]]) <- "tear"
+
+op <- options(digits = 3, width = 88)
+(cf <- coef(fit))
+(dcf <- dummy.coef(fit))
+options(op)
+stopifnot(all.equal(coef(flm), cf[,"tear"]),
+          all.equal(dclm,
+                    lapply(dcf, function(cc)
+                        if(is.matrix(cc)) cc["tear",] else cc["tear"])),
+          identical(lengths(dcf),
+                    c("(Intercept)" = 3L, "rate" = 6L,
+                      "additive" = 12L, "rate:additive" = 24L)),
+          identical(sapply(dcf[-1], dim),
+                    cbind(rate = 3:2, additive = 3:4,
+                          `rate:additive` = c(3L, 8L))))
+## dummy.coef() were missing coefficients in R <= 3.2.3
+proc.time() - .pt; .pt <- proc.time()
+
+
+## format.POSIXlt() with modified 'zone' or length-2 format
+f0 <- "2016-01-28 01:23:45"; tz0 <- "Europe/Stockholm"
+d2 <- d1 <- rep(as.POSIXlt(f0, tz = tz0), 2)
+(f1 <- format(d1, usetz=TRUE))
+identical(f1, rep(paste(f0, "CET"), 2))# often TRUE (but too platform dependent)
+d2$zone <- d1$zone[1] # length 1 instead of 2
+f2 <- format(d2, usetz=TRUE)## -> segfault
+f1.2 <- format(as.POSIXlt("2016-01-28 01:23:45"), format=c("%d", "%y"))# segfault
+stopifnot(identical(f2, rep(paste(f0,  tz0 ), 2)),
+	  identical(f1.2, c("28", "16")))
+tims <- seq.POSIXt(as.POSIXct("2016-01-01"),
+		   as.POSIXct("2017-11-11"), by = as.difftime(pi, units="weeks"))
+form <- c("%m/%d/%y %H:%M:%S", "", "%Y-%m-%d %H:%M:%S")
+op <- options(warn = 2)# no warnings allowed
+head(rf1 <- format(tims, form)) # recycling was wrong
+head(rf2 <- format(tims, form[c(2,1,3)]))
+stopifnot(identical(rf1[1:3], c("01/01/16 00:00:00", "2016-01-22 23:47:15",
+				"2016-02-13 23:34:30")),
+	  identical(rf2[1:3], c("2016-01-01 00:00:00", "01/22/16 23:47:15",
+				rf1[3])),
+	  nchar(rf1) == rep(c(17,19,19), length = length(rf1)),
+	  nchar(rf2) == rep(c(19,17,19), length = length(rf2)))
+options(op)
+## Wrong-length 'zone' or short 'x' segfaulted -- PR#16685
+## Default 'format' setting sometimes failed for length(format) > 1
+
+
+## saveRDS(*, compress= .)
+opts <- setNames(,c("bzip2", "xz", "gzip"))
+fil <- tempfile(paste0("xx", 1:6, "_"), fileext = ".rds")
+names(fil) <- c("default", opts, FALSE,TRUE)
+xx <- 1:11
+saveRDS(xx, fil["default"])
+saveRDS(xx, fil[opts[1]], compress = opts[1])
+saveRDS(xx, fil[opts[2]], compress = opts[2])
+saveRDS(xx, fil[opts[3]], compress = opts[3])
+saveRDS(xx, fil["FALSE"], compress = FALSE)
+saveRDS(xx, fil["TRUE" ], compress = TRUE)
+f.raw <- lapply(fil, readBin, what = "raw", n = 100)
+lengths(f.raw) # 'gzip' is best in this case
+for(i in 1:6) stopifnot(identical(xx, readRDS(fil[i])))
+eMsg <- tryCatch(saveRDS(xx, tempfile(), compress = "Gzip"),
+                 error = function(e) e$message)
+stopifnot(
+    grepl("'compress'.*Gzip", eMsg), # had ".. not interpretable as logical"
+    identical(f.raw[["default"]], f.raw[["TRUE"]]),
+    identical(f.raw[["default"]], f.raw[[opts["gzip"]]]))
+## compress = "gzip" failed (PR#16653), but compress = c(a = "xz") did too
+
+
+## recursive dendrogram methods and deeply nested dendrograms
+op <- options(expressions = 999)# , verbose = 2) # -> max. depth= 961
+set.seed(11); d <- mkDend(1500, "A", method="single")
+rd <- reorder(d, nobs(d):1)
+## Error: evaluation nested too deeply: infinite recursion .. in R <= 3.2.3
+stopifnot(is.leaf(r1 <- rd[[1]]),    is.leaf(r2 <- rd[[2:1]]),
+	  attr(r1, "label") == "A1458", attr(r2, "label") == "A1317")
+options(op)# revert
+
+
+## cor.test() with extremely small p values
+b <- 1:10; set.seed(1)
+for(n in 1:256) {
+    a <- round(jitter(b, f = 1/8), 3)
+    p1 <- cor.test(a, b)$ p.value
+    p2 <- cor.test(a,-b)$ p.value
+    stopifnot(abs(p1 - p2) < 8e-16 * (p1+p2))
+    ## on two different Linuxen, they actually are always equal
+}
+## were slightly off in R <= 3.2.3. PR#16704
+
+
+## smooth(*, do.ends=TRUE)
+y <- c(4,2,2,3,10,5:7,7:6)
+stopifnot(
+    identical(c(smooth(y, "3RSR" , do.ends=TRUE, endrule="copy")),
+              c(4, 2, 2, 3, 5, 6, 6, 7, 7, 6) -> sy.c),
+    identical(c(smooth(y, "3RSS" , do.ends=TRUE, endrule="copy")), sy.c),
+    identical(c(smooth(y, "3RS3R", do.ends=TRUE, endrule="copy")), sy.c),
+    identical(c(smooth(y, "3RSR" , do.ends=FALSE, endrule="copy")),
+              c(4, 4, 4, 4, 5, 6, 6, 6, 6, 6)),
+    identical(c(smooth(y, "3RSS" , do.ends=FALSE, endrule="copy")),
+              c(4, 4, 2, 3, 5, 6, 6, 6, 6, 6)),
+    identical(c(smooth(y, "3RS3R", do.ends=FALSE, endrule="copy")),
+              c(4, 4, 3, 3, 5, 6, 6, 6, 6, 6)))
+## do.ends=TRUE was not obeyed for the "3RS*" kinds, for 3.0.0 <= R <= 3.2.3
+proc.time() - .pt; .pt <- proc.time()
+
+
+## prettyDate() for subsecond ranges
+##' checking pretty():
+chkPretty <- function(x, n = 5, min.n = NULL, ..., max.D = 1) {
+    if(is.null(min.n)) {
+	## work with both pretty.default() and greDevices::prettyDate()
+	## *AND* these have a different default for 'min.n' we must be "extra smart":
+	min.n <-
+	    if(inherits(x, "Date") || inherits(x, "POSIXt"))
+		n %/% 2 # grDevices:::prettyDate
+	    else
+		n %/% 3 # pretty.default
+    }
+    pr <- pretty(x, n=n, min.n=min.n, ...)
+    ## if debugging: pr <- grDevices:::prettyDate(x, n=n, min.n=min.n, ...)
+    stopifnot(length(pr) >= (min.n+1),
+	      ## pretty(x, *) must cover range of x:
+	      min(pr) <= min(x), max(x) <= max(pr))
+    if((D <- abs(length(pr) - (n+1))) > max.D)
+	stop("| |pretty(.)| - (n+1) | = ", D, " > max.D = ", max.D)
+    ## is it equidistant [may need fuzz, i.e., signif(.) ?]:
+    eqD <- length(pr) == 1 || length(udp <- unique(dp <- diff(pr))) == 1
+    ## may well FALSE (differing number days in months; leap years, leap seconds)
+    if(!eqD) {
+        if(inherits(dp, "difftime") && units(dp) %in% c("days")# <- more ??
+           )
+            attr(pr, "chkPr") <- "not equidistant"
+        else
+            stop("non equidistant: has ", length(udp)," unique differences")
+    }
+    invisible(pr)
+}
+sTime <- structure(1455056860.75, class = c("POSIXct", "POSIXt"))
+for(n in c(1:16, 30:32, 41, 50, 60)) # (not for much larger n, (TODO ?))
+    chkPretty(sTime, n=n)
+set.seed(7)
+for(n in c(1:7, 12)) replicate(32, chkPretty(sTime + .001*rlnorm(1) * 0:9, n = n))
+## failed in R <= 3.2.3
+seqD  <- function(d1,d2) seq.Date(as.Date(d1), as.Date(d2), by = "1 day")
+seqDp <- function(d1,d2) { s <- seqD(d1,d2); structure(s, labels=format(s,"%b %d")) }
+time2d <- function(i) sprintf("%02d", i %% 60)
+MTbd <- as.Date("1960-02-10")
+(p1   <- chkPretty(MTbd))
+stopifnot(
+    identical(p1, seqDp("1960-02-08", "1960-02-13")) ,
+    identical(attr(p1, "labels"), paste("Feb", time2d(8:13))),
+    identical(chkPretty(MTbd + rep(0,2)), p1) ,
+    identical(chkPretty(MTbd +  0:1), p1) ,
+    identical(chkPretty(MTbd + -1:1), p1) ,
+    identical(chkPretty(MTbd +  0:3), seqDp("1960-02-09", "1960-02-14")) )
+## all pretty() above gave length >= 5 answer (with duplicated values!) in R <= 3.2.3!
+## and length 1 or 2 instead of about 6 in R 3.2.4
+(p2 <- chkPretty(as.POSIXct("2002-02-02 02:02", tz = "GMT-1"), n = 5, min.n = 5))
+stopifnot(length(p2) >= 5+1,
+	  identical(p2, structure(1012611717 + (0:5), class = c("POSIXct", "POSIXt"),
+				  tzone = "GMT-1", labels = time2d(57 + (0:5)))))
+## failed in R 3.2.4
+(T3 <- structure(1460019857.25, class = c("POSIXct", "POSIXt")))# typical Sys.date()
+chkPretty(T3, 1) # error in svn 70438
+## "Data" from  example(pretty.Date) :
+steps <- setNames(,
+    c("10 secs", "1 min", "5 mins", "30 mins", "6 hours", "12 hours",
+      "1 DSTday", "2 weeks", "1 month", "6 months", "1 year",
+      "10 years", "50 years", "1000 years"))
+t02 <- as.POSIXct("2002-02-02 02:02")
+(at <- chkPretty(t02 + 0:1, n = 5, min.n = 3, max.D=2))
+xU <- as.POSIXct("2002-02-02 02:02", tz = "UTC")
+x5 <- as.POSIXct("2002-02-02 02:02", tz = "EST5EDT")
+atU <- chkPretty(seq(xU, by = "30 mins", length = 2), n = 5)
+at5 <- chkPretty(seq(x5, by = "30 mins", length = 2), n = 5)
+stopifnot(length(at) >= 4,
+	  identical(sort(names(aat <- attributes(at))), c("class", "labels", "tzone")),
+	  identical(aat$labels, time2d(59+ 0:3)),
+          identical(x5 - xU, structure(5, units = "hours", class = "difftime")),
+          identical(attr(at5, "labels"), attr(atU, "labels") -> lat),
+          identical(lat, paste("02", time2d(10* 0:4), sep=":"))
+)
+nns <- c(1:9, 15:17); names(nns) <- paste0("n=",nns)
+prSeq <- function(x, n, st, ...) pretty(seq(x, by = st, length = 2), n = n, ...)
+pps <- lapply(nns, function(n)
+	      lapply(steps, function(st) prSeq(x=t02, n=n, st=st)))
+Ls.ok <- list(
+    `10 secs`  = c("00", "02", "04", "06", "08", "10"),
+    `1 min`    = sprintf("%02d", 10*((0:6) %% 6)),
+    `5 mins`   = sprintf("02:%02d", 2:7),
+    `30 mins`  = sprintf("02:%02d", (0:4)*10),
+    `6 hours`  = sprintf("%02d:00", 2:9),
+    `12 hours` = sprintf("%02d:00", (0:5)*3),
+    `1 DSTday` = c("Feb 02 00:00", "Feb 02 06:00", "Feb 02 12:00",
+		   "Feb 02 18:00", "Feb 03 00:00", "Feb 03 06:00"),
+    `2 weeks`  = c("Jan 28", "Feb 04", "Feb 11", "Feb 18"),
+    `1 month`  = c("Jan 28", "Feb 04", "Feb 11", "Feb 18", "Feb 25", "Mar 04"),
+    `6 months` = c("Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep"),
+    `1 year`   = c("Jan", "Apr", "Jul", "Oct", "Jan", "Apr"),
+    `10 years` = as.character(2000 +   2*(1:7)),
+    `50 years` = as.character(2000 +  10*(0:6)),
+    `1000 years`= as.character(2000 + 200*(0:6)))
+stopifnot(identical(Ls.ok,
+		    lapply(pps[["n=5"]], attr, "label")))
+##
+chkSeq <- function(st, x, n, max.D = if(n <= 4) 1 else if(n <= 10) 2 else 3, ...)
+    tryCatch(chkPretty(seq(x, by = st, length = 2), n = n, max.D=max.D, ...),
+             error = conditionMessage)
+prSeq.errs <- function(tt, nset, tSteps) {
+    stopifnot(length(tt) == 1)
+    c.ps <- lapply(nset, function(n) lapply(tSteps, chkSeq, x = tt, n = n))
+    ## ensure that all are ok *but* some which did not match 'n' well enough:
+    cc.ps <- unlist(c.ps, recursive=FALSE)
+    ok <- vapply(cc.ps, inherits, NA, what = "POSIXt")
+    errs <- unlist(cc.ps[!ok])
+    stopifnot(startsWith(errs, prefix = "| |pretty(.)| - (n+1) |"))
+    list(ok = ok,
+	 Ds = as.numeric(sub(".*\\| = ([0-9]+) > max.*", "\\1", errs)))
+}
+r.t02 <- prSeq.errs(t02, nset = nns, tSteps = steps)
+table(r.t02 $ ok)
+table(r.t02 $ Ds -> Ds)
+## Currently   [may improve]
+##  3  4  5  6  7  8
+##  4 14  6  3  2  1
+## ... and ensure we only improve:
+stopifnot(length(Ds) <= 30, max(Ds) <= 8, sum(Ds) <= 138)
+## A Daylight saving time -- halfmonth combo:
+(tOz <- structure(c(1456837200, 1460728800), class = c("POSIXct", "POSIXt"),
+		tzone = "Australia/Sydney"))
+(pz <- pretty(tOz)) # failed in R 3.3.0, PR#16923
+stopifnot(length(pz) <= 6, # is 5
+          attr(dpz <- diff(pz), "units") == "days", sd(dpz) < 1.6)
+if(FALSE) { # save 0.4 sec
+    print(system.time(
+        r.tOz <- prSeq.errs(tOz[1], nset = nns, tSteps = steps)
+    ))
+    stopifnot(sum(r.tOz $ ok) >= 132,
+              max(r.tOz $ Ds -> DOz) <= 8, mean(DOz) < 4.5)
+}
+nn <- c(1:33,10*(4:9),100*(1+unique(sort(rpois(20,4)))))
+pzn <- lengths(lapply(nn, pretty, x=tOz))
+stopifnot(0.5 <= min(pzn/(nn+1)), max(pzn/(nn+1)) <= 1.5)
+proc.time() - .pt; .pt <- proc.time()
+
+
+
+stopifnot(c("round.Date", "round.POSIXt") %in% as.character(methods(round)))
+## round.POSIXt suppressed in R <= 3.2.x
+
+
+## approxfun(*, method="constant")
+Fn <- ecdf(1:5)
+t <- c(NaN, NA, 1:5)
+stopifnot(all.equal(Fn(t), t/5))
+## In R <= 3.2.3,  NaN values resulted in something like (n-1)/n.
+
+
+## tar() default (i.e. "no files") behaviour:
+dir.create(td <- tempfile("tar-experi"))
+setwd(td)
+dfil <- "base_Desc"
+file.copy(system.file("DESCRIPTION"), dfil)
+## tar w/o specified files
+tar("ex.tar")# all files, i.e. 'dfil'
+unlink(dfil)
+stopifnot(grepl(dfil, untar("ex.tar", list = TRUE)))
+untar("ex.tar")
+myF2 <- c(dfil, "ex.tar")
+stopifnot(identical(list.files(), myF2))
+unlink(myF2)
+## produced an empty tar file in R < 3.3.0, PR#16716
+
+
+## format.POSIXlt() of Jan.1 if  1941 or '42 is involved:
+tJan1 <- function(n1, n2)
+    strptime(paste0(n1:n2,"/01/01"), "%Y/%m/%d", tz="CET")
+wDSTJan1 <- function(n1, n2)
+    which("CEST" == sub(".* ", '', format(tJan1(n1,n2), usetz=TRUE)))
+(w8 <- wDSTJan1(1801, 2300))
+(w9 <- wDSTJan1(1901, 2300))
+stopifnot(identical(w8, 141:142),# exactly 1941:1942 had CEST on Jan.1
+          identical(w9,  41: 42))
+## for R-devel Jan.2016 to Mar.14 -- *AND* for R 3.2.4 -- the above gave
+## integer(0)  and  c(41:42, 99:100, ..., 389:390)  respectively
+
+
+## tsp<- did not remove mts class
+z <- ts(cbind(1:5,1:5))
+tsp(z) <- NULL
+stopifnot(identical(class(z), "matrix"))
+## kept "mts" in 3.2.4, PR#16769
+
+
+## as.hclust() and str() for deeply nested dendrograms
+op <- options(expressions = 300) # so problem triggers early
+d500 <- mkDend(500, 'x', 'single')
+sink(tempfile()); str(d500) ; sink()
+hc2 <- as.hclust(d500)
+options(op)
+## gave .. nested too deeply / node stack overflow / "C stack usage ..."
+## for R <= 3.3.z
+
+
+
+## keep at end
+rbind(last =  proc.time() - .pt,
+      total = proc.time())
diff --git a/tests/reg-tests-1d.R b/tests/reg-tests-1d.R
new file mode 100644
index 0000000..d460051
--- /dev/null
+++ b/tests/reg-tests-1d.R
@@ -0,0 +1,730 @@
+## Regression tests for R >= 3.4.0
+
+pdf("reg-tests-1d.pdf", encoding = "ISOLatin1.enc")
+.pt <- proc.time()
+
+## body() / formals() notably the replacement versions
+x <- NULL; tools::assertWarning(   body(x) <-    body(mean))	# to be error
+x <- NULL; tools::assertWarning(formals(x) <- formals(mean))	# to be error
+x <- NULL; tools::assertWarning(f <-    body(x)); stopifnot(is.null(f))
+x <- NULL; tools::assertWarning(f <- formals(x)); stopifnot(is.null(f))
+## these all silently coerced NULL to a function in R <= 3.2.x
+
+
+## match(x, t): fast algorithm for length-1 'x' -- PR#16885
+## a) string 'x'  when only encoding differs
+tmp <- "年付"
+tmp2 <- "\u5e74\u4ed8" ; Encoding(tmp2) <- "UTF-8"
+for(ex in list(c(tmp, tmp2), c("foo","foo"))) {
+    cat(sprintf("\n|%s|%s| :\n----------\n", ex[1], ex[2]))
+    for(enc in c("latin1", "UTF-8", "unknown")) { # , "MAC", "WINDOWS-1251"
+	cat(sprintf("%9s: ", enc))
+	tt <- ex[1]; Encoding(tt) <- enc; t2 <- ex[2]
+	if(identical(i1 <- (  tt       %in% t2),
+		     i2 <- (c(tt, "a") %in% t2)[1]))
+	    cat(i1,"\n")
+	else
+	    stop("differing: ", i1, ", ", i2)
+    }
+}
+##
+outerID <- function(x,y, ...) outer(x,y, Vectorize(identical,c("x","y")), ...)
+## b) complex 'x' with different kinds of NaN
+x0 <- c(0,1, NA_real_, NaN)
+z <- outer(x0,x0, complex, length.out=1L)
+z <- c(z[is.na(z)], # <- of length 4 * 4 - 2*2 = 12
+       as.complex(NaN), as.complex(0/0), # <- typically these two differ in bits
+       complex(real = NaN), complex(imaginary = NaN),
+       NA_complex_, complex(real = NA), complex(imaginary = NA))
+## 1..12 all differ, then
+symnum(outerID(z,z, FALSE,FALSE,FALSE,FALSE))# [14] differing from all on low level
+symnum(outerID(z,z))                         # [14] matches 2, 13,15
+(mz <- match(z, z)) # (checked with m1z below)
+zRI <- rbind(Re=Re(z), Im=Im(z)) # and see the pattern :
+print(cbind(format = format(z), t(zRI), mz), quote=FALSE)
+stopifnot(apply(zRI, 2, anyNA)) # NA *or* NaN: all TRUE
+is.NA <- function(.) is.na(.) & !is.nan(.)
+(iNaN <- apply(zRI, 2, function(.) any(is.nan(.))))
+(iNA <-  apply(zRI, 2, function(.) any(is.NA (.)))) # has non-NaN NA's
+## use iNA for consistency check once FIXME happened
+m1z <- sapply(z, match, table = z)
+stopifnot(identical(m1z, mz),
+	  identical(m1z == 1L,             iNA),
+          identical(match(z, NA, 0) == 1L, iNA),
+	  identical(mz[mz != 1L], c(2L, 4L, 9L, 10L, 12L, 2L, 2L, 2L, 9L)))
+## m1z uses match(x, *) with length(x) == 1 and failed in R 3.3.0
+set.seed(17)
+for(. in 1:20) {
+    zz <- sample(z)
+    stopifnot(identical(match(zz,zz), vapply(zz, match, -1L, table = zz)))
+}
+##
+## PR#16909 - a consequence of the match() bug; check here too:
+dvn <- paste0("var\xe9", 1:2); Encoding(dvn) <- "latin1"
+dv <- data.frame(1:3, 3); names(dv) <- dvn; dv[,"var\u00e92"] <- 2
+stopifnot(ncol(dv) == 2, dv[,2] == 2, identical(names(dv), dvn))
+## in R 3.3.0, got a 3rd column
+
+
+## deparse(<complex>,  "digits17")
+fz <- format(z <- c(outer(-1:2, 1i*(-1:1), `+`)))
+(fz0 <- sub("^ +","",z))
+r <- c(-1:1,100, 1e20); z2 <- c(outer(pi*r, 1i*r, `+`)); z2
+dz2 <- deparse(z2, control="digits17")
+stopifnot(identical(deparse(z, 200, control = "digits17"),
+                    paste0("c(", paste(fz0, collapse=", "), ")")),
+          print((sum(nchar(dz2)) - 2) / length(z2)) < 22, # much larger in <= 3.3.0
+          ## deparse <-> parse equivalence, 17 digits should be perfect:
+	  all.equal(z2, eval(parse(text = dz2)), tolerance = 3e-16)) # seen 2.2e-35 on 32b
+## deparse() for these was "ugly" in R <= 3.3.x
+
+
+## length(environment(.)) == #{objects}
+stopifnot(identical(length(      baseenv()),
+                    length(names(baseenv()))))
+## was 0 in R <= 3.3.0
+
+
+## "srcref"s of closures
+op <- options(keep.source = TRUE)# as in interactive use
+getOption("keep.source")
+stopifnot(identical(function(){}, function(){}),
+          identical(function(x){x+1},
+                    function(x){x+1})); options(op)
+## where all FALSE in 2.14.0 <= R <= 3.3.x because of "srcref"s etc
+
+
+## PR#16925, radix sorting INT_MAX w/ decreasing=TRUE and na.last=TRUE
+## failed ASAN check and segfaulted on some systems.
+data <- c(2147483645L, 2147483646L, 2147483647L, 2147483644L)
+stopifnot(identical(sort(data, decreasing = TRUE, method = "radix"),
+                    c(2147483647L, 2147483646L, 2147483645L, 2147483644L)))
+
+
+## as.factor(<named integer>)
+ni <- 1:2; Nni <- names(ni) <- c("A","B")
+stopifnot(identical(Nni, names(as.factor(ni))),
+	  identical(Nni, names(   factor(ni))),
+	  identical(Nni, names(   factor(ni+0))), # +0 : "double"
+	  identical(Nni, names(as.factor(ni+0))))
+## The first one lost names in  3.1.0 <= R <= 3.3.0
+
+
+## strtrim(<empty>, *) should work as substr(<empty>, *) does
+c0 <- character(0)
+stopifnot(identical(c0, strtrim(c0, integer(0))))
+## failed in R <= 3.3.0
+
+
+## Factors with duplicated levels {created via low-level code}:
+set.seed(11)
+f0 <- factor(sample.int(9, 20, replace=TRUE))
+(f <- structure(f0, "levels" = as.character(c(2:7, 2:4))))
+tools::assertWarning(print(f))
+tools::assertError(validObject(f))
+## no warning in print() for R <= 3.3.x
+
+
+## R <= 3.3.0 returned integer(0L) from unlist() in this case:
+stopifnot(identical(levels(unlist(list(factor(levels="a")))), "a"))
+
+
+## diff(<difftime>)
+d <- as.POSIXct("2016-06-08 14:21", tz="UTC") + as.difftime(2^(-2:8), units="mins")
+dd  <- diff(d)
+ddd <- diff(dd)
+d3d <- diff(ddd)
+d7d <- diff(d, differences = 7)
+(ldd <- list(dd=dd, ddd=ddd, d3d=d3d, d7d=d7d))
+stopifnot(identical(ddd, diff(d, differences = 2)),
+	  identical(d3d, diff(d, differences = 3)))
+stopifnot(vapply(ldd, units, "") == "secs",
+	  vapply(ldd, class, "") == "difftime",
+	  lengths(c(list(d), ldd)) == c(11:8, 11-7))
+## was losing time units in R <= 3.3.0
+
+
+## sample(NA_real_) etc
+for(xx in list(NA, NA_integer_, NA_real_, NA_character_, NA_complex_, "NA", 1i))
+    stopifnot(identical(xx, sample(xx)))
+## error in R <= 3.3.1
+
+
+## merge.data.frame with names matching order()'s arguments (PR#17119)
+nf <- names(formals(order))
+nf <- nf[nf != "..."]
+v1 <- c(1,3,2)
+v2 <- c(4,2,3)
+for(nm in nf)  {
+    cat(nm,":\n")
+    mdf <- merge(
+        as.data.frame(setNames(list(v1), nm=nm)),
+        as.data.frame(setNames(list(v2), nm=nm)), all = TRUE)
+    stopifnot(identical(mdf,
+                        as.data.frame(setNames(list(0+ 1:4), nm=nm))))
+}
+## some were wrong, others gave an error in R <= 3.3.1
+
+
+## PR#16936: table() dropping "NaN" level & 'exclude' sometimes failing
+op <- options(warn = 2)# no warnings allowed
+(fN1 <- factor(c("NA", NA, "NbN", "NaN")))
+(tN1 <- table(fN1)) ##--> was missing 'NaN'
+(fN <- factor(c(rep(c("A","B"), 2), NA), exclude = NULL))
+(tN  <- table(fN, exclude = "B"))       ## had extraneous "B"
+(tN. <- table(fN, exclude = c("B",NA))) ## had extraneous "B" and NA
+stopifnot(identical(c(tN1), c(`NA`=1L, `NaN`=1L, NbN=1L))
+        , identical(c(tN),  structure(2:1, .Names = c("A", NA)))
+        , identical(c(tN.), structure(2L,  .Names = "A"))
+)
+## both failed in R <= 3.3.1
+stopifnot(identical(names(dimnames(table(data.frame(Titanic[2,2,,])))),
+		    c("Age", "Survived", "Freq"))) # was wrong for ~ 32 hours
+##
+## Part II:
+x <- factor(c(1, 2, NA, NA), exclude = NULL) ; is.na(x)[2] <- TRUE
+x # << two "different" NA's (in codes | w/ level) looking the same in print()
+stopifnot(identical(x, structure(as.integer(c(1, NA, 3, 3)),
+				 .Label = c("1", "2", NA), class = "factor")))
+(txx <- table(x, exclude = NULL))
+stopifnot(identical(txx, table(x, useNA = "ifany")),
+	  identical(as.vector(txx), c(1:0, 3L)))
+## wrongly gave  1 0 2  for R versions  2.8.0 <= Rver <= 3.3.1
+u.opt <- list(no="no", ifa = "ifany", alw = "always")
+l0 <- c(list(`_` = table(x)),
+           lapply(u.opt, function(use) table(x, useNA=use)))
+xcl <- list(NULL=NULL, none=""[0], "NA"=NA, NANaN = c(NA,NaN))
+options(op) # warnings ok:
+lt <- lapply(xcl, function(X)
+    c(list(`_` = table(x, exclude=X)), #--> 4 warnings from (exclude, useNA):
+      lapply(u.opt, function(use) table(x, exclude=X, useNA=use))))
+(y <- factor(c(4,5,6:5)))
+ly <-  lapply(xcl, function(X)
+    c(list(`_` = table(y, exclude=X)), #--> 4 warnings ...
+      lapply(u.opt, function(use) table(y, exclude=X, useNA=use))))
+lxy <-  lapply(xcl, function(X)
+    c(list(`_` = table(x, y, exclude=X)), #--> 4 warnings ...
+      lapply(u.opt, function(use) table(x, y, exclude=X, useNA=use))))
+op <- options(warn = 2)# no warnings allowed
+
+stopifnot(
+    vapply(lt, function(i) all(vapply(i, class, "") == "table"), NA),
+    vapply(ly, function(i) all(vapply(i, class, "") == "table"), NA),
+    vapply(lxy,function(i) all(vapply(i, class, "") == "table"), NA)
+    , identical((ltNA  <- lt [["NA"  ]]), lt [["NANaN"]])
+    , identical((ltNl  <- lt [["NULL"]]), lt [["none" ]])
+    , identical((lyNA  <- ly [["NA"  ]]), ly [["NANaN"]])
+    , identical((lyNl  <- ly [["NULL"]]), ly [["none" ]])
+    , identical((lxyNA <- lxy[["NA"  ]]), lxy[["NANaN"]])
+    , identical((lxyNl <- lxy[["NULL"]]), lxy[["none" ]])
+)
+## 'NULL' behaved special (2.8.0 <= R <= 3.3.1)  and
+##  *all* tables in l0 and lt were == (1 0 2) !
+ltN1 <- ltNA[[1]]; lyN1 <- lyNA[[1]]; lxyN1 <- lxyNA[[1]]
+lNl1 <- ltNl[[1]]; lyl1 <- lyNl[[1]]; lxyl1 <- lxyNl[[1]]
+
+stopifnot(
+    vapply(names(ltNA) [-1], function(n) identical(ltNA [[n]], ltN1 ), NA),
+    vapply(names(lyNA) [-1], function(n) identical(lyNA [[n]], lyN1 ), NA),
+    vapply(names(lxyNA)[-1], function(n) identical(lxyNA[[n]], lxyN1), NA),
+    identical(lyN1, lyl1),
+    identical(2L, dim(ltN1)), identical(3L, dim(lyN1)),
+    identical(3L, dim(lNl1)),
+    identical(dimnames(ltN1), list(x = c("1","2"))),
+    identical(dimnames(lNl1), list(x = c("1","2", NA))),
+    identical(dimnames(lyN1), list(y = paste(4:6))),
+    identical(  1:0    , as.vector(ltN1)),
+    identical(c(1:0,3L), as.vector(lNl1)),
+    identical(c(1:2,1L), as.vector(lyN1))
+    , identical(c(1L, rep(0L, 5)), as.vector(lxyN1))
+    , identical(dimnames(lxyN1), c(dimnames(ltN1), dimnames(lyN1)))
+    , identical(c(1L,1:0), as.vector(table(3:1, exclude=1, useNA = "always")))
+    , identical(c(1L,1L ), as.vector(table(3:1, exclude=1)))
+)
+
+x3N <- c(1:3,NA)
+(tt <- table(x3N, exclude=NaN))
+stopifnot(tt == 1, length(nt <- names(tt)) == 4, is.na(nt[4])
+	, identical(tt, table(x3N, useNA = "ifany"))
+	, identical(tt, table(x3N, exclude = integer(0)))
+	, identical(t3N <- table(x3N), table(x3N, useNA="no"))
+	, identical(c(t3N), setNames(rep(1L, 3), as.character(1:3)))
+	##
+	, identical(c("2" = 1L), c(table(1:2, exclude=1) -> t12.1))
+	, identical(t12.1, table(1:2, exclude=1, useNA= "no"))
+	, identical(t12.1, table(1:2, exclude=1, useNA= "ifany"))
+	, identical(structure(1:0, .Names = c("2", NA)),
+		    c(     table(1:2, exclude=1, useNA= "always")))
+)
+options(op) # (revert to default)
+
+
+## contour() did not check args sufficiently
+tryCatch(contour(matrix(rnorm(100), 10, 10), levels = 0, labels = numeric()),
+         error = function(e) e$message)
+## caused segfault in R 3.3.1 and earlier
+
+
+## unique.warnings() needs better duplicated():
+.tmp <- lapply(list(0, 1, 0:1, 1:2, c(1,1), -1:1), function(x) wilcox.test(x))
+stopifnot(length(uw <- unique(warnings())) == 2)
+## unique() gave only one warning in  R <= 3.3.1
+
+
+op <- options(warn = 2)# no warnings allowed
+
+## findInterval(x, vec)  when 'vec' is of length zero
+n0 <- numeric(); TF <- c(TRUE, FALSE)
+stopifnot(0 == unlist(lapply(TF, function(L1)
+    lapply(TF, function(L2) lapply(TF, function(L3)
+        findInterval(x=8:9, vec=n0, L1, L2, L3))))))
+## did return -1's for all.inside=TRUE  in R <= 3.3.1
+
+
+## droplevels(<factor with NA-level>)
+L3 <- c("A","B","C")
+f <- d <- factor(rep(L3, 2), levels = c(L3, "XX")); is.na(d) <- 3:4
+(dn <- addNA(d)) ## levels: A B C XX <NA>
+stopifnot(identical(levels(print(droplevels(dn))), c(L3, NA))
+	  ## only XX must be dropped; R <= 3.3.1 also dropped <NA>
+	  , identical(levels(droplevels(f)), L3)
+	  , identical(levels(droplevels(d)), L3) # do *not* add <NA> here
+	  , identical(droplevels(d ), d [, drop=TRUE])
+	  , identical(droplevels(f ), f [, drop=TRUE])
+	  , identical(droplevels(dn), dn[, drop=TRUE])
+	  )
+
+
+## summary.default() no longer rounds (just its print() method does):
+set.seed(0)
+replicate(256, { x <- rnorm(1); stopifnot(summary(x) == x)}) -> .t
+replicate(256, { x <- rnorm(2+rpois(1,pi))
+    stopifnot(min(x) <= (sx <- summary(x)), sx <= max(x))}) -> .t
+## was almost always wrong in R <= 3.3.x
+
+
+## NULL in integer arithmetic
+i0 <- integer(0)
+stopifnot(identical(1L + NULL, 1L + integer()),
+	  identical(2L * NULL, i0),
+	  identical(3L - NULL, i0))
+## gave double() in R <= 3.3.x
+
+
+## factor(x, exclude)  when  'x' or 'exclude' are  character -------
+stopifnot(identical(factor(c(1:2, NA), exclude = ""),
+		    factor(c(1:2, NA), exclude = NULL) -> f12N))
+fab <- factor(factor(c("a","b","c")), exclude = "c")
+stopifnot(identical(levels(fab), c("a","b")))
+faN <- factor(c("a", NA), exclude=NULL)
+stopifnot(identical(faN, factor(faN, exclude="c")))
+## differently with NA coercion warnings in R <= 3.3.x
+
+## factor(x, exclude = X) - coercing 'exclude' or not
+## From r-help/2005-April/069053.html :
+fNA <- factor(as.integer(c(1,2,3,3,NA)), exclude = NaN)
+stopifnot(identical(levels(fNA), c("1", "2", "3", NA)))
+## did exclude NA wrongly in R <= 3.3.x
+## Now when 'exclude' is a factor,
+cc <- c("x", "y", "NA")
+ff <- factor(cc)
+f2 <- factor(ff, exclude = ff[3]) # it *is* used
+stopifnot(identical(levels(f2), cc[1:2]))
+## levels(f2) still contained NA in R <= 3.3.x
+
+
+## arithmetic, logic, and comparison (relop) for 0-extent arrays
+(m <- cbind(a=1[0], b=2[0]))
+Lm <- m; storage.mode(Lm) <- "logical"
+Im <- m; storage.mode(Im) <- "integer"
+stopifnot(
+    identical( m, m + 1 ), identical( m,  m + 1 [0]), identical( m,  m + NULL),
+    identical(Im, Im+ 1L), identical(Im, Im + 1L[0]), identical(Im, Im + NULL),
+    identical(m, m + 2:3), identical(Im, Im + 2:3),
+    identical(Lm, m & 1),  identical(Lm,  m | 2:3),
+    identical(Lm, m & TRUE[0]), identical(Lm, Lm | FALSE[0]),
+    identical(Lm, m & NULL), # gave Error (*only* place where NULL was not allowed)
+    identical(Lm, m > 1), identical(Lm, m > .1[0]), identical(Lm, m > NULL),
+    identical(Lm, m <= 2:3)
+)
+mm <- m[,c(1:2,2:1,2)]
+tools::assertError(m + mm) # ... non-conformable arrays
+tools::assertError(m | mm) # ... non-conformable arrays
+tools::assertError(m == mm)# ... non-conformable arrays
+## in R <= 3.3.x, relop returned logical(0) and  m + 2:3  returned numeric(0)
+
+## arithmetic, logic, and comparison (relop) -- inconsistency for 1x1 array o <vector >= 2>:
+(m1 <- matrix(1,1,1, dimnames=list("Ro","col")))
+(m2 <- matrix(1,2,1, dimnames=list(c("A","B"),"col")))
+if(FALSE) { # in the future (~ 2018):
+tools::assertError(m1  + 1:2) ## was [1] 2 3  even w/o warning in R <= 3.3.x
+} else tools::assertWarning(m1v <- m1 + 1:2); stopifnot(identical(m1v, 1+1:2))
+tools::assertError(m1  & 1:2) # ERR: dims [product 1] do not match the length of object [2]
+tools::assertError(m1 <= 1:2) # ERR:                  (ditto)
+##
+## non-0-length arrays combined with {NULL or double() or ...} *fail*
+n0 <- numeric(0)
+l0 <- logical(0)
+stopifnot(identical(m1 + NULL, n0), # as "always"
+	  identical(m1 +  n0 , n0), # as "always"
+	  identical(m1 & NULL, l0), # ERROR in R <= 3.3.x
+	  identical(m1 &  l0,  l0), # ERROR in R <= 3.3.x
+	  identical(m1 > NULL, l0), # as "always"
+	  identical(m1 >  n0 , l0)) # as "always"
+## m2 was slightly different:
+stopifnot(identical(m2 + NULL, n0), # ERROR in R <= 3.3.x
+	  identical(m2 +  n0 , n0), # ERROR in R <= 3.3.x
+	  identical(m2 & NULL, l0), # ERROR in R <= 3.3.x
+	  identical(m2 &  l0 , l0), # ERROR in R <= 3.3.x
+	  identical(m2 == NULL, l0), # as "always"
+	  identical(m2 ==  n0 , l0)) # as "always"
+
+
+## strcapture()
+stopifnot(identical(strcapture("(.+) (.+)",
+                               c("One 1", "noSpaceInLine", "Three 3"),
+                               proto=data.frame(Name="", Number=0)),
+                    data.frame(Name=c("One", NA, "Three"),
+                               Number=c(1, NA, 3))))
+
+
+## PR#17160: min() / max()  arg.list starting with empty character
+TFT <- 1:3 %% 2 == 1
+stopifnot(
+    identical(min(character(), TFT), "0"),
+    identical(max(character(), TFT), "1"),
+    identical(max(character(), 3:2, 5:7, 3:0), "7"),
+    identical(min(character(), 3:2, 5:7), "2"),
+    identical(min(character(), 3.3, -1:2), "-1"),
+    identical(max(character(), 3.3, 4:0), "4"))
+## all gave NA in R <= 3.3.0
+
+
+## PR#17147: xtabs(~ exclude) fails in R <= 3.3.1
+exc <- exclude <- c(TRUE, FALSE)
+xt1 <- xtabs(~ exclude) # failed : The name 'exclude' was special
+xt2 <- xtabs(~ exc)
+xt3 <- xtabs(rep(1, length(exclude)) ~ exclude)
+noCall  <- function(x) structure(x, call = NULL)
+stripXT <- function(x) structure(x, call = NULL, dimnames = unname(dimnames(x)))
+stopifnot(
+    identical(dimnames(xt1), list(exclude = c("FALSE", "TRUE"))),
+    identical(names(dimnames(xt2)), "exc"),
+    all.equal(stripXT(xt1), stripXT(xt2)),
+    all.equal(noCall (xt1), noCall (xt3)))
+## [fix was to call table() directly instead of via do.call(.)]
+
+
+## str(xtabs( ~ <var>)):
+stopifnot(grepl("'xtabs' int", capture.output(str(xt2))[1]))
+## did not mention "xtabs" in R <= 3.3.1
+
+
+## findInterval(x_with_ties, vec, left.open=TRUE)
+stopifnot(identical(
+    findInterval(c(6,1,1), c(0,1,3,5,7), left.open=TRUE), c(4L, 1L, 1L)))
+set.seed(4)
+invisible(replicate(100, {
+ vec <- cumsum(1 + rpois(6, 2))
+ x <- rpois(50, 3) + 0.5 * rbinom(50, 1, 1/4)
+ i <- findInterval(x, vec, left.open = TRUE)
+ .v. <- c(-Inf, vec, Inf)
+ isIn <-  .v.[i+1] < x  &  x <= .v.[i+2]
+ if(! all(isIn)) {
+     dump(c("x", "vec"), file=stdout())
+     stop("not ok at ", paste(which(!isIn), collapse=", "))
+ }
+}))
+## failed in R <= 3.3.1
+
+
+## PR#17132 -- grepRaw(*, fixed = TRUE)
+stopifnot(
+    identical(1L,        grepRaw("abcd",     "abcd",           fixed = TRUE)),
+    identical(integer(), grepRaw("abcdefghi", "a", all = TRUE, fixed = TRUE)))
+## length 0 and seg.faulted in R <= 3.3.2
+
+
+## PR#17186 - Sys.timezone() on some Debian-derived platforms
+(S.t <- Sys.timezone())
+if(is.na(S.t) || !nzchar(S.t)) stop("could not get timezone")
+## has been NA_character_  in Ubuntu 14.04.5 LTS
+
+
+## format()ing invalid hand-constructed  POSIXlt  objects
+d <- as.POSIXlt("2016-12-06"); d$zone <- 1
+tools::assertError(format(d))
+d$zone <- NULL
+stopifnot(identical(format(d),"2016-12-06"))
+d$zone <- "CET" # = previous, but 'zone' now is last
+tools::assertError(format(d))
+dlt <- structure(
+    list(sec = 52, min = 59L, hour = 18L, mday = 6L, mon = 11L, year = 116L,
+         wday = 2L, yday = 340L, isdst = 0L, zone = "CET", gmtoff = 3600L),
+    class = c("POSIXlt", "POSIXt"), tzone = c("", "CET", "CEST"))
+dlt$sec <- 10000 + 1:10 # almost three hours & uses re-cycling ..
+fd <- format(dlt)
+stopifnot(length(fd) == 10, identical(fd, format(dct <- as.POSIXct(dlt))))
+dlt2 <- as.POSIXlt(dct)
+stopifnot(identical(format(dlt2), fd))
+## The two assertError()s gave a seg.fault in  R <= 3.3.2
+
+
+stopifnot(inherits(methods("("), "MethodsFunction"),
+          inherits(methods("{"), "MethodsFunction"))
+## methods("(") and ..("{")  failed in R <= 3.3.2
+
+
+## moved after commit in r71778
+f <- eval(parse(text = "function() { x <- 1 ; for(i in 1:10) { i <- i }}",
+                keep.source = TRUE))
+g <- removeSource(f)
+stopifnot(is.null(attributes(body(g)[[3L]][[4L]])))
+
+## pmin/pmax of ordered factors -- broken in R 3.3.2  [PR #17195]
+of <- ordered(c(1,5,6))
+set.seed(7); rof <- sample(of, 12, replace=TRUE)
+stopifnot(identical(pmax(rof, of), ordered(pmax(c(rof), c(of)), labels=levels(rof)) -> pmar),
+	  identical(pmax(of, rof), pmar),
+	  identical(pmin(rof, of), ordered(pmin(c(rof), c(of)), labels=levels(rof)) -> pmir),
+	  identical(pmin(of, rof), pmir),
+	  identical(pmin(rof, 5), ordered(pmin(c(rof), 2), levels=1:3, labels=levels(rof))),
+	  identical(pmax(rof, 6), ordered(pmax(c(rof), 3), levels=1:3, labels=levels(rof))),
+	  identical(pmax(rof, 1), rof),
+	  identical(pmin(rof, 6), rof),
+	  identical(pmax(of, 5, rof), ordered(pmax(c(of),2L,c(rof)), levels=1:3,
+                                              labels=levels(of)))
+	  )
+## these were "always" true .. but may change (FIXME ?)
+stopifnot(
+    identical(of,   pmin(of, 3)) # what? error? at least warning?
+    ,
+    identical(pmar, pmax(of, 3, rof))
+)
+## pmin/pmax() of 0-length S3 classed  [PR #17200]
+for(ob0 in list(I(character()), I(0[0]), I(0L[0]),
+                structure(logical(), class="L"),
+                structure(character(), class="CH"))) {
+    stopifnot(identical(ob0, pmax(ob0, ob0)),
+              identical(ob0, pmin(ob0, ob0)),
+              identical(ob0, pmin(ob0, "")),
+              identical(ob0, pmax(ob0, "")))
+}
+## pmin()/pmax() of matching numeric data frames
+mUSJ <- data.matrix(dUSJ <- USJudgeRatings)
+stopifnot(
+    identical(              pmin(dUSJ, 10 - dUSJ),
+              as.data.frame(pmin(mUSJ, 10 - mUSJ))),
+    identical(              pmax(dUSJ, 10 - dUSJ),
+              as.data.frame(pmax(mUSJ, 10 - mUSJ))))
+## had failed for a while.   Note however :
+d1 <- data.frame(y0 = 0:3 +1/2) ; (d1.2 <- d1[1:2, , drop=FALSE])
+stopifnot(## FIXME: The 'NA's really are wrong
+    identical(pmax(d1,2),     data.frame(y0 = c(2, NA, 2.5, 3.5)))
+   ,
+    identical(pmax(d1, 3-d1), data.frame(y0 = .5+c(2, 1:3)))
+   ,
+    identical(pmax(d1.2, 2),  data.frame(y0 = c(2, NA)))
+   ,
+    identical(pmax(d1.2, 2-d1.2),data.frame(y0=c(1.5,1.5)))
+   ,
+    identical(pmin(d1, 2),    data.frame(y0 = c(.5+0:1, NA,NA)))
+   ,
+    identical(pmin(d1, 3-d1), data.frame(y0 = .5+c(0, 1:-1)))
+   ,
+    identical(pmin(d1.2, 2),  data.frame(y0 = c(.5, 1.5)))
+   ,
+    identical(pmin(d1.2, 2-d1.2),data.frame(y0 = c(.5,.5)))
+)
+## some CRAN pkgs have been relying that these at least "worked somehow"
+
+
+## quantile(x, prob) monotonicity in prob[] - PR#16672
+sortedQ <- function(x, prob, ...)
+    vapply(1:9, function(type)
+        !is.unsorted(quantile(x, prob, type=type, names=FALSE, ...)), NA)
+xN <- c(NA, 10.5999999999999996, NA, NA, NA, 10.5999999999999996,
+        NA, NA, NA, NA, NA, 11.3000000000000007, NA, NA,
+        NA, NA, NA, NA, NA, 5.2000000000000002)
+sQ.xN <- sortedQ(xN, probs = seq(0,1,1/10), na.rm = TRUE)
+x2 <- rep(-0.00090419678460984, 602)
+stopifnot(sQ.xN, sortedQ(x2, (0:5)/5))
+## both not fulfilled in R < 3.4.0
+
+
+## seq.int() anomalies in border cases, partly from Mick Jordan (on R-devel):
+stopifnot(
+    identical(1,         seq.int(to=1,  by=1 )),
+    identical(1:2,       seq.int(to=2L, by=1L)),
+    identical(c(1L, 3L), seq.int(1L, 3L, length.out=2))
+)
+## the first was missing(.), the others "double" in R < 3.4.0
+tools::assertError(seq(1,7, by = 1:2))# gave warnings in R < 3.4.0
+## seq() for <complex> / <integer>
+stopifnot(all.equal(seq(1+1i, 9+2i, length.out = 9) -> sCplx,
+                    1:9 + 1i*seq(1,2, by=1/8)),
+          identical(seq(1+1i, 9+2i, along.with = 1:9), sCplx),
+          identical(seq(1L, 3L, by=1L), 1:3)
+)
+## had failed in R-devel for a few days
+D1 <- as.Date("2017-01-06")
+D2 <- as.Date("2017-01-12")
+seqD1 <- seq.Date(D1, D2, by = "1 day")
+stopifnot(identical(seqD1, seq(D1, D2, by = "1 days")),
+## These two work "accidentally" via seq -> seq.default + "Date"-arithmetic
+          identical(seqD1, seq(by = 1, from = D1, length.out = 7)),
+          identical(seqD1, seq(by = 1,   to = D2, length.out = 7))
+## swap order of (by, to) ==> *FAILS* because directly calls seq.Date() - FIXME?
+        , TRUE ||
+          identical(seqD1, seq(to = D2,  by = 1, length.out = 7))
+          )
+## had failed in R-devel for a couple of days
+stopifnot(identical(seq(9L, by = -1L, length.out = 4L), 9:6),
+	  identical(seq(9L, by = -1L, length.out = 4 ), 9:6))
+## for consistency, new in R >= 3.4.0
+
+
+## Underflow happened when parsing small hex constants PR#17199
+stopifnot(
+    as.double("0x1.00000000d0000p-987") > 0,   # should be 7.645296e-298
+    as.double("0x1.0000000000000p-1022") > 0,  # should be 2.225074e-308
+    as.double("0x1.f89fc1a6f6613p-974") > 0    # should be 1.23456e-293
+)
+##
+
+
+## format.POSIX[cl]t() after print.POSIXct()
+dt <- "2012-12-12 12:12:12"
+x <- as.POSIXct(dt, tz = "GMT")
+stopifnot(identical(format(x), dt))
+(Sys.t <- Sys.timezone())
+someCET <- paste("Europe", c("Berlin", "Brussels", "Copenhagen", "Madrid",
+                             "Paris", "Rome", "Vienna", "Zurich"), sep="/")
+if(Sys.t %in% someCET)
+    stopifnot(print(TRUE), identical(format(x, tz = ""), "2012-12-12 13:12:12"))
+## had failed for almost a month in R-devel & R-patched
+
+
+## xtabs() , notably with NA's :
+asArr <- function(x) {
+    attributes(x) <- list(dim=dim(x), dimnames=dimnames(x)); x }
+as_A <- function(x, A) array(x, dim=dim(A), dimnames=dimnames(A))
+eq_A <- function(a,b) ## equality of arrays, notably sparseMatrix vs dense
+    identical(dim(a),dim(b)) && identical(dimnames(a),dimnames(b)) &&
+        identical(as.vector(a), as.vector(b))
+esoph2 <- droplevels(subset(esoph, subset = tobgp > "10-19" & alcgp >= "40-79"))
+(xt <- xtabs(~ agegp + alcgp + tobgp, esoph2))
+stopifnot(identical(dim(xt), c(6L, 3L, 2L)), # of the 6 x 3 x 2 = 36 entries,
+          identical(which(xt == 0), c(7L, 12L, 18L, 23L, 30L, 32L, 36L)),
+          ## the above 8 are zeros and the rest is 1 :
+          all(xt[xt != 0] == 1))
+xtC <- xtabs(ncontrols ~ agegp + alcgp + tobgp, data = esoph2)
+stopifnot(# no NA's in data, hence result should have none, just 0's:
+    identical(asArr(unname(xtC)),
+	      array(c(4, 14, 15, 17, 9, 3,   0, 2, 5, 6, 3, 0,	 1, 4, 3, 3, 1, 0,
+		      7,  8,  7,  6, 0, 1,   2, 1, 4, 4, 1, 0,	 2, 0, 4, 6, 1, 0),
+		    dim = dim(xt))))
+
+DF <- as.data.frame(UCBAdmissions)
+xt <- xtabs(Freq ~ Gender + Admit, DF)
+stopifnot(identical(asArr(xt),
+		    array(c(1198, 557, 1493, 1278), dim = c(2L, 2L),
+			  dimnames = list(Gender = c("Male", "Female"),
+					  Admit = c("Admitted", "Rejected")))))
+options(na.action = "na.omit")
+DN <- DF; DN[cbind(6:9, c(1:2,4,1))] <- NA; DN
+
+tools::assertError(# 'na.fail' should fail :
+	   xtabs(Freq ~ Gender + Admit, DN, na.action = na.fail))
+xt. <- xtabs(Freq ~ Gender + Admit, DN)
+xtp <- xtabs(Freq ~ Gender + Admit, DN, na.action = na.pass)
+xtN <- xtabs(Freq ~ Gender + Admit, DN, addNA = TRUE)
+stopifnot(
+    identical(asArr(xt - xt.), as_A(c(120,17, 207, 8 ), xt)),
+    identical(asArr(xt - xtp), as_A(c(120,17, 207, NA), xt)), # not ok in R <= 3.3.2
+    identical(asArr(-xtN + rbind(cbind(xt, 0), 0)),
+              as_A(c(120, 17, -17, 207, NA, 0, -327, 0, 0), xtN))
+)
+## 'sparse = TRUE requires recommended package Matrix
+if(requireNamespace('Matrix')) {
+    xtS <- xtabs(Freq ~ Gender + Admit, DN, na.action = na.pass, sparse = TRUE)# error in R <= 3.3.2
+    xtNS <- xtabs(Freq ~ Gender + Admit, DN, addNA = TRUE, sparse = TRUE)
+    stopifnot(
+        eq_A(xt., xtabs(Freq ~ Gender + Admit, DN, sparse = TRUE)),
+        eq_A(xtp, xtS),
+        eq_A(xtN, xtNS)
+   )
+}
+## NA treatment partly wrong in R < 3.4.0; new option 'addNA'
+ee <- esoph[esoph[,"ncases"] > 0, c(1:2,4)]
+ee[,"ncases"] <- as.integer(ee[,"ncases"])
+(tt <- xtabs(ncases ~ ., ee))
+stopifnot(identical(as.vector(tt[1:2,]), # *integer* + first value
+		    c(0L, 1L, 0L, 4L, 0L, 0L, 1L, 4L)))
+## keeping integer in sum()mation of integers
+
+
+## tapply() with FUN returning raw  |  with factor -> returning integer
+stopifnot(identical(tapply(1:3, 1:3, as.raw),
+                    array(as.raw(1:3), 3L, dimnames=list(1:3))), ## failed in R < 3.4.0
+          identical(3:1, as.vector(tapply(1:3, 1:3, factor, levels=3:1))))
+
+
+## str(<list of list>, max.level = 1)
+LoL <- function(lenC, FUN = identity)
+    lapply(seq_along(lenC), function(i) lapply(seq_len(lenC[i]), FUN))
+xx <- LoL(c(7,3,17,798,3))
+str(xx, list.len = 7, max.level = 1)
+str2 <- capture.output(
+ str(xx, list.len = 7, max.level = 2))
+stopifnot(
+    grepl("List of ", capture.output(str(xx, list.len = 7, max.level = 1))),
+    length(str2) == 35, sum(grepl("list output truncated", str2)) == 2,
+    vapply(paste("List of", lengths(xx)), function(pat) any(grepl(pat, str2)), NA)
+)
+## wrongly showed '[list output truncated]'  in R < 3.4.0
+
+
+## stopifnot(all.equal(.)) message abbreviation
+msg <- tryCatch(stopifnot(all.equal(rep(list(pi),4), list(3.1, 3.14, 3.141, 3.1415))),
+		error = conditionMessage)
+writeLines(msg)
+stopifnot(length(strsplit(msg,"\n")[[1]]) == 1+3+1)
+## was wrong for months in R-devel only
+
+
+## available.packages() (not) caching in case of errors
+tools::assertWarning(ap1 <- available.packages(repos = "http://foo.bar"))
+tools::assertWarning(ap2 <- available.packages(repos = "http://foo.bar"))
+stopifnot(nrow(ap1) == 0, identical(ap1, ap2))
+## had failed for a while in R-devel (left empty *.rds file)
+
+
+## rep()/rep.int() : when 'times' is a list
+stopifnot(identical(rep    (4,   list(3)), c(4,4,4)),
+          identical(rep.int(4,   list(3)), c(4,4,4)),
+          identical(rep.int(4:5, list(2,1)), c(4L,4:5)),
+          identical(rep    (4:5, list(2,1)), c(4L,4:5)))
+## partly failed in R 3.3.{2,3}
+
+
+## quantile(ordered(.)) - error message more directly useful
+OL <- ordered(sample(LETTERS, 20, replace=TRUE))
+(e <- tryCatch(quantile(OL), error = conditionMessage))
+stopifnot(grepl("type.*1.*3", e),# typically works in several locales
+	  is.ordered(quantile(OL, type = 1)),
+	  is.ordered(quantile(OL, type = 3)))
+## gave  "factors are not allowed" in R <= 3.3.x
+
+## terms() ignored arg names (PR#17235)
+a1 <- attr(terms(y ~ f(x, a = z) + f(x, a = z)),
+           "term.labels")
+a2 <- attr(terms(y ~ f(x, a = z) + f(x, b = z)),
+           "term.labels")
+stopifnot(length(a1) == 1, length(a2) == 2)
+## both gave length 1
+
+
+## keep at end
+rbind(last =  proc.time() - .pt,
+      total = proc.time())
diff --git a/tests/reg-tests-2.R b/tests/reg-tests-2.R
index ce47a0e..cf09fd4 100644
--- a/tests/reg-tests-2.R
+++ b/tests/reg-tests-2.R
@@ -1006,7 +1006,7 @@ try(x[1, c("a", "c")])
 
 ## methods(class = ) with namespaces, .Primitives etc (many missing in 1.7.x):
 meth2gen <- function(cl)
-    noquote(sub(paste("\\.",cl,"$",sep=""),"", c(methods(class = cl))))
+    noquote(sub(paste("\\.",cl,"$",sep=""),"", c(.S3methods(class = cl))))
 meth2gen("data.frame")
 meth2gen("dendrogram")
 ## --> the output may need somewhat frequent updating..
@@ -1753,6 +1753,11 @@ f <- function(...) stop()
 do.call(f, mtcars)
 traceback()
 
+## Debugger can handle a function that has a single function call as its body
+g <- function(fun) fun(1)
+debug(g)
+g(function(x) x+1)
+
 options(op)
 ## unlimited < 2.3.0
 
@@ -1894,7 +1899,7 @@ for(z in c("response", "working", "deviance", "pearson"))
 ## apply on arrays with zero extents
 ## Robin Hankin, R-help, 2006-02-13
 A <- array(0, c(3, 0, 4))
-dimnames(A) <- list(a = letters[1:3], b = NULL, c = LETTERS[1:4])
+dimnames(A) <- list(D1 = letters[1:3], D2 = NULL, D3 = LETTERS[1:4])
 f <- function(x) 5
 apply(A, 1:2, f)
 apply(A, 1, f)
@@ -2339,7 +2344,7 @@ rbind(mapply(sprintf, forms,               nums),
 sink(con <- textConnection("of", "w")) ; c ; sink(NULL); close(con)
 of2 <- capture.output(print(c))
 stopifnot(identical(of2, of),
-          identical(of2, "function (..., recursive = FALSE)  .Primitive(\"c\")"))
+          identical(of2, "function (...)  .Primitive(\"c\")"))
 ## ^^ would have failed up to R 2.9.x
 foo
 print(foo, useSource = FALSE)
@@ -2864,7 +2869,7 @@ attr(cophenetic(x1), "Labels")
 aa <- anova( lm(sr ~ ., data = LifeCycleSavings) )
 op <- options(width = 50)
 aa
-op <- options(width = 40)
+options(width = 40)
 aa ; options(op)
 ## did not line wrap "Signif. codes" previously
 
@@ -2889,3 +2894,155 @@ function( a   # parameter 1
 p <- parse(text = raw)
 getParseData(p)
 ## Got some parents wrong
+
+
+## wish of PR#15819
+set.seed(123); x <- runif(10); y <- rnorm(10)
+op <- options(OutDec = ",")
+fit <- lm(y ~ x)
+summary(fit)
+options(op)
+## those parts using formatC still used a decimal point.
+
+
+## Printing a list with "bad" component names
+L <- list(`a\\b` = 1, `a\\c` = 2, `a\bc` = "backspace")
+setClass("foo", representation(`\\C` = "numeric"))
+## the next three all print correctly:
+names(L)
+unlist(L)
+as.pairlist(L)
+cat(names(L), "\n")# yes, backspace is backspace here
+L
+new("foo")
+## the last two lines printed wrongly in R <= 3.1.1
+
+
+## Printing of arrays where last dim(.) == 0 :
+r <- matrix(,0,4, dimnames=list(Row=NULL, Col=paste0("c",1:4)))
+r
+t(r) # did not print "Row", "Col"
+A <- array(dim=3:0, dimnames=list(D1=c("a","b","c"), D2=c("X","Y"), D3="I", D4=NULL))
+A ## did not print *anything*
+A[,,"I",] # ditto
+A[,,0,]   # ditto
+aperm(A, c(3:1,4))   # ditto
+aperm(A, c(1:2, 4:3))# ditto
+unname(A)            # ditto
+format(A[,,1,])	     # ditto
+aperm(A, 4:1) # was ok, is unchanged
+## sometimes not printing anything in R <= 3.1.1
+
+
+## Printing objects with very long names cut off literal values (PR#15999)
+make_long_name <- function(n)
+{
+  paste0(rep("a", n), collapse = "")
+}
+setNames(TRUE, make_long_name(1000))  # value printed as TRU
+setNames(TRUE, make_long_name(1002))  # value printed as T
+setNames(TRUE, make_long_name(1003))  # value not printed
+##
+
+
+## PR#16437
+dd <- data.frame(F = factor(rep(c("A","B","C"), each = 3)), num = 1:9)
+cs <- list(F = contr.sum(3, contrasts = FALSE))
+a1 <- aov(num ~ F, data = dd, contrasts = cs)
+model.tables(a1, "means")
+t1 <- TukeyHSD(a1) ## don't print to avoid precision issues.
+a2 <- aov(num ~ 0+F, data = dd, contrasts = cs)
+model.tables(a2, "means")
+t2 <- TukeyHSD(a2)
+attr(t1, "orig.call") <- attr(t2, "orig.call")
+stopifnot(all.equal(t1, t2))
+## functions both failed on a2 in R <= 3.2.2.
+
+
+## deparse() did not add parens before [
+substitute(a[1], list(a = quote(x * y)))
+## should be (x * y)[1], was x * y[1]
+# Check all levels of precedence
+# (Comment out illegal ones)
+quote(`$`(a :: b, c))
+# quote(`::`(a $ b, c $ d))
+quote(`[`(a $ b, c $ d))
+quote(`$`(a[b], c))
+quote(`^`(a[b], c[d]))
+quote(`[`(a ^ b, c ^ d))
+quote(`-`(a ^ b))
+quote(`^`(-b, -d))
+quote(`:`(-b, -d))
+quote(`-`(a : b))
+quote(`%in%`(a : b, c : d))
+quote(`:`(a %in% b, c %in% d))
+quote(`*`(a %in% b, c %in% d))
+quote(`%in%`(a * b, c * d))
+quote(`+`(a * b, c * d))
+quote(`*`(a + b, c + d))
+quote(`<`(a + b, c + d))
+quote(`+`(a < b, c < d))
+quote(`!`(a < b))
+quote(`<`(!b, !d))
+quote(`&`(!b, !d))
+quote(`!`(a & b))
+quote(`|`(a & b, c & d))
+quote(`&`(a | b, c | d))
+quote(`~`(a | b, c | d))
+quote(`|`(a ~ b, c ~ d))
+quote(`->`(a ~ b, d))
+quote(`~`(a -> b, c -> d))
+quote(`<-`(a, c -> d))
+quote(`->`(a <- b, c))
+quote(`=`(a, c <- d))
+quote(`<-`(a, `=`(c, d)))
+quote(`?`(`=`(a, b), `=`(c, d)))
+quote(`=`(a, c ? d))
+quote(`?`(a = b))
+quote(`=`(b, ?d))
+
+## dput() quoted the empty symbol (PR#16686)
+a <- alist(one = 1, two = )
+dput(a)
+## deparsed two to quote()
+
+
+## summary.data.frame() with NAs in columns of class "Date" -- PR#16709
+x <- c(18000000, 18810924, 19091227, 19027233, 19310526, 19691228, NA)
+x.Date <- as.Date(as.character(x), format = "%Y%m%d")
+summary(x.Date)
+DF.Dates <- data.frame(c1 = x.Date)
+summary(DF.Dates) ## NA's missing from output :
+DF.Dates$x1 <- 1:7
+summary(DF.Dates) ## NA's still missing
+DF.Dates$x2 <- c(1:6, NA)
+## now, NA's show fine:
+summary(DF.Dates)
+## 2 of 4  summary(.) above did not show NA's  in R <= 3.2.3
+
+
+## Printing complex matrix
+matrix(1i,2,13)
+## Spacing was wrong in R <= 3.2.4
+
+
+E <- expression(poly = x^3 - 3 * x^2)
+str(E)
+## no longer shows "structure(...., .Names = ..)"
+
+
+## summary(<logical>) working via table():
+logi <- c(NA, logical(3), NA, !logical(2), NA)
+summary(logi)
+summary(logi[!is.na(logi)])
+summary(TRUE)
+## was always showing counts for NA's even when 0 in  2.8.0 <= R <= 3.3.1
+ii <- as.integer(logi)
+summary(ii)
+summary(ii[!is.na(ii)])
+summary(1L)
+
+
+## str.default() for "AsIs" arrays
+str(I(m <- matrix(pi*1:4, 2)))
+## did look ugly (because of toString() for numbers) in R <= 3.3.1
diff --git a/tests/reg-tests-2.Rout.save b/tests/reg-tests-2.Rout.save
index 032c179..1a25e56 100644
--- a/tests/reg-tests-2.Rout.save
+++ b/tests/reg-tests-2.Rout.save
@@ -1,7 +1,7 @@
 
-R version 3.1.2 RC (2014-10-29 r66897) -- "Pumpkin Helmet"
-Copyright (C) 2014 The R Foundation for Statistical Computing
-Platform: x86_64-unknown-linux-gnu (64-bit)
+R version 3.4.0 RC (2017-04-18 r72543) -- "You Stupid Darkness"
+Copyright (C) 2017 The R Foundation for Statistical Computing
+Platform: x86_64-pc-linux-gnu (64-bit)
 
 R is free software and comes with ABSOLUTELY NO WARRANTY.
 You are welcome to redistribute it under certain conditions.
@@ -463,7 +463,8 @@ numeric(0)
    100 -1e-13    Inf   -Inf    NaN   3.14     NA 
    100      0     NA     NA     NA      3     NA 
 Warning message:
-In structure(as.integer(x), names = names(x)) : NAs introduced by coercion
+In structure(as.integer(x), names = names(x)) :
+  NAs introduced by coercion to integer range
 > ##-   100 -1e-13    Inf   -Inf    NaN   3.14     NA
 > ##-   100      0     NA     NA     NA      3     NA
 > all(is.na(ix) != is.finite(ix) | is.infinite(ix)) # TRUE (still)
@@ -977,7 +978,7 @@ $B$subset
 > x <- c(round(runif(10), 2), 10000)
 > summary(x)
      Min.   1st Qu.    Median      Mean   3rd Qu.      Max. 
-    0.060     0.320     0.630   909.600     0.905 10000.000 
+    0.060     0.320     0.630   909.592     0.905 10000.000 
 > summary(data.frame(x))
        x            
  Min.   :    0.060  
@@ -3260,7 +3261,7 @@ Error in `[.data.frame`(x, 1, c("a", "c")) : undefined columns selected
 > 
 > ## methods(class = ) with namespaces, .Primitives etc (many missing in 1.7.x):
 > meth2gen <- function(cl)
-+     noquote(sub(paste("\\.",cl,"$",sep=""),"", c(methods(class = cl))))
++     noquote(sub(paste("\\.",cl,"$",sep=""),"", c(.S3methods(class = cl))))
 > meth2gen("data.frame")
  [1] $             $<-           Math          Ops           Summary      
  [6] [             [<-           [[            [[<-          aggregate    
@@ -4880,8 +4881,7 @@ coef[0] = 1
 > ## using NULL as a replacement value
 > DF <- data.frame(A=1:2, B=3:4)
 > try(DF[2, 1:3] <- NULL)
-Error in `[<-.data.frame`(`*tmp*`, 2, 1:3, value = NULL) : 
-  replacement has 0 items, need 3
+Error in x[[jj]][iseq] <- vjj : replacement has length zero
 > ## wrong error message in R < 2.2.0
 > 
 > 
@@ -5108,9 +5108,18 @@ Calls: do.call -> <Anonymous>
 2: (function (...) 
    stop())(mpg = c(21, 21, 22.8, 21.4, 18.7, 18.1, 14.3, 24.4, 22.8, 
    19.2, 17.8, 16.4, 17.3, 15.2, 10.4, 10.4, 14.7, 32.4, 30.4, 33.9, 
-     ...
+    ...
 1: do.call(f, mtcars)
 > 
+> ## Debugger can handle a function that has a single function call as its body
+> g <- function(fun) fun(1)
+> debug(g)
+> g(function(x) x+1)
+debugging in: g(function(x) x + 1)
+debug: fun(1)
+Browse[2]> 
+exiting from: g(function(x) x + 1)
+[1] 2
 > options(op)
 > ## unlimited < 2.3.0
 > 
@@ -5477,11 +5486,11 @@ character(0)
 > ## apply on arrays with zero extents
 > ## Robin Hankin, R-help, 2006-02-13
 > A <- array(0, c(3, 0, 4))
-> dimnames(A) <- list(a = letters[1:3], b = NULL, c = LETTERS[1:4])
+> dimnames(A) <- list(D1 = letters[1:3], D2 = NULL, D3 = LETTERS[1:4])
 > f <- function(x) 5
 > apply(A, 1:2, f)
-   b
-a  
+   D2
+D1 
   a
   b
   c
@@ -6353,7 +6362,7 @@ callFunc(default = TRUE)
 > sink(con <- textConnection("of", "w")) ; c ; sink(NULL); close(con)
 > of2 <- capture.output(print(c))
 > stopifnot(identical(of2, of),
-+           identical(of2, "function (..., recursive = FALSE)  .Primitive(\"c\")"))
++           identical(of2, "function (...)  .Primitive(\"c\")"))
 > ## ^^ would have failed up to R 2.9.x
 > foo
 function(given = NULL) {
@@ -6362,6 +6371,7 @@ function(given = NULL) {
     if (is.null(given)) callObj$default <- TRUE
     callObj
 }
+<bytecode: 0x5510f80>
 > print(foo, useSource = FALSE)
 function (given = NULL) 
 {
@@ -6372,6 +6382,7 @@ function (given = NULL)
         callObj$default <- TRUE
     callObj
 }
+<bytecode: 0x5510f80>
 > attr(foo, "srcref") <- NULL
 > foo
 function (given = NULL) 
@@ -6383,6 +6394,7 @@ function (given = NULL)
         callObj$default <- TRUE
     callObj
 }
+<bytecode: 0x5510f80>
 > (f <- structure(function(){}, note = "just a note",
 +                 yada = function() "not the same"))
 function(){}
@@ -6404,15 +6416,15 @@ function ()
 > print.function
 function (x, ...)  
  - attr(*, "srcref")=Class 'srcref'  atomic [1:8] 1 19 1 63 19 63 1 1
-  .. ..- attr(*, "srcfile")=Classes 'srcfilecopy', 'srcfile' <environment: 0x3d94038> 
+  .. ..- attr(*, "srcfile")=Classes 'srcfilecopy', 'srcfile' <environment: 0x55645f0> 
 > f
 function ()  
  - attr(*, "srcref")=Class 'srcref'  atomic [1:8] 1 17 1 28 17 28 1 1
-  .. ..- attr(*, "srcfile")=Classes 'srcfilecopy', 'srcfile' <environment: 0x4263fa8> 
+  .. ..- attr(*, "srcfile")=Classes 'srcfilecopy', 'srcfile' <environment: 0x5558fc0> 
  - attr(*, "note")= chr "just a note"
  - attr(*, "yada")=function ()  
   ..- attr(*, "srcref")=Class 'srcref'  atomic [1:8] 2 24 2 48 24 48 2 2
-  .. .. ..- attr(*, "srcfile")=Classes 'srcfilecopy', 'srcfile' <environment: 0x4263fa8> 
+  .. .. ..- attr(*, "srcfile")=Classes 'srcfilecopy', 'srcfile' <environment: 0x5558fc0> 
 > rm(print.function)
 > ## auto-printing and printing differed up to R 2.9.x
 > 
@@ -6504,7 +6516,7 @@ sample estimates:
 > bar <- as.data.frame(foo)
 > val <- integer(0)
 > try(bar$NewCol <- val)
-Error in `$<-.data.frame`(`*tmp*`, "NewCol", value = integer(0)) : 
+Error in `$<-.data.frame`(`*tmp*`, NewCol, value = integer(0)) : 
   replacement has 0 rows, data has 3
 > # similar, not in the report
 > try(bar[["NewCol"]] <- val)
@@ -6702,7 +6714,7 @@ common odds ratio
 	Mantel-Haenszel chi-squared test with continuity correction
 
 data:  Nitrous
-Mantel-Haenszel X-squared = 0.7143, df = 1, p-value = 0.199
+Mantel-Haenszel X-squared = 0.71432, df = 1, p-value = 0.199
 alternative hypothesis: true common odds ratio is less than 1
 95 percent confidence interval:
  0.000000 1.260053
@@ -7099,17 +7111,17 @@ In pl$ab : partial match of 'ab' to 'abc'
 > 
 > ## seq() with NaN etc inputs now gives explicit error messages
 > try(seq(NaN))
-Error in seq.default(NaN) : 'from' cannot be NA, NaN or infinite
+Error in seq.default(NaN) : 'from' must be a finite number
 > try(seq(to = NaN))
-Error in seq.default(to = NaN) : 'to' cannot be NA, NaN or infinite
+Error in seq.default(to = NaN) : 'to' must be a finite number
 > try(seq(NaN, NaN))
-Error in seq.default(NaN, NaN) : 'from' cannot be NA, NaN or infinite
+Error in seq.default(NaN, NaN) : 'from' must be a finite number
 > try(seq.int(NaN))
-Error in seq.int(NaN) : 'from' cannot be NA, NaN or infinite
+Error in seq.int(NaN) : 'from' must be a finite number
 > try(seq.int(to = NaN))
-Error in seq.int(to = NaN) : 'to' cannot be NA, NaN or infinite
+Error in seq.int(to = NaN) : 'to' must be a finite number
 > try(seq.int(NaN, NaN))
-Error in seq.int(NaN, NaN) : 'from' cannot be NA, NaN or infinite
+Error in seq.int(NaN, NaN) : 'from' must be a finite number
 > ## R 3.0.1 gave messages from ':' or about negative-length vectors.
 > 
 > 
@@ -7153,9 +7165,9 @@ arima(x = x, order = c(1, 1, 1), seasonal = c(1, 0, 1), xreg = xreg)
 Coefficients:
           ar1     ma1    sar1     sma1    xreg
       -0.4791  0.3525  0.9877  -0.8295  0.3574
-s.e.   0.4184  0.4444  0.0331   0.2221  0.7480
+s.e.   0.4162  0.4420  0.0329   0.2209  0.7440
 
-sigma^2 estimated as 0.001515:  log likelihood = 162.05,  aic = -312.09
+sigma^2 estimated as 0.001499:  log likelihood = 163.79,  aic = -315.58
 > (f2 <- arima(diff(x), xreg = diff(xreg), order = c(1,0,1), seasonal = c(1,0,1),
 +              include.mean = FALSE))
 
@@ -7400,7 +7412,7 @@ Residuals 45 650.71  14.460
 ---
 Signif. codes:  
 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
-> op <- options(width = 40)
+> options(width = 40)
 > aa ; options(op)
 Analysis of Variance Table
 
@@ -7446,49 +7458,409 @@ $foo
 +          ){a+b}"
 > p <- parse(text = raw)
 > getParseData(p)
-   line1 col1 line2 col2 id parent          token
-31     2    1     4   15 31      0           expr
-3      2    1     2    8  3     31       FUNCTION
-4      2    9     2    9  4     31            '('
-5      2   11     2   11  5     31 SYMBOL_FORMALS
-6      2   15     2   27  6     31        COMMENT
-8      3   10     3   10  8     31            ','
-10     3   12     3   12 10     31 SYMBOL_FORMALS
-11     3   13     3   13 11     31     EQ_FORMALS
-12     3   14     3   14 12     13      NUM_CONST
-13     3   14     3   14 13     31           expr
-14     3   16     3   28 14     31        COMMENT
-16     4   10     4   10 16     31            ')'
-28     4   11     4   15 28     31           expr
-18     4   11     4   11 18     28            '{'
-25     4   12     4   14 25     28           expr
-19     4   12     4   12 19     21         SYMBOL
-21     4   12     4   12 21     25           expr
-20     4   13     4   13 20     25            '+'
-22     4   14     4   14 22     24         SYMBOL
-24     4   14     4   14 24     25           expr
-23     4   15     4   15 23     28            '}'
-   terminal          text
-31    FALSE              
-3      TRUE      function
-4      TRUE             (
-5      TRUE             a
-6      TRUE # parameter 1
-8      TRUE             ,
-10     TRUE             b
-11     TRUE             =
-12     TRUE             2
-13    FALSE              
-14     TRUE # parameter 2
-16     TRUE             )
-28    FALSE              
-18     TRUE             {
-25    FALSE              
-19     TRUE             a
-21    FALSE              
-20     TRUE             +
-22     TRUE             b
-24    FALSE              
-23     TRUE             }
+   line1 col1 line2 col2 id parent          token terminal          text
+31     2    1     4   15 31      0           expr    FALSE              
+3      2    1     2    8  3     31       FUNCTION     TRUE      function
+4      2    9     2    9  4     31            '('     TRUE             (
+5      2   11     2   11  5     31 SYMBOL_FORMALS     TRUE             a
+6      2   15     2   27  6     31        COMMENT     TRUE # parameter 1
+8      3   10     3   10  8     31            ','     TRUE             ,
+10     3   12     3   12 10     31 SYMBOL_FORMALS     TRUE             b
+11     3   13     3   13 11     31     EQ_FORMALS     TRUE             =
+12     3   14     3   14 12     13      NUM_CONST     TRUE             2
+13     3   14     3   14 13     31           expr    FALSE              
+14     3   16     3   28 14     31        COMMENT     TRUE # parameter 2
+16     4   10     4   10 16     31            ')'     TRUE             )
+28     4   11     4   15 28     31           expr    FALSE              
+18     4   11     4   11 18     28            '{'     TRUE             {
+25     4   12     4   14 25     28           expr    FALSE              
+19     4   12     4   12 19     21         SYMBOL     TRUE             a
+21     4   12     4   12 21     25           expr    FALSE              
+20     4   13     4   13 20     25            '+'     TRUE             +
+22     4   14     4   14 22     24         SYMBOL     TRUE             b
+24     4   14     4   14 24     25           expr    FALSE              
+23     4   15     4   15 23     28            '}'     TRUE             }
 > ## Got some parents wrong
 > 
+> 
+> ## wish of PR#15819
+> set.seed(123); x <- runif(10); y <- rnorm(10)
+> op <- options(OutDec = ",")
+> fit <- lm(y ~ x)
+> summary(fit)
+
+Call:
+lm(formula = y ~ x)
+
+Residuals:
+     Min       1Q   Median       3Q      Max 
+-1,62155 -0,33471  0,05238  0,55227  1,19742 
+
+Coefficients:
+            Estimate Std. Error t value Pr(>|t|)
+(Intercept)   0,8994     0,6282   1,432    0,190
+x            -1,3275     0,9780  -1,357    0,212
+
+Residual standard error: 0,8648 on 8 degrees of freedom
+Multiple R-squared:  0,1872,	Adjusted R-squared:  0,08557 
+F-statistic: 1,842 on 1 and 8 DF,  p-value: 0,2117
+
+> options(op)
+> ## those parts using formatC still used a decimal point.
+> 
+> 
+> ## Printing a list with "bad" component names
+> L <- list(`a\\b` = 1, `a\\c` = 2, `a\bc` = "backspace")
+> setClass("foo", representation(`\\C` = "numeric"))
+> ## the next three all print correctly:
+> names(L)
+[1] "a\\b" "a\\c" "a\bc"
+> unlist(L)
+       a\\b        a\\c        a\bc 
+        "1"         "2" "backspace" 
+> as.pairlist(L)
+$`a\\b`
+[1] 1
+
+$`a\\c`
+[1] 2
+
+$`a\bc`
+[1] "backspace"
+
+> cat(names(L), "\n")# yes, backspace is backspace here
+a\b a\c ac 
+> L
+$`a\\b`
+[1] 1
+
+$`a\\c`
+[1] 2
+
+$`a\bc`
+[1] "backspace"
+
+> new("foo")
+An object of class "foo"
+Slot "\\C":
+numeric(0)
+
+> ## the last two lines printed wrongly in R <= 3.1.1
+> 
+> 
+> ## Printing of arrays where last dim(.) == 0 :
+> r <- matrix(,0,4, dimnames=list(Row=NULL, Col=paste0("c",1:4)))
+> r
+      Col
+Row    c1 c2 c3 c4
+> t(r) # did not print "Row", "Col"
+    Row
+Col 
+  c1
+  c2
+  c3
+  c4
+> A <- array(dim=3:0, dimnames=list(D1=c("a","b","c"), D2=c("X","Y"), D3="I", D4=NULL))
+> A ## did not print *anything*
+<3 x 2 x 1 x 0 array of logical>
+   D2
+D1  X Y
+  a
+  b
+  c
+
+> A[,,"I",] # ditto
+<3 x 2 x 0 array of logical>
+   D2
+D1  X Y
+  a
+  b
+  c
+
+> A[,,0,]   # ditto
+<3 x 2 x 0 x 0 array of logical>
+   D2
+D1  X Y
+  a
+  b
+  c
+
+> aperm(A, c(3:1,4))   # ditto
+<1 x 2 x 3 x 0 array of logical>
+   D2
+D3  X Y
+  I
+
+> aperm(A, c(1:2, 4:3))# ditto
+<3 x 2 x 0 x 1 array of logical>
+   D2
+D1  X Y
+  a
+  b
+  c
+
+> unname(A)            # ditto
+<3 x 2 x 1 x 0 array of logical>
+     [,1] [,2]
+[1,]
+[2,]
+[3,]
+
+> format(A[,,1,])	     # ditto
+<3 x 2 x 0 array of character>
+   D2
+D1  X Y
+  a
+  b
+  c
+
+> aperm(A, 4:1) # was ok, is unchanged
+, , D2 = X, D1 = a
+
+      D3
+D4     I
+
+, , D2 = Y, D1 = a
+
+      D3
+D4     I
+
+, , D2 = X, D1 = b
+
+      D3
+D4     I
+
+, , D2 = Y, D1 = b
+
+      D3
+D4     I
+
+, , D2 = X, D1 = c
+
+      D3
+D4     I
+
+, , D2 = Y, D1 = c
+
+      D3
+D4     I
+
+> ## sometimes not printing anything in R <= 3.1.1
+> 
+> 
+> ## Printing objects with very long names cut off literal values (PR#15999)
+> make_long_name <- function(n)
++ {
++   paste0(rep("a", n), collapse = "")
++ }
+> setNames(TRUE, make_long_name(1000))  # value printed as TRU
+aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa [...]
+                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             [...]
+> setNames(TRUE, make_long_name(1002))  # value printed as T
+aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa [...]
+                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             [...]
+> setNames(TRUE, make_long_name(1003))  # value not printed
+aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa [...]
+                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             [...]
+> ##
+> 
+> 
+> ## PR#16437
+> dd <- data.frame(F = factor(rep(c("A","B","C"), each = 3)), num = 1:9)
+> cs <- list(F = contr.sum(3, contrasts = FALSE))
+> a1 <- aov(num ~ F, data = dd, contrasts = cs)
+> model.tables(a1, "means")
+Tables of means
+Grand mean
+  
+5 
+
+ F 
+F
+A B C 
+2 5 8 
+> t1 <- TukeyHSD(a1) ## don't print to avoid precision issues.
+> a2 <- aov(num ~ 0+F, data = dd, contrasts = cs)
+> model.tables(a2, "means")
+Tables of means
+
+ F 
+F
+A B C 
+2 5 8 
+> t2 <- TukeyHSD(a2)
+> attr(t1, "orig.call") <- attr(t2, "orig.call")
+> stopifnot(all.equal(t1, t2))
+> ## functions both failed on a2 in R <= 3.2.2.
+> 
+> 
+> ## deparse() did not add parens before [
+> substitute(a[1], list(a = quote(x * y)))
+(x * y)[1]
+> ## should be (x * y)[1], was x * y[1]
+> # Check all levels of precedence
+> # (Comment out illegal ones)
+> quote(`$`(a :: b, c))
+a::b$c
+> # quote(`::`(a $ b, c $ d))
+> quote(`[`(a $ b, c $ d))
+a$b[c$d]
+> quote(`$`(a[b], c))
+a[b]$c
+> quote(`^`(a[b], c[d]))
+a[b]^c[d]
+> quote(`[`(a ^ b, c ^ d))
+(a^b)[c^d]
+> quote(`-`(a ^ b))
+-a^b
+> quote(`^`(-b, -d))
+(-b)^-d
+> quote(`:`(-b, -d))
+-b:-d
+> quote(`-`(a : b))
+-(a:b)
+> quote(`%in%`(a : b, c : d))
+a:b %in% c:d
+> quote(`:`(a %in% b, c %in% d))
+(a %in% b):(c %in% d)
+> quote(`*`(a %in% b, c %in% d))
+a %in% b * c %in% d
+> quote(`%in%`(a * b, c * d))
+(a * b) %in% (c * d)
+> quote(`+`(a * b, c * d))
+a * b + c * d
+> quote(`*`(a + b, c + d))
+(a + b) * (c + d)
+> quote(`<`(a + b, c + d))
+a + b < c + d
+> quote(`+`(a < b, c < d))
+(a < b) + (c < d)
+> quote(`!`(a < b))
+!a < b
+> quote(`<`(!b, !d))
+(!b) < (!d)
+> quote(`&`(!b, !d))
+!b & !d
+> quote(`!`(a & b))
+!(a & b)
+> quote(`|`(a & b, c & d))
+a & b | c & d
+> quote(`&`(a | b, c | d))
+(a | b) & (c | d)
+> quote(`~`(a | b, c | d))
+a | b ~ c | d
+> quote(`|`(a ~ b, c ~ d))
+(a ~ b) | (c ~ d)
+> quote(`->`(a ~ b, d))
+`->`(a ~ b, d)
+> quote(`~`(a -> b, c -> d))
+(b <- a) ~ (d <- c)
+> quote(`<-`(a, c -> d))
+a <- d <- c
+> quote(`->`(a <- b, c))
+`->`(a <- b, c)
+> quote(`=`(a, c <- d))
+a = c <- d
+> quote(`<-`(a, `=`(c, d)))
+a <- (c = d)
+> quote(`?`(`=`(a, b), `=`(c, d)))
+`?`((a = b), (c = d))
+> quote(`=`(a, c ? d))
+a = `?`(c, d)
+> quote(`?`(a = b))
+`?`(a = b)
+> quote(`=`(b, ?d))
+b = `?`(d)
+> 
+> ## dput() quoted the empty symbol (PR#16686)
+> a <- alist(one = 1, two = )
+> dput(a)
+structure(list(one = 1, two = ), .Names = c("one", "two"))
+> ## deparsed two to quote()
+> 
+> 
+> ## summary.data.frame() with NAs in columns of class "Date" -- PR#16709
+> x <- c(18000000, 18810924, 19091227, 19027233, 19310526, 19691228, NA)
+> x.Date <- as.Date(as.character(x), format = "%Y%m%d")
+> summary(x.Date)
+        Min.      1st Qu.       Median         Mean      3rd Qu.         Max. 
+"1881-09-24" "1902-12-04" "1920-09-10" "1923-04-12" "1941-01-17" "1969-12-28" 
+        NA's 
+         "3" 
+> DF.Dates <- data.frame(c1 = x.Date)
+> summary(DF.Dates) ## NA's missing from output :
+       c1            
+ Min.   :1881-09-24  
+ 1st Qu.:1902-12-04  
+ Median :1920-09-10  
+ Mean   :1923-04-12  
+ 3rd Qu.:1941-01-17  
+ Max.   :1969-12-28  
+ NA's   :3           
+> DF.Dates$x1 <- 1:7
+> summary(DF.Dates) ## NA's still missing
+       c1                   x1     
+ Min.   :1881-09-24   Min.   :1.0  
+ 1st Qu.:1902-12-04   1st Qu.:2.5  
+ Median :1920-09-10   Median :4.0  
+ Mean   :1923-04-12   Mean   :4.0  
+ 3rd Qu.:1941-01-17   3rd Qu.:5.5  
+ Max.   :1969-12-28   Max.   :7.0  
+ NA's   :3                         
+> DF.Dates$x2 <- c(1:6, NA)
+> ## now, NA's show fine:
+> summary(DF.Dates)
+       c1                   x1            x2      
+ Min.   :1881-09-24   Min.   :1.0   Min.   :1.00  
+ 1st Qu.:1902-12-04   1st Qu.:2.5   1st Qu.:2.25  
+ Median :1920-09-10   Median :4.0   Median :3.50  
+ Mean   :1923-04-12   Mean   :4.0   Mean   :3.50  
+ 3rd Qu.:1941-01-17   3rd Qu.:5.5   3rd Qu.:4.75  
+ Max.   :1969-12-28   Max.   :7.0   Max.   :6.00  
+ NA's   :3                          NA's   :1     
+> ## 2 of 4  summary(.) above did not show NA's  in R <= 3.2.3
+> 
+> 
+> ## Printing complex matrix
+> matrix(1i,2,13)
+     [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [,12] [,13]
+[1,] 0+1i 0+1i 0+1i 0+1i 0+1i 0+1i 0+1i 0+1i 0+1i  0+1i  0+1i  0+1i  0+1i
+[2,] 0+1i 0+1i 0+1i 0+1i 0+1i 0+1i 0+1i 0+1i 0+1i  0+1i  0+1i  0+1i  0+1i
+> ## Spacing was wrong in R <= 3.2.4
+> 
+> 
+> E <- expression(poly = x^3 - 3 * x^2)
+> str(E)
+  expression(poly = x^3 - 3 * x^2)
+> ## no longer shows "structure(...., .Names = ..)"
+> 
+> 
+> ## summary(<logical>) working via table():
+> logi <- c(NA, logical(3), NA, !logical(2), NA)
+> summary(logi)
+   Mode   FALSE    TRUE    NA's 
+logical       3       2       3 
+> summary(logi[!is.na(logi)])
+   Mode   FALSE    TRUE 
+logical       3       2 
+> summary(TRUE)
+   Mode    TRUE 
+logical       1 
+> ## was always showing counts for NA's even when 0 in  2.8.0 <= R <= 3.3.1
+> ii <- as.integer(logi)
+> summary(ii)
+   Min. 1st Qu.  Median    Mean 3rd Qu.    Max.    NA's 
+    0.0     0.0     0.0     0.4     1.0     1.0       3 
+> summary(ii[!is.na(ii)])
+   Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
+    0.0     0.0     0.0     0.4     1.0     1.0 
+> summary(1L)
+   Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
+      1       1       1       1       1       1 
+> 
+> 
+> ## str.default() for "AsIs" arrays
+> str(I(m <- matrix(pi*1:4, 2)))
+ AsIs [1:2, 1:2] 3.14 6.28 9.42 12.57
+> ## did look ugly (because of toString() for numbers) in R <= 3.3.1
+> 
diff --git a/tests/reg-tests-3.R b/tests/reg-tests-3.R
index d863bc9..79468bb 100644
--- a/tests/reg-tests-3.R
+++ b/tests/reg-tests-3.R
@@ -1,5 +1,6 @@
 ### Regression tests for which the printed output is the issue
-### May fail, e.g. by needing Recommended packages
+### May fail.
+### Skipped on a Unix-alike without Recommended packages
 
 pdf("reg-tests-3.pdf", encoding = "ISOLatin1.enc")
 
@@ -11,7 +12,7 @@ str(ordered(ff, exclude=NULL))
 if(require(survival)) {
     (sa <- Surv(aml$time, aml$status))
     str(sa)
-    detach("package:survival")
+    detach("package:survival", unload = TRUE)
 }
 ## were different, the last one failed in 1.6.2 (at least)
 
@@ -92,7 +93,7 @@ if(require("survival")) {
     print(as.matrix(df.soa)) # numeric result
     df.soac <- data.frame(soa, letters[1:5])
     print(as.matrix(df.soac)) # character result
-    detach("package:survival")
+    detach("package:survival", unload = TRUE)
 }
 ## failed in 2.8.1
 
@@ -167,3 +168,66 @@ if(require("MASS")) {
     stopifnot(identical(rownames(res[[2]]), "X2"))
 }
 ## the error was in lm.(w)fit
+
+if(require("Matrix")) {
+ m1 <- m2 <- m <- matrix(1:12, 3,4)
+ dimnames(m2) <- list(LETTERS[1:3],
+                      letters[1:4])
+ dimnames(m1) <- list(NULL,letters[1:4])
+ M  <- Matrix(m)
+ M1 <- Matrix(m1)
+ M2 <- Matrix(m2)
+ ## Now, with a new ideal cbind(), rbind():
+ print(cbind(M, M1))
+ stopifnot(identical(cbind (M, M1),
+                     cbind2(M, M1)))
+ rm(M,M1,M2)
+ detach("package:Matrix", unload=TRUE)
+}##{Matrix}
+
+
+## Invalid UTF-8 strings
+x <- c("Jetz", "no", "chli", "z\xc3\xbcrit\xc3\xbc\xc3\xbctsch:",
+       "(noch", "ein", "bi\xc3\x9fchen", "Z\xc3\xbc", "deutsch)",
+       "\xfa\xb4\xbf\xbf\x9f")
+lapply(x, utf8ToInt)
+Encoding(x) <- "UTF-8"
+nchar(x, "b")
+try(nchar(x, "c"))
+try(nchar(x, "w"))
+nchar(x, "c", allowNA = TRUE)
+nchar(x, "w", allowNA = TRUE)
+## Results differed by platform, but some gave incorrect results on string 10.
+
+
+## str() on large strings (in multibyte locales; changing locale may not work everywhere
+oloc <- Sys.getlocale("LC_CTYPE")
+mbyte.lc <- if(.Platform$OS.type == "windows")
+ "English_United States.28605" else "en_GB.UTF-8"
+stopifnot(identical(Sys.setlocale("LC_CTYPE", mbyte.lc), mbyte.lc))
+cc <- "J\xf6reskog" # valid in "latin-1"; invalid multibyte string in UTF-8
+.tmp <- capture.output(
+str(cc) # failed in some R-devel versions
+)
+stopifnot(grepl("chr \"J.*reskog\"", .tmp))
+nchar(L <- strrep(paste(LETTERS, collapse="."), 100000), type="b")# 5.1 M
+stopifnot(system.time( str(L) )[[1L]] < 0.10) # Sparc Solaris needed 0.052
+Sys.setlocale("LC_CTYPE", oloc)
+## needed 1.6 sec in (some) R <= 3.3.0 in a multibyte locale
+
+if(require("Matrix", .Library)) {
+    M <- Matrix(diag(1:10), sparse=TRUE) # a "dsCMatrix"
+    setClass("TestM", slots = c(M='numeric'))
+    setMethod("+", c("TestM","TestM"), function(e1,e2) {
+        e1 at M + e2 at M
+    })
+    M+M # works the first time
+    M+M # was error   "object '.Generic' not found"
+    ##
+    stopifnot(
+        identical(pmin(2,M), pmin(2, as.matrix(M))),
+        identical(as.matrix(pmax(M, 7)), pmax(as.matrix(M), 7))
+    )
+    rm(M)
+    detach("package:Matrix", unload=TRUE)
+}##{Matrix}
diff --git a/tests/reg-tests-3.Rout.save b/tests/reg-tests-3.Rout.save
index d2e56f9..988257b 100644
--- a/tests/reg-tests-3.Rout.save
+++ b/tests/reg-tests-3.Rout.save
@@ -1,7 +1,7 @@
 
-R version 3.1.2 RC (2014-10-29 r66897) -- "Pumpkin Helmet"
-Copyright (C) 2014 The R Foundation for Statistical Computing
-Platform: x86_64-unknown-linux-gnu (64-bit)
+R version 3.4.0 RC (2017-04-18 r72543) -- "You Stupid Darkness"
+Copyright (C) 2017 The R Foundation for Statistical Computing
+Platform: x86_64-pc-linux-gnu (64-bit)
 
 R is free software and comes with ABSOLUTELY NO WARRANTY.
 You are welcome to redistribute it under certain conditions.
@@ -16,7 +16,8 @@ Type 'demo()' for some demos, 'help()' for on-line help, or
 Type 'q()' to quit R.
 
 > ### Regression tests for which the printed output is the issue
-> ### May fail, e.g. by needing Recommended packages
+> ### May fail.
+> ### Skipped on a Unix-alike without Recommended packages
 > 
 > pdf("reg-tests-3.pdf", encoding = "ISOLatin1.enc")
 > 
@@ -31,10 +32,9 @@ Type 'q()' to quit R.
 > if(require(survival)) {
 +     (sa <- Surv(aml$time, aml$status))
 +     str(sa)
-+     detach("package:survival")
++     detach("package:survival", unload = TRUE)
 + }
 Loading required package: survival
-Loading required package: splines
  Surv [1:23, 1:2]   9   13   13+  18   23   28+  31   34   45+  48  ...
  - attr(*, "dimnames")=List of 2
   ..$ : NULL
@@ -615,7 +615,7 @@ climb   1 320.99
 +     print(as.matrix(df.soa)) # numeric result
 +     df.soac <- data.frame(soa, letters[1:5])
 +     print(as.matrix(df.soac)) # character result
-+     detach("package:survival")
++     detach("package:survival", unload = TRUE)
 + }
 Loading required package: survival
      soa.time soa.status
@@ -709,13 +709,15 @@ Loading required package: survival
 4 . . . 1
 5 . . . .
 2 x 2 sparse Matrix of class "dgCMatrix"
-  a b
-a 2 .
-b . 2
+   x2
+x1  a b
+  a 2 .
+  b . 2
 2 x 2 sparse Matrix of class "dgCMatrix"
-  a b
-a 2 .
-b . 1
+   x3
+x1  a b
+  a 2 .
+  b . 1
 > 
 > ## regression tests for dimnames (broken on 2009-07-31)
 > contr.sum(4)
@@ -813,3 +815,112 @@ X2 0           1  0
 
 > ## the error was in lm.(w)fit
 > 
+> if(require("Matrix")) {
++  m1 <- m2 <- m <- matrix(1:12, 3,4)
++  dimnames(m2) <- list(LETTERS[1:3],
++                       letters[1:4])
++  dimnames(m1) <- list(NULL,letters[1:4])
++  M  <- Matrix(m)
++  M1 <- Matrix(m1)
++  M2 <- Matrix(m2)
++  ## Now, with a new ideal cbind(), rbind():
++  print(cbind(M, M1))
++  stopifnot(identical(cbind (M, M1),
++                      cbind2(M, M1)))
++  rm(M,M1,M2)
++  detach("package:Matrix", unload=TRUE)
++ }##{Matrix}
+Loading required package: Matrix
+3 x 8 Matrix of class "dgeMatrix"
+              a b c  d
+[1,] 1 4 7 10 1 4 7 10
+[2,] 2 5 8 11 2 5 8 11
+[3,] 3 6 9 12 3 6 9 12
+> 
+> 
+> ## Invalid UTF-8 strings
+> x <- c("Jetz", "no", "chli", "z\xc3\xbcrit\xc3\xbc\xc3\xbctsch:",
++        "(noch", "ein", "bi\xc3\x9fchen", "Z\xc3\xbc", "deutsch)",
++        "\xfa\xb4\xbf\xbf\x9f")
+> lapply(x, utf8ToInt)
+[[1]]
+[1]  74 101 116 122
+
+[[2]]
+[1] 110 111
+
+[[3]]
+[1]  99 104 108 105
+
+[[4]]
+ [1] 122 252 114 105 116 252 252 116 115  99 104  58
+
+[[5]]
+[1]  40 110 111  99 104
+
+[[6]]
+[1] 101 105 110
+
+[[7]]
+[1]  98 105 223  99 104 101 110
+
+[[8]]
+[1]  90 252
+
+[[9]]
+[1] 100 101 117 116 115  99 104  41
+
+[[10]]
+[1] NA
+
+> Encoding(x) <- "UTF-8"
+> nchar(x, "b")
+ [1]  4  2  4 15  5  3  8  3  8  5
+> try(nchar(x, "c"))
+Error in nchar(x, "c") : invalid multibyte string, element 10
+> try(nchar(x, "w"))
+Error in nchar(x, "w") : invalid multibyte string, element 10
+> nchar(x, "c", allowNA = TRUE)
+ [1]  4  2  4 12  5  3  7  2  8 NA
+> nchar(x, "w", allowNA = TRUE)
+ [1]  4  2  4 12  5  3  7  2  8 NA
+> ## Results differed by platform, but some gave incorrect results on string 10.
+> 
+> 
+> ## str() on large strings (in multibyte locales; changing locale may not work everywhere
+> oloc <- Sys.getlocale("LC_CTYPE")
+> mbyte.lc <- if(.Platform$OS.type == "windows")
++  "English_United States.28605" else "en_GB.UTF-8"
+> stopifnot(identical(Sys.setlocale("LC_CTYPE", mbyte.lc), mbyte.lc))
+> cc <- "J\xf6reskog" # valid in "latin-1"; invalid multibyte string in UTF-8
+> .tmp <- capture.output(
++ str(cc) # failed in some R-devel versions
++ )
+> stopifnot(grepl("chr \"J.*reskog\"", .tmp))
+> nchar(L <- strrep(paste(LETTERS, collapse="."), 100000), type="b")# 5.1 M
+[1] 5100000
+> stopifnot(system.time( str(L) )[[1L]] < 0.10) # Sparc Solaris needed 0.052
+ chr "A.B.C.D.E.F.G.H.I.J.K.L.M.N.O.P.Q.R.S.T.U.V.W.X.Y.ZA.B.C.D.E.F.G.H.I.J.K.L.M.N.O.P.Q.R.S.T.U.V.W.X.Y.ZA.B.C.D.E"| __truncated__
+> Sys.setlocale("LC_CTYPE", oloc)
+[1] "C"
+> ## needed 1.6 sec in (some) R <= 3.3.0 in a multibyte locale
+> 
+> if(require("Matrix", .Library)) {
++     M <- Matrix(diag(1:10), sparse=TRUE) # a "dsCMatrix"
++     setClass("TestM", slots = c(M='numeric'))
++     setMethod("+", c("TestM","TestM"), function(e1,e2) {
++         e1 at M + e2 at M
++     })
++     M+M # works the first time
++     M+M # was error   "object '.Generic' not found"
++     ##
++     stopifnot(
++         identical(pmin(2,M), pmin(2, as.matrix(M))),
++         identical(as.matrix(pmax(M, 7)), pmax(as.matrix(M), 7))
++     )
++     rm(M)
++     detach("package:Matrix", unload=TRUE)
++ }##{Matrix}
+Loading required package: Matrix
+<sparse>[ <logic> ] : .M.sub.i.logical() maybe inefficient
+> 
diff --git a/tests/simple-true.R b/tests/simple-true.R
index 400e1ca..10c93ef 100644
--- a/tests/simple-true.R
+++ b/tests/simple-true.R
@@ -166,3 +166,25 @@ all(rank(x, na.last = NA) == na.omit(rxK))
 ## as.list.function() instead of *.default():
 identical(as.list(as.list),
 	  alist(x = , ... = , UseMethod("as.list")))
+
+## startsWith() / endsWith()  assertions
+t1 <- c("Foobar", "bla bla", "something", "another", "blu", "brown",
+        "blau blüht der Enzian")# non-ASCII
+t2 <- c("some text", "any text")
+t3 <- c("Martin", "Zürich", "Mächler")
+
+all(endsWith(t1, "")); all(startsWith(t1, ""))
+all(endsWith(t2, "")); all(startsWith(t2, ""))
+all(endsWith(t3, "")); all(startsWith(t3, ""))
+all(endsWith(t2, "text"))
+all(endsWith(t2, " text"))
+identical(startsWith(t1, "b" ), c(FALSE, TRUE, FALSE, FALSE, TRUE,  TRUE, TRUE))
+identical(startsWith(t1, "bl"), c(FALSE, TRUE, FALSE, FALSE, TRUE, FALSE, TRUE))
+identical(startsWith(t1, "bla"),c(FALSE, TRUE, FALSE, FALSE,FALSE, FALSE, TRUE))
+identical(  endsWith(t1, "n"),  c(FALSE,FALSE, FALSE, FALSE,FALSE,  TRUE, TRUE))
+identical(  endsWith(t1, "an"), c(FALSE,FALSE, FALSE, FALSE,FALSE, FALSE, TRUE))
+##
+identical(startsWith(t3, "M" ), c( TRUE, FALSE, TRUE))
+identical(startsWith(t3, "Ma"), c( TRUE, FALSE, FALSE))
+identical(startsWith(t3, "Mä"), c(FALSE, FALSE, TRUE))
+
diff --git a/tests/simple-true.Rout.save b/tests/simple-true.Rout.save
index d8a49fd..5f23da6 100644
--- a/tests/simple-true.Rout.save
+++ b/tests/simple-true.Rout.save
@@ -1,7 +1,7 @@
 
-R version 3.1.2 RC (2014-10-29 r66897) -- "Pumpkin Helmet"
-Copyright (C) 2014 The R Foundation for Statistical Computing
-Platform: x86_64-unknown-linux-gnu (64-bit)
+R version 3.4.0 RC (2017-04-18 r72543) -- "You Stupid Darkness"
+Copyright (C) 2017 The R Foundation for Statistical Computing
+Platform: x86_64-pc-linux-gnu (64-bit)
 
 R is free software and comes with ABSOLUTELY NO WARRANTY.
 You are welcome to redistribute it under certain conditions.
@@ -262,3 +262,41 @@ Error in parse(text = "12iL") : <text>:1:4: unexpected symbol
 + 	  alist(x = , ... = , UseMethod("as.list")))
 [1] TRUE
 > 
+> ## startsWith() / endsWith()  assertions
+> t1 <- c("Foobar", "bla bla", "something", "another", "blu", "brown",
++         "blau blüht der Enzian")# non-ASCII
+> t2 <- c("some text", "any text")
+> t3 <- c("Martin", "Zürich", "Mächler")
+> 
+> all(endsWith(t1, "")); all(startsWith(t1, ""))
+[1] TRUE
+[1] TRUE
+> all(endsWith(t2, "")); all(startsWith(t2, ""))
+[1] TRUE
+[1] TRUE
+> all(endsWith(t3, "")); all(startsWith(t3, ""))
+[1] TRUE
+[1] TRUE
+> all(endsWith(t2, "text"))
+[1] TRUE
+> all(endsWith(t2, " text"))
+[1] TRUE
+> identical(startsWith(t1, "b" ), c(FALSE, TRUE, FALSE, FALSE, TRUE,  TRUE, TRUE))
+[1] TRUE
+> identical(startsWith(t1, "bl"), c(FALSE, TRUE, FALSE, FALSE, TRUE, FALSE, TRUE))
+[1] TRUE
+> identical(startsWith(t1, "bla"),c(FALSE, TRUE, FALSE, FALSE,FALSE, FALSE, TRUE))
+[1] TRUE
+> identical(  endsWith(t1, "n"),  c(FALSE,FALSE, FALSE, FALSE,FALSE,  TRUE, TRUE))
+[1] TRUE
+> identical(  endsWith(t1, "an"), c(FALSE,FALSE, FALSE, FALSE,FALSE, FALSE, TRUE))
+[1] TRUE
+> ##
+> identical(startsWith(t3, "M" ), c( TRUE, FALSE, TRUE))
+[1] TRUE
+> identical(startsWith(t3, "Ma"), c( TRUE, FALSE, FALSE))
+[1] TRUE
+> identical(startsWith(t3, "Mä"), c(FALSE, FALSE, TRUE))
+[1] TRUE
+> 
+> 
diff --git a/tests/test-system.Rout.save b/tests/test-system.Rout.save
index 447c6ee..4736522 100644
--- a/tests/test-system.Rout.save
+++ b/tests/test-system.Rout.save
@@ -1,8 +1,7 @@
 
-R version 2.13.0 Under development (unstable) (2010-11-15 r53605)
-Copyright (C) 2010 The R Foundation for Statistical Computing
-ISBN 3-900051-07-0
-Platform: i386-apple-darwin9.8.0/i386 (32-bit)
+R version 3.4.0 RC (2017-04-18 r72543) -- "You Stupid Darkness"
+Copyright (C) 2017 The R Foundation for Statistical Computing
+Platform: x86_64-pc-linux-gnu (64-bit)
 
 R is free software and comes with ABSOLUTELY NO WARRANTY.
 You are welcome to redistribute it under certain conditions.
@@ -274,6 +273,8 @@ stderr 1
 stderr 1
 Warning: running command 'test-system2 6' had status 6
 [1] "stdout 1"
+attr(,"status")
+[1] 6
 > print(system2("test-system2", "7"))
 stdout 1
 stderr 1
@@ -282,4 +283,6 @@ stderr 1
 stderr 1
 Warning: running command ''test-system2' 8' had status 8
 [1] "stdout 1"
+attr(,"status")
+[1] 8
 > 
diff --git a/tools/GETCONFIG b/tools/GETCONFIG
index cea635c..c93ec08 100644
--- a/tools/GETCONFIG
+++ b/tools/GETCONFIG
@@ -24,10 +24,15 @@ line=`grep "ENABLE_NLS" config.h`
 echo "${line}"
 line=`grep "HAVE_AQUA" config.h`
 echo "${line}"
-line=`grep "SUPPORT_OPENMP" config.h`
-echo "${line}"
+echo "/* NB: the rest are for the C compiler used to build R:"
+echo "   they do not necessarily apply to a C++ compiler */"
 line=`grep "SIZEOF_SIZE_T" config.h`
 echo "${line}"
+line=`grep "HAVE_ALLOCA_H" config.h`
+echo "${line}"
+echo "/* optional C99 type */"
+line=`grep "HAVE_UINTPTR_T" config.h`
+echo "${line}"
 echo
 echo "#endif /* not R_CONFIG_H */"
 echo
diff --git a/tools/README b/tools/README
index abd29c1..166847f 100644
--- a/tools/README
+++ b/tools/README
@@ -72,8 +72,8 @@ The files are as follows.
 	create links with simplified names to these.
 
   updatefat
-	updates a fat file by adding a new architecture (Mac OS X only)
-	it is essentially a smart wrapper for "lipo".
+	updates a fat file by adding a new architecture (macOS only)
+	it is essentially a smart wrapper for "lipo".  (No longer used.)
 
 GETCONFIG, GETVERSION, copy-if-change and move-if-change are used on Windows,
-and require cmp, cp, echo, expr, grep, mv and sed.
\ No newline at end of file
+and require cmp, cp, echo, expr, grep, mv and sed.
diff --git a/tools/config.guess b/tools/config.guess
index 3a55f3d..cabd89a 100755
--- a/tools/config.guess
+++ b/tools/config.guess
@@ -1,8 +1,8 @@
 #! /bin/sh
 # Attempt to guess a canonical system name.
-#   Copyright 1992-2014 Free Software Foundation, Inc.
+#   Copyright 1992-2016 Free Software Foundation, Inc.
 
-timestamp='2014-03-02'
+timestamp='2016-11-24'
 
 # This file is free software; you can redistribute it and/or modify it
 # under the terms of the GNU General Public License as published by
@@ -24,12 +24,12 @@ timestamp='2014-03-02'
 # program.  This Exception is an additional permission under section 7
 # of the GNU General Public License, version 3 ("GPLv3").
 #
-# Originally written by Per Bothner.
+# Originally written by Per Bothner; maintained since 2000 by Ben Elliston.
 #
 # You can get the latest version of this script from:
-# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
+# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess
 #
-# Please send patches with a ChangeLog entry to config-patches at gnu.org.
+# Please send patches to <config-patches at gnu.org>.
 
 
 me=`echo "$0" | sed -e 's,.*/,,'`
@@ -50,7 +50,7 @@ version="\
 GNU config.guess ($timestamp)
 
 Originally written by Per Bothner.
-Copyright 1992-2014 Free Software Foundation, Inc.
+Copyright 1992-2016 Free Software Foundation, Inc.
 
 This is free software; see the source for copying conditions.  There is NO
 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
@@ -168,19 +168,29 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
 	# Note: NetBSD doesn't particularly care about the vendor
 	# portion of the name.  We always set it to "unknown".
 	sysctl="sysctl -n hw.machine_arch"
-	UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \
-	    /usr/sbin/$sysctl 2>/dev/null || echo unknown)`
+	UNAME_MACHINE_ARCH=`(uname -p 2>/dev/null || \
+	    /sbin/$sysctl 2>/dev/null || \
+	    /usr/sbin/$sysctl 2>/dev/null || \
+	    echo unknown)`
 	case "${UNAME_MACHINE_ARCH}" in
 	    armeb) machine=armeb-unknown ;;
 	    arm*) machine=arm-unknown ;;
 	    sh3el) machine=shl-unknown ;;
 	    sh3eb) machine=sh-unknown ;;
 	    sh5el) machine=sh5le-unknown ;;
+	    earmv*)
+		arch=`echo ${UNAME_MACHINE_ARCH} | sed -e 's,^e\(armv[0-9]\).*$,\1,'`
+		endian=`echo ${UNAME_MACHINE_ARCH} | sed -ne 's,^.*\(eb\)$,\1,p'`
+		machine=${arch}${endian}-unknown
+		;;
 	    *) machine=${UNAME_MACHINE_ARCH}-unknown ;;
 	esac
 	# The Operating System including object format, if it has switched
-	# to ELF recently, or will in the future.
+	# to ELF recently (or will in the future) and ABI.
 	case "${UNAME_MACHINE_ARCH}" in
+	    earm*)
+		os=netbsdelf
+		;;
 	    arm*|i386|m68k|ns32k|sh3*|sparc|vax)
 		eval $set_cc_for_build
 		if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
@@ -197,6 +207,13 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
 		os=netbsd
 		;;
 	esac
+	# Determine ABI tags.
+	case "${UNAME_MACHINE_ARCH}" in
+	    earm*)
+		expr='s/^earmv[0-9]/-eabi/;s/eb$//'
+		abi=`echo ${UNAME_MACHINE_ARCH} | sed -e "$expr"`
+		;;
+	esac
 	# The OS release
 	# Debian GNU/NetBSD machines have a different userland, and
 	# thus, need a distinct triplet. However, they do not need
@@ -207,13 +224,13 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
 		release='-gnu'
 		;;
 	    *)
-		release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
+		release=`echo ${UNAME_RELEASE} | sed -e 's/[-_].*//' | cut -d. -f1,2`
 		;;
 	esac
 	# Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
 	# contains redundant information, the shorter form:
 	# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
-	echo "${machine}-${os}${release}"
+	echo "${machine}-${os}${release}${abi}"
 	exit ;;
     *:Bitrig:*:*)
 	UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'`
@@ -223,6 +240,10 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
 	UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
 	echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE}
 	exit ;;
+    *:LibertyBSD:*:*)
+	UNAME_MACHINE_ARCH=`arch | sed 's/^.*BSD\.//'`
+	echo ${UNAME_MACHINE_ARCH}-unknown-libertybsd${UNAME_RELEASE}
+	exit ;;
     *:ekkoBSD:*:*)
 	echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE}
 	exit ;;
@@ -235,6 +256,9 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
     *:MirBSD:*:*)
 	echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE}
 	exit ;;
+    *:Sortix:*:*)
+	echo ${UNAME_MACHINE}-unknown-sortix
+	exit ;;
     alpha:OSF1:*:*)
 	case $UNAME_RELEASE in
 	*4.0)
@@ -251,42 +275,42 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
 	ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^  The alpha \(.*\) processor.*$/\1/p' | head -n 1`
 	case "$ALPHA_CPU_TYPE" in
 	    "EV4 (21064)")
-		UNAME_MACHINE="alpha" ;;
+		UNAME_MACHINE=alpha ;;
 	    "EV4.5 (21064)")
-		UNAME_MACHINE="alpha" ;;
+		UNAME_MACHINE=alpha ;;
 	    "LCA4 (21066/21068)")
-		UNAME_MACHINE="alpha" ;;
+		UNAME_MACHINE=alpha ;;
 	    "EV5 (21164)")
-		UNAME_MACHINE="alphaev5" ;;
+		UNAME_MACHINE=alphaev5 ;;
 	    "EV5.6 (21164A)")
-		UNAME_MACHINE="alphaev56" ;;
+		UNAME_MACHINE=alphaev56 ;;
 	    "EV5.6 (21164PC)")
-		UNAME_MACHINE="alphapca56" ;;
+		UNAME_MACHINE=alphapca56 ;;
 	    "EV5.7 (21164PC)")
-		UNAME_MACHINE="alphapca57" ;;
+		UNAME_MACHINE=alphapca57 ;;
 	    "EV6 (21264)")
-		UNAME_MACHINE="alphaev6" ;;
+		UNAME_MACHINE=alphaev6 ;;
 	    "EV6.7 (21264A)")
-		UNAME_MACHINE="alphaev67" ;;
+		UNAME_MACHINE=alphaev67 ;;
 	    "EV6.8CB (21264C)")
-		UNAME_MACHINE="alphaev68" ;;
+		UNAME_MACHINE=alphaev68 ;;
 	    "EV6.8AL (21264B)")
-		UNAME_MACHINE="alphaev68" ;;
+		UNAME_MACHINE=alphaev68 ;;
 	    "EV6.8CX (21264D)")
-		UNAME_MACHINE="alphaev68" ;;
+		UNAME_MACHINE=alphaev68 ;;
 	    "EV6.9A (21264/EV69A)")
-		UNAME_MACHINE="alphaev69" ;;
+		UNAME_MACHINE=alphaev69 ;;
 	    "EV7 (21364)")
-		UNAME_MACHINE="alphaev7" ;;
+		UNAME_MACHINE=alphaev7 ;;
 	    "EV7.9 (21364A)")
-		UNAME_MACHINE="alphaev79" ;;
+		UNAME_MACHINE=alphaev79 ;;
 	esac
 	# A Pn.n version is a patched version.
 	# A Vn.n version is a released version.
 	# A Tn.n version is a released field test version.
 	# A Xn.n version is an unreleased experimental baselevel.
 	# 1.2 uses "1.2" for uname -r.
-	echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+	echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz`
 	# Reset EXIT trap before exiting to avoid spurious non-zero exit code.
 	exitcode=$?
 	trap '' 0
@@ -359,16 +383,16 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
 	exit ;;
     i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
 	eval $set_cc_for_build
-	SUN_ARCH="i386"
+	SUN_ARCH=i386
 	# If there is a compiler, see if it is configured for 64-bit objects.
 	# Note that the Sun cc does not turn __LP64__ into 1 like gcc does.
 	# This test works for both compilers.
-	if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
+	if [ "$CC_FOR_BUILD" != no_compiler_found ]; then
 	    if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \
-		(CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
+		(CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
 		grep IS_64BIT_ARCH >/dev/null
 	    then
-		SUN_ARCH="x86_64"
+		SUN_ARCH=x86_64
 	    fi
 	fi
 	echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
@@ -393,7 +417,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
 	exit ;;
     sun*:*:4.2BSD:*)
 	UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
-	test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3
+	test "x${UNAME_RELEASE}" = x && UNAME_RELEASE=3
 	case "`/bin/arch`" in
 	    sun3)
 		echo m68k-sun-sunos${UNAME_RELEASE}
@@ -579,8 +603,9 @@ EOF
 	else
 		IBM_ARCH=powerpc
 	fi
-	if [ -x /usr/bin/oslevel ] ; then
-		IBM_REV=`/usr/bin/oslevel`
+	if [ -x /usr/bin/lslpp ] ; then
+		IBM_REV=`/usr/bin/lslpp -Lqc bos.rte.libc |
+			   awk -F: '{ print $3 }' | sed s/[0-9]*$/0/`
 	else
 		IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
 	fi
@@ -617,13 +642,13 @@ EOF
 		    sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
 		    sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
 		    case "${sc_cpu_version}" in
-		      523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
-		      528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1
+		      523) HP_ARCH=hppa1.0 ;; # CPU_PA_RISC1_0
+		      528) HP_ARCH=hppa1.1 ;; # CPU_PA_RISC1_1
 		      532)                      # CPU_PA_RISC2_0
 			case "${sc_kernel_bits}" in
-			  32) HP_ARCH="hppa2.0n" ;;
-			  64) HP_ARCH="hppa2.0w" ;;
-			  '') HP_ARCH="hppa2.0" ;;   # HP-UX 10.20
+			  32) HP_ARCH=hppa2.0n ;;
+			  64) HP_ARCH=hppa2.0w ;;
+			  '') HP_ARCH=hppa2.0 ;;   # HP-UX 10.20
 			esac ;;
 		    esac
 		fi
@@ -662,11 +687,11 @@ EOF
 		    exit (0);
 		}
 EOF
-		    (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
+		    (CCOPTS="" $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
 		    test -z "$HP_ARCH" && HP_ARCH=hppa
 		fi ;;
 	esac
-	if [ ${HP_ARCH} = "hppa2.0w" ]
+	if [ ${HP_ARCH} = hppa2.0w ]
 	then
 	    eval $set_cc_for_build
 
@@ -679,12 +704,12 @@ EOF
 	    # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess
 	    # => hppa64-hp-hpux11.23
 
-	    if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) |
+	    if echo __LP64__ | (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) |
 		grep -q __LP64__
 	    then
-		HP_ARCH="hppa2.0w"
+		HP_ARCH=hppa2.0w
 	    else
-		HP_ARCH="hppa64"
+		HP_ARCH=hppa64
 	    fi
 	fi
 	echo ${HP_ARCH}-hp-hpux${HPUX_REV}
@@ -789,14 +814,14 @@ EOF
 	echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
 	exit ;;
     F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
-	FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
-	FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
+	FUJITSU_PROC=`uname -m | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz`
+	FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'`
 	FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
 	echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
 	exit ;;
     5000:UNIX_System_V:4.*:*)
-	FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
-	FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'`
+	FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'`
+	FUJITSU_REL=`echo ${UNAME_RELEASE} | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/ /_/'`
 	echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
 	exit ;;
     i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
@@ -826,7 +851,7 @@ EOF
     *:MINGW*:*)
 	echo ${UNAME_MACHINE}-pc-mingw32
 	exit ;;
-    i*:MSYS*:*)
+    *:MSYS*:*)
 	echo ${UNAME_MACHINE}-pc-msys
 	exit ;;
     i*:windows32*:*)
@@ -878,7 +903,7 @@ EOF
 	exit ;;
     *:GNU/*:*:*)
 	# other systems with GNU libc and userland
-	echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-${LIBC}
+	echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr "[:upper:]" "[:lower:]"``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-${LIBC}
 	exit ;;
     i*86:Minix:*:*)
 	echo ${UNAME_MACHINE}-pc-minix
@@ -901,7 +926,7 @@ EOF
 	  EV68*) UNAME_MACHINE=alphaev68 ;;
 	esac
 	objdump --private-headers /bin/sh | grep -q ld.so.1
-	if test "$?" = 0 ; then LIBC="gnulibc1" ; fi
+	if test "$?" = 0 ; then LIBC=gnulibc1 ; fi
 	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
 	exit ;;
     arc:Linux:*:* | arceb:Linux:*:*)
@@ -932,6 +957,9 @@ EOF
     crisv32:Linux:*:*)
 	echo ${UNAME_MACHINE}-axis-linux-${LIBC}
 	exit ;;
+    e2k:Linux:*:*)
+	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+	exit ;;
     frv:Linux:*:*)
 	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
 	exit ;;
@@ -944,6 +972,9 @@ EOF
     ia64:Linux:*:*)
 	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
 	exit ;;
+    k1om:Linux:*:*)
+	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+	exit ;;
     m32r*:Linux:*:*)
 	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
 	exit ;;
@@ -969,10 +1000,13 @@ EOF
 	eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'`
 	test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; }
 	;;
-    or1k:Linux:*:*)
+    mips64el:Linux:*:*)
 	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
 	exit ;;
-    or32:Linux:*:*)
+    openrisc*:Linux:*:*)
+	echo or1k-unknown-linux-${LIBC}
+	exit ;;
+    or32:Linux:*:* | or1k*:Linux:*:*)
 	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
 	exit ;;
     padre:Linux:*:*)
@@ -1001,6 +1035,9 @@ EOF
     ppcle:Linux:*:*)
 	echo powerpcle-unknown-linux-${LIBC}
 	exit ;;
+    riscv32:Linux:*:* | riscv64:Linux:*:*)
+	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+	exit ;;
     s390:Linux:*:* | s390x:Linux:*:*)
 	echo ${UNAME_MACHINE}-ibm-linux-${LIBC}
 	exit ;;
@@ -1020,7 +1057,7 @@ EOF
 	echo ${UNAME_MACHINE}-dec-linux-${LIBC}
 	exit ;;
     x86_64:Linux:*:*)
-	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+	echo ${UNAME_MACHINE}-pc-linux-${LIBC}
 	exit ;;
     xtensa*:Linux:*:*)
 	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
@@ -1099,7 +1136,7 @@ EOF
 	# uname -m prints for DJGPP always 'pc', but it prints nothing about
 	# the processor, so we play safe by assuming i586.
 	# Note: whatever this is, it MUST be the same as what config.sub
-	# prints for the "djgpp" host, or else GDB configury will decide that
+	# prints for the "djgpp" host, or else GDB configure will decide that
 	# this is a cross-build.
 	echo i586-pc-msdosdjgpp
 	exit ;;
@@ -1248,6 +1285,9 @@ EOF
     SX-8R:SUPER-UX:*:*)
 	echo sx8r-nec-superux${UNAME_RELEASE}
 	exit ;;
+    SX-ACE:SUPER-UX:*:*)
+	echo sxace-nec-superux${UNAME_RELEASE}
+	exit ;;
     Power*:Rhapsody:*:*)
 	echo powerpc-apple-rhapsody${UNAME_RELEASE}
 	exit ;;
@@ -1261,9 +1301,9 @@ EOF
 	    UNAME_PROCESSOR=powerpc
 	fi
 	if test `echo "$UNAME_RELEASE" | sed -e 's/\..*//'` -le 10 ; then
-	    if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
+	    if [ "$CC_FOR_BUILD" != no_compiler_found ]; then
 		if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
-		    (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
+		    (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
 		    grep IS_64BIT_ARCH >/dev/null
 		then
 		    case $UNAME_PROCESSOR in
@@ -1285,7 +1325,7 @@ EOF
 	exit ;;
     *:procnto*:*:* | *:QNX:[0123456789]*:*)
 	UNAME_PROCESSOR=`uname -p`
-	if test "$UNAME_PROCESSOR" = "x86"; then
+	if test "$UNAME_PROCESSOR" = x86; then
 		UNAME_PROCESSOR=i386
 		UNAME_MACHINE=pc
 	fi
@@ -1316,7 +1356,7 @@ EOF
 	# "uname -m" is not consistent, so use $cputype instead. 386
 	# is converted to i386 for consistency with other x86
 	# operating systems.
-	if test "$cputype" = "386"; then
+	if test "$cputype" = 386; then
 	    UNAME_MACHINE=i386
 	else
 	    UNAME_MACHINE="$cputype"
@@ -1358,7 +1398,7 @@ EOF
 	echo i386-pc-xenix
 	exit ;;
     i*86:skyos:*:*)
-	echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//'
+	echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE} | sed -e 's/ .*$//'`
 	exit ;;
     i*86:rdos:*:*)
 	echo ${UNAME_MACHINE}-pc-rdos
@@ -1369,23 +1409,25 @@ EOF
     x86_64:VMkernel:*:*)
 	echo ${UNAME_MACHINE}-unknown-esx
 	exit ;;
+    amd64:Isilon\ OneFS:*:*)
+	echo x86_64-unknown-onefs
+	exit ;;
 esac
 
 cat >&2 <<EOF
 $0: unable to guess system type
 
-This script, last modified $timestamp, has failed to recognize
-the operating system you are using. It is advised that you
-download the most up to date version of the config scripts from
+This script (version $timestamp), has failed to recognize the
+operating system you are using. If your script is old, overwrite
+config.guess and config.sub with the latest versions from:
 
-  http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
+  http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess
 and
-  http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
+  http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub
 
-If the version you run ($0) is already up to date, please
-send the following data and any information you think might be
-pertinent to <config-patches at gnu.org> in order to provide the needed
-information to handle your system.
+If $0 has already been updated, send the following data and any
+information you think might be pertinent to config-patches at gnu.org to
+provide the necessary information to handle your system.
 
 config.guess timestamp = $timestamp
 
diff --git a/tools/config.sub b/tools/config.sub
index 3f74026..4175025 100755
--- a/tools/config.sub
+++ b/tools/config.sub
@@ -1,8 +1,8 @@
 #! /bin/sh
 # Configuration validation subroutine script.
-#   Copyright 1992-2014 Free Software Foundation, Inc.
+#   Copyright 1992-2016 Free Software Foundation, Inc.
 
-timestamp='2014-03-02'
+timestamp='2016-11-24'
 
 # This file is free software; you can redistribute it and/or modify it
 # under the terms of the GNU General Public License as published by
@@ -25,7 +25,7 @@ timestamp='2014-03-02'
 # of the GNU General Public License, version 3 ("GPLv3").
 
 
-# Please send patches with a ChangeLog entry to config-patches at gnu.org.
+# Please send patches to <config-patches at gnu.org>.
 #
 # Configuration subroutine to validate and canonicalize a configuration type.
 # Supply the specified configuration type as an argument.
@@ -33,7 +33,7 @@ timestamp='2014-03-02'
 # Otherwise, we print the canonical config type on stdout and succeed.
 
 # You can get the latest version of this script from:
-# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
+# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub
 
 # This file is supposed to be the same for all GNU packages
 # and recognize all the CPU types, system types and aliases
@@ -53,8 +53,7 @@ timestamp='2014-03-02'
 me=`echo "$0" | sed -e 's,.*/,,'`
 
 usage="\
-Usage: $0 [OPTION] CPU-MFR-OPSYS
-       $0 [OPTION] ALIAS
+Usage: $0 [OPTION] CPU-MFR-OPSYS or ALIAS
 
 Canonicalize a configuration name.
 
@@ -68,7 +67,7 @@ Report bugs and patches to <config-patches at gnu.org>."
 version="\
 GNU config.sub ($timestamp)
 
-Copyright 1992-2014 Free Software Foundation, Inc.
+Copyright 1992-2016 Free Software Foundation, Inc.
 
 This is free software; see the source for copying conditions.  There is NO
 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
@@ -117,8 +116,8 @@ maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
 case $maybe_os in
   nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \
   linux-musl* | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \
-  knetbsd*-gnu* | netbsd*-gnu* | \
-  kopensolaris*-gnu* | \
+  knetbsd*-gnu* | netbsd*-gnu* | netbsd*-eabi* | \
+  kopensolaris*-gnu* | cloudabi*-eabi* | \
   storm-chaos* | os2-emx* | rtmk-nova*)
     os=-$maybe_os
     basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
@@ -255,12 +254,13 @@ case $basic_machine in
 	| arc | arceb \
 	| arm | arm[bl]e | arme[lb] | armv[2-8] | armv[3-8][lb] | armv7[arm] \
 	| avr | avr32 \
+	| ba \
 	| be32 | be64 \
 	| bfin \
 	| c4x | c8051 | clipper \
 	| d10v | d30v | dlx | dsp16xx \
-	| epiphany \
-	| fido | fr30 | frv \
+	| e2k | epiphany \
+	| fido | fr30 | frv | ft32 \
 	| h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
 	| hexagon \
 	| i370 | i860 | i960 | ia64 \
@@ -283,8 +283,10 @@ case $basic_machine in
 	| mips64vr5900 | mips64vr5900el \
 	| mipsisa32 | mipsisa32el \
 	| mipsisa32r2 | mipsisa32r2el \
+	| mipsisa32r6 | mipsisa32r6el \
 	| mipsisa64 | mipsisa64el \
 	| mipsisa64r2 | mipsisa64r2el \
+	| mipsisa64r6 | mipsisa64r6el \
 	| mipsisa64sb1 | mipsisa64sb1el \
 	| mipsisa64sr71k | mipsisa64sr71kel \
 	| mipsr5900 | mipsr5900el \
@@ -296,14 +298,15 @@ case $basic_machine in
 	| nds32 | nds32le | nds32be \
 	| nios | nios2 | nios2eb | nios2el \
 	| ns16k | ns32k \
-	| open8 \
-	| or1k | or32 \
+	| open8 | or1k | or1knd | or32 \
 	| pdp10 | pdp11 | pj | pjl \
 	| powerpc | powerpc64 | powerpc64le | powerpcle \
+	| pru \
 	| pyramid \
+	| riscv32 | riscv64 \
 	| rl78 | rx \
 	| score \
-	| sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
+	| sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[234]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
 	| sh64 | sh64le \
 	| sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
 	| sparcv8 | sparcv9 | sparcv9b | sparcv9v \
@@ -311,6 +314,7 @@ case $basic_machine in
 	| tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \
 	| ubicom32 \
 	| v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \
+	| visium \
 	| we32k \
 	| x86 | xc16x | xstormy16 | xtensa \
 	| z8k | z80)
@@ -325,6 +329,9 @@ case $basic_machine in
 	c6x)
 		basic_machine=tic6x-unknown
 		;;
+	leon|leon[3-9])
+		basic_machine=sparc-$basic_machine
+		;;
 	m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | nvptx | picochip)
 		basic_machine=$basic_machine-unknown
 		os=-none
@@ -370,12 +377,13 @@ case $basic_machine in
 	| alphapca5[67]-* | alpha64pca5[67]-* | arc-* | arceb-* \
 	| arm-*  | armbe-* | armle-* | armeb-* | armv*-* \
 	| avr-* | avr32-* \
+	| ba-* \
 	| be32-* | be64-* \
 	| bfin-* | bs2000-* \
 	| c[123]* | c30-* | [cjt]90-* | c4x-* \
 	| c8051-* | clipper-* | craynv-* | cydra-* \
 	| d10v-* | d30v-* | dlx-* \
-	| elxsi-* \
+	| e2k-* | elxsi-* \
 	| f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \
 	| h8300-* | h8500-* \
 	| hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
@@ -402,8 +410,10 @@ case $basic_machine in
 	| mips64vr5900-* | mips64vr5900el-* \
 	| mipsisa32-* | mipsisa32el-* \
 	| mipsisa32r2-* | mipsisa32r2el-* \
+	| mipsisa32r6-* | mipsisa32r6el-* \
 	| mipsisa64-* | mipsisa64el-* \
 	| mipsisa64r2-* | mipsisa64r2el-* \
+	| mipsisa64r6-* | mipsisa64r6el-* \
 	| mipsisa64sb1-* | mipsisa64sb1el-* \
 	| mipsisa64sr71k-* | mipsisa64sr71kel-* \
 	| mipsr5900-* | mipsr5900el-* \
@@ -415,16 +425,19 @@ case $basic_machine in
 	| nios-* | nios2-* | nios2eb-* | nios2el-* \
 	| none-* | np1-* | ns16k-* | ns32k-* \
 	| open8-* \
+	| or1k*-* \
 	| orion-* \
 	| pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
 	| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \
+	| pru-* \
 	| pyramid-* \
+	| riscv32-* | riscv64-* \
 	| rl78-* | romp-* | rs6000-* | rx-* \
 	| sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
 	| shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
 	| sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
 	| sparclite-* \
-	| sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx?-* \
+	| sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx*-* \
 	| tahoe-* \
 	| tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
 	| tile*-* \
@@ -432,6 +445,7 @@ case $basic_machine in
 	| ubicom32-* \
 	| v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \
 	| vax-* \
+	| visium-* \
 	| we32k-* \
 	| x86-* | x86_64-* | xc16x-* | xps100-* \
 	| xstormy16-* | xtensa*-* \
@@ -508,6 +522,9 @@ case $basic_machine in
 		basic_machine=i386-pc
 		os=-aros
 		;;
+	asmjs)
+		basic_machine=asmjs-unknown
+		;;
 	aux)
 		basic_machine=m68k-apple
 		os=-aux
@@ -628,6 +645,14 @@ case $basic_machine in
 		basic_machine=m68k-bull
 		os=-sysv3
 		;;
+	e500v[12])
+		basic_machine=powerpc-unknown
+		os=$os"spe"
+		;;
+	e500v[12]-*)
+		basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
+		os=$os"spe"
+		;;
 	ebmon29k)
 		basic_machine=a29k-amd
 		os=-ebmon
@@ -769,6 +794,9 @@ case $basic_machine in
 		basic_machine=m68k-isi
 		os=-sysv
 		;;
+	leon-*|leon[3-9]-*)
+		basic_machine=sparc-`echo $basic_machine | sed 's/-.*//'`
+		;;
 	m68knommu)
 		basic_machine=m68k-unknown
 		os=-linux
@@ -824,6 +852,10 @@ case $basic_machine in
 		basic_machine=powerpc-unknown
 		os=-morphos
 		;;
+	moxiebox)
+		basic_machine=moxie-unknown
+		os=-moxiebox
+		;;
 	msdos)
 		basic_machine=i386-pc
 		os=-msdos
@@ -1000,7 +1032,7 @@ case $basic_machine in
 	ppc-* | ppcbe-*)
 		basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
 		;;
-	ppcle | powerpclittle | ppc-le | powerpc-little)
+	ppcle | powerpclittle)
 		basic_machine=powerpcle-unknown
 		;;
 	ppcle-* | powerpclittle-*)
@@ -1010,7 +1042,7 @@ case $basic_machine in
 		;;
 	ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'`
 		;;
-	ppc64le | powerpc64little | ppc64-le | powerpc64-little)
+	ppc64le | powerpc64little)
 		basic_machine=powerpc64le-unknown
 		;;
 	ppc64le-* | powerpc64little-*)
@@ -1356,27 +1388,28 @@ case $os in
 	      | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \
 	      | -sym* | -kopensolaris* | -plan9* \
 	      | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
-	      | -aos* | -aros* \
+	      | -aos* | -aros* | -cloudabi* | -sortix* \
 	      | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
 	      | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
 	      | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
-	      | -bitrig* | -openbsd* | -solidbsd* \
+	      | -bitrig* | -openbsd* | -solidbsd* | -libertybsd* \
 	      | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
 	      | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
 	      | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
 	      | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
-	      | -chorusos* | -chorusrdb* | -cegcc* \
+	      | -chorusos* | -chorusrdb* | -cegcc* | -glidix* \
 	      | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
-	      | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \
+	      | -midipix* | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \
 	      | -linux-newlib* | -linux-musl* | -linux-uclibc* \
-	      | -uxpv* | -beos* | -mpeix* | -udk* \
+	      | -uxpv* | -beos* | -mpeix* | -udk* | -moxiebox* \
 	      | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
 	      | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
 	      | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
 	      | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
 	      | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
 	      | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
-	      | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es*)
+	      | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es* \
+	      | -onefs* | -tirtos* | -phoenix* | -fuchsia*)
 	# Remember, each alternative MUST END IN *, to match a version number.
 		;;
 	-qnx*)
@@ -1508,6 +1541,8 @@ case $os in
 		;;
 	-nacl*)
 		;;
+	-ios)
+		;;
 	-none)
 		;;
 	*)
@@ -1594,9 +1629,6 @@ case $basic_machine in
 	mips*-*)
 		os=-elf
 		;;
-	or1k-*)
-		os=-elf
-		;;
 	or32-*)
 		os=-coff
 		;;
diff --git a/tools/ltmain.sh b/tools/ltmain.sh
index b36c4ad..0f0a2da 100644
--- a/tools/ltmain.sh
+++ b/tools/ltmain.sh
@@ -1,9 +1,12 @@
-# Generated from ltmain.m4sh.
+#! /bin/sh
+## DO NOT EDIT - This file generated from ./build-aux/ltmain.in
+##               by inline-source v2014-01-03.01
 
-# ltmain.sh (GNU libtool) 2.2.6
+# libtool (GNU libtool) 2.4.6
+# Provide generalized library-building support services.
 # Written by Gordon Matzigkeit <gord at gnu.ai.mit.edu>, 1996
 
-# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006, 2007 2008 Free Software Foundation, Inc.
+# Copyright (C) 1996-2015 Free Software Foundation, Inc.
 # This is free software; see the source for copying conditions.  There is NO
 # warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 
@@ -23,598 +26,2112 @@
 # General Public License for more details.
 #
 # You should have received a copy of the GNU General Public License
-# along with GNU Libtool; see the file COPYING.  If not, a copy
-# can be downloaded from http://www.gnu.org/licenses/gpl.html,
-# or obtained by writing to the Free Software Foundation, Inc.,
-# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
-# Usage: $progname [OPTION]... [MODE-ARG]...
-#
-# Provide generalized library-building support services.
-#
-#     --config             show all configuration variables
-#     --debug              enable verbose shell tracing
-# -n, --dry-run            display commands without modifying any files
-#     --features           display basic configuration information and exit
-#     --mode=MODE          use operation mode MODE
-#     --preserve-dup-deps  don't remove duplicate dependency libraries
-#     --quiet, --silent    don't print informational messages
-#     --tag=TAG            use configuration variables from tag TAG
-# -v, --verbose            print informational messages (default)
-#     --version            print version information
-# -h, --help               print short or long help message
-#
-# MODE must be one of the following:
-#
-#       clean              remove files from the build directory
-#       compile            compile a source file into a libtool object
-#       execute            automatically set library path, then run a program
-#       finish             complete the installation of libtool libraries
-#       install            install libraries or executables
-#       link               create a library or an executable
-#       uninstall          remove libraries from an installed directory
-#
-# MODE-ARGS vary depending on the MODE.
-# Try `$progname --help --mode=MODE' for a more detailed description of MODE.
-#
-# When reporting a bug, please describe a test case to reproduce it and
-# include the following information:
+
+PROGRAM=libtool
+PACKAGE=libtool
+VERSION=2.4.6
+package_revision=2.4.6
+
+
+## ------ ##
+## Usage. ##
+## ------ ##
+
+# Run './libtool --help' for help with using this script from the
+# command line.
+
+
+## ------------------------------- ##
+## User overridable command paths. ##
+## ------------------------------- ##
+
+# After configure completes, it has a better idea of some of the
+# shell tools we need than the defaults used by the functions shared
+# with bootstrap, so set those here where they can still be over-
+# ridden by the user, but otherwise take precedence.
+
+: ${AUTOCONF="autoconf"}
+: ${AUTOMAKE="automake"}
+
+
+## -------------------------- ##
+## Source external libraries. ##
+## -------------------------- ##
+
+# Much of our low-level functionality needs to be sourced from external
+# libraries, which are installed to $pkgauxdir.
+
+# Set a version string for this script.
+scriptversion=2015-01-20.17; # UTC
+
+# General shell script boiler plate, and helper functions.
+# Written by Gary V. Vaughan, 2004
+
+# Copyright (C) 2004-2015 Free Software Foundation, Inc.
+# This is free software; see the source for copying conditions.  There is NO
+# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+# 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.
+
+# As a special exception to the GNU General Public License, if you distribute
+# this file as part of a program or library that is built using GNU Libtool,
+# you may include this file under the same distribution terms that you use
+# for the rest of that program.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNES 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/>.
+
+# Please report bugs or propose patches to gary at gnu.org.
+
+
+## ------ ##
+## Usage. ##
+## ------ ##
+
+# Evaluate this file near the top of your script to gain access to
+# the functions and variables defined here:
 #
-#       host-triplet:	$host
-#       shell:		$SHELL
-#       compiler:		$LTCC
-#       compiler flags:		$LTCFLAGS
-#       linker:		$LD (gnu? $with_gnu_ld)
-#       $progname:		(GNU libtool) 2.2.6
-#       automake:		$automake_version
-#       autoconf:		$autoconf_version
+#   . `echo "$0" | ${SED-sed} 's|[^/]*$||'`/build-aux/funclib.sh
 #
-# Report bugs to <bug-libtool at gnu.org>.
+# If you need to override any of the default environment variable
+# settings, do that before evaluating this file.
 
-PROGRAM=ltmain.sh
-PACKAGE=libtool
-VERSION=2.2.6
-TIMESTAMP=""
-package_revision=1.3012
 
-# Be Bourne compatible
-if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
+## -------------------- ##
+## Shell normalisation. ##
+## -------------------- ##
+
+# Some shells need a little help to be as Bourne compatible as possible.
+# Before doing anything else, make sure all that help has been provided!
+
+DUALCASE=1; export DUALCASE # for MKS sh
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
   emulate sh
   NULLCMD=:
-  # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
+  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
   # is contrary to our usage.  Disable this feature.
   alias -g '${1+"$@"}'='"$@"'
   setopt NO_GLOB_SUBST
 else
-  case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac
+  case `(set -o) 2>/dev/null` in *posix*) set -o posix ;; esac
 fi
-BIN_SH=xpg4; export BIN_SH # for Tru64
-DUALCASE=1; export DUALCASE # for MKS sh
 
-# NLS nuisances: We save the old values to restore during execute mode.
-# Only set LANG and LC_ALL to C if already set.
-# These must not be set unconditionally because not all systems understand
-# e.g. LANG=C (notably SCO).
-lt_user_locale=
-lt_safe_locale=
-for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES
+# NLS nuisances: We save the old values in case they are required later.
+_G_user_locale=
+_G_safe_locale=
+for _G_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES
 do
-  eval "if test \"\${$lt_var+set}\" = set; then
-          save_$lt_var=\$$lt_var
-          $lt_var=C
-	  export $lt_var
-	  lt_user_locale=\"$lt_var=\\\$save_\$lt_var; \$lt_user_locale\"
-	  lt_safe_locale=\"$lt_var=C; \$lt_safe_locale\"
+  eval "if test set = \"\${$_G_var+set}\"; then
+          save_$_G_var=\$$_G_var
+          $_G_var=C
+	  export $_G_var
+	  _G_user_locale=\"$_G_var=\\\$save_\$_G_var; \$_G_user_locale\"
+	  _G_safe_locale=\"$_G_var=C; \$_G_safe_locale\"
 	fi"
 done
 
-$lt_unset CDPATH
+# CDPATH.
+(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+
+# Make sure IFS has a sensible default
+sp=' '
+nl='
+'
+IFS="$sp	$nl"
+
+# There are apparently some retarded systems that use ';' as a PATH separator!
+if test "${PATH_SEPARATOR+set}" != set; then
+  PATH_SEPARATOR=:
+  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
+    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
+      PATH_SEPARATOR=';'
+  }
+fi
+
+
+
+## ------------------------- ##
+## Locate command utilities. ##
+## ------------------------- ##
+
+
+# func_executable_p FILE
+# ----------------------
+# Check that FILE is an executable regular file.
+func_executable_p ()
+{
+    test -f "$1" && test -x "$1"
+}
+
+
+# func_path_progs PROGS_LIST CHECK_FUNC [PATH]
+# --------------------------------------------
+# Search for either a program that responds to --version with output
+# containing "GNU", or else returned by CHECK_FUNC otherwise, by
+# trying all the directories in PATH with each of the elements of
+# PROGS_LIST.
+#
+# CHECK_FUNC should accept the path to a candidate program, and
+# set $func_check_prog_result if it truncates its output less than
+# $_G_path_prog_max characters.
+func_path_progs ()
+{
+    _G_progs_list=$1
+    _G_check_func=$2
+    _G_PATH=${3-"$PATH"}
+
+    _G_path_prog_max=0
+    _G_path_prog_found=false
+    _G_save_IFS=$IFS; IFS=${PATH_SEPARATOR-:}
+    for _G_dir in $_G_PATH; do
+      IFS=$_G_save_IFS
+      test -z "$_G_dir" && _G_dir=.
+      for _G_prog_name in $_G_progs_list; do
+        for _exeext in '' .EXE; do
+          _G_path_prog=$_G_dir/$_G_prog_name$_exeext
+          func_executable_p "$_G_path_prog" || continue
+          case `"$_G_path_prog" --version 2>&1` in
+            *GNU*) func_path_progs_result=$_G_path_prog _G_path_prog_found=: ;;
+            *)     $_G_check_func $_G_path_prog
+		   func_path_progs_result=$func_check_prog_result
+		   ;;
+          esac
+          $_G_path_prog_found && break 3
+        done
+      done
+    done
+    IFS=$_G_save_IFS
+    test -z "$func_path_progs_result" && {
+      echo "no acceptable sed could be found in \$PATH" >&2
+      exit 1
+    }
+}
+
+
+# We want to be able to use the functions in this file before configure
+# has figured out where the best binaries are kept, which means we have
+# to search for them ourselves - except when the results are already set
+# where we skip the searches.
+
+# Unless the user overrides by setting SED, search the path for either GNU
+# sed, or the sed that truncates its output the least.
+test -z "$SED" && {
+  _G_sed_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
+  for _G_i in 1 2 3 4 5 6 7; do
+    _G_sed_script=$_G_sed_script$nl$_G_sed_script
+  done
+  echo "$_G_sed_script" 2>/dev/null | sed 99q >conftest.sed
+  _G_sed_script=
+
+  func_check_prog_sed ()
+  {
+    _G_path_prog=$1
+
+    _G_count=0
+    printf 0123456789 >conftest.in
+    while :
+    do
+      cat conftest.in conftest.in >conftest.tmp
+      mv conftest.tmp conftest.in
+      cp conftest.in conftest.nl
+      echo '' >> conftest.nl
+      "$_G_path_prog" -f conftest.sed <conftest.nl >conftest.out 2>/dev/null || break
+      diff conftest.out conftest.nl >/dev/null 2>&1 || break
+      _G_count=`expr $_G_count + 1`
+      if test "$_G_count" -gt "$_G_path_prog_max"; then
+        # Best one so far, save it but keep looking for a better one
+        func_check_prog_result=$_G_path_prog
+        _G_path_prog_max=$_G_count
+      fi
+      # 10*(2^10) chars as input seems more than enough
+      test 10 -lt "$_G_count" && break
+    done
+    rm -f conftest.in conftest.tmp conftest.nl conftest.out
+  }
+
+  func_path_progs "sed gsed" func_check_prog_sed $PATH:/usr/xpg4/bin
+  rm -f conftest.sed
+  SED=$func_path_progs_result
+}
+
+
+# Unless the user overrides by setting GREP, search the path for either GNU
+# grep, or the grep that truncates its output the least.
+test -z "$GREP" && {
+  func_check_prog_grep ()
+  {
+    _G_path_prog=$1
+
+    _G_count=0
+    _G_path_prog_max=0
+    printf 0123456789 >conftest.in
+    while :
+    do
+      cat conftest.in conftest.in >conftest.tmp
+      mv conftest.tmp conftest.in
+      cp conftest.in conftest.nl
+      echo 'GREP' >> conftest.nl
+      "$_G_path_prog" -e 'GREP$' -e '-(cannot match)-' <conftest.nl >conftest.out 2>/dev/null || break
+      diff conftest.out conftest.nl >/dev/null 2>&1 || break
+      _G_count=`expr $_G_count + 1`
+      if test "$_G_count" -gt "$_G_path_prog_max"; then
+        # Best one so far, save it but keep looking for a better one
+        func_check_prog_result=$_G_path_prog
+        _G_path_prog_max=$_G_count
+      fi
+      # 10*(2^10) chars as input seems more than enough
+      test 10 -lt "$_G_count" && break
+    done
+    rm -f conftest.in conftest.tmp conftest.nl conftest.out
+  }
 
+  func_path_progs "grep ggrep" func_check_prog_grep $PATH:/usr/xpg4/bin
+  GREP=$func_path_progs_result
+}
 
 
+## ------------------------------- ##
+## User overridable command paths. ##
+## ------------------------------- ##
 
+# All uppercase variable names are used for environment variables.  These
+# variables can be overridden by the user before calling a script that
+# uses them if a suitable command of that name is not already available
+# in the command search PATH.
 
 : ${CP="cp -f"}
-: ${ECHO="echo"}
-: ${EGREP="/usr/bin/grep -E"}
-: ${FGREP="/usr/bin/grep -F"}
-: ${GREP="/usr/bin/grep"}
+: ${ECHO="printf %s\n"}
+: ${EGREP="$GREP -E"}
+: ${FGREP="$GREP -F"}
 : ${LN_S="ln -s"}
 : ${MAKE="make"}
 : ${MKDIR="mkdir"}
 : ${MV="mv -f"}
 : ${RM="rm -f"}
-: ${SED="/opt/local/bin/gsed"}
 : ${SHELL="${CONFIG_SHELL-/bin/sh}"}
-: ${Xsed="$SED -e 1s/^X//"}
 
-# Global variables:
+
+## -------------------- ##
+## Useful sed snippets. ##
+## -------------------- ##
+
+sed_dirname='s|/[^/]*$||'
+sed_basename='s|^.*/||'
+
+# Sed substitution that helps us do robust quoting.  It backslashifies
+# metacharacters that are still active within double-quoted strings.
+sed_quote_subst='s|\([`"$\\]\)|\\\1|g'
+
+# Same as above, but do not quote variable references.
+sed_double_quote_subst='s/\(["`\\]\)/\\\1/g'
+
+# Sed substitution that turns a string into a regex matching for the
+# string literally.
+sed_make_literal_regex='s|[].[^$\\*\/]|\\&|g'
+
+# Sed substitution that converts a w32 file name or path
+# that contains forward slashes, into one that contains
+# (escaped) backslashes.  A very naive implementation.
+sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g'
+
+# Re-'\' parameter expansions in output of sed_double_quote_subst that
+# were '\'-ed in input to the same.  If an odd number of '\' preceded a
+# '$' in input to sed_double_quote_subst, that '$' was protected from
+# expansion.  Since each input '\' is now two '\'s, look for any number
+# of runs of four '\'s followed by two '\'s and then a '$'.  '\' that '$'.
+_G_bs='\\'
+_G_bs2='\\\\'
+_G_bs4='\\\\\\\\'
+_G_dollar='\$'
+sed_double_backslash="\
+  s/$_G_bs4/&\\
+/g
+  s/^$_G_bs2$_G_dollar/$_G_bs&/
+  s/\\([^$_G_bs]\\)$_G_bs2$_G_dollar/\\1$_G_bs2$_G_bs$_G_dollar/g
+  s/\n//g"
+
+
+## ----------------- ##
+## Global variables. ##
+## ----------------- ##
+
+# Except for the global variables explicitly listed below, the following
+# functions in the '^func_' namespace, and the '^require_' namespace
+# variables initialised in the 'Resource management' section, sourcing
+# this file will not pollute your global namespace with anything
+# else. There's no portable way to scope variables in Bourne shell
+# though, so actually running these functions will sometimes place
+# results into a variable named after the function, and often use
+# temporary variables in the '^_G_' namespace. If you are careful to
+# avoid using those namespaces casually in your sourcing script, things
+# should continue to work as you expect. And, of course, you can freely
+# overwrite any of the functions or variables defined here before
+# calling anything to customize them.
+
 EXIT_SUCCESS=0
 EXIT_FAILURE=1
 EXIT_MISMATCH=63  # $? = 63 is used to indicate version mismatch to missing.
 EXIT_SKIP=77	  # $? = 77 is used to indicate a skipped test to automake.
 
-exit_status=$EXIT_SUCCESS
-
-# Make sure IFS has a sensible default
-lt_nl='
-'
-IFS=" 	$lt_nl"
-
-dirname="s,/[^/]*$,,"
-basename="s,^.*/,,"
-
-# func_dirname_and_basename file append nondir_replacement
-# perform func_basename and func_dirname in a single function
-# call:
-#   dirname:  Compute the dirname of FILE.  If nonempty,
-#             add APPEND to the result, otherwise set result
-#             to NONDIR_REPLACEMENT.
-#             value returned in "$func_dirname_result"
-#   basename: Compute filename of FILE.
-#             value retuned in "$func_basename_result"
-# Implementation must be kept synchronized with func_dirname
-# and func_basename. For efficiency, we do not delegate to
-# those functions but instead duplicate the functionality here.
-func_dirname_and_basename ()
-{
-  # Extract subdirectory from the argument.
-  func_dirname_result=`$ECHO "X${1}" | $Xsed -e "$dirname"`
-  if test "X$func_dirname_result" = "X${1}"; then
-    func_dirname_result="${3}"
-  else
-    func_dirname_result="$func_dirname_result${2}"
-  fi
-  func_basename_result=`$ECHO "X${1}" | $Xsed -e "$basename"`
-}
+# Allow overriding, eg assuming that you follow the convention of
+# putting '$debug_cmd' at the start of all your functions, you can get
+# bash to show function call trace with:
+#
+#    debug_cmd='eval echo "${FUNCNAME[0]} $*" >&2' bash your-script-name
+debug_cmd=${debug_cmd-":"}
+exit_cmd=:
 
-# Generated shell functions inserted here.
+# By convention, finish your script with:
+#
+#    exit $exit_status
+#
+# so that you can set exit_status to non-zero if you want to indicate
+# something went wrong during execution without actually bailing out at
+# the point of failure.
+exit_status=$EXIT_SUCCESS
 
 # Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh
 # is ksh but when the shell is invoked as "sh" and the current value of
 # the _XPG environment variable is not equal to 1 (one), the special
 # positional parameter $0, within a function call, is the name of the
 # function.
-progpath="$0"
-
-# The name of this program:
-# In the unlikely event $progname began with a '-', it would play havoc with
-# func_echo (imagine progname=-n), so we prepend ./ in that case:
-func_dirname_and_basename "$progpath"
-progname=$func_basename_result
-case $progname in
-  -*) progname=./$progname ;;
-esac
+progpath=$0
+
+# The name of this program.
+progname=`$ECHO "$progpath" |$SED "$sed_basename"`
 
-# Make sure we have an absolute path for reexecution:
+# Make sure we have an absolute progpath for reexecution:
 case $progpath in
   [\\/]*|[A-Za-z]:\\*) ;;
   *[\\/]*)
-     progdir=$func_dirname_result
+     progdir=`$ECHO "$progpath" |$SED "$sed_dirname"`
      progdir=`cd "$progdir" && pwd`
-     progpath="$progdir/$progname"
+     progpath=$progdir/$progname
      ;;
   *)
-     save_IFS="$IFS"
-     IFS=:
+     _G_IFS=$IFS
+     IFS=${PATH_SEPARATOR-:}
      for progdir in $PATH; do
-       IFS="$save_IFS"
+       IFS=$_G_IFS
        test -x "$progdir/$progname" && break
      done
-     IFS="$save_IFS"
+     IFS=$_G_IFS
      test -n "$progdir" || progdir=`pwd`
-     progpath="$progdir/$progname"
+     progpath=$progdir/$progname
      ;;
 esac
 
-# Sed substitution that helps us do robust quoting.  It backslashifies
-# metacharacters that are still active within double-quoted strings.
-Xsed="${SED}"' -e 1s/^X//'
-sed_quote_subst='s/\([`"$\\]\)/\\\1/g'
 
-# Same as above, but do not quote variable references.
-double_quote_subst='s/\(["`\\]\)/\\\1/g'
-
-# Re-`\' parameter expansions in output of double_quote_subst that were
-# `\'-ed in input to the same.  If an odd number of `\' preceded a '$'
-# in input to double_quote_subst, that '$' was protected from expansion.
-# Since each input `\' is now two `\'s, look for any number of runs of
-# four `\'s followed by two `\'s and then a '$'.  `\' that '$'.
-bs='\\'
-bs2='\\\\'
-bs4='\\\\\\\\'
-dollar='\$'
-sed_double_backslash="\
-  s/$bs4/&\\
-/g
-  s/^$bs2$dollar/$bs&/
-  s/\\([^$bs]\\)$bs2$dollar/\\1$bs2$bs$dollar/g
-  s/\n//g"
+## ----------------- ##
+## Standard options. ##
+## ----------------- ##
+
+# The following options affect the operation of the functions defined
+# below, and should be set appropriately depending on run-time para-
+# meters passed on the command line.
 
-# Standard options:
 opt_dry_run=false
-opt_help=false
 opt_quiet=false
 opt_verbose=false
-opt_warning=:
 
-# func_echo arg...
-# Echo program name prefixed message, along with the current mode
-# name if it has been set yet.
+# Categories 'all' and 'none' are always available.  Append any others
+# you will pass as the first argument to func_warning from your own
+# code.
+warning_categories=
+
+# By default, display warnings according to 'opt_warning_types'.  Set
+# 'warning_func'  to ':' to elide all warnings, or func_fatal_error to
+# treat the next displayed warning as a fatal error.
+warning_func=func_warn_and_continue
+
+# Set to 'all' to display all warnings, 'none' to suppress all
+# warnings, or a space delimited list of some subset of
+# 'warning_categories' to display only the listed warnings.
+opt_warning_types=all
+
+
+## -------------------- ##
+## Resource management. ##
+## -------------------- ##
+
+# This section contains definitions for functions that each ensure a
+# particular resource (a file, or a non-empty configuration variable for
+# example) is available, and if appropriate to extract default values
+# from pertinent package files. Call them using their associated
+# 'require_*' variable to ensure that they are executed, at most, once.
+#
+# It's entirely deliberate that calling these functions can set
+# variables that don't obey the namespace limitations obeyed by the rest
+# of this file, in order that that they be as useful as possible to
+# callers.
+
+
+# require_term_colors
+# -------------------
+# Allow display of bold text on terminals that support it.
+require_term_colors=func_require_term_colors
+func_require_term_colors ()
+{
+    $debug_cmd
+
+    test -t 1 && {
+      # COLORTERM and USE_ANSI_COLORS environment variables take
+      # precedence, because most terminfo databases neglect to describe
+      # whether color sequences are supported.
+      test -n "${COLORTERM+set}" && : ${USE_ANSI_COLORS="1"}
+
+      if test 1 = "$USE_ANSI_COLORS"; then
+        # Standard ANSI escape sequences
+        tc_reset=''
+        tc_bold='';   tc_standout=''
+        tc_red='';   tc_green=''
+        tc_blue='';  tc_cyan=''
+      else
+        # Otherwise trust the terminfo database after all.
+        test -n "`tput sgr0 2>/dev/null`" && {
+          tc_reset=`tput sgr0`
+          test -n "`tput bold 2>/dev/null`" && tc_bold=`tput bold`
+          tc_standout=$tc_bold
+          test -n "`tput smso 2>/dev/null`" && tc_standout=`tput smso`
+          test -n "`tput setaf 1 2>/dev/null`" && tc_red=`tput setaf 1`
+          test -n "`tput setaf 2 2>/dev/null`" && tc_green=`tput setaf 2`
+          test -n "`tput setaf 4 2>/dev/null`" && tc_blue=`tput setaf 4`
+          test -n "`tput setaf 5 2>/dev/null`" && tc_cyan=`tput setaf 5`
+        }
+      fi
+    }
+
+    require_term_colors=:
+}
+
+
+## ----------------- ##
+## Function library. ##
+## ----------------- ##
+
+# This section contains a variety of useful functions to call in your
+# scripts. Take note of the portable wrappers for features provided by
+# some modern shells, which will fall back to slower equivalents on
+# less featureful shells.
+
+
+# func_append VAR VALUE
+# ---------------------
+# Append VALUE onto the existing contents of VAR.
+
+  # We should try to minimise forks, especially on Windows where they are
+  # unreasonably slow, so skip the feature probes when bash or zsh are
+  # being used:
+  if test set = "${BASH_VERSION+set}${ZSH_VERSION+set}"; then
+    : ${_G_HAVE_ARITH_OP="yes"}
+    : ${_G_HAVE_XSI_OPS="yes"}
+    # The += operator was introduced in bash 3.1
+    case $BASH_VERSION in
+      [12].* | 3.0 | 3.0*) ;;
+      *)
+        : ${_G_HAVE_PLUSEQ_OP="yes"}
+        ;;
+    esac
+  fi
+
+  # _G_HAVE_PLUSEQ_OP
+  # Can be empty, in which case the shell is probed, "yes" if += is
+  # useable or anything else if it does not work.
+  test -z "$_G_HAVE_PLUSEQ_OP" \
+    && (eval 'x=a; x+=" b"; test "a b" = "$x"') 2>/dev/null \
+    && _G_HAVE_PLUSEQ_OP=yes
+
+if test yes = "$_G_HAVE_PLUSEQ_OP"
+then
+  # This is an XSI compatible shell, allowing a faster implementation...
+  eval 'func_append ()
+  {
+    $debug_cmd
+
+    eval "$1+=\$2"
+  }'
+else
+  # ...otherwise fall back to using expr, which is often a shell builtin.
+  func_append ()
+  {
+    $debug_cmd
+
+    eval "$1=\$$1\$2"
+  }
+fi
+
+
+# func_append_quoted VAR VALUE
+# ----------------------------
+# Quote VALUE and append to the end of shell variable VAR, separated
+# by a space.
+if test yes = "$_G_HAVE_PLUSEQ_OP"; then
+  eval 'func_append_quoted ()
+  {
+    $debug_cmd
+
+    func_quote_for_eval "$2"
+    eval "$1+=\\ \$func_quote_for_eval_result"
+  }'
+else
+  func_append_quoted ()
+  {
+    $debug_cmd
+
+    func_quote_for_eval "$2"
+    eval "$1=\$$1\\ \$func_quote_for_eval_result"
+  }
+fi
+
+
+# func_append_uniq VAR VALUE
+# --------------------------
+# Append unique VALUE onto the existing contents of VAR, assuming
+# entries are delimited by the first character of VALUE.  For example:
+#
+#   func_append_uniq options " --another-option option-argument"
+#
+# will only append to $options if " --another-option option-argument "
+# is not already present somewhere in $options already (note spaces at
+# each end implied by leading space in second argument).
+func_append_uniq ()
+{
+    $debug_cmd
+
+    eval _G_current_value='`$ECHO $'$1'`'
+    _G_delim=`expr "$2" : '\(.\)'`
+
+    case $_G_delim$_G_current_value$_G_delim in
+      *"$2$_G_delim"*) ;;
+      *) func_append "$@" ;;
+    esac
+}
+
+
+# func_arith TERM...
+# ------------------
+# Set func_arith_result to the result of evaluating TERMs.
+  test -z "$_G_HAVE_ARITH_OP" \
+    && (eval 'test 2 = $(( 1 + 1 ))') 2>/dev/null \
+    && _G_HAVE_ARITH_OP=yes
+
+if test yes = "$_G_HAVE_ARITH_OP"; then
+  eval 'func_arith ()
+  {
+    $debug_cmd
+
+    func_arith_result=$(( $* ))
+  }'
+else
+  func_arith ()
+  {
+    $debug_cmd
+
+    func_arith_result=`expr "$@"`
+  }
+fi
+
+
+# func_basename FILE
+# ------------------
+# Set func_basename_result to FILE with everything up to and including
+# the last / stripped.
+if test yes = "$_G_HAVE_XSI_OPS"; then
+  # If this shell supports suffix pattern removal, then use it to avoid
+  # forking. Hide the definitions single quotes in case the shell chokes
+  # on unsupported syntax...
+  _b='func_basename_result=${1##*/}'
+  _d='case $1 in
+        */*) func_dirname_result=${1%/*}$2 ;;
+        *  ) func_dirname_result=$3        ;;
+      esac'
+
+else
+  # ...otherwise fall back to using sed.
+  _b='func_basename_result=`$ECHO "$1" |$SED "$sed_basename"`'
+  _d='func_dirname_result=`$ECHO "$1"  |$SED "$sed_dirname"`
+      if test "X$func_dirname_result" = "X$1"; then
+        func_dirname_result=$3
+      else
+        func_append func_dirname_result "$2"
+      fi'
+fi
+
+eval 'func_basename ()
+{
+    $debug_cmd
+
+    '"$_b"'
+}'
+
+
+# func_dirname FILE APPEND NONDIR_REPLACEMENT
+# -------------------------------------------
+# Compute the dirname of FILE.  If nonempty, add APPEND to the result,
+# otherwise set result to NONDIR_REPLACEMENT.
+eval 'func_dirname ()
+{
+    $debug_cmd
+
+    '"$_d"'
+}'
+
+
+# func_dirname_and_basename FILE APPEND NONDIR_REPLACEMENT
+# --------------------------------------------------------
+# Perform func_basename and func_dirname in a single function
+# call:
+#   dirname:  Compute the dirname of FILE.  If nonempty,
+#             add APPEND to the result, otherwise set result
+#             to NONDIR_REPLACEMENT.
+#             value returned in "$func_dirname_result"
+#   basename: Compute filename of FILE.
+#             value retuned in "$func_basename_result"
+# For efficiency, we do not delegate to the functions above but instead
+# duplicate the functionality here.
+eval 'func_dirname_and_basename ()
+{
+    $debug_cmd
+
+    '"$_b"'
+    '"$_d"'
+}'
+
+
+# func_echo ARG...
+# ----------------
+# Echo program name prefixed message.
 func_echo ()
 {
-    $ECHO "$progname${mode+: }$mode: $*"
+    $debug_cmd
+
+    _G_message=$*
+
+    func_echo_IFS=$IFS
+    IFS=$nl
+    for _G_line in $_G_message; do
+      IFS=$func_echo_IFS
+      $ECHO "$progname: $_G_line"
+    done
+    IFS=$func_echo_IFS
 }
 
-# func_verbose arg...
-# Echo program name prefixed message in verbose mode only.
-func_verbose ()
+
+# func_echo_all ARG...
+# --------------------
+# Invoke $ECHO with all args, space-separated.
+func_echo_all ()
 {
-    $opt_verbose && func_echo ${1+"$@"}
+    $ECHO "$*"
+}
 
-    # A bug in bash halts the script if the last line of a function
-    # fails when set -e is in force, so we need another command to
-    # work around that:
-    :
+
+# func_echo_infix_1 INFIX ARG...
+# ------------------------------
+# Echo program name, followed by INFIX on the first line, with any
+# additional lines not showing INFIX.
+func_echo_infix_1 ()
+{
+    $debug_cmd
+
+    $require_term_colors
+
+    _G_infix=$1; shift
+    _G_indent=$_G_infix
+    _G_prefix="$progname: $_G_infix: "
+    _G_message=$*
+
+    # Strip color escape sequences before counting printable length
+    for _G_tc in "$tc_reset" "$tc_bold" "$tc_standout" "$tc_red" "$tc_green" "$tc_blue" "$tc_cyan"
+    do
+      test -n "$_G_tc" && {
+        _G_esc_tc=`$ECHO "$_G_tc" | $SED "$sed_make_literal_regex"`
+        _G_indent=`$ECHO "$_G_indent" | $SED "s|$_G_esc_tc||g"`
+      }
+    done
+    _G_indent="$progname: "`echo "$_G_indent" | $SED 's|.| |g'`"  " ## exclude from sc_prohibit_nested_quotes
+
+    func_echo_infix_1_IFS=$IFS
+    IFS=$nl
+    for _G_line in $_G_message; do
+      IFS=$func_echo_infix_1_IFS
+      $ECHO "$_G_prefix$tc_bold$_G_line$tc_reset" >&2
+      _G_prefix=$_G_indent
+    done
+    IFS=$func_echo_infix_1_IFS
 }
 
-# func_error arg...
+
+# func_error ARG...
+# -----------------
 # Echo program name prefixed message to standard error.
 func_error ()
 {
-    $ECHO "$progname${mode+: }$mode: "${1+"$@"} 1>&2
+    $debug_cmd
+
+    $require_term_colors
+
+    func_echo_infix_1 "  $tc_standout${tc_red}error$tc_reset" "$*" >&2
+}
+
+
+# func_fatal_error ARG...
+# -----------------------
+# Echo program name prefixed message to standard error, and exit.
+func_fatal_error ()
+{
+    $debug_cmd
+
+    func_error "$*"
+    exit $EXIT_FAILURE
 }
 
-# func_warning arg...
-# Echo program name prefixed warning message to standard error.
-func_warning ()
+
+# func_grep EXPRESSION FILENAME
+# -----------------------------
+# Check whether EXPRESSION matches any line of FILENAME, without output.
+func_grep ()
+{
+    $debug_cmd
+
+    $GREP "$1" "$2" >/dev/null 2>&1
+}
+
+
+# func_len STRING
+# ---------------
+# Set func_len_result to the length of STRING. STRING may not
+# start with a hyphen.
+  test -z "$_G_HAVE_XSI_OPS" \
+    && (eval 'x=a/b/c;
+      test 5aa/bb/cc = "${#x}${x%%/*}${x%/*}${x#*/}${x##*/}"') 2>/dev/null \
+    && _G_HAVE_XSI_OPS=yes
+
+if test yes = "$_G_HAVE_XSI_OPS"; then
+  eval 'func_len ()
+  {
+    $debug_cmd
+
+    func_len_result=${#1}
+  }'
+else
+  func_len ()
+  {
+    $debug_cmd
+
+    func_len_result=`expr "$1" : ".*" 2>/dev/null || echo $max_cmd_len`
+  }
+fi
+
+
+# func_mkdir_p DIRECTORY-PATH
+# ---------------------------
+# Make sure the entire path to DIRECTORY-PATH is available.
+func_mkdir_p ()
+{
+    $debug_cmd
+
+    _G_directory_path=$1
+    _G_dir_list=
+
+    if test -n "$_G_directory_path" && test : != "$opt_dry_run"; then
+
+      # Protect directory names starting with '-'
+      case $_G_directory_path in
+        -*) _G_directory_path=./$_G_directory_path ;;
+      esac
+
+      # While some portion of DIR does not yet exist...
+      while test ! -d "$_G_directory_path"; do
+        # ...make a list in topmost first order.  Use a colon delimited
+	# list incase some portion of path contains whitespace.
+        _G_dir_list=$_G_directory_path:$_G_dir_list
+
+        # If the last portion added has no slash in it, the list is done
+        case $_G_directory_path in */*) ;; *) break ;; esac
+
+        # ...otherwise throw away the child directory and loop
+        _G_directory_path=`$ECHO "$_G_directory_path" | $SED -e "$sed_dirname"`
+      done
+      _G_dir_list=`$ECHO "$_G_dir_list" | $SED 's|:*$||'`
+
+      func_mkdir_p_IFS=$IFS; IFS=:
+      for _G_dir in $_G_dir_list; do
+	IFS=$func_mkdir_p_IFS
+        # mkdir can fail with a 'File exist' error if two processes
+        # try to create one of the directories concurrently.  Don't
+        # stop in that case!
+        $MKDIR "$_G_dir" 2>/dev/null || :
+      done
+      IFS=$func_mkdir_p_IFS
+
+      # Bail out if we (or some other process) failed to create a directory.
+      test -d "$_G_directory_path" || \
+        func_fatal_error "Failed to create '$1'"
+    fi
+}
+
+
+# func_mktempdir [BASENAME]
+# -------------------------
+# Make a temporary directory that won't clash with other running
+# libtool processes, and avoids race conditions if possible.  If
+# given, BASENAME is the basename for that directory.
+func_mktempdir ()
+{
+    $debug_cmd
+
+    _G_template=${TMPDIR-/tmp}/${1-$progname}
+
+    if test : = "$opt_dry_run"; then
+      # Return a directory name, but don't create it in dry-run mode
+      _G_tmpdir=$_G_template-$$
+    else
+
+      # If mktemp works, use that first and foremost
+      _G_tmpdir=`mktemp -d "$_G_template-XXXXXXXX" 2>/dev/null`
+
+      if test ! -d "$_G_tmpdir"; then
+        # Failing that, at least try and use $RANDOM to avoid a race
+        _G_tmpdir=$_G_template-${RANDOM-0}$$
+
+        func_mktempdir_umask=`umask`
+        umask 0077
+        $MKDIR "$_G_tmpdir"
+        umask $func_mktempdir_umask
+      fi
+
+      # If we're not in dry-run mode, bomb out on failure
+      test -d "$_G_tmpdir" || \
+        func_fatal_error "cannot create temporary directory '$_G_tmpdir'"
+    fi
+
+    $ECHO "$_G_tmpdir"
+}
+
+
+# func_normal_abspath PATH
+# ------------------------
+# Remove doubled-up and trailing slashes, "." path components,
+# and cancel out any ".." path components in PATH after making
+# it an absolute path.
+func_normal_abspath ()
+{
+    $debug_cmd
+
+    # These SED scripts presuppose an absolute path with a trailing slash.
+    _G_pathcar='s|^/\([^/]*\).*$|\1|'
+    _G_pathcdr='s|^/[^/]*||'
+    _G_removedotparts=':dotsl
+		s|/\./|/|g
+		t dotsl
+		s|/\.$|/|'
+    _G_collapseslashes='s|/\{1,\}|/|g'
+    _G_finalslash='s|/*$|/|'
+
+    # Start from root dir and reassemble the path.
+    func_normal_abspath_result=
+    func_normal_abspath_tpath=$1
+    func_normal_abspath_altnamespace=
+    case $func_normal_abspath_tpath in
+      "")
+        # Empty path, that just means $cwd.
+        func_stripname '' '/' "`pwd`"
+        func_normal_abspath_result=$func_stripname_result
+        return
+        ;;
+      # The next three entries are used to spot a run of precisely
+      # two leading slashes without using negated character classes;
+      # we take advantage of case's first-match behaviour.
+      ///*)
+        # Unusual form of absolute path, do nothing.
+        ;;
+      //*)
+        # Not necessarily an ordinary path; POSIX reserves leading '//'
+        # and for example Cygwin uses it to access remote file shares
+        # over CIFS/SMB, so we conserve a leading double slash if found.
+        func_normal_abspath_altnamespace=/
+        ;;
+      /*)
+        # Absolute path, do nothing.
+        ;;
+      *)
+        # Relative path, prepend $cwd.
+        func_normal_abspath_tpath=`pwd`/$func_normal_abspath_tpath
+        ;;
+    esac
+
+    # Cancel out all the simple stuff to save iterations.  We also want
+    # the path to end with a slash for ease of parsing, so make sure
+    # there is one (and only one) here.
+    func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \
+          -e "$_G_removedotparts" -e "$_G_collapseslashes" -e "$_G_finalslash"`
+    while :; do
+      # Processed it all yet?
+      if test / = "$func_normal_abspath_tpath"; then
+        # If we ascended to the root using ".." the result may be empty now.
+        if test -z "$func_normal_abspath_result"; then
+          func_normal_abspath_result=/
+        fi
+        break
+      fi
+      func_normal_abspath_tcomponent=`$ECHO "$func_normal_abspath_tpath" | $SED \
+          -e "$_G_pathcar"`
+      func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \
+          -e "$_G_pathcdr"`
+      # Figure out what to do with it
+      case $func_normal_abspath_tcomponent in
+        "")
+          # Trailing empty path component, ignore it.
+          ;;
+        ..)
+          # Parent dir; strip last assembled component from result.
+          func_dirname "$func_normal_abspath_result"
+          func_normal_abspath_result=$func_dirname_result
+          ;;
+        *)
+          # Actual path component, append it.
+          func_append func_normal_abspath_result "/$func_normal_abspath_tcomponent"
+          ;;
+      esac
+    done
+    # Restore leading double-slash if one was found on entry.
+    func_normal_abspath_result=$func_normal_abspath_altnamespace$func_normal_abspath_result
+}
+
+
+# func_notquiet ARG...
+# --------------------
+# Echo program name prefixed message only when not in quiet mode.
+func_notquiet ()
+{
+    $debug_cmd
+
+    $opt_quiet || func_echo ${1+"$@"}
+
+    # A bug in bash halts the script if the last line of a function
+    # fails when set -e is in force, so we need another command to
+    # work around that:
+    :
+}
+
+
+# func_relative_path SRCDIR DSTDIR
+# --------------------------------
+# Set func_relative_path_result to the relative path from SRCDIR to DSTDIR.
+func_relative_path ()
+{
+    $debug_cmd
+
+    func_relative_path_result=
+    func_normal_abspath "$1"
+    func_relative_path_tlibdir=$func_normal_abspath_result
+    func_normal_abspath "$2"
+    func_relative_path_tbindir=$func_normal_abspath_result
+
+    # Ascend the tree starting from libdir
+    while :; do
+      # check if we have found a prefix of bindir
+      case $func_relative_path_tbindir in
+        $func_relative_path_tlibdir)
+          # found an exact match
+          func_relative_path_tcancelled=
+          break
+          ;;
+        $func_relative_path_tlibdir*)
+          # found a matching prefix
+          func_stripname "$func_relative_path_tlibdir" '' "$func_relative_path_tbindir"
+          func_relative_path_tcancelled=$func_stripname_result
+          if test -z "$func_relative_path_result"; then
+            func_relative_path_result=.
+          fi
+          break
+          ;;
+        *)
+          func_dirname $func_relative_path_tlibdir
+          func_relative_path_tlibdir=$func_dirname_result
+          if test -z "$func_relative_path_tlibdir"; then
+            # Have to descend all the way to the root!
+            func_relative_path_result=../$func_relative_path_result
+            func_relative_path_tcancelled=$func_relative_path_tbindir
+            break
+          fi
+          func_relative_path_result=../$func_relative_path_result
+          ;;
+      esac
+    done
+
+    # Now calculate path; take care to avoid doubling-up slashes.
+    func_stripname '' '/' "$func_relative_path_result"
+    func_relative_path_result=$func_stripname_result
+    func_stripname '/' '/' "$func_relative_path_tcancelled"
+    if test -n "$func_stripname_result"; then
+      func_append func_relative_path_result "/$func_stripname_result"
+    fi
+
+    # Normalisation. If bindir is libdir, return '.' else relative path.
+    if test -n "$func_relative_path_result"; then
+      func_stripname './' '' "$func_relative_path_result"
+      func_relative_path_result=$func_stripname_result
+    fi
+
+    test -n "$func_relative_path_result" || func_relative_path_result=.
+
+    :
+}
+
+
+# func_quote_for_eval ARG...
+# --------------------------
+# Aesthetically quote ARGs to be evaled later.
+# This function returns two values:
+#   i) func_quote_for_eval_result
+#      double-quoted, suitable for a subsequent eval
+#  ii) func_quote_for_eval_unquoted_result
+#      has all characters that are still active within double
+#      quotes backslashified.
+func_quote_for_eval ()
+{
+    $debug_cmd
+
+    func_quote_for_eval_unquoted_result=
+    func_quote_for_eval_result=
+    while test 0 -lt $#; do
+      case $1 in
+        *[\\\`\"\$]*)
+	  _G_unquoted_arg=`printf '%s\n' "$1" |$SED "$sed_quote_subst"` ;;
+        *)
+          _G_unquoted_arg=$1 ;;
+      esac
+      if test -n "$func_quote_for_eval_unquoted_result"; then
+	func_append func_quote_for_eval_unquoted_result " $_G_unquoted_arg"
+      else
+        func_append func_quote_for_eval_unquoted_result "$_G_unquoted_arg"
+      fi
+
+      case $_G_unquoted_arg in
+        # Double-quote args containing shell metacharacters to delay
+        # word splitting, command substitution and variable expansion
+        # for a subsequent eval.
+        # Many Bourne shells cannot handle close brackets correctly
+        # in scan sets, so we specify it separately.
+        *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*|"")
+          _G_quoted_arg=\"$_G_unquoted_arg\"
+          ;;
+        *)
+          _G_quoted_arg=$_G_unquoted_arg
+	  ;;
+      esac
+
+      if test -n "$func_quote_for_eval_result"; then
+	func_append func_quote_for_eval_result " $_G_quoted_arg"
+      else
+        func_append func_quote_for_eval_result "$_G_quoted_arg"
+      fi
+      shift
+    done
+}
+
+
+# func_quote_for_expand ARG
+# -------------------------
+# Aesthetically quote ARG to be evaled later; same as above,
+# but do not quote variable references.
+func_quote_for_expand ()
+{
+    $debug_cmd
+
+    case $1 in
+      *[\\\`\"]*)
+	_G_arg=`$ECHO "$1" | $SED \
+	    -e "$sed_double_quote_subst" -e "$sed_double_backslash"` ;;
+      *)
+        _G_arg=$1 ;;
+    esac
+
+    case $_G_arg in
+      # Double-quote args containing shell metacharacters to delay
+      # word splitting and command substitution for a subsequent eval.
+      # Many Bourne shells cannot handle close brackets correctly
+      # in scan sets, so we specify it separately.
+      *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*|"")
+        _G_arg=\"$_G_arg\"
+        ;;
+    esac
+
+    func_quote_for_expand_result=$_G_arg
+}
+
+
+# func_stripname PREFIX SUFFIX NAME
+# ---------------------------------
+# strip PREFIX and SUFFIX from NAME, and store in func_stripname_result.
+# PREFIX and SUFFIX must not contain globbing or regex special
+# characters, hashes, percent signs, but SUFFIX may contain a leading
+# dot (in which case that matches only a dot).
+if test yes = "$_G_HAVE_XSI_OPS"; then
+  eval 'func_stripname ()
+  {
+    $debug_cmd
+
+    # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are
+    # positional parameters, so assign one to ordinary variable first.
+    func_stripname_result=$3
+    func_stripname_result=${func_stripname_result#"$1"}
+    func_stripname_result=${func_stripname_result%"$2"}
+  }'
+else
+  func_stripname ()
+  {
+    $debug_cmd
+
+    case $2 in
+      .*) func_stripname_result=`$ECHO "$3" | $SED -e "s%^$1%%" -e "s%\\\\$2\$%%"`;;
+      *)  func_stripname_result=`$ECHO "$3" | $SED -e "s%^$1%%" -e "s%$2\$%%"`;;
+    esac
+  }
+fi
+
+
+# func_show_eval CMD [FAIL_EXP]
+# -----------------------------
+# Unless opt_quiet is true, then output CMD.  Then, if opt_dryrun is
+# not true, evaluate CMD.  If the evaluation of CMD fails, and FAIL_EXP
+# is given, then evaluate it.
+func_show_eval ()
+{
+    $debug_cmd
+
+    _G_cmd=$1
+    _G_fail_exp=${2-':'}
+
+    func_quote_for_expand "$_G_cmd"
+    eval "func_notquiet $func_quote_for_expand_result"
+
+    $opt_dry_run || {
+      eval "$_G_cmd"
+      _G_status=$?
+      if test 0 -ne "$_G_status"; then
+	eval "(exit $_G_status); $_G_fail_exp"
+      fi
+    }
+}
+
+
+# func_show_eval_locale CMD [FAIL_EXP]
+# ------------------------------------
+# Unless opt_quiet is true, then output CMD.  Then, if opt_dryrun is
+# not true, evaluate CMD.  If the evaluation of CMD fails, and FAIL_EXP
+# is given, then evaluate it.  Use the saved locale for evaluation.
+func_show_eval_locale ()
+{
+    $debug_cmd
+
+    _G_cmd=$1
+    _G_fail_exp=${2-':'}
+
+    $opt_quiet || {
+      func_quote_for_expand "$_G_cmd"
+      eval "func_echo $func_quote_for_expand_result"
+    }
+
+    $opt_dry_run || {
+      eval "$_G_user_locale
+	    $_G_cmd"
+      _G_status=$?
+      eval "$_G_safe_locale"
+      if test 0 -ne "$_G_status"; then
+	eval "(exit $_G_status); $_G_fail_exp"
+      fi
+    }
+}
+
+
+# func_tr_sh
+# ----------
+# Turn $1 into a string suitable for a shell variable name.
+# Result is stored in $func_tr_sh_result.  All characters
+# not in the set a-zA-Z0-9_ are replaced with '_'. Further,
+# if $1 begins with a digit, a '_' is prepended as well.
+func_tr_sh ()
+{
+    $debug_cmd
+
+    case $1 in
+    [0-9]* | *[!a-zA-Z0-9_]*)
+      func_tr_sh_result=`$ECHO "$1" | $SED -e 's/^\([0-9]\)/_\1/' -e 's/[^a-zA-Z0-9_]/_/g'`
+      ;;
+    * )
+      func_tr_sh_result=$1
+      ;;
+    esac
+}
+
+
+# func_verbose ARG...
+# -------------------
+# Echo program name prefixed message in verbose mode only.
+func_verbose ()
+{
+    $debug_cmd
+
+    $opt_verbose && func_echo "$*"
+
+    :
+}
+
+
+# func_warn_and_continue ARG...
+# -----------------------------
+# Echo program name prefixed warning message to standard error.
+func_warn_and_continue ()
+{
+    $debug_cmd
+
+    $require_term_colors
+
+    func_echo_infix_1 "${tc_red}warning$tc_reset" "$*" >&2
+}
+
+
+# func_warning CATEGORY ARG...
+# ----------------------------
+# Echo program name prefixed warning message to standard error. Warning
+# messages can be filtered according to CATEGORY, where this function
+# elides messages where CATEGORY is not listed in the global variable
+# 'opt_warning_types'.
+func_warning ()
+{
+    $debug_cmd
+
+    # CATEGORY must be in the warning_categories list!
+    case " $warning_categories " in
+      *" $1 "*) ;;
+      *) func_internal_error "invalid warning category '$1'" ;;
+    esac
+
+    _G_category=$1
+    shift
+
+    case " $opt_warning_types " in
+      *" $_G_category "*) $warning_func ${1+"$@"} ;;
+    esac
+}
+
+
+# func_sort_ver VER1 VER2
+# -----------------------
+# 'sort -V' is not generally available.
+# Note this deviates from the version comparison in automake
+# in that it treats 1.5 < 1.5.0, and treats 1.4.4a < 1.4-p3a
+# but this should suffice as we won't be specifying old
+# version formats or redundant trailing .0 in bootstrap.conf.
+# If we did want full compatibility then we should probably
+# use m4_version_compare from autoconf.
+func_sort_ver ()
+{
+    $debug_cmd
+
+    printf '%s\n%s\n' "$1" "$2" \
+      | sort -t. -k 1,1n -k 2,2n -k 3,3n -k 4,4n -k 5,5n -k 6,6n -k 7,7n -k 8,8n -k 9,9n
+}
+
+# func_lt_ver PREV CURR
+# ---------------------
+# Return true if PREV and CURR are in the correct order according to
+# func_sort_ver, otherwise false.  Use it like this:
+#
+#  func_lt_ver "$prev_ver" "$proposed_ver" || func_fatal_error "..."
+func_lt_ver ()
+{
+    $debug_cmd
+
+    test "x$1" = x`func_sort_ver "$1" "$2" | $SED 1q`
+}
+
+
+# Local variables:
+# mode: shell-script
+# sh-indentation: 2
+# eval: (add-hook 'before-save-hook 'time-stamp)
+# time-stamp-pattern: "10/scriptversion=%:y-%02m-%02d.%02H; # UTC"
+# time-stamp-time-zone: "UTC"
+# End:
+#! /bin/sh
+
+# Set a version string for this script.
+scriptversion=2014-01-07.03; # UTC
+
+# A portable, pluggable option parser for Bourne shell.
+# Written by Gary V. Vaughan, 2010
+
+# Copyright (C) 2010-2015 Free Software Foundation, Inc.
+# This is free software; see the source for copying conditions.  There is NO
+# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+# 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/>.
+
+# Please report bugs or propose patches to gary at gnu.org.
+
+
+## ------ ##
+## Usage. ##
+## ------ ##
+
+# This file is a library for parsing options in your shell scripts along
+# with assorted other useful supporting features that you can make use
+# of too.
+#
+# For the simplest scripts you might need only:
+#
+#   #!/bin/sh
+#   . relative/path/to/funclib.sh
+#   . relative/path/to/options-parser
+#   scriptversion=1.0
+#   func_options ${1+"$@"}
+#   eval set dummy "$func_options_result"; shift
+#   ...rest of your script...
+#
+# In order for the '--version' option to work, you will need to have a
+# suitably formatted comment like the one at the top of this file
+# starting with '# Written by ' and ending with '# warranty; '.
+#
+# For '-h' and '--help' to work, you will also need a one line
+# description of your script's purpose in a comment directly above the
+# '# Written by ' line, like the one at the top of this file.
+#
+# The default options also support '--debug', which will turn on shell
+# execution tracing (see the comment above debug_cmd below for another
+# use), and '--verbose' and the func_verbose function to allow your script
+# to display verbose messages only when your user has specified
+# '--verbose'.
+#
+# After sourcing this file, you can plug processing for additional
+# options by amending the variables from the 'Configuration' section
+# below, and following the instructions in the 'Option parsing'
+# section further down.
+
+## -------------- ##
+## Configuration. ##
+## -------------- ##
+
+# You should override these variables in your script after sourcing this
+# file so that they reflect the customisations you have added to the
+# option parser.
+
+# The usage line for option parsing errors and the start of '-h' and
+# '--help' output messages. You can embed shell variables for delayed
+# expansion at the time the message is displayed, but you will need to
+# quote other shell meta-characters carefully to prevent them being
+# expanded when the contents are evaled.
+usage='$progpath [OPTION]...'
+
+# Short help message in response to '-h' and '--help'.  Add to this or
+# override it after sourcing this library to reflect the full set of
+# options your script accepts.
+usage_message="\
+       --debug        enable verbose shell tracing
+   -W, --warnings=CATEGORY
+                      report the warnings falling in CATEGORY [all]
+   -v, --verbose      verbosely report processing
+       --version      print version information and exit
+   -h, --help         print short or long help message and exit
+"
+
+# Additional text appended to 'usage_message' in response to '--help'.
+long_help_message="
+Warning categories include:
+       'all'          show all warnings
+       'none'         turn off all the warnings
+       'error'        warnings are treated as fatal errors"
+
+# Help message printed before fatal option parsing errors.
+fatal_help="Try '\$progname --help' for more information."
+
+
+
+## ------------------------- ##
+## Hook function management. ##
+## ------------------------- ##
+
+# This section contains functions for adding, removing, and running hooks
+# to the main code.  A hook is just a named list of of function, that can
+# be run in order later on.
+
+# func_hookable FUNC_NAME
+# -----------------------
+# Declare that FUNC_NAME will run hooks added with
+# 'func_add_hook FUNC_NAME ...'.
+func_hookable ()
+{
+    $debug_cmd
+
+    func_append hookable_fns " $1"
+}
+
+
+# func_add_hook FUNC_NAME HOOK_FUNC
+# ---------------------------------
+# Request that FUNC_NAME call HOOK_FUNC before it returns.  FUNC_NAME must
+# first have been declared "hookable" by a call to 'func_hookable'.
+func_add_hook ()
+{
+    $debug_cmd
+
+    case " $hookable_fns " in
+      *" $1 "*) ;;
+      *) func_fatal_error "'$1' does not accept hook functions." ;;
+    esac
+
+    eval func_append ${1}_hooks '" $2"'
+}
+
+
+# func_remove_hook FUNC_NAME HOOK_FUNC
+# ------------------------------------
+# Remove HOOK_FUNC from the list of functions called by FUNC_NAME.
+func_remove_hook ()
+{
+    $debug_cmd
+
+    eval ${1}_hooks='`$ECHO "\$'$1'_hooks" |$SED "s| '$2'||"`'
+}
+
+
+# func_run_hooks FUNC_NAME [ARG]...
+# ---------------------------------
+# Run all hook functions registered to FUNC_NAME.
+# It is assumed that the list of hook functions contains nothing more
+# than a whitespace-delimited list of legal shell function names, and
+# no effort is wasted trying to catch shell meta-characters or preserve
+# whitespace.
+func_run_hooks ()
+{
+    $debug_cmd
+
+    case " $hookable_fns " in
+      *" $1 "*) ;;
+      *) func_fatal_error "'$1' does not support hook funcions.n" ;;
+    esac
+
+    eval _G_hook_fns=\$$1_hooks; shift
+
+    for _G_hook in $_G_hook_fns; do
+      eval $_G_hook '"$@"'
+
+      # store returned options list back into positional
+      # parameters for next 'cmd' execution.
+      eval _G_hook_result=\$${_G_hook}_result
+      eval set dummy "$_G_hook_result"; shift
+    done
+
+    func_quote_for_eval ${1+"$@"}
+    func_run_hooks_result=$func_quote_for_eval_result
+}
+
+
+
+## --------------- ##
+## Option parsing. ##
+## --------------- ##
+
+# In order to add your own option parsing hooks, you must accept the
+# full positional parameter list in your hook function, remove any
+# options that you action, and then pass back the remaining unprocessed
+# options in '<hooked_function_name>_result', escaped suitably for
+# 'eval'.  Like this:
+#
+#    my_options_prep ()
+#    {
+#        $debug_cmd
+#
+#        # Extend the existing usage message.
+#        usage_message=$usage_message'
+#      -s, --silent       don'\''t print informational messages
+#    '
+#
+#        func_quote_for_eval ${1+"$@"}
+#        my_options_prep_result=$func_quote_for_eval_result
+#    }
+#    func_add_hook func_options_prep my_options_prep
+#
+#
+#    my_silent_option ()
+#    {
+#        $debug_cmd
+#
+#        # Note that for efficiency, we parse as many options as we can
+#        # recognise in a loop before passing the remainder back to the
+#        # caller on the first unrecognised argument we encounter.
+#        while test $# -gt 0; do
+#          opt=$1; shift
+#          case $opt in
+#            --silent|-s) opt_silent=: ;;
+#            # Separate non-argument short options:
+#            -s*)         func_split_short_opt "$_G_opt"
+#                         set dummy "$func_split_short_opt_name" \
+#                             "-$func_split_short_opt_arg" ${1+"$@"}
+#                         shift
+#                         ;;
+#            *)            set dummy "$_G_opt" "$*"; shift; break ;;
+#          esac
+#        done
+#
+#        func_quote_for_eval ${1+"$@"}
+#        my_silent_option_result=$func_quote_for_eval_result
+#    }
+#    func_add_hook func_parse_options my_silent_option
+#
+#
+#    my_option_validation ()
+#    {
+#        $debug_cmd
+#
+#        $opt_silent && $opt_verbose && func_fatal_help "\
+#    '--silent' and '--verbose' options are mutually exclusive."
+#
+#        func_quote_for_eval ${1+"$@"}
+#        my_option_validation_result=$func_quote_for_eval_result
+#    }
+#    func_add_hook func_validate_options my_option_validation
+#
+# You'll alse need to manually amend $usage_message to reflect the extra
+# options you parse.  It's preferable to append if you can, so that
+# multiple option parsing hooks can be added safely.
+
+
+# func_options [ARG]...
+# ---------------------
+# All the functions called inside func_options are hookable. See the
+# individual implementations for details.
+func_hookable func_options
+func_options ()
 {
-    $opt_warning && $ECHO "$progname${mode+: }$mode: warning: "${1+"$@"} 1>&2
+    $debug_cmd
 
-    # bash bug again:
-    :
-}
+    func_options_prep ${1+"$@"}
+    eval func_parse_options \
+        ${func_options_prep_result+"$func_options_prep_result"}
+    eval func_validate_options \
+        ${func_parse_options_result+"$func_parse_options_result"}
 
-# func_fatal_error arg...
-# Echo program name prefixed message to standard error, and exit.
-func_fatal_error ()
-{
-    func_error ${1+"$@"}
-    exit $EXIT_FAILURE
-}
+    eval func_run_hooks func_options \
+        ${func_validate_options_result+"$func_validate_options_result"}
 
-# func_fatal_help arg...
-# Echo program name prefixed message to standard error, followed by
-# a help hint, and exit.
-func_fatal_help ()
-{
-    func_error ${1+"$@"}
-    func_fatal_error "$help"
+    # save modified positional parameters for caller
+    func_options_result=$func_run_hooks_result
 }
-help="Try \`$progname --help' for more information."  ## default
 
 
-# func_grep expression filename
-# Check whether EXPRESSION matches any line of FILENAME, without output.
-func_grep ()
+# func_options_prep [ARG]...
+# --------------------------
+# All initialisations required before starting the option parse loop.
+# Note that when calling hook functions, we pass through the list of
+# positional parameters.  If a hook function modifies that list, and
+# needs to propogate that back to rest of this script, then the complete
+# modified list must be put in 'func_run_hooks_result' before
+# returning.
+func_hookable func_options_prep
+func_options_prep ()
 {
-    $GREP "$1" "$2" >/dev/null 2>&1
+    $debug_cmd
+
+    # Option defaults:
+    opt_verbose=false
+    opt_warning_types=
+
+    func_run_hooks func_options_prep ${1+"$@"}
+
+    # save modified positional parameters for caller
+    func_options_prep_result=$func_run_hooks_result
 }
 
 
-# func_mkdir_p directory-path
-# Make sure the entire path to DIRECTORY-PATH is available.
-func_mkdir_p ()
+# func_parse_options [ARG]...
+# ---------------------------
+# The main option parsing loop.
+func_hookable func_parse_options
+func_parse_options ()
 {
-    my_directory_path="$1"
-    my_dir_list=
+    $debug_cmd
 
-    if test -n "$my_directory_path" && test "$opt_dry_run" != ":"; then
+    func_parse_options_result=
 
-      # Protect directory names starting with `-'
-      case $my_directory_path in
-        -*) my_directory_path="./$my_directory_path" ;;
-      esac
+    # this just eases exit handling
+    while test $# -gt 0; do
+      # Defer to hook functions for initial option parsing, so they
+      # get priority in the event of reusing an option name.
+      func_run_hooks func_parse_options ${1+"$@"}
 
-      # While some portion of DIR does not yet exist...
-      while test ! -d "$my_directory_path"; do
-        # ...make a list in topmost first order.  Use a colon delimited
-	# list incase some portion of path contains whitespace.
-        my_dir_list="$my_directory_path:$my_dir_list"
+      # Adjust func_parse_options positional parameters to match
+      eval set dummy "$func_run_hooks_result"; shift
 
-        # If the last portion added has no slash in it, the list is done
-        case $my_directory_path in */*) ;; *) break ;; esac
+      # Break out of the loop if we already parsed every option.
+      test $# -gt 0 || break
 
-        # ...otherwise throw away the child directory and loop
-        my_directory_path=`$ECHO "X$my_directory_path" | $Xsed -e "$dirname"`
-      done
-      my_dir_list=`$ECHO "X$my_dir_list" | $Xsed -e 's,:*$,,'`
+      _G_opt=$1
+      shift
+      case $_G_opt in
+        --debug|-x)   debug_cmd='set -x'
+                      func_echo "enabling shell trace mode"
+                      $debug_cmd
+                      ;;
+
+        --no-warnings|--no-warning|--no-warn)
+                      set dummy --warnings none ${1+"$@"}
+                      shift
+		      ;;
 
-      save_mkdir_p_IFS="$IFS"; IFS=':'
-      for my_dir in $my_dir_list; do
-	IFS="$save_mkdir_p_IFS"
-        # mkdir can fail with a `File exist' error if two processes
-        # try to create one of the directories concurrently.  Don't
-        # stop in that case!
-        $MKDIR "$my_dir" 2>/dev/null || :
-      done
-      IFS="$save_mkdir_p_IFS"
+        --warnings|--warning|-W)
+                      test $# = 0 && func_missing_arg $_G_opt && break
+                      case " $warning_categories $1" in
+                        *" $1 "*)
+                          # trailing space prevents matching last $1 above
+                          func_append_uniq opt_warning_types " $1"
+                          ;;
+                        *all)
+                          opt_warning_types=$warning_categories
+                          ;;
+                        *none)
+                          opt_warning_types=none
+                          warning_func=:
+                          ;;
+                        *error)
+                          opt_warning_types=$warning_categories
+                          warning_func=func_fatal_error
+                          ;;
+                        *)
+                          func_fatal_error \
+                             "unsupported warning category: '$1'"
+                          ;;
+                      esac
+                      shift
+                      ;;
+
+        --verbose|-v) opt_verbose=: ;;
+        --version)    func_version ;;
+        -\?|-h)       func_usage ;;
+        --help)       func_help ;;
+
+	# Separate optargs to long options (plugins may need this):
+	--*=*)        func_split_equals "$_G_opt"
+	              set dummy "$func_split_equals_lhs" \
+                          "$func_split_equals_rhs" ${1+"$@"}
+                      shift
+                      ;;
+
+       # Separate optargs to short options:
+        -W*)
+                      func_split_short_opt "$_G_opt"
+                      set dummy "$func_split_short_opt_name" \
+                          "$func_split_short_opt_arg" ${1+"$@"}
+                      shift
+                      ;;
+
+        # Separate non-argument short options:
+        -\?*|-h*|-v*|-x*)
+                      func_split_short_opt "$_G_opt"
+                      set dummy "$func_split_short_opt_name" \
+                          "-$func_split_short_opt_arg" ${1+"$@"}
+                      shift
+                      ;;
+
+        --)           break ;;
+        -*)           func_fatal_help "unrecognised option: '$_G_opt'" ;;
+        *)            set dummy "$_G_opt" ${1+"$@"}; shift; break ;;
+      esac
+    done
 
-      # Bail out if we (or some other process) failed to create a directory.
-      test -d "$my_directory_path" || \
-        func_fatal_error "Failed to create \`$1'"
-    fi
+    # save modified positional parameters for caller
+    func_quote_for_eval ${1+"$@"}
+    func_parse_options_result=$func_quote_for_eval_result
 }
 
 
-# func_mktempdir [string]
-# Make a temporary directory that won't clash with other running
-# libtool processes, and avoids race conditions if possible.  If
-# given, STRING is the basename for that directory.
-func_mktempdir ()
+# func_validate_options [ARG]...
+# ------------------------------
+# Perform any sanity checks on option settings and/or unconsumed
+# arguments.
+func_hookable func_validate_options
+func_validate_options ()
 {
-    my_template="${TMPDIR-/tmp}/${1-$progname}"
+    $debug_cmd
 
-    if test "$opt_dry_run" = ":"; then
-      # Return a directory name, but don't create it in dry-run mode
-      my_tmpdir="${my_template}-$$"
-    else
+    # Display all warnings if -W was not given.
+    test -n "$opt_warning_types" || opt_warning_types=" $warning_categories"
 
-      # If mktemp works, use that first and foremost
-      my_tmpdir=`mktemp -d "${my_template}-XXXXXXXX" 2>/dev/null`
+    func_run_hooks func_validate_options ${1+"$@"}
 
-      if test ! -d "$my_tmpdir"; then
-        # Failing that, at least try and use $RANDOM to avoid a race
-        my_tmpdir="${my_template}-${RANDOM-0}$$"
+    # Bail if the options were screwed!
+    $exit_cmd $EXIT_FAILURE
 
-        save_mktempdir_umask=`umask`
-        umask 0077
-        $MKDIR "$my_tmpdir"
-        umask $save_mktempdir_umask
-      fi
+    # save modified positional parameters for caller
+    func_validate_options_result=$func_run_hooks_result
+}
 
-      # If we're not in dry-run mode, bomb out on failure
-      test -d "$my_tmpdir" || \
-        func_fatal_error "cannot create temporary directory \`$my_tmpdir'"
-    fi
 
-    $ECHO "X$my_tmpdir" | $Xsed
-}
 
+## ----------------- ##
+## Helper functions. ##
+## ----------------- ##
 
-# func_quote_for_eval arg
-# Aesthetically quote ARG to be evaled later.
-# This function returns two values: FUNC_QUOTE_FOR_EVAL_RESULT
-# is double-quoted, suitable for a subsequent eval, whereas
-# FUNC_QUOTE_FOR_EVAL_UNQUOTED_RESULT has merely all characters
-# which are still active within double quotes backslashified.
-func_quote_for_eval ()
+# This section contains the helper functions used by the rest of the
+# hookable option parser framework in ascii-betical order.
+
+
+# func_fatal_help ARG...
+# ----------------------
+# Echo program name prefixed message to standard error, followed by
+# a help hint, and exit.
+func_fatal_help ()
 {
-    case $1 in
-      *[\\\`\"\$]*)
-	func_quote_for_eval_unquoted_result=`$ECHO "X$1" | $Xsed -e "$sed_quote_subst"` ;;
-      *)
-        func_quote_for_eval_unquoted_result="$1" ;;
-    esac
+    $debug_cmd
 
-    case $func_quote_for_eval_unquoted_result in
-      # Double-quote args containing shell metacharacters to delay
-      # word splitting, command substitution and and variable
-      # expansion for a subsequent eval.
-      # Many Bourne shells cannot handle close brackets correctly
-      # in scan sets, so we specify it separately.
-      *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*|"")
-        func_quote_for_eval_result="\"$func_quote_for_eval_unquoted_result\""
-        ;;
-      *)
-        func_quote_for_eval_result="$func_quote_for_eval_unquoted_result"
-    esac
+    eval \$ECHO \""Usage: $usage"\"
+    eval \$ECHO \""$fatal_help"\"
+    func_error ${1+"$@"}
+    exit $EXIT_FAILURE
 }
 
 
-# func_quote_for_expand arg
-# Aesthetically quote ARG to be evaled later; same as above,
-# but do not quote variable references.
-func_quote_for_expand ()
+# func_help
+# ---------
+# Echo long help message to standard output and exit.
+func_help ()
 {
-    case $1 in
-      *[\\\`\"]*)
-	my_arg=`$ECHO "X$1" | $Xsed \
-	    -e "$double_quote_subst" -e "$sed_double_backslash"` ;;
-      *)
-        my_arg="$1" ;;
-    esac
+    $debug_cmd
 
-    case $my_arg in
-      # Double-quote args containing shell metacharacters to delay
-      # word splitting and command substitution for a subsequent eval.
-      # Many Bourne shells cannot handle close brackets correctly
-      # in scan sets, so we specify it separately.
-      *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*|"")
-        my_arg="\"$my_arg\""
-        ;;
-    esac
-
-    func_quote_for_expand_result="$my_arg"
+    func_usage_message
+    $ECHO "$long_help_message"
+    exit 0
 }
 
 
-# func_show_eval cmd [fail_exp]
-# Unless opt_silent is true, then output CMD.  Then, if opt_dryrun is
-# not true, evaluate CMD.  If the evaluation of CMD fails, and FAIL_EXP
-# is given, then evaluate it.
-func_show_eval ()
+# func_missing_arg ARGNAME
+# ------------------------
+# Echo program name prefixed message to standard error and set global
+# exit_cmd.
+func_missing_arg ()
 {
-    my_cmd="$1"
-    my_fail_exp="${2-:}"
-
-    ${opt_silent-false} || {
-      func_quote_for_expand "$my_cmd"
-      eval "func_echo $func_quote_for_expand_result"
-    }
+    $debug_cmd
 
-    if ${opt_dry_run-false}; then :; else
-      eval "$my_cmd"
-      my_status=$?
-      if test "$my_status" -eq 0; then :; else
-	eval "(exit $my_status); $my_fail_exp"
-      fi
-    fi
+    func_error "Missing argument for '$1'."
+    exit_cmd=exit
 }
 
 
-# func_show_eval_locale cmd [fail_exp]
-# Unless opt_silent is true, then output CMD.  Then, if opt_dryrun is
-# not true, evaluate CMD.  If the evaluation of CMD fails, and FAIL_EXP
-# is given, then evaluate it.  Use the saved locale for evaluation.
-func_show_eval_locale ()
-{
-    my_cmd="$1"
-    my_fail_exp="${2-:}"
+# func_split_equals STRING
+# ------------------------
+# Set func_split_equals_lhs and func_split_equals_rhs shell variables after
+# splitting STRING at the '=' sign.
+test -z "$_G_HAVE_XSI_OPS" \
+    && (eval 'x=a/b/c;
+      test 5aa/bb/cc = "${#x}${x%%/*}${x%/*}${x#*/}${x##*/}"') 2>/dev/null \
+    && _G_HAVE_XSI_OPS=yes
 
-    ${opt_silent-false} || {
-      func_quote_for_expand "$my_cmd"
-      eval "func_echo $func_quote_for_expand_result"
-    }
+if test yes = "$_G_HAVE_XSI_OPS"
+then
+  # This is an XSI compatible shell, allowing a faster implementation...
+  eval 'func_split_equals ()
+  {
+      $debug_cmd
 
-    if ${opt_dry_run-false}; then :; else
-      eval "$lt_user_locale
-	    $my_cmd"
-      my_status=$?
-      eval "$lt_safe_locale"
-      if test "$my_status" -eq 0; then :; else
-	eval "(exit $my_status); $my_fail_exp"
-      fi
-    fi
-}
+      func_split_equals_lhs=${1%%=*}
+      func_split_equals_rhs=${1#*=}
+      test "x$func_split_equals_lhs" = "x$1" \
+        && func_split_equals_rhs=
+  }'
+else
+  # ...otherwise fall back to using expr, which is often a shell builtin.
+  func_split_equals ()
+  {
+      $debug_cmd
 
+      func_split_equals_lhs=`expr "x$1" : 'x\([^=]*\)'`
+      func_split_equals_rhs=
+      test "x$func_split_equals_lhs" = "x$1" \
+        || func_split_equals_rhs=`expr "x$1" : 'x[^=]*=\(.*\)$'`
+  }
+fi #func_split_equals
 
 
+# func_split_short_opt SHORTOPT
+# -----------------------------
+# Set func_split_short_opt_name and func_split_short_opt_arg shell
+# variables after splitting SHORTOPT after the 2nd character.
+if test yes = "$_G_HAVE_XSI_OPS"
+then
+  # This is an XSI compatible shell, allowing a faster implementation...
+  eval 'func_split_short_opt ()
+  {
+      $debug_cmd
 
+      func_split_short_opt_arg=${1#??}
+      func_split_short_opt_name=${1%"$func_split_short_opt_arg"}
+  }'
+else
+  # ...otherwise fall back to using expr, which is often a shell builtin.
+  func_split_short_opt ()
+  {
+      $debug_cmd
+
+      func_split_short_opt_name=`expr "x$1" : 'x-\(.\)'`
+      func_split_short_opt_arg=`expr "x$1" : 'x-.\(.*\)$'`
+  }
+fi #func_split_short_opt
 
-# func_version
-# Echo version message to standard output and exit.
-func_version ()
-{
-    $SED -n '/^# '$PROGRAM' (GNU /,/# warranty; / {
-        s/^# //
-	s/^# *$//
-        s/\((C)\)[ 0-9,-]*\( [1-9][0-9]*\)/\1\2/
-        p
-     }' < "$progpath"
-     exit $?
-}
 
 # func_usage
+# ----------
 # Echo short help message to standard output and exit.
 func_usage ()
 {
-    $SED -n '/^# Usage:/,/# -h/ {
-        s/^# //
-	s/^# *$//
-	s/\$progname/'$progname'/
-	p
-    }' < "$progpath"
-    $ECHO
-    $ECHO "run \`$progname --help | more' for full usage"
-    exit $?
+    $debug_cmd
+
+    func_usage_message
+    $ECHO "Run '$progname --help |${PAGER-more}' for full usage"
+    exit 0
 }
 
-# func_help
-# Echo long help message to standard output and exit.
-func_help ()
+
+# func_usage_message
+# ------------------
+# Echo short help message to standard output.
+func_usage_message ()
+{
+    $debug_cmd
+
+    eval \$ECHO \""Usage: $usage"\"
+    echo
+    $SED -n 's|^# ||
+        /^Written by/{
+          x;p;x
+        }
+	h
+	/^Written by/q' < "$progpath"
+    echo
+    eval \$ECHO \""$usage_message"\"
+}
+
+
+# func_version
+# ------------
+# Echo version message to standard output and exit.
+func_version ()
 {
-    $SED -n '/^# Usage:/,/# Report bugs to/ {
-        s/^# //
-	s/^# *$//
-	s*\$progname*'$progname'*
-	s*\$host*'"$host"'*
-	s*\$SHELL*'"$SHELL"'*
-	s*\$LTCC*'"$LTCC"'*
-	s*\$LTCFLAGS*'"$LTCFLAGS"'*
-	s*\$LD*'"$LD"'*
-	s/\$with_gnu_ld/'"$with_gnu_ld"'/
-	s/\$automake_version/'"`(automake --version) 2>/dev/null |$SED 1q`"'/
-	s/\$autoconf_version/'"`(autoconf --version) 2>/dev/null |$SED 1q`"'/
-	p
-     }' < "$progpath"
+    $debug_cmd
+
+    printf '%s\n' "$progname $scriptversion"
+    $SED -n '
+        /(C)/!b go
+        :more
+        /\./!{
+          N
+          s|\n# | |
+          b more
+        }
+        :go
+        /^# Written by /,/# warranty; / {
+          s|^# ||
+          s|^# *$||
+          s|\((C)\)[ 0-9,-]*[ ,-]\([1-9][0-9]* \)|\1 \2|
+          p
+        }
+        /^# Written by / {
+          s|^# ||
+          p
+        }
+        /^warranty; /q' < "$progpath"
+
     exit $?
 }
 
-# func_missing_arg argname
-# Echo program name prefixed message to standard error and set global
-# exit_cmd.
-func_missing_arg ()
+
+# Local variables:
+# mode: shell-script
+# sh-indentation: 2
+# eval: (add-hook 'before-save-hook 'time-stamp)
+# time-stamp-pattern: "10/scriptversion=%:y-%02m-%02d.%02H; # UTC"
+# time-stamp-time-zone: "UTC"
+# End:
+
+# Set a version string.
+scriptversion='(GNU libtool) 2.4.6'
+
+
+# func_echo ARG...
+# ----------------
+# Libtool also displays the current mode in messages, so override
+# funclib.sh func_echo with this custom definition.
+func_echo ()
 {
-    func_error "missing argument for $1"
-    exit_cmd=exit
+    $debug_cmd
+
+    _G_message=$*
+
+    func_echo_IFS=$IFS
+    IFS=$nl
+    for _G_line in $_G_message; do
+      IFS=$func_echo_IFS
+      $ECHO "$progname${opt_mode+: $opt_mode}: $_G_line"
+    done
+    IFS=$func_echo_IFS
 }
 
-exit_cmd=:
+
+# func_warning ARG...
+# -------------------
+# Libtool warnings are not categorized, so override funclib.sh
+# func_warning with this simpler definition.
+func_warning ()
+{
+    $debug_cmd
+
+    $warning_func ${1+"$@"}
+}
 
 
+## ---------------- ##
+## Options parsing. ##
+## ---------------- ##
+
+# Hook in the functions to make sure our own options are parsed during
+# the option parsing loop.
+
+usage='$progpath [OPTION]... [MODE-ARG]...'
+
+# Short help message in response to '-h'.
+usage_message="Options:
+       --config             show all configuration variables
+       --debug              enable verbose shell tracing
+   -n, --dry-run            display commands without modifying any files
+       --features           display basic configuration information and exit
+       --mode=MODE          use operation mode MODE
+       --no-warnings        equivalent to '-Wnone'
+       --preserve-dup-deps  don't remove duplicate dependency libraries
+       --quiet, --silent    don't print informational messages
+       --tag=TAG            use configuration variables from tag TAG
+   -v, --verbose            print more informational messages than default
+       --version            print version information
+   -W, --warnings=CATEGORY  report the warnings falling in CATEGORY [all]
+   -h, --help, --help-all   print short, long, or detailed help message
+"
 
+# Additional text appended to 'usage_message' in response to '--help'.
+func_help ()
+{
+    $debug_cmd
+
+    func_usage_message
+    $ECHO "$long_help_message
+
+MODE must be one of the following:
+
+       clean           remove files from the build directory
+       compile         compile a source file into a libtool object
+       execute         automatically set library path, then run a program
+       finish          complete the installation of libtool libraries
+       install         install libraries or executables
+       link            create a library or an executable
+       uninstall       remove libraries from an installed directory
+
+MODE-ARGS vary depending on the MODE.  When passed as first option,
+'--mode=MODE' may be abbreviated as 'MODE' or a unique abbreviation of that.
+Try '$progname --help --mode=MODE' for a more detailed description of MODE.
+
+When reporting a bug, please describe a test case to reproduce it and
+include the following information:
+
+       host-triplet:   $host
+       shell:          $SHELL
+       compiler:       $LTCC
+       compiler flags: $LTCFLAGS
+       linker:         $LD (gnu? $with_gnu_ld)
+       version:        $progname (GNU libtool) 2.4.6
+       automake:       `($AUTOMAKE --version) 2>/dev/null |$SED 1q`
+       autoconf:       `($AUTOCONF --version) 2>/dev/null |$SED 1q`
+
+Report bugs to <bug-libtool at gnu.org>.
+GNU libtool home page: <http://www.gnu.org/software/libtool/>.
+General help using GNU software: <http://www.gnu.org/gethelp/>."
+    exit 0
+}
 
 
-# Check that we have a working $ECHO.
-if test "X$1" = X--no-reexec; then
-  # Discard the --no-reexec flag, and continue.
-  shift
-elif test "X$1" = X--fallback-echo; then
-  # Avoid inline document here, it may be left over
-  :
-elif test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t'; then
-  # Yippee, $ECHO works!
-  :
-else
-  # Restart under the correct shell, and then maybe $ECHO will work.
-  exec $SHELL "$progpath" --no-reexec ${1+"$@"}
-fi
+# func_lo2o OBJECT-NAME
+# ---------------------
+# Transform OBJECT-NAME from a '.lo' suffix to the platform specific
+# object suffix.
 
-if test "X$1" = X--fallback-echo; then
-  # used as fallback echo
-  shift
-  cat <<EOF
-$*
-EOF
-  exit $EXIT_SUCCESS
-fi
+lo2o=s/\\.lo\$/.$objext/
+o2lo=s/\\.$objext\$/.lo/
 
-magic="%%%MAGIC variable%%%"
-magic_exe="%%%MAGIC EXE variable%%%"
+if test yes = "$_G_HAVE_XSI_OPS"; then
+  eval 'func_lo2o ()
+  {
+    case $1 in
+      *.lo) func_lo2o_result=${1%.lo}.$objext ;;
+      *   ) func_lo2o_result=$1               ;;
+    esac
+  }'
 
-# Global variables.
-# $mode is unset
-nonopt=
-execute_dlfiles=
-preserve_args=
-lo2o="s/\\.lo\$/.${objext}/"
-o2lo="s/\\.${objext}\$/.lo/"
-extracted_archives=
-extracted_serial=0
+  # func_xform LIBOBJ-OR-SOURCE
+  # ---------------------------
+  # Transform LIBOBJ-OR-SOURCE from a '.o' or '.c' (or otherwise)
+  # suffix to a '.lo' libtool-object suffix.
+  eval 'func_xform ()
+  {
+    func_xform_result=${1%.*}.lo
+  }'
+else
+  # ...otherwise fall back to using sed.
+  func_lo2o ()
+  {
+    func_lo2o_result=`$ECHO "$1" | $SED "$lo2o"`
+  }
 
-opt_dry_run=false
-opt_duplicate_deps=false
-opt_silent=false
-opt_debug=:
+  func_xform ()
+  {
+    func_xform_result=`$ECHO "$1" | $SED 's|\.[^.]*$|.lo|'`
+  }
+fi
 
-# If this variable is set in any of the actions, the command in it
-# will be execed at the end.  This prevents here-documents from being
-# left over by shells.
-exec_cmd=
 
-# func_fatal_configuration arg...
+# func_fatal_configuration ARG...
+# -------------------------------
 # Echo program name prefixed message to standard error, followed by
 # a configuration failure hint, and exit.
 func_fatal_configuration ()
 {
-    func_error ${1+"$@"}
-    func_error "See the $PACKAGE documentation for more information."
-    func_fatal_error "Fatal configuration error."
+    func__fatal_error ${1+"$@"} \
+      "See the $PACKAGE documentation for more information." \
+      "Fatal configuration error."
 }
 
 
 # func_config
+# -----------
 # Display the configuration for all the tags in this script.
 func_config ()
 {
@@ -632,279 +2149,371 @@ func_config ()
     exit $?
 }
 
+
 # func_features
+# -------------
 # Display the features supported by this script.
 func_features ()
 {
-    $ECHO "host: $host"
-    if test "$build_libtool_libs" = yes; then
-      $ECHO "enable shared libraries"
+    echo "host: $host"
+    if test yes = "$build_libtool_libs"; then
+      echo "enable shared libraries"
     else
-      $ECHO "disable shared libraries"
+      echo "disable shared libraries"
     fi
-    if test "$build_old_libs" = yes; then
-      $ECHO "enable static libraries"
+    if test yes = "$build_old_libs"; then
+      echo "enable static libraries"
     else
-      $ECHO "disable static libraries"
+      echo "disable static libraries"
     fi
 
     exit $?
 }
 
-# func_enable_tag tagname
+
+# func_enable_tag TAGNAME
+# -----------------------
 # Verify that TAGNAME is valid, and either flag an error and exit, or
 # enable the TAGNAME tag.  We also add TAGNAME to the global $taglist
 # variable here.
 func_enable_tag ()
 {
-  # Global variable:
-  tagname="$1"
+    # Global variable:
+    tagname=$1
 
-  re_begincf="^# ### BEGIN LIBTOOL TAG CONFIG: $tagname\$"
-  re_endcf="^# ### END LIBTOOL TAG CONFIG: $tagname\$"
-  sed_extractcf="/$re_begincf/,/$re_endcf/p"
+    re_begincf="^# ### BEGIN LIBTOOL TAG CONFIG: $tagname\$"
+    re_endcf="^# ### END LIBTOOL TAG CONFIG: $tagname\$"
+    sed_extractcf=/$re_begincf/,/$re_endcf/p
 
-  # Validate tagname.
-  case $tagname in
-    *[!-_A-Za-z0-9,/]*)
-      func_fatal_error "invalid tag name: $tagname"
-      ;;
-  esac
+    # Validate tagname.
+    case $tagname in
+      *[!-_A-Za-z0-9,/]*)
+        func_fatal_error "invalid tag name: $tagname"
+        ;;
+    esac
 
-  # Don't test for the "default" C tag, as we know it's
-  # there but not specially marked.
-  case $tagname in
-    CC) ;;
+    # Don't test for the "default" C tag, as we know it's
+    # there but not specially marked.
+    case $tagname in
+        CC) ;;
     *)
-      if $GREP "$re_begincf" "$progpath" >/dev/null 2>&1; then
-	taglist="$taglist $tagname"
-
-	# Evaluate the configuration.  Be careful to quote the path
-	# and the sed script, to avoid splitting on whitespace, but
-	# also don't use non-portable quotes within backquotes within
-	# quotes we have to do it in 2 steps:
-	extractedcf=`$SED -n -e "$sed_extractcf" < "$progpath"`
-	eval "$extractedcf"
+        if $GREP "$re_begincf" "$progpath" >/dev/null 2>&1; then
+	  taglist="$taglist $tagname"
+
+	  # Evaluate the configuration.  Be careful to quote the path
+	  # and the sed script, to avoid splitting on whitespace, but
+	  # also don't use non-portable quotes within backquotes within
+	  # quotes we have to do it in 2 steps:
+	  extractedcf=`$SED -n -e "$sed_extractcf" < "$progpath"`
+	  eval "$extractedcf"
+        else
+	  func_error "ignoring unknown tag $tagname"
+        fi
+        ;;
+    esac
+}
+
+
+# func_check_version_match
+# ------------------------
+# Ensure that we are using m4 macros, and libtool script from the same
+# release of libtool.
+func_check_version_match ()
+{
+    if test "$package_revision" != "$macro_revision"; then
+      if test "$VERSION" != "$macro_version"; then
+        if test -z "$macro_version"; then
+          cat >&2 <<_LT_EOF
+$progname: Version mismatch error.  This is $PACKAGE $VERSION, but the
+$progname: definition of this LT_INIT comes from an older release.
+$progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION
+$progname: and run autoconf again.
+_LT_EOF
+        else
+          cat >&2 <<_LT_EOF
+$progname: Version mismatch error.  This is $PACKAGE $VERSION, but the
+$progname: definition of this LT_INIT comes from $PACKAGE $macro_version.
+$progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION
+$progname: and run autoconf again.
+_LT_EOF
+        fi
       else
-	func_error "ignoring unknown tag $tagname"
+        cat >&2 <<_LT_EOF
+$progname: Version mismatch error.  This is $PACKAGE $VERSION, revision $package_revision,
+$progname: but the definition of this LT_INIT comes from revision $macro_revision.
+$progname: You should recreate aclocal.m4 with macros from revision $package_revision
+$progname: of $PACKAGE $VERSION and run autoconf again.
+_LT_EOF
       fi
+
+      exit $EXIT_MISMATCH
+    fi
+}
+
+
+# libtool_options_prep [ARG]...
+# -----------------------------
+# Preparation for options parsed by libtool.
+libtool_options_prep ()
+{
+    $debug_mode
+
+    # Option defaults:
+    opt_config=false
+    opt_dlopen=
+    opt_dry_run=false
+    opt_help=false
+    opt_mode=
+    opt_preserve_dup_deps=false
+    opt_quiet=false
+
+    nonopt=
+    preserve_args=
+
+    # Shorthand for --mode=foo, only valid as the first argument
+    case $1 in
+    clean|clea|cle|cl)
+      shift; set dummy --mode clean ${1+"$@"}; shift
       ;;
-  esac
+    compile|compil|compi|comp|com|co|c)
+      shift; set dummy --mode compile ${1+"$@"}; shift
+      ;;
+    execute|execut|execu|exec|exe|ex|e)
+      shift; set dummy --mode execute ${1+"$@"}; shift
+      ;;
+    finish|finis|fini|fin|fi|f)
+      shift; set dummy --mode finish ${1+"$@"}; shift
+      ;;
+    install|instal|insta|inst|ins|in|i)
+      shift; set dummy --mode install ${1+"$@"}; shift
+      ;;
+    link|lin|li|l)
+      shift; set dummy --mode link ${1+"$@"}; shift
+      ;;
+    uninstall|uninstal|uninsta|uninst|unins|unin|uni|un|u)
+      shift; set dummy --mode uninstall ${1+"$@"}; shift
+      ;;
+    esac
+
+    # Pass back the list of options.
+    func_quote_for_eval ${1+"$@"}
+    libtool_options_prep_result=$func_quote_for_eval_result
 }
+func_add_hook func_options_prep libtool_options_prep
+
 
-# Parse options once, thoroughly.  This comes as soon as possible in
-# the script to make things like `libtool --version' happen quickly.
+# libtool_parse_options [ARG]...
+# ---------------------------------
+# Provide handling for libtool specific options.
+libtool_parse_options ()
 {
+    $debug_cmd
+
+    # Perform our own loop to consume as many options as possible in
+    # each iteration.
+    while test $# -gt 0; do
+      _G_opt=$1
+      shift
+      case $_G_opt in
+        --dry-run|--dryrun|-n)
+                        opt_dry_run=:
+                        ;;
+
+        --config)       func_config ;;
+
+        --dlopen|-dlopen)
+                        opt_dlopen="${opt_dlopen+$opt_dlopen
+}$1"
+                        shift
+                        ;;
+
+        --preserve-dup-deps)
+                        opt_preserve_dup_deps=: ;;
+
+        --features)     func_features ;;
+
+        --finish)       set dummy --mode finish ${1+"$@"}; shift ;;
+
+        --help)         opt_help=: ;;
+
+        --help-all)     opt_help=': help-all' ;;
+
+        --mode)         test $# = 0 && func_missing_arg $_G_opt && break
+                        opt_mode=$1
+                        case $1 in
+                          # Valid mode arguments:
+                          clean|compile|execute|finish|install|link|relink|uninstall) ;;
+
+                          # Catch anything else as an error
+                          *) func_error "invalid argument for $_G_opt"
+                             exit_cmd=exit
+                             break
+                             ;;
+                        esac
+                        shift
+                        ;;
+
+        --no-silent|--no-quiet)
+                        opt_quiet=false
+                        func_append preserve_args " $_G_opt"
+                        ;;
+
+        --no-warnings|--no-warning|--no-warn)
+                        opt_warning=false
+                        func_append preserve_args " $_G_opt"
+                        ;;
+
+        --no-verbose)
+                        opt_verbose=false
+                        func_append preserve_args " $_G_opt"
+                        ;;
+
+        --silent|--quiet)
+                        opt_quiet=:
+                        opt_verbose=false
+                        func_append preserve_args " $_G_opt"
+                        ;;
+
+        --tag)          test $# = 0 && func_missing_arg $_G_opt && break
+                        opt_tag=$1
+                        func_append preserve_args " $_G_opt $1"
+                        func_enable_tag "$1"
+                        shift
+                        ;;
+
+        --verbose|-v)   opt_quiet=false
+                        opt_verbose=:
+                        func_append preserve_args " $_G_opt"
+                        ;;
+
+	# An option not handled by this hook function:
+        *)		set dummy "$_G_opt" ${1+"$@"};	shift; break  ;;
+      esac
+    done
 
-  # Shorthand for --mode=foo, only valid as the first argument
-  case $1 in
-  clean|clea|cle|cl)
-    shift; set dummy --mode clean ${1+"$@"}; shift
-    ;;
-  compile|compil|compi|comp|com|co|c)
-    shift; set dummy --mode compile ${1+"$@"}; shift
-    ;;
-  execute|execut|execu|exec|exe|ex|e)
-    shift; set dummy --mode execute ${1+"$@"}; shift
-    ;;
-  finish|finis|fini|fin|fi|f)
-    shift; set dummy --mode finish ${1+"$@"}; shift
-    ;;
-  install|instal|insta|inst|ins|in|i)
-    shift; set dummy --mode install ${1+"$@"}; shift
-    ;;
-  link|lin|li|l)
-    shift; set dummy --mode link ${1+"$@"}; shift
-    ;;
-  uninstall|uninstal|uninsta|uninst|unins|unin|uni|un|u)
-    shift; set dummy --mode uninstall ${1+"$@"}; shift
-    ;;
-  esac
 
-  # Parse non-mode specific arguments:
-  while test "$#" -gt 0; do
-    opt="$1"
-    shift
+    # save modified positional parameters for caller
+    func_quote_for_eval ${1+"$@"}
+    libtool_parse_options_result=$func_quote_for_eval_result
+}
+func_add_hook func_parse_options libtool_parse_options
+
+
+
+# libtool_validate_options [ARG]...
+# ---------------------------------
+# Perform any sanity checks on option settings and/or unconsumed
+# arguments.
+libtool_validate_options ()
+{
+    # save first non-option argument
+    if test 0 -lt $#; then
+      nonopt=$1
+      shift
+    fi
 
-    case $opt in
-      --config)		func_config					;;
-
-      --debug)		preserve_args="$preserve_args $opt"
-			func_echo "enabling shell trace mode"
-			opt_debug='set -x'
-			$opt_debug
-			;;
-
-      -dlopen)		test "$#" -eq 0 && func_missing_arg "$opt" && break
-			execute_dlfiles="$execute_dlfiles $1"
-			shift
-			;;
-
-      --dry-run | -n)	opt_dry_run=:					;;
-      --features)       func_features					;;
-      --finish)		mode="finish"					;;
-
-      --mode)		test "$#" -eq 0 && func_missing_arg "$opt" && break
-			case $1 in
-			  # Valid mode arguments:
-			  clean)	;;
-			  compile)	;;
-			  execute)	;;
-			  finish)	;;
-			  install)	;;
-			  link)		;;
-			  relink)	;;
-			  uninstall)	;;
-
-			  # Catch anything else as an error
-			  *) func_error "invalid argument for $opt"
-			     exit_cmd=exit
-			     break
-			     ;;
-		        esac
-
-			mode="$1"
-			shift
-			;;
-
-      --preserve-dup-deps)
-			opt_duplicate_deps=:				;;
-
-      --quiet|--silent)	preserve_args="$preserve_args $opt"
-			opt_silent=:
-			;;
-
-      --verbose| -v)	preserve_args="$preserve_args $opt"
-			opt_silent=false
-			;;
-
-      --tag)		test "$#" -eq 0 && func_missing_arg "$opt" && break
-			preserve_args="$preserve_args $opt $1"
-			func_enable_tag "$1"	# tagname is set here
-			shift
-			;;
-
-      # Separate optargs to long options:
-      -dlopen=*|--mode=*|--tag=*)
-			func_opt_split "$opt"
-			set dummy "$func_opt_split_opt" "$func_opt_split_arg" ${1+"$@"}
-			shift
-			;;
-
-      -\?|-h)		func_usage					;;
-      --help)		opt_help=:					;;
-      --version)	func_version					;;
-
-      -*)		func_fatal_help "unrecognized option \`$opt'"	;;
-
-      *)		nonopt="$opt"
-			break
-			;;
+    # preserve --debug
+    test : = "$debug_cmd" || func_append preserve_args " --debug"
+
+    case $host in
+      # Solaris2 added to fix http://debbugs.gnu.org/cgi/bugreport.cgi?bug=16452
+      # see also: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59788
+      *cygwin* | *mingw* | *pw32* | *cegcc* | *solaris2* | *os2*)
+        # don't eliminate duplications in $postdeps and $predeps
+        opt_duplicate_compiler_generated_deps=:
+        ;;
+      *)
+        opt_duplicate_compiler_generated_deps=$opt_preserve_dup_deps
+        ;;
     esac
-  done
 
+    $opt_help || {
+      # Sanity checks first:
+      func_check_version_match
 
-  case $host in
-    *cygwin* | *mingw* | *pw32* | *cegcc*)
-      # don't eliminate duplications in $postdeps and $predeps
-      opt_duplicate_compiler_generated_deps=:
-      ;;
-    *)
-      opt_duplicate_compiler_generated_deps=$opt_duplicate_deps
-      ;;
-  esac
+      test yes != "$build_libtool_libs" \
+        && test yes != "$build_old_libs" \
+        && func_fatal_configuration "not configured to build any kind of library"
 
-  # Having warned about all mis-specified options, bail out if
-  # anything was wrong.
-  $exit_cmd $EXIT_FAILURE
-}
+      # Darwin sucks
+      eval std_shrext=\"$shrext_cmds\"
 
-# func_check_version_match
-# Ensure that we are using m4 macros, and libtool script from the same
-# release of libtool.
-func_check_version_match ()
-{
-  if test "$package_revision" != "$macro_revision"; then
-    if test "$VERSION" != "$macro_version"; then
-      if test -z "$macro_version"; then
-        cat >&2 <<_LT_EOF
-$progname: Version mismatch error.  This is $PACKAGE $VERSION, but the
-$progname: definition of this LT_INIT comes from an older release.
-$progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION
-$progname: and run autoconf again.
-_LT_EOF
-      else
-        cat >&2 <<_LT_EOF
-$progname: Version mismatch error.  This is $PACKAGE $VERSION, but the
-$progname: definition of this LT_INIT comes from $PACKAGE $macro_version.
-$progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION
-$progname: and run autoconf again.
-_LT_EOF
+      # Only execute mode is allowed to have -dlopen flags.
+      if test -n "$opt_dlopen" && test execute != "$opt_mode"; then
+        func_error "unrecognized option '-dlopen'"
+        $ECHO "$help" 1>&2
+        exit $EXIT_FAILURE
       fi
-    else
-      cat >&2 <<_LT_EOF
-$progname: Version mismatch error.  This is $PACKAGE $VERSION, revision $package_revision,
-$progname: but the definition of this LT_INIT comes from revision $macro_revision.
-$progname: You should recreate aclocal.m4 with macros from revision $package_revision
-$progname: of $PACKAGE $VERSION and run autoconf again.
-_LT_EOF
-    fi
 
-    exit $EXIT_MISMATCH
-  fi
+      # Change the help message to a mode-specific one.
+      generic_help=$help
+      help="Try '$progname --help --mode=$opt_mode' for more information."
+    }
+
+    # Pass back the unparsed argument list
+    func_quote_for_eval ${1+"$@"}
+    libtool_validate_options_result=$func_quote_for_eval_result
 }
+func_add_hook func_validate_options libtool_validate_options
 
 
-## ----------- ##
-##    Main.    ##
-## ----------- ##
+# Process options as early as possible so that --help and --version
+# can return quickly.
+func_options ${1+"$@"}
+eval set dummy "$func_options_result"; shift
 
-$opt_help || {
-  # Sanity checks first:
-  func_check_version_match
 
-  if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then
-    func_fatal_configuration "not configured to build any kind of library"
-  fi
 
-  test -z "$mode" && func_fatal_error "error: you must specify a MODE."
+## ----------- ##
+##    Main.    ##
+## ----------- ##
 
+magic='%%%MAGIC variable%%%'
+magic_exe='%%%MAGIC EXE variable%%%'
 
-  # Darwin sucks
-  eval std_shrext=\"$shrext_cmds\"
+# Global variables.
+extracted_archives=
+extracted_serial=0
 
+# If this variable is set in any of the actions, the command in it
+# will be execed at the end.  This prevents here-documents from being
+# left over by shells.
+exec_cmd=
 
-  # Only execute mode is allowed to have -dlopen flags.
-  if test -n "$execute_dlfiles" && test "$mode" != execute; then
-    func_error "unrecognized option \`-dlopen'"
-    $ECHO "$help" 1>&2
-    exit $EXIT_FAILURE
-  fi
 
-  # Change the help message to a mode-specific one.
-  generic_help="$help"
-  help="Try \`$progname --help --mode=$mode' for more information."
+# A function that is used when there is no print builtin or printf.
+func_fallback_echo ()
+{
+  eval 'cat <<_LTECHO_EOF
+$1
+_LTECHO_EOF'
 }
 
+# func_generated_by_libtool
+# True iff stdin has been generated by Libtool. This function is only
+# a basic sanity check; it will hardly flush out determined imposters.
+func_generated_by_libtool_p ()
+{
+  $GREP "^# Generated by .*$PACKAGE" > /dev/null 2>&1
+}
 
 # func_lalib_p file
-# True iff FILE is a libtool `.la' library or `.lo' object file.
+# True iff FILE is a libtool '.la' library or '.lo' object file.
 # This function is only a basic sanity check; it will hardly flush out
 # determined imposters.
 func_lalib_p ()
 {
     test -f "$1" &&
-      $SED -e 4q "$1" 2>/dev/null \
-        | $GREP "^# Generated by .*$PACKAGE" > /dev/null 2>&1
+      $SED -e 4q "$1" 2>/dev/null | func_generated_by_libtool_p
 }
 
 # func_lalib_unsafe_p file
-# True iff FILE is a libtool `.la' library or `.lo' object file.
+# True iff FILE is a libtool '.la' library or '.lo' object file.
 # This function implements the same check as func_lalib_p without
 # resorting to external programs.  To this end, it redirects stdin and
 # closes it afterwards, without saving the original file descriptor.
 # As a safety measure, use it only where a negative result would be
-# fatal anyway.  Works if `file' does not exist.
+# fatal anyway.  Works if 'file' does not exist.
 func_lalib_unsafe_p ()
 {
     lalib_p=no
@@ -912,13 +2521,13 @@ func_lalib_unsafe_p ()
 	for lalib_p_l in 1 2 3 4
 	do
 	    read lalib_p_line
-	    case "$lalib_p_line" in
+	    case $lalib_p_line in
 		\#\ Generated\ by\ *$PACKAGE* ) lalib_p=yes; break;;
 	    esac
 	done
 	exec 0<&5 5<&-
     fi
-    test "$lalib_p" = yes
+    test yes = "$lalib_p"
 }
 
 # func_ltwrapper_script_p file
@@ -927,7 +2536,8 @@ func_lalib_unsafe_p ()
 # determined imposters.
 func_ltwrapper_script_p ()
 {
-    func_lalib_p "$1"
+    test -f "$1" &&
+      $lt_truncate_bin < "$1" 2>/dev/null | func_generated_by_libtool_p
 }
 
 # func_ltwrapper_executable_p file
@@ -950,12 +2560,9 @@ func_ltwrapper_executable_p ()
 # temporary ltwrapper_script.
 func_ltwrapper_scriptname ()
 {
-    func_ltwrapper_scriptname_result=""
-    if func_ltwrapper_executable_p "$1"; then
-	func_dirname_and_basename "$1" "" "."
-	func_stripname '' '.exe' "$func_basename_result"
-	func_ltwrapper_scriptname_result="$func_dirname_result/$objdir/${func_stripname_result}_ltshwrapper"
-    fi
+    func_dirname_and_basename "$1" "" "."
+    func_stripname '' '.exe' "$func_basename_result"
+    func_ltwrapper_scriptname_result=$func_dirname_result/$objdir/${func_stripname_result}_ltshwrapper
 }
 
 # func_ltwrapper_p file
@@ -974,11 +2581,13 @@ func_ltwrapper_p ()
 # FAIL_CMD may read-access the current command in variable CMD!
 func_execute_cmds ()
 {
-    $opt_debug
+    $debug_cmd
+
     save_ifs=$IFS; IFS='~'
     for cmd in $1; do
-      IFS=$save_ifs
+      IFS=$sp$nl
       eval cmd=\"$cmd\"
+      IFS=$save_ifs
       func_show_eval "$cmd" "${2-:}"
     done
     IFS=$save_ifs
@@ -990,10 +2599,11 @@ func_execute_cmds ()
 # Note that it is not necessary on cygwin/mingw to append a dot to
 # FILE even if both FILE and FILE.exe exist: automatic-append-.exe
 # behavior happens only for exec(3), not for open(2)!  Also, sourcing
-# `FILE.' does not work on cygwin managed mounts.
+# 'FILE.' does not work on cygwin managed mounts.
 func_source ()
 {
-    $opt_debug
+    $debug_cmd
+
     case $1 in
     */* | *\\*)	. "$1" ;;
     *)		. "./$1" ;;
@@ -1001,6 +2611,37 @@ func_source ()
 }
 
 
+# func_resolve_sysroot PATH
+# Replace a leading = in PATH with a sysroot.  Store the result into
+# func_resolve_sysroot_result
+func_resolve_sysroot ()
+{
+  func_resolve_sysroot_result=$1
+  case $func_resolve_sysroot_result in
+  =*)
+    func_stripname '=' '' "$func_resolve_sysroot_result"
+    func_resolve_sysroot_result=$lt_sysroot$func_stripname_result
+    ;;
+  esac
+}
+
+# func_replace_sysroot PATH
+# If PATH begins with the sysroot, replace it with = and
+# store the result into func_replace_sysroot_result.
+func_replace_sysroot ()
+{
+  case $lt_sysroot:$1 in
+  ?*:"$lt_sysroot"*)
+    func_stripname "$lt_sysroot" '' "$1"
+    func_replace_sysroot_result='='$func_stripname_result
+    ;;
+  *)
+    # Including no sysroot.
+    func_replace_sysroot_result=$1
+    ;;
+  esac
+}
+
 # func_infer_tag arg
 # Infer tagged configuration to use if any are available and
 # if one wasn't chosen via the "--tag" command line option.
@@ -1009,32 +2650,37 @@ func_source ()
 # arg is usually of the form 'gcc ...'
 func_infer_tag ()
 {
-    $opt_debug
+    $debug_cmd
+
     if test -n "$available_tags" && test -z "$tagname"; then
       CC_quoted=
       for arg in $CC; do
-        func_quote_for_eval "$arg"
-	CC_quoted="$CC_quoted $func_quote_for_eval_result"
+	func_append_quoted CC_quoted "$arg"
       done
+      CC_expanded=`func_echo_all $CC`
+      CC_quoted_expanded=`func_echo_all $CC_quoted`
       case $@ in
       # Blanks in the command may have been stripped by the calling shell,
       # but not from the CC environment variable when configure was run.
-      " $CC "* | "$CC "* | " `$ECHO $CC` "* | "`$ECHO $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$ECHO $CC_quoted` "* | "`$ECHO $CC_quoted` "*) ;;
+      " $CC "* | "$CC "* | " $CC_expanded "* | "$CC_expanded "* | \
+      " $CC_quoted"* | "$CC_quoted "* | " $CC_quoted_expanded "* | "$CC_quoted_expanded "*) ;;
       # Blanks at the start of $base_compile will cause this to fail
       # if we don't check for them as well.
       *)
 	for z in $available_tags; do
 	  if $GREP "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$progpath" > /dev/null; then
 	    # Evaluate the configuration.
-	    eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $progpath`"
+	    eval "`$SED -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $progpath`"
 	    CC_quoted=
 	    for arg in $CC; do
 	      # Double-quote args containing other shell metacharacters.
-	      func_quote_for_eval "$arg"
-	      CC_quoted="$CC_quoted $func_quote_for_eval_result"
+	      func_append_quoted CC_quoted "$arg"
 	    done
+	    CC_expanded=`func_echo_all $CC`
+	    CC_quoted_expanded=`func_echo_all $CC_quoted`
 	    case "$@ " in
-	      " $CC "* | "$CC "* | " `$ECHO $CC` "* | "`$ECHO $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$ECHO $CC_quoted` "* | "`$ECHO $CC_quoted` "*)
+	    " $CC "* | "$CC "* | " $CC_expanded "* | "$CC_expanded "* | \
+	    " $CC_quoted"* | "$CC_quoted "* | " $CC_quoted_expanded "* | "$CC_quoted_expanded "*)
 	      # The compiler in the base compile command matches
 	      # the one in the tagged configuration.
 	      # Assume this is the tagged configuration we want.
@@ -1049,7 +2695,7 @@ func_infer_tag ()
 	# line option must be used.
 	if test -z "$tagname"; then
 	  func_echo "unable to infer tagged configuration"
-	  func_fatal_error "specify a tag with \`--tag'"
+	  func_fatal_error "specify a tag with '--tag'"
 #	else
 #	  func_verbose "using $tagname tagged configuration"
 	fi
@@ -1059,51 +2705,570 @@ func_infer_tag ()
 }
 
 
-
-# func_write_libtool_object output_name pic_name nonpic_name
-# Create a libtool object file (analogous to a ".la" file),
-# but don't create it if we're doing a dry run.
-func_write_libtool_object ()
+
+# func_write_libtool_object output_name pic_name nonpic_name
+# Create a libtool object file (analogous to a ".la" file),
+# but don't create it if we're doing a dry run.
+func_write_libtool_object ()
+{
+    write_libobj=$1
+    if test yes = "$build_libtool_libs"; then
+      write_lobj=\'$2\'
+    else
+      write_lobj=none
+    fi
+
+    if test yes = "$build_old_libs"; then
+      write_oldobj=\'$3\'
+    else
+      write_oldobj=none
+    fi
+
+    $opt_dry_run || {
+      cat >${write_libobj}T <<EOF
+# $write_libobj - a libtool object file
+# Generated by $PROGRAM (GNU $PACKAGE) $VERSION
+#
+# Please DO NOT delete this file!
+# It is necessary for linking the library.
+
+# Name of the PIC object.
+pic_object=$write_lobj
+
+# Name of the non-PIC object
+non_pic_object=$write_oldobj
+
+EOF
+      $MV "${write_libobj}T" "$write_libobj"
+    }
+}
+
+
+##################################################
+# FILE NAME AND PATH CONVERSION HELPER FUNCTIONS #
+##################################################
+
+# func_convert_core_file_wine_to_w32 ARG
+# Helper function used by file name conversion functions when $build is *nix,
+# and $host is mingw, cygwin, or some other w32 environment. Relies on a
+# correctly configured wine environment available, with the winepath program
+# in $build's $PATH.
+#
+# ARG is the $build file name to be converted to w32 format.
+# Result is available in $func_convert_core_file_wine_to_w32_result, and will
+# be empty on error (or when ARG is empty)
+func_convert_core_file_wine_to_w32 ()
+{
+  $debug_cmd
+
+  func_convert_core_file_wine_to_w32_result=$1
+  if test -n "$1"; then
+    # Unfortunately, winepath does not exit with a non-zero error code, so we
+    # are forced to check the contents of stdout. On the other hand, if the
+    # command is not found, the shell will set an exit code of 127 and print
+    # *an error message* to stdout. So we must check for both error code of
+    # zero AND non-empty stdout, which explains the odd construction:
+    func_convert_core_file_wine_to_w32_tmp=`winepath -w "$1" 2>/dev/null`
+    if test "$?" -eq 0 && test -n "$func_convert_core_file_wine_to_w32_tmp"; then
+      func_convert_core_file_wine_to_w32_result=`$ECHO "$func_convert_core_file_wine_to_w32_tmp" |
+        $SED -e "$sed_naive_backslashify"`
+    else
+      func_convert_core_file_wine_to_w32_result=
+    fi
+  fi
+}
+# end: func_convert_core_file_wine_to_w32
+
+
+# func_convert_core_path_wine_to_w32 ARG
+# Helper function used by path conversion functions when $build is *nix, and
+# $host is mingw, cygwin, or some other w32 environment. Relies on a correctly
+# configured wine environment available, with the winepath program in $build's
+# $PATH. Assumes ARG has no leading or trailing path separator characters.
+#
+# ARG is path to be converted from $build format to win32.
+# Result is available in $func_convert_core_path_wine_to_w32_result.
+# Unconvertible file (directory) names in ARG are skipped; if no directory names
+# are convertible, then the result may be empty.
+func_convert_core_path_wine_to_w32 ()
+{
+  $debug_cmd
+
+  # unfortunately, winepath doesn't convert paths, only file names
+  func_convert_core_path_wine_to_w32_result=
+  if test -n "$1"; then
+    oldIFS=$IFS
+    IFS=:
+    for func_convert_core_path_wine_to_w32_f in $1; do
+      IFS=$oldIFS
+      func_convert_core_file_wine_to_w32 "$func_convert_core_path_wine_to_w32_f"
+      if test -n "$func_convert_core_file_wine_to_w32_result"; then
+        if test -z "$func_convert_core_path_wine_to_w32_result"; then
+          func_convert_core_path_wine_to_w32_result=$func_convert_core_file_wine_to_w32_result
+        else
+          func_append func_convert_core_path_wine_to_w32_result ";$func_convert_core_file_wine_to_w32_result"
+        fi
+      fi
+    done
+    IFS=$oldIFS
+  fi
+}
+# end: func_convert_core_path_wine_to_w32
+
+
+# func_cygpath ARGS...
+# Wrapper around calling the cygpath program via LT_CYGPATH. This is used when
+# when (1) $build is *nix and Cygwin is hosted via a wine environment; or (2)
+# $build is MSYS and $host is Cygwin, or (3) $build is Cygwin. In case (1) or
+# (2), returns the Cygwin file name or path in func_cygpath_result (input
+# file name or path is assumed to be in w32 format, as previously converted
+# from $build's *nix or MSYS format). In case (3), returns the w32 file name
+# or path in func_cygpath_result (input file name or path is assumed to be in
+# Cygwin format). Returns an empty string on error.
+#
+# ARGS are passed to cygpath, with the last one being the file name or path to
+# be converted.
+#
+# Specify the absolute *nix (or w32) name to cygpath in the LT_CYGPATH
+# environment variable; do not put it in $PATH.
+func_cygpath ()
+{
+  $debug_cmd
+
+  if test -n "$LT_CYGPATH" && test -f "$LT_CYGPATH"; then
+    func_cygpath_result=`$LT_CYGPATH "$@" 2>/dev/null`
+    if test "$?" -ne 0; then
+      # on failure, ensure result is empty
+      func_cygpath_result=
+    fi
+  else
+    func_cygpath_result=
+    func_error "LT_CYGPATH is empty or specifies non-existent file: '$LT_CYGPATH'"
+  fi
+}
+#end: func_cygpath
+
+
+# func_convert_core_msys_to_w32 ARG
+# Convert file name or path ARG from MSYS format to w32 format.  Return
+# result in func_convert_core_msys_to_w32_result.
+func_convert_core_msys_to_w32 ()
+{
+  $debug_cmd
+
+  # awkward: cmd appends spaces to result
+  func_convert_core_msys_to_w32_result=`( cmd //c echo "$1" ) 2>/dev/null |
+    $SED -e 's/[ ]*$//' -e "$sed_naive_backslashify"`
+}
+#end: func_convert_core_msys_to_w32
+
+
+# func_convert_file_check ARG1 ARG2
+# Verify that ARG1 (a file name in $build format) was converted to $host
+# format in ARG2. Otherwise, emit an error message, but continue (resetting
+# func_to_host_file_result to ARG1).
+func_convert_file_check ()
+{
+  $debug_cmd
+
+  if test -z "$2" && test -n "$1"; then
+    func_error "Could not determine host file name corresponding to"
+    func_error "  '$1'"
+    func_error "Continuing, but uninstalled executables may not work."
+    # Fallback:
+    func_to_host_file_result=$1
+  fi
+}
+# end func_convert_file_check
+
+
+# func_convert_path_check FROM_PATHSEP TO_PATHSEP FROM_PATH TO_PATH
+# Verify that FROM_PATH (a path in $build format) was converted to $host
+# format in TO_PATH. Otherwise, emit an error message, but continue, resetting
+# func_to_host_file_result to a simplistic fallback value (see below).
+func_convert_path_check ()
+{
+  $debug_cmd
+
+  if test -z "$4" && test -n "$3"; then
+    func_error "Could not determine the host path corresponding to"
+    func_error "  '$3'"
+    func_error "Continuing, but uninstalled executables may not work."
+    # Fallback.  This is a deliberately simplistic "conversion" and
+    # should not be "improved".  See libtool.info.
+    if test "x$1" != "x$2"; then
+      lt_replace_pathsep_chars="s|$1|$2|g"
+      func_to_host_path_result=`echo "$3" |
+        $SED -e "$lt_replace_pathsep_chars"`
+    else
+      func_to_host_path_result=$3
+    fi
+  fi
+}
+# end func_convert_path_check
+
+
+# func_convert_path_front_back_pathsep FRONTPAT BACKPAT REPL ORIG
+# Modifies func_to_host_path_result by prepending REPL if ORIG matches FRONTPAT
+# and appending REPL if ORIG matches BACKPAT.
+func_convert_path_front_back_pathsep ()
+{
+  $debug_cmd
+
+  case $4 in
+  $1 ) func_to_host_path_result=$3$func_to_host_path_result
+    ;;
+  esac
+  case $4 in
+  $2 ) func_append func_to_host_path_result "$3"
+    ;;
+  esac
+}
+# end func_convert_path_front_back_pathsep
+
+
+##################################################
+# $build to $host FILE NAME CONVERSION FUNCTIONS #
+##################################################
+# invoked via '$to_host_file_cmd ARG'
+#
+# In each case, ARG is the path to be converted from $build to $host format.
+# Result will be available in $func_to_host_file_result.
+
+
+# func_to_host_file ARG
+# Converts the file name ARG from $build format to $host format. Return result
+# in func_to_host_file_result.
+func_to_host_file ()
+{
+  $debug_cmd
+
+  $to_host_file_cmd "$1"
+}
+# end func_to_host_file
+
+
+# func_to_tool_file ARG LAZY
+# converts the file name ARG from $build format to toolchain format. Return
+# result in func_to_tool_file_result.  If the conversion in use is listed
+# in (the comma separated) LAZY, no conversion takes place.
+func_to_tool_file ()
+{
+  $debug_cmd
+
+  case ,$2, in
+    *,"$to_tool_file_cmd",*)
+      func_to_tool_file_result=$1
+      ;;
+    *)
+      $to_tool_file_cmd "$1"
+      func_to_tool_file_result=$func_to_host_file_result
+      ;;
+  esac
+}
+# end func_to_tool_file
+
+
+# func_convert_file_noop ARG
+# Copy ARG to func_to_host_file_result.
+func_convert_file_noop ()
+{
+  func_to_host_file_result=$1
+}
+# end func_convert_file_noop
+
+
+# func_convert_file_msys_to_w32 ARG
+# Convert file name ARG from (mingw) MSYS to (mingw) w32 format; automatic
+# conversion to w32 is not available inside the cwrapper.  Returns result in
+# func_to_host_file_result.
+func_convert_file_msys_to_w32 ()
+{
+  $debug_cmd
+
+  func_to_host_file_result=$1
+  if test -n "$1"; then
+    func_convert_core_msys_to_w32 "$1"
+    func_to_host_file_result=$func_convert_core_msys_to_w32_result
+  fi
+  func_convert_file_check "$1" "$func_to_host_file_result"
+}
+# end func_convert_file_msys_to_w32
+
+
+# func_convert_file_cygwin_to_w32 ARG
+# Convert file name ARG from Cygwin to w32 format.  Returns result in
+# func_to_host_file_result.
+func_convert_file_cygwin_to_w32 ()
+{
+  $debug_cmd
+
+  func_to_host_file_result=$1
+  if test -n "$1"; then
+    # because $build is cygwin, we call "the" cygpath in $PATH; no need to use
+    # LT_CYGPATH in this case.
+    func_to_host_file_result=`cygpath -m "$1"`
+  fi
+  func_convert_file_check "$1" "$func_to_host_file_result"
+}
+# end func_convert_file_cygwin_to_w32
+
+
+# func_convert_file_nix_to_w32 ARG
+# Convert file name ARG from *nix to w32 format.  Requires a wine environment
+# and a working winepath. Returns result in func_to_host_file_result.
+func_convert_file_nix_to_w32 ()
+{
+  $debug_cmd
+
+  func_to_host_file_result=$1
+  if test -n "$1"; then
+    func_convert_core_file_wine_to_w32 "$1"
+    func_to_host_file_result=$func_convert_core_file_wine_to_w32_result
+  fi
+  func_convert_file_check "$1" "$func_to_host_file_result"
+}
+# end func_convert_file_nix_to_w32
+
+
+# func_convert_file_msys_to_cygwin ARG
+# Convert file name ARG from MSYS to Cygwin format.  Requires LT_CYGPATH set.
+# Returns result in func_to_host_file_result.
+func_convert_file_msys_to_cygwin ()
+{
+  $debug_cmd
+
+  func_to_host_file_result=$1
+  if test -n "$1"; then
+    func_convert_core_msys_to_w32 "$1"
+    func_cygpath -u "$func_convert_core_msys_to_w32_result"
+    func_to_host_file_result=$func_cygpath_result
+  fi
+  func_convert_file_check "$1" "$func_to_host_file_result"
+}
+# end func_convert_file_msys_to_cygwin
+
+
+# func_convert_file_nix_to_cygwin ARG
+# Convert file name ARG from *nix to Cygwin format.  Requires Cygwin installed
+# in a wine environment, working winepath, and LT_CYGPATH set.  Returns result
+# in func_to_host_file_result.
+func_convert_file_nix_to_cygwin ()
+{
+  $debug_cmd
+
+  func_to_host_file_result=$1
+  if test -n "$1"; then
+    # convert from *nix to w32, then use cygpath to convert from w32 to cygwin.
+    func_convert_core_file_wine_to_w32 "$1"
+    func_cygpath -u "$func_convert_core_file_wine_to_w32_result"
+    func_to_host_file_result=$func_cygpath_result
+  fi
+  func_convert_file_check "$1" "$func_to_host_file_result"
+}
+# end func_convert_file_nix_to_cygwin
+
+
+#############################################
+# $build to $host PATH CONVERSION FUNCTIONS #
+#############################################
+# invoked via '$to_host_path_cmd ARG'
+#
+# In each case, ARG is the path to be converted from $build to $host format.
+# The result will be available in $func_to_host_path_result.
+#
+# Path separators are also converted from $build format to $host format.  If
+# ARG begins or ends with a path separator character, it is preserved (but
+# converted to $host format) on output.
+#
+# All path conversion functions are named using the following convention:
+#   file name conversion function    : func_convert_file_X_to_Y ()
+#   path conversion function         : func_convert_path_X_to_Y ()
+# where, for any given $build/$host combination the 'X_to_Y' value is the
+# same.  If conversion functions are added for new $build/$host combinations,
+# the two new functions must follow this pattern, or func_init_to_host_path_cmd
+# will break.
+
+
+# func_init_to_host_path_cmd
+# Ensures that function "pointer" variable $to_host_path_cmd is set to the
+# appropriate value, based on the value of $to_host_file_cmd.
+to_host_path_cmd=
+func_init_to_host_path_cmd ()
+{
+  $debug_cmd
+
+  if test -z "$to_host_path_cmd"; then
+    func_stripname 'func_convert_file_' '' "$to_host_file_cmd"
+    to_host_path_cmd=func_convert_path_$func_stripname_result
+  fi
+}
+
+
+# func_to_host_path ARG
+# Converts the path ARG from $build format to $host format. Return result
+# in func_to_host_path_result.
+func_to_host_path ()
+{
+  $debug_cmd
+
+  func_init_to_host_path_cmd
+  $to_host_path_cmd "$1"
+}
+# end func_to_host_path
+
+
+# func_convert_path_noop ARG
+# Copy ARG to func_to_host_path_result.
+func_convert_path_noop ()
+{
+  func_to_host_path_result=$1
+}
+# end func_convert_path_noop
+
+
+# func_convert_path_msys_to_w32 ARG
+# Convert path ARG from (mingw) MSYS to (mingw) w32 format; automatic
+# conversion to w32 is not available inside the cwrapper.  Returns result in
+# func_to_host_path_result.
+func_convert_path_msys_to_w32 ()
+{
+  $debug_cmd
+
+  func_to_host_path_result=$1
+  if test -n "$1"; then
+    # Remove leading and trailing path separator characters from ARG.  MSYS
+    # behavior is inconsistent here; cygpath turns them into '.;' and ';.';
+    # and winepath ignores them completely.
+    func_stripname : : "$1"
+    func_to_host_path_tmp1=$func_stripname_result
+    func_convert_core_msys_to_w32 "$func_to_host_path_tmp1"
+    func_to_host_path_result=$func_convert_core_msys_to_w32_result
+    func_convert_path_check : ";" \
+      "$func_to_host_path_tmp1" "$func_to_host_path_result"
+    func_convert_path_front_back_pathsep ":*" "*:" ";" "$1"
+  fi
+}
+# end func_convert_path_msys_to_w32
+
+
+# func_convert_path_cygwin_to_w32 ARG
+# Convert path ARG from Cygwin to w32 format.  Returns result in
+# func_to_host_file_result.
+func_convert_path_cygwin_to_w32 ()
+{
+  $debug_cmd
+
+  func_to_host_path_result=$1
+  if test -n "$1"; then
+    # See func_convert_path_msys_to_w32:
+    func_stripname : : "$1"
+    func_to_host_path_tmp1=$func_stripname_result
+    func_to_host_path_result=`cygpath -m -p "$func_to_host_path_tmp1"`
+    func_convert_path_check : ";" \
+      "$func_to_host_path_tmp1" "$func_to_host_path_result"
+    func_convert_path_front_back_pathsep ":*" "*:" ";" "$1"
+  fi
+}
+# end func_convert_path_cygwin_to_w32
+
+
+# func_convert_path_nix_to_w32 ARG
+# Convert path ARG from *nix to w32 format.  Requires a wine environment and
+# a working winepath.  Returns result in func_to_host_file_result.
+func_convert_path_nix_to_w32 ()
+{
+  $debug_cmd
+
+  func_to_host_path_result=$1
+  if test -n "$1"; then
+    # See func_convert_path_msys_to_w32:
+    func_stripname : : "$1"
+    func_to_host_path_tmp1=$func_stripname_result
+    func_convert_core_path_wine_to_w32 "$func_to_host_path_tmp1"
+    func_to_host_path_result=$func_convert_core_path_wine_to_w32_result
+    func_convert_path_check : ";" \
+      "$func_to_host_path_tmp1" "$func_to_host_path_result"
+    func_convert_path_front_back_pathsep ":*" "*:" ";" "$1"
+  fi
+}
+# end func_convert_path_nix_to_w32
+
+
+# func_convert_path_msys_to_cygwin ARG
+# Convert path ARG from MSYS to Cygwin format.  Requires LT_CYGPATH set.
+# Returns result in func_to_host_file_result.
+func_convert_path_msys_to_cygwin ()
 {
-    write_libobj=${1}
-    if test "$build_libtool_libs" = yes; then
-      write_lobj=\'${2}\'
-    else
-      write_lobj=none
-    fi
-
-    if test "$build_old_libs" = yes; then
-      write_oldobj=\'${3}\'
-    else
-      write_oldobj=none
-    fi
+  $debug_cmd
+
+  func_to_host_path_result=$1
+  if test -n "$1"; then
+    # See func_convert_path_msys_to_w32:
+    func_stripname : : "$1"
+    func_to_host_path_tmp1=$func_stripname_result
+    func_convert_core_msys_to_w32 "$func_to_host_path_tmp1"
+    func_cygpath -u -p "$func_convert_core_msys_to_w32_result"
+    func_to_host_path_result=$func_cygpath_result
+    func_convert_path_check : : \
+      "$func_to_host_path_tmp1" "$func_to_host_path_result"
+    func_convert_path_front_back_pathsep ":*" "*:" : "$1"
+  fi
+}
+# end func_convert_path_msys_to_cygwin
 
-    $opt_dry_run || {
-      cat >${write_libobj}T <<EOF
-# $write_libobj - a libtool object file
-# Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION
-#
-# Please DO NOT delete this file!
-# It is necessary for linking the library.
 
-# Name of the PIC object.
-pic_object=$write_lobj
+# func_convert_path_nix_to_cygwin ARG
+# Convert path ARG from *nix to Cygwin format.  Requires Cygwin installed in a
+# a wine environment, working winepath, and LT_CYGPATH set.  Returns result in
+# func_to_host_file_result.
+func_convert_path_nix_to_cygwin ()
+{
+  $debug_cmd
+
+  func_to_host_path_result=$1
+  if test -n "$1"; then
+    # Remove leading and trailing path separator characters from
+    # ARG. msys behavior is inconsistent here, cygpath turns them
+    # into '.;' and ';.', and winepath ignores them completely.
+    func_stripname : : "$1"
+    func_to_host_path_tmp1=$func_stripname_result
+    func_convert_core_path_wine_to_w32 "$func_to_host_path_tmp1"
+    func_cygpath -u -p "$func_convert_core_path_wine_to_w32_result"
+    func_to_host_path_result=$func_cygpath_result
+    func_convert_path_check : : \
+      "$func_to_host_path_tmp1" "$func_to_host_path_result"
+    func_convert_path_front_back_pathsep ":*" "*:" : "$1"
+  fi
+}
+# end func_convert_path_nix_to_cygwin
 
-# Name of the non-PIC object
-non_pic_object=$write_oldobj
 
-EOF
-      $MV "${write_libobj}T" "${write_libobj}"
-    }
+# func_dll_def_p FILE
+# True iff FILE is a Windows DLL '.def' file.
+# Keep in sync with _LT_DLL_DEF_P in libtool.m4
+func_dll_def_p ()
+{
+  $debug_cmd
+
+  func_dll_def_p_tmp=`$SED -n \
+    -e 's/^[	 ]*//' \
+    -e '/^\(;.*\)*$/d' \
+    -e 's/^\(EXPORTS\|LIBRARY\)\([	 ].*\)*$/DEF/p' \
+    -e q \
+    "$1"`
+  test DEF = "$func_dll_def_p_tmp"
 }
 
+
 # func_mode_compile arg...
 func_mode_compile ()
 {
-    $opt_debug
+    $debug_cmd
+
     # Get the compilation command and the source file.
     base_compile=
-    srcfile="$nonopt"  #  always keep a non-empty value in "srcfile"
+    srcfile=$nonopt  #  always keep a non-empty value in "srcfile"
     suppress_opt=yes
     suppress_output=
     arg_mode=normal
@@ -1116,12 +3281,12 @@ func_mode_compile ()
       case $arg_mode in
       arg  )
 	# do not "continue".  Instead, add this to base_compile
-	lastarg="$arg"
+	lastarg=$arg
 	arg_mode=normal
 	;;
 
       target )
-	libobj="$arg"
+	libobj=$arg
 	arg_mode=normal
 	continue
 	;;
@@ -1131,18 +3296,18 @@ func_mode_compile ()
 	case $arg in
 	-o)
 	  test -n "$libobj" && \
-	    func_fatal_error "you cannot specify \`-o' more than once"
+	    func_fatal_error "you cannot specify '-o' more than once"
 	  arg_mode=target
 	  continue
 	  ;;
 
 	-pie | -fpie | -fPIE)
-          pie_flag="$pie_flag $arg"
+          func_append pie_flag " $arg"
 	  continue
 	  ;;
 
 	-shared | -static | -prefer-pic | -prefer-non-pic)
-	  later="$later $arg"
+	  func_append later " $arg"
 	  continue
 	  ;;
 
@@ -1160,18 +3325,17 @@ func_mode_compile ()
 	  func_stripname '-Wc,' '' "$arg"
 	  args=$func_stripname_result
 	  lastarg=
-	  save_ifs="$IFS"; IFS=','
+	  save_ifs=$IFS; IFS=,
 	  for arg in $args; do
-	    IFS="$save_ifs"
-	    func_quote_for_eval "$arg"
-	    lastarg="$lastarg $func_quote_for_eval_result"
+	    IFS=$save_ifs
+	    func_append_quoted lastarg "$arg"
 	  done
-	  IFS="$save_ifs"
+	  IFS=$save_ifs
 	  func_stripname ' ' '' "$lastarg"
 	  lastarg=$func_stripname_result
 
 	  # Add the arguments to base_compile.
-	  base_compile="$base_compile $lastarg"
+	  func_append base_compile " $lastarg"
 	  continue
 	  ;;
 
@@ -1179,16 +3343,15 @@ func_mode_compile ()
 	  # Accept the current argument as the source file.
 	  # The previous "srcfile" becomes the current argument.
 	  #
-	  lastarg="$srcfile"
-	  srcfile="$arg"
+	  lastarg=$srcfile
+	  srcfile=$arg
 	  ;;
 	esac  #  case $arg
 	;;
       esac    #  case $arg_mode
 
       # Aesthetically quote the previous argument.
-      func_quote_for_eval "$lastarg"
-      base_compile="$base_compile $func_quote_for_eval_result"
+      func_append_quoted base_compile "$lastarg"
     done # for arg
 
     case $arg_mode in
@@ -1196,13 +3359,13 @@ func_mode_compile ()
       func_fatal_error "you must specify an argument for -Xcompile"
       ;;
     target)
-      func_fatal_error "you must specify a target with \`-o'"
+      func_fatal_error "you must specify a target with '-o'"
       ;;
     *)
       # Get the name of the library object.
       test -z "$libobj" && {
 	func_basename "$srcfile"
-	libobj="$func_basename_result"
+	libobj=$func_basename_result
       }
       ;;
     esac
@@ -1213,7 +3376,7 @@ func_mode_compile ()
     *.[cCFSifmso] | \
     *.ada | *.adb | *.ads | *.asm | \
     *.c++ | *.cc | *.ii | *.class | *.cpp | *.cxx | \
-    *.[fF][09]? | *.for | *.java | *.obj | *.sx)
+    *.[fF][09]? | *.for | *.java | *.go | *.obj | *.sx | *.cu | *.cup)
       func_xform "$libobj"
       libobj=$func_xform_result
       ;;
@@ -1222,7 +3385,7 @@ func_mode_compile ()
     case $libobj in
     *.lo) func_lo2o "$libobj"; obj=$func_lo2o_result ;;
     *)
-      func_fatal_error "cannot determine name of library object from \`$libobj'"
+      func_fatal_error "cannot determine name of library object from '$libobj'"
       ;;
     esac
 
@@ -1231,8 +3394,8 @@ func_mode_compile ()
     for arg in $later; do
       case $arg in
       -shared)
-	test "$build_libtool_libs" != yes && \
-	  func_fatal_configuration "can not build a shared library"
+	test yes = "$build_libtool_libs" \
+	  || func_fatal_configuration "cannot build a shared library"
 	build_old_libs=no
 	continue
 	;;
@@ -1258,17 +3421,17 @@ func_mode_compile ()
     func_quote_for_eval "$libobj"
     test "X$libobj" != "X$func_quote_for_eval_result" \
       && $ECHO "X$libobj" | $GREP '[]~#^*{};<>?"'"'"'	 &()|`$[]' \
-      && func_warning "libobj name \`$libobj' may not contain shell special characters."
+      && func_warning "libobj name '$libobj' may not contain shell special characters."
     func_dirname_and_basename "$obj" "/" ""
-    objname="$func_basename_result"
-    xdir="$func_dirname_result"
-    lobj=${xdir}$objdir/$objname
+    objname=$func_basename_result
+    xdir=$func_dirname_result
+    lobj=$xdir$objdir/$objname
 
     test -z "$base_compile" && \
       func_fatal_help "you must specify a compilation command"
 
     # Delete any leftover library objects.
-    if test "$build_old_libs" = yes; then
+    if test yes = "$build_old_libs"; then
       removelist="$obj $lobj $libobj ${libobj}T"
     else
       removelist="$lobj $libobj ${libobj}T"
@@ -1280,16 +3443,16 @@ func_mode_compile ()
       pic_mode=default
       ;;
     esac
-    if test "$pic_mode" = no && test "$deplibs_check_method" != pass_all; then
+    if test no = "$pic_mode" && test pass_all != "$deplibs_check_method"; then
       # non-PIC code in shared libraries is not supported
       pic_mode=default
     fi
 
     # Calculate the filename of the output object if compiler does
     # not support -o with -c
-    if test "$compiler_c_o" = no; then
-      output_obj=`$ECHO "X$srcfile" | $Xsed -e 's%^.*/%%' -e 's%\.[^.]*$%%'`.${objext}
-      lockfile="$output_obj.lock"
+    if test no = "$compiler_c_o"; then
+      output_obj=`$ECHO "$srcfile" | $SED 's%^.*/%%; s%\.[^.]*$%%'`.$objext
+      lockfile=$output_obj.lock
     else
       output_obj=
       need_locks=no
@@ -1298,12 +3461,12 @@ func_mode_compile ()
 
     # Lock this critical section if it is needed
     # We use this script file to make the link, it avoids creating a new file
-    if test "$need_locks" = yes; then
+    if test yes = "$need_locks"; then
       until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do
 	func_echo "Waiting for $lockfile to be removed"
 	sleep 2
       done
-    elif test "$need_locks" = warn; then
+    elif test warn = "$need_locks"; then
       if test -f "$lockfile"; then
 	$ECHO "\
 *** ERROR, $lockfile exists and contains:
@@ -1311,7 +3474,7 @@ func_mode_compile ()
 
 This indicates that another process is trying to use the same
 temporary object file, and libtool could not work around it because
-your compiler does not support \`-c' and \`-o' together.  If you
+your compiler does not support '-c' and '-o' together.  If you
 repeat this compilation, it may succeed, by chance, but you had better
 avoid parallel builds (make -j) in this platform, or get a better
 compiler."
@@ -1319,26 +3482,25 @@ compiler."
 	$opt_dry_run || $RM $removelist
 	exit $EXIT_FAILURE
       fi
-      removelist="$removelist $output_obj"
+      func_append removelist " $output_obj"
       $ECHO "$srcfile" > "$lockfile"
     fi
 
     $opt_dry_run || $RM $removelist
-    removelist="$removelist $lockfile"
+    func_append removelist " $lockfile"
     trap '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' 1 2 15
 
-    if test -n "$fix_srcfile_path"; then
-      eval srcfile=\"$fix_srcfile_path\"
-    fi
+    func_to_tool_file "$srcfile" func_convert_file_msys_to_w32
+    srcfile=$func_to_tool_file_result
     func_quote_for_eval "$srcfile"
     qsrcfile=$func_quote_for_eval_result
 
     # Only build a PIC object if we are building libtool libraries.
-    if test "$build_libtool_libs" = yes; then
+    if test yes = "$build_libtool_libs"; then
       # Without this assignment, base_compile gets emptied.
       fbsd_hideous_sh_bug=$base_compile
 
-      if test "$pic_mode" != no; then
+      if test no != "$pic_mode"; then
 	command="$base_compile $qsrcfile $pic_flag"
       else
 	# Don't build PIC code
@@ -1349,13 +3511,13 @@ compiler."
 
       if test -z "$output_obj"; then
 	# Place PIC objects in $objdir
-	command="$command -o $lobj"
+	func_append command " -o $lobj"
       fi
 
       func_show_eval_locale "$command"	\
           'test -n "$output_obj" && $RM $removelist; exit $EXIT_FAILURE'
 
-      if test "$need_locks" = warn &&
+      if test warn = "$need_locks" &&
 	 test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then
 	$ECHO "\
 *** ERROR, $lockfile contains:
@@ -1366,7 +3528,7 @@ $srcfile
 
 This indicates that another process is trying to use the same
 temporary object file, and libtool could not work around it because
-your compiler does not support \`-c' and \`-o' together.  If you
+your compiler does not support '-c' and '-o' together.  If you
 repeat this compilation, it may succeed, by chance, but you had better
 avoid parallel builds (make -j) in this platform, or get a better
 compiler."
@@ -1382,29 +3544,29 @@ compiler."
       fi
 
       # Allow error messages only from the first compilation.
-      if test "$suppress_opt" = yes; then
+      if test yes = "$suppress_opt"; then
 	suppress_output=' >/dev/null 2>&1'
       fi
     fi
 
     # Only build a position-dependent object if we build old libraries.
-    if test "$build_old_libs" = yes; then
-      if test "$pic_mode" != yes; then
+    if test yes = "$build_old_libs"; then
+      if test yes != "$pic_mode"; then
 	# Don't build PIC code
 	command="$base_compile $qsrcfile$pie_flag"
       else
 	command="$base_compile $qsrcfile $pic_flag"
       fi
-      if test "$compiler_c_o" = yes; then
-	command="$command -o $obj"
+      if test yes = "$compiler_c_o"; then
+	func_append command " -o $obj"
       fi
 
       # Suppress compiler output if we already did a PIC compilation.
-      command="$command$suppress_output"
+      func_append command "$suppress_output"
       func_show_eval_locale "$command" \
         '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE'
 
-      if test "$need_locks" = warn &&
+      if test warn = "$need_locks" &&
 	 test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then
 	$ECHO "\
 *** ERROR, $lockfile contains:
@@ -1415,7 +3577,7 @@ $srcfile
 
 This indicates that another process is trying to use the same
 temporary object file, and libtool could not work around it because
-your compiler does not support \`-c' and \`-o' together.  If you
+your compiler does not support '-c' and '-o' together.  If you
 repeat this compilation, it may succeed, by chance, but you had better
 avoid parallel builds (make -j) in this platform, or get a better
 compiler."
@@ -1435,7 +3597,7 @@ compiler."
       func_write_libtool_object "$libobj" "$objdir/$objname" "$objname"
 
       # Unlock the critical section if it was locked
-      if test "$need_locks" != no; then
+      if test no != "$need_locks"; then
 	removelist=$lockfile
         $RM "$lockfile"
       fi
@@ -1445,13 +3607,13 @@ compiler."
 }
 
 $opt_help || {
-test "$mode" = compile && func_mode_compile ${1+"$@"}
+  test compile = "$opt_mode" && func_mode_compile ${1+"$@"}
 }
 
 func_mode_help ()
 {
     # We need to display help for each of the modes.
-    case $mode in
+    case $opt_mode in
       "")
         # Generic help is extracted from the usage comments
         # at the start of this file.
@@ -1465,7 +3627,7 @@ func_mode_help ()
 Remove files from the build directory.
 
 RM is the name of the program to use to delete files associated with each FILE
-(typically \`/bin/rm').  RM-OPTIONS are options (such as \`-f') to be passed
+(typically '/bin/rm').  RM-OPTIONS are options (such as '-f') to be passed
 to RM.
 
 If FILE is a libtool library, object or program, all the files associated
@@ -1482,17 +3644,18 @@ This mode accepts the following additional options:
 
   -o OUTPUT-FILE    set the output file name to OUTPUT-FILE
   -no-suppress      do not suppress compiler output for multiple passes
-  -prefer-pic       try to building PIC objects only
-  -prefer-non-pic   try to building non-PIC objects only
-  -shared           do not build a \`.o' file suitable for static linking
-  -static           only build a \`.o' file suitable for static linking
+  -prefer-pic       try to build PIC objects only
+  -prefer-non-pic   try to build non-PIC objects only
+  -shared           do not build a '.o' file suitable for static linking
+  -static           only build a '.o' file suitable for static linking
+  -Wc,FLAG          pass FLAG directly to the compiler
 
-COMPILE-COMMAND is a command to be used in creating a \`standard' object file
+COMPILE-COMMAND is a command to be used in creating a 'standard' object file
 from the given SOURCEFILE.
 
 The output file name is determined by removing the directory component from
-SOURCEFILE, then substituting the C source code suffix \`.c' with the
-library object suffix, \`.lo'."
+SOURCEFILE, then substituting the C source code suffix '.c' with the
+library object suffix, '.lo'."
         ;;
 
       execute)
@@ -1505,7 +3668,7 @@ This mode accepts the following additional options:
 
   -dlopen FILE      add the directory containing FILE to the library path
 
-This mode sets the library path environment variable according to \`-dlopen'
+This mode sets the library path environment variable according to '-dlopen'
 flags.
 
 If any of the ARGS are libtool executable wrappers, then they are translated
@@ -1524,7 +3687,7 @@ Complete the installation of libtool libraries.
 Each LIBDIR is a directory that contains libtool libraries.
 
 The commands that this mode executes may require superuser privileges.  Use
-the \`--dry-run' option if you just want to see what would be executed."
+the '--dry-run' option if you just want to see what would be executed."
         ;;
 
       install)
@@ -1534,11 +3697,11 @@ the \`--dry-run' option if you just want to see what would be executed."
 Install executables or libraries.
 
 INSTALL-COMMAND is the installation command.  The first component should be
-either the \`install' or \`cp' program.
+either the 'install' or 'cp' program.
 
 The following components of INSTALL-COMMAND are treated specially:
 
-  -inst-prefix PREFIX-DIR  Use PREFIX-DIR as a staging area for installation
+  -inst-prefix-dir PREFIX-DIR  Use PREFIX-DIR as a staging area for installation
 
 The rest of the components are interpreted as arguments to that command (only
 BSD-compatible install options are recognized)."
@@ -1558,7 +3721,9 @@ The following components of LINK-COMMAND are treated specially:
 
   -all-static       do not do any dynamic linking at all
   -avoid-version    do not add a version suffix if possible
-  -dlopen FILE      \`-dlpreopen' FILE if it cannot be dlopened at runtime
+  -bindir BINDIR    specify path to binaries directory (for systems where
+                    libraries must be found in the PATH setting at runtime)
+  -dlopen FILE      '-dlpreopen' FILE if it cannot be dlopened at runtime
   -dlpreopen FILE   link in FILE and add its symbols to lt_preloaded_symbols
   -export-dynamic   allow symbols from OUTPUT-FILE to be resolved with dlsym(3)
   -export-symbols SYMFILE
@@ -1572,7 +3737,8 @@ The following components of LINK-COMMAND are treated specially:
   -no-install       link a not-installable executable
   -no-undefined     declare that a library does not refer to external symbols
   -o OUTPUT-FILE    create OUTPUT-FILE from the specified objects
-  -objectlist FILE  Use a list of object files found in FILE to specify objects
+  -objectlist FILE  use a list of object files found in FILE to specify objects
+  -os2dllname NAME  force a short DLL name on OS/2 (no effect on other OSes)
   -precious-files-regex REGEX
                     don't remove output files matching REGEX
   -release RELEASE  specify package release information
@@ -1586,21 +3752,26 @@ The following components of LINK-COMMAND are treated specially:
   -version-info CURRENT[:REVISION[:AGE]]
                     specify library version info [each variable defaults to 0]
   -weak LIBNAME     declare that the target provides the LIBNAME interface
+  -Wc,FLAG
+  -Xcompiler FLAG   pass linker-specific FLAG directly to the compiler
+  -Wl,FLAG
+  -Xlinker FLAG     pass linker-specific FLAG directly to the linker
+  -XCClinker FLAG   pass link-specific FLAG to the compiler driver (CC)
 
-All other options (arguments beginning with \`-') are ignored.
+All other options (arguments beginning with '-') are ignored.
 
-Every other argument is treated as a filename.  Files ending in \`.la' are
+Every other argument is treated as a filename.  Files ending in '.la' are
 treated as uninstalled libtool libraries, other files are standard or library
 object files.
 
-If the OUTPUT-FILE ends in \`.la', then a libtool library is created,
-only library objects (\`.lo' files) may be specified, and \`-rpath' is
+If the OUTPUT-FILE ends in '.la', then a libtool library is created,
+only library objects ('.lo' files) may be specified, and '-rpath' is
 required, except when creating a convenience library.
 
-If OUTPUT-FILE ends in \`.a' or \`.lib', then a standard library is created
-using \`ar' and \`ranlib', or on Windows using \`lib'.
+If OUTPUT-FILE ends in '.a' or '.lib', then a standard library is created
+using 'ar' and 'ranlib', or on Windows using 'lib'.
 
-If OUTPUT-FILE ends in \`.lo' or \`.${objext}', then a reloadable object file
+If OUTPUT-FILE ends in '.lo' or '.$objext', then a reloadable object file
 is created, otherwise an executable program is created."
         ;;
 
@@ -1611,7 +3782,7 @@ is created, otherwise an executable program is created."
 Remove libraries from an installation directory.
 
 RM is the name of the program to use to delete files associated with each FILE
-(typically \`/bin/rm').  RM-OPTIONS are options (such as \`-f') to be passed
+(typically '/bin/rm').  RM-OPTIONS are options (such as '-f') to be passed
 to RM.
 
 If FILE is a libtool library, all the files associated with it are deleted.
@@ -1619,40 +3790,70 @@ Otherwise, only FILE itself is deleted using RM."
         ;;
 
       *)
-        func_fatal_help "invalid operation mode \`$mode'"
+        func_fatal_help "invalid operation mode '$opt_mode'"
         ;;
     esac
 
-    $ECHO
-    $ECHO "Try \`$progname --help' for more information about other modes."
-
-    exit $?
+    echo
+    $ECHO "Try '$progname --help' for more information about other modes."
 }
 
-  # Now that we've collected a possible --mode arg, show help if necessary
-  $opt_help && func_mode_help
+# Now that we've collected a possible --mode arg, show help if necessary
+if $opt_help; then
+  if test : = "$opt_help"; then
+    func_mode_help
+  else
+    {
+      func_help noexit
+      for opt_mode in compile link execute install finish uninstall clean; do
+	func_mode_help
+      done
+    } | $SED -n '1p; 2,$s/^Usage:/  or: /p'
+    {
+      func_help noexit
+      for opt_mode in compile link execute install finish uninstall clean; do
+	echo
+	func_mode_help
+      done
+    } |
+    $SED '1d
+      /^When reporting/,/^Report/{
+	H
+	d
+      }
+      $x
+      /information about other modes/d
+      /more detailed .*MODE/d
+      s/^Usage:.*--mode=\([^ ]*\) .*/Description of \1 mode:/'
+  fi
+  exit $?
+fi
 
 
 # func_mode_execute arg...
 func_mode_execute ()
 {
-    $opt_debug
+    $debug_cmd
+
     # The first argument is the command name.
-    cmd="$nonopt"
+    cmd=$nonopt
     test -z "$cmd" && \
       func_fatal_help "you must specify a COMMAND"
 
     # Handle -dlopen flags immediately.
-    for file in $execute_dlfiles; do
+    for file in $opt_dlopen; do
       test -f "$file" \
-	|| func_fatal_help "\`$file' is not a file"
+	|| func_fatal_help "'$file' is not a file"
 
       dir=
       case $file in
       *.la)
+	func_resolve_sysroot "$file"
+	file=$func_resolve_sysroot_result
+
 	# Check to see that this really is a libtool archive.
 	func_lalib_unsafe_p "$file" \
-	  || func_fatal_help "\`$lib' is not a valid libtool archive"
+	  || func_fatal_help "'$lib' is not a valid libtool archive"
 
 	# Read the libtool library.
 	dlname=
@@ -1663,18 +3864,18 @@ func_mode_execute ()
 	if test -z "$dlname"; then
 	  # Warn if it was a shared library.
 	  test -n "$library_names" && \
-	    func_warning "\`$file' was not linked with \`-export-dynamic'"
+	    func_warning "'$file' was not linked with '-export-dynamic'"
 	  continue
 	fi
 
 	func_dirname "$file" "" "."
-	dir="$func_dirname_result"
+	dir=$func_dirname_result
 
 	if test -f "$dir/$objdir/$dlname"; then
-	  dir="$dir/$objdir"
+	  func_append dir "/$objdir"
 	else
 	  if test ! -f "$dir/$dlname"; then
-	    func_fatal_error "cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'"
+	    func_fatal_error "cannot find '$dlname' in '$dir' or '$dir/$objdir'"
 	  fi
 	fi
 	;;
@@ -1682,18 +3883,18 @@ func_mode_execute ()
       *.lo)
 	# Just add the directory containing the .lo file.
 	func_dirname "$file" "" "."
-	dir="$func_dirname_result"
+	dir=$func_dirname_result
 	;;
 
       *)
-	func_warning "\`-dlopen' is ignored for non-libtool libraries and objects"
+	func_warning "'-dlopen' is ignored for non-libtool libraries and objects"
 	continue
 	;;
       esac
 
       # Get the absolute pathname.
       absdir=`cd "$dir" && pwd`
-      test -n "$absdir" && dir="$absdir"
+      test -n "$absdir" && dir=$absdir
 
       # Now add the directory to shlibpath_var.
       if eval "test -z \"\$$shlibpath_var\""; then
@@ -1705,34 +3906,41 @@ func_mode_execute ()
 
     # This variable tells wrapper scripts just to set shlibpath_var
     # rather than running their programs.
-    libtool_execute_magic="$magic"
+    libtool_execute_magic=$magic
 
     # Check if any of the arguments is a wrapper script.
     args=
     for file
     do
       case $file in
-      -*) ;;
+      -* | *.la | *.lo ) ;;
       *)
 	# Do a test to see if this is really a libtool program.
 	if func_ltwrapper_script_p "$file"; then
 	  func_source "$file"
 	  # Transform arg to wrapped name.
-	  file="$progdir/$program"
+	  file=$progdir/$program
 	elif func_ltwrapper_executable_p "$file"; then
 	  func_ltwrapper_scriptname "$file"
 	  func_source "$func_ltwrapper_scriptname_result"
 	  # Transform arg to wrapped name.
-	  file="$progdir/$program"
+	  file=$progdir/$program
 	fi
 	;;
       esac
       # Quote arguments (to preserve shell metacharacters).
-      func_quote_for_eval "$file"
-      args="$args $func_quote_for_eval_result"
+      func_append_quoted args "$file"
     done
 
-    if test "X$opt_dry_run" = Xfalse; then
+    if $opt_dry_run; then
+      # Display what would be done.
+      if test -n "$shlibpath_var"; then
+	eval "\$ECHO \"\$shlibpath_var=\$$shlibpath_var\""
+	echo "export $shlibpath_var"
+      fi
+      $ECHO "$cmd$args"
+      exit $EXIT_SUCCESS
+    else
       if test -n "$shlibpath_var"; then
 	# Export the shlibpath_var.
 	eval "export $shlibpath_var"
@@ -1749,34 +3957,64 @@ func_mode_execute ()
       done
 
       # Now prepare to actually exec the command.
-      exec_cmd="\$cmd$args"
-    else
-      # Display what would be done.
-      if test -n "$shlibpath_var"; then
-	eval "\$ECHO \"\$shlibpath_var=\$$shlibpath_var\""
-	$ECHO "export $shlibpath_var"
-      fi
-      $ECHO "$cmd$args"
-      exit $EXIT_SUCCESS
+      exec_cmd=\$cmd$args
     fi
 }
 
-test "$mode" = execute && func_mode_execute ${1+"$@"}
+test execute = "$opt_mode" && func_mode_execute ${1+"$@"}
 
 
 # func_mode_finish arg...
 func_mode_finish ()
 {
-    $opt_debug
-    libdirs="$nonopt"
+    $debug_cmd
+
+    libs=
+    libdirs=
     admincmds=
 
-    if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then
-      for dir
-      do
-	libdirs="$libdirs $dir"
-      done
+    for opt in "$nonopt" ${1+"$@"}
+    do
+      if test -d "$opt"; then
+	func_append libdirs " $opt"
+
+      elif test -f "$opt"; then
+	if func_lalib_unsafe_p "$opt"; then
+	  func_append libs " $opt"
+	else
+	  func_warning "'$opt' is not a valid libtool archive"
+	fi
+
+      else
+	func_fatal_error "invalid argument '$opt'"
+      fi
+    done
+
+    if test -n "$libs"; then
+      if test -n "$lt_sysroot"; then
+        sysroot_regex=`$ECHO "$lt_sysroot" | $SED "$sed_make_literal_regex"`
+        sysroot_cmd="s/\([ ']\)$sysroot_regex/\1/g;"
+      else
+        sysroot_cmd=
+      fi
+
+      # Remove sysroot references
+      if $opt_dry_run; then
+        for lib in $libs; do
+          echo "removing references to $lt_sysroot and '=' prefixes from $lib"
+        done
+      else
+        tmpdir=`func_mktempdir`
+        for lib in $libs; do
+	  $SED -e "$sysroot_cmd s/\([ ']-[LR]\)=/\1/g; s/\([ ']\)=/\1/g" $lib \
+	    > $tmpdir/tmp-la
+	  mv -f $tmpdir/tmp-la $lib
+	done
+        ${RM}r "$tmpdir"
+      fi
+    fi
 
+    if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then
       for libdir in $libdirs; do
 	if test -n "$finish_cmds"; then
 	  # Do each command in the finish commands.
@@ -1786,73 +4024,77 @@ func_mode_finish ()
 	if test -n "$finish_eval"; then
 	  # Do the single finish_eval.
 	  eval cmds=\"$finish_eval\"
-	  $opt_dry_run || eval "$cmds" || admincmds="$admincmds
+	  $opt_dry_run || eval "$cmds" || func_append admincmds "
        $cmds"
 	fi
       done
     fi
 
     # Exit here if they wanted silent mode.
-    $opt_silent && exit $EXIT_SUCCESS
+    $opt_quiet && exit $EXIT_SUCCESS
 
-    $ECHO "X----------------------------------------------------------------------" | $Xsed
-    $ECHO "Libraries have been installed in:"
-    for libdir in $libdirs; do
-      $ECHO "   $libdir"
-    done
-    $ECHO
-    $ECHO "If you ever happen to want to link against installed libraries"
-    $ECHO "in a given directory, LIBDIR, you must either use libtool, and"
-    $ECHO "specify the full pathname of the library, or use the \`-LLIBDIR'"
-    $ECHO "flag during linking and do at least one of the following:"
-    if test -n "$shlibpath_var"; then
-      $ECHO "   - add LIBDIR to the \`$shlibpath_var' environment variable"
-      $ECHO "     during execution"
-    fi
-    if test -n "$runpath_var"; then
-      $ECHO "   - add LIBDIR to the \`$runpath_var' environment variable"
-      $ECHO "     during linking"
-    fi
-    if test -n "$hardcode_libdir_flag_spec"; then
-      libdir=LIBDIR
-      eval flag=\"$hardcode_libdir_flag_spec\"
+    if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then
+      echo "----------------------------------------------------------------------"
+      echo "Libraries have been installed in:"
+      for libdir in $libdirs; do
+	$ECHO "   $libdir"
+      done
+      echo
+      echo "If you ever happen to want to link against installed libraries"
+      echo "in a given directory, LIBDIR, you must either use libtool, and"
+      echo "specify the full pathname of the library, or use the '-LLIBDIR'"
+      echo "flag during linking and do at least one of the following:"
+      if test -n "$shlibpath_var"; then
+	echo "   - add LIBDIR to the '$shlibpath_var' environment variable"
+	echo "     during execution"
+      fi
+      if test -n "$runpath_var"; then
+	echo "   - add LIBDIR to the '$runpath_var' environment variable"
+	echo "     during linking"
+      fi
+      if test -n "$hardcode_libdir_flag_spec"; then
+	libdir=LIBDIR
+	eval flag=\"$hardcode_libdir_flag_spec\"
 
-      $ECHO "   - use the \`$flag' linker flag"
-    fi
-    if test -n "$admincmds"; then
-      $ECHO "   - have your system administrator run these commands:$admincmds"
-    fi
-    if test -f /etc/ld.so.conf; then
-      $ECHO "   - have your system administrator add LIBDIR to \`/etc/ld.so.conf'"
-    fi
-    $ECHO
+	$ECHO "   - use the '$flag' linker flag"
+      fi
+      if test -n "$admincmds"; then
+	$ECHO "   - have your system administrator run these commands:$admincmds"
+      fi
+      if test -f /etc/ld.so.conf; then
+	echo "   - have your system administrator add LIBDIR to '/etc/ld.so.conf'"
+      fi
+      echo
 
-    $ECHO "See any operating system documentation about shared libraries for"
-    case $host in
-      solaris2.[6789]|solaris2.1[0-9])
-        $ECHO "more information, such as the ld(1), crle(1) and ld.so(8) manual"
-	$ECHO "pages."
-	;;
-      *)
-        $ECHO "more information, such as the ld(1) and ld.so(8) manual pages."
-        ;;
-    esac
-    $ECHO "X----------------------------------------------------------------------" | $Xsed
+      echo "See any operating system documentation about shared libraries for"
+      case $host in
+	solaris2.[6789]|solaris2.1[0-9])
+	  echo "more information, such as the ld(1), crle(1) and ld.so(8) manual"
+	  echo "pages."
+	  ;;
+	*)
+	  echo "more information, such as the ld(1) and ld.so(8) manual pages."
+	  ;;
+      esac
+      echo "----------------------------------------------------------------------"
+    fi
     exit $EXIT_SUCCESS
 }
 
-test "$mode" = finish && func_mode_finish ${1+"$@"}
+test finish = "$opt_mode" && func_mode_finish ${1+"$@"}
 
 
 # func_mode_install arg...
 func_mode_install ()
 {
-    $opt_debug
+    $debug_cmd
+
     # There may be an optional sh(1) argument at the beginning of
     # install_prog (especially on Windows NT).
-    if test "$nonopt" = "$SHELL" || test "$nonopt" = /bin/sh ||
+    if test "$SHELL" = "$nonopt" || test /bin/sh = "$nonopt" ||
        # Allow the use of GNU shtool's install command.
-       $ECHO "X$nonopt" | $GREP shtool >/dev/null; then
+       case $nonopt in *shtool*) :;; *) false;; esac
+    then
       # Aesthetically quote it.
       func_quote_for_eval "$nonopt"
       install_prog="$func_quote_for_eval_result "
@@ -1866,7 +4108,12 @@ func_mode_install ()
     # The real first argument should be the name of the installation program.
     # Aesthetically quote it.
     func_quote_for_eval "$arg"
-    install_prog="$install_prog$func_quote_for_eval_result"
+    func_append install_prog "$func_quote_for_eval_result"
+    install_shared_prog=$install_prog
+    case " $install_prog " in
+      *[\\\ /]cp\ *) install_cp=: ;;
+      *) install_cp=false ;;
+    esac
 
     # We need to accept at least all the BSD install flags.
     dest=
@@ -1874,23 +4121,24 @@ func_mode_install ()
     opts=
     prev=
     install_type=
-    isdir=no
+    isdir=false
     stripme=
+    no_mode=:
     for arg
     do
+      arg2=
       if test -n "$dest"; then
-	files="$files $dest"
+	func_append files " $dest"
 	dest=$arg
 	continue
       fi
 
       case $arg in
-      -d) isdir=yes ;;
+      -d) isdir=: ;;
       -f)
-	case " $install_prog " in
-	*[\\\ /]cp\ *) ;;
-	*) prev=$arg ;;
-	esac
+	if $install_cp; then :; else
+	  prev=$arg
+	fi
 	;;
       -g | -m | -o)
 	prev=$arg
@@ -1904,6 +4152,10 @@ func_mode_install ()
       *)
 	# If the previous option needed an argument, then skip it.
 	if test -n "$prev"; then
+	  if test X-m = "X$prev" && test -n "$install_override_mode"; then
+	    arg2=$install_override_mode
+	    no_mode=false
+	  fi
 	  prev=
 	else
 	  dest=$arg
@@ -1914,14 +4166,25 @@ func_mode_install ()
 
       # Aesthetically quote the argument.
       func_quote_for_eval "$arg"
-      install_prog="$install_prog $func_quote_for_eval_result"
+      func_append install_prog " $func_quote_for_eval_result"
+      if test -n "$arg2"; then
+	func_quote_for_eval "$arg2"
+      fi
+      func_append install_shared_prog " $func_quote_for_eval_result"
     done
 
     test -z "$install_prog" && \
       func_fatal_help "you must specify an install program"
 
     test -n "$prev" && \
-      func_fatal_help "the \`$prev' option requires an argument"
+      func_fatal_help "the '$prev' option requires an argument"
+
+    if test -n "$install_override_mode" && $no_mode; then
+      if $install_cp; then :; else
+	func_quote_for_eval "$install_override_mode"
+	func_append install_shared_prog " -m $func_quote_for_eval_result"
+      fi
+    fi
 
     if test -z "$files"; then
       if test -z "$dest"; then
@@ -1936,19 +4199,19 @@ func_mode_install ()
     dest=$func_stripname_result
 
     # Check to see that the destination is a directory.
-    test -d "$dest" && isdir=yes
-    if test "$isdir" = yes; then
-      destdir="$dest"
+    test -d "$dest" && isdir=:
+    if $isdir; then
+      destdir=$dest
       destname=
     else
       func_dirname_and_basename "$dest" "" "."
-      destdir="$func_dirname_result"
-      destname="$func_basename_result"
+      destdir=$func_dirname_result
+      destname=$func_basename_result
 
       # Not a directory, so check to see that there is only one file specified.
       set dummy $files; shift
       test "$#" -gt 1 && \
-	func_fatal_help "\`$dest' is not a directory"
+	func_fatal_help "'$dest' is not a directory"
     fi
     case $destdir in
     [\\/]* | [A-Za-z]:[\\/]*) ;;
@@ -1957,7 +4220,7 @@ func_mode_install ()
 	case $file in
 	*.lo) ;;
 	*)
-	  func_fatal_help "\`$destdir' must be an absolute directory name"
+	  func_fatal_help "'$destdir' must be an absolute directory name"
 	  ;;
 	esac
       done
@@ -1966,7 +4229,7 @@ func_mode_install ()
 
     # This variable tells wrapper scripts just to set variables rather
     # than running their programs.
-    libtool_install_magic="$magic"
+    libtool_install_magic=$magic
 
     staticlibs=
     future_libdirs=
@@ -1977,13 +4240,16 @@ func_mode_install ()
       case $file in
       *.$libext)
 	# Do the static libraries later.
-	staticlibs="$staticlibs $file"
+	func_append staticlibs " $file"
 	;;
 
       *.la)
+	func_resolve_sysroot "$file"
+	file=$func_resolve_sysroot_result
+
 	# Check to see that this really is a libtool archive.
 	func_lalib_unsafe_p "$file" \
-	  || func_fatal_help "\`$file' is not a valid libtool archive"
+	  || func_fatal_help "'$file' is not a valid libtool archive"
 
 	library_names=
 	old_library=
@@ -1994,23 +4260,23 @@ func_mode_install ()
 	if test "X$destdir" = "X$libdir"; then
 	  case "$current_libdirs " in
 	  *" $libdir "*) ;;
-	  *) current_libdirs="$current_libdirs $libdir" ;;
+	  *) func_append current_libdirs " $libdir" ;;
 	  esac
 	else
 	  # Note the libdir as a future libdir.
 	  case "$future_libdirs " in
 	  *" $libdir "*) ;;
-	  *) future_libdirs="$future_libdirs $libdir" ;;
+	  *) func_append future_libdirs " $libdir" ;;
 	  esac
 	fi
 
 	func_dirname "$file" "/" ""
-	dir="$func_dirname_result"
-	dir="$dir$objdir"
+	dir=$func_dirname_result
+	func_append dir "$objdir"
 
 	if test -n "$relink_command"; then
 	  # Determine the prefix the user has applied to our future dir.
-	  inst_prefix_dir=`$ECHO "X$destdir" | $Xsed -e "s%$libdir\$%%"`
+	  inst_prefix_dir=`$ECHO "$destdir" | $SED -e "s%$libdir\$%%"`
 
 	  # Don't allow the user to place us outside of our expected
 	  # location b/c this prevents finding dependent libraries that
@@ -2019,38 +4285,45 @@ func_mode_install ()
 	  # are installed into $libdir/../bin (currently, that works fine)
 	  # but it's something to keep an eye on.
 	  test "$inst_prefix_dir" = "$destdir" && \
-	    func_fatal_error "error: cannot install \`$file' to a directory not ending in $libdir"
+	    func_fatal_error "error: cannot install '$file' to a directory not ending in $libdir"
 
 	  if test -n "$inst_prefix_dir"; then
 	    # Stick the inst_prefix_dir data into the link command.
-	    relink_command=`$ECHO "X$relink_command" | $Xsed -e "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%"`
+	    relink_command=`$ECHO "$relink_command" | $SED "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%"`
 	  else
-	    relink_command=`$ECHO "X$relink_command" | $Xsed -e "s%@inst_prefix_dir@%%"`
+	    relink_command=`$ECHO "$relink_command" | $SED "s%@inst_prefix_dir@%%"`
 	  fi
 
-	  func_warning "relinking \`$file'"
+	  func_warning "relinking '$file'"
 	  func_show_eval "$relink_command" \
-	    'func_fatal_error "error: relink \`$file'\'' with the above command before installing it"'
+	    'func_fatal_error "error: relink '\''$file'\'' with the above command before installing it"'
 	fi
 
 	# See the names of the shared library.
 	set dummy $library_names; shift
 	if test -n "$1"; then
-	  realname="$1"
+	  realname=$1
 	  shift
 
-	  srcname="$realname"
-	  test -n "$relink_command" && srcname="$realname"T
+	  srcname=$realname
+	  test -n "$relink_command" && srcname=${realname}T
 
 	  # Install the shared library and build the symlinks.
-	  func_show_eval "$install_prog $dir/$srcname $destdir/$realname" \
+	  func_show_eval "$install_shared_prog $dir/$srcname $destdir/$realname" \
 	      'exit $?'
-	  tstripme="$stripme"
+	  tstripme=$stripme
 	  case $host_os in
 	  cygwin* | mingw* | pw32* | cegcc*)
 	    case $realname in
 	    *.dll.a)
-	      tstripme=""
+	      tstripme=
+	      ;;
+	    esac
+	    ;;
+	  os2*)
+	    case $realname in
+	    *_dll.a)
+	      tstripme=
 	      ;;
 	    esac
 	    ;;
@@ -2061,7 +4334,7 @@ func_mode_install ()
 
 	  if test "$#" -gt 0; then
 	    # Delete the old symlinks, and create new ones.
-	    # Try `ln -sf' first, because the `ln' binary might depend on
+	    # Try 'ln -sf' first, because the 'ln' binary might depend on
 	    # the symlink we replace!  Solaris /bin/ln does not understand -f,
 	    # so we also need to try rm && ln -s.
 	    for linkname
@@ -2072,18 +4345,18 @@ func_mode_install ()
 	  fi
 
 	  # Do each command in the postinstall commands.
-	  lib="$destdir/$realname"
+	  lib=$destdir/$realname
 	  func_execute_cmds "$postinstall_cmds" 'exit $?'
 	fi
 
 	# Install the pseudo-library for information purposes.
 	func_basename "$file"
-	name="$func_basename_result"
-	instname="$dir/$name"i
+	name=$func_basename_result
+	instname=$dir/${name}i
 	func_show_eval "$install_prog $instname $destdir/$name" 'exit $?'
 
 	# Maybe install the static library, too.
-	test -n "$old_library" && staticlibs="$staticlibs $dir/$old_library"
+	test -n "$old_library" && func_append staticlibs " $dir/$old_library"
 	;;
 
       *.lo)
@@ -2091,11 +4364,11 @@ func_mode_install ()
 
 	# Figure out destination file name, if it wasn't already specified.
 	if test -n "$destname"; then
-	  destfile="$destdir/$destname"
+	  destfile=$destdir/$destname
 	else
 	  func_basename "$file"
-	  destfile="$func_basename_result"
-	  destfile="$destdir/$destfile"
+	  destfile=$func_basename_result
+	  destfile=$destdir/$destfile
 	fi
 
 	# Deduce the name of the destination old-style object file.
@@ -2105,11 +4378,11 @@ func_mode_install ()
 	  staticdest=$func_lo2o_result
 	  ;;
 	*.$objext)
-	  staticdest="$destfile"
+	  staticdest=$destfile
 	  destfile=
 	  ;;
 	*)
-	  func_fatal_help "cannot copy a libtool object to \`$destfile'"
+	  func_fatal_help "cannot copy a libtool object to '$destfile'"
 	  ;;
 	esac
 
@@ -2118,7 +4391,7 @@ func_mode_install ()
 	  func_show_eval "$install_prog $file $destfile" 'exit $?'
 
 	# Install the old object if enabled.
-	if test "$build_old_libs" = yes; then
+	if test yes = "$build_old_libs"; then
 	  # Deduce the name of the old-style object file.
 	  func_lo2o "$file"
 	  staticobj=$func_lo2o_result
@@ -2130,23 +4403,23 @@ func_mode_install ()
       *)
 	# Figure out destination file name, if it wasn't already specified.
 	if test -n "$destname"; then
-	  destfile="$destdir/$destname"
+	  destfile=$destdir/$destname
 	else
 	  func_basename "$file"
-	  destfile="$func_basename_result"
-	  destfile="$destdir/$destfile"
+	  destfile=$func_basename_result
+	  destfile=$destdir/$destfile
 	fi
 
 	# If the file is missing, and there is a .exe on the end, strip it
 	# because it is most likely a libtool script we actually want to
 	# install
-	stripped_ext=""
+	stripped_ext=
 	case $file in
 	  *.exe)
 	    if test ! -f "$file"; then
 	      func_stripname '' '.exe' "$file"
 	      file=$func_stripname_result
-	      stripped_ext=".exe"
+	      stripped_ext=.exe
 	    fi
 	    ;;
 	esac
@@ -2174,19 +4447,19 @@ func_mode_install ()
 
 	  # Check the variables that should have been set.
 	  test -z "$generated_by_libtool_version" && \
-	    func_fatal_error "invalid libtool wrapper script \`$wrapper'"
+	    func_fatal_error "invalid libtool wrapper script '$wrapper'"
 
-	  finalize=yes
+	  finalize=:
 	  for lib in $notinst_deplibs; do
 	    # Check to see that each library is installed.
 	    libdir=
 	    if test -f "$lib"; then
 	      func_source "$lib"
 	    fi
-	    libfile="$libdir/"`$ECHO "X$lib" | $Xsed -e 's%^.*/%%g'` ### testsuite: skip nested quoting test
+	    libfile=$libdir/`$ECHO "$lib" | $SED 's%^.*/%%g'`
 	    if test -n "$libdir" && test ! -f "$libfile"; then
-	      func_warning "\`$lib' has not been installed in \`$libdir'"
-	      finalize=no
+	      func_warning "'$lib' has not been installed in '$libdir'"
+	      finalize=false
 	    fi
 	  done
 
@@ -2194,34 +4467,34 @@ func_mode_install ()
 	  func_source "$wrapper"
 
 	  outputname=
-	  if test "$fast_install" = no && test -n "$relink_command"; then
+	  if test no = "$fast_install" && test -n "$relink_command"; then
 	    $opt_dry_run || {
-	      if test "$finalize" = yes; then
+	      if $finalize; then
 	        tmpdir=`func_mktempdir`
 		func_basename "$file$stripped_ext"
-		file="$func_basename_result"
-	        outputname="$tmpdir/$file"
+		file=$func_basename_result
+	        outputname=$tmpdir/$file
 	        # Replace the output file specification.
-	        relink_command=`$ECHO "X$relink_command" | $Xsed -e 's%@OUTPUT@%'"$outputname"'%g'`
+	        relink_command=`$ECHO "$relink_command" | $SED 's%@OUTPUT@%'"$outputname"'%g'`
 
-	        $opt_silent || {
+	        $opt_quiet || {
 	          func_quote_for_expand "$relink_command"
 		  eval "func_echo $func_quote_for_expand_result"
 	        }
 	        if eval "$relink_command"; then :
 	          else
-		  func_error "error: relink \`$file' with the above command before installing it"
+		  func_error "error: relink '$file' with the above command before installing it"
 		  $opt_dry_run || ${RM}r "$tmpdir"
 		  continue
 	        fi
-	        file="$outputname"
+	        file=$outputname
 	      else
-	        func_warning "cannot relink \`$file'"
+	        func_warning "cannot relink '$file'"
 	      fi
 	    }
 	  else
 	    # Install the binary that we compiled earlier.
-	    file=`$ECHO "X$file$stripped_ext" | $Xsed -e "s%\([^/]*\)$%$objdir/\1%"`
+	    file=`$ECHO "$file$stripped_ext" | $SED "s%\([^/]*\)$%$objdir/\1%"`
 	  fi
 	fi
 
@@ -2253,15 +4526,17 @@ func_mode_install ()
 
     for file in $staticlibs; do
       func_basename "$file"
-      name="$func_basename_result"
+      name=$func_basename_result
 
       # Set up the ranlib parameters.
-      oldlib="$destdir/$name"
+      oldlib=$destdir/$name
+      func_to_tool_file "$oldlib" func_convert_file_msys_to_w32
+      tool_oldlib=$func_to_tool_file_result
 
       func_show_eval "$install_prog \$file \$oldlib" 'exit $?'
 
       if test -n "$stripme" && test -n "$old_striplib"; then
-	func_show_eval "$old_striplib $oldlib" 'exit $?'
+	func_show_eval "$old_striplib $tool_oldlib" 'exit $?'
       fi
 
       # Do each command in the postinstall commands.
@@ -2269,18 +4544,18 @@ func_mode_install ()
     done
 
     test -n "$future_libdirs" && \
-      func_warning "remember to run \`$progname --finish$future_libdirs'"
+      func_warning "remember to run '$progname --finish$future_libdirs'"
 
     if test -n "$current_libdirs"; then
       # Maybe just do a dry run.
       $opt_dry_run && current_libdirs=" -n$current_libdirs"
-      exec_cmd='$SHELL $progpath $preserve_args --finish$current_libdirs'
+      exec_cmd='$SHELL "$progpath" $preserve_args --finish$current_libdirs'
     else
       exit $EXIT_SUCCESS
     fi
 }
 
-test "$mode" = install && func_mode_install ${1+"$@"}
+test install = "$opt_mode" && func_mode_install ${1+"$@"}
 
 
 # func_generate_dlsyms outputname originator pic_p
@@ -2288,16 +4563,17 @@ test "$mode" = install && func_mode_install ${1+"$@"}
 # a dlpreopen symbol table.
 func_generate_dlsyms ()
 {
-    $opt_debug
-    my_outputname="$1"
-    my_originator="$2"
-    my_pic_p="${3-no}"
-    my_prefix=`$ECHO "$my_originator" | sed 's%[^a-zA-Z0-9]%_%g'`
+    $debug_cmd
+
+    my_outputname=$1
+    my_originator=$2
+    my_pic_p=${3-false}
+    my_prefix=`$ECHO "$my_originator" | $SED 's%[^a-zA-Z0-9]%_%g'`
     my_dlsyms=
 
-    if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
+    if test -n "$dlfiles$dlprefiles" || test no != "$dlself"; then
       if test -n "$NM" && test -n "$global_symbol_pipe"; then
-	my_dlsyms="${my_outputname}S.c"
+	my_dlsyms=${my_outputname}S.c
       else
 	func_error "not configured to extract global symbols from dlpreopened files"
       fi
@@ -2308,7 +4584,7 @@ func_generate_dlsyms ()
       "") ;;
       *.c)
 	# Discover the nlist of each of the dlfiles.
-	nlist="$output_objdir/${my_outputname}.nm"
+	nlist=$output_objdir/$my_outputname.nm
 
 	func_show_eval "$RM $nlist ${nlist}S ${nlist}T"
 
@@ -2316,26 +4592,45 @@ func_generate_dlsyms ()
 	func_verbose "creating $output_objdir/$my_dlsyms"
 
 	$opt_dry_run || $ECHO > "$output_objdir/$my_dlsyms" "\
-/* $my_dlsyms - symbol resolution table for \`$my_outputname' dlsym emulation. */
-/* Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION */
+/* $my_dlsyms - symbol resolution table for '$my_outputname' dlsym emulation. */
+/* Generated by $PROGRAM (GNU $PACKAGE) $VERSION */
 
 #ifdef __cplusplus
 extern \"C\" {
 #endif
 
+#if defined __GNUC__ && (((__GNUC__ == 4) && (__GNUC_MINOR__ >= 4)) || (__GNUC__ > 4))
+#pragma GCC diagnostic ignored \"-Wstrict-prototypes\"
+#endif
+
+/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests.  */
+#if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE
+/* DATA imports from DLLs on WIN32 can't be const, because runtime
+   relocations are performed -- see ld's documentation on pseudo-relocs.  */
+# define LT_DLSYM_CONST
+#elif defined __osf__
+/* This system does not cope well with relocations in const data.  */
+# define LT_DLSYM_CONST
+#else
+# define LT_DLSYM_CONST const
+#endif
+
+#define STREQ(s1, s2) (strcmp ((s1), (s2)) == 0)
+
 /* External symbol declarations for the compiler. */\
 "
 
-	if test "$dlself" = yes; then
-	  func_verbose "generating symbol list for \`$output'"
+	if test yes = "$dlself"; then
+	  func_verbose "generating symbol list for '$output'"
 
 	  $opt_dry_run || echo ': @PROGRAM@ ' > "$nlist"
 
 	  # Add our own program objects to the symbol list.
-	  progfiles=`$ECHO "X$objs$old_deplibs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
+	  progfiles=`$ECHO "$objs$old_deplibs" | $SP2NL | $SED "$lo2o" | $NL2SP`
 	  for progfile in $progfiles; do
-	    func_verbose "extracting global C symbols from \`$progfile'"
-	    $opt_dry_run || eval "$NM $progfile | $global_symbol_pipe >> '$nlist'"
+	    func_to_tool_file "$progfile" func_convert_file_msys_to_w32
+	    func_verbose "extracting global C symbols from '$func_to_tool_file_result'"
+	    $opt_dry_run || eval "$NM $func_to_tool_file_result | $global_symbol_pipe >> '$nlist'"
 	  done
 
 	  if test -n "$exclude_expsyms"; then
@@ -2354,10 +4649,10 @@ extern \"C\" {
 
 	  # Prepare the list of exported symbols
 	  if test -z "$export_symbols"; then
-	    export_symbols="$output_objdir/$outputname.exp"
+	    export_symbols=$output_objdir/$outputname.exp
 	    $opt_dry_run || {
 	      $RM $export_symbols
-	      eval "${SED} -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"'
+	      eval "$SED -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"'
 	      case $host in
 	      *cygwin* | *mingw* | *cegcc* )
                 eval "echo EXPORTS "'> "$output_objdir/$outputname.def"'
@@ -2367,11 +4662,11 @@ extern \"C\" {
 	    }
 	  else
 	    $opt_dry_run || {
-	      eval "${SED} -e 's/\([].[*^$]\)/\\\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"'
+	      eval "$SED -e 's/\([].[*^$]\)/\\\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"'
 	      eval '$GREP -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T'
 	      eval '$MV "$nlist"T "$nlist"'
 	      case $host in
-	        *cygwin | *mingw* | *cegcc* )
+	        *cygwin* | *mingw* | *cegcc* )
 	          eval "echo EXPORTS "'> "$output_objdir/$outputname.def"'
 	          eval 'cat "$nlist" >> "$output_objdir/$outputname.def"'
 	          ;;
@@ -2381,13 +4676,55 @@ extern \"C\" {
 	fi
 
 	for dlprefile in $dlprefiles; do
-	  func_verbose "extracting global C symbols from \`$dlprefile'"
+	  func_verbose "extracting global C symbols from '$dlprefile'"
 	  func_basename "$dlprefile"
-	  name="$func_basename_result"
-	  $opt_dry_run || {
-	    eval '$ECHO ": $name " >> "$nlist"'
-	    eval "$NM $dlprefile 2>/dev/null | $global_symbol_pipe >> '$nlist'"
-	  }
+	  name=$func_basename_result
+          case $host in
+	    *cygwin* | *mingw* | *cegcc* )
+	      # if an import library, we need to obtain dlname
+	      if func_win32_import_lib_p "$dlprefile"; then
+	        func_tr_sh "$dlprefile"
+	        eval "curr_lafile=\$libfile_$func_tr_sh_result"
+	        dlprefile_dlbasename=
+	        if test -n "$curr_lafile" && func_lalib_p "$curr_lafile"; then
+	          # Use subshell, to avoid clobbering current variable values
+	          dlprefile_dlname=`source "$curr_lafile" && echo "$dlname"`
+	          if test -n "$dlprefile_dlname"; then
+	            func_basename "$dlprefile_dlname"
+	            dlprefile_dlbasename=$func_basename_result
+	          else
+	            # no lafile. user explicitly requested -dlpreopen <import library>.
+	            $sharedlib_from_linklib_cmd "$dlprefile"
+	            dlprefile_dlbasename=$sharedlib_from_linklib_result
+	          fi
+	        fi
+	        $opt_dry_run || {
+	          if test -n "$dlprefile_dlbasename"; then
+	            eval '$ECHO ": $dlprefile_dlbasename" >> "$nlist"'
+	          else
+	            func_warning "Could not compute DLL name from $name"
+	            eval '$ECHO ": $name " >> "$nlist"'
+	          fi
+	          func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32
+	          eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe |
+	            $SED -e '/I __imp/d' -e 's/I __nm_/D /;s/_nm__//' >> '$nlist'"
+	        }
+	      else # not an import lib
+	        $opt_dry_run || {
+	          eval '$ECHO ": $name " >> "$nlist"'
+	          func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32
+	          eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe >> '$nlist'"
+	        }
+	      fi
+	    ;;
+	    *)
+	      $opt_dry_run || {
+	        eval '$ECHO ": $name " >> "$nlist"'
+	        func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32
+	        eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe >> '$nlist'"
+	      }
+	    ;;
+          esac
 	done
 
 	$opt_dry_run || {
@@ -2415,39 +4752,46 @@ extern \"C\" {
 	  if test -f "$nlist"S; then
 	    eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$my_dlsyms"'
 	  else
-	    $ECHO '/* NONE */' >> "$output_objdir/$my_dlsyms"
+	    echo '/* NONE */' >> "$output_objdir/$my_dlsyms"
+	  fi
+
+	  func_show_eval '$RM "${nlist}I"'
+	  if test -n "$global_symbol_to_import"; then
+	    eval "$global_symbol_to_import"' < "$nlist"S > "$nlist"I'
 	  fi
 
-	  $ECHO >> "$output_objdir/$my_dlsyms" "\
+	  echo >> "$output_objdir/$my_dlsyms" "\
 
 /* The mapping between symbol names and symbols.  */
 typedef struct {
   const char *name;
   void *address;
 } lt_dlsymlist;
+extern LT_DLSYM_CONST lt_dlsymlist
+lt_${my_prefix}_LTX_preloaded_symbols[];\
 "
-	  case $host in
-	  *cygwin* | *mingw* | *cegcc* )
-	    $ECHO >> "$output_objdir/$my_dlsyms" "\
-/* DATA imports from DLLs on WIN32 con't be const, because
-   runtime relocations are performed -- see ld's documentation
-   on pseudo-relocs.  */"
-	    lt_dlsym_const= ;;
-	  *osf5*)
-	    echo >> "$output_objdir/$my_dlsyms" "\
-/* This system does not cope well with relocations in const data */"
-	    lt_dlsym_const= ;;
-	  *)
-	    lt_dlsym_const=const ;;
-	  esac
 
-	  $ECHO >> "$output_objdir/$my_dlsyms" "\
-extern $lt_dlsym_const lt_dlsymlist
-lt_${my_prefix}_LTX_preloaded_symbols[];
-$lt_dlsym_const lt_dlsymlist
+	  if test -s "$nlist"I; then
+	    echo >> "$output_objdir/$my_dlsyms" "\
+static void lt_syminit(void)
+{
+  LT_DLSYM_CONST lt_dlsymlist *symbol = lt_${my_prefix}_LTX_preloaded_symbols;
+  for (; symbol->name; ++symbol)
+    {"
+	    $SED 's/.*/      if (STREQ (symbol->name, \"&\")) symbol->address = (void *) \&&;/' < "$nlist"I >> "$output_objdir/$my_dlsyms"
+	    echo >> "$output_objdir/$my_dlsyms" "\
+    }
+}"
+	  fi
+	  echo >> "$output_objdir/$my_dlsyms" "\
+LT_DLSYM_CONST lt_dlsymlist
 lt_${my_prefix}_LTX_preloaded_symbols[] =
-{\
-  { \"$my_originator\", (void *) 0 },"
+{ {\"$my_originator\", (void *) 0},"
+
+	  if test -s "$nlist"I; then
+	    echo >> "$output_objdir/$my_dlsyms" "\
+  {\"@INIT@\", (void *) &lt_syminit},"
+	  fi
 
 	  case $need_lib_prefix in
 	  no)
@@ -2457,7 +4801,7 @@ lt_${my_prefix}_LTX_preloaded_symbols[] =
 	    eval "$global_symbol_to_c_name_address_lib_prefix" < "$nlist" >> "$output_objdir/$my_dlsyms"
 	    ;;
 	  esac
-	  $ECHO >> "$output_objdir/$my_dlsyms" "\
+	  echo >> "$output_objdir/$my_dlsyms" "\
   {0, (void *) 0}
 };
 
@@ -2484,14 +4828,12 @@ static const void *lt_preloaded_setup() {
 	  # linked before any other PIC object.  But we must not use
 	  # pic_flag when linking with -static.  The problem exists in
 	  # FreeBSD 2.2.6 and is fixed in FreeBSD 3.1.
-	  *-*-freebsd2*|*-*-freebsd3.0*|*-*-freebsdelf3.0*)
+	  *-*-freebsd2.*|*-*-freebsd3.0*|*-*-freebsdelf3.0*)
 	    pic_flag_for_symtable=" $pic_flag -DFREEBSD_WORKAROUND" ;;
 	  *-*-hpux*)
 	    pic_flag_for_symtable=" $pic_flag"  ;;
 	  *)
-	    if test "X$my_pic_p" != Xno; then
-	      pic_flag_for_symtable=" $pic_flag"
-	    fi
+	    $my_pic_p && pic_flag_for_symtable=" $pic_flag"
 	    ;;
 	  esac
 	  ;;
@@ -2500,7 +4842,7 @@ static const void *lt_preloaded_setup() {
 	for arg in $LTCFLAGS; do
 	  case $arg in
 	  -pie | -fpie | -fPIE) ;;
-	  *) symtab_cflags="$symtab_cflags $arg" ;;
+	  *) func_append symtab_cflags " $arg" ;;
 	  esac
 	done
 
@@ -2508,28 +4850,28 @@ static const void *lt_preloaded_setup() {
 	func_show_eval '(cd $output_objdir && $LTCC$symtab_cflags -c$no_builtin_flag$pic_flag_for_symtable "$my_dlsyms")' 'exit $?'
 
 	# Clean up the generated files.
-	func_show_eval '$RM "$output_objdir/$my_dlsyms" "$nlist" "${nlist}S" "${nlist}T"'
+	func_show_eval '$RM "$output_objdir/$my_dlsyms" "$nlist" "${nlist}S" "${nlist}T" "${nlist}I"'
 
 	# Transform the symbol file into the correct name.
-	symfileobj="$output_objdir/${my_outputname}S.$objext"
+	symfileobj=$output_objdir/${my_outputname}S.$objext
 	case $host in
 	*cygwin* | *mingw* | *cegcc* )
 	  if test -f "$output_objdir/$my_outputname.def"; then
-	    compile_command=`$ECHO "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"`
-	    finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"`
+	    compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"`
+	    finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"`
 	  else
-	    compile_command=`$ECHO "X$compile_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"`
-	    finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"`
+	    compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$symfileobj%"`
+	    finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$symfileobj%"`
 	  fi
 	  ;;
 	*)
-	  compile_command=`$ECHO "X$compile_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"`
-	  finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"`
+	  compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$symfileobj%"`
+	  finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$symfileobj%"`
 	  ;;
 	esac
 	;;
       *)
-	func_fatal_error "unknown suffix for \`$my_dlsyms'"
+	func_fatal_error "unknown suffix for '$my_dlsyms'"
 	;;
       esac
     else
@@ -2538,38 +4880,81 @@ static const void *lt_preloaded_setup() {
       # really was required.
 
       # Nullify the symbol file.
-      compile_command=`$ECHO "X$compile_command" | $Xsed -e "s% @SYMFILE@%%"`
-      finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "s% @SYMFILE@%%"`
+      compile_command=`$ECHO "$compile_command" | $SED "s% @SYMFILE@%%"`
+      finalize_command=`$ECHO "$finalize_command" | $SED "s% @SYMFILE@%%"`
     fi
 }
 
+# func_cygming_gnu_implib_p ARG
+# This predicate returns with zero status (TRUE) if
+# ARG is a GNU/binutils-style import library. Returns
+# with nonzero status (FALSE) otherwise.
+func_cygming_gnu_implib_p ()
+{
+  $debug_cmd
+
+  func_to_tool_file "$1" func_convert_file_msys_to_w32
+  func_cygming_gnu_implib_tmp=`$NM "$func_to_tool_file_result" | eval "$global_symbol_pipe" | $EGREP ' (_head_[A-Za-z0-9_]+_[ad]l*|[A-Za-z0-9_]+_[ad]l*_iname)$'`
+  test -n "$func_cygming_gnu_implib_tmp"
+}
+
+# func_cygming_ms_implib_p ARG
+# This predicate returns with zero status (TRUE) if
+# ARG is an MS-style import library. Returns
+# with nonzero status (FALSE) otherwise.
+func_cygming_ms_implib_p ()
+{
+  $debug_cmd
+
+  func_to_tool_file "$1" func_convert_file_msys_to_w32
+  func_cygming_ms_implib_tmp=`$NM "$func_to_tool_file_result" | eval "$global_symbol_pipe" | $GREP '_NULL_IMPORT_DESCRIPTOR'`
+  test -n "$func_cygming_ms_implib_tmp"
+}
+
 # func_win32_libid arg
 # return the library type of file 'arg'
 #
 # Need a lot of goo to handle *both* DLLs and import libs
 # Has to be a shell function in order to 'eat' the argument
 # that is supplied when $file_magic_command is called.
+# Despite the name, also deal with 64 bit binaries.
 func_win32_libid ()
 {
-  $opt_debug
-  win32_libid_type="unknown"
+  $debug_cmd
+
+  win32_libid_type=unknown
   win32_fileres=`file -L $1 2>/dev/null`
   case $win32_fileres in
   *ar\ archive\ import\ library*) # definitely import
     win32_libid_type="x86 archive import"
     ;;
   *ar\ archive*) # could be an import, or static
+    # Keep the egrep pattern in sync with the one in _LT_CHECK_MAGIC_METHOD.
     if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null |
-       $EGREP 'file format pe-i386(.*architecture: i386)?' >/dev/null ; then
-      win32_nmres=`eval $NM -f posix -A $1 |
-	$SED -n -e '
+       $EGREP 'file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' >/dev/null; then
+      case $nm_interface in
+      "MS dumpbin")
+	if func_cygming_ms_implib_p "$1" ||
+	   func_cygming_gnu_implib_p "$1"
+	then
+	  win32_nmres=import
+	else
+	  win32_nmres=
+	fi
+	;;
+      *)
+	func_to_tool_file "$1" func_convert_file_msys_to_w32
+	win32_nmres=`eval $NM -f posix -A \"$func_to_tool_file_result\" |
+	  $SED -n -e '
 	    1,100{
 		/ I /{
-		    s,.*,import,
+		    s|.*|import|
 		    p
 		    q
 		}
 	    }'`
+	;;
+      esac
       case $win32_nmres in
       import*)  win32_libid_type="x86 archive import";;
       *)        win32_libid_type="x86 archive static";;
@@ -2590,15 +4975,131 @@ func_win32_libid ()
   $ECHO "$win32_libid_type"
 }
 
+# func_cygming_dll_for_implib ARG
+#
+# Platform-specific function to extract the
+# name of the DLL associated with the specified
+# import library ARG.
+# Invoked by eval'ing the libtool variable
+#    $sharedlib_from_linklib_cmd
+# Result is available in the variable
+#    $sharedlib_from_linklib_result
+func_cygming_dll_for_implib ()
+{
+  $debug_cmd
+
+  sharedlib_from_linklib_result=`$DLLTOOL --identify-strict --identify "$1"`
+}
+
+# func_cygming_dll_for_implib_fallback_core SECTION_NAME LIBNAMEs
+#
+# The is the core of a fallback implementation of a
+# platform-specific function to extract the name of the
+# DLL associated with the specified import library LIBNAME.
+#
+# SECTION_NAME is either .idata$6 or .idata$7, depending
+# on the platform and compiler that created the implib.
+#
+# Echos the name of the DLL associated with the
+# specified import library.
+func_cygming_dll_for_implib_fallback_core ()
+{
+  $debug_cmd
+
+  match_literal=`$ECHO "$1" | $SED "$sed_make_literal_regex"`
+  $OBJDUMP -s --section "$1" "$2" 2>/dev/null |
+    $SED '/^Contents of section '"$match_literal"':/{
+      # Place marker at beginning of archive member dllname section
+      s/.*/====MARK====/
+      p
+      d
+    }
+    # These lines can sometimes be longer than 43 characters, but
+    # are always uninteresting
+    /:[	 ]*file format pe[i]\{,1\}-/d
+    /^In archive [^:]*:/d
+    # Ensure marker is printed
+    /^====MARK====/p
+    # Remove all lines with less than 43 characters
+    /^.\{43\}/!d
+    # From remaining lines, remove first 43 characters
+    s/^.\{43\}//' |
+    $SED -n '
+      # Join marker and all lines until next marker into a single line
+      /^====MARK====/ b para
+      H
+      $ b para
+      b
+      :para
+      x
+      s/\n//g
+      # Remove the marker
+      s/^====MARK====//
+      # Remove trailing dots and whitespace
+      s/[\. \t]*$//
+      # Print
+      /./p' |
+    # we now have a list, one entry per line, of the stringified
+    # contents of the appropriate section of all members of the
+    # archive that possess that section. Heuristic: eliminate
+    # all those that have a first or second character that is
+    # a '.' (that is, objdump's representation of an unprintable
+    # character.) This should work for all archives with less than
+    # 0x302f exports -- but will fail for DLLs whose name actually
+    # begins with a literal '.' or a single character followed by
+    # a '.'.
+    #
+    # Of those that remain, print the first one.
+    $SED -e '/^\./d;/^.\./d;q'
+}
+
+# func_cygming_dll_for_implib_fallback ARG
+# Platform-specific function to extract the
+# name of the DLL associated with the specified
+# import library ARG.
+#
+# This fallback implementation is for use when $DLLTOOL
+# does not support the --identify-strict option.
+# Invoked by eval'ing the libtool variable
+#    $sharedlib_from_linklib_cmd
+# Result is available in the variable
+#    $sharedlib_from_linklib_result
+func_cygming_dll_for_implib_fallback ()
+{
+  $debug_cmd
+
+  if func_cygming_gnu_implib_p "$1"; then
+    # binutils import library
+    sharedlib_from_linklib_result=`func_cygming_dll_for_implib_fallback_core '.idata$7' "$1"`
+  elif func_cygming_ms_implib_p "$1"; then
+    # ms-generated import library
+    sharedlib_from_linklib_result=`func_cygming_dll_for_implib_fallback_core '.idata$6' "$1"`
+  else
+    # unknown
+    sharedlib_from_linklib_result=
+  fi
+}
 
 
 # func_extract_an_archive dir oldlib
 func_extract_an_archive ()
 {
-    $opt_debug
-    f_ex_an_ar_dir="$1"; shift
-    f_ex_an_ar_oldlib="$1"
-    func_show_eval "(cd \$f_ex_an_ar_dir && $AR x \"\$f_ex_an_ar_oldlib\")" 'exit $?'
+    $debug_cmd
+
+    f_ex_an_ar_dir=$1; shift
+    f_ex_an_ar_oldlib=$1
+    if test yes = "$lock_old_archive_extraction"; then
+      lockfile=$f_ex_an_ar_oldlib.lock
+      until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do
+	func_echo "Waiting for $lockfile to be removed"
+	sleep 2
+      done
+    fi
+    func_show_eval "(cd \$f_ex_an_ar_dir && $AR x \"\$f_ex_an_ar_oldlib\")" \
+		   'stat=$?; rm -f "$lockfile"; exit $stat'
+    if test yes = "$lock_old_archive_extraction"; then
+      $opt_dry_run || rm -f "$lockfile"
+    fi
     if ($AR t "$f_ex_an_ar_oldlib" | sort | sort -uc >/dev/null 2>&1); then
      :
     else
@@ -2610,22 +5111,23 @@ func_extract_an_archive ()
 # func_extract_archives gentop oldlib ...
 func_extract_archives ()
 {
-    $opt_debug
-    my_gentop="$1"; shift
+    $debug_cmd
+
+    my_gentop=$1; shift
     my_oldlibs=${1+"$@"}
-    my_oldobjs=""
-    my_xlib=""
-    my_xabs=""
-    my_xdir=""
+    my_oldobjs=
+    my_xlib=
+    my_xabs=
+    my_xdir=
 
     for my_xlib in $my_oldlibs; do
       # Extract the objects.
       case $my_xlib in
-	[\\/]* | [A-Za-z]:[\\/]*) my_xabs="$my_xlib" ;;
+	[\\/]* | [A-Za-z]:[\\/]*) my_xabs=$my_xlib ;;
 	*) my_xabs=`pwd`"/$my_xlib" ;;
       esac
       func_basename "$my_xlib"
-      my_xlib="$func_basename_result"
+      my_xlib=$func_basename_result
       my_xlib_u=$my_xlib
       while :; do
         case " $extracted_archives " in
@@ -2637,7 +5139,7 @@ func_extract_archives ()
 	esac
       done
       extracted_archives="$extracted_archives $my_xlib_u"
-      my_xdir="$my_gentop/$my_xlib_u"
+      my_xdir=$my_gentop/$my_xlib_u
 
       func_mkdir_p "$my_xdir"
 
@@ -2650,26 +5152,27 @@ func_extract_archives ()
 	  cd $my_xdir || exit $?
 	  darwin_archive=$my_xabs
 	  darwin_curdir=`pwd`
-	  darwin_base_archive=`basename "$darwin_archive"`
+	  func_basename "$darwin_archive"
+	  darwin_base_archive=$func_basename_result
 	  darwin_arches=`$LIPO -info "$darwin_archive" 2>/dev/null | $GREP Architectures 2>/dev/null || true`
 	  if test -n "$darwin_arches"; then
 	    darwin_arches=`$ECHO "$darwin_arches" | $SED -e 's/.*are://'`
 	    darwin_arch=
 	    func_verbose "$darwin_base_archive has multiple architectures $darwin_arches"
-	    for darwin_arch in  $darwin_arches ; do
-	      func_mkdir_p "unfat-$$/${darwin_base_archive}-${darwin_arch}"
-	      $LIPO -thin $darwin_arch -output "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" "${darwin_archive}"
-	      cd "unfat-$$/${darwin_base_archive}-${darwin_arch}"
-	      func_extract_an_archive "`pwd`" "${darwin_base_archive}"
+	    for darwin_arch in  $darwin_arches; do
+	      func_mkdir_p "unfat-$$/$darwin_base_archive-$darwin_arch"
+	      $LIPO -thin $darwin_arch -output "unfat-$$/$darwin_base_archive-$darwin_arch/$darwin_base_archive" "$darwin_archive"
+	      cd "unfat-$$/$darwin_base_archive-$darwin_arch"
+	      func_extract_an_archive "`pwd`" "$darwin_base_archive"
 	      cd "$darwin_curdir"
-	      $RM "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}"
+	      $RM "unfat-$$/$darwin_base_archive-$darwin_arch/$darwin_base_archive"
 	    done # $darwin_arches
             ## Okay now we've a bunch of thin objects, gotta fatten them up :)
-	    darwin_filelist=`find unfat-$$ -type f -name \*.o -print -o -name \*.lo -print | $SED -e "$basename" | sort -u`
+	    darwin_filelist=`find unfat-$$ -type f -name \*.o -print -o -name \*.lo -print | $SED -e "$sed_basename" | sort -u`
 	    darwin_file=
 	    darwin_files=
 	    for darwin_file in $darwin_filelist; do
-	      darwin_files=`find unfat-$$ -name $darwin_file -print | $NL2SP`
+	      darwin_files=`find unfat-$$ -name $darwin_file -print | sort | $NL2SP`
 	      $LIPO -create -output "$darwin_file" $darwin_files
 	    done # $darwin_filelist
 	    $RM -rf unfat-$$
@@ -2684,31 +5187,36 @@ func_extract_archives ()
         func_extract_an_archive "$my_xdir" "$my_xabs"
 	;;
       esac
-      my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | $NL2SP`
+      my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | sort | $NL2SP`
     done
 
-    func_extract_archives_result="$my_oldobjs"
+    func_extract_archives_result=$my_oldobjs
 }
 
 
-
-# func_emit_wrapper_part1 [arg=no]
+# func_emit_wrapper [arg=no]
 #
-# Emit the first part of a libtool wrapper script on stdout.
-# For more information, see the description associated with
-# func_emit_wrapper(), below.
-func_emit_wrapper_part1 ()
-{
-	func_emit_wrapper_part1_arg1=no
-	if test -n "$1" ; then
-	  func_emit_wrapper_part1_arg1=$1
-	fi
+# Emit a libtool wrapper script on stdout.
+# Don't directly open a file because we may want to
+# incorporate the script contents within a cygwin/mingw
+# wrapper executable.  Must ONLY be called from within
+# func_mode_link because it depends on a number of variables
+# set therein.
+#
+# ARG is the value that the WRAPPER_SCRIPT_BELONGS_IN_OBJDIR
+# variable will take.  If 'yes', then the emitted script
+# will assume that the directory where it is stored is
+# the $objdir directory.  This is a cygwin/mingw-specific
+# behavior.
+func_emit_wrapper ()
+{
+	func_emit_wrapper_arg1=${1-no}
 
 	$ECHO "\
 #! $SHELL
 
 # $output - temporary wrapper script for $objdir/$outputname
-# Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION
+# Generated by $PROGRAM (GNU $PACKAGE) $VERSION
 #
 # The $output program cannot be directly executed until all the libtool
 # libraries that it depends on are installed.
@@ -2718,7 +5226,6 @@ func_emit_wrapper_part1 ()
 
 # Sed substitution that helps us do robust quoting.  It backslashifies
 # metacharacters that are still active within double-quoted strings.
-Xsed='${SED} -e 1s/^X//'
 sed_quote_subst='$sed_quote_subst'
 
 # Be Bourne compatible
@@ -2749,31 +5256,135 @@ if test \"\$libtool_install_magic\" = \"$magic\"; then
 else
   # When we are sourced in execute mode, \$file and \$ECHO are already set.
   if test \"\$libtool_execute_magic\" != \"$magic\"; then
-    ECHO=\"$qecho\"
-    file=\"\$0\"
-    # Make sure echo works.
-    if test \"X\$1\" = X--no-reexec; then
-      # Discard the --no-reexec flag, and continue.
-      shift
-    elif test \"X\`{ \$ECHO '\t'; } 2>/dev/null\`\" = 'X\t'; then
-      # Yippee, \$ECHO works!
-      :
-    else
-      # Restart under the correct shell, and then maybe \$ECHO will work.
-      exec $SHELL \"\$0\" --no-reexec \${1+\"\$@\"}
-    fi
-  fi\
+    file=\"\$0\""
+
+    qECHO=`$ECHO "$ECHO" | $SED "$sed_quote_subst"`
+    $ECHO "\
+
+# A function that is used when there is no print builtin or printf.
+func_fallback_echo ()
+{
+  eval 'cat <<_LTECHO_EOF
+\$1
+_LTECHO_EOF'
+}
+    ECHO=\"$qECHO\"
+  fi
+
+# Very basic option parsing. These options are (a) specific to
+# the libtool wrapper, (b) are identical between the wrapper
+# /script/ and the wrapper /executable/ that is used only on
+# windows platforms, and (c) all begin with the string "--lt-"
+# (application programs are unlikely to have options that match
+# this pattern).
+#
+# There are only two supported options: --lt-debug and
+# --lt-dump-script. There is, deliberately, no --lt-help.
+#
+# The first argument to this parsing function should be the
+# script's $0 value, followed by "$@".
+lt_option_debug=
+func_parse_lt_options ()
+{
+  lt_script_arg0=\$0
+  shift
+  for lt_opt
+  do
+    case \"\$lt_opt\" in
+    --lt-debug) lt_option_debug=1 ;;
+    --lt-dump-script)
+        lt_dump_D=\`\$ECHO \"X\$lt_script_arg0\" | $SED -e 's/^X//' -e 's%/[^/]*$%%'\`
+        test \"X\$lt_dump_D\" = \"X\$lt_script_arg0\" && lt_dump_D=.
+        lt_dump_F=\`\$ECHO \"X\$lt_script_arg0\" | $SED -e 's/^X//' -e 's%^.*/%%'\`
+        cat \"\$lt_dump_D/\$lt_dump_F\"
+        exit 0
+      ;;
+    --lt-*)
+        \$ECHO \"Unrecognized --lt- option: '\$lt_opt'\" 1>&2
+        exit 1
+      ;;
+    esac
+  done
+
+  # Print the debug banner immediately:
+  if test -n \"\$lt_option_debug\"; then
+    echo \"$outputname:$output:\$LINENO: libtool wrapper (GNU $PACKAGE) $VERSION\" 1>&2
+  fi
+}
+
+# Used when --lt-debug. Prints its arguments to stdout
+# (redirection is the responsibility of the caller)
+func_lt_dump_args ()
+{
+  lt_dump_args_N=1;
+  for lt_arg
+  do
+    \$ECHO \"$outputname:$output:\$LINENO: newargv[\$lt_dump_args_N]: \$lt_arg\"
+    lt_dump_args_N=\`expr \$lt_dump_args_N + 1\`
+  done
+}
+
+# Core function for launching the target application
+func_exec_program_core ()
+{
 "
-	$ECHO "\
+  case $host in
+  # Backslashes separate directories on plain windows
+  *-*-mingw | *-*-os2* | *-cegcc*)
+    $ECHO "\
+      if test -n \"\$lt_option_debug\"; then
+        \$ECHO \"$outputname:$output:\$LINENO: newargv[0]: \$progdir\\\\\$program\" 1>&2
+        func_lt_dump_args \${1+\"\$@\"} 1>&2
+      fi
+      exec \"\$progdir\\\\\$program\" \${1+\"\$@\"}
+"
+    ;;
+
+  *)
+    $ECHO "\
+      if test -n \"\$lt_option_debug\"; then
+        \$ECHO \"$outputname:$output:\$LINENO: newargv[0]: \$progdir/\$program\" 1>&2
+        func_lt_dump_args \${1+\"\$@\"} 1>&2
+      fi
+      exec \"\$progdir/\$program\" \${1+\"\$@\"}
+"
+    ;;
+  esac
+  $ECHO "\
+      \$ECHO \"\$0: cannot exec \$program \$*\" 1>&2
+      exit 1
+}
+
+# A function to encapsulate launching the target application
+# Strips options in the --lt-* namespace from \$@ and
+# launches target application with the remaining arguments.
+func_exec_program ()
+{
+  case \" \$* \" in
+  *\\ --lt-*)
+    for lt_wr_arg
+    do
+      case \$lt_wr_arg in
+      --lt-*) ;;
+      *) set x \"\$@\" \"\$lt_wr_arg\"; shift;;
+      esac
+      shift
+    done ;;
+  esac
+  func_exec_program_core \${1+\"\$@\"}
+}
+
+  # Parse options
+  func_parse_lt_options \"\$0\" \${1+\"\$@\"}
 
   # Find the directory that this script lives in.
-  thisdir=\`\$ECHO \"X\$file\" | \$Xsed -e 's%/[^/]*$%%'\`
+  thisdir=\`\$ECHO \"\$file\" | $SED 's%/[^/]*$%%'\`
   test \"x\$thisdir\" = \"x\$file\" && thisdir=.
 
   # Follow symbolic links until we get to the real thisdir.
-  file=\`ls -ld \"\$file\" | ${SED} -n 's/.*-> //p'\`
+  file=\`ls -ld \"\$file\" | $SED -n 's/.*-> //p'\`
   while test -n \"\$file\"; do
-    destdir=\`\$ECHO \"X\$file\" | \$Xsed -e 's%/[^/]*\$%%'\`
+    destdir=\`\$ECHO \"\$file\" | $SED 's%/[^/]*\$%%'\`
 
     # If there was a directory component, then change thisdir.
     if test \"x\$destdir\" != \"x\$file\"; then
@@ -2783,30 +5394,13 @@ else
       esac
     fi
 
-    file=\`\$ECHO \"X\$file\" | \$Xsed -e 's%^.*/%%'\`
-    file=\`ls -ld \"\$thisdir/\$file\" | ${SED} -n 's/.*-> //p'\`
+    file=\`\$ECHO \"\$file\" | $SED 's%^.*/%%'\`
+    file=\`ls -ld \"\$thisdir/\$file\" | $SED -n 's/.*-> //p'\`
   done
-"
-}
-# end: func_emit_wrapper_part1
-
-# func_emit_wrapper_part2 [arg=no]
-#
-# Emit the second part of a libtool wrapper script on stdout.
-# For more information, see the description associated with
-# func_emit_wrapper(), below.
-func_emit_wrapper_part2 ()
-{
-	func_emit_wrapper_part2_arg1=no
-	if test -n "$1" ; then
-	  func_emit_wrapper_part2_arg1=$1
-	fi
-
-	$ECHO "\
 
   # Usually 'no', except on cygwin/mingw when embedded into
   # the cwrapper.
-  WRAPPER_SCRIPT_BELONGS_IN_OBJDIR=$func_emit_wrapper_part2_arg1
+  WRAPPER_SCRIPT_BELONGS_IN_OBJDIR=$func_emit_wrapper_arg1
   if test \"\$WRAPPER_SCRIPT_BELONGS_IN_OBJDIR\" = \"yes\"; then
     # special case for '.'
     if test \"\$thisdir\" = \".\"; then
@@ -2814,7 +5408,7 @@ func_emit_wrapper_part2 ()
     fi
     # remove .libs from thisdir
     case \"\$thisdir\" in
-    *[\\\\/]$objdir ) thisdir=\`\$ECHO \"X\$thisdir\" | \$Xsed -e 's%[\\\\/][^\\\\/]*$%%'\` ;;
+    *[\\\\/]$objdir ) thisdir=\`\$ECHO \"\$thisdir\" | $SED 's%[\\\\/][^\\\\/]*$%%'\` ;;
     $objdir )   thisdir=. ;;
     esac
   fi
@@ -2824,13 +5418,13 @@ func_emit_wrapper_part2 ()
   test -n \"\$absdir\" && thisdir=\"\$absdir\"
 "
 
-	if test "$fast_install" = yes; then
+	if test yes = "$fast_install"; then
 	  $ECHO "\
   program=lt-'$outputname'$exeext
   progdir=\"\$thisdir/$objdir\"
 
   if test ! -f \"\$progdir/\$program\" ||
-     { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | ${SED} 1q\`; \\
+     { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | $SED 1q\`; \\
        test \"X\$file\" != \"X\$progdir/\$program\"; }; then
 
     file=\"\$\$-\$program\"
@@ -2847,7 +5441,7 @@ func_emit_wrapper_part2 ()
     if test -n \"\$relink_command\"; then
       if relink_command_output=\`eval \$relink_command 2>&1\`; then :
       else
-	$ECHO \"\$relink_command_output\" >&2
+	\$ECHO \"\$relink_command_output\" >&2
 	$RM \"\$progdir/\$file\"
 	exit 1
       fi
@@ -2869,261 +5463,48 @@ func_emit_wrapper_part2 ()
 
   if test -f \"\$progdir/\$program\"; then"
 
+	# fixup the dll searchpath if we need to.
+	#
+	# Fix the DLL searchpath if we need to.  Do this before prepending
+	# to shlibpath, because on Windows, both are PATH and uninstalled
+	# libraries must come first.
+	if test -n "$dllsearchpath"; then
+	  $ECHO "\
+    # Add the dll search path components to the executable PATH
+    PATH=$dllsearchpath:\$PATH
+"
+	fi
+
 	# Export our shlibpath_var if we have one.
-	if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then
+	if test yes = "$shlibpath_overrides_runpath" && test -n "$shlibpath_var" && test -n "$temp_rpath"; then
 	  $ECHO "\
     # Add our own library path to $shlibpath_var
     $shlibpath_var=\"$temp_rpath\$$shlibpath_var\"
 
     # Some systems cannot cope with colon-terminated $shlibpath_var
     # The second colon is a workaround for a bug in BeOS R4 sed
-    $shlibpath_var=\`\$ECHO \"X\$$shlibpath_var\" | \$Xsed -e 's/::*\$//'\`
+    $shlibpath_var=\`\$ECHO \"\$$shlibpath_var\" | $SED 's/::*\$//'\`
 
     export $shlibpath_var
 "
 	fi
 
-	# fixup the dll searchpath if we need to.
-	if test -n "$dllsearchpath"; then
-	  $ECHO "\
-    # Add the dll search path components to the executable PATH
-    PATH=$dllsearchpath:\$PATH
-"
-	fi
-
 	$ECHO "\
     if test \"\$libtool_execute_magic\" != \"$magic\"; then
       # Run the actual program with our arguments.
-"
-	case $host in
-	# Backslashes separate directories on plain windows
-	*-*-mingw | *-*-os2* | *-cegcc*)
-	  $ECHO "\
-      exec \"\$progdir\\\\\$program\" \${1+\"\$@\"}
-"
-	  ;;
-
-	*)
-	  $ECHO "\
-      exec \"\$progdir/\$program\" \${1+\"\$@\"}
-"
-	  ;;
-	esac
-	$ECHO "\
-      \$ECHO \"\$0: cannot exec \$program \$*\" 1>&2
-      exit 1
+      func_exec_program \${1+\"\$@\"}
     fi
   else
     # The program doesn't exist.
-    \$ECHO \"\$0: error: \\\`\$progdir/\$program' does not exist\" 1>&2
+    \$ECHO \"\$0: error: '\$progdir/\$program' does not exist\" 1>&2
     \$ECHO \"This script is just a wrapper for \$program.\" 1>&2
-    $ECHO \"See the $PACKAGE documentation for more information.\" 1>&2
+    \$ECHO \"See the $PACKAGE documentation for more information.\" 1>&2
     exit 1
   fi
 fi\
 "
 }
-# end: func_emit_wrapper_part2
-
-
-# func_emit_wrapper [arg=no]
-#
-# Emit a libtool wrapper script on stdout.
-# Don't directly open a file because we may want to
-# incorporate the script contents within a cygwin/mingw
-# wrapper executable.  Must ONLY be called from within
-# func_mode_link because it depends on a number of variables
-# set therein.
-#
-# ARG is the value that the WRAPPER_SCRIPT_BELONGS_IN_OBJDIR
-# variable will take.  If 'yes', then the emitted script
-# will assume that the directory in which it is stored is
-# the $objdir directory.  This is a cygwin/mingw-specific
-# behavior.
-func_emit_wrapper ()
-{
-	func_emit_wrapper_arg1=no
-	if test -n "$1" ; then
-	  func_emit_wrapper_arg1=$1
-	fi
-
-	# split this up so that func_emit_cwrapperexe_src
-	# can call each part independently.
-	func_emit_wrapper_part1 "${func_emit_wrapper_arg1}"
-	func_emit_wrapper_part2 "${func_emit_wrapper_arg1}"
-}
-
-
-# func_to_host_path arg
-#
-# Convert paths to host format when used with build tools.
-# Intended for use with "native" mingw (where libtool itself
-# is running under the msys shell), or in the following cross-
-# build environments:
-#    $build          $host
-#    mingw (msys)    mingw  [e.g. native]
-#    cygwin          mingw
-#    *nix + wine     mingw
-# where wine is equipped with the `winepath' executable.
-# In the native mingw case, the (msys) shell automatically
-# converts paths for any non-msys applications it launches,
-# but that facility isn't available from inside the cwrapper.
-# Similar accommodations are necessary for $host mingw and
-# $build cygwin.  Calling this function does no harm for other
-# $host/$build combinations not listed above.
-#
-# ARG is the path (on $build) that should be converted to
-# the proper representation for $host. The result is stored
-# in $func_to_host_path_result.
-func_to_host_path ()
-{
-  func_to_host_path_result="$1"
-  if test -n "$1" ; then
-    case $host in
-      *mingw* )
-        lt_sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g'
-        case $build in
-          *mingw* ) # actually, msys
-            # awkward: cmd appends spaces to result
-            lt_sed_strip_trailing_spaces="s/[ ]*\$//"
-            func_to_host_path_tmp1=`( cmd //c echo "$1" |\
-              $SED -e "$lt_sed_strip_trailing_spaces" ) 2>/dev/null || echo ""`
-            func_to_host_path_result=`echo "$func_to_host_path_tmp1" |\
-              $SED -e "$lt_sed_naive_backslashify"`
-            ;;
-          *cygwin* )
-            func_to_host_path_tmp1=`cygpath -w "$1"`
-            func_to_host_path_result=`echo "$func_to_host_path_tmp1" |\
-              $SED -e "$lt_sed_naive_backslashify"`
-            ;;
-          * )
-            # Unfortunately, winepath does not exit with a non-zero
-            # error code, so we are forced to check the contents of
-            # stdout. On the other hand, if the command is not
-            # found, the shell will set an exit code of 127 and print
-            # *an error message* to stdout. So we must check for both
-            # error code of zero AND non-empty stdout, which explains
-            # the odd construction:
-            func_to_host_path_tmp1=`winepath -w "$1" 2>/dev/null`
-            if test "$?" -eq 0 && test -n "${func_to_host_path_tmp1}"; then
-              func_to_host_path_result=`echo "$func_to_host_path_tmp1" |\
-                $SED -e "$lt_sed_naive_backslashify"`
-            else
-              # Allow warning below.
-              func_to_host_path_result=""
-            fi
-            ;;
-        esac
-        if test -z "$func_to_host_path_result" ; then
-          func_error "Could not determine host path corresponding to"
-          func_error "  '$1'"
-          func_error "Continuing, but uninstalled executables may not work."
-          # Fallback:
-          func_to_host_path_result="$1"
-        fi
-        ;;
-    esac
-  fi
-}
-# end: func_to_host_path
 
-# func_to_host_pathlist arg
-#
-# Convert pathlists to host format when used with build tools.
-# See func_to_host_path(), above. This function supports the
-# following $build/$host combinations (but does no harm for
-# combinations not listed here):
-#    $build          $host
-#    mingw (msys)    mingw  [e.g. native]
-#    cygwin          mingw
-#    *nix + wine     mingw
-#
-# Path separators are also converted from $build format to
-# $host format. If ARG begins or ends with a path separator
-# character, it is preserved (but converted to $host format)
-# on output.
-#
-# ARG is a pathlist (on $build) that should be converted to
-# the proper representation on $host. The result is stored
-# in $func_to_host_pathlist_result.
-func_to_host_pathlist ()
-{
-  func_to_host_pathlist_result="$1"
-  if test -n "$1" ; then
-    case $host in
-      *mingw* )
-        lt_sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g'
-        # Remove leading and trailing path separator characters from
-        # ARG. msys behavior is inconsistent here, cygpath turns them
-        # into '.;' and ';.', and winepath ignores them completely.
-        func_to_host_pathlist_tmp2="$1"
-        # Once set for this call, this variable should not be
-        # reassigned. It is used in tha fallback case.
-        func_to_host_pathlist_tmp1=`echo "$func_to_host_pathlist_tmp2" |\
-          $SED -e 's|^:*||' -e 's|:*$||'`
-        case $build in
-          *mingw* ) # Actually, msys.
-            # Awkward: cmd appends spaces to result.
-            lt_sed_strip_trailing_spaces="s/[ ]*\$//"
-            func_to_host_pathlist_tmp2=`( cmd //c echo "$func_to_host_pathlist_tmp1" |\
-              $SED -e "$lt_sed_strip_trailing_spaces" ) 2>/dev/null || echo ""`
-            func_to_host_pathlist_result=`echo "$func_to_host_pathlist_tmp2" |\
-              $SED -e "$lt_sed_naive_backslashify"`
-            ;;
-          *cygwin* )
-            func_to_host_pathlist_tmp2=`cygpath -w -p "$func_to_host_pathlist_tmp1"`
-            func_to_host_pathlist_result=`echo "$func_to_host_pathlist_tmp2" |\
-              $SED -e "$lt_sed_naive_backslashify"`
-            ;;
-          * )
-            # unfortunately, winepath doesn't convert pathlists
-            func_to_host_pathlist_result=""
-            func_to_host_pathlist_oldIFS=$IFS
-            IFS=:
-            for func_to_host_pathlist_f in $func_to_host_pathlist_tmp1 ; do
-              IFS=$func_to_host_pathlist_oldIFS
-              if test -n "$func_to_host_pathlist_f" ; then
-                func_to_host_path "$func_to_host_pathlist_f"
-                if test -n "$func_to_host_path_result" ; then
-                  if test -z "$func_to_host_pathlist_result" ; then
-                    func_to_host_pathlist_result="$func_to_host_path_result"
-                  else
-                    func_to_host_pathlist_result="$func_to_host_pathlist_result;$func_to_host_path_result"
-                  fi
-                fi
-              fi
-              IFS=:
-            done
-            IFS=$func_to_host_pathlist_oldIFS
-            ;;
-        esac
-        if test -z "$func_to_host_pathlist_result" ; then
-          func_error "Could not determine the host path(s) corresponding to"
-          func_error "  '$1'"
-          func_error "Continuing, but uninstalled executables may not work."
-          # Fallback. This may break if $1 contains DOS-style drive
-          # specifications. The fix is not to complicate the expression
-          # below, but for the user to provide a working wine installation
-          # with winepath so that path translation in the cross-to-mingw
-          # case works properly.
-          lt_replace_pathsep_nix_to_dos="s|:|;|g"
-          func_to_host_pathlist_result=`echo "$func_to_host_pathlist_tmp1" |\
-            $SED -e "$lt_replace_pathsep_nix_to_dos"`
-        fi
-        # Now, add the leading and trailing path separators back
-        case "$1" in
-          :* ) func_to_host_pathlist_result=";$func_to_host_pathlist_result"
-            ;;
-        esac
-        case "$1" in
-          *: ) func_to_host_pathlist_result="$func_to_host_pathlist_result;"
-            ;;
-        esac
-        ;;
-    esac
-  fi
-}
-# end: func_to_host_pathlist
 
 # func_emit_cwrapperexe_src
 # emit the source code for a wrapper executable on stdout
@@ -3134,38 +5515,30 @@ func_emit_cwrapperexe_src ()
 	cat <<EOF
 
 /* $cwrappersource - temporary wrapper executable for $objdir/$outputname
-   Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION
+   Generated by $PROGRAM (GNU $PACKAGE) $VERSION
 
    The $output program cannot be directly executed until all the libtool
    libraries that it depends on are installed.
 
    This wrapper executable should never be moved out of the build directory.
    If it is, it will not operate correctly.
-
-   Currently, it simply execs the wrapper *script* "$SHELL $output",
-   but could eventually absorb all of the scripts functionality and
-   exec $objdir/$outputname directly.
 */
 EOF
 	    cat <<"EOF"
+#ifdef _MSC_VER
+# define _CRT_SECURE_NO_DEPRECATE 1
+#endif
 #include <stdio.h>
 #include <stdlib.h>
 #ifdef _MSC_VER
 # include <direct.h>
 # include <process.h>
 # include <io.h>
-# define setmode _setmode
 #else
 # include <unistd.h>
 # include <stdint.h>
 # ifdef __CYGWIN__
 #  include <io.h>
-#  define HAVE_SETENV
-#  ifdef __STRICT_ANSI__
-char *realpath (const char *, char *);
-int putenv (char *);
-int setenv (const char *, const char *, int);
-#  endif
 # endif
 #endif
 #include <malloc.h>
@@ -3177,9 +5550,45 @@ int setenv (const char *, const char *, int);
 #include <fcntl.h>
 #include <sys/stat.h>
 
-#if defined(PATH_MAX)
+#define STREQ(s1, s2) (strcmp ((s1), (s2)) == 0)
+
+/* declarations of non-ANSI functions */
+#if defined __MINGW32__
+# ifdef __STRICT_ANSI__
+int _putenv (const char *);
+# endif
+#elif defined __CYGWIN__
+# ifdef __STRICT_ANSI__
+char *realpath (const char *, char *);
+int putenv (char *);
+int setenv (const char *, const char *, int);
+# endif
+/* #elif defined other_platform || defined ... */
+#endif
+
+/* portability defines, excluding path handling macros */
+#if defined _MSC_VER
+# define setmode _setmode
+# define stat    _stat
+# define chmod   _chmod
+# define getcwd  _getcwd
+# define putenv  _putenv
+# define S_IXUSR _S_IEXEC
+#elif defined __MINGW32__
+# define setmode _setmode
+# define stat    _stat
+# define chmod   _chmod
+# define getcwd  _getcwd
+# define putenv  _putenv
+#elif defined __CYGWIN__
+# define HAVE_SETENV
+# define FOPEN_WB "wb"
+/* #elif defined other platforms ... */
+#endif
+
+#if defined PATH_MAX
 # define LT_PATHMAX PATH_MAX
-#elif defined(MAXPATHLEN)
+#elif defined MAXPATHLEN
 # define LT_PATHMAX MAXPATHLEN
 #else
 # define LT_PATHMAX 1024
@@ -3192,21 +5601,14 @@ int setenv (const char *, const char *, int);
 # define S_IXGRP 0
 #endif
 
-#ifdef _MSC_VER
-# define S_IXUSR _S_IEXEC
-# define stat _stat
-# ifndef _INTPTR_T_DEFINED
-#  define intptr_t int
-# endif
-#endif
-
+/* path handling portability macros */
 #ifndef DIR_SEPARATOR
 # define DIR_SEPARATOR '/'
 # define PATH_SEPARATOR ':'
 #endif
 
-#if defined (_WIN32) || defined (__MSDOS__) || defined (__DJGPP__) || \
-  defined (__OS2__)
+#if defined _WIN32 || defined __MSDOS__ || defined __DJGPP__ || \
+  defined __OS2__
 # define HAVE_DOS_BASED_FILE_SYSTEM
 # define FOPEN_WB "wb"
 # ifndef DIR_SEPARATOR_2
@@ -3230,10 +5632,6 @@ int setenv (const char *, const char *, int);
 # define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR_2)
 #endif /* PATH_SEPARATOR_2 */
 
-#ifdef __CYGWIN__
-# define FOPEN_WB "wb"
-#endif
-
 #ifndef FOPEN_WB
 # define FOPEN_WB "w"
 #endif
@@ -3243,25 +5641,16 @@ int setenv (const char *, const char *, int);
 
 #define XMALLOC(type, num)      ((type *) xmalloc ((num) * sizeof(type)))
 #define XFREE(stale) do { \
-  if (stale) { free ((void *) stale); stale = 0; } \
+  if (stale) { free (stale); stale = 0; } \
 } while (0)
 
-#undef LTWRAPPER_DEBUGPRINTF
-#if defined DEBUGWRAPPER
-# define LTWRAPPER_DEBUGPRINTF(args) ltwrapper_debugprintf args
-static void
-ltwrapper_debugprintf (const char *fmt, ...)
-{
-    va_list args;
-    va_start (args, fmt);
-    (void) vfprintf (stderr, fmt, args);
-    va_end (args);
-}
+#if defined LT_DEBUGWRAPPER
+static int lt_debug = 1;
 #else
-# define LTWRAPPER_DEBUGPRINTF(args)
+static int lt_debug = 0;
 #endif
 
-const char *program_name = NULL;
+const char *program_name = "libtool-wrapper"; /* in case xstrdup fails */
 
 void *xmalloc (size_t num);
 char *xstrdup (const char *string);
@@ -3271,41 +5660,32 @@ char *chase_symlinks (const char *pathspec);
 int make_executable (const char *path);
 int check_executable (const char *path);
 char *strendzap (char *str, const char *pat);
-void lt_fatal (const char *message, ...);
+void lt_debugprintf (const char *file, int line, const char *fmt, ...);
+void lt_fatal (const char *file, int line, const char *message, ...);
+static const char *nonnull (const char *s);
+static const char *nonempty (const char *s);
 void lt_setenv (const char *name, const char *value);
 char *lt_extend_str (const char *orig_value, const char *add, int to_end);
-void lt_opt_process_env_set (const char *arg);
-void lt_opt_process_env_prepend (const char *arg);
-void lt_opt_process_env_append (const char *arg);
-int lt_split_name_value (const char *arg, char** name, char** value);
 void lt_update_exe_path (const char *name, const char *value);
 void lt_update_lib_path (const char *name, const char *value);
-
-static const char *script_text_part1 =
-EOF
-
-	    func_emit_wrapper_part1 yes |
-	        $SED -e 's/\([\\"]\)/\\\1/g' \
-	             -e 's/^/  "/' -e 's/$/\\n"/'
-	    echo ";"
-	    cat <<EOF
-
-static const char *script_text_part2 =
+char **prepare_spawn (char **argv);
+void lt_dump_script (FILE *f);
 EOF
-	    func_emit_wrapper_part2 yes |
-	        $SED -e 's/\([\\"]\)/\\\1/g' \
-	             -e 's/^/  "/' -e 's/$/\\n"/'
-	    echo ";"
 
 	    cat <<EOF
-const char * MAGIC_EXE = "$magic_exe";
+#if __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 5)
+# define externally_visible volatile
+#else
+# define externally_visible __attribute__((externally_visible)) volatile
+#endif
+externally_visible const char * MAGIC_EXE = "$magic_exe";
 const char * LIB_PATH_VARNAME = "$shlibpath_var";
 EOF
 
-	    if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then
-              func_to_host_pathlist "$temp_rpath"
+	    if test yes = "$shlibpath_overrides_runpath" && test -n "$shlibpath_var" && test -n "$temp_rpath"; then
+              func_to_host_path "$temp_rpath"
 	      cat <<EOF
-const char * LIB_PATH_VALUE   = "$func_to_host_pathlist_result";
+const char * LIB_PATH_VALUE   = "$func_to_host_path_result";
 EOF
 	    else
 	      cat <<"EOF"
@@ -3314,10 +5694,10 @@ EOF
 	    fi
 
 	    if test -n "$dllsearchpath"; then
-              func_to_host_pathlist "$dllsearchpath:"
+              func_to_host_path "$dllsearchpath:"
 	      cat <<EOF
 const char * EXE_PATH_VARNAME = "PATH";
-const char * EXE_PATH_VALUE   = "$func_to_host_pathlist_result";
+const char * EXE_PATH_VALUE   = "$func_to_host_path_result";
 EOF
 	    else
 	      cat <<"EOF"
@@ -3326,7 +5706,7 @@ const char * EXE_PATH_VALUE   = "";
 EOF
 	    fi
 
-	    if test "$fast_install" = yes; then
+	    if test yes = "$fast_install"; then
 	      cat <<EOF
 const char * TARGET_PROGRAM_NAME = "lt-$outputname"; /* hopefully, no .exe */
 EOF
@@ -3340,24 +5720,10 @@ EOF
 	    cat <<"EOF"
 
 #define LTWRAPPER_OPTION_PREFIX         "--lt-"
-#define LTWRAPPER_OPTION_PREFIX_LENGTH  5
 
-static const size_t opt_prefix_len         = LTWRAPPER_OPTION_PREFIX_LENGTH;
 static const char *ltwrapper_option_prefix = LTWRAPPER_OPTION_PREFIX;
-
 static const char *dumpscript_opt       = LTWRAPPER_OPTION_PREFIX "dump-script";
-
-static const size_t env_set_opt_len     = LTWRAPPER_OPTION_PREFIX_LENGTH + 7;
-static const char *env_set_opt          = LTWRAPPER_OPTION_PREFIX "env-set";
-  /* argument is putenv-style "foo=bar", value of foo is set to bar */
-
-static const size_t env_prepend_opt_len = LTWRAPPER_OPTION_PREFIX_LENGTH + 11;
-static const char *env_prepend_opt      = LTWRAPPER_OPTION_PREFIX "env-prepend";
-  /* argument is putenv-style "foo=bar", new value of foo is bar${foo} */
-
-static const size_t env_append_opt_len  = LTWRAPPER_OPTION_PREFIX_LENGTH + 10;
-static const char *env_append_opt       = LTWRAPPER_OPTION_PREFIX "env-append";
-  /* argument is putenv-style "foo=bar", new value of foo is ${foo}bar */
+static const char *debug_opt            = LTWRAPPER_OPTION_PREFIX "debug";
 
 int
 main (int argc, char *argv[])
@@ -3369,21 +5735,24 @@ main (int argc, char *argv[])
   char *actual_cwrapper_name;
   char *target_name;
   char *lt_argv_zero;
-  intptr_t rval = 127;
+  int rval = 127;
 
   int i;
 
   program_name = (char *) xstrdup (base_name (argv[0]));
-  LTWRAPPER_DEBUGPRINTF (("(main) argv[0]      : %s\n", argv[0]));
-  LTWRAPPER_DEBUGPRINTF (("(main) program_name : %s\n", program_name));
+  newargz = XMALLOC (char *, (size_t) argc + 1);
 
-  /* very simple arg parsing; don't want to rely on getopt */
+  /* very simple arg parsing; don't want to rely on getopt
+   * also, copy all non cwrapper options to newargz, except
+   * argz[0], which is handled differently
+   */
+  newargc=0;
   for (i = 1; i < argc; i++)
     {
-      if (strcmp (argv[i], dumpscript_opt) == 0)
+      if (STREQ (argv[i], dumpscript_opt))
 	{
 EOF
-	    case "$host" in
+	    case $host in
 	      *mingw* | *cygwin* )
 		# make stdout use "unix" line endings
 		echo "          setmode(1,_O_BINARY);"
@@ -3391,25 +5760,57 @@ EOF
 	      esac
 
 	    cat <<"EOF"
-	  printf ("%s", script_text_part1);
-	  printf ("%s", script_text_part2);
+	  lt_dump_script (stdout);
 	  return 0;
 	}
+      if (STREQ (argv[i], debug_opt))
+	{
+          lt_debug = 1;
+          continue;
+	}
+      if (STREQ (argv[i], ltwrapper_option_prefix))
+        {
+          /* however, if there is an option in the LTWRAPPER_OPTION_PREFIX
+             namespace, but it is not one of the ones we know about and
+             have already dealt with, above (inluding dump-script), then
+             report an error. Otherwise, targets might begin to believe
+             they are allowed to use options in the LTWRAPPER_OPTION_PREFIX
+             namespace. The first time any user complains about this, we'll
+             need to make LTWRAPPER_OPTION_PREFIX a configure-time option
+             or a configure.ac-settable value.
+           */
+          lt_fatal (__FILE__, __LINE__,
+		    "unrecognized %s option: '%s'",
+                    ltwrapper_option_prefix, argv[i]);
+        }
+      /* otherwise ... */
+      newargz[++newargc] = xstrdup (argv[i]);
     }
+  newargz[++newargc] = NULL;
+
+EOF
+	    cat <<EOF
+  /* The GNU banner must be the first non-error debug message */
+  lt_debugprintf (__FILE__, __LINE__, "libtool wrapper (GNU $PACKAGE) $VERSION\n");
+EOF
+	    cat <<"EOF"
+  lt_debugprintf (__FILE__, __LINE__, "(main) argv[0]: %s\n", argv[0]);
+  lt_debugprintf (__FILE__, __LINE__, "(main) program_name: %s\n", program_name);
 
-  newargz = XMALLOC (char *, argc + 1);
   tmp_pathspec = find_executable (argv[0]);
   if (tmp_pathspec == NULL)
-    lt_fatal ("Couldn't find %s", argv[0]);
-  LTWRAPPER_DEBUGPRINTF (("(main) found exe (before symlink chase) at : %s\n",
-			  tmp_pathspec));
+    lt_fatal (__FILE__, __LINE__, "couldn't find %s", argv[0]);
+  lt_debugprintf (__FILE__, __LINE__,
+                  "(main) found exe (before symlink chase) at: %s\n",
+		  tmp_pathspec);
 
   actual_cwrapper_path = chase_symlinks (tmp_pathspec);
-  LTWRAPPER_DEBUGPRINTF (("(main) found exe (after symlink chase) at : %s\n",
-			  actual_cwrapper_path));
+  lt_debugprintf (__FILE__, __LINE__,
+                  "(main) found exe (after symlink chase) at: %s\n",
+		  actual_cwrapper_path);
   XFREE (tmp_pathspec);
 
-  actual_cwrapper_name = xstrdup( base_name (actual_cwrapper_path));
+  actual_cwrapper_name = xstrdup (base_name (actual_cwrapper_path));
   strendzap (actual_cwrapper_path, actual_cwrapper_name);
 
   /* wrapper name transforms */
@@ -3427,8 +5828,9 @@ EOF
   target_name = tmp_pathspec;
   tmp_pathspec = 0;
 
-  LTWRAPPER_DEBUGPRINTF (("(main) libtool target name: %s\n",
-			  target_name));
+  lt_debugprintf (__FILE__, __LINE__,
+		  "(main) libtool target name: %s\n",
+		  target_name);
 EOF
 
 	    cat <<EOF
@@ -3478,80 +5880,19 @@ EOF
 
   lt_setenv ("BIN_SH", "xpg4"); /* for Tru64 */
   lt_setenv ("DUALCASE", "1");  /* for MSK sh */
-  lt_update_lib_path (LIB_PATH_VARNAME, LIB_PATH_VALUE);
+  /* Update the DLL searchpath.  EXE_PATH_VALUE ($dllsearchpath) must
+     be prepended before (that is, appear after) LIB_PATH_VALUE ($temp_rpath)
+     because on Windows, both *_VARNAMEs are PATH but uninstalled
+     libraries must come first. */
   lt_update_exe_path (EXE_PATH_VARNAME, EXE_PATH_VALUE);
+  lt_update_lib_path (LIB_PATH_VARNAME, LIB_PATH_VALUE);
 
-  newargc=0;
-  for (i = 1; i < argc; i++)
-    {
-      if (strncmp (argv[i], env_set_opt, env_set_opt_len) == 0)
-        {
-          if (argv[i][env_set_opt_len] == '=')
-            {
-              const char *p = argv[i] + env_set_opt_len + 1;
-              lt_opt_process_env_set (p);
-            }
-          else if (argv[i][env_set_opt_len] == '\0' && i + 1 < argc)
-            {
-              lt_opt_process_env_set (argv[++i]); /* don't copy */
-            }
-          else
-            lt_fatal ("%s missing required argument", env_set_opt);
-          continue;
-        }
-      if (strncmp (argv[i], env_prepend_opt, env_prepend_opt_len) == 0)
-        {
-          if (argv[i][env_prepend_opt_len] == '=')
-            {
-              const char *p = argv[i] + env_prepend_opt_len + 1;
-              lt_opt_process_env_prepend (p);
-            }
-          else if (argv[i][env_prepend_opt_len] == '\0' && i + 1 < argc)
-            {
-              lt_opt_process_env_prepend (argv[++i]); /* don't copy */
-            }
-          else
-            lt_fatal ("%s missing required argument", env_prepend_opt);
-          continue;
-        }
-      if (strncmp (argv[i], env_append_opt, env_append_opt_len) == 0)
-        {
-          if (argv[i][env_append_opt_len] == '=')
-            {
-              const char *p = argv[i] + env_append_opt_len + 1;
-              lt_opt_process_env_append (p);
-            }
-          else if (argv[i][env_append_opt_len] == '\0' && i + 1 < argc)
-            {
-              lt_opt_process_env_append (argv[++i]); /* don't copy */
-            }
-          else
-            lt_fatal ("%s missing required argument", env_append_opt);
-          continue;
-        }
-      if (strncmp (argv[i], ltwrapper_option_prefix, opt_prefix_len) == 0)
-        {
-          /* however, if there is an option in the LTWRAPPER_OPTION_PREFIX
-             namespace, but it is not one of the ones we know about and
-             have already dealt with, above (inluding dump-script), then
-             report an error. Otherwise, targets might begin to believe
-             they are allowed to use options in the LTWRAPPER_OPTION_PREFIX
-             namespace. The first time any user complains about this, we'll
-             need to make LTWRAPPER_OPTION_PREFIX a configure-time option
-             or a configure.ac-settable value.
-           */
-          lt_fatal ("Unrecognized option in %s namespace: '%s'",
-                    ltwrapper_option_prefix, argv[i]);
-        }
-      /* otherwise ... */
-      newargz[++newargc] = xstrdup (argv[i]);
-    }
-  newargz[++newargc] = NULL;
-
-  LTWRAPPER_DEBUGPRINTF     (("(main) lt_argv_zero : %s\n", (lt_argv_zero ? lt_argv_zero : "<NULL>")));
+  lt_debugprintf (__FILE__, __LINE__, "(main) lt_argv_zero: %s\n",
+		  nonnull (lt_argv_zero));
   for (i = 0; i < newargc; i++)
     {
-      LTWRAPPER_DEBUGPRINTF (("(main) newargz[%d]   : %s\n", i, (newargz[i] ? newargz[i] : "<NULL>")));
+      lt_debugprintf (__FILE__, __LINE__, "(main) newargz[%d]: %s\n",
+		      i, nonnull (newargz[i]));
     }
 
 EOF
@@ -3560,11 +5901,14 @@ EOF
 	      mingw*)
 		cat <<"EOF"
   /* execv doesn't actually work on mingw as expected on unix */
-  rval = _spawnv (_P_WAIT, lt_argv_zero, (const char * const *) newargz);
+  newargz = prepare_spawn (newargz);
+  rval = (int) _spawnv (_P_WAIT, lt_argv_zero, (const char * const *) newargz);
   if (rval == -1)
     {
       /* failed to start process */
-      LTWRAPPER_DEBUGPRINTF (("(main) failed to launch target \"%s\": errno = %d\n", lt_argv_zero, errno));
+      lt_debugprintf (__FILE__, __LINE__,
+		      "(main) failed to launch target \"%s\": %s\n",
+		      lt_argv_zero, nonnull (strerror (errno)));
       return 127;
     }
   return rval;
@@ -3586,7 +5930,7 @@ xmalloc (size_t num)
 {
   void *p = (void *) malloc (num);
   if (!p)
-    lt_fatal ("Memory exhausted");
+    lt_fatal (__FILE__, __LINE__, "memory exhausted");
 
   return p;
 }
@@ -3603,7 +5947,7 @@ base_name (const char *name)
 {
   const char *base;
 
-#if defined (HAVE_DOS_BASED_FILE_SYSTEM)
+#if defined HAVE_DOS_BASED_FILE_SYSTEM
   /* Skip over the disk name in MSDOS pathnames. */
   if (isalpha ((unsigned char) name[0]) && name[1] == ':')
     name += 2;
@@ -3620,8 +5964,8 @@ check_executable (const char *path)
 {
   struct stat st;
 
-  LTWRAPPER_DEBUGPRINTF (("(check_executable)  : %s\n",
-			  path ? (*path ? path : "EMPTY!") : "NULL!"));
+  lt_debugprintf (__FILE__, __LINE__, "(check_executable): %s\n",
+                  nonempty (path));
   if ((!path) || (!*path))
     return 0;
 
@@ -3638,8 +5982,8 @@ make_executable (const char *path)
   int rval = 0;
   struct stat st;
 
-  LTWRAPPER_DEBUGPRINTF (("(make_executable)   : %s\n",
-			  path ? (*path ? path : "EMPTY!") : "NULL!"));
+  lt_debugprintf (__FILE__, __LINE__, "(make_executable): %s\n",
+                  nonempty (path));
   if ((!path) || (!*path))
     return 0;
 
@@ -3662,17 +6006,17 @@ find_executable (const char *wrapper)
   const char *p_next;
   /* static buffer for getcwd */
   char tmp[LT_PATHMAX + 1];
-  int tmp_len;
+  size_t tmp_len;
   char *concat_name;
 
-  LTWRAPPER_DEBUGPRINTF (("(find_executable)   : %s\n",
-			  wrapper ? (*wrapper ? wrapper : "EMPTY!") : "NULL!"));
+  lt_debugprintf (__FILE__, __LINE__, "(find_executable): %s\n",
+                  nonempty (wrapper));
 
   if ((wrapper == NULL) || (*wrapper == '\0'))
     return NULL;
 
   /* Absolute path? */
-#if defined (HAVE_DOS_BASED_FILE_SYSTEM)
+#if defined HAVE_DOS_BASED_FILE_SYSTEM
   if (isalpha ((unsigned char) wrapper[0]) && wrapper[1] == ':')
     {
       concat_name = xstrdup (wrapper);
@@ -3690,7 +6034,7 @@ find_executable (const char *wrapper)
 	    return concat_name;
 	  XFREE (concat_name);
 	}
-#if defined (HAVE_DOS_BASED_FILE_SYSTEM)
+#if defined HAVE_DOS_BASED_FILE_SYSTEM
     }
 #endif
 
@@ -3713,13 +6057,14 @@ find_executable (const char *wrapper)
 	      for (q = p; *q; q++)
 		if (IS_PATH_SEPARATOR (*q))
 		  break;
-	      p_len = q - p;
+	      p_len = (size_t) (q - p);
 	      p_next = (*q == '\0' ? q : q + 1);
 	      if (p_len == 0)
 		{
 		  /* empty path: current directory */
 		  if (getcwd (tmp, LT_PATHMAX) == NULL)
-		    lt_fatal ("getcwd failed");
+		    lt_fatal (__FILE__, __LINE__, "getcwd failed: %s",
+                              nonnull (strerror (errno)));
 		  tmp_len = strlen (tmp);
 		  concat_name =
 		    XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1);
@@ -3744,7 +6089,8 @@ find_executable (const char *wrapper)
     }
   /* Relative path | not found in path: prepend cwd */
   if (getcwd (tmp, LT_PATHMAX) == NULL)
-    lt_fatal ("getcwd failed");
+    lt_fatal (__FILE__, __LINE__, "getcwd failed: %s",
+              nonnull (strerror (errno)));
   tmp_len = strlen (tmp);
   concat_name = XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1);
   memcpy (concat_name, tmp, tmp_len);
@@ -3770,8 +6116,9 @@ chase_symlinks (const char *pathspec)
   int has_symlinks = 0;
   while (strlen (tmp_pathspec) && !has_symlinks)
     {
-      LTWRAPPER_DEBUGPRINTF (("checking path component for symlinks: %s\n",
-			      tmp_pathspec));
+      lt_debugprintf (__FILE__, __LINE__,
+		      "checking path component for symlinks: %s\n",
+		      tmp_pathspec);
       if (lstat (tmp_pathspec, &s) == 0)
 	{
 	  if (S_ISLNK (s.st_mode) != 0)
@@ -3793,8 +6140,9 @@ chase_symlinks (const char *pathspec)
 	}
       else
 	{
-	  char *errstr = strerror (errno);
-	  lt_fatal ("Error accessing file %s (%s)", tmp_pathspec, errstr);
+	  lt_fatal (__FILE__, __LINE__,
+		    "error accessing file \"%s\": %s",
+		    tmp_pathspec, nonnull (strerror (errno)));
 	}
     }
   XFREE (tmp_pathspec);
@@ -3807,7 +6155,8 @@ chase_symlinks (const char *pathspec)
   tmp_pathspec = realpath (pathspec, buf);
   if (tmp_pathspec == 0)
     {
-      lt_fatal ("Could not follow symlinks for %s", pathspec);
+      lt_fatal (__FILE__, __LINE__,
+		"could not follow symlinks for %s", pathspec);
     }
   return xstrdup (tmp_pathspec);
 #endif
@@ -3827,17 +6176,31 @@ strendzap (char *str, const char *pat)
   if (patlen <= len)
     {
       str += len - patlen;
-      if (strcmp (str, pat) == 0)
+      if (STREQ (str, pat))
 	*str = '\0';
     }
   return str;
 }
 
+void
+lt_debugprintf (const char *file, int line, const char *fmt, ...)
+{
+  va_list args;
+  if (lt_debug)
+    {
+      (void) fprintf (stderr, "%s:%s:%d: ", program_name, file, line);
+      va_start (args, fmt);
+      (void) vfprintf (stderr, fmt, args);
+      va_end (args);
+    }
+}
+
 static void
-lt_error_core (int exit_status, const char *mode,
+lt_error_core (int exit_status, const char *file,
+	       int line, const char *mode,
 	       const char *message, va_list ap)
 {
-  fprintf (stderr, "%s: %s: ", program_name, mode);
+  fprintf (stderr, "%s:%s:%d: %s: ", program_name, file, line, mode);
   vfprintf (stderr, message, ap);
   fprintf (stderr, ".\n");
 
@@ -3846,27 +6209,39 @@ lt_error_core (int exit_status, const char *mode,
 }
 
 void
-lt_fatal (const char *message, ...)
+lt_fatal (const char *file, int line, const char *message, ...)
 {
   va_list ap;
   va_start (ap, message);
-  lt_error_core (EXIT_FAILURE, "FATAL", message, ap);
+  lt_error_core (EXIT_FAILURE, file, line, "FATAL", message, ap);
   va_end (ap);
 }
 
+static const char *
+nonnull (const char *s)
+{
+  return s ? s : "(null)";
+}
+
+static const char *
+nonempty (const char *s)
+{
+  return (s && !*s) ? "(empty)" : nonnull (s);
+}
+
 void
 lt_setenv (const char *name, const char *value)
 {
-  LTWRAPPER_DEBUGPRINTF (("(lt_setenv) setting '%s' to '%s'\n",
-                          (name ? name : "<NULL>"),
-                          (value ? value : "<NULL>")));
+  lt_debugprintf (__FILE__, __LINE__,
+		  "(lt_setenv) setting '%s' to '%s'\n",
+                  nonnull (name), nonnull (value));
   {
 #ifdef HAVE_SETENV
     /* always make a copy, for consistency with !HAVE_SETENV */
     char *str = xstrdup (value);
     setenv (name, str, 1);
 #else
-    int len = strlen (name) + 1 + strlen (value) + 1;
+    size_t len = strlen (name) + 1 + strlen (value) + 1;
     char *str = XMALLOC (char, len);
     sprintf (str, "%s=%s", name, value);
     if (putenv (str) != EXIT_SUCCESS)
@@ -3877,131 +6252,48 @@ lt_setenv (const char *name, const char *value)
   }
 }
 
-char *
-lt_extend_str (const char *orig_value, const char *add, int to_end)
-{
-  char *new_value;
-  if (orig_value && *orig_value)
-    {
-      int orig_value_len = strlen (orig_value);
-      int add_len = strlen (add);
-      new_value = XMALLOC (char, add_len + orig_value_len + 1);
-      if (to_end)
-        {
-          strcpy (new_value, orig_value);
-          strcpy (new_value + orig_value_len, add);
-        }
-      else
-        {
-          strcpy (new_value, add);
-          strcpy (new_value + add_len, orig_value);
-        }
-    }
-  else
-    {
-      new_value = xstrdup (add);
-    }
-  return new_value;
-}
-
-int
-lt_split_name_value (const char *arg, char** name, char** value)
-{
-  const char *p;
-  int len;
-  if (!arg || !*arg)
-    return 1;
-
-  p = strchr (arg, (int)'=');
-
-  if (!p)
-    return 1;
-
-  *value = xstrdup (++p);
-
-  len = strlen (arg) - strlen (*value);
-  *name = XMALLOC (char, len);
-  strncpy (*name, arg, len-1);
-  (*name)[len - 1] = '\0';
-
-  return 0;
-}
-
-void
-lt_opt_process_env_set (const char *arg)
-{
-  char *name = NULL;
-  char *value = NULL;
-
-  if (lt_split_name_value (arg, &name, &value) != 0)
-    {
-      XFREE (name);
-      XFREE (value);
-      lt_fatal ("bad argument for %s: '%s'", env_set_opt, arg);
-    }
-
-  lt_setenv (name, value);
-  XFREE (name);
-  XFREE (value);
-}
-
-void
-lt_opt_process_env_prepend (const char *arg)
+char *
+lt_extend_str (const char *orig_value, const char *add, int to_end)
 {
-  char *name = NULL;
-  char *value = NULL;
-  char *new_value = NULL;
-
-  if (lt_split_name_value (arg, &name, &value) != 0)
+  char *new_value;
+  if (orig_value && *orig_value)
     {
-      XFREE (name);
-      XFREE (value);
-      lt_fatal ("bad argument for %s: '%s'", env_prepend_opt, arg);
+      size_t orig_value_len = strlen (orig_value);
+      size_t add_len = strlen (add);
+      new_value = XMALLOC (char, add_len + orig_value_len + 1);
+      if (to_end)
+        {
+          strcpy (new_value, orig_value);
+          strcpy (new_value + orig_value_len, add);
+        }
+      else
+        {
+          strcpy (new_value, add);
+          strcpy (new_value + add_len, orig_value);
+        }
     }
-
-  new_value = lt_extend_str (getenv (name), value, 0);
-  lt_setenv (name, new_value);
-  XFREE (new_value);
-  XFREE (name);
-  XFREE (value);
-}
-
-void
-lt_opt_process_env_append (const char *arg)
-{
-  char *name = NULL;
-  char *value = NULL;
-  char *new_value = NULL;
-
-  if (lt_split_name_value (arg, &name, &value) != 0)
+  else
     {
-      XFREE (name);
-      XFREE (value);
-      lt_fatal ("bad argument for %s: '%s'", env_append_opt, arg);
+      new_value = xstrdup (add);
     }
-
-  new_value = lt_extend_str (getenv (name), value, 1);
-  lt_setenv (name, new_value);
-  XFREE (new_value);
-  XFREE (name);
-  XFREE (value);
+  return new_value;
 }
 
 void
 lt_update_exe_path (const char *name, const char *value)
 {
-  LTWRAPPER_DEBUGPRINTF (("(lt_update_exe_path) modifying '%s' by prepending '%s'\n",
-                          (name ? name : "<NULL>"),
-                          (value ? value : "<NULL>")));
+  lt_debugprintf (__FILE__, __LINE__,
+		  "(lt_update_exe_path) modifying '%s' by prepending '%s'\n",
+                  nonnull (name), nonnull (value));
 
   if (name && *name && value && *value)
     {
       char *new_value = lt_extend_str (getenv (name), value, 0);
       /* some systems can't cope with a ':'-terminated path #' */
-      int len = strlen (new_value);
-      while (((len = strlen (new_value)) > 0) && IS_PATH_SEPARATOR (new_value[len-1]))
+      size_t len = strlen (new_value);
+      while ((len > 0) && IS_PATH_SEPARATOR (new_value[len-1]))
         {
-          new_value[len-1] = '\0';
+          new_value[--len] = '\0';
         }
       lt_setenv (name, new_value);
       XFREE (new_value);
@@ -4011,9 +6303,9 @@ lt_update_exe_path (const char *name, const char *value)
 void
 lt_update_lib_path (const char *name, const char *value)
 {
-  LTWRAPPER_DEBUGPRINTF (("(lt_update_lib_path) modifying '%s' by prepending '%s'\n",
-                          (name ? name : "<NULL>"),
-                          (value ? value : "<NULL>")));
+  lt_debugprintf (__FILE__, __LINE__,
+		  "(lt_update_lib_path) modifying '%s' by prepending '%s'\n",
+                  nonnull (name), nonnull (value));
 
   if (name && *name && value && *value)
     {
@@ -4023,25 +6315,192 @@ lt_update_lib_path (const char *name, const char *value)
     }
 }
 
+EOF
+	    case $host_os in
+	      mingw*)
+		cat <<"EOF"
+
+/* Prepares an argument vector before calling spawn().
+   Note that spawn() does not by itself call the command interpreter
+     (getenv ("COMSPEC") != NULL ? getenv ("COMSPEC") :
+      ({ OSVERSIONINFO v; v.dwOSVersionInfoSize = sizeof(OSVERSIONINFO);
+         GetVersionEx(&v);
+         v.dwPlatformId == VER_PLATFORM_WIN32_NT;
+      }) ? "cmd.exe" : "command.com").
+   Instead it simply concatenates the arguments, separated by ' ', and calls
+   CreateProcess().  We must quote the arguments since Win32 CreateProcess()
+   interprets characters like ' ', '\t', '\\', '"' (but not '<' and '>') in a
+   special way:
+   - Space and tab are interpreted as delimiters. They are not treated as
+     delimiters if they are surrounded by double quotes: "...".
+   - Unescaped double quotes are removed from the input. Their only effect is
+     that within double quotes, space and tab are treated like normal
+     characters.
+   - Backslashes not followed by double quotes are not special.
+   - But 2*n+1 backslashes followed by a double quote become
+     n backslashes followed by a double quote (n >= 0):
+       \" -> "
+       \\\" -> \"
+       \\\\\" -> \\"
+ */
+#define SHELL_SPECIAL_CHARS "\"\\ \001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037"
+#define SHELL_SPACE_CHARS " \001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037"
+char **
+prepare_spawn (char **argv)
+{
+  size_t argc;
+  char **new_argv;
+  size_t i;
+
+  /* Count number of arguments.  */
+  for (argc = 0; argv[argc] != NULL; argc++)
+    ;
+
+  /* Allocate new argument vector.  */
+  new_argv = XMALLOC (char *, argc + 1);
+
+  /* Put quoted arguments into the new argument vector.  */
+  for (i = 0; i < argc; i++)
+    {
+      const char *string = argv[i];
+
+      if (string[0] == '\0')
+	new_argv[i] = xstrdup ("\"\"");
+      else if (strpbrk (string, SHELL_SPECIAL_CHARS) != NULL)
+	{
+	  int quote_around = (strpbrk (string, SHELL_SPACE_CHARS) != NULL);
+	  size_t length;
+	  unsigned int backslashes;
+	  const char *s;
+	  char *quoted_string;
+	  char *p;
+
+	  length = 0;
+	  backslashes = 0;
+	  if (quote_around)
+	    length++;
+	  for (s = string; *s != '\0'; s++)
+	    {
+	      char c = *s;
+	      if (c == '"')
+		length += backslashes + 1;
+	      length++;
+	      if (c == '\\')
+		backslashes++;
+	      else
+		backslashes = 0;
+	    }
+	  if (quote_around)
+	    length += backslashes + 1;
+
+	  quoted_string = XMALLOC (char, length + 1);
+
+	  p = quoted_string;
+	  backslashes = 0;
+	  if (quote_around)
+	    *p++ = '"';
+	  for (s = string; *s != '\0'; s++)
+	    {
+	      char c = *s;
+	      if (c == '"')
+		{
+		  unsigned int j;
+		  for (j = backslashes + 1; j > 0; j--)
+		    *p++ = '\\';
+		}
+	      *p++ = c;
+	      if (c == '\\')
+		backslashes++;
+	      else
+		backslashes = 0;
+	    }
+	  if (quote_around)
+	    {
+	      unsigned int j;
+	      for (j = backslashes; j > 0; j--)
+		*p++ = '\\';
+	      *p++ = '"';
+	    }
+	  *p = '\0';
+
+	  new_argv[i] = quoted_string;
+	}
+      else
+	new_argv[i] = (char *) string;
+    }
+  new_argv[argc] = NULL;
 
+  return new_argv;
+}
+EOF
+		;;
+	    esac
+
+            cat <<"EOF"
+void lt_dump_script (FILE* f)
+{
+EOF
+	    func_emit_wrapper yes |
+	      $SED -n -e '
+s/^\(.\{79\}\)\(..*\)/\1\
+\2/
+h
+s/\([\\"]\)/\\\1/g
+s/$/\\n/
+s/\([^\n]*\).*/  fputs ("\1", f);/p
+g
+D'
+            cat <<"EOF"
+}
 EOF
 }
 # end: func_emit_cwrapperexe_src
 
+# func_win32_import_lib_p ARG
+# True if ARG is an import lib, as indicated by $file_magic_cmd
+func_win32_import_lib_p ()
+{
+    $debug_cmd
+
+    case `eval $file_magic_cmd \"\$1\" 2>/dev/null | $SED -e 10q` in
+    *import*) : ;;
+    *) false ;;
+    esac
+}
+
+# func_suncc_cstd_abi
+# !!ONLY CALL THIS FOR SUN CC AFTER $compile_command IS FULLY EXPANDED!!
+# Several compiler flags select an ABI that is incompatible with the
+# Cstd library. Avoid specifying it if any are in CXXFLAGS.
+func_suncc_cstd_abi ()
+{
+    $debug_cmd
+
+    case " $compile_command " in
+    *" -compat=g "*|*\ -std=c++[0-9][0-9]\ *|*" -library=stdcxx4 "*|*" -library=stlport4 "*)
+      suncc_use_cstd_abi=no
+      ;;
+    *)
+      suncc_use_cstd_abi=yes
+      ;;
+    esac
+}
+
 # func_mode_link arg...
 func_mode_link ()
 {
-    $opt_debug
+    $debug_cmd
+
     case $host in
     *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*)
       # It is impossible to link a dll without this setting, and
       # we shouldn't force the makefile maintainer to figure out
-      # which system we are compiling for in order to pass an extra
+      # what system we are compiling for in order to pass an extra
       # flag for every libtool invocation.
       # allow_undefined=no
 
       # FIXME: Unfortunately, there are problems with the above when trying
-      # to make a dll which has undefined symbols, in which case not
+      # to make a dll that has undefined symbols, in which case not
       # even a static library is built.  For now, we need to specify
       # -no-undefined on the libtool link line when we can be certain
       # that all symbols are satisfied, otherwise we get a static library.
@@ -4072,6 +6531,7 @@ func_mode_link ()
     new_inherited_linker_flags=
 
     avoid_version=no
+    bindir=
     dlfiles=
     dlprefiles=
     dlself=no
@@ -4084,10 +6544,11 @@ func_mode_link ()
     module=no
     no_install=no
     objs=
+    os2dllname=
     non_pic_objects=
     precious_files_regex=
     prefer_static_libs=no
-    preload=no
+    preload=false
     prev=
     prevarg=
     release=
@@ -4099,7 +6560,7 @@ func_mode_link ()
     vinfo=
     vinfo_number=no
     weak_libs=
-    single_module="${wl}-single_module"
+    single_module=$wl-single_module
     func_infer_tag $base_compile
 
     # We need to know -static, to get the right output filenames.
@@ -4107,15 +6568,15 @@ func_mode_link ()
     do
       case $arg in
       -shared)
-	test "$build_libtool_libs" != yes && \
-	  func_fatal_configuration "can not build a shared library"
+	test yes != "$build_libtool_libs" \
+	  && func_fatal_configuration "cannot build a shared library"
 	build_old_libs=no
 	break
 	;;
       -all-static | -static | -static-libtool-libs)
 	case $arg in
 	-all-static)
-	  if test "$build_libtool_libs" = yes && test -z "$link_static_flag"; then
+	  if test yes = "$build_libtool_libs" && test -z "$link_static_flag"; then
 	    func_warning "complete static linking is impossible in this configuration"
 	  fi
 	  if test -n "$link_static_flag"; then
@@ -4148,7 +6609,7 @@ func_mode_link ()
 
     # Go through the arguments, transforming them on the way.
     while test "$#" -gt 0; do
-      arg="$1"
+      arg=$1
       shift
       func_quote_for_eval "$arg"
       qarg=$func_quote_for_eval_unquoted_result
@@ -4164,17 +6625,22 @@ func_mode_link ()
 	esac
 
 	case $prev in
+	bindir)
+	  bindir=$arg
+	  prev=
+	  continue
+	  ;;
 	dlfiles|dlprefiles)
-	  if test "$preload" = no; then
+	  $preload || {
 	    # Add the symbol object into the linking commands.
 	    func_append compile_command " @SYMFILE@"
 	    func_append finalize_command " @SYMFILE@"
-	    preload=yes
-	  fi
+	    preload=:
+	  }
 	  case $arg in
 	  *.la | *.lo) ;;  # We handle these cases below.
 	  force)
-	    if test "$dlself" = no; then
+	    if test no = "$dlself"; then
 	      dlself=needless
 	      export_dynamic=yes
 	    fi
@@ -4182,9 +6648,9 @@ func_mode_link ()
 	    continue
 	    ;;
 	  self)
-	    if test "$prev" = dlprefiles; then
+	    if test dlprefiles = "$prev"; then
 	      dlself=yes
-	    elif test "$prev" = dlfiles && test "$dlopen_self" != yes; then
+	    elif test dlfiles = "$prev" && test yes != "$dlopen_self"; then
 	      dlself=yes
 	    else
 	      dlself=needless
@@ -4194,10 +6660,10 @@ func_mode_link ()
 	    continue
 	    ;;
 	  *)
-	    if test "$prev" = dlfiles; then
-	      dlfiles="$dlfiles $arg"
+	    if test dlfiles = "$prev"; then
+	      func_append dlfiles " $arg"
 	    else
-	      dlprefiles="$dlprefiles $arg"
+	      func_append dlprefiles " $arg"
 	    fi
 	    prev=
 	    continue
@@ -4205,14 +6671,14 @@ func_mode_link ()
 	  esac
 	  ;;
 	expsyms)
-	  export_symbols="$arg"
+	  export_symbols=$arg
 	  test -f "$arg" \
-	    || func_fatal_error "symbol file \`$arg' does not exist"
+	    || func_fatal_error "symbol file '$arg' does not exist"
 	  prev=
 	  continue
 	  ;;
 	expsyms_regex)
-	  export_symbols_regex="$arg"
+	  export_symbols_regex=$arg
 	  prev=
 	  continue
 	  ;;
@@ -4221,7 +6687,7 @@ func_mode_link ()
 	    *-*-darwin*)
 	      case "$deplibs " in
 		*" $qarg.ltframework "*) ;;
-		*) deplibs="$deplibs $qarg.ltframework" # this is fixed later
+		*) func_append deplibs " $qarg.ltframework" # this is fixed later
 		   ;;
 	      esac
 	      ;;
@@ -4230,7 +6696,13 @@ func_mode_link ()
 	  continue
 	  ;;
 	inst_prefix)
-	  inst_prefix_dir="$arg"
+	  inst_prefix_dir=$arg
+	  prev=
+	  continue
+	  ;;
+	mllvm)
+	  # Clang does not use LLVM to link, so we can simply discard any
+	  # '-mllvm $arg' options when doing the link step.
 	  prev=
 	  continue
 	  ;;
@@ -4240,7 +6712,7 @@ func_mode_link ()
 	    moreargs=
 	    for fil in `cat "$save_arg"`
 	    do
-#	      moreargs="$moreargs $fil"
+#	      func_append moreargs " $fil"
 	      arg=$fil
 	      # A libtool-controlled object.
 
@@ -4254,22 +6726,22 @@ func_mode_link ()
 
 		if test -z "$pic_object" ||
 		   test -z "$non_pic_object" ||
-		   test "$pic_object" = none &&
-		   test "$non_pic_object" = none; then
-		  func_fatal_error "cannot find name of object for \`$arg'"
+		   test none = "$pic_object" &&
+		   test none = "$non_pic_object"; then
+		  func_fatal_error "cannot find name of object for '$arg'"
 		fi
 
 		# Extract subdirectory from the argument.
 		func_dirname "$arg" "/" ""
-		xdir="$func_dirname_result"
+		xdir=$func_dirname_result
 
-		if test "$pic_object" != none; then
+		if test none != "$pic_object"; then
 		  # Prepend the subdirectory the object is found in.
-		  pic_object="$xdir$pic_object"
+		  pic_object=$xdir$pic_object
 
-		  if test "$prev" = dlfiles; then
-		    if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then
-		      dlfiles="$dlfiles $pic_object"
+		  if test dlfiles = "$prev"; then
+		    if test yes = "$build_libtool_libs" && test yes = "$dlopen_support"; then
+		      func_append dlfiles " $pic_object"
 		      prev=
 		      continue
 		    else
@@ -4279,31 +6751,31 @@ func_mode_link ()
 		  fi
 
 		  # CHECK ME:  I think I busted this.  -Ossama
-		  if test "$prev" = dlprefiles; then
+		  if test dlprefiles = "$prev"; then
 		    # Preload the old-style object.
-		    dlprefiles="$dlprefiles $pic_object"
+		    func_append dlprefiles " $pic_object"
 		    prev=
 		  fi
 
 		  # A PIC object.
 		  func_append libobjs " $pic_object"
-		  arg="$pic_object"
+		  arg=$pic_object
 		fi
 
 		# Non-PIC object.
-		if test "$non_pic_object" != none; then
+		if test none != "$non_pic_object"; then
 		  # Prepend the subdirectory the object is found in.
-		  non_pic_object="$xdir$non_pic_object"
+		  non_pic_object=$xdir$non_pic_object
 
 		  # A standard non-PIC object
 		  func_append non_pic_objects " $non_pic_object"
-		  if test -z "$pic_object" || test "$pic_object" = none ; then
-		    arg="$non_pic_object"
+		  if test -z "$pic_object" || test none = "$pic_object"; then
+		    arg=$non_pic_object
 		  fi
 		else
 		  # If the PIC object exists, use it instead.
 		  # $xdir was prepended to $pic_object above.
-		  non_pic_object="$pic_object"
+		  non_pic_object=$pic_object
 		  func_append non_pic_objects " $non_pic_object"
 		fi
 	      else
@@ -4311,7 +6783,7 @@ func_mode_link ()
 		if $opt_dry_run; then
 		  # Extract subdirectory from the argument.
 		  func_dirname "$arg" "/" ""
-		  xdir="$func_dirname_result"
+		  xdir=$func_dirname_result
 
 		  func_lo2o "$arg"
 		  pic_object=$xdir$objdir/$func_lo2o_result
@@ -4319,24 +6791,29 @@ func_mode_link ()
 		  func_append libobjs " $pic_object"
 		  func_append non_pic_objects " $non_pic_object"
 	        else
-		  func_fatal_error "\`$arg' is not a valid libtool object"
+		  func_fatal_error "'$arg' is not a valid libtool object"
 		fi
 	      fi
 	    done
 	  else
-	    func_fatal_error "link input file \`$arg' does not exist"
+	    func_fatal_error "link input file '$arg' does not exist"
 	  fi
 	  arg=$save_arg
 	  prev=
 	  continue
 	  ;;
+	os2dllname)
+	  os2dllname=$arg
+	  prev=
+	  continue
+	  ;;
 	precious_regex)
-	  precious_files_regex="$arg"
+	  precious_files_regex=$arg
 	  prev=
 	  continue
 	  ;;
 	release)
-	  release="-$arg"
+	  release=-$arg
 	  prev=
 	  continue
 	  ;;
@@ -4348,48 +6825,48 @@ func_mode_link ()
 	    func_fatal_error "only absolute run-paths are allowed"
 	    ;;
 	  esac
-	  if test "$prev" = rpath; then
+	  if test rpath = "$prev"; then
 	    case "$rpath " in
 	    *" $arg "*) ;;
-	    *) rpath="$rpath $arg" ;;
+	    *) func_append rpath " $arg" ;;
 	    esac
 	  else
 	    case "$xrpath " in
 	    *" $arg "*) ;;
-	    *) xrpath="$xrpath $arg" ;;
+	    *) func_append xrpath " $arg" ;;
 	    esac
 	  fi
 	  prev=
 	  continue
 	  ;;
 	shrext)
-	  shrext_cmds="$arg"
+	  shrext_cmds=$arg
 	  prev=
 	  continue
 	  ;;
 	weak)
-	  weak_libs="$weak_libs $arg"
+	  func_append weak_libs " $arg"
 	  prev=
 	  continue
 	  ;;
 	xcclinker)
-	  linker_flags="$linker_flags $qarg"
-	  compiler_flags="$compiler_flags $qarg"
+	  func_append linker_flags " $qarg"
+	  func_append compiler_flags " $qarg"
 	  prev=
 	  func_append compile_command " $qarg"
 	  func_append finalize_command " $qarg"
 	  continue
 	  ;;
 	xcompiler)
-	  compiler_flags="$compiler_flags $qarg"
+	  func_append compiler_flags " $qarg"
 	  prev=
 	  func_append compile_command " $qarg"
 	  func_append finalize_command " $qarg"
 	  continue
 	  ;;
 	xlinker)
-	  linker_flags="$linker_flags $qarg"
-	  compiler_flags="$compiler_flags $wl$qarg"
+	  func_append linker_flags " $qarg"
+	  func_append compiler_flags " $wl$qarg"
 	  prev=
 	  func_append compile_command " $wl$qarg"
 	  func_append finalize_command " $wl$qarg"
@@ -4403,7 +6880,7 @@ func_mode_link ()
 	esac
       fi # test -n "$prev"
 
-      prevarg="$arg"
+      prevarg=$arg
 
       case $arg in
       -all-static)
@@ -4417,7 +6894,7 @@ func_mode_link ()
 
       -allow-undefined)
 	# FIXME: remove this flag sometime in the future.
-	func_fatal_error "\`-allow-undefined' must not be used because it is the default"
+	func_fatal_error "'-allow-undefined' must not be used because it is the default"
 	;;
 
       -avoid-version)
@@ -4425,6 +6902,11 @@ func_mode_link ()
 	continue
 	;;
 
+      -bindir)
+	prev=bindir
+	continue
+	;;
+
       -dlopen)
 	prev=dlfiles
 	continue
@@ -4444,7 +6926,7 @@ func_mode_link ()
 	if test -n "$export_symbols" || test -n "$export_symbols_regex"; then
 	  func_fatal_error "more than one -exported-symbols argument is not allowed"
 	fi
-	if test "X$arg" = "X-export-symbols"; then
+	if test X-export-symbols = "X$arg"; then
 	  prev=expsyms
 	else
 	  prev=expsyms_regex
@@ -4475,44 +6957,51 @@ func_mode_link ()
 	;;
 
       -L*)
-	func_stripname '-L' '' "$arg"
-	dir=$func_stripname_result
-	if test -z "$dir"; then
+	func_stripname "-L" '' "$arg"
+	if test -z "$func_stripname_result"; then
 	  if test "$#" -gt 0; then
-	    func_fatal_error "require no space between \`-L' and \`$1'"
+	    func_fatal_error "require no space between '-L' and '$1'"
 	  else
-	    func_fatal_error "need path for \`-L' option"
+	    func_fatal_error "need path for '-L' option"
 	  fi
 	fi
+	func_resolve_sysroot "$func_stripname_result"
+	dir=$func_resolve_sysroot_result
 	# We need an absolute path.
 	case $dir in
 	[\\/]* | [A-Za-z]:[\\/]*) ;;
 	*)
 	  absdir=`cd "$dir" && pwd`
 	  test -z "$absdir" && \
-	    func_fatal_error "cannot determine absolute directory name of \`$dir'"
-	  dir="$absdir"
+	    func_fatal_error "cannot determine absolute directory name of '$dir'"
+	  dir=$absdir
 	  ;;
 	esac
 	case "$deplibs " in
-	*" -L$dir "*) ;;
+	*" -L$dir "* | *" $arg "*)
+	  # Will only happen for absolute or sysroot arguments
+	  ;;
 	*)
-	  deplibs="$deplibs -L$dir"
-	  lib_search_path="$lib_search_path $dir"
+	  # Preserve sysroot, but never include relative directories
+	  case $dir in
+	    [\\/]* | [A-Za-z]:[\\/]* | =*) func_append deplibs " $arg" ;;
+	    *) func_append deplibs " -L$dir" ;;
+	  esac
+	  func_append lib_search_path " $dir"
 	  ;;
 	esac
 	case $host in
 	*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*)
-	  testbindir=`$ECHO "X$dir" | $Xsed -e 's*/lib$*/bin*'`
+	  testbindir=`$ECHO "$dir" | $SED 's*/lib$*/bin*'`
 	  case :$dllsearchpath: in
 	  *":$dir:"*) ;;
 	  ::) dllsearchpath=$dir;;
-	  *) dllsearchpath="$dllsearchpath:$dir";;
+	  *) func_append dllsearchpath ":$dir";;
 	  esac
 	  case :$dllsearchpath: in
 	  *":$testbindir:"*) ;;
 	  ::) dllsearchpath=$testbindir;;
-	  *) dllsearchpath="$dllsearchpath:$testbindir";;
+	  *) func_append dllsearchpath ":$testbindir";;
 	  esac
 	  ;;
 	esac
@@ -4520,43 +7009,48 @@ func_mode_link ()
 	;;
 
       -l*)
-	if test "X$arg" = "X-lc" || test "X$arg" = "X-lm"; then
+	if test X-lc = "X$arg" || test X-lm = "X$arg"; then
 	  case $host in
-	  *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos* | *-cegcc*)
+	  *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos* | *-cegcc* | *-*-haiku*)
 	    # These systems don't actually have a C or math library (as such)
 	    continue
 	    ;;
 	  *-*-os2*)
 	    # These systems don't actually have a C library (as such)
-	    test "X$arg" = "X-lc" && continue
+	    test X-lc = "X$arg" && continue
 	    ;;
-	  *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
+	  *-*-openbsd* | *-*-freebsd* | *-*-dragonfly* | *-*-bitrig*)
 	    # Do not include libc due to us having libc/libc_r.
-	    test "X$arg" = "X-lc" && continue
+	    test X-lc = "X$arg" && continue
 	    ;;
 	  *-*-rhapsody* | *-*-darwin1.[012])
 	    # Rhapsody C and math libraries are in the System framework
-	    deplibs="$deplibs System.ltframework"
+	    func_append deplibs " System.ltframework"
 	    continue
 	    ;;
 	  *-*-sco3.2v5* | *-*-sco5v6*)
 	    # Causes problems with __ctype
-	    test "X$arg" = "X-lc" && continue
+	    test X-lc = "X$arg" && continue
 	    ;;
 	  *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*)
 	    # Compiler inserts libc in the correct place for threads to work
-	    test "X$arg" = "X-lc" && continue
+	    test X-lc = "X$arg" && continue
 	    ;;
 	  esac
-	elif test "X$arg" = "X-lc_r"; then
+	elif test X-lc_r = "X$arg"; then
 	 case $host in
-	 *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
+	 *-*-openbsd* | *-*-freebsd* | *-*-dragonfly* | *-*-bitrig*)
 	   # Do not include libc_r directly, use -pthread flag.
 	   continue
 	   ;;
 	 esac
 	fi
-	deplibs="$deplibs $arg"
+	func_append deplibs " $arg"
+	continue
+	;;
+
+      -mllvm)
+	prev=mllvm
 	continue
 	;;
 
@@ -4568,27 +7062,28 @@ func_mode_link ()
       # Tru64 UNIX uses -model [arg] to determine the layout of C++
       # classes, name mangling, and exception handling.
       # Darwin uses the -arch flag to determine output architecture.
-      -model|-arch|-isysroot)
-	compiler_flags="$compiler_flags $arg"
+      -model|-arch|-isysroot|--sysroot)
+	func_append compiler_flags " $arg"
 	func_append compile_command " $arg"
 	func_append finalize_command " $arg"
 	prev=xcompiler
 	continue
 	;;
 
-      -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads)
-	compiler_flags="$compiler_flags $arg"
+      -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe \
+      |-threads|-fopenmp|-openmp|-mp|-xopenmp|-omp|-qsmp=*)
+	func_append compiler_flags " $arg"
 	func_append compile_command " $arg"
 	func_append finalize_command " $arg"
 	case "$new_inherited_linker_flags " in
 	    *" $arg "*) ;;
-	    * ) new_inherited_linker_flags="$new_inherited_linker_flags $arg" ;;
+	    * ) func_append new_inherited_linker_flags " $arg" ;;
 	esac
 	continue
 	;;
 
       -multi_module)
-	single_module="${wl}-multi_module"
+	single_module=$wl-multi_module
 	continue
 	;;
 
@@ -4602,8 +7097,8 @@ func_mode_link ()
 	*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-darwin* | *-cegcc*)
 	  # The PATH hackery in wrapper scripts is required on Windows
 	  # and Darwin in order for the loader to find any dlls it needs.
-	  func_warning "\`-no-install' is ignored for $host"
-	  func_warning "assuming \`-no-fast-install' instead"
+	  func_warning "'-no-install' is ignored for $host"
+	  func_warning "assuming '-no-fast-install' instead"
 	  fast_install=no
 	  ;;
 	*) no_install=yes ;;
@@ -4621,6 +7116,11 @@ func_mode_link ()
 	continue
 	;;
 
+      -os2dllname)
+	prev=os2dllname
+	continue
+	;;
+
       -o) prev=output ;;
 
       -precious-files-regex)
@@ -4649,13 +7149,17 @@ func_mode_link ()
 	# We need an absolute path.
 	case $dir in
 	[\\/]* | [A-Za-z]:[\\/]*) ;;
+	=*)
+	  func_stripname '=' '' "$dir"
+	  dir=$lt_sysroot$func_stripname_result
+	  ;;
 	*)
 	  func_fatal_error "only absolute run-paths are allowed"
 	  ;;
 	esac
 	case "$xrpath " in
 	*" $dir "*) ;;
-	*) xrpath="$xrpath $dir" ;;
+	*) func_append xrpath " $dir" ;;
 	esac
 	continue
 	;;
@@ -4704,14 +7208,14 @@ func_mode_link ()
 	func_stripname '-Wc,' '' "$arg"
 	args=$func_stripname_result
 	arg=
-	save_ifs="$IFS"; IFS=','
+	save_ifs=$IFS; IFS=,
 	for flag in $args; do
-	  IFS="$save_ifs"
+	  IFS=$save_ifs
           func_quote_for_eval "$flag"
-	  arg="$arg $wl$func_quote_for_eval_result"
-	  compiler_flags="$compiler_flags $func_quote_for_eval_result"
+	  func_append arg " $func_quote_for_eval_result"
+	  func_append compiler_flags " $func_quote_for_eval_result"
 	done
-	IFS="$save_ifs"
+	IFS=$save_ifs
 	func_stripname ' ' '' "$arg"
 	arg=$func_stripname_result
 	;;
@@ -4720,15 +7224,15 @@ func_mode_link ()
 	func_stripname '-Wl,' '' "$arg"
 	args=$func_stripname_result
 	arg=
-	save_ifs="$IFS"; IFS=','
+	save_ifs=$IFS; IFS=,
 	for flag in $args; do
-	  IFS="$save_ifs"
+	  IFS=$save_ifs
           func_quote_for_eval "$flag"
-	  arg="$arg $wl$func_quote_for_eval_result"
-	  compiler_flags="$compiler_flags $wl$func_quote_for_eval_result"
-	  linker_flags="$linker_flags $func_quote_for_eval_result"
+	  func_append arg " $wl$func_quote_for_eval_result"
+	  func_append compiler_flags " $wl$func_quote_for_eval_result"
+	  func_append linker_flags " $func_quote_for_eval_result"
 	done
-	IFS="$save_ifs"
+	IFS=$save_ifs
 	func_stripname ' ' '' "$arg"
 	arg=$func_stripname_result
 	;;
@@ -4751,38 +7255,63 @@ func_mode_link ()
       # -msg_* for osf cc
       -msg_*)
 	func_quote_for_eval "$arg"
-	arg="$func_quote_for_eval_result"
+	arg=$func_quote_for_eval_result
 	;;
 
-      # -64, -mips[0-9] enable 64-bit mode on the SGI compiler
-      # -r[0-9][0-9]* specifies the processor on the SGI compiler
-      # -xarch=*, -xtarget=* enable 64-bit mode on the Sun compiler
-      # +DA*, +DD* enable 64-bit mode on the HP compiler
-      # -q* pass through compiler args for the IBM compiler
-      # -m*, -t[45]*, -txscale* pass through architecture-specific
-      # compiler args for GCC
-      # -F/path gives path to uninstalled frameworks, gcc on darwin
-      # -p, -pg, --coverage, -fprofile-* pass through profiling flag for GCC
-      # @file GCC response files
+      # Flags to be passed through unchanged, with rationale:
+      # -64, -mips[0-9]      enable 64-bit mode for the SGI compiler
+      # -r[0-9][0-9]*        specify processor for the SGI compiler
+      # -xarch=*, -xtarget=* enable 64-bit mode for the Sun compiler
+      # +DA*, +DD*           enable 64-bit mode for the HP compiler
+      # -q*                  compiler args for the IBM compiler
+      # -m*, -t[45]*, -txscale* architecture-specific flags for GCC
+      # -F/path              path to uninstalled frameworks, gcc on darwin
+      # -p, -pg, --coverage, -fprofile-*  profiling flags for GCC
+      # -fstack-protector*   stack protector flags for GCC
+      # @file                GCC response files
+      # -tp=*                Portland pgcc target processor selection
+      # --sysroot=*          for sysroot support
+      # -O*, -g*, -flto*, -fwhopr*, -fuse-linker-plugin GCC link-time optimization
+      # -stdlib=*            select c++ std lib with clang
       -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \
-      -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*)
+      -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*|--sysroot=*| \
+      -O*|-g*|-flto*|-fwhopr*|-fuse-linker-plugin|-fstack-protector*|-stdlib=*)
         func_quote_for_eval "$arg"
-	arg="$func_quote_for_eval_result"
+	arg=$func_quote_for_eval_result
         func_append compile_command " $arg"
         func_append finalize_command " $arg"
-        compiler_flags="$compiler_flags $arg"
+        func_append compiler_flags " $arg"
         continue
         ;;
 
+      -Z*)
+        if test os2 = "`expr $host : '.*\(os2\)'`"; then
+          # OS/2 uses -Zxxx to specify OS/2-specific options
+	  compiler_flags="$compiler_flags $arg"
+	  func_append compile_command " $arg"
+	  func_append finalize_command " $arg"
+	  case $arg in
+	  -Zlinker | -Zstack)
+	    prev=xcompiler
+	    ;;
+	  esac
+	  continue
+        else
+	  # Otherwise treat like 'Some other compiler flag' below
+	  func_quote_for_eval "$arg"
+	  arg=$func_quote_for_eval_result
+        fi
+	;;
+
       # Some other compiler flag.
       -* | +*)
         func_quote_for_eval "$arg"
-	arg="$func_quote_for_eval_result"
+	arg=$func_quote_for_eval_result
 	;;
 
       *.$objext)
 	# A standard object.
-	objs="$objs $arg"
+	func_append objs " $arg"
 	;;
 
       *.lo)
@@ -4798,22 +7327,22 @@ func_mode_link ()
 
 	  if test -z "$pic_object" ||
 	     test -z "$non_pic_object" ||
-	     test "$pic_object" = none &&
-	     test "$non_pic_object" = none; then
-	    func_fatal_error "cannot find name of object for \`$arg'"
+	     test none = "$pic_object" &&
+	     test none = "$non_pic_object"; then
+	    func_fatal_error "cannot find name of object for '$arg'"
 	  fi
 
 	  # Extract subdirectory from the argument.
 	  func_dirname "$arg" "/" ""
-	  xdir="$func_dirname_result"
+	  xdir=$func_dirname_result
 
-	  if test "$pic_object" != none; then
+	  test none = "$pic_object" || {
 	    # Prepend the subdirectory the object is found in.
-	    pic_object="$xdir$pic_object"
+	    pic_object=$xdir$pic_object
 
-	    if test "$prev" = dlfiles; then
-	      if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then
-		dlfiles="$dlfiles $pic_object"
+	    if test dlfiles = "$prev"; then
+	      if test yes = "$build_libtool_libs" && test yes = "$dlopen_support"; then
+		func_append dlfiles " $pic_object"
 		prev=
 		continue
 	      else
@@ -4823,31 +7352,31 @@ func_mode_link ()
 	    fi
 
 	    # CHECK ME:  I think I busted this.  -Ossama
-	    if test "$prev" = dlprefiles; then
+	    if test dlprefiles = "$prev"; then
 	      # Preload the old-style object.
-	      dlprefiles="$dlprefiles $pic_object"
+	      func_append dlprefiles " $pic_object"
 	      prev=
 	    fi
 
 	    # A PIC object.
 	    func_append libobjs " $pic_object"
-	    arg="$pic_object"
-	  fi
+	    arg=$pic_object
+	  }
 
 	  # Non-PIC object.
-	  if test "$non_pic_object" != none; then
+	  if test none != "$non_pic_object"; then
 	    # Prepend the subdirectory the object is found in.
-	    non_pic_object="$xdir$non_pic_object"
+	    non_pic_object=$xdir$non_pic_object
 
 	    # A standard non-PIC object
 	    func_append non_pic_objects " $non_pic_object"
-	    if test -z "$pic_object" || test "$pic_object" = none ; then
-	      arg="$non_pic_object"
+	    if test -z "$pic_object" || test none = "$pic_object"; then
+	      arg=$non_pic_object
 	    fi
 	  else
 	    # If the PIC object exists, use it instead.
 	    # $xdir was prepended to $pic_object above.
-	    non_pic_object="$pic_object"
+	    non_pic_object=$pic_object
 	    func_append non_pic_objects " $non_pic_object"
 	  fi
 	else
@@ -4855,7 +7384,7 @@ func_mode_link ()
 	  if $opt_dry_run; then
 	    # Extract subdirectory from the argument.
 	    func_dirname "$arg" "/" ""
-	    xdir="$func_dirname_result"
+	    xdir=$func_dirname_result
 
 	    func_lo2o "$arg"
 	    pic_object=$xdir$objdir/$func_lo2o_result
@@ -4863,31 +7392,32 @@ func_mode_link ()
 	    func_append libobjs " $pic_object"
 	    func_append non_pic_objects " $non_pic_object"
 	  else
-	    func_fatal_error "\`$arg' is not a valid libtool object"
+	    func_fatal_error "'$arg' is not a valid libtool object"
 	  fi
 	fi
 	;;
 
       *.$libext)
 	# An archive.
-	deplibs="$deplibs $arg"
-	old_deplibs="$old_deplibs $arg"
+	func_append deplibs " $arg"
+	func_append old_deplibs " $arg"
 	continue
 	;;
 
       *.la)
 	# A libtool-controlled library.
 
-	if test "$prev" = dlfiles; then
+	func_resolve_sysroot "$arg"
+	if test dlfiles = "$prev"; then
 	  # This library was specified with -dlopen.
-	  dlfiles="$dlfiles $arg"
+	  func_append dlfiles " $func_resolve_sysroot_result"
 	  prev=
-	elif test "$prev" = dlprefiles; then
+	elif test dlprefiles = "$prev"; then
 	  # The library was specified with -dlpreopen.
-	  dlprefiles="$dlprefiles $arg"
+	  func_append dlprefiles " $func_resolve_sysroot_result"
 	  prev=
 	else
-	  deplibs="$deplibs $arg"
+	  func_append deplibs " $func_resolve_sysroot_result"
 	fi
 	continue
 	;;
@@ -4897,7 +7427,7 @@ func_mode_link ()
 	# Unknown arguments in both finalize_command and compile_command need
 	# to be aesthetically quoted because they are evaled later.
 	func_quote_for_eval "$arg"
-	arg="$func_quote_for_eval_result"
+	arg=$func_quote_for_eval_result
 	;;
       esac # arg
 
@@ -4909,9 +7439,9 @@ func_mode_link ()
     done # argument parsing loop
 
     test -n "$prev" && \
-      func_fatal_help "the \`$prevarg' option requires an argument"
+      func_fatal_help "the '$prevarg' option requires an argument"
 
-    if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then
+    if test yes = "$export_dynamic" && test -n "$export_dynamic_flag_spec"; then
       eval arg=\"$export_dynamic_flag_spec\"
       func_append compile_command " $arg"
       func_append finalize_command " $arg"
@@ -4920,20 +7450,25 @@ func_mode_link ()
     oldlibs=
     # calculate the name of the file, without its directory
     func_basename "$output"
-    outputname="$func_basename_result"
-    libobjs_save="$libobjs"
+    outputname=$func_basename_result
+    libobjs_save=$libobjs
 
     if test -n "$shlibpath_var"; then
       # get the directories listed in $shlibpath_var
-      eval shlib_search_path=\`\$ECHO \"X\${$shlibpath_var}\" \| \$Xsed -e \'s/:/ /g\'\`
+      eval shlib_search_path=\`\$ECHO \"\$$shlibpath_var\" \| \$SED \'s/:/ /g\'\`
     else
       shlib_search_path=
     fi
     eval sys_lib_search_path=\"$sys_lib_search_path_spec\"
     eval sys_lib_dlsearch_path=\"$sys_lib_dlsearch_path_spec\"
 
+    # Definition is injected by LT_CONFIG during libtool generation.
+    func_munge_path_list sys_lib_dlsearch_path "$LT_SYS_LIBRARY_PATH"
+
     func_dirname "$output" "/" ""
-    output_objdir="$func_dirname_result$objdir"
+    output_objdir=$func_dirname_result$objdir
+    func_to_tool_file "$output_objdir/"
+    tool_output_objdir=$func_to_tool_file_result
     # Create the object directory.
     func_mkdir_p "$output_objdir"
 
@@ -4954,15 +7489,15 @@ func_mode_link ()
     # Find all interdependent deplibs by searching for libraries
     # that are linked more than once (e.g. -la -lb -la)
     for deplib in $deplibs; do
-      if $opt_duplicate_deps ; then
+      if $opt_preserve_dup_deps; then
 	case "$libs " in
-	*" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
+	*" $deplib "*) func_append specialdeplibs " $deplib" ;;
 	esac
       fi
-      libs="$libs $deplib"
+      func_append libs " $deplib"
     done
 
-    if test "$linkmode" = lib; then
+    if test lib = "$linkmode"; then
       libs="$predeps $libs $compiler_lib_search_path $postdeps"
 
       # Compute libraries that are listed more than once in $predeps
@@ -4972,9 +7507,9 @@ func_mode_link ()
       if $opt_duplicate_compiler_generated_deps; then
 	for pre_post_dep in $predeps $postdeps; do
 	  case "$pre_post_deps " in
-	  *" $pre_post_dep "*) specialdeplibs="$specialdeplibs $pre_post_deps" ;;
+	  *" $pre_post_dep "*) func_append specialdeplibs " $pre_post_deps" ;;
 	  esac
-	  pre_post_deps="$pre_post_deps $pre_post_dep"
+	  func_append pre_post_deps " $pre_post_dep"
 	done
       fi
       pre_post_deps=
@@ -4994,7 +7529,7 @@ func_mode_link ()
 	  case $file in
 	  *.la) ;;
 	  *)
-	    func_fatal_help "libraries can \`-dlopen' only libtool libraries: $file"
+	    func_fatal_help "libraries can '-dlopen' only libtool libraries: $file"
 	    ;;
 	  esac
 	done
@@ -5002,7 +7537,7 @@ func_mode_link ()
     prog)
 	compile_deplibs=
 	finalize_deplibs=
-	alldeplibs=no
+	alldeplibs=false
 	newdlfiles=
 	newdlprefiles=
 	passes="conv scan dlopen dlpreopen link"
@@ -5014,82 +7549,85 @@ func_mode_link ()
     for pass in $passes; do
       # The preopen pass in lib mode reverses $deplibs; put it back here
       # so that -L comes before libs that need it for instance...
-      if test "$linkmode,$pass" = "lib,link"; then
+      if test lib,link = "$linkmode,$pass"; then
 	## FIXME: Find the place where the list is rebuilt in the wrong
 	##        order, and fix it there properly
         tmp_deplibs=
 	for deplib in $deplibs; do
 	  tmp_deplibs="$deplib $tmp_deplibs"
 	done
-	deplibs="$tmp_deplibs"
+	deplibs=$tmp_deplibs
       fi
 
-      if test "$linkmode,$pass" = "lib,link" ||
-	 test "$linkmode,$pass" = "prog,scan"; then
-	libs="$deplibs"
+      if test lib,link = "$linkmode,$pass" ||
+	 test prog,scan = "$linkmode,$pass"; then
+	libs=$deplibs
 	deplibs=
       fi
-      if test "$linkmode" = prog; then
+      if test prog = "$linkmode"; then
 	case $pass in
-	dlopen) libs="$dlfiles" ;;
-	dlpreopen) libs="$dlprefiles" ;;
+	dlopen) libs=$dlfiles ;;
+	dlpreopen) libs=$dlprefiles ;;
 	link) libs="$deplibs %DEPLIBS% $dependency_libs" ;;
 	esac
       fi
-      if test "$linkmode,$pass" = "lib,dlpreopen"; then
+      if test lib,dlpreopen = "$linkmode,$pass"; then
 	# Collect and forward deplibs of preopened libtool libs
 	for lib in $dlprefiles; do
 	  # Ignore non-libtool-libs
 	  dependency_libs=
+	  func_resolve_sysroot "$lib"
 	  case $lib in
-	  *.la)	func_source "$lib" ;;
+	  *.la)	func_source "$func_resolve_sysroot_result" ;;
 	  esac
 
 	  # Collect preopened libtool deplibs, except any this library
 	  # has declared as weak libs
 	  for deplib in $dependency_libs; do
-            deplib_base=`$ECHO "X$deplib" | $Xsed -e "$basename"`
+	    func_basename "$deplib"
+            deplib_base=$func_basename_result
 	    case " $weak_libs " in
 	    *" $deplib_base "*) ;;
-	    *) deplibs="$deplibs $deplib" ;;
+	    *) func_append deplibs " $deplib" ;;
 	    esac
 	  done
 	done
-	libs="$dlprefiles"
+	libs=$dlprefiles
       fi
-      if test "$pass" = dlopen; then
+      if test dlopen = "$pass"; then
 	# Collect dlpreopened libraries
-	save_deplibs="$deplibs"
+	save_deplibs=$deplibs
 	deplibs=
       fi
 
       for deplib in $libs; do
 	lib=
-	found=no
+	found=false
 	case $deplib in
-	-mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads)
-	  if test "$linkmode,$pass" = "prog,link"; then
+	-mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe \
+        |-threads|-fopenmp|-openmp|-mp|-xopenmp|-omp|-qsmp=*)
+	  if test prog,link = "$linkmode,$pass"; then
 	    compile_deplibs="$deplib $compile_deplibs"
 	    finalize_deplibs="$deplib $finalize_deplibs"
 	  else
-	    compiler_flags="$compiler_flags $deplib"
-	    if test "$linkmode" = lib ; then
+	    func_append compiler_flags " $deplib"
+	    if test lib = "$linkmode"; then
 		case "$new_inherited_linker_flags " in
 		    *" $deplib "*) ;;
-		    * ) new_inherited_linker_flags="$new_inherited_linker_flags $deplib" ;;
+		    * ) func_append new_inherited_linker_flags " $deplib" ;;
 		esac
 	    fi
 	  fi
 	  continue
 	  ;;
 	-l*)
-	  if test "$linkmode" != lib && test "$linkmode" != prog; then
-	    func_warning "\`-l' is ignored for archives/objects"
+	  if test lib != "$linkmode" && test prog != "$linkmode"; then
+	    func_warning "'-l' is ignored for archives/objects"
 	    continue
 	  fi
 	  func_stripname '-l' '' "$deplib"
 	  name=$func_stripname_result
-	  if test "$linkmode" = lib; then
+	  if test lib = "$linkmode"; then
 	    searchdirs="$newlib_search_path $lib_search_path $compiler_lib_search_dirs $sys_lib_search_path $shlib_search_path"
 	  else
 	    searchdirs="$newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path"
@@ -5097,31 +7635,22 @@ func_mode_link ()
 	  for searchdir in $searchdirs; do
 	    for search_ext in .la $std_shrext .so .a; do
 	      # Search the libtool library
-	      lib="$searchdir/lib${name}${search_ext}"
+	      lib=$searchdir/lib$name$search_ext
 	      if test -f "$lib"; then
-		if test "$search_ext" = ".la"; then
-		  found=yes
+		if test .la = "$search_ext"; then
+		  found=:
 		else
-		  found=no
+		  found=false
 		fi
 		break 2
 	      fi
 	    done
 	  done
-	  if test "$found" != yes; then
-	    # deplib doesn't seem to be a libtool library
-	    if test "$linkmode,$pass" = "prog,link"; then
-	      compile_deplibs="$deplib $compile_deplibs"
-	      finalize_deplibs="$deplib $finalize_deplibs"
-	    else
-	      deplibs="$deplib $deplibs"
-	      test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs"
-	    fi
-	    continue
-	  else # deplib is a libtool library
+	  if $found; then
+	    # deplib is a libtool library
 	    # If $allow_libtool_libs_with_static_runtimes && $deplib is a stdlib,
 	    # We need to do some special things here, and not later.
-	    if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
+	    if test yes = "$allow_libtool_libs_with_static_runtimes"; then
 	      case " $predeps $postdeps " in
 	      *" $deplib "*)
 		if func_lalib_p "$lib"; then
@@ -5129,19 +7658,19 @@ func_mode_link ()
 		  old_library=
 		  func_source "$lib"
 		  for l in $old_library $library_names; do
-		    ll="$l"
+		    ll=$l
 		  done
-		  if test "X$ll" = "X$old_library" ; then # only static version available
-		    found=no
+		  if test "X$ll" = "X$old_library"; then # only static version available
+		    found=false
 		    func_dirname "$lib" "" "."
-		    ladir="$func_dirname_result"
+		    ladir=$func_dirname_result
 		    lib=$ladir/$old_library
-		    if test "$linkmode,$pass" = "prog,link"; then
+		    if test prog,link = "$linkmode,$pass"; then
 		      compile_deplibs="$deplib $compile_deplibs"
 		      finalize_deplibs="$deplib $finalize_deplibs"
 		    else
 		      deplibs="$deplib $deplibs"
-		      test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs"
+		      test lib = "$linkmode" && newdependency_libs="$deplib $newdependency_libs"
 		    fi
 		    continue
 		  fi
@@ -5150,18 +7679,28 @@ func_mode_link ()
 	      *) ;;
 	      esac
 	    fi
+	  else
+	    # deplib doesn't seem to be a libtool library
+	    if test prog,link = "$linkmode,$pass"; then
+	      compile_deplibs="$deplib $compile_deplibs"
+	      finalize_deplibs="$deplib $finalize_deplibs"
+	    else
+	      deplibs="$deplib $deplibs"
+	      test lib = "$linkmode" && newdependency_libs="$deplib $newdependency_libs"
+	    fi
+	    continue
 	  fi
 	  ;; # -l
 	*.ltframework)
-	  if test "$linkmode,$pass" = "prog,link"; then
+	  if test prog,link = "$linkmode,$pass"; then
 	    compile_deplibs="$deplib $compile_deplibs"
 	    finalize_deplibs="$deplib $finalize_deplibs"
 	  else
 	    deplibs="$deplib $deplibs"
-	    if test "$linkmode" = lib ; then
+	    if test lib = "$linkmode"; then
 		case "$new_inherited_linker_flags " in
 		    *" $deplib "*) ;;
-		    * ) new_inherited_linker_flags="$new_inherited_linker_flags $deplib" ;;
+		    * ) func_append new_inherited_linker_flags " $deplib" ;;
 		esac
 	    fi
 	  fi
@@ -5171,47 +7710,53 @@ func_mode_link ()
 	  case $linkmode in
 	  lib)
 	    deplibs="$deplib $deplibs"
-	    test "$pass" = conv && continue
+	    test conv = "$pass" && continue
 	    newdependency_libs="$deplib $newdependency_libs"
 	    func_stripname '-L' '' "$deplib"
-	    newlib_search_path="$newlib_search_path $func_stripname_result"
+	    func_resolve_sysroot "$func_stripname_result"
+	    func_append newlib_search_path " $func_resolve_sysroot_result"
 	    ;;
 	  prog)
-	    if test "$pass" = conv; then
+	    if test conv = "$pass"; then
 	      deplibs="$deplib $deplibs"
 	      continue
 	    fi
-	    if test "$pass" = scan; then
+	    if test scan = "$pass"; then
 	      deplibs="$deplib $deplibs"
 	    else
 	      compile_deplibs="$deplib $compile_deplibs"
 	      finalize_deplibs="$deplib $finalize_deplibs"
 	    fi
 	    func_stripname '-L' '' "$deplib"
-	    newlib_search_path="$newlib_search_path $func_stripname_result"
+	    func_resolve_sysroot "$func_stripname_result"
+	    func_append newlib_search_path " $func_resolve_sysroot_result"
 	    ;;
 	  *)
-	    func_warning "\`-L' is ignored for archives/objects"
+	    func_warning "'-L' is ignored for archives/objects"
 	    ;;
 	  esac # linkmode
 	  continue
 	  ;; # -L
 	-R*)
-	  if test "$pass" = link; then
+	  if test link = "$pass"; then
 	    func_stripname '-R' '' "$deplib"
-	    dir=$func_stripname_result
+	    func_resolve_sysroot "$func_stripname_result"
+	    dir=$func_resolve_sysroot_result
 	    # Make sure the xrpath contains only unique directories.
 	    case "$xrpath " in
 	    *" $dir "*) ;;
-	    *) xrpath="$xrpath $dir" ;;
+	    *) func_append xrpath " $dir" ;;
 	    esac
 	  fi
 	  deplibs="$deplib $deplibs"
 	  continue
 	  ;;
-	*.la) lib="$deplib" ;;
+	*.la)
+	  func_resolve_sysroot "$deplib"
+	  lib=$func_resolve_sysroot_result
+	  ;;
 	*.$libext)
-	  if test "$pass" = conv; then
+	  if test conv = "$pass"; then
 	    deplibs="$deplib $deplibs"
 	    continue
 	  fi
@@ -5222,40 +7767,40 @@ func_mode_link ()
 	    case " $dlpreconveniencelibs " in
 	    *" $deplib "*) ;;
 	    *)
-	      valid_a_lib=no
+	      valid_a_lib=false
 	      case $deplibs_check_method in
 		match_pattern*)
 		  set dummy $deplibs_check_method; shift
 		  match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"`
-		  if eval "\$ECHO \"X$deplib\"" 2>/dev/null | $Xsed -e 10q \
+		  if eval "\$ECHO \"$deplib\"" 2>/dev/null | $SED 10q \
 		    | $EGREP "$match_pattern_regex" > /dev/null; then
-		    valid_a_lib=yes
+		    valid_a_lib=:
 		  fi
 		;;
 		pass_all)
-		  valid_a_lib=yes
+		  valid_a_lib=:
 		;;
 	      esac
-	      if test "$valid_a_lib" != yes; then
-		$ECHO
-		$ECHO "*** Warning: Trying to link with static lib archive $deplib."
-		$ECHO "*** I have the capability to make that library automatically link in when"
-		$ECHO "*** you link to this library.  But I can only do this if you have a"
-		$ECHO "*** shared version of the library, which you do not appear to have"
-		$ECHO "*** because the file extensions .$libext of this argument makes me believe"
-		$ECHO "*** that it is just a static archive that I should not use here."
-	      else
-		$ECHO
+	      if $valid_a_lib; then
+		echo
 		$ECHO "*** Warning: Linking the shared library $output against the"
 		$ECHO "*** static library $deplib is not portable!"
 		deplibs="$deplib $deplibs"
+	      else
+		echo
+		$ECHO "*** Warning: Trying to link with static lib archive $deplib."
+		echo "*** I have the capability to make that library automatically link in when"
+		echo "*** you link to this library.  But I can only do this if you have a"
+		echo "*** shared version of the library, which you do not appear to have"
+		echo "*** because the file extensions .$libext of this argument makes me believe"
+		echo "*** that it is just a static archive that I should not use here."
 	      fi
 	      ;;
 	    esac
 	    continue
 	    ;;
 	  prog)
-	    if test "$pass" != link; then
+	    if test link != "$pass"; then
 	      deplibs="$deplib $deplibs"
 	    else
 	      compile_deplibs="$deplib $compile_deplibs"
@@ -5266,38 +7811,36 @@ func_mode_link ()
 	  esac # linkmode
 	  ;; # *.$libext
 	*.lo | *.$objext)
-	  if test "$pass" = conv; then
+	  if test conv = "$pass"; then
 	    deplibs="$deplib $deplibs"
-	  elif test "$linkmode" = prog; then
-	    if test "$pass" = dlpreopen || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then
+	  elif test prog = "$linkmode"; then
+	    if test dlpreopen = "$pass" || test yes != "$dlopen_support" || test no = "$build_libtool_libs"; then
 	      # If there is no dlopen support or we're linking statically,
 	      # we need to preload.
-	      newdlprefiles="$newdlprefiles $deplib"
+	      func_append newdlprefiles " $deplib"
 	      compile_deplibs="$deplib $compile_deplibs"
 	      finalize_deplibs="$deplib $finalize_deplibs"
 	    else
-	      newdlfiles="$newdlfiles $deplib"
+	      func_append newdlfiles " $deplib"
 	    fi
 	  fi
 	  continue
 	  ;;
 	%DEPLIBS%)
-	  alldeplibs=yes
+	  alldeplibs=:
 	  continue
 	  ;;
 	esac # case $deplib
 
-	if test "$found" = yes || test -f "$lib"; then :
-	else
-	  func_fatal_error "cannot find the library \`$lib' or unhandled argument \`$deplib'"
-	fi
+	$found || test -f "$lib" \
+	  || func_fatal_error "cannot find the library '$lib' or unhandled argument '$deplib'"
 
 	# Check to see that this really is a libtool archive.
 	func_lalib_unsafe_p "$lib" \
-	  || func_fatal_error "\`$lib' is not a valid libtool archive"
+	  || func_fatal_error "'$lib' is not a valid libtool archive"
 
 	func_dirname "$lib" "" "."
-	ladir="$func_dirname_result"
+	ladir=$func_dirname_result
 
 	dlname=
 	dlopen=
@@ -5318,44 +7861,44 @@ func_mode_link ()
 
 	# Convert "-framework foo" to "foo.ltframework"
 	if test -n "$inherited_linker_flags"; then
-	  tmp_inherited_linker_flags=`$ECHO "X$inherited_linker_flags" | $Xsed -e 's/-framework \([^ $]*\)/\1.ltframework/g'`
+	  tmp_inherited_linker_flags=`$ECHO "$inherited_linker_flags" | $SED 's/-framework \([^ $]*\)/\1.ltframework/g'`
 	  for tmp_inherited_linker_flag in $tmp_inherited_linker_flags; do
 	    case " $new_inherited_linker_flags " in
 	      *" $tmp_inherited_linker_flag "*) ;;
-	      *) new_inherited_linker_flags="$new_inherited_linker_flags $tmp_inherited_linker_flag";;
+	      *) func_append new_inherited_linker_flags " $tmp_inherited_linker_flag";;
 	    esac
 	  done
 	fi
-	dependency_libs=`$ECHO "X $dependency_libs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'`
-	if test "$linkmode,$pass" = "lib,link" ||
-	   test "$linkmode,$pass" = "prog,scan" ||
-	   { test "$linkmode" != prog && test "$linkmode" != lib; }; then
-	  test -n "$dlopen" && dlfiles="$dlfiles $dlopen"
-	  test -n "$dlpreopen" && dlprefiles="$dlprefiles $dlpreopen"
+	dependency_libs=`$ECHO " $dependency_libs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'`
+	if test lib,link = "$linkmode,$pass" ||
+	   test prog,scan = "$linkmode,$pass" ||
+	   { test prog != "$linkmode" && test lib != "$linkmode"; }; then
+	  test -n "$dlopen" && func_append dlfiles " $dlopen"
+	  test -n "$dlpreopen" && func_append dlprefiles " $dlpreopen"
 	fi
 
-	if test "$pass" = conv; then
+	if test conv = "$pass"; then
 	  # Only check for convenience libraries
 	  deplibs="$lib $deplibs"
 	  if test -z "$libdir"; then
 	    if test -z "$old_library"; then
-	      func_fatal_error "cannot find name of link library for \`$lib'"
+	      func_fatal_error "cannot find name of link library for '$lib'"
 	    fi
 	    # It is a libtool convenience library, so add in its objects.
-	    convenience="$convenience $ladir/$objdir/$old_library"
-	    old_convenience="$old_convenience $ladir/$objdir/$old_library"
-	  elif test "$linkmode" != prog && test "$linkmode" != lib; then
-	    func_fatal_error "\`$lib' is not a convenience library"
+	    func_append convenience " $ladir/$objdir/$old_library"
+	    func_append old_convenience " $ladir/$objdir/$old_library"
+	  elif test prog != "$linkmode" && test lib != "$linkmode"; then
+	    func_fatal_error "'$lib' is not a convenience library"
 	  fi
 	  tmp_libs=
 	  for deplib in $dependency_libs; do
 	    deplibs="$deplib $deplibs"
-	    if $opt_duplicate_deps ; then
+	    if $opt_preserve_dup_deps; then
 	      case "$tmp_libs " in
-	      *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
+	      *" $deplib "*) func_append specialdeplibs " $deplib" ;;
 	      esac
 	    fi
-	    tmp_libs="$tmp_libs $deplib"
+	    func_append tmp_libs " $deplib"
 	  done
 	  continue
 	fi # $pass = conv
@@ -5363,101 +7906,133 @@ func_mode_link ()
 
 	# Get the name of the library we link against.
 	linklib=
-	for l in $old_library $library_names; do
-	  linklib="$l"
-	done
+	if test -n "$old_library" &&
+	   { test yes = "$prefer_static_libs" ||
+	     test built,no = "$prefer_static_libs,$installed"; }; then
+	  linklib=$old_library
+	else
+	  for l in $old_library $library_names; do
+	    linklib=$l
+	  done
+	fi
 	if test -z "$linklib"; then
-	  func_fatal_error "cannot find name of link library for \`$lib'"
+	  func_fatal_error "cannot find name of link library for '$lib'"
 	fi
 
 	# This library was specified with -dlopen.
-	if test "$pass" = dlopen; then
-	  if test -z "$libdir"; then
-	    func_fatal_error "cannot -dlopen a convenience library: \`$lib'"
-	  fi
+	if test dlopen = "$pass"; then
+	  test -z "$libdir" \
+	    && func_fatal_error "cannot -dlopen a convenience library: '$lib'"
 	  if test -z "$dlname" ||
-	     test "$dlopen_support" != yes ||
-	     test "$build_libtool_libs" = no; then
+	     test yes != "$dlopen_support" ||
+	     test no = "$build_libtool_libs"
+	  then
 	    # If there is no dlname, no dlopen support or we're linking
 	    # statically, we need to preload.  We also need to preload any
 	    # dependent libraries so libltdl's deplib preloader doesn't
 	    # bomb out in the load deplibs phase.
-	    dlprefiles="$dlprefiles $lib $dependency_libs"
+	    func_append dlprefiles " $lib $dependency_libs"
 	  else
-	    newdlfiles="$newdlfiles $lib"
+	    func_append newdlfiles " $lib"
 	  fi
 	  continue
 	fi # $pass = dlopen
 
 	# We need an absolute path.
 	case $ladir in
-	[\\/]* | [A-Za-z]:[\\/]*) abs_ladir="$ladir" ;;
+	[\\/]* | [A-Za-z]:[\\/]*) abs_ladir=$ladir ;;
 	*)
 	  abs_ladir=`cd "$ladir" && pwd`
 	  if test -z "$abs_ladir"; then
-	    func_warning "cannot determine absolute directory name of \`$ladir'"
+	    func_warning "cannot determine absolute directory name of '$ladir'"
 	    func_warning "passing it literally to the linker, although it might fail"
-	    abs_ladir="$ladir"
+	    abs_ladir=$ladir
 	  fi
 	  ;;
 	esac
 	func_basename "$lib"
-	laname="$func_basename_result"
+	laname=$func_basename_result
 
 	# Find the relevant object directory and library name.
-	if test "X$installed" = Xyes; then
-	  if test ! -f "$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then
-	    func_warning "library \`$lib' was moved."
-	    dir="$ladir"
-	    absdir="$abs_ladir"
-	    libdir="$abs_ladir"
+	if test yes = "$installed"; then
+	  if test ! -f "$lt_sysroot$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then
+	    func_warning "library '$lib' was moved."
+	    dir=$ladir
+	    absdir=$abs_ladir
+	    libdir=$abs_ladir
 	  else
-	    dir="$libdir"
-	    absdir="$libdir"
+	    dir=$lt_sysroot$libdir
+	    absdir=$lt_sysroot$libdir
 	  fi
-	  test "X$hardcode_automatic" = Xyes && avoidtemprpath=yes
+	  test yes = "$hardcode_automatic" && avoidtemprpath=yes
 	else
 	  if test ! -f "$ladir/$objdir/$linklib" && test -f "$abs_ladir/$linklib"; then
-	    dir="$ladir"
-	    absdir="$abs_ladir"
+	    dir=$ladir
+	    absdir=$abs_ladir
 	    # Remove this search path later
-	    notinst_path="$notinst_path $abs_ladir"
+	    func_append notinst_path " $abs_ladir"
 	  else
-	    dir="$ladir/$objdir"
-	    absdir="$abs_ladir/$objdir"
+	    dir=$ladir/$objdir
+	    absdir=$abs_ladir/$objdir
 	    # Remove this search path later
-	    notinst_path="$notinst_path $abs_ladir"
+	    func_append notinst_path " $abs_ladir"
 	  fi
 	fi # $installed = yes
 	func_stripname 'lib' '.la' "$laname"
 	name=$func_stripname_result
 
 	# This library was specified with -dlpreopen.
-	if test "$pass" = dlpreopen; then
-	  if test -z "$libdir" && test "$linkmode" = prog; then
-	    func_fatal_error "only libraries may -dlpreopen a convenience library: \`$lib'"
-	  fi
-	  # Prefer using a static library (so that no silly _DYNAMIC symbols
-	  # are required to link).
-	  if test -n "$old_library"; then
-	    newdlprefiles="$newdlprefiles $dir/$old_library"
-	    # Keep a list of preopened convenience libraries to check
-	    # that they are being used correctly in the link pass.
-	    test -z "$libdir" && \
-		dlpreconveniencelibs="$dlpreconveniencelibs $dir/$old_library"
-	  # Otherwise, use the dlname, so that lt_dlopen finds it.
-	  elif test -n "$dlname"; then
-	    newdlprefiles="$newdlprefiles $dir/$dlname"
-	  else
-	    newdlprefiles="$newdlprefiles $dir/$linklib"
+	if test dlpreopen = "$pass"; then
+	  if test -z "$libdir" && test prog = "$linkmode"; then
+	    func_fatal_error "only libraries may -dlpreopen a convenience library: '$lib'"
 	  fi
+	  case $host in
+	    # special handling for platforms with PE-DLLs.
+	    *cygwin* | *mingw* | *cegcc* )
+	      # Linker will automatically link against shared library if both
+	      # static and shared are present.  Therefore, ensure we extract
+	      # symbols from the import library if a shared library is present
+	      # (otherwise, the dlopen module name will be incorrect).  We do
+	      # this by putting the import library name into $newdlprefiles.
+	      # We recover the dlopen module name by 'saving' the la file
+	      # name in a special purpose variable, and (later) extracting the
+	      # dlname from the la file.
+	      if test -n "$dlname"; then
+	        func_tr_sh "$dir/$linklib"
+	        eval "libfile_$func_tr_sh_result=\$abs_ladir/\$laname"
+	        func_append newdlprefiles " $dir/$linklib"
+	      else
+	        func_append newdlprefiles " $dir/$old_library"
+	        # Keep a list of preopened convenience libraries to check
+	        # that they are being used correctly in the link pass.
+	        test -z "$libdir" && \
+	          func_append dlpreconveniencelibs " $dir/$old_library"
+	      fi
+	    ;;
+	    * )
+	      # Prefer using a static library (so that no silly _DYNAMIC symbols
+	      # are required to link).
+	      if test -n "$old_library"; then
+	        func_append newdlprefiles " $dir/$old_library"
+	        # Keep a list of preopened convenience libraries to check
+	        # that they are being used correctly in the link pass.
+	        test -z "$libdir" && \
+	          func_append dlpreconveniencelibs " $dir/$old_library"
+	      # Otherwise, use the dlname, so that lt_dlopen finds it.
+	      elif test -n "$dlname"; then
+	        func_append newdlprefiles " $dir/$dlname"
+	      else
+	        func_append newdlprefiles " $dir/$linklib"
+	      fi
+	    ;;
+	  esac
 	fi # $pass = dlpreopen
 
 	if test -z "$libdir"; then
 	  # Link the convenience library
-	  if test "$linkmode" = lib; then
+	  if test lib = "$linkmode"; then
 	    deplibs="$dir/$old_library $deplibs"
-	  elif test "$linkmode,$pass" = "prog,link"; then
+	  elif test prog,link = "$linkmode,$pass"; then
 	    compile_deplibs="$dir/$old_library $compile_deplibs"
 	    finalize_deplibs="$dir/$old_library $finalize_deplibs"
 	  else
@@ -5467,52 +8042,53 @@ func_mode_link ()
 	fi
 
 
-	if test "$linkmode" = prog && test "$pass" != link; then
-	  newlib_search_path="$newlib_search_path $ladir"
+	if test prog = "$linkmode" && test link != "$pass"; then
+	  func_append newlib_search_path " $ladir"
 	  deplibs="$lib $deplibs"
 
-	  linkalldeplibs=no
-	  if test "$link_all_deplibs" != no || test -z "$library_names" ||
-	     test "$build_libtool_libs" = no; then
-	    linkalldeplibs=yes
+	  linkalldeplibs=false
+	  if test no != "$link_all_deplibs" || test -z "$library_names" ||
+	     test no = "$build_libtool_libs"; then
+	    linkalldeplibs=:
 	  fi
 
 	  tmp_libs=
 	  for deplib in $dependency_libs; do
 	    case $deplib in
 	    -L*) func_stripname '-L' '' "$deplib"
-	         newlib_search_path="$newlib_search_path $func_stripname_result"
+	         func_resolve_sysroot "$func_stripname_result"
+	         func_append newlib_search_path " $func_resolve_sysroot_result"
 		 ;;
 	    esac
 	    # Need to link against all dependency_libs?
-	    if test "$linkalldeplibs" = yes; then
+	    if $linkalldeplibs; then
 	      deplibs="$deplib $deplibs"
 	    else
 	      # Need to hardcode shared library paths
 	      # or/and link against static libraries
 	      newdependency_libs="$deplib $newdependency_libs"
 	    fi
-	    if $opt_duplicate_deps ; then
+	    if $opt_preserve_dup_deps; then
 	      case "$tmp_libs " in
-	      *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
+	      *" $deplib "*) func_append specialdeplibs " $deplib" ;;
 	      esac
 	    fi
-	    tmp_libs="$tmp_libs $deplib"
+	    func_append tmp_libs " $deplib"
 	  done # for deplib
 	  continue
 	fi # $linkmode = prog...
 
-	if test "$linkmode,$pass" = "prog,link"; then
+	if test prog,link = "$linkmode,$pass"; then
 	  if test -n "$library_names" &&
-	     { { test "$prefer_static_libs" = no ||
-	         test "$prefer_static_libs,$installed" = "built,yes"; } ||
+	     { { test no = "$prefer_static_libs" ||
+	         test built,yes = "$prefer_static_libs,$installed"; } ||
 	       test -z "$old_library"; }; then
 	    # We need to hardcode the library path
-	    if test -n "$shlibpath_var" && test -z "$avoidtemprpath" ; then
+	    if test -n "$shlibpath_var" && test -z "$avoidtemprpath"; then
 	      # Make sure the rpath contains only unique directories.
-	      case "$temp_rpath:" in
+	      case $temp_rpath: in
 	      *"$absdir:"*) ;;
-	      *) temp_rpath="$temp_rpath$absdir:" ;;
+	      *) func_append temp_rpath "$absdir:" ;;
 	      esac
 	    fi
 
@@ -5524,7 +8100,7 @@ func_mode_link ()
 	    *)
 	      case "$compile_rpath " in
 	      *" $absdir "*) ;;
-	      *) compile_rpath="$compile_rpath $absdir"
+	      *) func_append compile_rpath " $absdir" ;;
 	      esac
 	      ;;
 	    esac
@@ -5533,15 +8109,15 @@ func_mode_link ()
 	    *)
 	      case "$finalize_rpath " in
 	      *" $libdir "*) ;;
-	      *) finalize_rpath="$finalize_rpath $libdir"
+	      *) func_append finalize_rpath " $libdir" ;;
 	      esac
 	      ;;
 	    esac
 	  fi # $linkmode,$pass = prog,link...
 
-	  if test "$alldeplibs" = yes &&
-	     { test "$deplibs_check_method" = pass_all ||
-	       { test "$build_libtool_libs" = yes &&
+	  if $alldeplibs &&
+	     { test pass_all = "$deplibs_check_method" ||
+	       { test yes = "$build_libtool_libs" &&
 		 test -n "$library_names"; }; }; then
 	    # We only need to search for static libraries
 	    continue
@@ -5550,20 +8126,20 @@ func_mode_link ()
 
 	link_static=no # Whether the deplib will be linked statically
 	use_static_libs=$prefer_static_libs
-	if test "$use_static_libs" = built && test "$installed" = yes; then
+	if test built = "$use_static_libs" && test yes = "$installed"; then
 	  use_static_libs=no
 	fi
 	if test -n "$library_names" &&
-	   { test "$use_static_libs" = no || test -z "$old_library"; }; then
+	   { test no = "$use_static_libs" || test -z "$old_library"; }; then
 	  case $host in
-	  *cygwin* | *mingw* | *cegcc*)
+	  *cygwin* | *mingw* | *cegcc* | *os2*)
 	      # No point in relinking DLLs because paths are not encoded
-	      notinst_deplibs="$notinst_deplibs $lib"
+	      func_append notinst_deplibs " $lib"
 	      need_relink=no
 	    ;;
 	  *)
-	    if test "$installed" = no; then
-	      notinst_deplibs="$notinst_deplibs $lib"
+	    if test no = "$installed"; then
+	      func_append notinst_deplibs " $lib"
 	      need_relink=yes
 	    fi
 	    ;;
@@ -5572,24 +8148,24 @@ func_mode_link ()
 
 	  # Warn about portability, can't link against -module's on some
 	  # systems (darwin).  Don't bleat about dlopened modules though!
-	  dlopenmodule=""
+	  dlopenmodule=
 	  for dlpremoduletest in $dlprefiles; do
 	    if test "X$dlpremoduletest" = "X$lib"; then
-	      dlopenmodule="$dlpremoduletest"
+	      dlopenmodule=$dlpremoduletest
 	      break
 	    fi
 	  done
-	  if test -z "$dlopenmodule" && test "$shouldnotlink" = yes && test "$pass" = link; then
-	    $ECHO
-	    if test "$linkmode" = prog; then
+	  if test -z "$dlopenmodule" && test yes = "$shouldnotlink" && test link = "$pass"; then
+	    echo
+	    if test prog = "$linkmode"; then
 	      $ECHO "*** Warning: Linking the executable $output against the loadable module"
 	    else
 	      $ECHO "*** Warning: Linking the shared library $output against the loadable module"
 	    fi
 	    $ECHO "*** $linklib is not portable!"
 	  fi
-	  if test "$linkmode" = lib &&
-	     test "$hardcode_into_libs" = yes; then
+	  if test lib = "$linkmode" &&
+	     test yes = "$hardcode_into_libs"; then
 	    # Hardcode the library path.
 	    # Skip directories that are in the system default run-time
 	    # search path.
@@ -5598,7 +8174,7 @@ func_mode_link ()
 	    *)
 	      case "$compile_rpath " in
 	      *" $absdir "*) ;;
-	      *) compile_rpath="$compile_rpath $absdir"
+	      *) func_append compile_rpath " $absdir" ;;
 	      esac
 	      ;;
 	    esac
@@ -5607,7 +8183,7 @@ func_mode_link ()
 	    *)
 	      case "$finalize_rpath " in
 	      *" $libdir "*) ;;
-	      *) finalize_rpath="$finalize_rpath $libdir"
+	      *) func_append finalize_rpath " $libdir" ;;
 	      esac
 	      ;;
 	    esac
@@ -5617,43 +8193,43 @@ func_mode_link ()
 	    # figure out the soname
 	    set dummy $library_names
 	    shift
-	    realname="$1"
+	    realname=$1
 	    shift
 	    libname=`eval "\\$ECHO \"$libname_spec\""`
 	    # use dlname if we got it. it's perfectly good, no?
 	    if test -n "$dlname"; then
-	      soname="$dlname"
+	      soname=$dlname
 	    elif test -n "$soname_spec"; then
 	      # bleh windows
 	      case $host in
-	      *cygwin* | mingw* | *cegcc*)
+	      *cygwin* | mingw* | *cegcc* | *os2*)
 	        func_arith $current - $age
 		major=$func_arith_result
-		versuffix="-$major"
+		versuffix=-$major
 		;;
 	      esac
 	      eval soname=\"$soname_spec\"
 	    else
-	      soname="$realname"
+	      soname=$realname
 	    fi
 
 	    # Make a new name for the extract_expsyms_cmds to use
-	    soroot="$soname"
+	    soroot=$soname
 	    func_basename "$soroot"
-	    soname="$func_basename_result"
+	    soname=$func_basename_result
 	    func_stripname 'lib' '.dll' "$soname"
 	    newlib=libimp-$func_stripname_result.a
 
 	    # If the library has no export list, then create one now
 	    if test -f "$output_objdir/$soname-def"; then :
 	    else
-	      func_verbose "extracting exported symbol list from \`$soname'"
+	      func_verbose "extracting exported symbol list from '$soname'"
 	      func_execute_cmds "$extract_expsyms_cmds" 'exit $?'
 	    fi
 
 	    # Create $newlib
 	    if test -f "$output_objdir/$newlib"; then :; else
-	      func_verbose "generating import library for \`$soname'"
+	      func_verbose "generating import library for '$soname'"
 	      func_execute_cmds "$old_archive_from_expsyms_cmds" 'exit $?'
 	    fi
 	    # make sure the library variables are pointing to the new library
@@ -5661,70 +8237,70 @@ func_mode_link ()
 	    linklib=$newlib
 	  fi # test -n "$old_archive_from_expsyms_cmds"
 
-	  if test "$linkmode" = prog || test "$mode" != relink; then
+	  if test prog = "$linkmode" || test relink != "$opt_mode"; then
 	    add_shlibpath=
 	    add_dir=
 	    add=
 	    lib_linked=yes
 	    case $hardcode_action in
 	    immediate | unsupported)
-	      if test "$hardcode_direct" = no; then
-		add="$dir/$linklib"
+	      if test no = "$hardcode_direct"; then
+		add=$dir/$linklib
 		case $host in
-		  *-*-sco3.2v5.0.[024]*) add_dir="-L$dir" ;;
-		  *-*-sysv4*uw2*) add_dir="-L$dir" ;;
+		  *-*-sco3.2v5.0.[024]*) add_dir=-L$dir ;;
+		  *-*-sysv4*uw2*) add_dir=-L$dir ;;
 		  *-*-sysv5OpenUNIX* | *-*-sysv5UnixWare7.[01].[10]* | \
-		    *-*-unixware7*) add_dir="-L$dir" ;;
+		    *-*-unixware7*) add_dir=-L$dir ;;
 		  *-*-darwin* )
-		    # if the lib is a (non-dlopened) module then we can not
+		    # if the lib is a (non-dlopened) module then we cannot
 		    # link against it, someone is ignoring the earlier warnings
 		    if /usr/bin/file -L $add 2> /dev/null |
-			 $GREP ": [^:]* bundle" >/dev/null ; then
+			 $GREP ": [^:]* bundle" >/dev/null; then
 		      if test "X$dlopenmodule" != "X$lib"; then
 			$ECHO "*** Warning: lib $linklib is a module, not a shared library"
-			if test -z "$old_library" ; then
-			  $ECHO
-			  $ECHO "*** And there doesn't seem to be a static archive available"
-			  $ECHO "*** The link will probably fail, sorry"
+			if test -z "$old_library"; then
+			  echo
+			  echo "*** And there doesn't seem to be a static archive available"
+			  echo "*** The link will probably fail, sorry"
 			else
-			  add="$dir/$old_library"
+			  add=$dir/$old_library
 			fi
 		      elif test -n "$old_library"; then
-			add="$dir/$old_library"
+			add=$dir/$old_library
 		      fi
 		    fi
 		esac
-	      elif test "$hardcode_minus_L" = no; then
+	      elif test no = "$hardcode_minus_L"; then
 		case $host in
-		*-*-sunos*) add_shlibpath="$dir" ;;
+		*-*-sunos*) add_shlibpath=$dir ;;
 		esac
-		add_dir="-L$dir"
-		add="-l$name"
-	      elif test "$hardcode_shlibpath_var" = no; then
-		add_shlibpath="$dir"
-		add="-l$name"
+		add_dir=-L$dir
+		add=-l$name
+	      elif test no = "$hardcode_shlibpath_var"; then
+		add_shlibpath=$dir
+		add=-l$name
 	      else
 		lib_linked=no
 	      fi
 	      ;;
 	    relink)
-	      if test "$hardcode_direct" = yes &&
-	         test "$hardcode_direct_absolute" = no; then
-		add="$dir/$linklib"
-	      elif test "$hardcode_minus_L" = yes; then
-		add_dir="-L$dir"
+	      if test yes = "$hardcode_direct" &&
+	         test no = "$hardcode_direct_absolute"; then
+		add=$dir/$linklib
+	      elif test yes = "$hardcode_minus_L"; then
+		add_dir=-L$absdir
 		# Try looking first in the location we're being installed to.
 		if test -n "$inst_prefix_dir"; then
 		  case $libdir in
 		    [\\/]*)
-		      add_dir="$add_dir -L$inst_prefix_dir$libdir"
+		      func_append add_dir " -L$inst_prefix_dir$libdir"
 		      ;;
 		  esac
 		fi
-		add="-l$name"
-	      elif test "$hardcode_shlibpath_var" = yes; then
-		add_shlibpath="$dir"
-		add="-l$name"
+		add=-l$name
+	      elif test yes = "$hardcode_shlibpath_var"; then
+		add_shlibpath=$dir
+		add=-l$name
 	      else
 		lib_linked=no
 	      fi
@@ -5732,72 +8308,72 @@ func_mode_link ()
 	    *) lib_linked=no ;;
 	    esac
 
-	    if test "$lib_linked" != yes; then
+	    if test yes != "$lib_linked"; then
 	      func_fatal_configuration "unsupported hardcode properties"
 	    fi
 
 	    if test -n "$add_shlibpath"; then
 	      case :$compile_shlibpath: in
 	      *":$add_shlibpath:"*) ;;
-	      *) compile_shlibpath="$compile_shlibpath$add_shlibpath:" ;;
+	      *) func_append compile_shlibpath "$add_shlibpath:" ;;
 	      esac
 	    fi
-	    if test "$linkmode" = prog; then
+	    if test prog = "$linkmode"; then
 	      test -n "$add_dir" && compile_deplibs="$add_dir $compile_deplibs"
 	      test -n "$add" && compile_deplibs="$add $compile_deplibs"
 	    else
 	      test -n "$add_dir" && deplibs="$add_dir $deplibs"
 	      test -n "$add" && deplibs="$add $deplibs"
-	      if test "$hardcode_direct" != yes &&
-		 test "$hardcode_minus_L" != yes &&
-		 test "$hardcode_shlibpath_var" = yes; then
+	      if test yes != "$hardcode_direct" &&
+		 test yes != "$hardcode_minus_L" &&
+		 test yes = "$hardcode_shlibpath_var"; then
 		case :$finalize_shlibpath: in
 		*":$libdir:"*) ;;
-		*) finalize_shlibpath="$finalize_shlibpath$libdir:" ;;
+		*) func_append finalize_shlibpath "$libdir:" ;;
 		esac
 	      fi
 	    fi
 	  fi
 
-	  if test "$linkmode" = prog || test "$mode" = relink; then
+	  if test prog = "$linkmode" || test relink = "$opt_mode"; then
 	    add_shlibpath=
 	    add_dir=
 	    add=
 	    # Finalize command for both is simple: just hardcode it.
-	    if test "$hardcode_direct" = yes &&
-	       test "$hardcode_direct_absolute" = no; then
-	      add="$libdir/$linklib"
-	    elif test "$hardcode_minus_L" = yes; then
-	      add_dir="-L$libdir"
-	      add="-l$name"
-	    elif test "$hardcode_shlibpath_var" = yes; then
+	    if test yes = "$hardcode_direct" &&
+	       test no = "$hardcode_direct_absolute"; then
+	      add=$libdir/$linklib
+	    elif test yes = "$hardcode_minus_L"; then
+	      add_dir=-L$libdir
+	      add=-l$name
+	    elif test yes = "$hardcode_shlibpath_var"; then
 	      case :$finalize_shlibpath: in
 	      *":$libdir:"*) ;;
-	      *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;;
+	      *) func_append finalize_shlibpath "$libdir:" ;;
 	      esac
-	      add="-l$name"
-	    elif test "$hardcode_automatic" = yes; then
+	      add=-l$name
+	    elif test yes = "$hardcode_automatic"; then
 	      if test -n "$inst_prefix_dir" &&
-		 test -f "$inst_prefix_dir$libdir/$linklib" ; then
-		add="$inst_prefix_dir$libdir/$linklib"
+		 test -f "$inst_prefix_dir$libdir/$linklib"; then
+		add=$inst_prefix_dir$libdir/$linklib
 	      else
-		add="$libdir/$linklib"
+		add=$libdir/$linklib
 	      fi
 	    else
 	      # We cannot seem to hardcode it, guess we'll fake it.
-	      add_dir="-L$libdir"
+	      add_dir=-L$libdir
 	      # Try looking first in the location we're being installed to.
 	      if test -n "$inst_prefix_dir"; then
 		case $libdir in
 		  [\\/]*)
-		    add_dir="$add_dir -L$inst_prefix_dir$libdir"
+		    func_append add_dir " -L$inst_prefix_dir$libdir"
 		    ;;
 		esac
 	      fi
-	      add="-l$name"
+	      add=-l$name
 	    fi
 
-	    if test "$linkmode" = prog; then
+	    if test prog = "$linkmode"; then
 	      test -n "$add_dir" && finalize_deplibs="$add_dir $finalize_deplibs"
 	      test -n "$add" && finalize_deplibs="$add $finalize_deplibs"
 	    else
@@ -5805,43 +8381,43 @@ func_mode_link ()
 	      test -n "$add" && deplibs="$add $deplibs"
 	    fi
 	  fi
-	elif test "$linkmode" = prog; then
+	elif test prog = "$linkmode"; then
 	  # Here we assume that one of hardcode_direct or hardcode_minus_L
 	  # is not unsupported.  This is valid on all known static and
 	  # shared platforms.
-	  if test "$hardcode_direct" != unsupported; then
-	    test -n "$old_library" && linklib="$old_library"
+	  if test unsupported != "$hardcode_direct"; then
+	    test -n "$old_library" && linklib=$old_library
 	    compile_deplibs="$dir/$linklib $compile_deplibs"
 	    finalize_deplibs="$dir/$linklib $finalize_deplibs"
 	  else
 	    compile_deplibs="-l$name -L$dir $compile_deplibs"
 	    finalize_deplibs="-l$name -L$dir $finalize_deplibs"
 	  fi
-	elif test "$build_libtool_libs" = yes; then
+	elif test yes = "$build_libtool_libs"; then
 	  # Not a shared library
-	  if test "$deplibs_check_method" != pass_all; then
+	  if test pass_all != "$deplibs_check_method"; then
 	    # We're trying link a shared library against a static one
 	    # but the system doesn't support it.
 
 	    # Just print a warning and add the library to dependency_libs so
 	    # that the program can be linked against the static library.
-	    $ECHO
-	    $ECHO "*** Warning: This system can not link to static lib archive $lib."
-	    $ECHO "*** I have the capability to make that library automatically link in when"
-	    $ECHO "*** you link to this library.  But I can only do this if you have a"
-	    $ECHO "*** shared version of the library, which you do not appear to have."
-	    if test "$module" = yes; then
-	      $ECHO "*** But as you try to build a module library, libtool will still create "
-	      $ECHO "*** a static module, that should work as long as the dlopening application"
-	      $ECHO "*** is linked with the -dlopen flag to resolve symbols at runtime."
+	    echo
+	    $ECHO "*** Warning: This system cannot link to static lib archive $lib."
+	    echo "*** I have the capability to make that library automatically link in when"
+	    echo "*** you link to this library.  But I can only do this if you have a"
+	    echo "*** shared version of the library, which you do not appear to have."
+	    if test yes = "$module"; then
+	      echo "*** But as you try to build a module library, libtool will still create "
+	      echo "*** a static module, that should work as long as the dlopening application"
+	      echo "*** is linked with the -dlopen flag to resolve symbols at runtime."
 	      if test -z "$global_symbol_pipe"; then
-		$ECHO
-		$ECHO "*** However, this would only work if libtool was able to extract symbol"
-		$ECHO "*** lists from a program, using \`nm' or equivalent, but libtool could"
-		$ECHO "*** not find such a program.  So, this module is probably useless."
-		$ECHO "*** \`nm' from GNU binutils and a full rebuild may help."
+		echo
+		echo "*** However, this would only work if libtool was able to extract symbol"
+		echo "*** lists from a program, using 'nm' or equivalent, but libtool could"
+		echo "*** not find such a program.  So, this module is probably useless."
+		echo "*** 'nm' from GNU binutils and a full rebuild may help."
 	      fi
-	      if test "$build_old_libs" = no; then
+	      if test no = "$build_old_libs"; then
 		build_libtool_libs=module
 		build_old_libs=yes
 	      else
@@ -5854,11 +8430,11 @@ func_mode_link ()
 	  fi
 	fi # link shared/static library?
 
-	if test "$linkmode" = lib; then
+	if test lib = "$linkmode"; then
 	  if test -n "$dependency_libs" &&
-	     { test "$hardcode_into_libs" != yes ||
-	       test "$build_old_libs" = yes ||
-	       test "$link_static" = yes; }; then
+	     { test yes != "$hardcode_into_libs" ||
+	       test yes = "$build_old_libs" ||
+	       test yes = "$link_static"; }; then
 	    # Extract -R from dependency_libs
 	    temp_deplibs=
 	    for libdir in $dependency_libs; do
@@ -5867,45 +8443,54 @@ func_mode_link ()
 	           temp_xrpath=$func_stripname_result
 		   case " $xrpath " in
 		   *" $temp_xrpath "*) ;;
-		   *) xrpath="$xrpath $temp_xrpath";;
+		   *) func_append xrpath " $temp_xrpath";;
 		   esac;;
-	      *) temp_deplibs="$temp_deplibs $libdir";;
+	      *) func_append temp_deplibs " $libdir";;
 	      esac
 	    done
-	    dependency_libs="$temp_deplibs"
+	    dependency_libs=$temp_deplibs
 	  fi
 
-	  newlib_search_path="$newlib_search_path $absdir"
+	  func_append newlib_search_path " $absdir"
 	  # Link against this library
-	  test "$link_static" = no && newdependency_libs="$abs_ladir/$laname $newdependency_libs"
+	  test no = "$link_static" && newdependency_libs="$abs_ladir/$laname $newdependency_libs"
 	  # ... and its dependency_libs
 	  tmp_libs=
 	  for deplib in $dependency_libs; do
 	    newdependency_libs="$deplib $newdependency_libs"
-	    if $opt_duplicate_deps ; then
+	    case $deplib in
+              -L*) func_stripname '-L' '' "$deplib"
+                   func_resolve_sysroot "$func_stripname_result";;
+              *) func_resolve_sysroot "$deplib" ;;
+            esac
+	    if $opt_preserve_dup_deps; then
 	      case "$tmp_libs " in
-	      *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
+	      *" $func_resolve_sysroot_result "*)
+                func_append specialdeplibs " $func_resolve_sysroot_result" ;;
 	      esac
 	    fi
-	    tmp_libs="$tmp_libs $deplib"
+	    func_append tmp_libs " $func_resolve_sysroot_result"
 	  done
 
-	  if test "$link_all_deplibs" != no; then
+	  if test no != "$link_all_deplibs"; then
 	    # Add the search paths of all dependency libraries
 	    for deplib in $dependency_libs; do
+	      path=
 	      case $deplib in
-	      -L*) path="$deplib" ;;
+	      -L*) path=$deplib ;;
 	      *.la)
+	        func_resolve_sysroot "$deplib"
+	        deplib=$func_resolve_sysroot_result
 	        func_dirname "$deplib" "" "."
-		dir="$func_dirname_result"
+		dir=$func_dirname_result
 		# We need an absolute path.
 		case $dir in
-		[\\/]* | [A-Za-z]:[\\/]*) absdir="$dir" ;;
+		[\\/]* | [A-Za-z]:[\\/]*) absdir=$dir ;;
 		*)
 		  absdir=`cd "$dir" && pwd`
 		  if test -z "$absdir"; then
-		    func_warning "cannot determine absolute directory name of \`$dir'"
-		    absdir="$dir"
+		    func_warning "cannot determine absolute directory name of '$dir'"
+		    absdir=$dir
 		  fi
 		  ;;
 		esac
@@ -5913,35 +8498,35 @@ func_mode_link ()
 		case $host in
 		*-*-darwin*)
 		  depdepl=
-		  eval deplibrary_names=`${SED} -n -e 's/^library_names=\(.*\)$/\1/p' $deplib`
-		  if test -n "$deplibrary_names" ; then
-		    for tmp in $deplibrary_names ; do
+		  eval deplibrary_names=`$SED -n -e 's/^library_names=\(.*\)$/\1/p' $deplib`
+		  if test -n "$deplibrary_names"; then
+		    for tmp in $deplibrary_names; do
 		      depdepl=$tmp
 		    done
-		    if test -f "$absdir/$objdir/$depdepl" ; then
-		      depdepl="$absdir/$objdir/$depdepl"
-		      darwin_install_name=`${OTOOL} -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'`
+		    if test -f "$absdir/$objdir/$depdepl"; then
+		      depdepl=$absdir/$objdir/$depdepl
+		      darwin_install_name=`$OTOOL -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'`
                       if test -z "$darwin_install_name"; then
-                          darwin_install_name=`${OTOOL64} -L $depdepl  | awk '{if (NR == 2) {print $1;exit}}'`
+                          darwin_install_name=`$OTOOL64 -L $depdepl  | awk '{if (NR == 2) {print $1;exit}}'`
                       fi
-		      compiler_flags="$compiler_flags ${wl}-dylib_file ${wl}${darwin_install_name}:${depdepl}"
-		      linker_flags="$linker_flags -dylib_file ${darwin_install_name}:${depdepl}"
+		      func_append compiler_flags " $wl-dylib_file $wl$darwin_install_name:$depdepl"
+		      func_append linker_flags " -dylib_file $darwin_install_name:$depdepl"
 		      path=
 		    fi
 		  fi
 		  ;;
 		*)
-		  path="-L$absdir/$objdir"
+		  path=-L$absdir/$objdir
 		  ;;
 		esac
 		else
-		  eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
+		  eval libdir=`$SED -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
 		  test -z "$libdir" && \
-		    func_fatal_error "\`$deplib' is not a valid libtool archive"
+		    func_fatal_error "'$deplib' is not a valid libtool archive"
 		  test "$absdir" != "$libdir" && \
-		    func_warning "\`$deplib' seems to be moved"
+		    func_warning "'$deplib' seems to be moved"
 
-		  path="-L$absdir"
+		  path=-L$absdir
 		fi
 		;;
 	      esac
@@ -5953,38 +8538,38 @@ func_mode_link ()
 	  fi # link_all_deplibs != no
 	fi # linkmode = lib
       done # for deplib in $libs
-      if test "$pass" = link; then
-	if test "$linkmode" = "prog"; then
+      if test link = "$pass"; then
+	if test prog = "$linkmode"; then
 	  compile_deplibs="$new_inherited_linker_flags $compile_deplibs"
 	  finalize_deplibs="$new_inherited_linker_flags $finalize_deplibs"
 	else
-	  compiler_flags="$compiler_flags "`$ECHO "X $new_inherited_linker_flags" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'`
+	  compiler_flags="$compiler_flags "`$ECHO " $new_inherited_linker_flags" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'`
 	fi
       fi
-      dependency_libs="$newdependency_libs"
-      if test "$pass" = dlpreopen; then
+      dependency_libs=$newdependency_libs
+      if test dlpreopen = "$pass"; then
 	# Link the dlpreopened libraries before other libraries
 	for deplib in $save_deplibs; do
 	  deplibs="$deplib $deplibs"
 	done
       fi
-      if test "$pass" != dlopen; then
-	if test "$pass" != conv; then
+      if test dlopen != "$pass"; then
+	test conv = "$pass" || {
 	  # Make sure lib_search_path contains only unique directories.
 	  lib_search_path=
 	  for dir in $newlib_search_path; do
 	    case "$lib_search_path " in
 	    *" $dir "*) ;;
-	    *) lib_search_path="$lib_search_path $dir" ;;
+	    *) func_append lib_search_path " $dir" ;;
 	    esac
 	  done
 	  newlib_search_path=
-	fi
+	}
 
-	if test "$linkmode,$pass" != "prog,link"; then
-	  vars="deplibs"
-	else
+	if test prog,link = "$linkmode,$pass"; then
 	  vars="compile_deplibs finalize_deplibs"
+	else
+	  vars=deplibs
 	fi
 	for var in $vars dependency_libs; do
 	  # Add libraries to $var in reverse order
@@ -6033,71 +8618,102 @@ func_mode_link ()
 	    -L*)
 	      case " $tmp_libs " in
 	      *" $deplib "*) ;;
-	      *) tmp_libs="$tmp_libs $deplib" ;;
+	      *) func_append tmp_libs " $deplib" ;;
 	      esac
 	      ;;
-	    *) tmp_libs="$tmp_libs $deplib" ;;
+	    *) func_append tmp_libs " $deplib" ;;
 	    esac
 	  done
 	  eval $var=\"$tmp_libs\"
 	done # for var
       fi
+
+      # Add Sun CC postdeps if required:
+      test CXX = "$tagname" && {
+        case $host_os in
+        linux*)
+          case `$CC -V 2>&1 | sed 5q` in
+          *Sun\ C*) # Sun C++ 5.9
+            func_suncc_cstd_abi
+
+            if test no != "$suncc_use_cstd_abi"; then
+              func_append postdeps ' -library=Cstd -library=Crun'
+            fi
+            ;;
+          esac
+          ;;
+
+        solaris*)
+          func_cc_basename "$CC"
+          case $func_cc_basename_result in
+          CC* | sunCC*)
+            func_suncc_cstd_abi
+
+            if test no != "$suncc_use_cstd_abi"; then
+              func_append postdeps ' -library=Cstd -library=Crun'
+            fi
+            ;;
+          esac
+          ;;
+        esac
+      }
+
       # Last step: remove runtime libs from dependency_libs
       # (they stay in deplibs)
       tmp_libs=
-      for i in $dependency_libs ; do
+      for i in $dependency_libs; do
 	case " $predeps $postdeps $compiler_lib_search_path " in
 	*" $i "*)
-	  i=""
+	  i=
 	  ;;
 	esac
-	if test -n "$i" ; then
-	  tmp_libs="$tmp_libs $i"
+	if test -n "$i"; then
+	  func_append tmp_libs " $i"
 	fi
       done
       dependency_libs=$tmp_libs
     done # for pass
-    if test "$linkmode" = prog; then
-      dlfiles="$newdlfiles"
+    if test prog = "$linkmode"; then
+      dlfiles=$newdlfiles
     fi
-    if test "$linkmode" = prog || test "$linkmode" = lib; then
-      dlprefiles="$newdlprefiles"
+    if test prog = "$linkmode" || test lib = "$linkmode"; then
+      dlprefiles=$newdlprefiles
     fi
 
     case $linkmode in
     oldlib)
-      if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
-	func_warning "\`-dlopen' is ignored for archives"
+      if test -n "$dlfiles$dlprefiles" || test no != "$dlself"; then
+	func_warning "'-dlopen' is ignored for archives"
       fi
 
       case " $deplibs" in
       *\ -l* | *\ -L*)
-	func_warning "\`-l' and \`-L' are ignored for archives" ;;
+	func_warning "'-l' and '-L' are ignored for archives" ;;
       esac
 
       test -n "$rpath" && \
-	func_warning "\`-rpath' is ignored for archives"
+	func_warning "'-rpath' is ignored for archives"
 
       test -n "$xrpath" && \
-	func_warning "\`-R' is ignored for archives"
+	func_warning "'-R' is ignored for archives"
 
       test -n "$vinfo" && \
-	func_warning "\`-version-info/-version-number' is ignored for archives"
+	func_warning "'-version-info/-version-number' is ignored for archives"
 
       test -n "$release" && \
-	func_warning "\`-release' is ignored for archives"
+	func_warning "'-release' is ignored for archives"
 
       test -n "$export_symbols$export_symbols_regex" && \
-	func_warning "\`-export-symbols' is ignored for archives"
+	func_warning "'-export-symbols' is ignored for archives"
 
       # Now set the variables for building old libraries.
       build_libtool_libs=no
-      oldlibs="$output"
-      objs="$objs$old_deplibs"
+      oldlibs=$output
+      func_append objs "$old_deplibs"
       ;;
 
     lib)
-      # Make sure we only generate libraries of the form `libNAME.la'.
+      # Make sure we only generate libraries of the form 'libNAME.la'.
       case $outputname in
       lib*)
 	func_stripname 'lib' '.la' "$outputname"
@@ -6106,10 +8722,10 @@ func_mode_link ()
 	eval libname=\"$libname_spec\"
 	;;
       *)
-	test "$module" = no && \
-	  func_fatal_help "libtool library \`$output' must begin with \`lib'"
+	test no = "$module" \
+	  && func_fatal_help "libtool library '$output' must begin with 'lib'"
 
-	if test "$need_lib_prefix" != no; then
+	if test no != "$need_lib_prefix"; then
 	  # Add the "lib" prefix for modules if required
 	  func_stripname '' '.la' "$outputname"
 	  name=$func_stripname_result
@@ -6123,31 +8739,31 @@ func_mode_link ()
       esac
 
       if test -n "$objs"; then
-	if test "$deplibs_check_method" != pass_all; then
-	  func_fatal_error "cannot build libtool library \`$output' from non-libtool objects on this host:$objs"
+	if test pass_all != "$deplibs_check_method"; then
+	  func_fatal_error "cannot build libtool library '$output' from non-libtool objects on this host:$objs"
 	else
-	  $ECHO
+	  echo
 	  $ECHO "*** Warning: Linking the shared library $output against the non-libtool"
 	  $ECHO "*** objects $objs is not portable!"
-	  libobjs="$libobjs $objs"
+	  func_append libobjs " $objs"
 	fi
       fi
 
-      test "$dlself" != no && \
-	func_warning "\`-dlopen self' is ignored for libtool libraries"
+      test no = "$dlself" \
+	|| func_warning "'-dlopen self' is ignored for libtool libraries"
 
       set dummy $rpath
       shift
-      test "$#" -gt 1 && \
-	func_warning "ignoring multiple \`-rpath's for a libtool library"
+      test 1 -lt "$#" \
+	&& func_warning "ignoring multiple '-rpath's for a libtool library"
 
-      install_libdir="$1"
+      install_libdir=$1
 
       oldlibs=
       if test -z "$rpath"; then
-	if test "$build_libtool_libs" = yes; then
+	if test yes = "$build_libtool_libs"; then
 	  # Building a libtool convenience library.
-	  # Some compilers have problems with a `.al' extension so
+	  # Some compilers have problems with a '.al' extension so
 	  # convenience libraries should have the same extension an
 	  # archive normally would.
 	  oldlibs="$output_objdir/$libname.$libext $oldlibs"
@@ -6156,20 +8772,20 @@ func_mode_link ()
 	fi
 
 	test -n "$vinfo" && \
-	  func_warning "\`-version-info/-version-number' is ignored for convenience libraries"
+	  func_warning "'-version-info/-version-number' is ignored for convenience libraries"
 
 	test -n "$release" && \
-	  func_warning "\`-release' is ignored for convenience libraries"
+	  func_warning "'-release' is ignored for convenience libraries"
       else
 
 	# Parse the version information argument.
-	save_ifs="$IFS"; IFS=':'
+	save_ifs=$IFS; IFS=:
 	set dummy $vinfo 0 0 0
 	shift
-	IFS="$save_ifs"
+	IFS=$save_ifs
 
 	test -n "$7" && \
-	  func_fatal_help "too many parameters to \`-version-info'"
+	  func_fatal_help "too many parameters to '-version-info'"
 
 	# convert absolute version numbers to libtool ages
 	# this retains compatibility with .la files and attempts
@@ -6177,41 +8793,42 @@ func_mode_link ()
 
 	case $vinfo_number in
 	yes)
-	  number_major="$1"
-	  number_minor="$2"
-	  number_revision="$3"
+	  number_major=$1
+	  number_minor=$2
+	  number_revision=$3
 	  #
 	  # There are really only two kinds -- those that
 	  # use the current revision as the major version
 	  # and those that subtract age and use age as
 	  # a minor version.  But, then there is irix
-	  # which has an extra 1 added just for fun
+	  # that has an extra 1 added just for fun
 	  #
 	  case $version_type in
-	  darwin|linux|osf|windows|none)
+	  # correct linux to gnu/linux during the next big refactor
+	  darwin|freebsd-elf|linux|osf|windows|none)
 	    func_arith $number_major + $number_minor
 	    current=$func_arith_result
-	    age="$number_minor"
-	    revision="$number_revision"
+	    age=$number_minor
+	    revision=$number_revision
 	    ;;
-	  freebsd-aout|freebsd-elf|sunos)
-	    current="$number_major"
-	    revision="$number_minor"
-	    age="0"
+	  freebsd-aout|qnx|sunos)
+	    current=$number_major
+	    revision=$number_minor
+	    age=0
 	    ;;
 	  irix|nonstopux)
 	    func_arith $number_major + $number_minor
 	    current=$func_arith_result
-	    age="$number_minor"
-	    revision="$number_minor"
+	    age=$number_minor
+	    revision=$number_minor
 	    lt_irix_increment=no
 	    ;;
 	  esac
 	  ;;
 	no)
-	  current="$1"
-	  revision="$2"
-	  age="$3"
+	  current=$1
+	  revision=$2
+	  age=$3
 	  ;;
 	esac
 
@@ -6219,30 +8836,30 @@ func_mode_link ()
 	case $current in
 	0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;;
 	*)
-	  func_error "CURRENT \`$current' must be a nonnegative integer"
-	  func_fatal_error "\`$vinfo' is not valid version information"
+	  func_error "CURRENT '$current' must be a nonnegative integer"
+	  func_fatal_error "'$vinfo' is not valid version information"
 	  ;;
 	esac
 
 	case $revision in
 	0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;;
 	*)
-	  func_error "REVISION \`$revision' must be a nonnegative integer"
-	  func_fatal_error "\`$vinfo' is not valid version information"
+	  func_error "REVISION '$revision' must be a nonnegative integer"
+	  func_fatal_error "'$vinfo' is not valid version information"
 	  ;;
 	esac
 
 	case $age in
 	0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;;
 	*)
-	  func_error "AGE \`$age' must be a nonnegative integer"
-	  func_fatal_error "\`$vinfo' is not valid version information"
+	  func_error "AGE '$age' must be a nonnegative integer"
+	  func_fatal_error "'$vinfo' is not valid version information"
 	  ;;
 	esac
 
 	if test "$age" -gt "$current"; then
-	  func_error "AGE \`$age' is greater than the current interface number \`$current'"
-	  func_fatal_error "\`$vinfo' is not valid version information"
+	  func_error "AGE '$age' is greater than the current interface number '$current'"
+	  func_fatal_error "'$vinfo' is not valid version information"
 	fi
 
 	# Calculate the version variables.
@@ -6257,26 +8874,36 @@ func_mode_link ()
 	  # verstring for coding it into the library header
 	  func_arith $current - $age
 	  major=.$func_arith_result
-	  versuffix="$major.$age.$revision"
+	  versuffix=$major.$age.$revision
 	  # Darwin ld doesn't like 0 for these options...
 	  func_arith $current + 1
 	  minor_current=$func_arith_result
-	  xlcverstring="${wl}-compatibility_version ${wl}$minor_current ${wl}-current_version ${wl}$minor_current.$revision"
+	  xlcverstring="$wl-compatibility_version $wl$minor_current $wl-current_version $wl$minor_current.$revision"
 	  verstring="-compatibility_version $minor_current -current_version $minor_current.$revision"
+          # On Darwin other compilers
+          case $CC in
+              nagfor*)
+                  verstring="$wl-compatibility_version $wl$minor_current $wl-current_version $wl$minor_current.$revision"
+                  ;;
+              *)
+                  verstring="-compatibility_version $minor_current -current_version $minor_current.$revision"
+                  ;;
+          esac
 	  ;;
 
 	freebsd-aout)
-	  major=".$current"
-	  versuffix=".$current.$revision";
+	  major=.$current
+	  versuffix=.$current.$revision
 	  ;;
 
 	freebsd-elf)
-	  major=".$current"
-	  versuffix=".$current"
+	  func_arith $current - $age
+	  major=.$func_arith_result
+	  versuffix=$major.$age.$revision
 	  ;;
 
 	irix | nonstopux)
-	  if test "X$lt_irix_increment" = "Xno"; then
+	  if test no = "$lt_irix_increment"; then
 	    func_arith $current - $age
 	  else
 	    func_arith $current - $age + 1
@@ -6287,69 +8914,74 @@ func_mode_link ()
 	    nonstopux) verstring_prefix=nonstopux ;;
 	    *)         verstring_prefix=sgi ;;
 	  esac
-	  verstring="$verstring_prefix$major.$revision"
+	  verstring=$verstring_prefix$major.$revision
 
 	  # Add in all the interfaces that we are compatible with.
 	  loop=$revision
-	  while test "$loop" -ne 0; do
+	  while test 0 -ne "$loop"; do
 	    func_arith $revision - $loop
 	    iface=$func_arith_result
 	    func_arith $loop - 1
 	    loop=$func_arith_result
-	    verstring="$verstring_prefix$major.$iface:$verstring"
+	    verstring=$verstring_prefix$major.$iface:$verstring
 	  done
 
-	  # Before this point, $major must not contain `.'.
+	  # Before this point, $major must not contain '.'.
 	  major=.$major
-	  versuffix="$major.$revision"
+	  versuffix=$major.$revision
 	  ;;
 
-	linux)
+	linux) # correct to gnu/linux during the next big refactor
 	  func_arith $current - $age
 	  major=.$func_arith_result
-	  versuffix="$major.$age.$revision"
+	  versuffix=$major.$age.$revision
 	  ;;
 
 	osf)
 	  func_arith $current - $age
 	  major=.$func_arith_result
-	  versuffix=".$current.$age.$revision"
-	  verstring="$current.$age.$revision"
+	  versuffix=.$current.$age.$revision
+	  verstring=$current.$age.$revision
 
 	  # Add in all the interfaces that we are compatible with.
 	  loop=$age
-	  while test "$loop" -ne 0; do
+	  while test 0 -ne "$loop"; do
 	    func_arith $current - $loop
 	    iface=$func_arith_result
 	    func_arith $loop - 1
 	    loop=$func_arith_result
-	    verstring="$verstring:${iface}.0"
+	    verstring=$verstring:$iface.0
 	  done
 
 	  # Make executables depend on our current version.
-	  verstring="$verstring:${current}.0"
+	  func_append verstring ":$current.0"
 	  ;;
 
 	qnx)
-	  major=".$current"
-	  versuffix=".$current"
+	  major=.$current
+	  versuffix=.$current
+	  ;;
+
+	sco)
+	  major=.$current
+	  versuffix=.$current
 	  ;;
 
 	sunos)
-	  major=".$current"
-	  versuffix=".$current.$revision"
+	  major=.$current
+	  versuffix=.$current.$revision
 	  ;;
 
 	windows)
 	  # Use '-' rather than '.', since we only want one
-	  # extension on DOS 8.3 filesystems.
+	  # extension on DOS 8.3 file systems.
 	  func_arith $current - $age
 	  major=$func_arith_result
-	  versuffix="-$major"
+	  versuffix=-$major
 	  ;;
 
 	*)
-	  func_fatal_configuration "unknown library version type \`$version_type'"
+	  func_fatal_configuration "unknown library version type '$version_type'"
 	  ;;
 	esac
 
@@ -6363,42 +8995,45 @@ func_mode_link ()
 	    verstring=
 	    ;;
 	  *)
-	    verstring="0.0"
+	    verstring=0.0
 	    ;;
 	  esac
-	  if test "$need_version" = no; then
+	  if test no = "$need_version"; then
 	    versuffix=
 	  else
-	    versuffix=".0.0"
+	    versuffix=.0.0
 	  fi
 	fi
 
 	# Remove version info from name if versioning should be avoided
-	if test "$avoid_version" = yes && test "$need_version" = no; then
+	if test yes,no = "$avoid_version,$need_version"; then
 	  major=
 	  versuffix=
-	  verstring=""
+	  verstring=
 	fi
 
 	# Check to see if the archive will have undefined symbols.
-	if test "$allow_undefined" = yes; then
-	  if test "$allow_undefined_flag" = unsupported; then
-	    func_warning "undefined symbols not allowed in $host shared libraries"
-	    build_libtool_libs=no
-	    build_old_libs=yes
+	if test yes = "$allow_undefined"; then
+	  if test unsupported = "$allow_undefined_flag"; then
+	    if test yes = "$build_old_libs"; then
+	      func_warning "undefined symbols not allowed in $host shared libraries; building static only"
+	      build_libtool_libs=no
+	    else
+	      func_fatal_error "can't build $host shared library unless -no-undefined is specified"
+	    fi
 	  fi
 	else
 	  # Don't allow undefined symbols.
-	  allow_undefined_flag="$no_undefined_flag"
+	  allow_undefined_flag=$no_undefined_flag
 	fi
 
       fi
 
-      func_generate_dlsyms "$libname" "$libname" "yes"
-      libobjs="$libobjs $symfileobj"
-      test "X$libobjs" = "X " && libobjs=
+      func_generate_dlsyms "$libname" "$libname" :
+      func_append libobjs " $symfileobj"
+      test " " = "$libobjs" && libobjs=
 
-      if test "$mode" != relink; then
+      if test relink != "$opt_mode"; then
 	# Remove our outputs, but don't remove object files since they
 	# may have been created when compiling PIC objects.
 	removelist=
@@ -6407,14 +9042,14 @@ func_mode_link ()
 	  case $p in
 	    *.$objext | *.gcno)
 	       ;;
-	    $output_objdir/$outputname | $output_objdir/$libname.* | $output_objdir/${libname}${release}.*)
-	       if test "X$precious_files_regex" != "X"; then
+	    $output_objdir/$outputname | $output_objdir/$libname.* | $output_objdir/$libname$release.*)
+	       if test -n "$precious_files_regex"; then
 		 if $ECHO "$p" | $EGREP -e "$precious_files_regex" >/dev/null 2>&1
 		 then
 		   continue
 		 fi
 	       fi
-	       removelist="$removelist $p"
+	       func_append removelist " $p"
 	       ;;
 	    *) ;;
 	  esac
@@ -6424,64 +9059,65 @@ func_mode_link ()
       fi
 
       # Now set the variables for building old libraries.
-      if test "$build_old_libs" = yes && test "$build_libtool_libs" != convenience ; then
-	oldlibs="$oldlibs $output_objdir/$libname.$libext"
+      if test yes = "$build_old_libs" && test convenience != "$build_libtool_libs"; then
+	func_append oldlibs " $output_objdir/$libname.$libext"
 
 	# Transform .lo files to .o files.
-	oldobjs="$objs "`$ECHO "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}'$/d' -e "$lo2o" | $NL2SP`
+	oldobjs="$objs "`$ECHO "$libobjs" | $SP2NL | $SED "/\.$libext$/d; $lo2o" | $NL2SP`
       fi
 
       # Eliminate all temporary directories.
       #for path in $notinst_path; do
-      #	lib_search_path=`$ECHO "X$lib_search_path " | $Xsed -e "s% $path % %g"`
-      #	deplibs=`$ECHO "X$deplibs " | $Xsed -e "s% -L$path % %g"`
-      #	dependency_libs=`$ECHO "X$dependency_libs " | $Xsed -e "s% -L$path % %g"`
+      #	lib_search_path=`$ECHO "$lib_search_path " | $SED "s% $path % %g"`
+      #	deplibs=`$ECHO "$deplibs " | $SED "s% -L$path % %g"`
+      #	dependency_libs=`$ECHO "$dependency_libs " | $SED "s% -L$path % %g"`
       #done
 
       if test -n "$xrpath"; then
 	# If the user specified any rpath flags, then add them.
 	temp_xrpath=
 	for libdir in $xrpath; do
-	  temp_xrpath="$temp_xrpath -R$libdir"
+	  func_replace_sysroot "$libdir"
+	  func_append temp_xrpath " -R$func_replace_sysroot_result"
 	  case "$finalize_rpath " in
 	  *" $libdir "*) ;;
-	  *) finalize_rpath="$finalize_rpath $libdir" ;;
+	  *) func_append finalize_rpath " $libdir" ;;
 	  esac
 	done
-	if test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes; then
+	if test yes != "$hardcode_into_libs" || test yes = "$build_old_libs"; then
 	  dependency_libs="$temp_xrpath $dependency_libs"
 	fi
       fi
 
       # Make sure dlfiles contains only unique files that won't be dlpreopened
-      old_dlfiles="$dlfiles"
+      old_dlfiles=$dlfiles
       dlfiles=
       for lib in $old_dlfiles; do
 	case " $dlprefiles $dlfiles " in
 	*" $lib "*) ;;
-	*) dlfiles="$dlfiles $lib" ;;
+	*) func_append dlfiles " $lib" ;;
 	esac
       done
 
       # Make sure dlprefiles contains only unique files
-      old_dlprefiles="$dlprefiles"
+      old_dlprefiles=$dlprefiles
       dlprefiles=
       for lib in $old_dlprefiles; do
 	case "$dlprefiles " in
 	*" $lib "*) ;;
-	*) dlprefiles="$dlprefiles $lib" ;;
+	*) func_append dlprefiles " $lib" ;;
 	esac
       done
 
-      if test "$build_libtool_libs" = yes; then
+      if test yes = "$build_libtool_libs"; then
 	if test -n "$rpath"; then
 	  case $host in
-	  *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos* | *-cegcc*)
+	  *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos* | *-cegcc* | *-*-haiku*)
 	    # these systems don't actually have a c library (as such)!
 	    ;;
 	  *-*-rhapsody* | *-*-darwin1.[012])
 	    # Rhapsody C library is in the System framework
-	    deplibs="$deplibs System.ltframework"
+	    func_append deplibs " System.ltframework"
 	    ;;
 	  *-*-netbsd*)
 	    # Don't link with libc until the a.out ld.so is fixed.
@@ -6497,8 +9133,8 @@ func_mode_link ()
 	    ;;
 	  *)
 	    # Add libc to deplibs on all other systems if necessary.
-	    if test "$build_libtool_need_lc" = "yes"; then
-	      deplibs="$deplibs -lc"
+	    if test yes = "$build_libtool_need_lc"; then
+	      func_append deplibs " -lc"
 	    fi
 	    ;;
 	  esac
@@ -6513,9 +9149,9 @@ func_mode_link ()
 	# I'm not sure if I'm treating the release correctly.  I think
 	# release should show up in the -l (ie -lgmp5) so we don't want to
 	# add it in twice.  Is that correct?
-	release=""
-	versuffix=""
-	major=""
+	release=
+	versuffix=
+	major=
 	newdeplibs=
 	droppeddeps=no
 	case $deplibs_check_method in
@@ -6544,35 +9180,35 @@ EOF
 	      -l*)
 		func_stripname -l '' "$i"
 		name=$func_stripname_result
-		if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
+		if test yes = "$allow_libtool_libs_with_static_runtimes"; then
 		  case " $predeps $postdeps " in
 		  *" $i "*)
-		    newdeplibs="$newdeplibs $i"
-		    i=""
+		    func_append newdeplibs " $i"
+		    i=
 		    ;;
 		  esac
 		fi
-		if test -n "$i" ; then
+		if test -n "$i"; then
 		  libname=`eval "\\$ECHO \"$libname_spec\""`
 		  deplib_matches=`eval "\\$ECHO \"$library_names_spec\""`
 		  set dummy $deplib_matches; shift
 		  deplib_match=$1
-		  if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then
-		    newdeplibs="$newdeplibs $i"
+		  if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0; then
+		    func_append newdeplibs " $i"
 		  else
 		    droppeddeps=yes
-		    $ECHO
+		    echo
 		    $ECHO "*** Warning: dynamic linker does not accept needed library $i."
-		    $ECHO "*** I have the capability to make that library automatically link in when"
-		    $ECHO "*** you link to this library.  But I can only do this if you have a"
-		    $ECHO "*** shared version of the library, which I believe you do not have"
-		    $ECHO "*** because a test_compile did reveal that the linker did not use it for"
-		    $ECHO "*** its dynamic dependency list that programs get resolved with at runtime."
+		    echo "*** I have the capability to make that library automatically link in when"
+		    echo "*** you link to this library.  But I can only do this if you have a"
+		    echo "*** shared version of the library, which I believe you do not have"
+		    echo "*** because a test_compile did reveal that the linker did not use it for"
+		    echo "*** its dynamic dependency list that programs get resolved with at runtime."
 		  fi
 		fi
 		;;
 	      *)
-		newdeplibs="$newdeplibs $i"
+		func_append newdeplibs " $i"
 		;;
 	      esac
 	    done
@@ -6587,43 +9223,43 @@ EOF
 		$opt_dry_run || $RM conftest
 		if $LTCC $LTCFLAGS -o conftest conftest.c $i; then
 		  ldd_output=`ldd conftest`
-		  if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
+		  if test yes = "$allow_libtool_libs_with_static_runtimes"; then
 		    case " $predeps $postdeps " in
 		    *" $i "*)
-		      newdeplibs="$newdeplibs $i"
-		      i=""
+		      func_append newdeplibs " $i"
+		      i=
 		      ;;
 		    esac
 		  fi
-		  if test -n "$i" ; then
+		  if test -n "$i"; then
 		    libname=`eval "\\$ECHO \"$libname_spec\""`
 		    deplib_matches=`eval "\\$ECHO \"$library_names_spec\""`
 		    set dummy $deplib_matches; shift
 		    deplib_match=$1
-		    if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then
-		      newdeplibs="$newdeplibs $i"
+		    if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0; then
+		      func_append newdeplibs " $i"
 		    else
 		      droppeddeps=yes
-		      $ECHO
+		      echo
 		      $ECHO "*** Warning: dynamic linker does not accept needed library $i."
-		      $ECHO "*** I have the capability to make that library automatically link in when"
-		      $ECHO "*** you link to this library.  But I can only do this if you have a"
-		      $ECHO "*** shared version of the library, which you do not appear to have"
-		      $ECHO "*** because a test_compile did reveal that the linker did not use this one"
-		      $ECHO "*** as a dynamic dependency that programs can get resolved with at runtime."
+		      echo "*** I have the capability to make that library automatically link in when"
+		      echo "*** you link to this library.  But I can only do this if you have a"
+		      echo "*** shared version of the library, which you do not appear to have"
+		      echo "*** because a test_compile did reveal that the linker did not use this one"
+		      echo "*** as a dynamic dependency that programs can get resolved with at runtime."
 		    fi
 		  fi
 		else
 		  droppeddeps=yes
-		  $ECHO
+		  echo
 		  $ECHO "*** Warning!  Library $i is needed by this library but I was not able to"
-		  $ECHO "*** make it link in!  You will probably need to install it or some"
-		  $ECHO "*** library that it depends on before this library will be fully"
-		  $ECHO "*** functional.  Installing it before continuing would be even better."
+		  echo "*** make it link in!  You will probably need to install it or some"
+		  echo "*** library that it depends on before this library will be fully"
+		  echo "*** functional.  Installing it before continuing would be even better."
 		fi
 		;;
 	      *)
-		newdeplibs="$newdeplibs $i"
+		func_append newdeplibs " $i"
 		;;
 	      esac
 	    done
@@ -6637,18 +9273,30 @@ EOF
 	    -l*)
 	      func_stripname -l '' "$a_deplib"
 	      name=$func_stripname_result
-	      if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
+	      if test yes = "$allow_libtool_libs_with_static_runtimes"; then
 		case " $predeps $postdeps " in
 		*" $a_deplib "*)
-		  newdeplibs="$newdeplibs $a_deplib"
-		  a_deplib=""
+		  func_append newdeplibs " $a_deplib"
+		  a_deplib=
 		  ;;
 		esac
 	      fi
-	      if test -n "$a_deplib" ; then
+	      if test -n "$a_deplib"; then
 		libname=`eval "\\$ECHO \"$libname_spec\""`
+		if test -n "$file_magic_glob"; then
+		  libnameglob=`func_echo_all "$libname" | $SED -e $file_magic_glob`
+		else
+		  libnameglob=$libname
+		fi
+		test yes = "$want_nocaseglob" && nocaseglob=`shopt -p nocaseglob`
 		for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do
-		  potential_libs=`ls $i/$libname[.-]* 2>/dev/null`
+		  if test yes = "$want_nocaseglob"; then
+		    shopt -s nocaseglob
+		    potential_libs=`ls $i/$libnameglob[.-]* 2>/dev/null`
+		    $nocaseglob
+		  else
+		    potential_libs=`ls $i/$libnameglob[.-]* 2>/dev/null`
+		  fi
 		  for potent_lib in $potential_libs; do
 		      # Follow soft links.
 		      if ls -lLd "$potent_lib" 2>/dev/null |
@@ -6660,33 +9308,33 @@ EOF
 		      # We might still enter an endless loop, since a link
 		      # loop can be closed while we follow links,
 		      # but so what?
-		      potlib="$potent_lib"
+		      potlib=$potent_lib
 		      while test -h "$potlib" 2>/dev/null; do
-			potliblink=`ls -ld $potlib | ${SED} 's/.* -> //'`
+			potliblink=`ls -ld $potlib | $SED 's/.* -> //'`
 			case $potliblink in
-			[\\/]* | [A-Za-z]:[\\/]*) potlib="$potliblink";;
-			*) potlib=`$ECHO "X$potlib" | $Xsed -e 's,[^/]*$,,'`"$potliblink";;
+			[\\/]* | [A-Za-z]:[\\/]*) potlib=$potliblink;;
+			*) potlib=`$ECHO "$potlib" | $SED 's|[^/]*$||'`"$potliblink";;
 			esac
 		      done
 		      if eval $file_magic_cmd \"\$potlib\" 2>/dev/null |
 			 $SED -e 10q |
 			 $EGREP "$file_magic_regex" > /dev/null; then
-			newdeplibs="$newdeplibs $a_deplib"
-			a_deplib=""
+			func_append newdeplibs " $a_deplib"
+			a_deplib=
 			break 2
 		      fi
 		  done
 		done
 	      fi
-	      if test -n "$a_deplib" ; then
+	      if test -n "$a_deplib"; then
 		droppeddeps=yes
-		$ECHO
+		echo
 		$ECHO "*** Warning: linker path does not have real file for library $a_deplib."
-		$ECHO "*** I have the capability to make that library automatically link in when"
-		$ECHO "*** you link to this library.  But I can only do this if you have a"
-		$ECHO "*** shared version of the library, which you do not appear to have"
-		$ECHO "*** because I did check the linker path looking for a file starting"
-		if test -z "$potlib" ; then
+		echo "*** I have the capability to make that library automatically link in when"
+		echo "*** you link to this library.  But I can only do this if you have a"
+		echo "*** shared version of the library, which you do not appear to have"
+		echo "*** because I did check the linker path looking for a file starting"
+		if test -z "$potlib"; then
 		  $ECHO "*** with $libname but no candidates were found. (...for file magic test)"
 		else
 		  $ECHO "*** with $libname and none of the candidates passed a file format test"
@@ -6696,7 +9344,7 @@ EOF
 	      ;;
 	    *)
 	      # Add a -L argument.
-	      newdeplibs="$newdeplibs $a_deplib"
+	      func_append newdeplibs " $a_deplib"
 	      ;;
 	    esac
 	  done # Gone through all deplibs.
@@ -6709,38 +9357,38 @@ EOF
 	    -l*)
 	      func_stripname -l '' "$a_deplib"
 	      name=$func_stripname_result
-	      if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
+	      if test yes = "$allow_libtool_libs_with_static_runtimes"; then
 		case " $predeps $postdeps " in
 		*" $a_deplib "*)
-		  newdeplibs="$newdeplibs $a_deplib"
-		  a_deplib=""
+		  func_append newdeplibs " $a_deplib"
+		  a_deplib=
 		  ;;
 		esac
 	      fi
-	      if test -n "$a_deplib" ; then
+	      if test -n "$a_deplib"; then
 		libname=`eval "\\$ECHO \"$libname_spec\""`
 		for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do
 		  potential_libs=`ls $i/$libname[.-]* 2>/dev/null`
 		  for potent_lib in $potential_libs; do
-		    potlib="$potent_lib" # see symlink-check above in file_magic test
-		    if eval "\$ECHO \"X$potent_lib\"" 2>/dev/null | $Xsed -e 10q | \
+		    potlib=$potent_lib # see symlink-check above in file_magic test
+		    if eval "\$ECHO \"$potent_lib\"" 2>/dev/null | $SED 10q | \
 		       $EGREP "$match_pattern_regex" > /dev/null; then
-		      newdeplibs="$newdeplibs $a_deplib"
-		      a_deplib=""
+		      func_append newdeplibs " $a_deplib"
+		      a_deplib=
 		      break 2
 		    fi
 		  done
 		done
 	      fi
-	      if test -n "$a_deplib" ; then
+	      if test -n "$a_deplib"; then
 		droppeddeps=yes
-		$ECHO
+		echo
 		$ECHO "*** Warning: linker path does not have real file for library $a_deplib."
-		$ECHO "*** I have the capability to make that library automatically link in when"
-		$ECHO "*** you link to this library.  But I can only do this if you have a"
-		$ECHO "*** shared version of the library, which you do not appear to have"
-		$ECHO "*** because I did check the linker path looking for a file starting"
-		if test -z "$potlib" ; then
+		echo "*** I have the capability to make that library automatically link in when"
+		echo "*** you link to this library.  But I can only do this if you have a"
+		echo "*** shared version of the library, which you do not appear to have"
+		echo "*** because I did check the linker path looking for a file starting"
+		if test -z "$potlib"; then
 		  $ECHO "*** with $libname but no candidates were found. (...for regex pattern test)"
 		else
 		  $ECHO "*** with $libname and none of the candidates passed a file format test"
@@ -6750,32 +9398,32 @@ EOF
 	      ;;
 	    *)
 	      # Add a -L argument.
-	      newdeplibs="$newdeplibs $a_deplib"
+	      func_append newdeplibs " $a_deplib"
 	      ;;
 	    esac
 	  done # Gone through all deplibs.
 	  ;;
 	none | unknown | *)
-	  newdeplibs=""
-	  tmp_deplibs=`$ECHO "X $deplibs" | $Xsed \
-	      -e 's/ -lc$//' -e 's/ -[LR][^ ]*//g'`
-	  if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
-	    for i in $predeps $postdeps ; do
+	  newdeplibs=
+	  tmp_deplibs=`$ECHO " $deplibs" | $SED 's/ -lc$//; s/ -[LR][^ ]*//g'`
+	  if test yes = "$allow_libtool_libs_with_static_runtimes"; then
+	    for i in $predeps $postdeps; do
 	      # can't use Xsed below, because $i might contain '/'
-	      tmp_deplibs=`$ECHO "X $tmp_deplibs" | $Xsed -e "s,$i,,"`
+	      tmp_deplibs=`$ECHO " $tmp_deplibs" | $SED "s|$i||"`
 	    done
 	  fi
-	  if $ECHO "X $tmp_deplibs" | $Xsed -e 's/[	 ]//g' |
-	     $GREP . >/dev/null; then
-	    $ECHO
-	    if test "X$deplibs_check_method" = "Xnone"; then
-	      $ECHO "*** Warning: inter-library dependencies are not supported in this platform."
+	  case $tmp_deplibs in
+	  *[!\	\ ]*)
+	    echo
+	    if test none = "$deplibs_check_method"; then
+	      echo "*** Warning: inter-library dependencies are not supported in this platform."
 	    else
-	      $ECHO "*** Warning: inter-library dependencies are not known to be supported."
+	      echo "*** Warning: inter-library dependencies are not known to be supported."
 	    fi
-	    $ECHO "*** All declared inter-library dependencies are being dropped."
+	    echo "*** All declared inter-library dependencies are being dropped."
 	    droppeddeps=yes
-	  fi
+	    ;;
+	  esac
 	  ;;
 	esac
 	versuffix=$versuffix_save
@@ -6787,44 +9435,44 @@ EOF
 	case $host in
 	*-*-rhapsody* | *-*-darwin1.[012])
 	  # On Rhapsody replace the C library with the System framework
-	  newdeplibs=`$ECHO "X $newdeplibs" | $Xsed -e 's/ -lc / System.ltframework /'`
+	  newdeplibs=`$ECHO " $newdeplibs" | $SED 's/ -lc / System.ltframework /'`
 	  ;;
 	esac
 
-	if test "$droppeddeps" = yes; then
-	  if test "$module" = yes; then
-	    $ECHO
-	    $ECHO "*** Warning: libtool could not satisfy all declared inter-library"
+	if test yes = "$droppeddeps"; then
+	  if test yes = "$module"; then
+	    echo
+	    echo "*** Warning: libtool could not satisfy all declared inter-library"
 	    $ECHO "*** dependencies of module $libname.  Therefore, libtool will create"
-	    $ECHO "*** a static module, that should work as long as the dlopening"
-	    $ECHO "*** application is linked with the -dlopen flag."
+	    echo "*** a static module, that should work as long as the dlopening"
+	    echo "*** application is linked with the -dlopen flag."
 	    if test -z "$global_symbol_pipe"; then
-	      $ECHO
-	      $ECHO "*** However, this would only work if libtool was able to extract symbol"
-	      $ECHO "*** lists from a program, using \`nm' or equivalent, but libtool could"
-	      $ECHO "*** not find such a program.  So, this module is probably useless."
-	      $ECHO "*** \`nm' from GNU binutils and a full rebuild may help."
+	      echo
+	      echo "*** However, this would only work if libtool was able to extract symbol"
+	      echo "*** lists from a program, using 'nm' or equivalent, but libtool could"
+	      echo "*** not find such a program.  So, this module is probably useless."
+	      echo "*** 'nm' from GNU binutils and a full rebuild may help."
 	    fi
-	    if test "$build_old_libs" = no; then
-	      oldlibs="$output_objdir/$libname.$libext"
+	    if test no = "$build_old_libs"; then
+	      oldlibs=$output_objdir/$libname.$libext
 	      build_libtool_libs=module
 	      build_old_libs=yes
 	    else
 	      build_libtool_libs=no
 	    fi
 	  else
-	    $ECHO "*** The inter-library dependencies that have been dropped here will be"
-	    $ECHO "*** automatically added whenever a program is linked with this library"
-	    $ECHO "*** or is declared to -dlopen it."
-
-	    if test "$allow_undefined" = no; then
-	      $ECHO
-	      $ECHO "*** Since this library must not contain undefined symbols,"
-	      $ECHO "*** because either the platform does not support them or"
-	      $ECHO "*** it was explicitly requested with -no-undefined,"
-	      $ECHO "*** libtool will only create a static version of it."
-	      if test "$build_old_libs" = no; then
-		oldlibs="$output_objdir/$libname.$libext"
+	    echo "*** The inter-library dependencies that have been dropped here will be"
+	    echo "*** automatically added whenever a program is linked with this library"
+	    echo "*** or is declared to -dlopen it."
+
+	    if test no = "$allow_undefined"; then
+	      echo
+	      echo "*** Since this library must not contain undefined symbols,"
+	      echo "*** because either the platform does not support them or"
+	      echo "*** it was explicitly requested with -no-undefined,"
+	      echo "*** libtool will only create a static version of it."
+	      if test no = "$build_old_libs"; then
+		oldlibs=$output_objdir/$libname.$libext
 		build_libtool_libs=module
 		build_old_libs=yes
 	      else
@@ -6839,9 +9487,9 @@ EOF
       # Time to change all our "foo.ltframework" stuff back to "-framework foo"
       case $host in
 	*-*-darwin*)
-	  newdeplibs=`$ECHO "X $newdeplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'`
-	  new_inherited_linker_flags=`$ECHO "X $new_inherited_linker_flags" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'`
-	  deplibs=`$ECHO "X $deplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'`
+	  newdeplibs=`$ECHO " $newdeplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'`
+	  new_inherited_linker_flags=`$ECHO " $new_inherited_linker_flags" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'`
+	  deplibs=`$ECHO " $deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'`
 	  ;;
       esac
 
@@ -6854,7 +9502,7 @@ EOF
 	*)
 	  case " $deplibs " in
 	  *" -L$path/$objdir "*)
-	    new_libs="$new_libs -L$path/$objdir" ;;
+	    func_append new_libs " -L$path/$objdir" ;;
 	  esac
 	  ;;
 	esac
@@ -6864,13 +9512,13 @@ EOF
 	-L*)
 	  case " $new_libs " in
 	  *" $deplib "*) ;;
-	  *) new_libs="$new_libs $deplib" ;;
+	  *) func_append new_libs " $deplib" ;;
 	  esac
 	  ;;
-	*) new_libs="$new_libs $deplib" ;;
+	*) func_append new_libs " $deplib" ;;
 	esac
       done
-      deplibs="$new_libs"
+      deplibs=$new_libs
 
       # All the library-specific variables (install_libdir is set above).
       library_names=
@@ -6878,62 +9526,65 @@ EOF
       dlname=
 
       # Test again, we may have decided not to build it any more
-      if test "$build_libtool_libs" = yes; then
-	if test "$hardcode_into_libs" = yes; then
+      if test yes = "$build_libtool_libs"; then
+	# Remove $wl instances when linking with ld.
+	# FIXME: should test the right _cmds variable.
+	case $archive_cmds in
+	  *\$LD\ *) wl= ;;
+        esac
+	if test yes = "$hardcode_into_libs"; then
 	  # Hardcode the library paths
 	  hardcode_libdirs=
 	  dep_rpath=
-	  rpath="$finalize_rpath"
-	  test "$mode" != relink && rpath="$compile_rpath$rpath"
+	  rpath=$finalize_rpath
+	  test relink = "$opt_mode" || rpath=$compile_rpath$rpath
 	  for libdir in $rpath; do
 	    if test -n "$hardcode_libdir_flag_spec"; then
 	      if test -n "$hardcode_libdir_separator"; then
+		func_replace_sysroot "$libdir"
+		libdir=$func_replace_sysroot_result
 		if test -z "$hardcode_libdirs"; then
-		  hardcode_libdirs="$libdir"
+		  hardcode_libdirs=$libdir
 		else
 		  # Just accumulate the unique libdirs.
 		  case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
 		  *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
 		    ;;
 		  *)
-		    hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir"
+		    func_append hardcode_libdirs "$hardcode_libdir_separator$libdir"
 		    ;;
 		  esac
 		fi
 	      else
 		eval flag=\"$hardcode_libdir_flag_spec\"
-		dep_rpath="$dep_rpath $flag"
+		func_append dep_rpath " $flag"
 	      fi
 	    elif test -n "$runpath_var"; then
 	      case "$perm_rpath " in
 	      *" $libdir "*) ;;
-	      *) perm_rpath="$perm_rpath $libdir" ;;
+	      *) func_append perm_rpath " $libdir" ;;
 	      esac
 	    fi
 	  done
 	  # Substitute the hardcoded libdirs into the rpath.
 	  if test -n "$hardcode_libdir_separator" &&
 	     test -n "$hardcode_libdirs"; then
-	    libdir="$hardcode_libdirs"
-	    if test -n "$hardcode_libdir_flag_spec_ld"; then
-	      eval dep_rpath=\"$hardcode_libdir_flag_spec_ld\"
-	    else
-	      eval dep_rpath=\"$hardcode_libdir_flag_spec\"
-	    fi
+	    libdir=$hardcode_libdirs
+	    eval "dep_rpath=\"$hardcode_libdir_flag_spec\""
 	  fi
 	  if test -n "$runpath_var" && test -n "$perm_rpath"; then
 	    # We should set the runpath_var.
 	    rpath=
 	    for dir in $perm_rpath; do
-	      rpath="$rpath$dir:"
+	      func_append rpath "$dir:"
 	    done
 	    eval "$runpath_var='$rpath\$$runpath_var'; export $runpath_var"
 	  fi
 	  test -n "$dep_rpath" && deplibs="$dep_rpath $deplibs"
 	fi
 
-	shlibpath="$finalize_shlibpath"
-	test "$mode" != relink && shlibpath="$compile_shlibpath$shlibpath"
+	shlibpath=$finalize_shlibpath
+	test relink = "$opt_mode" || shlibpath=$compile_shlibpath$shlibpath
 	if test -n "$shlibpath"; then
 	  eval "$shlibpath_var='$shlibpath\$$shlibpath_var'; export $shlibpath_var"
 	fi
@@ -6943,34 +9594,34 @@ EOF
 	eval library_names=\"$library_names_spec\"
 	set dummy $library_names
 	shift
-	realname="$1"
+	realname=$1
 	shift
 
 	if test -n "$soname_spec"; then
 	  eval soname=\"$soname_spec\"
 	else
-	  soname="$realname"
+	  soname=$realname
 	fi
 	if test -z "$dlname"; then
 	  dlname=$soname
 	fi
 
-	lib="$output_objdir/$realname"
+	lib=$output_objdir/$realname
 	linknames=
 	for link
 	do
-	  linknames="$linknames $link"
+	  func_append linknames " $link"
 	done
 
 	# Use standard objects if they are pic
-	test -z "$pic_flag" && libobjs=`$ECHO "X$libobjs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
+	test -z "$pic_flag" && libobjs=`$ECHO "$libobjs" | $SP2NL | $SED "$lo2o" | $NL2SP`
 	test "X$libobjs" = "X " && libobjs=
 
 	delfiles=
 	if test -n "$export_symbols" && test -n "$include_expsyms"; then
 	  $opt_dry_run || cp "$export_symbols" "$output_objdir/$libname.uexp"
-	  export_symbols="$output_objdir/$libname.uexp"
-	  delfiles="$delfiles $export_symbols"
+	  export_symbols=$output_objdir/$libname.uexp
+	  func_append delfiles " $export_symbols"
 	fi
 
 	orig_export_symbols=
@@ -6978,36 +9629,68 @@ EOF
 	cygwin* | mingw* | cegcc*)
 	  if test -n "$export_symbols" && test -z "$export_symbols_regex"; then
 	    # exporting using user supplied symfile
-	    if test "x`$SED 1q $export_symbols`" != xEXPORTS; then
+	    func_dll_def_p "$export_symbols" || {
 	      # and it's NOT already a .def file. Must figure out
 	      # which of the given symbols are data symbols and tag
 	      # them as such. So, trigger use of export_symbols_cmds.
 	      # export_symbols gets reassigned inside the "prepare
 	      # the list of exported symbols" if statement, so the
 	      # include_expsyms logic still works.
-	      orig_export_symbols="$export_symbols"
+	      orig_export_symbols=$export_symbols
 	      export_symbols=
 	      always_export_symbols=yes
-	    fi
+	    }
 	  fi
 	  ;;
 	esac
 
 	# Prepare the list of exported symbols
 	if test -z "$export_symbols"; then
-	  if test "$always_export_symbols" = yes || test -n "$export_symbols_regex"; then
-	    func_verbose "generating symbol list for \`$libname.la'"
-	    export_symbols="$output_objdir/$libname.exp"
+	  if test yes = "$always_export_symbols" || test -n "$export_symbols_regex"; then
+	    func_verbose "generating symbol list for '$libname.la'"
+	    export_symbols=$output_objdir/$libname.exp
 	    $opt_dry_run || $RM $export_symbols
 	    cmds=$export_symbols_cmds
-	    save_ifs="$IFS"; IFS='~'
-	    for cmd in $cmds; do
-	      IFS="$save_ifs"
-	      eval cmd=\"$cmd\"
-	      func_len " $cmd"
-	      len=$func_len_result
-	      if test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then
+	    save_ifs=$IFS; IFS='~'
+	    for cmd1 in $cmds; do
+	      IFS=$save_ifs
+	      # Take the normal branch if the nm_file_list_spec branch
+	      # doesn't work or if tool conversion is not needed.
+	      case $nm_file_list_spec~$to_tool_file_cmd in
+		*~func_convert_file_noop | *~func_convert_file_msys_to_w32 | ~*)
+		  try_normal_branch=yes
+		  eval cmd=\"$cmd1\"
+		  func_len " $cmd"
+		  len=$func_len_result
+		  ;;
+		*)
+		  try_normal_branch=no
+		  ;;
+	      esac
+	      if test yes = "$try_normal_branch" \
+		 && { test "$len" -lt "$max_cmd_len" \
+		      || test "$max_cmd_len" -le -1; }
+	      then
+		func_show_eval "$cmd" 'exit $?'
+		skipped_export=false
+	      elif test -n "$nm_file_list_spec"; then
+		func_basename "$output"
+		output_la=$func_basename_result
+		save_libobjs=$libobjs
+		save_output=$output
+		output=$output_objdir/$output_la.nm
+		func_to_tool_file "$output"
+		libobjs=$nm_file_list_spec$func_to_tool_file_result
+		func_append delfiles " $output"
+		func_verbose "creating $NM input file list: $output"
+		for obj in $save_libobjs; do
+		  func_to_tool_file "$obj"
+		  $ECHO "$func_to_tool_file_result"
+		done > "$output"
+		eval cmd=\"$cmd1\"
 		func_show_eval "$cmd" 'exit $?'
+		output=$save_output
+		libobjs=$save_libobjs
 		skipped_export=false
 	      else
 		# The command line is too long to execute in one step.
@@ -7018,8 +9701,8 @@ EOF
 		break
 	      fi
 	    done
-	    IFS="$save_ifs"
-	    if test -n "$export_symbols_regex" && test "X$skipped_export" != "X:"; then
+	    IFS=$save_ifs
+	    if test -n "$export_symbols_regex" && test : != "$skipped_export"; then
 	      func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"'
 	      func_show_eval '$MV "${export_symbols}T" "$export_symbols"'
 	    fi
@@ -7027,21 +9710,21 @@ EOF
 	fi
 
 	if test -n "$export_symbols" && test -n "$include_expsyms"; then
-	  tmp_export_symbols="$export_symbols"
-	  test -n "$orig_export_symbols" && tmp_export_symbols="$orig_export_symbols"
-	  $opt_dry_run || eval '$ECHO "X$include_expsyms" | $Xsed | $SP2NL >> "$tmp_export_symbols"'
+	  tmp_export_symbols=$export_symbols
+	  test -n "$orig_export_symbols" && tmp_export_symbols=$orig_export_symbols
+	  $opt_dry_run || eval '$ECHO "$include_expsyms" | $SP2NL >> "$tmp_export_symbols"'
 	fi
 
-	if test "X$skipped_export" != "X:" && test -n "$orig_export_symbols"; then
+	if test : != "$skipped_export" && test -n "$orig_export_symbols"; then
 	  # The given exports_symbols file has to be filtered, so filter it.
-	  func_verbose "filter symbol list for \`$libname.la' to tag DATA exports"
+	  func_verbose "filter symbol list for '$libname.la' to tag DATA exports"
 	  # FIXME: $output_objdir/$libname.filter potentially contains lots of
-	  # 's' commands which not all seds can handle. GNU sed should be fine
+	  # 's' commands, which not all seds can handle. GNU sed should be fine
 	  # though. Also, the filter scales superlinearly with the number of
 	  # global variables. join(1) would be nice here, but unfortunately
 	  # isn't a blessed tool.
 	  $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter
-	  delfiles="$delfiles $export_symbols $output_objdir/$libname.filter"
+	  func_append delfiles " $export_symbols $output_objdir/$libname.filter"
 	  export_symbols=$output_objdir/$libname.def
 	  $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols
 	fi
@@ -7051,15 +9734,15 @@ EOF
 	  case " $convenience " in
 	  *" $test_deplib "*) ;;
 	  *)
-	    tmp_deplibs="$tmp_deplibs $test_deplib"
+	    func_append tmp_deplibs " $test_deplib"
 	    ;;
 	  esac
 	done
-	deplibs="$tmp_deplibs"
+	deplibs=$tmp_deplibs
 
 	if test -n "$convenience"; then
 	  if test -n "$whole_archive_flag_spec" &&
-	    test "$compiler_needs_object" = yes &&
+	    test yes = "$compiler_needs_object" &&
 	    test -z "$libobjs"; then
 	    # extract the archives, so we have objects to list.
 	    # TODO: could optimize this to just extract one archive.
@@ -7070,27 +9753,27 @@ EOF
 	    eval libobjs=\"\$libobjs $whole_archive_flag_spec\"
 	    test "X$libobjs" = "X " && libobjs=
 	  else
-	    gentop="$output_objdir/${outputname}x"
-	    generated="$generated $gentop"
+	    gentop=$output_objdir/${outputname}x
+	    func_append generated " $gentop"
 
 	    func_extract_archives $gentop $convenience
-	    libobjs="$libobjs $func_extract_archives_result"
+	    func_append libobjs " $func_extract_archives_result"
 	    test "X$libobjs" = "X " && libobjs=
 	  fi
 	fi
 
-	if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then
+	if test yes = "$thread_safe" && test -n "$thread_safe_flag_spec"; then
 	  eval flag=\"$thread_safe_flag_spec\"
-	  linker_flags="$linker_flags $flag"
+	  func_append linker_flags " $flag"
 	fi
 
 	# Make a backup of the uninstalled library when relinking
-	if test "$mode" = relink; then
+	if test relink = "$opt_mode"; then
 	  $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}U && $MV $realname ${realname}U)' || exit $?
 	fi
 
 	# Do each of the archive commands.
-	if test "$module" = yes && test -n "$module_cmds" ; then
+	if test yes = "$module" && test -n "$module_cmds"; then
 	  if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then
 	    eval test_cmds=\"$module_expsym_cmds\"
 	    cmds=$module_expsym_cmds
@@ -7108,7 +9791,7 @@ EOF
 	  fi
 	fi
 
-	if test "X$skipped_export" != "X:" &&
+	if test : != "$skipped_export" &&
 	   func_len " $test_cmds" &&
 	   len=$func_len_result &&
 	   test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then
@@ -7130,7 +9813,8 @@ EOF
 	    save_libobjs=$libobjs
 	  fi
 	  save_output=$output
-	  output_la=`$ECHO "X$output" | $Xsed -e "$basename"`
+	  func_basename "$output"
+	  output_la=$func_basename_result
 
 	  # Clear the reloadable object creation command queue and
 	  # initialize k to one.
@@ -7140,37 +9824,42 @@ EOF
 	  last_robj=
 	  k=1
 
-	  if test -n "$save_libobjs" && test "X$skipped_export" != "X:" && test "$with_gnu_ld" = yes; then
-	    output=${output_objdir}/${output_la}.lnkscript
+	  if test -n "$save_libobjs" && test : != "$skipped_export" && test yes = "$with_gnu_ld"; then
+	    output=$output_objdir/$output_la.lnkscript
 	    func_verbose "creating GNU ld script: $output"
-	    $ECHO 'INPUT (' > $output
+	    echo 'INPUT (' > $output
 	    for obj in $save_libobjs
 	    do
-	      $ECHO "$obj" >> $output
+	      func_to_tool_file "$obj"
+	      $ECHO "$func_to_tool_file_result" >> $output
 	    done
-	    $ECHO ')' >> $output
-	    delfiles="$delfiles $output"
-	  elif test -n "$save_libobjs" && test "X$skipped_export" != "X:" && test "X$file_list_spec" != X; then
-	    output=${output_objdir}/${output_la}.lnk
+	    echo ')' >> $output
+	    func_append delfiles " $output"
+	    func_to_tool_file "$output"
+	    output=$func_to_tool_file_result
+	  elif test -n "$save_libobjs" && test : != "$skipped_export" && test -n "$file_list_spec"; then
+	    output=$output_objdir/$output_la.lnk
 	    func_verbose "creating linker input file list: $output"
 	    : > $output
 	    set x $save_libobjs
 	    shift
 	    firstobj=
-	    if test "$compiler_needs_object" = yes; then
+	    if test yes = "$compiler_needs_object"; then
 	      firstobj="$1 "
 	      shift
 	    fi
 	    for obj
 	    do
-	      $ECHO "$obj" >> $output
+	      func_to_tool_file "$obj"
+	      $ECHO "$func_to_tool_file_result" >> $output
 	    done
-	    delfiles="$delfiles $output"
-	    output=$firstobj\"$file_list_spec$output\"
+	    func_append delfiles " $output"
+	    func_to_tool_file "$output"
+	    output=$firstobj\"$file_list_spec$func_to_tool_file_result\"
 	  else
 	    if test -n "$save_libobjs"; then
 	      func_verbose "creating reloadable object files..."
-	      output=$output_objdir/$output_la-${k}.$objext
+	      output=$output_objdir/$output_la-$k.$objext
 	      eval test_cmds=\"$reload_cmds\"
 	      func_len " $test_cmds"
 	      len0=$func_len_result
@@ -7182,25 +9871,27 @@ EOF
 		func_len " $obj"
 		func_arith $len + $func_len_result
 		len=$func_arith_result
-		if test "X$objlist" = X ||
+		if test -z "$objlist" ||
 		   test "$len" -lt "$max_cmd_len"; then
 		  func_append objlist " $obj"
 		else
 		  # The command $test_cmds is almost too long, add a
 		  # command to the queue.
-		  if test "$k" -eq 1 ; then
+		  if test 1 -eq "$k"; then
 		    # The first file doesn't have a previous command to add.
-		    eval concat_cmds=\"$reload_cmds $objlist $last_robj\"
+		    reload_objs=$objlist
+		    eval concat_cmds=\"$reload_cmds\"
 		  else
 		    # All subsequent reloadable object files will link in
 		    # the last one created.
-		    eval concat_cmds=\"\$concat_cmds~$reload_cmds $objlist $last_robj~\$RM $last_robj\"
+		    reload_objs="$objlist $last_robj"
+		    eval concat_cmds=\"\$concat_cmds~$reload_cmds~\$RM $last_robj\"
 		  fi
-		  last_robj=$output_objdir/$output_la-${k}.$objext
+		  last_robj=$output_objdir/$output_la-$k.$objext
 		  func_arith $k + 1
 		  k=$func_arith_result
-		  output=$output_objdir/$output_la-${k}.$objext
-		  objlist=$obj
+		  output=$output_objdir/$output_la-$k.$objext
+		  objlist=" $obj"
 		  func_len " $last_robj"
 		  func_arith $len0 + $func_len_result
 		  len=$func_arith_result
@@ -7210,19 +9901,20 @@ EOF
 	      # reloadable object file.  All subsequent reloadable object
 	      # files will link in the last one created.
 	      test -z "$concat_cmds" || concat_cmds=$concat_cmds~
-	      eval concat_cmds=\"\${concat_cmds}$reload_cmds $objlist $last_robj\"
+	      reload_objs="$objlist $last_robj"
+	      eval concat_cmds=\"\$concat_cmds$reload_cmds\"
 	      if test -n "$last_robj"; then
-	        eval concat_cmds=\"\${concat_cmds}~\$RM $last_robj\"
+	        eval concat_cmds=\"\$concat_cmds~\$RM $last_robj\"
 	      fi
-	      delfiles="$delfiles $output"
+	      func_append delfiles " $output"
 
 	    else
 	      output=
 	    fi
 
-	    if ${skipped_export-false}; then
-	      func_verbose "generating symbol list for \`$libname.la'"
-	      export_symbols="$output_objdir/$libname.exp"
+	    ${skipped_export-false} && {
+	      func_verbose "generating symbol list for '$libname.la'"
+	      export_symbols=$output_objdir/$libname.exp
 	      $opt_dry_run || $RM $export_symbols
 	      libobjs=$output
 	      # Append the command to create the export file.
@@ -7231,16 +9923,16 @@ EOF
 	      if test -n "$last_robj"; then
 		eval concat_cmds=\"\$concat_cmds~\$RM $last_robj\"
 	      fi
-	    fi
+	    }
 
 	    test -n "$save_libobjs" &&
 	      func_verbose "creating a temporary reloadable object file: $output"
 
 	    # Loop through the commands generated above and execute them.
-	    save_ifs="$IFS"; IFS='~'
+	    save_ifs=$IFS; IFS='~'
 	    for cmd in $concat_cmds; do
-	      IFS="$save_ifs"
-	      $opt_silent || {
+	      IFS=$save_ifs
+	      $opt_quiet || {
 		  func_quote_for_expand "$cmd"
 		  eval "func_echo $func_quote_for_expand_result"
 	      }
@@ -7248,7 +9940,7 @@ EOF
 		lt_exit=$?
 
 		# Restore the uninstalled library and exit
-		if test "$mode" = relink; then
+		if test relink = "$opt_mode"; then
 		  ( cd "$output_objdir" && \
 		    $RM "${realname}T" && \
 		    $MV "${realname}U" "$realname" )
@@ -7257,7 +9949,7 @@ EOF
 		exit $lt_exit
 	      }
 	    done
-	    IFS="$save_ifs"
+	    IFS=$save_ifs
 
 	    if test -n "$export_symbols_regex" && ${skipped_export-false}; then
 	      func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"'
@@ -7265,27 +9957,27 @@ EOF
 	    fi
 	  fi
 
-          if ${skipped_export-false}; then
+          ${skipped_export-false} && {
 	    if test -n "$export_symbols" && test -n "$include_expsyms"; then
-	      tmp_export_symbols="$export_symbols"
-	      test -n "$orig_export_symbols" && tmp_export_symbols="$orig_export_symbols"
-	      $opt_dry_run || eval '$ECHO "X$include_expsyms" | $Xsed | $SP2NL >> "$tmp_export_symbols"'
+	      tmp_export_symbols=$export_symbols
+	      test -n "$orig_export_symbols" && tmp_export_symbols=$orig_export_symbols
+	      $opt_dry_run || eval '$ECHO "$include_expsyms" | $SP2NL >> "$tmp_export_symbols"'
 	    fi
 
 	    if test -n "$orig_export_symbols"; then
 	      # The given exports_symbols file has to be filtered, so filter it.
-	      func_verbose "filter symbol list for \`$libname.la' to tag DATA exports"
+	      func_verbose "filter symbol list for '$libname.la' to tag DATA exports"
 	      # FIXME: $output_objdir/$libname.filter potentially contains lots of
-	      # 's' commands which not all seds can handle. GNU sed should be fine
+	      # 's' commands, which not all seds can handle. GNU sed should be fine
 	      # though. Also, the filter scales superlinearly with the number of
 	      # global variables. join(1) would be nice here, but unfortunately
 	      # isn't a blessed tool.
 	      $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter
-	      delfiles="$delfiles $export_symbols $output_objdir/$libname.filter"
+	      func_append delfiles " $export_symbols $output_objdir/$libname.filter"
 	      export_symbols=$output_objdir/$libname.def
 	      $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols
 	    fi
-	  fi
+	  }
 
 	  libobjs=$output
 	  # Restore the value of output.
@@ -7299,7 +9991,7 @@ EOF
 	  # value of $libobjs for piecewise linking.
 
 	  # Do each of the archive commands.
-	  if test "$module" = yes && test -n "$module_cmds" ; then
+	  if test yes = "$module" && test -n "$module_cmds"; then
 	    if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then
 	      cmds=$module_expsym_cmds
 	    else
@@ -7321,19 +10013,20 @@ EOF
 
 	# Add any objects from preloaded convenience libraries
 	if test -n "$dlprefiles"; then
-	  gentop="$output_objdir/${outputname}x"
-	  generated="$generated $gentop"
+	  gentop=$output_objdir/${outputname}x
+	  func_append generated " $gentop"
 
 	  func_extract_archives $gentop $dlprefiles
-	  libobjs="$libobjs $func_extract_archives_result"
+	  func_append libobjs " $func_extract_archives_result"
 	  test "X$libobjs" = "X " && libobjs=
 	fi
 
-	save_ifs="$IFS"; IFS='~'
+	save_ifs=$IFS; IFS='~'
 	for cmd in $cmds; do
-	  IFS="$save_ifs"
+	  IFS=$sp$nl
 	  eval cmd=\"$cmd\"
-	  $opt_silent || {
+	  IFS=$save_ifs
+	  $opt_quiet || {
 	    func_quote_for_expand "$cmd"
 	    eval "func_echo $func_quote_for_expand_result"
 	  }
@@ -7341,7 +10034,7 @@ EOF
 	    lt_exit=$?
 
 	    # Restore the uninstalled library and exit
-	    if test "$mode" = relink; then
+	    if test relink = "$opt_mode"; then
 	      ( cd "$output_objdir" && \
 	        $RM "${realname}T" && \
 		$MV "${realname}U" "$realname" )
@@ -7350,10 +10043,10 @@ EOF
 	    exit $lt_exit
 	  }
 	done
-	IFS="$save_ifs"
+	IFS=$save_ifs
 
 	# Restore the uninstalled library and exit
-	if test "$mode" = relink; then
+	if test relink = "$opt_mode"; then
 	  $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}T && $MV $realname ${realname}T && $MV ${realname}U $realname)' || exit $?
 
 	  if test -n "$convenience"; then
@@ -7373,39 +10066,39 @@ EOF
 	done
 
 	# If -module or -export-dynamic was specified, set the dlname.
-	if test "$module" = yes || test "$export_dynamic" = yes; then
+	if test yes = "$module" || test yes = "$export_dynamic"; then
 	  # On all known operating systems, these are identical.
-	  dlname="$soname"
+	  dlname=$soname
 	fi
       fi
       ;;
 
     obj)
-      if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
-	func_warning "\`-dlopen' is ignored for objects"
+      if test -n "$dlfiles$dlprefiles" || test no != "$dlself"; then
+	func_warning "'-dlopen' is ignored for objects"
       fi
 
       case " $deplibs" in
       *\ -l* | *\ -L*)
-	func_warning "\`-l' and \`-L' are ignored for objects" ;;
+	func_warning "'-l' and '-L' are ignored for objects" ;;
       esac
 
       test -n "$rpath" && \
-	func_warning "\`-rpath' is ignored for objects"
+	func_warning "'-rpath' is ignored for objects"
 
       test -n "$xrpath" && \
-	func_warning "\`-R' is ignored for objects"
+	func_warning "'-R' is ignored for objects"
 
       test -n "$vinfo" && \
-	func_warning "\`-version-info' is ignored for objects"
+	func_warning "'-version-info' is ignored for objects"
 
       test -n "$release" && \
-	func_warning "\`-release' is ignored for objects"
+	func_warning "'-release' is ignored for objects"
 
       case $output in
       *.lo)
 	test -n "$objs$old_deplibs" && \
-	  func_fatal_error "cannot build library object \`$output' from non-libtool objects"
+	  func_fatal_error "cannot build library object '$output' from non-libtool objects"
 
 	libobj=$output
 	func_lo2o "$libobj"
@@ -7413,7 +10106,7 @@ EOF
 	;;
       *)
 	libobj=
-	obj="$output"
+	obj=$output
 	;;
       esac
 
@@ -7426,28 +10119,33 @@ EOF
       # the extraction.
       reload_conv_objs=
       gentop=
-      # reload_cmds runs $LD directly, so let us get rid of
-      # -Wl from whole_archive_flag_spec and hope we can get by with
-      # turning comma into space..
-      wl=
-
+      # if reload_cmds runs $LD directly, get rid of -Wl from
+      # whole_archive_flag_spec and hope we can get by with turning comma
+      # into space.
+      case $reload_cmds in
+        *\$LD[\ \$]*) wl= ;;
+      esac
       if test -n "$convenience"; then
 	if test -n "$whole_archive_flag_spec"; then
 	  eval tmp_whole_archive_flags=\"$whole_archive_flag_spec\"
-	  reload_conv_objs=$reload_objs\ `$ECHO "X$tmp_whole_archive_flags" | $Xsed -e 's|,| |g'`
+	  test -n "$wl" || tmp_whole_archive_flags=`$ECHO "$tmp_whole_archive_flags" | $SED 's|,| |g'`
+	  reload_conv_objs=$reload_objs\ $tmp_whole_archive_flags
 	else
-	  gentop="$output_objdir/${obj}x"
-	  generated="$generated $gentop"
+	  gentop=$output_objdir/${obj}x
+	  func_append generated " $gentop"
 
 	  func_extract_archives $gentop $convenience
 	  reload_conv_objs="$reload_objs $func_extract_archives_result"
 	fi
       fi
 
+      # If we're not building shared, we need to use non_pic_objs
+      test yes = "$build_libtool_libs" || libobjs=$non_pic_objects
+
       # Create the old-style object.
-      reload_objs="$objs$old_deplibs "`$ECHO "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}$'/d' -e '/\.lib$/d' -e "$lo2o" | $NL2SP`" $reload_conv_objs" ### testsuite: skip nested quoting test
+      reload_objs=$objs$old_deplibs' '`$ECHO "$libobjs" | $SP2NL | $SED "/\.$libext$/d; /\.lib$/d; $lo2o" | $NL2SP`' '$reload_conv_objs
 
-      output="$obj"
+      output=$obj
       func_execute_cmds "$reload_cmds" 'exit $?'
 
       # Exit if we aren't doing a library object file.
@@ -7459,7 +10157,7 @@ EOF
 	exit $EXIT_SUCCESS
       fi
 
-      if test "$build_libtool_libs" != yes; then
+      test yes = "$build_libtool_libs" || {
 	if test -n "$gentop"; then
 	  func_show_eval '${RM}r "$gentop"'
 	fi
@@ -7469,12 +10167,12 @@ EOF
 	# $show "echo timestamp > $libobj"
 	# $opt_dry_run || eval "echo timestamp > $libobj" || exit $?
 	exit $EXIT_SUCCESS
-      fi
+      }
 
-      if test -n "$pic_flag" || test "$pic_mode" != default; then
+      if test -n "$pic_flag" || test default != "$pic_mode"; then
 	# Only do commands if we really have different PIC objects.
 	reload_objs="$libobjs $reload_conv_objs"
-	output="$libobj"
+	output=$libobj
 	func_execute_cmds "$reload_cmds" 'exit $?'
       fi
 
@@ -7491,22 +10189,20 @@ EOF
 	          output=$func_stripname_result.exe;;
       esac
       test -n "$vinfo" && \
-	func_warning "\`-version-info' is ignored for programs"
+	func_warning "'-version-info' is ignored for programs"
 
       test -n "$release" && \
-	func_warning "\`-release' is ignored for programs"
+	func_warning "'-release' is ignored for programs"
 
-      test "$preload" = yes \
-        && test "$dlopen_support" = unknown \
-	&& test "$dlopen_self" = unknown \
-	&& test "$dlopen_self_static" = unknown && \
-	  func_warning "\`LT_INIT([dlopen])' not used. Assuming no dlopen support."
+      $preload \
+	&& test unknown,unknown,unknown = "$dlopen_support,$dlopen_self,$dlopen_self_static" \
+	&& func_warning "'LT_INIT([dlopen])' not used. Assuming no dlopen support."
 
       case $host in
       *-*-rhapsody* | *-*-darwin1.[012])
 	# On Rhapsody replace the C library is the System framework
-	compile_deplibs=`$ECHO "X $compile_deplibs" | $Xsed -e 's/ -lc / System.ltframework /'`
-	finalize_deplibs=`$ECHO "X $finalize_deplibs" | $Xsed -e 's/ -lc / System.ltframework /'`
+	compile_deplibs=`$ECHO " $compile_deplibs" | $SED 's/ -lc / System.ltframework /'`
+	finalize_deplibs=`$ECHO " $finalize_deplibs" | $SED 's/ -lc / System.ltframework /'`
 	;;
       esac
 
@@ -7514,17 +10210,17 @@ EOF
       *-*-darwin*)
 	# Don't allow lazy linking, it breaks C++ global constructors
 	# But is supposedly fixed on 10.4 or later (yay!).
-	if test "$tagname" = CXX ; then
+	if test CXX = "$tagname"; then
 	  case ${MACOSX_DEPLOYMENT_TARGET-10.0} in
 	    10.[0123])
-	      compile_command="$compile_command ${wl}-bind_at_load"
-	      finalize_command="$finalize_command ${wl}-bind_at_load"
+	      func_append compile_command " $wl-bind_at_load"
+	      func_append finalize_command " $wl-bind_at_load"
 	    ;;
 	  esac
 	fi
 	# Time to change all our "foo.ltframework" stuff back to "-framework foo"
-	compile_deplibs=`$ECHO "X $compile_deplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'`
-	finalize_deplibs=`$ECHO "X $finalize_deplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'`
+	compile_deplibs=`$ECHO " $compile_deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'`
+	finalize_deplibs=`$ECHO " $finalize_deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'`
 	;;
       esac
 
@@ -7538,7 +10234,7 @@ EOF
 	*)
 	  case " $compile_deplibs " in
 	  *" -L$path/$objdir "*)
-	    new_libs="$new_libs -L$path/$objdir" ;;
+	    func_append new_libs " -L$path/$objdir" ;;
 	  esac
 	  ;;
 	esac
@@ -7548,17 +10244,17 @@ EOF
 	-L*)
 	  case " $new_libs " in
 	  *" $deplib "*) ;;
-	  *) new_libs="$new_libs $deplib" ;;
+	  *) func_append new_libs " $deplib" ;;
 	  esac
 	  ;;
-	*) new_libs="$new_libs $deplib" ;;
+	*) func_append new_libs " $deplib" ;;
 	esac
       done
-      compile_deplibs="$new_libs"
+      compile_deplibs=$new_libs
 
 
-      compile_command="$compile_command $compile_deplibs"
-      finalize_command="$finalize_command $finalize_deplibs"
+      func_append compile_command " $compile_deplibs"
+      func_append finalize_command " $finalize_deplibs"
 
       if test -n "$rpath$xrpath"; then
 	# If the user specified any rpath flags, then add them.
@@ -7566,7 +10262,7 @@ EOF
 	  # This is the magic to use -rpath.
 	  case "$finalize_rpath " in
 	  *" $libdir "*) ;;
-	  *) finalize_rpath="$finalize_rpath $libdir" ;;
+	  *) func_append finalize_rpath " $libdir" ;;
 	  esac
 	done
       fi
@@ -7578,39 +10274,39 @@ EOF
 	if test -n "$hardcode_libdir_flag_spec"; then
 	  if test -n "$hardcode_libdir_separator"; then
 	    if test -z "$hardcode_libdirs"; then
-	      hardcode_libdirs="$libdir"
+	      hardcode_libdirs=$libdir
 	    else
 	      # Just accumulate the unique libdirs.
 	      case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
 	      *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
 		;;
 	      *)
-		hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir"
+		func_append hardcode_libdirs "$hardcode_libdir_separator$libdir"
 		;;
 	      esac
 	    fi
 	  else
 	    eval flag=\"$hardcode_libdir_flag_spec\"
-	    rpath="$rpath $flag"
+	    func_append rpath " $flag"
 	  fi
 	elif test -n "$runpath_var"; then
 	  case "$perm_rpath " in
 	  *" $libdir "*) ;;
-	  *) perm_rpath="$perm_rpath $libdir" ;;
+	  *) func_append perm_rpath " $libdir" ;;
 	  esac
 	fi
 	case $host in
 	*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*)
-	  testbindir=`${ECHO} "$libdir" | ${SED} -e 's*/lib$*/bin*'`
+	  testbindir=`$ECHO "$libdir" | $SED -e 's*/lib$*/bin*'`
 	  case :$dllsearchpath: in
 	  *":$libdir:"*) ;;
 	  ::) dllsearchpath=$libdir;;
-	  *) dllsearchpath="$dllsearchpath:$libdir";;
+	  *) func_append dllsearchpath ":$libdir";;
 	  esac
 	  case :$dllsearchpath: in
 	  *":$testbindir:"*) ;;
 	  ::) dllsearchpath=$testbindir;;
-	  *) dllsearchpath="$dllsearchpath:$testbindir";;
+	  *) func_append dllsearchpath ":$testbindir";;
 	  esac
 	  ;;
 	esac
@@ -7618,10 +10314,10 @@ EOF
       # Substitute the hardcoded libdirs into the rpath.
       if test -n "$hardcode_libdir_separator" &&
 	 test -n "$hardcode_libdirs"; then
-	libdir="$hardcode_libdirs"
+	libdir=$hardcode_libdirs
 	eval rpath=\" $hardcode_libdir_flag_spec\"
       fi
-      compile_rpath="$rpath"
+      compile_rpath=$rpath
 
       rpath=
       hardcode_libdirs=
@@ -7629,82 +10325,86 @@ EOF
 	if test -n "$hardcode_libdir_flag_spec"; then
 	  if test -n "$hardcode_libdir_separator"; then
 	    if test -z "$hardcode_libdirs"; then
-	      hardcode_libdirs="$libdir"
+	      hardcode_libdirs=$libdir
 	    else
 	      # Just accumulate the unique libdirs.
 	      case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
 	      *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
 		;;
 	      *)
-		hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir"
+		func_append hardcode_libdirs "$hardcode_libdir_separator$libdir"
 		;;
 	      esac
 	    fi
 	  else
 	    eval flag=\"$hardcode_libdir_flag_spec\"
-	    rpath="$rpath $flag"
+	    func_append rpath " $flag"
 	  fi
 	elif test -n "$runpath_var"; then
 	  case "$finalize_perm_rpath " in
 	  *" $libdir "*) ;;
-	  *) finalize_perm_rpath="$finalize_perm_rpath $libdir" ;;
+	  *) func_append finalize_perm_rpath " $libdir" ;;
 	  esac
 	fi
       done
       # Substitute the hardcoded libdirs into the rpath.
       if test -n "$hardcode_libdir_separator" &&
 	 test -n "$hardcode_libdirs"; then
-	libdir="$hardcode_libdirs"
+	libdir=$hardcode_libdirs
 	eval rpath=\" $hardcode_libdir_flag_spec\"
       fi
-      finalize_rpath="$rpath"
+      finalize_rpath=$rpath
 
-      if test -n "$libobjs" && test "$build_old_libs" = yes; then
+      if test -n "$libobjs" && test yes = "$build_old_libs"; then
 	# Transform all the library objects into standard objects.
-	compile_command=`$ECHO "X$compile_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
-	finalize_command=`$ECHO "X$finalize_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
+	compile_command=`$ECHO "$compile_command" | $SP2NL | $SED "$lo2o" | $NL2SP`
+	finalize_command=`$ECHO "$finalize_command" | $SP2NL | $SED "$lo2o" | $NL2SP`
       fi
 
-      func_generate_dlsyms "$outputname" "@PROGRAM@" "no"
+      func_generate_dlsyms "$outputname" "@PROGRAM@" false
 
       # template prelinking step
       if test -n "$prelink_cmds"; then
 	func_execute_cmds "$prelink_cmds" 'exit $?'
       fi
 
-      wrappers_required=yes
+      wrappers_required=:
       case $host in
-      *cygwin* | *mingw* )
-        if test "$build_libtool_libs" != yes; then
-          wrappers_required=no
-        fi
+      *cegcc* | *mingw32ce*)
+        # Disable wrappers for cegcc and mingw32ce hosts, we are cross compiling anyway.
+        wrappers_required=false
         ;;
-      *cegcc)
-        # Disable wrappers for cegcc, we are cross compiling anyway.
-        wrappers_required=no
+      *cygwin* | *mingw* )
+        test yes = "$build_libtool_libs" || wrappers_required=false
         ;;
       *)
-        if test "$need_relink" = no || test "$build_libtool_libs" != yes; then
-          wrappers_required=no
+        if test no = "$need_relink" || test yes != "$build_libtool_libs"; then
+          wrappers_required=false
         fi
         ;;
       esac
-      if test "$wrappers_required" = no; then
+      $wrappers_required || {
 	# Replace the output file specification.
-	compile_command=`$ECHO "X$compile_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'`
-	link_command="$compile_command$compile_rpath"
+	compile_command=`$ECHO "$compile_command" | $SED 's%@OUTPUT@%'"$output"'%g'`
+	link_command=$compile_command$compile_rpath
 
 	# We have no uninstalled library dependencies, so finalize right now.
 	exit_status=0
 	func_show_eval "$link_command" 'exit_status=$?'
 
+	if test -n "$postlink_cmds"; then
+	  func_to_tool_file "$output"
+	  postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'`
+	  func_execute_cmds "$postlink_cmds" 'exit $?'
+	fi
+
 	# Delete the generated files.
-	if test -f "$output_objdir/${outputname}S.${objext}"; then
-	  func_show_eval '$RM "$output_objdir/${outputname}S.${objext}"'
+	if test -f "$output_objdir/${outputname}S.$objext"; then
+	  func_show_eval '$RM "$output_objdir/${outputname}S.$objext"'
 	fi
 
 	exit $exit_status
-      fi
+      }
 
       if test -n "$compile_shlibpath$finalize_shlibpath"; then
 	compile_command="$shlibpath_var=\"$compile_shlibpath$finalize_shlibpath\$$shlibpath_var\" $compile_command"
@@ -7720,7 +10420,7 @@ EOF
 	  # We should set the runpath_var.
 	  rpath=
 	  for dir in $perm_rpath; do
-	    rpath="$rpath$dir:"
+	    func_append rpath "$dir:"
 	  done
 	  compile_var="$runpath_var=\"$rpath\$$runpath_var\" "
 	fi
@@ -7728,54 +10428,68 @@ EOF
 	  # We should set the runpath_var.
 	  rpath=
 	  for dir in $finalize_perm_rpath; do
-	    rpath="$rpath$dir:"
+	    func_append rpath "$dir:"
 	  done
 	  finalize_var="$runpath_var=\"$rpath\$$runpath_var\" "
 	fi
       fi
 
-      if test "$no_install" = yes; then
+      if test yes = "$no_install"; then
 	# We don't need to create a wrapper script.
-	link_command="$compile_var$compile_command$compile_rpath"
+	link_command=$compile_var$compile_command$compile_rpath
 	# Replace the output file specification.
-	link_command=`$ECHO "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'`
+	link_command=`$ECHO "$link_command" | $SED 's%@OUTPUT@%'"$output"'%g'`
 	# Delete the old output file.
 	$opt_dry_run || $RM $output
 	# Link the executable and exit
 	func_show_eval "$link_command" 'exit $?'
+
+	if test -n "$postlink_cmds"; then
+	  func_to_tool_file "$output"
+	  postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'`
+	  func_execute_cmds "$postlink_cmds" 'exit $?'
+	fi
+
 	exit $EXIT_SUCCESS
       fi
 
-      if test "$hardcode_action" = relink; then
-	# Fast installation is not supported
-	link_command="$compile_var$compile_command$compile_rpath"
-	relink_command="$finalize_var$finalize_command$finalize_rpath"
+      case $hardcode_action,$fast_install in
+        relink,*)
+	  # Fast installation is not supported
+	  link_command=$compile_var$compile_command$compile_rpath
+	  relink_command=$finalize_var$finalize_command$finalize_rpath
 
-	func_warning "this platform does not like uninstalled shared libraries"
-	func_warning "\`$output' will be relinked during installation"
-      else
-	if test "$fast_install" != no; then
-	  link_command="$finalize_var$compile_command$finalize_rpath"
-	  if test "$fast_install" = yes; then
-	    relink_command=`$ECHO "X$compile_var$compile_command$compile_rpath" | $Xsed -e 's%@OUTPUT@%\$progdir/\$file%g'`
-	  else
-	    # fast_install is set to needless
-	    relink_command=
-	  fi
-	else
-	  link_command="$compile_var$compile_command$compile_rpath"
-	  relink_command="$finalize_var$finalize_command$finalize_rpath"
-	fi
-      fi
+	  func_warning "this platform does not like uninstalled shared libraries"
+	  func_warning "'$output' will be relinked during installation"
+	  ;;
+        *,yes)
+	  link_command=$finalize_var$compile_command$finalize_rpath
+	  relink_command=`$ECHO "$compile_var$compile_command$compile_rpath" | $SED 's%@OUTPUT@%\$progdir/\$file%g'`
+          ;;
+	*,no)
+	  link_command=$compile_var$compile_command$compile_rpath
+	  relink_command=$finalize_var$finalize_command$finalize_rpath
+          ;;
+	*,needless)
+	  link_command=$finalize_var$compile_command$finalize_rpath
+	  relink_command=
+          ;;
+      esac
 
       # Replace the output file specification.
-      link_command=`$ECHO "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'`
+      link_command=`$ECHO "$link_command" | $SED 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'`
 
       # Delete the old output files.
       $opt_dry_run || $RM $output $output_objdir/$outputname $output_objdir/lt-$outputname
 
       func_show_eval "$link_command" 'exit $?'
 
+      if test -n "$postlink_cmds"; then
+	func_to_tool_file "$output_objdir/$outputname"
+	postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'`
+	func_execute_cmds "$postlink_cmds" 'exit $?'
+      fi
+
       # Now create the wrapper script.
       func_verbose "creating $output"
 
@@ -7793,18 +10507,7 @@ EOF
 	  fi
 	done
 	relink_command="(cd `pwd`; $relink_command)"
-	relink_command=`$ECHO "X$relink_command" | $Xsed -e "$sed_quote_subst"`
-      fi
-
-      # Quote $ECHO for shipping.
-      if test "X$ECHO" = "X$SHELL $progpath --fallback-echo"; then
-	case $progpath in
-	[\\/]* | [A-Za-z]:[\\/]*) qecho="$SHELL $progpath --fallback-echo";;
-	*) qecho="$SHELL `pwd`/$progpath --fallback-echo";;
-	esac
-	qecho=`$ECHO "X$qecho" | $Xsed -e "$sed_quote_subst"`
-      else
-	qecho=`$ECHO "X$ECHO" | $Xsed -e "$sed_quote_subst"`
+	relink_command=`$ECHO "$relink_command" | $SED "$sed_quote_subst"`
       fi
 
       # Only actually do things if not in dry run mode.
@@ -7828,8 +10531,8 @@ EOF
 	    func_dirname_and_basename "$output" "" "."
 	    output_name=$func_basename_result
 	    output_path=$func_dirname_result
-	    cwrappersource="$output_path/$objdir/lt-$output_name.c"
-	    cwrapper="$output_path/$output_name.exe"
+	    cwrappersource=$output_path/$objdir/lt-$output_name.c
+	    cwrapper=$output_path/$output_name.exe
 	    $RM $cwrappersource $cwrapper
 	    trap "$RM $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15
 
@@ -7850,7 +10553,7 @@ EOF
 	    trap "$RM $func_ltwrapper_scriptname_result; exit $EXIT_FAILURE" 1 2 15
 	    $opt_dry_run || {
 	      # note: this script will not be executed, so do not chmod.
-	      if test "x$build" = "x$host" ; then
+	      if test "x$build" = "x$host"; then
 		$cwrapper --lt-dump-script > $func_ltwrapper_scriptname_result
 	      else
 		func_emit_wrapper no > $func_ltwrapper_scriptname_result
@@ -7873,43 +10576,45 @@ EOF
     # See if we need to build an old-fashioned archive.
     for oldlib in $oldlibs; do
 
-      if test "$build_libtool_libs" = convenience; then
-	oldobjs="$libobjs_save $symfileobj"
-	addlibs="$convenience"
-	build_libtool_libs=no
-      else
-	if test "$build_libtool_libs" = module; then
-	  oldobjs="$libobjs_save"
+      case $build_libtool_libs in
+        convenience)
+	  oldobjs="$libobjs_save $symfileobj"
+	  addlibs=$convenience
 	  build_libtool_libs=no
-	else
+	  ;;
+	module)
+	  oldobjs=$libobjs_save
+	  addlibs=$old_convenience
+	  build_libtool_libs=no
+          ;;
+	*)
 	  oldobjs="$old_deplibs $non_pic_objects"
-	  if test "$preload" = yes && test -f "$symfileobj"; then
-	    oldobjs="$oldobjs $symfileobj"
-	  fi
-	fi
-	addlibs="$old_convenience"
-      fi
+	  $preload && test -f "$symfileobj" \
+	    && func_append oldobjs " $symfileobj"
+	  addlibs=$old_convenience
+	  ;;
+      esac
 
       if test -n "$addlibs"; then
-	gentop="$output_objdir/${outputname}x"
-	generated="$generated $gentop"
+	gentop=$output_objdir/${outputname}x
+	func_append generated " $gentop"
 
 	func_extract_archives $gentop $addlibs
-	oldobjs="$oldobjs $func_extract_archives_result"
+	func_append oldobjs " $func_extract_archives_result"
       fi
 
       # Do each command in the archive commands.
-      if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then
+      if test -n "$old_archive_from_new_cmds" && test yes = "$build_libtool_libs"; then
 	cmds=$old_archive_from_new_cmds
       else
 
 	# Add any objects from preloaded convenience libraries
 	if test -n "$dlprefiles"; then
-	  gentop="$output_objdir/${outputname}x"
-	  generated="$generated $gentop"
+	  gentop=$output_objdir/${outputname}x
+	  func_append generated " $gentop"
 
 	  func_extract_archives $gentop $dlprefiles
-	  oldobjs="$oldobjs $func_extract_archives_result"
+	  func_append oldobjs " $func_extract_archives_result"
 	fi
 
 	# POSIX demands no paths to be encoded in archives.  We have
@@ -7925,9 +10630,9 @@ EOF
 	    done | sort | sort -uc >/dev/null 2>&1); then
 	  :
 	else
-	  $ECHO "copying selected object files to avoid basename conflicts..."
-	  gentop="$output_objdir/${outputname}x"
-	  generated="$generated $gentop"
+	  echo "copying selected object files to avoid basename conflicts..."
+	  gentop=$output_objdir/${outputname}x
+	  func_append generated " $gentop"
 	  func_mkdir_p "$gentop"
 	  save_oldobjs=$oldobjs
 	  oldobjs=
@@ -7935,7 +10640,7 @@ EOF
 	  for obj in $save_oldobjs
 	  do
 	    func_basename "$obj"
-	    objbase="$func_basename_result"
+	    objbase=$func_basename_result
 	    case " $oldobjs " in
 	    " ") oldobjs=$obj ;;
 	    *[\ /]"$objbase "*)
@@ -7951,18 +10656,30 @@ EOF
 		esac
 	      done
 	      func_show_eval "ln $obj $gentop/$newobj || cp $obj $gentop/$newobj"
-	      oldobjs="$oldobjs $gentop/$newobj"
+	      func_append oldobjs " $gentop/$newobj"
 	      ;;
-	    *) oldobjs="$oldobjs $obj" ;;
+	    *) func_append oldobjs " $obj" ;;
 	    esac
 	  done
 	fi
+	func_to_tool_file "$oldlib" func_convert_file_msys_to_w32
+	tool_oldlib=$func_to_tool_file_result
 	eval cmds=\"$old_archive_cmds\"
 
 	func_len " $cmds"
 	len=$func_len_result
 	if test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then
 	  cmds=$old_archive_cmds
+	elif test -n "$archiver_list_spec"; then
+	  func_verbose "using command file archive linking..."
+	  for obj in $oldobjs
+	  do
+	    func_to_tool_file "$obj"
+	    $ECHO "$func_to_tool_file_result"
+	  done > $output_objdir/$libname.libcmd
+	  func_to_tool_file "$output_objdir/$libname.libcmd"
+	  oldobjs=" $archiver_list_spec$func_to_tool_file_result"
+	  cmds=$old_archive_cmds
 	else
 	  # the command line is too long to link in one step, link in parts
 	  func_verbose "using piecewise archive linking..."
@@ -7992,18 +10709,18 @@ EOF
 	    else
 	      # the above command should be used before it gets too long
 	      oldobjs=$objlist
-	      if test "$obj" = "$last_oldobj" ; then
+	      if test "$obj" = "$last_oldobj"; then
 		RANLIB=$save_RANLIB
 	      fi
 	      test -z "$concat_cmds" || concat_cmds=$concat_cmds~
-	      eval concat_cmds=\"\${concat_cmds}$old_archive_cmds\"
+	      eval concat_cmds=\"\$concat_cmds$old_archive_cmds\"
 	      objlist=
 	      len=$len0
 	    fi
 	  done
 	  RANLIB=$save_RANLIB
 	  oldobjs=$objlist
-	  if test "X$oldobjs" = "X" ; then
+	  if test -z "$oldobjs"; then
 	    eval cmds=\"\$concat_cmds\"
 	  else
 	    eval cmds=\"\$concat_cmds~\$old_archive_cmds\"
@@ -8020,7 +10737,7 @@ EOF
     case $output in
     *.la)
       old_library=
-      test "$build_old_libs" = yes && old_library="$libname.$libext"
+      test yes = "$build_old_libs" && old_library=$libname.$libext
       func_verbose "creating $output"
 
       # Preserve any variables that may affect compiler behavior
@@ -8035,52 +10752,63 @@ EOF
 	fi
       done
       # Quote the link command for shipping.
-      relink_command="(cd `pwd`; $SHELL $progpath $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)"
-      relink_command=`$ECHO "X$relink_command" | $Xsed -e "$sed_quote_subst"`
-      if test "$hardcode_automatic" = yes ; then
+      relink_command="(cd `pwd`; $SHELL \"$progpath\" $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)"
+      relink_command=`$ECHO "$relink_command" | $SED "$sed_quote_subst"`
+      if test yes = "$hardcode_automatic"; then
 	relink_command=
       fi
 
       # Only create the output if not a dry run.
       $opt_dry_run || {
 	for installed in no yes; do
-	  if test "$installed" = yes; then
+	  if test yes = "$installed"; then
 	    if test -z "$install_libdir"; then
 	      break
 	    fi
-	    output="$output_objdir/$outputname"i
+	    output=$output_objdir/${outputname}i
 	    # Replace all uninstalled libtool libraries with the installed ones
 	    newdependency_libs=
 	    for deplib in $dependency_libs; do
 	      case $deplib in
 	      *.la)
 		func_basename "$deplib"
-		name="$func_basename_result"
-		eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
+		name=$func_basename_result
+		func_resolve_sysroot "$deplib"
+		eval libdir=`$SED -n -e 's/^libdir=\(.*\)$/\1/p' $func_resolve_sysroot_result`
 		test -z "$libdir" && \
-		  func_fatal_error "\`$deplib' is not a valid libtool archive"
-		newdependency_libs="$newdependency_libs $libdir/$name"
+		  func_fatal_error "'$deplib' is not a valid libtool archive"
+		func_append newdependency_libs " ${lt_sysroot:+=}$libdir/$name"
+		;;
+	      -L*)
+		func_stripname -L '' "$deplib"
+		func_replace_sysroot "$func_stripname_result"
+		func_append newdependency_libs " -L$func_replace_sysroot_result"
 		;;
-	      *) newdependency_libs="$newdependency_libs $deplib" ;;
+	      -R*)
+		func_stripname -R '' "$deplib"
+		func_replace_sysroot "$func_stripname_result"
+		func_append newdependency_libs " -R$func_replace_sysroot_result"
+		;;
+	      *) func_append newdependency_libs " $deplib" ;;
 	      esac
 	    done
-	    dependency_libs="$newdependency_libs"
+	    dependency_libs=$newdependency_libs
 	    newdlfiles=
 
 	    for lib in $dlfiles; do
 	      case $lib in
 	      *.la)
 	        func_basename "$lib"
-		name="$func_basename_result"
-		eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
+		name=$func_basename_result
+		eval libdir=`$SED -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
 		test -z "$libdir" && \
-		  func_fatal_error "\`$lib' is not a valid libtool archive"
-		newdlfiles="$newdlfiles $libdir/$name"
+		  func_fatal_error "'$lib' is not a valid libtool archive"
+		func_append newdlfiles " ${lt_sysroot:+=}$libdir/$name"
 		;;
-	      *) newdlfiles="$newdlfiles $lib" ;;
+	      *) func_append newdlfiles " $lib" ;;
 	      esac
 	    done
-	    dlfiles="$newdlfiles"
+	    dlfiles=$newdlfiles
 	    newdlprefiles=
 	    for lib in $dlprefiles; do
 	      case $lib in
@@ -8090,44 +10818,61 @@ EOF
 		# didn't already link the preopened objects directly into
 		# the library:
 		func_basename "$lib"
-		name="$func_basename_result"
-		eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
+		name=$func_basename_result
+		eval libdir=`$SED -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
 		test -z "$libdir" && \
-		  func_fatal_error "\`$lib' is not a valid libtool archive"
-		newdlprefiles="$newdlprefiles $libdir/$name"
+		  func_fatal_error "'$lib' is not a valid libtool archive"
+		func_append newdlprefiles " ${lt_sysroot:+=}$libdir/$name"
 		;;
 	      esac
 	    done
-	    dlprefiles="$newdlprefiles"
+	    dlprefiles=$newdlprefiles
 	  else
 	    newdlfiles=
 	    for lib in $dlfiles; do
 	      case $lib in
-		[\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;;
+		[\\/]* | [A-Za-z]:[\\/]*) abs=$lib ;;
 		*) abs=`pwd`"/$lib" ;;
 	      esac
-	      newdlfiles="$newdlfiles $abs"
+	      func_append newdlfiles " $abs"
 	    done
-	    dlfiles="$newdlfiles"
+	    dlfiles=$newdlfiles
 	    newdlprefiles=
 	    for lib in $dlprefiles; do
 	      case $lib in
-		[\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;;
+		[\\/]* | [A-Za-z]:[\\/]*) abs=$lib ;;
 		*) abs=`pwd`"/$lib" ;;
 	      esac
-	      newdlprefiles="$newdlprefiles $abs"
+	      func_append newdlprefiles " $abs"
 	    done
-	    dlprefiles="$newdlprefiles"
+	    dlprefiles=$newdlprefiles
 	  fi
 	  $RM $output
 	  # place dlname in correct position for cygwin
+	  # In fact, it would be nice if we could use this code for all target
+	  # systems that can't hard-code library paths into their executables
+	  # and that have no shared library path variable independent of PATH,
+	  # but it turns out we can't easily determine that from inspecting
+	  # libtool variables, so we have to hard-code the OSs to which it
+	  # applies here; at the moment, that means platforms that use the PE
+	  # object format with DLL files.  See the long comment at the top of
+	  # tests/bindir.at for full details.
 	  tdlname=$dlname
 	  case $host,$output,$installed,$module,$dlname in
-	    *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll | *cegcc*,*lai,yes,no,*.dll) tdlname=../bin/$dlname ;;
+	    *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll | *cegcc*,*lai,yes,no,*.dll)
+	      # If a -bindir argument was supplied, place the dll there.
+	      if test -n "$bindir"; then
+		func_relative_path "$install_libdir" "$bindir"
+		tdlname=$func_relative_path_result/$dlname
+	      else
+		# Otherwise fall back on heuristic.
+		tdlname=../bin/$dlname
+	      fi
+	      ;;
 	  esac
 	  $ECHO > $output "\
 # $outputname - a libtool library file
-# Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION
+# Generated by $PROGRAM (GNU $PACKAGE) $VERSION
 #
 # Please DO NOT delete this file!
 # It is necessary for linking the library.
@@ -8141,7 +10886,7 @@ library_names='$library_names'
 # The name of the static archive.
 old_library='$old_library'
 
-# Linker flags that can not go in dependency_libs.
+# Linker flags that cannot go in dependency_libs.
 inherited_linker_flags='$new_inherited_linker_flags'
 
 # Libraries that this one depends upon.
@@ -8167,7 +10912,7 @@ dlpreopen='$dlprefiles'
 
 # Directory that this library needs to be installed in:
 libdir='$install_libdir'"
-	  if test "$installed" = no && test "$need_relink" = yes; then
+	  if test no,yes = "$installed,$need_relink"; then
 	    $ECHO >> $output "\
 relink_command=\"$relink_command\""
 	  fi
@@ -8182,29 +10927,31 @@ relink_command=\"$relink_command\""
     exit $EXIT_SUCCESS
 }
 
-{ test "$mode" = link || test "$mode" = relink; } &&
-    func_mode_link ${1+"$@"}
+if test link = "$opt_mode" || test relink = "$opt_mode"; then
+  func_mode_link ${1+"$@"}
+fi
 
 
 # func_mode_uninstall arg...
 func_mode_uninstall ()
 {
-    $opt_debug
-    RM="$nonopt"
+    $debug_cmd
+
+    RM=$nonopt
     files=
-    rmforce=
+    rmforce=false
     exit_status=0
 
     # This variable tells wrapper scripts just to set variables rather
     # than running their programs.
-    libtool_install_magic="$magic"
+    libtool_install_magic=$magic
 
     for arg
     do
       case $arg in
-      -f) RM="$RM $arg"; rmforce=yes ;;
-      -*) RM="$RM $arg" ;;
-      *) files="$files $arg" ;;
+      -f) func_append RM " $arg"; rmforce=: ;;
+      -*) func_append RM " $arg" ;;
+      *) func_append files " $arg" ;;
       esac
     done
 
@@ -8213,24 +10960,23 @@ func_mode_uninstall ()
 
     rmdirs=
 
-    origobjdir="$objdir"
     for file in $files; do
       func_dirname "$file" "" "."
-      dir="$func_dirname_result"
-      if test "X$dir" = X.; then
-	objdir="$origobjdir"
+      dir=$func_dirname_result
+      if test . = "$dir"; then
+	odir=$objdir
       else
-	objdir="$dir/$origobjdir"
+	odir=$dir/$objdir
       fi
       func_basename "$file"
-      name="$func_basename_result"
-      test "$mode" = uninstall && objdir="$dir"
+      name=$func_basename_result
+      test uninstall = "$opt_mode" && odir=$dir
 
-      # Remember objdir for removal later, being careful to avoid duplicates
-      if test "$mode" = clean; then
+      # Remember odir for removal later, being careful to avoid duplicates
+      if test clean = "$opt_mode"; then
 	case " $rmdirs " in
-	  *" $objdir "*) ;;
-	  *) rmdirs="$rmdirs $objdir" ;;
+	  *" $odir "*) ;;
+	  *) func_append rmdirs " $odir" ;;
 	esac
       fi
 
@@ -8242,11 +10988,11 @@ func_mode_uninstall ()
       elif test -d "$file"; then
 	exit_status=1
 	continue
-      elif test "$rmforce" = yes; then
+      elif $rmforce; then
 	continue
       fi
 
-      rmfiles="$file"
+      rmfiles=$file
 
       case $name in
       *.la)
@@ -8256,28 +11002,27 @@ func_mode_uninstall ()
 
 	  # Delete the libtool libraries and symlinks.
 	  for n in $library_names; do
-	    rmfiles="$rmfiles $objdir/$n"
+	    func_append rmfiles " $odir/$n"
 	  done
-	  test -n "$old_library" && rmfiles="$rmfiles $objdir/$old_library"
+	  test -n "$old_library" && func_append rmfiles " $odir/$old_library"
 
-	  case "$mode" in
+	  case $opt_mode in
 	  clean)
-	    case "  $library_names " in
-	    # "  " in the beginning catches empty $dlname
+	    case " $library_names " in
 	    *" $dlname "*) ;;
-	    *) rmfiles="$rmfiles $objdir/$dlname" ;;
+	    *) test -n "$dlname" && func_append rmfiles " $odir/$dlname" ;;
 	    esac
-	    test -n "$libdir" && rmfiles="$rmfiles $objdir/$name $objdir/${name}i"
+	    test -n "$libdir" && func_append rmfiles " $odir/$name $odir/${name}i"
 	    ;;
 	  uninstall)
 	    if test -n "$library_names"; then
 	      # Do each command in the postuninstall commands.
-	      func_execute_cmds "$postuninstall_cmds" 'test "$rmforce" = yes || exit_status=1'
+	      func_execute_cmds "$postuninstall_cmds" '$rmforce || exit_status=1'
 	    fi
 
 	    if test -n "$old_library"; then
 	      # Do each command in the old_postuninstall commands.
-	      func_execute_cmds "$old_postuninstall_cmds" 'test "$rmforce" = yes || exit_status=1'
+	      func_execute_cmds "$old_postuninstall_cmds" '$rmforce || exit_status=1'
 	    fi
 	    # FIXME: should reinstall the best remaining shared library.
 	    ;;
@@ -8293,21 +11038,19 @@ func_mode_uninstall ()
 	  func_source $dir/$name
 
 	  # Add PIC object to the list of files to remove.
-	  if test -n "$pic_object" &&
-	     test "$pic_object" != none; then
-	    rmfiles="$rmfiles $dir/$pic_object"
+	  if test -n "$pic_object" && test none != "$pic_object"; then
+	    func_append rmfiles " $dir/$pic_object"
 	  fi
 
 	  # Add non-PIC object to the list of files to remove.
-	  if test -n "$non_pic_object" &&
-	     test "$non_pic_object" != none; then
-	    rmfiles="$rmfiles $dir/$non_pic_object"
+	  if test -n "$non_pic_object" && test none != "$non_pic_object"; then
+	    func_append rmfiles " $dir/$non_pic_object"
 	  fi
 	fi
 	;;
 
       *)
-	if test "$mode" = clean ; then
+	if test clean = "$opt_mode"; then
 	  noexename=$name
 	  case $file in
 	  *.exe)
@@ -8317,7 +11060,7 @@ func_mode_uninstall ()
 	    noexename=$func_stripname_result
 	    # $file with .exe has already been added to rmfiles,
 	    # add $file without .exe
-	    rmfiles="$rmfiles $file"
+	    func_append rmfiles " $file"
 	    ;;
 	  esac
 	  # Do a test to see if this is a libtool program.
@@ -8326,7 +11069,7 @@ func_mode_uninstall ()
 	      func_ltwrapper_scriptname "$file"
 	      relink_command=
 	      func_source $func_ltwrapper_scriptname_result
-	      rmfiles="$rmfiles $func_ltwrapper_scriptname_result"
+	      func_append rmfiles " $func_ltwrapper_scriptname_result"
 	    else
 	      relink_command=
 	      func_source $dir/$noexename
@@ -8334,12 +11077,12 @@ func_mode_uninstall ()
 
 	    # note $name still contains .exe if it was in $file originally
 	    # as does the version of $file that was added into $rmfiles
-	    rmfiles="$rmfiles $objdir/$name $objdir/${name}S.${objext}"
-	    if test "$fast_install" = yes && test -n "$relink_command"; then
-	      rmfiles="$rmfiles $objdir/lt-$name"
+	    func_append rmfiles " $odir/$name $odir/${name}S.$objext"
+	    if test yes = "$fast_install" && test -n "$relink_command"; then
+	      func_append rmfiles " $odir/lt-$name"
 	    fi
-	    if test "X$noexename" != "X$name" ; then
-	      rmfiles="$rmfiles $objdir/lt-${noexename}.c"
+	    if test "X$noexename" != "X$name"; then
+	      func_append rmfiles " $odir/lt-$noexename.c"
 	    fi
 	  fi
 	fi
@@ -8347,9 +11090,8 @@ func_mode_uninstall ()
       esac
       func_show_eval "$RM $rmfiles" 'exit_status=1'
     done
-    objdir="$origobjdir"
 
-    # Try to remove the ${objdir}s in the directories where we deleted files
+    # Try to remove the $objdir's in the directories where we deleted files
     for dir in $rmdirs; do
       if test -d "$dir"; then
 	func_show_eval "rmdir $dir >/dev/null 2>&1"
@@ -8359,16 +11101,17 @@ func_mode_uninstall ()
     exit $exit_status
 }
 
-{ test "$mode" = uninstall || test "$mode" = clean; } &&
-    func_mode_uninstall ${1+"$@"}
+if test uninstall = "$opt_mode" || test clean = "$opt_mode"; then
+  func_mode_uninstall ${1+"$@"}
+fi
 
-test -z "$mode" && {
-  help="$generic_help"
+test -z "$opt_mode" && {
+  help=$generic_help
   func_fatal_help "you must specify a MODE"
 }
 
 test -z "$exec_cmd" && \
-  func_fatal_help "invalid operation mode \`$mode'"
+  func_fatal_help "invalid operation mode '$opt_mode'"
 
 if test -n "$exec_cmd"; then
   eval exec "$exec_cmd"
@@ -8379,7 +11122,7 @@ exit $exit_status
 
 
 # The TAGs below are defined such that we never get into a situation
-# in which we disable both kinds of libraries.  Given conflicting
+# where we disable both kinds of libraries.  Given conflicting
 # choices, we go for a static library, that is the most portable,
 # since we can't tell whether shared libraries were disabled because
 # the user asked for that or because the platform doesn't support
@@ -8402,5 +11145,3 @@ build_old_libs=`case $build_libtool_libs in yes) echo no;; *) echo yes;; esac`
 # mode:shell-script
 # sh-indentation:2
 # End:
-# vi:sw=2
-

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/reproducible/r-base.git



More information about the Reproducible-commits mailing list